From 2608f8004ee058ba0d66e5169e6a63c8e5e0f27f Mon Sep 17 00:00:00 2001 From: Charlie Overton Date: Thu, 5 Feb 2026 15:39:14 -0500 Subject: [PATCH 01/16] add util methods --- foundry_sdk/v2/functions/__init__.py | 10 ++++++++++ foundry_sdk/v2/functions/language_models.py | 0 2 files changed, 10 insertions(+) create mode 100644 foundry_sdk/v2/functions/language_models.py diff --git a/foundry_sdk/v2/functions/__init__.py b/foundry_sdk/v2/functions/__init__.py index 50e3b4928..bdc52257a 100644 --- a/foundry_sdk/v2/functions/__init__.py +++ b/foundry_sdk/v2/functions/__init__.py @@ -15,8 +15,18 @@ from foundry_sdk.v2.functions._client import AsyncFunctionsClient from foundry_sdk.v2.functions._client import FunctionsClient +from foundry_sdk.v2.functions.utils import get_anthropic_base_url +from foundry_sdk.v2.functions.utils import get_api_gateway_base_url +from foundry_sdk.v2.functions.utils import get_foundry_token +from foundry_sdk.v2.functions.utils import get_http_client +from foundry_sdk.v2.functions.utils import get_openai_base_url __all__ = [ "FunctionsClient", "AsyncFunctionsClient", + "get_anthropic_base_url", + "get_api_gateway_base_url", + "get_foundry_token", + "get_http_client", + "get_openai_base_url", ] diff --git a/foundry_sdk/v2/functions/language_models.py b/foundry_sdk/v2/functions/language_models.py new file mode 100644 index 000000000..e69de29bb From 708ea0edd19a35c63f39ea2b6e1fca44e295cb72 Mon Sep 17 00:00:00 2001 From: Charlie Overton Date: Thu, 5 Feb 2026 15:39:31 -0500 Subject: [PATCH 02/16] add tests --- foundry_sdk/v2/functions/utils.py | 138 ++++++++++++++++++++++++++++++ tests/functions/__init__.py | 13 +++ tests/functions/test_utils.py | 131 ++++++++++++++++++++++++++++ 3 files changed, 282 insertions(+) create mode 100644 foundry_sdk/v2/functions/utils.py create mode 100644 tests/functions/__init__.py create mode 100644 tests/functions/test_utils.py diff --git a/foundry_sdk/v2/functions/utils.py b/foundry_sdk/v2/functions/utils.py new file mode 100644 index 000000000..4f2f590ee --- /dev/null +++ b/foundry_sdk/v2/functions/utils.py @@ -0,0 +1,138 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +from typing import Optional + +from foundry_sdk._core.config import Config +from foundry_sdk._core.context_and_environment_vars import HOSTNAME_VAR +from foundry_sdk._core.context_and_environment_vars import TOKEN_VAR +from foundry_sdk._core.http_client import HttpClient + + +def get_api_gateway_base_url(*, preview: bool = False) -> str: + """Get the Foundry hostname from the current execution context. + + Args: + preview: Must be set to True to use this beta feature. + + Returns: + The Foundry API gateway base URL. + + Raises: + ValueError: If preview is not set to True. + RuntimeError: If the Foundry API gateway base URL is not available in the current context. + """ + if not preview: + raise ValueError( + "get_api_gateway_base_url() is in beta. " + "Please set the preview parameter to True to use it." + ) + hostname = HOSTNAME_VAR.get() + if hostname is None: + raise RuntimeError( + "Foundry API gateway base URL is not available in the current context." + ) + return hostname + + +def get_foundry_token(*, preview: bool = False) -> str: + """Get the Foundry token from the current execution context. + + Args: + preview: Must be set to True to use this beta feature. + + Returns: + The Foundry token. + + Raises: + ValueError: If preview is not set to True. + RuntimeError: If the Foundry token is not available in the current context. + """ + if not preview: + raise ValueError( + "get_foundry_token() is in beta. " + "Please set the preview parameter to True to use it." + ) + token = TOKEN_VAR.get() + if token is None: + raise RuntimeError("Foundry token is not available in the current context.") + return token + + +def get_openai_base_url(*, preview: bool = False) -> str: + """Get the OpenAI proxy base URL for the current Foundry environment. + + Args: + preview: Must be set to True to use this beta feature. + + Returns: + The OpenAI proxy base URL. + + Raises: + ValueError: If preview is not set to True. + RuntimeError: If the Foundry API gateway base URL is not available in the current context. + """ + if not preview: + raise ValueError( + "get_openai_base_url() is in beta. " + "Please set the preview parameter to True to use it." + ) + hostname = get_api_gateway_base_url(preview=True) + return f"https://{hostname}/api/v1/models/openai" + + +def get_anthropic_base_url(*, preview: bool = False) -> str: + """Get the Anthropic proxy base URL for the current Foundry environment. + + Args: + preview: Must be set to True to use this beta feature. + + Returns: + The Anthropic proxy base URL. + + Raises: + ValueError: If preview is not set to True. + RuntimeError: If the Foundry API gateway base URL is not available in the current context. + """ + if not preview: + raise ValueError( + "get_anthropic_base_url() is in beta. " + "Please set the preview parameter to True to use it." + ) + hostname = get_api_gateway_base_url(preview=True) + return f"https://{hostname}/api/v1/models/anthropic" + + +def get_http_client(*, preview: bool = False, config: Optional[Config] = None) -> HttpClient: + """Get an HTTP client configured for the current Foundry environment. + + Args: + preview: Must be set to True to use this beta feature. + config: Optional configuration for the HTTP client. + + Returns: + An HttpClient instance configured with the Foundry hostname. + + Raises: + ValueError: If preview is not set to True. + RuntimeError: If the Foundry API gateway base URL is not available in the current context. + """ + if not preview: + raise ValueError( + "get_http_client() is in beta. " + "Please set the preview parameter to True to use it." + ) + hostname = get_api_gateway_base_url(preview=True) + return HttpClient(hostname=hostname, config=config) diff --git a/tests/functions/__init__.py b/tests/functions/__init__.py new file mode 100644 index 000000000..490e9ab88 --- /dev/null +++ b/tests/functions/__init__.py @@ -0,0 +1,13 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. diff --git a/tests/functions/test_utils.py b/tests/functions/test_utils.py new file mode 100644 index 000000000..78d85904f --- /dev/null +++ b/tests/functions/test_utils.py @@ -0,0 +1,131 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import pytest + +from foundry_sdk._core.context_and_environment_vars import HOSTNAME_VAR +from foundry_sdk._core.context_and_environment_vars import TOKEN_VAR +from foundry_sdk._core.http_client import HttpClient +from foundry_sdk.v2.functions import ( + get_anthropic_base_url, + get_api_gateway_base_url, + get_foundry_token, + get_http_client, + get_openai_base_url, +) + + +class TestPreviewParameter: + """Test that all functions require preview=True.""" + + def test_get_api_gateway_base_url_requires_preview(self): + with pytest.raises(ValueError, match="preview parameter"): + get_api_gateway_base_url() + + def test_get_foundry_token_requires_preview(self): + with pytest.raises(ValueError, match="preview parameter"): + get_foundry_token() + + def test_get_openai_base_url_requires_preview(self): + with pytest.raises(ValueError, match="preview parameter"): + get_openai_base_url() + + def test_get_anthropic_base_url_requires_preview(self): + with pytest.raises(ValueError, match="preview parameter"): + get_anthropic_base_url() + + def test_get_http_client_requires_preview(self): + with pytest.raises(ValueError, match="preview parameter"): + get_http_client() + + +class TestGetApiGatewayBaseUrl: + """Test get_api_gateway_base_url function.""" + + def test_returns_hostname_from_context(self): + token = HOSTNAME_VAR.set("test.palantirfoundry.com") + try: + result = get_api_gateway_base_url(preview=True) + assert result == "test.palantirfoundry.com" + finally: + HOSTNAME_VAR.reset(token) + + def test_raises_runtime_error_when_not_in_context(self): + with pytest.raises(RuntimeError, match="not available"): + get_api_gateway_base_url(preview=True) + + +class TestGetFoundryToken: + """Test get_foundry_token function.""" + + def test_returns_token_from_context(self): + token = TOKEN_VAR.set("test-token-12345") + try: + result = get_foundry_token(preview=True) + assert result == "test-token-12345" + finally: + TOKEN_VAR.reset(token) + + def test_raises_runtime_error_when_not_in_context(self): + with pytest.raises(RuntimeError, match="not available"): + get_foundry_token(preview=True) + + +class TestGetOpenaiBaseUrl: + """Test get_openai_base_url function.""" + + def test_returns_correct_url(self): + token = HOSTNAME_VAR.set("test.palantirfoundry.com") + try: + result = get_openai_base_url(preview=True) + assert result == "https://test.palantirfoundry.com/api/v1/models/openai" + finally: + HOSTNAME_VAR.reset(token) + + def test_raises_runtime_error_when_not_in_context(self): + with pytest.raises(RuntimeError, match="not available"): + get_openai_base_url(preview=True) + + +class TestGetAnthropicBaseUrl: + """Test get_anthropic_base_url function.""" + + def test_returns_correct_url(self): + token = HOSTNAME_VAR.set("test.palantirfoundry.com") + try: + result = get_anthropic_base_url(preview=True) + assert result == "https://test.palantirfoundry.com/api/v1/models/anthropic" + finally: + HOSTNAME_VAR.reset(token) + + def test_raises_runtime_error_when_not_in_context(self): + with pytest.raises(RuntimeError, match="not available"): + get_anthropic_base_url(preview=True) + + +class TestGetHttpClient: + """Test get_http_client function.""" + + def test_returns_http_client(self): + token = HOSTNAME_VAR.set("test.palantirfoundry.com") + try: + result = get_http_client(preview=True) + assert isinstance(result, HttpClient) + finally: + HOSTNAME_VAR.reset(token) + + def test_raises_runtime_error_when_not_in_context(self): + with pytest.raises(RuntimeError, match="not available"): + get_http_client(preview=True) From c49f8fba2a50cff0923db79ebc60bc3d66dbcc1f Mon Sep 17 00:00:00 2001 From: overtonch Date: Mon, 9 Feb 2026 13:10:39 -0500 Subject: [PATCH 03/16] fix --- foundry_sdk/v2/functions/__init__.py | 2 -- foundry_sdk/v2/functions/utils.py | 8 ++++---- tests/functions/test_utils.py | 12 ++++++------ 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/foundry_sdk/v2/functions/__init__.py b/foundry_sdk/v2/functions/__init__.py index bdc52257a..0a6869402 100644 --- a/foundry_sdk/v2/functions/__init__.py +++ b/foundry_sdk/v2/functions/__init__.py @@ -16,7 +16,6 @@ from foundry_sdk.v2.functions._client import AsyncFunctionsClient from foundry_sdk.v2.functions._client import FunctionsClient from foundry_sdk.v2.functions.utils import get_anthropic_base_url -from foundry_sdk.v2.functions.utils import get_api_gateway_base_url from foundry_sdk.v2.functions.utils import get_foundry_token from foundry_sdk.v2.functions.utils import get_http_client from foundry_sdk.v2.functions.utils import get_openai_base_url @@ -25,7 +24,6 @@ "FunctionsClient", "AsyncFunctionsClient", "get_anthropic_base_url", - "get_api_gateway_base_url", "get_foundry_token", "get_http_client", "get_openai_base_url", diff --git a/foundry_sdk/v2/functions/utils.py b/foundry_sdk/v2/functions/utils.py index 4f2f590ee..7c7715446 100644 --- a/foundry_sdk/v2/functions/utils.py +++ b/foundry_sdk/v2/functions/utils.py @@ -21,7 +21,7 @@ from foundry_sdk._core.http_client import HttpClient -def get_api_gateway_base_url(*, preview: bool = False) -> str: +def _get_api_gateway_base_url(*, preview: bool = False) -> str: """Get the Foundry hostname from the current execution context. Args: @@ -89,7 +89,7 @@ def get_openai_base_url(*, preview: bool = False) -> str: "get_openai_base_url() is in beta. " "Please set the preview parameter to True to use it." ) - hostname = get_api_gateway_base_url(preview=True) + hostname = _get_api_gateway_base_url(preview=True) return f"https://{hostname}/api/v1/models/openai" @@ -111,7 +111,7 @@ def get_anthropic_base_url(*, preview: bool = False) -> str: "get_anthropic_base_url() is in beta. " "Please set the preview parameter to True to use it." ) - hostname = get_api_gateway_base_url(preview=True) + hostname = _get_api_gateway_base_url(preview=True) return f"https://{hostname}/api/v1/models/anthropic" @@ -134,5 +134,5 @@ def get_http_client(*, preview: bool = False, config: Optional[Config] = None) - "get_http_client() is in beta. " "Please set the preview parameter to True to use it." ) - hostname = get_api_gateway_base_url(preview=True) + hostname = _get_api_gateway_base_url(preview=True) return HttpClient(hostname=hostname, config=config) diff --git a/tests/functions/test_utils.py b/tests/functions/test_utils.py index 78d85904f..f4b8dbb1e 100644 --- a/tests/functions/test_utils.py +++ b/tests/functions/test_utils.py @@ -20,19 +20,19 @@ from foundry_sdk._core.http_client import HttpClient from foundry_sdk.v2.functions import ( get_anthropic_base_url, - get_api_gateway_base_url, get_foundry_token, get_http_client, get_openai_base_url, ) +from foundry_sdk.v2.functions.utils import __get_api_gateway_base_url class TestPreviewParameter: """Test that all functions require preview=True.""" - def test_get_api_gateway_base_url_requires_preview(self): + def test__get_api_gateway_base_url_requires_preview(self): with pytest.raises(ValueError, match="preview parameter"): - get_api_gateway_base_url() + _get_api_gateway_base_url() def test_get_foundry_token_requires_preview(self): with pytest.raises(ValueError, match="preview parameter"): @@ -52,19 +52,19 @@ def test_get_http_client_requires_preview(self): class TestGetApiGatewayBaseUrl: - """Test get_api_gateway_base_url function.""" + """Test _get_api_gateway_base_url function.""" def test_returns_hostname_from_context(self): token = HOSTNAME_VAR.set("test.palantirfoundry.com") try: - result = get_api_gateway_base_url(preview=True) + result = _get_api_gateway_base_url(preview=True) assert result == "test.palantirfoundry.com" finally: HOSTNAME_VAR.reset(token) def test_raises_runtime_error_when_not_in_context(self): with pytest.raises(RuntimeError, match="not available"): - get_api_gateway_base_url(preview=True) + _get_api_gateway_base_url(preview=True) class TestGetFoundryToken: From 6095a3d9900a6b869478674d9f3101573f4c6119 Mon Sep 17 00:00:00 2001 From: overtonch Date: Mon, 9 Feb 2026 13:18:24 -0500 Subject: [PATCH 04/16] nits --- foundry_sdk/v2/functions/utils.py | 1 + tests/functions/test_utils.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/foundry_sdk/v2/functions/utils.py b/foundry_sdk/v2/functions/utils.py index 7c7715446..5a6111ac0 100644 --- a/foundry_sdk/v2/functions/utils.py +++ b/foundry_sdk/v2/functions/utils.py @@ -136,3 +136,4 @@ def get_http_client(*, preview: bool = False, config: Optional[Config] = None) - ) hostname = _get_api_gateway_base_url(preview=True) return HttpClient(hostname=hostname, config=config) + diff --git a/tests/functions/test_utils.py b/tests/functions/test_utils.py index f4b8dbb1e..595d36e7a 100644 --- a/tests/functions/test_utils.py +++ b/tests/functions/test_utils.py @@ -24,7 +24,7 @@ get_http_client, get_openai_base_url, ) -from foundry_sdk.v2.functions.utils import __get_api_gateway_base_url +from foundry_sdk.v2.functions.utils import _get_api_gateway_base_url class TestPreviewParameter: From e85ab31e91f94626936bb83166b362b99b7fe997 Mon Sep 17 00:00:00 2001 From: overtonch Date: Mon, 9 Feb 2026 13:25:23 -0500 Subject: [PATCH 05/16] fixed --- foundry_sdk/v2/functions/utils.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/foundry_sdk/v2/functions/utils.py b/foundry_sdk/v2/functions/utils.py index 5a6111ac0..754ab412d 100644 --- a/foundry_sdk/v2/functions/utils.py +++ b/foundry_sdk/v2/functions/utils.py @@ -41,9 +41,7 @@ def _get_api_gateway_base_url(*, preview: bool = False) -> str: ) hostname = HOSTNAME_VAR.get() if hostname is None: - raise RuntimeError( - "Foundry API gateway base URL is not available in the current context." - ) + raise RuntimeError("Foundry API gateway base URL is not available in the current context.") return hostname @@ -62,8 +60,7 @@ def get_foundry_token(*, preview: bool = False) -> str: """ if not preview: raise ValueError( - "get_foundry_token() is in beta. " - "Please set the preview parameter to True to use it." + "get_foundry_token() is in beta. " "Please set the preview parameter to True to use it." ) token = TOKEN_VAR.get() if token is None: @@ -131,9 +128,7 @@ def get_http_client(*, preview: bool = False, config: Optional[Config] = None) - """ if not preview: raise ValueError( - "get_http_client() is in beta. " - "Please set the preview parameter to True to use it." + "get_http_client() is in beta. " "Please set the preview parameter to True to use it." ) hostname = _get_api_gateway_base_url(preview=True) return HttpClient(hostname=hostname, config=config) - From 9064ade73ef2fe6ea22aef540c2551292288bd6d Mon Sep 17 00:00:00 2001 From: overtonch Date: Tue, 10 Feb 2026 11:24:08 -0500 Subject: [PATCH 06/16] updates --- config.json | 13 +- foundry_sdk/v2/functions/__init__.py | 8 -- foundry_sdk/v2/functions/language_models.py | 0 foundry_sdk/v2/functions/utils.py | 134 -------------------- 4 files changed, 12 insertions(+), 143 deletions(-) delete mode 100644 foundry_sdk/v2/functions/language_models.py delete mode 100644 foundry_sdk/v2/functions/utils.py diff --git a/config.json b/config.json index 7feda2d1f..6f21cdc1b 100644 --- a/config.json +++ b/config.json @@ -8,6 +8,9 @@ "description": "The official Python library for the Foundry API", "autoreleaseUrl": "https://autorelease.general.dmz.palantir.tech/palantir/foundry-platform-python", "promotedMajorVersion": "v2", + "additionalFiles": [ + ["assets/function-utils.py", "foundry_sdk/v2/functions/utils.py"] + ], "documentationBaseUrl": "https://palantir.com", "extraDocsDir": "assets/docs_examples", "exampleOperation": { @@ -170,7 +173,15 @@ "DataHealth": true, "Datasets": true, "Filesystem": true, - "Functions": true, + "Functions": { + "exclude": [], + "additionalExports": [ + "from foundry_sdk.v2.functions.utils import get_foundry_token", + "from foundry_sdk.v2.functions.utils import get_openai_base_url", + "from foundry_sdk.v2.functions.utils import get_anthropic_base_url", + "from foundry_sdk.v2.functions.utils import get_http_client" + ] + }, "Gaia": false, "Geo": true, "LanguageModels": true, diff --git a/foundry_sdk/v2/functions/__init__.py b/foundry_sdk/v2/functions/__init__.py index 0a6869402..50e3b4928 100644 --- a/foundry_sdk/v2/functions/__init__.py +++ b/foundry_sdk/v2/functions/__init__.py @@ -15,16 +15,8 @@ from foundry_sdk.v2.functions._client import AsyncFunctionsClient from foundry_sdk.v2.functions._client import FunctionsClient -from foundry_sdk.v2.functions.utils import get_anthropic_base_url -from foundry_sdk.v2.functions.utils import get_foundry_token -from foundry_sdk.v2.functions.utils import get_http_client -from foundry_sdk.v2.functions.utils import get_openai_base_url __all__ = [ "FunctionsClient", "AsyncFunctionsClient", - "get_anthropic_base_url", - "get_foundry_token", - "get_http_client", - "get_openai_base_url", ] diff --git a/foundry_sdk/v2/functions/language_models.py b/foundry_sdk/v2/functions/language_models.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/foundry_sdk/v2/functions/utils.py b/foundry_sdk/v2/functions/utils.py deleted file mode 100644 index 754ab412d..000000000 --- a/foundry_sdk/v2/functions/utils.py +++ /dev/null @@ -1,134 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -from typing import Optional - -from foundry_sdk._core.config import Config -from foundry_sdk._core.context_and_environment_vars import HOSTNAME_VAR -from foundry_sdk._core.context_and_environment_vars import TOKEN_VAR -from foundry_sdk._core.http_client import HttpClient - - -def _get_api_gateway_base_url(*, preview: bool = False) -> str: - """Get the Foundry hostname from the current execution context. - - Args: - preview: Must be set to True to use this beta feature. - - Returns: - The Foundry API gateway base URL. - - Raises: - ValueError: If preview is not set to True. - RuntimeError: If the Foundry API gateway base URL is not available in the current context. - """ - if not preview: - raise ValueError( - "get_api_gateway_base_url() is in beta. " - "Please set the preview parameter to True to use it." - ) - hostname = HOSTNAME_VAR.get() - if hostname is None: - raise RuntimeError("Foundry API gateway base URL is not available in the current context.") - return hostname - - -def get_foundry_token(*, preview: bool = False) -> str: - """Get the Foundry token from the current execution context. - - Args: - preview: Must be set to True to use this beta feature. - - Returns: - The Foundry token. - - Raises: - ValueError: If preview is not set to True. - RuntimeError: If the Foundry token is not available in the current context. - """ - if not preview: - raise ValueError( - "get_foundry_token() is in beta. " "Please set the preview parameter to True to use it." - ) - token = TOKEN_VAR.get() - if token is None: - raise RuntimeError("Foundry token is not available in the current context.") - return token - - -def get_openai_base_url(*, preview: bool = False) -> str: - """Get the OpenAI proxy base URL for the current Foundry environment. - - Args: - preview: Must be set to True to use this beta feature. - - Returns: - The OpenAI proxy base URL. - - Raises: - ValueError: If preview is not set to True. - RuntimeError: If the Foundry API gateway base URL is not available in the current context. - """ - if not preview: - raise ValueError( - "get_openai_base_url() is in beta. " - "Please set the preview parameter to True to use it." - ) - hostname = _get_api_gateway_base_url(preview=True) - return f"https://{hostname}/api/v1/models/openai" - - -def get_anthropic_base_url(*, preview: bool = False) -> str: - """Get the Anthropic proxy base URL for the current Foundry environment. - - Args: - preview: Must be set to True to use this beta feature. - - Returns: - The Anthropic proxy base URL. - - Raises: - ValueError: If preview is not set to True. - RuntimeError: If the Foundry API gateway base URL is not available in the current context. - """ - if not preview: - raise ValueError( - "get_anthropic_base_url() is in beta. " - "Please set the preview parameter to True to use it." - ) - hostname = _get_api_gateway_base_url(preview=True) - return f"https://{hostname}/api/v1/models/anthropic" - - -def get_http_client(*, preview: bool = False, config: Optional[Config] = None) -> HttpClient: - """Get an HTTP client configured for the current Foundry environment. - - Args: - preview: Must be set to True to use this beta feature. - config: Optional configuration for the HTTP client. - - Returns: - An HttpClient instance configured with the Foundry hostname. - - Raises: - ValueError: If preview is not set to True. - RuntimeError: If the Foundry API gateway base URL is not available in the current context. - """ - if not preview: - raise ValueError( - "get_http_client() is in beta. " "Please set the preview parameter to True to use it." - ) - hostname = _get_api_gateway_base_url(preview=True) - return HttpClient(hostname=hostname, config=config) From 63ad7eb82307f6475901b7bbfef1599e1b38afb6 Mon Sep 17 00:00:00 2001 From: overtonch Date: Tue, 10 Feb 2026 11:31:04 -0500 Subject: [PATCH 07/16] add utils --- assets/function-utils.py | 134 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 134 insertions(+) create mode 100644 assets/function-utils.py diff --git a/assets/function-utils.py b/assets/function-utils.py new file mode 100644 index 000000000..754ab412d --- /dev/null +++ b/assets/function-utils.py @@ -0,0 +1,134 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +from typing import Optional + +from foundry_sdk._core.config import Config +from foundry_sdk._core.context_and_environment_vars import HOSTNAME_VAR +from foundry_sdk._core.context_and_environment_vars import TOKEN_VAR +from foundry_sdk._core.http_client import HttpClient + + +def _get_api_gateway_base_url(*, preview: bool = False) -> str: + """Get the Foundry hostname from the current execution context. + + Args: + preview: Must be set to True to use this beta feature. + + Returns: + The Foundry API gateway base URL. + + Raises: + ValueError: If preview is not set to True. + RuntimeError: If the Foundry API gateway base URL is not available in the current context. + """ + if not preview: + raise ValueError( + "get_api_gateway_base_url() is in beta. " + "Please set the preview parameter to True to use it." + ) + hostname = HOSTNAME_VAR.get() + if hostname is None: + raise RuntimeError("Foundry API gateway base URL is not available in the current context.") + return hostname + + +def get_foundry_token(*, preview: bool = False) -> str: + """Get the Foundry token from the current execution context. + + Args: + preview: Must be set to True to use this beta feature. + + Returns: + The Foundry token. + + Raises: + ValueError: If preview is not set to True. + RuntimeError: If the Foundry token is not available in the current context. + """ + if not preview: + raise ValueError( + "get_foundry_token() is in beta. " "Please set the preview parameter to True to use it." + ) + token = TOKEN_VAR.get() + if token is None: + raise RuntimeError("Foundry token is not available in the current context.") + return token + + +def get_openai_base_url(*, preview: bool = False) -> str: + """Get the OpenAI proxy base URL for the current Foundry environment. + + Args: + preview: Must be set to True to use this beta feature. + + Returns: + The OpenAI proxy base URL. + + Raises: + ValueError: If preview is not set to True. + RuntimeError: If the Foundry API gateway base URL is not available in the current context. + """ + if not preview: + raise ValueError( + "get_openai_base_url() is in beta. " + "Please set the preview parameter to True to use it." + ) + hostname = _get_api_gateway_base_url(preview=True) + return f"https://{hostname}/api/v1/models/openai" + + +def get_anthropic_base_url(*, preview: bool = False) -> str: + """Get the Anthropic proxy base URL for the current Foundry environment. + + Args: + preview: Must be set to True to use this beta feature. + + Returns: + The Anthropic proxy base URL. + + Raises: + ValueError: If preview is not set to True. + RuntimeError: If the Foundry API gateway base URL is not available in the current context. + """ + if not preview: + raise ValueError( + "get_anthropic_base_url() is in beta. " + "Please set the preview parameter to True to use it." + ) + hostname = _get_api_gateway_base_url(preview=True) + return f"https://{hostname}/api/v1/models/anthropic" + + +def get_http_client(*, preview: bool = False, config: Optional[Config] = None) -> HttpClient: + """Get an HTTP client configured for the current Foundry environment. + + Args: + preview: Must be set to True to use this beta feature. + config: Optional configuration for the HTTP client. + + Returns: + An HttpClient instance configured with the Foundry hostname. + + Raises: + ValueError: If preview is not set to True. + RuntimeError: If the Foundry API gateway base URL is not available in the current context. + """ + if not preview: + raise ValueError( + "get_http_client() is in beta. " "Please set the preview parameter to True to use it." + ) + hostname = _get_api_gateway_base_url(preview=True) + return HttpClient(hostname=hostname, config=config) From 3285f017e118b8f183488f20789ff99ab00f6ffc Mon Sep 17 00:00:00 2001 From: overtonch Date: Tue, 10 Feb 2026 11:31:34 -0500 Subject: [PATCH 08/16] nit --- assets/function-utils.py | 134 --------------------------------------- config.json | 2 +- 2 files changed, 1 insertion(+), 135 deletions(-) delete mode 100644 assets/function-utils.py diff --git a/assets/function-utils.py b/assets/function-utils.py deleted file mode 100644 index 754ab412d..000000000 --- a/assets/function-utils.py +++ /dev/null @@ -1,134 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -from typing import Optional - -from foundry_sdk._core.config import Config -from foundry_sdk._core.context_and_environment_vars import HOSTNAME_VAR -from foundry_sdk._core.context_and_environment_vars import TOKEN_VAR -from foundry_sdk._core.http_client import HttpClient - - -def _get_api_gateway_base_url(*, preview: bool = False) -> str: - """Get the Foundry hostname from the current execution context. - - Args: - preview: Must be set to True to use this beta feature. - - Returns: - The Foundry API gateway base URL. - - Raises: - ValueError: If preview is not set to True. - RuntimeError: If the Foundry API gateway base URL is not available in the current context. - """ - if not preview: - raise ValueError( - "get_api_gateway_base_url() is in beta. " - "Please set the preview parameter to True to use it." - ) - hostname = HOSTNAME_VAR.get() - if hostname is None: - raise RuntimeError("Foundry API gateway base URL is not available in the current context.") - return hostname - - -def get_foundry_token(*, preview: bool = False) -> str: - """Get the Foundry token from the current execution context. - - Args: - preview: Must be set to True to use this beta feature. - - Returns: - The Foundry token. - - Raises: - ValueError: If preview is not set to True. - RuntimeError: If the Foundry token is not available in the current context. - """ - if not preview: - raise ValueError( - "get_foundry_token() is in beta. " "Please set the preview parameter to True to use it." - ) - token = TOKEN_VAR.get() - if token is None: - raise RuntimeError("Foundry token is not available in the current context.") - return token - - -def get_openai_base_url(*, preview: bool = False) -> str: - """Get the OpenAI proxy base URL for the current Foundry environment. - - Args: - preview: Must be set to True to use this beta feature. - - Returns: - The OpenAI proxy base URL. - - Raises: - ValueError: If preview is not set to True. - RuntimeError: If the Foundry API gateway base URL is not available in the current context. - """ - if not preview: - raise ValueError( - "get_openai_base_url() is in beta. " - "Please set the preview parameter to True to use it." - ) - hostname = _get_api_gateway_base_url(preview=True) - return f"https://{hostname}/api/v1/models/openai" - - -def get_anthropic_base_url(*, preview: bool = False) -> str: - """Get the Anthropic proxy base URL for the current Foundry environment. - - Args: - preview: Must be set to True to use this beta feature. - - Returns: - The Anthropic proxy base URL. - - Raises: - ValueError: If preview is not set to True. - RuntimeError: If the Foundry API gateway base URL is not available in the current context. - """ - if not preview: - raise ValueError( - "get_anthropic_base_url() is in beta. " - "Please set the preview parameter to True to use it." - ) - hostname = _get_api_gateway_base_url(preview=True) - return f"https://{hostname}/api/v1/models/anthropic" - - -def get_http_client(*, preview: bool = False, config: Optional[Config] = None) -> HttpClient: - """Get an HTTP client configured for the current Foundry environment. - - Args: - preview: Must be set to True to use this beta feature. - config: Optional configuration for the HTTP client. - - Returns: - An HttpClient instance configured with the Foundry hostname. - - Raises: - ValueError: If preview is not set to True. - RuntimeError: If the Foundry API gateway base URL is not available in the current context. - """ - if not preview: - raise ValueError( - "get_http_client() is in beta. " "Please set the preview parameter to True to use it." - ) - hostname = _get_api_gateway_base_url(preview=True) - return HttpClient(hostname=hostname, config=config) diff --git a/config.json b/config.json index 6f21cdc1b..ab8eab2d1 100644 --- a/config.json +++ b/config.json @@ -9,7 +9,7 @@ "autoreleaseUrl": "https://autorelease.general.dmz.palantir.tech/palantir/foundry-platform-python", "promotedMajorVersion": "v2", "additionalFiles": [ - ["assets/function-utils.py", "foundry_sdk/v2/functions/utils.py"] + ["assets/function_utils.py", "foundry_sdk/v2/functions/utils.py"] ], "documentationBaseUrl": "https://palantir.com", "extraDocsDir": "assets/docs_examples", From ad50e0b6a82fcd39392a8e505c02cc8f3ab48b00 Mon Sep 17 00:00:00 2001 From: overtonch Date: Tue, 10 Feb 2026 11:32:06 -0500 Subject: [PATCH 09/16] add file --- assets/function_utils.py | 134 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 134 insertions(+) create mode 100644 assets/function_utils.py diff --git a/assets/function_utils.py b/assets/function_utils.py new file mode 100644 index 000000000..754ab412d --- /dev/null +++ b/assets/function_utils.py @@ -0,0 +1,134 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +from typing import Optional + +from foundry_sdk._core.config import Config +from foundry_sdk._core.context_and_environment_vars import HOSTNAME_VAR +from foundry_sdk._core.context_and_environment_vars import TOKEN_VAR +from foundry_sdk._core.http_client import HttpClient + + +def _get_api_gateway_base_url(*, preview: bool = False) -> str: + """Get the Foundry hostname from the current execution context. + + Args: + preview: Must be set to True to use this beta feature. + + Returns: + The Foundry API gateway base URL. + + Raises: + ValueError: If preview is not set to True. + RuntimeError: If the Foundry API gateway base URL is not available in the current context. + """ + if not preview: + raise ValueError( + "get_api_gateway_base_url() is in beta. " + "Please set the preview parameter to True to use it." + ) + hostname = HOSTNAME_VAR.get() + if hostname is None: + raise RuntimeError("Foundry API gateway base URL is not available in the current context.") + return hostname + + +def get_foundry_token(*, preview: bool = False) -> str: + """Get the Foundry token from the current execution context. + + Args: + preview: Must be set to True to use this beta feature. + + Returns: + The Foundry token. + + Raises: + ValueError: If preview is not set to True. + RuntimeError: If the Foundry token is not available in the current context. + """ + if not preview: + raise ValueError( + "get_foundry_token() is in beta. " "Please set the preview parameter to True to use it." + ) + token = TOKEN_VAR.get() + if token is None: + raise RuntimeError("Foundry token is not available in the current context.") + return token + + +def get_openai_base_url(*, preview: bool = False) -> str: + """Get the OpenAI proxy base URL for the current Foundry environment. + + Args: + preview: Must be set to True to use this beta feature. + + Returns: + The OpenAI proxy base URL. + + Raises: + ValueError: If preview is not set to True. + RuntimeError: If the Foundry API gateway base URL is not available in the current context. + """ + if not preview: + raise ValueError( + "get_openai_base_url() is in beta. " + "Please set the preview parameter to True to use it." + ) + hostname = _get_api_gateway_base_url(preview=True) + return f"https://{hostname}/api/v1/models/openai" + + +def get_anthropic_base_url(*, preview: bool = False) -> str: + """Get the Anthropic proxy base URL for the current Foundry environment. + + Args: + preview: Must be set to True to use this beta feature. + + Returns: + The Anthropic proxy base URL. + + Raises: + ValueError: If preview is not set to True. + RuntimeError: If the Foundry API gateway base URL is not available in the current context. + """ + if not preview: + raise ValueError( + "get_anthropic_base_url() is in beta. " + "Please set the preview parameter to True to use it." + ) + hostname = _get_api_gateway_base_url(preview=True) + return f"https://{hostname}/api/v1/models/anthropic" + + +def get_http_client(*, preview: bool = False, config: Optional[Config] = None) -> HttpClient: + """Get an HTTP client configured for the current Foundry environment. + + Args: + preview: Must be set to True to use this beta feature. + config: Optional configuration for the HTTP client. + + Returns: + An HttpClient instance configured with the Foundry hostname. + + Raises: + ValueError: If preview is not set to True. + RuntimeError: If the Foundry API gateway base URL is not available in the current context. + """ + if not preview: + raise ValueError( + "get_http_client() is in beta. " "Please set the preview parameter to True to use it." + ) + hostname = _get_api_gateway_base_url(preview=True) + return HttpClient(hostname=hostname, config=config) From 3b641111c7e0facbe9f3e4c39d91a7f87e4580fa Mon Sep 17 00:00:00 2001 From: overtonch Date: Tue, 10 Feb 2026 15:32:01 -0500 Subject: [PATCH 10/16] nits --- config.json | 3 +- tests/functions/test_utils.py | 131 ---------------------------------- 2 files changed, 2 insertions(+), 132 deletions(-) delete mode 100644 tests/functions/test_utils.py diff --git a/config.json b/config.json index ab8eab2d1..581b83680 100644 --- a/config.json +++ b/config.json @@ -9,7 +9,8 @@ "autoreleaseUrl": "https://autorelease.general.dmz.palantir.tech/palantir/foundry-platform-python", "promotedMajorVersion": "v2", "additionalFiles": [ - ["assets/function_utils.py", "foundry_sdk/v2/functions/utils.py"] + ["assets/function-utils.py", "foundry_sdk/v2/functions/utils.py"], + ["assets/test-function-utils.py", "tests/functions/test_utils.py"] ], "documentationBaseUrl": "https://palantir.com", "extraDocsDir": "assets/docs_examples", diff --git a/tests/functions/test_utils.py b/tests/functions/test_utils.py deleted file mode 100644 index 595d36e7a..000000000 --- a/tests/functions/test_utils.py +++ /dev/null @@ -1,131 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import pytest - -from foundry_sdk._core.context_and_environment_vars import HOSTNAME_VAR -from foundry_sdk._core.context_and_environment_vars import TOKEN_VAR -from foundry_sdk._core.http_client import HttpClient -from foundry_sdk.v2.functions import ( - get_anthropic_base_url, - get_foundry_token, - get_http_client, - get_openai_base_url, -) -from foundry_sdk.v2.functions.utils import _get_api_gateway_base_url - - -class TestPreviewParameter: - """Test that all functions require preview=True.""" - - def test__get_api_gateway_base_url_requires_preview(self): - with pytest.raises(ValueError, match="preview parameter"): - _get_api_gateway_base_url() - - def test_get_foundry_token_requires_preview(self): - with pytest.raises(ValueError, match="preview parameter"): - get_foundry_token() - - def test_get_openai_base_url_requires_preview(self): - with pytest.raises(ValueError, match="preview parameter"): - get_openai_base_url() - - def test_get_anthropic_base_url_requires_preview(self): - with pytest.raises(ValueError, match="preview parameter"): - get_anthropic_base_url() - - def test_get_http_client_requires_preview(self): - with pytest.raises(ValueError, match="preview parameter"): - get_http_client() - - -class TestGetApiGatewayBaseUrl: - """Test _get_api_gateway_base_url function.""" - - def test_returns_hostname_from_context(self): - token = HOSTNAME_VAR.set("test.palantirfoundry.com") - try: - result = _get_api_gateway_base_url(preview=True) - assert result == "test.palantirfoundry.com" - finally: - HOSTNAME_VAR.reset(token) - - def test_raises_runtime_error_when_not_in_context(self): - with pytest.raises(RuntimeError, match="not available"): - _get_api_gateway_base_url(preview=True) - - -class TestGetFoundryToken: - """Test get_foundry_token function.""" - - def test_returns_token_from_context(self): - token = TOKEN_VAR.set("test-token-12345") - try: - result = get_foundry_token(preview=True) - assert result == "test-token-12345" - finally: - TOKEN_VAR.reset(token) - - def test_raises_runtime_error_when_not_in_context(self): - with pytest.raises(RuntimeError, match="not available"): - get_foundry_token(preview=True) - - -class TestGetOpenaiBaseUrl: - """Test get_openai_base_url function.""" - - def test_returns_correct_url(self): - token = HOSTNAME_VAR.set("test.palantirfoundry.com") - try: - result = get_openai_base_url(preview=True) - assert result == "https://test.palantirfoundry.com/api/v1/models/openai" - finally: - HOSTNAME_VAR.reset(token) - - def test_raises_runtime_error_when_not_in_context(self): - with pytest.raises(RuntimeError, match="not available"): - get_openai_base_url(preview=True) - - -class TestGetAnthropicBaseUrl: - """Test get_anthropic_base_url function.""" - - def test_returns_correct_url(self): - token = HOSTNAME_VAR.set("test.palantirfoundry.com") - try: - result = get_anthropic_base_url(preview=True) - assert result == "https://test.palantirfoundry.com/api/v1/models/anthropic" - finally: - HOSTNAME_VAR.reset(token) - - def test_raises_runtime_error_when_not_in_context(self): - with pytest.raises(RuntimeError, match="not available"): - get_anthropic_base_url(preview=True) - - -class TestGetHttpClient: - """Test get_http_client function.""" - - def test_returns_http_client(self): - token = HOSTNAME_VAR.set("test.palantirfoundry.com") - try: - result = get_http_client(preview=True) - assert isinstance(result, HttpClient) - finally: - HOSTNAME_VAR.reset(token) - - def test_raises_runtime_error_when_not_in_context(self): - with pytest.raises(RuntimeError, match="not available"): - get_http_client(preview=True) From 0ecfb291a708f9dac84cbf58e56b3bb62d48753f Mon Sep 17 00:00:00 2001 From: overtonch Date: Tue, 10 Feb 2026 15:32:10 -0500 Subject: [PATCH 11/16] move --- assets/test-function-utils.py | 131 ++++++++++++++++++++++++++++++++++ 1 file changed, 131 insertions(+) create mode 100644 assets/test-function-utils.py diff --git a/assets/test-function-utils.py b/assets/test-function-utils.py new file mode 100644 index 000000000..595d36e7a --- /dev/null +++ b/assets/test-function-utils.py @@ -0,0 +1,131 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import pytest + +from foundry_sdk._core.context_and_environment_vars import HOSTNAME_VAR +from foundry_sdk._core.context_and_environment_vars import TOKEN_VAR +from foundry_sdk._core.http_client import HttpClient +from foundry_sdk.v2.functions import ( + get_anthropic_base_url, + get_foundry_token, + get_http_client, + get_openai_base_url, +) +from foundry_sdk.v2.functions.utils import _get_api_gateway_base_url + + +class TestPreviewParameter: + """Test that all functions require preview=True.""" + + def test__get_api_gateway_base_url_requires_preview(self): + with pytest.raises(ValueError, match="preview parameter"): + _get_api_gateway_base_url() + + def test_get_foundry_token_requires_preview(self): + with pytest.raises(ValueError, match="preview parameter"): + get_foundry_token() + + def test_get_openai_base_url_requires_preview(self): + with pytest.raises(ValueError, match="preview parameter"): + get_openai_base_url() + + def test_get_anthropic_base_url_requires_preview(self): + with pytest.raises(ValueError, match="preview parameter"): + get_anthropic_base_url() + + def test_get_http_client_requires_preview(self): + with pytest.raises(ValueError, match="preview parameter"): + get_http_client() + + +class TestGetApiGatewayBaseUrl: + """Test _get_api_gateway_base_url function.""" + + def test_returns_hostname_from_context(self): + token = HOSTNAME_VAR.set("test.palantirfoundry.com") + try: + result = _get_api_gateway_base_url(preview=True) + assert result == "test.palantirfoundry.com" + finally: + HOSTNAME_VAR.reset(token) + + def test_raises_runtime_error_when_not_in_context(self): + with pytest.raises(RuntimeError, match="not available"): + _get_api_gateway_base_url(preview=True) + + +class TestGetFoundryToken: + """Test get_foundry_token function.""" + + def test_returns_token_from_context(self): + token = TOKEN_VAR.set("test-token-12345") + try: + result = get_foundry_token(preview=True) + assert result == "test-token-12345" + finally: + TOKEN_VAR.reset(token) + + def test_raises_runtime_error_when_not_in_context(self): + with pytest.raises(RuntimeError, match="not available"): + get_foundry_token(preview=True) + + +class TestGetOpenaiBaseUrl: + """Test get_openai_base_url function.""" + + def test_returns_correct_url(self): + token = HOSTNAME_VAR.set("test.palantirfoundry.com") + try: + result = get_openai_base_url(preview=True) + assert result == "https://test.palantirfoundry.com/api/v1/models/openai" + finally: + HOSTNAME_VAR.reset(token) + + def test_raises_runtime_error_when_not_in_context(self): + with pytest.raises(RuntimeError, match="not available"): + get_openai_base_url(preview=True) + + +class TestGetAnthropicBaseUrl: + """Test get_anthropic_base_url function.""" + + def test_returns_correct_url(self): + token = HOSTNAME_VAR.set("test.palantirfoundry.com") + try: + result = get_anthropic_base_url(preview=True) + assert result == "https://test.palantirfoundry.com/api/v1/models/anthropic" + finally: + HOSTNAME_VAR.reset(token) + + def test_raises_runtime_error_when_not_in_context(self): + with pytest.raises(RuntimeError, match="not available"): + get_anthropic_base_url(preview=True) + + +class TestGetHttpClient: + """Test get_http_client function.""" + + def test_returns_http_client(self): + token = HOSTNAME_VAR.set("test.palantirfoundry.com") + try: + result = get_http_client(preview=True) + assert isinstance(result, HttpClient) + finally: + HOSTNAME_VAR.reset(token) + + def test_raises_runtime_error_when_not_in_context(self): + with pytest.raises(RuntimeError, match="not available"): + get_http_client(preview=True) From ed7419c7a72202df6bdd8a446a8d50f4a23a63db Mon Sep 17 00:00:00 2001 From: overtonch Date: Tue, 10 Feb 2026 16:19:48 -0500 Subject: [PATCH 12/16] move to language models --- .bulldozer.yml | 17 - .changelog.yml | 3 - .circleci/config.yml | 189 - .gitignore | 5 - LICENSE | 202 - README.md | 3396 ----- assets/function_utils.py | 134 - assets/test-function-utils.py | 131 - config.json | 20 +- docs-snippets-npm/.gitignore | 20 - docs-snippets-npm/package.json | 33 - docs-snippets-npm/src/index.ts | 1739 --- docs-snippets-npm/tsconfig.json | 16 - docs/v1/Core/models/AnyType.md | 11 - docs/v1/Core/models/AttachmentType.md | 11 - docs/v1/Core/models/Attribution.md | 11 - docs/v1/Core/models/BinaryType.md | 11 - docs/v1/Core/models/BooleanType.md | 11 - docs/v1/Core/models/ByteType.md | 11 - docs/v1/Core/models/CipherTextType.md | 12 - docs/v1/Core/models/ContentLength.md | 11 - docs/v1/Core/models/ContentType.md | 11 - docs/v1/Core/models/DateType.md | 11 - docs/v1/Core/models/DecimalType.md | 13 - docs/v1/Core/models/DisplayName.md | 11 - docs/v1/Core/models/DistanceUnit.md | 18 - docs/v1/Core/models/DoubleType.md | 11 - docs/v1/Core/models/FilePath.md | 12 - docs/v1/Core/models/Filename.md | 12 - docs/v1/Core/models/FloatType.md | 11 - docs/v1/Core/models/FolderRid.md | 11 - docs/v1/Core/models/FoundryBranch.md | 11 - docs/v1/Core/models/IntegerType.md | 11 - docs/v1/Core/models/LongType.md | 11 - docs/v1/Core/models/MarkingType.md | 11 - docs/v1/Core/models/MediaType.md | 13 - docs/v1/Core/models/NullType.md | 11 - docs/v1/Core/models/OperationScope.md | 11 - docs/v1/Core/models/PageSize.md | 11 - docs/v1/Core/models/PageToken.md | 14 - docs/v1/Core/models/PreviewMode.md | 11 - docs/v1/Core/models/ReleaseStatus.md | 13 - docs/v1/Core/models/ShortType.md | 11 - docs/v1/Core/models/SizeBytes.md | 11 - docs/v1/Core/models/StringType.md | 11 - docs/v1/Core/models/StructFieldName.md | 12 - docs/v1/Core/models/TimestampType.md | 11 - docs/v1/Core/models/TotalCount.md | 12 - docs/v1/Core/models/TraceParent.md | 11 - docs/v1/Core/models/TraceState.md | 11 - docs/v1/Core/models/UnsupportedType.md | 12 - docs/v1/Datasets/Branch.md | 222 - docs/v1/Datasets/Dataset.md | 420 - docs/v1/Datasets/File.md | 460 - docs/v1/Datasets/Transaction.md | 242 - docs/v1/Datasets/models/Branch.md | 13 - docs/v1/Datasets/models/BranchId.md | 12 - .../v1/Datasets/models/CreateBranchRequest.md | 12 - .../Datasets/models/CreateDatasetRequest.md | 12 - .../models/CreateTransactionRequest.md | 11 - docs/v1/Datasets/models/Dataset.md | 13 - docs/v1/Datasets/models/DatasetName.md | 11 - docs/v1/Datasets/models/DatasetRid.md | 12 - docs/v1/Datasets/models/File.md | 14 - .../Datasets/models/ListBranchesResponse.md | 12 - docs/v1/Datasets/models/ListFilesResponse.md | 12 - docs/v1/Datasets/models/TableExportFormat.md | 12 - docs/v1/Datasets/models/Transaction.md | 16 - docs/v1/Datasets/models/TransactionRid.md | 12 - docs/v1/Datasets/models/TransactionStatus.md | 13 - docs/v1/Datasets/models/TransactionType.md | 14 - docs/v1/Ontologies/Action.md | 209 - docs/v1/Ontologies/ActionType.md | 116 - docs/v1/Ontologies/Attachment.md | 167 - docs/v1/Ontologies/ObjectType.md | 233 - docs/v1/Ontologies/Ontology.md | 99 - docs/v1/Ontologies/OntologyObject.md | 484 - docs/v1/Ontologies/Query.md | 76 - docs/v1/Ontologies/QueryType.md | 116 - docs/v1/Ontologies/models/ActionRid.md | 11 - docs/v1/Ontologies/models/ActionType.md | 17 - .../v1/Ontologies/models/ActionTypeApiName.md | 13 - docs/v1/Ontologies/models/ActionTypeRid.md | 12 - .../models/AggregateObjectsRequest.md | 13 - .../models/AggregateObjectsResponse.md | 13 - .../models/AggregateObjectsResponseItem.md | 12 - docs/v1/Ontologies/models/Aggregation.md | 20 - .../models/AggregationDurationGrouping.md | 15 - .../models/AggregationExactGrouping.md | 13 - .../models/AggregationFixedWidthGrouping.md | 13 - .../Ontologies/models/AggregationGroupBy.md | 18 - .../Ontologies/models/AggregationGroupKey.md | 11 - .../models/AggregationGroupValue.md | 11 - .../models/AggregationMetricName.md | 11 - .../models/AggregationMetricResult.md | 12 - docs/v1/Ontologies/models/AggregationRange.md | 14 - .../models/AggregationRangesGrouping.md | 13 - docs/v1/Ontologies/models/AllTermsQuery.md | 16 - docs/v1/Ontologies/models/AndQuery.md | 12 - docs/v1/Ontologies/models/AnyTermQuery.md | 16 - docs/v1/Ontologies/models/ApplyActionMode.md | 11 - .../Ontologies/models/ApplyActionRequest.md | 11 - .../models/ApplyActionRequestOptions.md | 12 - .../Ontologies/models/ApplyActionResponse.md | 10 - .../models/ApproximateDistinctAggregation.md | 13 - .../models/ArrayEntryEvaluatedConstraint.md | 11 - .../models/ArrayEvaluatedConstraint.md | 12 - .../Ontologies/models/ArraySizeConstraint.md | 16 - .../models/ArtifactRepositoryRid.md | 11 - docs/v1/Ontologies/models/Attachment.md | 14 - docs/v1/Ontologies/models/AttachmentRid.md | 11 - docs/v1/Ontologies/models/AvgAggregation.md | 13 - .../models/BatchApplyActionRequest.md | 11 - .../models/BatchApplyActionResponse.md | 10 - docs/v1/Ontologies/models/ContainsQuery.md | 13 - docs/v1/Ontologies/models/CountAggregation.md | 12 - .../models/CreateInterfaceObjectRule.md | 12 - docs/v1/Ontologies/models/CreateLinkRule.md | 15 - docs/v1/Ontologies/models/CreateObjectRule.md | 12 - docs/v1/Ontologies/models/DataValue.md | 39 - .../models/DeleteInterfaceObjectRule.md | 12 - docs/v1/Ontologies/models/DeleteLinkRule.md | 15 - docs/v1/Ontologies/models/DeleteObjectRule.md | 12 - .../models/DerivedPropertyApiName.md | 12 - docs/v1/Ontologies/models/Duration.md | 11 - docs/v1/Ontologies/models/EntrySetType.md | 13 - docs/v1/Ontologies/models/EqualsQuery.md | 13 - .../Ontologies/models/ExecuteQueryRequest.md | 11 - .../Ontologies/models/ExecuteQueryResponse.md | 11 - docs/v1/Ontologies/models/FieldNameV1.md | 11 - docs/v1/Ontologies/models/FilterValue.md | 13 - docs/v1/Ontologies/models/FunctionRid.md | 12 - docs/v1/Ontologies/models/FunctionVersion.md | 13 - docs/v1/Ontologies/models/Fuzzy.md | 11 - .../models/GroupMemberConstraint.md | 12 - docs/v1/Ontologies/models/GtQuery.md | 13 - docs/v1/Ontologies/models/GteQuery.md | 13 - .../models/InterfaceLinkTypeApiName.md | 13 - .../Ontologies/models/InterfaceLinkTypeRid.md | 12 - .../models/InterfacePropertyApiName.md | 14 - .../Ontologies/models/InterfaceTypeApiName.md | 13 - docs/v1/Ontologies/models/InterfaceTypeRid.md | 11 - docs/v1/Ontologies/models/IsNullQuery.md | 13 - .../Ontologies/models/LegacyObjectTypeId.md | 13 - docs/v1/Ontologies/models/LegacyPropertyId.md | 13 - docs/v1/Ontologies/models/LinkTypeApiName.md | 13 - docs/v1/Ontologies/models/LinkTypeId.md | 12 - docs/v1/Ontologies/models/LinkTypeSide.md | 16 - .../models/LinkTypeSideCardinality.md | 11 - .../models/ListActionTypesResponse.md | 12 - .../models/ListLinkedObjectsResponse.md | 12 - .../models/ListObjectTypesResponse.md | 12 - .../Ontologies/models/ListObjectsResponse.md | 13 - .../models/ListOntologiesResponse.md | 11 - .../models/ListOutgoingLinkTypesResponse.md | 12 - .../models/ListQueryTypesResponse.md | 12 - docs/v1/Ontologies/models/LogicRule.md | 22 - docs/v1/Ontologies/models/LtQuery.md | 13 - docs/v1/Ontologies/models/LteQuery.md | 13 - docs/v1/Ontologies/models/MaxAggregation.md | 13 - docs/v1/Ontologies/models/MinAggregation.md | 13 - .../models/ModifyInterfaceObjectRule.md | 12 - docs/v1/Ontologies/models/ModifyObjectRule.md | 12 - docs/v1/Ontologies/models/NotQuery.md | 12 - .../models/ObjectPropertyValueConstraint.md | 12 - .../models/ObjectQueryResultConstraint.md | 12 - docs/v1/Ontologies/models/ObjectRid.md | 12 - docs/v1/Ontologies/models/ObjectSetRid.md | 11 - docs/v1/Ontologies/models/ObjectType.md | 19 - .../v1/Ontologies/models/ObjectTypeApiName.md | 13 - docs/v1/Ontologies/models/ObjectTypeRid.md | 11 - .../Ontologies/models/ObjectTypeVisibility.md | 12 - docs/v1/Ontologies/models/OneOfConstraint.md | 14 - docs/v1/Ontologies/models/Ontology.md | 14 - docs/v1/Ontologies/models/OntologyApiName.md | 11 - .../v1/Ontologies/models/OntologyArrayType.md | 12 - docs/v1/Ontologies/models/OntologyDataType.md | 37 - .../models/OntologyInterfaceObjectSetType.md | 12 - .../models/OntologyInterfaceObjectType.md | 12 - docs/v1/Ontologies/models/OntologyMapType.md | 13 - docs/v1/Ontologies/models/OntologyObject.md | 12 - .../models/OntologyObjectSetType.md | 13 - .../Ontologies/models/OntologyObjectType.md | 13 - docs/v1/Ontologies/models/OntologyRid.md | 13 - docs/v1/Ontologies/models/OntologySetType.md | 12 - .../Ontologies/models/OntologyStructField.md | 13 - .../Ontologies/models/OntologyStructType.md | 12 - docs/v1/Ontologies/models/OrQuery.md | 12 - docs/v1/Ontologies/models/OrderBy.md | 21 - docs/v1/Ontologies/models/Parameter.md | 14 - .../models/ParameterEvaluatedConstraint.md | 42 - .../models/ParameterEvaluationResult.md | 13 - docs/v1/Ontologies/models/ParameterId.md | 13 - docs/v1/Ontologies/models/ParameterOption.md | 13 - docs/v1/Ontologies/models/PhraseQuery.md | 13 - docs/v1/Ontologies/models/PrefixQuery.md | 13 - docs/v1/Ontologies/models/PrimaryKeyValue.md | 11 - docs/v1/Ontologies/models/Property.md | 14 - docs/v1/Ontologies/models/PropertyApiName.md | 13 - docs/v1/Ontologies/models/PropertyFilter.md | 36 - docs/v1/Ontologies/models/PropertyId.md | 13 - docs/v1/Ontologies/models/PropertyTypeRid.md | 11 - docs/v1/Ontologies/models/PropertyValue.md | 37 - .../models/PropertyValueEscapedString.md | 11 - .../models/QueryAggregationKeyType.md | 22 - .../models/QueryAggregationRangeSubType.md | 19 - .../models/QueryAggregationRangeType.md | 12 - .../models/QueryAggregationValueType.md | 18 - docs/v1/Ontologies/models/QueryApiName.md | 12 - docs/v1/Ontologies/models/QueryArrayType.md | 12 - docs/v1/Ontologies/models/QueryDataType.md | 37 - .../models/QueryRuntimeErrorParameter.md | 11 - docs/v1/Ontologies/models/QuerySetType.md | 12 - docs/v1/Ontologies/models/QueryStructField.md | 12 - docs/v1/Ontologies/models/QueryStructType.md | 12 - docs/v1/Ontologies/models/QueryType.md | 17 - docs/v1/Ontologies/models/QueryUnionType.md | 12 - docs/v1/Ontologies/models/RangeConstraint.md | 16 - docs/v1/Ontologies/models/ReturnEditsMode.md | 12 - docs/v1/Ontologies/models/SdkPackageName.md | 11 - docs/v1/Ontologies/models/SdkPackageRid.md | 11 - docs/v1/Ontologies/models/SdkVersion.md | 11 - docs/v1/Ontologies/models/SearchJsonQuery.md | 28 - .../Ontologies/models/SearchObjectsRequest.md | 15 - .../models/SearchObjectsResponse.md | 13 - docs/v1/Ontologies/models/SearchOrderBy.md | 11 - .../v1/Ontologies/models/SearchOrderByType.md | 11 - docs/v1/Ontologies/models/SearchOrdering.md | 12 - .../models/SelectedPropertyApiName.md | 30 - .../models/SharedPropertyTypeApiName.md | 13 - .../models/SharedPropertyTypeRid.md | 12 - .../models/StringLengthConstraint.md | 17 - .../models/StringRegexMatchConstraint.md | 14 - .../models/StructEvaluatedConstraint.md | 12 - .../models/StructFieldEvaluatedConstraint.md | 32 - .../models/StructFieldEvaluationResult.md | 13 - .../models/StructParameterFieldApiName.md | 12 - .../models/SubmissionCriteriaEvaluation.md | 15 - docs/v1/Ontologies/models/SumAggregation.md | 13 - .../models/ThreeDimensionalAggregation.md | 13 - .../models/TwoDimensionalAggregation.md | 13 - .../models/UnevaluableConstraint.md | 13 - .../models/UniqueIdentifierLinkId.md | 12 - .../models/ValidateActionRequest.md | 11 - .../models/ValidateActionResponse.md | 13 - docs/v1/Ontologies/models/ValidationResult.md | 12 - docs/v1/Ontologies/models/ValueType.md | 34 - docs/v1/Ontologies/models/ValueTypeApiName.md | 11 - docs/v1/Ontologies/models/ValueTypeRid.md | 11 - docs/v2/Admin/AuthenticationProvider.md | 278 - docs/v2/Admin/Enrollment.md | 105 - docs/v2/Admin/EnrollmentRoleAssignment.md | 183 - docs/v2/Admin/Group.md | 329 - docs/v2/Admin/GroupMember.md | 177 - docs/v2/Admin/GroupMembership.md | 70 - .../Admin/GroupMembershipExpirationPolicy.md | 115 - docs/v2/Admin/GroupProviderInfo.md | 112 - docs/v2/Admin/Host.md | 65 - docs/v2/Admin/Marking.md | 295 - docs/v2/Admin/MarkingCategory.md | 111 - docs/v2/Admin/MarkingMember.md | 169 - docs/v2/Admin/MarkingRoleAssignment.md | 167 - docs/v2/Admin/Organization.md | 240 - docs/v2/Admin/OrganizationRoleAssignment.md | 183 - docs/v2/Admin/Role.md | 109 - docs/v2/Admin/User.md | 462 - docs/v2/Admin/UserProviderInfo.md | 112 - .../AddEnrollmentRoleAssignmentsRequest.md | 11 - .../v2/Admin/models/AddGroupMembersRequest.md | 12 - .../Admin/models/AddMarkingMembersRequest.md | 11 - .../AddMarkingRoleAssignmentsRequest.md | 11 - .../AddOrganizationRoleAssignmentsRequest.md | 11 - docs/v2/Admin/models/AttributeName.md | 11 - docs/v2/Admin/models/AttributeValue.md | 11 - docs/v2/Admin/models/AttributeValues.md | 11 - .../v2/Admin/models/AuthenticationProtocol.md | 16 - .../v2/Admin/models/AuthenticationProvider.md | 17 - .../models/AuthenticationProviderEnabled.md | 11 - .../models/AuthenticationProviderName.md | 11 - .../Admin/models/AuthenticationProviderRid.md | 11 - docs/v2/Admin/models/CertificateInfo.md | 14 - docs/v2/Admin/models/CertificateUsageType.md | 12 - docs/v2/Admin/models/CreateGroupRequest.md | 14 - docs/v2/Admin/models/CreateMarkingRequest.md | 15 - .../Admin/models/CreateOrganizationRequest.md | 15 - docs/v2/Admin/models/Enrollment.md | 13 - docs/v2/Admin/models/EnrollmentName.md | 11 - .../Admin/models/EnrollmentRoleAssignment.md | 13 - .../models/GetGroupsBatchRequestElement.md | 11 - .../v2/Admin/models/GetGroupsBatchResponse.md | 11 - .../models/GetMarkingsBatchRequestElement.md | 11 - .../Admin/models/GetMarkingsBatchResponse.md | 11 - .../models/GetRolesBatchRequestElement.md | 11 - docs/v2/Admin/models/GetRolesBatchResponse.md | 11 - .../Admin/models/GetUserMarkingsResponse.md | 11 - .../models/GetUsersBatchRequestElement.md | 12 - docs/v2/Admin/models/GetUsersBatchResponse.md | 11 - docs/v2/Admin/models/Group.md | 16 - docs/v2/Admin/models/GroupMember.md | 12 - docs/v2/Admin/models/GroupMembership.md | 11 - .../Admin/models/GroupMembershipExpiration.md | 11 - .../models/GroupMembershipExpirationPolicy.md | 12 - docs/v2/Admin/models/GroupName.md | 11 - docs/v2/Admin/models/GroupProviderInfo.md | 11 - docs/v2/Admin/models/GroupSearchFilter.md | 12 - docs/v2/Admin/models/Host.md | 11 - docs/v2/Admin/models/HostName.md | 11 - .../ListAuthenticationProvidersResponse.md | 12 - .../ListAvailableOrganizationRolesResponse.md | 11 - .../ListEnrollmentRoleAssignmentsResponse.md | 12 - .../Admin/models/ListGroupMembersResponse.md | 12 - .../models/ListGroupMembershipsResponse.md | 12 - docs/v2/Admin/models/ListGroupsResponse.md | 12 - docs/v2/Admin/models/ListHostsResponse.md | 12 - .../models/ListMarkingCategoriesResponse.md | 12 - .../models/ListMarkingMembersResponse.md | 12 - .../ListMarkingRoleAssignmentsResponse.md | 12 - docs/v2/Admin/models/ListMarkingsResponse.md | 12 - ...ListOrganizationRoleAssignmentsResponse.md | 12 - docs/v2/Admin/models/ListUsersResponse.md | 12 - docs/v2/Admin/models/Marking.md | 17 - docs/v2/Admin/models/MarkingCategory.md | 18 - docs/v2/Admin/models/MarkingCategoryId.md | 13 - docs/v2/Admin/models/MarkingCategoryName.md | 11 - docs/v2/Admin/models/MarkingCategoryType.md | 11 - docs/v2/Admin/models/MarkingMember.md | 12 - docs/v2/Admin/models/MarkingName.md | 11 - docs/v2/Admin/models/MarkingRole.md | 16 - docs/v2/Admin/models/MarkingRoleAssignment.md | 13 - docs/v2/Admin/models/MarkingRoleUpdate.md | 12 - docs/v2/Admin/models/MarkingType.md | 11 - .../models/OidcAuthenticationProtocol.md | 11 - docs/v2/Admin/models/Organization.md | 15 - docs/v2/Admin/models/OrganizationName.md | 11 - .../models/OrganizationRoleAssignment.md | 13 - .../Admin/models/PreregisterGroupRequest.md | 12 - .../v2/Admin/models/PreregisterUserRequest.md | 16 - docs/v2/Admin/models/PrincipalFilterType.md | 10 - docs/v2/Admin/models/ProviderId.md | 12 - .../RemoveEnrollmentRoleAssignmentsRequest.md | 11 - .../Admin/models/RemoveGroupMembersRequest.md | 11 - .../models/RemoveMarkingMembersRequest.md | 11 - .../RemoveMarkingRoleAssignmentsRequest.md | 11 - ...emoveOrganizationRoleAssignmentsRequest.md | 11 - ...eGroupMembershipExpirationPolicyRequest.md | 12 - .../models/ReplaceGroupProviderInfoRequest.md | 11 - docs/v2/Admin/models/ReplaceMarkingRequest.md | 12 - .../models/ReplaceOrganizationRequest.md | 13 - .../models/ReplaceUserProviderInfoRequest.md | 11 - docs/v2/Admin/models/Role.md | 15 - docs/v2/Admin/models/RoleDescription.md | 11 - docs/v2/Admin/models/RoleDisplayName.md | 11 - .../models/SamlAuthenticationProtocol.md | 12 - .../models/SamlServiceProviderMetadata.md | 15 - docs/v2/Admin/models/SearchGroupsRequest.md | 13 - docs/v2/Admin/models/SearchGroupsResponse.md | 12 - docs/v2/Admin/models/SearchUsersRequest.md | 13 - docs/v2/Admin/models/SearchUsersResponse.md | 12 - docs/v2/Admin/models/User.md | 19 - docs/v2/Admin/models/UserProviderInfo.md | 11 - docs/v2/Admin/models/UserSearchFilter.md | 12 - docs/v2/Admin/models/UserUsername.md | 11 - docs/v2/AipAgents/Agent.md | 116 - docs/v2/AipAgents/AgentVersion.md | 121 - docs/v2/AipAgents/Content.md | 61 - docs/v2/AipAgents/Session.md | 614 - docs/v2/AipAgents/SessionTrace.md | 67 - docs/v2/AipAgents/models/Agent.md | 14 - .../AipAgents/models/AgentMarkdownResponse.md | 11 - docs/v2/AipAgents/models/AgentMetadata.md | 14 - docs/v2/AipAgents/models/AgentRid.md | 11 - .../models/AgentSessionRagContextResponse.md | 13 - docs/v2/AipAgents/models/AgentVersion.md | 12 - .../AipAgents/models/AgentVersionDetails.md | 12 - .../v2/AipAgents/models/AgentVersionString.md | 11 - .../v2/AipAgents/models/AgentsSessionsPage.md | 14 - .../models/BlockingContinueSessionRequest.md | 14 - .../AipAgents/models/CancelSessionRequest.md | 12 - .../AipAgents/models/CancelSessionResponse.md | 11 - docs/v2/AipAgents/models/Content.md | 11 - .../AipAgents/models/CreateSessionRequest.md | 11 - .../AipAgents/models/FailureToolCallOutput.md | 12 - .../models/FunctionRetrievedContext.md | 15 - .../models/GetRagContextForSessionRequest.md | 12 - docs/v2/AipAgents/models/InputContext.md | 17 - .../models/ListAgentVersionsResponse.md | 12 - .../AipAgents/models/ListSessionsResponse.md | 12 - docs/v2/AipAgents/models/MessageId.md | 13 - docs/v2/AipAgents/models/ObjectContext.md | 14 - .../v2/AipAgents/models/ObjectSetParameter.md | 12 - .../models/ObjectSetParameterValue.md | 13 - .../models/ObjectSetParameterValueUpdate.md | 12 - docs/v2/AipAgents/models/Parameter.md | 14 - .../AipAgents/models/ParameterAccessMode.md | 13 - docs/v2/AipAgents/models/ParameterId.md | 12 - docs/v2/AipAgents/models/ParameterType.md | 16 - docs/v2/AipAgents/models/ParameterValue.md | 17 - .../AipAgents/models/ParameterValueUpdate.md | 19 - docs/v2/AipAgents/models/RidToolInputValue.md | 12 - .../v2/AipAgents/models/RidToolOutputValue.md | 12 - docs/v2/AipAgents/models/Session.md | 14 - docs/v2/AipAgents/models/SessionExchange.md | 13 - .../models/SessionExchangeContexts.md | 13 - .../AipAgents/models/SessionExchangeResult.md | 15 - docs/v2/AipAgents/models/SessionMetadata.md | 15 - docs/v2/AipAgents/models/SessionRid.md | 11 - docs/v2/AipAgents/models/SessionTrace.md | 14 - docs/v2/AipAgents/models/SessionTraceId.md | 13 - .../v2/AipAgents/models/SessionTraceStatus.md | 11 - .../models/StreamingContinueSessionRequest.md | 15 - docs/v2/AipAgents/models/StringParameter.md | 12 - .../AipAgents/models/StringParameterValue.md | 12 - .../AipAgents/models/StringToolInputValue.md | 12 - .../AipAgents/models/StringToolOutputValue.md | 12 - .../AipAgents/models/SuccessToolCallOutput.md | 12 - docs/v2/AipAgents/models/ToolCall.md | 13 - docs/v2/AipAgents/models/ToolCallGroup.md | 12 - docs/v2/AipAgents/models/ToolCallInput.md | 12 - docs/v2/AipAgents/models/ToolCallOutput.md | 16 - docs/v2/AipAgents/models/ToolInputName.md | 11 - docs/v2/AipAgents/models/ToolInputValue.md | 16 - docs/v2/AipAgents/models/ToolMetadata.md | 12 - docs/v2/AipAgents/models/ToolOutputValue.md | 16 - docs/v2/AipAgents/models/ToolType.md | 17 - .../models/UpdateSessionTitleRequest.md | 11 - docs/v2/AipAgents/models/UserTextInput.md | 11 - docs/v2/Audit/LogFile.md | 123 - docs/v2/Audit/Organization.md | 5 - docs/v2/Audit/models/FileId.md | 11 - docs/v2/Audit/models/ListLogFilesResponse.md | 12 - docs/v2/Audit/models/LogFile.md | 11 - docs/v2/Connectivity/Connection.md | 424 - docs/v2/Connectivity/FileImport.md | 390 - docs/v2/Connectivity/TableImport.md | 390 - docs/v2/Connectivity/VirtualTable.md | 77 - .../models/ApiKeyAuthentication.md | 15 - .../Connectivity/models/AsPlaintextValue.md | 12 - docs/v2/Connectivity/models/AsSecretName.md | 12 - docs/v2/Connectivity/models/AwsAccessKey.md | 18 - .../models/AwsOidcAuthentication.md | 16 - .../Connectivity/models/BasicCredentials.md | 13 - docs/v2/Connectivity/models/BearerToken.md | 12 - .../models/BigQueryVirtualTableConfig.md | 14 - docs/v2/Connectivity/models/CloudIdentity.md | 14 - .../Connectivity/models/CloudIdentityRid.md | 12 - docs/v2/Connectivity/models/Connection.md | 16 - .../models/ConnectionConfiguration.md | 20 - .../models/ConnectionDisplayName.md | 11 - .../models/ConnectionExportSettings.md | 13 - docs/v2/Connectivity/models/ConnectionRid.md | 12 - .../Connectivity/models/ConnectionWorker.md | 18 - .../models/CreateConnectionRequest.md | 14 - ...CreateConnectionRequestAsPlaintextValue.md | 12 - .../CreateConnectionRequestAsSecretName.md | 12 - ...CreateConnectionRequestBasicCredentials.md | 13 - ...onnectionRequestConnectionConfiguration.md | 20 - ...CreateConnectionRequestConnectionWorker.md | 18 - ...tionRequestDatabricksAuthenticationMode.md | 18 - ...equestDatabricksConnectionConfiguration.md | 15 - ...reateConnectionRequestEncryptedProperty.md | 21 - .../CreateConnectionRequestFoundryWorker.md | 12 - ...ctionRequestJdbcConnectionConfiguration.md | 15 - ...nectionRequestOauthMachineToMachineAuth.md | 13 - ...ateConnectionRequestPersonalAccessToken.md | 12 - ...ctionRequestRestConnectionConfiguration.md | 14 - ...nectionRequestS3ConnectionConfiguration.md | 25 - .../models/CreateConnectionRequestSmbAuth.md | 11 - ...ectionRequestSmbConnectionConfiguration.md | 18 - ...onnectionRequestSmbUsernamePasswordAuth.md | 14 - ...ctionRequestSnowflakeAuthenticationMode.md | 17 - ...RequestSnowflakeConnectionConfiguration.md | 18 - ...ConnectionRequestSnowflakeExternalOauth.md | 11 - ...onRequestSnowflakeKeyPairAuthentication.md | 13 - .../CreateConnectionRequestUnknownWorker.md | 11 - ...ectionRequestWorkflowIdentityFederation.md | 13 - .../models/CreateFileImportRequest.md | 16 - .../models/CreateTableImportRequest.md | 16 - ...mportRequestDatabricksTableImportConfig.md | 13 - ...TableImportRequestJdbcTableImportConfig.md | 13 - ...RequestMicrosoftAccessTableImportConfig.md | 13 - ...uestMicrosoftSqlServerTableImportConfig.md | 13 - ...bleImportRequestOracleTableImportConfig.md | 13 - ...mportRequestPostgreSqlTableImportConfig.md | 13 - ...ImportRequestSnowflakeTableImportConfig.md | 13 - ...eateTableImportRequestTableImportConfig.md | 22 - .../models/CreateVirtualTableRequest.md | 14 - .../models/DatabricksAuthenticationMode.md | 18 - .../DatabricksConnectionConfiguration.md | 18 - .../models/DatabricksTableImportConfig.md | 14 - .../DateColumnInitialIncrementalState.md | 14 - .../DecimalColumnInitialIncrementalState.md | 14 - .../models/DeltaVirtualTableConfig.md | 12 - docs/v2/Connectivity/models/Domain.md | 14 - .../Connectivity/models/EncryptedProperty.md | 21 - .../models/FileAnyPathMatchesFilter.md | 13 - .../models/FileAtLeastCountFilter.md | 12 - .../FileChangedSinceLastUploadFilter.md | 14 - docs/v2/Connectivity/models/FileFormat.md | 13 - docs/v2/Connectivity/models/FileImport.md | 18 - .../models/FileImportCustomFilter.md | 14 - .../models/FileImportDisplayName.md | 11 - .../Connectivity/models/FileImportFilter.md | 25 - docs/v2/Connectivity/models/FileImportMode.md | 17 - docs/v2/Connectivity/models/FileImportRid.md | 12 - .../models/FileLastModifiedAfterFilter.md | 13 - .../models/FilePathMatchesFilter.md | 22 - .../models/FilePathNotMatchesFilter.md | 23 - docs/v2/Connectivity/models/FileProperty.md | 11 - docs/v2/Connectivity/models/FileSizeFilter.md | 16 - .../models/FilesCountLimitFilter.md | 15 - .../models/FilesVirtualTableConfig.md | 13 - docs/v2/Connectivity/models/FoundryWorker.md | 16 - ...igurationConnectionsBatchRequestElement.md | 11 - ...etConfigurationConnectionsBatchResponse.md | 11 - .../models/GlueVirtualTableConfig.md | 13 - docs/v2/Connectivity/models/HeaderApiKey.md | 12 - .../models/IcebergVirtualTableConfig.md | 13 - .../IntegerColumnInitialIncrementalState.md | 14 - .../models/InvalidConnectionReason.md | 71 - .../models/JdbcConnectionConfiguration.md | 17 - .../models/JdbcDriverArtifactName.md | 12 - docs/v2/Connectivity/models/JdbcProperties.md | 15 - .../models/JdbcTableImportConfig.md | 14 - .../models/ListFileImportsResponse.md | 12 - .../models/ListTableImportsResponse.md | 12 - .../LongColumnInitialIncrementalState.md | 14 - .../MicrosoftAccessTableImportConfig.md | 14 - .../MicrosoftSqlServerTableImportConfig.md | 14 - .../models/NetworkEgressPolicyRid.md | 12 - .../models/OauthMachineToMachineAuth.md | 16 - .../models/OracleTableImportConfig.md | 14 - .../models/PersonalAccessToken.md | 14 - docs/v2/Connectivity/models/PlaintextValue.md | 11 - .../models/PostgreSqlTableImportConfig.md | 14 - docs/v2/Connectivity/models/Protocol.md | 11 - .../models/QueryParameterApiKey.md | 12 - docs/v2/Connectivity/models/Region.md | 12 - .../models/ReplaceFileImportRequest.md | 14 - .../models/ReplaceTableImportRequest.md | 14 - ...mportRequestDatabricksTableImportConfig.md | 13 - ...TableImportRequestJdbcTableImportConfig.md | 13 - ...RequestMicrosoftAccessTableImportConfig.md | 13 - ...uestMicrosoftSqlServerTableImportConfig.md | 13 - ...bleImportRequestOracleTableImportConfig.md | 13 - ...mportRequestPostgreSqlTableImportConfig.md | 13 - ...ImportRequestSnowflakeTableImportConfig.md | 13 - ...laceTableImportRequestTableImportConfig.md | 22 - .../models/RestAuthenticationMode.md | 18 - .../models/RestConnectionAdditionalSecrets.md | 18 - .../models/RestConnectionConfiguration.md | 14 - .../models/RestConnectionOAuth2.md | 13 - .../models/RestRequestApiKeyLocation.md | 16 - .../models/S3AuthenticationMode.md | 17 - .../models/S3ConnectionConfiguration.md | 27 - .../Connectivity/models/S3KmsConfiguration.md | 12 - .../models/S3ProxyConfiguration.md | 15 - docs/v2/Connectivity/models/SecretName.md | 11 - docs/v2/Connectivity/models/SecretsNames.md | 14 - .../models/SecretsWithPlaintextValues.md | 14 - docs/v2/Connectivity/models/SmbAuth.md | 11 - .../models/SmbConnectionConfiguration.md | 18 - .../models/SmbProxyConfiguration.md | 13 - docs/v2/Connectivity/models/SmbProxyType.md | 11 - .../models/SmbUsernamePasswordAuth.md | 14 - .../models/SnowflakeAuthenticationMode.md | 17 - .../SnowflakeConnectionConfiguration.md | 19 - .../models/SnowflakeExternalOauth.md | 17 - .../models/SnowflakeKeyPairAuthentication.md | 16 - .../models/SnowflakeTableImportConfig.md | 14 - .../models/SnowflakeVirtualTableConfig.md | 14 - .../StringColumnInitialIncrementalState.md | 14 - .../models/StsRoleConfiguration.md | 15 - docs/v2/Connectivity/models/TableImport.md | 18 - .../models/TableImportAllowSchemaChanges.md | 11 - .../Connectivity/models/TableImportConfig.md | 22 - .../models/TableImportDisplayName.md | 11 - .../TableImportInitialIncrementalState.md | 27 - .../v2/Connectivity/models/TableImportMode.md | 15 - .../Connectivity/models/TableImportQuery.md | 14 - docs/v2/Connectivity/models/TableImportRid.md | 12 - docs/v2/Connectivity/models/TableName.md | 12 - docs/v2/Connectivity/models/TableRid.md | 12 - .../TimestampColumnInitialIncrementalState.md | 13 - .../models/UnityVirtualTableConfig.md | 14 - docs/v2/Connectivity/models/UnknownWorker.md | 15 - ...pdateExportSettingsForConnectionRequest.md | 11 - .../UpdateSecretsForConnectionRequest.md | 11 - docs/v2/Connectivity/models/UriScheme.md | 11 - docs/v2/Connectivity/models/VirtualTable.md | 15 - .../Connectivity/models/VirtualTableConfig.md | 21 - .../models/WorkflowIdentityFederation.md | 20 - docs/v2/Core/models/AnyType.md | 11 - docs/v2/Core/models/ArrayFieldType.md | 12 - docs/v2/Core/models/AttachmentType.md | 11 - docs/v2/Core/models/Attribution.md | 11 - docs/v2/Core/models/BinaryType.md | 11 - docs/v2/Core/models/BooleanType.md | 11 - docs/v2/Core/models/BranchMetadata.md | 11 - docs/v2/Core/models/BuildRid.md | 11 - docs/v2/Core/models/ByteType.md | 11 - .../models/ChangeDataCaptureConfiguration.md | 16 - docs/v2/Core/models/CheckReportRid.md | 11 - docs/v2/Core/models/CheckRid.md | 11 - docs/v2/Core/models/CipherTextType.md | 12 - docs/v2/Core/models/ComputeSeconds.md | 11 - docs/v2/Core/models/ContentLength.md | 11 - docs/v2/Core/models/ContentType.md | 11 - docs/v2/Core/models/CreatedBy.md | 11 - docs/v2/Core/models/CreatedTime.md | 12 - docs/v2/Core/models/CustomMetadata.md | 11 - docs/v2/Core/models/DatasetFieldSchema.md | 22 - docs/v2/Core/models/DatasetSchema.md | 12 - docs/v2/Core/models/DateType.md | 11 - docs/v2/Core/models/DecimalType.md | 13 - docs/v2/Core/models/DisplayName.md | 11 - docs/v2/Core/models/Distance.md | 12 - docs/v2/Core/models/DistanceUnit.md | 18 - docs/v2/Core/models/DoubleType.md | 11 - docs/v2/Core/models/Duration.md | 12 - docs/v2/Core/models/DurationSeconds.md | 11 - docs/v2/Core/models/EmbeddingModel.md | 16 - docs/v2/Core/models/EnrollmentRid.md | 11 - docs/v2/Core/models/Field.md | 14 - docs/v2/Core/models/FieldDataType.md | 29 - docs/v2/Core/models/FieldName.md | 11 - docs/v2/Core/models/FieldSchema.md | 14 - docs/v2/Core/models/FilePath.md | 12 - docs/v2/Core/models/Filename.md | 12 - docs/v2/Core/models/FilterBinaryType.md | 11 - docs/v2/Core/models/FilterBooleanType.md | 11 - docs/v2/Core/models/FilterDateTimeType.md | 11 - docs/v2/Core/models/FilterDateType.md | 11 - docs/v2/Core/models/FilterDoubleType.md | 11 - docs/v2/Core/models/FilterEnumType.md | 12 - docs/v2/Core/models/FilterFloatType.md | 11 - docs/v2/Core/models/FilterIntegerType.md | 11 - docs/v2/Core/models/FilterLongType.md | 11 - docs/v2/Core/models/FilterRidType.md | 11 - docs/v2/Core/models/FilterStringType.md | 11 - docs/v2/Core/models/FilterType.md | 26 - docs/v2/Core/models/FilterUuidType.md | 11 - docs/v2/Core/models/FloatType.md | 11 - docs/v2/Core/models/FolderRid.md | 11 - docs/v2/Core/models/FoundryBranch.md | 11 - docs/v2/Core/models/FoundryLiveDeployment.md | 14 - .../FullRowChangeDataCaptureConfiguration.md | 16 - docs/v2/Core/models/GeoPointType.md | 11 - docs/v2/Core/models/GeoShapeType.md | 11 - docs/v2/Core/models/GeohashType.md | 11 - .../Core/models/GeotimeSeriesReferenceType.md | 11 - docs/v2/Core/models/GroupId.md | 11 - docs/v2/Core/models/GroupName.md | 11 - docs/v2/Core/models/GroupRid.md | 11 - docs/v2/Core/models/IncludeComputeUsage.md | 14 - docs/v2/Core/models/IntegerType.md | 11 - docs/v2/Core/models/JobRid.md | 11 - docs/v2/Core/models/LmsEmbeddingModel.md | 12 - docs/v2/Core/models/LmsEmbeddingModelValue.md | 15 - docs/v2/Core/models/LongType.md | 11 - docs/v2/Core/models/MapFieldType.md | 13 - docs/v2/Core/models/MarkingId.md | 11 - docs/v2/Core/models/MarkingType.md | 11 - docs/v2/Core/models/MediaItemPath.md | 15 - docs/v2/Core/models/MediaItemReadToken.md | 11 - docs/v2/Core/models/MediaItemRid.md | 11 - docs/v2/Core/models/MediaReference.md | 12 - docs/v2/Core/models/MediaReferenceType.md | 11 - docs/v2/Core/models/MediaSetRid.md | 11 - docs/v2/Core/models/MediaSetViewItem.md | 14 - .../v2/Core/models/MediaSetViewItemWrapper.md | 12 - docs/v2/Core/models/MediaSetViewRid.md | 11 - docs/v2/Core/models/MediaType.md | 13 - docs/v2/Core/models/NullType.md | 11 - .../v2/Core/models/NumericOrNonNumericType.md | 16 - docs/v2/Core/models/Operation.md | 13 - docs/v2/Core/models/OperationScope.md | 11 - docs/v2/Core/models/OrderByDirection.md | 11 - docs/v2/Core/models/OrganizationRid.md | 11 - docs/v2/Core/models/PageSize.md | 11 - docs/v2/Core/models/PageToken.md | 14 - docs/v2/Core/models/PreviewMode.md | 11 - docs/v2/Core/models/PrincipalId.md | 11 - docs/v2/Core/models/PrincipalType.md | 11 - docs/v2/Core/models/Realm.md | 13 - docs/v2/Core/models/Reference.md | 12 - docs/v2/Core/models/ReleaseStatus.md | 13 - docs/v2/Core/models/Role.md | 18 - docs/v2/Core/models/RoleAssignmentUpdate.md | 12 - docs/v2/Core/models/RoleContext.md | 10 - docs/v2/Core/models/RoleId.md | 14 - docs/v2/Core/models/RoleSetId.md | 11 - docs/v2/Core/models/ScheduleRid.md | 11 - docs/v2/Core/models/SchemaFieldType.md | 24 - docs/v2/Core/models/ShortType.md | 11 - docs/v2/Core/models/SizeBytes.md | 11 - docs/v2/Core/models/StreamSchema.md | 14 - docs/v2/Core/models/StringType.md | 11 - docs/v2/Core/models/StructFieldName.md | 12 - docs/v2/Core/models/StructFieldType.md | 12 - docs/v2/Core/models/TableRid.md | 11 - docs/v2/Core/models/TimeSeriesItemType.md | 18 - docs/v2/Core/models/TimeUnit.md | 17 - docs/v2/Core/models/TimeseriesType.md | 12 - docs/v2/Core/models/TimestampType.md | 11 - docs/v2/Core/models/TotalCount.md | 12 - docs/v2/Core/models/TraceParent.md | 11 - docs/v2/Core/models/TraceState.md | 11 - docs/v2/Core/models/UnsupportedType.md | 12 - docs/v2/Core/models/UpdatedBy.md | 11 - docs/v2/Core/models/UpdatedTime.md | 12 - docs/v2/Core/models/UserId.md | 12 - docs/v2/Core/models/UserStatus.md | 11 - .../Core/models/VectorSimilarityFunction.md | 13 - .../models/VectorSimilarityFunctionValue.md | 12 - docs/v2/Core/models/VectorType.md | 14 - docs/v2/Core/models/VersionId.md | 12 - docs/v2/Core/models/ZoneId.md | 11 - docs/v2/DataHealth/Check.md | 220 - docs/v2/DataHealth/CheckReport.md | 56 - .../models/AllowedColumnValuesCheckConfig.md | 16 - .../ApproximateUniquePercentageCheckConfig.md | 13 - .../DataHealth/models/BooleanColumnValue.md | 12 - .../models/BuildDurationCheckConfig.md | 13 - .../models/BuildStatusCheckConfig.md | 13 - docs/v2/DataHealth/models/Check.md | 16 - docs/v2/DataHealth/models/CheckConfig.md | 30 - docs/v2/DataHealth/models/CheckGroupRid.md | 11 - docs/v2/DataHealth/models/CheckIntent.md | 12 - docs/v2/DataHealth/models/CheckReport.md | 14 - docs/v2/DataHealth/models/CheckResult.md | 12 - .../v2/DataHealth/models/CheckResultStatus.md | 15 - .../v2/DataHealth/models/ColumnCountConfig.md | 12 - docs/v2/DataHealth/models/ColumnInfo.md | 12 - docs/v2/DataHealth/models/ColumnName.md | 11 - .../models/ColumnTypeCheckConfig.md | 13 - docs/v2/DataHealth/models/ColumnTypeConfig.md | 13 - docs/v2/DataHealth/models/ColumnValue.md | 18 - .../DataHealth/models/CreateCheckRequest.md | 12 - docs/v2/DataHealth/models/DatasetSubject.md | 12 - docs/v2/DataHealth/models/DateBounds.md | 12 - docs/v2/DataHealth/models/DateBoundsConfig.md | 12 - .../models/DateColumnRangeCheckConfig.md | 14 - docs/v2/DataHealth/models/DateColumnValue.md | 12 - docs/v2/DataHealth/models/EscalationConfig.md | 12 - .../models/JobDurationCheckConfig.md | 13 - .../DataHealth/models/JobStatusCheckConfig.md | 13 - docs/v2/DataHealth/models/MedianDeviation.md | 13 - .../models/MedianDeviationBoundsType.md | 12 - .../models/MedianDeviationConfig.md | 12 - .../models/NullPercentageCheckConfig.md | 13 - docs/v2/DataHealth/models/NumericBounds.md | 12 - .../DataHealth/models/NumericBoundsConfig.md | 12 - .../models/NumericColumnCheckConfig.md | 13 - .../models/NumericColumnMeanCheckConfig.md | 13 - .../models/NumericColumnMedianCheckConfig.md | 13 - .../models/NumericColumnRangeCheckConfig.md | 14 - .../DataHealth/models/NumericColumnValue.md | 12 - docs/v2/DataHealth/models/PercentageBounds.md | 12 - .../models/PercentageBoundsConfig.md | 12 - .../models/PercentageCheckConfig.md | 13 - docs/v2/DataHealth/models/PercentageValue.md | 15 - .../models/PrimaryKeyCheckConfig.md | 13 - docs/v2/DataHealth/models/PrimaryKeyConfig.md | 12 - .../ReplaceAllowedColumnValuesCheckConfig.md | 14 - ...eApproximateUniquePercentageCheckConfig.md | 12 - .../models/ReplaceBuildDurationCheckConfig.md | 12 - .../models/ReplaceBuildStatusCheckConfig.md | 12 - .../DataHealth/models/ReplaceCheckConfig.md | 30 - .../DataHealth/models/ReplaceCheckRequest.md | 12 - .../models/ReplaceColumnTypeCheckConfig.md | 12 - .../models/ReplaceColumnTypeConfig.md | 12 - .../ReplaceDateColumnRangeCheckConfig.md | 12 - .../models/ReplaceJobDurationCheckConfig.md | 12 - .../models/ReplaceJobStatusCheckConfig.md | 12 - .../ReplaceNullPercentageCheckConfig.md | 12 - .../models/ReplaceNumericColumnCheckConfig.md | 12 - .../ReplaceNumericColumnMeanCheckConfig.md | 12 - .../ReplaceNumericColumnMedianCheckConfig.md | 12 - .../ReplaceNumericColumnRangeCheckConfig.md | 12 - .../models/ReplacePercentageCheckConfig.md | 12 - .../models/ReplacePrimaryKeyCheckConfig.md | 12 - .../models/ReplacePrimaryKeyConfig.md | 11 - .../ReplaceSchemaComparisonCheckConfig.md | 12 - .../ReplaceTotalColumnCountCheckConfig.md | 12 - .../models/SchemaComparisonCheckConfig.md | 13 - .../models/SchemaComparisonConfig.md | 13 - .../DataHealth/models/SchemaComparisonType.md | 19 - docs/v2/DataHealth/models/SchemaInfo.md | 11 - docs/v2/DataHealth/models/SeverityLevel.md | 11 - .../v2/DataHealth/models/StatusCheckConfig.md | 12 - .../v2/DataHealth/models/StringColumnValue.md | 12 - docs/v2/DataHealth/models/TimeBounds.md | 12 - docs/v2/DataHealth/models/TimeBoundsConfig.md | 12 - docs/v2/DataHealth/models/TimeCheckConfig.md | 12 - .../models/TotalColumnCountCheckConfig.md | 13 - docs/v2/DataHealth/models/TrendConfig.md | 13 - docs/v2/DataHealth/models/TrendType.md | 19 - docs/v2/Datasets/Branch.md | 284 - docs/v2/Datasets/Dataset.md | 691 - docs/v2/Datasets/File.md | 409 - docs/v2/Datasets/Transaction.md | 360 - docs/v2/Datasets/View.md | 401 - .../models/AddBackingDatasetsRequest.md | 12 - .../Datasets/models/AddPrimaryKeyRequest.md | 12 - docs/v2/Datasets/models/Branch.md | 12 - docs/v2/Datasets/models/BranchName.md | 12 - .../v2/Datasets/models/CreateBranchRequest.md | 12 - .../Datasets/models/CreateDatasetRequest.md | 12 - .../models/CreateTransactionRequest.md | 11 - docs/v2/Datasets/models/CreateViewRequest.md | 15 - docs/v2/Datasets/models/DataframeReader.md | 14 - docs/v2/Datasets/models/Dataset.md | 13 - docs/v2/Datasets/models/DatasetName.md | 11 - docs/v2/Datasets/models/DatasetRid.md | 12 - docs/v2/Datasets/models/File.md | 14 - docs/v2/Datasets/models/FileUpdatedTime.md | 11 - .../models/GetDatasetJobsAndFilter.md | 12 - .../models/GetDatasetJobsComparisonType.md | 11 - .../Datasets/models/GetDatasetJobsOrFilter.md | 12 - .../v2/Datasets/models/GetDatasetJobsQuery.md | 17 - .../Datasets/models/GetDatasetJobsRequest.md | 12 - docs/v2/Datasets/models/GetDatasetJobsSort.md | 12 - .../models/GetDatasetJobsSortDirection.md | 11 - .../Datasets/models/GetDatasetJobsSortType.md | 11 - .../models/GetDatasetJobsTimeFilter.md | 14 - .../models/GetDatasetJobsTimeFilterField.md | 11 - .../models/GetDatasetSchemaResponse.md | 14 - docs/v2/Datasets/models/GetJobResponse.md | 12 - .../GetSchemaDatasetsBatchRequestElement.md | 14 - .../models/GetSchemaDatasetsBatchResponse.md | 11 - docs/v2/Datasets/models/JobDetails.md | 11 - .../Datasets/models/ListBranchesResponse.md | 12 - docs/v2/Datasets/models/ListFilesResponse.md | 12 - .../models/ListHealthChecksResponse.md | 11 - .../Datasets/models/ListSchedulesResponse.md | 12 - .../ListTransactionsOfDatasetResponse.md | 12 - .../models/ListTransactionsResponse.md | 12 - .../PrimaryKeyLatestWinsResolutionStrategy.md | 12 - .../models/PrimaryKeyResolutionDuplicate.md | 13 - .../models/PrimaryKeyResolutionStrategy.md | 11 - .../models/PrimaryKeyResolutionUnique.md | 11 - .../models/PutDatasetSchemaRequest.md | 14 - .../models/RemoveBackingDatasetsRequest.md | 12 - .../models/ReplaceBackingDatasetsRequest.md | 12 - docs/v2/Datasets/models/TableExportFormat.md | 12 - docs/v2/Datasets/models/Transaction.md | 15 - .../Datasets/models/TransactionCreatedTime.md | 12 - docs/v2/Datasets/models/TransactionRid.md | 12 - docs/v2/Datasets/models/TransactionStatus.md | 13 - docs/v2/Datasets/models/TransactionType.md | 14 - docs/v2/Datasets/models/View.md | 16 - docs/v2/Datasets/models/ViewBackingDataset.md | 12 - docs/v2/Datasets/models/ViewPrimaryKey.md | 14 - .../models/ViewPrimaryKeyResolution.md | 16 - docs/v2/Filesystem/Folder.md | 228 - docs/v2/Filesystem/Project.md | 437 - docs/v2/Filesystem/Resource.md | 604 - docs/v2/Filesystem/ResourceRole.md | 185 - docs/v2/Filesystem/Space.md | 321 - .../Filesystem/models/AccessRequirements.md | 14 - .../Filesystem/models/AddMarkingsRequest.md | 11 - .../models/AddOrganizationsRequest.md | 11 - .../models/AddResourceRolesRequest.md | 11 - .../Filesystem/models/CreateFolderRequest.md | 12 - .../CreateProjectFromTemplateRequest.md | 15 - .../Filesystem/models/CreateProjectRequest.md | 16 - .../Filesystem/models/CreateSpaceRequest.md | 18 - docs/v2/Filesystem/models/Everyone.md | 11 - docs/v2/Filesystem/models/FileSystemId.md | 11 - docs/v2/Filesystem/models/Folder.md | 24 - docs/v2/Filesystem/models/FolderRid.md | 11 - docs/v2/Filesystem/models/FolderType.md | 15 - .../GetByPathResourcesBatchRequestElement.md | 11 - .../models/GetByPathResourcesBatchResponse.md | 11 - .../models/GetFoldersBatchRequestElement.md | 11 - .../models/GetFoldersBatchResponse.md | 11 - .../models/GetResourcesBatchRequestElement.md | 11 - .../models/GetResourcesBatchResponse.md | 11 - .../v2/Filesystem/models/IsDirectlyApplied.md | 13 - .../models/ListChildrenOfFolderResponse.md | 12 - .../models/ListMarkingsOfResourceResponse.md | 12 - .../ListOrganizationsOfProjectResponse.md | 12 - .../models/ListResourceRolesResponse.md | 12 - .../Filesystem/models/ListSpacesResponse.md | 12 - docs/v2/Filesystem/models/Marking.md | 16 - docs/v2/Filesystem/models/Organization.md | 18 - docs/v2/Filesystem/models/PrincipalIdOnly.md | 12 - docs/v2/Filesystem/models/PrincipalWithId.md | 13 - docs/v2/Filesystem/models/Project.md | 21 - docs/v2/Filesystem/models/ProjectRid.md | 11 - .../Filesystem/models/ProjectTemplateRid.md | 11 - .../models/ProjectTemplateVariableId.md | 11 - .../models/ProjectTemplateVariableValue.md | 11 - .../models/RemoveMarkingsRequest.md | 11 - .../models/RemoveOrganizationsRequest.md | 11 - .../models/RemoveResourceRolesRequest.md | 11 - .../models/ReplaceProjectRequest.md | 12 - .../Filesystem/models/ReplaceSpaceRequest.md | 14 - docs/v2/Filesystem/models/Resource.md | 24 - .../Filesystem/models/ResourceDisplayName.md | 11 - docs/v2/Filesystem/models/ResourcePath.md | 11 - docs/v2/Filesystem/models/ResourceRid.md | 11 - docs/v2/Filesystem/models/ResourceRole.md | 12 - .../models/ResourceRoleIdentifier.md | 12 - .../models/ResourceRolePrincipal.md | 16 - .../models/ResourceRolePrincipalIdentifier.md | 16 - docs/v2/Filesystem/models/ResourceType.md | 94 - docs/v2/Filesystem/models/Space.md | 20 - .../Filesystem/models/SpaceMavenIdentifier.md | 12 - docs/v2/Filesystem/models/SpaceRid.md | 11 - docs/v2/Filesystem/models/TrashStatus.md | 12 - docs/v2/Filesystem/models/UsageAccountRid.md | 12 - docs/v2/Functions/Query.md | 306 - docs/v2/Functions/ValueType.md | 57 - docs/v2/Functions/VersionId.md | 62 - docs/v2/Functions/models/ArrayConstraint.md | 15 - docs/v2/Functions/models/DataValue.md | 33 - docs/v2/Functions/models/EnumConstraint.md | 12 - .../Functions/models/ExecuteQueryRequest.md | 12 - .../Functions/models/ExecuteQueryResponse.md | 11 - docs/v2/Functions/models/FunctionRid.md | 12 - docs/v2/Functions/models/FunctionVersion.md | 13 - .../models/GetByRidQueriesRequest.md | 12 - docs/v2/Functions/models/LengthConstraint.md | 13 - docs/v2/Functions/models/MapConstraint.md | 14 - .../v2/Functions/models/NullableConstraint.md | 12 - .../models/NullableConstraintValue.md | 11 - docs/v2/Functions/models/Parameter.md | 12 - docs/v2/Functions/models/ParameterId.md | 13 - docs/v2/Functions/models/Query.md | 17 - .../models/QueryAggregationKeyType.md | 22 - .../models/QueryAggregationRangeSubType.md | 19 - .../models/QueryAggregationRangeType.md | 12 - .../models/QueryAggregationValueType.md | 18 - docs/v2/Functions/models/QueryApiName.md | 11 - docs/v2/Functions/models/QueryArrayType.md | 12 - docs/v2/Functions/models/QueryDataType.md | 33 - .../models/QueryRuntimeErrorParameter.md | 11 - docs/v2/Functions/models/QuerySetType.md | 12 - docs/v2/Functions/models/QueryStructField.md | 12 - docs/v2/Functions/models/QueryStructType.md | 12 - docs/v2/Functions/models/QueryUnionType.md | 12 - docs/v2/Functions/models/RangesConstraint.md | 13 - docs/v2/Functions/models/RegexConstraint.md | 13 - docs/v2/Functions/models/RidConstraint.md | 11 - .../models/StreamingExecuteQueryRequest.md | 13 - docs/v2/Functions/models/StructConstraint.md | 12 - .../v2/Functions/models/StructFieldApiName.md | 11 - docs/v2/Functions/models/StructFieldName.md | 12 - .../v2/Functions/models/StructV1Constraint.md | 12 - .../models/ThreeDimensionalAggregation.md | 13 - docs/v2/Functions/models/TransactionId.md | 11 - .../models/TwoDimensionalAggregation.md | 13 - docs/v2/Functions/models/UuidConstraint.md | 11 - docs/v2/Functions/models/ValueType.md | 18 - docs/v2/Functions/models/ValueTypeApiName.md | 11 - .../Functions/models/ValueTypeConstraint.md | 25 - docs/v2/Functions/models/ValueTypeDataType.md | 33 - .../models/ValueTypeDataTypeArrayType.md | 12 - .../models/ValueTypeDataTypeBinaryType.md | 11 - .../models/ValueTypeDataTypeBooleanType.md | 11 - .../models/ValueTypeDataTypeByteType.md | 11 - .../models/ValueTypeDataTypeDateType.md | 11 - .../models/ValueTypeDataTypeDecimalType.md | 11 - .../models/ValueTypeDataTypeDoubleType.md | 11 - .../models/ValueTypeDataTypeFloatType.md | 11 - .../models/ValueTypeDataTypeIntegerType.md | 11 - .../models/ValueTypeDataTypeLongType.md | 11 - .../models/ValueTypeDataTypeMapType.md | 13 - .../models/ValueTypeDataTypeOptionalType.md | 12 - .../models/ValueTypeDataTypeShortType.md | 11 - .../models/ValueTypeDataTypeStringType.md | 11 - .../models/ValueTypeDataTypeStructElement.md | 12 - .../ValueTypeDataTypeStructFieldIdentifier.md | 11 - .../models/ValueTypeDataTypeStructType.md | 12 - .../models/ValueTypeDataTypeTimestampType.md | 11 - .../models/ValueTypeDataTypeUnionType.md | 12 - .../ValueTypeDataTypeValueTypeReference.md | 13 - .../Functions/models/ValueTypeDescription.md | 12 - .../v2/Functions/models/ValueTypeReference.md | 14 - docs/v2/Functions/models/ValueTypeRid.md | 12 - docs/v2/Functions/models/ValueTypeVersion.md | 12 - .../v2/Functions/models/ValueTypeVersionId.md | 12 - docs/v2/Functions/models/VersionId.md | 18 - docs/v2/Geo/models/BBox.md | 18 - docs/v2/Geo/models/Coordinate.md | 11 - docs/v2/Geo/models/Feature.md | 15 - docs/v2/Geo/models/FeatureCollection.md | 13 - docs/v2/Geo/models/FeatureCollectionTypes.md | 11 - docs/v2/Geo/models/FeaturePropertyKey.md | 11 - docs/v2/Geo/models/GeoPoint.md | 13 - docs/v2/Geo/models/Geometry.md | 21 - docs/v2/Geo/models/GeometryCollection.md | 19 - docs/v2/Geo/models/LineString.md | 13 - docs/v2/Geo/models/LineStringCoordinates.md | 12 - docs/v2/Geo/models/LinearRing.md | 22 - docs/v2/Geo/models/MultiLineString.md | 13 - docs/v2/Geo/models/MultiPoint.md | 13 - docs/v2/Geo/models/MultiPolygon.md | 13 - docs/v2/Geo/models/Polygon.md | 13 - docs/v2/Geo/models/Position.md | 25 - docs/v2/LanguageModels/AnthropicModel.md | 103 - docs/v2/LanguageModels/OpenAiModel.md | 75 - .../models/AnthropicAnyToolChoice.md | 12 - .../models/AnthropicAutoToolChoice.md | 12 - .../AnthropicBase64PdfDocumentSource.md | 12 - .../models/AnthropicCacheControl.md | 11 - .../AnthropicCharacterLocationCitation.md | 16 - .../models/AnthropicCompletionCitation.md | 11 - .../models/AnthropicCompletionContent.md | 18 - .../AnthropicCompletionRedactedThinking.md | 12 - .../models/AnthropicCompletionText.md | 13 - .../models/AnthropicCompletionThinking.md | 13 - .../models/AnthropicCompletionToolUse.md | 14 - .../models/AnthropicCustomTool.md | 14 - .../models/AnthropicDisableParallelToolUse.md | 13 - .../models/AnthropicDisabledThinking.md | 11 - .../models/AnthropicDocument.md | 16 - .../models/AnthropicDocumentCitations.md | 11 - .../models/AnthropicDocumentSource.md | 16 - .../models/AnthropicEnabledThinking.md | 12 - .../models/AnthropicEphemeralCacheControl.md | 11 - .../LanguageModels/models/AnthropicImage.md | 13 - .../models/AnthropicImageBase64Source.md | 13 - .../models/AnthropicImageSource.md | 11 - .../models/AnthropicMediaType.md | 13 - .../LanguageModels/models/AnthropicMessage.md | 12 - .../models/AnthropicMessageContent.md | 21 - .../models/AnthropicMessageRole.md | 11 - .../models/AnthropicMessagesRequest.md | 20 - .../models/AnthropicMessagesResponse.md | 17 - .../models/AnthropicNoneToolChoice.md | 11 - .../models/AnthropicRedactedThinking.md | 12 - .../models/AnthropicSystemMessage.md | 11 - .../v2/LanguageModels/models/AnthropicText.md | 14 - .../models/AnthropicTextDocumentSource.md | 12 - .../models/AnthropicThinking.md | 13 - .../models/AnthropicThinkingConfig.md | 16 - .../models/AnthropicTokenUsage.md | 14 - .../v2/LanguageModels/models/AnthropicTool.md | 11 - .../models/AnthropicToolChoice.md | 18 - .../models/AnthropicToolResult.md | 15 - .../models/AnthropicToolResultContent.md | 11 - .../models/AnthropicToolToolChoice.md | 13 - .../LanguageModels/models/AnthropicToolUse.md | 15 - docs/v2/LanguageModels/models/JsonSchema.md | 11 - .../models/LanguageModelApiName.md | 11 - .../models/OpenAiEmbeddingInput.md | 11 - .../models/OpenAiEmbeddingTokenUsage.md | 11 - .../models/OpenAiEmbeddingsRequest.md | 13 - .../models/OpenAiEmbeddingsResponse.md | 13 - .../models/OpenAiEncodingFormat.md | 11 - docs/v2/MediaSets/MediaSet.md | 751 - docs/v2/MediaSets/models/BranchName.md | 13 - docs/v2/MediaSets/models/BranchRid.md | 12 - .../models/GetMediaItemInfoResponse.md | 14 - .../models/GetMediaItemRidByPathResponse.md | 11 - docs/v2/MediaSets/models/LogicalTimestamp.md | 16 - docs/v2/MediaSets/models/MediaAttribution.md | 12 - .../v2/MediaSets/models/MediaItemXmlFormat.md | 12 - .../MediaSets/models/PutMediaItemResponse.md | 11 - .../TrackedTransformationFailedResponse.md | 11 - .../TrackedTransformationPendingResponse.md | 11 - .../models/TrackedTransformationResponse.md | 17 - ...TrackedTransformationSuccessfulResponse.md | 11 - docs/v2/MediaSets/models/TransactionId.md | 12 - docs/v2/Models/Model.md | 112 - docs/v2/Models/ModelVersion.md | 212 - docs/v2/Models/models/CreateModelRequest.md | 12 - .../models/CreateModelVersionRequest.md | 14 - docs/v2/Models/models/DillModelFiles.md | 12 - .../models/ListModelVersionsResponse.md | 12 - docs/v2/Models/models/Model.md | 11 - docs/v2/Models/models/ModelApi.md | 13 - docs/v2/Models/models/ModelApiAnyType.md | 11 - docs/v2/Models/models/ModelApiArrayType.md | 12 - docs/v2/Models/models/ModelApiColumn.md | 13 - docs/v2/Models/models/ModelApiDataType.md | 26 - docs/v2/Models/models/ModelApiInput.md | 17 - docs/v2/Models/models/ModelApiMapType.md | 13 - docs/v2/Models/models/ModelApiOutput.md | 17 - .../v2/Models/models/ModelApiParameterType.md | 14 - .../v2/Models/models/ModelApiTabularFormat.md | 11 - docs/v2/Models/models/ModelApiTabularType.md | 15 - docs/v2/Models/models/ModelFiles.md | 13 - docs/v2/Models/models/ModelName.md | 11 - docs/v2/Models/models/ModelRid.md | 11 - docs/v2/Models/models/ModelVersion.md | 14 - docs/v2/Models/models/ModelVersionRid.md | 11 - docs/v2/Ontologies/Action.md | 256 - docs/v2/Ontologies/ActionType.md | 179 - docs/v2/Ontologies/ActionTypeFullMetadata.md | 124 - docs/v2/Ontologies/Attachment.md | 239 - docs/v2/Ontologies/AttachmentProperty.md | 299 - docs/v2/Ontologies/CipherTextProperty.md | 65 - docs/v2/Ontologies/LinkedObject.md | 204 - docs/v2/Ontologies/MediaReferenceProperty.md | 222 - docs/v2/Ontologies/ObjectType.md | 316 - docs/v2/Ontologies/Ontology.md | 232 - docs/v2/Ontologies/OntologyInterface.md | 693 - docs/v2/Ontologies/OntologyObject.md | 467 - docs/v2/Ontologies/OntologyObjectSet.md | 652 - docs/v2/Ontologies/OntologyTransaction.md | 65 - docs/v2/Ontologies/OntologyValueType.md | 112 - docs/v2/Ontologies/Query.md | 94 - docs/v2/Ontologies/QueryType.md | 131 - docs/v2/Ontologies/TimeSeriesPropertyV2.md | 234 - .../Ontologies/TimeSeriesValueBankProperty.md | 155 - .../v2/Ontologies/models/AbsoluteTimeRange.md | 13 - .../models/AbsoluteValuePropertyExpression.md | 13 - .../Ontologies/models/ActionExecutionTime.md | 12 - docs/v2/Ontologies/models/ActionLogicRule.md | 27 - .../models/ActionParameterArrayType.md | 12 - .../Ontologies/models/ActionParameterType.md | 34 - .../v2/Ontologies/models/ActionParameterV2.md | 14 - docs/v2/Ontologies/models/ActionResults.md | 16 - docs/v2/Ontologies/models/ActionRid.md | 11 - .../v2/Ontologies/models/ActionTypeApiName.md | 13 - .../models/ActionTypeFullMetadata.md | 12 - docs/v2/Ontologies/models/ActionTypeRid.md | 12 - docs/v2/Ontologies/models/ActionTypeV2.md | 18 - .../models/ActivePropertyTypeStatus.md | 13 - docs/v2/Ontologies/models/AddLink.md | 15 - docs/v2/Ontologies/models/AddLinkEdit.md | 15 - docs/v2/Ontologies/models/AddObject.md | 13 - docs/v2/Ontologies/models/AddObjectEdit.md | 13 - .../models/AddPropertyExpression.md | 13 - docs/v2/Ontologies/models/Affix.md | 12 - .../models/AggregateObjectSetRequestV2.md | 15 - .../models/AggregateObjectsRequestV2.md | 14 - .../models/AggregateObjectsResponseItemV2.md | 12 - .../models/AggregateObjectsResponseV2.md | 14 - .../Ontologies/models/AggregateTimeSeries.md | 12 - .../Ontologies/models/AggregationAccuracy.md | 11 - .../models/AggregationAccuracyRequest.md | 11 - .../models/AggregationDurationGroupingV2.md | 16 - .../models/AggregationExactGroupingV2.md | 15 - .../models/AggregationFixedWidthGroupingV2.md | 13 - .../Ontologies/models/AggregationGroupByV2.md | 18 - .../models/AggregationGroupKeyV2.md | 11 - .../models/AggregationGroupValueV2.md | 11 - .../models/AggregationMetricName.md | 11 - .../models/AggregationMetricResultV2.md | 12 - .../Ontologies/models/AggregationRangeV2.md | 12 - .../models/AggregationRangesGroupingV2.md | 13 - docs/v2/Ontologies/models/AggregationV2.md | 22 - docs/v2/Ontologies/models/AllOfRule.md | 15 - docs/v2/Ontologies/models/AndQueryV2.md | 12 - docs/v2/Ontologies/models/AnyOfRule.md | 13 - docs/v2/Ontologies/models/ApplyActionMode.md | 11 - .../Ontologies/models/ApplyActionOverrides.md | 12 - .../models/ApplyActionRequestOptions.md | 12 - .../Ontologies/models/ApplyActionRequestV2.md | 12 - .../models/ApplyActionWithOverridesRequest.md | 12 - ...plyReducersAndExtractMainValueLoadLevel.md | 11 - .../models/ApplyReducersLoadLevel.md | 11 - .../ApproximateDistinctAggregationV2.md | 14 - .../ApproximatePercentileAggregationV2.md | 15 - docs/v2/Ontologies/models/ArrayConstraint.md | 15 - .../models/ArrayEntryEvaluatedConstraint.md | 11 - .../models/ArrayEvaluatedConstraint.md | 12 - .../Ontologies/models/ArraySizeConstraint.md | 16 - .../models/ArtifactRepositoryRid.md | 11 - .../models/AttachmentMetadataResponse.md | 16 - docs/v2/Ontologies/models/AttachmentRid.md | 11 - docs/v2/Ontologies/models/AttachmentV2.md | 15 - docs/v2/Ontologies/models/AvgAggregationV2.md | 14 - .../models/BatchActionObjectEdit.md | 17 - .../models/BatchActionObjectEdits.md | 17 - .../Ontologies/models/BatchActionResults.md | 16 - .../models/BatchApplyActionRequestItem.md | 11 - .../models/BatchApplyActionRequestOptions.md | 11 - .../models/BatchApplyActionRequestV2.md | 12 - .../models/BatchApplyActionResponseV2.md | 11 - .../Ontologies/models/BatchReturnEditsMode.md | 11 - .../models/BatchedFunctionLogicRule.md | 13 - docs/v2/Ontologies/models/BlueprintIcon.md | 13 - docs/v2/Ontologies/models/BoundingBoxValue.md | 13 - docs/v2/Ontologies/models/CenterPoint.md | 13 - docs/v2/Ontologies/models/CenterPointTypes.md | 11 - .../ContainsAllTermsInOrderPrefixLastTerm.md | 18 - .../models/ContainsAllTermsInOrderQuery.md | 17 - .../models/ContainsAllTermsQuery.md | 18 - .../Ontologies/models/ContainsAnyTermQuery.md | 18 - docs/v2/Ontologies/models/ContainsQueryV2.md | 16 - .../Ontologies/models/CountAggregationV2.md | 13 - .../models/CountObjectsResponseV2.md | 11 - .../models/CreateInterfaceLinkLogicRule.md | 15 - .../models/CreateInterfaceLogicRule.md | 15 - .../models/CreateInterfaceObjectRule.md | 12 - .../Ontologies/models/CreateLinkLogicRule.md | 14 - docs/v2/Ontologies/models/CreateLinkRule.md | 15 - .../models/CreateObjectLogicRule.md | 14 - docs/v2/Ontologies/models/CreateObjectRule.md | 12 - .../models/CreateOrModifyObjectLogicRule.md | 14 - .../models/CreateOrModifyObjectLogicRuleV2.md | 14 - .../CreateTemporaryObjectSetRequestV2.md | 11 - .../CreateTemporaryObjectSetResponseV2.md | 11 - .../Ontologies/models/CurrentTimeArgument.md | 11 - .../Ontologies/models/CurrentUserArgument.md | 11 - docs/v2/Ontologies/models/DataValue.md | 39 - docs/v2/Ontologies/models/DatetimeFormat.md | 16 - .../models/DatetimeLocalizedFormat.md | 12 - .../models/DatetimeLocalizedFormatType.md | 16 - .../Ontologies/models/DatetimeStringFormat.md | 12 - docs/v2/Ontologies/models/DatetimeTimezone.md | 16 - .../models/DatetimeTimezoneStatic.md | 12 - .../Ontologies/models/DatetimeTimezoneUser.md | 11 - docs/v2/Ontologies/models/DecryptionResult.md | 12 - .../models/DeleteInterfaceLinkLogicRule.md | 15 - .../models/DeleteInterfaceObjectRule.md | 12 - docs/v2/Ontologies/models/DeleteLink.md | 15 - docs/v2/Ontologies/models/DeleteLinkEdit.md | 15 - .../Ontologies/models/DeleteLinkLogicRule.md | 14 - docs/v2/Ontologies/models/DeleteLinkRule.md | 15 - docs/v2/Ontologies/models/DeleteObject.md | 13 - docs/v2/Ontologies/models/DeleteObjectEdit.md | 13 - .../models/DeleteObjectLogicRule.md | 12 - docs/v2/Ontologies/models/DeleteObjectRule.md | 12 - .../models/DeprecatedPropertyTypeStatus.md | 16 - .../models/DerivedPropertyApiName.md | 12 - .../models/DerivedPropertyDefinition.md | 26 - .../models/DividePropertyExpression.md | 14 - .../DoesNotIntersectBoundingBoxQuery.md | 17 - .../models/DoesNotIntersectPolygonQuery.md | 17 - docs/v2/Ontologies/models/DoubleVector.md | 14 - .../v2/Ontologies/models/DurationBaseValue.md | 11 - .../Ontologies/models/DurationFormatStyle.md | 16 - .../v2/Ontologies/models/DurationPrecision.md | 14 - docs/v2/Ontologies/models/EntrySetType.md | 13 - docs/v2/Ontologies/models/EnumConstraint.md | 12 - docs/v2/Ontologies/models/EqualsQueryV2.md | 16 - .../models/ExactDistinctAggregationV2.md | 14 - .../models/ExamplePropertyTypeStatus.md | 13 - .../Ontologies/models/ExecuteQueryRequest.md | 11 - .../Ontologies/models/ExecuteQueryResponse.md | 11 - .../models/ExperimentalPropertyTypeStatus.md | 11 - docs/v2/Ontologies/models/ExtractDatePart.md | 13 - .../models/ExtractMainValueLoadLevel.md | 11 - .../models/ExtractPropertyExpression.md | 14 - docs/v2/Ontologies/models/FilterValue.md | 13 - .../v2/Ontologies/models/FixedValuesMapKey.md | 11 - .../v2/Ontologies/models/FunctionLogicRule.md | 14 - .../models/FunctionParameterName.md | 12 - docs/v2/Ontologies/models/FunctionRid.md | 12 - docs/v2/Ontologies/models/FunctionVersion.md | 13 - docs/v2/Ontologies/models/FuzzyV2.md | 11 - .../models/GetSelectedPropertyOperation.md | 16 - .../models/GreatestPropertyExpression.md | 13 - .../models/GroupMemberConstraint.md | 12 - docs/v2/Ontologies/models/GtQueryV2.md | 16 - docs/v2/Ontologies/models/GteQueryV2.md | 16 - .../Ontologies/models/HumanReadableFormat.md | 12 - docs/v2/Ontologies/models/Icon.md | 11 - docs/v2/Ontologies/models/InQuery.md | 17 - .../models/InterfaceDefinedPropertyType.md | 20 - .../v2/Ontologies/models/InterfaceLinkType.md | 19 - .../models/InterfaceLinkTypeApiName.md | 13 - .../models/InterfaceLinkTypeCardinality.md | 13 - .../InterfaceLinkTypeLinkedEntityApiName.md | 16 - .../Ontologies/models/InterfaceLinkTypeRid.md | 12 - .../InterfaceParameterPropertyArgument.md | 13 - .../models/InterfacePropertyApiName.md | 14 - ...facePropertyLocalPropertyImplementation.md | 12 - ...cePropertyReducedPropertyImplementation.md | 12 - ...erfacePropertyStructFieldImplementation.md | 12 - .../InterfacePropertyStructImplementation.md | 14 - ...facePropertyStructImplementationMapping.md | 13 - .../models/InterfacePropertyType.md | 18 - .../InterfacePropertyTypeImplementation.md | 19 - .../models/InterfacePropertyTypeRid.md | 12 - .../models/InterfaceSharedPropertyType.md | 21 - .../models/InterfaceToObjectTypeMapping.md | 11 - .../models/InterfaceToObjectTypeMappingV2.md | 12 - .../models/InterfaceToObjectTypeMappings.md | 11 - .../models/InterfaceToObjectTypeMappingsV2.md | 11 - docs/v2/Ontologies/models/InterfaceType.md | 23 - .../Ontologies/models/InterfaceTypeApiName.md | 13 - docs/v2/Ontologies/models/InterfaceTypeRid.md | 11 - .../models/IntersectsBoundingBoxQuery.md | 16 - .../models/IntersectsPolygonQuery.md | 16 - docs/v2/Ontologies/models/IntervalQuery.md | 16 - .../v2/Ontologies/models/IntervalQueryRule.md | 18 - docs/v2/Ontologies/models/IsNullQueryV2.md | 16 - docs/v2/Ontologies/models/KnownType.md | 16 - .../models/LeastPropertyExpression.md | 13 - docs/v2/Ontologies/models/LengthConstraint.md | 13 - docs/v2/Ontologies/models/LinkSideObject.md | 12 - docs/v2/Ontologies/models/LinkTypeApiName.md | 13 - docs/v2/Ontologies/models/LinkTypeId.md | 12 - docs/v2/Ontologies/models/LinkTypeRid.md | 11 - .../models/LinkTypeSideCardinality.md | 11 - docs/v2/Ontologies/models/LinkTypeSideV2.md | 19 - .../models/LinkedInterfaceTypeApiName.md | 12 - .../Ontologies/models/LinkedObjectLocator.md | 14 - .../models/LinkedObjectTypeApiName.md | 12 - docs/v2/Ontologies/models/LinksFromObject.md | 13 - .../ListActionTypesFullMetadataResponse.md | 12 - .../models/ListActionTypesResponseV2.md | 12 - .../models/ListAttachmentsResponseV2.md | 13 - .../ListInterfaceLinkedObjectsResponse.md | 12 - .../models/ListInterfaceTypesResponse.md | 12 - .../models/ListLinkedObjectsResponseV2.md | 12 - .../models/ListObjectTypesV2Response.md | 12 - .../models/ListObjectsForInterfaceResponse.md | 13 - .../models/ListObjectsResponseV2.md | 13 - .../models/ListOntologiesV2Response.md | 11 - .../models/ListOntologyValueTypesResponse.md | 11 - .../ListOutgoingInterfaceLinkTypesResponse.md | 12 - .../models/ListOutgoingLinkTypesResponseV2.md | 12 - .../models/ListQueryTypesResponseV2.md | 12 - .../models/LoadObjectSetLinksRequestV2.md | 14 - .../models/LoadObjectSetLinksResponseV2.md | 13 - .../models/LoadObjectSetRequestV2.md | 19 - .../models/LoadObjectSetResponseV2.md | 14 - ...adObjectSetV2MultipleObjectTypesRequest.md | 20 - ...dObjectSetV2MultipleObjectTypesResponse.md | 28 - ...adObjectSetV2ObjectsOrInterfacesRequest.md | 19 - ...dObjectSetV2ObjectsOrInterfacesResponse.md | 15 - .../models/LoadOntologyMetadataRequest.md | 15 - docs/v2/Ontologies/models/LogicRule.md | 22 - .../v2/Ontologies/models/LogicRuleArgument.md | 23 - docs/v2/Ontologies/models/LtQueryV2.md | 16 - docs/v2/Ontologies/models/LteQueryV2.md | 16 - docs/v2/Ontologies/models/MatchRule.md | 15 - docs/v2/Ontologies/models/MaxAggregationV2.md | 14 - docs/v2/Ontologies/models/MediaMetadata.md | 13 - docs/v2/Ontologies/models/MethodObjectSet.md | 11 - docs/v2/Ontologies/models/MinAggregationV2.md | 14 - .../models/ModifyInterfaceLogicRule.md | 14 - .../models/ModifyInterfaceObjectRule.md | 12 - docs/v2/Ontologies/models/ModifyObject.md | 13 - docs/v2/Ontologies/models/ModifyObjectEdit.md | 14 - .../models/ModifyObjectLogicRule.md | 14 - docs/v2/Ontologies/models/ModifyObjectRule.md | 12 - .../models/MultiplyPropertyExpression.md | 13 - .../models/NearestNeighborsQuery.md | 18 - .../models/NearestNeighborsQueryText.md | 13 - .../models/NegatePropertyExpression.md | 13 - ...stedInterfacePropertyTypeImplementation.md | 19 - .../models/NestedQueryAggregation.md | 12 - docs/v2/Ontologies/models/NotQueryV2.md | 12 - .../v2/Ontologies/models/NumberFormatAffix.md | 15 - .../Ontologies/models/NumberFormatCurrency.md | 16 - .../models/NumberFormatCurrencyStyle.md | 14 - .../models/NumberFormatCustomUnit.md | 16 - .../Ontologies/models/NumberFormatDuration.md | 17 - .../models/NumberFormatFixedValues.md | 14 - .../Ontologies/models/NumberFormatNotation.md | 18 - .../Ontologies/models/NumberFormatOptions.md | 26 - .../v2/Ontologies/models/NumberFormatRatio.md | 17 - .../v2/Ontologies/models/NumberFormatScale.md | 17 - .../Ontologies/models/NumberFormatStandard.md | 14 - .../models/NumberFormatStandardUnit.md | 16 - docs/v2/Ontologies/models/NumberRatioType.md | 16 - .../Ontologies/models/NumberRoundingMode.md | 16 - docs/v2/Ontologies/models/NumberScaleType.md | 16 - docs/v2/Ontologies/models/ObjectEdit.md | 19 - docs/v2/Ontologies/models/ObjectEdits.md | 17 - .../models/ObjectParameterPropertyArgument.md | 13 - .../Ontologies/models/ObjectPropertyType.md | 37 - .../models/ObjectPropertyValueConstraint.md | 12 - .../models/ObjectQueryResultConstraint.md | 12 - docs/v2/Ontologies/models/ObjectRid.md | 12 - docs/v2/Ontologies/models/ObjectSet.md | 29 - .../models/ObjectSetAsBaseObjectTypesType.md | 14 - .../Ontologies/models/ObjectSetAsTypeType.md | 16 - .../v2/Ontologies/models/ObjectSetBaseType.md | 12 - .../Ontologies/models/ObjectSetFilterType.md | 13 - .../models/ObjectSetInterfaceBaseType.md | 13 - .../ObjectSetInterfaceLinkSearchAroundType.md | 13 - .../models/ObjectSetIntersectionType.md | 12 - .../models/ObjectSetMethodInputType.md | 14 - .../models/ObjectSetNearestNeighborsType.md | 25 - .../models/ObjectSetReferenceType.md | 12 - docs/v2/Ontologies/models/ObjectSetRid.md | 11 - .../models/ObjectSetSearchAroundType.md | 13 - .../Ontologies/models/ObjectSetStaticType.md | 12 - .../models/ObjectSetSubtractType.md | 12 - .../Ontologies/models/ObjectSetUnionType.md | 12 - .../models/ObjectSetWithPropertiesType.md | 16 - .../v2/Ontologies/models/ObjectTypeApiName.md | 13 - docs/v2/Ontologies/models/ObjectTypeEdits.md | 12 - .../models/ObjectTypeFullMetadata.md | 15 - docs/v2/Ontologies/models/ObjectTypeId.md | 11 - .../ObjectTypeInterfaceImplementation.md | 13 - docs/v2/Ontologies/models/ObjectTypeRid.md | 11 - docs/v2/Ontologies/models/ObjectTypeV2.md | 21 - .../Ontologies/models/ObjectTypeVisibility.md | 12 - docs/v2/Ontologies/models/OneOfConstraint.md | 14 - docs/v2/Ontologies/models/OntologyApiName.md | 11 - .../v2/Ontologies/models/OntologyArrayType.md | 12 - docs/v2/Ontologies/models/OntologyDataType.md | 37 - .../Ontologies/models/OntologyFullMetadata.md | 18 - .../Ontologies/models/OntologyIdentifier.md | 13 - .../models/OntologyInterfaceObjectSetType.md | 12 - .../models/OntologyInterfaceObjectType.md | 12 - docs/v2/Ontologies/models/OntologyMapType.md | 13 - .../models/OntologyObjectArrayType.md | 13 - .../models/OntologyObjectArrayTypeReducer.md | 12 - ...logyObjectArrayTypeReducerSortDirection.md | 11 - .../models/OntologyObjectSetType.md | 13 - .../Ontologies/models/OntologyObjectType.md | 13 - .../models/OntologyObjectTypeReferenceType.md | 11 - docs/v2/Ontologies/models/OntologyObjectV2.md | 11 - docs/v2/Ontologies/models/OntologyRid.md | 13 - docs/v2/Ontologies/models/OntologySetType.md | 12 - .../Ontologies/models/OntologyStructField.md | 13 - .../Ontologies/models/OntologyStructType.md | 12 - .../models/OntologyTransactionId.md | 11 - docs/v2/Ontologies/models/OntologyV2.md | 14 - .../v2/Ontologies/models/OntologyValueType.md | 18 - docs/v2/Ontologies/models/OrQueryV2.md | 12 - docs/v2/Ontologies/models/OrderBy.md | 21 - docs/v2/Ontologies/models/OrderByDirection.md | 11 - .../models/ParameterEvaluatedConstraint.md | 42 - .../models/ParameterEvaluationResult.md | 13 - docs/v2/Ontologies/models/ParameterId.md | 13 - .../Ontologies/models/ParameterIdArgument.md | 12 - docs/v2/Ontologies/models/ParameterOption.md | 13 - docs/v2/Ontologies/models/Plaintext.md | 11 - docs/v2/Ontologies/models/PolygonValue.md | 11 - .../models/PostTransactionEditsRequest.md | 11 - .../models/PostTransactionEditsResponse.md | 10 - docs/v2/Ontologies/models/PreciseDuration.md | 13 - docs/v2/Ontologies/models/PreciseTimeUnit.md | 15 - .../models/PrefixOnLastTokenRule.md | 14 - docs/v2/Ontologies/models/PrimaryKeyValue.md | 11 - docs/v2/Ontologies/models/PropertyApiName.md | 13 - .../models/PropertyApiNameSelector.md | 12 - .../models/PropertyBooleanFormattingRule.md | 13 - .../models/PropertyDateFormattingRule.md | 12 - docs/v2/Ontologies/models/PropertyFilter.md | 36 - docs/v2/Ontologies/models/PropertyId.md | 13 - .../Ontologies/models/PropertyIdentifier.md | 17 - .../models/PropertyImplementation.md | 12 - .../models/PropertyKnownTypeFormattingRule.md | 12 - .../v2/Ontologies/models/PropertyLoadLevel.md | 21 - .../models/PropertyNumberFormattingRule.md | 12 - .../PropertyNumberFormattingRuleType.md | 23 - ...tyOrStructFieldOfPropertyImplementation.md | 16 - .../models/PropertyTimestampFormattingRule.md | 13 - .../Ontologies/models/PropertyTypeApiName.md | 11 - .../models/PropertyTypeReference.md | 12 - .../PropertyTypeReferenceOrStringConstant.md | 16 - docs/v2/Ontologies/models/PropertyTypeRid.md | 11 - .../Ontologies/models/PropertyTypeStatus.md | 19 - .../models/PropertyTypeVisibility.md | 12 - docs/v2/Ontologies/models/PropertyV2.md | 18 - docs/v2/Ontologies/models/PropertyValue.md | 37 - .../models/PropertyValueEscapedString.md | 11 - .../models/PropertyValueFormattingRule.md | 28 - .../models/PropertyWithLoadLevelSelector.md | 16 - docs/v2/Ontologies/models/QueryAggregation.md | 12 - .../models/QueryAggregationKeyType.md | 22 - .../models/QueryAggregationRangeSubType.md | 19 - .../models/QueryAggregationRangeType.md | 12 - .../models/QueryAggregationValueType.md | 18 - docs/v2/Ontologies/models/QueryApiName.md | 12 - docs/v2/Ontologies/models/QueryArrayType.md | 12 - docs/v2/Ontologies/models/QueryDataType.md | 37 - docs/v2/Ontologies/models/QueryParameterV2.md | 12 - .../models/QueryRuntimeErrorParameter.md | 11 - docs/v2/Ontologies/models/QuerySetType.md | 12 - docs/v2/Ontologies/models/QueryStructField.md | 12 - docs/v2/Ontologies/models/QueryStructType.md | 12 - .../QueryThreeDimensionalAggregation.md | 11 - .../models/QueryTwoDimensionalAggregation.md | 11 - docs/v2/Ontologies/models/QueryTypeV2.md | 17 - docs/v2/Ontologies/models/QueryUnionType.md | 12 - docs/v2/Ontologies/models/RangeConstraint.md | 16 - docs/v2/Ontologies/models/RangesConstraint.md | 13 - docs/v2/Ontologies/models/RegexConstraint.md | 13 - docs/v2/Ontologies/models/RegexQuery.md | 17 - .../models/RelativeDateRangeBound.md | 11 - .../models/RelativeDateRangeQuery.md | 18 - .../Ontologies/models/RelativePointInTime.md | 13 - docs/v2/Ontologies/models/RelativeTime.md | 14 - .../v2/Ontologies/models/RelativeTimeRange.md | 14 - .../Ontologies/models/RelativeTimeRelation.md | 11 - .../models/RelativeTimeSeriesTimeUnit.md | 17 - docs/v2/Ontologies/models/RelativeTimeUnit.md | 13 - .../models/ResolvedInterfacePropertyType.md | 20 - docs/v2/Ontologies/models/ReturnEditsMode.md | 12 - docs/v2/Ontologies/models/RidConstraint.md | 11 - .../models/RollingAggregateWindowPoints.md | 12 - docs/v2/Ontologies/models/SdkPackageName.md | 11 - docs/v2/Ontologies/models/SdkPackageRid.md | 11 - docs/v2/Ontologies/models/SdkVersion.md | 11 - .../v2/Ontologies/models/SearchJsonQueryV2.md | 41 - .../SearchObjectsForInterfaceRequest.md | 21 - .../models/SearchObjectsRequestV2.md | 18 - .../models/SearchObjectsResponseV2.md | 13 - .../v2/Ontologies/models/SearchOrderByType.md | 11 - docs/v2/Ontologies/models/SearchOrderByV2.md | 12 - docs/v2/Ontologies/models/SearchOrderingV2.md | 12 - .../models/SelectedPropertyApiName.md | 30 - ...dPropertyApproximateDistinctAggregation.md | 12 - ...ropertyApproximatePercentileAggregation.md | 13 - .../models/SelectedPropertyAvgAggregation.md | 12 - .../SelectedPropertyCollectListAggregation.md | 20 - .../SelectedPropertyCollectSetAggregation.md | 20 - .../SelectedPropertyCountAggregation.md | 11 - ...electedPropertyExactDistinctAggregation.md | 13 - .../models/SelectedPropertyExpression.md | 13 - .../models/SelectedPropertyMaxAggregation.md | 12 - .../models/SelectedPropertyMinAggregation.md | 12 - .../models/SelectedPropertyOperation.md | 26 - .../models/SelectedPropertySumAggregation.md | 12 - .../Ontologies/models/SharedPropertyType.md | 17 - .../models/SharedPropertyTypeApiName.md | 13 - .../models/SharedPropertyTypeRid.md | 12 - docs/v2/Ontologies/models/StartsWithQuery.md | 17 - docs/v2/Ontologies/models/StaticArgument.md | 12 - .../models/StreamTimeSeriesPointsRequest.md | 12 - .../models/StreamTimeSeriesValuesRequest.md | 11 - .../models/StreamingOutputFormat.md | 13 - docs/v2/Ontologies/models/StringConstant.md | 12 - .../models/StringLengthConstraint.md | 17 - .../models/StringRegexMatchConstraint.md | 14 - docs/v2/Ontologies/models/StructConstraint.md | 12 - .../models/StructEvaluatedConstraint.md | 12 - .../Ontologies/models/StructFieldApiName.md | 11 - .../Ontologies/models/StructFieldArgument.md | 17 - .../models/StructFieldEvaluatedConstraint.md | 32 - .../models/StructFieldEvaluationResult.md | 13 - .../StructFieldOfPropertyImplementation.md | 13 - .../Ontologies/models/StructFieldSelector.md | 16 - docs/v2/Ontologies/models/StructFieldType.md | 13 - .../Ontologies/models/StructFieldTypeRid.md | 11 - .../StructListParameterFieldArgument.md | 13 - .../models/StructParameterFieldApiName.md | 12 - .../models/StructParameterFieldArgument.md | 13 - docs/v2/Ontologies/models/StructType.md | 13 - .../Ontologies/models/StructTypeMainValue.md | 12 - .../models/SubmissionCriteriaEvaluation.md | 15 - .../models/SubtractPropertyExpression.md | 14 - docs/v2/Ontologies/models/SumAggregationV2.md | 14 - .../models/SyncApplyActionResponseV2.md | 12 - .../SynchronousWebhookOutputArgument.md | 12 - .../models/ThreeDimensionalAggregation.md | 13 - docs/v2/Ontologies/models/TimeCodeFormat.md | 11 - docs/v2/Ontologies/models/TimeRange.md | 16 - .../models/TimeSeriesAggregationMethod.md | 21 - .../models/TimeSeriesAggregationStrategy.md | 21 - .../models/TimeSeriesCumulativeAggregate.md | 13 - .../models/TimeSeriesPeriodicAggregate.md | 23 - docs/v2/Ontologies/models/TimeSeriesPoint.md | 13 - .../models/TimeSeriesRollingAggregate.md | 12 - .../TimeSeriesRollingAggregateWindow.md | 22 - .../Ontologies/models/TimeSeriesWindowType.md | 11 - docs/v2/Ontologies/models/TimeUnit.md | 18 - docs/v2/Ontologies/models/TimeseriesEntry.md | 13 - docs/v2/Ontologies/models/TransactionEdit.md | 19 - .../models/TwoDimensionalAggregation.md | 13 - .../models/UnevaluableConstraint.md | 13 - .../models/UniqueIdentifierArgument.md | 12 - .../models/UniqueIdentifierLinkId.md | 12 - .../models/UniqueIdentifierValue.md | 13 - docs/v2/Ontologies/models/UuidConstraint.md | 11 - .../models/ValidateActionResponseV2.md | 13 - docs/v2/Ontologies/models/ValidationResult.md | 12 - docs/v2/Ontologies/models/ValueType.md | 34 - docs/v2/Ontologies/models/ValueTypeApiName.md | 11 - .../Ontologies/models/ValueTypeArrayType.md | 12 - .../Ontologies/models/ValueTypeConstraint.md | 23 - .../Ontologies/models/ValueTypeDecimalType.md | 11 - .../Ontologies/models/ValueTypeFieldType.md | 32 - docs/v2/Ontologies/models/ValueTypeMapType.md | 13 - .../models/ValueTypeOptionalType.md | 12 - .../models/ValueTypeReferenceType.md | 11 - docs/v2/Ontologies/models/ValueTypeRid.md | 11 - docs/v2/Ontologies/models/ValueTypeStatus.md | 11 - .../Ontologies/models/ValueTypeStructField.md | 12 - .../Ontologies/models/ValueTypeStructType.md | 12 - .../Ontologies/models/ValueTypeUnionType.md | 12 - .../models/VersionedQueryTypeApiName.md | 17 - docs/v2/Ontologies/models/WildcardQuery.md | 16 - .../models/WithinBoundingBoxPoint.md | 11 - .../models/WithinBoundingBoxQuery.md | 17 - .../models/WithinDistanceOfQuery.md | 17 - .../Ontologies/models/WithinPolygonQuery.md | 17 - docs/v2/Orchestration/Build.md | 353 - docs/v2/Orchestration/Job.md | 109 - docs/v2/Orchestration/Schedule.md | 586 - docs/v2/Orchestration/ScheduleRun.md | 5 - docs/v2/Orchestration/ScheduleVersion.md | 109 - .../v2/Orchestration/models/AbortOnFailure.md | 13 - docs/v2/Orchestration/models/Action.md | 18 - .../models/AffectedResourcesResponse.md | 11 - docs/v2/Orchestration/models/AndTrigger.md | 12 - docs/v2/Orchestration/models/Build.md | 21 - docs/v2/Orchestration/models/BuildStatus.md | 13 - docs/v2/Orchestration/models/BuildTarget.md | 17 - docs/v2/Orchestration/models/BuildableRid.md | 13 - .../Orchestration/models/ConnectingTarget.md | 16 - .../models/CreateBuildRequest.md | 18 - .../models/CreateScheduleRequest.md | 15 - .../models/CreateScheduleRequestAction.md | 18 - .../CreateScheduleRequestBuildTarget.md | 17 - .../CreateScheduleRequestConnectingTarget.md | 14 - .../CreateScheduleRequestManualTarget.md | 12 - .../CreateScheduleRequestProjectScope.md | 12 - .../models/CreateScheduleRequestScopeMode.md | 16 - .../CreateScheduleRequestUpstreamTarget.md | 13 - .../models/CreateScheduleRequestUserScope.md | 11 - .../v2/Orchestration/models/CronExpression.md | 13 - .../Orchestration/models/DatasetJobOutput.md | 13 - .../models/DatasetUpdatedTrigger.md | 15 - .../Orchestration/models/FallbackBranches.md | 13 - docs/v2/Orchestration/models/ForceBuild.md | 11 - .../models/GetBuildsBatchRequestElement.md | 11 - .../models/GetBuildsBatchResponse.md | 11 - .../models/GetJobsBatchRequestElement.md | 11 - .../models/GetJobsBatchResponse.md | 11 - .../models/GetSchedulesBatchRequestElement.md | 11 - .../models/GetSchedulesBatchResponse.md | 11 - docs/v2/Orchestration/models/Job.md | 17 - docs/v2/Orchestration/models/JobOutput.md | 17 - .../v2/Orchestration/models/JobStartedTime.md | 11 - docs/v2/Orchestration/models/JobStatus.md | 15 - .../models/JobSucceededTrigger.md | 15 - .../models/ListJobsOfBuildResponse.md | 12 - .../models/ListRunsOfScheduleResponse.md | 12 - docs/v2/Orchestration/models/ManualTarget.md | 12 - docs/v2/Orchestration/models/ManualTrigger.md | 12 - .../models/MediaSetUpdatedTrigger.md | 17 - .../Orchestration/models/NewLogicTrigger.md | 15 - .../models/NotificationsEnabled.md | 13 - docs/v2/Orchestration/models/OrTrigger.md | 12 - docs/v2/Orchestration/models/ProjectScope.md | 13 - .../models/ReplaceScheduleRequest.md | 15 - .../models/ReplaceScheduleRequestAction.md | 18 - .../ReplaceScheduleRequestBuildTarget.md | 17 - .../ReplaceScheduleRequestConnectingTarget.md | 14 - .../ReplaceScheduleRequestManualTarget.md | 12 - .../ReplaceScheduleRequestProjectScope.md | 12 - .../models/ReplaceScheduleRequestScopeMode.md | 16 - .../ReplaceScheduleRequestUpstreamTarget.md | 13 - .../models/ReplaceScheduleRequestUserScope.md | 11 - .../models/RetryBackoffDuration.md | 12 - docs/v2/Orchestration/models/RetryCount.md | 14 - docs/v2/Orchestration/models/Schedule.md | 22 - .../v2/Orchestration/models/SchedulePaused.md | 11 - docs/v2/Orchestration/models/ScheduleRun.md | 16 - .../Orchestration/models/ScheduleRunError.md | 13 - .../models/ScheduleRunErrorName.md | 16 - .../models/ScheduleRunIgnored.md | 12 - .../Orchestration/models/ScheduleRunResult.md | 19 - .../v2/Orchestration/models/ScheduleRunRid.md | 11 - .../models/ScheduleRunSubmitted.md | 12 - .../models/ScheduleSucceededTrigger.md | 14 - .../Orchestration/models/ScheduleVersion.md | 17 - .../models/ScheduleVersionRid.md | 11 - docs/v2/Orchestration/models/ScopeMode.md | 16 - .../models/SearchBuildsAndFilter.md | 12 - .../models/SearchBuildsEqualsFilter.md | 13 - .../models/SearchBuildsEqualsFilterField.md | 13 - .../models/SearchBuildsFilter.md | 20 - .../models/SearchBuildsGteFilter.md | 13 - .../models/SearchBuildsGteFilterField.md | 11 - .../models/SearchBuildsLtFilter.md | 13 - .../models/SearchBuildsLtFilterField.md | 11 - .../models/SearchBuildsNotFilter.md | 12 - .../models/SearchBuildsOrFilter.md | 12 - .../models/SearchBuildsOrderBy.md | 11 - .../models/SearchBuildsOrderByField.md | 11 - .../models/SearchBuildsOrderByItem.md | 12 - .../models/SearchBuildsRequest.md | 14 - .../models/SearchBuildsResponse.md | 12 - .../models/TableUpdatedTrigger.md | 15 - docs/v2/Orchestration/models/TimeTrigger.md | 13 - .../models/TransactionalMediaSetJobOutput.md | 13 - docs/v2/Orchestration/models/Trigger.md | 24 - .../v2/Orchestration/models/UpstreamTarget.md | 13 - docs/v2/Orchestration/models/UserScope.md | 13 - docs/v2/SqlQueries/SqlQuery.md | 246 - .../SqlQueries/models/CanceledQueryStatus.md | 11 - .../models/ExecuteSqlQueryRequest.md | 12 - .../v2/SqlQueries/models/FailedQueryStatus.md | 12 - docs/v2/SqlQueries/models/QueryStatus.md | 18 - .../SqlQueries/models/RunningQueryStatus.md | 12 - docs/v2/SqlQueries/models/SqlQueryId.md | 11 - .../SqlQueries/models/SucceededQueryStatus.md | 12 - docs/v2/Streams/Dataset.md | 92 - docs/v2/Streams/Stream.md | 416 - docs/v2/Streams/models/Compressed.md | 15 - docs/v2/Streams/models/CreateStreamRequest.md | 15 - .../models/CreateStreamRequestStreamSchema.md | 13 - .../models/CreateStreamingDatasetRequest.md | 17 - docs/v2/Streams/models/Dataset.md | 13 - docs/v2/Streams/models/PartitionsCount.md | 12 - .../models/PublishRecordToStreamRequest.md | 12 - .../models/PublishRecordsToStreamRequest.md | 12 - docs/v2/Streams/models/Record.md | 12 - docs/v2/Streams/models/ResetStreamRequest.md | 14 - docs/v2/Streams/models/Stream.md | 16 - docs/v2/Streams/models/StreamType.md | 22 - docs/v2/Streams/models/ViewRid.md | 12 - .../ThirdPartyApplication.md | 60 - docs/v2/ThirdPartyApplications/Version.md | 305 - docs/v2/ThirdPartyApplications/Website.md | 164 - .../models/DeployWebsiteRequest.md | 11 - .../models/ListVersionsResponse.md | 12 - .../models/Subdomain.md | 11 - .../models/ThirdPartyApplication.md | 11 - .../models/ThirdPartyApplicationRid.md | 11 - .../ThirdPartyApplications/models/Version.md | 11 - .../models/VersionVersion.md | 11 - .../ThirdPartyApplications/models/Website.md | 12 - docs/v2/Widgets/DevModeSettings.md | 325 - docs/v2/Widgets/Release.md | 177 - docs/v2/Widgets/Repository.md | 115 - docs/v2/Widgets/WidgetSet.md | 56 - docs/v2/Widgets/models/DevModeSettings.md | 12 - docs/v2/Widgets/models/DevModeStatus.md | 12 - docs/v2/Widgets/models/FilePath.md | 11 - .../v2/Widgets/models/ListReleasesResponse.md | 12 - docs/v2/Widgets/models/Release.md | 14 - docs/v2/Widgets/models/ReleaseLocator.md | 12 - docs/v2/Widgets/models/ReleaseVersion.md | 11 - docs/v2/Widgets/models/Repository.md | 12 - docs/v2/Widgets/models/RepositoryRid.md | 11 - docs/v2/Widgets/models/RepositoryVersion.md | 11 - docs/v2/Widgets/models/ScriptEntrypoint.md | 12 - docs/v2/Widgets/models/ScriptType.md | 11 - .../SetWidgetSetDevModeSettingsByIdRequest.md | 12 - .../SetWidgetSetDevModeSettingsRequest.md | 12 - .../v2/Widgets/models/StylesheetEntrypoint.md | 11 - .../Widgets/models/WidgetDevModeSettings.md | 12 - docs/v2/Widgets/models/WidgetId.md | 18 - docs/v2/Widgets/models/WidgetRid.md | 11 - docs/v2/Widgets/models/WidgetSet.md | 12 - .../models/WidgetSetDevModeSettings.md | 12 - .../models/WidgetSetDevModeSettingsById.md | 12 - docs/v2/Widgets/models/WidgetSetRid.md | 11 - foundry_sdk/__init__.py | 115 - foundry_sdk/_core/__init__.py | 46 - foundry_sdk/_core/api_client.py | 836 -- foundry_sdk/_core/auth_utils.py | 52 - foundry_sdk/_core/client_init_helpers.py | 54 - .../_core/compute_module_pipeline_auth.py | 76 - foundry_sdk/_core/confidential_client_auth.py | 96 - foundry_sdk/_core/config.py | 66 - .../_core/context_and_environment_vars.py | 65 - foundry_sdk/_core/http_client.py | 180 - foundry_sdk/_core/model_base.py | 98 - foundry_sdk/_core/oauth_utils.py | 408 - foundry_sdk/_core/page_iterator.py | 144 - foundry_sdk/_core/public_client_auth.py | 110 - foundry_sdk/_core/resource_iterator.py | 96 - foundry_sdk/_core/table.py | 82 - foundry_sdk/_core/user_token_auth_client.py | 55 - foundry_sdk/_core/utils.py | 123 - foundry_sdk/_errors/__init__.py | 41 - foundry_sdk/_errors/api_not_found.py | 23 - foundry_sdk/_errors/connection_error.py | 24 - .../_errors/environment_not_configured.py | 21 - foundry_sdk/_errors/not_authenticated.py | 20 - foundry_sdk/_errors/palantir_exception.py | 17 - foundry_sdk/_errors/palantir_qos_exception.py | 34 - foundry_sdk/_errors/palantir_rpc_exception.py | 79 - foundry_sdk/_errors/sdk_internal_error.py | 72 - foundry_sdk/_errors/stream_error.py | 20 - foundry_sdk/_errors/timeout_error.py | 33 - foundry_sdk/_errors/utils.py | 64 - foundry_sdk/_versions.py | 20 - foundry_sdk/py.typed | 0 foundry_sdk/v1/__init__.py | 22 - foundry_sdk/v1/cli.py | 1610 --- foundry_sdk/v1/client.py | 84 - foundry_sdk/v1/core/errors.py | 204 - foundry_sdk/v1/core/models.py | 279 - foundry_sdk/v1/datasets/__init__.py | 22 - foundry_sdk/v1/datasets/_client.py | 69 - foundry_sdk/v1/datasets/branch.py | 559 - foundry_sdk/v1/datasets/dataset.py | 983 -- foundry_sdk/v1/datasets/errors.py | 457 - foundry_sdk/v1/datasets/file.py | 1108 -- foundry_sdk/v1/datasets/models.py | 143 - foundry_sdk/v1/datasets/transaction.py | 570 - foundry_sdk/v1/geo/errors.py | 16 - foundry_sdk/v1/geo/models.py | 22 - foundry_sdk/v1/ontologies/__init__.py | 22 - foundry_sdk/v1/ontologies/_client.py | 121 - foundry_sdk/v1/ontologies/action.py | 463 - foundry_sdk/v1/ontologies/action_type.py | 300 - foundry_sdk/v1/ontologies/attachment.py | 388 - foundry_sdk/v1/ontologies/errors.py | 2482 ---- foundry_sdk/v1/ontologies/models.py | 1702 --- foundry_sdk/v1/ontologies/object_type.py | 536 - foundry_sdk/v1/ontologies/ontology.py | 318 - foundry_sdk/v1/ontologies/ontology_object.py | 994 -- foundry_sdk/v1/ontologies/query.py | 228 - foundry_sdk/v1/ontologies/query_type.py | 300 - foundry_sdk/v2/__init__.py | 22 - foundry_sdk/v2/admin/__init__.py | 22 - foundry_sdk/v2/admin/_client.py | 149 - .../v2/admin/authentication_provider.py | 641 - foundry_sdk/v2/admin/enrollment.py | 366 - .../v2/admin/enrollment_role_assignment.py | 451 - foundry_sdk/v2/admin/errors.py | 1101 -- foundry_sdk/v2/admin/group.py | 794 -- foundry_sdk/v2/admin/group_member.py | 460 - foundry_sdk/v2/admin/group_membership.py | 236 - .../group_membership_expiration_policy.py | 329 - foundry_sdk/v2/admin/group_provider_info.py | 337 - foundry_sdk/v2/admin/host.py | 226 - foundry_sdk/v2/admin/marking.py | 766 -- foundry_sdk/v2/admin/marking_category.py | 312 - foundry_sdk/v2/admin/marking_member.py | 449 - .../v2/admin/marking_role_assignment.py | 447 - foundry_sdk/v2/admin/models.py | 884 -- foundry_sdk/v2/admin/organization.py | 642 - .../v2/admin/organization_role_assignment.py | 443 - foundry_sdk/v2/admin/role.py | 302 - foundry_sdk/v2/admin/user.py | 1094 -- foundry_sdk/v2/admin/user_provider_info.py | 345 - foundry_sdk/v2/aip_agents/__init__.py | 22 - foundry_sdk/v2/aip_agents/_client.py | 69 - foundry_sdk/v2/aip_agents/agent.py | 376 - foundry_sdk/v2/aip_agents/agent_version.py | 341 - foundry_sdk/v2/aip_agents/content.py | 213 - foundry_sdk/v2/aip_agents/errors.py | 647 - foundry_sdk/v2/aip_agents/models.py | 722 - foundry_sdk/v2/aip_agents/session.py | 1542 --- foundry_sdk/v2/aip_agents/session_trace.py | 227 - foundry_sdk/v2/audit/__init__.py | 22 - foundry_sdk/v2/audit/_client.py | 69 - foundry_sdk/v2/audit/errors.py | 72 - foundry_sdk/v2/audit/log_file.py | 332 - foundry_sdk/v2/audit/models.py | 46 - foundry_sdk/v2/audit/organization.py | 111 - foundry_sdk/v2/cli.py | 11411 ---------------- foundry_sdk/v2/client.py | 154 - foundry_sdk/v2/connectivity/__init__.py | 22 - foundry_sdk/v2/connectivity/_client.py | 69 - foundry_sdk/v2/connectivity/connection.py | 1075 -- foundry_sdk/v2/connectivity/errors.py | 780 -- foundry_sdk/v2/connectivity/file_import.py | 937 -- foundry_sdk/v2/connectivity/models.py | 2268 --- foundry_sdk/v2/connectivity/table_import.py | 921 -- foundry_sdk/v2/connectivity/virtual_table.py | 254 - foundry_sdk/v2/core/errors.py | 387 - foundry_sdk/v2/core/models.py | 1037 -- foundry_sdk/v2/data_health/__init__.py | 22 - foundry_sdk/v2/data_health/_client.py | 82 - foundry_sdk/v2/data_health/check.py | 591 - foundry_sdk/v2/data_health/check_report.py | 201 - foundry_sdk/v2/data_health/errors.py | 253 - foundry_sdk/v2/data_health/models.py | 732 - foundry_sdk/v2/datasets/__init__.py | 22 - foundry_sdk/v2/datasets/_client.py | 82 - foundry_sdk/v2/datasets/branch.py | 710 - foundry_sdk/v2/datasets/dataset.py | 1550 --- foundry_sdk/v2/datasets/errors.py | 974 -- foundry_sdk/v2/datasets/file.py | 1058 -- foundry_sdk/v2/datasets/models.py | 466 - foundry_sdk/v2/datasets/transaction.py | 823 -- foundry_sdk/v2/datasets/view.py | 1009 -- foundry_sdk/v2/filesystem/__init__.py | 22 - foundry_sdk/v2/filesystem/_client.py | 108 - foundry_sdk/v2/filesystem/errors.py | 1139 -- foundry_sdk/v2/filesystem/folder.py | 598 - foundry_sdk/v2/filesystem/models.py | 668 - foundry_sdk/v2/filesystem/project.py | 1121 -- foundry_sdk/v2/filesystem/resource.py | 1417 -- foundry_sdk/v2/filesystem/resource_role.py | 440 - foundry_sdk/v2/filesystem/space.py | 763 -- foundry_sdk/v2/functions/__init__.py | 22 - foundry_sdk/v2/functions/_client.py | 82 - foundry_sdk/v2/functions/errors.py | 315 - foundry_sdk/v2/functions/models.py | 653 - foundry_sdk/v2/functions/query.py | 720 - foundry_sdk/v2/functions/value_type.py | 220 - foundry_sdk/v2/functions/version_id.py | 207 - foundry_sdk/v2/geo/errors.py | 16 - foundry_sdk/v2/geo/models.py | 226 - foundry_sdk/v2/language_models/__init__.py | 22 - foundry_sdk/v2/language_models/_client.py | 82 - .../v2/language_models/anthropic_model.py | 297 - foundry_sdk/v2/language_models/errors.py | 90 - foundry_sdk/v2/language_models/models.py | 496 - .../v2/language_models/open_ai_model.py | 233 - foundry_sdk/v2/media_sets/__init__.py | 22 - foundry_sdk/v2/media_sets/_client.py | 69 - foundry_sdk/v2/media_sets/errors.py | 274 - foundry_sdk/v2/media_sets/media_set.py | 1486 -- foundry_sdk/v2/media_sets/models.py | 129 - foundry_sdk/v2/models/__init__.py | 22 - foundry_sdk/v2/models/_client.py | 69 - foundry_sdk/v2/models/errors.py | 123 - foundry_sdk/v2/models/model.py | 333 - foundry_sdk/v2/models/model_version.py | 457 - foundry_sdk/v2/models/models.py | 219 - foundry_sdk/v2/ontologies/__init__.py | 22 - foundry_sdk/v2/ontologies/_client.py | 312 - foundry_sdk/v2/ontologies/action.py | 566 - foundry_sdk/v2/ontologies/action_type.py | 424 - .../ontologies/action_type_full_metadata.py | 318 - foundry_sdk/v2/ontologies/attachment.py | 522 - .../v2/ontologies/attachment_property.py | 651 - .../v2/ontologies/cipher_text_property.py | 203 - foundry_sdk/v2/ontologies/errors.py | 2482 ---- foundry_sdk/v2/ontologies/linked_object.py | 482 - .../v2/ontologies/media_reference_property.py | 514 - foundry_sdk/v2/ontologies/models.py | 5170 ------- foundry_sdk/v2/ontologies/object_type.py | 708 - foundry_sdk/v2/ontologies/ontology.py | 577 - .../v2/ontologies/ontology_interface.py | 1448 -- foundry_sdk/v2/ontologies/ontology_object.py | 945 -- .../v2/ontologies/ontology_object_set.py | 1353 -- .../v2/ontologies/ontology_transaction.py | 210 - .../v2/ontologies/ontology_value_type.py | 296 - foundry_sdk/v2/ontologies/query.py | 266 - foundry_sdk/v2/ontologies/query_type.py | 326 - .../v2/ontologies/time_series_property_v2.py | 513 - .../time_series_value_bank_property.py | 369 - foundry_sdk/v2/orchestration/__init__.py | 22 - foundry_sdk/v2/orchestration/_client.py | 123 - foundry_sdk/v2/orchestration/build.py | 757 - foundry_sdk/v2/orchestration/errors.py | 574 - foundry_sdk/v2/orchestration/job.py | 302 - foundry_sdk/v2/orchestration/models.py | 963 -- foundry_sdk/v2/orchestration/schedule.py | 1162 -- foundry_sdk/v2/orchestration/schedule_run.py | 90 - .../v2/orchestration/schedule_version.py | 293 - foundry_sdk/v2/sql_queries/__init__.py | 22 - foundry_sdk/v2/sql_queries/_client.py | 69 - foundry_sdk/v2/sql_queries/errors.py | 190 - foundry_sdk/v2/sql_queries/models.py | 100 - foundry_sdk/v2/sql_queries/sql_query.py | 630 - foundry_sdk/v2/streams/__init__.py | 22 - foundry_sdk/v2/streams/_client.py | 69 - foundry_sdk/v2/streams/dataset.py | 298 - foundry_sdk/v2/streams/errors.py | 272 - foundry_sdk/v2/streams/models.py | 273 - foundry_sdk/v2/streams/stream.py | 960 -- .../v2/third_party_applications/__init__.py | 24 - .../v2/third_party_applications/_client.py | 75 - .../v2/third_party_applications/errors.py | 275 - .../v2/third_party_applications/models.py | 84 - .../third_party_application.py | 222 - .../v2/third_party_applications/version.py | 645 - .../v2/third_party_applications/website.py | 411 - foundry_sdk/v2/widgets/__init__.py | 22 - foundry_sdk/v2/widgets/_client.py | 97 - foundry_sdk/v2/widgets/dev_mode_settings.py | 711 - foundry_sdk/v2/widgets/errors.py | 844 -- foundry_sdk/v2/widgets/models.py | 235 - foundry_sdk/v2/widgets/release.py | 425 - foundry_sdk/v2/widgets/repository.py | 317 - foundry_sdk/v2/widgets/widget_set.py | 218 - pyproject.toml | 46 - scripts/set_npm_version.js | 13 - scripts/set_python_version.py | 17 - tests/auth/__init__.py | 0 tests/auth/test_confidential_client.py | 163 - ...confidential_client_oauth_flow_provider.py | 106 - tests/auth/test_oauth_utils.py | 87 - tests/auth/test_public_client.py | 178 - .../test_public_client_oauth_flow_provider.py | 136 - tests/auth/test_user_auth_token_client.py | 25 - tests/conftest.py | 35 - tests/functions/__init__.py | 13 - tests/server.py | 82 - tests/test_api_client.py | 664 - tests/test_body_serialization.py | 513 - tests/test_client_init_helpers.py | 154 - tests/test_datetime.py | 27 - tests/test_discriminators.py | 102 - tests/test_errors.py | 50 - tests/test_exception.py | 108 - tests/test_http_client.py | 333 - tests/test_model_base.py | 288 - tests/test_page_iterator.py | 138 - tests/test_performance.py | 423 - tests/test_resorce_import.py | 582 - tests/test_resource_iterator.py | 215 - tests/test_response_types.py | 652 - tests/test_utils.py | 185 - tox.ini | 34 - 1982 files changed, 10 insertions(+), 160247 deletions(-) delete mode 100644 .bulldozer.yml delete mode 100644 .changelog.yml delete mode 100644 .circleci/config.yml delete mode 100644 .gitignore delete mode 100644 LICENSE delete mode 100644 README.md delete mode 100644 assets/function_utils.py delete mode 100644 assets/test-function-utils.py delete mode 100644 docs-snippets-npm/.gitignore delete mode 100644 docs-snippets-npm/package.json delete mode 100644 docs-snippets-npm/src/index.ts delete mode 100644 docs-snippets-npm/tsconfig.json delete mode 100644 docs/v1/Core/models/AnyType.md delete mode 100644 docs/v1/Core/models/AttachmentType.md delete mode 100644 docs/v1/Core/models/Attribution.md delete mode 100644 docs/v1/Core/models/BinaryType.md delete mode 100644 docs/v1/Core/models/BooleanType.md delete mode 100644 docs/v1/Core/models/ByteType.md delete mode 100644 docs/v1/Core/models/CipherTextType.md delete mode 100644 docs/v1/Core/models/ContentLength.md delete mode 100644 docs/v1/Core/models/ContentType.md delete mode 100644 docs/v1/Core/models/DateType.md delete mode 100644 docs/v1/Core/models/DecimalType.md delete mode 100644 docs/v1/Core/models/DisplayName.md delete mode 100644 docs/v1/Core/models/DistanceUnit.md delete mode 100644 docs/v1/Core/models/DoubleType.md delete mode 100644 docs/v1/Core/models/FilePath.md delete mode 100644 docs/v1/Core/models/Filename.md delete mode 100644 docs/v1/Core/models/FloatType.md delete mode 100644 docs/v1/Core/models/FolderRid.md delete mode 100644 docs/v1/Core/models/FoundryBranch.md delete mode 100644 docs/v1/Core/models/IntegerType.md delete mode 100644 docs/v1/Core/models/LongType.md delete mode 100644 docs/v1/Core/models/MarkingType.md delete mode 100644 docs/v1/Core/models/MediaType.md delete mode 100644 docs/v1/Core/models/NullType.md delete mode 100644 docs/v1/Core/models/OperationScope.md delete mode 100644 docs/v1/Core/models/PageSize.md delete mode 100644 docs/v1/Core/models/PageToken.md delete mode 100644 docs/v1/Core/models/PreviewMode.md delete mode 100644 docs/v1/Core/models/ReleaseStatus.md delete mode 100644 docs/v1/Core/models/ShortType.md delete mode 100644 docs/v1/Core/models/SizeBytes.md delete mode 100644 docs/v1/Core/models/StringType.md delete mode 100644 docs/v1/Core/models/StructFieldName.md delete mode 100644 docs/v1/Core/models/TimestampType.md delete mode 100644 docs/v1/Core/models/TotalCount.md delete mode 100644 docs/v1/Core/models/TraceParent.md delete mode 100644 docs/v1/Core/models/TraceState.md delete mode 100644 docs/v1/Core/models/UnsupportedType.md delete mode 100644 docs/v1/Datasets/Branch.md delete mode 100644 docs/v1/Datasets/Dataset.md delete mode 100644 docs/v1/Datasets/File.md delete mode 100644 docs/v1/Datasets/Transaction.md delete mode 100644 docs/v1/Datasets/models/Branch.md delete mode 100644 docs/v1/Datasets/models/BranchId.md delete mode 100644 docs/v1/Datasets/models/CreateBranchRequest.md delete mode 100644 docs/v1/Datasets/models/CreateDatasetRequest.md delete mode 100644 docs/v1/Datasets/models/CreateTransactionRequest.md delete mode 100644 docs/v1/Datasets/models/Dataset.md delete mode 100644 docs/v1/Datasets/models/DatasetName.md delete mode 100644 docs/v1/Datasets/models/DatasetRid.md delete mode 100644 docs/v1/Datasets/models/File.md delete mode 100644 docs/v1/Datasets/models/ListBranchesResponse.md delete mode 100644 docs/v1/Datasets/models/ListFilesResponse.md delete mode 100644 docs/v1/Datasets/models/TableExportFormat.md delete mode 100644 docs/v1/Datasets/models/Transaction.md delete mode 100644 docs/v1/Datasets/models/TransactionRid.md delete mode 100644 docs/v1/Datasets/models/TransactionStatus.md delete mode 100644 docs/v1/Datasets/models/TransactionType.md delete mode 100644 docs/v1/Ontologies/Action.md delete mode 100644 docs/v1/Ontologies/ActionType.md delete mode 100644 docs/v1/Ontologies/Attachment.md delete mode 100644 docs/v1/Ontologies/ObjectType.md delete mode 100644 docs/v1/Ontologies/Ontology.md delete mode 100644 docs/v1/Ontologies/OntologyObject.md delete mode 100644 docs/v1/Ontologies/Query.md delete mode 100644 docs/v1/Ontologies/QueryType.md delete mode 100644 docs/v1/Ontologies/models/ActionRid.md delete mode 100644 docs/v1/Ontologies/models/ActionType.md delete mode 100644 docs/v1/Ontologies/models/ActionTypeApiName.md delete mode 100644 docs/v1/Ontologies/models/ActionTypeRid.md delete mode 100644 docs/v1/Ontologies/models/AggregateObjectsRequest.md delete mode 100644 docs/v1/Ontologies/models/AggregateObjectsResponse.md delete mode 100644 docs/v1/Ontologies/models/AggregateObjectsResponseItem.md delete mode 100644 docs/v1/Ontologies/models/Aggregation.md delete mode 100644 docs/v1/Ontologies/models/AggregationDurationGrouping.md delete mode 100644 docs/v1/Ontologies/models/AggregationExactGrouping.md delete mode 100644 docs/v1/Ontologies/models/AggregationFixedWidthGrouping.md delete mode 100644 docs/v1/Ontologies/models/AggregationGroupBy.md delete mode 100644 docs/v1/Ontologies/models/AggregationGroupKey.md delete mode 100644 docs/v1/Ontologies/models/AggregationGroupValue.md delete mode 100644 docs/v1/Ontologies/models/AggregationMetricName.md delete mode 100644 docs/v1/Ontologies/models/AggregationMetricResult.md delete mode 100644 docs/v1/Ontologies/models/AggregationRange.md delete mode 100644 docs/v1/Ontologies/models/AggregationRangesGrouping.md delete mode 100644 docs/v1/Ontologies/models/AllTermsQuery.md delete mode 100644 docs/v1/Ontologies/models/AndQuery.md delete mode 100644 docs/v1/Ontologies/models/AnyTermQuery.md delete mode 100644 docs/v1/Ontologies/models/ApplyActionMode.md delete mode 100644 docs/v1/Ontologies/models/ApplyActionRequest.md delete mode 100644 docs/v1/Ontologies/models/ApplyActionRequestOptions.md delete mode 100644 docs/v1/Ontologies/models/ApplyActionResponse.md delete mode 100644 docs/v1/Ontologies/models/ApproximateDistinctAggregation.md delete mode 100644 docs/v1/Ontologies/models/ArrayEntryEvaluatedConstraint.md delete mode 100644 docs/v1/Ontologies/models/ArrayEvaluatedConstraint.md delete mode 100644 docs/v1/Ontologies/models/ArraySizeConstraint.md delete mode 100644 docs/v1/Ontologies/models/ArtifactRepositoryRid.md delete mode 100644 docs/v1/Ontologies/models/Attachment.md delete mode 100644 docs/v1/Ontologies/models/AttachmentRid.md delete mode 100644 docs/v1/Ontologies/models/AvgAggregation.md delete mode 100644 docs/v1/Ontologies/models/BatchApplyActionRequest.md delete mode 100644 docs/v1/Ontologies/models/BatchApplyActionResponse.md delete mode 100644 docs/v1/Ontologies/models/ContainsQuery.md delete mode 100644 docs/v1/Ontologies/models/CountAggregation.md delete mode 100644 docs/v1/Ontologies/models/CreateInterfaceObjectRule.md delete mode 100644 docs/v1/Ontologies/models/CreateLinkRule.md delete mode 100644 docs/v1/Ontologies/models/CreateObjectRule.md delete mode 100644 docs/v1/Ontologies/models/DataValue.md delete mode 100644 docs/v1/Ontologies/models/DeleteInterfaceObjectRule.md delete mode 100644 docs/v1/Ontologies/models/DeleteLinkRule.md delete mode 100644 docs/v1/Ontologies/models/DeleteObjectRule.md delete mode 100644 docs/v1/Ontologies/models/DerivedPropertyApiName.md delete mode 100644 docs/v1/Ontologies/models/Duration.md delete mode 100644 docs/v1/Ontologies/models/EntrySetType.md delete mode 100644 docs/v1/Ontologies/models/EqualsQuery.md delete mode 100644 docs/v1/Ontologies/models/ExecuteQueryRequest.md delete mode 100644 docs/v1/Ontologies/models/ExecuteQueryResponse.md delete mode 100644 docs/v1/Ontologies/models/FieldNameV1.md delete mode 100644 docs/v1/Ontologies/models/FilterValue.md delete mode 100644 docs/v1/Ontologies/models/FunctionRid.md delete mode 100644 docs/v1/Ontologies/models/FunctionVersion.md delete mode 100644 docs/v1/Ontologies/models/Fuzzy.md delete mode 100644 docs/v1/Ontologies/models/GroupMemberConstraint.md delete mode 100644 docs/v1/Ontologies/models/GtQuery.md delete mode 100644 docs/v1/Ontologies/models/GteQuery.md delete mode 100644 docs/v1/Ontologies/models/InterfaceLinkTypeApiName.md delete mode 100644 docs/v1/Ontologies/models/InterfaceLinkTypeRid.md delete mode 100644 docs/v1/Ontologies/models/InterfacePropertyApiName.md delete mode 100644 docs/v1/Ontologies/models/InterfaceTypeApiName.md delete mode 100644 docs/v1/Ontologies/models/InterfaceTypeRid.md delete mode 100644 docs/v1/Ontologies/models/IsNullQuery.md delete mode 100644 docs/v1/Ontologies/models/LegacyObjectTypeId.md delete mode 100644 docs/v1/Ontologies/models/LegacyPropertyId.md delete mode 100644 docs/v1/Ontologies/models/LinkTypeApiName.md delete mode 100644 docs/v1/Ontologies/models/LinkTypeId.md delete mode 100644 docs/v1/Ontologies/models/LinkTypeSide.md delete mode 100644 docs/v1/Ontologies/models/LinkTypeSideCardinality.md delete mode 100644 docs/v1/Ontologies/models/ListActionTypesResponse.md delete mode 100644 docs/v1/Ontologies/models/ListLinkedObjectsResponse.md delete mode 100644 docs/v1/Ontologies/models/ListObjectTypesResponse.md delete mode 100644 docs/v1/Ontologies/models/ListObjectsResponse.md delete mode 100644 docs/v1/Ontologies/models/ListOntologiesResponse.md delete mode 100644 docs/v1/Ontologies/models/ListOutgoingLinkTypesResponse.md delete mode 100644 docs/v1/Ontologies/models/ListQueryTypesResponse.md delete mode 100644 docs/v1/Ontologies/models/LogicRule.md delete mode 100644 docs/v1/Ontologies/models/LtQuery.md delete mode 100644 docs/v1/Ontologies/models/LteQuery.md delete mode 100644 docs/v1/Ontologies/models/MaxAggregation.md delete mode 100644 docs/v1/Ontologies/models/MinAggregation.md delete mode 100644 docs/v1/Ontologies/models/ModifyInterfaceObjectRule.md delete mode 100644 docs/v1/Ontologies/models/ModifyObjectRule.md delete mode 100644 docs/v1/Ontologies/models/NotQuery.md delete mode 100644 docs/v1/Ontologies/models/ObjectPropertyValueConstraint.md delete mode 100644 docs/v1/Ontologies/models/ObjectQueryResultConstraint.md delete mode 100644 docs/v1/Ontologies/models/ObjectRid.md delete mode 100644 docs/v1/Ontologies/models/ObjectSetRid.md delete mode 100644 docs/v1/Ontologies/models/ObjectType.md delete mode 100644 docs/v1/Ontologies/models/ObjectTypeApiName.md delete mode 100644 docs/v1/Ontologies/models/ObjectTypeRid.md delete mode 100644 docs/v1/Ontologies/models/ObjectTypeVisibility.md delete mode 100644 docs/v1/Ontologies/models/OneOfConstraint.md delete mode 100644 docs/v1/Ontologies/models/Ontology.md delete mode 100644 docs/v1/Ontologies/models/OntologyApiName.md delete mode 100644 docs/v1/Ontologies/models/OntologyArrayType.md delete mode 100644 docs/v1/Ontologies/models/OntologyDataType.md delete mode 100644 docs/v1/Ontologies/models/OntologyInterfaceObjectSetType.md delete mode 100644 docs/v1/Ontologies/models/OntologyInterfaceObjectType.md delete mode 100644 docs/v1/Ontologies/models/OntologyMapType.md delete mode 100644 docs/v1/Ontologies/models/OntologyObject.md delete mode 100644 docs/v1/Ontologies/models/OntologyObjectSetType.md delete mode 100644 docs/v1/Ontologies/models/OntologyObjectType.md delete mode 100644 docs/v1/Ontologies/models/OntologyRid.md delete mode 100644 docs/v1/Ontologies/models/OntologySetType.md delete mode 100644 docs/v1/Ontologies/models/OntologyStructField.md delete mode 100644 docs/v1/Ontologies/models/OntologyStructType.md delete mode 100644 docs/v1/Ontologies/models/OrQuery.md delete mode 100644 docs/v1/Ontologies/models/OrderBy.md delete mode 100644 docs/v1/Ontologies/models/Parameter.md delete mode 100644 docs/v1/Ontologies/models/ParameterEvaluatedConstraint.md delete mode 100644 docs/v1/Ontologies/models/ParameterEvaluationResult.md delete mode 100644 docs/v1/Ontologies/models/ParameterId.md delete mode 100644 docs/v1/Ontologies/models/ParameterOption.md delete mode 100644 docs/v1/Ontologies/models/PhraseQuery.md delete mode 100644 docs/v1/Ontologies/models/PrefixQuery.md delete mode 100644 docs/v1/Ontologies/models/PrimaryKeyValue.md delete mode 100644 docs/v1/Ontologies/models/Property.md delete mode 100644 docs/v1/Ontologies/models/PropertyApiName.md delete mode 100644 docs/v1/Ontologies/models/PropertyFilter.md delete mode 100644 docs/v1/Ontologies/models/PropertyId.md delete mode 100644 docs/v1/Ontologies/models/PropertyTypeRid.md delete mode 100644 docs/v1/Ontologies/models/PropertyValue.md delete mode 100644 docs/v1/Ontologies/models/PropertyValueEscapedString.md delete mode 100644 docs/v1/Ontologies/models/QueryAggregationKeyType.md delete mode 100644 docs/v1/Ontologies/models/QueryAggregationRangeSubType.md delete mode 100644 docs/v1/Ontologies/models/QueryAggregationRangeType.md delete mode 100644 docs/v1/Ontologies/models/QueryAggregationValueType.md delete mode 100644 docs/v1/Ontologies/models/QueryApiName.md delete mode 100644 docs/v1/Ontologies/models/QueryArrayType.md delete mode 100644 docs/v1/Ontologies/models/QueryDataType.md delete mode 100644 docs/v1/Ontologies/models/QueryRuntimeErrorParameter.md delete mode 100644 docs/v1/Ontologies/models/QuerySetType.md delete mode 100644 docs/v1/Ontologies/models/QueryStructField.md delete mode 100644 docs/v1/Ontologies/models/QueryStructType.md delete mode 100644 docs/v1/Ontologies/models/QueryType.md delete mode 100644 docs/v1/Ontologies/models/QueryUnionType.md delete mode 100644 docs/v1/Ontologies/models/RangeConstraint.md delete mode 100644 docs/v1/Ontologies/models/ReturnEditsMode.md delete mode 100644 docs/v1/Ontologies/models/SdkPackageName.md delete mode 100644 docs/v1/Ontologies/models/SdkPackageRid.md delete mode 100644 docs/v1/Ontologies/models/SdkVersion.md delete mode 100644 docs/v1/Ontologies/models/SearchJsonQuery.md delete mode 100644 docs/v1/Ontologies/models/SearchObjectsRequest.md delete mode 100644 docs/v1/Ontologies/models/SearchObjectsResponse.md delete mode 100644 docs/v1/Ontologies/models/SearchOrderBy.md delete mode 100644 docs/v1/Ontologies/models/SearchOrderByType.md delete mode 100644 docs/v1/Ontologies/models/SearchOrdering.md delete mode 100644 docs/v1/Ontologies/models/SelectedPropertyApiName.md delete mode 100644 docs/v1/Ontologies/models/SharedPropertyTypeApiName.md delete mode 100644 docs/v1/Ontologies/models/SharedPropertyTypeRid.md delete mode 100644 docs/v1/Ontologies/models/StringLengthConstraint.md delete mode 100644 docs/v1/Ontologies/models/StringRegexMatchConstraint.md delete mode 100644 docs/v1/Ontologies/models/StructEvaluatedConstraint.md delete mode 100644 docs/v1/Ontologies/models/StructFieldEvaluatedConstraint.md delete mode 100644 docs/v1/Ontologies/models/StructFieldEvaluationResult.md delete mode 100644 docs/v1/Ontologies/models/StructParameterFieldApiName.md delete mode 100644 docs/v1/Ontologies/models/SubmissionCriteriaEvaluation.md delete mode 100644 docs/v1/Ontologies/models/SumAggregation.md delete mode 100644 docs/v1/Ontologies/models/ThreeDimensionalAggregation.md delete mode 100644 docs/v1/Ontologies/models/TwoDimensionalAggregation.md delete mode 100644 docs/v1/Ontologies/models/UnevaluableConstraint.md delete mode 100644 docs/v1/Ontologies/models/UniqueIdentifierLinkId.md delete mode 100644 docs/v1/Ontologies/models/ValidateActionRequest.md delete mode 100644 docs/v1/Ontologies/models/ValidateActionResponse.md delete mode 100644 docs/v1/Ontologies/models/ValidationResult.md delete mode 100644 docs/v1/Ontologies/models/ValueType.md delete mode 100644 docs/v1/Ontologies/models/ValueTypeApiName.md delete mode 100644 docs/v1/Ontologies/models/ValueTypeRid.md delete mode 100644 docs/v2/Admin/AuthenticationProvider.md delete mode 100644 docs/v2/Admin/Enrollment.md delete mode 100644 docs/v2/Admin/EnrollmentRoleAssignment.md delete mode 100644 docs/v2/Admin/Group.md delete mode 100644 docs/v2/Admin/GroupMember.md delete mode 100644 docs/v2/Admin/GroupMembership.md delete mode 100644 docs/v2/Admin/GroupMembershipExpirationPolicy.md delete mode 100644 docs/v2/Admin/GroupProviderInfo.md delete mode 100644 docs/v2/Admin/Host.md delete mode 100644 docs/v2/Admin/Marking.md delete mode 100644 docs/v2/Admin/MarkingCategory.md delete mode 100644 docs/v2/Admin/MarkingMember.md delete mode 100644 docs/v2/Admin/MarkingRoleAssignment.md delete mode 100644 docs/v2/Admin/Organization.md delete mode 100644 docs/v2/Admin/OrganizationRoleAssignment.md delete mode 100644 docs/v2/Admin/Role.md delete mode 100644 docs/v2/Admin/User.md delete mode 100644 docs/v2/Admin/UserProviderInfo.md delete mode 100644 docs/v2/Admin/models/AddEnrollmentRoleAssignmentsRequest.md delete mode 100644 docs/v2/Admin/models/AddGroupMembersRequest.md delete mode 100644 docs/v2/Admin/models/AddMarkingMembersRequest.md delete mode 100644 docs/v2/Admin/models/AddMarkingRoleAssignmentsRequest.md delete mode 100644 docs/v2/Admin/models/AddOrganizationRoleAssignmentsRequest.md delete mode 100644 docs/v2/Admin/models/AttributeName.md delete mode 100644 docs/v2/Admin/models/AttributeValue.md delete mode 100644 docs/v2/Admin/models/AttributeValues.md delete mode 100644 docs/v2/Admin/models/AuthenticationProtocol.md delete mode 100644 docs/v2/Admin/models/AuthenticationProvider.md delete mode 100644 docs/v2/Admin/models/AuthenticationProviderEnabled.md delete mode 100644 docs/v2/Admin/models/AuthenticationProviderName.md delete mode 100644 docs/v2/Admin/models/AuthenticationProviderRid.md delete mode 100644 docs/v2/Admin/models/CertificateInfo.md delete mode 100644 docs/v2/Admin/models/CertificateUsageType.md delete mode 100644 docs/v2/Admin/models/CreateGroupRequest.md delete mode 100644 docs/v2/Admin/models/CreateMarkingRequest.md delete mode 100644 docs/v2/Admin/models/CreateOrganizationRequest.md delete mode 100644 docs/v2/Admin/models/Enrollment.md delete mode 100644 docs/v2/Admin/models/EnrollmentName.md delete mode 100644 docs/v2/Admin/models/EnrollmentRoleAssignment.md delete mode 100644 docs/v2/Admin/models/GetGroupsBatchRequestElement.md delete mode 100644 docs/v2/Admin/models/GetGroupsBatchResponse.md delete mode 100644 docs/v2/Admin/models/GetMarkingsBatchRequestElement.md delete mode 100644 docs/v2/Admin/models/GetMarkingsBatchResponse.md delete mode 100644 docs/v2/Admin/models/GetRolesBatchRequestElement.md delete mode 100644 docs/v2/Admin/models/GetRolesBatchResponse.md delete mode 100644 docs/v2/Admin/models/GetUserMarkingsResponse.md delete mode 100644 docs/v2/Admin/models/GetUsersBatchRequestElement.md delete mode 100644 docs/v2/Admin/models/GetUsersBatchResponse.md delete mode 100644 docs/v2/Admin/models/Group.md delete mode 100644 docs/v2/Admin/models/GroupMember.md delete mode 100644 docs/v2/Admin/models/GroupMembership.md delete mode 100644 docs/v2/Admin/models/GroupMembershipExpiration.md delete mode 100644 docs/v2/Admin/models/GroupMembershipExpirationPolicy.md delete mode 100644 docs/v2/Admin/models/GroupName.md delete mode 100644 docs/v2/Admin/models/GroupProviderInfo.md delete mode 100644 docs/v2/Admin/models/GroupSearchFilter.md delete mode 100644 docs/v2/Admin/models/Host.md delete mode 100644 docs/v2/Admin/models/HostName.md delete mode 100644 docs/v2/Admin/models/ListAuthenticationProvidersResponse.md delete mode 100644 docs/v2/Admin/models/ListAvailableOrganizationRolesResponse.md delete mode 100644 docs/v2/Admin/models/ListEnrollmentRoleAssignmentsResponse.md delete mode 100644 docs/v2/Admin/models/ListGroupMembersResponse.md delete mode 100644 docs/v2/Admin/models/ListGroupMembershipsResponse.md delete mode 100644 docs/v2/Admin/models/ListGroupsResponse.md delete mode 100644 docs/v2/Admin/models/ListHostsResponse.md delete mode 100644 docs/v2/Admin/models/ListMarkingCategoriesResponse.md delete mode 100644 docs/v2/Admin/models/ListMarkingMembersResponse.md delete mode 100644 docs/v2/Admin/models/ListMarkingRoleAssignmentsResponse.md delete mode 100644 docs/v2/Admin/models/ListMarkingsResponse.md delete mode 100644 docs/v2/Admin/models/ListOrganizationRoleAssignmentsResponse.md delete mode 100644 docs/v2/Admin/models/ListUsersResponse.md delete mode 100644 docs/v2/Admin/models/Marking.md delete mode 100644 docs/v2/Admin/models/MarkingCategory.md delete mode 100644 docs/v2/Admin/models/MarkingCategoryId.md delete mode 100644 docs/v2/Admin/models/MarkingCategoryName.md delete mode 100644 docs/v2/Admin/models/MarkingCategoryType.md delete mode 100644 docs/v2/Admin/models/MarkingMember.md delete mode 100644 docs/v2/Admin/models/MarkingName.md delete mode 100644 docs/v2/Admin/models/MarkingRole.md delete mode 100644 docs/v2/Admin/models/MarkingRoleAssignment.md delete mode 100644 docs/v2/Admin/models/MarkingRoleUpdate.md delete mode 100644 docs/v2/Admin/models/MarkingType.md delete mode 100644 docs/v2/Admin/models/OidcAuthenticationProtocol.md delete mode 100644 docs/v2/Admin/models/Organization.md delete mode 100644 docs/v2/Admin/models/OrganizationName.md delete mode 100644 docs/v2/Admin/models/OrganizationRoleAssignment.md delete mode 100644 docs/v2/Admin/models/PreregisterGroupRequest.md delete mode 100644 docs/v2/Admin/models/PreregisterUserRequest.md delete mode 100644 docs/v2/Admin/models/PrincipalFilterType.md delete mode 100644 docs/v2/Admin/models/ProviderId.md delete mode 100644 docs/v2/Admin/models/RemoveEnrollmentRoleAssignmentsRequest.md delete mode 100644 docs/v2/Admin/models/RemoveGroupMembersRequest.md delete mode 100644 docs/v2/Admin/models/RemoveMarkingMembersRequest.md delete mode 100644 docs/v2/Admin/models/RemoveMarkingRoleAssignmentsRequest.md delete mode 100644 docs/v2/Admin/models/RemoveOrganizationRoleAssignmentsRequest.md delete mode 100644 docs/v2/Admin/models/ReplaceGroupMembershipExpirationPolicyRequest.md delete mode 100644 docs/v2/Admin/models/ReplaceGroupProviderInfoRequest.md delete mode 100644 docs/v2/Admin/models/ReplaceMarkingRequest.md delete mode 100644 docs/v2/Admin/models/ReplaceOrganizationRequest.md delete mode 100644 docs/v2/Admin/models/ReplaceUserProviderInfoRequest.md delete mode 100644 docs/v2/Admin/models/Role.md delete mode 100644 docs/v2/Admin/models/RoleDescription.md delete mode 100644 docs/v2/Admin/models/RoleDisplayName.md delete mode 100644 docs/v2/Admin/models/SamlAuthenticationProtocol.md delete mode 100644 docs/v2/Admin/models/SamlServiceProviderMetadata.md delete mode 100644 docs/v2/Admin/models/SearchGroupsRequest.md delete mode 100644 docs/v2/Admin/models/SearchGroupsResponse.md delete mode 100644 docs/v2/Admin/models/SearchUsersRequest.md delete mode 100644 docs/v2/Admin/models/SearchUsersResponse.md delete mode 100644 docs/v2/Admin/models/User.md delete mode 100644 docs/v2/Admin/models/UserProviderInfo.md delete mode 100644 docs/v2/Admin/models/UserSearchFilter.md delete mode 100644 docs/v2/Admin/models/UserUsername.md delete mode 100644 docs/v2/AipAgents/Agent.md delete mode 100644 docs/v2/AipAgents/AgentVersion.md delete mode 100644 docs/v2/AipAgents/Content.md delete mode 100644 docs/v2/AipAgents/Session.md delete mode 100644 docs/v2/AipAgents/SessionTrace.md delete mode 100644 docs/v2/AipAgents/models/Agent.md delete mode 100644 docs/v2/AipAgents/models/AgentMarkdownResponse.md delete mode 100644 docs/v2/AipAgents/models/AgentMetadata.md delete mode 100644 docs/v2/AipAgents/models/AgentRid.md delete mode 100644 docs/v2/AipAgents/models/AgentSessionRagContextResponse.md delete mode 100644 docs/v2/AipAgents/models/AgentVersion.md delete mode 100644 docs/v2/AipAgents/models/AgentVersionDetails.md delete mode 100644 docs/v2/AipAgents/models/AgentVersionString.md delete mode 100644 docs/v2/AipAgents/models/AgentsSessionsPage.md delete mode 100644 docs/v2/AipAgents/models/BlockingContinueSessionRequest.md delete mode 100644 docs/v2/AipAgents/models/CancelSessionRequest.md delete mode 100644 docs/v2/AipAgents/models/CancelSessionResponse.md delete mode 100644 docs/v2/AipAgents/models/Content.md delete mode 100644 docs/v2/AipAgents/models/CreateSessionRequest.md delete mode 100644 docs/v2/AipAgents/models/FailureToolCallOutput.md delete mode 100644 docs/v2/AipAgents/models/FunctionRetrievedContext.md delete mode 100644 docs/v2/AipAgents/models/GetRagContextForSessionRequest.md delete mode 100644 docs/v2/AipAgents/models/InputContext.md delete mode 100644 docs/v2/AipAgents/models/ListAgentVersionsResponse.md delete mode 100644 docs/v2/AipAgents/models/ListSessionsResponse.md delete mode 100644 docs/v2/AipAgents/models/MessageId.md delete mode 100644 docs/v2/AipAgents/models/ObjectContext.md delete mode 100644 docs/v2/AipAgents/models/ObjectSetParameter.md delete mode 100644 docs/v2/AipAgents/models/ObjectSetParameterValue.md delete mode 100644 docs/v2/AipAgents/models/ObjectSetParameterValueUpdate.md delete mode 100644 docs/v2/AipAgents/models/Parameter.md delete mode 100644 docs/v2/AipAgents/models/ParameterAccessMode.md delete mode 100644 docs/v2/AipAgents/models/ParameterId.md delete mode 100644 docs/v2/AipAgents/models/ParameterType.md delete mode 100644 docs/v2/AipAgents/models/ParameterValue.md delete mode 100644 docs/v2/AipAgents/models/ParameterValueUpdate.md delete mode 100644 docs/v2/AipAgents/models/RidToolInputValue.md delete mode 100644 docs/v2/AipAgents/models/RidToolOutputValue.md delete mode 100644 docs/v2/AipAgents/models/Session.md delete mode 100644 docs/v2/AipAgents/models/SessionExchange.md delete mode 100644 docs/v2/AipAgents/models/SessionExchangeContexts.md delete mode 100644 docs/v2/AipAgents/models/SessionExchangeResult.md delete mode 100644 docs/v2/AipAgents/models/SessionMetadata.md delete mode 100644 docs/v2/AipAgents/models/SessionRid.md delete mode 100644 docs/v2/AipAgents/models/SessionTrace.md delete mode 100644 docs/v2/AipAgents/models/SessionTraceId.md delete mode 100644 docs/v2/AipAgents/models/SessionTraceStatus.md delete mode 100644 docs/v2/AipAgents/models/StreamingContinueSessionRequest.md delete mode 100644 docs/v2/AipAgents/models/StringParameter.md delete mode 100644 docs/v2/AipAgents/models/StringParameterValue.md delete mode 100644 docs/v2/AipAgents/models/StringToolInputValue.md delete mode 100644 docs/v2/AipAgents/models/StringToolOutputValue.md delete mode 100644 docs/v2/AipAgents/models/SuccessToolCallOutput.md delete mode 100644 docs/v2/AipAgents/models/ToolCall.md delete mode 100644 docs/v2/AipAgents/models/ToolCallGroup.md delete mode 100644 docs/v2/AipAgents/models/ToolCallInput.md delete mode 100644 docs/v2/AipAgents/models/ToolCallOutput.md delete mode 100644 docs/v2/AipAgents/models/ToolInputName.md delete mode 100644 docs/v2/AipAgents/models/ToolInputValue.md delete mode 100644 docs/v2/AipAgents/models/ToolMetadata.md delete mode 100644 docs/v2/AipAgents/models/ToolOutputValue.md delete mode 100644 docs/v2/AipAgents/models/ToolType.md delete mode 100644 docs/v2/AipAgents/models/UpdateSessionTitleRequest.md delete mode 100644 docs/v2/AipAgents/models/UserTextInput.md delete mode 100644 docs/v2/Audit/LogFile.md delete mode 100644 docs/v2/Audit/Organization.md delete mode 100644 docs/v2/Audit/models/FileId.md delete mode 100644 docs/v2/Audit/models/ListLogFilesResponse.md delete mode 100644 docs/v2/Audit/models/LogFile.md delete mode 100644 docs/v2/Connectivity/Connection.md delete mode 100644 docs/v2/Connectivity/FileImport.md delete mode 100644 docs/v2/Connectivity/TableImport.md delete mode 100644 docs/v2/Connectivity/VirtualTable.md delete mode 100644 docs/v2/Connectivity/models/ApiKeyAuthentication.md delete mode 100644 docs/v2/Connectivity/models/AsPlaintextValue.md delete mode 100644 docs/v2/Connectivity/models/AsSecretName.md delete mode 100644 docs/v2/Connectivity/models/AwsAccessKey.md delete mode 100644 docs/v2/Connectivity/models/AwsOidcAuthentication.md delete mode 100644 docs/v2/Connectivity/models/BasicCredentials.md delete mode 100644 docs/v2/Connectivity/models/BearerToken.md delete mode 100644 docs/v2/Connectivity/models/BigQueryVirtualTableConfig.md delete mode 100644 docs/v2/Connectivity/models/CloudIdentity.md delete mode 100644 docs/v2/Connectivity/models/CloudIdentityRid.md delete mode 100644 docs/v2/Connectivity/models/Connection.md delete mode 100644 docs/v2/Connectivity/models/ConnectionConfiguration.md delete mode 100644 docs/v2/Connectivity/models/ConnectionDisplayName.md delete mode 100644 docs/v2/Connectivity/models/ConnectionExportSettings.md delete mode 100644 docs/v2/Connectivity/models/ConnectionRid.md delete mode 100644 docs/v2/Connectivity/models/ConnectionWorker.md delete mode 100644 docs/v2/Connectivity/models/CreateConnectionRequest.md delete mode 100644 docs/v2/Connectivity/models/CreateConnectionRequestAsPlaintextValue.md delete mode 100644 docs/v2/Connectivity/models/CreateConnectionRequestAsSecretName.md delete mode 100644 docs/v2/Connectivity/models/CreateConnectionRequestBasicCredentials.md delete mode 100644 docs/v2/Connectivity/models/CreateConnectionRequestConnectionConfiguration.md delete mode 100644 docs/v2/Connectivity/models/CreateConnectionRequestConnectionWorker.md delete mode 100644 docs/v2/Connectivity/models/CreateConnectionRequestDatabricksAuthenticationMode.md delete mode 100644 docs/v2/Connectivity/models/CreateConnectionRequestDatabricksConnectionConfiguration.md delete mode 100644 docs/v2/Connectivity/models/CreateConnectionRequestEncryptedProperty.md delete mode 100644 docs/v2/Connectivity/models/CreateConnectionRequestFoundryWorker.md delete mode 100644 docs/v2/Connectivity/models/CreateConnectionRequestJdbcConnectionConfiguration.md delete mode 100644 docs/v2/Connectivity/models/CreateConnectionRequestOauthMachineToMachineAuth.md delete mode 100644 docs/v2/Connectivity/models/CreateConnectionRequestPersonalAccessToken.md delete mode 100644 docs/v2/Connectivity/models/CreateConnectionRequestRestConnectionConfiguration.md delete mode 100644 docs/v2/Connectivity/models/CreateConnectionRequestS3ConnectionConfiguration.md delete mode 100644 docs/v2/Connectivity/models/CreateConnectionRequestSmbAuth.md delete mode 100644 docs/v2/Connectivity/models/CreateConnectionRequestSmbConnectionConfiguration.md delete mode 100644 docs/v2/Connectivity/models/CreateConnectionRequestSmbUsernamePasswordAuth.md delete mode 100644 docs/v2/Connectivity/models/CreateConnectionRequestSnowflakeAuthenticationMode.md delete mode 100644 docs/v2/Connectivity/models/CreateConnectionRequestSnowflakeConnectionConfiguration.md delete mode 100644 docs/v2/Connectivity/models/CreateConnectionRequestSnowflakeExternalOauth.md delete mode 100644 docs/v2/Connectivity/models/CreateConnectionRequestSnowflakeKeyPairAuthentication.md delete mode 100644 docs/v2/Connectivity/models/CreateConnectionRequestUnknownWorker.md delete mode 100644 docs/v2/Connectivity/models/CreateConnectionRequestWorkflowIdentityFederation.md delete mode 100644 docs/v2/Connectivity/models/CreateFileImportRequest.md delete mode 100644 docs/v2/Connectivity/models/CreateTableImportRequest.md delete mode 100644 docs/v2/Connectivity/models/CreateTableImportRequestDatabricksTableImportConfig.md delete mode 100644 docs/v2/Connectivity/models/CreateTableImportRequestJdbcTableImportConfig.md delete mode 100644 docs/v2/Connectivity/models/CreateTableImportRequestMicrosoftAccessTableImportConfig.md delete mode 100644 docs/v2/Connectivity/models/CreateTableImportRequestMicrosoftSqlServerTableImportConfig.md delete mode 100644 docs/v2/Connectivity/models/CreateTableImportRequestOracleTableImportConfig.md delete mode 100644 docs/v2/Connectivity/models/CreateTableImportRequestPostgreSqlTableImportConfig.md delete mode 100644 docs/v2/Connectivity/models/CreateTableImportRequestSnowflakeTableImportConfig.md delete mode 100644 docs/v2/Connectivity/models/CreateTableImportRequestTableImportConfig.md delete mode 100644 docs/v2/Connectivity/models/CreateVirtualTableRequest.md delete mode 100644 docs/v2/Connectivity/models/DatabricksAuthenticationMode.md delete mode 100644 docs/v2/Connectivity/models/DatabricksConnectionConfiguration.md delete mode 100644 docs/v2/Connectivity/models/DatabricksTableImportConfig.md delete mode 100644 docs/v2/Connectivity/models/DateColumnInitialIncrementalState.md delete mode 100644 docs/v2/Connectivity/models/DecimalColumnInitialIncrementalState.md delete mode 100644 docs/v2/Connectivity/models/DeltaVirtualTableConfig.md delete mode 100644 docs/v2/Connectivity/models/Domain.md delete mode 100644 docs/v2/Connectivity/models/EncryptedProperty.md delete mode 100644 docs/v2/Connectivity/models/FileAnyPathMatchesFilter.md delete mode 100644 docs/v2/Connectivity/models/FileAtLeastCountFilter.md delete mode 100644 docs/v2/Connectivity/models/FileChangedSinceLastUploadFilter.md delete mode 100644 docs/v2/Connectivity/models/FileFormat.md delete mode 100644 docs/v2/Connectivity/models/FileImport.md delete mode 100644 docs/v2/Connectivity/models/FileImportCustomFilter.md delete mode 100644 docs/v2/Connectivity/models/FileImportDisplayName.md delete mode 100644 docs/v2/Connectivity/models/FileImportFilter.md delete mode 100644 docs/v2/Connectivity/models/FileImportMode.md delete mode 100644 docs/v2/Connectivity/models/FileImportRid.md delete mode 100644 docs/v2/Connectivity/models/FileLastModifiedAfterFilter.md delete mode 100644 docs/v2/Connectivity/models/FilePathMatchesFilter.md delete mode 100644 docs/v2/Connectivity/models/FilePathNotMatchesFilter.md delete mode 100644 docs/v2/Connectivity/models/FileProperty.md delete mode 100644 docs/v2/Connectivity/models/FileSizeFilter.md delete mode 100644 docs/v2/Connectivity/models/FilesCountLimitFilter.md delete mode 100644 docs/v2/Connectivity/models/FilesVirtualTableConfig.md delete mode 100644 docs/v2/Connectivity/models/FoundryWorker.md delete mode 100644 docs/v2/Connectivity/models/GetConfigurationConnectionsBatchRequestElement.md delete mode 100644 docs/v2/Connectivity/models/GetConfigurationConnectionsBatchResponse.md delete mode 100644 docs/v2/Connectivity/models/GlueVirtualTableConfig.md delete mode 100644 docs/v2/Connectivity/models/HeaderApiKey.md delete mode 100644 docs/v2/Connectivity/models/IcebergVirtualTableConfig.md delete mode 100644 docs/v2/Connectivity/models/IntegerColumnInitialIncrementalState.md delete mode 100644 docs/v2/Connectivity/models/InvalidConnectionReason.md delete mode 100644 docs/v2/Connectivity/models/JdbcConnectionConfiguration.md delete mode 100644 docs/v2/Connectivity/models/JdbcDriverArtifactName.md delete mode 100644 docs/v2/Connectivity/models/JdbcProperties.md delete mode 100644 docs/v2/Connectivity/models/JdbcTableImportConfig.md delete mode 100644 docs/v2/Connectivity/models/ListFileImportsResponse.md delete mode 100644 docs/v2/Connectivity/models/ListTableImportsResponse.md delete mode 100644 docs/v2/Connectivity/models/LongColumnInitialIncrementalState.md delete mode 100644 docs/v2/Connectivity/models/MicrosoftAccessTableImportConfig.md delete mode 100644 docs/v2/Connectivity/models/MicrosoftSqlServerTableImportConfig.md delete mode 100644 docs/v2/Connectivity/models/NetworkEgressPolicyRid.md delete mode 100644 docs/v2/Connectivity/models/OauthMachineToMachineAuth.md delete mode 100644 docs/v2/Connectivity/models/OracleTableImportConfig.md delete mode 100644 docs/v2/Connectivity/models/PersonalAccessToken.md delete mode 100644 docs/v2/Connectivity/models/PlaintextValue.md delete mode 100644 docs/v2/Connectivity/models/PostgreSqlTableImportConfig.md delete mode 100644 docs/v2/Connectivity/models/Protocol.md delete mode 100644 docs/v2/Connectivity/models/QueryParameterApiKey.md delete mode 100644 docs/v2/Connectivity/models/Region.md delete mode 100644 docs/v2/Connectivity/models/ReplaceFileImportRequest.md delete mode 100644 docs/v2/Connectivity/models/ReplaceTableImportRequest.md delete mode 100644 docs/v2/Connectivity/models/ReplaceTableImportRequestDatabricksTableImportConfig.md delete mode 100644 docs/v2/Connectivity/models/ReplaceTableImportRequestJdbcTableImportConfig.md delete mode 100644 docs/v2/Connectivity/models/ReplaceTableImportRequestMicrosoftAccessTableImportConfig.md delete mode 100644 docs/v2/Connectivity/models/ReplaceTableImportRequestMicrosoftSqlServerTableImportConfig.md delete mode 100644 docs/v2/Connectivity/models/ReplaceTableImportRequestOracleTableImportConfig.md delete mode 100644 docs/v2/Connectivity/models/ReplaceTableImportRequestPostgreSqlTableImportConfig.md delete mode 100644 docs/v2/Connectivity/models/ReplaceTableImportRequestSnowflakeTableImportConfig.md delete mode 100644 docs/v2/Connectivity/models/ReplaceTableImportRequestTableImportConfig.md delete mode 100644 docs/v2/Connectivity/models/RestAuthenticationMode.md delete mode 100644 docs/v2/Connectivity/models/RestConnectionAdditionalSecrets.md delete mode 100644 docs/v2/Connectivity/models/RestConnectionConfiguration.md delete mode 100644 docs/v2/Connectivity/models/RestConnectionOAuth2.md delete mode 100644 docs/v2/Connectivity/models/RestRequestApiKeyLocation.md delete mode 100644 docs/v2/Connectivity/models/S3AuthenticationMode.md delete mode 100644 docs/v2/Connectivity/models/S3ConnectionConfiguration.md delete mode 100644 docs/v2/Connectivity/models/S3KmsConfiguration.md delete mode 100644 docs/v2/Connectivity/models/S3ProxyConfiguration.md delete mode 100644 docs/v2/Connectivity/models/SecretName.md delete mode 100644 docs/v2/Connectivity/models/SecretsNames.md delete mode 100644 docs/v2/Connectivity/models/SecretsWithPlaintextValues.md delete mode 100644 docs/v2/Connectivity/models/SmbAuth.md delete mode 100644 docs/v2/Connectivity/models/SmbConnectionConfiguration.md delete mode 100644 docs/v2/Connectivity/models/SmbProxyConfiguration.md delete mode 100644 docs/v2/Connectivity/models/SmbProxyType.md delete mode 100644 docs/v2/Connectivity/models/SmbUsernamePasswordAuth.md delete mode 100644 docs/v2/Connectivity/models/SnowflakeAuthenticationMode.md delete mode 100644 docs/v2/Connectivity/models/SnowflakeConnectionConfiguration.md delete mode 100644 docs/v2/Connectivity/models/SnowflakeExternalOauth.md delete mode 100644 docs/v2/Connectivity/models/SnowflakeKeyPairAuthentication.md delete mode 100644 docs/v2/Connectivity/models/SnowflakeTableImportConfig.md delete mode 100644 docs/v2/Connectivity/models/SnowflakeVirtualTableConfig.md delete mode 100644 docs/v2/Connectivity/models/StringColumnInitialIncrementalState.md delete mode 100644 docs/v2/Connectivity/models/StsRoleConfiguration.md delete mode 100644 docs/v2/Connectivity/models/TableImport.md delete mode 100644 docs/v2/Connectivity/models/TableImportAllowSchemaChanges.md delete mode 100644 docs/v2/Connectivity/models/TableImportConfig.md delete mode 100644 docs/v2/Connectivity/models/TableImportDisplayName.md delete mode 100644 docs/v2/Connectivity/models/TableImportInitialIncrementalState.md delete mode 100644 docs/v2/Connectivity/models/TableImportMode.md delete mode 100644 docs/v2/Connectivity/models/TableImportQuery.md delete mode 100644 docs/v2/Connectivity/models/TableImportRid.md delete mode 100644 docs/v2/Connectivity/models/TableName.md delete mode 100644 docs/v2/Connectivity/models/TableRid.md delete mode 100644 docs/v2/Connectivity/models/TimestampColumnInitialIncrementalState.md delete mode 100644 docs/v2/Connectivity/models/UnityVirtualTableConfig.md delete mode 100644 docs/v2/Connectivity/models/UnknownWorker.md delete mode 100644 docs/v2/Connectivity/models/UpdateExportSettingsForConnectionRequest.md delete mode 100644 docs/v2/Connectivity/models/UpdateSecretsForConnectionRequest.md delete mode 100644 docs/v2/Connectivity/models/UriScheme.md delete mode 100644 docs/v2/Connectivity/models/VirtualTable.md delete mode 100644 docs/v2/Connectivity/models/VirtualTableConfig.md delete mode 100644 docs/v2/Connectivity/models/WorkflowIdentityFederation.md delete mode 100644 docs/v2/Core/models/AnyType.md delete mode 100644 docs/v2/Core/models/ArrayFieldType.md delete mode 100644 docs/v2/Core/models/AttachmentType.md delete mode 100644 docs/v2/Core/models/Attribution.md delete mode 100644 docs/v2/Core/models/BinaryType.md delete mode 100644 docs/v2/Core/models/BooleanType.md delete mode 100644 docs/v2/Core/models/BranchMetadata.md delete mode 100644 docs/v2/Core/models/BuildRid.md delete mode 100644 docs/v2/Core/models/ByteType.md delete mode 100644 docs/v2/Core/models/ChangeDataCaptureConfiguration.md delete mode 100644 docs/v2/Core/models/CheckReportRid.md delete mode 100644 docs/v2/Core/models/CheckRid.md delete mode 100644 docs/v2/Core/models/CipherTextType.md delete mode 100644 docs/v2/Core/models/ComputeSeconds.md delete mode 100644 docs/v2/Core/models/ContentLength.md delete mode 100644 docs/v2/Core/models/ContentType.md delete mode 100644 docs/v2/Core/models/CreatedBy.md delete mode 100644 docs/v2/Core/models/CreatedTime.md delete mode 100644 docs/v2/Core/models/CustomMetadata.md delete mode 100644 docs/v2/Core/models/DatasetFieldSchema.md delete mode 100644 docs/v2/Core/models/DatasetSchema.md delete mode 100644 docs/v2/Core/models/DateType.md delete mode 100644 docs/v2/Core/models/DecimalType.md delete mode 100644 docs/v2/Core/models/DisplayName.md delete mode 100644 docs/v2/Core/models/Distance.md delete mode 100644 docs/v2/Core/models/DistanceUnit.md delete mode 100644 docs/v2/Core/models/DoubleType.md delete mode 100644 docs/v2/Core/models/Duration.md delete mode 100644 docs/v2/Core/models/DurationSeconds.md delete mode 100644 docs/v2/Core/models/EmbeddingModel.md delete mode 100644 docs/v2/Core/models/EnrollmentRid.md delete mode 100644 docs/v2/Core/models/Field.md delete mode 100644 docs/v2/Core/models/FieldDataType.md delete mode 100644 docs/v2/Core/models/FieldName.md delete mode 100644 docs/v2/Core/models/FieldSchema.md delete mode 100644 docs/v2/Core/models/FilePath.md delete mode 100644 docs/v2/Core/models/Filename.md delete mode 100644 docs/v2/Core/models/FilterBinaryType.md delete mode 100644 docs/v2/Core/models/FilterBooleanType.md delete mode 100644 docs/v2/Core/models/FilterDateTimeType.md delete mode 100644 docs/v2/Core/models/FilterDateType.md delete mode 100644 docs/v2/Core/models/FilterDoubleType.md delete mode 100644 docs/v2/Core/models/FilterEnumType.md delete mode 100644 docs/v2/Core/models/FilterFloatType.md delete mode 100644 docs/v2/Core/models/FilterIntegerType.md delete mode 100644 docs/v2/Core/models/FilterLongType.md delete mode 100644 docs/v2/Core/models/FilterRidType.md delete mode 100644 docs/v2/Core/models/FilterStringType.md delete mode 100644 docs/v2/Core/models/FilterType.md delete mode 100644 docs/v2/Core/models/FilterUuidType.md delete mode 100644 docs/v2/Core/models/FloatType.md delete mode 100644 docs/v2/Core/models/FolderRid.md delete mode 100644 docs/v2/Core/models/FoundryBranch.md delete mode 100644 docs/v2/Core/models/FoundryLiveDeployment.md delete mode 100644 docs/v2/Core/models/FullRowChangeDataCaptureConfiguration.md delete mode 100644 docs/v2/Core/models/GeoPointType.md delete mode 100644 docs/v2/Core/models/GeoShapeType.md delete mode 100644 docs/v2/Core/models/GeohashType.md delete mode 100644 docs/v2/Core/models/GeotimeSeriesReferenceType.md delete mode 100644 docs/v2/Core/models/GroupId.md delete mode 100644 docs/v2/Core/models/GroupName.md delete mode 100644 docs/v2/Core/models/GroupRid.md delete mode 100644 docs/v2/Core/models/IncludeComputeUsage.md delete mode 100644 docs/v2/Core/models/IntegerType.md delete mode 100644 docs/v2/Core/models/JobRid.md delete mode 100644 docs/v2/Core/models/LmsEmbeddingModel.md delete mode 100644 docs/v2/Core/models/LmsEmbeddingModelValue.md delete mode 100644 docs/v2/Core/models/LongType.md delete mode 100644 docs/v2/Core/models/MapFieldType.md delete mode 100644 docs/v2/Core/models/MarkingId.md delete mode 100644 docs/v2/Core/models/MarkingType.md delete mode 100644 docs/v2/Core/models/MediaItemPath.md delete mode 100644 docs/v2/Core/models/MediaItemReadToken.md delete mode 100644 docs/v2/Core/models/MediaItemRid.md delete mode 100644 docs/v2/Core/models/MediaReference.md delete mode 100644 docs/v2/Core/models/MediaReferenceType.md delete mode 100644 docs/v2/Core/models/MediaSetRid.md delete mode 100644 docs/v2/Core/models/MediaSetViewItem.md delete mode 100644 docs/v2/Core/models/MediaSetViewItemWrapper.md delete mode 100644 docs/v2/Core/models/MediaSetViewRid.md delete mode 100644 docs/v2/Core/models/MediaType.md delete mode 100644 docs/v2/Core/models/NullType.md delete mode 100644 docs/v2/Core/models/NumericOrNonNumericType.md delete mode 100644 docs/v2/Core/models/Operation.md delete mode 100644 docs/v2/Core/models/OperationScope.md delete mode 100644 docs/v2/Core/models/OrderByDirection.md delete mode 100644 docs/v2/Core/models/OrganizationRid.md delete mode 100644 docs/v2/Core/models/PageSize.md delete mode 100644 docs/v2/Core/models/PageToken.md delete mode 100644 docs/v2/Core/models/PreviewMode.md delete mode 100644 docs/v2/Core/models/PrincipalId.md delete mode 100644 docs/v2/Core/models/PrincipalType.md delete mode 100644 docs/v2/Core/models/Realm.md delete mode 100644 docs/v2/Core/models/Reference.md delete mode 100644 docs/v2/Core/models/ReleaseStatus.md delete mode 100644 docs/v2/Core/models/Role.md delete mode 100644 docs/v2/Core/models/RoleAssignmentUpdate.md delete mode 100644 docs/v2/Core/models/RoleContext.md delete mode 100644 docs/v2/Core/models/RoleId.md delete mode 100644 docs/v2/Core/models/RoleSetId.md delete mode 100644 docs/v2/Core/models/ScheduleRid.md delete mode 100644 docs/v2/Core/models/SchemaFieldType.md delete mode 100644 docs/v2/Core/models/ShortType.md delete mode 100644 docs/v2/Core/models/SizeBytes.md delete mode 100644 docs/v2/Core/models/StreamSchema.md delete mode 100644 docs/v2/Core/models/StringType.md delete mode 100644 docs/v2/Core/models/StructFieldName.md delete mode 100644 docs/v2/Core/models/StructFieldType.md delete mode 100644 docs/v2/Core/models/TableRid.md delete mode 100644 docs/v2/Core/models/TimeSeriesItemType.md delete mode 100644 docs/v2/Core/models/TimeUnit.md delete mode 100644 docs/v2/Core/models/TimeseriesType.md delete mode 100644 docs/v2/Core/models/TimestampType.md delete mode 100644 docs/v2/Core/models/TotalCount.md delete mode 100644 docs/v2/Core/models/TraceParent.md delete mode 100644 docs/v2/Core/models/TraceState.md delete mode 100644 docs/v2/Core/models/UnsupportedType.md delete mode 100644 docs/v2/Core/models/UpdatedBy.md delete mode 100644 docs/v2/Core/models/UpdatedTime.md delete mode 100644 docs/v2/Core/models/UserId.md delete mode 100644 docs/v2/Core/models/UserStatus.md delete mode 100644 docs/v2/Core/models/VectorSimilarityFunction.md delete mode 100644 docs/v2/Core/models/VectorSimilarityFunctionValue.md delete mode 100644 docs/v2/Core/models/VectorType.md delete mode 100644 docs/v2/Core/models/VersionId.md delete mode 100644 docs/v2/Core/models/ZoneId.md delete mode 100644 docs/v2/DataHealth/Check.md delete mode 100644 docs/v2/DataHealth/CheckReport.md delete mode 100644 docs/v2/DataHealth/models/AllowedColumnValuesCheckConfig.md delete mode 100644 docs/v2/DataHealth/models/ApproximateUniquePercentageCheckConfig.md delete mode 100644 docs/v2/DataHealth/models/BooleanColumnValue.md delete mode 100644 docs/v2/DataHealth/models/BuildDurationCheckConfig.md delete mode 100644 docs/v2/DataHealth/models/BuildStatusCheckConfig.md delete mode 100644 docs/v2/DataHealth/models/Check.md delete mode 100644 docs/v2/DataHealth/models/CheckConfig.md delete mode 100644 docs/v2/DataHealth/models/CheckGroupRid.md delete mode 100644 docs/v2/DataHealth/models/CheckIntent.md delete mode 100644 docs/v2/DataHealth/models/CheckReport.md delete mode 100644 docs/v2/DataHealth/models/CheckResult.md delete mode 100644 docs/v2/DataHealth/models/CheckResultStatus.md delete mode 100644 docs/v2/DataHealth/models/ColumnCountConfig.md delete mode 100644 docs/v2/DataHealth/models/ColumnInfo.md delete mode 100644 docs/v2/DataHealth/models/ColumnName.md delete mode 100644 docs/v2/DataHealth/models/ColumnTypeCheckConfig.md delete mode 100644 docs/v2/DataHealth/models/ColumnTypeConfig.md delete mode 100644 docs/v2/DataHealth/models/ColumnValue.md delete mode 100644 docs/v2/DataHealth/models/CreateCheckRequest.md delete mode 100644 docs/v2/DataHealth/models/DatasetSubject.md delete mode 100644 docs/v2/DataHealth/models/DateBounds.md delete mode 100644 docs/v2/DataHealth/models/DateBoundsConfig.md delete mode 100644 docs/v2/DataHealth/models/DateColumnRangeCheckConfig.md delete mode 100644 docs/v2/DataHealth/models/DateColumnValue.md delete mode 100644 docs/v2/DataHealth/models/EscalationConfig.md delete mode 100644 docs/v2/DataHealth/models/JobDurationCheckConfig.md delete mode 100644 docs/v2/DataHealth/models/JobStatusCheckConfig.md delete mode 100644 docs/v2/DataHealth/models/MedianDeviation.md delete mode 100644 docs/v2/DataHealth/models/MedianDeviationBoundsType.md delete mode 100644 docs/v2/DataHealth/models/MedianDeviationConfig.md delete mode 100644 docs/v2/DataHealth/models/NullPercentageCheckConfig.md delete mode 100644 docs/v2/DataHealth/models/NumericBounds.md delete mode 100644 docs/v2/DataHealth/models/NumericBoundsConfig.md delete mode 100644 docs/v2/DataHealth/models/NumericColumnCheckConfig.md delete mode 100644 docs/v2/DataHealth/models/NumericColumnMeanCheckConfig.md delete mode 100644 docs/v2/DataHealth/models/NumericColumnMedianCheckConfig.md delete mode 100644 docs/v2/DataHealth/models/NumericColumnRangeCheckConfig.md delete mode 100644 docs/v2/DataHealth/models/NumericColumnValue.md delete mode 100644 docs/v2/DataHealth/models/PercentageBounds.md delete mode 100644 docs/v2/DataHealth/models/PercentageBoundsConfig.md delete mode 100644 docs/v2/DataHealth/models/PercentageCheckConfig.md delete mode 100644 docs/v2/DataHealth/models/PercentageValue.md delete mode 100644 docs/v2/DataHealth/models/PrimaryKeyCheckConfig.md delete mode 100644 docs/v2/DataHealth/models/PrimaryKeyConfig.md delete mode 100644 docs/v2/DataHealth/models/ReplaceAllowedColumnValuesCheckConfig.md delete mode 100644 docs/v2/DataHealth/models/ReplaceApproximateUniquePercentageCheckConfig.md delete mode 100644 docs/v2/DataHealth/models/ReplaceBuildDurationCheckConfig.md delete mode 100644 docs/v2/DataHealth/models/ReplaceBuildStatusCheckConfig.md delete mode 100644 docs/v2/DataHealth/models/ReplaceCheckConfig.md delete mode 100644 docs/v2/DataHealth/models/ReplaceCheckRequest.md delete mode 100644 docs/v2/DataHealth/models/ReplaceColumnTypeCheckConfig.md delete mode 100644 docs/v2/DataHealth/models/ReplaceColumnTypeConfig.md delete mode 100644 docs/v2/DataHealth/models/ReplaceDateColumnRangeCheckConfig.md delete mode 100644 docs/v2/DataHealth/models/ReplaceJobDurationCheckConfig.md delete mode 100644 docs/v2/DataHealth/models/ReplaceJobStatusCheckConfig.md delete mode 100644 docs/v2/DataHealth/models/ReplaceNullPercentageCheckConfig.md delete mode 100644 docs/v2/DataHealth/models/ReplaceNumericColumnCheckConfig.md delete mode 100644 docs/v2/DataHealth/models/ReplaceNumericColumnMeanCheckConfig.md delete mode 100644 docs/v2/DataHealth/models/ReplaceNumericColumnMedianCheckConfig.md delete mode 100644 docs/v2/DataHealth/models/ReplaceNumericColumnRangeCheckConfig.md delete mode 100644 docs/v2/DataHealth/models/ReplacePercentageCheckConfig.md delete mode 100644 docs/v2/DataHealth/models/ReplacePrimaryKeyCheckConfig.md delete mode 100644 docs/v2/DataHealth/models/ReplacePrimaryKeyConfig.md delete mode 100644 docs/v2/DataHealth/models/ReplaceSchemaComparisonCheckConfig.md delete mode 100644 docs/v2/DataHealth/models/ReplaceTotalColumnCountCheckConfig.md delete mode 100644 docs/v2/DataHealth/models/SchemaComparisonCheckConfig.md delete mode 100644 docs/v2/DataHealth/models/SchemaComparisonConfig.md delete mode 100644 docs/v2/DataHealth/models/SchemaComparisonType.md delete mode 100644 docs/v2/DataHealth/models/SchemaInfo.md delete mode 100644 docs/v2/DataHealth/models/SeverityLevel.md delete mode 100644 docs/v2/DataHealth/models/StatusCheckConfig.md delete mode 100644 docs/v2/DataHealth/models/StringColumnValue.md delete mode 100644 docs/v2/DataHealth/models/TimeBounds.md delete mode 100644 docs/v2/DataHealth/models/TimeBoundsConfig.md delete mode 100644 docs/v2/DataHealth/models/TimeCheckConfig.md delete mode 100644 docs/v2/DataHealth/models/TotalColumnCountCheckConfig.md delete mode 100644 docs/v2/DataHealth/models/TrendConfig.md delete mode 100644 docs/v2/DataHealth/models/TrendType.md delete mode 100644 docs/v2/Datasets/Branch.md delete mode 100644 docs/v2/Datasets/Dataset.md delete mode 100644 docs/v2/Datasets/File.md delete mode 100644 docs/v2/Datasets/Transaction.md delete mode 100644 docs/v2/Datasets/View.md delete mode 100644 docs/v2/Datasets/models/AddBackingDatasetsRequest.md delete mode 100644 docs/v2/Datasets/models/AddPrimaryKeyRequest.md delete mode 100644 docs/v2/Datasets/models/Branch.md delete mode 100644 docs/v2/Datasets/models/BranchName.md delete mode 100644 docs/v2/Datasets/models/CreateBranchRequest.md delete mode 100644 docs/v2/Datasets/models/CreateDatasetRequest.md delete mode 100644 docs/v2/Datasets/models/CreateTransactionRequest.md delete mode 100644 docs/v2/Datasets/models/CreateViewRequest.md delete mode 100644 docs/v2/Datasets/models/DataframeReader.md delete mode 100644 docs/v2/Datasets/models/Dataset.md delete mode 100644 docs/v2/Datasets/models/DatasetName.md delete mode 100644 docs/v2/Datasets/models/DatasetRid.md delete mode 100644 docs/v2/Datasets/models/File.md delete mode 100644 docs/v2/Datasets/models/FileUpdatedTime.md delete mode 100644 docs/v2/Datasets/models/GetDatasetJobsAndFilter.md delete mode 100644 docs/v2/Datasets/models/GetDatasetJobsComparisonType.md delete mode 100644 docs/v2/Datasets/models/GetDatasetJobsOrFilter.md delete mode 100644 docs/v2/Datasets/models/GetDatasetJobsQuery.md delete mode 100644 docs/v2/Datasets/models/GetDatasetJobsRequest.md delete mode 100644 docs/v2/Datasets/models/GetDatasetJobsSort.md delete mode 100644 docs/v2/Datasets/models/GetDatasetJobsSortDirection.md delete mode 100644 docs/v2/Datasets/models/GetDatasetJobsSortType.md delete mode 100644 docs/v2/Datasets/models/GetDatasetJobsTimeFilter.md delete mode 100644 docs/v2/Datasets/models/GetDatasetJobsTimeFilterField.md delete mode 100644 docs/v2/Datasets/models/GetDatasetSchemaResponse.md delete mode 100644 docs/v2/Datasets/models/GetJobResponse.md delete mode 100644 docs/v2/Datasets/models/GetSchemaDatasetsBatchRequestElement.md delete mode 100644 docs/v2/Datasets/models/GetSchemaDatasetsBatchResponse.md delete mode 100644 docs/v2/Datasets/models/JobDetails.md delete mode 100644 docs/v2/Datasets/models/ListBranchesResponse.md delete mode 100644 docs/v2/Datasets/models/ListFilesResponse.md delete mode 100644 docs/v2/Datasets/models/ListHealthChecksResponse.md delete mode 100644 docs/v2/Datasets/models/ListSchedulesResponse.md delete mode 100644 docs/v2/Datasets/models/ListTransactionsOfDatasetResponse.md delete mode 100644 docs/v2/Datasets/models/ListTransactionsResponse.md delete mode 100644 docs/v2/Datasets/models/PrimaryKeyLatestWinsResolutionStrategy.md delete mode 100644 docs/v2/Datasets/models/PrimaryKeyResolutionDuplicate.md delete mode 100644 docs/v2/Datasets/models/PrimaryKeyResolutionStrategy.md delete mode 100644 docs/v2/Datasets/models/PrimaryKeyResolutionUnique.md delete mode 100644 docs/v2/Datasets/models/PutDatasetSchemaRequest.md delete mode 100644 docs/v2/Datasets/models/RemoveBackingDatasetsRequest.md delete mode 100644 docs/v2/Datasets/models/ReplaceBackingDatasetsRequest.md delete mode 100644 docs/v2/Datasets/models/TableExportFormat.md delete mode 100644 docs/v2/Datasets/models/Transaction.md delete mode 100644 docs/v2/Datasets/models/TransactionCreatedTime.md delete mode 100644 docs/v2/Datasets/models/TransactionRid.md delete mode 100644 docs/v2/Datasets/models/TransactionStatus.md delete mode 100644 docs/v2/Datasets/models/TransactionType.md delete mode 100644 docs/v2/Datasets/models/View.md delete mode 100644 docs/v2/Datasets/models/ViewBackingDataset.md delete mode 100644 docs/v2/Datasets/models/ViewPrimaryKey.md delete mode 100644 docs/v2/Datasets/models/ViewPrimaryKeyResolution.md delete mode 100644 docs/v2/Filesystem/Folder.md delete mode 100644 docs/v2/Filesystem/Project.md delete mode 100644 docs/v2/Filesystem/Resource.md delete mode 100644 docs/v2/Filesystem/ResourceRole.md delete mode 100644 docs/v2/Filesystem/Space.md delete mode 100644 docs/v2/Filesystem/models/AccessRequirements.md delete mode 100644 docs/v2/Filesystem/models/AddMarkingsRequest.md delete mode 100644 docs/v2/Filesystem/models/AddOrganizationsRequest.md delete mode 100644 docs/v2/Filesystem/models/AddResourceRolesRequest.md delete mode 100644 docs/v2/Filesystem/models/CreateFolderRequest.md delete mode 100644 docs/v2/Filesystem/models/CreateProjectFromTemplateRequest.md delete mode 100644 docs/v2/Filesystem/models/CreateProjectRequest.md delete mode 100644 docs/v2/Filesystem/models/CreateSpaceRequest.md delete mode 100644 docs/v2/Filesystem/models/Everyone.md delete mode 100644 docs/v2/Filesystem/models/FileSystemId.md delete mode 100644 docs/v2/Filesystem/models/Folder.md delete mode 100644 docs/v2/Filesystem/models/FolderRid.md delete mode 100644 docs/v2/Filesystem/models/FolderType.md delete mode 100644 docs/v2/Filesystem/models/GetByPathResourcesBatchRequestElement.md delete mode 100644 docs/v2/Filesystem/models/GetByPathResourcesBatchResponse.md delete mode 100644 docs/v2/Filesystem/models/GetFoldersBatchRequestElement.md delete mode 100644 docs/v2/Filesystem/models/GetFoldersBatchResponse.md delete mode 100644 docs/v2/Filesystem/models/GetResourcesBatchRequestElement.md delete mode 100644 docs/v2/Filesystem/models/GetResourcesBatchResponse.md delete mode 100644 docs/v2/Filesystem/models/IsDirectlyApplied.md delete mode 100644 docs/v2/Filesystem/models/ListChildrenOfFolderResponse.md delete mode 100644 docs/v2/Filesystem/models/ListMarkingsOfResourceResponse.md delete mode 100644 docs/v2/Filesystem/models/ListOrganizationsOfProjectResponse.md delete mode 100644 docs/v2/Filesystem/models/ListResourceRolesResponse.md delete mode 100644 docs/v2/Filesystem/models/ListSpacesResponse.md delete mode 100644 docs/v2/Filesystem/models/Marking.md delete mode 100644 docs/v2/Filesystem/models/Organization.md delete mode 100644 docs/v2/Filesystem/models/PrincipalIdOnly.md delete mode 100644 docs/v2/Filesystem/models/PrincipalWithId.md delete mode 100644 docs/v2/Filesystem/models/Project.md delete mode 100644 docs/v2/Filesystem/models/ProjectRid.md delete mode 100644 docs/v2/Filesystem/models/ProjectTemplateRid.md delete mode 100644 docs/v2/Filesystem/models/ProjectTemplateVariableId.md delete mode 100644 docs/v2/Filesystem/models/ProjectTemplateVariableValue.md delete mode 100644 docs/v2/Filesystem/models/RemoveMarkingsRequest.md delete mode 100644 docs/v2/Filesystem/models/RemoveOrganizationsRequest.md delete mode 100644 docs/v2/Filesystem/models/RemoveResourceRolesRequest.md delete mode 100644 docs/v2/Filesystem/models/ReplaceProjectRequest.md delete mode 100644 docs/v2/Filesystem/models/ReplaceSpaceRequest.md delete mode 100644 docs/v2/Filesystem/models/Resource.md delete mode 100644 docs/v2/Filesystem/models/ResourceDisplayName.md delete mode 100644 docs/v2/Filesystem/models/ResourcePath.md delete mode 100644 docs/v2/Filesystem/models/ResourceRid.md delete mode 100644 docs/v2/Filesystem/models/ResourceRole.md delete mode 100644 docs/v2/Filesystem/models/ResourceRoleIdentifier.md delete mode 100644 docs/v2/Filesystem/models/ResourceRolePrincipal.md delete mode 100644 docs/v2/Filesystem/models/ResourceRolePrincipalIdentifier.md delete mode 100644 docs/v2/Filesystem/models/ResourceType.md delete mode 100644 docs/v2/Filesystem/models/Space.md delete mode 100644 docs/v2/Filesystem/models/SpaceMavenIdentifier.md delete mode 100644 docs/v2/Filesystem/models/SpaceRid.md delete mode 100644 docs/v2/Filesystem/models/TrashStatus.md delete mode 100644 docs/v2/Filesystem/models/UsageAccountRid.md delete mode 100644 docs/v2/Functions/Query.md delete mode 100644 docs/v2/Functions/ValueType.md delete mode 100644 docs/v2/Functions/VersionId.md delete mode 100644 docs/v2/Functions/models/ArrayConstraint.md delete mode 100644 docs/v2/Functions/models/DataValue.md delete mode 100644 docs/v2/Functions/models/EnumConstraint.md delete mode 100644 docs/v2/Functions/models/ExecuteQueryRequest.md delete mode 100644 docs/v2/Functions/models/ExecuteQueryResponse.md delete mode 100644 docs/v2/Functions/models/FunctionRid.md delete mode 100644 docs/v2/Functions/models/FunctionVersion.md delete mode 100644 docs/v2/Functions/models/GetByRidQueriesRequest.md delete mode 100644 docs/v2/Functions/models/LengthConstraint.md delete mode 100644 docs/v2/Functions/models/MapConstraint.md delete mode 100644 docs/v2/Functions/models/NullableConstraint.md delete mode 100644 docs/v2/Functions/models/NullableConstraintValue.md delete mode 100644 docs/v2/Functions/models/Parameter.md delete mode 100644 docs/v2/Functions/models/ParameterId.md delete mode 100644 docs/v2/Functions/models/Query.md delete mode 100644 docs/v2/Functions/models/QueryAggregationKeyType.md delete mode 100644 docs/v2/Functions/models/QueryAggregationRangeSubType.md delete mode 100644 docs/v2/Functions/models/QueryAggregationRangeType.md delete mode 100644 docs/v2/Functions/models/QueryAggregationValueType.md delete mode 100644 docs/v2/Functions/models/QueryApiName.md delete mode 100644 docs/v2/Functions/models/QueryArrayType.md delete mode 100644 docs/v2/Functions/models/QueryDataType.md delete mode 100644 docs/v2/Functions/models/QueryRuntimeErrorParameter.md delete mode 100644 docs/v2/Functions/models/QuerySetType.md delete mode 100644 docs/v2/Functions/models/QueryStructField.md delete mode 100644 docs/v2/Functions/models/QueryStructType.md delete mode 100644 docs/v2/Functions/models/QueryUnionType.md delete mode 100644 docs/v2/Functions/models/RangesConstraint.md delete mode 100644 docs/v2/Functions/models/RegexConstraint.md delete mode 100644 docs/v2/Functions/models/RidConstraint.md delete mode 100644 docs/v2/Functions/models/StreamingExecuteQueryRequest.md delete mode 100644 docs/v2/Functions/models/StructConstraint.md delete mode 100644 docs/v2/Functions/models/StructFieldApiName.md delete mode 100644 docs/v2/Functions/models/StructFieldName.md delete mode 100644 docs/v2/Functions/models/StructV1Constraint.md delete mode 100644 docs/v2/Functions/models/ThreeDimensionalAggregation.md delete mode 100644 docs/v2/Functions/models/TransactionId.md delete mode 100644 docs/v2/Functions/models/TwoDimensionalAggregation.md delete mode 100644 docs/v2/Functions/models/UuidConstraint.md delete mode 100644 docs/v2/Functions/models/ValueType.md delete mode 100644 docs/v2/Functions/models/ValueTypeApiName.md delete mode 100644 docs/v2/Functions/models/ValueTypeConstraint.md delete mode 100644 docs/v2/Functions/models/ValueTypeDataType.md delete mode 100644 docs/v2/Functions/models/ValueTypeDataTypeArrayType.md delete mode 100644 docs/v2/Functions/models/ValueTypeDataTypeBinaryType.md delete mode 100644 docs/v2/Functions/models/ValueTypeDataTypeBooleanType.md delete mode 100644 docs/v2/Functions/models/ValueTypeDataTypeByteType.md delete mode 100644 docs/v2/Functions/models/ValueTypeDataTypeDateType.md delete mode 100644 docs/v2/Functions/models/ValueTypeDataTypeDecimalType.md delete mode 100644 docs/v2/Functions/models/ValueTypeDataTypeDoubleType.md delete mode 100644 docs/v2/Functions/models/ValueTypeDataTypeFloatType.md delete mode 100644 docs/v2/Functions/models/ValueTypeDataTypeIntegerType.md delete mode 100644 docs/v2/Functions/models/ValueTypeDataTypeLongType.md delete mode 100644 docs/v2/Functions/models/ValueTypeDataTypeMapType.md delete mode 100644 docs/v2/Functions/models/ValueTypeDataTypeOptionalType.md delete mode 100644 docs/v2/Functions/models/ValueTypeDataTypeShortType.md delete mode 100644 docs/v2/Functions/models/ValueTypeDataTypeStringType.md delete mode 100644 docs/v2/Functions/models/ValueTypeDataTypeStructElement.md delete mode 100644 docs/v2/Functions/models/ValueTypeDataTypeStructFieldIdentifier.md delete mode 100644 docs/v2/Functions/models/ValueTypeDataTypeStructType.md delete mode 100644 docs/v2/Functions/models/ValueTypeDataTypeTimestampType.md delete mode 100644 docs/v2/Functions/models/ValueTypeDataTypeUnionType.md delete mode 100644 docs/v2/Functions/models/ValueTypeDataTypeValueTypeReference.md delete mode 100644 docs/v2/Functions/models/ValueTypeDescription.md delete mode 100644 docs/v2/Functions/models/ValueTypeReference.md delete mode 100644 docs/v2/Functions/models/ValueTypeRid.md delete mode 100644 docs/v2/Functions/models/ValueTypeVersion.md delete mode 100644 docs/v2/Functions/models/ValueTypeVersionId.md delete mode 100644 docs/v2/Functions/models/VersionId.md delete mode 100644 docs/v2/Geo/models/BBox.md delete mode 100644 docs/v2/Geo/models/Coordinate.md delete mode 100644 docs/v2/Geo/models/Feature.md delete mode 100644 docs/v2/Geo/models/FeatureCollection.md delete mode 100644 docs/v2/Geo/models/FeatureCollectionTypes.md delete mode 100644 docs/v2/Geo/models/FeaturePropertyKey.md delete mode 100644 docs/v2/Geo/models/GeoPoint.md delete mode 100644 docs/v2/Geo/models/Geometry.md delete mode 100644 docs/v2/Geo/models/GeometryCollection.md delete mode 100644 docs/v2/Geo/models/LineString.md delete mode 100644 docs/v2/Geo/models/LineStringCoordinates.md delete mode 100644 docs/v2/Geo/models/LinearRing.md delete mode 100644 docs/v2/Geo/models/MultiLineString.md delete mode 100644 docs/v2/Geo/models/MultiPoint.md delete mode 100644 docs/v2/Geo/models/MultiPolygon.md delete mode 100644 docs/v2/Geo/models/Polygon.md delete mode 100644 docs/v2/Geo/models/Position.md delete mode 100644 docs/v2/LanguageModels/AnthropicModel.md delete mode 100644 docs/v2/LanguageModels/OpenAiModel.md delete mode 100644 docs/v2/LanguageModels/models/AnthropicAnyToolChoice.md delete mode 100644 docs/v2/LanguageModels/models/AnthropicAutoToolChoice.md delete mode 100644 docs/v2/LanguageModels/models/AnthropicBase64PdfDocumentSource.md delete mode 100644 docs/v2/LanguageModels/models/AnthropicCacheControl.md delete mode 100644 docs/v2/LanguageModels/models/AnthropicCharacterLocationCitation.md delete mode 100644 docs/v2/LanguageModels/models/AnthropicCompletionCitation.md delete mode 100644 docs/v2/LanguageModels/models/AnthropicCompletionContent.md delete mode 100644 docs/v2/LanguageModels/models/AnthropicCompletionRedactedThinking.md delete mode 100644 docs/v2/LanguageModels/models/AnthropicCompletionText.md delete mode 100644 docs/v2/LanguageModels/models/AnthropicCompletionThinking.md delete mode 100644 docs/v2/LanguageModels/models/AnthropicCompletionToolUse.md delete mode 100644 docs/v2/LanguageModels/models/AnthropicCustomTool.md delete mode 100644 docs/v2/LanguageModels/models/AnthropicDisableParallelToolUse.md delete mode 100644 docs/v2/LanguageModels/models/AnthropicDisabledThinking.md delete mode 100644 docs/v2/LanguageModels/models/AnthropicDocument.md delete mode 100644 docs/v2/LanguageModels/models/AnthropicDocumentCitations.md delete mode 100644 docs/v2/LanguageModels/models/AnthropicDocumentSource.md delete mode 100644 docs/v2/LanguageModels/models/AnthropicEnabledThinking.md delete mode 100644 docs/v2/LanguageModels/models/AnthropicEphemeralCacheControl.md delete mode 100644 docs/v2/LanguageModels/models/AnthropicImage.md delete mode 100644 docs/v2/LanguageModels/models/AnthropicImageBase64Source.md delete mode 100644 docs/v2/LanguageModels/models/AnthropicImageSource.md delete mode 100644 docs/v2/LanguageModels/models/AnthropicMediaType.md delete mode 100644 docs/v2/LanguageModels/models/AnthropicMessage.md delete mode 100644 docs/v2/LanguageModels/models/AnthropicMessageContent.md delete mode 100644 docs/v2/LanguageModels/models/AnthropicMessageRole.md delete mode 100644 docs/v2/LanguageModels/models/AnthropicMessagesRequest.md delete mode 100644 docs/v2/LanguageModels/models/AnthropicMessagesResponse.md delete mode 100644 docs/v2/LanguageModels/models/AnthropicNoneToolChoice.md delete mode 100644 docs/v2/LanguageModels/models/AnthropicRedactedThinking.md delete mode 100644 docs/v2/LanguageModels/models/AnthropicSystemMessage.md delete mode 100644 docs/v2/LanguageModels/models/AnthropicText.md delete mode 100644 docs/v2/LanguageModels/models/AnthropicTextDocumentSource.md delete mode 100644 docs/v2/LanguageModels/models/AnthropicThinking.md delete mode 100644 docs/v2/LanguageModels/models/AnthropicThinkingConfig.md delete mode 100644 docs/v2/LanguageModels/models/AnthropicTokenUsage.md delete mode 100644 docs/v2/LanguageModels/models/AnthropicTool.md delete mode 100644 docs/v2/LanguageModels/models/AnthropicToolChoice.md delete mode 100644 docs/v2/LanguageModels/models/AnthropicToolResult.md delete mode 100644 docs/v2/LanguageModels/models/AnthropicToolResultContent.md delete mode 100644 docs/v2/LanguageModels/models/AnthropicToolToolChoice.md delete mode 100644 docs/v2/LanguageModels/models/AnthropicToolUse.md delete mode 100644 docs/v2/LanguageModels/models/JsonSchema.md delete mode 100644 docs/v2/LanguageModels/models/LanguageModelApiName.md delete mode 100644 docs/v2/LanguageModels/models/OpenAiEmbeddingInput.md delete mode 100644 docs/v2/LanguageModels/models/OpenAiEmbeddingTokenUsage.md delete mode 100644 docs/v2/LanguageModels/models/OpenAiEmbeddingsRequest.md delete mode 100644 docs/v2/LanguageModels/models/OpenAiEmbeddingsResponse.md delete mode 100644 docs/v2/LanguageModels/models/OpenAiEncodingFormat.md delete mode 100644 docs/v2/MediaSets/MediaSet.md delete mode 100644 docs/v2/MediaSets/models/BranchName.md delete mode 100644 docs/v2/MediaSets/models/BranchRid.md delete mode 100644 docs/v2/MediaSets/models/GetMediaItemInfoResponse.md delete mode 100644 docs/v2/MediaSets/models/GetMediaItemRidByPathResponse.md delete mode 100644 docs/v2/MediaSets/models/LogicalTimestamp.md delete mode 100644 docs/v2/MediaSets/models/MediaAttribution.md delete mode 100644 docs/v2/MediaSets/models/MediaItemXmlFormat.md delete mode 100644 docs/v2/MediaSets/models/PutMediaItemResponse.md delete mode 100644 docs/v2/MediaSets/models/TrackedTransformationFailedResponse.md delete mode 100644 docs/v2/MediaSets/models/TrackedTransformationPendingResponse.md delete mode 100644 docs/v2/MediaSets/models/TrackedTransformationResponse.md delete mode 100644 docs/v2/MediaSets/models/TrackedTransformationSuccessfulResponse.md delete mode 100644 docs/v2/MediaSets/models/TransactionId.md delete mode 100644 docs/v2/Models/Model.md delete mode 100644 docs/v2/Models/ModelVersion.md delete mode 100644 docs/v2/Models/models/CreateModelRequest.md delete mode 100644 docs/v2/Models/models/CreateModelVersionRequest.md delete mode 100644 docs/v2/Models/models/DillModelFiles.md delete mode 100644 docs/v2/Models/models/ListModelVersionsResponse.md delete mode 100644 docs/v2/Models/models/Model.md delete mode 100644 docs/v2/Models/models/ModelApi.md delete mode 100644 docs/v2/Models/models/ModelApiAnyType.md delete mode 100644 docs/v2/Models/models/ModelApiArrayType.md delete mode 100644 docs/v2/Models/models/ModelApiColumn.md delete mode 100644 docs/v2/Models/models/ModelApiDataType.md delete mode 100644 docs/v2/Models/models/ModelApiInput.md delete mode 100644 docs/v2/Models/models/ModelApiMapType.md delete mode 100644 docs/v2/Models/models/ModelApiOutput.md delete mode 100644 docs/v2/Models/models/ModelApiParameterType.md delete mode 100644 docs/v2/Models/models/ModelApiTabularFormat.md delete mode 100644 docs/v2/Models/models/ModelApiTabularType.md delete mode 100644 docs/v2/Models/models/ModelFiles.md delete mode 100644 docs/v2/Models/models/ModelName.md delete mode 100644 docs/v2/Models/models/ModelRid.md delete mode 100644 docs/v2/Models/models/ModelVersion.md delete mode 100644 docs/v2/Models/models/ModelVersionRid.md delete mode 100644 docs/v2/Ontologies/Action.md delete mode 100644 docs/v2/Ontologies/ActionType.md delete mode 100644 docs/v2/Ontologies/ActionTypeFullMetadata.md delete mode 100644 docs/v2/Ontologies/Attachment.md delete mode 100644 docs/v2/Ontologies/AttachmentProperty.md delete mode 100644 docs/v2/Ontologies/CipherTextProperty.md delete mode 100644 docs/v2/Ontologies/LinkedObject.md delete mode 100644 docs/v2/Ontologies/MediaReferenceProperty.md delete mode 100644 docs/v2/Ontologies/ObjectType.md delete mode 100644 docs/v2/Ontologies/Ontology.md delete mode 100644 docs/v2/Ontologies/OntologyInterface.md delete mode 100644 docs/v2/Ontologies/OntologyObject.md delete mode 100644 docs/v2/Ontologies/OntologyObjectSet.md delete mode 100644 docs/v2/Ontologies/OntologyTransaction.md delete mode 100644 docs/v2/Ontologies/OntologyValueType.md delete mode 100644 docs/v2/Ontologies/Query.md delete mode 100644 docs/v2/Ontologies/QueryType.md delete mode 100644 docs/v2/Ontologies/TimeSeriesPropertyV2.md delete mode 100644 docs/v2/Ontologies/TimeSeriesValueBankProperty.md delete mode 100644 docs/v2/Ontologies/models/AbsoluteTimeRange.md delete mode 100644 docs/v2/Ontologies/models/AbsoluteValuePropertyExpression.md delete mode 100644 docs/v2/Ontologies/models/ActionExecutionTime.md delete mode 100644 docs/v2/Ontologies/models/ActionLogicRule.md delete mode 100644 docs/v2/Ontologies/models/ActionParameterArrayType.md delete mode 100644 docs/v2/Ontologies/models/ActionParameterType.md delete mode 100644 docs/v2/Ontologies/models/ActionParameterV2.md delete mode 100644 docs/v2/Ontologies/models/ActionResults.md delete mode 100644 docs/v2/Ontologies/models/ActionRid.md delete mode 100644 docs/v2/Ontologies/models/ActionTypeApiName.md delete mode 100644 docs/v2/Ontologies/models/ActionTypeFullMetadata.md delete mode 100644 docs/v2/Ontologies/models/ActionTypeRid.md delete mode 100644 docs/v2/Ontologies/models/ActionTypeV2.md delete mode 100644 docs/v2/Ontologies/models/ActivePropertyTypeStatus.md delete mode 100644 docs/v2/Ontologies/models/AddLink.md delete mode 100644 docs/v2/Ontologies/models/AddLinkEdit.md delete mode 100644 docs/v2/Ontologies/models/AddObject.md delete mode 100644 docs/v2/Ontologies/models/AddObjectEdit.md delete mode 100644 docs/v2/Ontologies/models/AddPropertyExpression.md delete mode 100644 docs/v2/Ontologies/models/Affix.md delete mode 100644 docs/v2/Ontologies/models/AggregateObjectSetRequestV2.md delete mode 100644 docs/v2/Ontologies/models/AggregateObjectsRequestV2.md delete mode 100644 docs/v2/Ontologies/models/AggregateObjectsResponseItemV2.md delete mode 100644 docs/v2/Ontologies/models/AggregateObjectsResponseV2.md delete mode 100644 docs/v2/Ontologies/models/AggregateTimeSeries.md delete mode 100644 docs/v2/Ontologies/models/AggregationAccuracy.md delete mode 100644 docs/v2/Ontologies/models/AggregationAccuracyRequest.md delete mode 100644 docs/v2/Ontologies/models/AggregationDurationGroupingV2.md delete mode 100644 docs/v2/Ontologies/models/AggregationExactGroupingV2.md delete mode 100644 docs/v2/Ontologies/models/AggregationFixedWidthGroupingV2.md delete mode 100644 docs/v2/Ontologies/models/AggregationGroupByV2.md delete mode 100644 docs/v2/Ontologies/models/AggregationGroupKeyV2.md delete mode 100644 docs/v2/Ontologies/models/AggregationGroupValueV2.md delete mode 100644 docs/v2/Ontologies/models/AggregationMetricName.md delete mode 100644 docs/v2/Ontologies/models/AggregationMetricResultV2.md delete mode 100644 docs/v2/Ontologies/models/AggregationRangeV2.md delete mode 100644 docs/v2/Ontologies/models/AggregationRangesGroupingV2.md delete mode 100644 docs/v2/Ontologies/models/AggregationV2.md delete mode 100644 docs/v2/Ontologies/models/AllOfRule.md delete mode 100644 docs/v2/Ontologies/models/AndQueryV2.md delete mode 100644 docs/v2/Ontologies/models/AnyOfRule.md delete mode 100644 docs/v2/Ontologies/models/ApplyActionMode.md delete mode 100644 docs/v2/Ontologies/models/ApplyActionOverrides.md delete mode 100644 docs/v2/Ontologies/models/ApplyActionRequestOptions.md delete mode 100644 docs/v2/Ontologies/models/ApplyActionRequestV2.md delete mode 100644 docs/v2/Ontologies/models/ApplyActionWithOverridesRequest.md delete mode 100644 docs/v2/Ontologies/models/ApplyReducersAndExtractMainValueLoadLevel.md delete mode 100644 docs/v2/Ontologies/models/ApplyReducersLoadLevel.md delete mode 100644 docs/v2/Ontologies/models/ApproximateDistinctAggregationV2.md delete mode 100644 docs/v2/Ontologies/models/ApproximatePercentileAggregationV2.md delete mode 100644 docs/v2/Ontologies/models/ArrayConstraint.md delete mode 100644 docs/v2/Ontologies/models/ArrayEntryEvaluatedConstraint.md delete mode 100644 docs/v2/Ontologies/models/ArrayEvaluatedConstraint.md delete mode 100644 docs/v2/Ontologies/models/ArraySizeConstraint.md delete mode 100644 docs/v2/Ontologies/models/ArtifactRepositoryRid.md delete mode 100644 docs/v2/Ontologies/models/AttachmentMetadataResponse.md delete mode 100644 docs/v2/Ontologies/models/AttachmentRid.md delete mode 100644 docs/v2/Ontologies/models/AttachmentV2.md delete mode 100644 docs/v2/Ontologies/models/AvgAggregationV2.md delete mode 100644 docs/v2/Ontologies/models/BatchActionObjectEdit.md delete mode 100644 docs/v2/Ontologies/models/BatchActionObjectEdits.md delete mode 100644 docs/v2/Ontologies/models/BatchActionResults.md delete mode 100644 docs/v2/Ontologies/models/BatchApplyActionRequestItem.md delete mode 100644 docs/v2/Ontologies/models/BatchApplyActionRequestOptions.md delete mode 100644 docs/v2/Ontologies/models/BatchApplyActionRequestV2.md delete mode 100644 docs/v2/Ontologies/models/BatchApplyActionResponseV2.md delete mode 100644 docs/v2/Ontologies/models/BatchReturnEditsMode.md delete mode 100644 docs/v2/Ontologies/models/BatchedFunctionLogicRule.md delete mode 100644 docs/v2/Ontologies/models/BlueprintIcon.md delete mode 100644 docs/v2/Ontologies/models/BoundingBoxValue.md delete mode 100644 docs/v2/Ontologies/models/CenterPoint.md delete mode 100644 docs/v2/Ontologies/models/CenterPointTypes.md delete mode 100644 docs/v2/Ontologies/models/ContainsAllTermsInOrderPrefixLastTerm.md delete mode 100644 docs/v2/Ontologies/models/ContainsAllTermsInOrderQuery.md delete mode 100644 docs/v2/Ontologies/models/ContainsAllTermsQuery.md delete mode 100644 docs/v2/Ontologies/models/ContainsAnyTermQuery.md delete mode 100644 docs/v2/Ontologies/models/ContainsQueryV2.md delete mode 100644 docs/v2/Ontologies/models/CountAggregationV2.md delete mode 100644 docs/v2/Ontologies/models/CountObjectsResponseV2.md delete mode 100644 docs/v2/Ontologies/models/CreateInterfaceLinkLogicRule.md delete mode 100644 docs/v2/Ontologies/models/CreateInterfaceLogicRule.md delete mode 100644 docs/v2/Ontologies/models/CreateInterfaceObjectRule.md delete mode 100644 docs/v2/Ontologies/models/CreateLinkLogicRule.md delete mode 100644 docs/v2/Ontologies/models/CreateLinkRule.md delete mode 100644 docs/v2/Ontologies/models/CreateObjectLogicRule.md delete mode 100644 docs/v2/Ontologies/models/CreateObjectRule.md delete mode 100644 docs/v2/Ontologies/models/CreateOrModifyObjectLogicRule.md delete mode 100644 docs/v2/Ontologies/models/CreateOrModifyObjectLogicRuleV2.md delete mode 100644 docs/v2/Ontologies/models/CreateTemporaryObjectSetRequestV2.md delete mode 100644 docs/v2/Ontologies/models/CreateTemporaryObjectSetResponseV2.md delete mode 100644 docs/v2/Ontologies/models/CurrentTimeArgument.md delete mode 100644 docs/v2/Ontologies/models/CurrentUserArgument.md delete mode 100644 docs/v2/Ontologies/models/DataValue.md delete mode 100644 docs/v2/Ontologies/models/DatetimeFormat.md delete mode 100644 docs/v2/Ontologies/models/DatetimeLocalizedFormat.md delete mode 100644 docs/v2/Ontologies/models/DatetimeLocalizedFormatType.md delete mode 100644 docs/v2/Ontologies/models/DatetimeStringFormat.md delete mode 100644 docs/v2/Ontologies/models/DatetimeTimezone.md delete mode 100644 docs/v2/Ontologies/models/DatetimeTimezoneStatic.md delete mode 100644 docs/v2/Ontologies/models/DatetimeTimezoneUser.md delete mode 100644 docs/v2/Ontologies/models/DecryptionResult.md delete mode 100644 docs/v2/Ontologies/models/DeleteInterfaceLinkLogicRule.md delete mode 100644 docs/v2/Ontologies/models/DeleteInterfaceObjectRule.md delete mode 100644 docs/v2/Ontologies/models/DeleteLink.md delete mode 100644 docs/v2/Ontologies/models/DeleteLinkEdit.md delete mode 100644 docs/v2/Ontologies/models/DeleteLinkLogicRule.md delete mode 100644 docs/v2/Ontologies/models/DeleteLinkRule.md delete mode 100644 docs/v2/Ontologies/models/DeleteObject.md delete mode 100644 docs/v2/Ontologies/models/DeleteObjectEdit.md delete mode 100644 docs/v2/Ontologies/models/DeleteObjectLogicRule.md delete mode 100644 docs/v2/Ontologies/models/DeleteObjectRule.md delete mode 100644 docs/v2/Ontologies/models/DeprecatedPropertyTypeStatus.md delete mode 100644 docs/v2/Ontologies/models/DerivedPropertyApiName.md delete mode 100644 docs/v2/Ontologies/models/DerivedPropertyDefinition.md delete mode 100644 docs/v2/Ontologies/models/DividePropertyExpression.md delete mode 100644 docs/v2/Ontologies/models/DoesNotIntersectBoundingBoxQuery.md delete mode 100644 docs/v2/Ontologies/models/DoesNotIntersectPolygonQuery.md delete mode 100644 docs/v2/Ontologies/models/DoubleVector.md delete mode 100644 docs/v2/Ontologies/models/DurationBaseValue.md delete mode 100644 docs/v2/Ontologies/models/DurationFormatStyle.md delete mode 100644 docs/v2/Ontologies/models/DurationPrecision.md delete mode 100644 docs/v2/Ontologies/models/EntrySetType.md delete mode 100644 docs/v2/Ontologies/models/EnumConstraint.md delete mode 100644 docs/v2/Ontologies/models/EqualsQueryV2.md delete mode 100644 docs/v2/Ontologies/models/ExactDistinctAggregationV2.md delete mode 100644 docs/v2/Ontologies/models/ExamplePropertyTypeStatus.md delete mode 100644 docs/v2/Ontologies/models/ExecuteQueryRequest.md delete mode 100644 docs/v2/Ontologies/models/ExecuteQueryResponse.md delete mode 100644 docs/v2/Ontologies/models/ExperimentalPropertyTypeStatus.md delete mode 100644 docs/v2/Ontologies/models/ExtractDatePart.md delete mode 100644 docs/v2/Ontologies/models/ExtractMainValueLoadLevel.md delete mode 100644 docs/v2/Ontologies/models/ExtractPropertyExpression.md delete mode 100644 docs/v2/Ontologies/models/FilterValue.md delete mode 100644 docs/v2/Ontologies/models/FixedValuesMapKey.md delete mode 100644 docs/v2/Ontologies/models/FunctionLogicRule.md delete mode 100644 docs/v2/Ontologies/models/FunctionParameterName.md delete mode 100644 docs/v2/Ontologies/models/FunctionRid.md delete mode 100644 docs/v2/Ontologies/models/FunctionVersion.md delete mode 100644 docs/v2/Ontologies/models/FuzzyV2.md delete mode 100644 docs/v2/Ontologies/models/GetSelectedPropertyOperation.md delete mode 100644 docs/v2/Ontologies/models/GreatestPropertyExpression.md delete mode 100644 docs/v2/Ontologies/models/GroupMemberConstraint.md delete mode 100644 docs/v2/Ontologies/models/GtQueryV2.md delete mode 100644 docs/v2/Ontologies/models/GteQueryV2.md delete mode 100644 docs/v2/Ontologies/models/HumanReadableFormat.md delete mode 100644 docs/v2/Ontologies/models/Icon.md delete mode 100644 docs/v2/Ontologies/models/InQuery.md delete mode 100644 docs/v2/Ontologies/models/InterfaceDefinedPropertyType.md delete mode 100644 docs/v2/Ontologies/models/InterfaceLinkType.md delete mode 100644 docs/v2/Ontologies/models/InterfaceLinkTypeApiName.md delete mode 100644 docs/v2/Ontologies/models/InterfaceLinkTypeCardinality.md delete mode 100644 docs/v2/Ontologies/models/InterfaceLinkTypeLinkedEntityApiName.md delete mode 100644 docs/v2/Ontologies/models/InterfaceLinkTypeRid.md delete mode 100644 docs/v2/Ontologies/models/InterfaceParameterPropertyArgument.md delete mode 100644 docs/v2/Ontologies/models/InterfacePropertyApiName.md delete mode 100644 docs/v2/Ontologies/models/InterfacePropertyLocalPropertyImplementation.md delete mode 100644 docs/v2/Ontologies/models/InterfacePropertyReducedPropertyImplementation.md delete mode 100644 docs/v2/Ontologies/models/InterfacePropertyStructFieldImplementation.md delete mode 100644 docs/v2/Ontologies/models/InterfacePropertyStructImplementation.md delete mode 100644 docs/v2/Ontologies/models/InterfacePropertyStructImplementationMapping.md delete mode 100644 docs/v2/Ontologies/models/InterfacePropertyType.md delete mode 100644 docs/v2/Ontologies/models/InterfacePropertyTypeImplementation.md delete mode 100644 docs/v2/Ontologies/models/InterfacePropertyTypeRid.md delete mode 100644 docs/v2/Ontologies/models/InterfaceSharedPropertyType.md delete mode 100644 docs/v2/Ontologies/models/InterfaceToObjectTypeMapping.md delete mode 100644 docs/v2/Ontologies/models/InterfaceToObjectTypeMappingV2.md delete mode 100644 docs/v2/Ontologies/models/InterfaceToObjectTypeMappings.md delete mode 100644 docs/v2/Ontologies/models/InterfaceToObjectTypeMappingsV2.md delete mode 100644 docs/v2/Ontologies/models/InterfaceType.md delete mode 100644 docs/v2/Ontologies/models/InterfaceTypeApiName.md delete mode 100644 docs/v2/Ontologies/models/InterfaceTypeRid.md delete mode 100644 docs/v2/Ontologies/models/IntersectsBoundingBoxQuery.md delete mode 100644 docs/v2/Ontologies/models/IntersectsPolygonQuery.md delete mode 100644 docs/v2/Ontologies/models/IntervalQuery.md delete mode 100644 docs/v2/Ontologies/models/IntervalQueryRule.md delete mode 100644 docs/v2/Ontologies/models/IsNullQueryV2.md delete mode 100644 docs/v2/Ontologies/models/KnownType.md delete mode 100644 docs/v2/Ontologies/models/LeastPropertyExpression.md delete mode 100644 docs/v2/Ontologies/models/LengthConstraint.md delete mode 100644 docs/v2/Ontologies/models/LinkSideObject.md delete mode 100644 docs/v2/Ontologies/models/LinkTypeApiName.md delete mode 100644 docs/v2/Ontologies/models/LinkTypeId.md delete mode 100644 docs/v2/Ontologies/models/LinkTypeRid.md delete mode 100644 docs/v2/Ontologies/models/LinkTypeSideCardinality.md delete mode 100644 docs/v2/Ontologies/models/LinkTypeSideV2.md delete mode 100644 docs/v2/Ontologies/models/LinkedInterfaceTypeApiName.md delete mode 100644 docs/v2/Ontologies/models/LinkedObjectLocator.md delete mode 100644 docs/v2/Ontologies/models/LinkedObjectTypeApiName.md delete mode 100644 docs/v2/Ontologies/models/LinksFromObject.md delete mode 100644 docs/v2/Ontologies/models/ListActionTypesFullMetadataResponse.md delete mode 100644 docs/v2/Ontologies/models/ListActionTypesResponseV2.md delete mode 100644 docs/v2/Ontologies/models/ListAttachmentsResponseV2.md delete mode 100644 docs/v2/Ontologies/models/ListInterfaceLinkedObjectsResponse.md delete mode 100644 docs/v2/Ontologies/models/ListInterfaceTypesResponse.md delete mode 100644 docs/v2/Ontologies/models/ListLinkedObjectsResponseV2.md delete mode 100644 docs/v2/Ontologies/models/ListObjectTypesV2Response.md delete mode 100644 docs/v2/Ontologies/models/ListObjectsForInterfaceResponse.md delete mode 100644 docs/v2/Ontologies/models/ListObjectsResponseV2.md delete mode 100644 docs/v2/Ontologies/models/ListOntologiesV2Response.md delete mode 100644 docs/v2/Ontologies/models/ListOntologyValueTypesResponse.md delete mode 100644 docs/v2/Ontologies/models/ListOutgoingInterfaceLinkTypesResponse.md delete mode 100644 docs/v2/Ontologies/models/ListOutgoingLinkTypesResponseV2.md delete mode 100644 docs/v2/Ontologies/models/ListQueryTypesResponseV2.md delete mode 100644 docs/v2/Ontologies/models/LoadObjectSetLinksRequestV2.md delete mode 100644 docs/v2/Ontologies/models/LoadObjectSetLinksResponseV2.md delete mode 100644 docs/v2/Ontologies/models/LoadObjectSetRequestV2.md delete mode 100644 docs/v2/Ontologies/models/LoadObjectSetResponseV2.md delete mode 100644 docs/v2/Ontologies/models/LoadObjectSetV2MultipleObjectTypesRequest.md delete mode 100644 docs/v2/Ontologies/models/LoadObjectSetV2MultipleObjectTypesResponse.md delete mode 100644 docs/v2/Ontologies/models/LoadObjectSetV2ObjectsOrInterfacesRequest.md delete mode 100644 docs/v2/Ontologies/models/LoadObjectSetV2ObjectsOrInterfacesResponse.md delete mode 100644 docs/v2/Ontologies/models/LoadOntologyMetadataRequest.md delete mode 100644 docs/v2/Ontologies/models/LogicRule.md delete mode 100644 docs/v2/Ontologies/models/LogicRuleArgument.md delete mode 100644 docs/v2/Ontologies/models/LtQueryV2.md delete mode 100644 docs/v2/Ontologies/models/LteQueryV2.md delete mode 100644 docs/v2/Ontologies/models/MatchRule.md delete mode 100644 docs/v2/Ontologies/models/MaxAggregationV2.md delete mode 100644 docs/v2/Ontologies/models/MediaMetadata.md delete mode 100644 docs/v2/Ontologies/models/MethodObjectSet.md delete mode 100644 docs/v2/Ontologies/models/MinAggregationV2.md delete mode 100644 docs/v2/Ontologies/models/ModifyInterfaceLogicRule.md delete mode 100644 docs/v2/Ontologies/models/ModifyInterfaceObjectRule.md delete mode 100644 docs/v2/Ontologies/models/ModifyObject.md delete mode 100644 docs/v2/Ontologies/models/ModifyObjectEdit.md delete mode 100644 docs/v2/Ontologies/models/ModifyObjectLogicRule.md delete mode 100644 docs/v2/Ontologies/models/ModifyObjectRule.md delete mode 100644 docs/v2/Ontologies/models/MultiplyPropertyExpression.md delete mode 100644 docs/v2/Ontologies/models/NearestNeighborsQuery.md delete mode 100644 docs/v2/Ontologies/models/NearestNeighborsQueryText.md delete mode 100644 docs/v2/Ontologies/models/NegatePropertyExpression.md delete mode 100644 docs/v2/Ontologies/models/NestedInterfacePropertyTypeImplementation.md delete mode 100644 docs/v2/Ontologies/models/NestedQueryAggregation.md delete mode 100644 docs/v2/Ontologies/models/NotQueryV2.md delete mode 100644 docs/v2/Ontologies/models/NumberFormatAffix.md delete mode 100644 docs/v2/Ontologies/models/NumberFormatCurrency.md delete mode 100644 docs/v2/Ontologies/models/NumberFormatCurrencyStyle.md delete mode 100644 docs/v2/Ontologies/models/NumberFormatCustomUnit.md delete mode 100644 docs/v2/Ontologies/models/NumberFormatDuration.md delete mode 100644 docs/v2/Ontologies/models/NumberFormatFixedValues.md delete mode 100644 docs/v2/Ontologies/models/NumberFormatNotation.md delete mode 100644 docs/v2/Ontologies/models/NumberFormatOptions.md delete mode 100644 docs/v2/Ontologies/models/NumberFormatRatio.md delete mode 100644 docs/v2/Ontologies/models/NumberFormatScale.md delete mode 100644 docs/v2/Ontologies/models/NumberFormatStandard.md delete mode 100644 docs/v2/Ontologies/models/NumberFormatStandardUnit.md delete mode 100644 docs/v2/Ontologies/models/NumberRatioType.md delete mode 100644 docs/v2/Ontologies/models/NumberRoundingMode.md delete mode 100644 docs/v2/Ontologies/models/NumberScaleType.md delete mode 100644 docs/v2/Ontologies/models/ObjectEdit.md delete mode 100644 docs/v2/Ontologies/models/ObjectEdits.md delete mode 100644 docs/v2/Ontologies/models/ObjectParameterPropertyArgument.md delete mode 100644 docs/v2/Ontologies/models/ObjectPropertyType.md delete mode 100644 docs/v2/Ontologies/models/ObjectPropertyValueConstraint.md delete mode 100644 docs/v2/Ontologies/models/ObjectQueryResultConstraint.md delete mode 100644 docs/v2/Ontologies/models/ObjectRid.md delete mode 100644 docs/v2/Ontologies/models/ObjectSet.md delete mode 100644 docs/v2/Ontologies/models/ObjectSetAsBaseObjectTypesType.md delete mode 100644 docs/v2/Ontologies/models/ObjectSetAsTypeType.md delete mode 100644 docs/v2/Ontologies/models/ObjectSetBaseType.md delete mode 100644 docs/v2/Ontologies/models/ObjectSetFilterType.md delete mode 100644 docs/v2/Ontologies/models/ObjectSetInterfaceBaseType.md delete mode 100644 docs/v2/Ontologies/models/ObjectSetInterfaceLinkSearchAroundType.md delete mode 100644 docs/v2/Ontologies/models/ObjectSetIntersectionType.md delete mode 100644 docs/v2/Ontologies/models/ObjectSetMethodInputType.md delete mode 100644 docs/v2/Ontologies/models/ObjectSetNearestNeighborsType.md delete mode 100644 docs/v2/Ontologies/models/ObjectSetReferenceType.md delete mode 100644 docs/v2/Ontologies/models/ObjectSetRid.md delete mode 100644 docs/v2/Ontologies/models/ObjectSetSearchAroundType.md delete mode 100644 docs/v2/Ontologies/models/ObjectSetStaticType.md delete mode 100644 docs/v2/Ontologies/models/ObjectSetSubtractType.md delete mode 100644 docs/v2/Ontologies/models/ObjectSetUnionType.md delete mode 100644 docs/v2/Ontologies/models/ObjectSetWithPropertiesType.md delete mode 100644 docs/v2/Ontologies/models/ObjectTypeApiName.md delete mode 100644 docs/v2/Ontologies/models/ObjectTypeEdits.md delete mode 100644 docs/v2/Ontologies/models/ObjectTypeFullMetadata.md delete mode 100644 docs/v2/Ontologies/models/ObjectTypeId.md delete mode 100644 docs/v2/Ontologies/models/ObjectTypeInterfaceImplementation.md delete mode 100644 docs/v2/Ontologies/models/ObjectTypeRid.md delete mode 100644 docs/v2/Ontologies/models/ObjectTypeV2.md delete mode 100644 docs/v2/Ontologies/models/ObjectTypeVisibility.md delete mode 100644 docs/v2/Ontologies/models/OneOfConstraint.md delete mode 100644 docs/v2/Ontologies/models/OntologyApiName.md delete mode 100644 docs/v2/Ontologies/models/OntologyArrayType.md delete mode 100644 docs/v2/Ontologies/models/OntologyDataType.md delete mode 100644 docs/v2/Ontologies/models/OntologyFullMetadata.md delete mode 100644 docs/v2/Ontologies/models/OntologyIdentifier.md delete mode 100644 docs/v2/Ontologies/models/OntologyInterfaceObjectSetType.md delete mode 100644 docs/v2/Ontologies/models/OntologyInterfaceObjectType.md delete mode 100644 docs/v2/Ontologies/models/OntologyMapType.md delete mode 100644 docs/v2/Ontologies/models/OntologyObjectArrayType.md delete mode 100644 docs/v2/Ontologies/models/OntologyObjectArrayTypeReducer.md delete mode 100644 docs/v2/Ontologies/models/OntologyObjectArrayTypeReducerSortDirection.md delete mode 100644 docs/v2/Ontologies/models/OntologyObjectSetType.md delete mode 100644 docs/v2/Ontologies/models/OntologyObjectType.md delete mode 100644 docs/v2/Ontologies/models/OntologyObjectTypeReferenceType.md delete mode 100644 docs/v2/Ontologies/models/OntologyObjectV2.md delete mode 100644 docs/v2/Ontologies/models/OntologyRid.md delete mode 100644 docs/v2/Ontologies/models/OntologySetType.md delete mode 100644 docs/v2/Ontologies/models/OntologyStructField.md delete mode 100644 docs/v2/Ontologies/models/OntologyStructType.md delete mode 100644 docs/v2/Ontologies/models/OntologyTransactionId.md delete mode 100644 docs/v2/Ontologies/models/OntologyV2.md delete mode 100644 docs/v2/Ontologies/models/OntologyValueType.md delete mode 100644 docs/v2/Ontologies/models/OrQueryV2.md delete mode 100644 docs/v2/Ontologies/models/OrderBy.md delete mode 100644 docs/v2/Ontologies/models/OrderByDirection.md delete mode 100644 docs/v2/Ontologies/models/ParameterEvaluatedConstraint.md delete mode 100644 docs/v2/Ontologies/models/ParameterEvaluationResult.md delete mode 100644 docs/v2/Ontologies/models/ParameterId.md delete mode 100644 docs/v2/Ontologies/models/ParameterIdArgument.md delete mode 100644 docs/v2/Ontologies/models/ParameterOption.md delete mode 100644 docs/v2/Ontologies/models/Plaintext.md delete mode 100644 docs/v2/Ontologies/models/PolygonValue.md delete mode 100644 docs/v2/Ontologies/models/PostTransactionEditsRequest.md delete mode 100644 docs/v2/Ontologies/models/PostTransactionEditsResponse.md delete mode 100644 docs/v2/Ontologies/models/PreciseDuration.md delete mode 100644 docs/v2/Ontologies/models/PreciseTimeUnit.md delete mode 100644 docs/v2/Ontologies/models/PrefixOnLastTokenRule.md delete mode 100644 docs/v2/Ontologies/models/PrimaryKeyValue.md delete mode 100644 docs/v2/Ontologies/models/PropertyApiName.md delete mode 100644 docs/v2/Ontologies/models/PropertyApiNameSelector.md delete mode 100644 docs/v2/Ontologies/models/PropertyBooleanFormattingRule.md delete mode 100644 docs/v2/Ontologies/models/PropertyDateFormattingRule.md delete mode 100644 docs/v2/Ontologies/models/PropertyFilter.md delete mode 100644 docs/v2/Ontologies/models/PropertyId.md delete mode 100644 docs/v2/Ontologies/models/PropertyIdentifier.md delete mode 100644 docs/v2/Ontologies/models/PropertyImplementation.md delete mode 100644 docs/v2/Ontologies/models/PropertyKnownTypeFormattingRule.md delete mode 100644 docs/v2/Ontologies/models/PropertyLoadLevel.md delete mode 100644 docs/v2/Ontologies/models/PropertyNumberFormattingRule.md delete mode 100644 docs/v2/Ontologies/models/PropertyNumberFormattingRuleType.md delete mode 100644 docs/v2/Ontologies/models/PropertyOrStructFieldOfPropertyImplementation.md delete mode 100644 docs/v2/Ontologies/models/PropertyTimestampFormattingRule.md delete mode 100644 docs/v2/Ontologies/models/PropertyTypeApiName.md delete mode 100644 docs/v2/Ontologies/models/PropertyTypeReference.md delete mode 100644 docs/v2/Ontologies/models/PropertyTypeReferenceOrStringConstant.md delete mode 100644 docs/v2/Ontologies/models/PropertyTypeRid.md delete mode 100644 docs/v2/Ontologies/models/PropertyTypeStatus.md delete mode 100644 docs/v2/Ontologies/models/PropertyTypeVisibility.md delete mode 100644 docs/v2/Ontologies/models/PropertyV2.md delete mode 100644 docs/v2/Ontologies/models/PropertyValue.md delete mode 100644 docs/v2/Ontologies/models/PropertyValueEscapedString.md delete mode 100644 docs/v2/Ontologies/models/PropertyValueFormattingRule.md delete mode 100644 docs/v2/Ontologies/models/PropertyWithLoadLevelSelector.md delete mode 100644 docs/v2/Ontologies/models/QueryAggregation.md delete mode 100644 docs/v2/Ontologies/models/QueryAggregationKeyType.md delete mode 100644 docs/v2/Ontologies/models/QueryAggregationRangeSubType.md delete mode 100644 docs/v2/Ontologies/models/QueryAggregationRangeType.md delete mode 100644 docs/v2/Ontologies/models/QueryAggregationValueType.md delete mode 100644 docs/v2/Ontologies/models/QueryApiName.md delete mode 100644 docs/v2/Ontologies/models/QueryArrayType.md delete mode 100644 docs/v2/Ontologies/models/QueryDataType.md delete mode 100644 docs/v2/Ontologies/models/QueryParameterV2.md delete mode 100644 docs/v2/Ontologies/models/QueryRuntimeErrorParameter.md delete mode 100644 docs/v2/Ontologies/models/QuerySetType.md delete mode 100644 docs/v2/Ontologies/models/QueryStructField.md delete mode 100644 docs/v2/Ontologies/models/QueryStructType.md delete mode 100644 docs/v2/Ontologies/models/QueryThreeDimensionalAggregation.md delete mode 100644 docs/v2/Ontologies/models/QueryTwoDimensionalAggregation.md delete mode 100644 docs/v2/Ontologies/models/QueryTypeV2.md delete mode 100644 docs/v2/Ontologies/models/QueryUnionType.md delete mode 100644 docs/v2/Ontologies/models/RangeConstraint.md delete mode 100644 docs/v2/Ontologies/models/RangesConstraint.md delete mode 100644 docs/v2/Ontologies/models/RegexConstraint.md delete mode 100644 docs/v2/Ontologies/models/RegexQuery.md delete mode 100644 docs/v2/Ontologies/models/RelativeDateRangeBound.md delete mode 100644 docs/v2/Ontologies/models/RelativeDateRangeQuery.md delete mode 100644 docs/v2/Ontologies/models/RelativePointInTime.md delete mode 100644 docs/v2/Ontologies/models/RelativeTime.md delete mode 100644 docs/v2/Ontologies/models/RelativeTimeRange.md delete mode 100644 docs/v2/Ontologies/models/RelativeTimeRelation.md delete mode 100644 docs/v2/Ontologies/models/RelativeTimeSeriesTimeUnit.md delete mode 100644 docs/v2/Ontologies/models/RelativeTimeUnit.md delete mode 100644 docs/v2/Ontologies/models/ResolvedInterfacePropertyType.md delete mode 100644 docs/v2/Ontologies/models/ReturnEditsMode.md delete mode 100644 docs/v2/Ontologies/models/RidConstraint.md delete mode 100644 docs/v2/Ontologies/models/RollingAggregateWindowPoints.md delete mode 100644 docs/v2/Ontologies/models/SdkPackageName.md delete mode 100644 docs/v2/Ontologies/models/SdkPackageRid.md delete mode 100644 docs/v2/Ontologies/models/SdkVersion.md delete mode 100644 docs/v2/Ontologies/models/SearchJsonQueryV2.md delete mode 100644 docs/v2/Ontologies/models/SearchObjectsForInterfaceRequest.md delete mode 100644 docs/v2/Ontologies/models/SearchObjectsRequestV2.md delete mode 100644 docs/v2/Ontologies/models/SearchObjectsResponseV2.md delete mode 100644 docs/v2/Ontologies/models/SearchOrderByType.md delete mode 100644 docs/v2/Ontologies/models/SearchOrderByV2.md delete mode 100644 docs/v2/Ontologies/models/SearchOrderingV2.md delete mode 100644 docs/v2/Ontologies/models/SelectedPropertyApiName.md delete mode 100644 docs/v2/Ontologies/models/SelectedPropertyApproximateDistinctAggregation.md delete mode 100644 docs/v2/Ontologies/models/SelectedPropertyApproximatePercentileAggregation.md delete mode 100644 docs/v2/Ontologies/models/SelectedPropertyAvgAggregation.md delete mode 100644 docs/v2/Ontologies/models/SelectedPropertyCollectListAggregation.md delete mode 100644 docs/v2/Ontologies/models/SelectedPropertyCollectSetAggregation.md delete mode 100644 docs/v2/Ontologies/models/SelectedPropertyCountAggregation.md delete mode 100644 docs/v2/Ontologies/models/SelectedPropertyExactDistinctAggregation.md delete mode 100644 docs/v2/Ontologies/models/SelectedPropertyExpression.md delete mode 100644 docs/v2/Ontologies/models/SelectedPropertyMaxAggregation.md delete mode 100644 docs/v2/Ontologies/models/SelectedPropertyMinAggregation.md delete mode 100644 docs/v2/Ontologies/models/SelectedPropertyOperation.md delete mode 100644 docs/v2/Ontologies/models/SelectedPropertySumAggregation.md delete mode 100644 docs/v2/Ontologies/models/SharedPropertyType.md delete mode 100644 docs/v2/Ontologies/models/SharedPropertyTypeApiName.md delete mode 100644 docs/v2/Ontologies/models/SharedPropertyTypeRid.md delete mode 100644 docs/v2/Ontologies/models/StartsWithQuery.md delete mode 100644 docs/v2/Ontologies/models/StaticArgument.md delete mode 100644 docs/v2/Ontologies/models/StreamTimeSeriesPointsRequest.md delete mode 100644 docs/v2/Ontologies/models/StreamTimeSeriesValuesRequest.md delete mode 100644 docs/v2/Ontologies/models/StreamingOutputFormat.md delete mode 100644 docs/v2/Ontologies/models/StringConstant.md delete mode 100644 docs/v2/Ontologies/models/StringLengthConstraint.md delete mode 100644 docs/v2/Ontologies/models/StringRegexMatchConstraint.md delete mode 100644 docs/v2/Ontologies/models/StructConstraint.md delete mode 100644 docs/v2/Ontologies/models/StructEvaluatedConstraint.md delete mode 100644 docs/v2/Ontologies/models/StructFieldApiName.md delete mode 100644 docs/v2/Ontologies/models/StructFieldArgument.md delete mode 100644 docs/v2/Ontologies/models/StructFieldEvaluatedConstraint.md delete mode 100644 docs/v2/Ontologies/models/StructFieldEvaluationResult.md delete mode 100644 docs/v2/Ontologies/models/StructFieldOfPropertyImplementation.md delete mode 100644 docs/v2/Ontologies/models/StructFieldSelector.md delete mode 100644 docs/v2/Ontologies/models/StructFieldType.md delete mode 100644 docs/v2/Ontologies/models/StructFieldTypeRid.md delete mode 100644 docs/v2/Ontologies/models/StructListParameterFieldArgument.md delete mode 100644 docs/v2/Ontologies/models/StructParameterFieldApiName.md delete mode 100644 docs/v2/Ontologies/models/StructParameterFieldArgument.md delete mode 100644 docs/v2/Ontologies/models/StructType.md delete mode 100644 docs/v2/Ontologies/models/StructTypeMainValue.md delete mode 100644 docs/v2/Ontologies/models/SubmissionCriteriaEvaluation.md delete mode 100644 docs/v2/Ontologies/models/SubtractPropertyExpression.md delete mode 100644 docs/v2/Ontologies/models/SumAggregationV2.md delete mode 100644 docs/v2/Ontologies/models/SyncApplyActionResponseV2.md delete mode 100644 docs/v2/Ontologies/models/SynchronousWebhookOutputArgument.md delete mode 100644 docs/v2/Ontologies/models/ThreeDimensionalAggregation.md delete mode 100644 docs/v2/Ontologies/models/TimeCodeFormat.md delete mode 100644 docs/v2/Ontologies/models/TimeRange.md delete mode 100644 docs/v2/Ontologies/models/TimeSeriesAggregationMethod.md delete mode 100644 docs/v2/Ontologies/models/TimeSeriesAggregationStrategy.md delete mode 100644 docs/v2/Ontologies/models/TimeSeriesCumulativeAggregate.md delete mode 100644 docs/v2/Ontologies/models/TimeSeriesPeriodicAggregate.md delete mode 100644 docs/v2/Ontologies/models/TimeSeriesPoint.md delete mode 100644 docs/v2/Ontologies/models/TimeSeriesRollingAggregate.md delete mode 100644 docs/v2/Ontologies/models/TimeSeriesRollingAggregateWindow.md delete mode 100644 docs/v2/Ontologies/models/TimeSeriesWindowType.md delete mode 100644 docs/v2/Ontologies/models/TimeUnit.md delete mode 100644 docs/v2/Ontologies/models/TimeseriesEntry.md delete mode 100644 docs/v2/Ontologies/models/TransactionEdit.md delete mode 100644 docs/v2/Ontologies/models/TwoDimensionalAggregation.md delete mode 100644 docs/v2/Ontologies/models/UnevaluableConstraint.md delete mode 100644 docs/v2/Ontologies/models/UniqueIdentifierArgument.md delete mode 100644 docs/v2/Ontologies/models/UniqueIdentifierLinkId.md delete mode 100644 docs/v2/Ontologies/models/UniqueIdentifierValue.md delete mode 100644 docs/v2/Ontologies/models/UuidConstraint.md delete mode 100644 docs/v2/Ontologies/models/ValidateActionResponseV2.md delete mode 100644 docs/v2/Ontologies/models/ValidationResult.md delete mode 100644 docs/v2/Ontologies/models/ValueType.md delete mode 100644 docs/v2/Ontologies/models/ValueTypeApiName.md delete mode 100644 docs/v2/Ontologies/models/ValueTypeArrayType.md delete mode 100644 docs/v2/Ontologies/models/ValueTypeConstraint.md delete mode 100644 docs/v2/Ontologies/models/ValueTypeDecimalType.md delete mode 100644 docs/v2/Ontologies/models/ValueTypeFieldType.md delete mode 100644 docs/v2/Ontologies/models/ValueTypeMapType.md delete mode 100644 docs/v2/Ontologies/models/ValueTypeOptionalType.md delete mode 100644 docs/v2/Ontologies/models/ValueTypeReferenceType.md delete mode 100644 docs/v2/Ontologies/models/ValueTypeRid.md delete mode 100644 docs/v2/Ontologies/models/ValueTypeStatus.md delete mode 100644 docs/v2/Ontologies/models/ValueTypeStructField.md delete mode 100644 docs/v2/Ontologies/models/ValueTypeStructType.md delete mode 100644 docs/v2/Ontologies/models/ValueTypeUnionType.md delete mode 100644 docs/v2/Ontologies/models/VersionedQueryTypeApiName.md delete mode 100644 docs/v2/Ontologies/models/WildcardQuery.md delete mode 100644 docs/v2/Ontologies/models/WithinBoundingBoxPoint.md delete mode 100644 docs/v2/Ontologies/models/WithinBoundingBoxQuery.md delete mode 100644 docs/v2/Ontologies/models/WithinDistanceOfQuery.md delete mode 100644 docs/v2/Ontologies/models/WithinPolygonQuery.md delete mode 100644 docs/v2/Orchestration/Build.md delete mode 100644 docs/v2/Orchestration/Job.md delete mode 100644 docs/v2/Orchestration/Schedule.md delete mode 100644 docs/v2/Orchestration/ScheduleRun.md delete mode 100644 docs/v2/Orchestration/ScheduleVersion.md delete mode 100644 docs/v2/Orchestration/models/AbortOnFailure.md delete mode 100644 docs/v2/Orchestration/models/Action.md delete mode 100644 docs/v2/Orchestration/models/AffectedResourcesResponse.md delete mode 100644 docs/v2/Orchestration/models/AndTrigger.md delete mode 100644 docs/v2/Orchestration/models/Build.md delete mode 100644 docs/v2/Orchestration/models/BuildStatus.md delete mode 100644 docs/v2/Orchestration/models/BuildTarget.md delete mode 100644 docs/v2/Orchestration/models/BuildableRid.md delete mode 100644 docs/v2/Orchestration/models/ConnectingTarget.md delete mode 100644 docs/v2/Orchestration/models/CreateBuildRequest.md delete mode 100644 docs/v2/Orchestration/models/CreateScheduleRequest.md delete mode 100644 docs/v2/Orchestration/models/CreateScheduleRequestAction.md delete mode 100644 docs/v2/Orchestration/models/CreateScheduleRequestBuildTarget.md delete mode 100644 docs/v2/Orchestration/models/CreateScheduleRequestConnectingTarget.md delete mode 100644 docs/v2/Orchestration/models/CreateScheduleRequestManualTarget.md delete mode 100644 docs/v2/Orchestration/models/CreateScheduleRequestProjectScope.md delete mode 100644 docs/v2/Orchestration/models/CreateScheduleRequestScopeMode.md delete mode 100644 docs/v2/Orchestration/models/CreateScheduleRequestUpstreamTarget.md delete mode 100644 docs/v2/Orchestration/models/CreateScheduleRequestUserScope.md delete mode 100644 docs/v2/Orchestration/models/CronExpression.md delete mode 100644 docs/v2/Orchestration/models/DatasetJobOutput.md delete mode 100644 docs/v2/Orchestration/models/DatasetUpdatedTrigger.md delete mode 100644 docs/v2/Orchestration/models/FallbackBranches.md delete mode 100644 docs/v2/Orchestration/models/ForceBuild.md delete mode 100644 docs/v2/Orchestration/models/GetBuildsBatchRequestElement.md delete mode 100644 docs/v2/Orchestration/models/GetBuildsBatchResponse.md delete mode 100644 docs/v2/Orchestration/models/GetJobsBatchRequestElement.md delete mode 100644 docs/v2/Orchestration/models/GetJobsBatchResponse.md delete mode 100644 docs/v2/Orchestration/models/GetSchedulesBatchRequestElement.md delete mode 100644 docs/v2/Orchestration/models/GetSchedulesBatchResponse.md delete mode 100644 docs/v2/Orchestration/models/Job.md delete mode 100644 docs/v2/Orchestration/models/JobOutput.md delete mode 100644 docs/v2/Orchestration/models/JobStartedTime.md delete mode 100644 docs/v2/Orchestration/models/JobStatus.md delete mode 100644 docs/v2/Orchestration/models/JobSucceededTrigger.md delete mode 100644 docs/v2/Orchestration/models/ListJobsOfBuildResponse.md delete mode 100644 docs/v2/Orchestration/models/ListRunsOfScheduleResponse.md delete mode 100644 docs/v2/Orchestration/models/ManualTarget.md delete mode 100644 docs/v2/Orchestration/models/ManualTrigger.md delete mode 100644 docs/v2/Orchestration/models/MediaSetUpdatedTrigger.md delete mode 100644 docs/v2/Orchestration/models/NewLogicTrigger.md delete mode 100644 docs/v2/Orchestration/models/NotificationsEnabled.md delete mode 100644 docs/v2/Orchestration/models/OrTrigger.md delete mode 100644 docs/v2/Orchestration/models/ProjectScope.md delete mode 100644 docs/v2/Orchestration/models/ReplaceScheduleRequest.md delete mode 100644 docs/v2/Orchestration/models/ReplaceScheduleRequestAction.md delete mode 100644 docs/v2/Orchestration/models/ReplaceScheduleRequestBuildTarget.md delete mode 100644 docs/v2/Orchestration/models/ReplaceScheduleRequestConnectingTarget.md delete mode 100644 docs/v2/Orchestration/models/ReplaceScheduleRequestManualTarget.md delete mode 100644 docs/v2/Orchestration/models/ReplaceScheduleRequestProjectScope.md delete mode 100644 docs/v2/Orchestration/models/ReplaceScheduleRequestScopeMode.md delete mode 100644 docs/v2/Orchestration/models/ReplaceScheduleRequestUpstreamTarget.md delete mode 100644 docs/v2/Orchestration/models/ReplaceScheduleRequestUserScope.md delete mode 100644 docs/v2/Orchestration/models/RetryBackoffDuration.md delete mode 100644 docs/v2/Orchestration/models/RetryCount.md delete mode 100644 docs/v2/Orchestration/models/Schedule.md delete mode 100644 docs/v2/Orchestration/models/SchedulePaused.md delete mode 100644 docs/v2/Orchestration/models/ScheduleRun.md delete mode 100644 docs/v2/Orchestration/models/ScheduleRunError.md delete mode 100644 docs/v2/Orchestration/models/ScheduleRunErrorName.md delete mode 100644 docs/v2/Orchestration/models/ScheduleRunIgnored.md delete mode 100644 docs/v2/Orchestration/models/ScheduleRunResult.md delete mode 100644 docs/v2/Orchestration/models/ScheduleRunRid.md delete mode 100644 docs/v2/Orchestration/models/ScheduleRunSubmitted.md delete mode 100644 docs/v2/Orchestration/models/ScheduleSucceededTrigger.md delete mode 100644 docs/v2/Orchestration/models/ScheduleVersion.md delete mode 100644 docs/v2/Orchestration/models/ScheduleVersionRid.md delete mode 100644 docs/v2/Orchestration/models/ScopeMode.md delete mode 100644 docs/v2/Orchestration/models/SearchBuildsAndFilter.md delete mode 100644 docs/v2/Orchestration/models/SearchBuildsEqualsFilter.md delete mode 100644 docs/v2/Orchestration/models/SearchBuildsEqualsFilterField.md delete mode 100644 docs/v2/Orchestration/models/SearchBuildsFilter.md delete mode 100644 docs/v2/Orchestration/models/SearchBuildsGteFilter.md delete mode 100644 docs/v2/Orchestration/models/SearchBuildsGteFilterField.md delete mode 100644 docs/v2/Orchestration/models/SearchBuildsLtFilter.md delete mode 100644 docs/v2/Orchestration/models/SearchBuildsLtFilterField.md delete mode 100644 docs/v2/Orchestration/models/SearchBuildsNotFilter.md delete mode 100644 docs/v2/Orchestration/models/SearchBuildsOrFilter.md delete mode 100644 docs/v2/Orchestration/models/SearchBuildsOrderBy.md delete mode 100644 docs/v2/Orchestration/models/SearchBuildsOrderByField.md delete mode 100644 docs/v2/Orchestration/models/SearchBuildsOrderByItem.md delete mode 100644 docs/v2/Orchestration/models/SearchBuildsRequest.md delete mode 100644 docs/v2/Orchestration/models/SearchBuildsResponse.md delete mode 100644 docs/v2/Orchestration/models/TableUpdatedTrigger.md delete mode 100644 docs/v2/Orchestration/models/TimeTrigger.md delete mode 100644 docs/v2/Orchestration/models/TransactionalMediaSetJobOutput.md delete mode 100644 docs/v2/Orchestration/models/Trigger.md delete mode 100644 docs/v2/Orchestration/models/UpstreamTarget.md delete mode 100644 docs/v2/Orchestration/models/UserScope.md delete mode 100644 docs/v2/SqlQueries/SqlQuery.md delete mode 100644 docs/v2/SqlQueries/models/CanceledQueryStatus.md delete mode 100644 docs/v2/SqlQueries/models/ExecuteSqlQueryRequest.md delete mode 100644 docs/v2/SqlQueries/models/FailedQueryStatus.md delete mode 100644 docs/v2/SqlQueries/models/QueryStatus.md delete mode 100644 docs/v2/SqlQueries/models/RunningQueryStatus.md delete mode 100644 docs/v2/SqlQueries/models/SqlQueryId.md delete mode 100644 docs/v2/SqlQueries/models/SucceededQueryStatus.md delete mode 100644 docs/v2/Streams/Dataset.md delete mode 100644 docs/v2/Streams/Stream.md delete mode 100644 docs/v2/Streams/models/Compressed.md delete mode 100644 docs/v2/Streams/models/CreateStreamRequest.md delete mode 100644 docs/v2/Streams/models/CreateStreamRequestStreamSchema.md delete mode 100644 docs/v2/Streams/models/CreateStreamingDatasetRequest.md delete mode 100644 docs/v2/Streams/models/Dataset.md delete mode 100644 docs/v2/Streams/models/PartitionsCount.md delete mode 100644 docs/v2/Streams/models/PublishRecordToStreamRequest.md delete mode 100644 docs/v2/Streams/models/PublishRecordsToStreamRequest.md delete mode 100644 docs/v2/Streams/models/Record.md delete mode 100644 docs/v2/Streams/models/ResetStreamRequest.md delete mode 100644 docs/v2/Streams/models/Stream.md delete mode 100644 docs/v2/Streams/models/StreamType.md delete mode 100644 docs/v2/Streams/models/ViewRid.md delete mode 100644 docs/v2/ThirdPartyApplications/ThirdPartyApplication.md delete mode 100644 docs/v2/ThirdPartyApplications/Version.md delete mode 100644 docs/v2/ThirdPartyApplications/Website.md delete mode 100644 docs/v2/ThirdPartyApplications/models/DeployWebsiteRequest.md delete mode 100644 docs/v2/ThirdPartyApplications/models/ListVersionsResponse.md delete mode 100644 docs/v2/ThirdPartyApplications/models/Subdomain.md delete mode 100644 docs/v2/ThirdPartyApplications/models/ThirdPartyApplication.md delete mode 100644 docs/v2/ThirdPartyApplications/models/ThirdPartyApplicationRid.md delete mode 100644 docs/v2/ThirdPartyApplications/models/Version.md delete mode 100644 docs/v2/ThirdPartyApplications/models/VersionVersion.md delete mode 100644 docs/v2/ThirdPartyApplications/models/Website.md delete mode 100644 docs/v2/Widgets/DevModeSettings.md delete mode 100644 docs/v2/Widgets/Release.md delete mode 100644 docs/v2/Widgets/Repository.md delete mode 100644 docs/v2/Widgets/WidgetSet.md delete mode 100644 docs/v2/Widgets/models/DevModeSettings.md delete mode 100644 docs/v2/Widgets/models/DevModeStatus.md delete mode 100644 docs/v2/Widgets/models/FilePath.md delete mode 100644 docs/v2/Widgets/models/ListReleasesResponse.md delete mode 100644 docs/v2/Widgets/models/Release.md delete mode 100644 docs/v2/Widgets/models/ReleaseLocator.md delete mode 100644 docs/v2/Widgets/models/ReleaseVersion.md delete mode 100644 docs/v2/Widgets/models/Repository.md delete mode 100644 docs/v2/Widgets/models/RepositoryRid.md delete mode 100644 docs/v2/Widgets/models/RepositoryVersion.md delete mode 100644 docs/v2/Widgets/models/ScriptEntrypoint.md delete mode 100644 docs/v2/Widgets/models/ScriptType.md delete mode 100644 docs/v2/Widgets/models/SetWidgetSetDevModeSettingsByIdRequest.md delete mode 100644 docs/v2/Widgets/models/SetWidgetSetDevModeSettingsRequest.md delete mode 100644 docs/v2/Widgets/models/StylesheetEntrypoint.md delete mode 100644 docs/v2/Widgets/models/WidgetDevModeSettings.md delete mode 100644 docs/v2/Widgets/models/WidgetId.md delete mode 100644 docs/v2/Widgets/models/WidgetRid.md delete mode 100644 docs/v2/Widgets/models/WidgetSet.md delete mode 100644 docs/v2/Widgets/models/WidgetSetDevModeSettings.md delete mode 100644 docs/v2/Widgets/models/WidgetSetDevModeSettingsById.md delete mode 100644 docs/v2/Widgets/models/WidgetSetRid.md delete mode 100644 foundry_sdk/__init__.py delete mode 100644 foundry_sdk/_core/__init__.py delete mode 100644 foundry_sdk/_core/api_client.py delete mode 100644 foundry_sdk/_core/auth_utils.py delete mode 100644 foundry_sdk/_core/client_init_helpers.py delete mode 100644 foundry_sdk/_core/compute_module_pipeline_auth.py delete mode 100644 foundry_sdk/_core/confidential_client_auth.py delete mode 100644 foundry_sdk/_core/config.py delete mode 100644 foundry_sdk/_core/context_and_environment_vars.py delete mode 100644 foundry_sdk/_core/http_client.py delete mode 100644 foundry_sdk/_core/model_base.py delete mode 100644 foundry_sdk/_core/oauth_utils.py delete mode 100644 foundry_sdk/_core/page_iterator.py delete mode 100644 foundry_sdk/_core/public_client_auth.py delete mode 100644 foundry_sdk/_core/resource_iterator.py delete mode 100644 foundry_sdk/_core/table.py delete mode 100644 foundry_sdk/_core/user_token_auth_client.py delete mode 100644 foundry_sdk/_core/utils.py delete mode 100644 foundry_sdk/_errors/__init__.py delete mode 100644 foundry_sdk/_errors/api_not_found.py delete mode 100644 foundry_sdk/_errors/connection_error.py delete mode 100644 foundry_sdk/_errors/environment_not_configured.py delete mode 100644 foundry_sdk/_errors/not_authenticated.py delete mode 100644 foundry_sdk/_errors/palantir_exception.py delete mode 100644 foundry_sdk/_errors/palantir_qos_exception.py delete mode 100644 foundry_sdk/_errors/palantir_rpc_exception.py delete mode 100644 foundry_sdk/_errors/sdk_internal_error.py delete mode 100644 foundry_sdk/_errors/stream_error.py delete mode 100644 foundry_sdk/_errors/timeout_error.py delete mode 100644 foundry_sdk/_errors/utils.py delete mode 100644 foundry_sdk/_versions.py delete mode 100644 foundry_sdk/py.typed delete mode 100644 foundry_sdk/v1/__init__.py delete mode 100644 foundry_sdk/v1/cli.py delete mode 100644 foundry_sdk/v1/client.py delete mode 100644 foundry_sdk/v1/core/errors.py delete mode 100644 foundry_sdk/v1/core/models.py delete mode 100644 foundry_sdk/v1/datasets/__init__.py delete mode 100644 foundry_sdk/v1/datasets/_client.py delete mode 100644 foundry_sdk/v1/datasets/branch.py delete mode 100644 foundry_sdk/v1/datasets/dataset.py delete mode 100644 foundry_sdk/v1/datasets/errors.py delete mode 100644 foundry_sdk/v1/datasets/file.py delete mode 100644 foundry_sdk/v1/datasets/models.py delete mode 100644 foundry_sdk/v1/datasets/transaction.py delete mode 100644 foundry_sdk/v1/geo/errors.py delete mode 100644 foundry_sdk/v1/geo/models.py delete mode 100644 foundry_sdk/v1/ontologies/__init__.py delete mode 100644 foundry_sdk/v1/ontologies/_client.py delete mode 100644 foundry_sdk/v1/ontologies/action.py delete mode 100644 foundry_sdk/v1/ontologies/action_type.py delete mode 100644 foundry_sdk/v1/ontologies/attachment.py delete mode 100644 foundry_sdk/v1/ontologies/errors.py delete mode 100644 foundry_sdk/v1/ontologies/models.py delete mode 100644 foundry_sdk/v1/ontologies/object_type.py delete mode 100644 foundry_sdk/v1/ontologies/ontology.py delete mode 100644 foundry_sdk/v1/ontologies/ontology_object.py delete mode 100644 foundry_sdk/v1/ontologies/query.py delete mode 100644 foundry_sdk/v1/ontologies/query_type.py delete mode 100644 foundry_sdk/v2/__init__.py delete mode 100644 foundry_sdk/v2/admin/__init__.py delete mode 100644 foundry_sdk/v2/admin/_client.py delete mode 100644 foundry_sdk/v2/admin/authentication_provider.py delete mode 100644 foundry_sdk/v2/admin/enrollment.py delete mode 100644 foundry_sdk/v2/admin/enrollment_role_assignment.py delete mode 100644 foundry_sdk/v2/admin/errors.py delete mode 100644 foundry_sdk/v2/admin/group.py delete mode 100644 foundry_sdk/v2/admin/group_member.py delete mode 100644 foundry_sdk/v2/admin/group_membership.py delete mode 100644 foundry_sdk/v2/admin/group_membership_expiration_policy.py delete mode 100644 foundry_sdk/v2/admin/group_provider_info.py delete mode 100644 foundry_sdk/v2/admin/host.py delete mode 100644 foundry_sdk/v2/admin/marking.py delete mode 100644 foundry_sdk/v2/admin/marking_category.py delete mode 100644 foundry_sdk/v2/admin/marking_member.py delete mode 100644 foundry_sdk/v2/admin/marking_role_assignment.py delete mode 100644 foundry_sdk/v2/admin/models.py delete mode 100644 foundry_sdk/v2/admin/organization.py delete mode 100644 foundry_sdk/v2/admin/organization_role_assignment.py delete mode 100644 foundry_sdk/v2/admin/role.py delete mode 100644 foundry_sdk/v2/admin/user.py delete mode 100644 foundry_sdk/v2/admin/user_provider_info.py delete mode 100644 foundry_sdk/v2/aip_agents/__init__.py delete mode 100644 foundry_sdk/v2/aip_agents/_client.py delete mode 100644 foundry_sdk/v2/aip_agents/agent.py delete mode 100644 foundry_sdk/v2/aip_agents/agent_version.py delete mode 100644 foundry_sdk/v2/aip_agents/content.py delete mode 100644 foundry_sdk/v2/aip_agents/errors.py delete mode 100644 foundry_sdk/v2/aip_agents/models.py delete mode 100644 foundry_sdk/v2/aip_agents/session.py delete mode 100644 foundry_sdk/v2/aip_agents/session_trace.py delete mode 100644 foundry_sdk/v2/audit/__init__.py delete mode 100644 foundry_sdk/v2/audit/_client.py delete mode 100644 foundry_sdk/v2/audit/errors.py delete mode 100644 foundry_sdk/v2/audit/log_file.py delete mode 100644 foundry_sdk/v2/audit/models.py delete mode 100644 foundry_sdk/v2/audit/organization.py delete mode 100644 foundry_sdk/v2/cli.py delete mode 100644 foundry_sdk/v2/client.py delete mode 100644 foundry_sdk/v2/connectivity/__init__.py delete mode 100644 foundry_sdk/v2/connectivity/_client.py delete mode 100644 foundry_sdk/v2/connectivity/connection.py delete mode 100644 foundry_sdk/v2/connectivity/errors.py delete mode 100644 foundry_sdk/v2/connectivity/file_import.py delete mode 100644 foundry_sdk/v2/connectivity/models.py delete mode 100644 foundry_sdk/v2/connectivity/table_import.py delete mode 100644 foundry_sdk/v2/connectivity/virtual_table.py delete mode 100644 foundry_sdk/v2/core/errors.py delete mode 100644 foundry_sdk/v2/core/models.py delete mode 100644 foundry_sdk/v2/data_health/__init__.py delete mode 100644 foundry_sdk/v2/data_health/_client.py delete mode 100644 foundry_sdk/v2/data_health/check.py delete mode 100644 foundry_sdk/v2/data_health/check_report.py delete mode 100644 foundry_sdk/v2/data_health/errors.py delete mode 100644 foundry_sdk/v2/data_health/models.py delete mode 100644 foundry_sdk/v2/datasets/__init__.py delete mode 100644 foundry_sdk/v2/datasets/_client.py delete mode 100644 foundry_sdk/v2/datasets/branch.py delete mode 100644 foundry_sdk/v2/datasets/dataset.py delete mode 100644 foundry_sdk/v2/datasets/errors.py delete mode 100644 foundry_sdk/v2/datasets/file.py delete mode 100644 foundry_sdk/v2/datasets/models.py delete mode 100644 foundry_sdk/v2/datasets/transaction.py delete mode 100644 foundry_sdk/v2/datasets/view.py delete mode 100644 foundry_sdk/v2/filesystem/__init__.py delete mode 100644 foundry_sdk/v2/filesystem/_client.py delete mode 100644 foundry_sdk/v2/filesystem/errors.py delete mode 100644 foundry_sdk/v2/filesystem/folder.py delete mode 100644 foundry_sdk/v2/filesystem/models.py delete mode 100644 foundry_sdk/v2/filesystem/project.py delete mode 100644 foundry_sdk/v2/filesystem/resource.py delete mode 100644 foundry_sdk/v2/filesystem/resource_role.py delete mode 100644 foundry_sdk/v2/filesystem/space.py delete mode 100644 foundry_sdk/v2/functions/__init__.py delete mode 100644 foundry_sdk/v2/functions/_client.py delete mode 100644 foundry_sdk/v2/functions/errors.py delete mode 100644 foundry_sdk/v2/functions/models.py delete mode 100644 foundry_sdk/v2/functions/query.py delete mode 100644 foundry_sdk/v2/functions/value_type.py delete mode 100644 foundry_sdk/v2/functions/version_id.py delete mode 100644 foundry_sdk/v2/geo/errors.py delete mode 100644 foundry_sdk/v2/geo/models.py delete mode 100644 foundry_sdk/v2/language_models/__init__.py delete mode 100644 foundry_sdk/v2/language_models/_client.py delete mode 100644 foundry_sdk/v2/language_models/anthropic_model.py delete mode 100644 foundry_sdk/v2/language_models/errors.py delete mode 100644 foundry_sdk/v2/language_models/models.py delete mode 100644 foundry_sdk/v2/language_models/open_ai_model.py delete mode 100644 foundry_sdk/v2/media_sets/__init__.py delete mode 100644 foundry_sdk/v2/media_sets/_client.py delete mode 100644 foundry_sdk/v2/media_sets/errors.py delete mode 100644 foundry_sdk/v2/media_sets/media_set.py delete mode 100644 foundry_sdk/v2/media_sets/models.py delete mode 100644 foundry_sdk/v2/models/__init__.py delete mode 100644 foundry_sdk/v2/models/_client.py delete mode 100644 foundry_sdk/v2/models/errors.py delete mode 100644 foundry_sdk/v2/models/model.py delete mode 100644 foundry_sdk/v2/models/model_version.py delete mode 100644 foundry_sdk/v2/models/models.py delete mode 100644 foundry_sdk/v2/ontologies/__init__.py delete mode 100644 foundry_sdk/v2/ontologies/_client.py delete mode 100644 foundry_sdk/v2/ontologies/action.py delete mode 100644 foundry_sdk/v2/ontologies/action_type.py delete mode 100644 foundry_sdk/v2/ontologies/action_type_full_metadata.py delete mode 100644 foundry_sdk/v2/ontologies/attachment.py delete mode 100644 foundry_sdk/v2/ontologies/attachment_property.py delete mode 100644 foundry_sdk/v2/ontologies/cipher_text_property.py delete mode 100644 foundry_sdk/v2/ontologies/errors.py delete mode 100644 foundry_sdk/v2/ontologies/linked_object.py delete mode 100644 foundry_sdk/v2/ontologies/media_reference_property.py delete mode 100644 foundry_sdk/v2/ontologies/models.py delete mode 100644 foundry_sdk/v2/ontologies/object_type.py delete mode 100644 foundry_sdk/v2/ontologies/ontology.py delete mode 100644 foundry_sdk/v2/ontologies/ontology_interface.py delete mode 100644 foundry_sdk/v2/ontologies/ontology_object.py delete mode 100644 foundry_sdk/v2/ontologies/ontology_object_set.py delete mode 100644 foundry_sdk/v2/ontologies/ontology_transaction.py delete mode 100644 foundry_sdk/v2/ontologies/ontology_value_type.py delete mode 100644 foundry_sdk/v2/ontologies/query.py delete mode 100644 foundry_sdk/v2/ontologies/query_type.py delete mode 100644 foundry_sdk/v2/ontologies/time_series_property_v2.py delete mode 100644 foundry_sdk/v2/ontologies/time_series_value_bank_property.py delete mode 100644 foundry_sdk/v2/orchestration/__init__.py delete mode 100644 foundry_sdk/v2/orchestration/_client.py delete mode 100644 foundry_sdk/v2/orchestration/build.py delete mode 100644 foundry_sdk/v2/orchestration/errors.py delete mode 100644 foundry_sdk/v2/orchestration/job.py delete mode 100644 foundry_sdk/v2/orchestration/models.py delete mode 100644 foundry_sdk/v2/orchestration/schedule.py delete mode 100644 foundry_sdk/v2/orchestration/schedule_run.py delete mode 100644 foundry_sdk/v2/orchestration/schedule_version.py delete mode 100644 foundry_sdk/v2/sql_queries/__init__.py delete mode 100644 foundry_sdk/v2/sql_queries/_client.py delete mode 100644 foundry_sdk/v2/sql_queries/errors.py delete mode 100644 foundry_sdk/v2/sql_queries/models.py delete mode 100644 foundry_sdk/v2/sql_queries/sql_query.py delete mode 100644 foundry_sdk/v2/streams/__init__.py delete mode 100644 foundry_sdk/v2/streams/_client.py delete mode 100644 foundry_sdk/v2/streams/dataset.py delete mode 100644 foundry_sdk/v2/streams/errors.py delete mode 100644 foundry_sdk/v2/streams/models.py delete mode 100644 foundry_sdk/v2/streams/stream.py delete mode 100644 foundry_sdk/v2/third_party_applications/__init__.py delete mode 100644 foundry_sdk/v2/third_party_applications/_client.py delete mode 100644 foundry_sdk/v2/third_party_applications/errors.py delete mode 100644 foundry_sdk/v2/third_party_applications/models.py delete mode 100644 foundry_sdk/v2/third_party_applications/third_party_application.py delete mode 100644 foundry_sdk/v2/third_party_applications/version.py delete mode 100644 foundry_sdk/v2/third_party_applications/website.py delete mode 100644 foundry_sdk/v2/widgets/__init__.py delete mode 100644 foundry_sdk/v2/widgets/_client.py delete mode 100644 foundry_sdk/v2/widgets/dev_mode_settings.py delete mode 100644 foundry_sdk/v2/widgets/errors.py delete mode 100644 foundry_sdk/v2/widgets/models.py delete mode 100644 foundry_sdk/v2/widgets/release.py delete mode 100644 foundry_sdk/v2/widgets/repository.py delete mode 100644 foundry_sdk/v2/widgets/widget_set.py delete mode 100644 pyproject.toml delete mode 100644 scripts/set_npm_version.js delete mode 100644 scripts/set_python_version.py delete mode 100644 tests/auth/__init__.py delete mode 100644 tests/auth/test_confidential_client.py delete mode 100644 tests/auth/test_confidential_client_oauth_flow_provider.py delete mode 100644 tests/auth/test_oauth_utils.py delete mode 100644 tests/auth/test_public_client.py delete mode 100644 tests/auth/test_public_client_oauth_flow_provider.py delete mode 100644 tests/auth/test_user_auth_token_client.py delete mode 100644 tests/conftest.py delete mode 100644 tests/functions/__init__.py delete mode 100644 tests/server.py delete mode 100644 tests/test_api_client.py delete mode 100644 tests/test_body_serialization.py delete mode 100644 tests/test_client_init_helpers.py delete mode 100644 tests/test_datetime.py delete mode 100644 tests/test_discriminators.py delete mode 100644 tests/test_errors.py delete mode 100644 tests/test_exception.py delete mode 100644 tests/test_http_client.py delete mode 100644 tests/test_model_base.py delete mode 100644 tests/test_page_iterator.py delete mode 100644 tests/test_performance.py delete mode 100644 tests/test_resorce_import.py delete mode 100644 tests/test_resource_iterator.py delete mode 100644 tests/test_response_types.py delete mode 100644 tests/test_utils.py delete mode 100644 tox.ini diff --git a/.bulldozer.yml b/.bulldozer.yml deleted file mode 100644 index b62e82baa..000000000 --- a/.bulldozer.yml +++ /dev/null @@ -1,17 +0,0 @@ -# Excavator auto-updates this file. Please contribute improvements to the central template. - -version: 1 -merge: - trigger: - labels: ["merge when ready"] - ignore: - labels: ["do not merge"] - method: squash - options: - squash: - body: pull_request_body - message_delimiter: ==COMMIT_MSG== - delete_after_merge: true -update: - trigger: - labels: ["update me"] diff --git a/.changelog.yml b/.changelog.yml deleted file mode 100644 index a30143b32..000000000 --- a/.changelog.yml +++ /dev/null @@ -1,3 +0,0 @@ -# Excavator auto-updates this file. Please contribute improvements to the central template. - -# This file is intentionally empty. The file's existence enables changelog-app and is empty to use the default configuration. diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 7dfde03d4..000000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,189 +0,0 @@ -palantir_aliases: - - &always-run - filters: - branches: - only: /.*/ - tags: - only: /.*/ - -version: 2.1 - -commands: - setup-npm-project: - description: "Setup npm project - checkout code, set version, install dependencies and build" - steps: - - checkout - - run: node scripts/set_npm_version.js - - run: - name: Install npm dependencies and build - command: | - echo "Node version: $(node -v)" - echo "NPM version: $(npm -v)" - cd docs-snippets-npm - npm install - npm run build - -jobs: - test: - parameters: - python_version: - type: string - pydantic_version: - type: string - httpx_version: - type: string - docker: - - image: cimg/python:<< parameters.python_version >> - steps: - - checkout - - run: pip install --user tox - - run: poetry --no-ansi install --no-root --sync - - run: | - PYDANTIC_VERSION=<< parameters.pydantic_version >>.* \ - HTTPX_VERSION=<< parameters.httpx_version >>.* \ - poetry --no-ansi run tox -v -e py<< parameters.python_version >> --recreate - - black: - docker: - - image: cimg/python:3.12 - steps: - - checkout - - run: pip install --user tox - - run: python -m tox -e black - - npm-build: - parameters: - node_version: - type: string - docker: - - image: cimg/node:<< parameters.node_version >> - steps: - - setup-npm-project - - run: - name: Echo build completion - command: echo "Completed building docs-snippets-npm on Node.js << parameters.node_version >>" - - npm-pack-dry-run: - parameters: - node_version: - type: string - docker: - - image: cimg/node:<< parameters.node_version >> - steps: - - setup-npm-project - - run: - name: Run npm pack dry-run - command: | - cd docs-snippets-npm - npm pack --dry-run - - npm-publish: - docker: - - image: cimg/node:22.14 - steps: - - setup-npm-project - - run: - name: Publish npm package - command: | - cd docs-snippets-npm - npm set //registry.npmjs.org/:_authToken=$NPM_TOKEN - npm publish --access=public - - circle-all: - docker: - - image: node:lts - steps: - - run: echo "Done!" - - publish: - docker: - - image: cimg/python:3.12 - steps: - - checkout - - run: python scripts/set_python_version.py - - run: poetry version $(git describe --tags --abbrev=0) - - run: poetry publish -v -u $PYPI_USERNAME -p $PYPI_PASSWORD --build - -workflows: - version: 2 - build: - jobs: - - test: - <<: *always-run - name: python-<< matrix.python_version>> - matrix: - parameters: - python_version: ["3.9", "3.10", "3.11", "3.12"] - pydantic_version: ["2.10"] - httpx_version: ["0.28"] - - test: - <<: *always-run - name: pydantic-<< matrix.pydantic_version >> - matrix: - parameters: - python_version: ["3.12"] - pydantic_version: ["2.6", "2.7", "2.8", "2.9", "2.10"] - httpx_version: ["0.28"] - - test: - <<: *always-run - name: httpx-<< matrix.httpx_version >> - matrix: - parameters: - python_version: ["3.12"] - pydantic_version: ["2.10"] - httpx_version: ["0.25", "0.26", "0.27", "0.28"] - - black: - <<: *always-run - - circle-all: - <<: *always-run - requires: - - python-3.9 - - python-3.10 - - python-3.11 - - python-3.12 - - - pydantic-2.6 - - pydantic-2.7 - - pydantic-2.8 - - pydantic-2.9 - - pydantic-2.10 - - - httpx-0.25 - - httpx-0.26 - - httpx-0.27 - - httpx-0.28 - - - black - - npm-build-18.20 - - npm-build-20.19 - - npm-build-22.14 - - npm-pack-dry-run-18.20 - - npm-pack-dry-run-20.19 - - npm-pack-dry-run-22.14 - - publish: - requires: - - circle-all - filters: - tags: { only: '/^[0-9]+(\.[0-9]+)+(-[a-zA-Z]+[0-9]*)*$/' } - branches: { ignore: /.*/ } - - npm-publish: - requires: - - publish - - npm-build-22.14 - filters: - tags: { only: '/^[0-9]+(\.[0-9]+)+(-[a-zA-Z]+[0-9]*)*$/' } - branches: { ignore: /.*/ } - - npm-build: - <<: *always-run - name: npm-build-<< matrix.node_version >> - matrix: - parameters: - node_version: ["18.20", "20.19", "22.14"] - - npm-pack-dry-run: - <<: *always-run - name: npm-pack-dry-run-<< matrix.node_version >> - matrix: - parameters: - node_version: ["18.20", "20.19", "22.14"] - requires: - - npm-build-<< matrix.node_version >> diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 4702d1299..000000000 --- a/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -**/__pycache__ -*.pyc -tmp -test.py -venv diff --git a/LICENSE b/LICENSE deleted file mode 100644 index d64569567..000000000 --- a/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/README.md b/README.md deleted file mode 100644 index 16ecad230..000000000 --- a/README.md +++ /dev/null @@ -1,3396 +0,0 @@ -

-Autorelease -

- -# Foundry Platform SDK - -![Supported Python Versions](https://img.shields.io/pypi/pyversions/foundry-platform-sdk) -[![PyPI Version](https://img.shields.io/pypi/v/foundry-platform-sdk)](https://pypi.org/project/foundry-platform-sdk/) -[![License](https://img.shields.io/badge/License-Apache%202.0-lightgrey.svg)](https://opensource.org/licenses/Apache-2.0) - -The Foundry Platform SDK is a Python SDK built on top of the Foundry API. -Review [Foundry API documentation](https://www.palantir.com/docs/foundry/api/) for more details. - -> [!NOTE] -> This Python package is automatically generated based on the Foundry API specification. - - - -## Gotham Platform SDK vs. Foundry Platform SDK vs. Ontology SDK -Palantir provides two platform APIs for interacting with the Gotham and Foundry platforms. Each has a corresponding Software Development Kit (SDK). There is also the OSDK for interacting with Foundry ontologies. Make sure to choose the correct SDK for your use case. As a general rule of thumb, any applications which leverage the Ontology should use the Ontology SDK over the Foundry platform SDK for a superior development experience. - -> [!IMPORTANT] -> Make sure to understand the difference between the Foundry, Gotham, and Ontology SDKs. Review this section before continuing with the installation of this library. - -### Ontology SDK -The Ontology SDK allows you to access the full power of the Ontology directly from your development environment. You can generate the Ontology SDK using the Developer Console, a portal for creating and managing applications using Palantir APIs. Review the [Ontology SDK documentation](https://www.palantir.com/docs/foundry/ontology-sdk) for more information. - -### Foundry Platform SDK -The Foundry Platform Software Development Kit (SDK) is generated from the Foundry API specification -file. The intention of this SDK is to encompass endpoints related to interacting -with the Foundry platform itself. Although there are Ontology services included by this SDK, this SDK surfaces endpoints -for interacting with Ontological resources such as object types, link types, and action types. In contrast, the OSDK allows you to interact with objects, links and Actions (for example, querying your objects, applying an action). - -### Gotham Platform SDK -The Gotham Platform Software Development Kit (SDK) is generated from the Gotham API specification -file. The intention of this SDK is to encompass endpoints related to interacting -with the Gotham platform itself. This includes Gotham apps and data, such as Gaia, Target Workbench, and geotemporal data. - - -## Installation -You can install the Python package using `pip`: - -```sh -pip install foundry-platform-sdk -``` - - -## API Versioning -Every endpoint of the Foundry API is versioned using a version number that appears in the URL. For example, -v1 endpoints look like this: - -``` -https:///api/v1/... -``` - -This SDK exposes several clients, one for each major version of the API. The latest major version of the -SDK is **v2** and is exposed using the `FoundryClient` located in the -`foundry_sdk` package. - -```python -from foundry_sdk import FoundryClient -``` - -For other major versions, you must import that specific client from a submodule. For example, to -import the **v2** client from a sub-module you would import it like this: - -```python -from foundry_sdk.v2 import FoundryClient -``` - -More information about how the API is versioned can be found [here](https://www.palantir.com/docs/foundry/api/general/overview/versioning/). - - -## Authorization and client initalization -There are two options for authorizing the SDK. - -### User token -> [!WARNING] -> User tokens are associated with your personal user account and must not be used in -> production applications or committed to shared or public code repositories. We recommend -> you store test API tokens as environment variables during development. For authorizing -> production applications, you should register an OAuth2 application (see -> [OAuth2 Client](#oauth2-client) below for more details). - -You can pass in a user token as an arguments when initializing the `UserTokenAuth`: - -```python -import foundry_sdk - -client = foundry_sdk.FoundryClient( - auth=foundry_sdk.UserTokenAuth(os.environ["BEARER_TOKEN"]), - hostname="example.palantirfoundry.com", -) - -``` - -For convenience, the auth and hostname can also be set using environmental or context variables. -The `auth` and `hostname` parameters are set (in order of precedence) by: - -- The parameters passed to the `FoundryClient` constructor -- Context variables `FOUNDRY_TOKEN` and `FOUNDRY_HOSTNAME` -- Environment variables `FOUNDRY_TOKEN` and `FOUNDRY_HOSTNAME` - -The `FOUNDRY_TOKEN` is a string of an users Bearer token, which will create a `UserTokenAuth` for the `auth` parameter. - -```python -import foundry_sdk - -# The SDK will initialize the following context or environment variables when auth and hostname are not provided: -# FOUNDRY_TOKEN -# FOUNDRY_HOSTNAME -client = foundry_sdk.FoundryClient() -` -``` - - -### OAuth2 Client -OAuth2 clients are the recommended way to connect to Foundry in production applications. Currently, this SDK -natively supports the [client credentials grant flow](https://www.palantir.com/docs/foundry/platform-security-third-party/writing-oauth2-clients/#client-credentials-grant). -The token obtained by this grant can be used to access resources on behalf of the created service user. To use this -authentication method, you will first need to register a third-party application in Foundry by following [the guide on third-party application registration](https://www.palantir.com/docs/foundry/platform-security-third-party/register-3pa). - -To use the confidential client functionality, you first need to construct a -`ConfidentialClientAuth` object. As these service user tokens have a short -lifespan (one hour), we automatically retry all operations one time if a `401` -(Unauthorized) error is thrown after refreshing the token. - -```python -import foundry_sdk - -auth = foundry_sdk.ConfidentialClientAuth( - client_id=os.environ["CLIENT_ID"], - client_secret=os.environ["CLIENT_SECRET"], - scopes=[...], # optional list of scopes -) - -``` - -> [!IMPORTANT] -> Make sure to select the appropriate scopes when initializating the `ConfidentialClientAuth`. You can find the relevant scopes -> in the [endpoint documentation](#apis-link). - -After creating the `ConfidentialClientAuth` object, pass it in to the `FoundryClient`, - -```python -import foundry_sdk - -client = foundry_sdk.FoundryClient(auth=auth, hostname="example.palantirfoundry.com") - -``` - -> [!TIP] -> If you want to use the `ConfidentialClientAuth` class independently of the `FoundryClient`, you can -> use the `get_token()` method to get the token. You will have to provide a `hostname` when -> instantiating the `ConfidentialClientAuth` object, for example -> `ConfidentialClientAuth(..., hostname="example.palantirfoundry.com")`. - -## Quickstart - -Follow the [installation procedure](#installation) and determine which [authentication method](#authorization) is -best suited for your instance before following this example. For simplicity, the `UserTokenAuth` class will be used for demonstration -purposes. - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# DatasetRid -dataset_rid = None -# BranchName -name = "master" -# Optional[TransactionRid] | The most recent OPEN or COMMITTED transaction on the branch. This will never be an ABORTED transaction. -transaction_rid = "ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4" - - -try: - api_response = client.datasets.Dataset.Branch.create( - dataset_rid, name=name, transaction_rid=transaction_rid - ) - print("The create response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Branch.create: %s\n" % e) - -``` - -Want to learn more about this Foundry SDK library? Review the following sections. - -↳ [Error handling](#errors): Learn more about HTTP & data validation error handling -↳ [Pagination](#pagination): Learn how to work with paginated endpoints in the SDK -↳ [Streaming](#binary-streaming): Learn how to stream binary data from Foundry -↳ [Data Frames](#data-frames): Learn how to work with tabular data using data frame libraries -↳ [Static type analysis](#static-types): Learn about the static type analysis capabilities of this library -↳ [HTTP Session Configuration](#session-config): Learn how to configure the HTTP session. - - -## Error handling -### Data validation -The SDK employs [Pydantic](https://docs.pydantic.dev/latest/) for runtime validation -of arguments. In the example below, we are passing in a number to `transaction_rid` -which should actually be a string type: - -```python -client.datasets.Dataset.Branch.create( - dataset_rid, - name=name, - transaction_rid=123) -``` - -If you did this, you would receive an error that looks something like: - -```python -pydantic_core._pydantic_core.ValidationError: 1 validation error for create -transaction_rid - Input should be a valid string [type=string_type, input_value=123, input_type=int] - For further information visit https://errors.pydantic.dev/2.5/v/string_type - -``` - -To handle these errors, you can catch `pydantic.ValidationError`. To learn more, see -the [Pydantic error documentation](https://docs.pydantic.dev/latest/errors/errors/). - -> [!TIP] -> Pydantic works with static type checkers such as -[pyright](https://github.com/microsoft/pyright) for an improved developer -experience. See [Static Type Analysis](#static-types) below for more information. - -### HTTP exceptions -Each operation includes a list of possible exceptions that can be thrown which can be thrown by the server, all of which inherit from `PalantirRPCException`. For example, an operation that interacts with dataset branches might throw a `BranchNotFound` error, which is defined as follows: - -```python -class BranchNotFoundParameters(typing_extensions.TypedDict): - """The requested branch could not be found, or the client token does not have access to it.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - datasetRid: datasets_models.DatasetRid - branchName: datasets_models.BranchName - - -@dataclass -class BranchNotFound(errors.NotFoundError): - name: typing.Literal["BranchNotFound"] - parameters: BranchNotFoundParameters - error_instance_id: str - -``` - -As a user, you can catch this exception and handle it accordingly. - -```python -from foundry_sdk.v1.datasets.errors import BranchNotFound - -try: - response = client.datasets.Dataset.get(dataset_rid) - ... -except BranchNotFound as e: - print("Resource not found", e.parameters[...]) - -``` - -You can refer to the method documentation to see which exceptions can be thrown. It is also possible to -catch a generic subclass of `PalantirRPCException` such as `BadRequestError` or `NotFoundError`. - - -| Status Code | Error Class | -| ----------- | ---------------------------- | -| 400 | `BadRequestError` | -| 401 | `UnauthorizedError` | -| 403 | `PermissionDeniedError` | -| 404 | `NotFoundError` | -| 413 | `RequestEntityTooLargeError` | -| 422 | `UnprocessableEntityError` | -| >=500,<600 | `InternalServerError` | -| Other | `PalantirRPCException` | - -```python -from foundry_sdk import PalantirRPCException -from foundry_sdk import NotFoundError - -try: - api_response = client.datasets.Dataset.get(dataset_rid) - ... -except NotFoundError as e: - print("Resource not found", e) -except PalantirRPCException as e: - print("Another HTTP exception occurred", e) - -``` - -All RPC exceptions will have the following properties. See the [Foundry API docs](https://www.palantir.com/docs/foundry/api/general/overview/errors) for details about the Foundry error information. - -| Property | Type | Description | -| ----------------- | -----------------------| ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| name | str | The Palantir error name. See the [Foundry API docs](https://www.palantir.com/docs/foundry/api/general/overview/errors). | -| error_instance_id | str | The Palantir error instance ID. See the [Foundry API docs](https://www.palantir.com/docs/foundry/api/general/overview/errors). | -| parameters | Dict[str, Any] | The Palantir error parameters. See the [Foundry API docs](https://www.palantir.com/docs/foundry/api/general/overview/errors). | -| error_code | str | The Palantir error code. See the [Foundry API docs](https://www.palantir.com/docs/foundry/api/general/overview/errors). | -| error_description | str | The Palantir error description. See the [Foundry API docs](https://www.palantir.com/docs/foundry/api/general/overview/errors). | - -### Other exceptions -There are a handful of other exception classes that could be thrown when instantiating or using a client. - -| ErrorClass | Thrown Directly | Description | -| -------------------------- | --------------- | --------------------------------------------------------------------------------------------------------------------------------- | -| NotAuthenticated | Yes | You used either `ConfidentialClientAuth` or `PublicClientAuth` to make an API call without going through the OAuth process first. | -| ConnectionError | Yes | An issue occurred when connecting to the server. This also catches `ProxyError`. | -| ProxyError | Yes | An issue occurred when connecting to or authenticating with a proxy server. | -| TimeoutError | No | The request timed out. This catches both `ConnectTimeout`, `ReadTimeout` and `WriteTimeout`. | -| ConnectTimeout | Yes | The request timed out when attempting to connect to the server. | -| ReadTimeout | Yes | The server did not send any data in the allotted amount of time. | -| WriteTimeout | Yes | There was a timeout when writing data to the server. | -| StreamConsumedError | Yes | The content of the given stream has already been consumed. | -| RequestEntityTooLargeError | Yes | The request entity is too large. | -| ConflictError | Yes | There was a conflict with another request. | -| RateLimitError | Yes | The request was rate limited. Reduce your request rate and retry your request shortly. | -| ServiceUnavailable | Yes | The service is temporarily unavailable. Retry your request shortly. | -| SDKInternalError | Yes | An unexpected issue occurred and should be reported. | - - -## Pagination -When calling any iterator endpoints, we return a `ResourceIterator` class designed to simplify the process of working -with paginated API endpoints. This class provides a convenient way to fetch, iterate over, and manage pages -of data, while handling the underlying pagination logic. - -To iterate over all items, you can simply create a `ResourceIterator` instance and use it in a for loop, like this: - -```python -for item in client.datasets.Dataset.Branch.list(dataset_rid): - print(item) - -# Or, you can collect all the items in a list -results = list(client.datasets.Dataset.Branch.list(dataset_rid)) - -``` - -This will automatically fetch and iterate through all the pages of data from the specified API endpoint. For more granular control, you can manually fetch each page using the `next_page_token`. - -```python -next_page_token: Optional[str] = None -while True: - page = client.datasets.Dataset.Branch.list( - dataset_rid, page_size=page_size, page_token=next_page_token - ) - for branch in page.data: - print(branch) - - if page.next_page_token is None: - break - - next_page_token = page.next_page_token - -``` - -### Asynchronous Pagination (Beta) - -> [!WARNING] -> The asynchronous client is in beta and may change in future releases. - -When using the `AsyncFoundryClient` client, pagination works similar to the synchronous client -but you need to use `async for` to iterate over the results. Here's an example: - - -```python -async for item in client.datasets.Dataset.Branch.list(dataset_rid): - print(item) - -# Or, you can collect all the items in a list -results = [item async for item in client.datasets.Dataset.Branch.list(dataset_rid)] - -``` - -For more control over asynchronous pagination, you can manually handle the pagination -tokens and use the `with_raw_response` utility to fetch each page. - - -```python -next_page_token: Optional[str] = None -while True: - response = await client.client.datasets.Dataset.Branch.with_raw_response.list( - dataset_rid, page_token=next_page_token - ) - - page = response.decode() - for item in page.data: - print(item) - - if page.next_page_token is None: - break - - next_page_token = page.next_page_token - -``` - - -### Asynchronous Client (Beta) - -> [!WARNING] -> The asynchronous client is in beta and may change in future releases. - -This SDK supports creating an asynchronous client, just import and instantiate the -`AsyncFoundryClient` instead of the `FoundryClient`. - -```python -from foundry import AsyncFoundryClient -import foundry -import asyncio -from pprint import pprint - -async def main(): - client = AsyncFoundryClient(...) - response = await client.datasets.Dataset.Branch.create(dataset_rid, name=name, transaction_rid=transaction_rid) - pprint(response) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -When using asynchronous clients, you'll just need to use the `await` keyword when calling APIs. Otherwise, the behaviour -between the `FoundryClient` and `AsyncFoundryClient` is nearly identical. - - -## Streaming -This SDK supports streaming binary data using a separate streaming client accessible under -`with_streaming_response` on each Resource. To ensure the stream is closed, you need to use a context -manager when making a request with this client. - -```python -# Non-streaming response -with open("result.png", "wb") as f: - f.write(client.admin.User.profile_picture(user_id)) - -# Streaming response -with open("result.png", "wb") as f: - with client.admin.User.with_streaming_response.profile_picture(user_id) as response: - for chunk in response.iter_bytes(): - f.write(chunk) - -``` - - -## Data Frames - -This SDK supports working with tabular data using popular Python data frame libraries. When an API endpoint returns data in Arrow IPC format, the response is wrapped in an `TableResponse` class that provides methods to convert to various data frame formats: - -- `to_pyarrow()`: Converts to a PyArrow Table -- `to_pandas()`: Converts to a Pandas DataFrame -- `to_polars()`: Converts to a Polars DataFrame -- `to_duckdb()`: Converts to a DuckDB relation - -This allows you to seamlessly work with Foundry tabular data using your preferred data analysis library. - -### Example: Working with Data Frames - -```python -# Read tabular data in Arrow format -table_data = client.datasets.Dataset.read_table(dataset_rid, format=format, branch_name=branch_name, columns=columns, end_transaction_rid=end_transaction_rid, row_limit=row_limit, start_transaction_rid=start_transaction_rid) - -# Convert to pandas DataFrame for data analysis -pandas_df = table_data.to_pandas() - -# Perform data analysis operations -summary = pandas_df.describe() -filtered_data = pandas_df[pandas_df["value"] > 100] - -# Or use Polars for high-performance data operations -import polars as pl -polars_df = table_data.to_polars() -result = polars_df.filter(pl.col("value") > 100).group_by("category").agg(pl.sum("amount")) - -# Or use DuckDB for SQL-based analysis -import duckdb -duckdb_relation = table_data.to_duckdb() -result = duckdb_relation.query("SELECT category, SUM(amount) FROM duckdb_relation WHERE value > 100 GROUP BY category") -``` - -You can inclue the extra dependencies using: - -```bash -# For pyarrow support -pip install foundry-platform-sdk[pyarrow] - -# For pandas support -pip install foundry-platform-sdk[pandas] - -# For polars support -pip install foundry-platform-sdk[polars] - -# For duckdb support -pip install foundry-platform-sdk[duckdb] -``` - -If you attempt to use a conversion method without the required dependency installed, the SDK will provide a helpful error message with installation instructions. - - -## Static type analysis - -### Hashable Models - -All model objects in the SDK can be used as dictionary keys or set members. This provides several benefits: - -```python -# Example: Using models as dictionary keys -from foundry_sdk import FoundryClient - -client = FoundryClient(...) -file1 = client.datasets.Dataset.File.get(dataset_rid="ri.foundry.main.dataset.123", file_path="/data.csv") -file2 = client.datasets.Dataset.File.get(dataset_rid="ri.foundry.main.dataset.123", file_path="/data.csv") - -# Models with the same content are equal and have the same hash -assert file1 == file2 -assert hash(file1) == hash(file2) - -# Use models as dictionary keys -file_metadata = {} -file_metadata[file1] = {"last_modified": "2024-08-09"} - -# Can look up using any equivalent object -assert file_metadata[file2] == {"last_modified": "2024-08-09"} -``` - -**Note:** Models remain mutable for backward compatibility. If you modify a model after using it as a dictionary key, -the system will issue a warning and the model's hash value will be reset. Although allowed, mutating models and using -their hash values is not recommended as it can lead to unexpected behavior when using them in dictionaries or sets. - -This library uses [Pydantic](https://docs.pydantic.dev) for creating and validating data models which you will see in the -method definitions (see [Documentation for Models](#models-link) below for a full list of models). -All request parameters and responses with nested fields are typed using a Pydantic -[`BaseModel`](https://docs.pydantic.dev/latest/api/base_model/) class. For example, here is how -`Group.search` method is defined in the `Admin` namespace: - -```python - @pydantic.validate_call - @handle_unexpected - def search( - self, - *, - where: GroupSearchFilter, - page_size: Optional[PageSize] = None, - page_token: Optional[PageToken] = None, - preview: Optional[PreviewMode] = None, - request_timeout: Optional[Annotated[int, pydantic.Field(gt=0)]] = None, - ) -> SearchGroupsResponse: - ... - -``` - -```python -import foundry_sdk -from foundry_sdk.v2.admin.models import GroupSearchFilter - -client = foundry_sdk.FoundryClient(...) - -result = client.admin.Group.search(where=GroupSearchFilter(type="queryString", value="John Doe")) -print(result.data) - -``` - -If you are using a static type checker (for example, [mypy](https://mypy-lang.org), [pyright](https://github.com/microsoft/pyright)), you -get static type analysis for the arguments you provide to the function and with the response. For example, if you pass an `int` -to `name` but `name` expects a string or if you try to access `branchName` on the returned [`Branch`](docs/Branch.md) object (the -property is actually called `name`), you will get the following errors: - - -```python -branch = client.datasets.Dataset.Branch.create( - "ri.foundry.main.dataset.abc", - # ERROR: "Literal[123]" is incompatible with "BranchName" - name=123, -) -# ERROR: Cannot access member "branchName" for type "Branch" -print(branch.branchName) - -``` - - -## HTTP Session Configuration -You can configure various parts of the HTTP session using the `Config` class. - -```python -from foundry_sdk import Config -from foundry_sdk import UserTokenAuth -from foundry_sdk import FoundryClient - -client = FoundryClient( - auth=UserTokenAuth(...), - hostname="example.palantirfoundry.com", - config=Config( - # Set the default headers for every request - default_headers={"Foo": "Bar"}, - # Default to a 60 second timeout - timeout=60, - # Create a proxy for the https protocol - proxies={"https": "https://10.10.1.10:1080"}, - ), -) - -``` - -The full list of options can be found below. - -- `default_headers` (dict[str, str]): HTTP headers to include with all requests. -- `proxies` (dict["http" | "https", str]): Proxies to use for HTTP and HTTPS requests. -- `timeout` (int | float): The default timeout for all requests in seconds. -- `verify` (bool | str): SSL verification, can be a boolean or a path to a CA bundle. Defaults to `True`. -- `default_params` (dict[str, Any]): URL query parameters to include with all requests. -- `scheme` ("http" | "https"): URL scheme to use ('http' or 'https'). Defaults to 'https'. - -### SSL Certificate Verification - -In addition to the `Config` class, the SSL certificate file used for verification can be set using -the following environment variables (in order of precedence): -- **`REQUESTS_CA_BUNDLE`** -- **`SSL_CERT_FILE`** - -The SDK will only check for the presence of these environment variables if the `verify` option is set to -`True` (the default value). If `verify` is set to False, the environment variables will be ignored. - -> [!IMPORTANT] -> If you are using an HTTPS proxy server, the `verify` value will be passed to the proxy's -> SSL context as well. - -## Common errors -This section will document any user-related errors with information on how you may be able to resolve them. - -### ApiFeaturePreviewUsageOnly -This error indicates you are trying to use an endpoint in public preview and have not set `preview=True` when -calling the endpoint. Before doing so, note that this endpoint is -in preview state and breaking changes may occur at any time. - -During the first phase of an endpoint's lifecycle, it may be in `Public Preview` -state. This indicates that the endpoint is in development and is not intended for -production use. - -## Input should have timezone info - -```python -# Example error -pydantic_core._pydantic_core.ValidationError: 1 validation error for Model -datetype - Input should have timezone info [type=timezone_aware, input_value=datetime.datetime(2025, 2, 5, 20, 57, 57, 511182), input_type=datetime] -``` - -This error indicates that you are passing a `datetime` object without timezone information to an -endpoint that requires it. To resolve this error, you should pass in a `datetime` object with timezone -information. For example, you can use the `timezone` class in the `datetime` package: - -```python -from datetime import datetime -from datetime import timezone - -datetime_with_tz = datetime(2025, 2, 5, 20, 57, 57, 511182, tzinfo=timezone.utc) -``` - - - -## Documentation for V2 API endpoints - -Namespace | Resource | Operation | HTTP request | ------------- | ------------- | ------------- | ------------- | -**Admin** | AuthenticationProvider | [**get**](docs/v2/Admin/AuthenticationProvider.md#get) | **GET** /v2/admin/enrollments/{enrollmentRid}/authenticationProviders/{authenticationProviderRid} | -**Admin** | AuthenticationProvider | [**list**](docs/v2/Admin/AuthenticationProvider.md#list) | **GET** /v2/admin/enrollments/{enrollmentRid}/authenticationProviders | -**Admin** | AuthenticationProvider | [**preregister_group**](docs/v2/Admin/AuthenticationProvider.md#preregister_group) | **POST** /v2/admin/enrollments/{enrollmentRid}/authenticationProviders/{authenticationProviderRid}/preregisterGroup | -**Admin** | AuthenticationProvider | [**preregister_user**](docs/v2/Admin/AuthenticationProvider.md#preregister_user) | **POST** /v2/admin/enrollments/{enrollmentRid}/authenticationProviders/{authenticationProviderRid}/preregisterUser | -**Admin** | Group | [**create**](docs/v2/Admin/Group.md#create) | **POST** /v2/admin/groups | -**Admin** | Group | [**delete**](docs/v2/Admin/Group.md#delete) | **DELETE** /v2/admin/groups/{groupId} | -**Admin** | Group | [**get**](docs/v2/Admin/Group.md#get) | **GET** /v2/admin/groups/{groupId} | -**Admin** | Group | [**get_batch**](docs/v2/Admin/Group.md#get_batch) | **POST** /v2/admin/groups/getBatch | -**Admin** | Group | [**list**](docs/v2/Admin/Group.md#list) | **GET** /v2/admin/groups | -**Admin** | Group | [**search**](docs/v2/Admin/Group.md#search) | **POST** /v2/admin/groups/search | -**Admin** | GroupMember | [**add**](docs/v2/Admin/GroupMember.md#add) | **POST** /v2/admin/groups/{groupId}/groupMembers/add | -**Admin** | GroupMember | [**list**](docs/v2/Admin/GroupMember.md#list) | **GET** /v2/admin/groups/{groupId}/groupMembers | -**Admin** | GroupMember | [**remove**](docs/v2/Admin/GroupMember.md#remove) | **POST** /v2/admin/groups/{groupId}/groupMembers/remove | -**Admin** | GroupMembership | [**list**](docs/v2/Admin/GroupMembership.md#list) | **GET** /v2/admin/users/{userId}/groupMemberships | -**Admin** | GroupMembershipExpirationPolicy | [**get**](docs/v2/Admin/GroupMembershipExpirationPolicy.md#get) | **GET** /v2/admin/groups/{groupId}/membershipExpirationPolicy | -**Admin** | GroupMembershipExpirationPolicy | [**replace**](docs/v2/Admin/GroupMembershipExpirationPolicy.md#replace) | **PUT** /v2/admin/groups/{groupId}/membershipExpirationPolicy | -**Admin** | GroupProviderInfo | [**get**](docs/v2/Admin/GroupProviderInfo.md#get) | **GET** /v2/admin/groups/{groupId}/providerInfo | -**Admin** | GroupProviderInfo | [**replace**](docs/v2/Admin/GroupProviderInfo.md#replace) | **PUT** /v2/admin/groups/{groupId}/providerInfo | -**Admin** | Marking | [**create**](docs/v2/Admin/Marking.md#create) | **POST** /v2/admin/markings | -**Admin** | Marking | [**get**](docs/v2/Admin/Marking.md#get) | **GET** /v2/admin/markings/{markingId} | -**Admin** | Marking | [**get_batch**](docs/v2/Admin/Marking.md#get_batch) | **POST** /v2/admin/markings/getBatch | -**Admin** | Marking | [**list**](docs/v2/Admin/Marking.md#list) | **GET** /v2/admin/markings | -**Admin** | Marking | [**replace**](docs/v2/Admin/Marking.md#replace) | **PUT** /v2/admin/markings/{markingId} | -**Admin** | MarkingCategory | [**get**](docs/v2/Admin/MarkingCategory.md#get) | **GET** /v2/admin/markingCategories/{markingCategoryId} | -**Admin** | MarkingCategory | [**list**](docs/v2/Admin/MarkingCategory.md#list) | **GET** /v2/admin/markingCategories | -**Admin** | MarkingMember | [**add**](docs/v2/Admin/MarkingMember.md#add) | **POST** /v2/admin/markings/{markingId}/markingMembers/add | -**Admin** | MarkingMember | [**list**](docs/v2/Admin/MarkingMember.md#list) | **GET** /v2/admin/markings/{markingId}/markingMembers | -**Admin** | MarkingMember | [**remove**](docs/v2/Admin/MarkingMember.md#remove) | **POST** /v2/admin/markings/{markingId}/markingMembers/remove | -**Admin** | MarkingRoleAssignment | [**add**](docs/v2/Admin/MarkingRoleAssignment.md#add) | **POST** /v2/admin/markings/{markingId}/roleAssignments/add | -**Admin** | MarkingRoleAssignment | [**list**](docs/v2/Admin/MarkingRoleAssignment.md#list) | **GET** /v2/admin/markings/{markingId}/roleAssignments | -**Admin** | MarkingRoleAssignment | [**remove**](docs/v2/Admin/MarkingRoleAssignment.md#remove) | **POST** /v2/admin/markings/{markingId}/roleAssignments/remove | -**Admin** | Organization | [**get**](docs/v2/Admin/Organization.md#get) | **GET** /v2/admin/organizations/{organizationRid} | -**Admin** | Organization | [**list_available_roles**](docs/v2/Admin/Organization.md#list_available_roles) | **GET** /v2/admin/organizations/{organizationRid}/listAvailableRoles | -**Admin** | Organization | [**replace**](docs/v2/Admin/Organization.md#replace) | **PUT** /v2/admin/organizations/{organizationRid} | -**Admin** | OrganizationRoleAssignment | [**add**](docs/v2/Admin/OrganizationRoleAssignment.md#add) | **POST** /v2/admin/organizations/{organizationRid}/roleAssignments/add | -**Admin** | OrganizationRoleAssignment | [**list**](docs/v2/Admin/OrganizationRoleAssignment.md#list) | **GET** /v2/admin/organizations/{organizationRid}/roleAssignments | -**Admin** | OrganizationRoleAssignment | [**remove**](docs/v2/Admin/OrganizationRoleAssignment.md#remove) | **POST** /v2/admin/organizations/{organizationRid}/roleAssignments/remove | -**Admin** | User | [**delete**](docs/v2/Admin/User.md#delete) | **DELETE** /v2/admin/users/{userId} | -**Admin** | User | [**get**](docs/v2/Admin/User.md#get) | **GET** /v2/admin/users/{userId} | -**Admin** | User | [**get_batch**](docs/v2/Admin/User.md#get_batch) | **POST** /v2/admin/users/getBatch | -**Admin** | User | [**get_current**](docs/v2/Admin/User.md#get_current) | **GET** /v2/admin/users/getCurrent | -**Admin** | User | [**get_markings**](docs/v2/Admin/User.md#get_markings) | **GET** /v2/admin/users/{userId}/getMarkings | -**Admin** | User | [**list**](docs/v2/Admin/User.md#list) | **GET** /v2/admin/users | -**Admin** | User | [**profile_picture**](docs/v2/Admin/User.md#profile_picture) | **GET** /v2/admin/users/{userId}/profilePicture | -**Admin** | User | [**revoke_all_tokens**](docs/v2/Admin/User.md#revoke_all_tokens) | **POST** /v2/admin/users/{userId}/revokeAllTokens | -**Admin** | User | [**search**](docs/v2/Admin/User.md#search) | **POST** /v2/admin/users/search | -**Admin** | UserProviderInfo | [**get**](docs/v2/Admin/UserProviderInfo.md#get) | **GET** /v2/admin/users/{userId}/providerInfo | -**Admin** | UserProviderInfo | [**replace**](docs/v2/Admin/UserProviderInfo.md#replace) | **PUT** /v2/admin/users/{userId}/providerInfo | -**AipAgents** | Agent | [**all_sessions**](docs/v2/AipAgents/Agent.md#all_sessions) | **GET** /v2/aipAgents/agents/allSessions | -**AipAgents** | Agent | [**get**](docs/v2/AipAgents/Agent.md#get) | **GET** /v2/aipAgents/agents/{agentRid} | -**AipAgents** | AgentVersion | [**get**](docs/v2/AipAgents/AgentVersion.md#get) | **GET** /v2/aipAgents/agents/{agentRid}/agentVersions/{agentVersionString} | -**AipAgents** | AgentVersion | [**list**](docs/v2/AipAgents/AgentVersion.md#list) | **GET** /v2/aipAgents/agents/{agentRid}/agentVersions | -**AipAgents** | Content | [**get**](docs/v2/AipAgents/Content.md#get) | **GET** /v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}/content | -**AipAgents** | Session | [**blocking_continue**](docs/v2/AipAgents/Session.md#blocking_continue) | **POST** /v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}/blockingContinue | -**AipAgents** | Session | [**cancel**](docs/v2/AipAgents/Session.md#cancel) | **POST** /v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}/cancel | -**AipAgents** | Session | [**create**](docs/v2/AipAgents/Session.md#create) | **POST** /v2/aipAgents/agents/{agentRid}/sessions | -**AipAgents** | Session | [**delete**](docs/v2/AipAgents/Session.md#delete) | **DELETE** /v2/aipAgents/agents/{agentRid}/sessions/{sessionRid} | -**AipAgents** | Session | [**get**](docs/v2/AipAgents/Session.md#get) | **GET** /v2/aipAgents/agents/{agentRid}/sessions/{sessionRid} | -**AipAgents** | Session | [**list**](docs/v2/AipAgents/Session.md#list) | **GET** /v2/aipAgents/agents/{agentRid}/sessions | -**AipAgents** | Session | [**rag_context**](docs/v2/AipAgents/Session.md#rag_context) | **PUT** /v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}/ragContext | -**AipAgents** | Session | [**streaming_continue**](docs/v2/AipAgents/Session.md#streaming_continue) | **POST** /v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}/streamingContinue | -**AipAgents** | Session | [**update_title**](docs/v2/AipAgents/Session.md#update_title) | **PUT** /v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}/updateTitle | -**AipAgents** | SessionTrace | [**get**](docs/v2/AipAgents/SessionTrace.md#get) | **GET** /v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}/sessionTraces/{sessionTraceId} | -**Audit** | LogFile | [**content**](docs/v2/Audit/LogFile.md#content) | **GET** /v2/audit/organizations/{organizationRid}/logFiles/{logFileId}/content | -**Audit** | LogFile | [**list**](docs/v2/Audit/LogFile.md#list) | **GET** /v2/audit/organizations/{organizationRid}/logFiles | -**Connectivity** | Connection | [**create**](docs/v2/Connectivity/Connection.md#create) | **POST** /v2/connectivity/connections | -**Connectivity** | Connection | [**get**](docs/v2/Connectivity/Connection.md#get) | **GET** /v2/connectivity/connections/{connectionRid} | -**Connectivity** | Connection | [**get_configuration**](docs/v2/Connectivity/Connection.md#get_configuration) | **GET** /v2/connectivity/connections/{connectionRid}/getConfiguration | -**Connectivity** | Connection | [**get_configuration_batch**](docs/v2/Connectivity/Connection.md#get_configuration_batch) | **POST** /v2/connectivity/connections/getConfigurationBatch | -**Connectivity** | Connection | [**update_export_settings**](docs/v2/Connectivity/Connection.md#update_export_settings) | **POST** /v2/connectivity/connections/{connectionRid}/updateExportSettings | -**Connectivity** | Connection | [**update_secrets**](docs/v2/Connectivity/Connection.md#update_secrets) | **POST** /v2/connectivity/connections/{connectionRid}/updateSecrets | -**Connectivity** | Connection | [**upload_custom_jdbc_drivers**](docs/v2/Connectivity/Connection.md#upload_custom_jdbc_drivers) | **POST** /v2/connectivity/connections/{connectionRid}/uploadCustomJdbcDrivers | -**Connectivity** | FileImport | [**create**](docs/v2/Connectivity/FileImport.md#create) | **POST** /v2/connectivity/connections/{connectionRid}/fileImports | -**Connectivity** | FileImport | [**delete**](docs/v2/Connectivity/FileImport.md#delete) | **DELETE** /v2/connectivity/connections/{connectionRid}/fileImports/{fileImportRid} | -**Connectivity** | FileImport | [**execute**](docs/v2/Connectivity/FileImport.md#execute) | **POST** /v2/connectivity/connections/{connectionRid}/fileImports/{fileImportRid}/execute | -**Connectivity** | FileImport | [**get**](docs/v2/Connectivity/FileImport.md#get) | **GET** /v2/connectivity/connections/{connectionRid}/fileImports/{fileImportRid} | -**Connectivity** | FileImport | [**list**](docs/v2/Connectivity/FileImport.md#list) | **GET** /v2/connectivity/connections/{connectionRid}/fileImports | -**Connectivity** | FileImport | [**replace**](docs/v2/Connectivity/FileImport.md#replace) | **PUT** /v2/connectivity/connections/{connectionRid}/fileImports/{fileImportRid} | -**Connectivity** | TableImport | [**create**](docs/v2/Connectivity/TableImport.md#create) | **POST** /v2/connectivity/connections/{connectionRid}/tableImports | -**Connectivity** | TableImport | [**delete**](docs/v2/Connectivity/TableImport.md#delete) | **DELETE** /v2/connectivity/connections/{connectionRid}/tableImports/{tableImportRid} | -**Connectivity** | TableImport | [**execute**](docs/v2/Connectivity/TableImport.md#execute) | **POST** /v2/connectivity/connections/{connectionRid}/tableImports/{tableImportRid}/execute | -**Connectivity** | TableImport | [**get**](docs/v2/Connectivity/TableImport.md#get) | **GET** /v2/connectivity/connections/{connectionRid}/tableImports/{tableImportRid} | -**Connectivity** | TableImport | [**list**](docs/v2/Connectivity/TableImport.md#list) | **GET** /v2/connectivity/connections/{connectionRid}/tableImports | -**Connectivity** | TableImport | [**replace**](docs/v2/Connectivity/TableImport.md#replace) | **PUT** /v2/connectivity/connections/{connectionRid}/tableImports/{tableImportRid} | -**Connectivity** | VirtualTable | [**create**](docs/v2/Connectivity/VirtualTable.md#create) | **POST** /v2/connectivity/connections/{connectionRid}/virtualTables | -**DataHealth** | Check | [**create**](docs/v2/DataHealth/Check.md#create) | **POST** /v2/dataHealth/checks | -**DataHealth** | Check | [**delete**](docs/v2/DataHealth/Check.md#delete) | **DELETE** /v2/dataHealth/checks/{checkRid} | -**DataHealth** | Check | [**get**](docs/v2/DataHealth/Check.md#get) | **GET** /v2/dataHealth/checks/{checkRid} | -**DataHealth** | Check | [**replace**](docs/v2/DataHealth/Check.md#replace) | **PUT** /v2/dataHealth/checks/{checkRid} | -**DataHealth** | CheckReport | [**get**](docs/v2/DataHealth/CheckReport.md#get) | **GET** /v2/dataHealth/checkReports/{checkReportRid} | -**Datasets** | Branch | [**create**](docs/v2/Datasets/Branch.md#create) | **POST** /v2/datasets/{datasetRid}/branches | -**Datasets** | Branch | [**delete**](docs/v2/Datasets/Branch.md#delete) | **DELETE** /v2/datasets/{datasetRid}/branches/{branchName} | -**Datasets** | Branch | [**get**](docs/v2/Datasets/Branch.md#get) | **GET** /v2/datasets/{datasetRid}/branches/{branchName} | -**Datasets** | Branch | [**list**](docs/v2/Datasets/Branch.md#list) | **GET** /v2/datasets/{datasetRid}/branches | -**Datasets** | Branch | [**transactions**](docs/v2/Datasets/Branch.md#transactions) | **GET** /v2/datasets/{datasetRid}/branches/{branchName}/transactions | -**Datasets** | Dataset | [**create**](docs/v2/Datasets/Dataset.md#create) | **POST** /v2/datasets | -**Datasets** | Dataset | [**get**](docs/v2/Datasets/Dataset.md#get) | **GET** /v2/datasets/{datasetRid} | -**Datasets** | Dataset | [**get_health_checks**](docs/v2/Datasets/Dataset.md#get_health_checks) | **GET** /v2/datasets/{datasetRid}/getHealthChecks | -**Datasets** | Dataset | [**get_schedules**](docs/v2/Datasets/Dataset.md#get_schedules) | **GET** /v2/datasets/{datasetRid}/getSchedules | -**Datasets** | Dataset | [**get_schema**](docs/v2/Datasets/Dataset.md#get_schema) | **GET** /v2/datasets/{datasetRid}/getSchema | -**Datasets** | Dataset | [**get_schema_batch**](docs/v2/Datasets/Dataset.md#get_schema_batch) | **POST** /v2/datasets/getSchemaBatch | -**Datasets** | Dataset | [**jobs**](docs/v2/Datasets/Dataset.md#jobs) | **POST** /v2/datasets/{datasetRid}/jobs | -**Datasets** | Dataset | [**put_schema**](docs/v2/Datasets/Dataset.md#put_schema) | **PUT** /v2/datasets/{datasetRid}/putSchema | -**Datasets** | Dataset | [**read_table**](docs/v2/Datasets/Dataset.md#read_table) | **GET** /v2/datasets/{datasetRid}/readTable | -**Datasets** | Dataset | [**transactions**](docs/v2/Datasets/Dataset.md#transactions) | **GET** /v2/datasets/{datasetRid}/transactions | -**Datasets** | File | [**content**](docs/v2/Datasets/File.md#content) | **GET** /v2/datasets/{datasetRid}/files/{filePath}/content | -**Datasets** | File | [**delete**](docs/v2/Datasets/File.md#delete) | **DELETE** /v2/datasets/{datasetRid}/files/{filePath} | -**Datasets** | File | [**get**](docs/v2/Datasets/File.md#get) | **GET** /v2/datasets/{datasetRid}/files/{filePath} | -**Datasets** | File | [**list**](docs/v2/Datasets/File.md#list) | **GET** /v2/datasets/{datasetRid}/files | -**Datasets** | File | [**upload**](docs/v2/Datasets/File.md#upload) | **POST** /v2/datasets/{datasetRid}/files/{filePath}/upload | -**Datasets** | Transaction | [**abort**](docs/v2/Datasets/Transaction.md#abort) | **POST** /v2/datasets/{datasetRid}/transactions/{transactionRid}/abort | -**Datasets** | Transaction | [**commit**](docs/v2/Datasets/Transaction.md#commit) | **POST** /v2/datasets/{datasetRid}/transactions/{transactionRid}/commit | -**Datasets** | Transaction | [**create**](docs/v2/Datasets/Transaction.md#create) | **POST** /v2/datasets/{datasetRid}/transactions | -**Datasets** | Transaction | [**get**](docs/v2/Datasets/Transaction.md#get) | **GET** /v2/datasets/{datasetRid}/transactions/{transactionRid} | -**Datasets** | View | [**add_backing_datasets**](docs/v2/Datasets/View.md#add_backing_datasets) | **POST** /v2/datasets/views/{viewDatasetRid}/addBackingDatasets | -**Datasets** | View | [**add_primary_key**](docs/v2/Datasets/View.md#add_primary_key) | **POST** /v2/datasets/views/{viewDatasetRid}/addPrimaryKey | -**Datasets** | View | [**create**](docs/v2/Datasets/View.md#create) | **POST** /v2/datasets/views | -**Datasets** | View | [**get**](docs/v2/Datasets/View.md#get) | **GET** /v2/datasets/views/{viewDatasetRid} | -**Datasets** | View | [**remove_backing_datasets**](docs/v2/Datasets/View.md#remove_backing_datasets) | **POST** /v2/datasets/views/{viewDatasetRid}/removeBackingDatasets | -**Datasets** | View | [**replace_backing_datasets**](docs/v2/Datasets/View.md#replace_backing_datasets) | **PUT** /v2/datasets/views/{viewDatasetRid}/replaceBackingDatasets | -**Filesystem** | Folder | [**children**](docs/v2/Filesystem/Folder.md#children) | **GET** /v2/filesystem/folders/{folderRid}/children | -**Filesystem** | Folder | [**create**](docs/v2/Filesystem/Folder.md#create) | **POST** /v2/filesystem/folders | -**Filesystem** | Folder | [**get**](docs/v2/Filesystem/Folder.md#get) | **GET** /v2/filesystem/folders/{folderRid} | -**Filesystem** | Folder | [**get_batch**](docs/v2/Filesystem/Folder.md#get_batch) | **POST** /v2/filesystem/folders/getBatch | -**Filesystem** | Project | [**add_organizations**](docs/v2/Filesystem/Project.md#add_organizations) | **POST** /v2/filesystem/projects/{projectRid}/addOrganizations | -**Filesystem** | Project | [**create**](docs/v2/Filesystem/Project.md#create) | **POST** /v2/filesystem/projects/create | -**Filesystem** | Project | [**create_from_template**](docs/v2/Filesystem/Project.md#create_from_template) | **POST** /v2/filesystem/projects/createFromTemplate | -**Filesystem** | Project | [**get**](docs/v2/Filesystem/Project.md#get) | **GET** /v2/filesystem/projects/{projectRid} | -**Filesystem** | Project | [**organizations**](docs/v2/Filesystem/Project.md#organizations) | **GET** /v2/filesystem/projects/{projectRid}/organizations | -**Filesystem** | Project | [**remove_organizations**](docs/v2/Filesystem/Project.md#remove_organizations) | **POST** /v2/filesystem/projects/{projectRid}/removeOrganizations | -**Filesystem** | Resource | [**add_markings**](docs/v2/Filesystem/Resource.md#add_markings) | **POST** /v2/filesystem/resources/{resourceRid}/addMarkings | -**Filesystem** | Resource | [**delete**](docs/v2/Filesystem/Resource.md#delete) | **DELETE** /v2/filesystem/resources/{resourceRid} | -**Filesystem** | Resource | [**get**](docs/v2/Filesystem/Resource.md#get) | **GET** /v2/filesystem/resources/{resourceRid} | -**Filesystem** | Resource | [**get_access_requirements**](docs/v2/Filesystem/Resource.md#get_access_requirements) | **GET** /v2/filesystem/resources/{resourceRid}/getAccessRequirements | -**Filesystem** | Resource | [**get_batch**](docs/v2/Filesystem/Resource.md#get_batch) | **POST** /v2/filesystem/resources/getBatch | -**Filesystem** | Resource | [**get_by_path**](docs/v2/Filesystem/Resource.md#get_by_path) | **GET** /v2/filesystem/resources/getByPath | -**Filesystem** | Resource | [**get_by_path_batch**](docs/v2/Filesystem/Resource.md#get_by_path_batch) | **POST** /v2/filesystem/resources/getByPathBatch | -**Filesystem** | Resource | [**markings**](docs/v2/Filesystem/Resource.md#markings) | **GET** /v2/filesystem/resources/{resourceRid}/markings | -**Filesystem** | Resource | [**permanently_delete**](docs/v2/Filesystem/Resource.md#permanently_delete) | **POST** /v2/filesystem/resources/{resourceRid}/permanentlyDelete | -**Filesystem** | Resource | [**remove_markings**](docs/v2/Filesystem/Resource.md#remove_markings) | **POST** /v2/filesystem/resources/{resourceRid}/removeMarkings | -**Filesystem** | Resource | [**restore**](docs/v2/Filesystem/Resource.md#restore) | **POST** /v2/filesystem/resources/{resourceRid}/restore | -**Filesystem** | ResourceRole | [**add**](docs/v2/Filesystem/ResourceRole.md#add) | **POST** /v2/filesystem/resources/{resourceRid}/roles/add | -**Filesystem** | ResourceRole | [**list**](docs/v2/Filesystem/ResourceRole.md#list) | **GET** /v2/filesystem/resources/{resourceRid}/roles | -**Filesystem** | ResourceRole | [**remove**](docs/v2/Filesystem/ResourceRole.md#remove) | **POST** /v2/filesystem/resources/{resourceRid}/roles/remove | -**Filesystem** | Space | [**list**](docs/v2/Filesystem/Space.md#list) | **GET** /v2/filesystem/spaces | -**MediaSets** | MediaSet | [**abort**](docs/v2/MediaSets/MediaSet.md#abort) | **POST** /v2/mediasets/{mediaSetRid}/transactions/{transactionId}/abort | -**MediaSets** | MediaSet | [**commit**](docs/v2/MediaSets/MediaSet.md#commit) | **POST** /v2/mediasets/{mediaSetRid}/transactions/{transactionId}/commit | -**MediaSets** | MediaSet | [**create**](docs/v2/MediaSets/MediaSet.md#create) | **POST** /v2/mediasets/{mediaSetRid}/transactions | -**MediaSets** | MediaSet | [**get_rid_by_path**](docs/v2/MediaSets/MediaSet.md#get_rid_by_path) | **GET** /v2/mediasets/{mediaSetRid}/items/getRidByPath | -**MediaSets** | MediaSet | [**info**](docs/v2/MediaSets/MediaSet.md#info) | **GET** /v2/mediasets/{mediaSetRid}/items/{mediaItemRid} | -**MediaSets** | MediaSet | [**read**](docs/v2/MediaSets/MediaSet.md#read) | **GET** /v2/mediasets/{mediaSetRid}/items/{mediaItemRid}/content | -**MediaSets** | MediaSet | [**read_original**](docs/v2/MediaSets/MediaSet.md#read_original) | **GET** /v2/mediasets/{mediaSetRid}/items/{mediaItemRid}/original | -**MediaSets** | MediaSet | [**reference**](docs/v2/MediaSets/MediaSet.md#reference) | **GET** /v2/mediasets/{mediaSetRid}/items/{mediaItemRid}/reference | -**MediaSets** | MediaSet | [**upload**](docs/v2/MediaSets/MediaSet.md#upload) | **POST** /v2/mediasets/{mediaSetRid}/items | -**MediaSets** | MediaSet | [**upload_media**](docs/v2/MediaSets/MediaSet.md#upload_media) | **PUT** /v2/mediasets/media/upload | -**Ontologies** | Action | [**apply**](docs/v2/Ontologies/Action.md#apply) | **POST** /v2/ontologies/{ontology}/actions/{action}/apply | -**Ontologies** | Action | [**apply_batch**](docs/v2/Ontologies/Action.md#apply_batch) | **POST** /v2/ontologies/{ontology}/actions/{action}/applyBatch | -**Ontologies** | ActionType | [**get**](docs/v2/Ontologies/ActionType.md#get) | **GET** /v2/ontologies/{ontology}/actionTypes/{actionType} | -**Ontologies** | ActionType | [**get_by_rid**](docs/v2/Ontologies/ActionType.md#get_by_rid) | **GET** /v2/ontologies/{ontology}/actionTypes/byRid/{actionTypeRid} | -**Ontologies** | ActionType | [**list**](docs/v2/Ontologies/ActionType.md#list) | **GET** /v2/ontologies/{ontology}/actionTypes | -**Ontologies** | Attachment | [**get**](docs/v2/Ontologies/Attachment.md#get) | **GET** /v2/ontologies/attachments/{attachmentRid} | -**Ontologies** | Attachment | [**read**](docs/v2/Ontologies/Attachment.md#read) | **GET** /v2/ontologies/attachments/{attachmentRid}/content | -**Ontologies** | Attachment | [**upload**](docs/v2/Ontologies/Attachment.md#upload) | **POST** /v2/ontologies/attachments/upload | -**Ontologies** | AttachmentProperty | [**get_attachment**](docs/v2/Ontologies/AttachmentProperty.md#get_attachment) | **GET** /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/attachments/{property} | -**Ontologies** | AttachmentProperty | [**get_attachment_by_rid**](docs/v2/Ontologies/AttachmentProperty.md#get_attachment_by_rid) | **GET** /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/attachments/{property}/{attachmentRid} | -**Ontologies** | AttachmentProperty | [**read_attachment**](docs/v2/Ontologies/AttachmentProperty.md#read_attachment) | **GET** /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/attachments/{property}/content | -**Ontologies** | AttachmentProperty | [**read_attachment_by_rid**](docs/v2/Ontologies/AttachmentProperty.md#read_attachment_by_rid) | **GET** /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/attachments/{property}/{attachmentRid}/content | -**Ontologies** | CipherTextProperty | [**decrypt**](docs/v2/Ontologies/CipherTextProperty.md#decrypt) | **GET** /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/ciphertexts/{property}/decrypt | -**Ontologies** | LinkedObject | [**get_linked_object**](docs/v2/Ontologies/LinkedObject.md#get_linked_object) | **GET** /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/links/{linkType}/{linkedObjectPrimaryKey} | -**Ontologies** | LinkedObject | [**list_linked_objects**](docs/v2/Ontologies/LinkedObject.md#list_linked_objects) | **GET** /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/links/{linkType} | -**Ontologies** | MediaReferenceProperty | [**get_media_content**](docs/v2/Ontologies/MediaReferenceProperty.md#get_media_content) | **GET** /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/media/{property}/content | -**Ontologies** | MediaReferenceProperty | [**upload**](docs/v2/Ontologies/MediaReferenceProperty.md#upload) | **POST** /v2/ontologies/{ontology}/objectTypes/{objectType}/media/{property}/upload | -**Ontologies** | ObjectType | [**get**](docs/v2/Ontologies/ObjectType.md#get) | **GET** /v2/ontologies/{ontology}/objectTypes/{objectType} | -**Ontologies** | ObjectType | [**get_outgoing_link_type**](docs/v2/Ontologies/ObjectType.md#get_outgoing_link_type) | **GET** /v2/ontologies/{ontology}/objectTypes/{objectType}/outgoingLinkTypes/{linkType} | -**Ontologies** | ObjectType | [**list**](docs/v2/Ontologies/ObjectType.md#list) | **GET** /v2/ontologies/{ontology}/objectTypes | -**Ontologies** | ObjectType | [**list_outgoing_link_types**](docs/v2/Ontologies/ObjectType.md#list_outgoing_link_types) | **GET** /v2/ontologies/{ontology}/objectTypes/{objectType}/outgoingLinkTypes | -**Ontologies** | Ontology | [**get**](docs/v2/Ontologies/Ontology.md#get) | **GET** /v2/ontologies/{ontology} | -**Ontologies** | Ontology | [**get_full_metadata**](docs/v2/Ontologies/Ontology.md#get_full_metadata) | **GET** /v2/ontologies/{ontology}/fullMetadata | -**Ontologies** | Ontology | [**list**](docs/v2/Ontologies/Ontology.md#list) | **GET** /v2/ontologies | -**Ontologies** | OntologyInterface | [**get**](docs/v2/Ontologies/OntologyInterface.md#get) | **GET** /v2/ontologies/{ontology}/interfaceTypes/{interfaceType} | -**Ontologies** | OntologyInterface | [**list**](docs/v2/Ontologies/OntologyInterface.md#list) | **GET** /v2/ontologies/{ontology}/interfaceTypes | -**Ontologies** | OntologyObject | [**aggregate**](docs/v2/Ontologies/OntologyObject.md#aggregate) | **POST** /v2/ontologies/{ontology}/objects/{objectType}/aggregate | -**Ontologies** | OntologyObject | [**get**](docs/v2/Ontologies/OntologyObject.md#get) | **GET** /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey} | -**Ontologies** | OntologyObject | [**list**](docs/v2/Ontologies/OntologyObject.md#list) | **GET** /v2/ontologies/{ontology}/objects/{objectType} | -**Ontologies** | OntologyObject | [**search**](docs/v2/Ontologies/OntologyObject.md#search) | **POST** /v2/ontologies/{ontology}/objects/{objectType}/search | -**Ontologies** | OntologyObjectSet | [**aggregate**](docs/v2/Ontologies/OntologyObjectSet.md#aggregate) | **POST** /v2/ontologies/{ontology}/objectSets/aggregate | -**Ontologies** | OntologyObjectSet | [**create_temporary**](docs/v2/Ontologies/OntologyObjectSet.md#create_temporary) | **POST** /v2/ontologies/{ontology}/objectSets/createTemporary | -**Ontologies** | OntologyObjectSet | [**load**](docs/v2/Ontologies/OntologyObjectSet.md#load) | **POST** /v2/ontologies/{ontology}/objectSets/loadObjects | -**Ontologies** | OntologyObjectSet | [**load_multiple_object_types**](docs/v2/Ontologies/OntologyObjectSet.md#load_multiple_object_types) | **POST** /v2/ontologies/{ontology}/objectSets/loadObjectsMultipleObjectTypes | -**Ontologies** | OntologyObjectSet | [**load_objects_or_interfaces**](docs/v2/Ontologies/OntologyObjectSet.md#load_objects_or_interfaces) | **POST** /v2/ontologies/{ontology}/objectSets/loadObjectsOrInterfaces | -**Ontologies** | OntologyValueType | [**get**](docs/v2/Ontologies/OntologyValueType.md#get) | **GET** /v2/ontologies/{ontology}/valueTypes/{valueType} | -**Ontologies** | OntologyValueType | [**list**](docs/v2/Ontologies/OntologyValueType.md#list) | **GET** /v2/ontologies/{ontology}/valueTypes | -**Ontologies** | Query | [**execute**](docs/v2/Ontologies/Query.md#execute) | **POST** /v2/ontologies/{ontology}/queries/{queryApiName}/execute | -**Ontologies** | QueryType | [**get**](docs/v2/Ontologies/QueryType.md#get) | **GET** /v2/ontologies/{ontology}/queryTypes/{queryApiName} | -**Ontologies** | QueryType | [**list**](docs/v2/Ontologies/QueryType.md#list) | **GET** /v2/ontologies/{ontology}/queryTypes | -**Ontologies** | TimeSeriesPropertyV2 | [**get_first_point**](docs/v2/Ontologies/TimeSeriesPropertyV2.md#get_first_point) | **GET** /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/timeseries/{property}/firstPoint | -**Ontologies** | TimeSeriesPropertyV2 | [**get_last_point**](docs/v2/Ontologies/TimeSeriesPropertyV2.md#get_last_point) | **GET** /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/timeseries/{property}/lastPoint | -**Ontologies** | TimeSeriesPropertyV2 | [**stream_points**](docs/v2/Ontologies/TimeSeriesPropertyV2.md#stream_points) | **POST** /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/timeseries/{property}/streamPoints | -**Ontologies** | TimeSeriesValueBankProperty | [**get_latest_value**](docs/v2/Ontologies/TimeSeriesValueBankProperty.md#get_latest_value) | **GET** /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/timeseries/{propertyName}/latestValue | -**Ontologies** | TimeSeriesValueBankProperty | [**stream_values**](docs/v2/Ontologies/TimeSeriesValueBankProperty.md#stream_values) | **POST** /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/timeseries/{property}/streamValues | -**Orchestration** | Build | [**cancel**](docs/v2/Orchestration/Build.md#cancel) | **POST** /v2/orchestration/builds/{buildRid}/cancel | -**Orchestration** | Build | [**create**](docs/v2/Orchestration/Build.md#create) | **POST** /v2/orchestration/builds/create | -**Orchestration** | Build | [**get**](docs/v2/Orchestration/Build.md#get) | **GET** /v2/orchestration/builds/{buildRid} | -**Orchestration** | Build | [**get_batch**](docs/v2/Orchestration/Build.md#get_batch) | **POST** /v2/orchestration/builds/getBatch | -**Orchestration** | Build | [**jobs**](docs/v2/Orchestration/Build.md#jobs) | **GET** /v2/orchestration/builds/{buildRid}/jobs | -**Orchestration** | Job | [**get**](docs/v2/Orchestration/Job.md#get) | **GET** /v2/orchestration/jobs/{jobRid} | -**Orchestration** | Job | [**get_batch**](docs/v2/Orchestration/Job.md#get_batch) | **POST** /v2/orchestration/jobs/getBatch | -**Orchestration** | Schedule | [**create**](docs/v2/Orchestration/Schedule.md#create) | **POST** /v2/orchestration/schedules | -**Orchestration** | Schedule | [**delete**](docs/v2/Orchestration/Schedule.md#delete) | **DELETE** /v2/orchestration/schedules/{scheduleRid} | -**Orchestration** | Schedule | [**get**](docs/v2/Orchestration/Schedule.md#get) | **GET** /v2/orchestration/schedules/{scheduleRid} | -**Orchestration** | Schedule | [**get_affected_resources**](docs/v2/Orchestration/Schedule.md#get_affected_resources) | **POST** /v2/orchestration/schedules/{scheduleRid}/getAffectedResources | -**Orchestration** | Schedule | [**get_batch**](docs/v2/Orchestration/Schedule.md#get_batch) | **POST** /v2/orchestration/schedules/getBatch | -**Orchestration** | Schedule | [**pause**](docs/v2/Orchestration/Schedule.md#pause) | **POST** /v2/orchestration/schedules/{scheduleRid}/pause | -**Orchestration** | Schedule | [**replace**](docs/v2/Orchestration/Schedule.md#replace) | **PUT** /v2/orchestration/schedules/{scheduleRid} | -**Orchestration** | Schedule | [**run**](docs/v2/Orchestration/Schedule.md#run) | **POST** /v2/orchestration/schedules/{scheduleRid}/run | -**Orchestration** | Schedule | [**runs**](docs/v2/Orchestration/Schedule.md#runs) | **GET** /v2/orchestration/schedules/{scheduleRid}/runs | -**Orchestration** | Schedule | [**unpause**](docs/v2/Orchestration/Schedule.md#unpause) | **POST** /v2/orchestration/schedules/{scheduleRid}/unpause | -**Orchestration** | ScheduleVersion | [**get**](docs/v2/Orchestration/ScheduleVersion.md#get) | **GET** /v2/orchestration/scheduleVersions/{scheduleVersionRid} | -**Orchestration** | ScheduleVersion | [**schedule**](docs/v2/Orchestration/ScheduleVersion.md#schedule) | **GET** /v2/orchestration/scheduleVersions/{scheduleVersionRid}/schedule | -**SqlQueries** | SqlQuery | [**cancel**](docs/v2/SqlQueries/SqlQuery.md#cancel) | **POST** /v2/sqlQueries/{sqlQueryId}/cancel | -**SqlQueries** | SqlQuery | [**execute**](docs/v2/SqlQueries/SqlQuery.md#execute) | **POST** /v2/sqlQueries/execute | -**SqlQueries** | SqlQuery | [**get_results**](docs/v2/SqlQueries/SqlQuery.md#get_results) | **GET** /v2/sqlQueries/{sqlQueryId}/getResults | -**SqlQueries** | SqlQuery | [**get_status**](docs/v2/SqlQueries/SqlQuery.md#get_status) | **GET** /v2/sqlQueries/{sqlQueryId}/getStatus | -**Streams** | Dataset | [**create**](docs/v2/Streams/Dataset.md#create) | **POST** /v2/streams/datasets/create | -**Streams** | Stream | [**create**](docs/v2/Streams/Stream.md#create) | **POST** /v2/streams/datasets/{datasetRid}/streams | -**Streams** | Stream | [**get**](docs/v2/Streams/Stream.md#get) | **GET** /v2/streams/datasets/{datasetRid}/streams/{streamBranchName} | -**Streams** | Stream | [**publish_binary_record**](docs/v2/Streams/Stream.md#publish_binary_record) | **POST** /v2/highScale/streams/datasets/{datasetRid}/streams/{streamBranchName}/publishBinaryRecord | -**Streams** | Stream | [**publish_record**](docs/v2/Streams/Stream.md#publish_record) | **POST** /v2/highScale/streams/datasets/{datasetRid}/streams/{streamBranchName}/publishRecord | -**Streams** | Stream | [**publish_records**](docs/v2/Streams/Stream.md#publish_records) | **POST** /v2/highScale/streams/datasets/{datasetRid}/streams/{streamBranchName}/publishRecords | -**Streams** | Stream | [**reset**](docs/v2/Streams/Stream.md#reset) | **POST** /v2/streams/datasets/{datasetRid}/streams/{streamBranchName}/reset | -**ThirdPartyApplications** | Version | [**delete**](docs/v2/ThirdPartyApplications/Version.md#delete) | **DELETE** /v2/thirdPartyApplications/{thirdPartyApplicationRid}/website/versions/{versionVersion} | -**ThirdPartyApplications** | Version | [**get**](docs/v2/ThirdPartyApplications/Version.md#get) | **GET** /v2/thirdPartyApplications/{thirdPartyApplicationRid}/website/versions/{versionVersion} | -**ThirdPartyApplications** | Version | [**list**](docs/v2/ThirdPartyApplications/Version.md#list) | **GET** /v2/thirdPartyApplications/{thirdPartyApplicationRid}/website/versions | -**ThirdPartyApplications** | Version | [**upload**](docs/v2/ThirdPartyApplications/Version.md#upload) | **POST** /v2/thirdPartyApplications/{thirdPartyApplicationRid}/website/versions/upload | -**ThirdPartyApplications** | Website | [**deploy**](docs/v2/ThirdPartyApplications/Website.md#deploy) | **POST** /v2/thirdPartyApplications/{thirdPartyApplicationRid}/website/deploy | -**ThirdPartyApplications** | Website | [**get**](docs/v2/ThirdPartyApplications/Website.md#get) | **GET** /v2/thirdPartyApplications/{thirdPartyApplicationRid}/website | -**ThirdPartyApplications** | Website | [**undeploy**](docs/v2/ThirdPartyApplications/Website.md#undeploy) | **POST** /v2/thirdPartyApplications/{thirdPartyApplicationRid}/website/undeploy | - -## Documentation for V1 API endpoints - -Namespace | Resource | Operation | HTTP request | ------------- | ------------- | ------------- | ------------- | -**Datasets** | Branch | [**create**](docs/v1/Datasets/Branch.md#create) | **POST** /v1/datasets/{datasetRid}/branches | -**Datasets** | Branch | [**delete**](docs/v1/Datasets/Branch.md#delete) | **DELETE** /v1/datasets/{datasetRid}/branches/{branchId} | -**Datasets** | Branch | [**get**](docs/v1/Datasets/Branch.md#get) | **GET** /v1/datasets/{datasetRid}/branches/{branchId} | -**Datasets** | Branch | [**list**](docs/v1/Datasets/Branch.md#list) | **GET** /v1/datasets/{datasetRid}/branches | -**Datasets** | Dataset | [**create**](docs/v1/Datasets/Dataset.md#create) | **POST** /v1/datasets | -**Datasets** | Dataset | [**get**](docs/v1/Datasets/Dataset.md#get) | **GET** /v1/datasets/{datasetRid} | -**Datasets** | Dataset | [**read**](docs/v1/Datasets/Dataset.md#read) | **GET** /v1/datasets/{datasetRid}/readTable | -**Datasets** | File | [**delete**](docs/v1/Datasets/File.md#delete) | **DELETE** /v1/datasets/{datasetRid}/files/{filePath} | -**Datasets** | File | [**get**](docs/v1/Datasets/File.md#get) | **GET** /v1/datasets/{datasetRid}/files/{filePath} | -**Datasets** | File | [**list**](docs/v1/Datasets/File.md#list) | **GET** /v1/datasets/{datasetRid}/files | -**Datasets** | File | [**read**](docs/v1/Datasets/File.md#read) | **GET** /v1/datasets/{datasetRid}/files/{filePath}/content | -**Datasets** | File | [**upload**](docs/v1/Datasets/File.md#upload) | **POST** /v1/datasets/{datasetRid}/files:upload | -**Datasets** | Transaction | [**abort**](docs/v1/Datasets/Transaction.md#abort) | **POST** /v1/datasets/{datasetRid}/transactions/{transactionRid}/abort | -**Datasets** | Transaction | [**commit**](docs/v1/Datasets/Transaction.md#commit) | **POST** /v1/datasets/{datasetRid}/transactions/{transactionRid}/commit | -**Datasets** | Transaction | [**create**](docs/v1/Datasets/Transaction.md#create) | **POST** /v1/datasets/{datasetRid}/transactions | -**Datasets** | Transaction | [**get**](docs/v1/Datasets/Transaction.md#get) | **GET** /v1/datasets/{datasetRid}/transactions/{transactionRid} | -**Ontologies** | Action | [**apply**](docs/v1/Ontologies/Action.md#apply) | **POST** /v1/ontologies/{ontologyRid}/actions/{actionType}/apply | -**Ontologies** | Action | [**apply_batch**](docs/v1/Ontologies/Action.md#apply_batch) | **POST** /v1/ontologies/{ontologyRid}/actions/{actionType}/applyBatch | -**Ontologies** | Action | [**validate**](docs/v1/Ontologies/Action.md#validate) | **POST** /v1/ontologies/{ontologyRid}/actions/{actionType}/validate | -**Ontologies** | ActionType | [**get**](docs/v1/Ontologies/ActionType.md#get) | **GET** /v1/ontologies/{ontologyRid}/actionTypes/{actionTypeApiName} | -**Ontologies** | ActionType | [**list**](docs/v1/Ontologies/ActionType.md#list) | **GET** /v1/ontologies/{ontologyRid}/actionTypes | -**Ontologies** | Attachment | [**get**](docs/v1/Ontologies/Attachment.md#get) | **GET** /v1/attachments/{attachmentRid} | -**Ontologies** | Attachment | [**read**](docs/v1/Ontologies/Attachment.md#read) | **GET** /v1/attachments/{attachmentRid}/content | -**Ontologies** | Attachment | [**upload**](docs/v1/Ontologies/Attachment.md#upload) | **POST** /v1/attachments/upload | -**Ontologies** | ObjectType | [**get**](docs/v1/Ontologies/ObjectType.md#get) | **GET** /v1/ontologies/{ontologyRid}/objectTypes/{objectType} | -**Ontologies** | ObjectType | [**get_outgoing_link_type**](docs/v1/Ontologies/ObjectType.md#get_outgoing_link_type) | **GET** /v1/ontologies/{ontologyRid}/objectTypes/{objectType}/outgoingLinkTypes/{linkType} | -**Ontologies** | ObjectType | [**list**](docs/v1/Ontologies/ObjectType.md#list) | **GET** /v1/ontologies/{ontologyRid}/objectTypes | -**Ontologies** | ObjectType | [**list_outgoing_link_types**](docs/v1/Ontologies/ObjectType.md#list_outgoing_link_types) | **GET** /v1/ontologies/{ontologyRid}/objectTypes/{objectType}/outgoingLinkTypes | -**Ontologies** | Ontology | [**get**](docs/v1/Ontologies/Ontology.md#get) | **GET** /v1/ontologies/{ontologyRid} | -**Ontologies** | Ontology | [**list**](docs/v1/Ontologies/Ontology.md#list) | **GET** /v1/ontologies | -**Ontologies** | OntologyObject | [**aggregate**](docs/v1/Ontologies/OntologyObject.md#aggregate) | **POST** /v1/ontologies/{ontologyRid}/objects/{objectType}/aggregate | -**Ontologies** | OntologyObject | [**get**](docs/v1/Ontologies/OntologyObject.md#get) | **GET** /v1/ontologies/{ontologyRid}/objects/{objectType}/{primaryKey} | -**Ontologies** | OntologyObject | [**get_linked_object**](docs/v1/Ontologies/OntologyObject.md#get_linked_object) | **GET** /v1/ontologies/{ontologyRid}/objects/{objectType}/{primaryKey}/links/{linkType}/{linkedObjectPrimaryKey} | -**Ontologies** | OntologyObject | [**list**](docs/v1/Ontologies/OntologyObject.md#list) | **GET** /v1/ontologies/{ontologyRid}/objects/{objectType} | -**Ontologies** | OntologyObject | [**list_linked_objects**](docs/v1/Ontologies/OntologyObject.md#list_linked_objects) | **GET** /v1/ontologies/{ontologyRid}/objects/{objectType}/{primaryKey}/links/{linkType} | -**Ontologies** | OntologyObject | [**search**](docs/v1/Ontologies/OntologyObject.md#search) | **POST** /v1/ontologies/{ontologyRid}/objects/{objectType}/search | -**Ontologies** | Query | [**execute**](docs/v1/Ontologies/Query.md#execute) | **POST** /v1/ontologies/{ontologyRid}/queries/{queryApiName}/execute | -**Ontologies** | QueryType | [**get**](docs/v1/Ontologies/QueryType.md#get) | **GET** /v1/ontologies/{ontologyRid}/queryTypes/{queryApiName} | -**Ontologies** | QueryType | [**list**](docs/v1/Ontologies/QueryType.md#list) | **GET** /v1/ontologies/{ontologyRid}/queryTypes | - - - - -## Documentation for V2 models - -Namespace | Name | Import | ---------- | ---- | ------ | -**Admin** | [AddEnrollmentRoleAssignmentsRequest](docs/v2/Admin/models/AddEnrollmentRoleAssignmentsRequest.md) | `from foundry_sdk.v2.admin.models import AddEnrollmentRoleAssignmentsRequest` | -**Admin** | [AddGroupMembersRequest](docs/v2/Admin/models/AddGroupMembersRequest.md) | `from foundry_sdk.v2.admin.models import AddGroupMembersRequest` | -**Admin** | [AddMarkingMembersRequest](docs/v2/Admin/models/AddMarkingMembersRequest.md) | `from foundry_sdk.v2.admin.models import AddMarkingMembersRequest` | -**Admin** | [AddMarkingRoleAssignmentsRequest](docs/v2/Admin/models/AddMarkingRoleAssignmentsRequest.md) | `from foundry_sdk.v2.admin.models import AddMarkingRoleAssignmentsRequest` | -**Admin** | [AddOrganizationRoleAssignmentsRequest](docs/v2/Admin/models/AddOrganizationRoleAssignmentsRequest.md) | `from foundry_sdk.v2.admin.models import AddOrganizationRoleAssignmentsRequest` | -**Admin** | [AttributeName](docs/v2/Admin/models/AttributeName.md) | `from foundry_sdk.v2.admin.models import AttributeName` | -**Admin** | [AttributeValue](docs/v2/Admin/models/AttributeValue.md) | `from foundry_sdk.v2.admin.models import AttributeValue` | -**Admin** | [AttributeValues](docs/v2/Admin/models/AttributeValues.md) | `from foundry_sdk.v2.admin.models import AttributeValues` | -**Admin** | [AuthenticationProtocol](docs/v2/Admin/models/AuthenticationProtocol.md) | `from foundry_sdk.v2.admin.models import AuthenticationProtocol` | -**Admin** | [AuthenticationProvider](docs/v2/Admin/models/AuthenticationProvider.md) | `from foundry_sdk.v2.admin.models import AuthenticationProvider` | -**Admin** | [AuthenticationProviderEnabled](docs/v2/Admin/models/AuthenticationProviderEnabled.md) | `from foundry_sdk.v2.admin.models import AuthenticationProviderEnabled` | -**Admin** | [AuthenticationProviderName](docs/v2/Admin/models/AuthenticationProviderName.md) | `from foundry_sdk.v2.admin.models import AuthenticationProviderName` | -**Admin** | [AuthenticationProviderRid](docs/v2/Admin/models/AuthenticationProviderRid.md) | `from foundry_sdk.v2.admin.models import AuthenticationProviderRid` | -**Admin** | [CertificateInfo](docs/v2/Admin/models/CertificateInfo.md) | `from foundry_sdk.v2.admin.models import CertificateInfo` | -**Admin** | [CertificateUsageType](docs/v2/Admin/models/CertificateUsageType.md) | `from foundry_sdk.v2.admin.models import CertificateUsageType` | -**Admin** | [CreateGroupRequest](docs/v2/Admin/models/CreateGroupRequest.md) | `from foundry_sdk.v2.admin.models import CreateGroupRequest` | -**Admin** | [CreateMarkingRequest](docs/v2/Admin/models/CreateMarkingRequest.md) | `from foundry_sdk.v2.admin.models import CreateMarkingRequest` | -**Admin** | [CreateOrganizationRequest](docs/v2/Admin/models/CreateOrganizationRequest.md) | `from foundry_sdk.v2.admin.models import CreateOrganizationRequest` | -**Admin** | [Enrollment](docs/v2/Admin/models/Enrollment.md) | `from foundry_sdk.v2.admin.models import Enrollment` | -**Admin** | [EnrollmentName](docs/v2/Admin/models/EnrollmentName.md) | `from foundry_sdk.v2.admin.models import EnrollmentName` | -**Admin** | [EnrollmentRoleAssignment](docs/v2/Admin/models/EnrollmentRoleAssignment.md) | `from foundry_sdk.v2.admin.models import EnrollmentRoleAssignment` | -**Admin** | [GetGroupsBatchRequestElement](docs/v2/Admin/models/GetGroupsBatchRequestElement.md) | `from foundry_sdk.v2.admin.models import GetGroupsBatchRequestElement` | -**Admin** | [GetGroupsBatchResponse](docs/v2/Admin/models/GetGroupsBatchResponse.md) | `from foundry_sdk.v2.admin.models import GetGroupsBatchResponse` | -**Admin** | [GetMarkingsBatchRequestElement](docs/v2/Admin/models/GetMarkingsBatchRequestElement.md) | `from foundry_sdk.v2.admin.models import GetMarkingsBatchRequestElement` | -**Admin** | [GetMarkingsBatchResponse](docs/v2/Admin/models/GetMarkingsBatchResponse.md) | `from foundry_sdk.v2.admin.models import GetMarkingsBatchResponse` | -**Admin** | [GetRolesBatchRequestElement](docs/v2/Admin/models/GetRolesBatchRequestElement.md) | `from foundry_sdk.v2.admin.models import GetRolesBatchRequestElement` | -**Admin** | [GetRolesBatchResponse](docs/v2/Admin/models/GetRolesBatchResponse.md) | `from foundry_sdk.v2.admin.models import GetRolesBatchResponse` | -**Admin** | [GetUserMarkingsResponse](docs/v2/Admin/models/GetUserMarkingsResponse.md) | `from foundry_sdk.v2.admin.models import GetUserMarkingsResponse` | -**Admin** | [GetUsersBatchRequestElement](docs/v2/Admin/models/GetUsersBatchRequestElement.md) | `from foundry_sdk.v2.admin.models import GetUsersBatchRequestElement` | -**Admin** | [GetUsersBatchResponse](docs/v2/Admin/models/GetUsersBatchResponse.md) | `from foundry_sdk.v2.admin.models import GetUsersBatchResponse` | -**Admin** | [Group](docs/v2/Admin/models/Group.md) | `from foundry_sdk.v2.admin.models import Group` | -**Admin** | [GroupMember](docs/v2/Admin/models/GroupMember.md) | `from foundry_sdk.v2.admin.models import GroupMember` | -**Admin** | [GroupMembership](docs/v2/Admin/models/GroupMembership.md) | `from foundry_sdk.v2.admin.models import GroupMembership` | -**Admin** | [GroupMembershipExpiration](docs/v2/Admin/models/GroupMembershipExpiration.md) | `from foundry_sdk.v2.admin.models import GroupMembershipExpiration` | -**Admin** | [GroupMembershipExpirationPolicy](docs/v2/Admin/models/GroupMembershipExpirationPolicy.md) | `from foundry_sdk.v2.admin.models import GroupMembershipExpirationPolicy` | -**Admin** | [GroupName](docs/v2/Admin/models/GroupName.md) | `from foundry_sdk.v2.admin.models import GroupName` | -**Admin** | [GroupProviderInfo](docs/v2/Admin/models/GroupProviderInfo.md) | `from foundry_sdk.v2.admin.models import GroupProviderInfo` | -**Admin** | [GroupSearchFilter](docs/v2/Admin/models/GroupSearchFilter.md) | `from foundry_sdk.v2.admin.models import GroupSearchFilter` | -**Admin** | [Host](docs/v2/Admin/models/Host.md) | `from foundry_sdk.v2.admin.models import Host` | -**Admin** | [HostName](docs/v2/Admin/models/HostName.md) | `from foundry_sdk.v2.admin.models import HostName` | -**Admin** | [ListAuthenticationProvidersResponse](docs/v2/Admin/models/ListAuthenticationProvidersResponse.md) | `from foundry_sdk.v2.admin.models import ListAuthenticationProvidersResponse` | -**Admin** | [ListAvailableOrganizationRolesResponse](docs/v2/Admin/models/ListAvailableOrganizationRolesResponse.md) | `from foundry_sdk.v2.admin.models import ListAvailableOrganizationRolesResponse` | -**Admin** | [ListEnrollmentRoleAssignmentsResponse](docs/v2/Admin/models/ListEnrollmentRoleAssignmentsResponse.md) | `from foundry_sdk.v2.admin.models import ListEnrollmentRoleAssignmentsResponse` | -**Admin** | [ListGroupMembershipsResponse](docs/v2/Admin/models/ListGroupMembershipsResponse.md) | `from foundry_sdk.v2.admin.models import ListGroupMembershipsResponse` | -**Admin** | [ListGroupMembersResponse](docs/v2/Admin/models/ListGroupMembersResponse.md) | `from foundry_sdk.v2.admin.models import ListGroupMembersResponse` | -**Admin** | [ListGroupsResponse](docs/v2/Admin/models/ListGroupsResponse.md) | `from foundry_sdk.v2.admin.models import ListGroupsResponse` | -**Admin** | [ListHostsResponse](docs/v2/Admin/models/ListHostsResponse.md) | `from foundry_sdk.v2.admin.models import ListHostsResponse` | -**Admin** | [ListMarkingCategoriesResponse](docs/v2/Admin/models/ListMarkingCategoriesResponse.md) | `from foundry_sdk.v2.admin.models import ListMarkingCategoriesResponse` | -**Admin** | [ListMarkingMembersResponse](docs/v2/Admin/models/ListMarkingMembersResponse.md) | `from foundry_sdk.v2.admin.models import ListMarkingMembersResponse` | -**Admin** | [ListMarkingRoleAssignmentsResponse](docs/v2/Admin/models/ListMarkingRoleAssignmentsResponse.md) | `from foundry_sdk.v2.admin.models import ListMarkingRoleAssignmentsResponse` | -**Admin** | [ListMarkingsResponse](docs/v2/Admin/models/ListMarkingsResponse.md) | `from foundry_sdk.v2.admin.models import ListMarkingsResponse` | -**Admin** | [ListOrganizationRoleAssignmentsResponse](docs/v2/Admin/models/ListOrganizationRoleAssignmentsResponse.md) | `from foundry_sdk.v2.admin.models import ListOrganizationRoleAssignmentsResponse` | -**Admin** | [ListUsersResponse](docs/v2/Admin/models/ListUsersResponse.md) | `from foundry_sdk.v2.admin.models import ListUsersResponse` | -**Admin** | [Marking](docs/v2/Admin/models/Marking.md) | `from foundry_sdk.v2.admin.models import Marking` | -**Admin** | [MarkingCategory](docs/v2/Admin/models/MarkingCategory.md) | `from foundry_sdk.v2.admin.models import MarkingCategory` | -**Admin** | [MarkingCategoryId](docs/v2/Admin/models/MarkingCategoryId.md) | `from foundry_sdk.v2.admin.models import MarkingCategoryId` | -**Admin** | [MarkingCategoryName](docs/v2/Admin/models/MarkingCategoryName.md) | `from foundry_sdk.v2.admin.models import MarkingCategoryName` | -**Admin** | [MarkingCategoryType](docs/v2/Admin/models/MarkingCategoryType.md) | `from foundry_sdk.v2.admin.models import MarkingCategoryType` | -**Admin** | [MarkingMember](docs/v2/Admin/models/MarkingMember.md) | `from foundry_sdk.v2.admin.models import MarkingMember` | -**Admin** | [MarkingName](docs/v2/Admin/models/MarkingName.md) | `from foundry_sdk.v2.admin.models import MarkingName` | -**Admin** | [MarkingRole](docs/v2/Admin/models/MarkingRole.md) | `from foundry_sdk.v2.admin.models import MarkingRole` | -**Admin** | [MarkingRoleAssignment](docs/v2/Admin/models/MarkingRoleAssignment.md) | `from foundry_sdk.v2.admin.models import MarkingRoleAssignment` | -**Admin** | [MarkingRoleUpdate](docs/v2/Admin/models/MarkingRoleUpdate.md) | `from foundry_sdk.v2.admin.models import MarkingRoleUpdate` | -**Admin** | [MarkingType](docs/v2/Admin/models/MarkingType.md) | `from foundry_sdk.v2.admin.models import MarkingType` | -**Admin** | [OidcAuthenticationProtocol](docs/v2/Admin/models/OidcAuthenticationProtocol.md) | `from foundry_sdk.v2.admin.models import OidcAuthenticationProtocol` | -**Admin** | [Organization](docs/v2/Admin/models/Organization.md) | `from foundry_sdk.v2.admin.models import Organization` | -**Admin** | [OrganizationName](docs/v2/Admin/models/OrganizationName.md) | `from foundry_sdk.v2.admin.models import OrganizationName` | -**Admin** | [OrganizationRoleAssignment](docs/v2/Admin/models/OrganizationRoleAssignment.md) | `from foundry_sdk.v2.admin.models import OrganizationRoleAssignment` | -**Admin** | [PreregisterGroupRequest](docs/v2/Admin/models/PreregisterGroupRequest.md) | `from foundry_sdk.v2.admin.models import PreregisterGroupRequest` | -**Admin** | [PreregisterUserRequest](docs/v2/Admin/models/PreregisterUserRequest.md) | `from foundry_sdk.v2.admin.models import PreregisterUserRequest` | -**Admin** | [PrincipalFilterType](docs/v2/Admin/models/PrincipalFilterType.md) | `from foundry_sdk.v2.admin.models import PrincipalFilterType` | -**Admin** | [ProviderId](docs/v2/Admin/models/ProviderId.md) | `from foundry_sdk.v2.admin.models import ProviderId` | -**Admin** | [RemoveEnrollmentRoleAssignmentsRequest](docs/v2/Admin/models/RemoveEnrollmentRoleAssignmentsRequest.md) | `from foundry_sdk.v2.admin.models import RemoveEnrollmentRoleAssignmentsRequest` | -**Admin** | [RemoveGroupMembersRequest](docs/v2/Admin/models/RemoveGroupMembersRequest.md) | `from foundry_sdk.v2.admin.models import RemoveGroupMembersRequest` | -**Admin** | [RemoveMarkingMembersRequest](docs/v2/Admin/models/RemoveMarkingMembersRequest.md) | `from foundry_sdk.v2.admin.models import RemoveMarkingMembersRequest` | -**Admin** | [RemoveMarkingRoleAssignmentsRequest](docs/v2/Admin/models/RemoveMarkingRoleAssignmentsRequest.md) | `from foundry_sdk.v2.admin.models import RemoveMarkingRoleAssignmentsRequest` | -**Admin** | [RemoveOrganizationRoleAssignmentsRequest](docs/v2/Admin/models/RemoveOrganizationRoleAssignmentsRequest.md) | `from foundry_sdk.v2.admin.models import RemoveOrganizationRoleAssignmentsRequest` | -**Admin** | [ReplaceGroupMembershipExpirationPolicyRequest](docs/v2/Admin/models/ReplaceGroupMembershipExpirationPolicyRequest.md) | `from foundry_sdk.v2.admin.models import ReplaceGroupMembershipExpirationPolicyRequest` | -**Admin** | [ReplaceGroupProviderInfoRequest](docs/v2/Admin/models/ReplaceGroupProviderInfoRequest.md) | `from foundry_sdk.v2.admin.models import ReplaceGroupProviderInfoRequest` | -**Admin** | [ReplaceMarkingRequest](docs/v2/Admin/models/ReplaceMarkingRequest.md) | `from foundry_sdk.v2.admin.models import ReplaceMarkingRequest` | -**Admin** | [ReplaceOrganizationRequest](docs/v2/Admin/models/ReplaceOrganizationRequest.md) | `from foundry_sdk.v2.admin.models import ReplaceOrganizationRequest` | -**Admin** | [ReplaceUserProviderInfoRequest](docs/v2/Admin/models/ReplaceUserProviderInfoRequest.md) | `from foundry_sdk.v2.admin.models import ReplaceUserProviderInfoRequest` | -**Admin** | [Role](docs/v2/Admin/models/Role.md) | `from foundry_sdk.v2.admin.models import Role` | -**Admin** | [RoleDescription](docs/v2/Admin/models/RoleDescription.md) | `from foundry_sdk.v2.admin.models import RoleDescription` | -**Admin** | [RoleDisplayName](docs/v2/Admin/models/RoleDisplayName.md) | `from foundry_sdk.v2.admin.models import RoleDisplayName` | -**Admin** | [SamlAuthenticationProtocol](docs/v2/Admin/models/SamlAuthenticationProtocol.md) | `from foundry_sdk.v2.admin.models import SamlAuthenticationProtocol` | -**Admin** | [SamlServiceProviderMetadata](docs/v2/Admin/models/SamlServiceProviderMetadata.md) | `from foundry_sdk.v2.admin.models import SamlServiceProviderMetadata` | -**Admin** | [SearchGroupsRequest](docs/v2/Admin/models/SearchGroupsRequest.md) | `from foundry_sdk.v2.admin.models import SearchGroupsRequest` | -**Admin** | [SearchGroupsResponse](docs/v2/Admin/models/SearchGroupsResponse.md) | `from foundry_sdk.v2.admin.models import SearchGroupsResponse` | -**Admin** | [SearchUsersRequest](docs/v2/Admin/models/SearchUsersRequest.md) | `from foundry_sdk.v2.admin.models import SearchUsersRequest` | -**Admin** | [SearchUsersResponse](docs/v2/Admin/models/SearchUsersResponse.md) | `from foundry_sdk.v2.admin.models import SearchUsersResponse` | -**Admin** | [User](docs/v2/Admin/models/User.md) | `from foundry_sdk.v2.admin.models import User` | -**Admin** | [UserProviderInfo](docs/v2/Admin/models/UserProviderInfo.md) | `from foundry_sdk.v2.admin.models import UserProviderInfo` | -**Admin** | [UserSearchFilter](docs/v2/Admin/models/UserSearchFilter.md) | `from foundry_sdk.v2.admin.models import UserSearchFilter` | -**Admin** | [UserUsername](docs/v2/Admin/models/UserUsername.md) | `from foundry_sdk.v2.admin.models import UserUsername` | -**AipAgents** | [Agent](docs/v2/AipAgents/models/Agent.md) | `from foundry_sdk.v2.aip_agents.models import Agent` | -**AipAgents** | [AgentMarkdownResponse](docs/v2/AipAgents/models/AgentMarkdownResponse.md) | `from foundry_sdk.v2.aip_agents.models import AgentMarkdownResponse` | -**AipAgents** | [AgentMetadata](docs/v2/AipAgents/models/AgentMetadata.md) | `from foundry_sdk.v2.aip_agents.models import AgentMetadata` | -**AipAgents** | [AgentRid](docs/v2/AipAgents/models/AgentRid.md) | `from foundry_sdk.v2.aip_agents.models import AgentRid` | -**AipAgents** | [AgentSessionRagContextResponse](docs/v2/AipAgents/models/AgentSessionRagContextResponse.md) | `from foundry_sdk.v2.aip_agents.models import AgentSessionRagContextResponse` | -**AipAgents** | [AgentsSessionsPage](docs/v2/AipAgents/models/AgentsSessionsPage.md) | `from foundry_sdk.v2.aip_agents.models import AgentsSessionsPage` | -**AipAgents** | [AgentVersion](docs/v2/AipAgents/models/AgentVersion.md) | `from foundry_sdk.v2.aip_agents.models import AgentVersion` | -**AipAgents** | [AgentVersionDetails](docs/v2/AipAgents/models/AgentVersionDetails.md) | `from foundry_sdk.v2.aip_agents.models import AgentVersionDetails` | -**AipAgents** | [AgentVersionString](docs/v2/AipAgents/models/AgentVersionString.md) | `from foundry_sdk.v2.aip_agents.models import AgentVersionString` | -**AipAgents** | [BlockingContinueSessionRequest](docs/v2/AipAgents/models/BlockingContinueSessionRequest.md) | `from foundry_sdk.v2.aip_agents.models import BlockingContinueSessionRequest` | -**AipAgents** | [CancelSessionRequest](docs/v2/AipAgents/models/CancelSessionRequest.md) | `from foundry_sdk.v2.aip_agents.models import CancelSessionRequest` | -**AipAgents** | [CancelSessionResponse](docs/v2/AipAgents/models/CancelSessionResponse.md) | `from foundry_sdk.v2.aip_agents.models import CancelSessionResponse` | -**AipAgents** | [Content](docs/v2/AipAgents/models/Content.md) | `from foundry_sdk.v2.aip_agents.models import Content` | -**AipAgents** | [CreateSessionRequest](docs/v2/AipAgents/models/CreateSessionRequest.md) | `from foundry_sdk.v2.aip_agents.models import CreateSessionRequest` | -**AipAgents** | [FailureToolCallOutput](docs/v2/AipAgents/models/FailureToolCallOutput.md) | `from foundry_sdk.v2.aip_agents.models import FailureToolCallOutput` | -**AipAgents** | [FunctionRetrievedContext](docs/v2/AipAgents/models/FunctionRetrievedContext.md) | `from foundry_sdk.v2.aip_agents.models import FunctionRetrievedContext` | -**AipAgents** | [GetRagContextForSessionRequest](docs/v2/AipAgents/models/GetRagContextForSessionRequest.md) | `from foundry_sdk.v2.aip_agents.models import GetRagContextForSessionRequest` | -**AipAgents** | [InputContext](docs/v2/AipAgents/models/InputContext.md) | `from foundry_sdk.v2.aip_agents.models import InputContext` | -**AipAgents** | [ListAgentVersionsResponse](docs/v2/AipAgents/models/ListAgentVersionsResponse.md) | `from foundry_sdk.v2.aip_agents.models import ListAgentVersionsResponse` | -**AipAgents** | [ListSessionsResponse](docs/v2/AipAgents/models/ListSessionsResponse.md) | `from foundry_sdk.v2.aip_agents.models import ListSessionsResponse` | -**AipAgents** | [MessageId](docs/v2/AipAgents/models/MessageId.md) | `from foundry_sdk.v2.aip_agents.models import MessageId` | -**AipAgents** | [ObjectContext](docs/v2/AipAgents/models/ObjectContext.md) | `from foundry_sdk.v2.aip_agents.models import ObjectContext` | -**AipAgents** | [ObjectSetParameter](docs/v2/AipAgents/models/ObjectSetParameter.md) | `from foundry_sdk.v2.aip_agents.models import ObjectSetParameter` | -**AipAgents** | [ObjectSetParameterValue](docs/v2/AipAgents/models/ObjectSetParameterValue.md) | `from foundry_sdk.v2.aip_agents.models import ObjectSetParameterValue` | -**AipAgents** | [ObjectSetParameterValueUpdate](docs/v2/AipAgents/models/ObjectSetParameterValueUpdate.md) | `from foundry_sdk.v2.aip_agents.models import ObjectSetParameterValueUpdate` | -**AipAgents** | [Parameter](docs/v2/AipAgents/models/Parameter.md) | `from foundry_sdk.v2.aip_agents.models import Parameter` | -**AipAgents** | [ParameterAccessMode](docs/v2/AipAgents/models/ParameterAccessMode.md) | `from foundry_sdk.v2.aip_agents.models import ParameterAccessMode` | -**AipAgents** | [ParameterId](docs/v2/AipAgents/models/ParameterId.md) | `from foundry_sdk.v2.aip_agents.models import ParameterId` | -**AipAgents** | [ParameterType](docs/v2/AipAgents/models/ParameterType.md) | `from foundry_sdk.v2.aip_agents.models import ParameterType` | -**AipAgents** | [ParameterValue](docs/v2/AipAgents/models/ParameterValue.md) | `from foundry_sdk.v2.aip_agents.models import ParameterValue` | -**AipAgents** | [ParameterValueUpdate](docs/v2/AipAgents/models/ParameterValueUpdate.md) | `from foundry_sdk.v2.aip_agents.models import ParameterValueUpdate` | -**AipAgents** | [RidToolInputValue](docs/v2/AipAgents/models/RidToolInputValue.md) | `from foundry_sdk.v2.aip_agents.models import RidToolInputValue` | -**AipAgents** | [RidToolOutputValue](docs/v2/AipAgents/models/RidToolOutputValue.md) | `from foundry_sdk.v2.aip_agents.models import RidToolOutputValue` | -**AipAgents** | [Session](docs/v2/AipAgents/models/Session.md) | `from foundry_sdk.v2.aip_agents.models import Session` | -**AipAgents** | [SessionExchange](docs/v2/AipAgents/models/SessionExchange.md) | `from foundry_sdk.v2.aip_agents.models import SessionExchange` | -**AipAgents** | [SessionExchangeContexts](docs/v2/AipAgents/models/SessionExchangeContexts.md) | `from foundry_sdk.v2.aip_agents.models import SessionExchangeContexts` | -**AipAgents** | [SessionExchangeResult](docs/v2/AipAgents/models/SessionExchangeResult.md) | `from foundry_sdk.v2.aip_agents.models import SessionExchangeResult` | -**AipAgents** | [SessionMetadata](docs/v2/AipAgents/models/SessionMetadata.md) | `from foundry_sdk.v2.aip_agents.models import SessionMetadata` | -**AipAgents** | [SessionRid](docs/v2/AipAgents/models/SessionRid.md) | `from foundry_sdk.v2.aip_agents.models import SessionRid` | -**AipAgents** | [SessionTrace](docs/v2/AipAgents/models/SessionTrace.md) | `from foundry_sdk.v2.aip_agents.models import SessionTrace` | -**AipAgents** | [SessionTraceId](docs/v2/AipAgents/models/SessionTraceId.md) | `from foundry_sdk.v2.aip_agents.models import SessionTraceId` | -**AipAgents** | [SessionTraceStatus](docs/v2/AipAgents/models/SessionTraceStatus.md) | `from foundry_sdk.v2.aip_agents.models import SessionTraceStatus` | -**AipAgents** | [StreamingContinueSessionRequest](docs/v2/AipAgents/models/StreamingContinueSessionRequest.md) | `from foundry_sdk.v2.aip_agents.models import StreamingContinueSessionRequest` | -**AipAgents** | [StringParameter](docs/v2/AipAgents/models/StringParameter.md) | `from foundry_sdk.v2.aip_agents.models import StringParameter` | -**AipAgents** | [StringParameterValue](docs/v2/AipAgents/models/StringParameterValue.md) | `from foundry_sdk.v2.aip_agents.models import StringParameterValue` | -**AipAgents** | [StringToolInputValue](docs/v2/AipAgents/models/StringToolInputValue.md) | `from foundry_sdk.v2.aip_agents.models import StringToolInputValue` | -**AipAgents** | [StringToolOutputValue](docs/v2/AipAgents/models/StringToolOutputValue.md) | `from foundry_sdk.v2.aip_agents.models import StringToolOutputValue` | -**AipAgents** | [SuccessToolCallOutput](docs/v2/AipAgents/models/SuccessToolCallOutput.md) | `from foundry_sdk.v2.aip_agents.models import SuccessToolCallOutput` | -**AipAgents** | [ToolCall](docs/v2/AipAgents/models/ToolCall.md) | `from foundry_sdk.v2.aip_agents.models import ToolCall` | -**AipAgents** | [ToolCallGroup](docs/v2/AipAgents/models/ToolCallGroup.md) | `from foundry_sdk.v2.aip_agents.models import ToolCallGroup` | -**AipAgents** | [ToolCallInput](docs/v2/AipAgents/models/ToolCallInput.md) | `from foundry_sdk.v2.aip_agents.models import ToolCallInput` | -**AipAgents** | [ToolCallOutput](docs/v2/AipAgents/models/ToolCallOutput.md) | `from foundry_sdk.v2.aip_agents.models import ToolCallOutput` | -**AipAgents** | [ToolInputName](docs/v2/AipAgents/models/ToolInputName.md) | `from foundry_sdk.v2.aip_agents.models import ToolInputName` | -**AipAgents** | [ToolInputValue](docs/v2/AipAgents/models/ToolInputValue.md) | `from foundry_sdk.v2.aip_agents.models import ToolInputValue` | -**AipAgents** | [ToolMetadata](docs/v2/AipAgents/models/ToolMetadata.md) | `from foundry_sdk.v2.aip_agents.models import ToolMetadata` | -**AipAgents** | [ToolOutputValue](docs/v2/AipAgents/models/ToolOutputValue.md) | `from foundry_sdk.v2.aip_agents.models import ToolOutputValue` | -**AipAgents** | [ToolType](docs/v2/AipAgents/models/ToolType.md) | `from foundry_sdk.v2.aip_agents.models import ToolType` | -**AipAgents** | [UpdateSessionTitleRequest](docs/v2/AipAgents/models/UpdateSessionTitleRequest.md) | `from foundry_sdk.v2.aip_agents.models import UpdateSessionTitleRequest` | -**AipAgents** | [UserTextInput](docs/v2/AipAgents/models/UserTextInput.md) | `from foundry_sdk.v2.aip_agents.models import UserTextInput` | -**Audit** | [FileId](docs/v2/Audit/models/FileId.md) | `from foundry_sdk.v2.audit.models import FileId` | -**Audit** | [ListLogFilesResponse](docs/v2/Audit/models/ListLogFilesResponse.md) | `from foundry_sdk.v2.audit.models import ListLogFilesResponse` | -**Audit** | [LogFile](docs/v2/Audit/models/LogFile.md) | `from foundry_sdk.v2.audit.models import LogFile` | -**Connectivity** | [ApiKeyAuthentication](docs/v2/Connectivity/models/ApiKeyAuthentication.md) | `from foundry_sdk.v2.connectivity.models import ApiKeyAuthentication` | -**Connectivity** | [AsPlaintextValue](docs/v2/Connectivity/models/AsPlaintextValue.md) | `from foundry_sdk.v2.connectivity.models import AsPlaintextValue` | -**Connectivity** | [AsSecretName](docs/v2/Connectivity/models/AsSecretName.md) | `from foundry_sdk.v2.connectivity.models import AsSecretName` | -**Connectivity** | [AwsAccessKey](docs/v2/Connectivity/models/AwsAccessKey.md) | `from foundry_sdk.v2.connectivity.models import AwsAccessKey` | -**Connectivity** | [AwsOidcAuthentication](docs/v2/Connectivity/models/AwsOidcAuthentication.md) | `from foundry_sdk.v2.connectivity.models import AwsOidcAuthentication` | -**Connectivity** | [BasicCredentials](docs/v2/Connectivity/models/BasicCredentials.md) | `from foundry_sdk.v2.connectivity.models import BasicCredentials` | -**Connectivity** | [BearerToken](docs/v2/Connectivity/models/BearerToken.md) | `from foundry_sdk.v2.connectivity.models import BearerToken` | -**Connectivity** | [BigQueryVirtualTableConfig](docs/v2/Connectivity/models/BigQueryVirtualTableConfig.md) | `from foundry_sdk.v2.connectivity.models import BigQueryVirtualTableConfig` | -**Connectivity** | [CloudIdentity](docs/v2/Connectivity/models/CloudIdentity.md) | `from foundry_sdk.v2.connectivity.models import CloudIdentity` | -**Connectivity** | [CloudIdentityRid](docs/v2/Connectivity/models/CloudIdentityRid.md) | `from foundry_sdk.v2.connectivity.models import CloudIdentityRid` | -**Connectivity** | [Connection](docs/v2/Connectivity/models/Connection.md) | `from foundry_sdk.v2.connectivity.models import Connection` | -**Connectivity** | [ConnectionConfiguration](docs/v2/Connectivity/models/ConnectionConfiguration.md) | `from foundry_sdk.v2.connectivity.models import ConnectionConfiguration` | -**Connectivity** | [ConnectionDisplayName](docs/v2/Connectivity/models/ConnectionDisplayName.md) | `from foundry_sdk.v2.connectivity.models import ConnectionDisplayName` | -**Connectivity** | [ConnectionExportSettings](docs/v2/Connectivity/models/ConnectionExportSettings.md) | `from foundry_sdk.v2.connectivity.models import ConnectionExportSettings` | -**Connectivity** | [ConnectionRid](docs/v2/Connectivity/models/ConnectionRid.md) | `from foundry_sdk.v2.connectivity.models import ConnectionRid` | -**Connectivity** | [ConnectionWorker](docs/v2/Connectivity/models/ConnectionWorker.md) | `from foundry_sdk.v2.connectivity.models import ConnectionWorker` | -**Connectivity** | [CreateConnectionRequest](docs/v2/Connectivity/models/CreateConnectionRequest.md) | `from foundry_sdk.v2.connectivity.models import CreateConnectionRequest` | -**Connectivity** | [CreateConnectionRequestAsPlaintextValue](docs/v2/Connectivity/models/CreateConnectionRequestAsPlaintextValue.md) | `from foundry_sdk.v2.connectivity.models import CreateConnectionRequestAsPlaintextValue` | -**Connectivity** | [CreateConnectionRequestAsSecretName](docs/v2/Connectivity/models/CreateConnectionRequestAsSecretName.md) | `from foundry_sdk.v2.connectivity.models import CreateConnectionRequestAsSecretName` | -**Connectivity** | [CreateConnectionRequestBasicCredentials](docs/v2/Connectivity/models/CreateConnectionRequestBasicCredentials.md) | `from foundry_sdk.v2.connectivity.models import CreateConnectionRequestBasicCredentials` | -**Connectivity** | [CreateConnectionRequestConnectionConfiguration](docs/v2/Connectivity/models/CreateConnectionRequestConnectionConfiguration.md) | `from foundry_sdk.v2.connectivity.models import CreateConnectionRequestConnectionConfiguration` | -**Connectivity** | [CreateConnectionRequestConnectionWorker](docs/v2/Connectivity/models/CreateConnectionRequestConnectionWorker.md) | `from foundry_sdk.v2.connectivity.models import CreateConnectionRequestConnectionWorker` | -**Connectivity** | [CreateConnectionRequestDatabricksAuthenticationMode](docs/v2/Connectivity/models/CreateConnectionRequestDatabricksAuthenticationMode.md) | `from foundry_sdk.v2.connectivity.models import CreateConnectionRequestDatabricksAuthenticationMode` | -**Connectivity** | [CreateConnectionRequestDatabricksConnectionConfiguration](docs/v2/Connectivity/models/CreateConnectionRequestDatabricksConnectionConfiguration.md) | `from foundry_sdk.v2.connectivity.models import CreateConnectionRequestDatabricksConnectionConfiguration` | -**Connectivity** | [CreateConnectionRequestEncryptedProperty](docs/v2/Connectivity/models/CreateConnectionRequestEncryptedProperty.md) | `from foundry_sdk.v2.connectivity.models import CreateConnectionRequestEncryptedProperty` | -**Connectivity** | [CreateConnectionRequestFoundryWorker](docs/v2/Connectivity/models/CreateConnectionRequestFoundryWorker.md) | `from foundry_sdk.v2.connectivity.models import CreateConnectionRequestFoundryWorker` | -**Connectivity** | [CreateConnectionRequestJdbcConnectionConfiguration](docs/v2/Connectivity/models/CreateConnectionRequestJdbcConnectionConfiguration.md) | `from foundry_sdk.v2.connectivity.models import CreateConnectionRequestJdbcConnectionConfiguration` | -**Connectivity** | [CreateConnectionRequestOauthMachineToMachineAuth](docs/v2/Connectivity/models/CreateConnectionRequestOauthMachineToMachineAuth.md) | `from foundry_sdk.v2.connectivity.models import CreateConnectionRequestOauthMachineToMachineAuth` | -**Connectivity** | [CreateConnectionRequestPersonalAccessToken](docs/v2/Connectivity/models/CreateConnectionRequestPersonalAccessToken.md) | `from foundry_sdk.v2.connectivity.models import CreateConnectionRequestPersonalAccessToken` | -**Connectivity** | [CreateConnectionRequestRestConnectionConfiguration](docs/v2/Connectivity/models/CreateConnectionRequestRestConnectionConfiguration.md) | `from foundry_sdk.v2.connectivity.models import CreateConnectionRequestRestConnectionConfiguration` | -**Connectivity** | [CreateConnectionRequestS3ConnectionConfiguration](docs/v2/Connectivity/models/CreateConnectionRequestS3ConnectionConfiguration.md) | `from foundry_sdk.v2.connectivity.models import CreateConnectionRequestS3ConnectionConfiguration` | -**Connectivity** | [CreateConnectionRequestSmbAuth](docs/v2/Connectivity/models/CreateConnectionRequestSmbAuth.md) | `from foundry_sdk.v2.connectivity.models import CreateConnectionRequestSmbAuth` | -**Connectivity** | [CreateConnectionRequestSmbConnectionConfiguration](docs/v2/Connectivity/models/CreateConnectionRequestSmbConnectionConfiguration.md) | `from foundry_sdk.v2.connectivity.models import CreateConnectionRequestSmbConnectionConfiguration` | -**Connectivity** | [CreateConnectionRequestSmbUsernamePasswordAuth](docs/v2/Connectivity/models/CreateConnectionRequestSmbUsernamePasswordAuth.md) | `from foundry_sdk.v2.connectivity.models import CreateConnectionRequestSmbUsernamePasswordAuth` | -**Connectivity** | [CreateConnectionRequestSnowflakeAuthenticationMode](docs/v2/Connectivity/models/CreateConnectionRequestSnowflakeAuthenticationMode.md) | `from foundry_sdk.v2.connectivity.models import CreateConnectionRequestSnowflakeAuthenticationMode` | -**Connectivity** | [CreateConnectionRequestSnowflakeConnectionConfiguration](docs/v2/Connectivity/models/CreateConnectionRequestSnowflakeConnectionConfiguration.md) | `from foundry_sdk.v2.connectivity.models import CreateConnectionRequestSnowflakeConnectionConfiguration` | -**Connectivity** | [CreateConnectionRequestSnowflakeExternalOauth](docs/v2/Connectivity/models/CreateConnectionRequestSnowflakeExternalOauth.md) | `from foundry_sdk.v2.connectivity.models import CreateConnectionRequestSnowflakeExternalOauth` | -**Connectivity** | [CreateConnectionRequestSnowflakeKeyPairAuthentication](docs/v2/Connectivity/models/CreateConnectionRequestSnowflakeKeyPairAuthentication.md) | `from foundry_sdk.v2.connectivity.models import CreateConnectionRequestSnowflakeKeyPairAuthentication` | -**Connectivity** | [CreateConnectionRequestUnknownWorker](docs/v2/Connectivity/models/CreateConnectionRequestUnknownWorker.md) | `from foundry_sdk.v2.connectivity.models import CreateConnectionRequestUnknownWorker` | -**Connectivity** | [CreateConnectionRequestWorkflowIdentityFederation](docs/v2/Connectivity/models/CreateConnectionRequestWorkflowIdentityFederation.md) | `from foundry_sdk.v2.connectivity.models import CreateConnectionRequestWorkflowIdentityFederation` | -**Connectivity** | [CreateFileImportRequest](docs/v2/Connectivity/models/CreateFileImportRequest.md) | `from foundry_sdk.v2.connectivity.models import CreateFileImportRequest` | -**Connectivity** | [CreateTableImportRequest](docs/v2/Connectivity/models/CreateTableImportRequest.md) | `from foundry_sdk.v2.connectivity.models import CreateTableImportRequest` | -**Connectivity** | [CreateTableImportRequestDatabricksTableImportConfig](docs/v2/Connectivity/models/CreateTableImportRequestDatabricksTableImportConfig.md) | `from foundry_sdk.v2.connectivity.models import CreateTableImportRequestDatabricksTableImportConfig` | -**Connectivity** | [CreateTableImportRequestJdbcTableImportConfig](docs/v2/Connectivity/models/CreateTableImportRequestJdbcTableImportConfig.md) | `from foundry_sdk.v2.connectivity.models import CreateTableImportRequestJdbcTableImportConfig` | -**Connectivity** | [CreateTableImportRequestMicrosoftAccessTableImportConfig](docs/v2/Connectivity/models/CreateTableImportRequestMicrosoftAccessTableImportConfig.md) | `from foundry_sdk.v2.connectivity.models import CreateTableImportRequestMicrosoftAccessTableImportConfig` | -**Connectivity** | [CreateTableImportRequestMicrosoftSqlServerTableImportConfig](docs/v2/Connectivity/models/CreateTableImportRequestMicrosoftSqlServerTableImportConfig.md) | `from foundry_sdk.v2.connectivity.models import CreateTableImportRequestMicrosoftSqlServerTableImportConfig` | -**Connectivity** | [CreateTableImportRequestOracleTableImportConfig](docs/v2/Connectivity/models/CreateTableImportRequestOracleTableImportConfig.md) | `from foundry_sdk.v2.connectivity.models import CreateTableImportRequestOracleTableImportConfig` | -**Connectivity** | [CreateTableImportRequestPostgreSqlTableImportConfig](docs/v2/Connectivity/models/CreateTableImportRequestPostgreSqlTableImportConfig.md) | `from foundry_sdk.v2.connectivity.models import CreateTableImportRequestPostgreSqlTableImportConfig` | -**Connectivity** | [CreateTableImportRequestSnowflakeTableImportConfig](docs/v2/Connectivity/models/CreateTableImportRequestSnowflakeTableImportConfig.md) | `from foundry_sdk.v2.connectivity.models import CreateTableImportRequestSnowflakeTableImportConfig` | -**Connectivity** | [CreateTableImportRequestTableImportConfig](docs/v2/Connectivity/models/CreateTableImportRequestTableImportConfig.md) | `from foundry_sdk.v2.connectivity.models import CreateTableImportRequestTableImportConfig` | -**Connectivity** | [CreateVirtualTableRequest](docs/v2/Connectivity/models/CreateVirtualTableRequest.md) | `from foundry_sdk.v2.connectivity.models import CreateVirtualTableRequest` | -**Connectivity** | [DatabricksAuthenticationMode](docs/v2/Connectivity/models/DatabricksAuthenticationMode.md) | `from foundry_sdk.v2.connectivity.models import DatabricksAuthenticationMode` | -**Connectivity** | [DatabricksConnectionConfiguration](docs/v2/Connectivity/models/DatabricksConnectionConfiguration.md) | `from foundry_sdk.v2.connectivity.models import DatabricksConnectionConfiguration` | -**Connectivity** | [DatabricksTableImportConfig](docs/v2/Connectivity/models/DatabricksTableImportConfig.md) | `from foundry_sdk.v2.connectivity.models import DatabricksTableImportConfig` | -**Connectivity** | [DateColumnInitialIncrementalState](docs/v2/Connectivity/models/DateColumnInitialIncrementalState.md) | `from foundry_sdk.v2.connectivity.models import DateColumnInitialIncrementalState` | -**Connectivity** | [DecimalColumnInitialIncrementalState](docs/v2/Connectivity/models/DecimalColumnInitialIncrementalState.md) | `from foundry_sdk.v2.connectivity.models import DecimalColumnInitialIncrementalState` | -**Connectivity** | [DeltaVirtualTableConfig](docs/v2/Connectivity/models/DeltaVirtualTableConfig.md) | `from foundry_sdk.v2.connectivity.models import DeltaVirtualTableConfig` | -**Connectivity** | [Domain](docs/v2/Connectivity/models/Domain.md) | `from foundry_sdk.v2.connectivity.models import Domain` | -**Connectivity** | [EncryptedProperty](docs/v2/Connectivity/models/EncryptedProperty.md) | `from foundry_sdk.v2.connectivity.models import EncryptedProperty` | -**Connectivity** | [FileAnyPathMatchesFilter](docs/v2/Connectivity/models/FileAnyPathMatchesFilter.md) | `from foundry_sdk.v2.connectivity.models import FileAnyPathMatchesFilter` | -**Connectivity** | [FileAtLeastCountFilter](docs/v2/Connectivity/models/FileAtLeastCountFilter.md) | `from foundry_sdk.v2.connectivity.models import FileAtLeastCountFilter` | -**Connectivity** | [FileChangedSinceLastUploadFilter](docs/v2/Connectivity/models/FileChangedSinceLastUploadFilter.md) | `from foundry_sdk.v2.connectivity.models import FileChangedSinceLastUploadFilter` | -**Connectivity** | [FileFormat](docs/v2/Connectivity/models/FileFormat.md) | `from foundry_sdk.v2.connectivity.models import FileFormat` | -**Connectivity** | [FileImport](docs/v2/Connectivity/models/FileImport.md) | `from foundry_sdk.v2.connectivity.models import FileImport` | -**Connectivity** | [FileImportCustomFilter](docs/v2/Connectivity/models/FileImportCustomFilter.md) | `from foundry_sdk.v2.connectivity.models import FileImportCustomFilter` | -**Connectivity** | [FileImportDisplayName](docs/v2/Connectivity/models/FileImportDisplayName.md) | `from foundry_sdk.v2.connectivity.models import FileImportDisplayName` | -**Connectivity** | [FileImportFilter](docs/v2/Connectivity/models/FileImportFilter.md) | `from foundry_sdk.v2.connectivity.models import FileImportFilter` | -**Connectivity** | [FileImportMode](docs/v2/Connectivity/models/FileImportMode.md) | `from foundry_sdk.v2.connectivity.models import FileImportMode` | -**Connectivity** | [FileImportRid](docs/v2/Connectivity/models/FileImportRid.md) | `from foundry_sdk.v2.connectivity.models import FileImportRid` | -**Connectivity** | [FileLastModifiedAfterFilter](docs/v2/Connectivity/models/FileLastModifiedAfterFilter.md) | `from foundry_sdk.v2.connectivity.models import FileLastModifiedAfterFilter` | -**Connectivity** | [FilePathMatchesFilter](docs/v2/Connectivity/models/FilePathMatchesFilter.md) | `from foundry_sdk.v2.connectivity.models import FilePathMatchesFilter` | -**Connectivity** | [FilePathNotMatchesFilter](docs/v2/Connectivity/models/FilePathNotMatchesFilter.md) | `from foundry_sdk.v2.connectivity.models import FilePathNotMatchesFilter` | -**Connectivity** | [FileProperty](docs/v2/Connectivity/models/FileProperty.md) | `from foundry_sdk.v2.connectivity.models import FileProperty` | -**Connectivity** | [FilesCountLimitFilter](docs/v2/Connectivity/models/FilesCountLimitFilter.md) | `from foundry_sdk.v2.connectivity.models import FilesCountLimitFilter` | -**Connectivity** | [FileSizeFilter](docs/v2/Connectivity/models/FileSizeFilter.md) | `from foundry_sdk.v2.connectivity.models import FileSizeFilter` | -**Connectivity** | [FilesVirtualTableConfig](docs/v2/Connectivity/models/FilesVirtualTableConfig.md) | `from foundry_sdk.v2.connectivity.models import FilesVirtualTableConfig` | -**Connectivity** | [FoundryWorker](docs/v2/Connectivity/models/FoundryWorker.md) | `from foundry_sdk.v2.connectivity.models import FoundryWorker` | -**Connectivity** | [GetConfigurationConnectionsBatchRequestElement](docs/v2/Connectivity/models/GetConfigurationConnectionsBatchRequestElement.md) | `from foundry_sdk.v2.connectivity.models import GetConfigurationConnectionsBatchRequestElement` | -**Connectivity** | [GetConfigurationConnectionsBatchResponse](docs/v2/Connectivity/models/GetConfigurationConnectionsBatchResponse.md) | `from foundry_sdk.v2.connectivity.models import GetConfigurationConnectionsBatchResponse` | -**Connectivity** | [GlueVirtualTableConfig](docs/v2/Connectivity/models/GlueVirtualTableConfig.md) | `from foundry_sdk.v2.connectivity.models import GlueVirtualTableConfig` | -**Connectivity** | [HeaderApiKey](docs/v2/Connectivity/models/HeaderApiKey.md) | `from foundry_sdk.v2.connectivity.models import HeaderApiKey` | -**Connectivity** | [IcebergVirtualTableConfig](docs/v2/Connectivity/models/IcebergVirtualTableConfig.md) | `from foundry_sdk.v2.connectivity.models import IcebergVirtualTableConfig` | -**Connectivity** | [IntegerColumnInitialIncrementalState](docs/v2/Connectivity/models/IntegerColumnInitialIncrementalState.md) | `from foundry_sdk.v2.connectivity.models import IntegerColumnInitialIncrementalState` | -**Connectivity** | [InvalidConnectionReason](docs/v2/Connectivity/models/InvalidConnectionReason.md) | `from foundry_sdk.v2.connectivity.models import InvalidConnectionReason` | -**Connectivity** | [JdbcConnectionConfiguration](docs/v2/Connectivity/models/JdbcConnectionConfiguration.md) | `from foundry_sdk.v2.connectivity.models import JdbcConnectionConfiguration` | -**Connectivity** | [JdbcDriverArtifactName](docs/v2/Connectivity/models/JdbcDriverArtifactName.md) | `from foundry_sdk.v2.connectivity.models import JdbcDriverArtifactName` | -**Connectivity** | [JdbcProperties](docs/v2/Connectivity/models/JdbcProperties.md) | `from foundry_sdk.v2.connectivity.models import JdbcProperties` | -**Connectivity** | [JdbcTableImportConfig](docs/v2/Connectivity/models/JdbcTableImportConfig.md) | `from foundry_sdk.v2.connectivity.models import JdbcTableImportConfig` | -**Connectivity** | [ListFileImportsResponse](docs/v2/Connectivity/models/ListFileImportsResponse.md) | `from foundry_sdk.v2.connectivity.models import ListFileImportsResponse` | -**Connectivity** | [ListTableImportsResponse](docs/v2/Connectivity/models/ListTableImportsResponse.md) | `from foundry_sdk.v2.connectivity.models import ListTableImportsResponse` | -**Connectivity** | [LongColumnInitialIncrementalState](docs/v2/Connectivity/models/LongColumnInitialIncrementalState.md) | `from foundry_sdk.v2.connectivity.models import LongColumnInitialIncrementalState` | -**Connectivity** | [MicrosoftAccessTableImportConfig](docs/v2/Connectivity/models/MicrosoftAccessTableImportConfig.md) | `from foundry_sdk.v2.connectivity.models import MicrosoftAccessTableImportConfig` | -**Connectivity** | [MicrosoftSqlServerTableImportConfig](docs/v2/Connectivity/models/MicrosoftSqlServerTableImportConfig.md) | `from foundry_sdk.v2.connectivity.models import MicrosoftSqlServerTableImportConfig` | -**Connectivity** | [NetworkEgressPolicyRid](docs/v2/Connectivity/models/NetworkEgressPolicyRid.md) | `from foundry_sdk.v2.connectivity.models import NetworkEgressPolicyRid` | -**Connectivity** | [OauthMachineToMachineAuth](docs/v2/Connectivity/models/OauthMachineToMachineAuth.md) | `from foundry_sdk.v2.connectivity.models import OauthMachineToMachineAuth` | -**Connectivity** | [OracleTableImportConfig](docs/v2/Connectivity/models/OracleTableImportConfig.md) | `from foundry_sdk.v2.connectivity.models import OracleTableImportConfig` | -**Connectivity** | [PersonalAccessToken](docs/v2/Connectivity/models/PersonalAccessToken.md) | `from foundry_sdk.v2.connectivity.models import PersonalAccessToken` | -**Connectivity** | [PlaintextValue](docs/v2/Connectivity/models/PlaintextValue.md) | `from foundry_sdk.v2.connectivity.models import PlaintextValue` | -**Connectivity** | [PostgreSqlTableImportConfig](docs/v2/Connectivity/models/PostgreSqlTableImportConfig.md) | `from foundry_sdk.v2.connectivity.models import PostgreSqlTableImportConfig` | -**Connectivity** | [Protocol](docs/v2/Connectivity/models/Protocol.md) | `from foundry_sdk.v2.connectivity.models import Protocol` | -**Connectivity** | [QueryParameterApiKey](docs/v2/Connectivity/models/QueryParameterApiKey.md) | `from foundry_sdk.v2.connectivity.models import QueryParameterApiKey` | -**Connectivity** | [Region](docs/v2/Connectivity/models/Region.md) | `from foundry_sdk.v2.connectivity.models import Region` | -**Connectivity** | [ReplaceFileImportRequest](docs/v2/Connectivity/models/ReplaceFileImportRequest.md) | `from foundry_sdk.v2.connectivity.models import ReplaceFileImportRequest` | -**Connectivity** | [ReplaceTableImportRequest](docs/v2/Connectivity/models/ReplaceTableImportRequest.md) | `from foundry_sdk.v2.connectivity.models import ReplaceTableImportRequest` | -**Connectivity** | [ReplaceTableImportRequestDatabricksTableImportConfig](docs/v2/Connectivity/models/ReplaceTableImportRequestDatabricksTableImportConfig.md) | `from foundry_sdk.v2.connectivity.models import ReplaceTableImportRequestDatabricksTableImportConfig` | -**Connectivity** | [ReplaceTableImportRequestJdbcTableImportConfig](docs/v2/Connectivity/models/ReplaceTableImportRequestJdbcTableImportConfig.md) | `from foundry_sdk.v2.connectivity.models import ReplaceTableImportRequestJdbcTableImportConfig` | -**Connectivity** | [ReplaceTableImportRequestMicrosoftAccessTableImportConfig](docs/v2/Connectivity/models/ReplaceTableImportRequestMicrosoftAccessTableImportConfig.md) | `from foundry_sdk.v2.connectivity.models import ReplaceTableImportRequestMicrosoftAccessTableImportConfig` | -**Connectivity** | [ReplaceTableImportRequestMicrosoftSqlServerTableImportConfig](docs/v2/Connectivity/models/ReplaceTableImportRequestMicrosoftSqlServerTableImportConfig.md) | `from foundry_sdk.v2.connectivity.models import ReplaceTableImportRequestMicrosoftSqlServerTableImportConfig` | -**Connectivity** | [ReplaceTableImportRequestOracleTableImportConfig](docs/v2/Connectivity/models/ReplaceTableImportRequestOracleTableImportConfig.md) | `from foundry_sdk.v2.connectivity.models import ReplaceTableImportRequestOracleTableImportConfig` | -**Connectivity** | [ReplaceTableImportRequestPostgreSqlTableImportConfig](docs/v2/Connectivity/models/ReplaceTableImportRequestPostgreSqlTableImportConfig.md) | `from foundry_sdk.v2.connectivity.models import ReplaceTableImportRequestPostgreSqlTableImportConfig` | -**Connectivity** | [ReplaceTableImportRequestSnowflakeTableImportConfig](docs/v2/Connectivity/models/ReplaceTableImportRequestSnowflakeTableImportConfig.md) | `from foundry_sdk.v2.connectivity.models import ReplaceTableImportRequestSnowflakeTableImportConfig` | -**Connectivity** | [ReplaceTableImportRequestTableImportConfig](docs/v2/Connectivity/models/ReplaceTableImportRequestTableImportConfig.md) | `from foundry_sdk.v2.connectivity.models import ReplaceTableImportRequestTableImportConfig` | -**Connectivity** | [RestAuthenticationMode](docs/v2/Connectivity/models/RestAuthenticationMode.md) | `from foundry_sdk.v2.connectivity.models import RestAuthenticationMode` | -**Connectivity** | [RestConnectionAdditionalSecrets](docs/v2/Connectivity/models/RestConnectionAdditionalSecrets.md) | `from foundry_sdk.v2.connectivity.models import RestConnectionAdditionalSecrets` | -**Connectivity** | [RestConnectionConfiguration](docs/v2/Connectivity/models/RestConnectionConfiguration.md) | `from foundry_sdk.v2.connectivity.models import RestConnectionConfiguration` | -**Connectivity** | [RestConnectionOAuth2](docs/v2/Connectivity/models/RestConnectionOAuth2.md) | `from foundry_sdk.v2.connectivity.models import RestConnectionOAuth2` | -**Connectivity** | [RestRequestApiKeyLocation](docs/v2/Connectivity/models/RestRequestApiKeyLocation.md) | `from foundry_sdk.v2.connectivity.models import RestRequestApiKeyLocation` | -**Connectivity** | [S3AuthenticationMode](docs/v2/Connectivity/models/S3AuthenticationMode.md) | `from foundry_sdk.v2.connectivity.models import S3AuthenticationMode` | -**Connectivity** | [S3ConnectionConfiguration](docs/v2/Connectivity/models/S3ConnectionConfiguration.md) | `from foundry_sdk.v2.connectivity.models import S3ConnectionConfiguration` | -**Connectivity** | [S3KmsConfiguration](docs/v2/Connectivity/models/S3KmsConfiguration.md) | `from foundry_sdk.v2.connectivity.models import S3KmsConfiguration` | -**Connectivity** | [S3ProxyConfiguration](docs/v2/Connectivity/models/S3ProxyConfiguration.md) | `from foundry_sdk.v2.connectivity.models import S3ProxyConfiguration` | -**Connectivity** | [SecretName](docs/v2/Connectivity/models/SecretName.md) | `from foundry_sdk.v2.connectivity.models import SecretName` | -**Connectivity** | [SecretsNames](docs/v2/Connectivity/models/SecretsNames.md) | `from foundry_sdk.v2.connectivity.models import SecretsNames` | -**Connectivity** | [SecretsWithPlaintextValues](docs/v2/Connectivity/models/SecretsWithPlaintextValues.md) | `from foundry_sdk.v2.connectivity.models import SecretsWithPlaintextValues` | -**Connectivity** | [SmbAuth](docs/v2/Connectivity/models/SmbAuth.md) | `from foundry_sdk.v2.connectivity.models import SmbAuth` | -**Connectivity** | [SmbConnectionConfiguration](docs/v2/Connectivity/models/SmbConnectionConfiguration.md) | `from foundry_sdk.v2.connectivity.models import SmbConnectionConfiguration` | -**Connectivity** | [SmbProxyConfiguration](docs/v2/Connectivity/models/SmbProxyConfiguration.md) | `from foundry_sdk.v2.connectivity.models import SmbProxyConfiguration` | -**Connectivity** | [SmbProxyType](docs/v2/Connectivity/models/SmbProxyType.md) | `from foundry_sdk.v2.connectivity.models import SmbProxyType` | -**Connectivity** | [SmbUsernamePasswordAuth](docs/v2/Connectivity/models/SmbUsernamePasswordAuth.md) | `from foundry_sdk.v2.connectivity.models import SmbUsernamePasswordAuth` | -**Connectivity** | [SnowflakeAuthenticationMode](docs/v2/Connectivity/models/SnowflakeAuthenticationMode.md) | `from foundry_sdk.v2.connectivity.models import SnowflakeAuthenticationMode` | -**Connectivity** | [SnowflakeConnectionConfiguration](docs/v2/Connectivity/models/SnowflakeConnectionConfiguration.md) | `from foundry_sdk.v2.connectivity.models import SnowflakeConnectionConfiguration` | -**Connectivity** | [SnowflakeExternalOauth](docs/v2/Connectivity/models/SnowflakeExternalOauth.md) | `from foundry_sdk.v2.connectivity.models import SnowflakeExternalOauth` | -**Connectivity** | [SnowflakeKeyPairAuthentication](docs/v2/Connectivity/models/SnowflakeKeyPairAuthentication.md) | `from foundry_sdk.v2.connectivity.models import SnowflakeKeyPairAuthentication` | -**Connectivity** | [SnowflakeTableImportConfig](docs/v2/Connectivity/models/SnowflakeTableImportConfig.md) | `from foundry_sdk.v2.connectivity.models import SnowflakeTableImportConfig` | -**Connectivity** | [SnowflakeVirtualTableConfig](docs/v2/Connectivity/models/SnowflakeVirtualTableConfig.md) | `from foundry_sdk.v2.connectivity.models import SnowflakeVirtualTableConfig` | -**Connectivity** | [StringColumnInitialIncrementalState](docs/v2/Connectivity/models/StringColumnInitialIncrementalState.md) | `from foundry_sdk.v2.connectivity.models import StringColumnInitialIncrementalState` | -**Connectivity** | [StsRoleConfiguration](docs/v2/Connectivity/models/StsRoleConfiguration.md) | `from foundry_sdk.v2.connectivity.models import StsRoleConfiguration` | -**Connectivity** | [TableImport](docs/v2/Connectivity/models/TableImport.md) | `from foundry_sdk.v2.connectivity.models import TableImport` | -**Connectivity** | [TableImportAllowSchemaChanges](docs/v2/Connectivity/models/TableImportAllowSchemaChanges.md) | `from foundry_sdk.v2.connectivity.models import TableImportAllowSchemaChanges` | -**Connectivity** | [TableImportConfig](docs/v2/Connectivity/models/TableImportConfig.md) | `from foundry_sdk.v2.connectivity.models import TableImportConfig` | -**Connectivity** | [TableImportDisplayName](docs/v2/Connectivity/models/TableImportDisplayName.md) | `from foundry_sdk.v2.connectivity.models import TableImportDisplayName` | -**Connectivity** | [TableImportInitialIncrementalState](docs/v2/Connectivity/models/TableImportInitialIncrementalState.md) | `from foundry_sdk.v2.connectivity.models import TableImportInitialIncrementalState` | -**Connectivity** | [TableImportMode](docs/v2/Connectivity/models/TableImportMode.md) | `from foundry_sdk.v2.connectivity.models import TableImportMode` | -**Connectivity** | [TableImportQuery](docs/v2/Connectivity/models/TableImportQuery.md) | `from foundry_sdk.v2.connectivity.models import TableImportQuery` | -**Connectivity** | [TableImportRid](docs/v2/Connectivity/models/TableImportRid.md) | `from foundry_sdk.v2.connectivity.models import TableImportRid` | -**Connectivity** | [TableName](docs/v2/Connectivity/models/TableName.md) | `from foundry_sdk.v2.connectivity.models import TableName` | -**Connectivity** | [TableRid](docs/v2/Connectivity/models/TableRid.md) | `from foundry_sdk.v2.connectivity.models import TableRid` | -**Connectivity** | [TimestampColumnInitialIncrementalState](docs/v2/Connectivity/models/TimestampColumnInitialIncrementalState.md) | `from foundry_sdk.v2.connectivity.models import TimestampColumnInitialIncrementalState` | -**Connectivity** | [UnityVirtualTableConfig](docs/v2/Connectivity/models/UnityVirtualTableConfig.md) | `from foundry_sdk.v2.connectivity.models import UnityVirtualTableConfig` | -**Connectivity** | [UnknownWorker](docs/v2/Connectivity/models/UnknownWorker.md) | `from foundry_sdk.v2.connectivity.models import UnknownWorker` | -**Connectivity** | [UpdateExportSettingsForConnectionRequest](docs/v2/Connectivity/models/UpdateExportSettingsForConnectionRequest.md) | `from foundry_sdk.v2.connectivity.models import UpdateExportSettingsForConnectionRequest` | -**Connectivity** | [UpdateSecretsForConnectionRequest](docs/v2/Connectivity/models/UpdateSecretsForConnectionRequest.md) | `from foundry_sdk.v2.connectivity.models import UpdateSecretsForConnectionRequest` | -**Connectivity** | [UriScheme](docs/v2/Connectivity/models/UriScheme.md) | `from foundry_sdk.v2.connectivity.models import UriScheme` | -**Connectivity** | [VirtualTable](docs/v2/Connectivity/models/VirtualTable.md) | `from foundry_sdk.v2.connectivity.models import VirtualTable` | -**Connectivity** | [VirtualTableConfig](docs/v2/Connectivity/models/VirtualTableConfig.md) | `from foundry_sdk.v2.connectivity.models import VirtualTableConfig` | -**Connectivity** | [WorkflowIdentityFederation](docs/v2/Connectivity/models/WorkflowIdentityFederation.md) | `from foundry_sdk.v2.connectivity.models import WorkflowIdentityFederation` | -**Core** | [AnyType](docs/v2/Core/models/AnyType.md) | `from foundry_sdk.v2.core.models import AnyType` | -**Core** | [ArrayFieldType](docs/v2/Core/models/ArrayFieldType.md) | `from foundry_sdk.v2.core.models import ArrayFieldType` | -**Core** | [AttachmentType](docs/v2/Core/models/AttachmentType.md) | `from foundry_sdk.v2.core.models import AttachmentType` | -**Core** | [Attribution](docs/v2/Core/models/Attribution.md) | `from foundry_sdk.v2.core.models import Attribution` | -**Core** | [BinaryType](docs/v2/Core/models/BinaryType.md) | `from foundry_sdk.v2.core.models import BinaryType` | -**Core** | [BooleanType](docs/v2/Core/models/BooleanType.md) | `from foundry_sdk.v2.core.models import BooleanType` | -**Core** | [BranchMetadata](docs/v2/Core/models/BranchMetadata.md) | `from foundry_sdk.v2.core.models import BranchMetadata` | -**Core** | [BuildRid](docs/v2/Core/models/BuildRid.md) | `from foundry_sdk.v2.core.models import BuildRid` | -**Core** | [ByteType](docs/v2/Core/models/ByteType.md) | `from foundry_sdk.v2.core.models import ByteType` | -**Core** | [ChangeDataCaptureConfiguration](docs/v2/Core/models/ChangeDataCaptureConfiguration.md) | `from foundry_sdk.v2.core.models import ChangeDataCaptureConfiguration` | -**Core** | [CheckReportRid](docs/v2/Core/models/CheckReportRid.md) | `from foundry_sdk.v2.core.models import CheckReportRid` | -**Core** | [CheckRid](docs/v2/Core/models/CheckRid.md) | `from foundry_sdk.v2.core.models import CheckRid` | -**Core** | [CipherTextType](docs/v2/Core/models/CipherTextType.md) | `from foundry_sdk.v2.core.models import CipherTextType` | -**Core** | [ComputeSeconds](docs/v2/Core/models/ComputeSeconds.md) | `from foundry_sdk.v2.core.models import ComputeSeconds` | -**Core** | [ContentLength](docs/v2/Core/models/ContentLength.md) | `from foundry_sdk.v2.core.models import ContentLength` | -**Core** | [ContentType](docs/v2/Core/models/ContentType.md) | `from foundry_sdk.v2.core.models import ContentType` | -**Core** | [CreatedBy](docs/v2/Core/models/CreatedBy.md) | `from foundry_sdk.v2.core.models import CreatedBy` | -**Core** | [CreatedTime](docs/v2/Core/models/CreatedTime.md) | `from foundry_sdk.v2.core.models import CreatedTime` | -**Core** | [CustomMetadata](docs/v2/Core/models/CustomMetadata.md) | `from foundry_sdk.v2.core.models import CustomMetadata` | -**Core** | [DatasetFieldSchema](docs/v2/Core/models/DatasetFieldSchema.md) | `from foundry_sdk.v2.core.models import DatasetFieldSchema` | -**Core** | [DatasetSchema](docs/v2/Core/models/DatasetSchema.md) | `from foundry_sdk.v2.core.models import DatasetSchema` | -**Core** | [DateType](docs/v2/Core/models/DateType.md) | `from foundry_sdk.v2.core.models import DateType` | -**Core** | [DecimalType](docs/v2/Core/models/DecimalType.md) | `from foundry_sdk.v2.core.models import DecimalType` | -**Core** | [DisplayName](docs/v2/Core/models/DisplayName.md) | `from foundry_sdk.v2.core.models import DisplayName` | -**Core** | [Distance](docs/v2/Core/models/Distance.md) | `from foundry_sdk.v2.core.models import Distance` | -**Core** | [DistanceUnit](docs/v2/Core/models/DistanceUnit.md) | `from foundry_sdk.v2.core.models import DistanceUnit` | -**Core** | [DoubleType](docs/v2/Core/models/DoubleType.md) | `from foundry_sdk.v2.core.models import DoubleType` | -**Core** | [Duration](docs/v2/Core/models/Duration.md) | `from foundry_sdk.v2.core.models import Duration` | -**Core** | [DurationSeconds](docs/v2/Core/models/DurationSeconds.md) | `from foundry_sdk.v2.core.models import DurationSeconds` | -**Core** | [EmbeddingModel](docs/v2/Core/models/EmbeddingModel.md) | `from foundry_sdk.v2.core.models import EmbeddingModel` | -**Core** | [EnrollmentRid](docs/v2/Core/models/EnrollmentRid.md) | `from foundry_sdk.v2.core.models import EnrollmentRid` | -**Core** | [Field](docs/v2/Core/models/Field.md) | `from foundry_sdk.v2.core.models import Field` | -**Core** | [FieldDataType](docs/v2/Core/models/FieldDataType.md) | `from foundry_sdk.v2.core.models import FieldDataType` | -**Core** | [FieldName](docs/v2/Core/models/FieldName.md) | `from foundry_sdk.v2.core.models import FieldName` | -**Core** | [FieldSchema](docs/v2/Core/models/FieldSchema.md) | `from foundry_sdk.v2.core.models import FieldSchema` | -**Core** | [Filename](docs/v2/Core/models/Filename.md) | `from foundry_sdk.v2.core.models import Filename` | -**Core** | [FilePath](docs/v2/Core/models/FilePath.md) | `from foundry_sdk.v2.core.models import FilePath` | -**Core** | [FilterBinaryType](docs/v2/Core/models/FilterBinaryType.md) | `from foundry_sdk.v2.core.models import FilterBinaryType` | -**Core** | [FilterBooleanType](docs/v2/Core/models/FilterBooleanType.md) | `from foundry_sdk.v2.core.models import FilterBooleanType` | -**Core** | [FilterDateTimeType](docs/v2/Core/models/FilterDateTimeType.md) | `from foundry_sdk.v2.core.models import FilterDateTimeType` | -**Core** | [FilterDateType](docs/v2/Core/models/FilterDateType.md) | `from foundry_sdk.v2.core.models import FilterDateType` | -**Core** | [FilterDoubleType](docs/v2/Core/models/FilterDoubleType.md) | `from foundry_sdk.v2.core.models import FilterDoubleType` | -**Core** | [FilterEnumType](docs/v2/Core/models/FilterEnumType.md) | `from foundry_sdk.v2.core.models import FilterEnumType` | -**Core** | [FilterFloatType](docs/v2/Core/models/FilterFloatType.md) | `from foundry_sdk.v2.core.models import FilterFloatType` | -**Core** | [FilterIntegerType](docs/v2/Core/models/FilterIntegerType.md) | `from foundry_sdk.v2.core.models import FilterIntegerType` | -**Core** | [FilterLongType](docs/v2/Core/models/FilterLongType.md) | `from foundry_sdk.v2.core.models import FilterLongType` | -**Core** | [FilterRidType](docs/v2/Core/models/FilterRidType.md) | `from foundry_sdk.v2.core.models import FilterRidType` | -**Core** | [FilterStringType](docs/v2/Core/models/FilterStringType.md) | `from foundry_sdk.v2.core.models import FilterStringType` | -**Core** | [FilterType](docs/v2/Core/models/FilterType.md) | `from foundry_sdk.v2.core.models import FilterType` | -**Core** | [FilterUuidType](docs/v2/Core/models/FilterUuidType.md) | `from foundry_sdk.v2.core.models import FilterUuidType` | -**Core** | [FloatType](docs/v2/Core/models/FloatType.md) | `from foundry_sdk.v2.core.models import FloatType` | -**Core** | [FolderRid](docs/v2/Core/models/FolderRid.md) | `from foundry_sdk.v2.core.models import FolderRid` | -**Core** | [FoundryBranch](docs/v2/Core/models/FoundryBranch.md) | `from foundry_sdk.v2.core.models import FoundryBranch` | -**Core** | [FoundryLiveDeployment](docs/v2/Core/models/FoundryLiveDeployment.md) | `from foundry_sdk.v2.core.models import FoundryLiveDeployment` | -**Core** | [FullRowChangeDataCaptureConfiguration](docs/v2/Core/models/FullRowChangeDataCaptureConfiguration.md) | `from foundry_sdk.v2.core.models import FullRowChangeDataCaptureConfiguration` | -**Core** | [GeohashType](docs/v2/Core/models/GeohashType.md) | `from foundry_sdk.v2.core.models import GeohashType` | -**Core** | [GeoPointType](docs/v2/Core/models/GeoPointType.md) | `from foundry_sdk.v2.core.models import GeoPointType` | -**Core** | [GeoShapeType](docs/v2/Core/models/GeoShapeType.md) | `from foundry_sdk.v2.core.models import GeoShapeType` | -**Core** | [GeotimeSeriesReferenceType](docs/v2/Core/models/GeotimeSeriesReferenceType.md) | `from foundry_sdk.v2.core.models import GeotimeSeriesReferenceType` | -**Core** | [GroupId](docs/v2/Core/models/GroupId.md) | `from foundry_sdk.v2.core.models import GroupId` | -**Core** | [GroupName](docs/v2/Core/models/GroupName.md) | `from foundry_sdk.v2.core.models import GroupName` | -**Core** | [GroupRid](docs/v2/Core/models/GroupRid.md) | `from foundry_sdk.v2.core.models import GroupRid` | -**Core** | [IncludeComputeUsage](docs/v2/Core/models/IncludeComputeUsage.md) | `from foundry_sdk.v2.core.models import IncludeComputeUsage` | -**Core** | [IntegerType](docs/v2/Core/models/IntegerType.md) | `from foundry_sdk.v2.core.models import IntegerType` | -**Core** | [JobRid](docs/v2/Core/models/JobRid.md) | `from foundry_sdk.v2.core.models import JobRid` | -**Core** | [LmsEmbeddingModel](docs/v2/Core/models/LmsEmbeddingModel.md) | `from foundry_sdk.v2.core.models import LmsEmbeddingModel` | -**Core** | [LmsEmbeddingModelValue](docs/v2/Core/models/LmsEmbeddingModelValue.md) | `from foundry_sdk.v2.core.models import LmsEmbeddingModelValue` | -**Core** | [LongType](docs/v2/Core/models/LongType.md) | `from foundry_sdk.v2.core.models import LongType` | -**Core** | [MapFieldType](docs/v2/Core/models/MapFieldType.md) | `from foundry_sdk.v2.core.models import MapFieldType` | -**Core** | [MarkingId](docs/v2/Core/models/MarkingId.md) | `from foundry_sdk.v2.core.models import MarkingId` | -**Core** | [MarkingType](docs/v2/Core/models/MarkingType.md) | `from foundry_sdk.v2.core.models import MarkingType` | -**Core** | [MediaItemPath](docs/v2/Core/models/MediaItemPath.md) | `from foundry_sdk.v2.core.models import MediaItemPath` | -**Core** | [MediaItemReadToken](docs/v2/Core/models/MediaItemReadToken.md) | `from foundry_sdk.v2.core.models import MediaItemReadToken` | -**Core** | [MediaItemRid](docs/v2/Core/models/MediaItemRid.md) | `from foundry_sdk.v2.core.models import MediaItemRid` | -**Core** | [MediaReference](docs/v2/Core/models/MediaReference.md) | `from foundry_sdk.v2.core.models import MediaReference` | -**Core** | [MediaReferenceType](docs/v2/Core/models/MediaReferenceType.md) | `from foundry_sdk.v2.core.models import MediaReferenceType` | -**Core** | [MediaSetRid](docs/v2/Core/models/MediaSetRid.md) | `from foundry_sdk.v2.core.models import MediaSetRid` | -**Core** | [MediaSetViewItem](docs/v2/Core/models/MediaSetViewItem.md) | `from foundry_sdk.v2.core.models import MediaSetViewItem` | -**Core** | [MediaSetViewItemWrapper](docs/v2/Core/models/MediaSetViewItemWrapper.md) | `from foundry_sdk.v2.core.models import MediaSetViewItemWrapper` | -**Core** | [MediaSetViewRid](docs/v2/Core/models/MediaSetViewRid.md) | `from foundry_sdk.v2.core.models import MediaSetViewRid` | -**Core** | [MediaType](docs/v2/Core/models/MediaType.md) | `from foundry_sdk.v2.core.models import MediaType` | -**Core** | [NullType](docs/v2/Core/models/NullType.md) | `from foundry_sdk.v2.core.models import NullType` | -**Core** | [NumericOrNonNumericType](docs/v2/Core/models/NumericOrNonNumericType.md) | `from foundry_sdk.v2.core.models import NumericOrNonNumericType` | -**Core** | [Operation](docs/v2/Core/models/Operation.md) | `from foundry_sdk.v2.core.models import Operation` | -**Core** | [OperationScope](docs/v2/Core/models/OperationScope.md) | `from foundry_sdk.v2.core.models import OperationScope` | -**Core** | [OrderByDirection](docs/v2/Core/models/OrderByDirection.md) | `from foundry_sdk.v2.core.models import OrderByDirection` | -**Core** | [OrganizationRid](docs/v2/Core/models/OrganizationRid.md) | `from foundry_sdk.v2.core.models import OrganizationRid` | -**Core** | [PageSize](docs/v2/Core/models/PageSize.md) | `from foundry_sdk.v2.core.models import PageSize` | -**Core** | [PageToken](docs/v2/Core/models/PageToken.md) | `from foundry_sdk.v2.core.models import PageToken` | -**Core** | [PreviewMode](docs/v2/Core/models/PreviewMode.md) | `from foundry_sdk.v2.core.models import PreviewMode` | -**Core** | [PrincipalId](docs/v2/Core/models/PrincipalId.md) | `from foundry_sdk.v2.core.models import PrincipalId` | -**Core** | [PrincipalType](docs/v2/Core/models/PrincipalType.md) | `from foundry_sdk.v2.core.models import PrincipalType` | -**Core** | [Realm](docs/v2/Core/models/Realm.md) | `from foundry_sdk.v2.core.models import Realm` | -**Core** | [Reference](docs/v2/Core/models/Reference.md) | `from foundry_sdk.v2.core.models import Reference` | -**Core** | [ReleaseStatus](docs/v2/Core/models/ReleaseStatus.md) | `from foundry_sdk.v2.core.models import ReleaseStatus` | -**Core** | [Role](docs/v2/Core/models/Role.md) | `from foundry_sdk.v2.core.models import Role` | -**Core** | [RoleAssignmentUpdate](docs/v2/Core/models/RoleAssignmentUpdate.md) | `from foundry_sdk.v2.core.models import RoleAssignmentUpdate` | -**Core** | [RoleContext](docs/v2/Core/models/RoleContext.md) | `from foundry_sdk.v2.core.models import RoleContext` | -**Core** | [RoleId](docs/v2/Core/models/RoleId.md) | `from foundry_sdk.v2.core.models import RoleId` | -**Core** | [RoleSetId](docs/v2/Core/models/RoleSetId.md) | `from foundry_sdk.v2.core.models import RoleSetId` | -**Core** | [ScheduleRid](docs/v2/Core/models/ScheduleRid.md) | `from foundry_sdk.v2.core.models import ScheduleRid` | -**Core** | [SchemaFieldType](docs/v2/Core/models/SchemaFieldType.md) | `from foundry_sdk.v2.core.models import SchemaFieldType` | -**Core** | [ShortType](docs/v2/Core/models/ShortType.md) | `from foundry_sdk.v2.core.models import ShortType` | -**Core** | [SizeBytes](docs/v2/Core/models/SizeBytes.md) | `from foundry_sdk.v2.core.models import SizeBytes` | -**Core** | [StreamSchema](docs/v2/Core/models/StreamSchema.md) | `from foundry_sdk.v2.core.models import StreamSchema` | -**Core** | [StringType](docs/v2/Core/models/StringType.md) | `from foundry_sdk.v2.core.models import StringType` | -**Core** | [StructFieldName](docs/v2/Core/models/StructFieldName.md) | `from foundry_sdk.v2.core.models import StructFieldName` | -**Core** | [StructFieldType](docs/v2/Core/models/StructFieldType.md) | `from foundry_sdk.v2.core.models import StructFieldType` | -**Core** | [TableRid](docs/v2/Core/models/TableRid.md) | `from foundry_sdk.v2.core.models import TableRid` | -**Core** | [TimeSeriesItemType](docs/v2/Core/models/TimeSeriesItemType.md) | `from foundry_sdk.v2.core.models import TimeSeriesItemType` | -**Core** | [TimeseriesType](docs/v2/Core/models/TimeseriesType.md) | `from foundry_sdk.v2.core.models import TimeseriesType` | -**Core** | [TimestampType](docs/v2/Core/models/TimestampType.md) | `from foundry_sdk.v2.core.models import TimestampType` | -**Core** | [TimeUnit](docs/v2/Core/models/TimeUnit.md) | `from foundry_sdk.v2.core.models import TimeUnit` | -**Core** | [TotalCount](docs/v2/Core/models/TotalCount.md) | `from foundry_sdk.v2.core.models import TotalCount` | -**Core** | [TraceParent](docs/v2/Core/models/TraceParent.md) | `from foundry_sdk.v2.core.models import TraceParent` | -**Core** | [TraceState](docs/v2/Core/models/TraceState.md) | `from foundry_sdk.v2.core.models import TraceState` | -**Core** | [UnsupportedType](docs/v2/Core/models/UnsupportedType.md) | `from foundry_sdk.v2.core.models import UnsupportedType` | -**Core** | [UpdatedBy](docs/v2/Core/models/UpdatedBy.md) | `from foundry_sdk.v2.core.models import UpdatedBy` | -**Core** | [UpdatedTime](docs/v2/Core/models/UpdatedTime.md) | `from foundry_sdk.v2.core.models import UpdatedTime` | -**Core** | [UserId](docs/v2/Core/models/UserId.md) | `from foundry_sdk.v2.core.models import UserId` | -**Core** | [UserStatus](docs/v2/Core/models/UserStatus.md) | `from foundry_sdk.v2.core.models import UserStatus` | -**Core** | [VectorSimilarityFunction](docs/v2/Core/models/VectorSimilarityFunction.md) | `from foundry_sdk.v2.core.models import VectorSimilarityFunction` | -**Core** | [VectorSimilarityFunctionValue](docs/v2/Core/models/VectorSimilarityFunctionValue.md) | `from foundry_sdk.v2.core.models import VectorSimilarityFunctionValue` | -**Core** | [VectorType](docs/v2/Core/models/VectorType.md) | `from foundry_sdk.v2.core.models import VectorType` | -**Core** | [VersionId](docs/v2/Core/models/VersionId.md) | `from foundry_sdk.v2.core.models import VersionId` | -**Core** | [ZoneId](docs/v2/Core/models/ZoneId.md) | `from foundry_sdk.v2.core.models import ZoneId` | -**DataHealth** | [AllowedColumnValuesCheckConfig](docs/v2/DataHealth/models/AllowedColumnValuesCheckConfig.md) | `from foundry_sdk.v2.data_health.models import AllowedColumnValuesCheckConfig` | -**DataHealth** | [ApproximateUniquePercentageCheckConfig](docs/v2/DataHealth/models/ApproximateUniquePercentageCheckConfig.md) | `from foundry_sdk.v2.data_health.models import ApproximateUniquePercentageCheckConfig` | -**DataHealth** | [BooleanColumnValue](docs/v2/DataHealth/models/BooleanColumnValue.md) | `from foundry_sdk.v2.data_health.models import BooleanColumnValue` | -**DataHealth** | [BuildDurationCheckConfig](docs/v2/DataHealth/models/BuildDurationCheckConfig.md) | `from foundry_sdk.v2.data_health.models import BuildDurationCheckConfig` | -**DataHealth** | [BuildStatusCheckConfig](docs/v2/DataHealth/models/BuildStatusCheckConfig.md) | `from foundry_sdk.v2.data_health.models import BuildStatusCheckConfig` | -**DataHealth** | [Check](docs/v2/DataHealth/models/Check.md) | `from foundry_sdk.v2.data_health.models import Check` | -**DataHealth** | [CheckConfig](docs/v2/DataHealth/models/CheckConfig.md) | `from foundry_sdk.v2.data_health.models import CheckConfig` | -**DataHealth** | [CheckGroupRid](docs/v2/DataHealth/models/CheckGroupRid.md) | `from foundry_sdk.v2.data_health.models import CheckGroupRid` | -**DataHealth** | [CheckIntent](docs/v2/DataHealth/models/CheckIntent.md) | `from foundry_sdk.v2.data_health.models import CheckIntent` | -**DataHealth** | [CheckReport](docs/v2/DataHealth/models/CheckReport.md) | `from foundry_sdk.v2.data_health.models import CheckReport` | -**DataHealth** | [CheckResult](docs/v2/DataHealth/models/CheckResult.md) | `from foundry_sdk.v2.data_health.models import CheckResult` | -**DataHealth** | [CheckResultStatus](docs/v2/DataHealth/models/CheckResultStatus.md) | `from foundry_sdk.v2.data_health.models import CheckResultStatus` | -**DataHealth** | [ColumnCountConfig](docs/v2/DataHealth/models/ColumnCountConfig.md) | `from foundry_sdk.v2.data_health.models import ColumnCountConfig` | -**DataHealth** | [ColumnInfo](docs/v2/DataHealth/models/ColumnInfo.md) | `from foundry_sdk.v2.data_health.models import ColumnInfo` | -**DataHealth** | [ColumnName](docs/v2/DataHealth/models/ColumnName.md) | `from foundry_sdk.v2.data_health.models import ColumnName` | -**DataHealth** | [ColumnTypeCheckConfig](docs/v2/DataHealth/models/ColumnTypeCheckConfig.md) | `from foundry_sdk.v2.data_health.models import ColumnTypeCheckConfig` | -**DataHealth** | [ColumnTypeConfig](docs/v2/DataHealth/models/ColumnTypeConfig.md) | `from foundry_sdk.v2.data_health.models import ColumnTypeConfig` | -**DataHealth** | [ColumnValue](docs/v2/DataHealth/models/ColumnValue.md) | `from foundry_sdk.v2.data_health.models import ColumnValue` | -**DataHealth** | [CreateCheckRequest](docs/v2/DataHealth/models/CreateCheckRequest.md) | `from foundry_sdk.v2.data_health.models import CreateCheckRequest` | -**DataHealth** | [DatasetSubject](docs/v2/DataHealth/models/DatasetSubject.md) | `from foundry_sdk.v2.data_health.models import DatasetSubject` | -**DataHealth** | [DateBounds](docs/v2/DataHealth/models/DateBounds.md) | `from foundry_sdk.v2.data_health.models import DateBounds` | -**DataHealth** | [DateBoundsConfig](docs/v2/DataHealth/models/DateBoundsConfig.md) | `from foundry_sdk.v2.data_health.models import DateBoundsConfig` | -**DataHealth** | [DateColumnRangeCheckConfig](docs/v2/DataHealth/models/DateColumnRangeCheckConfig.md) | `from foundry_sdk.v2.data_health.models import DateColumnRangeCheckConfig` | -**DataHealth** | [DateColumnValue](docs/v2/DataHealth/models/DateColumnValue.md) | `from foundry_sdk.v2.data_health.models import DateColumnValue` | -**DataHealth** | [EscalationConfig](docs/v2/DataHealth/models/EscalationConfig.md) | `from foundry_sdk.v2.data_health.models import EscalationConfig` | -**DataHealth** | [JobDurationCheckConfig](docs/v2/DataHealth/models/JobDurationCheckConfig.md) | `from foundry_sdk.v2.data_health.models import JobDurationCheckConfig` | -**DataHealth** | [JobStatusCheckConfig](docs/v2/DataHealth/models/JobStatusCheckConfig.md) | `from foundry_sdk.v2.data_health.models import JobStatusCheckConfig` | -**DataHealth** | [MedianDeviation](docs/v2/DataHealth/models/MedianDeviation.md) | `from foundry_sdk.v2.data_health.models import MedianDeviation` | -**DataHealth** | [MedianDeviationBoundsType](docs/v2/DataHealth/models/MedianDeviationBoundsType.md) | `from foundry_sdk.v2.data_health.models import MedianDeviationBoundsType` | -**DataHealth** | [MedianDeviationConfig](docs/v2/DataHealth/models/MedianDeviationConfig.md) | `from foundry_sdk.v2.data_health.models import MedianDeviationConfig` | -**DataHealth** | [NullPercentageCheckConfig](docs/v2/DataHealth/models/NullPercentageCheckConfig.md) | `from foundry_sdk.v2.data_health.models import NullPercentageCheckConfig` | -**DataHealth** | [NumericBounds](docs/v2/DataHealth/models/NumericBounds.md) | `from foundry_sdk.v2.data_health.models import NumericBounds` | -**DataHealth** | [NumericBoundsConfig](docs/v2/DataHealth/models/NumericBoundsConfig.md) | `from foundry_sdk.v2.data_health.models import NumericBoundsConfig` | -**DataHealth** | [NumericColumnCheckConfig](docs/v2/DataHealth/models/NumericColumnCheckConfig.md) | `from foundry_sdk.v2.data_health.models import NumericColumnCheckConfig` | -**DataHealth** | [NumericColumnMeanCheckConfig](docs/v2/DataHealth/models/NumericColumnMeanCheckConfig.md) | `from foundry_sdk.v2.data_health.models import NumericColumnMeanCheckConfig` | -**DataHealth** | [NumericColumnMedianCheckConfig](docs/v2/DataHealth/models/NumericColumnMedianCheckConfig.md) | `from foundry_sdk.v2.data_health.models import NumericColumnMedianCheckConfig` | -**DataHealth** | [NumericColumnRangeCheckConfig](docs/v2/DataHealth/models/NumericColumnRangeCheckConfig.md) | `from foundry_sdk.v2.data_health.models import NumericColumnRangeCheckConfig` | -**DataHealth** | [NumericColumnValue](docs/v2/DataHealth/models/NumericColumnValue.md) | `from foundry_sdk.v2.data_health.models import NumericColumnValue` | -**DataHealth** | [PercentageBounds](docs/v2/DataHealth/models/PercentageBounds.md) | `from foundry_sdk.v2.data_health.models import PercentageBounds` | -**DataHealth** | [PercentageBoundsConfig](docs/v2/DataHealth/models/PercentageBoundsConfig.md) | `from foundry_sdk.v2.data_health.models import PercentageBoundsConfig` | -**DataHealth** | [PercentageCheckConfig](docs/v2/DataHealth/models/PercentageCheckConfig.md) | `from foundry_sdk.v2.data_health.models import PercentageCheckConfig` | -**DataHealth** | [PercentageValue](docs/v2/DataHealth/models/PercentageValue.md) | `from foundry_sdk.v2.data_health.models import PercentageValue` | -**DataHealth** | [PrimaryKeyCheckConfig](docs/v2/DataHealth/models/PrimaryKeyCheckConfig.md) | `from foundry_sdk.v2.data_health.models import PrimaryKeyCheckConfig` | -**DataHealth** | [PrimaryKeyConfig](docs/v2/DataHealth/models/PrimaryKeyConfig.md) | `from foundry_sdk.v2.data_health.models import PrimaryKeyConfig` | -**DataHealth** | [ReplaceAllowedColumnValuesCheckConfig](docs/v2/DataHealth/models/ReplaceAllowedColumnValuesCheckConfig.md) | `from foundry_sdk.v2.data_health.models import ReplaceAllowedColumnValuesCheckConfig` | -**DataHealth** | [ReplaceApproximateUniquePercentageCheckConfig](docs/v2/DataHealth/models/ReplaceApproximateUniquePercentageCheckConfig.md) | `from foundry_sdk.v2.data_health.models import ReplaceApproximateUniquePercentageCheckConfig` | -**DataHealth** | [ReplaceBuildDurationCheckConfig](docs/v2/DataHealth/models/ReplaceBuildDurationCheckConfig.md) | `from foundry_sdk.v2.data_health.models import ReplaceBuildDurationCheckConfig` | -**DataHealth** | [ReplaceBuildStatusCheckConfig](docs/v2/DataHealth/models/ReplaceBuildStatusCheckConfig.md) | `from foundry_sdk.v2.data_health.models import ReplaceBuildStatusCheckConfig` | -**DataHealth** | [ReplaceCheckConfig](docs/v2/DataHealth/models/ReplaceCheckConfig.md) | `from foundry_sdk.v2.data_health.models import ReplaceCheckConfig` | -**DataHealth** | [ReplaceCheckRequest](docs/v2/DataHealth/models/ReplaceCheckRequest.md) | `from foundry_sdk.v2.data_health.models import ReplaceCheckRequest` | -**DataHealth** | [ReplaceColumnTypeCheckConfig](docs/v2/DataHealth/models/ReplaceColumnTypeCheckConfig.md) | `from foundry_sdk.v2.data_health.models import ReplaceColumnTypeCheckConfig` | -**DataHealth** | [ReplaceColumnTypeConfig](docs/v2/DataHealth/models/ReplaceColumnTypeConfig.md) | `from foundry_sdk.v2.data_health.models import ReplaceColumnTypeConfig` | -**DataHealth** | [ReplaceDateColumnRangeCheckConfig](docs/v2/DataHealth/models/ReplaceDateColumnRangeCheckConfig.md) | `from foundry_sdk.v2.data_health.models import ReplaceDateColumnRangeCheckConfig` | -**DataHealth** | [ReplaceJobDurationCheckConfig](docs/v2/DataHealth/models/ReplaceJobDurationCheckConfig.md) | `from foundry_sdk.v2.data_health.models import ReplaceJobDurationCheckConfig` | -**DataHealth** | [ReplaceJobStatusCheckConfig](docs/v2/DataHealth/models/ReplaceJobStatusCheckConfig.md) | `from foundry_sdk.v2.data_health.models import ReplaceJobStatusCheckConfig` | -**DataHealth** | [ReplaceNullPercentageCheckConfig](docs/v2/DataHealth/models/ReplaceNullPercentageCheckConfig.md) | `from foundry_sdk.v2.data_health.models import ReplaceNullPercentageCheckConfig` | -**DataHealth** | [ReplaceNumericColumnCheckConfig](docs/v2/DataHealth/models/ReplaceNumericColumnCheckConfig.md) | `from foundry_sdk.v2.data_health.models import ReplaceNumericColumnCheckConfig` | -**DataHealth** | [ReplaceNumericColumnMeanCheckConfig](docs/v2/DataHealth/models/ReplaceNumericColumnMeanCheckConfig.md) | `from foundry_sdk.v2.data_health.models import ReplaceNumericColumnMeanCheckConfig` | -**DataHealth** | [ReplaceNumericColumnMedianCheckConfig](docs/v2/DataHealth/models/ReplaceNumericColumnMedianCheckConfig.md) | `from foundry_sdk.v2.data_health.models import ReplaceNumericColumnMedianCheckConfig` | -**DataHealth** | [ReplaceNumericColumnRangeCheckConfig](docs/v2/DataHealth/models/ReplaceNumericColumnRangeCheckConfig.md) | `from foundry_sdk.v2.data_health.models import ReplaceNumericColumnRangeCheckConfig` | -**DataHealth** | [ReplacePercentageCheckConfig](docs/v2/DataHealth/models/ReplacePercentageCheckConfig.md) | `from foundry_sdk.v2.data_health.models import ReplacePercentageCheckConfig` | -**DataHealth** | [ReplacePrimaryKeyCheckConfig](docs/v2/DataHealth/models/ReplacePrimaryKeyCheckConfig.md) | `from foundry_sdk.v2.data_health.models import ReplacePrimaryKeyCheckConfig` | -**DataHealth** | [ReplacePrimaryKeyConfig](docs/v2/DataHealth/models/ReplacePrimaryKeyConfig.md) | `from foundry_sdk.v2.data_health.models import ReplacePrimaryKeyConfig` | -**DataHealth** | [ReplaceSchemaComparisonCheckConfig](docs/v2/DataHealth/models/ReplaceSchemaComparisonCheckConfig.md) | `from foundry_sdk.v2.data_health.models import ReplaceSchemaComparisonCheckConfig` | -**DataHealth** | [ReplaceTotalColumnCountCheckConfig](docs/v2/DataHealth/models/ReplaceTotalColumnCountCheckConfig.md) | `from foundry_sdk.v2.data_health.models import ReplaceTotalColumnCountCheckConfig` | -**DataHealth** | [SchemaComparisonCheckConfig](docs/v2/DataHealth/models/SchemaComparisonCheckConfig.md) | `from foundry_sdk.v2.data_health.models import SchemaComparisonCheckConfig` | -**DataHealth** | [SchemaComparisonConfig](docs/v2/DataHealth/models/SchemaComparisonConfig.md) | `from foundry_sdk.v2.data_health.models import SchemaComparisonConfig` | -**DataHealth** | [SchemaComparisonType](docs/v2/DataHealth/models/SchemaComparisonType.md) | `from foundry_sdk.v2.data_health.models import SchemaComparisonType` | -**DataHealth** | [SchemaInfo](docs/v2/DataHealth/models/SchemaInfo.md) | `from foundry_sdk.v2.data_health.models import SchemaInfo` | -**DataHealth** | [SeverityLevel](docs/v2/DataHealth/models/SeverityLevel.md) | `from foundry_sdk.v2.data_health.models import SeverityLevel` | -**DataHealth** | [StatusCheckConfig](docs/v2/DataHealth/models/StatusCheckConfig.md) | `from foundry_sdk.v2.data_health.models import StatusCheckConfig` | -**DataHealth** | [StringColumnValue](docs/v2/DataHealth/models/StringColumnValue.md) | `from foundry_sdk.v2.data_health.models import StringColumnValue` | -**DataHealth** | [TimeBounds](docs/v2/DataHealth/models/TimeBounds.md) | `from foundry_sdk.v2.data_health.models import TimeBounds` | -**DataHealth** | [TimeBoundsConfig](docs/v2/DataHealth/models/TimeBoundsConfig.md) | `from foundry_sdk.v2.data_health.models import TimeBoundsConfig` | -**DataHealth** | [TimeCheckConfig](docs/v2/DataHealth/models/TimeCheckConfig.md) | `from foundry_sdk.v2.data_health.models import TimeCheckConfig` | -**DataHealth** | [TotalColumnCountCheckConfig](docs/v2/DataHealth/models/TotalColumnCountCheckConfig.md) | `from foundry_sdk.v2.data_health.models import TotalColumnCountCheckConfig` | -**DataHealth** | [TrendConfig](docs/v2/DataHealth/models/TrendConfig.md) | `from foundry_sdk.v2.data_health.models import TrendConfig` | -**DataHealth** | [TrendType](docs/v2/DataHealth/models/TrendType.md) | `from foundry_sdk.v2.data_health.models import TrendType` | -**Datasets** | [AddBackingDatasetsRequest](docs/v2/Datasets/models/AddBackingDatasetsRequest.md) | `from foundry_sdk.v2.datasets.models import AddBackingDatasetsRequest` | -**Datasets** | [AddPrimaryKeyRequest](docs/v2/Datasets/models/AddPrimaryKeyRequest.md) | `from foundry_sdk.v2.datasets.models import AddPrimaryKeyRequest` | -**Datasets** | [Branch](docs/v2/Datasets/models/Branch.md) | `from foundry_sdk.v2.datasets.models import Branch` | -**Datasets** | [BranchName](docs/v2/Datasets/models/BranchName.md) | `from foundry_sdk.v2.datasets.models import BranchName` | -**Datasets** | [CreateBranchRequest](docs/v2/Datasets/models/CreateBranchRequest.md) | `from foundry_sdk.v2.datasets.models import CreateBranchRequest` | -**Datasets** | [CreateDatasetRequest](docs/v2/Datasets/models/CreateDatasetRequest.md) | `from foundry_sdk.v2.datasets.models import CreateDatasetRequest` | -**Datasets** | [CreateTransactionRequest](docs/v2/Datasets/models/CreateTransactionRequest.md) | `from foundry_sdk.v2.datasets.models import CreateTransactionRequest` | -**Datasets** | [CreateViewRequest](docs/v2/Datasets/models/CreateViewRequest.md) | `from foundry_sdk.v2.datasets.models import CreateViewRequest` | -**Datasets** | [DataframeReader](docs/v2/Datasets/models/DataframeReader.md) | `from foundry_sdk.v2.datasets.models import DataframeReader` | -**Datasets** | [Dataset](docs/v2/Datasets/models/Dataset.md) | `from foundry_sdk.v2.datasets.models import Dataset` | -**Datasets** | [DatasetName](docs/v2/Datasets/models/DatasetName.md) | `from foundry_sdk.v2.datasets.models import DatasetName` | -**Datasets** | [DatasetRid](docs/v2/Datasets/models/DatasetRid.md) | `from foundry_sdk.v2.datasets.models import DatasetRid` | -**Datasets** | [File](docs/v2/Datasets/models/File.md) | `from foundry_sdk.v2.datasets.models import File` | -**Datasets** | [FileUpdatedTime](docs/v2/Datasets/models/FileUpdatedTime.md) | `from foundry_sdk.v2.datasets.models import FileUpdatedTime` | -**Datasets** | [GetDatasetJobsAndFilter](docs/v2/Datasets/models/GetDatasetJobsAndFilter.md) | `from foundry_sdk.v2.datasets.models import GetDatasetJobsAndFilter` | -**Datasets** | [GetDatasetJobsComparisonType](docs/v2/Datasets/models/GetDatasetJobsComparisonType.md) | `from foundry_sdk.v2.datasets.models import GetDatasetJobsComparisonType` | -**Datasets** | [GetDatasetJobsOrFilter](docs/v2/Datasets/models/GetDatasetJobsOrFilter.md) | `from foundry_sdk.v2.datasets.models import GetDatasetJobsOrFilter` | -**Datasets** | [GetDatasetJobsQuery](docs/v2/Datasets/models/GetDatasetJobsQuery.md) | `from foundry_sdk.v2.datasets.models import GetDatasetJobsQuery` | -**Datasets** | [GetDatasetJobsRequest](docs/v2/Datasets/models/GetDatasetJobsRequest.md) | `from foundry_sdk.v2.datasets.models import GetDatasetJobsRequest` | -**Datasets** | [GetDatasetJobsSort](docs/v2/Datasets/models/GetDatasetJobsSort.md) | `from foundry_sdk.v2.datasets.models import GetDatasetJobsSort` | -**Datasets** | [GetDatasetJobsSortDirection](docs/v2/Datasets/models/GetDatasetJobsSortDirection.md) | `from foundry_sdk.v2.datasets.models import GetDatasetJobsSortDirection` | -**Datasets** | [GetDatasetJobsSortType](docs/v2/Datasets/models/GetDatasetJobsSortType.md) | `from foundry_sdk.v2.datasets.models import GetDatasetJobsSortType` | -**Datasets** | [GetDatasetJobsTimeFilter](docs/v2/Datasets/models/GetDatasetJobsTimeFilter.md) | `from foundry_sdk.v2.datasets.models import GetDatasetJobsTimeFilter` | -**Datasets** | [GetDatasetJobsTimeFilterField](docs/v2/Datasets/models/GetDatasetJobsTimeFilterField.md) | `from foundry_sdk.v2.datasets.models import GetDatasetJobsTimeFilterField` | -**Datasets** | [GetDatasetSchemaResponse](docs/v2/Datasets/models/GetDatasetSchemaResponse.md) | `from foundry_sdk.v2.datasets.models import GetDatasetSchemaResponse` | -**Datasets** | [GetJobResponse](docs/v2/Datasets/models/GetJobResponse.md) | `from foundry_sdk.v2.datasets.models import GetJobResponse` | -**Datasets** | [GetSchemaDatasetsBatchRequestElement](docs/v2/Datasets/models/GetSchemaDatasetsBatchRequestElement.md) | `from foundry_sdk.v2.datasets.models import GetSchemaDatasetsBatchRequestElement` | -**Datasets** | [GetSchemaDatasetsBatchResponse](docs/v2/Datasets/models/GetSchemaDatasetsBatchResponse.md) | `from foundry_sdk.v2.datasets.models import GetSchemaDatasetsBatchResponse` | -**Datasets** | [JobDetails](docs/v2/Datasets/models/JobDetails.md) | `from foundry_sdk.v2.datasets.models import JobDetails` | -**Datasets** | [ListBranchesResponse](docs/v2/Datasets/models/ListBranchesResponse.md) | `from foundry_sdk.v2.datasets.models import ListBranchesResponse` | -**Datasets** | [ListFilesResponse](docs/v2/Datasets/models/ListFilesResponse.md) | `from foundry_sdk.v2.datasets.models import ListFilesResponse` | -**Datasets** | [ListHealthChecksResponse](docs/v2/Datasets/models/ListHealthChecksResponse.md) | `from foundry_sdk.v2.datasets.models import ListHealthChecksResponse` | -**Datasets** | [ListSchedulesResponse](docs/v2/Datasets/models/ListSchedulesResponse.md) | `from foundry_sdk.v2.datasets.models import ListSchedulesResponse` | -**Datasets** | [ListTransactionsOfDatasetResponse](docs/v2/Datasets/models/ListTransactionsOfDatasetResponse.md) | `from foundry_sdk.v2.datasets.models import ListTransactionsOfDatasetResponse` | -**Datasets** | [ListTransactionsResponse](docs/v2/Datasets/models/ListTransactionsResponse.md) | `from foundry_sdk.v2.datasets.models import ListTransactionsResponse` | -**Datasets** | [PrimaryKeyLatestWinsResolutionStrategy](docs/v2/Datasets/models/PrimaryKeyLatestWinsResolutionStrategy.md) | `from foundry_sdk.v2.datasets.models import PrimaryKeyLatestWinsResolutionStrategy` | -**Datasets** | [PrimaryKeyResolutionDuplicate](docs/v2/Datasets/models/PrimaryKeyResolutionDuplicate.md) | `from foundry_sdk.v2.datasets.models import PrimaryKeyResolutionDuplicate` | -**Datasets** | [PrimaryKeyResolutionStrategy](docs/v2/Datasets/models/PrimaryKeyResolutionStrategy.md) | `from foundry_sdk.v2.datasets.models import PrimaryKeyResolutionStrategy` | -**Datasets** | [PrimaryKeyResolutionUnique](docs/v2/Datasets/models/PrimaryKeyResolutionUnique.md) | `from foundry_sdk.v2.datasets.models import PrimaryKeyResolutionUnique` | -**Datasets** | [PutDatasetSchemaRequest](docs/v2/Datasets/models/PutDatasetSchemaRequest.md) | `from foundry_sdk.v2.datasets.models import PutDatasetSchemaRequest` | -**Datasets** | [RemoveBackingDatasetsRequest](docs/v2/Datasets/models/RemoveBackingDatasetsRequest.md) | `from foundry_sdk.v2.datasets.models import RemoveBackingDatasetsRequest` | -**Datasets** | [ReplaceBackingDatasetsRequest](docs/v2/Datasets/models/ReplaceBackingDatasetsRequest.md) | `from foundry_sdk.v2.datasets.models import ReplaceBackingDatasetsRequest` | -**Datasets** | [TableExportFormat](docs/v2/Datasets/models/TableExportFormat.md) | `from foundry_sdk.v2.datasets.models import TableExportFormat` | -**Datasets** | [Transaction](docs/v2/Datasets/models/Transaction.md) | `from foundry_sdk.v2.datasets.models import Transaction` | -**Datasets** | [TransactionCreatedTime](docs/v2/Datasets/models/TransactionCreatedTime.md) | `from foundry_sdk.v2.datasets.models import TransactionCreatedTime` | -**Datasets** | [TransactionRid](docs/v2/Datasets/models/TransactionRid.md) | `from foundry_sdk.v2.datasets.models import TransactionRid` | -**Datasets** | [TransactionStatus](docs/v2/Datasets/models/TransactionStatus.md) | `from foundry_sdk.v2.datasets.models import TransactionStatus` | -**Datasets** | [TransactionType](docs/v2/Datasets/models/TransactionType.md) | `from foundry_sdk.v2.datasets.models import TransactionType` | -**Datasets** | [View](docs/v2/Datasets/models/View.md) | `from foundry_sdk.v2.datasets.models import View` | -**Datasets** | [ViewBackingDataset](docs/v2/Datasets/models/ViewBackingDataset.md) | `from foundry_sdk.v2.datasets.models import ViewBackingDataset` | -**Datasets** | [ViewPrimaryKey](docs/v2/Datasets/models/ViewPrimaryKey.md) | `from foundry_sdk.v2.datasets.models import ViewPrimaryKey` | -**Datasets** | [ViewPrimaryKeyResolution](docs/v2/Datasets/models/ViewPrimaryKeyResolution.md) | `from foundry_sdk.v2.datasets.models import ViewPrimaryKeyResolution` | -**Filesystem** | [AccessRequirements](docs/v2/Filesystem/models/AccessRequirements.md) | `from foundry_sdk.v2.filesystem.models import AccessRequirements` | -**Filesystem** | [AddMarkingsRequest](docs/v2/Filesystem/models/AddMarkingsRequest.md) | `from foundry_sdk.v2.filesystem.models import AddMarkingsRequest` | -**Filesystem** | [AddOrganizationsRequest](docs/v2/Filesystem/models/AddOrganizationsRequest.md) | `from foundry_sdk.v2.filesystem.models import AddOrganizationsRequest` | -**Filesystem** | [AddResourceRolesRequest](docs/v2/Filesystem/models/AddResourceRolesRequest.md) | `from foundry_sdk.v2.filesystem.models import AddResourceRolesRequest` | -**Filesystem** | [CreateFolderRequest](docs/v2/Filesystem/models/CreateFolderRequest.md) | `from foundry_sdk.v2.filesystem.models import CreateFolderRequest` | -**Filesystem** | [CreateProjectFromTemplateRequest](docs/v2/Filesystem/models/CreateProjectFromTemplateRequest.md) | `from foundry_sdk.v2.filesystem.models import CreateProjectFromTemplateRequest` | -**Filesystem** | [CreateProjectRequest](docs/v2/Filesystem/models/CreateProjectRequest.md) | `from foundry_sdk.v2.filesystem.models import CreateProjectRequest` | -**Filesystem** | [CreateSpaceRequest](docs/v2/Filesystem/models/CreateSpaceRequest.md) | `from foundry_sdk.v2.filesystem.models import CreateSpaceRequest` | -**Filesystem** | [Everyone](docs/v2/Filesystem/models/Everyone.md) | `from foundry_sdk.v2.filesystem.models import Everyone` | -**Filesystem** | [FileSystemId](docs/v2/Filesystem/models/FileSystemId.md) | `from foundry_sdk.v2.filesystem.models import FileSystemId` | -**Filesystem** | [Folder](docs/v2/Filesystem/models/Folder.md) | `from foundry_sdk.v2.filesystem.models import Folder` | -**Filesystem** | [FolderRid](docs/v2/Filesystem/models/FolderRid.md) | `from foundry_sdk.v2.filesystem.models import FolderRid` | -**Filesystem** | [FolderType](docs/v2/Filesystem/models/FolderType.md) | `from foundry_sdk.v2.filesystem.models import FolderType` | -**Filesystem** | [GetByPathResourcesBatchRequestElement](docs/v2/Filesystem/models/GetByPathResourcesBatchRequestElement.md) | `from foundry_sdk.v2.filesystem.models import GetByPathResourcesBatchRequestElement` | -**Filesystem** | [GetByPathResourcesBatchResponse](docs/v2/Filesystem/models/GetByPathResourcesBatchResponse.md) | `from foundry_sdk.v2.filesystem.models import GetByPathResourcesBatchResponse` | -**Filesystem** | [GetFoldersBatchRequestElement](docs/v2/Filesystem/models/GetFoldersBatchRequestElement.md) | `from foundry_sdk.v2.filesystem.models import GetFoldersBatchRequestElement` | -**Filesystem** | [GetFoldersBatchResponse](docs/v2/Filesystem/models/GetFoldersBatchResponse.md) | `from foundry_sdk.v2.filesystem.models import GetFoldersBatchResponse` | -**Filesystem** | [GetResourcesBatchRequestElement](docs/v2/Filesystem/models/GetResourcesBatchRequestElement.md) | `from foundry_sdk.v2.filesystem.models import GetResourcesBatchRequestElement` | -**Filesystem** | [GetResourcesBatchResponse](docs/v2/Filesystem/models/GetResourcesBatchResponse.md) | `from foundry_sdk.v2.filesystem.models import GetResourcesBatchResponse` | -**Filesystem** | [IsDirectlyApplied](docs/v2/Filesystem/models/IsDirectlyApplied.md) | `from foundry_sdk.v2.filesystem.models import IsDirectlyApplied` | -**Filesystem** | [ListChildrenOfFolderResponse](docs/v2/Filesystem/models/ListChildrenOfFolderResponse.md) | `from foundry_sdk.v2.filesystem.models import ListChildrenOfFolderResponse` | -**Filesystem** | [ListMarkingsOfResourceResponse](docs/v2/Filesystem/models/ListMarkingsOfResourceResponse.md) | `from foundry_sdk.v2.filesystem.models import ListMarkingsOfResourceResponse` | -**Filesystem** | [ListOrganizationsOfProjectResponse](docs/v2/Filesystem/models/ListOrganizationsOfProjectResponse.md) | `from foundry_sdk.v2.filesystem.models import ListOrganizationsOfProjectResponse` | -**Filesystem** | [ListResourceRolesResponse](docs/v2/Filesystem/models/ListResourceRolesResponse.md) | `from foundry_sdk.v2.filesystem.models import ListResourceRolesResponse` | -**Filesystem** | [ListSpacesResponse](docs/v2/Filesystem/models/ListSpacesResponse.md) | `from foundry_sdk.v2.filesystem.models import ListSpacesResponse` | -**Filesystem** | [Marking](docs/v2/Filesystem/models/Marking.md) | `from foundry_sdk.v2.filesystem.models import Marking` | -**Filesystem** | [Organization](docs/v2/Filesystem/models/Organization.md) | `from foundry_sdk.v2.filesystem.models import Organization` | -**Filesystem** | [PrincipalIdOnly](docs/v2/Filesystem/models/PrincipalIdOnly.md) | `from foundry_sdk.v2.filesystem.models import PrincipalIdOnly` | -**Filesystem** | [PrincipalWithId](docs/v2/Filesystem/models/PrincipalWithId.md) | `from foundry_sdk.v2.filesystem.models import PrincipalWithId` | -**Filesystem** | [Project](docs/v2/Filesystem/models/Project.md) | `from foundry_sdk.v2.filesystem.models import Project` | -**Filesystem** | [ProjectRid](docs/v2/Filesystem/models/ProjectRid.md) | `from foundry_sdk.v2.filesystem.models import ProjectRid` | -**Filesystem** | [ProjectTemplateRid](docs/v2/Filesystem/models/ProjectTemplateRid.md) | `from foundry_sdk.v2.filesystem.models import ProjectTemplateRid` | -**Filesystem** | [ProjectTemplateVariableId](docs/v2/Filesystem/models/ProjectTemplateVariableId.md) | `from foundry_sdk.v2.filesystem.models import ProjectTemplateVariableId` | -**Filesystem** | [ProjectTemplateVariableValue](docs/v2/Filesystem/models/ProjectTemplateVariableValue.md) | `from foundry_sdk.v2.filesystem.models import ProjectTemplateVariableValue` | -**Filesystem** | [RemoveMarkingsRequest](docs/v2/Filesystem/models/RemoveMarkingsRequest.md) | `from foundry_sdk.v2.filesystem.models import RemoveMarkingsRequest` | -**Filesystem** | [RemoveOrganizationsRequest](docs/v2/Filesystem/models/RemoveOrganizationsRequest.md) | `from foundry_sdk.v2.filesystem.models import RemoveOrganizationsRequest` | -**Filesystem** | [RemoveResourceRolesRequest](docs/v2/Filesystem/models/RemoveResourceRolesRequest.md) | `from foundry_sdk.v2.filesystem.models import RemoveResourceRolesRequest` | -**Filesystem** | [ReplaceProjectRequest](docs/v2/Filesystem/models/ReplaceProjectRequest.md) | `from foundry_sdk.v2.filesystem.models import ReplaceProjectRequest` | -**Filesystem** | [ReplaceSpaceRequest](docs/v2/Filesystem/models/ReplaceSpaceRequest.md) | `from foundry_sdk.v2.filesystem.models import ReplaceSpaceRequest` | -**Filesystem** | [Resource](docs/v2/Filesystem/models/Resource.md) | `from foundry_sdk.v2.filesystem.models import Resource` | -**Filesystem** | [ResourceDisplayName](docs/v2/Filesystem/models/ResourceDisplayName.md) | `from foundry_sdk.v2.filesystem.models import ResourceDisplayName` | -**Filesystem** | [ResourcePath](docs/v2/Filesystem/models/ResourcePath.md) | `from foundry_sdk.v2.filesystem.models import ResourcePath` | -**Filesystem** | [ResourceRid](docs/v2/Filesystem/models/ResourceRid.md) | `from foundry_sdk.v2.filesystem.models import ResourceRid` | -**Filesystem** | [ResourceRole](docs/v2/Filesystem/models/ResourceRole.md) | `from foundry_sdk.v2.filesystem.models import ResourceRole` | -**Filesystem** | [ResourceRoleIdentifier](docs/v2/Filesystem/models/ResourceRoleIdentifier.md) | `from foundry_sdk.v2.filesystem.models import ResourceRoleIdentifier` | -**Filesystem** | [ResourceRolePrincipal](docs/v2/Filesystem/models/ResourceRolePrincipal.md) | `from foundry_sdk.v2.filesystem.models import ResourceRolePrincipal` | -**Filesystem** | [ResourceRolePrincipalIdentifier](docs/v2/Filesystem/models/ResourceRolePrincipalIdentifier.md) | `from foundry_sdk.v2.filesystem.models import ResourceRolePrincipalIdentifier` | -**Filesystem** | [ResourceType](docs/v2/Filesystem/models/ResourceType.md) | `from foundry_sdk.v2.filesystem.models import ResourceType` | -**Filesystem** | [Space](docs/v2/Filesystem/models/Space.md) | `from foundry_sdk.v2.filesystem.models import Space` | -**Filesystem** | [SpaceMavenIdentifier](docs/v2/Filesystem/models/SpaceMavenIdentifier.md) | `from foundry_sdk.v2.filesystem.models import SpaceMavenIdentifier` | -**Filesystem** | [SpaceRid](docs/v2/Filesystem/models/SpaceRid.md) | `from foundry_sdk.v2.filesystem.models import SpaceRid` | -**Filesystem** | [TrashStatus](docs/v2/Filesystem/models/TrashStatus.md) | `from foundry_sdk.v2.filesystem.models import TrashStatus` | -**Filesystem** | [UsageAccountRid](docs/v2/Filesystem/models/UsageAccountRid.md) | `from foundry_sdk.v2.filesystem.models import UsageAccountRid` | -**Functions** | [ArrayConstraint](docs/v2/Functions/models/ArrayConstraint.md) | `from foundry_sdk.v2.functions.models import ArrayConstraint` | -**Functions** | [DataValue](docs/v2/Functions/models/DataValue.md) | `from foundry_sdk.v2.functions.models import DataValue` | -**Functions** | [EnumConstraint](docs/v2/Functions/models/EnumConstraint.md) | `from foundry_sdk.v2.functions.models import EnumConstraint` | -**Functions** | [ExecuteQueryRequest](docs/v2/Functions/models/ExecuteQueryRequest.md) | `from foundry_sdk.v2.functions.models import ExecuteQueryRequest` | -**Functions** | [ExecuteQueryResponse](docs/v2/Functions/models/ExecuteQueryResponse.md) | `from foundry_sdk.v2.functions.models import ExecuteQueryResponse` | -**Functions** | [FunctionRid](docs/v2/Functions/models/FunctionRid.md) | `from foundry_sdk.v2.functions.models import FunctionRid` | -**Functions** | [FunctionVersion](docs/v2/Functions/models/FunctionVersion.md) | `from foundry_sdk.v2.functions.models import FunctionVersion` | -**Functions** | [GetByRidQueriesRequest](docs/v2/Functions/models/GetByRidQueriesRequest.md) | `from foundry_sdk.v2.functions.models import GetByRidQueriesRequest` | -**Functions** | [LengthConstraint](docs/v2/Functions/models/LengthConstraint.md) | `from foundry_sdk.v2.functions.models import LengthConstraint` | -**Functions** | [MapConstraint](docs/v2/Functions/models/MapConstraint.md) | `from foundry_sdk.v2.functions.models import MapConstraint` | -**Functions** | [NullableConstraint](docs/v2/Functions/models/NullableConstraint.md) | `from foundry_sdk.v2.functions.models import NullableConstraint` | -**Functions** | [NullableConstraintValue](docs/v2/Functions/models/NullableConstraintValue.md) | `from foundry_sdk.v2.functions.models import NullableConstraintValue` | -**Functions** | [Parameter](docs/v2/Functions/models/Parameter.md) | `from foundry_sdk.v2.functions.models import Parameter` | -**Functions** | [ParameterId](docs/v2/Functions/models/ParameterId.md) | `from foundry_sdk.v2.functions.models import ParameterId` | -**Functions** | [Query](docs/v2/Functions/models/Query.md) | `from foundry_sdk.v2.functions.models import Query` | -**Functions** | [QueryAggregationKeyType](docs/v2/Functions/models/QueryAggregationKeyType.md) | `from foundry_sdk.v2.functions.models import QueryAggregationKeyType` | -**Functions** | [QueryAggregationRangeSubType](docs/v2/Functions/models/QueryAggregationRangeSubType.md) | `from foundry_sdk.v2.functions.models import QueryAggregationRangeSubType` | -**Functions** | [QueryAggregationRangeType](docs/v2/Functions/models/QueryAggregationRangeType.md) | `from foundry_sdk.v2.functions.models import QueryAggregationRangeType` | -**Functions** | [QueryAggregationValueType](docs/v2/Functions/models/QueryAggregationValueType.md) | `from foundry_sdk.v2.functions.models import QueryAggregationValueType` | -**Functions** | [QueryApiName](docs/v2/Functions/models/QueryApiName.md) | `from foundry_sdk.v2.functions.models import QueryApiName` | -**Functions** | [QueryArrayType](docs/v2/Functions/models/QueryArrayType.md) | `from foundry_sdk.v2.functions.models import QueryArrayType` | -**Functions** | [QueryDataType](docs/v2/Functions/models/QueryDataType.md) | `from foundry_sdk.v2.functions.models import QueryDataType` | -**Functions** | [QueryRuntimeErrorParameter](docs/v2/Functions/models/QueryRuntimeErrorParameter.md) | `from foundry_sdk.v2.functions.models import QueryRuntimeErrorParameter` | -**Functions** | [QuerySetType](docs/v2/Functions/models/QuerySetType.md) | `from foundry_sdk.v2.functions.models import QuerySetType` | -**Functions** | [QueryStructField](docs/v2/Functions/models/QueryStructField.md) | `from foundry_sdk.v2.functions.models import QueryStructField` | -**Functions** | [QueryStructType](docs/v2/Functions/models/QueryStructType.md) | `from foundry_sdk.v2.functions.models import QueryStructType` | -**Functions** | [QueryUnionType](docs/v2/Functions/models/QueryUnionType.md) | `from foundry_sdk.v2.functions.models import QueryUnionType` | -**Functions** | [RangesConstraint](docs/v2/Functions/models/RangesConstraint.md) | `from foundry_sdk.v2.functions.models import RangesConstraint` | -**Functions** | [RegexConstraint](docs/v2/Functions/models/RegexConstraint.md) | `from foundry_sdk.v2.functions.models import RegexConstraint` | -**Functions** | [RidConstraint](docs/v2/Functions/models/RidConstraint.md) | `from foundry_sdk.v2.functions.models import RidConstraint` | -**Functions** | [StreamingExecuteQueryRequest](docs/v2/Functions/models/StreamingExecuteQueryRequest.md) | `from foundry_sdk.v2.functions.models import StreamingExecuteQueryRequest` | -**Functions** | [StructConstraint](docs/v2/Functions/models/StructConstraint.md) | `from foundry_sdk.v2.functions.models import StructConstraint` | -**Functions** | [StructFieldApiName](docs/v2/Functions/models/StructFieldApiName.md) | `from foundry_sdk.v2.functions.models import StructFieldApiName` | -**Functions** | [StructFieldName](docs/v2/Functions/models/StructFieldName.md) | `from foundry_sdk.v2.functions.models import StructFieldName` | -**Functions** | [StructV1Constraint](docs/v2/Functions/models/StructV1Constraint.md) | `from foundry_sdk.v2.functions.models import StructV1Constraint` | -**Functions** | [ThreeDimensionalAggregation](docs/v2/Functions/models/ThreeDimensionalAggregation.md) | `from foundry_sdk.v2.functions.models import ThreeDimensionalAggregation` | -**Functions** | [TransactionId](docs/v2/Functions/models/TransactionId.md) | `from foundry_sdk.v2.functions.models import TransactionId` | -**Functions** | [TwoDimensionalAggregation](docs/v2/Functions/models/TwoDimensionalAggregation.md) | `from foundry_sdk.v2.functions.models import TwoDimensionalAggregation` | -**Functions** | [UuidConstraint](docs/v2/Functions/models/UuidConstraint.md) | `from foundry_sdk.v2.functions.models import UuidConstraint` | -**Functions** | [ValueType](docs/v2/Functions/models/ValueType.md) | `from foundry_sdk.v2.functions.models import ValueType` | -**Functions** | [ValueTypeApiName](docs/v2/Functions/models/ValueTypeApiName.md) | `from foundry_sdk.v2.functions.models import ValueTypeApiName` | -**Functions** | [ValueTypeConstraint](docs/v2/Functions/models/ValueTypeConstraint.md) | `from foundry_sdk.v2.functions.models import ValueTypeConstraint` | -**Functions** | [ValueTypeDataType](docs/v2/Functions/models/ValueTypeDataType.md) | `from foundry_sdk.v2.functions.models import ValueTypeDataType` | -**Functions** | [ValueTypeDataTypeArrayType](docs/v2/Functions/models/ValueTypeDataTypeArrayType.md) | `from foundry_sdk.v2.functions.models import ValueTypeDataTypeArrayType` | -**Functions** | [ValueTypeDataTypeBinaryType](docs/v2/Functions/models/ValueTypeDataTypeBinaryType.md) | `from foundry_sdk.v2.functions.models import ValueTypeDataTypeBinaryType` | -**Functions** | [ValueTypeDataTypeBooleanType](docs/v2/Functions/models/ValueTypeDataTypeBooleanType.md) | `from foundry_sdk.v2.functions.models import ValueTypeDataTypeBooleanType` | -**Functions** | [ValueTypeDataTypeByteType](docs/v2/Functions/models/ValueTypeDataTypeByteType.md) | `from foundry_sdk.v2.functions.models import ValueTypeDataTypeByteType` | -**Functions** | [ValueTypeDataTypeDateType](docs/v2/Functions/models/ValueTypeDataTypeDateType.md) | `from foundry_sdk.v2.functions.models import ValueTypeDataTypeDateType` | -**Functions** | [ValueTypeDataTypeDecimalType](docs/v2/Functions/models/ValueTypeDataTypeDecimalType.md) | `from foundry_sdk.v2.functions.models import ValueTypeDataTypeDecimalType` | -**Functions** | [ValueTypeDataTypeDoubleType](docs/v2/Functions/models/ValueTypeDataTypeDoubleType.md) | `from foundry_sdk.v2.functions.models import ValueTypeDataTypeDoubleType` | -**Functions** | [ValueTypeDataTypeFloatType](docs/v2/Functions/models/ValueTypeDataTypeFloatType.md) | `from foundry_sdk.v2.functions.models import ValueTypeDataTypeFloatType` | -**Functions** | [ValueTypeDataTypeIntegerType](docs/v2/Functions/models/ValueTypeDataTypeIntegerType.md) | `from foundry_sdk.v2.functions.models import ValueTypeDataTypeIntegerType` | -**Functions** | [ValueTypeDataTypeLongType](docs/v2/Functions/models/ValueTypeDataTypeLongType.md) | `from foundry_sdk.v2.functions.models import ValueTypeDataTypeLongType` | -**Functions** | [ValueTypeDataTypeMapType](docs/v2/Functions/models/ValueTypeDataTypeMapType.md) | `from foundry_sdk.v2.functions.models import ValueTypeDataTypeMapType` | -**Functions** | [ValueTypeDataTypeOptionalType](docs/v2/Functions/models/ValueTypeDataTypeOptionalType.md) | `from foundry_sdk.v2.functions.models import ValueTypeDataTypeOptionalType` | -**Functions** | [ValueTypeDataTypeShortType](docs/v2/Functions/models/ValueTypeDataTypeShortType.md) | `from foundry_sdk.v2.functions.models import ValueTypeDataTypeShortType` | -**Functions** | [ValueTypeDataTypeStringType](docs/v2/Functions/models/ValueTypeDataTypeStringType.md) | `from foundry_sdk.v2.functions.models import ValueTypeDataTypeStringType` | -**Functions** | [ValueTypeDataTypeStructElement](docs/v2/Functions/models/ValueTypeDataTypeStructElement.md) | `from foundry_sdk.v2.functions.models import ValueTypeDataTypeStructElement` | -**Functions** | [ValueTypeDataTypeStructFieldIdentifier](docs/v2/Functions/models/ValueTypeDataTypeStructFieldIdentifier.md) | `from foundry_sdk.v2.functions.models import ValueTypeDataTypeStructFieldIdentifier` | -**Functions** | [ValueTypeDataTypeStructType](docs/v2/Functions/models/ValueTypeDataTypeStructType.md) | `from foundry_sdk.v2.functions.models import ValueTypeDataTypeStructType` | -**Functions** | [ValueTypeDataTypeTimestampType](docs/v2/Functions/models/ValueTypeDataTypeTimestampType.md) | `from foundry_sdk.v2.functions.models import ValueTypeDataTypeTimestampType` | -**Functions** | [ValueTypeDataTypeUnionType](docs/v2/Functions/models/ValueTypeDataTypeUnionType.md) | `from foundry_sdk.v2.functions.models import ValueTypeDataTypeUnionType` | -**Functions** | [ValueTypeDataTypeValueTypeReference](docs/v2/Functions/models/ValueTypeDataTypeValueTypeReference.md) | `from foundry_sdk.v2.functions.models import ValueTypeDataTypeValueTypeReference` | -**Functions** | [ValueTypeDescription](docs/v2/Functions/models/ValueTypeDescription.md) | `from foundry_sdk.v2.functions.models import ValueTypeDescription` | -**Functions** | [ValueTypeReference](docs/v2/Functions/models/ValueTypeReference.md) | `from foundry_sdk.v2.functions.models import ValueTypeReference` | -**Functions** | [ValueTypeRid](docs/v2/Functions/models/ValueTypeRid.md) | `from foundry_sdk.v2.functions.models import ValueTypeRid` | -**Functions** | [ValueTypeVersion](docs/v2/Functions/models/ValueTypeVersion.md) | `from foundry_sdk.v2.functions.models import ValueTypeVersion` | -**Functions** | [ValueTypeVersionId](docs/v2/Functions/models/ValueTypeVersionId.md) | `from foundry_sdk.v2.functions.models import ValueTypeVersionId` | -**Functions** | [VersionId](docs/v2/Functions/models/VersionId.md) | `from foundry_sdk.v2.functions.models import VersionId` | -**Geo** | [BBox](docs/v2/Geo/models/BBox.md) | `from foundry_sdk.v2.geo.models import BBox` | -**Geo** | [Coordinate](docs/v2/Geo/models/Coordinate.md) | `from foundry_sdk.v2.geo.models import Coordinate` | -**Geo** | [Feature](docs/v2/Geo/models/Feature.md) | `from foundry_sdk.v2.geo.models import Feature` | -**Geo** | [FeatureCollection](docs/v2/Geo/models/FeatureCollection.md) | `from foundry_sdk.v2.geo.models import FeatureCollection` | -**Geo** | [FeatureCollectionTypes](docs/v2/Geo/models/FeatureCollectionTypes.md) | `from foundry_sdk.v2.geo.models import FeatureCollectionTypes` | -**Geo** | [FeaturePropertyKey](docs/v2/Geo/models/FeaturePropertyKey.md) | `from foundry_sdk.v2.geo.models import FeaturePropertyKey` | -**Geo** | [Geometry](docs/v2/Geo/models/Geometry.md) | `from foundry_sdk.v2.geo.models import Geometry` | -**Geo** | [GeometryCollection](docs/v2/Geo/models/GeometryCollection.md) | `from foundry_sdk.v2.geo.models import GeometryCollection` | -**Geo** | [GeoPoint](docs/v2/Geo/models/GeoPoint.md) | `from foundry_sdk.v2.geo.models import GeoPoint` | -**Geo** | [LinearRing](docs/v2/Geo/models/LinearRing.md) | `from foundry_sdk.v2.geo.models import LinearRing` | -**Geo** | [LineString](docs/v2/Geo/models/LineString.md) | `from foundry_sdk.v2.geo.models import LineString` | -**Geo** | [LineStringCoordinates](docs/v2/Geo/models/LineStringCoordinates.md) | `from foundry_sdk.v2.geo.models import LineStringCoordinates` | -**Geo** | [MultiLineString](docs/v2/Geo/models/MultiLineString.md) | `from foundry_sdk.v2.geo.models import MultiLineString` | -**Geo** | [MultiPoint](docs/v2/Geo/models/MultiPoint.md) | `from foundry_sdk.v2.geo.models import MultiPoint` | -**Geo** | [MultiPolygon](docs/v2/Geo/models/MultiPolygon.md) | `from foundry_sdk.v2.geo.models import MultiPolygon` | -**Geo** | [Polygon](docs/v2/Geo/models/Polygon.md) | `from foundry_sdk.v2.geo.models import Polygon` | -**Geo** | [Position](docs/v2/Geo/models/Position.md) | `from foundry_sdk.v2.geo.models import Position` | -**LanguageModels** | [AnthropicAnyToolChoice](docs/v2/LanguageModels/models/AnthropicAnyToolChoice.md) | `from foundry_sdk.v2.language_models.models import AnthropicAnyToolChoice` | -**LanguageModels** | [AnthropicAutoToolChoice](docs/v2/LanguageModels/models/AnthropicAutoToolChoice.md) | `from foundry_sdk.v2.language_models.models import AnthropicAutoToolChoice` | -**LanguageModels** | [AnthropicBase64PdfDocumentSource](docs/v2/LanguageModels/models/AnthropicBase64PdfDocumentSource.md) | `from foundry_sdk.v2.language_models.models import AnthropicBase64PdfDocumentSource` | -**LanguageModels** | [AnthropicCacheControl](docs/v2/LanguageModels/models/AnthropicCacheControl.md) | `from foundry_sdk.v2.language_models.models import AnthropicCacheControl` | -**LanguageModels** | [AnthropicCharacterLocationCitation](docs/v2/LanguageModels/models/AnthropicCharacterLocationCitation.md) | `from foundry_sdk.v2.language_models.models import AnthropicCharacterLocationCitation` | -**LanguageModels** | [AnthropicCompletionCitation](docs/v2/LanguageModels/models/AnthropicCompletionCitation.md) | `from foundry_sdk.v2.language_models.models import AnthropicCompletionCitation` | -**LanguageModels** | [AnthropicCompletionContent](docs/v2/LanguageModels/models/AnthropicCompletionContent.md) | `from foundry_sdk.v2.language_models.models import AnthropicCompletionContent` | -**LanguageModels** | [AnthropicCompletionRedactedThinking](docs/v2/LanguageModels/models/AnthropicCompletionRedactedThinking.md) | `from foundry_sdk.v2.language_models.models import AnthropicCompletionRedactedThinking` | -**LanguageModels** | [AnthropicCompletionText](docs/v2/LanguageModels/models/AnthropicCompletionText.md) | `from foundry_sdk.v2.language_models.models import AnthropicCompletionText` | -**LanguageModels** | [AnthropicCompletionThinking](docs/v2/LanguageModels/models/AnthropicCompletionThinking.md) | `from foundry_sdk.v2.language_models.models import AnthropicCompletionThinking` | -**LanguageModels** | [AnthropicCompletionToolUse](docs/v2/LanguageModels/models/AnthropicCompletionToolUse.md) | `from foundry_sdk.v2.language_models.models import AnthropicCompletionToolUse` | -**LanguageModels** | [AnthropicCustomTool](docs/v2/LanguageModels/models/AnthropicCustomTool.md) | `from foundry_sdk.v2.language_models.models import AnthropicCustomTool` | -**LanguageModels** | [AnthropicDisabledThinking](docs/v2/LanguageModels/models/AnthropicDisabledThinking.md) | `from foundry_sdk.v2.language_models.models import AnthropicDisabledThinking` | -**LanguageModels** | [AnthropicDisableParallelToolUse](docs/v2/LanguageModels/models/AnthropicDisableParallelToolUse.md) | `from foundry_sdk.v2.language_models.models import AnthropicDisableParallelToolUse` | -**LanguageModels** | [AnthropicDocument](docs/v2/LanguageModels/models/AnthropicDocument.md) | `from foundry_sdk.v2.language_models.models import AnthropicDocument` | -**LanguageModels** | [AnthropicDocumentCitations](docs/v2/LanguageModels/models/AnthropicDocumentCitations.md) | `from foundry_sdk.v2.language_models.models import AnthropicDocumentCitations` | -**LanguageModels** | [AnthropicDocumentSource](docs/v2/LanguageModels/models/AnthropicDocumentSource.md) | `from foundry_sdk.v2.language_models.models import AnthropicDocumentSource` | -**LanguageModels** | [AnthropicEnabledThinking](docs/v2/LanguageModels/models/AnthropicEnabledThinking.md) | `from foundry_sdk.v2.language_models.models import AnthropicEnabledThinking` | -**LanguageModels** | [AnthropicEphemeralCacheControl](docs/v2/LanguageModels/models/AnthropicEphemeralCacheControl.md) | `from foundry_sdk.v2.language_models.models import AnthropicEphemeralCacheControl` | -**LanguageModels** | [AnthropicImage](docs/v2/LanguageModels/models/AnthropicImage.md) | `from foundry_sdk.v2.language_models.models import AnthropicImage` | -**LanguageModels** | [AnthropicImageBase64Source](docs/v2/LanguageModels/models/AnthropicImageBase64Source.md) | `from foundry_sdk.v2.language_models.models import AnthropicImageBase64Source` | -**LanguageModels** | [AnthropicImageSource](docs/v2/LanguageModels/models/AnthropicImageSource.md) | `from foundry_sdk.v2.language_models.models import AnthropicImageSource` | -**LanguageModels** | [AnthropicMediaType](docs/v2/LanguageModels/models/AnthropicMediaType.md) | `from foundry_sdk.v2.language_models.models import AnthropicMediaType` | -**LanguageModels** | [AnthropicMessage](docs/v2/LanguageModels/models/AnthropicMessage.md) | `from foundry_sdk.v2.language_models.models import AnthropicMessage` | -**LanguageModels** | [AnthropicMessageContent](docs/v2/LanguageModels/models/AnthropicMessageContent.md) | `from foundry_sdk.v2.language_models.models import AnthropicMessageContent` | -**LanguageModels** | [AnthropicMessageRole](docs/v2/LanguageModels/models/AnthropicMessageRole.md) | `from foundry_sdk.v2.language_models.models import AnthropicMessageRole` | -**LanguageModels** | [AnthropicMessagesRequest](docs/v2/LanguageModels/models/AnthropicMessagesRequest.md) | `from foundry_sdk.v2.language_models.models import AnthropicMessagesRequest` | -**LanguageModels** | [AnthropicMessagesResponse](docs/v2/LanguageModels/models/AnthropicMessagesResponse.md) | `from foundry_sdk.v2.language_models.models import AnthropicMessagesResponse` | -**LanguageModels** | [AnthropicNoneToolChoice](docs/v2/LanguageModels/models/AnthropicNoneToolChoice.md) | `from foundry_sdk.v2.language_models.models import AnthropicNoneToolChoice` | -**LanguageModels** | [AnthropicRedactedThinking](docs/v2/LanguageModels/models/AnthropicRedactedThinking.md) | `from foundry_sdk.v2.language_models.models import AnthropicRedactedThinking` | -**LanguageModels** | [AnthropicSystemMessage](docs/v2/LanguageModels/models/AnthropicSystemMessage.md) | `from foundry_sdk.v2.language_models.models import AnthropicSystemMessage` | -**LanguageModels** | [AnthropicText](docs/v2/LanguageModels/models/AnthropicText.md) | `from foundry_sdk.v2.language_models.models import AnthropicText` | -**LanguageModels** | [AnthropicTextDocumentSource](docs/v2/LanguageModels/models/AnthropicTextDocumentSource.md) | `from foundry_sdk.v2.language_models.models import AnthropicTextDocumentSource` | -**LanguageModels** | [AnthropicThinking](docs/v2/LanguageModels/models/AnthropicThinking.md) | `from foundry_sdk.v2.language_models.models import AnthropicThinking` | -**LanguageModels** | [AnthropicThinkingConfig](docs/v2/LanguageModels/models/AnthropicThinkingConfig.md) | `from foundry_sdk.v2.language_models.models import AnthropicThinkingConfig` | -**LanguageModels** | [AnthropicTokenUsage](docs/v2/LanguageModels/models/AnthropicTokenUsage.md) | `from foundry_sdk.v2.language_models.models import AnthropicTokenUsage` | -**LanguageModels** | [AnthropicTool](docs/v2/LanguageModels/models/AnthropicTool.md) | `from foundry_sdk.v2.language_models.models import AnthropicTool` | -**LanguageModels** | [AnthropicToolChoice](docs/v2/LanguageModels/models/AnthropicToolChoice.md) | `from foundry_sdk.v2.language_models.models import AnthropicToolChoice` | -**LanguageModels** | [AnthropicToolResult](docs/v2/LanguageModels/models/AnthropicToolResult.md) | `from foundry_sdk.v2.language_models.models import AnthropicToolResult` | -**LanguageModels** | [AnthropicToolResultContent](docs/v2/LanguageModels/models/AnthropicToolResultContent.md) | `from foundry_sdk.v2.language_models.models import AnthropicToolResultContent` | -**LanguageModels** | [AnthropicToolToolChoice](docs/v2/LanguageModels/models/AnthropicToolToolChoice.md) | `from foundry_sdk.v2.language_models.models import AnthropicToolToolChoice` | -**LanguageModels** | [AnthropicToolUse](docs/v2/LanguageModels/models/AnthropicToolUse.md) | `from foundry_sdk.v2.language_models.models import AnthropicToolUse` | -**LanguageModels** | [JsonSchema](docs/v2/LanguageModels/models/JsonSchema.md) | `from foundry_sdk.v2.language_models.models import JsonSchema` | -**LanguageModels** | [LanguageModelApiName](docs/v2/LanguageModels/models/LanguageModelApiName.md) | `from foundry_sdk.v2.language_models.models import LanguageModelApiName` | -**LanguageModels** | [OpenAiEmbeddingInput](docs/v2/LanguageModels/models/OpenAiEmbeddingInput.md) | `from foundry_sdk.v2.language_models.models import OpenAiEmbeddingInput` | -**LanguageModels** | [OpenAiEmbeddingsRequest](docs/v2/LanguageModels/models/OpenAiEmbeddingsRequest.md) | `from foundry_sdk.v2.language_models.models import OpenAiEmbeddingsRequest` | -**LanguageModels** | [OpenAiEmbeddingsResponse](docs/v2/LanguageModels/models/OpenAiEmbeddingsResponse.md) | `from foundry_sdk.v2.language_models.models import OpenAiEmbeddingsResponse` | -**LanguageModels** | [OpenAiEmbeddingTokenUsage](docs/v2/LanguageModels/models/OpenAiEmbeddingTokenUsage.md) | `from foundry_sdk.v2.language_models.models import OpenAiEmbeddingTokenUsage` | -**LanguageModels** | [OpenAiEncodingFormat](docs/v2/LanguageModels/models/OpenAiEncodingFormat.md) | `from foundry_sdk.v2.language_models.models import OpenAiEncodingFormat` | -**MediaSets** | [BranchName](docs/v2/MediaSets/models/BranchName.md) | `from foundry_sdk.v2.media_sets.models import BranchName` | -**MediaSets** | [BranchRid](docs/v2/MediaSets/models/BranchRid.md) | `from foundry_sdk.v2.media_sets.models import BranchRid` | -**MediaSets** | [GetMediaItemInfoResponse](docs/v2/MediaSets/models/GetMediaItemInfoResponse.md) | `from foundry_sdk.v2.media_sets.models import GetMediaItemInfoResponse` | -**MediaSets** | [GetMediaItemRidByPathResponse](docs/v2/MediaSets/models/GetMediaItemRidByPathResponse.md) | `from foundry_sdk.v2.media_sets.models import GetMediaItemRidByPathResponse` | -**MediaSets** | [LogicalTimestamp](docs/v2/MediaSets/models/LogicalTimestamp.md) | `from foundry_sdk.v2.media_sets.models import LogicalTimestamp` | -**MediaSets** | [MediaAttribution](docs/v2/MediaSets/models/MediaAttribution.md) | `from foundry_sdk.v2.media_sets.models import MediaAttribution` | -**MediaSets** | [MediaItemXmlFormat](docs/v2/MediaSets/models/MediaItemXmlFormat.md) | `from foundry_sdk.v2.media_sets.models import MediaItemXmlFormat` | -**MediaSets** | [PutMediaItemResponse](docs/v2/MediaSets/models/PutMediaItemResponse.md) | `from foundry_sdk.v2.media_sets.models import PutMediaItemResponse` | -**MediaSets** | [TrackedTransformationFailedResponse](docs/v2/MediaSets/models/TrackedTransformationFailedResponse.md) | `from foundry_sdk.v2.media_sets.models import TrackedTransformationFailedResponse` | -**MediaSets** | [TrackedTransformationPendingResponse](docs/v2/MediaSets/models/TrackedTransformationPendingResponse.md) | `from foundry_sdk.v2.media_sets.models import TrackedTransformationPendingResponse` | -**MediaSets** | [TrackedTransformationResponse](docs/v2/MediaSets/models/TrackedTransformationResponse.md) | `from foundry_sdk.v2.media_sets.models import TrackedTransformationResponse` | -**MediaSets** | [TrackedTransformationSuccessfulResponse](docs/v2/MediaSets/models/TrackedTransformationSuccessfulResponse.md) | `from foundry_sdk.v2.media_sets.models import TrackedTransformationSuccessfulResponse` | -**MediaSets** | [TransactionId](docs/v2/MediaSets/models/TransactionId.md) | `from foundry_sdk.v2.media_sets.models import TransactionId` | -**Models** | [CreateModelRequest](docs/v2/Models/models/CreateModelRequest.md) | `from foundry_sdk.v2.models.models import CreateModelRequest` | -**Models** | [CreateModelVersionRequest](docs/v2/Models/models/CreateModelVersionRequest.md) | `from foundry_sdk.v2.models.models import CreateModelVersionRequest` | -**Models** | [DillModelFiles](docs/v2/Models/models/DillModelFiles.md) | `from foundry_sdk.v2.models.models import DillModelFiles` | -**Models** | [ListModelVersionsResponse](docs/v2/Models/models/ListModelVersionsResponse.md) | `from foundry_sdk.v2.models.models import ListModelVersionsResponse` | -**Models** | [Model](docs/v2/Models/models/Model.md) | `from foundry_sdk.v2.models.models import Model` | -**Models** | [ModelApi](docs/v2/Models/models/ModelApi.md) | `from foundry_sdk.v2.models.models import ModelApi` | -**Models** | [ModelApiAnyType](docs/v2/Models/models/ModelApiAnyType.md) | `from foundry_sdk.v2.models.models import ModelApiAnyType` | -**Models** | [ModelApiArrayType](docs/v2/Models/models/ModelApiArrayType.md) | `from foundry_sdk.v2.models.models import ModelApiArrayType` | -**Models** | [ModelApiColumn](docs/v2/Models/models/ModelApiColumn.md) | `from foundry_sdk.v2.models.models import ModelApiColumn` | -**Models** | [ModelApiDataType](docs/v2/Models/models/ModelApiDataType.md) | `from foundry_sdk.v2.models.models import ModelApiDataType` | -**Models** | [ModelApiInput](docs/v2/Models/models/ModelApiInput.md) | `from foundry_sdk.v2.models.models import ModelApiInput` | -**Models** | [ModelApiMapType](docs/v2/Models/models/ModelApiMapType.md) | `from foundry_sdk.v2.models.models import ModelApiMapType` | -**Models** | [ModelApiOutput](docs/v2/Models/models/ModelApiOutput.md) | `from foundry_sdk.v2.models.models import ModelApiOutput` | -**Models** | [ModelApiParameterType](docs/v2/Models/models/ModelApiParameterType.md) | `from foundry_sdk.v2.models.models import ModelApiParameterType` | -**Models** | [ModelApiTabularFormat](docs/v2/Models/models/ModelApiTabularFormat.md) | `from foundry_sdk.v2.models.models import ModelApiTabularFormat` | -**Models** | [ModelApiTabularType](docs/v2/Models/models/ModelApiTabularType.md) | `from foundry_sdk.v2.models.models import ModelApiTabularType` | -**Models** | [ModelFiles](docs/v2/Models/models/ModelFiles.md) | `from foundry_sdk.v2.models.models import ModelFiles` | -**Models** | [ModelName](docs/v2/Models/models/ModelName.md) | `from foundry_sdk.v2.models.models import ModelName` | -**Models** | [ModelRid](docs/v2/Models/models/ModelRid.md) | `from foundry_sdk.v2.models.models import ModelRid` | -**Models** | [ModelVersion](docs/v2/Models/models/ModelVersion.md) | `from foundry_sdk.v2.models.models import ModelVersion` | -**Models** | [ModelVersionRid](docs/v2/Models/models/ModelVersionRid.md) | `from foundry_sdk.v2.models.models import ModelVersionRid` | -**Ontologies** | [AbsoluteTimeRange](docs/v2/Ontologies/models/AbsoluteTimeRange.md) | `from foundry_sdk.v2.ontologies.models import AbsoluteTimeRange` | -**Ontologies** | [AbsoluteValuePropertyExpression](docs/v2/Ontologies/models/AbsoluteValuePropertyExpression.md) | `from foundry_sdk.v2.ontologies.models import AbsoluteValuePropertyExpression` | -**Ontologies** | [ActionExecutionTime](docs/v2/Ontologies/models/ActionExecutionTime.md) | `from foundry_sdk.v2.ontologies.models import ActionExecutionTime` | -**Ontologies** | [ActionLogicRule](docs/v2/Ontologies/models/ActionLogicRule.md) | `from foundry_sdk.v2.ontologies.models import ActionLogicRule` | -**Ontologies** | [ActionParameterArrayType](docs/v2/Ontologies/models/ActionParameterArrayType.md) | `from foundry_sdk.v2.ontologies.models import ActionParameterArrayType` | -**Ontologies** | [ActionParameterType](docs/v2/Ontologies/models/ActionParameterType.md) | `from foundry_sdk.v2.ontologies.models import ActionParameterType` | -**Ontologies** | [ActionParameterV2](docs/v2/Ontologies/models/ActionParameterV2.md) | `from foundry_sdk.v2.ontologies.models import ActionParameterV2` | -**Ontologies** | [ActionResults](docs/v2/Ontologies/models/ActionResults.md) | `from foundry_sdk.v2.ontologies.models import ActionResults` | -**Ontologies** | [ActionRid](docs/v2/Ontologies/models/ActionRid.md) | `from foundry_sdk.v2.ontologies.models import ActionRid` | -**Ontologies** | [ActionTypeApiName](docs/v2/Ontologies/models/ActionTypeApiName.md) | `from foundry_sdk.v2.ontologies.models import ActionTypeApiName` | -**Ontologies** | [ActionTypeFullMetadata](docs/v2/Ontologies/models/ActionTypeFullMetadata.md) | `from foundry_sdk.v2.ontologies.models import ActionTypeFullMetadata` | -**Ontologies** | [ActionTypeRid](docs/v2/Ontologies/models/ActionTypeRid.md) | `from foundry_sdk.v2.ontologies.models import ActionTypeRid` | -**Ontologies** | [ActionTypeV2](docs/v2/Ontologies/models/ActionTypeV2.md) | `from foundry_sdk.v2.ontologies.models import ActionTypeV2` | -**Ontologies** | [ActivePropertyTypeStatus](docs/v2/Ontologies/models/ActivePropertyTypeStatus.md) | `from foundry_sdk.v2.ontologies.models import ActivePropertyTypeStatus` | -**Ontologies** | [AddLink](docs/v2/Ontologies/models/AddLink.md) | `from foundry_sdk.v2.ontologies.models import AddLink` | -**Ontologies** | [AddLinkEdit](docs/v2/Ontologies/models/AddLinkEdit.md) | `from foundry_sdk.v2.ontologies.models import AddLinkEdit` | -**Ontologies** | [AddObject](docs/v2/Ontologies/models/AddObject.md) | `from foundry_sdk.v2.ontologies.models import AddObject` | -**Ontologies** | [AddObjectEdit](docs/v2/Ontologies/models/AddObjectEdit.md) | `from foundry_sdk.v2.ontologies.models import AddObjectEdit` | -**Ontologies** | [AddPropertyExpression](docs/v2/Ontologies/models/AddPropertyExpression.md) | `from foundry_sdk.v2.ontologies.models import AddPropertyExpression` | -**Ontologies** | [Affix](docs/v2/Ontologies/models/Affix.md) | `from foundry_sdk.v2.ontologies.models import Affix` | -**Ontologies** | [AggregateObjectSetRequestV2](docs/v2/Ontologies/models/AggregateObjectSetRequestV2.md) | `from foundry_sdk.v2.ontologies.models import AggregateObjectSetRequestV2` | -**Ontologies** | [AggregateObjectsRequestV2](docs/v2/Ontologies/models/AggregateObjectsRequestV2.md) | `from foundry_sdk.v2.ontologies.models import AggregateObjectsRequestV2` | -**Ontologies** | [AggregateObjectsResponseItemV2](docs/v2/Ontologies/models/AggregateObjectsResponseItemV2.md) | `from foundry_sdk.v2.ontologies.models import AggregateObjectsResponseItemV2` | -**Ontologies** | [AggregateObjectsResponseV2](docs/v2/Ontologies/models/AggregateObjectsResponseV2.md) | `from foundry_sdk.v2.ontologies.models import AggregateObjectsResponseV2` | -**Ontologies** | [AggregateTimeSeries](docs/v2/Ontologies/models/AggregateTimeSeries.md) | `from foundry_sdk.v2.ontologies.models import AggregateTimeSeries` | -**Ontologies** | [AggregationAccuracy](docs/v2/Ontologies/models/AggregationAccuracy.md) | `from foundry_sdk.v2.ontologies.models import AggregationAccuracy` | -**Ontologies** | [AggregationAccuracyRequest](docs/v2/Ontologies/models/AggregationAccuracyRequest.md) | `from foundry_sdk.v2.ontologies.models import AggregationAccuracyRequest` | -**Ontologies** | [AggregationDurationGroupingV2](docs/v2/Ontologies/models/AggregationDurationGroupingV2.md) | `from foundry_sdk.v2.ontologies.models import AggregationDurationGroupingV2` | -**Ontologies** | [AggregationExactGroupingV2](docs/v2/Ontologies/models/AggregationExactGroupingV2.md) | `from foundry_sdk.v2.ontologies.models import AggregationExactGroupingV2` | -**Ontologies** | [AggregationFixedWidthGroupingV2](docs/v2/Ontologies/models/AggregationFixedWidthGroupingV2.md) | `from foundry_sdk.v2.ontologies.models import AggregationFixedWidthGroupingV2` | -**Ontologies** | [AggregationGroupByV2](docs/v2/Ontologies/models/AggregationGroupByV2.md) | `from foundry_sdk.v2.ontologies.models import AggregationGroupByV2` | -**Ontologies** | [AggregationGroupKeyV2](docs/v2/Ontologies/models/AggregationGroupKeyV2.md) | `from foundry_sdk.v2.ontologies.models import AggregationGroupKeyV2` | -**Ontologies** | [AggregationGroupValueV2](docs/v2/Ontologies/models/AggregationGroupValueV2.md) | `from foundry_sdk.v2.ontologies.models import AggregationGroupValueV2` | -**Ontologies** | [AggregationMetricName](docs/v2/Ontologies/models/AggregationMetricName.md) | `from foundry_sdk.v2.ontologies.models import AggregationMetricName` | -**Ontologies** | [AggregationMetricResultV2](docs/v2/Ontologies/models/AggregationMetricResultV2.md) | `from foundry_sdk.v2.ontologies.models import AggregationMetricResultV2` | -**Ontologies** | [AggregationRangesGroupingV2](docs/v2/Ontologies/models/AggregationRangesGroupingV2.md) | `from foundry_sdk.v2.ontologies.models import AggregationRangesGroupingV2` | -**Ontologies** | [AggregationRangeV2](docs/v2/Ontologies/models/AggregationRangeV2.md) | `from foundry_sdk.v2.ontologies.models import AggregationRangeV2` | -**Ontologies** | [AggregationV2](docs/v2/Ontologies/models/AggregationV2.md) | `from foundry_sdk.v2.ontologies.models import AggregationV2` | -**Ontologies** | [AllOfRule](docs/v2/Ontologies/models/AllOfRule.md) | `from foundry_sdk.v2.ontologies.models import AllOfRule` | -**Ontologies** | [AndQueryV2](docs/v2/Ontologies/models/AndQueryV2.md) | `from foundry_sdk.v2.ontologies.models import AndQueryV2` | -**Ontologies** | [AnyOfRule](docs/v2/Ontologies/models/AnyOfRule.md) | `from foundry_sdk.v2.ontologies.models import AnyOfRule` | -**Ontologies** | [ApplyActionMode](docs/v2/Ontologies/models/ApplyActionMode.md) | `from foundry_sdk.v2.ontologies.models import ApplyActionMode` | -**Ontologies** | [ApplyActionOverrides](docs/v2/Ontologies/models/ApplyActionOverrides.md) | `from foundry_sdk.v2.ontologies.models import ApplyActionOverrides` | -**Ontologies** | [ApplyActionRequestOptions](docs/v2/Ontologies/models/ApplyActionRequestOptions.md) | `from foundry_sdk.v2.ontologies.models import ApplyActionRequestOptions` | -**Ontologies** | [ApplyActionRequestV2](docs/v2/Ontologies/models/ApplyActionRequestV2.md) | `from foundry_sdk.v2.ontologies.models import ApplyActionRequestV2` | -**Ontologies** | [ApplyActionWithOverridesRequest](docs/v2/Ontologies/models/ApplyActionWithOverridesRequest.md) | `from foundry_sdk.v2.ontologies.models import ApplyActionWithOverridesRequest` | -**Ontologies** | [ApplyReducersAndExtractMainValueLoadLevel](docs/v2/Ontologies/models/ApplyReducersAndExtractMainValueLoadLevel.md) | `from foundry_sdk.v2.ontologies.models import ApplyReducersAndExtractMainValueLoadLevel` | -**Ontologies** | [ApplyReducersLoadLevel](docs/v2/Ontologies/models/ApplyReducersLoadLevel.md) | `from foundry_sdk.v2.ontologies.models import ApplyReducersLoadLevel` | -**Ontologies** | [ApproximateDistinctAggregationV2](docs/v2/Ontologies/models/ApproximateDistinctAggregationV2.md) | `from foundry_sdk.v2.ontologies.models import ApproximateDistinctAggregationV2` | -**Ontologies** | [ApproximatePercentileAggregationV2](docs/v2/Ontologies/models/ApproximatePercentileAggregationV2.md) | `from foundry_sdk.v2.ontologies.models import ApproximatePercentileAggregationV2` | -**Ontologies** | [ArrayConstraint](docs/v2/Ontologies/models/ArrayConstraint.md) | `from foundry_sdk.v2.ontologies.models import ArrayConstraint` | -**Ontologies** | [ArrayEntryEvaluatedConstraint](docs/v2/Ontologies/models/ArrayEntryEvaluatedConstraint.md) | `from foundry_sdk.v2.ontologies.models import ArrayEntryEvaluatedConstraint` | -**Ontologies** | [ArrayEvaluatedConstraint](docs/v2/Ontologies/models/ArrayEvaluatedConstraint.md) | `from foundry_sdk.v2.ontologies.models import ArrayEvaluatedConstraint` | -**Ontologies** | [ArraySizeConstraint](docs/v2/Ontologies/models/ArraySizeConstraint.md) | `from foundry_sdk.v2.ontologies.models import ArraySizeConstraint` | -**Ontologies** | [ArtifactRepositoryRid](docs/v2/Ontologies/models/ArtifactRepositoryRid.md) | `from foundry_sdk.v2.ontologies.models import ArtifactRepositoryRid` | -**Ontologies** | [AttachmentMetadataResponse](docs/v2/Ontologies/models/AttachmentMetadataResponse.md) | `from foundry_sdk.v2.ontologies.models import AttachmentMetadataResponse` | -**Ontologies** | [AttachmentRid](docs/v2/Ontologies/models/AttachmentRid.md) | `from foundry_sdk.v2.ontologies.models import AttachmentRid` | -**Ontologies** | [AttachmentV2](docs/v2/Ontologies/models/AttachmentV2.md) | `from foundry_sdk.v2.ontologies.models import AttachmentV2` | -**Ontologies** | [AvgAggregationV2](docs/v2/Ontologies/models/AvgAggregationV2.md) | `from foundry_sdk.v2.ontologies.models import AvgAggregationV2` | -**Ontologies** | [BatchActionObjectEdit](docs/v2/Ontologies/models/BatchActionObjectEdit.md) | `from foundry_sdk.v2.ontologies.models import BatchActionObjectEdit` | -**Ontologies** | [BatchActionObjectEdits](docs/v2/Ontologies/models/BatchActionObjectEdits.md) | `from foundry_sdk.v2.ontologies.models import BatchActionObjectEdits` | -**Ontologies** | [BatchActionResults](docs/v2/Ontologies/models/BatchActionResults.md) | `from foundry_sdk.v2.ontologies.models import BatchActionResults` | -**Ontologies** | [BatchApplyActionRequestItem](docs/v2/Ontologies/models/BatchApplyActionRequestItem.md) | `from foundry_sdk.v2.ontologies.models import BatchApplyActionRequestItem` | -**Ontologies** | [BatchApplyActionRequestOptions](docs/v2/Ontologies/models/BatchApplyActionRequestOptions.md) | `from foundry_sdk.v2.ontologies.models import BatchApplyActionRequestOptions` | -**Ontologies** | [BatchApplyActionRequestV2](docs/v2/Ontologies/models/BatchApplyActionRequestV2.md) | `from foundry_sdk.v2.ontologies.models import BatchApplyActionRequestV2` | -**Ontologies** | [BatchApplyActionResponseV2](docs/v2/Ontologies/models/BatchApplyActionResponseV2.md) | `from foundry_sdk.v2.ontologies.models import BatchApplyActionResponseV2` | -**Ontologies** | [BatchedFunctionLogicRule](docs/v2/Ontologies/models/BatchedFunctionLogicRule.md) | `from foundry_sdk.v2.ontologies.models import BatchedFunctionLogicRule` | -**Ontologies** | [BatchReturnEditsMode](docs/v2/Ontologies/models/BatchReturnEditsMode.md) | `from foundry_sdk.v2.ontologies.models import BatchReturnEditsMode` | -**Ontologies** | [BlueprintIcon](docs/v2/Ontologies/models/BlueprintIcon.md) | `from foundry_sdk.v2.ontologies.models import BlueprintIcon` | -**Ontologies** | [BoundingBoxValue](docs/v2/Ontologies/models/BoundingBoxValue.md) | `from foundry_sdk.v2.ontologies.models import BoundingBoxValue` | -**Ontologies** | [CenterPoint](docs/v2/Ontologies/models/CenterPoint.md) | `from foundry_sdk.v2.ontologies.models import CenterPoint` | -**Ontologies** | [CenterPointTypes](docs/v2/Ontologies/models/CenterPointTypes.md) | `from foundry_sdk.v2.ontologies.models import CenterPointTypes` | -**Ontologies** | [ContainsAllTermsInOrderPrefixLastTerm](docs/v2/Ontologies/models/ContainsAllTermsInOrderPrefixLastTerm.md) | `from foundry_sdk.v2.ontologies.models import ContainsAllTermsInOrderPrefixLastTerm` | -**Ontologies** | [ContainsAllTermsInOrderQuery](docs/v2/Ontologies/models/ContainsAllTermsInOrderQuery.md) | `from foundry_sdk.v2.ontologies.models import ContainsAllTermsInOrderQuery` | -**Ontologies** | [ContainsAllTermsQuery](docs/v2/Ontologies/models/ContainsAllTermsQuery.md) | `from foundry_sdk.v2.ontologies.models import ContainsAllTermsQuery` | -**Ontologies** | [ContainsAnyTermQuery](docs/v2/Ontologies/models/ContainsAnyTermQuery.md) | `from foundry_sdk.v2.ontologies.models import ContainsAnyTermQuery` | -**Ontologies** | [ContainsQueryV2](docs/v2/Ontologies/models/ContainsQueryV2.md) | `from foundry_sdk.v2.ontologies.models import ContainsQueryV2` | -**Ontologies** | [CountAggregationV2](docs/v2/Ontologies/models/CountAggregationV2.md) | `from foundry_sdk.v2.ontologies.models import CountAggregationV2` | -**Ontologies** | [CountObjectsResponseV2](docs/v2/Ontologies/models/CountObjectsResponseV2.md) | `from foundry_sdk.v2.ontologies.models import CountObjectsResponseV2` | -**Ontologies** | [CreateInterfaceLinkLogicRule](docs/v2/Ontologies/models/CreateInterfaceLinkLogicRule.md) | `from foundry_sdk.v2.ontologies.models import CreateInterfaceLinkLogicRule` | -**Ontologies** | [CreateInterfaceLogicRule](docs/v2/Ontologies/models/CreateInterfaceLogicRule.md) | `from foundry_sdk.v2.ontologies.models import CreateInterfaceLogicRule` | -**Ontologies** | [CreateInterfaceObjectRule](docs/v2/Ontologies/models/CreateInterfaceObjectRule.md) | `from foundry_sdk.v2.ontologies.models import CreateInterfaceObjectRule` | -**Ontologies** | [CreateLinkLogicRule](docs/v2/Ontologies/models/CreateLinkLogicRule.md) | `from foundry_sdk.v2.ontologies.models import CreateLinkLogicRule` | -**Ontologies** | [CreateLinkRule](docs/v2/Ontologies/models/CreateLinkRule.md) | `from foundry_sdk.v2.ontologies.models import CreateLinkRule` | -**Ontologies** | [CreateObjectLogicRule](docs/v2/Ontologies/models/CreateObjectLogicRule.md) | `from foundry_sdk.v2.ontologies.models import CreateObjectLogicRule` | -**Ontologies** | [CreateObjectRule](docs/v2/Ontologies/models/CreateObjectRule.md) | `from foundry_sdk.v2.ontologies.models import CreateObjectRule` | -**Ontologies** | [CreateOrModifyObjectLogicRule](docs/v2/Ontologies/models/CreateOrModifyObjectLogicRule.md) | `from foundry_sdk.v2.ontologies.models import CreateOrModifyObjectLogicRule` | -**Ontologies** | [CreateOrModifyObjectLogicRuleV2](docs/v2/Ontologies/models/CreateOrModifyObjectLogicRuleV2.md) | `from foundry_sdk.v2.ontologies.models import CreateOrModifyObjectLogicRuleV2` | -**Ontologies** | [CreateTemporaryObjectSetRequestV2](docs/v2/Ontologies/models/CreateTemporaryObjectSetRequestV2.md) | `from foundry_sdk.v2.ontologies.models import CreateTemporaryObjectSetRequestV2` | -**Ontologies** | [CreateTemporaryObjectSetResponseV2](docs/v2/Ontologies/models/CreateTemporaryObjectSetResponseV2.md) | `from foundry_sdk.v2.ontologies.models import CreateTemporaryObjectSetResponseV2` | -**Ontologies** | [CurrentTimeArgument](docs/v2/Ontologies/models/CurrentTimeArgument.md) | `from foundry_sdk.v2.ontologies.models import CurrentTimeArgument` | -**Ontologies** | [CurrentUserArgument](docs/v2/Ontologies/models/CurrentUserArgument.md) | `from foundry_sdk.v2.ontologies.models import CurrentUserArgument` | -**Ontologies** | [DataValue](docs/v2/Ontologies/models/DataValue.md) | `from foundry_sdk.v2.ontologies.models import DataValue` | -**Ontologies** | [DatetimeFormat](docs/v2/Ontologies/models/DatetimeFormat.md) | `from foundry_sdk.v2.ontologies.models import DatetimeFormat` | -**Ontologies** | [DatetimeLocalizedFormat](docs/v2/Ontologies/models/DatetimeLocalizedFormat.md) | `from foundry_sdk.v2.ontologies.models import DatetimeLocalizedFormat` | -**Ontologies** | [DatetimeLocalizedFormatType](docs/v2/Ontologies/models/DatetimeLocalizedFormatType.md) | `from foundry_sdk.v2.ontologies.models import DatetimeLocalizedFormatType` | -**Ontologies** | [DatetimeStringFormat](docs/v2/Ontologies/models/DatetimeStringFormat.md) | `from foundry_sdk.v2.ontologies.models import DatetimeStringFormat` | -**Ontologies** | [DatetimeTimezone](docs/v2/Ontologies/models/DatetimeTimezone.md) | `from foundry_sdk.v2.ontologies.models import DatetimeTimezone` | -**Ontologies** | [DatetimeTimezoneStatic](docs/v2/Ontologies/models/DatetimeTimezoneStatic.md) | `from foundry_sdk.v2.ontologies.models import DatetimeTimezoneStatic` | -**Ontologies** | [DatetimeTimezoneUser](docs/v2/Ontologies/models/DatetimeTimezoneUser.md) | `from foundry_sdk.v2.ontologies.models import DatetimeTimezoneUser` | -**Ontologies** | [DecryptionResult](docs/v2/Ontologies/models/DecryptionResult.md) | `from foundry_sdk.v2.ontologies.models import DecryptionResult` | -**Ontologies** | [DeleteInterfaceLinkLogicRule](docs/v2/Ontologies/models/DeleteInterfaceLinkLogicRule.md) | `from foundry_sdk.v2.ontologies.models import DeleteInterfaceLinkLogicRule` | -**Ontologies** | [DeleteInterfaceObjectRule](docs/v2/Ontologies/models/DeleteInterfaceObjectRule.md) | `from foundry_sdk.v2.ontologies.models import DeleteInterfaceObjectRule` | -**Ontologies** | [DeleteLink](docs/v2/Ontologies/models/DeleteLink.md) | `from foundry_sdk.v2.ontologies.models import DeleteLink` | -**Ontologies** | [DeleteLinkEdit](docs/v2/Ontologies/models/DeleteLinkEdit.md) | `from foundry_sdk.v2.ontologies.models import DeleteLinkEdit` | -**Ontologies** | [DeleteLinkLogicRule](docs/v2/Ontologies/models/DeleteLinkLogicRule.md) | `from foundry_sdk.v2.ontologies.models import DeleteLinkLogicRule` | -**Ontologies** | [DeleteLinkRule](docs/v2/Ontologies/models/DeleteLinkRule.md) | `from foundry_sdk.v2.ontologies.models import DeleteLinkRule` | -**Ontologies** | [DeleteObject](docs/v2/Ontologies/models/DeleteObject.md) | `from foundry_sdk.v2.ontologies.models import DeleteObject` | -**Ontologies** | [DeleteObjectEdit](docs/v2/Ontologies/models/DeleteObjectEdit.md) | `from foundry_sdk.v2.ontologies.models import DeleteObjectEdit` | -**Ontologies** | [DeleteObjectLogicRule](docs/v2/Ontologies/models/DeleteObjectLogicRule.md) | `from foundry_sdk.v2.ontologies.models import DeleteObjectLogicRule` | -**Ontologies** | [DeleteObjectRule](docs/v2/Ontologies/models/DeleteObjectRule.md) | `from foundry_sdk.v2.ontologies.models import DeleteObjectRule` | -**Ontologies** | [DeprecatedPropertyTypeStatus](docs/v2/Ontologies/models/DeprecatedPropertyTypeStatus.md) | `from foundry_sdk.v2.ontologies.models import DeprecatedPropertyTypeStatus` | -**Ontologies** | [DerivedPropertyApiName](docs/v2/Ontologies/models/DerivedPropertyApiName.md) | `from foundry_sdk.v2.ontologies.models import DerivedPropertyApiName` | -**Ontologies** | [DerivedPropertyDefinition](docs/v2/Ontologies/models/DerivedPropertyDefinition.md) | `from foundry_sdk.v2.ontologies.models import DerivedPropertyDefinition` | -**Ontologies** | [DividePropertyExpression](docs/v2/Ontologies/models/DividePropertyExpression.md) | `from foundry_sdk.v2.ontologies.models import DividePropertyExpression` | -**Ontologies** | [DoesNotIntersectBoundingBoxQuery](docs/v2/Ontologies/models/DoesNotIntersectBoundingBoxQuery.md) | `from foundry_sdk.v2.ontologies.models import DoesNotIntersectBoundingBoxQuery` | -**Ontologies** | [DoesNotIntersectPolygonQuery](docs/v2/Ontologies/models/DoesNotIntersectPolygonQuery.md) | `from foundry_sdk.v2.ontologies.models import DoesNotIntersectPolygonQuery` | -**Ontologies** | [DoubleVector](docs/v2/Ontologies/models/DoubleVector.md) | `from foundry_sdk.v2.ontologies.models import DoubleVector` | -**Ontologies** | [DurationBaseValue](docs/v2/Ontologies/models/DurationBaseValue.md) | `from foundry_sdk.v2.ontologies.models import DurationBaseValue` | -**Ontologies** | [DurationFormatStyle](docs/v2/Ontologies/models/DurationFormatStyle.md) | `from foundry_sdk.v2.ontologies.models import DurationFormatStyle` | -**Ontologies** | [DurationPrecision](docs/v2/Ontologies/models/DurationPrecision.md) | `from foundry_sdk.v2.ontologies.models import DurationPrecision` | -**Ontologies** | [EntrySetType](docs/v2/Ontologies/models/EntrySetType.md) | `from foundry_sdk.v2.ontologies.models import EntrySetType` | -**Ontologies** | [EnumConstraint](docs/v2/Ontologies/models/EnumConstraint.md) | `from foundry_sdk.v2.ontologies.models import EnumConstraint` | -**Ontologies** | [EqualsQueryV2](docs/v2/Ontologies/models/EqualsQueryV2.md) | `from foundry_sdk.v2.ontologies.models import EqualsQueryV2` | -**Ontologies** | [ExactDistinctAggregationV2](docs/v2/Ontologies/models/ExactDistinctAggregationV2.md) | `from foundry_sdk.v2.ontologies.models import ExactDistinctAggregationV2` | -**Ontologies** | [ExamplePropertyTypeStatus](docs/v2/Ontologies/models/ExamplePropertyTypeStatus.md) | `from foundry_sdk.v2.ontologies.models import ExamplePropertyTypeStatus` | -**Ontologies** | [ExecuteQueryRequest](docs/v2/Ontologies/models/ExecuteQueryRequest.md) | `from foundry_sdk.v2.ontologies.models import ExecuteQueryRequest` | -**Ontologies** | [ExecuteQueryResponse](docs/v2/Ontologies/models/ExecuteQueryResponse.md) | `from foundry_sdk.v2.ontologies.models import ExecuteQueryResponse` | -**Ontologies** | [ExperimentalPropertyTypeStatus](docs/v2/Ontologies/models/ExperimentalPropertyTypeStatus.md) | `from foundry_sdk.v2.ontologies.models import ExperimentalPropertyTypeStatus` | -**Ontologies** | [ExtractDatePart](docs/v2/Ontologies/models/ExtractDatePart.md) | `from foundry_sdk.v2.ontologies.models import ExtractDatePart` | -**Ontologies** | [ExtractMainValueLoadLevel](docs/v2/Ontologies/models/ExtractMainValueLoadLevel.md) | `from foundry_sdk.v2.ontologies.models import ExtractMainValueLoadLevel` | -**Ontologies** | [ExtractPropertyExpression](docs/v2/Ontologies/models/ExtractPropertyExpression.md) | `from foundry_sdk.v2.ontologies.models import ExtractPropertyExpression` | -**Ontologies** | [FilterValue](docs/v2/Ontologies/models/FilterValue.md) | `from foundry_sdk.v2.ontologies.models import FilterValue` | -**Ontologies** | [FixedValuesMapKey](docs/v2/Ontologies/models/FixedValuesMapKey.md) | `from foundry_sdk.v2.ontologies.models import FixedValuesMapKey` | -**Ontologies** | [FunctionLogicRule](docs/v2/Ontologies/models/FunctionLogicRule.md) | `from foundry_sdk.v2.ontologies.models import FunctionLogicRule` | -**Ontologies** | [FunctionParameterName](docs/v2/Ontologies/models/FunctionParameterName.md) | `from foundry_sdk.v2.ontologies.models import FunctionParameterName` | -**Ontologies** | [FunctionRid](docs/v2/Ontologies/models/FunctionRid.md) | `from foundry_sdk.v2.ontologies.models import FunctionRid` | -**Ontologies** | [FunctionVersion](docs/v2/Ontologies/models/FunctionVersion.md) | `from foundry_sdk.v2.ontologies.models import FunctionVersion` | -**Ontologies** | [FuzzyV2](docs/v2/Ontologies/models/FuzzyV2.md) | `from foundry_sdk.v2.ontologies.models import FuzzyV2` | -**Ontologies** | [GetSelectedPropertyOperation](docs/v2/Ontologies/models/GetSelectedPropertyOperation.md) | `from foundry_sdk.v2.ontologies.models import GetSelectedPropertyOperation` | -**Ontologies** | [GreatestPropertyExpression](docs/v2/Ontologies/models/GreatestPropertyExpression.md) | `from foundry_sdk.v2.ontologies.models import GreatestPropertyExpression` | -**Ontologies** | [GroupMemberConstraint](docs/v2/Ontologies/models/GroupMemberConstraint.md) | `from foundry_sdk.v2.ontologies.models import GroupMemberConstraint` | -**Ontologies** | [GteQueryV2](docs/v2/Ontologies/models/GteQueryV2.md) | `from foundry_sdk.v2.ontologies.models import GteQueryV2` | -**Ontologies** | [GtQueryV2](docs/v2/Ontologies/models/GtQueryV2.md) | `from foundry_sdk.v2.ontologies.models import GtQueryV2` | -**Ontologies** | [HumanReadableFormat](docs/v2/Ontologies/models/HumanReadableFormat.md) | `from foundry_sdk.v2.ontologies.models import HumanReadableFormat` | -**Ontologies** | [Icon](docs/v2/Ontologies/models/Icon.md) | `from foundry_sdk.v2.ontologies.models import Icon` | -**Ontologies** | [InQuery](docs/v2/Ontologies/models/InQuery.md) | `from foundry_sdk.v2.ontologies.models import InQuery` | -**Ontologies** | [InterfaceDefinedPropertyType](docs/v2/Ontologies/models/InterfaceDefinedPropertyType.md) | `from foundry_sdk.v2.ontologies.models import InterfaceDefinedPropertyType` | -**Ontologies** | [InterfaceLinkType](docs/v2/Ontologies/models/InterfaceLinkType.md) | `from foundry_sdk.v2.ontologies.models import InterfaceLinkType` | -**Ontologies** | [InterfaceLinkTypeApiName](docs/v2/Ontologies/models/InterfaceLinkTypeApiName.md) | `from foundry_sdk.v2.ontologies.models import InterfaceLinkTypeApiName` | -**Ontologies** | [InterfaceLinkTypeCardinality](docs/v2/Ontologies/models/InterfaceLinkTypeCardinality.md) | `from foundry_sdk.v2.ontologies.models import InterfaceLinkTypeCardinality` | -**Ontologies** | [InterfaceLinkTypeLinkedEntityApiName](docs/v2/Ontologies/models/InterfaceLinkTypeLinkedEntityApiName.md) | `from foundry_sdk.v2.ontologies.models import InterfaceLinkTypeLinkedEntityApiName` | -**Ontologies** | [InterfaceLinkTypeRid](docs/v2/Ontologies/models/InterfaceLinkTypeRid.md) | `from foundry_sdk.v2.ontologies.models import InterfaceLinkTypeRid` | -**Ontologies** | [InterfaceParameterPropertyArgument](docs/v2/Ontologies/models/InterfaceParameterPropertyArgument.md) | `from foundry_sdk.v2.ontologies.models import InterfaceParameterPropertyArgument` | -**Ontologies** | [InterfacePropertyApiName](docs/v2/Ontologies/models/InterfacePropertyApiName.md) | `from foundry_sdk.v2.ontologies.models import InterfacePropertyApiName` | -**Ontologies** | [InterfacePropertyLocalPropertyImplementation](docs/v2/Ontologies/models/InterfacePropertyLocalPropertyImplementation.md) | `from foundry_sdk.v2.ontologies.models import InterfacePropertyLocalPropertyImplementation` | -**Ontologies** | [InterfacePropertyReducedPropertyImplementation](docs/v2/Ontologies/models/InterfacePropertyReducedPropertyImplementation.md) | `from foundry_sdk.v2.ontologies.models import InterfacePropertyReducedPropertyImplementation` | -**Ontologies** | [InterfacePropertyStructFieldImplementation](docs/v2/Ontologies/models/InterfacePropertyStructFieldImplementation.md) | `from foundry_sdk.v2.ontologies.models import InterfacePropertyStructFieldImplementation` | -**Ontologies** | [InterfacePropertyStructImplementation](docs/v2/Ontologies/models/InterfacePropertyStructImplementation.md) | `from foundry_sdk.v2.ontologies.models import InterfacePropertyStructImplementation` | -**Ontologies** | [InterfacePropertyStructImplementationMapping](docs/v2/Ontologies/models/InterfacePropertyStructImplementationMapping.md) | `from foundry_sdk.v2.ontologies.models import InterfacePropertyStructImplementationMapping` | -**Ontologies** | [InterfacePropertyType](docs/v2/Ontologies/models/InterfacePropertyType.md) | `from foundry_sdk.v2.ontologies.models import InterfacePropertyType` | -**Ontologies** | [InterfacePropertyTypeImplementation](docs/v2/Ontologies/models/InterfacePropertyTypeImplementation.md) | `from foundry_sdk.v2.ontologies.models import InterfacePropertyTypeImplementation` | -**Ontologies** | [InterfacePropertyTypeRid](docs/v2/Ontologies/models/InterfacePropertyTypeRid.md) | `from foundry_sdk.v2.ontologies.models import InterfacePropertyTypeRid` | -**Ontologies** | [InterfaceSharedPropertyType](docs/v2/Ontologies/models/InterfaceSharedPropertyType.md) | `from foundry_sdk.v2.ontologies.models import InterfaceSharedPropertyType` | -**Ontologies** | [InterfaceToObjectTypeMapping](docs/v2/Ontologies/models/InterfaceToObjectTypeMapping.md) | `from foundry_sdk.v2.ontologies.models import InterfaceToObjectTypeMapping` | -**Ontologies** | [InterfaceToObjectTypeMappings](docs/v2/Ontologies/models/InterfaceToObjectTypeMappings.md) | `from foundry_sdk.v2.ontologies.models import InterfaceToObjectTypeMappings` | -**Ontologies** | [InterfaceToObjectTypeMappingsV2](docs/v2/Ontologies/models/InterfaceToObjectTypeMappingsV2.md) | `from foundry_sdk.v2.ontologies.models import InterfaceToObjectTypeMappingsV2` | -**Ontologies** | [InterfaceToObjectTypeMappingV2](docs/v2/Ontologies/models/InterfaceToObjectTypeMappingV2.md) | `from foundry_sdk.v2.ontologies.models import InterfaceToObjectTypeMappingV2` | -**Ontologies** | [InterfaceType](docs/v2/Ontologies/models/InterfaceType.md) | `from foundry_sdk.v2.ontologies.models import InterfaceType` | -**Ontologies** | [InterfaceTypeApiName](docs/v2/Ontologies/models/InterfaceTypeApiName.md) | `from foundry_sdk.v2.ontologies.models import InterfaceTypeApiName` | -**Ontologies** | [InterfaceTypeRid](docs/v2/Ontologies/models/InterfaceTypeRid.md) | `from foundry_sdk.v2.ontologies.models import InterfaceTypeRid` | -**Ontologies** | [IntersectsBoundingBoxQuery](docs/v2/Ontologies/models/IntersectsBoundingBoxQuery.md) | `from foundry_sdk.v2.ontologies.models import IntersectsBoundingBoxQuery` | -**Ontologies** | [IntersectsPolygonQuery](docs/v2/Ontologies/models/IntersectsPolygonQuery.md) | `from foundry_sdk.v2.ontologies.models import IntersectsPolygonQuery` | -**Ontologies** | [IntervalQuery](docs/v2/Ontologies/models/IntervalQuery.md) | `from foundry_sdk.v2.ontologies.models import IntervalQuery` | -**Ontologies** | [IntervalQueryRule](docs/v2/Ontologies/models/IntervalQueryRule.md) | `from foundry_sdk.v2.ontologies.models import IntervalQueryRule` | -**Ontologies** | [IsNullQueryV2](docs/v2/Ontologies/models/IsNullQueryV2.md) | `from foundry_sdk.v2.ontologies.models import IsNullQueryV2` | -**Ontologies** | [KnownType](docs/v2/Ontologies/models/KnownType.md) | `from foundry_sdk.v2.ontologies.models import KnownType` | -**Ontologies** | [LeastPropertyExpression](docs/v2/Ontologies/models/LeastPropertyExpression.md) | `from foundry_sdk.v2.ontologies.models import LeastPropertyExpression` | -**Ontologies** | [LengthConstraint](docs/v2/Ontologies/models/LengthConstraint.md) | `from foundry_sdk.v2.ontologies.models import LengthConstraint` | -**Ontologies** | [LinkedInterfaceTypeApiName](docs/v2/Ontologies/models/LinkedInterfaceTypeApiName.md) | `from foundry_sdk.v2.ontologies.models import LinkedInterfaceTypeApiName` | -**Ontologies** | [LinkedObjectLocator](docs/v2/Ontologies/models/LinkedObjectLocator.md) | `from foundry_sdk.v2.ontologies.models import LinkedObjectLocator` | -**Ontologies** | [LinkedObjectTypeApiName](docs/v2/Ontologies/models/LinkedObjectTypeApiName.md) | `from foundry_sdk.v2.ontologies.models import LinkedObjectTypeApiName` | -**Ontologies** | [LinksFromObject](docs/v2/Ontologies/models/LinksFromObject.md) | `from foundry_sdk.v2.ontologies.models import LinksFromObject` | -**Ontologies** | [LinkSideObject](docs/v2/Ontologies/models/LinkSideObject.md) | `from foundry_sdk.v2.ontologies.models import LinkSideObject` | -**Ontologies** | [LinkTypeApiName](docs/v2/Ontologies/models/LinkTypeApiName.md) | `from foundry_sdk.v2.ontologies.models import LinkTypeApiName` | -**Ontologies** | [LinkTypeId](docs/v2/Ontologies/models/LinkTypeId.md) | `from foundry_sdk.v2.ontologies.models import LinkTypeId` | -**Ontologies** | [LinkTypeRid](docs/v2/Ontologies/models/LinkTypeRid.md) | `from foundry_sdk.v2.ontologies.models import LinkTypeRid` | -**Ontologies** | [LinkTypeSideCardinality](docs/v2/Ontologies/models/LinkTypeSideCardinality.md) | `from foundry_sdk.v2.ontologies.models import LinkTypeSideCardinality` | -**Ontologies** | [LinkTypeSideV2](docs/v2/Ontologies/models/LinkTypeSideV2.md) | `from foundry_sdk.v2.ontologies.models import LinkTypeSideV2` | -**Ontologies** | [ListActionTypesFullMetadataResponse](docs/v2/Ontologies/models/ListActionTypesFullMetadataResponse.md) | `from foundry_sdk.v2.ontologies.models import ListActionTypesFullMetadataResponse` | -**Ontologies** | [ListActionTypesResponseV2](docs/v2/Ontologies/models/ListActionTypesResponseV2.md) | `from foundry_sdk.v2.ontologies.models import ListActionTypesResponseV2` | -**Ontologies** | [ListAttachmentsResponseV2](docs/v2/Ontologies/models/ListAttachmentsResponseV2.md) | `from foundry_sdk.v2.ontologies.models import ListAttachmentsResponseV2` | -**Ontologies** | [ListInterfaceLinkedObjectsResponse](docs/v2/Ontologies/models/ListInterfaceLinkedObjectsResponse.md) | `from foundry_sdk.v2.ontologies.models import ListInterfaceLinkedObjectsResponse` | -**Ontologies** | [ListInterfaceTypesResponse](docs/v2/Ontologies/models/ListInterfaceTypesResponse.md) | `from foundry_sdk.v2.ontologies.models import ListInterfaceTypesResponse` | -**Ontologies** | [ListLinkedObjectsResponseV2](docs/v2/Ontologies/models/ListLinkedObjectsResponseV2.md) | `from foundry_sdk.v2.ontologies.models import ListLinkedObjectsResponseV2` | -**Ontologies** | [ListObjectsForInterfaceResponse](docs/v2/Ontologies/models/ListObjectsForInterfaceResponse.md) | `from foundry_sdk.v2.ontologies.models import ListObjectsForInterfaceResponse` | -**Ontologies** | [ListObjectsResponseV2](docs/v2/Ontologies/models/ListObjectsResponseV2.md) | `from foundry_sdk.v2.ontologies.models import ListObjectsResponseV2` | -**Ontologies** | [ListObjectTypesV2Response](docs/v2/Ontologies/models/ListObjectTypesV2Response.md) | `from foundry_sdk.v2.ontologies.models import ListObjectTypesV2Response` | -**Ontologies** | [ListOntologiesV2Response](docs/v2/Ontologies/models/ListOntologiesV2Response.md) | `from foundry_sdk.v2.ontologies.models import ListOntologiesV2Response` | -**Ontologies** | [ListOntologyValueTypesResponse](docs/v2/Ontologies/models/ListOntologyValueTypesResponse.md) | `from foundry_sdk.v2.ontologies.models import ListOntologyValueTypesResponse` | -**Ontologies** | [ListOutgoingInterfaceLinkTypesResponse](docs/v2/Ontologies/models/ListOutgoingInterfaceLinkTypesResponse.md) | `from foundry_sdk.v2.ontologies.models import ListOutgoingInterfaceLinkTypesResponse` | -**Ontologies** | [ListOutgoingLinkTypesResponseV2](docs/v2/Ontologies/models/ListOutgoingLinkTypesResponseV2.md) | `from foundry_sdk.v2.ontologies.models import ListOutgoingLinkTypesResponseV2` | -**Ontologies** | [ListQueryTypesResponseV2](docs/v2/Ontologies/models/ListQueryTypesResponseV2.md) | `from foundry_sdk.v2.ontologies.models import ListQueryTypesResponseV2` | -**Ontologies** | [LoadObjectSetLinksRequestV2](docs/v2/Ontologies/models/LoadObjectSetLinksRequestV2.md) | `from foundry_sdk.v2.ontologies.models import LoadObjectSetLinksRequestV2` | -**Ontologies** | [LoadObjectSetLinksResponseV2](docs/v2/Ontologies/models/LoadObjectSetLinksResponseV2.md) | `from foundry_sdk.v2.ontologies.models import LoadObjectSetLinksResponseV2` | -**Ontologies** | [LoadObjectSetRequestV2](docs/v2/Ontologies/models/LoadObjectSetRequestV2.md) | `from foundry_sdk.v2.ontologies.models import LoadObjectSetRequestV2` | -**Ontologies** | [LoadObjectSetResponseV2](docs/v2/Ontologies/models/LoadObjectSetResponseV2.md) | `from foundry_sdk.v2.ontologies.models import LoadObjectSetResponseV2` | -**Ontologies** | [LoadObjectSetV2MultipleObjectTypesRequest](docs/v2/Ontologies/models/LoadObjectSetV2MultipleObjectTypesRequest.md) | `from foundry_sdk.v2.ontologies.models import LoadObjectSetV2MultipleObjectTypesRequest` | -**Ontologies** | [LoadObjectSetV2MultipleObjectTypesResponse](docs/v2/Ontologies/models/LoadObjectSetV2MultipleObjectTypesResponse.md) | `from foundry_sdk.v2.ontologies.models import LoadObjectSetV2MultipleObjectTypesResponse` | -**Ontologies** | [LoadObjectSetV2ObjectsOrInterfacesRequest](docs/v2/Ontologies/models/LoadObjectSetV2ObjectsOrInterfacesRequest.md) | `from foundry_sdk.v2.ontologies.models import LoadObjectSetV2ObjectsOrInterfacesRequest` | -**Ontologies** | [LoadObjectSetV2ObjectsOrInterfacesResponse](docs/v2/Ontologies/models/LoadObjectSetV2ObjectsOrInterfacesResponse.md) | `from foundry_sdk.v2.ontologies.models import LoadObjectSetV2ObjectsOrInterfacesResponse` | -**Ontologies** | [LoadOntologyMetadataRequest](docs/v2/Ontologies/models/LoadOntologyMetadataRequest.md) | `from foundry_sdk.v2.ontologies.models import LoadOntologyMetadataRequest` | -**Ontologies** | [LogicRule](docs/v2/Ontologies/models/LogicRule.md) | `from foundry_sdk.v2.ontologies.models import LogicRule` | -**Ontologies** | [LogicRuleArgument](docs/v2/Ontologies/models/LogicRuleArgument.md) | `from foundry_sdk.v2.ontologies.models import LogicRuleArgument` | -**Ontologies** | [LteQueryV2](docs/v2/Ontologies/models/LteQueryV2.md) | `from foundry_sdk.v2.ontologies.models import LteQueryV2` | -**Ontologies** | [LtQueryV2](docs/v2/Ontologies/models/LtQueryV2.md) | `from foundry_sdk.v2.ontologies.models import LtQueryV2` | -**Ontologies** | [MatchRule](docs/v2/Ontologies/models/MatchRule.md) | `from foundry_sdk.v2.ontologies.models import MatchRule` | -**Ontologies** | [MaxAggregationV2](docs/v2/Ontologies/models/MaxAggregationV2.md) | `from foundry_sdk.v2.ontologies.models import MaxAggregationV2` | -**Ontologies** | [MediaMetadata](docs/v2/Ontologies/models/MediaMetadata.md) | `from foundry_sdk.v2.ontologies.models import MediaMetadata` | -**Ontologies** | [MethodObjectSet](docs/v2/Ontologies/models/MethodObjectSet.md) | `from foundry_sdk.v2.ontologies.models import MethodObjectSet` | -**Ontologies** | [MinAggregationV2](docs/v2/Ontologies/models/MinAggregationV2.md) | `from foundry_sdk.v2.ontologies.models import MinAggregationV2` | -**Ontologies** | [ModifyInterfaceLogicRule](docs/v2/Ontologies/models/ModifyInterfaceLogicRule.md) | `from foundry_sdk.v2.ontologies.models import ModifyInterfaceLogicRule` | -**Ontologies** | [ModifyInterfaceObjectRule](docs/v2/Ontologies/models/ModifyInterfaceObjectRule.md) | `from foundry_sdk.v2.ontologies.models import ModifyInterfaceObjectRule` | -**Ontologies** | [ModifyObject](docs/v2/Ontologies/models/ModifyObject.md) | `from foundry_sdk.v2.ontologies.models import ModifyObject` | -**Ontologies** | [ModifyObjectEdit](docs/v2/Ontologies/models/ModifyObjectEdit.md) | `from foundry_sdk.v2.ontologies.models import ModifyObjectEdit` | -**Ontologies** | [ModifyObjectLogicRule](docs/v2/Ontologies/models/ModifyObjectLogicRule.md) | `from foundry_sdk.v2.ontologies.models import ModifyObjectLogicRule` | -**Ontologies** | [ModifyObjectRule](docs/v2/Ontologies/models/ModifyObjectRule.md) | `from foundry_sdk.v2.ontologies.models import ModifyObjectRule` | -**Ontologies** | [MultiplyPropertyExpression](docs/v2/Ontologies/models/MultiplyPropertyExpression.md) | `from foundry_sdk.v2.ontologies.models import MultiplyPropertyExpression` | -**Ontologies** | [NearestNeighborsQuery](docs/v2/Ontologies/models/NearestNeighborsQuery.md) | `from foundry_sdk.v2.ontologies.models import NearestNeighborsQuery` | -**Ontologies** | [NearestNeighborsQueryText](docs/v2/Ontologies/models/NearestNeighborsQueryText.md) | `from foundry_sdk.v2.ontologies.models import NearestNeighborsQueryText` | -**Ontologies** | [NegatePropertyExpression](docs/v2/Ontologies/models/NegatePropertyExpression.md) | `from foundry_sdk.v2.ontologies.models import NegatePropertyExpression` | -**Ontologies** | [NestedInterfacePropertyTypeImplementation](docs/v2/Ontologies/models/NestedInterfacePropertyTypeImplementation.md) | `from foundry_sdk.v2.ontologies.models import NestedInterfacePropertyTypeImplementation` | -**Ontologies** | [NestedQueryAggregation](docs/v2/Ontologies/models/NestedQueryAggregation.md) | `from foundry_sdk.v2.ontologies.models import NestedQueryAggregation` | -**Ontologies** | [NotQueryV2](docs/v2/Ontologies/models/NotQueryV2.md) | `from foundry_sdk.v2.ontologies.models import NotQueryV2` | -**Ontologies** | [NumberFormatAffix](docs/v2/Ontologies/models/NumberFormatAffix.md) | `from foundry_sdk.v2.ontologies.models import NumberFormatAffix` | -**Ontologies** | [NumberFormatCurrency](docs/v2/Ontologies/models/NumberFormatCurrency.md) | `from foundry_sdk.v2.ontologies.models import NumberFormatCurrency` | -**Ontologies** | [NumberFormatCurrencyStyle](docs/v2/Ontologies/models/NumberFormatCurrencyStyle.md) | `from foundry_sdk.v2.ontologies.models import NumberFormatCurrencyStyle` | -**Ontologies** | [NumberFormatCustomUnit](docs/v2/Ontologies/models/NumberFormatCustomUnit.md) | `from foundry_sdk.v2.ontologies.models import NumberFormatCustomUnit` | -**Ontologies** | [NumberFormatDuration](docs/v2/Ontologies/models/NumberFormatDuration.md) | `from foundry_sdk.v2.ontologies.models import NumberFormatDuration` | -**Ontologies** | [NumberFormatFixedValues](docs/v2/Ontologies/models/NumberFormatFixedValues.md) | `from foundry_sdk.v2.ontologies.models import NumberFormatFixedValues` | -**Ontologies** | [NumberFormatNotation](docs/v2/Ontologies/models/NumberFormatNotation.md) | `from foundry_sdk.v2.ontologies.models import NumberFormatNotation` | -**Ontologies** | [NumberFormatOptions](docs/v2/Ontologies/models/NumberFormatOptions.md) | `from foundry_sdk.v2.ontologies.models import NumberFormatOptions` | -**Ontologies** | [NumberFormatRatio](docs/v2/Ontologies/models/NumberFormatRatio.md) | `from foundry_sdk.v2.ontologies.models import NumberFormatRatio` | -**Ontologies** | [NumberFormatScale](docs/v2/Ontologies/models/NumberFormatScale.md) | `from foundry_sdk.v2.ontologies.models import NumberFormatScale` | -**Ontologies** | [NumberFormatStandard](docs/v2/Ontologies/models/NumberFormatStandard.md) | `from foundry_sdk.v2.ontologies.models import NumberFormatStandard` | -**Ontologies** | [NumberFormatStandardUnit](docs/v2/Ontologies/models/NumberFormatStandardUnit.md) | `from foundry_sdk.v2.ontologies.models import NumberFormatStandardUnit` | -**Ontologies** | [NumberRatioType](docs/v2/Ontologies/models/NumberRatioType.md) | `from foundry_sdk.v2.ontologies.models import NumberRatioType` | -**Ontologies** | [NumberRoundingMode](docs/v2/Ontologies/models/NumberRoundingMode.md) | `from foundry_sdk.v2.ontologies.models import NumberRoundingMode` | -**Ontologies** | [NumberScaleType](docs/v2/Ontologies/models/NumberScaleType.md) | `from foundry_sdk.v2.ontologies.models import NumberScaleType` | -**Ontologies** | [ObjectEdit](docs/v2/Ontologies/models/ObjectEdit.md) | `from foundry_sdk.v2.ontologies.models import ObjectEdit` | -**Ontologies** | [ObjectEdits](docs/v2/Ontologies/models/ObjectEdits.md) | `from foundry_sdk.v2.ontologies.models import ObjectEdits` | -**Ontologies** | [ObjectParameterPropertyArgument](docs/v2/Ontologies/models/ObjectParameterPropertyArgument.md) | `from foundry_sdk.v2.ontologies.models import ObjectParameterPropertyArgument` | -**Ontologies** | [ObjectPropertyType](docs/v2/Ontologies/models/ObjectPropertyType.md) | `from foundry_sdk.v2.ontologies.models import ObjectPropertyType` | -**Ontologies** | [ObjectPropertyValueConstraint](docs/v2/Ontologies/models/ObjectPropertyValueConstraint.md) | `from foundry_sdk.v2.ontologies.models import ObjectPropertyValueConstraint` | -**Ontologies** | [ObjectQueryResultConstraint](docs/v2/Ontologies/models/ObjectQueryResultConstraint.md) | `from foundry_sdk.v2.ontologies.models import ObjectQueryResultConstraint` | -**Ontologies** | [ObjectRid](docs/v2/Ontologies/models/ObjectRid.md) | `from foundry_sdk.v2.ontologies.models import ObjectRid` | -**Ontologies** | [ObjectSet](docs/v2/Ontologies/models/ObjectSet.md) | `from foundry_sdk.v2.ontologies.models import ObjectSet` | -**Ontologies** | [ObjectSetAsBaseObjectTypesType](docs/v2/Ontologies/models/ObjectSetAsBaseObjectTypesType.md) | `from foundry_sdk.v2.ontologies.models import ObjectSetAsBaseObjectTypesType` | -**Ontologies** | [ObjectSetAsTypeType](docs/v2/Ontologies/models/ObjectSetAsTypeType.md) | `from foundry_sdk.v2.ontologies.models import ObjectSetAsTypeType` | -**Ontologies** | [ObjectSetBaseType](docs/v2/Ontologies/models/ObjectSetBaseType.md) | `from foundry_sdk.v2.ontologies.models import ObjectSetBaseType` | -**Ontologies** | [ObjectSetFilterType](docs/v2/Ontologies/models/ObjectSetFilterType.md) | `from foundry_sdk.v2.ontologies.models import ObjectSetFilterType` | -**Ontologies** | [ObjectSetInterfaceBaseType](docs/v2/Ontologies/models/ObjectSetInterfaceBaseType.md) | `from foundry_sdk.v2.ontologies.models import ObjectSetInterfaceBaseType` | -**Ontologies** | [ObjectSetInterfaceLinkSearchAroundType](docs/v2/Ontologies/models/ObjectSetInterfaceLinkSearchAroundType.md) | `from foundry_sdk.v2.ontologies.models import ObjectSetInterfaceLinkSearchAroundType` | -**Ontologies** | [ObjectSetIntersectionType](docs/v2/Ontologies/models/ObjectSetIntersectionType.md) | `from foundry_sdk.v2.ontologies.models import ObjectSetIntersectionType` | -**Ontologies** | [ObjectSetMethodInputType](docs/v2/Ontologies/models/ObjectSetMethodInputType.md) | `from foundry_sdk.v2.ontologies.models import ObjectSetMethodInputType` | -**Ontologies** | [ObjectSetNearestNeighborsType](docs/v2/Ontologies/models/ObjectSetNearestNeighborsType.md) | `from foundry_sdk.v2.ontologies.models import ObjectSetNearestNeighborsType` | -**Ontologies** | [ObjectSetReferenceType](docs/v2/Ontologies/models/ObjectSetReferenceType.md) | `from foundry_sdk.v2.ontologies.models import ObjectSetReferenceType` | -**Ontologies** | [ObjectSetRid](docs/v2/Ontologies/models/ObjectSetRid.md) | `from foundry_sdk.v2.ontologies.models import ObjectSetRid` | -**Ontologies** | [ObjectSetSearchAroundType](docs/v2/Ontologies/models/ObjectSetSearchAroundType.md) | `from foundry_sdk.v2.ontologies.models import ObjectSetSearchAroundType` | -**Ontologies** | [ObjectSetStaticType](docs/v2/Ontologies/models/ObjectSetStaticType.md) | `from foundry_sdk.v2.ontologies.models import ObjectSetStaticType` | -**Ontologies** | [ObjectSetSubtractType](docs/v2/Ontologies/models/ObjectSetSubtractType.md) | `from foundry_sdk.v2.ontologies.models import ObjectSetSubtractType` | -**Ontologies** | [ObjectSetUnionType](docs/v2/Ontologies/models/ObjectSetUnionType.md) | `from foundry_sdk.v2.ontologies.models import ObjectSetUnionType` | -**Ontologies** | [ObjectSetWithPropertiesType](docs/v2/Ontologies/models/ObjectSetWithPropertiesType.md) | `from foundry_sdk.v2.ontologies.models import ObjectSetWithPropertiesType` | -**Ontologies** | [ObjectTypeApiName](docs/v2/Ontologies/models/ObjectTypeApiName.md) | `from foundry_sdk.v2.ontologies.models import ObjectTypeApiName` | -**Ontologies** | [ObjectTypeEdits](docs/v2/Ontologies/models/ObjectTypeEdits.md) | `from foundry_sdk.v2.ontologies.models import ObjectTypeEdits` | -**Ontologies** | [ObjectTypeFullMetadata](docs/v2/Ontologies/models/ObjectTypeFullMetadata.md) | `from foundry_sdk.v2.ontologies.models import ObjectTypeFullMetadata` | -**Ontologies** | [ObjectTypeId](docs/v2/Ontologies/models/ObjectTypeId.md) | `from foundry_sdk.v2.ontologies.models import ObjectTypeId` | -**Ontologies** | [ObjectTypeInterfaceImplementation](docs/v2/Ontologies/models/ObjectTypeInterfaceImplementation.md) | `from foundry_sdk.v2.ontologies.models import ObjectTypeInterfaceImplementation` | -**Ontologies** | [ObjectTypeRid](docs/v2/Ontologies/models/ObjectTypeRid.md) | `from foundry_sdk.v2.ontologies.models import ObjectTypeRid` | -**Ontologies** | [ObjectTypeV2](docs/v2/Ontologies/models/ObjectTypeV2.md) | `from foundry_sdk.v2.ontologies.models import ObjectTypeV2` | -**Ontologies** | [ObjectTypeVisibility](docs/v2/Ontologies/models/ObjectTypeVisibility.md) | `from foundry_sdk.v2.ontologies.models import ObjectTypeVisibility` | -**Ontologies** | [OneOfConstraint](docs/v2/Ontologies/models/OneOfConstraint.md) | `from foundry_sdk.v2.ontologies.models import OneOfConstraint` | -**Ontologies** | [OntologyApiName](docs/v2/Ontologies/models/OntologyApiName.md) | `from foundry_sdk.v2.ontologies.models import OntologyApiName` | -**Ontologies** | [OntologyArrayType](docs/v2/Ontologies/models/OntologyArrayType.md) | `from foundry_sdk.v2.ontologies.models import OntologyArrayType` | -**Ontologies** | [OntologyDataType](docs/v2/Ontologies/models/OntologyDataType.md) | `from foundry_sdk.v2.ontologies.models import OntologyDataType` | -**Ontologies** | [OntologyFullMetadata](docs/v2/Ontologies/models/OntologyFullMetadata.md) | `from foundry_sdk.v2.ontologies.models import OntologyFullMetadata` | -**Ontologies** | [OntologyIdentifier](docs/v2/Ontologies/models/OntologyIdentifier.md) | `from foundry_sdk.v2.ontologies.models import OntologyIdentifier` | -**Ontologies** | [OntologyInterfaceObjectSetType](docs/v2/Ontologies/models/OntologyInterfaceObjectSetType.md) | `from foundry_sdk.v2.ontologies.models import OntologyInterfaceObjectSetType` | -**Ontologies** | [OntologyInterfaceObjectType](docs/v2/Ontologies/models/OntologyInterfaceObjectType.md) | `from foundry_sdk.v2.ontologies.models import OntologyInterfaceObjectType` | -**Ontologies** | [OntologyMapType](docs/v2/Ontologies/models/OntologyMapType.md) | `from foundry_sdk.v2.ontologies.models import OntologyMapType` | -**Ontologies** | [OntologyObjectArrayType](docs/v2/Ontologies/models/OntologyObjectArrayType.md) | `from foundry_sdk.v2.ontologies.models import OntologyObjectArrayType` | -**Ontologies** | [OntologyObjectArrayTypeReducer](docs/v2/Ontologies/models/OntologyObjectArrayTypeReducer.md) | `from foundry_sdk.v2.ontologies.models import OntologyObjectArrayTypeReducer` | -**Ontologies** | [OntologyObjectArrayTypeReducerSortDirection](docs/v2/Ontologies/models/OntologyObjectArrayTypeReducerSortDirection.md) | `from foundry_sdk.v2.ontologies.models import OntologyObjectArrayTypeReducerSortDirection` | -**Ontologies** | [OntologyObjectSetType](docs/v2/Ontologies/models/OntologyObjectSetType.md) | `from foundry_sdk.v2.ontologies.models import OntologyObjectSetType` | -**Ontologies** | [OntologyObjectType](docs/v2/Ontologies/models/OntologyObjectType.md) | `from foundry_sdk.v2.ontologies.models import OntologyObjectType` | -**Ontologies** | [OntologyObjectTypeReferenceType](docs/v2/Ontologies/models/OntologyObjectTypeReferenceType.md) | `from foundry_sdk.v2.ontologies.models import OntologyObjectTypeReferenceType` | -**Ontologies** | [OntologyObjectV2](docs/v2/Ontologies/models/OntologyObjectV2.md) | `from foundry_sdk.v2.ontologies.models import OntologyObjectV2` | -**Ontologies** | [OntologyRid](docs/v2/Ontologies/models/OntologyRid.md) | `from foundry_sdk.v2.ontologies.models import OntologyRid` | -**Ontologies** | [OntologySetType](docs/v2/Ontologies/models/OntologySetType.md) | `from foundry_sdk.v2.ontologies.models import OntologySetType` | -**Ontologies** | [OntologyStructField](docs/v2/Ontologies/models/OntologyStructField.md) | `from foundry_sdk.v2.ontologies.models import OntologyStructField` | -**Ontologies** | [OntologyStructType](docs/v2/Ontologies/models/OntologyStructType.md) | `from foundry_sdk.v2.ontologies.models import OntologyStructType` | -**Ontologies** | [OntologyTransactionId](docs/v2/Ontologies/models/OntologyTransactionId.md) | `from foundry_sdk.v2.ontologies.models import OntologyTransactionId` | -**Ontologies** | [OntologyV2](docs/v2/Ontologies/models/OntologyV2.md) | `from foundry_sdk.v2.ontologies.models import OntologyV2` | -**Ontologies** | [OntologyValueType](docs/v2/Ontologies/models/OntologyValueType.md) | `from foundry_sdk.v2.ontologies.models import OntologyValueType` | -**Ontologies** | [OrderBy](docs/v2/Ontologies/models/OrderBy.md) | `from foundry_sdk.v2.ontologies.models import OrderBy` | -**Ontologies** | [OrderByDirection](docs/v2/Ontologies/models/OrderByDirection.md) | `from foundry_sdk.v2.ontologies.models import OrderByDirection` | -**Ontologies** | [OrQueryV2](docs/v2/Ontologies/models/OrQueryV2.md) | `from foundry_sdk.v2.ontologies.models import OrQueryV2` | -**Ontologies** | [ParameterEvaluatedConstraint](docs/v2/Ontologies/models/ParameterEvaluatedConstraint.md) | `from foundry_sdk.v2.ontologies.models import ParameterEvaluatedConstraint` | -**Ontologies** | [ParameterEvaluationResult](docs/v2/Ontologies/models/ParameterEvaluationResult.md) | `from foundry_sdk.v2.ontologies.models import ParameterEvaluationResult` | -**Ontologies** | [ParameterId](docs/v2/Ontologies/models/ParameterId.md) | `from foundry_sdk.v2.ontologies.models import ParameterId` | -**Ontologies** | [ParameterIdArgument](docs/v2/Ontologies/models/ParameterIdArgument.md) | `from foundry_sdk.v2.ontologies.models import ParameterIdArgument` | -**Ontologies** | [ParameterOption](docs/v2/Ontologies/models/ParameterOption.md) | `from foundry_sdk.v2.ontologies.models import ParameterOption` | -**Ontologies** | [Plaintext](docs/v2/Ontologies/models/Plaintext.md) | `from foundry_sdk.v2.ontologies.models import Plaintext` | -**Ontologies** | [PolygonValue](docs/v2/Ontologies/models/PolygonValue.md) | `from foundry_sdk.v2.ontologies.models import PolygonValue` | -**Ontologies** | [PostTransactionEditsRequest](docs/v2/Ontologies/models/PostTransactionEditsRequest.md) | `from foundry_sdk.v2.ontologies.models import PostTransactionEditsRequest` | -**Ontologies** | [PostTransactionEditsResponse](docs/v2/Ontologies/models/PostTransactionEditsResponse.md) | `from foundry_sdk.v2.ontologies.models import PostTransactionEditsResponse` | -**Ontologies** | [PreciseDuration](docs/v2/Ontologies/models/PreciseDuration.md) | `from foundry_sdk.v2.ontologies.models import PreciseDuration` | -**Ontologies** | [PreciseTimeUnit](docs/v2/Ontologies/models/PreciseTimeUnit.md) | `from foundry_sdk.v2.ontologies.models import PreciseTimeUnit` | -**Ontologies** | [PrefixOnLastTokenRule](docs/v2/Ontologies/models/PrefixOnLastTokenRule.md) | `from foundry_sdk.v2.ontologies.models import PrefixOnLastTokenRule` | -**Ontologies** | [PrimaryKeyValue](docs/v2/Ontologies/models/PrimaryKeyValue.md) | `from foundry_sdk.v2.ontologies.models import PrimaryKeyValue` | -**Ontologies** | [PropertyApiName](docs/v2/Ontologies/models/PropertyApiName.md) | `from foundry_sdk.v2.ontologies.models import PropertyApiName` | -**Ontologies** | [PropertyApiNameSelector](docs/v2/Ontologies/models/PropertyApiNameSelector.md) | `from foundry_sdk.v2.ontologies.models import PropertyApiNameSelector` | -**Ontologies** | [PropertyBooleanFormattingRule](docs/v2/Ontologies/models/PropertyBooleanFormattingRule.md) | `from foundry_sdk.v2.ontologies.models import PropertyBooleanFormattingRule` | -**Ontologies** | [PropertyDateFormattingRule](docs/v2/Ontologies/models/PropertyDateFormattingRule.md) | `from foundry_sdk.v2.ontologies.models import PropertyDateFormattingRule` | -**Ontologies** | [PropertyFilter](docs/v2/Ontologies/models/PropertyFilter.md) | `from foundry_sdk.v2.ontologies.models import PropertyFilter` | -**Ontologies** | [PropertyId](docs/v2/Ontologies/models/PropertyId.md) | `from foundry_sdk.v2.ontologies.models import PropertyId` | -**Ontologies** | [PropertyIdentifier](docs/v2/Ontologies/models/PropertyIdentifier.md) | `from foundry_sdk.v2.ontologies.models import PropertyIdentifier` | -**Ontologies** | [PropertyImplementation](docs/v2/Ontologies/models/PropertyImplementation.md) | `from foundry_sdk.v2.ontologies.models import PropertyImplementation` | -**Ontologies** | [PropertyKnownTypeFormattingRule](docs/v2/Ontologies/models/PropertyKnownTypeFormattingRule.md) | `from foundry_sdk.v2.ontologies.models import PropertyKnownTypeFormattingRule` | -**Ontologies** | [PropertyLoadLevel](docs/v2/Ontologies/models/PropertyLoadLevel.md) | `from foundry_sdk.v2.ontologies.models import PropertyLoadLevel` | -**Ontologies** | [PropertyNumberFormattingRule](docs/v2/Ontologies/models/PropertyNumberFormattingRule.md) | `from foundry_sdk.v2.ontologies.models import PropertyNumberFormattingRule` | -**Ontologies** | [PropertyNumberFormattingRuleType](docs/v2/Ontologies/models/PropertyNumberFormattingRuleType.md) | `from foundry_sdk.v2.ontologies.models import PropertyNumberFormattingRuleType` | -**Ontologies** | [PropertyOrStructFieldOfPropertyImplementation](docs/v2/Ontologies/models/PropertyOrStructFieldOfPropertyImplementation.md) | `from foundry_sdk.v2.ontologies.models import PropertyOrStructFieldOfPropertyImplementation` | -**Ontologies** | [PropertyTimestampFormattingRule](docs/v2/Ontologies/models/PropertyTimestampFormattingRule.md) | `from foundry_sdk.v2.ontologies.models import PropertyTimestampFormattingRule` | -**Ontologies** | [PropertyTypeApiName](docs/v2/Ontologies/models/PropertyTypeApiName.md) | `from foundry_sdk.v2.ontologies.models import PropertyTypeApiName` | -**Ontologies** | [PropertyTypeReference](docs/v2/Ontologies/models/PropertyTypeReference.md) | `from foundry_sdk.v2.ontologies.models import PropertyTypeReference` | -**Ontologies** | [PropertyTypeReferenceOrStringConstant](docs/v2/Ontologies/models/PropertyTypeReferenceOrStringConstant.md) | `from foundry_sdk.v2.ontologies.models import PropertyTypeReferenceOrStringConstant` | -**Ontologies** | [PropertyTypeRid](docs/v2/Ontologies/models/PropertyTypeRid.md) | `from foundry_sdk.v2.ontologies.models import PropertyTypeRid` | -**Ontologies** | [PropertyTypeStatus](docs/v2/Ontologies/models/PropertyTypeStatus.md) | `from foundry_sdk.v2.ontologies.models import PropertyTypeStatus` | -**Ontologies** | [PropertyTypeVisibility](docs/v2/Ontologies/models/PropertyTypeVisibility.md) | `from foundry_sdk.v2.ontologies.models import PropertyTypeVisibility` | -**Ontologies** | [PropertyV2](docs/v2/Ontologies/models/PropertyV2.md) | `from foundry_sdk.v2.ontologies.models import PropertyV2` | -**Ontologies** | [PropertyValue](docs/v2/Ontologies/models/PropertyValue.md) | `from foundry_sdk.v2.ontologies.models import PropertyValue` | -**Ontologies** | [PropertyValueEscapedString](docs/v2/Ontologies/models/PropertyValueEscapedString.md) | `from foundry_sdk.v2.ontologies.models import PropertyValueEscapedString` | -**Ontologies** | [PropertyValueFormattingRule](docs/v2/Ontologies/models/PropertyValueFormattingRule.md) | `from foundry_sdk.v2.ontologies.models import PropertyValueFormattingRule` | -**Ontologies** | [PropertyWithLoadLevelSelector](docs/v2/Ontologies/models/PropertyWithLoadLevelSelector.md) | `from foundry_sdk.v2.ontologies.models import PropertyWithLoadLevelSelector` | -**Ontologies** | [QueryAggregation](docs/v2/Ontologies/models/QueryAggregation.md) | `from foundry_sdk.v2.ontologies.models import QueryAggregation` | -**Ontologies** | [QueryAggregationKeyType](docs/v2/Ontologies/models/QueryAggregationKeyType.md) | `from foundry_sdk.v2.ontologies.models import QueryAggregationKeyType` | -**Ontologies** | [QueryAggregationRangeSubType](docs/v2/Ontologies/models/QueryAggregationRangeSubType.md) | `from foundry_sdk.v2.ontologies.models import QueryAggregationRangeSubType` | -**Ontologies** | [QueryAggregationRangeType](docs/v2/Ontologies/models/QueryAggregationRangeType.md) | `from foundry_sdk.v2.ontologies.models import QueryAggregationRangeType` | -**Ontologies** | [QueryAggregationValueType](docs/v2/Ontologies/models/QueryAggregationValueType.md) | `from foundry_sdk.v2.ontologies.models import QueryAggregationValueType` | -**Ontologies** | [QueryApiName](docs/v2/Ontologies/models/QueryApiName.md) | `from foundry_sdk.v2.ontologies.models import QueryApiName` | -**Ontologies** | [QueryArrayType](docs/v2/Ontologies/models/QueryArrayType.md) | `from foundry_sdk.v2.ontologies.models import QueryArrayType` | -**Ontologies** | [QueryDataType](docs/v2/Ontologies/models/QueryDataType.md) | `from foundry_sdk.v2.ontologies.models import QueryDataType` | -**Ontologies** | [QueryParameterV2](docs/v2/Ontologies/models/QueryParameterV2.md) | `from foundry_sdk.v2.ontologies.models import QueryParameterV2` | -**Ontologies** | [QueryRuntimeErrorParameter](docs/v2/Ontologies/models/QueryRuntimeErrorParameter.md) | `from foundry_sdk.v2.ontologies.models import QueryRuntimeErrorParameter` | -**Ontologies** | [QuerySetType](docs/v2/Ontologies/models/QuerySetType.md) | `from foundry_sdk.v2.ontologies.models import QuerySetType` | -**Ontologies** | [QueryStructField](docs/v2/Ontologies/models/QueryStructField.md) | `from foundry_sdk.v2.ontologies.models import QueryStructField` | -**Ontologies** | [QueryStructType](docs/v2/Ontologies/models/QueryStructType.md) | `from foundry_sdk.v2.ontologies.models import QueryStructType` | -**Ontologies** | [QueryThreeDimensionalAggregation](docs/v2/Ontologies/models/QueryThreeDimensionalAggregation.md) | `from foundry_sdk.v2.ontologies.models import QueryThreeDimensionalAggregation` | -**Ontologies** | [QueryTwoDimensionalAggregation](docs/v2/Ontologies/models/QueryTwoDimensionalAggregation.md) | `from foundry_sdk.v2.ontologies.models import QueryTwoDimensionalAggregation` | -**Ontologies** | [QueryTypeV2](docs/v2/Ontologies/models/QueryTypeV2.md) | `from foundry_sdk.v2.ontologies.models import QueryTypeV2` | -**Ontologies** | [QueryUnionType](docs/v2/Ontologies/models/QueryUnionType.md) | `from foundry_sdk.v2.ontologies.models import QueryUnionType` | -**Ontologies** | [RangeConstraint](docs/v2/Ontologies/models/RangeConstraint.md) | `from foundry_sdk.v2.ontologies.models import RangeConstraint` | -**Ontologies** | [RangesConstraint](docs/v2/Ontologies/models/RangesConstraint.md) | `from foundry_sdk.v2.ontologies.models import RangesConstraint` | -**Ontologies** | [RegexConstraint](docs/v2/Ontologies/models/RegexConstraint.md) | `from foundry_sdk.v2.ontologies.models import RegexConstraint` | -**Ontologies** | [RegexQuery](docs/v2/Ontologies/models/RegexQuery.md) | `from foundry_sdk.v2.ontologies.models import RegexQuery` | -**Ontologies** | [RelativeDateRangeBound](docs/v2/Ontologies/models/RelativeDateRangeBound.md) | `from foundry_sdk.v2.ontologies.models import RelativeDateRangeBound` | -**Ontologies** | [RelativeDateRangeQuery](docs/v2/Ontologies/models/RelativeDateRangeQuery.md) | `from foundry_sdk.v2.ontologies.models import RelativeDateRangeQuery` | -**Ontologies** | [RelativePointInTime](docs/v2/Ontologies/models/RelativePointInTime.md) | `from foundry_sdk.v2.ontologies.models import RelativePointInTime` | -**Ontologies** | [RelativeTime](docs/v2/Ontologies/models/RelativeTime.md) | `from foundry_sdk.v2.ontologies.models import RelativeTime` | -**Ontologies** | [RelativeTimeRange](docs/v2/Ontologies/models/RelativeTimeRange.md) | `from foundry_sdk.v2.ontologies.models import RelativeTimeRange` | -**Ontologies** | [RelativeTimeRelation](docs/v2/Ontologies/models/RelativeTimeRelation.md) | `from foundry_sdk.v2.ontologies.models import RelativeTimeRelation` | -**Ontologies** | [RelativeTimeSeriesTimeUnit](docs/v2/Ontologies/models/RelativeTimeSeriesTimeUnit.md) | `from foundry_sdk.v2.ontologies.models import RelativeTimeSeriesTimeUnit` | -**Ontologies** | [RelativeTimeUnit](docs/v2/Ontologies/models/RelativeTimeUnit.md) | `from foundry_sdk.v2.ontologies.models import RelativeTimeUnit` | -**Ontologies** | [ResolvedInterfacePropertyType](docs/v2/Ontologies/models/ResolvedInterfacePropertyType.md) | `from foundry_sdk.v2.ontologies.models import ResolvedInterfacePropertyType` | -**Ontologies** | [ReturnEditsMode](docs/v2/Ontologies/models/ReturnEditsMode.md) | `from foundry_sdk.v2.ontologies.models import ReturnEditsMode` | -**Ontologies** | [RidConstraint](docs/v2/Ontologies/models/RidConstraint.md) | `from foundry_sdk.v2.ontologies.models import RidConstraint` | -**Ontologies** | [RollingAggregateWindowPoints](docs/v2/Ontologies/models/RollingAggregateWindowPoints.md) | `from foundry_sdk.v2.ontologies.models import RollingAggregateWindowPoints` | -**Ontologies** | [SdkPackageName](docs/v2/Ontologies/models/SdkPackageName.md) | `from foundry_sdk.v2.ontologies.models import SdkPackageName` | -**Ontologies** | [SdkPackageRid](docs/v2/Ontologies/models/SdkPackageRid.md) | `from foundry_sdk.v2.ontologies.models import SdkPackageRid` | -**Ontologies** | [SdkVersion](docs/v2/Ontologies/models/SdkVersion.md) | `from foundry_sdk.v2.ontologies.models import SdkVersion` | -**Ontologies** | [SearchJsonQueryV2](docs/v2/Ontologies/models/SearchJsonQueryV2.md) | `from foundry_sdk.v2.ontologies.models import SearchJsonQueryV2` | -**Ontologies** | [SearchObjectsForInterfaceRequest](docs/v2/Ontologies/models/SearchObjectsForInterfaceRequest.md) | `from foundry_sdk.v2.ontologies.models import SearchObjectsForInterfaceRequest` | -**Ontologies** | [SearchObjectsRequestV2](docs/v2/Ontologies/models/SearchObjectsRequestV2.md) | `from foundry_sdk.v2.ontologies.models import SearchObjectsRequestV2` | -**Ontologies** | [SearchObjectsResponseV2](docs/v2/Ontologies/models/SearchObjectsResponseV2.md) | `from foundry_sdk.v2.ontologies.models import SearchObjectsResponseV2` | -**Ontologies** | [SearchOrderByType](docs/v2/Ontologies/models/SearchOrderByType.md) | `from foundry_sdk.v2.ontologies.models import SearchOrderByType` | -**Ontologies** | [SearchOrderByV2](docs/v2/Ontologies/models/SearchOrderByV2.md) | `from foundry_sdk.v2.ontologies.models import SearchOrderByV2` | -**Ontologies** | [SearchOrderingV2](docs/v2/Ontologies/models/SearchOrderingV2.md) | `from foundry_sdk.v2.ontologies.models import SearchOrderingV2` | -**Ontologies** | [SelectedPropertyApiName](docs/v2/Ontologies/models/SelectedPropertyApiName.md) | `from foundry_sdk.v2.ontologies.models import SelectedPropertyApiName` | -**Ontologies** | [SelectedPropertyApproximateDistinctAggregation](docs/v2/Ontologies/models/SelectedPropertyApproximateDistinctAggregation.md) | `from foundry_sdk.v2.ontologies.models import SelectedPropertyApproximateDistinctAggregation` | -**Ontologies** | [SelectedPropertyApproximatePercentileAggregation](docs/v2/Ontologies/models/SelectedPropertyApproximatePercentileAggregation.md) | `from foundry_sdk.v2.ontologies.models import SelectedPropertyApproximatePercentileAggregation` | -**Ontologies** | [SelectedPropertyAvgAggregation](docs/v2/Ontologies/models/SelectedPropertyAvgAggregation.md) | `from foundry_sdk.v2.ontologies.models import SelectedPropertyAvgAggregation` | -**Ontologies** | [SelectedPropertyCollectListAggregation](docs/v2/Ontologies/models/SelectedPropertyCollectListAggregation.md) | `from foundry_sdk.v2.ontologies.models import SelectedPropertyCollectListAggregation` | -**Ontologies** | [SelectedPropertyCollectSetAggregation](docs/v2/Ontologies/models/SelectedPropertyCollectSetAggregation.md) | `from foundry_sdk.v2.ontologies.models import SelectedPropertyCollectSetAggregation` | -**Ontologies** | [SelectedPropertyCountAggregation](docs/v2/Ontologies/models/SelectedPropertyCountAggregation.md) | `from foundry_sdk.v2.ontologies.models import SelectedPropertyCountAggregation` | -**Ontologies** | [SelectedPropertyExactDistinctAggregation](docs/v2/Ontologies/models/SelectedPropertyExactDistinctAggregation.md) | `from foundry_sdk.v2.ontologies.models import SelectedPropertyExactDistinctAggregation` | -**Ontologies** | [SelectedPropertyExpression](docs/v2/Ontologies/models/SelectedPropertyExpression.md) | `from foundry_sdk.v2.ontologies.models import SelectedPropertyExpression` | -**Ontologies** | [SelectedPropertyMaxAggregation](docs/v2/Ontologies/models/SelectedPropertyMaxAggregation.md) | `from foundry_sdk.v2.ontologies.models import SelectedPropertyMaxAggregation` | -**Ontologies** | [SelectedPropertyMinAggregation](docs/v2/Ontologies/models/SelectedPropertyMinAggregation.md) | `from foundry_sdk.v2.ontologies.models import SelectedPropertyMinAggregation` | -**Ontologies** | [SelectedPropertyOperation](docs/v2/Ontologies/models/SelectedPropertyOperation.md) | `from foundry_sdk.v2.ontologies.models import SelectedPropertyOperation` | -**Ontologies** | [SelectedPropertySumAggregation](docs/v2/Ontologies/models/SelectedPropertySumAggregation.md) | `from foundry_sdk.v2.ontologies.models import SelectedPropertySumAggregation` | -**Ontologies** | [SharedPropertyType](docs/v2/Ontologies/models/SharedPropertyType.md) | `from foundry_sdk.v2.ontologies.models import SharedPropertyType` | -**Ontologies** | [SharedPropertyTypeApiName](docs/v2/Ontologies/models/SharedPropertyTypeApiName.md) | `from foundry_sdk.v2.ontologies.models import SharedPropertyTypeApiName` | -**Ontologies** | [SharedPropertyTypeRid](docs/v2/Ontologies/models/SharedPropertyTypeRid.md) | `from foundry_sdk.v2.ontologies.models import SharedPropertyTypeRid` | -**Ontologies** | [StartsWithQuery](docs/v2/Ontologies/models/StartsWithQuery.md) | `from foundry_sdk.v2.ontologies.models import StartsWithQuery` | -**Ontologies** | [StaticArgument](docs/v2/Ontologies/models/StaticArgument.md) | `from foundry_sdk.v2.ontologies.models import StaticArgument` | -**Ontologies** | [StreamingOutputFormat](docs/v2/Ontologies/models/StreamingOutputFormat.md) | `from foundry_sdk.v2.ontologies.models import StreamingOutputFormat` | -**Ontologies** | [StreamTimeSeriesPointsRequest](docs/v2/Ontologies/models/StreamTimeSeriesPointsRequest.md) | `from foundry_sdk.v2.ontologies.models import StreamTimeSeriesPointsRequest` | -**Ontologies** | [StreamTimeSeriesValuesRequest](docs/v2/Ontologies/models/StreamTimeSeriesValuesRequest.md) | `from foundry_sdk.v2.ontologies.models import StreamTimeSeriesValuesRequest` | -**Ontologies** | [StringConstant](docs/v2/Ontologies/models/StringConstant.md) | `from foundry_sdk.v2.ontologies.models import StringConstant` | -**Ontologies** | [StringLengthConstraint](docs/v2/Ontologies/models/StringLengthConstraint.md) | `from foundry_sdk.v2.ontologies.models import StringLengthConstraint` | -**Ontologies** | [StringRegexMatchConstraint](docs/v2/Ontologies/models/StringRegexMatchConstraint.md) | `from foundry_sdk.v2.ontologies.models import StringRegexMatchConstraint` | -**Ontologies** | [StructConstraint](docs/v2/Ontologies/models/StructConstraint.md) | `from foundry_sdk.v2.ontologies.models import StructConstraint` | -**Ontologies** | [StructEvaluatedConstraint](docs/v2/Ontologies/models/StructEvaluatedConstraint.md) | `from foundry_sdk.v2.ontologies.models import StructEvaluatedConstraint` | -**Ontologies** | [StructFieldApiName](docs/v2/Ontologies/models/StructFieldApiName.md) | `from foundry_sdk.v2.ontologies.models import StructFieldApiName` | -**Ontologies** | [StructFieldArgument](docs/v2/Ontologies/models/StructFieldArgument.md) | `from foundry_sdk.v2.ontologies.models import StructFieldArgument` | -**Ontologies** | [StructFieldEvaluatedConstraint](docs/v2/Ontologies/models/StructFieldEvaluatedConstraint.md) | `from foundry_sdk.v2.ontologies.models import StructFieldEvaluatedConstraint` | -**Ontologies** | [StructFieldEvaluationResult](docs/v2/Ontologies/models/StructFieldEvaluationResult.md) | `from foundry_sdk.v2.ontologies.models import StructFieldEvaluationResult` | -**Ontologies** | [StructFieldOfPropertyImplementation](docs/v2/Ontologies/models/StructFieldOfPropertyImplementation.md) | `from foundry_sdk.v2.ontologies.models import StructFieldOfPropertyImplementation` | -**Ontologies** | [StructFieldSelector](docs/v2/Ontologies/models/StructFieldSelector.md) | `from foundry_sdk.v2.ontologies.models import StructFieldSelector` | -**Ontologies** | [StructFieldType](docs/v2/Ontologies/models/StructFieldType.md) | `from foundry_sdk.v2.ontologies.models import StructFieldType` | -**Ontologies** | [StructFieldTypeRid](docs/v2/Ontologies/models/StructFieldTypeRid.md) | `from foundry_sdk.v2.ontologies.models import StructFieldTypeRid` | -**Ontologies** | [StructListParameterFieldArgument](docs/v2/Ontologies/models/StructListParameterFieldArgument.md) | `from foundry_sdk.v2.ontologies.models import StructListParameterFieldArgument` | -**Ontologies** | [StructParameterFieldApiName](docs/v2/Ontologies/models/StructParameterFieldApiName.md) | `from foundry_sdk.v2.ontologies.models import StructParameterFieldApiName` | -**Ontologies** | [StructParameterFieldArgument](docs/v2/Ontologies/models/StructParameterFieldArgument.md) | `from foundry_sdk.v2.ontologies.models import StructParameterFieldArgument` | -**Ontologies** | [StructType](docs/v2/Ontologies/models/StructType.md) | `from foundry_sdk.v2.ontologies.models import StructType` | -**Ontologies** | [StructTypeMainValue](docs/v2/Ontologies/models/StructTypeMainValue.md) | `from foundry_sdk.v2.ontologies.models import StructTypeMainValue` | -**Ontologies** | [SubmissionCriteriaEvaluation](docs/v2/Ontologies/models/SubmissionCriteriaEvaluation.md) | `from foundry_sdk.v2.ontologies.models import SubmissionCriteriaEvaluation` | -**Ontologies** | [SubtractPropertyExpression](docs/v2/Ontologies/models/SubtractPropertyExpression.md) | `from foundry_sdk.v2.ontologies.models import SubtractPropertyExpression` | -**Ontologies** | [SumAggregationV2](docs/v2/Ontologies/models/SumAggregationV2.md) | `from foundry_sdk.v2.ontologies.models import SumAggregationV2` | -**Ontologies** | [SyncApplyActionResponseV2](docs/v2/Ontologies/models/SyncApplyActionResponseV2.md) | `from foundry_sdk.v2.ontologies.models import SyncApplyActionResponseV2` | -**Ontologies** | [SynchronousWebhookOutputArgument](docs/v2/Ontologies/models/SynchronousWebhookOutputArgument.md) | `from foundry_sdk.v2.ontologies.models import SynchronousWebhookOutputArgument` | -**Ontologies** | [ThreeDimensionalAggregation](docs/v2/Ontologies/models/ThreeDimensionalAggregation.md) | `from foundry_sdk.v2.ontologies.models import ThreeDimensionalAggregation` | -**Ontologies** | [TimeCodeFormat](docs/v2/Ontologies/models/TimeCodeFormat.md) | `from foundry_sdk.v2.ontologies.models import TimeCodeFormat` | -**Ontologies** | [TimeRange](docs/v2/Ontologies/models/TimeRange.md) | `from foundry_sdk.v2.ontologies.models import TimeRange` | -**Ontologies** | [TimeSeriesAggregationMethod](docs/v2/Ontologies/models/TimeSeriesAggregationMethod.md) | `from foundry_sdk.v2.ontologies.models import TimeSeriesAggregationMethod` | -**Ontologies** | [TimeSeriesAggregationStrategy](docs/v2/Ontologies/models/TimeSeriesAggregationStrategy.md) | `from foundry_sdk.v2.ontologies.models import TimeSeriesAggregationStrategy` | -**Ontologies** | [TimeSeriesCumulativeAggregate](docs/v2/Ontologies/models/TimeSeriesCumulativeAggregate.md) | `from foundry_sdk.v2.ontologies.models import TimeSeriesCumulativeAggregate` | -**Ontologies** | [TimeseriesEntry](docs/v2/Ontologies/models/TimeseriesEntry.md) | `from foundry_sdk.v2.ontologies.models import TimeseriesEntry` | -**Ontologies** | [TimeSeriesPeriodicAggregate](docs/v2/Ontologies/models/TimeSeriesPeriodicAggregate.md) | `from foundry_sdk.v2.ontologies.models import TimeSeriesPeriodicAggregate` | -**Ontologies** | [TimeSeriesPoint](docs/v2/Ontologies/models/TimeSeriesPoint.md) | `from foundry_sdk.v2.ontologies.models import TimeSeriesPoint` | -**Ontologies** | [TimeSeriesRollingAggregate](docs/v2/Ontologies/models/TimeSeriesRollingAggregate.md) | `from foundry_sdk.v2.ontologies.models import TimeSeriesRollingAggregate` | -**Ontologies** | [TimeSeriesRollingAggregateWindow](docs/v2/Ontologies/models/TimeSeriesRollingAggregateWindow.md) | `from foundry_sdk.v2.ontologies.models import TimeSeriesRollingAggregateWindow` | -**Ontologies** | [TimeSeriesWindowType](docs/v2/Ontologies/models/TimeSeriesWindowType.md) | `from foundry_sdk.v2.ontologies.models import TimeSeriesWindowType` | -**Ontologies** | [TimeUnit](docs/v2/Ontologies/models/TimeUnit.md) | `from foundry_sdk.v2.ontologies.models import TimeUnit` | -**Ontologies** | [TransactionEdit](docs/v2/Ontologies/models/TransactionEdit.md) | `from foundry_sdk.v2.ontologies.models import TransactionEdit` | -**Ontologies** | [TwoDimensionalAggregation](docs/v2/Ontologies/models/TwoDimensionalAggregation.md) | `from foundry_sdk.v2.ontologies.models import TwoDimensionalAggregation` | -**Ontologies** | [UnevaluableConstraint](docs/v2/Ontologies/models/UnevaluableConstraint.md) | `from foundry_sdk.v2.ontologies.models import UnevaluableConstraint` | -**Ontologies** | [UniqueIdentifierArgument](docs/v2/Ontologies/models/UniqueIdentifierArgument.md) | `from foundry_sdk.v2.ontologies.models import UniqueIdentifierArgument` | -**Ontologies** | [UniqueIdentifierLinkId](docs/v2/Ontologies/models/UniqueIdentifierLinkId.md) | `from foundry_sdk.v2.ontologies.models import UniqueIdentifierLinkId` | -**Ontologies** | [UniqueIdentifierValue](docs/v2/Ontologies/models/UniqueIdentifierValue.md) | `from foundry_sdk.v2.ontologies.models import UniqueIdentifierValue` | -**Ontologies** | [UuidConstraint](docs/v2/Ontologies/models/UuidConstraint.md) | `from foundry_sdk.v2.ontologies.models import UuidConstraint` | -**Ontologies** | [ValidateActionResponseV2](docs/v2/Ontologies/models/ValidateActionResponseV2.md) | `from foundry_sdk.v2.ontologies.models import ValidateActionResponseV2` | -**Ontologies** | [ValidationResult](docs/v2/Ontologies/models/ValidationResult.md) | `from foundry_sdk.v2.ontologies.models import ValidationResult` | -**Ontologies** | [ValueType](docs/v2/Ontologies/models/ValueType.md) | `from foundry_sdk.v2.ontologies.models import ValueType` | -**Ontologies** | [ValueTypeApiName](docs/v2/Ontologies/models/ValueTypeApiName.md) | `from foundry_sdk.v2.ontologies.models import ValueTypeApiName` | -**Ontologies** | [ValueTypeArrayType](docs/v2/Ontologies/models/ValueTypeArrayType.md) | `from foundry_sdk.v2.ontologies.models import ValueTypeArrayType` | -**Ontologies** | [ValueTypeConstraint](docs/v2/Ontologies/models/ValueTypeConstraint.md) | `from foundry_sdk.v2.ontologies.models import ValueTypeConstraint` | -**Ontologies** | [ValueTypeDecimalType](docs/v2/Ontologies/models/ValueTypeDecimalType.md) | `from foundry_sdk.v2.ontologies.models import ValueTypeDecimalType` | -**Ontologies** | [ValueTypeFieldType](docs/v2/Ontologies/models/ValueTypeFieldType.md) | `from foundry_sdk.v2.ontologies.models import ValueTypeFieldType` | -**Ontologies** | [ValueTypeMapType](docs/v2/Ontologies/models/ValueTypeMapType.md) | `from foundry_sdk.v2.ontologies.models import ValueTypeMapType` | -**Ontologies** | [ValueTypeOptionalType](docs/v2/Ontologies/models/ValueTypeOptionalType.md) | `from foundry_sdk.v2.ontologies.models import ValueTypeOptionalType` | -**Ontologies** | [ValueTypeReferenceType](docs/v2/Ontologies/models/ValueTypeReferenceType.md) | `from foundry_sdk.v2.ontologies.models import ValueTypeReferenceType` | -**Ontologies** | [ValueTypeRid](docs/v2/Ontologies/models/ValueTypeRid.md) | `from foundry_sdk.v2.ontologies.models import ValueTypeRid` | -**Ontologies** | [ValueTypeStatus](docs/v2/Ontologies/models/ValueTypeStatus.md) | `from foundry_sdk.v2.ontologies.models import ValueTypeStatus` | -**Ontologies** | [ValueTypeStructField](docs/v2/Ontologies/models/ValueTypeStructField.md) | `from foundry_sdk.v2.ontologies.models import ValueTypeStructField` | -**Ontologies** | [ValueTypeStructType](docs/v2/Ontologies/models/ValueTypeStructType.md) | `from foundry_sdk.v2.ontologies.models import ValueTypeStructType` | -**Ontologies** | [ValueTypeUnionType](docs/v2/Ontologies/models/ValueTypeUnionType.md) | `from foundry_sdk.v2.ontologies.models import ValueTypeUnionType` | -**Ontologies** | [VersionedQueryTypeApiName](docs/v2/Ontologies/models/VersionedQueryTypeApiName.md) | `from foundry_sdk.v2.ontologies.models import VersionedQueryTypeApiName` | -**Ontologies** | [WildcardQuery](docs/v2/Ontologies/models/WildcardQuery.md) | `from foundry_sdk.v2.ontologies.models import WildcardQuery` | -**Ontologies** | [WithinBoundingBoxPoint](docs/v2/Ontologies/models/WithinBoundingBoxPoint.md) | `from foundry_sdk.v2.ontologies.models import WithinBoundingBoxPoint` | -**Ontologies** | [WithinBoundingBoxQuery](docs/v2/Ontologies/models/WithinBoundingBoxQuery.md) | `from foundry_sdk.v2.ontologies.models import WithinBoundingBoxQuery` | -**Ontologies** | [WithinDistanceOfQuery](docs/v2/Ontologies/models/WithinDistanceOfQuery.md) | `from foundry_sdk.v2.ontologies.models import WithinDistanceOfQuery` | -**Ontologies** | [WithinPolygonQuery](docs/v2/Ontologies/models/WithinPolygonQuery.md) | `from foundry_sdk.v2.ontologies.models import WithinPolygonQuery` | -**Orchestration** | [AbortOnFailure](docs/v2/Orchestration/models/AbortOnFailure.md) | `from foundry_sdk.v2.orchestration.models import AbortOnFailure` | -**Orchestration** | [Action](docs/v2/Orchestration/models/Action.md) | `from foundry_sdk.v2.orchestration.models import Action` | -**Orchestration** | [AffectedResourcesResponse](docs/v2/Orchestration/models/AffectedResourcesResponse.md) | `from foundry_sdk.v2.orchestration.models import AffectedResourcesResponse` | -**Orchestration** | [AndTrigger](docs/v2/Orchestration/models/AndTrigger.md) | `from foundry_sdk.v2.orchestration.models import AndTrigger` | -**Orchestration** | [Build](docs/v2/Orchestration/models/Build.md) | `from foundry_sdk.v2.orchestration.models import Build` | -**Orchestration** | [BuildableRid](docs/v2/Orchestration/models/BuildableRid.md) | `from foundry_sdk.v2.orchestration.models import BuildableRid` | -**Orchestration** | [BuildStatus](docs/v2/Orchestration/models/BuildStatus.md) | `from foundry_sdk.v2.orchestration.models import BuildStatus` | -**Orchestration** | [BuildTarget](docs/v2/Orchestration/models/BuildTarget.md) | `from foundry_sdk.v2.orchestration.models import BuildTarget` | -**Orchestration** | [ConnectingTarget](docs/v2/Orchestration/models/ConnectingTarget.md) | `from foundry_sdk.v2.orchestration.models import ConnectingTarget` | -**Orchestration** | [CreateBuildRequest](docs/v2/Orchestration/models/CreateBuildRequest.md) | `from foundry_sdk.v2.orchestration.models import CreateBuildRequest` | -**Orchestration** | [CreateScheduleRequest](docs/v2/Orchestration/models/CreateScheduleRequest.md) | `from foundry_sdk.v2.orchestration.models import CreateScheduleRequest` | -**Orchestration** | [CreateScheduleRequestAction](docs/v2/Orchestration/models/CreateScheduleRequestAction.md) | `from foundry_sdk.v2.orchestration.models import CreateScheduleRequestAction` | -**Orchestration** | [CreateScheduleRequestBuildTarget](docs/v2/Orchestration/models/CreateScheduleRequestBuildTarget.md) | `from foundry_sdk.v2.orchestration.models import CreateScheduleRequestBuildTarget` | -**Orchestration** | [CreateScheduleRequestConnectingTarget](docs/v2/Orchestration/models/CreateScheduleRequestConnectingTarget.md) | `from foundry_sdk.v2.orchestration.models import CreateScheduleRequestConnectingTarget` | -**Orchestration** | [CreateScheduleRequestManualTarget](docs/v2/Orchestration/models/CreateScheduleRequestManualTarget.md) | `from foundry_sdk.v2.orchestration.models import CreateScheduleRequestManualTarget` | -**Orchestration** | [CreateScheduleRequestProjectScope](docs/v2/Orchestration/models/CreateScheduleRequestProjectScope.md) | `from foundry_sdk.v2.orchestration.models import CreateScheduleRequestProjectScope` | -**Orchestration** | [CreateScheduleRequestScopeMode](docs/v2/Orchestration/models/CreateScheduleRequestScopeMode.md) | `from foundry_sdk.v2.orchestration.models import CreateScheduleRequestScopeMode` | -**Orchestration** | [CreateScheduleRequestUpstreamTarget](docs/v2/Orchestration/models/CreateScheduleRequestUpstreamTarget.md) | `from foundry_sdk.v2.orchestration.models import CreateScheduleRequestUpstreamTarget` | -**Orchestration** | [CreateScheduleRequestUserScope](docs/v2/Orchestration/models/CreateScheduleRequestUserScope.md) | `from foundry_sdk.v2.orchestration.models import CreateScheduleRequestUserScope` | -**Orchestration** | [CronExpression](docs/v2/Orchestration/models/CronExpression.md) | `from foundry_sdk.v2.orchestration.models import CronExpression` | -**Orchestration** | [DatasetJobOutput](docs/v2/Orchestration/models/DatasetJobOutput.md) | `from foundry_sdk.v2.orchestration.models import DatasetJobOutput` | -**Orchestration** | [DatasetUpdatedTrigger](docs/v2/Orchestration/models/DatasetUpdatedTrigger.md) | `from foundry_sdk.v2.orchestration.models import DatasetUpdatedTrigger` | -**Orchestration** | [FallbackBranches](docs/v2/Orchestration/models/FallbackBranches.md) | `from foundry_sdk.v2.orchestration.models import FallbackBranches` | -**Orchestration** | [ForceBuild](docs/v2/Orchestration/models/ForceBuild.md) | `from foundry_sdk.v2.orchestration.models import ForceBuild` | -**Orchestration** | [GetBuildsBatchRequestElement](docs/v2/Orchestration/models/GetBuildsBatchRequestElement.md) | `from foundry_sdk.v2.orchestration.models import GetBuildsBatchRequestElement` | -**Orchestration** | [GetBuildsBatchResponse](docs/v2/Orchestration/models/GetBuildsBatchResponse.md) | `from foundry_sdk.v2.orchestration.models import GetBuildsBatchResponse` | -**Orchestration** | [GetJobsBatchRequestElement](docs/v2/Orchestration/models/GetJobsBatchRequestElement.md) | `from foundry_sdk.v2.orchestration.models import GetJobsBatchRequestElement` | -**Orchestration** | [GetJobsBatchResponse](docs/v2/Orchestration/models/GetJobsBatchResponse.md) | `from foundry_sdk.v2.orchestration.models import GetJobsBatchResponse` | -**Orchestration** | [GetSchedulesBatchRequestElement](docs/v2/Orchestration/models/GetSchedulesBatchRequestElement.md) | `from foundry_sdk.v2.orchestration.models import GetSchedulesBatchRequestElement` | -**Orchestration** | [GetSchedulesBatchResponse](docs/v2/Orchestration/models/GetSchedulesBatchResponse.md) | `from foundry_sdk.v2.orchestration.models import GetSchedulesBatchResponse` | -**Orchestration** | [Job](docs/v2/Orchestration/models/Job.md) | `from foundry_sdk.v2.orchestration.models import Job` | -**Orchestration** | [JobOutput](docs/v2/Orchestration/models/JobOutput.md) | `from foundry_sdk.v2.orchestration.models import JobOutput` | -**Orchestration** | [JobStartedTime](docs/v2/Orchestration/models/JobStartedTime.md) | `from foundry_sdk.v2.orchestration.models import JobStartedTime` | -**Orchestration** | [JobStatus](docs/v2/Orchestration/models/JobStatus.md) | `from foundry_sdk.v2.orchestration.models import JobStatus` | -**Orchestration** | [JobSucceededTrigger](docs/v2/Orchestration/models/JobSucceededTrigger.md) | `from foundry_sdk.v2.orchestration.models import JobSucceededTrigger` | -**Orchestration** | [ListJobsOfBuildResponse](docs/v2/Orchestration/models/ListJobsOfBuildResponse.md) | `from foundry_sdk.v2.orchestration.models import ListJobsOfBuildResponse` | -**Orchestration** | [ListRunsOfScheduleResponse](docs/v2/Orchestration/models/ListRunsOfScheduleResponse.md) | `from foundry_sdk.v2.orchestration.models import ListRunsOfScheduleResponse` | -**Orchestration** | [ManualTarget](docs/v2/Orchestration/models/ManualTarget.md) | `from foundry_sdk.v2.orchestration.models import ManualTarget` | -**Orchestration** | [ManualTrigger](docs/v2/Orchestration/models/ManualTrigger.md) | `from foundry_sdk.v2.orchestration.models import ManualTrigger` | -**Orchestration** | [MediaSetUpdatedTrigger](docs/v2/Orchestration/models/MediaSetUpdatedTrigger.md) | `from foundry_sdk.v2.orchestration.models import MediaSetUpdatedTrigger` | -**Orchestration** | [NewLogicTrigger](docs/v2/Orchestration/models/NewLogicTrigger.md) | `from foundry_sdk.v2.orchestration.models import NewLogicTrigger` | -**Orchestration** | [NotificationsEnabled](docs/v2/Orchestration/models/NotificationsEnabled.md) | `from foundry_sdk.v2.orchestration.models import NotificationsEnabled` | -**Orchestration** | [OrTrigger](docs/v2/Orchestration/models/OrTrigger.md) | `from foundry_sdk.v2.orchestration.models import OrTrigger` | -**Orchestration** | [ProjectScope](docs/v2/Orchestration/models/ProjectScope.md) | `from foundry_sdk.v2.orchestration.models import ProjectScope` | -**Orchestration** | [ReplaceScheduleRequest](docs/v2/Orchestration/models/ReplaceScheduleRequest.md) | `from foundry_sdk.v2.orchestration.models import ReplaceScheduleRequest` | -**Orchestration** | [ReplaceScheduleRequestAction](docs/v2/Orchestration/models/ReplaceScheduleRequestAction.md) | `from foundry_sdk.v2.orchestration.models import ReplaceScheduleRequestAction` | -**Orchestration** | [ReplaceScheduleRequestBuildTarget](docs/v2/Orchestration/models/ReplaceScheduleRequestBuildTarget.md) | `from foundry_sdk.v2.orchestration.models import ReplaceScheduleRequestBuildTarget` | -**Orchestration** | [ReplaceScheduleRequestConnectingTarget](docs/v2/Orchestration/models/ReplaceScheduleRequestConnectingTarget.md) | `from foundry_sdk.v2.orchestration.models import ReplaceScheduleRequestConnectingTarget` | -**Orchestration** | [ReplaceScheduleRequestManualTarget](docs/v2/Orchestration/models/ReplaceScheduleRequestManualTarget.md) | `from foundry_sdk.v2.orchestration.models import ReplaceScheduleRequestManualTarget` | -**Orchestration** | [ReplaceScheduleRequestProjectScope](docs/v2/Orchestration/models/ReplaceScheduleRequestProjectScope.md) | `from foundry_sdk.v2.orchestration.models import ReplaceScheduleRequestProjectScope` | -**Orchestration** | [ReplaceScheduleRequestScopeMode](docs/v2/Orchestration/models/ReplaceScheduleRequestScopeMode.md) | `from foundry_sdk.v2.orchestration.models import ReplaceScheduleRequestScopeMode` | -**Orchestration** | [ReplaceScheduleRequestUpstreamTarget](docs/v2/Orchestration/models/ReplaceScheduleRequestUpstreamTarget.md) | `from foundry_sdk.v2.orchestration.models import ReplaceScheduleRequestUpstreamTarget` | -**Orchestration** | [ReplaceScheduleRequestUserScope](docs/v2/Orchestration/models/ReplaceScheduleRequestUserScope.md) | `from foundry_sdk.v2.orchestration.models import ReplaceScheduleRequestUserScope` | -**Orchestration** | [RetryBackoffDuration](docs/v2/Orchestration/models/RetryBackoffDuration.md) | `from foundry_sdk.v2.orchestration.models import RetryBackoffDuration` | -**Orchestration** | [RetryCount](docs/v2/Orchestration/models/RetryCount.md) | `from foundry_sdk.v2.orchestration.models import RetryCount` | -**Orchestration** | [Schedule](docs/v2/Orchestration/models/Schedule.md) | `from foundry_sdk.v2.orchestration.models import Schedule` | -**Orchestration** | [SchedulePaused](docs/v2/Orchestration/models/SchedulePaused.md) | `from foundry_sdk.v2.orchestration.models import SchedulePaused` | -**Orchestration** | [ScheduleRun](docs/v2/Orchestration/models/ScheduleRun.md) | `from foundry_sdk.v2.orchestration.models import ScheduleRun` | -**Orchestration** | [ScheduleRunError](docs/v2/Orchestration/models/ScheduleRunError.md) | `from foundry_sdk.v2.orchestration.models import ScheduleRunError` | -**Orchestration** | [ScheduleRunErrorName](docs/v2/Orchestration/models/ScheduleRunErrorName.md) | `from foundry_sdk.v2.orchestration.models import ScheduleRunErrorName` | -**Orchestration** | [ScheduleRunIgnored](docs/v2/Orchestration/models/ScheduleRunIgnored.md) | `from foundry_sdk.v2.orchestration.models import ScheduleRunIgnored` | -**Orchestration** | [ScheduleRunResult](docs/v2/Orchestration/models/ScheduleRunResult.md) | `from foundry_sdk.v2.orchestration.models import ScheduleRunResult` | -**Orchestration** | [ScheduleRunRid](docs/v2/Orchestration/models/ScheduleRunRid.md) | `from foundry_sdk.v2.orchestration.models import ScheduleRunRid` | -**Orchestration** | [ScheduleRunSubmitted](docs/v2/Orchestration/models/ScheduleRunSubmitted.md) | `from foundry_sdk.v2.orchestration.models import ScheduleRunSubmitted` | -**Orchestration** | [ScheduleSucceededTrigger](docs/v2/Orchestration/models/ScheduleSucceededTrigger.md) | `from foundry_sdk.v2.orchestration.models import ScheduleSucceededTrigger` | -**Orchestration** | [ScheduleVersion](docs/v2/Orchestration/models/ScheduleVersion.md) | `from foundry_sdk.v2.orchestration.models import ScheduleVersion` | -**Orchestration** | [ScheduleVersionRid](docs/v2/Orchestration/models/ScheduleVersionRid.md) | `from foundry_sdk.v2.orchestration.models import ScheduleVersionRid` | -**Orchestration** | [ScopeMode](docs/v2/Orchestration/models/ScopeMode.md) | `from foundry_sdk.v2.orchestration.models import ScopeMode` | -**Orchestration** | [SearchBuildsAndFilter](docs/v2/Orchestration/models/SearchBuildsAndFilter.md) | `from foundry_sdk.v2.orchestration.models import SearchBuildsAndFilter` | -**Orchestration** | [SearchBuildsEqualsFilter](docs/v2/Orchestration/models/SearchBuildsEqualsFilter.md) | `from foundry_sdk.v2.orchestration.models import SearchBuildsEqualsFilter` | -**Orchestration** | [SearchBuildsEqualsFilterField](docs/v2/Orchestration/models/SearchBuildsEqualsFilterField.md) | `from foundry_sdk.v2.orchestration.models import SearchBuildsEqualsFilterField` | -**Orchestration** | [SearchBuildsFilter](docs/v2/Orchestration/models/SearchBuildsFilter.md) | `from foundry_sdk.v2.orchestration.models import SearchBuildsFilter` | -**Orchestration** | [SearchBuildsGteFilter](docs/v2/Orchestration/models/SearchBuildsGteFilter.md) | `from foundry_sdk.v2.orchestration.models import SearchBuildsGteFilter` | -**Orchestration** | [SearchBuildsGteFilterField](docs/v2/Orchestration/models/SearchBuildsGteFilterField.md) | `from foundry_sdk.v2.orchestration.models import SearchBuildsGteFilterField` | -**Orchestration** | [SearchBuildsLtFilter](docs/v2/Orchestration/models/SearchBuildsLtFilter.md) | `from foundry_sdk.v2.orchestration.models import SearchBuildsLtFilter` | -**Orchestration** | [SearchBuildsLtFilterField](docs/v2/Orchestration/models/SearchBuildsLtFilterField.md) | `from foundry_sdk.v2.orchestration.models import SearchBuildsLtFilterField` | -**Orchestration** | [SearchBuildsNotFilter](docs/v2/Orchestration/models/SearchBuildsNotFilter.md) | `from foundry_sdk.v2.orchestration.models import SearchBuildsNotFilter` | -**Orchestration** | [SearchBuildsOrderBy](docs/v2/Orchestration/models/SearchBuildsOrderBy.md) | `from foundry_sdk.v2.orchestration.models import SearchBuildsOrderBy` | -**Orchestration** | [SearchBuildsOrderByField](docs/v2/Orchestration/models/SearchBuildsOrderByField.md) | `from foundry_sdk.v2.orchestration.models import SearchBuildsOrderByField` | -**Orchestration** | [SearchBuildsOrderByItem](docs/v2/Orchestration/models/SearchBuildsOrderByItem.md) | `from foundry_sdk.v2.orchestration.models import SearchBuildsOrderByItem` | -**Orchestration** | [SearchBuildsOrFilter](docs/v2/Orchestration/models/SearchBuildsOrFilter.md) | `from foundry_sdk.v2.orchestration.models import SearchBuildsOrFilter` | -**Orchestration** | [SearchBuildsRequest](docs/v2/Orchestration/models/SearchBuildsRequest.md) | `from foundry_sdk.v2.orchestration.models import SearchBuildsRequest` | -**Orchestration** | [SearchBuildsResponse](docs/v2/Orchestration/models/SearchBuildsResponse.md) | `from foundry_sdk.v2.orchestration.models import SearchBuildsResponse` | -**Orchestration** | [TableUpdatedTrigger](docs/v2/Orchestration/models/TableUpdatedTrigger.md) | `from foundry_sdk.v2.orchestration.models import TableUpdatedTrigger` | -**Orchestration** | [TimeTrigger](docs/v2/Orchestration/models/TimeTrigger.md) | `from foundry_sdk.v2.orchestration.models import TimeTrigger` | -**Orchestration** | [TransactionalMediaSetJobOutput](docs/v2/Orchestration/models/TransactionalMediaSetJobOutput.md) | `from foundry_sdk.v2.orchestration.models import TransactionalMediaSetJobOutput` | -**Orchestration** | [Trigger](docs/v2/Orchestration/models/Trigger.md) | `from foundry_sdk.v2.orchestration.models import Trigger` | -**Orchestration** | [UpstreamTarget](docs/v2/Orchestration/models/UpstreamTarget.md) | `from foundry_sdk.v2.orchestration.models import UpstreamTarget` | -**Orchestration** | [UserScope](docs/v2/Orchestration/models/UserScope.md) | `from foundry_sdk.v2.orchestration.models import UserScope` | -**SqlQueries** | [CanceledQueryStatus](docs/v2/SqlQueries/models/CanceledQueryStatus.md) | `from foundry_sdk.v2.sql_queries.models import CanceledQueryStatus` | -**SqlQueries** | [ExecuteSqlQueryRequest](docs/v2/SqlQueries/models/ExecuteSqlQueryRequest.md) | `from foundry_sdk.v2.sql_queries.models import ExecuteSqlQueryRequest` | -**SqlQueries** | [FailedQueryStatus](docs/v2/SqlQueries/models/FailedQueryStatus.md) | `from foundry_sdk.v2.sql_queries.models import FailedQueryStatus` | -**SqlQueries** | [QueryStatus](docs/v2/SqlQueries/models/QueryStatus.md) | `from foundry_sdk.v2.sql_queries.models import QueryStatus` | -**SqlQueries** | [RunningQueryStatus](docs/v2/SqlQueries/models/RunningQueryStatus.md) | `from foundry_sdk.v2.sql_queries.models import RunningQueryStatus` | -**SqlQueries** | [SqlQueryId](docs/v2/SqlQueries/models/SqlQueryId.md) | `from foundry_sdk.v2.sql_queries.models import SqlQueryId` | -**SqlQueries** | [SucceededQueryStatus](docs/v2/SqlQueries/models/SucceededQueryStatus.md) | `from foundry_sdk.v2.sql_queries.models import SucceededQueryStatus` | -**Streams** | [Compressed](docs/v2/Streams/models/Compressed.md) | `from foundry_sdk.v2.streams.models import Compressed` | -**Streams** | [CreateStreamingDatasetRequest](docs/v2/Streams/models/CreateStreamingDatasetRequest.md) | `from foundry_sdk.v2.streams.models import CreateStreamingDatasetRequest` | -**Streams** | [CreateStreamRequest](docs/v2/Streams/models/CreateStreamRequest.md) | `from foundry_sdk.v2.streams.models import CreateStreamRequest` | -**Streams** | [CreateStreamRequestStreamSchema](docs/v2/Streams/models/CreateStreamRequestStreamSchema.md) | `from foundry_sdk.v2.streams.models import CreateStreamRequestStreamSchema` | -**Streams** | [Dataset](docs/v2/Streams/models/Dataset.md) | `from foundry_sdk.v2.streams.models import Dataset` | -**Streams** | [PartitionsCount](docs/v2/Streams/models/PartitionsCount.md) | `from foundry_sdk.v2.streams.models import PartitionsCount` | -**Streams** | [PublishRecordsToStreamRequest](docs/v2/Streams/models/PublishRecordsToStreamRequest.md) | `from foundry_sdk.v2.streams.models import PublishRecordsToStreamRequest` | -**Streams** | [PublishRecordToStreamRequest](docs/v2/Streams/models/PublishRecordToStreamRequest.md) | `from foundry_sdk.v2.streams.models import PublishRecordToStreamRequest` | -**Streams** | [Record](docs/v2/Streams/models/Record.md) | `from foundry_sdk.v2.streams.models import Record` | -**Streams** | [ResetStreamRequest](docs/v2/Streams/models/ResetStreamRequest.md) | `from foundry_sdk.v2.streams.models import ResetStreamRequest` | -**Streams** | [Stream](docs/v2/Streams/models/Stream.md) | `from foundry_sdk.v2.streams.models import Stream` | -**Streams** | [StreamType](docs/v2/Streams/models/StreamType.md) | `from foundry_sdk.v2.streams.models import StreamType` | -**Streams** | [ViewRid](docs/v2/Streams/models/ViewRid.md) | `from foundry_sdk.v2.streams.models import ViewRid` | -**ThirdPartyApplications** | [DeployWebsiteRequest](docs/v2/ThirdPartyApplications/models/DeployWebsiteRequest.md) | `from foundry_sdk.v2.third_party_applications.models import DeployWebsiteRequest` | -**ThirdPartyApplications** | [ListVersionsResponse](docs/v2/ThirdPartyApplications/models/ListVersionsResponse.md) | `from foundry_sdk.v2.third_party_applications.models import ListVersionsResponse` | -**ThirdPartyApplications** | [Subdomain](docs/v2/ThirdPartyApplications/models/Subdomain.md) | `from foundry_sdk.v2.third_party_applications.models import Subdomain` | -**ThirdPartyApplications** | [ThirdPartyApplication](docs/v2/ThirdPartyApplications/models/ThirdPartyApplication.md) | `from foundry_sdk.v2.third_party_applications.models import ThirdPartyApplication` | -**ThirdPartyApplications** | [ThirdPartyApplicationRid](docs/v2/ThirdPartyApplications/models/ThirdPartyApplicationRid.md) | `from foundry_sdk.v2.third_party_applications.models import ThirdPartyApplicationRid` | -**ThirdPartyApplications** | [Version](docs/v2/ThirdPartyApplications/models/Version.md) | `from foundry_sdk.v2.third_party_applications.models import Version` | -**ThirdPartyApplications** | [VersionVersion](docs/v2/ThirdPartyApplications/models/VersionVersion.md) | `from foundry_sdk.v2.third_party_applications.models import VersionVersion` | -**ThirdPartyApplications** | [Website](docs/v2/ThirdPartyApplications/models/Website.md) | `from foundry_sdk.v2.third_party_applications.models import Website` | -**Widgets** | [DevModeSettings](docs/v2/Widgets/models/DevModeSettings.md) | `from foundry_sdk.v2.widgets.models import DevModeSettings` | -**Widgets** | [DevModeStatus](docs/v2/Widgets/models/DevModeStatus.md) | `from foundry_sdk.v2.widgets.models import DevModeStatus` | -**Widgets** | [FilePath](docs/v2/Widgets/models/FilePath.md) | `from foundry_sdk.v2.widgets.models import FilePath` | -**Widgets** | [ListReleasesResponse](docs/v2/Widgets/models/ListReleasesResponse.md) | `from foundry_sdk.v2.widgets.models import ListReleasesResponse` | -**Widgets** | [Release](docs/v2/Widgets/models/Release.md) | `from foundry_sdk.v2.widgets.models import Release` | -**Widgets** | [ReleaseLocator](docs/v2/Widgets/models/ReleaseLocator.md) | `from foundry_sdk.v2.widgets.models import ReleaseLocator` | -**Widgets** | [ReleaseVersion](docs/v2/Widgets/models/ReleaseVersion.md) | `from foundry_sdk.v2.widgets.models import ReleaseVersion` | -**Widgets** | [Repository](docs/v2/Widgets/models/Repository.md) | `from foundry_sdk.v2.widgets.models import Repository` | -**Widgets** | [RepositoryRid](docs/v2/Widgets/models/RepositoryRid.md) | `from foundry_sdk.v2.widgets.models import RepositoryRid` | -**Widgets** | [RepositoryVersion](docs/v2/Widgets/models/RepositoryVersion.md) | `from foundry_sdk.v2.widgets.models import RepositoryVersion` | -**Widgets** | [ScriptEntrypoint](docs/v2/Widgets/models/ScriptEntrypoint.md) | `from foundry_sdk.v2.widgets.models import ScriptEntrypoint` | -**Widgets** | [ScriptType](docs/v2/Widgets/models/ScriptType.md) | `from foundry_sdk.v2.widgets.models import ScriptType` | -**Widgets** | [SetWidgetSetDevModeSettingsByIdRequest](docs/v2/Widgets/models/SetWidgetSetDevModeSettingsByIdRequest.md) | `from foundry_sdk.v2.widgets.models import SetWidgetSetDevModeSettingsByIdRequest` | -**Widgets** | [SetWidgetSetDevModeSettingsRequest](docs/v2/Widgets/models/SetWidgetSetDevModeSettingsRequest.md) | `from foundry_sdk.v2.widgets.models import SetWidgetSetDevModeSettingsRequest` | -**Widgets** | [StylesheetEntrypoint](docs/v2/Widgets/models/StylesheetEntrypoint.md) | `from foundry_sdk.v2.widgets.models import StylesheetEntrypoint` | -**Widgets** | [WidgetDevModeSettings](docs/v2/Widgets/models/WidgetDevModeSettings.md) | `from foundry_sdk.v2.widgets.models import WidgetDevModeSettings` | -**Widgets** | [WidgetId](docs/v2/Widgets/models/WidgetId.md) | `from foundry_sdk.v2.widgets.models import WidgetId` | -**Widgets** | [WidgetRid](docs/v2/Widgets/models/WidgetRid.md) | `from foundry_sdk.v2.widgets.models import WidgetRid` | -**Widgets** | [WidgetSet](docs/v2/Widgets/models/WidgetSet.md) | `from foundry_sdk.v2.widgets.models import WidgetSet` | -**Widgets** | [WidgetSetDevModeSettings](docs/v2/Widgets/models/WidgetSetDevModeSettings.md) | `from foundry_sdk.v2.widgets.models import WidgetSetDevModeSettings` | -**Widgets** | [WidgetSetDevModeSettingsById](docs/v2/Widgets/models/WidgetSetDevModeSettingsById.md) | `from foundry_sdk.v2.widgets.models import WidgetSetDevModeSettingsById` | -**Widgets** | [WidgetSetRid](docs/v2/Widgets/models/WidgetSetRid.md) | `from foundry_sdk.v2.widgets.models import WidgetSetRid` | - - -## Documentation for V1 models - -Namespace | Name | Import | ---------- | ---- | ------ | -**Core** | [AnyType](docs/v1/Core/models/AnyType.md) | `from foundry_sdk.v1.core.models import AnyType` | -**Core** | [AttachmentType](docs/v1/Core/models/AttachmentType.md) | `from foundry_sdk.v1.core.models import AttachmentType` | -**Core** | [Attribution](docs/v1/Core/models/Attribution.md) | `from foundry_sdk.v1.core.models import Attribution` | -**Core** | [BinaryType](docs/v1/Core/models/BinaryType.md) | `from foundry_sdk.v1.core.models import BinaryType` | -**Core** | [BooleanType](docs/v1/Core/models/BooleanType.md) | `from foundry_sdk.v1.core.models import BooleanType` | -**Core** | [ByteType](docs/v1/Core/models/ByteType.md) | `from foundry_sdk.v1.core.models import ByteType` | -**Core** | [CipherTextType](docs/v1/Core/models/CipherTextType.md) | `from foundry_sdk.v1.core.models import CipherTextType` | -**Core** | [ContentLength](docs/v1/Core/models/ContentLength.md) | `from foundry_sdk.v1.core.models import ContentLength` | -**Core** | [ContentType](docs/v1/Core/models/ContentType.md) | `from foundry_sdk.v1.core.models import ContentType` | -**Core** | [DateType](docs/v1/Core/models/DateType.md) | `from foundry_sdk.v1.core.models import DateType` | -**Core** | [DecimalType](docs/v1/Core/models/DecimalType.md) | `from foundry_sdk.v1.core.models import DecimalType` | -**Core** | [DisplayName](docs/v1/Core/models/DisplayName.md) | `from foundry_sdk.v1.core.models import DisplayName` | -**Core** | [DistanceUnit](docs/v1/Core/models/DistanceUnit.md) | `from foundry_sdk.v1.core.models import DistanceUnit` | -**Core** | [DoubleType](docs/v1/Core/models/DoubleType.md) | `from foundry_sdk.v1.core.models import DoubleType` | -**Core** | [Filename](docs/v1/Core/models/Filename.md) | `from foundry_sdk.v1.core.models import Filename` | -**Core** | [FilePath](docs/v1/Core/models/FilePath.md) | `from foundry_sdk.v1.core.models import FilePath` | -**Core** | [FloatType](docs/v1/Core/models/FloatType.md) | `from foundry_sdk.v1.core.models import FloatType` | -**Core** | [FolderRid](docs/v1/Core/models/FolderRid.md) | `from foundry_sdk.v1.core.models import FolderRid` | -**Core** | [FoundryBranch](docs/v1/Core/models/FoundryBranch.md) | `from foundry_sdk.v1.core.models import FoundryBranch` | -**Core** | [IntegerType](docs/v1/Core/models/IntegerType.md) | `from foundry_sdk.v1.core.models import IntegerType` | -**Core** | [LongType](docs/v1/Core/models/LongType.md) | `from foundry_sdk.v1.core.models import LongType` | -**Core** | [MarkingType](docs/v1/Core/models/MarkingType.md) | `from foundry_sdk.v1.core.models import MarkingType` | -**Core** | [MediaType](docs/v1/Core/models/MediaType.md) | `from foundry_sdk.v1.core.models import MediaType` | -**Core** | [NullType](docs/v1/Core/models/NullType.md) | `from foundry_sdk.v1.core.models import NullType` | -**Core** | [OperationScope](docs/v1/Core/models/OperationScope.md) | `from foundry_sdk.v1.core.models import OperationScope` | -**Core** | [PageSize](docs/v1/Core/models/PageSize.md) | `from foundry_sdk.v1.core.models import PageSize` | -**Core** | [PageToken](docs/v1/Core/models/PageToken.md) | `from foundry_sdk.v1.core.models import PageToken` | -**Core** | [PreviewMode](docs/v1/Core/models/PreviewMode.md) | `from foundry_sdk.v1.core.models import PreviewMode` | -**Core** | [ReleaseStatus](docs/v1/Core/models/ReleaseStatus.md) | `from foundry_sdk.v1.core.models import ReleaseStatus` | -**Core** | [ShortType](docs/v1/Core/models/ShortType.md) | `from foundry_sdk.v1.core.models import ShortType` | -**Core** | [SizeBytes](docs/v1/Core/models/SizeBytes.md) | `from foundry_sdk.v1.core.models import SizeBytes` | -**Core** | [StringType](docs/v1/Core/models/StringType.md) | `from foundry_sdk.v1.core.models import StringType` | -**Core** | [StructFieldName](docs/v1/Core/models/StructFieldName.md) | `from foundry_sdk.v1.core.models import StructFieldName` | -**Core** | [TimestampType](docs/v1/Core/models/TimestampType.md) | `from foundry_sdk.v1.core.models import TimestampType` | -**Core** | [TotalCount](docs/v1/Core/models/TotalCount.md) | `from foundry_sdk.v1.core.models import TotalCount` | -**Core** | [TraceParent](docs/v1/Core/models/TraceParent.md) | `from foundry_sdk.v1.core.models import TraceParent` | -**Core** | [TraceState](docs/v1/Core/models/TraceState.md) | `from foundry_sdk.v1.core.models import TraceState` | -**Core** | [UnsupportedType](docs/v1/Core/models/UnsupportedType.md) | `from foundry_sdk.v1.core.models import UnsupportedType` | -**Datasets** | [Branch](docs/v1/Datasets/models/Branch.md) | `from foundry_sdk.v1.datasets.models import Branch` | -**Datasets** | [BranchId](docs/v1/Datasets/models/BranchId.md) | `from foundry_sdk.v1.datasets.models import BranchId` | -**Datasets** | [CreateBranchRequest](docs/v1/Datasets/models/CreateBranchRequest.md) | `from foundry_sdk.v1.datasets.models import CreateBranchRequest` | -**Datasets** | [CreateDatasetRequest](docs/v1/Datasets/models/CreateDatasetRequest.md) | `from foundry_sdk.v1.datasets.models import CreateDatasetRequest` | -**Datasets** | [CreateTransactionRequest](docs/v1/Datasets/models/CreateTransactionRequest.md) | `from foundry_sdk.v1.datasets.models import CreateTransactionRequest` | -**Datasets** | [Dataset](docs/v1/Datasets/models/Dataset.md) | `from foundry_sdk.v1.datasets.models import Dataset` | -**Datasets** | [DatasetName](docs/v1/Datasets/models/DatasetName.md) | `from foundry_sdk.v1.datasets.models import DatasetName` | -**Datasets** | [DatasetRid](docs/v1/Datasets/models/DatasetRid.md) | `from foundry_sdk.v1.datasets.models import DatasetRid` | -**Datasets** | [File](docs/v1/Datasets/models/File.md) | `from foundry_sdk.v1.datasets.models import File` | -**Datasets** | [ListBranchesResponse](docs/v1/Datasets/models/ListBranchesResponse.md) | `from foundry_sdk.v1.datasets.models import ListBranchesResponse` | -**Datasets** | [ListFilesResponse](docs/v1/Datasets/models/ListFilesResponse.md) | `from foundry_sdk.v1.datasets.models import ListFilesResponse` | -**Datasets** | [TableExportFormat](docs/v1/Datasets/models/TableExportFormat.md) | `from foundry_sdk.v1.datasets.models import TableExportFormat` | -**Datasets** | [Transaction](docs/v1/Datasets/models/Transaction.md) | `from foundry_sdk.v1.datasets.models import Transaction` | -**Datasets** | [TransactionRid](docs/v1/Datasets/models/TransactionRid.md) | `from foundry_sdk.v1.datasets.models import TransactionRid` | -**Datasets** | [TransactionStatus](docs/v1/Datasets/models/TransactionStatus.md) | `from foundry_sdk.v1.datasets.models import TransactionStatus` | -**Datasets** | [TransactionType](docs/v1/Datasets/models/TransactionType.md) | `from foundry_sdk.v1.datasets.models import TransactionType` | -**Ontologies** | [ActionRid](docs/v1/Ontologies/models/ActionRid.md) | `from foundry_sdk.v1.ontologies.models import ActionRid` | -**Ontologies** | [ActionType](docs/v1/Ontologies/models/ActionType.md) | `from foundry_sdk.v1.ontologies.models import ActionType` | -**Ontologies** | [ActionTypeApiName](docs/v1/Ontologies/models/ActionTypeApiName.md) | `from foundry_sdk.v1.ontologies.models import ActionTypeApiName` | -**Ontologies** | [ActionTypeRid](docs/v1/Ontologies/models/ActionTypeRid.md) | `from foundry_sdk.v1.ontologies.models import ActionTypeRid` | -**Ontologies** | [AggregateObjectsRequest](docs/v1/Ontologies/models/AggregateObjectsRequest.md) | `from foundry_sdk.v1.ontologies.models import AggregateObjectsRequest` | -**Ontologies** | [AggregateObjectsResponse](docs/v1/Ontologies/models/AggregateObjectsResponse.md) | `from foundry_sdk.v1.ontologies.models import AggregateObjectsResponse` | -**Ontologies** | [AggregateObjectsResponseItem](docs/v1/Ontologies/models/AggregateObjectsResponseItem.md) | `from foundry_sdk.v1.ontologies.models import AggregateObjectsResponseItem` | -**Ontologies** | [Aggregation](docs/v1/Ontologies/models/Aggregation.md) | `from foundry_sdk.v1.ontologies.models import Aggregation` | -**Ontologies** | [AggregationDurationGrouping](docs/v1/Ontologies/models/AggregationDurationGrouping.md) | `from foundry_sdk.v1.ontologies.models import AggregationDurationGrouping` | -**Ontologies** | [AggregationExactGrouping](docs/v1/Ontologies/models/AggregationExactGrouping.md) | `from foundry_sdk.v1.ontologies.models import AggregationExactGrouping` | -**Ontologies** | [AggregationFixedWidthGrouping](docs/v1/Ontologies/models/AggregationFixedWidthGrouping.md) | `from foundry_sdk.v1.ontologies.models import AggregationFixedWidthGrouping` | -**Ontologies** | [AggregationGroupBy](docs/v1/Ontologies/models/AggregationGroupBy.md) | `from foundry_sdk.v1.ontologies.models import AggregationGroupBy` | -**Ontologies** | [AggregationGroupKey](docs/v1/Ontologies/models/AggregationGroupKey.md) | `from foundry_sdk.v1.ontologies.models import AggregationGroupKey` | -**Ontologies** | [AggregationGroupValue](docs/v1/Ontologies/models/AggregationGroupValue.md) | `from foundry_sdk.v1.ontologies.models import AggregationGroupValue` | -**Ontologies** | [AggregationMetricName](docs/v1/Ontologies/models/AggregationMetricName.md) | `from foundry_sdk.v1.ontologies.models import AggregationMetricName` | -**Ontologies** | [AggregationMetricResult](docs/v1/Ontologies/models/AggregationMetricResult.md) | `from foundry_sdk.v1.ontologies.models import AggregationMetricResult` | -**Ontologies** | [AggregationRange](docs/v1/Ontologies/models/AggregationRange.md) | `from foundry_sdk.v1.ontologies.models import AggregationRange` | -**Ontologies** | [AggregationRangesGrouping](docs/v1/Ontologies/models/AggregationRangesGrouping.md) | `from foundry_sdk.v1.ontologies.models import AggregationRangesGrouping` | -**Ontologies** | [AllTermsQuery](docs/v1/Ontologies/models/AllTermsQuery.md) | `from foundry_sdk.v1.ontologies.models import AllTermsQuery` | -**Ontologies** | [AndQuery](docs/v1/Ontologies/models/AndQuery.md) | `from foundry_sdk.v1.ontologies.models import AndQuery` | -**Ontologies** | [AnyTermQuery](docs/v1/Ontologies/models/AnyTermQuery.md) | `from foundry_sdk.v1.ontologies.models import AnyTermQuery` | -**Ontologies** | [ApplyActionMode](docs/v1/Ontologies/models/ApplyActionMode.md) | `from foundry_sdk.v1.ontologies.models import ApplyActionMode` | -**Ontologies** | [ApplyActionRequest](docs/v1/Ontologies/models/ApplyActionRequest.md) | `from foundry_sdk.v1.ontologies.models import ApplyActionRequest` | -**Ontologies** | [ApplyActionRequestOptions](docs/v1/Ontologies/models/ApplyActionRequestOptions.md) | `from foundry_sdk.v1.ontologies.models import ApplyActionRequestOptions` | -**Ontologies** | [ApplyActionResponse](docs/v1/Ontologies/models/ApplyActionResponse.md) | `from foundry_sdk.v1.ontologies.models import ApplyActionResponse` | -**Ontologies** | [ApproximateDistinctAggregation](docs/v1/Ontologies/models/ApproximateDistinctAggregation.md) | `from foundry_sdk.v1.ontologies.models import ApproximateDistinctAggregation` | -**Ontologies** | [ArrayEntryEvaluatedConstraint](docs/v1/Ontologies/models/ArrayEntryEvaluatedConstraint.md) | `from foundry_sdk.v1.ontologies.models import ArrayEntryEvaluatedConstraint` | -**Ontologies** | [ArrayEvaluatedConstraint](docs/v1/Ontologies/models/ArrayEvaluatedConstraint.md) | `from foundry_sdk.v1.ontologies.models import ArrayEvaluatedConstraint` | -**Ontologies** | [ArraySizeConstraint](docs/v1/Ontologies/models/ArraySizeConstraint.md) | `from foundry_sdk.v1.ontologies.models import ArraySizeConstraint` | -**Ontologies** | [ArtifactRepositoryRid](docs/v1/Ontologies/models/ArtifactRepositoryRid.md) | `from foundry_sdk.v1.ontologies.models import ArtifactRepositoryRid` | -**Ontologies** | [Attachment](docs/v1/Ontologies/models/Attachment.md) | `from foundry_sdk.v1.ontologies.models import Attachment` | -**Ontologies** | [AttachmentRid](docs/v1/Ontologies/models/AttachmentRid.md) | `from foundry_sdk.v1.ontologies.models import AttachmentRid` | -**Ontologies** | [AvgAggregation](docs/v1/Ontologies/models/AvgAggregation.md) | `from foundry_sdk.v1.ontologies.models import AvgAggregation` | -**Ontologies** | [BatchApplyActionRequest](docs/v1/Ontologies/models/BatchApplyActionRequest.md) | `from foundry_sdk.v1.ontologies.models import BatchApplyActionRequest` | -**Ontologies** | [BatchApplyActionResponse](docs/v1/Ontologies/models/BatchApplyActionResponse.md) | `from foundry_sdk.v1.ontologies.models import BatchApplyActionResponse` | -**Ontologies** | [ContainsQuery](docs/v1/Ontologies/models/ContainsQuery.md) | `from foundry_sdk.v1.ontologies.models import ContainsQuery` | -**Ontologies** | [CountAggregation](docs/v1/Ontologies/models/CountAggregation.md) | `from foundry_sdk.v1.ontologies.models import CountAggregation` | -**Ontologies** | [CreateInterfaceObjectRule](docs/v1/Ontologies/models/CreateInterfaceObjectRule.md) | `from foundry_sdk.v1.ontologies.models import CreateInterfaceObjectRule` | -**Ontologies** | [CreateLinkRule](docs/v1/Ontologies/models/CreateLinkRule.md) | `from foundry_sdk.v1.ontologies.models import CreateLinkRule` | -**Ontologies** | [CreateObjectRule](docs/v1/Ontologies/models/CreateObjectRule.md) | `from foundry_sdk.v1.ontologies.models import CreateObjectRule` | -**Ontologies** | [DataValue](docs/v1/Ontologies/models/DataValue.md) | `from foundry_sdk.v1.ontologies.models import DataValue` | -**Ontologies** | [DeleteInterfaceObjectRule](docs/v1/Ontologies/models/DeleteInterfaceObjectRule.md) | `from foundry_sdk.v1.ontologies.models import DeleteInterfaceObjectRule` | -**Ontologies** | [DeleteLinkRule](docs/v1/Ontologies/models/DeleteLinkRule.md) | `from foundry_sdk.v1.ontologies.models import DeleteLinkRule` | -**Ontologies** | [DeleteObjectRule](docs/v1/Ontologies/models/DeleteObjectRule.md) | `from foundry_sdk.v1.ontologies.models import DeleteObjectRule` | -**Ontologies** | [DerivedPropertyApiName](docs/v1/Ontologies/models/DerivedPropertyApiName.md) | `from foundry_sdk.v1.ontologies.models import DerivedPropertyApiName` | -**Ontologies** | [Duration](docs/v1/Ontologies/models/Duration.md) | `from foundry_sdk.v1.ontologies.models import Duration` | -**Ontologies** | [EntrySetType](docs/v1/Ontologies/models/EntrySetType.md) | `from foundry_sdk.v1.ontologies.models import EntrySetType` | -**Ontologies** | [EqualsQuery](docs/v1/Ontologies/models/EqualsQuery.md) | `from foundry_sdk.v1.ontologies.models import EqualsQuery` | -**Ontologies** | [ExecuteQueryRequest](docs/v1/Ontologies/models/ExecuteQueryRequest.md) | `from foundry_sdk.v1.ontologies.models import ExecuteQueryRequest` | -**Ontologies** | [ExecuteQueryResponse](docs/v1/Ontologies/models/ExecuteQueryResponse.md) | `from foundry_sdk.v1.ontologies.models import ExecuteQueryResponse` | -**Ontologies** | [FieldNameV1](docs/v1/Ontologies/models/FieldNameV1.md) | `from foundry_sdk.v1.ontologies.models import FieldNameV1` | -**Ontologies** | [FilterValue](docs/v1/Ontologies/models/FilterValue.md) | `from foundry_sdk.v1.ontologies.models import FilterValue` | -**Ontologies** | [FunctionRid](docs/v1/Ontologies/models/FunctionRid.md) | `from foundry_sdk.v1.ontologies.models import FunctionRid` | -**Ontologies** | [FunctionVersion](docs/v1/Ontologies/models/FunctionVersion.md) | `from foundry_sdk.v1.ontologies.models import FunctionVersion` | -**Ontologies** | [Fuzzy](docs/v1/Ontologies/models/Fuzzy.md) | `from foundry_sdk.v1.ontologies.models import Fuzzy` | -**Ontologies** | [GroupMemberConstraint](docs/v1/Ontologies/models/GroupMemberConstraint.md) | `from foundry_sdk.v1.ontologies.models import GroupMemberConstraint` | -**Ontologies** | [GteQuery](docs/v1/Ontologies/models/GteQuery.md) | `from foundry_sdk.v1.ontologies.models import GteQuery` | -**Ontologies** | [GtQuery](docs/v1/Ontologies/models/GtQuery.md) | `from foundry_sdk.v1.ontologies.models import GtQuery` | -**Ontologies** | [InterfaceLinkTypeApiName](docs/v1/Ontologies/models/InterfaceLinkTypeApiName.md) | `from foundry_sdk.v1.ontologies.models import InterfaceLinkTypeApiName` | -**Ontologies** | [InterfaceLinkTypeRid](docs/v1/Ontologies/models/InterfaceLinkTypeRid.md) | `from foundry_sdk.v1.ontologies.models import InterfaceLinkTypeRid` | -**Ontologies** | [InterfacePropertyApiName](docs/v1/Ontologies/models/InterfacePropertyApiName.md) | `from foundry_sdk.v1.ontologies.models import InterfacePropertyApiName` | -**Ontologies** | [InterfaceTypeApiName](docs/v1/Ontologies/models/InterfaceTypeApiName.md) | `from foundry_sdk.v1.ontologies.models import InterfaceTypeApiName` | -**Ontologies** | [InterfaceTypeRid](docs/v1/Ontologies/models/InterfaceTypeRid.md) | `from foundry_sdk.v1.ontologies.models import InterfaceTypeRid` | -**Ontologies** | [IsNullQuery](docs/v1/Ontologies/models/IsNullQuery.md) | `from foundry_sdk.v1.ontologies.models import IsNullQuery` | -**Ontologies** | [LegacyObjectTypeId](docs/v1/Ontologies/models/LegacyObjectTypeId.md) | `from foundry_sdk.v1.ontologies.models import LegacyObjectTypeId` | -**Ontologies** | [LegacyPropertyId](docs/v1/Ontologies/models/LegacyPropertyId.md) | `from foundry_sdk.v1.ontologies.models import LegacyPropertyId` | -**Ontologies** | [LinkTypeApiName](docs/v1/Ontologies/models/LinkTypeApiName.md) | `from foundry_sdk.v1.ontologies.models import LinkTypeApiName` | -**Ontologies** | [LinkTypeId](docs/v1/Ontologies/models/LinkTypeId.md) | `from foundry_sdk.v1.ontologies.models import LinkTypeId` | -**Ontologies** | [LinkTypeSide](docs/v1/Ontologies/models/LinkTypeSide.md) | `from foundry_sdk.v1.ontologies.models import LinkTypeSide` | -**Ontologies** | [LinkTypeSideCardinality](docs/v1/Ontologies/models/LinkTypeSideCardinality.md) | `from foundry_sdk.v1.ontologies.models import LinkTypeSideCardinality` | -**Ontologies** | [ListActionTypesResponse](docs/v1/Ontologies/models/ListActionTypesResponse.md) | `from foundry_sdk.v1.ontologies.models import ListActionTypesResponse` | -**Ontologies** | [ListLinkedObjectsResponse](docs/v1/Ontologies/models/ListLinkedObjectsResponse.md) | `from foundry_sdk.v1.ontologies.models import ListLinkedObjectsResponse` | -**Ontologies** | [ListObjectsResponse](docs/v1/Ontologies/models/ListObjectsResponse.md) | `from foundry_sdk.v1.ontologies.models import ListObjectsResponse` | -**Ontologies** | [ListObjectTypesResponse](docs/v1/Ontologies/models/ListObjectTypesResponse.md) | `from foundry_sdk.v1.ontologies.models import ListObjectTypesResponse` | -**Ontologies** | [ListOntologiesResponse](docs/v1/Ontologies/models/ListOntologiesResponse.md) | `from foundry_sdk.v1.ontologies.models import ListOntologiesResponse` | -**Ontologies** | [ListOutgoingLinkTypesResponse](docs/v1/Ontologies/models/ListOutgoingLinkTypesResponse.md) | `from foundry_sdk.v1.ontologies.models import ListOutgoingLinkTypesResponse` | -**Ontologies** | [ListQueryTypesResponse](docs/v1/Ontologies/models/ListQueryTypesResponse.md) | `from foundry_sdk.v1.ontologies.models import ListQueryTypesResponse` | -**Ontologies** | [LogicRule](docs/v1/Ontologies/models/LogicRule.md) | `from foundry_sdk.v1.ontologies.models import LogicRule` | -**Ontologies** | [LteQuery](docs/v1/Ontologies/models/LteQuery.md) | `from foundry_sdk.v1.ontologies.models import LteQuery` | -**Ontologies** | [LtQuery](docs/v1/Ontologies/models/LtQuery.md) | `from foundry_sdk.v1.ontologies.models import LtQuery` | -**Ontologies** | [MaxAggregation](docs/v1/Ontologies/models/MaxAggregation.md) | `from foundry_sdk.v1.ontologies.models import MaxAggregation` | -**Ontologies** | [MinAggregation](docs/v1/Ontologies/models/MinAggregation.md) | `from foundry_sdk.v1.ontologies.models import MinAggregation` | -**Ontologies** | [ModifyInterfaceObjectRule](docs/v1/Ontologies/models/ModifyInterfaceObjectRule.md) | `from foundry_sdk.v1.ontologies.models import ModifyInterfaceObjectRule` | -**Ontologies** | [ModifyObjectRule](docs/v1/Ontologies/models/ModifyObjectRule.md) | `from foundry_sdk.v1.ontologies.models import ModifyObjectRule` | -**Ontologies** | [NotQuery](docs/v1/Ontologies/models/NotQuery.md) | `from foundry_sdk.v1.ontologies.models import NotQuery` | -**Ontologies** | [ObjectPropertyValueConstraint](docs/v1/Ontologies/models/ObjectPropertyValueConstraint.md) | `from foundry_sdk.v1.ontologies.models import ObjectPropertyValueConstraint` | -**Ontologies** | [ObjectQueryResultConstraint](docs/v1/Ontologies/models/ObjectQueryResultConstraint.md) | `from foundry_sdk.v1.ontologies.models import ObjectQueryResultConstraint` | -**Ontologies** | [ObjectRid](docs/v1/Ontologies/models/ObjectRid.md) | `from foundry_sdk.v1.ontologies.models import ObjectRid` | -**Ontologies** | [ObjectSetRid](docs/v1/Ontologies/models/ObjectSetRid.md) | `from foundry_sdk.v1.ontologies.models import ObjectSetRid` | -**Ontologies** | [ObjectType](docs/v1/Ontologies/models/ObjectType.md) | `from foundry_sdk.v1.ontologies.models import ObjectType` | -**Ontologies** | [ObjectTypeApiName](docs/v1/Ontologies/models/ObjectTypeApiName.md) | `from foundry_sdk.v1.ontologies.models import ObjectTypeApiName` | -**Ontologies** | [ObjectTypeRid](docs/v1/Ontologies/models/ObjectTypeRid.md) | `from foundry_sdk.v1.ontologies.models import ObjectTypeRid` | -**Ontologies** | [ObjectTypeVisibility](docs/v1/Ontologies/models/ObjectTypeVisibility.md) | `from foundry_sdk.v1.ontologies.models import ObjectTypeVisibility` | -**Ontologies** | [OneOfConstraint](docs/v1/Ontologies/models/OneOfConstraint.md) | `from foundry_sdk.v1.ontologies.models import OneOfConstraint` | -**Ontologies** | [Ontology](docs/v1/Ontologies/models/Ontology.md) | `from foundry_sdk.v1.ontologies.models import Ontology` | -**Ontologies** | [OntologyApiName](docs/v1/Ontologies/models/OntologyApiName.md) | `from foundry_sdk.v1.ontologies.models import OntologyApiName` | -**Ontologies** | [OntologyArrayType](docs/v1/Ontologies/models/OntologyArrayType.md) | `from foundry_sdk.v1.ontologies.models import OntologyArrayType` | -**Ontologies** | [OntologyDataType](docs/v1/Ontologies/models/OntologyDataType.md) | `from foundry_sdk.v1.ontologies.models import OntologyDataType` | -**Ontologies** | [OntologyInterfaceObjectSetType](docs/v1/Ontologies/models/OntologyInterfaceObjectSetType.md) | `from foundry_sdk.v1.ontologies.models import OntologyInterfaceObjectSetType` | -**Ontologies** | [OntologyInterfaceObjectType](docs/v1/Ontologies/models/OntologyInterfaceObjectType.md) | `from foundry_sdk.v1.ontologies.models import OntologyInterfaceObjectType` | -**Ontologies** | [OntologyMapType](docs/v1/Ontologies/models/OntologyMapType.md) | `from foundry_sdk.v1.ontologies.models import OntologyMapType` | -**Ontologies** | [OntologyObject](docs/v1/Ontologies/models/OntologyObject.md) | `from foundry_sdk.v1.ontologies.models import OntologyObject` | -**Ontologies** | [OntologyObjectSetType](docs/v1/Ontologies/models/OntologyObjectSetType.md) | `from foundry_sdk.v1.ontologies.models import OntologyObjectSetType` | -**Ontologies** | [OntologyObjectType](docs/v1/Ontologies/models/OntologyObjectType.md) | `from foundry_sdk.v1.ontologies.models import OntologyObjectType` | -**Ontologies** | [OntologyRid](docs/v1/Ontologies/models/OntologyRid.md) | `from foundry_sdk.v1.ontologies.models import OntologyRid` | -**Ontologies** | [OntologySetType](docs/v1/Ontologies/models/OntologySetType.md) | `from foundry_sdk.v1.ontologies.models import OntologySetType` | -**Ontologies** | [OntologyStructField](docs/v1/Ontologies/models/OntologyStructField.md) | `from foundry_sdk.v1.ontologies.models import OntologyStructField` | -**Ontologies** | [OntologyStructType](docs/v1/Ontologies/models/OntologyStructType.md) | `from foundry_sdk.v1.ontologies.models import OntologyStructType` | -**Ontologies** | [OrderBy](docs/v1/Ontologies/models/OrderBy.md) | `from foundry_sdk.v1.ontologies.models import OrderBy` | -**Ontologies** | [OrQuery](docs/v1/Ontologies/models/OrQuery.md) | `from foundry_sdk.v1.ontologies.models import OrQuery` | -**Ontologies** | [Parameter](docs/v1/Ontologies/models/Parameter.md) | `from foundry_sdk.v1.ontologies.models import Parameter` | -**Ontologies** | [ParameterEvaluatedConstraint](docs/v1/Ontologies/models/ParameterEvaluatedConstraint.md) | `from foundry_sdk.v1.ontologies.models import ParameterEvaluatedConstraint` | -**Ontologies** | [ParameterEvaluationResult](docs/v1/Ontologies/models/ParameterEvaluationResult.md) | `from foundry_sdk.v1.ontologies.models import ParameterEvaluationResult` | -**Ontologies** | [ParameterId](docs/v1/Ontologies/models/ParameterId.md) | `from foundry_sdk.v1.ontologies.models import ParameterId` | -**Ontologies** | [ParameterOption](docs/v1/Ontologies/models/ParameterOption.md) | `from foundry_sdk.v1.ontologies.models import ParameterOption` | -**Ontologies** | [PhraseQuery](docs/v1/Ontologies/models/PhraseQuery.md) | `from foundry_sdk.v1.ontologies.models import PhraseQuery` | -**Ontologies** | [PrefixQuery](docs/v1/Ontologies/models/PrefixQuery.md) | `from foundry_sdk.v1.ontologies.models import PrefixQuery` | -**Ontologies** | [PrimaryKeyValue](docs/v1/Ontologies/models/PrimaryKeyValue.md) | `from foundry_sdk.v1.ontologies.models import PrimaryKeyValue` | -**Ontologies** | [Property](docs/v1/Ontologies/models/Property.md) | `from foundry_sdk.v1.ontologies.models import Property` | -**Ontologies** | [PropertyApiName](docs/v1/Ontologies/models/PropertyApiName.md) | `from foundry_sdk.v1.ontologies.models import PropertyApiName` | -**Ontologies** | [PropertyFilter](docs/v1/Ontologies/models/PropertyFilter.md) | `from foundry_sdk.v1.ontologies.models import PropertyFilter` | -**Ontologies** | [PropertyId](docs/v1/Ontologies/models/PropertyId.md) | `from foundry_sdk.v1.ontologies.models import PropertyId` | -**Ontologies** | [PropertyTypeRid](docs/v1/Ontologies/models/PropertyTypeRid.md) | `from foundry_sdk.v1.ontologies.models import PropertyTypeRid` | -**Ontologies** | [PropertyValue](docs/v1/Ontologies/models/PropertyValue.md) | `from foundry_sdk.v1.ontologies.models import PropertyValue` | -**Ontologies** | [PropertyValueEscapedString](docs/v1/Ontologies/models/PropertyValueEscapedString.md) | `from foundry_sdk.v1.ontologies.models import PropertyValueEscapedString` | -**Ontologies** | [QueryAggregationKeyType](docs/v1/Ontologies/models/QueryAggregationKeyType.md) | `from foundry_sdk.v1.ontologies.models import QueryAggregationKeyType` | -**Ontologies** | [QueryAggregationRangeSubType](docs/v1/Ontologies/models/QueryAggregationRangeSubType.md) | `from foundry_sdk.v1.ontologies.models import QueryAggregationRangeSubType` | -**Ontologies** | [QueryAggregationRangeType](docs/v1/Ontologies/models/QueryAggregationRangeType.md) | `from foundry_sdk.v1.ontologies.models import QueryAggregationRangeType` | -**Ontologies** | [QueryAggregationValueType](docs/v1/Ontologies/models/QueryAggregationValueType.md) | `from foundry_sdk.v1.ontologies.models import QueryAggregationValueType` | -**Ontologies** | [QueryApiName](docs/v1/Ontologies/models/QueryApiName.md) | `from foundry_sdk.v1.ontologies.models import QueryApiName` | -**Ontologies** | [QueryArrayType](docs/v1/Ontologies/models/QueryArrayType.md) | `from foundry_sdk.v1.ontologies.models import QueryArrayType` | -**Ontologies** | [QueryDataType](docs/v1/Ontologies/models/QueryDataType.md) | `from foundry_sdk.v1.ontologies.models import QueryDataType` | -**Ontologies** | [QueryRuntimeErrorParameter](docs/v1/Ontologies/models/QueryRuntimeErrorParameter.md) | `from foundry_sdk.v1.ontologies.models import QueryRuntimeErrorParameter` | -**Ontologies** | [QuerySetType](docs/v1/Ontologies/models/QuerySetType.md) | `from foundry_sdk.v1.ontologies.models import QuerySetType` | -**Ontologies** | [QueryStructField](docs/v1/Ontologies/models/QueryStructField.md) | `from foundry_sdk.v1.ontologies.models import QueryStructField` | -**Ontologies** | [QueryStructType](docs/v1/Ontologies/models/QueryStructType.md) | `from foundry_sdk.v1.ontologies.models import QueryStructType` | -**Ontologies** | [QueryType](docs/v1/Ontologies/models/QueryType.md) | `from foundry_sdk.v1.ontologies.models import QueryType` | -**Ontologies** | [QueryUnionType](docs/v1/Ontologies/models/QueryUnionType.md) | `from foundry_sdk.v1.ontologies.models import QueryUnionType` | -**Ontologies** | [RangeConstraint](docs/v1/Ontologies/models/RangeConstraint.md) | `from foundry_sdk.v1.ontologies.models import RangeConstraint` | -**Ontologies** | [ReturnEditsMode](docs/v1/Ontologies/models/ReturnEditsMode.md) | `from foundry_sdk.v1.ontologies.models import ReturnEditsMode` | -**Ontologies** | [SdkPackageName](docs/v1/Ontologies/models/SdkPackageName.md) | `from foundry_sdk.v1.ontologies.models import SdkPackageName` | -**Ontologies** | [SdkPackageRid](docs/v1/Ontologies/models/SdkPackageRid.md) | `from foundry_sdk.v1.ontologies.models import SdkPackageRid` | -**Ontologies** | [SdkVersion](docs/v1/Ontologies/models/SdkVersion.md) | `from foundry_sdk.v1.ontologies.models import SdkVersion` | -**Ontologies** | [SearchJsonQuery](docs/v1/Ontologies/models/SearchJsonQuery.md) | `from foundry_sdk.v1.ontologies.models import SearchJsonQuery` | -**Ontologies** | [SearchObjectsRequest](docs/v1/Ontologies/models/SearchObjectsRequest.md) | `from foundry_sdk.v1.ontologies.models import SearchObjectsRequest` | -**Ontologies** | [SearchObjectsResponse](docs/v1/Ontologies/models/SearchObjectsResponse.md) | `from foundry_sdk.v1.ontologies.models import SearchObjectsResponse` | -**Ontologies** | [SearchOrderBy](docs/v1/Ontologies/models/SearchOrderBy.md) | `from foundry_sdk.v1.ontologies.models import SearchOrderBy` | -**Ontologies** | [SearchOrderByType](docs/v1/Ontologies/models/SearchOrderByType.md) | `from foundry_sdk.v1.ontologies.models import SearchOrderByType` | -**Ontologies** | [SearchOrdering](docs/v1/Ontologies/models/SearchOrdering.md) | `from foundry_sdk.v1.ontologies.models import SearchOrdering` | -**Ontologies** | [SelectedPropertyApiName](docs/v1/Ontologies/models/SelectedPropertyApiName.md) | `from foundry_sdk.v1.ontologies.models import SelectedPropertyApiName` | -**Ontologies** | [SharedPropertyTypeApiName](docs/v1/Ontologies/models/SharedPropertyTypeApiName.md) | `from foundry_sdk.v1.ontologies.models import SharedPropertyTypeApiName` | -**Ontologies** | [SharedPropertyTypeRid](docs/v1/Ontologies/models/SharedPropertyTypeRid.md) | `from foundry_sdk.v1.ontologies.models import SharedPropertyTypeRid` | -**Ontologies** | [StringLengthConstraint](docs/v1/Ontologies/models/StringLengthConstraint.md) | `from foundry_sdk.v1.ontologies.models import StringLengthConstraint` | -**Ontologies** | [StringRegexMatchConstraint](docs/v1/Ontologies/models/StringRegexMatchConstraint.md) | `from foundry_sdk.v1.ontologies.models import StringRegexMatchConstraint` | -**Ontologies** | [StructEvaluatedConstraint](docs/v1/Ontologies/models/StructEvaluatedConstraint.md) | `from foundry_sdk.v1.ontologies.models import StructEvaluatedConstraint` | -**Ontologies** | [StructFieldEvaluatedConstraint](docs/v1/Ontologies/models/StructFieldEvaluatedConstraint.md) | `from foundry_sdk.v1.ontologies.models import StructFieldEvaluatedConstraint` | -**Ontologies** | [StructFieldEvaluationResult](docs/v1/Ontologies/models/StructFieldEvaluationResult.md) | `from foundry_sdk.v1.ontologies.models import StructFieldEvaluationResult` | -**Ontologies** | [StructParameterFieldApiName](docs/v1/Ontologies/models/StructParameterFieldApiName.md) | `from foundry_sdk.v1.ontologies.models import StructParameterFieldApiName` | -**Ontologies** | [SubmissionCriteriaEvaluation](docs/v1/Ontologies/models/SubmissionCriteriaEvaluation.md) | `from foundry_sdk.v1.ontologies.models import SubmissionCriteriaEvaluation` | -**Ontologies** | [SumAggregation](docs/v1/Ontologies/models/SumAggregation.md) | `from foundry_sdk.v1.ontologies.models import SumAggregation` | -**Ontologies** | [ThreeDimensionalAggregation](docs/v1/Ontologies/models/ThreeDimensionalAggregation.md) | `from foundry_sdk.v1.ontologies.models import ThreeDimensionalAggregation` | -**Ontologies** | [TwoDimensionalAggregation](docs/v1/Ontologies/models/TwoDimensionalAggregation.md) | `from foundry_sdk.v1.ontologies.models import TwoDimensionalAggregation` | -**Ontologies** | [UnevaluableConstraint](docs/v1/Ontologies/models/UnevaluableConstraint.md) | `from foundry_sdk.v1.ontologies.models import UnevaluableConstraint` | -**Ontologies** | [UniqueIdentifierLinkId](docs/v1/Ontologies/models/UniqueIdentifierLinkId.md) | `from foundry_sdk.v1.ontologies.models import UniqueIdentifierLinkId` | -**Ontologies** | [ValidateActionRequest](docs/v1/Ontologies/models/ValidateActionRequest.md) | `from foundry_sdk.v1.ontologies.models import ValidateActionRequest` | -**Ontologies** | [ValidateActionResponse](docs/v1/Ontologies/models/ValidateActionResponse.md) | `from foundry_sdk.v1.ontologies.models import ValidateActionResponse` | -**Ontologies** | [ValidationResult](docs/v1/Ontologies/models/ValidationResult.md) | `from foundry_sdk.v1.ontologies.models import ValidationResult` | -**Ontologies** | [ValueType](docs/v1/Ontologies/models/ValueType.md) | `from foundry_sdk.v1.ontologies.models import ValueType` | -**Ontologies** | [ValueTypeApiName](docs/v1/Ontologies/models/ValueTypeApiName.md) | `from foundry_sdk.v1.ontologies.models import ValueTypeApiName` | -**Ontologies** | [ValueTypeRid](docs/v1/Ontologies/models/ValueTypeRid.md) | `from foundry_sdk.v1.ontologies.models import ValueTypeRid` | - - - -## Documentation for errors - -## Documentation for V2 errors - -Namespace | Name | Import | ---------- | ---- | ------ | -**Admin** | AddEnrollmentRoleAssignmentsPermissionDenied | `from foundry_sdk.v2.admin.errors import AddEnrollmentRoleAssignmentsPermissionDenied` | -**Admin** | AddGroupMembersPermissionDenied | `from foundry_sdk.v2.admin.errors import AddGroupMembersPermissionDenied` | -**Admin** | AddMarkingMembersPermissionDenied | `from foundry_sdk.v2.admin.errors import AddMarkingMembersPermissionDenied` | -**Admin** | AddMarkingRoleAssignmentsPermissionDenied | `from foundry_sdk.v2.admin.errors import AddMarkingRoleAssignmentsPermissionDenied` | -**Admin** | AddOrganizationRoleAssignmentsPermissionDenied | `from foundry_sdk.v2.admin.errors import AddOrganizationRoleAssignmentsPermissionDenied` | -**Admin** | AuthenticationProviderNotFound | `from foundry_sdk.v2.admin.errors import AuthenticationProviderNotFound` | -**Admin** | CannotReplaceProviderInfoForPrincipalInProtectedRealm | `from foundry_sdk.v2.admin.errors import CannotReplaceProviderInfoForPrincipalInProtectedRealm` | -**Admin** | CreateGroupPermissionDenied | `from foundry_sdk.v2.admin.errors import CreateGroupPermissionDenied` | -**Admin** | CreateMarkingMissingInitialAdminRole | `from foundry_sdk.v2.admin.errors import CreateMarkingMissingInitialAdminRole` | -**Admin** | CreateMarkingPermissionDenied | `from foundry_sdk.v2.admin.errors import CreateMarkingPermissionDenied` | -**Admin** | CreateOrganizationMissingInitialAdminRole | `from foundry_sdk.v2.admin.errors import CreateOrganizationMissingInitialAdminRole` | -**Admin** | CreateOrganizationPermissionDenied | `from foundry_sdk.v2.admin.errors import CreateOrganizationPermissionDenied` | -**Admin** | DeleteGroupPermissionDenied | `from foundry_sdk.v2.admin.errors import DeleteGroupPermissionDenied` | -**Admin** | DeleteUserPermissionDenied | `from foundry_sdk.v2.admin.errors import DeleteUserPermissionDenied` | -**Admin** | EnrollmentNotFound | `from foundry_sdk.v2.admin.errors import EnrollmentNotFound` | -**Admin** | EnrollmentRoleNotFound | `from foundry_sdk.v2.admin.errors import EnrollmentRoleNotFound` | -**Admin** | GetCurrentEnrollmentPermissionDenied | `from foundry_sdk.v2.admin.errors import GetCurrentEnrollmentPermissionDenied` | -**Admin** | GetCurrentUserPermissionDenied | `from foundry_sdk.v2.admin.errors import GetCurrentUserPermissionDenied` | -**Admin** | GetGroupProviderInfoPermissionDenied | `from foundry_sdk.v2.admin.errors import GetGroupProviderInfoPermissionDenied` | -**Admin** | GetMarkingCategoryPermissionDenied | `from foundry_sdk.v2.admin.errors import GetMarkingCategoryPermissionDenied` | -**Admin** | GetMarkingPermissionDenied | `from foundry_sdk.v2.admin.errors import GetMarkingPermissionDenied` | -**Admin** | GetMarkingsUserPermissionDenied | `from foundry_sdk.v2.admin.errors import GetMarkingsUserPermissionDenied` | -**Admin** | GetProfilePictureOfUserPermissionDenied | `from foundry_sdk.v2.admin.errors import GetProfilePictureOfUserPermissionDenied` | -**Admin** | GetUserProviderInfoPermissionDenied | `from foundry_sdk.v2.admin.errors import GetUserProviderInfoPermissionDenied` | -**Admin** | GroupMembershipExpirationPolicyNotFound | `from foundry_sdk.v2.admin.errors import GroupMembershipExpirationPolicyNotFound` | -**Admin** | GroupNameAlreadyExists | `from foundry_sdk.v2.admin.errors import GroupNameAlreadyExists` | -**Admin** | GroupNotFound | `from foundry_sdk.v2.admin.errors import GroupNotFound` | -**Admin** | GroupProviderInfoNotFound | `from foundry_sdk.v2.admin.errors import GroupProviderInfoNotFound` | -**Admin** | InvalidGroupMembershipExpiration | `from foundry_sdk.v2.admin.errors import InvalidGroupMembershipExpiration` | -**Admin** | InvalidGroupOrganizations | `from foundry_sdk.v2.admin.errors import InvalidGroupOrganizations` | -**Admin** | InvalidHostName | `from foundry_sdk.v2.admin.errors import InvalidHostName` | -**Admin** | InvalidProfilePicture | `from foundry_sdk.v2.admin.errors import InvalidProfilePicture` | -**Admin** | ListAvailableRolesOrganizationPermissionDenied | `from foundry_sdk.v2.admin.errors import ListAvailableRolesOrganizationPermissionDenied` | -**Admin** | ListEnrollmentRoleAssignmentsPermissionDenied | `from foundry_sdk.v2.admin.errors import ListEnrollmentRoleAssignmentsPermissionDenied` | -**Admin** | ListHostsPermissionDenied | `from foundry_sdk.v2.admin.errors import ListHostsPermissionDenied` | -**Admin** | ListMarkingMembersPermissionDenied | `from foundry_sdk.v2.admin.errors import ListMarkingMembersPermissionDenied` | -**Admin** | ListMarkingRoleAssignmentsPermissionDenied | `from foundry_sdk.v2.admin.errors import ListMarkingRoleAssignmentsPermissionDenied` | -**Admin** | ListOrganizationRoleAssignmentsPermissionDenied | `from foundry_sdk.v2.admin.errors import ListOrganizationRoleAssignmentsPermissionDenied` | -**Admin** | MarkingCategoryNotFound | `from foundry_sdk.v2.admin.errors import MarkingCategoryNotFound` | -**Admin** | MarkingNameInCategoryAlreadyExists | `from foundry_sdk.v2.admin.errors import MarkingNameInCategoryAlreadyExists` | -**Admin** | MarkingNameIsEmpty | `from foundry_sdk.v2.admin.errors import MarkingNameIsEmpty` | -**Admin** | MarkingNotFound | `from foundry_sdk.v2.admin.errors import MarkingNotFound` | -**Admin** | OrganizationNameAlreadyExists | `from foundry_sdk.v2.admin.errors import OrganizationNameAlreadyExists` | -**Admin** | OrganizationNotFound | `from foundry_sdk.v2.admin.errors import OrganizationNotFound` | -**Admin** | PreregisterGroupPermissionDenied | `from foundry_sdk.v2.admin.errors import PreregisterGroupPermissionDenied` | -**Admin** | PreregisterUserPermissionDenied | `from foundry_sdk.v2.admin.errors import PreregisterUserPermissionDenied` | -**Admin** | PrincipalNotFound | `from foundry_sdk.v2.admin.errors import PrincipalNotFound` | -**Admin** | ProfilePictureNotFound | `from foundry_sdk.v2.admin.errors import ProfilePictureNotFound` | -**Admin** | ProfileServiceNotPresent | `from foundry_sdk.v2.admin.errors import ProfileServiceNotPresent` | -**Admin** | RemoveEnrollmentRoleAssignmentsPermissionDenied | `from foundry_sdk.v2.admin.errors import RemoveEnrollmentRoleAssignmentsPermissionDenied` | -**Admin** | RemoveGroupMembersPermissionDenied | `from foundry_sdk.v2.admin.errors import RemoveGroupMembersPermissionDenied` | -**Admin** | RemoveMarkingMembersPermissionDenied | `from foundry_sdk.v2.admin.errors import RemoveMarkingMembersPermissionDenied` | -**Admin** | RemoveMarkingRoleAssignmentsPermissionDenied | `from foundry_sdk.v2.admin.errors import RemoveMarkingRoleAssignmentsPermissionDenied` | -**Admin** | RemoveMarkingRoleAssignmentsRemoveAllAdministratorsNotAllowed | `from foundry_sdk.v2.admin.errors import RemoveMarkingRoleAssignmentsRemoveAllAdministratorsNotAllowed` | -**Admin** | RemoveOrganizationRoleAssignmentsPermissionDenied | `from foundry_sdk.v2.admin.errors import RemoveOrganizationRoleAssignmentsPermissionDenied` | -**Admin** | ReplaceGroupMembershipExpirationPolicyPermissionDenied | `from foundry_sdk.v2.admin.errors import ReplaceGroupMembershipExpirationPolicyPermissionDenied` | -**Admin** | ReplaceGroupProviderInfoPermissionDenied | `from foundry_sdk.v2.admin.errors import ReplaceGroupProviderInfoPermissionDenied` | -**Admin** | ReplaceMarkingPermissionDenied | `from foundry_sdk.v2.admin.errors import ReplaceMarkingPermissionDenied` | -**Admin** | ReplaceOrganizationPermissionDenied | `from foundry_sdk.v2.admin.errors import ReplaceOrganizationPermissionDenied` | -**Admin** | ReplaceUserProviderInfoPermissionDenied | `from foundry_sdk.v2.admin.errors import ReplaceUserProviderInfoPermissionDenied` | -**Admin** | RevokeAllTokensUserPermissionDenied | `from foundry_sdk.v2.admin.errors import RevokeAllTokensUserPermissionDenied` | -**Admin** | RoleNotFound | `from foundry_sdk.v2.admin.errors import RoleNotFound` | -**Admin** | SearchGroupsPermissionDenied | `from foundry_sdk.v2.admin.errors import SearchGroupsPermissionDenied` | -**Admin** | SearchUsersPermissionDenied | `from foundry_sdk.v2.admin.errors import SearchUsersPermissionDenied` | -**Admin** | UserDeleted | `from foundry_sdk.v2.admin.errors import UserDeleted` | -**Admin** | UserIsActive | `from foundry_sdk.v2.admin.errors import UserIsActive` | -**Admin** | UserNotFound | `from foundry_sdk.v2.admin.errors import UserNotFound` | -**Admin** | UserProviderInfoNotFound | `from foundry_sdk.v2.admin.errors import UserProviderInfoNotFound` | -**AipAgents** | AgentIterationsExceededLimit | `from foundry_sdk.v2.aip_agents.errors import AgentIterationsExceededLimit` | -**AipAgents** | AgentNotFound | `from foundry_sdk.v2.aip_agents.errors import AgentNotFound` | -**AipAgents** | AgentVersionNotFound | `from foundry_sdk.v2.aip_agents.errors import AgentVersionNotFound` | -**AipAgents** | BlockingContinueSessionPermissionDenied | `from foundry_sdk.v2.aip_agents.errors import BlockingContinueSessionPermissionDenied` | -**AipAgents** | CancelSessionFailedMessageNotInProgress | `from foundry_sdk.v2.aip_agents.errors import CancelSessionFailedMessageNotInProgress` | -**AipAgents** | CancelSessionPermissionDenied | `from foundry_sdk.v2.aip_agents.errors import CancelSessionPermissionDenied` | -**AipAgents** | ContentNotFound | `from foundry_sdk.v2.aip_agents.errors import ContentNotFound` | -**AipAgents** | ContextSizeExceededLimit | `from foundry_sdk.v2.aip_agents.errors import ContextSizeExceededLimit` | -**AipAgents** | CreateSessionPermissionDenied | `from foundry_sdk.v2.aip_agents.errors import CreateSessionPermissionDenied` | -**AipAgents** | DeleteSessionPermissionDenied | `from foundry_sdk.v2.aip_agents.errors import DeleteSessionPermissionDenied` | -**AipAgents** | FunctionLocatorNotFound | `from foundry_sdk.v2.aip_agents.errors import FunctionLocatorNotFound` | -**AipAgents** | GetAllSessionsAgentsPermissionDenied | `from foundry_sdk.v2.aip_agents.errors import GetAllSessionsAgentsPermissionDenied` | -**AipAgents** | GetRagContextForSessionPermissionDenied | `from foundry_sdk.v2.aip_agents.errors import GetRagContextForSessionPermissionDenied` | -**AipAgents** | InvalidAgentVersion | `from foundry_sdk.v2.aip_agents.errors import InvalidAgentVersion` | -**AipAgents** | InvalidParameter | `from foundry_sdk.v2.aip_agents.errors import InvalidParameter` | -**AipAgents** | InvalidParameterType | `from foundry_sdk.v2.aip_agents.errors import InvalidParameterType` | -**AipAgents** | ListSessionsForAgentsPermissionDenied | `from foundry_sdk.v2.aip_agents.errors import ListSessionsForAgentsPermissionDenied` | -**AipAgents** | NoPublishedAgentVersion | `from foundry_sdk.v2.aip_agents.errors import NoPublishedAgentVersion` | -**AipAgents** | ObjectTypeIdsNotFound | `from foundry_sdk.v2.aip_agents.errors import ObjectTypeIdsNotFound` | -**AipAgents** | ObjectTypeRidsNotFound | `from foundry_sdk.v2.aip_agents.errors import ObjectTypeRidsNotFound` | -**AipAgents** | OntologyEntitiesNotFound | `from foundry_sdk.v2.aip_agents.errors import OntologyEntitiesNotFound` | -**AipAgents** | RateLimitExceeded | `from foundry_sdk.v2.aip_agents.errors import RateLimitExceeded` | -**AipAgents** | RetryAttemptsExceeded | `from foundry_sdk.v2.aip_agents.errors import RetryAttemptsExceeded` | -**AipAgents** | RetryDeadlineExceeded | `from foundry_sdk.v2.aip_agents.errors import RetryDeadlineExceeded` | -**AipAgents** | SessionExecutionFailed | `from foundry_sdk.v2.aip_agents.errors import SessionExecutionFailed` | -**AipAgents** | SessionNotFound | `from foundry_sdk.v2.aip_agents.errors import SessionNotFound` | -**AipAgents** | SessionTraceIdAlreadyExists | `from foundry_sdk.v2.aip_agents.errors import SessionTraceIdAlreadyExists` | -**AipAgents** | SessionTraceNotFound | `from foundry_sdk.v2.aip_agents.errors import SessionTraceNotFound` | -**AipAgents** | StreamingContinueSessionPermissionDenied | `from foundry_sdk.v2.aip_agents.errors import StreamingContinueSessionPermissionDenied` | -**AipAgents** | UpdateSessionTitlePermissionDenied | `from foundry_sdk.v2.aip_agents.errors import UpdateSessionTitlePermissionDenied` | -**Audit** | GetLogFileContentPermissionDenied | `from foundry_sdk.v2.audit.errors import GetLogFileContentPermissionDenied` | -**Audit** | ListLogFilesPermissionDenied | `from foundry_sdk.v2.audit.errors import ListLogFilesPermissionDenied` | -**Audit** | MissingStartDate | `from foundry_sdk.v2.audit.errors import MissingStartDate` | -**Connectivity** | AdditionalSecretsMustBeSpecifiedAsPlaintextValueMap | `from foundry_sdk.v2.connectivity.errors import AdditionalSecretsMustBeSpecifiedAsPlaintextValueMap` | -**Connectivity** | ConnectionDetailsNotDetermined | `from foundry_sdk.v2.connectivity.errors import ConnectionDetailsNotDetermined` | -**Connectivity** | ConnectionNotFound | `from foundry_sdk.v2.connectivity.errors import ConnectionNotFound` | -**Connectivity** | ConnectionTypeNotSupported | `from foundry_sdk.v2.connectivity.errors import ConnectionTypeNotSupported` | -**Connectivity** | CreateConnectionPermissionDenied | `from foundry_sdk.v2.connectivity.errors import CreateConnectionPermissionDenied` | -**Connectivity** | CreateFileImportPermissionDenied | `from foundry_sdk.v2.connectivity.errors import CreateFileImportPermissionDenied` | -**Connectivity** | CreateTableImportPermissionDenied | `from foundry_sdk.v2.connectivity.errors import CreateTableImportPermissionDenied` | -**Connectivity** | CreateVirtualTablePermissionDenied | `from foundry_sdk.v2.connectivity.errors import CreateVirtualTablePermissionDenied` | -**Connectivity** | DeleteFileImportPermissionDenied | `from foundry_sdk.v2.connectivity.errors import DeleteFileImportPermissionDenied` | -**Connectivity** | DeleteTableImportPermissionDenied | `from foundry_sdk.v2.connectivity.errors import DeleteTableImportPermissionDenied` | -**Connectivity** | DomainMustUseHttpsWithAuthentication | `from foundry_sdk.v2.connectivity.errors import DomainMustUseHttpsWithAuthentication` | -**Connectivity** | DriverContentMustBeUploadedAsJar | `from foundry_sdk.v2.connectivity.errors import DriverContentMustBeUploadedAsJar` | -**Connectivity** | DriverJarAlreadyExists | `from foundry_sdk.v2.connectivity.errors import DriverJarAlreadyExists` | -**Connectivity** | EncryptedPropertyMustBeSpecifiedAsPlaintextValue | `from foundry_sdk.v2.connectivity.errors import EncryptedPropertyMustBeSpecifiedAsPlaintextValue` | -**Connectivity** | ExecuteFileImportPermissionDenied | `from foundry_sdk.v2.connectivity.errors import ExecuteFileImportPermissionDenied` | -**Connectivity** | ExecuteTableImportPermissionDenied | `from foundry_sdk.v2.connectivity.errors import ExecuteTableImportPermissionDenied` | -**Connectivity** | FileAtLeastCountFilterInvalidMinCount | `from foundry_sdk.v2.connectivity.errors import FileAtLeastCountFilterInvalidMinCount` | -**Connectivity** | FileImportCustomFilterCannotBeUsedToCreateOrUpdateFileImports | `from foundry_sdk.v2.connectivity.errors import FileImportCustomFilterCannotBeUsedToCreateOrUpdateFileImports` | -**Connectivity** | FileImportNotFound | `from foundry_sdk.v2.connectivity.errors import FileImportNotFound` | -**Connectivity** | FileImportNotSupportedForConnection | `from foundry_sdk.v2.connectivity.errors import FileImportNotSupportedForConnection` | -**Connectivity** | FilesCountLimitFilterInvalidLimit | `from foundry_sdk.v2.connectivity.errors import FilesCountLimitFilterInvalidLimit` | -**Connectivity** | FileSizeFilterGreaterThanCannotBeNegative | `from foundry_sdk.v2.connectivity.errors import FileSizeFilterGreaterThanCannotBeNegative` | -**Connectivity** | FileSizeFilterInvalidGreaterThanAndLessThanRange | `from foundry_sdk.v2.connectivity.errors import FileSizeFilterInvalidGreaterThanAndLessThanRange` | -**Connectivity** | FileSizeFilterLessThanMustBeOneByteOrLarger | `from foundry_sdk.v2.connectivity.errors import FileSizeFilterLessThanMustBeOneByteOrLarger` | -**Connectivity** | FileSizeFilterMissingGreaterThanAndLessThan | `from foundry_sdk.v2.connectivity.errors import FileSizeFilterMissingGreaterThanAndLessThan` | -**Connectivity** | GetConfigurationPermissionDenied | `from foundry_sdk.v2.connectivity.errors import GetConfigurationPermissionDenied` | -**Connectivity** | HostNameCannotHaveProtocolOrPort | `from foundry_sdk.v2.connectivity.errors import HostNameCannotHaveProtocolOrPort` | -**Connectivity** | InvalidShareName | `from foundry_sdk.v2.connectivity.errors import InvalidShareName` | -**Connectivity** | InvalidVirtualTableConnection | `from foundry_sdk.v2.connectivity.errors import InvalidVirtualTableConnection` | -**Connectivity** | ParentFolderNotFoundForConnection | `from foundry_sdk.v2.connectivity.errors import ParentFolderNotFoundForConnection` | -**Connectivity** | PortNotInRange | `from foundry_sdk.v2.connectivity.errors import PortNotInRange` | -**Connectivity** | PropertyCannotBeBlank | `from foundry_sdk.v2.connectivity.errors import PropertyCannotBeBlank` | -**Connectivity** | PropertyCannotBeEmpty | `from foundry_sdk.v2.connectivity.errors import PropertyCannotBeEmpty` | -**Connectivity** | ReplaceFileImportPermissionDenied | `from foundry_sdk.v2.connectivity.errors import ReplaceFileImportPermissionDenied` | -**Connectivity** | ReplaceTableImportPermissionDenied | `from foundry_sdk.v2.connectivity.errors import ReplaceTableImportPermissionDenied` | -**Connectivity** | SecretNamesDoNotExist | `from foundry_sdk.v2.connectivity.errors import SecretNamesDoNotExist` | -**Connectivity** | TableImportNotFound | `from foundry_sdk.v2.connectivity.errors import TableImportNotFound` | -**Connectivity** | TableImportNotSupportedForConnection | `from foundry_sdk.v2.connectivity.errors import TableImportNotSupportedForConnection` | -**Connectivity** | TableImportTypeNotSupported | `from foundry_sdk.v2.connectivity.errors import TableImportTypeNotSupported` | -**Connectivity** | UnknownWorkerCannotBeUsedForCreatingOrUpdatingConnections | `from foundry_sdk.v2.connectivity.errors import UnknownWorkerCannotBeUsedForCreatingOrUpdatingConnections` | -**Connectivity** | UpdateExportSettingsForConnectionPermissionDenied | `from foundry_sdk.v2.connectivity.errors import UpdateExportSettingsForConnectionPermissionDenied` | -**Connectivity** | UpdateSecretsForConnectionPermissionDenied | `from foundry_sdk.v2.connectivity.errors import UpdateSecretsForConnectionPermissionDenied` | -**Connectivity** | UploadCustomJdbcDriverNotSupportForConnection | `from foundry_sdk.v2.connectivity.errors import UploadCustomJdbcDriverNotSupportForConnection` | -**Connectivity** | UploadCustomJdbcDriversConnectionPermissionDenied | `from foundry_sdk.v2.connectivity.errors import UploadCustomJdbcDriversConnectionPermissionDenied` | -**Connectivity** | VirtualTableAlreadyExists | `from foundry_sdk.v2.connectivity.errors import VirtualTableAlreadyExists` | -**Connectivity** | VirtualTableRegisterFromSourcePermissionDenied | `from foundry_sdk.v2.connectivity.errors import VirtualTableRegisterFromSourcePermissionDenied` | -**Core** | ApiFeaturePreviewUsageOnly | `from foundry_sdk.v2.core.errors import ApiFeaturePreviewUsageOnly` | -**Core** | ApiUsageDenied | `from foundry_sdk.v2.core.errors import ApiUsageDenied` | -**Core** | BatchRequestSizeExceededLimit | `from foundry_sdk.v2.core.errors import BatchRequestSizeExceededLimit` | -**Core** | FolderNotFound | `from foundry_sdk.v2.core.errors import FolderNotFound` | -**Core** | FoundryBranchNotFound | `from foundry_sdk.v2.core.errors import FoundryBranchNotFound` | -**Core** | InvalidAndFilter | `from foundry_sdk.v2.core.errors import InvalidAndFilter` | -**Core** | InvalidAttributionHeader | `from foundry_sdk.v2.core.errors import InvalidAttributionHeader` | -**Core** | InvalidChangeDataCaptureConfiguration | `from foundry_sdk.v2.core.errors import InvalidChangeDataCaptureConfiguration` | -**Core** | InvalidFieldSchema | `from foundry_sdk.v2.core.errors import InvalidFieldSchema` | -**Core** | InvalidFilePath | `from foundry_sdk.v2.core.errors import InvalidFilePath` | -**Core** | InvalidFilterValue | `from foundry_sdk.v2.core.errors import InvalidFilterValue` | -**Core** | InvalidOrFilter | `from foundry_sdk.v2.core.errors import InvalidOrFilter` | -**Core** | InvalidPageSize | `from foundry_sdk.v2.core.errors import InvalidPageSize` | -**Core** | InvalidPageToken | `from foundry_sdk.v2.core.errors import InvalidPageToken` | -**Core** | InvalidParameterCombination | `from foundry_sdk.v2.core.errors import InvalidParameterCombination` | -**Core** | InvalidSchema | `from foundry_sdk.v2.core.errors import InvalidSchema` | -**Core** | InvalidTimeZone | `from foundry_sdk.v2.core.errors import InvalidTimeZone` | -**Core** | MissingBatchRequest | `from foundry_sdk.v2.core.errors import MissingBatchRequest` | -**Core** | MissingPostBody | `from foundry_sdk.v2.core.errors import MissingPostBody` | -**Core** | ResourceNameAlreadyExists | `from foundry_sdk.v2.core.errors import ResourceNameAlreadyExists` | -**Core** | SchemaIsNotStreamSchema | `from foundry_sdk.v2.core.errors import SchemaIsNotStreamSchema` | -**Core** | UnknownDistanceUnit | `from foundry_sdk.v2.core.errors import UnknownDistanceUnit` | -**DataHealth** | CheckAlreadyExists | `from foundry_sdk.v2.data_health.errors import CheckAlreadyExists` | -**DataHealth** | CheckNotFound | `from foundry_sdk.v2.data_health.errors import CheckNotFound` | -**DataHealth** | CheckReportNotFound | `from foundry_sdk.v2.data_health.errors import CheckReportNotFound` | -**DataHealth** | CheckTypeNotSupported | `from foundry_sdk.v2.data_health.errors import CheckTypeNotSupported` | -**DataHealth** | CreateCheckPermissionDenied | `from foundry_sdk.v2.data_health.errors import CreateCheckPermissionDenied` | -**DataHealth** | DeleteCheckPermissionDenied | `from foundry_sdk.v2.data_health.errors import DeleteCheckPermissionDenied` | -**DataHealth** | InvalidNumericColumnCheckConfig | `from foundry_sdk.v2.data_health.errors import InvalidNumericColumnCheckConfig` | -**DataHealth** | InvalidPercentageCheckConfig | `from foundry_sdk.v2.data_health.errors import InvalidPercentageCheckConfig` | -**DataHealth** | InvalidTimeCheckConfig | `from foundry_sdk.v2.data_health.errors import InvalidTimeCheckConfig` | -**DataHealth** | InvalidTrendConfig | `from foundry_sdk.v2.data_health.errors import InvalidTrendConfig` | -**DataHealth** | ModifyingCheckTypeNotSupported | `from foundry_sdk.v2.data_health.errors import ModifyingCheckTypeNotSupported` | -**DataHealth** | PercentageValueAboveMaximum | `from foundry_sdk.v2.data_health.errors import PercentageValueAboveMaximum` | -**DataHealth** | PercentageValueBelowMinimum | `from foundry_sdk.v2.data_health.errors import PercentageValueBelowMinimum` | -**DataHealth** | ReplaceCheckPermissionDenied | `from foundry_sdk.v2.data_health.errors import ReplaceCheckPermissionDenied` | -**Datasets** | AbortTransactionPermissionDenied | `from foundry_sdk.v2.datasets.errors import AbortTransactionPermissionDenied` | -**Datasets** | AddBackingDatasetsPermissionDenied | `from foundry_sdk.v2.datasets.errors import AddBackingDatasetsPermissionDenied` | -**Datasets** | AddPrimaryKeyPermissionDenied | `from foundry_sdk.v2.datasets.errors import AddPrimaryKeyPermissionDenied` | -**Datasets** | BranchAlreadyExists | `from foundry_sdk.v2.datasets.errors import BranchAlreadyExists` | -**Datasets** | BranchNotFound | `from foundry_sdk.v2.datasets.errors import BranchNotFound` | -**Datasets** | BuildTransactionPermissionDenied | `from foundry_sdk.v2.datasets.errors import BuildTransactionPermissionDenied` | -**Datasets** | ColumnTypesNotSupported | `from foundry_sdk.v2.datasets.errors import ColumnTypesNotSupported` | -**Datasets** | CommitTransactionPermissionDenied | `from foundry_sdk.v2.datasets.errors import CommitTransactionPermissionDenied` | -**Datasets** | CreateBranchPermissionDenied | `from foundry_sdk.v2.datasets.errors import CreateBranchPermissionDenied` | -**Datasets** | CreateDatasetPermissionDenied | `from foundry_sdk.v2.datasets.errors import CreateDatasetPermissionDenied` | -**Datasets** | CreateTransactionPermissionDenied | `from foundry_sdk.v2.datasets.errors import CreateTransactionPermissionDenied` | -**Datasets** | CreateViewPermissionDenied | `from foundry_sdk.v2.datasets.errors import CreateViewPermissionDenied` | -**Datasets** | DatasetNotFound | `from foundry_sdk.v2.datasets.errors import DatasetNotFound` | -**Datasets** | DatasetReadNotSupported | `from foundry_sdk.v2.datasets.errors import DatasetReadNotSupported` | -**Datasets** | DatasetViewNotFound | `from foundry_sdk.v2.datasets.errors import DatasetViewNotFound` | -**Datasets** | DeleteBranchPermissionDenied | `from foundry_sdk.v2.datasets.errors import DeleteBranchPermissionDenied` | -**Datasets** | DeleteFilePermissionDenied | `from foundry_sdk.v2.datasets.errors import DeleteFilePermissionDenied` | -**Datasets** | DeleteSchemaPermissionDenied | `from foundry_sdk.v2.datasets.errors import DeleteSchemaPermissionDenied` | -**Datasets** | FileAlreadyExists | `from foundry_sdk.v2.datasets.errors import FileAlreadyExists` | -**Datasets** | FileNotFound | `from foundry_sdk.v2.datasets.errors import FileNotFound` | -**Datasets** | FileNotFoundOnBranch | `from foundry_sdk.v2.datasets.errors import FileNotFoundOnBranch` | -**Datasets** | FileNotFoundOnTransactionRange | `from foundry_sdk.v2.datasets.errors import FileNotFoundOnTransactionRange` | -**Datasets** | GetBranchTransactionHistoryPermissionDenied | `from foundry_sdk.v2.datasets.errors import GetBranchTransactionHistoryPermissionDenied` | -**Datasets** | GetDatasetHealthChecksPermissionDenied | `from foundry_sdk.v2.datasets.errors import GetDatasetHealthChecksPermissionDenied` | -**Datasets** | GetDatasetJobsPermissionDenied | `from foundry_sdk.v2.datasets.errors import GetDatasetJobsPermissionDenied` | -**Datasets** | GetDatasetSchedulesPermissionDenied | `from foundry_sdk.v2.datasets.errors import GetDatasetSchedulesPermissionDenied` | -**Datasets** | GetDatasetSchemaPermissionDenied | `from foundry_sdk.v2.datasets.errors import GetDatasetSchemaPermissionDenied` | -**Datasets** | GetFileContentPermissionDenied | `from foundry_sdk.v2.datasets.errors import GetFileContentPermissionDenied` | -**Datasets** | InputBackingDatasetNotInOutputViewProject | `from foundry_sdk.v2.datasets.errors import InputBackingDatasetNotInOutputViewProject` | -**Datasets** | InvalidBranchName | `from foundry_sdk.v2.datasets.errors import InvalidBranchName` | -**Datasets** | InvalidTransactionType | `from foundry_sdk.v2.datasets.errors import InvalidTransactionType` | -**Datasets** | InvalidViewBackingDataset | `from foundry_sdk.v2.datasets.errors import InvalidViewBackingDataset` | -**Datasets** | InvalidViewPrimaryKeyColumnType | `from foundry_sdk.v2.datasets.errors import InvalidViewPrimaryKeyColumnType` | -**Datasets** | InvalidViewPrimaryKeyDeletionColumn | `from foundry_sdk.v2.datasets.errors import InvalidViewPrimaryKeyDeletionColumn` | -**Datasets** | JobTransactionPermissionDenied | `from foundry_sdk.v2.datasets.errors import JobTransactionPermissionDenied` | -**Datasets** | NotAllColumnsInPrimaryKeyArePresent | `from foundry_sdk.v2.datasets.errors import NotAllColumnsInPrimaryKeyArePresent` | -**Datasets** | OpenTransactionAlreadyExists | `from foundry_sdk.v2.datasets.errors import OpenTransactionAlreadyExists` | -**Datasets** | PutDatasetSchemaPermissionDenied | `from foundry_sdk.v2.datasets.errors import PutDatasetSchemaPermissionDenied` | -**Datasets** | PutSchemaPermissionDenied | `from foundry_sdk.v2.datasets.errors import PutSchemaPermissionDenied` | -**Datasets** | ReadTableDatasetPermissionDenied | `from foundry_sdk.v2.datasets.errors import ReadTableDatasetPermissionDenied` | -**Datasets** | ReadTableError | `from foundry_sdk.v2.datasets.errors import ReadTableError` | -**Datasets** | ReadTableRowLimitExceeded | `from foundry_sdk.v2.datasets.errors import ReadTableRowLimitExceeded` | -**Datasets** | ReadTableTimeout | `from foundry_sdk.v2.datasets.errors import ReadTableTimeout` | -**Datasets** | RemoveBackingDatasetsPermissionDenied | `from foundry_sdk.v2.datasets.errors import RemoveBackingDatasetsPermissionDenied` | -**Datasets** | ReplaceBackingDatasetsPermissionDenied | `from foundry_sdk.v2.datasets.errors import ReplaceBackingDatasetsPermissionDenied` | -**Datasets** | SchemaNotFound | `from foundry_sdk.v2.datasets.errors import SchemaNotFound` | -**Datasets** | TransactionNotCommitted | `from foundry_sdk.v2.datasets.errors import TransactionNotCommitted` | -**Datasets** | TransactionNotFound | `from foundry_sdk.v2.datasets.errors import TransactionNotFound` | -**Datasets** | TransactionNotOpen | `from foundry_sdk.v2.datasets.errors import TransactionNotOpen` | -**Datasets** | UploadFilePermissionDenied | `from foundry_sdk.v2.datasets.errors import UploadFilePermissionDenied` | -**Datasets** | ViewDatasetCleanupFailed | `from foundry_sdk.v2.datasets.errors import ViewDatasetCleanupFailed` | -**Datasets** | ViewNotFound | `from foundry_sdk.v2.datasets.errors import ViewNotFound` | -**Datasets** | ViewPrimaryKeyCannotBeModified | `from foundry_sdk.v2.datasets.errors import ViewPrimaryKeyCannotBeModified` | -**Datasets** | ViewPrimaryKeyDeletionColumnNotInDatasetSchema | `from foundry_sdk.v2.datasets.errors import ViewPrimaryKeyDeletionColumnNotInDatasetSchema` | -**Datasets** | ViewPrimaryKeyMustContainAtLeastOneColumn | `from foundry_sdk.v2.datasets.errors import ViewPrimaryKeyMustContainAtLeastOneColumn` | -**Datasets** | ViewPrimaryKeyRequiresBackingDatasets | `from foundry_sdk.v2.datasets.errors import ViewPrimaryKeyRequiresBackingDatasets` | -**Filesystem** | AddGroupToParentGroupPermissionDenied | `from foundry_sdk.v2.filesystem.errors import AddGroupToParentGroupPermissionDenied` | -**Filesystem** | AddMarkingsPermissionDenied | `from foundry_sdk.v2.filesystem.errors import AddMarkingsPermissionDenied` | -**Filesystem** | AddOrganizationsPermissionDenied | `from foundry_sdk.v2.filesystem.errors import AddOrganizationsPermissionDenied` | -**Filesystem** | AddResourceRolesPermissionDenied | `from foundry_sdk.v2.filesystem.errors import AddResourceRolesPermissionDenied` | -**Filesystem** | CreateFolderOutsideProjectNotSupported | `from foundry_sdk.v2.filesystem.errors import CreateFolderOutsideProjectNotSupported` | -**Filesystem** | CreateFolderPermissionDenied | `from foundry_sdk.v2.filesystem.errors import CreateFolderPermissionDenied` | -**Filesystem** | CreateGroupPermissionDenied | `from foundry_sdk.v2.filesystem.errors import CreateGroupPermissionDenied` | -**Filesystem** | CreateProjectFromTemplatePermissionDenied | `from foundry_sdk.v2.filesystem.errors import CreateProjectFromTemplatePermissionDenied` | -**Filesystem** | CreateProjectNoOwnerLikeRoleGrant | `from foundry_sdk.v2.filesystem.errors import CreateProjectNoOwnerLikeRoleGrant` | -**Filesystem** | CreateProjectPermissionDenied | `from foundry_sdk.v2.filesystem.errors import CreateProjectPermissionDenied` | -**Filesystem** | CreateSpacePermissionDenied | `from foundry_sdk.v2.filesystem.errors import CreateSpacePermissionDenied` | -**Filesystem** | DefaultRolesNotInSpaceRoleSet | `from foundry_sdk.v2.filesystem.errors import DefaultRolesNotInSpaceRoleSet` | -**Filesystem** | DeleteResourcePermissionDenied | `from foundry_sdk.v2.filesystem.errors import DeleteResourcePermissionDenied` | -**Filesystem** | DeleteSpacePermissionDenied | `from foundry_sdk.v2.filesystem.errors import DeleteSpacePermissionDenied` | -**Filesystem** | EnrollmentNotFound | `from foundry_sdk.v2.filesystem.errors import EnrollmentNotFound` | -**Filesystem** | FolderNotFound | `from foundry_sdk.v2.filesystem.errors import FolderNotFound` | -**Filesystem** | ForbiddenOperationOnAutosavedResource | `from foundry_sdk.v2.filesystem.errors import ForbiddenOperationOnAutosavedResource` | -**Filesystem** | ForbiddenOperationOnHiddenResource | `from foundry_sdk.v2.filesystem.errors import ForbiddenOperationOnHiddenResource` | -**Filesystem** | GetAccessRequirementsPermissionDenied | `from foundry_sdk.v2.filesystem.errors import GetAccessRequirementsPermissionDenied` | -**Filesystem** | GetByPathPermissionDenied | `from foundry_sdk.v2.filesystem.errors import GetByPathPermissionDenied` | -**Filesystem** | GetRootFolderNotSupported | `from foundry_sdk.v2.filesystem.errors import GetRootFolderNotSupported` | -**Filesystem** | GetSpaceResourceNotSupported | `from foundry_sdk.v2.filesystem.errors import GetSpaceResourceNotSupported` | -**Filesystem** | InvalidDefaultRoles | `from foundry_sdk.v2.filesystem.errors import InvalidDefaultRoles` | -**Filesystem** | InvalidDescription | `from foundry_sdk.v2.filesystem.errors import InvalidDescription` | -**Filesystem** | InvalidDisplayName | `from foundry_sdk.v2.filesystem.errors import InvalidDisplayName` | -**Filesystem** | InvalidFolder | `from foundry_sdk.v2.filesystem.errors import InvalidFolder` | -**Filesystem** | InvalidOrganizationHierarchy | `from foundry_sdk.v2.filesystem.errors import InvalidOrganizationHierarchy` | -**Filesystem** | InvalidOrganizations | `from foundry_sdk.v2.filesystem.errors import InvalidOrganizations` | -**Filesystem** | InvalidPath | `from foundry_sdk.v2.filesystem.errors import InvalidPath` | -**Filesystem** | InvalidPrincipalIdsForGroupTemplate | `from foundry_sdk.v2.filesystem.errors import InvalidPrincipalIdsForGroupTemplate` | -**Filesystem** | InvalidRoleIds | `from foundry_sdk.v2.filesystem.errors import InvalidRoleIds` | -**Filesystem** | InvalidVariable | `from foundry_sdk.v2.filesystem.errors import InvalidVariable` | -**Filesystem** | InvalidVariableEnumOption | `from foundry_sdk.v2.filesystem.errors import InvalidVariableEnumOption` | -**Filesystem** | MarkingNotFound | `from foundry_sdk.v2.filesystem.errors import MarkingNotFound` | -**Filesystem** | MissingDisplayName | `from foundry_sdk.v2.filesystem.errors import MissingDisplayName` | -**Filesystem** | MissingVariableValue | `from foundry_sdk.v2.filesystem.errors import MissingVariableValue` | -**Filesystem** | NotAuthorizedToApplyOrganization | `from foundry_sdk.v2.filesystem.errors import NotAuthorizedToApplyOrganization` | -**Filesystem** | OrganizationCannotBeRemoved | `from foundry_sdk.v2.filesystem.errors import OrganizationCannotBeRemoved` | -**Filesystem** | OrganizationMarkingNotOnSpace | `from foundry_sdk.v2.filesystem.errors import OrganizationMarkingNotOnSpace` | -**Filesystem** | OrganizationMarkingNotSupported | `from foundry_sdk.v2.filesystem.errors import OrganizationMarkingNotSupported` | -**Filesystem** | OrganizationsNotFound | `from foundry_sdk.v2.filesystem.errors import OrganizationsNotFound` | -**Filesystem** | PathNotFound | `from foundry_sdk.v2.filesystem.errors import PathNotFound` | -**Filesystem** | PermanentlyDeleteResourcePermissionDenied | `from foundry_sdk.v2.filesystem.errors import PermanentlyDeleteResourcePermissionDenied` | -**Filesystem** | ProjectCreationNotSupported | `from foundry_sdk.v2.filesystem.errors import ProjectCreationNotSupported` | -**Filesystem** | ProjectNameAlreadyExists | `from foundry_sdk.v2.filesystem.errors import ProjectNameAlreadyExists` | -**Filesystem** | ProjectNotFound | `from foundry_sdk.v2.filesystem.errors import ProjectNotFound` | -**Filesystem** | ProjectTemplateNotFound | `from foundry_sdk.v2.filesystem.errors import ProjectTemplateNotFound` | -**Filesystem** | RemoveMarkingsPermissionDenied | `from foundry_sdk.v2.filesystem.errors import RemoveMarkingsPermissionDenied` | -**Filesystem** | RemoveOrganizationsPermissionDenied | `from foundry_sdk.v2.filesystem.errors import RemoveOrganizationsPermissionDenied` | -**Filesystem** | RemoveResourceRolesPermissionDenied | `from foundry_sdk.v2.filesystem.errors import RemoveResourceRolesPermissionDenied` | -**Filesystem** | ReplaceProjectPermissionDenied | `from foundry_sdk.v2.filesystem.errors import ReplaceProjectPermissionDenied` | -**Filesystem** | ReplaceSpacePermissionDenied | `from foundry_sdk.v2.filesystem.errors import ReplaceSpacePermissionDenied` | -**Filesystem** | ReservedSpaceCannotBeReplaced | `from foundry_sdk.v2.filesystem.errors import ReservedSpaceCannotBeReplaced` | -**Filesystem** | ResourceNameAlreadyExists | `from foundry_sdk.v2.filesystem.errors import ResourceNameAlreadyExists` | -**Filesystem** | ResourceNotDirectlyTrashed | `from foundry_sdk.v2.filesystem.errors import ResourceNotDirectlyTrashed` | -**Filesystem** | ResourceNotFound | `from foundry_sdk.v2.filesystem.errors import ResourceNotFound` | -**Filesystem** | ResourceNotTrashed | `from foundry_sdk.v2.filesystem.errors import ResourceNotTrashed` | -**Filesystem** | RestoreResourcePermissionDenied | `from foundry_sdk.v2.filesystem.errors import RestoreResourcePermissionDenied` | -**Filesystem** | RoleSetNotFound | `from foundry_sdk.v2.filesystem.errors import RoleSetNotFound` | -**Filesystem** | SpaceInternalError | `from foundry_sdk.v2.filesystem.errors import SpaceInternalError` | -**Filesystem** | SpaceInvalidArgument | `from foundry_sdk.v2.filesystem.errors import SpaceInvalidArgument` | -**Filesystem** | SpaceNameInvalid | `from foundry_sdk.v2.filesystem.errors import SpaceNameInvalid` | -**Filesystem** | SpaceNotEmpty | `from foundry_sdk.v2.filesystem.errors import SpaceNotEmpty` | -**Filesystem** | SpaceNotFound | `from foundry_sdk.v2.filesystem.errors import SpaceNotFound` | -**Filesystem** | TemplateGroupNameConflict | `from foundry_sdk.v2.filesystem.errors import TemplateGroupNameConflict` | -**Filesystem** | TemplateMarkingNameConflict | `from foundry_sdk.v2.filesystem.errors import TemplateMarkingNameConflict` | -**Filesystem** | TrashingAutosavedResourcesNotSupported | `from foundry_sdk.v2.filesystem.errors import TrashingAutosavedResourcesNotSupported` | -**Filesystem** | TrashingHiddenResourcesNotSupported | `from foundry_sdk.v2.filesystem.errors import TrashingHiddenResourcesNotSupported` | -**Filesystem** | TrashingSpaceNotSupported | `from foundry_sdk.v2.filesystem.errors import TrashingSpaceNotSupported` | -**Filesystem** | UsageAccountServiceIsNotPresent | `from foundry_sdk.v2.filesystem.errors import UsageAccountServiceIsNotPresent` | -**Functions** | ConsistentSnapshotError | `from foundry_sdk.v2.functions.errors import ConsistentSnapshotError` | -**Functions** | ExecuteQueryPermissionDenied | `from foundry_sdk.v2.functions.errors import ExecuteQueryPermissionDenied` | -**Functions** | GetByRidQueriesPermissionDenied | `from foundry_sdk.v2.functions.errors import GetByRidQueriesPermissionDenied` | -**Functions** | InvalidQueryOutputValue | `from foundry_sdk.v2.functions.errors import InvalidQueryOutputValue` | -**Functions** | InvalidQueryParameterValue | `from foundry_sdk.v2.functions.errors import InvalidQueryParameterValue` | -**Functions** | MissingParameter | `from foundry_sdk.v2.functions.errors import MissingParameter` | -**Functions** | QueryEncounteredUserFacingError | `from foundry_sdk.v2.functions.errors import QueryEncounteredUserFacingError` | -**Functions** | QueryMemoryExceededLimit | `from foundry_sdk.v2.functions.errors import QueryMemoryExceededLimit` | -**Functions** | QueryNotFound | `from foundry_sdk.v2.functions.errors import QueryNotFound` | -**Functions** | QueryRuntimeError | `from foundry_sdk.v2.functions.errors import QueryRuntimeError` | -**Functions** | QueryTimeExceededLimit | `from foundry_sdk.v2.functions.errors import QueryTimeExceededLimit` | -**Functions** | QueryVersionNotFound | `from foundry_sdk.v2.functions.errors import QueryVersionNotFound` | -**Functions** | StreamingExecuteQueryPermissionDenied | `from foundry_sdk.v2.functions.errors import StreamingExecuteQueryPermissionDenied` | -**Functions** | UnknownParameter | `from foundry_sdk.v2.functions.errors import UnknownParameter` | -**Functions** | ValueTypeNotFound | `from foundry_sdk.v2.functions.errors import ValueTypeNotFound` | -**Functions** | VersionIdNotFound | `from foundry_sdk.v2.functions.errors import VersionIdNotFound` | -**LanguageModels** | AnthropicMessagesPermissionDenied | `from foundry_sdk.v2.language_models.errors import AnthropicMessagesPermissionDenied` | -**LanguageModels** | MultipleSystemPromptsNotSupported | `from foundry_sdk.v2.language_models.errors import MultipleSystemPromptsNotSupported` | -**LanguageModels** | MultipleToolResultContentsNotSupported | `from foundry_sdk.v2.language_models.errors import MultipleToolResultContentsNotSupported` | -**LanguageModels** | OpenAiEmbeddingsPermissionDenied | `from foundry_sdk.v2.language_models.errors import OpenAiEmbeddingsPermissionDenied` | -**MediaSets** | ConflictingMediaSetIdentifiers | `from foundry_sdk.v2.media_sets.errors import ConflictingMediaSetIdentifiers` | -**MediaSets** | GetMediaItemRidByPathPermissionDenied | `from foundry_sdk.v2.media_sets.errors import GetMediaItemRidByPathPermissionDenied` | -**MediaSets** | InvalidMediaItemSchema | `from foundry_sdk.v2.media_sets.errors import InvalidMediaItemSchema` | -**MediaSets** | MediaItemHasUnsupportedSecuritySettings | `from foundry_sdk.v2.media_sets.errors import MediaItemHasUnsupportedSecuritySettings` | -**MediaSets** | MediaItemImageUnparsable | `from foundry_sdk.v2.media_sets.errors import MediaItemImageUnparsable` | -**MediaSets** | MediaItemIsPasswordProtected | `from foundry_sdk.v2.media_sets.errors import MediaItemIsPasswordProtected` | -**MediaSets** | MediaItemNotFound | `from foundry_sdk.v2.media_sets.errors import MediaItemNotFound` | -**MediaSets** | MediaItemXmlUnparsable | `from foundry_sdk.v2.media_sets.errors import MediaItemXmlUnparsable` | -**MediaSets** | MediaSetNotFound | `from foundry_sdk.v2.media_sets.errors import MediaSetNotFound` | -**MediaSets** | MediaSetOpenTransactionAlreadyExists | `from foundry_sdk.v2.media_sets.errors import MediaSetOpenTransactionAlreadyExists` | -**MediaSets** | MissingMediaItemContent | `from foundry_sdk.v2.media_sets.errors import MissingMediaItemContent` | -**MediaSets** | MissingMediaItemPath | `from foundry_sdk.v2.media_sets.errors import MissingMediaItemPath` | -**MediaSets** | TemporaryMediaUploadInsufficientPermissions | `from foundry_sdk.v2.media_sets.errors import TemporaryMediaUploadInsufficientPermissions` | -**MediaSets** | TemporaryMediaUploadUnknownFailure | `from foundry_sdk.v2.media_sets.errors import TemporaryMediaUploadUnknownFailure` | -**MediaSets** | TransformedMediaItemNotFound | `from foundry_sdk.v2.media_sets.errors import TransformedMediaItemNotFound` | -**Models** | CondaSolveFailureForProvidedPackages | `from foundry_sdk.v2.models.errors import CondaSolveFailureForProvidedPackages` | -**Models** | CreateModelPermissionDenied | `from foundry_sdk.v2.models.errors import CreateModelPermissionDenied` | -**Models** | CreateModelVersionPermissionDenied | `from foundry_sdk.v2.models.errors import CreateModelVersionPermissionDenied` | -**Models** | InvalidModelApi | `from foundry_sdk.v2.models.errors import InvalidModelApi` | -**Models** | ModelNotFound | `from foundry_sdk.v2.models.errors import ModelNotFound` | -**Models** | ModelVersionNotFound | `from foundry_sdk.v2.models.errors import ModelVersionNotFound` | -**Ontologies** | ActionContainsDuplicateEdits | `from foundry_sdk.v2.ontologies.errors import ActionContainsDuplicateEdits` | -**Ontologies** | ActionEditedPropertiesNotFound | `from foundry_sdk.v2.ontologies.errors import ActionEditedPropertiesNotFound` | -**Ontologies** | ActionEditsReadOnlyEntity | `from foundry_sdk.v2.ontologies.errors import ActionEditsReadOnlyEntity` | -**Ontologies** | ActionNotFound | `from foundry_sdk.v2.ontologies.errors import ActionNotFound` | -**Ontologies** | ActionParameterInterfaceTypeNotFound | `from foundry_sdk.v2.ontologies.errors import ActionParameterInterfaceTypeNotFound` | -**Ontologies** | ActionParameterObjectNotFound | `from foundry_sdk.v2.ontologies.errors import ActionParameterObjectNotFound` | -**Ontologies** | ActionParameterObjectTypeNotFound | `from foundry_sdk.v2.ontologies.errors import ActionParameterObjectTypeNotFound` | -**Ontologies** | ActionTypeNotFound | `from foundry_sdk.v2.ontologies.errors import ActionTypeNotFound` | -**Ontologies** | ActionValidationFailed | `from foundry_sdk.v2.ontologies.errors import ActionValidationFailed` | -**Ontologies** | AggregationAccuracyNotSupported | `from foundry_sdk.v2.ontologies.errors import AggregationAccuracyNotSupported` | -**Ontologies** | AggregationGroupCountExceededLimit | `from foundry_sdk.v2.ontologies.errors import AggregationGroupCountExceededLimit` | -**Ontologies** | AggregationMemoryExceededLimit | `from foundry_sdk.v2.ontologies.errors import AggregationMemoryExceededLimit` | -**Ontologies** | AggregationNestedObjectSetSizeExceededLimit | `from foundry_sdk.v2.ontologies.errors import AggregationNestedObjectSetSizeExceededLimit` | -**Ontologies** | ApplyActionFailed | `from foundry_sdk.v2.ontologies.errors import ApplyActionFailed` | -**Ontologies** | AttachmentNotFound | `from foundry_sdk.v2.ontologies.errors import AttachmentNotFound` | -**Ontologies** | AttachmentRidAlreadyExists | `from foundry_sdk.v2.ontologies.errors import AttachmentRidAlreadyExists` | -**Ontologies** | AttachmentSizeExceededLimit | `from foundry_sdk.v2.ontologies.errors import AttachmentSizeExceededLimit` | -**Ontologies** | CipherChannelNotFound | `from foundry_sdk.v2.ontologies.errors import CipherChannelNotFound` | -**Ontologies** | CompositePrimaryKeyNotSupported | `from foundry_sdk.v2.ontologies.errors import CompositePrimaryKeyNotSupported` | -**Ontologies** | ConsistentSnapshotError | `from foundry_sdk.v2.ontologies.errors import ConsistentSnapshotError` | -**Ontologies** | DefaultAndNullGroupsNotSupported | `from foundry_sdk.v2.ontologies.errors import DefaultAndNullGroupsNotSupported` | -**Ontologies** | DerivedPropertyApiNamesNotUnique | `from foundry_sdk.v2.ontologies.errors import DerivedPropertyApiNamesNotUnique` | -**Ontologies** | DuplicateOrderBy | `from foundry_sdk.v2.ontologies.errors import DuplicateOrderBy` | -**Ontologies** | EditObjectPermissionDenied | `from foundry_sdk.v2.ontologies.errors import EditObjectPermissionDenied` | -**Ontologies** | FunctionEncounteredUserFacingError | `from foundry_sdk.v2.ontologies.errors import FunctionEncounteredUserFacingError` | -**Ontologies** | FunctionExecutionFailed | `from foundry_sdk.v2.ontologies.errors import FunctionExecutionFailed` | -**Ontologies** | FunctionExecutionTimedOut | `from foundry_sdk.v2.ontologies.errors import FunctionExecutionTimedOut` | -**Ontologies** | FunctionInvalidInput | `from foundry_sdk.v2.ontologies.errors import FunctionInvalidInput` | -**Ontologies** | HighScaleComputationNotEnabled | `from foundry_sdk.v2.ontologies.errors import HighScaleComputationNotEnabled` | -**Ontologies** | InterfaceBasedObjectSetNotSupported | `from foundry_sdk.v2.ontologies.errors import InterfaceBasedObjectSetNotSupported` | -**Ontologies** | InterfaceLinkTypeNotFound | `from foundry_sdk.v2.ontologies.errors import InterfaceLinkTypeNotFound` | -**Ontologies** | InterfacePropertiesHaveDifferentIds | `from foundry_sdk.v2.ontologies.errors import InterfacePropertiesHaveDifferentIds` | -**Ontologies** | InterfacePropertiesNotFound | `from foundry_sdk.v2.ontologies.errors import InterfacePropertiesNotFound` | -**Ontologies** | InterfacePropertyNotFound | `from foundry_sdk.v2.ontologies.errors import InterfacePropertyNotFound` | -**Ontologies** | InterfaceTypeNotFound | `from foundry_sdk.v2.ontologies.errors import InterfaceTypeNotFound` | -**Ontologies** | InterfaceTypesNotFound | `from foundry_sdk.v2.ontologies.errors import InterfaceTypesNotFound` | -**Ontologies** | InvalidAggregationOrdering | `from foundry_sdk.v2.ontologies.errors import InvalidAggregationOrdering` | -**Ontologies** | InvalidAggregationOrderingWithNullValues | `from foundry_sdk.v2.ontologies.errors import InvalidAggregationOrderingWithNullValues` | -**Ontologies** | InvalidAggregationRange | `from foundry_sdk.v2.ontologies.errors import InvalidAggregationRange` | -**Ontologies** | InvalidAggregationRangePropertyType | `from foundry_sdk.v2.ontologies.errors import InvalidAggregationRangePropertyType` | -**Ontologies** | InvalidAggregationRangePropertyTypeForInterface | `from foundry_sdk.v2.ontologies.errors import InvalidAggregationRangePropertyTypeForInterface` | -**Ontologies** | InvalidAggregationRangeValue | `from foundry_sdk.v2.ontologies.errors import InvalidAggregationRangeValue` | -**Ontologies** | InvalidAggregationRangeValueForInterface | `from foundry_sdk.v2.ontologies.errors import InvalidAggregationRangeValueForInterface` | -**Ontologies** | InvalidApplyActionOptionCombination | `from foundry_sdk.v2.ontologies.errors import InvalidApplyActionOptionCombination` | -**Ontologies** | InvalidContentLength | `from foundry_sdk.v2.ontologies.errors import InvalidContentLength` | -**Ontologies** | InvalidContentType | `from foundry_sdk.v2.ontologies.errors import InvalidContentType` | -**Ontologies** | InvalidDerivedPropertyDefinition | `from foundry_sdk.v2.ontologies.errors import InvalidDerivedPropertyDefinition` | -**Ontologies** | InvalidDurationGroupByPropertyType | `from foundry_sdk.v2.ontologies.errors import InvalidDurationGroupByPropertyType` | -**Ontologies** | InvalidDurationGroupByPropertyTypeForInterface | `from foundry_sdk.v2.ontologies.errors import InvalidDurationGroupByPropertyTypeForInterface` | -**Ontologies** | InvalidDurationGroupByValue | `from foundry_sdk.v2.ontologies.errors import InvalidDurationGroupByValue` | -**Ontologies** | InvalidFields | `from foundry_sdk.v2.ontologies.errors import InvalidFields` | -**Ontologies** | InvalidGroupId | `from foundry_sdk.v2.ontologies.errors import InvalidGroupId` | -**Ontologies** | InvalidOrderType | `from foundry_sdk.v2.ontologies.errors import InvalidOrderType` | -**Ontologies** | InvalidParameterValue | `from foundry_sdk.v2.ontologies.errors import InvalidParameterValue` | -**Ontologies** | InvalidPropertyFiltersCombination | `from foundry_sdk.v2.ontologies.errors import InvalidPropertyFiltersCombination` | -**Ontologies** | InvalidPropertyFilterValue | `from foundry_sdk.v2.ontologies.errors import InvalidPropertyFilterValue` | -**Ontologies** | InvalidPropertyType | `from foundry_sdk.v2.ontologies.errors import InvalidPropertyType` | -**Ontologies** | InvalidPropertyValue | `from foundry_sdk.v2.ontologies.errors import InvalidPropertyValue` | -**Ontologies** | InvalidQueryOutputValue | `from foundry_sdk.v2.ontologies.errors import InvalidQueryOutputValue` | -**Ontologies** | InvalidQueryParameterValue | `from foundry_sdk.v2.ontologies.errors import InvalidQueryParameterValue` | -**Ontologies** | InvalidRangeQuery | `from foundry_sdk.v2.ontologies.errors import InvalidRangeQuery` | -**Ontologies** | InvalidSortOrder | `from foundry_sdk.v2.ontologies.errors import InvalidSortOrder` | -**Ontologies** | InvalidSortType | `from foundry_sdk.v2.ontologies.errors import InvalidSortType` | -**Ontologies** | InvalidTransactionEditPropertyValue | `from foundry_sdk.v2.ontologies.errors import InvalidTransactionEditPropertyValue` | -**Ontologies** | InvalidUserId | `from foundry_sdk.v2.ontologies.errors import InvalidUserId` | -**Ontologies** | InvalidVectorDimension | `from foundry_sdk.v2.ontologies.errors import InvalidVectorDimension` | -**Ontologies** | LinkAlreadyExists | `from foundry_sdk.v2.ontologies.errors import LinkAlreadyExists` | -**Ontologies** | LinkedObjectNotFound | `from foundry_sdk.v2.ontologies.errors import LinkedObjectNotFound` | -**Ontologies** | LinkTypeNotFound | `from foundry_sdk.v2.ontologies.errors import LinkTypeNotFound` | -**Ontologies** | LoadObjectSetLinksNotSupported | `from foundry_sdk.v2.ontologies.errors import LoadObjectSetLinksNotSupported` | -**Ontologies** | MalformedPropertyFilters | `from foundry_sdk.v2.ontologies.errors import MalformedPropertyFilters` | -**Ontologies** | MarketplaceActionMappingNotFound | `from foundry_sdk.v2.ontologies.errors import MarketplaceActionMappingNotFound` | -**Ontologies** | MarketplaceInstallationNotFound | `from foundry_sdk.v2.ontologies.errors import MarketplaceInstallationNotFound` | -**Ontologies** | MarketplaceLinkMappingNotFound | `from foundry_sdk.v2.ontologies.errors import MarketplaceLinkMappingNotFound` | -**Ontologies** | MarketplaceObjectMappingNotFound | `from foundry_sdk.v2.ontologies.errors import MarketplaceObjectMappingNotFound` | -**Ontologies** | MarketplaceQueryMappingNotFound | `from foundry_sdk.v2.ontologies.errors import MarketplaceQueryMappingNotFound` | -**Ontologies** | MarketplaceSdkActionMappingNotFound | `from foundry_sdk.v2.ontologies.errors import MarketplaceSdkActionMappingNotFound` | -**Ontologies** | MarketplaceSdkInstallationNotFound | `from foundry_sdk.v2.ontologies.errors import MarketplaceSdkInstallationNotFound` | -**Ontologies** | MarketplaceSdkLinkMappingNotFound | `from foundry_sdk.v2.ontologies.errors import MarketplaceSdkLinkMappingNotFound` | -**Ontologies** | MarketplaceSdkObjectMappingNotFound | `from foundry_sdk.v2.ontologies.errors import MarketplaceSdkObjectMappingNotFound` | -**Ontologies** | MarketplaceSdkPropertyMappingNotFound | `from foundry_sdk.v2.ontologies.errors import MarketplaceSdkPropertyMappingNotFound` | -**Ontologies** | MarketplaceSdkQueryMappingNotFound | `from foundry_sdk.v2.ontologies.errors import MarketplaceSdkQueryMappingNotFound` | -**Ontologies** | MissingParameter | `from foundry_sdk.v2.ontologies.errors import MissingParameter` | -**Ontologies** | MultipleGroupByOnFieldNotSupported | `from foundry_sdk.v2.ontologies.errors import MultipleGroupByOnFieldNotSupported` | -**Ontologies** | MultiplePropertyValuesNotSupported | `from foundry_sdk.v2.ontologies.errors import MultiplePropertyValuesNotSupported` | -**Ontologies** | NotCipherFormatted | `from foundry_sdk.v2.ontologies.errors import NotCipherFormatted` | -**Ontologies** | ObjectAlreadyExists | `from foundry_sdk.v2.ontologies.errors import ObjectAlreadyExists` | -**Ontologies** | ObjectChanged | `from foundry_sdk.v2.ontologies.errors import ObjectChanged` | -**Ontologies** | ObjectNotFound | `from foundry_sdk.v2.ontologies.errors import ObjectNotFound` | -**Ontologies** | ObjectSetNotFound | `from foundry_sdk.v2.ontologies.errors import ObjectSetNotFound` | -**Ontologies** | ObjectsExceededLimit | `from foundry_sdk.v2.ontologies.errors import ObjectsExceededLimit` | -**Ontologies** | ObjectsModifiedConcurrently | `from foundry_sdk.v2.ontologies.errors import ObjectsModifiedConcurrently` | -**Ontologies** | ObjectTypeNotFound | `from foundry_sdk.v2.ontologies.errors import ObjectTypeNotFound` | -**Ontologies** | ObjectTypeNotSynced | `from foundry_sdk.v2.ontologies.errors import ObjectTypeNotSynced` | -**Ontologies** | ObjectTypesNotSynced | `from foundry_sdk.v2.ontologies.errors import ObjectTypesNotSynced` | -**Ontologies** | OntologyApiNameNotUnique | `from foundry_sdk.v2.ontologies.errors import OntologyApiNameNotUnique` | -**Ontologies** | OntologyEditsExceededLimit | `from foundry_sdk.v2.ontologies.errors import OntologyEditsExceededLimit` | -**Ontologies** | OntologyNotFound | `from foundry_sdk.v2.ontologies.errors import OntologyNotFound` | -**Ontologies** | OntologySyncing | `from foundry_sdk.v2.ontologies.errors import OntologySyncing` | -**Ontologies** | OntologySyncingObjectTypes | `from foundry_sdk.v2.ontologies.errors import OntologySyncingObjectTypes` | -**Ontologies** | ParameterObjectNotFound | `from foundry_sdk.v2.ontologies.errors import ParameterObjectNotFound` | -**Ontologies** | ParameterObjectSetRidNotFound | `from foundry_sdk.v2.ontologies.errors import ParameterObjectSetRidNotFound` | -**Ontologies** | ParametersNotFound | `from foundry_sdk.v2.ontologies.errors import ParametersNotFound` | -**Ontologies** | ParameterTypeNotSupported | `from foundry_sdk.v2.ontologies.errors import ParameterTypeNotSupported` | -**Ontologies** | ParentAttachmentPermissionDenied | `from foundry_sdk.v2.ontologies.errors import ParentAttachmentPermissionDenied` | -**Ontologies** | PropertiesHaveDifferentIds | `from foundry_sdk.v2.ontologies.errors import PropertiesHaveDifferentIds` | -**Ontologies** | PropertiesNotFilterable | `from foundry_sdk.v2.ontologies.errors import PropertiesNotFilterable` | -**Ontologies** | PropertiesNotFound | `from foundry_sdk.v2.ontologies.errors import PropertiesNotFound` | -**Ontologies** | PropertiesNotSearchable | `from foundry_sdk.v2.ontologies.errors import PropertiesNotSearchable` | -**Ontologies** | PropertiesNotSortable | `from foundry_sdk.v2.ontologies.errors import PropertiesNotSortable` | -**Ontologies** | PropertyApiNameNotFound | `from foundry_sdk.v2.ontologies.errors import PropertyApiNameNotFound` | -**Ontologies** | PropertyBaseTypeNotSupported | `from foundry_sdk.v2.ontologies.errors import PropertyBaseTypeNotSupported` | -**Ontologies** | PropertyExactMatchingNotSupported | `from foundry_sdk.v2.ontologies.errors import PropertyExactMatchingNotSupported` | -**Ontologies** | PropertyFiltersNotSupported | `from foundry_sdk.v2.ontologies.errors import PropertyFiltersNotSupported` | -**Ontologies** | PropertyNotFound | `from foundry_sdk.v2.ontologies.errors import PropertyNotFound` | -**Ontologies** | PropertyNotFoundOnObject | `from foundry_sdk.v2.ontologies.errors import PropertyNotFoundOnObject` | -**Ontologies** | PropertyTypeDoesNotSupportNearestNeighbors | `from foundry_sdk.v2.ontologies.errors import PropertyTypeDoesNotSupportNearestNeighbors` | -**Ontologies** | PropertyTypeNotFound | `from foundry_sdk.v2.ontologies.errors import PropertyTypeNotFound` | -**Ontologies** | PropertyTypeRidNotFound | `from foundry_sdk.v2.ontologies.errors import PropertyTypeRidNotFound` | -**Ontologies** | PropertyTypesSearchNotSupported | `from foundry_sdk.v2.ontologies.errors import PropertyTypesSearchNotSupported` | -**Ontologies** | QueryEncounteredUserFacingError | `from foundry_sdk.v2.ontologies.errors import QueryEncounteredUserFacingError` | -**Ontologies** | QueryMemoryExceededLimit | `from foundry_sdk.v2.ontologies.errors import QueryMemoryExceededLimit` | -**Ontologies** | QueryNotFound | `from foundry_sdk.v2.ontologies.errors import QueryNotFound` | -**Ontologies** | QueryRuntimeError | `from foundry_sdk.v2.ontologies.errors import QueryRuntimeError` | -**Ontologies** | QueryTimeExceededLimit | `from foundry_sdk.v2.ontologies.errors import QueryTimeExceededLimit` | -**Ontologies** | QueryVersionNotFound | `from foundry_sdk.v2.ontologies.errors import QueryVersionNotFound` | -**Ontologies** | RateLimitReached | `from foundry_sdk.v2.ontologies.errors import RateLimitReached` | -**Ontologies** | SharedPropertiesNotFound | `from foundry_sdk.v2.ontologies.errors import SharedPropertiesNotFound` | -**Ontologies** | SharedPropertyTypeNotFound | `from foundry_sdk.v2.ontologies.errors import SharedPropertyTypeNotFound` | -**Ontologies** | SimilarityThresholdOutOfRange | `from foundry_sdk.v2.ontologies.errors import SimilarityThresholdOutOfRange` | -**Ontologies** | TooManyNearestNeighborsRequested | `from foundry_sdk.v2.ontologies.errors import TooManyNearestNeighborsRequested` | -**Ontologies** | UnauthorizedCipherOperation | `from foundry_sdk.v2.ontologies.errors import UnauthorizedCipherOperation` | -**Ontologies** | UndecryptableValue | `from foundry_sdk.v2.ontologies.errors import UndecryptableValue` | -**Ontologies** | UniqueIdentifierLinkIdsDoNotExistInActionType | `from foundry_sdk.v2.ontologies.errors import UniqueIdentifierLinkIdsDoNotExistInActionType` | -**Ontologies** | UnknownParameter | `from foundry_sdk.v2.ontologies.errors import UnknownParameter` | -**Ontologies** | UnsupportedInterfaceBasedObjectSet | `from foundry_sdk.v2.ontologies.errors import UnsupportedInterfaceBasedObjectSet` | -**Ontologies** | UnsupportedObjectSet | `from foundry_sdk.v2.ontologies.errors import UnsupportedObjectSet` | -**Ontologies** | ValueTypeNotFound | `from foundry_sdk.v2.ontologies.errors import ValueTypeNotFound` | -**Ontologies** | ViewObjectPermissionDenied | `from foundry_sdk.v2.ontologies.errors import ViewObjectPermissionDenied` | -**Orchestration** | BuildInputsNotFound | `from foundry_sdk.v2.orchestration.errors import BuildInputsNotFound` | -**Orchestration** | BuildInputsPermissionDenied | `from foundry_sdk.v2.orchestration.errors import BuildInputsPermissionDenied` | -**Orchestration** | BuildNotFound | `from foundry_sdk.v2.orchestration.errors import BuildNotFound` | -**Orchestration** | BuildNotRunning | `from foundry_sdk.v2.orchestration.errors import BuildNotRunning` | -**Orchestration** | BuildTargetsMissingJobSpecs | `from foundry_sdk.v2.orchestration.errors import BuildTargetsMissingJobSpecs` | -**Orchestration** | BuildTargetsNotFound | `from foundry_sdk.v2.orchestration.errors import BuildTargetsNotFound` | -**Orchestration** | BuildTargetsPermissionDenied | `from foundry_sdk.v2.orchestration.errors import BuildTargetsPermissionDenied` | -**Orchestration** | BuildTargetsResolutionError | `from foundry_sdk.v2.orchestration.errors import BuildTargetsResolutionError` | -**Orchestration** | BuildTargetsUpToDate | `from foundry_sdk.v2.orchestration.errors import BuildTargetsUpToDate` | -**Orchestration** | CancelBuildPermissionDenied | `from foundry_sdk.v2.orchestration.errors import CancelBuildPermissionDenied` | -**Orchestration** | CreateBuildPermissionDenied | `from foundry_sdk.v2.orchestration.errors import CreateBuildPermissionDenied` | -**Orchestration** | CreateSchedulePermissionDenied | `from foundry_sdk.v2.orchestration.errors import CreateSchedulePermissionDenied` | -**Orchestration** | DeleteSchedulePermissionDenied | `from foundry_sdk.v2.orchestration.errors import DeleteSchedulePermissionDenied` | -**Orchestration** | GetAffectedResourcesSchedulePermissionDenied | `from foundry_sdk.v2.orchestration.errors import GetAffectedResourcesSchedulePermissionDenied` | -**Orchestration** | InvalidAndTrigger | `from foundry_sdk.v2.orchestration.errors import InvalidAndTrigger` | -**Orchestration** | InvalidMediaSetTrigger | `from foundry_sdk.v2.orchestration.errors import InvalidMediaSetTrigger` | -**Orchestration** | InvalidOrTrigger | `from foundry_sdk.v2.orchestration.errors import InvalidOrTrigger` | -**Orchestration** | InvalidScheduleDescription | `from foundry_sdk.v2.orchestration.errors import InvalidScheduleDescription` | -**Orchestration** | InvalidScheduleName | `from foundry_sdk.v2.orchestration.errors import InvalidScheduleName` | -**Orchestration** | InvalidTimeTrigger | `from foundry_sdk.v2.orchestration.errors import InvalidTimeTrigger` | -**Orchestration** | JobNotFound | `from foundry_sdk.v2.orchestration.errors import JobNotFound` | -**Orchestration** | MissingBuildTargets | `from foundry_sdk.v2.orchestration.errors import MissingBuildTargets` | -**Orchestration** | MissingConnectingBuildInputs | `from foundry_sdk.v2.orchestration.errors import MissingConnectingBuildInputs` | -**Orchestration** | MissingTrigger | `from foundry_sdk.v2.orchestration.errors import MissingTrigger` | -**Orchestration** | PauseSchedulePermissionDenied | `from foundry_sdk.v2.orchestration.errors import PauseSchedulePermissionDenied` | -**Orchestration** | ReplaceSchedulePermissionDenied | `from foundry_sdk.v2.orchestration.errors import ReplaceSchedulePermissionDenied` | -**Orchestration** | RunSchedulePermissionDenied | `from foundry_sdk.v2.orchestration.errors import RunSchedulePermissionDenied` | -**Orchestration** | ScheduleAlreadyRunning | `from foundry_sdk.v2.orchestration.errors import ScheduleAlreadyRunning` | -**Orchestration** | ScheduleNotFound | `from foundry_sdk.v2.orchestration.errors import ScheduleNotFound` | -**Orchestration** | ScheduleTriggerResourcesNotFound | `from foundry_sdk.v2.orchestration.errors import ScheduleTriggerResourcesNotFound` | -**Orchestration** | ScheduleTriggerResourcesPermissionDenied | `from foundry_sdk.v2.orchestration.errors import ScheduleTriggerResourcesPermissionDenied` | -**Orchestration** | ScheduleVersionNotFound | `from foundry_sdk.v2.orchestration.errors import ScheduleVersionNotFound` | -**Orchestration** | SearchBuildsPermissionDenied | `from foundry_sdk.v2.orchestration.errors import SearchBuildsPermissionDenied` | -**Orchestration** | TargetNotSupported | `from foundry_sdk.v2.orchestration.errors import TargetNotSupported` | -**Orchestration** | UnpauseSchedulePermissionDenied | `from foundry_sdk.v2.orchestration.errors import UnpauseSchedulePermissionDenied` | -**SqlQueries** | CancelSqlQueryPermissionDenied | `from foundry_sdk.v2.sql_queries.errors import CancelSqlQueryPermissionDenied` | -**SqlQueries** | ExecuteSqlQueryPermissionDenied | `from foundry_sdk.v2.sql_queries.errors import ExecuteSqlQueryPermissionDenied` | -**SqlQueries** | GetResultsSqlQueryPermissionDenied | `from foundry_sdk.v2.sql_queries.errors import GetResultsSqlQueryPermissionDenied` | -**SqlQueries** | GetStatusSqlQueryPermissionDenied | `from foundry_sdk.v2.sql_queries.errors import GetStatusSqlQueryPermissionDenied` | -**SqlQueries** | QueryCanceled | `from foundry_sdk.v2.sql_queries.errors import QueryCanceled` | -**SqlQueries** | QueryFailed | `from foundry_sdk.v2.sql_queries.errors import QueryFailed` | -**SqlQueries** | QueryParseError | `from foundry_sdk.v2.sql_queries.errors import QueryParseError` | -**SqlQueries** | QueryPermissionDenied | `from foundry_sdk.v2.sql_queries.errors import QueryPermissionDenied` | -**SqlQueries** | QueryRunning | `from foundry_sdk.v2.sql_queries.errors import QueryRunning` | -**SqlQueries** | ReadQueryInputsPermissionDenied | `from foundry_sdk.v2.sql_queries.errors import ReadQueryInputsPermissionDenied` | -**Streams** | CannotCreateStreamingDatasetInUserFolder | `from foundry_sdk.v2.streams.errors import CannotCreateStreamingDatasetInUserFolder` | -**Streams** | CannotWriteToTrashedStream | `from foundry_sdk.v2.streams.errors import CannotWriteToTrashedStream` | -**Streams** | CreateStreamingDatasetPermissionDenied | `from foundry_sdk.v2.streams.errors import CreateStreamingDatasetPermissionDenied` | -**Streams** | CreateStreamPermissionDenied | `from foundry_sdk.v2.streams.errors import CreateStreamPermissionDenied` | -**Streams** | FailedToProcessBinaryRecord | `from foundry_sdk.v2.streams.errors import FailedToProcessBinaryRecord` | -**Streams** | InvalidStreamNoSchema | `from foundry_sdk.v2.streams.errors import InvalidStreamNoSchema` | -**Streams** | InvalidStreamType | `from foundry_sdk.v2.streams.errors import InvalidStreamType` | -**Streams** | PublishBinaryRecordToStreamPermissionDenied | `from foundry_sdk.v2.streams.errors import PublishBinaryRecordToStreamPermissionDenied` | -**Streams** | PublishRecordsToStreamPermissionDenied | `from foundry_sdk.v2.streams.errors import PublishRecordsToStreamPermissionDenied` | -**Streams** | PublishRecordToStreamPermissionDenied | `from foundry_sdk.v2.streams.errors import PublishRecordToStreamPermissionDenied` | -**Streams** | RecordDoesNotMatchStreamSchema | `from foundry_sdk.v2.streams.errors import RecordDoesNotMatchStreamSchema` | -**Streams** | RecordTooLarge | `from foundry_sdk.v2.streams.errors import RecordTooLarge` | -**Streams** | ResetStreamPermissionDenied | `from foundry_sdk.v2.streams.errors import ResetStreamPermissionDenied` | -**Streams** | StreamNotFound | `from foundry_sdk.v2.streams.errors import StreamNotFound` | -**Streams** | ViewNotFound | `from foundry_sdk.v2.streams.errors import ViewNotFound` | -**ThirdPartyApplications** | CannotDeleteDeployedVersion | `from foundry_sdk.v2.third_party_applications.errors import CannotDeleteDeployedVersion` | -**ThirdPartyApplications** | DeleteVersionPermissionDenied | `from foundry_sdk.v2.third_party_applications.errors import DeleteVersionPermissionDenied` | -**ThirdPartyApplications** | DeployWebsitePermissionDenied | `from foundry_sdk.v2.third_party_applications.errors import DeployWebsitePermissionDenied` | -**ThirdPartyApplications** | FileCountLimitExceeded | `from foundry_sdk.v2.third_party_applications.errors import FileCountLimitExceeded` | -**ThirdPartyApplications** | FileSizeLimitExceeded | `from foundry_sdk.v2.third_party_applications.errors import FileSizeLimitExceeded` | -**ThirdPartyApplications** | InvalidVersion | `from foundry_sdk.v2.third_party_applications.errors import InvalidVersion` | -**ThirdPartyApplications** | ThirdPartyApplicationNotFound | `from foundry_sdk.v2.third_party_applications.errors import ThirdPartyApplicationNotFound` | -**ThirdPartyApplications** | UndeployWebsitePermissionDenied | `from foundry_sdk.v2.third_party_applications.errors import UndeployWebsitePermissionDenied` | -**ThirdPartyApplications** | UploadSnapshotVersionPermissionDenied | `from foundry_sdk.v2.third_party_applications.errors import UploadSnapshotVersionPermissionDenied` | -**ThirdPartyApplications** | UploadVersionPermissionDenied | `from foundry_sdk.v2.third_party_applications.errors import UploadVersionPermissionDenied` | -**ThirdPartyApplications** | VersionAlreadyExists | `from foundry_sdk.v2.third_party_applications.errors import VersionAlreadyExists` | -**ThirdPartyApplications** | VersionLimitExceeded | `from foundry_sdk.v2.third_party_applications.errors import VersionLimitExceeded` | -**ThirdPartyApplications** | VersionNotFound | `from foundry_sdk.v2.third_party_applications.errors import VersionNotFound` | -**ThirdPartyApplications** | WebsiteNotFound | `from foundry_sdk.v2.third_party_applications.errors import WebsiteNotFound` | -**Widgets** | DeleteReleasePermissionDenied | `from foundry_sdk.v2.widgets.errors import DeleteReleasePermissionDenied` | -**Widgets** | DevModeSettingsNotFound | `from foundry_sdk.v2.widgets.errors import DevModeSettingsNotFound` | -**Widgets** | DisableDevModeSettingsPermissionDenied | `from foundry_sdk.v2.widgets.errors import DisableDevModeSettingsPermissionDenied` | -**Widgets** | EnableDevModeSettingsPermissionDenied | `from foundry_sdk.v2.widgets.errors import EnableDevModeSettingsPermissionDenied` | -**Widgets** | FileCountLimitExceeded | `from foundry_sdk.v2.widgets.errors import FileCountLimitExceeded` | -**Widgets** | FileSizeLimitExceeded | `from foundry_sdk.v2.widgets.errors import FileSizeLimitExceeded` | -**Widgets** | GetDevModeSettingsPermissionDenied | `from foundry_sdk.v2.widgets.errors import GetDevModeSettingsPermissionDenied` | -**Widgets** | InvalidDevModeBaseHref | `from foundry_sdk.v2.widgets.errors import InvalidDevModeBaseHref` | -**Widgets** | InvalidDevModeEntrypointCssCount | `from foundry_sdk.v2.widgets.errors import InvalidDevModeEntrypointCssCount` | -**Widgets** | InvalidDevModeEntrypointJsCount | `from foundry_sdk.v2.widgets.errors import InvalidDevModeEntrypointJsCount` | -**Widgets** | InvalidDevModeFilePath | `from foundry_sdk.v2.widgets.errors import InvalidDevModeFilePath` | -**Widgets** | InvalidDevModeWidgetSettingsCount | `from foundry_sdk.v2.widgets.errors import InvalidDevModeWidgetSettingsCount` | -**Widgets** | InvalidEntrypointCssCount | `from foundry_sdk.v2.widgets.errors import InvalidEntrypointCssCount` | -**Widgets** | InvalidEntrypointJsCount | `from foundry_sdk.v2.widgets.errors import InvalidEntrypointJsCount` | -**Widgets** | InvalidEventCount | `from foundry_sdk.v2.widgets.errors import InvalidEventCount` | -**Widgets** | InvalidEventDisplayName | `from foundry_sdk.v2.widgets.errors import InvalidEventDisplayName` | -**Widgets** | InvalidEventId | `from foundry_sdk.v2.widgets.errors import InvalidEventId` | -**Widgets** | InvalidEventParameter | `from foundry_sdk.v2.widgets.errors import InvalidEventParameter` | -**Widgets** | InvalidEventParameterCount | `from foundry_sdk.v2.widgets.errors import InvalidEventParameterCount` | -**Widgets** | InvalidEventParameterId | `from foundry_sdk.v2.widgets.errors import InvalidEventParameterId` | -**Widgets** | InvalidEventParameterUpdateId | `from foundry_sdk.v2.widgets.errors import InvalidEventParameterUpdateId` | -**Widgets** | InvalidFilePath | `from foundry_sdk.v2.widgets.errors import InvalidFilePath` | -**Widgets** | InvalidManifest | `from foundry_sdk.v2.widgets.errors import InvalidManifest` | -**Widgets** | InvalidObjectSetEventParameterType | `from foundry_sdk.v2.widgets.errors import InvalidObjectSetEventParameterType` | -**Widgets** | InvalidObjectSetParameterType | `from foundry_sdk.v2.widgets.errors import InvalidObjectSetParameterType` | -**Widgets** | InvalidParameterCount | `from foundry_sdk.v2.widgets.errors import InvalidParameterCount` | -**Widgets** | InvalidParameterDisplayName | `from foundry_sdk.v2.widgets.errors import InvalidParameterDisplayName` | -**Widgets** | InvalidParameterId | `from foundry_sdk.v2.widgets.errors import InvalidParameterId` | -**Widgets** | InvalidPublishRepository | `from foundry_sdk.v2.widgets.errors import InvalidPublishRepository` | -**Widgets** | InvalidReleaseDescription | `from foundry_sdk.v2.widgets.errors import InvalidReleaseDescription` | -**Widgets** | InvalidReleaseWidgetsCount | `from foundry_sdk.v2.widgets.errors import InvalidReleaseWidgetsCount` | -**Widgets** | InvalidVersion | `from foundry_sdk.v2.widgets.errors import InvalidVersion` | -**Widgets** | InvalidWidgetDescription | `from foundry_sdk.v2.widgets.errors import InvalidWidgetDescription` | -**Widgets** | InvalidWidgetId | `from foundry_sdk.v2.widgets.errors import InvalidWidgetId` | -**Widgets** | InvalidWidgetName | `from foundry_sdk.v2.widgets.errors import InvalidWidgetName` | -**Widgets** | OntologySdkNotFound | `from foundry_sdk.v2.widgets.errors import OntologySdkNotFound` | -**Widgets** | PauseDevModeSettingsPermissionDenied | `from foundry_sdk.v2.widgets.errors import PauseDevModeSettingsPermissionDenied` | -**Widgets** | PublishReleasePermissionDenied | `from foundry_sdk.v2.widgets.errors import PublishReleasePermissionDenied` | -**Widgets** | ReleaseNotFound | `from foundry_sdk.v2.widgets.errors import ReleaseNotFound` | -**Widgets** | RepositoryNotFound | `from foundry_sdk.v2.widgets.errors import RepositoryNotFound` | -**Widgets** | SetWidgetSetDevModeSettingsByIdPermissionDenied | `from foundry_sdk.v2.widgets.errors import SetWidgetSetDevModeSettingsByIdPermissionDenied` | -**Widgets** | SetWidgetSetDevModeSettingsPermissionDenied | `from foundry_sdk.v2.widgets.errors import SetWidgetSetDevModeSettingsPermissionDenied` | -**Widgets** | VersionAlreadyExists | `from foundry_sdk.v2.widgets.errors import VersionAlreadyExists` | -**Widgets** | VersionLimitExceeded | `from foundry_sdk.v2.widgets.errors import VersionLimitExceeded` | -**Widgets** | WidgetIdNotFound | `from foundry_sdk.v2.widgets.errors import WidgetIdNotFound` | -**Widgets** | WidgetLimitExceeded | `from foundry_sdk.v2.widgets.errors import WidgetLimitExceeded` | -**Widgets** | WidgetSetNotFound | `from foundry_sdk.v2.widgets.errors import WidgetSetNotFound` | - -## Documentation for V1 errors - -Namespace | Name | Import | ---------- | ---- | ------ | -**Core** | ApiFeaturePreviewUsageOnly | `from foundry_sdk.v1.core.errors import ApiFeaturePreviewUsageOnly` | -**Core** | ApiUsageDenied | `from foundry_sdk.v1.core.errors import ApiUsageDenied` | -**Core** | FolderNotFound | `from foundry_sdk.v1.core.errors import FolderNotFound` | -**Core** | FoundryBranchNotFound | `from foundry_sdk.v1.core.errors import FoundryBranchNotFound` | -**Core** | InvalidFilePath | `from foundry_sdk.v1.core.errors import InvalidFilePath` | -**Core** | InvalidPageSize | `from foundry_sdk.v1.core.errors import InvalidPageSize` | -**Core** | InvalidPageToken | `from foundry_sdk.v1.core.errors import InvalidPageToken` | -**Core** | InvalidParameterCombination | `from foundry_sdk.v1.core.errors import InvalidParameterCombination` | -**Core** | MissingPostBody | `from foundry_sdk.v1.core.errors import MissingPostBody` | -**Core** | ResourceNameAlreadyExists | `from foundry_sdk.v1.core.errors import ResourceNameAlreadyExists` | -**Core** | UnknownDistanceUnit | `from foundry_sdk.v1.core.errors import UnknownDistanceUnit` | -**Datasets** | AbortTransactionPermissionDenied | `from foundry_sdk.v1.datasets.errors import AbortTransactionPermissionDenied` | -**Datasets** | BranchAlreadyExists | `from foundry_sdk.v1.datasets.errors import BranchAlreadyExists` | -**Datasets** | BranchNotFound | `from foundry_sdk.v1.datasets.errors import BranchNotFound` | -**Datasets** | ColumnTypesNotSupported | `from foundry_sdk.v1.datasets.errors import ColumnTypesNotSupported` | -**Datasets** | CommitTransactionPermissionDenied | `from foundry_sdk.v1.datasets.errors import CommitTransactionPermissionDenied` | -**Datasets** | CreateBranchPermissionDenied | `from foundry_sdk.v1.datasets.errors import CreateBranchPermissionDenied` | -**Datasets** | CreateDatasetPermissionDenied | `from foundry_sdk.v1.datasets.errors import CreateDatasetPermissionDenied` | -**Datasets** | CreateTransactionPermissionDenied | `from foundry_sdk.v1.datasets.errors import CreateTransactionPermissionDenied` | -**Datasets** | DatasetNotFound | `from foundry_sdk.v1.datasets.errors import DatasetNotFound` | -**Datasets** | DatasetReadNotSupported | `from foundry_sdk.v1.datasets.errors import DatasetReadNotSupported` | -**Datasets** | DeleteBranchPermissionDenied | `from foundry_sdk.v1.datasets.errors import DeleteBranchPermissionDenied` | -**Datasets** | DeleteSchemaPermissionDenied | `from foundry_sdk.v1.datasets.errors import DeleteSchemaPermissionDenied` | -**Datasets** | FileAlreadyExists | `from foundry_sdk.v1.datasets.errors import FileAlreadyExists` | -**Datasets** | FileNotFoundOnBranch | `from foundry_sdk.v1.datasets.errors import FileNotFoundOnBranch` | -**Datasets** | FileNotFoundOnTransactionRange | `from foundry_sdk.v1.datasets.errors import FileNotFoundOnTransactionRange` | -**Datasets** | InvalidBranchId | `from foundry_sdk.v1.datasets.errors import InvalidBranchId` | -**Datasets** | InvalidTransactionType | `from foundry_sdk.v1.datasets.errors import InvalidTransactionType` | -**Datasets** | OpenTransactionAlreadyExists | `from foundry_sdk.v1.datasets.errors import OpenTransactionAlreadyExists` | -**Datasets** | PutSchemaPermissionDenied | `from foundry_sdk.v1.datasets.errors import PutSchemaPermissionDenied` | -**Datasets** | ReadTablePermissionDenied | `from foundry_sdk.v1.datasets.errors import ReadTablePermissionDenied` | -**Datasets** | SchemaNotFound | `from foundry_sdk.v1.datasets.errors import SchemaNotFound` | -**Datasets** | TransactionNotCommitted | `from foundry_sdk.v1.datasets.errors import TransactionNotCommitted` | -**Datasets** | TransactionNotFound | `from foundry_sdk.v1.datasets.errors import TransactionNotFound` | -**Datasets** | TransactionNotOpen | `from foundry_sdk.v1.datasets.errors import TransactionNotOpen` | -**Datasets** | UploadFilePermissionDenied | `from foundry_sdk.v1.datasets.errors import UploadFilePermissionDenied` | -**Ontologies** | ActionContainsDuplicateEdits | `from foundry_sdk.v1.ontologies.errors import ActionContainsDuplicateEdits` | -**Ontologies** | ActionEditedPropertiesNotFound | `from foundry_sdk.v1.ontologies.errors import ActionEditedPropertiesNotFound` | -**Ontologies** | ActionEditsReadOnlyEntity | `from foundry_sdk.v1.ontologies.errors import ActionEditsReadOnlyEntity` | -**Ontologies** | ActionNotFound | `from foundry_sdk.v1.ontologies.errors import ActionNotFound` | -**Ontologies** | ActionParameterInterfaceTypeNotFound | `from foundry_sdk.v1.ontologies.errors import ActionParameterInterfaceTypeNotFound` | -**Ontologies** | ActionParameterObjectNotFound | `from foundry_sdk.v1.ontologies.errors import ActionParameterObjectNotFound` | -**Ontologies** | ActionParameterObjectTypeNotFound | `from foundry_sdk.v1.ontologies.errors import ActionParameterObjectTypeNotFound` | -**Ontologies** | ActionTypeNotFound | `from foundry_sdk.v1.ontologies.errors import ActionTypeNotFound` | -**Ontologies** | ActionValidationFailed | `from foundry_sdk.v1.ontologies.errors import ActionValidationFailed` | -**Ontologies** | AggregationAccuracyNotSupported | `from foundry_sdk.v1.ontologies.errors import AggregationAccuracyNotSupported` | -**Ontologies** | AggregationGroupCountExceededLimit | `from foundry_sdk.v1.ontologies.errors import AggregationGroupCountExceededLimit` | -**Ontologies** | AggregationMemoryExceededLimit | `from foundry_sdk.v1.ontologies.errors import AggregationMemoryExceededLimit` | -**Ontologies** | AggregationNestedObjectSetSizeExceededLimit | `from foundry_sdk.v1.ontologies.errors import AggregationNestedObjectSetSizeExceededLimit` | -**Ontologies** | ApplyActionFailed | `from foundry_sdk.v1.ontologies.errors import ApplyActionFailed` | -**Ontologies** | AttachmentNotFound | `from foundry_sdk.v1.ontologies.errors import AttachmentNotFound` | -**Ontologies** | AttachmentRidAlreadyExists | `from foundry_sdk.v1.ontologies.errors import AttachmentRidAlreadyExists` | -**Ontologies** | AttachmentSizeExceededLimit | `from foundry_sdk.v1.ontologies.errors import AttachmentSizeExceededLimit` | -**Ontologies** | CipherChannelNotFound | `from foundry_sdk.v1.ontologies.errors import CipherChannelNotFound` | -**Ontologies** | CompositePrimaryKeyNotSupported | `from foundry_sdk.v1.ontologies.errors import CompositePrimaryKeyNotSupported` | -**Ontologies** | ConsistentSnapshotError | `from foundry_sdk.v1.ontologies.errors import ConsistentSnapshotError` | -**Ontologies** | DefaultAndNullGroupsNotSupported | `from foundry_sdk.v1.ontologies.errors import DefaultAndNullGroupsNotSupported` | -**Ontologies** | DerivedPropertyApiNamesNotUnique | `from foundry_sdk.v1.ontologies.errors import DerivedPropertyApiNamesNotUnique` | -**Ontologies** | DuplicateOrderBy | `from foundry_sdk.v1.ontologies.errors import DuplicateOrderBy` | -**Ontologies** | EditObjectPermissionDenied | `from foundry_sdk.v1.ontologies.errors import EditObjectPermissionDenied` | -**Ontologies** | FunctionEncounteredUserFacingError | `from foundry_sdk.v1.ontologies.errors import FunctionEncounteredUserFacingError` | -**Ontologies** | FunctionExecutionFailed | `from foundry_sdk.v1.ontologies.errors import FunctionExecutionFailed` | -**Ontologies** | FunctionExecutionTimedOut | `from foundry_sdk.v1.ontologies.errors import FunctionExecutionTimedOut` | -**Ontologies** | FunctionInvalidInput | `from foundry_sdk.v1.ontologies.errors import FunctionInvalidInput` | -**Ontologies** | HighScaleComputationNotEnabled | `from foundry_sdk.v1.ontologies.errors import HighScaleComputationNotEnabled` | -**Ontologies** | InterfaceBasedObjectSetNotSupported | `from foundry_sdk.v1.ontologies.errors import InterfaceBasedObjectSetNotSupported` | -**Ontologies** | InterfaceLinkTypeNotFound | `from foundry_sdk.v1.ontologies.errors import InterfaceLinkTypeNotFound` | -**Ontologies** | InterfacePropertiesHaveDifferentIds | `from foundry_sdk.v1.ontologies.errors import InterfacePropertiesHaveDifferentIds` | -**Ontologies** | InterfacePropertiesNotFound | `from foundry_sdk.v1.ontologies.errors import InterfacePropertiesNotFound` | -**Ontologies** | InterfacePropertyNotFound | `from foundry_sdk.v1.ontologies.errors import InterfacePropertyNotFound` | -**Ontologies** | InterfaceTypeNotFound | `from foundry_sdk.v1.ontologies.errors import InterfaceTypeNotFound` | -**Ontologies** | InterfaceTypesNotFound | `from foundry_sdk.v1.ontologies.errors import InterfaceTypesNotFound` | -**Ontologies** | InvalidAggregationOrdering | `from foundry_sdk.v1.ontologies.errors import InvalidAggregationOrdering` | -**Ontologies** | InvalidAggregationOrderingWithNullValues | `from foundry_sdk.v1.ontologies.errors import InvalidAggregationOrderingWithNullValues` | -**Ontologies** | InvalidAggregationRange | `from foundry_sdk.v1.ontologies.errors import InvalidAggregationRange` | -**Ontologies** | InvalidAggregationRangePropertyType | `from foundry_sdk.v1.ontologies.errors import InvalidAggregationRangePropertyType` | -**Ontologies** | InvalidAggregationRangePropertyTypeForInterface | `from foundry_sdk.v1.ontologies.errors import InvalidAggregationRangePropertyTypeForInterface` | -**Ontologies** | InvalidAggregationRangeValue | `from foundry_sdk.v1.ontologies.errors import InvalidAggregationRangeValue` | -**Ontologies** | InvalidAggregationRangeValueForInterface | `from foundry_sdk.v1.ontologies.errors import InvalidAggregationRangeValueForInterface` | -**Ontologies** | InvalidApplyActionOptionCombination | `from foundry_sdk.v1.ontologies.errors import InvalidApplyActionOptionCombination` | -**Ontologies** | InvalidContentLength | `from foundry_sdk.v1.ontologies.errors import InvalidContentLength` | -**Ontologies** | InvalidContentType | `from foundry_sdk.v1.ontologies.errors import InvalidContentType` | -**Ontologies** | InvalidDerivedPropertyDefinition | `from foundry_sdk.v1.ontologies.errors import InvalidDerivedPropertyDefinition` | -**Ontologies** | InvalidDurationGroupByPropertyType | `from foundry_sdk.v1.ontologies.errors import InvalidDurationGroupByPropertyType` | -**Ontologies** | InvalidDurationGroupByPropertyTypeForInterface | `from foundry_sdk.v1.ontologies.errors import InvalidDurationGroupByPropertyTypeForInterface` | -**Ontologies** | InvalidDurationGroupByValue | `from foundry_sdk.v1.ontologies.errors import InvalidDurationGroupByValue` | -**Ontologies** | InvalidFields | `from foundry_sdk.v1.ontologies.errors import InvalidFields` | -**Ontologies** | InvalidGroupId | `from foundry_sdk.v1.ontologies.errors import InvalidGroupId` | -**Ontologies** | InvalidOrderType | `from foundry_sdk.v1.ontologies.errors import InvalidOrderType` | -**Ontologies** | InvalidParameterValue | `from foundry_sdk.v1.ontologies.errors import InvalidParameterValue` | -**Ontologies** | InvalidPropertyFiltersCombination | `from foundry_sdk.v1.ontologies.errors import InvalidPropertyFiltersCombination` | -**Ontologies** | InvalidPropertyFilterValue | `from foundry_sdk.v1.ontologies.errors import InvalidPropertyFilterValue` | -**Ontologies** | InvalidPropertyType | `from foundry_sdk.v1.ontologies.errors import InvalidPropertyType` | -**Ontologies** | InvalidPropertyValue | `from foundry_sdk.v1.ontologies.errors import InvalidPropertyValue` | -**Ontologies** | InvalidQueryOutputValue | `from foundry_sdk.v1.ontologies.errors import InvalidQueryOutputValue` | -**Ontologies** | InvalidQueryParameterValue | `from foundry_sdk.v1.ontologies.errors import InvalidQueryParameterValue` | -**Ontologies** | InvalidRangeQuery | `from foundry_sdk.v1.ontologies.errors import InvalidRangeQuery` | -**Ontologies** | InvalidSortOrder | `from foundry_sdk.v1.ontologies.errors import InvalidSortOrder` | -**Ontologies** | InvalidSortType | `from foundry_sdk.v1.ontologies.errors import InvalidSortType` | -**Ontologies** | InvalidTransactionEditPropertyValue | `from foundry_sdk.v1.ontologies.errors import InvalidTransactionEditPropertyValue` | -**Ontologies** | InvalidUserId | `from foundry_sdk.v1.ontologies.errors import InvalidUserId` | -**Ontologies** | InvalidVectorDimension | `from foundry_sdk.v1.ontologies.errors import InvalidVectorDimension` | -**Ontologies** | LinkAlreadyExists | `from foundry_sdk.v1.ontologies.errors import LinkAlreadyExists` | -**Ontologies** | LinkedObjectNotFound | `from foundry_sdk.v1.ontologies.errors import LinkedObjectNotFound` | -**Ontologies** | LinkTypeNotFound | `from foundry_sdk.v1.ontologies.errors import LinkTypeNotFound` | -**Ontologies** | LoadObjectSetLinksNotSupported | `from foundry_sdk.v1.ontologies.errors import LoadObjectSetLinksNotSupported` | -**Ontologies** | MalformedPropertyFilters | `from foundry_sdk.v1.ontologies.errors import MalformedPropertyFilters` | -**Ontologies** | MarketplaceActionMappingNotFound | `from foundry_sdk.v1.ontologies.errors import MarketplaceActionMappingNotFound` | -**Ontologies** | MarketplaceInstallationNotFound | `from foundry_sdk.v1.ontologies.errors import MarketplaceInstallationNotFound` | -**Ontologies** | MarketplaceLinkMappingNotFound | `from foundry_sdk.v1.ontologies.errors import MarketplaceLinkMappingNotFound` | -**Ontologies** | MarketplaceObjectMappingNotFound | `from foundry_sdk.v1.ontologies.errors import MarketplaceObjectMappingNotFound` | -**Ontologies** | MarketplaceQueryMappingNotFound | `from foundry_sdk.v1.ontologies.errors import MarketplaceQueryMappingNotFound` | -**Ontologies** | MarketplaceSdkActionMappingNotFound | `from foundry_sdk.v1.ontologies.errors import MarketplaceSdkActionMappingNotFound` | -**Ontologies** | MarketplaceSdkInstallationNotFound | `from foundry_sdk.v1.ontologies.errors import MarketplaceSdkInstallationNotFound` | -**Ontologies** | MarketplaceSdkLinkMappingNotFound | `from foundry_sdk.v1.ontologies.errors import MarketplaceSdkLinkMappingNotFound` | -**Ontologies** | MarketplaceSdkObjectMappingNotFound | `from foundry_sdk.v1.ontologies.errors import MarketplaceSdkObjectMappingNotFound` | -**Ontologies** | MarketplaceSdkPropertyMappingNotFound | `from foundry_sdk.v1.ontologies.errors import MarketplaceSdkPropertyMappingNotFound` | -**Ontologies** | MarketplaceSdkQueryMappingNotFound | `from foundry_sdk.v1.ontologies.errors import MarketplaceSdkQueryMappingNotFound` | -**Ontologies** | MissingParameter | `from foundry_sdk.v1.ontologies.errors import MissingParameter` | -**Ontologies** | MultipleGroupByOnFieldNotSupported | `from foundry_sdk.v1.ontologies.errors import MultipleGroupByOnFieldNotSupported` | -**Ontologies** | MultiplePropertyValuesNotSupported | `from foundry_sdk.v1.ontologies.errors import MultiplePropertyValuesNotSupported` | -**Ontologies** | NotCipherFormatted | `from foundry_sdk.v1.ontologies.errors import NotCipherFormatted` | -**Ontologies** | ObjectAlreadyExists | `from foundry_sdk.v1.ontologies.errors import ObjectAlreadyExists` | -**Ontologies** | ObjectChanged | `from foundry_sdk.v1.ontologies.errors import ObjectChanged` | -**Ontologies** | ObjectNotFound | `from foundry_sdk.v1.ontologies.errors import ObjectNotFound` | -**Ontologies** | ObjectSetNotFound | `from foundry_sdk.v1.ontologies.errors import ObjectSetNotFound` | -**Ontologies** | ObjectsExceededLimit | `from foundry_sdk.v1.ontologies.errors import ObjectsExceededLimit` | -**Ontologies** | ObjectsModifiedConcurrently | `from foundry_sdk.v1.ontologies.errors import ObjectsModifiedConcurrently` | -**Ontologies** | ObjectTypeNotFound | `from foundry_sdk.v1.ontologies.errors import ObjectTypeNotFound` | -**Ontologies** | ObjectTypeNotSynced | `from foundry_sdk.v1.ontologies.errors import ObjectTypeNotSynced` | -**Ontologies** | ObjectTypesNotSynced | `from foundry_sdk.v1.ontologies.errors import ObjectTypesNotSynced` | -**Ontologies** | OntologyApiNameNotUnique | `from foundry_sdk.v1.ontologies.errors import OntologyApiNameNotUnique` | -**Ontologies** | OntologyEditsExceededLimit | `from foundry_sdk.v1.ontologies.errors import OntologyEditsExceededLimit` | -**Ontologies** | OntologyNotFound | `from foundry_sdk.v1.ontologies.errors import OntologyNotFound` | -**Ontologies** | OntologySyncing | `from foundry_sdk.v1.ontologies.errors import OntologySyncing` | -**Ontologies** | OntologySyncingObjectTypes | `from foundry_sdk.v1.ontologies.errors import OntologySyncingObjectTypes` | -**Ontologies** | ParameterObjectNotFound | `from foundry_sdk.v1.ontologies.errors import ParameterObjectNotFound` | -**Ontologies** | ParameterObjectSetRidNotFound | `from foundry_sdk.v1.ontologies.errors import ParameterObjectSetRidNotFound` | -**Ontologies** | ParametersNotFound | `from foundry_sdk.v1.ontologies.errors import ParametersNotFound` | -**Ontologies** | ParameterTypeNotSupported | `from foundry_sdk.v1.ontologies.errors import ParameterTypeNotSupported` | -**Ontologies** | ParentAttachmentPermissionDenied | `from foundry_sdk.v1.ontologies.errors import ParentAttachmentPermissionDenied` | -**Ontologies** | PropertiesHaveDifferentIds | `from foundry_sdk.v1.ontologies.errors import PropertiesHaveDifferentIds` | -**Ontologies** | PropertiesNotFilterable | `from foundry_sdk.v1.ontologies.errors import PropertiesNotFilterable` | -**Ontologies** | PropertiesNotFound | `from foundry_sdk.v1.ontologies.errors import PropertiesNotFound` | -**Ontologies** | PropertiesNotSearchable | `from foundry_sdk.v1.ontologies.errors import PropertiesNotSearchable` | -**Ontologies** | PropertiesNotSortable | `from foundry_sdk.v1.ontologies.errors import PropertiesNotSortable` | -**Ontologies** | PropertyApiNameNotFound | `from foundry_sdk.v1.ontologies.errors import PropertyApiNameNotFound` | -**Ontologies** | PropertyBaseTypeNotSupported | `from foundry_sdk.v1.ontologies.errors import PropertyBaseTypeNotSupported` | -**Ontologies** | PropertyExactMatchingNotSupported | `from foundry_sdk.v1.ontologies.errors import PropertyExactMatchingNotSupported` | -**Ontologies** | PropertyFiltersNotSupported | `from foundry_sdk.v1.ontologies.errors import PropertyFiltersNotSupported` | -**Ontologies** | PropertyNotFound | `from foundry_sdk.v1.ontologies.errors import PropertyNotFound` | -**Ontologies** | PropertyNotFoundOnObject | `from foundry_sdk.v1.ontologies.errors import PropertyNotFoundOnObject` | -**Ontologies** | PropertyTypeDoesNotSupportNearestNeighbors | `from foundry_sdk.v1.ontologies.errors import PropertyTypeDoesNotSupportNearestNeighbors` | -**Ontologies** | PropertyTypeNotFound | `from foundry_sdk.v1.ontologies.errors import PropertyTypeNotFound` | -**Ontologies** | PropertyTypeRidNotFound | `from foundry_sdk.v1.ontologies.errors import PropertyTypeRidNotFound` | -**Ontologies** | PropertyTypesSearchNotSupported | `from foundry_sdk.v1.ontologies.errors import PropertyTypesSearchNotSupported` | -**Ontologies** | QueryEncounteredUserFacingError | `from foundry_sdk.v1.ontologies.errors import QueryEncounteredUserFacingError` | -**Ontologies** | QueryMemoryExceededLimit | `from foundry_sdk.v1.ontologies.errors import QueryMemoryExceededLimit` | -**Ontologies** | QueryNotFound | `from foundry_sdk.v1.ontologies.errors import QueryNotFound` | -**Ontologies** | QueryRuntimeError | `from foundry_sdk.v1.ontologies.errors import QueryRuntimeError` | -**Ontologies** | QueryTimeExceededLimit | `from foundry_sdk.v1.ontologies.errors import QueryTimeExceededLimit` | -**Ontologies** | QueryVersionNotFound | `from foundry_sdk.v1.ontologies.errors import QueryVersionNotFound` | -**Ontologies** | RateLimitReached | `from foundry_sdk.v1.ontologies.errors import RateLimitReached` | -**Ontologies** | SharedPropertiesNotFound | `from foundry_sdk.v1.ontologies.errors import SharedPropertiesNotFound` | -**Ontologies** | SharedPropertyTypeNotFound | `from foundry_sdk.v1.ontologies.errors import SharedPropertyTypeNotFound` | -**Ontologies** | SimilarityThresholdOutOfRange | `from foundry_sdk.v1.ontologies.errors import SimilarityThresholdOutOfRange` | -**Ontologies** | TooManyNearestNeighborsRequested | `from foundry_sdk.v1.ontologies.errors import TooManyNearestNeighborsRequested` | -**Ontologies** | UnauthorizedCipherOperation | `from foundry_sdk.v1.ontologies.errors import UnauthorizedCipherOperation` | -**Ontologies** | UndecryptableValue | `from foundry_sdk.v1.ontologies.errors import UndecryptableValue` | -**Ontologies** | UniqueIdentifierLinkIdsDoNotExistInActionType | `from foundry_sdk.v1.ontologies.errors import UniqueIdentifierLinkIdsDoNotExistInActionType` | -**Ontologies** | UnknownParameter | `from foundry_sdk.v1.ontologies.errors import UnknownParameter` | -**Ontologies** | UnsupportedInterfaceBasedObjectSet | `from foundry_sdk.v1.ontologies.errors import UnsupportedInterfaceBasedObjectSet` | -**Ontologies** | UnsupportedObjectSet | `from foundry_sdk.v1.ontologies.errors import UnsupportedObjectSet` | -**Ontologies** | ValueTypeNotFound | `from foundry_sdk.v1.ontologies.errors import ValueTypeNotFound` | -**Ontologies** | ViewObjectPermissionDenied | `from foundry_sdk.v1.ontologies.errors import ViewObjectPermissionDenied` | - - -## Contributions - -This repository does not accept code contributions. - -If you have any questions, concerns, or ideas for improvements, create an -issue with Palantir Support. - -## License -This project is made available under the [Apache 2.0 License](/LICENSE). diff --git a/assets/function_utils.py b/assets/function_utils.py deleted file mode 100644 index 754ab412d..000000000 --- a/assets/function_utils.py +++ /dev/null @@ -1,134 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -from typing import Optional - -from foundry_sdk._core.config import Config -from foundry_sdk._core.context_and_environment_vars import HOSTNAME_VAR -from foundry_sdk._core.context_and_environment_vars import TOKEN_VAR -from foundry_sdk._core.http_client import HttpClient - - -def _get_api_gateway_base_url(*, preview: bool = False) -> str: - """Get the Foundry hostname from the current execution context. - - Args: - preview: Must be set to True to use this beta feature. - - Returns: - The Foundry API gateway base URL. - - Raises: - ValueError: If preview is not set to True. - RuntimeError: If the Foundry API gateway base URL is not available in the current context. - """ - if not preview: - raise ValueError( - "get_api_gateway_base_url() is in beta. " - "Please set the preview parameter to True to use it." - ) - hostname = HOSTNAME_VAR.get() - if hostname is None: - raise RuntimeError("Foundry API gateway base URL is not available in the current context.") - return hostname - - -def get_foundry_token(*, preview: bool = False) -> str: - """Get the Foundry token from the current execution context. - - Args: - preview: Must be set to True to use this beta feature. - - Returns: - The Foundry token. - - Raises: - ValueError: If preview is not set to True. - RuntimeError: If the Foundry token is not available in the current context. - """ - if not preview: - raise ValueError( - "get_foundry_token() is in beta. " "Please set the preview parameter to True to use it." - ) - token = TOKEN_VAR.get() - if token is None: - raise RuntimeError("Foundry token is not available in the current context.") - return token - - -def get_openai_base_url(*, preview: bool = False) -> str: - """Get the OpenAI proxy base URL for the current Foundry environment. - - Args: - preview: Must be set to True to use this beta feature. - - Returns: - The OpenAI proxy base URL. - - Raises: - ValueError: If preview is not set to True. - RuntimeError: If the Foundry API gateway base URL is not available in the current context. - """ - if not preview: - raise ValueError( - "get_openai_base_url() is in beta. " - "Please set the preview parameter to True to use it." - ) - hostname = _get_api_gateway_base_url(preview=True) - return f"https://{hostname}/api/v1/models/openai" - - -def get_anthropic_base_url(*, preview: bool = False) -> str: - """Get the Anthropic proxy base URL for the current Foundry environment. - - Args: - preview: Must be set to True to use this beta feature. - - Returns: - The Anthropic proxy base URL. - - Raises: - ValueError: If preview is not set to True. - RuntimeError: If the Foundry API gateway base URL is not available in the current context. - """ - if not preview: - raise ValueError( - "get_anthropic_base_url() is in beta. " - "Please set the preview parameter to True to use it." - ) - hostname = _get_api_gateway_base_url(preview=True) - return f"https://{hostname}/api/v1/models/anthropic" - - -def get_http_client(*, preview: bool = False, config: Optional[Config] = None) -> HttpClient: - """Get an HTTP client configured for the current Foundry environment. - - Args: - preview: Must be set to True to use this beta feature. - config: Optional configuration for the HTTP client. - - Returns: - An HttpClient instance configured with the Foundry hostname. - - Raises: - ValueError: If preview is not set to True. - RuntimeError: If the Foundry API gateway base URL is not available in the current context. - """ - if not preview: - raise ValueError( - "get_http_client() is in beta. " "Please set the preview parameter to True to use it." - ) - hostname = _get_api_gateway_base_url(preview=True) - return HttpClient(hostname=hostname, config=config) diff --git a/assets/test-function-utils.py b/assets/test-function-utils.py deleted file mode 100644 index 595d36e7a..000000000 --- a/assets/test-function-utils.py +++ /dev/null @@ -1,131 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import pytest - -from foundry_sdk._core.context_and_environment_vars import HOSTNAME_VAR -from foundry_sdk._core.context_and_environment_vars import TOKEN_VAR -from foundry_sdk._core.http_client import HttpClient -from foundry_sdk.v2.functions import ( - get_anthropic_base_url, - get_foundry_token, - get_http_client, - get_openai_base_url, -) -from foundry_sdk.v2.functions.utils import _get_api_gateway_base_url - - -class TestPreviewParameter: - """Test that all functions require preview=True.""" - - def test__get_api_gateway_base_url_requires_preview(self): - with pytest.raises(ValueError, match="preview parameter"): - _get_api_gateway_base_url() - - def test_get_foundry_token_requires_preview(self): - with pytest.raises(ValueError, match="preview parameter"): - get_foundry_token() - - def test_get_openai_base_url_requires_preview(self): - with pytest.raises(ValueError, match="preview parameter"): - get_openai_base_url() - - def test_get_anthropic_base_url_requires_preview(self): - with pytest.raises(ValueError, match="preview parameter"): - get_anthropic_base_url() - - def test_get_http_client_requires_preview(self): - with pytest.raises(ValueError, match="preview parameter"): - get_http_client() - - -class TestGetApiGatewayBaseUrl: - """Test _get_api_gateway_base_url function.""" - - def test_returns_hostname_from_context(self): - token = HOSTNAME_VAR.set("test.palantirfoundry.com") - try: - result = _get_api_gateway_base_url(preview=True) - assert result == "test.palantirfoundry.com" - finally: - HOSTNAME_VAR.reset(token) - - def test_raises_runtime_error_when_not_in_context(self): - with pytest.raises(RuntimeError, match="not available"): - _get_api_gateway_base_url(preview=True) - - -class TestGetFoundryToken: - """Test get_foundry_token function.""" - - def test_returns_token_from_context(self): - token = TOKEN_VAR.set("test-token-12345") - try: - result = get_foundry_token(preview=True) - assert result == "test-token-12345" - finally: - TOKEN_VAR.reset(token) - - def test_raises_runtime_error_when_not_in_context(self): - with pytest.raises(RuntimeError, match="not available"): - get_foundry_token(preview=True) - - -class TestGetOpenaiBaseUrl: - """Test get_openai_base_url function.""" - - def test_returns_correct_url(self): - token = HOSTNAME_VAR.set("test.palantirfoundry.com") - try: - result = get_openai_base_url(preview=True) - assert result == "https://test.palantirfoundry.com/api/v1/models/openai" - finally: - HOSTNAME_VAR.reset(token) - - def test_raises_runtime_error_when_not_in_context(self): - with pytest.raises(RuntimeError, match="not available"): - get_openai_base_url(preview=True) - - -class TestGetAnthropicBaseUrl: - """Test get_anthropic_base_url function.""" - - def test_returns_correct_url(self): - token = HOSTNAME_VAR.set("test.palantirfoundry.com") - try: - result = get_anthropic_base_url(preview=True) - assert result == "https://test.palantirfoundry.com/api/v1/models/anthropic" - finally: - HOSTNAME_VAR.reset(token) - - def test_raises_runtime_error_when_not_in_context(self): - with pytest.raises(RuntimeError, match="not available"): - get_anthropic_base_url(preview=True) - - -class TestGetHttpClient: - """Test get_http_client function.""" - - def test_returns_http_client(self): - token = HOSTNAME_VAR.set("test.palantirfoundry.com") - try: - result = get_http_client(preview=True) - assert isinstance(result, HttpClient) - finally: - HOSTNAME_VAR.reset(token) - - def test_raises_runtime_error_when_not_in_context(self): - with pytest.raises(RuntimeError, match="not available"): - get_http_client(preview=True) diff --git a/config.json b/config.json index 581b83680..6efb9f75b 100644 --- a/config.json +++ b/config.json @@ -9,8 +9,8 @@ "autoreleaseUrl": "https://autorelease.general.dmz.palantir.tech/palantir/foundry-platform-python", "promotedMajorVersion": "v2", "additionalFiles": [ - ["assets/function-utils.py", "foundry_sdk/v2/functions/utils.py"], - ["assets/test-function-utils.py", "tests/functions/test_utils.py"] + ["assets/language_model_utils.py", "foundry_sdk/v2/language_models/utils.py"], + ["assets/test_language_model_utils.py", "tests/language_models/test_utils.py"] ], "documentationBaseUrl": "https://palantir.com", "extraDocsDir": "assets/docs_examples", @@ -174,18 +174,18 @@ "DataHealth": true, "Datasets": true, "Filesystem": true, - "Functions": { + "Functions": true, + "Gaia": false, + "Geo": true, + "LanguageModels": { "exclude": [], "additionalExports": [ - "from foundry_sdk.v2.functions.utils import get_foundry_token", - "from foundry_sdk.v2.functions.utils import get_openai_base_url", - "from foundry_sdk.v2.functions.utils import get_anthropic_base_url", - "from foundry_sdk.v2.functions.utils import get_http_client" + "from foundry_sdk.v2.language_models.utils import get_foundry_token", + "from foundry_sdk.v2.language_models.utils import get_openai_base_url", + "from foundry_sdk.v2.language_models.utils import get_anthropic_base_url", + "from foundry_sdk.v2.language_models.utils import get_http_client" ] }, - "Gaia": false, - "Geo": true, - "LanguageModels": true, "MapRendering": false, "MediaSets": true, "Models": true, diff --git a/docs-snippets-npm/.gitignore b/docs-snippets-npm/.gitignore deleted file mode 100644 index 8da1fcd74..000000000 --- a/docs-snippets-npm/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -node_modules -dist - -# Logs -logs -*.log -npm-debug.log* -yarn-debug.log* -yarn-error.log* -lerna-debug.log* -.pnpm-debug.log* - -# Diagnostic reports (https://nodejs.org/api/report.html) -report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json - -# Runtime data -pids -*.pid -*.seed -*.pid.lock diff --git a/docs-snippets-npm/package.json b/docs-snippets-npm/package.json deleted file mode 100644 index 16cac5570..000000000 --- a/docs-snippets-npm/package.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "name": "@osdk/python-platform-docs", - "version": "0.0.0", - "main": "dist/index.js", - "scripts": { - "build": "tsc --build" - }, - "files": [ - "dist" - ], - "repository": { - "type": "git", - "url": "git+https://github.com/palantir/foundry-platform-python.git" - }, - "bugs": { - "url": "https://github.com/palantir/foundry-platform-python/issues" - }, - "homepage": "https://github.com/palantir/foundry-platform-python#readme", - "devDependencies": { - "@osdk/docs-spec-core": "^0.5.0", - "@osdk/docs-spec-platform": "^0.8.0", - "typescript": "^5.8.3" - }, - "sls": { - "dependencies": { - "com.palantir.foundry.api:api-gateway": { - "minVersion": "1.1416.1", - "maxVersion": "1.x.x", - "optional": false - } - } - } -} diff --git a/docs-snippets-npm/src/index.ts b/docs-snippets-npm/src/index.ts deleted file mode 100644 index 8ef7ac4c3..000000000 --- a/docs-snippets-npm/src/index.ts +++ /dev/null @@ -1,1739 +0,0 @@ -/** - * Copyright 2024 Palantir Technologies, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - -import type { SdkSnippets } from "@osdk/docs-spec-core"; -import type { PLATFORM_API_DOCS_SPEC } from "@osdk/docs-spec-platform"; - -export const PYTHON_PLATFORM_SNIPPETS: SdkSnippets = { - "kind": "sdk", - "versions": { - "1.0.0": { - "snippets": { - "v1.createBranch": [ - { - "template": "from foundry_sdk.v1 import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid | The Resource Identifier (RID) of the Dataset on which to create the Branch.\ndataset_rid = \"ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da\"\n# BranchId\nbranch_id = \"my-branch\"\n# Optional[TransactionRid]\ntransaction_rid = None\n\n\ntry:\n api_response = client.datasets.Dataset.Branch.create(\n dataset_rid, branch_id=branch_id, transaction_rid=transaction_rid\n )\n print(\"The create response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Branch.create: %s\\n\" % e)" - } - ], - "v1.deleteBranch": [ - { - "template": "from foundry_sdk.v1 import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid | The Resource Identifier (RID) of the Dataset that contains the Branch.\ndataset_rid = \"ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da\"\n# BranchId | The identifier (name) of the Branch.\nbranch_id = \"my-branch\"\n\n\ntry:\n api_response = client.datasets.Dataset.Branch.delete(dataset_rid, branch_id)\n print(\"The delete response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Branch.delete: %s\\n\" % e)" - } - ], - "v1.getBranch": [ - { - "template": "from foundry_sdk.v1 import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid | The Resource Identifier (RID) of the Dataset that contains the Branch.\ndataset_rid = \"ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da\"\n# BranchId | The identifier (name) of the Branch.\nbranch_id = \"master\"\n\n\ntry:\n api_response = client.datasets.Dataset.Branch.get(dataset_rid, branch_id)\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Branch.get: %s\\n\" % e)" - } - ], - "v1.listBranches": [ - { - "template": "from foundry_sdk.v1 import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid | The Resource Identifier (RID) of the Dataset on which to list Branches.\ndataset_rid = \"ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da\"\n# Optional[PageSize] | The desired size of the page to be returned. Defaults to 1,000. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details.\npage_size = None\n# Optional[PageToken]\npage_token = None\n\n\ntry:\n for branch in client.datasets.Dataset.Branch.list(\n dataset_rid, page_size=page_size, page_token=page_token\n ):\n pprint(branch)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Branch.list: %s\\n\" % e)" - } - ], - "v1.createDataset": [ - { - "template": "from foundry_sdk.v1 import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetName\nname = \"My Dataset\"\n# FolderRid\nparent_folder_rid = \"ri.foundry.main.folder.bfe58487-4c56-4c58-aba7-25defd6163c4\"\n\n\ntry:\n api_response = client.datasets.Dataset.create(name=name, parent_folder_rid=parent_folder_rid)\n print(\"The create response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Dataset.create: %s\\n\" % e)" - } - ], - "v1.deleteSchema": [ - { - "template": "from foundry_sdk.v1 import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid | The RID of the Dataset on which to delete the schema.\ndataset_rid = None\n# Optional[BranchId] | The ID of the Branch on which to delete the schema.\nbranch_id = None\n# Optional[PreviewMode]\npreview = True\n# Optional[TransactionRid] | The RID of the Transaction on which to delete the schema.\ntransaction_rid = None\n\n\ntry:\n api_response = client.datasets.Dataset.delete_schema(\n dataset_rid, branch_id=branch_id, preview=preview, transaction_rid=transaction_rid\n )\n print(\"The delete_schema response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Dataset.delete_schema: %s\\n\" % e)" - } - ], - "v1.getDataset": [ - { - "template": "from foundry_sdk.v1 import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid\ndataset_rid = \"ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da\"\n\n\ntry:\n api_response = client.datasets.Dataset.get(dataset_rid)\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Dataset.get: %s\\n\" % e)" - } - ], - "v1.getSchema": [ - { - "template": "from foundry_sdk.v1 import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid | The RID of the Dataset.\ndataset_rid = None\n# Optional[BranchId] | The ID of the Branch.\nbranch_id = None\n# Optional[PreviewMode]\npreview = True\n# Optional[TransactionRid] | The TransactionRid that contains the Schema.\ntransaction_rid = None\n\n\ntry:\n api_response = client.datasets.Dataset.get_schema(\n dataset_rid, branch_id=branch_id, preview=preview, transaction_rid=transaction_rid\n )\n print(\"The get_schema response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Dataset.get_schema: %s\\n\" % e)" - } - ], - "v1.readTable": [ - { - "template": "from foundry_sdk.v1 import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid | The RID of the Dataset.\ndataset_rid = None\n# TableExportFormat | The export format. Must be `ARROW` or `CSV`.\nformat = \"CSV\"\n# Optional[BranchId] | The identifier (name) of the Branch.\nbranch_id = None\n# Optional[List[str]] | A subset of the dataset columns to include in the result. Defaults to all columns.\ncolumns = None\n# Optional[TransactionRid] | The Resource Identifier (RID) of the end Transaction.\nend_transaction_rid = None\n# Optional[int] | A limit on the number of rows to return. Note that row ordering is non-deterministic.\nrow_limit = None\n# Optional[TransactionRid] | The Resource Identifier (RID) of the start Transaction.\nstart_transaction_rid = None\n\n\ntry:\n api_response = client.datasets.Dataset.read(\n dataset_rid,\n format=format,\n branch_id=branch_id,\n columns=columns,\n end_transaction_rid=end_transaction_rid,\n row_limit=row_limit,\n start_transaction_rid=start_transaction_rid,\n )\n print(\"The read response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Dataset.read: %s\\n\" % e)" - } - ], - "v1.putSchema": [ - { - "template": "from foundry_sdk.v1 import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid | The RID of the Dataset on which to put the Schema.\ndataset_rid = None\n# Any | Body of the request\nbody = None\n# Optional[BranchId] | The ID of the Branch on which to put the Schema.\nbranch_id = None\n# Optional[PreviewMode]\npreview = True\n\n\ntry:\n api_response = client.datasets.Dataset.replace_schema(\n dataset_rid, body, branch_id=branch_id, preview=preview\n )\n print(\"The replace_schema response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Dataset.replace_schema: %s\\n\" % e)" - } - ], - "v1.deleteFile": [ - { - "template": "from foundry_sdk.v1 import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid | The Resource Identifier (RID) of the Dataset on which to delete the File.\ndataset_rid = \"ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da\"\n# FilePath | The File path within the Dataset.\nfile_path = \"q3-data%2fmy-file.csv\"\n# Optional[BranchId] | The identifier (name) of the Branch on which to delete the File. Defaults to `master` for most enrollments.\nbranch_id = None\n# Optional[TransactionRid] | The Resource Identifier (RID) of the open delete Transaction on which to delete the File.\ntransaction_rid = None\n\n\ntry:\n api_response = client.datasets.Dataset.File.delete(\n dataset_rid, file_path, branch_id=branch_id, transaction_rid=transaction_rid\n )\n print(\"The delete response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling File.delete: %s\\n\" % e)" - } - ], - "v1.getFileMetadata": [ - { - "template": "from foundry_sdk.v1 import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid | The Resource Identifier (RID) of the Dataset that contains the File.\ndataset_rid = \"ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da\"\n# FilePath | The File's path within the Dataset.\nfile_path = \"q3-data%2fmy-file.csv\"\n# Optional[BranchId] | The identifier (name) of the Branch that contains the File. Defaults to `master` for most enrollments.\nbranch_id = None\n# Optional[TransactionRid] | The Resource Identifier (RID) of the end Transaction.\nend_transaction_rid = None\n# Optional[TransactionRid] | The Resource Identifier (RID) of the start Transaction.\nstart_transaction_rid = None\n\n\ntry:\n api_response = client.datasets.Dataset.File.get(\n dataset_rid,\n file_path,\n branch_id=branch_id,\n end_transaction_rid=end_transaction_rid,\n start_transaction_rid=start_transaction_rid,\n )\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling File.get: %s\\n\" % e)" - } - ], - "v1.listFiles": [ - { - "template": "from foundry_sdk.v1 import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid | The Resource Identifier (RID) of the Dataset on which to list Files.\ndataset_rid = None\n# Optional[BranchId] | The identifier (name) of the Branch on which to list Files. Defaults to `master` for most enrollments.\nbranch_id = None\n# Optional[TransactionRid] | The Resource Identifier (RID) of the end Transaction.\nend_transaction_rid = None\n# Optional[PageSize] | The desired size of the page to be returned. Defaults to 1,000. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details.\npage_size = None\n# Optional[PageToken]\npage_token = None\n# Optional[TransactionRid] | The Resource Identifier (RID) of the start Transaction.\nstart_transaction_rid = None\n\n\ntry:\n for file in client.datasets.Dataset.File.list(\n dataset_rid,\n branch_id=branch_id,\n end_transaction_rid=end_transaction_rid,\n page_size=page_size,\n page_token=page_token,\n start_transaction_rid=start_transaction_rid,\n ):\n pprint(file)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling File.list: %s\\n\" % e)" - } - ], - "v1.getFileContent": [ - { - "template": "from foundry_sdk.v1 import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid | The Resource Identifier (RID) of the Dataset that contains the File.\ndataset_rid = None\n# FilePath | The File's path within the Dataset.\nfile_path = \"q3-data%2fmy-file.csv\"\n# Optional[BranchId] | The identifier (name) of the Branch that contains the File. Defaults to `master` for most enrollments.\nbranch_id = None\n# Optional[TransactionRid] | The Resource Identifier (RID) of the end Transaction.\nend_transaction_rid = None\n# Optional[TransactionRid] | The Resource Identifier (RID) of the start Transaction.\nstart_transaction_rid = None\n\n\ntry:\n api_response = client.datasets.Dataset.File.read(\n dataset_rid,\n file_path,\n branch_id=branch_id,\n end_transaction_rid=end_transaction_rid,\n start_transaction_rid=start_transaction_rid,\n )\n print(\"The read response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling File.read: %s\\n\" % e)" - } - ], - "v1.uploadFile": [ - { - "template": "from foundry_sdk.v1 import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid | The Resource Identifier (RID) of the Dataset on which to upload the File.\ndataset_rid = None\n# bytes | Body of the request\nbody = None\n# FilePath | The File's path within the Dataset.\nfile_path = \"q3-data%2fmy-file.csv\"\n# Optional[BranchId] | The identifier (name) of the Branch on which to upload the File. Defaults to `master` for most enrollments.\nbranch_id = None\n# Optional[TransactionRid] | The Resource Identifier (RID) of the open Transaction on which to upload the File.\ntransaction_rid = None\n# Optional[TransactionType] | The type of the Transaction to create when using branchId. Defaults to `UPDATE`.\ntransaction_type = None\n\n\ntry:\n api_response = client.datasets.Dataset.File.upload(\n dataset_rid,\n body,\n file_path=file_path,\n branch_id=branch_id,\n transaction_rid=transaction_rid,\n transaction_type=transaction_type,\n )\n print(\"The upload response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling File.upload: %s\\n\" % e)" - } - ], - "v1.abortTransaction": [ - { - "template": "from foundry_sdk.v1 import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid | The Resource Identifier (RID) of the Dataset that contains the Transaction.\ndataset_rid = \"ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da\"\n# TransactionRid | The Resource Identifier (RID) of the Transaction.\ntransaction_rid = \"ri.foundry.main.transaction.abffc380-ea68-4843-9be1-9f44d2565496\"\n\n\ntry:\n api_response = client.datasets.Dataset.Transaction.abort(dataset_rid, transaction_rid)\n print(\"The abort response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Transaction.abort: %s\\n\" % e)" - } - ], - "v1.commitTransaction": [ - { - "template": "from foundry_sdk.v1 import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid | The Resource Identifier (RID) of the Dataset that contains the Transaction.\ndataset_rid = \"ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da\"\n# TransactionRid | The Resource Identifier (RID) of the Transaction.\ntransaction_rid = \"ri.foundry.main.transaction.abffc380-ea68-4843-9be1-9f44d2565496\"\n\n\ntry:\n api_response = client.datasets.Dataset.Transaction.commit(dataset_rid, transaction_rid)\n print(\"The commit response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Transaction.commit: %s\\n\" % e)" - } - ], - "v1.createTransaction": [ - { - "template": "from foundry_sdk.v1 import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid | The Resource Identifier (RID) of the Dataset on which to create the Transaction.\ndataset_rid = \"ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da\"\n# Optional[BranchId] | The identifier (name) of the Branch on which to create the Transaction. Defaults to `master` for most enrollments.\nbranch_id = None\n# Optional[TransactionType]\ntransaction_type = \"SNAPSHOT\"\n\n\ntry:\n api_response = client.datasets.Dataset.Transaction.create(\n dataset_rid, branch_id=branch_id, transaction_type=transaction_type\n )\n print(\"The create response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Transaction.create: %s\\n\" % e)" - } - ], - "v1.getTransaction": [ - { - "template": "from foundry_sdk.v1 import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid | The Resource Identifier (RID) of the Dataset that contains the Transaction.\ndataset_rid = \"ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da\"\n# TransactionRid | The Resource Identifier (RID) of the Transaction.\ntransaction_rid = \"ri.foundry.main.transaction.abffc380-ea68-4843-9be1-9f44d2565496\"\n\n\ntry:\n api_response = client.datasets.Dataset.Transaction.get(dataset_rid, transaction_rid)\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Transaction.get: %s\\n\" % e)" - } - ], - "v1.applyAction": [ - { - "template": "from foundry_sdk.v1 import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the action. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**.\nontology_rid = \"ri.ontology.main.ontology.c61d9ab5-2919-4127-a0a1-ac64c0ce6367\"\n# ActionTypeApiName | The API name of the action to apply. To find the API name for your action, use the **List action types** endpoint or check the **Ontology Manager**.\naction_type = \"rename-employee\"\n# Dict[ParameterId, Optional[DataValue]]\nparameters = {\"id\": 80060, \"newName\": \"Anna Smith-Doe\"}\n\n\ntry:\n api_response = client.ontologies.Action.apply(ontology_rid, action_type, parameters=parameters)\n print(\"The apply response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Action.apply: %s\\n\" % e)" - } - ], - "v1.applyActionBatch": [ - { - "template": "from foundry_sdk.v1 import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the action. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**.\nontology_rid = \"ri.ontology.main.ontology.c61d9ab5-2919-4127-a0a1-ac64c0ce6367\"\n# ActionTypeApiName | The API name of the action to apply. To find the API name for your action, use the **List action types** endpoint or check the **Ontology Manager**.\naction_type = \"rename-employee\"\n# List[ApplyActionRequest]\nrequests = [\n {\"parameters\": {\"id\": 80060, \"newName\": \"Anna Smith-Doe\"}},\n {\"parameters\": {\"id\": 80061, \"newName\": \"Joe Bloggs\"}},\n]\n\n\ntry:\n api_response = client.ontologies.Action.apply_batch(\n ontology_rid, action_type, requests=requests\n )\n print(\"The apply_batch response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Action.apply_batch: %s\\n\" % e)" - } - ], - "v1.validateAction": [ - { - "template": "from foundry_sdk.v1 import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the action. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**.\nontology_rid = \"ri.ontology.main.ontology.c61d9ab5-2919-4127-a0a1-ac64c0ce6367\"\n# ActionTypeApiName | The API name of the action to validate. To find the API name for your action, use the **List action types** endpoint or check the **Ontology Manager**.\naction_type = \"rename-employee\"\n# Dict[ParameterId, Optional[DataValue]]\nparameters = {\n \"id\": \"2\",\n \"firstName\": \"Chuck\",\n \"lastName\": \"Jones\",\n \"age\": 17,\n \"date\": \"2021-05-01\",\n \"numbers\": [1, 2, 3],\n \"hasObjectSet\": True,\n \"objectSet\": \"ri.object-set.main.object-set.39a9f4bd-f77e-45ce-9772-70f25852f623\",\n \"reference\": \"Chuck\",\n \"percentage\": 41.3,\n \"differentObjectId\": \"2\",\n}\n\n\ntry:\n api_response = client.ontologies.Action.validate(\n ontology_rid, action_type, parameters=parameters\n )\n print(\"The validate response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Action.validate: %s\\n\" % e)" - } - ], - "v1.getActionType": [ - { - "template": "from foundry_sdk.v1 import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the action type.\nontology_rid = \"ri.ontology.main.ontology.c61d9ab5-2919-4127-a0a1-ac64c0ce6367\"\n# ActionTypeApiName | The name of the action type in the API.\naction_type_api_name = \"promote-employee\"\n\n\ntry:\n api_response = client.ontologies.Ontology.ActionType.get(ontology_rid, action_type_api_name)\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling ActionType.get: %s\\n\" % e)" - } - ], - "v1.listActionTypes": [ - { - "template": "from foundry_sdk.v1 import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the action types. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**.\nontology_rid = \"ri.ontology.main.ontology.c61d9ab5-2919-4127-a0a1-ac64c0ce6367\"\n# Optional[PageSize] | The desired size of the page to be returned. Defaults to 500. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details.\npage_size = None\n# Optional[PageToken]\npage_token = None\n\n\ntry:\n for action_type in client.ontologies.Ontology.ActionType.list(\n ontology_rid, page_size=page_size, page_token=page_token\n ):\n pprint(action_type)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling ActionType.list: %s\\n\" % e)" - } - ], - "v1.getAttachment": [ - { - "template": "from foundry_sdk.v1 import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# AttachmentRid | The RID of the attachment.\nattachment_rid = \"ri.attachments.main.attachment.bb32154e-e043-4b00-9461-93136ca96b6f\"\n\n\ntry:\n api_response = client.ontologies.Attachment.get(attachment_rid)\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Attachment.get: %s\\n\" % e)" - } - ], - "v1.getAttachmentContent": [ - { - "template": "from foundry_sdk.v1 import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# AttachmentRid | The RID of the attachment.\nattachment_rid = \"ri.attachments.main.attachment.bb32154e-e043-4b00-9461-93136ca96b6f\"\n\n\ntry:\n api_response = client.ontologies.Attachment.read(attachment_rid)\n print(\"The read response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Attachment.read: %s\\n\" % e)" - } - ], - "v1.uploadAttachment": [ - { - "template": "from foundry_sdk.v1 import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# bytes | Body of the request\nbody = None\n# ContentLength | The size in bytes of the file content being uploaded.\ncontent_length = None\n# ContentType | The media type of the file being uploaded.\ncontent_type = None\n# Filename | The name of the file being uploaded.\nfilename = \"My Image.jpeg\"\n\n\ntry:\n api_response = client.ontologies.Attachment.upload(\n body, content_length=content_length, content_type=content_type, filename=filename\n )\n print(\"The upload response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Attachment.upload: %s\\n\" % e)" - } - ], - "v1.getObjectType": [ - { - "template": "from foundry_sdk.v1 import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the object type. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**.\nontology_rid = \"ri.ontology.main.ontology.c61d9ab5-2919-4127-a0a1-ac64c0ce6367\"\n# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**.\nobject_type = \"employee\"\n\n\ntry:\n api_response = client.ontologies.Ontology.ObjectType.get(ontology_rid, object_type)\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling ObjectType.get: %s\\n\" % e)" - } - ], - "v1.getOutgoingLinkType": [ - { - "template": "from foundry_sdk.v1 import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the object type. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager** application.\nontology_rid = \"ri.ontology.main.ontology.c61d9ab5-2919-4127-a0a1-ac64c0ce6367\"\n# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager** application.\nobject_type = \"Employee\"\n# LinkTypeApiName | The API name of the outgoing link. To find the API name for your link type, check the **Ontology Manager**.\nlink_type = \"directReport\"\n\n\ntry:\n api_response = client.ontologies.Ontology.ObjectType.get_outgoing_link_type(\n ontology_rid, object_type, link_type\n )\n print(\"The get_outgoing_link_type response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling ObjectType.get_outgoing_link_type: %s\\n\" % e)" - } - ], - "v1.listObjectTypes": [ - { - "template": "from foundry_sdk.v1 import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the object types. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**.\nontology_rid = \"ri.ontology.main.ontology.c61d9ab5-2919-4127-a0a1-ac64c0ce6367\"\n# Optional[PageSize] | The desired size of the page to be returned. Defaults to 500. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details.\npage_size = None\n# Optional[PageToken]\npage_token = None\n\n\ntry:\n for object_type in client.ontologies.Ontology.ObjectType.list(\n ontology_rid, page_size=page_size, page_token=page_token\n ):\n pprint(object_type)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling ObjectType.list: %s\\n\" % e)" - } - ], - "v1.listOutgoingLinkTypes": [ - { - "template": "from foundry_sdk.v1 import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the object type. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager** application.\nontology_rid = \"ri.ontology.main.ontology.c61d9ab5-2919-4127-a0a1-ac64c0ce6367\"\n# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager** application.\nobject_type = \"Flight\"\n# Optional[PageSize] | The desired size of the page to be returned.\npage_size = None\n# Optional[PageToken]\npage_token = None\n\n\ntry:\n for object_type in client.ontologies.Ontology.ObjectType.list_outgoing_link_types(\n ontology_rid, object_type, page_size=page_size, page_token=page_token\n ):\n pprint(object_type)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling ObjectType.list_outgoing_link_types: %s\\n\" % e)" - } - ], - "v1.getOntology": [ - { - "template": "from foundry_sdk.v1 import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyRid | The unique Resource Identifier (RID) of the Ontology. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**.\nontology_rid = \"ri.ontology.main.ontology.c61d9ab5-2919-4127-a0a1-ac64c0ce6367\"\n\n\ntry:\n api_response = client.ontologies.Ontology.get(ontology_rid)\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Ontology.get: %s\\n\" % e)" - } - ], - "v1.listOntologies": [ - { - "template": "from foundry_sdk.v1 import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n\ntry:\n api_response = client.ontologies.Ontology.list()\n print(\"The list response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Ontology.list: %s\\n\" % e)" - } - ], - "v1.aggregateObjects": [ - { - "template": "from foundry_sdk.v1 import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the objects.\nontology_rid = \"ri.ontology.main.ontology.c61d9ab5-2919-4127-a0a1-ac64c0ce6367\"\n# ObjectTypeApiName | The type of the object to aggregate on.\nobject_type = \"employee\"\n# List[Aggregation]\naggregation = [\n {\"type\": \"min\", \"field\": \"properties.tenure\", \"name\": \"min_tenure\"},\n {\"type\": \"avg\", \"field\": \"properties.tenure\", \"name\": \"avg_tenure\"},\n]\n# List[AggregationGroupBy]\ngroup_by = [\n {\n \"field\": \"properties.startDate\",\n \"type\": \"range\",\n \"ranges\": [{\"gte\": \"2020-01-01\", \"lt\": \"2020-06-01\"}],\n },\n {\"field\": \"properties.city\", \"type\": \"exact\"},\n]\n# Optional[SearchJsonQuery]\nquery = {\"not\": {\"field\": \"properties.name\", \"eq\": \"john\"}}\n\n\ntry:\n api_response = client.ontologies.OntologyObject.aggregate(\n ontology_rid, object_type, aggregation=aggregation, group_by=group_by, query=query\n )\n print(\"The aggregate response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling OntologyObject.aggregate: %s\\n\" % e)" - } - ], - "v1.getObject": [ - { - "template": "from foundry_sdk.v1 import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the object. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**.\nontology_rid = \"ri.ontology.main.ontology.c61d9ab5-2919-4127-a0a1-ac64c0ce6367\"\n# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**.\nobject_type = \"employee\"\n# PropertyValueEscapedString | The primary key of the requested object. To look up the expected primary key for your object type, use the `Get object type` endpoint or the **Ontology Manager**.\nprimary_key = 50030\n# Optional[List[SelectedPropertyApiName]] | The properties of the object type that should be included in the response. Omit this parameter to get all the properties.\nproperties = None\n\n\ntry:\n api_response = client.ontologies.OntologyObject.get(\n ontology_rid, object_type, primary_key, properties=properties\n )\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling OntologyObject.get: %s\\n\" % e)" - } - ], - "v1.getLinkedObject": [ - { - "template": "from foundry_sdk.v1 import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the object. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**.\nontology_rid = \"ri.ontology.main.ontology.c61d9ab5-2919-4127-a0a1-ac64c0ce6367\"\n# ObjectTypeApiName | The API name of the object from which the links originate. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**.\nobject_type = \"employee\"\n# PropertyValueEscapedString | The primary key of the object from which the link originates. To look up the expected primary key for your object type, use the `Get object type` endpoint or the **Ontology Manager**.\nprimary_key = 50030\n# LinkTypeApiName | The API name of the link that exists between the object and the requested objects. To find the API name for your link type, check the **Ontology Manager**.\nlink_type = \"directReport\"\n# PropertyValueEscapedString | The primary key of the requested linked object. To look up the expected primary key for your object type, use the `Get object type` endpoint (passing the linked object type) or the **Ontology Manager**.\nlinked_object_primary_key = 80060\n# Optional[List[SelectedPropertyApiName]] | The properties of the object type that should be included in the response. Omit this parameter to get all the properties.\nproperties = None\n\n\ntry:\n api_response = client.ontologies.OntologyObject.get_linked_object(\n ontology_rid,\n object_type,\n primary_key,\n link_type,\n linked_object_primary_key,\n properties=properties,\n )\n print(\"The get_linked_object response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling OntologyObject.get_linked_object: %s\\n\" % e)" - } - ], - "v1.listObjects": [ - { - "template": "from foundry_sdk.v1 import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the objects. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**.\nontology_rid = \"ri.ontology.main.ontology.c61d9ab5-2919-4127-a0a1-ac64c0ce6367\"\n# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**.\nobject_type = \"employee\"\n# Optional[OrderBy]\norder_by = None\n# Optional[PageSize] | The desired size of the page to be returned. Defaults to 1,000. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details.\npage_size = None\n# Optional[PageToken]\npage_token = None\n# Optional[List[SelectedPropertyApiName]] | The properties of the object type that should be included in the response. Omit this parameter to get all the properties.\nproperties = None\n\n\ntry:\n for ontology_object in client.ontologies.OntologyObject.list(\n ontology_rid,\n object_type,\n order_by=order_by,\n page_size=page_size,\n page_token=page_token,\n properties=properties,\n ):\n pprint(ontology_object)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling OntologyObject.list: %s\\n\" % e)" - } - ], - "v1.listLinkedObjects": [ - { - "template": "from foundry_sdk.v1 import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the objects. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**.\nontology_rid = \"ri.ontology.main.ontology.c61d9ab5-2919-4127-a0a1-ac64c0ce6367\"\n# ObjectTypeApiName | The API name of the object from which the links originate. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**.\nobject_type = \"employee\"\n# PropertyValueEscapedString | The primary key of the object from which the links originate. To look up the expected primary key for your object type, use the `Get object type` endpoint or the **Ontology Manager**.\nprimary_key = 50030\n# LinkTypeApiName | The API name of the link that exists between the object and the requested objects. To find the API name for your link type, check the **Ontology Manager**.\nlink_type = \"directReport\"\n# Optional[OrderBy]\norder_by = None\n# Optional[PageSize] | The desired size of the page to be returned. Defaults to 1,000. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details.\npage_size = None\n# Optional[PageToken]\npage_token = None\n# Optional[List[SelectedPropertyApiName]] | The properties of the object type that should be included in the response. Omit this parameter to get all the properties.\nproperties = None\n\n\ntry:\n for ontology_object in client.ontologies.OntologyObject.list_linked_objects(\n ontology_rid,\n object_type,\n primary_key,\n link_type,\n order_by=order_by,\n page_size=page_size,\n page_token=page_token,\n properties=properties,\n ):\n pprint(ontology_object)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling OntologyObject.list_linked_objects: %s\\n\" % e)" - } - ], - "v1.searchObjects": [ - { - "template": "from foundry_sdk.v1 import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the objects.\nontology_rid = \"ri.ontology.main.ontology.c61d9ab5-2919-4127-a0a1-ac64c0ce6367\"\n# ObjectTypeApiName | The type of the requested objects.\nobject_type = \"employee\"\n# List[PropertyApiName] | The API names of the object type properties to include in the response.\nfields = None\n# SearchJsonQuery\nquery = {\"not\": {\"field\": \"properties.age\", \"eq\": 21}}\n# Optional[SearchOrderBy]\norder_by = None\n# Optional[PageSize]\npage_size = None\n# Optional[PageToken]\npage_token = None\n\n\ntry:\n api_response = client.ontologies.OntologyObject.search(\n ontology_rid,\n object_type,\n fields=fields,\n query=query,\n order_by=order_by,\n page_size=page_size,\n page_token=page_token,\n )\n print(\"The search response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling OntologyObject.search: %s\\n\" % e)" - } - ], - "v1.executeQuery": [ - { - "template": "from foundry_sdk.v1 import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the Query. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**.\nontology_rid = \"ri.ontology.main.ontology.c61d9ab5-2919-4127-a0a1-ac64c0ce6367\"\n# QueryApiName | The API name of the Query to execute.\nquery_api_name = \"getEmployeesInCity\"\n# Dict[ParameterId, Optional[DataValue]]\nparameters = {\"city\": \"New York\"}\n# Optional[Attribution] | The Attribution to be used when executing this request.\nattribution = None\n# Optional[TraceParent] | The W3C trace parent header included in the request.\ntrace_parent = None\n# Optional[TraceState] | The W3C trace state header included in the request.\ntrace_state = None\n\n\ntry:\n api_response = client.ontologies.Query.execute(\n ontology_rid,\n query_api_name,\n parameters=parameters,\n attribution=attribution,\n trace_parent=trace_parent,\n trace_state=trace_state,\n )\n print(\"The execute response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Query.execute: %s\\n\" % e)" - } - ], - "v1.getQueryType": [ - { - "template": "from foundry_sdk.v1 import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the query type. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**.\nontology_rid = \"ri.ontology.main.ontology.c61d9ab5-2919-4127-a0a1-ac64c0ce6367\"\n# QueryApiName | The API name of the query type. To find the API name, use the **List query types** endpoint or check the **Ontology Manager**.\nquery_api_name = \"getEmployeesInCity\"\n\n\ntry:\n api_response = client.ontologies.Ontology.QueryType.get(ontology_rid, query_api_name)\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling QueryType.get: %s\\n\" % e)" - } - ], - "v1.listQueryTypes": [ - { - "template": "from foundry_sdk.v1 import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the query types. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**.\nontology_rid = \"ri.ontology.main.ontology.c61d9ab5-2919-4127-a0a1-ac64c0ce6367\"\n# Optional[PageSize] | The desired size of the page to be returned. Defaults to 100. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details.\npage_size = None\n# Optional[PageToken]\npage_token = None\n\n\ntry:\n for query_type in client.ontologies.Ontology.QueryType.list(\n ontology_rid, page_size=page_size, page_token=page_token\n ):\n pprint(query_type)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling QueryType.list: %s\\n\" % e)" - } - ], - "v2.getAuthenticationProvider": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# EnrollmentRid\nenrollment_rid = None\n# AuthenticationProviderRid\nauthentication_provider_rid = \"ri.control-panel.main.saml.3faf689c-eaa1-4137-851f-81d58afe4c86\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.admin.Enrollment.AuthenticationProvider.get(\n enrollment_rid, authentication_provider_rid, preview=preview\n )\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling AuthenticationProvider.get: %s\\n\" % e)" - } - ], - "v2.listAuthenticationProviders": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# EnrollmentRid\nenrollment_rid = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.admin.Enrollment.AuthenticationProvider.list(\n enrollment_rid, preview=preview\n )\n print(\"The list response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling AuthenticationProvider.list: %s\\n\" % e)" - } - ], - "v2.preregisterGroup": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# EnrollmentRid\nenrollment_rid = None\n# AuthenticationProviderRid\nauthentication_provider_rid = \"ri.control-panel.main.saml.3faf689c-eaa1-4137-851f-81d58afe4c86\"\n# GroupName\nname = \"Data Source Admins\"\n# List[OrganizationRid] | The RIDs of the Organizations that can view this group.\norganizations = [\"ri.multipass..organization.c30ee6ad-b5e4-4afe-a74f-fe4a289f2faa\"]\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.admin.Enrollment.AuthenticationProvider.preregister_group(\n enrollment_rid,\n authentication_provider_rid,\n name=name,\n organizations=organizations,\n preview=preview,\n )\n print(\"The preregister_group response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling AuthenticationProvider.preregister_group: %s\\n\" % e)" - } - ], - "v2.preregisterUser": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# EnrollmentRid\nenrollment_rid = None\n# AuthenticationProviderRid\nauthentication_provider_rid = \"ri.control-panel.main.saml.3faf689c-eaa1-4137-851f-81d58afe4c86\"\n# OrganizationRid | The RID of the user's primary Organization. This may be changed when the user logs in for the first time depending on any configured Organization assignment rules.\norganization = \"ri.multipass..organization.c30ee6ad-b5e4-4afe-a74f-fe4a289f2faa\"\n# UserUsername | The new user's username. This must match one of the provider's supported username patterns.\nusername = \"jsmith\"\n# Optional[Dict[AttributeName, AttributeValues]]\nattributes = {\n \"multipass:givenName\": [\"John\"],\n \"multipass:familyName\": [\"Smith\"],\n \"multipass:email:primary\": [\"jsmith@example.com\"],\n \"multipass:realm\": [\"eab0a251-ca1a-4a84-a482-200edfb8026f\"],\n \"multipass:organization-rid\": [\n \"ri.multipass..organization.c30ee6ad-b5e4-4afe-a74f-fe4a289f2faa\"\n ],\n \"department\": [\"Finance\"],\n \"jobTitle\": [\"Accountant\"],\n}\n# Optional[str]\nemail = \"jsmith@example.com\"\n# Optional[str]\nfamily_name = \"Smith\"\n# Optional[str]\ngiven_name = \"John\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.admin.Enrollment.AuthenticationProvider.preregister_user(\n enrollment_rid,\n authentication_provider_rid,\n organization=organization,\n username=username,\n attributes=attributes,\n email=email,\n family_name=family_name,\n given_name=given_name,\n preview=preview,\n )\n print(\"The preregister_user response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling AuthenticationProvider.preregister_user: %s\\n\" % e)" - } - ], - "v2.getEnrollment": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# EnrollmentRid\nenrollment_rid = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.admin.Enrollment.get(enrollment_rid, preview=preview)\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Enrollment.get: %s\\n\" % e)" - } - ], - "v2.getCurrentEnrollment": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.admin.Enrollment.get_current(preview=preview)\n print(\"The get_current response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Enrollment.get_current: %s\\n\" % e)" - } - ], - "v2.addEnrollmentRoleAssignments": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# EnrollmentRid\nenrollment_rid = None\n# List[RoleAssignmentUpdate]\nrole_assignments = [\n {\n \"roleId\": \"8bf49052-dc37-4528-8bf0-b551cfb71268\",\n \"principalId\": \"f05f8da4-b84c-4fca-9c77-8af0b13d11de\",\n }\n]\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.admin.Enrollment.EnrollmentRoleAssignment.add(\n enrollment_rid, role_assignments=role_assignments, preview=preview\n )\n print(\"The add response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling EnrollmentRoleAssignment.add: %s\\n\" % e)" - } - ], - "v2.listEnrollmentRoleAssignments": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# EnrollmentRid\nenrollment_rid = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.admin.Enrollment.EnrollmentRoleAssignment.list(\n enrollment_rid, preview=preview\n )\n print(\"The list response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling EnrollmentRoleAssignment.list: %s\\n\" % e)" - } - ], - "v2.removeEnrollmentRoleAssignments": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# EnrollmentRid\nenrollment_rid = None\n# List[RoleAssignmentUpdate]\nrole_assignments = [\n {\n \"roleId\": \"8bf49052-dc37-4528-8bf0-b551cfb71268\",\n \"principalId\": \"f05f8da4-b84c-4fca-9c77-8af0b13d11de\",\n }\n]\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.admin.Enrollment.EnrollmentRoleAssignment.remove(\n enrollment_rid, role_assignments=role_assignments, preview=preview\n )\n print(\"The remove response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling EnrollmentRoleAssignment.remove: %s\\n\" % e)" - } - ], - "v2.createGroup": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# Dict[AttributeName, AttributeValues] | A map of the Group's attributes. Attributes prefixed with \"multipass:\" are reserved for internal use by Foundry and are subject to change.\nattributes = {\n \"multipass:givenName\": [\"John\"],\n \"multipass:familyName\": [\"Smith\"],\n \"multipass:email:primary\": [\"jsmith@example.com\"],\n \"multipass:realm\": [\"eab0a251-ca1a-4a84-a482-200edfb8026f\"],\n \"multipass:organization-rid\": [\n \"ri.multipass..organization.c30ee6ad-b5e4-4afe-a74f-fe4a289f2faa\"\n ],\n \"department\": [\"Finance\"],\n \"jobTitle\": [\"Accountant\"],\n}\n# GroupName | The name of the Group.\nname = \"Data Source Admins\"\n# List[OrganizationRid] | The RIDs of the Organizations whose members can see this group. At least one Organization RID must be listed.\norganizations = [\"ri.multipass..organization.c30ee6ad-b5e4-4afe-a74f-fe4a289f2faa\"]\n# Optional[str] | A description of the Group.\ndescription = \"Create and modify data sources in the platform\"\n\n\ntry:\n api_response = client.admin.Group.create(\n attributes=attributes, name=name, organizations=organizations, description=description\n )\n print(\"The create response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Group.create: %s\\n\" % e)" - } - ], - "v2.deleteGroup": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# GroupId\ngroup_id = None\n\n\ntry:\n api_response = client.admin.Group.delete(group_id)\n print(\"The delete response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Group.delete: %s\\n\" % e)" - } - ], - "v2.getGroup": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# GroupId\ngroup_id = None\n\n\ntry:\n api_response = client.admin.Group.get(group_id)\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Group.get: %s\\n\" % e)" - } - ], - "v2.getGroupsBatch": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# List[GetGroupsBatchRequestElement] | Body of the request\nbody = [{\"groupId\": \"0d1fe74e-2b70-4a93-9b1a-80070637788b\"}]\n\n\ntry:\n api_response = client.admin.Group.get_batch(body)\n print(\"The get_batch response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Group.get_batch: %s\\n\" % e)" - } - ], - "v2.listGroups": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# Optional[PageSize] | The page size to use for the endpoint.\npage_size = None\n# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request.\npage_token = None\n\n\ntry:\n for group in client.admin.Group.list(page_size=page_size, page_token=page_token):\n pprint(group)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Group.list: %s\\n\" % e)" - } - ], - "v2.searchGroups": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# GroupSearchFilter\nwhere = {\"type\": \"queryString\", \"value\": \"jsmith\"}\n# Optional[PageSize]\npage_size = 100\n# Optional[PageToken]\npage_token = \"v1.QnVpbGQgdGhlIEZ1dHVyZTogaHR0cHM6Ly93d3cucGFsYW50aXIuY29tL2NhcmVlcnMvP2xldmVyLXNvdXJjZSU1YiU1ZD1BUElEb2NzI29wZW4tcG9zaXRpb25z\"\n\n\ntry:\n api_response = client.admin.Group.search(\n where=where, page_size=page_size, page_token=page_token\n )\n print(\"The search response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Group.search: %s\\n\" % e)" - } - ], - "v2.addGroupMembers": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# GroupId\ngroup_id = None\n# List[PrincipalId]\nprincipal_ids = [\"f05f8da4-b84c-4fca-9c77-8af0b13d11de\"]\n# Optional[GroupMembershipExpiration]\nexpiration = \"2026-01-31T00:00:00.000Z\"\n\n\ntry:\n api_response = client.admin.Group.GroupMember.add(\n group_id, principal_ids=principal_ids, expiration=expiration\n )\n print(\"The add response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling GroupMember.add: %s\\n\" % e)" - } - ], - "v2.listGroupMembers": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# GroupId\ngroup_id = None\n# Optional[PageSize] | The page size to use for the endpoint.\npage_size = None\n# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request.\npage_token = None\n# Optional[bool] | When true, includes the transitive members of groups contained within this group. For example, say the Group has member Group A, and Group A has member User B. If `transitive=false` only Group A will be returned, but if `transitive=true` then Group A and User B will be returned. This will recursively resolve Groups through all layers of nesting. Defaults to false.\ntransitive = None\n\n\ntry:\n for group_member in client.admin.Group.GroupMember.list(\n group_id, page_size=page_size, page_token=page_token, transitive=transitive\n ):\n pprint(group_member)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling GroupMember.list: %s\\n\" % e)" - } - ], - "v2.removeGroupMembers": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# GroupId\ngroup_id = None\n# List[PrincipalId]\nprincipal_ids = [\"f05f8da4-b84c-4fca-9c77-8af0b13d11de\"]\n\n\ntry:\n api_response = client.admin.Group.GroupMember.remove(group_id, principal_ids=principal_ids)\n print(\"The remove response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling GroupMember.remove: %s\\n\" % e)" - } - ], - "v2.listGroupMemberships": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# UserId\nuser_id = None\n# Optional[PageSize] | The page size to use for the endpoint.\npage_size = None\n# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request.\npage_token = None\n# Optional[bool] | When true, includes the transitive memberships of the Groups the User is a member of. For example, say the User is a member of Group A, and Group A is a member of Group B. If `transitive=false` only Group A will be returned, but if `transitive=true` then Groups A and B will be returned. This will recursively resolve Groups through all layers of nesting. Defaults to false.\ntransitive = None\n\n\ntry:\n for group_membership in client.admin.User.GroupMembership.list(\n user_id, page_size=page_size, page_token=page_token, transitive=transitive\n ):\n pprint(group_membership)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling GroupMembership.list: %s\\n\" % e)" - } - ], - "v2.getGroupMembershipExpirationPolicy": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# GroupId\ngroup_id = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.admin.Group.MembershipExpirationPolicy.get(group_id, preview=preview)\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling MembershipExpirationPolicy.get: %s\\n\" % e)" - } - ], - "v2.replaceGroupMembershipExpirationPolicy": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# GroupId\ngroup_id = None\n# Optional[DurationSeconds] | Members in this group must be added with expirations that are less than this duration in seconds into the future from the time they are added.\nmaximum_duration = 30\n# Optional[GroupMembershipExpiration] | Members in this group must be added with expiration times that occur before this value.\nmaximum_value = \"2026-01-31T00:00:00.000Z\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.admin.Group.MembershipExpirationPolicy.replace(\n group_id, maximum_duration=maximum_duration, maximum_value=maximum_value, preview=preview\n )\n print(\"The replace response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling MembershipExpirationPolicy.replace: %s\\n\" % e)" - } - ], - "v2.getGroupProviderInfo": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# GroupId\ngroup_id = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.admin.Group.ProviderInfo.get(group_id, preview=preview)\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling ProviderInfo.get: %s\\n\" % e)" - } - ], - "v2.replaceGroupProviderInfo": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# GroupId\ngroup_id = None\n# ProviderId | The ID of the Group in the external authentication provider. This value is determined by the authentication provider. At most one Group can have a given provider ID in a given Realm.\nprovider_id = \"2838c8f3-d76a-4e99-acf1-1dee537e4c48\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.admin.Group.ProviderInfo.replace(\n group_id, provider_id=provider_id, preview=preview\n )\n print(\"The replace response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling ProviderInfo.replace: %s\\n\" % e)" - } - ], - "v2.listHosts": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# EnrollmentRid\nenrollment_rid = None\n# Optional[PageSize] | The page size to use for the endpoint.\npage_size = None\n# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request.\npage_token = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n for host in client.admin.Enrollment.Host.list(\n enrollment_rid, page_size=page_size, page_token=page_token, preview=preview\n ):\n pprint(host)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Host.list: %s\\n\" % e)" - } - ], - "v2.createMarking": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# MarkingCategoryId\ncategory_id = \"0950264e-01c8-4e83-81a9-1a6b7f77621a\"\n# List[PrincipalId] | Users and Groups that will be able to view resources protected by this Marking. This can be changed later through the MarkingMember operations.\ninitial_members = [\"f05f8da4-b84c-4fca-9c77-8af0b13d11de\"]\n# List[MarkingRoleUpdate] | The initial roles that will be assigned when the Marking is created. At least one ADMIN role must be provided. This can be changed later through the MarkingRoleAssignment operations. WARNING: If you do not include your own principal ID or the ID of a Group that you are a member of, you will create a Marking that you cannot administer.\ninitial_role_assignments = [\n {\"role\": \"ADMINISTER\", \"principalId\": \"f05f8da4-b84c-4fca-9c77-8af0b13d11de\"}\n]\n# MarkingName\nname = \"PII\"\n# Optional[str]\ndescription = \"Contains personally identifiable information about our customers\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.admin.Marking.create(\n category_id=category_id,\n initial_members=initial_members,\n initial_role_assignments=initial_role_assignments,\n name=name,\n description=description,\n preview=preview,\n )\n print(\"The create response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Marking.create: %s\\n\" % e)" - } - ], - "v2.getMarking": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# MarkingId\nmarking_id = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.admin.Marking.get(marking_id, preview=preview)\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Marking.get: %s\\n\" % e)" - } - ], - "v2.getMarkingsBatch": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# List[GetMarkingsBatchRequestElement] | Body of the request\nbody = [{\"markingId\": \"18212f9a-0e63-4b79-96a0-aae04df23336\"}]\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.admin.Marking.get_batch(body, preview=preview)\n print(\"The get_batch response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Marking.get_batch: %s\\n\" % e)" - } - ], - "v2.listMarkings": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# Optional[PageSize] | The page size to use for the endpoint.\npage_size = None\n# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request.\npage_token = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n for marking in client.admin.Marking.list(\n page_size=page_size, page_token=page_token, preview=preview\n ):\n pprint(marking)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Marking.list: %s\\n\" % e)" - } - ], - "v2.replaceMarking": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# MarkingId\nmarking_id = None\n# MarkingName\nname = \"PII\"\n# Optional[str]\ndescription = \"Contains personally identifiable information about our customers\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.admin.Marking.replace(\n marking_id, name=name, description=description, preview=preview\n )\n print(\"The replace response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Marking.replace: %s\\n\" % e)" - } - ], - "v2.getMarkingCategory": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# MarkingCategoryId\nmarking_category_id = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.admin.MarkingCategory.get(marking_category_id, preview=preview)\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling MarkingCategory.get: %s\\n\" % e)" - } - ], - "v2.listMarkingCategories": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# Optional[PageSize] | The page size to use for the endpoint.\npage_size = None\n# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request.\npage_token = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n for marking_category in client.admin.MarkingCategory.list(\n page_size=page_size, page_token=page_token, preview=preview\n ):\n pprint(marking_category)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling MarkingCategory.list: %s\\n\" % e)" - } - ], - "v2.addMarkingMembers": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# MarkingId\nmarking_id = None\n# List[PrincipalId]\nprincipal_ids = [\"f05f8da4-b84c-4fca-9c77-8af0b13d11de\"]\n\n\ntry:\n api_response = client.admin.Marking.MarkingMember.add(marking_id, principal_ids=principal_ids)\n print(\"The add response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling MarkingMember.add: %s\\n\" % e)" - } - ], - "v2.listMarkingMembers": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# MarkingId\nmarking_id = None\n# Optional[PageSize] | The page size to use for the endpoint.\npage_size = None\n# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request.\npage_token = None\n# Optional[bool] | When true, includes the transitive members of groups contained within groups that are members of this Marking. For example, say the Marking has member Group A, and Group A has member User B. If `transitive=false` only Group A will be returned, but if `transitive=true` then Group A and User B will be returned. This will recursively resolve Groups through all layers of nesting. Defaults to false.\ntransitive = None\n\n\ntry:\n for marking_member in client.admin.Marking.MarkingMember.list(\n marking_id, page_size=page_size, page_token=page_token, transitive=transitive\n ):\n pprint(marking_member)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling MarkingMember.list: %s\\n\" % e)" - } - ], - "v2.removeMarkingMembers": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# MarkingId\nmarking_id = None\n# List[PrincipalId]\nprincipal_ids = [\"f05f8da4-b84c-4fca-9c77-8af0b13d11de\"]\n\n\ntry:\n api_response = client.admin.Marking.MarkingMember.remove(\n marking_id, principal_ids=principal_ids\n )\n print(\"The remove response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling MarkingMember.remove: %s\\n\" % e)" - } - ], - "v2.addMarkingRoleAssignments": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# MarkingId\nmarking_id = None\n# List[MarkingRoleUpdate]\nrole_assignments = [{\"role\": \"ADMINISTER\", \"principalId\": \"f05f8da4-b84c-4fca-9c77-8af0b13d11de\"}]\n\n\ntry:\n api_response = client.admin.Marking.MarkingRoleAssignment.add(\n marking_id, role_assignments=role_assignments\n )\n print(\"The add response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling MarkingRoleAssignment.add: %s\\n\" % e)" - } - ], - "v2.listMarkingRoleAssignments": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# MarkingId\nmarking_id = None\n# Optional[PageSize] | The page size to use for the endpoint.\npage_size = None\n# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request.\npage_token = None\n\n\ntry:\n for marking_role_assignment in client.admin.Marking.MarkingRoleAssignment.list(\n marking_id, page_size=page_size, page_token=page_token\n ):\n pprint(marking_role_assignment)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling MarkingRoleAssignment.list: %s\\n\" % e)" - } - ], - "v2.removeMarkingRoleAssignments": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# MarkingId\nmarking_id = None\n# List[MarkingRoleUpdate]\nrole_assignments = [{\"role\": \"ADMINISTER\", \"principalId\": \"f05f8da4-b84c-4fca-9c77-8af0b13d11de\"}]\n\n\ntry:\n api_response = client.admin.Marking.MarkingRoleAssignment.remove(\n marking_id, role_assignments=role_assignments\n )\n print(\"The remove response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling MarkingRoleAssignment.remove: %s\\n\" % e)" - } - ], - "v2.createOrganization": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# List[PrincipalId] | The initial administrators of the Organization. At least one principal must be provided.\nadministrators = [\"f05f8da4-b84c-4fca-9c77-8af0b13d11de\"]\n# EnrollmentRid | The RID of the Enrollment that this Organization belongs to. This must be provided.\nenrollment_rid = \"ri.control-panel.main.customer.466f812b-f974-4478-9d4f-90402cd3def6\"\n# OrganizationName\nname = \"Example Organization\"\n# Optional[str]\ndescription = None\n# Optional[HostName] | The primary host name of the Organization. This should be used when constructing URLs for users of this Organization.\nhost = \"example.palantirfoundry.com\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.admin.Organization.create(\n administrators=administrators,\n enrollment_rid=enrollment_rid,\n name=name,\n description=description,\n host=host,\n preview=preview,\n )\n print(\"The create response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Organization.create: %s\\n\" % e)" - } - ], - "v2.getOrganization": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OrganizationRid\norganization_rid = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.admin.Organization.get(organization_rid, preview=preview)\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Organization.get: %s\\n\" % e)" - } - ], - "v2.listAvailableRolesOrganization": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OrganizationRid\norganization_rid = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.admin.Organization.list_available_roles(organization_rid, preview=preview)\n print(\"The list_available_roles response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Organization.list_available_roles: %s\\n\" % e)" - } - ], - "v2.replaceOrganization": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OrganizationRid\norganization_rid = None\n# OrganizationName\nname = \"Example Organization\"\n# Optional[str]\ndescription = None\n# Optional[HostName] | The primary host name of the Organization. This should be used when constructing URLs for users of this Organization.\nhost = \"example.palantirfoundry.com\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.admin.Organization.replace(\n organization_rid, name=name, description=description, host=host, preview=preview\n )\n print(\"The replace response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Organization.replace: %s\\n\" % e)" - } - ], - "v2.addOrganizationRoleAssignments": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OrganizationRid\norganization_rid = None\n# List[RoleAssignmentUpdate]\nrole_assignments = [\n {\n \"roleId\": \"8bf49052-dc37-4528-8bf0-b551cfb71268\",\n \"principalId\": \"f05f8da4-b84c-4fca-9c77-8af0b13d11de\",\n }\n]\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.admin.Organization.OrganizationRoleAssignment.add(\n organization_rid, role_assignments=role_assignments, preview=preview\n )\n print(\"The add response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling OrganizationRoleAssignment.add: %s\\n\" % e)" - } - ], - "v2.listOrganizationRoleAssignments": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OrganizationRid\norganization_rid = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.admin.Organization.OrganizationRoleAssignment.list(\n organization_rid, preview=preview\n )\n print(\"The list response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling OrganizationRoleAssignment.list: %s\\n\" % e)" - } - ], - "v2.removeOrganizationRoleAssignments": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OrganizationRid\norganization_rid = None\n# List[RoleAssignmentUpdate]\nrole_assignments = [\n {\n \"roleId\": \"8bf49052-dc37-4528-8bf0-b551cfb71268\",\n \"principalId\": \"f05f8da4-b84c-4fca-9c77-8af0b13d11de\",\n }\n]\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.admin.Organization.OrganizationRoleAssignment.remove(\n organization_rid, role_assignments=role_assignments, preview=preview\n )\n print(\"The remove response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling OrganizationRoleAssignment.remove: %s\\n\" % e)" - } - ], - "v2.getRole": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# RoleId\nrole_id = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.admin.Role.get(role_id, preview=preview)\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Role.get: %s\\n\" % e)" - } - ], - "v2.getRolesBatch": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# List[GetRolesBatchRequestElement] | Body of the request\nbody = [{\"roleId\": \"8bf49052-dc37-4528-8bf0-b551cfb71268\"}]\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.admin.Role.get_batch(body, preview=preview)\n print(\"The get_batch response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Role.get_batch: %s\\n\" % e)" - } - ], - "v2.deleteUser": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# UserId\nuser_id = None\n\n\ntry:\n api_response = client.admin.User.delete(user_id)\n print(\"The delete response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling User.delete: %s\\n\" % e)" - } - ], - "v2.getUser": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# UserId\nuser_id = None\n# Optional[UserStatus]\nstatus = None\n\n\ntry:\n api_response = client.admin.User.get(user_id, status=status)\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling User.get: %s\\n\" % e)" - } - ], - "v2.getUsersBatch": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# List[GetUsersBatchRequestElement] | Body of the request\nbody = [{\"userId\": \"0d1fe74e-2b70-4a93-9b1a-80070637788b\", \"status\": \"ACTIVE\"}]\n\n\ntry:\n api_response = client.admin.User.get_batch(body)\n print(\"The get_batch response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling User.get_batch: %s\\n\" % e)" - } - ], - "v2.getCurrentUser": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n\ntry:\n api_response = client.admin.User.get_current()\n print(\"The get_current response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling User.get_current: %s\\n\" % e)" - } - ], - "v2.getMarkingsUser": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# UserId\nuser_id = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.admin.User.get_markings(user_id, preview=preview)\n print(\"The get_markings response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling User.get_markings: %s\\n\" % e)" - } - ], - "v2.listUsers": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# Optional[UserStatus]\ninclude = None\n# Optional[PageSize] | The page size to use for the endpoint.\npage_size = None\n# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request.\npage_token = None\n\n\ntry:\n for user in client.admin.User.list(include=include, page_size=page_size, page_token=page_token):\n pprint(user)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling User.list: %s\\n\" % e)" - } - ], - "v2.getProfilePictureOfUser": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# UserId\nuser_id = None\n\n\ntry:\n api_response = client.admin.User.profile_picture(user_id)\n print(\"The profile_picture response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling User.profile_picture: %s\\n\" % e)" - } - ], - "v2.revokeAllTokensUser": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# UserId\nuser_id = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.admin.User.revoke_all_tokens(user_id, preview=preview)\n print(\"The revoke_all_tokens response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling User.revoke_all_tokens: %s\\n\" % e)" - } - ], - "v2.searchUsers": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# UserSearchFilter\nwhere = {\"type\": \"queryString\", \"value\": \"jsmith\"}\n# Optional[PageSize]\npage_size = 100\n# Optional[PageToken]\npage_token = \"v1.QnVpbGQgdGhlIEZ1dHVyZTogaHR0cHM6Ly93d3cucGFsYW50aXIuY29tL2NhcmVlcnMvP2xldmVyLXNvdXJjZSU1YiU1ZD1BUElEb2NzI29wZW4tcG9zaXRpb25z\"\n\n\ntry:\n api_response = client.admin.User.search(where=where, page_size=page_size, page_token=page_token)\n print(\"The search response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling User.search: %s\\n\" % e)" - } - ], - "v2.getUserProviderInfo": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# UserId\nuser_id = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.admin.User.ProviderInfo.get(user_id, preview=preview)\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling ProviderInfo.get: %s\\n\" % e)" - } - ], - "v2.replaceUserProviderInfo": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# UserId\nuser_id = None\n# ProviderId | The ID of the User in the external authentication provider. This value is determined by the authentication provider. At most one User can have a given provider ID in a given Realm.\nprovider_id = \"2838c8f3-d76a-4e99-acf1-1dee537e4c48\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.admin.User.ProviderInfo.replace(\n user_id, provider_id=provider_id, preview=preview\n )\n print(\"The replace response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling ProviderInfo.replace: %s\\n\" % e)" - } - ], - "v2.listSessionsForAgents": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# Optional[PageSize] | The maximum number of sessions to return in a single page. The maximum allowed value is 100. Defaults to 100 if not specified.\npage_size = None\n# Optional[PageToken]\npage_token = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n for agent in client.aip_agents.Agent.all_sessions(\n page_size=page_size, page_token=page_token, preview=preview\n ):\n pprint(agent)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Agent.all_sessions: %s\\n\" % e)" - } - ], - "v2.getAgent": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# AgentRid | An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/).\nagent_rid = \"ri.aip-agents..agent.732cd5b4-7ca7-4219-aabb-6e976faf63b1\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n# Optional[AgentVersionString] | The version of the Agent to retrieve. If not specified, the latest published version will be returned.\nversion = None\n\n\ntry:\n api_response = client.aip_agents.Agent.get(agent_rid, preview=preview, version=version)\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Agent.get: %s\\n\" % e)" - } - ], - "v2.getAgentVersion": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# AgentRid | An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/).\nagent_rid = \"ri.aip-agents..agent.732cd5b4-7ca7-4219-aabb-6e976faf63b1\"\n# AgentVersionString | The semantic version of the Agent, formatted as \"majorVersion.minorVersion\".\nagent_version_string = \"1.0\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.aip_agents.Agent.AgentVersion.get(\n agent_rid, agent_version_string, preview=preview\n )\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling AgentVersion.get: %s\\n\" % e)" - } - ], - "v2.listAgentVersions": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# AgentRid | An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/).\nagent_rid = \"ri.aip-agents..agent.732cd5b4-7ca7-4219-aabb-6e976faf63b1\"\n# Optional[PageSize] | The page size to use for the endpoint.\npage_size = None\n# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request.\npage_token = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n for agent_version in client.aip_agents.Agent.AgentVersion.list(\n agent_rid, page_size=page_size, page_token=page_token, preview=preview\n ):\n pprint(agent_version)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling AgentVersion.list: %s\\n\" % e)" - } - ], - "v2.getContent": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# AgentRid | An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/).\nagent_rid = \"ri.aip-agents..agent.732cd5b4-7ca7-4219-aabb-6e976faf63b1\"\n# SessionRid | The Resource Identifier (RID) of the conversation session.\nsession_rid = \"ri.aip-agents..session.292db3b2-b653-4de6-971c-7e97a7b881d6\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.aip_agents.Agent.Session.Content.get(\n agent_rid, session_rid, preview=preview\n )\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Content.get: %s\\n\" % e)" - } - ], - "v2.blockingContinueSession": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# AgentRid | An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/).\nagent_rid = \"ri.aip-agents..agent.732cd5b4-7ca7-4219-aabb-6e976faf63b1\"\n# SessionRid | The Resource Identifier (RID) of the conversation session.\nsession_rid = \"ri.aip-agents..session.292db3b2-b653-4de6-971c-7e97a7b881d6\"\n# Dict[ParameterId, ParameterValue] | Any supplied values for [application variables](https://palantir.com/docs/foundry/agent-studio/application-state/) to pass to the Agent for the exchange.\nparameter_inputs = {\n \"currentCustomerOrders\": {\n \"type\": \"objectSet\",\n \"ontology\": \"example-ontology\",\n \"objectSet\": {\n \"type\": \"filter\",\n \"objectSet\": {\"type\": \"base\", \"objectType\": \"customerOrder\"},\n \"where\": {\"type\": \"eq\", \"field\": \"customerId\", \"value\": \"123abc\"},\n },\n }\n}\n# UserTextInput | The user message for the Agent to respond to.\nuser_input = {\"text\": \"What is the status of my order?\"}\n# Optional[List[InputContext]] | If set, automatic [context retrieval](https://palantir.com/docs/foundry/agent-studio/retrieval-context/) is skipped and the list of specified context is provided to the Agent instead. If omitted, relevant context for the user message is automatically retrieved and included in the prompt, based on data sources configured on the Agent for the session.\ncontexts_override = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n# Optional[SessionTraceId] | The unique identifier to use for this continue session trace. By generating and passing this ID to the `blockingContinue` endpoint, clients can use this trace ID to separately load details of the trace used to generate a result, while the result is in progress. If omitted, it will be generated automatically. Clients can check the generated ID by inspecting the `sessionTraceId` in the `SessionExchangeResult`.\nsession_trace_id = \"12345678-1234-5678-1234-123456789abc\"\n\n\ntry:\n api_response = client.aip_agents.Agent.Session.blocking_continue(\n agent_rid,\n session_rid,\n parameter_inputs=parameter_inputs,\n user_input=user_input,\n contexts_override=contexts_override,\n preview=preview,\n session_trace_id=session_trace_id,\n )\n print(\"The blocking_continue response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Session.blocking_continue: %s\\n\" % e)" - } - ], - "v2.cancelSession": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# AgentRid | An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/).\nagent_rid = \"ri.aip-agents..agent.732cd5b4-7ca7-4219-aabb-6e976faf63b1\"\n# SessionRid | The Resource Identifier (RID) of the conversation session.\nsession_rid = \"ri.aip-agents..session.292db3b2-b653-4de6-971c-7e97a7b881d6\"\n# MessageId | The identifier for the in-progress exchange to cancel. This should match the `messageId` which was provided when initiating the exchange with `streamingContinue`.\nmessage_id = \"00f8412a-c29d-4063-a417-8052825285a5\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n# Optional[AgentMarkdownResponse] | When specified, the exchange is added to the session with the client-provided response as the result. When omitted, the exchange is not added to the session.\nresponse = \"The status of your order is **In Transit**.\"\n\n\ntry:\n api_response = client.aip_agents.Agent.Session.cancel(\n agent_rid, session_rid, message_id=message_id, preview=preview, response=response\n )\n print(\"The cancel response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Session.cancel: %s\\n\" % e)" - } - ], - "v2.createSession": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# AgentRid | An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/).\nagent_rid = \"ri.aip-agents..agent.732cd5b4-7ca7-4219-aabb-6e976faf63b1\"\n# Optional[AgentVersionString] | The version of the Agent associated with the session. This can be set by clients on session creation. If not specified, defaults to use the latest published version of the Agent at session creation time.\nagent_version = \"1.0\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.aip_agents.Agent.Session.create(\n agent_rid, agent_version=agent_version, preview=preview\n )\n print(\"The create response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Session.create: %s\\n\" % e)" - } - ], - "v2.deleteSession": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# AgentRid | An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/).\nagent_rid = \"ri.aip-agents..agent.732cd5b4-7ca7-4219-aabb-6e976faf63b1\"\n# SessionRid | The Resource Identifier (RID) of the conversation session.\nsession_rid = \"ri.aip-agents..session.292db3b2-b653-4de6-971c-7e97a7b881d6\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.aip_agents.Agent.Session.delete(agent_rid, session_rid, preview=preview)\n print(\"The delete response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Session.delete: %s\\n\" % e)" - } - ], - "v2.getSession": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# AgentRid | An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/).\nagent_rid = \"ri.aip-agents..agent.732cd5b4-7ca7-4219-aabb-6e976faf63b1\"\n# SessionRid | The Resource Identifier (RID) of the conversation session.\nsession_rid = \"ri.aip-agents..session.292db3b2-b653-4de6-971c-7e97a7b881d6\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.aip_agents.Agent.Session.get(agent_rid, session_rid, preview=preview)\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Session.get: %s\\n\" % e)" - } - ], - "v2.listSessions": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# AgentRid | An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/).\nagent_rid = \"ri.aip-agents..agent.732cd5b4-7ca7-4219-aabb-6e976faf63b1\"\n# Optional[PageSize] | The page size to use for the endpoint.\npage_size = None\n# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request.\npage_token = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n for session in client.aip_agents.Agent.Session.list(\n agent_rid, page_size=page_size, page_token=page_token, preview=preview\n ):\n pprint(session)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Session.list: %s\\n\" % e)" - } - ], - "v2.getRagContextForSession": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# AgentRid | An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/).\nagent_rid = \"ri.aip-agents..agent.732cd5b4-7ca7-4219-aabb-6e976faf63b1\"\n# SessionRid | The Resource Identifier (RID) of the conversation session.\nsession_rid = \"ri.aip-agents..session.292db3b2-b653-4de6-971c-7e97a7b881d6\"\n# Dict[ParameterId, ParameterValue] | Any values for [application variables](https://palantir.com/docs/foundry/agent-studio/application-state/) to use for the context retrieval.\nparameter_inputs = {\"customerName\": {\"type\": \"string\", \"value\": \"Titan Technologies\"}}\n# UserTextInput | The user message to retrieve relevant context for from the configured Agent data sources.\nuser_input = {\"text\": \"What is the status of my order?\"}\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.aip_agents.Agent.Session.rag_context(\n agent_rid,\n session_rid,\n parameter_inputs=parameter_inputs,\n user_input=user_input,\n preview=preview,\n )\n print(\"The rag_context response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Session.rag_context: %s\\n\" % e)" - } - ], - "v2.streamingContinueSession": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# AgentRid | An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/).\nagent_rid = \"ri.aip-agents..agent.732cd5b4-7ca7-4219-aabb-6e976faf63b1\"\n# SessionRid | The Resource Identifier (RID) of the conversation session.\nsession_rid = \"ri.aip-agents..session.292db3b2-b653-4de6-971c-7e97a7b881d6\"\n# Dict[ParameterId, ParameterValue] | Any supplied values for [application variables](https://palantir.com/docs/foundry/agent-studio/application-state/) to pass to the Agent for the exchange.\nparameter_inputs = {\n \"currentCustomerOrders\": {\n \"type\": \"objectSet\",\n \"ontology\": \"example-ontology\",\n \"objectSet\": {\n \"type\": \"filter\",\n \"objectSet\": {\"type\": \"base\", \"objectType\": \"customerOrder\"},\n \"where\": {\"type\": \"eq\", \"field\": \"customerId\", \"value\": \"123abc\"},\n },\n }\n}\n# UserTextInput | The user message for the Agent to respond to.\nuser_input = {\"text\": \"What is the status of my order?\"}\n# Optional[List[InputContext]] | If set, automatic [context](https://palantir.com/docs/foundry/agent-studio/retrieval-context/) retrieval is skipped and the list of specified context is provided to the Agent instead. If omitted, relevant context for the user message is automatically retrieved and included in the prompt, based on data sources configured on the Agent for the session.\ncontexts_override = None\n# Optional[MessageId] | A client-generated Universally Unique Identifier (UUID) to identify the message, which the client can use to cancel the exchange before the streaming response is complete.\nmessage_id = \"00f8412a-c29d-4063-a417-8052825285a5\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n# Optional[SessionTraceId] | The unique identifier to use for this continue session trace. By generating and passing this ID to the `streamingContinue` endpoint, clients can use this trace ID to separately load details of the trace used to generate a result, while the result is in progress. If omitted, it will be generated automatically. Clients can check the generated ID by inspecting the `sessionTraceId` in the `SessionExchangeResult`, which can be loaded via the `getContent` endpoint.\nsession_trace_id = \"12345678-1234-5678-1234-123456789abc\"\n\n\ntry:\n api_response = client.aip_agents.Agent.Session.streaming_continue(\n agent_rid,\n session_rid,\n parameter_inputs=parameter_inputs,\n user_input=user_input,\n contexts_override=contexts_override,\n message_id=message_id,\n preview=preview,\n session_trace_id=session_trace_id,\n )\n print(\"The streaming_continue response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Session.streaming_continue: %s\\n\" % e)" - } - ], - "v2.updateSessionTitle": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# AgentRid | An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/).\nagent_rid = \"ri.aip-agents..agent.732cd5b4-7ca7-4219-aabb-6e976faf63b1\"\n# SessionRid | The Resource Identifier (RID) of the conversation session.\nsession_rid = \"ri.aip-agents..session.292db3b2-b653-4de6-971c-7e97a7b881d6\"\n# str | The new title for the session. The maximum title length is 200 characters. Titles are truncated if they exceed this length.\ntitle = \"Order status 02/01\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.aip_agents.Agent.Session.update_title(\n agent_rid, session_rid, title=title, preview=preview\n )\n print(\"The update_title response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Session.update_title: %s\\n\" % e)" - } - ], - "v2.getSessionTrace": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# AgentRid | An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/).\nagent_rid = \"ri.aip-agents..agent.732cd5b4-7ca7-4219-aabb-6e976faf63b1\"\n# SessionRid | The Resource Identifier (RID) of the conversation session.\nsession_rid = \"ri.aip-agents..session.292db3b2-b653-4de6-971c-7e97a7b881d6\"\n# SessionTraceId | The unique identifier for the trace.\nsession_trace_id = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.aip_agents.Agent.Session.SessionTrace.get(\n agent_rid, session_rid, session_trace_id, preview=preview\n )\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling SessionTrace.get: %s\\n\" % e)" - } - ], - "v2.getLogFileContent": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OrganizationRid\norganization_rid = None\n# FileId\nlog_file_id = None\n\n\ntry:\n api_response = client.audit.Organization.LogFile.content(organization_rid, log_file_id)\n print(\"The content response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling LogFile.content: %s\\n\" % e)" - } - ], - "v2.listLogFiles": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OrganizationRid\norganization_rid = None\n# Optional[date] | List log files for audit events up until this date (inclusive). If absent, defaults to no end date. Use the returned `nextPageToken` to continually poll the `listLogFiles` endpoint to list the latest available logs.\nend_date = \"2025-01-01\"\n# Optional[PageSize] | The page size to use for the endpoint.\npage_size = None\n# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request.\npage_token = None\n# Optional[date] | List log files for audit events starting from this date. This parameter is required for the initial request (when `pageToken` is not provided).\nstart_date = \"2024-01-01\"\n\n\ntry:\n for log_file in client.audit.Organization.LogFile.list(\n organization_rid,\n end_date=end_date,\n page_size=page_size,\n page_token=page_token,\n start_date=start_date,\n ):\n pprint(log_file)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling LogFile.list: %s\\n\" % e)" - } - ], - "v2.createConnection": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# CreateConnectionRequestConnectionConfiguration\nconfiguration = {\n \"type\": \"jdbc\",\n \"url\": \"jdbc:postgresql://localhost:5432/test\",\n \"driverClass\": \"org.postgresql.Driver\",\n}\n# ConnectionDisplayName | The display name of the Connection. The display name must not be blank.\ndisplay_name = \"Connection to my external system\"\n# FolderRid\nparent_folder_rid = \"ri.compass.main.folder.c410f510-2937-420e-8ea3-8c9bcb3c1791\"\n# CreateConnectionRequestConnectionWorker\nworker = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.connectivity.Connection.create(\n configuration=configuration,\n display_name=display_name,\n parent_folder_rid=parent_folder_rid,\n worker=worker,\n preview=preview,\n )\n print(\"The create response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Connection.create: %s\\n\" % e)" - } - ], - "v2.getConnection": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ConnectionRid\nconnection_rid = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.connectivity.Connection.get(connection_rid, preview=preview)\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Connection.get: %s\\n\" % e)" - } - ], - "v2.getConfiguration": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ConnectionRid\nconnection_rid = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.connectivity.Connection.get_configuration(connection_rid, preview=preview)\n print(\"The get_configuration response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Connection.get_configuration: %s\\n\" % e)" - } - ], - "v2.getConfigurationConnectionsBatch": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# List[GetConfigurationConnectionsBatchRequestElement] | Body of the request\nbody = [{\"connectionRid\": \"ri.magritte..source.c078b71b-92f9-41b6-b0df-3760f411120b\"}]\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.connectivity.Connection.get_configuration_batch(body, preview=preview)\n print(\"The get_configuration_batch response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Connection.get_configuration_batch: %s\\n\" % e)" - } - ], - "v2.updateExportSettingsForConnection": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ConnectionRid\nconnection_rid = None\n# ConnectionExportSettings\nexport_settings = {\"exportsEnabled\": True, \"exportEnabledWithoutMarkingsValidation\": False}\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.connectivity.Connection.update_export_settings(\n connection_rid, export_settings=export_settings, preview=preview\n )\n print(\"The update_export_settings response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Connection.update_export_settings: %s\\n\" % e)" - } - ], - "v2.updateSecretsForConnection": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ConnectionRid\nconnection_rid = None\n# Dict[SecretName, PlaintextValue] | The secrets to be updated. The specified secret names must already be configured on the connection.\nsecrets = {\"Password\": \"MySecretPassword\"}\n\n\ntry:\n api_response = client.connectivity.Connection.update_secrets(connection_rid, secrets=secrets)\n print(\"The update_secrets response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Connection.update_secrets: %s\\n\" % e)" - } - ], - "v2.uploadCustomJdbcDriversConnection": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ConnectionRid\nconnection_rid = None\n# bytes | Body of the request\nbody = None\n# str | The file name of the uploaded JDBC driver. Must end with .jar\nfile_name = \"cdata.jdbc.oracle.jar\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.connectivity.Connection.upload_custom_jdbc_drivers(\n connection_rid, body, file_name=file_name, preview=preview\n )\n print(\"The upload_custom_jdbc_drivers response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Connection.upload_custom_jdbc_drivers: %s\\n\" % e)" - } - ], - "v2.createFileImport": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ConnectionRid\nconnection_rid = None\n# DatasetRid | The RID of the output dataset. Can not be modified after the file import is created.\ndataset_rid = \"ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da\"\n# FileImportDisplayName\ndisplay_name = \"My file import\"\n# List[FileImportFilter] | Use filters to limit which files should be imported. Filters are applied in the order they are defined. A different ordering of filters may lead to a more optimized import. [Learn more about optimizing file imports.](https://palantir.com/docs/foundry/data-connection/file-based-syncs/#optimize-file-based-syncs)\nfile_import_filters = [{\"type\": \"pathMatchesFilter\", \"regex\": \"my-subfolder\"}]\n# FileImportMode\nimport_mode = \"SNAPSHOT\"\n# Optional[BranchName] | The branch name in the output dataset that will contain the imported data. Defaults to `master` for most enrollments. Can not be modified after the file import is created.\nbranch_name = \"master\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n# Optional[str] | A subfolder in the external system that will be imported. If not specified, defaults to the root folder of the external system.\nsubfolder = \"subfolder1/subfolder2\"\n\n\ntry:\n api_response = client.connectivity.Connection.FileImport.create(\n connection_rid,\n dataset_rid=dataset_rid,\n display_name=display_name,\n file_import_filters=file_import_filters,\n import_mode=import_mode,\n branch_name=branch_name,\n preview=preview,\n subfolder=subfolder,\n )\n print(\"The create response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling FileImport.create: %s\\n\" % e)" - } - ], - "v2.deleteFileImport": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ConnectionRid\nconnection_rid = None\n# FileImportRid\nfile_import_rid = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.connectivity.Connection.FileImport.delete(\n connection_rid, file_import_rid, preview=preview\n )\n print(\"The delete response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling FileImport.delete: %s\\n\" % e)" - } - ], - "v2.executeFileImport": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ConnectionRid\nconnection_rid = None\n# FileImportRid\nfile_import_rid = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.connectivity.Connection.FileImport.execute(\n connection_rid, file_import_rid, preview=preview\n )\n print(\"The execute response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling FileImport.execute: %s\\n\" % e)" - } - ], - "v2.getFileImport": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ConnectionRid\nconnection_rid = None\n# FileImportRid\nfile_import_rid = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.connectivity.Connection.FileImport.get(\n connection_rid, file_import_rid, preview=preview\n )\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling FileImport.get: %s\\n\" % e)" - } - ], - "v2.listFileImports": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ConnectionRid\nconnection_rid = None\n# Optional[PageSize] | The page size to use for the endpoint.\npage_size = None\n# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request.\npage_token = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n for file_import in client.connectivity.Connection.FileImport.list(\n connection_rid, page_size=page_size, page_token=page_token, preview=preview\n ):\n pprint(file_import)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling FileImport.list: %s\\n\" % e)" - } - ], - "v2.replaceFileImport": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ConnectionRid\nconnection_rid = None\n# FileImportRid\nfile_import_rid = None\n# FileImportDisplayName\ndisplay_name = \"My file import\"\n# List[FileImportFilter] | Use filters to limit which files should be imported. Filters are applied in the order they are defined. A different ordering of filters may lead to a more optimized import. [Learn more about optimizing file imports.](https://palantir.com/docs/foundry/data-connection/file-based-syncs/#optimize-file-based-syncs)\nfile_import_filters = [{\"type\": \"pathMatchesFilter\", \"regex\": \"my-subfolder\"}]\n# FileImportMode\nimport_mode = \"SNAPSHOT\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n# Optional[str] | A subfolder in the external system that will be imported. If not specified, defaults to the root folder of the external system.\nsubfolder = \"subfolder1/subfolder2\"\n\n\ntry:\n api_response = client.connectivity.Connection.FileImport.replace(\n connection_rid,\n file_import_rid,\n display_name=display_name,\n file_import_filters=file_import_filters,\n import_mode=import_mode,\n preview=preview,\n subfolder=subfolder,\n )\n print(\"The replace response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling FileImport.replace: %s\\n\" % e)" - } - ], - "v2.createTableImport": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ConnectionRid\nconnection_rid = None\n# CreateTableImportRequestTableImportConfig\nconfig = {\"type\": \"jdbcImportConfig\", \"query\": \"SELECT * FROM table\"}\n# DatasetRid | The RID of the output dataset. Can not be modified after the table import is created.\ndataset_rid = \"ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da\"\n# TableImportDisplayName\ndisplay_name = \"My table import\"\n# TableImportMode\nimport_mode = \"SNAPSHOT\"\n# Optional[TableImportAllowSchemaChanges] | Allow the TableImport to succeed if the schema of imported rows does not match the existing dataset's schema. Defaults to false for new table imports.\nallow_schema_changes = True\n# Optional[BranchName] | The branch name in the output dataset that will contain the imported data. Defaults to `master` for most enrollments. Can not be modified after the table import is created.\nbranch_name = \"master\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.connectivity.Connection.TableImport.create(\n connection_rid,\n config=config,\n dataset_rid=dataset_rid,\n display_name=display_name,\n import_mode=import_mode,\n allow_schema_changes=allow_schema_changes,\n branch_name=branch_name,\n preview=preview,\n )\n print(\"The create response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling TableImport.create: %s\\n\" % e)" - } - ], - "v2.deleteTableImport": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ConnectionRid\nconnection_rid = None\n# TableImportRid\ntable_import_rid = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.connectivity.Connection.TableImport.delete(\n connection_rid, table_import_rid, preview=preview\n )\n print(\"The delete response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling TableImport.delete: %s\\n\" % e)" - } - ], - "v2.executeTableImport": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ConnectionRid\nconnection_rid = None\n# TableImportRid\ntable_import_rid = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.connectivity.Connection.TableImport.execute(\n connection_rid, table_import_rid, preview=preview\n )\n print(\"The execute response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling TableImport.execute: %s\\n\" % e)" - } - ], - "v2.getTableImport": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ConnectionRid\nconnection_rid = None\n# TableImportRid\ntable_import_rid = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.connectivity.Connection.TableImport.get(\n connection_rid, table_import_rid, preview=preview\n )\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling TableImport.get: %s\\n\" % e)" - } - ], - "v2.listTableImports": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ConnectionRid\nconnection_rid = None\n# Optional[PageSize] | The page size to use for the endpoint.\npage_size = None\n# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request.\npage_token = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n for table_import in client.connectivity.Connection.TableImport.list(\n connection_rid, page_size=page_size, page_token=page_token, preview=preview\n ):\n pprint(table_import)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling TableImport.list: %s\\n\" % e)" - } - ], - "v2.replaceTableImport": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ConnectionRid\nconnection_rid = None\n# TableImportRid\ntable_import_rid = None\n# ReplaceTableImportRequestTableImportConfig\nconfig = {\"type\": \"jdbcImportConfig\", \"query\": \"SELECT * FROM table\"}\n# TableImportDisplayName\ndisplay_name = \"My table import\"\n# TableImportMode\nimport_mode = \"SNAPSHOT\"\n# Optional[TableImportAllowSchemaChanges] | Allow the TableImport to succeed if the schema of imported rows does not match the existing dataset's schema. Defaults to false for new table imports.\nallow_schema_changes = True\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.connectivity.Connection.TableImport.replace(\n connection_rid,\n table_import_rid,\n config=config,\n display_name=display_name,\n import_mode=import_mode,\n allow_schema_changes=allow_schema_changes,\n preview=preview,\n )\n print(\"The replace response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling TableImport.replace: %s\\n\" % e)" - } - ], - "v2.createVirtualTable": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ConnectionRid\nconnection_rid = None\n# VirtualTableConfig\nconfig = None\n# TableName\nname = \"my_table\"\n# FolderRid\nparent_rid = \"ri.compass.main.folder.c410f510-2937-420e-8ea3-8c9bcb3c1791\"\n# Optional[List[MarkingId]]\nmarkings = [\"18212f9a-0e63-4b79-96a0-aae04df23336\"]\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.connectivity.Connection.VirtualTable.create(\n connection_rid,\n config=config,\n name=name,\n parent_rid=parent_rid,\n markings=markings,\n preview=preview,\n )\n print(\"The create response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling VirtualTable.create: %s\\n\" % e)" - } - ], - "v2.createCheck": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# CheckConfig\nconfig = None\n# Optional[CheckIntent]\nintent = \"Check to ensure builds are passing.\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.data_health.Check.create(config=config, intent=intent, preview=preview)\n print(\"The create response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Check.create: %s\\n\" % e)" - } - ], - "v2.deleteCheck": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# CheckRid\ncheck_rid = \"ri.data-health.main.check.8e27b13a-e21b-4232-ae1b-76ccf5ff42b3\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.data_health.Check.delete(check_rid, preview=preview)\n print(\"The delete response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Check.delete: %s\\n\" % e)" - } - ], - "v2.getCheck": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# CheckRid\ncheck_rid = \"ri.data-health.main.check.8e27b13a-e21b-4232-ae1b-76ccf5ff42b3\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.data_health.Check.get(check_rid, preview=preview)\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Check.get: %s\\n\" % e)" - } - ], - "v2.replaceCheck": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# CheckRid\ncheck_rid = \"ri.data-health.main.check.8e27b13a-e21b-4232-ae1b-76ccf5ff42b3\"\n# ReplaceCheckConfig\nconfig = None\n# Optional[CheckIntent]\nintent = \"Check to ensure builds are passing.\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.data_health.Check.replace(\n check_rid, config=config, intent=intent, preview=preview\n )\n print(\"The replace response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Check.replace: %s\\n\" % e)" - } - ], - "v2.getCheckReport": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# CheckReportRid\ncheck_report_rid = \"ri.data-health.main.check-report.a1b2c3d4-e5f6-7890-abcd-ef1234567890\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.data_health.CheckReport.get(check_report_rid, preview=preview)\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling CheckReport.get: %s\\n\" % e)" - } - ], - "v2.createBranch": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid\ndataset_rid = None\n# BranchName\nname = \"master\"\n# Optional[TransactionRid] | The most recent OPEN or COMMITTED transaction on the branch. This will never be an ABORTED transaction.\ntransaction_rid = \"ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4\"\n\n\ntry:\n api_response = client.datasets.Dataset.Branch.create(\n dataset_rid, name=name, transaction_rid=transaction_rid\n )\n print(\"The create response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Branch.create: %s\\n\" % e)" - } - ], - "v2.deleteBranch": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid\ndataset_rid = None\n# BranchName\nbranch_name = None\n\n\ntry:\n api_response = client.datasets.Dataset.Branch.delete(dataset_rid, branch_name)\n print(\"The delete response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Branch.delete: %s\\n\" % e)" - } - ], - "v2.getBranch": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid\ndataset_rid = None\n# BranchName\nbranch_name = None\n\n\ntry:\n api_response = client.datasets.Dataset.Branch.get(dataset_rid, branch_name)\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Branch.get: %s\\n\" % e)" - } - ], - "v2.listBranches": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid\ndataset_rid = None\n# Optional[PageSize] | The page size to use for the endpoint.\npage_size = None\n# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request.\npage_token = None\n\n\ntry:\n for branch in client.datasets.Dataset.Branch.list(\n dataset_rid, page_size=page_size, page_token=page_token\n ):\n pprint(branch)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Branch.list: %s\\n\" % e)" - } - ], - "v2.getBranchTransactionHistory": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid\ndataset_rid = None\n# BranchName\nbranch_name = None\n# Optional[PageSize] | The default pageSize is 20 transactions and the maximum allowed pageSize is 50 transactions\npage_size = None\n# Optional[PageToken]\npage_token = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n for branch in client.datasets.Dataset.Branch.transactions(\n dataset_rid, branch_name, page_size=page_size, page_token=page_token, preview=preview\n ):\n pprint(branch)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Branch.transactions: %s\\n\" % e)" - } - ], - "v2.createDataset": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetName\nname = \"My Dataset\"\n# FolderRid\nparent_folder_rid = \"ri.compass.main.folder.c410f510-2937-420e-8ea3-8c9bcb3c1791\"\n\n\ntry:\n api_response = client.datasets.Dataset.create(name=name, parent_folder_rid=parent_folder_rid)\n print(\"The create response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Dataset.create: %s\\n\" % e)" - } - ], - "v2.getDataset": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid\ndataset_rid = None\n\n\ntry:\n api_response = client.datasets.Dataset.get(dataset_rid)\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Dataset.get: %s\\n\" % e)" - } - ], - "v2.getDatasetHealthChecks": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid\ndataset_rid = None\n# Optional[BranchName] | The name of the Branch. If none is provided, the default Branch name - `master` for most enrollments - will be used.\nbranch_name = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.datasets.Dataset.get_health_checks(\n dataset_rid, branch_name=branch_name, preview=preview\n )\n print(\"The get_health_checks response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Dataset.get_health_checks: %s\\n\" % e)" - } - ], - "v2.getDatasetSchedules": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid\ndataset_rid = None\n# Optional[BranchName] | The name of the Branch. If none is provided, the default Branch name - `master` for most enrollments - will be used.\nbranch_name = None\n# Optional[PageSize]\npage_size = None\n# Optional[PageToken]\npage_token = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n for dataset in client.datasets.Dataset.get_schedules(\n dataset_rid,\n branch_name=branch_name,\n page_size=page_size,\n page_token=page_token,\n preview=preview,\n ):\n pprint(dataset)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Dataset.get_schedules: %s\\n\" % e)" - } - ], - "v2.getDatasetSchema": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid\ndataset_rid = None\n# Optional[BranchName]\nbranch_name = None\n# Optional[TransactionRid] | The Resource Identifier (RID) of the end Transaction. If a user does not provide a value, the RID of the latest committed transaction will be used.\nend_transaction_rid = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n# Optional[VersionId] | The schema version that should be used. If none is provided, the latest version will be used.\nversion_id = None\n\n\ntry:\n api_response = client.datasets.Dataset.get_schema(\n dataset_rid,\n branch_name=branch_name,\n end_transaction_rid=end_transaction_rid,\n preview=preview,\n version_id=version_id,\n )\n print(\"The get_schema response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Dataset.get_schema: %s\\n\" % e)" - } - ], - "v2.getSchemaDatasetsBatch": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# List[GetSchemaDatasetsBatchRequestElement] | Body of the request\nbody = [\n {\n \"endTransactionRid\": \"ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4\",\n \"datasetRid\": \"ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da\",\n \"versionId\": \"0000000d-2acf-537c-a228-3a9fe3cdc523\",\n \"branchName\": \"master\",\n }\n]\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.datasets.Dataset.get_schema_batch(body, preview=preview)\n print(\"The get_schema_batch response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Dataset.get_schema_batch: %s\\n\" % e)" - } - ], - "v2.getDatasetJobs": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid\ndataset_rid = None\n# List[GetDatasetJobsSort]\norder_by = [{\"sortType\": \"BY_STARTED_TIME\", \"sortDirection\": \"DESCENDING\"}]\n# Optional[BranchName] | The name of the Branch. If none is provided, the default Branch name - `master` for most enrollments - will be used.\nbranch_name = None\n# Optional[PageSize] | Max number of results to return. A limit of 1000 on if no limit is supplied in the search request\npage_size = None\n# Optional[PageToken]\npage_token = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n# Optional[GetDatasetJobsQuery]\nwhere = {\n \"type\": \"timeFilter\",\n \"field\": \"SUBMITTED_TIME\",\n \"comparisonType\": \"GTE\",\n \"value\": \"2020-09-30T14:30:00Z\",\n}\n\n\ntry:\n for dataset in client.datasets.Dataset.jobs(\n dataset_rid,\n order_by=order_by,\n branch_name=branch_name,\n page_size=page_size,\n page_token=page_token,\n preview=preview,\n where=where,\n ):\n pprint(dataset)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Dataset.jobs: %s\\n\" % e)" - } - ], - "v2.putDatasetSchema": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid\ndataset_rid = None\n# DatasetSchema | The schema that will be added.\nschema = {\n \"fieldSchemaList\": [\n {\n \"name\": \"id\",\n \"type\": \"LONG\",\n \"nullable\": False,\n \"customMetadata\": {\"description\": \"Primary key\"},\n },\n {\"name\": \"event_time\", \"type\": \"TIMESTAMP\", \"nullable\": False},\n {\"name\": \"price\", \"type\": \"DECIMAL\", \"precision\": 10, \"scale\": 2, \"nullable\": True},\n {\n \"name\": \"tags\",\n \"type\": \"ARRAY\",\n \"nullable\": True,\n \"arraySubtype\": {\"type\": \"STRING\", \"nullable\": False},\n },\n {\n \"name\": \"metrics\",\n \"type\": \"STRUCT\",\n \"nullable\": True,\n \"subSchemas\": [\n {\"name\": \"temperature\", \"type\": \"DOUBLE\", \"nullable\": True},\n {\"name\": \"humidity\", \"type\": \"DOUBLE\", \"nullable\": True},\n ],\n },\n ]\n}\n# Optional[BranchName]\nbranch_name = \"master\"\n# Optional[DataframeReader] | The dataframe reader used for reading the dataset schema. Defaults to PARQUET.\ndataframe_reader = \"PARQUET\"\n# Optional[TransactionRid] | The Resource Identifier (RID) of the end Transaction.\nend_transaction_rid = \"ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.datasets.Dataset.put_schema(\n dataset_rid,\n schema=schema,\n branch_name=branch_name,\n dataframe_reader=dataframe_reader,\n end_transaction_rid=end_transaction_rid,\n preview=preview,\n )\n print(\"The put_schema response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Dataset.put_schema: %s\\n\" % e)" - } - ], - "v2.readTableDataset": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid\ndataset_rid = None\n# TableExportFormat | The export format. Must be `ARROW` or `CSV`.\nformat = None\n# Optional[BranchName] | The name of the Branch.\nbranch_name = None\n# Optional[List[str]] | A subset of the dataset columns to include in the result. Defaults to all columns.\ncolumns = [\"id\", \"firstName\", \"lastName\"]\n# Optional[TransactionRid] | The Resource Identifier (RID) of the end Transaction.\nend_transaction_rid = None\n# Optional[int] | A limit on the number of rows to return. Note that row ordering is non-deterministic.\nrow_limit = None\n# Optional[TransactionRid] | The Resource Identifier (RID) of the start Transaction.\nstart_transaction_rid = None\n\n\ntry:\n api_response = client.datasets.Dataset.read_table(\n dataset_rid,\n format=format,\n branch_name=branch_name,\n columns=columns,\n end_transaction_rid=end_transaction_rid,\n row_limit=row_limit,\n start_transaction_rid=start_transaction_rid,\n )\n print(\"The read_table response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Dataset.read_table: %s\\n\" % e)" - } - ], - "v2.listTransactionsOfDataset": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid\ndataset_rid = None\n# Optional[PageSize] | The page size to use for the endpoint.\npage_size = None\n# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request.\npage_token = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n for dataset in client.datasets.Dataset.transactions(\n dataset_rid, page_size=page_size, page_token=page_token, preview=preview\n ):\n pprint(dataset)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Dataset.transactions: %s\\n\" % e)" - } - ], - "v2.getFileContent": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid\ndataset_rid = None\n# FilePath\nfile_path = None\n# Optional[BranchName] | The name of the Branch that contains the File. Defaults to `master` for most enrollments.\nbranch_name = None\n# Optional[TransactionRid] | The Resource Identifier (RID) of the end Transaction.\nend_transaction_rid = None\n# Optional[TransactionRid] | The Resource Identifier (RID) of the start Transaction.\nstart_transaction_rid = None\n\n\ntry:\n api_response = client.datasets.Dataset.File.content(\n dataset_rid,\n file_path,\n branch_name=branch_name,\n end_transaction_rid=end_transaction_rid,\n start_transaction_rid=start_transaction_rid,\n )\n print(\"The content response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling File.content: %s\\n\" % e)" - } - ], - "v2.deleteFile": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid\ndataset_rid = None\n# FilePath\nfile_path = None\n# Optional[BranchName] | The name of the Branch on which to delete the File. Defaults to `master` for most enrollments.\nbranch_name = None\n# Optional[TransactionRid] | The Resource Identifier (RID) of the open delete Transaction on which to delete the File.\ntransaction_rid = None\n\n\ntry:\n api_response = client.datasets.Dataset.File.delete(\n dataset_rid, file_path, branch_name=branch_name, transaction_rid=transaction_rid\n )\n print(\"The delete response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling File.delete: %s\\n\" % e)" - } - ], - "v2.getFile": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid\ndataset_rid = None\n# FilePath\nfile_path = None\n# Optional[BranchName] | The name of the Branch that contains the File. Defaults to `master` for most enrollments.\nbranch_name = None\n# Optional[TransactionRid] | The Resource Identifier (RID) of the end Transaction.\nend_transaction_rid = None\n# Optional[TransactionRid] | The Resource Identifier (RID) of the start Transaction.\nstart_transaction_rid = None\n\n\ntry:\n api_response = client.datasets.Dataset.File.get(\n dataset_rid,\n file_path,\n branch_name=branch_name,\n end_transaction_rid=end_transaction_rid,\n start_transaction_rid=start_transaction_rid,\n )\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling File.get: %s\\n\" % e)" - } - ], - "v2.listFiles": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid\ndataset_rid = None\n# Optional[BranchName] | The name of the Branch on which to list Files. Defaults to `master` for most enrollments.\nbranch_name = None\n# Optional[TransactionRid] | The Resource Identifier (RID) of the end Transaction.\nend_transaction_rid = None\n# Optional[PageSize] | The page size to use for the endpoint.\npage_size = None\n# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request.\npage_token = None\n# Optional[TransactionRid] | The Resource Identifier (RID) of the start Transaction.\nstart_transaction_rid = None\n\n\ntry:\n for file in client.datasets.Dataset.File.list(\n dataset_rid,\n branch_name=branch_name,\n end_transaction_rid=end_transaction_rid,\n page_size=page_size,\n page_token=page_token,\n start_transaction_rid=start_transaction_rid,\n ):\n pprint(file)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling File.list: %s\\n\" % e)" - } - ], - "v2.uploadFile": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid\ndataset_rid = None\n# FilePath\nfile_path = None\n# bytes | Body of the request\nbody = None\n# Optional[BranchName] | The name of the Branch on which to upload the File. Defaults to `master` for most enrollments.\nbranch_name = None\n# Optional[TransactionRid] | The Resource Identifier (RID) of the open Transaction on which to upload the File.\ntransaction_rid = None\n# Optional[TransactionType] | The type of the Transaction to create when using branchName. Defaults to `UPDATE`.\ntransaction_type = None\n\n\ntry:\n api_response = client.datasets.Dataset.File.upload(\n dataset_rid,\n file_path,\n body,\n branch_name=branch_name,\n transaction_rid=transaction_rid,\n transaction_type=transaction_type,\n )\n print(\"The upload response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling File.upload: %s\\n\" % e)" - } - ], - "v2.abortTransaction": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid\ndataset_rid = None\n# TransactionRid\ntransaction_rid = None\n\n\ntry:\n api_response = client.datasets.Dataset.Transaction.abort(dataset_rid, transaction_rid)\n print(\"The abort response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Transaction.abort: %s\\n\" % e)" - } - ], - "v2.buildTransaction": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid\ndataset_rid = None\n# TransactionRid\ntransaction_rid = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.datasets.Dataset.Transaction.build(\n dataset_rid, transaction_rid, preview=preview\n )\n print(\"The build response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Transaction.build: %s\\n\" % e)" - } - ], - "v2.commitTransaction": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid\ndataset_rid = None\n# TransactionRid\ntransaction_rid = None\n\n\ntry:\n api_response = client.datasets.Dataset.Transaction.commit(dataset_rid, transaction_rid)\n print(\"The commit response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Transaction.commit: %s\\n\" % e)" - } - ], - "v2.createTransaction": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid\ndataset_rid = None\n# TransactionType\ntransaction_type = \"APPEND\"\n# Optional[BranchName] | The name of the Branch on which to create the Transaction. Defaults to `master` for most enrollments.\nbranch_name = None\n\n\ntry:\n api_response = client.datasets.Dataset.Transaction.create(\n dataset_rid, transaction_type=transaction_type, branch_name=branch_name\n )\n print(\"The create response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Transaction.create: %s\\n\" % e)" - } - ], - "v2.getTransaction": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid\ndataset_rid = None\n# TransactionRid\ntransaction_rid = None\n\n\ntry:\n api_response = client.datasets.Dataset.Transaction.get(dataset_rid, transaction_rid)\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Transaction.get: %s\\n\" % e)" - } - ], - "v2.jobTransaction": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid\ndataset_rid = None\n# TransactionRid\ntransaction_rid = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.datasets.Dataset.Transaction.job(\n dataset_rid, transaction_rid, preview=preview\n )\n print(\"The job response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Transaction.job: %s\\n\" % e)" - } - ], - "v2.addBackingDatasets": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid | The rid of the View.\nview_dataset_rid = None\n# List[ViewBackingDataset]\nbacking_datasets = [\n {\n \"datasetRid\": \"ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da\",\n \"branch\": \"master\",\n }\n]\n# Optional[BranchName]\nbranch = \"master\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.datasets.View.add_backing_datasets(\n view_dataset_rid, backing_datasets=backing_datasets, branch=branch, preview=preview\n )\n print(\"The add_backing_datasets response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling View.add_backing_datasets: %s\\n\" % e)" - } - ], - "v2.addPrimaryKey": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid | The rid of the View.\nview_dataset_rid = None\n# ViewPrimaryKey\nprimary_key = {\n \"columns\": [\"colA\"],\n \"resolution\": {\n \"type\": \"duplicate\",\n \"deletionColumn\": \"deletionCol\",\n \"resolutionStrategy\": {\"type\": \"latestWins\", \"columns\": [\"colB\", \"colC\"]},\n },\n}\n# Optional[BranchName]\nbranch = \"master\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.datasets.View.add_primary_key(\n view_dataset_rid, primary_key=primary_key, branch=branch, preview=preview\n )\n print(\"The add_primary_key response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling View.add_primary_key: %s\\n\" % e)" - } - ], - "v2.createView": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# List[ViewBackingDataset]\nbacking_datasets = [\n {\n \"datasetRid\": \"ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da\",\n \"branch\": \"master\",\n }\n]\n# FolderRid\nparent_folder_rid = \"ri.compass.main.folder.c410f510-2937-420e-8ea3-8c9bcb3c1791\"\n# DatasetName\nview_name = \"My Dataset\"\n# Optional[BranchName] | The branch name of the View. If not specified, defaults to `master` for most enrollments.\nbranch = \"master\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n# Optional[ViewPrimaryKey]\nprimary_key = {\"columns\": [\"order_id\"]}\n\n\ntry:\n api_response = client.datasets.View.create(\n backing_datasets=backing_datasets,\n parent_folder_rid=parent_folder_rid,\n view_name=view_name,\n branch=branch,\n preview=preview,\n primary_key=primary_key,\n )\n print(\"The create response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling View.create: %s\\n\" % e)" - } - ], - "v2.getView": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid | The rid of the View.\nview_dataset_rid = None\n# Optional[BranchName]\nbranch = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.datasets.View.get(view_dataset_rid, branch=branch, preview=preview)\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling View.get: %s\\n\" % e)" - } - ], - "v2.removeBackingDatasets": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid | The rid of the View.\nview_dataset_rid = None\n# List[ViewBackingDataset]\nbacking_datasets = [\n {\n \"datasetRid\": \"ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da\",\n \"branch\": \"master\",\n }\n]\n# Optional[BranchName]\nbranch = \"master\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.datasets.View.remove_backing_datasets(\n view_dataset_rid, backing_datasets=backing_datasets, branch=branch, preview=preview\n )\n print(\"The remove_backing_datasets response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling View.remove_backing_datasets: %s\\n\" % e)" - } - ], - "v2.replaceBackingDatasets": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid | The rid of the View.\nview_dataset_rid = None\n# List[ViewBackingDataset]\nbacking_datasets = [\n {\n \"datasetRid\": \"ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da\",\n \"branch\": \"master\",\n }\n]\n# Optional[BranchName]\nbranch = \"master\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.datasets.View.replace_backing_datasets(\n view_dataset_rid, backing_datasets=backing_datasets, branch=branch, preview=preview\n )\n print(\"The replace_backing_datasets response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling View.replace_backing_datasets: %s\\n\" % e)" - } - ], - "v2.listChildrenOfFolder": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# FolderRid\nfolder_rid = \"ri.compass.main.folder.01a79a9d-e293-48db-a585-9ffe221536e8\"\n# Optional[PageSize] | The page size to use for the endpoint.\npage_size = None\n# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request.\npage_token = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n for folder in client.filesystem.Folder.children(\n folder_rid, page_size=page_size, page_token=page_token, preview=preview\n ):\n pprint(folder)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Folder.children: %s\\n\" % e)" - } - ], - "v2.createFolder": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ResourceDisplayName\ndisplay_name = \"My Folder\"\n# FolderRid | The parent folder Resource Identifier (RID). For Projects, this will be the Space RID and for Spaces, this value will be the root folder (`ri.compass.main.folder.0`).\nparent_folder_rid = \"ri.compass.main.folder.4cae7c13-b59f-48f6-9ef2-dbde603e4e33\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.filesystem.Folder.create(\n display_name=display_name, parent_folder_rid=parent_folder_rid, preview=preview\n )\n print(\"The create response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Folder.create: %s\\n\" % e)" - } - ], - "v2.getFolder": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# FolderRid\nfolder_rid = \"ri.compass.main.folder.01a79a9d-e293-48db-a585-9ffe221536e8\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.filesystem.Folder.get(folder_rid, preview=preview)\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Folder.get: %s\\n\" % e)" - } - ], - "v2.getFoldersBatch": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# List[GetFoldersBatchRequestElement] | Body of the request\nbody = [{\"folderRid\": \"ri.compass.main.folder.01a79a9d-e293-48db-a585-9ffe221536e8\"}]\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.filesystem.Folder.get_batch(body, preview=preview)\n print(\"The get_batch response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Folder.get_batch: %s\\n\" % e)" - } - ], - "v2.addOrganizations": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ProjectRid\nproject_rid = \"ri.compass.main.folder.01a79a9d-e293-48db-a585-9ffe221536e8\"\n# List[OrganizationRid]\norganization_rids = [\"ri.multipass..organization.c30ee6ad-b5e4-4afe-a74f-fe4a289f2faa\"]\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.filesystem.Project.add_organizations(\n project_rid, organization_rids=organization_rids, preview=preview\n )\n print(\"The add_organizations response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Project.add_organizations: %s\\n\" % e)" - } - ], - "v2.createProject": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# List[RoleId]\ndefault_roles = [\"8bf49052-dc37-4528-8bf0-b551cfb71268\"]\n# ResourceDisplayName\ndisplay_name = \"My Important Project\"\n# List[OrganizationRid]\norganization_rids = [\"ri.multipass..organization.c30ee6ad-b5e4-4afe-a74f-fe4a289f2faa\"]\n# Dict[RoleId, List[PrincipalWithId]]\nrole_grants = {\n \"8bf49052-dc37-4528-8bf0-b551cfb71268\": [\n {\"principalId\": \"f05f8da4-b84c-4fca-9c77-8af0b13d11de\", \"principalType\": \"GROUP\"}\n ]\n}\n# SpaceRid\nspace_rid = \"ri.compass.main.folder.a86ad5f5-3db5-48e4-9fdd-00aa3e5731ca\"\n# Optional[str]\ndescription = \"project description\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.filesystem.Project.create(\n default_roles=default_roles,\n display_name=display_name,\n organization_rids=organization_rids,\n role_grants=role_grants,\n space_rid=space_rid,\n description=description,\n preview=preview,\n )\n print(\"The create response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Project.create: %s\\n\" % e)" - } - ], - "v2.createProjectFromTemplate": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ProjectTemplateRid\ntemplate_rid = \"ri.compass.main.template.c410f510-2937-420e-8ea3-8c9bcb3c1791\"\n# Dict[ProjectTemplateVariableId, ProjectTemplateVariableValue]\nvariable_values = {\"name\": \"my project name\"}\n# Optional[List[RoleId]]\ndefault_roles = [\"8bf49052-dc37-4528-8bf0-b551cfb71268\"]\n# Optional[List[OrganizationRid]]\norganization_rids = [\"ri.multipass..organization.c30ee6ad-b5e4-4afe-a74f-fe4a289f2faa\"]\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n# Optional[str]\nproject_description = None\n\n\ntry:\n api_response = client.filesystem.Project.create_from_template(\n template_rid=template_rid,\n variable_values=variable_values,\n default_roles=default_roles,\n organization_rids=organization_rids,\n preview=preview,\n project_description=project_description,\n )\n print(\"The create_from_template response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Project.create_from_template: %s\\n\" % e)" - } - ], - "v2.getProject": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ProjectRid\nproject_rid = \"ri.compass.main.folder.01a79a9d-e293-48db-a585-9ffe221536e8\"\n\n\ntry:\n api_response = client.filesystem.Project.get(project_rid)\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Project.get: %s\\n\" % e)" - } - ], - "v2.listOrganizationsOfProject": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ProjectRid\nproject_rid = \"ri.compass.main.folder.01a79a9d-e293-48db-a585-9ffe221536e8\"\n# Optional[PageSize] | The page size to use for the endpoint.\npage_size = None\n# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request.\npage_token = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n for project in client.filesystem.Project.organizations(\n project_rid, page_size=page_size, page_token=page_token, preview=preview\n ):\n pprint(project)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Project.organizations: %s\\n\" % e)" - } - ], - "v2.removeOrganizations": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ProjectRid\nproject_rid = \"ri.compass.main.folder.01a79a9d-e293-48db-a585-9ffe221536e8\"\n# List[OrganizationRid]\norganization_rids = [\"ri.multipass..organization.c30ee6ad-b5e4-4afe-a74f-fe4a289f2faa\"]\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.filesystem.Project.remove_organizations(\n project_rid, organization_rids=organization_rids, preview=preview\n )\n print(\"The remove_organizations response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Project.remove_organizations: %s\\n\" % e)" - } - ], - "v2.replaceProject": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ProjectRid\nproject_rid = \"ri.compass.main.folder.01a79a9d-e293-48db-a585-9ffe221536e8\"\n# ResourceDisplayName | The display name of the Project. Must be unique and cannot contain a /\ndisplay_name = \"My Important Project\"\n# Optional[str] | The description associated with the Project.\ndescription = \"project description\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.filesystem.Project.replace(\n project_rid, display_name=display_name, description=description, preview=preview\n )\n print(\"The replace response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Project.replace: %s\\n\" % e)" - } - ], - "v2.addMarkings": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ResourceRid\nresource_rid = \"ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da\"\n# List[MarkingId]\nmarking_ids = [\"18212f9a-0e63-4b79-96a0-aae04df23336\"]\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.filesystem.Resource.add_markings(\n resource_rid, marking_ids=marking_ids, preview=preview\n )\n print(\"The add_markings response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Resource.add_markings: %s\\n\" % e)" - } - ], - "v2.deleteResource": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ResourceRid\nresource_rid = \"ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.filesystem.Resource.delete(resource_rid, preview=preview)\n print(\"The delete response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Resource.delete: %s\\n\" % e)" - } - ], - "v2.getResource": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ResourceRid\nresource_rid = \"ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.filesystem.Resource.get(resource_rid, preview=preview)\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Resource.get: %s\\n\" % e)" - } - ], - "v2.getAccessRequirements": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ResourceRid\nresource_rid = \"ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.filesystem.Resource.get_access_requirements(resource_rid, preview=preview)\n print(\"The get_access_requirements response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Resource.get_access_requirements: %s\\n\" % e)" - } - ], - "v2.getResourcesBatch": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# List[GetResourcesBatchRequestElement] | Body of the request\nbody = [{\"resourceRid\": \"ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da\"}]\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.filesystem.Resource.get_batch(body, preview=preview)\n print(\"The get_batch response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Resource.get_batch: %s\\n\" % e)" - } - ], - "v2.getByPath": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ResourcePath | The path to the Resource. The leading slash is optional.\npath = \"/My Organization-abcd/My Important Project/My Dataset\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.filesystem.Resource.get_by_path(path=path, preview=preview)\n print(\"The get_by_path response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Resource.get_by_path: %s\\n\" % e)" - } - ], - "v2.getByPathResourcesBatch": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# List[GetByPathResourcesBatchRequestElement] | Body of the request\nbody = [{\"path\": \"/My Organization-abcd/My Important Project/My Dataset\"}]\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.filesystem.Resource.get_by_path_batch(body, preview=preview)\n print(\"The get_by_path_batch response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Resource.get_by_path_batch: %s\\n\" % e)" - } - ], - "v2.listMarkingsOfResource": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ResourceRid\nresource_rid = \"ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da\"\n# Optional[PageSize] | The page size to use for the endpoint.\npage_size = None\n# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request.\npage_token = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n for resource in client.filesystem.Resource.markings(\n resource_rid, page_size=page_size, page_token=page_token, preview=preview\n ):\n pprint(resource)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Resource.markings: %s\\n\" % e)" - } - ], - "v2.permanentlyDeleteResource": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ResourceRid\nresource_rid = \"ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.filesystem.Resource.permanently_delete(resource_rid, preview=preview)\n print(\"The permanently_delete response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Resource.permanently_delete: %s\\n\" % e)" - } - ], - "v2.removeMarkings": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ResourceRid\nresource_rid = \"ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da\"\n# List[MarkingId]\nmarking_ids = [\"18212f9a-0e63-4b79-96a0-aae04df23336\"]\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.filesystem.Resource.remove_markings(\n resource_rid, marking_ids=marking_ids, preview=preview\n )\n print(\"The remove_markings response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Resource.remove_markings: %s\\n\" % e)" - } - ], - "v2.restoreResource": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ResourceRid\nresource_rid = \"ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.filesystem.Resource.restore(resource_rid, preview=preview)\n print(\"The restore response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Resource.restore: %s\\n\" % e)" - } - ], - "v2.addResourceRoles": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ResourceRid\nresource_rid = \"ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da\"\n# List[ResourceRoleIdentifier]\nroles = [\n {\n \"resourceRolePrincipal\": {\n \"type\": \"principalIdOnly\",\n \"principalId\": \"f05f8da4-b84c-4fca-9c77-8af0b13d11de\",\n },\n \"roleId\": \"8bf49052-dc37-4528-8bf0-b551cfb71268\",\n }\n]\n\n\ntry:\n api_response = client.filesystem.Resource.Role.add(resource_rid, roles=roles)\n print(\"The add response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Role.add: %s\\n\" % e)" - } - ], - "v2.listResourceRoles": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ResourceRid\nresource_rid = \"ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da\"\n# Optional[bool] | Whether to include inherited roles on the resource.\ninclude_inherited = None\n# Optional[PageSize] | The page size to use for the endpoint.\npage_size = None\n# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request.\npage_token = None\n\n\ntry:\n for resource_role in client.filesystem.Resource.Role.list(\n resource_rid,\n include_inherited=include_inherited,\n page_size=page_size,\n page_token=page_token,\n ):\n pprint(resource_role)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Role.list: %s\\n\" % e)" - } - ], - "v2.removeResourceRoles": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ResourceRid\nresource_rid = \"ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da\"\n# List[ResourceRoleIdentifier]\nroles = [\n {\n \"resourceRolePrincipal\": {\n \"type\": \"principalIdOnly\",\n \"principalId\": \"f05f8da4-b84c-4fca-9c77-8af0b13d11de\",\n },\n \"roleId\": \"8bf49052-dc37-4528-8bf0-b551cfb71268\",\n }\n]\n\n\ntry:\n api_response = client.filesystem.Resource.Role.remove(resource_rid, roles=roles)\n print(\"The remove response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Role.remove: %s\\n\" % e)" - } - ], - "v2.createSpace": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# List[OrganizationRid] | By default, this Space will use a Last Out deletion policy, meaning that this Space and its projects will be deleted when the last Organization listed here is deleted. Only Organizations in the Space's Enrollment can be included here.\ndeletion_policy_organizations = [\"ri.multipass..organization.c30ee6ad-b5e4-4afe-a74f-fe4a289f2faa\"]\n# ResourceDisplayName\ndisplay_name = \"My Space\"\n# EnrollmentRid | The RID of the Enrollment that this Space belongs to.\nenrollment_rid = \"ri.control-panel.main.customer.466f812b-f974-4478-9d4f-90402cd3def6\"\n# List[OrganizationRid] | The list of Organizations that are provisioned access to this Space. In order to access this Space, a user must be a member of at least one of these Organizations.\norganizations = [\"ri.multipass..organization.c30ee6ad-b5e4-4afe-a74f-fe4a289f2faa\"]\n# Optional[RoleSetId] | The ID of the default Role Set for this Space, which defines the set of roles that Projects in this Space must use. If not provided, the default Role Set for Projects will be used.\ndefault_role_set_id = \"3181190f-f6b8-4649-90ec-64fa2d847204\"\n# Optional[str] | The description of the Space.\ndescription = \"This space is for xyz\"\n# Optional[FileSystemId] | The ID of the Filesystem for this Space, which is where the contents of the Space are stored. If not provided, the default Filesystem for this Enrollment will be used.\nfile_system_id = \"hdfs\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n# Optional[UsageAccountRid] | The RID of the Usage Account for this Space. Resource usage for projects in this space will accrue to this Usage Account by default. If not provided, the default Usage Account for this Enrollment will be used.\nusage_account_rid = (\n \"ri.resource-policy-manager.global.usage-account.0c91194d-b5e3-4c4f-b96f-7a7f3f50e95c\"\n)\n\n\ntry:\n api_response = client.filesystem.Space.create(\n deletion_policy_organizations=deletion_policy_organizations,\n display_name=display_name,\n enrollment_rid=enrollment_rid,\n organizations=organizations,\n default_role_set_id=default_role_set_id,\n description=description,\n file_system_id=file_system_id,\n preview=preview,\n usage_account_rid=usage_account_rid,\n )\n print(\"The create response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Space.create: %s\\n\" % e)" - } - ], - "v2.deleteSpace": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# SpaceRid\nspace_rid = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.filesystem.Space.delete(space_rid, preview=preview)\n print(\"The delete response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Space.delete: %s\\n\" % e)" - } - ], - "v2.getSpace": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# SpaceRid\nspace_rid = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.filesystem.Space.get(space_rid, preview=preview)\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Space.get: %s\\n\" % e)" - } - ], - "v2.listSpaces": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# Optional[PageSize] | The page size to use for the endpoint.\npage_size = None\n# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request.\npage_token = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n for space in client.filesystem.Space.list(\n page_size=page_size, page_token=page_token, preview=preview\n ):\n pprint(space)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Space.list: %s\\n\" % e)" - } - ], - "v2.replaceSpace": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# SpaceRid\nspace_rid = None\n# ResourceDisplayName\ndisplay_name = \"My Space\"\n# Optional[RoleSetId] | The ID of the default Role Set for this Space, which defines the set of roles that Projects in this Space must use. If not provided, the default Role Set for Projects will be used.\ndefault_role_set_id = \"3181190f-f6b8-4649-90ec-64fa2d847204\"\n# Optional[str] | The description of the Space.\ndescription = \"This space is for xyz\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n# Optional[UsageAccountRid] | The RID of the Usage Account for this Space. Resource usage for projects in this space will accrue to this Usage Account by default. If not provided, the default Usage Account for this Enrollment will be used.\nusage_account_rid = (\n \"ri.resource-policy-manager.global.usage-account.0c91194d-b5e3-4c4f-b96f-7a7f3f50e95c\"\n)\n\n\ntry:\n api_response = client.filesystem.Space.replace(\n space_rid,\n display_name=display_name,\n default_role_set_id=default_role_set_id,\n description=description,\n preview=preview,\n usage_account_rid=usage_account_rid,\n )\n print(\"The replace response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Space.replace: %s\\n\" % e)" - } - ], - "v2.executeQuery": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# QueryApiName\nquery_api_name = None\n# Dict[ParameterId, Optional[DataValue]]\nparameters = None\n# Optional[Attribution]\nattribution = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n# Optional[TraceParent]\ntrace_parent = None\n# Optional[TraceState]\ntrace_state = None\n# Optional[TransactionId] | The ID of a transaction to read from. Transactions are an experimental feature and all workflows may not be supported.\ntransaction_id = None\n# Optional[FunctionVersion]\nversion = None\n\n\ntry:\n api_response = client.functions.Query.execute(\n query_api_name,\n parameters=parameters,\n attribution=attribution,\n preview=preview,\n trace_parent=trace_parent,\n trace_state=trace_state,\n transaction_id=transaction_id,\n version=version,\n )\n print(\"The execute response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Query.execute: %s\\n\" % e)" - } - ], - "v2.getQuery": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# QueryApiName\nquery_api_name = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n# Optional[FunctionVersion]\nversion = None\n\n\ntry:\n api_response = client.functions.Query.get(query_api_name, preview=preview, version=version)\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Query.get: %s\\n\" % e)" - } - ], - "v2.getByRidQueries": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# FunctionRid\nrid = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n# Optional[FunctionVersion]\nversion = None\n\n\ntry:\n api_response = client.functions.Query.get_by_rid(rid=rid, preview=preview, version=version)\n print(\"The get_by_rid response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Query.get_by_rid: %s\\n\" % e)" - } - ], - "v2.streamingExecuteQuery": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# QueryApiName\nquery_api_name = None\n# Dict[ParameterId, Optional[DataValue]]\nparameters = None\n# Optional[Attribution]\nattribution = None\n# Optional[OntologyIdentifier] | Optional ontology identifier (RID or API name). When provided, executes an ontology-scoped function. When omitted, executes a global function.\nontology = \"example-ontology\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n# Optional[TraceParent]\ntrace_parent = None\n# Optional[TraceState]\ntrace_state = None\n# Optional[TransactionId] | The ID of a transaction to read from. Transactions are an experimental feature and all workflows may not be supported.\ntransaction_id = None\n# Optional[FunctionVersion]\nversion = None\n\n\ntry:\n api_response = client.functions.Query.streaming_execute(\n query_api_name,\n parameters=parameters,\n attribution=attribution,\n ontology=ontology,\n preview=preview,\n trace_parent=trace_parent,\n trace_state=trace_state,\n transaction_id=transaction_id,\n version=version,\n )\n print(\"The streaming_execute response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Query.streaming_execute: %s\\n\" % e)" - } - ], - "v2.getValueType": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ValueTypeRid\nvalue_type_rid = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.functions.ValueType.get(value_type_rid, preview=preview)\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling ValueType.get: %s\\n\" % e)" - } - ], - "v2.getVersionId": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ValueTypeRid\nvalue_type_rid = None\n# ValueTypeVersionId\nversion_id_version_id = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.functions.ValueType.VersionId.get(\n value_type_rid, version_id_version_id, preview=preview\n )\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling VersionId.get: %s\\n\" % e)" - } - ], - "v2.anthropicMessages": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# LanguageModelApiName\nanthropic_model_model_id = None\n# int | The maximum number of tokens to generate before stopping.\nmax_tokens = None\n# List[AnthropicMessage] | Input messages to the model. This can include a single user-role message or multiple messages with alternating user and assistant roles.\nmessages = [{\"role\": \"USER\"}]\n# Optional[Attribution]\nattribution = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n# Optional[List[str]] | Custom text sequences that will cause the model to stop generating.\nstop_sequences = None\n# Optional[List[AnthropicSystemMessage]] | A system prompt is a way of providing context and instructions to Claude, such as specifying a particular goal or role. As of now, sending multiple system prompts is not supported.\nsystem = None\n# Optional[float] | Amount of randomness injected into the response. Ranges from 0.0 to 1.0. Note that even with temperature of 0.0, the results will not be fully deterministic. Defaults to 1.0\ntemperature = None\n# Optional[AnthropicThinkingConfig] | Configuration for enabling Claude's extended thinking.\nthinking = None\n# Optional[AnthropicToolChoice] | How the model should use the provided tools.\ntool_choice = None\n# Optional[List[AnthropicTool]] | Definitions of tools that the model may use.\ntools = None\n# Optional[int] | Only sample from the top K options for each subsequent token.\ntop_k = None\n# Optional[float] | Use nucleus sampling. You should either alter temperature or top_p, but not both\ntop_p = None\n\n\ntry:\n api_response = client.language_models.AnthropicModel.messages(\n anthropic_model_model_id,\n max_tokens=max_tokens,\n messages=messages,\n attribution=attribution,\n preview=preview,\n stop_sequences=stop_sequences,\n system=system,\n temperature=temperature,\n thinking=thinking,\n tool_choice=tool_choice,\n tools=tools,\n top_k=top_k,\n top_p=top_p,\n )\n print(\"The messages response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling AnthropicModel.messages: %s\\n\" % e)" - } - ], - "v2.openAiEmbeddings": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# LanguageModelApiName\nopen_ai_model_model_id = None\n# OpenAiEmbeddingInput | Input text to embed, encoded as an array of strings. Each input must not exceed the max input tokens for the model (8192 tokens for all embedding models).\ninput = None\n# Optional[Attribution]\nattribution = None\n# Optional[int] | The number of dimensions the resulting output embeddings should have. Only supported in text-embedding-3 and later models.\ndimensions = None\n# Optional[OpenAiEncodingFormat] | The format to return the embeddings in. Can be either float or base64.\nencoding_format = \"FLOAT\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.language_models.OpenAiModel.embeddings(\n open_ai_model_model_id,\n input=input,\n attribution=attribution,\n dimensions=dimensions,\n encoding_format=encoding_format,\n preview=preview,\n )\n print(\"The embeddings response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling OpenAiModel.embeddings: %s\\n\" % e)" - } - ], - "v2.abortMediaTransaction": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# MediaSetRid\nmedia_set_rid = None\n# TransactionId\ntransaction_id = None\n# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode.\npreview = None\n\n\ntry:\n api_response = client.media_sets.MediaSet.abort(media_set_rid, transaction_id, preview=preview)\n print(\"The abort response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling MediaSet.abort: %s\\n\" % e)" - } - ], - "v2.calculateImageMediaItemThumbnail": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# MediaSetRid | The RID of the media set.\nmedia_set_rid = None\n# MediaItemRid | The RID of the media item.\nmedia_item_rid = None\n# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode.\npreview = None\n# Optional[MediaItemReadToken]\nread_token = None\n\n\ntry:\n api_response = client.media_sets.MediaSet.calculate(\n media_set_rid, media_item_rid, preview=preview, read_token=read_token\n )\n print(\"The calculate response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling MediaSet.calculate: %s\\n\" % e)" - } - ], - "v2.commitMediaTransaction": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# MediaSetRid\nmedia_set_rid = None\n# TransactionId\ntransaction_id = None\n# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode.\npreview = None\n\n\ntry:\n api_response = client.media_sets.MediaSet.commit(media_set_rid, transaction_id, preview=preview)\n print(\"The commit response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling MediaSet.commit: %s\\n\" % e)" - } - ], - "v2.createMediaTransaction": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# MediaSetRid\nmedia_set_rid = None\n# Optional[BranchName] | The branch on which to open the transaction. Defaults to `master` for most enrollments.\nbranch_name = None\n# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode.\npreview = None\n\n\ntry:\n api_response = client.media_sets.MediaSet.create(\n media_set_rid, branch_name=branch_name, preview=preview\n )\n print(\"The create response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling MediaSet.create: %s\\n\" % e)" - } - ], - "v2.getMediaItemRidByPath": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# MediaSetRid | The RID of the media set.\nmedia_set_rid = None\n# MediaItemPath | The path of the media item.\nmedia_item_path = None\n# Optional[BranchName] | Specifies the specific branch by name in which to search for this media item. May not be provided if branch rid or view rid are provided.\nbranch_name = None\n# Optional[BranchRid] | Specifies the specific branch by rid in which to search for this media item. May not be provided if branch name or view rid are provided.\nbranch_rid = None\n# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode.\npreview = None\n# Optional[MediaSetViewRid] | Specifies the specific view by rid in which to search for this media item. May not be provided if branch name or branch rid are provided.\nview_rid = None\n\n\ntry:\n api_response = client.media_sets.MediaSet.get_rid_by_path(\n media_set_rid,\n media_item_path=media_item_path,\n branch_name=branch_name,\n branch_rid=branch_rid,\n preview=preview,\n view_rid=view_rid,\n )\n print(\"The get_rid_by_path response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling MediaSet.get_rid_by_path: %s\\n\" % e)" - } - ], - "v2.getMediaItemInfo": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# MediaSetRid | The RID of the media set.\nmedia_set_rid = None\n# MediaItemRid | The RID of the media item.\nmedia_item_rid = None\n# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode.\npreview = None\n# Optional[MediaItemReadToken]\nread_token = None\n\n\ntry:\n api_response = client.media_sets.MediaSet.info(\n media_set_rid, media_item_rid, preview=preview, read_token=read_token\n )\n print(\"The info response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling MediaSet.info: %s\\n\" % e)" - } - ], - "v2.readMediaItem": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# MediaSetRid\nmedia_set_rid = None\n# MediaItemRid\nmedia_item_rid = None\n# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode.\npreview = None\n# Optional[MediaItemReadToken]\nread_token = None\n\n\ntry:\n api_response = client.media_sets.MediaSet.read(\n media_set_rid, media_item_rid, preview=preview, read_token=read_token\n )\n print(\"The read response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling MediaSet.read: %s\\n\" % e)" - } - ], - "v2.readOriginalMediaItem": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# MediaSetRid\nmedia_set_rid = None\n# MediaItemRid\nmedia_item_rid = None\n# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode.\npreview = None\n# Optional[MediaItemReadToken]\nread_token = None\n\n\ntry:\n api_response = client.media_sets.MediaSet.read_original(\n media_set_rid, media_item_rid, preview=preview, read_token=read_token\n )\n print(\"The read_original response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling MediaSet.read_original: %s\\n\" % e)" - } - ], - "v2.getMediaItemReference": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# MediaSetRid | The RID of the media set.\nmedia_set_rid = None\n# MediaItemRid | The RID of the media item.\nmedia_item_rid = None\n# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode.\npreview = None\n# Optional[MediaItemReadToken]\nread_token = None\n\n\ntry:\n api_response = client.media_sets.MediaSet.reference(\n media_set_rid, media_item_rid, preview=preview, read_token=read_token\n )\n print(\"The reference response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling MediaSet.reference: %s\\n\" % e)" - } - ], - "v2.retrieveImageMediaItemThumbnail": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# MediaSetRid | The RID of the media set.\nmedia_set_rid = None\n# MediaItemRid | The RID of the media item.\nmedia_item_rid = None\n# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode.\npreview = None\n# Optional[MediaItemReadToken]\nread_token = None\n\n\ntry:\n api_response = client.media_sets.MediaSet.retrieve(\n media_set_rid, media_item_rid, preview=preview, read_token=read_token\n )\n print(\"The retrieve response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling MediaSet.retrieve: %s\\n\" % e)" - } - ], - "v2.putMediaItem": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# MediaSetRid\nmedia_set_rid = None\n# bytes | Body of the request\nbody = None\n# Optional[BranchName] | Specifies the specific branch by name to which this media item will be uploaded. May not be provided if branch rid or view rid are provided.\nbranch_name = None\n# Optional[BranchRid] | Specifies the specific branch by rid to which this media item will be uploaded. May not be provided if branch name or view rid are provided.\nbranch_rid = None\n# Optional[MediaItemPath] | An identifier for a media item within a media set. Necessary if the backing media set requires paths.\nmedia_item_path = \"q3-data%2fmy-file.png\"\n# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode.\npreview = None\n# Optional[TransactionId] | The id of the transaction associated with this request. Required if this is a transactional media set.\ntransaction_id = None\n# Optional[MediaSetViewRid] | Specifies the specific view by rid to which this media item will be uploaded. May not be provided if branch name or branch rid are provided.\nview_rid = None\n\n\ntry:\n api_response = client.media_sets.MediaSet.upload(\n media_set_rid,\n body,\n branch_name=branch_name,\n branch_rid=branch_rid,\n media_item_path=media_item_path,\n preview=preview,\n transaction_id=transaction_id,\n view_rid=view_rid,\n )\n print(\"The upload response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling MediaSet.upload: %s\\n\" % e)" - } - ], - "v2.uploadMedia": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# bytes | Body of the request\nbody = None\n# MediaItemPath | The path to write the media item to. Required if the backing media set requires paths.\nfilename = \"my-file.png\"\n# Optional[Attribution] | used for passing through usage attribution\nattribution = None\n# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode.\npreview = None\n\n\ntry:\n api_response = client.media_sets.MediaSet.upload_media(\n body, filename=filename, attribution=attribution, preview=preview\n )\n print(\"The upload_media response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling MediaSet.upload_media: %s\\n\" % e)" - } - ], - "v2.createModel": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ModelName\nname = \"House Pricing Model\"\n# FolderRid\nparent_folder_rid = \"ri.compass.main.folder.c410f510-2937-420e-8ea3-8c9bcb3c1791\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.models.Model.create(\n name=name, parent_folder_rid=parent_folder_rid, preview=preview\n )\n print(\"The create response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Model.create: %s\\n\" % e)" - } - ], - "v2.getModel": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ModelRid\nmodel_rid = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.models.Model.get(model_rid, preview=preview)\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Model.get: %s\\n\" % e)" - } - ], - "v2.createModelVersion": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ModelRid\nmodel_rid = None\n# List[RID]\nbacking_repositories = None\n# List[str]\nconda_requirements = None\n# ModelApi\nmodel_api = {\n \"inputs\": [\n {\n \"name\": \"input_df\",\n \"required\": True,\n \"type\": \"tabular\",\n \"columns\": [\n {\"name\": \"feature_1\", \"required\": True, \"dataType\": {\"type\": \"double\"}},\n {\"name\": \"feature_2\", \"required\": True, \"dataType\": {\"type\": \"integer\"}},\n ],\n \"format\": \"PANDAS\",\n }\n ],\n \"outputs\": [\n {\n \"name\": \"output_df\",\n \"required\": True,\n \"type\": \"tabular\",\n \"columns\": [{\"name\": \"prediction\", \"required\": True, \"dataType\": {\"type\": \"double\"}}],\n \"format\": \"SPARK\",\n }\n ],\n}\n# ModelFiles\nmodel_files = {\n \"type\": \"dill\",\n \"serializedModelFunction\": \"base64-encoded string for a dill-serialize model function\",\n}\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.models.Model.Version.create(\n model_rid,\n backing_repositories=backing_repositories,\n conda_requirements=conda_requirements,\n model_api=model_api,\n model_files=model_files,\n preview=preview,\n )\n print(\"The create response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Version.create: %s\\n\" % e)" - } - ], - "v2.getModelVersion": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ModelRid\nmodel_rid = None\n# ModelVersionRid\nmodel_version_rid = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.models.Model.Version.get(model_rid, model_version_rid, preview=preview)\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Version.get: %s\\n\" % e)" - } - ], - "v2.listModelVersions": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ModelRid\nmodel_rid = None\n# Optional[PageSize] | The page size to use for the endpoint.\npage_size = None\n# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request.\npage_token = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n for model_version in client.models.Model.Version.list(\n model_rid, page_size=page_size, page_token=page_token, preview=preview\n ):\n pprint(model_version)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Version.list: %s\\n\" % e)" - } - ], - "v2.applyActionV2": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# ActionTypeApiName | The API name of the action to apply. To find the API name for your action, use the **List action types** endpoint or check the **Ontology Manager**.\naction = \"rename-employee\"\n# Dict[ParameterId, Optional[DataValue]]\nparameters = {\"id\": 80060, \"newName\": \"Anna Smith-Doe\"}\n# Optional[FoundryBranch] | The Foundry branch to apply the action against. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported.\nbranch = None\n# Optional[ApplyActionRequestOptions]\noptions = None\n# Optional[SdkPackageRid] | The package rid of the generated SDK.\nsdk_package_rid = None\n# Optional[SdkVersion] | The version of the generated SDK.\nsdk_version = None\n\n\ntry:\n api_response = client.ontologies.Action.apply(\n ontology,\n action,\n parameters=parameters,\n branch=branch,\n options=options,\n sdk_package_rid=sdk_package_rid,\n sdk_version=sdk_version,\n )\n print(\"The apply response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Action.apply: %s\\n\" % e)" - } - ], - "v2.applyActionBatchV2": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# ActionTypeApiName | The API name of the action to apply. To find the API name for your action, use the **List action types** endpoint or check the **Ontology Manager**.\naction = \"rename-employee\"\n# List[BatchApplyActionRequestItem]\nrequests = [\n {\"parameters\": {\"id\": 80060, \"newName\": \"Anna Smith-Doe\"}},\n {\"parameters\": {\"id\": 80061, \"newName\": \"Joe Bloggs\"}},\n]\n# Optional[FoundryBranch] | The Foundry branch to apply the action against. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported.\nbranch = None\n# Optional[BatchApplyActionRequestOptions]\noptions = None\n# Optional[SdkPackageRid] | The package rid of the generated SDK.\nsdk_package_rid = None\n# Optional[SdkVersion] | The version of the generated SDK.\nsdk_version = None\n\n\ntry:\n api_response = client.ontologies.Action.apply_batch(\n ontology,\n action,\n requests=requests,\n branch=branch,\n options=options,\n sdk_package_rid=sdk_package_rid,\n sdk_version=sdk_version,\n )\n print(\"The apply_batch response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Action.apply_batch: %s\\n\" % e)" - } - ], - "v2.applyActionWithOverrides": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# ActionTypeApiName | The API name of the action to apply. To find the API name for your action, use the **List action types** endpoint or check the **Ontology Manager**.\naction = \"rename-employee\"\n# ApplyActionOverrides\noverrides = {\n \"uniqueIdentifierLinkIdValues\": {\n \"fd28fa5c-3028-4eca-bdc8-3be2c7949cd9\": \"4efdb11f-c1e3-417c-89fb-2225118b65e3\"\n },\n \"actionExecutionTime\": \"2025-10-25T13:00:00Z\",\n}\n# ApplyActionRequestV2\nrequest = {\"parameters\": {\"id\": 80060, \"newName\": \"Anna Smith-Doe\"}}\n# Optional[FoundryBranch] | The Foundry branch to apply the action against. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported.\nbranch = None\n# Optional[SdkPackageRid] | The package rid of the generated SDK.\nsdk_package_rid = None\n# Optional[SdkVersion] | The version of the generated SDK.\nsdk_version = None\n\n\ntry:\n api_response = client.ontologies.Action.apply_with_overrides(\n ontology,\n action,\n overrides=overrides,\n request=request,\n branch=branch,\n sdk_package_rid=sdk_package_rid,\n sdk_version=sdk_version,\n )\n print(\"The apply_with_overrides response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Action.apply_with_overrides: %s\\n\" % e)" - } - ], - "v2.getActionTypeV2": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# ActionTypeApiName | The name of the action type in the API.\naction_type = \"promote-employee\"\n# Optional[FoundryBranch] | The Foundry branch to load the action type definition from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported.\nbranch = None\n\n\ntry:\n api_response = client.ontologies.Ontology.ActionType.get(ontology, action_type, branch=branch)\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling ActionType.get: %s\\n\" % e)" - } - ], - "v2.getActionTypeByRid": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# ActionTypeRid | The RID of the action type.\naction_type_rid = \"ri.ontology.main.action-type.7ed72754-7491-428a-bb18-4d7296eb2167\"\n# Optional[FoundryBranch] | The Foundry branch to load the action type definition from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported.\nbranch = None\n\n\ntry:\n api_response = client.ontologies.Ontology.ActionType.get_by_rid(\n ontology, action_type_rid, branch=branch\n )\n print(\"The get_by_rid response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling ActionType.get_by_rid: %s\\n\" % e)" - } - ], - "v2.listActionTypesV2": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# Optional[FoundryBranch] | The Foundry branch to list the action types from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported.\nbranch = None\n# Optional[PageSize] | The desired size of the page to be returned. Defaults to 500. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details.\npage_size = None\n# Optional[PageToken]\npage_token = None\n\n\ntry:\n for action_type in client.ontologies.Ontology.ActionType.list(\n ontology, branch=branch, page_size=page_size, page_token=page_token\n ):\n pprint(action_type)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling ActionType.list: %s\\n\" % e)" - } - ], - "v2.getActionTypeFullMetadata": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier | The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**.\nontology = \"palantir\"\n# ActionTypeApiName | The name of the action type in the API.\naction_type = \"promote-employee\"\n# Optional[FoundryBranch] | The Foundry branch to load the action type definition from. If not specified, the default branch will be used.\nbranch = None\n\n\ntry:\n api_response = client.ontologies.ActionTypeFullMetadata.get(\n ontology, action_type, branch=branch\n )\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling ActionTypeFullMetadata.get: %s\\n\" % e)" - } - ], - "v2.listActionTypesFullMetadata": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# Optional[FoundryBranch] | The Foundry branch to list the action types from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported.\nbranch = None\n# Optional[PageSize] | The desired size of the page to be returned. Defaults to 500. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details.\npage_size = None\n# Optional[PageToken]\npage_token = None\n\n\ntry:\n for action_type_full_metadata in client.ontologies.ActionTypeFullMetadata.list(\n ontology, branch=branch, page_size=page_size, page_token=page_token\n ):\n pprint(action_type_full_metadata)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling ActionTypeFullMetadata.list: %s\\n\" % e)" - } - ], - "v2.getAttachmentV2": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# AttachmentRid | The RID of the attachment.\nattachment_rid = \"ri.attachments.main.attachment.bb32154e-e043-4b00-9461-93136ca96b6f\"\n\n\ntry:\n api_response = client.ontologies.Attachment.get(attachment_rid)\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Attachment.get: %s\\n\" % e)" - } - ], - "v2.getAttachmentContentV2": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# AttachmentRid | The RID of the attachment.\nattachment_rid = \"ri.attachments.main.attachment.bb32154e-e043-4b00-9461-93136ca96b6f\"\n\n\ntry:\n api_response = client.ontologies.Attachment.read(attachment_rid)\n print(\"The read response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Attachment.read: %s\\n\" % e)" - } - ], - "v2.uploadAttachmentV2": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# bytes | Body of the request\nbody = None\n# ContentLength | The size in bytes of the file content being uploaded.\ncontent_length = None\n# ContentType | The media type of the file being uploaded.\ncontent_type = None\n# Filename | The name of the file being uploaded.\nfilename = \"My Image.jpeg\"\n\n\ntry:\n api_response = client.ontologies.Attachment.upload(\n body, content_length=content_length, content_type=content_type, filename=filename\n )\n print(\"The upload response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Attachment.upload: %s\\n\" % e)" - } - ], - "v2.uploadAttachmentWithRid": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# AttachmentRid | The `AttachmentRid` of the attachment being uploaded.\nattachment_rid = \"ri.attachments.main.attachment.bb32154e-e043-4b00-9461-93136ca96b6f\"\n# bytes | Body of the request\nbody = None\n# ContentLength | The size in bytes of the file content being uploaded.\ncontent_length = None\n# ContentType | The media type of the file being uploaded.\ncontent_type = None\n# Filename | The name of the file being uploaded.\nfilename = \"My Image.jpeg\"\n# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode.\npreview = None\n\n\ntry:\n api_response = client.ontologies.Attachment.upload_with_rid(\n attachment_rid,\n body,\n content_length=content_length,\n content_type=content_type,\n filename=filename,\n preview=preview,\n )\n print(\"The upload_with_rid response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Attachment.upload_with_rid: %s\\n\" % e)" - } - ], - "v2.listPropertyAttachments": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**.\nobject_type = \"employee\"\n# PropertyValueEscapedString | The primary key of the object containing the attachment.\nprimary_key = 50030\n# PropertyApiName | The API name of the attachment property. To find the API name for your attachment, check the **Ontology Manager** or use the **Get object type** endpoint.\nproperty = \"performance\"\n# Optional[SdkPackageRid] | The package rid of the generated SDK.\nsdk_package_rid = None\n# Optional[SdkVersion] | The version of the generated SDK.\nsdk_version = None\n\n\ntry:\n api_response = client.ontologies.AttachmentProperty.get_attachment(\n ontology,\n object_type,\n primary_key,\n property,\n sdk_package_rid=sdk_package_rid,\n sdk_version=sdk_version,\n )\n print(\"The get_attachment response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling AttachmentProperty.get_attachment: %s\\n\" % e)" - } - ], - "v2.getAttachmentPropertyByRidV2": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**.\nobject_type = \"employee\"\n# PropertyValueEscapedString | The primary key of the object containing the attachment.\nprimary_key = 50030\n# PropertyApiName | The API name of the attachment property. To find the API name for your attachment, check the **Ontology Manager** or use the **Get object type** endpoint.\nproperty = \"performance\"\n# AttachmentRid | The RID of the attachment.\nattachment_rid = \"ri.attachments.main.attachment.bb32154e-e043-4b00-9461-93136ca96b6f\"\n# Optional[SdkPackageRid] | The package rid of the generated SDK.\nsdk_package_rid = None\n# Optional[SdkVersion] | The version of the generated SDK.\nsdk_version = None\n\n\ntry:\n api_response = client.ontologies.AttachmentProperty.get_attachment_by_rid(\n ontology,\n object_type,\n primary_key,\n property,\n attachment_rid,\n sdk_package_rid=sdk_package_rid,\n sdk_version=sdk_version,\n )\n print(\"The get_attachment_by_rid response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling AttachmentProperty.get_attachment_by_rid: %s\\n\" % e)" - } - ], - "v2.getAttachmentPropertyContentV2": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**.\nobject_type = \"employee\"\n# PropertyValueEscapedString | The primary key of the object containing the attachment.\nprimary_key = 50030\n# PropertyApiName | The API name of the attachment property. To find the API name for your attachment, check the **Ontology Manager** or use the **Get object type** endpoint.\nproperty = \"performance\"\n# Optional[SdkPackageRid] | The package rid of the generated SDK.\nsdk_package_rid = None\n# Optional[SdkVersion] | The version of the generated SDK.\nsdk_version = None\n\n\ntry:\n api_response = client.ontologies.AttachmentProperty.read_attachment(\n ontology,\n object_type,\n primary_key,\n property,\n sdk_package_rid=sdk_package_rid,\n sdk_version=sdk_version,\n )\n print(\"The read_attachment response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling AttachmentProperty.read_attachment: %s\\n\" % e)" - } - ], - "v2.getAttachmentPropertyContentByRidV2": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**.\nobject_type = \"employee\"\n# PropertyValueEscapedString | The primary key of the object containing the attachment.\nprimary_key = 50030\n# PropertyApiName | The API name of the attachment property. To find the API name for your attachment, check the **Ontology Manager** or use the **Get object type** endpoint.\nproperty = \"performance\"\n# AttachmentRid | The RID of the attachment.\nattachment_rid = \"ri.attachments.main.attachment.bb32154e-e043-4b00-9461-93136ca96b6f\"\n# Optional[SdkPackageRid] | The package rid of the generated SDK.\nsdk_package_rid = None\n# Optional[SdkVersion] | The version of the generated SDK.\nsdk_version = None\n\n\ntry:\n api_response = client.ontologies.AttachmentProperty.read_attachment_by_rid(\n ontology,\n object_type,\n primary_key,\n property,\n attachment_rid,\n sdk_package_rid=sdk_package_rid,\n sdk_version=sdk_version,\n )\n print(\"The read_attachment_by_rid response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling AttachmentProperty.read_attachment_by_rid: %s\\n\" % e)" - } - ], - "v2.decrypt": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**.\nobject_type = \"employee\"\n# PropertyValueEscapedString | The primary key of the object with the CipherText property.\nprimary_key = 50030\n# PropertyApiName | The API name of the CipherText property. To find the API name for your CipherText property, check the **Ontology Manager** or use the **Get object type** endpoint.\nproperty = \"performance\"\n\n\ntry:\n api_response = client.ontologies.CipherTextProperty.decrypt(\n ontology, object_type, primary_key, property\n )\n print(\"The decrypt response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling CipherTextProperty.decrypt: %s\\n\" % e)" - } - ], - "v2.getLinkedObjectV2": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**.\nobject_type = \"employee\"\n# PropertyValueEscapedString | The primary key of the object from which the links originate. To look up the expected primary key for your object type, use the `Get object type` endpoint or the **Ontology Manager**.\nprimary_key = 50030\n# LinkTypeApiName | The API name of the link that exists between the object and the requested objects. To find the API name for your link type, check the **Ontology Manager**.\nlink_type = \"directReport\"\n# PropertyValueEscapedString | The primary key of the requested linked object. To look up the expected primary key for your object type, use the `Get object type` endpoint (passing the linked object type) or the **Ontology Manager**.\nlinked_object_primary_key = 80060\n# Optional[FoundryBranch] | The Foundry branch to load the object set for multiple object types. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported.\nbranch = None\n# Optional[bool] | A flag to exclude the retrieval of the `__rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2.\nexclude_rid = None\n# Optional[SdkPackageRid] | The package rid of the generated SDK.\nsdk_package_rid = None\n# Optional[SdkVersion] | The version of the generated SDK.\nsdk_version = None\n# Optional[List[SelectedPropertyApiName]] | The properties of the object type that should be included in the response. Omit this parameter to get all the properties.\nselect = None\n\n\ntry:\n api_response = client.ontologies.LinkedObject.get_linked_object(\n ontology,\n object_type,\n primary_key,\n link_type,\n linked_object_primary_key,\n branch=branch,\n exclude_rid=exclude_rid,\n sdk_package_rid=sdk_package_rid,\n sdk_version=sdk_version,\n select=select,\n )\n print(\"The get_linked_object response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling LinkedObject.get_linked_object: %s\\n\" % e)" - } - ], - "v2.listLinkedObjectsV2": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**.\nobject_type = \"employee\"\n# PropertyValueEscapedString | The primary key of the object from which the links originate. To look up the expected primary key for your object type, use the `Get object type` endpoint or the **Ontology Manager**.\nprimary_key = 50030\n# LinkTypeApiName | The API name of the link that exists between the object and the requested objects. To find the API name for your link type, check the **Ontology Manager**.\nlink_type = \"directReport\"\n# Optional[FoundryBranch] | The Foundry branch to list linked objects from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported.\nbranch = None\n# Optional[bool] | A flag to exclude the retrieval of the `__rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2.\nexclude_rid = None\n# Optional[OrderBy]\norder_by = None\n# Optional[PageSize] | The desired size of the page to be returned. Defaults to 1,000. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details.\npage_size = None\n# Optional[PageToken]\npage_token = None\n# Optional[SdkPackageRid] | The package rid of the generated SDK.\nsdk_package_rid = None\n# Optional[SdkVersion] | The version of the generated SDK.\nsdk_version = None\n# Optional[List[SelectedPropertyApiName]] | The properties of the object type that should be included in the response. Omit this parameter to get all the properties.\nselect = None\n# Optional[bool] | A flag to use snapshot consistency when paging. Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. This defaults to false if not specified, which means you will always get the latest results.\nsnapshot = None\n\n\ntry:\n for linked_object in client.ontologies.LinkedObject.list_linked_objects(\n ontology,\n object_type,\n primary_key,\n link_type,\n branch=branch,\n exclude_rid=exclude_rid,\n order_by=order_by,\n page_size=page_size,\n page_token=page_token,\n sdk_package_rid=sdk_package_rid,\n sdk_version=sdk_version,\n select=select,\n snapshot=snapshot,\n ):\n pprint(linked_object)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling LinkedObject.list_linked_objects: %s\\n\" % e)" - } - ], - "v2.readMediaContent": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**.\nobject_type = \"employee\"\n# PropertyValueEscapedString | The primary key of the object with the media reference property.\nprimary_key = 50030\n# PropertyApiName | The API name of the media reference property. To find the API name, check the **Ontology Manager** or use the **Get object type** endpoint.\nproperty = \"profile_picture\"\n# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode.\npreview = None\n# Optional[SdkPackageRid] | The package rid of the generated SDK.\nsdk_package_rid = None\n# Optional[SdkVersion] | The version of the generated SDK.\nsdk_version = None\n\n\ntry:\n api_response = client.ontologies.MediaReferenceProperty.get_media_content(\n ontology,\n object_type,\n primary_key,\n property,\n preview=preview,\n sdk_package_rid=sdk_package_rid,\n sdk_version=sdk_version,\n )\n print(\"The get_media_content response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling MediaReferenceProperty.get_media_content: %s\\n\" % e)" - } - ], - "v2.getMediaMetadata": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**.\nobject_type = \"employee\"\n# PropertyValueEscapedString | The primary key of the object with the media reference property.\nprimary_key = 50030\n# PropertyApiName | The API name of the media reference backed property. To find the API name, check the **Ontology Manager** or use the **Get object type** endpoint.\nproperty = None\n# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode.\npreview = None\n# Optional[SdkPackageRid] | The package rid of the generated SDK.\nsdk_package_rid = None\n# Optional[SdkVersion] | The version of the generated SDK.\nsdk_version = None\n\n\ntry:\n api_response = client.ontologies.MediaReferenceProperty.get_media_metadata(\n ontology,\n object_type,\n primary_key,\n property,\n preview=preview,\n sdk_package_rid=sdk_package_rid,\n sdk_version=sdk_version,\n )\n print(\"The get_media_metadata response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling MediaReferenceProperty.get_media_metadata: %s\\n\" % e)" - } - ], - "v2.uploadMediaContent": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**.\nobject_type = \"employee\"\n# PropertyApiName | The API name of the media reference property. To find the API name, check the **Ontology Manager** or use the **Get object type** endpoint.\nproperty = \"profile_picture\"\n# bytes | Body of the request\nbody = None\n# Optional[MediaItemPath] | A path for the media item within its backing media set. Required if the backing media set requires paths.\nmedia_item_path = \"my-file.png\"\n# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode.\npreview = None\n\n\ntry:\n api_response = client.ontologies.MediaReferenceProperty.upload(\n ontology, object_type, property, body, media_item_path=media_item_path, preview=preview\n )\n print(\"The upload response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling MediaReferenceProperty.upload: %s\\n\" % e)" - } - ], - "v2.getObjectTypeV2": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**.\nobject_type = \"employee\"\n# Optional[FoundryBranch] | The Foundry branch to load the object type definition from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported.\nbranch = None\n\n\ntry:\n api_response = client.ontologies.Ontology.ObjectType.get(ontology, object_type, branch=branch)\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling ObjectType.get: %s\\n\" % e)" - } - ], - "v2.getObjectTypeFullMetadata": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**.\nobject_type = \"employee\"\n# Optional[FoundryBranch] | The Foundry branch to load the action type definition from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported.\nbranch = None\n# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode.\npreview = None\n# Optional[SdkPackageRid] | The package rid of the generated SDK.\nsdk_package_rid = None\n# Optional[SdkVersion] | The version of the generated SDK.\nsdk_version = None\n\n\ntry:\n api_response = client.ontologies.Ontology.ObjectType.get_full_metadata(\n ontology,\n object_type,\n branch=branch,\n preview=preview,\n sdk_package_rid=sdk_package_rid,\n sdk_version=sdk_version,\n )\n print(\"The get_full_metadata response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling ObjectType.get_full_metadata: %s\\n\" % e)" - } - ], - "v2.getOutgoingLinkTypeV2": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager** application.\nobject_type = \"Employee\"\n# LinkTypeApiName | The API name of the outgoing link. To find the API name for your link type, check the **Ontology Manager**.\nlink_type = \"directReport\"\n# Optional[FoundryBranch] | The Foundry branch to get the outgoing link types for an object type from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported.\nbranch = None\n\n\ntry:\n api_response = client.ontologies.Ontology.ObjectType.get_outgoing_link_type(\n ontology, object_type, link_type, branch=branch\n )\n print(\"The get_outgoing_link_type response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling ObjectType.get_outgoing_link_type: %s\\n\" % e)" - } - ], - "v2.listObjectTypesV2": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# Optional[FoundryBranch] | The Foundry branch to list the object types from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported.\nbranch = None\n# Optional[PageSize] | The desired size of the page to be returned. Defaults to 500. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details.\npage_size = None\n# Optional[PageToken]\npage_token = None\n\n\ntry:\n for object_type in client.ontologies.Ontology.ObjectType.list(\n ontology, branch=branch, page_size=page_size, page_token=page_token\n ):\n pprint(object_type)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling ObjectType.list: %s\\n\" % e)" - } - ], - "v2.listOutgoingLinkTypesV2": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager** application.\nobject_type = \"Flight\"\n# Optional[FoundryBranch] | The Foundry branch to load the outgoing link types from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported.\nbranch = None\n# Optional[PageSize] | The desired size of the page to be returned.\npage_size = None\n# Optional[PageToken]\npage_token = None\n\n\ntry:\n for object_type in client.ontologies.Ontology.ObjectType.list_outgoing_link_types(\n ontology, object_type, branch=branch, page_size=page_size, page_token=page_token\n ):\n pprint(object_type)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling ObjectType.list_outgoing_link_types: %s\\n\" % e)" - } - ], - "v2.getOntologyV2": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n\n\ntry:\n api_response = client.ontologies.Ontology.get(ontology)\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Ontology.get: %s\\n\" % e)" - } - ], - "v2.getOntologyFullMetadata": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# Optional[FoundryBranch] | The Foundry branch to load metadata from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported.\nbranch = None\n\n\ntry:\n api_response = client.ontologies.Ontology.get_full_metadata(ontology, branch=branch)\n print(\"The get_full_metadata response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Ontology.get_full_metadata: %s\\n\" % e)" - } - ], - "v2.listOntologiesV2": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n\ntry:\n api_response = client.ontologies.Ontology.list()\n print(\"The list response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Ontology.list: %s\\n\" % e)" - } - ], - "v2.loadOntologyMetadata": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# List[ActionTypeApiName]\naction_types = None\n# List[InterfaceTypeApiName]\ninterface_types = None\n# List[LinkTypeApiName]\nlink_types = None\n# List[ObjectTypeApiName]\nobject_types = None\n# List[VersionedQueryTypeApiName]\nquery_types = None\n# Optional[FoundryBranch] | The Foundry branch to load metadata from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported.\nbranch = None\n# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode.\npreview = None\n\n\ntry:\n api_response = client.ontologies.Ontology.load_metadata(\n ontology,\n action_types=action_types,\n interface_types=interface_types,\n link_types=link_types,\n object_types=object_types,\n query_types=query_types,\n branch=branch,\n preview=preview,\n )\n print(\"The load_metadata response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Ontology.load_metadata: %s\\n\" % e)" - } - ], - "v2.aggregateObjectsForInterface": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# InterfaceTypeApiName | The API name of the interface type. To find the API name, use the **List interface types** endpoint or check the **Ontology Manager**.\ninterface_type = \"Employee\"\n# List[AggregationV2]\naggregation = [\n {\"type\": \"min\", \"field\": \"tenure\", \"name\": \"min_tenure\"},\n {\"type\": \"avg\", \"field\": \"tenure\", \"name\": \"avg_tenure\"},\n]\n# List[AggregationGroupByV2]\ngroup_by = [\n {\n \"field\": \"startDate\",\n \"type\": \"range\",\n \"ranges\": [{\"startValue\": \"2020-01-01\", \"endValue\": \"2020-06-01\"}],\n },\n {\"field\": \"city\", \"type\": \"exact\"},\n]\n# Optional[AggregationAccuracyRequest]\naccuracy = None\n# Optional[FoundryBranch] | The Foundry branch to aggregate objects from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported.\nbranch = None\n# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode.\npreview = None\n# Optional[SearchJsonQueryV2]\nwhere = {\"type\": \"eq\", \"field\": \"name\", \"value\": \"john\"}\n\n\ntry:\n api_response = client.ontologies.OntologyInterface.aggregate(\n ontology,\n interface_type,\n aggregation=aggregation,\n group_by=group_by,\n accuracy=accuracy,\n branch=branch,\n preview=preview,\n where=where,\n )\n print(\"The aggregate response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling OntologyInterface.aggregate: %s\\n\" % e)" - } - ], - "v2.getInterfaceType": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# InterfaceTypeApiName | The API name of the interface type. To find the API name, use the **List interface types** endpoint or check the **Ontology Manager**.\ninterface_type = \"Employee\"\n# Optional[FoundryBranch] | The Foundry branch to load the interface type definition from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported.\nbranch = None\n# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode.\npreview = None\n# Optional[SdkPackageRid] | The package rid of the generated SDK.\nsdk_package_rid = None\n# Optional[SdkVersion] | The version of the generated SDK.\nsdk_version = None\n\n\ntry:\n api_response = client.ontologies.OntologyInterface.get(\n ontology,\n interface_type,\n branch=branch,\n preview=preview,\n sdk_package_rid=sdk_package_rid,\n sdk_version=sdk_version,\n )\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling OntologyInterface.get: %s\\n\" % e)" - } - ], - "v2.getOutgoingInterfaceLinkType": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# InterfaceTypeApiName | The API name of the interface type. To find the API name, use the **List interface types** endpoint or check the **Ontology Manager** application.\ninterface_type = \"Employee\"\n# InterfaceLinkTypeApiName | The API name of the outgoing interface link. To find the API name for your interface link type, check the **Ontology Manager** page for the parent interface.\ninterface_link_type = \"worksAt\"\n# Optional[FoundryBranch] | The Foundry branch to get the outgoing link types for an object type from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported.\nbranch = None\n\n\ntry:\n api_response = client.ontologies.OntologyInterface.get_outgoing_interface_link_type(\n ontology, interface_type, interface_link_type, branch=branch\n )\n print(\"The get_outgoing_interface_link_type response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling OntologyInterface.get_outgoing_interface_link_type: %s\\n\" % e)" - } - ], - "v2.listInterfaceTypes": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# Optional[FoundryBranch] | The Foundry branch to list the interface types from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported.\nbranch = None\n# Optional[PageSize] | The desired size of the page to be returned. Defaults to 500. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details.\npage_size = None\n# Optional[PageToken]\npage_token = None\n# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode.\npreview = None\n\n\ntry:\n for ontology_interface in client.ontologies.OntologyInterface.list(\n ontology, branch=branch, page_size=page_size, page_token=page_token, preview=preview\n ):\n pprint(ontology_interface)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling OntologyInterface.list: %s\\n\" % e)" - } - ], - "v2.listInterfaceLinkedObjects": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier | The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**.\nontology = \"palantir\"\n# InterfaceTypeApiName | The API name of the interface type. To find the API name, use the **List interface types** endpoint or check the **Ontology Manager** application.\ninterface_type = \"Employee\"\n# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**.\nobject_type = \"employee\"\n# PropertyValueEscapedString | The primary key of the object from which to **start** the interface link traversal. To look up the expected primary key for your object type, use the `Get object type` endpoint or the **Ontology Manager**.\nprimary_key = None\n# InterfaceLinkTypeApiName | The API name of the outgoing interface link. To find the API name for your interface link type, check the **Ontology Manager** page for the parent interface.\ninterface_link_type = \"worksAt\"\n# Optional[FoundryBranch] | The Foundry branch to get the outgoing link types for an object type from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported.\nbranch = None\n# Optional[bool] | A flag to exclude the retrieval of the `__rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2.\nexclude_rid = None\n# Optional[OrderBy]\norder_by = None\n# Optional[PageSize] | The desired size of the page to be returned. Defaults to 1,000. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details.\npage_size = None\n# Optional[PageToken]\npage_token = None\n# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode.\npreview = None\n# Optional[List[SelectedPropertyApiName]] | The properties of the object type that should be included in the response. Omit this parameter to get all the properties.\nselect = None\n# Optional[bool] | A flag to use snapshot consistency when paging. Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. This defaults to false if not specified, which means you will always get the latest results.\nsnapshot = None\n\n\ntry:\n for ontology_interface in client.ontologies.OntologyInterface.list_interface_linked_objects(\n ontology,\n interface_type,\n object_type,\n primary_key,\n interface_link_type,\n branch=branch,\n exclude_rid=exclude_rid,\n order_by=order_by,\n page_size=page_size,\n page_token=page_token,\n preview=preview,\n select=select,\n snapshot=snapshot,\n ):\n pprint(ontology_interface)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling OntologyInterface.list_interface_linked_objects: %s\\n\" % e)" - } - ], - "v2.listObjectsForInterface": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier | The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**.\nontology = \"palantir\"\n# InterfaceTypeApiName | The API name of the interface type. To find the API name, use the **List interface types** endpoint or check the **Ontology Manager**.\ninterface_type = \"employee\"\n# Optional[FoundryBranch] | The Foundry branch to list objects from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported.\nbranch = None\n# Optional[bool] | A flag to exclude the retrieval of the `__rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2.\nexclude_rid = None\n# Optional[OrderBy]\norder_by = None\n# Optional[PageSize] | The desired size of the page to be returned. Defaults to 1,000. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details.\npage_size = None\n# Optional[PageToken]\npage_token = None\n# Optional[List[SelectedPropertyApiName]] | The properties of the interface type that should be included in the response. Omit this parameter to get all the properties.\nselect = None\n# Optional[bool] | A flag to use snapshot consistency when paging. Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. This defaults to false if not specified, which means you will always get the latest results.\nsnapshot = None\n\n\ntry:\n for ontology_interface in client.ontologies.OntologyInterface.list_objects_for_interface(\n ontology,\n interface_type,\n branch=branch,\n exclude_rid=exclude_rid,\n order_by=order_by,\n page_size=page_size,\n page_token=page_token,\n select=select,\n snapshot=snapshot,\n ):\n pprint(ontology_interface)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling OntologyInterface.list_objects_for_interface: %s\\n\" % e)" - } - ], - "v2.listOutgoingInterfaceLinkTypes": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# InterfaceTypeApiName | The API name of the interface type. To find the API name, use the **List interface types** endpoint or check the **Ontology Manager** application.\ninterface_type = \"Employee\"\n# Optional[FoundryBranch] | The Foundry branch to get the outgoing link type from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported.\nbranch = None\n\n\ntry:\n api_response = client.ontologies.OntologyInterface.list_outgoing_interface_link_types(\n ontology, interface_type, branch=branch\n )\n print(\"The list_outgoing_interface_link_types response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling OntologyInterface.list_outgoing_interface_link_types: %s\\n\" % e)" - } - ], - "v2.searchObjectsForInterface": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# InterfaceTypeApiName | The API name of the interface type. To find the API name, use the **List interface types** endpoint or check the **Ontology Manager**.\ninterface_type = \"Employee\"\n# Dict[InterfaceTypeApiName, List[InterfacePropertyApiName]] | A map from interface type API name to a list of interface property type API names. For each returned object, if the object implements an interface that is a key in the map, then we augment the response for that object type with the list of properties specified in the value.\naugmented_interface_property_types = None\n# Dict[ObjectTypeApiName, List[PropertyApiName]] | A map from object type API name to a list of property type API names. For each returned object, if the object\u2019s object type is a key in the map, then we augment the response for that object type with the list of properties specified in the value.\naugmented_properties = None\n# Dict[InterfaceTypeApiName, List[SharedPropertyTypeApiName]] | A map from interface type API name to a list of shared property type API names. For each returned object, if the object implements an interface that is a key in the map, then we augment the response for that object type with the list of properties specified in the value.\naugmented_shared_property_types = None\n# List[InterfaceTypeApiName] | A list of interface type API names. Object types must implement all the mentioned interfaces in order to be included in the response.\nother_interface_types = None\n# List[InterfacePropertyApiName] | A list of interface property type API names of the interface type that should be included in the response. Omit this parameter to include all properties of the interface type in the response.\nselected_interface_property_types = None\n# List[ObjectTypeApiName] | A list of object type API names that should be included in the response. If non-empty, object types that are not mentioned will not be included in the response even if they implement the specified interface. Omit the parameter to include all object types.\nselected_object_types = None\n# List[SharedPropertyTypeApiName] | A list of shared property type API names of the interface type that should be included in the response. Omit this parameter to include all properties of the interface type in the response.\nselected_shared_property_types = None\n# Optional[FoundryBranch] | The Foundry branch to search objects from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported.\nbranch = None\n# Optional[SearchOrderByV2]\norder_by = None\n# Optional[PageSize]\npage_size = None\n# Optional[PageToken]\npage_token = None\n# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode.\npreview = None\n# Optional[SearchJsonQueryV2]\nwhere = None\n\n\ntry:\n api_response = client.ontologies.OntologyInterface.search(\n ontology,\n interface_type,\n augmented_interface_property_types=augmented_interface_property_types,\n augmented_properties=augmented_properties,\n augmented_shared_property_types=augmented_shared_property_types,\n other_interface_types=other_interface_types,\n selected_interface_property_types=selected_interface_property_types,\n selected_object_types=selected_object_types,\n selected_shared_property_types=selected_shared_property_types,\n branch=branch,\n order_by=order_by,\n page_size=page_size,\n page_token=page_token,\n preview=preview,\n where=where,\n )\n print(\"The search response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling OntologyInterface.search: %s\\n\" % e)" - } - ], - "v2.aggregateObjectsV2": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# ObjectTypeApiName | The type of the object to aggregate on.\nobject_type = \"employee\"\n# List[AggregationV2]\naggregation = [\n {\"type\": \"min\", \"field\": \"tenure\", \"name\": \"min_tenure\"},\n {\"type\": \"avg\", \"field\": \"tenure\", \"name\": \"avg_tenure\"},\n]\n# List[AggregationGroupByV2]\ngroup_by = [\n {\n \"field\": \"startDate\",\n \"type\": \"range\",\n \"ranges\": [{\"startValue\": \"2020-01-01\", \"endValue\": \"2020-06-01\"}],\n },\n {\"field\": \"city\", \"type\": \"exact\"},\n]\n# Optional[AggregationAccuracyRequest]\naccuracy = None\n# Optional[FoundryBranch] | The Foundry branch to aggregate objects from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported.\nbranch = None\n# Optional[SdkPackageRid] | The package rid of the generated SDK.\nsdk_package_rid = None\n# Optional[SdkVersion] | The version of the generated SDK.\nsdk_version = None\n# Optional[SearchJsonQueryV2]\nwhere = {\"type\": \"eq\", \"field\": \"name\", \"value\": \"john\"}\n\n\ntry:\n api_response = client.ontologies.OntologyObject.aggregate(\n ontology,\n object_type,\n aggregation=aggregation,\n group_by=group_by,\n accuracy=accuracy,\n branch=branch,\n sdk_package_rid=sdk_package_rid,\n sdk_version=sdk_version,\n where=where,\n )\n print(\"The aggregate response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling OntologyObject.aggregate: %s\\n\" % e)" - } - ], - "v2.countObjects": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**.\nobject_type = \"employee\"\n# Optional[FoundryBranch] | The Foundry branch to count the objects from. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported.\nbranch = None\n# Optional[SdkPackageRid] | The package rid of the generated SDK.\nsdk_package_rid = None\n# Optional[SdkVersion] | The package version of the generated SDK.\nsdk_version = None\n\n\ntry:\n api_response = client.ontologies.OntologyObject.count(\n ontology,\n object_type,\n branch=branch,\n sdk_package_rid=sdk_package_rid,\n sdk_version=sdk_version,\n )\n print(\"The count response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling OntologyObject.count: %s\\n\" % e)" - } - ], - "v2.getObjectV2": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**.\nobject_type = \"employee\"\n# PropertyValueEscapedString | The primary key of the requested object. To look up the expected primary key for your object type, use the `Get object type` endpoint or the **Ontology Manager**.\nprimary_key = 50030\n# Optional[FoundryBranch] | The Foundry branch to get the object from. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported.\nbranch = None\n# Optional[bool] | A flag to exclude the retrieval of the `__rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2.\nexclude_rid = None\n# Optional[SdkPackageRid] | The package rid of the generated SDK.\nsdk_package_rid = None\n# Optional[SdkVersion] | The version of the generated SDK.\nsdk_version = None\n# Optional[List[SelectedPropertyApiName]] | The properties of the object type that should be included in the response. Omit this parameter to get all the properties.\nselect = None\n\n\ntry:\n api_response = client.ontologies.OntologyObject.get(\n ontology,\n object_type,\n primary_key,\n branch=branch,\n exclude_rid=exclude_rid,\n sdk_package_rid=sdk_package_rid,\n sdk_version=sdk_version,\n select=select,\n )\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling OntologyObject.get: %s\\n\" % e)" - } - ], - "v2.listObjectsV2": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**.\nobject_type = \"employee\"\n# Optional[FoundryBranch] | The Foundry branch to list objects from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported.\nbranch = None\n# Optional[bool] | A flag to exclude the retrieval of the `__rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2.\nexclude_rid = None\n# Optional[OrderBy]\norder_by = None\n# Optional[PageSize] | The desired size of the page to be returned. Defaults to 1,000. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details.\npage_size = None\n# Optional[PageToken]\npage_token = None\n# Optional[SdkPackageRid] | The package rid of the generated SDK.\nsdk_package_rid = None\n# Optional[SdkVersion] | The version of the generated SDK.\nsdk_version = None\n# Optional[List[SelectedPropertyApiName]] | The properties of the object type that should be included in the response. Omit this parameter to get all the properties.\nselect = None\n# Optional[bool] | A flag to use snapshot consistency when paging. Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. This defaults to false if not specified, which means you will always get the latest results.\nsnapshot = None\n\n\ntry:\n for ontology_object in client.ontologies.OntologyObject.list(\n ontology,\n object_type,\n branch=branch,\n exclude_rid=exclude_rid,\n order_by=order_by,\n page_size=page_size,\n page_token=page_token,\n sdk_package_rid=sdk_package_rid,\n sdk_version=sdk_version,\n select=select,\n snapshot=snapshot,\n ):\n pprint(ontology_object)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling OntologyObject.list: %s\\n\" % e)" - } - ], - "v2.searchObjectsV2": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**.\nobject_type = \"employee\"\n# List[PropertyApiName] | The API names of the object type properties to include in the response.\nselect = None\n# List[PropertyIdentifier] | The identifiers of the properties to include in the response. Only selectV2 or select should be populated, but not both.\nselect_v2 = None\n# Optional[FoundryBranch] | The Foundry branch to search objects from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported.\nbranch = None\n# Optional[bool] | A flag to exclude the retrieval of the `__rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2.\nexclude_rid = None\n# Optional[SearchOrderByV2]\norder_by = None\n# Optional[PageSize]\npage_size = None\n# Optional[PageToken]\npage_token = None\n# Optional[SdkPackageRid] | The package rid of the generated SDK.\nsdk_package_rid = None\n# Optional[SdkVersion] | The version of the generated SDK.\nsdk_version = None\n# Optional[bool] | A flag to use snapshot consistency when paging. Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. This defaults to false if not specified, which means you will always get the latest results.\nsnapshot = None\n# Optional[SearchJsonQueryV2]\nwhere = {\"type\": \"eq\", \"field\": \"age\", \"value\": 21}\n\n\ntry:\n api_response = client.ontologies.OntologyObject.search(\n ontology,\n object_type,\n select=select,\n select_v2=select_v2,\n branch=branch,\n exclude_rid=exclude_rid,\n order_by=order_by,\n page_size=page_size,\n page_token=page_token,\n sdk_package_rid=sdk_package_rid,\n sdk_version=sdk_version,\n snapshot=snapshot,\n where=where,\n )\n print(\"The search response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling OntologyObject.search: %s\\n\" % e)" - } - ], - "v2.aggregateObjectSetV2": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# List[AggregationV2]\naggregation = [\n {\"field\": \"tenure\", \"name\": \"min_tenure\", \"type\": \"min\"},\n {\"field\": \"tenure\", \"name\": \"avg_tenure\", \"type\": \"avg\"},\n]\n# List[AggregationGroupByV2]\ngroup_by = [\n {\n \"field\": \"startDate\",\n \"ranges\": [{\"endValue\": \"2020-06-01\", \"startValue\": \"2020-01-01\"}],\n \"type\": \"range\",\n },\n {\"field\": \"city\", \"type\": \"exact\"},\n]\n# ObjectSet\nobject_set = {\"objectType\": \"Employee\", \"type\": \"base\"}\n# Optional[AggregationAccuracyRequest]\naccuracy = None\n# Optional[FoundryBranch] | The Foundry branch to aggregate the objects from. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported.\nbranch = None\n# Optional[IncludeComputeUsage]\ninclude_compute_usage = None\n# Optional[SdkPackageRid] | The package rid of the generated SDK.\nsdk_package_rid = None\n# Optional[SdkVersion] | The package version of the generated SDK.\nsdk_version = None\n# Optional[OntologyTransactionId] | The ID of an Ontology transaction to read from. Transactions are an experimental feature and all workflows may not be supported.\ntransaction_id = None\n\n\ntry:\n api_response = client.ontologies.OntologyObjectSet.aggregate(\n ontology,\n aggregation=aggregation,\n group_by=group_by,\n object_set=object_set,\n accuracy=accuracy,\n branch=branch,\n include_compute_usage=include_compute_usage,\n sdk_package_rid=sdk_package_rid,\n sdk_version=sdk_version,\n transaction_id=transaction_id,\n )\n print(\"The aggregate response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling OntologyObjectSet.aggregate: %s\\n\" % e)" - } - ], - "v2.createTemporaryObjectSetV2": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# ObjectSet\nobject_set = {\"type\": \"base\", \"objectType\": \"Employee\"}\n# Optional[SdkPackageRid] | The package rid of the generated SDK.\nsdk_package_rid = None\n# Optional[SdkVersion] | The package version of the generated SDK.\nsdk_version = None\n\n\ntry:\n api_response = client.ontologies.OntologyObjectSet.create_temporary(\n ontology, object_set=object_set, sdk_package_rid=sdk_package_rid, sdk_version=sdk_version\n )\n print(\"The create_temporary response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling OntologyObjectSet.create_temporary: %s\\n\" % e)" - } - ], - "v2.getObjectSetV2": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# ObjectSetRid | The RID of the object set.\nobject_set_rid = \"ri.object-set.main.object-set.c32ccba5-1a55-4cfe-ad71-160c4c77a053\"\n\n\ntry:\n api_response = client.ontologies.OntologyObjectSet.get(ontology, object_set_rid)\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling OntologyObjectSet.get: %s\\n\" % e)" - } - ], - "v2.loadObjectSetV2": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# ObjectSet\nobject_set = {\"type\": \"base\", \"objectType\": \"Employee\"}\n# List[SelectedPropertyApiName]\nselect = None\n# List[PropertyIdentifier] | The identifiers of the properties to include in the response. Only selectV2 or select should be populated, but not both.\nselect_v2 = None\n# Optional[FoundryBranch] | The Foundry branch to load the object set from. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported.\nbranch = None\n# Optional[bool] | A flag to exclude the retrieval of the `__rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2.\nexclude_rid = None\n# Optional[IncludeComputeUsage]\ninclude_compute_usage = None\n# Optional[SearchOrderByV2]\norder_by = None\n# Optional[PageSize]\npage_size = 10000\n# Optional[PageToken]\npage_token = \"v1.QnVpbGQgdGhlIEZ1dHVyZTogaHR0cHM6Ly93d3cucGFsYW50aXIuY29tL2NhcmVlcnMvP2xldmVyLXNvdXJjZSU1YiU1ZD1BUElEb2NzI29wZW4tcG9zaXRpb25z\"\n# Optional[SdkPackageRid] | The package rid of the generated SDK.\nsdk_package_rid = None\n# Optional[SdkVersion] | The package version of the generated SDK.\nsdk_version = None\n# Optional[bool] | A flag to use snapshot consistency when paging. Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. This defaults to false if not specified, which means you will always get the latest results.\nsnapshot = None\n# Optional[OntologyTransactionId] | The ID of an Ontology transaction to read from. Transactions are an experimental feature and all workflows may not be supported.\ntransaction_id = None\n\n\ntry:\n api_response = client.ontologies.OntologyObjectSet.load(\n ontology,\n object_set=object_set,\n select=select,\n select_v2=select_v2,\n branch=branch,\n exclude_rid=exclude_rid,\n include_compute_usage=include_compute_usage,\n order_by=order_by,\n page_size=page_size,\n page_token=page_token,\n sdk_package_rid=sdk_package_rid,\n sdk_version=sdk_version,\n snapshot=snapshot,\n transaction_id=transaction_id,\n )\n print(\"The load response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling OntologyObjectSet.load: %s\\n\" % e)" - } - ], - "v2.loadObjectSetLinksV2": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# List[LinkTypeApiName]\nlinks = None\n# ObjectSet\nobject_set = {\"objectType\": \"Employee\", \"type\": \"base\"}\n# Optional[FoundryBranch] | The Foundry branch to aggregate the objects from. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported.\nbranch = None\n# Optional[IncludeComputeUsage]\ninclude_compute_usage = None\n# Optional[PageToken]\npage_token = None\n# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode.\npreview = None\n# Optional[SdkPackageRid] | The package rid of the generated SDK.\nsdk_package_rid = None\n# Optional[SdkVersion] | The package version of the generated SDK.\nsdk_version = None\n\n\ntry:\n api_response = client.ontologies.OntologyObjectSet.load_links(\n ontology,\n links=links,\n object_set=object_set,\n branch=branch,\n include_compute_usage=include_compute_usage,\n page_token=page_token,\n preview=preview,\n sdk_package_rid=sdk_package_rid,\n sdk_version=sdk_version,\n )\n print(\"The load_links response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling OntologyObjectSet.load_links: %s\\n\" % e)" - } - ], - "v2.loadObjectSetV2MultipleObjectTypes": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# ObjectSet\nobject_set = {\"type\": \"base\", \"objectType\": \"Employee\"}\n# List[SelectedPropertyApiName]\nselect = None\n# List[PropertyIdentifier] | The identifiers of the properties to include in the response. Only selectV2 or select should be populated, but not both.\nselect_v2 = None\n# Optional[FoundryBranch] | The Foundry branch to load the object set for multiple object types. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported.\nbranch = None\n# Optional[bool] | A flag to exclude the retrieval of the `$rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2.\nexclude_rid = None\n# Optional[IncludeComputeUsage]\ninclude_compute_usage = None\n# Optional[SearchOrderByV2]\norder_by = None\n# Optional[PageSize]\npage_size = 10000\n# Optional[PageToken]\npage_token = \"v1.QnVpbGQgdGhlIEZ1dHVyZTogaHR0cHM6Ly93d3cucGFsYW50aXIuY29tL2NhcmVlcnMvP2xldmVyLXNvdXJjZSU1YiU1ZD1BUElEb2NzI29wZW4tcG9zaXRpb25z\"\n# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode.\npreview = None\n# Optional[SdkPackageRid] | The package rid of the generated SDK.\nsdk_package_rid = None\n# Optional[SdkVersion] | The package version of the generated SDK.\nsdk_version = None\n# Optional[bool] | A flag to use snapshot consistency when paging. Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. This defaults to false if not specified, which means you will always get the latest results.\nsnapshot = None\n# Optional[OntologyTransactionId] | The ID of an Ontology transaction to read from. Transactions are an experimental feature and all workflows may not be supported.\ntransaction_id = None\n\n\ntry:\n api_response = client.ontologies.OntologyObjectSet.load_multiple_object_types(\n ontology,\n object_set=object_set,\n select=select,\n select_v2=select_v2,\n branch=branch,\n exclude_rid=exclude_rid,\n include_compute_usage=include_compute_usage,\n order_by=order_by,\n page_size=page_size,\n page_token=page_token,\n preview=preview,\n sdk_package_rid=sdk_package_rid,\n sdk_version=sdk_version,\n snapshot=snapshot,\n transaction_id=transaction_id,\n )\n print(\"The load_multiple_object_types response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling OntologyObjectSet.load_multiple_object_types: %s\\n\" % e)" - } - ], - "v2.loadObjectSetV2ObjectsOrInterfaces": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# ObjectSet\nobject_set = {\"type\": \"base\", \"interfaceBase\": \"Person\"}\n# List[SelectedPropertyApiName]\nselect = None\n# List[PropertyIdentifier] | The identifiers of the properties to include in the response. Only selectV2 or select should be populated, but not both.\nselect_v2 = None\n# Optional[FoundryBranch] | The Foundry branch to load the objects or interfaces from. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported.\nbranch = None\n# Optional[bool] | A flag to exclude the retrieval of the `$rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2.\nexclude_rid = None\n# Optional[SearchOrderByV2]\norder_by = None\n# Optional[PageSize]\npage_size = 10000\n# Optional[PageToken]\npage_token = \"v1.VGhlcmUgaXMgc28gbXVjaCBsZWZ0IHRvIGJ1aWxkIC0gcGFsYW50aXIuY29tL2NhcmVlcnMv\"\n# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode.\npreview = None\n# Optional[SdkPackageRid] | The package rid of the generated SDK.\nsdk_package_rid = None\n# Optional[SdkVersion] | The package version of the generated SDK.\nsdk_version = None\n# Optional[bool] | A flag to use snapshot consistency when paging. Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. This defaults to false if not specified, which means you will always get the latest results.\nsnapshot = None\n\n\ntry:\n api_response = client.ontologies.OntologyObjectSet.load_objects_or_interfaces(\n ontology,\n object_set=object_set,\n select=select,\n select_v2=select_v2,\n branch=branch,\n exclude_rid=exclude_rid,\n order_by=order_by,\n page_size=page_size,\n page_token=page_token,\n preview=preview,\n sdk_package_rid=sdk_package_rid,\n sdk_version=sdk_version,\n snapshot=snapshot,\n )\n print(\"The load_objects_or_interfaces response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling OntologyObjectSet.load_objects_or_interfaces: %s\\n\" % e)" - } - ], - "v2.ontologyTransactionPostEdits": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# OntologyTransactionId | The ID of the transaction to apply edits to. Transactions are an experimental feature and all workflows may not be supported.\ntransaction_id = None\n# List[TransactionEdit]\nedits = None\n# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode.\npreview = None\n\n\ntry:\n api_response = client.ontologies.OntologyTransaction.post_edits(\n ontology, transaction_id, edits=edits, preview=preview\n )\n print(\"The post_edits response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling OntologyTransaction.post_edits: %s\\n\" % e)" - } - ], - "v2.getOntologyValueType": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# ValueTypeApiName | The API name of the value type. To find the API name, use the **List value types** endpoint or check the **Ontology Manager**.\nvalue_type = \"countryCode\"\n# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode.\npreview = None\n\n\ntry:\n api_response = client.ontologies.OntologyValueType.get(ontology, value_type, preview=preview)\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling OntologyValueType.get: %s\\n\" % e)" - } - ], - "v2.listOntologyValueTypes": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode.\npreview = None\n\n\ntry:\n api_response = client.ontologies.OntologyValueType.list(ontology, preview=preview)\n print(\"The list response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling OntologyValueType.list: %s\\n\" % e)" - } - ], - "v2.executeQueryV2": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# QueryApiName | The API name of the Query to execute.\nquery_api_name = \"getEmployeesInCity\"\n# Dict[ParameterId, Optional[DataValue]]\nparameters = {\"city\": \"New York\"}\n# Optional[Attribution] | The Attribution to be used when executing this request.\nattribution = None\n# Optional[SdkPackageRid] | The package rid of the generated SDK.\nsdk_package_rid = None\n# Optional[SdkVersion] | The version of the generated SDK.\nsdk_version = None\n# Optional[TraceParent] | The W3C trace parent header included in the request.\ntrace_parent = None\n# Optional[TraceState] | The W3C trace state header included in the request.\ntrace_state = None\n# Optional[OntologyTransactionId] | The ID of an Ontology transaction to read from. Transactions are an experimental feature and all workflows may not be supported.\ntransaction_id = None\n# Optional[FunctionVersion] | The version of the Query to execute.\nversion = None\n\n\ntry:\n api_response = client.ontologies.Query.execute(\n ontology,\n query_api_name,\n parameters=parameters,\n attribution=attribution,\n sdk_package_rid=sdk_package_rid,\n sdk_version=sdk_version,\n trace_parent=trace_parent,\n trace_state=trace_state,\n transaction_id=transaction_id,\n version=version,\n )\n print(\"The execute response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Query.execute: %s\\n\" % e)" - } - ], - "v2.getQueryTypeV2": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# QueryApiName | The API name of the query type. To find the API name, use the **List query types** endpoint or check the **Ontology Manager**.\nquery_api_name = \"getEmployeesInCity\"\n# Optional[SdkPackageRid] | The package rid of the generated SDK.\nsdk_package_rid = None\n# Optional[SdkVersion] | The version of the generated SDK.\nsdk_version = None\n# Optional[FunctionVersion] | The version of the Query to get.\nversion = None\n\n\ntry:\n api_response = client.ontologies.Ontology.QueryType.get(\n ontology,\n query_api_name,\n sdk_package_rid=sdk_package_rid,\n sdk_version=sdk_version,\n version=version,\n )\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling QueryType.get: %s\\n\" % e)" - } - ], - "v2.listQueryTypesV2": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# Optional[PageSize] | The desired size of the page to be returned. Defaults to 100. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details.\npage_size = None\n# Optional[PageToken]\npage_token = None\n\n\ntry:\n for query_type in client.ontologies.Ontology.QueryType.list(\n ontology, page_size=page_size, page_token=page_token\n ):\n pprint(query_type)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling QueryType.list: %s\\n\" % e)" - } - ], - "v2.getFirstPoint": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**.\nobject_type = \"employee\"\n# PropertyValueEscapedString | The primary key of the object with the time series property.\nprimary_key = 50030\n# PropertyApiName | The API name of the time series property. To find the API name for your time series property, check the **Ontology Manager** or use the **Get object type** endpoint.\nproperty = \"performance\"\n# Optional[SdkPackageRid] | The package rid of the generated SDK.\nsdk_package_rid = None\n# Optional[SdkVersion] | The version of the generated SDK.\nsdk_version = None\n\n\ntry:\n api_response = client.ontologies.TimeSeriesPropertyV2.get_first_point(\n ontology,\n object_type,\n primary_key,\n property,\n sdk_package_rid=sdk_package_rid,\n sdk_version=sdk_version,\n )\n print(\"The get_first_point response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling TimeSeriesPropertyV2.get_first_point: %s\\n\" % e)" - } - ], - "v2.getLastPoint": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**.\nobject_type = \"employee\"\n# PropertyValueEscapedString | The primary key of the object with the time series property.\nprimary_key = 50030\n# PropertyApiName | The API name of the time series property. To find the API name for your time series property, check the **Ontology Manager** or use the **Get object type** endpoint.\nproperty = \"performance\"\n# Optional[SdkPackageRid] | The package rid of the generated SDK.\nsdk_package_rid = None\n# Optional[SdkVersion] | The version of the generated SDK.\nsdk_version = None\n\n\ntry:\n api_response = client.ontologies.TimeSeriesPropertyV2.get_last_point(\n ontology,\n object_type,\n primary_key,\n property,\n sdk_package_rid=sdk_package_rid,\n sdk_version=sdk_version,\n )\n print(\"The get_last_point response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling TimeSeriesPropertyV2.get_last_point: %s\\n\" % e)" - } - ], - "v2.streamPoints": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**.\nobject_type = \"employee\"\n# PropertyValueEscapedString | The primary key of the object with the time series property.\nprimary_key = 50030\n# PropertyApiName | The API name of the time series property. To find the API name for your time series property, check the **Ontology Manager** or use the **Get object type** endpoint.\nproperty = None\n# Optional[AggregateTimeSeries]\naggregate = None\n# Optional[StreamingOutputFormat] | The output format to serialize the output binary stream in. Default is JSON. ARROW is more efficient than JSON at streaming a large sized response.\nformat = None\n# Optional[TimeRange]\nrange = {\n \"type\": \"relative\",\n \"startTime\": {\"when\": \"BEFORE\", \"value\": 5, \"unit\": \"MONTHS\"},\n \"endTime\": {\"when\": \"BEFORE\", \"value\": 1, \"unit\": \"MONTHS\"},\n}\n# Optional[SdkPackageRid] | The package rid of the generated SDK.\nsdk_package_rid = None\n# Optional[SdkVersion] | The version of the generated SDK.\nsdk_version = None\n\n\ntry:\n api_response = client.ontologies.TimeSeriesPropertyV2.stream_points(\n ontology,\n object_type,\n primary_key,\n property,\n aggregate=aggregate,\n format=format,\n range=range,\n sdk_package_rid=sdk_package_rid,\n sdk_version=sdk_version,\n )\n print(\"The stream_points response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling TimeSeriesPropertyV2.stream_points: %s\\n\" % e)" - } - ], - "v2.getLatestValue": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**.\nobject_type = \"employee\"\n# PropertyValueEscapedString | The primary key of the object with the timeseries property.\nprimary_key = 50030\n# PropertyApiName | The API name of the timeseries property. To find the API name for your property value bank property, check the **Ontology Manager** or use the **Get object type** endpoint.\nproperty_name = \"performance\"\n# Optional[SdkPackageRid] | The package rid of the generated SDK.\nsdk_package_rid = None\n# Optional[SdkVersion] | The version of the generated SDK.\nsdk_version = None\n\n\ntry:\n api_response = client.ontologies.TimeSeriesValueBankProperty.get_latest_value(\n ontology,\n object_type,\n primary_key,\n property_name,\n sdk_package_rid=sdk_package_rid,\n sdk_version=sdk_version,\n )\n print(\"The get_latest_value response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling TimeSeriesValueBankProperty.get_latest_value: %s\\n\" % e)" - } - ], - "v2.streamValues": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**.\nobject_type = \"employee\"\n# PropertyValueEscapedString | The primary key of the object with the time series property.\nprimary_key = 50030\n# PropertyApiName | The API name of the time series backed property. To find the API name, check the **Ontology Manager** or use the **Get object type** endpoint.\nproperty = None\n# Optional[TimeRange]\nrange = {\n \"type\": \"relative\",\n \"startTime\": {\"when\": \"BEFORE\", \"value\": 5, \"unit\": \"MONTHS\"},\n \"endTime\": {\"when\": \"BEFORE\", \"value\": 1, \"unit\": \"MONTHS\"},\n}\n# Optional[SdkPackageRid] | The package rid of the generated SDK.\nsdk_package_rid = None\n# Optional[SdkVersion] | The version of the generated SDK.\nsdk_version = None\n\n\ntry:\n api_response = client.ontologies.TimeSeriesValueBankProperty.stream_values(\n ontology,\n object_type,\n primary_key,\n property,\n range=range,\n sdk_package_rid=sdk_package_rid,\n sdk_version=sdk_version,\n )\n print(\"The stream_values response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling TimeSeriesValueBankProperty.stream_values: %s\\n\" % e)" - } - ], - "v2.cancelBuild": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# BuildRid | The RID of a Build.\nbuild_rid = \"ri.foundry.main.build.a4386b7e-d546-49be-8a36-eefc355f5c58\"\n\n\ntry:\n api_response = client.orchestration.Build.cancel(build_rid)\n print(\"The cancel response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Build.cancel: %s\\n\" % e)" - } - ], - "v2.createBuild": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# FallbackBranches\nfallback_branches = []\n# BuildTarget | The targets of the schedule.\ntarget = {\n \"type\": \"manual\",\n \"targetRids\": [\n \"ri.foundry.main.dataset.4263bdd9-d6bc-4244-9cca-893c1a2aef62\",\n \"ri.foundry.main.dataset.86939c1e-4256-41db-9fe7-e7ee9e0f752a\",\n ],\n}\n# Optional[AbortOnFailure]\nabort_on_failure = False\n# Optional[BranchName] | The target branch the build should run on.\nbranch_name = \"master\"\n# Optional[ForceBuild]\nforce_build = None\n# Optional[NotificationsEnabled]\nnotifications_enabled = None\n# Optional[RetryBackoffDuration]\nretry_backoff_duration = {\"unit\": \"SECONDS\", \"value\": 30}\n# Optional[RetryCount] | The number of retry attempts for failed jobs.\nretry_count = 1\n\n\ntry:\n api_response = client.orchestration.Build.create(\n fallback_branches=fallback_branches,\n target=target,\n abort_on_failure=abort_on_failure,\n branch_name=branch_name,\n force_build=force_build,\n notifications_enabled=notifications_enabled,\n retry_backoff_duration=retry_backoff_duration,\n retry_count=retry_count,\n )\n print(\"The create response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Build.create: %s\\n\" % e)" - } - ], - "v2.getBuild": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# BuildRid | The RID of a Build.\nbuild_rid = \"ri.foundry.main.build.a4386b7e-d546-49be-8a36-eefc355f5c58\"\n\n\ntry:\n api_response = client.orchestration.Build.get(build_rid)\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Build.get: %s\\n\" % e)" - } - ], - "v2.getBuildsBatch": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# List[GetBuildsBatchRequestElement] | Body of the request\nbody = [{\"buildRid\": \"ri.foundry.main.build.a4386b7e-d546-49be-8a36-eefc355f5c58\"}]\n\n\ntry:\n api_response = client.orchestration.Build.get_batch(body)\n print(\"The get_batch response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Build.get_batch: %s\\n\" % e)" - } - ], - "v2.listJobsOfBuild": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# BuildRid | The RID of a Build.\nbuild_rid = \"ri.foundry.main.build.a4386b7e-d546-49be-8a36-eefc355f5c58\"\n# Optional[PageSize] | The page size to use for the endpoint.\npage_size = None\n# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request.\npage_token = None\n\n\ntry:\n for build in client.orchestration.Build.jobs(\n build_rid, page_size=page_size, page_token=page_token\n ):\n pprint(build)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Build.jobs: %s\\n\" % e)" - } - ], - "v2.searchBuilds": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# SearchBuildsFilter\nwhere = None\n# Optional[SearchBuildsOrderBy]\norder_by = {\"fields\": [{\"field\": \"STARTED_TIME\", \"direction\": \"ASC\"}]}\n# Optional[PageSize] | The page size for the search request. If no value is provided, a default of `100` will be used.\npage_size = 100\n# Optional[PageToken]\npage_token = \"v1.QnVpbGQgdGhlIEZ1dHVyZTogaHR0cHM6Ly93d3cucGFsYW50aXIuY29tL2NhcmVlcnMvP2xldmVyLXNvdXJjZSU1YiU1ZD1BUElEb2NzI29wZW4tcG9zaXRpb25z\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.orchestration.Build.search(\n where=where, order_by=order_by, page_size=page_size, page_token=page_token, preview=preview\n )\n print(\"The search response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Build.search: %s\\n\" % e)" - } - ], - "v2.getJob": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# JobRid | The RID of a Job.\njob_rid = \"ri.foundry.main.job.aaf94076-d773-4732-a1df-3b638eb50448\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.orchestration.Job.get(job_rid, preview=preview)\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Job.get: %s\\n\" % e)" - } - ], - "v2.getJobsBatch": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# List[GetJobsBatchRequestElement] | Body of the request\nbody = [{\"jobRid\": \"ri.foundry.main.job.aaf94076-d773-4732-a1df-3b638eb50448\"}]\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.orchestration.Job.get_batch(body, preview=preview)\n print(\"The get_batch response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Job.get_batch: %s\\n\" % e)" - } - ], - "v2.createSchedule": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# CreateScheduleRequestAction\naction = {\n \"abortOnFailure\": False,\n \"forceBuild\": False,\n \"retryBackoffDuration\": {\"unit\": \"SECONDS\", \"value\": 30},\n \"retryCount\": 1,\n \"fallbackBranches\": [],\n \"branchName\": \"master\",\n \"notificationsEnabled\": False,\n \"target\": {\n \"type\": \"manual\",\n \"targetRids\": [\n \"ri.foundry.main.dataset.b737e24d-6b19-43aa-93d5-da9fc4073f6e\",\n \"ri.foundry.main.dataset.d2452a94-a755-4778-8bfc-a315ab52fc43\",\n ],\n },\n}\n# Optional[str]\ndescription = \"Run all the transforms at midnight\"\n# Optional[str]\ndisplay_name = \"My Daily Schedule\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n# Optional[CreateScheduleRequestScopeMode]\nscope_mode = {\"type\": \"user\"}\n# Optional[Trigger] | The schedule trigger. If the requesting user does not have permission to see the trigger, this will be empty.\ntrigger = {\"type\": \"time\", \"cronExpression\": \"0 0 * * *\", \"timeZone\": \"UTC\"}\n\n\ntry:\n api_response = client.orchestration.Schedule.create(\n action=action,\n description=description,\n display_name=display_name,\n preview=preview,\n scope_mode=scope_mode,\n trigger=trigger,\n )\n print(\"The create response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Schedule.create: %s\\n\" % e)" - } - ], - "v2.deleteSchedule": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ScheduleRid\nschedule_rid = None\n\n\ntry:\n api_response = client.orchestration.Schedule.delete(schedule_rid)\n print(\"The delete response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Schedule.delete: %s\\n\" % e)" - } - ], - "v2.getSchedule": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ScheduleRid\nschedule_rid = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.orchestration.Schedule.get(schedule_rid, preview=preview)\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Schedule.get: %s\\n\" % e)" - } - ], - "v2.getAffectedResourcesSchedule": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ScheduleRid\nschedule_rid = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.orchestration.Schedule.get_affected_resources(\n schedule_rid, preview=preview\n )\n print(\"The get_affected_resources response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Schedule.get_affected_resources: %s\\n\" % e)" - } - ], - "v2.getSchedulesBatch": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# List[GetSchedulesBatchRequestElement] | Body of the request\nbody = [{\"scheduleRid\": \"ri.scheduler.main.schedule.5ad5c340-59f3-4a60-9fc6-161bb984f871\"}]\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.orchestration.Schedule.get_batch(body, preview=preview)\n print(\"The get_batch response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Schedule.get_batch: %s\\n\" % e)" - } - ], - "v2.pauseSchedule": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ScheduleRid\nschedule_rid = None\n\n\ntry:\n api_response = client.orchestration.Schedule.pause(schedule_rid)\n print(\"The pause response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Schedule.pause: %s\\n\" % e)" - } - ], - "v2.replaceSchedule": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ScheduleRid\nschedule_rid = None\n# ReplaceScheduleRequestAction\naction = {\n \"abortOnFailure\": False,\n \"forceBuild\": False,\n \"retryBackoffDuration\": {\"unit\": \"SECONDS\", \"value\": 30},\n \"retryCount\": 1,\n \"fallbackBranches\": [],\n \"branchName\": \"master\",\n \"notificationsEnabled\": False,\n \"target\": {\n \"type\": \"manual\",\n \"targetRids\": [\n \"ri.foundry.main.dataset.b737e24d-6b19-43aa-93d5-da9fc4073f6e\",\n \"ri.foundry.main.dataset.d2452a94-a755-4778-8bfc-a315ab52fc43\",\n ],\n },\n}\n# Optional[str]\ndescription = \"Run all the transforms at midnight\"\n# Optional[str]\ndisplay_name = \"My Daily Schedule\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n# Optional[ReplaceScheduleRequestScopeMode]\nscope_mode = {\"type\": \"user\"}\n# Optional[Trigger] | The schedule trigger. If the requesting user does not have permission to see the trigger, this will be empty.\ntrigger = {\"type\": \"time\", \"cronExpression\": \"0 0 * * *\", \"timeZone\": \"UTC\"}\n\n\ntry:\n api_response = client.orchestration.Schedule.replace(\n schedule_rid,\n action=action,\n description=description,\n display_name=display_name,\n preview=preview,\n scope_mode=scope_mode,\n trigger=trigger,\n )\n print(\"The replace response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Schedule.replace: %s\\n\" % e)" - } - ], - "v2.runSchedule": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ScheduleRid\nschedule_rid = None\n\n\ntry:\n api_response = client.orchestration.Schedule.run(schedule_rid)\n print(\"The run response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Schedule.run: %s\\n\" % e)" - } - ], - "v2.listRunsOfSchedule": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ScheduleRid\nschedule_rid = None\n# Optional[PageSize] | The page size to use for the endpoint.\npage_size = None\n# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request.\npage_token = None\n\n\ntry:\n for schedule in client.orchestration.Schedule.runs(\n schedule_rid, page_size=page_size, page_token=page_token\n ):\n pprint(schedule)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Schedule.runs: %s\\n\" % e)" - } - ], - "v2.unpauseSchedule": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ScheduleRid\nschedule_rid = None\n\n\ntry:\n api_response = client.orchestration.Schedule.unpause(schedule_rid)\n print(\"The unpause response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Schedule.unpause: %s\\n\" % e)" - } - ], - "v2.getScheduleVersion": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ScheduleVersionRid | The RID of a schedule version\nschedule_version_rid = \"ri.scheduler.main.schedule-version.4d1eb55f-6c13-411c-a911-5d84e08d8017\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.orchestration.ScheduleVersion.get(schedule_version_rid, preview=preview)\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling ScheduleVersion.get: %s\\n\" % e)" - } - ], - "v2.getScheduleOfScheduleVersion": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ScheduleVersionRid | The RID of a schedule version\nschedule_version_rid = \"ri.scheduler.main.schedule-version.4d1eb55f-6c13-411c-a911-5d84e08d8017\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.orchestration.ScheduleVersion.schedule(\n schedule_version_rid, preview=preview\n )\n print(\"The schedule response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling ScheduleVersion.schedule: %s\\n\" % e)" - } - ], - "v2.cancelSqlQuery": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# SqlQueryId | The id of a query.\nsql_query_id = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.sql_queries.SqlQuery.cancel(sql_query_id, preview=preview)\n print(\"The cancel response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling SqlQuery.cancel: %s\\n\" % e)" - } - ], - "v2.executeSqlQuery": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# str | The SQL query to execute. Queries should conform to the [Spark SQL dialect](https://spark.apache.org/docs/latest/sql-ref.html). This supports SELECT queries only. Datasets can be referenced in SQL queries by path or by RID. See the [documentation](https://www.palantir.com/docs/foundry/analytics-connectivity/odbc-jdbc-drivers/#use-sql-to-query-foundry-datasets) for more details.\nquery = \"SELECT * FROM `/Path/To/Dataset`\"\n# Optional[List[BranchName]] | The list of branch ids to use as fallbacks if the query fails to execute on the primary branch. If a is not explicitly provided in the SQL query, the resource will be queried on the first fallback branch provided that exists. If no fallback branches are provided the default branch is used. This is `master` for most enrollments.\nfallback_branch_ids = [\"master\"]\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.sql_queries.SqlQuery.execute(\n query=query, fallback_branch_ids=fallback_branch_ids, preview=preview\n )\n print(\"The execute response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling SqlQuery.execute: %s\\n\" % e)" - } - ], - "v2.getResultsSqlQuery": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# SqlQueryId | The id of a query.\nsql_query_id = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.sql_queries.SqlQuery.get_results(sql_query_id, preview=preview)\n print(\"The get_results response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling SqlQuery.get_results: %s\\n\" % e)" - } - ], - "v2.getStatusSqlQuery": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# SqlQueryId | The id of a query.\nsql_query_id = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.sql_queries.SqlQuery.get_status(sql_query_id, preview=preview)\n print(\"The get_status response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling SqlQuery.get_status: %s\\n\" % e)" - } - ], - "v2.createStreamingDataset": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetName\nname = \"My Dataset\"\n# FolderRid\nparent_folder_rid = \"ri.compass.main.folder.c410f510-2937-420e-8ea3-8c9bcb3c1791\"\n# StreamSchema | The Foundry schema to apply to the new stream.\nschema = {\n \"fields\": [\n {\"name\": \"timestamp\", \"schema\": {\"nullable\": False, \"dataType\": {\"type\": \"timestamp\"}}},\n {\"name\": \"value\", \"schema\": {\"nullable\": False, \"dataType\": {\"type\": \"string\"}}},\n ],\n \"keyFieldNames\": [\"timestamp\"],\n}\n# Optional[BranchName] | The branch to create the initial stream on. If not specified, the default branch will be used ('master' for most enrollments).\nbranch_name = \"master\"\n# Optional[Compressed] | Whether or not compression is enabled for the stream. Defaults to false.\ncompressed = False\n# Optional[PartitionsCount] | The number of partitions for the Foundry stream. Generally, each partition can handle about 5 mb/s of data, so for higher volume streams, more partitions are recommended. If not specified, 1 partition is used. This value cannot be changed later.\npartitions_count = 1\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n# Optional[StreamType] | A conceptual representation of the expected shape of the data for a stream. HIGH_THROUGHPUT and LOW_LATENCY are not compatible with each other. Defaults to LOW_LATENCY.\nstream_type = \"LOW_LATENCY\"\n\n\ntry:\n api_response = client.streams.Dataset.create(\n name=name,\n parent_folder_rid=parent_folder_rid,\n schema=schema,\n branch_name=branch_name,\n compressed=compressed,\n partitions_count=partitions_count,\n preview=preview,\n stream_type=stream_type,\n )\n print(\"The create response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Dataset.create: %s\\n\" % e)" - } - ], - "v2.createStream": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid\ndataset_rid = None\n# BranchName\nbranch_name = \"master\"\n# CreateStreamRequestStreamSchema | The Foundry schema for this stream.\nschema = None\n# Optional[Compressed] | Whether or not compression is enabled for the stream. Defaults to false.\ncompressed = False\n# Optional[PartitionsCount] | The number of partitions for the Foundry stream. Defaults to 1. Generally, each partition can handle about 5 mb/s of data, so for higher volume streams, more partitions are recommended.\npartitions_count = 1\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n# Optional[StreamType] | A conceptual representation of the expected shape of the data for a stream. HIGH_THROUGHPUT and LOW_LATENCY are not compatible with each other. Defaults to LOW_LATENCY.\nstream_type = \"LOW_LATENCY\"\n\n\ntry:\n api_response = client.streams.Dataset.Stream.create(\n dataset_rid,\n branch_name=branch_name,\n schema=schema,\n compressed=compressed,\n partitions_count=partitions_count,\n preview=preview,\n stream_type=stream_type,\n )\n print(\"The create response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Stream.create: %s\\n\" % e)" - } - ], - "v2.getStream": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid\ndataset_rid = None\n# BranchName\nstream_branch_name = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.streams.Dataset.Stream.get(\n dataset_rid, stream_branch_name, preview=preview\n )\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Stream.get: %s\\n\" % e)" - } - ], - "v2.publishBinaryRecordToStream": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid\ndataset_rid = None\n# BranchName\nstream_branch_name = None\n# bytes | The binary record to publish to the stream\nbody = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n# Optional[ViewRid] | If provided, this operation will only write to the stream corresponding to the specified view rid. If not provided, this operation will write to the latest stream on the branch. Providing this value is an advanced configuration, to be used when additional control over the underlying streaming data structures is needed.\nview_rid = None\n\n\ntry:\n api_response = client.streams.Dataset.Stream.publish_binary_record(\n dataset_rid, stream_branch_name, body, preview=preview, view_rid=view_rid\n )\n print(\"The publish_binary_record response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Stream.publish_binary_record: %s\\n\" % e)" - } - ], - "v2.publishRecordToStream": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid\ndataset_rid = None\n# BranchName\nstream_branch_name = None\n# Record | The record to publish to the stream\nrecord = {\"timestamp\": 1731426022784, \"value\": \"Hello, World!\"}\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n# Optional[ViewRid] | If provided, this endpoint will only write to the stream corresponding to the specified view rid. If not provided, this endpoint will write the latest stream on the branch. Providing this value is an advanced configuration, to be used when additional control over the underlying streaming data structures is needed.\nview_rid = \"ri.foundry-streaming.main.view.ecd4f0f6-8526-4468-9eda-14939449ad79\"\n\n\ntry:\n api_response = client.streams.Dataset.Stream.publish_record(\n dataset_rid, stream_branch_name, record=record, preview=preview, view_rid=view_rid\n )\n print(\"The publish_record response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Stream.publish_record: %s\\n\" % e)" - } - ], - "v2.publishRecordsToStream": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid\ndataset_rid = None\n# BranchName\nstream_branch_name = None\n# List[Record] | The records to publish to the stream\nrecords = [{\"timestamp\": 1731426022784, \"value\": \"Hello, World!\"}]\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n# Optional[ViewRid] | If provided, this endpoint will only write to the stream corresponding to the specified view rid. If not provided, this endpoint will write to the latest stream on the branch. Providing this value is an advanced configuration, to be used when additional control over the underlying streaming data structures is needed.\nview_rid = \"ri.foundry-streaming.main.view.ecd4f0f6-8526-4468-9eda-14939449ad79\"\n\n\ntry:\n api_response = client.streams.Dataset.Stream.publish_records(\n dataset_rid, stream_branch_name, records=records, preview=preview, view_rid=view_rid\n )\n print(\"The publish_records response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Stream.publish_records: %s\\n\" % e)" - } - ], - "v2.resetStream": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid\ndataset_rid = None\n# BranchName\nstream_branch_name = None\n# Optional[Compressed] | Whether or not compression is enabled for the stream. If omitted, the compression setting of the existing stream on the branch will be used.\ncompressed = False\n# Optional[PartitionsCount] | The number of partitions for the Foundry stream. Generally, each partition can handle about 5 mb/s of data, so for higher volume streams, more partitions are recommended. If omitted, the partitions count of the existing stream on the branch will be used.\npartitions_count = 1\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n# Optional[StreamSchema] | The Foundry schema to apply to the new stream. If omitted, the schema of the existing stream on the branch will be used.\nschema = {\n \"fields\": [\n {\"name\": \"timestamp\", \"schema\": {\"nullable\": False, \"dataType\": {\"type\": \"timestamp\"}}},\n {\"name\": \"value\", \"schema\": {\"nullable\": False, \"dataType\": {\"type\": \"string\"}}},\n ],\n \"keyFieldNames\": [\"timestamp\"],\n}\n# Optional[StreamType] | A conceptual representation of the expected shape of the data for a stream. HIGH_THROUGHPUT and LOW_LATENCY are not compatible with each other. Defaults to LOW_LATENCY. If omitted, the stream type of the existing stream on the branch will be used.\nstream_type = \"LOW_LATENCY\"\n\n\ntry:\n api_response = client.streams.Dataset.Stream.reset(\n dataset_rid,\n stream_branch_name,\n compressed=compressed,\n partitions_count=partitions_count,\n preview=preview,\n schema=schema,\n stream_type=stream_type,\n )\n print(\"The reset response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Stream.reset: %s\\n\" % e)" - } - ], - "v2.getThirdPartyApplication": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ThirdPartyApplicationRid | An RID identifying a third-party application created in Developer Console.\nthird_party_application_rid = (\n \"ri.third-party-applications.main.application.292db3b2-b653-4de6-971c-7e97a7b881d6\"\n)\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.third_party_applications.ThirdPartyApplication.get(\n third_party_application_rid, preview=preview\n )\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling ThirdPartyApplication.get: %s\\n\" % e)" - } - ], - "v2.deleteVersion": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ThirdPartyApplicationRid | An RID identifying a third-party application created in Developer Console.\nthird_party_application_rid = (\n \"ri.third-party-applications.main.application.292db3b2-b653-4de6-971c-7e97a7b881d6\"\n)\n# VersionVersion | The semantic version of the Website.\nversion_version = \"1.2.0\"\n\n\ntry:\n api_response = client.third_party_applications.ThirdPartyApplication.Website.Version.delete(\n third_party_application_rid, version_version\n )\n print(\"The delete response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Version.delete: %s\\n\" % e)" - } - ], - "v2.getVersion": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ThirdPartyApplicationRid | An RID identifying a third-party application created in Developer Console.\nthird_party_application_rid = (\n \"ri.third-party-applications.main.application.292db3b2-b653-4de6-971c-7e97a7b881d6\"\n)\n# VersionVersion | The semantic version of the Website.\nversion_version = \"1.2.0\"\n\n\ntry:\n api_response = client.third_party_applications.ThirdPartyApplication.Website.Version.get(\n third_party_application_rid, version_version\n )\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Version.get: %s\\n\" % e)" - } - ], - "v2.listVersions": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ThirdPartyApplicationRid | An RID identifying a third-party application created in Developer Console.\nthird_party_application_rid = (\n \"ri.third-party-applications.main.application.292db3b2-b653-4de6-971c-7e97a7b881d6\"\n)\n# Optional[PageSize] | The page size to use for the endpoint.\npage_size = None\n# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request.\npage_token = None\n\n\ntry:\n for version in client.third_party_applications.ThirdPartyApplication.Website.Version.list(\n third_party_application_rid, page_size=page_size, page_token=page_token\n ):\n pprint(version)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Version.list: %s\\n\" % e)" - } - ], - "v2.uploadVersion": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ThirdPartyApplicationRid | An RID identifying a third-party application created in Developer Console.\nthird_party_application_rid = (\n \"ri.third-party-applications.main.application.292db3b2-b653-4de6-971c-7e97a7b881d6\"\n)\n# bytes | The zip file that contains the contents of your application. For more information, refer to the [documentation](https://palantir.com/docs/foundry/ontology-sdk/deploy-osdk-application-on-foundry/) user documentation.\nbody = None\n# VersionVersion\nversion = None\n\n\ntry:\n api_response = client.third_party_applications.ThirdPartyApplication.Website.Version.upload(\n third_party_application_rid, body, version=version\n )\n print(\"The upload response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Version.upload: %s\\n\" % e)" - } - ], - "v2.uploadSnapshotVersion": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ThirdPartyApplicationRid | An RID identifying a third-party application created in Developer Console.\nthird_party_application_rid = (\n \"ri.third-party-applications.main.application.292db3b2-b653-4de6-971c-7e97a7b881d6\"\n)\n# bytes | The zip file that contains the contents of your application. For more information, refer to the [documentation](https://palantir.com/docs/foundry/ontology-sdk/deploy-osdk-application-on-foundry/) user documentation.\nbody = None\n# VersionVersion\nversion = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n# Optional[str] | The identifier of the snapshot. If the identifier follows the format `foundry.v1@@@`, PR preview for such identifier will be accessible from foundry code repositories.\nsnapshot_identifier = (\n \"foundry.v1@ri.stemma.main.repository.a@ri.pull-request.main.pull-request.a@hash\"\n)\n\n\ntry:\n api_response = (\n client.third_party_applications.ThirdPartyApplication.Website.Version.upload_snapshot(\n third_party_application_rid,\n body,\n version=version,\n preview=preview,\n snapshot_identifier=snapshot_identifier,\n )\n )\n print(\"The upload_snapshot response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Version.upload_snapshot: %s\\n\" % e)" - } - ], - "v2.deployWebsite": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ThirdPartyApplicationRid | An RID identifying a third-party application created in Developer Console.\nthird_party_application_rid = (\n \"ri.third-party-applications.main.application.292db3b2-b653-4de6-971c-7e97a7b881d6\"\n)\n# VersionVersion\nversion = \"1.2.0\"\n\n\ntry:\n api_response = client.third_party_applications.ThirdPartyApplication.Website.deploy(\n third_party_application_rid, version=version\n )\n print(\"The deploy response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Website.deploy: %s\\n\" % e)" - } - ], - "v2.getWebsite": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ThirdPartyApplicationRid | An RID identifying a third-party application created in Developer Console.\nthird_party_application_rid = (\n \"ri.third-party-applications.main.application.292db3b2-b653-4de6-971c-7e97a7b881d6\"\n)\n\n\ntry:\n api_response = client.third_party_applications.ThirdPartyApplication.Website.get(\n third_party_application_rid\n )\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Website.get: %s\\n\" % e)" - } - ], - "v2.undeployWebsite": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ThirdPartyApplicationRid | An RID identifying a third-party application created in Developer Console.\nthird_party_application_rid = (\n \"ri.third-party-applications.main.application.292db3b2-b653-4de6-971c-7e97a7b881d6\"\n)\n\n\ntry:\n api_response = client.third_party_applications.ThirdPartyApplication.Website.undeploy(\n third_party_application_rid\n )\n print(\"The undeploy response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Website.undeploy: %s\\n\" % e)" - } - ], - "v2.disableDevModeSettings": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.widgets.DevModeSettings.disable(preview=preview)\n print(\"The disable response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling DevModeSettings.disable: %s\\n\" % e)" - } - ], - "v2.enableDevModeSettings": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.widgets.DevModeSettings.enable(preview=preview)\n print(\"The enable response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling DevModeSettings.enable: %s\\n\" % e)" - } - ], - "v2.getDevModeSettings": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.widgets.DevModeSettings.get(preview=preview)\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling DevModeSettings.get: %s\\n\" % e)" - } - ], - "v2.pauseDevModeSettings": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.widgets.DevModeSettings.pause(preview=preview)\n print(\"The pause response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling DevModeSettings.pause: %s\\n\" % e)" - } - ], - "v2.setWidgetSetDevModeSettings": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# WidgetSetDevModeSettings\nsettings = {\n \"widgetSettings\": {\n \"ri.widgetregistry..widget.21dt2c42-b7df-4b23-880b-1436a3dred2e\": {\n \"stylesheetEntrypoints\": [{\"filePath\": \"dist/app.js\"}],\n \"scriptEntrypoints\": [{\"filePath\": \"dist/app.js\", \"scriptType\": \"DEFAULT\"}],\n }\n }\n}\n# WidgetSetRid\nwidget_set_rid = \"ri.widgetregistry..widget-set.21dt2c42-b7df-4b23-880b-1436a3dred2e\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.widgets.DevModeSettings.set_widget_set(\n settings=settings, widget_set_rid=widget_set_rid, preview=preview\n )\n print(\"The set_widget_set response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling DevModeSettings.set_widget_set: %s\\n\" % e)" - } - ], - "v2.setWidgetSetDevModeSettingsById": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# WidgetSetDevModeSettingsById\nsettings = {\n \"widgetSettings\": {\n \"myCustomWidget\": {\n \"stylesheetEntrypoints\": [{\"filePath\": \"dist/app.js\"}],\n \"scriptEntrypoints\": [{\"filePath\": \"dist/app.js\", \"scriptType\": \"DEFAULT\"}],\n }\n }\n}\n# WidgetSetRid\nwidget_set_rid = \"ri.widgetregistry..widget-set.21dt2c42-b7df-4b23-880b-1436a3dred2e\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.widgets.DevModeSettings.set_widget_set_by_id(\n settings=settings, widget_set_rid=widget_set_rid, preview=preview\n )\n print(\"The set_widget_set_by_id response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling DevModeSettings.set_widget_set_by_id: %s\\n\" % e)" - } - ], - "v2.deleteRelease": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# WidgetSetRid | A Resource Identifier (RID) identifying a widget set.\nwidget_set_rid = \"ri.widgetregistry..widget-set.21dt2c42-b7df-4b23-880b-1436a3dred2e\"\n# ReleaseVersion | The semantic version of the widget set.\nrelease_version = \"1.2.0\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.widgets.WidgetSet.Release.delete(\n widget_set_rid, release_version, preview=preview\n )\n print(\"The delete response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Release.delete: %s\\n\" % e)" - } - ], - "v2.getRelease": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# WidgetSetRid | A Resource Identifier (RID) identifying a widget set.\nwidget_set_rid = \"ri.widgetregistry..widget-set.21dt2c42-b7df-4b23-880b-1436a3dred2e\"\n# ReleaseVersion | The semantic version of the widget set.\nrelease_version = \"1.2.0\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.widgets.WidgetSet.Release.get(\n widget_set_rid, release_version, preview=preview\n )\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Release.get: %s\\n\" % e)" - } - ], - "v2.listReleases": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# WidgetSetRid | A Resource Identifier (RID) identifying a widget set.\nwidget_set_rid = \"ri.widgetregistry..widget-set.21dt2c42-b7df-4b23-880b-1436a3dred2e\"\n# Optional[PageSize] | The page size to use for the endpoint.\npage_size = None\n# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request.\npage_token = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n for release in client.widgets.WidgetSet.Release.list(\n widget_set_rid, page_size=page_size, page_token=page_token, preview=preview\n ):\n pprint(release)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Release.list: %s\\n\" % e)" - } - ], - "v2.getRepository": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# RepositoryRid | A Resource Identifier (RID) identifying a repository.\nrepository_rid = \"ri.stemma.main.repository.e1r31370-3cf3-4ac4-9269-h1432d7fb0b4\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.widgets.Repository.get(repository_rid, preview=preview)\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Repository.get: %s\\n\" % e)" - } - ], - "v2.publishRelease": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# RepositoryRid | A Resource Identifier (RID) identifying a repository.\nrepository_rid = \"ri.stemma.main.repository.e1r31370-3cf3-4ac4-9269-h1432d7fb0b4\"\n# bytes | The zip file that contains the contents of your widget set. It must include a valid manifest file at the path `.palantir/widgets.config.json`.\nbody = None\n# RepositoryVersion\nrepository_version = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.widgets.Repository.publish(\n repository_rid, body, repository_version=repository_version, preview=preview\n )\n print(\"The publish response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Repository.publish: %s\\n\" % e)" - } - ], - "v2.getWidgetSet": [ - { - "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# WidgetSetRid | A Resource Identifier (RID) identifying a widget set.\nwidget_set_rid = \"ri.widgetregistry..widget-set.21dt2c42-b7df-4b23-880b-1436a3dred2e\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.widgets.WidgetSet.get(widget_set_rid, preview=preview)\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling WidgetSet.get: %s\\n\" % e)" - } - ] - } - } - } -}; diff --git a/docs-snippets-npm/tsconfig.json b/docs-snippets-npm/tsconfig.json deleted file mode 100644 index 17361924c..000000000 --- a/docs-snippets-npm/tsconfig.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "$schema": "https://json.schemastore.org/tsconfig", - "compilerOptions": { - "target": "ES2022", - "module": "NodeNext", - "moduleResolution": "nodenext", - "declaration": true, - "isolatedModules": true, - "esModuleInterop": true, - "forceConsistentCasingInFileNames": true, - "strict": true, - "skipLibCheck": true, - "resolveJsonModule": true, - "outDir": "dist", - } -} diff --git a/docs/v1/Core/models/AnyType.md b/docs/v1/Core/models/AnyType.md deleted file mode 100644 index c21dbd0ac..000000000 --- a/docs/v1/Core/models/AnyType.md +++ /dev/null @@ -1,11 +0,0 @@ -# AnyType - -AnyType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["any"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Core/models/AttachmentType.md b/docs/v1/Core/models/AttachmentType.md deleted file mode 100644 index e477e43da..000000000 --- a/docs/v1/Core/models/AttachmentType.md +++ /dev/null @@ -1,11 +0,0 @@ -# AttachmentType - -AttachmentType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["attachment"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Core/models/Attribution.md b/docs/v1/Core/models/Attribution.md deleted file mode 100644 index 315597a06..000000000 --- a/docs/v1/Core/models/Attribution.md +++ /dev/null @@ -1,11 +0,0 @@ -# Attribution - -Attribution for a request - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Core/models/BinaryType.md b/docs/v1/Core/models/BinaryType.md deleted file mode 100644 index 3f2eeb8e5..000000000 --- a/docs/v1/Core/models/BinaryType.md +++ /dev/null @@ -1,11 +0,0 @@ -# BinaryType - -BinaryType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["binary"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Core/models/BooleanType.md b/docs/v1/Core/models/BooleanType.md deleted file mode 100644 index 9f7b2a5ce..000000000 --- a/docs/v1/Core/models/BooleanType.md +++ /dev/null @@ -1,11 +0,0 @@ -# BooleanType - -BooleanType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["boolean"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Core/models/ByteType.md b/docs/v1/Core/models/ByteType.md deleted file mode 100644 index 73fd151b5..000000000 --- a/docs/v1/Core/models/ByteType.md +++ /dev/null @@ -1,11 +0,0 @@ -# ByteType - -ByteType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["byte"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Core/models/CipherTextType.md b/docs/v1/Core/models/CipherTextType.md deleted file mode 100644 index 68c347ebb..000000000 --- a/docs/v1/Core/models/CipherTextType.md +++ /dev/null @@ -1,12 +0,0 @@ -# CipherTextType - -CipherTextType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**default_cipher_channel** | Optional[str] | No | An optional Cipher Channel RID which can be used for encryption updates to empty values. | -**type** | Literal["cipherText"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Core/models/ContentLength.md b/docs/v1/Core/models/ContentLength.md deleted file mode 100644 index ed0978250..000000000 --- a/docs/v1/Core/models/ContentLength.md +++ /dev/null @@ -1,11 +0,0 @@ -# ContentLength - -ContentLength - -## Type -```python -Long -``` - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Core/models/ContentType.md b/docs/v1/Core/models/ContentType.md deleted file mode 100644 index 5581ea1dc..000000000 --- a/docs/v1/Core/models/ContentType.md +++ /dev/null @@ -1,11 +0,0 @@ -# ContentType - -ContentType - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Core/models/DateType.md b/docs/v1/Core/models/DateType.md deleted file mode 100644 index 8af99d8ec..000000000 --- a/docs/v1/Core/models/DateType.md +++ /dev/null @@ -1,11 +0,0 @@ -# DateType - -DateType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["date"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Core/models/DecimalType.md b/docs/v1/Core/models/DecimalType.md deleted file mode 100644 index 56509a75f..000000000 --- a/docs/v1/Core/models/DecimalType.md +++ /dev/null @@ -1,13 +0,0 @@ -# DecimalType - -DecimalType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**precision** | Optional[int] | No | The total number of digits of the Decimal type. The maximum value is 38. | -**scale** | Optional[int] | No | The number of digits to the right of the decimal point. The maximum value is 38. | -**type** | Literal["decimal"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Core/models/DisplayName.md b/docs/v1/Core/models/DisplayName.md deleted file mode 100644 index c9557a979..000000000 --- a/docs/v1/Core/models/DisplayName.md +++ /dev/null @@ -1,11 +0,0 @@ -# DisplayName - -The display name of the entity. - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Core/models/DistanceUnit.md b/docs/v1/Core/models/DistanceUnit.md deleted file mode 100644 index 814647c07..000000000 --- a/docs/v1/Core/models/DistanceUnit.md +++ /dev/null @@ -1,18 +0,0 @@ -# DistanceUnit - -DistanceUnit - -| **Value** | -| --------- | -| `"MILLIMETERS"` | -| `"CENTIMETERS"` | -| `"METERS"` | -| `"KILOMETERS"` | -| `"INCHES"` | -| `"FEET"` | -| `"YARDS"` | -| `"MILES"` | -| `"NAUTICAL_MILES"` | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Core/models/DoubleType.md b/docs/v1/Core/models/DoubleType.md deleted file mode 100644 index 4988a3bfc..000000000 --- a/docs/v1/Core/models/DoubleType.md +++ /dev/null @@ -1,11 +0,0 @@ -# DoubleType - -DoubleType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["double"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Core/models/FilePath.md b/docs/v1/Core/models/FilePath.md deleted file mode 100644 index 141c8ea8a..000000000 --- a/docs/v1/Core/models/FilePath.md +++ /dev/null @@ -1,12 +0,0 @@ -# FilePath - -The path to a File within Foundry. Examples: `my-file.txt`, `path/to/my-file.jpg`, `dataframe.snappy.parquet`. - - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Core/models/Filename.md b/docs/v1/Core/models/Filename.md deleted file mode 100644 index bee714945..000000000 --- a/docs/v1/Core/models/Filename.md +++ /dev/null @@ -1,12 +0,0 @@ -# Filename - -The name of a File within Foundry. Examples: `my-file.txt`, `my-file.jpg`, `dataframe.snappy.parquet`. - - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Core/models/FloatType.md b/docs/v1/Core/models/FloatType.md deleted file mode 100644 index c17f112fc..000000000 --- a/docs/v1/Core/models/FloatType.md +++ /dev/null @@ -1,11 +0,0 @@ -# FloatType - -FloatType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["float"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Core/models/FolderRid.md b/docs/v1/Core/models/FolderRid.md deleted file mode 100644 index 2246753a9..000000000 --- a/docs/v1/Core/models/FolderRid.md +++ /dev/null @@ -1,11 +0,0 @@ -# FolderRid - -FolderRid - -## Type -```python -RID -``` - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Core/models/FoundryBranch.md b/docs/v1/Core/models/FoundryBranch.md deleted file mode 100644 index b94b25cd2..000000000 --- a/docs/v1/Core/models/FoundryBranch.md +++ /dev/null @@ -1,11 +0,0 @@ -# FoundryBranch - -The Foundry branch identifier, specifically its rid. Different identifier types may be used in the future as values. - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Core/models/IntegerType.md b/docs/v1/Core/models/IntegerType.md deleted file mode 100644 index 4da6e7810..000000000 --- a/docs/v1/Core/models/IntegerType.md +++ /dev/null @@ -1,11 +0,0 @@ -# IntegerType - -IntegerType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["integer"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Core/models/LongType.md b/docs/v1/Core/models/LongType.md deleted file mode 100644 index 073c3c0c1..000000000 --- a/docs/v1/Core/models/LongType.md +++ /dev/null @@ -1,11 +0,0 @@ -# LongType - -LongType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["long"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Core/models/MarkingType.md b/docs/v1/Core/models/MarkingType.md deleted file mode 100644 index 8d803aec4..000000000 --- a/docs/v1/Core/models/MarkingType.md +++ /dev/null @@ -1,11 +0,0 @@ -# MarkingType - -MarkingType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["marking"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Core/models/MediaType.md b/docs/v1/Core/models/MediaType.md deleted file mode 100644 index f84bf2422..000000000 --- a/docs/v1/Core/models/MediaType.md +++ /dev/null @@ -1,13 +0,0 @@ -# MediaType - -The [media type](https://www.iana.org/assignments/media-types/media-types.xhtml) of the file or attachment. -Examples: `application/json`, `application/pdf`, `application/octet-stream`, `image/jpeg` - - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Core/models/NullType.md b/docs/v1/Core/models/NullType.md deleted file mode 100644 index fc2eba1f5..000000000 --- a/docs/v1/Core/models/NullType.md +++ /dev/null @@ -1,11 +0,0 @@ -# NullType - -NullType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["null"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Core/models/OperationScope.md b/docs/v1/Core/models/OperationScope.md deleted file mode 100644 index bc6fddc32..000000000 --- a/docs/v1/Core/models/OperationScope.md +++ /dev/null @@ -1,11 +0,0 @@ -# OperationScope - -OperationScope - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Core/models/PageSize.md b/docs/v1/Core/models/PageSize.md deleted file mode 100644 index f443d776f..000000000 --- a/docs/v1/Core/models/PageSize.md +++ /dev/null @@ -1,11 +0,0 @@ -# PageSize - -The page size to use for the endpoint. - -## Type -```python -int -``` - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Core/models/PageToken.md b/docs/v1/Core/models/PageToken.md deleted file mode 100644 index 9e1f10590..000000000 --- a/docs/v1/Core/models/PageToken.md +++ /dev/null @@ -1,14 +0,0 @@ -# PageToken - -The page token indicates where to start paging. This should be omitted from the first page's request. -To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response -and use it to populate the `pageToken` field of the next request. - - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Core/models/PreviewMode.md b/docs/v1/Core/models/PreviewMode.md deleted file mode 100644 index 9b3dcfca3..000000000 --- a/docs/v1/Core/models/PreviewMode.md +++ /dev/null @@ -1,11 +0,0 @@ -# PreviewMode - -Enables the use of preview functionality. - -## Type -```python -bool -``` - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Core/models/ReleaseStatus.md b/docs/v1/Core/models/ReleaseStatus.md deleted file mode 100644 index 969fe8d5f..000000000 --- a/docs/v1/Core/models/ReleaseStatus.md +++ /dev/null @@ -1,13 +0,0 @@ -# ReleaseStatus - -The release status of the entity. - -| **Value** | -| --------- | -| `"ACTIVE"` | -| `"ENDORSED"` | -| `"EXPERIMENTAL"` | -| `"DEPRECATED"` | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Core/models/ShortType.md b/docs/v1/Core/models/ShortType.md deleted file mode 100644 index 5279f3e3c..000000000 --- a/docs/v1/Core/models/ShortType.md +++ /dev/null @@ -1,11 +0,0 @@ -# ShortType - -ShortType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["short"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Core/models/SizeBytes.md b/docs/v1/Core/models/SizeBytes.md deleted file mode 100644 index c6f4bd564..000000000 --- a/docs/v1/Core/models/SizeBytes.md +++ /dev/null @@ -1,11 +0,0 @@ -# SizeBytes - -The size of the file or attachment in bytes. - -## Type -```python -Long -``` - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Core/models/StringType.md b/docs/v1/Core/models/StringType.md deleted file mode 100644 index 8ace3c89c..000000000 --- a/docs/v1/Core/models/StringType.md +++ /dev/null @@ -1,11 +0,0 @@ -# StringType - -StringType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["string"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Core/models/StructFieldName.md b/docs/v1/Core/models/StructFieldName.md deleted file mode 100644 index 7d3ea5b62..000000000 --- a/docs/v1/Core/models/StructFieldName.md +++ /dev/null @@ -1,12 +0,0 @@ -# StructFieldName - -The name of a field in a `Struct`. - - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Core/models/TimestampType.md b/docs/v1/Core/models/TimestampType.md deleted file mode 100644 index df7a5d846..000000000 --- a/docs/v1/Core/models/TimestampType.md +++ /dev/null @@ -1,11 +0,0 @@ -# TimestampType - -TimestampType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["timestamp"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Core/models/TotalCount.md b/docs/v1/Core/models/TotalCount.md deleted file mode 100644 index f0ce4a9e5..000000000 --- a/docs/v1/Core/models/TotalCount.md +++ /dev/null @@ -1,12 +0,0 @@ -# TotalCount - -The total number of items across all pages. - - -## Type -```python -Long -``` - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Core/models/TraceParent.md b/docs/v1/Core/models/TraceParent.md deleted file mode 100644 index d9ee40cc5..000000000 --- a/docs/v1/Core/models/TraceParent.md +++ /dev/null @@ -1,11 +0,0 @@ -# TraceParent - -The W3C Trace Context `traceparent` header value used to propagate distributed tracing information for Foundry telemetry. See https://www.w3.org/TR/trace-context/#traceparent-header for more details. Note the 16 byte trace ID encoded in the header must be derived from a time based uuid to be used within Foundry. - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Core/models/TraceState.md b/docs/v1/Core/models/TraceState.md deleted file mode 100644 index a0f8f31f7..000000000 --- a/docs/v1/Core/models/TraceState.md +++ /dev/null @@ -1,11 +0,0 @@ -# TraceState - -The W3C Trace Context `tracestate` header value, which is used to propagate vendor specific distributed tracing information for Foundry telemetry. See https://www.w3.org/TR/trace-context/#tracestate-header for more details. - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Core/models/UnsupportedType.md b/docs/v1/Core/models/UnsupportedType.md deleted file mode 100644 index 4bcb6a9c9..000000000 --- a/docs/v1/Core/models/UnsupportedType.md +++ /dev/null @@ -1,12 +0,0 @@ -# UnsupportedType - -UnsupportedType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**unsupported_type** | str | Yes | | -**type** | Literal["unsupported"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Datasets/Branch.md b/docs/v1/Datasets/Branch.md deleted file mode 100644 index 6d2ef42ea..000000000 --- a/docs/v1/Datasets/Branch.md +++ /dev/null @@ -1,222 +0,0 @@ -# Branch - -Method | HTTP request | Release Stage | -------------- | ------------- | ----- | -[**create**](#create) | **POST** /v1/datasets/{datasetRid}/branches | Stable | -[**delete**](#delete) | **DELETE** /v1/datasets/{datasetRid}/branches/{branchId} | Stable | -[**get**](#get) | **GET** /v1/datasets/{datasetRid}/branches/{branchId} | Stable | -[**list**](#list) | **GET** /v1/datasets/{datasetRid}/branches | Stable | - -# **create** -Creates a branch on an existing dataset. A branch may optionally point to a (committed) transaction. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**dataset_rid** | DatasetRid | The Resource Identifier (RID) of the Dataset on which to create the Branch. | | -**branch_id** | BranchId | | | -**transaction_rid** | Optional[TransactionRid] | | [optional] | - -### Return type -**Branch** - -### Example - -```python -from foundry_sdk.v1 import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# DatasetRid | The Resource Identifier (RID) of the Dataset on which to create the Branch. -dataset_rid = "ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da" -# BranchId -branch_id = "my-branch" -# Optional[TransactionRid] -transaction_rid = None - - -try: - api_response = client.datasets.Dataset.Branch.create( - dataset_rid, branch_id=branch_id, transaction_rid=transaction_rid - ) - print("The create response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Branch.create: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | Branch | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v1-link) [[Back to Model list]](../../../README.md#models-v1-link) [[Back to README]](../../../README.md) - -# **delete** -Deletes the Branch with the given BranchId. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**dataset_rid** | DatasetRid | The Resource Identifier (RID) of the Dataset that contains the Branch. | | -**branch_id** | BranchId | The identifier (name) of the Branch. | | - -### Return type -**None** - -### Example - -```python -from foundry_sdk.v1 import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# DatasetRid | The Resource Identifier (RID) of the Dataset that contains the Branch. -dataset_rid = "ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da" -# BranchId | The identifier (name) of the Branch. -branch_id = "my-branch" - - -try: - api_response = client.datasets.Dataset.Branch.delete(dataset_rid, branch_id) - print("The delete response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Branch.delete: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**204** | None | Branch deleted. | None | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v1-link) [[Back to Model list]](../../../README.md#models-v1-link) [[Back to README]](../../../README.md) - -# **get** -Get a Branch of a Dataset. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**dataset_rid** | DatasetRid | The Resource Identifier (RID) of the Dataset that contains the Branch. | | -**branch_id** | BranchId | The identifier (name) of the Branch. | | - -### Return type -**Branch** - -### Example - -```python -from foundry_sdk.v1 import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# DatasetRid | The Resource Identifier (RID) of the Dataset that contains the Branch. -dataset_rid = "ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da" -# BranchId | The identifier (name) of the Branch. -branch_id = "master" - - -try: - api_response = client.datasets.Dataset.Branch.get(dataset_rid, branch_id) - print("The get response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Branch.get: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | Branch | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v1-link) [[Back to Model list]](../../../README.md#models-v1-link) [[Back to README]](../../../README.md) - -# **list** -Lists the Branches of a Dataset. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**dataset_rid** | DatasetRid | The Resource Identifier (RID) of the Dataset on which to list Branches. | | -**page_size** | Optional[PageSize] | The desired size of the page to be returned. Defaults to 1,000. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. | [optional] | -**page_token** | Optional[PageToken] | | [optional] | - -### Return type -**ListBranchesResponse** - -### Example - -```python -from foundry_sdk.v1 import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# DatasetRid | The Resource Identifier (RID) of the Dataset on which to list Branches. -dataset_rid = "ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da" -# Optional[PageSize] | The desired size of the page to be returned. Defaults to 1,000. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. -page_size = None -# Optional[PageToken] -page_token = None - - -try: - for branch in client.datasets.Dataset.Branch.list( - dataset_rid, page_size=page_size, page_token=page_token - ): - pprint(branch) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Branch.list: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | ListBranchesResponse | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v1-link) [[Back to Model list]](../../../README.md#models-v1-link) [[Back to README]](../../../README.md) - diff --git a/docs/v1/Datasets/Dataset.md b/docs/v1/Datasets/Dataset.md deleted file mode 100644 index bac40a9f8..000000000 --- a/docs/v1/Datasets/Dataset.md +++ /dev/null @@ -1,420 +0,0 @@ -# Dataset - -Method | HTTP request | Release Stage | -------------- | ------------- | ----- | -[**create**](#create) | **POST** /v1/datasets | Stable | -[**delete_schema**](#delete_schema) | **DELETE** /v1/datasets/{datasetRid}/schema | Private Beta | -[**get**](#get) | **GET** /v1/datasets/{datasetRid} | Stable | -[**get_schema**](#get_schema) | **GET** /v1/datasets/{datasetRid}/schema | Private Beta | -[**read**](#read) | **GET** /v1/datasets/{datasetRid}/readTable | Stable | -[**replace_schema**](#replace_schema) | **PUT** /v1/datasets/{datasetRid}/schema | Private Beta | - -# **create** -Creates a new Dataset. A default branch - `master` for most enrollments - will be created on the Dataset. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**name** | DatasetName | | | -**parent_folder_rid** | FolderRid | | | - -### Return type -**Dataset** - -### Example - -```python -from foundry_sdk.v1 import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# DatasetName -name = "My Dataset" -# FolderRid -parent_folder_rid = "ri.foundry.main.folder.bfe58487-4c56-4c58-aba7-25defd6163c4" - - -try: - api_response = client.datasets.Dataset.create(name=name, parent_folder_rid=parent_folder_rid) - print("The create response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Dataset.create: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | Dataset | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v1-link) [[Back to Model list]](../../../README.md#models-v1-link) [[Back to README]](../../../README.md) - -# **delete_schema** -Deletes the Schema from a Dataset and Branch. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**dataset_rid** | DatasetRid | The RID of the Dataset on which to delete the schema. | | -**branch_id** | Optional[BranchId] | The ID of the Branch on which to delete the schema. | [optional] | -**preview** | Optional[PreviewMode] | | [optional] | -**transaction_rid** | Optional[TransactionRid] | The RID of the Transaction on which to delete the schema. | [optional] | - -### Return type -**None** - -### Example - -```python -from foundry_sdk.v1 import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# DatasetRid | The RID of the Dataset on which to delete the schema. -dataset_rid = None -# Optional[BranchId] | The ID of the Branch on which to delete the schema. -branch_id = None -# Optional[PreviewMode] -preview = True -# Optional[TransactionRid] | The RID of the Transaction on which to delete the schema. -transaction_rid = None - - -try: - api_response = client.datasets.Dataset.delete_schema( - dataset_rid, branch_id=branch_id, preview=preview, transaction_rid=transaction_rid - ) - print("The delete_schema response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Dataset.delete_schema: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**204** | None | Schema deleted. | None | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v1-link) [[Back to Model list]](../../../README.md#models-v1-link) [[Back to README]](../../../README.md) - -# **get** -Gets the Dataset with the given DatasetRid. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**dataset_rid** | DatasetRid | | | - -### Return type -**Dataset** - -### Example - -```python -from foundry_sdk.v1 import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# DatasetRid -dataset_rid = "ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da" - - -try: - api_response = client.datasets.Dataset.get(dataset_rid) - print("The get response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Dataset.get: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | Dataset | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v1-link) [[Back to Model list]](../../../README.md#models-v1-link) [[Back to README]](../../../README.md) - -# **get_schema** -Retrieves the Schema for a Dataset and Branch, if it exists. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**dataset_rid** | DatasetRid | The RID of the Dataset. | | -**branch_id** | Optional[BranchId] | The ID of the Branch. | [optional] | -**preview** | Optional[PreviewMode] | | [optional] | -**transaction_rid** | Optional[TransactionRid] | The TransactionRid that contains the Schema. | [optional] | - -### Return type -**Optional[Any]** - -### Example - -```python -from foundry_sdk.v1 import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# DatasetRid | The RID of the Dataset. -dataset_rid = None -# Optional[BranchId] | The ID of the Branch. -branch_id = None -# Optional[PreviewMode] -preview = True -# Optional[TransactionRid] | The TransactionRid that contains the Schema. -transaction_rid = None - - -try: - api_response = client.datasets.Dataset.get_schema( - dataset_rid, branch_id=branch_id, preview=preview, transaction_rid=transaction_rid - ) - print("The get_schema response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Dataset.get_schema: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | Optional[Any] | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v1-link) [[Back to Model list]](../../../README.md#models-v1-link) [[Back to README]](../../../README.md) - -# **read** -Gets the content of a dataset as a table in the specified format. - -This endpoint currently does not support views (virtual datasets composed of other datasets). For more information, refer to the [views documentation](https://palantir.com/docs/foundry/data-integration/views). - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**dataset_rid** | DatasetRid | The RID of the Dataset. | | -**format** | TableExportFormat | The export format. Must be `ARROW` or `CSV`. | | -**branch_id** | Optional[BranchId] | The identifier (name) of the Branch. | [optional] | -**columns** | Optional[List[str]] | A subset of the dataset columns to include in the result. Defaults to all columns. | [optional] | -**end_transaction_rid** | Optional[TransactionRid] | The Resource Identifier (RID) of the end Transaction. | [optional] | -**row_limit** | Optional[int] | A limit on the number of rows to return. Note that row ordering is non-deterministic. | [optional] | -**start_transaction_rid** | Optional[TransactionRid] | The Resource Identifier (RID) of the start Transaction. | [optional] | - -### Return type -**bytes** - -### Example - -```python -from foundry_sdk.v1 import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# DatasetRid | The RID of the Dataset. -dataset_rid = None -# TableExportFormat | The export format. Must be `ARROW` or `CSV`. -format = "CSV" -# Optional[BranchId] | The identifier (name) of the Branch. -branch_id = None -# Optional[List[str]] | A subset of the dataset columns to include in the result. Defaults to all columns. -columns = None -# Optional[TransactionRid] | The Resource Identifier (RID) of the end Transaction. -end_transaction_rid = None -# Optional[int] | A limit on the number of rows to return. Note that row ordering is non-deterministic. -row_limit = None -# Optional[TransactionRid] | The Resource Identifier (RID) of the start Transaction. -start_transaction_rid = None - - -try: - api_response = client.datasets.Dataset.read( - dataset_rid, - format=format, - branch_id=branch_id, - columns=columns, - end_transaction_rid=end_transaction_rid, - row_limit=row_limit, - start_transaction_rid=start_transaction_rid, - ) - print("The read response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Dataset.read: %s\n" % e) - -``` - -### Read a Foundry Dataset as a CSV - -```python -import foundry -from foundry.models import TableExportFormat -from foundry import PalantirRPCException - -foundry_client = foundry.FoundryV1Client(auth=foundry.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -try: - api_response = foundry_client.datasets.Dataset.read( - dataset_rid="...", format="CSV", columns=[...] - ) - - with open("my_table.csv", "wb") as f: - f.write(api_response) -except PalantirRPCException as e: - print("PalantirRPCException when calling DatasetsApiServiceApi -> read: %s\n" % e) -``` - -### Read a Foundry Dataset into a Pandas DataFrame - -> [!IMPORTANT] -> For this example to work, you will need to have `pyarrow` installed in your Python environment. - -```python -import foundry -from foundry.models import TableExportFormat -from foundry import PalantirRPCException -import pyarrow as pa - -foundry_client = foundry.FoundryV1Client(auth=foundry.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -try: - api_response = foundry_client.datasets.Dataset.read(dataset_rid="...", format="ARROW", columns=[...]) - df = pa.ipc.open_stream(api_response).read_all().to_pandas() - print(df) -except Exception as e: - print("Exception when calling DatasetsApiServiceApi -> read: %s\n" % e) -``` - -``` - id word length double boolean -0 0 A 1.0 11.878200 1 -1 1 a 1.0 11.578800 0 -2 2 aa 2.0 15.738500 1 -3 3 aal 3.0 6.643900 0 -4 4 aalii 5.0 2.017730 1 -... ... ... ... ... ... -235881 235881 zythem 6.0 19.427400 1 -235882 235882 Zythia 6.0 14.397100 1 -235883 235883 zythum 6.0 3.385820 0 -235884 235884 Zyzomys 7.0 6.208830 1 -235885 235885 Zyzzogeton 10.0 0.947821 0 - -[235886 rows x 5 columns] -``` - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | bytes | The content stream. | */* | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v1-link) [[Back to Model list]](../../../README.md#models-v1-link) [[Back to README]](../../../README.md) - -# **replace_schema** -Puts a Schema on an existing Dataset and Branch. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**dataset_rid** | DatasetRid | The RID of the Dataset on which to put the Schema. | | -**body** | Any | Body of the request | | -**branch_id** | Optional[BranchId] | The ID of the Branch on which to put the Schema. | [optional] | -**preview** | Optional[PreviewMode] | | [optional] | - -### Return type -**None** - -### Example - -```python -from foundry_sdk.v1 import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# DatasetRid | The RID of the Dataset on which to put the Schema. -dataset_rid = None -# Any | Body of the request -body = None -# Optional[BranchId] | The ID of the Branch on which to put the Schema. -branch_id = None -# Optional[PreviewMode] -preview = True - - -try: - api_response = client.datasets.Dataset.replace_schema( - dataset_rid, body, branch_id=branch_id, preview=preview - ) - print("The replace_schema response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Dataset.replace_schema: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**204** | None | | None | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v1-link) [[Back to Model list]](../../../README.md#models-v1-link) [[Back to README]](../../../README.md) - diff --git a/docs/v1/Datasets/File.md b/docs/v1/Datasets/File.md deleted file mode 100644 index d8a2971af..000000000 --- a/docs/v1/Datasets/File.md +++ /dev/null @@ -1,460 +0,0 @@ -# File - -Method | HTTP request | Release Stage | -------------- | ------------- | ----- | -[**delete**](#delete) | **DELETE** /v1/datasets/{datasetRid}/files/{filePath} | Stable | -[**get**](#get) | **GET** /v1/datasets/{datasetRid}/files/{filePath} | Stable | -[**list**](#list) | **GET** /v1/datasets/{datasetRid}/files | Stable | -[**read**](#read) | **GET** /v1/datasets/{datasetRid}/files/{filePath}/content | Stable | -[**upload**](#upload) | **POST** /v1/datasets/{datasetRid}/files:upload | Stable | - -# **delete** -Deletes a File from a Dataset. By default the file is deleted in a new transaction on the default -branch - `master` for most enrollments. The file will still be visible on historical views. - -#### Advanced Usage - -See [Datasets Core Concepts](https://palantir.com/docs/foundry/data-integration/datasets/) for details on using branches and transactions. - -To **delete a File from a specific Branch** specify the Branch's identifier as `branchId`. A new delete Transaction -will be created and committed on this branch. - -To **delete a File using a manually opened Transaction**, specify the Transaction's resource identifier -as `transactionRid`. The transaction must be of type `DELETE`. This is useful for deleting multiple files in a -single transaction. See [createTransaction](https://palantir.com/docs/foundry/api/datasets-resources/transactions/create-transaction/) to -open a transaction. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**dataset_rid** | DatasetRid | The Resource Identifier (RID) of the Dataset on which to delete the File. | | -**file_path** | FilePath | The File path within the Dataset. | | -**branch_id** | Optional[BranchId] | The identifier (name) of the Branch on which to delete the File. Defaults to `master` for most enrollments. | [optional] | -**transaction_rid** | Optional[TransactionRid] | The Resource Identifier (RID) of the open delete Transaction on which to delete the File. | [optional] | - -### Return type -**None** - -### Example - -```python -from foundry_sdk.v1 import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# DatasetRid | The Resource Identifier (RID) of the Dataset on which to delete the File. -dataset_rid = "ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da" -# FilePath | The File path within the Dataset. -file_path = "q3-data%2fmy-file.csv" -# Optional[BranchId] | The identifier (name) of the Branch on which to delete the File. Defaults to `master` for most enrollments. -branch_id = None -# Optional[TransactionRid] | The Resource Identifier (RID) of the open delete Transaction on which to delete the File. -transaction_rid = None - - -try: - api_response = client.datasets.Dataset.File.delete( - dataset_rid, file_path, branch_id=branch_id, transaction_rid=transaction_rid - ) - print("The delete response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling File.delete: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**204** | None | File deleted. | None | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v1-link) [[Back to Model list]](../../../README.md#models-v1-link) [[Back to README]](../../../README.md) - -# **get** -Gets metadata about a File contained in a Dataset. By default this retrieves the file's metadata from the latest -view of the default branch - `master` for most enrollments. - -#### Advanced Usage - -See [Datasets Core Concepts](https://palantir.com/docs/foundry/data-integration/datasets/) for details on using branches and transactions. - -To **get a file's metadata from a specific Branch** specify the Branch's identifier as `branchId`. This will -retrieve metadata for the most recent version of the file since the latest snapshot transaction, or the earliest -ancestor transaction of the branch if there are no snapshot transactions. - -To **get a file's metadata from the resolved view of a transaction** specify the Transaction's resource identifier -as `endTransactionRid`. This will retrieve metadata for the most recent version of the file since the latest snapshot -transaction, or the earliest ancestor transaction if there are no snapshot transactions. - -To **get a file's metadata from the resolved view of a range of transactions** specify the the start transaction's -resource identifier as `startTransactionRid` and the end transaction's resource identifier as `endTransactionRid`. -This will retrieve metadata for the most recent version of the file since the `startTransactionRid` up to the -`endTransactionRid`. Behavior is undefined when the start and end transactions do not belong to the same root-to-leaf path. - -To **get a file's metadata from a specific transaction** specify the Transaction's resource identifier as both the -`startTransactionRid` and `endTransactionRid`. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**dataset_rid** | DatasetRid | The Resource Identifier (RID) of the Dataset that contains the File. | | -**file_path** | FilePath | The File's path within the Dataset. | | -**branch_id** | Optional[BranchId] | The identifier (name) of the Branch that contains the File. Defaults to `master` for most enrollments. | [optional] | -**end_transaction_rid** | Optional[TransactionRid] | The Resource Identifier (RID) of the end Transaction. | [optional] | -**start_transaction_rid** | Optional[TransactionRid] | The Resource Identifier (RID) of the start Transaction. | [optional] | - -### Return type -**File** - -### Example - -```python -from foundry_sdk.v1 import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# DatasetRid | The Resource Identifier (RID) of the Dataset that contains the File. -dataset_rid = "ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da" -# FilePath | The File's path within the Dataset. -file_path = "q3-data%2fmy-file.csv" -# Optional[BranchId] | The identifier (name) of the Branch that contains the File. Defaults to `master` for most enrollments. -branch_id = None -# Optional[TransactionRid] | The Resource Identifier (RID) of the end Transaction. -end_transaction_rid = None -# Optional[TransactionRid] | The Resource Identifier (RID) of the start Transaction. -start_transaction_rid = None - - -try: - api_response = client.datasets.Dataset.File.get( - dataset_rid, - file_path, - branch_id=branch_id, - end_transaction_rid=end_transaction_rid, - start_transaction_rid=start_transaction_rid, - ) - print("The get response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling File.get: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | File | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v1-link) [[Back to Model list]](../../../README.md#models-v1-link) [[Back to README]](../../../README.md) - -# **list** -Lists Files contained in a Dataset. By default files are listed on the latest view of the default -branch - `master` for most enrollments. - -This endpoint currently does not support views (virtual datasets composed of other datasets). For more information, refer to the [views documentation](https://palantir.com/docs/foundry/data-integration/views). - -#### Advanced Usage - -See [Datasets Core Concepts](https://palantir.com/docs/foundry/data-integration/datasets/) for details on using branches and transactions. - -To **list files on a specific Branch** specify the Branch's identifier as `branchId`. This will include the most -recent version of all files since the latest snapshot transaction, or the earliest ancestor transaction of the -branch if there are no snapshot transactions. - -To **list files on the resolved view of a transaction** specify the Transaction's resource identifier -as `endTransactionRid`. This will include the most recent version of all files since the latest snapshot -transaction, or the earliest ancestor transaction if there are no snapshot transactions. - -To **list files on the resolved view of a range of transactions** specify the the start transaction's resource -identifier as `startTransactionRid` and the end transaction's resource identifier as `endTransactionRid`. This -will include the most recent version of all files since the `startTransactionRid` up to the `endTransactionRid`. -Note that an intermediate snapshot transaction will remove all files from the view. Behavior is undefined when -the start and end transactions do not belong to the same root-to-leaf path. - -To **list files on a specific transaction** specify the Transaction's resource identifier as both the -`startTransactionRid` and `endTransactionRid`. This will include only files that were modified as part of that -Transaction. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**dataset_rid** | DatasetRid | The Resource Identifier (RID) of the Dataset on which to list Files. | | -**branch_id** | Optional[BranchId] | The identifier (name) of the Branch on which to list Files. Defaults to `master` for most enrollments. | [optional] | -**end_transaction_rid** | Optional[TransactionRid] | The Resource Identifier (RID) of the end Transaction. | [optional] | -**page_size** | Optional[PageSize] | The desired size of the page to be returned. Defaults to 1,000. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. | [optional] | -**page_token** | Optional[PageToken] | | [optional] | -**start_transaction_rid** | Optional[TransactionRid] | The Resource Identifier (RID) of the start Transaction. | [optional] | - -### Return type -**ListFilesResponse** - -### Example - -```python -from foundry_sdk.v1 import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# DatasetRid | The Resource Identifier (RID) of the Dataset on which to list Files. -dataset_rid = None -# Optional[BranchId] | The identifier (name) of the Branch on which to list Files. Defaults to `master` for most enrollments. -branch_id = None -# Optional[TransactionRid] | The Resource Identifier (RID) of the end Transaction. -end_transaction_rid = None -# Optional[PageSize] | The desired size of the page to be returned. Defaults to 1,000. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. -page_size = None -# Optional[PageToken] -page_token = None -# Optional[TransactionRid] | The Resource Identifier (RID) of the start Transaction. -start_transaction_rid = None - - -try: - for file in client.datasets.Dataset.File.list( - dataset_rid, - branch_id=branch_id, - end_transaction_rid=end_transaction_rid, - page_size=page_size, - page_token=page_token, - start_transaction_rid=start_transaction_rid, - ): - pprint(file) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling File.list: %s\n" % e) - -``` - -### Read the contents of a file from a dataset (by exploration / listing) - -```python -import foundry - -foundry_client = foundry.FoundryV1Client(auth=foundry.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -result = foundry_client.datasets.Dataset.File.list(dataset_rid="...") - -if result.data: - file_path = result.data[0].path - - print(foundry_client.datasets.Dataset.File.read( - dataset_rid="...", file_path=file_path - )) -``` - -``` -b'Hello!' -``` - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | ListFilesResponse | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v1-link) [[Back to Model list]](../../../README.md#models-v1-link) [[Back to README]](../../../README.md) - -# **read** -Gets the content of a File contained in a Dataset. By default this retrieves the file's content from the latest -view of the default branch - `master` for most enrollments. - -This endpoint currently does not support views (virtual datasets composed of other datasets). For more information, refer to the [views documentation](https://palantir.com/docs/foundry/data-integration/views). - -#### Advanced Usage - -See [Datasets Core Concepts](https://palantir.com/docs/foundry/data-integration/datasets/) for details on using branches and transactions. - -To **get a file's content from a specific Branch** specify the Branch's identifier as `branchId`. This will -retrieve the content for the most recent version of the file since the latest snapshot transaction, or the -earliest ancestor transaction of the branch if there are no snapshot transactions. - -To **get a file's content from the resolved view of a transaction** specify the Transaction's resource identifier -as `endTransactionRid`. This will retrieve the content for the most recent version of the file since the latest -snapshot transaction, or the earliest ancestor transaction if there are no snapshot transactions. - -To **get a file's content from the resolved view of a range of transactions** specify the the start transaction's -resource identifier as `startTransactionRid` and the end transaction's resource identifier as `endTransactionRid`. -This will retrieve the content for the most recent version of the file since the `startTransactionRid` up to the -`endTransactionRid`. Note that an intermediate snapshot transaction will remove all files from the view. Behavior -is undefined when the start and end transactions do not belong to the same root-to-leaf path. - -To **get a file's content from a specific transaction** specify the Transaction's resource identifier as both the -`startTransactionRid` and `endTransactionRid`. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**dataset_rid** | DatasetRid | The Resource Identifier (RID) of the Dataset that contains the File. | | -**file_path** | FilePath | The File's path within the Dataset. | | -**branch_id** | Optional[BranchId] | The identifier (name) of the Branch that contains the File. Defaults to `master` for most enrollments. | [optional] | -**end_transaction_rid** | Optional[TransactionRid] | The Resource Identifier (RID) of the end Transaction. | [optional] | -**start_transaction_rid** | Optional[TransactionRid] | The Resource Identifier (RID) of the start Transaction. | [optional] | - -### Return type -**bytes** - -### Example - -```python -from foundry_sdk.v1 import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# DatasetRid | The Resource Identifier (RID) of the Dataset that contains the File. -dataset_rid = None -# FilePath | The File's path within the Dataset. -file_path = "q3-data%2fmy-file.csv" -# Optional[BranchId] | The identifier (name) of the Branch that contains the File. Defaults to `master` for most enrollments. -branch_id = None -# Optional[TransactionRid] | The Resource Identifier (RID) of the end Transaction. -end_transaction_rid = None -# Optional[TransactionRid] | The Resource Identifier (RID) of the start Transaction. -start_transaction_rid = None - - -try: - api_response = client.datasets.Dataset.File.read( - dataset_rid, - file_path, - branch_id=branch_id, - end_transaction_rid=end_transaction_rid, - start_transaction_rid=start_transaction_rid, - ) - print("The read response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling File.read: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | bytes | | */* | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v1-link) [[Back to Model list]](../../../README.md#models-v1-link) [[Back to README]](../../../README.md) - -# **upload** -Uploads a File to an existing Dataset. -The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`. - -By default the file is uploaded to a new transaction on the default branch - `master` for most enrollments. -If the file already exists only the most recent version will be visible in the updated view. - -#### Advanced Usage - -See [Datasets Core Concepts](https://palantir.com/docs/foundry/data-integration/datasets/) for details on using branches and transactions. - -To **upload a file to a specific Branch** specify the Branch's identifier as `branchId`. A new transaction will -be created and committed on this branch. By default the TransactionType will be `UPDATE`, to override this -default specify `transactionType` in addition to `branchId`. -See [createBranch](https://palantir.com/docs/foundry/api/datasets-resources/branches/create-branch/) to create a custom branch. - -To **upload a file on a manually opened transaction** specify the Transaction's resource identifier as -`transactionRid`. This is useful for uploading multiple files in a single transaction. -See [createTransaction](https://palantir.com/docs/foundry/api/datasets-resources/transactions/create-transaction/) to open a transaction. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**dataset_rid** | DatasetRid | The Resource Identifier (RID) of the Dataset on which to upload the File. | | -**body** | bytes | Body of the request | | -**file_path** | FilePath | The File's path within the Dataset. | | -**branch_id** | Optional[BranchId] | The identifier (name) of the Branch on which to upload the File. Defaults to `master` for most enrollments. | [optional] | -**transaction_rid** | Optional[TransactionRid] | The Resource Identifier (RID) of the open Transaction on which to upload the File. | [optional] | -**transaction_type** | Optional[TransactionType] | The type of the Transaction to create when using branchId. Defaults to `UPDATE`. | [optional] | - -### Return type -**File** - -### Example - -```python -from foundry_sdk.v1 import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# DatasetRid | The Resource Identifier (RID) of the Dataset on which to upload the File. -dataset_rid = None -# bytes | Body of the request -body = None -# FilePath | The File's path within the Dataset. -file_path = "q3-data%2fmy-file.csv" -# Optional[BranchId] | The identifier (name) of the Branch on which to upload the File. Defaults to `master` for most enrollments. -branch_id = None -# Optional[TransactionRid] | The Resource Identifier (RID) of the open Transaction on which to upload the File. -transaction_rid = None -# Optional[TransactionType] | The type of the Transaction to create when using branchId. Defaults to `UPDATE`. -transaction_type = None - - -try: - api_response = client.datasets.Dataset.File.upload( - dataset_rid, - body, - file_path=file_path, - branch_id=branch_id, - transaction_rid=transaction_rid, - transaction_type=transaction_type, - ) - print("The upload response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling File.upload: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | File | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v1-link) [[Back to Model list]](../../../README.md#models-v1-link) [[Back to README]](../../../README.md) - diff --git a/docs/v1/Datasets/Transaction.md b/docs/v1/Datasets/Transaction.md deleted file mode 100644 index 9dc4863d8..000000000 --- a/docs/v1/Datasets/Transaction.md +++ /dev/null @@ -1,242 +0,0 @@ -# Transaction - -Method | HTTP request | Release Stage | -------------- | ------------- | ----- | -[**abort**](#abort) | **POST** /v1/datasets/{datasetRid}/transactions/{transactionRid}/abort | Stable | -[**commit**](#commit) | **POST** /v1/datasets/{datasetRid}/transactions/{transactionRid}/commit | Stable | -[**create**](#create) | **POST** /v1/datasets/{datasetRid}/transactions | Stable | -[**get**](#get) | **GET** /v1/datasets/{datasetRid}/transactions/{transactionRid} | Stable | - -# **abort** -Aborts an open Transaction. File modifications made on this Transaction are not preserved and the Branch is -not updated. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**dataset_rid** | DatasetRid | The Resource Identifier (RID) of the Dataset that contains the Transaction. | | -**transaction_rid** | TransactionRid | The Resource Identifier (RID) of the Transaction. | | - -### Return type -**Transaction** - -### Example - -```python -from foundry_sdk.v1 import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# DatasetRid | The Resource Identifier (RID) of the Dataset that contains the Transaction. -dataset_rid = "ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da" -# TransactionRid | The Resource Identifier (RID) of the Transaction. -transaction_rid = "ri.foundry.main.transaction.abffc380-ea68-4843-9be1-9f44d2565496" - - -try: - api_response = client.datasets.Dataset.Transaction.abort(dataset_rid, transaction_rid) - print("The abort response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Transaction.abort: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | Transaction | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v1-link) [[Back to Model list]](../../../README.md#models-v1-link) [[Back to README]](../../../README.md) - -# **commit** -Commits an open Transaction. File modifications made on this Transaction are preserved and the Branch is -updated to point to the Transaction. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**dataset_rid** | DatasetRid | The Resource Identifier (RID) of the Dataset that contains the Transaction. | | -**transaction_rid** | TransactionRid | The Resource Identifier (RID) of the Transaction. | | - -### Return type -**Transaction** - -### Example - -```python -from foundry_sdk.v1 import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# DatasetRid | The Resource Identifier (RID) of the Dataset that contains the Transaction. -dataset_rid = "ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da" -# TransactionRid | The Resource Identifier (RID) of the Transaction. -transaction_rid = "ri.foundry.main.transaction.abffc380-ea68-4843-9be1-9f44d2565496" - - -try: - api_response = client.datasets.Dataset.Transaction.commit(dataset_rid, transaction_rid) - print("The commit response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Transaction.commit: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | Transaction | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v1-link) [[Back to Model list]](../../../README.md#models-v1-link) [[Back to README]](../../../README.md) - -# **create** -Creates a Transaction on a Branch of a Dataset. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**dataset_rid** | DatasetRid | The Resource Identifier (RID) of the Dataset on which to create the Transaction. | | -**branch_id** | Optional[BranchId] | The identifier (name) of the Branch on which to create the Transaction. Defaults to `master` for most enrollments. | [optional] | -**transaction_type** | Optional[TransactionType] | | [optional] | - -### Return type -**Transaction** - -### Example - -```python -from foundry_sdk.v1 import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# DatasetRid | The Resource Identifier (RID) of the Dataset on which to create the Transaction. -dataset_rid = "ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da" -# Optional[BranchId] | The identifier (name) of the Branch on which to create the Transaction. Defaults to `master` for most enrollments. -branch_id = None -# Optional[TransactionType] -transaction_type = "SNAPSHOT" - - -try: - api_response = client.datasets.Dataset.Transaction.create( - dataset_rid, branch_id=branch_id, transaction_type=transaction_type - ) - print("The create response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Transaction.create: %s\n" % e) - -``` - -### Manipulate a Dataset within a Transaction - -```python -import foundry - -foundry_client = foundry.FoundryV1Client(auth=foundry.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -transaction = foundry_client.datasets.Dataset.Transaction.create( - dataset_rid="...", - create_transaction_request={}, -) - -with open("my/path/to/file.txt", 'rb') as f: - foundry_client.datasets.Dataset.File.upload( - body=f.read(), - dataset_rid="....", - file_path="...", - transaction_rid=transaction.rid, - ) - -foundry_client.datasets.Dataset.Transaction.commit(dataset_rid="...", transaction_rid=transaction.rid) -``` - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | Transaction | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v1-link) [[Back to Model list]](../../../README.md#models-v1-link) [[Back to README]](../../../README.md) - -# **get** -Gets a Transaction of a Dataset. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**dataset_rid** | DatasetRid | The Resource Identifier (RID) of the Dataset that contains the Transaction. | | -**transaction_rid** | TransactionRid | The Resource Identifier (RID) of the Transaction. | | - -### Return type -**Transaction** - -### Example - -```python -from foundry_sdk.v1 import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# DatasetRid | The Resource Identifier (RID) of the Dataset that contains the Transaction. -dataset_rid = "ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da" -# TransactionRid | The Resource Identifier (RID) of the Transaction. -transaction_rid = "ri.foundry.main.transaction.abffc380-ea68-4843-9be1-9f44d2565496" - - -try: - api_response = client.datasets.Dataset.Transaction.get(dataset_rid, transaction_rid) - print("The get response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Transaction.get: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | Transaction | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v1-link) [[Back to Model list]](../../../README.md#models-v1-link) [[Back to README]](../../../README.md) - diff --git a/docs/v1/Datasets/models/Branch.md b/docs/v1/Datasets/models/Branch.md deleted file mode 100644 index f8ee0ecba..000000000 --- a/docs/v1/Datasets/models/Branch.md +++ /dev/null @@ -1,13 +0,0 @@ -# Branch - -A Branch of a Dataset. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**branch_id** | BranchId | Yes | | -**transaction_rid** | Optional[TransactionRid] | No | | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Datasets/models/BranchId.md b/docs/v1/Datasets/models/BranchId.md deleted file mode 100644 index 597cea5a0..000000000 --- a/docs/v1/Datasets/models/BranchId.md +++ /dev/null @@ -1,12 +0,0 @@ -# BranchId - -The identifier (name) of a Branch. - - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Datasets/models/CreateBranchRequest.md b/docs/v1/Datasets/models/CreateBranchRequest.md deleted file mode 100644 index 70815967f..000000000 --- a/docs/v1/Datasets/models/CreateBranchRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# CreateBranchRequest - -CreateBranchRequest - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**branch_id** | BranchId | Yes | | -**transaction_rid** | Optional[TransactionRid] | No | | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Datasets/models/CreateDatasetRequest.md b/docs/v1/Datasets/models/CreateDatasetRequest.md deleted file mode 100644 index ac70282a8..000000000 --- a/docs/v1/Datasets/models/CreateDatasetRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# CreateDatasetRequest - -CreateDatasetRequest - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**name** | DatasetName | Yes | | -**parent_folder_rid** | FolderRid | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Datasets/models/CreateTransactionRequest.md b/docs/v1/Datasets/models/CreateTransactionRequest.md deleted file mode 100644 index bf0774b2a..000000000 --- a/docs/v1/Datasets/models/CreateTransactionRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# CreateTransactionRequest - -CreateTransactionRequest - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**transaction_type** | Optional[TransactionType] | No | | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Datasets/models/Dataset.md b/docs/v1/Datasets/models/Dataset.md deleted file mode 100644 index 25ac27288..000000000 --- a/docs/v1/Datasets/models/Dataset.md +++ /dev/null @@ -1,13 +0,0 @@ -# Dataset - -Dataset - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**rid** | DatasetRid | Yes | | -**name** | DatasetName | Yes | | -**parent_folder_rid** | FolderRid | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Datasets/models/DatasetName.md b/docs/v1/Datasets/models/DatasetName.md deleted file mode 100644 index 02c383c90..000000000 --- a/docs/v1/Datasets/models/DatasetName.md +++ /dev/null @@ -1,11 +0,0 @@ -# DatasetName - -DatasetName - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Datasets/models/DatasetRid.md b/docs/v1/Datasets/models/DatasetRid.md deleted file mode 100644 index 0511bdf9c..000000000 --- a/docs/v1/Datasets/models/DatasetRid.md +++ /dev/null @@ -1,12 +0,0 @@ -# DatasetRid - -The Resource Identifier (RID) of a Dataset. - - -## Type -```python -RID -``` - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Datasets/models/File.md b/docs/v1/Datasets/models/File.md deleted file mode 100644 index 85ebf4edd..000000000 --- a/docs/v1/Datasets/models/File.md +++ /dev/null @@ -1,14 +0,0 @@ -# File - -File - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**path** | FilePath | Yes | | -**transaction_rid** | TransactionRid | Yes | | -**size_bytes** | Optional[Long] | No | | -**updated_time** | datetime | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Datasets/models/ListBranchesResponse.md b/docs/v1/Datasets/models/ListBranchesResponse.md deleted file mode 100644 index d22e27800..000000000 --- a/docs/v1/Datasets/models/ListBranchesResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListBranchesResponse - -ListBranchesResponse - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**next_page_token** | Optional[PageToken] | No | | -**data** | List[Branch] | Yes | The list of branches in the current page. | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Datasets/models/ListFilesResponse.md b/docs/v1/Datasets/models/ListFilesResponse.md deleted file mode 100644 index 587bb0ed1..000000000 --- a/docs/v1/Datasets/models/ListFilesResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListFilesResponse - -A page of Files and an optional page token that can be used to retrieve the next page. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**next_page_token** | Optional[PageToken] | No | | -**data** | List[File] | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Datasets/models/TableExportFormat.md b/docs/v1/Datasets/models/TableExportFormat.md deleted file mode 100644 index 233740a32..000000000 --- a/docs/v1/Datasets/models/TableExportFormat.md +++ /dev/null @@ -1,12 +0,0 @@ -# TableExportFormat - -Format for tabular dataset export. - - -| **Value** | -| --------- | -| `"ARROW"` | -| `"CSV"` | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Datasets/models/Transaction.md b/docs/v1/Datasets/models/Transaction.md deleted file mode 100644 index 3f5568ae3..000000000 --- a/docs/v1/Datasets/models/Transaction.md +++ /dev/null @@ -1,16 +0,0 @@ -# Transaction - -An operation that modifies the files within a dataset. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**rid** | TransactionRid | Yes | | -**transaction_type** | TransactionType | Yes | | -**status** | TransactionStatus | Yes | | -**created_time** | datetime | Yes | The timestamp when the transaction was created, in ISO 8601 timestamp format. | -**closed_time** | Optional[datetime] | No | The timestamp when the transaction was closed, in ISO 8601 timestamp format. | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Datasets/models/TransactionRid.md b/docs/v1/Datasets/models/TransactionRid.md deleted file mode 100644 index 206a20fe5..000000000 --- a/docs/v1/Datasets/models/TransactionRid.md +++ /dev/null @@ -1,12 +0,0 @@ -# TransactionRid - -The Resource Identifier (RID) of a Transaction. - - -## Type -```python -RID -``` - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Datasets/models/TransactionStatus.md b/docs/v1/Datasets/models/TransactionStatus.md deleted file mode 100644 index 46171254a..000000000 --- a/docs/v1/Datasets/models/TransactionStatus.md +++ /dev/null @@ -1,13 +0,0 @@ -# TransactionStatus - -The status of a Transaction. - - -| **Value** | -| --------- | -| `"ABORTED"` | -| `"COMMITTED"` | -| `"OPEN"` | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Datasets/models/TransactionType.md b/docs/v1/Datasets/models/TransactionType.md deleted file mode 100644 index d3484948e..000000000 --- a/docs/v1/Datasets/models/TransactionType.md +++ /dev/null @@ -1,14 +0,0 @@ -# TransactionType - -The type of a Transaction. - - -| **Value** | -| --------- | -| `"APPEND"` | -| `"UPDATE"` | -| `"SNAPSHOT"` | -| `"DELETE"` | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/Action.md b/docs/v1/Ontologies/Action.md deleted file mode 100644 index ee5c39e97..000000000 --- a/docs/v1/Ontologies/Action.md +++ /dev/null @@ -1,209 +0,0 @@ -# Action - -Method | HTTP request | Release Stage | -------------- | ------------- | ----- | -[**apply**](#apply) | **POST** /v1/ontologies/{ontologyRid}/actions/{actionType}/apply | Stable | -[**apply_batch**](#apply_batch) | **POST** /v1/ontologies/{ontologyRid}/actions/{actionType}/applyBatch | Stable | -[**validate**](#validate) | **POST** /v1/ontologies/{ontologyRid}/actions/{actionType}/validate | Stable | - -# **apply** -Applies an action using the given parameters. - -Changes to objects or links stored in Object Storage V1 are eventually consistent and may take some time to be visible. -Edits to objects or links in Object Storage V2 will be visible immediately after the action completes. - -Note that [parameter default values](https://palantir.com/docs/foundry/action-types/parameters-default-value/) are not currently supported by -this endpoint. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**ontology_rid** | OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the action. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. | | -**action_type** | ActionTypeApiName | The API name of the action to apply. To find the API name for your action, use the **List action types** endpoint or check the **Ontology Manager**. | | -**parameters** | Dict[ParameterId, Optional[DataValue]] | | | - -### Return type -**ApplyActionResponse** - -### Example - -```python -from foundry_sdk.v1 import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the action. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. -ontology_rid = "ri.ontology.main.ontology.c61d9ab5-2919-4127-a0a1-ac64c0ce6367" -# ActionTypeApiName | The API name of the action to apply. To find the API name for your action, use the **List action types** endpoint or check the **Ontology Manager**. -action_type = "rename-employee" -# Dict[ParameterId, Optional[DataValue]] -parameters = {"id": 80060, "newName": "Anna Smith-Doe"} - - -try: - api_response = client.ontologies.Action.apply(ontology_rid, action_type, parameters=parameters) - print("The apply response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Action.apply: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | ApplyActionResponse | Success response. | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v1-link) [[Back to Model list]](../../../README.md#models-v1-link) [[Back to README]](../../../README.md) - -# **apply_batch** -Applies multiple actions (of the same Action Type) using the given parameters. -Changes to objects or links stored in Object Storage V1 are eventually consistent and may take some time to be visible. -Edits to objects or links in Object Storage V2 will be visible immediately after the action completes. - -Up to 20 actions may be applied in one call. Actions that only modify objects in Object Storage v2 and do not -call Functions may receive a higher limit. - -Note that [parameter default values](https://palantir.com/docs/foundry/action-types/parameters-default-value/) and -[notifications](https://palantir.com/docs/foundry/action-types/notifications/) are not currently supported by this endpoint. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**ontology_rid** | OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the action. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. | | -**action_type** | ActionTypeApiName | The API name of the action to apply. To find the API name for your action, use the **List action types** endpoint or check the **Ontology Manager**. | | -**requests** | List[ApplyActionRequest] | | | - -### Return type -**BatchApplyActionResponse** - -### Example - -```python -from foundry_sdk.v1 import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the action. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. -ontology_rid = "ri.ontology.main.ontology.c61d9ab5-2919-4127-a0a1-ac64c0ce6367" -# ActionTypeApiName | The API name of the action to apply. To find the API name for your action, use the **List action types** endpoint or check the **Ontology Manager**. -action_type = "rename-employee" -# List[ApplyActionRequest] -requests = [ - {"parameters": {"id": 80060, "newName": "Anna Smith-Doe"}}, - {"parameters": {"id": 80061, "newName": "Joe Bloggs"}}, -] - - -try: - api_response = client.ontologies.Action.apply_batch( - ontology_rid, action_type, requests=requests - ) - print("The apply_batch response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Action.apply_batch: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | BatchApplyActionResponse | Success response. | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v1-link) [[Back to Model list]](../../../README.md#models-v1-link) [[Back to README]](../../../README.md) - -# **validate** -Validates if an action can be run with the given set of parameters. -The response contains the evaluation of parameters and **submission criteria** -that determine if the request is `VALID` or `INVALID`. -For performance reasons, validations will not consider existing objects or other data in Foundry. -For example, the uniqueness of a primary key or the existence of a user ID will not be checked. -Note that [parameter default values](https://palantir.com/docs/foundry/action-types/parameters-default-value/) are not currently supported by -this endpoint. Unspecified parameters will be given a default value of `null`. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**ontology_rid** | OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the action. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. | | -**action_type** | ActionTypeApiName | The API name of the action to validate. To find the API name for your action, use the **List action types** endpoint or check the **Ontology Manager**. | | -**parameters** | Dict[ParameterId, Optional[DataValue]] | | | - -### Return type -**ValidateActionResponse** - -### Example - -```python -from foundry_sdk.v1 import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the action. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. -ontology_rid = "ri.ontology.main.ontology.c61d9ab5-2919-4127-a0a1-ac64c0ce6367" -# ActionTypeApiName | The API name of the action to validate. To find the API name for your action, use the **List action types** endpoint or check the **Ontology Manager**. -action_type = "rename-employee" -# Dict[ParameterId, Optional[DataValue]] -parameters = { - "id": "2", - "firstName": "Chuck", - "lastName": "Jones", - "age": 17, - "date": "2021-05-01", - "numbers": [1, 2, 3], - "hasObjectSet": True, - "objectSet": "ri.object-set.main.object-set.39a9f4bd-f77e-45ce-9772-70f25852f623", - "reference": "Chuck", - "percentage": 41.3, - "differentObjectId": "2", -} - - -try: - api_response = client.ontologies.Action.validate( - ontology_rid, action_type, parameters=parameters - ) - print("The validate response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Action.validate: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | ValidateActionResponse | Success response. | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v1-link) [[Back to Model list]](../../../README.md#models-v1-link) [[Back to README]](../../../README.md) - diff --git a/docs/v1/Ontologies/ActionType.md b/docs/v1/Ontologies/ActionType.md deleted file mode 100644 index ecf276a54..000000000 --- a/docs/v1/Ontologies/ActionType.md +++ /dev/null @@ -1,116 +0,0 @@ -# ActionType - -Method | HTTP request | Release Stage | -------------- | ------------- | ----- | -[**get**](#get) | **GET** /v1/ontologies/{ontologyRid}/actionTypes/{actionTypeApiName} | Stable | -[**list**](#list) | **GET** /v1/ontologies/{ontologyRid}/actionTypes | Stable | - -# **get** -Gets a specific action type with the given API name. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**ontology_rid** | OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the action type. | | -**action_type_api_name** | ActionTypeApiName | The name of the action type in the API. | | - -### Return type -**ActionType** - -### Example - -```python -from foundry_sdk.v1 import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the action type. -ontology_rid = "ri.ontology.main.ontology.c61d9ab5-2919-4127-a0a1-ac64c0ce6367" -# ActionTypeApiName | The name of the action type in the API. -action_type_api_name = "promote-employee" - - -try: - api_response = client.ontologies.Ontology.ActionType.get(ontology_rid, action_type_api_name) - print("The get response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling ActionType.get: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | ActionType | Success response. | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v1-link) [[Back to Model list]](../../../README.md#models-v1-link) [[Back to README]](../../../README.md) - -# **list** -Lists the action types for the given Ontology. - -Each page may be smaller than the requested page size. However, it is guaranteed that if there are more -results available, at least one result will be present in the response. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**ontology_rid** | OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the action types. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. | | -**page_size** | Optional[PageSize] | The desired size of the page to be returned. Defaults to 500. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. | [optional] | -**page_token** | Optional[PageToken] | | [optional] | - -### Return type -**ListActionTypesResponse** - -### Example - -```python -from foundry_sdk.v1 import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the action types. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. -ontology_rid = "ri.ontology.main.ontology.c61d9ab5-2919-4127-a0a1-ac64c0ce6367" -# Optional[PageSize] | The desired size of the page to be returned. Defaults to 500. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. -page_size = None -# Optional[PageToken] -page_token = None - - -try: - for action_type in client.ontologies.Ontology.ActionType.list( - ontology_rid, page_size=page_size, page_token=page_token - ): - pprint(action_type) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling ActionType.list: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | ListActionTypesResponse | Success response. | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v1-link) [[Back to Model list]](../../../README.md#models-v1-link) [[Back to README]](../../../README.md) - diff --git a/docs/v1/Ontologies/Attachment.md b/docs/v1/Ontologies/Attachment.md deleted file mode 100644 index 03a0c76b7..000000000 --- a/docs/v1/Ontologies/Attachment.md +++ /dev/null @@ -1,167 +0,0 @@ -# Attachment - -Method | HTTP request | Release Stage | -------------- | ------------- | ----- | -[**get**](#get) | **GET** /v1/attachments/{attachmentRid} | Stable | -[**read**](#read) | **GET** /v1/attachments/{attachmentRid}/content | Stable | -[**upload**](#upload) | **POST** /v1/attachments/upload | Stable | - -# **get** -Get the metadata of an attachment. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**attachment_rid** | AttachmentRid | The RID of the attachment. | | - -### Return type -**Attachment** - -### Example - -```python -from foundry_sdk.v1 import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# AttachmentRid | The RID of the attachment. -attachment_rid = "ri.attachments.main.attachment.bb32154e-e043-4b00-9461-93136ca96b6f" - - -try: - api_response = client.ontologies.Attachment.get(attachment_rid) - print("The get response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Attachment.get: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | Attachment | Success response. | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v1-link) [[Back to Model list]](../../../README.md#models-v1-link) [[Back to README]](../../../README.md) - -# **read** -Get the content of an attachment. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**attachment_rid** | AttachmentRid | The RID of the attachment. | | - -### Return type -**bytes** - -### Example - -```python -from foundry_sdk.v1 import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# AttachmentRid | The RID of the attachment. -attachment_rid = "ri.attachments.main.attachment.bb32154e-e043-4b00-9461-93136ca96b6f" - - -try: - api_response = client.ontologies.Attachment.read(attachment_rid) - print("The read response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Attachment.read: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | bytes | Success response. | */* | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v1-link) [[Back to Model list]](../../../README.md#models-v1-link) [[Back to README]](../../../README.md) - -# **upload** -Upload an attachment to use in an action. Any attachment which has not been linked to an object via -an action within one hour after upload will be removed. -Previously mapped attachments which are not connected to any object anymore are also removed on -a biweekly basis. -The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**body** | bytes | Body of the request | | -**content_length** | ContentLength | The size in bytes of the file content being uploaded. | | -**content_type** | ContentType | The media type of the file being uploaded. | | -**filename** | Filename | The name of the file being uploaded. | | - -### Return type -**Attachment** - -### Example - -```python -from foundry_sdk.v1 import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# bytes | Body of the request -body = None -# ContentLength | The size in bytes of the file content being uploaded. -content_length = None -# ContentType | The media type of the file being uploaded. -content_type = None -# Filename | The name of the file being uploaded. -filename = "My Image.jpeg" - - -try: - api_response = client.ontologies.Attachment.upload( - body, content_length=content_length, content_type=content_type, filename=filename - ) - print("The upload response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Attachment.upload: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | Attachment | Success response. | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v1-link) [[Back to Model list]](../../../README.md#models-v1-link) [[Back to README]](../../../README.md) - diff --git a/docs/v1/Ontologies/ObjectType.md b/docs/v1/Ontologies/ObjectType.md deleted file mode 100644 index f2657ccc3..000000000 --- a/docs/v1/Ontologies/ObjectType.md +++ /dev/null @@ -1,233 +0,0 @@ -# ObjectType - -Method | HTTP request | Release Stage | -------------- | ------------- | ----- | -[**get**](#get) | **GET** /v1/ontologies/{ontologyRid}/objectTypes/{objectType} | Stable | -[**get_outgoing_link_type**](#get_outgoing_link_type) | **GET** /v1/ontologies/{ontologyRid}/objectTypes/{objectType}/outgoingLinkTypes/{linkType} | Stable | -[**list**](#list) | **GET** /v1/ontologies/{ontologyRid}/objectTypes | Stable | -[**list_outgoing_link_types**](#list_outgoing_link_types) | **GET** /v1/ontologies/{ontologyRid}/objectTypes/{objectType}/outgoingLinkTypes | Stable | - -# **get** -Gets a specific object type with the given API name. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**ontology_rid** | OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the object type. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. | | -**object_type** | ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. | | - -### Return type -**ObjectType** - -### Example - -```python -from foundry_sdk.v1 import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the object type. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. -ontology_rid = "ri.ontology.main.ontology.c61d9ab5-2919-4127-a0a1-ac64c0ce6367" -# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. -object_type = "employee" - - -try: - api_response = client.ontologies.Ontology.ObjectType.get(ontology_rid, object_type) - print("The get response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling ObjectType.get: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | ObjectType | Success response. | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v1-link) [[Back to Model list]](../../../README.md#models-v1-link) [[Back to README]](../../../README.md) - -# **get_outgoing_link_type** -Get an outgoing link for an object type. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**ontology_rid** | OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the object type. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager** application. | | -**object_type** | ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager** application. | | -**link_type** | LinkTypeApiName | The API name of the outgoing link. To find the API name for your link type, check the **Ontology Manager**. | | - -### Return type -**LinkTypeSide** - -### Example - -```python -from foundry_sdk.v1 import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the object type. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager** application. -ontology_rid = "ri.ontology.main.ontology.c61d9ab5-2919-4127-a0a1-ac64c0ce6367" -# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager** application. -object_type = "Employee" -# LinkTypeApiName | The API name of the outgoing link. To find the API name for your link type, check the **Ontology Manager**. -link_type = "directReport" - - -try: - api_response = client.ontologies.Ontology.ObjectType.get_outgoing_link_type( - ontology_rid, object_type, link_type - ) - print("The get_outgoing_link_type response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling ObjectType.get_outgoing_link_type: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | LinkTypeSide | Success response. | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v1-link) [[Back to Model list]](../../../README.md#models-v1-link) [[Back to README]](../../../README.md) - -# **list** -Lists the object types for the given Ontology. - -Each page may be smaller or larger than the requested page size. However, it is guaranteed that if there are -more results available, at least one result will be present in the -response. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**ontology_rid** | OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the object types. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. | | -**page_size** | Optional[PageSize] | The desired size of the page to be returned. Defaults to 500. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. | [optional] | -**page_token** | Optional[PageToken] | | [optional] | - -### Return type -**ListObjectTypesResponse** - -### Example - -```python -from foundry_sdk.v1 import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the object types. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. -ontology_rid = "ri.ontology.main.ontology.c61d9ab5-2919-4127-a0a1-ac64c0ce6367" -# Optional[PageSize] | The desired size of the page to be returned. Defaults to 500. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. -page_size = None -# Optional[PageToken] -page_token = None - - -try: - for object_type in client.ontologies.Ontology.ObjectType.list( - ontology_rid, page_size=page_size, page_token=page_token - ): - pprint(object_type) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling ObjectType.list: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | ListObjectTypesResponse | Success response. | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v1-link) [[Back to Model list]](../../../README.md#models-v1-link) [[Back to README]](../../../README.md) - -# **list_outgoing_link_types** -List the outgoing links for an object type. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**ontology_rid** | OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the object type. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager** application. | | -**object_type** | ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager** application. | | -**page_size** | Optional[PageSize] | The desired size of the page to be returned. | [optional] | -**page_token** | Optional[PageToken] | | [optional] | - -### Return type -**ListOutgoingLinkTypesResponse** - -### Example - -```python -from foundry_sdk.v1 import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the object type. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager** application. -ontology_rid = "ri.ontology.main.ontology.c61d9ab5-2919-4127-a0a1-ac64c0ce6367" -# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager** application. -object_type = "Flight" -# Optional[PageSize] | The desired size of the page to be returned. -page_size = None -# Optional[PageToken] -page_token = None - - -try: - for object_type in client.ontologies.Ontology.ObjectType.list_outgoing_link_types( - ontology_rid, object_type, page_size=page_size, page_token=page_token - ): - pprint(object_type) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling ObjectType.list_outgoing_link_types: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | ListOutgoingLinkTypesResponse | Success response. | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v1-link) [[Back to Model list]](../../../README.md#models-v1-link) [[Back to README]](../../../README.md) - diff --git a/docs/v1/Ontologies/Ontology.md b/docs/v1/Ontologies/Ontology.md deleted file mode 100644 index c7330d317..000000000 --- a/docs/v1/Ontologies/Ontology.md +++ /dev/null @@ -1,99 +0,0 @@ -# Ontology - -Method | HTTP request | Release Stage | -------------- | ------------- | ----- | -[**get**](#get) | **GET** /v1/ontologies/{ontologyRid} | Stable | -[**list**](#list) | **GET** /v1/ontologies | Stable | - -# **get** -Gets a specific ontology with the given Ontology RID. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**ontology_rid** | OntologyRid | The unique Resource Identifier (RID) of the Ontology. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. | | - -### Return type -**Ontology** - -### Example - -```python -from foundry_sdk.v1 import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# OntologyRid | The unique Resource Identifier (RID) of the Ontology. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. -ontology_rid = "ri.ontology.main.ontology.c61d9ab5-2919-4127-a0a1-ac64c0ce6367" - - -try: - api_response = client.ontologies.Ontology.get(ontology_rid) - print("The get response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Ontology.get: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | Ontology | Success response. | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v1-link) [[Back to Model list]](../../../README.md#models-v1-link) [[Back to README]](../../../README.md) - -# **list** -Lists the Ontologies visible to the current user. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | - -### Return type -**ListOntologiesResponse** - -### Example - -```python -from foundry_sdk.v1 import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - - -try: - api_response = client.ontologies.Ontology.list() - print("The list response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Ontology.list: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | ListOntologiesResponse | Success response. | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v1-link) [[Back to Model list]](../../../README.md#models-v1-link) [[Back to README]](../../../README.md) - diff --git a/docs/v1/Ontologies/OntologyObject.md b/docs/v1/Ontologies/OntologyObject.md deleted file mode 100644 index a243a6e93..000000000 --- a/docs/v1/Ontologies/OntologyObject.md +++ /dev/null @@ -1,484 +0,0 @@ -# OntologyObject - -Method | HTTP request | Release Stage | -------------- | ------------- | ----- | -[**aggregate**](#aggregate) | **POST** /v1/ontologies/{ontologyRid}/objects/{objectType}/aggregate | Stable | -[**get**](#get) | **GET** /v1/ontologies/{ontologyRid}/objects/{objectType}/{primaryKey} | Stable | -[**get_linked_object**](#get_linked_object) | **GET** /v1/ontologies/{ontologyRid}/objects/{objectType}/{primaryKey}/links/{linkType}/{linkedObjectPrimaryKey} | Stable | -[**list**](#list) | **GET** /v1/ontologies/{ontologyRid}/objects/{objectType} | Stable | -[**list_linked_objects**](#list_linked_objects) | **GET** /v1/ontologies/{ontologyRid}/objects/{objectType}/{primaryKey}/links/{linkType} | Stable | -[**search**](#search) | **POST** /v1/ontologies/{ontologyRid}/objects/{objectType}/search | Stable | - -# **aggregate** -Perform functions on object fields in the specified ontology and object type. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**ontology_rid** | OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the objects. | | -**object_type** | ObjectTypeApiName | The type of the object to aggregate on. | | -**aggregation** | List[Aggregation] | | | -**group_by** | List[AggregationGroupBy] | | | -**query** | Optional[SearchJsonQuery] | | [optional] | - -### Return type -**AggregateObjectsResponse** - -### Example - -```python -from foundry_sdk.v1 import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the objects. -ontology_rid = "ri.ontology.main.ontology.c61d9ab5-2919-4127-a0a1-ac64c0ce6367" -# ObjectTypeApiName | The type of the object to aggregate on. -object_type = "employee" -# List[Aggregation] -aggregation = [ - {"type": "min", "field": "properties.tenure", "name": "min_tenure"}, - {"type": "avg", "field": "properties.tenure", "name": "avg_tenure"}, -] -# List[AggregationGroupBy] -group_by = [ - { - "field": "properties.startDate", - "type": "range", - "ranges": [{"gte": "2020-01-01", "lt": "2020-06-01"}], - }, - {"field": "properties.city", "type": "exact"}, -] -# Optional[SearchJsonQuery] -query = {"not": {"field": "properties.name", "eq": "john"}} - - -try: - api_response = client.ontologies.OntologyObject.aggregate( - ontology_rid, object_type, aggregation=aggregation, group_by=group_by, query=query - ) - print("The aggregate response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling OntologyObject.aggregate: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | AggregateObjectsResponse | Success response. | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v1-link) [[Back to Model list]](../../../README.md#models-v1-link) [[Back to README]](../../../README.md) - -# **get** -Gets a specific object with the given primary key. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**ontology_rid** | OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the object. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. | | -**object_type** | ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. | | -**primary_key** | PropertyValueEscapedString | The primary key of the requested object. To look up the expected primary key for your object type, use the `Get object type` endpoint or the **Ontology Manager**. | | -**properties** | Optional[List[SelectedPropertyApiName]] | The properties of the object type that should be included in the response. Omit this parameter to get all the properties. | [optional] | - -### Return type -**OntologyObject** - -### Example - -```python -from foundry_sdk.v1 import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the object. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. -ontology_rid = "ri.ontology.main.ontology.c61d9ab5-2919-4127-a0a1-ac64c0ce6367" -# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. -object_type = "employee" -# PropertyValueEscapedString | The primary key of the requested object. To look up the expected primary key for your object type, use the `Get object type` endpoint or the **Ontology Manager**. -primary_key = 50030 -# Optional[List[SelectedPropertyApiName]] | The properties of the object type that should be included in the response. Omit this parameter to get all the properties. -properties = None - - -try: - api_response = client.ontologies.OntologyObject.get( - ontology_rid, object_type, primary_key, properties=properties - ) - print("The get response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling OntologyObject.get: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | OntologyObject | Success response. | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v1-link) [[Back to Model list]](../../../README.md#models-v1-link) [[Back to README]](../../../README.md) - -# **get_linked_object** -Get a specific linked object that originates from another object. If there is no link between the two objects, -LinkedObjectNotFound is thrown. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**ontology_rid** | OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the object. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. | | -**object_type** | ObjectTypeApiName | The API name of the object from which the links originate. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. | | -**primary_key** | PropertyValueEscapedString | The primary key of the object from which the link originates. To look up the expected primary key for your object type, use the `Get object type` endpoint or the **Ontology Manager**. | | -**link_type** | LinkTypeApiName | The API name of the link that exists between the object and the requested objects. To find the API name for your link type, check the **Ontology Manager**. | | -**linked_object_primary_key** | PropertyValueEscapedString | The primary key of the requested linked object. To look up the expected primary key for your object type, use the `Get object type` endpoint (passing the linked object type) or the **Ontology Manager**. | | -**properties** | Optional[List[SelectedPropertyApiName]] | The properties of the object type that should be included in the response. Omit this parameter to get all the properties. | [optional] | - -### Return type -**OntologyObject** - -### Example - -```python -from foundry_sdk.v1 import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the object. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. -ontology_rid = "ri.ontology.main.ontology.c61d9ab5-2919-4127-a0a1-ac64c0ce6367" -# ObjectTypeApiName | The API name of the object from which the links originate. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. -object_type = "employee" -# PropertyValueEscapedString | The primary key of the object from which the link originates. To look up the expected primary key for your object type, use the `Get object type` endpoint or the **Ontology Manager**. -primary_key = 50030 -# LinkTypeApiName | The API name of the link that exists between the object and the requested objects. To find the API name for your link type, check the **Ontology Manager**. -link_type = "directReport" -# PropertyValueEscapedString | The primary key of the requested linked object. To look up the expected primary key for your object type, use the `Get object type` endpoint (passing the linked object type) or the **Ontology Manager**. -linked_object_primary_key = 80060 -# Optional[List[SelectedPropertyApiName]] | The properties of the object type that should be included in the response. Omit this parameter to get all the properties. -properties = None - - -try: - api_response = client.ontologies.OntologyObject.get_linked_object( - ontology_rid, - object_type, - primary_key, - link_type, - linked_object_primary_key, - properties=properties, - ) - print("The get_linked_object response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling OntologyObject.get_linked_object: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | OntologyObject | Success response. | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v1-link) [[Back to Model list]](../../../README.md#models-v1-link) [[Back to README]](../../../README.md) - -# **list** -Lists the objects for the given Ontology and object type. - -This endpoint supports filtering objects. -See the [Filtering Objects documentation](https://palantir.com/docs/foundry/api/ontology-resources/objects/ontology-object-basics#filter-objects) for details. - -Note that this endpoint does not guarantee consistency. Changes to the data could result in missing or -repeated objects in the response pages. - -For Object Storage V1 backed objects, this endpoint returns a maximum of 10,000 objects. After 10,000 objects have been returned and if more objects -are available, attempting to load another page will result in an `ObjectsExceededLimit` error being returned. There is no limit on Object Storage V2 backed objects. - -Each page may be smaller or larger than the requested page size. However, it -is guaranteed that if there are more results available, at least one result will be present -in the response. - -Note that null value properties will not be returned. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**ontology_rid** | OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the objects. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. | | -**object_type** | ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. | | -**order_by** | Optional[OrderBy] | | [optional] | -**page_size** | Optional[PageSize] | The desired size of the page to be returned. Defaults to 1,000. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. | [optional] | -**page_token** | Optional[PageToken] | | [optional] | -**properties** | Optional[List[SelectedPropertyApiName]] | The properties of the object type that should be included in the response. Omit this parameter to get all the properties. | [optional] | - -### Return type -**ListObjectsResponse** - -### Example - -```python -from foundry_sdk.v1 import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the objects. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. -ontology_rid = "ri.ontology.main.ontology.c61d9ab5-2919-4127-a0a1-ac64c0ce6367" -# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. -object_type = "employee" -# Optional[OrderBy] -order_by = None -# Optional[PageSize] | The desired size of the page to be returned. Defaults to 1,000. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. -page_size = None -# Optional[PageToken] -page_token = None -# Optional[List[SelectedPropertyApiName]] | The properties of the object type that should be included in the response. Omit this parameter to get all the properties. -properties = None - - -try: - for ontology_object in client.ontologies.OntologyObject.list( - ontology_rid, - object_type, - order_by=order_by, - page_size=page_size, - page_token=page_token, - properties=properties, - ): - pprint(ontology_object) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling OntologyObject.list: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | ListObjectsResponse | Success response. | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v1-link) [[Back to Model list]](../../../README.md#models-v1-link) [[Back to README]](../../../README.md) - -# **list_linked_objects** -Lists the linked objects for a specific object and the given link type. - -This endpoint supports filtering objects. -See the [Filtering Objects documentation](https://palantir.com/docs/foundry/api/ontology-resources/objects/ontology-object-basics#filter-objects) for details. - -Note that this endpoint does not guarantee consistency. Changes to the data could result in missing or -repeated objects in the response pages. - -For Object Storage V1 backed objects, this endpoint returns a maximum of 10,000 objects. After 10,000 objects have been returned and if more objects -are available, attempting to load another page will result in an `ObjectsExceededLimit` error being returned. There is no limit on Object Storage V2 backed objects. - -Each page may be smaller or larger than the requested page size. However, it -is guaranteed that if there are more results available, at least one result will be present -in the response. - -Note that null value properties will not be returned. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**ontology_rid** | OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the objects. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. | | -**object_type** | ObjectTypeApiName | The API name of the object from which the links originate. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. | | -**primary_key** | PropertyValueEscapedString | The primary key of the object from which the links originate. To look up the expected primary key for your object type, use the `Get object type` endpoint or the **Ontology Manager**. | | -**link_type** | LinkTypeApiName | The API name of the link that exists between the object and the requested objects. To find the API name for your link type, check the **Ontology Manager**. | | -**order_by** | Optional[OrderBy] | | [optional] | -**page_size** | Optional[PageSize] | The desired size of the page to be returned. Defaults to 1,000. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. | [optional] | -**page_token** | Optional[PageToken] | | [optional] | -**properties** | Optional[List[SelectedPropertyApiName]] | The properties of the object type that should be included in the response. Omit this parameter to get all the properties. | [optional] | - -### Return type -**ListLinkedObjectsResponse** - -### Example - -```python -from foundry_sdk.v1 import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the objects. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. -ontology_rid = "ri.ontology.main.ontology.c61d9ab5-2919-4127-a0a1-ac64c0ce6367" -# ObjectTypeApiName | The API name of the object from which the links originate. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. -object_type = "employee" -# PropertyValueEscapedString | The primary key of the object from which the links originate. To look up the expected primary key for your object type, use the `Get object type` endpoint or the **Ontology Manager**. -primary_key = 50030 -# LinkTypeApiName | The API name of the link that exists between the object and the requested objects. To find the API name for your link type, check the **Ontology Manager**. -link_type = "directReport" -# Optional[OrderBy] -order_by = None -# Optional[PageSize] | The desired size of the page to be returned. Defaults to 1,000. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. -page_size = None -# Optional[PageToken] -page_token = None -# Optional[List[SelectedPropertyApiName]] | The properties of the object type that should be included in the response. Omit this parameter to get all the properties. -properties = None - - -try: - for ontology_object in client.ontologies.OntologyObject.list_linked_objects( - ontology_rid, - object_type, - primary_key, - link_type, - order_by=order_by, - page_size=page_size, - page_token=page_token, - properties=properties, - ): - pprint(ontology_object) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling OntologyObject.list_linked_objects: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | ListLinkedObjectsResponse | Success response. | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v1-link) [[Back to Model list]](../../../README.md#models-v1-link) [[Back to README]](../../../README.md) - -# **search** -Search for objects in the specified ontology and object type. The request body is used -to filter objects based on the specified query. The supported queries are: - -| Query type | Description | Supported Types | -|----------|-----------------------------------------------------------------------------------|---------------------------------| -| lt | The provided property is less than the provided value. | number, string, date, timestamp | -| gt | The provided property is greater than the provided value. | number, string, date, timestamp | -| lte | The provided property is less than or equal to the provided value. | number, string, date, timestamp | -| gte | The provided property is greater than or equal to the provided value. | number, string, date, timestamp | -| eq | The provided property is exactly equal to the provided value. | number, string, date, timestamp | -| isNull | The provided property is (or is not) null. | all | -| contains | The provided property contains the provided value. | array | -| not | The sub-query does not match. | N/A (applied on a query) | -| and | All the sub-queries match. | N/A (applied on queries) | -| or | At least one of the sub-queries match. | N/A (applied on queries) | -| prefix | The provided property starts with the provided term. | string | -| phrase | The provided property contains the provided term as a substring. | string | -| anyTerm | The provided property contains at least one of the terms separated by whitespace. | string | -| allTerms | The provided property contains all the terms separated by whitespace. | string | - -Queries can be at most three levels deep. By default, terms are separated by whitespace or punctuation (`?!,:;-[](){}'"~`). Periods (`.`) on their own are ignored. -Partial terms are not matched by terms filters except where explicitly noted. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**ontology_rid** | OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the objects. | | -**object_type** | ObjectTypeApiName | The type of the requested objects. | | -**fields** | List[PropertyApiName] | The API names of the object type properties to include in the response. | | -**query** | SearchJsonQuery | | | -**order_by** | Optional[SearchOrderBy] | | [optional] | -**page_size** | Optional[PageSize] | | [optional] | -**page_token** | Optional[PageToken] | | [optional] | - -### Return type -**SearchObjectsResponse** - -### Example - -```python -from foundry_sdk.v1 import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the objects. -ontology_rid = "ri.ontology.main.ontology.c61d9ab5-2919-4127-a0a1-ac64c0ce6367" -# ObjectTypeApiName | The type of the requested objects. -object_type = "employee" -# List[PropertyApiName] | The API names of the object type properties to include in the response. -fields = None -# SearchJsonQuery -query = {"not": {"field": "properties.age", "eq": 21}} -# Optional[SearchOrderBy] -order_by = None -# Optional[PageSize] -page_size = None -# Optional[PageToken] -page_token = None - - -try: - api_response = client.ontologies.OntologyObject.search( - ontology_rid, - object_type, - fields=fields, - query=query, - order_by=order_by, - page_size=page_size, - page_token=page_token, - ) - print("The search response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling OntologyObject.search: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | SearchObjectsResponse | Success response. | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v1-link) [[Back to Model list]](../../../README.md#models-v1-link) [[Back to README]](../../../README.md) - diff --git a/docs/v1/Ontologies/Query.md b/docs/v1/Ontologies/Query.md deleted file mode 100644 index 14c140c15..000000000 --- a/docs/v1/Ontologies/Query.md +++ /dev/null @@ -1,76 +0,0 @@ -# Query - -Method | HTTP request | Release Stage | -------------- | ------------- | ----- | -[**execute**](#execute) | **POST** /v1/ontologies/{ontologyRid}/queries/{queryApiName}/execute | Stable | - -# **execute** -Executes a Query using the given parameters. Optional parameters do not need to be supplied. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**ontology_rid** | OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the Query. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. | | -**query_api_name** | QueryApiName | The API name of the Query to execute. | | -**parameters** | Dict[ParameterId, Optional[DataValue]] | | | -**attribution** | Optional[Attribution] | The Attribution to be used when executing this request. | [optional] | -**trace_parent** | Optional[TraceParent] | The W3C trace parent header included in the request. | [optional] | -**trace_state** | Optional[TraceState] | The W3C trace state header included in the request. | [optional] | - -### Return type -**ExecuteQueryResponse** - -### Example - -```python -from foundry_sdk.v1 import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the Query. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. -ontology_rid = "ri.ontology.main.ontology.c61d9ab5-2919-4127-a0a1-ac64c0ce6367" -# QueryApiName | The API name of the Query to execute. -query_api_name = "getEmployeesInCity" -# Dict[ParameterId, Optional[DataValue]] -parameters = {"city": "New York"} -# Optional[Attribution] | The Attribution to be used when executing this request. -attribution = None -# Optional[TraceParent] | The W3C trace parent header included in the request. -trace_parent = None -# Optional[TraceState] | The W3C trace state header included in the request. -trace_state = None - - -try: - api_response = client.ontologies.Query.execute( - ontology_rid, - query_api_name, - parameters=parameters, - attribution=attribution, - trace_parent=trace_parent, - trace_state=trace_state, - ) - print("The execute response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Query.execute: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | ExecuteQueryResponse | Success response. | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v1-link) [[Back to Model list]](../../../README.md#models-v1-link) [[Back to README]](../../../README.md) - diff --git a/docs/v1/Ontologies/QueryType.md b/docs/v1/Ontologies/QueryType.md deleted file mode 100644 index 6eb0e4b37..000000000 --- a/docs/v1/Ontologies/QueryType.md +++ /dev/null @@ -1,116 +0,0 @@ -# QueryType - -Method | HTTP request | Release Stage | -------------- | ------------- | ----- | -[**get**](#get) | **GET** /v1/ontologies/{ontologyRid}/queryTypes/{queryApiName} | Stable | -[**list**](#list) | **GET** /v1/ontologies/{ontologyRid}/queryTypes | Stable | - -# **get** -Gets a specific query type with the given API name. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**ontology_rid** | OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the query type. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. | | -**query_api_name** | QueryApiName | The API name of the query type. To find the API name, use the **List query types** endpoint or check the **Ontology Manager**. | | - -### Return type -**QueryType** - -### Example - -```python -from foundry_sdk.v1 import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the query type. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. -ontology_rid = "ri.ontology.main.ontology.c61d9ab5-2919-4127-a0a1-ac64c0ce6367" -# QueryApiName | The API name of the query type. To find the API name, use the **List query types** endpoint or check the **Ontology Manager**. -query_api_name = "getEmployeesInCity" - - -try: - api_response = client.ontologies.Ontology.QueryType.get(ontology_rid, query_api_name) - print("The get response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling QueryType.get: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | QueryType | Success response. | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v1-link) [[Back to Model list]](../../../README.md#models-v1-link) [[Back to README]](../../../README.md) - -# **list** -Lists the query types for the given Ontology. - -Each page may be smaller than the requested page size. However, it is guaranteed that if there are more -results available, at least one result will be present in the response. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**ontology_rid** | OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the query types. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. | | -**page_size** | Optional[PageSize] | The desired size of the page to be returned. Defaults to 100. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. | [optional] | -**page_token** | Optional[PageToken] | | [optional] | - -### Return type -**ListQueryTypesResponse** - -### Example - -```python -from foundry_sdk.v1 import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the query types. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. -ontology_rid = "ri.ontology.main.ontology.c61d9ab5-2919-4127-a0a1-ac64c0ce6367" -# Optional[PageSize] | The desired size of the page to be returned. Defaults to 100. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. -page_size = None -# Optional[PageToken] -page_token = None - - -try: - for query_type in client.ontologies.Ontology.QueryType.list( - ontology_rid, page_size=page_size, page_token=page_token - ): - pprint(query_type) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling QueryType.list: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | ListQueryTypesResponse | Success response. | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v1-link) [[Back to Model list]](../../../README.md#models-v1-link) [[Back to README]](../../../README.md) - diff --git a/docs/v1/Ontologies/models/ActionRid.md b/docs/v1/Ontologies/models/ActionRid.md deleted file mode 100644 index f532a8351..000000000 --- a/docs/v1/Ontologies/models/ActionRid.md +++ /dev/null @@ -1,11 +0,0 @@ -# ActionRid - -The unique resource identifier for an action. - -## Type -```python -RID -``` - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/ActionType.md b/docs/v1/Ontologies/models/ActionType.md deleted file mode 100644 index 3e6cc78bf..000000000 --- a/docs/v1/Ontologies/models/ActionType.md +++ /dev/null @@ -1,17 +0,0 @@ -# ActionType - -Represents an action type in the Ontology. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**api_name** | ActionTypeApiName | Yes | | -**description** | Optional[str] | No | | -**display_name** | Optional[DisplayName] | No | | -**status** | ReleaseStatus | Yes | | -**parameters** | Dict[ParameterId, Parameter] | Yes | | -**rid** | ActionTypeRid | Yes | | -**operations** | List[LogicRule] | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/ActionTypeApiName.md b/docs/v1/Ontologies/models/ActionTypeApiName.md deleted file mode 100644 index 8812f5c4b..000000000 --- a/docs/v1/Ontologies/models/ActionTypeApiName.md +++ /dev/null @@ -1,13 +0,0 @@ -# ActionTypeApiName - -The name of the action type in the API. To find the API name for your Action Type, use the `List action types` -endpoint or check the **Ontology Manager**. - - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/ActionTypeRid.md b/docs/v1/Ontologies/models/ActionTypeRid.md deleted file mode 100644 index b91f5fcbc..000000000 --- a/docs/v1/Ontologies/models/ActionTypeRid.md +++ /dev/null @@ -1,12 +0,0 @@ -# ActionTypeRid - -The unique resource identifier of an action type, useful for interacting with other Foundry APIs. - - -## Type -```python -RID -``` - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/AggregateObjectsRequest.md b/docs/v1/Ontologies/models/AggregateObjectsRequest.md deleted file mode 100644 index d95c1410b..000000000 --- a/docs/v1/Ontologies/models/AggregateObjectsRequest.md +++ /dev/null @@ -1,13 +0,0 @@ -# AggregateObjectsRequest - -AggregateObjectsRequest - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**aggregation** | List[Aggregation] | Yes | | -**query** | Optional[SearchJsonQuery] | No | | -**group_by** | List[AggregationGroupBy] | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/AggregateObjectsResponse.md b/docs/v1/Ontologies/models/AggregateObjectsResponse.md deleted file mode 100644 index 307ab6863..000000000 --- a/docs/v1/Ontologies/models/AggregateObjectsResponse.md +++ /dev/null @@ -1,13 +0,0 @@ -# AggregateObjectsResponse - -AggregateObjectsResponse - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**excluded_items** | Optional[int] | No | | -**next_page_token** | Optional[PageToken] | No | | -**data** | List[AggregateObjectsResponseItem] | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/AggregateObjectsResponseItem.md b/docs/v1/Ontologies/models/AggregateObjectsResponseItem.md deleted file mode 100644 index 939396dc1..000000000 --- a/docs/v1/Ontologies/models/AggregateObjectsResponseItem.md +++ /dev/null @@ -1,12 +0,0 @@ -# AggregateObjectsResponseItem - -AggregateObjectsResponseItem - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**group** | Dict[AggregationGroupKey, AggregationGroupValue] | Yes | | -**metrics** | List[AggregationMetricResult] | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/Aggregation.md b/docs/v1/Ontologies/models/Aggregation.md deleted file mode 100644 index 22cf9e1f6..000000000 --- a/docs/v1/Ontologies/models/Aggregation.md +++ /dev/null @@ -1,20 +0,0 @@ -# Aggregation - -Specifies an aggregation function. - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -ApproximateDistinctAggregation | approximateDistinct -MinAggregation | min -AvgAggregation | avg -MaxAggregation | max -CountAggregation | count -SumAggregation | sum - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/AggregationDurationGrouping.md b/docs/v1/Ontologies/models/AggregationDurationGrouping.md deleted file mode 100644 index a439427ad..000000000 --- a/docs/v1/Ontologies/models/AggregationDurationGrouping.md +++ /dev/null @@ -1,15 +0,0 @@ -# AggregationDurationGrouping - -Divides objects into groups according to an interval. Note that this grouping applies only on date types. -The interval uses the ISO 8601 notation. For example, "PT1H2M34S" represents a duration of 3754 seconds. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**field** | FieldNameV1 | Yes | | -**duration** | Duration | Yes | | -**type** | Literal["duration"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/AggregationExactGrouping.md b/docs/v1/Ontologies/models/AggregationExactGrouping.md deleted file mode 100644 index f66bb28f1..000000000 --- a/docs/v1/Ontologies/models/AggregationExactGrouping.md +++ /dev/null @@ -1,13 +0,0 @@ -# AggregationExactGrouping - -Divides objects into groups according to an exact value. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**field** | FieldNameV1 | Yes | | -**max_group_count** | Optional[int] | No | | -**type** | Literal["exact"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/AggregationFixedWidthGrouping.md b/docs/v1/Ontologies/models/AggregationFixedWidthGrouping.md deleted file mode 100644 index a37120287..000000000 --- a/docs/v1/Ontologies/models/AggregationFixedWidthGrouping.md +++ /dev/null @@ -1,13 +0,0 @@ -# AggregationFixedWidthGrouping - -Divides objects into groups with the specified width. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**field** | FieldNameV1 | Yes | | -**fixed_width** | int | Yes | | -**type** | Literal["fixedWidth"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/AggregationGroupBy.md b/docs/v1/Ontologies/models/AggregationGroupBy.md deleted file mode 100644 index 9de55a4b4..000000000 --- a/docs/v1/Ontologies/models/AggregationGroupBy.md +++ /dev/null @@ -1,18 +0,0 @@ -# AggregationGroupBy - -Specifies a grouping for aggregation results. - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -AggregationDurationGrouping | duration -AggregationFixedWidthGrouping | fixedWidth -AggregationRangesGrouping | ranges -AggregationExactGrouping | exact - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/AggregationGroupKey.md b/docs/v1/Ontologies/models/AggregationGroupKey.md deleted file mode 100644 index 691aa1764..000000000 --- a/docs/v1/Ontologies/models/AggregationGroupKey.md +++ /dev/null @@ -1,11 +0,0 @@ -# AggregationGroupKey - -AggregationGroupKey - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/AggregationGroupValue.md b/docs/v1/Ontologies/models/AggregationGroupValue.md deleted file mode 100644 index 193574c50..000000000 --- a/docs/v1/Ontologies/models/AggregationGroupValue.md +++ /dev/null @@ -1,11 +0,0 @@ -# AggregationGroupValue - -AggregationGroupValue - -## Type -```python -Any -``` - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/AggregationMetricName.md b/docs/v1/Ontologies/models/AggregationMetricName.md deleted file mode 100644 index 2d50d56dc..000000000 --- a/docs/v1/Ontologies/models/AggregationMetricName.md +++ /dev/null @@ -1,11 +0,0 @@ -# AggregationMetricName - -A user-specified alias for an aggregation metric name. - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/AggregationMetricResult.md b/docs/v1/Ontologies/models/AggregationMetricResult.md deleted file mode 100644 index 796c0cccb..000000000 --- a/docs/v1/Ontologies/models/AggregationMetricResult.md +++ /dev/null @@ -1,12 +0,0 @@ -# AggregationMetricResult - -AggregationMetricResult - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**name** | str | Yes | | -**value** | Optional[float] | No | TBD | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/AggregationRange.md b/docs/v1/Ontologies/models/AggregationRange.md deleted file mode 100644 index 0e6822636..000000000 --- a/docs/v1/Ontologies/models/AggregationRange.md +++ /dev/null @@ -1,14 +0,0 @@ -# AggregationRange - -Specifies a date range from an inclusive start date to an exclusive end date. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**lt** | Optional[Any] | No | Exclusive end date. | -**lte** | Optional[Any] | No | Inclusive end date. | -**gt** | Optional[Any] | No | Exclusive start date. | -**gte** | Optional[Any] | No | Inclusive start date. | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/AggregationRangesGrouping.md b/docs/v1/Ontologies/models/AggregationRangesGrouping.md deleted file mode 100644 index 5334312c1..000000000 --- a/docs/v1/Ontologies/models/AggregationRangesGrouping.md +++ /dev/null @@ -1,13 +0,0 @@ -# AggregationRangesGrouping - -Divides objects into groups according to specified ranges. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**field** | FieldNameV1 | Yes | | -**ranges** | List[AggregationRange] | Yes | | -**type** | Literal["ranges"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/AllTermsQuery.md b/docs/v1/Ontologies/models/AllTermsQuery.md deleted file mode 100644 index 8e6d6d942..000000000 --- a/docs/v1/Ontologies/models/AllTermsQuery.md +++ /dev/null @@ -1,16 +0,0 @@ -# AllTermsQuery - -Returns objects where the specified field contains all of the whitespace separated words in any -order in the provided value. This query supports fuzzy matching. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**field** | FieldNameV1 | Yes | | -**value** | str | Yes | | -**fuzzy** | Optional[Fuzzy] | No | | -**type** | Literal["allTerms"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/AndQuery.md b/docs/v1/Ontologies/models/AndQuery.md deleted file mode 100644 index eaf94c057..000000000 --- a/docs/v1/Ontologies/models/AndQuery.md +++ /dev/null @@ -1,12 +0,0 @@ -# AndQuery - -Returns objects where every query is satisfied. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**value** | List[SearchJsonQuery] | Yes | | -**type** | Literal["and"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/AnyTermQuery.md b/docs/v1/Ontologies/models/AnyTermQuery.md deleted file mode 100644 index ab899facc..000000000 --- a/docs/v1/Ontologies/models/AnyTermQuery.md +++ /dev/null @@ -1,16 +0,0 @@ -# AnyTermQuery - -Returns objects where the specified field contains any of the whitespace separated words in any -order in the provided value. This query supports fuzzy matching. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**field** | FieldNameV1 | Yes | | -**value** | str | Yes | | -**fuzzy** | Optional[Fuzzy] | No | | -**type** | Literal["anyTerm"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/ApplyActionMode.md b/docs/v1/Ontologies/models/ApplyActionMode.md deleted file mode 100644 index 773e7c520..000000000 --- a/docs/v1/Ontologies/models/ApplyActionMode.md +++ /dev/null @@ -1,11 +0,0 @@ -# ApplyActionMode - -ApplyActionMode - -| **Value** | -| --------- | -| `"VALIDATE_ONLY"` | -| `"VALIDATE_AND_EXECUTE"` | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/ApplyActionRequest.md b/docs/v1/Ontologies/models/ApplyActionRequest.md deleted file mode 100644 index 74b19a4c1..000000000 --- a/docs/v1/Ontologies/models/ApplyActionRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# ApplyActionRequest - -ApplyActionRequest - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**parameters** | Dict[ParameterId, Optional[DataValue]] | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/ApplyActionRequestOptions.md b/docs/v1/Ontologies/models/ApplyActionRequestOptions.md deleted file mode 100644 index 5418b41c0..000000000 --- a/docs/v1/Ontologies/models/ApplyActionRequestOptions.md +++ /dev/null @@ -1,12 +0,0 @@ -# ApplyActionRequestOptions - -ApplyActionRequestOptions - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**mode** | Optional[ApplyActionMode] | No | | -**return_edits** | Optional[ReturnEditsMode] | No | | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/ApplyActionResponse.md b/docs/v1/Ontologies/models/ApplyActionResponse.md deleted file mode 100644 index b46432b1a..000000000 --- a/docs/v1/Ontologies/models/ApplyActionResponse.md +++ /dev/null @@ -1,10 +0,0 @@ -# ApplyActionResponse - -ApplyActionResponse - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/ApproximateDistinctAggregation.md b/docs/v1/Ontologies/models/ApproximateDistinctAggregation.md deleted file mode 100644 index 95f1226f1..000000000 --- a/docs/v1/Ontologies/models/ApproximateDistinctAggregation.md +++ /dev/null @@ -1,13 +0,0 @@ -# ApproximateDistinctAggregation - -Computes an approximate number of distinct values for the provided field. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**field** | FieldNameV1 | Yes | | -**name** | Optional[AggregationMetricName] | No | | -**type** | Literal["approximateDistinct"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/ArrayEntryEvaluatedConstraint.md b/docs/v1/Ontologies/models/ArrayEntryEvaluatedConstraint.md deleted file mode 100644 index 51856f717..000000000 --- a/docs/v1/Ontologies/models/ArrayEntryEvaluatedConstraint.md +++ /dev/null @@ -1,11 +0,0 @@ -# ArrayEntryEvaluatedConstraint - -Evaluated constraints for entries of array parameters for which per-entry evaluation is supported. - -## Type -```python -StructEvaluatedConstraint -``` - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/ArrayEvaluatedConstraint.md b/docs/v1/Ontologies/models/ArrayEvaluatedConstraint.md deleted file mode 100644 index 47bad29e6..000000000 --- a/docs/v1/Ontologies/models/ArrayEvaluatedConstraint.md +++ /dev/null @@ -1,12 +0,0 @@ -# ArrayEvaluatedConstraint - -Evaluated constraints of array parameters that support per-entry constraint evaluations. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**entries** | List[ArrayEntryEvaluatedConstraint] | Yes | | -**type** | Literal["array"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/ArraySizeConstraint.md b/docs/v1/Ontologies/models/ArraySizeConstraint.md deleted file mode 100644 index d3b8d5879..000000000 --- a/docs/v1/Ontologies/models/ArraySizeConstraint.md +++ /dev/null @@ -1,16 +0,0 @@ -# ArraySizeConstraint - -The parameter expects an array of values and the size of the array must fall within the defined range. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**lt** | Optional[Any] | No | Less than | -**lte** | Optional[Any] | No | Less than or equal | -**gt** | Optional[Any] | No | Greater than | -**gte** | Optional[Any] | No | Greater than or equal | -**type** | Literal["arraySize"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/ArtifactRepositoryRid.md b/docs/v1/Ontologies/models/ArtifactRepositoryRid.md deleted file mode 100644 index 302ef431b..000000000 --- a/docs/v1/Ontologies/models/ArtifactRepositoryRid.md +++ /dev/null @@ -1,11 +0,0 @@ -# ArtifactRepositoryRid - -ArtifactRepositoryRid - -## Type -```python -RID -``` - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/Attachment.md b/docs/v1/Ontologies/models/Attachment.md deleted file mode 100644 index 4311eb0b6..000000000 --- a/docs/v1/Ontologies/models/Attachment.md +++ /dev/null @@ -1,14 +0,0 @@ -# Attachment - -The representation of an attachment. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**rid** | AttachmentRid | Yes | | -**filename** | Filename | Yes | | -**size_bytes** | SizeBytes | Yes | | -**media_type** | MediaType | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/AttachmentRid.md b/docs/v1/Ontologies/models/AttachmentRid.md deleted file mode 100644 index dbaf13158..000000000 --- a/docs/v1/Ontologies/models/AttachmentRid.md +++ /dev/null @@ -1,11 +0,0 @@ -# AttachmentRid - -The unique resource identifier of an attachment. - -## Type -```python -RID -``` - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/AvgAggregation.md b/docs/v1/Ontologies/models/AvgAggregation.md deleted file mode 100644 index 70c480e61..000000000 --- a/docs/v1/Ontologies/models/AvgAggregation.md +++ /dev/null @@ -1,13 +0,0 @@ -# AvgAggregation - -Computes the average value for the provided field. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**field** | FieldNameV1 | Yes | | -**name** | Optional[AggregationMetricName] | No | | -**type** | Literal["avg"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/BatchApplyActionRequest.md b/docs/v1/Ontologies/models/BatchApplyActionRequest.md deleted file mode 100644 index fbea9545b..000000000 --- a/docs/v1/Ontologies/models/BatchApplyActionRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# BatchApplyActionRequest - -BatchApplyActionRequest - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**requests** | List[ApplyActionRequest] | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/BatchApplyActionResponse.md b/docs/v1/Ontologies/models/BatchApplyActionResponse.md deleted file mode 100644 index 674ddf7b4..000000000 --- a/docs/v1/Ontologies/models/BatchApplyActionResponse.md +++ /dev/null @@ -1,10 +0,0 @@ -# BatchApplyActionResponse - -BatchApplyActionResponse - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/ContainsQuery.md b/docs/v1/Ontologies/models/ContainsQuery.md deleted file mode 100644 index 27e55ec79..000000000 --- a/docs/v1/Ontologies/models/ContainsQuery.md +++ /dev/null @@ -1,13 +0,0 @@ -# ContainsQuery - -Returns objects where the specified array contains a value. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**field** | FieldNameV1 | Yes | | -**value** | PropertyValue | Yes | | -**type** | Literal["contains"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/CountAggregation.md b/docs/v1/Ontologies/models/CountAggregation.md deleted file mode 100644 index 04d31ad28..000000000 --- a/docs/v1/Ontologies/models/CountAggregation.md +++ /dev/null @@ -1,12 +0,0 @@ -# CountAggregation - -Computes the total count of objects. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**name** | Optional[AggregationMetricName] | No | | -**type** | Literal["count"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/CreateInterfaceObjectRule.md b/docs/v1/Ontologies/models/CreateInterfaceObjectRule.md deleted file mode 100644 index e5b47b17c..000000000 --- a/docs/v1/Ontologies/models/CreateInterfaceObjectRule.md +++ /dev/null @@ -1,12 +0,0 @@ -# CreateInterfaceObjectRule - -CreateInterfaceObjectRule - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**interface_type_api_name** | InterfaceTypeApiName | Yes | | -**type** | Literal["createInterfaceObject"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/CreateLinkRule.md b/docs/v1/Ontologies/models/CreateLinkRule.md deleted file mode 100644 index aabcaee42..000000000 --- a/docs/v1/Ontologies/models/CreateLinkRule.md +++ /dev/null @@ -1,15 +0,0 @@ -# CreateLinkRule - -CreateLinkRule - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**link_type_api_name_ato_b** | LinkTypeApiName | Yes | | -**link_type_api_name_bto_a** | LinkTypeApiName | Yes | | -**a_side_object_type_api_name** | ObjectTypeApiName | Yes | | -**b_side_object_type_api_name** | ObjectTypeApiName | Yes | | -**type** | Literal["createLink"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/CreateObjectRule.md b/docs/v1/Ontologies/models/CreateObjectRule.md deleted file mode 100644 index f1d3cd270..000000000 --- a/docs/v1/Ontologies/models/CreateObjectRule.md +++ /dev/null @@ -1,12 +0,0 @@ -# CreateObjectRule - -CreateObjectRule - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**object_type_api_name** | ObjectTypeApiName | Yes | | -**type** | Literal["createObject"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/DataValue.md b/docs/v1/Ontologies/models/DataValue.md deleted file mode 100644 index 5eb655149..000000000 --- a/docs/v1/Ontologies/models/DataValue.md +++ /dev/null @@ -1,39 +0,0 @@ -# DataValue - -Represents the value of data in the following format. Note that these values can be nested, for example an array of structs. -| Type | JSON encoding | Example | -|-------------------------------------|-------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Array | array | `["alpha", "bravo", "charlie"]` | -| Attachment | string | `"ri.attachments.main.attachment.2f944bae-5851-4204-8615-920c969a9f2e"` | -| Boolean | boolean | `true` | -| Byte | number | `31` | -| CipherText | string | `"CIPHER::ri.bellaso.main.cipher-channel.e414ab9e-b606-499a-a0e1-844fa296ba7e::unzjs3VifsTxuIpf1fH1CJ7OaPBr2bzMMdozPaZJtCii8vVG60yXIEmzoOJaEl9mfFFe::CIPHER"` | -| Date | ISO 8601 extended local date string | `"2021-05-01"` | -| Decimal | string | `"2.718281828"` | -| Double | number | `3.14159265` | -| EntrySet | array of JSON objects | `[{"key": "EMP1234", "value": "true"}, {"key": "EMP4444", "value": "false"}]` | -| Float | number | `3.14159265` | -| Integer | number | `238940` | -| Long | string | `"58319870951433"` | -| Marking | string | `"MU"` | -| Null | null | `null` | -| Object Set | string OR the object set definition | `ri.object-set.main.versioned-object-set.h13274m8-23f5-431c-8aee-a4554157c57z` | -| Ontology Object Reference | JSON encoding of the object's primary key | `10033123` or `"EMP1234"` | -| Ontology Interface Object Reference | JSON encoding of the object's API name and primary key| `{"objectTypeApiName":"Employee", "primaryKeyValue":"EMP1234"}` | -| Ontology Object Type Reference | string of the object type's api name | `"Employee"` | -| Set | array | `["alpha", "bravo", "charlie"]` | -| Short | number | `8739` | -| String | string | `"Call me Ishmael"` | -| Struct | JSON object | `{"name": "John Doe", "age": 42}` | -| TwoDimensionalAggregation | JSON object | `{"groups": [{"key": "alpha", "value": 100}, {"key": "beta", "value": 101}]}` | -| ThreeDimensionalAggregation | JSON object | `{"groups": [{"key": "NYC", "groups": [{"key": "Engineer", "value" : 100}]}]}` | -| Timestamp | ISO 8601 extended offset date-time string in UTC zone | `"2021-01-04T05:00:00Z"` | - - -## Type -```python -Any -``` - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/DeleteInterfaceObjectRule.md b/docs/v1/Ontologies/models/DeleteInterfaceObjectRule.md deleted file mode 100644 index 5e0ef0ecf..000000000 --- a/docs/v1/Ontologies/models/DeleteInterfaceObjectRule.md +++ /dev/null @@ -1,12 +0,0 @@ -# DeleteInterfaceObjectRule - -DeleteInterfaceObjectRule - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**interface_type_api_name** | InterfaceTypeApiName | Yes | | -**type** | Literal["deleteInterfaceObject"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/DeleteLinkRule.md b/docs/v1/Ontologies/models/DeleteLinkRule.md deleted file mode 100644 index ff18c2b1e..000000000 --- a/docs/v1/Ontologies/models/DeleteLinkRule.md +++ /dev/null @@ -1,15 +0,0 @@ -# DeleteLinkRule - -DeleteLinkRule - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**link_type_api_name_ato_b** | LinkTypeApiName | Yes | | -**link_type_api_name_bto_a** | LinkTypeApiName | Yes | | -**a_side_object_type_api_name** | ObjectTypeApiName | Yes | | -**b_side_object_type_api_name** | ObjectTypeApiName | Yes | | -**type** | Literal["deleteLink"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/DeleteObjectRule.md b/docs/v1/Ontologies/models/DeleteObjectRule.md deleted file mode 100644 index a220f7509..000000000 --- a/docs/v1/Ontologies/models/DeleteObjectRule.md +++ /dev/null @@ -1,12 +0,0 @@ -# DeleteObjectRule - -DeleteObjectRule - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**object_type_api_name** | ObjectTypeApiName | Yes | | -**type** | Literal["deleteObject"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/DerivedPropertyApiName.md b/docs/v1/Ontologies/models/DerivedPropertyApiName.md deleted file mode 100644 index ca774ce41..000000000 --- a/docs/v1/Ontologies/models/DerivedPropertyApiName.md +++ /dev/null @@ -1,12 +0,0 @@ -# DerivedPropertyApiName - -The name of the derived property that will be returned. - - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/Duration.md b/docs/v1/Ontologies/models/Duration.md deleted file mode 100644 index 9a3708333..000000000 --- a/docs/v1/Ontologies/models/Duration.md +++ /dev/null @@ -1,11 +0,0 @@ -# Duration - -An ISO 8601 formatted duration. - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/EntrySetType.md b/docs/v1/Ontologies/models/EntrySetType.md deleted file mode 100644 index 5a8563bd5..000000000 --- a/docs/v1/Ontologies/models/EntrySetType.md +++ /dev/null @@ -1,13 +0,0 @@ -# EntrySetType - -EntrySetType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**key_type** | QueryDataType | Yes | | -**value_type** | QueryDataType | Yes | | -**type** | Literal["entrySet"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/EqualsQuery.md b/docs/v1/Ontologies/models/EqualsQuery.md deleted file mode 100644 index 1cce0243c..000000000 --- a/docs/v1/Ontologies/models/EqualsQuery.md +++ /dev/null @@ -1,13 +0,0 @@ -# EqualsQuery - -Returns objects where the specified field is equal to a value. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**field** | FieldNameV1 | Yes | | -**value** | PropertyValue | Yes | | -**type** | Literal["eq"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/ExecuteQueryRequest.md b/docs/v1/Ontologies/models/ExecuteQueryRequest.md deleted file mode 100644 index e4f882a7d..000000000 --- a/docs/v1/Ontologies/models/ExecuteQueryRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# ExecuteQueryRequest - -ExecuteQueryRequest - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**parameters** | Dict[ParameterId, Optional[DataValue]] | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/ExecuteQueryResponse.md b/docs/v1/Ontologies/models/ExecuteQueryResponse.md deleted file mode 100644 index 8238931f8..000000000 --- a/docs/v1/Ontologies/models/ExecuteQueryResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# ExecuteQueryResponse - -ExecuteQueryResponse - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**value** | DataValue | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/FieldNameV1.md b/docs/v1/Ontologies/models/FieldNameV1.md deleted file mode 100644 index 7170b48bc..000000000 --- a/docs/v1/Ontologies/models/FieldNameV1.md +++ /dev/null @@ -1,11 +0,0 @@ -# FieldNameV1 - -A reference to an Ontology object property with the form `properties.{propertyApiName}`. - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/FilterValue.md b/docs/v1/Ontologies/models/FilterValue.md deleted file mode 100644 index 6a3d84484..000000000 --- a/docs/v1/Ontologies/models/FilterValue.md +++ /dev/null @@ -1,13 +0,0 @@ -# FilterValue - -Represents the value of a property filter. For instance, false is the FilterValue in -`properties.{propertyApiName}.isNull=false`. - - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/FunctionRid.md b/docs/v1/Ontologies/models/FunctionRid.md deleted file mode 100644 index 204e7e77c..000000000 --- a/docs/v1/Ontologies/models/FunctionRid.md +++ /dev/null @@ -1,12 +0,0 @@ -# FunctionRid - -The unique resource identifier of a Function, useful for interacting with other Foundry APIs. - - -## Type -```python -RID -``` - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/FunctionVersion.md b/docs/v1/Ontologies/models/FunctionVersion.md deleted file mode 100644 index 92a755938..000000000 --- a/docs/v1/Ontologies/models/FunctionVersion.md +++ /dev/null @@ -1,13 +0,0 @@ -# FunctionVersion - -The version of the given Function, written `..-`, where `-` is optional. -Examples: `1.2.3`, `1.2.3-rc1`. - - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/Fuzzy.md b/docs/v1/Ontologies/models/Fuzzy.md deleted file mode 100644 index 9421fb223..000000000 --- a/docs/v1/Ontologies/models/Fuzzy.md +++ /dev/null @@ -1,11 +0,0 @@ -# Fuzzy - -Setting fuzzy to `true` allows approximate matching in search queries that support it. - -## Type -```python -bool -``` - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/GroupMemberConstraint.md b/docs/v1/Ontologies/models/GroupMemberConstraint.md deleted file mode 100644 index 73d2ebca9..000000000 --- a/docs/v1/Ontologies/models/GroupMemberConstraint.md +++ /dev/null @@ -1,12 +0,0 @@ -# GroupMemberConstraint - -The parameter value must be the user id of a member belonging to at least one of the groups defined by the constraint. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["groupMember"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/GtQuery.md b/docs/v1/Ontologies/models/GtQuery.md deleted file mode 100644 index 8c340cacc..000000000 --- a/docs/v1/Ontologies/models/GtQuery.md +++ /dev/null @@ -1,13 +0,0 @@ -# GtQuery - -Returns objects where the specified field is greater than a value. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**field** | FieldNameV1 | Yes | | -**value** | PropertyValue | Yes | | -**type** | Literal["gt"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/GteQuery.md b/docs/v1/Ontologies/models/GteQuery.md deleted file mode 100644 index 4eecf35b1..000000000 --- a/docs/v1/Ontologies/models/GteQuery.md +++ /dev/null @@ -1,13 +0,0 @@ -# GteQuery - -Returns objects where the specified field is greater than or equal to a value. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**field** | FieldNameV1 | Yes | | -**value** | PropertyValue | Yes | | -**type** | Literal["gte"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/InterfaceLinkTypeApiName.md b/docs/v1/Ontologies/models/InterfaceLinkTypeApiName.md deleted file mode 100644 index b3e0aa090..000000000 --- a/docs/v1/Ontologies/models/InterfaceLinkTypeApiName.md +++ /dev/null @@ -1,13 +0,0 @@ -# InterfaceLinkTypeApiName - -The name of the interface link type in the API. To find the API name for your Interface Link Type, check the -[Ontology Manager](https://palantir.com/docs/foundry/ontology-manager/overview/). - - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/InterfaceLinkTypeRid.md b/docs/v1/Ontologies/models/InterfaceLinkTypeRid.md deleted file mode 100644 index ca0e21207..000000000 --- a/docs/v1/Ontologies/models/InterfaceLinkTypeRid.md +++ /dev/null @@ -1,12 +0,0 @@ -# InterfaceLinkTypeRid - -The unique resource identifier of an interface link type, useful for interacting with other Foundry APIs. - - -## Type -```python -RID -``` - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/InterfacePropertyApiName.md b/docs/v1/Ontologies/models/InterfacePropertyApiName.md deleted file mode 100644 index 181956234..000000000 --- a/docs/v1/Ontologies/models/InterfacePropertyApiName.md +++ /dev/null @@ -1,14 +0,0 @@ -# InterfacePropertyApiName - -The name of the interface property type in the API in lowerCamelCase format. To find the API name for your -interface property type, use the `List interface types` endpoint and check the `allPropertiesV2` field or check -the **Ontology Manager**. - - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/InterfaceTypeApiName.md b/docs/v1/Ontologies/models/InterfaceTypeApiName.md deleted file mode 100644 index 38f96bb9c..000000000 --- a/docs/v1/Ontologies/models/InterfaceTypeApiName.md +++ /dev/null @@ -1,13 +0,0 @@ -# InterfaceTypeApiName - -The name of the interface type in the API in UpperCamelCase format. To find the API name for your interface -type, use the `List interface types` endpoint or check the **Ontology Manager**. - - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/InterfaceTypeRid.md b/docs/v1/Ontologies/models/InterfaceTypeRid.md deleted file mode 100644 index bdd9d3a97..000000000 --- a/docs/v1/Ontologies/models/InterfaceTypeRid.md +++ /dev/null @@ -1,11 +0,0 @@ -# InterfaceTypeRid - -The unique resource identifier of an interface, useful for interacting with other Foundry APIs. - -## Type -```python -RID -``` - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/IsNullQuery.md b/docs/v1/Ontologies/models/IsNullQuery.md deleted file mode 100644 index 896fdb93e..000000000 --- a/docs/v1/Ontologies/models/IsNullQuery.md +++ /dev/null @@ -1,13 +0,0 @@ -# IsNullQuery - -Returns objects based on the existence of the specified field. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**field** | FieldNameV1 | Yes | | -**value** | bool | Yes | | -**type** | Literal["isNull"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/LegacyObjectTypeId.md b/docs/v1/Ontologies/models/LegacyObjectTypeId.md deleted file mode 100644 index a085165b4..000000000 --- a/docs/v1/Ontologies/models/LegacyObjectTypeId.md +++ /dev/null @@ -1,13 +0,0 @@ -# LegacyObjectTypeId - -The unique ID of an object type. This is a legacy identifier and is not recommended for use in new applications. -To find the ID for your Object Type, check the **Ontology Manager**. - - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/LegacyPropertyId.md b/docs/v1/Ontologies/models/LegacyPropertyId.md deleted file mode 100644 index f1a95f585..000000000 --- a/docs/v1/Ontologies/models/LegacyPropertyId.md +++ /dev/null @@ -1,13 +0,0 @@ -# LegacyPropertyId - -The unique ID of a property. This is a legacy identifier and is not recommended for use in new applications. -To find the ID for your property, check the **Ontology Manager**. - - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/LinkTypeApiName.md b/docs/v1/Ontologies/models/LinkTypeApiName.md deleted file mode 100644 index f16e4a2c5..000000000 --- a/docs/v1/Ontologies/models/LinkTypeApiName.md +++ /dev/null @@ -1,13 +0,0 @@ -# LinkTypeApiName - -The name of the link type in the API. To find the API name for your Link Type, check the **Ontology Manager** -application. - - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/LinkTypeId.md b/docs/v1/Ontologies/models/LinkTypeId.md deleted file mode 100644 index 9144901c0..000000000 --- a/docs/v1/Ontologies/models/LinkTypeId.md +++ /dev/null @@ -1,12 +0,0 @@ -# LinkTypeId - -The unique ID of a link type. To find the ID for your link type, check the **Ontology Manager** application. - - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/LinkTypeSide.md b/docs/v1/Ontologies/models/LinkTypeSide.md deleted file mode 100644 index 20bc7d109..000000000 --- a/docs/v1/Ontologies/models/LinkTypeSide.md +++ /dev/null @@ -1,16 +0,0 @@ -# LinkTypeSide - -LinkTypeSide - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**api_name** | LinkTypeApiName | Yes | | -**display_name** | DisplayName | Yes | | -**status** | ReleaseStatus | Yes | | -**object_type_api_name** | ObjectTypeApiName | Yes | | -**cardinality** | LinkTypeSideCardinality | Yes | | -**foreign_key_property_api_name** | Optional[PropertyApiName] | No | | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/LinkTypeSideCardinality.md b/docs/v1/Ontologies/models/LinkTypeSideCardinality.md deleted file mode 100644 index 5287f18e9..000000000 --- a/docs/v1/Ontologies/models/LinkTypeSideCardinality.md +++ /dev/null @@ -1,11 +0,0 @@ -# LinkTypeSideCardinality - -LinkTypeSideCardinality - -| **Value** | -| --------- | -| `"ONE"` | -| `"MANY"` | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/ListActionTypesResponse.md b/docs/v1/Ontologies/models/ListActionTypesResponse.md deleted file mode 100644 index 902d173fa..000000000 --- a/docs/v1/Ontologies/models/ListActionTypesResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListActionTypesResponse - -ListActionTypesResponse - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**next_page_token** | Optional[PageToken] | No | | -**data** | List[ActionType] | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/ListLinkedObjectsResponse.md b/docs/v1/Ontologies/models/ListLinkedObjectsResponse.md deleted file mode 100644 index 873c95d9d..000000000 --- a/docs/v1/Ontologies/models/ListLinkedObjectsResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListLinkedObjectsResponse - -ListLinkedObjectsResponse - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**next_page_token** | Optional[PageToken] | No | | -**data** | List[OntologyObject] | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/ListObjectTypesResponse.md b/docs/v1/Ontologies/models/ListObjectTypesResponse.md deleted file mode 100644 index 013faf7c5..000000000 --- a/docs/v1/Ontologies/models/ListObjectTypesResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListObjectTypesResponse - -ListObjectTypesResponse - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**next_page_token** | Optional[PageToken] | No | | -**data** | List[ObjectType] | Yes | The list of object types in the current page. | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/ListObjectsResponse.md b/docs/v1/Ontologies/models/ListObjectsResponse.md deleted file mode 100644 index be2e92a00..000000000 --- a/docs/v1/Ontologies/models/ListObjectsResponse.md +++ /dev/null @@ -1,13 +0,0 @@ -# ListObjectsResponse - -ListObjectsResponse - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**next_page_token** | Optional[PageToken] | No | | -**data** | List[OntologyObject] | Yes | The list of objects in the current page. | -**total_count** | TotalCount | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/ListOntologiesResponse.md b/docs/v1/Ontologies/models/ListOntologiesResponse.md deleted file mode 100644 index 35cd401fc..000000000 --- a/docs/v1/Ontologies/models/ListOntologiesResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# ListOntologiesResponse - -ListOntologiesResponse - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**data** | List[Ontology] | Yes | The list of Ontologies the user has access to. | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/ListOutgoingLinkTypesResponse.md b/docs/v1/Ontologies/models/ListOutgoingLinkTypesResponse.md deleted file mode 100644 index 57ebcedc2..000000000 --- a/docs/v1/Ontologies/models/ListOutgoingLinkTypesResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListOutgoingLinkTypesResponse - -ListOutgoingLinkTypesResponse - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**next_page_token** | Optional[PageToken] | No | | -**data** | List[LinkTypeSide] | Yes | The list of link type sides in the current page. | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/ListQueryTypesResponse.md b/docs/v1/Ontologies/models/ListQueryTypesResponse.md deleted file mode 100644 index 550837346..000000000 --- a/docs/v1/Ontologies/models/ListQueryTypesResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListQueryTypesResponse - -ListQueryTypesResponse - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**next_page_token** | Optional[PageToken] | No | | -**data** | List[QueryType] | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/LogicRule.md b/docs/v1/Ontologies/models/LogicRule.md deleted file mode 100644 index 48d5f29a8..000000000 --- a/docs/v1/Ontologies/models/LogicRule.md +++ /dev/null @@ -1,22 +0,0 @@ -# LogicRule - -LogicRule - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -DeleteInterfaceObjectRule | deleteInterfaceObject -ModifyInterfaceObjectRule | modifyInterfaceObject -ModifyObjectRule | modifyObject -DeleteObjectRule | deleteObject -CreateInterfaceObjectRule | createInterfaceObject -DeleteLinkRule | deleteLink -CreateObjectRule | createObject -CreateLinkRule | createLink - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/LtQuery.md b/docs/v1/Ontologies/models/LtQuery.md deleted file mode 100644 index 4b77f733e..000000000 --- a/docs/v1/Ontologies/models/LtQuery.md +++ /dev/null @@ -1,13 +0,0 @@ -# LtQuery - -Returns objects where the specified field is less than a value. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**field** | FieldNameV1 | Yes | | -**value** | PropertyValue | Yes | | -**type** | Literal["lt"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/LteQuery.md b/docs/v1/Ontologies/models/LteQuery.md deleted file mode 100644 index a89a42b6a..000000000 --- a/docs/v1/Ontologies/models/LteQuery.md +++ /dev/null @@ -1,13 +0,0 @@ -# LteQuery - -Returns objects where the specified field is less than or equal to a value. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**field** | FieldNameV1 | Yes | | -**value** | PropertyValue | Yes | | -**type** | Literal["lte"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/MaxAggregation.md b/docs/v1/Ontologies/models/MaxAggregation.md deleted file mode 100644 index 9399189f8..000000000 --- a/docs/v1/Ontologies/models/MaxAggregation.md +++ /dev/null @@ -1,13 +0,0 @@ -# MaxAggregation - -Computes the maximum value for the provided field. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**field** | FieldNameV1 | Yes | | -**name** | Optional[AggregationMetricName] | No | | -**type** | Literal["max"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/MinAggregation.md b/docs/v1/Ontologies/models/MinAggregation.md deleted file mode 100644 index 327dbaed9..000000000 --- a/docs/v1/Ontologies/models/MinAggregation.md +++ /dev/null @@ -1,13 +0,0 @@ -# MinAggregation - -Computes the minimum value for the provided field. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**field** | FieldNameV1 | Yes | | -**name** | Optional[AggregationMetricName] | No | | -**type** | Literal["min"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/ModifyInterfaceObjectRule.md b/docs/v1/Ontologies/models/ModifyInterfaceObjectRule.md deleted file mode 100644 index 53e9ee847..000000000 --- a/docs/v1/Ontologies/models/ModifyInterfaceObjectRule.md +++ /dev/null @@ -1,12 +0,0 @@ -# ModifyInterfaceObjectRule - -ModifyInterfaceObjectRule - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**interface_type_api_name** | InterfaceTypeApiName | Yes | | -**type** | Literal["modifyInterfaceObject"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/ModifyObjectRule.md b/docs/v1/Ontologies/models/ModifyObjectRule.md deleted file mode 100644 index d6bd9d0c5..000000000 --- a/docs/v1/Ontologies/models/ModifyObjectRule.md +++ /dev/null @@ -1,12 +0,0 @@ -# ModifyObjectRule - -ModifyObjectRule - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**object_type_api_name** | ObjectTypeApiName | Yes | | -**type** | Literal["modifyObject"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/NotQuery.md b/docs/v1/Ontologies/models/NotQuery.md deleted file mode 100644 index e35f265fe..000000000 --- a/docs/v1/Ontologies/models/NotQuery.md +++ /dev/null @@ -1,12 +0,0 @@ -# NotQuery - -Returns objects where the query is not satisfied. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**value** | SearchJsonQuery | Yes | | -**type** | Literal["not"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/ObjectPropertyValueConstraint.md b/docs/v1/Ontologies/models/ObjectPropertyValueConstraint.md deleted file mode 100644 index 18624923d..000000000 --- a/docs/v1/Ontologies/models/ObjectPropertyValueConstraint.md +++ /dev/null @@ -1,12 +0,0 @@ -# ObjectPropertyValueConstraint - -The parameter value must be a property value of an object found within an object set. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["objectPropertyValue"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/ObjectQueryResultConstraint.md b/docs/v1/Ontologies/models/ObjectQueryResultConstraint.md deleted file mode 100644 index cea087ffe..000000000 --- a/docs/v1/Ontologies/models/ObjectQueryResultConstraint.md +++ /dev/null @@ -1,12 +0,0 @@ -# ObjectQueryResultConstraint - -The parameter value must be the primary key of an object found within an object set. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["objectQueryResult"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/ObjectRid.md b/docs/v1/Ontologies/models/ObjectRid.md deleted file mode 100644 index ab4049c8e..000000000 --- a/docs/v1/Ontologies/models/ObjectRid.md +++ /dev/null @@ -1,12 +0,0 @@ -# ObjectRid - -The unique resource identifier of an object, useful for interacting with other Foundry APIs. - - -## Type -```python -RID -``` - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/ObjectSetRid.md b/docs/v1/Ontologies/models/ObjectSetRid.md deleted file mode 100644 index 10eaa1bfc..000000000 --- a/docs/v1/Ontologies/models/ObjectSetRid.md +++ /dev/null @@ -1,11 +0,0 @@ -# ObjectSetRid - -ObjectSetRid - -## Type -```python -RID -``` - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/ObjectType.md b/docs/v1/Ontologies/models/ObjectType.md deleted file mode 100644 index 09d25e913..000000000 --- a/docs/v1/Ontologies/models/ObjectType.md +++ /dev/null @@ -1,19 +0,0 @@ -# ObjectType - -Represents an object type in the Ontology. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**api_name** | ObjectTypeApiName | Yes | | -**legacy_object_type_id** | Optional[LegacyObjectTypeId] | No | | -**display_name** | Optional[DisplayName] | No | | -**status** | ReleaseStatus | Yes | | -**description** | Optional[str] | No | The description of the object type. | -**visibility** | Optional[ObjectTypeVisibility] | No | | -**primary_key** | List[PropertyApiName] | Yes | The primary key of the object. This is a list of properties that can be used to uniquely identify the object. | -**properties** | Dict[PropertyApiName, Property] | Yes | A map of the properties of the object type. | -**rid** | ObjectTypeRid | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/ObjectTypeApiName.md b/docs/v1/Ontologies/models/ObjectTypeApiName.md deleted file mode 100644 index 6d540a792..000000000 --- a/docs/v1/Ontologies/models/ObjectTypeApiName.md +++ /dev/null @@ -1,13 +0,0 @@ -# ObjectTypeApiName - -The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the -`List object types` endpoint or check the **Ontology Manager**. - - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/ObjectTypeRid.md b/docs/v1/Ontologies/models/ObjectTypeRid.md deleted file mode 100644 index 856cc8039..000000000 --- a/docs/v1/Ontologies/models/ObjectTypeRid.md +++ /dev/null @@ -1,11 +0,0 @@ -# ObjectTypeRid - -The unique resource identifier of an object type, useful for interacting with other Foundry APIs. - -## Type -```python -RID -``` - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/ObjectTypeVisibility.md b/docs/v1/Ontologies/models/ObjectTypeVisibility.md deleted file mode 100644 index 3d6da6b18..000000000 --- a/docs/v1/Ontologies/models/ObjectTypeVisibility.md +++ /dev/null @@ -1,12 +0,0 @@ -# ObjectTypeVisibility - -The suggested visibility of the object type. - -| **Value** | -| --------- | -| `"NORMAL"` | -| `"PROMINENT"` | -| `"HIDDEN"` | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/OneOfConstraint.md b/docs/v1/Ontologies/models/OneOfConstraint.md deleted file mode 100644 index fd59530f9..000000000 --- a/docs/v1/Ontologies/models/OneOfConstraint.md +++ /dev/null @@ -1,14 +0,0 @@ -# OneOfConstraint - -The parameter has a manually predefined set of options. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**options** | List[ParameterOption] | Yes | | -**other_values_allowed** | bool | Yes | A flag denoting whether custom, user provided values will be considered valid. This is configured via the **Allowed "Other" value** toggle in the **Ontology Manager**. | -**type** | Literal["oneOf"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/Ontology.md b/docs/v1/Ontologies/models/Ontology.md deleted file mode 100644 index ce97e4c6b..000000000 --- a/docs/v1/Ontologies/models/Ontology.md +++ /dev/null @@ -1,14 +0,0 @@ -# Ontology - -Metadata about an Ontology. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**api_name** | OntologyApiName | Yes | | -**display_name** | DisplayName | Yes | | -**description** | str | Yes | | -**rid** | OntologyRid | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/OntologyApiName.md b/docs/v1/Ontologies/models/OntologyApiName.md deleted file mode 100644 index e65cb1244..000000000 --- a/docs/v1/Ontologies/models/OntologyApiName.md +++ /dev/null @@ -1,11 +0,0 @@ -# OntologyApiName - -OntologyApiName - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/OntologyArrayType.md b/docs/v1/Ontologies/models/OntologyArrayType.md deleted file mode 100644 index fc8597890..000000000 --- a/docs/v1/Ontologies/models/OntologyArrayType.md +++ /dev/null @@ -1,12 +0,0 @@ -# OntologyArrayType - -OntologyArrayType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**item_type** | OntologyDataType | Yes | | -**type** | Literal["array"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/OntologyDataType.md b/docs/v1/Ontologies/models/OntologyDataType.md deleted file mode 100644 index edb96521f..000000000 --- a/docs/v1/Ontologies/models/OntologyDataType.md +++ /dev/null @@ -1,37 +0,0 @@ -# OntologyDataType - -A union of all the primitive types used by Palantir's Ontology-based products. - - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -DateType | date -OntologyStructType | struct -OntologySetType | set -StringType | string -ByteType | byte -DoubleType | double -IntegerType | integer -FloatType | float -AnyType | any -LongType | long -BooleanType | boolean -CipherTextType | cipherText -MarkingType | marking -UnsupportedType | unsupported -OntologyArrayType | array -OntologyObjectSetType | objectSet -BinaryType | binary -ShortType | short -DecimalType | decimal -OntologyMapType | map -TimestampType | timestamp -OntologyObjectType | object - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/OntologyInterfaceObjectSetType.md b/docs/v1/Ontologies/models/OntologyInterfaceObjectSetType.md deleted file mode 100644 index dab0b7c78..000000000 --- a/docs/v1/Ontologies/models/OntologyInterfaceObjectSetType.md +++ /dev/null @@ -1,12 +0,0 @@ -# OntologyInterfaceObjectSetType - -OntologyInterfaceObjectSetType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**interface_type_api_name** | InterfaceTypeApiName | Yes | | -**type** | Literal["interfaceObjectSet"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/OntologyInterfaceObjectType.md b/docs/v1/Ontologies/models/OntologyInterfaceObjectType.md deleted file mode 100644 index ebfac3ec0..000000000 --- a/docs/v1/Ontologies/models/OntologyInterfaceObjectType.md +++ /dev/null @@ -1,12 +0,0 @@ -# OntologyInterfaceObjectType - -OntologyInterfaceObjectType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**interface_type_api_name** | Optional[InterfaceTypeApiName] | No | | -**type** | Literal["interfaceObject"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/OntologyMapType.md b/docs/v1/Ontologies/models/OntologyMapType.md deleted file mode 100644 index e407de463..000000000 --- a/docs/v1/Ontologies/models/OntologyMapType.md +++ /dev/null @@ -1,13 +0,0 @@ -# OntologyMapType - -OntologyMapType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**key_type** | OntologyDataType | Yes | | -**value_type** | OntologyDataType | Yes | | -**type** | Literal["map"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/OntologyObject.md b/docs/v1/Ontologies/models/OntologyObject.md deleted file mode 100644 index 441362cfb..000000000 --- a/docs/v1/Ontologies/models/OntologyObject.md +++ /dev/null @@ -1,12 +0,0 @@ -# OntologyObject - -Represents an object in the Ontology. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**properties** | Dict[PropertyApiName, Optional[PropertyValue]] | Yes | A map of the property values of the object. | -**rid** | ObjectRid | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/OntologyObjectSetType.md b/docs/v1/Ontologies/models/OntologyObjectSetType.md deleted file mode 100644 index df56f6e64..000000000 --- a/docs/v1/Ontologies/models/OntologyObjectSetType.md +++ /dev/null @@ -1,13 +0,0 @@ -# OntologyObjectSetType - -OntologyObjectSetType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**object_api_name** | Optional[ObjectTypeApiName] | No | | -**object_type_api_name** | Optional[ObjectTypeApiName] | No | | -**type** | Literal["objectSet"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/OntologyObjectType.md b/docs/v1/Ontologies/models/OntologyObjectType.md deleted file mode 100644 index c2c89353c..000000000 --- a/docs/v1/Ontologies/models/OntologyObjectType.md +++ /dev/null @@ -1,13 +0,0 @@ -# OntologyObjectType - -OntologyObjectType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**object_api_name** | ObjectTypeApiName | Yes | | -**object_type_api_name** | ObjectTypeApiName | Yes | | -**type** | Literal["object"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/OntologyRid.md b/docs/v1/Ontologies/models/OntologyRid.md deleted file mode 100644 index d8e557dfa..000000000 --- a/docs/v1/Ontologies/models/OntologyRid.md +++ /dev/null @@ -1,13 +0,0 @@ -# OntologyRid - -The unique Resource Identifier (RID) of the Ontology. To look up your Ontology RID, please use the -`List ontologies` endpoint or check the **Ontology Manager**. - - -## Type -```python -RID -``` - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/OntologySetType.md b/docs/v1/Ontologies/models/OntologySetType.md deleted file mode 100644 index f5f9a7015..000000000 --- a/docs/v1/Ontologies/models/OntologySetType.md +++ /dev/null @@ -1,12 +0,0 @@ -# OntologySetType - -OntologySetType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**item_type** | OntologyDataType | Yes | | -**type** | Literal["set"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/OntologyStructField.md b/docs/v1/Ontologies/models/OntologyStructField.md deleted file mode 100644 index 5abdb4d94..000000000 --- a/docs/v1/Ontologies/models/OntologyStructField.md +++ /dev/null @@ -1,13 +0,0 @@ -# OntologyStructField - -OntologyStructField - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**name** | StructFieldName | Yes | | -**field_type** | OntologyDataType | Yes | | -**required** | bool | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/OntologyStructType.md b/docs/v1/Ontologies/models/OntologyStructType.md deleted file mode 100644 index 7e9675ddb..000000000 --- a/docs/v1/Ontologies/models/OntologyStructType.md +++ /dev/null @@ -1,12 +0,0 @@ -# OntologyStructType - -OntologyStructType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**fields** | List[OntologyStructField] | Yes | | -**type** | Literal["struct"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/OrQuery.md b/docs/v1/Ontologies/models/OrQuery.md deleted file mode 100644 index 596566b59..000000000 --- a/docs/v1/Ontologies/models/OrQuery.md +++ /dev/null @@ -1,12 +0,0 @@ -# OrQuery - -Returns objects where at least 1 query is satisfied. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**value** | List[SearchJsonQuery] | Yes | | -**type** | Literal["or"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/OrderBy.md b/docs/v1/Ontologies/models/OrderBy.md deleted file mode 100644 index 6be4a4a55..000000000 --- a/docs/v1/Ontologies/models/OrderBy.md +++ /dev/null @@ -1,21 +0,0 @@ -# OrderBy - -A command representing the list of properties to order by. Properties should be delimited by commas and -prefixed by `p` or `properties`. The format expected format is -`orderBy=properties.{property}:{sortDirection},properties.{property}:{sortDirection}...` - -By default, the ordering for a property is ascending, and this can be explicitly specified by appending -`:asc` (for ascending) or `:desc` (for descending). - -Example: use `orderBy=properties.lastName:asc` to order by a single property, -`orderBy=properties.lastName,properties.firstName,properties.age:desc` to order by multiple properties. -You may also use the shorthand `p` instead of `properties` such as `orderBy=p.lastName:asc`. - - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/Parameter.md b/docs/v1/Ontologies/models/Parameter.md deleted file mode 100644 index e973d0131..000000000 --- a/docs/v1/Ontologies/models/Parameter.md +++ /dev/null @@ -1,14 +0,0 @@ -# Parameter - -Details about a parameter of an action or query. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**description** | Optional[str] | No | | -**base_type** | ValueType | Yes | | -**data_type** | Optional[OntologyDataType] | No | | -**required** | bool | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/ParameterEvaluatedConstraint.md b/docs/v1/Ontologies/models/ParameterEvaluatedConstraint.md deleted file mode 100644 index 62ee8e963..000000000 --- a/docs/v1/Ontologies/models/ParameterEvaluatedConstraint.md +++ /dev/null @@ -1,42 +0,0 @@ -# ParameterEvaluatedConstraint - -A constraint that an action parameter value must satisfy in order to be considered valid. -Constraints can be configured on action parameters in the **Ontology Manager**. -Applicable constraints are determined dynamically based on parameter inputs. -Parameter values are evaluated against the final set of constraints. - -The type of the constraint. -| Type | Description | -|-----------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| `arraySize` | The parameter expects an array of values and the size of the array must fall within the defined range. | -| `groupMember` | The parameter value must be the user id of a member belonging to at least one of the groups defined by the constraint. | -| `objectPropertyValue` | The parameter value must be a property value of an object found within an object set. | -| `objectQueryResult` | The parameter value must be the primary key of an object found within an object set. | -| `oneOf` | The parameter has a manually predefined set of options. | -| `range` | The parameter value must be within the defined range. | -| `stringLength` | The parameter value must have a length within the defined range. | -| `stringRegexMatch` | The parameter value must match a predefined regular expression. | -| `unevaluable` | The parameter cannot be evaluated because it depends on another parameter or object set that can't be evaluated. This can happen when a parameter's allowed values are defined by another parameter that is missing or invalid. | - - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -StructEvaluatedConstraint | struct -OneOfConstraint | oneOf -ArrayEvaluatedConstraint | array -GroupMemberConstraint | groupMember -ObjectPropertyValueConstraint | objectPropertyValue -RangeConstraint | range -ArraySizeConstraint | arraySize -ObjectQueryResultConstraint | objectQueryResult -StringLengthConstraint | stringLength -StringRegexMatchConstraint | stringRegexMatch -UnevaluableConstraint | unevaluable - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/ParameterEvaluationResult.md b/docs/v1/Ontologies/models/ParameterEvaluationResult.md deleted file mode 100644 index 2dc2f3579..000000000 --- a/docs/v1/Ontologies/models/ParameterEvaluationResult.md +++ /dev/null @@ -1,13 +0,0 @@ -# ParameterEvaluationResult - -Represents the validity of a parameter against the configured constraints. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**result** | ValidationResult | Yes | | -**evaluated_constraints** | List[ParameterEvaluatedConstraint] | Yes | | -**required** | bool | Yes | Represents whether the parameter is a required input to the action. | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/ParameterId.md b/docs/v1/Ontologies/models/ParameterId.md deleted file mode 100644 index cb0f483b6..000000000 --- a/docs/v1/Ontologies/models/ParameterId.md +++ /dev/null @@ -1,13 +0,0 @@ -# ParameterId - -The unique identifier of the parameter. Parameters are used as inputs when an action or query is applied. -Parameters can be viewed and managed in the **Ontology Manager**. - - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/ParameterOption.md b/docs/v1/Ontologies/models/ParameterOption.md deleted file mode 100644 index f7abdd481..000000000 --- a/docs/v1/Ontologies/models/ParameterOption.md +++ /dev/null @@ -1,13 +0,0 @@ -# ParameterOption - -A possible value for the parameter. This is defined in the **Ontology Manager** by Actions admins. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**display_name** | Optional[DisplayName] | No | | -**value** | Optional[Any] | No | An allowed configured value for a parameter within an action. | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/PhraseQuery.md b/docs/v1/Ontologies/models/PhraseQuery.md deleted file mode 100644 index 5bf4e66ee..000000000 --- a/docs/v1/Ontologies/models/PhraseQuery.md +++ /dev/null @@ -1,13 +0,0 @@ -# PhraseQuery - -Returns objects where the specified field contains the provided value as a substring. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**field** | FieldNameV1 | Yes | | -**value** | str | Yes | | -**type** | Literal["phrase"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/PrefixQuery.md b/docs/v1/Ontologies/models/PrefixQuery.md deleted file mode 100644 index 0d01c4ef1..000000000 --- a/docs/v1/Ontologies/models/PrefixQuery.md +++ /dev/null @@ -1,13 +0,0 @@ -# PrefixQuery - -Returns objects where the specified field starts with the provided value. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**field** | FieldNameV1 | Yes | | -**value** | str | Yes | | -**type** | Literal["prefix"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/PrimaryKeyValue.md b/docs/v1/Ontologies/models/PrimaryKeyValue.md deleted file mode 100644 index f3d549034..000000000 --- a/docs/v1/Ontologies/models/PrimaryKeyValue.md +++ /dev/null @@ -1,11 +0,0 @@ -# PrimaryKeyValue - -Represents the primary key value that is used as a unique identifier for an object. - -## Type -```python -Any -``` - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/Property.md b/docs/v1/Ontologies/models/Property.md deleted file mode 100644 index 9f878754c..000000000 --- a/docs/v1/Ontologies/models/Property.md +++ /dev/null @@ -1,14 +0,0 @@ -# Property - -Details about some property of an object. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**description** | Optional[str] | No | | -**display_name** | Optional[DisplayName] | No | | -**base_type** | ValueType | Yes | | -**legacy_property_id** | Optional[LegacyPropertyId] | No | | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/PropertyApiName.md b/docs/v1/Ontologies/models/PropertyApiName.md deleted file mode 100644 index 2558e8a7a..000000000 --- a/docs/v1/Ontologies/models/PropertyApiName.md +++ /dev/null @@ -1,13 +0,0 @@ -# PropertyApiName - -The name of the property in the API. To find the API name for your property, use the `Get object type` -endpoint or check the **Ontology Manager**. - - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/PropertyFilter.md b/docs/v1/Ontologies/models/PropertyFilter.md deleted file mode 100644 index 45b0f0482..000000000 --- a/docs/v1/Ontologies/models/PropertyFilter.md +++ /dev/null @@ -1,36 +0,0 @@ -# PropertyFilter - -Represents a filter used on properties. - -Endpoints that accept this supports optional parameters that have the form: -`properties.{propertyApiName}.{propertyFilter}={propertyValueEscapedString}` to filter the returned objects. -For instance, you may use `properties.firstName.eq=John` to find objects that contain a property called -"firstName" that has the exact value of "John". - -The following are a list of supported property filters: - -- `properties.{propertyApiName}.contains` - supported on arrays and can be used to filter array properties - that have at least one of the provided values. If multiple query parameters are provided, then objects - that have any of the given values for the specified property will be matched. -- `properties.{propertyApiName}.eq` - used to filter objects that have the exact value for the provided - property. If multiple query parameters are provided, then objects that have any of the given values - will be matched. For instance, if the user provides a request by doing - `?properties.firstName.eq=John&properties.firstName.eq=Anna`, then objects that have a firstName property - of either John or Anna will be matched. This filter is supported on all property types except Arrays. -- `properties.{propertyApiName}.neq` - used to filter objects that do not have the provided property values. - Similar to the `eq` filter, if multiple values are provided, then objects that have any of the given values - will be excluded from the result. -- `properties.{propertyApiName}.lt`, `properties.{propertyApiName}.lte`, `properties.{propertyApiName}.gt` - `properties.{propertyApiName}.gte` - represent less than, less than or equal to, greater than, and greater - than or equal to respectively. These are supported on date, timestamp, byte, integer, long, double, decimal. -- `properties.{propertyApiName}.isNull` - used to filter objects where the provided property is (or is not) null. - This filter is supported on all property types. - - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/PropertyId.md b/docs/v1/Ontologies/models/PropertyId.md deleted file mode 100644 index 582509617..000000000 --- a/docs/v1/Ontologies/models/PropertyId.md +++ /dev/null @@ -1,13 +0,0 @@ -# PropertyId - -The immutable ID of a property. Property IDs are only used to identify properties in the **Ontology Manager** -application and assign them API names. In every other case, API names should be used instead of property IDs. - - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/PropertyTypeRid.md b/docs/v1/Ontologies/models/PropertyTypeRid.md deleted file mode 100644 index 423380f08..000000000 --- a/docs/v1/Ontologies/models/PropertyTypeRid.md +++ /dev/null @@ -1,11 +0,0 @@ -# PropertyTypeRid - -PropertyTypeRid - -## Type -```python -RID -``` - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/PropertyValue.md b/docs/v1/Ontologies/models/PropertyValue.md deleted file mode 100644 index d33e68550..000000000 --- a/docs/v1/Ontologies/models/PropertyValue.md +++ /dev/null @@ -1,37 +0,0 @@ -# PropertyValue - -Represents the value of a property in the following format. - -| Type | JSON encoding | Example | -|---------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------|----------------------------------------------------------------------------------------------------| -| Array | array | `["alpha", "bravo", "charlie"]` | -| [Attachment](https://palantir.com/docs/foundry/api/v2/ontologies-v2-resources/attachment-properties/attachment-property-basics/) | JSON encoded `AttachmentProperty` object | `{"rid":"ri.blobster.main.attachment.2f944bae-5851-4204-8615-920c969a9f2e"}` | -| Boolean | boolean | `true` | -| Byte | number | `31` | -| CipherText | string | `"CIPHER::ri.bellaso.main.cipher-channel.e414ab9e-b606-499a-a0e1-844fa296ba7e::unzjs3VifsTxuIpf1fH1CJ7OaPBr2bzMMdozPaZJtCii8vVG60yXIEmzoOJaEl9mfFFe::CIPHER"` | -| Date | ISO 8601 extended local date string | `"2021-05-01"` | -| Decimal | string | `"2.718281828"` | -| Double | number | `3.14159265` | -| Float | number | `3.14159265` | -| GeoPoint | geojson | `{"type":"Point","coordinates":[102.0,0.5]}` | -| GeoShape | geojson | `{"type":"LineString","coordinates":[[102.0,0.0],[103.0,1.0],[104.0,0.0],[105.0,1.0]]}` | -| Integer | number | `238940` | -| Long | string | `"58319870951433"` | -| [MediaReference](https://palantir.com/docs/foundry/api/v2/ontologies-v2-resources/media-reference-properties/media-reference-property-basics/)| JSON encoded `MediaReference` object | `{"mimeType":"application/pdf","reference":{"type":"mediaSetViewItem","mediaSetViewItem":{"mediaSetRid":"ri.mio.main.media-set.4153d42f-ca4b-4e42-8ca5-8e6aa7edb642","mediaSetViewRid":"ri.mio.main.view.82a798ad-d637-4595-acc6-987bcf16629b","mediaItemRid":"ri.mio.main.media-item.001ec98b-1620-4814-9e17-8e9c4e536225"}}}` | -| Short | number | `8739` | -| String | string | `"Call me Ishmael"` | -| Struct | JSON object of struct field API name -> value | {"firstName": "Alex", "lastName": "Karp"} | -| Timestamp | ISO 8601 extended offset date-time string in UTC zone | `"2021-01-04T05:00:00Z"` | -| [Timeseries](https://palantir.com/docs/foundry/api/v2/ontologies-v2-resources/time-series-properties/time-series-property-basics/) | JSON encoded `TimeseriesProperty` object or seriesId string | `{"seriesId": "wellPressureSeriesId", "syncRid": ri.time-series-catalog.main.sync.04f5ac1f-91bf-44f9-a51f-4f34e06e42df"}` or `{"templateRid": "ri.codex-emu.main.template.367cac64-e53b-4653-b111-f61856a63df9", "templateVersion": "0.0.0"}` or `"wellPressureSeriesId"`| | -| Vector | array | `[0.1, 0.3, 0.02, 0.05 , 0.8, 0.4]` | - -Note that for backwards compatibility, the Boolean, Byte, Double, Float, Integer, and Short types can also be encoded as JSON strings. - - -## Type -```python -Any -``` - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/PropertyValueEscapedString.md b/docs/v1/Ontologies/models/PropertyValueEscapedString.md deleted file mode 100644 index ce51cd89a..000000000 --- a/docs/v1/Ontologies/models/PropertyValueEscapedString.md +++ /dev/null @@ -1,11 +0,0 @@ -# PropertyValueEscapedString - -Represents the value of a property in string format. This is used in URL parameters. - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/QueryAggregationKeyType.md b/docs/v1/Ontologies/models/QueryAggregationKeyType.md deleted file mode 100644 index d2d0b1649..000000000 --- a/docs/v1/Ontologies/models/QueryAggregationKeyType.md +++ /dev/null @@ -1,22 +0,0 @@ -# QueryAggregationKeyType - -A union of all the types supported by query aggregation keys. - - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -DateType | date -BooleanType | boolean -StringType | string -DoubleType | double -QueryAggregationRangeType | range -IntegerType | integer -TimestampType | timestamp - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/QueryAggregationRangeSubType.md b/docs/v1/Ontologies/models/QueryAggregationRangeSubType.md deleted file mode 100644 index 11aac0482..000000000 --- a/docs/v1/Ontologies/models/QueryAggregationRangeSubType.md +++ /dev/null @@ -1,19 +0,0 @@ -# QueryAggregationRangeSubType - -A union of all the types supported by query aggregation ranges. - - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -DateType | date -DoubleType | double -IntegerType | integer -TimestampType | timestamp - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/QueryAggregationRangeType.md b/docs/v1/Ontologies/models/QueryAggregationRangeType.md deleted file mode 100644 index 0fc4058bb..000000000 --- a/docs/v1/Ontologies/models/QueryAggregationRangeType.md +++ /dev/null @@ -1,12 +0,0 @@ -# QueryAggregationRangeType - -QueryAggregationRangeType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**sub_type** | QueryAggregationRangeSubType | Yes | | -**type** | Literal["range"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/QueryAggregationValueType.md b/docs/v1/Ontologies/models/QueryAggregationValueType.md deleted file mode 100644 index b98c83a60..000000000 --- a/docs/v1/Ontologies/models/QueryAggregationValueType.md +++ /dev/null @@ -1,18 +0,0 @@ -# QueryAggregationValueType - -A union of all the types supported by query aggregation keys. - - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -DateType | date -DoubleType | double -TimestampType | timestamp - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/QueryApiName.md b/docs/v1/Ontologies/models/QueryApiName.md deleted file mode 100644 index c6578ab7c..000000000 --- a/docs/v1/Ontologies/models/QueryApiName.md +++ /dev/null @@ -1,12 +0,0 @@ -# QueryApiName - -The name of the Query in the API. - - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/QueryArrayType.md b/docs/v1/Ontologies/models/QueryArrayType.md deleted file mode 100644 index 7c018e8a0..000000000 --- a/docs/v1/Ontologies/models/QueryArrayType.md +++ /dev/null @@ -1,12 +0,0 @@ -# QueryArrayType - -QueryArrayType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**sub_type** | QueryDataType | Yes | | -**type** | Literal["array"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/QueryDataType.md b/docs/v1/Ontologies/models/QueryDataType.md deleted file mode 100644 index ad1712bba..000000000 --- a/docs/v1/Ontologies/models/QueryDataType.md +++ /dev/null @@ -1,37 +0,0 @@ -# QueryDataType - -A union of all the types supported by Ontology Query parameters or outputs. - - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -DateType | date -OntologyInterfaceObjectType | interfaceObject -QueryStructType | struct -QuerySetType | set -StringType | string -EntrySetType | entrySet -DoubleType | double -IntegerType | integer -ThreeDimensionalAggregation | threeDimensionalAggregation -QueryUnionType | union -FloatType | float -LongType | long -BooleanType | boolean -UnsupportedType | unsupported -AttachmentType | attachment -NullType | null -QueryArrayType | array -OntologyObjectSetType | objectSet -TwoDimensionalAggregation | twoDimensionalAggregation -OntologyInterfaceObjectSetType | interfaceObjectSet -OntologyObjectType | object -TimestampType | timestamp - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/QueryRuntimeErrorParameter.md b/docs/v1/Ontologies/models/QueryRuntimeErrorParameter.md deleted file mode 100644 index 0cb6c16ce..000000000 --- a/docs/v1/Ontologies/models/QueryRuntimeErrorParameter.md +++ /dev/null @@ -1,11 +0,0 @@ -# QueryRuntimeErrorParameter - -QueryRuntimeErrorParameter - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/QuerySetType.md b/docs/v1/Ontologies/models/QuerySetType.md deleted file mode 100644 index 378700e5c..000000000 --- a/docs/v1/Ontologies/models/QuerySetType.md +++ /dev/null @@ -1,12 +0,0 @@ -# QuerySetType - -QuerySetType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**sub_type** | QueryDataType | Yes | | -**type** | Literal["set"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/QueryStructField.md b/docs/v1/Ontologies/models/QueryStructField.md deleted file mode 100644 index 765701f28..000000000 --- a/docs/v1/Ontologies/models/QueryStructField.md +++ /dev/null @@ -1,12 +0,0 @@ -# QueryStructField - -QueryStructField - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**name** | StructFieldName | Yes | | -**field_type** | QueryDataType | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/QueryStructType.md b/docs/v1/Ontologies/models/QueryStructType.md deleted file mode 100644 index aea2be272..000000000 --- a/docs/v1/Ontologies/models/QueryStructType.md +++ /dev/null @@ -1,12 +0,0 @@ -# QueryStructType - -QueryStructType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**fields** | List[QueryStructField] | Yes | | -**type** | Literal["struct"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/QueryType.md b/docs/v1/Ontologies/models/QueryType.md deleted file mode 100644 index ffd09a146..000000000 --- a/docs/v1/Ontologies/models/QueryType.md +++ /dev/null @@ -1,17 +0,0 @@ -# QueryType - -Represents a query type in the Ontology. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**api_name** | QueryApiName | Yes | | -**description** | Optional[str] | No | | -**display_name** | Optional[DisplayName] | No | | -**parameters** | Dict[ParameterId, Parameter] | Yes | | -**output** | Optional[OntologyDataType] | No | | -**rid** | FunctionRid | Yes | | -**version** | FunctionVersion | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/QueryUnionType.md b/docs/v1/Ontologies/models/QueryUnionType.md deleted file mode 100644 index d0dc84a41..000000000 --- a/docs/v1/Ontologies/models/QueryUnionType.md +++ /dev/null @@ -1,12 +0,0 @@ -# QueryUnionType - -QueryUnionType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**union_types** | List[QueryDataType] | Yes | | -**type** | Literal["union"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/RangeConstraint.md b/docs/v1/Ontologies/models/RangeConstraint.md deleted file mode 100644 index 650260175..000000000 --- a/docs/v1/Ontologies/models/RangeConstraint.md +++ /dev/null @@ -1,16 +0,0 @@ -# RangeConstraint - -The parameter value must be within the defined range. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**lt** | Optional[Any] | No | Less than | -**lte** | Optional[Any] | No | Less than or equal | -**gt** | Optional[Any] | No | Greater than | -**gte** | Optional[Any] | No | Greater than or equal | -**type** | Literal["range"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/ReturnEditsMode.md b/docs/v1/Ontologies/models/ReturnEditsMode.md deleted file mode 100644 index 800a01212..000000000 --- a/docs/v1/Ontologies/models/ReturnEditsMode.md +++ /dev/null @@ -1,12 +0,0 @@ -# ReturnEditsMode - -ReturnEditsMode - -| **Value** | -| --------- | -| `"ALL"` | -| `"ALL_V2_WITH_DELETIONS"` | -| `"NONE"` | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/SdkPackageName.md b/docs/v1/Ontologies/models/SdkPackageName.md deleted file mode 100644 index 8d32c603f..000000000 --- a/docs/v1/Ontologies/models/SdkPackageName.md +++ /dev/null @@ -1,11 +0,0 @@ -# SdkPackageName - -SdkPackageName - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/SdkPackageRid.md b/docs/v1/Ontologies/models/SdkPackageRid.md deleted file mode 100644 index 6f3a795df..000000000 --- a/docs/v1/Ontologies/models/SdkPackageRid.md +++ /dev/null @@ -1,11 +0,0 @@ -# SdkPackageRid - -SdkPackageRid - -## Type -```python -RID -``` - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/SdkVersion.md b/docs/v1/Ontologies/models/SdkVersion.md deleted file mode 100644 index c3025f864..000000000 --- a/docs/v1/Ontologies/models/SdkVersion.md +++ /dev/null @@ -1,11 +0,0 @@ -# SdkVersion - -SdkVersion - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/SearchJsonQuery.md b/docs/v1/Ontologies/models/SearchJsonQuery.md deleted file mode 100644 index b7cf7d4ba..000000000 --- a/docs/v1/Ontologies/models/SearchJsonQuery.md +++ /dev/null @@ -1,28 +0,0 @@ -# SearchJsonQuery - -SearchJsonQuery - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -OrQuery | or -PrefixQuery | prefix -LtQuery | lt -AllTermsQuery | allTerms -EqualsQuery | eq -GtQuery | gt -ContainsQuery | contains -NotQuery | not -PhraseQuery | phrase -AndQuery | and -IsNullQuery | isNull -GteQuery | gte -AnyTermQuery | anyTerm -LteQuery | lte - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/SearchObjectsRequest.md b/docs/v1/Ontologies/models/SearchObjectsRequest.md deleted file mode 100644 index 6361fa0e0..000000000 --- a/docs/v1/Ontologies/models/SearchObjectsRequest.md +++ /dev/null @@ -1,15 +0,0 @@ -# SearchObjectsRequest - -SearchObjectsRequest - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**query** | SearchJsonQuery | Yes | | -**order_by** | Optional[SearchOrderBy] | No | | -**page_size** | Optional[PageSize] | No | | -**page_token** | Optional[PageToken] | No | | -**fields** | List[PropertyApiName] | Yes | The API names of the object type properties to include in the response. | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/SearchObjectsResponse.md b/docs/v1/Ontologies/models/SearchObjectsResponse.md deleted file mode 100644 index 58c2996ef..000000000 --- a/docs/v1/Ontologies/models/SearchObjectsResponse.md +++ /dev/null @@ -1,13 +0,0 @@ -# SearchObjectsResponse - -SearchObjectsResponse - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**data** | List[OntologyObject] | Yes | | -**next_page_token** | Optional[PageToken] | No | | -**total_count** | TotalCount | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/SearchOrderBy.md b/docs/v1/Ontologies/models/SearchOrderBy.md deleted file mode 100644 index ea5f58c79..000000000 --- a/docs/v1/Ontologies/models/SearchOrderBy.md +++ /dev/null @@ -1,11 +0,0 @@ -# SearchOrderBy - -Specifies the ordering of search results by a field and an ordering direction. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**fields** | List[SearchOrdering] | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/SearchOrderByType.md b/docs/v1/Ontologies/models/SearchOrderByType.md deleted file mode 100644 index 1facca804..000000000 --- a/docs/v1/Ontologies/models/SearchOrderByType.md +++ /dev/null @@ -1,11 +0,0 @@ -# SearchOrderByType - -SearchOrderByType - -| **Value** | -| --------- | -| `"fields"` | -| `"relevance"` | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/SearchOrdering.md b/docs/v1/Ontologies/models/SearchOrdering.md deleted file mode 100644 index ceb99e9e7..000000000 --- a/docs/v1/Ontologies/models/SearchOrdering.md +++ /dev/null @@ -1,12 +0,0 @@ -# SearchOrdering - -SearchOrdering - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**field** | FieldNameV1 | Yes | | -**direction** | Optional[str] | No | Specifies the ordering direction (can be either `asc` or `desc`) | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/SelectedPropertyApiName.md b/docs/v1/Ontologies/models/SelectedPropertyApiName.md deleted file mode 100644 index a26d54593..000000000 --- a/docs/v1/Ontologies/models/SelectedPropertyApiName.md +++ /dev/null @@ -1,30 +0,0 @@ -# SelectedPropertyApiName - -By default, whenever an object is requested, all of its properties are returned, except for properties of the -following types: -- Vector - -The response can be filtered to only include certain properties using the `properties` query parameter. Note -that ontology object set endpoints refer to this parameter as `select`. - -Properties to include can be specified in one of two ways. - -- A comma delimited list as the value for the `properties` query parameter - `properties={property1ApiName},{property2ApiName}` -- Multiple `properties` query parameters. - `properties={property1ApiName}&properties={property2ApiName}` - -The primary key of the object will always be returned even if it wasn't specified in the `properties` values. - -Unknown properties specified in the `properties` list will result in a `PropertiesNotFound` error. - -To find the API name for your property, use the `Get object type` endpoint or check the **Ontology Manager**. - - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/SharedPropertyTypeApiName.md b/docs/v1/Ontologies/models/SharedPropertyTypeApiName.md deleted file mode 100644 index b783312c3..000000000 --- a/docs/v1/Ontologies/models/SharedPropertyTypeApiName.md +++ /dev/null @@ -1,13 +0,0 @@ -# SharedPropertyTypeApiName - -The name of the shared property type in the API in lowerCamelCase format. To find the API name for your -shared property type, use the `List shared property types` endpoint or check the **Ontology Manager**. - - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/SharedPropertyTypeRid.md b/docs/v1/Ontologies/models/SharedPropertyTypeRid.md deleted file mode 100644 index 317ec6af6..000000000 --- a/docs/v1/Ontologies/models/SharedPropertyTypeRid.md +++ /dev/null @@ -1,12 +0,0 @@ -# SharedPropertyTypeRid - -The unique resource identifier of an shared property type, useful for interacting with other Foundry APIs. - - -## Type -```python -RID -``` - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/StringLengthConstraint.md b/docs/v1/Ontologies/models/StringLengthConstraint.md deleted file mode 100644 index 89081a91d..000000000 --- a/docs/v1/Ontologies/models/StringLengthConstraint.md +++ /dev/null @@ -1,17 +0,0 @@ -# StringLengthConstraint - -The parameter value must have a length within the defined range. -*This range is always inclusive.* - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**lt** | Optional[Any] | No | Less than | -**lte** | Optional[Any] | No | Less than or equal | -**gt** | Optional[Any] | No | Greater than | -**gte** | Optional[Any] | No | Greater than or equal | -**type** | Literal["stringLength"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/StringRegexMatchConstraint.md b/docs/v1/Ontologies/models/StringRegexMatchConstraint.md deleted file mode 100644 index ca80aaa31..000000000 --- a/docs/v1/Ontologies/models/StringRegexMatchConstraint.md +++ /dev/null @@ -1,14 +0,0 @@ -# StringRegexMatchConstraint - -The parameter value must match a predefined regular expression. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**regex** | str | Yes | The regular expression configured in the **Ontology Manager**. | -**configured_failure_message** | Optional[str] | No | The message indicating that the regular expression was not matched. This is configured per parameter in the **Ontology Manager**. | -**type** | Literal["stringRegexMatch"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/StructEvaluatedConstraint.md b/docs/v1/Ontologies/models/StructEvaluatedConstraint.md deleted file mode 100644 index 6976840e9..000000000 --- a/docs/v1/Ontologies/models/StructEvaluatedConstraint.md +++ /dev/null @@ -1,12 +0,0 @@ -# StructEvaluatedConstraint - -Represents the validity of a singleton struct parameter. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**struct_fields** | Dict[StructParameterFieldApiName, StructFieldEvaluationResult] | Yes | | -**type** | Literal["struct"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/StructFieldEvaluatedConstraint.md b/docs/v1/Ontologies/models/StructFieldEvaluatedConstraint.md deleted file mode 100644 index e27d1c509..000000000 --- a/docs/v1/Ontologies/models/StructFieldEvaluatedConstraint.md +++ /dev/null @@ -1,32 +0,0 @@ -# StructFieldEvaluatedConstraint - -A constraint that an action struct parameter field value must satisfy in order to be considered valid. -Constraints can be configured on fields of struct parameters in the **Ontology Manager**. -Applicable constraints are determined dynamically based on parameter inputs. -Parameter values are evaluated against the final set of constraints. - -The type of the constraint. -| Type | Description | -|-----------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| `oneOf` | The struct parameter field has a manually predefined set of options. | -| `range` | The struct parameter field value must be within the defined range. | -| `stringLength` | The struct parameter field value must have a length within the defined range. | -| `stringRegexMatch` | The struct parameter field value must match a predefined regular expression. | -| `objectQueryResult` | The struct parameter field value must be the primary key of an object found within an object set. | - - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -OneOfConstraint | oneOf -RangeConstraint | range -ObjectQueryResultConstraint | objectQueryResult -StringLengthConstraint | stringLength -StringRegexMatchConstraint | stringRegexMatch - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/StructFieldEvaluationResult.md b/docs/v1/Ontologies/models/StructFieldEvaluationResult.md deleted file mode 100644 index a07ccc14e..000000000 --- a/docs/v1/Ontologies/models/StructFieldEvaluationResult.md +++ /dev/null @@ -1,13 +0,0 @@ -# StructFieldEvaluationResult - -Represents the validity of a struct parameter's fields against the configured constraints. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**result** | ValidationResult | Yes | | -**evaluated_constraints** | List[StructFieldEvaluatedConstraint] | Yes | | -**required** | bool | Yes | Represents whether the parameter is a required input to the action. | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/StructParameterFieldApiName.md b/docs/v1/Ontologies/models/StructParameterFieldApiName.md deleted file mode 100644 index 06c232d1c..000000000 --- a/docs/v1/Ontologies/models/StructParameterFieldApiName.md +++ /dev/null @@ -1,12 +0,0 @@ -# StructParameterFieldApiName - -The unique identifier of the struct parameter field. - - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/SubmissionCriteriaEvaluation.md b/docs/v1/Ontologies/models/SubmissionCriteriaEvaluation.md deleted file mode 100644 index b3b47b61f..000000000 --- a/docs/v1/Ontologies/models/SubmissionCriteriaEvaluation.md +++ /dev/null @@ -1,15 +0,0 @@ -# SubmissionCriteriaEvaluation - -Contains the status of the **submission criteria**. -**Submission criteria** are the prerequisites that need to be satisfied before an Action can be applied. -These are configured in the **Ontology Manager**. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**configured_failure_message** | Optional[str] | No | The message indicating one of the **submission criteria** was not satisfied. This is configured per **submission criteria** in the **Ontology Manager**. | -**result** | ValidationResult | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/SumAggregation.md b/docs/v1/Ontologies/models/SumAggregation.md deleted file mode 100644 index 39b9466a5..000000000 --- a/docs/v1/Ontologies/models/SumAggregation.md +++ /dev/null @@ -1,13 +0,0 @@ -# SumAggregation - -Computes the sum of values for the provided field. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**field** | FieldNameV1 | Yes | | -**name** | Optional[AggregationMetricName] | No | | -**type** | Literal["sum"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/ThreeDimensionalAggregation.md b/docs/v1/Ontologies/models/ThreeDimensionalAggregation.md deleted file mode 100644 index e82f23994..000000000 --- a/docs/v1/Ontologies/models/ThreeDimensionalAggregation.md +++ /dev/null @@ -1,13 +0,0 @@ -# ThreeDimensionalAggregation - -ThreeDimensionalAggregation - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**key_type** | QueryAggregationKeyType | Yes | | -**value_type** | TwoDimensionalAggregation | Yes | | -**type** | Literal["threeDimensionalAggregation"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/TwoDimensionalAggregation.md b/docs/v1/Ontologies/models/TwoDimensionalAggregation.md deleted file mode 100644 index f5cb32b2e..000000000 --- a/docs/v1/Ontologies/models/TwoDimensionalAggregation.md +++ /dev/null @@ -1,13 +0,0 @@ -# TwoDimensionalAggregation - -TwoDimensionalAggregation - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**key_type** | QueryAggregationKeyType | Yes | | -**value_type** | QueryAggregationValueType | Yes | | -**type** | Literal["twoDimensionalAggregation"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/UnevaluableConstraint.md b/docs/v1/Ontologies/models/UnevaluableConstraint.md deleted file mode 100644 index d155f31fa..000000000 --- a/docs/v1/Ontologies/models/UnevaluableConstraint.md +++ /dev/null @@ -1,13 +0,0 @@ -# UnevaluableConstraint - -The parameter cannot be evaluated because it depends on another parameter or object set that can't be evaluated. -This can happen when a parameter's allowed values are defined by another parameter that is missing or invalid. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["unevaluable"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/UniqueIdentifierLinkId.md b/docs/v1/Ontologies/models/UniqueIdentifierLinkId.md deleted file mode 100644 index 37788e43d..000000000 --- a/docs/v1/Ontologies/models/UniqueIdentifierLinkId.md +++ /dev/null @@ -1,12 +0,0 @@ -# UniqueIdentifierLinkId - -A reference to a UniqueIdentifierArgument linkId defined for this action type. - - -## Type -```python -UUID -``` - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/ValidateActionRequest.md b/docs/v1/Ontologies/models/ValidateActionRequest.md deleted file mode 100644 index f568a5e0b..000000000 --- a/docs/v1/Ontologies/models/ValidateActionRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# ValidateActionRequest - -ValidateActionRequest - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**parameters** | Dict[ParameterId, Optional[DataValue]] | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/ValidateActionResponse.md b/docs/v1/Ontologies/models/ValidateActionResponse.md deleted file mode 100644 index fbb0e9111..000000000 --- a/docs/v1/Ontologies/models/ValidateActionResponse.md +++ /dev/null @@ -1,13 +0,0 @@ -# ValidateActionResponse - -ValidateActionResponse - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**result** | ValidationResult | Yes | | -**submission_criteria** | List[SubmissionCriteriaEvaluation] | Yes | | -**parameters** | Dict[ParameterId, ParameterEvaluationResult] | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/ValidationResult.md b/docs/v1/Ontologies/models/ValidationResult.md deleted file mode 100644 index bf5f86d0d..000000000 --- a/docs/v1/Ontologies/models/ValidationResult.md +++ /dev/null @@ -1,12 +0,0 @@ -# ValidationResult - -Represents the state of a validation. - - -| **Value** | -| --------- | -| `"VALID"` | -| `"INVALID"` | - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/ValueType.md b/docs/v1/Ontologies/models/ValueType.md deleted file mode 100644 index 76a754593..000000000 --- a/docs/v1/Ontologies/models/ValueType.md +++ /dev/null @@ -1,34 +0,0 @@ -# ValueType - -A string indicating the type of each data value. Note that these types can be nested, for example an array of -structs. - -| Type | JSON value | -|---------------------|-------------------------------------------------------------------------------------------------------------------| -| Array | `Array`, where `T` is the type of the array elements, e.g. `Array`. | -| Attachment | `Attachment` | -| Boolean | `Boolean` | -| Byte | `Byte` | -| CipherText | `CipherText` | -| Date | `LocalDate` | -| Decimal | `Decimal` | -| Double | `Double` | -| Float | `Float` | -| Integer | `Integer` | -| Long | `Long` | -| Marking | `Marking` | -| OntologyObject | `OntologyObject` where `T` is the API name of the referenced object type. | -| Short | `Short` | -| String | `String` | -| Struct | `Struct` where `T` contains field name and type pairs, e.g. `Struct<{ firstName: String, lastName: string }>` | -| Timeseries | `TimeSeries` where `T` is either `String` for an enum series or `Double` for a numeric series. | -| Timestamp | `Timestamp` | - - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/ValueTypeApiName.md b/docs/v1/Ontologies/models/ValueTypeApiName.md deleted file mode 100644 index 12121f2b9..000000000 --- a/docs/v1/Ontologies/models/ValueTypeApiName.md +++ /dev/null @@ -1,11 +0,0 @@ -# ValueTypeApiName - -The name of the value type in the API in camelCase format. - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/ValueTypeRid.md b/docs/v1/Ontologies/models/ValueTypeRid.md deleted file mode 100644 index 56461f4a4..000000000 --- a/docs/v1/Ontologies/models/ValueTypeRid.md +++ /dev/null @@ -1,11 +0,0 @@ -# ValueTypeRid - -ValueTypeRid - -## Type -```python -RID -``` - - -[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/AuthenticationProvider.md b/docs/v2/Admin/AuthenticationProvider.md deleted file mode 100644 index 0abd28c8e..000000000 --- a/docs/v2/Admin/AuthenticationProvider.md +++ /dev/null @@ -1,278 +0,0 @@ -# AuthenticationProvider - -Method | HTTP request | Release Stage | -------------- | ------------- | ----- | -[**get**](#get) | **GET** /v2/admin/enrollments/{enrollmentRid}/authenticationProviders/{authenticationProviderRid} | Public Beta | -[**list**](#list) | **GET** /v2/admin/enrollments/{enrollmentRid}/authenticationProviders | Public Beta | -[**preregister_group**](#preregister_group) | **POST** /v2/admin/enrollments/{enrollmentRid}/authenticationProviders/{authenticationProviderRid}/preregisterGroup | Public Beta | -[**preregister_user**](#preregister_user) | **POST** /v2/admin/enrollments/{enrollmentRid}/authenticationProviders/{authenticationProviderRid}/preregisterUser | Public Beta | - -# **get** -Get the AuthenticationProvider with the specified rid. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**enrollment_rid** | EnrollmentRid | | | -**authentication_provider_rid** | AuthenticationProviderRid | | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**AuthenticationProvider** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# EnrollmentRid -enrollment_rid = None -# AuthenticationProviderRid -authentication_provider_rid = "ri.control-panel.main.saml.3faf689c-eaa1-4137-851f-81d58afe4c86" -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.admin.Enrollment.AuthenticationProvider.get( - enrollment_rid, authentication_provider_rid, preview=preview - ) - print("The get response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling AuthenticationProvider.get: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | AuthenticationProvider | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **list** -Lists all AuthenticationProviders. - - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**enrollment_rid** | EnrollmentRid | | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**ListAuthenticationProvidersResponse** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# EnrollmentRid -enrollment_rid = None -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.admin.Enrollment.AuthenticationProvider.list( - enrollment_rid, preview=preview - ) - print("The list response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling AuthenticationProvider.list: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | ListAuthenticationProvidersResponse | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **preregister_group** -Register a Group with a given name before any users with this group log in through this Authentication Provider. -Preregistered groups can be used anywhere other groups are used in the platform. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**enrollment_rid** | EnrollmentRid | | | -**authentication_provider_rid** | AuthenticationProviderRid | | | -**name** | GroupName | | | -**organizations** | List[OrganizationRid] | The RIDs of the Organizations that can view this group. | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**PrincipalId** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# EnrollmentRid -enrollment_rid = None -# AuthenticationProviderRid -authentication_provider_rid = "ri.control-panel.main.saml.3faf689c-eaa1-4137-851f-81d58afe4c86" -# GroupName -name = "Data Source Admins" -# List[OrganizationRid] | The RIDs of the Organizations that can view this group. -organizations = ["ri.multipass..organization.c30ee6ad-b5e4-4afe-a74f-fe4a289f2faa"] -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.admin.Enrollment.AuthenticationProvider.preregister_group( - enrollment_rid, - authentication_provider_rid, - name=name, - organizations=organizations, - preview=preview, - ) - print("The preregister_group response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling AuthenticationProvider.preregister_group: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | PrincipalId | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **preregister_user** -Register a User with a given username before they log in to the platform for the first time through this -Authentication Provider. Preregistered users can be assigned to groups and roles prior to first login. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**enrollment_rid** | EnrollmentRid | | | -**authentication_provider_rid** | AuthenticationProviderRid | | | -**organization** | OrganizationRid | The RID of the user's primary Organization. This may be changed when the user logs in for the first time depending on any configured Organization assignment rules. | | -**username** | UserUsername | The new user's username. This must match one of the provider's supported username patterns. | | -**attributes** | Optional[Dict[AttributeName, AttributeValues]] | | [optional] | -**email** | Optional[str] | | [optional] | -**family_name** | Optional[str] | | [optional] | -**given_name** | Optional[str] | | [optional] | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**PrincipalId** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# EnrollmentRid -enrollment_rid = None -# AuthenticationProviderRid -authentication_provider_rid = "ri.control-panel.main.saml.3faf689c-eaa1-4137-851f-81d58afe4c86" -# OrganizationRid | The RID of the user's primary Organization. This may be changed when the user logs in for the first time depending on any configured Organization assignment rules. -organization = "ri.multipass..organization.c30ee6ad-b5e4-4afe-a74f-fe4a289f2faa" -# UserUsername | The new user's username. This must match one of the provider's supported username patterns. -username = "jsmith" -# Optional[Dict[AttributeName, AttributeValues]] -attributes = { - "multipass:givenName": ["John"], - "multipass:familyName": ["Smith"], - "multipass:email:primary": ["jsmith@example.com"], - "multipass:realm": ["eab0a251-ca1a-4a84-a482-200edfb8026f"], - "multipass:organization-rid": [ - "ri.multipass..organization.c30ee6ad-b5e4-4afe-a74f-fe4a289f2faa" - ], - "department": ["Finance"], - "jobTitle": ["Accountant"], -} -# Optional[str] -email = "jsmith@example.com" -# Optional[str] -family_name = "Smith" -# Optional[str] -given_name = "John" -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.admin.Enrollment.AuthenticationProvider.preregister_user( - enrollment_rid, - authentication_provider_rid, - organization=organization, - username=username, - attributes=attributes, - email=email, - family_name=family_name, - given_name=given_name, - preview=preview, - ) - print("The preregister_user response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling AuthenticationProvider.preregister_user: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | PrincipalId | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - diff --git a/docs/v2/Admin/Enrollment.md b/docs/v2/Admin/Enrollment.md deleted file mode 100644 index 729dc0743..000000000 --- a/docs/v2/Admin/Enrollment.md +++ /dev/null @@ -1,105 +0,0 @@ -# Enrollment - -Method | HTTP request | Release Stage | -------------- | ------------- | ----- | -[**get**](#get) | **GET** /v2/admin/enrollments/{enrollmentRid} | Private Beta | -[**get_current**](#get_current) | **GET** /v2/admin/enrollments/getCurrent | Private Beta | - -# **get** -Get the Enrollment with the specified rid. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**enrollment_rid** | EnrollmentRid | | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**Enrollment** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# EnrollmentRid -enrollment_rid = None -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.admin.Enrollment.get(enrollment_rid, preview=preview) - print("The get response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Enrollment.get: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | Enrollment | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **get_current** -Returns the Enrollment associated with the current User's primary organization. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**Enrollment** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.admin.Enrollment.get_current(preview=preview) - print("The get_current response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Enrollment.get_current: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | Enrollment | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - diff --git a/docs/v2/Admin/EnrollmentRoleAssignment.md b/docs/v2/Admin/EnrollmentRoleAssignment.md deleted file mode 100644 index 47b979289..000000000 --- a/docs/v2/Admin/EnrollmentRoleAssignment.md +++ /dev/null @@ -1,183 +0,0 @@ -# EnrollmentRoleAssignment - -Method | HTTP request | Release Stage | -------------- | ------------- | ----- | -[**add**](#add) | **POST** /v2/admin/enrollments/{enrollmentRid}/roleAssignments/add | Private Beta | -[**list**](#list) | **GET** /v2/admin/enrollments/{enrollmentRid}/roleAssignments | Private Beta | -[**remove**](#remove) | **POST** /v2/admin/enrollments/{enrollmentRid}/roleAssignments/remove | Private Beta | - -# **add** -Assign roles to principals for the given Enrollment. At most 100 role assignments can be added in a single request. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**enrollment_rid** | EnrollmentRid | | | -**role_assignments** | List[RoleAssignmentUpdate] | | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**None** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# EnrollmentRid -enrollment_rid = None -# List[RoleAssignmentUpdate] -role_assignments = [ - { - "roleId": "8bf49052-dc37-4528-8bf0-b551cfb71268", - "principalId": "f05f8da4-b84c-4fca-9c77-8af0b13d11de", - } -] -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.admin.Enrollment.EnrollmentRoleAssignment.add( - enrollment_rid, role_assignments=role_assignments, preview=preview - ) - print("The add response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling EnrollmentRoleAssignment.add: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**204** | None | | None | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **list** -List all principals who are assigned a role for the given Enrollment. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**enrollment_rid** | EnrollmentRid | | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**ListEnrollmentRoleAssignmentsResponse** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# EnrollmentRid -enrollment_rid = None -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.admin.Enrollment.EnrollmentRoleAssignment.list( - enrollment_rid, preview=preview - ) - print("The list response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling EnrollmentRoleAssignment.list: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | ListEnrollmentRoleAssignmentsResponse | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **remove** -Remove roles from principals for the given Enrollment. At most 100 role assignments can be removed in a single request. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**enrollment_rid** | EnrollmentRid | | | -**role_assignments** | List[RoleAssignmentUpdate] | | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**None** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# EnrollmentRid -enrollment_rid = None -# List[RoleAssignmentUpdate] -role_assignments = [ - { - "roleId": "8bf49052-dc37-4528-8bf0-b551cfb71268", - "principalId": "f05f8da4-b84c-4fca-9c77-8af0b13d11de", - } -] -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.admin.Enrollment.EnrollmentRoleAssignment.remove( - enrollment_rid, role_assignments=role_assignments, preview=preview - ) - print("The remove response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling EnrollmentRoleAssignment.remove: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**204** | None | | None | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - diff --git a/docs/v2/Admin/Group.md b/docs/v2/Admin/Group.md deleted file mode 100644 index a20feba39..000000000 --- a/docs/v2/Admin/Group.md +++ /dev/null @@ -1,329 +0,0 @@ -# Group - -Method | HTTP request | Release Stage | -------------- | ------------- | ----- | -[**create**](#create) | **POST** /v2/admin/groups | Stable | -[**delete**](#delete) | **DELETE** /v2/admin/groups/{groupId} | Stable | -[**get**](#get) | **GET** /v2/admin/groups/{groupId} | Stable | -[**get_batch**](#get_batch) | **POST** /v2/admin/groups/getBatch | Stable | -[**list**](#list) | **GET** /v2/admin/groups | Stable | -[**search**](#search) | **POST** /v2/admin/groups/search | Stable | - -# **create** -Creates a new Group. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**attributes** | Dict[AttributeName, AttributeValues] | A map of the Group's attributes. Attributes prefixed with "multipass:" are reserved for internal use by Foundry and are subject to change. | | -**name** | GroupName | The name of the Group. | | -**organizations** | List[OrganizationRid] | The RIDs of the Organizations whose members can see this group. At least one Organization RID must be listed. | | -**description** | Optional[str] | A description of the Group. | [optional] | - -### Return type -**Group** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# Dict[AttributeName, AttributeValues] | A map of the Group's attributes. Attributes prefixed with "multipass:" are reserved for internal use by Foundry and are subject to change. -attributes = { - "multipass:givenName": ["John"], - "multipass:familyName": ["Smith"], - "multipass:email:primary": ["jsmith@example.com"], - "multipass:realm": ["eab0a251-ca1a-4a84-a482-200edfb8026f"], - "multipass:organization-rid": [ - "ri.multipass..organization.c30ee6ad-b5e4-4afe-a74f-fe4a289f2faa" - ], - "department": ["Finance"], - "jobTitle": ["Accountant"], -} -# GroupName | The name of the Group. -name = "Data Source Admins" -# List[OrganizationRid] | The RIDs of the Organizations whose members can see this group. At least one Organization RID must be listed. -organizations = ["ri.multipass..organization.c30ee6ad-b5e4-4afe-a74f-fe4a289f2faa"] -# Optional[str] | A description of the Group. -description = "Create and modify data sources in the platform" - - -try: - api_response = client.admin.Group.create( - attributes=attributes, name=name, organizations=organizations, description=description - ) - print("The create response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Group.create: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | Group | The created Group | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **delete** -Delete the Group with the specified id. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**group_id** | GroupId | | | - -### Return type -**None** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# GroupId -group_id = None - - -try: - api_response = client.admin.Group.delete(group_id) - print("The delete response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Group.delete: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**204** | None | | None | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **get** -Get the Group with the specified id. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**group_id** | GroupId | | | - -### Return type -**Group** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# GroupId -group_id = None - - -try: - api_response = client.admin.Group.get(group_id) - print("The get response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Group.get: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | Group | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **get_batch** -Execute multiple get requests on Group. - -The maximum batch size for this endpoint is 500. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**body** | List[GetGroupsBatchRequestElement] | Body of the request | | - -### Return type -**GetGroupsBatchResponse** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# List[GetGroupsBatchRequestElement] | Body of the request -body = [{"groupId": "0d1fe74e-2b70-4a93-9b1a-80070637788b"}] - - -try: - api_response = client.admin.Group.get_batch(body) - print("The get_batch response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Group.get_batch: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | GetGroupsBatchResponse | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **list** -Lists all Groups. - -This is a paged endpoint. Each page may be smaller or larger than the requested page size. However, it is guaranteed that if there are more results available, the `nextPageToken` field will be populated. To get the next page, make the same request again, but set the value of the `pageToken` query parameter to be value of the `nextPageToken` value of the previous response. If there is no `nextPageToken` field in the response, you are on the last page. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**page_size** | Optional[PageSize] | The page size to use for the endpoint. | [optional] | -**page_token** | Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. | [optional] | - -### Return type -**ListGroupsResponse** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# Optional[PageSize] | The page size to use for the endpoint. -page_size = None -# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. -page_token = None - - -try: - for group in client.admin.Group.list(page_size=page_size, page_token=page_token): - pprint(group) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Group.list: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | ListGroupsResponse | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **search** -Perform a case-insensitive prefix search for groups based on group name. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**where** | GroupSearchFilter | | | -**page_size** | Optional[PageSize] | | [optional] | -**page_token** | Optional[PageToken] | | [optional] | - -### Return type -**SearchGroupsResponse** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# GroupSearchFilter -where = {"type": "queryString", "value": "jsmith"} -# Optional[PageSize] -page_size = 100 -# Optional[PageToken] -page_token = "v1.QnVpbGQgdGhlIEZ1dHVyZTogaHR0cHM6Ly93d3cucGFsYW50aXIuY29tL2NhcmVlcnMvP2xldmVyLXNvdXJjZSU1YiU1ZD1BUElEb2NzI29wZW4tcG9zaXRpb25z" - - -try: - api_response = client.admin.Group.search( - where=where, page_size=page_size, page_token=page_token - ) - print("The search response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Group.search: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | SearchGroupsResponse | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - diff --git a/docs/v2/Admin/GroupMember.md b/docs/v2/Admin/GroupMember.md deleted file mode 100644 index 37e9566f7..000000000 --- a/docs/v2/Admin/GroupMember.md +++ /dev/null @@ -1,177 +0,0 @@ -# GroupMember - -Method | HTTP request | Release Stage | -------------- | ------------- | ----- | -[**add**](#add) | **POST** /v2/admin/groups/{groupId}/groupMembers/add | Stable | -[**list**](#list) | **GET** /v2/admin/groups/{groupId}/groupMembers | Stable | -[**remove**](#remove) | **POST** /v2/admin/groups/{groupId}/groupMembers/remove | Stable | - -# **add** - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**group_id** | GroupId | | | -**principal_ids** | List[PrincipalId] | | | -**expiration** | Optional[GroupMembershipExpiration] | | [optional] | - -### Return type -**None** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# GroupId -group_id = None -# List[PrincipalId] -principal_ids = ["f05f8da4-b84c-4fca-9c77-8af0b13d11de"] -# Optional[GroupMembershipExpiration] -expiration = "2026-01-31T00:00:00.000Z" - - -try: - api_response = client.admin.Group.GroupMember.add( - group_id, principal_ids=principal_ids, expiration=expiration - ) - print("The add response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling GroupMember.add: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**204** | None | | None | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **list** -Lists all members (which can be a User or a Group) of a given Group. - -This is a paged endpoint. Each page may be smaller or larger than the requested page size. However, -it is guaranteed that if there are more results available, the `nextPageToken` field will be populated. -To get the next page, make the same request again, but set the value of the `pageToken` query parameter -to be value of the `nextPageToken` value of the previous response. If there is no `nextPageToken` field -in the response, you are on the last page. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**group_id** | GroupId | | | -**page_size** | Optional[PageSize] | The page size to use for the endpoint. | [optional] | -**page_token** | Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. | [optional] | -**transitive** | Optional[bool] | When true, includes the transitive members of groups contained within this group. For example, say the Group has member Group A, and Group A has member User B. If `transitive=false` only Group A will be returned, but if `transitive=true` then Group A and User B will be returned. This will recursively resolve Groups through all layers of nesting. Defaults to false. | [optional] | - -### Return type -**ListGroupMembersResponse** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# GroupId -group_id = None -# Optional[PageSize] | The page size to use for the endpoint. -page_size = None -# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. -page_token = None -# Optional[bool] | When true, includes the transitive members of groups contained within this group. For example, say the Group has member Group A, and Group A has member User B. If `transitive=false` only Group A will be returned, but if `transitive=true` then Group A and User B will be returned. This will recursively resolve Groups through all layers of nesting. Defaults to false. -transitive = None - - -try: - for group_member in client.admin.Group.GroupMember.list( - group_id, page_size=page_size, page_token=page_token, transitive=transitive - ): - pprint(group_member) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling GroupMember.list: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | ListGroupMembersResponse | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **remove** - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**group_id** | GroupId | | | -**principal_ids** | List[PrincipalId] | | | - -### Return type -**None** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# GroupId -group_id = None -# List[PrincipalId] -principal_ids = ["f05f8da4-b84c-4fca-9c77-8af0b13d11de"] - - -try: - api_response = client.admin.Group.GroupMember.remove(group_id, principal_ids=principal_ids) - print("The remove response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling GroupMember.remove: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**204** | None | | None | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - diff --git a/docs/v2/Admin/GroupMembership.md b/docs/v2/Admin/GroupMembership.md deleted file mode 100644 index 46d477806..000000000 --- a/docs/v2/Admin/GroupMembership.md +++ /dev/null @@ -1,70 +0,0 @@ -# GroupMembership - -Method | HTTP request | Release Stage | -------------- | ------------- | ----- | -[**list**](#list) | **GET** /v2/admin/users/{userId}/groupMemberships | Stable | - -# **list** -Lists all Groups a given User is a member of. - -This is a paged endpoint. Each page may be smaller or larger than the requested page size. However, -it is guaranteed that if there are more results available, the `nextPageToken` field will be populated. -To get the next page, make the same request again, but set the value of the `pageToken` query parameter -to be value of the `nextPageToken` value of the previous response. If there is no `nextPageToken` field -in the response, you are on the last page. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**user_id** | UserId | | | -**page_size** | Optional[PageSize] | The page size to use for the endpoint. | [optional] | -**page_token** | Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. | [optional] | -**transitive** | Optional[bool] | When true, includes the transitive memberships of the Groups the User is a member of. For example, say the User is a member of Group A, and Group A is a member of Group B. If `transitive=false` only Group A will be returned, but if `transitive=true` then Groups A and B will be returned. This will recursively resolve Groups through all layers of nesting. Defaults to false. | [optional] | - -### Return type -**ListGroupMembershipsResponse** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# UserId -user_id = None -# Optional[PageSize] | The page size to use for the endpoint. -page_size = None -# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. -page_token = None -# Optional[bool] | When true, includes the transitive memberships of the Groups the User is a member of. For example, say the User is a member of Group A, and Group A is a member of Group B. If `transitive=false` only Group A will be returned, but if `transitive=true` then Groups A and B will be returned. This will recursively resolve Groups through all layers of nesting. Defaults to false. -transitive = None - - -try: - for group_membership in client.admin.User.GroupMembership.list( - user_id, page_size=page_size, page_token=page_token, transitive=transitive - ): - pprint(group_membership) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling GroupMembership.list: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | ListGroupMembershipsResponse | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - diff --git a/docs/v2/Admin/GroupMembershipExpirationPolicy.md b/docs/v2/Admin/GroupMembershipExpirationPolicy.md deleted file mode 100644 index af151a256..000000000 --- a/docs/v2/Admin/GroupMembershipExpirationPolicy.md +++ /dev/null @@ -1,115 +0,0 @@ -# GroupMembershipExpirationPolicy - -Method | HTTP request | Release Stage | -------------- | ------------- | ----- | -[**get**](#get) | **GET** /v2/admin/groups/{groupId}/membershipExpirationPolicy | Public Beta | -[**replace**](#replace) | **PUT** /v2/admin/groups/{groupId}/membershipExpirationPolicy | Public Beta | - -# **get** -Get the GroupMembershipExpirationPolicy. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**group_id** | GroupId | | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**GroupMembershipExpirationPolicy** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# GroupId -group_id = None -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.admin.Group.MembershipExpirationPolicy.get(group_id, preview=preview) - print("The get response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling MembershipExpirationPolicy.get: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | GroupMembershipExpirationPolicy | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **replace** -Replace the GroupMembershipExpirationPolicy. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**group_id** | GroupId | | | -**maximum_duration** | Optional[DurationSeconds] | Members in this group must be added with expirations that are less than this duration in seconds into the future from the time they are added. | [optional] | -**maximum_value** | Optional[GroupMembershipExpiration] | Members in this group must be added with expiration times that occur before this value. | [optional] | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**GroupMembershipExpirationPolicy** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# GroupId -group_id = None -# Optional[DurationSeconds] | Members in this group must be added with expirations that are less than this duration in seconds into the future from the time they are added. -maximum_duration = 30 -# Optional[GroupMembershipExpiration] | Members in this group must be added with expiration times that occur before this value. -maximum_value = "2026-01-31T00:00:00.000Z" -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.admin.Group.MembershipExpirationPolicy.replace( - group_id, maximum_duration=maximum_duration, maximum_value=maximum_value, preview=preview - ) - print("The replace response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling MembershipExpirationPolicy.replace: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | GroupMembershipExpirationPolicy | The replaced GroupMembershipExpirationPolicy | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - diff --git a/docs/v2/Admin/GroupProviderInfo.md b/docs/v2/Admin/GroupProviderInfo.md deleted file mode 100644 index bce925d09..000000000 --- a/docs/v2/Admin/GroupProviderInfo.md +++ /dev/null @@ -1,112 +0,0 @@ -# GroupProviderInfo - -Method | HTTP request | Release Stage | -------------- | ------------- | ----- | -[**get**](#get) | **GET** /v2/admin/groups/{groupId}/providerInfo | Public Beta | -[**replace**](#replace) | **PUT** /v2/admin/groups/{groupId}/providerInfo | Public Beta | - -# **get** -Get the GroupProviderInfo. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**group_id** | GroupId | | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**GroupProviderInfo** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# GroupId -group_id = None -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.admin.Group.ProviderInfo.get(group_id, preview=preview) - print("The get response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling ProviderInfo.get: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | GroupProviderInfo | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **replace** -Replace the GroupProviderInfo. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**group_id** | GroupId | | | -**provider_id** | ProviderId | The ID of the Group in the external authentication provider. This value is determined by the authentication provider. At most one Group can have a given provider ID in a given Realm. | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**GroupProviderInfo** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# GroupId -group_id = None -# ProviderId | The ID of the Group in the external authentication provider. This value is determined by the authentication provider. At most one Group can have a given provider ID in a given Realm. -provider_id = "2838c8f3-d76a-4e99-acf1-1dee537e4c48" -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.admin.Group.ProviderInfo.replace( - group_id, provider_id=provider_id, preview=preview - ) - print("The replace response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling ProviderInfo.replace: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | GroupProviderInfo | The replaced GroupProviderInfo | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - diff --git a/docs/v2/Admin/Host.md b/docs/v2/Admin/Host.md deleted file mode 100644 index 051da92c4..000000000 --- a/docs/v2/Admin/Host.md +++ /dev/null @@ -1,65 +0,0 @@ -# Host - -Method | HTTP request | Release Stage | -------------- | ------------- | ----- | -[**list**](#list) | **GET** /v2/admin/enrollments/{enrollmentRid}/hosts | Private Beta | - -# **list** -Lists all Hosts. - -This is a paged endpoint. Each page may be smaller or larger than the requested page size. However, it is guaranteed that if there are more results available, the `nextPageToken` field will be populated. To get the next page, make the same request again, but set the value of the `pageToken` query parameter to be value of the `nextPageToken` value of the previous response. If there is no `nextPageToken` field in the response, you are on the last page. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**enrollment_rid** | EnrollmentRid | | | -**page_size** | Optional[PageSize] | The page size to use for the endpoint. | [optional] | -**page_token** | Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. | [optional] | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**ListHostsResponse** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# EnrollmentRid -enrollment_rid = None -# Optional[PageSize] | The page size to use for the endpoint. -page_size = None -# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. -page_token = None -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - for host in client.admin.Enrollment.Host.list( - enrollment_rid, page_size=page_size, page_token=page_token, preview=preview - ): - pprint(host) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Host.list: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | ListHostsResponse | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - diff --git a/docs/v2/Admin/Marking.md b/docs/v2/Admin/Marking.md deleted file mode 100644 index f9d0fd30d..000000000 --- a/docs/v2/Admin/Marking.md +++ /dev/null @@ -1,295 +0,0 @@ -# Marking - -Method | HTTP request | Release Stage | -------------- | ------------- | ----- | -[**create**](#create) | **POST** /v2/admin/markings | Public Beta | -[**get**](#get) | **GET** /v2/admin/markings/{markingId} | Public Beta | -[**get_batch**](#get_batch) | **POST** /v2/admin/markings/getBatch | Public Beta | -[**list**](#list) | **GET** /v2/admin/markings | Public Beta | -[**replace**](#replace) | **PUT** /v2/admin/markings/{markingId} | Public Beta | - -# **create** -Creates a new Marking. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**category_id** | MarkingCategoryId | | | -**initial_members** | List[PrincipalId] | Users and Groups that will be able to view resources protected by this Marking. This can be changed later through the MarkingMember operations. | | -**initial_role_assignments** | List[MarkingRoleUpdate] | The initial roles that will be assigned when the Marking is created. At least one ADMIN role must be provided. This can be changed later through the MarkingRoleAssignment operations. WARNING: If you do not include your own principal ID or the ID of a Group that you are a member of, you will create a Marking that you cannot administer. | | -**name** | MarkingName | | | -**description** | Optional[str] | | [optional] | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**Marking** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# MarkingCategoryId -category_id = "0950264e-01c8-4e83-81a9-1a6b7f77621a" -# List[PrincipalId] | Users and Groups that will be able to view resources protected by this Marking. This can be changed later through the MarkingMember operations. -initial_members = ["f05f8da4-b84c-4fca-9c77-8af0b13d11de"] -# List[MarkingRoleUpdate] | The initial roles that will be assigned when the Marking is created. At least one ADMIN role must be provided. This can be changed later through the MarkingRoleAssignment operations. WARNING: If you do not include your own principal ID or the ID of a Group that you are a member of, you will create a Marking that you cannot administer. -initial_role_assignments = [ - {"role": "ADMINISTER", "principalId": "f05f8da4-b84c-4fca-9c77-8af0b13d11de"} -] -# MarkingName -name = "PII" -# Optional[str] -description = "Contains personally identifiable information about our customers" -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.admin.Marking.create( - category_id=category_id, - initial_members=initial_members, - initial_role_assignments=initial_role_assignments, - name=name, - description=description, - preview=preview, - ) - print("The create response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Marking.create: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | Marking | The created Marking | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **get** -Get the Marking with the specified id. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**marking_id** | MarkingId | | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**Marking** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# MarkingId -marking_id = None -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.admin.Marking.get(marking_id, preview=preview) - print("The get response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Marking.get: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | Marking | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **get_batch** -Execute multiple get requests on Marking. - -The maximum batch size for this endpoint is 500. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**body** | List[GetMarkingsBatchRequestElement] | Body of the request | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**GetMarkingsBatchResponse** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# List[GetMarkingsBatchRequestElement] | Body of the request -body = [{"markingId": "18212f9a-0e63-4b79-96a0-aae04df23336"}] -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.admin.Marking.get_batch(body, preview=preview) - print("The get_batch response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Marking.get_batch: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | GetMarkingsBatchResponse | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **list** -Maximum page size 100. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**page_size** | Optional[PageSize] | The page size to use for the endpoint. | [optional] | -**page_token** | Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. | [optional] | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**ListMarkingsResponse** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# Optional[PageSize] | The page size to use for the endpoint. -page_size = None -# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. -page_token = None -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - for marking in client.admin.Marking.list( - page_size=page_size, page_token=page_token, preview=preview - ): - pprint(marking) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Marking.list: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | ListMarkingsResponse | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **replace** -Replace the Marking with the specified id. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**marking_id** | MarkingId | | | -**name** | MarkingName | | | -**description** | Optional[str] | | [optional] | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**Marking** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# MarkingId -marking_id = None -# MarkingName -name = "PII" -# Optional[str] -description = "Contains personally identifiable information about our customers" -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.admin.Marking.replace( - marking_id, name=name, description=description, preview=preview - ) - print("The replace response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Marking.replace: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | Marking | The replaced Marking | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - diff --git a/docs/v2/Admin/MarkingCategory.md b/docs/v2/Admin/MarkingCategory.md deleted file mode 100644 index 86669436a..000000000 --- a/docs/v2/Admin/MarkingCategory.md +++ /dev/null @@ -1,111 +0,0 @@ -# MarkingCategory - -Method | HTTP request | Release Stage | -------------- | ------------- | ----- | -[**get**](#get) | **GET** /v2/admin/markingCategories/{markingCategoryId} | Public Beta | -[**list**](#list) | **GET** /v2/admin/markingCategories | Public Beta | - -# **get** -Get the MarkingCategory with the specified id. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**marking_category_id** | MarkingCategoryId | | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**MarkingCategory** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# MarkingCategoryId -marking_category_id = None -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.admin.MarkingCategory.get(marking_category_id, preview=preview) - print("The get response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling MarkingCategory.get: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | MarkingCategory | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **list** -Maximum page size 100. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**page_size** | Optional[PageSize] | The page size to use for the endpoint. | [optional] | -**page_token** | Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. | [optional] | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**ListMarkingCategoriesResponse** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# Optional[PageSize] | The page size to use for the endpoint. -page_size = None -# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. -page_token = None -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - for marking_category in client.admin.MarkingCategory.list( - page_size=page_size, page_token=page_token, preview=preview - ): - pprint(marking_category) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling MarkingCategory.list: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | ListMarkingCategoriesResponse | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - diff --git a/docs/v2/Admin/MarkingMember.md b/docs/v2/Admin/MarkingMember.md deleted file mode 100644 index 1fd35fec4..000000000 --- a/docs/v2/Admin/MarkingMember.md +++ /dev/null @@ -1,169 +0,0 @@ -# MarkingMember - -Method | HTTP request | Release Stage | -------------- | ------------- | ----- | -[**add**](#add) | **POST** /v2/admin/markings/{markingId}/markingMembers/add | Stable | -[**list**](#list) | **GET** /v2/admin/markings/{markingId}/markingMembers | Stable | -[**remove**](#remove) | **POST** /v2/admin/markings/{markingId}/markingMembers/remove | Stable | - -# **add** - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**marking_id** | MarkingId | | | -**principal_ids** | List[PrincipalId] | | | - -### Return type -**None** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# MarkingId -marking_id = None -# List[PrincipalId] -principal_ids = ["f05f8da4-b84c-4fca-9c77-8af0b13d11de"] - - -try: - api_response = client.admin.Marking.MarkingMember.add(marking_id, principal_ids=principal_ids) - print("The add response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling MarkingMember.add: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**204** | None | | None | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **list** -Lists all principals who can view resources protected by the given Marking. Ignores the `pageSize` parameter. -Requires `api:admin-write` because only marking administrators can view marking members. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**marking_id** | MarkingId | | | -**page_size** | Optional[PageSize] | The page size to use for the endpoint. | [optional] | -**page_token** | Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. | [optional] | -**transitive** | Optional[bool] | When true, includes the transitive members of groups contained within groups that are members of this Marking. For example, say the Marking has member Group A, and Group A has member User B. If `transitive=false` only Group A will be returned, but if `transitive=true` then Group A and User B will be returned. This will recursively resolve Groups through all layers of nesting. Defaults to false. | [optional] | - -### Return type -**ListMarkingMembersResponse** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# MarkingId -marking_id = None -# Optional[PageSize] | The page size to use for the endpoint. -page_size = None -# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. -page_token = None -# Optional[bool] | When true, includes the transitive members of groups contained within groups that are members of this Marking. For example, say the Marking has member Group A, and Group A has member User B. If `transitive=false` only Group A will be returned, but if `transitive=true` then Group A and User B will be returned. This will recursively resolve Groups through all layers of nesting. Defaults to false. -transitive = None - - -try: - for marking_member in client.admin.Marking.MarkingMember.list( - marking_id, page_size=page_size, page_token=page_token, transitive=transitive - ): - pprint(marking_member) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling MarkingMember.list: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | ListMarkingMembersResponse | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **remove** - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**marking_id** | MarkingId | | | -**principal_ids** | List[PrincipalId] | | | - -### Return type -**None** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# MarkingId -marking_id = None -# List[PrincipalId] -principal_ids = ["f05f8da4-b84c-4fca-9c77-8af0b13d11de"] - - -try: - api_response = client.admin.Marking.MarkingMember.remove( - marking_id, principal_ids=principal_ids - ) - print("The remove response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling MarkingMember.remove: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**204** | None | | None | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - diff --git a/docs/v2/Admin/MarkingRoleAssignment.md b/docs/v2/Admin/MarkingRoleAssignment.md deleted file mode 100644 index 4319fe914..000000000 --- a/docs/v2/Admin/MarkingRoleAssignment.md +++ /dev/null @@ -1,167 +0,0 @@ -# MarkingRoleAssignment - -Method | HTTP request | Release Stage | -------------- | ------------- | ----- | -[**add**](#add) | **POST** /v2/admin/markings/{markingId}/roleAssignments/add | Stable | -[**list**](#list) | **GET** /v2/admin/markings/{markingId}/roleAssignments | Stable | -[**remove**](#remove) | **POST** /v2/admin/markings/{markingId}/roleAssignments/remove | Stable | - -# **add** - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**marking_id** | MarkingId | | | -**role_assignments** | List[MarkingRoleUpdate] | | | - -### Return type -**None** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# MarkingId -marking_id = None -# List[MarkingRoleUpdate] -role_assignments = [{"role": "ADMINISTER", "principalId": "f05f8da4-b84c-4fca-9c77-8af0b13d11de"}] - - -try: - api_response = client.admin.Marking.MarkingRoleAssignment.add( - marking_id, role_assignments=role_assignments - ) - print("The add response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling MarkingRoleAssignment.add: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**204** | None | | None | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **list** -List all principals who are assigned a role for the given Marking. Ignores the `pageSize` parameter. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**marking_id** | MarkingId | | | -**page_size** | Optional[PageSize] | The page size to use for the endpoint. | [optional] | -**page_token** | Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. | [optional] | - -### Return type -**ListMarkingRoleAssignmentsResponse** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# MarkingId -marking_id = None -# Optional[PageSize] | The page size to use for the endpoint. -page_size = None -# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. -page_token = None - - -try: - for marking_role_assignment in client.admin.Marking.MarkingRoleAssignment.list( - marking_id, page_size=page_size, page_token=page_token - ): - pprint(marking_role_assignment) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling MarkingRoleAssignment.list: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | ListMarkingRoleAssignmentsResponse | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **remove** - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**marking_id** | MarkingId | | | -**role_assignments** | List[MarkingRoleUpdate] | | | - -### Return type -**None** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# MarkingId -marking_id = None -# List[MarkingRoleUpdate] -role_assignments = [{"role": "ADMINISTER", "principalId": "f05f8da4-b84c-4fca-9c77-8af0b13d11de"}] - - -try: - api_response = client.admin.Marking.MarkingRoleAssignment.remove( - marking_id, role_assignments=role_assignments - ) - print("The remove response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling MarkingRoleAssignment.remove: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**204** | None | | None | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - diff --git a/docs/v2/Admin/Organization.md b/docs/v2/Admin/Organization.md deleted file mode 100644 index 5de2dbb37..000000000 --- a/docs/v2/Admin/Organization.md +++ /dev/null @@ -1,240 +0,0 @@ -# Organization - -Method | HTTP request | Release Stage | -------------- | ------------- | ----- | -[**create**](#create) | **POST** /v2/admin/organizations | Private Beta | -[**get**](#get) | **GET** /v2/admin/organizations/{organizationRid} | Public Beta | -[**list_available_roles**](#list_available_roles) | **GET** /v2/admin/organizations/{organizationRid}/listAvailableRoles | Public Beta | -[**replace**](#replace) | **PUT** /v2/admin/organizations/{organizationRid} | Public Beta | - -# **create** -Creates a new Organization. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**administrators** | List[PrincipalId] | The initial administrators of the Organization. At least one principal must be provided. | | -**enrollment_rid** | EnrollmentRid | The RID of the Enrollment that this Organization belongs to. This must be provided. | | -**name** | OrganizationName | | | -**description** | Optional[str] | | [optional] | -**host** | Optional[HostName] | The primary host name of the Organization. This should be used when constructing URLs for users of this Organization. | [optional] | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**Organization** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# List[PrincipalId] | The initial administrators of the Organization. At least one principal must be provided. -administrators = ["f05f8da4-b84c-4fca-9c77-8af0b13d11de"] -# EnrollmentRid | The RID of the Enrollment that this Organization belongs to. This must be provided. -enrollment_rid = "ri.control-panel.main.customer.466f812b-f974-4478-9d4f-90402cd3def6" -# OrganizationName -name = "Example Organization" -# Optional[str] -description = None -# Optional[HostName] | The primary host name of the Organization. This should be used when constructing URLs for users of this Organization. -host = "example.palantirfoundry.com" -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.admin.Organization.create( - administrators=administrators, - enrollment_rid=enrollment_rid, - name=name, - description=description, - host=host, - preview=preview, - ) - print("The create response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Organization.create: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | Organization | The created Organization | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **get** -Get the Organization with the specified rid. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**organization_rid** | OrganizationRid | | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**Organization** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# OrganizationRid -organization_rid = None -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.admin.Organization.get(organization_rid, preview=preview) - print("The get response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Organization.get: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | Organization | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **list_available_roles** -List all roles that can be assigned to a principal for the given Organization. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**organization_rid** | OrganizationRid | | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**ListAvailableOrganizationRolesResponse** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# OrganizationRid -organization_rid = None -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.admin.Organization.list_available_roles(organization_rid, preview=preview) - print("The list_available_roles response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Organization.list_available_roles: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | ListAvailableOrganizationRolesResponse | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **replace** -Replace the Organization with the specified rid. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**organization_rid** | OrganizationRid | | | -**name** | OrganizationName | | | -**description** | Optional[str] | | [optional] | -**host** | Optional[HostName] | The primary host name of the Organization. This should be used when constructing URLs for users of this Organization. | [optional] | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**Organization** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# OrganizationRid -organization_rid = None -# OrganizationName -name = "Example Organization" -# Optional[str] -description = None -# Optional[HostName] | The primary host name of the Organization. This should be used when constructing URLs for users of this Organization. -host = "example.palantirfoundry.com" -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.admin.Organization.replace( - organization_rid, name=name, description=description, host=host, preview=preview - ) - print("The replace response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Organization.replace: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | Organization | The replaced Organization | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - diff --git a/docs/v2/Admin/OrganizationRoleAssignment.md b/docs/v2/Admin/OrganizationRoleAssignment.md deleted file mode 100644 index 530c1d538..000000000 --- a/docs/v2/Admin/OrganizationRoleAssignment.md +++ /dev/null @@ -1,183 +0,0 @@ -# OrganizationRoleAssignment - -Method | HTTP request | Release Stage | -------------- | ------------- | ----- | -[**add**](#add) | **POST** /v2/admin/organizations/{organizationRid}/roleAssignments/add | Public Beta | -[**list**](#list) | **GET** /v2/admin/organizations/{organizationRid}/roleAssignments | Public Beta | -[**remove**](#remove) | **POST** /v2/admin/organizations/{organizationRid}/roleAssignments/remove | Public Beta | - -# **add** -Assign roles to principals for the given Organization. At most 100 role assignments can be added in a single request. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**organization_rid** | OrganizationRid | | | -**role_assignments** | List[RoleAssignmentUpdate] | | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**None** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# OrganizationRid -organization_rid = None -# List[RoleAssignmentUpdate] -role_assignments = [ - { - "roleId": "8bf49052-dc37-4528-8bf0-b551cfb71268", - "principalId": "f05f8da4-b84c-4fca-9c77-8af0b13d11de", - } -] -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.admin.Organization.OrganizationRoleAssignment.add( - organization_rid, role_assignments=role_assignments, preview=preview - ) - print("The add response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling OrganizationRoleAssignment.add: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**204** | None | | None | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **list** -List all principals who are assigned a role for the given Organization. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**organization_rid** | OrganizationRid | | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**ListOrganizationRoleAssignmentsResponse** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# OrganizationRid -organization_rid = None -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.admin.Organization.OrganizationRoleAssignment.list( - organization_rid, preview=preview - ) - print("The list response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling OrganizationRoleAssignment.list: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | ListOrganizationRoleAssignmentsResponse | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **remove** -Remove roles from principals for the given Organization. At most 100 role assignments can be removed in a single request. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**organization_rid** | OrganizationRid | | | -**role_assignments** | List[RoleAssignmentUpdate] | | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**None** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# OrganizationRid -organization_rid = None -# List[RoleAssignmentUpdate] -role_assignments = [ - { - "roleId": "8bf49052-dc37-4528-8bf0-b551cfb71268", - "principalId": "f05f8da4-b84c-4fca-9c77-8af0b13d11de", - } -] -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.admin.Organization.OrganizationRoleAssignment.remove( - organization_rid, role_assignments=role_assignments, preview=preview - ) - print("The remove response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling OrganizationRoleAssignment.remove: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**204** | None | | None | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - diff --git a/docs/v2/Admin/Role.md b/docs/v2/Admin/Role.md deleted file mode 100644 index 7ab3bf9b7..000000000 --- a/docs/v2/Admin/Role.md +++ /dev/null @@ -1,109 +0,0 @@ -# Role - -Method | HTTP request | Release Stage | -------------- | ------------- | ----- | -[**get**](#get) | **GET** /v2/admin/roles/{roleId} | Private Beta | -[**get_batch**](#get_batch) | **POST** /v2/admin/roles/getBatch | Private Beta | - -# **get** -Get the Role with the specified id. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**role_id** | RoleId | | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**Role** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# RoleId -role_id = None -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.admin.Role.get(role_id, preview=preview) - print("The get response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Role.get: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | Role | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **get_batch** -Execute multiple get requests on Role. - -The maximum batch size for this endpoint is 500. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**body** | List[GetRolesBatchRequestElement] | Body of the request | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**GetRolesBatchResponse** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# List[GetRolesBatchRequestElement] | Body of the request -body = [{"roleId": "8bf49052-dc37-4528-8bf0-b551cfb71268"}] -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.admin.Role.get_batch(body, preview=preview) - print("The get_batch response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Role.get_batch: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | GetRolesBatchResponse | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - diff --git a/docs/v2/Admin/User.md b/docs/v2/Admin/User.md deleted file mode 100644 index 3df5593b0..000000000 --- a/docs/v2/Admin/User.md +++ /dev/null @@ -1,462 +0,0 @@ -# User - -Method | HTTP request | Release Stage | -------------- | ------------- | ----- | -[**delete**](#delete) | **DELETE** /v2/admin/users/{userId} | Stable | -[**get**](#get) | **GET** /v2/admin/users/{userId} | Stable | -[**get_batch**](#get_batch) | **POST** /v2/admin/users/getBatch | Stable | -[**get_current**](#get_current) | **GET** /v2/admin/users/getCurrent | Stable | -[**get_markings**](#get_markings) | **GET** /v2/admin/users/{userId}/getMarkings | Public Beta | -[**list**](#list) | **GET** /v2/admin/users | Stable | -[**profile_picture**](#profile_picture) | **GET** /v2/admin/users/{userId}/profilePicture | Stable | -[**revoke_all_tokens**](#revoke_all_tokens) | **POST** /v2/admin/users/{userId}/revokeAllTokens | Public Beta | -[**search**](#search) | **POST** /v2/admin/users/search | Stable | - -# **delete** -Delete the User with the specified id. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**user_id** | UserId | | | - -### Return type -**None** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# UserId -user_id = None - - -try: - api_response = client.admin.User.delete(user_id) - print("The delete response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling User.delete: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**204** | None | | None | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **get** -Get the User with the specified id. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**user_id** | UserId | | | -**status** | Optional[UserStatus] | | [optional] | - -### Return type -**User** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# UserId -user_id = None -# Optional[UserStatus] -status = None - - -try: - api_response = client.admin.User.get(user_id, status=status) - print("The get response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling User.get: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | User | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **get_batch** -Execute multiple get requests on User. - -The maximum batch size for this endpoint is 500. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**body** | List[GetUsersBatchRequestElement] | Body of the request | | - -### Return type -**GetUsersBatchResponse** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# List[GetUsersBatchRequestElement] | Body of the request -body = [{"userId": "0d1fe74e-2b70-4a93-9b1a-80070637788b", "status": "ACTIVE"}] - - -try: - api_response = client.admin.User.get_batch(body) - print("The get_batch response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling User.get_batch: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | GetUsersBatchResponse | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **get_current** - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | - -### Return type -**User** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - - -try: - api_response = client.admin.User.get_current() - print("The get_current response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling User.get_current: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | User | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **get_markings** -Retrieve Markings that the user is currently a member of. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**user_id** | UserId | | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**GetUserMarkingsResponse** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# UserId -user_id = None -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.admin.User.get_markings(user_id, preview=preview) - print("The get_markings response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling User.get_markings: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | GetUserMarkingsResponse | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **list** -Lists all Users. - -This is a paged endpoint. Each page may be smaller or larger than the requested page size. However, it is guaranteed that if there are more results available, the `nextPageToken` field will be populated. To get the next page, make the same request again, but set the value of the `pageToken` query parameter to be value of the `nextPageToken` value of the previous response. If there is no `nextPageToken` field in the response, you are on the last page. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**include** | Optional[UserStatus] | | [optional] | -**page_size** | Optional[PageSize] | The page size to use for the endpoint. | [optional] | -**page_token** | Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. | [optional] | - -### Return type -**ListUsersResponse** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# Optional[UserStatus] -include = None -# Optional[PageSize] | The page size to use for the endpoint. -page_size = None -# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. -page_token = None - - -try: - for user in client.admin.User.list(include=include, page_size=page_size, page_token=page_token): - pprint(user) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling User.list: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | ListUsersResponse | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **profile_picture** - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**user_id** | UserId | | | - -### Return type -**Optional[bytes]** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# UserId -user_id = None - - -try: - api_response = client.admin.User.profile_picture(user_id) - print("The profile_picture response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling User.profile_picture: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | Optional[bytes] | The user's profile picture in binary format. The format is the original format uploaded by the user. The response will contain a `Content-Type` header that can be used to identify the media type. | application/octet-stream | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **revoke_all_tokens** -Revoke all active authentication tokens for the user including active browser sessions and long-lived -development tokens. If the user has active sessions in a browser, this will force re-authentication. - -The caller must have permission to manage users for the target user's organization. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**user_id** | UserId | | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**None** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# UserId -user_id = None -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.admin.User.revoke_all_tokens(user_id, preview=preview) - print("The revoke_all_tokens response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling User.revoke_all_tokens: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**204** | None | | None | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **search** -Perform a case-insensitive prefix search for users based on username, given name and family name. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**where** | UserSearchFilter | | | -**page_size** | Optional[PageSize] | | [optional] | -**page_token** | Optional[PageToken] | | [optional] | - -### Return type -**SearchUsersResponse** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# UserSearchFilter -where = {"type": "queryString", "value": "jsmith"} -# Optional[PageSize] -page_size = 100 -# Optional[PageToken] -page_token = "v1.QnVpbGQgdGhlIEZ1dHVyZTogaHR0cHM6Ly93d3cucGFsYW50aXIuY29tL2NhcmVlcnMvP2xldmVyLXNvdXJjZSU1YiU1ZD1BUElEb2NzI29wZW4tcG9zaXRpb25z" - - -try: - api_response = client.admin.User.search(where=where, page_size=page_size, page_token=page_token) - print("The search response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling User.search: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | SearchUsersResponse | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - diff --git a/docs/v2/Admin/UserProviderInfo.md b/docs/v2/Admin/UserProviderInfo.md deleted file mode 100644 index f0a57fc09..000000000 --- a/docs/v2/Admin/UserProviderInfo.md +++ /dev/null @@ -1,112 +0,0 @@ -# UserProviderInfo - -Method | HTTP request | Release Stage | -------------- | ------------- | ----- | -[**get**](#get) | **GET** /v2/admin/users/{userId}/providerInfo | Public Beta | -[**replace**](#replace) | **PUT** /v2/admin/users/{userId}/providerInfo | Public Beta | - -# **get** -Get the UserProviderInfo. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**user_id** | UserId | | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**UserProviderInfo** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# UserId -user_id = None -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.admin.User.ProviderInfo.get(user_id, preview=preview) - print("The get response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling ProviderInfo.get: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | UserProviderInfo | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **replace** -Replace the UserProviderInfo. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**user_id** | UserId | | | -**provider_id** | ProviderId | The ID of the User in the external authentication provider. This value is determined by the authentication provider. At most one User can have a given provider ID in a given Realm. | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**UserProviderInfo** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# UserId -user_id = None -# ProviderId | The ID of the User in the external authentication provider. This value is determined by the authentication provider. At most one User can have a given provider ID in a given Realm. -provider_id = "2838c8f3-d76a-4e99-acf1-1dee537e4c48" -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.admin.User.ProviderInfo.replace( - user_id, provider_id=provider_id, preview=preview - ) - print("The replace response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling ProviderInfo.replace: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | UserProviderInfo | The replaced UserProviderInfo | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - diff --git a/docs/v2/Admin/models/AddEnrollmentRoleAssignmentsRequest.md b/docs/v2/Admin/models/AddEnrollmentRoleAssignmentsRequest.md deleted file mode 100644 index c04156409..000000000 --- a/docs/v2/Admin/models/AddEnrollmentRoleAssignmentsRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# AddEnrollmentRoleAssignmentsRequest - -AddEnrollmentRoleAssignmentsRequest - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**role_assignments** | List[RoleAssignmentUpdate] | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/AddGroupMembersRequest.md b/docs/v2/Admin/models/AddGroupMembersRequest.md deleted file mode 100644 index 4eea28350..000000000 --- a/docs/v2/Admin/models/AddGroupMembersRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# AddGroupMembersRequest - -AddGroupMembersRequest - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**principal_ids** | List[PrincipalId] | Yes | | -**expiration** | Optional[GroupMembershipExpiration] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/AddMarkingMembersRequest.md b/docs/v2/Admin/models/AddMarkingMembersRequest.md deleted file mode 100644 index 4b0caa68a..000000000 --- a/docs/v2/Admin/models/AddMarkingMembersRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# AddMarkingMembersRequest - -AddMarkingMembersRequest - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**principal_ids** | List[PrincipalId] | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/AddMarkingRoleAssignmentsRequest.md b/docs/v2/Admin/models/AddMarkingRoleAssignmentsRequest.md deleted file mode 100644 index 4182cebb4..000000000 --- a/docs/v2/Admin/models/AddMarkingRoleAssignmentsRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# AddMarkingRoleAssignmentsRequest - -AddMarkingRoleAssignmentsRequest - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**role_assignments** | List[MarkingRoleUpdate] | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/AddOrganizationRoleAssignmentsRequest.md b/docs/v2/Admin/models/AddOrganizationRoleAssignmentsRequest.md deleted file mode 100644 index 3b5d5e7d1..000000000 --- a/docs/v2/Admin/models/AddOrganizationRoleAssignmentsRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# AddOrganizationRoleAssignmentsRequest - -AddOrganizationRoleAssignmentsRequest - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**role_assignments** | List[RoleAssignmentUpdate] | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/AttributeName.md b/docs/v2/Admin/models/AttributeName.md deleted file mode 100644 index e7f098330..000000000 --- a/docs/v2/Admin/models/AttributeName.md +++ /dev/null @@ -1,11 +0,0 @@ -# AttributeName - -AttributeName - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/AttributeValue.md b/docs/v2/Admin/models/AttributeValue.md deleted file mode 100644 index cdd793463..000000000 --- a/docs/v2/Admin/models/AttributeValue.md +++ /dev/null @@ -1,11 +0,0 @@ -# AttributeValue - -AttributeValue - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/AttributeValues.md b/docs/v2/Admin/models/AttributeValues.md deleted file mode 100644 index 8bd2ad76e..000000000 --- a/docs/v2/Admin/models/AttributeValues.md +++ /dev/null @@ -1,11 +0,0 @@ -# AttributeValues - -AttributeValues - -## Type -```python -List[AttributeValue] -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/AuthenticationProtocol.md b/docs/v2/Admin/models/AuthenticationProtocol.md deleted file mode 100644 index 016859b16..000000000 --- a/docs/v2/Admin/models/AuthenticationProtocol.md +++ /dev/null @@ -1,16 +0,0 @@ -# AuthenticationProtocol - -AuthenticationProtocol - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -SamlAuthenticationProtocol | saml -OidcAuthenticationProtocol | oidc - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/AuthenticationProvider.md b/docs/v2/Admin/models/AuthenticationProvider.md deleted file mode 100644 index a750e827c..000000000 --- a/docs/v2/Admin/models/AuthenticationProvider.md +++ /dev/null @@ -1,17 +0,0 @@ -# AuthenticationProvider - -AuthenticationProvider - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**rid** | AuthenticationProviderRid | Yes | | -**name** | AuthenticationProviderName | Yes | | -**realm** | Realm | Yes | | -**enabled** | AuthenticationProviderEnabled | Yes | Whether users can log in using this provider. | -**supported_hosts** | List[HostName] | Yes | This provider can only be utilized from these hosts. | -**supported_username_patterns** | List[str] | Yes | Users who enter usernames that match these patterns will be redirected to this authentication provider. | -**protocol** | AuthenticationProtocol | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/AuthenticationProviderEnabled.md b/docs/v2/Admin/models/AuthenticationProviderEnabled.md deleted file mode 100644 index a2b6b6386..000000000 --- a/docs/v2/Admin/models/AuthenticationProviderEnabled.md +++ /dev/null @@ -1,11 +0,0 @@ -# AuthenticationProviderEnabled - -Whether users can log in using this provider. - -## Type -```python -bool -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/AuthenticationProviderName.md b/docs/v2/Admin/models/AuthenticationProviderName.md deleted file mode 100644 index 71ca1d118..000000000 --- a/docs/v2/Admin/models/AuthenticationProviderName.md +++ /dev/null @@ -1,11 +0,0 @@ -# AuthenticationProviderName - -AuthenticationProviderName - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/AuthenticationProviderRid.md b/docs/v2/Admin/models/AuthenticationProviderRid.md deleted file mode 100644 index 743ea3ab0..000000000 --- a/docs/v2/Admin/models/AuthenticationProviderRid.md +++ /dev/null @@ -1,11 +0,0 @@ -# AuthenticationProviderRid - -AuthenticationProviderRid - -## Type -```python -RID -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/CertificateInfo.md b/docs/v2/Admin/models/CertificateInfo.md deleted file mode 100644 index 539ee069d..000000000 --- a/docs/v2/Admin/models/CertificateInfo.md +++ /dev/null @@ -1,14 +0,0 @@ -# CertificateInfo - -CertificateInfo - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**pem_certificate** | str | Yes | The certificate, in PEM format. | -**common_name** | Optional[str] | No | | -**expiry_date** | datetime | Yes | | -**usage_type** | CertificateUsageType | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/CertificateUsageType.md b/docs/v2/Admin/models/CertificateUsageType.md deleted file mode 100644 index f46ee7b6a..000000000 --- a/docs/v2/Admin/models/CertificateUsageType.md +++ /dev/null @@ -1,12 +0,0 @@ -# CertificateUsageType - -CertificateUsageType - -| **Value** | -| --------- | -| `"ENCRYPTION"` | -| `"SIGNING"` | -| `"UNSPECIFIED"` | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/CreateGroupRequest.md b/docs/v2/Admin/models/CreateGroupRequest.md deleted file mode 100644 index 3df810b24..000000000 --- a/docs/v2/Admin/models/CreateGroupRequest.md +++ /dev/null @@ -1,14 +0,0 @@ -# CreateGroupRequest - -CreateGroupRequest - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**name** | GroupName | Yes | The name of the Group. | -**organizations** | List[OrganizationRid] | Yes | The RIDs of the Organizations whose members can see this group. At least one Organization RID must be listed. | -**description** | Optional[str] | No | A description of the Group. | -**attributes** | Dict[AttributeName, AttributeValues] | Yes | A map of the Group's attributes. Attributes prefixed with "multipass:" are reserved for internal use by Foundry and are subject to change. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/CreateMarkingRequest.md b/docs/v2/Admin/models/CreateMarkingRequest.md deleted file mode 100644 index 2690fb3e0..000000000 --- a/docs/v2/Admin/models/CreateMarkingRequest.md +++ /dev/null @@ -1,15 +0,0 @@ -# CreateMarkingRequest - -CreateMarkingRequest - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**initial_role_assignments** | List[MarkingRoleUpdate] | Yes | The initial roles that will be assigned when the Marking is created. At least one ADMIN role must be provided. This can be changed later through the MarkingRoleAssignment operations. WARNING: If you do not include your own principal ID or the ID of a Group that you are a member of, you will create a Marking that you cannot administer. | -**initial_members** | List[PrincipalId] | Yes | Users and Groups that will be able to view resources protected by this Marking. This can be changed later through the MarkingMember operations. | -**name** | MarkingName | Yes | | -**description** | Optional[str] | No | | -**category_id** | MarkingCategoryId | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/CreateOrganizationRequest.md b/docs/v2/Admin/models/CreateOrganizationRequest.md deleted file mode 100644 index c804d8f4a..000000000 --- a/docs/v2/Admin/models/CreateOrganizationRequest.md +++ /dev/null @@ -1,15 +0,0 @@ -# CreateOrganizationRequest - -CreateOrganizationRequest - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**administrators** | List[PrincipalId] | Yes | The initial administrators of the Organization. At least one principal must be provided. | -**enrollment_rid** | EnrollmentRid | Yes | The RID of the Enrollment that this Organization belongs to. This must be provided. | -**name** | OrganizationName | Yes | | -**host** | Optional[HostName] | No | The primary host name of the Organization. This should be used when constructing URLs for users of this Organization. | -**description** | Optional[str] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/Enrollment.md b/docs/v2/Admin/models/Enrollment.md deleted file mode 100644 index 30061d8ef..000000000 --- a/docs/v2/Admin/models/Enrollment.md +++ /dev/null @@ -1,13 +0,0 @@ -# Enrollment - -Enrollment - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**rid** | EnrollmentRid | Yes | | -**name** | EnrollmentName | Yes | | -**created_time** | Optional[CreatedTime] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/EnrollmentName.md b/docs/v2/Admin/models/EnrollmentName.md deleted file mode 100644 index 037384fd9..000000000 --- a/docs/v2/Admin/models/EnrollmentName.md +++ /dev/null @@ -1,11 +0,0 @@ -# EnrollmentName - -EnrollmentName - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/EnrollmentRoleAssignment.md b/docs/v2/Admin/models/EnrollmentRoleAssignment.md deleted file mode 100644 index e5a1f1146..000000000 --- a/docs/v2/Admin/models/EnrollmentRoleAssignment.md +++ /dev/null @@ -1,13 +0,0 @@ -# EnrollmentRoleAssignment - -EnrollmentRoleAssignment - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**principal_type** | PrincipalType | Yes | | -**principal_id** | PrincipalId | Yes | | -**role_id** | RoleId | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/GetGroupsBatchRequestElement.md b/docs/v2/Admin/models/GetGroupsBatchRequestElement.md deleted file mode 100644 index 3d4089808..000000000 --- a/docs/v2/Admin/models/GetGroupsBatchRequestElement.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetGroupsBatchRequestElement - -GetGroupsBatchRequestElement - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**group_id** | GroupId | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/GetGroupsBatchResponse.md b/docs/v2/Admin/models/GetGroupsBatchResponse.md deleted file mode 100644 index fba1160c1..000000000 --- a/docs/v2/Admin/models/GetGroupsBatchResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetGroupsBatchResponse - -GetGroupsBatchResponse - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**data** | Dict[GroupId, Group] | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/GetMarkingsBatchRequestElement.md b/docs/v2/Admin/models/GetMarkingsBatchRequestElement.md deleted file mode 100644 index 93887c045..000000000 --- a/docs/v2/Admin/models/GetMarkingsBatchRequestElement.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetMarkingsBatchRequestElement - -GetMarkingsBatchRequestElement - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**marking_id** | MarkingId | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/GetMarkingsBatchResponse.md b/docs/v2/Admin/models/GetMarkingsBatchResponse.md deleted file mode 100644 index 57b2724f8..000000000 --- a/docs/v2/Admin/models/GetMarkingsBatchResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetMarkingsBatchResponse - -GetMarkingsBatchResponse - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**data** | Dict[MarkingId, Marking] | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/GetRolesBatchRequestElement.md b/docs/v2/Admin/models/GetRolesBatchRequestElement.md deleted file mode 100644 index a7221779a..000000000 --- a/docs/v2/Admin/models/GetRolesBatchRequestElement.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetRolesBatchRequestElement - -GetRolesBatchRequestElement - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**role_id** | RoleId | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/GetRolesBatchResponse.md b/docs/v2/Admin/models/GetRolesBatchResponse.md deleted file mode 100644 index 84595f941..000000000 --- a/docs/v2/Admin/models/GetRolesBatchResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetRolesBatchResponse - -GetRolesBatchResponse - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**data** | Dict[RoleId, Role] | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/GetUserMarkingsResponse.md b/docs/v2/Admin/models/GetUserMarkingsResponse.md deleted file mode 100644 index 49b9c53fc..000000000 --- a/docs/v2/Admin/models/GetUserMarkingsResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetUserMarkingsResponse - -GetUserMarkingsResponse - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**view** | List[MarkingId] | Yes | The markings that the user has access to. The user will be able to access resources protected with these markings. This includes organization markings for organizations in which the user is a guest member. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/GetUsersBatchRequestElement.md b/docs/v2/Admin/models/GetUsersBatchRequestElement.md deleted file mode 100644 index 06844b6c7..000000000 --- a/docs/v2/Admin/models/GetUsersBatchRequestElement.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetUsersBatchRequestElement - -GetUsersBatchRequestElement - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**user_id** | UserId | Yes | | -**status** | Optional[UserStatus] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/GetUsersBatchResponse.md b/docs/v2/Admin/models/GetUsersBatchResponse.md deleted file mode 100644 index 00c0682da..000000000 --- a/docs/v2/Admin/models/GetUsersBatchResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetUsersBatchResponse - -GetUsersBatchResponse - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**data** | Dict[UserId, User] | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/Group.md b/docs/v2/Admin/models/Group.md deleted file mode 100644 index 6ef9a8a5d..000000000 --- a/docs/v2/Admin/models/Group.md +++ /dev/null @@ -1,16 +0,0 @@ -# Group - -Group - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**id** | GroupId | Yes | | -**name** | GroupName | Yes | The name of the Group. | -**description** | Optional[str] | No | A description of the Group. | -**realm** | Realm | Yes | | -**organizations** | List[OrganizationRid] | Yes | The RIDs of the Organizations whose members can see this group. At least one Organization RID must be listed. | -**attributes** | Dict[AttributeName, AttributeValues] | Yes | A map of the Group's attributes. Attributes prefixed with "multipass:" are reserved for internal use by Foundry and are subject to change. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/GroupMember.md b/docs/v2/Admin/models/GroupMember.md deleted file mode 100644 index f178d41b6..000000000 --- a/docs/v2/Admin/models/GroupMember.md +++ /dev/null @@ -1,12 +0,0 @@ -# GroupMember - -GroupMember - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**principal_type** | PrincipalType | Yes | | -**principal_id** | PrincipalId | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/GroupMembership.md b/docs/v2/Admin/models/GroupMembership.md deleted file mode 100644 index 8ef16dd03..000000000 --- a/docs/v2/Admin/models/GroupMembership.md +++ /dev/null @@ -1,11 +0,0 @@ -# GroupMembership - -GroupMembership - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**group_id** | GroupId | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/GroupMembershipExpiration.md b/docs/v2/Admin/models/GroupMembershipExpiration.md deleted file mode 100644 index b5c1f1a6b..000000000 --- a/docs/v2/Admin/models/GroupMembershipExpiration.md +++ /dev/null @@ -1,11 +0,0 @@ -# GroupMembershipExpiration - -GroupMembershipExpiration - -## Type -```python -datetime -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/GroupMembershipExpirationPolicy.md b/docs/v2/Admin/models/GroupMembershipExpirationPolicy.md deleted file mode 100644 index 24702eb6a..000000000 --- a/docs/v2/Admin/models/GroupMembershipExpirationPolicy.md +++ /dev/null @@ -1,12 +0,0 @@ -# GroupMembershipExpirationPolicy - -GroupMembershipExpirationPolicy - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**maximum_value** | Optional[GroupMembershipExpiration] | No | Members in this group must be added with expiration times that occur before this value. | -**maximum_duration** | Optional[DurationSeconds] | No | Members in this group must be added with expirations that are less than this duration in seconds into the future from the time they are added. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/GroupName.md b/docs/v2/Admin/models/GroupName.md deleted file mode 100644 index 0167f7c6d..000000000 --- a/docs/v2/Admin/models/GroupName.md +++ /dev/null @@ -1,11 +0,0 @@ -# GroupName - -The name of the Group. - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/GroupProviderInfo.md b/docs/v2/Admin/models/GroupProviderInfo.md deleted file mode 100644 index 28756f43f..000000000 --- a/docs/v2/Admin/models/GroupProviderInfo.md +++ /dev/null @@ -1,11 +0,0 @@ -# GroupProviderInfo - -GroupProviderInfo - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**provider_id** | ProviderId | Yes | The ID of the Group in the external authentication provider. This value is determined by the authentication provider. At most one Group can have a given provider ID in a given Realm. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/GroupSearchFilter.md b/docs/v2/Admin/models/GroupSearchFilter.md deleted file mode 100644 index 4bef9fe14..000000000 --- a/docs/v2/Admin/models/GroupSearchFilter.md +++ /dev/null @@ -1,12 +0,0 @@ -# GroupSearchFilter - -GroupSearchFilter - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | PrincipalFilterType | Yes | | -**value** | str | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/Host.md b/docs/v2/Admin/models/Host.md deleted file mode 100644 index 1a42b9fa2..000000000 --- a/docs/v2/Admin/models/Host.md +++ /dev/null @@ -1,11 +0,0 @@ -# Host - -Host - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**host_name** | HostName | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/HostName.md b/docs/v2/Admin/models/HostName.md deleted file mode 100644 index 23ec4ae22..000000000 --- a/docs/v2/Admin/models/HostName.md +++ /dev/null @@ -1,11 +0,0 @@ -# HostName - -HostName - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/ListAuthenticationProvidersResponse.md b/docs/v2/Admin/models/ListAuthenticationProvidersResponse.md deleted file mode 100644 index f62dbd5fc..000000000 --- a/docs/v2/Admin/models/ListAuthenticationProvidersResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListAuthenticationProvidersResponse - -ListAuthenticationProvidersResponse - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**data** | List[AuthenticationProvider] | Yes | | -**next_page_token** | Optional[PageToken] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/ListAvailableOrganizationRolesResponse.md b/docs/v2/Admin/models/ListAvailableOrganizationRolesResponse.md deleted file mode 100644 index 73dfa458a..000000000 --- a/docs/v2/Admin/models/ListAvailableOrganizationRolesResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# ListAvailableOrganizationRolesResponse - -ListAvailableOrganizationRolesResponse - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**data** | List[Role] | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/ListEnrollmentRoleAssignmentsResponse.md b/docs/v2/Admin/models/ListEnrollmentRoleAssignmentsResponse.md deleted file mode 100644 index c12a1c428..000000000 --- a/docs/v2/Admin/models/ListEnrollmentRoleAssignmentsResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListEnrollmentRoleAssignmentsResponse - -ListEnrollmentRoleAssignmentsResponse - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**data** | List[EnrollmentRoleAssignment] | Yes | | -**next_page_token** | Optional[PageToken] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/ListGroupMembersResponse.md b/docs/v2/Admin/models/ListGroupMembersResponse.md deleted file mode 100644 index 9502f7208..000000000 --- a/docs/v2/Admin/models/ListGroupMembersResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListGroupMembersResponse - -ListGroupMembersResponse - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**data** | List[GroupMember] | Yes | | -**next_page_token** | Optional[PageToken] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/ListGroupMembershipsResponse.md b/docs/v2/Admin/models/ListGroupMembershipsResponse.md deleted file mode 100644 index 660da6b35..000000000 --- a/docs/v2/Admin/models/ListGroupMembershipsResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListGroupMembershipsResponse - -ListGroupMembershipsResponse - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**data** | List[GroupMembership] | Yes | | -**next_page_token** | Optional[PageToken] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/ListGroupsResponse.md b/docs/v2/Admin/models/ListGroupsResponse.md deleted file mode 100644 index 508149498..000000000 --- a/docs/v2/Admin/models/ListGroupsResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListGroupsResponse - -ListGroupsResponse - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**data** | List[Group] | Yes | | -**next_page_token** | Optional[PageToken] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/ListHostsResponse.md b/docs/v2/Admin/models/ListHostsResponse.md deleted file mode 100644 index 0521ae485..000000000 --- a/docs/v2/Admin/models/ListHostsResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListHostsResponse - -ListHostsResponse - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**data** | List[Host] | Yes | | -**next_page_token** | Optional[PageToken] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/ListMarkingCategoriesResponse.md b/docs/v2/Admin/models/ListMarkingCategoriesResponse.md deleted file mode 100644 index 7b9cae1ab..000000000 --- a/docs/v2/Admin/models/ListMarkingCategoriesResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListMarkingCategoriesResponse - -ListMarkingCategoriesResponse - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**data** | List[MarkingCategory] | Yes | | -**next_page_token** | Optional[PageToken] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/ListMarkingMembersResponse.md b/docs/v2/Admin/models/ListMarkingMembersResponse.md deleted file mode 100644 index 7404258de..000000000 --- a/docs/v2/Admin/models/ListMarkingMembersResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListMarkingMembersResponse - -ListMarkingMembersResponse - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**data** | List[MarkingMember] | Yes | | -**next_page_token** | Optional[PageToken] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/ListMarkingRoleAssignmentsResponse.md b/docs/v2/Admin/models/ListMarkingRoleAssignmentsResponse.md deleted file mode 100644 index f31e2fba5..000000000 --- a/docs/v2/Admin/models/ListMarkingRoleAssignmentsResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListMarkingRoleAssignmentsResponse - -ListMarkingRoleAssignmentsResponse - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**data** | List[MarkingRoleAssignment] | Yes | | -**next_page_token** | Optional[PageToken] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/ListMarkingsResponse.md b/docs/v2/Admin/models/ListMarkingsResponse.md deleted file mode 100644 index 504ba42c1..000000000 --- a/docs/v2/Admin/models/ListMarkingsResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListMarkingsResponse - -ListMarkingsResponse - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**data** | List[Marking] | Yes | | -**next_page_token** | Optional[PageToken] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/ListOrganizationRoleAssignmentsResponse.md b/docs/v2/Admin/models/ListOrganizationRoleAssignmentsResponse.md deleted file mode 100644 index 45df3068f..000000000 --- a/docs/v2/Admin/models/ListOrganizationRoleAssignmentsResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListOrganizationRoleAssignmentsResponse - -ListOrganizationRoleAssignmentsResponse - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**data** | List[OrganizationRoleAssignment] | Yes | | -**next_page_token** | Optional[PageToken] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/ListUsersResponse.md b/docs/v2/Admin/models/ListUsersResponse.md deleted file mode 100644 index 30992198d..000000000 --- a/docs/v2/Admin/models/ListUsersResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListUsersResponse - -ListUsersResponse - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**data** | List[User] | Yes | | -**next_page_token** | Optional[PageToken] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/Marking.md b/docs/v2/Admin/models/Marking.md deleted file mode 100644 index 86e86b09f..000000000 --- a/docs/v2/Admin/models/Marking.md +++ /dev/null @@ -1,17 +0,0 @@ -# Marking - -Marking - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**id** | MarkingId | Yes | | -**category_id** | MarkingCategoryId | Yes | | -**name** | MarkingName | Yes | | -**description** | Optional[str] | No | | -**organization** | Optional[OrganizationRid] | No | If this marking is associated with an Organization, its RID will be populated here. | -**created_time** | CreatedTime | Yes | | -**created_by** | Optional[CreatedBy] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/MarkingCategory.md b/docs/v2/Admin/models/MarkingCategory.md deleted file mode 100644 index 5a2283c87..000000000 --- a/docs/v2/Admin/models/MarkingCategory.md +++ /dev/null @@ -1,18 +0,0 @@ -# MarkingCategory - -MarkingCategory - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**id** | MarkingCategoryId | Yes | | -**name** | MarkingCategoryName | Yes | | -**description** | Optional[str] | No | | -**category_type** | MarkingCategoryType | Yes | | -**marking_type** | MarkingType | Yes | | -**markings** | List[MarkingId] | Yes | | -**created_time** | CreatedTime | Yes | | -**created_by** | Optional[CreatedBy] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/MarkingCategoryId.md b/docs/v2/Admin/models/MarkingCategoryId.md deleted file mode 100644 index 9fc55a961..000000000 --- a/docs/v2/Admin/models/MarkingCategoryId.md +++ /dev/null @@ -1,13 +0,0 @@ -# MarkingCategoryId - -The ID of a marking category. For user-created categories, this will be a UUID. Markings associated with -Organizations are placed in a category with ID "Organization". - - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/MarkingCategoryName.md b/docs/v2/Admin/models/MarkingCategoryName.md deleted file mode 100644 index d2f1a0eef..000000000 --- a/docs/v2/Admin/models/MarkingCategoryName.md +++ /dev/null @@ -1,11 +0,0 @@ -# MarkingCategoryName - -MarkingCategoryName - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/MarkingCategoryType.md b/docs/v2/Admin/models/MarkingCategoryType.md deleted file mode 100644 index 1b4490cb9..000000000 --- a/docs/v2/Admin/models/MarkingCategoryType.md +++ /dev/null @@ -1,11 +0,0 @@ -# MarkingCategoryType - -MarkingCategoryType - -| **Value** | -| --------- | -| `"CONJUNCTIVE"` | -| `"DISJUNCTIVE"` | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/MarkingMember.md b/docs/v2/Admin/models/MarkingMember.md deleted file mode 100644 index 69e5d4d67..000000000 --- a/docs/v2/Admin/models/MarkingMember.md +++ /dev/null @@ -1,12 +0,0 @@ -# MarkingMember - -MarkingMember - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**principal_type** | PrincipalType | Yes | | -**principal_id** | PrincipalId | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/MarkingName.md b/docs/v2/Admin/models/MarkingName.md deleted file mode 100644 index a9a6a5087..000000000 --- a/docs/v2/Admin/models/MarkingName.md +++ /dev/null @@ -1,11 +0,0 @@ -# MarkingName - -MarkingName - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/MarkingRole.md b/docs/v2/Admin/models/MarkingRole.md deleted file mode 100644 index 5f6f4a2eb..000000000 --- a/docs/v2/Admin/models/MarkingRole.md +++ /dev/null @@ -1,16 +0,0 @@ -# MarkingRole - -Represents the operations that a user can perform with regards to a Marking. - * ADMINISTER: The user can add and remove members from the Marking, update Marking Role Assignments, and change Marking metadata. - * DECLASSIFY: The user can remove the Marking from resources in the platform and stop the propagation of the Marking during a transform. - * USE: The user can apply the marking to resources in the platform. - - -| **Value** | -| --------- | -| `"ADMINISTER"` | -| `"DECLASSIFY"` | -| `"USE"` | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/MarkingRoleAssignment.md b/docs/v2/Admin/models/MarkingRoleAssignment.md deleted file mode 100644 index 1bced5193..000000000 --- a/docs/v2/Admin/models/MarkingRoleAssignment.md +++ /dev/null @@ -1,13 +0,0 @@ -# MarkingRoleAssignment - -MarkingRoleAssignment - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**principal_type** | PrincipalType | Yes | | -**principal_id** | PrincipalId | Yes | | -**role** | MarkingRole | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/MarkingRoleUpdate.md b/docs/v2/Admin/models/MarkingRoleUpdate.md deleted file mode 100644 index 2650f785a..000000000 --- a/docs/v2/Admin/models/MarkingRoleUpdate.md +++ /dev/null @@ -1,12 +0,0 @@ -# MarkingRoleUpdate - -MarkingRoleUpdate - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**role** | MarkingRole | Yes | | -**principal_id** | PrincipalId | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/MarkingType.md b/docs/v2/Admin/models/MarkingType.md deleted file mode 100644 index 6b9f7f9c4..000000000 --- a/docs/v2/Admin/models/MarkingType.md +++ /dev/null @@ -1,11 +0,0 @@ -# MarkingType - -MarkingType - -| **Value** | -| --------- | -| `"MANDATORY"` | -| `"CBAC"` | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/OidcAuthenticationProtocol.md b/docs/v2/Admin/models/OidcAuthenticationProtocol.md deleted file mode 100644 index 94480a8c2..000000000 --- a/docs/v2/Admin/models/OidcAuthenticationProtocol.md +++ /dev/null @@ -1,11 +0,0 @@ -# OidcAuthenticationProtocol - -OidcAuthenticationProtocol - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["oidc"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/Organization.md b/docs/v2/Admin/models/Organization.md deleted file mode 100644 index a6759e6f4..000000000 --- a/docs/v2/Admin/models/Organization.md +++ /dev/null @@ -1,15 +0,0 @@ -# Organization - -Organization - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**rid** | OrganizationRid | Yes | | -**name** | OrganizationName | Yes | | -**description** | Optional[str] | No | | -**marking_id** | MarkingId | Yes | The ID of this Organization's underlying marking. Organization guest access can be managed by updating the membership of this Marking. | -**host** | Optional[HostName] | No | The primary host name of the Organization. This should be used when constructing URLs for users of this Organization. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/OrganizationName.md b/docs/v2/Admin/models/OrganizationName.md deleted file mode 100644 index e572e4b79..000000000 --- a/docs/v2/Admin/models/OrganizationName.md +++ /dev/null @@ -1,11 +0,0 @@ -# OrganizationName - -OrganizationName - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/OrganizationRoleAssignment.md b/docs/v2/Admin/models/OrganizationRoleAssignment.md deleted file mode 100644 index fba1ce9a0..000000000 --- a/docs/v2/Admin/models/OrganizationRoleAssignment.md +++ /dev/null @@ -1,13 +0,0 @@ -# OrganizationRoleAssignment - -OrganizationRoleAssignment - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**principal_type** | PrincipalType | Yes | | -**principal_id** | PrincipalId | Yes | | -**role_id** | RoleId | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/PreregisterGroupRequest.md b/docs/v2/Admin/models/PreregisterGroupRequest.md deleted file mode 100644 index b90d81fa2..000000000 --- a/docs/v2/Admin/models/PreregisterGroupRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# PreregisterGroupRequest - -PreregisterGroupRequest - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**name** | GroupName | Yes | | -**organizations** | List[OrganizationRid] | Yes | The RIDs of the Organizations that can view this group. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/PreregisterUserRequest.md b/docs/v2/Admin/models/PreregisterUserRequest.md deleted file mode 100644 index d69204a93..000000000 --- a/docs/v2/Admin/models/PreregisterUserRequest.md +++ /dev/null @@ -1,16 +0,0 @@ -# PreregisterUserRequest - -PreregisterUserRequest - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**username** | UserUsername | Yes | The new user's username. This must match one of the provider's supported username patterns. | -**organization** | OrganizationRid | Yes | The RID of the user's primary Organization. This may be changed when the user logs in for the first time depending on any configured Organization assignment rules. | -**given_name** | Optional[str] | No | | -**family_name** | Optional[str] | No | | -**email** | Optional[str] | No | | -**attributes** | Optional[Dict[AttributeName, AttributeValues]] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/PrincipalFilterType.md b/docs/v2/Admin/models/PrincipalFilterType.md deleted file mode 100644 index 024e83fa5..000000000 --- a/docs/v2/Admin/models/PrincipalFilterType.md +++ /dev/null @@ -1,10 +0,0 @@ -# PrincipalFilterType - -PrincipalFilterType - -| **Value** | -| --------- | -| `"queryString"` | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/ProviderId.md b/docs/v2/Admin/models/ProviderId.md deleted file mode 100644 index ec948147c..000000000 --- a/docs/v2/Admin/models/ProviderId.md +++ /dev/null @@ -1,12 +0,0 @@ -# ProviderId - -A value that uniquely identifies a User or Group in an external authentication provider. This value is determined by the external authentication provider and must be unique per Realm. - - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/RemoveEnrollmentRoleAssignmentsRequest.md b/docs/v2/Admin/models/RemoveEnrollmentRoleAssignmentsRequest.md deleted file mode 100644 index 293d23af0..000000000 --- a/docs/v2/Admin/models/RemoveEnrollmentRoleAssignmentsRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# RemoveEnrollmentRoleAssignmentsRequest - -RemoveEnrollmentRoleAssignmentsRequest - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**role_assignments** | List[RoleAssignmentUpdate] | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/RemoveGroupMembersRequest.md b/docs/v2/Admin/models/RemoveGroupMembersRequest.md deleted file mode 100644 index b50064d92..000000000 --- a/docs/v2/Admin/models/RemoveGroupMembersRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# RemoveGroupMembersRequest - -RemoveGroupMembersRequest - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**principal_ids** | List[PrincipalId] | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/RemoveMarkingMembersRequest.md b/docs/v2/Admin/models/RemoveMarkingMembersRequest.md deleted file mode 100644 index ad4200244..000000000 --- a/docs/v2/Admin/models/RemoveMarkingMembersRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# RemoveMarkingMembersRequest - -RemoveMarkingMembersRequest - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**principal_ids** | List[PrincipalId] | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/RemoveMarkingRoleAssignmentsRequest.md b/docs/v2/Admin/models/RemoveMarkingRoleAssignmentsRequest.md deleted file mode 100644 index 58b991041..000000000 --- a/docs/v2/Admin/models/RemoveMarkingRoleAssignmentsRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# RemoveMarkingRoleAssignmentsRequest - -RemoveMarkingRoleAssignmentsRequest - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**role_assignments** | List[MarkingRoleUpdate] | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/RemoveOrganizationRoleAssignmentsRequest.md b/docs/v2/Admin/models/RemoveOrganizationRoleAssignmentsRequest.md deleted file mode 100644 index 6998ba3a6..000000000 --- a/docs/v2/Admin/models/RemoveOrganizationRoleAssignmentsRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# RemoveOrganizationRoleAssignmentsRequest - -RemoveOrganizationRoleAssignmentsRequest - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**role_assignments** | List[RoleAssignmentUpdate] | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/ReplaceGroupMembershipExpirationPolicyRequest.md b/docs/v2/Admin/models/ReplaceGroupMembershipExpirationPolicyRequest.md deleted file mode 100644 index dc92ee76b..000000000 --- a/docs/v2/Admin/models/ReplaceGroupMembershipExpirationPolicyRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# ReplaceGroupMembershipExpirationPolicyRequest - -ReplaceGroupMembershipExpirationPolicyRequest - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**maximum_duration** | Optional[DurationSeconds] | No | Members in this group must be added with expirations that are less than this duration in seconds into the future from the time they are added. | -**maximum_value** | Optional[GroupMembershipExpiration] | No | Members in this group must be added with expiration times that occur before this value. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/ReplaceGroupProviderInfoRequest.md b/docs/v2/Admin/models/ReplaceGroupProviderInfoRequest.md deleted file mode 100644 index 0f6fefc9d..000000000 --- a/docs/v2/Admin/models/ReplaceGroupProviderInfoRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# ReplaceGroupProviderInfoRequest - -ReplaceGroupProviderInfoRequest - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**provider_id** | ProviderId | Yes | The ID of the Group in the external authentication provider. This value is determined by the authentication provider. At most one Group can have a given provider ID in a given Realm. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/ReplaceMarkingRequest.md b/docs/v2/Admin/models/ReplaceMarkingRequest.md deleted file mode 100644 index f2a9850b4..000000000 --- a/docs/v2/Admin/models/ReplaceMarkingRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# ReplaceMarkingRequest - -ReplaceMarkingRequest - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**name** | MarkingName | Yes | | -**description** | Optional[str] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/ReplaceOrganizationRequest.md b/docs/v2/Admin/models/ReplaceOrganizationRequest.md deleted file mode 100644 index 24173d9b9..000000000 --- a/docs/v2/Admin/models/ReplaceOrganizationRequest.md +++ /dev/null @@ -1,13 +0,0 @@ -# ReplaceOrganizationRequest - -ReplaceOrganizationRequest - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**name** | OrganizationName | Yes | | -**host** | Optional[HostName] | No | The primary host name of the Organization. This should be used when constructing URLs for users of this Organization. | -**description** | Optional[str] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/ReplaceUserProviderInfoRequest.md b/docs/v2/Admin/models/ReplaceUserProviderInfoRequest.md deleted file mode 100644 index fdd79560b..000000000 --- a/docs/v2/Admin/models/ReplaceUserProviderInfoRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# ReplaceUserProviderInfoRequest - -ReplaceUserProviderInfoRequest - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**provider_id** | ProviderId | Yes | The ID of the User in the external authentication provider. This value is determined by the authentication provider. At most one User can have a given provider ID in a given Realm. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/Role.md b/docs/v2/Admin/models/Role.md deleted file mode 100644 index d1798e363..000000000 --- a/docs/v2/Admin/models/Role.md +++ /dev/null @@ -1,15 +0,0 @@ -# Role - -Role - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**id** | RoleId | Yes | | -**display_name** | RoleDisplayName | Yes | | -**description** | RoleDescription | Yes | | -**operations** | List[str] | Yes | A list of permissions that this role has. | -**can_assigns** | List[RoleId] | Yes | A list of roles that this role inherits. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/RoleDescription.md b/docs/v2/Admin/models/RoleDescription.md deleted file mode 100644 index 5b2cf1f1b..000000000 --- a/docs/v2/Admin/models/RoleDescription.md +++ /dev/null @@ -1,11 +0,0 @@ -# RoleDescription - -RoleDescription - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/RoleDisplayName.md b/docs/v2/Admin/models/RoleDisplayName.md deleted file mode 100644 index 690b017a2..000000000 --- a/docs/v2/Admin/models/RoleDisplayName.md +++ /dev/null @@ -1,11 +0,0 @@ -# RoleDisplayName - -RoleDisplayName - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/SamlAuthenticationProtocol.md b/docs/v2/Admin/models/SamlAuthenticationProtocol.md deleted file mode 100644 index 4ece669e1..000000000 --- a/docs/v2/Admin/models/SamlAuthenticationProtocol.md +++ /dev/null @@ -1,12 +0,0 @@ -# SamlAuthenticationProtocol - -SamlAuthenticationProtocol - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**service_provider_metadata** | SamlServiceProviderMetadata | Yes | | -**type** | Literal["saml"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/SamlServiceProviderMetadata.md b/docs/v2/Admin/models/SamlServiceProviderMetadata.md deleted file mode 100644 index 3e55de1f9..000000000 --- a/docs/v2/Admin/models/SamlServiceProviderMetadata.md +++ /dev/null @@ -1,15 +0,0 @@ -# SamlServiceProviderMetadata - -Information that describes a Foundry Authentication Provider as a SAML service provider. All information listed here is generated by Foundry. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**entity_id** | str | Yes | The static SAML entity ID that represents this service provider. | -**metadata_url** | str | Yes | A public URL from which this service provider metadata can be downloaded as XML. | -**acs_urls** | List[str] | Yes | The Assertion Consumer Service (ACS) URLs for this service provider, to which the SAML identity provider redirects authentication responses. | -**logout_urls** | List[str] | Yes | The URLs for this service provider to which the SAML identity provider sends logout requests. | -**certificates** | List[CertificateInfo] | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/SearchGroupsRequest.md b/docs/v2/Admin/models/SearchGroupsRequest.md deleted file mode 100644 index 520a98639..000000000 --- a/docs/v2/Admin/models/SearchGroupsRequest.md +++ /dev/null @@ -1,13 +0,0 @@ -# SearchGroupsRequest - -SearchGroupsRequest - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**where** | GroupSearchFilter | Yes | | -**page_size** | Optional[PageSize] | No | | -**page_token** | Optional[PageToken] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/SearchGroupsResponse.md b/docs/v2/Admin/models/SearchGroupsResponse.md deleted file mode 100644 index 513f8c3cb..000000000 --- a/docs/v2/Admin/models/SearchGroupsResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# SearchGroupsResponse - -SearchGroupsResponse - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**data** | List[Group] | Yes | | -**next_page_token** | Optional[PageToken] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/SearchUsersRequest.md b/docs/v2/Admin/models/SearchUsersRequest.md deleted file mode 100644 index 713a61bb2..000000000 --- a/docs/v2/Admin/models/SearchUsersRequest.md +++ /dev/null @@ -1,13 +0,0 @@ -# SearchUsersRequest - -SearchUsersRequest - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**where** | UserSearchFilter | Yes | | -**page_size** | Optional[PageSize] | No | | -**page_token** | Optional[PageToken] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/SearchUsersResponse.md b/docs/v2/Admin/models/SearchUsersResponse.md deleted file mode 100644 index c4f559207..000000000 --- a/docs/v2/Admin/models/SearchUsersResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# SearchUsersResponse - -SearchUsersResponse - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**data** | List[User] | Yes | | -**next_page_token** | Optional[PageToken] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/User.md b/docs/v2/Admin/models/User.md deleted file mode 100644 index 3e363233f..000000000 --- a/docs/v2/Admin/models/User.md +++ /dev/null @@ -1,19 +0,0 @@ -# User - -User - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**id** | UserId | Yes | | -**username** | UserUsername | Yes | The Foundry username of the User. This is unique within the realm. | -**given_name** | Optional[str] | No | The given name of the User. | -**family_name** | Optional[str] | No | The family name (last name) of the User. | -**email** | Optional[str] | No | The email at which to contact a User. Multiple users may have the same email address. | -**realm** | Realm | Yes | | -**organization** | Optional[OrganizationRid] | No | The RID of the user's primary Organization. This will be blank for third-party application service users. | -**status** | UserStatus | Yes | The current status of the user. | -**attributes** | Dict[AttributeName, AttributeValues] | Yes | A map of the User's attributes. Attributes prefixed with "multipass:" are reserved for internal use by Foundry and are subject to change. Additional attributes may be configured by Foundry administrators in Control Panel and populated by the User's SSO provider upon login. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/UserProviderInfo.md b/docs/v2/Admin/models/UserProviderInfo.md deleted file mode 100644 index 617ec2b8c..000000000 --- a/docs/v2/Admin/models/UserProviderInfo.md +++ /dev/null @@ -1,11 +0,0 @@ -# UserProviderInfo - -UserProviderInfo - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**provider_id** | ProviderId | Yes | The ID of the User in the external authentication provider. This value is determined by the authentication provider. At most one User can have a given provider ID in a given Realm. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/UserSearchFilter.md b/docs/v2/Admin/models/UserSearchFilter.md deleted file mode 100644 index 1e60cca22..000000000 --- a/docs/v2/Admin/models/UserSearchFilter.md +++ /dev/null @@ -1,12 +0,0 @@ -# UserSearchFilter - -UserSearchFilter - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | PrincipalFilterType | Yes | | -**value** | str | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/UserUsername.md b/docs/v2/Admin/models/UserUsername.md deleted file mode 100644 index ace9359f3..000000000 --- a/docs/v2/Admin/models/UserUsername.md +++ /dev/null @@ -1,11 +0,0 @@ -# UserUsername - -The Foundry username of the User. This is unique within the realm. - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/Agent.md b/docs/v2/AipAgents/Agent.md deleted file mode 100644 index eba7c93dd..000000000 --- a/docs/v2/AipAgents/Agent.md +++ /dev/null @@ -1,116 +0,0 @@ -# Agent - -Method | HTTP request | Release Stage | -------------- | ------------- | ----- | -[**all_sessions**](#all_sessions) | **GET** /v2/aipAgents/agents/allSessions | Public Beta | -[**get**](#get) | **GET** /v2/aipAgents/agents/{agentRid} | Public Beta | - -# **all_sessions** -List all conversation sessions between the calling user and all accessible Agents that were created by this client. -Sessions are returned in order of most recently updated first. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**page_size** | Optional[PageSize] | The maximum number of sessions to return in a single page. The maximum allowed value is 100. Defaults to 100 if not specified. | [optional] | -**page_token** | Optional[PageToken] | | [optional] | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**AgentsSessionsPage** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# Optional[PageSize] | The maximum number of sessions to return in a single page. The maximum allowed value is 100. Defaults to 100 if not specified. -page_size = None -# Optional[PageToken] -page_token = None -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - for agent in client.aip_agents.Agent.all_sessions( - page_size=page_size, page_token=page_token, preview=preview - ): - pprint(agent) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Agent.all_sessions: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | AgentsSessionsPage | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **get** -Get details for an AIP Agent. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**agent_rid** | AgentRid | An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | -**version** | Optional[AgentVersionString] | The version of the Agent to retrieve. If not specified, the latest published version will be returned. | [optional] | - -### Return type -**Agent** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# AgentRid | An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). -agent_rid = "ri.aip-agents..agent.732cd5b4-7ca7-4219-aabb-6e976faf63b1" -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None -# Optional[AgentVersionString] | The version of the Agent to retrieve. If not specified, the latest published version will be returned. -version = None - - -try: - api_response = client.aip_agents.Agent.get(agent_rid, preview=preview, version=version) - print("The get response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Agent.get: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | Agent | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - diff --git a/docs/v2/AipAgents/AgentVersion.md b/docs/v2/AipAgents/AgentVersion.md deleted file mode 100644 index 49d74fae6..000000000 --- a/docs/v2/AipAgents/AgentVersion.md +++ /dev/null @@ -1,121 +0,0 @@ -# AgentVersion - -Method | HTTP request | Release Stage | -------------- | ------------- | ----- | -[**get**](#get) | **GET** /v2/aipAgents/agents/{agentRid}/agentVersions/{agentVersionString} | Public Beta | -[**list**](#list) | **GET** /v2/aipAgents/agents/{agentRid}/agentVersions | Public Beta | - -# **get** -Get version details for an AIP Agent. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**agent_rid** | AgentRid | An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). | | -**agent_version_string** | AgentVersionString | The semantic version of the Agent, formatted as "majorVersion.minorVersion". | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**AgentVersion** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# AgentRid | An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). -agent_rid = "ri.aip-agents..agent.732cd5b4-7ca7-4219-aabb-6e976faf63b1" -# AgentVersionString | The semantic version of the Agent, formatted as "majorVersion.minorVersion". -agent_version_string = "1.0" -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.aip_agents.Agent.AgentVersion.get( - agent_rid, agent_version_string, preview=preview - ) - print("The get response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling AgentVersion.get: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | AgentVersion | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **list** -List all versions for an AIP Agent. -Versions are returned in descending order, by most recent versions first. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**agent_rid** | AgentRid | An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). | | -**page_size** | Optional[PageSize] | The page size to use for the endpoint. | [optional] | -**page_token** | Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. | [optional] | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**ListAgentVersionsResponse** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# AgentRid | An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). -agent_rid = "ri.aip-agents..agent.732cd5b4-7ca7-4219-aabb-6e976faf63b1" -# Optional[PageSize] | The page size to use for the endpoint. -page_size = None -# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. -page_token = None -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - for agent_version in client.aip_agents.Agent.AgentVersion.list( - agent_rid, page_size=page_size, page_token=page_token, preview=preview - ): - pprint(agent_version) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling AgentVersion.list: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | ListAgentVersionsResponse | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - diff --git a/docs/v2/AipAgents/Content.md b/docs/v2/AipAgents/Content.md deleted file mode 100644 index edb727185..000000000 --- a/docs/v2/AipAgents/Content.md +++ /dev/null @@ -1,61 +0,0 @@ -# Content - -Method | HTTP request | Release Stage | -------------- | ------------- | ----- | -[**get**](#get) | **GET** /v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}/content | Public Beta | - -# **get** -Get the conversation content for a session between the calling user and an Agent. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**agent_rid** | AgentRid | An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). | | -**session_rid** | SessionRid | The Resource Identifier (RID) of the conversation session. | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**Content** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# AgentRid | An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). -agent_rid = "ri.aip-agents..agent.732cd5b4-7ca7-4219-aabb-6e976faf63b1" -# SessionRid | The Resource Identifier (RID) of the conversation session. -session_rid = "ri.aip-agents..session.292db3b2-b653-4de6-971c-7e97a7b881d6" -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.aip_agents.Agent.Session.Content.get( - agent_rid, session_rid, preview=preview - ) - print("The get response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Content.get: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | Content | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - diff --git a/docs/v2/AipAgents/Session.md b/docs/v2/AipAgents/Session.md deleted file mode 100644 index cf51b712d..000000000 --- a/docs/v2/AipAgents/Session.md +++ /dev/null @@ -1,614 +0,0 @@ -# Session - -Method | HTTP request | Release Stage | -------------- | ------------- | ----- | -[**blocking_continue**](#blocking_continue) | **POST** /v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}/blockingContinue | Public Beta | -[**cancel**](#cancel) | **POST** /v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}/cancel | Public Beta | -[**create**](#create) | **POST** /v2/aipAgents/agents/{agentRid}/sessions | Public Beta | -[**delete**](#delete) | **DELETE** /v2/aipAgents/agents/{agentRid}/sessions/{sessionRid} | Public Beta | -[**get**](#get) | **GET** /v2/aipAgents/agents/{agentRid}/sessions/{sessionRid} | Public Beta | -[**list**](#list) | **GET** /v2/aipAgents/agents/{agentRid}/sessions | Public Beta | -[**rag_context**](#rag_context) | **PUT** /v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}/ragContext | Public Beta | -[**streaming_continue**](#streaming_continue) | **POST** /v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}/streamingContinue | Public Beta | -[**update_title**](#update_title) | **PUT** /v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}/updateTitle | Public Beta | - -# **blocking_continue** -Continue a conversation session with an Agent, or add the first exchange to a session after creation. -Adds a new exchange to the session with the provided inputs, and generates a response from the Agent. -Blocks on returning the result of the added exchange until the response is fully generated. -Streamed responses are also supported; see `streamingContinue` for details. -Concurrent requests to continue the same session are not supported. -Clients should wait to receive a response before sending the next message. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**agent_rid** | AgentRid | An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). | | -**session_rid** | SessionRid | The Resource Identifier (RID) of the conversation session. | | -**parameter_inputs** | Dict[ParameterId, ParameterValue] | Any supplied values for [application variables](https://palantir.com/docs/foundry/agent-studio/application-state/) to pass to the Agent for the exchange. | | -**user_input** | UserTextInput | The user message for the Agent to respond to. | | -**contexts_override** | Optional[List[InputContext]] | If set, automatic [context retrieval](https://palantir.com/docs/foundry/agent-studio/retrieval-context/) is skipped and the list of specified context is provided to the Agent instead. If omitted, relevant context for the user message is automatically retrieved and included in the prompt, based on data sources configured on the Agent for the session. | [optional] | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | -**session_trace_id** | Optional[SessionTraceId] | The unique identifier to use for this continue session trace. By generating and passing this ID to the `blockingContinue` endpoint, clients can use this trace ID to separately load details of the trace used to generate a result, while the result is in progress. If omitted, it will be generated automatically. Clients can check the generated ID by inspecting the `sessionTraceId` in the `SessionExchangeResult`. | [optional] | - -### Return type -**SessionExchangeResult** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# AgentRid | An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). -agent_rid = "ri.aip-agents..agent.732cd5b4-7ca7-4219-aabb-6e976faf63b1" -# SessionRid | The Resource Identifier (RID) of the conversation session. -session_rid = "ri.aip-agents..session.292db3b2-b653-4de6-971c-7e97a7b881d6" -# Dict[ParameterId, ParameterValue] | Any supplied values for [application variables](https://palantir.com/docs/foundry/agent-studio/application-state/) to pass to the Agent for the exchange. -parameter_inputs = { - "currentCustomerOrders": { - "type": "objectSet", - "ontology": "example-ontology", - "objectSet": { - "type": "filter", - "objectSet": {"type": "base", "objectType": "customerOrder"}, - "where": {"type": "eq", "field": "customerId", "value": "123abc"}, - }, - } -} -# UserTextInput | The user message for the Agent to respond to. -user_input = {"text": "What is the status of my order?"} -# Optional[List[InputContext]] | If set, automatic [context retrieval](https://palantir.com/docs/foundry/agent-studio/retrieval-context/) is skipped and the list of specified context is provided to the Agent instead. If omitted, relevant context for the user message is automatically retrieved and included in the prompt, based on data sources configured on the Agent for the session. -contexts_override = None -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None -# Optional[SessionTraceId] | The unique identifier to use for this continue session trace. By generating and passing this ID to the `blockingContinue` endpoint, clients can use this trace ID to separately load details of the trace used to generate a result, while the result is in progress. If omitted, it will be generated automatically. Clients can check the generated ID by inspecting the `sessionTraceId` in the `SessionExchangeResult`. -session_trace_id = "12345678-1234-5678-1234-123456789abc" - - -try: - api_response = client.aip_agents.Agent.Session.blocking_continue( - agent_rid, - session_rid, - parameter_inputs=parameter_inputs, - user_input=user_input, - contexts_override=contexts_override, - preview=preview, - session_trace_id=session_trace_id, - ) - print("The blocking_continue response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Session.blocking_continue: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | SessionExchangeResult | The result of the added exchange for the session. | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **cancel** -Cancel an in-progress streamed exchange with an Agent which was initiated with `streamingContinue`. -Canceling an exchange allows clients to prevent the exchange from being added to the session, or to provide a response to replace the Agent-generated response. -Note that canceling an exchange does not terminate the stream returned by `streamingContinue`; clients should close the stream on triggering the cancellation request to stop reading from the stream. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**agent_rid** | AgentRid | An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). | | -**session_rid** | SessionRid | The Resource Identifier (RID) of the conversation session. | | -**message_id** | MessageId | The identifier for the in-progress exchange to cancel. This should match the `messageId` which was provided when initiating the exchange with `streamingContinue`. | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | -**response** | Optional[AgentMarkdownResponse] | When specified, the exchange is added to the session with the client-provided response as the result. When omitted, the exchange is not added to the session. | [optional] | - -### Return type -**CancelSessionResponse** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# AgentRid | An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). -agent_rid = "ri.aip-agents..agent.732cd5b4-7ca7-4219-aabb-6e976faf63b1" -# SessionRid | The Resource Identifier (RID) of the conversation session. -session_rid = "ri.aip-agents..session.292db3b2-b653-4de6-971c-7e97a7b881d6" -# MessageId | The identifier for the in-progress exchange to cancel. This should match the `messageId` which was provided when initiating the exchange with `streamingContinue`. -message_id = "00f8412a-c29d-4063-a417-8052825285a5" -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None -# Optional[AgentMarkdownResponse] | When specified, the exchange is added to the session with the client-provided response as the result. When omitted, the exchange is not added to the session. -response = "The status of your order is **In Transit**." - - -try: - api_response = client.aip_agents.Agent.Session.cancel( - agent_rid, session_rid, message_id=message_id, preview=preview, response=response - ) - print("The cancel response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Session.cancel: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | CancelSessionResponse | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **create** -Create a new conversation session between the calling user and an Agent. -Use `blockingContinue` or `streamingContinue` to start adding exchanges to the session. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**agent_rid** | AgentRid | An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). | | -**agent_version** | Optional[AgentVersionString] | The version of the Agent associated with the session. This can be set by clients on session creation. If not specified, defaults to use the latest published version of the Agent at session creation time. | [optional] | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**Session** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# AgentRid | An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). -agent_rid = "ri.aip-agents..agent.732cd5b4-7ca7-4219-aabb-6e976faf63b1" -# Optional[AgentVersionString] | The version of the Agent associated with the session. This can be set by clients on session creation. If not specified, defaults to use the latest published version of the Agent at session creation time. -agent_version = "1.0" -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.aip_agents.Agent.Session.create( - agent_rid, agent_version=agent_version, preview=preview - ) - print("The create response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Session.create: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | Session | The created Session | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **delete** -Delete a conversation session between the calling user and an Agent. -Once deleted, the session can no longer be accessed and will not appear in session lists. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**agent_rid** | AgentRid | An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). | | -**session_rid** | SessionRid | The Resource Identifier (RID) of the conversation session. | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**None** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# AgentRid | An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). -agent_rid = "ri.aip-agents..agent.732cd5b4-7ca7-4219-aabb-6e976faf63b1" -# SessionRid | The Resource Identifier (RID) of the conversation session. -session_rid = "ri.aip-agents..session.292db3b2-b653-4de6-971c-7e97a7b881d6" -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.aip_agents.Agent.Session.delete(agent_rid, session_rid, preview=preview) - print("The delete response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Session.delete: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**204** | None | | None | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **get** -Get the details of a conversation session between the calling user and an Agent. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**agent_rid** | AgentRid | An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). | | -**session_rid** | SessionRid | The Resource Identifier (RID) of the conversation session. | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**Session** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# AgentRid | An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). -agent_rid = "ri.aip-agents..agent.732cd5b4-7ca7-4219-aabb-6e976faf63b1" -# SessionRid | The Resource Identifier (RID) of the conversation session. -session_rid = "ri.aip-agents..session.292db3b2-b653-4de6-971c-7e97a7b881d6" -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.aip_agents.Agent.Session.get(agent_rid, session_rid, preview=preview) - print("The get response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Session.get: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | Session | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **list** -List all conversation sessions between the calling user and an Agent that was created by this client. -This does not list sessions for the user created by other clients. -For example, any sessions created by the user in AIP Agent Studio will not be listed here. -Sessions are returned in order of most recently updated first. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**agent_rid** | AgentRid | An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). | | -**page_size** | Optional[PageSize] | The page size to use for the endpoint. | [optional] | -**page_token** | Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. | [optional] | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**ListSessionsResponse** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# AgentRid | An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). -agent_rid = "ri.aip-agents..agent.732cd5b4-7ca7-4219-aabb-6e976faf63b1" -# Optional[PageSize] | The page size to use for the endpoint. -page_size = None -# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. -page_token = None -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - for session in client.aip_agents.Agent.Session.list( - agent_rid, page_size=page_size, page_token=page_token, preview=preview - ): - pprint(session) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Session.list: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | ListSessionsResponse | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **rag_context** -Retrieve relevant [context](https://palantir.com/docs/foundry/agent-studio/core-concepts/#retrieval-context) for a user message from the data sources configured for the session. -This allows clients to pre-retrieve context for a user message before sending it to the Agent with the `contextsOverride` option when continuing a session, to allow any pre-processing of the context before sending it to the Agent. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**agent_rid** | AgentRid | An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). | | -**session_rid** | SessionRid | The Resource Identifier (RID) of the conversation session. | | -**parameter_inputs** | Dict[ParameterId, ParameterValue] | Any values for [application variables](https://palantir.com/docs/foundry/agent-studio/application-state/) to use for the context retrieval. | | -**user_input** | UserTextInput | The user message to retrieve relevant context for from the configured Agent data sources. | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**AgentSessionRagContextResponse** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# AgentRid | An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). -agent_rid = "ri.aip-agents..agent.732cd5b4-7ca7-4219-aabb-6e976faf63b1" -# SessionRid | The Resource Identifier (RID) of the conversation session. -session_rid = "ri.aip-agents..session.292db3b2-b653-4de6-971c-7e97a7b881d6" -# Dict[ParameterId, ParameterValue] | Any values for [application variables](https://palantir.com/docs/foundry/agent-studio/application-state/) to use for the context retrieval. -parameter_inputs = {"customerName": {"type": "string", "value": "Titan Technologies"}} -# UserTextInput | The user message to retrieve relevant context for from the configured Agent data sources. -user_input = {"text": "What is the status of my order?"} -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.aip_agents.Agent.Session.rag_context( - agent_rid, - session_rid, - parameter_inputs=parameter_inputs, - user_input=user_input, - preview=preview, - ) - print("The rag_context response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Session.rag_context: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | AgentSessionRagContextResponse | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **streaming_continue** -Continue a conversation session with an Agent, or add the first exchange to a session after creation. -Adds a new exchange to the session with the provided inputs, and generates a response from the Agent. -Returns a stream of the Agent response text (formatted using markdown) for clients to consume as the response is generated. -On completion of the streamed response, clients can load the full details of the exchange that was added to the session by reloading the session content. -Streamed exchanges also support cancellation; see `cancel` for details. -Concurrent requests to continue the same session are not supported. -Clients should wait to receive a response, or cancel the in-progress exchange, before sending the next message. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**agent_rid** | AgentRid | An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). | | -**session_rid** | SessionRid | The Resource Identifier (RID) of the conversation session. | | -**parameter_inputs** | Dict[ParameterId, ParameterValue] | Any supplied values for [application variables](https://palantir.com/docs/foundry/agent-studio/application-state/) to pass to the Agent for the exchange. | | -**user_input** | UserTextInput | The user message for the Agent to respond to. | | -**contexts_override** | Optional[List[InputContext]] | If set, automatic [context](https://palantir.com/docs/foundry/agent-studio/retrieval-context/) retrieval is skipped and the list of specified context is provided to the Agent instead. If omitted, relevant context for the user message is automatically retrieved and included in the prompt, based on data sources configured on the Agent for the session. | [optional] | -**message_id** | Optional[MessageId] | A client-generated Universally Unique Identifier (UUID) to identify the message, which the client can use to cancel the exchange before the streaming response is complete. | [optional] | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | -**session_trace_id** | Optional[SessionTraceId] | The unique identifier to use for this continue session trace. By generating and passing this ID to the `streamingContinue` endpoint, clients can use this trace ID to separately load details of the trace used to generate a result, while the result is in progress. If omitted, it will be generated automatically. Clients can check the generated ID by inspecting the `sessionTraceId` in the `SessionExchangeResult`, which can be loaded via the `getContent` endpoint. | [optional] | - -### Return type -**bytes** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# AgentRid | An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). -agent_rid = "ri.aip-agents..agent.732cd5b4-7ca7-4219-aabb-6e976faf63b1" -# SessionRid | The Resource Identifier (RID) of the conversation session. -session_rid = "ri.aip-agents..session.292db3b2-b653-4de6-971c-7e97a7b881d6" -# Dict[ParameterId, ParameterValue] | Any supplied values for [application variables](https://palantir.com/docs/foundry/agent-studio/application-state/) to pass to the Agent for the exchange. -parameter_inputs = { - "currentCustomerOrders": { - "type": "objectSet", - "ontology": "example-ontology", - "objectSet": { - "type": "filter", - "objectSet": {"type": "base", "objectType": "customerOrder"}, - "where": {"type": "eq", "field": "customerId", "value": "123abc"}, - }, - } -} -# UserTextInput | The user message for the Agent to respond to. -user_input = {"text": "What is the status of my order?"} -# Optional[List[InputContext]] | If set, automatic [context](https://palantir.com/docs/foundry/agent-studio/retrieval-context/) retrieval is skipped and the list of specified context is provided to the Agent instead. If omitted, relevant context for the user message is automatically retrieved and included in the prompt, based on data sources configured on the Agent for the session. -contexts_override = None -# Optional[MessageId] | A client-generated Universally Unique Identifier (UUID) to identify the message, which the client can use to cancel the exchange before the streaming response is complete. -message_id = "00f8412a-c29d-4063-a417-8052825285a5" -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None -# Optional[SessionTraceId] | The unique identifier to use for this continue session trace. By generating and passing this ID to the `streamingContinue` endpoint, clients can use this trace ID to separately load details of the trace used to generate a result, while the result is in progress. If omitted, it will be generated automatically. Clients can check the generated ID by inspecting the `sessionTraceId` in the `SessionExchangeResult`, which can be loaded via the `getContent` endpoint. -session_trace_id = "12345678-1234-5678-1234-123456789abc" - - -try: - api_response = client.aip_agents.Agent.Session.streaming_continue( - agent_rid, - session_rid, - parameter_inputs=parameter_inputs, - user_input=user_input, - contexts_override=contexts_override, - message_id=message_id, - preview=preview, - session_trace_id=session_trace_id, - ) - print("The streaming_continue response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Session.streaming_continue: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | bytes | | application/octet-stream | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **update_title** -Update the title for a session. -Use this to set a custom title for a session to help identify it in the list of sessions with an Agent. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**agent_rid** | AgentRid | An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). | | -**session_rid** | SessionRid | The Resource Identifier (RID) of the conversation session. | | -**title** | str | The new title for the session. The maximum title length is 200 characters. Titles are truncated if they exceed this length. | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**None** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# AgentRid | An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). -agent_rid = "ri.aip-agents..agent.732cd5b4-7ca7-4219-aabb-6e976faf63b1" -# SessionRid | The Resource Identifier (RID) of the conversation session. -session_rid = "ri.aip-agents..session.292db3b2-b653-4de6-971c-7e97a7b881d6" -# str | The new title for the session. The maximum title length is 200 characters. Titles are truncated if they exceed this length. -title = "Order status 02/01" -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.aip_agents.Agent.Session.update_title( - agent_rid, session_rid, title=title, preview=preview - ) - print("The update_title response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Session.update_title: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**204** | None | | None | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - diff --git a/docs/v2/AipAgents/SessionTrace.md b/docs/v2/AipAgents/SessionTrace.md deleted file mode 100644 index 7524a666f..000000000 --- a/docs/v2/AipAgents/SessionTrace.md +++ /dev/null @@ -1,67 +0,0 @@ -# SessionTrace - -Method | HTTP request | Release Stage | -------------- | ------------- | ----- | -[**get**](#get) | **GET** /v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}/sessionTraces/{sessionTraceId} | Public Beta | - -# **get** -Get the trace of an Agent response. The trace lists the sequence of steps that an Agent took to arrive at -an answer. For example, a trace may include steps such as context retrieval and tool calls. Clients should -poll this endpoint to check the realtime progress of a response until the trace is completed. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**agent_rid** | AgentRid | An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). | | -**session_rid** | SessionRid | The Resource Identifier (RID) of the conversation session. | | -**session_trace_id** | SessionTraceId | The unique identifier for the trace. | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**SessionTrace** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# AgentRid | An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). -agent_rid = "ri.aip-agents..agent.732cd5b4-7ca7-4219-aabb-6e976faf63b1" -# SessionRid | The Resource Identifier (RID) of the conversation session. -session_rid = "ri.aip-agents..session.292db3b2-b653-4de6-971c-7e97a7b881d6" -# SessionTraceId | The unique identifier for the trace. -session_trace_id = None -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.aip_agents.Agent.Session.SessionTrace.get( - agent_rid, session_rid, session_trace_id, preview=preview - ) - print("The get response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling SessionTrace.get: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | SessionTrace | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - diff --git a/docs/v2/AipAgents/models/Agent.md b/docs/v2/AipAgents/models/Agent.md deleted file mode 100644 index d60afff26..000000000 --- a/docs/v2/AipAgents/models/Agent.md +++ /dev/null @@ -1,14 +0,0 @@ -# Agent - -Agent - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**rid** | AgentRid | Yes | An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). | -**version** | AgentVersionString | Yes | The version of this instance of the Agent. | -**metadata** | AgentMetadata | Yes | | -**parameters** | Dict[ParameterId, Parameter] | Yes | The types and names of variables configured for the Agent in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/) in the [application state](https://palantir.com/docs/foundry/agent-studio/application-state/). These variables can be used to send custom values in prompts sent to an Agent to customize and control the Agent's behavior. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/AgentMarkdownResponse.md b/docs/v2/AipAgents/models/AgentMarkdownResponse.md deleted file mode 100644 index 6d78d1b42..000000000 --- a/docs/v2/AipAgents/models/AgentMarkdownResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# AgentMarkdownResponse - -The final answer for an exchange. Responses are formatted using markdown. - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/AgentMetadata.md b/docs/v2/AipAgents/models/AgentMetadata.md deleted file mode 100644 index 818873d61..000000000 --- a/docs/v2/AipAgents/models/AgentMetadata.md +++ /dev/null @@ -1,14 +0,0 @@ -# AgentMetadata - -Metadata for an Agent. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**display_name** | str | Yes | The name of the Agent. | -**description** | Optional[str] | No | The description for the Agent. | -**input_placeholder** | Optional[str] | No | The default text to show as the placeholder input for chats with the Agent. | -**suggested_prompts** | List[str] | Yes | Prompts to show to the user as example messages to start a conversation with the Agent. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/AgentRid.md b/docs/v2/AipAgents/models/AgentRid.md deleted file mode 100644 index 19b731c8a..000000000 --- a/docs/v2/AipAgents/models/AgentRid.md +++ /dev/null @@ -1,11 +0,0 @@ -# AgentRid - -An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). - -## Type -```python -RID -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/AgentSessionRagContextResponse.md b/docs/v2/AipAgents/models/AgentSessionRagContextResponse.md deleted file mode 100644 index 62c016c42..000000000 --- a/docs/v2/AipAgents/models/AgentSessionRagContextResponse.md +++ /dev/null @@ -1,13 +0,0 @@ -# AgentSessionRagContextResponse - -Context retrieved from an Agent's configured context data sources which was relevant to the supplied user message. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**object_contexts** | List[ObjectContext] | Yes | | -**function_retrieved_contexts** | List[FunctionRetrievedContext] | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/AgentVersion.md b/docs/v2/AipAgents/models/AgentVersion.md deleted file mode 100644 index 224c463c4..000000000 --- a/docs/v2/AipAgents/models/AgentVersion.md +++ /dev/null @@ -1,12 +0,0 @@ -# AgentVersion - -AgentVersion - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**string** | AgentVersionString | Yes | The semantic version of the Agent, formatted as "majorVersion.minorVersion". | -**version** | AgentVersionDetails | Yes | Semantic version details of the Agent. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/AgentVersionDetails.md b/docs/v2/AipAgents/models/AgentVersionDetails.md deleted file mode 100644 index b1bfe03db..000000000 --- a/docs/v2/AipAgents/models/AgentVersionDetails.md +++ /dev/null @@ -1,12 +0,0 @@ -# AgentVersionDetails - -Semantic version details for an Agent. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**major** | int | Yes | The major version of the Agent. Incremented every time the Agent is published. | -**minor** | int | Yes | The minor version of the Agent. Incremented every time the Agent is saved. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/AgentVersionString.md b/docs/v2/AipAgents/models/AgentVersionString.md deleted file mode 100644 index c33ef915e..000000000 --- a/docs/v2/AipAgents/models/AgentVersionString.md +++ /dev/null @@ -1,11 +0,0 @@ -# AgentVersionString - -The semantic version of the Agent, formatted as "majorVersion.minorVersion". - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/AgentsSessionsPage.md b/docs/v2/AipAgents/models/AgentsSessionsPage.md deleted file mode 100644 index 7f51b9a76..000000000 --- a/docs/v2/AipAgents/models/AgentsSessionsPage.md +++ /dev/null @@ -1,14 +0,0 @@ -# AgentsSessionsPage - -A page of results for sessions across all accessible Agents for the calling user. -Sessions are returned in order of most recently updated first. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**next_page_token** | Optional[PageToken] | No | The page token that should be used when requesting the next page of results. Empty if there are no more results to retrieve. | -**data** | List[Session] | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/BlockingContinueSessionRequest.md b/docs/v2/AipAgents/models/BlockingContinueSessionRequest.md deleted file mode 100644 index 5922eeb98..000000000 --- a/docs/v2/AipAgents/models/BlockingContinueSessionRequest.md +++ /dev/null @@ -1,14 +0,0 @@ -# BlockingContinueSessionRequest - -BlockingContinueSessionRequest - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**user_input** | UserTextInput | Yes | The user message for the Agent to respond to. | -**parameter_inputs** | Dict[ParameterId, ParameterValue] | Yes | Any supplied values for [application variables](https://palantir.com/docs/foundry/agent-studio/application-state/) to pass to the Agent for the exchange. | -**contexts_override** | Optional[List[InputContext]] | No | If set, automatic [context retrieval](https://palantir.com/docs/foundry/agent-studio/retrieval-context/) is skipped and the list of specified context is provided to the Agent instead. If omitted, relevant context for the user message is automatically retrieved and included in the prompt, based on data sources configured on the Agent for the session. | -**session_trace_id** | Optional[SessionTraceId] | No | The unique identifier to use for this continue session trace. By generating and passing this ID to the `blockingContinue` endpoint, clients can use this trace ID to separately load details of the trace used to generate a result, while the result is in progress. If omitted, it will be generated automatically. Clients can check the generated ID by inspecting the `sessionTraceId` in the `SessionExchangeResult`. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/CancelSessionRequest.md b/docs/v2/AipAgents/models/CancelSessionRequest.md deleted file mode 100644 index a36a94eed..000000000 --- a/docs/v2/AipAgents/models/CancelSessionRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# CancelSessionRequest - -CancelSessionRequest - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**message_id** | MessageId | Yes | The identifier for the in-progress exchange to cancel. This should match the `messageId` which was provided when initiating the exchange with `streamingContinue`. | -**response** | Optional[AgentMarkdownResponse] | No | When specified, the exchange is added to the session with the client-provided response as the result. When omitted, the exchange is not added to the session. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/CancelSessionResponse.md b/docs/v2/AipAgents/models/CancelSessionResponse.md deleted file mode 100644 index 9b3359fb1..000000000 --- a/docs/v2/AipAgents/models/CancelSessionResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# CancelSessionResponse - -CancelSessionResponse - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**result** | Optional[SessionExchangeResult] | No | If the `response` field was specified, this returns the result that was added to the session for the canceled exchange, with the client-provided response. If no `response` was specified in the request, this returns an empty response, as no exchange was added to the session. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/Content.md b/docs/v2/AipAgents/models/Content.md deleted file mode 100644 index 186faeef7..000000000 --- a/docs/v2/AipAgents/models/Content.md +++ /dev/null @@ -1,11 +0,0 @@ -# Content - -Content - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**exchanges** | List[SessionExchange] | Yes | The conversation history for the session, represented as a list of exchanges. Each exchange represents an initiating message from the user and the Agent's response. Exchanges are returned in chronological order, starting with the first exchange. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/CreateSessionRequest.md b/docs/v2/AipAgents/models/CreateSessionRequest.md deleted file mode 100644 index cb1f98f47..000000000 --- a/docs/v2/AipAgents/models/CreateSessionRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# CreateSessionRequest - -CreateSessionRequest - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**agent_version** | Optional[AgentVersionString] | No | The version of the Agent associated with the session. This can be set by clients on session creation. If not specified, defaults to use the latest published version of the Agent at session creation time. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/FailureToolCallOutput.md b/docs/v2/AipAgents/models/FailureToolCallOutput.md deleted file mode 100644 index bd8dc2771..000000000 --- a/docs/v2/AipAgents/models/FailureToolCallOutput.md +++ /dev/null @@ -1,12 +0,0 @@ -# FailureToolCallOutput - -The failed output of a tool call. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**correction_message** | str | Yes | The correction message returned by the tool if the tool call was not successful. This is a message that the tool returned to the Agent, which may be used to correct the Agent's input to the tool. | -**type** | Literal["failure"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/FunctionRetrievedContext.md b/docs/v2/AipAgents/models/FunctionRetrievedContext.md deleted file mode 100644 index 752bc0bcb..000000000 --- a/docs/v2/AipAgents/models/FunctionRetrievedContext.md +++ /dev/null @@ -1,15 +0,0 @@ -# FunctionRetrievedContext - -Context retrieved from running a function to include as additional context in the prompt to the Agent. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**function_rid** | FunctionRid | Yes | | -**function_version** | FunctionVersion | Yes | | -**retrieved_prompt** | str | Yes | String content returned from a context retrieval function. | -**type** | Literal["functionRetrievedContext"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/GetRagContextForSessionRequest.md b/docs/v2/AipAgents/models/GetRagContextForSessionRequest.md deleted file mode 100644 index 91fbb6e83..000000000 --- a/docs/v2/AipAgents/models/GetRagContextForSessionRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetRagContextForSessionRequest - -GetRagContextForSessionRequest - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**user_input** | UserTextInput | Yes | The user message to retrieve relevant context for from the configured Agent data sources. | -**parameter_inputs** | Dict[ParameterId, ParameterValue] | Yes | Any values for [application variables](https://palantir.com/docs/foundry/agent-studio/application-state/) to use for the context retrieval. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/InputContext.md b/docs/v2/AipAgents/models/InputContext.md deleted file mode 100644 index 91fbb82ec..000000000 --- a/docs/v2/AipAgents/models/InputContext.md +++ /dev/null @@ -1,17 +0,0 @@ -# InputContext - -Custom retrieved [context](https://palantir.com/docs/foundry/agent-studio/retrieval-context/) to provide to an Agent for continuing a session. - - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -FunctionRetrievedContext | functionRetrievedContext -ObjectContext | objectContext - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/ListAgentVersionsResponse.md b/docs/v2/AipAgents/models/ListAgentVersionsResponse.md deleted file mode 100644 index db4f81c55..000000000 --- a/docs/v2/AipAgents/models/ListAgentVersionsResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListAgentVersionsResponse - -ListAgentVersionsResponse - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**data** | List[AgentVersion] | Yes | | -**next_page_token** | Optional[PageToken] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/ListSessionsResponse.md b/docs/v2/AipAgents/models/ListSessionsResponse.md deleted file mode 100644 index 9583b80de..000000000 --- a/docs/v2/AipAgents/models/ListSessionsResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListSessionsResponse - -ListSessionsResponse - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**data** | List[Session] | Yes | | -**next_page_token** | Optional[PageToken] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/MessageId.md b/docs/v2/AipAgents/models/MessageId.md deleted file mode 100644 index 87a49aeec..000000000 --- a/docs/v2/AipAgents/models/MessageId.md +++ /dev/null @@ -1,13 +0,0 @@ -# MessageId - -An ephemeral client-generated Universally Unique Identifier (UUID) to identify a message for streamed session responses. -This can be used by clients to cancel a streamed exchange. - - -## Type -```python -UUID -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/ObjectContext.md b/docs/v2/AipAgents/models/ObjectContext.md deleted file mode 100644 index 0ae7fb800..000000000 --- a/docs/v2/AipAgents/models/ObjectContext.md +++ /dev/null @@ -1,14 +0,0 @@ -# ObjectContext - -Details of relevant retrieved object instances for a user's message to include as additional context in the prompt to the Agent. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**object_rids** | List[ObjectRid] | Yes | The RIDs of the relevant object instances to include in the prompt. | -**property_type_rids** | List[PropertyTypeRid] | Yes | The RIDs of the property types for the given objects to include in the prompt. | -**type** | Literal["objectContext"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/ObjectSetParameter.md b/docs/v2/AipAgents/models/ObjectSetParameter.md deleted file mode 100644 index 5493b8106..000000000 --- a/docs/v2/AipAgents/models/ObjectSetParameter.md +++ /dev/null @@ -1,12 +0,0 @@ -# ObjectSetParameter - -ObjectSetParameter - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**expected_object_types** | List[ObjectTypeId] | Yes | The types of objects that are expected in ObjectSet values passed for this variable. | -**type** | Literal["objectSet"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/ObjectSetParameterValue.md b/docs/v2/AipAgents/models/ObjectSetParameterValue.md deleted file mode 100644 index 86641488e..000000000 --- a/docs/v2/AipAgents/models/ObjectSetParameterValue.md +++ /dev/null @@ -1,13 +0,0 @@ -# ObjectSetParameterValue - -A value passed for `ObjectSetParameter` application variable types. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**object_set** | ObjectSet | Yes | | -**ontology** | OntologyIdentifier | Yes | The API name of the Ontology for the provided `ObjectSet`. To find the API name, use the `List ontologies` endpoint or check the [Ontology Manager](https://palantir.com/docs/foundry/ontology-manager/overview/). | -**type** | Literal["objectSet"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/ObjectSetParameterValueUpdate.md b/docs/v2/AipAgents/models/ObjectSetParameterValueUpdate.md deleted file mode 100644 index afdf031e4..000000000 --- a/docs/v2/AipAgents/models/ObjectSetParameterValueUpdate.md +++ /dev/null @@ -1,12 +0,0 @@ -# ObjectSetParameterValueUpdate - -ObjectSetParameterValueUpdate - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**value** | ObjectSetRid | Yes | | -**type** | Literal["objectSet"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/Parameter.md b/docs/v2/AipAgents/models/Parameter.md deleted file mode 100644 index c96c207a5..000000000 --- a/docs/v2/AipAgents/models/Parameter.md +++ /dev/null @@ -1,14 +0,0 @@ -# Parameter - -A variable configured in the application state of an Agent in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**parameter_type** | ParameterType | Yes | Details of the types of values accepted and defaults for this variable. | -**access** | ParameterAccessMode | Yes | The access mode controls how the Agent is able to interact with the variable. | -**description** | Optional[str] | No | A description to explain the use of this variable. This description is injected into the Agent's prompt to provide context for when to use the variable. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/ParameterAccessMode.md b/docs/v2/AipAgents/models/ParameterAccessMode.md deleted file mode 100644 index 63046c878..000000000 --- a/docs/v2/AipAgents/models/ParameterAccessMode.md +++ /dev/null @@ -1,13 +0,0 @@ -# ParameterAccessMode - -READ_ONLY: Allows the variable to be read by the Agent, but the Agent cannot generate updates for it. -READ_WRITE: Allows the variable to be read and updated by the Agent. - - -| **Value** | -| --------- | -| `"READ_ONLY"` | -| `"READ_WRITE"` | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/ParameterId.md b/docs/v2/AipAgents/models/ParameterId.md deleted file mode 100644 index 4ed80ecb6..000000000 --- a/docs/v2/AipAgents/models/ParameterId.md +++ /dev/null @@ -1,12 +0,0 @@ -# ParameterId - -The unique identifier for a variable configured in the application state of an Agent in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). - - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/ParameterType.md b/docs/v2/AipAgents/models/ParameterType.md deleted file mode 100644 index 9717cbde1..000000000 --- a/docs/v2/AipAgents/models/ParameterType.md +++ /dev/null @@ -1,16 +0,0 @@ -# ParameterType - -ParameterType - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -StringParameter | string -ObjectSetParameter | objectSet - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/ParameterValue.md b/docs/v2/AipAgents/models/ParameterValue.md deleted file mode 100644 index 8c112b420..000000000 --- a/docs/v2/AipAgents/models/ParameterValue.md +++ /dev/null @@ -1,17 +0,0 @@ -# ParameterValue - -The value provided for a variable configured in the [application state](https://palantir.com/docs/foundry/agent-studio/application-state/) of an Agent. - - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -StringParameterValue | string -ObjectSetParameterValue | objectSet - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/ParameterValueUpdate.md b/docs/v2/AipAgents/models/ParameterValueUpdate.md deleted file mode 100644 index a6a7f750a..000000000 --- a/docs/v2/AipAgents/models/ParameterValueUpdate.md +++ /dev/null @@ -1,19 +0,0 @@ -# ParameterValueUpdate - -A value update for an [application variable](https://palantir.com/docs/foundry/agent-studio/application-state/) generated by the Agent. -For `StringParameter` types, this will be the updated string value. -For `ObjectSetParameter` types, this will be a Resource Identifier (RID) for the updated object set. - - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -StringParameterValue | string -ObjectSetParameterValueUpdate | objectSet - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/RidToolInputValue.md b/docs/v2/AipAgents/models/RidToolInputValue.md deleted file mode 100644 index 088562731..000000000 --- a/docs/v2/AipAgents/models/RidToolInputValue.md +++ /dev/null @@ -1,12 +0,0 @@ -# RidToolInputValue - -A Resource Identifier (RID) that was passed as input to a tool. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**rid** | RID | Yes | | -**type** | Literal["rid"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/RidToolOutputValue.md b/docs/v2/AipAgents/models/RidToolOutputValue.md deleted file mode 100644 index b61c3e74d..000000000 --- a/docs/v2/AipAgents/models/RidToolOutputValue.md +++ /dev/null @@ -1,12 +0,0 @@ -# RidToolOutputValue - -A Resource Identifier (RID) value that was returned from a tool. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**rid** | RID | Yes | | -**type** | Literal["rid"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/Session.md b/docs/v2/AipAgents/models/Session.md deleted file mode 100644 index 04a7fbc57..000000000 --- a/docs/v2/AipAgents/models/Session.md +++ /dev/null @@ -1,14 +0,0 @@ -# Session - -Session - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**rid** | SessionRid | Yes | The Resource Identifier (RID) of the conversation session. | -**metadata** | SessionMetadata | Yes | Metadata about the session. | -**agent_rid** | AgentRid | Yes | The Resource Identifier (RID) of the Agent associated with the session. | -**agent_version** | AgentVersionString | Yes | The version of the Agent associated with the session. This can be set by clients on session creation. If not specified, defaults to use the latest published version of the Agent at session creation time. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/SessionExchange.md b/docs/v2/AipAgents/models/SessionExchange.md deleted file mode 100644 index ab5b2cf3e..000000000 --- a/docs/v2/AipAgents/models/SessionExchange.md +++ /dev/null @@ -1,13 +0,0 @@ -# SessionExchange - -Represents an individual exchange between a user and an Agent in a conversation session. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**user_input** | UserTextInput | Yes | The user message that initiated the exchange. | -**contexts** | Optional[SessionExchangeContexts] | No | Additional retrieved context that was included in the prompt to the Agent. This may include context that was passed by the client with the user input, or relevant context that was automatically retrieved and added based on available data sources configured on the Agent. Empty if no additional context was included in the prompt. | -**result** | SessionExchangeResult | Yes | The final result for the exchange. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/SessionExchangeContexts.md b/docs/v2/AipAgents/models/SessionExchangeContexts.md deleted file mode 100644 index c0ec63041..000000000 --- a/docs/v2/AipAgents/models/SessionExchangeContexts.md +++ /dev/null @@ -1,13 +0,0 @@ -# SessionExchangeContexts - -Retrieved context which was passed to the Agent as input for the exchange. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**object_contexts** | List[ObjectContext] | Yes | Relevant object context for the user's message that was included in the prompt to the Agent. | -**function_retrieved_contexts** | List[FunctionRetrievedContext] | Yes | Context retrieved from running a function that was included as additional context in the prompt to the Agent. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/SessionExchangeResult.md b/docs/v2/AipAgents/models/SessionExchangeResult.md deleted file mode 100644 index 27ff2ee2a..000000000 --- a/docs/v2/AipAgents/models/SessionExchangeResult.md +++ /dev/null @@ -1,15 +0,0 @@ -# SessionExchangeResult - -The returned result from the Agent for a session exchange. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**agent_markdown_response** | AgentMarkdownResponse | Yes | The final text response generated by the Agent. Responses are formatted using markdown. | -**parameter_updates** | Dict[ParameterId, ParameterValueUpdate] | Yes | Any updates to application variable values which were generated by the Agent for this exchange. Updates can only be generated for application variables configured with `READ_WRITE` access on the Agent in AIP Agent Studio. | -**total_tokens_used** | Optional[int] | No | Total tokens used to compute the result. Omitted if token usage information is not supported by the model used for the session. | -**interrupted_output** | bool | Yes | True if the exchange was canceled. In that case, the response (if any) was provided by the client as part of the cancellation request rather than by the Agent. | -**session_trace_id** | SessionTraceId | Yes | The unique identifier for the session trace. The session trace lists the sequence of steps that an Agent takes to arrive at an answer. For example, a trace may include steps such as context retrieval and tool calls. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/SessionMetadata.md b/docs/v2/AipAgents/models/SessionMetadata.md deleted file mode 100644 index 44f6a257f..000000000 --- a/docs/v2/AipAgents/models/SessionMetadata.md +++ /dev/null @@ -1,15 +0,0 @@ -# SessionMetadata - -Metadata for a conversation session with an Agent. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**title** | str | Yes | The title of the session. | -**created_time** | datetime | Yes | The time the session was created. | -**updated_time** | datetime | Yes | The time the session was last updated. | -**message_count** | int | Yes | The count of messages in the session. Includes both user messages and Agent replies, so each complete exchange counts as two messages. | -**estimated_expires_time** | datetime | Yes | The estimated time at which the session is due to expire. Once a session has expired, it can no longer be accessed and a new session must be created. The expiry time is automatically extended when new exchanges are added to the session. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/SessionRid.md b/docs/v2/AipAgents/models/SessionRid.md deleted file mode 100644 index c62976ae9..000000000 --- a/docs/v2/AipAgents/models/SessionRid.md +++ /dev/null @@ -1,11 +0,0 @@ -# SessionRid - -The Resource Identifier (RID) of the conversation session. - -## Type -```python -RID -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/SessionTrace.md b/docs/v2/AipAgents/models/SessionTrace.md deleted file mode 100644 index b47fdc8a7..000000000 --- a/docs/v2/AipAgents/models/SessionTrace.md +++ /dev/null @@ -1,14 +0,0 @@ -# SessionTrace - -SessionTrace - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**id** | SessionTraceId | Yes | The unique identifier for the trace. | -**status** | SessionTraceStatus | Yes | This indicates whether the Agent has finished generating the final response. Clients should keep polling the `getSessionTrace` endpoint until the status is `COMPLETE`. | -**contexts** | Optional[SessionExchangeContexts] | No | Any additional context which was provided by the client or retrieved automatically by the agent, grouped by context type. Empty if no additional context was provided or configured to be automatically retrieved. A present SessionExchangeContexts object with empty lists indicates that context retrieval was attempted but no context was found. Note that this field will only be populated once the response generation has completed. | -**tool_call_groups** | List[ToolCallGroup] | Yes | List of tool call groups that were triggered at the same point in the trace for the agent response generation. The groups are returned in the same order as they were triggered by the agent. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/SessionTraceId.md b/docs/v2/AipAgents/models/SessionTraceId.md deleted file mode 100644 index 7d0e721b2..000000000 --- a/docs/v2/AipAgents/models/SessionTraceId.md +++ /dev/null @@ -1,13 +0,0 @@ -# SessionTraceId - -The unique identifier for a trace. The trace lists the sequence of steps that an Agent took to arrive at an -answer. For example, a trace may include steps such as context retrieval and tool calls. - - -## Type -```python -UUID -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/SessionTraceStatus.md b/docs/v2/AipAgents/models/SessionTraceStatus.md deleted file mode 100644 index 4b3d25e7a..000000000 --- a/docs/v2/AipAgents/models/SessionTraceStatus.md +++ /dev/null @@ -1,11 +0,0 @@ -# SessionTraceStatus - -SessionTraceStatus - -| **Value** | -| --------- | -| `"IN_PROGRESS"` | -| `"COMPLETE"` | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/StreamingContinueSessionRequest.md b/docs/v2/AipAgents/models/StreamingContinueSessionRequest.md deleted file mode 100644 index 80f034f0a..000000000 --- a/docs/v2/AipAgents/models/StreamingContinueSessionRequest.md +++ /dev/null @@ -1,15 +0,0 @@ -# StreamingContinueSessionRequest - -StreamingContinueSessionRequest - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**user_input** | UserTextInput | Yes | The user message for the Agent to respond to. | -**parameter_inputs** | Dict[ParameterId, ParameterValue] | Yes | Any supplied values for [application variables](https://palantir.com/docs/foundry/agent-studio/application-state/) to pass to the Agent for the exchange. | -**contexts_override** | Optional[List[InputContext]] | No | If set, automatic [context](https://palantir.com/docs/foundry/agent-studio/retrieval-context/) retrieval is skipped and the list of specified context is provided to the Agent instead. If omitted, relevant context for the user message is automatically retrieved and included in the prompt, based on data sources configured on the Agent for the session. | -**message_id** | Optional[MessageId] | No | A client-generated Universally Unique Identifier (UUID) to identify the message, which the client can use to cancel the exchange before the streaming response is complete. | -**session_trace_id** | Optional[SessionTraceId] | No | The unique identifier to use for this continue session trace. By generating and passing this ID to the `streamingContinue` endpoint, clients can use this trace ID to separately load details of the trace used to generate a result, while the result is in progress. If omitted, it will be generated automatically. Clients can check the generated ID by inspecting the `sessionTraceId` in the `SessionExchangeResult`, which can be loaded via the `getContent` endpoint. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/StringParameter.md b/docs/v2/AipAgents/models/StringParameter.md deleted file mode 100644 index 630be3fa9..000000000 --- a/docs/v2/AipAgents/models/StringParameter.md +++ /dev/null @@ -1,12 +0,0 @@ -# StringParameter - -StringParameter - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**default_value** | Optional[str] | No | The default value to use for this variable. | -**type** | Literal["string"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/StringParameterValue.md b/docs/v2/AipAgents/models/StringParameterValue.md deleted file mode 100644 index 262c49a1a..000000000 --- a/docs/v2/AipAgents/models/StringParameterValue.md +++ /dev/null @@ -1,12 +0,0 @@ -# StringParameterValue - -A value passed for `StringParameter` application variable types. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**value** | str | Yes | | -**type** | Literal["string"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/StringToolInputValue.md b/docs/v2/AipAgents/models/StringToolInputValue.md deleted file mode 100644 index c11d84319..000000000 --- a/docs/v2/AipAgents/models/StringToolInputValue.md +++ /dev/null @@ -1,12 +0,0 @@ -# StringToolInputValue - -A string value that was passed as input to a tool. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**value** | str | Yes | | -**type** | Literal["string"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/StringToolOutputValue.md b/docs/v2/AipAgents/models/StringToolOutputValue.md deleted file mode 100644 index db35822c3..000000000 --- a/docs/v2/AipAgents/models/StringToolOutputValue.md +++ /dev/null @@ -1,12 +0,0 @@ -# StringToolOutputValue - -A string value that was returned from a tool. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**value** | str | Yes | | -**type** | Literal["string"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/SuccessToolCallOutput.md b/docs/v2/AipAgents/models/SuccessToolCallOutput.md deleted file mode 100644 index 7ad0bfa9c..000000000 --- a/docs/v2/AipAgents/models/SuccessToolCallOutput.md +++ /dev/null @@ -1,12 +0,0 @@ -# SuccessToolCallOutput - -The successful output of a tool call. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**output** | ToolOutputValue | Yes | | -**type** | Literal["success"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/ToolCall.md b/docs/v2/AipAgents/models/ToolCall.md deleted file mode 100644 index d55c44d25..000000000 --- a/docs/v2/AipAgents/models/ToolCall.md +++ /dev/null @@ -1,13 +0,0 @@ -# ToolCall - -A tool call with its input and output. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**tool_metadata** | ToolMetadata | Yes | Details about the tool that was called, including the name and type of the tool. | -**input** | ToolCallInput | Yes | | -**output** | Optional[ToolCallOutput] | No | Empty if the tool call is in progress. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/ToolCallGroup.md b/docs/v2/AipAgents/models/ToolCallGroup.md deleted file mode 100644 index 0cf42d440..000000000 --- a/docs/v2/AipAgents/models/ToolCallGroup.md +++ /dev/null @@ -1,12 +0,0 @@ -# ToolCallGroup - -List of tool calls that were triggered at the same point in the trace for the agent response generation. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**tool_calls** | List[ToolCall] | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/ToolCallInput.md b/docs/v2/AipAgents/models/ToolCallInput.md deleted file mode 100644 index fbb79864b..000000000 --- a/docs/v2/AipAgents/models/ToolCallInput.md +++ /dev/null @@ -1,12 +0,0 @@ -# ToolCallInput - -Input parameters for a tool call. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**thought** | Optional[str] | No | Any additional message content that the Agent provided for why it chose to call the tool. | -**inputs** | Dict[ToolInputName, ToolInputValue] | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/ToolCallOutput.md b/docs/v2/AipAgents/models/ToolCallOutput.md deleted file mode 100644 index 6161cd1db..000000000 --- a/docs/v2/AipAgents/models/ToolCallOutput.md +++ /dev/null @@ -1,16 +0,0 @@ -# ToolCallOutput - -The output of a tool call. - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -SuccessToolCallOutput | success -FailureToolCallOutput | failure - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/ToolInputName.md b/docs/v2/AipAgents/models/ToolInputName.md deleted file mode 100644 index e9be5ad52..000000000 --- a/docs/v2/AipAgents/models/ToolInputName.md +++ /dev/null @@ -1,11 +0,0 @@ -# ToolInputName - -The name of a tool input parameter. - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/ToolInputValue.md b/docs/v2/AipAgents/models/ToolInputValue.md deleted file mode 100644 index b00ac02ce..000000000 --- a/docs/v2/AipAgents/models/ToolInputValue.md +++ /dev/null @@ -1,16 +0,0 @@ -# ToolInputValue - -A tool input value, which can be either a string or a Resource Identifier (RID). - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -StringToolInputValue | string -RidToolInputValue | rid - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/ToolMetadata.md b/docs/v2/AipAgents/models/ToolMetadata.md deleted file mode 100644 index b3a53a501..000000000 --- a/docs/v2/AipAgents/models/ToolMetadata.md +++ /dev/null @@ -1,12 +0,0 @@ -# ToolMetadata - -Details about the used tool. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**name** | str | Yes | The name of the tool that was called, as configured on the Agent. | -**type** | ToolType | Yes | The type of the tool that was called. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/ToolOutputValue.md b/docs/v2/AipAgents/models/ToolOutputValue.md deleted file mode 100644 index 5b4ce71d3..000000000 --- a/docs/v2/AipAgents/models/ToolOutputValue.md +++ /dev/null @@ -1,16 +0,0 @@ -# ToolOutputValue - -A tool output value, which can be either a string or a Resource Identifier (RID). - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -StringToolOutputValue | string -RidToolOutputValue | rid - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/ToolType.md b/docs/v2/AipAgents/models/ToolType.md deleted file mode 100644 index 34935fe1d..000000000 --- a/docs/v2/AipAgents/models/ToolType.md +++ /dev/null @@ -1,17 +0,0 @@ -# ToolType - -ToolType - -| **Value** | -| --------- | -| `"FUNCTION"` | -| `"ACTION"` | -| `"ONTOLOGY_SEMANTIC_SEARCH"` | -| `"OBJECT_QUERY"` | -| `"UPDATE_APPLICATION_VARIABLE"` | -| `"REQUEST_CLARIFICATION"` | -| `"OBJECT_QUERY_WITH_SQL"` | -| `"CODE_EXECUTION"` | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/UpdateSessionTitleRequest.md b/docs/v2/AipAgents/models/UpdateSessionTitleRequest.md deleted file mode 100644 index 97653ecb4..000000000 --- a/docs/v2/AipAgents/models/UpdateSessionTitleRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# UpdateSessionTitleRequest - -UpdateSessionTitleRequest - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**title** | str | Yes | The new title for the session. The maximum title length is 200 characters. Titles are truncated if they exceed this length. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/UserTextInput.md b/docs/v2/AipAgents/models/UserTextInput.md deleted file mode 100644 index 5c8d6c55b..000000000 --- a/docs/v2/AipAgents/models/UserTextInput.md +++ /dev/null @@ -1,11 +0,0 @@ -# UserTextInput - -UserTextInput - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**text** | str | Yes | The user message text. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Audit/LogFile.md b/docs/v2/Audit/LogFile.md deleted file mode 100644 index a02e2af59..000000000 --- a/docs/v2/Audit/LogFile.md +++ /dev/null @@ -1,123 +0,0 @@ -# LogFile - -Method | HTTP request | Release Stage | -------------- | ------------- | ----- | -[**content**](#content) | **GET** /v2/audit/organizations/{organizationRid}/logFiles/{logFileId}/content | Stable | -[**list**](#list) | **GET** /v2/audit/organizations/{organizationRid}/logFiles | Stable | - -# **content** - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**organization_rid** | OrganizationRid | | | -**log_file_id** | FileId | | | - -### Return type -**bytes** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# OrganizationRid -organization_rid = None -# FileId -log_file_id = None - - -try: - api_response = client.audit.Organization.LogFile.content(organization_rid, log_file_id) - print("The content response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling LogFile.content: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | bytes | | application/octet-stream | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **list** -Lists all LogFiles. - -This is a paged endpoint. Each page may be smaller or larger than the requested page size. However, it is guaranteed that if there are more results available, the `nextPageToken` field will be populated. To get the next page, make the same request again, but set the value of the `pageToken` query parameter to be value of the `nextPageToken` value of the previous response. If there is no `nextPageToken` field in the response, you are on the last page. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**organization_rid** | OrganizationRid | | | -**end_date** | Optional[date] | List log files for audit events up until this date (inclusive). If absent, defaults to no end date. Use the returned `nextPageToken` to continually poll the `listLogFiles` endpoint to list the latest available logs. | [optional] | -**page_size** | Optional[PageSize] | The page size to use for the endpoint. | [optional] | -**page_token** | Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. | [optional] | -**start_date** | Optional[date] | List log files for audit events starting from this date. This parameter is required for the initial request (when `pageToken` is not provided). | [optional] | - -### Return type -**ListLogFilesResponse** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# OrganizationRid -organization_rid = None -# Optional[date] | List log files for audit events up until this date (inclusive). If absent, defaults to no end date. Use the returned `nextPageToken` to continually poll the `listLogFiles` endpoint to list the latest available logs. -end_date = "2025-01-01" -# Optional[PageSize] | The page size to use for the endpoint. -page_size = None -# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. -page_token = None -# Optional[date] | List log files for audit events starting from this date. This parameter is required for the initial request (when `pageToken` is not provided). -start_date = "2024-01-01" - - -try: - for log_file in client.audit.Organization.LogFile.list( - organization_rid, - end_date=end_date, - page_size=page_size, - page_token=page_token, - start_date=start_date, - ): - pprint(log_file) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling LogFile.list: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | ListLogFilesResponse | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - diff --git a/docs/v2/Audit/Organization.md b/docs/v2/Audit/Organization.md deleted file mode 100644 index 4cdf4e059..000000000 --- a/docs/v2/Audit/Organization.md +++ /dev/null @@ -1,5 +0,0 @@ -# Organization - -Method | HTTP request | Release Stage | -------------- | ------------- | ----- | - diff --git a/docs/v2/Audit/models/FileId.md b/docs/v2/Audit/models/FileId.md deleted file mode 100644 index bd43c49af..000000000 --- a/docs/v2/Audit/models/FileId.md +++ /dev/null @@ -1,11 +0,0 @@ -# FileId - -The ID of an audit log file - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Audit/models/ListLogFilesResponse.md b/docs/v2/Audit/models/ListLogFilesResponse.md deleted file mode 100644 index 26174db5d..000000000 --- a/docs/v2/Audit/models/ListLogFilesResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListLogFilesResponse - -ListLogFilesResponse - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**data** | List[LogFile] | Yes | | -**next_page_token** | Optional[PageToken] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Audit/models/LogFile.md b/docs/v2/Audit/models/LogFile.md deleted file mode 100644 index efcc81901..000000000 --- a/docs/v2/Audit/models/LogFile.md +++ /dev/null @@ -1,11 +0,0 @@ -# LogFile - -LogFile - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**id** | FileId | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/Connection.md b/docs/v2/Connectivity/Connection.md deleted file mode 100644 index 01086edaa..000000000 --- a/docs/v2/Connectivity/Connection.md +++ /dev/null @@ -1,424 +0,0 @@ -# Connection - -Method | HTTP request | Release Stage | -------------- | ------------- | ----- | -[**create**](#create) | **POST** /v2/connectivity/connections | Public Beta | -[**get**](#get) | **GET** /v2/connectivity/connections/{connectionRid} | Public Beta | -[**get_configuration**](#get_configuration) | **GET** /v2/connectivity/connections/{connectionRid}/getConfiguration | Public Beta | -[**get_configuration_batch**](#get_configuration_batch) | **POST** /v2/connectivity/connections/getConfigurationBatch | Public Beta | -[**update_export_settings**](#update_export_settings) | **POST** /v2/connectivity/connections/{connectionRid}/updateExportSettings | Public Beta | -[**update_secrets**](#update_secrets) | **POST** /v2/connectivity/connections/{connectionRid}/updateSecrets | Stable | -[**upload_custom_jdbc_drivers**](#upload_custom_jdbc_drivers) | **POST** /v2/connectivity/connections/{connectionRid}/uploadCustomJdbcDrivers | Public Beta | - -# **create** -Creates a new Connection with a [direct connection](https://palantir.com/docs/foundry/data-connection/core-concepts/#direct-connection) runtime. - -Any secrets specified in the request body are transmitted over the network encrypted using TLS. Once the -secrets reach Foundry's servers, they will be temporarily decrypted and remain in plaintext in memory to -be processed as needed. They will stay in plaintext in memory until the garbage collection process cleans -up the memory. The secrets are always stored encrypted on our servers. -By using this endpoint, you acknowledge and accept any potential risks associated with the temporary -in-memory handling of secrets. If you do not want your secrets to be temporarily decrypted, you should -use the Foundry UI instead. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**configuration** | CreateConnectionRequestConnectionConfiguration | | | -**display_name** | ConnectionDisplayName | The display name of the Connection. The display name must not be blank. | | -**parent_folder_rid** | FolderRid | | | -**worker** | CreateConnectionRequestConnectionWorker | | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**Connection** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# CreateConnectionRequestConnectionConfiguration -configuration = { - "type": "jdbc", - "url": "jdbc:postgresql://localhost:5432/test", - "driverClass": "org.postgresql.Driver", -} -# ConnectionDisplayName | The display name of the Connection. The display name must not be blank. -display_name = "Connection to my external system" -# FolderRid -parent_folder_rid = "ri.compass.main.folder.c410f510-2937-420e-8ea3-8c9bcb3c1791" -# CreateConnectionRequestConnectionWorker -worker = None -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.connectivity.Connection.create( - configuration=configuration, - display_name=display_name, - parent_folder_rid=parent_folder_rid, - worker=worker, - preview=preview, - ) - print("The create response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Connection.create: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | Connection | The created Connection | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **get** -Get the Connection with the specified rid. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**connection_rid** | ConnectionRid | | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**Connection** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# ConnectionRid -connection_rid = None -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.connectivity.Connection.get(connection_rid, preview=preview) - print("The get response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Connection.get: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | Connection | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **get_configuration** -Retrieves the ConnectionConfiguration of the [Connection](https://palantir.com/docs/foundry/data-connection/set-up-source/) itself. -This operation is intended for use when other Connection data is not required, providing a lighter-weight alternative to `getConnection` operation. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**connection_rid** | ConnectionRid | | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**ConnectionConfiguration** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# ConnectionRid -connection_rid = None -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.connectivity.Connection.get_configuration(connection_rid, preview=preview) - print("The get_configuration response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Connection.get_configuration: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | ConnectionConfiguration | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **get_configuration_batch** -Returns a map of Connection RIDs to their corresponding configurations. -Connections are filtered from the response if they don't exist or the requesting token lacks the required permissions. - - -The maximum batch size for this endpoint is 200. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**body** | List[GetConfigurationConnectionsBatchRequestElement] | Body of the request | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**GetConfigurationConnectionsBatchResponse** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# List[GetConfigurationConnectionsBatchRequestElement] | Body of the request -body = [{"connectionRid": "ri.magritte..source.c078b71b-92f9-41b6-b0df-3760f411120b"}] -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.connectivity.Connection.get_configuration_batch(body, preview=preview) - print("The get_configuration_batch response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Connection.get_configuration_batch: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | GetConfigurationConnectionsBatchResponse | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **update_export_settings** -Updates the [export settings on the Connection.](https://palantir.com/docs/foundry/data-connection/export-overview/#enable-exports-for-source) -Only users with Information Security Officer role can modify the export settings. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**connection_rid** | ConnectionRid | | | -**export_settings** | ConnectionExportSettings | | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**None** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# ConnectionRid -connection_rid = None -# ConnectionExportSettings -export_settings = {"exportsEnabled": True, "exportEnabledWithoutMarkingsValidation": False} -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.connectivity.Connection.update_export_settings( - connection_rid, export_settings=export_settings, preview=preview - ) - print("The update_export_settings response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Connection.update_export_settings: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**204** | None | | None | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **update_secrets** -Updates the secrets on the connection to the specified secret values. -Secrets that are currently configured on the connection but are omitted in the request will remain unchanged. - -Secrets are transmitted over the network encrypted using TLS. Once the secrets reach Foundry's servers, -they will be temporarily decrypted and remain in plaintext in memory to be processed as needed. -They will stay in plaintext in memory until the garbage collection process cleans up the memory. -The secrets are always stored encrypted on our servers. - -By using this endpoint, you acknowledge and accept any potential risks associated with the temporary -in-memory handling of secrets. If you do not want your secrets to be temporarily decrypted, you should -use the Foundry UI instead. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**connection_rid** | ConnectionRid | | | -**secrets** | Dict[SecretName, PlaintextValue] | The secrets to be updated. The specified secret names must already be configured on the connection. | | - -### Return type -**None** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# ConnectionRid -connection_rid = None -# Dict[SecretName, PlaintextValue] | The secrets to be updated. The specified secret names must already be configured on the connection. -secrets = {"Password": "MySecretPassword"} - - -try: - api_response = client.connectivity.Connection.update_secrets(connection_rid, secrets=secrets) - print("The update_secrets response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Connection.update_secrets: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**204** | None | | None | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **upload_custom_jdbc_drivers** -Upload custom jdbc drivers to an existing JDBC connection. -The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**connection_rid** | ConnectionRid | | | -**body** | bytes | Body of the request | | -**file_name** | str | The file name of the uploaded JDBC driver. Must end with .jar | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**Connection** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# ConnectionRid -connection_rid = None -# bytes | Body of the request -body = None -# str | The file name of the uploaded JDBC driver. Must end with .jar -file_name = "cdata.jdbc.oracle.jar" -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.connectivity.Connection.upload_custom_jdbc_drivers( - connection_rid, body, file_name=file_name, preview=preview - ) - print("The upload_custom_jdbc_drivers response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Connection.upload_custom_jdbc_drivers: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | Connection | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - diff --git a/docs/v2/Connectivity/FileImport.md b/docs/v2/Connectivity/FileImport.md deleted file mode 100644 index d1c7412cb..000000000 --- a/docs/v2/Connectivity/FileImport.md +++ /dev/null @@ -1,390 +0,0 @@ -# FileImport - -Method | HTTP request | Release Stage | -------------- | ------------- | ----- | -[**create**](#create) | **POST** /v2/connectivity/connections/{connectionRid}/fileImports | Public Beta | -[**delete**](#delete) | **DELETE** /v2/connectivity/connections/{connectionRid}/fileImports/{fileImportRid} | Public Beta | -[**execute**](#execute) | **POST** /v2/connectivity/connections/{connectionRid}/fileImports/{fileImportRid}/execute | Public Beta | -[**get**](#get) | **GET** /v2/connectivity/connections/{connectionRid}/fileImports/{fileImportRid} | Public Beta | -[**list**](#list) | **GET** /v2/connectivity/connections/{connectionRid}/fileImports | Public Beta | -[**replace**](#replace) | **PUT** /v2/connectivity/connections/{connectionRid}/fileImports/{fileImportRid} | Public Beta | - -# **create** -Creates a new FileImport. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**connection_rid** | ConnectionRid | | | -**dataset_rid** | DatasetRid | The RID of the output dataset. Can not be modified after the file import is created. | | -**display_name** | FileImportDisplayName | | | -**file_import_filters** | List[FileImportFilter] | Use filters to limit which files should be imported. Filters are applied in the order they are defined. A different ordering of filters may lead to a more optimized import. [Learn more about optimizing file imports.](https://palantir.com/docs/foundry/data-connection/file-based-syncs/#optimize-file-based-syncs) | | -**import_mode** | FileImportMode | | | -**branch_name** | Optional[BranchName] | The branch name in the output dataset that will contain the imported data. Defaults to `master` for most enrollments. Can not be modified after the file import is created. | [optional] | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | -**subfolder** | Optional[str] | A subfolder in the external system that will be imported. If not specified, defaults to the root folder of the external system. | [optional] | - -### Return type -**FileImport** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# ConnectionRid -connection_rid = None -# DatasetRid | The RID of the output dataset. Can not be modified after the file import is created. -dataset_rid = "ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da" -# FileImportDisplayName -display_name = "My file import" -# List[FileImportFilter] | Use filters to limit which files should be imported. Filters are applied in the order they are defined. A different ordering of filters may lead to a more optimized import. [Learn more about optimizing file imports.](https://palantir.com/docs/foundry/data-connection/file-based-syncs/#optimize-file-based-syncs) -file_import_filters = [{"type": "pathMatchesFilter", "regex": "my-subfolder"}] -# FileImportMode -import_mode = "SNAPSHOT" -# Optional[BranchName] | The branch name in the output dataset that will contain the imported data. Defaults to `master` for most enrollments. Can not be modified after the file import is created. -branch_name = "master" -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None -# Optional[str] | A subfolder in the external system that will be imported. If not specified, defaults to the root folder of the external system. -subfolder = "subfolder1/subfolder2" - - -try: - api_response = client.connectivity.Connection.FileImport.create( - connection_rid, - dataset_rid=dataset_rid, - display_name=display_name, - file_import_filters=file_import_filters, - import_mode=import_mode, - branch_name=branch_name, - preview=preview, - subfolder=subfolder, - ) - print("The create response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling FileImport.create: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | FileImport | The created FileImport | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **delete** -Delete the FileImport with the specified RID. -Deleting the file import does not delete the destination dataset but the dataset will no longer -be updated by this import. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**connection_rid** | ConnectionRid | | | -**file_import_rid** | FileImportRid | | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**None** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# ConnectionRid -connection_rid = None -# FileImportRid -file_import_rid = None -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.connectivity.Connection.FileImport.delete( - connection_rid, file_import_rid, preview=preview - ) - print("The delete response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling FileImport.delete: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**204** | None | | None | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **execute** -Executes the FileImport, which runs asynchronously as a [Foundry Build](https://palantir.com/docs/foundry/data-integration/builds/). -The returned BuildRid can be used to check the status via the Orchestration API. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**connection_rid** | ConnectionRid | | | -**file_import_rid** | FileImportRid | | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**BuildRid** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# ConnectionRid -connection_rid = None -# FileImportRid -file_import_rid = None -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.connectivity.Connection.FileImport.execute( - connection_rid, file_import_rid, preview=preview - ) - print("The execute response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling FileImport.execute: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | BuildRid | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **get** -Get the FileImport with the specified rid. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**connection_rid** | ConnectionRid | | | -**file_import_rid** | FileImportRid | | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**FileImport** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# ConnectionRid -connection_rid = None -# FileImportRid -file_import_rid = None -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.connectivity.Connection.FileImport.get( - connection_rid, file_import_rid, preview=preview - ) - print("The get response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling FileImport.get: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | FileImport | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **list** -Lists all file imports defined for this connection. -Only file imports that the user has permissions to view will be returned. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**connection_rid** | ConnectionRid | | | -**page_size** | Optional[PageSize] | The page size to use for the endpoint. | [optional] | -**page_token** | Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. | [optional] | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**ListFileImportsResponse** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# ConnectionRid -connection_rid = None -# Optional[PageSize] | The page size to use for the endpoint. -page_size = None -# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. -page_token = None -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - for file_import in client.connectivity.Connection.FileImport.list( - connection_rid, page_size=page_size, page_token=page_token, preview=preview - ): - pprint(file_import) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling FileImport.list: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | ListFileImportsResponse | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **replace** -Replace the FileImport with the specified rid. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**connection_rid** | ConnectionRid | | | -**file_import_rid** | FileImportRid | | | -**display_name** | FileImportDisplayName | | | -**file_import_filters** | List[FileImportFilter] | Use filters to limit which files should be imported. Filters are applied in the order they are defined. A different ordering of filters may lead to a more optimized import. [Learn more about optimizing file imports.](https://palantir.com/docs/foundry/data-connection/file-based-syncs/#optimize-file-based-syncs) | | -**import_mode** | FileImportMode | | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | -**subfolder** | Optional[str] | A subfolder in the external system that will be imported. If not specified, defaults to the root folder of the external system. | [optional] | - -### Return type -**FileImport** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# ConnectionRid -connection_rid = None -# FileImportRid -file_import_rid = None -# FileImportDisplayName -display_name = "My file import" -# List[FileImportFilter] | Use filters to limit which files should be imported. Filters are applied in the order they are defined. A different ordering of filters may lead to a more optimized import. [Learn more about optimizing file imports.](https://palantir.com/docs/foundry/data-connection/file-based-syncs/#optimize-file-based-syncs) -file_import_filters = [{"type": "pathMatchesFilter", "regex": "my-subfolder"}] -# FileImportMode -import_mode = "SNAPSHOT" -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None -# Optional[str] | A subfolder in the external system that will be imported. If not specified, defaults to the root folder of the external system. -subfolder = "subfolder1/subfolder2" - - -try: - api_response = client.connectivity.Connection.FileImport.replace( - connection_rid, - file_import_rid, - display_name=display_name, - file_import_filters=file_import_filters, - import_mode=import_mode, - preview=preview, - subfolder=subfolder, - ) - print("The replace response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling FileImport.replace: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | FileImport | The replaced FileImport | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - diff --git a/docs/v2/Connectivity/TableImport.md b/docs/v2/Connectivity/TableImport.md deleted file mode 100644 index ef6edbe5b..000000000 --- a/docs/v2/Connectivity/TableImport.md +++ /dev/null @@ -1,390 +0,0 @@ -# TableImport - -Method | HTTP request | Release Stage | -------------- | ------------- | ----- | -[**create**](#create) | **POST** /v2/connectivity/connections/{connectionRid}/tableImports | Public Beta | -[**delete**](#delete) | **DELETE** /v2/connectivity/connections/{connectionRid}/tableImports/{tableImportRid} | Public Beta | -[**execute**](#execute) | **POST** /v2/connectivity/connections/{connectionRid}/tableImports/{tableImportRid}/execute | Public Beta | -[**get**](#get) | **GET** /v2/connectivity/connections/{connectionRid}/tableImports/{tableImportRid} | Public Beta | -[**list**](#list) | **GET** /v2/connectivity/connections/{connectionRid}/tableImports | Public Beta | -[**replace**](#replace) | **PUT** /v2/connectivity/connections/{connectionRid}/tableImports/{tableImportRid} | Public Beta | - -# **create** -Creates a new TableImport. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**connection_rid** | ConnectionRid | | | -**config** | CreateTableImportRequestTableImportConfig | | | -**dataset_rid** | DatasetRid | The RID of the output dataset. Can not be modified after the table import is created. | | -**display_name** | TableImportDisplayName | | | -**import_mode** | TableImportMode | | | -**allow_schema_changes** | Optional[TableImportAllowSchemaChanges] | Allow the TableImport to succeed if the schema of imported rows does not match the existing dataset's schema. Defaults to false for new table imports. | [optional] | -**branch_name** | Optional[BranchName] | The branch name in the output dataset that will contain the imported data. Defaults to `master` for most enrollments. Can not be modified after the table import is created. | [optional] | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**TableImport** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# ConnectionRid -connection_rid = None -# CreateTableImportRequestTableImportConfig -config = {"type": "jdbcImportConfig", "query": "SELECT * FROM table"} -# DatasetRid | The RID of the output dataset. Can not be modified after the table import is created. -dataset_rid = "ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da" -# TableImportDisplayName -display_name = "My table import" -# TableImportMode -import_mode = "SNAPSHOT" -# Optional[TableImportAllowSchemaChanges] | Allow the TableImport to succeed if the schema of imported rows does not match the existing dataset's schema. Defaults to false for new table imports. -allow_schema_changes = True -# Optional[BranchName] | The branch name in the output dataset that will contain the imported data. Defaults to `master` for most enrollments. Can not be modified after the table import is created. -branch_name = "master" -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.connectivity.Connection.TableImport.create( - connection_rid, - config=config, - dataset_rid=dataset_rid, - display_name=display_name, - import_mode=import_mode, - allow_schema_changes=allow_schema_changes, - branch_name=branch_name, - preview=preview, - ) - print("The create response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling TableImport.create: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | TableImport | The created TableImport | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **delete** -Delete the TableImport with the specified RID. -Deleting the table import does not delete the destination dataset but the dataset will no longer -be updated by this import. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**connection_rid** | ConnectionRid | | | -**table_import_rid** | TableImportRid | | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**None** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# ConnectionRid -connection_rid = None -# TableImportRid -table_import_rid = None -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.connectivity.Connection.TableImport.delete( - connection_rid, table_import_rid, preview=preview - ) - print("The delete response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling TableImport.delete: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**204** | None | | None | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **execute** -Executes the TableImport, which runs asynchronously as a [Foundry Build](https://palantir.com/docs/foundry/data-integration/builds/). -The returned BuildRid can be used to check the status via the Orchestration API. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**connection_rid** | ConnectionRid | | | -**table_import_rid** | TableImportRid | | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**BuildRid** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# ConnectionRid -connection_rid = None -# TableImportRid -table_import_rid = None -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.connectivity.Connection.TableImport.execute( - connection_rid, table_import_rid, preview=preview - ) - print("The execute response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling TableImport.execute: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | BuildRid | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **get** -Get the TableImport with the specified rid. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**connection_rid** | ConnectionRid | | | -**table_import_rid** | TableImportRid | | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**TableImport** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# ConnectionRid -connection_rid = None -# TableImportRid -table_import_rid = None -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.connectivity.Connection.TableImport.get( - connection_rid, table_import_rid, preview=preview - ) - print("The get response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling TableImport.get: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | TableImport | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **list** -Lists all table imports defined for this connection. -Only table imports that the user has permissions to view will be returned. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**connection_rid** | ConnectionRid | | | -**page_size** | Optional[PageSize] | The page size to use for the endpoint. | [optional] | -**page_token** | Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. | [optional] | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**ListTableImportsResponse** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# ConnectionRid -connection_rid = None -# Optional[PageSize] | The page size to use for the endpoint. -page_size = None -# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. -page_token = None -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - for table_import in client.connectivity.Connection.TableImport.list( - connection_rid, page_size=page_size, page_token=page_token, preview=preview - ): - pprint(table_import) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling TableImport.list: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | ListTableImportsResponse | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **replace** -Replace the TableImport with the specified rid. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**connection_rid** | ConnectionRid | | | -**table_import_rid** | TableImportRid | | | -**config** | ReplaceTableImportRequestTableImportConfig | | | -**display_name** | TableImportDisplayName | | | -**import_mode** | TableImportMode | | | -**allow_schema_changes** | Optional[TableImportAllowSchemaChanges] | Allow the TableImport to succeed if the schema of imported rows does not match the existing dataset's schema. Defaults to false for new table imports. | [optional] | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**TableImport** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# ConnectionRid -connection_rid = None -# TableImportRid -table_import_rid = None -# ReplaceTableImportRequestTableImportConfig -config = {"type": "jdbcImportConfig", "query": "SELECT * FROM table"} -# TableImportDisplayName -display_name = "My table import" -# TableImportMode -import_mode = "SNAPSHOT" -# Optional[TableImportAllowSchemaChanges] | Allow the TableImport to succeed if the schema of imported rows does not match the existing dataset's schema. Defaults to false for new table imports. -allow_schema_changes = True -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.connectivity.Connection.TableImport.replace( - connection_rid, - table_import_rid, - config=config, - display_name=display_name, - import_mode=import_mode, - allow_schema_changes=allow_schema_changes, - preview=preview, - ) - print("The replace response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling TableImport.replace: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | TableImport | The replaced TableImport | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - diff --git a/docs/v2/Connectivity/VirtualTable.md b/docs/v2/Connectivity/VirtualTable.md deleted file mode 100644 index 702752898..000000000 --- a/docs/v2/Connectivity/VirtualTable.md +++ /dev/null @@ -1,77 +0,0 @@ -# VirtualTable - -Method | HTTP request | Release Stage | -------------- | ------------- | ----- | -[**create**](#create) | **POST** /v2/connectivity/connections/{connectionRid}/virtualTables | Public Beta | - -# **create** -Creates a new [Virtual Table](https://palantir.com/docs/foundry/data-integration/virtual-tables/) from an upstream table. The VirtualTable will be created -in the specified parent folder and can be queried through Foundry's data access APIs. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**connection_rid** | ConnectionRid | | | -**config** | VirtualTableConfig | | | -**name** | TableName | | | -**parent_rid** | FolderRid | | | -**markings** | Optional[List[MarkingId]] | | [optional] | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**VirtualTable** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# ConnectionRid -connection_rid = None -# VirtualTableConfig -config = None -# TableName -name = "my_table" -# FolderRid -parent_rid = "ri.compass.main.folder.c410f510-2937-420e-8ea3-8c9bcb3c1791" -# Optional[List[MarkingId]] -markings = ["18212f9a-0e63-4b79-96a0-aae04df23336"] -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.connectivity.Connection.VirtualTable.create( - connection_rid, - config=config, - name=name, - parent_rid=parent_rid, - markings=markings, - preview=preview, - ) - print("The create response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling VirtualTable.create: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | VirtualTable | The created VirtualTable | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - diff --git a/docs/v2/Connectivity/models/ApiKeyAuthentication.md b/docs/v2/Connectivity/models/ApiKeyAuthentication.md deleted file mode 100644 index 96aa6d1a5..000000000 --- a/docs/v2/Connectivity/models/ApiKeyAuthentication.md +++ /dev/null @@ -1,15 +0,0 @@ -# ApiKeyAuthentication - -The API key used to authenticate to the external system. -This can be configured as a header or query parameter. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**location** | RestRequestApiKeyLocation | Yes | The location of the API key in the request. | -**api_key** | EncryptedProperty | Yes | The value of the API key. | -**type** | Literal["apiKey"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/AsPlaintextValue.md b/docs/v2/Connectivity/models/AsPlaintextValue.md deleted file mode 100644 index e66ef9380..000000000 --- a/docs/v2/Connectivity/models/AsPlaintextValue.md +++ /dev/null @@ -1,12 +0,0 @@ -# AsPlaintextValue - -AsPlaintextValue - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**value** | PlaintextValue | Yes | | -**type** | Literal["asPlaintextValue"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/AsSecretName.md b/docs/v2/Connectivity/models/AsSecretName.md deleted file mode 100644 index 727658c68..000000000 --- a/docs/v2/Connectivity/models/AsSecretName.md +++ /dev/null @@ -1,12 +0,0 @@ -# AsSecretName - -AsSecretName - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**value** | SecretName | Yes | | -**type** | Literal["asSecretName"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/AwsAccessKey.md b/docs/v2/Connectivity/models/AwsAccessKey.md deleted file mode 100644 index 72999bc72..000000000 --- a/docs/v2/Connectivity/models/AwsAccessKey.md +++ /dev/null @@ -1,18 +0,0 @@ -# AwsAccessKey - -[Access keys](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html) are long-term -credentials for an IAM user or the AWS account root user. -Access keys consist of two parts: an access key ID (for example, AKIAIOSFODNN7EXAMPLE) and a secret access -key (for example, wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY). You must use both the access key ID and -secret access key together to authenticate your requests. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**access_key_id** | str | Yes | | -**secret_access_key** | EncryptedProperty | Yes | | -**type** | Literal["awsAccessKey"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/AwsOidcAuthentication.md b/docs/v2/Connectivity/models/AwsOidcAuthentication.md deleted file mode 100644 index f1a1b65b9..000000000 --- a/docs/v2/Connectivity/models/AwsOidcAuthentication.md +++ /dev/null @@ -1,16 +0,0 @@ -# AwsOidcAuthentication - -[OpenID Connect (OIDC)](https://palantir.com/docs/foundry/data-connection/oidc/) is an open authentication protocol that allows -you to authenticate to external system resources without the use of static credentials. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**audience** | str | Yes | The configured audience that identifies the external system. | -**issuer_url** | str | Yes | The URL that identifies Foundry as an OIDC identity provider. | -**subject** | ConnectionRid | Yes | The RID of the Connection that is connecting to the external system. | -**type** | Literal["oidc"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/BasicCredentials.md b/docs/v2/Connectivity/models/BasicCredentials.md deleted file mode 100644 index 673718486..000000000 --- a/docs/v2/Connectivity/models/BasicCredentials.md +++ /dev/null @@ -1,13 +0,0 @@ -# BasicCredentials - -BasicCredentials - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**username** | str | Yes | | -**password** | EncryptedProperty | Yes | | -**type** | Literal["basic"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/BearerToken.md b/docs/v2/Connectivity/models/BearerToken.md deleted file mode 100644 index 74786cb14..000000000 --- a/docs/v2/Connectivity/models/BearerToken.md +++ /dev/null @@ -1,12 +0,0 @@ -# BearerToken - -The bearer token used to authenticate to the external system. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**bearer_token** | EncryptedProperty | Yes | | -**type** | Literal["bearerToken"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/BigQueryVirtualTableConfig.md b/docs/v2/Connectivity/models/BigQueryVirtualTableConfig.md deleted file mode 100644 index 5f1d86298..000000000 --- a/docs/v2/Connectivity/models/BigQueryVirtualTableConfig.md +++ /dev/null @@ -1,14 +0,0 @@ -# BigQueryVirtualTableConfig - -Pointer to the table in BigQuery. Uses the BigQuery table identifier of project, dataset and table. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**project** | str | Yes | The BigQuery project name. | -**dataset** | str | Yes | The BigQuery dataset name. | -**table** | str | Yes | The BigQuery table name. | -**type** | Literal["bigquery"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/CloudIdentity.md b/docs/v2/Connectivity/models/CloudIdentity.md deleted file mode 100644 index ad79daa69..000000000 --- a/docs/v2/Connectivity/models/CloudIdentity.md +++ /dev/null @@ -1,14 +0,0 @@ -# CloudIdentity - -[Cloud identities](https://palantir.com/docs/foundry/administration/configure-cloud-identities/) allow you to authenticate to -cloud provider resources without the use of static credentials. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**cloud_identity_rid** | CloudIdentityRid | Yes | | -**type** | Literal["cloudIdentity"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/CloudIdentityRid.md b/docs/v2/Connectivity/models/CloudIdentityRid.md deleted file mode 100644 index f79772852..000000000 --- a/docs/v2/Connectivity/models/CloudIdentityRid.md +++ /dev/null @@ -1,12 +0,0 @@ -# CloudIdentityRid - -The Resource Identifier (RID) of a Cloud Identity. - - -## Type -```python -RID -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/Connection.md b/docs/v2/Connectivity/models/Connection.md deleted file mode 100644 index a5defae3b..000000000 --- a/docs/v2/Connectivity/models/Connection.md +++ /dev/null @@ -1,16 +0,0 @@ -# Connection - -Connection - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**rid** | ConnectionRid | Yes | | -**parent_folder_rid** | FolderRid | Yes | | -**display_name** | ConnectionDisplayName | Yes | The display name of the Connection. The display name must not be blank. | -**export_settings** | ConnectionExportSettings | Yes | | -**worker** | ConnectionWorker | Yes | | -**configuration** | ConnectionConfiguration | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/ConnectionConfiguration.md b/docs/v2/Connectivity/models/ConnectionConfiguration.md deleted file mode 100644 index 623d9f095..000000000 --- a/docs/v2/Connectivity/models/ConnectionConfiguration.md +++ /dev/null @@ -1,20 +0,0 @@ -# ConnectionConfiguration - -ConnectionConfiguration - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -S3ConnectionConfiguration | s3 -RestConnectionConfiguration | rest -SnowflakeConnectionConfiguration | snowflake -DatabricksConnectionConfiguration | databricks -SmbConnectionConfiguration | smb -JdbcConnectionConfiguration | jdbc - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/ConnectionDisplayName.md b/docs/v2/Connectivity/models/ConnectionDisplayName.md deleted file mode 100644 index 4eb7400e4..000000000 --- a/docs/v2/Connectivity/models/ConnectionDisplayName.md +++ /dev/null @@ -1,11 +0,0 @@ -# ConnectionDisplayName - -The display name of the Connection. The display name must not be blank. - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/ConnectionExportSettings.md b/docs/v2/Connectivity/models/ConnectionExportSettings.md deleted file mode 100644 index dccb94bf0..000000000 --- a/docs/v2/Connectivity/models/ConnectionExportSettings.md +++ /dev/null @@ -1,13 +0,0 @@ -# ConnectionExportSettings - -The [export settings of a Connection](https://palantir.com/docs/foundry/data-connection/export-overview/#enable-exports-for-source). - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**exports_enabled** | bool | Yes | Allow exporting datasets from Foundry to this Connection. | -**export_enabled_without_markings_validation** | bool | Yes | In certain interactive workflows the Connection can be used in, it is not currently possible to validate the security markings of the data being exported. By enabling exports without markings validation, you acknowledge that you are responsible for ensuring that the data being exported is compliant with your organization's policies. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/ConnectionRid.md b/docs/v2/Connectivity/models/ConnectionRid.md deleted file mode 100644 index d1c5ca4be..000000000 --- a/docs/v2/Connectivity/models/ConnectionRid.md +++ /dev/null @@ -1,12 +0,0 @@ -# ConnectionRid - -The Resource Identifier (RID) of a Connection (also known as a source). - - -## Type -```python -RID -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/ConnectionWorker.md b/docs/v2/Connectivity/models/ConnectionWorker.md deleted file mode 100644 index c26cd310f..000000000 --- a/docs/v2/Connectivity/models/ConnectionWorker.md +++ /dev/null @@ -1,18 +0,0 @@ -# ConnectionWorker - -[The worker of a Connection](https://palantir.com/docs/foundry/data-connection/core-concepts/#workers), which defines where -compute for capabilities are run. - - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -UnknownWorker | unknownWorker -FoundryWorker | foundryWorker - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/CreateConnectionRequest.md b/docs/v2/Connectivity/models/CreateConnectionRequest.md deleted file mode 100644 index 75e69a65a..000000000 --- a/docs/v2/Connectivity/models/CreateConnectionRequest.md +++ /dev/null @@ -1,14 +0,0 @@ -# CreateConnectionRequest - -CreateConnectionRequest - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**parent_folder_rid** | FolderRid | Yes | | -**configuration** | CreateConnectionRequestConnectionConfiguration | Yes | | -**display_name** | ConnectionDisplayName | Yes | The display name of the Connection. The display name must not be blank. | -**worker** | CreateConnectionRequestConnectionWorker | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/CreateConnectionRequestAsPlaintextValue.md b/docs/v2/Connectivity/models/CreateConnectionRequestAsPlaintextValue.md deleted file mode 100644 index 5531cf785..000000000 --- a/docs/v2/Connectivity/models/CreateConnectionRequestAsPlaintextValue.md +++ /dev/null @@ -1,12 +0,0 @@ -# CreateConnectionRequestAsPlaintextValue - -CreateConnectionRequestAsPlaintextValue - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**value** | PlaintextValue | Yes | | -**type** | Literal["asPlaintextValue"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/CreateConnectionRequestAsSecretName.md b/docs/v2/Connectivity/models/CreateConnectionRequestAsSecretName.md deleted file mode 100644 index e1ffb6efb..000000000 --- a/docs/v2/Connectivity/models/CreateConnectionRequestAsSecretName.md +++ /dev/null @@ -1,12 +0,0 @@ -# CreateConnectionRequestAsSecretName - -CreateConnectionRequestAsSecretName - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**value** | SecretName | Yes | | -**type** | Literal["asSecretName"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/CreateConnectionRequestBasicCredentials.md b/docs/v2/Connectivity/models/CreateConnectionRequestBasicCredentials.md deleted file mode 100644 index 1f7285d6f..000000000 --- a/docs/v2/Connectivity/models/CreateConnectionRequestBasicCredentials.md +++ /dev/null @@ -1,13 +0,0 @@ -# CreateConnectionRequestBasicCredentials - -CreateConnectionRequestBasicCredentials - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**password** | CreateConnectionRequestEncryptedProperty | Yes | | -**username** | str | Yes | | -**type** | Literal["basic"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/CreateConnectionRequestConnectionConfiguration.md b/docs/v2/Connectivity/models/CreateConnectionRequestConnectionConfiguration.md deleted file mode 100644 index 7b5e01354..000000000 --- a/docs/v2/Connectivity/models/CreateConnectionRequestConnectionConfiguration.md +++ /dev/null @@ -1,20 +0,0 @@ -# CreateConnectionRequestConnectionConfiguration - -CreateConnectionRequestConnectionConfiguration - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -CreateConnectionRequestS3ConnectionConfiguration | s3 -CreateConnectionRequestRestConnectionConfiguration | rest -CreateConnectionRequestSnowflakeConnectionConfiguration | snowflake -CreateConnectionRequestDatabricksConnectionConfiguration | databricks -CreateConnectionRequestSmbConnectionConfiguration | smb -CreateConnectionRequestJdbcConnectionConfiguration | jdbc - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/CreateConnectionRequestConnectionWorker.md b/docs/v2/Connectivity/models/CreateConnectionRequestConnectionWorker.md deleted file mode 100644 index accfbb35b..000000000 --- a/docs/v2/Connectivity/models/CreateConnectionRequestConnectionWorker.md +++ /dev/null @@ -1,18 +0,0 @@ -# CreateConnectionRequestConnectionWorker - -[The worker of a Connection](https://palantir.com/docs/foundry/data-connection/core-concepts/#workers), which defines where -compute for capabilities are run. - - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -CreateConnectionRequestUnknownWorker | unknownWorker -CreateConnectionRequestFoundryWorker | foundryWorker - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/CreateConnectionRequestDatabricksAuthenticationMode.md b/docs/v2/Connectivity/models/CreateConnectionRequestDatabricksAuthenticationMode.md deleted file mode 100644 index eb1ad5085..000000000 --- a/docs/v2/Connectivity/models/CreateConnectionRequestDatabricksAuthenticationMode.md +++ /dev/null @@ -1,18 +0,0 @@ -# CreateConnectionRequestDatabricksAuthenticationMode - -The method of authentication for connecting to an external Databricks system. - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -CreateConnectionRequestWorkflowIdentityFederation | workflowIdentityFederation -CreateConnectionRequestOauthMachineToMachineAuth | oauthM2M -CreateConnectionRequestPersonalAccessToken | personalAccessToken -CreateConnectionRequestBasicCredentials | basic - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/CreateConnectionRequestDatabricksConnectionConfiguration.md b/docs/v2/Connectivity/models/CreateConnectionRequestDatabricksConnectionConfiguration.md deleted file mode 100644 index 2554b50e4..000000000 --- a/docs/v2/Connectivity/models/CreateConnectionRequestDatabricksConnectionConfiguration.md +++ /dev/null @@ -1,15 +0,0 @@ -# CreateConnectionRequestDatabricksConnectionConfiguration - -CreateConnectionRequestDatabricksConnectionConfiguration - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**host_name** | str | Yes | The hostname of the Databricks workspace. | -**http_path** | str | Yes | The Databricks compute resource’s HTTP Path value. | -**jdbc_properties** | JdbcProperties | Yes | | -**authentication** | CreateConnectionRequestDatabricksAuthenticationMode | Yes | The method of authentication to use. | -**type** | Literal["databricks"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/CreateConnectionRequestEncryptedProperty.md b/docs/v2/Connectivity/models/CreateConnectionRequestEncryptedProperty.md deleted file mode 100644 index 3ccaa14ba..000000000 --- a/docs/v2/Connectivity/models/CreateConnectionRequestEncryptedProperty.md +++ /dev/null @@ -1,21 +0,0 @@ -# CreateConnectionRequestEncryptedProperty - -When reading an encrypted property, the secret name representing the encrypted value will be returned. -When writing to an encrypted property: -- If a plaintext value is passed as an input, the plaintext value will be encrypted and saved to the property. -- If a secret name is passed as an input, the secret name must match the existing secret name of the property - and the property will retain its previously encrypted value. - - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -CreateConnectionRequestAsSecretName | asSecretName -CreateConnectionRequestAsPlaintextValue | asPlaintextValue - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/CreateConnectionRequestFoundryWorker.md b/docs/v2/Connectivity/models/CreateConnectionRequestFoundryWorker.md deleted file mode 100644 index e1eb25467..000000000 --- a/docs/v2/Connectivity/models/CreateConnectionRequestFoundryWorker.md +++ /dev/null @@ -1,12 +0,0 @@ -# CreateConnectionRequestFoundryWorker - -CreateConnectionRequestFoundryWorker - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**network_egress_policy_rids** | List[NetworkEgressPolicyRid] | Yes | | -**type** | Literal["foundryWorker"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/CreateConnectionRequestJdbcConnectionConfiguration.md b/docs/v2/Connectivity/models/CreateConnectionRequestJdbcConnectionConfiguration.md deleted file mode 100644 index 3c30dc25d..000000000 --- a/docs/v2/Connectivity/models/CreateConnectionRequestJdbcConnectionConfiguration.md +++ /dev/null @@ -1,15 +0,0 @@ -# CreateConnectionRequestJdbcConnectionConfiguration - -CreateConnectionRequestJdbcConnectionConfiguration - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**credentials** | Optional[BasicCredentials] | No | | -**driver_class** | str | Yes | The fully-qualified driver class name that is used to connect to the database. | -**jdbc_properties** | JdbcProperties | Yes | | -**url** | str | Yes | The URL that the JDBC driver uses to connect to a database. | -**type** | Literal["jdbc"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/CreateConnectionRequestOauthMachineToMachineAuth.md b/docs/v2/Connectivity/models/CreateConnectionRequestOauthMachineToMachineAuth.md deleted file mode 100644 index e2adde387..000000000 --- a/docs/v2/Connectivity/models/CreateConnectionRequestOauthMachineToMachineAuth.md +++ /dev/null @@ -1,13 +0,0 @@ -# CreateConnectionRequestOauthMachineToMachineAuth - -CreateConnectionRequestOauthMachineToMachineAuth - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**client_id** | str | Yes | The client ID for the service principal. | -**client_secret** | CreateConnectionRequestEncryptedProperty | Yes | The value of the client secret. | -**type** | Literal["oauthM2M"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/CreateConnectionRequestPersonalAccessToken.md b/docs/v2/Connectivity/models/CreateConnectionRequestPersonalAccessToken.md deleted file mode 100644 index b6c8b7fab..000000000 --- a/docs/v2/Connectivity/models/CreateConnectionRequestPersonalAccessToken.md +++ /dev/null @@ -1,12 +0,0 @@ -# CreateConnectionRequestPersonalAccessToken - -CreateConnectionRequestPersonalAccessToken - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**personal_access_token** | CreateConnectionRequestEncryptedProperty | Yes | | -**type** | Literal["personalAccessToken"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/CreateConnectionRequestRestConnectionConfiguration.md b/docs/v2/Connectivity/models/CreateConnectionRequestRestConnectionConfiguration.md deleted file mode 100644 index d362d778b..000000000 --- a/docs/v2/Connectivity/models/CreateConnectionRequestRestConnectionConfiguration.md +++ /dev/null @@ -1,14 +0,0 @@ -# CreateConnectionRequestRestConnectionConfiguration - -CreateConnectionRequestRestConnectionConfiguration - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**additional_secrets** | Optional[RestConnectionAdditionalSecrets] | No | Additional secrets that can be referenced in code and webhook configurations. If not provided, no additional secrets will be created. | -**oauth2_client_rid** | Optional[RID] | No | The RID of the [Outbound application](https://palantir.com/docs/foundry/administration/configure-outbound-applications) that is used to authenticate to the external system via OAuth2. Currently, a connection may use only one outbound application for OAuth 2.0 authentication. Selecting a different outbound application will update the configuration for all domains with OAuth 2.0 as the selected authorization. | -**domains** | List[Domain] | Yes | The domains that the connection is allowed to access. At least one domain must be specified. | -**type** | Literal["rest"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/CreateConnectionRequestS3ConnectionConfiguration.md b/docs/v2/Connectivity/models/CreateConnectionRequestS3ConnectionConfiguration.md deleted file mode 100644 index 748c75272..000000000 --- a/docs/v2/Connectivity/models/CreateConnectionRequestS3ConnectionConfiguration.md +++ /dev/null @@ -1,25 +0,0 @@ -# CreateConnectionRequestS3ConnectionConfiguration - -CreateConnectionRequestS3ConnectionConfiguration - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**connection_timeout_millis** | Optional[Long] | No | The amount of time (in milliseconds) to wait when initially establishing a connection before giving up and timing out. If not specified, defaults to 10000 as defined by the [AWS SDK default](https://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/ClientConfiguration.html#DEFAULT_CONNECTION_TIMEOUT). | -**max_error_retry** | Optional[int] | No | The maximum number of retry attempts for failed requests to the S3 service. If not specified, defaults to 3 as defined by the [AWS SDK default](https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/retry-strategy.html#retry-strategies). | -**bucket_url** | str | Yes | The URL of the S3 bucket. The URL should contain a trailing slash. | -**client_kms_configuration** | Optional[S3KmsConfiguration] | No | The client-side KMS key to use for encryption and decryption of data in the S3 bucket. If not specified, the default KMS key for the bucket is used. | -**match_subfolder_exactly** | Optional[bool] | No | If true, only files in the subfolder specified in the bucket URL will be synced. If false, all files in the bucket will be synced. If not specified, defaults to false. | -**sts_role_configuration** | Optional[StsRoleConfiguration] | No | The configuration needed to assume a role to connect to the S3 external system. | -**s3_endpoint** | Optional[str] | No | The endpoint of the S3 service. This is used to connect to a custom S3 service that is not AWS S3. If not specified, defaults to the [AWS S3 endpoint](https://docs.aws.amazon.com/general/latest/gr/s3.html). Warning: Specifying a region and a custom endpoint containing a region can lead to unexpected behavior. | -**socket_timeout_millis** | Optional[Long] | No | The amount of time (in milliseconds) to wait for data to be transferred over an established, open connection. If not specified, defaults to 50000 as defined by the [AWS SDK default](https://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/ClientConfiguration.html#DEFAULT_SOCKET_TIMEOUT). | -**enable_requester_pays** | Optional[bool] | No | Defaults to false, unless set and overwritten. If true, includes the [requester pays header](https://docs.aws.amazon.com/AmazonS3/latest/userguide/RequesterPaysBuckets.html) in requests, allowing reads from requester pays buckets. | -**s3_endpoint_signing_region** | Optional[Region] | No | The region used when constructing the S3 client using a custom endpoint. This is often not required and would only be needed if you are using the S3 connector with an S3-compliant third-party API, and are also setting a custom endpoint that requires a non-default region. | -**region** | Optional[Region] | No | The region representing the location of the S3 bucket. Warning: Specifying a region and a custom endpoint containing a region can lead to unexpected behavior. | -**authentication_mode** | Optional[S3AuthenticationMode] | No | The authentication mode to use to connect to the S3 external system. No authentication mode is required to connect to publicly accessible AWS S3 buckets. | -**proxy_configuration** | Optional[S3ProxyConfiguration] | No | The configuration needed to connect to the S3 external system through a proxy. | -**max_connections** | Optional[int] | No | The maximum number of HTTP connections to the S3 service per sync. If not specified, defaults to 50 as defined by the [AWS SDK default](https://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/ClientConfiguration.html#DEFAULT_MAX_CONNECTIONS). | -**type** | Literal["s3"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/CreateConnectionRequestSmbAuth.md b/docs/v2/Connectivity/models/CreateConnectionRequestSmbAuth.md deleted file mode 100644 index 99606a5b7..000000000 --- a/docs/v2/Connectivity/models/CreateConnectionRequestSmbAuth.md +++ /dev/null @@ -1,11 +0,0 @@ -# CreateConnectionRequestSmbAuth - -CreateConnectionRequestSmbAuth - -## Type -```python -CreateConnectionRequestSmbUsernamePasswordAuth -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/CreateConnectionRequestSmbConnectionConfiguration.md b/docs/v2/Connectivity/models/CreateConnectionRequestSmbConnectionConfiguration.md deleted file mode 100644 index cd77d46ec..000000000 --- a/docs/v2/Connectivity/models/CreateConnectionRequestSmbConnectionConfiguration.md +++ /dev/null @@ -1,18 +0,0 @@ -# CreateConnectionRequestSmbConnectionConfiguration - -CreateConnectionRequestSmbConnectionConfiguration - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**proxy** | Optional[SmbProxyConfiguration] | No | | -**hostname** | str | Yes | Any identifier that can resolve to a server hosting an SMB share. This includes IP addresses, local network names (e.g. FS-SERVER-01) or FQDNs. Should not include any protocol information like https://, smb://, etc | -**port** | Optional[int] | No | 445 by default | -**auth** | CreateConnectionRequestSmbAuth | Yes | | -**share** | str | Yes | Must be a valid SMB share name. https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-fscc/dc9978d7-6299-4c5a-a22d-a039cdc716ea | -**base_directory** | Optional[str] | No | All reads and writes in this source will happen in this subdirectory | -**require_message_signing** | Optional[bool] | No | If true, the client will request that the server sign all messages. If the server does not support message signing, the connection will fail. Defaults to true. | -**type** | Literal["smb"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/CreateConnectionRequestSmbUsernamePasswordAuth.md b/docs/v2/Connectivity/models/CreateConnectionRequestSmbUsernamePasswordAuth.md deleted file mode 100644 index 0f6a3b20f..000000000 --- a/docs/v2/Connectivity/models/CreateConnectionRequestSmbUsernamePasswordAuth.md +++ /dev/null @@ -1,14 +0,0 @@ -# CreateConnectionRequestSmbUsernamePasswordAuth - -CreateConnectionRequestSmbUsernamePasswordAuth - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**password** | CreateConnectionRequestEncryptedProperty | Yes | | -**domain** | Optional[str] | No | Optionally specify a Windows domain to use when authenticating. Normal DNS domain restrictions apply but the top-level domain might be something non-standard like .local. Defaults to WORKGROUP | -**username** | str | Yes | | -**type** | Literal["usernamePassword"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/CreateConnectionRequestSnowflakeAuthenticationMode.md b/docs/v2/Connectivity/models/CreateConnectionRequestSnowflakeAuthenticationMode.md deleted file mode 100644 index 77e53f401..000000000 --- a/docs/v2/Connectivity/models/CreateConnectionRequestSnowflakeAuthenticationMode.md +++ /dev/null @@ -1,17 +0,0 @@ -# CreateConnectionRequestSnowflakeAuthenticationMode - -CreateConnectionRequestSnowflakeAuthenticationMode - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -CreateConnectionRequestSnowflakeExternalOauth | externalOauth -CreateConnectionRequestSnowflakeKeyPairAuthentication | keyPair -CreateConnectionRequestBasicCredentials | basic - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/CreateConnectionRequestSnowflakeConnectionConfiguration.md b/docs/v2/Connectivity/models/CreateConnectionRequestSnowflakeConnectionConfiguration.md deleted file mode 100644 index 5d6cfceb7..000000000 --- a/docs/v2/Connectivity/models/CreateConnectionRequestSnowflakeConnectionConfiguration.md +++ /dev/null @@ -1,18 +0,0 @@ -# CreateConnectionRequestSnowflakeConnectionConfiguration - -CreateConnectionRequestSnowflakeConnectionConfiguration - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**schema_** | Optional[str] | No | Specifies the default schema to use for the specified database once connected. If unspecified, defaults to the empty string. The specified schema should be an existing schema for which the specified default role has privileges. See https://docs.snowflake.com/developer-guide/jdbc/jdbc-parameters#schema | -**database** | Optional[str] | No | Specifies the default database to use once connected. If unspecified, defaults to the empty string. The specified database should be an existing database for which the specified default role has privileges. See https://docs.snowflake.com/developer-guide/jdbc/jdbc-parameters#db | -**role** | Optional[str] | No | Specifies the default access control role to use in the Snowflake session initiated by the driver. If unspecified, no role will be used when the session is initiated by the driver. The specified role should be an existing role that has already been assigned to the specified user for the driver. If the specified role has not already been assigned to the user, the role is not used when the session is initiated by the driver. See https://docs.snowflake.com/developer-guide/jdbc/jdbc-parameters#role | -**account_identifier** | str | Yes | An [account identifier](https://docs.snowflake.com/en/user-guide/admin-account-identifier) uniquely identifies a Snowflake account within your organization, as well as throughout the global network of Snowflake-supported cloud platforms and cloud regions. The URL for an account uses the following format: .snowflakecomputing.com. An example URL is https://acme-test_aws_us_east_2.snowflakecomputing.com. | -**jdbc_properties** | JdbcProperties | Yes | | -**warehouse** | Optional[str] | No | Specifies the virtual warehouse to use once connected. If unspecified, defaults to the empty string. The specified warehouse should be an existing warehouse for which the specified default role has privileges. See https://docs.snowflake.com/developer-guide/jdbc/jdbc-parameters#warehouse | -**authentication_mode** | CreateConnectionRequestSnowflakeAuthenticationMode | Yes | The authentication mode to use to connect to the Snowflake database. | -**type** | Literal["snowflake"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/CreateConnectionRequestSnowflakeExternalOauth.md b/docs/v2/Connectivity/models/CreateConnectionRequestSnowflakeExternalOauth.md deleted file mode 100644 index d3296205b..000000000 --- a/docs/v2/Connectivity/models/CreateConnectionRequestSnowflakeExternalOauth.md +++ /dev/null @@ -1,11 +0,0 @@ -# CreateConnectionRequestSnowflakeExternalOauth - -CreateConnectionRequestSnowflakeExternalOauth - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["externalOauth"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/CreateConnectionRequestSnowflakeKeyPairAuthentication.md b/docs/v2/Connectivity/models/CreateConnectionRequestSnowflakeKeyPairAuthentication.md deleted file mode 100644 index 50b7ef5a9..000000000 --- a/docs/v2/Connectivity/models/CreateConnectionRequestSnowflakeKeyPairAuthentication.md +++ /dev/null @@ -1,13 +0,0 @@ -# CreateConnectionRequestSnowflakeKeyPairAuthentication - -CreateConnectionRequestSnowflakeKeyPairAuthentication - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**private_key** | CreateConnectionRequestEncryptedProperty | Yes | | -**user** | str | Yes | | -**type** | Literal["keyPair"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/CreateConnectionRequestUnknownWorker.md b/docs/v2/Connectivity/models/CreateConnectionRequestUnknownWorker.md deleted file mode 100644 index 6396d62a4..000000000 --- a/docs/v2/Connectivity/models/CreateConnectionRequestUnknownWorker.md +++ /dev/null @@ -1,11 +0,0 @@ -# CreateConnectionRequestUnknownWorker - -CreateConnectionRequestUnknownWorker - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["unknownWorker"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/CreateConnectionRequestWorkflowIdentityFederation.md b/docs/v2/Connectivity/models/CreateConnectionRequestWorkflowIdentityFederation.md deleted file mode 100644 index e8b43e823..000000000 --- a/docs/v2/Connectivity/models/CreateConnectionRequestWorkflowIdentityFederation.md +++ /dev/null @@ -1,13 +0,0 @@ -# CreateConnectionRequestWorkflowIdentityFederation - -CreateConnectionRequestWorkflowIdentityFederation - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**audience** | str | Yes | Identifies the recipients that the access token is intended for as a string URI. This should be the primary host name where the Connection lives. | -**service_principal_application_id** | Optional[str] | No | The ID of the Databricks [service principal](https://docs.databricks.com/aws/en/admin/users-groups/service-principals). If provided, a federated JWT token is exchanged using a service principal federation policy. If not provided, a federated JWT token is exchanged using an account federation policy. | -**type** | Literal["workflowIdentityFederation"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/CreateFileImportRequest.md b/docs/v2/Connectivity/models/CreateFileImportRequest.md deleted file mode 100644 index 0118608e1..000000000 --- a/docs/v2/Connectivity/models/CreateFileImportRequest.md +++ /dev/null @@ -1,16 +0,0 @@ -# CreateFileImportRequest - -CreateFileImportRequest - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**dataset_rid** | DatasetRid | Yes | The RID of the output dataset. Can not be modified after the file import is created. | -**import_mode** | FileImportMode | Yes | | -**display_name** | FileImportDisplayName | Yes | | -**branch_name** | Optional[BranchName] | No | The branch name in the output dataset that will contain the imported data. Defaults to `master` for most enrollments. Can not be modified after the file import is created. | -**subfolder** | Optional[str] | No | A subfolder in the external system that will be imported. If not specified, defaults to the root folder of the external system. | -**file_import_filters** | List[FileImportFilter] | Yes | Use filters to limit which files should be imported. Filters are applied in the order they are defined. A different ordering of filters may lead to a more optimized import. [Learn more about optimizing file imports.](https://palantir.com/docs/foundry/data-connection/file-based-syncs/#optimize-file-based-syncs) | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/CreateTableImportRequest.md b/docs/v2/Connectivity/models/CreateTableImportRequest.md deleted file mode 100644 index 60569fae0..000000000 --- a/docs/v2/Connectivity/models/CreateTableImportRequest.md +++ /dev/null @@ -1,16 +0,0 @@ -# CreateTableImportRequest - -CreateTableImportRequest - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**dataset_rid** | DatasetRid | Yes | The RID of the output dataset. Can not be modified after the table import is created. | -**import_mode** | TableImportMode | Yes | | -**display_name** | TableImportDisplayName | Yes | | -**allow_schema_changes** | Optional[TableImportAllowSchemaChanges] | No | Allow the TableImport to succeed if the schema of imported rows does not match the existing dataset's schema. Defaults to false for new table imports. | -**branch_name** | Optional[BranchName] | No | The branch name in the output dataset that will contain the imported data. Defaults to `master` for most enrollments. Can not be modified after the table import is created. | -**config** | CreateTableImportRequestTableImportConfig | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/CreateTableImportRequestDatabricksTableImportConfig.md b/docs/v2/Connectivity/models/CreateTableImportRequestDatabricksTableImportConfig.md deleted file mode 100644 index 4295a8e96..000000000 --- a/docs/v2/Connectivity/models/CreateTableImportRequestDatabricksTableImportConfig.md +++ /dev/null @@ -1,13 +0,0 @@ -# CreateTableImportRequestDatabricksTableImportConfig - -CreateTableImportRequestDatabricksTableImportConfig - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**initial_incremental_state** | Optional[TableImportInitialIncrementalState] | No | | -**query** | TableImportQuery | Yes | | -**type** | Literal["databricksImportConfig"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/CreateTableImportRequestJdbcTableImportConfig.md b/docs/v2/Connectivity/models/CreateTableImportRequestJdbcTableImportConfig.md deleted file mode 100644 index c3d270fe9..000000000 --- a/docs/v2/Connectivity/models/CreateTableImportRequestJdbcTableImportConfig.md +++ /dev/null @@ -1,13 +0,0 @@ -# CreateTableImportRequestJdbcTableImportConfig - -CreateTableImportRequestJdbcTableImportConfig - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**initial_incremental_state** | Optional[TableImportInitialIncrementalState] | No | | -**query** | TableImportQuery | Yes | | -**type** | Literal["jdbcImportConfig"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/CreateTableImportRequestMicrosoftAccessTableImportConfig.md b/docs/v2/Connectivity/models/CreateTableImportRequestMicrosoftAccessTableImportConfig.md deleted file mode 100644 index 8afb551b9..000000000 --- a/docs/v2/Connectivity/models/CreateTableImportRequestMicrosoftAccessTableImportConfig.md +++ /dev/null @@ -1,13 +0,0 @@ -# CreateTableImportRequestMicrosoftAccessTableImportConfig - -CreateTableImportRequestMicrosoftAccessTableImportConfig - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**initial_incremental_state** | Optional[TableImportInitialIncrementalState] | No | | -**query** | TableImportQuery | Yes | | -**type** | Literal["microsoftAccessImportConfig"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/CreateTableImportRequestMicrosoftSqlServerTableImportConfig.md b/docs/v2/Connectivity/models/CreateTableImportRequestMicrosoftSqlServerTableImportConfig.md deleted file mode 100644 index 7c2fc7344..000000000 --- a/docs/v2/Connectivity/models/CreateTableImportRequestMicrosoftSqlServerTableImportConfig.md +++ /dev/null @@ -1,13 +0,0 @@ -# CreateTableImportRequestMicrosoftSqlServerTableImportConfig - -CreateTableImportRequestMicrosoftSqlServerTableImportConfig - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**initial_incremental_state** | Optional[TableImportInitialIncrementalState] | No | | -**query** | TableImportQuery | Yes | | -**type** | Literal["microsoftSqlServerImportConfig"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/CreateTableImportRequestOracleTableImportConfig.md b/docs/v2/Connectivity/models/CreateTableImportRequestOracleTableImportConfig.md deleted file mode 100644 index 1859da369..000000000 --- a/docs/v2/Connectivity/models/CreateTableImportRequestOracleTableImportConfig.md +++ /dev/null @@ -1,13 +0,0 @@ -# CreateTableImportRequestOracleTableImportConfig - -CreateTableImportRequestOracleTableImportConfig - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**initial_incremental_state** | Optional[TableImportInitialIncrementalState] | No | | -**query** | TableImportQuery | Yes | | -**type** | Literal["oracleImportConfig"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/CreateTableImportRequestPostgreSqlTableImportConfig.md b/docs/v2/Connectivity/models/CreateTableImportRequestPostgreSqlTableImportConfig.md deleted file mode 100644 index 140697f0a..000000000 --- a/docs/v2/Connectivity/models/CreateTableImportRequestPostgreSqlTableImportConfig.md +++ /dev/null @@ -1,13 +0,0 @@ -# CreateTableImportRequestPostgreSqlTableImportConfig - -CreateTableImportRequestPostgreSqlTableImportConfig - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**initial_incremental_state** | Optional[TableImportInitialIncrementalState] | No | | -**query** | TableImportQuery | Yes | | -**type** | Literal["postgreSqlImportConfig"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/CreateTableImportRequestSnowflakeTableImportConfig.md b/docs/v2/Connectivity/models/CreateTableImportRequestSnowflakeTableImportConfig.md deleted file mode 100644 index 9dfe05ae0..000000000 --- a/docs/v2/Connectivity/models/CreateTableImportRequestSnowflakeTableImportConfig.md +++ /dev/null @@ -1,13 +0,0 @@ -# CreateTableImportRequestSnowflakeTableImportConfig - -CreateTableImportRequestSnowflakeTableImportConfig - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**initial_incremental_state** | Optional[TableImportInitialIncrementalState] | No | | -**query** | TableImportQuery | Yes | | -**type** | Literal["snowflakeImportConfig"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/CreateTableImportRequestTableImportConfig.md b/docs/v2/Connectivity/models/CreateTableImportRequestTableImportConfig.md deleted file mode 100644 index 0922f3d95..000000000 --- a/docs/v2/Connectivity/models/CreateTableImportRequestTableImportConfig.md +++ /dev/null @@ -1,22 +0,0 @@ -# CreateTableImportRequestTableImportConfig - -The import configuration for a specific [connector type](https://palantir.com/docs/foundry/data-integration/source-type-overview). - - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -CreateTableImportRequestDatabricksTableImportConfig | databricksImportConfig -CreateTableImportRequestJdbcTableImportConfig | jdbcImportConfig -CreateTableImportRequestMicrosoftSqlServerTableImportConfig | microsoftSqlServerImportConfig -CreateTableImportRequestPostgreSqlTableImportConfig | postgreSqlImportConfig -CreateTableImportRequestMicrosoftAccessTableImportConfig | microsoftAccessImportConfig -CreateTableImportRequestSnowflakeTableImportConfig | snowflakeImportConfig -CreateTableImportRequestOracleTableImportConfig | oracleImportConfig - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/CreateVirtualTableRequest.md b/docs/v2/Connectivity/models/CreateVirtualTableRequest.md deleted file mode 100644 index fc18de6c4..000000000 --- a/docs/v2/Connectivity/models/CreateVirtualTableRequest.md +++ /dev/null @@ -1,14 +0,0 @@ -# CreateVirtualTableRequest - -CreateVirtualTableRequest - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**markings** | Optional[List[MarkingId]] | No | | -**parent_rid** | FolderRid | Yes | | -**name** | TableName | Yes | | -**config** | VirtualTableConfig | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/DatabricksAuthenticationMode.md b/docs/v2/Connectivity/models/DatabricksAuthenticationMode.md deleted file mode 100644 index 0df868a0a..000000000 --- a/docs/v2/Connectivity/models/DatabricksAuthenticationMode.md +++ /dev/null @@ -1,18 +0,0 @@ -# DatabricksAuthenticationMode - -The method of authentication for connecting to an external Databricks system. - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -WorkflowIdentityFederation | workflowIdentityFederation -OauthMachineToMachineAuth | oauthM2M -PersonalAccessToken | personalAccessToken -BasicCredentials | basic - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/DatabricksConnectionConfiguration.md b/docs/v2/Connectivity/models/DatabricksConnectionConfiguration.md deleted file mode 100644 index 3626ff967..000000000 --- a/docs/v2/Connectivity/models/DatabricksConnectionConfiguration.md +++ /dev/null @@ -1,18 +0,0 @@ -# DatabricksConnectionConfiguration - -The configuration needed to connect to a [Databricks external system](https://palantir.com/docs/foundry/available-connectors/databricks). -Refer to the [official Databricks documentation](https://docs.databricks.com/aws/en/integrations/compute-details) -for more information on how to obtain connection details for your system. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**host_name** | str | Yes | The hostname of the Databricks workspace. | -**http_path** | str | Yes | The Databricks compute resource’s HTTP Path value. | -**authentication** | DatabricksAuthenticationMode | Yes | The method of authentication to use. | -**jdbc_properties** | JdbcProperties | Yes | | -**type** | Literal["databricks"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/DatabricksTableImportConfig.md b/docs/v2/Connectivity/models/DatabricksTableImportConfig.md deleted file mode 100644 index 032d744df..000000000 --- a/docs/v2/Connectivity/models/DatabricksTableImportConfig.md +++ /dev/null @@ -1,14 +0,0 @@ -# DatabricksTableImportConfig - -The table import configuration for a [Databricks connection](https://palantir.com/docs/foundry/available-connectors/databricks). - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**query** | TableImportQuery | Yes | | -**initial_incremental_state** | Optional[TableImportInitialIncrementalState] | No | | -**type** | Literal["databricksImportConfig"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/DateColumnInitialIncrementalState.md b/docs/v2/Connectivity/models/DateColumnInitialIncrementalState.md deleted file mode 100644 index 47aa9604c..000000000 --- a/docs/v2/Connectivity/models/DateColumnInitialIncrementalState.md +++ /dev/null @@ -1,14 +0,0 @@ -# DateColumnInitialIncrementalState - -The state for an incremental table import using a column with a date type. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**column_name** | str | Yes | | -**current_value** | date | Yes | The initial incremental state value for the date column to reference in the query. | -**type** | Literal["dateColumnInitialIncrementalState"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/DecimalColumnInitialIncrementalState.md b/docs/v2/Connectivity/models/DecimalColumnInitialIncrementalState.md deleted file mode 100644 index e71cd4d31..000000000 --- a/docs/v2/Connectivity/models/DecimalColumnInitialIncrementalState.md +++ /dev/null @@ -1,14 +0,0 @@ -# DecimalColumnInitialIncrementalState - -The state for an incremental table import using a column with a decimal data type. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**column_name** | str | Yes | | -**current_value** | decimal.Decimal | Yes | The initial incremental state value for the decimal column to reference in the query. | -**type** | Literal["decimalColumnInitialIncrementalState"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/DeltaVirtualTableConfig.md b/docs/v2/Connectivity/models/DeltaVirtualTableConfig.md deleted file mode 100644 index 195c34aa9..000000000 --- a/docs/v2/Connectivity/models/DeltaVirtualTableConfig.md +++ /dev/null @@ -1,12 +0,0 @@ -# DeltaVirtualTableConfig - -Pointer to the Delta table in cloud object storage (e.g., Azure Data Lake Storage, Google Cloud Storage, S3). - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**path** | str | Yes | The path of the Delta table in object storage. | -**type** | Literal["delta"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/Domain.md b/docs/v2/Connectivity/models/Domain.md deleted file mode 100644 index 3151c8bcd..000000000 --- a/docs/v2/Connectivity/models/Domain.md +++ /dev/null @@ -1,14 +0,0 @@ -# Domain - -The domain that the connection is allowed to access. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**scheme** | Optional[UriScheme] | No | The scheme of the domain that the connection is allowed to access. If not specified, defaults to HTTPS. | -**host** | str | Yes | The domain name, IPv4, or IPv6 address. | -**port** | Optional[int] | No | The port number of the domain that the connection is allowed to access. | -**auth** | Optional[RestAuthenticationMode] | No | The URI scheme must be HTTPS if using any authentication. If not specified, no authentication is required. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/EncryptedProperty.md b/docs/v2/Connectivity/models/EncryptedProperty.md deleted file mode 100644 index 2f165a3b4..000000000 --- a/docs/v2/Connectivity/models/EncryptedProperty.md +++ /dev/null @@ -1,21 +0,0 @@ -# EncryptedProperty - -When reading an encrypted property, the secret name representing the encrypted value will be returned. -When writing to an encrypted property: -- If a plaintext value is passed as an input, the plaintext value will be encrypted and saved to the property. -- If a secret name is passed as an input, the secret name must match the existing secret name of the property - and the property will retain its previously encrypted value. - - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -AsSecretName | asSecretName -AsPlaintextValue | asPlaintextValue - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/FileAnyPathMatchesFilter.md b/docs/v2/Connectivity/models/FileAnyPathMatchesFilter.md deleted file mode 100644 index 487adcd56..000000000 --- a/docs/v2/Connectivity/models/FileAnyPathMatchesFilter.md +++ /dev/null @@ -1,13 +0,0 @@ -# FileAnyPathMatchesFilter - -If any file has a relative path matching the regular expression, sync all files in the subfolder that are not otherwise filtered. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**regex** | str | Yes | The regular expression for the relative path to match against. | -**type** | Literal["anyPathMatchesFilter"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/FileAtLeastCountFilter.md b/docs/v2/Connectivity/models/FileAtLeastCountFilter.md deleted file mode 100644 index 4fd429de3..000000000 --- a/docs/v2/Connectivity/models/FileAtLeastCountFilter.md +++ /dev/null @@ -1,12 +0,0 @@ -# FileAtLeastCountFilter - -Import all filtered files only if there are at least the specified number of files remaining. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**min_files_count** | int | Yes | The minimum number of files remaining expected. The value specified must be greater than 0. | -**type** | Literal["atLeastCountFilter"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/FileChangedSinceLastUploadFilter.md b/docs/v2/Connectivity/models/FileChangedSinceLastUploadFilter.md deleted file mode 100644 index e95d0dccd..000000000 --- a/docs/v2/Connectivity/models/FileChangedSinceLastUploadFilter.md +++ /dev/null @@ -1,14 +0,0 @@ -# FileChangedSinceLastUploadFilter - -Only import files that have changed or been added since the last import run. Whether or not a file is considered to be changed is determined by the specified file properties. -This will exclude files uploaded in any previous imports, regardless of the file import mode used. A SNAPSHOT file import mode does not reset the filter. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**file_properties** | List[FileProperty] | Yes | The criteria on which to determine whether a file has been changed or not since the last import. If any of the specified criteria have changed, the file is consider changed. The criteria include: LAST_MODIFIED: The file's last modified timestamp has changed since the last import. SIZE: The file's size has changed since the last import. If no criteria are specified, only newly added files will be imported. | -**type** | Literal["changedSinceLastUploadFilter"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/FileFormat.md b/docs/v2/Connectivity/models/FileFormat.md deleted file mode 100644 index e24dc4825..000000000 --- a/docs/v2/Connectivity/models/FileFormat.md +++ /dev/null @@ -1,13 +0,0 @@ -# FileFormat - -The format of files in the upstream source. - - -| **Value** | -| --------- | -| `"AVRO"` | -| `"CSV"` | -| `"PARQUET"` | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/FileImport.md b/docs/v2/Connectivity/models/FileImport.md deleted file mode 100644 index 67a3345d1..000000000 --- a/docs/v2/Connectivity/models/FileImport.md +++ /dev/null @@ -1,18 +0,0 @@ -# FileImport - -FileImport - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**rid** | FileImportRid | Yes | | -**connection_rid** | ConnectionRid | Yes | The RID of the Connection (also known as a source) that the File Import uses to import data. | -**dataset_rid** | DatasetRid | Yes | The RID of the output dataset. Can not be modified after the file import is created. | -**branch_name** | Optional[BranchName] | No | The branch name in the output dataset that will contain the imported data. Defaults to `master` for most enrollments. Can not be modified after the file import is created. | -**display_name** | FileImportDisplayName | Yes | | -**file_import_filters** | List[FileImportFilter] | Yes | Use filters to limit which files should be imported. Filters are applied in the order they are defined. A different ordering of filters may lead to a more optimized import. [Learn more about optimizing file imports.](https://palantir.com/docs/foundry/data-connection/file-based-syncs/#optimize-file-based-syncs) | -**import_mode** | FileImportMode | Yes | | -**subfolder** | Optional[str] | No | A subfolder in the external system that will be imported. If not specified, defaults to the root folder of the external system. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/FileImportCustomFilter.md b/docs/v2/Connectivity/models/FileImportCustomFilter.md deleted file mode 100644 index f3eeea218..000000000 --- a/docs/v2/Connectivity/models/FileImportCustomFilter.md +++ /dev/null @@ -1,14 +0,0 @@ -# FileImportCustomFilter - -A custom file import filter. Custom file import filters can be fetched but cannot currently be used -when creating or updating file imports. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**config** | Any | Yes | | -**type** | Literal["customFilter"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/FileImportDisplayName.md b/docs/v2/Connectivity/models/FileImportDisplayName.md deleted file mode 100644 index 04b25f9f9..000000000 --- a/docs/v2/Connectivity/models/FileImportDisplayName.md +++ /dev/null @@ -1,11 +0,0 @@ -# FileImportDisplayName - -FileImportDisplayName - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/FileImportFilter.md b/docs/v2/Connectivity/models/FileImportFilter.md deleted file mode 100644 index e72d6f0f1..000000000 --- a/docs/v2/Connectivity/models/FileImportFilter.md +++ /dev/null @@ -1,25 +0,0 @@ -# FileImportFilter - -[Filters](https://palantir.com/docs/foundry/data-connection/file-based-syncs/#filters) allow you to filter source files -before they are imported into Foundry. - - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -FilePathNotMatchesFilter | pathNotMatchesFilter -FileAnyPathMatchesFilter | anyPathMatchesFilter -FilesCountLimitFilter | filesCountLimitFilter -FileChangedSinceLastUploadFilter | changedSinceLastUploadFilter -FileImportCustomFilter | customFilter -FileLastModifiedAfterFilter | lastModifiedAfterFilter -FilePathMatchesFilter | pathMatchesFilter -FileAtLeastCountFilter | atLeastCountFilter -FileSizeFilter | fileSizeFilter - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/FileImportMode.md b/docs/v2/Connectivity/models/FileImportMode.md deleted file mode 100644 index 56cc20d66..000000000 --- a/docs/v2/Connectivity/models/FileImportMode.md +++ /dev/null @@ -1,17 +0,0 @@ -# FileImportMode - -Import mode governs how raw files are read from an external system, and written into a Foundry dataset. - -SNAPSHOT: Defines a new dataset state consisting only of files from a particular import execution. -APPEND: Purely additive and yields data from previous import executions in addition to newly added files. -UPDATE: Replaces existing files from previous import executions based on file names. - - -| **Value** | -| --------- | -| `"SNAPSHOT"` | -| `"APPEND"` | -| `"UPDATE"` | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/FileImportRid.md b/docs/v2/Connectivity/models/FileImportRid.md deleted file mode 100644 index 18e555783..000000000 --- a/docs/v2/Connectivity/models/FileImportRid.md +++ /dev/null @@ -1,12 +0,0 @@ -# FileImportRid - -The Resource Identifier (RID) of a FileImport (also known as a batch sync). - - -## Type -```python -RID -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/FileLastModifiedAfterFilter.md b/docs/v2/Connectivity/models/FileLastModifiedAfterFilter.md deleted file mode 100644 index 3ec699585..000000000 --- a/docs/v2/Connectivity/models/FileLastModifiedAfterFilter.md +++ /dev/null @@ -1,13 +0,0 @@ -# FileLastModifiedAfterFilter - -Only import files that have been modified after a specified timestamp - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**after_timestamp** | Optional[datetime] | No | Timestamp threshold, specified in ISO-8601 format. If not specified, defaults to the timestamp the filter is added to the file import. | -**type** | Literal["lastModifiedAfterFilter"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/FilePathMatchesFilter.md b/docs/v2/Connectivity/models/FilePathMatchesFilter.md deleted file mode 100644 index 1731d2a7d..000000000 --- a/docs/v2/Connectivity/models/FilePathMatchesFilter.md +++ /dev/null @@ -1,22 +0,0 @@ -# FilePathMatchesFilter - -Only import files whose path (relative to the root of the source) matches the regular expression. - -**Example** -Suppose we are importing files from `relative/subfolder`. -`relative/subfolder` contains: -- `relative/subfolder/include-file.txt` -- `relative/subfolder/exclude-file.txt` -- `relative/subfolder/other-file.txt` - -With the `relative/subfolder/include-.*.txt` regex, only `relative/subfolder/include-file.txt` will be imported. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**regex** | str | Yes | Must be written to match the paths relative to the root of the source, even if a subfolder is specified. | -**type** | Literal["pathMatchesFilter"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/FilePathNotMatchesFilter.md b/docs/v2/Connectivity/models/FilePathNotMatchesFilter.md deleted file mode 100644 index 4ae3f0d91..000000000 --- a/docs/v2/Connectivity/models/FilePathNotMatchesFilter.md +++ /dev/null @@ -1,23 +0,0 @@ -# FilePathNotMatchesFilter - -Only import files whose path (relative to the root of the source) does not match the regular expression. - -**Example** -Suppose we are importing files from `relative/subfolder`. -`relative/subfolder` contains: -- `relative/subfolder/include-file.txt` -- `relative/subfolder/exclude-file.txt` -- `relative/subfolder/other-file.txt` - -With the `relative/subfolder/exclude-.*.txt` regex, both `relative/subfolder/include-file.txt` and `relative/subfolder/other-file.txt` will be imported, -and `relative/subfolder/exclude-file.txt` will be excluded from the import. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**regex** | str | Yes | Must be written to match the paths relative to the root of the source, even if a subfolder is specified. | -**type** | Literal["pathNotMatchesFilter"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/FileProperty.md b/docs/v2/Connectivity/models/FileProperty.md deleted file mode 100644 index 3f8916b15..000000000 --- a/docs/v2/Connectivity/models/FileProperty.md +++ /dev/null @@ -1,11 +0,0 @@ -# FileProperty - -FileProperty - -| **Value** | -| --------- | -| `"LAST_MODIFIED"` | -| `"SIZE"` | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/FileSizeFilter.md b/docs/v2/Connectivity/models/FileSizeFilter.md deleted file mode 100644 index 12d299ee7..000000000 --- a/docs/v2/Connectivity/models/FileSizeFilter.md +++ /dev/null @@ -1,16 +0,0 @@ -# FileSizeFilter - -Only import files whose size is between the specified minimum and maximum values. -At least one of `gt` or `lt` should be present. -If both are present, the value specified for `gt` must be strictly less than `lt - 1`. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**gt** | Optional[SizeBytes] | No | File size must be greater than this number for it to be imported. The value specified cannot be a negative number. | -**lt** | Optional[SizeBytes] | No | File size must be less than this number for it to be imported. The value specified must be at least 1 byte. | -**type** | Literal["fileSizeFilter"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/FilesCountLimitFilter.md b/docs/v2/Connectivity/models/FilesCountLimitFilter.md deleted file mode 100644 index f546359e4..000000000 --- a/docs/v2/Connectivity/models/FilesCountLimitFilter.md +++ /dev/null @@ -1,15 +0,0 @@ -# FilesCountLimitFilter - -Only retain `filesCount` number of files in each transaction. -The choice of files to retain is made without any guarantee of order. -This option can increase the reliability of incremental syncs. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**files_count** | int | Yes | The number of files to import in the transaction. The value specified must be positive. | -**type** | Literal["filesCountLimitFilter"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/FilesVirtualTableConfig.md b/docs/v2/Connectivity/models/FilesVirtualTableConfig.md deleted file mode 100644 index f5668e7c3..000000000 --- a/docs/v2/Connectivity/models/FilesVirtualTableConfig.md +++ /dev/null @@ -1,13 +0,0 @@ -# FilesVirtualTableConfig - -Pointer to the table in cloud object storage (e.g., Azure Data Lake Storage, Google Cloud Storage, S3). - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**format** | FileFormat | Yes | | -**path** | str | Yes | Storage path for the data in the underlying file system, i.e. paths like `/foo/bar`. The scheme is not included. May be either a folder or file. A non-partitioned table will have a single location. A partitioned table can have multiple locations, one for each partition. | -**type** | Literal["files"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/FoundryWorker.md b/docs/v2/Connectivity/models/FoundryWorker.md deleted file mode 100644 index f80aa291a..000000000 --- a/docs/v2/Connectivity/models/FoundryWorker.md +++ /dev/null @@ -1,16 +0,0 @@ -# FoundryWorker - -The [Foundry worker](https://palantir.com/docs/foundry/data-connection/core-concepts/#foundry-worker) is used to run capabilities -in Foundry. -This is the preferred method for connections, as these connections benefit from Foundry's containerized -and scalable job execution, improved stability and do not incur the maintenance overhead associated with agents. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**network_egress_policy_rids** | List[NetworkEgressPolicyRid] | Yes | | -**type** | Literal["foundryWorker"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/GetConfigurationConnectionsBatchRequestElement.md b/docs/v2/Connectivity/models/GetConfigurationConnectionsBatchRequestElement.md deleted file mode 100644 index b5c5857fb..000000000 --- a/docs/v2/Connectivity/models/GetConfigurationConnectionsBatchRequestElement.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetConfigurationConnectionsBatchRequestElement - -GetConfigurationConnectionsBatchRequestElement - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**connection_rid** | ConnectionRid | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/GetConfigurationConnectionsBatchResponse.md b/docs/v2/Connectivity/models/GetConfigurationConnectionsBatchResponse.md deleted file mode 100644 index d4eb90d74..000000000 --- a/docs/v2/Connectivity/models/GetConfigurationConnectionsBatchResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetConfigurationConnectionsBatchResponse - -GetConfigurationConnectionsBatchResponse - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**data** | Dict[ConnectionRid, ConnectionConfiguration] | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/GlueVirtualTableConfig.md b/docs/v2/Connectivity/models/GlueVirtualTableConfig.md deleted file mode 100644 index f7a690c9a..000000000 --- a/docs/v2/Connectivity/models/GlueVirtualTableConfig.md +++ /dev/null @@ -1,13 +0,0 @@ -# GlueVirtualTableConfig - -Pointer to the table in AWS Glue. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**database** | str | Yes | The database name. | -**table** | str | Yes | The table name. | -**type** | Literal["glue"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/HeaderApiKey.md b/docs/v2/Connectivity/models/HeaderApiKey.md deleted file mode 100644 index af8b74bf2..000000000 --- a/docs/v2/Connectivity/models/HeaderApiKey.md +++ /dev/null @@ -1,12 +0,0 @@ -# HeaderApiKey - -HeaderApiKey - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**header_name** | str | Yes | The name of the header that the API key is passed in. | -**type** | Literal["header"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/IcebergVirtualTableConfig.md b/docs/v2/Connectivity/models/IcebergVirtualTableConfig.md deleted file mode 100644 index d02dc2e18..000000000 --- a/docs/v2/Connectivity/models/IcebergVirtualTableConfig.md +++ /dev/null @@ -1,13 +0,0 @@ -# IcebergVirtualTableConfig - -Pointer to the Iceberg table. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**table_identifier** | str | Yes | The identifier of the Iceberg table. | -**warehouse_path** | Optional[str] | No | The path to the folder in the file system containing the Iceberg table. Can be omitted when the connection is configured with a catalog that does not rely on warehouse path. | -**type** | Literal["iceberg"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/IntegerColumnInitialIncrementalState.md b/docs/v2/Connectivity/models/IntegerColumnInitialIncrementalState.md deleted file mode 100644 index d2511f2fe..000000000 --- a/docs/v2/Connectivity/models/IntegerColumnInitialIncrementalState.md +++ /dev/null @@ -1,14 +0,0 @@ -# IntegerColumnInitialIncrementalState - -The state for an incremental table import using a numeric integer datatype. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**column_name** | str | Yes | | -**current_value** | int | Yes | The initial incremental state value for the integer column to reference in the query. | -**type** | Literal["integerColumnInitialIncrementalState"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/InvalidConnectionReason.md b/docs/v2/Connectivity/models/InvalidConnectionReason.md deleted file mode 100644 index 8e05e8e04..000000000 --- a/docs/v2/Connectivity/models/InvalidConnectionReason.md +++ /dev/null @@ -1,71 +0,0 @@ -# InvalidConnectionReason - -Reasons why a connection configuration is invalid. - - -| **Value** | -| --------- | -| `"CONNECTION_NOT_FOUND"` | -| `"INVALID_CREDENTIALS"` | -| `"NETWORK_POLICY_VIOLATION"` | -| `"CONNECTION_UNAVAILABLE"` | -| `"CANNOT_DESERIALIZE"` | -| `"CANNOT_SUBSTITUTE_SECRETS"` | -| `"CANNOT_USE_USER_HOME_FOLDER"` | -| `"INVALID_SOURCE_RUNTIME"` | -| `"INVALID_SOURCE_TYPE"` | -| `"MISSING_CREDENTIALS"` | -| `"MISSING_PROXY_SETTINGS"` | -| `"NOT_CLOUD_RUNTIME"` | -| `"NO_AGENTS_ASSIGNED"` | -| `"SERVICE_UNAVAILABLE"` | -| `"TOO_MANY_REQUESTS"` | -| `"AZURE_CONTAINER_DOES_NOT_EXIST"` | -| `"AZURE_MANAGED_IDENTITY_AUTH_NOT_SUPPORTED"` | -| `"AZURE_REFRESH_TOKEN_AUTH_NOT_SUPPORTED"` | -| `"AZURE_SHARED_ACCESS_SIGNATURE_AUTH_NOT_SUPPORTED"` | -| `"AZURE_SHARED_KEY_AUTH_NOT_SUPPORTED"` | -| `"AZURE_TENANT_NOT_FOUND"` | -| `"INVALID_ABFS_ROOT_DIRECTORY"` | -| `"INVALID_CLIENT_ENDPOINT"` | -| `"DATABRICKS_AUTH_UNSUPPORTED"` | -| `"DATABRICKS_BASIC_AUTH_NOT_SUPPORTED"` | -| `"DATABRICKS_INVALID_CLIENT_CREDENTIALS"` | -| `"DATABRICKS_INVALID_HOST"` | -| `"DATABRICKS_INVALID_HTTP_PATH"` | -| `"DATABRICKS_INVALID_OIDC_CREDENTIALS"` | -| `"DATABRICKS_INVALID_TOKEN_URL"` | -| `"GCP_INSTANCE_AUTH_NOT_SUPPORTED"` | -| `"GCP_INVALID_OIDC_CREDENTIALS"` | -| `"INVALID_GCS_CONFIG"` | -| `"INVALID_GCS_URL"` | -| `"GCS_INVALID_PREFIX_PATH"` | -| `"MISSING_GLUE_CATALOG"` | -| `"INVALID_HIVE_URL"` | -| `"INVALID_KERBEROS_URL"` | -| `"MISSING_HIVE_CONFIGURATION"` | -| `"ICEBERG_CATALOG_UNSUPPORTED"` | -| `"INVALID_ICEBERG_CATALOG_URL"` | -| `"INVALID_ICEBERG_TOKEN_URL"` | -| `"CONNECTION_FAILED"` | -| `"INVALID_JDBC_DRIVER"` | -| `"INVALID_JDBC_URL"` | -| `"AWS_BUCKET_DOES_NOT_EXIST"` | -| `"AWS_SESSION_TOKEN_NOT_SUPPORTED"` | -| `"INVALID_S3_ENDPOINT"` | -| `"INVALID_S3_URL"` | -| `"INVALID_STS_ENDPOINT"` | -| `"MISSING_STS_ROLE"` | -| `"STS_ASSUME_ROLE_DENIED"` | -| `"INVALID_SNOWFLAKE_URL"` | -| `"SNOWFLAKE_IAM_AUTH_NOT_SUPPORTED"` | -| `"SNOWFLAKE_RSA_AUTH_NOT_SUPPORTED"` | -| `"INVALID_UNITY_CATALOG_TOKEN_URL"` | -| `"INVALID_UNITY_CATALOG_URL"` | -| `"MISSING_UNITY_CATALOG"` | -| `"UNITY_CATALOG_EXTERNAL_ACCESS_NOT_ENABLED"` | -| `"UNITY_CATALOG_INSUFFICIENT_PERMISSIONS"` | -| `"UNITY_CATALOG_TEMPORARY_CREDENTIALS_FAILED"` | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/JdbcConnectionConfiguration.md b/docs/v2/Connectivity/models/JdbcConnectionConfiguration.md deleted file mode 100644 index e77ff8b27..000000000 --- a/docs/v2/Connectivity/models/JdbcConnectionConfiguration.md +++ /dev/null @@ -1,17 +0,0 @@ -# JdbcConnectionConfiguration - -The configuration needed to connect to an external system using the JDBC protocol. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**url** | str | Yes | The URL that the JDBC driver uses to connect to a database. | -**driver_class** | str | Yes | The fully-qualified driver class name that is used to connect to the database. | -**uploaded_jdbc_drivers** | List[JdbcDriverArtifactName] | Yes | The list of uploaded JDBC driver names. To upload drivers to a JDBC connection, use the uploadCustomJdbcDrivers endpoint | -**jdbc_properties** | JdbcProperties | Yes | | -**credentials** | Optional[BasicCredentials] | No | | -**type** | Literal["jdbc"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/JdbcDriverArtifactName.md b/docs/v2/Connectivity/models/JdbcDriverArtifactName.md deleted file mode 100644 index c44a228aa..000000000 --- a/docs/v2/Connectivity/models/JdbcDriverArtifactName.md +++ /dev/null @@ -1,12 +0,0 @@ -# JdbcDriverArtifactName - -The name of the uploaded JDBC artifact. - - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/JdbcProperties.md b/docs/v2/Connectivity/models/JdbcProperties.md deleted file mode 100644 index a459d14ca..000000000 --- a/docs/v2/Connectivity/models/JdbcProperties.md +++ /dev/null @@ -1,15 +0,0 @@ -# JdbcProperties - -A map of [properties](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Properties.html) passed -to the JDBC driver to configure behavior. Refer to the documentation of your specific connection type for additional -available JDBC properties to add to your connection configuration. -This should only contain unencrypted properties, all values specified here are sent unencrypted to Foundry. - - -## Type -```python -Dict[str, str] -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/JdbcTableImportConfig.md b/docs/v2/Connectivity/models/JdbcTableImportConfig.md deleted file mode 100644 index 7823c0868..000000000 --- a/docs/v2/Connectivity/models/JdbcTableImportConfig.md +++ /dev/null @@ -1,14 +0,0 @@ -# JdbcTableImportConfig - -The import configuration for a [custom JDBC connection](https://palantir.com/docs/foundry/available-connectors/custom-jdbc-sources). - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**query** | TableImportQuery | Yes | | -**initial_incremental_state** | Optional[TableImportInitialIncrementalState] | No | | -**type** | Literal["jdbcImportConfig"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/ListFileImportsResponse.md b/docs/v2/Connectivity/models/ListFileImportsResponse.md deleted file mode 100644 index 37cf6abb2..000000000 --- a/docs/v2/Connectivity/models/ListFileImportsResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListFileImportsResponse - -ListFileImportsResponse - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**data** | List[FileImport] | Yes | | -**next_page_token** | Optional[PageToken] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/ListTableImportsResponse.md b/docs/v2/Connectivity/models/ListTableImportsResponse.md deleted file mode 100644 index d9f099017..000000000 --- a/docs/v2/Connectivity/models/ListTableImportsResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListTableImportsResponse - -ListTableImportsResponse - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**data** | List[TableImport] | Yes | | -**next_page_token** | Optional[PageToken] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/LongColumnInitialIncrementalState.md b/docs/v2/Connectivity/models/LongColumnInitialIncrementalState.md deleted file mode 100644 index 8ba71010e..000000000 --- a/docs/v2/Connectivity/models/LongColumnInitialIncrementalState.md +++ /dev/null @@ -1,14 +0,0 @@ -# LongColumnInitialIncrementalState - -The state for an incremental table import using a column with a numeric long datatype. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**column_name** | str | Yes | | -**current_value** | Long | Yes | The initial incremental state value for the long column to reference in the query. | -**type** | Literal["longColumnInitialIncrementalState"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/MicrosoftAccessTableImportConfig.md b/docs/v2/Connectivity/models/MicrosoftAccessTableImportConfig.md deleted file mode 100644 index c60f96d3a..000000000 --- a/docs/v2/Connectivity/models/MicrosoftAccessTableImportConfig.md +++ /dev/null @@ -1,14 +0,0 @@ -# MicrosoftAccessTableImportConfig - -The import configuration for a [Microsoft Access connection](https://palantir.com/docs/foundry/available-connectors/microsoft-access). - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**query** | TableImportQuery | Yes | | -**initial_incremental_state** | Optional[TableImportInitialIncrementalState] | No | | -**type** | Literal["microsoftAccessImportConfig"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/MicrosoftSqlServerTableImportConfig.md b/docs/v2/Connectivity/models/MicrosoftSqlServerTableImportConfig.md deleted file mode 100644 index c8ccd655f..000000000 --- a/docs/v2/Connectivity/models/MicrosoftSqlServerTableImportConfig.md +++ /dev/null @@ -1,14 +0,0 @@ -# MicrosoftSqlServerTableImportConfig - -The import configuration for a [Microsoft SQL Server connection](https://palantir.com/docs/foundry/available-connectors/microsoft-sql-server). - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**query** | TableImportQuery | Yes | | -**initial_incremental_state** | Optional[TableImportInitialIncrementalState] | No | | -**type** | Literal["microsoftSqlServerImportConfig"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/NetworkEgressPolicyRid.md b/docs/v2/Connectivity/models/NetworkEgressPolicyRid.md deleted file mode 100644 index 1e08df26c..000000000 --- a/docs/v2/Connectivity/models/NetworkEgressPolicyRid.md +++ /dev/null @@ -1,12 +0,0 @@ -# NetworkEgressPolicyRid - -The Resource Identifier (RID) of a Network Egress Policy. - - -## Type -```python -RID -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/OauthMachineToMachineAuth.md b/docs/v2/Connectivity/models/OauthMachineToMachineAuth.md deleted file mode 100644 index 2cfdf85dd..000000000 --- a/docs/v2/Connectivity/models/OauthMachineToMachineAuth.md +++ /dev/null @@ -1,16 +0,0 @@ -# OauthMachineToMachineAuth - -Authenticate as a service principal using OAuth. Create a service principal in Databricks and generate an OAuth secret to obtain a client ID and secret. -Read the [official Databricks documentation](https://docs.databricks.com/aws/en/dev-tools/auth/oauth-m2m) for more information about OAuth machine-to-machine -authentication. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**client_id** | str | Yes | The client ID for the service principal. | -**client_secret** | EncryptedProperty | Yes | The value of the client secret. | -**type** | Literal["oauthM2M"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/OracleTableImportConfig.md b/docs/v2/Connectivity/models/OracleTableImportConfig.md deleted file mode 100644 index 3eb49b36d..000000000 --- a/docs/v2/Connectivity/models/OracleTableImportConfig.md +++ /dev/null @@ -1,14 +0,0 @@ -# OracleTableImportConfig - -The import configuration for an Oracle Database 21 connection. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**query** | TableImportQuery | Yes | | -**initial_incremental_state** | Optional[TableImportInitialIncrementalState] | No | | -**type** | Literal["oracleImportConfig"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/PersonalAccessToken.md b/docs/v2/Connectivity/models/PersonalAccessToken.md deleted file mode 100644 index ce88eba08..000000000 --- a/docs/v2/Connectivity/models/PersonalAccessToken.md +++ /dev/null @@ -1,14 +0,0 @@ -# PersonalAccessToken - -Authenticate as a user or service principal using a personal access token. -Read the [official Databricks documentation](https://docs.databricks.com/aws/en/dev-tools/auth/pat) for information on generating a personal access token. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**personal_access_token** | EncryptedProperty | Yes | | -**type** | Literal["personalAccessToken"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/PlaintextValue.md b/docs/v2/Connectivity/models/PlaintextValue.md deleted file mode 100644 index 078e402f1..000000000 --- a/docs/v2/Connectivity/models/PlaintextValue.md +++ /dev/null @@ -1,11 +0,0 @@ -# PlaintextValue - -PlaintextValue - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/PostgreSqlTableImportConfig.md b/docs/v2/Connectivity/models/PostgreSqlTableImportConfig.md deleted file mode 100644 index e5ef737a2..000000000 --- a/docs/v2/Connectivity/models/PostgreSqlTableImportConfig.md +++ /dev/null @@ -1,14 +0,0 @@ -# PostgreSqlTableImportConfig - -The import configuration for a [PostgreSQL connection](https://palantir.com/docs/foundry/available-connectors/postgresql). - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**query** | TableImportQuery | Yes | | -**initial_incremental_state** | Optional[TableImportInitialIncrementalState] | No | | -**type** | Literal["postgreSqlImportConfig"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/Protocol.md b/docs/v2/Connectivity/models/Protocol.md deleted file mode 100644 index 9f6b81d3e..000000000 --- a/docs/v2/Connectivity/models/Protocol.md +++ /dev/null @@ -1,11 +0,0 @@ -# Protocol - -Protocol to establish a connection with another system. - -| **Value** | -| --------- | -| `"HTTP"` | -| `"HTTPS"` | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/QueryParameterApiKey.md b/docs/v2/Connectivity/models/QueryParameterApiKey.md deleted file mode 100644 index bf55370c1..000000000 --- a/docs/v2/Connectivity/models/QueryParameterApiKey.md +++ /dev/null @@ -1,12 +0,0 @@ -# QueryParameterApiKey - -QueryParameterApiKey - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**query_parameter_name** | str | Yes | The name of the query parameter that the API key is passed in. | -**type** | Literal["queryParameter"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/Region.md b/docs/v2/Connectivity/models/Region.md deleted file mode 100644 index 0fcd0c1c0..000000000 --- a/docs/v2/Connectivity/models/Region.md +++ /dev/null @@ -1,12 +0,0 @@ -# Region - -The region of the external system. - - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/ReplaceFileImportRequest.md b/docs/v2/Connectivity/models/ReplaceFileImportRequest.md deleted file mode 100644 index 9dabeed48..000000000 --- a/docs/v2/Connectivity/models/ReplaceFileImportRequest.md +++ /dev/null @@ -1,14 +0,0 @@ -# ReplaceFileImportRequest - -ReplaceFileImportRequest - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**import_mode** | FileImportMode | Yes | | -**display_name** | FileImportDisplayName | Yes | | -**subfolder** | Optional[str] | No | A subfolder in the external system that will be imported. If not specified, defaults to the root folder of the external system. | -**file_import_filters** | List[FileImportFilter] | Yes | Use filters to limit which files should be imported. Filters are applied in the order they are defined. A different ordering of filters may lead to a more optimized import. [Learn more about optimizing file imports.](https://palantir.com/docs/foundry/data-connection/file-based-syncs/#optimize-file-based-syncs) | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/ReplaceTableImportRequest.md b/docs/v2/Connectivity/models/ReplaceTableImportRequest.md deleted file mode 100644 index d1505085a..000000000 --- a/docs/v2/Connectivity/models/ReplaceTableImportRequest.md +++ /dev/null @@ -1,14 +0,0 @@ -# ReplaceTableImportRequest - -ReplaceTableImportRequest - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**import_mode** | TableImportMode | Yes | | -**display_name** | TableImportDisplayName | Yes | | -**allow_schema_changes** | Optional[TableImportAllowSchemaChanges] | No | Allow the TableImport to succeed if the schema of imported rows does not match the existing dataset's schema. Defaults to false for new table imports. | -**config** | ReplaceTableImportRequestTableImportConfig | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/ReplaceTableImportRequestDatabricksTableImportConfig.md b/docs/v2/Connectivity/models/ReplaceTableImportRequestDatabricksTableImportConfig.md deleted file mode 100644 index 9fb2ca12b..000000000 --- a/docs/v2/Connectivity/models/ReplaceTableImportRequestDatabricksTableImportConfig.md +++ /dev/null @@ -1,13 +0,0 @@ -# ReplaceTableImportRequestDatabricksTableImportConfig - -ReplaceTableImportRequestDatabricksTableImportConfig - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**initial_incremental_state** | Optional[TableImportInitialIncrementalState] | No | | -**query** | TableImportQuery | Yes | | -**type** | Literal["databricksImportConfig"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/ReplaceTableImportRequestJdbcTableImportConfig.md b/docs/v2/Connectivity/models/ReplaceTableImportRequestJdbcTableImportConfig.md deleted file mode 100644 index 9265c4051..000000000 --- a/docs/v2/Connectivity/models/ReplaceTableImportRequestJdbcTableImportConfig.md +++ /dev/null @@ -1,13 +0,0 @@ -# ReplaceTableImportRequestJdbcTableImportConfig - -ReplaceTableImportRequestJdbcTableImportConfig - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**initial_incremental_state** | Optional[TableImportInitialIncrementalState] | No | | -**query** | TableImportQuery | Yes | | -**type** | Literal["jdbcImportConfig"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/ReplaceTableImportRequestMicrosoftAccessTableImportConfig.md b/docs/v2/Connectivity/models/ReplaceTableImportRequestMicrosoftAccessTableImportConfig.md deleted file mode 100644 index 6a12122e4..000000000 --- a/docs/v2/Connectivity/models/ReplaceTableImportRequestMicrosoftAccessTableImportConfig.md +++ /dev/null @@ -1,13 +0,0 @@ -# ReplaceTableImportRequestMicrosoftAccessTableImportConfig - -ReplaceTableImportRequestMicrosoftAccessTableImportConfig - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**initial_incremental_state** | Optional[TableImportInitialIncrementalState] | No | | -**query** | TableImportQuery | Yes | | -**type** | Literal["microsoftAccessImportConfig"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/ReplaceTableImportRequestMicrosoftSqlServerTableImportConfig.md b/docs/v2/Connectivity/models/ReplaceTableImportRequestMicrosoftSqlServerTableImportConfig.md deleted file mode 100644 index c0d2e83b7..000000000 --- a/docs/v2/Connectivity/models/ReplaceTableImportRequestMicrosoftSqlServerTableImportConfig.md +++ /dev/null @@ -1,13 +0,0 @@ -# ReplaceTableImportRequestMicrosoftSqlServerTableImportConfig - -ReplaceTableImportRequestMicrosoftSqlServerTableImportConfig - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**initial_incremental_state** | Optional[TableImportInitialIncrementalState] | No | | -**query** | TableImportQuery | Yes | | -**type** | Literal["microsoftSqlServerImportConfig"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/ReplaceTableImportRequestOracleTableImportConfig.md b/docs/v2/Connectivity/models/ReplaceTableImportRequestOracleTableImportConfig.md deleted file mode 100644 index 11cd74b0b..000000000 --- a/docs/v2/Connectivity/models/ReplaceTableImportRequestOracleTableImportConfig.md +++ /dev/null @@ -1,13 +0,0 @@ -# ReplaceTableImportRequestOracleTableImportConfig - -ReplaceTableImportRequestOracleTableImportConfig - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**initial_incremental_state** | Optional[TableImportInitialIncrementalState] | No | | -**query** | TableImportQuery | Yes | | -**type** | Literal["oracleImportConfig"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/ReplaceTableImportRequestPostgreSqlTableImportConfig.md b/docs/v2/Connectivity/models/ReplaceTableImportRequestPostgreSqlTableImportConfig.md deleted file mode 100644 index 10507c95f..000000000 --- a/docs/v2/Connectivity/models/ReplaceTableImportRequestPostgreSqlTableImportConfig.md +++ /dev/null @@ -1,13 +0,0 @@ -# ReplaceTableImportRequestPostgreSqlTableImportConfig - -ReplaceTableImportRequestPostgreSqlTableImportConfig - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**initial_incremental_state** | Optional[TableImportInitialIncrementalState] | No | | -**query** | TableImportQuery | Yes | | -**type** | Literal["postgreSqlImportConfig"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/ReplaceTableImportRequestSnowflakeTableImportConfig.md b/docs/v2/Connectivity/models/ReplaceTableImportRequestSnowflakeTableImportConfig.md deleted file mode 100644 index 1a9f700df..000000000 --- a/docs/v2/Connectivity/models/ReplaceTableImportRequestSnowflakeTableImportConfig.md +++ /dev/null @@ -1,13 +0,0 @@ -# ReplaceTableImportRequestSnowflakeTableImportConfig - -ReplaceTableImportRequestSnowflakeTableImportConfig - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**initial_incremental_state** | Optional[TableImportInitialIncrementalState] | No | | -**query** | TableImportQuery | Yes | | -**type** | Literal["snowflakeImportConfig"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/ReplaceTableImportRequestTableImportConfig.md b/docs/v2/Connectivity/models/ReplaceTableImportRequestTableImportConfig.md deleted file mode 100644 index b18a0e838..000000000 --- a/docs/v2/Connectivity/models/ReplaceTableImportRequestTableImportConfig.md +++ /dev/null @@ -1,22 +0,0 @@ -# ReplaceTableImportRequestTableImportConfig - -The import configuration for a specific [connector type](https://palantir.com/docs/foundry/data-integration/source-type-overview). - - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -ReplaceTableImportRequestDatabricksTableImportConfig | databricksImportConfig -ReplaceTableImportRequestJdbcTableImportConfig | jdbcImportConfig -ReplaceTableImportRequestMicrosoftSqlServerTableImportConfig | microsoftSqlServerImportConfig -ReplaceTableImportRequestPostgreSqlTableImportConfig | postgreSqlImportConfig -ReplaceTableImportRequestMicrosoftAccessTableImportConfig | microsoftAccessImportConfig -ReplaceTableImportRequestSnowflakeTableImportConfig | snowflakeImportConfig -ReplaceTableImportRequestOracleTableImportConfig | oracleImportConfig - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/RestAuthenticationMode.md b/docs/v2/Connectivity/models/RestAuthenticationMode.md deleted file mode 100644 index 18fe6a135..000000000 --- a/docs/v2/Connectivity/models/RestAuthenticationMode.md +++ /dev/null @@ -1,18 +0,0 @@ -# RestAuthenticationMode - -The method of authentication for connecting to an external REST system. - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -BearerToken | bearerToken -ApiKeyAuthentication | apiKey -BasicCredentials | basic -RestConnectionOAuth2 | oauth2 - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/RestConnectionAdditionalSecrets.md b/docs/v2/Connectivity/models/RestConnectionAdditionalSecrets.md deleted file mode 100644 index b8be6343c..000000000 --- a/docs/v2/Connectivity/models/RestConnectionAdditionalSecrets.md +++ /dev/null @@ -1,18 +0,0 @@ -# RestConnectionAdditionalSecrets - -When creating or updating additional secrets, use SecretsWithPlaintextValues. -When fetching the RestConnectionConfiguration, SecretsNames will be provided. - - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -SecretsWithPlaintextValues | asSecretsWithPlaintextValues -SecretsNames | asSecretsNames - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/RestConnectionConfiguration.md b/docs/v2/Connectivity/models/RestConnectionConfiguration.md deleted file mode 100644 index 69b1377d6..000000000 --- a/docs/v2/Connectivity/models/RestConnectionConfiguration.md +++ /dev/null @@ -1,14 +0,0 @@ -# RestConnectionConfiguration - -The configuration needed to connect to a [REST external system](https://palantir.com/docs/foundry/available-connectors/rest-apis). - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**domains** | List[Domain] | Yes | The domains that the connection is allowed to access. At least one domain must be specified. | -**additional_secrets** | Optional[RestConnectionAdditionalSecrets] | No | Additional secrets that can be referenced in code and webhook configurations. If not provided, no additional secrets will be created. | -**oauth2_client_rid** | Optional[RID] | No | The RID of the [Outbound application](https://palantir.com/docs/foundry/administration/configure-outbound-applications) that is used to authenticate to the external system via OAuth2. Currently, a connection may use only one outbound application for OAuth 2.0 authentication. Selecting a different outbound application will update the configuration for all domains with OAuth 2.0 as the selected authorization. | -**type** | Literal["rest"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/RestConnectionOAuth2.md b/docs/v2/Connectivity/models/RestConnectionOAuth2.md deleted file mode 100644 index ad7200da1..000000000 --- a/docs/v2/Connectivity/models/RestConnectionOAuth2.md +++ /dev/null @@ -1,13 +0,0 @@ -# RestConnectionOAuth2 - -In order to use OAuth2 you must have an Outbound application configured in the [Foundry Control Panel Organization settings](https://palantir.com/docs/foundry/administration/configure-outbound-applications#create-an-outbound-application). -The RID of the Outbound application must be configured in the RestConnectionConfiguration in the `oauth2ClientRid` field. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["oauth2"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/RestRequestApiKeyLocation.md b/docs/v2/Connectivity/models/RestRequestApiKeyLocation.md deleted file mode 100644 index 1cb73ba71..000000000 --- a/docs/v2/Connectivity/models/RestRequestApiKeyLocation.md +++ /dev/null @@ -1,16 +0,0 @@ -# RestRequestApiKeyLocation - -The location of the API key in the request. - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -HeaderApiKey | header -QueryParameterApiKey | queryParameter - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/S3AuthenticationMode.md b/docs/v2/Connectivity/models/S3AuthenticationMode.md deleted file mode 100644 index 266f29991..000000000 --- a/docs/v2/Connectivity/models/S3AuthenticationMode.md +++ /dev/null @@ -1,17 +0,0 @@ -# S3AuthenticationMode - -S3AuthenticationMode - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -AwsAccessKey | awsAccessKey -CloudIdentity | cloudIdentity -AwsOidcAuthentication | oidc - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/S3ConnectionConfiguration.md b/docs/v2/Connectivity/models/S3ConnectionConfiguration.md deleted file mode 100644 index 47b9e3330..000000000 --- a/docs/v2/Connectivity/models/S3ConnectionConfiguration.md +++ /dev/null @@ -1,27 +0,0 @@ -# S3ConnectionConfiguration - -The configuration needed to connect to an [AWS S3 external system (or any other S3-like external systems that -implement the s3a protocol)](https://palantir.com/docs/foundry/available-connectors/amazon-s3/#amazon-s3). - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**bucket_url** | str | Yes | The URL of the S3 bucket. The URL should contain a trailing slash. | -**s3_endpoint** | Optional[str] | No | The endpoint of the S3 service. This is used to connect to a custom S3 service that is not AWS S3. If not specified, defaults to the [AWS S3 endpoint](https://docs.aws.amazon.com/general/latest/gr/s3.html). Warning: Specifying a region and a custom endpoint containing a region can lead to unexpected behavior. | -**region** | Optional[Region] | No | The region representing the location of the S3 bucket. Warning: Specifying a region and a custom endpoint containing a region can lead to unexpected behavior. | -**authentication_mode** | Optional[S3AuthenticationMode] | No | The authentication mode to use to connect to the S3 external system. No authentication mode is required to connect to publicly accessible AWS S3 buckets. | -**s3_endpoint_signing_region** | Optional[Region] | No | The region used when constructing the S3 client using a custom endpoint. This is often not required and would only be needed if you are using the S3 connector with an S3-compliant third-party API, and are also setting a custom endpoint that requires a non-default region. | -**client_kms_configuration** | Optional[S3KmsConfiguration] | No | The client-side KMS key to use for encryption and decryption of data in the S3 bucket. If not specified, the default KMS key for the bucket is used. | -**sts_role_configuration** | Optional[StsRoleConfiguration] | No | The configuration needed to assume a role to connect to the S3 external system. | -**proxy_configuration** | Optional[S3ProxyConfiguration] | No | The configuration needed to connect to the S3 external system through a proxy. | -**max_connections** | Optional[int] | No | The maximum number of HTTP connections to the S3 service per sync. If not specified, defaults to 50 as defined by the [AWS SDK default](https://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/ClientConfiguration.html#DEFAULT_MAX_CONNECTIONS). | -**connection_timeout_millis** | Optional[Long] | No | The amount of time (in milliseconds) to wait when initially establishing a connection before giving up and timing out. If not specified, defaults to 10000 as defined by the [AWS SDK default](https://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/ClientConfiguration.html#DEFAULT_CONNECTION_TIMEOUT). | -**socket_timeout_millis** | Optional[Long] | No | The amount of time (in milliseconds) to wait for data to be transferred over an established, open connection. If not specified, defaults to 50000 as defined by the [AWS SDK default](https://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/ClientConfiguration.html#DEFAULT_SOCKET_TIMEOUT). | -**max_error_retry** | Optional[int] | No | The maximum number of retry attempts for failed requests to the S3 service. If not specified, defaults to 3 as defined by the [AWS SDK default](https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/retry-strategy.html#retry-strategies). | -**match_subfolder_exactly** | Optional[bool] | No | If true, only files in the subfolder specified in the bucket URL will be synced. If false, all files in the bucket will be synced. If not specified, defaults to false. | -**enable_requester_pays** | Optional[bool] | No | Defaults to false, unless set and overwritten. If true, includes the [requester pays header](https://docs.aws.amazon.com/AmazonS3/latest/userguide/RequesterPaysBuckets.html) in requests, allowing reads from requester pays buckets. | -**type** | Literal["s3"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/S3KmsConfiguration.md b/docs/v2/Connectivity/models/S3KmsConfiguration.md deleted file mode 100644 index f89adb472..000000000 --- a/docs/v2/Connectivity/models/S3KmsConfiguration.md +++ /dev/null @@ -1,12 +0,0 @@ -# S3KmsConfiguration - -S3KmsConfiguration - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**kms_key** | str | Yes | The client-side KMS key to use for encryption and decryption of data in the S3 bucket. If not specified, the default KMS key for the bucket is used. | -**kms_region** | Optional[Region] | No | The region of the client-side KMS key to use for encryption and decryption of data in the S3 bucket. If not specified, the default KMS key region for the bucket is used. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/S3ProxyConfiguration.md b/docs/v2/Connectivity/models/S3ProxyConfiguration.md deleted file mode 100644 index fddc7fb86..000000000 --- a/docs/v2/Connectivity/models/S3ProxyConfiguration.md +++ /dev/null @@ -1,15 +0,0 @@ -# S3ProxyConfiguration - -S3ProxyConfiguration - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**host** | str | Yes | Domain name, IPv4, or IPv6 address. `protocol` and `port` must be specified separately. | -**port** | int | Yes | | -**non_proxy_hosts** | Optional[List[str]] | No | A list of hosts that can bypass the proxy, such as those used for STS Role. You can also use "*" wildcards. | -**protocol** | Optional[Protocol] | No | If defined, must be "HTTP" or "HTTPS". Defaults to "HTTPS". | -**credentials** | Optional[BasicCredentials] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/SecretName.md b/docs/v2/Connectivity/models/SecretName.md deleted file mode 100644 index 2f75c8f9c..000000000 --- a/docs/v2/Connectivity/models/SecretName.md +++ /dev/null @@ -1,11 +0,0 @@ -# SecretName - -SecretName - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/SecretsNames.md b/docs/v2/Connectivity/models/SecretsNames.md deleted file mode 100644 index c85de0248..000000000 --- a/docs/v2/Connectivity/models/SecretsNames.md +++ /dev/null @@ -1,14 +0,0 @@ -# SecretsNames - -A list of secret names that can be referenced in code and webhook configurations. -This will be provided to the client when fetching the RestConnectionConfiguration. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**secret_names** | List[SecretName] | Yes | The names of the additional secrets that can be referenced in code and webhook configurations. | -**type** | Literal["asSecretsNames"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/SecretsWithPlaintextValues.md b/docs/v2/Connectivity/models/SecretsWithPlaintextValues.md deleted file mode 100644 index 94b3b9daf..000000000 --- a/docs/v2/Connectivity/models/SecretsWithPlaintextValues.md +++ /dev/null @@ -1,14 +0,0 @@ -# SecretsWithPlaintextValues - -A map representing secret name to plaintext secret value pairs. -This should be used when creating or updating additional secrets for a REST connection. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**secrets** | Dict[SecretName, PlaintextValue] | Yes | The additional secrets that can be referenced in code and webhook configurations. | -**type** | Literal["asSecretsWithPlaintextValues"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/SmbAuth.md b/docs/v2/Connectivity/models/SmbAuth.md deleted file mode 100644 index 22fedc8cf..000000000 --- a/docs/v2/Connectivity/models/SmbAuth.md +++ /dev/null @@ -1,11 +0,0 @@ -# SmbAuth - -SmbAuth - -## Type -```python -SmbUsernamePasswordAuth -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/SmbConnectionConfiguration.md b/docs/v2/Connectivity/models/SmbConnectionConfiguration.md deleted file mode 100644 index 616f41e9d..000000000 --- a/docs/v2/Connectivity/models/SmbConnectionConfiguration.md +++ /dev/null @@ -1,18 +0,0 @@ -# SmbConnectionConfiguration - -SmbConnectionConfiguration - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**hostname** | str | Yes | Any identifier that can resolve to a server hosting an SMB share. This includes IP addresses, local network names (e.g. FS-SERVER-01) or FQDNs. Should not include any protocol information like https://, smb://, etc | -**port** | Optional[int] | No | 445 by default | -**proxy** | Optional[SmbProxyConfiguration] | No | | -**share** | str | Yes | Must be a valid SMB share name. https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-fscc/dc9978d7-6299-4c5a-a22d-a039cdc716ea | -**base_directory** | Optional[str] | No | All reads and writes in this source will happen in this subdirectory | -**auth** | SmbAuth | Yes | | -**require_message_signing** | Optional[bool] | No | If true, the client will request that the server sign all messages. If the server does not support message signing, the connection will fail. Defaults to true. | -**type** | Literal["smb"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/SmbProxyConfiguration.md b/docs/v2/Connectivity/models/SmbProxyConfiguration.md deleted file mode 100644 index 0441387f5..000000000 --- a/docs/v2/Connectivity/models/SmbProxyConfiguration.md +++ /dev/null @@ -1,13 +0,0 @@ -# SmbProxyConfiguration - -Egress proxy to pass all traffic through. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**hostname** | str | Yes | | -**port** | int | Yes | | -**protocol** | SmbProxyType | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/SmbProxyType.md b/docs/v2/Connectivity/models/SmbProxyType.md deleted file mode 100644 index e379aef47..000000000 --- a/docs/v2/Connectivity/models/SmbProxyType.md +++ /dev/null @@ -1,11 +0,0 @@ -# SmbProxyType - -SmbProxyType - -| **Value** | -| --------- | -| `"HTTP"` | -| `"SOCKS"` | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/SmbUsernamePasswordAuth.md b/docs/v2/Connectivity/models/SmbUsernamePasswordAuth.md deleted file mode 100644 index 39c520ecf..000000000 --- a/docs/v2/Connectivity/models/SmbUsernamePasswordAuth.md +++ /dev/null @@ -1,14 +0,0 @@ -# SmbUsernamePasswordAuth - -SmbUsernamePasswordAuth - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**username** | str | Yes | | -**password** | EncryptedProperty | Yes | | -**domain** | Optional[str] | No | Optionally specify a Windows domain to use when authenticating. Normal DNS domain restrictions apply but the top-level domain might be something non-standard like .local. Defaults to WORKGROUP | -**type** | Literal["usernamePassword"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/SnowflakeAuthenticationMode.md b/docs/v2/Connectivity/models/SnowflakeAuthenticationMode.md deleted file mode 100644 index 249017248..000000000 --- a/docs/v2/Connectivity/models/SnowflakeAuthenticationMode.md +++ /dev/null @@ -1,17 +0,0 @@ -# SnowflakeAuthenticationMode - -SnowflakeAuthenticationMode - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -SnowflakeExternalOauth | externalOauth -SnowflakeKeyPairAuthentication | keyPair -BasicCredentials | basic - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/SnowflakeConnectionConfiguration.md b/docs/v2/Connectivity/models/SnowflakeConnectionConfiguration.md deleted file mode 100644 index d0770b8f9..000000000 --- a/docs/v2/Connectivity/models/SnowflakeConnectionConfiguration.md +++ /dev/null @@ -1,19 +0,0 @@ -# SnowflakeConnectionConfiguration - -The configuration needed to connect to a Snowflake database. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**account_identifier** | str | Yes | An [account identifier](https://docs.snowflake.com/en/user-guide/admin-account-identifier) uniquely identifies a Snowflake account within your organization, as well as throughout the global network of Snowflake-supported cloud platforms and cloud regions. The URL for an account uses the following format: .snowflakecomputing.com. An example URL is https://acme-test_aws_us_east_2.snowflakecomputing.com. | -**database** | Optional[str] | No | Specifies the default database to use once connected. If unspecified, defaults to the empty string. The specified database should be an existing database for which the specified default role has privileges. See https://docs.snowflake.com/developer-guide/jdbc/jdbc-parameters#db | -**role** | Optional[str] | No | Specifies the default access control role to use in the Snowflake session initiated by the driver. If unspecified, no role will be used when the session is initiated by the driver. The specified role should be an existing role that has already been assigned to the specified user for the driver. If the specified role has not already been assigned to the user, the role is not used when the session is initiated by the driver. See https://docs.snowflake.com/developer-guide/jdbc/jdbc-parameters#role | -**schema_** | Optional[str] | No | Specifies the default schema to use for the specified database once connected. If unspecified, defaults to the empty string. The specified schema should be an existing schema for which the specified default role has privileges. See https://docs.snowflake.com/developer-guide/jdbc/jdbc-parameters#schema | -**warehouse** | Optional[str] | No | Specifies the virtual warehouse to use once connected. If unspecified, defaults to the empty string. The specified warehouse should be an existing warehouse for which the specified default role has privileges. See https://docs.snowflake.com/developer-guide/jdbc/jdbc-parameters#warehouse | -**authentication_mode** | SnowflakeAuthenticationMode | Yes | The authentication mode to use to connect to the Snowflake database. | -**jdbc_properties** | JdbcProperties | Yes | | -**type** | Literal["snowflake"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/SnowflakeExternalOauth.md b/docs/v2/Connectivity/models/SnowflakeExternalOauth.md deleted file mode 100644 index a0b1e5a5d..000000000 --- a/docs/v2/Connectivity/models/SnowflakeExternalOauth.md +++ /dev/null @@ -1,17 +0,0 @@ -# SnowflakeExternalOauth - -Use an External OAuth security integration to connect and authenticate to Snowflake. - -See https://docs.snowflake.com/en/user-guide/oauth-ext-custom - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**audience** | str | Yes | Identifies the recipients that the access token is intended for as a string URI. | -**issuer_url** | str | Yes | Identifies the principal that issued the access token as a string URI. | -**subject** | ConnectionRid | Yes | The RID of the Connection that is connecting to the external system. | -**type** | Literal["externalOauth"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/SnowflakeKeyPairAuthentication.md b/docs/v2/Connectivity/models/SnowflakeKeyPairAuthentication.md deleted file mode 100644 index 59a76dae0..000000000 --- a/docs/v2/Connectivity/models/SnowflakeKeyPairAuthentication.md +++ /dev/null @@ -1,16 +0,0 @@ -# SnowflakeKeyPairAuthentication - -Use a key-pair to connect and authenticate to Snowflake. - -See https://docs.snowflake.com/en/user-guide/key-pair-auth - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**user** | str | Yes | | -**private_key** | EncryptedProperty | Yes | | -**type** | Literal["keyPair"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/SnowflakeTableImportConfig.md b/docs/v2/Connectivity/models/SnowflakeTableImportConfig.md deleted file mode 100644 index 621a7cedd..000000000 --- a/docs/v2/Connectivity/models/SnowflakeTableImportConfig.md +++ /dev/null @@ -1,14 +0,0 @@ -# SnowflakeTableImportConfig - -The table import configuration for a [Snowflake connection](https://palantir.com/docs/foundry/available-connectors/snowflake). - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**query** | TableImportQuery | Yes | | -**initial_incremental_state** | Optional[TableImportInitialIncrementalState] | No | | -**type** | Literal["snowflakeImportConfig"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/SnowflakeVirtualTableConfig.md b/docs/v2/Connectivity/models/SnowflakeVirtualTableConfig.md deleted file mode 100644 index 319a137eb..000000000 --- a/docs/v2/Connectivity/models/SnowflakeVirtualTableConfig.md +++ /dev/null @@ -1,14 +0,0 @@ -# SnowflakeVirtualTableConfig - -Pointer to the table in Snowflake. Uses the Snowflake table identifier of database, schema and table. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**database** | str | Yes | The database name. | -**schema_** | str | Yes | The schema name. | -**table** | str | Yes | The table name. | -**type** | Literal["snowflake"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/StringColumnInitialIncrementalState.md b/docs/v2/Connectivity/models/StringColumnInitialIncrementalState.md deleted file mode 100644 index 9dc81155f..000000000 --- a/docs/v2/Connectivity/models/StringColumnInitialIncrementalState.md +++ /dev/null @@ -1,14 +0,0 @@ -# StringColumnInitialIncrementalState - -The state for an incremental table import using a column with a string data type. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**column_name** | str | Yes | | -**current_value** | str | Yes | The initial incremental state value for the string column to reference in the query. | -**type** | Literal["stringColumnInitialIncrementalState"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/StsRoleConfiguration.md b/docs/v2/Connectivity/models/StsRoleConfiguration.md deleted file mode 100644 index bdbaabaaf..000000000 --- a/docs/v2/Connectivity/models/StsRoleConfiguration.md +++ /dev/null @@ -1,15 +0,0 @@ -# StsRoleConfiguration - -StsRoleConfiguration - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**role_arn** | str | Yes | The Amazon Resource Name (ARN) of the role to assume. For more information, see the official [AWS documentation](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html#principal-arn-format). | -**role_session_name** | str | Yes | An identifier for the assumed role session. The value can be any string that you assume will be unique within the AWS account. For more information, see the official [AWS documentation](https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRole.html#API_AssumeRole_RequestParameters). | -**role_session_duration** | Optional[Duration] | No | The duration of the role session. The value specified can range from 900 seconds (15 minutes) up to the maximum session duration set for the role. The maximum session duration setting can have a value from 1 hour to 12 hours. For more details see the official [AWS documentation](https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRole.html#API_AssumeRole_RequestParameters). | -**external_id** | Optional[str] | No | A unique identifier that is used by third parties when assuming roles in their customers' accounts. For more information, see the official [AWS documentation](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_externalid.html). | -**sts_endpoint** | Optional[str] | No | By default, the AWS Security Token Service (AWS STS) is available as a global service, and all AWS STS requests go to a single endpoint at https://sts.amazonaws.com. AWS recommends using Regional AWS STS endpoints instead of the global endpoint to reduce latency, build in redundancy, and increase session token validity. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/TableImport.md b/docs/v2/Connectivity/models/TableImport.md deleted file mode 100644 index 7f6fdbcfa..000000000 --- a/docs/v2/Connectivity/models/TableImport.md +++ /dev/null @@ -1,18 +0,0 @@ -# TableImport - -TableImport - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**rid** | TableImportRid | Yes | | -**connection_rid** | ConnectionRid | Yes | The RID of the Connection (also known as a source) that the Table Import uses to import data. | -**dataset_rid** | DatasetRid | Yes | The RID of the output dataset. Can not be modified after the table import is created. | -**branch_name** | Optional[BranchName] | No | The branch name in the output dataset that will contain the imported data. Defaults to `master` for most enrollments. Can not be modified after the table import is created. | -**display_name** | TableImportDisplayName | Yes | | -**import_mode** | TableImportMode | Yes | | -**allow_schema_changes** | TableImportAllowSchemaChanges | Yes | Allow the TableImport to succeed if the schema of imported rows does not match the existing dataset's schema. Defaults to false for new table imports. | -**config** | TableImportConfig | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/TableImportAllowSchemaChanges.md b/docs/v2/Connectivity/models/TableImportAllowSchemaChanges.md deleted file mode 100644 index 5f668cdef..000000000 --- a/docs/v2/Connectivity/models/TableImportAllowSchemaChanges.md +++ /dev/null @@ -1,11 +0,0 @@ -# TableImportAllowSchemaChanges - -Allow the TableImport to succeed if the schema of imported rows does not match the existing dataset's schema. Defaults to false for new table imports. - -## Type -```python -bool -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/TableImportConfig.md b/docs/v2/Connectivity/models/TableImportConfig.md deleted file mode 100644 index 19740ac17..000000000 --- a/docs/v2/Connectivity/models/TableImportConfig.md +++ /dev/null @@ -1,22 +0,0 @@ -# TableImportConfig - -The import configuration for a specific [connector type](https://palantir.com/docs/foundry/data-integration/source-type-overview). - - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -DatabricksTableImportConfig | databricksImportConfig -JdbcTableImportConfig | jdbcImportConfig -MicrosoftSqlServerTableImportConfig | microsoftSqlServerImportConfig -PostgreSqlTableImportConfig | postgreSqlImportConfig -MicrosoftAccessTableImportConfig | microsoftAccessImportConfig -SnowflakeTableImportConfig | snowflakeImportConfig -OracleTableImportConfig | oracleImportConfig - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/TableImportDisplayName.md b/docs/v2/Connectivity/models/TableImportDisplayName.md deleted file mode 100644 index 9de1dcaad..000000000 --- a/docs/v2/Connectivity/models/TableImportDisplayName.md +++ /dev/null @@ -1,11 +0,0 @@ -# TableImportDisplayName - -TableImportDisplayName - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/TableImportInitialIncrementalState.md b/docs/v2/Connectivity/models/TableImportInitialIncrementalState.md deleted file mode 100644 index bd5ec44b3..000000000 --- a/docs/v2/Connectivity/models/TableImportInitialIncrementalState.md +++ /dev/null @@ -1,27 +0,0 @@ -# TableImportInitialIncrementalState - -The incremental configuration for a table import enables append-style transactions from the same table without duplication of data. -You must provide a monotonically increasing column such as a timestamp or id and an initial value for this column. -An incremental table import will import rows where the value is greater than the largest already imported. - -You can use the '?' character to reference the incremental state value when constructing your query. -Normally this would be used in a WHERE clause or similar filter applied in order to only sync data with an incremental column value -larger than the previously observed maximum value stored in the incremental state. - - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -StringColumnInitialIncrementalState | stringColumnInitialIncrementalState -DateColumnInitialIncrementalState | dateColumnInitialIncrementalState -IntegerColumnInitialIncrementalState | integerColumnInitialIncrementalState -TimestampColumnInitialIncrementalState | timestampColumnInitialIncrementalState -LongColumnInitialIncrementalState | longColumnInitialIncrementalState -DecimalColumnInitialIncrementalState | decimalColumnInitialIncrementalState - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/TableImportMode.md b/docs/v2/Connectivity/models/TableImportMode.md deleted file mode 100644 index fa022c112..000000000 --- a/docs/v2/Connectivity/models/TableImportMode.md +++ /dev/null @@ -1,15 +0,0 @@ -# TableImportMode - -Import mode governs how data is read from an external system, and written into a Foundry dataset. - -SNAPSHOT: Defines a new dataset state consisting only of data from a particular import execution. -APPEND: Purely additive and yields data from previous import executions in addition to newly added data. - - -| **Value** | -| --------- | -| `"SNAPSHOT"` | -| `"APPEND"` | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/TableImportQuery.md b/docs/v2/Connectivity/models/TableImportQuery.md deleted file mode 100644 index 848f29708..000000000 --- a/docs/v2/Connectivity/models/TableImportQuery.md +++ /dev/null @@ -1,14 +0,0 @@ -# TableImportQuery - -A single SQL query can be executed per sync, which should output a data table -and avoid operations like invoking stored procedures. -The query results are saved to the output dataset in Foundry. - - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/TableImportRid.md b/docs/v2/Connectivity/models/TableImportRid.md deleted file mode 100644 index 1d3f190a0..000000000 --- a/docs/v2/Connectivity/models/TableImportRid.md +++ /dev/null @@ -1,12 +0,0 @@ -# TableImportRid - -The Resource Identifier (RID) of a TableImport (also known as a batch sync). - - -## Type -```python -RID -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/TableName.md b/docs/v2/Connectivity/models/TableName.md deleted file mode 100644 index 0a7f5aa82..000000000 --- a/docs/v2/Connectivity/models/TableName.md +++ /dev/null @@ -1,12 +0,0 @@ -# TableName - -The name of a VirtualTable. - - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/TableRid.md b/docs/v2/Connectivity/models/TableRid.md deleted file mode 100644 index 64bc2b355..000000000 --- a/docs/v2/Connectivity/models/TableRid.md +++ /dev/null @@ -1,12 +0,0 @@ -# TableRid - -The Resource Identifier (RID) of a registered VirtualTable. - - -## Type -```python -RID -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/TimestampColumnInitialIncrementalState.md b/docs/v2/Connectivity/models/TimestampColumnInitialIncrementalState.md deleted file mode 100644 index af7bbba39..000000000 --- a/docs/v2/Connectivity/models/TimestampColumnInitialIncrementalState.md +++ /dev/null @@ -1,13 +0,0 @@ -# TimestampColumnInitialIncrementalState - -TimestampColumnInitialIncrementalState - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**column_name** | str | Yes | | -**current_value** | datetime | Yes | The initial incremental state value for the timestamp column in UTC to reference in the query. | -**type** | Literal["timestampColumnInitialIncrementalState"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/UnityVirtualTableConfig.md b/docs/v2/Connectivity/models/UnityVirtualTableConfig.md deleted file mode 100644 index f9d5e0fe6..000000000 --- a/docs/v2/Connectivity/models/UnityVirtualTableConfig.md +++ /dev/null @@ -1,14 +0,0 @@ -# UnityVirtualTableConfig - -Pointer to the table in Unity Catalog. Uses the Databricks table identifier of catalog, schema and table. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**catalog** | str | Yes | The catalog name. | -**schema_** | str | Yes | The schema name. | -**table** | str | Yes | The table name. | -**type** | Literal["unity"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/UnknownWorker.md b/docs/v2/Connectivity/models/UnknownWorker.md deleted file mode 100644 index d4940d42c..000000000 --- a/docs/v2/Connectivity/models/UnknownWorker.md +++ /dev/null @@ -1,15 +0,0 @@ -# UnknownWorker - -A ConnectionWorker that is not supported in the Platform APIs. This can happen because either the -ConnectionWorker configuration is malformed, or because the ConnectionWorker is a legacy one. -The ConnectionWorker should be updated to use the [Foundry worker](https://palantir.com/docs/foundry/data-connection/core-concepts/#foundry-worker) -with either direct egress policies or agent proxy egress policies. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["unknownWorker"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/UpdateExportSettingsForConnectionRequest.md b/docs/v2/Connectivity/models/UpdateExportSettingsForConnectionRequest.md deleted file mode 100644 index 2f98271fe..000000000 --- a/docs/v2/Connectivity/models/UpdateExportSettingsForConnectionRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# UpdateExportSettingsForConnectionRequest - -UpdateExportSettingsForConnectionRequest - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**export_settings** | ConnectionExportSettings | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/UpdateSecretsForConnectionRequest.md b/docs/v2/Connectivity/models/UpdateSecretsForConnectionRequest.md deleted file mode 100644 index 5c6197dd2..000000000 --- a/docs/v2/Connectivity/models/UpdateSecretsForConnectionRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# UpdateSecretsForConnectionRequest - -UpdateSecretsForConnectionRequest - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**secrets** | Dict[SecretName, PlaintextValue] | Yes | The secrets to be updated. The specified secret names must already be configured on the connection. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/UriScheme.md b/docs/v2/Connectivity/models/UriScheme.md deleted file mode 100644 index 864053250..000000000 --- a/docs/v2/Connectivity/models/UriScheme.md +++ /dev/null @@ -1,11 +0,0 @@ -# UriScheme - -Defines supported URI schemes to be used for external connections. - -| **Value** | -| --------- | -| `"HTTP"` | -| `"HTTPS"` | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/VirtualTable.md b/docs/v2/Connectivity/models/VirtualTable.md deleted file mode 100644 index bcd133761..000000000 --- a/docs/v2/Connectivity/models/VirtualTable.md +++ /dev/null @@ -1,15 +0,0 @@ -# VirtualTable - -VirtualTable - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**rid** | TableRid | Yes | | -**name** | TableName | Yes | | -**parent_rid** | FolderRid | Yes | | -**config** | VirtualTableConfig | Yes | | -**markings** | Optional[List[MarkingId]] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/VirtualTableConfig.md b/docs/v2/Connectivity/models/VirtualTableConfig.md deleted file mode 100644 index fdaf666a7..000000000 --- a/docs/v2/Connectivity/models/VirtualTableConfig.md +++ /dev/null @@ -1,21 +0,0 @@ -# VirtualTableConfig - -VirtualTableConfig - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -SnowflakeVirtualTableConfig | snowflake -UnityVirtualTableConfig | unity -GlueVirtualTableConfig | glue -DeltaVirtualTableConfig | delta -IcebergVirtualTableConfig | iceberg -FilesVirtualTableConfig | files -BigQueryVirtualTableConfig | bigquery - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/WorkflowIdentityFederation.md b/docs/v2/Connectivity/models/WorkflowIdentityFederation.md deleted file mode 100644 index e59abe280..000000000 --- a/docs/v2/Connectivity/models/WorkflowIdentityFederation.md +++ /dev/null @@ -1,20 +0,0 @@ -# WorkflowIdentityFederation - -Authenticate as a service principal using workload identity federation. This is the recommended way to connect to Databricks. -Workload identity federation allows workloads running in Foundry to access Databricks APIs without the need for Databricks secrets. -Refer to our [OIDC documentation](https://palantir.com/docs/foundry/data-connection/oidc) for an overview of how OpenID Connect is supported in Foundry. -A service principal federation policy must exist in Databricks to allow Foundry to act as an identity provider. -Refer to the [official documentation](https://docs.databricks.com/aws/en/dev-tools/auth/oauth-federation) for guidance. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**service_principal_application_id** | Optional[str] | No | The ID of the Databricks [service principal](https://docs.databricks.com/aws/en/admin/users-groups/service-principals). If provided, a federated JWT token is exchanged using a service principal federation policy. If not provided, a federated JWT token is exchanged using an account federation policy. | -**issuer_url** | str | Yes | Identifies the principal that issued the access token as a string URI. | -**audience** | str | Yes | Identifies the recipients that the access token is intended for as a string URI. This should be the primary host name where the Connection lives. | -**subject** | ConnectionRid | Yes | The RID of the Connection that is connecting to the external system. | -**type** | Literal["workflowIdentityFederation"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/AnyType.md b/docs/v2/Core/models/AnyType.md deleted file mode 100644 index fafc822a1..000000000 --- a/docs/v2/Core/models/AnyType.md +++ /dev/null @@ -1,11 +0,0 @@ -# AnyType - -AnyType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["any"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/ArrayFieldType.md b/docs/v2/Core/models/ArrayFieldType.md deleted file mode 100644 index 1d7be70e0..000000000 --- a/docs/v2/Core/models/ArrayFieldType.md +++ /dev/null @@ -1,12 +0,0 @@ -# ArrayFieldType - -ArrayFieldType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**items_schema** | FieldSchema | Yes | | -**type** | Literal["array"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/AttachmentType.md b/docs/v2/Core/models/AttachmentType.md deleted file mode 100644 index 9d0587820..000000000 --- a/docs/v2/Core/models/AttachmentType.md +++ /dev/null @@ -1,11 +0,0 @@ -# AttachmentType - -AttachmentType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["attachment"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/Attribution.md b/docs/v2/Core/models/Attribution.md deleted file mode 100644 index 9cf57cfbc..000000000 --- a/docs/v2/Core/models/Attribution.md +++ /dev/null @@ -1,11 +0,0 @@ -# Attribution - -Attribution for a request - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/BinaryType.md b/docs/v2/Core/models/BinaryType.md deleted file mode 100644 index 231b7bdd4..000000000 --- a/docs/v2/Core/models/BinaryType.md +++ /dev/null @@ -1,11 +0,0 @@ -# BinaryType - -BinaryType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["binary"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/BooleanType.md b/docs/v2/Core/models/BooleanType.md deleted file mode 100644 index 0c8a4323b..000000000 --- a/docs/v2/Core/models/BooleanType.md +++ /dev/null @@ -1,11 +0,0 @@ -# BooleanType - -BooleanType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["boolean"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/BranchMetadata.md b/docs/v2/Core/models/BranchMetadata.md deleted file mode 100644 index 868ec3ee2..000000000 --- a/docs/v2/Core/models/BranchMetadata.md +++ /dev/null @@ -1,11 +0,0 @@ -# BranchMetadata - -Metadata about a Foundry branch. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**rid** | FoundryBranch | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/BuildRid.md b/docs/v2/Core/models/BuildRid.md deleted file mode 100644 index 2aa231654..000000000 --- a/docs/v2/Core/models/BuildRid.md +++ /dev/null @@ -1,11 +0,0 @@ -# BuildRid - -The RID of a Build. - -## Type -```python -RID -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/ByteType.md b/docs/v2/Core/models/ByteType.md deleted file mode 100644 index 5a69a03dc..000000000 --- a/docs/v2/Core/models/ByteType.md +++ /dev/null @@ -1,11 +0,0 @@ -# ByteType - -ByteType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["byte"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/ChangeDataCaptureConfiguration.md b/docs/v2/Core/models/ChangeDataCaptureConfiguration.md deleted file mode 100644 index 8fa28594d..000000000 --- a/docs/v2/Core/models/ChangeDataCaptureConfiguration.md +++ /dev/null @@ -1,16 +0,0 @@ -# ChangeDataCaptureConfiguration - -Configuration for utilizing the stream as a change data capture (CDC) dataset. To configure CDC on a stream, at -least one key needs to be provided. - -For more information on CDC in -Foundry, see the [Change Data Capture](https://palantir.com/docs/foundry/data-integration/change-data-capture/) user documentation. - - -## Type -```python -FullRowChangeDataCaptureConfiguration -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/CheckReportRid.md b/docs/v2/Core/models/CheckReportRid.md deleted file mode 100644 index 4eb43ded0..000000000 --- a/docs/v2/Core/models/CheckReportRid.md +++ /dev/null @@ -1,11 +0,0 @@ -# CheckReportRid - -The unique resource identifier (RID) of a Data Health Check Report. - -## Type -```python -RID -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/CheckRid.md b/docs/v2/Core/models/CheckRid.md deleted file mode 100644 index 6146c5d68..000000000 --- a/docs/v2/Core/models/CheckRid.md +++ /dev/null @@ -1,11 +0,0 @@ -# CheckRid - -The unique resource identifier (RID) of a Data Health Check. - -## Type -```python -RID -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/CipherTextType.md b/docs/v2/Core/models/CipherTextType.md deleted file mode 100644 index f04baf4e3..000000000 --- a/docs/v2/Core/models/CipherTextType.md +++ /dev/null @@ -1,12 +0,0 @@ -# CipherTextType - -CipherTextType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**default_cipher_channel** | Optional[RID] | No | An optional Cipher Channel RID which can be used for encryption updates to empty values. | -**type** | Literal["cipherText"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/ComputeSeconds.md b/docs/v2/Core/models/ComputeSeconds.md deleted file mode 100644 index 7213e9612..000000000 --- a/docs/v2/Core/models/ComputeSeconds.md +++ /dev/null @@ -1,11 +0,0 @@ -# ComputeSeconds - -A measurement of compute usage expressed in [compute-seconds](https://palantir.com/docs/foundry/resource-management/usage-types#compute-second). For more information, please refer to the [Usage types](https://palantir.com/docs/foundry/resource-management/usage-types) documentation. - -## Type -```python -float -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/ContentLength.md b/docs/v2/Core/models/ContentLength.md deleted file mode 100644 index c3b7808e6..000000000 --- a/docs/v2/Core/models/ContentLength.md +++ /dev/null @@ -1,11 +0,0 @@ -# ContentLength - -ContentLength - -## Type -```python -Long -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/ContentType.md b/docs/v2/Core/models/ContentType.md deleted file mode 100644 index fe28ca7f0..000000000 --- a/docs/v2/Core/models/ContentType.md +++ /dev/null @@ -1,11 +0,0 @@ -# ContentType - -ContentType - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/CreatedBy.md b/docs/v2/Core/models/CreatedBy.md deleted file mode 100644 index ce3c4a306..000000000 --- a/docs/v2/Core/models/CreatedBy.md +++ /dev/null @@ -1,11 +0,0 @@ -# CreatedBy - -The Foundry user who created this resource - -## Type -```python -PrincipalId -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/CreatedTime.md b/docs/v2/Core/models/CreatedTime.md deleted file mode 100644 index f450d5535..000000000 --- a/docs/v2/Core/models/CreatedTime.md +++ /dev/null @@ -1,12 +0,0 @@ -# CreatedTime - -The time at which the resource was created. - - -## Type -```python -datetime -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/CustomMetadata.md b/docs/v2/Core/models/CustomMetadata.md deleted file mode 100644 index d99760693..000000000 --- a/docs/v2/Core/models/CustomMetadata.md +++ /dev/null @@ -1,11 +0,0 @@ -# CustomMetadata - -CustomMetadata - -## Type -```python -Dict[str, Any] -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/DatasetFieldSchema.md b/docs/v2/Core/models/DatasetFieldSchema.md deleted file mode 100644 index 6995c8df2..000000000 --- a/docs/v2/Core/models/DatasetFieldSchema.md +++ /dev/null @@ -1,22 +0,0 @@ -# DatasetFieldSchema - -A field in a Foundry dataset. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | SchemaFieldType | Yes | | -**name** | Optional[FieldName] | No | The name of a column. May be absent in nested schema objects. | -**nullable** | bool | Yes | Indicates whether values of this field may be null. | -**user_defined_type_class** | Optional[str] | No | Canonical classname of the user-defined type for this field. This should be a subclass of Spark's `UserDefinedType`. | -**custom_metadata** | Optional[CustomMetadata] | No | User-supplied custom metadata about the column, such as Foundry web archetypes, descriptions, etc. | -**array_subtype** | Optional[DatasetFieldSchema] | No | Only used when field type is array. | -**precision** | Optional[int] | No | Only used when field type is decimal. | -**scale** | Optional[int] | No | Only used when field type is decimal. | -**map_key_type** | Optional[DatasetFieldSchema] | No | Only used when field type is map. | -**map_value_type** | Optional[DatasetFieldSchema] | No | Only used when field type is map. | -**sub_schemas** | Optional[List[DatasetFieldSchema]] | No | Only used when field type is struct. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/DatasetSchema.md b/docs/v2/Core/models/DatasetSchema.md deleted file mode 100644 index e7e189a14..000000000 --- a/docs/v2/Core/models/DatasetSchema.md +++ /dev/null @@ -1,12 +0,0 @@ -# DatasetSchema - -The schema for a Foundry dataset. Files uploaded to this dataset must match this schema. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**field_schema_list** | List[DatasetFieldSchema] | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/DateType.md b/docs/v2/Core/models/DateType.md deleted file mode 100644 index dd820f1b5..000000000 --- a/docs/v2/Core/models/DateType.md +++ /dev/null @@ -1,11 +0,0 @@ -# DateType - -DateType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["date"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/DecimalType.md b/docs/v2/Core/models/DecimalType.md deleted file mode 100644 index dec41b4d5..000000000 --- a/docs/v2/Core/models/DecimalType.md +++ /dev/null @@ -1,13 +0,0 @@ -# DecimalType - -DecimalType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**precision** | Optional[int] | No | The total number of digits of the Decimal type. The maximum value is 38. | -**scale** | Optional[int] | No | The number of digits to the right of the decimal point. The maximum value is 38. | -**type** | Literal["decimal"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/DisplayName.md b/docs/v2/Core/models/DisplayName.md deleted file mode 100644 index f326538c5..000000000 --- a/docs/v2/Core/models/DisplayName.md +++ /dev/null @@ -1,11 +0,0 @@ -# DisplayName - -The display name of the entity. - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/Distance.md b/docs/v2/Core/models/Distance.md deleted file mode 100644 index 03fc63450..000000000 --- a/docs/v2/Core/models/Distance.md +++ /dev/null @@ -1,12 +0,0 @@ -# Distance - -A measurement of distance. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**value** | float | Yes | | -**unit** | DistanceUnit | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/DistanceUnit.md b/docs/v2/Core/models/DistanceUnit.md deleted file mode 100644 index 8c307f2bf..000000000 --- a/docs/v2/Core/models/DistanceUnit.md +++ /dev/null @@ -1,18 +0,0 @@ -# DistanceUnit - -DistanceUnit - -| **Value** | -| --------- | -| `"MILLIMETERS"` | -| `"CENTIMETERS"` | -| `"METERS"` | -| `"KILOMETERS"` | -| `"INCHES"` | -| `"FEET"` | -| `"YARDS"` | -| `"MILES"` | -| `"NAUTICAL_MILES"` | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/DoubleType.md b/docs/v2/Core/models/DoubleType.md deleted file mode 100644 index 55f1765c5..000000000 --- a/docs/v2/Core/models/DoubleType.md +++ /dev/null @@ -1,11 +0,0 @@ -# DoubleType - -DoubleType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["double"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/Duration.md b/docs/v2/Core/models/Duration.md deleted file mode 100644 index 10d85e9e7..000000000 --- a/docs/v2/Core/models/Duration.md +++ /dev/null @@ -1,12 +0,0 @@ -# Duration - -A measurement of duration. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**value** | int | Yes | The duration value. | -**unit** | TimeUnit | Yes | The unit of duration. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/DurationSeconds.md b/docs/v2/Core/models/DurationSeconds.md deleted file mode 100644 index 94d0f07dd..000000000 --- a/docs/v2/Core/models/DurationSeconds.md +++ /dev/null @@ -1,11 +0,0 @@ -# DurationSeconds - -A duration of time measured in seconds. - -## Type -```python -Long -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/EmbeddingModel.md b/docs/v2/Core/models/EmbeddingModel.md deleted file mode 100644 index dbb6e9114..000000000 --- a/docs/v2/Core/models/EmbeddingModel.md +++ /dev/null @@ -1,16 +0,0 @@ -# EmbeddingModel - -EmbeddingModel - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -LmsEmbeddingModel | lms -FoundryLiveDeployment | foundryLiveDeployment - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/EnrollmentRid.md b/docs/v2/Core/models/EnrollmentRid.md deleted file mode 100644 index 48e17e43f..000000000 --- a/docs/v2/Core/models/EnrollmentRid.md +++ /dev/null @@ -1,11 +0,0 @@ -# EnrollmentRid - -EnrollmentRid - -## Type -```python -RID -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/Field.md b/docs/v2/Core/models/Field.md deleted file mode 100644 index 6ff96c1ec..000000000 --- a/docs/v2/Core/models/Field.md +++ /dev/null @@ -1,14 +0,0 @@ -# Field - -A field in a Foundry schema. For more information on supported data types, see the -[supported field types](https://palantir.com/docs/foundry/data-integration/datasets/#supported-field-types) user documentation. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**name** | FieldName | Yes | | -**schema_** | FieldSchema | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/FieldDataType.md b/docs/v2/Core/models/FieldDataType.md deleted file mode 100644 index 9c6d1892c..000000000 --- a/docs/v2/Core/models/FieldDataType.md +++ /dev/null @@ -1,29 +0,0 @@ -# FieldDataType - -FieldDataType - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -StructFieldType | struct -DateType | date -StringType | string -ByteType | byte -DoubleType | double -IntegerType | integer -FloatType | float -LongType | long -BooleanType | boolean -ArrayFieldType | array -BinaryType | binary -ShortType | short -DecimalType | decimal -MapFieldType | map -TimestampType | timestamp - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/FieldName.md b/docs/v2/Core/models/FieldName.md deleted file mode 100644 index cd5f36757..000000000 --- a/docs/v2/Core/models/FieldName.md +++ /dev/null @@ -1,11 +0,0 @@ -# FieldName - -FieldName - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/FieldSchema.md b/docs/v2/Core/models/FieldSchema.md deleted file mode 100644 index 0d24dc203..000000000 --- a/docs/v2/Core/models/FieldSchema.md +++ /dev/null @@ -1,14 +0,0 @@ -# FieldSchema - -The specification of the type of a Foundry schema field. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**nullable** | bool | Yes | | -**custom_metadata** | Optional[CustomMetadata] | No | | -**data_type** | FieldDataType | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/FilePath.md b/docs/v2/Core/models/FilePath.md deleted file mode 100644 index de0dd68c2..000000000 --- a/docs/v2/Core/models/FilePath.md +++ /dev/null @@ -1,12 +0,0 @@ -# FilePath - -The path to a File within Foundry. Examples: `my-file.txt`, `path/to/my-file.jpg`, `dataframe.snappy.parquet`. - - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/Filename.md b/docs/v2/Core/models/Filename.md deleted file mode 100644 index 065baa2d9..000000000 --- a/docs/v2/Core/models/Filename.md +++ /dev/null @@ -1,12 +0,0 @@ -# Filename - -The name of a File within Foundry. Examples: `my-file.txt`, `my-file.jpg`, `dataframe.snappy.parquet`. - - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/FilterBinaryType.md b/docs/v2/Core/models/FilterBinaryType.md deleted file mode 100644 index 907bc4de1..000000000 --- a/docs/v2/Core/models/FilterBinaryType.md +++ /dev/null @@ -1,11 +0,0 @@ -# FilterBinaryType - -FilterBinaryType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["binary"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/FilterBooleanType.md b/docs/v2/Core/models/FilterBooleanType.md deleted file mode 100644 index 85bc53e12..000000000 --- a/docs/v2/Core/models/FilterBooleanType.md +++ /dev/null @@ -1,11 +0,0 @@ -# FilterBooleanType - -FilterBooleanType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["boolean"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/FilterDateTimeType.md b/docs/v2/Core/models/FilterDateTimeType.md deleted file mode 100644 index 243bc555b..000000000 --- a/docs/v2/Core/models/FilterDateTimeType.md +++ /dev/null @@ -1,11 +0,0 @@ -# FilterDateTimeType - -FilterDateTimeType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["dateTime"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/FilterDateType.md b/docs/v2/Core/models/FilterDateType.md deleted file mode 100644 index 2f70f11ec..000000000 --- a/docs/v2/Core/models/FilterDateType.md +++ /dev/null @@ -1,11 +0,0 @@ -# FilterDateType - -FilterDateType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["date"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/FilterDoubleType.md b/docs/v2/Core/models/FilterDoubleType.md deleted file mode 100644 index b9a5e1430..000000000 --- a/docs/v2/Core/models/FilterDoubleType.md +++ /dev/null @@ -1,11 +0,0 @@ -# FilterDoubleType - -FilterDoubleType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["double"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/FilterEnumType.md b/docs/v2/Core/models/FilterEnumType.md deleted file mode 100644 index e6632b883..000000000 --- a/docs/v2/Core/models/FilterEnumType.md +++ /dev/null @@ -1,12 +0,0 @@ -# FilterEnumType - -FilterEnumType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**values** | List[str] | Yes | The values allowed by the enum type. | -**type** | Literal["enum"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/FilterFloatType.md b/docs/v2/Core/models/FilterFloatType.md deleted file mode 100644 index 3bd1b4198..000000000 --- a/docs/v2/Core/models/FilterFloatType.md +++ /dev/null @@ -1,11 +0,0 @@ -# FilterFloatType - -FilterFloatType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["float"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/FilterIntegerType.md b/docs/v2/Core/models/FilterIntegerType.md deleted file mode 100644 index 78d003958..000000000 --- a/docs/v2/Core/models/FilterIntegerType.md +++ /dev/null @@ -1,11 +0,0 @@ -# FilterIntegerType - -FilterIntegerType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["integer"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/FilterLongType.md b/docs/v2/Core/models/FilterLongType.md deleted file mode 100644 index f53e31dc3..000000000 --- a/docs/v2/Core/models/FilterLongType.md +++ /dev/null @@ -1,11 +0,0 @@ -# FilterLongType - -FilterLongType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["long"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/FilterRidType.md b/docs/v2/Core/models/FilterRidType.md deleted file mode 100644 index c78967097..000000000 --- a/docs/v2/Core/models/FilterRidType.md +++ /dev/null @@ -1,11 +0,0 @@ -# FilterRidType - -FilterRidType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["rid"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/FilterStringType.md b/docs/v2/Core/models/FilterStringType.md deleted file mode 100644 index a99935b81..000000000 --- a/docs/v2/Core/models/FilterStringType.md +++ /dev/null @@ -1,11 +0,0 @@ -# FilterStringType - -FilterStringType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["string"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/FilterType.md b/docs/v2/Core/models/FilterType.md deleted file mode 100644 index 821a2208d..000000000 --- a/docs/v2/Core/models/FilterType.md +++ /dev/null @@ -1,26 +0,0 @@ -# FilterType - -FilterType - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -FilterDateTimeType | dateTime -FilterDateType | date -FilterBooleanType | boolean -FilterStringType | string -FilterDoubleType | double -FilterBinaryType | binary -FilterIntegerType | integer -FilterFloatType | float -FilterRidType | rid -FilterUuidType | uuid -FilterEnumType | enum -FilterLongType | long - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/FilterUuidType.md b/docs/v2/Core/models/FilterUuidType.md deleted file mode 100644 index 02570c40a..000000000 --- a/docs/v2/Core/models/FilterUuidType.md +++ /dev/null @@ -1,11 +0,0 @@ -# FilterUuidType - -FilterUuidType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["uuid"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/FloatType.md b/docs/v2/Core/models/FloatType.md deleted file mode 100644 index 3890980bb..000000000 --- a/docs/v2/Core/models/FloatType.md +++ /dev/null @@ -1,11 +0,0 @@ -# FloatType - -FloatType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["float"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/FolderRid.md b/docs/v2/Core/models/FolderRid.md deleted file mode 100644 index 79a333e78..000000000 --- a/docs/v2/Core/models/FolderRid.md +++ /dev/null @@ -1,11 +0,0 @@ -# FolderRid - -FolderRid - -## Type -```python -RID -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/FoundryBranch.md b/docs/v2/Core/models/FoundryBranch.md deleted file mode 100644 index 1866423d2..000000000 --- a/docs/v2/Core/models/FoundryBranch.md +++ /dev/null @@ -1,11 +0,0 @@ -# FoundryBranch - -The Foundry branch identifier, specifically its rid. Different identifier types may be used in the future as values. - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/FoundryLiveDeployment.md b/docs/v2/Core/models/FoundryLiveDeployment.md deleted file mode 100644 index abdc6de44..000000000 --- a/docs/v2/Core/models/FoundryLiveDeployment.md +++ /dev/null @@ -1,14 +0,0 @@ -# FoundryLiveDeployment - -FoundryLiveDeployment - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**rid** | Optional[RID] | No | The live deployment identifier. This rid is of the format 'ri.foundry-ml-live.main.live-deployment.'. | -**input_param_name** | Optional[str] | No | The name of the input parameter to the model which should contain the query string. | -**output_param_name** | Optional[str] | No | The name of the output parameter to the model which should contain the computed embedding. | -**type** | Literal["foundryLiveDeployment"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/FullRowChangeDataCaptureConfiguration.md b/docs/v2/Core/models/FullRowChangeDataCaptureConfiguration.md deleted file mode 100644 index d18585c97..000000000 --- a/docs/v2/Core/models/FullRowChangeDataCaptureConfiguration.md +++ /dev/null @@ -1,16 +0,0 @@ -# FullRowChangeDataCaptureConfiguration - -Configuration for change data capture which resolves the latest state of the dataset based on new full rows -being pushed to the stream. For example, if a value for a row is updated, it is only sufficient to publish -the entire new state of that row to the stream. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**deletion_field_name** | FieldName | Yes | The name of a boolean field in the schema that indicates whether or not a row has been deleted. | -**ordering_field_name** | FieldName | Yes | The name of an ordering field that determines the newest state for a row in the dataset. The ordering field can only be of the following types: - Byte - Date - Decimal - Integer - Long - Short - String - Timestamp | -**type** | Literal["fullRow"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/GeoPointType.md b/docs/v2/Core/models/GeoPointType.md deleted file mode 100644 index 9118eea0a..000000000 --- a/docs/v2/Core/models/GeoPointType.md +++ /dev/null @@ -1,11 +0,0 @@ -# GeoPointType - -GeoPointType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["geopoint"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/GeoShapeType.md b/docs/v2/Core/models/GeoShapeType.md deleted file mode 100644 index acaef278c..000000000 --- a/docs/v2/Core/models/GeoShapeType.md +++ /dev/null @@ -1,11 +0,0 @@ -# GeoShapeType - -GeoShapeType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["geoshape"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/GeohashType.md b/docs/v2/Core/models/GeohashType.md deleted file mode 100644 index c2f116092..000000000 --- a/docs/v2/Core/models/GeohashType.md +++ /dev/null @@ -1,11 +0,0 @@ -# GeohashType - -GeohashType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["geohash"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/GeotimeSeriesReferenceType.md b/docs/v2/Core/models/GeotimeSeriesReferenceType.md deleted file mode 100644 index 631db4e87..000000000 --- a/docs/v2/Core/models/GeotimeSeriesReferenceType.md +++ /dev/null @@ -1,11 +0,0 @@ -# GeotimeSeriesReferenceType - -GeotimeSeriesReferenceType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["geotimeSeriesReference"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/GroupId.md b/docs/v2/Core/models/GroupId.md deleted file mode 100644 index 38f8098c5..000000000 --- a/docs/v2/Core/models/GroupId.md +++ /dev/null @@ -1,11 +0,0 @@ -# GroupId - -A Foundry Group ID. - -## Type -```python -UUID -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/GroupName.md b/docs/v2/Core/models/GroupName.md deleted file mode 100644 index 3b6830e5d..000000000 --- a/docs/v2/Core/models/GroupName.md +++ /dev/null @@ -1,11 +0,0 @@ -# GroupName - -The display name of a multipass group. - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/GroupRid.md b/docs/v2/Core/models/GroupRid.md deleted file mode 100644 index 8b3eba006..000000000 --- a/docs/v2/Core/models/GroupRid.md +++ /dev/null @@ -1,11 +0,0 @@ -# GroupRid - -The unique resource identifier (RID) of a multipass group. - -## Type -```python -RID -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/IncludeComputeUsage.md b/docs/v2/Core/models/IncludeComputeUsage.md deleted file mode 100644 index 69584f629..000000000 --- a/docs/v2/Core/models/IncludeComputeUsage.md +++ /dev/null @@ -1,14 +0,0 @@ -# IncludeComputeUsage - -Indicates whether the response should include compute usage details for the request. This feature is currently -only available for OSDK applications. -Note: Enabling this flag may slow down query performance and is not recommended for use in production. - - -## Type -```python -bool -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/IntegerType.md b/docs/v2/Core/models/IntegerType.md deleted file mode 100644 index fa78c00cd..000000000 --- a/docs/v2/Core/models/IntegerType.md +++ /dev/null @@ -1,11 +0,0 @@ -# IntegerType - -IntegerType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["integer"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/JobRid.md b/docs/v2/Core/models/JobRid.md deleted file mode 100644 index d06ef34de..000000000 --- a/docs/v2/Core/models/JobRid.md +++ /dev/null @@ -1,11 +0,0 @@ -# JobRid - -The RID of a Job. - -## Type -```python -RID -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/LmsEmbeddingModel.md b/docs/v2/Core/models/LmsEmbeddingModel.md deleted file mode 100644 index b0fd47be0..000000000 --- a/docs/v2/Core/models/LmsEmbeddingModel.md +++ /dev/null @@ -1,12 +0,0 @@ -# LmsEmbeddingModel - -A model provided by Language Model Service. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**value** | LmsEmbeddingModelValue | Yes | | -**type** | Literal["lms"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/LmsEmbeddingModelValue.md b/docs/v2/Core/models/LmsEmbeddingModelValue.md deleted file mode 100644 index b620f97fc..000000000 --- a/docs/v2/Core/models/LmsEmbeddingModelValue.md +++ /dev/null @@ -1,15 +0,0 @@ -# LmsEmbeddingModelValue - -LmsEmbeddingModelValue - -| **Value** | -| --------- | -| `"OPENAI_TEXT_EMBEDDING_ADA_002"` | -| `"TEXT_EMBEDDING_3_LARGE"` | -| `"TEXT_EMBEDDING_3_SMALL"` | -| `"SNOWFLAKE_ARCTIC_EMBED_M"` | -| `"INSTRUCTOR_LARGE"` | -| `"BGE_BASE_EN_V1_5"` | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/LongType.md b/docs/v2/Core/models/LongType.md deleted file mode 100644 index 5419e4420..000000000 --- a/docs/v2/Core/models/LongType.md +++ /dev/null @@ -1,11 +0,0 @@ -# LongType - -LongType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["long"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/MapFieldType.md b/docs/v2/Core/models/MapFieldType.md deleted file mode 100644 index f2370d9f3..000000000 --- a/docs/v2/Core/models/MapFieldType.md +++ /dev/null @@ -1,13 +0,0 @@ -# MapFieldType - -MapFieldType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**key_schema** | FieldSchema | Yes | | -**value_schema** | FieldSchema | Yes | | -**type** | Literal["map"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/MarkingId.md b/docs/v2/Core/models/MarkingId.md deleted file mode 100644 index 63dcb5217..000000000 --- a/docs/v2/Core/models/MarkingId.md +++ /dev/null @@ -1,11 +0,0 @@ -# MarkingId - -The ID of a security marking. - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/MarkingType.md b/docs/v2/Core/models/MarkingType.md deleted file mode 100644 index ddc4a13f0..000000000 --- a/docs/v2/Core/models/MarkingType.md +++ /dev/null @@ -1,11 +0,0 @@ -# MarkingType - -MarkingType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["marking"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/MediaItemPath.md b/docs/v2/Core/models/MediaItemPath.md deleted file mode 100644 index 2902a2dfb..000000000 --- a/docs/v2/Core/models/MediaItemPath.md +++ /dev/null @@ -1,15 +0,0 @@ -# MediaItemPath - -A user-specified identifier for a media item within a media set. -Paths must be less than 256 characters long. -If multiple items are written to the same media set at the same path, then when retrieving by path the media -item which was written last is returned. - - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/MediaItemReadToken.md b/docs/v2/Core/models/MediaItemReadToken.md deleted file mode 100644 index c55f1e225..000000000 --- a/docs/v2/Core/models/MediaItemReadToken.md +++ /dev/null @@ -1,11 +0,0 @@ -# MediaItemReadToken - -A token that grants access to read specific media items. - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/MediaItemRid.md b/docs/v2/Core/models/MediaItemRid.md deleted file mode 100644 index f66c9e6c7..000000000 --- a/docs/v2/Core/models/MediaItemRid.md +++ /dev/null @@ -1,11 +0,0 @@ -# MediaItemRid - -The Resource Identifier (RID) of an individual Media Item within a Media Set in Foundry. - -## Type -```python -RID -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/MediaReference.md b/docs/v2/Core/models/MediaReference.md deleted file mode 100644 index 10e1d3829..000000000 --- a/docs/v2/Core/models/MediaReference.md +++ /dev/null @@ -1,12 +0,0 @@ -# MediaReference - -The representation of a media reference. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**mime_type** | MediaType | Yes | | -**reference** | Reference | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/MediaReferenceType.md b/docs/v2/Core/models/MediaReferenceType.md deleted file mode 100644 index 43052bf24..000000000 --- a/docs/v2/Core/models/MediaReferenceType.md +++ /dev/null @@ -1,11 +0,0 @@ -# MediaReferenceType - -MediaReferenceType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["mediaReference"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/MediaSetRid.md b/docs/v2/Core/models/MediaSetRid.md deleted file mode 100644 index 317066feb..000000000 --- a/docs/v2/Core/models/MediaSetRid.md +++ /dev/null @@ -1,11 +0,0 @@ -# MediaSetRid - -The Resource Identifier (RID) of a Media Set in Foundry. - -## Type -```python -RID -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/MediaSetViewItem.md b/docs/v2/Core/models/MediaSetViewItem.md deleted file mode 100644 index cf6fc6ed9..000000000 --- a/docs/v2/Core/models/MediaSetViewItem.md +++ /dev/null @@ -1,14 +0,0 @@ -# MediaSetViewItem - -MediaSetViewItem - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**media_set_rid** | MediaSetRid | Yes | | -**media_set_view_rid** | MediaSetViewRid | Yes | | -**media_item_rid** | MediaItemRid | Yes | | -**token** | Optional[MediaItemReadToken] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/MediaSetViewItemWrapper.md b/docs/v2/Core/models/MediaSetViewItemWrapper.md deleted file mode 100644 index 851b82323..000000000 --- a/docs/v2/Core/models/MediaSetViewItemWrapper.md +++ /dev/null @@ -1,12 +0,0 @@ -# MediaSetViewItemWrapper - -MediaSetViewItemWrapper - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**media_set_view_item** | MediaSetViewItem | Yes | | -**type** | Literal["mediaSetViewItem"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/MediaSetViewRid.md b/docs/v2/Core/models/MediaSetViewRid.md deleted file mode 100644 index 62e6bdaf4..000000000 --- a/docs/v2/Core/models/MediaSetViewRid.md +++ /dev/null @@ -1,11 +0,0 @@ -# MediaSetViewRid - -The Resource Identifier (RID) of a single View of a Media Set. A Media Set View is an independent collection of Media Items. - -## Type -```python -RID -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/MediaType.md b/docs/v2/Core/models/MediaType.md deleted file mode 100644 index 38ceb68c0..000000000 --- a/docs/v2/Core/models/MediaType.md +++ /dev/null @@ -1,13 +0,0 @@ -# MediaType - -The [media type](https://www.iana.org/assignments/media-types/media-types.xhtml) of the file or attachment. -Examples: `application/json`, `application/pdf`, `application/octet-stream`, `image/jpeg` - - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/NullType.md b/docs/v2/Core/models/NullType.md deleted file mode 100644 index eb3fcd49e..000000000 --- a/docs/v2/Core/models/NullType.md +++ /dev/null @@ -1,11 +0,0 @@ -# NullType - -NullType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["null"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/NumericOrNonNumericType.md b/docs/v2/Core/models/NumericOrNonNumericType.md deleted file mode 100644 index fc773ce15..000000000 --- a/docs/v2/Core/models/NumericOrNonNumericType.md +++ /dev/null @@ -1,16 +0,0 @@ -# NumericOrNonNumericType - -The time series property can either contain either numeric or non-numeric data. This enables mixed sensor types -where some sensor time series are numeric and others are categorical. A boolean property reference can be used -to determine if the series is numeric or non-numeric. Without this property, the series type can be either -numeric or non-numeric and must be inferred from the result of a time series query. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**is_non_numeric_property_type_id** | Optional[str] | No | The boolean property type ID specifying whether the series is numeric or non-numeric. If the value is true, the series is non-numeric. | -**type** | Literal["numericOrNonNumeric"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/Operation.md b/docs/v2/Core/models/Operation.md deleted file mode 100644 index 19370e487..000000000 --- a/docs/v2/Core/models/Operation.md +++ /dev/null @@ -1,13 +0,0 @@ -# Operation - -An operation that can be performed on a resource. Operations are used to define the permissions that a Role has. -Operations are typically in the format `service:action`, where `service` is related to the type of resource and `action` is the action being performed. - - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/OperationScope.md b/docs/v2/Core/models/OperationScope.md deleted file mode 100644 index 409d1630b..000000000 --- a/docs/v2/Core/models/OperationScope.md +++ /dev/null @@ -1,11 +0,0 @@ -# OperationScope - -OperationScope - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/OrderByDirection.md b/docs/v2/Core/models/OrderByDirection.md deleted file mode 100644 index bb9a60708..000000000 --- a/docs/v2/Core/models/OrderByDirection.md +++ /dev/null @@ -1,11 +0,0 @@ -# OrderByDirection - -Specifies the ordering direction (can be either `ASC` or `DESC`) - -| **Value** | -| --------- | -| `"ASC"` | -| `"DESC"` | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/OrganizationRid.md b/docs/v2/Core/models/OrganizationRid.md deleted file mode 100644 index ee7721df3..000000000 --- a/docs/v2/Core/models/OrganizationRid.md +++ /dev/null @@ -1,11 +0,0 @@ -# OrganizationRid - -OrganizationRid - -## Type -```python -RID -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/PageSize.md b/docs/v2/Core/models/PageSize.md deleted file mode 100644 index 545f11f4c..000000000 --- a/docs/v2/Core/models/PageSize.md +++ /dev/null @@ -1,11 +0,0 @@ -# PageSize - -The page size to use for the endpoint. - -## Type -```python -int -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/PageToken.md b/docs/v2/Core/models/PageToken.md deleted file mode 100644 index a3835a71a..000000000 --- a/docs/v2/Core/models/PageToken.md +++ /dev/null @@ -1,14 +0,0 @@ -# PageToken - -The page token indicates where to start paging. This should be omitted from the first page's request. -To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response -and use it to populate the `pageToken` field of the next request. - - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/PreviewMode.md b/docs/v2/Core/models/PreviewMode.md deleted file mode 100644 index b1468126b..000000000 --- a/docs/v2/Core/models/PreviewMode.md +++ /dev/null @@ -1,11 +0,0 @@ -# PreviewMode - -Enables the use of preview functionality. - -## Type -```python -bool -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/PrincipalId.md b/docs/v2/Core/models/PrincipalId.md deleted file mode 100644 index 0a4cd0a6a..000000000 --- a/docs/v2/Core/models/PrincipalId.md +++ /dev/null @@ -1,11 +0,0 @@ -# PrincipalId - -The ID of a Foundry Group or User. - -## Type -```python -UUID -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/PrincipalType.md b/docs/v2/Core/models/PrincipalType.md deleted file mode 100644 index 5b00c218d..000000000 --- a/docs/v2/Core/models/PrincipalType.md +++ /dev/null @@ -1,11 +0,0 @@ -# PrincipalType - -PrincipalType - -| **Value** | -| --------- | -| `"USER"` | -| `"GROUP"` | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/Realm.md b/docs/v2/Core/models/Realm.md deleted file mode 100644 index 2f4f68106..000000000 --- a/docs/v2/Core/models/Realm.md +++ /dev/null @@ -1,13 +0,0 @@ -# Realm - -Identifies which Realm a User or Group is a member of. -The `palantir-internal-realm` is used for Users or Groups that are created in Foundry by administrators and not associated with any SSO provider. - - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/Reference.md b/docs/v2/Core/models/Reference.md deleted file mode 100644 index b7dabe846..000000000 --- a/docs/v2/Core/models/Reference.md +++ /dev/null @@ -1,12 +0,0 @@ -# Reference - -A union of the types supported by media reference properties. - - -## Type -```python -MediaSetViewItemWrapper -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/ReleaseStatus.md b/docs/v2/Core/models/ReleaseStatus.md deleted file mode 100644 index 09876173b..000000000 --- a/docs/v2/Core/models/ReleaseStatus.md +++ /dev/null @@ -1,13 +0,0 @@ -# ReleaseStatus - -The release status of the entity. - -| **Value** | -| --------- | -| `"ACTIVE"` | -| `"ENDORSED"` | -| `"EXPERIMENTAL"` | -| `"DEPRECATED"` | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/Role.md b/docs/v2/Core/models/Role.md deleted file mode 100644 index 3394a4460..000000000 --- a/docs/v2/Core/models/Role.md +++ /dev/null @@ -1,18 +0,0 @@ -# Role - -A set of permissions that can be assigned to a principal for a specific resource type. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**id** | RoleId | Yes | | -**role_set_id** | RoleSetId | Yes | | -**name** | str | Yes | | -**description** | str | Yes | | -**is_default** | bool | Yes | Default roles are provided by Palantir and cannot be edited or modified by administrators. | -**type** | RoleContext | Yes | The type of resource that is valid for this role. | -**operations** | List[Operation] | Yes | The operations that a principal can perform with this role on the assigned resource. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/RoleAssignmentUpdate.md b/docs/v2/Core/models/RoleAssignmentUpdate.md deleted file mode 100644 index 6359d0756..000000000 --- a/docs/v2/Core/models/RoleAssignmentUpdate.md +++ /dev/null @@ -1,12 +0,0 @@ -# RoleAssignmentUpdate - -RoleAssignmentUpdate - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**role_id** | RoleId | Yes | | -**principal_id** | PrincipalId | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/RoleContext.md b/docs/v2/Core/models/RoleContext.md deleted file mode 100644 index 796419d09..000000000 --- a/docs/v2/Core/models/RoleContext.md +++ /dev/null @@ -1,10 +0,0 @@ -# RoleContext - -RoleContext - -| **Value** | -| --------- | -| `"ORGANIZATION"` | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/RoleId.md b/docs/v2/Core/models/RoleId.md deleted file mode 100644 index 16cbf09eb..000000000 --- a/docs/v2/Core/models/RoleId.md +++ /dev/null @@ -1,14 +0,0 @@ -# RoleId - -The unique ID for a Role. Roles are sets of permissions that grant different levels of access to resources. -The default roles in Foundry are: Owner, Editor, Viewer, and Discoverer. See more about -[roles](https://palantir.com/docs/foundry/security/projects-and-roles#roles) in the user documentation. - - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/RoleSetId.md b/docs/v2/Core/models/RoleSetId.md deleted file mode 100644 index 53440205a..000000000 --- a/docs/v2/Core/models/RoleSetId.md +++ /dev/null @@ -1,11 +0,0 @@ -# RoleSetId - -RoleSetId - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/ScheduleRid.md b/docs/v2/Core/models/ScheduleRid.md deleted file mode 100644 index 05410a5c2..000000000 --- a/docs/v2/Core/models/ScheduleRid.md +++ /dev/null @@ -1,11 +0,0 @@ -# ScheduleRid - -The RID of a Schedule. - -## Type -```python -RID -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/SchemaFieldType.md b/docs/v2/Core/models/SchemaFieldType.md deleted file mode 100644 index 9df729727..000000000 --- a/docs/v2/Core/models/SchemaFieldType.md +++ /dev/null @@ -1,24 +0,0 @@ -# SchemaFieldType - -The data type of a column in a dataset schema. - -| **Value** | -| --------- | -| `"ARRAY"` | -| `"BINARY"` | -| `"BOOLEAN"` | -| `"BYTE"` | -| `"DATE"` | -| `"DECIMAL"` | -| `"DOUBLE"` | -| `"FLOAT"` | -| `"INTEGER"` | -| `"LONG"` | -| `"MAP"` | -| `"SHORT"` | -| `"STRING"` | -| `"STRUCT"` | -| `"TIMESTAMP"` | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/ShortType.md b/docs/v2/Core/models/ShortType.md deleted file mode 100644 index f19736905..000000000 --- a/docs/v2/Core/models/ShortType.md +++ /dev/null @@ -1,11 +0,0 @@ -# ShortType - -ShortType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["short"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/SizeBytes.md b/docs/v2/Core/models/SizeBytes.md deleted file mode 100644 index 9fadba909..000000000 --- a/docs/v2/Core/models/SizeBytes.md +++ /dev/null @@ -1,11 +0,0 @@ -# SizeBytes - -The size of the file or attachment in bytes. - -## Type -```python -Long -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/StreamSchema.md b/docs/v2/Core/models/StreamSchema.md deleted file mode 100644 index dd60f7481..000000000 --- a/docs/v2/Core/models/StreamSchema.md +++ /dev/null @@ -1,14 +0,0 @@ -# StreamSchema - -The schema for a Foundry stream. Records pushed to this stream must match this schema. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**fields** | List[Field] | Yes | | -**key_field_names** | Optional[List[FieldName]] | No | The names of the fields to be used as keys for partitioning records. These key fields are used to group all records with the same key into the same partition, to guarantee processing order of grouped records. These keys are not meant to uniquely identify records, and do not by themselves deduplicate records. To deduplicate records, provide a change data capture configuration for the schema. Key fields can only be of the following types: - Boolean - Byte - Date - Decimal - Integer - Long - Short - String - Timestamp For additional information on keys for Foundry streams, see the [streaming keys](https://palantir.com/docs/foundry/building-pipelines/streaming-keys/) user documentation. | -**change_data_capture** | Optional[ChangeDataCaptureConfiguration] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/StringType.md b/docs/v2/Core/models/StringType.md deleted file mode 100644 index a82271b7b..000000000 --- a/docs/v2/Core/models/StringType.md +++ /dev/null @@ -1,11 +0,0 @@ -# StringType - -StringType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["string"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/StructFieldName.md b/docs/v2/Core/models/StructFieldName.md deleted file mode 100644 index eb543b79e..000000000 --- a/docs/v2/Core/models/StructFieldName.md +++ /dev/null @@ -1,12 +0,0 @@ -# StructFieldName - -The name of a field in a `Struct`. - - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/StructFieldType.md b/docs/v2/Core/models/StructFieldType.md deleted file mode 100644 index 001bb350b..000000000 --- a/docs/v2/Core/models/StructFieldType.md +++ /dev/null @@ -1,12 +0,0 @@ -# StructFieldType - -StructFieldType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**sub_fields** | List[Field] | Yes | | -**type** | Literal["struct"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/TableRid.md b/docs/v2/Core/models/TableRid.md deleted file mode 100644 index d493b967f..000000000 --- a/docs/v2/Core/models/TableRid.md +++ /dev/null @@ -1,11 +0,0 @@ -# TableRid - -The Resource Identifier (RID) of a Table. - -## Type -```python -RID -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/TimeSeriesItemType.md b/docs/v2/Core/models/TimeSeriesItemType.md deleted file mode 100644 index 414a96e8d..000000000 --- a/docs/v2/Core/models/TimeSeriesItemType.md +++ /dev/null @@ -1,18 +0,0 @@ -# TimeSeriesItemType - -A union of the types supported by time series properties. - - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -StringType | string -DoubleType | double -NumericOrNonNumericType | numericOrNonNumeric - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/TimeUnit.md b/docs/v2/Core/models/TimeUnit.md deleted file mode 100644 index f814f5ad9..000000000 --- a/docs/v2/Core/models/TimeUnit.md +++ /dev/null @@ -1,17 +0,0 @@ -# TimeUnit - -TimeUnit - -| **Value** | -| --------- | -| `"MILLISECONDS"` | -| `"SECONDS"` | -| `"MINUTES"` | -| `"HOURS"` | -| `"DAYS"` | -| `"WEEKS"` | -| `"MONTHS"` | -| `"YEARS"` | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/TimeseriesType.md b/docs/v2/Core/models/TimeseriesType.md deleted file mode 100644 index e662b0206..000000000 --- a/docs/v2/Core/models/TimeseriesType.md +++ /dev/null @@ -1,12 +0,0 @@ -# TimeseriesType - -TimeseriesType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**item_type** | TimeSeriesItemType | Yes | | -**type** | Literal["timeseries"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/TimestampType.md b/docs/v2/Core/models/TimestampType.md deleted file mode 100644 index 914eec11e..000000000 --- a/docs/v2/Core/models/TimestampType.md +++ /dev/null @@ -1,11 +0,0 @@ -# TimestampType - -TimestampType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["timestamp"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/TotalCount.md b/docs/v2/Core/models/TotalCount.md deleted file mode 100644 index d428130ed..000000000 --- a/docs/v2/Core/models/TotalCount.md +++ /dev/null @@ -1,12 +0,0 @@ -# TotalCount - -The total number of items across all pages. - - -## Type -```python -Long -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/TraceParent.md b/docs/v2/Core/models/TraceParent.md deleted file mode 100644 index 2f8029e0d..000000000 --- a/docs/v2/Core/models/TraceParent.md +++ /dev/null @@ -1,11 +0,0 @@ -# TraceParent - -The W3C Trace Context `traceparent` header value used to propagate distributed tracing information for Foundry telemetry. See https://www.w3.org/TR/trace-context/#traceparent-header for more details. Note the 16 byte trace ID encoded in the header must be derived from a time based uuid to be used within Foundry. - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/TraceState.md b/docs/v2/Core/models/TraceState.md deleted file mode 100644 index 4c897fb1b..000000000 --- a/docs/v2/Core/models/TraceState.md +++ /dev/null @@ -1,11 +0,0 @@ -# TraceState - -The W3C Trace Context `tracestate` header value, which is used to propagate vendor specific distributed tracing information for Foundry telemetry. See https://www.w3.org/TR/trace-context/#tracestate-header for more details. - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/UnsupportedType.md b/docs/v2/Core/models/UnsupportedType.md deleted file mode 100644 index 271fa007b..000000000 --- a/docs/v2/Core/models/UnsupportedType.md +++ /dev/null @@ -1,12 +0,0 @@ -# UnsupportedType - -UnsupportedType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**unsupported_type** | str | Yes | | -**type** | Literal["unsupported"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/UpdatedBy.md b/docs/v2/Core/models/UpdatedBy.md deleted file mode 100644 index b860b731c..000000000 --- a/docs/v2/Core/models/UpdatedBy.md +++ /dev/null @@ -1,11 +0,0 @@ -# UpdatedBy - -The Foundry user who last updated this resource - -## Type -```python -UserId -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/UpdatedTime.md b/docs/v2/Core/models/UpdatedTime.md deleted file mode 100644 index e46019f77..000000000 --- a/docs/v2/Core/models/UpdatedTime.md +++ /dev/null @@ -1,12 +0,0 @@ -# UpdatedTime - -The time at which the resource was most recently updated. - - -## Type -```python -datetime -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/UserId.md b/docs/v2/Core/models/UserId.md deleted file mode 100644 index f861a7a61..000000000 --- a/docs/v2/Core/models/UserId.md +++ /dev/null @@ -1,12 +0,0 @@ -# UserId - -A Foundry User ID. - - -## Type -```python -UUID -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/UserStatus.md b/docs/v2/Core/models/UserStatus.md deleted file mode 100644 index 7bbf7e98a..000000000 --- a/docs/v2/Core/models/UserStatus.md +++ /dev/null @@ -1,11 +0,0 @@ -# UserStatus - -Present status of user. - -| **Value** | -| --------- | -| `"ACTIVE"` | -| `"DELETED"` | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/VectorSimilarityFunction.md b/docs/v2/Core/models/VectorSimilarityFunction.md deleted file mode 100644 index 4bb432908..000000000 --- a/docs/v2/Core/models/VectorSimilarityFunction.md +++ /dev/null @@ -1,13 +0,0 @@ -# VectorSimilarityFunction - -The vector similarity function to support approximate nearest neighbors search. Will result in an index -specific for the function. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**value** | Optional[VectorSimilarityFunctionValue] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/VectorSimilarityFunctionValue.md b/docs/v2/Core/models/VectorSimilarityFunctionValue.md deleted file mode 100644 index fdc9e559d..000000000 --- a/docs/v2/Core/models/VectorSimilarityFunctionValue.md +++ /dev/null @@ -1,12 +0,0 @@ -# VectorSimilarityFunctionValue - -VectorSimilarityFunctionValue - -| **Value** | -| --------- | -| `"COSINE_SIMILARITY"` | -| `"DOT_PRODUCT"` | -| `"EUCLIDEAN_DISTANCE"` | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/VectorType.md b/docs/v2/Core/models/VectorType.md deleted file mode 100644 index 57bfe9b98..000000000 --- a/docs/v2/Core/models/VectorType.md +++ /dev/null @@ -1,14 +0,0 @@ -# VectorType - -Represents a fixed size vector of floats. These can be used for vector similarity searches. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**dimension** | int | Yes | The dimension of the vector. | -**supports_search_with** | List[VectorSimilarityFunction] | Yes | | -**embedding_model** | Optional[EmbeddingModel] | No | | -**type** | Literal["vector"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/VersionId.md b/docs/v2/Core/models/VersionId.md deleted file mode 100644 index df1f3827f..000000000 --- a/docs/v2/Core/models/VersionId.md +++ /dev/null @@ -1,12 +0,0 @@ -# VersionId - -The version identifier of a dataset schema. - - -## Type -```python -UUID -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/ZoneId.md b/docs/v2/Core/models/ZoneId.md deleted file mode 100644 index ed9e4c946..000000000 --- a/docs/v2/Core/models/ZoneId.md +++ /dev/null @@ -1,11 +0,0 @@ -# ZoneId - -A string representation of a java.time.ZoneId - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/Check.md b/docs/v2/DataHealth/Check.md deleted file mode 100644 index 4c5ace04e..000000000 --- a/docs/v2/DataHealth/Check.md +++ /dev/null @@ -1,220 +0,0 @@ -# Check - -Method | HTTP request | Release Stage | -------------- | ------------- | ----- | -[**create**](#create) | **POST** /v2/dataHealth/checks | Public Beta | -[**delete**](#delete) | **DELETE** /v2/dataHealth/checks/{checkRid} | Public Beta | -[**get**](#get) | **GET** /v2/dataHealth/checks/{checkRid} | Public Beta | -[**replace**](#replace) | **PUT** /v2/dataHealth/checks/{checkRid} | Public Beta | - -# **create** -Creates a new Check. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**config** | CheckConfig | | | -**intent** | Optional[CheckIntent] | | [optional] | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**Check** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# CheckConfig -config = None -# Optional[CheckIntent] -intent = "Check to ensure builds are passing." -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.data_health.Check.create(config=config, intent=intent, preview=preview) - print("The create response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Check.create: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | Check | The created Check | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **delete** -Delete the Check with the specified rid. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**check_rid** | CheckRid | | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**None** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# CheckRid -check_rid = "ri.data-health.main.check.8e27b13a-e21b-4232-ae1b-76ccf5ff42b3" -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.data_health.Check.delete(check_rid, preview=preview) - print("The delete response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Check.delete: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**204** | None | | None | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **get** -Get the Check with the specified rid. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**check_rid** | CheckRid | | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**Check** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# CheckRid -check_rid = "ri.data-health.main.check.8e27b13a-e21b-4232-ae1b-76ccf5ff42b3" -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.data_health.Check.get(check_rid, preview=preview) - print("The get response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Check.get: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | Check | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **replace** -Replace the Check with the specified rid. Changing the type of a check after it has been created is not supported. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**check_rid** | CheckRid | | | -**config** | ReplaceCheckConfig | | | -**intent** | Optional[CheckIntent] | | [optional] | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**Check** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# CheckRid -check_rid = "ri.data-health.main.check.8e27b13a-e21b-4232-ae1b-76ccf5ff42b3" -# ReplaceCheckConfig -config = None -# Optional[CheckIntent] -intent = "Check to ensure builds are passing." -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.data_health.Check.replace( - check_rid, config=config, intent=intent, preview=preview - ) - print("The replace response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Check.replace: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | Check | The replaced Check | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - diff --git a/docs/v2/DataHealth/CheckReport.md b/docs/v2/DataHealth/CheckReport.md deleted file mode 100644 index 3e5c3dadd..000000000 --- a/docs/v2/DataHealth/CheckReport.md +++ /dev/null @@ -1,56 +0,0 @@ -# CheckReport - -Method | HTTP request | Release Stage | -------------- | ------------- | ----- | -[**get**](#get) | **GET** /v2/dataHealth/checkReports/{checkReportRid} | Public Beta | - -# **get** -Get the CheckReport with the specified rid. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**check_report_rid** | CheckReportRid | | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**CheckReport** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# CheckReportRid -check_report_rid = "ri.data-health.main.check-report.a1b2c3d4-e5f6-7890-abcd-ef1234567890" -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.data_health.CheckReport.get(check_report_rid, preview=preview) - print("The get response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling CheckReport.get: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | CheckReport | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - diff --git a/docs/v2/DataHealth/models/AllowedColumnValuesCheckConfig.md b/docs/v2/DataHealth/models/AllowedColumnValuesCheckConfig.md deleted file mode 100644 index 0d9e364ea..000000000 --- a/docs/v2/DataHealth/models/AllowedColumnValuesCheckConfig.md +++ /dev/null @@ -1,16 +0,0 @@ -# AllowedColumnValuesCheckConfig - -Checks that values in a column are within an allowed set of values. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**subject** | DatasetSubject | Yes | | -**column_name** | ColumnName | Yes | | -**allowed_values** | List[ColumnValue] | Yes | | -**allow_null** | Optional[bool] | No | | -**severity** | SeverityLevel | Yes | | -**type** | Literal["allowedColumnValues"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/ApproximateUniquePercentageCheckConfig.md b/docs/v2/DataHealth/models/ApproximateUniquePercentageCheckConfig.md deleted file mode 100644 index 84822309b..000000000 --- a/docs/v2/DataHealth/models/ApproximateUniquePercentageCheckConfig.md +++ /dev/null @@ -1,13 +0,0 @@ -# ApproximateUniquePercentageCheckConfig - -Checks the approximate percentage of unique values in a specific column. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**subject** | DatasetSubject | Yes | | -**percentage_check_config** | PercentageCheckConfig | Yes | | -**type** | Literal["approximateUniquePercentage"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/BooleanColumnValue.md b/docs/v2/DataHealth/models/BooleanColumnValue.md deleted file mode 100644 index 0cdedf572..000000000 --- a/docs/v2/DataHealth/models/BooleanColumnValue.md +++ /dev/null @@ -1,12 +0,0 @@ -# BooleanColumnValue - -A boolean column value. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**value** | bool | Yes | | -**type** | Literal["boolean"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/BuildDurationCheckConfig.md b/docs/v2/DataHealth/models/BuildDurationCheckConfig.md deleted file mode 100644 index 1c4227c0d..000000000 --- a/docs/v2/DataHealth/models/BuildDurationCheckConfig.md +++ /dev/null @@ -1,13 +0,0 @@ -# BuildDurationCheckConfig - -Checks the total time a build takes to complete. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**subject** | DatasetSubject | Yes | | -**time_check_config** | TimeCheckConfig | Yes | | -**type** | Literal["buildDuration"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/BuildStatusCheckConfig.md b/docs/v2/DataHealth/models/BuildStatusCheckConfig.md deleted file mode 100644 index 4b3d2847d..000000000 --- a/docs/v2/DataHealth/models/BuildStatusCheckConfig.md +++ /dev/null @@ -1,13 +0,0 @@ -# BuildStatusCheckConfig - -Checks the status of the most recent build of the dataset. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**subject** | DatasetSubject | Yes | | -**status_check_config** | StatusCheckConfig | Yes | | -**type** | Literal["buildStatus"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/Check.md b/docs/v2/DataHealth/models/Check.md deleted file mode 100644 index 974647082..000000000 --- a/docs/v2/DataHealth/models/Check.md +++ /dev/null @@ -1,16 +0,0 @@ -# Check - -Check - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**rid** | CheckRid | Yes | | -**groups** | List[CheckGroupRid] | Yes | | -**config** | CheckConfig | Yes | | -**intent** | Optional[CheckIntent] | No | | -**created_by** | Optional[CreatedBy] | No | The user that created the Check. | -**updated_time** | Optional[UpdatedTime] | No | The timestamp when the Check was last updated. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/CheckConfig.md b/docs/v2/DataHealth/models/CheckConfig.md deleted file mode 100644 index 3fbaaa661..000000000 --- a/docs/v2/DataHealth/models/CheckConfig.md +++ /dev/null @@ -1,30 +0,0 @@ -# CheckConfig - -Configuration of a check. - - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -NumericColumnRangeCheckConfig | numericColumnRange -JobStatusCheckConfig | jobStatus -NumericColumnMeanCheckConfig | numericColumnMean -DateColumnRangeCheckConfig | dateColumnRange -JobDurationCheckConfig | jobDuration -ApproximateUniquePercentageCheckConfig | approximateUniquePercentage -BuildStatusCheckConfig | buildStatus -ColumnTypeCheckConfig | columnType -AllowedColumnValuesCheckConfig | allowedColumnValues -NullPercentageCheckConfig | nullPercentage -TotalColumnCountCheckConfig | totalColumnCount -NumericColumnMedianCheckConfig | numericColumnMedian -BuildDurationCheckConfig | buildDuration -SchemaComparisonCheckConfig | schemaComparison -PrimaryKeyCheckConfig | primaryKey - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/CheckGroupRid.md b/docs/v2/DataHealth/models/CheckGroupRid.md deleted file mode 100644 index d4887b9d8..000000000 --- a/docs/v2/DataHealth/models/CheckGroupRid.md +++ /dev/null @@ -1,11 +0,0 @@ -# CheckGroupRid - -The unique resource identifier (RID) of a CheckGroup. - -## Type -```python -RID -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/CheckIntent.md b/docs/v2/DataHealth/models/CheckIntent.md deleted file mode 100644 index 2b470db4b..000000000 --- a/docs/v2/DataHealth/models/CheckIntent.md +++ /dev/null @@ -1,12 +0,0 @@ -# CheckIntent - -A note about why the Check was set up. - - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/CheckReport.md b/docs/v2/DataHealth/models/CheckReport.md deleted file mode 100644 index bf2bd2ebf..000000000 --- a/docs/v2/DataHealth/models/CheckReport.md +++ /dev/null @@ -1,14 +0,0 @@ -# CheckReport - -CheckReport - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**rid** | CheckReportRid | Yes | | -**check** | Check | Yes | Snapshot of the check configuration when this report was created. This will not change if the check is later modified. | -**result** | CheckResult | Yes | | -**created_time** | CreatedTime | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/CheckResult.md b/docs/v2/DataHealth/models/CheckResult.md deleted file mode 100644 index 45e6dfd13..000000000 --- a/docs/v2/DataHealth/models/CheckResult.md +++ /dev/null @@ -1,12 +0,0 @@ -# CheckResult - -The result of running a check. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**status** | CheckResultStatus | Yes | | -**message** | Optional[str] | No | Further details about the result of the check. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/CheckResultStatus.md b/docs/v2/DataHealth/models/CheckResultStatus.md deleted file mode 100644 index 433af850e..000000000 --- a/docs/v2/DataHealth/models/CheckResultStatus.md +++ /dev/null @@ -1,15 +0,0 @@ -# CheckResultStatus - -The status of a check report execution. - -| **Value** | -| --------- | -| `"PASSED"` | -| `"FAILED"` | -| `"WARNING"` | -| `"ERROR"` | -| `"NOT_APPLICABLE"` | -| `"NOT_COMPUTABLE"` | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/ColumnCountConfig.md b/docs/v2/DataHealth/models/ColumnCountConfig.md deleted file mode 100644 index 286f8632a..000000000 --- a/docs/v2/DataHealth/models/ColumnCountConfig.md +++ /dev/null @@ -1,12 +0,0 @@ -# ColumnCountConfig - -Configuration for column count validation with severity settings. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**expected_value** | Long | Yes | | -**severity** | SeverityLevel | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/ColumnInfo.md b/docs/v2/DataHealth/models/ColumnInfo.md deleted file mode 100644 index 62b17970d..000000000 --- a/docs/v2/DataHealth/models/ColumnInfo.md +++ /dev/null @@ -1,12 +0,0 @@ -# ColumnInfo - -Information about a column including its name and type. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**name** | ColumnName | Yes | | -**column_type** | Optional[SchemaFieldType] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/ColumnName.md b/docs/v2/DataHealth/models/ColumnName.md deleted file mode 100644 index 2b5c28dcb..000000000 --- a/docs/v2/DataHealth/models/ColumnName.md +++ /dev/null @@ -1,11 +0,0 @@ -# ColumnName - -ColumnName - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/ColumnTypeCheckConfig.md b/docs/v2/DataHealth/models/ColumnTypeCheckConfig.md deleted file mode 100644 index 29e177129..000000000 --- a/docs/v2/DataHealth/models/ColumnTypeCheckConfig.md +++ /dev/null @@ -1,13 +0,0 @@ -# ColumnTypeCheckConfig - -Checks the existence and optionally the type of a specific column. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**subject** | DatasetSubject | Yes | | -**column_type_config** | ColumnTypeConfig | Yes | | -**type** | Literal["columnType"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/ColumnTypeConfig.md b/docs/v2/DataHealth/models/ColumnTypeConfig.md deleted file mode 100644 index 0709ec9d2..000000000 --- a/docs/v2/DataHealth/models/ColumnTypeConfig.md +++ /dev/null @@ -1,13 +0,0 @@ -# ColumnTypeConfig - -Configuration for column type validation with severity settings. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**column_name** | ColumnName | Yes | | -**expected_type** | Optional[SchemaFieldType] | No | | -**severity** | SeverityLevel | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/ColumnValue.md b/docs/v2/DataHealth/models/ColumnValue.md deleted file mode 100644 index d71ae1ad1..000000000 --- a/docs/v2/DataHealth/models/ColumnValue.md +++ /dev/null @@ -1,18 +0,0 @@ -# ColumnValue - -A column value that can be of different types. - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -DateColumnValue | date -BooleanColumnValue | boolean -StringColumnValue | string -NumericColumnValue | numeric - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/CreateCheckRequest.md b/docs/v2/DataHealth/models/CreateCheckRequest.md deleted file mode 100644 index 243b3c866..000000000 --- a/docs/v2/DataHealth/models/CreateCheckRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# CreateCheckRequest - -CreateCheckRequest - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**config** | CheckConfig | Yes | | -**intent** | Optional[CheckIntent] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/DatasetSubject.md b/docs/v2/DataHealth/models/DatasetSubject.md deleted file mode 100644 index 76754ffa5..000000000 --- a/docs/v2/DataHealth/models/DatasetSubject.md +++ /dev/null @@ -1,12 +0,0 @@ -# DatasetSubject - -A dataset resource type. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**dataset_rid** | DatasetRid | Yes | | -**branch_id** | BranchName | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/DateBounds.md b/docs/v2/DataHealth/models/DateBounds.md deleted file mode 100644 index 7b1572854..000000000 --- a/docs/v2/DataHealth/models/DateBounds.md +++ /dev/null @@ -1,12 +0,0 @@ -# DateBounds - -The range of date values a check is expected to be within. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**lower_bound** | Optional[datetime] | No | | -**upper_bound** | Optional[datetime] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/DateBoundsConfig.md b/docs/v2/DataHealth/models/DateBoundsConfig.md deleted file mode 100644 index 1b6b3857b..000000000 --- a/docs/v2/DataHealth/models/DateBoundsConfig.md +++ /dev/null @@ -1,12 +0,0 @@ -# DateBoundsConfig - -Configuration for date bounds check with severity settings. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**date_bounds** | DateBounds | Yes | | -**severity** | SeverityLevel | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/DateColumnRangeCheckConfig.md b/docs/v2/DataHealth/models/DateColumnRangeCheckConfig.md deleted file mode 100644 index a524d64e3..000000000 --- a/docs/v2/DataHealth/models/DateColumnRangeCheckConfig.md +++ /dev/null @@ -1,14 +0,0 @@ -# DateColumnRangeCheckConfig - -Checks that values in a date column fall within a specified range. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**subject** | DatasetSubject | Yes | | -**column_name** | ColumnName | Yes | | -**date_bounds_config** | DateBoundsConfig | Yes | | -**type** | Literal["dateColumnRange"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/DateColumnValue.md b/docs/v2/DataHealth/models/DateColumnValue.md deleted file mode 100644 index 25b7e8341..000000000 --- a/docs/v2/DataHealth/models/DateColumnValue.md +++ /dev/null @@ -1,12 +0,0 @@ -# DateColumnValue - -A date column value. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**value** | datetime | Yes | | -**type** | Literal["date"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/EscalationConfig.md b/docs/v2/DataHealth/models/EscalationConfig.md deleted file mode 100644 index 2b25f2f3f..000000000 --- a/docs/v2/DataHealth/models/EscalationConfig.md +++ /dev/null @@ -1,12 +0,0 @@ -# EscalationConfig - -The configuration for when the severity of the failing health check should be escalated to CRITICAL – after a given number of failures, possibly within a time interval. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**failures_to_critical** | int | Yes | | -**time_interval_in_seconds** | Optional[Long] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/JobDurationCheckConfig.md b/docs/v2/DataHealth/models/JobDurationCheckConfig.md deleted file mode 100644 index 91ae1e81c..000000000 --- a/docs/v2/DataHealth/models/JobDurationCheckConfig.md +++ /dev/null @@ -1,13 +0,0 @@ -# JobDurationCheckConfig - -Checks the total time a job takes to complete. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**subject** | DatasetSubject | Yes | | -**time_check_config** | TimeCheckConfig | Yes | | -**type** | Literal["jobDuration"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/JobStatusCheckConfig.md b/docs/v2/DataHealth/models/JobStatusCheckConfig.md deleted file mode 100644 index 44c4f271f..000000000 --- a/docs/v2/DataHealth/models/JobStatusCheckConfig.md +++ /dev/null @@ -1,13 +0,0 @@ -# JobStatusCheckConfig - -Checks the status of the most recent job run on the dataset. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**subject** | DatasetSubject | Yes | | -**status_check_config** | StatusCheckConfig | Yes | | -**type** | Literal["jobStatus"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/MedianDeviation.md b/docs/v2/DataHealth/models/MedianDeviation.md deleted file mode 100644 index 56f62444e..000000000 --- a/docs/v2/DataHealth/models/MedianDeviation.md +++ /dev/null @@ -1,13 +0,0 @@ -# MedianDeviation - -The number of thresholds the build's duration differs from the median. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**bounds_type** | Optional[MedianDeviationBoundsType] | No | | -**data_points** | int | Yes | | -**deviation_threshold** | float | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/MedianDeviationBoundsType.md b/docs/v2/DataHealth/models/MedianDeviationBoundsType.md deleted file mode 100644 index 7e8e88c52..000000000 --- a/docs/v2/DataHealth/models/MedianDeviationBoundsType.md +++ /dev/null @@ -1,12 +0,0 @@ -# MedianDeviationBoundsType - -The three types of median deviations a bounds type can have: - LOWER_BOUND – Tests for significant deviations below the median value, - UPPER_BOUND – Tests for significant deviations above the median value, - TWO_TAILED – Tests for significant deviations in either direction from the median value. - -| **Value** | -| --------- | -| `"LOWER_BOUND"` | -| `"UPPER_BOUND"` | -| `"TWO_TAILED"` | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/MedianDeviationConfig.md b/docs/v2/DataHealth/models/MedianDeviationConfig.md deleted file mode 100644 index efb2ad6c2..000000000 --- a/docs/v2/DataHealth/models/MedianDeviationConfig.md +++ /dev/null @@ -1,12 +0,0 @@ -# MedianDeviationConfig - -Configuration for median deviation check with severity settings. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**median_deviation** | MedianDeviation | Yes | | -**severity** | SeverityLevel | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/NullPercentageCheckConfig.md b/docs/v2/DataHealth/models/NullPercentageCheckConfig.md deleted file mode 100644 index 610d1c651..000000000 --- a/docs/v2/DataHealth/models/NullPercentageCheckConfig.md +++ /dev/null @@ -1,13 +0,0 @@ -# NullPercentageCheckConfig - -Checks the percentage of null values in a specific column. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**subject** | DatasetSubject | Yes | | -**percentage_check_config** | PercentageCheckConfig | Yes | | -**type** | Literal["nullPercentage"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/NumericBounds.md b/docs/v2/DataHealth/models/NumericBounds.md deleted file mode 100644 index 3e55e447b..000000000 --- a/docs/v2/DataHealth/models/NumericBounds.md +++ /dev/null @@ -1,12 +0,0 @@ -# NumericBounds - -The range of numeric values a check is expected to be within. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**lower_bound** | Optional[float] | No | | -**upper_bound** | Optional[float] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/NumericBoundsConfig.md b/docs/v2/DataHealth/models/NumericBoundsConfig.md deleted file mode 100644 index baa0b7056..000000000 --- a/docs/v2/DataHealth/models/NumericBoundsConfig.md +++ /dev/null @@ -1,12 +0,0 @@ -# NumericBoundsConfig - -Configuration for numeric bounds check with severity settings. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**numeric_bounds** | NumericBounds | Yes | | -**severity** | SeverityLevel | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/NumericColumnCheckConfig.md b/docs/v2/DataHealth/models/NumericColumnCheckConfig.md deleted file mode 100644 index b839e6792..000000000 --- a/docs/v2/DataHealth/models/NumericColumnCheckConfig.md +++ /dev/null @@ -1,13 +0,0 @@ -# NumericColumnCheckConfig - -Configuration for numeric column-based checks (such as mean or median). At least one of numericBounds or trend must be specified. Both may be provided to validate both the absolute value range and the trend behavior over time. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**column_name** | ColumnName | Yes | | -**numeric_bounds** | Optional[NumericBoundsConfig] | No | | -**trend** | Optional[TrendConfig] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/NumericColumnMeanCheckConfig.md b/docs/v2/DataHealth/models/NumericColumnMeanCheckConfig.md deleted file mode 100644 index 863c2da09..000000000 --- a/docs/v2/DataHealth/models/NumericColumnMeanCheckConfig.md +++ /dev/null @@ -1,13 +0,0 @@ -# NumericColumnMeanCheckConfig - -Checks the mean value of a numeric column. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**subject** | DatasetSubject | Yes | | -**numeric_column_check_config** | NumericColumnCheckConfig | Yes | | -**type** | Literal["numericColumnMean"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/NumericColumnMedianCheckConfig.md b/docs/v2/DataHealth/models/NumericColumnMedianCheckConfig.md deleted file mode 100644 index 6dfbd8315..000000000 --- a/docs/v2/DataHealth/models/NumericColumnMedianCheckConfig.md +++ /dev/null @@ -1,13 +0,0 @@ -# NumericColumnMedianCheckConfig - -Checks the median value of a numeric column. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**subject** | DatasetSubject | Yes | | -**numeric_column_check_config** | NumericColumnCheckConfig | Yes | | -**type** | Literal["numericColumnMedian"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/NumericColumnRangeCheckConfig.md b/docs/v2/DataHealth/models/NumericColumnRangeCheckConfig.md deleted file mode 100644 index 5dfc837d3..000000000 --- a/docs/v2/DataHealth/models/NumericColumnRangeCheckConfig.md +++ /dev/null @@ -1,14 +0,0 @@ -# NumericColumnRangeCheckConfig - -Checks that values in a numeric column fall within a specified range. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**subject** | DatasetSubject | Yes | | -**column_name** | ColumnName | Yes | | -**numeric_bounds_config** | NumericBoundsConfig | Yes | | -**type** | Literal["numericColumnRange"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/NumericColumnValue.md b/docs/v2/DataHealth/models/NumericColumnValue.md deleted file mode 100644 index 8251c9f78..000000000 --- a/docs/v2/DataHealth/models/NumericColumnValue.md +++ /dev/null @@ -1,12 +0,0 @@ -# NumericColumnValue - -A numeric column value. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**value** | float | Yes | | -**type** | Literal["numeric"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/PercentageBounds.md b/docs/v2/DataHealth/models/PercentageBounds.md deleted file mode 100644 index 89b90277b..000000000 --- a/docs/v2/DataHealth/models/PercentageBounds.md +++ /dev/null @@ -1,12 +0,0 @@ -# PercentageBounds - -The configuration for the range of percentage values between which the health check is expected to succeed. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**lower_bound_percentage** | Optional[PercentageValue] | No | | -**upper_bound_percentage** | Optional[PercentageValue] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/PercentageBoundsConfig.md b/docs/v2/DataHealth/models/PercentageBoundsConfig.md deleted file mode 100644 index 6742ecc0b..000000000 --- a/docs/v2/DataHealth/models/PercentageBoundsConfig.md +++ /dev/null @@ -1,12 +0,0 @@ -# PercentageBoundsConfig - -Configuration for percentage bounds check with severity settings. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**percentage_bounds** | PercentageBounds | Yes | | -**severity** | SeverityLevel | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/PercentageCheckConfig.md b/docs/v2/DataHealth/models/PercentageCheckConfig.md deleted file mode 100644 index 6a9e9f2be..000000000 --- a/docs/v2/DataHealth/models/PercentageCheckConfig.md +++ /dev/null @@ -1,13 +0,0 @@ -# PercentageCheckConfig - -Configuration for percentage-based checks (such as null percentage). - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**column_name** | ColumnName | Yes | | -**percentage_bounds** | Optional[PercentageBoundsConfig] | No | | -**median_deviation** | Optional[MedianDeviationConfig] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/PercentageValue.md b/docs/v2/DataHealth/models/PercentageValue.md deleted file mode 100644 index aef2e8faf..000000000 --- a/docs/v2/DataHealth/models/PercentageValue.md +++ /dev/null @@ -1,15 +0,0 @@ -# PercentageValue - -A percentage value in the range 0.0 to 100.0. - -Validation rules: - * must be greater than or equal to 0.0 - * must be less than or equal to 100.0 - -## Type -```python -float -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/PrimaryKeyCheckConfig.md b/docs/v2/DataHealth/models/PrimaryKeyCheckConfig.md deleted file mode 100644 index 0d9107b25..000000000 --- a/docs/v2/DataHealth/models/PrimaryKeyCheckConfig.md +++ /dev/null @@ -1,13 +0,0 @@ -# PrimaryKeyCheckConfig - -Checks the uniqueness and non-null values of one or more columns (primary key constraint). - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**subject** | DatasetSubject | Yes | | -**primary_key_config** | PrimaryKeyConfig | Yes | | -**type** | Literal["primaryKey"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/PrimaryKeyConfig.md b/docs/v2/DataHealth/models/PrimaryKeyConfig.md deleted file mode 100644 index 29b2b20e5..000000000 --- a/docs/v2/DataHealth/models/PrimaryKeyConfig.md +++ /dev/null @@ -1,12 +0,0 @@ -# PrimaryKeyConfig - -Configuration for primary key validation with severity settings. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**column_names** | List[ColumnName] | Yes | | -**severity** | SeverityLevel | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/ReplaceAllowedColumnValuesCheckConfig.md b/docs/v2/DataHealth/models/ReplaceAllowedColumnValuesCheckConfig.md deleted file mode 100644 index 6a4aabf79..000000000 --- a/docs/v2/DataHealth/models/ReplaceAllowedColumnValuesCheckConfig.md +++ /dev/null @@ -1,14 +0,0 @@ -# ReplaceAllowedColumnValuesCheckConfig - -ReplaceAllowedColumnValuesCheckConfig - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**allowed_values** | List[ColumnValue] | Yes | | -**severity** | SeverityLevel | Yes | | -**allow_null** | Optional[bool] | No | | -**type** | Literal["allowedColumnValues"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/ReplaceApproximateUniquePercentageCheckConfig.md b/docs/v2/DataHealth/models/ReplaceApproximateUniquePercentageCheckConfig.md deleted file mode 100644 index 8ad887f2c..000000000 --- a/docs/v2/DataHealth/models/ReplaceApproximateUniquePercentageCheckConfig.md +++ /dev/null @@ -1,12 +0,0 @@ -# ReplaceApproximateUniquePercentageCheckConfig - -ReplaceApproximateUniquePercentageCheckConfig - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**percentage_check_config** | ReplacePercentageCheckConfig | Yes | | -**type** | Literal["approximateUniquePercentage"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/ReplaceBuildDurationCheckConfig.md b/docs/v2/DataHealth/models/ReplaceBuildDurationCheckConfig.md deleted file mode 100644 index 3e805faf9..000000000 --- a/docs/v2/DataHealth/models/ReplaceBuildDurationCheckConfig.md +++ /dev/null @@ -1,12 +0,0 @@ -# ReplaceBuildDurationCheckConfig - -ReplaceBuildDurationCheckConfig - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**time_check_config** | TimeCheckConfig | Yes | | -**type** | Literal["buildDuration"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/ReplaceBuildStatusCheckConfig.md b/docs/v2/DataHealth/models/ReplaceBuildStatusCheckConfig.md deleted file mode 100644 index 8c8537356..000000000 --- a/docs/v2/DataHealth/models/ReplaceBuildStatusCheckConfig.md +++ /dev/null @@ -1,12 +0,0 @@ -# ReplaceBuildStatusCheckConfig - -ReplaceBuildStatusCheckConfig - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**status_check_config** | StatusCheckConfig | Yes | | -**type** | Literal["buildStatus"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/ReplaceCheckConfig.md b/docs/v2/DataHealth/models/ReplaceCheckConfig.md deleted file mode 100644 index 0538eca1b..000000000 --- a/docs/v2/DataHealth/models/ReplaceCheckConfig.md +++ /dev/null @@ -1,30 +0,0 @@ -# ReplaceCheckConfig - -Configuration of a check. - - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -ReplaceNumericColumnRangeCheckConfig | numericColumnRange -ReplaceJobStatusCheckConfig | jobStatus -ReplaceNumericColumnMeanCheckConfig | numericColumnMean -ReplaceDateColumnRangeCheckConfig | dateColumnRange -ReplaceJobDurationCheckConfig | jobDuration -ReplaceApproximateUniquePercentageCheckConfig | approximateUniquePercentage -ReplaceBuildStatusCheckConfig | buildStatus -ReplaceColumnTypeCheckConfig | columnType -ReplaceAllowedColumnValuesCheckConfig | allowedColumnValues -ReplaceNullPercentageCheckConfig | nullPercentage -ReplaceTotalColumnCountCheckConfig | totalColumnCount -ReplaceNumericColumnMedianCheckConfig | numericColumnMedian -ReplaceBuildDurationCheckConfig | buildDuration -ReplaceSchemaComparisonCheckConfig | schemaComparison -ReplacePrimaryKeyCheckConfig | primaryKey - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/ReplaceCheckRequest.md b/docs/v2/DataHealth/models/ReplaceCheckRequest.md deleted file mode 100644 index b97b4dfcb..000000000 --- a/docs/v2/DataHealth/models/ReplaceCheckRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# ReplaceCheckRequest - -ReplaceCheckRequest - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**config** | ReplaceCheckConfig | Yes | | -**intent** | Optional[CheckIntent] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/ReplaceColumnTypeCheckConfig.md b/docs/v2/DataHealth/models/ReplaceColumnTypeCheckConfig.md deleted file mode 100644 index 82c40c54b..000000000 --- a/docs/v2/DataHealth/models/ReplaceColumnTypeCheckConfig.md +++ /dev/null @@ -1,12 +0,0 @@ -# ReplaceColumnTypeCheckConfig - -ReplaceColumnTypeCheckConfig - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**column_type_config** | ReplaceColumnTypeConfig | Yes | | -**type** | Literal["columnType"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/ReplaceColumnTypeConfig.md b/docs/v2/DataHealth/models/ReplaceColumnTypeConfig.md deleted file mode 100644 index a0a44b78e..000000000 --- a/docs/v2/DataHealth/models/ReplaceColumnTypeConfig.md +++ /dev/null @@ -1,12 +0,0 @@ -# ReplaceColumnTypeConfig - -ReplaceColumnTypeConfig - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**severity** | SeverityLevel | Yes | | -**expected_type** | Optional[SchemaFieldType] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/ReplaceDateColumnRangeCheckConfig.md b/docs/v2/DataHealth/models/ReplaceDateColumnRangeCheckConfig.md deleted file mode 100644 index b8cc31fb7..000000000 --- a/docs/v2/DataHealth/models/ReplaceDateColumnRangeCheckConfig.md +++ /dev/null @@ -1,12 +0,0 @@ -# ReplaceDateColumnRangeCheckConfig - -ReplaceDateColumnRangeCheckConfig - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**date_bounds_config** | DateBoundsConfig | Yes | | -**type** | Literal["dateColumnRange"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/ReplaceJobDurationCheckConfig.md b/docs/v2/DataHealth/models/ReplaceJobDurationCheckConfig.md deleted file mode 100644 index 5d44c03a5..000000000 --- a/docs/v2/DataHealth/models/ReplaceJobDurationCheckConfig.md +++ /dev/null @@ -1,12 +0,0 @@ -# ReplaceJobDurationCheckConfig - -ReplaceJobDurationCheckConfig - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**time_check_config** | TimeCheckConfig | Yes | | -**type** | Literal["jobDuration"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/ReplaceJobStatusCheckConfig.md b/docs/v2/DataHealth/models/ReplaceJobStatusCheckConfig.md deleted file mode 100644 index 1ac4c1343..000000000 --- a/docs/v2/DataHealth/models/ReplaceJobStatusCheckConfig.md +++ /dev/null @@ -1,12 +0,0 @@ -# ReplaceJobStatusCheckConfig - -ReplaceJobStatusCheckConfig - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**status_check_config** | StatusCheckConfig | Yes | | -**type** | Literal["jobStatus"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/ReplaceNullPercentageCheckConfig.md b/docs/v2/DataHealth/models/ReplaceNullPercentageCheckConfig.md deleted file mode 100644 index f9b9d803b..000000000 --- a/docs/v2/DataHealth/models/ReplaceNullPercentageCheckConfig.md +++ /dev/null @@ -1,12 +0,0 @@ -# ReplaceNullPercentageCheckConfig - -ReplaceNullPercentageCheckConfig - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**percentage_check_config** | ReplacePercentageCheckConfig | Yes | | -**type** | Literal["nullPercentage"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/ReplaceNumericColumnCheckConfig.md b/docs/v2/DataHealth/models/ReplaceNumericColumnCheckConfig.md deleted file mode 100644 index d1f4a7fbe..000000000 --- a/docs/v2/DataHealth/models/ReplaceNumericColumnCheckConfig.md +++ /dev/null @@ -1,12 +0,0 @@ -# ReplaceNumericColumnCheckConfig - -ReplaceNumericColumnCheckConfig - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**numeric_bounds** | Optional[NumericBoundsConfig] | No | | -**trend** | Optional[TrendConfig] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/ReplaceNumericColumnMeanCheckConfig.md b/docs/v2/DataHealth/models/ReplaceNumericColumnMeanCheckConfig.md deleted file mode 100644 index eaac999a8..000000000 --- a/docs/v2/DataHealth/models/ReplaceNumericColumnMeanCheckConfig.md +++ /dev/null @@ -1,12 +0,0 @@ -# ReplaceNumericColumnMeanCheckConfig - -ReplaceNumericColumnMeanCheckConfig - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**numeric_column_check_config** | ReplaceNumericColumnCheckConfig | Yes | | -**type** | Literal["numericColumnMean"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/ReplaceNumericColumnMedianCheckConfig.md b/docs/v2/DataHealth/models/ReplaceNumericColumnMedianCheckConfig.md deleted file mode 100644 index c6900f432..000000000 --- a/docs/v2/DataHealth/models/ReplaceNumericColumnMedianCheckConfig.md +++ /dev/null @@ -1,12 +0,0 @@ -# ReplaceNumericColumnMedianCheckConfig - -ReplaceNumericColumnMedianCheckConfig - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**numeric_column_check_config** | ReplaceNumericColumnCheckConfig | Yes | | -**type** | Literal["numericColumnMedian"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/ReplaceNumericColumnRangeCheckConfig.md b/docs/v2/DataHealth/models/ReplaceNumericColumnRangeCheckConfig.md deleted file mode 100644 index 060dc97c9..000000000 --- a/docs/v2/DataHealth/models/ReplaceNumericColumnRangeCheckConfig.md +++ /dev/null @@ -1,12 +0,0 @@ -# ReplaceNumericColumnRangeCheckConfig - -ReplaceNumericColumnRangeCheckConfig - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**numeric_bounds_config** | NumericBoundsConfig | Yes | | -**type** | Literal["numericColumnRange"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/ReplacePercentageCheckConfig.md b/docs/v2/DataHealth/models/ReplacePercentageCheckConfig.md deleted file mode 100644 index 0a11a89c8..000000000 --- a/docs/v2/DataHealth/models/ReplacePercentageCheckConfig.md +++ /dev/null @@ -1,12 +0,0 @@ -# ReplacePercentageCheckConfig - -ReplacePercentageCheckConfig - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**median_deviation** | Optional[MedianDeviationConfig] | No | | -**percentage_bounds** | Optional[PercentageBoundsConfig] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/ReplacePrimaryKeyCheckConfig.md b/docs/v2/DataHealth/models/ReplacePrimaryKeyCheckConfig.md deleted file mode 100644 index 056f3918a..000000000 --- a/docs/v2/DataHealth/models/ReplacePrimaryKeyCheckConfig.md +++ /dev/null @@ -1,12 +0,0 @@ -# ReplacePrimaryKeyCheckConfig - -ReplacePrimaryKeyCheckConfig - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**primary_key_config** | ReplacePrimaryKeyConfig | Yes | | -**type** | Literal["primaryKey"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/ReplacePrimaryKeyConfig.md b/docs/v2/DataHealth/models/ReplacePrimaryKeyConfig.md deleted file mode 100644 index f1e986efe..000000000 --- a/docs/v2/DataHealth/models/ReplacePrimaryKeyConfig.md +++ /dev/null @@ -1,11 +0,0 @@ -# ReplacePrimaryKeyConfig - -ReplacePrimaryKeyConfig - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**severity** | SeverityLevel | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/ReplaceSchemaComparisonCheckConfig.md b/docs/v2/DataHealth/models/ReplaceSchemaComparisonCheckConfig.md deleted file mode 100644 index 6abbaa23a..000000000 --- a/docs/v2/DataHealth/models/ReplaceSchemaComparisonCheckConfig.md +++ /dev/null @@ -1,12 +0,0 @@ -# ReplaceSchemaComparisonCheckConfig - -ReplaceSchemaComparisonCheckConfig - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**schema_comparison_config** | SchemaComparisonConfig | Yes | | -**type** | Literal["schemaComparison"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/ReplaceTotalColumnCountCheckConfig.md b/docs/v2/DataHealth/models/ReplaceTotalColumnCountCheckConfig.md deleted file mode 100644 index 8d3894220..000000000 --- a/docs/v2/DataHealth/models/ReplaceTotalColumnCountCheckConfig.md +++ /dev/null @@ -1,12 +0,0 @@ -# ReplaceTotalColumnCountCheckConfig - -ReplaceTotalColumnCountCheckConfig - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**column_count_config** | ColumnCountConfig | Yes | | -**type** | Literal["totalColumnCount"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/SchemaComparisonCheckConfig.md b/docs/v2/DataHealth/models/SchemaComparisonCheckConfig.md deleted file mode 100644 index 7a3a649f4..000000000 --- a/docs/v2/DataHealth/models/SchemaComparisonCheckConfig.md +++ /dev/null @@ -1,13 +0,0 @@ -# SchemaComparisonCheckConfig - -Checks the dataset schema against an expected schema. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**subject** | DatasetSubject | Yes | | -**schema_comparison_config** | SchemaComparisonConfig | Yes | | -**type** | Literal["schemaComparison"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/SchemaComparisonConfig.md b/docs/v2/DataHealth/models/SchemaComparisonConfig.md deleted file mode 100644 index c0da8e056..000000000 --- a/docs/v2/DataHealth/models/SchemaComparisonConfig.md +++ /dev/null @@ -1,13 +0,0 @@ -# SchemaComparisonConfig - -Configuration for schema comparison validation with severity settings. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**expected_schema** | SchemaInfo | Yes | | -**schema_comparison_type** | SchemaComparisonType | Yes | | -**severity** | SeverityLevel | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/SchemaComparisonType.md b/docs/v2/DataHealth/models/SchemaComparisonType.md deleted file mode 100644 index a16eae4f2..000000000 --- a/docs/v2/DataHealth/models/SchemaComparisonType.md +++ /dev/null @@ -1,19 +0,0 @@ -# SchemaComparisonType - -The type of schema comparison to perform: -- EXACT_MATCH_ORDERED_COLUMNS: Schemas must have identical columns in the same order. -- EXACT_MATCH_UNORDERED_COLUMNS: Schemas must have identical columns but order doesn't matter. -- COLUMN_ADDITIONS_ALLOWED: Expected schema columns must be present, additional columns are allowed and - missing column types are ignored. -- COLUMN_ADDITIONS_ALLOWED_STRICT: Expected schema columns must be present, additional columns are allowed. - Both expected and actual columns must specify types and they must match exactly. - -| **Value** | -| --------- | -| `"EXACT_MATCH_ORDERED_COLUMNS"` | -| `"EXACT_MATCH_UNORDERED_COLUMNS"` | -| `"COLUMN_ADDITIONS_ALLOWED"` | -| `"COLUMN_ADDITIONS_ALLOWED_STRICT"` | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/SchemaInfo.md b/docs/v2/DataHealth/models/SchemaInfo.md deleted file mode 100644 index 2fd6f7381..000000000 --- a/docs/v2/DataHealth/models/SchemaInfo.md +++ /dev/null @@ -1,11 +0,0 @@ -# SchemaInfo - -Information about a dataset schema including all columns. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**columns** | List[ColumnInfo] | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/SeverityLevel.md b/docs/v2/DataHealth/models/SeverityLevel.md deleted file mode 100644 index 19f6f6e2c..000000000 --- a/docs/v2/DataHealth/models/SeverityLevel.md +++ /dev/null @@ -1,11 +0,0 @@ -# SeverityLevel - -The severity level of the check. Possible values are MODERATE or CRITICAL. - -| **Value** | -| --------- | -| `"MODERATE"` | -| `"CRITICAL"` | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/StatusCheckConfig.md b/docs/v2/DataHealth/models/StatusCheckConfig.md deleted file mode 100644 index 735916505..000000000 --- a/docs/v2/DataHealth/models/StatusCheckConfig.md +++ /dev/null @@ -1,12 +0,0 @@ -# StatusCheckConfig - -StatusCheckConfig - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**severity** | SeverityLevel | Yes | | -**escalation_config** | Optional[EscalationConfig] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/StringColumnValue.md b/docs/v2/DataHealth/models/StringColumnValue.md deleted file mode 100644 index ff0099be4..000000000 --- a/docs/v2/DataHealth/models/StringColumnValue.md +++ /dev/null @@ -1,12 +0,0 @@ -# StringColumnValue - -A string column value. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**value** | str | Yes | | -**type** | Literal["string"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/TimeBounds.md b/docs/v2/DataHealth/models/TimeBounds.md deleted file mode 100644 index b499a5f6d..000000000 --- a/docs/v2/DataHealth/models/TimeBounds.md +++ /dev/null @@ -1,12 +0,0 @@ -# TimeBounds - -The configuration for the range of time between which the health check is expected to succeed. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**lower_bound_in_seconds** | Optional[Long] | No | | -**upper_bound_in_seconds** | Optional[Long] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/TimeBoundsConfig.md b/docs/v2/DataHealth/models/TimeBoundsConfig.md deleted file mode 100644 index 25a8a4882..000000000 --- a/docs/v2/DataHealth/models/TimeBoundsConfig.md +++ /dev/null @@ -1,12 +0,0 @@ -# TimeBoundsConfig - -Configuration for time bounds check with severity settings. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**time_bounds** | TimeBounds | Yes | | -**severity** | SeverityLevel | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/TimeCheckConfig.md b/docs/v2/DataHealth/models/TimeCheckConfig.md deleted file mode 100644 index 17f8c096a..000000000 --- a/docs/v2/DataHealth/models/TimeCheckConfig.md +++ /dev/null @@ -1,12 +0,0 @@ -# TimeCheckConfig - -TimeCheckConfig - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**time_bounds** | Optional[TimeBoundsConfig] | No | | -**median_deviation** | Optional[MedianDeviationConfig] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/TotalColumnCountCheckConfig.md b/docs/v2/DataHealth/models/TotalColumnCountCheckConfig.md deleted file mode 100644 index 92c358b66..000000000 --- a/docs/v2/DataHealth/models/TotalColumnCountCheckConfig.md +++ /dev/null @@ -1,13 +0,0 @@ -# TotalColumnCountCheckConfig - -Checks the total number of columns in the dataset. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**subject** | DatasetSubject | Yes | | -**column_count_config** | ColumnCountConfig | Yes | | -**type** | Literal["totalColumnCount"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/TrendConfig.md b/docs/v2/DataHealth/models/TrendConfig.md deleted file mode 100644 index 0c9bc6f0e..000000000 --- a/docs/v2/DataHealth/models/TrendConfig.md +++ /dev/null @@ -1,13 +0,0 @@ -# TrendConfig - -Configuration for trend-based validation with severity settings. At least one of trendType or differenceBounds must be specified. Both may be provided to validate both the trend pattern and the magnitude of change. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**trend_type** | Optional[TrendType] | No | | -**difference_bounds** | Optional[NumericBounds] | No | | -**severity** | SeverityLevel | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/TrendType.md b/docs/v2/DataHealth/models/TrendType.md deleted file mode 100644 index b085064b9..000000000 --- a/docs/v2/DataHealth/models/TrendType.md +++ /dev/null @@ -1,19 +0,0 @@ -# TrendType - -The type of trend to validate: -- NON_INCREASING: Values should not increase over time -- NON_DECREASING: Values should not decrease over time -- STRICTLY_INCREASING: Values should strictly increase over time -- STRICTLY_DECREASING: Values should strictly decrease over time -- CONSTANT: Values should remain constant over time - -| **Value** | -| --------- | -| `"NON_INCREASING"` | -| `"NON_DECREASING"` | -| `"STRICTLY_INCREASING"` | -| `"STRICTLY_DECREASING"` | -| `"CONSTANT"` | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/Branch.md b/docs/v2/Datasets/Branch.md deleted file mode 100644 index 5c15801d6..000000000 --- a/docs/v2/Datasets/Branch.md +++ /dev/null @@ -1,284 +0,0 @@ -# Branch - -Method | HTTP request | Release Stage | -------------- | ------------- | ----- | -[**create**](#create) | **POST** /v2/datasets/{datasetRid}/branches | Stable | -[**delete**](#delete) | **DELETE** /v2/datasets/{datasetRid}/branches/{branchName} | Stable | -[**get**](#get) | **GET** /v2/datasets/{datasetRid}/branches/{branchName} | Stable | -[**list**](#list) | **GET** /v2/datasets/{datasetRid}/branches | Stable | -[**transactions**](#transactions) | **GET** /v2/datasets/{datasetRid}/branches/{branchName}/transactions | Public Beta | - -# **create** -Creates a branch on an existing dataset. A branch may optionally point to a (committed) transaction. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**dataset_rid** | DatasetRid | | | -**name** | BranchName | | | -**transaction_rid** | Optional[TransactionRid] | The most recent OPEN or COMMITTED transaction on the branch. This will never be an ABORTED transaction. | [optional] | - -### Return type -**Branch** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# DatasetRid -dataset_rid = None -# BranchName -name = "master" -# Optional[TransactionRid] | The most recent OPEN or COMMITTED transaction on the branch. This will never be an ABORTED transaction. -transaction_rid = "ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4" - - -try: - api_response = client.datasets.Dataset.Branch.create( - dataset_rid, name=name, transaction_rid=transaction_rid - ) - print("The create response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Branch.create: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | Branch | The created Branch | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **delete** -Deletes the Branch with the given BranchName. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**dataset_rid** | DatasetRid | | | -**branch_name** | BranchName | | | - -### Return type -**None** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# DatasetRid -dataset_rid = None -# BranchName -branch_name = None - - -try: - api_response = client.datasets.Dataset.Branch.delete(dataset_rid, branch_name) - print("The delete response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Branch.delete: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**204** | None | | None | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **get** -Get a Branch of a Dataset. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**dataset_rid** | DatasetRid | | | -**branch_name** | BranchName | | | - -### Return type -**Branch** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# DatasetRid -dataset_rid = None -# BranchName -branch_name = None - - -try: - api_response = client.datasets.Dataset.Branch.get(dataset_rid, branch_name) - print("The get response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Branch.get: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | Branch | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **list** -Lists the Branches of a Dataset. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**dataset_rid** | DatasetRid | | | -**page_size** | Optional[PageSize] | The page size to use for the endpoint. | [optional] | -**page_token** | Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. | [optional] | - -### Return type -**ListBranchesResponse** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# DatasetRid -dataset_rid = None -# Optional[PageSize] | The page size to use for the endpoint. -page_size = None -# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. -page_token = None - - -try: - for branch in client.datasets.Dataset.Branch.list( - dataset_rid, page_size=page_size, page_token=page_token - ): - pprint(branch) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Branch.list: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | ListBranchesResponse | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **transactions** -Get the Transaction history for the given Dataset. When requesting all transactions, the endpoint returns them in reverse chronological order. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**dataset_rid** | DatasetRid | | | -**branch_name** | BranchName | | | -**page_size** | Optional[PageSize] | The default pageSize is 20 transactions and the maximum allowed pageSize is 50 transactions | [optional] | -**page_token** | Optional[PageToken] | | [optional] | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**ListTransactionsResponse** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# DatasetRid -dataset_rid = None -# BranchName -branch_name = None -# Optional[PageSize] | The default pageSize is 20 transactions and the maximum allowed pageSize is 50 transactions -page_size = None -# Optional[PageToken] -page_token = None -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - for branch in client.datasets.Dataset.Branch.transactions( - dataset_rid, branch_name, page_size=page_size, page_token=page_token, preview=preview - ): - pprint(branch) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Branch.transactions: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | ListTransactionsResponse | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - diff --git a/docs/v2/Datasets/Dataset.md b/docs/v2/Datasets/Dataset.md deleted file mode 100644 index e85e9ef9b..000000000 --- a/docs/v2/Datasets/Dataset.md +++ /dev/null @@ -1,691 +0,0 @@ -# Dataset - -Method | HTTP request | Release Stage | -------------- | ------------- | ----- | -[**create**](#create) | **POST** /v2/datasets | Stable | -[**get**](#get) | **GET** /v2/datasets/{datasetRid} | Stable | -[**get_health_checks**](#get_health_checks) | **GET** /v2/datasets/{datasetRid}/getHealthChecks | Public Beta | -[**get_schedules**](#get_schedules) | **GET** /v2/datasets/{datasetRid}/getSchedules | Public Beta | -[**get_schema**](#get_schema) | **GET** /v2/datasets/{datasetRid}/getSchema | Public Beta | -[**get_schema_batch**](#get_schema_batch) | **POST** /v2/datasets/getSchemaBatch | Public Beta | -[**jobs**](#jobs) | **POST** /v2/datasets/{datasetRid}/jobs | Public Beta | -[**put_schema**](#put_schema) | **PUT** /v2/datasets/{datasetRid}/putSchema | Public Beta | -[**read_table**](#read_table) | **GET** /v2/datasets/{datasetRid}/readTable | Stable | -[**transactions**](#transactions) | **GET** /v2/datasets/{datasetRid}/transactions | Public Beta | - -# **create** -Creates a new Dataset. A default branch - `master` for most enrollments - will be created on the Dataset. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**name** | DatasetName | | | -**parent_folder_rid** | FolderRid | | | - -### Return type -**Dataset** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# DatasetName -name = "My Dataset" -# FolderRid -parent_folder_rid = "ri.compass.main.folder.c410f510-2937-420e-8ea3-8c9bcb3c1791" - - -try: - api_response = client.datasets.Dataset.create(name=name, parent_folder_rid=parent_folder_rid) - print("The create response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Dataset.create: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | Dataset | The created Dataset | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **get** -Get the Dataset with the specified rid. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**dataset_rid** | DatasetRid | | | - -### Return type -**Dataset** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# DatasetRid -dataset_rid = None - - -try: - api_response = client.datasets.Dataset.get(dataset_rid) - print("The get response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Dataset.get: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | Dataset | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **get_health_checks** -Get the RIDs of the Data Health Checks that are configured for the given Dataset. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**dataset_rid** | DatasetRid | | | -**branch_name** | Optional[BranchName] | The name of the Branch. If none is provided, the default Branch name - `master` for most enrollments - will be used. | [optional] | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**ListHealthChecksResponse** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# DatasetRid -dataset_rid = None -# Optional[BranchName] | The name of the Branch. If none is provided, the default Branch name - `master` for most enrollments - will be used. -branch_name = None -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.datasets.Dataset.get_health_checks( - dataset_rid, branch_name=branch_name, preview=preview - ) - print("The get_health_checks response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Dataset.get_health_checks: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | ListHealthChecksResponse | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **get_schedules** -Get the RIDs of the Schedules that target the given Dataset - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**dataset_rid** | DatasetRid | | | -**branch_name** | Optional[BranchName] | The name of the Branch. If none is provided, the default Branch name - `master` for most enrollments - will be used. | [optional] | -**page_size** | Optional[PageSize] | | [optional] | -**page_token** | Optional[PageToken] | | [optional] | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**ListSchedulesResponse** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# DatasetRid -dataset_rid = None -# Optional[BranchName] | The name of the Branch. If none is provided, the default Branch name - `master` for most enrollments - will be used. -branch_name = None -# Optional[PageSize] -page_size = None -# Optional[PageToken] -page_token = None -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - for dataset in client.datasets.Dataset.get_schedules( - dataset_rid, - branch_name=branch_name, - page_size=page_size, - page_token=page_token, - preview=preview, - ): - pprint(dataset) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Dataset.get_schedules: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | ListSchedulesResponse | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **get_schema** -Gets a dataset's schema. If no `endTransactionRid` is provided, the latest committed version will be used. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**dataset_rid** | DatasetRid | | | -**branch_name** | Optional[BranchName] | | [optional] | -**end_transaction_rid** | Optional[TransactionRid] | The Resource Identifier (RID) of the end Transaction. If a user does not provide a value, the RID of the latest committed transaction will be used. | [optional] | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | -**version_id** | Optional[VersionId] | The schema version that should be used. If none is provided, the latest version will be used. | [optional] | - -### Return type -**GetDatasetSchemaResponse** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# DatasetRid -dataset_rid = None -# Optional[BranchName] -branch_name = None -# Optional[TransactionRid] | The Resource Identifier (RID) of the end Transaction. If a user does not provide a value, the RID of the latest committed transaction will be used. -end_transaction_rid = None -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None -# Optional[VersionId] | The schema version that should be used. If none is provided, the latest version will be used. -version_id = None - - -try: - api_response = client.datasets.Dataset.get_schema( - dataset_rid, - branch_name=branch_name, - end_transaction_rid=end_transaction_rid, - preview=preview, - version_id=version_id, - ) - print("The get_schema response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Dataset.get_schema: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | GetDatasetSchemaResponse | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **get_schema_batch** -Fetch schemas for multiple datasets in a single request. Datasets not found -or inaccessible to the user will be omitted from the response. - - -The maximum batch size for this endpoint is 1000. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**body** | List[GetSchemaDatasetsBatchRequestElement] | Body of the request | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**GetSchemaDatasetsBatchResponse** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# List[GetSchemaDatasetsBatchRequestElement] | Body of the request -body = [ - { - "endTransactionRid": "ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4", - "datasetRid": "ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da", - "versionId": "0000000d-2acf-537c-a228-3a9fe3cdc523", - "branchName": "master", - } -] -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.datasets.Dataset.get_schema_batch(body, preview=preview) - print("The get_schema_batch response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Dataset.get_schema_batch: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | GetSchemaDatasetsBatchResponse | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **jobs** -Get the RIDs of the Jobs for the given dataset. By default, returned Jobs are sorted in descending order by the Job start time. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**dataset_rid** | DatasetRid | | | -**order_by** | List[GetDatasetJobsSort] | | | -**branch_name** | Optional[BranchName] | The name of the Branch. If none is provided, the default Branch name - `master` for most enrollments - will be used. | [optional] | -**page_size** | Optional[PageSize] | Max number of results to return. A limit of 1000 on if no limit is supplied in the search request | [optional] | -**page_token** | Optional[PageToken] | | [optional] | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | -**where** | Optional[GetDatasetJobsQuery] | | [optional] | - -### Return type -**GetJobResponse** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# DatasetRid -dataset_rid = None -# List[GetDatasetJobsSort] -order_by = [{"sortType": "BY_STARTED_TIME", "sortDirection": "DESCENDING"}] -# Optional[BranchName] | The name of the Branch. If none is provided, the default Branch name - `master` for most enrollments - will be used. -branch_name = None -# Optional[PageSize] | Max number of results to return. A limit of 1000 on if no limit is supplied in the search request -page_size = None -# Optional[PageToken] -page_token = None -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None -# Optional[GetDatasetJobsQuery] -where = { - "type": "timeFilter", - "field": "SUBMITTED_TIME", - "comparisonType": "GTE", - "value": "2020-09-30T14:30:00Z", -} - - -try: - for dataset in client.datasets.Dataset.jobs( - dataset_rid, - order_by=order_by, - branch_name=branch_name, - page_size=page_size, - page_token=page_token, - preview=preview, - where=where, - ): - pprint(dataset) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Dataset.jobs: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | GetJobResponse | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **put_schema** -Adds a schema on an existing dataset using a PUT request. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**dataset_rid** | DatasetRid | | | -**schema** | DatasetSchema | The schema that will be added. | | -**branch_name** | Optional[BranchName] | | [optional] | -**dataframe_reader** | Optional[DataframeReader] | The dataframe reader used for reading the dataset schema. Defaults to PARQUET. | [optional] | -**end_transaction_rid** | Optional[TransactionRid] | The Resource Identifier (RID) of the end Transaction. | [optional] | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**GetDatasetSchemaResponse** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# DatasetRid -dataset_rid = None -# DatasetSchema | The schema that will be added. -schema = { - "fieldSchemaList": [ - { - "name": "id", - "type": "LONG", - "nullable": False, - "customMetadata": {"description": "Primary key"}, - }, - {"name": "event_time", "type": "TIMESTAMP", "nullable": False}, - {"name": "price", "type": "DECIMAL", "precision": 10, "scale": 2, "nullable": True}, - { - "name": "tags", - "type": "ARRAY", - "nullable": True, - "arraySubtype": {"type": "STRING", "nullable": False}, - }, - { - "name": "metrics", - "type": "STRUCT", - "nullable": True, - "subSchemas": [ - {"name": "temperature", "type": "DOUBLE", "nullable": True}, - {"name": "humidity", "type": "DOUBLE", "nullable": True}, - ], - }, - ] -} -# Optional[BranchName] -branch_name = "master" -# Optional[DataframeReader] | The dataframe reader used for reading the dataset schema. Defaults to PARQUET. -dataframe_reader = "PARQUET" -# Optional[TransactionRid] | The Resource Identifier (RID) of the end Transaction. -end_transaction_rid = "ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4" -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.datasets.Dataset.put_schema( - dataset_rid, - schema=schema, - branch_name=branch_name, - dataframe_reader=dataframe_reader, - end_transaction_rid=end_transaction_rid, - preview=preview, - ) - print("The put_schema response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Dataset.put_schema: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | GetDatasetSchemaResponse | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **read_table** -Gets the content of a dataset as a table in the specified format. - -This endpoint currently does not support views (virtual datasets composed of other datasets). - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**dataset_rid** | DatasetRid | | | -**format** | TableExportFormat | The export format. Must be `ARROW` or `CSV`. | | -**branch_name** | Optional[BranchName] | The name of the Branch. | [optional] | -**columns** | Optional[List[str]] | A subset of the dataset columns to include in the result. Defaults to all columns. | [optional] | -**end_transaction_rid** | Optional[TransactionRid] | The Resource Identifier (RID) of the end Transaction. | [optional] | -**row_limit** | Optional[int] | A limit on the number of rows to return. Note that row ordering is non-deterministic. | [optional] | -**start_transaction_rid** | Optional[TransactionRid] | The Resource Identifier (RID) of the start Transaction. | [optional] | - -### Return type -**bytes** - -> [!TIP] -> This operation returns tabular data that can be converted to data frame formats: -> -> ```python -> # Get data in Arrow format -> table_data = client.datasets.Dataset.read_table(dataset_rid, format=format, branch_name=branch_name, columns=columns, end_transaction_rid=end_transaction_rid, row_limit=row_limit, start_transaction_rid=start_transaction_rid) -> -> # Convert to a PyArrow Table -> arrow_table = table_data.to_pyarrow() -> -> # Convert to a Pandas DataFrame -> pandas_df = table_data.to_pandas() -> -> # Convert to a Polars DataFrame -> polars_df = table_data.to_polars() -> -> # Convert to a DuckDB relation -> duckdb_relation = table_data.to_duckdb() -> ``` -> -> For more details, see the [Data Frames section](../../../README.md#data-frames) in the README. - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# DatasetRid -dataset_rid = None -# TableExportFormat | The export format. Must be `ARROW` or `CSV`. -format = None -# Optional[BranchName] | The name of the Branch. -branch_name = None -# Optional[List[str]] | A subset of the dataset columns to include in the result. Defaults to all columns. -columns = ["id", "firstName", "lastName"] -# Optional[TransactionRid] | The Resource Identifier (RID) of the end Transaction. -end_transaction_rid = None -# Optional[int] | A limit on the number of rows to return. Note that row ordering is non-deterministic. -row_limit = None -# Optional[TransactionRid] | The Resource Identifier (RID) of the start Transaction. -start_transaction_rid = None - - -try: - api_response = client.datasets.Dataset.read_table( - dataset_rid, - format=format, - branch_name=branch_name, - columns=columns, - end_transaction_rid=end_transaction_rid, - row_limit=row_limit, - start_transaction_rid=start_transaction_rid, - ) - print("The read_table response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Dataset.read_table: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | bytes | | application/octet-stream | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **transactions** -Get the Transaction history for the given Dataset. When requesting all transactions, the endpoint returns them in reverse chronological order. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**dataset_rid** | DatasetRid | | | -**page_size** | Optional[PageSize] | The page size to use for the endpoint. | [optional] | -**page_token** | Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. | [optional] | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**ListTransactionsOfDatasetResponse** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# DatasetRid -dataset_rid = None -# Optional[PageSize] | The page size to use for the endpoint. -page_size = None -# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. -page_token = None -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - for dataset in client.datasets.Dataset.transactions( - dataset_rid, page_size=page_size, page_token=page_token, preview=preview - ): - pprint(dataset) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Dataset.transactions: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | ListTransactionsOfDatasetResponse | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - diff --git a/docs/v2/Datasets/File.md b/docs/v2/Datasets/File.md deleted file mode 100644 index c564ce329..000000000 --- a/docs/v2/Datasets/File.md +++ /dev/null @@ -1,409 +0,0 @@ -# File - -Method | HTTP request | Release Stage | -------------- | ------------- | ----- | -[**content**](#content) | **GET** /v2/datasets/{datasetRid}/files/{filePath}/content | Stable | -[**delete**](#delete) | **DELETE** /v2/datasets/{datasetRid}/files/{filePath} | Stable | -[**get**](#get) | **GET** /v2/datasets/{datasetRid}/files/{filePath} | Stable | -[**list**](#list) | **GET** /v2/datasets/{datasetRid}/files | Stable | -[**upload**](#upload) | **POST** /v2/datasets/{datasetRid}/files/{filePath}/upload | Stable | - -# **content** -Gets the content of a File contained in a Dataset. By default this retrieves the file's content from the latest -view of the default branch - `master` for most enrollments. -#### Advanced Usage -See [Datasets Core Concepts](https://palantir.com/docs/foundry/data-integration/datasets/) for details on using branches and transactions. -To **get a file's content from a specific Branch** specify the Branch's name as `branchName`. This will -retrieve the content for the most recent version of the file since the latest snapshot transaction, or the -earliest ancestor transaction of the branch if there are no snapshot transactions. -To **get a file's content from the resolved view of a transaction** specify the Transaction's resource identifier -as `endTransactionRid`. This will retrieve the content for the most recent version of the file since the latest -snapshot transaction, or the earliest ancestor transaction if there are no snapshot transactions. -To **get a file's content from the resolved view of a range of transactions** specify the the start transaction's -resource identifier as `startTransactionRid` and the end transaction's resource identifier as `endTransactionRid`. -This will retrieve the content for the most recent version of the file since the `startTransactionRid` up to the -`endTransactionRid`. Note that an intermediate snapshot transaction will remove all files from the view. Behavior -is undefined when the start and end transactions do not belong to the same root-to-leaf path. -To **get a file's content from a specific transaction** specify the Transaction's resource identifier as both the -`startTransactionRid` and `endTransactionRid`. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**dataset_rid** | DatasetRid | | | -**file_path** | FilePath | | | -**branch_name** | Optional[BranchName] | The name of the Branch that contains the File. Defaults to `master` for most enrollments. | [optional] | -**end_transaction_rid** | Optional[TransactionRid] | The Resource Identifier (RID) of the end Transaction. | [optional] | -**start_transaction_rid** | Optional[TransactionRid] | The Resource Identifier (RID) of the start Transaction. | [optional] | - -### Return type -**bytes** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# DatasetRid -dataset_rid = None -# FilePath -file_path = None -# Optional[BranchName] | The name of the Branch that contains the File. Defaults to `master` for most enrollments. -branch_name = None -# Optional[TransactionRid] | The Resource Identifier (RID) of the end Transaction. -end_transaction_rid = None -# Optional[TransactionRid] | The Resource Identifier (RID) of the start Transaction. -start_transaction_rid = None - - -try: - api_response = client.datasets.Dataset.File.content( - dataset_rid, - file_path, - branch_name=branch_name, - end_transaction_rid=end_transaction_rid, - start_transaction_rid=start_transaction_rid, - ) - print("The content response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling File.content: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | bytes | | application/octet-stream | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **delete** -Deletes a File from a Dataset. By default the file is deleted in a new transaction on the default -branch - `master` for most enrollments. The file will still be visible on historical views. -#### Advanced Usage -See [Datasets Core Concepts](https://palantir.com/docs/foundry/data-integration/datasets/) for details on using branches and transactions. -To **delete a File from a specific Branch** specify the Branch's name as `branchName`. A new delete Transaction -will be created and committed on this branch. -To **delete a File using a manually opened Transaction**, specify the Transaction's resource identifier -as `transactionRid`. The transaction must be of type `DELETE`. This is useful for deleting multiple files in a -single transaction. See [createTransaction](https://palantir.com/docs/foundry/api/datasets-resources/transactions/create-transaction/) to -open a transaction. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**dataset_rid** | DatasetRid | | | -**file_path** | FilePath | | | -**branch_name** | Optional[BranchName] | The name of the Branch on which to delete the File. Defaults to `master` for most enrollments. | [optional] | -**transaction_rid** | Optional[TransactionRid] | The Resource Identifier (RID) of the open delete Transaction on which to delete the File. | [optional] | - -### Return type -**None** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# DatasetRid -dataset_rid = None -# FilePath -file_path = None -# Optional[BranchName] | The name of the Branch on which to delete the File. Defaults to `master` for most enrollments. -branch_name = None -# Optional[TransactionRid] | The Resource Identifier (RID) of the open delete Transaction on which to delete the File. -transaction_rid = None - - -try: - api_response = client.datasets.Dataset.File.delete( - dataset_rid, file_path, branch_name=branch_name, transaction_rid=transaction_rid - ) - print("The delete response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling File.delete: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**204** | None | | None | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **get** -Gets metadata about a File contained in a Dataset. By default this retrieves the file's metadata from the latest -view of the default branch - `master` for most enrollments. -#### Advanced Usage -See [Datasets Core Concepts](https://palantir.com/docs/foundry/data-integration/datasets/) for details on using branches and transactions. -To **get a file's metadata from a specific Branch** specify the Branch's name as `branchName`. This will -retrieve metadata for the most recent version of the file since the latest snapshot transaction, or the earliest -ancestor transaction of the branch if there are no snapshot transactions. -To **get a file's metadata from the resolved view of a transaction** specify the Transaction's resource identifier -as `endTransactionRid`. This will retrieve metadata for the most recent version of the file since the latest snapshot -transaction, or the earliest ancestor transaction if there are no snapshot transactions. -To **get a file's metadata from the resolved view of a range of transactions** specify the the start transaction's -resource identifier as `startTransactionRid` and the end transaction's resource identifier as `endTransactionRid`. -This will retrieve metadata for the most recent version of the file since the `startTransactionRid` up to the -`endTransactionRid`. Behavior is undefined when the start and end transactions do not belong to the same root-to-leaf path. -To **get a file's metadata from a specific transaction** specify the Transaction's resource identifier as both the -`startTransactionRid` and `endTransactionRid`. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**dataset_rid** | DatasetRid | | | -**file_path** | FilePath | | | -**branch_name** | Optional[BranchName] | The name of the Branch that contains the File. Defaults to `master` for most enrollments. | [optional] | -**end_transaction_rid** | Optional[TransactionRid] | The Resource Identifier (RID) of the end Transaction. | [optional] | -**start_transaction_rid** | Optional[TransactionRid] | The Resource Identifier (RID) of the start Transaction. | [optional] | - -### Return type -**File** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# DatasetRid -dataset_rid = None -# FilePath -file_path = None -# Optional[BranchName] | The name of the Branch that contains the File. Defaults to `master` for most enrollments. -branch_name = None -# Optional[TransactionRid] | The Resource Identifier (RID) of the end Transaction. -end_transaction_rid = None -# Optional[TransactionRid] | The Resource Identifier (RID) of the start Transaction. -start_transaction_rid = None - - -try: - api_response = client.datasets.Dataset.File.get( - dataset_rid, - file_path, - branch_name=branch_name, - end_transaction_rid=end_transaction_rid, - start_transaction_rid=start_transaction_rid, - ) - print("The get response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling File.get: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | File | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **list** -Lists Files contained in a Dataset. By default files are listed on the latest view of the default -branch - `master` for most enrollments. -#### Advanced Usage -See [Datasets Core Concepts](https://palantir.com/docs/foundry/data-integration/datasets/) for details on using branches and transactions. -To **list files on a specific Branch** specify the Branch's name as `branchName`. This will include the most -recent version of all files since the latest snapshot transaction, or the earliest ancestor transaction of the -branch if there are no snapshot transactions. -To **list files on the resolved view of a transaction** specify the Transaction's resource identifier -as `endTransactionRid`. This will include the most recent version of all files since the latest snapshot -transaction, or the earliest ancestor transaction if there are no snapshot transactions. -To **list files on the resolved view of a range of transactions** specify the the start transaction's resource -identifier as `startTransactionRid` and the end transaction's resource identifier as `endTransactionRid`. This -will include the most recent version of all files since the `startTransactionRid` up to the `endTransactionRid`. -Note that an intermediate snapshot transaction will remove all files from the view. Behavior is undefined when -the start and end transactions do not belong to the same root-to-leaf path. -To **list files on a specific transaction** specify the Transaction's resource identifier as both the -`startTransactionRid` and `endTransactionRid`. This will include only files that were modified as part of that -Transaction. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**dataset_rid** | DatasetRid | | | -**branch_name** | Optional[BranchName] | The name of the Branch on which to list Files. Defaults to `master` for most enrollments. | [optional] | -**end_transaction_rid** | Optional[TransactionRid] | The Resource Identifier (RID) of the end Transaction. | [optional] | -**page_size** | Optional[PageSize] | The page size to use for the endpoint. | [optional] | -**page_token** | Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. | [optional] | -**start_transaction_rid** | Optional[TransactionRid] | The Resource Identifier (RID) of the start Transaction. | [optional] | - -### Return type -**ListFilesResponse** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# DatasetRid -dataset_rid = None -# Optional[BranchName] | The name of the Branch on which to list Files. Defaults to `master` for most enrollments. -branch_name = None -# Optional[TransactionRid] | The Resource Identifier (RID) of the end Transaction. -end_transaction_rid = None -# Optional[PageSize] | The page size to use for the endpoint. -page_size = None -# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. -page_token = None -# Optional[TransactionRid] | The Resource Identifier (RID) of the start Transaction. -start_transaction_rid = None - - -try: - for file in client.datasets.Dataset.File.list( - dataset_rid, - branch_name=branch_name, - end_transaction_rid=end_transaction_rid, - page_size=page_size, - page_token=page_token, - start_transaction_rid=start_transaction_rid, - ): - pprint(file) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling File.list: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | ListFilesResponse | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **upload** -Uploads a File to an existing Dataset. -The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`. -By default the file is uploaded to a new transaction on the default branch - `master` for most enrollments. -If the file already exists only the most recent version will be visible in the updated view. -#### Advanced Usage -See [Datasets Core Concepts](https://palantir.com/docs/foundry/data-integration/datasets/) for details on using branches and transactions. -To **upload a file to a specific Branch** specify the Branch's name as `branchName`. A new transaction will -be created and committed on this branch. By default the TransactionType will be `UPDATE`, to override this -default specify `transactionType` in addition to `branchName`. -See [createBranch](https://palantir.com/docs/foundry/api/datasets-resources/branches/create-branch/) to create a custom branch. -To **upload a file on a manually opened transaction** specify the Transaction's resource identifier as -`transactionRid`. This is useful for uploading multiple files in a single transaction. -See [createTransaction](https://palantir.com/docs/foundry/api/datasets-resources/transactions/create-transaction/) to open a transaction. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**dataset_rid** | DatasetRid | | | -**file_path** | FilePath | | | -**body** | bytes | Body of the request | | -**branch_name** | Optional[BranchName] | The name of the Branch on which to upload the File. Defaults to `master` for most enrollments. | [optional] | -**transaction_rid** | Optional[TransactionRid] | The Resource Identifier (RID) of the open Transaction on which to upload the File. | [optional] | -**transaction_type** | Optional[TransactionType] | The type of the Transaction to create when using branchName. Defaults to `UPDATE`. | [optional] | - -### Return type -**File** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# DatasetRid -dataset_rid = None -# FilePath -file_path = None -# bytes | Body of the request -body = None -# Optional[BranchName] | The name of the Branch on which to upload the File. Defaults to `master` for most enrollments. -branch_name = None -# Optional[TransactionRid] | The Resource Identifier (RID) of the open Transaction on which to upload the File. -transaction_rid = None -# Optional[TransactionType] | The type of the Transaction to create when using branchName. Defaults to `UPDATE`. -transaction_type = None - - -try: - api_response = client.datasets.Dataset.File.upload( - dataset_rid, - file_path, - body, - branch_name=branch_name, - transaction_rid=transaction_rid, - transaction_type=transaction_type, - ) - print("The upload response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling File.upload: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | File | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - diff --git a/docs/v2/Datasets/Transaction.md b/docs/v2/Datasets/Transaction.md deleted file mode 100644 index 1f521f898..000000000 --- a/docs/v2/Datasets/Transaction.md +++ /dev/null @@ -1,360 +0,0 @@ -# Transaction - -Method | HTTP request | Release Stage | -------------- | ------------- | ----- | -[**abort**](#abort) | **POST** /v2/datasets/{datasetRid}/transactions/{transactionRid}/abort | Stable | -[**build**](#build) | **GET** /v2/datasets/{datasetRid}/transactions/{transactionRid}/build | Private Beta | -[**commit**](#commit) | **POST** /v2/datasets/{datasetRid}/transactions/{transactionRid}/commit | Stable | -[**create**](#create) | **POST** /v2/datasets/{datasetRid}/transactions | Stable | -[**get**](#get) | **GET** /v2/datasets/{datasetRid}/transactions/{transactionRid} | Stable | -[**job**](#job) | **GET** /v2/datasets/{datasetRid}/transactions/{transactionRid}/job | Private Beta | - -# **abort** -Aborts an open Transaction. File modifications made on this Transaction are not preserved and the Branch is -not updated. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**dataset_rid** | DatasetRid | | | -**transaction_rid** | TransactionRid | | | - -### Return type -**Transaction** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# DatasetRid -dataset_rid = None -# TransactionRid -transaction_rid = None - - -try: - api_response = client.datasets.Dataset.Transaction.abort(dataset_rid, transaction_rid) - print("The abort response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Transaction.abort: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | Transaction | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **build** -Get the [Build](https://palantir.com/docs/foundry/data-integration/builds#builds) that computed the -given Transaction. Not all Transactions have an associated Build. For example, if a Dataset -is updated by a User uploading a CSV file into the browser, no Build will be tied to the Transaction. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**dataset_rid** | DatasetRid | | | -**transaction_rid** | TransactionRid | | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**Optional[BuildRid]** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# DatasetRid -dataset_rid = None -# TransactionRid -transaction_rid = None -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.datasets.Dataset.Transaction.build( - dataset_rid, transaction_rid, preview=preview - ) - print("The build response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Transaction.build: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | Optional[BuildRid] | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **commit** -Commits an open Transaction. File modifications made on this Transaction are preserved and the Branch is -updated to point to the Transaction. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**dataset_rid** | DatasetRid | | | -**transaction_rid** | TransactionRid | | | - -### Return type -**Transaction** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# DatasetRid -dataset_rid = None -# TransactionRid -transaction_rid = None - - -try: - api_response = client.datasets.Dataset.Transaction.commit(dataset_rid, transaction_rid) - print("The commit response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Transaction.commit: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | Transaction | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **create** -Creates a Transaction on a Branch of a Dataset. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**dataset_rid** | DatasetRid | | | -**transaction_type** | TransactionType | | | -**branch_name** | Optional[BranchName] | The name of the Branch on which to create the Transaction. Defaults to `master` for most enrollments. | [optional] | - -### Return type -**Transaction** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# DatasetRid -dataset_rid = None -# TransactionType -transaction_type = "APPEND" -# Optional[BranchName] | The name of the Branch on which to create the Transaction. Defaults to `master` for most enrollments. -branch_name = None - - -try: - api_response = client.datasets.Dataset.Transaction.create( - dataset_rid, transaction_type=transaction_type, branch_name=branch_name - ) - print("The create response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Transaction.create: %s\n" % e) - -``` - -### Manipulate a Dataset within a Transaction - -```python -import foundry - -foundry_client = foundry.FoundryV2Client(auth=foundry.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -transaction = foundry_client.datasets.Dataset.Transaction.create( - dataset_rid="...", - create_transaction_request={}, -) - -with open("my/path/to/file.txt", 'rb') as f: - foundry_client.datasets.Dataset.File.upload( - body=f.read(), - dataset_rid="....", - file_path="...", - transaction_rid=transaction.rid, - ) - -foundry_client.datasets.Dataset.Transaction.commit(dataset_rid="...", transaction_rid=transaction.rid) -``` - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | Transaction | The created Transaction | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **get** -Gets a Transaction of a Dataset. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**dataset_rid** | DatasetRid | | | -**transaction_rid** | TransactionRid | | | - -### Return type -**Transaction** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# DatasetRid -dataset_rid = None -# TransactionRid -transaction_rid = None - - -try: - api_response = client.datasets.Dataset.Transaction.get(dataset_rid, transaction_rid) - print("The get response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Transaction.get: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | Transaction | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **job** -Get the [Job](https://palantir.com/docs/foundry/data-integration/builds#jobs-and-jobspecs) that computed the -given Transaction. Not all Transactions have an associated Job. For example, if a Dataset -is updated by a User uploading a CSV file into the browser, no Job will be tied to the Transaction. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**dataset_rid** | DatasetRid | | | -**transaction_rid** | TransactionRid | | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**Optional[JobRid]** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# DatasetRid -dataset_rid = None -# TransactionRid -transaction_rid = None -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.datasets.Dataset.Transaction.job( - dataset_rid, transaction_rid, preview=preview - ) - print("The job response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Transaction.job: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | Optional[JobRid] | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - diff --git a/docs/v2/Datasets/View.md b/docs/v2/Datasets/View.md deleted file mode 100644 index 0b8cb0854..000000000 --- a/docs/v2/Datasets/View.md +++ /dev/null @@ -1,401 +0,0 @@ -# View - -Method | HTTP request | Release Stage | -------------- | ------------- | ----- | -[**add_backing_datasets**](#add_backing_datasets) | **POST** /v2/datasets/views/{viewDatasetRid}/addBackingDatasets | Public Beta | -[**add_primary_key**](#add_primary_key) | **POST** /v2/datasets/views/{viewDatasetRid}/addPrimaryKey | Public Beta | -[**create**](#create) | **POST** /v2/datasets/views | Public Beta | -[**get**](#get) | **GET** /v2/datasets/views/{viewDatasetRid} | Public Beta | -[**remove_backing_datasets**](#remove_backing_datasets) | **POST** /v2/datasets/views/{viewDatasetRid}/removeBackingDatasets | Public Beta | -[**replace_backing_datasets**](#replace_backing_datasets) | **PUT** /v2/datasets/views/{viewDatasetRid}/replaceBackingDatasets | Public Beta | - -# **add_backing_datasets** -Adds one or more backing datasets to a View. Any duplicates with the same dataset RID and branch name are -ignored. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**view_dataset_rid** | DatasetRid | The rid of the View. | | -**backing_datasets** | List[ViewBackingDataset] | | | -**branch** | Optional[BranchName] | | [optional] | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**View** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# DatasetRid | The rid of the View. -view_dataset_rid = None -# List[ViewBackingDataset] -backing_datasets = [ - { - "datasetRid": "ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da", - "branch": "master", - } -] -# Optional[BranchName] -branch = "master" -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.datasets.View.add_backing_datasets( - view_dataset_rid, backing_datasets=backing_datasets, branch=branch, preview=preview - ) - print("The add_backing_datasets response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling View.add_backing_datasets: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | View | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **add_primary_key** -Adds a primary key to a View that does not already have one. Primary keys are treated as -guarantees provided by the creator of the dataset. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**view_dataset_rid** | DatasetRid | The rid of the View. | | -**primary_key** | ViewPrimaryKey | | | -**branch** | Optional[BranchName] | | [optional] | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**View** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# DatasetRid | The rid of the View. -view_dataset_rid = None -# ViewPrimaryKey -primary_key = { - "columns": ["colA"], - "resolution": { - "type": "duplicate", - "deletionColumn": "deletionCol", - "resolutionStrategy": {"type": "latestWins", "columns": ["colB", "colC"]}, - }, -} -# Optional[BranchName] -branch = "master" -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.datasets.View.add_primary_key( - view_dataset_rid, primary_key=primary_key, branch=branch, preview=preview - ) - print("The add_primary_key response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling View.add_primary_key: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | View | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **create** -Create a new View. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**backing_datasets** | List[ViewBackingDataset] | | | -**parent_folder_rid** | FolderRid | | | -**view_name** | DatasetName | | | -**branch** | Optional[BranchName] | The branch name of the View. If not specified, defaults to `master` for most enrollments. | [optional] | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | -**primary_key** | Optional[ViewPrimaryKey] | | [optional] | - -### Return type -**View** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# List[ViewBackingDataset] -backing_datasets = [ - { - "datasetRid": "ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da", - "branch": "master", - } -] -# FolderRid -parent_folder_rid = "ri.compass.main.folder.c410f510-2937-420e-8ea3-8c9bcb3c1791" -# DatasetName -view_name = "My Dataset" -# Optional[BranchName] | The branch name of the View. If not specified, defaults to `master` for most enrollments. -branch = "master" -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None -# Optional[ViewPrimaryKey] -primary_key = {"columns": ["order_id"]} - - -try: - api_response = client.datasets.View.create( - backing_datasets=backing_datasets, - parent_folder_rid=parent_folder_rid, - view_name=view_name, - branch=branch, - preview=preview, - primary_key=primary_key, - ) - print("The create response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling View.create: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | View | The created View | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **get** -Get metadata for a View. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**view_dataset_rid** | DatasetRid | The rid of the View. | | -**branch** | Optional[BranchName] | | [optional] | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**View** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# DatasetRid | The rid of the View. -view_dataset_rid = None -# Optional[BranchName] -branch = None -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.datasets.View.get(view_dataset_rid, branch=branch, preview=preview) - print("The get response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling View.get: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | View | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **remove_backing_datasets** -Removes specified backing datasets from a View. Removing a dataset triggers a -[SNAPSHOT](https://palantir.com/docs/foundry/data-integration/datasets#snapshot) transaction on the next update. If a -specified dataset does not exist, no error is thrown. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**view_dataset_rid** | DatasetRid | The rid of the View. | | -**backing_datasets** | List[ViewBackingDataset] | | | -**branch** | Optional[BranchName] | | [optional] | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**View** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# DatasetRid | The rid of the View. -view_dataset_rid = None -# List[ViewBackingDataset] -backing_datasets = [ - { - "datasetRid": "ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da", - "branch": "master", - } -] -# Optional[BranchName] -branch = "master" -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.datasets.View.remove_backing_datasets( - view_dataset_rid, backing_datasets=backing_datasets, branch=branch, preview=preview - ) - print("The remove_backing_datasets response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling View.remove_backing_datasets: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | View | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **replace_backing_datasets** -Replaces the backing datasets for a View. Removing any backing dataset triggers a -[SNAPSHOT](https://palantir.com/docs/foundry/data-integration/datasets#snapshot) transaction the next time the View is updated. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**view_dataset_rid** | DatasetRid | The rid of the View. | | -**backing_datasets** | List[ViewBackingDataset] | | | -**branch** | Optional[BranchName] | | [optional] | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**View** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# DatasetRid | The rid of the View. -view_dataset_rid = None -# List[ViewBackingDataset] -backing_datasets = [ - { - "datasetRid": "ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da", - "branch": "master", - } -] -# Optional[BranchName] -branch = "master" -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.datasets.View.replace_backing_datasets( - view_dataset_rid, backing_datasets=backing_datasets, branch=branch, preview=preview - ) - print("The replace_backing_datasets response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling View.replace_backing_datasets: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | View | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - diff --git a/docs/v2/Datasets/models/AddBackingDatasetsRequest.md b/docs/v2/Datasets/models/AddBackingDatasetsRequest.md deleted file mode 100644 index 0f672d4bc..000000000 --- a/docs/v2/Datasets/models/AddBackingDatasetsRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# AddBackingDatasetsRequest - -AddBackingDatasetsRequest - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**branch** | Optional[BranchName] | No | | -**backing_datasets** | List[ViewBackingDataset] | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/AddPrimaryKeyRequest.md b/docs/v2/Datasets/models/AddPrimaryKeyRequest.md deleted file mode 100644 index 4a8832058..000000000 --- a/docs/v2/Datasets/models/AddPrimaryKeyRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# AddPrimaryKeyRequest - -AddPrimaryKeyRequest - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**branch** | Optional[BranchName] | No | | -**primary_key** | ViewPrimaryKey | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/Branch.md b/docs/v2/Datasets/models/Branch.md deleted file mode 100644 index 7726b3e57..000000000 --- a/docs/v2/Datasets/models/Branch.md +++ /dev/null @@ -1,12 +0,0 @@ -# Branch - -Branch - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**name** | BranchName | Yes | | -**transaction_rid** | Optional[TransactionRid] | No | The most recent OPEN or COMMITTED transaction on the branch. This will never be an ABORTED transaction. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/BranchName.md b/docs/v2/Datasets/models/BranchName.md deleted file mode 100644 index 54e30ef56..000000000 --- a/docs/v2/Datasets/models/BranchName.md +++ /dev/null @@ -1,12 +0,0 @@ -# BranchName - -The name of a Branch. - - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/CreateBranchRequest.md b/docs/v2/Datasets/models/CreateBranchRequest.md deleted file mode 100644 index c2019ceab..000000000 --- a/docs/v2/Datasets/models/CreateBranchRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# CreateBranchRequest - -CreateBranchRequest - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**transaction_rid** | Optional[TransactionRid] | No | The most recent OPEN or COMMITTED transaction on the branch. This will never be an ABORTED transaction. | -**name** | BranchName | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/CreateDatasetRequest.md b/docs/v2/Datasets/models/CreateDatasetRequest.md deleted file mode 100644 index a8a74051d..000000000 --- a/docs/v2/Datasets/models/CreateDatasetRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# CreateDatasetRequest - -CreateDatasetRequest - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**parent_folder_rid** | FolderRid | Yes | | -**name** | DatasetName | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/CreateTransactionRequest.md b/docs/v2/Datasets/models/CreateTransactionRequest.md deleted file mode 100644 index 5ee9b07ef..000000000 --- a/docs/v2/Datasets/models/CreateTransactionRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# CreateTransactionRequest - -CreateTransactionRequest - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**transaction_type** | TransactionType | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/CreateViewRequest.md b/docs/v2/Datasets/models/CreateViewRequest.md deleted file mode 100644 index 0d7c57894..000000000 --- a/docs/v2/Datasets/models/CreateViewRequest.md +++ /dev/null @@ -1,15 +0,0 @@ -# CreateViewRequest - -CreateViewRequest - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**parent_folder_rid** | FolderRid | Yes | | -**view_name** | DatasetName | Yes | | -**backing_datasets** | List[ViewBackingDataset] | Yes | | -**branch** | Optional[BranchName] | No | The branch name of the View. If not specified, defaults to `master` for most enrollments. | -**primary_key** | Optional[ViewPrimaryKey] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/DataframeReader.md b/docs/v2/Datasets/models/DataframeReader.md deleted file mode 100644 index 3ed660058..000000000 --- a/docs/v2/Datasets/models/DataframeReader.md +++ /dev/null @@ -1,14 +0,0 @@ -# DataframeReader - -The dataframe reader used for reading the dataset schema. - - -| **Value** | -| --------- | -| `"AVRO"` | -| `"CSV"` | -| `"PARQUET"` | -| `"DATASOURCE"` | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/Dataset.md b/docs/v2/Datasets/models/Dataset.md deleted file mode 100644 index ab30e61ee..000000000 --- a/docs/v2/Datasets/models/Dataset.md +++ /dev/null @@ -1,13 +0,0 @@ -# Dataset - -Dataset - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**rid** | DatasetRid | Yes | | -**name** | DatasetName | Yes | | -**parent_folder_rid** | FolderRid | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/DatasetName.md b/docs/v2/Datasets/models/DatasetName.md deleted file mode 100644 index e9a38a11b..000000000 --- a/docs/v2/Datasets/models/DatasetName.md +++ /dev/null @@ -1,11 +0,0 @@ -# DatasetName - -DatasetName - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/DatasetRid.md b/docs/v2/Datasets/models/DatasetRid.md deleted file mode 100644 index 86d5f357c..000000000 --- a/docs/v2/Datasets/models/DatasetRid.md +++ /dev/null @@ -1,12 +0,0 @@ -# DatasetRid - -The Resource Identifier (RID) of a Dataset. - - -## Type -```python -RID -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/File.md b/docs/v2/Datasets/models/File.md deleted file mode 100644 index d8cd9ea3b..000000000 --- a/docs/v2/Datasets/models/File.md +++ /dev/null @@ -1,14 +0,0 @@ -# File - -File - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**path** | FilePath | Yes | | -**transaction_rid** | TransactionRid | Yes | | -**size_bytes** | Optional[Long] | No | | -**updated_time** | FileUpdatedTime | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/FileUpdatedTime.md b/docs/v2/Datasets/models/FileUpdatedTime.md deleted file mode 100644 index 6562c485f..000000000 --- a/docs/v2/Datasets/models/FileUpdatedTime.md +++ /dev/null @@ -1,11 +0,0 @@ -# FileUpdatedTime - -FileUpdatedTime - -## Type -```python -datetime -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/GetDatasetJobsAndFilter.md b/docs/v2/Datasets/models/GetDatasetJobsAndFilter.md deleted file mode 100644 index 309d59769..000000000 --- a/docs/v2/Datasets/models/GetDatasetJobsAndFilter.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetDatasetJobsAndFilter - -GetDatasetJobsAndFilter - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**items** | List[GetDatasetJobsQuery] | Yes | | -**type** | Literal["and"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/GetDatasetJobsComparisonType.md b/docs/v2/Datasets/models/GetDatasetJobsComparisonType.md deleted file mode 100644 index 17a610f8f..000000000 --- a/docs/v2/Datasets/models/GetDatasetJobsComparisonType.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetDatasetJobsComparisonType - -GetDatasetJobsComparisonType - -| **Value** | -| --------- | -| `"GTE"` | -| `"LT"` | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/GetDatasetJobsOrFilter.md b/docs/v2/Datasets/models/GetDatasetJobsOrFilter.md deleted file mode 100644 index 6b0f6f101..000000000 --- a/docs/v2/Datasets/models/GetDatasetJobsOrFilter.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetDatasetJobsOrFilter - -GetDatasetJobsOrFilter - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**items** | List[GetDatasetJobsQuery] | Yes | | -**type** | Literal["or"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/GetDatasetJobsQuery.md b/docs/v2/Datasets/models/GetDatasetJobsQuery.md deleted file mode 100644 index 2e14a57a5..000000000 --- a/docs/v2/Datasets/models/GetDatasetJobsQuery.md +++ /dev/null @@ -1,17 +0,0 @@ -# GetDatasetJobsQuery - -Query for getting jobs on given dataset. - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -GetDatasetJobsOrFilter | or -GetDatasetJobsAndFilter | and -GetDatasetJobsTimeFilter | timeFilter - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/GetDatasetJobsRequest.md b/docs/v2/Datasets/models/GetDatasetJobsRequest.md deleted file mode 100644 index 2649ce874..000000000 --- a/docs/v2/Datasets/models/GetDatasetJobsRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetDatasetJobsRequest - -GetDatasetJobsRequest - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**where** | Optional[GetDatasetJobsQuery] | No | | -**order_by** | List[GetDatasetJobsSort] | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/GetDatasetJobsSort.md b/docs/v2/Datasets/models/GetDatasetJobsSort.md deleted file mode 100644 index 7c833c434..000000000 --- a/docs/v2/Datasets/models/GetDatasetJobsSort.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetDatasetJobsSort - -GetDatasetJobsSort - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**sort_type** | GetDatasetJobsSortType | Yes | | -**sort_direction** | GetDatasetJobsSortDirection | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/GetDatasetJobsSortDirection.md b/docs/v2/Datasets/models/GetDatasetJobsSortDirection.md deleted file mode 100644 index 1470ad3d6..000000000 --- a/docs/v2/Datasets/models/GetDatasetJobsSortDirection.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetDatasetJobsSortDirection - -GetDatasetJobsSortDirection - -| **Value** | -| --------- | -| `"ASCENDING"` | -| `"DESCENDING"` | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/GetDatasetJobsSortType.md b/docs/v2/Datasets/models/GetDatasetJobsSortType.md deleted file mode 100644 index 96b7c17d5..000000000 --- a/docs/v2/Datasets/models/GetDatasetJobsSortType.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetDatasetJobsSortType - -GetDatasetJobsSortType - -| **Value** | -| --------- | -| `"BY_STARTED_TIME"` | -| `"BY_FINISHED_TIME"` | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/GetDatasetJobsTimeFilter.md b/docs/v2/Datasets/models/GetDatasetJobsTimeFilter.md deleted file mode 100644 index fc07b8aa8..000000000 --- a/docs/v2/Datasets/models/GetDatasetJobsTimeFilter.md +++ /dev/null @@ -1,14 +0,0 @@ -# GetDatasetJobsTimeFilter - -GetDatasetJobsTimeFilter - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**field** | GetDatasetJobsTimeFilterField | Yes | | -**comparison_type** | GetDatasetJobsComparisonType | Yes | | -**value** | datetime | Yes | | -**type** | Literal["timeFilter"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/GetDatasetJobsTimeFilterField.md b/docs/v2/Datasets/models/GetDatasetJobsTimeFilterField.md deleted file mode 100644 index 6e20924d3..000000000 --- a/docs/v2/Datasets/models/GetDatasetJobsTimeFilterField.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetDatasetJobsTimeFilterField - -GetDatasetJobsTimeFilterField - -| **Value** | -| --------- | -| `"SUBMITTED_TIME"` | -| `"FINISHED_TIME"` | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/GetDatasetSchemaResponse.md b/docs/v2/Datasets/models/GetDatasetSchemaResponse.md deleted file mode 100644 index 3c37f93d0..000000000 --- a/docs/v2/Datasets/models/GetDatasetSchemaResponse.md +++ /dev/null @@ -1,14 +0,0 @@ -# GetDatasetSchemaResponse - -GetDatasetSchemaResponse - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**branch_name** | BranchName | Yes | | -**end_transaction_rid** | TransactionRid | Yes | | -**schema_** | DatasetSchema | Yes | | -**version_id** | VersionId | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/GetJobResponse.md b/docs/v2/Datasets/models/GetJobResponse.md deleted file mode 100644 index c92a3c455..000000000 --- a/docs/v2/Datasets/models/GetJobResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetJobResponse - -GetJobResponse - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**data** | List[JobDetails] | Yes | | -**next_page_token** | Optional[PageToken] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/GetSchemaDatasetsBatchRequestElement.md b/docs/v2/Datasets/models/GetSchemaDatasetsBatchRequestElement.md deleted file mode 100644 index 75fb94378..000000000 --- a/docs/v2/Datasets/models/GetSchemaDatasetsBatchRequestElement.md +++ /dev/null @@ -1,14 +0,0 @@ -# GetSchemaDatasetsBatchRequestElement - -GetSchemaDatasetsBatchRequestElement - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**end_transaction_rid** | Optional[TransactionRid] | No | The Resource Identifier (RID) of the end Transaction. If a user does not provide a value, the RID of the latest committed transaction will be used. | -**dataset_rid** | DatasetRid | Yes | | -**version_id** | Optional[VersionId] | No | The schema version that should be used. If none is provided, the latest version will be used. | -**branch_name** | Optional[BranchName] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/GetSchemaDatasetsBatchResponse.md b/docs/v2/Datasets/models/GetSchemaDatasetsBatchResponse.md deleted file mode 100644 index 80064d830..000000000 --- a/docs/v2/Datasets/models/GetSchemaDatasetsBatchResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetSchemaDatasetsBatchResponse - -GetSchemaDatasetsBatchResponse - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**data** | Dict[DatasetRid, GetDatasetSchemaResponse] | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/JobDetails.md b/docs/v2/Datasets/models/JobDetails.md deleted file mode 100644 index 5e10879a1..000000000 --- a/docs/v2/Datasets/models/JobDetails.md +++ /dev/null @@ -1,11 +0,0 @@ -# JobDetails - -JobDetails - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**job_rid** | JobRid | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/ListBranchesResponse.md b/docs/v2/Datasets/models/ListBranchesResponse.md deleted file mode 100644 index ba485a9ce..000000000 --- a/docs/v2/Datasets/models/ListBranchesResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListBranchesResponse - -ListBranchesResponse - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**data** | List[Branch] | Yes | | -**next_page_token** | Optional[PageToken] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/ListFilesResponse.md b/docs/v2/Datasets/models/ListFilesResponse.md deleted file mode 100644 index e3e2ba815..000000000 --- a/docs/v2/Datasets/models/ListFilesResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListFilesResponse - -ListFilesResponse - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**data** | List[File] | Yes | | -**next_page_token** | Optional[PageToken] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/ListHealthChecksResponse.md b/docs/v2/Datasets/models/ListHealthChecksResponse.md deleted file mode 100644 index 0f64fd220..000000000 --- a/docs/v2/Datasets/models/ListHealthChecksResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# ListHealthChecksResponse - -ListHealthChecksResponse - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**data** | List[CheckRid] | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/ListSchedulesResponse.md b/docs/v2/Datasets/models/ListSchedulesResponse.md deleted file mode 100644 index abd5dfd03..000000000 --- a/docs/v2/Datasets/models/ListSchedulesResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListSchedulesResponse - -ListSchedulesResponse - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**data** | List[ScheduleRid] | Yes | | -**next_page_token** | Optional[PageToken] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/ListTransactionsOfDatasetResponse.md b/docs/v2/Datasets/models/ListTransactionsOfDatasetResponse.md deleted file mode 100644 index 689082310..000000000 --- a/docs/v2/Datasets/models/ListTransactionsOfDatasetResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListTransactionsOfDatasetResponse - -ListTransactionsOfDatasetResponse - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**data** | List[Transaction] | Yes | | -**next_page_token** | Optional[PageToken] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/ListTransactionsResponse.md b/docs/v2/Datasets/models/ListTransactionsResponse.md deleted file mode 100644 index 0bd594d14..000000000 --- a/docs/v2/Datasets/models/ListTransactionsResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListTransactionsResponse - -ListTransactionsResponse - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**data** | List[Transaction] | Yes | | -**next_page_token** | Optional[PageToken] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/PrimaryKeyLatestWinsResolutionStrategy.md b/docs/v2/Datasets/models/PrimaryKeyLatestWinsResolutionStrategy.md deleted file mode 100644 index c6a618f67..000000000 --- a/docs/v2/Datasets/models/PrimaryKeyLatestWinsResolutionStrategy.md +++ /dev/null @@ -1,12 +0,0 @@ -# PrimaryKeyLatestWinsResolutionStrategy - -Picks the row with the highest value of a list of columns, compared in order. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**columns** | List[str] | Yes | | -**type** | Literal["latestWins"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/PrimaryKeyResolutionDuplicate.md b/docs/v2/Datasets/models/PrimaryKeyResolutionDuplicate.md deleted file mode 100644 index be39c5c31..000000000 --- a/docs/v2/Datasets/models/PrimaryKeyResolutionDuplicate.md +++ /dev/null @@ -1,13 +0,0 @@ -# PrimaryKeyResolutionDuplicate - -Duplicate primary key values may exist within the dataset – resolution required. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**deletion_column** | Optional[str] | No | The name of the boolean column that indicates whether a row should be considered deleted. Based on the `resolutionStrategy`, if the final row selected for a given primary key has `true` in this column, that row will be excluded from the results. Otherwise, it will be included. | -**resolution_strategy** | PrimaryKeyResolutionStrategy | Yes | | -**type** | Literal["duplicate"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/PrimaryKeyResolutionStrategy.md b/docs/v2/Datasets/models/PrimaryKeyResolutionStrategy.md deleted file mode 100644 index c6385a501..000000000 --- a/docs/v2/Datasets/models/PrimaryKeyResolutionStrategy.md +++ /dev/null @@ -1,11 +0,0 @@ -# PrimaryKeyResolutionStrategy - -PrimaryKeyResolutionStrategy - -## Type -```python -PrimaryKeyLatestWinsResolutionStrategy -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/PrimaryKeyResolutionUnique.md b/docs/v2/Datasets/models/PrimaryKeyResolutionUnique.md deleted file mode 100644 index 8e9af0146..000000000 --- a/docs/v2/Datasets/models/PrimaryKeyResolutionUnique.md +++ /dev/null @@ -1,11 +0,0 @@ -# PrimaryKeyResolutionUnique - -Primary key values are unique within the dataset – no conflicts. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["unique"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/PutDatasetSchemaRequest.md b/docs/v2/Datasets/models/PutDatasetSchemaRequest.md deleted file mode 100644 index 0492fcf46..000000000 --- a/docs/v2/Datasets/models/PutDatasetSchemaRequest.md +++ /dev/null @@ -1,14 +0,0 @@ -# PutDatasetSchemaRequest - -PutDatasetSchemaRequest - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**branch_name** | Optional[BranchName] | No | | -**dataframe_reader** | Optional[DataframeReader] | No | The dataframe reader used for reading the dataset schema. Defaults to PARQUET. | -**end_transaction_rid** | Optional[TransactionRid] | No | The Resource Identifier (RID) of the end Transaction. | -**schema_** | DatasetSchema | Yes | The schema that will be added. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/RemoveBackingDatasetsRequest.md b/docs/v2/Datasets/models/RemoveBackingDatasetsRequest.md deleted file mode 100644 index e126f6967..000000000 --- a/docs/v2/Datasets/models/RemoveBackingDatasetsRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# RemoveBackingDatasetsRequest - -RemoveBackingDatasetsRequest - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**branch** | Optional[BranchName] | No | | -**backing_datasets** | List[ViewBackingDataset] | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/ReplaceBackingDatasetsRequest.md b/docs/v2/Datasets/models/ReplaceBackingDatasetsRequest.md deleted file mode 100644 index 768368325..000000000 --- a/docs/v2/Datasets/models/ReplaceBackingDatasetsRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# ReplaceBackingDatasetsRequest - -ReplaceBackingDatasetsRequest - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**branch** | Optional[BranchName] | No | | -**backing_datasets** | List[ViewBackingDataset] | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/TableExportFormat.md b/docs/v2/Datasets/models/TableExportFormat.md deleted file mode 100644 index d108384a4..000000000 --- a/docs/v2/Datasets/models/TableExportFormat.md +++ /dev/null @@ -1,12 +0,0 @@ -# TableExportFormat - -Format for tabular dataset export. - - -| **Value** | -| --------- | -| `"ARROW"` | -| `"CSV"` | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/Transaction.md b/docs/v2/Datasets/models/Transaction.md deleted file mode 100644 index ab9990d46..000000000 --- a/docs/v2/Datasets/models/Transaction.md +++ /dev/null @@ -1,15 +0,0 @@ -# Transaction - -Transaction - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**rid** | TransactionRid | Yes | | -**transaction_type** | TransactionType | Yes | | -**status** | TransactionStatus | Yes | | -**created_time** | TransactionCreatedTime | Yes | The timestamp when the transaction was created, in ISO 8601 timestamp format. | -**closed_time** | Optional[datetime] | No | The timestamp when the transaction was closed, in ISO 8601 timestamp format. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/TransactionCreatedTime.md b/docs/v2/Datasets/models/TransactionCreatedTime.md deleted file mode 100644 index 94fc46eed..000000000 --- a/docs/v2/Datasets/models/TransactionCreatedTime.md +++ /dev/null @@ -1,12 +0,0 @@ -# TransactionCreatedTime - -The timestamp when the transaction was created, in ISO 8601 timestamp format. - - -## Type -```python -datetime -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/TransactionRid.md b/docs/v2/Datasets/models/TransactionRid.md deleted file mode 100644 index 4d33f703f..000000000 --- a/docs/v2/Datasets/models/TransactionRid.md +++ /dev/null @@ -1,12 +0,0 @@ -# TransactionRid - -The Resource Identifier (RID) of a Transaction. - - -## Type -```python -RID -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/TransactionStatus.md b/docs/v2/Datasets/models/TransactionStatus.md deleted file mode 100644 index fd6f677d3..000000000 --- a/docs/v2/Datasets/models/TransactionStatus.md +++ /dev/null @@ -1,13 +0,0 @@ -# TransactionStatus - -The status of a Transaction. - - -| **Value** | -| --------- | -| `"ABORTED"` | -| `"COMMITTED"` | -| `"OPEN"` | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/TransactionType.md b/docs/v2/Datasets/models/TransactionType.md deleted file mode 100644 index ab12c2fa4..000000000 --- a/docs/v2/Datasets/models/TransactionType.md +++ /dev/null @@ -1,14 +0,0 @@ -# TransactionType - -The type of a Transaction. - - -| **Value** | -| --------- | -| `"APPEND"` | -| `"UPDATE"` | -| `"SNAPSHOT"` | -| `"DELETE"` | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/View.md b/docs/v2/Datasets/models/View.md deleted file mode 100644 index 2aa73d3e8..000000000 --- a/docs/v2/Datasets/models/View.md +++ /dev/null @@ -1,16 +0,0 @@ -# View - -View - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**view_name** | DatasetName | Yes | | -**dataset_rid** | DatasetRid | Yes | The rid of the View. | -**parent_folder_rid** | FolderRid | Yes | | -**branch** | Optional[BranchName] | No | The branch name of the View. If not specified, defaults to `master` for most enrollments. | -**backing_datasets** | List[ViewBackingDataset] | Yes | | -**primary_key** | Optional[ViewPrimaryKey] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/ViewBackingDataset.md b/docs/v2/Datasets/models/ViewBackingDataset.md deleted file mode 100644 index 5ce3b00c0..000000000 --- a/docs/v2/Datasets/models/ViewBackingDataset.md +++ /dev/null @@ -1,12 +0,0 @@ -# ViewBackingDataset - -One of the Datasets backing a View. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**branch** | BranchName | Yes | | -**dataset_rid** | DatasetRid | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/ViewPrimaryKey.md b/docs/v2/Datasets/models/ViewPrimaryKey.md deleted file mode 100644 index 4224e5e0f..000000000 --- a/docs/v2/Datasets/models/ViewPrimaryKey.md +++ /dev/null @@ -1,14 +0,0 @@ -# ViewPrimaryKey - -The primary key of the dataset. Primary keys are treated as guarantees provided by the creator of the -dataset. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**columns** | List[str] | Yes | The columns that constitute the primary key. These columns must satisfy the following constraints: - The list of columns must be non-empty. - The list must not contain duplicate columns after applying column normalization. - Each referenced column must exist in the schema. - The type of each referenced column must be one of the following: `BYTE`, `SHORT`, `DECIMAL`, `INTEGER`, `LONG`, `STRING`, `BOOLEAN`, `TIMESTAMP` or `DATE`. | -**resolution** | ViewPrimaryKeyResolution | Yes | The semantics of the primary key within the dataset. For example, the unique resolution means that every row in the dataset has a distinct primary key. The value of this field represents a contract for writers of the dataset. Writers are responsible for maintaining any related invariants, and readers may make optimizations based on this. Violating the assumptions of the resolution can cause undefined behavior, for example, having duplicate primary keys with the unique resolution. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/ViewPrimaryKeyResolution.md b/docs/v2/Datasets/models/ViewPrimaryKeyResolution.md deleted file mode 100644 index 132558c22..000000000 --- a/docs/v2/Datasets/models/ViewPrimaryKeyResolution.md +++ /dev/null @@ -1,16 +0,0 @@ -# ViewPrimaryKeyResolution - -Specifies how primary key conflicts are resolved within the view. - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -PrimaryKeyResolutionUnique | unique -PrimaryKeyResolutionDuplicate | duplicate - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/Folder.md b/docs/v2/Filesystem/Folder.md deleted file mode 100644 index b034124aa..000000000 --- a/docs/v2/Filesystem/Folder.md +++ /dev/null @@ -1,228 +0,0 @@ -# Folder - -Method | HTTP request | Release Stage | -------------- | ------------- | ----- | -[**children**](#children) | **GET** /v2/filesystem/folders/{folderRid}/children | Public Beta | -[**create**](#create) | **POST** /v2/filesystem/folders | Public Beta | -[**get**](#get) | **GET** /v2/filesystem/folders/{folderRid} | Public Beta | -[**get_batch**](#get_batch) | **POST** /v2/filesystem/folders/getBatch | Public Beta | - -# **children** -List all child Resources of the Folder. - -This is a paged endpoint. The page size will be limited to 2,000 results per page. If no page size is -provided, this page size will also be used as the default. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**folder_rid** | FolderRid | | | -**page_size** | Optional[PageSize] | The page size to use for the endpoint. | [optional] | -**page_token** | Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. | [optional] | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**ListChildrenOfFolderResponse** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# FolderRid -folder_rid = "ri.compass.main.folder.01a79a9d-e293-48db-a585-9ffe221536e8" -# Optional[PageSize] | The page size to use for the endpoint. -page_size = None -# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. -page_token = None -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - for folder in client.filesystem.Folder.children( - folder_rid, page_size=page_size, page_token=page_token, preview=preview - ): - pprint(folder) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Folder.children: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | ListChildrenOfFolderResponse | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **create** -Creates a new Folder. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**display_name** | ResourceDisplayName | | | -**parent_folder_rid** | FolderRid | The parent folder Resource Identifier (RID). For Projects, this will be the Space RID and for Spaces, this value will be the root folder (`ri.compass.main.folder.0`). | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**Folder** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# ResourceDisplayName -display_name = "My Folder" -# FolderRid | The parent folder Resource Identifier (RID). For Projects, this will be the Space RID and for Spaces, this value will be the root folder (`ri.compass.main.folder.0`). -parent_folder_rid = "ri.compass.main.folder.4cae7c13-b59f-48f6-9ef2-dbde603e4e33" -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.filesystem.Folder.create( - display_name=display_name, parent_folder_rid=parent_folder_rid, preview=preview - ) - print("The create response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Folder.create: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | Folder | The created Folder | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **get** -Get the Folder with the specified rid. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**folder_rid** | FolderRid | | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**Folder** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# FolderRid -folder_rid = "ri.compass.main.folder.01a79a9d-e293-48db-a585-9ffe221536e8" -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.filesystem.Folder.get(folder_rid, preview=preview) - print("The get response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Folder.get: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | Folder | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **get_batch** -Fetches multiple folders in a single request. - - -The maximum batch size for this endpoint is 1000. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**body** | List[GetFoldersBatchRequestElement] | Body of the request | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**GetFoldersBatchResponse** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# List[GetFoldersBatchRequestElement] | Body of the request -body = [{"folderRid": "ri.compass.main.folder.01a79a9d-e293-48db-a585-9ffe221536e8"}] -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.filesystem.Folder.get_batch(body, preview=preview) - print("The get_batch response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Folder.get_batch: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | GetFoldersBatchResponse | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - diff --git a/docs/v2/Filesystem/Project.md b/docs/v2/Filesystem/Project.md deleted file mode 100644 index 158b91b9a..000000000 --- a/docs/v2/Filesystem/Project.md +++ /dev/null @@ -1,437 +0,0 @@ -# Project - -Method | HTTP request | Release Stage | -------------- | ------------- | ----- | -[**add_organizations**](#add_organizations) | **POST** /v2/filesystem/projects/{projectRid}/addOrganizations | Public Beta | -[**create**](#create) | **POST** /v2/filesystem/projects/create | Public Beta | -[**create_from_template**](#create_from_template) | **POST** /v2/filesystem/projects/createFromTemplate | Public Beta | -[**get**](#get) | **GET** /v2/filesystem/projects/{projectRid} | Stable | -[**organizations**](#organizations) | **GET** /v2/filesystem/projects/{projectRid}/organizations | Public Beta | -[**remove_organizations**](#remove_organizations) | **POST** /v2/filesystem/projects/{projectRid}/removeOrganizations | Public Beta | -[**replace**](#replace) | **PUT** /v2/filesystem/projects/{projectRid} | Private Beta | - -# **add_organizations** -Adds a list of Organizations to a Project. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**project_rid** | ProjectRid | | | -**organization_rids** | List[OrganizationRid] | | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**None** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# ProjectRid -project_rid = "ri.compass.main.folder.01a79a9d-e293-48db-a585-9ffe221536e8" -# List[OrganizationRid] -organization_rids = ["ri.multipass..organization.c30ee6ad-b5e4-4afe-a74f-fe4a289f2faa"] -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.filesystem.Project.add_organizations( - project_rid, organization_rids=organization_rids, preview=preview - ) - print("The add_organizations response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Project.add_organizations: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**204** | None | | None | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **create** -Creates a new Project. - -Note that third-party applications using this endpoint via OAuth2 cannot be associated with an -Ontology SDK as this will reduce the scope of operations to only those within specified projects. -When creating the application, select "No, I won't use an Ontology SDK" on the Resources page. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**default_roles** | List[RoleId] | | | -**display_name** | ResourceDisplayName | | | -**organization_rids** | List[OrganizationRid] | | | -**role_grants** | Dict[RoleId, List[PrincipalWithId]] | | | -**space_rid** | SpaceRid | | | -**description** | Optional[str] | | [optional] | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**Project** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# List[RoleId] -default_roles = ["8bf49052-dc37-4528-8bf0-b551cfb71268"] -# ResourceDisplayName -display_name = "My Important Project" -# List[OrganizationRid] -organization_rids = ["ri.multipass..organization.c30ee6ad-b5e4-4afe-a74f-fe4a289f2faa"] -# Dict[RoleId, List[PrincipalWithId]] -role_grants = { - "8bf49052-dc37-4528-8bf0-b551cfb71268": [ - {"principalId": "f05f8da4-b84c-4fca-9c77-8af0b13d11de", "principalType": "GROUP"} - ] -} -# SpaceRid -space_rid = "ri.compass.main.folder.a86ad5f5-3db5-48e4-9fdd-00aa3e5731ca" -# Optional[str] -description = "project description" -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.filesystem.Project.create( - default_roles=default_roles, - display_name=display_name, - organization_rids=organization_rids, - role_grants=role_grants, - space_rid=space_rid, - description=description, - preview=preview, - ) - print("The create response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Project.create: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | Project | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **create_from_template** -Creates a project from a project template. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**template_rid** | ProjectTemplateRid | | | -**variable_values** | Dict[ProjectTemplateVariableId, ProjectTemplateVariableValue] | | | -**default_roles** | Optional[List[RoleId]] | | [optional] | -**organization_rids** | Optional[List[OrganizationRid]] | | [optional] | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | -**project_description** | Optional[str] | | [optional] | - -### Return type -**Project** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# ProjectTemplateRid -template_rid = "ri.compass.main.template.c410f510-2937-420e-8ea3-8c9bcb3c1791" -# Dict[ProjectTemplateVariableId, ProjectTemplateVariableValue] -variable_values = {"name": "my project name"} -# Optional[List[RoleId]] -default_roles = ["8bf49052-dc37-4528-8bf0-b551cfb71268"] -# Optional[List[OrganizationRid]] -organization_rids = ["ri.multipass..organization.c30ee6ad-b5e4-4afe-a74f-fe4a289f2faa"] -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None -# Optional[str] -project_description = None - - -try: - api_response = client.filesystem.Project.create_from_template( - template_rid=template_rid, - variable_values=variable_values, - default_roles=default_roles, - organization_rids=organization_rids, - preview=preview, - project_description=project_description, - ) - print("The create_from_template response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Project.create_from_template: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | Project | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **get** -Get the Project with the specified rid. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**project_rid** | ProjectRid | | | - -### Return type -**Project** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# ProjectRid -project_rid = "ri.compass.main.folder.01a79a9d-e293-48db-a585-9ffe221536e8" - - -try: - api_response = client.filesystem.Project.get(project_rid) - print("The get response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Project.get: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | Project | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **organizations** -List of Organizations directly applied to a Project. The number of Organizations on a Project is -typically small so the `pageSize` and `pageToken` parameters are not required. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**project_rid** | ProjectRid | | | -**page_size** | Optional[PageSize] | The page size to use for the endpoint. | [optional] | -**page_token** | Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. | [optional] | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**ListOrganizationsOfProjectResponse** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# ProjectRid -project_rid = "ri.compass.main.folder.01a79a9d-e293-48db-a585-9ffe221536e8" -# Optional[PageSize] | The page size to use for the endpoint. -page_size = None -# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. -page_token = None -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - for project in client.filesystem.Project.organizations( - project_rid, page_size=page_size, page_token=page_token, preview=preview - ): - pprint(project) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Project.organizations: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | ListOrganizationsOfProjectResponse | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **remove_organizations** -Removes Organizations from a Project. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**project_rid** | ProjectRid | | | -**organization_rids** | List[OrganizationRid] | | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**None** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# ProjectRid -project_rid = "ri.compass.main.folder.01a79a9d-e293-48db-a585-9ffe221536e8" -# List[OrganizationRid] -organization_rids = ["ri.multipass..organization.c30ee6ad-b5e4-4afe-a74f-fe4a289f2faa"] -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.filesystem.Project.remove_organizations( - project_rid, organization_rids=organization_rids, preview=preview - ) - print("The remove_organizations response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Project.remove_organizations: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**204** | None | | None | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **replace** -Replace the Project with the specified rid. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**project_rid** | ProjectRid | | | -**display_name** | ResourceDisplayName | The display name of the Project. Must be unique and cannot contain a / | | -**description** | Optional[str] | The description associated with the Project. | [optional] | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**Project** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# ProjectRid -project_rid = "ri.compass.main.folder.01a79a9d-e293-48db-a585-9ffe221536e8" -# ResourceDisplayName | The display name of the Project. Must be unique and cannot contain a / -display_name = "My Important Project" -# Optional[str] | The description associated with the Project. -description = "project description" -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.filesystem.Project.replace( - project_rid, display_name=display_name, description=description, preview=preview - ) - print("The replace response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Project.replace: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | Project | The replaced Project | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - diff --git a/docs/v2/Filesystem/Resource.md b/docs/v2/Filesystem/Resource.md deleted file mode 100644 index a59fc9843..000000000 --- a/docs/v2/Filesystem/Resource.md +++ /dev/null @@ -1,604 +0,0 @@ -# Resource - -Method | HTTP request | Release Stage | -------------- | ------------- | ----- | -[**add_markings**](#add_markings) | **POST** /v2/filesystem/resources/{resourceRid}/addMarkings | Public Beta | -[**delete**](#delete) | **DELETE** /v2/filesystem/resources/{resourceRid} | Public Beta | -[**get**](#get) | **GET** /v2/filesystem/resources/{resourceRid} | Public Beta | -[**get_access_requirements**](#get_access_requirements) | **GET** /v2/filesystem/resources/{resourceRid}/getAccessRequirements | Public Beta | -[**get_batch**](#get_batch) | **POST** /v2/filesystem/resources/getBatch | Public Beta | -[**get_by_path**](#get_by_path) | **GET** /v2/filesystem/resources/getByPath | Public Beta | -[**get_by_path_batch**](#get_by_path_batch) | **POST** /v2/filesystem/resources/getByPathBatch | Public Beta | -[**markings**](#markings) | **GET** /v2/filesystem/resources/{resourceRid}/markings | Public Beta | -[**permanently_delete**](#permanently_delete) | **POST** /v2/filesystem/resources/{resourceRid}/permanentlyDelete | Public Beta | -[**remove_markings**](#remove_markings) | **POST** /v2/filesystem/resources/{resourceRid}/removeMarkings | Public Beta | -[**restore**](#restore) | **POST** /v2/filesystem/resources/{resourceRid}/restore | Public Beta | - -# **add_markings** -Adds a list of Markings to a resource. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**resource_rid** | ResourceRid | | | -**marking_ids** | List[MarkingId] | | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**None** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# ResourceRid -resource_rid = "ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da" -# List[MarkingId] -marking_ids = ["18212f9a-0e63-4b79-96a0-aae04df23336"] -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.filesystem.Resource.add_markings( - resource_rid, marking_ids=marking_ids, preview=preview - ) - print("The add_markings response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Resource.add_markings: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**204** | None | | None | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **delete** -Move the given resource to the trash. Following this operation, the resource can be restored, using the -`restore` operation, or permanently deleted using the `permanentlyDelete` operation. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**resource_rid** | ResourceRid | | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**None** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# ResourceRid -resource_rid = "ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da" -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.filesystem.Resource.delete(resource_rid, preview=preview) - print("The delete response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Resource.delete: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**204** | None | | None | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **get** -Get the Resource with the specified rid. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**resource_rid** | ResourceRid | | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**Resource** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# ResourceRid -resource_rid = "ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da" -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.filesystem.Resource.get(resource_rid, preview=preview) - print("The get response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Resource.get: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | Resource | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **get_access_requirements** -Returns a list of access requirements a user needs in order to view a resource. Access requirements are -composed of Organizations and Markings, and can either be applied directly to the resource or inherited. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**resource_rid** | ResourceRid | | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**AccessRequirements** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# ResourceRid -resource_rid = "ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da" -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.filesystem.Resource.get_access_requirements(resource_rid, preview=preview) - print("The get_access_requirements response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Resource.get_access_requirements: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | AccessRequirements | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **get_batch** -Fetches multiple resources in a single request. -Returns a map from RID to the corresponding resource. If a resource does not exist, or if it is a root folder or space, its RID will not be included in the map. -At most 1,000 resources should be requested at once. - - -The maximum batch size for this endpoint is 1000. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**body** | List[GetResourcesBatchRequestElement] | Body of the request | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**GetResourcesBatchResponse** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# List[GetResourcesBatchRequestElement] | Body of the request -body = [{"resourceRid": "ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da"}] -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.filesystem.Resource.get_batch(body, preview=preview) - print("The get_batch response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Resource.get_batch: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | GetResourcesBatchResponse | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **get_by_path** -Get a Resource by its absolute path. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**path** | ResourcePath | The path to the Resource. The leading slash is optional. | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**Resource** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# ResourcePath | The path to the Resource. The leading slash is optional. -path = "/My Organization-abcd/My Important Project/My Dataset" -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.filesystem.Resource.get_by_path(path=path, preview=preview) - print("The get_by_path response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Resource.get_by_path: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | Resource | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **get_by_path_batch** -Gets multiple Resources by their absolute paths. -Returns a list of resources. If a path does not exist, is inaccessible, or refers to -a root folder or space, it will not be included in the response. -At most 1,000 paths should be requested at once. - - -The maximum batch size for this endpoint is 1000. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**body** | List[GetByPathResourcesBatchRequestElement] | Body of the request | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**GetByPathResourcesBatchResponse** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# List[GetByPathResourcesBatchRequestElement] | Body of the request -body = [{"path": "/My Organization-abcd/My Important Project/My Dataset"}] -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.filesystem.Resource.get_by_path_batch(body, preview=preview) - print("The get_by_path_batch response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Resource.get_by_path_batch: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | GetByPathResourcesBatchResponse | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **markings** -List of Markings directly applied to a resource. The number of Markings on a resource is typically small -so the `pageSize` and `pageToken` parameters are not required. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**resource_rid** | ResourceRid | | | -**page_size** | Optional[PageSize] | The page size to use for the endpoint. | [optional] | -**page_token** | Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. | [optional] | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**ListMarkingsOfResourceResponse** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# ResourceRid -resource_rid = "ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da" -# Optional[PageSize] | The page size to use for the endpoint. -page_size = None -# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. -page_token = None -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - for resource in client.filesystem.Resource.markings( - resource_rid, page_size=page_size, page_token=page_token, preview=preview - ): - pprint(resource) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Resource.markings: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | ListMarkingsOfResourceResponse | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **permanently_delete** -Permanently delete the given resource from the trash. If the Resource is not directly trashed, a -`ResourceNotTrashed` error will be thrown. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**resource_rid** | ResourceRid | | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**None** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# ResourceRid -resource_rid = "ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da" -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.filesystem.Resource.permanently_delete(resource_rid, preview=preview) - print("The permanently_delete response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Resource.permanently_delete: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**204** | None | | None | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **remove_markings** -Removes Markings from a resource. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**resource_rid** | ResourceRid | | | -**marking_ids** | List[MarkingId] | | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**None** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# ResourceRid -resource_rid = "ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da" -# List[MarkingId] -marking_ids = ["18212f9a-0e63-4b79-96a0-aae04df23336"] -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.filesystem.Resource.remove_markings( - resource_rid, marking_ids=marking_ids, preview=preview - ) - print("The remove_markings response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Resource.remove_markings: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**204** | None | | None | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **restore** -Restore the given resource and any directly trashed ancestors from the trash. If the resource is not -trashed, this operation will be ignored. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**resource_rid** | ResourceRid | | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**None** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# ResourceRid -resource_rid = "ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da" -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.filesystem.Resource.restore(resource_rid, preview=preview) - print("The restore response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Resource.restore: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**204** | None | | None | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - diff --git a/docs/v2/Filesystem/ResourceRole.md b/docs/v2/Filesystem/ResourceRole.md deleted file mode 100644 index bdba7ff09..000000000 --- a/docs/v2/Filesystem/ResourceRole.md +++ /dev/null @@ -1,185 +0,0 @@ -# ResourceRole - -Method | HTTP request | Release Stage | -------------- | ------------- | ----- | -[**add**](#add) | **POST** /v2/filesystem/resources/{resourceRid}/roles/add | Stable | -[**list**](#list) | **GET** /v2/filesystem/resources/{resourceRid}/roles | Stable | -[**remove**](#remove) | **POST** /v2/filesystem/resources/{resourceRid}/roles/remove | Stable | - -# **add** - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**resource_rid** | ResourceRid | | | -**roles** | List[ResourceRoleIdentifier] | | | - -### Return type -**None** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# ResourceRid -resource_rid = "ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da" -# List[ResourceRoleIdentifier] -roles = [ - { - "resourceRolePrincipal": { - "type": "principalIdOnly", - "principalId": "f05f8da4-b84c-4fca-9c77-8af0b13d11de", - }, - "roleId": "8bf49052-dc37-4528-8bf0-b551cfb71268", - } -] - - -try: - api_response = client.filesystem.Resource.Role.add(resource_rid, roles=roles) - print("The add response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Role.add: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**204** | None | | None | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **list** -List the roles on a resource. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**resource_rid** | ResourceRid | | | -**include_inherited** | Optional[bool] | Whether to include inherited roles on the resource. | [optional] | -**page_size** | Optional[PageSize] | The page size to use for the endpoint. | [optional] | -**page_token** | Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. | [optional] | - -### Return type -**ListResourceRolesResponse** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# ResourceRid -resource_rid = "ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da" -# Optional[bool] | Whether to include inherited roles on the resource. -include_inherited = None -# Optional[PageSize] | The page size to use for the endpoint. -page_size = None -# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. -page_token = None - - -try: - for resource_role in client.filesystem.Resource.Role.list( - resource_rid, - include_inherited=include_inherited, - page_size=page_size, - page_token=page_token, - ): - pprint(resource_role) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Role.list: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | ListResourceRolesResponse | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **remove** - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**resource_rid** | ResourceRid | | | -**roles** | List[ResourceRoleIdentifier] | | | - -### Return type -**None** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# ResourceRid -resource_rid = "ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da" -# List[ResourceRoleIdentifier] -roles = [ - { - "resourceRolePrincipal": { - "type": "principalIdOnly", - "principalId": "f05f8da4-b84c-4fca-9c77-8af0b13d11de", - }, - "roleId": "8bf49052-dc37-4528-8bf0-b551cfb71268", - } -] - - -try: - api_response = client.filesystem.Resource.Role.remove(resource_rid, roles=roles) - print("The remove response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Role.remove: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**204** | None | | None | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - diff --git a/docs/v2/Filesystem/Space.md b/docs/v2/Filesystem/Space.md deleted file mode 100644 index 7db24496b..000000000 --- a/docs/v2/Filesystem/Space.md +++ /dev/null @@ -1,321 +0,0 @@ -# Space - -Method | HTTP request | Release Stage | -------------- | ------------- | ----- | -[**create**](#create) | **POST** /v2/filesystem/spaces | Private Beta | -[**delete**](#delete) | **DELETE** /v2/filesystem/spaces/{spaceRid} | Private Beta | -[**get**](#get) | **GET** /v2/filesystem/spaces/{spaceRid} | Private Beta | -[**list**](#list) | **GET** /v2/filesystem/spaces | Public Beta | -[**replace**](#replace) | **PUT** /v2/filesystem/spaces/{spaceRid} | Private Beta | - -# **create** -Creates a new Space. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**deletion_policy_organizations** | List[OrganizationRid] | By default, this Space will use a Last Out deletion policy, meaning that this Space and its projects will be deleted when the last Organization listed here is deleted. Only Organizations in the Space's Enrollment can be included here. | | -**display_name** | ResourceDisplayName | | | -**enrollment_rid** | EnrollmentRid | The RID of the Enrollment that this Space belongs to. | | -**organizations** | List[OrganizationRid] | The list of Organizations that are provisioned access to this Space. In order to access this Space, a user must be a member of at least one of these Organizations. | | -**default_role_set_id** | Optional[RoleSetId] | The ID of the default Role Set for this Space, which defines the set of roles that Projects in this Space must use. If not provided, the default Role Set for Projects will be used. | [optional] | -**description** | Optional[str] | The description of the Space. | [optional] | -**file_system_id** | Optional[FileSystemId] | The ID of the Filesystem for this Space, which is where the contents of the Space are stored. If not provided, the default Filesystem for this Enrollment will be used. | [optional] | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | -**usage_account_rid** | Optional[UsageAccountRid] | The RID of the Usage Account for this Space. Resource usage for projects in this space will accrue to this Usage Account by default. If not provided, the default Usage Account for this Enrollment will be used. | [optional] | - -### Return type -**Space** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# List[OrganizationRid] | By default, this Space will use a Last Out deletion policy, meaning that this Space and its projects will be deleted when the last Organization listed here is deleted. Only Organizations in the Space's Enrollment can be included here. -deletion_policy_organizations = ["ri.multipass..organization.c30ee6ad-b5e4-4afe-a74f-fe4a289f2faa"] -# ResourceDisplayName -display_name = "My Space" -# EnrollmentRid | The RID of the Enrollment that this Space belongs to. -enrollment_rid = "ri.control-panel.main.customer.466f812b-f974-4478-9d4f-90402cd3def6" -# List[OrganizationRid] | The list of Organizations that are provisioned access to this Space. In order to access this Space, a user must be a member of at least one of these Organizations. -organizations = ["ri.multipass..organization.c30ee6ad-b5e4-4afe-a74f-fe4a289f2faa"] -# Optional[RoleSetId] | The ID of the default Role Set for this Space, which defines the set of roles that Projects in this Space must use. If not provided, the default Role Set for Projects will be used. -default_role_set_id = "3181190f-f6b8-4649-90ec-64fa2d847204" -# Optional[str] | The description of the Space. -description = "This space is for xyz" -# Optional[FileSystemId] | The ID of the Filesystem for this Space, which is where the contents of the Space are stored. If not provided, the default Filesystem for this Enrollment will be used. -file_system_id = "hdfs" -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None -# Optional[UsageAccountRid] | The RID of the Usage Account for this Space. Resource usage for projects in this space will accrue to this Usage Account by default. If not provided, the default Usage Account for this Enrollment will be used. -usage_account_rid = ( - "ri.resource-policy-manager.global.usage-account.0c91194d-b5e3-4c4f-b96f-7a7f3f50e95c" -) - - -try: - api_response = client.filesystem.Space.create( - deletion_policy_organizations=deletion_policy_organizations, - display_name=display_name, - enrollment_rid=enrollment_rid, - organizations=organizations, - default_role_set_id=default_role_set_id, - description=description, - file_system_id=file_system_id, - preview=preview, - usage_account_rid=usage_account_rid, - ) - print("The create response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Space.create: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | Space | The created Space | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **delete** -Delete the space. This will only work if the Space is empty, meaning any Projects or Resources have been deleted first. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**space_rid** | SpaceRid | | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**None** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# SpaceRid -space_rid = None -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.filesystem.Space.delete(space_rid, preview=preview) - print("The delete response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Space.delete: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**204** | None | | None | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **get** -Get the Space with the specified rid. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**space_rid** | SpaceRid | | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**Space** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# SpaceRid -space_rid = None -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.filesystem.Space.get(space_rid, preview=preview) - print("The get response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Space.get: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | Space | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **list** -Lists all Spaces. - -This is a paged endpoint. Each page may be smaller or larger than the requested page size. However, it is guaranteed that if there are more results available, the `nextPageToken` field will be populated. To get the next page, make the same request again, but set the value of the `pageToken` query parameter to be value of the `nextPageToken` value of the previous response. If there is no `nextPageToken` field in the response, you are on the last page. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**page_size** | Optional[PageSize] | The page size to use for the endpoint. | [optional] | -**page_token** | Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. | [optional] | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**ListSpacesResponse** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# Optional[PageSize] | The page size to use for the endpoint. -page_size = None -# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. -page_token = None -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - for space in client.filesystem.Space.list( - page_size=page_size, page_token=page_token, preview=preview - ): - pprint(space) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Space.list: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | ListSpacesResponse | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **replace** -Replace the Space with the specified rid. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**space_rid** | SpaceRid | | | -**display_name** | ResourceDisplayName | | | -**default_role_set_id** | Optional[RoleSetId] | The ID of the default Role Set for this Space, which defines the set of roles that Projects in this Space must use. If not provided, the default Role Set for Projects will be used. | [optional] | -**description** | Optional[str] | The description of the Space. | [optional] | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | -**usage_account_rid** | Optional[UsageAccountRid] | The RID of the Usage Account for this Space. Resource usage for projects in this space will accrue to this Usage Account by default. If not provided, the default Usage Account for this Enrollment will be used. | [optional] | - -### Return type -**Space** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# SpaceRid -space_rid = None -# ResourceDisplayName -display_name = "My Space" -# Optional[RoleSetId] | The ID of the default Role Set for this Space, which defines the set of roles that Projects in this Space must use. If not provided, the default Role Set for Projects will be used. -default_role_set_id = "3181190f-f6b8-4649-90ec-64fa2d847204" -# Optional[str] | The description of the Space. -description = "This space is for xyz" -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None -# Optional[UsageAccountRid] | The RID of the Usage Account for this Space. Resource usage for projects in this space will accrue to this Usage Account by default. If not provided, the default Usage Account for this Enrollment will be used. -usage_account_rid = ( - "ri.resource-policy-manager.global.usage-account.0c91194d-b5e3-4c4f-b96f-7a7f3f50e95c" -) - - -try: - api_response = client.filesystem.Space.replace( - space_rid, - display_name=display_name, - default_role_set_id=default_role_set_id, - description=description, - preview=preview, - usage_account_rid=usage_account_rid, - ) - print("The replace response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Space.replace: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | Space | The replaced Space | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - diff --git a/docs/v2/Filesystem/models/AccessRequirements.md b/docs/v2/Filesystem/models/AccessRequirements.md deleted file mode 100644 index 3eaeee501..000000000 --- a/docs/v2/Filesystem/models/AccessRequirements.md +++ /dev/null @@ -1,14 +0,0 @@ -# AccessRequirements - -Access requirements for a resource are composed of Markings and Organizations. Organizations are disjunctive, -while Markings are conjunctive. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**organizations** | List[Organization] | Yes | | -**markings** | List[Marking] | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/AddMarkingsRequest.md b/docs/v2/Filesystem/models/AddMarkingsRequest.md deleted file mode 100644 index 5497c21bb..000000000 --- a/docs/v2/Filesystem/models/AddMarkingsRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# AddMarkingsRequest - -AddMarkingsRequest - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**marking_ids** | List[MarkingId] | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/AddOrganizationsRequest.md b/docs/v2/Filesystem/models/AddOrganizationsRequest.md deleted file mode 100644 index 6ed4d5d72..000000000 --- a/docs/v2/Filesystem/models/AddOrganizationsRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# AddOrganizationsRequest - -AddOrganizationsRequest - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**organization_rids** | List[OrganizationRid] | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/AddResourceRolesRequest.md b/docs/v2/Filesystem/models/AddResourceRolesRequest.md deleted file mode 100644 index 68cfe70ed..000000000 --- a/docs/v2/Filesystem/models/AddResourceRolesRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# AddResourceRolesRequest - -AddResourceRolesRequest - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**roles** | List[ResourceRoleIdentifier] | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/CreateFolderRequest.md b/docs/v2/Filesystem/models/CreateFolderRequest.md deleted file mode 100644 index 15958e104..000000000 --- a/docs/v2/Filesystem/models/CreateFolderRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# CreateFolderRequest - -CreateFolderRequest - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**parent_folder_rid** | FolderRid | Yes | The parent folder Resource Identifier (RID). For Projects, this will be the Space RID and for Spaces, this value will be the root folder (`ri.compass.main.folder.0`). | -**display_name** | ResourceDisplayName | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/CreateProjectFromTemplateRequest.md b/docs/v2/Filesystem/models/CreateProjectFromTemplateRequest.md deleted file mode 100644 index 78bfa8ea4..000000000 --- a/docs/v2/Filesystem/models/CreateProjectFromTemplateRequest.md +++ /dev/null @@ -1,15 +0,0 @@ -# CreateProjectFromTemplateRequest - -CreateProjectFromTemplateRequest - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**template_rid** | ProjectTemplateRid | Yes | | -**variable_values** | Dict[ProjectTemplateVariableId, ProjectTemplateVariableValue] | Yes | | -**default_roles** | Optional[List[RoleId]] | No | | -**organization_rids** | Optional[List[OrganizationRid]] | No | | -**project_description** | Optional[str] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/CreateProjectRequest.md b/docs/v2/Filesystem/models/CreateProjectRequest.md deleted file mode 100644 index f110bf5ef..000000000 --- a/docs/v2/Filesystem/models/CreateProjectRequest.md +++ /dev/null @@ -1,16 +0,0 @@ -# CreateProjectRequest - -CreateProjectRequest - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**display_name** | ResourceDisplayName | Yes | | -**description** | Optional[str] | No | | -**space_rid** | SpaceRid | Yes | | -**role_grants** | Dict[RoleId, List[PrincipalWithId]] | Yes | | -**default_roles** | List[RoleId] | Yes | | -**organization_rids** | List[OrganizationRid] | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/CreateSpaceRequest.md b/docs/v2/Filesystem/models/CreateSpaceRequest.md deleted file mode 100644 index 518a75789..000000000 --- a/docs/v2/Filesystem/models/CreateSpaceRequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# CreateSpaceRequest - -CreateSpaceRequest - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**enrollment_rid** | EnrollmentRid | Yes | The RID of the Enrollment that this Space belongs to. | -**usage_account_rid** | Optional[UsageAccountRid] | No | The RID of the Usage Account for this Space. Resource usage for projects in this space will accrue to this Usage Account by default. If not provided, the default Usage Account for this Enrollment will be used. | -**file_system_id** | Optional[FileSystemId] | No | The ID of the Filesystem for this Space, which is where the contents of the Space are stored. If not provided, the default Filesystem for this Enrollment will be used. | -**display_name** | ResourceDisplayName | Yes | | -**organizations** | List[OrganizationRid] | Yes | The list of Organizations that are provisioned access to this Space. In order to access this Space, a user must be a member of at least one of these Organizations. | -**description** | Optional[str] | No | The description of the Space. | -**deletion_policy_organizations** | List[OrganizationRid] | Yes | By default, this Space will use a Last Out deletion policy, meaning that this Space and its projects will be deleted when the last Organization listed here is deleted. Only Organizations in the Space's Enrollment can be included here. | -**default_role_set_id** | Optional[RoleSetId] | No | The ID of the default Role Set for this Space, which defines the set of roles that Projects in this Space must use. If not provided, the default Role Set for Projects will be used. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/Everyone.md b/docs/v2/Filesystem/models/Everyone.md deleted file mode 100644 index 1ffd40c8f..000000000 --- a/docs/v2/Filesystem/models/Everyone.md +++ /dev/null @@ -1,11 +0,0 @@ -# Everyone - -A principal representing all users of the platform. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["everyone"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/FileSystemId.md b/docs/v2/Filesystem/models/FileSystemId.md deleted file mode 100644 index 943d93907..000000000 --- a/docs/v2/Filesystem/models/FileSystemId.md +++ /dev/null @@ -1,11 +0,0 @@ -# FileSystemId - -The ID of the filesystem that will be used for all projects in the Space. - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/Folder.md b/docs/v2/Filesystem/models/Folder.md deleted file mode 100644 index 976f9da3f..000000000 --- a/docs/v2/Filesystem/models/Folder.md +++ /dev/null @@ -1,24 +0,0 @@ -# Folder - -Folder - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**rid** | FolderRid | Yes | | -**display_name** | ResourceDisplayName | Yes | | -**description** | Optional[str] | No | The description associated with the Folder. | -**documentation** | Optional[str] | No | The documentation associated with the Folder. | -**path** | ResourcePath | Yes | | -**type** | FolderType | Yes | | -**created_by** | CreatedBy | Yes | | -**updated_by** | UpdatedBy | Yes | | -**created_time** | CreatedTime | Yes | | -**updated_time** | UpdatedTime | Yes | | -**trash_status** | TrashStatus | Yes | The trash status of the Folder. If trashed, this could either be because the Folder itself has been trashed or because one of its ancestors has been trashed. | -**parent_folder_rid** | FolderRid | Yes | The parent folder Resource Identifier (RID). For Projects, this will be the Space RID and for Spaces, this value will be the root folder (`ri.compass.main.folder.0`). | -**project_rid** | Optional[ProjectRid] | No | The Project Resource Identifier (RID) that the Folder lives in. If the Folder is a Space, this value will not be defined. | -**space_rid** | SpaceRid | Yes | The Space Resource Identifier (RID) that the Folder lives in. If the Folder is a Space, this value will be the same as the Folder RID. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/FolderRid.md b/docs/v2/Filesystem/models/FolderRid.md deleted file mode 100644 index 028ea08d9..000000000 --- a/docs/v2/Filesystem/models/FolderRid.md +++ /dev/null @@ -1,11 +0,0 @@ -# FolderRid - -The unique resource identifier (RID) of a Folder. - -## Type -```python -RID -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/FolderType.md b/docs/v2/Filesystem/models/FolderType.md deleted file mode 100644 index 2cfe4eef9..000000000 --- a/docs/v2/Filesystem/models/FolderType.md +++ /dev/null @@ -1,15 +0,0 @@ -# FolderType - -A folder can be a regular Folder, a -[Project](https://palantir.com/docs/foundry/getting-started/projects-and-resources/#projects) or a -[Space](https://palantir.com/docs/foundry/security/orgs-and-spaces/#spaces). - - -| **Value** | -| --------- | -| `"FOLDER"` | -| `"SPACE"` | -| `"PROJECT"` | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/GetByPathResourcesBatchRequestElement.md b/docs/v2/Filesystem/models/GetByPathResourcesBatchRequestElement.md deleted file mode 100644 index fefb54929..000000000 --- a/docs/v2/Filesystem/models/GetByPathResourcesBatchRequestElement.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetByPathResourcesBatchRequestElement - -GetByPathResourcesBatchRequestElement - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**path** | ResourcePath | Yes | The path to the Resource. The leading slash is optional. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/GetByPathResourcesBatchResponse.md b/docs/v2/Filesystem/models/GetByPathResourcesBatchResponse.md deleted file mode 100644 index f1b2bf807..000000000 --- a/docs/v2/Filesystem/models/GetByPathResourcesBatchResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetByPathResourcesBatchResponse - -GetByPathResourcesBatchResponse - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**data** | List[Resource] | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/GetFoldersBatchRequestElement.md b/docs/v2/Filesystem/models/GetFoldersBatchRequestElement.md deleted file mode 100644 index 2c8d1125c..000000000 --- a/docs/v2/Filesystem/models/GetFoldersBatchRequestElement.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetFoldersBatchRequestElement - -GetFoldersBatchRequestElement - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**folder_rid** | FolderRid | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/GetFoldersBatchResponse.md b/docs/v2/Filesystem/models/GetFoldersBatchResponse.md deleted file mode 100644 index daa100bb3..000000000 --- a/docs/v2/Filesystem/models/GetFoldersBatchResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetFoldersBatchResponse - -GetFoldersBatchResponse - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**data** | Dict[FolderRid, Folder] | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/GetResourcesBatchRequestElement.md b/docs/v2/Filesystem/models/GetResourcesBatchRequestElement.md deleted file mode 100644 index 60696998b..000000000 --- a/docs/v2/Filesystem/models/GetResourcesBatchRequestElement.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetResourcesBatchRequestElement - -GetResourcesBatchRequestElement - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**resource_rid** | ResourceRid | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/GetResourcesBatchResponse.md b/docs/v2/Filesystem/models/GetResourcesBatchResponse.md deleted file mode 100644 index fe0bc8172..000000000 --- a/docs/v2/Filesystem/models/GetResourcesBatchResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetResourcesBatchResponse - -GetResourcesBatchResponse - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**data** | Dict[ResourceRid, Resource] | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/IsDirectlyApplied.md b/docs/v2/Filesystem/models/IsDirectlyApplied.md deleted file mode 100644 index 5f2e66b66..000000000 --- a/docs/v2/Filesystem/models/IsDirectlyApplied.md +++ /dev/null @@ -1,13 +0,0 @@ -# IsDirectlyApplied - -Boolean flag to indicate if the marking is directly applied to the resource, or if it's applied -to a parent resource and inherited by the current resource. - - -## Type -```python -bool -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/ListChildrenOfFolderResponse.md b/docs/v2/Filesystem/models/ListChildrenOfFolderResponse.md deleted file mode 100644 index ac37ac6df..000000000 --- a/docs/v2/Filesystem/models/ListChildrenOfFolderResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListChildrenOfFolderResponse - -ListChildrenOfFolderResponse - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**data** | List[Resource] | Yes | | -**next_page_token** | Optional[PageToken] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/ListMarkingsOfResourceResponse.md b/docs/v2/Filesystem/models/ListMarkingsOfResourceResponse.md deleted file mode 100644 index 31cf01be8..000000000 --- a/docs/v2/Filesystem/models/ListMarkingsOfResourceResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListMarkingsOfResourceResponse - -ListMarkingsOfResourceResponse - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**data** | List[MarkingId] | Yes | | -**next_page_token** | Optional[PageToken] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/ListOrganizationsOfProjectResponse.md b/docs/v2/Filesystem/models/ListOrganizationsOfProjectResponse.md deleted file mode 100644 index d79de029e..000000000 --- a/docs/v2/Filesystem/models/ListOrganizationsOfProjectResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListOrganizationsOfProjectResponse - -ListOrganizationsOfProjectResponse - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**data** | List[OrganizationRid] | Yes | | -**next_page_token** | Optional[PageToken] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/ListResourceRolesResponse.md b/docs/v2/Filesystem/models/ListResourceRolesResponse.md deleted file mode 100644 index d7191253f..000000000 --- a/docs/v2/Filesystem/models/ListResourceRolesResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListResourceRolesResponse - -ListResourceRolesResponse - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**data** | List[ResourceRole] | Yes | | -**next_page_token** | Optional[PageToken] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/ListSpacesResponse.md b/docs/v2/Filesystem/models/ListSpacesResponse.md deleted file mode 100644 index 949359bde..000000000 --- a/docs/v2/Filesystem/models/ListSpacesResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListSpacesResponse - -ListSpacesResponse - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**data** | List[Space] | Yes | | -**next_page_token** | Optional[PageToken] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/Marking.md b/docs/v2/Filesystem/models/Marking.md deleted file mode 100644 index 3dafc3f10..000000000 --- a/docs/v2/Filesystem/models/Marking.md +++ /dev/null @@ -1,16 +0,0 @@ -# Marking - -[Markings](https://palantir.com/docs/foundry/security/markings/) provide an additional level of access control for files, -folders, and Projects within Foundry. Markings define eligibility criteria that restrict visibility -and actions to users who meet those criteria. To access a resource, a user must be a member of all -Markings applied to a resource to access it. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**marking_id** | MarkingId | Yes | | -**is_directly_applied** | IsDirectlyApplied | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/Organization.md b/docs/v2/Filesystem/models/Organization.md deleted file mode 100644 index 1d9bb7a03..000000000 --- a/docs/v2/Filesystem/models/Organization.md +++ /dev/null @@ -1,18 +0,0 @@ -# Organization - -[Organizations](https://palantir.com/docs/foundry/security/orgs-and-spaces/#organizations) are access requirements applied to -Projects that enforce strict silos between groups of users and resources. Every user is a member of only -one Organization, but can be a guest member of multiple Organizations. In order to meet access requirements, -users must be a member or guest member of at least one Organization applied to a Project. -Organizations are inherited via the file hierarchy and direct dependencies. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**marking_id** | MarkingId | Yes | | -**organization_rid** | OrganizationRid | Yes | | -**is_directly_applied** | IsDirectlyApplied | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/PrincipalIdOnly.md b/docs/v2/Filesystem/models/PrincipalIdOnly.md deleted file mode 100644 index a04af1256..000000000 --- a/docs/v2/Filesystem/models/PrincipalIdOnly.md +++ /dev/null @@ -1,12 +0,0 @@ -# PrincipalIdOnly - -Represents a principal with just an ID, without the type. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**principal_id** | PrincipalId | Yes | | -**type** | Literal["principalIdOnly"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/PrincipalWithId.md b/docs/v2/Filesystem/models/PrincipalWithId.md deleted file mode 100644 index b57f96713..000000000 --- a/docs/v2/Filesystem/models/PrincipalWithId.md +++ /dev/null @@ -1,13 +0,0 @@ -# PrincipalWithId - -Represents a user principal or group principal with an ID. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**principal_id** | PrincipalId | Yes | | -**principal_type** | PrincipalType | Yes | | -**type** | Literal["principalWithId"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/Project.md b/docs/v2/Filesystem/models/Project.md deleted file mode 100644 index 35108ad94..000000000 --- a/docs/v2/Filesystem/models/Project.md +++ /dev/null @@ -1,21 +0,0 @@ -# Project - -Project - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**rid** | ProjectRid | Yes | | -**display_name** | ResourceDisplayName | Yes | The display name of the Project. Must be unique and cannot contain a / | -**description** | Optional[str] | No | The description associated with the Project. | -**documentation** | Optional[str] | No | The documentation associated with the Project. | -**path** | ResourcePath | Yes | | -**created_by** | CreatedBy | Yes | | -**updated_by** | UpdatedBy | Yes | | -**created_time** | CreatedTime | Yes | | -**updated_time** | UpdatedTime | Yes | | -**trash_status** | TrashStatus | Yes | The trash status of the Project. | -**space_rid** | SpaceRid | Yes | The Space Resource Identifier (RID) that the Project lives in. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/ProjectRid.md b/docs/v2/Filesystem/models/ProjectRid.md deleted file mode 100644 index aea3cfd6b..000000000 --- a/docs/v2/Filesystem/models/ProjectRid.md +++ /dev/null @@ -1,11 +0,0 @@ -# ProjectRid - -The unique resource identifier (RID) of a Project. - -## Type -```python -RID -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/ProjectTemplateRid.md b/docs/v2/Filesystem/models/ProjectTemplateRid.md deleted file mode 100644 index 0fdad97ec..000000000 --- a/docs/v2/Filesystem/models/ProjectTemplateRid.md +++ /dev/null @@ -1,11 +0,0 @@ -# ProjectTemplateRid - -The unique resource identifier (RID) of a project template. - -## Type -```python -RID -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/ProjectTemplateVariableId.md b/docs/v2/Filesystem/models/ProjectTemplateVariableId.md deleted file mode 100644 index bf2634f36..000000000 --- a/docs/v2/Filesystem/models/ProjectTemplateVariableId.md +++ /dev/null @@ -1,11 +0,0 @@ -# ProjectTemplateVariableId - -An identifier for a variable used in a project template. - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/ProjectTemplateVariableValue.md b/docs/v2/Filesystem/models/ProjectTemplateVariableValue.md deleted file mode 100644 index d9b6d172c..000000000 --- a/docs/v2/Filesystem/models/ProjectTemplateVariableValue.md +++ /dev/null @@ -1,11 +0,0 @@ -# ProjectTemplateVariableValue - -The value assigned to a variable used in a project template. - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/RemoveMarkingsRequest.md b/docs/v2/Filesystem/models/RemoveMarkingsRequest.md deleted file mode 100644 index 0c442d255..000000000 --- a/docs/v2/Filesystem/models/RemoveMarkingsRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# RemoveMarkingsRequest - -RemoveMarkingsRequest - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**marking_ids** | List[MarkingId] | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/RemoveOrganizationsRequest.md b/docs/v2/Filesystem/models/RemoveOrganizationsRequest.md deleted file mode 100644 index e4e88fbda..000000000 --- a/docs/v2/Filesystem/models/RemoveOrganizationsRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# RemoveOrganizationsRequest - -RemoveOrganizationsRequest - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**organization_rids** | List[OrganizationRid] | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/RemoveResourceRolesRequest.md b/docs/v2/Filesystem/models/RemoveResourceRolesRequest.md deleted file mode 100644 index bd8a23062..000000000 --- a/docs/v2/Filesystem/models/RemoveResourceRolesRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# RemoveResourceRolesRequest - -RemoveResourceRolesRequest - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**roles** | List[ResourceRoleIdentifier] | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/ReplaceProjectRequest.md b/docs/v2/Filesystem/models/ReplaceProjectRequest.md deleted file mode 100644 index 7527ff53f..000000000 --- a/docs/v2/Filesystem/models/ReplaceProjectRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# ReplaceProjectRequest - -ReplaceProjectRequest - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**display_name** | ResourceDisplayName | Yes | The display name of the Project. Must be unique and cannot contain a / | -**description** | Optional[str] | No | The description associated with the Project. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/ReplaceSpaceRequest.md b/docs/v2/Filesystem/models/ReplaceSpaceRequest.md deleted file mode 100644 index e93715625..000000000 --- a/docs/v2/Filesystem/models/ReplaceSpaceRequest.md +++ /dev/null @@ -1,14 +0,0 @@ -# ReplaceSpaceRequest - -ReplaceSpaceRequest - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**usage_account_rid** | Optional[UsageAccountRid] | No | The RID of the Usage Account for this Space. Resource usage for projects in this space will accrue to this Usage Account by default. If not provided, the default Usage Account for this Enrollment will be used. | -**display_name** | ResourceDisplayName | Yes | | -**description** | Optional[str] | No | The description of the Space. | -**default_role_set_id** | Optional[RoleSetId] | No | The ID of the default Role Set for this Space, which defines the set of roles that Projects in this Space must use. If not provided, the default Role Set for Projects will be used. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/Resource.md b/docs/v2/Filesystem/models/Resource.md deleted file mode 100644 index 2cf130f62..000000000 --- a/docs/v2/Filesystem/models/Resource.md +++ /dev/null @@ -1,24 +0,0 @@ -# Resource - -Resource - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**rid** | ResourceRid | Yes | | -**display_name** | ResourceDisplayName | Yes | The display name of the Resource | -**description** | Optional[str] | No | The description of the Resource | -**documentation** | Optional[str] | No | The documentation associated with the Resource | -**path** | ResourcePath | Yes | The full path to the resource, including the resource name itself | -**type** | ResourceType | Yes | The type of the Resource derived from the Resource Identifier (RID). | -**created_by** | CreatedBy | Yes | The user that created the Resource. | -**updated_by** | UpdatedBy | Yes | The user that last updated the Resource. | -**created_time** | CreatedTime | Yes | The timestamp that the Resource was last created. | -**updated_time** | UpdatedTime | Yes | The timestamp that the Resource was last modified. For folders, this includes any of its descendants. For top level folders (spaces and projects), this is not updated by child updates for performance reasons. | -**trash_status** | TrashStatus | Yes | The trash status of the Resource. If trashed, this could either be because the Resource itself has been trashed or because one of its ancestors has been trashed. | -**parent_folder_rid** | FolderRid | Yes | The parent folder Resource Identifier (RID). For projects, this will be the Space RID. | -**project_rid** | ProjectRid | Yes | The Project Resource Identifier (RID) that the Resource lives in. If the Resource itself is a Project, this value will still be populated with the Project RID. | -**space_rid** | SpaceRid | Yes | The Space Resource Identifier (RID) that the Resource lives in. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/ResourceDisplayName.md b/docs/v2/Filesystem/models/ResourceDisplayName.md deleted file mode 100644 index 08fec0025..000000000 --- a/docs/v2/Filesystem/models/ResourceDisplayName.md +++ /dev/null @@ -1,11 +0,0 @@ -# ResourceDisplayName - -The display name of the Resource - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/ResourcePath.md b/docs/v2/Filesystem/models/ResourcePath.md deleted file mode 100644 index 45b08d0c1..000000000 --- a/docs/v2/Filesystem/models/ResourcePath.md +++ /dev/null @@ -1,11 +0,0 @@ -# ResourcePath - -The full path to the resource, including the resource name itself - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/ResourceRid.md b/docs/v2/Filesystem/models/ResourceRid.md deleted file mode 100644 index 747b707fb..000000000 --- a/docs/v2/Filesystem/models/ResourceRid.md +++ /dev/null @@ -1,11 +0,0 @@ -# ResourceRid - -The unique resource identifier (RID) of a Resource. - -## Type -```python -RID -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/ResourceRole.md b/docs/v2/Filesystem/models/ResourceRole.md deleted file mode 100644 index 74d1c340a..000000000 --- a/docs/v2/Filesystem/models/ResourceRole.md +++ /dev/null @@ -1,12 +0,0 @@ -# ResourceRole - -ResourceRole - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**resource_role_principal** | ResourceRolePrincipal | Yes | | -**role_id** | RoleId | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/ResourceRoleIdentifier.md b/docs/v2/Filesystem/models/ResourceRoleIdentifier.md deleted file mode 100644 index 1ea1e7580..000000000 --- a/docs/v2/Filesystem/models/ResourceRoleIdentifier.md +++ /dev/null @@ -1,12 +0,0 @@ -# ResourceRoleIdentifier - -A role grant on a resource for add/remove operations that doesn't require specifying the principal type. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**resource_role_principal** | ResourceRolePrincipalIdentifier | Yes | | -**role_id** | RoleId | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/ResourceRolePrincipal.md b/docs/v2/Filesystem/models/ResourceRolePrincipal.md deleted file mode 100644 index df24a7d4f..000000000 --- a/docs/v2/Filesystem/models/ResourceRolePrincipal.md +++ /dev/null @@ -1,16 +0,0 @@ -# ResourceRolePrincipal - -ResourceRolePrincipal - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -PrincipalWithId | principalWithId -Everyone | everyone - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/ResourceRolePrincipalIdentifier.md b/docs/v2/Filesystem/models/ResourceRolePrincipalIdentifier.md deleted file mode 100644 index d07f1bd43..000000000 --- a/docs/v2/Filesystem/models/ResourceRolePrincipalIdentifier.md +++ /dev/null @@ -1,16 +0,0 @@ -# ResourceRolePrincipalIdentifier - -A principal for resource role operations that doesn't require specifying the principal type. - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -PrincipalIdOnly | principalIdOnly -Everyone | everyone - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/ResourceType.md b/docs/v2/Filesystem/models/ResourceType.md deleted file mode 100644 index 806871155..000000000 --- a/docs/v2/Filesystem/models/ResourceType.md +++ /dev/null @@ -1,94 +0,0 @@ -# ResourceType - -The type of the Resource derived from the Resource Identifier (RID). - -| **Value** | -| --------- | -| `"AIP_PROFILE"` | -| `"AIP_AGENTS_AGENT"` | -| `"AIP_AGENTS_SESSION"` | -| `"AIP_ASSIST_FLOW_CAPTURE"` | -| `"AIP_ASSIST_WALKTHROUGH"` | -| `"ARTIFACTS_REPOSITORY"` | -| `"BELLASO_CIPHER_CHANNEL"` | -| `"BELLASO_CIPHER_LICENSE"` | -| `"BLACKSMITH_DOCUMENT"` | -| `"BLOBSTER_ARCHIVE"` | -| `"BLOBSTER_AUDIO"` | -| `"BLOBSTER_BLOB"` | -| `"BLOBSTER_CODE"` | -| `"BLOBSTER_CONFIGURATION"` | -| `"BLOBSTER_DOCUMENT"` | -| `"BLOBSTER_IMAGE"` | -| `"BLOBSTER_JUPYTERNOTEBOOK"` | -| `"BLOBSTER_PDF"` | -| `"BLOBSTER_PRESENTATION"` | -| `"BLOBSTER_SPREADSHEET"` | -| `"BLOBSTER_VIDEO"` | -| `"BLOBSTER_XML"` | -| `"CARBON_WORKSPACE"` | -| `"COMPASS_FOLDER"` | -| `"COMPASS_WEB_LINK"` | -| `"CONTOUR_ANALYSIS"` | -| `"DATA_HEALTH_MONITORING_VIEW"` | -| `"DECISIONS_EXPLORATION"` | -| `"DREDDIE_PIPELINE"` | -| `"EDDIE_LOGIC"` | -| `"EDDIE_PIPELINE"` | -| `"FFORMS_FORM"` | -| `"FLOW_WORKFLOW"` | -| `"FOUNDRY_DATASET"` | -| `"FOUNDRY_DEPLOYED_APP"` | -| `"FOUNDRY_ACADEMY_TUTORIAL"` | -| `"FOUNDRY_CONTAINER_SERVICE_CONTAINER"` | -| `"FOUNDRY_ML_OBJECTIVE"` | -| `"FOUNDRY_TEMPLATES_TEMPLATE"` | -| `"FUSION_DOCUMENT"` | -| `"GEOTIME_CATALOG_INTEGRATION"` | -| `"GPS_VIEW"` | -| `"HUBBLE_EXPLORATION_LAYOUT"` | -| `"HYPERAUTO_INTEGRATION"` | -| `"LOGIC_FLOWS_CONNECTED_FLOW"` | -| `"MACHINERY_DOCUMENT"` | -| `"MAGRITTE_AGENT"` | -| `"MAGRITTE_DRIVER"` | -| `"MAGRITTE_EXPORT"` | -| `"MAGRITTE_SOURCE"` | -| `"MARKETPLACE_BLOCK_SET_INSTALLATION"` | -| `"MARKETPLACE_BLOCK_SET_REPO"` | -| `"MARKETPLACE_LOCAL"` | -| `"MARKETPLACE_REMOTE_STORE"` | -| `"MIO_MEDIA_SET"` | -| `"MODELS_MODEL"` | -| `"MODELS_MODEL_VERSION"` | -| `"MONOCLE_GRAPH"` | -| `"NOTEPAD_NOTEPAD"` | -| `"NOTEPAD_NOTEPAD_TEMPLATE"` | -| `"OBJECT_SENTINEL_MONITOR"` | -| `"OBJECT_SET_VERSIONED_OBJECT_SET"` | -| `"OPUS_GRAPH"` | -| `"OPUS_GRAPH_TEMPLATE"` | -| `"OPUS_MAP"` | -| `"OPUS_MAP_LAYER"` | -| `"OPUS_MAP_TEMPLATE"` | -| `"OPUS_SEARCH_AROUND"` | -| `"QUIVER_ANALYSIS"` | -| `"QUIVER_ARTIFACT"` | -| `"QUIVER_DASHBOARD"` | -| `"QUIVER_FUNCTION"` | -| `"QUIVER_OBJECT_SET_PATH"` | -| `"REPORT_REPORT"` | -| `"SLATE_DOCUMENT"` | -| `"SOLUTION_DESIGN_DIAGRAM"` | -| `"STEMMA_REPOSITORY"` | -| `"TABLES_TABLE"` | -| `"TAURUS_WORKFLOW"` | -| `"THIRD_PARTY_APPLICATIONS_APPLICATION"` | -| `"TIME_SERIES_CATALOG_SYNC"` | -| `"VECTOR_TEMPLATE"` | -| `"VECTOR_WORKBOOK"` | -| `"WORKSHOP_MODULE"` | -| `"WORKSHOP_STATE"` | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/Space.md b/docs/v2/Filesystem/models/Space.md deleted file mode 100644 index 0ccdee34f..000000000 --- a/docs/v2/Filesystem/models/Space.md +++ /dev/null @@ -1,20 +0,0 @@ -# Space - -Space - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**rid** | SpaceRid | Yes | | -**display_name** | ResourceDisplayName | Yes | | -**description** | Optional[str] | No | The description of the Space. | -**path** | ResourcePath | Yes | | -**file_system_id** | FileSystemId | Yes | The ID of the Filesystem for this Space, which is where the contents of the Space are stored. If not provided, the default Filesystem for this Enrollment will be used. | -**usage_account_rid** | UsageAccountRid | Yes | The RID of the Usage Account for this Space. Resource usage for projects in this space will accrue to this Usage Account by default. If not provided, the default Usage Account for this Enrollment will be used. | -**organizations** | List[OrganizationRid] | Yes | The list of Organizations that are provisioned access to this Space. In order to access this Space, a user must be a member of at least one of these Organizations. | -**deletion_policy_organizations** | List[OrganizationRid] | Yes | By default, this Space will use a Last Out deletion policy, meaning that this Space and its projects will be deleted when the last Organization listed here is deleted. Only Organizations in the Space's Enrollment can be included here. | -**default_role_set_id** | RoleSetId | Yes | The ID of the default Role Set for this Space, which defines the set of roles that Projects in this Space must use. If not provided, the default Role Set for Projects will be used. | -**space_maven_identifier** | Optional[SpaceMavenIdentifier] | No | The maven identifier used as the prefix to the maven coordinate that uniquely identifies resources published from this space. This is only present if configured in control panel in the space settings. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/SpaceMavenIdentifier.md b/docs/v2/Filesystem/models/SpaceMavenIdentifier.md deleted file mode 100644 index 00f1a5f3a..000000000 --- a/docs/v2/Filesystem/models/SpaceMavenIdentifier.md +++ /dev/null @@ -1,12 +0,0 @@ -# SpaceMavenIdentifier - -The maven identifier used as the prefix to the maven coordinate that uniquely identifies resources published from this space. - - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/SpaceRid.md b/docs/v2/Filesystem/models/SpaceRid.md deleted file mode 100644 index ab1669a51..000000000 --- a/docs/v2/Filesystem/models/SpaceRid.md +++ /dev/null @@ -1,11 +0,0 @@ -# SpaceRid - -The unique resource identifier (RID) of a Space. - -## Type -```python -RID -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/TrashStatus.md b/docs/v2/Filesystem/models/TrashStatus.md deleted file mode 100644 index 2a81d0fa5..000000000 --- a/docs/v2/Filesystem/models/TrashStatus.md +++ /dev/null @@ -1,12 +0,0 @@ -# TrashStatus - -TrashStatus - -| **Value** | -| --------- | -| `"DIRECTLY_TRASHED"` | -| `"ANCESTOR_TRASHED"` | -| `"NOT_TRASHED"` | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/UsageAccountRid.md b/docs/v2/Filesystem/models/UsageAccountRid.md deleted file mode 100644 index 8aab252ac..000000000 --- a/docs/v2/Filesystem/models/UsageAccountRid.md +++ /dev/null @@ -1,12 +0,0 @@ -# UsageAccountRid - -The unique resource identifier (RID) of the usage account that will be used as a default on project creation. - - -## Type -```python -RID -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/Query.md b/docs/v2/Functions/Query.md deleted file mode 100644 index 6143356fd..000000000 --- a/docs/v2/Functions/Query.md +++ /dev/null @@ -1,306 +0,0 @@ -# Query - -Method | HTTP request | Release Stage | -------------- | ------------- | ----- | -[**execute**](#execute) | **POST** /v2/functions/queries/{queryApiName}/execute | Private Beta | -[**get**](#get) | **GET** /v2/functions/queries/{queryApiName} | Private Beta | -[**get_by_rid**](#get_by_rid) | **POST** /v2/functions/queries/getByRid | Private Beta | -[**streaming_execute**](#streaming_execute) | **POST** /v2/functions/queries/{queryApiName}/streamingExecute | Private Beta | - -# **execute** -Executes a Query using the given parameters. By default, this executes the latest version of the query. - -This endpoint is maintained for backward compatibility only. - -For all new implementations, use the `streamingExecute` endpoint, which supports all function types -and provides enhanced functionality. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**query_api_name** | QueryApiName | | | -**parameters** | Dict[ParameterId, Optional[DataValue]] | | | -**attribution** | Optional[Attribution] | | [optional] | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | -**trace_parent** | Optional[TraceParent] | | [optional] | -**trace_state** | Optional[TraceState] | | [optional] | -**transaction_id** | Optional[TransactionId] | The ID of a transaction to read from. Transactions are an experimental feature and all workflows may not be supported. | [optional] | -**version** | Optional[FunctionVersion] | | [optional] | - -### Return type -**ExecuteQueryResponse** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# QueryApiName -query_api_name = None -# Dict[ParameterId, Optional[DataValue]] -parameters = None -# Optional[Attribution] -attribution = None -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None -# Optional[TraceParent] -trace_parent = None -# Optional[TraceState] -trace_state = None -# Optional[TransactionId] | The ID of a transaction to read from. Transactions are an experimental feature and all workflows may not be supported. -transaction_id = None -# Optional[FunctionVersion] -version = None - - -try: - api_response = client.functions.Query.execute( - query_api_name, - parameters=parameters, - attribution=attribution, - preview=preview, - trace_parent=trace_parent, - trace_state=trace_state, - transaction_id=transaction_id, - version=version, - ) - print("The execute response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Query.execute: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | ExecuteQueryResponse | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **get** -Gets a specific query type with the given API name. By default, this gets the latest version of the query. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**query_api_name** | QueryApiName | | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | -**version** | Optional[FunctionVersion] | | [optional] | - -### Return type -**Query** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# QueryApiName -query_api_name = None -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None -# Optional[FunctionVersion] -version = None - - -try: - api_response = client.functions.Query.get(query_api_name, preview=preview, version=version) - print("The get response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Query.get: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | Query | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **get_by_rid** -Gets a specific query type with the given RID.By default, this gets the latest version of the query. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**rid** | FunctionRid | | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | -**version** | Optional[FunctionVersion] | | [optional] | - -### Return type -**Query** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# FunctionRid -rid = None -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None -# Optional[FunctionVersion] -version = None - - -try: - api_response = client.functions.Query.get_by_rid(rid=rid, preview=preview, version=version) - print("The get_by_rid response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Query.get_by_rid: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | Query | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **streaming_execute** -Executes a Query using the given parameters, returning results as an NDJSON stream. By default, this executes the latest version of the query. - -This endpoint supports all Query functions. The endpoint name 'streamingExecute' refers to the NDJSON -streaming response format. Both streaming and non-streaming functions can use this endpoint. -Non-streaming functions return a single-line NDJSON response, while streaming functions return multi-line NDJSON responses. -This is the recommended endpoint for all query execution. - -The response is returned as a binary stream in NDJSON (Newline Delimited JSON) format, where each line -is a StreamingExecuteQueryResponse containing either a data batch or an error. - -For a function returning a list of 5 records with a batch size of 3, the response stream would contain -two lines. The first line contains the first 3 items, and the second line contains the remaining 2 items: - -``` -{"type":"data","value":[{"productId":"SKU-001","price":29.99},{"productId":"SKU-002","price":49.99},{"productId":"SKU-003","price":19.99}]} -{"type":"data","value":[{"productId":"SKU-004","price":39.99},{"productId":"SKU-005","price":59.99}]} -``` - -Each line is a separate JSON object followed by a newline character. Clients should parse the stream -line-by-line to process results as they arrive. If an error occurs during execution, the stream will -contain an error line: - -``` -{"type":"error","errorCode":"INVALID_ARGUMENT","errorName":"QueryRuntimeError","errorInstanceId":"3f8a9c7b-2e4d-4a1f-9b8c-7d6e5f4a3b2c","errorDescription":"Division by zero","parameters":{}} -``` - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**query_api_name** | QueryApiName | | | -**parameters** | Dict[ParameterId, Optional[DataValue]] | | | -**attribution** | Optional[Attribution] | | [optional] | -**ontology** | Optional[OntologyIdentifier] | Optional ontology identifier (RID or API name). When provided, executes an ontology-scoped function. When omitted, executes a global function. | [optional] | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | -**trace_parent** | Optional[TraceParent] | | [optional] | -**trace_state** | Optional[TraceState] | | [optional] | -**transaction_id** | Optional[TransactionId] | The ID of a transaction to read from. Transactions are an experimental feature and all workflows may not be supported. | [optional] | -**version** | Optional[FunctionVersion] | | [optional] | - -### Return type -**bytes** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# QueryApiName -query_api_name = None -# Dict[ParameterId, Optional[DataValue]] -parameters = None -# Optional[Attribution] -attribution = None -# Optional[OntologyIdentifier] | Optional ontology identifier (RID or API name). When provided, executes an ontology-scoped function. When omitted, executes a global function. -ontology = "example-ontology" -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None -# Optional[TraceParent] -trace_parent = None -# Optional[TraceState] -trace_state = None -# Optional[TransactionId] | The ID of a transaction to read from. Transactions are an experimental feature and all workflows may not be supported. -transaction_id = None -# Optional[FunctionVersion] -version = None - - -try: - api_response = client.functions.Query.streaming_execute( - query_api_name, - parameters=parameters, - attribution=attribution, - ontology=ontology, - preview=preview, - trace_parent=trace_parent, - trace_state=trace_state, - transaction_id=transaction_id, - version=version, - ) - print("The streaming_execute response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Query.streaming_execute: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | bytes | | application/octet-stream | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - diff --git a/docs/v2/Functions/ValueType.md b/docs/v2/Functions/ValueType.md deleted file mode 100644 index 690f3d313..000000000 --- a/docs/v2/Functions/ValueType.md +++ /dev/null @@ -1,57 +0,0 @@ -# ValueType - -Method | HTTP request | Release Stage | -------------- | ------------- | ----- | -[**get**](#get) | **GET** /v2/functions/valueTypes/{valueTypeRid} | Private Beta | - -# **get** -Gets a specific value type with the given RID. The latest version is returned. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**value_type_rid** | ValueTypeRid | | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**ValueType** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# ValueTypeRid -value_type_rid = None -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.functions.ValueType.get(value_type_rid, preview=preview) - print("The get response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling ValueType.get: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | ValueType | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - diff --git a/docs/v2/Functions/VersionId.md b/docs/v2/Functions/VersionId.md deleted file mode 100644 index 63712bc86..000000000 --- a/docs/v2/Functions/VersionId.md +++ /dev/null @@ -1,62 +0,0 @@ -# VersionId - -Method | HTTP request | Release Stage | -------------- | ------------- | ----- | -[**get**](#get) | **GET** /v2/functions/valueTypes/{valueTypeRid}/versionIds/{versionIdVersionId} | Private Beta | - -# **get** -Gets a specific value type with the given RID. The specified version is returned. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**value_type_rid** | ValueTypeRid | | | -**version_id_version_id** | ValueTypeVersionId | | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**VersionId** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# ValueTypeRid -value_type_rid = None -# ValueTypeVersionId -version_id_version_id = None -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.functions.ValueType.VersionId.get( - value_type_rid, version_id_version_id, preview=preview - ) - print("The get response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling VersionId.get: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | VersionId | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - diff --git a/docs/v2/Functions/models/ArrayConstraint.md b/docs/v2/Functions/models/ArrayConstraint.md deleted file mode 100644 index 3097e6e5a..000000000 --- a/docs/v2/Functions/models/ArrayConstraint.md +++ /dev/null @@ -1,15 +0,0 @@ -# ArrayConstraint - -ArrayConstraint - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**minimum_size** | Optional[int] | No | | -**maximum_size** | Optional[int] | No | | -**unique_values** | bool | Yes | | -**value_constraint** | Optional[ValueTypeConstraint] | No | | -**type** | Literal["array"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/DataValue.md b/docs/v2/Functions/models/DataValue.md deleted file mode 100644 index 090ea1b58..000000000 --- a/docs/v2/Functions/models/DataValue.md +++ /dev/null @@ -1,33 +0,0 @@ -# DataValue - -Represents the value of data in the following format. Note that these values can be nested, for example an array of structs. -| Type | JSON encoding | Example | -|-----------------------------|-------------------------------------------------------|-------------------------------------------------------------------------------| -| Array | array | `["alpha", "bravo", "charlie"]` | -| Attachment | string | `"ri.attachments.main.attachment.2f944bae-5851-4204-8615-920c969a9f2e"` | -| Boolean | boolean | `true` | -| Byte | number | `31` | -| Date | ISO 8601 extended local date string | `"2021-05-01"` | -| Decimal | string | `"2.718281828"` | -| Float | number | `3.14159265` | -| Double | number | `3.14159265` | -| Integer | number | `238940` | -| Long | string | `"58319870951433"` | -| Marking | string | `"MU"` | -| Null | null | `null` | -| Set | array | `["alpha", "bravo", "charlie"]` | -| Short | number | `8739` | -| String | string | `"Call me Ishmael"` | -| Struct | JSON object | `{"name": "John Doe", "age": 42}` | -| TwoDimensionalAggregation | JSON object | `{"groups": [{"key": "alpha", "value": 100}, {"key": "beta", "value": 101}]}` | -| ThreeDimensionalAggregation | JSON object | `{"groups": [{"key": "NYC", "groups": [{"key": "Engineer", "value" : 100}]}]}`| -| Timestamp | ISO 8601 extended offset date-time string in UTC zone | `"2021-01-04T05:00:00Z"` | - - -## Type -```python -Any -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/EnumConstraint.md b/docs/v2/Functions/models/EnumConstraint.md deleted file mode 100644 index 51e637f21..000000000 --- a/docs/v2/Functions/models/EnumConstraint.md +++ /dev/null @@ -1,12 +0,0 @@ -# EnumConstraint - -EnumConstraint - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**options** | List[Any] | Yes | | -**type** | Literal["enum"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/ExecuteQueryRequest.md b/docs/v2/Functions/models/ExecuteQueryRequest.md deleted file mode 100644 index ea991ef7b..000000000 --- a/docs/v2/Functions/models/ExecuteQueryRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# ExecuteQueryRequest - -ExecuteQueryRequest - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**parameters** | Dict[ParameterId, Optional[DataValue]] | Yes | | -**version** | Optional[FunctionVersion] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/ExecuteQueryResponse.md b/docs/v2/Functions/models/ExecuteQueryResponse.md deleted file mode 100644 index 7fb620232..000000000 --- a/docs/v2/Functions/models/ExecuteQueryResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# ExecuteQueryResponse - -ExecuteQueryResponse - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**value** | DataValue | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/FunctionRid.md b/docs/v2/Functions/models/FunctionRid.md deleted file mode 100644 index 2ea837619..000000000 --- a/docs/v2/Functions/models/FunctionRid.md +++ /dev/null @@ -1,12 +0,0 @@ -# FunctionRid - -The unique resource identifier of a Function, useful for interacting with other Foundry APIs. - - -## Type -```python -RID -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/FunctionVersion.md b/docs/v2/Functions/models/FunctionVersion.md deleted file mode 100644 index 7a8f4565f..000000000 --- a/docs/v2/Functions/models/FunctionVersion.md +++ /dev/null @@ -1,13 +0,0 @@ -# FunctionVersion - -The version of the given Function, written `..-`, where `-` is optional. -Examples: `1.2.3`, `1.2.3-rc1`. - - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/GetByRidQueriesRequest.md b/docs/v2/Functions/models/GetByRidQueriesRequest.md deleted file mode 100644 index cfdcd34a7..000000000 --- a/docs/v2/Functions/models/GetByRidQueriesRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetByRidQueriesRequest - -GetByRidQueriesRequest - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**rid** | FunctionRid | Yes | | -**version** | Optional[FunctionVersion] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/LengthConstraint.md b/docs/v2/Functions/models/LengthConstraint.md deleted file mode 100644 index 16b94131d..000000000 --- a/docs/v2/Functions/models/LengthConstraint.md +++ /dev/null @@ -1,13 +0,0 @@ -# LengthConstraint - -LengthConstraint - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**minimum_length** | Optional[int] | No | | -**maximum_length** | Optional[int] | No | | -**type** | Literal["length"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/MapConstraint.md b/docs/v2/Functions/models/MapConstraint.md deleted file mode 100644 index 140ea9286..000000000 --- a/docs/v2/Functions/models/MapConstraint.md +++ /dev/null @@ -1,14 +0,0 @@ -# MapConstraint - -MapConstraint - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**key_constraints** | List[ValueTypeConstraint] | Yes | | -**value_constraints** | List[ValueTypeConstraint] | Yes | | -**unique_values** | bool | Yes | | -**type** | Literal["map"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/NullableConstraint.md b/docs/v2/Functions/models/NullableConstraint.md deleted file mode 100644 index bb3416520..000000000 --- a/docs/v2/Functions/models/NullableConstraint.md +++ /dev/null @@ -1,12 +0,0 @@ -# NullableConstraint - -NullableConstraint - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**value** | NullableConstraintValue | Yes | | -**type** | Literal["nullable"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/NullableConstraintValue.md b/docs/v2/Functions/models/NullableConstraintValue.md deleted file mode 100644 index a417b031d..000000000 --- a/docs/v2/Functions/models/NullableConstraintValue.md +++ /dev/null @@ -1,11 +0,0 @@ -# NullableConstraintValue - -NullableConstraintValue - -| **Value** | -| --------- | -| `"NULLABLE"` | -| `"NOT_NULLABLE"` | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/Parameter.md b/docs/v2/Functions/models/Parameter.md deleted file mode 100644 index d90aaa77c..000000000 --- a/docs/v2/Functions/models/Parameter.md +++ /dev/null @@ -1,12 +0,0 @@ -# Parameter - -Details about a parameter of a query. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**description** | Optional[str] | No | | -**data_type** | QueryDataType | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/ParameterId.md b/docs/v2/Functions/models/ParameterId.md deleted file mode 100644 index b6c2637d9..000000000 --- a/docs/v2/Functions/models/ParameterId.md +++ /dev/null @@ -1,13 +0,0 @@ -# ParameterId - -The unique identifier of the parameter. Parameters are used as inputs when an action or query is applied. -Parameters can be viewed and managed in the **Ontology Manager**. - - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/Query.md b/docs/v2/Functions/models/Query.md deleted file mode 100644 index 09a2f24e9..000000000 --- a/docs/v2/Functions/models/Query.md +++ /dev/null @@ -1,17 +0,0 @@ -# Query - -Query - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**api_name** | QueryApiName | Yes | | -**description** | Optional[str] | No | | -**display_name** | Optional[DisplayName] | No | | -**parameters** | Dict[ParameterId, Parameter] | Yes | | -**output** | QueryDataType | Yes | | -**rid** | FunctionRid | Yes | | -**version** | FunctionVersion | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/QueryAggregationKeyType.md b/docs/v2/Functions/models/QueryAggregationKeyType.md deleted file mode 100644 index af8af64a8..000000000 --- a/docs/v2/Functions/models/QueryAggregationKeyType.md +++ /dev/null @@ -1,22 +0,0 @@ -# QueryAggregationKeyType - -A union of all the types supported by query aggregation keys. - - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -DateType | date -BooleanType | boolean -StringType | string -DoubleType | double -QueryAggregationRangeType | range -IntegerType | integer -TimestampType | timestamp - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/QueryAggregationRangeSubType.md b/docs/v2/Functions/models/QueryAggregationRangeSubType.md deleted file mode 100644 index b2b007348..000000000 --- a/docs/v2/Functions/models/QueryAggregationRangeSubType.md +++ /dev/null @@ -1,19 +0,0 @@ -# QueryAggregationRangeSubType - -A union of all the types supported by query aggregation ranges. - - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -DateType | date -DoubleType | double -IntegerType | integer -TimestampType | timestamp - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/QueryAggregationRangeType.md b/docs/v2/Functions/models/QueryAggregationRangeType.md deleted file mode 100644 index 8f7de1558..000000000 --- a/docs/v2/Functions/models/QueryAggregationRangeType.md +++ /dev/null @@ -1,12 +0,0 @@ -# QueryAggregationRangeType - -QueryAggregationRangeType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**sub_type** | QueryAggregationRangeSubType | Yes | | -**type** | Literal["range"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/QueryAggregationValueType.md b/docs/v2/Functions/models/QueryAggregationValueType.md deleted file mode 100644 index 7802d4da2..000000000 --- a/docs/v2/Functions/models/QueryAggregationValueType.md +++ /dev/null @@ -1,18 +0,0 @@ -# QueryAggregationValueType - -A union of all the types supported by query aggregation keys. - - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -DateType | date -DoubleType | double -TimestampType | timestamp - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/QueryApiName.md b/docs/v2/Functions/models/QueryApiName.md deleted file mode 100644 index 49568ce9c..000000000 --- a/docs/v2/Functions/models/QueryApiName.md +++ /dev/null @@ -1,11 +0,0 @@ -# QueryApiName - -The name of the Query in the API. - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/QueryArrayType.md b/docs/v2/Functions/models/QueryArrayType.md deleted file mode 100644 index ef02cc331..000000000 --- a/docs/v2/Functions/models/QueryArrayType.md +++ /dev/null @@ -1,12 +0,0 @@ -# QueryArrayType - -QueryArrayType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**sub_type** | QueryDataType | Yes | | -**type** | Literal["array"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/QueryDataType.md b/docs/v2/Functions/models/QueryDataType.md deleted file mode 100644 index 64d25e6c7..000000000 --- a/docs/v2/Functions/models/QueryDataType.md +++ /dev/null @@ -1,33 +0,0 @@ -# QueryDataType - -A union of all the types supported by Query parameters or outputs. - - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -DateType | date -QueryStructType | struct -QuerySetType | set -StringType | string -DoubleType | double -IntegerType | integer -ThreeDimensionalAggregation | threeDimensionalAggregation -QueryUnionType | union -FloatType | float -LongType | long -BooleanType | boolean -UnsupportedType | unsupported -AttachmentType | attachment -NullType | null -QueryArrayType | array -TwoDimensionalAggregation | twoDimensionalAggregation -ValueTypeReference | valueTypeReference -TimestampType | timestamp - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/QueryRuntimeErrorParameter.md b/docs/v2/Functions/models/QueryRuntimeErrorParameter.md deleted file mode 100644 index 09eb0af3d..000000000 --- a/docs/v2/Functions/models/QueryRuntimeErrorParameter.md +++ /dev/null @@ -1,11 +0,0 @@ -# QueryRuntimeErrorParameter - -QueryRuntimeErrorParameter - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/QuerySetType.md b/docs/v2/Functions/models/QuerySetType.md deleted file mode 100644 index 786ad8345..000000000 --- a/docs/v2/Functions/models/QuerySetType.md +++ /dev/null @@ -1,12 +0,0 @@ -# QuerySetType - -QuerySetType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**sub_type** | QueryDataType | Yes | | -**type** | Literal["set"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/QueryStructField.md b/docs/v2/Functions/models/QueryStructField.md deleted file mode 100644 index 0e7bc858d..000000000 --- a/docs/v2/Functions/models/QueryStructField.md +++ /dev/null @@ -1,12 +0,0 @@ -# QueryStructField - -QueryStructField - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**name** | StructFieldName | Yes | | -**field_type** | QueryDataType | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/QueryStructType.md b/docs/v2/Functions/models/QueryStructType.md deleted file mode 100644 index 9ccbb0860..000000000 --- a/docs/v2/Functions/models/QueryStructType.md +++ /dev/null @@ -1,12 +0,0 @@ -# QueryStructType - -QueryStructType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**fields** | List[QueryStructField] | Yes | | -**type** | Literal["struct"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/QueryUnionType.md b/docs/v2/Functions/models/QueryUnionType.md deleted file mode 100644 index a1b15ebbf..000000000 --- a/docs/v2/Functions/models/QueryUnionType.md +++ /dev/null @@ -1,12 +0,0 @@ -# QueryUnionType - -QueryUnionType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**union_types** | List[QueryDataType] | Yes | | -**type** | Literal["union"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/RangesConstraint.md b/docs/v2/Functions/models/RangesConstraint.md deleted file mode 100644 index 581ec838d..000000000 --- a/docs/v2/Functions/models/RangesConstraint.md +++ /dev/null @@ -1,13 +0,0 @@ -# RangesConstraint - -RangesConstraint - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**minimum_value** | Optional[Any] | No | | -**maximum_value** | Optional[Any] | No | | -**type** | Literal["range"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/RegexConstraint.md b/docs/v2/Functions/models/RegexConstraint.md deleted file mode 100644 index e7b88446b..000000000 --- a/docs/v2/Functions/models/RegexConstraint.md +++ /dev/null @@ -1,13 +0,0 @@ -# RegexConstraint - -RegexConstraint - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**pattern** | str | Yes | | -**partial_match** | bool | Yes | | -**type** | Literal["regex"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/RidConstraint.md b/docs/v2/Functions/models/RidConstraint.md deleted file mode 100644 index 468b55174..000000000 --- a/docs/v2/Functions/models/RidConstraint.md +++ /dev/null @@ -1,11 +0,0 @@ -# RidConstraint - -RidConstraint - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["rid"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/StreamingExecuteQueryRequest.md b/docs/v2/Functions/models/StreamingExecuteQueryRequest.md deleted file mode 100644 index ba799beb5..000000000 --- a/docs/v2/Functions/models/StreamingExecuteQueryRequest.md +++ /dev/null @@ -1,13 +0,0 @@ -# StreamingExecuteQueryRequest - -StreamingExecuteQueryRequest - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**ontology** | Optional[OntologyIdentifier] | No | Optional ontology identifier (RID or API name). When provided, executes an ontology-scoped function. When omitted, executes a global function. | -**parameters** | Dict[ParameterId, Optional[DataValue]] | Yes | | -**version** | Optional[FunctionVersion] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/StructConstraint.md b/docs/v2/Functions/models/StructConstraint.md deleted file mode 100644 index 4f3c6542a..000000000 --- a/docs/v2/Functions/models/StructConstraint.md +++ /dev/null @@ -1,12 +0,0 @@ -# StructConstraint - -StructConstraint - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**fields** | Dict[StructFieldApiName, ValueTypeApiName] | Yes | | -**type** | Literal["struct"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/StructFieldApiName.md b/docs/v2/Functions/models/StructFieldApiName.md deleted file mode 100644 index 621630006..000000000 --- a/docs/v2/Functions/models/StructFieldApiName.md +++ /dev/null @@ -1,11 +0,0 @@ -# StructFieldApiName - -StructFieldApiName - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/StructFieldName.md b/docs/v2/Functions/models/StructFieldName.md deleted file mode 100644 index eb543b79e..000000000 --- a/docs/v2/Functions/models/StructFieldName.md +++ /dev/null @@ -1,12 +0,0 @@ -# StructFieldName - -The name of a field in a `Struct`. - - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/StructV1Constraint.md b/docs/v2/Functions/models/StructV1Constraint.md deleted file mode 100644 index ebd39d1c5..000000000 --- a/docs/v2/Functions/models/StructV1Constraint.md +++ /dev/null @@ -1,12 +0,0 @@ -# StructV1Constraint - -StructV1Constraint - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**fields** | Dict[StructFieldApiName, ValueTypeConstraint] | Yes | | -**type** | Literal["structV1"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/ThreeDimensionalAggregation.md b/docs/v2/Functions/models/ThreeDimensionalAggregation.md deleted file mode 100644 index 9fb4c0c8a..000000000 --- a/docs/v2/Functions/models/ThreeDimensionalAggregation.md +++ /dev/null @@ -1,13 +0,0 @@ -# ThreeDimensionalAggregation - -ThreeDimensionalAggregation - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**key_type** | QueryAggregationKeyType | Yes | | -**value_type** | TwoDimensionalAggregation | Yes | | -**type** | Literal["threeDimensionalAggregation"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/TransactionId.md b/docs/v2/Functions/models/TransactionId.md deleted file mode 100644 index 85d0fe5f9..000000000 --- a/docs/v2/Functions/models/TransactionId.md +++ /dev/null @@ -1,11 +0,0 @@ -# TransactionId - -The ID identifying a transaction. - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/TwoDimensionalAggregation.md b/docs/v2/Functions/models/TwoDimensionalAggregation.md deleted file mode 100644 index b6f42990d..000000000 --- a/docs/v2/Functions/models/TwoDimensionalAggregation.md +++ /dev/null @@ -1,13 +0,0 @@ -# TwoDimensionalAggregation - -TwoDimensionalAggregation - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**key_type** | QueryAggregationKeyType | Yes | | -**value_type** | QueryAggregationValueType | Yes | | -**type** | Literal["twoDimensionalAggregation"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/UuidConstraint.md b/docs/v2/Functions/models/UuidConstraint.md deleted file mode 100644 index 7007ce41c..000000000 --- a/docs/v2/Functions/models/UuidConstraint.md +++ /dev/null @@ -1,11 +0,0 @@ -# UuidConstraint - -UuidConstraint - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["uuid"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/ValueType.md b/docs/v2/Functions/models/ValueType.md deleted file mode 100644 index 08d1a497c..000000000 --- a/docs/v2/Functions/models/ValueType.md +++ /dev/null @@ -1,18 +0,0 @@ -# ValueType - -ValueType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**rid** | ValueTypeRid | Yes | | -**version** | ValueTypeVersion | Yes | | -**version_id** | ValueTypeVersionId | Yes | | -**api_name** | ValueTypeApiName | Yes | | -**display_name** | DisplayName | Yes | | -**description** | Optional[ValueTypeDescription] | No | | -**base_type** | Optional[ValueTypeDataType] | No | | -**constraints** | List[ValueTypeConstraint] | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/ValueTypeApiName.md b/docs/v2/Functions/models/ValueTypeApiName.md deleted file mode 100644 index 29f46d948..000000000 --- a/docs/v2/Functions/models/ValueTypeApiName.md +++ /dev/null @@ -1,11 +0,0 @@ -# ValueTypeApiName - -The registered API name for the value type. - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/ValueTypeConstraint.md b/docs/v2/Functions/models/ValueTypeConstraint.md deleted file mode 100644 index 71d42a4b8..000000000 --- a/docs/v2/Functions/models/ValueTypeConstraint.md +++ /dev/null @@ -1,25 +0,0 @@ -# ValueTypeConstraint - -ValueTypeConstraint - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -StructConstraint | struct -StructV1Constraint | structV1 -RegexConstraint | regex -NullableConstraint | nullable -ArrayConstraint | array -LengthConstraint | length -RangesConstraint | range -RidConstraint | rid -MapConstraint | map -UuidConstraint | uuid -EnumConstraint | enum - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/ValueTypeDataType.md b/docs/v2/Functions/models/ValueTypeDataType.md deleted file mode 100644 index 28e33dee9..000000000 --- a/docs/v2/Functions/models/ValueTypeDataType.md +++ /dev/null @@ -1,33 +0,0 @@ -# ValueTypeDataType - -The underlying base type of a value type. - - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -ValueTypeDataTypeDateType | date -ValueTypeDataTypeStructType | struct -ValueTypeDataTypeStringType | string -ValueTypeDataTypeByteType | byte -ValueTypeDataTypeDoubleType | double -ValueTypeDataTypeOptionalType | optional -ValueTypeDataTypeIntegerType | integer -ValueTypeDataTypeUnionType | union -ValueTypeDataTypeFloatType | float -ValueTypeDataTypeLongType | long -ValueTypeDataTypeBooleanType | boolean -ValueTypeDataTypeArrayType | array -ValueTypeDataTypeBinaryType | binary -ValueTypeDataTypeValueTypeReference | valueTypeReference -ValueTypeDataTypeShortType | short -ValueTypeDataTypeDecimalType | decimal -ValueTypeDataTypeMapType | map -ValueTypeDataTypeTimestampType | timestamp - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/ValueTypeDataTypeArrayType.md b/docs/v2/Functions/models/ValueTypeDataTypeArrayType.md deleted file mode 100644 index 61446dbc6..000000000 --- a/docs/v2/Functions/models/ValueTypeDataTypeArrayType.md +++ /dev/null @@ -1,12 +0,0 @@ -# ValueTypeDataTypeArrayType - -ValueTypeDataTypeArrayType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**sub_type** | ValueTypeDataType | Yes | | -**type** | Literal["array"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/ValueTypeDataTypeBinaryType.md b/docs/v2/Functions/models/ValueTypeDataTypeBinaryType.md deleted file mode 100644 index 81078f78b..000000000 --- a/docs/v2/Functions/models/ValueTypeDataTypeBinaryType.md +++ /dev/null @@ -1,11 +0,0 @@ -# ValueTypeDataTypeBinaryType - -ValueTypeDataTypeBinaryType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["binary"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/ValueTypeDataTypeBooleanType.md b/docs/v2/Functions/models/ValueTypeDataTypeBooleanType.md deleted file mode 100644 index 27547f840..000000000 --- a/docs/v2/Functions/models/ValueTypeDataTypeBooleanType.md +++ /dev/null @@ -1,11 +0,0 @@ -# ValueTypeDataTypeBooleanType - -ValueTypeDataTypeBooleanType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["boolean"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/ValueTypeDataTypeByteType.md b/docs/v2/Functions/models/ValueTypeDataTypeByteType.md deleted file mode 100644 index 4931e3fbd..000000000 --- a/docs/v2/Functions/models/ValueTypeDataTypeByteType.md +++ /dev/null @@ -1,11 +0,0 @@ -# ValueTypeDataTypeByteType - -ValueTypeDataTypeByteType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["byte"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/ValueTypeDataTypeDateType.md b/docs/v2/Functions/models/ValueTypeDataTypeDateType.md deleted file mode 100644 index f3f0f4ca3..000000000 --- a/docs/v2/Functions/models/ValueTypeDataTypeDateType.md +++ /dev/null @@ -1,11 +0,0 @@ -# ValueTypeDataTypeDateType - -ValueTypeDataTypeDateType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["date"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/ValueTypeDataTypeDecimalType.md b/docs/v2/Functions/models/ValueTypeDataTypeDecimalType.md deleted file mode 100644 index d7a750a37..000000000 --- a/docs/v2/Functions/models/ValueTypeDataTypeDecimalType.md +++ /dev/null @@ -1,11 +0,0 @@ -# ValueTypeDataTypeDecimalType - -ValueTypeDataTypeDecimalType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["decimal"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/ValueTypeDataTypeDoubleType.md b/docs/v2/Functions/models/ValueTypeDataTypeDoubleType.md deleted file mode 100644 index 70ca5ac08..000000000 --- a/docs/v2/Functions/models/ValueTypeDataTypeDoubleType.md +++ /dev/null @@ -1,11 +0,0 @@ -# ValueTypeDataTypeDoubleType - -ValueTypeDataTypeDoubleType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["double"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/ValueTypeDataTypeFloatType.md b/docs/v2/Functions/models/ValueTypeDataTypeFloatType.md deleted file mode 100644 index 21c984d4c..000000000 --- a/docs/v2/Functions/models/ValueTypeDataTypeFloatType.md +++ /dev/null @@ -1,11 +0,0 @@ -# ValueTypeDataTypeFloatType - -ValueTypeDataTypeFloatType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["float"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/ValueTypeDataTypeIntegerType.md b/docs/v2/Functions/models/ValueTypeDataTypeIntegerType.md deleted file mode 100644 index e9263c83a..000000000 --- a/docs/v2/Functions/models/ValueTypeDataTypeIntegerType.md +++ /dev/null @@ -1,11 +0,0 @@ -# ValueTypeDataTypeIntegerType - -ValueTypeDataTypeIntegerType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["integer"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/ValueTypeDataTypeLongType.md b/docs/v2/Functions/models/ValueTypeDataTypeLongType.md deleted file mode 100644 index 5c97c7461..000000000 --- a/docs/v2/Functions/models/ValueTypeDataTypeLongType.md +++ /dev/null @@ -1,11 +0,0 @@ -# ValueTypeDataTypeLongType - -ValueTypeDataTypeLongType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["long"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/ValueTypeDataTypeMapType.md b/docs/v2/Functions/models/ValueTypeDataTypeMapType.md deleted file mode 100644 index 41402b655..000000000 --- a/docs/v2/Functions/models/ValueTypeDataTypeMapType.md +++ /dev/null @@ -1,13 +0,0 @@ -# ValueTypeDataTypeMapType - -ValueTypeDataTypeMapType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**key_type** | ValueTypeDataType | Yes | | -**value_type** | ValueTypeDataType | Yes | | -**type** | Literal["map"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/ValueTypeDataTypeOptionalType.md b/docs/v2/Functions/models/ValueTypeDataTypeOptionalType.md deleted file mode 100644 index 9c8acc618..000000000 --- a/docs/v2/Functions/models/ValueTypeDataTypeOptionalType.md +++ /dev/null @@ -1,12 +0,0 @@ -# ValueTypeDataTypeOptionalType - -ValueTypeDataTypeOptionalType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**wrapped_type** | ValueTypeDataType | Yes | | -**type** | Literal["optional"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/ValueTypeDataTypeShortType.md b/docs/v2/Functions/models/ValueTypeDataTypeShortType.md deleted file mode 100644 index 1c5a2bd4f..000000000 --- a/docs/v2/Functions/models/ValueTypeDataTypeShortType.md +++ /dev/null @@ -1,11 +0,0 @@ -# ValueTypeDataTypeShortType - -ValueTypeDataTypeShortType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["short"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/ValueTypeDataTypeStringType.md b/docs/v2/Functions/models/ValueTypeDataTypeStringType.md deleted file mode 100644 index 278d1c47a..000000000 --- a/docs/v2/Functions/models/ValueTypeDataTypeStringType.md +++ /dev/null @@ -1,11 +0,0 @@ -# ValueTypeDataTypeStringType - -ValueTypeDataTypeStringType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["string"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/ValueTypeDataTypeStructElement.md b/docs/v2/Functions/models/ValueTypeDataTypeStructElement.md deleted file mode 100644 index 92c1868a0..000000000 --- a/docs/v2/Functions/models/ValueTypeDataTypeStructElement.md +++ /dev/null @@ -1,12 +0,0 @@ -# ValueTypeDataTypeStructElement - -ValueTypeDataTypeStructElement - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**name** | ValueTypeDataTypeStructFieldIdentifier | Yes | | -**field_type** | ValueTypeDataType | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/ValueTypeDataTypeStructFieldIdentifier.md b/docs/v2/Functions/models/ValueTypeDataTypeStructFieldIdentifier.md deleted file mode 100644 index 3119cbb0e..000000000 --- a/docs/v2/Functions/models/ValueTypeDataTypeStructFieldIdentifier.md +++ /dev/null @@ -1,11 +0,0 @@ -# ValueTypeDataTypeStructFieldIdentifier - -ValueTypeDataTypeStructFieldIdentifier - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/ValueTypeDataTypeStructType.md b/docs/v2/Functions/models/ValueTypeDataTypeStructType.md deleted file mode 100644 index 68b6dc656..000000000 --- a/docs/v2/Functions/models/ValueTypeDataTypeStructType.md +++ /dev/null @@ -1,12 +0,0 @@ -# ValueTypeDataTypeStructType - -ValueTypeDataTypeStructType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**fields** | List[ValueTypeDataTypeStructElement] | Yes | | -**type** | Literal["struct"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/ValueTypeDataTypeTimestampType.md b/docs/v2/Functions/models/ValueTypeDataTypeTimestampType.md deleted file mode 100644 index 0063f3bc0..000000000 --- a/docs/v2/Functions/models/ValueTypeDataTypeTimestampType.md +++ /dev/null @@ -1,11 +0,0 @@ -# ValueTypeDataTypeTimestampType - -ValueTypeDataTypeTimestampType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["timestamp"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/ValueTypeDataTypeUnionType.md b/docs/v2/Functions/models/ValueTypeDataTypeUnionType.md deleted file mode 100644 index 00ea08797..000000000 --- a/docs/v2/Functions/models/ValueTypeDataTypeUnionType.md +++ /dev/null @@ -1,12 +0,0 @@ -# ValueTypeDataTypeUnionType - -ValueTypeDataTypeUnionType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**member_types** | List[ValueTypeDataType] | Yes | | -**type** | Literal["union"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/ValueTypeDataTypeValueTypeReference.md b/docs/v2/Functions/models/ValueTypeDataTypeValueTypeReference.md deleted file mode 100644 index 050f004ad..000000000 --- a/docs/v2/Functions/models/ValueTypeDataTypeValueTypeReference.md +++ /dev/null @@ -1,13 +0,0 @@ -# ValueTypeDataTypeValueTypeReference - -ValueTypeDataTypeValueTypeReference - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**rid** | ValueTypeRid | Yes | | -**version_id** | ValueTypeVersionId | Yes | | -**type** | Literal["valueTypeReference"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/ValueTypeDescription.md b/docs/v2/Functions/models/ValueTypeDescription.md deleted file mode 100644 index f89c54856..000000000 --- a/docs/v2/Functions/models/ValueTypeDescription.md +++ /dev/null @@ -1,12 +0,0 @@ -# ValueTypeDescription - -A description of the value type. - - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/ValueTypeReference.md b/docs/v2/Functions/models/ValueTypeReference.md deleted file mode 100644 index e6cdfe144..000000000 --- a/docs/v2/Functions/models/ValueTypeReference.md +++ /dev/null @@ -1,14 +0,0 @@ -# ValueTypeReference - -A reference to a value type that has been registered in the Ontology. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**rid** | ValueTypeRid | Yes | | -**version_id** | ValueTypeVersionId | Yes | | -**type** | Literal["valueTypeReference"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/ValueTypeRid.md b/docs/v2/Functions/models/ValueTypeRid.md deleted file mode 100644 index 08c167c48..000000000 --- a/docs/v2/Functions/models/ValueTypeRid.md +++ /dev/null @@ -1,12 +0,0 @@ -# ValueTypeRid - -The RID of a value type that has been registered in the Ontology. - - -## Type -```python -RID -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/ValueTypeVersion.md b/docs/v2/Functions/models/ValueTypeVersion.md deleted file mode 100644 index ba690a2fb..000000000 --- a/docs/v2/Functions/models/ValueTypeVersion.md +++ /dev/null @@ -1,12 +0,0 @@ -# ValueTypeVersion - -The version of a value type that has been registered in the Ontology. - - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/ValueTypeVersionId.md b/docs/v2/Functions/models/ValueTypeVersionId.md deleted file mode 100644 index d3aa13f86..000000000 --- a/docs/v2/Functions/models/ValueTypeVersionId.md +++ /dev/null @@ -1,12 +0,0 @@ -# ValueTypeVersionId - -The version ID of a value type that has been registered in the Ontology. - - -## Type -```python -UUID -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/VersionId.md b/docs/v2/Functions/models/VersionId.md deleted file mode 100644 index 34017e41b..000000000 --- a/docs/v2/Functions/models/VersionId.md +++ /dev/null @@ -1,18 +0,0 @@ -# VersionId - -VersionId - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**rid** | ValueTypeRid | Yes | | -**version** | ValueTypeVersion | Yes | | -**version_id** | ValueTypeVersionId | Yes | | -**api_name** | ValueTypeApiName | Yes | | -**display_name** | DisplayName | Yes | | -**description** | Optional[ValueTypeDescription] | No | | -**base_type** | Optional[ValueTypeDataType] | No | | -**constraints** | List[ValueTypeConstraint] | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Geo/models/BBox.md b/docs/v2/Geo/models/BBox.md deleted file mode 100644 index b21a5fece..000000000 --- a/docs/v2/Geo/models/BBox.md +++ /dev/null @@ -1,18 +0,0 @@ -# BBox - -A GeoJSON object MAY have a member named "bbox" to include -information on the coordinate range for its Geometries, Features, or -FeatureCollections. The value of the bbox member MUST be an array of -length 2*n where n is the number of dimensions represented in the -contained geometries, with all axes of the most southwesterly point -followed by all axes of the more northeasterly point. The axes order -of a bbox follows the axes order of geometries. - - -## Type -```python -List[Coordinate] -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Geo/models/Coordinate.md b/docs/v2/Geo/models/Coordinate.md deleted file mode 100644 index 9d199b901..000000000 --- a/docs/v2/Geo/models/Coordinate.md +++ /dev/null @@ -1,11 +0,0 @@ -# Coordinate - -Coordinate - -## Type -```python -float -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Geo/models/Feature.md b/docs/v2/Geo/models/Feature.md deleted file mode 100644 index 69200f1db..000000000 --- a/docs/v2/Geo/models/Feature.md +++ /dev/null @@ -1,15 +0,0 @@ -# Feature - -GeoJSon 'Feature' object - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**geometry** | Optional[Geometry] | No | | -**properties** | Dict[FeaturePropertyKey, Any] | Yes | A `Feature` object has a member with the name "properties". The value of the properties member is an object (any JSON object or a JSON null value). | -**id** | Optional[Any] | No | If a `Feature` has a commonly used identifier, that identifier SHOULD be included as a member of the Feature object with the name "id", and the value of this member is either a JSON string or number. | -**bbox** | Optional[BBox] | No | | -**type** | Literal["Feature"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Geo/models/FeatureCollection.md b/docs/v2/Geo/models/FeatureCollection.md deleted file mode 100644 index 32c1cbfd6..000000000 --- a/docs/v2/Geo/models/FeatureCollection.md +++ /dev/null @@ -1,13 +0,0 @@ -# FeatureCollection - -GeoJSon 'FeatureCollection' object - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**features** | List[FeatureCollectionTypes] | Yes | | -**bbox** | Optional[BBox] | No | | -**type** | Literal["FeatureCollection"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Geo/models/FeatureCollectionTypes.md b/docs/v2/Geo/models/FeatureCollectionTypes.md deleted file mode 100644 index ec5044cfd..000000000 --- a/docs/v2/Geo/models/FeatureCollectionTypes.md +++ /dev/null @@ -1,11 +0,0 @@ -# FeatureCollectionTypes - -FeatureCollectionTypes - -## Type -```python -Feature -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Geo/models/FeaturePropertyKey.md b/docs/v2/Geo/models/FeaturePropertyKey.md deleted file mode 100644 index 540fb31cb..000000000 --- a/docs/v2/Geo/models/FeaturePropertyKey.md +++ /dev/null @@ -1,11 +0,0 @@ -# FeaturePropertyKey - -FeaturePropertyKey - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Geo/models/GeoPoint.md b/docs/v2/Geo/models/GeoPoint.md deleted file mode 100644 index 5f99fa3a2..000000000 --- a/docs/v2/Geo/models/GeoPoint.md +++ /dev/null @@ -1,13 +0,0 @@ -# GeoPoint - -GeoPoint - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**coordinates** | Position | Yes | | -**bbox** | Optional[BBox] | No | | -**type** | Literal["Point"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Geo/models/Geometry.md b/docs/v2/Geo/models/Geometry.md deleted file mode 100644 index 93604237f..000000000 --- a/docs/v2/Geo/models/Geometry.md +++ /dev/null @@ -1,21 +0,0 @@ -# Geometry - -Abstract type for all GeoJSon object except Feature and FeatureCollection - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -MultiPoint | MultiPoint -GeometryCollection | GeometryCollection -MultiLineString | MultiLineString -LineString | LineString -MultiPolygon | MultiPolygon -GeoPoint | Point -Polygon | Polygon - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Geo/models/GeometryCollection.md b/docs/v2/Geo/models/GeometryCollection.md deleted file mode 100644 index e1c5bd7f2..000000000 --- a/docs/v2/Geo/models/GeometryCollection.md +++ /dev/null @@ -1,19 +0,0 @@ -# GeometryCollection - -GeoJSon geometry collection - -GeometryCollections composed of a single part or a number of parts of a -single type SHOULD be avoided when that single part or a single object -of multipart type (MultiPoint, MultiLineString, or MultiPolygon) could -be used instead. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**geometries** | List[Geometry] | Yes | | -**bbox** | Optional[BBox] | No | | -**type** | Literal["GeometryCollection"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Geo/models/LineString.md b/docs/v2/Geo/models/LineString.md deleted file mode 100644 index d3da889a5..000000000 --- a/docs/v2/Geo/models/LineString.md +++ /dev/null @@ -1,13 +0,0 @@ -# LineString - -LineString - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**coordinates** | Optional[LineStringCoordinates] | No | | -**bbox** | Optional[BBox] | No | | -**type** | Literal["LineString"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Geo/models/LineStringCoordinates.md b/docs/v2/Geo/models/LineStringCoordinates.md deleted file mode 100644 index cd467cedc..000000000 --- a/docs/v2/Geo/models/LineStringCoordinates.md +++ /dev/null @@ -1,12 +0,0 @@ -# LineStringCoordinates - -GeoJSon fundamental geometry construct, array of two or more positions. - - -## Type -```python -List[Position] -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Geo/models/LinearRing.md b/docs/v2/Geo/models/LinearRing.md deleted file mode 100644 index e03df8635..000000000 --- a/docs/v2/Geo/models/LinearRing.md +++ /dev/null @@ -1,22 +0,0 @@ -# LinearRing - -A linear ring is a closed LineString with four or more positions. - -The first and last positions are equivalent, and they MUST contain -identical values; their representation SHOULD also be identical. - -A linear ring is the boundary of a surface or the boundary of a hole in -a surface. - -A linear ring MUST follow the right-hand rule with respect to the area -it bounds, i.e., exterior rings are counterclockwise, and holes are -clockwise. - - -## Type -```python -List[Position] -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Geo/models/MultiLineString.md b/docs/v2/Geo/models/MultiLineString.md deleted file mode 100644 index 8cd380083..000000000 --- a/docs/v2/Geo/models/MultiLineString.md +++ /dev/null @@ -1,13 +0,0 @@ -# MultiLineString - -MultiLineString - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**coordinates** | List[LineStringCoordinates] | Yes | | -**bbox** | Optional[BBox] | No | | -**type** | Literal["MultiLineString"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Geo/models/MultiPoint.md b/docs/v2/Geo/models/MultiPoint.md deleted file mode 100644 index 20c67ad6b..000000000 --- a/docs/v2/Geo/models/MultiPoint.md +++ /dev/null @@ -1,13 +0,0 @@ -# MultiPoint - -MultiPoint - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**coordinates** | List[Position] | Yes | | -**bbox** | Optional[BBox] | No | | -**type** | Literal["MultiPoint"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Geo/models/MultiPolygon.md b/docs/v2/Geo/models/MultiPolygon.md deleted file mode 100644 index b1920b1aa..000000000 --- a/docs/v2/Geo/models/MultiPolygon.md +++ /dev/null @@ -1,13 +0,0 @@ -# MultiPolygon - -MultiPolygon - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**coordinates** | List[List[LinearRing]] | Yes | | -**bbox** | Optional[BBox] | No | | -**type** | Literal["MultiPolygon"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Geo/models/Polygon.md b/docs/v2/Geo/models/Polygon.md deleted file mode 100644 index 01331aef5..000000000 --- a/docs/v2/Geo/models/Polygon.md +++ /dev/null @@ -1,13 +0,0 @@ -# Polygon - -Polygon - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**coordinates** | List[LinearRing] | Yes | | -**bbox** | Optional[BBox] | No | | -**type** | Literal["Polygon"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Geo/models/Position.md b/docs/v2/Geo/models/Position.md deleted file mode 100644 index 3c7820381..000000000 --- a/docs/v2/Geo/models/Position.md +++ /dev/null @@ -1,25 +0,0 @@ -# Position - -GeoJSon fundamental geometry construct. - -A position is an array of numbers. There MUST be two or more elements. -The first two elements are longitude and latitude, precisely in that order and using decimal numbers. -Altitude or elevation MAY be included as an optional third element. - -Implementations SHOULD NOT extend positions beyond three elements -because the semantics of extra elements are unspecified and ambiguous. -Historically, some implementations have used a fourth element to carry -a linear referencing measure (sometimes denoted as "M") or a numerical -timestamp, but in most situations a parser will not be able to properly -interpret these values. The interpretation and meaning of additional -elements is beyond the scope of this specification, and additional -elements MAY be ignored by parsers. - - -## Type -```python -List[Coordinate] -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/AnthropicModel.md b/docs/v2/LanguageModels/AnthropicModel.md deleted file mode 100644 index 224ff5b73..000000000 --- a/docs/v2/LanguageModels/AnthropicModel.md +++ /dev/null @@ -1,103 +0,0 @@ -# AnthropicModel - -Method | HTTP request | Release Stage | -------------- | ------------- | ----- | -[**messages**](#messages) | **POST** /v2/languageModels/anthropic/{anthropicModelModelId}/messages | Private Beta | - -# **messages** - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**anthropic_model_model_id** | LanguageModelApiName | | | -**max_tokens** | int | The maximum number of tokens to generate before stopping. | | -**messages** | List[AnthropicMessage] | Input messages to the model. This can include a single user-role message or multiple messages with alternating user and assistant roles. | | -**attribution** | Optional[Attribution] | | [optional] | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | -**stop_sequences** | Optional[List[str]] | Custom text sequences that will cause the model to stop generating. | [optional] | -**system** | Optional[List[AnthropicSystemMessage]] | A system prompt is a way of providing context and instructions to Claude, such as specifying a particular goal or role. As of now, sending multiple system prompts is not supported. | [optional] | -**temperature** | Optional[float] | Amount of randomness injected into the response. Ranges from 0.0 to 1.0. Note that even with temperature of 0.0, the results will not be fully deterministic. Defaults to 1.0 | [optional] | -**thinking** | Optional[AnthropicThinkingConfig] | Configuration for enabling Claude's extended thinking. | [optional] | -**tool_choice** | Optional[AnthropicToolChoice] | How the model should use the provided tools. | [optional] | -**tools** | Optional[List[AnthropicTool]] | Definitions of tools that the model may use. | [optional] | -**top_k** | Optional[int] | Only sample from the top K options for each subsequent token. | [optional] | -**top_p** | Optional[float] | Use nucleus sampling. You should either alter temperature or top_p, but not both | [optional] | - -### Return type -**AnthropicMessagesResponse** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# LanguageModelApiName -anthropic_model_model_id = None -# int | The maximum number of tokens to generate before stopping. -max_tokens = None -# List[AnthropicMessage] | Input messages to the model. This can include a single user-role message or multiple messages with alternating user and assistant roles. -messages = [{"role": "USER"}] -# Optional[Attribution] -attribution = None -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None -# Optional[List[str]] | Custom text sequences that will cause the model to stop generating. -stop_sequences = None -# Optional[List[AnthropicSystemMessage]] | A system prompt is a way of providing context and instructions to Claude, such as specifying a particular goal or role. As of now, sending multiple system prompts is not supported. -system = None -# Optional[float] | Amount of randomness injected into the response. Ranges from 0.0 to 1.0. Note that even with temperature of 0.0, the results will not be fully deterministic. Defaults to 1.0 -temperature = None -# Optional[AnthropicThinkingConfig] | Configuration for enabling Claude's extended thinking. -thinking = None -# Optional[AnthropicToolChoice] | How the model should use the provided tools. -tool_choice = None -# Optional[List[AnthropicTool]] | Definitions of tools that the model may use. -tools = None -# Optional[int] | Only sample from the top K options for each subsequent token. -top_k = None -# Optional[float] | Use nucleus sampling. You should either alter temperature or top_p, but not both -top_p = None - - -try: - api_response = client.language_models.AnthropicModel.messages( - anthropic_model_model_id, - max_tokens=max_tokens, - messages=messages, - attribution=attribution, - preview=preview, - stop_sequences=stop_sequences, - system=system, - temperature=temperature, - thinking=thinking, - tool_choice=tool_choice, - tools=tools, - top_k=top_k, - top_p=top_p, - ) - print("The messages response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling AnthropicModel.messages: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | AnthropicMessagesResponse | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - diff --git a/docs/v2/LanguageModels/OpenAiModel.md b/docs/v2/LanguageModels/OpenAiModel.md deleted file mode 100644 index c56e387c2..000000000 --- a/docs/v2/LanguageModels/OpenAiModel.md +++ /dev/null @@ -1,75 +0,0 @@ -# OpenAiModel - -Method | HTTP request | Release Stage | -------------- | ------------- | ----- | -[**embeddings**](#embeddings) | **POST** /v2/languageModels/openAi/{openAiModelModelId}/embeddings | Private Beta | - -# **embeddings** - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**open_ai_model_model_id** | LanguageModelApiName | | | -**input** | OpenAiEmbeddingInput | Input text to embed, encoded as an array of strings. Each input must not exceed the max input tokens for the model (8192 tokens for all embedding models). | | -**attribution** | Optional[Attribution] | | [optional] | -**dimensions** | Optional[int] | The number of dimensions the resulting output embeddings should have. Only supported in text-embedding-3 and later models. | [optional] | -**encoding_format** | Optional[OpenAiEncodingFormat] | The format to return the embeddings in. Can be either float or base64. | [optional] | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**OpenAiEmbeddingsResponse** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# LanguageModelApiName -open_ai_model_model_id = None -# OpenAiEmbeddingInput | Input text to embed, encoded as an array of strings. Each input must not exceed the max input tokens for the model (8192 tokens for all embedding models). -input = None -# Optional[Attribution] -attribution = None -# Optional[int] | The number of dimensions the resulting output embeddings should have. Only supported in text-embedding-3 and later models. -dimensions = None -# Optional[OpenAiEncodingFormat] | The format to return the embeddings in. Can be either float or base64. -encoding_format = "FLOAT" -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.language_models.OpenAiModel.embeddings( - open_ai_model_model_id, - input=input, - attribution=attribution, - dimensions=dimensions, - encoding_format=encoding_format, - preview=preview, - ) - print("The embeddings response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling OpenAiModel.embeddings: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | OpenAiEmbeddingsResponse | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - diff --git a/docs/v2/LanguageModels/models/AnthropicAnyToolChoice.md b/docs/v2/LanguageModels/models/AnthropicAnyToolChoice.md deleted file mode 100644 index 208eb823f..000000000 --- a/docs/v2/LanguageModels/models/AnthropicAnyToolChoice.md +++ /dev/null @@ -1,12 +0,0 @@ -# AnthropicAnyToolChoice - -AnthropicAnyToolChoice - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**disable_parallel_tool_use** | Optional[AnthropicDisableParallelToolUse] | No | | -**type** | Literal["any"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/models/AnthropicAutoToolChoice.md b/docs/v2/LanguageModels/models/AnthropicAutoToolChoice.md deleted file mode 100644 index 0ea3ce335..000000000 --- a/docs/v2/LanguageModels/models/AnthropicAutoToolChoice.md +++ /dev/null @@ -1,12 +0,0 @@ -# AnthropicAutoToolChoice - -AnthropicAutoToolChoice - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**disable_parallel_tool_use** | Optional[AnthropicDisableParallelToolUse] | No | | -**type** | Literal["auto"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/models/AnthropicBase64PdfDocumentSource.md b/docs/v2/LanguageModels/models/AnthropicBase64PdfDocumentSource.md deleted file mode 100644 index f01f42a9e..000000000 --- a/docs/v2/LanguageModels/models/AnthropicBase64PdfDocumentSource.md +++ /dev/null @@ -1,12 +0,0 @@ -# AnthropicBase64PdfDocumentSource - -AnthropicBase64PdfDocumentSource - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**data** | str | Yes | | -**type** | Literal["pdf"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/models/AnthropicCacheControl.md b/docs/v2/LanguageModels/models/AnthropicCacheControl.md deleted file mode 100644 index de7d64800..000000000 --- a/docs/v2/LanguageModels/models/AnthropicCacheControl.md +++ /dev/null @@ -1,11 +0,0 @@ -# AnthropicCacheControl - -AnthropicCacheControl - -## Type -```python -AnthropicEphemeralCacheControl -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/models/AnthropicCharacterLocationCitation.md b/docs/v2/LanguageModels/models/AnthropicCharacterLocationCitation.md deleted file mode 100644 index 06cd0c048..000000000 --- a/docs/v2/LanguageModels/models/AnthropicCharacterLocationCitation.md +++ /dev/null @@ -1,16 +0,0 @@ -# AnthropicCharacterLocationCitation - -AnthropicCharacterLocationCitation - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**cited_text** | str | Yes | | -**document_index** | int | Yes | | -**document_title** | Optional[str] | No | | -**start_char_index** | int | Yes | | -**end_char_index** | int | Yes | | -**type** | Literal["charLocation"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/models/AnthropicCompletionCitation.md b/docs/v2/LanguageModels/models/AnthropicCompletionCitation.md deleted file mode 100644 index 7f8f55e6e..000000000 --- a/docs/v2/LanguageModels/models/AnthropicCompletionCitation.md +++ /dev/null @@ -1,11 +0,0 @@ -# AnthropicCompletionCitation - -AnthropicCompletionCitation - -## Type -```python -AnthropicCharacterLocationCitation -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/models/AnthropicCompletionContent.md b/docs/v2/LanguageModels/models/AnthropicCompletionContent.md deleted file mode 100644 index ca9c4b7a0..000000000 --- a/docs/v2/LanguageModels/models/AnthropicCompletionContent.md +++ /dev/null @@ -1,18 +0,0 @@ -# AnthropicCompletionContent - -AnthropicCompletionContent - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -AnthropicCompletionToolUse | toolUse -AnthropicCompletionText | text -AnthropicCompletionThinking | thinking -AnthropicCompletionRedactedThinking | redactedThinking - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/models/AnthropicCompletionRedactedThinking.md b/docs/v2/LanguageModels/models/AnthropicCompletionRedactedThinking.md deleted file mode 100644 index c753eea7c..000000000 --- a/docs/v2/LanguageModels/models/AnthropicCompletionRedactedThinking.md +++ /dev/null @@ -1,12 +0,0 @@ -# AnthropicCompletionRedactedThinking - -AnthropicCompletionRedactedThinking - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**data** | str | Yes | | -**type** | Literal["redactedThinking"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/models/AnthropicCompletionText.md b/docs/v2/LanguageModels/models/AnthropicCompletionText.md deleted file mode 100644 index 4c5fc3b9f..000000000 --- a/docs/v2/LanguageModels/models/AnthropicCompletionText.md +++ /dev/null @@ -1,13 +0,0 @@ -# AnthropicCompletionText - -AnthropicCompletionText - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**text** | str | Yes | | -**citations** | Optional[List[AnthropicCompletionCitation]] | No | | -**type** | Literal["text"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/models/AnthropicCompletionThinking.md b/docs/v2/LanguageModels/models/AnthropicCompletionThinking.md deleted file mode 100644 index ecd151735..000000000 --- a/docs/v2/LanguageModels/models/AnthropicCompletionThinking.md +++ /dev/null @@ -1,13 +0,0 @@ -# AnthropicCompletionThinking - -AnthropicCompletionThinking - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**signature** | str | Yes | | -**thinking** | str | Yes | | -**type** | Literal["thinking"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/models/AnthropicCompletionToolUse.md b/docs/v2/LanguageModels/models/AnthropicCompletionToolUse.md deleted file mode 100644 index 667cd8c8a..000000000 --- a/docs/v2/LanguageModels/models/AnthropicCompletionToolUse.md +++ /dev/null @@ -1,14 +0,0 @@ -# AnthropicCompletionToolUse - -AnthropicCompletionToolUse - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**id** | str | Yes | | -**input** | Any | Yes | | -**name** | str | Yes | | -**type** | Literal["toolUse"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/models/AnthropicCustomTool.md b/docs/v2/LanguageModels/models/AnthropicCustomTool.md deleted file mode 100644 index 3860df897..000000000 --- a/docs/v2/LanguageModels/models/AnthropicCustomTool.md +++ /dev/null @@ -1,14 +0,0 @@ -# AnthropicCustomTool - -AnthropicCustomTool - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**name** | str | Yes | | -**description** | Optional[str] | No | | -**input_schema** | JsonSchema | Yes | | -**type** | Literal["custom"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/models/AnthropicDisableParallelToolUse.md b/docs/v2/LanguageModels/models/AnthropicDisableParallelToolUse.md deleted file mode 100644 index 9ed323a7b..000000000 --- a/docs/v2/LanguageModels/models/AnthropicDisableParallelToolUse.md +++ /dev/null @@ -1,13 +0,0 @@ -# AnthropicDisableParallelToolUse - -Whether to disable parallel tool use. Defaults to false. If set to true, the model will output -exactly one tool use. - - -## Type -```python -bool -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/models/AnthropicDisabledThinking.md b/docs/v2/LanguageModels/models/AnthropicDisabledThinking.md deleted file mode 100644 index 241fa83a2..000000000 --- a/docs/v2/LanguageModels/models/AnthropicDisabledThinking.md +++ /dev/null @@ -1,11 +0,0 @@ -# AnthropicDisabledThinking - -AnthropicDisabledThinking - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["disabled"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/models/AnthropicDocument.md b/docs/v2/LanguageModels/models/AnthropicDocument.md deleted file mode 100644 index c7e6e4be8..000000000 --- a/docs/v2/LanguageModels/models/AnthropicDocument.md +++ /dev/null @@ -1,16 +0,0 @@ -# AnthropicDocument - -AnthropicDocument - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**source** | AnthropicDocumentSource | Yes | | -**cache_control** | Optional[AnthropicCacheControl] | No | | -**citations** | Optional[AnthropicDocumentCitations] | No | | -**context** | Optional[str] | No | | -**title** | Optional[str] | No | | -**type** | Literal["document"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/models/AnthropicDocumentCitations.md b/docs/v2/LanguageModels/models/AnthropicDocumentCitations.md deleted file mode 100644 index a55f2feb3..000000000 --- a/docs/v2/LanguageModels/models/AnthropicDocumentCitations.md +++ /dev/null @@ -1,11 +0,0 @@ -# AnthropicDocumentCitations - -AnthropicDocumentCitations - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**enabled** | bool | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/models/AnthropicDocumentSource.md b/docs/v2/LanguageModels/models/AnthropicDocumentSource.md deleted file mode 100644 index d93c3c5e5..000000000 --- a/docs/v2/LanguageModels/models/AnthropicDocumentSource.md +++ /dev/null @@ -1,16 +0,0 @@ -# AnthropicDocumentSource - -AnthropicDocumentSource - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -AnthropicBase64PdfDocumentSource | pdf -AnthropicTextDocumentSource | text - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/models/AnthropicEnabledThinking.md b/docs/v2/LanguageModels/models/AnthropicEnabledThinking.md deleted file mode 100644 index b0e6f7466..000000000 --- a/docs/v2/LanguageModels/models/AnthropicEnabledThinking.md +++ /dev/null @@ -1,12 +0,0 @@ -# AnthropicEnabledThinking - -AnthropicEnabledThinking - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**budget_tokens** | int | Yes | Must be greater than 1024. | -**type** | Literal["enabled"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/models/AnthropicEphemeralCacheControl.md b/docs/v2/LanguageModels/models/AnthropicEphemeralCacheControl.md deleted file mode 100644 index 59c91bf87..000000000 --- a/docs/v2/LanguageModels/models/AnthropicEphemeralCacheControl.md +++ /dev/null @@ -1,11 +0,0 @@ -# AnthropicEphemeralCacheControl - -This currently does not support the ttl field, but will in the future. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["ephemeral"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/models/AnthropicImage.md b/docs/v2/LanguageModels/models/AnthropicImage.md deleted file mode 100644 index bf5cf6536..000000000 --- a/docs/v2/LanguageModels/models/AnthropicImage.md +++ /dev/null @@ -1,13 +0,0 @@ -# AnthropicImage - -AnthropicImage - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**source** | AnthropicImageSource | Yes | | -**cache_control** | Optional[AnthropicCacheControl] | No | | -**type** | Literal["image"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/models/AnthropicImageBase64Source.md b/docs/v2/LanguageModels/models/AnthropicImageBase64Source.md deleted file mode 100644 index d986361a7..000000000 --- a/docs/v2/LanguageModels/models/AnthropicImageBase64Source.md +++ /dev/null @@ -1,13 +0,0 @@ -# AnthropicImageBase64Source - -AnthropicImageBase64Source - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**data** | str | Yes | | -**media_type** | AnthropicMediaType | Yes | This can include image/jpeg, image/png, image/gif or image/webp. | -**type** | Literal["base64"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/models/AnthropicImageSource.md b/docs/v2/LanguageModels/models/AnthropicImageSource.md deleted file mode 100644 index f7323d76c..000000000 --- a/docs/v2/LanguageModels/models/AnthropicImageSource.md +++ /dev/null @@ -1,11 +0,0 @@ -# AnthropicImageSource - -AnthropicImageSource - -## Type -```python -AnthropicImageBase64Source -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/models/AnthropicMediaType.md b/docs/v2/LanguageModels/models/AnthropicMediaType.md deleted file mode 100644 index 965b6ca66..000000000 --- a/docs/v2/LanguageModels/models/AnthropicMediaType.md +++ /dev/null @@ -1,13 +0,0 @@ -# AnthropicMediaType - -AnthropicMediaType - -| **Value** | -| --------- | -| `"IMAGE_JPEG"` | -| `"IMAGE_PNG"` | -| `"IMAGE_GIF"` | -| `"IMAGE_WEBP"` | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/models/AnthropicMessage.md b/docs/v2/LanguageModels/models/AnthropicMessage.md deleted file mode 100644 index 76d956adc..000000000 --- a/docs/v2/LanguageModels/models/AnthropicMessage.md +++ /dev/null @@ -1,12 +0,0 @@ -# AnthropicMessage - -AnthropicMessage - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**content** | List[AnthropicMessageContent] | Yes | | -**role** | AnthropicMessageRole | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/models/AnthropicMessageContent.md b/docs/v2/LanguageModels/models/AnthropicMessageContent.md deleted file mode 100644 index 35d2fc50d..000000000 --- a/docs/v2/LanguageModels/models/AnthropicMessageContent.md +++ /dev/null @@ -1,21 +0,0 @@ -# AnthropicMessageContent - -AnthropicMessageContent - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -AnthropicImage | image -AnthropicToolUse | toolUse -AnthropicDocument | document -AnthropicText | text -AnthropicToolResult | toolResult -AnthropicThinking | thinking -AnthropicRedactedThinking | redactedThinking - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/models/AnthropicMessageRole.md b/docs/v2/LanguageModels/models/AnthropicMessageRole.md deleted file mode 100644 index 8be7cd75f..000000000 --- a/docs/v2/LanguageModels/models/AnthropicMessageRole.md +++ /dev/null @@ -1,11 +0,0 @@ -# AnthropicMessageRole - -AnthropicMessageRole - -| **Value** | -| --------- | -| `"USER"` | -| `"ASSISTANT"` | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/models/AnthropicMessagesRequest.md b/docs/v2/LanguageModels/models/AnthropicMessagesRequest.md deleted file mode 100644 index 9f0f11c23..000000000 --- a/docs/v2/LanguageModels/models/AnthropicMessagesRequest.md +++ /dev/null @@ -1,20 +0,0 @@ -# AnthropicMessagesRequest - -AnthropicMessagesRequest - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**messages** | List[AnthropicMessage] | Yes | Input messages to the model. This can include a single user-role message or multiple messages with alternating user and assistant roles. | -**max_tokens** | int | Yes | The maximum number of tokens to generate before stopping. | -**stop_sequences** | Optional[List[str]] | No | Custom text sequences that will cause the model to stop generating. | -**system** | Optional[List[AnthropicSystemMessage]] | No | A system prompt is a way of providing context and instructions to Claude, such as specifying a particular goal or role. As of now, sending multiple system prompts is not supported. | -**temperature** | Optional[float] | No | Amount of randomness injected into the response. Ranges from 0.0 to 1.0. Note that even with temperature of 0.0, the results will not be fully deterministic. Defaults to 1.0 | -**thinking** | Optional[AnthropicThinkingConfig] | No | Configuration for enabling Claude's extended thinking. | -**tool_choice** | Optional[AnthropicToolChoice] | No | How the model should use the provided tools. | -**tools** | Optional[List[AnthropicTool]] | No | Definitions of tools that the model may use. | -**top_k** | Optional[int] | No | Only sample from the top K options for each subsequent token. | -**top_p** | Optional[float] | No | Use nucleus sampling. You should either alter temperature or top_p, but not both | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/models/AnthropicMessagesResponse.md b/docs/v2/LanguageModels/models/AnthropicMessagesResponse.md deleted file mode 100644 index b34ce66b6..000000000 --- a/docs/v2/LanguageModels/models/AnthropicMessagesResponse.md +++ /dev/null @@ -1,17 +0,0 @@ -# AnthropicMessagesResponse - -AnthropicMessagesResponse - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**content** | List[AnthropicCompletionContent] | Yes | | -**id** | str | Yes | | -**model** | str | Yes | | -**role** | AnthropicMessageRole | Yes | | -**stop_reason** | Optional[str] | No | | -**stop_sequence** | Optional[str] | No | | -**usage** | AnthropicTokenUsage | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/models/AnthropicNoneToolChoice.md b/docs/v2/LanguageModels/models/AnthropicNoneToolChoice.md deleted file mode 100644 index 8faf33edd..000000000 --- a/docs/v2/LanguageModels/models/AnthropicNoneToolChoice.md +++ /dev/null @@ -1,11 +0,0 @@ -# AnthropicNoneToolChoice - -AnthropicNoneToolChoice - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["none"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/models/AnthropicRedactedThinking.md b/docs/v2/LanguageModels/models/AnthropicRedactedThinking.md deleted file mode 100644 index f7a73b280..000000000 --- a/docs/v2/LanguageModels/models/AnthropicRedactedThinking.md +++ /dev/null @@ -1,12 +0,0 @@ -# AnthropicRedactedThinking - -AnthropicRedactedThinking - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**data** | str | Yes | | -**type** | Literal["redactedThinking"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/models/AnthropicSystemMessage.md b/docs/v2/LanguageModels/models/AnthropicSystemMessage.md deleted file mode 100644 index 696a662f7..000000000 --- a/docs/v2/LanguageModels/models/AnthropicSystemMessage.md +++ /dev/null @@ -1,11 +0,0 @@ -# AnthropicSystemMessage - -AnthropicSystemMessage - -## Type -```python -AnthropicText -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/models/AnthropicText.md b/docs/v2/LanguageModels/models/AnthropicText.md deleted file mode 100644 index 4a805b313..000000000 --- a/docs/v2/LanguageModels/models/AnthropicText.md +++ /dev/null @@ -1,14 +0,0 @@ -# AnthropicText - -AnthropicText - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**text** | str | Yes | | -**citations** | Optional[List[AnthropicCompletionCitation]] | No | | -**cache_control** | Optional[AnthropicCacheControl] | No | | -**type** | Literal["text"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/models/AnthropicTextDocumentSource.md b/docs/v2/LanguageModels/models/AnthropicTextDocumentSource.md deleted file mode 100644 index c9209a343..000000000 --- a/docs/v2/LanguageModels/models/AnthropicTextDocumentSource.md +++ /dev/null @@ -1,12 +0,0 @@ -# AnthropicTextDocumentSource - -AnthropicTextDocumentSource - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**data** | str | Yes | | -**type** | Literal["text"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/models/AnthropicThinking.md b/docs/v2/LanguageModels/models/AnthropicThinking.md deleted file mode 100644 index 7b9ac39b3..000000000 --- a/docs/v2/LanguageModels/models/AnthropicThinking.md +++ /dev/null @@ -1,13 +0,0 @@ -# AnthropicThinking - -AnthropicThinking - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**signature** | str | Yes | | -**thinking** | str | Yes | | -**type** | Literal["thinking"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/models/AnthropicThinkingConfig.md b/docs/v2/LanguageModels/models/AnthropicThinkingConfig.md deleted file mode 100644 index c21f97b71..000000000 --- a/docs/v2/LanguageModels/models/AnthropicThinkingConfig.md +++ /dev/null @@ -1,16 +0,0 @@ -# AnthropicThinkingConfig - -AnthropicThinkingConfig - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -AnthropicDisabledThinking | disabled -AnthropicEnabledThinking | enabled - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/models/AnthropicTokenUsage.md b/docs/v2/LanguageModels/models/AnthropicTokenUsage.md deleted file mode 100644 index 7a23b09c1..000000000 --- a/docs/v2/LanguageModels/models/AnthropicTokenUsage.md +++ /dev/null @@ -1,14 +0,0 @@ -# AnthropicTokenUsage - -AnthropicTokenUsage - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**cache_creation_input_tokens** | Optional[int] | No | | -**cache_read_input_tokens** | Optional[int] | No | | -**input_tokens** | int | Yes | | -**output_tokens** | int | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/models/AnthropicTool.md b/docs/v2/LanguageModels/models/AnthropicTool.md deleted file mode 100644 index 0f305ea1e..000000000 --- a/docs/v2/LanguageModels/models/AnthropicTool.md +++ /dev/null @@ -1,11 +0,0 @@ -# AnthropicTool - -AnthropicTool - -## Type -```python -AnthropicCustomTool -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/models/AnthropicToolChoice.md b/docs/v2/LanguageModels/models/AnthropicToolChoice.md deleted file mode 100644 index 7cc6f8700..000000000 --- a/docs/v2/LanguageModels/models/AnthropicToolChoice.md +++ /dev/null @@ -1,18 +0,0 @@ -# AnthropicToolChoice - -AnthropicToolChoice - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -AnthropicAutoToolChoice | auto -AnthropicNoneToolChoice | none -AnthropicAnyToolChoice | any -AnthropicToolToolChoice | tool - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/models/AnthropicToolResult.md b/docs/v2/LanguageModels/models/AnthropicToolResult.md deleted file mode 100644 index b3e536df9..000000000 --- a/docs/v2/LanguageModels/models/AnthropicToolResult.md +++ /dev/null @@ -1,15 +0,0 @@ -# AnthropicToolResult - -AnthropicToolResult - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**tool_use_id** | str | Yes | | -**content** | Optional[List[AnthropicToolResultContent]] | No | | -**is_error** | Optional[bool] | No | | -**cache_control** | Optional[AnthropicCacheControl] | No | | -**type** | Literal["toolResult"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/models/AnthropicToolResultContent.md b/docs/v2/LanguageModels/models/AnthropicToolResultContent.md deleted file mode 100644 index 46df5f9ff..000000000 --- a/docs/v2/LanguageModels/models/AnthropicToolResultContent.md +++ /dev/null @@ -1,11 +0,0 @@ -# AnthropicToolResultContent - -AnthropicToolResultContent - -## Type -```python -AnthropicText -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/models/AnthropicToolToolChoice.md b/docs/v2/LanguageModels/models/AnthropicToolToolChoice.md deleted file mode 100644 index f5d08e54b..000000000 --- a/docs/v2/LanguageModels/models/AnthropicToolToolChoice.md +++ /dev/null @@ -1,13 +0,0 @@ -# AnthropicToolToolChoice - -AnthropicToolToolChoice - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**name** | str | Yes | | -**disable_parallel_tool_use** | Optional[AnthropicDisableParallelToolUse] | No | | -**type** | Literal["tool"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/models/AnthropicToolUse.md b/docs/v2/LanguageModels/models/AnthropicToolUse.md deleted file mode 100644 index 2f14ce5cd..000000000 --- a/docs/v2/LanguageModels/models/AnthropicToolUse.md +++ /dev/null @@ -1,15 +0,0 @@ -# AnthropicToolUse - -AnthropicToolUse - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**id** | str | Yes | | -**input** | Any | Yes | | -**name** | str | Yes | | -**cache_control** | Optional[AnthropicCacheControl] | No | | -**type** | Literal["toolUse"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/models/JsonSchema.md b/docs/v2/LanguageModels/models/JsonSchema.md deleted file mode 100644 index 8861af966..000000000 --- a/docs/v2/LanguageModels/models/JsonSchema.md +++ /dev/null @@ -1,11 +0,0 @@ -# JsonSchema - -JsonSchema - -## Type -```python -Dict[str, Any] -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/models/LanguageModelApiName.md b/docs/v2/LanguageModels/models/LanguageModelApiName.md deleted file mode 100644 index 3d645ac01..000000000 --- a/docs/v2/LanguageModels/models/LanguageModelApiName.md +++ /dev/null @@ -1,11 +0,0 @@ -# LanguageModelApiName - -The name of the LanguageModel in the API. - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/models/OpenAiEmbeddingInput.md b/docs/v2/LanguageModels/models/OpenAiEmbeddingInput.md deleted file mode 100644 index e8448a3a4..000000000 --- a/docs/v2/LanguageModels/models/OpenAiEmbeddingInput.md +++ /dev/null @@ -1,11 +0,0 @@ -# OpenAiEmbeddingInput - -OpenAiEmbeddingInput - -## Type -```python -List[str] -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/models/OpenAiEmbeddingTokenUsage.md b/docs/v2/LanguageModels/models/OpenAiEmbeddingTokenUsage.md deleted file mode 100644 index ca838d9e2..000000000 --- a/docs/v2/LanguageModels/models/OpenAiEmbeddingTokenUsage.md +++ /dev/null @@ -1,11 +0,0 @@ -# OpenAiEmbeddingTokenUsage - -OpenAiEmbeddingTokenUsage - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**prompt_tokens** | int | Yes | Number of tokens in the prompt | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/models/OpenAiEmbeddingsRequest.md b/docs/v2/LanguageModels/models/OpenAiEmbeddingsRequest.md deleted file mode 100644 index eb55eb7b4..000000000 --- a/docs/v2/LanguageModels/models/OpenAiEmbeddingsRequest.md +++ /dev/null @@ -1,13 +0,0 @@ -# OpenAiEmbeddingsRequest - -OpenAiEmbeddingsRequest - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**input** | OpenAiEmbeddingInput | Yes | Input text to embed, encoded as an array of strings. Each input must not exceed the max input tokens for the model (8192 tokens for all embedding models). | -**dimensions** | Optional[int] | No | The number of dimensions the resulting output embeddings should have. Only supported in text-embedding-3 and later models. | -**encoding_format** | Optional[OpenAiEncodingFormat] | No | The format to return the embeddings in. Can be either float or base64. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/models/OpenAiEmbeddingsResponse.md b/docs/v2/LanguageModels/models/OpenAiEmbeddingsResponse.md deleted file mode 100644 index 00d4c65a3..000000000 --- a/docs/v2/LanguageModels/models/OpenAiEmbeddingsResponse.md +++ /dev/null @@ -1,13 +0,0 @@ -# OpenAiEmbeddingsResponse - -OpenAiEmbeddingsResponse - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**data** | List[List[float]] | Yes | List of embedding vectors | -**model** | str | Yes | The ID of the model used | -**usage** | OpenAiEmbeddingTokenUsage | Yes | Usage statistics for the request | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/models/OpenAiEncodingFormat.md b/docs/v2/LanguageModels/models/OpenAiEncodingFormat.md deleted file mode 100644 index 9a4f1118e..000000000 --- a/docs/v2/LanguageModels/models/OpenAiEncodingFormat.md +++ /dev/null @@ -1,11 +0,0 @@ -# OpenAiEncodingFormat - -OpenAiEncodingFormat - -| **Value** | -| --------- | -| `"FLOAT"` | -| `"BASE64"` | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/MediaSets/MediaSet.md b/docs/v2/MediaSets/MediaSet.md deleted file mode 100644 index 218237f88..000000000 --- a/docs/v2/MediaSets/MediaSet.md +++ /dev/null @@ -1,751 +0,0 @@ -# MediaSet - -Method | HTTP request | Release Stage | -------------- | ------------- | ----- | -[**abort**](#abort) | **POST** /v2/mediasets/{mediaSetRid}/transactions/{transactionId}/abort | Public Beta | -[**calculate**](#calculate) | **GET** /v2/mediasets/{mediaSetRid}/items/{mediaItemRid}/transform/imagery/thumbnail/calculate | Private Beta | -[**commit**](#commit) | **POST** /v2/mediasets/{mediaSetRid}/transactions/{transactionId}/commit | Public Beta | -[**create**](#create) | **POST** /v2/mediasets/{mediaSetRid}/transactions | Public Beta | -[**get_rid_by_path**](#get_rid_by_path) | **GET** /v2/mediasets/{mediaSetRid}/items/getRidByPath | Public Beta | -[**info**](#info) | **GET** /v2/mediasets/{mediaSetRid}/items/{mediaItemRid} | Public Beta | -[**read**](#read) | **GET** /v2/mediasets/{mediaSetRid}/items/{mediaItemRid}/content | Public Beta | -[**read_original**](#read_original) | **GET** /v2/mediasets/{mediaSetRid}/items/{mediaItemRid}/original | Public Beta | -[**reference**](#reference) | **GET** /v2/mediasets/{mediaSetRid}/items/{mediaItemRid}/reference | Public Beta | -[**retrieve**](#retrieve) | **GET** /v2/mediasets/{mediaSetRid}/items/{mediaItemRid}/transform/imagery/thumbnail/retrieve | Private Beta | -[**upload**](#upload) | **POST** /v2/mediasets/{mediaSetRid}/items | Public Beta | -[**upload_media**](#upload_media) | **PUT** /v2/mediasets/media/upload | Public Beta | - -# **abort** -Aborts an open transaction. Items uploaded to the media set during this transaction will be deleted. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**media_set_rid** | MediaSetRid | | | -**transaction_id** | TransactionId | | | -**preview** | Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. | [optional] | - -### Return type -**None** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# MediaSetRid -media_set_rid = None -# TransactionId -transaction_id = None -# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. -preview = None - - -try: - api_response = client.media_sets.MediaSet.abort(media_set_rid, transaction_id, preview=preview) - print("The abort response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling MediaSet.abort: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**204** | None | | None | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **calculate** -Starts calculation of a thumbnail for a given image. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**media_set_rid** | MediaSetRid | The RID of the media set. | | -**media_item_rid** | MediaItemRid | The RID of the media item. | | -**preview** | Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. | [optional] | -**read_token** | Optional[MediaItemReadToken] | | [optional] | - -### Return type -**TrackedTransformationResponse** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# MediaSetRid | The RID of the media set. -media_set_rid = None -# MediaItemRid | The RID of the media item. -media_item_rid = None -# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. -preview = None -# Optional[MediaItemReadToken] -read_token = None - - -try: - api_response = client.media_sets.MediaSet.calculate( - media_set_rid, media_item_rid, preview=preview, read_token=read_token - ) - print("The calculate response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling MediaSet.calculate: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | TrackedTransformationResponse | Status of the thumbnail calculation. Type will be 'successful' if the thumbnail is available, 'pending' if the thumbnail is being calculated, and 'failed' if there was an error. | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **commit** -Commits an open transaction. On success, items uploaded to the media set during this transaction will become available. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**media_set_rid** | MediaSetRid | | | -**transaction_id** | TransactionId | | | -**preview** | Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. | [optional] | - -### Return type -**None** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# MediaSetRid -media_set_rid = None -# TransactionId -transaction_id = None -# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. -preview = None - - -try: - api_response = client.media_sets.MediaSet.commit(media_set_rid, transaction_id, preview=preview) - print("The commit response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling MediaSet.commit: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**204** | None | | None | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **create** -Creates a new transaction. Items uploaded to the media set while this transaction is open will not be reflected until the transaction is committed. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**media_set_rid** | MediaSetRid | | | -**branch_name** | Optional[BranchName] | The branch on which to open the transaction. Defaults to `master` for most enrollments. | [optional] | -**preview** | Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. | [optional] | - -### Return type -**TransactionId** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# MediaSetRid -media_set_rid = None -# Optional[BranchName] | The branch on which to open the transaction. Defaults to `master` for most enrollments. -branch_name = None -# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. -preview = None - - -try: - api_response = client.media_sets.MediaSet.create( - media_set_rid, branch_name=branch_name, preview=preview - ) - print("The create response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling MediaSet.create: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | TransactionId | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **get_rid_by_path** -Returns the media item RID for the media item with the specified path. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**media_set_rid** | MediaSetRid | The RID of the media set. | | -**media_item_path** | MediaItemPath | The path of the media item. | | -**branch_name** | Optional[BranchName] | Specifies the specific branch by name in which to search for this media item. May not be provided if branch rid or view rid are provided. | [optional] | -**branch_rid** | Optional[BranchRid] | Specifies the specific branch by rid in which to search for this media item. May not be provided if branch name or view rid are provided. | [optional] | -**preview** | Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. | [optional] | -**view_rid** | Optional[MediaSetViewRid] | Specifies the specific view by rid in which to search for this media item. May not be provided if branch name or branch rid are provided. | [optional] | - -### Return type -**GetMediaItemRidByPathResponse** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# MediaSetRid | The RID of the media set. -media_set_rid = None -# MediaItemPath | The path of the media item. -media_item_path = None -# Optional[BranchName] | Specifies the specific branch by name in which to search for this media item. May not be provided if branch rid or view rid are provided. -branch_name = None -# Optional[BranchRid] | Specifies the specific branch by rid in which to search for this media item. May not be provided if branch name or view rid are provided. -branch_rid = None -# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. -preview = None -# Optional[MediaSetViewRid] | Specifies the specific view by rid in which to search for this media item. May not be provided if branch name or branch rid are provided. -view_rid = None - - -try: - api_response = client.media_sets.MediaSet.get_rid_by_path( - media_set_rid, - media_item_path=media_item_path, - branch_name=branch_name, - branch_rid=branch_rid, - preview=preview, - view_rid=view_rid, - ) - print("The get_rid_by_path response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling MediaSet.get_rid_by_path: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | GetMediaItemRidByPathResponse | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **info** -Gets information about the media item. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**media_set_rid** | MediaSetRid | The RID of the media set. | | -**media_item_rid** | MediaItemRid | The RID of the media item. | | -**preview** | Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. | [optional] | -**read_token** | Optional[MediaItemReadToken] | | [optional] | - -### Return type -**GetMediaItemInfoResponse** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# MediaSetRid | The RID of the media set. -media_set_rid = None -# MediaItemRid | The RID of the media item. -media_item_rid = None -# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. -preview = None -# Optional[MediaItemReadToken] -read_token = None - - -try: - api_response = client.media_sets.MediaSet.info( - media_set_rid, media_item_rid, preview=preview, read_token=read_token - ) - print("The info response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling MediaSet.info: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | GetMediaItemInfoResponse | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **read** -Gets the content of a media item. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**media_set_rid** | MediaSetRid | | | -**media_item_rid** | MediaItemRid | | | -**preview** | Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. | [optional] | -**read_token** | Optional[MediaItemReadToken] | | [optional] | - -### Return type -**bytes** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# MediaSetRid -media_set_rid = None -# MediaItemRid -media_item_rid = None -# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. -preview = None -# Optional[MediaItemReadToken] -read_token = None - - -try: - api_response = client.media_sets.MediaSet.read( - media_set_rid, media_item_rid, preview=preview, read_token=read_token - ) - print("The read response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling MediaSet.read: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | bytes | The content stream. | */* | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **read_original** -Gets the content of an original file uploaded to the media item, even if it was transformed on upload due to being an additional input format. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**media_set_rid** | MediaSetRid | | | -**media_item_rid** | MediaItemRid | | | -**preview** | Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. | [optional] | -**read_token** | Optional[MediaItemReadToken] | | [optional] | - -### Return type -**bytes** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# MediaSetRid -media_set_rid = None -# MediaItemRid -media_item_rid = None -# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. -preview = None -# Optional[MediaItemReadToken] -read_token = None - - -try: - api_response = client.media_sets.MediaSet.read_original( - media_set_rid, media_item_rid, preview=preview, read_token=read_token - ) - print("The read_original response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling MediaSet.read_original: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | bytes | The content stream. | */* | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **reference** -Gets the [media reference](https://palantir.com/docs/foundry/data-integration/media-sets/#media-references) for this media item. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**media_set_rid** | MediaSetRid | The RID of the media set. | | -**media_item_rid** | MediaItemRid | The RID of the media item. | | -**preview** | Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. | [optional] | -**read_token** | Optional[MediaItemReadToken] | | [optional] | - -### Return type -**MediaReference** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# MediaSetRid | The RID of the media set. -media_set_rid = None -# MediaItemRid | The RID of the media item. -media_item_rid = None -# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. -preview = None -# Optional[MediaItemReadToken] -read_token = None - - -try: - api_response = client.media_sets.MediaSet.reference( - media_set_rid, media_item_rid, preview=preview, read_token=read_token - ) - print("The reference response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling MediaSet.reference: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | MediaReference | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **retrieve** -Retrieves a successfully calculated thumbnail for a given image. - -Thumbnails are 200px wide in the format of `image/webp` - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**media_set_rid** | MediaSetRid | The RID of the media set. | | -**media_item_rid** | MediaItemRid | The RID of the media item. | | -**preview** | Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. | [optional] | -**read_token** | Optional[MediaItemReadToken] | | [optional] | - -### Return type -**bytes** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# MediaSetRid | The RID of the media set. -media_set_rid = None -# MediaItemRid | The RID of the media item. -media_item_rid = None -# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. -preview = None -# Optional[MediaItemReadToken] -read_token = None - - -try: - api_response = client.media_sets.MediaSet.retrieve( - media_set_rid, media_item_rid, preview=preview, read_token=read_token - ) - print("The retrieve response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling MediaSet.retrieve: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | bytes | Retrieves the thumbnail of an image (if available). | */* | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **upload** -Uploads a media item to an existing media set. -The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`. -A branch name, or branch rid, or view rid may optionally be specified. If none is specified, the item will be uploaded to the default branch. If more than one is specified, an error is thrown. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**media_set_rid** | MediaSetRid | | | -**body** | bytes | Body of the request | | -**branch_name** | Optional[BranchName] | Specifies the specific branch by name to which this media item will be uploaded. May not be provided if branch rid or view rid are provided. | [optional] | -**branch_rid** | Optional[BranchRid] | Specifies the specific branch by rid to which this media item will be uploaded. May not be provided if branch name or view rid are provided. | [optional] | -**media_item_path** | Optional[MediaItemPath] | An identifier for a media item within a media set. Necessary if the backing media set requires paths. | [optional] | -**preview** | Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. | [optional] | -**transaction_id** | Optional[TransactionId] | The id of the transaction associated with this request. Required if this is a transactional media set. | [optional] | -**view_rid** | Optional[MediaSetViewRid] | Specifies the specific view by rid to which this media item will be uploaded. May not be provided if branch name or branch rid are provided. | [optional] | - -### Return type -**PutMediaItemResponse** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# MediaSetRid -media_set_rid = None -# bytes | Body of the request -body = None -# Optional[BranchName] | Specifies the specific branch by name to which this media item will be uploaded. May not be provided if branch rid or view rid are provided. -branch_name = None -# Optional[BranchRid] | Specifies the specific branch by rid to which this media item will be uploaded. May not be provided if branch name or view rid are provided. -branch_rid = None -# Optional[MediaItemPath] | An identifier for a media item within a media set. Necessary if the backing media set requires paths. -media_item_path = "q3-data%2fmy-file.png" -# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. -preview = None -# Optional[TransactionId] | The id of the transaction associated with this request. Required if this is a transactional media set. -transaction_id = None -# Optional[MediaSetViewRid] | Specifies the specific view by rid to which this media item will be uploaded. May not be provided if branch name or branch rid are provided. -view_rid = None - - -try: - api_response = client.media_sets.MediaSet.upload( - media_set_rid, - body, - branch_name=branch_name, - branch_rid=branch_rid, - media_item_path=media_item_path, - preview=preview, - transaction_id=transaction_id, - view_rid=view_rid, - ) - print("The upload response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling MediaSet.upload: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | PutMediaItemResponse | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **upload_media** -Uploads a temporary media item. If the media item isn't persisted within 1 hour, the item will be deleted. - -If multiple resources are attributed to, usage will be attributed to the first one in the list. - -The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`. -Third-party applications using this endpoint via OAuth2 must request the following operation scopes: `api:ontologies-read api:ontologies-write`. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**body** | bytes | Body of the request | | -**filename** | MediaItemPath | The path to write the media item to. Required if the backing media set requires paths. | | -**attribution** | Optional[Attribution] | used for passing through usage attribution | [optional] | -**preview** | Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. | [optional] | - -### Return type -**MediaReference** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# bytes | Body of the request -body = None -# MediaItemPath | The path to write the media item to. Required if the backing media set requires paths. -filename = "my-file.png" -# Optional[Attribution] | used for passing through usage attribution -attribution = None -# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. -preview = None - - -try: - api_response = client.media_sets.MediaSet.upload_media( - body, filename=filename, attribution=attribution, preview=preview - ) - print("The upload_media response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling MediaSet.upload_media: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | MediaReference | The media reference for the uploaded media. | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - diff --git a/docs/v2/MediaSets/models/BranchName.md b/docs/v2/MediaSets/models/BranchName.md deleted file mode 100644 index 5c55ddb99..000000000 --- a/docs/v2/MediaSets/models/BranchName.md +++ /dev/null @@ -1,13 +0,0 @@ -# BranchName - -A name for a media set branch. Valid branch names must be (a) non-empty, (b) less than 256 characters, and -(c) not a valid ResourceIdentifier. - - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/MediaSets/models/BranchRid.md b/docs/v2/MediaSets/models/BranchRid.md deleted file mode 100644 index 777c15e0b..000000000 --- a/docs/v2/MediaSets/models/BranchRid.md +++ /dev/null @@ -1,12 +0,0 @@ -# BranchRid - -A resource identifier that identifies a branch of a media set. - - -## Type -```python -RID -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/MediaSets/models/GetMediaItemInfoResponse.md b/docs/v2/MediaSets/models/GetMediaItemInfoResponse.md deleted file mode 100644 index 8be4abc2c..000000000 --- a/docs/v2/MediaSets/models/GetMediaItemInfoResponse.md +++ /dev/null @@ -1,14 +0,0 @@ -# GetMediaItemInfoResponse - -GetMediaItemInfoResponse - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**view_rid** | MediaSetViewRid | Yes | | -**path** | Optional[MediaItemPath] | No | | -**logical_timestamp** | LogicalTimestamp | Yes | | -**attribution** | Optional[MediaAttribution] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/MediaSets/models/GetMediaItemRidByPathResponse.md b/docs/v2/MediaSets/models/GetMediaItemRidByPathResponse.md deleted file mode 100644 index ca2f0a314..000000000 --- a/docs/v2/MediaSets/models/GetMediaItemRidByPathResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetMediaItemRidByPathResponse - -GetMediaItemRidByPathResponse - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**media_item_rid** | Optional[MediaItemRid] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/MediaSets/models/LogicalTimestamp.md b/docs/v2/MediaSets/models/LogicalTimestamp.md deleted file mode 100644 index e6aa98992..000000000 --- a/docs/v2/MediaSets/models/LogicalTimestamp.md +++ /dev/null @@ -1,16 +0,0 @@ -# LogicalTimestamp - -A number representing a logical ordering to be used for transactions, etc. -This can be interpreted as a timestamp in microseconds, but may differ slightly from system clock time due -to clock drift and slight adjustments for the sake of ordering. - -Only positive timestamps (representing times after epoch) are supported. - - -## Type -```python -Long -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/MediaSets/models/MediaAttribution.md b/docs/v2/MediaSets/models/MediaAttribution.md deleted file mode 100644 index 46ab5291a..000000000 --- a/docs/v2/MediaSets/models/MediaAttribution.md +++ /dev/null @@ -1,12 +0,0 @@ -# MediaAttribution - -MediaAttribution - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**creator_id** | UserId | Yes | | -**creation_timestamp** | datetime | Yes | The timestamp when the media item was created, in ISO 8601 timestamp format. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/MediaSets/models/MediaItemXmlFormat.md b/docs/v2/MediaSets/models/MediaItemXmlFormat.md deleted file mode 100644 index 3bffaab93..000000000 --- a/docs/v2/MediaSets/models/MediaItemXmlFormat.md +++ /dev/null @@ -1,12 +0,0 @@ -# MediaItemXmlFormat - -Format of the media item attempted to be decoded based on the XML structure. - -| **Value** | -| --------- | -| `"DOCX"` | -| `"XLSX"` | -| `"PPTX"` | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/MediaSets/models/PutMediaItemResponse.md b/docs/v2/MediaSets/models/PutMediaItemResponse.md deleted file mode 100644 index 7effefec8..000000000 --- a/docs/v2/MediaSets/models/PutMediaItemResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# PutMediaItemResponse - -PutMediaItemResponse - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**media_item_rid** | MediaItemRid | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/MediaSets/models/TrackedTransformationFailedResponse.md b/docs/v2/MediaSets/models/TrackedTransformationFailedResponse.md deleted file mode 100644 index 69757680e..000000000 --- a/docs/v2/MediaSets/models/TrackedTransformationFailedResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# TrackedTransformationFailedResponse - -TrackedTransformationFailedResponse - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["failed"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/MediaSets/models/TrackedTransformationPendingResponse.md b/docs/v2/MediaSets/models/TrackedTransformationPendingResponse.md deleted file mode 100644 index f6c278d16..000000000 --- a/docs/v2/MediaSets/models/TrackedTransformationPendingResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# TrackedTransformationPendingResponse - -TrackedTransformationPendingResponse - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["pending"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/MediaSets/models/TrackedTransformationResponse.md b/docs/v2/MediaSets/models/TrackedTransformationResponse.md deleted file mode 100644 index 0ff4f7f98..000000000 --- a/docs/v2/MediaSets/models/TrackedTransformationResponse.md +++ /dev/null @@ -1,17 +0,0 @@ -# TrackedTransformationResponse - -TrackedTransformationResponse - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -TrackedTransformationPendingResponse | pending -TrackedTransformationFailedResponse | failed -TrackedTransformationSuccessfulResponse | successful - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/MediaSets/models/TrackedTransformationSuccessfulResponse.md b/docs/v2/MediaSets/models/TrackedTransformationSuccessfulResponse.md deleted file mode 100644 index f8387b022..000000000 --- a/docs/v2/MediaSets/models/TrackedTransformationSuccessfulResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# TrackedTransformationSuccessfulResponse - -TrackedTransformationSuccessfulResponse - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["successful"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/MediaSets/models/TransactionId.md b/docs/v2/MediaSets/models/TransactionId.md deleted file mode 100644 index 6780dfb8a..000000000 --- a/docs/v2/MediaSets/models/TransactionId.md +++ /dev/null @@ -1,12 +0,0 @@ -# TransactionId - -An identifier which represents a transaction on a media set. - - -## Type -```python -UUID -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Models/Model.md b/docs/v2/Models/Model.md deleted file mode 100644 index 520562b89..000000000 --- a/docs/v2/Models/Model.md +++ /dev/null @@ -1,112 +0,0 @@ -# Model - -Method | HTTP request | Release Stage | -------------- | ------------- | ----- | -[**create**](#create) | **POST** /v2/models | Private Beta | -[**get**](#get) | **GET** /v2/models/{modelRid} | Private Beta | - -# **create** -Creates a new Model with no versions. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**name** | ModelName | | | -**parent_folder_rid** | FolderRid | | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**Model** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# ModelName -name = "House Pricing Model" -# FolderRid -parent_folder_rid = "ri.compass.main.folder.c410f510-2937-420e-8ea3-8c9bcb3c1791" -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.models.Model.create( - name=name, parent_folder_rid=parent_folder_rid, preview=preview - ) - print("The create response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Model.create: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | Model | The created Model | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **get** -Retrieves a Model by its Resource Identifier (RID). - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**model_rid** | ModelRid | | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**Model** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# ModelRid -model_rid = None -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.models.Model.get(model_rid, preview=preview) - print("The get response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Model.get: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | Model | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - diff --git a/docs/v2/Models/ModelVersion.md b/docs/v2/Models/ModelVersion.md deleted file mode 100644 index 143426931..000000000 --- a/docs/v2/Models/ModelVersion.md +++ /dev/null @@ -1,212 +0,0 @@ -# ModelVersion - -Method | HTTP request | Release Stage | -------------- | ------------- | ----- | -[**create**](#create) | **POST** /v2/models/{modelRid}/versions | Private Beta | -[**get**](#get) | **GET** /v2/models/{modelRid}/versions/{modelVersionRid} | Private Beta | -[**list**](#list) | **GET** /v2/models/{modelRid}/versions | Private Beta | - -# **create** -Creates a new Model Version on an existing model. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**model_rid** | ModelRid | | | -**backing_repositories** | List[RID] | | | -**conda_requirements** | List[str] | | | -**model_api** | ModelApi | | | -**model_files** | ModelFiles | | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**ModelVersion** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# ModelRid -model_rid = None -# List[RID] -backing_repositories = None -# List[str] -conda_requirements = None -# ModelApi -model_api = { - "inputs": [ - { - "name": "input_df", - "required": True, - "type": "tabular", - "columns": [ - {"name": "feature_1", "required": True, "dataType": {"type": "double"}}, - {"name": "feature_2", "required": True, "dataType": {"type": "integer"}}, - ], - "format": "PANDAS", - } - ], - "outputs": [ - { - "name": "output_df", - "required": True, - "type": "tabular", - "columns": [{"name": "prediction", "required": True, "dataType": {"type": "double"}}], - "format": "SPARK", - } - ], -} -# ModelFiles -model_files = { - "type": "dill", - "serializedModelFunction": "base64-encoded string for a dill-serialize model function", -} -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.models.Model.Version.create( - model_rid, - backing_repositories=backing_repositories, - conda_requirements=conda_requirements, - model_api=model_api, - model_files=model_files, - preview=preview, - ) - print("The create response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Version.create: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | ModelVersion | The created ModelVersion | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **get** -Retrieves a Model Version by its Resource Identifier (RID). - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**model_rid** | ModelRid | | | -**model_version_rid** | ModelVersionRid | | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**ModelVersion** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# ModelRid -model_rid = None -# ModelVersionRid -model_version_rid = None -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.models.Model.Version.get(model_rid, model_version_rid, preview=preview) - print("The get response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Version.get: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | ModelVersion | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **list** -Lists all Model Versions for a given Model. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**model_rid** | ModelRid | | | -**page_size** | Optional[PageSize] | The page size to use for the endpoint. | [optional] | -**page_token** | Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. | [optional] | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**ListModelVersionsResponse** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# ModelRid -model_rid = None -# Optional[PageSize] | The page size to use for the endpoint. -page_size = None -# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. -page_token = None -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - for model_version in client.models.Model.Version.list( - model_rid, page_size=page_size, page_token=page_token, preview=preview - ): - pprint(model_version) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Version.list: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | ListModelVersionsResponse | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - diff --git a/docs/v2/Models/models/CreateModelRequest.md b/docs/v2/Models/models/CreateModelRequest.md deleted file mode 100644 index 0488fd878..000000000 --- a/docs/v2/Models/models/CreateModelRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# CreateModelRequest - -CreateModelRequest - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**name** | ModelName | Yes | | -**parent_folder_rid** | FolderRid | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Models/models/CreateModelVersionRequest.md b/docs/v2/Models/models/CreateModelVersionRequest.md deleted file mode 100644 index 3fad5a59f..000000000 --- a/docs/v2/Models/models/CreateModelVersionRequest.md +++ /dev/null @@ -1,14 +0,0 @@ -# CreateModelVersionRequest - -CreateModelVersionRequest - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**model_files** | ModelFiles | Yes | | -**backing_repositories** | List[RID] | Yes | | -**conda_requirements** | List[str] | Yes | | -**model_api** | ModelApi | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Models/models/DillModelFiles.md b/docs/v2/Models/models/DillModelFiles.md deleted file mode 100644 index 7a5ced371..000000000 --- a/docs/v2/Models/models/DillModelFiles.md +++ /dev/null @@ -1,12 +0,0 @@ -# DillModelFiles - -DillModelFiles - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**serialized_model_function** | str | Yes | | -**type** | Literal["dill"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Models/models/ListModelVersionsResponse.md b/docs/v2/Models/models/ListModelVersionsResponse.md deleted file mode 100644 index c5a795cfd..000000000 --- a/docs/v2/Models/models/ListModelVersionsResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListModelVersionsResponse - -ListModelVersionsResponse - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**data** | List[ModelVersion] | Yes | | -**next_page_token** | Optional[PageToken] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Models/models/Model.md b/docs/v2/Models/models/Model.md deleted file mode 100644 index 1848ea54f..000000000 --- a/docs/v2/Models/models/Model.md +++ /dev/null @@ -1,11 +0,0 @@ -# Model - -Model - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**rid** | ModelRid | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Models/models/ModelApi.md b/docs/v2/Models/models/ModelApi.md deleted file mode 100644 index 35eb23d05..000000000 --- a/docs/v2/Models/models/ModelApi.md +++ /dev/null @@ -1,13 +0,0 @@ -# ModelApi - -The Model API is a specification that describes the inputs and outputs of a machine learning model. It is used to define the interface for the model, including the types of data that can be passed to it and the types of data that it will return. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**inputs** | List[ModelApiInput] | Yes | | -**outputs** | List[ModelApiOutput] | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Models/models/ModelApiAnyType.md b/docs/v2/Models/models/ModelApiAnyType.md deleted file mode 100644 index d3a1d71f9..000000000 --- a/docs/v2/Models/models/ModelApiAnyType.md +++ /dev/null @@ -1,11 +0,0 @@ -# ModelApiAnyType - -ModelApiAnyType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["any"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Models/models/ModelApiArrayType.md b/docs/v2/Models/models/ModelApiArrayType.md deleted file mode 100644 index 4c09ac530..000000000 --- a/docs/v2/Models/models/ModelApiArrayType.md +++ /dev/null @@ -1,12 +0,0 @@ -# ModelApiArrayType - -ModelApiArrayType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**item_type** | ModelApiDataType | Yes | | -**type** | Literal["array"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Models/models/ModelApiColumn.md b/docs/v2/Models/models/ModelApiColumn.md deleted file mode 100644 index 74e4f3485..000000000 --- a/docs/v2/Models/models/ModelApiColumn.md +++ /dev/null @@ -1,13 +0,0 @@ -# ModelApiColumn - -ModelApiColumn - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**name** | str | Yes | | -**required** | Optional[bool] | No | true by default; false if the column can be null or omitted | -**data_type** | ModelApiDataType | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Models/models/ModelApiDataType.md b/docs/v2/Models/models/ModelApiDataType.md deleted file mode 100644 index 879c1746b..000000000 --- a/docs/v2/Models/models/ModelApiDataType.md +++ /dev/null @@ -1,26 +0,0 @@ -# ModelApiDataType - -ModelApiDataType - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -DateType | date -BooleanType | boolean -UnsupportedType | unsupported -StringType | string -ModelApiArrayType | array -DoubleType | double -IntegerType | integer -FloatType | float -ModelApiAnyType | any -ModelApiMapType | map -LongType | long -TimestampType | timestamp - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Models/models/ModelApiInput.md b/docs/v2/Models/models/ModelApiInput.md deleted file mode 100644 index 904873cd3..000000000 --- a/docs/v2/Models/models/ModelApiInput.md +++ /dev/null @@ -1,17 +0,0 @@ -# ModelApiInput - -ModelApiInput - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -UnsupportedType | unsupported -ModelApiParameterType | parameter -ModelApiTabularType | tabular - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Models/models/ModelApiMapType.md b/docs/v2/Models/models/ModelApiMapType.md deleted file mode 100644 index 3ea5c512f..000000000 --- a/docs/v2/Models/models/ModelApiMapType.md +++ /dev/null @@ -1,13 +0,0 @@ -# ModelApiMapType - -ModelApiMapType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**key_type** | ModelApiDataType | Yes | | -**value_type** | ModelApiDataType | Yes | | -**type** | Literal["map"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Models/models/ModelApiOutput.md b/docs/v2/Models/models/ModelApiOutput.md deleted file mode 100644 index d13948016..000000000 --- a/docs/v2/Models/models/ModelApiOutput.md +++ /dev/null @@ -1,17 +0,0 @@ -# ModelApiOutput - -ModelApiOutput - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -UnsupportedType | unsupported -ModelApiParameterType | parameter -ModelApiTabularType | tabular - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Models/models/ModelApiParameterType.md b/docs/v2/Models/models/ModelApiParameterType.md deleted file mode 100644 index 749200725..000000000 --- a/docs/v2/Models/models/ModelApiParameterType.md +++ /dev/null @@ -1,14 +0,0 @@ -# ModelApiParameterType - -ModelApiParameterType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**name** | str | Yes | | -**required** | Optional[bool] | No | true by default; false if the input or output can be null or omitted | -**data_type** | ModelApiDataType | Yes | | -**type** | Literal["parameter"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Models/models/ModelApiTabularFormat.md b/docs/v2/Models/models/ModelApiTabularFormat.md deleted file mode 100644 index 28c0c403c..000000000 --- a/docs/v2/Models/models/ModelApiTabularFormat.md +++ /dev/null @@ -1,11 +0,0 @@ -# ModelApiTabularFormat - -ModelApiTabularFormat - -| **Value** | -| --------- | -| `"PANDAS"` | -| `"SPARK"` | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Models/models/ModelApiTabularType.md b/docs/v2/Models/models/ModelApiTabularType.md deleted file mode 100644 index fce549c09..000000000 --- a/docs/v2/Models/models/ModelApiTabularType.md +++ /dev/null @@ -1,15 +0,0 @@ -# ModelApiTabularType - -ModelApiTabularType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**name** | str | Yes | | -**required** | Optional[bool] | No | true by default; false if the input or output can be null or omitted | -**columns** | List[ModelApiColumn] | Yes | | -**format** | Optional[ModelApiTabularFormat] | No | Dataframe format the model will receive or is expected to return for this input or output. PANDAS is the default. | -**type** | Literal["tabular"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Models/models/ModelFiles.md b/docs/v2/Models/models/ModelFiles.md deleted file mode 100644 index 6ab0393df..000000000 --- a/docs/v2/Models/models/ModelFiles.md +++ /dev/null @@ -1,13 +0,0 @@ -# ModelFiles - -The serialized data of a machine learning model. This can include the model's parameters, architecture, and any other relevant information needed to reconstruct the model. -Must be a base64-encoded string of a dill-serialized model function. - - -## Type -```python -DillModelFiles -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Models/models/ModelName.md b/docs/v2/Models/models/ModelName.md deleted file mode 100644 index 628cf4dc2..000000000 --- a/docs/v2/Models/models/ModelName.md +++ /dev/null @@ -1,11 +0,0 @@ -# ModelName - -ModelName - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Models/models/ModelRid.md b/docs/v2/Models/models/ModelRid.md deleted file mode 100644 index 131295b9f..000000000 --- a/docs/v2/Models/models/ModelRid.md +++ /dev/null @@ -1,11 +0,0 @@ -# ModelRid - -The Resource Identifier (RID) of a Model. - -## Type -```python -RID -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Models/models/ModelVersion.md b/docs/v2/Models/models/ModelVersion.md deleted file mode 100644 index 098f3e447..000000000 --- a/docs/v2/Models/models/ModelVersion.md +++ /dev/null @@ -1,14 +0,0 @@ -# ModelVersion - -ModelVersion - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**rid** | ModelVersionRid | Yes | | -**model_api** | ModelApi | Yes | | -**conda_requirements** | List[str] | Yes | | -**backing_repositories** | List[RID] | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Models/models/ModelVersionRid.md b/docs/v2/Models/models/ModelVersionRid.md deleted file mode 100644 index b38a6aa62..000000000 --- a/docs/v2/Models/models/ModelVersionRid.md +++ /dev/null @@ -1,11 +0,0 @@ -# ModelVersionRid - -The Resource Identifier (RID) of a Model Version. - -## Type -```python -RID -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/Action.md b/docs/v2/Ontologies/Action.md deleted file mode 100644 index d6c08fafc..000000000 --- a/docs/v2/Ontologies/Action.md +++ /dev/null @@ -1,256 +0,0 @@ -# Action - -Method | HTTP request | Release Stage | -------------- | ------------- | ----- | -[**apply**](#apply) | **POST** /v2/ontologies/{ontology}/actions/{action}/apply | Stable | -[**apply_batch**](#apply_batch) | **POST** /v2/ontologies/{ontology}/actions/{action}/applyBatch | Stable | -[**apply_with_overrides**](#apply_with_overrides) | **POST** /v2/ontologies/{ontology}/actions/{action}/applyWithOverrides | Private Beta | - -# **apply** -Applies an action using the given parameters. - -Changes to objects or links stored in Object Storage V1 are eventually consistent and may take some time to be visible. -Edits to objects or links in Object Storage V2 will be visible immediately after the action completes. - -Note that a 200 HTTP status code only indicates that the request was received and processed by the server. -See the validation result in the response body to determine if the action was applied successfully. - -Note that [parameter default values](https://palantir.com/docs/foundry/action-types/parameters-default-value/) are not currently supported by -this endpoint. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**ontology** | OntologyIdentifier | | | -**action** | ActionTypeApiName | The API name of the action to apply. To find the API name for your action, use the **List action types** endpoint or check the **Ontology Manager**. | | -**parameters** | Dict[ParameterId, Optional[DataValue]] | | | -**branch** | Optional[FoundryBranch] | The Foundry branch to apply the action against. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported. | [optional] | -**options** | Optional[ApplyActionRequestOptions] | | [optional] | -**sdk_package_rid** | Optional[SdkPackageRid] | The package rid of the generated SDK. | [optional] | -**sdk_version** | Optional[SdkVersion] | The version of the generated SDK. | [optional] | - -### Return type -**SyncApplyActionResponseV2** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# OntologyIdentifier -ontology = "palantir" -# ActionTypeApiName | The API name of the action to apply. To find the API name for your action, use the **List action types** endpoint or check the **Ontology Manager**. -action = "rename-employee" -# Dict[ParameterId, Optional[DataValue]] -parameters = {"id": 80060, "newName": "Anna Smith-Doe"} -# Optional[FoundryBranch] | The Foundry branch to apply the action against. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported. -branch = None -# Optional[ApplyActionRequestOptions] -options = None -# Optional[SdkPackageRid] | The package rid of the generated SDK. -sdk_package_rid = None -# Optional[SdkVersion] | The version of the generated SDK. -sdk_version = None - - -try: - api_response = client.ontologies.Action.apply( - ontology, - action, - parameters=parameters, - branch=branch, - options=options, - sdk_package_rid=sdk_package_rid, - sdk_version=sdk_version, - ) - print("The apply response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Action.apply: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | SyncApplyActionResponseV2 | Success response. | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **apply_batch** -Applies multiple actions (of the same Action Type) using the given parameters. - -Changes to objects or links stored in Object Storage V1 are eventually consistent and may take some time to be visible. -Edits to objects or links in Object Storage V2 will be visible immediately after the action completes. - -Up to 20 actions may be applied in one call. Actions that only modify objects in Object Storage v2 and do not -call Functions may receive a higher limit. - -Note that [notifications](https://palantir.com/docs/foundry/action-types/notifications/) are not currently supported by this endpoint. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**ontology** | OntologyIdentifier | | | -**action** | ActionTypeApiName | The API name of the action to apply. To find the API name for your action, use the **List action types** endpoint or check the **Ontology Manager**. | | -**requests** | List[BatchApplyActionRequestItem] | | | -**branch** | Optional[FoundryBranch] | The Foundry branch to apply the action against. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported. | [optional] | -**options** | Optional[BatchApplyActionRequestOptions] | | [optional] | -**sdk_package_rid** | Optional[SdkPackageRid] | The package rid of the generated SDK. | [optional] | -**sdk_version** | Optional[SdkVersion] | The version of the generated SDK. | [optional] | - -### Return type -**BatchApplyActionResponseV2** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# OntologyIdentifier -ontology = "palantir" -# ActionTypeApiName | The API name of the action to apply. To find the API name for your action, use the **List action types** endpoint or check the **Ontology Manager**. -action = "rename-employee" -# List[BatchApplyActionRequestItem] -requests = [ - {"parameters": {"id": 80060, "newName": "Anna Smith-Doe"}}, - {"parameters": {"id": 80061, "newName": "Joe Bloggs"}}, -] -# Optional[FoundryBranch] | The Foundry branch to apply the action against. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported. -branch = None -# Optional[BatchApplyActionRequestOptions] -options = None -# Optional[SdkPackageRid] | The package rid of the generated SDK. -sdk_package_rid = None -# Optional[SdkVersion] | The version of the generated SDK. -sdk_version = None - - -try: - api_response = client.ontologies.Action.apply_batch( - ontology, - action, - requests=requests, - branch=branch, - options=options, - sdk_package_rid=sdk_package_rid, - sdk_version=sdk_version, - ) - print("The apply_batch response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Action.apply_batch: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | BatchApplyActionResponseV2 | Success response. | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **apply_with_overrides** -Same as regular apply action operation, but allows specifying overrides for UniqueIdentifier and -CurrentTime generated action parameters. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**ontology** | OntologyIdentifier | | | -**action** | ActionTypeApiName | The API name of the action to apply. To find the API name for your action, use the **List action types** endpoint or check the **Ontology Manager**. | | -**overrides** | ApplyActionOverrides | | | -**request** | ApplyActionRequestV2 | | | -**branch** | Optional[FoundryBranch] | The Foundry branch to apply the action against. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported. | [optional] | -**sdk_package_rid** | Optional[SdkPackageRid] | The package rid of the generated SDK. | [optional] | -**sdk_version** | Optional[SdkVersion] | The version of the generated SDK. | [optional] | - -### Return type -**SyncApplyActionResponseV2** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# OntologyIdentifier -ontology = "palantir" -# ActionTypeApiName | The API name of the action to apply. To find the API name for your action, use the **List action types** endpoint or check the **Ontology Manager**. -action = "rename-employee" -# ApplyActionOverrides -overrides = { - "uniqueIdentifierLinkIdValues": { - "fd28fa5c-3028-4eca-bdc8-3be2c7949cd9": "4efdb11f-c1e3-417c-89fb-2225118b65e3" - }, - "actionExecutionTime": "2025-10-25T13:00:00Z", -} -# ApplyActionRequestV2 -request = {"parameters": {"id": 80060, "newName": "Anna Smith-Doe"}} -# Optional[FoundryBranch] | The Foundry branch to apply the action against. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported. -branch = None -# Optional[SdkPackageRid] | The package rid of the generated SDK. -sdk_package_rid = None -# Optional[SdkVersion] | The version of the generated SDK. -sdk_version = None - - -try: - api_response = client.ontologies.Action.apply_with_overrides( - ontology, - action, - overrides=overrides, - request=request, - branch=branch, - sdk_package_rid=sdk_package_rid, - sdk_version=sdk_version, - ) - print("The apply_with_overrides response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Action.apply_with_overrides: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | SyncApplyActionResponseV2 | Success response. | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - diff --git a/docs/v2/Ontologies/ActionType.md b/docs/v2/Ontologies/ActionType.md deleted file mode 100644 index 630b1f48d..000000000 --- a/docs/v2/Ontologies/ActionType.md +++ /dev/null @@ -1,179 +0,0 @@ -# ActionType - -Method | HTTP request | Release Stage | -------------- | ------------- | ----- | -[**get**](#get) | **GET** /v2/ontologies/{ontology}/actionTypes/{actionType} | Stable | -[**get_by_rid**](#get_by_rid) | **GET** /v2/ontologies/{ontology}/actionTypes/byRid/{actionTypeRid} | Stable | -[**list**](#list) | **GET** /v2/ontologies/{ontology}/actionTypes | Stable | - -# **get** -Gets a specific action type with the given API name. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**ontology** | OntologyIdentifier | | | -**action_type** | ActionTypeApiName | The name of the action type in the API. | | -**branch** | Optional[FoundryBranch] | The Foundry branch to load the action type definition from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. | [optional] | - -### Return type -**ActionTypeV2** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# OntologyIdentifier -ontology = "palantir" -# ActionTypeApiName | The name of the action type in the API. -action_type = "promote-employee" -# Optional[FoundryBranch] | The Foundry branch to load the action type definition from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. -branch = None - - -try: - api_response = client.ontologies.Ontology.ActionType.get(ontology, action_type, branch=branch) - print("The get response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling ActionType.get: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | ActionTypeV2 | Success response. | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **get_by_rid** -Gets a specific action type with the given RID. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**ontology** | OntologyIdentifier | | | -**action_type_rid** | ActionTypeRid | The RID of the action type. | | -**branch** | Optional[FoundryBranch] | The Foundry branch to load the action type definition from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. | [optional] | - -### Return type -**ActionTypeV2** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# OntologyIdentifier -ontology = "palantir" -# ActionTypeRid | The RID of the action type. -action_type_rid = "ri.ontology.main.action-type.7ed72754-7491-428a-bb18-4d7296eb2167" -# Optional[FoundryBranch] | The Foundry branch to load the action type definition from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. -branch = None - - -try: - api_response = client.ontologies.Ontology.ActionType.get_by_rid( - ontology, action_type_rid, branch=branch - ) - print("The get_by_rid response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling ActionType.get_by_rid: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | ActionTypeV2 | Success response. | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **list** -Lists the action types for the given Ontology. - -Each page may be smaller than the requested page size. However, it is guaranteed that if there are more -results available, at least one result will be present in the response. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**ontology** | OntologyIdentifier | | | -**branch** | Optional[FoundryBranch] | The Foundry branch to list the action types from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. | [optional] | -**page_size** | Optional[PageSize] | The desired size of the page to be returned. Defaults to 500. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. | [optional] | -**page_token** | Optional[PageToken] | | [optional] | - -### Return type -**ListActionTypesResponseV2** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# OntologyIdentifier -ontology = "palantir" -# Optional[FoundryBranch] | The Foundry branch to list the action types from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. -branch = None -# Optional[PageSize] | The desired size of the page to be returned. Defaults to 500. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. -page_size = None -# Optional[PageToken] -page_token = None - - -try: - for action_type in client.ontologies.Ontology.ActionType.list( - ontology, branch=branch, page_size=page_size, page_token=page_token - ): - pprint(action_type) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling ActionType.list: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | ListActionTypesResponseV2 | Success response. | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - diff --git a/docs/v2/Ontologies/ActionTypeFullMetadata.md b/docs/v2/Ontologies/ActionTypeFullMetadata.md deleted file mode 100644 index c6eb8d443..000000000 --- a/docs/v2/Ontologies/ActionTypeFullMetadata.md +++ /dev/null @@ -1,124 +0,0 @@ -# ActionTypeFullMetadata - -Method | HTTP request | Release Stage | -------------- | ------------- | ----- | -[**get**](#get) | **GET** /v2/ontologies/{ontology}/actionTypes/{actionType}/fullMetadata | Private Beta | -[**list**](#list) | **GET** /v2/ontologies/{ontology}/actionTypesFullMetadata | Private Beta | - -# **get** -Gets the full metadata associated with an action type. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**ontology** | OntologyIdentifier | The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. | | -**action_type** | ActionTypeApiName | The name of the action type in the API. | | -**branch** | Optional[FoundryBranch] | The Foundry branch to load the action type definition from. If not specified, the default branch will be used. | [optional] | - -### Return type -**ActionTypeFullMetadata** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# OntologyIdentifier | The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. -ontology = "palantir" -# ActionTypeApiName | The name of the action type in the API. -action_type = "promote-employee" -# Optional[FoundryBranch] | The Foundry branch to load the action type definition from. If not specified, the default branch will be used. -branch = None - - -try: - api_response = client.ontologies.ActionTypeFullMetadata.get( - ontology, action_type, branch=branch - ) - print("The get response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling ActionTypeFullMetadata.get: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | ActionTypeFullMetadata | Success response. | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **list** -Lists the action types (with full metadata) for the given Ontology. - -Each page may be smaller than the requested page size. However, it is guaranteed that if there are more -results available, at least one result will be present in the response. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**ontology** | OntologyIdentifier | | | -**branch** | Optional[FoundryBranch] | The Foundry branch to list the action types from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. | [optional] | -**page_size** | Optional[PageSize] | The desired size of the page to be returned. Defaults to 500. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. | [optional] | -**page_token** | Optional[PageToken] | | [optional] | - -### Return type -**ListActionTypesFullMetadataResponse** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# OntologyIdentifier -ontology = "palantir" -# Optional[FoundryBranch] | The Foundry branch to list the action types from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. -branch = None -# Optional[PageSize] | The desired size of the page to be returned. Defaults to 500. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. -page_size = None -# Optional[PageToken] -page_token = None - - -try: - for action_type_full_metadata in client.ontologies.ActionTypeFullMetadata.list( - ontology, branch=branch, page_size=page_size, page_token=page_token - ): - pprint(action_type_full_metadata) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling ActionTypeFullMetadata.list: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | ListActionTypesFullMetadataResponse | Success response. | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - diff --git a/docs/v2/Ontologies/Attachment.md b/docs/v2/Ontologies/Attachment.md deleted file mode 100644 index 38c2e59a2..000000000 --- a/docs/v2/Ontologies/Attachment.md +++ /dev/null @@ -1,239 +0,0 @@ -# Attachment - -Method | HTTP request | Release Stage | -------------- | ------------- | ----- | -[**get**](#get) | **GET** /v2/ontologies/attachments/{attachmentRid} | Stable | -[**read**](#read) | **GET** /v2/ontologies/attachments/{attachmentRid}/content | Stable | -[**upload**](#upload) | **POST** /v2/ontologies/attachments/upload | Stable | -[**upload_with_rid**](#upload_with_rid) | **POST** /v2/ontologies/attachments/upload/{attachmentRid} | Private Beta | - -# **get** -Get the metadata of an attachment. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**attachment_rid** | AttachmentRid | The RID of the attachment. | | - -### Return type -**AttachmentV2** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# AttachmentRid | The RID of the attachment. -attachment_rid = "ri.attachments.main.attachment.bb32154e-e043-4b00-9461-93136ca96b6f" - - -try: - api_response = client.ontologies.Attachment.get(attachment_rid) - print("The get response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Attachment.get: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | AttachmentV2 | Success response. | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **read** -Get the content of an attachment. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**attachment_rid** | AttachmentRid | The RID of the attachment. | | - -### Return type -**bytes** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# AttachmentRid | The RID of the attachment. -attachment_rid = "ri.attachments.main.attachment.bb32154e-e043-4b00-9461-93136ca96b6f" - - -try: - api_response = client.ontologies.Attachment.read(attachment_rid) - print("The read response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Attachment.read: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | bytes | Success response. | */* | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **upload** -Upload an attachment to use in an action. Any attachment which has not been linked to an object via -an action within one hour after upload will be removed. -Previously mapped attachments which are not connected to any object anymore are also removed on -a biweekly basis. -The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**body** | bytes | Body of the request | | -**content_length** | ContentLength | The size in bytes of the file content being uploaded. | | -**content_type** | ContentType | The media type of the file being uploaded. | | -**filename** | Filename | The name of the file being uploaded. | | - -### Return type -**AttachmentV2** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# bytes | Body of the request -body = None -# ContentLength | The size in bytes of the file content being uploaded. -content_length = None -# ContentType | The media type of the file being uploaded. -content_type = None -# Filename | The name of the file being uploaded. -filename = "My Image.jpeg" - - -try: - api_response = client.ontologies.Attachment.upload( - body, content_length=content_length, content_type=content_type, filename=filename - ) - print("The upload response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Attachment.upload: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | AttachmentV2 | Success response. | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **upload_with_rid** -This endpoint is identical to `/v2/ontologies/attachments/upload` but additionally accepts a previously -generated `AttachmentRid`. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**attachment_rid** | AttachmentRid | The `AttachmentRid` of the attachment being uploaded. | | -**body** | bytes | Body of the request | | -**content_length** | ContentLength | The size in bytes of the file content being uploaded. | | -**content_type** | ContentType | The media type of the file being uploaded. | | -**filename** | Filename | The name of the file being uploaded. | | -**preview** | Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. | [optional] | - -### Return type -**AttachmentV2** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# AttachmentRid | The `AttachmentRid` of the attachment being uploaded. -attachment_rid = "ri.attachments.main.attachment.bb32154e-e043-4b00-9461-93136ca96b6f" -# bytes | Body of the request -body = None -# ContentLength | The size in bytes of the file content being uploaded. -content_length = None -# ContentType | The media type of the file being uploaded. -content_type = None -# Filename | The name of the file being uploaded. -filename = "My Image.jpeg" -# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. -preview = None - - -try: - api_response = client.ontologies.Attachment.upload_with_rid( - attachment_rid, - body, - content_length=content_length, - content_type=content_type, - filename=filename, - preview=preview, - ) - print("The upload_with_rid response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Attachment.upload_with_rid: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | AttachmentV2 | Success response. | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - diff --git a/docs/v2/Ontologies/AttachmentProperty.md b/docs/v2/Ontologies/AttachmentProperty.md deleted file mode 100644 index 83e4e0421..000000000 --- a/docs/v2/Ontologies/AttachmentProperty.md +++ /dev/null @@ -1,299 +0,0 @@ -# AttachmentProperty - -Method | HTTP request | Release Stage | -------------- | ------------- | ----- | -[**get_attachment**](#get_attachment) | **GET** /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/attachments/{property} | Stable | -[**get_attachment_by_rid**](#get_attachment_by_rid) | **GET** /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/attachments/{property}/{attachmentRid} | Stable | -[**read_attachment**](#read_attachment) | **GET** /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/attachments/{property}/content | Stable | -[**read_attachment_by_rid**](#read_attachment_by_rid) | **GET** /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/attachments/{property}/{attachmentRid}/content | Stable | - -# **get_attachment** -Get the metadata of attachments parented to the given object. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**ontology** | OntologyIdentifier | | | -**object_type** | ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. | | -**primary_key** | PropertyValueEscapedString | The primary key of the object containing the attachment. | | -**property** | PropertyApiName | The API name of the attachment property. To find the API name for your attachment, check the **Ontology Manager** or use the **Get object type** endpoint. | | -**sdk_package_rid** | Optional[SdkPackageRid] | The package rid of the generated SDK. | [optional] | -**sdk_version** | Optional[SdkVersion] | The version of the generated SDK. | [optional] | - -### Return type -**AttachmentMetadataResponse** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# OntologyIdentifier -ontology = "palantir" -# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. -object_type = "employee" -# PropertyValueEscapedString | The primary key of the object containing the attachment. -primary_key = 50030 -# PropertyApiName | The API name of the attachment property. To find the API name for your attachment, check the **Ontology Manager** or use the **Get object type** endpoint. -property = "performance" -# Optional[SdkPackageRid] | The package rid of the generated SDK. -sdk_package_rid = None -# Optional[SdkVersion] | The version of the generated SDK. -sdk_version = None - - -try: - api_response = client.ontologies.AttachmentProperty.get_attachment( - ontology, - object_type, - primary_key, - property, - sdk_package_rid=sdk_package_rid, - sdk_version=sdk_version, - ) - print("The get_attachment response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling AttachmentProperty.get_attachment: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | AttachmentMetadataResponse | Success response. | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **get_attachment_by_rid** -Get the metadata of a particular attachment in an attachment list. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**ontology** | OntologyIdentifier | | | -**object_type** | ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. | | -**primary_key** | PropertyValueEscapedString | The primary key of the object containing the attachment. | | -**property** | PropertyApiName | The API name of the attachment property. To find the API name for your attachment, check the **Ontology Manager** or use the **Get object type** endpoint. | | -**attachment_rid** | AttachmentRid | The RID of the attachment. | | -**sdk_package_rid** | Optional[SdkPackageRid] | The package rid of the generated SDK. | [optional] | -**sdk_version** | Optional[SdkVersion] | The version of the generated SDK. | [optional] | - -### Return type -**AttachmentV2** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# OntologyIdentifier -ontology = "palantir" -# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. -object_type = "employee" -# PropertyValueEscapedString | The primary key of the object containing the attachment. -primary_key = 50030 -# PropertyApiName | The API name of the attachment property. To find the API name for your attachment, check the **Ontology Manager** or use the **Get object type** endpoint. -property = "performance" -# AttachmentRid | The RID of the attachment. -attachment_rid = "ri.attachments.main.attachment.bb32154e-e043-4b00-9461-93136ca96b6f" -# Optional[SdkPackageRid] | The package rid of the generated SDK. -sdk_package_rid = None -# Optional[SdkVersion] | The version of the generated SDK. -sdk_version = None - - -try: - api_response = client.ontologies.AttachmentProperty.get_attachment_by_rid( - ontology, - object_type, - primary_key, - property, - attachment_rid, - sdk_package_rid=sdk_package_rid, - sdk_version=sdk_version, - ) - print("The get_attachment_by_rid response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling AttachmentProperty.get_attachment_by_rid: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | AttachmentV2 | Success response. | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **read_attachment** -Get the content of an attachment. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**ontology** | OntologyIdentifier | | | -**object_type** | ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. | | -**primary_key** | PropertyValueEscapedString | The primary key of the object containing the attachment. | | -**property** | PropertyApiName | The API name of the attachment property. To find the API name for your attachment, check the **Ontology Manager** or use the **Get object type** endpoint. | | -**sdk_package_rid** | Optional[SdkPackageRid] | The package rid of the generated SDK. | [optional] | -**sdk_version** | Optional[SdkVersion] | The version of the generated SDK. | [optional] | - -### Return type -**bytes** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# OntologyIdentifier -ontology = "palantir" -# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. -object_type = "employee" -# PropertyValueEscapedString | The primary key of the object containing the attachment. -primary_key = 50030 -# PropertyApiName | The API name of the attachment property. To find the API name for your attachment, check the **Ontology Manager** or use the **Get object type** endpoint. -property = "performance" -# Optional[SdkPackageRid] | The package rid of the generated SDK. -sdk_package_rid = None -# Optional[SdkVersion] | The version of the generated SDK. -sdk_version = None - - -try: - api_response = client.ontologies.AttachmentProperty.read_attachment( - ontology, - object_type, - primary_key, - property, - sdk_package_rid=sdk_package_rid, - sdk_version=sdk_version, - ) - print("The read_attachment response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling AttachmentProperty.read_attachment: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | bytes | Success response. | */* | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **read_attachment_by_rid** -Get the content of an attachment by its RID. - -The RID must exist in the attachment array of the property. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**ontology** | OntologyIdentifier | | | -**object_type** | ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. | | -**primary_key** | PropertyValueEscapedString | The primary key of the object containing the attachment. | | -**property** | PropertyApiName | The API name of the attachment property. To find the API name for your attachment, check the **Ontology Manager** or use the **Get object type** endpoint. | | -**attachment_rid** | AttachmentRid | The RID of the attachment. | | -**sdk_package_rid** | Optional[SdkPackageRid] | The package rid of the generated SDK. | [optional] | -**sdk_version** | Optional[SdkVersion] | The version of the generated SDK. | [optional] | - -### Return type -**bytes** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# OntologyIdentifier -ontology = "palantir" -# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. -object_type = "employee" -# PropertyValueEscapedString | The primary key of the object containing the attachment. -primary_key = 50030 -# PropertyApiName | The API name of the attachment property. To find the API name for your attachment, check the **Ontology Manager** or use the **Get object type** endpoint. -property = "performance" -# AttachmentRid | The RID of the attachment. -attachment_rid = "ri.attachments.main.attachment.bb32154e-e043-4b00-9461-93136ca96b6f" -# Optional[SdkPackageRid] | The package rid of the generated SDK. -sdk_package_rid = None -# Optional[SdkVersion] | The version of the generated SDK. -sdk_version = None - - -try: - api_response = client.ontologies.AttachmentProperty.read_attachment_by_rid( - ontology, - object_type, - primary_key, - property, - attachment_rid, - sdk_package_rid=sdk_package_rid, - sdk_version=sdk_version, - ) - print("The read_attachment_by_rid response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling AttachmentProperty.read_attachment_by_rid: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | bytes | Success response. | */* | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - diff --git a/docs/v2/Ontologies/CipherTextProperty.md b/docs/v2/Ontologies/CipherTextProperty.md deleted file mode 100644 index 48f43bf9f..000000000 --- a/docs/v2/Ontologies/CipherTextProperty.md +++ /dev/null @@ -1,65 +0,0 @@ -# CipherTextProperty - -Method | HTTP request | Release Stage | -------------- | ------------- | ----- | -[**decrypt**](#decrypt) | **GET** /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/ciphertexts/{property}/decrypt | Public Beta | - -# **decrypt** -Decrypt the value of a ciphertext property. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**ontology** | OntologyIdentifier | | | -**object_type** | ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. | | -**primary_key** | PropertyValueEscapedString | The primary key of the object with the CipherText property. | | -**property** | PropertyApiName | The API name of the CipherText property. To find the API name for your CipherText property, check the **Ontology Manager** or use the **Get object type** endpoint. | | - -### Return type -**DecryptionResult** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# OntologyIdentifier -ontology = "palantir" -# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. -object_type = "employee" -# PropertyValueEscapedString | The primary key of the object with the CipherText property. -primary_key = 50030 -# PropertyApiName | The API name of the CipherText property. To find the API name for your CipherText property, check the **Ontology Manager** or use the **Get object type** endpoint. -property = "performance" - - -try: - api_response = client.ontologies.CipherTextProperty.decrypt( - ontology, object_type, primary_key, property - ) - print("The decrypt response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling CipherTextProperty.decrypt: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | DecryptionResult | Success response. | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - diff --git a/docs/v2/Ontologies/LinkedObject.md b/docs/v2/Ontologies/LinkedObject.md deleted file mode 100644 index c60ec0cc7..000000000 --- a/docs/v2/Ontologies/LinkedObject.md +++ /dev/null @@ -1,204 +0,0 @@ -# LinkedObject - -Method | HTTP request | Release Stage | -------------- | ------------- | ----- | -[**get_linked_object**](#get_linked_object) | **GET** /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/links/{linkType}/{linkedObjectPrimaryKey} | Stable | -[**list_linked_objects**](#list_linked_objects) | **GET** /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/links/{linkType} | Stable | - -# **get_linked_object** -Get a specific linked object that originates from another object. - -If there is no link between the two objects, `LinkedObjectNotFound` is thrown. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**ontology** | OntologyIdentifier | | | -**object_type** | ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. | | -**primary_key** | PropertyValueEscapedString | The primary key of the object from which the links originate. To look up the expected primary key for your object type, use the `Get object type` endpoint or the **Ontology Manager**. | | -**link_type** | LinkTypeApiName | The API name of the link that exists between the object and the requested objects. To find the API name for your link type, check the **Ontology Manager**. | | -**linked_object_primary_key** | PropertyValueEscapedString | The primary key of the requested linked object. To look up the expected primary key for your object type, use the `Get object type` endpoint (passing the linked object type) or the **Ontology Manager**. | | -**branch** | Optional[FoundryBranch] | The Foundry branch to load the object set for multiple object types. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported. | [optional] | -**exclude_rid** | Optional[bool] | A flag to exclude the retrieval of the `__rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2. | [optional] | -**sdk_package_rid** | Optional[SdkPackageRid] | The package rid of the generated SDK. | [optional] | -**sdk_version** | Optional[SdkVersion] | The version of the generated SDK. | [optional] | -**select** | Optional[List[SelectedPropertyApiName]] | The properties of the object type that should be included in the response. Omit this parameter to get all the properties. | [optional] | - -### Return type -**OntologyObjectV2** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# OntologyIdentifier -ontology = "palantir" -# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. -object_type = "employee" -# PropertyValueEscapedString | The primary key of the object from which the links originate. To look up the expected primary key for your object type, use the `Get object type` endpoint or the **Ontology Manager**. -primary_key = 50030 -# LinkTypeApiName | The API name of the link that exists between the object and the requested objects. To find the API name for your link type, check the **Ontology Manager**. -link_type = "directReport" -# PropertyValueEscapedString | The primary key of the requested linked object. To look up the expected primary key for your object type, use the `Get object type` endpoint (passing the linked object type) or the **Ontology Manager**. -linked_object_primary_key = 80060 -# Optional[FoundryBranch] | The Foundry branch to load the object set for multiple object types. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported. -branch = None -# Optional[bool] | A flag to exclude the retrieval of the `__rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2. -exclude_rid = None -# Optional[SdkPackageRid] | The package rid of the generated SDK. -sdk_package_rid = None -# Optional[SdkVersion] | The version of the generated SDK. -sdk_version = None -# Optional[List[SelectedPropertyApiName]] | The properties of the object type that should be included in the response. Omit this parameter to get all the properties. -select = None - - -try: - api_response = client.ontologies.LinkedObject.get_linked_object( - ontology, - object_type, - primary_key, - link_type, - linked_object_primary_key, - branch=branch, - exclude_rid=exclude_rid, - sdk_package_rid=sdk_package_rid, - sdk_version=sdk_version, - select=select, - ) - print("The get_linked_object response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling LinkedObject.get_linked_object: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | OntologyObjectV2 | Success response. | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **list_linked_objects** -Lists the linked objects for a specific object and the given link type. - -Note that this endpoint does not guarantee consistency. Changes to the data could result in missing or -repeated objects in the response pages. - -For Object Storage V1 backed objects, this endpoint returns a maximum of 10,000 objects. After 10,000 objects have been returned and if more objects -are available, attempting to load another page will result in an `ObjectsExceededLimit` error being returned. There is no limit on Object Storage V2 backed objects. - -Each page may be smaller or larger than the requested page size. However, it -is guaranteed that if there are more results available, at least one result will be present -in the response. - -Note that null value properties will not be returned. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**ontology** | OntologyIdentifier | | | -**object_type** | ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. | | -**primary_key** | PropertyValueEscapedString | The primary key of the object from which the links originate. To look up the expected primary key for your object type, use the `Get object type` endpoint or the **Ontology Manager**. | | -**link_type** | LinkTypeApiName | The API name of the link that exists between the object and the requested objects. To find the API name for your link type, check the **Ontology Manager**. | | -**branch** | Optional[FoundryBranch] | The Foundry branch to list linked objects from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. | [optional] | -**exclude_rid** | Optional[bool] | A flag to exclude the retrieval of the `__rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2. | [optional] | -**order_by** | Optional[OrderBy] | | [optional] | -**page_size** | Optional[PageSize] | The desired size of the page to be returned. Defaults to 1,000. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. | [optional] | -**page_token** | Optional[PageToken] | | [optional] | -**sdk_package_rid** | Optional[SdkPackageRid] | The package rid of the generated SDK. | [optional] | -**sdk_version** | Optional[SdkVersion] | The version of the generated SDK. | [optional] | -**select** | Optional[List[SelectedPropertyApiName]] | The properties of the object type that should be included in the response. Omit this parameter to get all the properties. | [optional] | -**snapshot** | Optional[bool] | A flag to use snapshot consistency when paging. Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. This defaults to false if not specified, which means you will always get the latest results. | [optional] | - -### Return type -**ListLinkedObjectsResponseV2** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# OntologyIdentifier -ontology = "palantir" -# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. -object_type = "employee" -# PropertyValueEscapedString | The primary key of the object from which the links originate. To look up the expected primary key for your object type, use the `Get object type` endpoint or the **Ontology Manager**. -primary_key = 50030 -# LinkTypeApiName | The API name of the link that exists between the object and the requested objects. To find the API name for your link type, check the **Ontology Manager**. -link_type = "directReport" -# Optional[FoundryBranch] | The Foundry branch to list linked objects from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. -branch = None -# Optional[bool] | A flag to exclude the retrieval of the `__rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2. -exclude_rid = None -# Optional[OrderBy] -order_by = None -# Optional[PageSize] | The desired size of the page to be returned. Defaults to 1,000. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. -page_size = None -# Optional[PageToken] -page_token = None -# Optional[SdkPackageRid] | The package rid of the generated SDK. -sdk_package_rid = None -# Optional[SdkVersion] | The version of the generated SDK. -sdk_version = None -# Optional[List[SelectedPropertyApiName]] | The properties of the object type that should be included in the response. Omit this parameter to get all the properties. -select = None -# Optional[bool] | A flag to use snapshot consistency when paging. Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. This defaults to false if not specified, which means you will always get the latest results. -snapshot = None - - -try: - for linked_object in client.ontologies.LinkedObject.list_linked_objects( - ontology, - object_type, - primary_key, - link_type, - branch=branch, - exclude_rid=exclude_rid, - order_by=order_by, - page_size=page_size, - page_token=page_token, - sdk_package_rid=sdk_package_rid, - sdk_version=sdk_version, - select=select, - snapshot=snapshot, - ): - pprint(linked_object) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling LinkedObject.list_linked_objects: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | ListLinkedObjectsResponseV2 | Success response. | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - diff --git a/docs/v2/Ontologies/MediaReferenceProperty.md b/docs/v2/Ontologies/MediaReferenceProperty.md deleted file mode 100644 index 53eeb17ff..000000000 --- a/docs/v2/Ontologies/MediaReferenceProperty.md +++ /dev/null @@ -1,222 +0,0 @@ -# MediaReferenceProperty - -Method | HTTP request | Release Stage | -------------- | ------------- | ----- | -[**get_media_content**](#get_media_content) | **GET** /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/media/{property}/content | Public Beta | -[**get_media_metadata**](#get_media_metadata) | **GET** /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/media/{property}/metadata | Private Beta | -[**upload**](#upload) | **POST** /v2/ontologies/{ontology}/objectTypes/{objectType}/media/{property}/upload | Public Beta | - -# **get_media_content** -Gets the content of a media item referenced by this property. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**ontology** | OntologyIdentifier | | | -**object_type** | ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. | | -**primary_key** | PropertyValueEscapedString | The primary key of the object with the media reference property. | | -**property** | PropertyApiName | The API name of the media reference property. To find the API name, check the **Ontology Manager** or use the **Get object type** endpoint. | | -**preview** | Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. | [optional] | -**sdk_package_rid** | Optional[SdkPackageRid] | The package rid of the generated SDK. | [optional] | -**sdk_version** | Optional[SdkVersion] | The version of the generated SDK. | [optional] | - -### Return type -**bytes** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# OntologyIdentifier -ontology = "palantir" -# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. -object_type = "employee" -# PropertyValueEscapedString | The primary key of the object with the media reference property. -primary_key = 50030 -# PropertyApiName | The API name of the media reference property. To find the API name, check the **Ontology Manager** or use the **Get object type** endpoint. -property = "profile_picture" -# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. -preview = None -# Optional[SdkPackageRid] | The package rid of the generated SDK. -sdk_package_rid = None -# Optional[SdkVersion] | The version of the generated SDK. -sdk_version = None - - -try: - api_response = client.ontologies.MediaReferenceProperty.get_media_content( - ontology, - object_type, - primary_key, - property, - preview=preview, - sdk_package_rid=sdk_package_rid, - sdk_version=sdk_version, - ) - print("The get_media_content response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling MediaReferenceProperty.get_media_content: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | bytes | The content stream. | */* | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **get_media_metadata** -Gets metadata about the media item referenced by this property. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**ontology** | OntologyIdentifier | | | -**object_type** | ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. | | -**primary_key** | PropertyValueEscapedString | The primary key of the object with the media reference property. | | -**property** | PropertyApiName | The API name of the media reference backed property. To find the API name, check the **Ontology Manager** or use the **Get object type** endpoint. | | -**preview** | Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. | [optional] | -**sdk_package_rid** | Optional[SdkPackageRid] | The package rid of the generated SDK. | [optional] | -**sdk_version** | Optional[SdkVersion] | The version of the generated SDK. | [optional] | - -### Return type -**MediaMetadata** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# OntologyIdentifier -ontology = "palantir" -# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. -object_type = "employee" -# PropertyValueEscapedString | The primary key of the object with the media reference property. -primary_key = 50030 -# PropertyApiName | The API name of the media reference backed property. To find the API name, check the **Ontology Manager** or use the **Get object type** endpoint. -property = None -# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. -preview = None -# Optional[SdkPackageRid] | The package rid of the generated SDK. -sdk_package_rid = None -# Optional[SdkVersion] | The version of the generated SDK. -sdk_version = None - - -try: - api_response = client.ontologies.MediaReferenceProperty.get_media_metadata( - ontology, - object_type, - primary_key, - property, - preview=preview, - sdk_package_rid=sdk_package_rid, - sdk_version=sdk_version, - ) - print("The get_media_metadata response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling MediaReferenceProperty.get_media_metadata: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | MediaMetadata | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **upload** -Uploads a media item to the media set which backs the specified property. The property must be backed by a single media set and branch, otherwise an error will be thrown. -The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**ontology** | OntologyIdentifier | | | -**object_type** | ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. | | -**property** | PropertyApiName | The API name of the media reference property. To find the API name, check the **Ontology Manager** or use the **Get object type** endpoint. | | -**body** | bytes | Body of the request | | -**media_item_path** | Optional[MediaItemPath] | A path for the media item within its backing media set. Required if the backing media set requires paths. | [optional] | -**preview** | Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. | [optional] | - -### Return type -**MediaReference** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# OntologyIdentifier -ontology = "palantir" -# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. -object_type = "employee" -# PropertyApiName | The API name of the media reference property. To find the API name, check the **Ontology Manager** or use the **Get object type** endpoint. -property = "profile_picture" -# bytes | Body of the request -body = None -# Optional[MediaItemPath] | A path for the media item within its backing media set. Required if the backing media set requires paths. -media_item_path = "my-file.png" -# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. -preview = None - - -try: - api_response = client.ontologies.MediaReferenceProperty.upload( - ontology, object_type, property, body, media_item_path=media_item_path, preview=preview - ) - print("The upload response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling MediaReferenceProperty.upload: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | MediaReference | The media reference for the uploaded media. | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - diff --git a/docs/v2/Ontologies/ObjectType.md b/docs/v2/Ontologies/ObjectType.md deleted file mode 100644 index 08288bce5..000000000 --- a/docs/v2/Ontologies/ObjectType.md +++ /dev/null @@ -1,316 +0,0 @@ -# ObjectType - -Method | HTTP request | Release Stage | -------------- | ------------- | ----- | -[**get**](#get) | **GET** /v2/ontologies/{ontology}/objectTypes/{objectType} | Stable | -[**get_full_metadata**](#get_full_metadata) | **GET** /v2/ontologies/{ontology}/objectTypes/{objectType}/fullMetadata | Private Beta | -[**get_outgoing_link_type**](#get_outgoing_link_type) | **GET** /v2/ontologies/{ontology}/objectTypes/{objectType}/outgoingLinkTypes/{linkType} | Stable | -[**list**](#list) | **GET** /v2/ontologies/{ontology}/objectTypes | Stable | -[**list_outgoing_link_types**](#list_outgoing_link_types) | **GET** /v2/ontologies/{ontology}/objectTypes/{objectType}/outgoingLinkTypes | Stable | - -# **get** -Gets a specific object type with the given API name. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**ontology** | OntologyIdentifier | | | -**object_type** | ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. | | -**branch** | Optional[FoundryBranch] | The Foundry branch to load the object type definition from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. | [optional] | - -### Return type -**ObjectTypeV2** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# OntologyIdentifier -ontology = "palantir" -# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. -object_type = "employee" -# Optional[FoundryBranch] | The Foundry branch to load the object type definition from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. -branch = None - - -try: - api_response = client.ontologies.Ontology.ObjectType.get(ontology, object_type, branch=branch) - print("The get response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling ObjectType.get: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | ObjectTypeV2 | Success response. | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **get_full_metadata** -Gets the full metadata for a specific object type with the given API name. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**ontology** | OntologyIdentifier | | | -**object_type** | ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. | | -**branch** | Optional[FoundryBranch] | The Foundry branch to load the action type definition from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. | [optional] | -**preview** | Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. | [optional] | -**sdk_package_rid** | Optional[SdkPackageRid] | The package rid of the generated SDK. | [optional] | -**sdk_version** | Optional[SdkVersion] | The version of the generated SDK. | [optional] | - -### Return type -**ObjectTypeFullMetadata** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# OntologyIdentifier -ontology = "palantir" -# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. -object_type = "employee" -# Optional[FoundryBranch] | The Foundry branch to load the action type definition from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. -branch = None -# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. -preview = None -# Optional[SdkPackageRid] | The package rid of the generated SDK. -sdk_package_rid = None -# Optional[SdkVersion] | The version of the generated SDK. -sdk_version = None - - -try: - api_response = client.ontologies.Ontology.ObjectType.get_full_metadata( - ontology, - object_type, - branch=branch, - preview=preview, - sdk_package_rid=sdk_package_rid, - sdk_version=sdk_version, - ) - print("The get_full_metadata response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling ObjectType.get_full_metadata: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | ObjectTypeFullMetadata | Success response. | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **get_outgoing_link_type** -Get an outgoing link for an object type. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**ontology** | OntologyIdentifier | | | -**object_type** | ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager** application. | | -**link_type** | LinkTypeApiName | The API name of the outgoing link. To find the API name for your link type, check the **Ontology Manager**. | | -**branch** | Optional[FoundryBranch] | The Foundry branch to get the outgoing link types for an object type from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. | [optional] | - -### Return type -**LinkTypeSideV2** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# OntologyIdentifier -ontology = "palantir" -# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager** application. -object_type = "Employee" -# LinkTypeApiName | The API name of the outgoing link. To find the API name for your link type, check the **Ontology Manager**. -link_type = "directReport" -# Optional[FoundryBranch] | The Foundry branch to get the outgoing link types for an object type from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. -branch = None - - -try: - api_response = client.ontologies.Ontology.ObjectType.get_outgoing_link_type( - ontology, object_type, link_type, branch=branch - ) - print("The get_outgoing_link_type response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling ObjectType.get_outgoing_link_type: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | LinkTypeSideV2 | Success response. | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **list** -Lists the object types for the given Ontology. - -Each page may be smaller or larger than the requested page size. However, it is guaranteed that if there are -more results available, at least one result will be present in the -response. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**ontology** | OntologyIdentifier | | | -**branch** | Optional[FoundryBranch] | The Foundry branch to list the object types from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. | [optional] | -**page_size** | Optional[PageSize] | The desired size of the page to be returned. Defaults to 500. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. | [optional] | -**page_token** | Optional[PageToken] | | [optional] | - -### Return type -**ListObjectTypesV2Response** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# OntologyIdentifier -ontology = "palantir" -# Optional[FoundryBranch] | The Foundry branch to list the object types from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. -branch = None -# Optional[PageSize] | The desired size of the page to be returned. Defaults to 500. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. -page_size = None -# Optional[PageToken] -page_token = None - - -try: - for object_type in client.ontologies.Ontology.ObjectType.list( - ontology, branch=branch, page_size=page_size, page_token=page_token - ): - pprint(object_type) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling ObjectType.list: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | ListObjectTypesV2Response | Success response. | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **list_outgoing_link_types** -List the outgoing links for an object type. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**ontology** | OntologyIdentifier | | | -**object_type** | ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager** application. | | -**branch** | Optional[FoundryBranch] | The Foundry branch to load the outgoing link types from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. | [optional] | -**page_size** | Optional[PageSize] | The desired size of the page to be returned. | [optional] | -**page_token** | Optional[PageToken] | | [optional] | - -### Return type -**ListOutgoingLinkTypesResponseV2** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# OntologyIdentifier -ontology = "palantir" -# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager** application. -object_type = "Flight" -# Optional[FoundryBranch] | The Foundry branch to load the outgoing link types from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. -branch = None -# Optional[PageSize] | The desired size of the page to be returned. -page_size = None -# Optional[PageToken] -page_token = None - - -try: - for object_type in client.ontologies.Ontology.ObjectType.list_outgoing_link_types( - ontology, object_type, branch=branch, page_size=page_size, page_token=page_token - ): - pprint(object_type) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling ObjectType.list_outgoing_link_types: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | ListOutgoingLinkTypesResponseV2 | Success response. | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - diff --git a/docs/v2/Ontologies/Ontology.md b/docs/v2/Ontologies/Ontology.md deleted file mode 100644 index 0db73a676..000000000 --- a/docs/v2/Ontologies/Ontology.md +++ /dev/null @@ -1,232 +0,0 @@ -# Ontology - -Method | HTTP request | Release Stage | -------------- | ------------- | ----- | -[**get**](#get) | **GET** /v2/ontologies/{ontology} | Stable | -[**get_full_metadata**](#get_full_metadata) | **GET** /v2/ontologies/{ontology}/fullMetadata | Public Beta | -[**list**](#list) | **GET** /v2/ontologies | Stable | -[**load_metadata**](#load_metadata) | **POST** /v2/ontologies/{ontology}/metadata | Private Beta | - -# **get** -Gets a specific ontology for a given Ontology API name or RID. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**ontology** | OntologyIdentifier | | | - -### Return type -**OntologyV2** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# OntologyIdentifier -ontology = "palantir" - - -try: - api_response = client.ontologies.Ontology.get(ontology) - print("The get response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Ontology.get: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | OntologyV2 | Success response. | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **get_full_metadata** -Get the full Ontology metadata. This includes the objects, links, actions, queries, and interfaces. -This endpoint is designed to return as much metadata as possible in a single request to support OSDK workflows. -It may omit certain entities rather than fail the request. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**ontology** | OntologyIdentifier | | | -**branch** | Optional[FoundryBranch] | The Foundry branch to load metadata from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. | [optional] | - -### Return type -**OntologyFullMetadata** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# OntologyIdentifier -ontology = "palantir" -# Optional[FoundryBranch] | The Foundry branch to load metadata from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. -branch = None - - -try: - api_response = client.ontologies.Ontology.get_full_metadata(ontology, branch=branch) - print("The get_full_metadata response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Ontology.get_full_metadata: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | OntologyFullMetadata | Success response. | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **list** -Lists the Ontologies visible to the current user. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | - -### Return type -**ListOntologiesV2Response** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - - -try: - api_response = client.ontologies.Ontology.list() - print("The list response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Ontology.list: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | ListOntologiesV2Response | Success response. | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **load_metadata** -Load Ontology metadata for the requested object, link, action, query, and interface types. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**ontology** | OntologyIdentifier | | | -**action_types** | List[ActionTypeApiName] | | | -**interface_types** | List[InterfaceTypeApiName] | | | -**link_types** | List[LinkTypeApiName] | | | -**object_types** | List[ObjectTypeApiName] | | | -**query_types** | List[VersionedQueryTypeApiName] | | | -**branch** | Optional[FoundryBranch] | The Foundry branch to load metadata from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. | [optional] | -**preview** | Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. | [optional] | - -### Return type -**OntologyFullMetadata** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# OntologyIdentifier -ontology = "palantir" -# List[ActionTypeApiName] -action_types = None -# List[InterfaceTypeApiName] -interface_types = None -# List[LinkTypeApiName] -link_types = None -# List[ObjectTypeApiName] -object_types = None -# List[VersionedQueryTypeApiName] -query_types = None -# Optional[FoundryBranch] | The Foundry branch to load metadata from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. -branch = None -# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. -preview = None - - -try: - api_response = client.ontologies.Ontology.load_metadata( - ontology, - action_types=action_types, - interface_types=interface_types, - link_types=link_types, - object_types=object_types, - query_types=query_types, - branch=branch, - preview=preview, - ) - print("The load_metadata response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Ontology.load_metadata: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | OntologyFullMetadata | Success response. | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - diff --git a/docs/v2/Ontologies/OntologyInterface.md b/docs/v2/Ontologies/OntologyInterface.md deleted file mode 100644 index 50d95a2b4..000000000 --- a/docs/v2/Ontologies/OntologyInterface.md +++ /dev/null @@ -1,693 +0,0 @@ -# OntologyInterface - -Method | HTTP request | Release Stage | -------------- | ------------- | ----- | -[**aggregate**](#aggregate) | **POST** /v2/ontologies/{ontology}/interfaces/{interfaceType}/aggregate | Private Beta | -[**get**](#get) | **GET** /v2/ontologies/{ontology}/interfaceTypes/{interfaceType} | Public Beta | -[**get_outgoing_interface_link_type**](#get_outgoing_interface_link_type) | **GET** /v2/ontologies/{ontology}/interfaceTypes/{interfaceType}/outgoingLinkTypes/{interfaceLinkType} | Private Beta | -[**list**](#list) | **GET** /v2/ontologies/{ontology}/interfaceTypes | Public Beta | -[**list_interface_linked_objects**](#list_interface_linked_objects) | **GET** /v2/ontologies/{ontology}/interfaces/{interfaceType}/{objectType}/{primaryKey}/links/{interfaceLinkType} | Private Beta | -[**list_objects_for_interface**](#list_objects_for_interface) | **GET** /v2/ontologies/{ontology}/interfaces/{interfaceType} | Private Beta | -[**list_outgoing_interface_link_types**](#list_outgoing_interface_link_types) | **GET** /v2/ontologies/{ontology}/interfaceTypes/{interfaceType}/outgoingLinkTypes | Private Beta | -[**search**](#search) | **POST** /v2/ontologies/{ontology}/interfaces/{interfaceType}/search | Private Beta | - -# **aggregate** -:::callout{theme=warning title=Warning} -This endpoint will be removed once TS OSDK is updated to use `objectSets/aggregate` with interface object -sets. -::: -Perform functions on object fields in the specified ontology and of the specified interface type. Any -properties specified in the query must be shared property type API names defined on the interface. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**ontology** | OntologyIdentifier | | | -**interface_type** | InterfaceTypeApiName | The API name of the interface type. To find the API name, use the **List interface types** endpoint or check the **Ontology Manager**. | | -**aggregation** | List[AggregationV2] | | | -**group_by** | List[AggregationGroupByV2] | | | -**accuracy** | Optional[AggregationAccuracyRequest] | | [optional] | -**branch** | Optional[FoundryBranch] | The Foundry branch to aggregate objects from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. | [optional] | -**preview** | Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. | [optional] | -**where** | Optional[SearchJsonQueryV2] | | [optional] | - -### Return type -**AggregateObjectsResponseV2** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# OntologyIdentifier -ontology = "palantir" -# InterfaceTypeApiName | The API name of the interface type. To find the API name, use the **List interface types** endpoint or check the **Ontology Manager**. -interface_type = "Employee" -# List[AggregationV2] -aggregation = [ - {"type": "min", "field": "tenure", "name": "min_tenure"}, - {"type": "avg", "field": "tenure", "name": "avg_tenure"}, -] -# List[AggregationGroupByV2] -group_by = [ - { - "field": "startDate", - "type": "range", - "ranges": [{"startValue": "2020-01-01", "endValue": "2020-06-01"}], - }, - {"field": "city", "type": "exact"}, -] -# Optional[AggregationAccuracyRequest] -accuracy = None -# Optional[FoundryBranch] | The Foundry branch to aggregate objects from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. -branch = None -# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. -preview = None -# Optional[SearchJsonQueryV2] -where = {"type": "eq", "field": "name", "value": "john"} - - -try: - api_response = client.ontologies.OntologyInterface.aggregate( - ontology, - interface_type, - aggregation=aggregation, - group_by=group_by, - accuracy=accuracy, - branch=branch, - preview=preview, - where=where, - ) - print("The aggregate response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling OntologyInterface.aggregate: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | AggregateObjectsResponseV2 | Success response. | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **get** -Gets a specific interface type with the given API name. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**ontology** | OntologyIdentifier | | | -**interface_type** | InterfaceTypeApiName | The API name of the interface type. To find the API name, use the **List interface types** endpoint or check the **Ontology Manager**. | | -**branch** | Optional[FoundryBranch] | The Foundry branch to load the interface type definition from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. | [optional] | -**preview** | Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. | [optional] | -**sdk_package_rid** | Optional[SdkPackageRid] | The package rid of the generated SDK. | [optional] | -**sdk_version** | Optional[SdkVersion] | The version of the generated SDK. | [optional] | - -### Return type -**InterfaceType** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# OntologyIdentifier -ontology = "palantir" -# InterfaceTypeApiName | The API name of the interface type. To find the API name, use the **List interface types** endpoint or check the **Ontology Manager**. -interface_type = "Employee" -# Optional[FoundryBranch] | The Foundry branch to load the interface type definition from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. -branch = None -# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. -preview = None -# Optional[SdkPackageRid] | The package rid of the generated SDK. -sdk_package_rid = None -# Optional[SdkVersion] | The version of the generated SDK. -sdk_version = None - - -try: - api_response = client.ontologies.OntologyInterface.get( - ontology, - interface_type, - branch=branch, - preview=preview, - sdk_package_rid=sdk_package_rid, - sdk_version=sdk_version, - ) - print("The get response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling OntologyInterface.get: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | InterfaceType | Success response. | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **get_outgoing_interface_link_type** -Get an outgoing interface link type for an interface type. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**ontology** | OntologyIdentifier | | | -**interface_type** | InterfaceTypeApiName | The API name of the interface type. To find the API name, use the **List interface types** endpoint or check the **Ontology Manager** application. | | -**interface_link_type** | InterfaceLinkTypeApiName | The API name of the outgoing interface link. To find the API name for your interface link type, check the **Ontology Manager** page for the parent interface. | | -**branch** | Optional[FoundryBranch] | The Foundry branch to get the outgoing link types for an object type from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. | [optional] | - -### Return type -**InterfaceLinkType** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# OntologyIdentifier -ontology = "palantir" -# InterfaceTypeApiName | The API name of the interface type. To find the API name, use the **List interface types** endpoint or check the **Ontology Manager** application. -interface_type = "Employee" -# InterfaceLinkTypeApiName | The API name of the outgoing interface link. To find the API name for your interface link type, check the **Ontology Manager** page for the parent interface. -interface_link_type = "worksAt" -# Optional[FoundryBranch] | The Foundry branch to get the outgoing link types for an object type from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. -branch = None - - -try: - api_response = client.ontologies.OntologyInterface.get_outgoing_interface_link_type( - ontology, interface_type, interface_link_type, branch=branch - ) - print("The get_outgoing_interface_link_type response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling OntologyInterface.get_outgoing_interface_link_type: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | InterfaceLinkType | Success response. | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **list** -Lists the interface types for the given Ontology. - -Each page may be smaller than the requested page size. However, it is guaranteed that if there are more -results available, at least one result will be present in the response. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**ontology** | OntologyIdentifier | | | -**branch** | Optional[FoundryBranch] | The Foundry branch to list the interface types from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. | [optional] | -**page_size** | Optional[PageSize] | The desired size of the page to be returned. Defaults to 500. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. | [optional] | -**page_token** | Optional[PageToken] | | [optional] | -**preview** | Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. | [optional] | - -### Return type -**ListInterfaceTypesResponse** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# OntologyIdentifier -ontology = "palantir" -# Optional[FoundryBranch] | The Foundry branch to list the interface types from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. -branch = None -# Optional[PageSize] | The desired size of the page to be returned. Defaults to 500. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. -page_size = None -# Optional[PageToken] -page_token = None -# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. -preview = None - - -try: - for ontology_interface in client.ontologies.OntologyInterface.list( - ontology, branch=branch, page_size=page_size, page_token=page_token, preview=preview - ): - pprint(ontology_interface) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling OntologyInterface.list: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | ListInterfaceTypesResponse | Success response. | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **list_interface_linked_objects** -Lists the linked objects for a specific object and the given interface link type. - -Note that this endpoint does not guarantee consistency. Changes to the data could result in missing or -repeated objects in the response pages. - -For Object Storage V1 backed objects, this endpoint returns a maximum of 10,000 objects. After 10,000 objects have been returned and if more objects -are available, attempting to load another page will result in an `ObjectsExceededLimit` error being returned. There is no limit on Object Storage V2 backed objects. - -Each page may be smaller or larger than the requested page size. However, it -is guaranteed that if there are more results available, at least one result will be present -in the response. - -Note that null value properties will not be returned. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**ontology** | OntologyIdentifier | The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. | | -**interface_type** | InterfaceTypeApiName | The API name of the interface type. To find the API name, use the **List interface types** endpoint or check the **Ontology Manager** application. | | -**object_type** | ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. | | -**primary_key** | PropertyValueEscapedString | The primary key of the object from which to **start** the interface link traversal. To look up the expected primary key for your object type, use the `Get object type` endpoint or the **Ontology Manager**. | | -**interface_link_type** | InterfaceLinkTypeApiName | The API name of the outgoing interface link. To find the API name for your interface link type, check the **Ontology Manager** page for the parent interface. | | -**branch** | Optional[FoundryBranch] | The Foundry branch to get the outgoing link types for an object type from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. | [optional] | -**exclude_rid** | Optional[bool] | A flag to exclude the retrieval of the `__rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2. | [optional] | -**order_by** | Optional[OrderBy] | | [optional] | -**page_size** | Optional[PageSize] | The desired size of the page to be returned. Defaults to 1,000. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. | [optional] | -**page_token** | Optional[PageToken] | | [optional] | -**preview** | Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. | [optional] | -**select** | Optional[List[SelectedPropertyApiName]] | The properties of the object type that should be included in the response. Omit this parameter to get all the properties. | [optional] | -**snapshot** | Optional[bool] | A flag to use snapshot consistency when paging. Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. This defaults to false if not specified, which means you will always get the latest results. | [optional] | - -### Return type -**ListInterfaceLinkedObjectsResponse** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# OntologyIdentifier | The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. -ontology = "palantir" -# InterfaceTypeApiName | The API name of the interface type. To find the API name, use the **List interface types** endpoint or check the **Ontology Manager** application. -interface_type = "Employee" -# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. -object_type = "employee" -# PropertyValueEscapedString | The primary key of the object from which to **start** the interface link traversal. To look up the expected primary key for your object type, use the `Get object type` endpoint or the **Ontology Manager**. -primary_key = None -# InterfaceLinkTypeApiName | The API name of the outgoing interface link. To find the API name for your interface link type, check the **Ontology Manager** page for the parent interface. -interface_link_type = "worksAt" -# Optional[FoundryBranch] | The Foundry branch to get the outgoing link types for an object type from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. -branch = None -# Optional[bool] | A flag to exclude the retrieval of the `__rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2. -exclude_rid = None -# Optional[OrderBy] -order_by = None -# Optional[PageSize] | The desired size of the page to be returned. Defaults to 1,000. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. -page_size = None -# Optional[PageToken] -page_token = None -# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. -preview = None -# Optional[List[SelectedPropertyApiName]] | The properties of the object type that should be included in the response. Omit this parameter to get all the properties. -select = None -# Optional[bool] | A flag to use snapshot consistency when paging. Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. This defaults to false if not specified, which means you will always get the latest results. -snapshot = None - - -try: - for ontology_interface in client.ontologies.OntologyInterface.list_interface_linked_objects( - ontology, - interface_type, - object_type, - primary_key, - interface_link_type, - branch=branch, - exclude_rid=exclude_rid, - order_by=order_by, - page_size=page_size, - page_token=page_token, - preview=preview, - select=select, - snapshot=snapshot, - ): - pprint(ontology_interface) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling OntologyInterface.list_interface_linked_objects: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | ListInterfaceLinkedObjectsResponse | Success response. | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **list_objects_for_interface** -Lists the objects for the given Ontology and interface type. - -Note that this endpoint does not guarantee consistency, unless you use the snapshot flag specified below. Changes to the data could result in missing or -repeated objects in the response pages. - -For Object Storage V1 backed objects, this endpoint returns a maximum of 10,000 objects. After 10,000 objects have been returned and if more objects -are available, attempting to load another page will result in an `ObjectsExceededLimit` error being returned. There is no limit on Object Storage V2 backed objects. - -Each page may be smaller or larger than the requested page size. However, it -is guaranteed that if there are more results available, at least one result will be present -in the response. - -Note that null value properties will not be returned. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**ontology** | OntologyIdentifier | The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. | | -**interface_type** | InterfaceTypeApiName | The API name of the interface type. To find the API name, use the **List interface types** endpoint or check the **Ontology Manager**. | | -**branch** | Optional[FoundryBranch] | The Foundry branch to list objects from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. | [optional] | -**exclude_rid** | Optional[bool] | A flag to exclude the retrieval of the `__rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2. | [optional] | -**order_by** | Optional[OrderBy] | | [optional] | -**page_size** | Optional[PageSize] | The desired size of the page to be returned. Defaults to 1,000. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. | [optional] | -**page_token** | Optional[PageToken] | | [optional] | -**select** | Optional[List[SelectedPropertyApiName]] | The properties of the interface type that should be included in the response. Omit this parameter to get all the properties. | [optional] | -**snapshot** | Optional[bool] | A flag to use snapshot consistency when paging. Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. This defaults to false if not specified, which means you will always get the latest results. | [optional] | - -### Return type -**ListObjectsForInterfaceResponse** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# OntologyIdentifier | The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. -ontology = "palantir" -# InterfaceTypeApiName | The API name of the interface type. To find the API name, use the **List interface types** endpoint or check the **Ontology Manager**. -interface_type = "employee" -# Optional[FoundryBranch] | The Foundry branch to list objects from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. -branch = None -# Optional[bool] | A flag to exclude the retrieval of the `__rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2. -exclude_rid = None -# Optional[OrderBy] -order_by = None -# Optional[PageSize] | The desired size of the page to be returned. Defaults to 1,000. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. -page_size = None -# Optional[PageToken] -page_token = None -# Optional[List[SelectedPropertyApiName]] | The properties of the interface type that should be included in the response. Omit this parameter to get all the properties. -select = None -# Optional[bool] | A flag to use snapshot consistency when paging. Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. This defaults to false if not specified, which means you will always get the latest results. -snapshot = None - - -try: - for ontology_interface in client.ontologies.OntologyInterface.list_objects_for_interface( - ontology, - interface_type, - branch=branch, - exclude_rid=exclude_rid, - order_by=order_by, - page_size=page_size, - page_token=page_token, - select=select, - snapshot=snapshot, - ): - pprint(ontology_interface) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling OntologyInterface.list_objects_for_interface: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | ListObjectsForInterfaceResponse | Success response. | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **list_outgoing_interface_link_types** -List the outgoing interface link types for an interface type. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**ontology** | OntologyIdentifier | | | -**interface_type** | InterfaceTypeApiName | The API name of the interface type. To find the API name, use the **List interface types** endpoint or check the **Ontology Manager** application. | | -**branch** | Optional[FoundryBranch] | The Foundry branch to get the outgoing link type from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. | [optional] | - -### Return type -**ListOutgoingInterfaceLinkTypesResponse** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# OntologyIdentifier -ontology = "palantir" -# InterfaceTypeApiName | The API name of the interface type. To find the API name, use the **List interface types** endpoint or check the **Ontology Manager** application. -interface_type = "Employee" -# Optional[FoundryBranch] | The Foundry branch to get the outgoing link type from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. -branch = None - - -try: - api_response = client.ontologies.OntologyInterface.list_outgoing_interface_link_types( - ontology, interface_type, branch=branch - ) - print("The list_outgoing_interface_link_types response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling OntologyInterface.list_outgoing_interface_link_types: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | ListOutgoingInterfaceLinkTypesResponse | Success response. | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **search** -:::callout{theme=warning title=Warning} - This endpoint will be removed once TS OSDK is updated to use `objectSets/loadObjects` with interface object - sets. -::: -Search for objects in the specified ontology and interface type. Any properties specified in the "where" or -"orderBy" parameters must be shared property type API names defined on the interface. The following search -queries are supported: - -| Query type | Description | Supported Types | -|-----------------------------------------|-------------------------------------------------------------------------------------------------------------------|---------------------------------| -| lt | The provided property is less than the provided value. | number, string, date, timestamp | -| gt | The provided property is greater than the provided value. | number, string, date, timestamp | -| lte | The provided property is less than or equal to the provided value. | number, string, date, timestamp | -| gte | The provided property is greater than or equal to the provided value. | number, string, date, timestamp | -| eq | The provided property is exactly equal to the provided value. | number, string, date, timestamp | -| isNull | The provided property is (or is not) null. | all | -| contains | The provided property contains the provided value. | array | -| not | The sub-query does not match. | N/A (applied on a query) | -| and | All the sub-queries match. | N/A (applied on queries) | -| or | At least one of the sub-queries match. | N/A (applied on queries) | -| startsWith | The provided property starts with the provided term. | string | -| containsAllTermsInOrderPrefixLastTerm | The provided property contains all the terms provided in order. The last term can be a partial prefix match. | string | -| containsAllTermsInOrder | The provided property contains the provided terms as a substring. | string | -| containsAnyTerm | The provided property contains at least one of the terms separated by whitespace. | string | -| containsAllTerms | The provided property contains all the terms separated by whitespace. | string | - -Queries can be at most three levels deep. By default, terms are separated by whitespace or punctuation (`?!,:;-[](){}'"~`). Periods (`.`) on their own are ignored. -Partial terms are not matched by terms filters except where explicitly noted. - -Attempting to use an unsupported query will result in a validation error. Third-party applications using this -endpoint via OAuth2 must request the following operation scope: `api:ontologies-read`. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**ontology** | OntologyIdentifier | | | -**interface_type** | InterfaceTypeApiName | The API name of the interface type. To find the API name, use the **List interface types** endpoint or check the **Ontology Manager**. | | -**augmented_interface_property_types** | Dict[InterfaceTypeApiName, List[InterfacePropertyApiName]] | A map from interface type API name to a list of interface property type API names. For each returned object, if the object implements an interface that is a key in the map, then we augment the response for that object type with the list of properties specified in the value. | | -**augmented_properties** | Dict[ObjectTypeApiName, List[PropertyApiName]] | A map from object type API name to a list of property type API names. For each returned object, if the object’s object type is a key in the map, then we augment the response for that object type with the list of properties specified in the value. | | -**augmented_shared_property_types** | Dict[InterfaceTypeApiName, List[SharedPropertyTypeApiName]] | A map from interface type API name to a list of shared property type API names. For each returned object, if the object implements an interface that is a key in the map, then we augment the response for that object type with the list of properties specified in the value. | | -**other_interface_types** | List[InterfaceTypeApiName] | A list of interface type API names. Object types must implement all the mentioned interfaces in order to be included in the response. | | -**selected_interface_property_types** | List[InterfacePropertyApiName] | A list of interface property type API names of the interface type that should be included in the response. Omit this parameter to include all properties of the interface type in the response. | | -**selected_object_types** | List[ObjectTypeApiName] | A list of object type API names that should be included in the response. If non-empty, object types that are not mentioned will not be included in the response even if they implement the specified interface. Omit the parameter to include all object types. | | -**selected_shared_property_types** | List[SharedPropertyTypeApiName] | A list of shared property type API names of the interface type that should be included in the response. Omit this parameter to include all properties of the interface type in the response. | | -**branch** | Optional[FoundryBranch] | The Foundry branch to search objects from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. | [optional] | -**order_by** | Optional[SearchOrderByV2] | | [optional] | -**page_size** | Optional[PageSize] | | [optional] | -**page_token** | Optional[PageToken] | | [optional] | -**preview** | Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. | [optional] | -**where** | Optional[SearchJsonQueryV2] | | [optional] | - -### Return type -**SearchObjectsResponseV2** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# OntologyIdentifier -ontology = "palantir" -# InterfaceTypeApiName | The API name of the interface type. To find the API name, use the **List interface types** endpoint or check the **Ontology Manager**. -interface_type = "Employee" -# Dict[InterfaceTypeApiName, List[InterfacePropertyApiName]] | A map from interface type API name to a list of interface property type API names. For each returned object, if the object implements an interface that is a key in the map, then we augment the response for that object type with the list of properties specified in the value. -augmented_interface_property_types = None -# Dict[ObjectTypeApiName, List[PropertyApiName]] | A map from object type API name to a list of property type API names. For each returned object, if the object’s object type is a key in the map, then we augment the response for that object type with the list of properties specified in the value. -augmented_properties = None -# Dict[InterfaceTypeApiName, List[SharedPropertyTypeApiName]] | A map from interface type API name to a list of shared property type API names. For each returned object, if the object implements an interface that is a key in the map, then we augment the response for that object type with the list of properties specified in the value. -augmented_shared_property_types = None -# List[InterfaceTypeApiName] | A list of interface type API names. Object types must implement all the mentioned interfaces in order to be included in the response. -other_interface_types = None -# List[InterfacePropertyApiName] | A list of interface property type API names of the interface type that should be included in the response. Omit this parameter to include all properties of the interface type in the response. -selected_interface_property_types = None -# List[ObjectTypeApiName] | A list of object type API names that should be included in the response. If non-empty, object types that are not mentioned will not be included in the response even if they implement the specified interface. Omit the parameter to include all object types. -selected_object_types = None -# List[SharedPropertyTypeApiName] | A list of shared property type API names of the interface type that should be included in the response. Omit this parameter to include all properties of the interface type in the response. -selected_shared_property_types = None -# Optional[FoundryBranch] | The Foundry branch to search objects from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. -branch = None -# Optional[SearchOrderByV2] -order_by = None -# Optional[PageSize] -page_size = None -# Optional[PageToken] -page_token = None -# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. -preview = None -# Optional[SearchJsonQueryV2] -where = None - - -try: - api_response = client.ontologies.OntologyInterface.search( - ontology, - interface_type, - augmented_interface_property_types=augmented_interface_property_types, - augmented_properties=augmented_properties, - augmented_shared_property_types=augmented_shared_property_types, - other_interface_types=other_interface_types, - selected_interface_property_types=selected_interface_property_types, - selected_object_types=selected_object_types, - selected_shared_property_types=selected_shared_property_types, - branch=branch, - order_by=order_by, - page_size=page_size, - page_token=page_token, - preview=preview, - where=where, - ) - print("The search response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling OntologyInterface.search: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | SearchObjectsResponseV2 | Success response. | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - diff --git a/docs/v2/Ontologies/OntologyObject.md b/docs/v2/Ontologies/OntologyObject.md deleted file mode 100644 index 4af9f644d..000000000 --- a/docs/v2/Ontologies/OntologyObject.md +++ /dev/null @@ -1,467 +0,0 @@ -# OntologyObject - -Method | HTTP request | Release Stage | -------------- | ------------- | ----- | -[**aggregate**](#aggregate) | **POST** /v2/ontologies/{ontology}/objects/{objectType}/aggregate | Stable | -[**count**](#count) | **POST** /v2/ontologies/{ontology}/objects/{objectType}/count | Private Beta | -[**get**](#get) | **GET** /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey} | Stable | -[**list**](#list) | **GET** /v2/ontologies/{ontology}/objects/{objectType} | Stable | -[**search**](#search) | **POST** /v2/ontologies/{ontology}/objects/{objectType}/search | Stable | - -# **aggregate** -Perform functions on object fields in the specified ontology and object type. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**ontology** | OntologyIdentifier | | | -**object_type** | ObjectTypeApiName | The type of the object to aggregate on. | | -**aggregation** | List[AggregationV2] | | | -**group_by** | List[AggregationGroupByV2] | | | -**accuracy** | Optional[AggregationAccuracyRequest] | | [optional] | -**branch** | Optional[FoundryBranch] | The Foundry branch to aggregate objects from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. | [optional] | -**sdk_package_rid** | Optional[SdkPackageRid] | The package rid of the generated SDK. | [optional] | -**sdk_version** | Optional[SdkVersion] | The version of the generated SDK. | [optional] | -**where** | Optional[SearchJsonQueryV2] | | [optional] | - -### Return type -**AggregateObjectsResponseV2** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# OntologyIdentifier -ontology = "palantir" -# ObjectTypeApiName | The type of the object to aggregate on. -object_type = "employee" -# List[AggregationV2] -aggregation = [ - {"type": "min", "field": "tenure", "name": "min_tenure"}, - {"type": "avg", "field": "tenure", "name": "avg_tenure"}, -] -# List[AggregationGroupByV2] -group_by = [ - { - "field": "startDate", - "type": "range", - "ranges": [{"startValue": "2020-01-01", "endValue": "2020-06-01"}], - }, - {"field": "city", "type": "exact"}, -] -# Optional[AggregationAccuracyRequest] -accuracy = None -# Optional[FoundryBranch] | The Foundry branch to aggregate objects from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. -branch = None -# Optional[SdkPackageRid] | The package rid of the generated SDK. -sdk_package_rid = None -# Optional[SdkVersion] | The version of the generated SDK. -sdk_version = None -# Optional[SearchJsonQueryV2] -where = {"type": "eq", "field": "name", "value": "john"} - - -try: - api_response = client.ontologies.OntologyObject.aggregate( - ontology, - object_type, - aggregation=aggregation, - group_by=group_by, - accuracy=accuracy, - branch=branch, - sdk_package_rid=sdk_package_rid, - sdk_version=sdk_version, - where=where, - ) - print("The aggregate response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling OntologyObject.aggregate: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | AggregateObjectsResponseV2 | Success response. | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **count** -Returns a count of the objects of the given object type. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**ontology** | OntologyIdentifier | | | -**object_type** | ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. | | -**branch** | Optional[FoundryBranch] | The Foundry branch to count the objects from. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported. | [optional] | -**sdk_package_rid** | Optional[SdkPackageRid] | The package rid of the generated SDK. | [optional] | -**sdk_version** | Optional[SdkVersion] | The package version of the generated SDK. | [optional] | - -### Return type -**CountObjectsResponseV2** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# OntologyIdentifier -ontology = "palantir" -# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. -object_type = "employee" -# Optional[FoundryBranch] | The Foundry branch to count the objects from. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported. -branch = None -# Optional[SdkPackageRid] | The package rid of the generated SDK. -sdk_package_rid = None -# Optional[SdkVersion] | The package version of the generated SDK. -sdk_version = None - - -try: - api_response = client.ontologies.OntologyObject.count( - ontology, - object_type, - branch=branch, - sdk_package_rid=sdk_package_rid, - sdk_version=sdk_version, - ) - print("The count response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling OntologyObject.count: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | CountObjectsResponseV2 | Success response. | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **get** -Gets a specific object with the given primary key. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**ontology** | OntologyIdentifier | | | -**object_type** | ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. | | -**primary_key** | PropertyValueEscapedString | The primary key of the requested object. To look up the expected primary key for your object type, use the `Get object type` endpoint or the **Ontology Manager**. | | -**branch** | Optional[FoundryBranch] | The Foundry branch to get the object from. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported. | [optional] | -**exclude_rid** | Optional[bool] | A flag to exclude the retrieval of the `__rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2. | [optional] | -**sdk_package_rid** | Optional[SdkPackageRid] | The package rid of the generated SDK. | [optional] | -**sdk_version** | Optional[SdkVersion] | The version of the generated SDK. | [optional] | -**select** | Optional[List[SelectedPropertyApiName]] | The properties of the object type that should be included in the response. Omit this parameter to get all the properties. | [optional] | - -### Return type -**OntologyObjectV2** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# OntologyIdentifier -ontology = "palantir" -# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. -object_type = "employee" -# PropertyValueEscapedString | The primary key of the requested object. To look up the expected primary key for your object type, use the `Get object type` endpoint or the **Ontology Manager**. -primary_key = 50030 -# Optional[FoundryBranch] | The Foundry branch to get the object from. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported. -branch = None -# Optional[bool] | A flag to exclude the retrieval of the `__rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2. -exclude_rid = None -# Optional[SdkPackageRid] | The package rid of the generated SDK. -sdk_package_rid = None -# Optional[SdkVersion] | The version of the generated SDK. -sdk_version = None -# Optional[List[SelectedPropertyApiName]] | The properties of the object type that should be included in the response. Omit this parameter to get all the properties. -select = None - - -try: - api_response = client.ontologies.OntologyObject.get( - ontology, - object_type, - primary_key, - branch=branch, - exclude_rid=exclude_rid, - sdk_package_rid=sdk_package_rid, - sdk_version=sdk_version, - select=select, - ) - print("The get response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling OntologyObject.get: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | OntologyObjectV2 | Success response. | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **list** -Lists the objects for the given Ontology and object type. - -Note that this endpoint does not guarantee consistency. Changes to the data could result in missing or -repeated objects in the response pages. - -For Object Storage V1 backed objects, this endpoint returns a maximum of 10,000 objects. After 10,000 objects have been returned and if more objects -are available, attempting to load another page will result in an `ObjectsExceededLimit` error being returned. There is no limit on Object Storage V2 backed objects. - -Each page may be smaller or larger than the requested page size. However, it -is guaranteed that if there are more results available, at least one result will be present -in the response. - -Note that null value properties will not be returned. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**ontology** | OntologyIdentifier | | | -**object_type** | ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. | | -**branch** | Optional[FoundryBranch] | The Foundry branch to list objects from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. | [optional] | -**exclude_rid** | Optional[bool] | A flag to exclude the retrieval of the `__rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2. | [optional] | -**order_by** | Optional[OrderBy] | | [optional] | -**page_size** | Optional[PageSize] | The desired size of the page to be returned. Defaults to 1,000. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. | [optional] | -**page_token** | Optional[PageToken] | | [optional] | -**sdk_package_rid** | Optional[SdkPackageRid] | The package rid of the generated SDK. | [optional] | -**sdk_version** | Optional[SdkVersion] | The version of the generated SDK. | [optional] | -**select** | Optional[List[SelectedPropertyApiName]] | The properties of the object type that should be included in the response. Omit this parameter to get all the properties. | [optional] | -**snapshot** | Optional[bool] | A flag to use snapshot consistency when paging. Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. This defaults to false if not specified, which means you will always get the latest results. | [optional] | - -### Return type -**ListObjectsResponseV2** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# OntologyIdentifier -ontology = "palantir" -# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. -object_type = "employee" -# Optional[FoundryBranch] | The Foundry branch to list objects from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. -branch = None -# Optional[bool] | A flag to exclude the retrieval of the `__rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2. -exclude_rid = None -# Optional[OrderBy] -order_by = None -# Optional[PageSize] | The desired size of the page to be returned. Defaults to 1,000. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. -page_size = None -# Optional[PageToken] -page_token = None -# Optional[SdkPackageRid] | The package rid of the generated SDK. -sdk_package_rid = None -# Optional[SdkVersion] | The version of the generated SDK. -sdk_version = None -# Optional[List[SelectedPropertyApiName]] | The properties of the object type that should be included in the response. Omit this parameter to get all the properties. -select = None -# Optional[bool] | A flag to use snapshot consistency when paging. Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. This defaults to false if not specified, which means you will always get the latest results. -snapshot = None - - -try: - for ontology_object in client.ontologies.OntologyObject.list( - ontology, - object_type, - branch=branch, - exclude_rid=exclude_rid, - order_by=order_by, - page_size=page_size, - page_token=page_token, - sdk_package_rid=sdk_package_rid, - sdk_version=sdk_version, - select=select, - snapshot=snapshot, - ): - pprint(ontology_object) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling OntologyObject.list: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | ListObjectsResponseV2 | Success response. | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **search** -Search for objects in the specified ontology and object type. The request body is used -to filter objects based on the specified query. The supported queries are: - -| Query type | Description | Supported Types | -|-----------------------------------------|-------------------------------------------------------------------------------------------------------------------|---------------------------------| -| lt | The provided property is less than the provided value. | number, string, date, timestamp | -| gt | The provided property is greater than the provided value. | number, string, date, timestamp | -| lte | The provided property is less than or equal to the provided value. | number, string, date, timestamp | -| gte | The provided property is greater than or equal to the provided value. | number, string, date, timestamp | -| eq | The provided property is exactly equal to the provided value. | number, string, date, timestamp | -| isNull | The provided property is (or is not) null. | all | -| contains | The provided property contains the provided value. | array | -| not | The sub-query does not match. | N/A (applied on a query) | -| and | All the sub-queries match. | N/A (applied on queries) | -| or | At least one of the sub-queries match. | N/A (applied on queries) | -| containsAllTermsInOrderPrefixLastTerm | The provided property contains all the terms provided in order. The last term can be a partial prefix match. | string | -| containsAllTermsInOrder | The provided property contains the provided term as a substring. | string | -| containsAnyTerm | The provided property contains at least one of the terms separated by whitespace. | string | -| containsAllTerms | The provided property contains all the terms separated by whitespace. | string | -| startsWith | Deprecated alias for containsAllTermsInOrderPrefixLastTerm. | string | - -Queries can be at most three levels deep. By default, terms are separated by whitespace or punctuation (`?!,:;-[](){}'"~`). Periods (`.`) on their own are ignored. -Partial terms are not matched by terms filters except where explicitly noted. - - -### Parameters - -Name | Type | Description | Notes | -------------- |------------------------------------| ------------- | ------------- | -**ontology** | OntologyIdentifier | | | -**object_type** | ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. | | -**select** | List[PropertyApiName] | The API names of the object type properties to include in the response. | | -**select_v2** | Optional[List[PropertyIdentifier]] | The identifiers of the properties to include in the response. Only selectV2 or select should be populated, but not both. | | -**branch** | Optional[FoundryBranch] | The Foundry branch to search objects from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. | [optional] | -**exclude_rid** | Optional[bool] | A flag to exclude the retrieval of the `__rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2. | [optional] | -**order_by** | Optional[SearchOrderByV2] | | [optional] | -**page_size** | Optional[PageSize] | | [optional] | -**page_token** | Optional[PageToken] | | [optional] | -**sdk_package_rid** | Optional[SdkPackageRid] | The package rid of the generated SDK. | [optional] | -**sdk_version** | Optional[SdkVersion] | The version of the generated SDK. | [optional] | -**snapshot** | Optional[bool] | A flag to use snapshot consistency when paging. Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. This defaults to false if not specified, which means you will always get the latest results. | [optional] | -**where** | Optional[SearchJsonQueryV2] | | [optional] | - -### Return type -**SearchObjectsResponseV2** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# OntologyIdentifier -ontology = "palantir" -# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. -object_type = "employee" -# List[PropertyApiName] | The API names of the object type properties to include in the response. -select = None -# List[PropertyIdentifier] | The identifiers of the properties to include in the response. Only selectV2 or select should be populated, but not both. -select_v2 = None -# Optional[FoundryBranch] | The Foundry branch to search objects from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. -branch = None -# Optional[bool] | A flag to exclude the retrieval of the `__rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2. -exclude_rid = None -# Optional[SearchOrderByV2] -order_by = None -# Optional[PageSize] -page_size = None -# Optional[PageToken] -page_token = None -# Optional[SdkPackageRid] | The package rid of the generated SDK. -sdk_package_rid = None -# Optional[SdkVersion] | The version of the generated SDK. -sdk_version = None -# Optional[bool] | A flag to use snapshot consistency when paging. Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. This defaults to false if not specified, which means you will always get the latest results. -snapshot = None -# Optional[SearchJsonQueryV2] -where = {"type": "eq", "field": "age", "value": 21} - - -try: - api_response = client.ontologies.OntologyObject.search( - ontology, - object_type, - select=select, - select_v2=select_v2, - branch=branch, - exclude_rid=exclude_rid, - order_by=order_by, - page_size=page_size, - page_token=page_token, - sdk_package_rid=sdk_package_rid, - sdk_version=sdk_version, - snapshot=snapshot, - where=where, - ) - print("The search response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling OntologyObject.search: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | SearchObjectsResponseV2 | Success response. | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - diff --git a/docs/v2/Ontologies/OntologyObjectSet.md b/docs/v2/Ontologies/OntologyObjectSet.md deleted file mode 100644 index 848a09a1e..000000000 --- a/docs/v2/Ontologies/OntologyObjectSet.md +++ /dev/null @@ -1,652 +0,0 @@ -# OntologyObjectSet - -Method | HTTP request | Release Stage | -------------- | ------------- | ----- | -[**aggregate**](#aggregate) | **POST** /v2/ontologies/{ontology}/objectSets/aggregate | Stable | -[**create_temporary**](#create_temporary) | **POST** /v2/ontologies/{ontology}/objectSets/createTemporary | Public Beta | -[**get**](#get) | **GET** /v2/ontologies/{ontology}/objectSets/{objectSetRid} | Private Beta | -[**load**](#load) | **POST** /v2/ontologies/{ontology}/objectSets/loadObjects | Stable | -[**load_links**](#load_links) | **POST** /v2/ontologies/{ontology}/objectSets/loadLinks | Private Beta | -[**load_multiple_object_types**](#load_multiple_object_types) | **POST** /v2/ontologies/{ontology}/objectSets/loadObjectsMultipleObjectTypes | Public Beta | -[**load_objects_or_interfaces**](#load_objects_or_interfaces) | **POST** /v2/ontologies/{ontology}/objectSets/loadObjectsOrInterfaces | Public Beta | - -# **aggregate** -Aggregates the ontology objects present in the `ObjectSet` from the provided object set definition. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**ontology** | OntologyIdentifier | | | -**aggregation** | List[AggregationV2] | | | -**group_by** | List[AggregationGroupByV2] | | | -**object_set** | ObjectSet | | | -**accuracy** | Optional[AggregationAccuracyRequest] | | [optional] | -**branch** | Optional[FoundryBranch] | The Foundry branch to aggregate the objects from. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported. | [optional] | -**include_compute_usage** | Optional[IncludeComputeUsage] | | [optional] | -**sdk_package_rid** | Optional[SdkPackageRid] | The package rid of the generated SDK. | [optional] | -**sdk_version** | Optional[SdkVersion] | The package version of the generated SDK. | [optional] | -**transaction_id** | Optional[OntologyTransactionId] | The ID of an Ontology transaction to read from. Transactions are an experimental feature and all workflows may not be supported. | [optional] | - -### Return type -**AggregateObjectsResponseV2** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# OntologyIdentifier -ontology = "palantir" -# List[AggregationV2] -aggregation = [ - {"field": "tenure", "name": "min_tenure", "type": "min"}, - {"field": "tenure", "name": "avg_tenure", "type": "avg"}, -] -# List[AggregationGroupByV2] -group_by = [ - { - "field": "startDate", - "ranges": [{"endValue": "2020-06-01", "startValue": "2020-01-01"}], - "type": "range", - }, - {"field": "city", "type": "exact"}, -] -# ObjectSet -object_set = {"objectType": "Employee", "type": "base"} -# Optional[AggregationAccuracyRequest] -accuracy = None -# Optional[FoundryBranch] | The Foundry branch to aggregate the objects from. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported. -branch = None -# Optional[IncludeComputeUsage] -include_compute_usage = None -# Optional[SdkPackageRid] | The package rid of the generated SDK. -sdk_package_rid = None -# Optional[SdkVersion] | The package version of the generated SDK. -sdk_version = None -# Optional[OntologyTransactionId] | The ID of an Ontology transaction to read from. Transactions are an experimental feature and all workflows may not be supported. -transaction_id = None - - -try: - api_response = client.ontologies.OntologyObjectSet.aggregate( - ontology, - aggregation=aggregation, - group_by=group_by, - object_set=object_set, - accuracy=accuracy, - branch=branch, - include_compute_usage=include_compute_usage, - sdk_package_rid=sdk_package_rid, - sdk_version=sdk_version, - transaction_id=transaction_id, - ) - print("The aggregate response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling OntologyObjectSet.aggregate: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | AggregateObjectsResponseV2 | Success response. | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **create_temporary** -Creates a temporary `ObjectSet` from the given definition. This `ObjectSet` expires after one hour. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**ontology** | OntologyIdentifier | | | -**object_set** | ObjectSet | | | -**sdk_package_rid** | Optional[SdkPackageRid] | The package rid of the generated SDK. | [optional] | -**sdk_version** | Optional[SdkVersion] | The package version of the generated SDK. | [optional] | - -### Return type -**CreateTemporaryObjectSetResponseV2** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# OntologyIdentifier -ontology = "palantir" -# ObjectSet -object_set = {"type": "base", "objectType": "Employee"} -# Optional[SdkPackageRid] | The package rid of the generated SDK. -sdk_package_rid = None -# Optional[SdkVersion] | The package version of the generated SDK. -sdk_version = None - - -try: - api_response = client.ontologies.OntologyObjectSet.create_temporary( - ontology, object_set=object_set, sdk_package_rid=sdk_package_rid, sdk_version=sdk_version - ) - print("The create_temporary response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling OntologyObjectSet.create_temporary: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | CreateTemporaryObjectSetResponseV2 | Success response. | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **get** -Gets the definition of the `ObjectSet` with the given RID. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**ontology** | OntologyIdentifier | | | -**object_set_rid** | ObjectSetRid | The RID of the object set. | | - -### Return type -**ObjectSet** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# OntologyIdentifier -ontology = "palantir" -# ObjectSetRid | The RID of the object set. -object_set_rid = "ri.object-set.main.object-set.c32ccba5-1a55-4cfe-ad71-160c4c77a053" - - -try: - api_response = client.ontologies.OntologyObjectSet.get(ontology, object_set_rid) - print("The get response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling OntologyObjectSet.get: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | ObjectSet | Success response. | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **load** -Load the ontology objects present in the `ObjectSet` from the provided object set definition. - -For Object Storage V1 backed objects, this endpoint returns a maximum of 10,000 objects. After 10,000 objects have been returned and if more objects -are available, attempting to load another page will result in an `ObjectsExceededLimit` error being returned. There is no limit on Object Storage V2 backed objects. - -Note that null value properties will not be returned. - -Vector properties will not be returned unless included in the `select` parameter. - - -### Parameters - -Name | Type | Description | Notes | -------------- |------------------------------------| ------------- | ------------- | -**ontology** | OntologyIdentifier | | | -**object_set** | ObjectSet | | | -**select** | List[SelectedPropertyApiName] | | | -**select_v2** | Optional[List[PropertyIdentifier]] | The identifiers of the properties to include in the response. Only selectV2 or select should be populated, but not both. | | -**branch** | Optional[FoundryBranch] | The Foundry branch to load the object set from. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported. | [optional] | -**exclude_rid** | Optional[bool] | A flag to exclude the retrieval of the `__rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2. | [optional] | -**include_compute_usage** | Optional[IncludeComputeUsage] | | [optional] | -**order_by** | Optional[SearchOrderByV2] | | [optional] | -**page_size** | Optional[PageSize] | | [optional] | -**page_token** | Optional[PageToken] | | [optional] | -**sdk_package_rid** | Optional[SdkPackageRid] | The package rid of the generated SDK. | [optional] | -**sdk_version** | Optional[SdkVersion] | The package version of the generated SDK. | [optional] | -**snapshot** | Optional[bool] | A flag to use snapshot consistency when paging. Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. This defaults to false if not specified, which means you will always get the latest results. | [optional] | -**transaction_id** | Optional[OntologyTransactionId] | The ID of an Ontology transaction to read from. | [optional] | - -### Return type -**LoadObjectSetResponseV2** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# OntologyIdentifier -ontology = "palantir" -# ObjectSet -object_set = {"type": "base", "objectType": "Employee"} -# List[SelectedPropertyApiName] -select = None -# List[PropertyIdentifier] | The identifiers of the properties to include in the response. Only selectV2 or select should be populated, but not both. -select_v2 = None -# Optional[FoundryBranch] | The Foundry branch to load the object set from. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported. -branch = None -# Optional[bool] | A flag to exclude the retrieval of the `__rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2. -exclude_rid = None -# Optional[IncludeComputeUsage] -include_compute_usage = None -# Optional[SearchOrderByV2] -order_by = None -# Optional[PageSize] -page_size = 10000 -# Optional[PageToken] -page_token = "v1.QnVpbGQgdGhlIEZ1dHVyZTogaHR0cHM6Ly93d3cucGFsYW50aXIuY29tL2NhcmVlcnMvP2xldmVyLXNvdXJjZSU1YiU1ZD1BUElEb2NzI29wZW4tcG9zaXRpb25z" -# Optional[SdkPackageRid] | The package rid of the generated SDK. -sdk_package_rid = None -# Optional[SdkVersion] | The package version of the generated SDK. -sdk_version = None -# Optional[bool] | A flag to use snapshot consistency when paging. Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. This defaults to false if not specified, which means you will always get the latest results. -snapshot = None -# Optional[OntologyTransactionId] | The ID of an Ontology transaction to read from. Transactions are an experimental feature and all workflows may not be supported. -transaction_id = None - - -try: - api_response = client.ontologies.OntologyObjectSet.load( - ontology, - object_set=object_set, - select=select, - select_v2=select_v2, - branch=branch, - exclude_rid=exclude_rid, - include_compute_usage=include_compute_usage, - order_by=order_by, - page_size=page_size, - page_token=page_token, - sdk_package_rid=sdk_package_rid, - sdk_version=sdk_version, - snapshot=snapshot, - transaction_id=transaction_id, - ) - print("The load response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling OntologyObjectSet.load: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | LoadObjectSetResponseV2 | Success response. | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **load_links** -Loads the specified links from the defined object set. - -Links are defined as a link type API name and object locators for the source and target objects -where only the `__primaryKey` and `__apiName` properties are loaded. - -Links are grouped by source object locator; however, the links for a given source object may be -split over multiple entries with the same source object locator. - -Please keep these limitations in mind: -- Links returned may be stale. For example, primary keys returned by this endpoint may not exist anymore. -- This endpoint requests links for 1,000 objects at a time. If, for any page of 1,000 objects, there are more - than 100,000 links present, results are limited to 100,000 links and should be considered partial. -- This endpoint does not support OSv1 links and will return an error if links provided are backed by OSv1. -- This endpoint currently does not support interface object sets or interface links, but support will be added in the near future. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**ontology** | OntologyIdentifier | | | -**links** | List[LinkTypeApiName] | | | -**object_set** | ObjectSet | | | -**branch** | Optional[FoundryBranch] | The Foundry branch to aggregate the objects from. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported. | [optional] | -**include_compute_usage** | Optional[IncludeComputeUsage] | | [optional] | -**page_token** | Optional[PageToken] | | [optional] | -**preview** | Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. | [optional] | -**sdk_package_rid** | Optional[SdkPackageRid] | The package rid of the generated SDK. | [optional] | -**sdk_version** | Optional[SdkVersion] | The package version of the generated SDK. | [optional] | - -### Return type -**LoadObjectSetLinksResponseV2** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# OntologyIdentifier -ontology = "palantir" -# List[LinkTypeApiName] -links = None -# ObjectSet -object_set = {"objectType": "Employee", "type": "base"} -# Optional[FoundryBranch] | The Foundry branch to aggregate the objects from. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported. -branch = None -# Optional[IncludeComputeUsage] -include_compute_usage = None -# Optional[PageToken] -page_token = None -# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. -preview = None -# Optional[SdkPackageRid] | The package rid of the generated SDK. -sdk_package_rid = None -# Optional[SdkVersion] | The package version of the generated SDK. -sdk_version = None - - -try: - api_response = client.ontologies.OntologyObjectSet.load_links( - ontology, - links=links, - object_set=object_set, - branch=branch, - include_compute_usage=include_compute_usage, - page_token=page_token, - preview=preview, - sdk_package_rid=sdk_package_rid, - sdk_version=sdk_version, - ) - print("The load_links response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling OntologyObjectSet.load_links: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | LoadObjectSetLinksResponseV2 | Success response. | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **load_multiple_object_types** -Load the ontology objects present in the `ObjectSet` from the provided object set definition. The resulting -objects may be scoped to an object type, in which all the selected properties on the object type are returned, or scoped -to an interface, in which only the object type properties that implement the properties of any interfaces in its -scope are returned. For objects that are scoped to an interface in the result, a mapping from interface to -object implementation is returned in order to interpret the objects as the interfaces that they implement. - -For Object Storage V1 backed objects, this endpoint returns a maximum of 10,000 objects. After 10,000 objects have been returned and if more objects -are available, attempting to load another page will result in an `ObjectsExceededLimit` error being returned. There is no limit on Object Storage V2 backed objects. - -Note that null value properties will not be returned. In addition, property metadata (rid, apiName, and primaryKey) -will be prefixed with '$' instead of '__' as is the case in `loadObjects`. - -Vector properties will not be returned unless included in the `select` parameter. - - -### Parameters - -Name | Type | Description | Notes | -------------- |------------------------------------| ------------- | ------------- | -**ontology** | OntologyIdentifier | | | -**object_set** | ObjectSet | | | -**select** | List[SelectedPropertyApiName] | | | -**select_v2** | Optional[List[PropertyIdentifier]] | The identifiers of the properties to include in the response. Only selectV2 or select should be populated, but not both. | | -**branch** | Optional[FoundryBranch] | The Foundry branch to load the object set for multiple object types. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported. | [optional] | -**exclude_rid** | Optional[bool] | A flag to exclude the retrieval of the `$rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2. | [optional] | -**include_compute_usage** | Optional[IncludeComputeUsage] | | [optional] | -**order_by** | Optional[SearchOrderByV2] | | [optional] | -**page_size** | Optional[PageSize] | | [optional] | -**page_token** | Optional[PageToken] | | [optional] | -**preview** | Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. | [optional] | -**sdk_package_rid** | Optional[SdkPackageRid] | The package rid of the generated SDK. | [optional] | -**sdk_version** | Optional[SdkVersion] | The package version of the generated SDK. | [optional] | -**snapshot** | Optional[bool] | A flag to use snapshot consistency when paging. Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. This defaults to false if not specified, which means you will always get the latest results. | [optional] | -**transaction_id** | Optional[OntologyTransactionId] | The ID of an Ontology transaction to read from. | [optional] | - -### Return type -**LoadObjectSetV2MultipleObjectTypesResponse** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# OntologyIdentifier -ontology = "palantir" -# ObjectSet -object_set = {"type": "base", "objectType": "Employee"} -# List[SelectedPropertyApiName] -select = None -# List[PropertyIdentifier] | The identifiers of the properties to include in the response. Only selectV2 or select should be populated, but not both. -select_v2 = None -# Optional[FoundryBranch] | The Foundry branch to load the object set for multiple object types. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported. -branch = None -# Optional[bool] | A flag to exclude the retrieval of the `$rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2. -exclude_rid = None -# Optional[IncludeComputeUsage] -include_compute_usage = None -# Optional[SearchOrderByV2] -order_by = None -# Optional[PageSize] -page_size = 10000 -# Optional[PageToken] -page_token = "v1.QnVpbGQgdGhlIEZ1dHVyZTogaHR0cHM6Ly93d3cucGFsYW50aXIuY29tL2NhcmVlcnMvP2xldmVyLXNvdXJjZSU1YiU1ZD1BUElEb2NzI29wZW4tcG9zaXRpb25z" -# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. -preview = None -# Optional[SdkPackageRid] | The package rid of the generated SDK. -sdk_package_rid = None -# Optional[SdkVersion] | The package version of the generated SDK. -sdk_version = None -# Optional[bool] | A flag to use snapshot consistency when paging. Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. This defaults to false if not specified, which means you will always get the latest results. -snapshot = None -# Optional[OntologyTransactionId] | The ID of an Ontology transaction to read from. Transactions are an experimental feature and all workflows may not be supported. -transaction_id = None - - -try: - api_response = client.ontologies.OntologyObjectSet.load_multiple_object_types( - ontology, - object_set=object_set, - select=select, - select_v2=select_v2, - branch=branch, - exclude_rid=exclude_rid, - include_compute_usage=include_compute_usage, - order_by=order_by, - page_size=page_size, - page_token=page_token, - preview=preview, - sdk_package_rid=sdk_package_rid, - sdk_version=sdk_version, - snapshot=snapshot, - transaction_id=transaction_id, - ) - print("The load_multiple_object_types response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling OntologyObjectSet.load_multiple_object_types: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | LoadObjectSetV2MultipleObjectTypesResponse | Success response. | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **load_objects_or_interfaces** -Load the ontology objects present in the `ObjectSet` from the provided object set definition. If the requested -object set contains interfaces and the object can be viewed as an interface, it will contain the properties -defined by the interface. If not, it will contain the properties defined by its object type. This allows directly -loading all objects of an interface where all objects are viewed as the interface, for example. - -Note that the result object set cannot contain a mix of objects with "interface" properties and "object type" -properties. Attempting to load an object set like this will result in an error. - -For Object Storage V1 backed objects, this endpoint returns a maximum of 10,000 objects. After 10,000 objects have been returned and if more objects -are available, attempting to load another page will result in an `ObjectsExceededLimit` error being returned. There is no limit on Object Storage V2 backed objects. - -Note that null value properties will not be returned. In addition, property metadata (rid, apiName, and primaryKey) -will be prefixed with '$' instead of '__' as is the case in `/loadObjects`. - -Vector properties will not be returned unless included in the `select` parameter. - - -### Parameters - -Name | Type | Description | Notes | -------------- |------------------------------------| ------------- | ------------- | -**ontology** | OntologyIdentifier | | | -**object_set** | ObjectSet | | | -**select** | List[SelectedPropertyApiName] | | | -**select_v2** | Optional[List[PropertyIdentifier]] | The identifiers of the properties to include in the response. Only selectV2 or select should be populated, but not both. | | -**branch** | Optional[FoundryBranch] | The Foundry branch to load the objects or interfaces from. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported. | [optional] | -**exclude_rid** | Optional[bool] | A flag to exclude the retrieval of the `$rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2. | [optional] | -**order_by** | Optional[SearchOrderByV2] | | [optional] | -**page_size** | Optional[PageSize] | | [optional] | -**page_token** | Optional[PageToken] | | [optional] | -**preview** | Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. | [optional] | -**sdk_package_rid** | Optional[SdkPackageRid] | The package rid of the generated SDK. | [optional] | -**sdk_version** | Optional[SdkVersion] | The package version of the generated SDK. | [optional] | -**snapshot** | Optional[bool] | A flag to use snapshot consistency when paging. Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. This defaults to false if not specified, which means you will always get the latest results. | [optional] | - -### Return type -**LoadObjectSetV2ObjectsOrInterfacesResponse** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# OntologyIdentifier -ontology = "palantir" -# ObjectSet -object_set = {"type": "base", "interfaceBase": "Person"} -# List[SelectedPropertyApiName] -select = None -# List[PropertyIdentifier] | The identifiers of the properties to include in the response. Only selectV2 or select should be populated, but not both. -select_v2 = None -# Optional[FoundryBranch] | The Foundry branch to load the objects or interfaces from. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported. -branch = None -# Optional[bool] | A flag to exclude the retrieval of the `$rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2. -exclude_rid = None -# Optional[SearchOrderByV2] -order_by = None -# Optional[PageSize] -page_size = 10000 -# Optional[PageToken] -page_token = "v1.VGhlcmUgaXMgc28gbXVjaCBsZWZ0IHRvIGJ1aWxkIC0gcGFsYW50aXIuY29tL2NhcmVlcnMv" -# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. -preview = None -# Optional[SdkPackageRid] | The package rid of the generated SDK. -sdk_package_rid = None -# Optional[SdkVersion] | The package version of the generated SDK. -sdk_version = None -# Optional[bool] | A flag to use snapshot consistency when paging. Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. This defaults to false if not specified, which means you will always get the latest results. -snapshot = None - - -try: - api_response = client.ontologies.OntologyObjectSet.load_objects_or_interfaces( - ontology, - object_set=object_set, - select=select, - select_v2=select_v2, - branch=branch, - exclude_rid=exclude_rid, - order_by=order_by, - page_size=page_size, - page_token=page_token, - preview=preview, - sdk_package_rid=sdk_package_rid, - sdk_version=sdk_version, - snapshot=snapshot, - ) - print("The load_objects_or_interfaces response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling OntologyObjectSet.load_objects_or_interfaces: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | LoadObjectSetV2ObjectsOrInterfacesResponse | Success response. | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - diff --git a/docs/v2/Ontologies/OntologyTransaction.md b/docs/v2/Ontologies/OntologyTransaction.md deleted file mode 100644 index d858abf44..000000000 --- a/docs/v2/Ontologies/OntologyTransaction.md +++ /dev/null @@ -1,65 +0,0 @@ -# OntologyTransaction - -Method | HTTP request | Release Stage | -------------- | ------------- | ----- | -[**post_edits**](#post_edits) | **POST** /v2/ontologies/{ontology}/transactions/{transactionId}/edits | Private Beta | - -# **post_edits** -Applies a set of edits to a transaction in order. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**ontology** | OntologyIdentifier | | | -**transaction_id** | OntologyTransactionId | The ID of the transaction to apply edits to. Transactions are an experimental feature and all workflows may not be supported. | | -**edits** | List[TransactionEdit] | | | -**preview** | Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. | [optional] | - -### Return type -**PostTransactionEditsResponse** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# OntologyIdentifier -ontology = "palantir" -# OntologyTransactionId | The ID of the transaction to apply edits to. Transactions are an experimental feature and all workflows may not be supported. -transaction_id = None -# List[TransactionEdit] -edits = None -# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. -preview = None - - -try: - api_response = client.ontologies.OntologyTransaction.post_edits( - ontology, transaction_id, edits=edits, preview=preview - ) - print("The post_edits response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling OntologyTransaction.post_edits: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | PostTransactionEditsResponse | Transaction edits were applied successfully. | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - diff --git a/docs/v2/Ontologies/OntologyValueType.md b/docs/v2/Ontologies/OntologyValueType.md deleted file mode 100644 index aa14fd9f8..000000000 --- a/docs/v2/Ontologies/OntologyValueType.md +++ /dev/null @@ -1,112 +0,0 @@ -# OntologyValueType - -Method | HTTP request | Release Stage | -------------- | ------------- | ----- | -[**get**](#get) | **GET** /v2/ontologies/{ontology}/valueTypes/{valueType} | Public Beta | -[**list**](#list) | **GET** /v2/ontologies/{ontology}/valueTypes | Public Beta | - -# **get** -Gets a specific value type with the given API name. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**ontology** | OntologyIdentifier | | | -**value_type** | ValueTypeApiName | The API name of the value type. To find the API name, use the **List value types** endpoint or check the **Ontology Manager**. | | -**preview** | Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. | [optional] | - -### Return type -**OntologyValueType** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# OntologyIdentifier -ontology = "palantir" -# ValueTypeApiName | The API name of the value type. To find the API name, use the **List value types** endpoint or check the **Ontology Manager**. -value_type = "countryCode" -# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. -preview = None - - -try: - api_response = client.ontologies.OntologyValueType.get(ontology, value_type, preview=preview) - print("The get response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling OntologyValueType.get: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | OntologyValueType | Success response. | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **list** -Lists the latest versions of the value types for the given Ontology. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**ontology** | OntologyIdentifier | | | -**preview** | Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. | [optional] | - -### Return type -**ListOntologyValueTypesResponse** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# OntologyIdentifier -ontology = "palantir" -# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. -preview = None - - -try: - api_response = client.ontologies.OntologyValueType.list(ontology, preview=preview) - print("The list response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling OntologyValueType.list: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | ListOntologyValueTypesResponse | Success response. | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - diff --git a/docs/v2/Ontologies/Query.md b/docs/v2/Ontologies/Query.md deleted file mode 100644 index 3e69b45f0..000000000 --- a/docs/v2/Ontologies/Query.md +++ /dev/null @@ -1,94 +0,0 @@ -# Query - -Method | HTTP request | Release Stage | -------------- | ------------- | ----- | -[**execute**](#execute) | **POST** /v2/ontologies/{ontology}/queries/{queryApiName}/execute | Stable | - -# **execute** -Executes a Query using the given parameters. By default, the latest version of the Query is executed. - -Optional parameters do not need to be supplied. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**ontology** | OntologyIdentifier | | | -**query_api_name** | QueryApiName | The API name of the Query to execute. | | -**parameters** | Dict[ParameterId, Optional[DataValue]] | | | -**attribution** | Optional[Attribution] | The Attribution to be used when executing this request. | [optional] | -**sdk_package_rid** | Optional[SdkPackageRid] | The package rid of the generated SDK. | [optional] | -**sdk_version** | Optional[SdkVersion] | The version of the generated SDK. | [optional] | -**trace_parent** | Optional[TraceParent] | The W3C trace parent header included in the request. | [optional] | -**trace_state** | Optional[TraceState] | The W3C trace state header included in the request. | [optional] | -**transaction_id** | Optional[OntologyTransactionId] | The ID of an Ontology transaction to read from. Transactions are an experimental feature and all workflows may not be supported. | [optional] | -**version** | Optional[FunctionVersion] | The version of the Query to execute. | [optional] | - -### Return type -**ExecuteQueryResponse** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# OntologyIdentifier -ontology = "palantir" -# QueryApiName | The API name of the Query to execute. -query_api_name = "getEmployeesInCity" -# Dict[ParameterId, Optional[DataValue]] -parameters = {"city": "New York"} -# Optional[Attribution] | The Attribution to be used when executing this request. -attribution = None -# Optional[SdkPackageRid] | The package rid of the generated SDK. -sdk_package_rid = None -# Optional[SdkVersion] | The version of the generated SDK. -sdk_version = None -# Optional[TraceParent] | The W3C trace parent header included in the request. -trace_parent = None -# Optional[TraceState] | The W3C trace state header included in the request. -trace_state = None -# Optional[OntologyTransactionId] | The ID of an Ontology transaction to read from. Transactions are an experimental feature and all workflows may not be supported. -transaction_id = None -# Optional[FunctionVersion] | The version of the Query to execute. -version = None - - -try: - api_response = client.ontologies.Query.execute( - ontology, - query_api_name, - parameters=parameters, - attribution=attribution, - sdk_package_rid=sdk_package_rid, - sdk_version=sdk_version, - trace_parent=trace_parent, - trace_state=trace_state, - transaction_id=transaction_id, - version=version, - ) - print("The execute response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Query.execute: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | ExecuteQueryResponse | Success response. | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - diff --git a/docs/v2/Ontologies/QueryType.md b/docs/v2/Ontologies/QueryType.md deleted file mode 100644 index 620d1210d..000000000 --- a/docs/v2/Ontologies/QueryType.md +++ /dev/null @@ -1,131 +0,0 @@ -# QueryType - -Method | HTTP request | Release Stage | -------------- | ------------- | ----- | -[**get**](#get) | **GET** /v2/ontologies/{ontology}/queryTypes/{queryApiName} | Stable | -[**list**](#list) | **GET** /v2/ontologies/{ontology}/queryTypes | Stable | - -# **get** -Gets a specific query type with the given API name. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**ontology** | OntologyIdentifier | | | -**query_api_name** | QueryApiName | The API name of the query type. To find the API name, use the **List query types** endpoint or check the **Ontology Manager**. | | -**sdk_package_rid** | Optional[SdkPackageRid] | The package rid of the generated SDK. | [optional] | -**sdk_version** | Optional[SdkVersion] | The version of the generated SDK. | [optional] | -**version** | Optional[FunctionVersion] | The version of the Query to get. | [optional] | - -### Return type -**QueryTypeV2** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# OntologyIdentifier -ontology = "palantir" -# QueryApiName | The API name of the query type. To find the API name, use the **List query types** endpoint or check the **Ontology Manager**. -query_api_name = "getEmployeesInCity" -# Optional[SdkPackageRid] | The package rid of the generated SDK. -sdk_package_rid = None -# Optional[SdkVersion] | The version of the generated SDK. -sdk_version = None -# Optional[FunctionVersion] | The version of the Query to get. -version = None - - -try: - api_response = client.ontologies.Ontology.QueryType.get( - ontology, - query_api_name, - sdk_package_rid=sdk_package_rid, - sdk_version=sdk_version, - version=version, - ) - print("The get response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling QueryType.get: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | QueryTypeV2 | Success response. | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **list** -Lists the query types for the given Ontology. - -Each page may be smaller than the requested page size. However, it is guaranteed that if there are more -results available, at least one result will be present in the response. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**ontology** | OntologyIdentifier | | | -**page_size** | Optional[PageSize] | The desired size of the page to be returned. Defaults to 100. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. | [optional] | -**page_token** | Optional[PageToken] | | [optional] | - -### Return type -**ListQueryTypesResponseV2** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# OntologyIdentifier -ontology = "palantir" -# Optional[PageSize] | The desired size of the page to be returned. Defaults to 100. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. -page_size = None -# Optional[PageToken] -page_token = None - - -try: - for query_type in client.ontologies.Ontology.QueryType.list( - ontology, page_size=page_size, page_token=page_token - ): - pprint(query_type) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling QueryType.list: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | ListQueryTypesResponseV2 | Success response. | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - diff --git a/docs/v2/Ontologies/TimeSeriesPropertyV2.md b/docs/v2/Ontologies/TimeSeriesPropertyV2.md deleted file mode 100644 index 99eab96ea..000000000 --- a/docs/v2/Ontologies/TimeSeriesPropertyV2.md +++ /dev/null @@ -1,234 +0,0 @@ -# TimeSeriesPropertyV2 - -Method | HTTP request | Release Stage | -------------- | ------------- | ----- | -[**get_first_point**](#get_first_point) | **GET** /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/timeseries/{property}/firstPoint | Stable | -[**get_last_point**](#get_last_point) | **GET** /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/timeseries/{property}/lastPoint | Stable | -[**stream_points**](#stream_points) | **POST** /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/timeseries/{property}/streamPoints | Stable | - -# **get_first_point** -Get the first point of a time series property. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**ontology** | OntologyIdentifier | | | -**object_type** | ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. | | -**primary_key** | PropertyValueEscapedString | The primary key of the object with the time series property. | | -**property** | PropertyApiName | The API name of the time series property. To find the API name for your time series property, check the **Ontology Manager** or use the **Get object type** endpoint. | | -**sdk_package_rid** | Optional[SdkPackageRid] | The package rid of the generated SDK. | [optional] | -**sdk_version** | Optional[SdkVersion] | The version of the generated SDK. | [optional] | - -### Return type -**Optional[TimeSeriesPoint]** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# OntologyIdentifier -ontology = "palantir" -# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. -object_type = "employee" -# PropertyValueEscapedString | The primary key of the object with the time series property. -primary_key = 50030 -# PropertyApiName | The API name of the time series property. To find the API name for your time series property, check the **Ontology Manager** or use the **Get object type** endpoint. -property = "performance" -# Optional[SdkPackageRid] | The package rid of the generated SDK. -sdk_package_rid = None -# Optional[SdkVersion] | The version of the generated SDK. -sdk_version = None - - -try: - api_response = client.ontologies.TimeSeriesPropertyV2.get_first_point( - ontology, - object_type, - primary_key, - property, - sdk_package_rid=sdk_package_rid, - sdk_version=sdk_version, - ) - print("The get_first_point response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling TimeSeriesPropertyV2.get_first_point: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | Optional[TimeSeriesPoint] | Success response. | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **get_last_point** -Get the last point of a time series property. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**ontology** | OntologyIdentifier | | | -**object_type** | ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. | | -**primary_key** | PropertyValueEscapedString | The primary key of the object with the time series property. | | -**property** | PropertyApiName | The API name of the time series property. To find the API name for your time series property, check the **Ontology Manager** or use the **Get object type** endpoint. | | -**sdk_package_rid** | Optional[SdkPackageRid] | The package rid of the generated SDK. | [optional] | -**sdk_version** | Optional[SdkVersion] | The version of the generated SDK. | [optional] | - -### Return type -**Optional[TimeSeriesPoint]** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# OntologyIdentifier -ontology = "palantir" -# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. -object_type = "employee" -# PropertyValueEscapedString | The primary key of the object with the time series property. -primary_key = 50030 -# PropertyApiName | The API name of the time series property. To find the API name for your time series property, check the **Ontology Manager** or use the **Get object type** endpoint. -property = "performance" -# Optional[SdkPackageRid] | The package rid of the generated SDK. -sdk_package_rid = None -# Optional[SdkVersion] | The version of the generated SDK. -sdk_version = None - - -try: - api_response = client.ontologies.TimeSeriesPropertyV2.get_last_point( - ontology, - object_type, - primary_key, - property, - sdk_package_rid=sdk_package_rid, - sdk_version=sdk_version, - ) - print("The get_last_point response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling TimeSeriesPropertyV2.get_last_point: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | Optional[TimeSeriesPoint] | Success response. | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **stream_points** -Stream all of the points of a time series property. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**ontology** | OntologyIdentifier | | | -**object_type** | ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. | | -**primary_key** | PropertyValueEscapedString | The primary key of the object with the time series property. | | -**property** | PropertyApiName | The API name of the time series property. To find the API name for your time series property, check the **Ontology Manager** or use the **Get object type** endpoint. | | -**aggregate** | Optional[AggregateTimeSeries] | | [optional] | -**format** | Optional[StreamingOutputFormat] | The output format to serialize the output binary stream in. Default is JSON. ARROW is more efficient than JSON at streaming a large sized response. | [optional] | -**range** | Optional[TimeRange] | | [optional] | -**sdk_package_rid** | Optional[SdkPackageRid] | The package rid of the generated SDK. | [optional] | -**sdk_version** | Optional[SdkVersion] | The version of the generated SDK. | [optional] | - -### Return type -**bytes** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# OntologyIdentifier -ontology = "palantir" -# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. -object_type = "employee" -# PropertyValueEscapedString | The primary key of the object with the time series property. -primary_key = 50030 -# PropertyApiName | The API name of the time series property. To find the API name for your time series property, check the **Ontology Manager** or use the **Get object type** endpoint. -property = None -# Optional[AggregateTimeSeries] -aggregate = None -# Optional[StreamingOutputFormat] | The output format to serialize the output binary stream in. Default is JSON. ARROW is more efficient than JSON at streaming a large sized response. -format = None -# Optional[TimeRange] -range = { - "type": "relative", - "startTime": {"when": "BEFORE", "value": 5, "unit": "MONTHS"}, - "endTime": {"when": "BEFORE", "value": 1, "unit": "MONTHS"}, -} -# Optional[SdkPackageRid] | The package rid of the generated SDK. -sdk_package_rid = None -# Optional[SdkVersion] | The version of the generated SDK. -sdk_version = None - - -try: - api_response = client.ontologies.TimeSeriesPropertyV2.stream_points( - ontology, - object_type, - primary_key, - property, - aggregate=aggregate, - format=format, - range=range, - sdk_package_rid=sdk_package_rid, - sdk_version=sdk_version, - ) - print("The stream_points response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling TimeSeriesPropertyV2.stream_points: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | bytes | Success response. | */* | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - diff --git a/docs/v2/Ontologies/TimeSeriesValueBankProperty.md b/docs/v2/Ontologies/TimeSeriesValueBankProperty.md deleted file mode 100644 index 33fb120d1..000000000 --- a/docs/v2/Ontologies/TimeSeriesValueBankProperty.md +++ /dev/null @@ -1,155 +0,0 @@ -# TimeSeriesValueBankProperty - -Method | HTTP request | Release Stage | -------------- | ------------- | ----- | -[**get_latest_value**](#get_latest_value) | **GET** /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/timeseries/{propertyName}/latestValue | Stable | -[**stream_values**](#stream_values) | **POST** /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/timeseries/{property}/streamValues | Stable | - -# **get_latest_value** -Get the latest value of a property backed by a timeseries. If a specific geotime series integration has both a history and a live integration, we will give precedence to the live integration. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**ontology** | OntologyIdentifier | | | -**object_type** | ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. | | -**primary_key** | PropertyValueEscapedString | The primary key of the object with the timeseries property. | | -**property_name** | PropertyApiName | The API name of the timeseries property. To find the API name for your property value bank property, check the **Ontology Manager** or use the **Get object type** endpoint. | | -**sdk_package_rid** | Optional[SdkPackageRid] | The package rid of the generated SDK. | [optional] | -**sdk_version** | Optional[SdkVersion] | The version of the generated SDK. | [optional] | - -### Return type -**Optional[TimeseriesEntry]** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# OntologyIdentifier -ontology = "palantir" -# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. -object_type = "employee" -# PropertyValueEscapedString | The primary key of the object with the timeseries property. -primary_key = 50030 -# PropertyApiName | The API name of the timeseries property. To find the API name for your property value bank property, check the **Ontology Manager** or use the **Get object type** endpoint. -property_name = "performance" -# Optional[SdkPackageRid] | The package rid of the generated SDK. -sdk_package_rid = None -# Optional[SdkVersion] | The version of the generated SDK. -sdk_version = None - - -try: - api_response = client.ontologies.TimeSeriesValueBankProperty.get_latest_value( - ontology, - object_type, - primary_key, - property_name, - sdk_package_rid=sdk_package_rid, - sdk_version=sdk_version, - ) - print("The get_latest_value response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling TimeSeriesValueBankProperty.get_latest_value: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | Optional[TimeseriesEntry] | Success response. | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **stream_values** -Stream all of the points of a time series property (this includes geotime series references). - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**ontology** | OntologyIdentifier | | | -**object_type** | ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. | | -**primary_key** | PropertyValueEscapedString | The primary key of the object with the time series property. | | -**property** | PropertyApiName | The API name of the time series backed property. To find the API name, check the **Ontology Manager** or use the **Get object type** endpoint. | | -**range** | Optional[TimeRange] | | [optional] | -**sdk_package_rid** | Optional[SdkPackageRid] | The package rid of the generated SDK. | [optional] | -**sdk_version** | Optional[SdkVersion] | The version of the generated SDK. | [optional] | - -### Return type -**bytes** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# OntologyIdentifier -ontology = "palantir" -# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. -object_type = "employee" -# PropertyValueEscapedString | The primary key of the object with the time series property. -primary_key = 50030 -# PropertyApiName | The API name of the time series backed property. To find the API name, check the **Ontology Manager** or use the **Get object type** endpoint. -property = None -# Optional[TimeRange] -range = { - "type": "relative", - "startTime": {"when": "BEFORE", "value": 5, "unit": "MONTHS"}, - "endTime": {"when": "BEFORE", "value": 1, "unit": "MONTHS"}, -} -# Optional[SdkPackageRid] | The package rid of the generated SDK. -sdk_package_rid = None -# Optional[SdkVersion] | The version of the generated SDK. -sdk_version = None - - -try: - api_response = client.ontologies.TimeSeriesValueBankProperty.stream_values( - ontology, - object_type, - primary_key, - property, - range=range, - sdk_package_rid=sdk_package_rid, - sdk_version=sdk_version, - ) - print("The stream_values response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling TimeSeriesValueBankProperty.stream_values: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | bytes | Success response. | */* | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - diff --git a/docs/v2/Ontologies/models/AbsoluteTimeRange.md b/docs/v2/Ontologies/models/AbsoluteTimeRange.md deleted file mode 100644 index 2512eca79..000000000 --- a/docs/v2/Ontologies/models/AbsoluteTimeRange.md +++ /dev/null @@ -1,13 +0,0 @@ -# AbsoluteTimeRange - -ISO 8601 timestamps forming a range for a time series query. Start is inclusive and end is exclusive. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**start_time** | Optional[datetime] | No | | -**end_time** | Optional[datetime] | No | | -**type** | Literal["absolute"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/AbsoluteValuePropertyExpression.md b/docs/v2/Ontologies/models/AbsoluteValuePropertyExpression.md deleted file mode 100644 index 25ea23a93..000000000 --- a/docs/v2/Ontologies/models/AbsoluteValuePropertyExpression.md +++ /dev/null @@ -1,13 +0,0 @@ -# AbsoluteValuePropertyExpression - -Calculates absolute value of a numeric value. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**property** | DerivedPropertyDefinition | Yes | | -**type** | Literal["absoluteValue"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ActionExecutionTime.md b/docs/v2/Ontologies/models/ActionExecutionTime.md deleted file mode 100644 index c14bad571..000000000 --- a/docs/v2/Ontologies/models/ActionExecutionTime.md +++ /dev/null @@ -1,12 +0,0 @@ -# ActionExecutionTime - -An ISO 8601 timestamp. - - -## Type -```python -datetime -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ActionLogicRule.md b/docs/v2/Ontologies/models/ActionLogicRule.md deleted file mode 100644 index 04559c3fb..000000000 --- a/docs/v2/Ontologies/models/ActionLogicRule.md +++ /dev/null @@ -1,27 +0,0 @@ -# ActionLogicRule - -A detailed operation for an Action - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -ModifyInterfaceLogicRule | modifyInterface -CreateOrModifyObjectLogicRule | createOrModifyObject -ModifyObjectLogicRule | modifyObject -DeleteLinkLogicRule | deleteLink -CreateObjectLogicRule | createObject -CreateLinkLogicRule | createLink -BatchedFunctionLogicRule | batchedFunction -CreateOrModifyObjectLogicRuleV2 | createOrModifyObjectV2 -DeleteInterfaceLinkLogicRule | deleteInterfaceLink -DeleteObjectLogicRule | deleteObject -FunctionLogicRule | function -CreateInterfaceLinkLogicRule | createInterfaceLink -CreateInterfaceLogicRule | createInterface - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ActionParameterArrayType.md b/docs/v2/Ontologies/models/ActionParameterArrayType.md deleted file mode 100644 index 8a73b0b93..000000000 --- a/docs/v2/Ontologies/models/ActionParameterArrayType.md +++ /dev/null @@ -1,12 +0,0 @@ -# ActionParameterArrayType - -ActionParameterArrayType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**sub_type** | ActionParameterType | Yes | | -**type** | Literal["array"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ActionParameterType.md b/docs/v2/Ontologies/models/ActionParameterType.md deleted file mode 100644 index e7c5bad70..000000000 --- a/docs/v2/Ontologies/models/ActionParameterType.md +++ /dev/null @@ -1,34 +0,0 @@ -# ActionParameterType - -A union of all the types supported by Ontology Action parameters. - - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -DateType | date -OntologyInterfaceObjectType | interfaceObject -OntologyStructType | struct -StringType | string -DoubleType | double -IntegerType | integer -GeoShapeType | geoshape -LongType | long -OntologyObjectTypeReferenceType | objectType -BooleanType | boolean -MarkingType | marking -AttachmentType | attachment -MediaReferenceType | mediaReference -ActionParameterArrayType | array -OntologyObjectSetType | objectSet -GeohashType | geohash -VectorType | vector -OntologyObjectType | object -TimestampType | timestamp - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ActionParameterV2.md b/docs/v2/Ontologies/models/ActionParameterV2.md deleted file mode 100644 index b7a55acc5..000000000 --- a/docs/v2/Ontologies/models/ActionParameterV2.md +++ /dev/null @@ -1,14 +0,0 @@ -# ActionParameterV2 - -Details about a parameter of an action. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**display_name** | DisplayName | Yes | | -**description** | Optional[str] | No | | -**data_type** | ActionParameterType | Yes | | -**required** | bool | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ActionResults.md b/docs/v2/Ontologies/models/ActionResults.md deleted file mode 100644 index 22d63f679..000000000 --- a/docs/v2/Ontologies/models/ActionResults.md +++ /dev/null @@ -1,16 +0,0 @@ -# ActionResults - -ActionResults - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -ObjectEdits | edits -ObjectTypeEdits | largeScaleEdits - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ActionRid.md b/docs/v2/Ontologies/models/ActionRid.md deleted file mode 100644 index 554afee6d..000000000 --- a/docs/v2/Ontologies/models/ActionRid.md +++ /dev/null @@ -1,11 +0,0 @@ -# ActionRid - -The unique resource identifier for an action. - -## Type -```python -RID -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ActionTypeApiName.md b/docs/v2/Ontologies/models/ActionTypeApiName.md deleted file mode 100644 index 34de0f17e..000000000 --- a/docs/v2/Ontologies/models/ActionTypeApiName.md +++ /dev/null @@ -1,13 +0,0 @@ -# ActionTypeApiName - -The name of the action type in the API. To find the API name for your Action Type, use the `List action types` -endpoint or check the **Ontology Manager**. - - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ActionTypeFullMetadata.md b/docs/v2/Ontologies/models/ActionTypeFullMetadata.md deleted file mode 100644 index e557ed294..000000000 --- a/docs/v2/Ontologies/models/ActionTypeFullMetadata.md +++ /dev/null @@ -1,12 +0,0 @@ -# ActionTypeFullMetadata - -Returns the full metadata for an Action type in the Ontology. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**action_type** | ActionTypeV2 | Yes | | -**full_logic_rules** | List[ActionLogicRule] | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ActionTypeRid.md b/docs/v2/Ontologies/models/ActionTypeRid.md deleted file mode 100644 index 41d4e6f9e..000000000 --- a/docs/v2/Ontologies/models/ActionTypeRid.md +++ /dev/null @@ -1,12 +0,0 @@ -# ActionTypeRid - -The unique resource identifier of an action type, useful for interacting with other Foundry APIs. - - -## Type -```python -RID -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ActionTypeV2.md b/docs/v2/Ontologies/models/ActionTypeV2.md deleted file mode 100644 index 5de7b5c4e..000000000 --- a/docs/v2/Ontologies/models/ActionTypeV2.md +++ /dev/null @@ -1,18 +0,0 @@ -# ActionTypeV2 - -Represents an action type in the Ontology. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**api_name** | ActionTypeApiName | Yes | | -**description** | Optional[str] | No | | -**display_name** | Optional[DisplayName] | No | | -**status** | ReleaseStatus | Yes | | -**parameters** | Dict[ParameterId, ActionParameterV2] | Yes | | -**rid** | ActionTypeRid | Yes | | -**operations** | List[LogicRule] | Yes | | -**tool_description** | Optional[str] | No | Optional description intended for tool use contexts, such as AI agents. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ActivePropertyTypeStatus.md b/docs/v2/Ontologies/models/ActivePropertyTypeStatus.md deleted file mode 100644 index c7c6c20d8..000000000 --- a/docs/v2/Ontologies/models/ActivePropertyTypeStatus.md +++ /dev/null @@ -1,13 +0,0 @@ -# ActivePropertyTypeStatus - -This status indicates that the PropertyType will not change on short notice and should thus be safe to use in -user facing workflows. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["active"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/AddLink.md b/docs/v2/Ontologies/models/AddLink.md deleted file mode 100644 index 00715a92d..000000000 --- a/docs/v2/Ontologies/models/AddLink.md +++ /dev/null @@ -1,15 +0,0 @@ -# AddLink - -AddLink - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**link_type_api_name_ato_b** | LinkTypeApiName | Yes | | -**link_type_api_name_bto_a** | LinkTypeApiName | Yes | | -**a_side_object** | LinkSideObject | Yes | | -**b_side_object** | LinkSideObject | Yes | | -**type** | Literal["addLink"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/AddLinkEdit.md b/docs/v2/Ontologies/models/AddLinkEdit.md deleted file mode 100644 index aacc5fd98..000000000 --- a/docs/v2/Ontologies/models/AddLinkEdit.md +++ /dev/null @@ -1,15 +0,0 @@ -# AddLinkEdit - -AddLinkEdit - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**object_type** | ObjectTypeApiName | Yes | | -**primary_key** | PrimaryKeyValue | Yes | | -**link_type** | LinkTypeApiName | Yes | | -**linked_object_primary_key** | PrimaryKeyValue | Yes | | -**type** | Literal["addLink"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/AddObject.md b/docs/v2/Ontologies/models/AddObject.md deleted file mode 100644 index 7dc7c86b2..000000000 --- a/docs/v2/Ontologies/models/AddObject.md +++ /dev/null @@ -1,13 +0,0 @@ -# AddObject - -AddObject - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**primary_key** | PropertyValue | Yes | | -**object_type** | ObjectTypeApiName | Yes | | -**type** | Literal["addObject"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/AddObjectEdit.md b/docs/v2/Ontologies/models/AddObjectEdit.md deleted file mode 100644 index 75a92c4c9..000000000 --- a/docs/v2/Ontologies/models/AddObjectEdit.md +++ /dev/null @@ -1,13 +0,0 @@ -# AddObjectEdit - -AddObjectEdit - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**object_type** | ObjectTypeApiName | Yes | | -**properties** | Dict[PropertyApiName, DataValue] | Yes | | -**type** | Literal["addObject"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/AddPropertyExpression.md b/docs/v2/Ontologies/models/AddPropertyExpression.md deleted file mode 100644 index 2a5afbd1b..000000000 --- a/docs/v2/Ontologies/models/AddPropertyExpression.md +++ /dev/null @@ -1,13 +0,0 @@ -# AddPropertyExpression - -Adds two or more numeric values. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**properties** | List[DerivedPropertyDefinition] | Yes | | -**type** | Literal["add"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/Affix.md b/docs/v2/Ontologies/models/Affix.md deleted file mode 100644 index 6a7fcbfa1..000000000 --- a/docs/v2/Ontologies/models/Affix.md +++ /dev/null @@ -1,12 +0,0 @@ -# Affix - -Affix - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**prefix** | Optional[PropertyTypeReferenceOrStringConstant] | No | | -**postfix** | Optional[PropertyTypeReferenceOrStringConstant] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/AggregateObjectSetRequestV2.md b/docs/v2/Ontologies/models/AggregateObjectSetRequestV2.md deleted file mode 100644 index 4f6384b15..000000000 --- a/docs/v2/Ontologies/models/AggregateObjectSetRequestV2.md +++ /dev/null @@ -1,15 +0,0 @@ -# AggregateObjectSetRequestV2 - -AggregateObjectSetRequestV2 - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**aggregation** | List[AggregationV2] | Yes | | -**object_set** | ObjectSet | Yes | | -**group_by** | List[AggregationGroupByV2] | Yes | | -**accuracy** | Optional[AggregationAccuracyRequest] | No | | -**include_compute_usage** | Optional[IncludeComputeUsage] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/AggregateObjectsRequestV2.md b/docs/v2/Ontologies/models/AggregateObjectsRequestV2.md deleted file mode 100644 index 666013db6..000000000 --- a/docs/v2/Ontologies/models/AggregateObjectsRequestV2.md +++ /dev/null @@ -1,14 +0,0 @@ -# AggregateObjectsRequestV2 - -AggregateObjectsRequestV2 - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**aggregation** | List[AggregationV2] | Yes | | -**where** | Optional[SearchJsonQueryV2] | No | | -**group_by** | List[AggregationGroupByV2] | Yes | | -**accuracy** | Optional[AggregationAccuracyRequest] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/AggregateObjectsResponseItemV2.md b/docs/v2/Ontologies/models/AggregateObjectsResponseItemV2.md deleted file mode 100644 index 190eb41e8..000000000 --- a/docs/v2/Ontologies/models/AggregateObjectsResponseItemV2.md +++ /dev/null @@ -1,12 +0,0 @@ -# AggregateObjectsResponseItemV2 - -AggregateObjectsResponseItemV2 - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**group** | Dict[AggregationGroupKeyV2, Optional[AggregationGroupValueV2]] | Yes | | -**metrics** | List[AggregationMetricResultV2] | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/AggregateObjectsResponseV2.md b/docs/v2/Ontologies/models/AggregateObjectsResponseV2.md deleted file mode 100644 index 2ae6d45dd..000000000 --- a/docs/v2/Ontologies/models/AggregateObjectsResponseV2.md +++ /dev/null @@ -1,14 +0,0 @@ -# AggregateObjectsResponseV2 - -AggregateObjectsResponseV2 - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**excluded_items** | Optional[int] | No | | -**accuracy** | AggregationAccuracy | Yes | | -**data** | List[AggregateObjectsResponseItemV2] | Yes | | -**compute_usage** | Optional[ComputeSeconds] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/AggregateTimeSeries.md b/docs/v2/Ontologies/models/AggregateTimeSeries.md deleted file mode 100644 index 197e6ef49..000000000 --- a/docs/v2/Ontologies/models/AggregateTimeSeries.md +++ /dev/null @@ -1,12 +0,0 @@ -# AggregateTimeSeries - -AggregateTimeSeries - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**method** | TimeSeriesAggregationMethod | Yes | | -**strategy** | TimeSeriesAggregationStrategy | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/AggregationAccuracy.md b/docs/v2/Ontologies/models/AggregationAccuracy.md deleted file mode 100644 index c26cc37e5..000000000 --- a/docs/v2/Ontologies/models/AggregationAccuracy.md +++ /dev/null @@ -1,11 +0,0 @@ -# AggregationAccuracy - -AggregationAccuracy - -| **Value** | -| --------- | -| `"ACCURATE"` | -| `"APPROXIMATE"` | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/AggregationAccuracyRequest.md b/docs/v2/Ontologies/models/AggregationAccuracyRequest.md deleted file mode 100644 index b17209cc7..000000000 --- a/docs/v2/Ontologies/models/AggregationAccuracyRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# AggregationAccuracyRequest - -AggregationAccuracyRequest - -| **Value** | -| --------- | -| `"REQUIRE_ACCURATE"` | -| `"ALLOW_APPROXIMATE"` | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/AggregationDurationGroupingV2.md b/docs/v2/Ontologies/models/AggregationDurationGroupingV2.md deleted file mode 100644 index 1508300e7..000000000 --- a/docs/v2/Ontologies/models/AggregationDurationGroupingV2.md +++ /dev/null @@ -1,16 +0,0 @@ -# AggregationDurationGroupingV2 - -Divides objects into groups according to an interval. Note that this grouping applies only on date and timestamp types. -When grouping by `YEARS`, `QUARTERS`, `MONTHS`, or `WEEKS`, the `value` must be set to `1`. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**field** | PropertyApiName | Yes | | -**value** | int | Yes | | -**unit** | TimeUnit | Yes | | -**type** | Literal["duration"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/AggregationExactGroupingV2.md b/docs/v2/Ontologies/models/AggregationExactGroupingV2.md deleted file mode 100644 index e91971809..000000000 --- a/docs/v2/Ontologies/models/AggregationExactGroupingV2.md +++ /dev/null @@ -1,15 +0,0 @@ -# AggregationExactGroupingV2 - -Divides objects into groups according to an exact value. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**field** | PropertyApiName | Yes | | -**max_group_count** | Optional[int] | No | | -**default_value** | Optional[str] | No | Includes a group with the specified default value that includes all objects where the specified field's value is null. Cannot be used with includeNullValues. | -**include_null_values** | Optional[bool] | No | Includes a group with a null value that includes all objects where the specified field's value is null. Cannot be used with defaultValue or orderBy clauses on the aggregation. | -**type** | Literal["exact"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/AggregationFixedWidthGroupingV2.md b/docs/v2/Ontologies/models/AggregationFixedWidthGroupingV2.md deleted file mode 100644 index 1e8cf52f0..000000000 --- a/docs/v2/Ontologies/models/AggregationFixedWidthGroupingV2.md +++ /dev/null @@ -1,13 +0,0 @@ -# AggregationFixedWidthGroupingV2 - -Divides objects into groups with the specified width. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**field** | PropertyApiName | Yes | | -**fixed_width** | int | Yes | | -**type** | Literal["fixedWidth"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/AggregationGroupByV2.md b/docs/v2/Ontologies/models/AggregationGroupByV2.md deleted file mode 100644 index 0660e8c47..000000000 --- a/docs/v2/Ontologies/models/AggregationGroupByV2.md +++ /dev/null @@ -1,18 +0,0 @@ -# AggregationGroupByV2 - -Specifies a grouping for aggregation results. - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -AggregationDurationGroupingV2 | duration -AggregationFixedWidthGroupingV2 | fixedWidth -AggregationRangesGroupingV2 | ranges -AggregationExactGroupingV2 | exact - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/AggregationGroupKeyV2.md b/docs/v2/Ontologies/models/AggregationGroupKeyV2.md deleted file mode 100644 index 9a8dd4040..000000000 --- a/docs/v2/Ontologies/models/AggregationGroupKeyV2.md +++ /dev/null @@ -1,11 +0,0 @@ -# AggregationGroupKeyV2 - -AggregationGroupKeyV2 - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/AggregationGroupValueV2.md b/docs/v2/Ontologies/models/AggregationGroupValueV2.md deleted file mode 100644 index e6373e622..000000000 --- a/docs/v2/Ontologies/models/AggregationGroupValueV2.md +++ /dev/null @@ -1,11 +0,0 @@ -# AggregationGroupValueV2 - -AggregationGroupValueV2 - -## Type -```python -Any -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/AggregationMetricName.md b/docs/v2/Ontologies/models/AggregationMetricName.md deleted file mode 100644 index 8968dabea..000000000 --- a/docs/v2/Ontologies/models/AggregationMetricName.md +++ /dev/null @@ -1,11 +0,0 @@ -# AggregationMetricName - -A user-specified alias for an aggregation metric name. - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/AggregationMetricResultV2.md b/docs/v2/Ontologies/models/AggregationMetricResultV2.md deleted file mode 100644 index 367bc2ff0..000000000 --- a/docs/v2/Ontologies/models/AggregationMetricResultV2.md +++ /dev/null @@ -1,12 +0,0 @@ -# AggregationMetricResultV2 - -AggregationMetricResultV2 - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**name** | str | Yes | | -**value** | Optional[Any] | No | The value of the metric. This will be a double in the case of a numeric metric, or a date string in the case of a date metric. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/AggregationRangeV2.md b/docs/v2/Ontologies/models/AggregationRangeV2.md deleted file mode 100644 index b1d376bd7..000000000 --- a/docs/v2/Ontologies/models/AggregationRangeV2.md +++ /dev/null @@ -1,12 +0,0 @@ -# AggregationRangeV2 - -Specifies a range from an inclusive start value to an exclusive end value. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**start_value** | Any | Yes | Inclusive start. | -**end_value** | Any | Yes | Exclusive end. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/AggregationRangesGroupingV2.md b/docs/v2/Ontologies/models/AggregationRangesGroupingV2.md deleted file mode 100644 index 98e64396a..000000000 --- a/docs/v2/Ontologies/models/AggregationRangesGroupingV2.md +++ /dev/null @@ -1,13 +0,0 @@ -# AggregationRangesGroupingV2 - -Divides objects into groups according to specified ranges. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**field** | PropertyApiName | Yes | | -**ranges** | List[AggregationRangeV2] | Yes | | -**type** | Literal["ranges"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/AggregationV2.md b/docs/v2/Ontologies/models/AggregationV2.md deleted file mode 100644 index 55490a582..000000000 --- a/docs/v2/Ontologies/models/AggregationV2.md +++ /dev/null @@ -1,22 +0,0 @@ -# AggregationV2 - -Specifies an aggregation function. - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -ApproximateDistinctAggregationV2 | approximateDistinct -MinAggregationV2 | min -AvgAggregationV2 | avg -MaxAggregationV2 | max -ApproximatePercentileAggregationV2 | approximatePercentile -CountAggregationV2 | count -SumAggregationV2 | sum -ExactDistinctAggregationV2 | exactDistinct - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/AllOfRule.md b/docs/v2/Ontologies/models/AllOfRule.md deleted file mode 100644 index fa9d4a055..000000000 --- a/docs/v2/Ontologies/models/AllOfRule.md +++ /dev/null @@ -1,15 +0,0 @@ -# AllOfRule - -Matches intervals satisfying all the rules in the query - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**rules** | List[IntervalQueryRule] | Yes | | -**max_gaps** | Optional[int] | No | The maximum gaps between the intervals produced by the sub-rules. If not set, then gaps are not considered. | -**ordered** | bool | Yes | If true, the matched intervals must occur in order. | -**type** | Literal["allOf"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/AndQueryV2.md b/docs/v2/Ontologies/models/AndQueryV2.md deleted file mode 100644 index 3e45089c7..000000000 --- a/docs/v2/Ontologies/models/AndQueryV2.md +++ /dev/null @@ -1,12 +0,0 @@ -# AndQueryV2 - -Returns objects where every query is satisfied. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**value** | List[SearchJsonQueryV2] | Yes | | -**type** | Literal["and"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/AnyOfRule.md b/docs/v2/Ontologies/models/AnyOfRule.md deleted file mode 100644 index 5a6ef729a..000000000 --- a/docs/v2/Ontologies/models/AnyOfRule.md +++ /dev/null @@ -1,13 +0,0 @@ -# AnyOfRule - -Matches intervals satisfying any of the rules in the query - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**rules** | List[IntervalQueryRule] | Yes | | -**type** | Literal["anyOf"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ApplyActionMode.md b/docs/v2/Ontologies/models/ApplyActionMode.md deleted file mode 100644 index 255c32e80..000000000 --- a/docs/v2/Ontologies/models/ApplyActionMode.md +++ /dev/null @@ -1,11 +0,0 @@ -# ApplyActionMode - -ApplyActionMode - -| **Value** | -| --------- | -| `"VALIDATE_ONLY"` | -| `"VALIDATE_AND_EXECUTE"` | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ApplyActionOverrides.md b/docs/v2/Ontologies/models/ApplyActionOverrides.md deleted file mode 100644 index 3c5e56ab4..000000000 --- a/docs/v2/Ontologies/models/ApplyActionOverrides.md +++ /dev/null @@ -1,12 +0,0 @@ -# ApplyActionOverrides - -ApplyActionOverrides - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**unique_identifier_link_id_values** | Dict[UniqueIdentifierLinkId, UniqueIdentifierValue] | Yes | | -**action_execution_time** | Optional[ActionExecutionTime] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ApplyActionRequestOptions.md b/docs/v2/Ontologies/models/ApplyActionRequestOptions.md deleted file mode 100644 index 27eee597b..000000000 --- a/docs/v2/Ontologies/models/ApplyActionRequestOptions.md +++ /dev/null @@ -1,12 +0,0 @@ -# ApplyActionRequestOptions - -ApplyActionRequestOptions - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**mode** | Optional[ApplyActionMode] | No | | -**return_edits** | Optional[ReturnEditsMode] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ApplyActionRequestV2.md b/docs/v2/Ontologies/models/ApplyActionRequestV2.md deleted file mode 100644 index 92b8faf3e..000000000 --- a/docs/v2/Ontologies/models/ApplyActionRequestV2.md +++ /dev/null @@ -1,12 +0,0 @@ -# ApplyActionRequestV2 - -ApplyActionRequestV2 - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**options** | Optional[ApplyActionRequestOptions] | No | | -**parameters** | Dict[ParameterId, Optional[DataValue]] | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ApplyActionWithOverridesRequest.md b/docs/v2/Ontologies/models/ApplyActionWithOverridesRequest.md deleted file mode 100644 index 3728ac9f6..000000000 --- a/docs/v2/Ontologies/models/ApplyActionWithOverridesRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# ApplyActionWithOverridesRequest - -ApplyActionWithOverridesRequest - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**request** | ApplyActionRequestV2 | Yes | | -**overrides** | ApplyActionOverrides | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ApplyReducersAndExtractMainValueLoadLevel.md b/docs/v2/Ontologies/models/ApplyReducersAndExtractMainValueLoadLevel.md deleted file mode 100644 index fe3aaf5ce..000000000 --- a/docs/v2/Ontologies/models/ApplyReducersAndExtractMainValueLoadLevel.md +++ /dev/null @@ -1,11 +0,0 @@ -# ApplyReducersAndExtractMainValueLoadLevel - -Performs both apply reducers and extract main value to return the reduced main value. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["applyReducersAndExtractMainValue"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ApplyReducersLoadLevel.md b/docs/v2/Ontologies/models/ApplyReducersLoadLevel.md deleted file mode 100644 index ec032c40d..000000000 --- a/docs/v2/Ontologies/models/ApplyReducersLoadLevel.md +++ /dev/null @@ -1,11 +0,0 @@ -# ApplyReducersLoadLevel - -Returns a single value of an array as configured in the ontology. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["applyReducers"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ApproximateDistinctAggregationV2.md b/docs/v2/Ontologies/models/ApproximateDistinctAggregationV2.md deleted file mode 100644 index 01a24f7fe..000000000 --- a/docs/v2/Ontologies/models/ApproximateDistinctAggregationV2.md +++ /dev/null @@ -1,14 +0,0 @@ -# ApproximateDistinctAggregationV2 - -Computes an approximate number of distinct values for the provided field. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**field** | PropertyApiName | Yes | | -**name** | Optional[AggregationMetricName] | No | | -**direction** | Optional[OrderByDirection] | No | | -**type** | Literal["approximateDistinct"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ApproximatePercentileAggregationV2.md b/docs/v2/Ontologies/models/ApproximatePercentileAggregationV2.md deleted file mode 100644 index 0889af51d..000000000 --- a/docs/v2/Ontologies/models/ApproximatePercentileAggregationV2.md +++ /dev/null @@ -1,15 +0,0 @@ -# ApproximatePercentileAggregationV2 - -Computes the approximate percentile value for the provided field. Requires Object Storage V2. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**field** | PropertyApiName | Yes | | -**name** | Optional[AggregationMetricName] | No | | -**approximate_percentile** | float | Yes | | -**direction** | Optional[OrderByDirection] | No | | -**type** | Literal["approximatePercentile"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ArrayConstraint.md b/docs/v2/Ontologies/models/ArrayConstraint.md deleted file mode 100644 index 3097e6e5a..000000000 --- a/docs/v2/Ontologies/models/ArrayConstraint.md +++ /dev/null @@ -1,15 +0,0 @@ -# ArrayConstraint - -ArrayConstraint - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**minimum_size** | Optional[int] | No | | -**maximum_size** | Optional[int] | No | | -**unique_values** | bool | Yes | | -**value_constraint** | Optional[ValueTypeConstraint] | No | | -**type** | Literal["array"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ArrayEntryEvaluatedConstraint.md b/docs/v2/Ontologies/models/ArrayEntryEvaluatedConstraint.md deleted file mode 100644 index 5a5891ed2..000000000 --- a/docs/v2/Ontologies/models/ArrayEntryEvaluatedConstraint.md +++ /dev/null @@ -1,11 +0,0 @@ -# ArrayEntryEvaluatedConstraint - -Evaluated constraints for entries of array parameters for which per-entry evaluation is supported. - -## Type -```python -StructEvaluatedConstraint -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ArrayEvaluatedConstraint.md b/docs/v2/Ontologies/models/ArrayEvaluatedConstraint.md deleted file mode 100644 index bc8999849..000000000 --- a/docs/v2/Ontologies/models/ArrayEvaluatedConstraint.md +++ /dev/null @@ -1,12 +0,0 @@ -# ArrayEvaluatedConstraint - -Evaluated constraints of array parameters that support per-entry constraint evaluations. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**entries** | List[ArrayEntryEvaluatedConstraint] | Yes | | -**type** | Literal["array"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ArraySizeConstraint.md b/docs/v2/Ontologies/models/ArraySizeConstraint.md deleted file mode 100644 index bc873022e..000000000 --- a/docs/v2/Ontologies/models/ArraySizeConstraint.md +++ /dev/null @@ -1,16 +0,0 @@ -# ArraySizeConstraint - -The parameter expects an array of values and the size of the array must fall within the defined range. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**lt** | Optional[Any] | No | Less than | -**lte** | Optional[Any] | No | Less than or equal | -**gt** | Optional[Any] | No | Greater than | -**gte** | Optional[Any] | No | Greater than or equal | -**type** | Literal["arraySize"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ArtifactRepositoryRid.md b/docs/v2/Ontologies/models/ArtifactRepositoryRid.md deleted file mode 100644 index e2c47b290..000000000 --- a/docs/v2/Ontologies/models/ArtifactRepositoryRid.md +++ /dev/null @@ -1,11 +0,0 @@ -# ArtifactRepositoryRid - -ArtifactRepositoryRid - -## Type -```python -RID -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/AttachmentMetadataResponse.md b/docs/v2/Ontologies/models/AttachmentMetadataResponse.md deleted file mode 100644 index 2b5d1ca82..000000000 --- a/docs/v2/Ontologies/models/AttachmentMetadataResponse.md +++ /dev/null @@ -1,16 +0,0 @@ -# AttachmentMetadataResponse - -The attachment metadata response - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -AttachmentV2 | single -ListAttachmentsResponseV2 | multiple - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/AttachmentRid.md b/docs/v2/Ontologies/models/AttachmentRid.md deleted file mode 100644 index cb496fe7b..000000000 --- a/docs/v2/Ontologies/models/AttachmentRid.md +++ /dev/null @@ -1,11 +0,0 @@ -# AttachmentRid - -The unique resource identifier of an attachment. - -## Type -```python -RID -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/AttachmentV2.md b/docs/v2/Ontologies/models/AttachmentV2.md deleted file mode 100644 index 88d604e46..000000000 --- a/docs/v2/Ontologies/models/AttachmentV2.md +++ /dev/null @@ -1,15 +0,0 @@ -# AttachmentV2 - -The representation of an attachment. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**rid** | AttachmentRid | Yes | | -**filename** | Filename | Yes | | -**size_bytes** | SizeBytes | Yes | | -**media_type** | MediaType | Yes | | -**type** | Literal["single"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/AvgAggregationV2.md b/docs/v2/Ontologies/models/AvgAggregationV2.md deleted file mode 100644 index 08aac5cf8..000000000 --- a/docs/v2/Ontologies/models/AvgAggregationV2.md +++ /dev/null @@ -1,14 +0,0 @@ -# AvgAggregationV2 - -Computes the average value for the provided field. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**field** | PropertyApiName | Yes | | -**name** | Optional[AggregationMetricName] | No | | -**direction** | Optional[OrderByDirection] | No | | -**type** | Literal["avg"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/BatchActionObjectEdit.md b/docs/v2/Ontologies/models/BatchActionObjectEdit.md deleted file mode 100644 index e3fbe175e..000000000 --- a/docs/v2/Ontologies/models/BatchActionObjectEdit.md +++ /dev/null @@ -1,17 +0,0 @@ -# BatchActionObjectEdit - -BatchActionObjectEdit - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -ModifyObject | modifyObject -AddObject | addObject -AddLink | addLink - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/BatchActionObjectEdits.md b/docs/v2/Ontologies/models/BatchActionObjectEdits.md deleted file mode 100644 index a20bf8a38..000000000 --- a/docs/v2/Ontologies/models/BatchActionObjectEdits.md +++ /dev/null @@ -1,17 +0,0 @@ -# BatchActionObjectEdits - -BatchActionObjectEdits - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**edits** | List[BatchActionObjectEdit] | Yes | | -**added_object_count** | int | Yes | | -**modified_objects_count** | int | Yes | | -**deleted_objects_count** | int | Yes | | -**added_links_count** | int | Yes | | -**deleted_links_count** | int | Yes | | -**type** | Literal["edits"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/BatchActionResults.md b/docs/v2/Ontologies/models/BatchActionResults.md deleted file mode 100644 index 9fb10b66f..000000000 --- a/docs/v2/Ontologies/models/BatchActionResults.md +++ /dev/null @@ -1,16 +0,0 @@ -# BatchActionResults - -BatchActionResults - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -BatchActionObjectEdits | edits -ObjectTypeEdits | largeScaleEdits - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/BatchApplyActionRequestItem.md b/docs/v2/Ontologies/models/BatchApplyActionRequestItem.md deleted file mode 100644 index f7d8123f2..000000000 --- a/docs/v2/Ontologies/models/BatchApplyActionRequestItem.md +++ /dev/null @@ -1,11 +0,0 @@ -# BatchApplyActionRequestItem - -BatchApplyActionRequestItem - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**parameters** | Dict[ParameterId, Optional[DataValue]] | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/BatchApplyActionRequestOptions.md b/docs/v2/Ontologies/models/BatchApplyActionRequestOptions.md deleted file mode 100644 index 97426e068..000000000 --- a/docs/v2/Ontologies/models/BatchApplyActionRequestOptions.md +++ /dev/null @@ -1,11 +0,0 @@ -# BatchApplyActionRequestOptions - -BatchApplyActionRequestOptions - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**return_edits** | Optional[BatchReturnEditsMode] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/BatchApplyActionRequestV2.md b/docs/v2/Ontologies/models/BatchApplyActionRequestV2.md deleted file mode 100644 index ee4a6b287..000000000 --- a/docs/v2/Ontologies/models/BatchApplyActionRequestV2.md +++ /dev/null @@ -1,12 +0,0 @@ -# BatchApplyActionRequestV2 - -BatchApplyActionRequestV2 - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**options** | Optional[BatchApplyActionRequestOptions] | No | | -**requests** | List[BatchApplyActionRequestItem] | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/BatchApplyActionResponseV2.md b/docs/v2/Ontologies/models/BatchApplyActionResponseV2.md deleted file mode 100644 index 8c038a4d5..000000000 --- a/docs/v2/Ontologies/models/BatchApplyActionResponseV2.md +++ /dev/null @@ -1,11 +0,0 @@ -# BatchApplyActionResponseV2 - -BatchApplyActionResponseV2 - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**edits** | Optional[BatchActionResults] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/BatchReturnEditsMode.md b/docs/v2/Ontologies/models/BatchReturnEditsMode.md deleted file mode 100644 index ca91277c6..000000000 --- a/docs/v2/Ontologies/models/BatchReturnEditsMode.md +++ /dev/null @@ -1,11 +0,0 @@ -# BatchReturnEditsMode - -BatchReturnEditsMode - -| **Value** | -| --------- | -| `"ALL"` | -| `"NONE"` | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/BatchedFunctionLogicRule.md b/docs/v2/Ontologies/models/BatchedFunctionLogicRule.md deleted file mode 100644 index 7c6ce444d..000000000 --- a/docs/v2/Ontologies/models/BatchedFunctionLogicRule.md +++ /dev/null @@ -1,13 +0,0 @@ -# BatchedFunctionLogicRule - -BatchedFunctionLogicRule - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**object_set_rid_input_name** | FunctionParameterName | Yes | | -**function_rule** | FunctionLogicRule | Yes | | -**type** | Literal["batchedFunction"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/BlueprintIcon.md b/docs/v2/Ontologies/models/BlueprintIcon.md deleted file mode 100644 index 78ad9d72e..000000000 --- a/docs/v2/Ontologies/models/BlueprintIcon.md +++ /dev/null @@ -1,13 +0,0 @@ -# BlueprintIcon - -BlueprintIcon - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**color** | str | Yes | A hexadecimal color code. | -**name** | str | Yes | The [name](https://blueprintjs.com/docs/#icons/icons-list) of the Blueprint icon. Used to specify the Blueprint icon to represent the object type in a React app. | -**type** | Literal["blueprint"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/BoundingBoxValue.md b/docs/v2/Ontologies/models/BoundingBoxValue.md deleted file mode 100644 index 4aaf5ddb3..000000000 --- a/docs/v2/Ontologies/models/BoundingBoxValue.md +++ /dev/null @@ -1,13 +0,0 @@ -# BoundingBoxValue - -The top left and bottom right coordinate points that make up the bounding box. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**top_left** | WithinBoundingBoxPoint | Yes | | -**bottom_right** | WithinBoundingBoxPoint | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/CenterPoint.md b/docs/v2/Ontologies/models/CenterPoint.md deleted file mode 100644 index 83354b50d..000000000 --- a/docs/v2/Ontologies/models/CenterPoint.md +++ /dev/null @@ -1,13 +0,0 @@ -# CenterPoint - -The coordinate point to use as the center of the distance query. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**center** | CenterPointTypes | Yes | | -**distance** | Distance | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/CenterPointTypes.md b/docs/v2/Ontologies/models/CenterPointTypes.md deleted file mode 100644 index b9f26bfb4..000000000 --- a/docs/v2/Ontologies/models/CenterPointTypes.md +++ /dev/null @@ -1,11 +0,0 @@ -# CenterPointTypes - -CenterPointTypes - -## Type -```python -GeoPoint -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ContainsAllTermsInOrderPrefixLastTerm.md b/docs/v2/Ontologies/models/ContainsAllTermsInOrderPrefixLastTerm.md deleted file mode 100644 index e458fb62e..000000000 --- a/docs/v2/Ontologies/models/ContainsAllTermsInOrderPrefixLastTerm.md +++ /dev/null @@ -1,18 +0,0 @@ -# ContainsAllTermsInOrderPrefixLastTerm - -Returns objects where the specified field contains all of the terms in the order provided, -but they do have to be adjacent to each other. -The last term can be a partial prefix match. Allows you to specify a property to query on -by a variety of means. Either `field` or `propertyIdentifier` can be supplied, but not both. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**field** | Optional[PropertyApiName] | No | | -**property_identifier** | Optional[PropertyIdentifier] | No | | -**value** | str | Yes | | -**type** | Literal["containsAllTermsInOrderPrefixLastTerm"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ContainsAllTermsInOrderQuery.md b/docs/v2/Ontologies/models/ContainsAllTermsInOrderQuery.md deleted file mode 100644 index 36862d777..000000000 --- a/docs/v2/Ontologies/models/ContainsAllTermsInOrderQuery.md +++ /dev/null @@ -1,17 +0,0 @@ -# ContainsAllTermsInOrderQuery - -Returns objects where the specified field contains all of the terms in the order provided, -but they do have to be adjacent to each other. Allows you to specify a property to query on -by a variety of means. Either `field` or `propertyIdentifier` must be supplied, but not both. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**field** | Optional[PropertyApiName] | No | | -**property_identifier** | Optional[PropertyIdentifier] | No | | -**value** | str | Yes | | -**type** | Literal["containsAllTermsInOrder"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ContainsAllTermsQuery.md b/docs/v2/Ontologies/models/ContainsAllTermsQuery.md deleted file mode 100644 index 4e43def72..000000000 --- a/docs/v2/Ontologies/models/ContainsAllTermsQuery.md +++ /dev/null @@ -1,18 +0,0 @@ -# ContainsAllTermsQuery - -Returns objects where the specified field contains all of the whitespace separated words in any -order in the provided value. This query supports fuzzy matching. Allows you to specify a property to query on -by a variety of means. Either `field` or `propertyIdentifier` must be supplied, but not both. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**field** | Optional[PropertyApiName] | No | | -**property_identifier** | Optional[PropertyIdentifier] | No | | -**value** | str | Yes | | -**fuzzy** | Optional[FuzzyV2] | No | | -**type** | Literal["containsAllTerms"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ContainsAnyTermQuery.md b/docs/v2/Ontologies/models/ContainsAnyTermQuery.md deleted file mode 100644 index 6384fc4de..000000000 --- a/docs/v2/Ontologies/models/ContainsAnyTermQuery.md +++ /dev/null @@ -1,18 +0,0 @@ -# ContainsAnyTermQuery - -Returns objects where the specified field contains any of the whitespace separated words in any -order in the provided value. This query supports fuzzy matching. Allows you to specify a property to query on -by a variety of means. Either `field` or `propertyIdentifier` must be supplied, but not both. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**field** | Optional[PropertyApiName] | No | | -**property_identifier** | Optional[PropertyIdentifier] | No | | -**value** | str | Yes | | -**fuzzy** | Optional[FuzzyV2] | No | | -**type** | Literal["containsAnyTerm"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ContainsQueryV2.md b/docs/v2/Ontologies/models/ContainsQueryV2.md deleted file mode 100644 index 1a05187f8..000000000 --- a/docs/v2/Ontologies/models/ContainsQueryV2.md +++ /dev/null @@ -1,16 +0,0 @@ -# ContainsQueryV2 - -Returns objects where the specified array contains a value. Allows you to specify a property to query on by a -variety of means. Either `field` or `propertyIdentifier` must be supplied, but not both. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**field** | Optional[PropertyApiName] | No | | -**property_identifier** | Optional[PropertyIdentifier] | No | | -**value** | PropertyValue | Yes | | -**type** | Literal["contains"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/CountAggregationV2.md b/docs/v2/Ontologies/models/CountAggregationV2.md deleted file mode 100644 index 6734b02e3..000000000 --- a/docs/v2/Ontologies/models/CountAggregationV2.md +++ /dev/null @@ -1,13 +0,0 @@ -# CountAggregationV2 - -Computes the total count of objects. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**name** | Optional[AggregationMetricName] | No | | -**direction** | Optional[OrderByDirection] | No | | -**type** | Literal["count"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/CountObjectsResponseV2.md b/docs/v2/Ontologies/models/CountObjectsResponseV2.md deleted file mode 100644 index 57ad70563..000000000 --- a/docs/v2/Ontologies/models/CountObjectsResponseV2.md +++ /dev/null @@ -1,11 +0,0 @@ -# CountObjectsResponseV2 - -CountObjectsResponseV2 - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**count** | Optional[int] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/CreateInterfaceLinkLogicRule.md b/docs/v2/Ontologies/models/CreateInterfaceLinkLogicRule.md deleted file mode 100644 index ee12a86d7..000000000 --- a/docs/v2/Ontologies/models/CreateInterfaceLinkLogicRule.md +++ /dev/null @@ -1,15 +0,0 @@ -# CreateInterfaceLinkLogicRule - -CreateInterfaceLinkLogicRule - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**interface_type_api_name** | InterfaceTypeApiName | Yes | | -**interface_link_type_api_name** | InterfaceLinkTypeApiName | Yes | | -**source_object** | ParameterId | Yes | | -**target_object** | ParameterId | Yes | | -**type** | Literal["createInterfaceLink"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/CreateInterfaceLogicRule.md b/docs/v2/Ontologies/models/CreateInterfaceLogicRule.md deleted file mode 100644 index ba584a5cd..000000000 --- a/docs/v2/Ontologies/models/CreateInterfaceLogicRule.md +++ /dev/null @@ -1,15 +0,0 @@ -# CreateInterfaceLogicRule - -CreateInterfaceLogicRule - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**interface_type_api_name** | InterfaceTypeApiName | Yes | | -**object_type** | ParameterId | Yes | | -**shared_property_arguments** | Dict[SharedPropertyTypeApiName, LogicRuleArgument] | Yes | | -**struct_property_arguments** | Dict[SharedPropertyTypeApiName, Dict[StructFieldApiName, StructFieldArgument]] | Yes | | -**type** | Literal["createInterface"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/CreateInterfaceObjectRule.md b/docs/v2/Ontologies/models/CreateInterfaceObjectRule.md deleted file mode 100644 index 711eb22d7..000000000 --- a/docs/v2/Ontologies/models/CreateInterfaceObjectRule.md +++ /dev/null @@ -1,12 +0,0 @@ -# CreateInterfaceObjectRule - -CreateInterfaceObjectRule - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**interface_type_api_name** | InterfaceTypeApiName | Yes | | -**type** | Literal["createInterfaceObject"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/CreateLinkLogicRule.md b/docs/v2/Ontologies/models/CreateLinkLogicRule.md deleted file mode 100644 index 8fb5f06ea..000000000 --- a/docs/v2/Ontologies/models/CreateLinkLogicRule.md +++ /dev/null @@ -1,14 +0,0 @@ -# CreateLinkLogicRule - -CreateLinkLogicRule - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**link_type_api_name** | LinkTypeApiName | Yes | | -**source_object** | ParameterId | Yes | | -**target_object** | ParameterId | Yes | | -**type** | Literal["createLink"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/CreateLinkRule.md b/docs/v2/Ontologies/models/CreateLinkRule.md deleted file mode 100644 index 20b3fb0e3..000000000 --- a/docs/v2/Ontologies/models/CreateLinkRule.md +++ /dev/null @@ -1,15 +0,0 @@ -# CreateLinkRule - -CreateLinkRule - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**link_type_api_name_ato_b** | LinkTypeApiName | Yes | | -**link_type_api_name_bto_a** | LinkTypeApiName | Yes | | -**a_side_object_type_api_name** | ObjectTypeApiName | Yes | | -**b_side_object_type_api_name** | ObjectTypeApiName | Yes | | -**type** | Literal["createLink"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/CreateObjectLogicRule.md b/docs/v2/Ontologies/models/CreateObjectLogicRule.md deleted file mode 100644 index d0b53d072..000000000 --- a/docs/v2/Ontologies/models/CreateObjectLogicRule.md +++ /dev/null @@ -1,14 +0,0 @@ -# CreateObjectLogicRule - -CreateObjectLogicRule - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**object_type_api_name** | ObjectTypeApiName | Yes | | -**property_arguments** | Dict[PropertyApiName, LogicRuleArgument] | Yes | | -**struct_property_arguments** | Dict[PropertyApiName, Dict[StructFieldApiName, StructFieldArgument]] | Yes | | -**type** | Literal["createObject"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/CreateObjectRule.md b/docs/v2/Ontologies/models/CreateObjectRule.md deleted file mode 100644 index b8740ae41..000000000 --- a/docs/v2/Ontologies/models/CreateObjectRule.md +++ /dev/null @@ -1,12 +0,0 @@ -# CreateObjectRule - -CreateObjectRule - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**object_type_api_name** | ObjectTypeApiName | Yes | | -**type** | Literal["createObject"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/CreateOrModifyObjectLogicRule.md b/docs/v2/Ontologies/models/CreateOrModifyObjectLogicRule.md deleted file mode 100644 index 4ff2b3bb3..000000000 --- a/docs/v2/Ontologies/models/CreateOrModifyObjectLogicRule.md +++ /dev/null @@ -1,14 +0,0 @@ -# CreateOrModifyObjectLogicRule - -CreateOrModifyObjectLogicRule - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**object_type_api_name** | ObjectTypeApiName | Yes | | -**property_arguments** | Dict[PropertyApiName, LogicRuleArgument] | Yes | | -**struct_property_arguments** | Dict[PropertyApiName, Dict[StructFieldApiName, StructFieldArgument]] | Yes | | -**type** | Literal["createOrModifyObject"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/CreateOrModifyObjectLogicRuleV2.md b/docs/v2/Ontologies/models/CreateOrModifyObjectLogicRuleV2.md deleted file mode 100644 index 10f4cb0a8..000000000 --- a/docs/v2/Ontologies/models/CreateOrModifyObjectLogicRuleV2.md +++ /dev/null @@ -1,14 +0,0 @@ -# CreateOrModifyObjectLogicRuleV2 - -CreateOrModifyObjectLogicRuleV2 - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**object_to_modify** | ParameterId | Yes | | -**property_arguments** | Dict[PropertyApiName, LogicRuleArgument] | Yes | | -**struct_property_arguments** | Dict[PropertyApiName, Dict[StructFieldApiName, StructFieldArgument]] | Yes | | -**type** | Literal["createOrModifyObjectV2"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/CreateTemporaryObjectSetRequestV2.md b/docs/v2/Ontologies/models/CreateTemporaryObjectSetRequestV2.md deleted file mode 100644 index 0ac0afcd1..000000000 --- a/docs/v2/Ontologies/models/CreateTemporaryObjectSetRequestV2.md +++ /dev/null @@ -1,11 +0,0 @@ -# CreateTemporaryObjectSetRequestV2 - -CreateTemporaryObjectSetRequestV2 - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**object_set** | ObjectSet | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/CreateTemporaryObjectSetResponseV2.md b/docs/v2/Ontologies/models/CreateTemporaryObjectSetResponseV2.md deleted file mode 100644 index e1260c7e0..000000000 --- a/docs/v2/Ontologies/models/CreateTemporaryObjectSetResponseV2.md +++ /dev/null @@ -1,11 +0,0 @@ -# CreateTemporaryObjectSetResponseV2 - -CreateTemporaryObjectSetResponseV2 - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**object_set_rid** | ObjectSetRid | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/CurrentTimeArgument.md b/docs/v2/Ontologies/models/CurrentTimeArgument.md deleted file mode 100644 index 559639065..000000000 --- a/docs/v2/Ontologies/models/CurrentTimeArgument.md +++ /dev/null @@ -1,11 +0,0 @@ -# CurrentTimeArgument - -Represents the current time argument in a logic rule. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["currentTime"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/CurrentUserArgument.md b/docs/v2/Ontologies/models/CurrentUserArgument.md deleted file mode 100644 index 4a863ffde..000000000 --- a/docs/v2/Ontologies/models/CurrentUserArgument.md +++ /dev/null @@ -1,11 +0,0 @@ -# CurrentUserArgument - -Represents the current user argument in a logic rule. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["currentUser"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/DataValue.md b/docs/v2/Ontologies/models/DataValue.md deleted file mode 100644 index 0780209fc..000000000 --- a/docs/v2/Ontologies/models/DataValue.md +++ /dev/null @@ -1,39 +0,0 @@ -# DataValue - -Represents the value of data in the following format. Note that these values can be nested, for example an array of structs. -| Type | JSON encoding | Example | -|-------------------------------------|-------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Array | array | `["alpha", "bravo", "charlie"]` | -| Attachment | string | `"ri.attachments.main.attachment.2f944bae-5851-4204-8615-920c969a9f2e"` | -| Boolean | boolean | `true` | -| Byte | number | `31` | -| CipherText | string | `"CIPHER::ri.bellaso.main.cipher-channel.e414ab9e-b606-499a-a0e1-844fa296ba7e::unzjs3VifsTxuIpf1fH1CJ7OaPBr2bzMMdozPaZJtCii8vVG60yXIEmzoOJaEl9mfFFe::CIPHER"` | -| Date | ISO 8601 extended local date string | `"2021-05-01"` | -| Decimal | string | `"2.718281828"` | -| Double | number | `3.14159265` | -| EntrySet | array of JSON objects | `[{"key": "EMP1234", "value": "true"}, {"key": "EMP4444", "value": "false"}]` | -| Float | number | `3.14159265` | -| Integer | number | `238940` | -| Long | string | `"58319870951433"` | -| Marking | string | `"MU"` | -| Null | null | `null` | -| Object Set | string OR the object set definition | `ri.object-set.main.versioned-object-set.h13274m8-23f5-431c-8aee-a4554157c57z` | -| Ontology Object Reference | JSON encoding of the object's primary key | `10033123` or `"EMP1234"` | -| Ontology Interface Object Reference | JSON encoding of the object's API name and primary key| `{"objectTypeApiName":"Employee", "primaryKeyValue":"EMP1234"}` | -| Ontology Object Type Reference | string of the object type's api name | `"Employee"` | -| Set | array | `["alpha", "bravo", "charlie"]` | -| Short | number | `8739` | -| String | string | `"Call me Ishmael"` | -| Struct | JSON object | `{"name": "John Doe", "age": 42}` | -| TwoDimensionalAggregation | JSON object | `{"groups": [{"key": "alpha", "value": 100}, {"key": "beta", "value": 101}]}` | -| ThreeDimensionalAggregation | JSON object | `{"groups": [{"key": "NYC", "groups": [{"key": "Engineer", "value" : 100}]}]}` | -| Timestamp | ISO 8601 extended offset date-time string in UTC zone | `"2021-01-04T05:00:00Z"` | - - -## Type -```python -Any -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/DatetimeFormat.md b/docs/v2/Ontologies/models/DatetimeFormat.md deleted file mode 100644 index 9687b41b2..000000000 --- a/docs/v2/Ontologies/models/DatetimeFormat.md +++ /dev/null @@ -1,16 +0,0 @@ -# DatetimeFormat - -DatetimeFormat - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -DatetimeStringFormat | stringFormat -DatetimeLocalizedFormat | localizedFormat - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/DatetimeLocalizedFormat.md b/docs/v2/Ontologies/models/DatetimeLocalizedFormat.md deleted file mode 100644 index f22ced509..000000000 --- a/docs/v2/Ontologies/models/DatetimeLocalizedFormat.md +++ /dev/null @@ -1,12 +0,0 @@ -# DatetimeLocalizedFormat - -Predefined localized formatting options. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**format** | DatetimeLocalizedFormatType | Yes | | -**type** | Literal["localizedFormat"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/DatetimeLocalizedFormatType.md b/docs/v2/Ontologies/models/DatetimeLocalizedFormatType.md deleted file mode 100644 index 96a9f5dc7..000000000 --- a/docs/v2/Ontologies/models/DatetimeLocalizedFormatType.md +++ /dev/null @@ -1,16 +0,0 @@ -# DatetimeLocalizedFormatType - -Localized date/time format types. - -| **Value** | -| --------- | -| `"DATE_FORMAT_RELATIVE_TO_NOW"` | -| `"DATE_FORMAT_DATE"` | -| `"DATE_FORMAT_YEAR_AND_MONTH"` | -| `"DATE_FORMAT_DATE_TIME"` | -| `"DATE_FORMAT_DATE_TIME_SHORT"` | -| `"DATE_FORMAT_TIME"` | -| `"DATE_FORMAT_ISO_INSTANT"` | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/DatetimeStringFormat.md b/docs/v2/Ontologies/models/DatetimeStringFormat.md deleted file mode 100644 index 5114aef6d..000000000 --- a/docs/v2/Ontologies/models/DatetimeStringFormat.md +++ /dev/null @@ -1,12 +0,0 @@ -# DatetimeStringFormat - -A strictly specified date format pattern. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**pattern** | str | Yes | A valid format string composed of date/time patterns. | -**type** | Literal["stringFormat"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/DatetimeTimezone.md b/docs/v2/Ontologies/models/DatetimeTimezone.md deleted file mode 100644 index 84e7bf347..000000000 --- a/docs/v2/Ontologies/models/DatetimeTimezone.md +++ /dev/null @@ -1,16 +0,0 @@ -# DatetimeTimezone - -DatetimeTimezone - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -DatetimeTimezoneStatic | static -DatetimeTimezoneUser | user - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/DatetimeTimezoneStatic.md b/docs/v2/Ontologies/models/DatetimeTimezoneStatic.md deleted file mode 100644 index 39bbe742d..000000000 --- a/docs/v2/Ontologies/models/DatetimeTimezoneStatic.md +++ /dev/null @@ -1,12 +0,0 @@ -# DatetimeTimezoneStatic - -DatetimeTimezoneStatic - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**zone_id** | PropertyTypeReferenceOrStringConstant | Yes | | -**type** | Literal["static"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/DatetimeTimezoneUser.md b/docs/v2/Ontologies/models/DatetimeTimezoneUser.md deleted file mode 100644 index 6e97f1407..000000000 --- a/docs/v2/Ontologies/models/DatetimeTimezoneUser.md +++ /dev/null @@ -1,11 +0,0 @@ -# DatetimeTimezoneUser - -The user's local timezone. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["user"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/DecryptionResult.md b/docs/v2/Ontologies/models/DecryptionResult.md deleted file mode 100644 index 365b0cd0b..000000000 --- a/docs/v2/Ontologies/models/DecryptionResult.md +++ /dev/null @@ -1,12 +0,0 @@ -# DecryptionResult - -The result of a CipherText decryption. If successful, the plaintext decrypted value will be returned. Otherwise, an error will be thrown. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**plaintext** | Optional[Plaintext] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/DeleteInterfaceLinkLogicRule.md b/docs/v2/Ontologies/models/DeleteInterfaceLinkLogicRule.md deleted file mode 100644 index 4b8864df9..000000000 --- a/docs/v2/Ontologies/models/DeleteInterfaceLinkLogicRule.md +++ /dev/null @@ -1,15 +0,0 @@ -# DeleteInterfaceLinkLogicRule - -DeleteInterfaceLinkLogicRule - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**interface_type_api_name** | InterfaceTypeApiName | Yes | | -**interface_link_type_api_name** | InterfaceLinkTypeApiName | Yes | | -**source_object** | ParameterId | Yes | | -**target_object** | ParameterId | Yes | | -**type** | Literal["deleteInterfaceLink"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/DeleteInterfaceObjectRule.md b/docs/v2/Ontologies/models/DeleteInterfaceObjectRule.md deleted file mode 100644 index 0da183a2d..000000000 --- a/docs/v2/Ontologies/models/DeleteInterfaceObjectRule.md +++ /dev/null @@ -1,12 +0,0 @@ -# DeleteInterfaceObjectRule - -DeleteInterfaceObjectRule - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**interface_type_api_name** | InterfaceTypeApiName | Yes | | -**type** | Literal["deleteInterfaceObject"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/DeleteLink.md b/docs/v2/Ontologies/models/DeleteLink.md deleted file mode 100644 index 9aeb6d693..000000000 --- a/docs/v2/Ontologies/models/DeleteLink.md +++ /dev/null @@ -1,15 +0,0 @@ -# DeleteLink - -DeleteLink - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**link_type_api_name_ato_b** | LinkTypeApiName | Yes | | -**link_type_api_name_bto_a** | LinkTypeApiName | Yes | | -**a_side_object** | LinkSideObject | Yes | | -**b_side_object** | LinkSideObject | Yes | | -**type** | Literal["deleteLink"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/DeleteLinkEdit.md b/docs/v2/Ontologies/models/DeleteLinkEdit.md deleted file mode 100644 index b41387b6e..000000000 --- a/docs/v2/Ontologies/models/DeleteLinkEdit.md +++ /dev/null @@ -1,15 +0,0 @@ -# DeleteLinkEdit - -DeleteLinkEdit - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**object_type** | ObjectTypeApiName | Yes | | -**primary_key** | PrimaryKeyValue | Yes | | -**link_type** | LinkTypeApiName | Yes | | -**linked_object_primary_key** | PrimaryKeyValue | Yes | | -**type** | Literal["removeLink"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/DeleteLinkLogicRule.md b/docs/v2/Ontologies/models/DeleteLinkLogicRule.md deleted file mode 100644 index 5ab0ef957..000000000 --- a/docs/v2/Ontologies/models/DeleteLinkLogicRule.md +++ /dev/null @@ -1,14 +0,0 @@ -# DeleteLinkLogicRule - -DeleteLinkLogicRule - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**link_type_api_name** | LinkTypeApiName | Yes | | -**source_object** | ParameterId | Yes | | -**target_object** | ParameterId | Yes | | -**type** | Literal["deleteLink"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/DeleteLinkRule.md b/docs/v2/Ontologies/models/DeleteLinkRule.md deleted file mode 100644 index 8dc15d73c..000000000 --- a/docs/v2/Ontologies/models/DeleteLinkRule.md +++ /dev/null @@ -1,15 +0,0 @@ -# DeleteLinkRule - -DeleteLinkRule - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**link_type_api_name_ato_b** | LinkTypeApiName | Yes | | -**link_type_api_name_bto_a** | LinkTypeApiName | Yes | | -**a_side_object_type_api_name** | ObjectTypeApiName | Yes | | -**b_side_object_type_api_name** | ObjectTypeApiName | Yes | | -**type** | Literal["deleteLink"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/DeleteObject.md b/docs/v2/Ontologies/models/DeleteObject.md deleted file mode 100644 index 505bec345..000000000 --- a/docs/v2/Ontologies/models/DeleteObject.md +++ /dev/null @@ -1,13 +0,0 @@ -# DeleteObject - -DeleteObject - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**primary_key** | PropertyValue | Yes | | -**object_type** | ObjectTypeApiName | Yes | | -**type** | Literal["deleteObject"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/DeleteObjectEdit.md b/docs/v2/Ontologies/models/DeleteObjectEdit.md deleted file mode 100644 index 20c48d9db..000000000 --- a/docs/v2/Ontologies/models/DeleteObjectEdit.md +++ /dev/null @@ -1,13 +0,0 @@ -# DeleteObjectEdit - -DeleteObjectEdit - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**object_type** | ObjectTypeApiName | Yes | | -**primary_key** | PropertyValue | Yes | | -**type** | Literal["deleteObject"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/DeleteObjectLogicRule.md b/docs/v2/Ontologies/models/DeleteObjectLogicRule.md deleted file mode 100644 index e980e5612..000000000 --- a/docs/v2/Ontologies/models/DeleteObjectLogicRule.md +++ /dev/null @@ -1,12 +0,0 @@ -# DeleteObjectLogicRule - -DeleteObjectLogicRule - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**object_to_delete** | ParameterId | Yes | | -**type** | Literal["deleteObject"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/DeleteObjectRule.md b/docs/v2/Ontologies/models/DeleteObjectRule.md deleted file mode 100644 index 153e4777f..000000000 --- a/docs/v2/Ontologies/models/DeleteObjectRule.md +++ /dev/null @@ -1,12 +0,0 @@ -# DeleteObjectRule - -DeleteObjectRule - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**object_type_api_name** | ObjectTypeApiName | Yes | | -**type** | Literal["deleteObject"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/DeprecatedPropertyTypeStatus.md b/docs/v2/Ontologies/models/DeprecatedPropertyTypeStatus.md deleted file mode 100644 index d6cc38190..000000000 --- a/docs/v2/Ontologies/models/DeprecatedPropertyTypeStatus.md +++ /dev/null @@ -1,16 +0,0 @@ -# DeprecatedPropertyTypeStatus - -This status indicates that the PropertyType is reaching the end of its life and will be removed as per the -deadline specified. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**message** | str | Yes | | -**deadline** | datetime | Yes | | -**replaced_by** | Optional[PropertyTypeRid] | No | | -**type** | Literal["deprecated"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/DerivedPropertyApiName.md b/docs/v2/Ontologies/models/DerivedPropertyApiName.md deleted file mode 100644 index 83713105b..000000000 --- a/docs/v2/Ontologies/models/DerivedPropertyApiName.md +++ /dev/null @@ -1,12 +0,0 @@ -# DerivedPropertyApiName - -The name of the derived property that will be returned. - - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/DerivedPropertyDefinition.md b/docs/v2/Ontologies/models/DerivedPropertyDefinition.md deleted file mode 100644 index f82fedf5d..000000000 --- a/docs/v2/Ontologies/models/DerivedPropertyDefinition.md +++ /dev/null @@ -1,26 +0,0 @@ -# DerivedPropertyDefinition - -Definition of a derived property. - - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -AddPropertyExpression | add -AbsoluteValuePropertyExpression | absoluteValue -ExtractPropertyExpression | extract -SelectedPropertyExpression | selection -NegatePropertyExpression | negate -SubtractPropertyExpression | subtract -PropertyApiNameSelector | property -LeastPropertyExpression | least -DividePropertyExpression | divide -MultiplyPropertyExpression | multiply -GreatestPropertyExpression | greatest - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/DividePropertyExpression.md b/docs/v2/Ontologies/models/DividePropertyExpression.md deleted file mode 100644 index 9f9df6b05..000000000 --- a/docs/v2/Ontologies/models/DividePropertyExpression.md +++ /dev/null @@ -1,14 +0,0 @@ -# DividePropertyExpression - -Divides the left numeric value by the right numeric value. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**left** | DerivedPropertyDefinition | Yes | | -**right** | DerivedPropertyDefinition | Yes | | -**type** | Literal["divide"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/DoesNotIntersectBoundingBoxQuery.md b/docs/v2/Ontologies/models/DoesNotIntersectBoundingBoxQuery.md deleted file mode 100644 index ddbc5e49a..000000000 --- a/docs/v2/Ontologies/models/DoesNotIntersectBoundingBoxQuery.md +++ /dev/null @@ -1,17 +0,0 @@ -# DoesNotIntersectBoundingBoxQuery - -Returns objects where the specified field does not intersect the bounding box provided. Allows you to specify a -property to query on by a variety of means. Either `field` or `propertyIdentifier` must be supplied, but not -both. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**field** | Optional[PropertyApiName] | No | | -**property_identifier** | Optional[PropertyIdentifier] | No | | -**value** | BoundingBoxValue | Yes | | -**type** | Literal["doesNotIntersectBoundingBox"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/DoesNotIntersectPolygonQuery.md b/docs/v2/Ontologies/models/DoesNotIntersectPolygonQuery.md deleted file mode 100644 index 46196bfa6..000000000 --- a/docs/v2/Ontologies/models/DoesNotIntersectPolygonQuery.md +++ /dev/null @@ -1,17 +0,0 @@ -# DoesNotIntersectPolygonQuery - -Returns objects where the specified field does not intersect the polygon provided. Allows you to specify a -property to query on by a variety of means. Either `field` or `propertyIdentifier` must be supplied, but not -both. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**field** | Optional[PropertyApiName] | No | | -**property_identifier** | Optional[PropertyIdentifier] | No | | -**value** | PolygonValue | Yes | | -**type** | Literal["doesNotIntersectPolygon"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/DoubleVector.md b/docs/v2/Ontologies/models/DoubleVector.md deleted file mode 100644 index 68198ce63..000000000 --- a/docs/v2/Ontologies/models/DoubleVector.md +++ /dev/null @@ -1,14 +0,0 @@ -# DoubleVector - -The vector to search with. The vector must be of the same dimension as the vectors stored in the provided -propertyIdentifier. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**value** | List[float] | Yes | | -**type** | Literal["vector"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/DurationBaseValue.md b/docs/v2/Ontologies/models/DurationBaseValue.md deleted file mode 100644 index 63dd57644..000000000 --- a/docs/v2/Ontologies/models/DurationBaseValue.md +++ /dev/null @@ -1,11 +0,0 @@ -# DurationBaseValue - -Specifies the unit of the input duration value. - -| **Value** | -| --------- | -| `"SECONDS"` | -| `"MILLISECONDS"` | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/DurationFormatStyle.md b/docs/v2/Ontologies/models/DurationFormatStyle.md deleted file mode 100644 index b4266d9e7..000000000 --- a/docs/v2/Ontologies/models/DurationFormatStyle.md +++ /dev/null @@ -1,16 +0,0 @@ -# DurationFormatStyle - -DurationFormatStyle - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -HumanReadableFormat | humanReadable -TimeCodeFormat | timecode - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/DurationPrecision.md b/docs/v2/Ontologies/models/DurationPrecision.md deleted file mode 100644 index c317ae60e..000000000 --- a/docs/v2/Ontologies/models/DurationPrecision.md +++ /dev/null @@ -1,14 +0,0 @@ -# DurationPrecision - -Specifies the maximum precision to apply when formatting a duration. - -| **Value** | -| --------- | -| `"DAYS"` | -| `"HOURS"` | -| `"MINUTES"` | -| `"SECONDS"` | -| `"AUTO"` | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/EntrySetType.md b/docs/v2/Ontologies/models/EntrySetType.md deleted file mode 100644 index b472eed4e..000000000 --- a/docs/v2/Ontologies/models/EntrySetType.md +++ /dev/null @@ -1,13 +0,0 @@ -# EntrySetType - -EntrySetType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**key_type** | QueryDataType | Yes | | -**value_type** | QueryDataType | Yes | | -**type** | Literal["entrySet"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/EnumConstraint.md b/docs/v2/Ontologies/models/EnumConstraint.md deleted file mode 100644 index 9a7c0b92a..000000000 --- a/docs/v2/Ontologies/models/EnumConstraint.md +++ /dev/null @@ -1,12 +0,0 @@ -# EnumConstraint - -EnumConstraint - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**options** | List[Optional[PropertyValue]] | Yes | | -**type** | Literal["enum"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/EqualsQueryV2.md b/docs/v2/Ontologies/models/EqualsQueryV2.md deleted file mode 100644 index d960e118b..000000000 --- a/docs/v2/Ontologies/models/EqualsQueryV2.md +++ /dev/null @@ -1,16 +0,0 @@ -# EqualsQueryV2 - -Returns objects where the specified field is equal to a value. Allows you to specify a property to query on -by a variety of means. Either `field` or `propertyIdentifier` must be supplied, but not both. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**field** | Optional[PropertyApiName] | No | | -**property_identifier** | Optional[PropertyIdentifier] | No | | -**value** | PropertyValue | Yes | | -**type** | Literal["eq"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ExactDistinctAggregationV2.md b/docs/v2/Ontologies/models/ExactDistinctAggregationV2.md deleted file mode 100644 index 715689e67..000000000 --- a/docs/v2/Ontologies/models/ExactDistinctAggregationV2.md +++ /dev/null @@ -1,14 +0,0 @@ -# ExactDistinctAggregationV2 - -Computes an exact number of distinct values for the provided field. May be slower than an approximate distinct aggregation. Requires Object Storage V2. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**field** | PropertyApiName | Yes | | -**name** | Optional[AggregationMetricName] | No | | -**direction** | Optional[OrderByDirection] | No | | -**type** | Literal["exactDistinct"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ExamplePropertyTypeStatus.md b/docs/v2/Ontologies/models/ExamplePropertyTypeStatus.md deleted file mode 100644 index 5abd55e9b..000000000 --- a/docs/v2/Ontologies/models/ExamplePropertyTypeStatus.md +++ /dev/null @@ -1,13 +0,0 @@ -# ExamplePropertyTypeStatus - -This status indicates that the PropertyType is an example. It is backed by notional data that should not be -used for actual workflows, but can be used to test those workflows. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["example"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ExecuteQueryRequest.md b/docs/v2/Ontologies/models/ExecuteQueryRequest.md deleted file mode 100644 index 076153082..000000000 --- a/docs/v2/Ontologies/models/ExecuteQueryRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# ExecuteQueryRequest - -ExecuteQueryRequest - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**parameters** | Dict[ParameterId, Optional[DataValue]] | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ExecuteQueryResponse.md b/docs/v2/Ontologies/models/ExecuteQueryResponse.md deleted file mode 100644 index 7fb620232..000000000 --- a/docs/v2/Ontologies/models/ExecuteQueryResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# ExecuteQueryResponse - -ExecuteQueryResponse - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**value** | DataValue | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ExperimentalPropertyTypeStatus.md b/docs/v2/Ontologies/models/ExperimentalPropertyTypeStatus.md deleted file mode 100644 index ac241a19c..000000000 --- a/docs/v2/Ontologies/models/ExperimentalPropertyTypeStatus.md +++ /dev/null @@ -1,11 +0,0 @@ -# ExperimentalPropertyTypeStatus - -This status indicates that the PropertyType is in development. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["experimental"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ExtractDatePart.md b/docs/v2/Ontologies/models/ExtractDatePart.md deleted file mode 100644 index 679393b7b..000000000 --- a/docs/v2/Ontologies/models/ExtractDatePart.md +++ /dev/null @@ -1,13 +0,0 @@ -# ExtractDatePart - -ExtractDatePart - -| **Value** | -| --------- | -| `"DAYS"` | -| `"MONTHS"` | -| `"QUARTERS"` | -| `"YEARS"` | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ExtractMainValueLoadLevel.md b/docs/v2/Ontologies/models/ExtractMainValueLoadLevel.md deleted file mode 100644 index 695c7d251..000000000 --- a/docs/v2/Ontologies/models/ExtractMainValueLoadLevel.md +++ /dev/null @@ -1,11 +0,0 @@ -# ExtractMainValueLoadLevel - -Returns the main value of a struct as configured in the ontology. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["extractMainValue"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ExtractPropertyExpression.md b/docs/v2/Ontologies/models/ExtractPropertyExpression.md deleted file mode 100644 index dadca9fe9..000000000 --- a/docs/v2/Ontologies/models/ExtractPropertyExpression.md +++ /dev/null @@ -1,14 +0,0 @@ -# ExtractPropertyExpression - -Extracts the specified date part from a date or timestamp. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**property** | DerivedPropertyDefinition | Yes | | -**part** | ExtractDatePart | Yes | | -**type** | Literal["extract"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/FilterValue.md b/docs/v2/Ontologies/models/FilterValue.md deleted file mode 100644 index de805979f..000000000 --- a/docs/v2/Ontologies/models/FilterValue.md +++ /dev/null @@ -1,13 +0,0 @@ -# FilterValue - -Represents the value of a property filter. For instance, false is the FilterValue in -`properties.{propertyApiName}.isNull=false`. - - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/FixedValuesMapKey.md b/docs/v2/Ontologies/models/FixedValuesMapKey.md deleted file mode 100644 index 81e43d366..000000000 --- a/docs/v2/Ontologies/models/FixedValuesMapKey.md +++ /dev/null @@ -1,11 +0,0 @@ -# FixedValuesMapKey - -Integer key for fixed value mapping. - -## Type -```python -int -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/FunctionLogicRule.md b/docs/v2/Ontologies/models/FunctionLogicRule.md deleted file mode 100644 index 868c5d192..000000000 --- a/docs/v2/Ontologies/models/FunctionLogicRule.md +++ /dev/null @@ -1,14 +0,0 @@ -# FunctionLogicRule - -FunctionLogicRule - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**function_rid** | FunctionRid | Yes | | -**function_version** | FunctionVersion | Yes | | -**function_input_values** | Dict[FunctionParameterName, LogicRuleArgument] | Yes | | -**type** | Literal["function"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/FunctionParameterName.md b/docs/v2/Ontologies/models/FunctionParameterName.md deleted file mode 100644 index 19e0b58c8..000000000 --- a/docs/v2/Ontologies/models/FunctionParameterName.md +++ /dev/null @@ -1,12 +0,0 @@ -# FunctionParameterName - -The name of an input to a function. - - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/FunctionRid.md b/docs/v2/Ontologies/models/FunctionRid.md deleted file mode 100644 index 2ea837619..000000000 --- a/docs/v2/Ontologies/models/FunctionRid.md +++ /dev/null @@ -1,12 +0,0 @@ -# FunctionRid - -The unique resource identifier of a Function, useful for interacting with other Foundry APIs. - - -## Type -```python -RID -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/FunctionVersion.md b/docs/v2/Ontologies/models/FunctionVersion.md deleted file mode 100644 index 7a8f4565f..000000000 --- a/docs/v2/Ontologies/models/FunctionVersion.md +++ /dev/null @@ -1,13 +0,0 @@ -# FunctionVersion - -The version of the given Function, written `..-`, where `-` is optional. -Examples: `1.2.3`, `1.2.3-rc1`. - - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/FuzzyV2.md b/docs/v2/Ontologies/models/FuzzyV2.md deleted file mode 100644 index f5dc4f75e..000000000 --- a/docs/v2/Ontologies/models/FuzzyV2.md +++ /dev/null @@ -1,11 +0,0 @@ -# FuzzyV2 - -Setting fuzzy to `true` allows approximate matching in search queries that support it. - -## Type -```python -bool -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/GetSelectedPropertyOperation.md b/docs/v2/Ontologies/models/GetSelectedPropertyOperation.md deleted file mode 100644 index f8a3349ef..000000000 --- a/docs/v2/Ontologies/models/GetSelectedPropertyOperation.md +++ /dev/null @@ -1,16 +0,0 @@ -# GetSelectedPropertyOperation - -Gets a single value of a property. Throws if the target object set is on the MANY side of the link and could -explode the cardinality. - -Use collectList or collectSet which will return a list of values in that case. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**selected_property_api_name** | PropertyApiName | Yes | | -**type** | Literal["get"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/GreatestPropertyExpression.md b/docs/v2/Ontologies/models/GreatestPropertyExpression.md deleted file mode 100644 index 949eceac4..000000000 --- a/docs/v2/Ontologies/models/GreatestPropertyExpression.md +++ /dev/null @@ -1,13 +0,0 @@ -# GreatestPropertyExpression - -Finds greatest of two or more numeric, date or timestamp values. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**properties** | List[DerivedPropertyDefinition] | Yes | | -**type** | Literal["greatest"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/GroupMemberConstraint.md b/docs/v2/Ontologies/models/GroupMemberConstraint.md deleted file mode 100644 index 7560da962..000000000 --- a/docs/v2/Ontologies/models/GroupMemberConstraint.md +++ /dev/null @@ -1,12 +0,0 @@ -# GroupMemberConstraint - -The parameter value must be the user id of a member belonging to at least one of the groups defined by the constraint. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["groupMember"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/GtQueryV2.md b/docs/v2/Ontologies/models/GtQueryV2.md deleted file mode 100644 index 437c532f4..000000000 --- a/docs/v2/Ontologies/models/GtQueryV2.md +++ /dev/null @@ -1,16 +0,0 @@ -# GtQueryV2 - -Returns objects where the specified field is greater than a value. Allows you to specify a property to query on -by a variety of means. Either `field` or `propertyIdentifier` must be supplied, but not both. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**field** | Optional[PropertyApiName] | No | | -**property_identifier** | Optional[PropertyIdentifier] | No | | -**value** | PropertyValue | Yes | | -**type** | Literal["gt"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/GteQueryV2.md b/docs/v2/Ontologies/models/GteQueryV2.md deleted file mode 100644 index 2e05a3a91..000000000 --- a/docs/v2/Ontologies/models/GteQueryV2.md +++ /dev/null @@ -1,16 +0,0 @@ -# GteQueryV2 - -Returns objects where the specified field is greater than or equal to a value. Allows you to specify a property -to query on by a variety of means. Either `field` or `propertyIdentifier` must be supplied, but not both. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**field** | Optional[PropertyApiName] | No | | -**property_identifier** | Optional[PropertyIdentifier] | No | | -**value** | PropertyValue | Yes | | -**type** | Literal["gte"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/HumanReadableFormat.md b/docs/v2/Ontologies/models/HumanReadableFormat.md deleted file mode 100644 index e7dfdab7a..000000000 --- a/docs/v2/Ontologies/models/HumanReadableFormat.md +++ /dev/null @@ -1,12 +0,0 @@ -# HumanReadableFormat - -Formats the duration as a human-readable written string. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**show_full_units** | Optional[bool] | No | Whether to show full or abbreviated time units. | -**type** | Literal["humanReadable"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/Icon.md b/docs/v2/Ontologies/models/Icon.md deleted file mode 100644 index c8a0720c7..000000000 --- a/docs/v2/Ontologies/models/Icon.md +++ /dev/null @@ -1,11 +0,0 @@ -# Icon - -A union currently only consisting of the BlueprintIcon (more icon types may be added in the future). - -## Type -```python -BlueprintIcon -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/InQuery.md b/docs/v2/Ontologies/models/InQuery.md deleted file mode 100644 index aaa3afc50..000000000 --- a/docs/v2/Ontologies/models/InQuery.md +++ /dev/null @@ -1,17 +0,0 @@ -# InQuery - -Returns objects where the specified field equals any of the provided values. Allows you to -specify a property to query on by a variety of means. Either `field` or `propertyIdentifier` must be supplied, -but not both. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**field** | Optional[PropertyApiName] | No | | -**property_identifier** | Optional[PropertyIdentifier] | No | | -**value** | List[PropertyValue] | Yes | | -**type** | Literal["in"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/InterfaceDefinedPropertyType.md b/docs/v2/Ontologies/models/InterfaceDefinedPropertyType.md deleted file mode 100644 index ee30f90c6..000000000 --- a/docs/v2/Ontologies/models/InterfaceDefinedPropertyType.md +++ /dev/null @@ -1,20 +0,0 @@ -# InterfaceDefinedPropertyType - -An interface property type with an additional field to indicate constraints that need to be satisfied by -implementing object property types. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**rid** | InterfacePropertyTypeRid | Yes | | -**api_name** | InterfacePropertyApiName | Yes | | -**display_name** | DisplayName | Yes | | -**description** | Optional[str] | No | The description of the interface property type. | -**data_type** | ObjectPropertyType | Yes | | -**value_type_api_name** | Optional[ValueTypeApiName] | No | | -**require_implementation** | bool | Yes | Whether each implementing object type must declare an implementation for this property. | -**type** | Literal["interfaceDefinedPropertyType"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/InterfaceLinkType.md b/docs/v2/Ontologies/models/InterfaceLinkType.md deleted file mode 100644 index 249da234f..000000000 --- a/docs/v2/Ontologies/models/InterfaceLinkType.md +++ /dev/null @@ -1,19 +0,0 @@ -# InterfaceLinkType - -A link type constraint defined at the interface level where the implementation of the links is provided -by the implementing object types. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**rid** | InterfaceLinkTypeRid | Yes | | -**api_name** | InterfaceLinkTypeApiName | Yes | | -**display_name** | DisplayName | Yes | | -**description** | Optional[str] | No | The description of the interface link type. | -**linked_entity_api_name** | InterfaceLinkTypeLinkedEntityApiName | Yes | | -**cardinality** | InterfaceLinkTypeCardinality | Yes | | -**required** | bool | Yes | Whether each implementing object type must declare at least one implementation of this link. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/InterfaceLinkTypeApiName.md b/docs/v2/Ontologies/models/InterfaceLinkTypeApiName.md deleted file mode 100644 index 8e2269bc7..000000000 --- a/docs/v2/Ontologies/models/InterfaceLinkTypeApiName.md +++ /dev/null @@ -1,13 +0,0 @@ -# InterfaceLinkTypeApiName - -The name of the interface link type in the API. To find the API name for your Interface Link Type, check the -[Ontology Manager](https://palantir.com/docs/foundry/ontology-manager/overview/). - - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/InterfaceLinkTypeCardinality.md b/docs/v2/Ontologies/models/InterfaceLinkTypeCardinality.md deleted file mode 100644 index 7ab218f74..000000000 --- a/docs/v2/Ontologies/models/InterfaceLinkTypeCardinality.md +++ /dev/null @@ -1,13 +0,0 @@ -# InterfaceLinkTypeCardinality - -The cardinality of the link in the given direction. Cardinality can be "ONE", meaning an object can -link to zero or one other objects, or "MANY", meaning an object can link to any number of other objects. - - -| **Value** | -| --------- | -| `"ONE"` | -| `"MANY"` | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/InterfaceLinkTypeLinkedEntityApiName.md b/docs/v2/Ontologies/models/InterfaceLinkTypeLinkedEntityApiName.md deleted file mode 100644 index 2ac8b7fef..000000000 --- a/docs/v2/Ontologies/models/InterfaceLinkTypeLinkedEntityApiName.md +++ /dev/null @@ -1,16 +0,0 @@ -# InterfaceLinkTypeLinkedEntityApiName - -A reference to the linked entity. This can either be an object or an interface type. - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -LinkedObjectTypeApiName | objectTypeApiName -LinkedInterfaceTypeApiName | interfaceTypeApiName - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/InterfaceLinkTypeRid.md b/docs/v2/Ontologies/models/InterfaceLinkTypeRid.md deleted file mode 100644 index c44e33024..000000000 --- a/docs/v2/Ontologies/models/InterfaceLinkTypeRid.md +++ /dev/null @@ -1,12 +0,0 @@ -# InterfaceLinkTypeRid - -The unique resource identifier of an interface link type, useful for interacting with other Foundry APIs. - - -## Type -```python -RID -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/InterfaceParameterPropertyArgument.md b/docs/v2/Ontologies/models/InterfaceParameterPropertyArgument.md deleted file mode 100644 index add1e114f..000000000 --- a/docs/v2/Ontologies/models/InterfaceParameterPropertyArgument.md +++ /dev/null @@ -1,13 +0,0 @@ -# InterfaceParameterPropertyArgument - -Represents an interface parameter property argument in a logic rule. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**parameter_id** | ParameterId | Yes | | -**shared_property_type_rid** | RID | Yes | | -**type** | Literal["interfaceParameterPropertyValue"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/InterfacePropertyApiName.md b/docs/v2/Ontologies/models/InterfacePropertyApiName.md deleted file mode 100644 index eed501a75..000000000 --- a/docs/v2/Ontologies/models/InterfacePropertyApiName.md +++ /dev/null @@ -1,14 +0,0 @@ -# InterfacePropertyApiName - -The name of the interface property type in the API in lowerCamelCase format. To find the API name for your -interface property type, use the `List interface types` endpoint and check the `allPropertiesV2` field or check -the **Ontology Manager**. - - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/InterfacePropertyLocalPropertyImplementation.md b/docs/v2/Ontologies/models/InterfacePropertyLocalPropertyImplementation.md deleted file mode 100644 index 5f6d45cfa..000000000 --- a/docs/v2/Ontologies/models/InterfacePropertyLocalPropertyImplementation.md +++ /dev/null @@ -1,12 +0,0 @@ -# InterfacePropertyLocalPropertyImplementation - -An implementation of an interface property via a local property. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**property_api_name** | PropertyApiName | Yes | | -**type** | Literal["localPropertyImplementation"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/InterfacePropertyReducedPropertyImplementation.md b/docs/v2/Ontologies/models/InterfacePropertyReducedPropertyImplementation.md deleted file mode 100644 index 05d8bb3a5..000000000 --- a/docs/v2/Ontologies/models/InterfacePropertyReducedPropertyImplementation.md +++ /dev/null @@ -1,12 +0,0 @@ -# InterfacePropertyReducedPropertyImplementation - -An implementation of an interface property via applying reducers on the nested implementation. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**implementation** | NestedInterfacePropertyTypeImplementation | Yes | | -**type** | Literal["reducedPropertyImplementation"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/InterfacePropertyStructFieldImplementation.md b/docs/v2/Ontologies/models/InterfacePropertyStructFieldImplementation.md deleted file mode 100644 index 618698453..000000000 --- a/docs/v2/Ontologies/models/InterfacePropertyStructFieldImplementation.md +++ /dev/null @@ -1,12 +0,0 @@ -# InterfacePropertyStructFieldImplementation - -An implementation of an interface property via the field of a local struct property. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**struct_field_of_property** | StructFieldOfPropertyImplementation | Yes | | -**type** | Literal["structFieldImplementation"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/InterfacePropertyStructImplementation.md b/docs/v2/Ontologies/models/InterfacePropertyStructImplementation.md deleted file mode 100644 index 0ea45407c..000000000 --- a/docs/v2/Ontologies/models/InterfacePropertyStructImplementation.md +++ /dev/null @@ -1,14 +0,0 @@ -# InterfacePropertyStructImplementation - -An implementation of a struct interface property via a local struct property. Specifies a mapping of interface -struct fields to local struct fields or properties. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**mapping** | InterfacePropertyStructImplementationMapping | Yes | | -**type** | Literal["structImplementation"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/InterfacePropertyStructImplementationMapping.md b/docs/v2/Ontologies/models/InterfacePropertyStructImplementationMapping.md deleted file mode 100644 index 0e254f668..000000000 --- a/docs/v2/Ontologies/models/InterfacePropertyStructImplementationMapping.md +++ /dev/null @@ -1,13 +0,0 @@ -# InterfacePropertyStructImplementationMapping - -An implementation of a struct interface property via a local struct property. Specifies a mapping of interface -struct fields to local struct fields or properties. - - -## Type -```python -Dict[StructFieldApiName, PropertyOrStructFieldOfPropertyImplementation] -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/InterfacePropertyType.md b/docs/v2/Ontologies/models/InterfacePropertyType.md deleted file mode 100644 index ef76dbc9b..000000000 --- a/docs/v2/Ontologies/models/InterfacePropertyType.md +++ /dev/null @@ -1,18 +0,0 @@ -# InterfacePropertyType - -The definition of an interface property type on an interface. An interface property can either be backed by a -shared property type or defined on the interface directly. - - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -InterfaceDefinedPropertyType | interfaceDefinedPropertyType -InterfaceSharedPropertyType | interfaceSharedPropertyType - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/InterfacePropertyTypeImplementation.md b/docs/v2/Ontologies/models/InterfacePropertyTypeImplementation.md deleted file mode 100644 index 9f0971b4b..000000000 --- a/docs/v2/Ontologies/models/InterfacePropertyTypeImplementation.md +++ /dev/null @@ -1,19 +0,0 @@ -# InterfacePropertyTypeImplementation - -Describes how an object type implements an interface property. - - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -InterfacePropertyStructFieldImplementation | structFieldImplementation -InterfacePropertyStructImplementation | structImplementation -InterfacePropertyLocalPropertyImplementation | localPropertyImplementation -InterfacePropertyReducedPropertyImplementation | reducedPropertyImplementation - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/InterfacePropertyTypeRid.md b/docs/v2/Ontologies/models/InterfacePropertyTypeRid.md deleted file mode 100644 index 941a9e1ef..000000000 --- a/docs/v2/Ontologies/models/InterfacePropertyTypeRid.md +++ /dev/null @@ -1,12 +0,0 @@ -# InterfacePropertyTypeRid - -The unique resource identifier of an interface property type, useful for interacting with other Foundry APIs. - - -## Type -```python -RID -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/InterfaceSharedPropertyType.md b/docs/v2/Ontologies/models/InterfaceSharedPropertyType.md deleted file mode 100644 index c8c66b034..000000000 --- a/docs/v2/Ontologies/models/InterfaceSharedPropertyType.md +++ /dev/null @@ -1,21 +0,0 @@ -# InterfaceSharedPropertyType - -A shared property type with an additional field to indicate whether the property must be included on every -object type that implements the interface, or whether it is optional. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**rid** | SharedPropertyTypeRid | Yes | | -**api_name** | SharedPropertyTypeApiName | Yes | | -**display_name** | DisplayName | Yes | | -**description** | Optional[str] | No | A short text that describes the SharedPropertyType. | -**data_type** | ObjectPropertyType | Yes | | -**value_type_api_name** | Optional[ValueTypeApiName] | No | | -**value_formatting** | Optional[PropertyValueFormattingRule] | No | | -**required** | bool | Yes | Whether each implementing object type must declare an implementation for this property. | -**type** | Literal["interfaceSharedPropertyType"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/InterfaceToObjectTypeMapping.md b/docs/v2/Ontologies/models/InterfaceToObjectTypeMapping.md deleted file mode 100644 index a0cf66847..000000000 --- a/docs/v2/Ontologies/models/InterfaceToObjectTypeMapping.md +++ /dev/null @@ -1,11 +0,0 @@ -# InterfaceToObjectTypeMapping - -Represents an implementation of an interface (the mapping of interface property to local property). - -## Type -```python -Dict[SharedPropertyTypeApiName, PropertyApiName] -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/InterfaceToObjectTypeMappingV2.md b/docs/v2/Ontologies/models/InterfaceToObjectTypeMappingV2.md deleted file mode 100644 index cc7fde7d4..000000000 --- a/docs/v2/Ontologies/models/InterfaceToObjectTypeMappingV2.md +++ /dev/null @@ -1,12 +0,0 @@ -# InterfaceToObjectTypeMappingV2 - -Represents an implementation of an interface (the mapping of interface property to how it is implemented. - - -## Type -```python -Dict[InterfacePropertyApiName, InterfacePropertyTypeImplementation] -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/InterfaceToObjectTypeMappings.md b/docs/v2/Ontologies/models/InterfaceToObjectTypeMappings.md deleted file mode 100644 index 6d1233950..000000000 --- a/docs/v2/Ontologies/models/InterfaceToObjectTypeMappings.md +++ /dev/null @@ -1,11 +0,0 @@ -# InterfaceToObjectTypeMappings - -Map from object type to the interface-to-object-type mapping for that object type. - -## Type -```python -Dict[ObjectTypeApiName, InterfaceToObjectTypeMapping] -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/InterfaceToObjectTypeMappingsV2.md b/docs/v2/Ontologies/models/InterfaceToObjectTypeMappingsV2.md deleted file mode 100644 index 0e9027c7a..000000000 --- a/docs/v2/Ontologies/models/InterfaceToObjectTypeMappingsV2.md +++ /dev/null @@ -1,11 +0,0 @@ -# InterfaceToObjectTypeMappingsV2 - -Map from object type to the interface property implementations of that object type. - -## Type -```python -Dict[ObjectTypeApiName, InterfaceToObjectTypeMappingV2] -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/InterfaceType.md b/docs/v2/Ontologies/models/InterfaceType.md deleted file mode 100644 index 2b9e20d1f..000000000 --- a/docs/v2/Ontologies/models/InterfaceType.md +++ /dev/null @@ -1,23 +0,0 @@ -# InterfaceType - -Represents an interface type in the Ontology. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**rid** | InterfaceTypeRid | Yes | | -**api_name** | InterfaceTypeApiName | Yes | | -**display_name** | DisplayName | Yes | | -**description** | Optional[str] | No | The description of the interface. | -**properties** | Dict[SharedPropertyTypeApiName, InterfaceSharedPropertyType] | Yes | A map from a shared property type API name to the corresponding shared property type. The map describes the set of properties the interface has. A shared property type must be unique across all of the properties. This field only includes properties on the interface that are backed by shared property types. | -**all_properties** | Dict[SharedPropertyTypeApiName, InterfaceSharedPropertyType] | Yes | A map from a shared property type API name to the corresponding shared property type. The map describes the set of properties the interface has, including properties from all directly and indirectly extended interfaces. This field only includes properties on the interface that are backed by shared property types. | -**properties_v2** | Dict[InterfacePropertyApiName, InterfacePropertyType] | Yes | A map from a interface property type API name to the corresponding interface property type. The map describes the set of properties the interface has. An interface property can either be backed by a shared property or it can be defined directly on the interface. | -**all_properties_v2** | Dict[InterfacePropertyApiName, ResolvedInterfacePropertyType] | Yes | A map from a interface property type API name to the corresponding interface property type. The map describes the set of properties the interface has, including properties from all directly and indirectly extended interfaces. | -**extends_interfaces** | List[InterfaceTypeApiName] | Yes | A list of interface API names that this interface extends. An interface can extend other interfaces to inherit their properties. | -**all_extends_interfaces** | List[InterfaceTypeApiName] | Yes | A list of interface API names that this interface extends, both directly and indirectly. | -**implemented_by_object_types** | List[ObjectTypeApiName] | Yes | A list of object API names that implement this interface. | -**links** | Dict[InterfaceLinkTypeApiName, InterfaceLinkType] | Yes | A map from an interface link type API name to the corresponding interface link type. The map describes the set of link types the interface has. | -**all_links** | Dict[InterfaceLinkTypeApiName, InterfaceLinkType] | Yes | A map from an interface link type API name to the corresponding interface link type. The map describes the set of link types the interface has, including links from all directly and indirectly extended interfaces. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/InterfaceTypeApiName.md b/docs/v2/Ontologies/models/InterfaceTypeApiName.md deleted file mode 100644 index 392e38da8..000000000 --- a/docs/v2/Ontologies/models/InterfaceTypeApiName.md +++ /dev/null @@ -1,13 +0,0 @@ -# InterfaceTypeApiName - -The name of the interface type in the API in UpperCamelCase format. To find the API name for your interface -type, use the `List interface types` endpoint or check the **Ontology Manager**. - - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/InterfaceTypeRid.md b/docs/v2/Ontologies/models/InterfaceTypeRid.md deleted file mode 100644 index bee01df18..000000000 --- a/docs/v2/Ontologies/models/InterfaceTypeRid.md +++ /dev/null @@ -1,11 +0,0 @@ -# InterfaceTypeRid - -The unique resource identifier of an interface, useful for interacting with other Foundry APIs. - -## Type -```python -RID -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/IntersectsBoundingBoxQuery.md b/docs/v2/Ontologies/models/IntersectsBoundingBoxQuery.md deleted file mode 100644 index 0e0a9de13..000000000 --- a/docs/v2/Ontologies/models/IntersectsBoundingBoxQuery.md +++ /dev/null @@ -1,16 +0,0 @@ -# IntersectsBoundingBoxQuery - -Returns objects where the specified field intersects the bounding box provided. Allows you to specify a property -to query on by a variety of means. Either `field` or `propertyIdentifier` must be supplied, but not both. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**field** | Optional[PropertyApiName] | No | | -**property_identifier** | Optional[PropertyIdentifier] | No | | -**value** | BoundingBoxValue | Yes | | -**type** | Literal["intersectsBoundingBox"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/IntersectsPolygonQuery.md b/docs/v2/Ontologies/models/IntersectsPolygonQuery.md deleted file mode 100644 index cb35fa9f5..000000000 --- a/docs/v2/Ontologies/models/IntersectsPolygonQuery.md +++ /dev/null @@ -1,16 +0,0 @@ -# IntersectsPolygonQuery - -Returns objects where the specified field intersects the polygon provided. Allows you to specify a property to -query on by a variety of means. Either `field` or `propertyIdentifier` must be supplied, but not both. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**field** | Optional[PropertyApiName] | No | | -**property_identifier** | Optional[PropertyIdentifier] | No | | -**value** | PolygonValue | Yes | | -**type** | Literal["intersectsPolygon"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/IntervalQuery.md b/docs/v2/Ontologies/models/IntervalQuery.md deleted file mode 100644 index dc8087b5b..000000000 --- a/docs/v2/Ontologies/models/IntervalQuery.md +++ /dev/null @@ -1,16 +0,0 @@ -# IntervalQuery - -Returns objects where the specified field matches the sub-rule provided. This applies to the analyzed form of -text fields. Either `field` or `propertyIdentifier` can be supplied, but not both. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**field** | Optional[PropertyApiName] | No | | -**property_identifier** | Optional[PropertyIdentifier] | No | | -**rule** | IntervalQueryRule | Yes | | -**type** | Literal["interval"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/IntervalQueryRule.md b/docs/v2/Ontologies/models/IntervalQueryRule.md deleted file mode 100644 index e1499af69..000000000 --- a/docs/v2/Ontologies/models/IntervalQueryRule.md +++ /dev/null @@ -1,18 +0,0 @@ -# IntervalQueryRule - -Sub-rule used for evaluating an IntervalQuery - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -AllOfRule | allOf -MatchRule | match -AnyOfRule | anyOf -PrefixOnLastTokenRule | prefixOnLastToken - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/IsNullQueryV2.md b/docs/v2/Ontologies/models/IsNullQueryV2.md deleted file mode 100644 index 909173173..000000000 --- a/docs/v2/Ontologies/models/IsNullQueryV2.md +++ /dev/null @@ -1,16 +0,0 @@ -# IsNullQueryV2 - -Returns objects based on the existence of the specified field. Allows you to specify a property to query on -by a variety of means. Either `field` or `propertyIdentifier` must be supplied, but not both. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**field** | Optional[PropertyApiName] | No | | -**property_identifier** | Optional[PropertyIdentifier] | No | | -**value** | bool | Yes | | -**type** | Literal["isNull"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/KnownType.md b/docs/v2/Ontologies/models/KnownType.md deleted file mode 100644 index e6596fcb3..000000000 --- a/docs/v2/Ontologies/models/KnownType.md +++ /dev/null @@ -1,16 +0,0 @@ -# KnownType - -Known Foundry types for specialized formatting: -- userOrGroupRid: Format as user or group -- resourceRid: Format as resource -- artifactGid: Format as artifact - - -| **Value** | -| --------- | -| `"USER_OR_GROUP_ID"` | -| `"RESOURCE_RID"` | -| `"ARTIFACT_GID"` | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/LeastPropertyExpression.md b/docs/v2/Ontologies/models/LeastPropertyExpression.md deleted file mode 100644 index fbb789a3f..000000000 --- a/docs/v2/Ontologies/models/LeastPropertyExpression.md +++ /dev/null @@ -1,13 +0,0 @@ -# LeastPropertyExpression - -Finds least of two or more numeric, date or timestamp values. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**properties** | List[DerivedPropertyDefinition] | Yes | | -**type** | Literal["least"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/LengthConstraint.md b/docs/v2/Ontologies/models/LengthConstraint.md deleted file mode 100644 index 889a7b089..000000000 --- a/docs/v2/Ontologies/models/LengthConstraint.md +++ /dev/null @@ -1,13 +0,0 @@ -# LengthConstraint - -LengthConstraint - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**minimum_length** | Optional[float] | No | | -**maximum_length** | Optional[float] | No | | -**type** | Literal["length"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/LinkSideObject.md b/docs/v2/Ontologies/models/LinkSideObject.md deleted file mode 100644 index 8d1513598..000000000 --- a/docs/v2/Ontologies/models/LinkSideObject.md +++ /dev/null @@ -1,12 +0,0 @@ -# LinkSideObject - -LinkSideObject - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**primary_key** | PropertyValue | Yes | | -**object_type** | ObjectTypeApiName | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/LinkTypeApiName.md b/docs/v2/Ontologies/models/LinkTypeApiName.md deleted file mode 100644 index 827cc1a8a..000000000 --- a/docs/v2/Ontologies/models/LinkTypeApiName.md +++ /dev/null @@ -1,13 +0,0 @@ -# LinkTypeApiName - -The name of the link type in the API. To find the API name for your Link Type, check the **Ontology Manager** -application. - - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/LinkTypeId.md b/docs/v2/Ontologies/models/LinkTypeId.md deleted file mode 100644 index 84df58bcc..000000000 --- a/docs/v2/Ontologies/models/LinkTypeId.md +++ /dev/null @@ -1,12 +0,0 @@ -# LinkTypeId - -The unique ID of a link type. To find the ID for your link type, check the **Ontology Manager** application. - - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/LinkTypeRid.md b/docs/v2/Ontologies/models/LinkTypeRid.md deleted file mode 100644 index 4b22d8bcb..000000000 --- a/docs/v2/Ontologies/models/LinkTypeRid.md +++ /dev/null @@ -1,11 +0,0 @@ -# LinkTypeRid - -LinkTypeRid - -## Type -```python -RID -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/LinkTypeSideCardinality.md b/docs/v2/Ontologies/models/LinkTypeSideCardinality.md deleted file mode 100644 index ccc7b693d..000000000 --- a/docs/v2/Ontologies/models/LinkTypeSideCardinality.md +++ /dev/null @@ -1,11 +0,0 @@ -# LinkTypeSideCardinality - -LinkTypeSideCardinality - -| **Value** | -| --------- | -| `"ONE"` | -| `"MANY"` | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/LinkTypeSideV2.md b/docs/v2/Ontologies/models/LinkTypeSideV2.md deleted file mode 100644 index 12e8b9e8c..000000000 --- a/docs/v2/Ontologies/models/LinkTypeSideV2.md +++ /dev/null @@ -1,19 +0,0 @@ -# LinkTypeSideV2 - -`foreignKeyPropertyApiName` is the API name of the foreign key on this object type. If absent, the link is -either a m2m link or the linked object has the foreign key and this object type has the primary key. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**api_name** | LinkTypeApiName | Yes | | -**display_name** | DisplayName | Yes | | -**status** | ReleaseStatus | Yes | | -**object_type_api_name** | ObjectTypeApiName | Yes | | -**cardinality** | LinkTypeSideCardinality | Yes | | -**foreign_key_property_api_name** | Optional[PropertyApiName] | No | | -**link_type_rid** | LinkTypeRid | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/LinkedInterfaceTypeApiName.md b/docs/v2/Ontologies/models/LinkedInterfaceTypeApiName.md deleted file mode 100644 index 7c9663142..000000000 --- a/docs/v2/Ontologies/models/LinkedInterfaceTypeApiName.md +++ /dev/null @@ -1,12 +0,0 @@ -# LinkedInterfaceTypeApiName - -A reference to the linked interface type. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**api_name** | InterfaceTypeApiName | Yes | | -**type** | Literal["interfaceTypeApiName"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/LinkedObjectLocator.md b/docs/v2/Ontologies/models/LinkedObjectLocator.md deleted file mode 100644 index 9f70b2b71..000000000 --- a/docs/v2/Ontologies/models/LinkedObjectLocator.md +++ /dev/null @@ -1,14 +0,0 @@ -# LinkedObjectLocator - -Does not contain information about the source object. Should be used in a nested type that provides information about source objects. -The `targetObject` Ontology Object in this response will only ever have the `__primaryKey` and `__apiName` -fields present, thus functioning as object locators rather than full objects. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**target_object** | Optional[OntologyObjectV2] | No | | -**link_type** | Optional[LinkTypeApiName] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/LinkedObjectTypeApiName.md b/docs/v2/Ontologies/models/LinkedObjectTypeApiName.md deleted file mode 100644 index cf22bd9e8..000000000 --- a/docs/v2/Ontologies/models/LinkedObjectTypeApiName.md +++ /dev/null @@ -1,12 +0,0 @@ -# LinkedObjectTypeApiName - -A reference to the linked object type. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**api_name** | ObjectTypeApiName | Yes | | -**type** | Literal["objectTypeApiName"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/LinksFromObject.md b/docs/v2/Ontologies/models/LinksFromObject.md deleted file mode 100644 index 61d419421..000000000 --- a/docs/v2/Ontologies/models/LinksFromObject.md +++ /dev/null @@ -1,13 +0,0 @@ -# LinksFromObject - -The Ontology Objects in this response will only ever have the `__primaryKey` and `__apiName` -fields present, thus functioning as object locators rather than full objects. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**source_object** | Optional[OntologyObjectV2] | No | | -**linked_objects** | List[LinkedObjectLocator] | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ListActionTypesFullMetadataResponse.md b/docs/v2/Ontologies/models/ListActionTypesFullMetadataResponse.md deleted file mode 100644 index 290e3c0f0..000000000 --- a/docs/v2/Ontologies/models/ListActionTypesFullMetadataResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListActionTypesFullMetadataResponse - -ListActionTypesFullMetadataResponse - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**next_page_token** | Optional[PageToken] | No | | -**data** | List[ActionTypeFullMetadata] | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ListActionTypesResponseV2.md b/docs/v2/Ontologies/models/ListActionTypesResponseV2.md deleted file mode 100644 index c9094113a..000000000 --- a/docs/v2/Ontologies/models/ListActionTypesResponseV2.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListActionTypesResponseV2 - -ListActionTypesResponseV2 - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**next_page_token** | Optional[PageToken] | No | | -**data** | List[ActionTypeV2] | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ListAttachmentsResponseV2.md b/docs/v2/Ontologies/models/ListAttachmentsResponseV2.md deleted file mode 100644 index 16a61bc6b..000000000 --- a/docs/v2/Ontologies/models/ListAttachmentsResponseV2.md +++ /dev/null @@ -1,13 +0,0 @@ -# ListAttachmentsResponseV2 - -ListAttachmentsResponseV2 - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**data** | List[AttachmentV2] | Yes | | -**next_page_token** | Optional[PageToken] | No | | -**type** | Literal["multiple"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ListInterfaceLinkedObjectsResponse.md b/docs/v2/Ontologies/models/ListInterfaceLinkedObjectsResponse.md deleted file mode 100644 index 57994d1d9..000000000 --- a/docs/v2/Ontologies/models/ListInterfaceLinkedObjectsResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListInterfaceLinkedObjectsResponse - -ListInterfaceLinkedObjectsResponse - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**data** | List[OntologyObjectV2] | Yes | | -**next_page_token** | Optional[PageToken] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ListInterfaceTypesResponse.md b/docs/v2/Ontologies/models/ListInterfaceTypesResponse.md deleted file mode 100644 index b81a59618..000000000 --- a/docs/v2/Ontologies/models/ListInterfaceTypesResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListInterfaceTypesResponse - -ListInterfaceTypesResponse - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**next_page_token** | Optional[PageToken] | No | | -**data** | List[InterfaceType] | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ListLinkedObjectsResponseV2.md b/docs/v2/Ontologies/models/ListLinkedObjectsResponseV2.md deleted file mode 100644 index e9419b77b..000000000 --- a/docs/v2/Ontologies/models/ListLinkedObjectsResponseV2.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListLinkedObjectsResponseV2 - -ListLinkedObjectsResponseV2 - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**data** | List[OntologyObjectV2] | Yes | | -**next_page_token** | Optional[PageToken] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ListObjectTypesV2Response.md b/docs/v2/Ontologies/models/ListObjectTypesV2Response.md deleted file mode 100644 index 12c63d642..000000000 --- a/docs/v2/Ontologies/models/ListObjectTypesV2Response.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListObjectTypesV2Response - -ListObjectTypesV2Response - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**next_page_token** | Optional[PageToken] | No | | -**data** | List[ObjectTypeV2] | Yes | The list of object types in the current page. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ListObjectsForInterfaceResponse.md b/docs/v2/Ontologies/models/ListObjectsForInterfaceResponse.md deleted file mode 100644 index dfc85600b..000000000 --- a/docs/v2/Ontologies/models/ListObjectsForInterfaceResponse.md +++ /dev/null @@ -1,13 +0,0 @@ -# ListObjectsForInterfaceResponse - -ListObjectsForInterfaceResponse - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**next_page_token** | Optional[PageToken] | No | | -**data** | List[OntologyObjectV2] | Yes | The list of interface instances in the current page. | -**total_count** | TotalCount | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ListObjectsResponseV2.md b/docs/v2/Ontologies/models/ListObjectsResponseV2.md deleted file mode 100644 index 78d07aa0a..000000000 --- a/docs/v2/Ontologies/models/ListObjectsResponseV2.md +++ /dev/null @@ -1,13 +0,0 @@ -# ListObjectsResponseV2 - -ListObjectsResponseV2 - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**next_page_token** | Optional[PageToken] | No | | -**data** | List[OntologyObjectV2] | Yes | The list of objects in the current page. | -**total_count** | TotalCount | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ListOntologiesV2Response.md b/docs/v2/Ontologies/models/ListOntologiesV2Response.md deleted file mode 100644 index 47062c973..000000000 --- a/docs/v2/Ontologies/models/ListOntologiesV2Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# ListOntologiesV2Response - -ListOntologiesV2Response - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**data** | List[OntologyV2] | Yes | The list of Ontologies the user has access to. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ListOntologyValueTypesResponse.md b/docs/v2/Ontologies/models/ListOntologyValueTypesResponse.md deleted file mode 100644 index d9fa7b725..000000000 --- a/docs/v2/Ontologies/models/ListOntologyValueTypesResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# ListOntologyValueTypesResponse - -ListOntologyValueTypesResponse - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**data** | List[OntologyValueType] | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ListOutgoingInterfaceLinkTypesResponse.md b/docs/v2/Ontologies/models/ListOutgoingInterfaceLinkTypesResponse.md deleted file mode 100644 index f982fefc6..000000000 --- a/docs/v2/Ontologies/models/ListOutgoingInterfaceLinkTypesResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListOutgoingInterfaceLinkTypesResponse - -ListOutgoingInterfaceLinkTypesResponse - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**next_page_token** | Optional[PageToken] | No | | -**data** | List[InterfaceLinkType] | Yes | The list of interface link types in the current page. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ListOutgoingLinkTypesResponseV2.md b/docs/v2/Ontologies/models/ListOutgoingLinkTypesResponseV2.md deleted file mode 100644 index 39fdb50fb..000000000 --- a/docs/v2/Ontologies/models/ListOutgoingLinkTypesResponseV2.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListOutgoingLinkTypesResponseV2 - -ListOutgoingLinkTypesResponseV2 - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**next_page_token** | Optional[PageToken] | No | | -**data** | List[LinkTypeSideV2] | Yes | The list of link type sides in the current page. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ListQueryTypesResponseV2.md b/docs/v2/Ontologies/models/ListQueryTypesResponseV2.md deleted file mode 100644 index 375343eb9..000000000 --- a/docs/v2/Ontologies/models/ListQueryTypesResponseV2.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListQueryTypesResponseV2 - -ListQueryTypesResponseV2 - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**next_page_token** | Optional[PageToken] | No | | -**data** | List[QueryTypeV2] | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/LoadObjectSetLinksRequestV2.md b/docs/v2/Ontologies/models/LoadObjectSetLinksRequestV2.md deleted file mode 100644 index 1d842eda4..000000000 --- a/docs/v2/Ontologies/models/LoadObjectSetLinksRequestV2.md +++ /dev/null @@ -1,14 +0,0 @@ -# LoadObjectSetLinksRequestV2 - -LoadObjectSetLinksRequestV2 - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**object_set** | ObjectSet | Yes | | -**links** | List[LinkTypeApiName] | Yes | | -**page_token** | Optional[PageToken] | No | | -**include_compute_usage** | Optional[IncludeComputeUsage] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/LoadObjectSetLinksResponseV2.md b/docs/v2/Ontologies/models/LoadObjectSetLinksResponseV2.md deleted file mode 100644 index d03b9bc40..000000000 --- a/docs/v2/Ontologies/models/LoadObjectSetLinksResponseV2.md +++ /dev/null @@ -1,13 +0,0 @@ -# LoadObjectSetLinksResponseV2 - -LoadObjectSetLinksResponseV2 - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**data** | List[LinksFromObject] | Yes | | -**next_page_token** | Optional[PageToken] | No | | -**compute_usage** | Optional[ComputeSeconds] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/LoadObjectSetRequestV2.md b/docs/v2/Ontologies/models/LoadObjectSetRequestV2.md deleted file mode 100644 index d891f763d..000000000 --- a/docs/v2/Ontologies/models/LoadObjectSetRequestV2.md +++ /dev/null @@ -1,19 +0,0 @@ -# LoadObjectSetRequestV2 - -Represents the API POST body when loading an `ObjectSet`. - -## Properties -| Name | Type | Required | Description | -| ------------ |------------------------------------|----------| ------------- | -**object_set** | ObjectSet | Yes | | -**order_by** | Optional[SearchOrderByV2] | No | | -**select** | List[SelectedPropertyApiName] | Yes | | -**select_v2** | Optional[List[PropertyIdentifier]] | No | The identifiers of the properties to include in the response. Only selectV2 or select should be populated, but not both. | -**page_token** | Optional[PageToken] | No | | -**page_size** | Optional[PageSize] | No | | -**exclude_rid** | Optional[bool] | No | A flag to exclude the retrieval of the `__rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2. | -**snapshot** | Optional[bool] | No | A flag to use snapshot consistency when paging. Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. This defaults to false if not specified, which means you will always get the latest results. | -**include_compute_usage** | Optional[IncludeComputeUsage] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/LoadObjectSetResponseV2.md b/docs/v2/Ontologies/models/LoadObjectSetResponseV2.md deleted file mode 100644 index 8934b4abe..000000000 --- a/docs/v2/Ontologies/models/LoadObjectSetResponseV2.md +++ /dev/null @@ -1,14 +0,0 @@ -# LoadObjectSetResponseV2 - -Represents the API response when loading an `ObjectSet`. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**data** | List[OntologyObjectV2] | Yes | The list of objects in the current Page. | -**next_page_token** | Optional[PageToken] | No | | -**total_count** | TotalCount | Yes | | -**compute_usage** | Optional[ComputeSeconds] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/LoadObjectSetV2MultipleObjectTypesRequest.md b/docs/v2/Ontologies/models/LoadObjectSetV2MultipleObjectTypesRequest.md deleted file mode 100644 index af45d3ffa..000000000 --- a/docs/v2/Ontologies/models/LoadObjectSetV2MultipleObjectTypesRequest.md +++ /dev/null @@ -1,20 +0,0 @@ -# LoadObjectSetV2MultipleObjectTypesRequest - -Represents the API POST body when loading an `ObjectSet`. Used on the `/loadObjectsMultipleObjectTypes` endpoint only. - - -## Properties -| Name | Type | Required | Description | -| ------------ |------------------------------------|----------| ------------- | -**object_set** | ObjectSet | Yes | | -**order_by** | Optional[SearchOrderByV2] | No | | -**select** | List[SelectedPropertyApiName] | Yes | | -**select_v2** | Optional[List[PropertyIdentifier]] | No | The identifiers of the properties to include in the response. Only selectV2 or select should be populated, but not both. | -**page_token** | Optional[PageToken] | No | | -**page_size** | Optional[PageSize] | No | | -**exclude_rid** | Optional[bool] | No | A flag to exclude the retrieval of the `$rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2. | -**snapshot** | Optional[bool] | No | A flag to use snapshot consistency when paging. Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. This defaults to false if not specified, which means you will always get the latest results. | -**include_compute_usage** | Optional[IncludeComputeUsage] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/LoadObjectSetV2MultipleObjectTypesResponse.md b/docs/v2/Ontologies/models/LoadObjectSetV2MultipleObjectTypesResponse.md deleted file mode 100644 index 074814580..000000000 --- a/docs/v2/Ontologies/models/LoadObjectSetV2MultipleObjectTypesResponse.md +++ /dev/null @@ -1,28 +0,0 @@ -# LoadObjectSetV2MultipleObjectTypesResponse - -Represents the API response when loading an `ObjectSet`. An `interfaceToObjectTypeMappings` field is -optionally returned if the type scope of the returned object set includes any interfaces. The "type scope" -of an object set refers to whether objects contain all their properties (object-type type scope) or just the -properties that implement interface properties (interface type scope). There can be multiple type scopes in a -single object set- some objects may have all their properties and some may only have interface properties. - -The `interfaceToObjectTypeMappings` field contains mappings from `SharedPropertyTypeApiName`s on the interface(s) to -`PropertyApiName` for properties on the object(s). - -The `interfaceToObjectTypeMappingsV2` field contains mappings from `InterfacePropertyApiName`s on the -interface(s) to `InterfacePropertyTypeImplementation` for properties on the object(s). This therefore includes -implementations of both properties backed by SharedPropertyTypes as well as properties defined on the interface. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**data** | List[OntologyObjectV2] | Yes | The list of objects in the current page. | -**next_page_token** | Optional[PageToken] | No | | -**total_count** | TotalCount | Yes | | -**interface_to_object_type_mappings** | Dict[InterfaceTypeApiName, InterfaceToObjectTypeMappings] | Yes | | -**interface_to_object_type_mappings_v2** | Dict[InterfaceTypeApiName, InterfaceToObjectTypeMappingsV2] | Yes | | -**compute_usage** | Optional[ComputeSeconds] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/LoadObjectSetV2ObjectsOrInterfacesRequest.md b/docs/v2/Ontologies/models/LoadObjectSetV2ObjectsOrInterfacesRequest.md deleted file mode 100644 index 580ea9a87..000000000 --- a/docs/v2/Ontologies/models/LoadObjectSetV2ObjectsOrInterfacesRequest.md +++ /dev/null @@ -1,19 +0,0 @@ -# LoadObjectSetV2ObjectsOrInterfacesRequest - -Represents the API POST body when loading an `ObjectSet`. Used on the `/loadObjectsOrInterfaces` endpoint only. - - -## Properties -| Name | Type | Required | Description | -| ------------ |------------------------------------|----------| ------------- | -**object_set** | ObjectSet | Yes | | -**order_by** | Optional[SearchOrderByV2] | No | | -**select** | List[SelectedPropertyApiName] | Yes | | -**select_v2** | Optional[List[PropertyIdentifier]] | No | The identifiers of the properties to include in the response. Only selectV2 or select should be populated, but not both. | -**page_token** | Optional[PageToken] | No | | -**page_size** | Optional[PageSize] | No | | -**exclude_rid** | Optional[bool] | No | A flag to exclude the retrieval of the `$rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2. | -**snapshot** | Optional[bool] | No | A flag to use snapshot consistency when paging. Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. This defaults to false if not specified, which means you will always get the latest results. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/LoadObjectSetV2ObjectsOrInterfacesResponse.md b/docs/v2/Ontologies/models/LoadObjectSetV2ObjectsOrInterfacesResponse.md deleted file mode 100644 index 6043a267f..000000000 --- a/docs/v2/Ontologies/models/LoadObjectSetV2ObjectsOrInterfacesResponse.md +++ /dev/null @@ -1,15 +0,0 @@ -# LoadObjectSetV2ObjectsOrInterfacesResponse - -Represents the API response when loading an `ObjectSet`. Objects in the returned set can either have properties -defined by an interface that the objects belong to or properties defined by the object type of the object. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**data** | List[OntologyObjectV2] | Yes | The list of objects in the current page. | -**next_page_token** | Optional[PageToken] | No | | -**total_count** | TotalCount | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/LoadOntologyMetadataRequest.md b/docs/v2/Ontologies/models/LoadOntologyMetadataRequest.md deleted file mode 100644 index ef25b30ce..000000000 --- a/docs/v2/Ontologies/models/LoadOntologyMetadataRequest.md +++ /dev/null @@ -1,15 +0,0 @@ -# LoadOntologyMetadataRequest - -The Ontology metadata (i.e., object, link, action, query, and interface types) to load. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**object_types** | List[ObjectTypeApiName] | Yes | | -**link_types** | List[LinkTypeApiName] | Yes | | -**action_types** | List[ActionTypeApiName] | Yes | | -**query_types** | List[VersionedQueryTypeApiName] | Yes | | -**interface_types** | List[InterfaceTypeApiName] | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/LogicRule.md b/docs/v2/Ontologies/models/LogicRule.md deleted file mode 100644 index cb9faa929..000000000 --- a/docs/v2/Ontologies/models/LogicRule.md +++ /dev/null @@ -1,22 +0,0 @@ -# LogicRule - -LogicRule - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -DeleteInterfaceObjectRule | deleteInterfaceObject -ModifyInterfaceObjectRule | modifyInterfaceObject -ModifyObjectRule | modifyObject -DeleteObjectRule | deleteObject -CreateInterfaceObjectRule | createInterfaceObject -DeleteLinkRule | deleteLink -CreateObjectRule | createObject -CreateLinkRule | createLink - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/LogicRuleArgument.md b/docs/v2/Ontologies/models/LogicRuleArgument.md deleted file mode 100644 index e6b85d320..000000000 --- a/docs/v2/Ontologies/models/LogicRuleArgument.md +++ /dev/null @@ -1,23 +0,0 @@ -# LogicRuleArgument - -Represents an argument for a logic rule operation. An argument can be passed in via the action parameters, as a static value, or as some other value. - - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -CurrentTimeArgument | currentTime -StaticArgument | staticValue -CurrentUserArgument | currentUser -ParameterIdArgument | parameterId -InterfaceParameterPropertyArgument | interfaceParameterPropertyValue -SynchronousWebhookOutputArgument | synchronousWebhookOutput -ObjectParameterPropertyArgument | objectParameterPropertyValue -UniqueIdentifierArgument | uniqueIdentifier - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/LtQueryV2.md b/docs/v2/Ontologies/models/LtQueryV2.md deleted file mode 100644 index e2c5e7b80..000000000 --- a/docs/v2/Ontologies/models/LtQueryV2.md +++ /dev/null @@ -1,16 +0,0 @@ -# LtQueryV2 - -Returns objects where the specified field is less than a value. Allows you to specify a property to query on -by a variety of means. Either `field` or `propertyIdentifier` must be supplied, but not both. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**field** | Optional[PropertyApiName] | No | | -**property_identifier** | Optional[PropertyIdentifier] | No | | -**value** | PropertyValue | Yes | | -**type** | Literal["lt"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/LteQueryV2.md b/docs/v2/Ontologies/models/LteQueryV2.md deleted file mode 100644 index 854c7ee7b..000000000 --- a/docs/v2/Ontologies/models/LteQueryV2.md +++ /dev/null @@ -1,16 +0,0 @@ -# LteQueryV2 - -Returns objects where the specified field is less than or equal to a value. Allows you to specify a property to -query on by a variety of means. Either `field` or `propertyIdentifier` must be supplied, but not both. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**field** | Optional[PropertyApiName] | No | | -**property_identifier** | Optional[PropertyIdentifier] | No | | -**value** | PropertyValue | Yes | | -**type** | Literal["lte"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/MatchRule.md b/docs/v2/Ontologies/models/MatchRule.md deleted file mode 100644 index 85ccc2a97..000000000 --- a/docs/v2/Ontologies/models/MatchRule.md +++ /dev/null @@ -1,15 +0,0 @@ -# MatchRule - -Matches intervals containing the terms in the query - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**query** | str | Yes | | -**max_gaps** | Optional[int] | No | The maximum gaps between matched terms in the interval. For example, in the text "quick brown fox", the terms "quick" and "fox" have a gap of one. If not set, then gaps are not considered. | -**ordered** | bool | Yes | If true, the matched terms must occur in order. | -**type** | Literal["match"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/MaxAggregationV2.md b/docs/v2/Ontologies/models/MaxAggregationV2.md deleted file mode 100644 index 3738287bc..000000000 --- a/docs/v2/Ontologies/models/MaxAggregationV2.md +++ /dev/null @@ -1,14 +0,0 @@ -# MaxAggregationV2 - -Computes the maximum value for the provided field. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**field** | PropertyApiName | Yes | | -**name** | Optional[AggregationMetricName] | No | | -**direction** | Optional[OrderByDirection] | No | | -**type** | Literal["max"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/MediaMetadata.md b/docs/v2/Ontologies/models/MediaMetadata.md deleted file mode 100644 index ff28e73d5..000000000 --- a/docs/v2/Ontologies/models/MediaMetadata.md +++ /dev/null @@ -1,13 +0,0 @@ -# MediaMetadata - -MediaMetadata - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**path** | Optional[MediaItemPath] | No | | -**size_bytes** | SizeBytes | Yes | | -**media_type** | MediaType | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/MethodObjectSet.md b/docs/v2/Ontologies/models/MethodObjectSet.md deleted file mode 100644 index 558df40a5..000000000 --- a/docs/v2/Ontologies/models/MethodObjectSet.md +++ /dev/null @@ -1,11 +0,0 @@ -# MethodObjectSet - -MethodObjectSet - -## Type -```python -ObjectSet -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/MinAggregationV2.md b/docs/v2/Ontologies/models/MinAggregationV2.md deleted file mode 100644 index 2ddef7c51..000000000 --- a/docs/v2/Ontologies/models/MinAggregationV2.md +++ /dev/null @@ -1,14 +0,0 @@ -# MinAggregationV2 - -Computes the minimum value for the provided field. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**field** | PropertyApiName | Yes | | -**name** | Optional[AggregationMetricName] | No | | -**direction** | Optional[OrderByDirection] | No | | -**type** | Literal["min"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ModifyInterfaceLogicRule.md b/docs/v2/Ontologies/models/ModifyInterfaceLogicRule.md deleted file mode 100644 index bee771e50..000000000 --- a/docs/v2/Ontologies/models/ModifyInterfaceLogicRule.md +++ /dev/null @@ -1,14 +0,0 @@ -# ModifyInterfaceLogicRule - -ModifyInterfaceLogicRule - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**interface_object_to_modify** | ParameterId | Yes | | -**shared_property_arguments** | Dict[SharedPropertyTypeApiName, LogicRuleArgument] | Yes | | -**struct_property_arguments** | Dict[SharedPropertyTypeApiName, Dict[StructFieldApiName, StructFieldArgument]] | Yes | | -**type** | Literal["modifyInterface"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ModifyInterfaceObjectRule.md b/docs/v2/Ontologies/models/ModifyInterfaceObjectRule.md deleted file mode 100644 index 76e77213f..000000000 --- a/docs/v2/Ontologies/models/ModifyInterfaceObjectRule.md +++ /dev/null @@ -1,12 +0,0 @@ -# ModifyInterfaceObjectRule - -ModifyInterfaceObjectRule - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**interface_type_api_name** | InterfaceTypeApiName | Yes | | -**type** | Literal["modifyInterfaceObject"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ModifyObject.md b/docs/v2/Ontologies/models/ModifyObject.md deleted file mode 100644 index d33745b99..000000000 --- a/docs/v2/Ontologies/models/ModifyObject.md +++ /dev/null @@ -1,13 +0,0 @@ -# ModifyObject - -ModifyObject - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**primary_key** | PropertyValue | Yes | | -**object_type** | ObjectTypeApiName | Yes | | -**type** | Literal["modifyObject"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ModifyObjectEdit.md b/docs/v2/Ontologies/models/ModifyObjectEdit.md deleted file mode 100644 index 3c0573788..000000000 --- a/docs/v2/Ontologies/models/ModifyObjectEdit.md +++ /dev/null @@ -1,14 +0,0 @@ -# ModifyObjectEdit - -ModifyObjectEdit - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**object_type** | ObjectTypeApiName | Yes | | -**primary_key** | PropertyValue | Yes | | -**properties** | Dict[PropertyApiName, DataValue] | Yes | | -**type** | Literal["modifyObject"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ModifyObjectLogicRule.md b/docs/v2/Ontologies/models/ModifyObjectLogicRule.md deleted file mode 100644 index 42f052657..000000000 --- a/docs/v2/Ontologies/models/ModifyObjectLogicRule.md +++ /dev/null @@ -1,14 +0,0 @@ -# ModifyObjectLogicRule - -ModifyObjectLogicRule - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**object_to_modify** | ParameterId | Yes | | -**property_arguments** | Dict[PropertyApiName, LogicRuleArgument] | Yes | | -**struct_property_arguments** | Dict[PropertyApiName, Dict[StructFieldApiName, StructFieldArgument]] | Yes | | -**type** | Literal["modifyObject"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ModifyObjectRule.md b/docs/v2/Ontologies/models/ModifyObjectRule.md deleted file mode 100644 index ca690877b..000000000 --- a/docs/v2/Ontologies/models/ModifyObjectRule.md +++ /dev/null @@ -1,12 +0,0 @@ -# ModifyObjectRule - -ModifyObjectRule - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**object_type_api_name** | ObjectTypeApiName | Yes | | -**type** | Literal["modifyObject"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/MultiplyPropertyExpression.md b/docs/v2/Ontologies/models/MultiplyPropertyExpression.md deleted file mode 100644 index 992ba2d07..000000000 --- a/docs/v2/Ontologies/models/MultiplyPropertyExpression.md +++ /dev/null @@ -1,13 +0,0 @@ -# MultiplyPropertyExpression - -Multiplies two or more numeric values. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**properties** | List[DerivedPropertyDefinition] | Yes | | -**type** | Literal["multiply"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/NearestNeighborsQuery.md b/docs/v2/Ontologies/models/NearestNeighborsQuery.md deleted file mode 100644 index 38546420d..000000000 --- a/docs/v2/Ontologies/models/NearestNeighborsQuery.md +++ /dev/null @@ -1,18 +0,0 @@ -# NearestNeighborsQuery - -Queries support either a vector matching the embedding model defined on the property, or text that is -automatically embedded. - - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -DoubleVector | vector -NearestNeighborsQueryText | text - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/NearestNeighborsQueryText.md b/docs/v2/Ontologies/models/NearestNeighborsQueryText.md deleted file mode 100644 index fb9ca4d73..000000000 --- a/docs/v2/Ontologies/models/NearestNeighborsQueryText.md +++ /dev/null @@ -1,13 +0,0 @@ -# NearestNeighborsQueryText - -Automatically embed the text in a vector using the embedding model configured for the given propertyIdentifier. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**value** | str | Yes | | -**type** | Literal["text"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/NegatePropertyExpression.md b/docs/v2/Ontologies/models/NegatePropertyExpression.md deleted file mode 100644 index ff192156f..000000000 --- a/docs/v2/Ontologies/models/NegatePropertyExpression.md +++ /dev/null @@ -1,13 +0,0 @@ -# NegatePropertyExpression - -Negates a numeric value. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**property** | DerivedPropertyDefinition | Yes | | -**type** | Literal["negate"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/NestedInterfacePropertyTypeImplementation.md b/docs/v2/Ontologies/models/NestedInterfacePropertyTypeImplementation.md deleted file mode 100644 index 68ea676b4..000000000 --- a/docs/v2/Ontologies/models/NestedInterfacePropertyTypeImplementation.md +++ /dev/null @@ -1,19 +0,0 @@ -# NestedInterfacePropertyTypeImplementation - -Describes how an object type implements an interface property when a reducer is applied to it. Is missing a -reduced property implementation to prevent arbitrarily nested implementations. - - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -InterfacePropertyStructFieldImplementation | structFieldImplementation -InterfacePropertyStructImplementation | structImplementation -InterfacePropertyLocalPropertyImplementation | localPropertyImplementation - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/NestedQueryAggregation.md b/docs/v2/Ontologies/models/NestedQueryAggregation.md deleted file mode 100644 index 767d3842a..000000000 --- a/docs/v2/Ontologies/models/NestedQueryAggregation.md +++ /dev/null @@ -1,12 +0,0 @@ -# NestedQueryAggregation - -NestedQueryAggregation - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**key** | Any | Yes | | -**groups** | List[QueryAggregation] | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/NotQueryV2.md b/docs/v2/Ontologies/models/NotQueryV2.md deleted file mode 100644 index 12573d6b9..000000000 --- a/docs/v2/Ontologies/models/NotQueryV2.md +++ /dev/null @@ -1,12 +0,0 @@ -# NotQueryV2 - -Returns objects where the query is not satisfied. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**value** | SearchJsonQueryV2 | Yes | | -**type** | Literal["not"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/NumberFormatAffix.md b/docs/v2/Ontologies/models/NumberFormatAffix.md deleted file mode 100644 index 7514748a4..000000000 --- a/docs/v2/Ontologies/models/NumberFormatAffix.md +++ /dev/null @@ -1,15 +0,0 @@ -# NumberFormatAffix - -Attach arbitrary text before and/or after the formatted number. -Example: prefix "USD " and postfix " total" displays as "USD 1,234.56 total" - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**base_format_options** | NumberFormatOptions | Yes | | -**affix** | Affix | Yes | | -**type** | Literal["affix"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/NumberFormatCurrency.md b/docs/v2/Ontologies/models/NumberFormatCurrency.md deleted file mode 100644 index 74a71e93b..000000000 --- a/docs/v2/Ontologies/models/NumberFormatCurrency.md +++ /dev/null @@ -1,16 +0,0 @@ -# NumberFormatCurrency - -Format numbers as currency values with proper symbols and styling. -Example: 1234.56 with currency "USD" displays as "USD 1,234.56" (standard) or "USD 1.2K" (compact) - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**base_format_options** | NumberFormatOptions | Yes | | -**style** | NumberFormatCurrencyStyle | Yes | | -**currency_code** | PropertyTypeReferenceOrStringConstant | Yes | | -**type** | Literal["currency"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/NumberFormatCurrencyStyle.md b/docs/v2/Ontologies/models/NumberFormatCurrencyStyle.md deleted file mode 100644 index 158a5d1ea..000000000 --- a/docs/v2/Ontologies/models/NumberFormatCurrencyStyle.md +++ /dev/null @@ -1,14 +0,0 @@ -# NumberFormatCurrencyStyle - -Currency rendering style options: -- STANDARD: Full currency formatting (e.g., "USD 1,234.56") -- COMPACT: Abbreviated currency formatting (e.g., "USD 1.2K") - - -| **Value** | -| --------- | -| `"STANDARD"` | -| `"COMPACT"` | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/NumberFormatCustomUnit.md b/docs/v2/Ontologies/models/NumberFormatCustomUnit.md deleted file mode 100644 index 72b85f5d7..000000000 --- a/docs/v2/Ontologies/models/NumberFormatCustomUnit.md +++ /dev/null @@ -1,16 +0,0 @@ -# NumberFormatCustomUnit - -Format numbers with custom units not supported by standard formatting. -Use this for domain-specific units like "requests/sec", "widgets", etc. -Example: 1500 with unit "widgets" displays as "1,500 widgets" - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**base_format_options** | NumberFormatOptions | Yes | | -**unit** | PropertyTypeReferenceOrStringConstant | Yes | | -**type** | Literal["customUnit"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/NumberFormatDuration.md b/docs/v2/Ontologies/models/NumberFormatDuration.md deleted file mode 100644 index 529b2fcd7..000000000 --- a/docs/v2/Ontologies/models/NumberFormatDuration.md +++ /dev/null @@ -1,17 +0,0 @@ -# NumberFormatDuration - -Format numeric values representing time durations. -- Human readable: 3661 seconds displays as "1h 1m 1s" -- Timecode: 3661 seconds displays as "01:01:01" - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**format_style** | DurationFormatStyle | Yes | | -**precision** | Optional[DurationPrecision] | No | | -**base_value** | DurationBaseValue | Yes | | -**type** | Literal["duration"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/NumberFormatFixedValues.md b/docs/v2/Ontologies/models/NumberFormatFixedValues.md deleted file mode 100644 index 405f531f6..000000000 --- a/docs/v2/Ontologies/models/NumberFormatFixedValues.md +++ /dev/null @@ -1,14 +0,0 @@ -# NumberFormatFixedValues - -Map integer values to custom human-readable strings. -Example: {1: "First", 2: "Second", 3: "Third"} would display 2 as "Second". - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**values** | Dict[FixedValuesMapKey, str] | Yes | | -**type** | Literal["fixedValues"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/NumberFormatNotation.md b/docs/v2/Ontologies/models/NumberFormatNotation.md deleted file mode 100644 index e958ca443..000000000 --- a/docs/v2/Ontologies/models/NumberFormatNotation.md +++ /dev/null @@ -1,18 +0,0 @@ -# NumberFormatNotation - -Number notation style options: -- STANDARD: Regular number display ("1,234") -- SCIENTIFIC: Scientific notation ("1.234E3") -- ENGINEERING: Engineering notation ("1.234E3") -- COMPACT: Compact notation ("1.2K") - - -| **Value** | -| --------- | -| `"STANDARD"` | -| `"SCIENTIFIC"` | -| `"ENGINEERING"` | -| `"COMPACT"` | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/NumberFormatOptions.md b/docs/v2/Ontologies/models/NumberFormatOptions.md deleted file mode 100644 index 5f8f74d87..000000000 --- a/docs/v2/Ontologies/models/NumberFormatOptions.md +++ /dev/null @@ -1,26 +0,0 @@ -# NumberFormatOptions - -Base number formatting options that can be applied to all number formatters. -Controls precision, grouping, rounding, and notation. Consistent with JavaScript's Intl.NumberFormat. - -Examples: -- useGrouping: true makes 1234567 display as "1,234,567" -- maximumFractionDigits: 2 makes 3.14159 display as "3.14" -- notation: SCIENTIFIC makes 1234 display as "1.234E3" - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**use_grouping** | Optional[bool] | No | If true, show a locale-appropriate number grouping (e.g. thousands for en). | -**convert_negative_to_parenthesis** | Optional[bool] | No | If true, wrap negative numbers in parentheses instead of a minus sign. | -**minimum_integer_digits** | Optional[int] | No | | -**minimum_fraction_digits** | Optional[int] | No | | -**maximum_fraction_digits** | Optional[int] | No | | -**minimum_significant_digits** | Optional[int] | No | | -**maximum_significant_digits** | Optional[int] | No | | -**notation** | Optional[NumberFormatNotation] | No | | -**rounding_mode** | Optional[NumberRoundingMode] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/NumberFormatRatio.md b/docs/v2/Ontologies/models/NumberFormatRatio.md deleted file mode 100644 index 1e4dd1146..000000000 --- a/docs/v2/Ontologies/models/NumberFormatRatio.md +++ /dev/null @@ -1,17 +0,0 @@ -# NumberFormatRatio - -Display the value as a ratio with different scaling factors and suffixes: -- PERCENTAGE: Multiply by 100 and add "%" suffix (0.15 → "15%") -- PER_MILLE: Multiply by 1000 and add "‰" suffix (0.015 → "15‰") -- BASIS_POINTS: Multiply by 10000 and add "bps" suffix (0.0015 → "15bps") - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**ratio_type** | NumberRatioType | Yes | | -**base_format_options** | NumberFormatOptions | Yes | | -**type** | Literal["ratio"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/NumberFormatScale.md b/docs/v2/Ontologies/models/NumberFormatScale.md deleted file mode 100644 index 2bc22b641..000000000 --- a/docs/v2/Ontologies/models/NumberFormatScale.md +++ /dev/null @@ -1,17 +0,0 @@ -# NumberFormatScale - -Scale the numeric value by dividing by the specified factor and append an appropriate suffix. -- THOUSANDS: 1500 displays as "1.5K" -- MILLIONS: 2500000 displays as "2.5M" -- BILLIONS: 3200000000 displays as "3.2B" - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**scale_type** | NumberScaleType | Yes | | -**base_format_options** | NumberFormatOptions | Yes | | -**type** | Literal["scale"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/NumberFormatStandard.md b/docs/v2/Ontologies/models/NumberFormatStandard.md deleted file mode 100644 index abf20270e..000000000 --- a/docs/v2/Ontologies/models/NumberFormatStandard.md +++ /dev/null @@ -1,14 +0,0 @@ -# NumberFormatStandard - -Standard number formatting with configurable options. -This provides basic number formatting without any special units, scaling, or transformations. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**base_format_options** | NumberFormatOptions | Yes | | -**type** | Literal["standard"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/NumberFormatStandardUnit.md b/docs/v2/Ontologies/models/NumberFormatStandardUnit.md deleted file mode 100644 index cbdb2d02d..000000000 --- a/docs/v2/Ontologies/models/NumberFormatStandardUnit.md +++ /dev/null @@ -1,16 +0,0 @@ -# NumberFormatStandardUnit - -Format numbers with standard units supported by Intl.NumberFormat. -Examples: "meter", "kilogram", "celsius", "percent" -Input: 25 with unit "celsius" displays as "25 degrees C" - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**base_format_options** | NumberFormatOptions | Yes | | -**unit** | PropertyTypeReferenceOrStringConstant | Yes | | -**type** | Literal["standardUnit"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/NumberRatioType.md b/docs/v2/Ontologies/models/NumberRatioType.md deleted file mode 100644 index fd6759e9a..000000000 --- a/docs/v2/Ontologies/models/NumberRatioType.md +++ /dev/null @@ -1,16 +0,0 @@ -# NumberRatioType - -Ratio format options for displaying proportional values: -- PERCENTAGE: Multiply by 100 and add "%" suffix -- PER_MILLE: Multiply by 1000 and add "‰" suffix -- BASIS_POINTS: Multiply by 10000 and add "bps" suffix - - -| **Value** | -| --------- | -| `"PERCENTAGE"` | -| `"PER_MILLE"` | -| `"BASIS_POINTS"` | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/NumberRoundingMode.md b/docs/v2/Ontologies/models/NumberRoundingMode.md deleted file mode 100644 index 2771bea02..000000000 --- a/docs/v2/Ontologies/models/NumberRoundingMode.md +++ /dev/null @@ -1,16 +0,0 @@ -# NumberRoundingMode - -Number rounding behavior: -- CEIL: Always round up (3.1 becomes 4) -- FLOOR: Always round down (3.9 becomes 3) -- ROUND_CLOSEST: Round to nearest (3.4 becomes 3, 3.6 becomes 4) - - -| **Value** | -| --------- | -| `"CEIL"` | -| `"FLOOR"` | -| `"ROUND_CLOSEST"` | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/NumberScaleType.md b/docs/v2/Ontologies/models/NumberScaleType.md deleted file mode 100644 index 0f4450ab6..000000000 --- a/docs/v2/Ontologies/models/NumberScaleType.md +++ /dev/null @@ -1,16 +0,0 @@ -# NumberScaleType - -Scale factor options for large numbers: -- THOUSANDS: Divide by 1,000 and add "K" suffix -- MILLIONS: Divide by 1,000,000 and add "M" suffix -- BILLIONS: Divide by 1,000,000,000 and add "B" suffix - - -| **Value** | -| --------- | -| `"THOUSANDS"` | -| `"MILLIONS"` | -| `"BILLIONS"` | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ObjectEdit.md b/docs/v2/Ontologies/models/ObjectEdit.md deleted file mode 100644 index 1866ae75c..000000000 --- a/docs/v2/Ontologies/models/ObjectEdit.md +++ /dev/null @@ -1,19 +0,0 @@ -# ObjectEdit - -ObjectEdit - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -ModifyObject | modifyObject -DeleteObject | deleteObject -AddObject | addObject -DeleteLink | deleteLink -AddLink | addLink - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ObjectEdits.md b/docs/v2/Ontologies/models/ObjectEdits.md deleted file mode 100644 index c5f29542b..000000000 --- a/docs/v2/Ontologies/models/ObjectEdits.md +++ /dev/null @@ -1,17 +0,0 @@ -# ObjectEdits - -ObjectEdits - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**edits** | List[ObjectEdit] | Yes | | -**added_object_count** | int | Yes | | -**modified_objects_count** | int | Yes | | -**deleted_objects_count** | int | Yes | | -**added_links_count** | int | Yes | | -**deleted_links_count** | int | Yes | | -**type** | Literal["edits"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ObjectParameterPropertyArgument.md b/docs/v2/Ontologies/models/ObjectParameterPropertyArgument.md deleted file mode 100644 index 9a77eb274..000000000 --- a/docs/v2/Ontologies/models/ObjectParameterPropertyArgument.md +++ /dev/null @@ -1,13 +0,0 @@ -# ObjectParameterPropertyArgument - -Represents an object parameter property argument in a logic rule. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**parameter_id** | ParameterId | Yes | | -**property_type_api_name** | PropertyTypeApiName | Yes | | -**type** | Literal["objectParameterPropertyValue"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ObjectPropertyType.md b/docs/v2/Ontologies/models/ObjectPropertyType.md deleted file mode 100644 index fa68a296f..000000000 --- a/docs/v2/Ontologies/models/ObjectPropertyType.md +++ /dev/null @@ -1,37 +0,0 @@ -# ObjectPropertyType - -A union of all the types supported by Ontology Object properties. - - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -DateType | date -StructType | struct -StringType | string -ByteType | byte -DoubleType | double -GeoPointType | geopoint -GeotimeSeriesReferenceType | geotimeSeriesReference -IntegerType | integer -FloatType | float -GeoShapeType | geoshape -LongType | long -BooleanType | boolean -CipherTextType | cipherText -MarkingType | marking -AttachmentType | attachment -MediaReferenceType | mediaReference -TimeseriesType | timeseries -OntologyObjectArrayType | array -ShortType | short -VectorType | vector -DecimalType | decimal -TimestampType | timestamp - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ObjectPropertyValueConstraint.md b/docs/v2/Ontologies/models/ObjectPropertyValueConstraint.md deleted file mode 100644 index f272270ab..000000000 --- a/docs/v2/Ontologies/models/ObjectPropertyValueConstraint.md +++ /dev/null @@ -1,12 +0,0 @@ -# ObjectPropertyValueConstraint - -The parameter value must be a property value of an object found within an object set. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["objectPropertyValue"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ObjectQueryResultConstraint.md b/docs/v2/Ontologies/models/ObjectQueryResultConstraint.md deleted file mode 100644 index e29b0a5e6..000000000 --- a/docs/v2/Ontologies/models/ObjectQueryResultConstraint.md +++ /dev/null @@ -1,12 +0,0 @@ -# ObjectQueryResultConstraint - -The parameter value must be the primary key of an object found within an object set. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["objectQueryResult"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ObjectRid.md b/docs/v2/Ontologies/models/ObjectRid.md deleted file mode 100644 index 288a09b22..000000000 --- a/docs/v2/Ontologies/models/ObjectRid.md +++ /dev/null @@ -1,12 +0,0 @@ -# ObjectRid - -The unique resource identifier of an object, useful for interacting with other Foundry APIs. - - -## Type -```python -RID -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ObjectSet.md b/docs/v2/Ontologies/models/ObjectSet.md deleted file mode 100644 index c7e7de285..000000000 --- a/docs/v2/Ontologies/models/ObjectSet.md +++ /dev/null @@ -1,29 +0,0 @@ -# ObjectSet - -Represents the definition of an `ObjectSet` in the `Ontology`. - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -ObjectSetSearchAroundType | searchAround -ObjectSetStaticType | static -ObjectSetIntersectionType | intersect -ObjectSetWithPropertiesType | withProperties -ObjectSetInterfaceLinkSearchAroundType | interfaceLinkSearchAround -ObjectSetSubtractType | subtract -ObjectSetNearestNeighborsType | nearestNeighbors -ObjectSetUnionType | union -ObjectSetAsTypeType | asType -ObjectSetMethodInputType | methodInput -ObjectSetReferenceType | reference -ObjectSetFilterType | filter -ObjectSetInterfaceBaseType | interfaceBase -ObjectSetAsBaseObjectTypesType | asBaseObjectTypes -ObjectSetBaseType | base - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ObjectSetAsBaseObjectTypesType.md b/docs/v2/Ontologies/models/ObjectSetAsBaseObjectTypesType.md deleted file mode 100644 index a9fa8a191..000000000 --- a/docs/v2/Ontologies/models/ObjectSetAsBaseObjectTypesType.md +++ /dev/null @@ -1,14 +0,0 @@ -# ObjectSetAsBaseObjectTypesType - -Casts the objects in the object set to their base type and thus ensures objects are returned with all of their -properties in the resulting object set, not just the properties that implement interface properties. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**object_set** | ObjectSet | Yes | | -**type** | Literal["asBaseObjectTypes"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ObjectSetAsTypeType.md b/docs/v2/Ontologies/models/ObjectSetAsTypeType.md deleted file mode 100644 index 1f4b98712..000000000 --- a/docs/v2/Ontologies/models/ObjectSetAsTypeType.md +++ /dev/null @@ -1,16 +0,0 @@ -# ObjectSetAsTypeType - -Casts an object set to a specified object type or interface type API name. Any object whose object type does -not match the object type provided or implement the interface type provided will be dropped from the resulting -object set. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**entity_type** | str | Yes | An object type or interface type API name. | -**object_set** | ObjectSet | Yes | | -**type** | Literal["asType"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ObjectSetBaseType.md b/docs/v2/Ontologies/models/ObjectSetBaseType.md deleted file mode 100644 index eaa56abbc..000000000 --- a/docs/v2/Ontologies/models/ObjectSetBaseType.md +++ /dev/null @@ -1,12 +0,0 @@ -# ObjectSetBaseType - -ObjectSetBaseType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**object_type** | str | Yes | The API name of the object type. | -**type** | Literal["base"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ObjectSetFilterType.md b/docs/v2/Ontologies/models/ObjectSetFilterType.md deleted file mode 100644 index f0e022da4..000000000 --- a/docs/v2/Ontologies/models/ObjectSetFilterType.md +++ /dev/null @@ -1,13 +0,0 @@ -# ObjectSetFilterType - -ObjectSetFilterType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**object_set** | ObjectSet | Yes | | -**where** | SearchJsonQueryV2 | Yes | | -**type** | Literal["filter"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ObjectSetInterfaceBaseType.md b/docs/v2/Ontologies/models/ObjectSetInterfaceBaseType.md deleted file mode 100644 index 8adb60bc2..000000000 --- a/docs/v2/Ontologies/models/ObjectSetInterfaceBaseType.md +++ /dev/null @@ -1,13 +0,0 @@ -# ObjectSetInterfaceBaseType - -ObjectSetInterfaceBaseType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**interface_type** | str | Yes | An object set with objects that implement the interface with the given interface API name. The objects in the object set will only have properties that implement properties of the given interface, unless you set the includeAllBaseObjectProperties flag. | -**include_all_base_object_properties** | Optional[bool] | No | A flag that will return all of the underlying object properties for the objects that implement the interface. This includes properties that don't explicitly implement an SPT on the interface. | -**type** | Literal["interfaceBase"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ObjectSetInterfaceLinkSearchAroundType.md b/docs/v2/Ontologies/models/ObjectSetInterfaceLinkSearchAroundType.md deleted file mode 100644 index 1e7ddd8bd..000000000 --- a/docs/v2/Ontologies/models/ObjectSetInterfaceLinkSearchAroundType.md +++ /dev/null @@ -1,13 +0,0 @@ -# ObjectSetInterfaceLinkSearchAroundType - -ObjectSetInterfaceLinkSearchAroundType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**object_set** | ObjectSet | Yes | | -**interface_link** | InterfaceLinkTypeApiName | Yes | | -**type** | Literal["interfaceLinkSearchAround"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ObjectSetIntersectionType.md b/docs/v2/Ontologies/models/ObjectSetIntersectionType.md deleted file mode 100644 index 2c2caf091..000000000 --- a/docs/v2/Ontologies/models/ObjectSetIntersectionType.md +++ /dev/null @@ -1,12 +0,0 @@ -# ObjectSetIntersectionType - -ObjectSetIntersectionType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**object_sets** | List[ObjectSet] | Yes | | -**type** | Literal["intersect"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ObjectSetMethodInputType.md b/docs/v2/Ontologies/models/ObjectSetMethodInputType.md deleted file mode 100644 index 75a26dc73..000000000 --- a/docs/v2/Ontologies/models/ObjectSetMethodInputType.md +++ /dev/null @@ -1,14 +0,0 @@ -# ObjectSetMethodInputType - -ObjectSet which is the root of a MethodObjectSet definition. - -This feature is experimental and not yet generally available. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["methodInput"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ObjectSetNearestNeighborsType.md b/docs/v2/Ontologies/models/ObjectSetNearestNeighborsType.md deleted file mode 100644 index 73baedea5..000000000 --- a/docs/v2/Ontologies/models/ObjectSetNearestNeighborsType.md +++ /dev/null @@ -1,25 +0,0 @@ -# ObjectSetNearestNeighborsType - -ObjectSet containing the top `numNeighbors` objects with `propertyIdentifier` nearest to the input vector or -text. This can only be performed on a property with type vector that has been configured to be searched with -approximate nearest neighbors using a similarity function configured in the Ontology. - -A non-zero score for each resulting object is returned when the `orderType` in the `orderBy` field is set to -`relevance`. Note that: - - Scores will not be returned if a nearestNeighbors object set is composed through union, subtraction - or intersection with non-nearestNeighbors object sets. - - If results have scores, the order of the scores will be decreasing (duplicate scores are possible). - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**object_set** | ObjectSet | Yes | | -**property_identifier** | PropertyIdentifier | Yes | | -**num_neighbors** | int | Yes | The number of objects to return. If the number of documents in the objectType is less than the provided value, all objects will be returned. This value is limited to 1 <= numNeighbors <= 500. | -**similarity_threshold** | Optional[float] | No | The similarity threshold results must be above to be included in the returned in the object set. 0 <= Threshold <= 1. Where 1 is identical and 0 is least similar. | -**query** | NearestNeighborsQuery | Yes | | -**type** | Literal["nearestNeighbors"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ObjectSetReferenceType.md b/docs/v2/Ontologies/models/ObjectSetReferenceType.md deleted file mode 100644 index 7322db394..000000000 --- a/docs/v2/Ontologies/models/ObjectSetReferenceType.md +++ /dev/null @@ -1,12 +0,0 @@ -# ObjectSetReferenceType - -ObjectSetReferenceType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**reference** | ObjectSetRid | Yes | | -**type** | Literal["reference"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ObjectSetRid.md b/docs/v2/Ontologies/models/ObjectSetRid.md deleted file mode 100644 index aa910c888..000000000 --- a/docs/v2/Ontologies/models/ObjectSetRid.md +++ /dev/null @@ -1,11 +0,0 @@ -# ObjectSetRid - -ObjectSetRid - -## Type -```python -RID -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ObjectSetSearchAroundType.md b/docs/v2/Ontologies/models/ObjectSetSearchAroundType.md deleted file mode 100644 index 50a37503e..000000000 --- a/docs/v2/Ontologies/models/ObjectSetSearchAroundType.md +++ /dev/null @@ -1,13 +0,0 @@ -# ObjectSetSearchAroundType - -ObjectSetSearchAroundType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**object_set** | ObjectSet | Yes | | -**link** | LinkTypeApiName | Yes | | -**type** | Literal["searchAround"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ObjectSetStaticType.md b/docs/v2/Ontologies/models/ObjectSetStaticType.md deleted file mode 100644 index c520f9b27..000000000 --- a/docs/v2/Ontologies/models/ObjectSetStaticType.md +++ /dev/null @@ -1,12 +0,0 @@ -# ObjectSetStaticType - -ObjectSetStaticType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**objects** | List[ObjectRid] | Yes | | -**type** | Literal["static"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ObjectSetSubtractType.md b/docs/v2/Ontologies/models/ObjectSetSubtractType.md deleted file mode 100644 index 690e7ec54..000000000 --- a/docs/v2/Ontologies/models/ObjectSetSubtractType.md +++ /dev/null @@ -1,12 +0,0 @@ -# ObjectSetSubtractType - -ObjectSetSubtractType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**object_sets** | List[ObjectSet] | Yes | | -**type** | Literal["subtract"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ObjectSetUnionType.md b/docs/v2/Ontologies/models/ObjectSetUnionType.md deleted file mode 100644 index bac2f4f7c..000000000 --- a/docs/v2/Ontologies/models/ObjectSetUnionType.md +++ /dev/null @@ -1,12 +0,0 @@ -# ObjectSetUnionType - -ObjectSetUnionType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**object_sets** | List[ObjectSet] | Yes | | -**type** | Literal["union"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ObjectSetWithPropertiesType.md b/docs/v2/Ontologies/models/ObjectSetWithPropertiesType.md deleted file mode 100644 index 569a50a75..000000000 --- a/docs/v2/Ontologies/models/ObjectSetWithPropertiesType.md +++ /dev/null @@ -1,16 +0,0 @@ -# ObjectSetWithPropertiesType - -ObjectSet which returns objects with additional derived properties. - -This feature is experimental and not yet generally available. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**object_set** | ObjectSet | Yes | | -**derived_properties** | Dict[DerivedPropertyApiName, DerivedPropertyDefinition] | Yes | Map of the name of the derived property to return and its definition | -**type** | Literal["withProperties"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ObjectTypeApiName.md b/docs/v2/Ontologies/models/ObjectTypeApiName.md deleted file mode 100644 index e5f32f969..000000000 --- a/docs/v2/Ontologies/models/ObjectTypeApiName.md +++ /dev/null @@ -1,13 +0,0 @@ -# ObjectTypeApiName - -The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the -`List object types` endpoint or check the **Ontology Manager**. - - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ObjectTypeEdits.md b/docs/v2/Ontologies/models/ObjectTypeEdits.md deleted file mode 100644 index 5ea25c991..000000000 --- a/docs/v2/Ontologies/models/ObjectTypeEdits.md +++ /dev/null @@ -1,12 +0,0 @@ -# ObjectTypeEdits - -ObjectTypeEdits - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**edited_object_types** | List[ObjectTypeApiName] | Yes | | -**type** | Literal["largeScaleEdits"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ObjectTypeFullMetadata.md b/docs/v2/Ontologies/models/ObjectTypeFullMetadata.md deleted file mode 100644 index f59dd987c..000000000 --- a/docs/v2/Ontologies/models/ObjectTypeFullMetadata.md +++ /dev/null @@ -1,15 +0,0 @@ -# ObjectTypeFullMetadata - -ObjectTypeFullMetadata - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**object_type** | ObjectTypeV2 | Yes | | -**link_types** | List[LinkTypeSideV2] | Yes | | -**implements_interfaces** | List[InterfaceTypeApiName] | Yes | A list of interfaces that this object type implements. | -**implements_interfaces2** | Dict[InterfaceTypeApiName, ObjectTypeInterfaceImplementation] | Yes | A list of interfaces that this object type implements and how it implements them. | -**shared_property_type_mapping** | Dict[SharedPropertyTypeApiName, PropertyApiName] | Yes | A map from shared property type API name to backing local property API name for the shared property types present on this object type. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ObjectTypeId.md b/docs/v2/Ontologies/models/ObjectTypeId.md deleted file mode 100644 index 2544a3cb8..000000000 --- a/docs/v2/Ontologies/models/ObjectTypeId.md +++ /dev/null @@ -1,11 +0,0 @@ -# ObjectTypeId - -The unique identifier (ID) for an object type. This can be viewed in [Ontology Manager](https://palantir.com/docs/foundry/ontology-manager/overview/). - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ObjectTypeInterfaceImplementation.md b/docs/v2/Ontologies/models/ObjectTypeInterfaceImplementation.md deleted file mode 100644 index ccce344df..000000000 --- a/docs/v2/Ontologies/models/ObjectTypeInterfaceImplementation.md +++ /dev/null @@ -1,13 +0,0 @@ -# ObjectTypeInterfaceImplementation - -ObjectTypeInterfaceImplementation - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**properties** | Dict[SharedPropertyTypeApiName, PropertyApiName] | Yes | | -**properties_v2** | Dict[InterfacePropertyApiName, InterfacePropertyTypeImplementation] | Yes | | -**links** | Dict[InterfaceLinkTypeApiName, List[LinkTypeApiName]] | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ObjectTypeRid.md b/docs/v2/Ontologies/models/ObjectTypeRid.md deleted file mode 100644 index c4904e5fc..000000000 --- a/docs/v2/Ontologies/models/ObjectTypeRid.md +++ /dev/null @@ -1,11 +0,0 @@ -# ObjectTypeRid - -The unique resource identifier of an object type, useful for interacting with other Foundry APIs. - -## Type -```python -RID -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ObjectTypeV2.md b/docs/v2/Ontologies/models/ObjectTypeV2.md deleted file mode 100644 index b5a9d9417..000000000 --- a/docs/v2/Ontologies/models/ObjectTypeV2.md +++ /dev/null @@ -1,21 +0,0 @@ -# ObjectTypeV2 - -Represents an object type in the Ontology. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**api_name** | ObjectTypeApiName | Yes | | -**display_name** | DisplayName | Yes | | -**status** | ReleaseStatus | Yes | | -**description** | Optional[str] | No | The description of the object type. | -**plural_display_name** | str | Yes | The plural display name of the object type. | -**icon** | Icon | Yes | | -**primary_key** | PropertyApiName | Yes | | -**properties** | Dict[PropertyApiName, PropertyV2] | Yes | A map of the properties of the object type. | -**rid** | ObjectTypeRid | Yes | | -**title_property** | PropertyApiName | Yes | | -**visibility** | Optional[ObjectTypeVisibility] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ObjectTypeVisibility.md b/docs/v2/Ontologies/models/ObjectTypeVisibility.md deleted file mode 100644 index 883926665..000000000 --- a/docs/v2/Ontologies/models/ObjectTypeVisibility.md +++ /dev/null @@ -1,12 +0,0 @@ -# ObjectTypeVisibility - -The suggested visibility of the object type. - -| **Value** | -| --------- | -| `"NORMAL"` | -| `"PROMINENT"` | -| `"HIDDEN"` | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/OneOfConstraint.md b/docs/v2/Ontologies/models/OneOfConstraint.md deleted file mode 100644 index 2b875e155..000000000 --- a/docs/v2/Ontologies/models/OneOfConstraint.md +++ /dev/null @@ -1,14 +0,0 @@ -# OneOfConstraint - -The parameter has a manually predefined set of options. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**options** | List[ParameterOption] | Yes | | -**other_values_allowed** | bool | Yes | A flag denoting whether custom, user provided values will be considered valid. This is configured via the **Allowed "Other" value** toggle in the **Ontology Manager**. | -**type** | Literal["oneOf"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/OntologyApiName.md b/docs/v2/Ontologies/models/OntologyApiName.md deleted file mode 100644 index d33c88b22..000000000 --- a/docs/v2/Ontologies/models/OntologyApiName.md +++ /dev/null @@ -1,11 +0,0 @@ -# OntologyApiName - -OntologyApiName - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/OntologyArrayType.md b/docs/v2/Ontologies/models/OntologyArrayType.md deleted file mode 100644 index e3a3db842..000000000 --- a/docs/v2/Ontologies/models/OntologyArrayType.md +++ /dev/null @@ -1,12 +0,0 @@ -# OntologyArrayType - -OntologyArrayType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**item_type** | OntologyDataType | Yes | | -**type** | Literal["array"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/OntologyDataType.md b/docs/v2/Ontologies/models/OntologyDataType.md deleted file mode 100644 index fa382d602..000000000 --- a/docs/v2/Ontologies/models/OntologyDataType.md +++ /dev/null @@ -1,37 +0,0 @@ -# OntologyDataType - -A union of all the primitive types used by Palantir's Ontology-based products. - - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -DateType | date -OntologyStructType | struct -OntologySetType | set -StringType | string -ByteType | byte -DoubleType | double -IntegerType | integer -FloatType | float -AnyType | any -LongType | long -BooleanType | boolean -CipherTextType | cipherText -MarkingType | marking -UnsupportedType | unsupported -OntologyArrayType | array -OntologyObjectSetType | objectSet -BinaryType | binary -ShortType | short -DecimalType | decimal -OntologyMapType | map -TimestampType | timestamp -OntologyObjectType | object - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/OntologyFullMetadata.md b/docs/v2/Ontologies/models/OntologyFullMetadata.md deleted file mode 100644 index 2aa505d54..000000000 --- a/docs/v2/Ontologies/models/OntologyFullMetadata.md +++ /dev/null @@ -1,18 +0,0 @@ -# OntologyFullMetadata - -OntologyFullMetadata - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**ontology** | OntologyV2 | Yes | | -**object_types** | Dict[ObjectTypeApiName, ObjectTypeFullMetadata] | Yes | | -**action_types** | Dict[ActionTypeApiName, ActionTypeV2] | Yes | | -**query_types** | Dict[VersionedQueryTypeApiName, QueryTypeV2] | Yes | | -**interface_types** | Dict[InterfaceTypeApiName, InterfaceType] | Yes | | -**shared_property_types** | Dict[SharedPropertyTypeApiName, SharedPropertyType] | Yes | | -**branch** | Optional[BranchMetadata] | No | | -**value_types** | Dict[ValueTypeApiName, OntologyValueType] | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/OntologyIdentifier.md b/docs/v2/Ontologies/models/OntologyIdentifier.md deleted file mode 100644 index bfcb75c25..000000000 --- a/docs/v2/Ontologies/models/OntologyIdentifier.md +++ /dev/null @@ -1,13 +0,0 @@ -# OntologyIdentifier - -The API name or RID of the Ontology. To find the API name or RID, use the **List Ontologies** endpoint or -check the **Ontology Manager**. - - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/OntologyInterfaceObjectSetType.md b/docs/v2/Ontologies/models/OntologyInterfaceObjectSetType.md deleted file mode 100644 index 9cf5bc543..000000000 --- a/docs/v2/Ontologies/models/OntologyInterfaceObjectSetType.md +++ /dev/null @@ -1,12 +0,0 @@ -# OntologyInterfaceObjectSetType - -OntologyInterfaceObjectSetType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**interface_type_api_name** | InterfaceTypeApiName | Yes | | -**type** | Literal["interfaceObjectSet"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/OntologyInterfaceObjectType.md b/docs/v2/Ontologies/models/OntologyInterfaceObjectType.md deleted file mode 100644 index 5c79450bf..000000000 --- a/docs/v2/Ontologies/models/OntologyInterfaceObjectType.md +++ /dev/null @@ -1,12 +0,0 @@ -# OntologyInterfaceObjectType - -OntologyInterfaceObjectType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**interface_type_api_name** | Optional[InterfaceTypeApiName] | No | | -**type** | Literal["interfaceObject"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/OntologyMapType.md b/docs/v2/Ontologies/models/OntologyMapType.md deleted file mode 100644 index dbf9ef431..000000000 --- a/docs/v2/Ontologies/models/OntologyMapType.md +++ /dev/null @@ -1,13 +0,0 @@ -# OntologyMapType - -OntologyMapType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**key_type** | OntologyDataType | Yes | | -**value_type** | OntologyDataType | Yes | | -**type** | Literal["map"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/OntologyObjectArrayType.md b/docs/v2/Ontologies/models/OntologyObjectArrayType.md deleted file mode 100644 index 34084f222..000000000 --- a/docs/v2/Ontologies/models/OntologyObjectArrayType.md +++ /dev/null @@ -1,13 +0,0 @@ -# OntologyObjectArrayType - -OntologyObjectArrayType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**sub_type** | ObjectPropertyType | Yes | | -**reducers** | List[OntologyObjectArrayTypeReducer] | Yes | If non-empty, this property can be reduced to a single value of the subtype. The reducers are applied in order to determine a winning value. The array can be loaded as a reduced value or as the full array in an object set. | -**type** | Literal["array"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/OntologyObjectArrayTypeReducer.md b/docs/v2/Ontologies/models/OntologyObjectArrayTypeReducer.md deleted file mode 100644 index 82db9e2b6..000000000 --- a/docs/v2/Ontologies/models/OntologyObjectArrayTypeReducer.md +++ /dev/null @@ -1,12 +0,0 @@ -# OntologyObjectArrayTypeReducer - -OntologyObjectArrayTypeReducer - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**direction** | OntologyObjectArrayTypeReducerSortDirection | Yes | | -**field** | Optional[StructFieldApiName] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/OntologyObjectArrayTypeReducerSortDirection.md b/docs/v2/Ontologies/models/OntologyObjectArrayTypeReducerSortDirection.md deleted file mode 100644 index 50cba0489..000000000 --- a/docs/v2/Ontologies/models/OntologyObjectArrayTypeReducerSortDirection.md +++ /dev/null @@ -1,11 +0,0 @@ -# OntologyObjectArrayTypeReducerSortDirection - -OntologyObjectArrayTypeReducerSortDirection - -| **Value** | -| --------- | -| `"ASCENDING_NULLS_LAST"` | -| `"DESCENDING_NULLS_LAST"` | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/OntologyObjectSetType.md b/docs/v2/Ontologies/models/OntologyObjectSetType.md deleted file mode 100644 index 080f1a5b1..000000000 --- a/docs/v2/Ontologies/models/OntologyObjectSetType.md +++ /dev/null @@ -1,13 +0,0 @@ -# OntologyObjectSetType - -OntologyObjectSetType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**object_api_name** | Optional[ObjectTypeApiName] | No | | -**object_type_api_name** | Optional[ObjectTypeApiName] | No | | -**type** | Literal["objectSet"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/OntologyObjectType.md b/docs/v2/Ontologies/models/OntologyObjectType.md deleted file mode 100644 index bf276e6fd..000000000 --- a/docs/v2/Ontologies/models/OntologyObjectType.md +++ /dev/null @@ -1,13 +0,0 @@ -# OntologyObjectType - -OntologyObjectType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**object_api_name** | ObjectTypeApiName | Yes | | -**object_type_api_name** | ObjectTypeApiName | Yes | | -**type** | Literal["object"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/OntologyObjectTypeReferenceType.md b/docs/v2/Ontologies/models/OntologyObjectTypeReferenceType.md deleted file mode 100644 index 9fdc02c46..000000000 --- a/docs/v2/Ontologies/models/OntologyObjectTypeReferenceType.md +++ /dev/null @@ -1,11 +0,0 @@ -# OntologyObjectTypeReferenceType - -OntologyObjectTypeReferenceType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["objectType"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/OntologyObjectV2.md b/docs/v2/Ontologies/models/OntologyObjectV2.md deleted file mode 100644 index faa66a968..000000000 --- a/docs/v2/Ontologies/models/OntologyObjectV2.md +++ /dev/null @@ -1,11 +0,0 @@ -# OntologyObjectV2 - -Represents an object in the Ontology. - -## Type -```python -Dict[PropertyApiName, PropertyValue] -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/OntologyRid.md b/docs/v2/Ontologies/models/OntologyRid.md deleted file mode 100644 index c38f5a6c9..000000000 --- a/docs/v2/Ontologies/models/OntologyRid.md +++ /dev/null @@ -1,13 +0,0 @@ -# OntologyRid - -The unique Resource Identifier (RID) of the Ontology. To look up your Ontology RID, please use the -`List ontologies` endpoint or check the **Ontology Manager**. - - -## Type -```python -RID -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/OntologySetType.md b/docs/v2/Ontologies/models/OntologySetType.md deleted file mode 100644 index 8954a00e1..000000000 --- a/docs/v2/Ontologies/models/OntologySetType.md +++ /dev/null @@ -1,12 +0,0 @@ -# OntologySetType - -OntologySetType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**item_type** | OntologyDataType | Yes | | -**type** | Literal["set"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/OntologyStructField.md b/docs/v2/Ontologies/models/OntologyStructField.md deleted file mode 100644 index 8796f1b06..000000000 --- a/docs/v2/Ontologies/models/OntologyStructField.md +++ /dev/null @@ -1,13 +0,0 @@ -# OntologyStructField - -OntologyStructField - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**name** | StructFieldName | Yes | | -**field_type** | OntologyDataType | Yes | | -**required** | bool | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/OntologyStructType.md b/docs/v2/Ontologies/models/OntologyStructType.md deleted file mode 100644 index 15031de7b..000000000 --- a/docs/v2/Ontologies/models/OntologyStructType.md +++ /dev/null @@ -1,12 +0,0 @@ -# OntologyStructType - -OntologyStructType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**fields** | List[OntologyStructField] | Yes | | -**type** | Literal["struct"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/OntologyTransactionId.md b/docs/v2/Ontologies/models/OntologyTransactionId.md deleted file mode 100644 index 7d38d534c..000000000 --- a/docs/v2/Ontologies/models/OntologyTransactionId.md +++ /dev/null @@ -1,11 +0,0 @@ -# OntologyTransactionId - -The ID identifying a transaction. - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/OntologyV2.md b/docs/v2/Ontologies/models/OntologyV2.md deleted file mode 100644 index d4add6fa2..000000000 --- a/docs/v2/Ontologies/models/OntologyV2.md +++ /dev/null @@ -1,14 +0,0 @@ -# OntologyV2 - -Metadata about an Ontology. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**api_name** | OntologyApiName | Yes | | -**display_name** | DisplayName | Yes | | -**description** | str | Yes | | -**rid** | OntologyRid | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/OntologyValueType.md b/docs/v2/Ontologies/models/OntologyValueType.md deleted file mode 100644 index fc5fedf20..000000000 --- a/docs/v2/Ontologies/models/OntologyValueType.md +++ /dev/null @@ -1,18 +0,0 @@ -# OntologyValueType - -OntologyValueType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**api_name** | ValueTypeApiName | Yes | | -**display_name** | DisplayName | Yes | | -**description** | Optional[str] | No | | -**rid** | ValueTypeRid | Yes | | -**status** | Optional[ValueTypeStatus] | No | | -**field_type** | ValueTypeFieldType | Yes | | -**version** | str | Yes | | -**constraints** | List[ValueTypeConstraint] | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/OrQueryV2.md b/docs/v2/Ontologies/models/OrQueryV2.md deleted file mode 100644 index 86536bb32..000000000 --- a/docs/v2/Ontologies/models/OrQueryV2.md +++ /dev/null @@ -1,12 +0,0 @@ -# OrQueryV2 - -Returns objects where at least 1 query is satisfied. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**value** | List[SearchJsonQueryV2] | Yes | | -**type** | Literal["or"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/OrderBy.md b/docs/v2/Ontologies/models/OrderBy.md deleted file mode 100644 index 451c80e89..000000000 --- a/docs/v2/Ontologies/models/OrderBy.md +++ /dev/null @@ -1,21 +0,0 @@ -# OrderBy - -A command representing the list of properties to order by. Properties should be delimited by commas and -prefixed by `p` or `properties`. The format expected format is -`orderBy=properties.{property}:{sortDirection},properties.{property}:{sortDirection}...` - -By default, the ordering for a property is ascending, and this can be explicitly specified by appending -`:asc` (for ascending) or `:desc` (for descending). - -Example: use `orderBy=properties.lastName:asc` to order by a single property, -`orderBy=properties.lastName,properties.firstName,properties.age:desc` to order by multiple properties. -You may also use the shorthand `p` instead of `properties` such as `orderBy=p.lastName:asc`. - - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/OrderByDirection.md b/docs/v2/Ontologies/models/OrderByDirection.md deleted file mode 100644 index f7f92da9e..000000000 --- a/docs/v2/Ontologies/models/OrderByDirection.md +++ /dev/null @@ -1,11 +0,0 @@ -# OrderByDirection - -OrderByDirection - -| **Value** | -| --------- | -| `"ASC"` | -| `"DESC"` | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ParameterEvaluatedConstraint.md b/docs/v2/Ontologies/models/ParameterEvaluatedConstraint.md deleted file mode 100644 index 839d0a0c4..000000000 --- a/docs/v2/Ontologies/models/ParameterEvaluatedConstraint.md +++ /dev/null @@ -1,42 +0,0 @@ -# ParameterEvaluatedConstraint - -A constraint that an action parameter value must satisfy in order to be considered valid. -Constraints can be configured on action parameters in the **Ontology Manager**. -Applicable constraints are determined dynamically based on parameter inputs. -Parameter values are evaluated against the final set of constraints. - -The type of the constraint. -| Type | Description | -|-----------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| `arraySize` | The parameter expects an array of values and the size of the array must fall within the defined range. | -| `groupMember` | The parameter value must be the user id of a member belonging to at least one of the groups defined by the constraint. | -| `objectPropertyValue` | The parameter value must be a property value of an object found within an object set. | -| `objectQueryResult` | The parameter value must be the primary key of an object found within an object set. | -| `oneOf` | The parameter has a manually predefined set of options. | -| `range` | The parameter value must be within the defined range. | -| `stringLength` | The parameter value must have a length within the defined range. | -| `stringRegexMatch` | The parameter value must match a predefined regular expression. | -| `unevaluable` | The parameter cannot be evaluated because it depends on another parameter or object set that can't be evaluated. This can happen when a parameter's allowed values are defined by another parameter that is missing or invalid. | - - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -StructEvaluatedConstraint | struct -OneOfConstraint | oneOf -ArrayEvaluatedConstraint | array -GroupMemberConstraint | groupMember -ObjectPropertyValueConstraint | objectPropertyValue -RangeConstraint | range -ArraySizeConstraint | arraySize -ObjectQueryResultConstraint | objectQueryResult -StringLengthConstraint | stringLength -StringRegexMatchConstraint | stringRegexMatch -UnevaluableConstraint | unevaluable - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ParameterEvaluationResult.md b/docs/v2/Ontologies/models/ParameterEvaluationResult.md deleted file mode 100644 index 0881520b3..000000000 --- a/docs/v2/Ontologies/models/ParameterEvaluationResult.md +++ /dev/null @@ -1,13 +0,0 @@ -# ParameterEvaluationResult - -Represents the validity of a parameter against the configured constraints. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**result** | ValidationResult | Yes | | -**evaluated_constraints** | List[ParameterEvaluatedConstraint] | Yes | | -**required** | bool | Yes | Represents whether the parameter is a required input to the action. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ParameterId.md b/docs/v2/Ontologies/models/ParameterId.md deleted file mode 100644 index b6c2637d9..000000000 --- a/docs/v2/Ontologies/models/ParameterId.md +++ /dev/null @@ -1,13 +0,0 @@ -# ParameterId - -The unique identifier of the parameter. Parameters are used as inputs when an action or query is applied. -Parameters can be viewed and managed in the **Ontology Manager**. - - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ParameterIdArgument.md b/docs/v2/Ontologies/models/ParameterIdArgument.md deleted file mode 100644 index 0acf2246f..000000000 --- a/docs/v2/Ontologies/models/ParameterIdArgument.md +++ /dev/null @@ -1,12 +0,0 @@ -# ParameterIdArgument - -Represents a parameter ID argument in a logic rule. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**parameter_id** | ParameterId | Yes | | -**type** | Literal["parameterId"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ParameterOption.md b/docs/v2/Ontologies/models/ParameterOption.md deleted file mode 100644 index f81f9cdb1..000000000 --- a/docs/v2/Ontologies/models/ParameterOption.md +++ /dev/null @@ -1,13 +0,0 @@ -# ParameterOption - -A possible value for the parameter. This is defined in the **Ontology Manager** by Actions admins. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**display_name** | Optional[DisplayName] | No | | -**value** | Optional[Any] | No | An allowed configured value for a parameter within an action. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/Plaintext.md b/docs/v2/Ontologies/models/Plaintext.md deleted file mode 100644 index 2172fbe85..000000000 --- a/docs/v2/Ontologies/models/Plaintext.md +++ /dev/null @@ -1,11 +0,0 @@ -# Plaintext - -Plaintext - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/PolygonValue.md b/docs/v2/Ontologies/models/PolygonValue.md deleted file mode 100644 index b61e30b96..000000000 --- a/docs/v2/Ontologies/models/PolygonValue.md +++ /dev/null @@ -1,11 +0,0 @@ -# PolygonValue - -PolygonValue - -## Type -```python -Polygon -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/PostTransactionEditsRequest.md b/docs/v2/Ontologies/models/PostTransactionEditsRequest.md deleted file mode 100644 index 7a4b2fb16..000000000 --- a/docs/v2/Ontologies/models/PostTransactionEditsRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# PostTransactionEditsRequest - -The request payload for staging edits to a transaction. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**edits** | List[TransactionEdit] | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/PostTransactionEditsResponse.md b/docs/v2/Ontologies/models/PostTransactionEditsResponse.md deleted file mode 100644 index d58c3f2ed..000000000 --- a/docs/v2/Ontologies/models/PostTransactionEditsResponse.md +++ /dev/null @@ -1,10 +0,0 @@ -# PostTransactionEditsResponse - -PostTransactionEditsResponse - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/PreciseDuration.md b/docs/v2/Ontologies/models/PreciseDuration.md deleted file mode 100644 index d40375297..000000000 --- a/docs/v2/Ontologies/models/PreciseDuration.md +++ /dev/null @@ -1,13 +0,0 @@ -# PreciseDuration - -A measurement of duration. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**value** | int | Yes | The duration value. | -**unit** | PreciseTimeUnit | Yes | | -**type** | Literal["duration"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/PreciseTimeUnit.md b/docs/v2/Ontologies/models/PreciseTimeUnit.md deleted file mode 100644 index eb4437a11..000000000 --- a/docs/v2/Ontologies/models/PreciseTimeUnit.md +++ /dev/null @@ -1,15 +0,0 @@ -# PreciseTimeUnit - -The unit of a fixed-width duration. Each day is 24 hours and each week is 7 days. - -| **Value** | -| --------- | -| `"NANOSECONDS"` | -| `"SECONDS"` | -| `"MINUTES"` | -| `"HOURS"` | -| `"DAYS"` | -| `"WEEKS"` | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/PrefixOnLastTokenRule.md b/docs/v2/Ontologies/models/PrefixOnLastTokenRule.md deleted file mode 100644 index aaad267ba..000000000 --- a/docs/v2/Ontologies/models/PrefixOnLastTokenRule.md +++ /dev/null @@ -1,14 +0,0 @@ -# PrefixOnLastTokenRule - -Matches intervals containing all the terms, using exact match for all but the last term, and prefix match for -the last term. Ordering of the terms in the query is preserved. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**query** | str | Yes | | -**type** | Literal["prefixOnLastToken"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/PrimaryKeyValue.md b/docs/v2/Ontologies/models/PrimaryKeyValue.md deleted file mode 100644 index 2d13d3567..000000000 --- a/docs/v2/Ontologies/models/PrimaryKeyValue.md +++ /dev/null @@ -1,11 +0,0 @@ -# PrimaryKeyValue - -Represents the primary key value that is used as a unique identifier for an object. - -## Type -```python -Any -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/PropertyApiName.md b/docs/v2/Ontologies/models/PropertyApiName.md deleted file mode 100644 index ee7e5611d..000000000 --- a/docs/v2/Ontologies/models/PropertyApiName.md +++ /dev/null @@ -1,13 +0,0 @@ -# PropertyApiName - -The name of the property in the API. To find the API name for your property, use the `Get object type` -endpoint or check the **Ontology Manager**. - - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/PropertyApiNameSelector.md b/docs/v2/Ontologies/models/PropertyApiNameSelector.md deleted file mode 100644 index dd0ae8ad4..000000000 --- a/docs/v2/Ontologies/models/PropertyApiNameSelector.md +++ /dev/null @@ -1,12 +0,0 @@ -# PropertyApiNameSelector - -A property api name that references properties to query on. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**api_name** | PropertyApiName | Yes | | -**type** | Literal["property"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/PropertyBooleanFormattingRule.md b/docs/v2/Ontologies/models/PropertyBooleanFormattingRule.md deleted file mode 100644 index 964533a4e..000000000 --- a/docs/v2/Ontologies/models/PropertyBooleanFormattingRule.md +++ /dev/null @@ -1,13 +0,0 @@ -# PropertyBooleanFormattingRule - -Formatting configuration for boolean property values. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**value_if_true** | str | Yes | Value to display if this boolean is true | -**value_if_false** | str | Yes | Value to display if this boolean is false | -**type** | Literal["boolean"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/PropertyDateFormattingRule.md b/docs/v2/Ontologies/models/PropertyDateFormattingRule.md deleted file mode 100644 index c37f44ff0..000000000 --- a/docs/v2/Ontologies/models/PropertyDateFormattingRule.md +++ /dev/null @@ -1,12 +0,0 @@ -# PropertyDateFormattingRule - -Formatting configuration for date property values. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**format** | DatetimeFormat | Yes | | -**type** | Literal["date"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/PropertyFilter.md b/docs/v2/Ontologies/models/PropertyFilter.md deleted file mode 100644 index f2c612bd1..000000000 --- a/docs/v2/Ontologies/models/PropertyFilter.md +++ /dev/null @@ -1,36 +0,0 @@ -# PropertyFilter - -Represents a filter used on properties. - -Endpoints that accept this supports optional parameters that have the form: -`properties.{propertyApiName}.{propertyFilter}={propertyValueEscapedString}` to filter the returned objects. -For instance, you may use `properties.firstName.eq=John` to find objects that contain a property called -"firstName" that has the exact value of "John". - -The following are a list of supported property filters: - -- `properties.{propertyApiName}.contains` - supported on arrays and can be used to filter array properties - that have at least one of the provided values. If multiple query parameters are provided, then objects - that have any of the given values for the specified property will be matched. -- `properties.{propertyApiName}.eq` - used to filter objects that have the exact value for the provided - property. If multiple query parameters are provided, then objects that have any of the given values - will be matched. For instance, if the user provides a request by doing - `?properties.firstName.eq=John&properties.firstName.eq=Anna`, then objects that have a firstName property - of either John or Anna will be matched. This filter is supported on all property types except Arrays. -- `properties.{propertyApiName}.neq` - used to filter objects that do not have the provided property values. - Similar to the `eq` filter, if multiple values are provided, then objects that have any of the given values - will be excluded from the result. -- `properties.{propertyApiName}.lt`, `properties.{propertyApiName}.lte`, `properties.{propertyApiName}.gt` - `properties.{propertyApiName}.gte` - represent less than, less than or equal to, greater than, and greater - than or equal to respectively. These are supported on date, timestamp, byte, integer, long, double, decimal. -- `properties.{propertyApiName}.isNull` - used to filter objects where the provided property is (or is not) null. - This filter is supported on all property types. - - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/PropertyId.md b/docs/v2/Ontologies/models/PropertyId.md deleted file mode 100644 index c3fa1f7ab..000000000 --- a/docs/v2/Ontologies/models/PropertyId.md +++ /dev/null @@ -1,13 +0,0 @@ -# PropertyId - -The immutable ID of a property. Property IDs are only used to identify properties in the **Ontology Manager** -application and assign them API names. In every other case, API names should be used instead of property IDs. - - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/PropertyIdentifier.md b/docs/v2/Ontologies/models/PropertyIdentifier.md deleted file mode 100644 index ed2eba702..000000000 --- a/docs/v2/Ontologies/models/PropertyIdentifier.md +++ /dev/null @@ -1,17 +0,0 @@ -# PropertyIdentifier - -An identifier used to select properties or struct fields. - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -PropertyApiNameSelector | property -StructFieldSelector | structField -PropertyWithLoadLevelSelector | propertyWithLoadLevel - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/PropertyImplementation.md b/docs/v2/Ontologies/models/PropertyImplementation.md deleted file mode 100644 index faf381f87..000000000 --- a/docs/v2/Ontologies/models/PropertyImplementation.md +++ /dev/null @@ -1,12 +0,0 @@ -# PropertyImplementation - -PropertyImplementation - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**property_api_name** | PropertyApiName | Yes | | -**type** | Literal["property"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/PropertyKnownTypeFormattingRule.md b/docs/v2/Ontologies/models/PropertyKnownTypeFormattingRule.md deleted file mode 100644 index 6ddc0c87e..000000000 --- a/docs/v2/Ontologies/models/PropertyKnownTypeFormattingRule.md +++ /dev/null @@ -1,12 +0,0 @@ -# PropertyKnownTypeFormattingRule - -Formatting configuration for known Foundry types. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**known_type** | KnownType | Yes | | -**type** | Literal["knownType"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/PropertyLoadLevel.md b/docs/v2/Ontologies/models/PropertyLoadLevel.md deleted file mode 100644 index ae8ce4d3c..000000000 --- a/docs/v2/Ontologies/models/PropertyLoadLevel.md +++ /dev/null @@ -1,21 +0,0 @@ -# PropertyLoadLevel - -The load level of the property: -- APPLY_REDUCERS: Returns a single value of an array as configured in the ontology. -- EXTRACT_MAIN_VALUE: Returns the main value of a struct as configured in the ontology. -- APPLY_REDUCERS_AND_EXTRACT_MAIN_VALUE: Performs both to return the reduced main value. - - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -ApplyReducersAndExtractMainValueLoadLevel | applyReducersAndExtractMainValue -ApplyReducersLoadLevel | applyReducers -ExtractMainValueLoadLevel | extractMainValue - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/PropertyNumberFormattingRule.md b/docs/v2/Ontologies/models/PropertyNumberFormattingRule.md deleted file mode 100644 index 20b28019c..000000000 --- a/docs/v2/Ontologies/models/PropertyNumberFormattingRule.md +++ /dev/null @@ -1,12 +0,0 @@ -# PropertyNumberFormattingRule - -Wrapper for numeric formatting options. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**number_type** | PropertyNumberFormattingRuleType | Yes | | -**type** | Literal["number"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/PropertyNumberFormattingRuleType.md b/docs/v2/Ontologies/models/PropertyNumberFormattingRuleType.md deleted file mode 100644 index 16bac7c1e..000000000 --- a/docs/v2/Ontologies/models/PropertyNumberFormattingRuleType.md +++ /dev/null @@ -1,23 +0,0 @@ -# PropertyNumberFormattingRuleType - -PropertyNumberFormattingRuleType - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -NumberFormatStandard | standard -NumberFormatDuration | duration -NumberFormatFixedValues | fixedValues -NumberFormatAffix | affix -NumberFormatScale | scale -NumberFormatCurrency | currency -NumberFormatStandardUnit | standardUnit -NumberFormatCustomUnit | customUnit -NumberFormatRatio | ratio - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/PropertyOrStructFieldOfPropertyImplementation.md b/docs/v2/Ontologies/models/PropertyOrStructFieldOfPropertyImplementation.md deleted file mode 100644 index fbd0a22f2..000000000 --- a/docs/v2/Ontologies/models/PropertyOrStructFieldOfPropertyImplementation.md +++ /dev/null @@ -1,16 +0,0 @@ -# PropertyOrStructFieldOfPropertyImplementation - -PropertyOrStructFieldOfPropertyImplementation - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -StructFieldOfPropertyImplementation | structFieldOfProperty -PropertyImplementation | property - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/PropertyTimestampFormattingRule.md b/docs/v2/Ontologies/models/PropertyTimestampFormattingRule.md deleted file mode 100644 index 6b26f25dc..000000000 --- a/docs/v2/Ontologies/models/PropertyTimestampFormattingRule.md +++ /dev/null @@ -1,13 +0,0 @@ -# PropertyTimestampFormattingRule - -Formatting configuration for timestamp property values. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**format** | DatetimeFormat | Yes | | -**display_timezone** | DatetimeTimezone | Yes | | -**type** | Literal["timestamp"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/PropertyTypeApiName.md b/docs/v2/Ontologies/models/PropertyTypeApiName.md deleted file mode 100644 index bd17bb1ad..000000000 --- a/docs/v2/Ontologies/models/PropertyTypeApiName.md +++ /dev/null @@ -1,11 +0,0 @@ -# PropertyTypeApiName - -PropertyTypeApiName - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/PropertyTypeReference.md b/docs/v2/Ontologies/models/PropertyTypeReference.md deleted file mode 100644 index c3f9a6be8..000000000 --- a/docs/v2/Ontologies/models/PropertyTypeReference.md +++ /dev/null @@ -1,12 +0,0 @@ -# PropertyTypeReference - -PropertyTypeReference - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**property_api_name** | str | Yes | The API name of the PropertyType | -**type** | Literal["propertyType"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/PropertyTypeReferenceOrStringConstant.md b/docs/v2/Ontologies/models/PropertyTypeReferenceOrStringConstant.md deleted file mode 100644 index 5b813c01b..000000000 --- a/docs/v2/Ontologies/models/PropertyTypeReferenceOrStringConstant.md +++ /dev/null @@ -1,16 +0,0 @@ -# PropertyTypeReferenceOrStringConstant - -PropertyTypeReferenceOrStringConstant - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -StringConstant | constant -PropertyTypeReference | propertyType - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/PropertyTypeRid.md b/docs/v2/Ontologies/models/PropertyTypeRid.md deleted file mode 100644 index 116c24440..000000000 --- a/docs/v2/Ontologies/models/PropertyTypeRid.md +++ /dev/null @@ -1,11 +0,0 @@ -# PropertyTypeRid - -PropertyTypeRid - -## Type -```python -RID -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/PropertyTypeStatus.md b/docs/v2/Ontologies/models/PropertyTypeStatus.md deleted file mode 100644 index 19ea29506..000000000 --- a/docs/v2/Ontologies/models/PropertyTypeStatus.md +++ /dev/null @@ -1,19 +0,0 @@ -# PropertyTypeStatus - -The status to indicate whether the PropertyType is either Experimental, Active, Deprecated, or Example. - - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -DeprecatedPropertyTypeStatus | deprecated -ActivePropertyTypeStatus | active -ExperimentalPropertyTypeStatus | experimental -ExamplePropertyTypeStatus | example - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/PropertyTypeVisibility.md b/docs/v2/Ontologies/models/PropertyTypeVisibility.md deleted file mode 100644 index 8d931f612..000000000 --- a/docs/v2/Ontologies/models/PropertyTypeVisibility.md +++ /dev/null @@ -1,12 +0,0 @@ -# PropertyTypeVisibility - -PropertyTypeVisibility - -| **Value** | -| --------- | -| `"NORMAL"` | -| `"PROMINENT"` | -| `"HIDDEN"` | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/PropertyV2.md b/docs/v2/Ontologies/models/PropertyV2.md deleted file mode 100644 index 5bbb4c3ac..000000000 --- a/docs/v2/Ontologies/models/PropertyV2.md +++ /dev/null @@ -1,18 +0,0 @@ -# PropertyV2 - -Details about some property of an object. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**description** | Optional[str] | No | | -**display_name** | Optional[DisplayName] | No | | -**data_type** | ObjectPropertyType | Yes | | -**rid** | PropertyTypeRid | Yes | | -**status** | Optional[PropertyTypeStatus] | No | | -**visibility** | Optional[PropertyTypeVisibility] | No | | -**value_type_api_name** | Optional[ValueTypeApiName] | No | | -**value_formatting** | Optional[PropertyValueFormattingRule] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/PropertyValue.md b/docs/v2/Ontologies/models/PropertyValue.md deleted file mode 100644 index cb86253ee..000000000 --- a/docs/v2/Ontologies/models/PropertyValue.md +++ /dev/null @@ -1,37 +0,0 @@ -# PropertyValue - -Represents the value of a property in the following format. - -| Type | JSON encoding | Example | -|---------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------|----------------------------------------------------------------------------------------------------| -| Array | array | `["alpha", "bravo", "charlie"]` | -| [Attachment](https://palantir.com/docs/foundry/api/v2/ontologies-v2-resources/attachment-properties/attachment-property-basics/) | JSON encoded `AttachmentProperty` object | `{"rid":"ri.blobster.main.attachment.2f944bae-5851-4204-8615-920c969a9f2e"}` | -| Boolean | boolean | `true` | -| Byte | number | `31` | -| CipherText | string | `"CIPHER::ri.bellaso.main.cipher-channel.e414ab9e-b606-499a-a0e1-844fa296ba7e::unzjs3VifsTxuIpf1fH1CJ7OaPBr2bzMMdozPaZJtCii8vVG60yXIEmzoOJaEl9mfFFe::CIPHER"` | -| Date | ISO 8601 extended local date string | `"2021-05-01"` | -| Decimal | string | `"2.718281828"` | -| Double | number | `3.14159265` | -| Float | number | `3.14159265` | -| GeoPoint | geojson | `{"type":"Point","coordinates":[102.0,0.5]}` | -| GeoShape | geojson | `{"type":"LineString","coordinates":[[102.0,0.0],[103.0,1.0],[104.0,0.0],[105.0,1.0]]}` | -| Integer | number | `238940` | -| Long | string | `"58319870951433"` | -| [MediaReference](https://palantir.com/docs/foundry/api/v2/ontologies-v2-resources/media-reference-properties/media-reference-property-basics/)| JSON encoded `MediaReference` object | `{"mimeType":"application/pdf","reference":{"type":"mediaSetViewItem","mediaSetViewItem":{"mediaSetRid":"ri.mio.main.media-set.4153d42f-ca4b-4e42-8ca5-8e6aa7edb642","mediaSetViewRid":"ri.mio.main.view.82a798ad-d637-4595-acc6-987bcf16629b","mediaItemRid":"ri.mio.main.media-item.001ec98b-1620-4814-9e17-8e9c4e536225"}}}` | -| Short | number | `8739` | -| String | string | `"Call me Ishmael"` | -| Struct | JSON object of struct field API name -> value | {"firstName": "Alex", "lastName": "Karp"} | -| Timestamp | ISO 8601 extended offset date-time string in UTC zone | `"2021-01-04T05:00:00Z"` | -| [Timeseries](https://palantir.com/docs/foundry/api/v2/ontologies-v2-resources/time-series-properties/time-series-property-basics/) | JSON encoded `TimeseriesProperty` object or seriesId string | `{"seriesId": "wellPressureSeriesId", "syncRid": ri.time-series-catalog.main.sync.04f5ac1f-91bf-44f9-a51f-4f34e06e42df"}` or `{"templateRid": "ri.codex-emu.main.template.367cac64-e53b-4653-b111-f61856a63df9", "templateVersion": "0.0.0"}` or `"wellPressureSeriesId"`| | -| Vector | array | `[0.1, 0.3, 0.02, 0.05 , 0.8, 0.4]` | - -Note that for backwards compatibility, the Boolean, Byte, Double, Float, Integer, and Short types can also be encoded as JSON strings. - - -## Type -```python -Any -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/PropertyValueEscapedString.md b/docs/v2/Ontologies/models/PropertyValueEscapedString.md deleted file mode 100644 index db793a387..000000000 --- a/docs/v2/Ontologies/models/PropertyValueEscapedString.md +++ /dev/null @@ -1,11 +0,0 @@ -# PropertyValueEscapedString - -Represents the value of a property in string format. This is used in URL parameters. - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/PropertyValueFormattingRule.md b/docs/v2/Ontologies/models/PropertyValueFormattingRule.md deleted file mode 100644 index f3a2837db..000000000 --- a/docs/v2/Ontologies/models/PropertyValueFormattingRule.md +++ /dev/null @@ -1,28 +0,0 @@ -# PropertyValueFormattingRule - -This feature is experimental and may change in a future release. -Comprehensive formatting configuration for displaying property values in user interfaces. -Supports different value types including numbers, dates, timestamps, booleans, and known Foundry types. - -Each formatter type provides specific options tailored to that data type: -- Numbers: Support for percentages, currencies, units, scaling, and custom formatting -- Dates/Timestamps: Localized and custom formatting patterns -- Booleans: Custom true/false display text -- Known types: Special formatting for Foundry-specific identifiers - - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -PropertyDateFormattingRule | date -PropertyNumberFormattingRule | number -PropertyBooleanFormattingRule | boolean -PropertyKnownTypeFormattingRule | knownType -PropertyTimestampFormattingRule | timestamp - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/PropertyWithLoadLevelSelector.md b/docs/v2/Ontologies/models/PropertyWithLoadLevelSelector.md deleted file mode 100644 index bfd6cf506..000000000 --- a/docs/v2/Ontologies/models/PropertyWithLoadLevelSelector.md +++ /dev/null @@ -1,16 +0,0 @@ -# PropertyWithLoadLevelSelector - -A combination of a property identifier and the load level to apply to the property. You can select a reduced -value for arrays and the main value for structs. If the provided load level cannot be applied to the property -type, then it will be ignored. This selector is experimental and may not work in filters or sorts. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**property_identifier** | PropertyIdentifier | Yes | | -**load_level** | PropertyLoadLevel | Yes | | -**type** | Literal["propertyWithLoadLevel"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/QueryAggregation.md b/docs/v2/Ontologies/models/QueryAggregation.md deleted file mode 100644 index 903b9dd76..000000000 --- a/docs/v2/Ontologies/models/QueryAggregation.md +++ /dev/null @@ -1,12 +0,0 @@ -# QueryAggregation - -QueryAggregation - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**key** | Any | Yes | | -**value** | Any | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/QueryAggregationKeyType.md b/docs/v2/Ontologies/models/QueryAggregationKeyType.md deleted file mode 100644 index af8af64a8..000000000 --- a/docs/v2/Ontologies/models/QueryAggregationKeyType.md +++ /dev/null @@ -1,22 +0,0 @@ -# QueryAggregationKeyType - -A union of all the types supported by query aggregation keys. - - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -DateType | date -BooleanType | boolean -StringType | string -DoubleType | double -QueryAggregationRangeType | range -IntegerType | integer -TimestampType | timestamp - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/QueryAggregationRangeSubType.md b/docs/v2/Ontologies/models/QueryAggregationRangeSubType.md deleted file mode 100644 index b2b007348..000000000 --- a/docs/v2/Ontologies/models/QueryAggregationRangeSubType.md +++ /dev/null @@ -1,19 +0,0 @@ -# QueryAggregationRangeSubType - -A union of all the types supported by query aggregation ranges. - - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -DateType | date -DoubleType | double -IntegerType | integer -TimestampType | timestamp - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/QueryAggregationRangeType.md b/docs/v2/Ontologies/models/QueryAggregationRangeType.md deleted file mode 100644 index 8f7de1558..000000000 --- a/docs/v2/Ontologies/models/QueryAggregationRangeType.md +++ /dev/null @@ -1,12 +0,0 @@ -# QueryAggregationRangeType - -QueryAggregationRangeType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**sub_type** | QueryAggregationRangeSubType | Yes | | -**type** | Literal["range"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/QueryAggregationValueType.md b/docs/v2/Ontologies/models/QueryAggregationValueType.md deleted file mode 100644 index 7802d4da2..000000000 --- a/docs/v2/Ontologies/models/QueryAggregationValueType.md +++ /dev/null @@ -1,18 +0,0 @@ -# QueryAggregationValueType - -A union of all the types supported by query aggregation keys. - - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -DateType | date -DoubleType | double -TimestampType | timestamp - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/QueryApiName.md b/docs/v2/Ontologies/models/QueryApiName.md deleted file mode 100644 index f071cbf16..000000000 --- a/docs/v2/Ontologies/models/QueryApiName.md +++ /dev/null @@ -1,12 +0,0 @@ -# QueryApiName - -The name of the Query in the API. - - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/QueryArrayType.md b/docs/v2/Ontologies/models/QueryArrayType.md deleted file mode 100644 index ef02cc331..000000000 --- a/docs/v2/Ontologies/models/QueryArrayType.md +++ /dev/null @@ -1,12 +0,0 @@ -# QueryArrayType - -QueryArrayType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**sub_type** | QueryDataType | Yes | | -**type** | Literal["array"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/QueryDataType.md b/docs/v2/Ontologies/models/QueryDataType.md deleted file mode 100644 index 3877d5830..000000000 --- a/docs/v2/Ontologies/models/QueryDataType.md +++ /dev/null @@ -1,37 +0,0 @@ -# QueryDataType - -A union of all the types supported by Ontology Query parameters or outputs. - - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -DateType | date -OntologyInterfaceObjectType | interfaceObject -QueryStructType | struct -QuerySetType | set -StringType | string -EntrySetType | entrySet -DoubleType | double -IntegerType | integer -ThreeDimensionalAggregation | threeDimensionalAggregation -QueryUnionType | union -FloatType | float -LongType | long -BooleanType | boolean -UnsupportedType | unsupported -AttachmentType | attachment -NullType | null -QueryArrayType | array -OntologyObjectSetType | objectSet -TwoDimensionalAggregation | twoDimensionalAggregation -OntologyInterfaceObjectSetType | interfaceObjectSet -OntologyObjectType | object -TimestampType | timestamp - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/QueryParameterV2.md b/docs/v2/Ontologies/models/QueryParameterV2.md deleted file mode 100644 index 9b1abb881..000000000 --- a/docs/v2/Ontologies/models/QueryParameterV2.md +++ /dev/null @@ -1,12 +0,0 @@ -# QueryParameterV2 - -Details about a parameter of a query. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**description** | Optional[str] | No | | -**data_type** | QueryDataType | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/QueryRuntimeErrorParameter.md b/docs/v2/Ontologies/models/QueryRuntimeErrorParameter.md deleted file mode 100644 index 09eb0af3d..000000000 --- a/docs/v2/Ontologies/models/QueryRuntimeErrorParameter.md +++ /dev/null @@ -1,11 +0,0 @@ -# QueryRuntimeErrorParameter - -QueryRuntimeErrorParameter - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/QuerySetType.md b/docs/v2/Ontologies/models/QuerySetType.md deleted file mode 100644 index 786ad8345..000000000 --- a/docs/v2/Ontologies/models/QuerySetType.md +++ /dev/null @@ -1,12 +0,0 @@ -# QuerySetType - -QuerySetType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**sub_type** | QueryDataType | Yes | | -**type** | Literal["set"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/QueryStructField.md b/docs/v2/Ontologies/models/QueryStructField.md deleted file mode 100644 index 0e7bc858d..000000000 --- a/docs/v2/Ontologies/models/QueryStructField.md +++ /dev/null @@ -1,12 +0,0 @@ -# QueryStructField - -QueryStructField - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**name** | StructFieldName | Yes | | -**field_type** | QueryDataType | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/QueryStructType.md b/docs/v2/Ontologies/models/QueryStructType.md deleted file mode 100644 index 9ccbb0860..000000000 --- a/docs/v2/Ontologies/models/QueryStructType.md +++ /dev/null @@ -1,12 +0,0 @@ -# QueryStructType - -QueryStructType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**fields** | List[QueryStructField] | Yes | | -**type** | Literal["struct"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/QueryThreeDimensionalAggregation.md b/docs/v2/Ontologies/models/QueryThreeDimensionalAggregation.md deleted file mode 100644 index 2b1387a64..000000000 --- a/docs/v2/Ontologies/models/QueryThreeDimensionalAggregation.md +++ /dev/null @@ -1,11 +0,0 @@ -# QueryThreeDimensionalAggregation - -QueryThreeDimensionalAggregation - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**groups** | List[NestedQueryAggregation] | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/QueryTwoDimensionalAggregation.md b/docs/v2/Ontologies/models/QueryTwoDimensionalAggregation.md deleted file mode 100644 index 7023537bc..000000000 --- a/docs/v2/Ontologies/models/QueryTwoDimensionalAggregation.md +++ /dev/null @@ -1,11 +0,0 @@ -# QueryTwoDimensionalAggregation - -QueryTwoDimensionalAggregation - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**groups** | List[QueryAggregation] | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/QueryTypeV2.md b/docs/v2/Ontologies/models/QueryTypeV2.md deleted file mode 100644 index 8ee80ba6b..000000000 --- a/docs/v2/Ontologies/models/QueryTypeV2.md +++ /dev/null @@ -1,17 +0,0 @@ -# QueryTypeV2 - -Represents a query type in the Ontology. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**api_name** | QueryApiName | Yes | | -**description** | Optional[str] | No | | -**display_name** | Optional[DisplayName] | No | | -**parameters** | Dict[ParameterId, QueryParameterV2] | Yes | | -**output** | QueryDataType | Yes | | -**rid** | FunctionRid | Yes | | -**version** | FunctionVersion | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/QueryUnionType.md b/docs/v2/Ontologies/models/QueryUnionType.md deleted file mode 100644 index a1b15ebbf..000000000 --- a/docs/v2/Ontologies/models/QueryUnionType.md +++ /dev/null @@ -1,12 +0,0 @@ -# QueryUnionType - -QueryUnionType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**union_types** | List[QueryDataType] | Yes | | -**type** | Literal["union"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/RangeConstraint.md b/docs/v2/Ontologies/models/RangeConstraint.md deleted file mode 100644 index 85b59fe75..000000000 --- a/docs/v2/Ontologies/models/RangeConstraint.md +++ /dev/null @@ -1,16 +0,0 @@ -# RangeConstraint - -The parameter value must be within the defined range. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**lt** | Optional[Any] | No | Less than | -**lte** | Optional[Any] | No | Less than or equal | -**gt** | Optional[Any] | No | Greater than | -**gte** | Optional[Any] | No | Greater than or equal | -**type** | Literal["range"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/RangesConstraint.md b/docs/v2/Ontologies/models/RangesConstraint.md deleted file mode 100644 index a0809a9aa..000000000 --- a/docs/v2/Ontologies/models/RangesConstraint.md +++ /dev/null @@ -1,13 +0,0 @@ -# RangesConstraint - -RangesConstraint - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**minimum_value** | Optional[PropertyValue] | No | | -**maximum_value** | Optional[PropertyValue] | No | | -**type** | Literal["range"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/RegexConstraint.md b/docs/v2/Ontologies/models/RegexConstraint.md deleted file mode 100644 index e7b88446b..000000000 --- a/docs/v2/Ontologies/models/RegexConstraint.md +++ /dev/null @@ -1,13 +0,0 @@ -# RegexConstraint - -RegexConstraint - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**pattern** | str | Yes | | -**partial_match** | bool | Yes | | -**type** | Literal["regex"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/RegexQuery.md b/docs/v2/Ontologies/models/RegexQuery.md deleted file mode 100644 index e84a21d89..000000000 --- a/docs/v2/Ontologies/models/RegexQuery.md +++ /dev/null @@ -1,17 +0,0 @@ -# RegexQuery - -Returns objects where the specified field matches the regex pattern provided. This applies to the non-analyzed -form of text fields and supports standard regex syntax of dot (.), star(*) and question mark(?). -Either `field` or `propertyIdentifier` can be supplied, but not both. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**field** | Optional[PropertyApiName] | No | | -**property_identifier** | Optional[PropertyIdentifier] | No | | -**value** | str | Yes | | -**type** | Literal["regex"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/RelativeDateRangeBound.md b/docs/v2/Ontologies/models/RelativeDateRangeBound.md deleted file mode 100644 index 2c1a11873..000000000 --- a/docs/v2/Ontologies/models/RelativeDateRangeBound.md +++ /dev/null @@ -1,11 +0,0 @@ -# RelativeDateRangeBound - -Specifies a bound for a relative date range query. - -## Type -```python -RelativePointInTime -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/RelativeDateRangeQuery.md b/docs/v2/Ontologies/models/RelativeDateRangeQuery.md deleted file mode 100644 index d773f6a28..000000000 --- a/docs/v2/Ontologies/models/RelativeDateRangeQuery.md +++ /dev/null @@ -1,18 +0,0 @@ -# RelativeDateRangeQuery - -Returns objects where the specified date or timestamp property falls within a relative date range. -The bounds are calculated relative to query execution time and rounded to midnight in the specified timezone. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**field** | Optional[PropertyApiName] | No | The property API name to filter on (either field or propertyIdentifier must be provided). | -**property_identifier** | Optional[PropertyIdentifier] | No | The property identifier to filter on (either field or propertyIdentifier must be provided). | -**relative_start_time** | Optional[RelativeDateRangeBound] | No | The lower bound relative to query time (inclusive). Negative values go into the past. For example, { value: -7, timeUnit: DAY } means 7 days ago. | -**relative_end_time** | Optional[RelativeDateRangeBound] | No | The upper bound relative to query time (exclusive). Negative values go into the past. For example, { value: 1, timeUnit: MONTH } means the start of next month. | -**time_zone_id** | str | Yes | Time zone ID for midnight calculation (e.g., "America/New_York", "Europe/London", "Etc/UTC"). See https://en.wikipedia.org/wiki/List_of_tz_database_time_zones for valid values. | -**type** | Literal["relativeDateRange"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/RelativePointInTime.md b/docs/v2/Ontologies/models/RelativePointInTime.md deleted file mode 100644 index c81f00b53..000000000 --- a/docs/v2/Ontologies/models/RelativePointInTime.md +++ /dev/null @@ -1,13 +0,0 @@ -# RelativePointInTime - -A point in time specified relative to query execution time. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**value** | int | Yes | The numeric value of the time offset. Negative values indicate the past, positive values the future. | -**time_unit** | RelativeTimeUnit | Yes | The unit of time for the value. | -**type** | Literal["relativePoint"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/RelativeTime.md b/docs/v2/Ontologies/models/RelativeTime.md deleted file mode 100644 index 0cec25feb..000000000 --- a/docs/v2/Ontologies/models/RelativeTime.md +++ /dev/null @@ -1,14 +0,0 @@ -# RelativeTime - -A relative time, such as "3 days before" or "2 hours after" the current moment. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**when** | RelativeTimeRelation | Yes | | -**value** | int | Yes | | -**unit** | RelativeTimeSeriesTimeUnit | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/RelativeTimeRange.md b/docs/v2/Ontologies/models/RelativeTimeRange.md deleted file mode 100644 index 89bafc494..000000000 --- a/docs/v2/Ontologies/models/RelativeTimeRange.md +++ /dev/null @@ -1,14 +0,0 @@ -# RelativeTimeRange - -A relative time range for a time series query. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**start_time** | Optional[RelativeTime] | No | | -**end_time** | Optional[RelativeTime] | No | | -**type** | Literal["relative"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/RelativeTimeRelation.md b/docs/v2/Ontologies/models/RelativeTimeRelation.md deleted file mode 100644 index d73c91c5f..000000000 --- a/docs/v2/Ontologies/models/RelativeTimeRelation.md +++ /dev/null @@ -1,11 +0,0 @@ -# RelativeTimeRelation - -RelativeTimeRelation - -| **Value** | -| --------- | -| `"BEFORE"` | -| `"AFTER"` | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/RelativeTimeSeriesTimeUnit.md b/docs/v2/Ontologies/models/RelativeTimeSeriesTimeUnit.md deleted file mode 100644 index 668205359..000000000 --- a/docs/v2/Ontologies/models/RelativeTimeSeriesTimeUnit.md +++ /dev/null @@ -1,17 +0,0 @@ -# RelativeTimeSeriesTimeUnit - -RelativeTimeSeriesTimeUnit - -| **Value** | -| --------- | -| `"MILLISECONDS"` | -| `"SECONDS"` | -| `"MINUTES"` | -| `"HOURS"` | -| `"DAYS"` | -| `"WEEKS"` | -| `"MONTHS"` | -| `"YEARS"` | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/RelativeTimeUnit.md b/docs/v2/Ontologies/models/RelativeTimeUnit.md deleted file mode 100644 index 5be5750f9..000000000 --- a/docs/v2/Ontologies/models/RelativeTimeUnit.md +++ /dev/null @@ -1,13 +0,0 @@ -# RelativeTimeUnit - -Units for relative time calculations. - -| **Value** | -| --------- | -| `"DAY"` | -| `"WEEK"` | -| `"MONTH"` | -| `"YEAR"` | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ResolvedInterfacePropertyType.md b/docs/v2/Ontologies/models/ResolvedInterfacePropertyType.md deleted file mode 100644 index deb1eb30c..000000000 --- a/docs/v2/Ontologies/models/ResolvedInterfacePropertyType.md +++ /dev/null @@ -1,20 +0,0 @@ -# ResolvedInterfacePropertyType - -An interface property type with additional fields to indicate constraints that need to be satisfied by -implementing object property types. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**rid** | InterfacePropertyTypeRid | Yes | | -**api_name** | InterfacePropertyApiName | Yes | | -**display_name** | DisplayName | Yes | | -**description** | Optional[str] | No | A short text that describes the InterfacePropertyType. | -**data_type** | ObjectPropertyType | Yes | | -**value_type_api_name** | Optional[ValueTypeApiName] | No | | -**value_formatting** | Optional[PropertyValueFormattingRule] | No | | -**require_implementation** | bool | Yes | Whether each implementing object type must declare an implementation for this property. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ReturnEditsMode.md b/docs/v2/Ontologies/models/ReturnEditsMode.md deleted file mode 100644 index 9034e6c39..000000000 --- a/docs/v2/Ontologies/models/ReturnEditsMode.md +++ /dev/null @@ -1,12 +0,0 @@ -# ReturnEditsMode - -ReturnEditsMode - -| **Value** | -| --------- | -| `"ALL"` | -| `"ALL_V2_WITH_DELETIONS"` | -| `"NONE"` | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/RidConstraint.md b/docs/v2/Ontologies/models/RidConstraint.md deleted file mode 100644 index a23657651..000000000 --- a/docs/v2/Ontologies/models/RidConstraint.md +++ /dev/null @@ -1,11 +0,0 @@ -# RidConstraint - -The string must be a valid RID (Resource Identifier). - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["rid"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/RollingAggregateWindowPoints.md b/docs/v2/Ontologies/models/RollingAggregateWindowPoints.md deleted file mode 100644 index 9b89efbf1..000000000 --- a/docs/v2/Ontologies/models/RollingAggregateWindowPoints.md +++ /dev/null @@ -1,12 +0,0 @@ -# RollingAggregateWindowPoints - -Number of points in each window. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**count** | int | Yes | | -**type** | Literal["pointsCount"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/SdkPackageName.md b/docs/v2/Ontologies/models/SdkPackageName.md deleted file mode 100644 index 9f5d5f9c4..000000000 --- a/docs/v2/Ontologies/models/SdkPackageName.md +++ /dev/null @@ -1,11 +0,0 @@ -# SdkPackageName - -SdkPackageName - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/SdkPackageRid.md b/docs/v2/Ontologies/models/SdkPackageRid.md deleted file mode 100644 index c6c54858d..000000000 --- a/docs/v2/Ontologies/models/SdkPackageRid.md +++ /dev/null @@ -1,11 +0,0 @@ -# SdkPackageRid - -SdkPackageRid - -## Type -```python -RID -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/SdkVersion.md b/docs/v2/Ontologies/models/SdkVersion.md deleted file mode 100644 index a86eede8f..000000000 --- a/docs/v2/Ontologies/models/SdkVersion.md +++ /dev/null @@ -1,11 +0,0 @@ -# SdkVersion - -SdkVersion - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/SearchJsonQueryV2.md b/docs/v2/Ontologies/models/SearchJsonQueryV2.md deleted file mode 100644 index 40876afb4..000000000 --- a/docs/v2/Ontologies/models/SearchJsonQueryV2.md +++ /dev/null @@ -1,41 +0,0 @@ -# SearchJsonQueryV2 - -SearchJsonQueryV2 - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -LtQueryV2 | lt -DoesNotIntersectBoundingBoxQuery | doesNotIntersectBoundingBox -RelativeDateRangeQuery | relativeDateRange -WildcardQuery | wildcard -WithinDistanceOfQuery | withinDistanceOf -WithinBoundingBoxQuery | withinBoundingBox -NotQueryV2 | not -IntersectsBoundingBoxQuery | intersectsBoundingBox -AndQueryV2 | and -ContainsAllTermsInOrderPrefixLastTerm | containsAllTermsInOrderPrefixLastTerm -GteQueryV2 | gte -ContainsAllTermsInOrderQuery | containsAllTermsInOrder -WithinPolygonQuery | withinPolygon -IntersectsPolygonQuery | intersectsPolygon -LteQueryV2 | lte -OrQueryV2 | or -InQuery | in -DoesNotIntersectPolygonQuery | doesNotIntersectPolygon -EqualsQueryV2 | eq -ContainsAllTermsQuery | containsAllTerms -GtQueryV2 | gt -ContainsQueryV2 | contains -RegexQuery | regex -IsNullQueryV2 | isNull -ContainsAnyTermQuery | containsAnyTerm -IntervalQuery | interval -StartsWithQuery | startsWith - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/SearchObjectsForInterfaceRequest.md b/docs/v2/Ontologies/models/SearchObjectsForInterfaceRequest.md deleted file mode 100644 index 4bd84aa3e..000000000 --- a/docs/v2/Ontologies/models/SearchObjectsForInterfaceRequest.md +++ /dev/null @@ -1,21 +0,0 @@ -# SearchObjectsForInterfaceRequest - -SearchObjectsForInterfaceRequest - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**where** | Optional[SearchJsonQueryV2] | No | | -**order_by** | Optional[SearchOrderByV2] | No | | -**augmented_properties** | Dict[ObjectTypeApiName, List[PropertyApiName]] | Yes | A map from object type API name to a list of property type API names. For each returned object, if the object’s object type is a key in the map, then we augment the response for that object type with the list of properties specified in the value. | -**augmented_shared_property_types** | Dict[InterfaceTypeApiName, List[SharedPropertyTypeApiName]] | Yes | A map from interface type API name to a list of shared property type API names. For each returned object, if the object implements an interface that is a key in the map, then we augment the response for that object type with the list of properties specified in the value. | -**augmented_interface_property_types** | Dict[InterfaceTypeApiName, List[InterfacePropertyApiName]] | Yes | A map from interface type API name to a list of interface property type API names. For each returned object, if the object implements an interface that is a key in the map, then we augment the response for that object type with the list of properties specified in the value. | -**selected_shared_property_types** | List[SharedPropertyTypeApiName] | Yes | A list of shared property type API names of the interface type that should be included in the response. Omit this parameter to include all properties of the interface type in the response. | -**selected_interface_property_types** | List[InterfacePropertyApiName] | Yes | A list of interface property type API names of the interface type that should be included in the response. Omit this parameter to include all properties of the interface type in the response. | -**selected_object_types** | List[ObjectTypeApiName] | Yes | A list of object type API names that should be included in the response. If non-empty, object types that are not mentioned will not be included in the response even if they implement the specified interface. Omit the parameter to include all object types. | -**other_interface_types** | List[InterfaceTypeApiName] | Yes | A list of interface type API names. Object types must implement all the mentioned interfaces in order to be included in the response. | -**page_size** | Optional[PageSize] | No | | -**page_token** | Optional[PageToken] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/SearchObjectsRequestV2.md b/docs/v2/Ontologies/models/SearchObjectsRequestV2.md deleted file mode 100644 index 17bdf31f8..000000000 --- a/docs/v2/Ontologies/models/SearchObjectsRequestV2.md +++ /dev/null @@ -1,18 +0,0 @@ -# SearchObjectsRequestV2 - -SearchObjectsRequestV2 - -## Properties -| Name | Type | Required | Description | -| ------------ |------------------------------------|----------| ------------- | -**where** | Optional[SearchJsonQueryV2] | No | | -**order_by** | Optional[SearchOrderByV2] | No | | -**page_size** | Optional[PageSize] | No | | -**page_token** | Optional[PageToken] | No | | -**select** | List[PropertyApiName] | Yes | The API names of the object type properties to include in the response. | -**select_v2** | Optional[List[PropertyIdentifier]] | No | The identifiers of the properties to include in the response. Only selectV2 or select should be populated, but not both. | -**exclude_rid** | Optional[bool] | No | A flag to exclude the retrieval of the `__rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2. | -**snapshot** | Optional[bool] | No | A flag to use snapshot consistency when paging. Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. This defaults to false if not specified, which means you will always get the latest results. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/SearchObjectsResponseV2.md b/docs/v2/Ontologies/models/SearchObjectsResponseV2.md deleted file mode 100644 index 864e39be7..000000000 --- a/docs/v2/Ontologies/models/SearchObjectsResponseV2.md +++ /dev/null @@ -1,13 +0,0 @@ -# SearchObjectsResponseV2 - -SearchObjectsResponseV2 - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**data** | List[OntologyObjectV2] | Yes | | -**next_page_token** | Optional[PageToken] | No | | -**total_count** | TotalCount | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/SearchOrderByType.md b/docs/v2/Ontologies/models/SearchOrderByType.md deleted file mode 100644 index 1fd953efb..000000000 --- a/docs/v2/Ontologies/models/SearchOrderByType.md +++ /dev/null @@ -1,11 +0,0 @@ -# SearchOrderByType - -SearchOrderByType - -| **Value** | -| --------- | -| `"fields"` | -| `"relevance"` | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/SearchOrderByV2.md b/docs/v2/Ontologies/models/SearchOrderByV2.md deleted file mode 100644 index 8e88e9aa9..000000000 --- a/docs/v2/Ontologies/models/SearchOrderByV2.md +++ /dev/null @@ -1,12 +0,0 @@ -# SearchOrderByV2 - -Specifies the ordering of search results by a field and an ordering direction or by relevance if scores are required in a nearestNeighbors query. By default `orderType` is set to `fields`. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**order_type** | Optional[SearchOrderByType] | No | | -**fields** | List[SearchOrderingV2] | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/SearchOrderingV2.md b/docs/v2/Ontologies/models/SearchOrderingV2.md deleted file mode 100644 index 443c56a2b..000000000 --- a/docs/v2/Ontologies/models/SearchOrderingV2.md +++ /dev/null @@ -1,12 +0,0 @@ -# SearchOrderingV2 - -SearchOrderingV2 - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**field** | PropertyApiName | Yes | | -**direction** | Optional[str] | No | Specifies the ordering direction (can be either `asc` or `desc`) | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/SelectedPropertyApiName.md b/docs/v2/Ontologies/models/SelectedPropertyApiName.md deleted file mode 100644 index d3481ef73..000000000 --- a/docs/v2/Ontologies/models/SelectedPropertyApiName.md +++ /dev/null @@ -1,30 +0,0 @@ -# SelectedPropertyApiName - -By default, whenever an object is requested, all of its properties are returned, except for properties of the -following types: -- Vector - -The response can be filtered to only include certain properties using the `properties` query parameter. Note -that ontology object set endpoints refer to this parameter as `select`. - -Properties to include can be specified in one of two ways. - -- A comma delimited list as the value for the `properties` query parameter - `properties={property1ApiName},{property2ApiName}` -- Multiple `properties` query parameters. - `properties={property1ApiName}&properties={property2ApiName}` - -The primary key of the object will always be returned even if it wasn't specified in the `properties` values. - -Unknown properties specified in the `properties` list will result in a `PropertiesNotFound` error. - -To find the API name for your property, use the `Get object type` endpoint or check the **Ontology Manager**. - - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/SelectedPropertyApproximateDistinctAggregation.md b/docs/v2/Ontologies/models/SelectedPropertyApproximateDistinctAggregation.md deleted file mode 100644 index 23abba5fe..000000000 --- a/docs/v2/Ontologies/models/SelectedPropertyApproximateDistinctAggregation.md +++ /dev/null @@ -1,12 +0,0 @@ -# SelectedPropertyApproximateDistinctAggregation - -Computes an approximate number of distinct values for the provided field. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**selected_property_api_name** | PropertyApiName | Yes | | -**type** | Literal["approximateDistinct"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/SelectedPropertyApproximatePercentileAggregation.md b/docs/v2/Ontologies/models/SelectedPropertyApproximatePercentileAggregation.md deleted file mode 100644 index 9758e5696..000000000 --- a/docs/v2/Ontologies/models/SelectedPropertyApproximatePercentileAggregation.md +++ /dev/null @@ -1,13 +0,0 @@ -# SelectedPropertyApproximatePercentileAggregation - -Computes the approximate percentile value for the provided field. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**selected_property_api_name** | PropertyApiName | Yes | | -**approximate_percentile** | float | Yes | | -**type** | Literal["approximatePercentile"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/SelectedPropertyAvgAggregation.md b/docs/v2/Ontologies/models/SelectedPropertyAvgAggregation.md deleted file mode 100644 index 7f1ef726b..000000000 --- a/docs/v2/Ontologies/models/SelectedPropertyAvgAggregation.md +++ /dev/null @@ -1,12 +0,0 @@ -# SelectedPropertyAvgAggregation - -Computes the average value for the provided field. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**selected_property_api_name** | PropertyApiName | Yes | | -**type** | Literal["avg"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/SelectedPropertyCollectListAggregation.md b/docs/v2/Ontologies/models/SelectedPropertyCollectListAggregation.md deleted file mode 100644 index 381a5cf9b..000000000 --- a/docs/v2/Ontologies/models/SelectedPropertyCollectListAggregation.md +++ /dev/null @@ -1,20 +0,0 @@ -# SelectedPropertyCollectListAggregation - -Lists all values of a property up to the specified limit. The maximum supported limit is 100, by default. - -NOTE: A separate count aggregation should be used to determine the total count of values, to account for -a possible truncation of the returned list. - -Ignores objects for which a property is absent, so the returned list will contain non-null values only. -Returns an empty list when none of the objects have values for a provided property. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**selected_property_api_name** | PropertyApiName | Yes | | -**limit** | int | Yes | Maximum number of values to collect. The maximum supported limit is 100. | -**type** | Literal["collectList"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/SelectedPropertyCollectSetAggregation.md b/docs/v2/Ontologies/models/SelectedPropertyCollectSetAggregation.md deleted file mode 100644 index f5702fa7e..000000000 --- a/docs/v2/Ontologies/models/SelectedPropertyCollectSetAggregation.md +++ /dev/null @@ -1,20 +0,0 @@ -# SelectedPropertyCollectSetAggregation - -Lists all distinct values of a property up to the specified limit. The maximum supported limit is 100. - -NOTE: A separate cardinality / exactCardinality aggregation should be used to determine the total count of -values, to account for a possible truncation of the returned set. - -Ignores objects for which a property is absent, so the returned list will contain non-null values only. -Returns an empty list when none of the objects have values for a provided property. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**selected_property_api_name** | PropertyApiName | Yes | | -**limit** | int | Yes | Maximum number of values to collect. The maximum supported limit is 100. | -**type** | Literal["collectSet"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/SelectedPropertyCountAggregation.md b/docs/v2/Ontologies/models/SelectedPropertyCountAggregation.md deleted file mode 100644 index 0eb3c6c29..000000000 --- a/docs/v2/Ontologies/models/SelectedPropertyCountAggregation.md +++ /dev/null @@ -1,11 +0,0 @@ -# SelectedPropertyCountAggregation - -Computes the total count of objects. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["count"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/SelectedPropertyExactDistinctAggregation.md b/docs/v2/Ontologies/models/SelectedPropertyExactDistinctAggregation.md deleted file mode 100644 index b9d29ff3a..000000000 --- a/docs/v2/Ontologies/models/SelectedPropertyExactDistinctAggregation.md +++ /dev/null @@ -1,13 +0,0 @@ -# SelectedPropertyExactDistinctAggregation - -Computes an exact number of distinct values for the provided field. May be slower than an approximate distinct aggregation. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**selected_property_api_name** | PropertyApiName | Yes | | -**type** | Literal["exactDistinct"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/SelectedPropertyExpression.md b/docs/v2/Ontologies/models/SelectedPropertyExpression.md deleted file mode 100644 index b18782364..000000000 --- a/docs/v2/Ontologies/models/SelectedPropertyExpression.md +++ /dev/null @@ -1,13 +0,0 @@ -# SelectedPropertyExpression - -Definition for a selected property over a MethodObjectSet. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**object_set** | MethodObjectSet | Yes | | -**operation** | SelectedPropertyOperation | Yes | | -**type** | Literal["selection"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/SelectedPropertyMaxAggregation.md b/docs/v2/Ontologies/models/SelectedPropertyMaxAggregation.md deleted file mode 100644 index 51c2e35b6..000000000 --- a/docs/v2/Ontologies/models/SelectedPropertyMaxAggregation.md +++ /dev/null @@ -1,12 +0,0 @@ -# SelectedPropertyMaxAggregation - -Computes the maximum value for the provided field. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**selected_property_api_name** | PropertyApiName | Yes | | -**type** | Literal["max"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/SelectedPropertyMinAggregation.md b/docs/v2/Ontologies/models/SelectedPropertyMinAggregation.md deleted file mode 100644 index cca853876..000000000 --- a/docs/v2/Ontologies/models/SelectedPropertyMinAggregation.md +++ /dev/null @@ -1,12 +0,0 @@ -# SelectedPropertyMinAggregation - -Computes the minimum value for the provided field. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**selected_property_api_name** | PropertyApiName | Yes | | -**type** | Literal["min"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/SelectedPropertyOperation.md b/docs/v2/Ontologies/models/SelectedPropertyOperation.md deleted file mode 100644 index 9c84fbc16..000000000 --- a/docs/v2/Ontologies/models/SelectedPropertyOperation.md +++ /dev/null @@ -1,26 +0,0 @@ -# SelectedPropertyOperation - -Operation on a selected property, can be an aggregation function or retrieval of a single selected property - - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -SelectedPropertyApproximateDistinctAggregation | approximateDistinct -SelectedPropertyMinAggregation | min -SelectedPropertyAvgAggregation | avg -SelectedPropertyMaxAggregation | max -SelectedPropertyApproximatePercentileAggregation | approximatePercentile -GetSelectedPropertyOperation | get -SelectedPropertyCountAggregation | count -SelectedPropertySumAggregation | sum -SelectedPropertyCollectListAggregation | collectList -SelectedPropertyExactDistinctAggregation | exactDistinct -SelectedPropertyCollectSetAggregation | collectSet - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/SelectedPropertySumAggregation.md b/docs/v2/Ontologies/models/SelectedPropertySumAggregation.md deleted file mode 100644 index 97a0552bb..000000000 --- a/docs/v2/Ontologies/models/SelectedPropertySumAggregation.md +++ /dev/null @@ -1,12 +0,0 @@ -# SelectedPropertySumAggregation - -Computes the sum of values for the provided field. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**selected_property_api_name** | PropertyApiName | Yes | | -**type** | Literal["sum"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/SharedPropertyType.md b/docs/v2/Ontologies/models/SharedPropertyType.md deleted file mode 100644 index 270d9b058..000000000 --- a/docs/v2/Ontologies/models/SharedPropertyType.md +++ /dev/null @@ -1,17 +0,0 @@ -# SharedPropertyType - -A property type that can be shared across object types. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**rid** | SharedPropertyTypeRid | Yes | | -**api_name** | SharedPropertyTypeApiName | Yes | | -**display_name** | DisplayName | Yes | | -**description** | Optional[str] | No | A short text that describes the SharedPropertyType. | -**data_type** | ObjectPropertyType | Yes | | -**value_type_api_name** | Optional[ValueTypeApiName] | No | | -**value_formatting** | Optional[PropertyValueFormattingRule] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/SharedPropertyTypeApiName.md b/docs/v2/Ontologies/models/SharedPropertyTypeApiName.md deleted file mode 100644 index 58b36f523..000000000 --- a/docs/v2/Ontologies/models/SharedPropertyTypeApiName.md +++ /dev/null @@ -1,13 +0,0 @@ -# SharedPropertyTypeApiName - -The name of the shared property type in the API in lowerCamelCase format. To find the API name for your -shared property type, use the `List shared property types` endpoint or check the **Ontology Manager**. - - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/SharedPropertyTypeRid.md b/docs/v2/Ontologies/models/SharedPropertyTypeRid.md deleted file mode 100644 index ea853f6e3..000000000 --- a/docs/v2/Ontologies/models/SharedPropertyTypeRid.md +++ /dev/null @@ -1,12 +0,0 @@ -# SharedPropertyTypeRid - -The unique resource identifier of an shared property type, useful for interacting with other Foundry APIs. - - -## Type -```python -RID -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/StartsWithQuery.md b/docs/v2/Ontologies/models/StartsWithQuery.md deleted file mode 100644 index d88eba1f1..000000000 --- a/docs/v2/Ontologies/models/StartsWithQuery.md +++ /dev/null @@ -1,17 +0,0 @@ -# StartsWithQuery - -Deprecated alias for `containsAllTermsInOrderPrefixLastTerm`, which is preferred because the name `startsWith` is misleading. -Returns objects where the specified field starts with the provided value. Allows you to specify a property to -query on by a variety of means. Either `field` or `propertyIdentifier` must be supplied, but not both. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**field** | Optional[PropertyApiName] | No | | -**property_identifier** | Optional[PropertyIdentifier] | No | | -**value** | str | Yes | | -**type** | Literal["startsWith"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/StaticArgument.md b/docs/v2/Ontologies/models/StaticArgument.md deleted file mode 100644 index d90637147..000000000 --- a/docs/v2/Ontologies/models/StaticArgument.md +++ /dev/null @@ -1,12 +0,0 @@ -# StaticArgument - -Represents a static argument in a logic rule. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**value** | DataValue | Yes | | -**type** | Literal["staticValue"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/StreamTimeSeriesPointsRequest.md b/docs/v2/Ontologies/models/StreamTimeSeriesPointsRequest.md deleted file mode 100644 index 6d7b86f47..000000000 --- a/docs/v2/Ontologies/models/StreamTimeSeriesPointsRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# StreamTimeSeriesPointsRequest - -StreamTimeSeriesPointsRequest - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**range** | Optional[TimeRange] | No | | -**aggregate** | Optional[AggregateTimeSeries] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/StreamTimeSeriesValuesRequest.md b/docs/v2/Ontologies/models/StreamTimeSeriesValuesRequest.md deleted file mode 100644 index 61e3a69f8..000000000 --- a/docs/v2/Ontologies/models/StreamTimeSeriesValuesRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# StreamTimeSeriesValuesRequest - -StreamTimeSeriesValuesRequest - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**range** | Optional[TimeRange] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/StreamingOutputFormat.md b/docs/v2/Ontologies/models/StreamingOutputFormat.md deleted file mode 100644 index f2cd8b958..000000000 --- a/docs/v2/Ontologies/models/StreamingOutputFormat.md +++ /dev/null @@ -1,13 +0,0 @@ -# StreamingOutputFormat - -Which format to serialize the binary stream in. -ARROW is more efficient for streaming a large sized response. - - -| **Value** | -| --------- | -| `"JSON"` | -| `"ARROW"` | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/StringConstant.md b/docs/v2/Ontologies/models/StringConstant.md deleted file mode 100644 index b6e2b7bb3..000000000 --- a/docs/v2/Ontologies/models/StringConstant.md +++ /dev/null @@ -1,12 +0,0 @@ -# StringConstant - -StringConstant - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**value** | str | Yes | | -**type** | Literal["constant"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/StringLengthConstraint.md b/docs/v2/Ontologies/models/StringLengthConstraint.md deleted file mode 100644 index f35990c67..000000000 --- a/docs/v2/Ontologies/models/StringLengthConstraint.md +++ /dev/null @@ -1,17 +0,0 @@ -# StringLengthConstraint - -The parameter value must have a length within the defined range. -*This range is always inclusive.* - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**lt** | Optional[Any] | No | Less than | -**lte** | Optional[Any] | No | Less than or equal | -**gt** | Optional[Any] | No | Greater than | -**gte** | Optional[Any] | No | Greater than or equal | -**type** | Literal["stringLength"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/StringRegexMatchConstraint.md b/docs/v2/Ontologies/models/StringRegexMatchConstraint.md deleted file mode 100644 index efe8a0cfa..000000000 --- a/docs/v2/Ontologies/models/StringRegexMatchConstraint.md +++ /dev/null @@ -1,14 +0,0 @@ -# StringRegexMatchConstraint - -The parameter value must match a predefined regular expression. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**regex** | str | Yes | The regular expression configured in the **Ontology Manager**. | -**configured_failure_message** | Optional[str] | No | The message indicating that the regular expression was not matched. This is configured per parameter in the **Ontology Manager**. | -**type** | Literal["stringRegexMatch"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/StructConstraint.md b/docs/v2/Ontologies/models/StructConstraint.md deleted file mode 100644 index 045d16513..000000000 --- a/docs/v2/Ontologies/models/StructConstraint.md +++ /dev/null @@ -1,12 +0,0 @@ -# StructConstraint - -StructConstraint - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**properties** | Dict[PropertyApiName, ValueTypeApiName] | Yes | A map of the properties of the struct type to the value type applied to that property. | -**type** | Literal["struct"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/StructEvaluatedConstraint.md b/docs/v2/Ontologies/models/StructEvaluatedConstraint.md deleted file mode 100644 index c59bfe9e5..000000000 --- a/docs/v2/Ontologies/models/StructEvaluatedConstraint.md +++ /dev/null @@ -1,12 +0,0 @@ -# StructEvaluatedConstraint - -Represents the validity of a singleton struct parameter. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**struct_fields** | Dict[StructParameterFieldApiName, StructFieldEvaluationResult] | Yes | | -**type** | Literal["struct"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/StructFieldApiName.md b/docs/v2/Ontologies/models/StructFieldApiName.md deleted file mode 100644 index 3d5dfa135..000000000 --- a/docs/v2/Ontologies/models/StructFieldApiName.md +++ /dev/null @@ -1,11 +0,0 @@ -# StructFieldApiName - -The name of a struct field in the Ontology. - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/StructFieldArgument.md b/docs/v2/Ontologies/models/StructFieldArgument.md deleted file mode 100644 index 4d0d1d2b1..000000000 --- a/docs/v2/Ontologies/models/StructFieldArgument.md +++ /dev/null @@ -1,17 +0,0 @@ -# StructFieldArgument - -Represents an argument used for an individual struct field. - - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -StructListParameterFieldArgument | structListParameterFieldValue -StructParameterFieldArgument | structParameterFieldValue - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/StructFieldEvaluatedConstraint.md b/docs/v2/Ontologies/models/StructFieldEvaluatedConstraint.md deleted file mode 100644 index 28bfae3c0..000000000 --- a/docs/v2/Ontologies/models/StructFieldEvaluatedConstraint.md +++ /dev/null @@ -1,32 +0,0 @@ -# StructFieldEvaluatedConstraint - -A constraint that an action struct parameter field value must satisfy in order to be considered valid. -Constraints can be configured on fields of struct parameters in the **Ontology Manager**. -Applicable constraints are determined dynamically based on parameter inputs. -Parameter values are evaluated against the final set of constraints. - -The type of the constraint. -| Type | Description | -|-----------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| `oneOf` | The struct parameter field has a manually predefined set of options. | -| `range` | The struct parameter field value must be within the defined range. | -| `stringLength` | The struct parameter field value must have a length within the defined range. | -| `stringRegexMatch` | The struct parameter field value must match a predefined regular expression. | -| `objectQueryResult` | The struct parameter field value must be the primary key of an object found within an object set. | - - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -OneOfConstraint | oneOf -RangeConstraint | range -ObjectQueryResultConstraint | objectQueryResult -StringLengthConstraint | stringLength -StringRegexMatchConstraint | stringRegexMatch - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/StructFieldEvaluationResult.md b/docs/v2/Ontologies/models/StructFieldEvaluationResult.md deleted file mode 100644 index 184f41960..000000000 --- a/docs/v2/Ontologies/models/StructFieldEvaluationResult.md +++ /dev/null @@ -1,13 +0,0 @@ -# StructFieldEvaluationResult - -Represents the validity of a struct parameter's fields against the configured constraints. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**result** | ValidationResult | Yes | | -**evaluated_constraints** | List[StructFieldEvaluatedConstraint] | Yes | | -**required** | bool | Yes | Represents whether the parameter is a required input to the action. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/StructFieldOfPropertyImplementation.md b/docs/v2/Ontologies/models/StructFieldOfPropertyImplementation.md deleted file mode 100644 index 95c951400..000000000 --- a/docs/v2/Ontologies/models/StructFieldOfPropertyImplementation.md +++ /dev/null @@ -1,13 +0,0 @@ -# StructFieldOfPropertyImplementation - -StructFieldOfPropertyImplementation - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**property_api_name** | PropertyApiName | Yes | | -**struct_field_api_name** | StructFieldApiName | Yes | | -**type** | Literal["structFieldOfProperty"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/StructFieldSelector.md b/docs/v2/Ontologies/models/StructFieldSelector.md deleted file mode 100644 index 8a5b46b51..000000000 --- a/docs/v2/Ontologies/models/StructFieldSelector.md +++ /dev/null @@ -1,16 +0,0 @@ -# StructFieldSelector - -A combination of a property identifier and the load level to apply to the property. You can select a reduced -value for arrays and the main value for structs. If the provided load level cannot be applied to the property -type, then it will be ignored. This selector is experimental and may not work in filters or sorts. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**property_api_name** | PropertyApiName | Yes | | -**struct_field_api_name** | StructFieldApiName | Yes | | -**type** | Literal["structField"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/StructFieldType.md b/docs/v2/Ontologies/models/StructFieldType.md deleted file mode 100644 index b017293ee..000000000 --- a/docs/v2/Ontologies/models/StructFieldType.md +++ /dev/null @@ -1,13 +0,0 @@ -# StructFieldType - -StructFieldType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**api_name** | StructFieldApiName | Yes | | -**rid** | StructFieldTypeRid | Yes | | -**data_type** | ObjectPropertyType | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/StructFieldTypeRid.md b/docs/v2/Ontologies/models/StructFieldTypeRid.md deleted file mode 100644 index fd888d31f..000000000 --- a/docs/v2/Ontologies/models/StructFieldTypeRid.md +++ /dev/null @@ -1,11 +0,0 @@ -# StructFieldTypeRid - -The unique resource identifier of a struct field, useful for interacting with other Foundry APIs. - -## Type -```python -RID -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/StructListParameterFieldArgument.md b/docs/v2/Ontologies/models/StructListParameterFieldArgument.md deleted file mode 100644 index 26d93a037..000000000 --- a/docs/v2/Ontologies/models/StructListParameterFieldArgument.md +++ /dev/null @@ -1,13 +0,0 @@ -# StructListParameterFieldArgument - -Represents a struct list parameter field argument in a logic rule. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**parameter_id** | ParameterId | Yes | | -**struct_parameter_field_api_name** | StructParameterFieldApiName | Yes | | -**type** | Literal["structListParameterFieldValue"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/StructParameterFieldApiName.md b/docs/v2/Ontologies/models/StructParameterFieldApiName.md deleted file mode 100644 index dfd7d293a..000000000 --- a/docs/v2/Ontologies/models/StructParameterFieldApiName.md +++ /dev/null @@ -1,12 +0,0 @@ -# StructParameterFieldApiName - -The unique identifier of the struct parameter field. - - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/StructParameterFieldArgument.md b/docs/v2/Ontologies/models/StructParameterFieldArgument.md deleted file mode 100644 index 7d1c17364..000000000 --- a/docs/v2/Ontologies/models/StructParameterFieldArgument.md +++ /dev/null @@ -1,13 +0,0 @@ -# StructParameterFieldArgument - -Represents a struct parameter field argument in a logic rule. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**parameter_id** | ParameterId | Yes | | -**struct_parameter_field_api_name** | StructParameterFieldApiName | Yes | | -**type** | Literal["structParameterFieldValue"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/StructType.md b/docs/v2/Ontologies/models/StructType.md deleted file mode 100644 index ab75e8fe2..000000000 --- a/docs/v2/Ontologies/models/StructType.md +++ /dev/null @@ -1,13 +0,0 @@ -# StructType - -StructType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**struct_field_types** | List[StructFieldType] | Yes | | -**main_value** | Optional[StructTypeMainValue] | No | | -**type** | Literal["struct"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/StructTypeMainValue.md b/docs/v2/Ontologies/models/StructTypeMainValue.md deleted file mode 100644 index f18746b04..000000000 --- a/docs/v2/Ontologies/models/StructTypeMainValue.md +++ /dev/null @@ -1,12 +0,0 @@ -# StructTypeMainValue - -StructTypeMainValue - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**main_value_type** | ObjectPropertyType | Yes | | -**fields** | List[StructFieldApiName] | Yes | The fields which comprise the main value of the struct. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/SubmissionCriteriaEvaluation.md b/docs/v2/Ontologies/models/SubmissionCriteriaEvaluation.md deleted file mode 100644 index 66c833432..000000000 --- a/docs/v2/Ontologies/models/SubmissionCriteriaEvaluation.md +++ /dev/null @@ -1,15 +0,0 @@ -# SubmissionCriteriaEvaluation - -Contains the status of the **submission criteria**. -**Submission criteria** are the prerequisites that need to be satisfied before an Action can be applied. -These are configured in the **Ontology Manager**. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**configured_failure_message** | Optional[str] | No | The message indicating one of the **submission criteria** was not satisfied. This is configured per **submission criteria** in the **Ontology Manager**. | -**result** | ValidationResult | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/SubtractPropertyExpression.md b/docs/v2/Ontologies/models/SubtractPropertyExpression.md deleted file mode 100644 index 4f0754e43..000000000 --- a/docs/v2/Ontologies/models/SubtractPropertyExpression.md +++ /dev/null @@ -1,14 +0,0 @@ -# SubtractPropertyExpression - -Subtracts the right numeric value from the left numeric value. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**left** | DerivedPropertyDefinition | Yes | | -**right** | DerivedPropertyDefinition | Yes | | -**type** | Literal["subtract"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/SumAggregationV2.md b/docs/v2/Ontologies/models/SumAggregationV2.md deleted file mode 100644 index 99fa61936..000000000 --- a/docs/v2/Ontologies/models/SumAggregationV2.md +++ /dev/null @@ -1,14 +0,0 @@ -# SumAggregationV2 - -Computes the sum of values for the provided field. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**field** | PropertyApiName | Yes | | -**name** | Optional[AggregationMetricName] | No | | -**direction** | Optional[OrderByDirection] | No | | -**type** | Literal["sum"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/SyncApplyActionResponseV2.md b/docs/v2/Ontologies/models/SyncApplyActionResponseV2.md deleted file mode 100644 index 58e5884e7..000000000 --- a/docs/v2/Ontologies/models/SyncApplyActionResponseV2.md +++ /dev/null @@ -1,12 +0,0 @@ -# SyncApplyActionResponseV2 - -SyncApplyActionResponseV2 - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**validation** | Optional[ValidateActionResponseV2] | No | | -**edits** | Optional[ActionResults] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/SynchronousWebhookOutputArgument.md b/docs/v2/Ontologies/models/SynchronousWebhookOutputArgument.md deleted file mode 100644 index bc4d3f6be..000000000 --- a/docs/v2/Ontologies/models/SynchronousWebhookOutputArgument.md +++ /dev/null @@ -1,12 +0,0 @@ -# SynchronousWebhookOutputArgument - -Represents a synchronous webhook output argument in a logic rule. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**webhook_output_param_name** | str | Yes | The name of the webhook output parameter. | -**type** | Literal["synchronousWebhookOutput"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ThreeDimensionalAggregation.md b/docs/v2/Ontologies/models/ThreeDimensionalAggregation.md deleted file mode 100644 index 9fb4c0c8a..000000000 --- a/docs/v2/Ontologies/models/ThreeDimensionalAggregation.md +++ /dev/null @@ -1,13 +0,0 @@ -# ThreeDimensionalAggregation - -ThreeDimensionalAggregation - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**key_type** | QueryAggregationKeyType | Yes | | -**value_type** | TwoDimensionalAggregation | Yes | | -**type** | Literal["threeDimensionalAggregation"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/TimeCodeFormat.md b/docs/v2/Ontologies/models/TimeCodeFormat.md deleted file mode 100644 index 3b9e4bcd2..000000000 --- a/docs/v2/Ontologies/models/TimeCodeFormat.md +++ /dev/null @@ -1,11 +0,0 @@ -# TimeCodeFormat - -Formats the duration in a timecode format. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["timecode"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/TimeRange.md b/docs/v2/Ontologies/models/TimeRange.md deleted file mode 100644 index 33f5b1e01..000000000 --- a/docs/v2/Ontologies/models/TimeRange.md +++ /dev/null @@ -1,16 +0,0 @@ -# TimeRange - -An absolute or relative range for a time series query. - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -AbsoluteTimeRange | absolute -RelativeTimeRange | relative - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/TimeSeriesAggregationMethod.md b/docs/v2/Ontologies/models/TimeSeriesAggregationMethod.md deleted file mode 100644 index 6e8f1d455..000000000 --- a/docs/v2/Ontologies/models/TimeSeriesAggregationMethod.md +++ /dev/null @@ -1,21 +0,0 @@ -# TimeSeriesAggregationMethod - -The aggregation function to use for aggregating time series data. - - -| **Value** | -| --------- | -| `"SUM"` | -| `"MEAN"` | -| `"STANDARD_DEVIATION"` | -| `"MAX"` | -| `"MIN"` | -| `"PERCENT_CHANGE"` | -| `"DIFFERENCE"` | -| `"PRODUCT"` | -| `"COUNT"` | -| `"FIRST"` | -| `"LAST"` | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/TimeSeriesAggregationStrategy.md b/docs/v2/Ontologies/models/TimeSeriesAggregationStrategy.md deleted file mode 100644 index df29a155d..000000000 --- a/docs/v2/Ontologies/models/TimeSeriesAggregationStrategy.md +++ /dev/null @@ -1,21 +0,0 @@ -# TimeSeriesAggregationStrategy - -CUMULATIVE aggregates all points up to the current point. -ROLLING aggregates all points in a rolling window whose size is either the specified number of points or -time duration. -PERIODIC aggregates all points in specified time windows. - - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -TimeSeriesRollingAggregate | rolling -TimeSeriesPeriodicAggregate | periodic -TimeSeriesCumulativeAggregate | cumulative - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/TimeSeriesCumulativeAggregate.md b/docs/v2/Ontologies/models/TimeSeriesCumulativeAggregate.md deleted file mode 100644 index 5078f8e9d..000000000 --- a/docs/v2/Ontologies/models/TimeSeriesCumulativeAggregate.md +++ /dev/null @@ -1,13 +0,0 @@ -# TimeSeriesCumulativeAggregate - -The cumulative aggregate is calculated progressively for each point in the input time series, -considering all preceding points up to and including the current point. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["cumulative"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/TimeSeriesPeriodicAggregate.md b/docs/v2/Ontologies/models/TimeSeriesPeriodicAggregate.md deleted file mode 100644 index 1ac1e4a81..000000000 --- a/docs/v2/Ontologies/models/TimeSeriesPeriodicAggregate.md +++ /dev/null @@ -1,23 +0,0 @@ -# TimeSeriesPeriodicAggregate - -Aggregates values over discrete, periodic windows for a given time series. - -A periodic window divides the time series into windows of fixed durations. -For each window, an aggregate function is applied to the points within that window. The result is a time series -with values representing the aggregate for each window. Windows with no data points are not included -in the output. - -Periodic aggregation is useful for downsampling a continuous stream of data to larger granularities such as -hourly, daily, monthly. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**window_size** | PreciseDuration | Yes | | -**alignment_timestamp** | Optional[datetime] | No | The timestamp used to align the result, such that ticks in the result time series will lie at integer multiples of the window duration from the alignment timestamp. Default is the first epoch timestamp (January 1, 1970, 00:00:00 UTC) so that all aggregated points have timestamps at midnight UTC at the start of each window duration. For example, for a weekly aggregate with alignment timestamp 5 January, 8:33PM, each aggregated timestamp will lie on the 7 day intervals at 8:33PM starting at 5 January. | -**window_type** | TimeSeriesWindowType | Yes | | -**type** | Literal["periodic"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/TimeSeriesPoint.md b/docs/v2/Ontologies/models/TimeSeriesPoint.md deleted file mode 100644 index 23fa01c0d..000000000 --- a/docs/v2/Ontologies/models/TimeSeriesPoint.md +++ /dev/null @@ -1,13 +0,0 @@ -# TimeSeriesPoint - -A time and value pair. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**time** | datetime | Yes | An ISO 8601 timestamp | -**value** | Any | Yes | An object which is either an enum String or a double number. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/TimeSeriesRollingAggregate.md b/docs/v2/Ontologies/models/TimeSeriesRollingAggregate.md deleted file mode 100644 index 0b006453a..000000000 --- a/docs/v2/Ontologies/models/TimeSeriesRollingAggregate.md +++ /dev/null @@ -1,12 +0,0 @@ -# TimeSeriesRollingAggregate - -TimeSeriesRollingAggregate - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**window_size** | TimeSeriesRollingAggregateWindow | Yes | | -**type** | Literal["rolling"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/TimeSeriesRollingAggregateWindow.md b/docs/v2/Ontologies/models/TimeSeriesRollingAggregateWindow.md deleted file mode 100644 index d928e24eb..000000000 --- a/docs/v2/Ontologies/models/TimeSeriesRollingAggregateWindow.md +++ /dev/null @@ -1,22 +0,0 @@ -# TimeSeriesRollingAggregateWindow - -A rolling window is a moving subset of data points that ends at the current timestamp (inclusive) -and spans a specified duration (window size). As new data points are added, old points fall out of the -window if they are outside the specified duration. - -Rolling windows are commonly used for smoothing data, detecting trends, and reducing noise -in time series analysis. - - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -PreciseDuration | duration -RollingAggregateWindowPoints | pointsCount - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/TimeSeriesWindowType.md b/docs/v2/Ontologies/models/TimeSeriesWindowType.md deleted file mode 100644 index 4de9970df..000000000 --- a/docs/v2/Ontologies/models/TimeSeriesWindowType.md +++ /dev/null @@ -1,11 +0,0 @@ -# TimeSeriesWindowType - -TimeSeriesWindowType - -| **Value** | -| --------- | -| `"START"` | -| `"END"` | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/TimeUnit.md b/docs/v2/Ontologies/models/TimeUnit.md deleted file mode 100644 index 573ec5d0b..000000000 --- a/docs/v2/Ontologies/models/TimeUnit.md +++ /dev/null @@ -1,18 +0,0 @@ -# TimeUnit - -TimeUnit - -| **Value** | -| --------- | -| `"MILLISECONDS"` | -| `"SECONDS"` | -| `"MINUTES"` | -| `"HOURS"` | -| `"DAYS"` | -| `"WEEKS"` | -| `"MONTHS"` | -| `"YEARS"` | -| `"QUARTERS"` | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/TimeseriesEntry.md b/docs/v2/Ontologies/models/TimeseriesEntry.md deleted file mode 100644 index 2c7247f0d..000000000 --- a/docs/v2/Ontologies/models/TimeseriesEntry.md +++ /dev/null @@ -1,13 +0,0 @@ -# TimeseriesEntry - -A time and value pair. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**time** | datetime | Yes | An ISO 8601 timestamp | -**value** | Any | Yes | An object which is either an enum String, double number, or a geopoint. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/TransactionEdit.md b/docs/v2/Ontologies/models/TransactionEdit.md deleted file mode 100644 index 62cd5ca5e..000000000 --- a/docs/v2/Ontologies/models/TransactionEdit.md +++ /dev/null @@ -1,19 +0,0 @@ -# TransactionEdit - -TransactionEdit - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -ModifyObjectEdit | modifyObject -DeleteObjectEdit | deleteObject -AddObjectEdit | addObject -DeleteLinkEdit | removeLink -AddLinkEdit | addLink - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/TwoDimensionalAggregation.md b/docs/v2/Ontologies/models/TwoDimensionalAggregation.md deleted file mode 100644 index b6f42990d..000000000 --- a/docs/v2/Ontologies/models/TwoDimensionalAggregation.md +++ /dev/null @@ -1,13 +0,0 @@ -# TwoDimensionalAggregation - -TwoDimensionalAggregation - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**key_type** | QueryAggregationKeyType | Yes | | -**value_type** | QueryAggregationValueType | Yes | | -**type** | Literal["twoDimensionalAggregation"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/UnevaluableConstraint.md b/docs/v2/Ontologies/models/UnevaluableConstraint.md deleted file mode 100644 index 14eb00cb3..000000000 --- a/docs/v2/Ontologies/models/UnevaluableConstraint.md +++ /dev/null @@ -1,13 +0,0 @@ -# UnevaluableConstraint - -The parameter cannot be evaluated because it depends on another parameter or object set that can't be evaluated. -This can happen when a parameter's allowed values are defined by another parameter that is missing or invalid. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["unevaluable"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/UniqueIdentifierArgument.md b/docs/v2/Ontologies/models/UniqueIdentifierArgument.md deleted file mode 100644 index 5484e5636..000000000 --- a/docs/v2/Ontologies/models/UniqueIdentifierArgument.md +++ /dev/null @@ -1,12 +0,0 @@ -# UniqueIdentifierArgument - -Represents a unique identifier argument in a logic rule. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**link_id** | Optional[UUID] | No | By default all UniqueIdentifier Logic Rule arguments will generate different UUID. If the linkId is present all Logic Rules with the same linkId will all have the same uuid generated as the value. | -**type** | Literal["uniqueIdentifier"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/UniqueIdentifierLinkId.md b/docs/v2/Ontologies/models/UniqueIdentifierLinkId.md deleted file mode 100644 index a3f77d313..000000000 --- a/docs/v2/Ontologies/models/UniqueIdentifierLinkId.md +++ /dev/null @@ -1,12 +0,0 @@ -# UniqueIdentifierLinkId - -A reference to a UniqueIdentifierArgument linkId defined for this action type. - - -## Type -```python -UUID -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/UniqueIdentifierValue.md b/docs/v2/Ontologies/models/UniqueIdentifierValue.md deleted file mode 100644 index 3dd696aab..000000000 --- a/docs/v2/Ontologies/models/UniqueIdentifierValue.md +++ /dev/null @@ -1,13 +0,0 @@ -# UniqueIdentifierValue - -An override value to be used for a UniqueIdentifier action parameter, instead of -the value being automatically generated. - - -## Type -```python -UUID -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/UuidConstraint.md b/docs/v2/Ontologies/models/UuidConstraint.md deleted file mode 100644 index 87168c215..000000000 --- a/docs/v2/Ontologies/models/UuidConstraint.md +++ /dev/null @@ -1,11 +0,0 @@ -# UuidConstraint - -The string must be a valid UUID (Universally Unique Identifier). - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["uuid"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ValidateActionResponseV2.md b/docs/v2/Ontologies/models/ValidateActionResponseV2.md deleted file mode 100644 index f3a2a2c40..000000000 --- a/docs/v2/Ontologies/models/ValidateActionResponseV2.md +++ /dev/null @@ -1,13 +0,0 @@ -# ValidateActionResponseV2 - -ValidateActionResponseV2 - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**result** | ValidationResult | Yes | | -**submission_criteria** | List[SubmissionCriteriaEvaluation] | Yes | | -**parameters** | Dict[ParameterId, ParameterEvaluationResult] | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ValidationResult.md b/docs/v2/Ontologies/models/ValidationResult.md deleted file mode 100644 index 6b6498fb0..000000000 --- a/docs/v2/Ontologies/models/ValidationResult.md +++ /dev/null @@ -1,12 +0,0 @@ -# ValidationResult - -Represents the state of a validation. - - -| **Value** | -| --------- | -| `"VALID"` | -| `"INVALID"` | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ValueType.md b/docs/v2/Ontologies/models/ValueType.md deleted file mode 100644 index 66896eba1..000000000 --- a/docs/v2/Ontologies/models/ValueType.md +++ /dev/null @@ -1,34 +0,0 @@ -# ValueType - -A string indicating the type of each data value. Note that these types can be nested, for example an array of -structs. - -| Type | JSON value | -|---------------------|-------------------------------------------------------------------------------------------------------------------| -| Array | `Array`, where `T` is the type of the array elements, e.g. `Array`. | -| Attachment | `Attachment` | -| Boolean | `Boolean` | -| Byte | `Byte` | -| CipherText | `CipherText` | -| Date | `LocalDate` | -| Decimal | `Decimal` | -| Double | `Double` | -| Float | `Float` | -| Integer | `Integer` | -| Long | `Long` | -| Marking | `Marking` | -| OntologyObject | `OntologyObject` where `T` is the API name of the referenced object type. | -| Short | `Short` | -| String | `String` | -| Struct | `Struct` where `T` contains field name and type pairs, e.g. `Struct<{ firstName: String, lastName: string }>` | -| Timeseries | `TimeSeries` where `T` is either `String` for an enum series or `Double` for a numeric series. | -| Timestamp | `Timestamp` | - - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ValueTypeApiName.md b/docs/v2/Ontologies/models/ValueTypeApiName.md deleted file mode 100644 index cf8087b95..000000000 --- a/docs/v2/Ontologies/models/ValueTypeApiName.md +++ /dev/null @@ -1,11 +0,0 @@ -# ValueTypeApiName - -The name of the value type in the API in camelCase format. - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ValueTypeArrayType.md b/docs/v2/Ontologies/models/ValueTypeArrayType.md deleted file mode 100644 index b3da6441a..000000000 --- a/docs/v2/Ontologies/models/ValueTypeArrayType.md +++ /dev/null @@ -1,12 +0,0 @@ -# ValueTypeArrayType - -ValueTypeArrayType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**sub_type** | Optional[ValueTypeFieldType] | No | | -**type** | Literal["array"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ValueTypeConstraint.md b/docs/v2/Ontologies/models/ValueTypeConstraint.md deleted file mode 100644 index 123210bb4..000000000 --- a/docs/v2/Ontologies/models/ValueTypeConstraint.md +++ /dev/null @@ -1,23 +0,0 @@ -# ValueTypeConstraint - -ValueTypeConstraint - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -StructConstraint | struct -RegexConstraint | regex -UnsupportedType | unsupported -ArrayConstraint | array -LengthConstraint | length -RangesConstraint | range -RidConstraint | rid -UuidConstraint | uuid -EnumConstraint | enum - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ValueTypeDecimalType.md b/docs/v2/Ontologies/models/ValueTypeDecimalType.md deleted file mode 100644 index e86a4ccb8..000000000 --- a/docs/v2/Ontologies/models/ValueTypeDecimalType.md +++ /dev/null @@ -1,11 +0,0 @@ -# ValueTypeDecimalType - -ValueTypeDecimalType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["decimal"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ValueTypeFieldType.md b/docs/v2/Ontologies/models/ValueTypeFieldType.md deleted file mode 100644 index 7d7a032a2..000000000 --- a/docs/v2/Ontologies/models/ValueTypeFieldType.md +++ /dev/null @@ -1,32 +0,0 @@ -# ValueTypeFieldType - -ValueTypeFieldType - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -DateType | date -ValueTypeStructType | struct -StringType | string -ByteType | byte -DoubleType | double -ValueTypeOptionalType | optional -IntegerType | integer -ValueTypeUnionType | union -FloatType | float -LongType | long -ValueTypeReferenceType | reference -BooleanType | boolean -ValueTypeArrayType | array -BinaryType | binary -ShortType | short -ValueTypeDecimalType | decimal -ValueTypeMapType | map -TimestampType | timestamp - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ValueTypeMapType.md b/docs/v2/Ontologies/models/ValueTypeMapType.md deleted file mode 100644 index 0a168c02a..000000000 --- a/docs/v2/Ontologies/models/ValueTypeMapType.md +++ /dev/null @@ -1,13 +0,0 @@ -# ValueTypeMapType - -ValueTypeMapType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**key_type** | Optional[ValueTypeFieldType] | No | | -**value_type** | Optional[ValueTypeFieldType] | No | | -**type** | Literal["map"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ValueTypeOptionalType.md b/docs/v2/Ontologies/models/ValueTypeOptionalType.md deleted file mode 100644 index 59f471e5c..000000000 --- a/docs/v2/Ontologies/models/ValueTypeOptionalType.md +++ /dev/null @@ -1,12 +0,0 @@ -# ValueTypeOptionalType - -ValueTypeOptionalType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**wrapped_type** | Optional[ValueTypeFieldType] | No | | -**type** | Literal["optional"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ValueTypeReferenceType.md b/docs/v2/Ontologies/models/ValueTypeReferenceType.md deleted file mode 100644 index ccedb4f7f..000000000 --- a/docs/v2/Ontologies/models/ValueTypeReferenceType.md +++ /dev/null @@ -1,11 +0,0 @@ -# ValueTypeReferenceType - -ValueTypeReferenceType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["reference"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ValueTypeRid.md b/docs/v2/Ontologies/models/ValueTypeRid.md deleted file mode 100644 index 6b3cd4dcd..000000000 --- a/docs/v2/Ontologies/models/ValueTypeRid.md +++ /dev/null @@ -1,11 +0,0 @@ -# ValueTypeRid - -ValueTypeRid - -## Type -```python -RID -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ValueTypeStatus.md b/docs/v2/Ontologies/models/ValueTypeStatus.md deleted file mode 100644 index 1d179225e..000000000 --- a/docs/v2/Ontologies/models/ValueTypeStatus.md +++ /dev/null @@ -1,11 +0,0 @@ -# ValueTypeStatus - -ValueTypeStatus - -| **Value** | -| --------- | -| `"ACTIVE"` | -| `"DEPRECATED"` | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ValueTypeStructField.md b/docs/v2/Ontologies/models/ValueTypeStructField.md deleted file mode 100644 index 9f82479bb..000000000 --- a/docs/v2/Ontologies/models/ValueTypeStructField.md +++ /dev/null @@ -1,12 +0,0 @@ -# ValueTypeStructField - -ValueTypeStructField - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**name** | Optional[StructFieldName] | No | | -**field_type** | Optional[ValueTypeFieldType] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ValueTypeStructType.md b/docs/v2/Ontologies/models/ValueTypeStructType.md deleted file mode 100644 index b1ef456b5..000000000 --- a/docs/v2/Ontologies/models/ValueTypeStructType.md +++ /dev/null @@ -1,12 +0,0 @@ -# ValueTypeStructType - -ValueTypeStructType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**fields** | List[ValueTypeStructField] | Yes | | -**type** | Literal["struct"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ValueTypeUnionType.md b/docs/v2/Ontologies/models/ValueTypeUnionType.md deleted file mode 100644 index 7ab541ad2..000000000 --- a/docs/v2/Ontologies/models/ValueTypeUnionType.md +++ /dev/null @@ -1,12 +0,0 @@ -# ValueTypeUnionType - -ValueTypeUnionType - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**member_types** | List[ValueTypeFieldType] | Yes | | -**type** | Literal["union"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/VersionedQueryTypeApiName.md b/docs/v2/Ontologies/models/VersionedQueryTypeApiName.md deleted file mode 100644 index 72c2b9bfb..000000000 --- a/docs/v2/Ontologies/models/VersionedQueryTypeApiName.md +++ /dev/null @@ -1,17 +0,0 @@ -# VersionedQueryTypeApiName - -The name of the Query in the API and an optional version identifier separated by a colon. -If the API name contains a colon, then a version identifier of either "latest" or a semantic version must -be included. -If the API does not contain a colon, then either the version identifier must be excluded or a version -identifier of a semantic version must be included. -Examples: 'myGroup:myFunction:latest', 'myGroup:myFunction:1.0.0', 'myFunction', 'myFunction:2.0.0' - - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/WildcardQuery.md b/docs/v2/Ontologies/models/WildcardQuery.md deleted file mode 100644 index bb971a677..000000000 --- a/docs/v2/Ontologies/models/WildcardQuery.md +++ /dev/null @@ -1,16 +0,0 @@ -# WildcardQuery - -Returns objects where the specified field matches the wildcard pattern provided. -Either `field` or `propertyIdentifier` can be supplied, but not both. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**field** | Optional[PropertyApiName] | No | | -**property_identifier** | Optional[PropertyIdentifier] | No | | -**value** | str | Yes | | -**type** | Literal["wildcard"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/WithinBoundingBoxPoint.md b/docs/v2/Ontologies/models/WithinBoundingBoxPoint.md deleted file mode 100644 index e476994d3..000000000 --- a/docs/v2/Ontologies/models/WithinBoundingBoxPoint.md +++ /dev/null @@ -1,11 +0,0 @@ -# WithinBoundingBoxPoint - -WithinBoundingBoxPoint - -## Type -```python -GeoPoint -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/WithinBoundingBoxQuery.md b/docs/v2/Ontologies/models/WithinBoundingBoxQuery.md deleted file mode 100644 index 687f93d51..000000000 --- a/docs/v2/Ontologies/models/WithinBoundingBoxQuery.md +++ /dev/null @@ -1,17 +0,0 @@ -# WithinBoundingBoxQuery - -Returns objects where the specified field contains a point within the bounding box provided. Allows you to -specify a property to query on by a variety of means. Either `field` or `propertyIdentifier` must be supplied, -but not both. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**field** | Optional[PropertyApiName] | No | | -**property_identifier** | Optional[PropertyIdentifier] | No | | -**value** | BoundingBoxValue | Yes | | -**type** | Literal["withinBoundingBox"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/WithinDistanceOfQuery.md b/docs/v2/Ontologies/models/WithinDistanceOfQuery.md deleted file mode 100644 index 21c2d4c55..000000000 --- a/docs/v2/Ontologies/models/WithinDistanceOfQuery.md +++ /dev/null @@ -1,17 +0,0 @@ -# WithinDistanceOfQuery - -Returns objects where the specified field contains a point within the distance provided of the center point. -Allows you to specify a property to query on by a variety of means. Either `field` or `propertyIdentifier` -must be supplied, but not both. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**field** | Optional[PropertyApiName] | No | | -**property_identifier** | Optional[PropertyIdentifier] | No | | -**value** | CenterPoint | Yes | | -**type** | Literal["withinDistanceOf"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/WithinPolygonQuery.md b/docs/v2/Ontologies/models/WithinPolygonQuery.md deleted file mode 100644 index ea87ac920..000000000 --- a/docs/v2/Ontologies/models/WithinPolygonQuery.md +++ /dev/null @@ -1,17 +0,0 @@ -# WithinPolygonQuery - -Returns objects where the specified field contains a point within the polygon provided. Allows you to specify a -property to query on by a variety of means. Either `field` or `propertyIdentifier` must be supplied, but not -both. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**field** | Optional[PropertyApiName] | No | | -**property_identifier** | Optional[PropertyIdentifier] | No | | -**value** | PolygonValue | Yes | | -**type** | Literal["withinPolygon"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/Build.md b/docs/v2/Orchestration/Build.md deleted file mode 100644 index 0cab4956b..000000000 --- a/docs/v2/Orchestration/Build.md +++ /dev/null @@ -1,353 +0,0 @@ -# Build - -Method | HTTP request | Release Stage | -------------- | ------------- | ----- | -[**cancel**](#cancel) | **POST** /v2/orchestration/builds/{buildRid}/cancel | Stable | -[**create**](#create) | **POST** /v2/orchestration/builds/create | Stable | -[**get**](#get) | **GET** /v2/orchestration/builds/{buildRid} | Stable | -[**get_batch**](#get_batch) | **POST** /v2/orchestration/builds/getBatch | Stable | -[**jobs**](#jobs) | **GET** /v2/orchestration/builds/{buildRid}/jobs | Stable | -[**search**](#search) | **POST** /v2/orchestration/builds/search | Private Beta | - -# **cancel** -Request a cancellation for all unfinished jobs in a build. The build's status will not update immediately. This endpoint is asynchronous and a success response indicates that the cancellation request has been acknowledged and the build is expected to be canceled soon. If the build has already finished or finishes shortly after the request and before the cancellation, the build will not change. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**build_rid** | BuildRid | The RID of a Build. | | - -### Return type -**None** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# BuildRid | The RID of a Build. -build_rid = "ri.foundry.main.build.a4386b7e-d546-49be-8a36-eefc355f5c58" - - -try: - api_response = client.orchestration.Build.cancel(build_rid) - print("The cancel response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Build.cancel: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**204** | None | | None | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **create** - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**fallback_branches** | FallbackBranches | | | -**target** | BuildTarget | The targets of the schedule. | | -**abort_on_failure** | Optional[AbortOnFailure] | | [optional] | -**branch_name** | Optional[BranchName] | The target branch the build should run on. | [optional] | -**force_build** | Optional[ForceBuild] | | [optional] | -**notifications_enabled** | Optional[NotificationsEnabled] | | [optional] | -**retry_backoff_duration** | Optional[RetryBackoffDuration] | | [optional] | -**retry_count** | Optional[RetryCount] | The number of retry attempts for failed jobs. | [optional] | - -### Return type -**Build** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# FallbackBranches -fallback_branches = [] -# BuildTarget | The targets of the schedule. -target = { - "type": "manual", - "targetRids": [ - "ri.foundry.main.dataset.4263bdd9-d6bc-4244-9cca-893c1a2aef62", - "ri.foundry.main.dataset.86939c1e-4256-41db-9fe7-e7ee9e0f752a", - ], -} -# Optional[AbortOnFailure] -abort_on_failure = False -# Optional[BranchName] | The target branch the build should run on. -branch_name = "master" -# Optional[ForceBuild] -force_build = None -# Optional[NotificationsEnabled] -notifications_enabled = None -# Optional[RetryBackoffDuration] -retry_backoff_duration = {"unit": "SECONDS", "value": 30} -# Optional[RetryCount] | The number of retry attempts for failed jobs. -retry_count = 1 - - -try: - api_response = client.orchestration.Build.create( - fallback_branches=fallback_branches, - target=target, - abort_on_failure=abort_on_failure, - branch_name=branch_name, - force_build=force_build, - notifications_enabled=notifications_enabled, - retry_backoff_duration=retry_backoff_duration, - retry_count=retry_count, - ) - print("The create response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Build.create: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | Build | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **get** -Get the Build with the specified rid. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**build_rid** | BuildRid | The RID of a Build. | | - -### Return type -**Build** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# BuildRid | The RID of a Build. -build_rid = "ri.foundry.main.build.a4386b7e-d546-49be-8a36-eefc355f5c58" - - -try: - api_response = client.orchestration.Build.get(build_rid) - print("The get response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Build.get: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | Build | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **get_batch** -Execute multiple get requests on Build. - -The maximum batch size for this endpoint is 100. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**body** | List[GetBuildsBatchRequestElement] | Body of the request | | - -### Return type -**GetBuildsBatchResponse** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# List[GetBuildsBatchRequestElement] | Body of the request -body = [{"buildRid": "ri.foundry.main.build.a4386b7e-d546-49be-8a36-eefc355f5c58"}] - - -try: - api_response = client.orchestration.Build.get_batch(body) - print("The get_batch response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Build.get_batch: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | GetBuildsBatchResponse | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **jobs** -Get the Jobs in the Build. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**build_rid** | BuildRid | The RID of a Build. | | -**page_size** | Optional[PageSize] | The page size to use for the endpoint. | [optional] | -**page_token** | Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. | [optional] | - -### Return type -**ListJobsOfBuildResponse** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# BuildRid | The RID of a Build. -build_rid = "ri.foundry.main.build.a4386b7e-d546-49be-8a36-eefc355f5c58" -# Optional[PageSize] | The page size to use for the endpoint. -page_size = None -# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. -page_token = None - - -try: - for build in client.orchestration.Build.jobs( - build_rid, page_size=page_size, page_token=page_token - ): - pprint(build) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Build.jobs: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | ListJobsOfBuildResponse | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **search** -Search for Builds. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**where** | SearchBuildsFilter | | | -**order_by** | Optional[SearchBuildsOrderBy] | | [optional] | -**page_size** | Optional[PageSize] | The page size for the search request. If no value is provided, a default of `100` will be used. | [optional] | -**page_token** | Optional[PageToken] | | [optional] | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**SearchBuildsResponse** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# SearchBuildsFilter -where = None -# Optional[SearchBuildsOrderBy] -order_by = {"fields": [{"field": "STARTED_TIME", "direction": "ASC"}]} -# Optional[PageSize] | The page size for the search request. If no value is provided, a default of `100` will be used. -page_size = 100 -# Optional[PageToken] -page_token = "v1.QnVpbGQgdGhlIEZ1dHVyZTogaHR0cHM6Ly93d3cucGFsYW50aXIuY29tL2NhcmVlcnMvP2xldmVyLXNvdXJjZSU1YiU1ZD1BUElEb2NzI29wZW4tcG9zaXRpb25z" -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.orchestration.Build.search( - where=where, order_by=order_by, page_size=page_size, page_token=page_token, preview=preview - ) - print("The search response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Build.search: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | SearchBuildsResponse | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - diff --git a/docs/v2/Orchestration/Job.md b/docs/v2/Orchestration/Job.md deleted file mode 100644 index b565fc71b..000000000 --- a/docs/v2/Orchestration/Job.md +++ /dev/null @@ -1,109 +0,0 @@ -# Job - -Method | HTTP request | Release Stage | -------------- | ------------- | ----- | -[**get**](#get) | **GET** /v2/orchestration/jobs/{jobRid} | Public Beta | -[**get_batch**](#get_batch) | **POST** /v2/orchestration/jobs/getBatch | Public Beta | - -# **get** -Get the Job with the specified rid. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**job_rid** | JobRid | The RID of a Job. | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**Job** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# JobRid | The RID of a Job. -job_rid = "ri.foundry.main.job.aaf94076-d773-4732-a1df-3b638eb50448" -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.orchestration.Job.get(job_rid, preview=preview) - print("The get response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Job.get: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | Job | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **get_batch** -Execute multiple get requests on Job. - -The maximum batch size for this endpoint is 500. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**body** | List[GetJobsBatchRequestElement] | Body of the request | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**GetJobsBatchResponse** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# List[GetJobsBatchRequestElement] | Body of the request -body = [{"jobRid": "ri.foundry.main.job.aaf94076-d773-4732-a1df-3b638eb50448"}] -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.orchestration.Job.get_batch(body, preview=preview) - print("The get_batch response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Job.get_batch: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | GetJobsBatchResponse | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - diff --git a/docs/v2/Orchestration/Schedule.md b/docs/v2/Orchestration/Schedule.md deleted file mode 100644 index 8a1e38b08..000000000 --- a/docs/v2/Orchestration/Schedule.md +++ /dev/null @@ -1,586 +0,0 @@ -# Schedule - -Method | HTTP request | Release Stage | -------------- | ------------- | ----- | -[**create**](#create) | **POST** /v2/orchestration/schedules | Public Beta | -[**delete**](#delete) | **DELETE** /v2/orchestration/schedules/{scheduleRid} | Stable | -[**get**](#get) | **GET** /v2/orchestration/schedules/{scheduleRid} | Public Beta | -[**get_affected_resources**](#get_affected_resources) | **POST** /v2/orchestration/schedules/{scheduleRid}/getAffectedResources | Public Beta | -[**get_batch**](#get_batch) | **POST** /v2/orchestration/schedules/getBatch | Public Beta | -[**pause**](#pause) | **POST** /v2/orchestration/schedules/{scheduleRid}/pause | Stable | -[**replace**](#replace) | **PUT** /v2/orchestration/schedules/{scheduleRid} | Public Beta | -[**run**](#run) | **POST** /v2/orchestration/schedules/{scheduleRid}/run | Stable | -[**runs**](#runs) | **GET** /v2/orchestration/schedules/{scheduleRid}/runs | Stable | -[**unpause**](#unpause) | **POST** /v2/orchestration/schedules/{scheduleRid}/unpause | Stable | - -# **create** -Creates a new Schedule. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**action** | CreateScheduleRequestAction | | | -**description** | Optional[str] | | [optional] | -**display_name** | Optional[str] | | [optional] | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | -**scope_mode** | Optional[CreateScheduleRequestScopeMode] | | [optional] | -**trigger** | Optional[Trigger] | The schedule trigger. If the requesting user does not have permission to see the trigger, this will be empty. | [optional] | - -### Return type -**Schedule** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# CreateScheduleRequestAction -action = { - "abortOnFailure": False, - "forceBuild": False, - "retryBackoffDuration": {"unit": "SECONDS", "value": 30}, - "retryCount": 1, - "fallbackBranches": [], - "branchName": "master", - "notificationsEnabled": False, - "target": { - "type": "manual", - "targetRids": [ - "ri.foundry.main.dataset.b737e24d-6b19-43aa-93d5-da9fc4073f6e", - "ri.foundry.main.dataset.d2452a94-a755-4778-8bfc-a315ab52fc43", - ], - }, -} -# Optional[str] -description = "Run all the transforms at midnight" -# Optional[str] -display_name = "My Daily Schedule" -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None -# Optional[CreateScheduleRequestScopeMode] -scope_mode = {"type": "user"} -# Optional[Trigger] | The schedule trigger. If the requesting user does not have permission to see the trigger, this will be empty. -trigger = {"type": "time", "cronExpression": "0 0 * * *", "timeZone": "UTC"} - - -try: - api_response = client.orchestration.Schedule.create( - action=action, - description=description, - display_name=display_name, - preview=preview, - scope_mode=scope_mode, - trigger=trigger, - ) - print("The create response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Schedule.create: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | Schedule | The created Schedule | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **delete** -Delete the Schedule with the specified rid. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**schedule_rid** | ScheduleRid | | | - -### Return type -**None** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# ScheduleRid -schedule_rid = None - - -try: - api_response = client.orchestration.Schedule.delete(schedule_rid) - print("The delete response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Schedule.delete: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**204** | None | | None | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **get** -Get the Schedule with the specified rid. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**schedule_rid** | ScheduleRid | | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**Schedule** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# ScheduleRid -schedule_rid = None -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.orchestration.Schedule.get(schedule_rid, preview=preview) - print("The get response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Schedule.get: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | Schedule | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **get_affected_resources** - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**schedule_rid** | ScheduleRid | | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**AffectedResourcesResponse** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# ScheduleRid -schedule_rid = None -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.orchestration.Schedule.get_affected_resources( - schedule_rid, preview=preview - ) - print("The get_affected_resources response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Schedule.get_affected_resources: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | AffectedResourcesResponse | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **get_batch** -Fetch multiple schedules in a single request. Schedules not found or inaccessible to the user will be -omitted from the response. - - -The maximum batch size for this endpoint is 1000. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**body** | List[GetSchedulesBatchRequestElement] | Body of the request | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**GetSchedulesBatchResponse** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# List[GetSchedulesBatchRequestElement] | Body of the request -body = [{"scheduleRid": "ri.scheduler.main.schedule.5ad5c340-59f3-4a60-9fc6-161bb984f871"}] -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.orchestration.Schedule.get_batch(body, preview=preview) - print("The get_batch response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Schedule.get_batch: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | GetSchedulesBatchResponse | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **pause** - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**schedule_rid** | ScheduleRid | | | - -### Return type -**None** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# ScheduleRid -schedule_rid = None - - -try: - api_response = client.orchestration.Schedule.pause(schedule_rid) - print("The pause response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Schedule.pause: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**204** | None | | None | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **replace** -Replace the Schedule with the specified rid. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**schedule_rid** | ScheduleRid | | | -**action** | ReplaceScheduleRequestAction | | | -**description** | Optional[str] | | [optional] | -**display_name** | Optional[str] | | [optional] | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | -**scope_mode** | Optional[ReplaceScheduleRequestScopeMode] | | [optional] | -**trigger** | Optional[Trigger] | The schedule trigger. If the requesting user does not have permission to see the trigger, this will be empty. | [optional] | - -### Return type -**Schedule** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# ScheduleRid -schedule_rid = None -# ReplaceScheduleRequestAction -action = { - "abortOnFailure": False, - "forceBuild": False, - "retryBackoffDuration": {"unit": "SECONDS", "value": 30}, - "retryCount": 1, - "fallbackBranches": [], - "branchName": "master", - "notificationsEnabled": False, - "target": { - "type": "manual", - "targetRids": [ - "ri.foundry.main.dataset.b737e24d-6b19-43aa-93d5-da9fc4073f6e", - "ri.foundry.main.dataset.d2452a94-a755-4778-8bfc-a315ab52fc43", - ], - }, -} -# Optional[str] -description = "Run all the transforms at midnight" -# Optional[str] -display_name = "My Daily Schedule" -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None -# Optional[ReplaceScheduleRequestScopeMode] -scope_mode = {"type": "user"} -# Optional[Trigger] | The schedule trigger. If the requesting user does not have permission to see the trigger, this will be empty. -trigger = {"type": "time", "cronExpression": "0 0 * * *", "timeZone": "UTC"} - - -try: - api_response = client.orchestration.Schedule.replace( - schedule_rid, - action=action, - description=description, - display_name=display_name, - preview=preview, - scope_mode=scope_mode, - trigger=trigger, - ) - print("The replace response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Schedule.replace: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | Schedule | The replaced Schedule | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **run** - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**schedule_rid** | ScheduleRid | | | - -### Return type -**ScheduleRun** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# ScheduleRid -schedule_rid = None - - -try: - api_response = client.orchestration.Schedule.run(schedule_rid) - print("The run response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Schedule.run: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | ScheduleRun | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **runs** -Get the most recent runs of a Schedule. If no page size is provided, a page size of 100 will be used. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**schedule_rid** | ScheduleRid | | | -**page_size** | Optional[PageSize] | The page size to use for the endpoint. | [optional] | -**page_token** | Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. | [optional] | - -### Return type -**ListRunsOfScheduleResponse** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# ScheduleRid -schedule_rid = None -# Optional[PageSize] | The page size to use for the endpoint. -page_size = None -# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. -page_token = None - - -try: - for schedule in client.orchestration.Schedule.runs( - schedule_rid, page_size=page_size, page_token=page_token - ): - pprint(schedule) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Schedule.runs: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | ListRunsOfScheduleResponse | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **unpause** - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**schedule_rid** | ScheduleRid | | | - -### Return type -**None** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# ScheduleRid -schedule_rid = None - - -try: - api_response = client.orchestration.Schedule.unpause(schedule_rid) - print("The unpause response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Schedule.unpause: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**204** | None | | None | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - diff --git a/docs/v2/Orchestration/ScheduleRun.md b/docs/v2/Orchestration/ScheduleRun.md deleted file mode 100644 index aa0391e24..000000000 --- a/docs/v2/Orchestration/ScheduleRun.md +++ /dev/null @@ -1,5 +0,0 @@ -# ScheduleRun - -Method | HTTP request | Release Stage | -------------- | ------------- | ----- | - diff --git a/docs/v2/Orchestration/ScheduleVersion.md b/docs/v2/Orchestration/ScheduleVersion.md deleted file mode 100644 index 6475dfa08..000000000 --- a/docs/v2/Orchestration/ScheduleVersion.md +++ /dev/null @@ -1,109 +0,0 @@ -# ScheduleVersion - -Method | HTTP request | Release Stage | -------------- | ------------- | ----- | -[**get**](#get) | **GET** /v2/orchestration/scheduleVersions/{scheduleVersionRid} | Public Beta | -[**schedule**](#schedule) | **GET** /v2/orchestration/scheduleVersions/{scheduleVersionRid}/schedule | Public Beta | - -# **get** -Get the ScheduleVersion with the specified rid. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**schedule_version_rid** | ScheduleVersionRid | The RID of a schedule version | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**ScheduleVersion** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# ScheduleVersionRid | The RID of a schedule version -schedule_version_rid = "ri.scheduler.main.schedule-version.4d1eb55f-6c13-411c-a911-5d84e08d8017" -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.orchestration.ScheduleVersion.get(schedule_version_rid, preview=preview) - print("The get response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling ScheduleVersion.get: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | ScheduleVersion | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **schedule** - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**schedule_version_rid** | ScheduleVersionRid | The RID of a schedule version | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**Optional[Schedule]** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# ScheduleVersionRid | The RID of a schedule version -schedule_version_rid = "ri.scheduler.main.schedule-version.4d1eb55f-6c13-411c-a911-5d84e08d8017" -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.orchestration.ScheduleVersion.schedule( - schedule_version_rid, preview=preview - ) - print("The schedule response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling ScheduleVersion.schedule: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | Optional[Schedule] | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - diff --git a/docs/v2/Orchestration/models/AbortOnFailure.md b/docs/v2/Orchestration/models/AbortOnFailure.md deleted file mode 100644 index dfc79d585..000000000 --- a/docs/v2/Orchestration/models/AbortOnFailure.md +++ /dev/null @@ -1,13 +0,0 @@ -# AbortOnFailure - -If any job in the build is unsuccessful, immediately finish the -build by cancelling all other jobs. - - -## Type -```python -bool -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/Action.md b/docs/v2/Orchestration/models/Action.md deleted file mode 100644 index c2e145a78..000000000 --- a/docs/v2/Orchestration/models/Action.md +++ /dev/null @@ -1,18 +0,0 @@ -# Action - -Action - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**target** | BuildTarget | Yes | | -**branch_name** | BranchName | Yes | The target branch the schedule should run on. | -**fallback_branches** | FallbackBranches | Yes | | -**force_build** | ForceBuild | Yes | | -**retry_count** | Optional[RetryCount] | No | | -**retry_backoff_duration** | Optional[RetryBackoffDuration] | No | | -**abort_on_failure** | AbortOnFailure | Yes | | -**notifications_enabled** | NotificationsEnabled | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/AffectedResourcesResponse.md b/docs/v2/Orchestration/models/AffectedResourcesResponse.md deleted file mode 100644 index d323f4fb5..000000000 --- a/docs/v2/Orchestration/models/AffectedResourcesResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# AffectedResourcesResponse - -AffectedResourcesResponse - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**datasets** | List[BuildableRid] | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/AndTrigger.md b/docs/v2/Orchestration/models/AndTrigger.md deleted file mode 100644 index 5de996e05..000000000 --- a/docs/v2/Orchestration/models/AndTrigger.md +++ /dev/null @@ -1,12 +0,0 @@ -# AndTrigger - -Trigger after all of the given triggers emit an event. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**triggers** | List[Trigger] | Yes | | -**type** | Literal["and"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/Build.md b/docs/v2/Orchestration/models/Build.md deleted file mode 100644 index 30b71af62..000000000 --- a/docs/v2/Orchestration/models/Build.md +++ /dev/null @@ -1,21 +0,0 @@ -# Build - -Build - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**rid** | BuildRid | Yes | The RID of a Build. | -**branch_name** | BranchName | Yes | The branch that the build is running on. | -**created_time** | CreatedTime | Yes | The timestamp that the build was created. | -**created_by** | CreatedBy | Yes | The user who created the build. | -**fallback_branches** | FallbackBranches | Yes | | -**job_rids** | List[JobRid] | Yes | | -**retry_count** | RetryCount | Yes | | -**retry_backoff_duration** | RetryBackoffDuration | Yes | | -**abort_on_failure** | AbortOnFailure | Yes | | -**status** | BuildStatus | Yes | | -**schedule_rid** | Optional[ScheduleRid] | No | Schedule RID of the Schedule that triggered this build. If a user triggered the build, Schedule RID will be empty. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/BuildStatus.md b/docs/v2/Orchestration/models/BuildStatus.md deleted file mode 100644 index 2bbb5d4fb..000000000 --- a/docs/v2/Orchestration/models/BuildStatus.md +++ /dev/null @@ -1,13 +0,0 @@ -# BuildStatus - -The status of the build. - -| **Value** | -| --------- | -| `"RUNNING"` | -| `"SUCCEEDED"` | -| `"FAILED"` | -| `"CANCELED"` | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/BuildTarget.md b/docs/v2/Orchestration/models/BuildTarget.md deleted file mode 100644 index ff25a8f35..000000000 --- a/docs/v2/Orchestration/models/BuildTarget.md +++ /dev/null @@ -1,17 +0,0 @@ -# BuildTarget - -The targets of the build. - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -UpstreamTarget | upstream -ManualTarget | manual -ConnectingTarget | connecting - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/BuildableRid.md b/docs/v2/Orchestration/models/BuildableRid.md deleted file mode 100644 index 42a348e57..000000000 --- a/docs/v2/Orchestration/models/BuildableRid.md +++ /dev/null @@ -1,13 +0,0 @@ -# BuildableRid - -The Resource Identifier (RID) of a Resource that can be built. For example, this is a Dataset RID, Media Set -RID or Restricted View RID. - - -## Type -```python -RID -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/ConnectingTarget.md b/docs/v2/Orchestration/models/ConnectingTarget.md deleted file mode 100644 index 1a665f42b..000000000 --- a/docs/v2/Orchestration/models/ConnectingTarget.md +++ /dev/null @@ -1,16 +0,0 @@ -# ConnectingTarget - -All datasets between the input datasets (exclusive) and the -target datasets (inclusive) except for the datasets to ignore. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**input_rids** | List[BuildableRid] | Yes | The upstream input datasets (exclusive). | -**target_rids** | List[BuildableRid] | Yes | The downstream target datasets (inclusive). | -**ignored_rids** | List[BuildableRid] | Yes | The datasets between the input datasets and target datasets to exclude. | -**type** | Literal["connecting"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/CreateBuildRequest.md b/docs/v2/Orchestration/models/CreateBuildRequest.md deleted file mode 100644 index f86e22889..000000000 --- a/docs/v2/Orchestration/models/CreateBuildRequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# CreateBuildRequest - -CreateBuildRequest - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**target** | BuildTarget | Yes | The targets of the schedule. | -**branch_name** | Optional[BranchName] | No | The target branch the build should run on. | -**fallback_branches** | FallbackBranches | Yes | | -**force_build** | Optional[ForceBuild] | No | | -**retry_count** | Optional[RetryCount] | No | The number of retry attempts for failed jobs. | -**retry_backoff_duration** | Optional[RetryBackoffDuration] | No | | -**abort_on_failure** | Optional[AbortOnFailure] | No | | -**notifications_enabled** | Optional[NotificationsEnabled] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/CreateScheduleRequest.md b/docs/v2/Orchestration/models/CreateScheduleRequest.md deleted file mode 100644 index 4b07a6db8..000000000 --- a/docs/v2/Orchestration/models/CreateScheduleRequest.md +++ /dev/null @@ -1,15 +0,0 @@ -# CreateScheduleRequest - -CreateScheduleRequest - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**display_name** | Optional[str] | No | | -**description** | Optional[str] | No | | -**action** | CreateScheduleRequestAction | Yes | | -**trigger** | Optional[Trigger] | No | The schedule trigger. If the requesting user does not have permission to see the trigger, this will be empty. | -**scope_mode** | Optional[CreateScheduleRequestScopeMode] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/CreateScheduleRequestAction.md b/docs/v2/Orchestration/models/CreateScheduleRequestAction.md deleted file mode 100644 index 4066d01b4..000000000 --- a/docs/v2/Orchestration/models/CreateScheduleRequestAction.md +++ /dev/null @@ -1,18 +0,0 @@ -# CreateScheduleRequestAction - -CreateScheduleRequestAction - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**abort_on_failure** | Optional[AbortOnFailure] | No | | -**force_build** | Optional[ForceBuild] | No | | -**retry_backoff_duration** | Optional[RetryBackoffDuration] | No | | -**retry_count** | Optional[RetryCount] | No | | -**fallback_branches** | Optional[FallbackBranches] | No | | -**branch_name** | Optional[BranchName] | No | The target branch the schedule should run on. | -**notifications_enabled** | Optional[NotificationsEnabled] | No | | -**target** | CreateScheduleRequestBuildTarget | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/CreateScheduleRequestBuildTarget.md b/docs/v2/Orchestration/models/CreateScheduleRequestBuildTarget.md deleted file mode 100644 index 8eb59f1cd..000000000 --- a/docs/v2/Orchestration/models/CreateScheduleRequestBuildTarget.md +++ /dev/null @@ -1,17 +0,0 @@ -# CreateScheduleRequestBuildTarget - -The targets of the build. - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -CreateScheduleRequestUpstreamTarget | upstream -CreateScheduleRequestManualTarget | manual -CreateScheduleRequestConnectingTarget | connecting - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/CreateScheduleRequestConnectingTarget.md b/docs/v2/Orchestration/models/CreateScheduleRequestConnectingTarget.md deleted file mode 100644 index 7d0a3c68f..000000000 --- a/docs/v2/Orchestration/models/CreateScheduleRequestConnectingTarget.md +++ /dev/null @@ -1,14 +0,0 @@ -# CreateScheduleRequestConnectingTarget - -CreateScheduleRequestConnectingTarget - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**ignored_rids** | Optional[List[BuildableRid]] | No | The datasets between the input datasets and target datasets to exclude. | -**target_rids** | List[BuildableRid] | Yes | The downstream target datasets (inclusive). | -**input_rids** | List[BuildableRid] | Yes | The upstream input datasets (exclusive). | -**type** | Literal["connecting"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/CreateScheduleRequestManualTarget.md b/docs/v2/Orchestration/models/CreateScheduleRequestManualTarget.md deleted file mode 100644 index d3d495e7a..000000000 --- a/docs/v2/Orchestration/models/CreateScheduleRequestManualTarget.md +++ /dev/null @@ -1,12 +0,0 @@ -# CreateScheduleRequestManualTarget - -CreateScheduleRequestManualTarget - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**target_rids** | List[BuildableRid] | Yes | | -**type** | Literal["manual"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/CreateScheduleRequestProjectScope.md b/docs/v2/Orchestration/models/CreateScheduleRequestProjectScope.md deleted file mode 100644 index 3db389df3..000000000 --- a/docs/v2/Orchestration/models/CreateScheduleRequestProjectScope.md +++ /dev/null @@ -1,12 +0,0 @@ -# CreateScheduleRequestProjectScope - -CreateScheduleRequestProjectScope - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**project_rids** | List[ProjectRid] | Yes | | -**type** | Literal["project"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/CreateScheduleRequestScopeMode.md b/docs/v2/Orchestration/models/CreateScheduleRequestScopeMode.md deleted file mode 100644 index 53f187277..000000000 --- a/docs/v2/Orchestration/models/CreateScheduleRequestScopeMode.md +++ /dev/null @@ -1,16 +0,0 @@ -# CreateScheduleRequestScopeMode - -The boundaries for the schedule build. - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -CreateScheduleRequestProjectScope | project -CreateScheduleRequestUserScope | user - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/CreateScheduleRequestUpstreamTarget.md b/docs/v2/Orchestration/models/CreateScheduleRequestUpstreamTarget.md deleted file mode 100644 index c8feeb3b6..000000000 --- a/docs/v2/Orchestration/models/CreateScheduleRequestUpstreamTarget.md +++ /dev/null @@ -1,13 +0,0 @@ -# CreateScheduleRequestUpstreamTarget - -CreateScheduleRequestUpstreamTarget - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**ignored_rids** | Optional[List[BuildableRid]] | No | The datasets to ignore when calculating the final set of dataset to build. | -**target_rids** | List[BuildableRid] | Yes | The target datasets. | -**type** | Literal["upstream"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/CreateScheduleRequestUserScope.md b/docs/v2/Orchestration/models/CreateScheduleRequestUserScope.md deleted file mode 100644 index f6c12fb0c..000000000 --- a/docs/v2/Orchestration/models/CreateScheduleRequestUserScope.md +++ /dev/null @@ -1,11 +0,0 @@ -# CreateScheduleRequestUserScope - -CreateScheduleRequestUserScope - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["user"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/CronExpression.md b/docs/v2/Orchestration/models/CronExpression.md deleted file mode 100644 index 164a16512..000000000 --- a/docs/v2/Orchestration/models/CronExpression.md +++ /dev/null @@ -1,13 +0,0 @@ -# CronExpression - -A standard CRON expression with minute, hour, day, month -and day of week. - - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/DatasetJobOutput.md b/docs/v2/Orchestration/models/DatasetJobOutput.md deleted file mode 100644 index cd668685c..000000000 --- a/docs/v2/Orchestration/models/DatasetJobOutput.md +++ /dev/null @@ -1,13 +0,0 @@ -# DatasetJobOutput - -DatasetJobOutput - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**dataset_rid** | DatasetRid | Yes | | -**output_transaction_rid** | Optional[TransactionRid] | No | | -**type** | Literal["datasetJobOutput"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/DatasetUpdatedTrigger.md b/docs/v2/Orchestration/models/DatasetUpdatedTrigger.md deleted file mode 100644 index 21f4b16b8..000000000 --- a/docs/v2/Orchestration/models/DatasetUpdatedTrigger.md +++ /dev/null @@ -1,15 +0,0 @@ -# DatasetUpdatedTrigger - -Trigger whenever a new transaction is committed to the -dataset on the target branch. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**dataset_rid** | DatasetRid | Yes | | -**branch_name** | BranchName | Yes | | -**type** | Literal["datasetUpdated"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/FallbackBranches.md b/docs/v2/Orchestration/models/FallbackBranches.md deleted file mode 100644 index 4858227e3..000000000 --- a/docs/v2/Orchestration/models/FallbackBranches.md +++ /dev/null @@ -1,13 +0,0 @@ -# FallbackBranches - -The branches to retrieve JobSpecs from if no JobSpec is found on the -target branch. - - -## Type -```python -List[BranchName] -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/ForceBuild.md b/docs/v2/Orchestration/models/ForceBuild.md deleted file mode 100644 index ab828bf31..000000000 --- a/docs/v2/Orchestration/models/ForceBuild.md +++ /dev/null @@ -1,11 +0,0 @@ -# ForceBuild - -Whether to ignore staleness information when running the build. - -## Type -```python -bool -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/GetBuildsBatchRequestElement.md b/docs/v2/Orchestration/models/GetBuildsBatchRequestElement.md deleted file mode 100644 index f2135a549..000000000 --- a/docs/v2/Orchestration/models/GetBuildsBatchRequestElement.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetBuildsBatchRequestElement - -GetBuildsBatchRequestElement - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**build_rid** | BuildRid | Yes | The RID of a Build. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/GetBuildsBatchResponse.md b/docs/v2/Orchestration/models/GetBuildsBatchResponse.md deleted file mode 100644 index 622eda446..000000000 --- a/docs/v2/Orchestration/models/GetBuildsBatchResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetBuildsBatchResponse - -GetBuildsBatchResponse - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**data** | Dict[BuildRid, Build] | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/GetJobsBatchRequestElement.md b/docs/v2/Orchestration/models/GetJobsBatchRequestElement.md deleted file mode 100644 index aab56314e..000000000 --- a/docs/v2/Orchestration/models/GetJobsBatchRequestElement.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetJobsBatchRequestElement - -GetJobsBatchRequestElement - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**job_rid** | JobRid | Yes | The RID of a Job. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/GetJobsBatchResponse.md b/docs/v2/Orchestration/models/GetJobsBatchResponse.md deleted file mode 100644 index f58d3e391..000000000 --- a/docs/v2/Orchestration/models/GetJobsBatchResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetJobsBatchResponse - -GetJobsBatchResponse - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**data** | Dict[JobRid, Job] | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/GetSchedulesBatchRequestElement.md b/docs/v2/Orchestration/models/GetSchedulesBatchRequestElement.md deleted file mode 100644 index 2f5cc0f9f..000000000 --- a/docs/v2/Orchestration/models/GetSchedulesBatchRequestElement.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetSchedulesBatchRequestElement - -GetSchedulesBatchRequestElement - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**schedule_rid** | ScheduleRid | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/GetSchedulesBatchResponse.md b/docs/v2/Orchestration/models/GetSchedulesBatchResponse.md deleted file mode 100644 index fda1505cf..000000000 --- a/docs/v2/Orchestration/models/GetSchedulesBatchResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetSchedulesBatchResponse - -GetSchedulesBatchResponse - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**data** | Dict[ScheduleRid, Schedule] | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/Job.md b/docs/v2/Orchestration/models/Job.md deleted file mode 100644 index 037797ecd..000000000 --- a/docs/v2/Orchestration/models/Job.md +++ /dev/null @@ -1,17 +0,0 @@ -# Job - -Job - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**rid** | JobRid | Yes | The RID of a Job. | -**build_rid** | BuildRid | Yes | The RID of the Build that the Job belongs to. | -**started_time** | JobStartedTime | Yes | The time this job started waiting for the dependencies to be resolved. | -**latest_attempt_start_time** | Optional[datetime] | No | The time this job's latest attempt started running. This field may be empty or outdated if the job failed to start. | -**finished_time** | Optional[datetime] | No | The time this job was finished. | -**job_status** | JobStatus | Yes | | -**outputs** | List[JobOutput] | Yes | Outputs of the Job. Only outputs with supported types are listed here; unsupported types are omitted. Currently supported types are Dataset and Media Set outputs. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/JobOutput.md b/docs/v2/Orchestration/models/JobOutput.md deleted file mode 100644 index 003b418e9..000000000 --- a/docs/v2/Orchestration/models/JobOutput.md +++ /dev/null @@ -1,17 +0,0 @@ -# JobOutput - -Other types of Job Outputs exist in Foundry. Currently, only Dataset and Media Set are supported by the API. - - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -DatasetJobOutput | datasetJobOutput -TransactionalMediaSetJobOutput | transactionalMediaSetJobOutput - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/JobStartedTime.md b/docs/v2/Orchestration/models/JobStartedTime.md deleted file mode 100644 index 313b08227..000000000 --- a/docs/v2/Orchestration/models/JobStartedTime.md +++ /dev/null @@ -1,11 +0,0 @@ -# JobStartedTime - -The time this job started waiting for the dependencies to be resolved. - -## Type -```python -datetime -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/JobStatus.md b/docs/v2/Orchestration/models/JobStatus.md deleted file mode 100644 index 47dc3a60a..000000000 --- a/docs/v2/Orchestration/models/JobStatus.md +++ /dev/null @@ -1,15 +0,0 @@ -# JobStatus - -The status of the job. - -| **Value** | -| --------- | -| `"WAITING"` | -| `"RUNNING"` | -| `"SUCCEEDED"` | -| `"FAILED"` | -| `"CANCELED"` | -| `"DID_NOT_RUN"` | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/JobSucceededTrigger.md b/docs/v2/Orchestration/models/JobSucceededTrigger.md deleted file mode 100644 index 3eeb12589..000000000 --- a/docs/v2/Orchestration/models/JobSucceededTrigger.md +++ /dev/null @@ -1,15 +0,0 @@ -# JobSucceededTrigger - -Trigger whenever a job succeeds on the dataset and on the target -branch. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**dataset_rid** | DatasetRid | Yes | | -**branch_name** | BranchName | Yes | | -**type** | Literal["jobSucceeded"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/ListJobsOfBuildResponse.md b/docs/v2/Orchestration/models/ListJobsOfBuildResponse.md deleted file mode 100644 index 89fd3bea8..000000000 --- a/docs/v2/Orchestration/models/ListJobsOfBuildResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListJobsOfBuildResponse - -ListJobsOfBuildResponse - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**data** | List[Job] | Yes | | -**next_page_token** | Optional[PageToken] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/ListRunsOfScheduleResponse.md b/docs/v2/Orchestration/models/ListRunsOfScheduleResponse.md deleted file mode 100644 index c0e591241..000000000 --- a/docs/v2/Orchestration/models/ListRunsOfScheduleResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListRunsOfScheduleResponse - -ListRunsOfScheduleResponse - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**data** | List[ScheduleRun] | Yes | | -**next_page_token** | Optional[PageToken] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/ManualTarget.md b/docs/v2/Orchestration/models/ManualTarget.md deleted file mode 100644 index 4e45c5eca..000000000 --- a/docs/v2/Orchestration/models/ManualTarget.md +++ /dev/null @@ -1,12 +0,0 @@ -# ManualTarget - -Manually specify all datasets to build. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**target_rids** | List[BuildableRid] | Yes | | -**type** | Literal["manual"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/ManualTrigger.md b/docs/v2/Orchestration/models/ManualTrigger.md deleted file mode 100644 index c6fb3e4ef..000000000 --- a/docs/v2/Orchestration/models/ManualTrigger.md +++ /dev/null @@ -1,12 +0,0 @@ -# ManualTrigger - -Only trigger the Schedule manually. If placed in an AND or OR condition, this Trigger will be ignored. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["manual"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/MediaSetUpdatedTrigger.md b/docs/v2/Orchestration/models/MediaSetUpdatedTrigger.md deleted file mode 100644 index 678388226..000000000 --- a/docs/v2/Orchestration/models/MediaSetUpdatedTrigger.md +++ /dev/null @@ -1,17 +0,0 @@ -# MediaSetUpdatedTrigger - -Trigger whenever an update is made to a media set on the target -branch. For transactional media sets, this happens when a transaction -is committed. For non-transactional media sets, this event happens -eventually (but not necessary immediately) after an update. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**media_set_rid** | MediaSetRid | Yes | | -**branch_name** | BranchName | Yes | | -**type** | Literal["mediaSetUpdated"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/NewLogicTrigger.md b/docs/v2/Orchestration/models/NewLogicTrigger.md deleted file mode 100644 index a33538145..000000000 --- a/docs/v2/Orchestration/models/NewLogicTrigger.md +++ /dev/null @@ -1,15 +0,0 @@ -# NewLogicTrigger - -Trigger whenever a new JobSpec is put on the dataset and on -that branch. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**branch_name** | BranchName | Yes | | -**dataset_rid** | DatasetRid | Yes | | -**type** | Literal["newLogic"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/NotificationsEnabled.md b/docs/v2/Orchestration/models/NotificationsEnabled.md deleted file mode 100644 index ae1feaa4a..000000000 --- a/docs/v2/Orchestration/models/NotificationsEnabled.md +++ /dev/null @@ -1,13 +0,0 @@ -# NotificationsEnabled - -Whether to receive a notification at the end of the build. -The notification will be sent to the user that has most recently edited the schedule. -No notification will be sent if the schedule has `scopeMode` set to `ProjectScope`. - -## Type -```python -bool -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/OrTrigger.md b/docs/v2/Orchestration/models/OrTrigger.md deleted file mode 100644 index b67f04482..000000000 --- a/docs/v2/Orchestration/models/OrTrigger.md +++ /dev/null @@ -1,12 +0,0 @@ -# OrTrigger - -Trigger whenever any of the given triggers emit an event. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**triggers** | List[Trigger] | Yes | | -**type** | Literal["or"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/ProjectScope.md b/docs/v2/Orchestration/models/ProjectScope.md deleted file mode 100644 index 3721a9e1a..000000000 --- a/docs/v2/Orchestration/models/ProjectScope.md +++ /dev/null @@ -1,13 +0,0 @@ -# ProjectScope - -The schedule will only build resources in the following projects. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**project_rids** | List[ProjectRid] | Yes | | -**type** | Literal["project"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/ReplaceScheduleRequest.md b/docs/v2/Orchestration/models/ReplaceScheduleRequest.md deleted file mode 100644 index 94364cb1a..000000000 --- a/docs/v2/Orchestration/models/ReplaceScheduleRequest.md +++ /dev/null @@ -1,15 +0,0 @@ -# ReplaceScheduleRequest - -ReplaceScheduleRequest - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**display_name** | Optional[str] | No | | -**description** | Optional[str] | No | | -**action** | ReplaceScheduleRequestAction | Yes | | -**trigger** | Optional[Trigger] | No | The schedule trigger. If the requesting user does not have permission to see the trigger, this will be empty. | -**scope_mode** | Optional[ReplaceScheduleRequestScopeMode] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/ReplaceScheduleRequestAction.md b/docs/v2/Orchestration/models/ReplaceScheduleRequestAction.md deleted file mode 100644 index 243de8c83..000000000 --- a/docs/v2/Orchestration/models/ReplaceScheduleRequestAction.md +++ /dev/null @@ -1,18 +0,0 @@ -# ReplaceScheduleRequestAction - -ReplaceScheduleRequestAction - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**abort_on_failure** | Optional[AbortOnFailure] | No | | -**force_build** | Optional[ForceBuild] | No | | -**retry_backoff_duration** | Optional[RetryBackoffDuration] | No | | -**retry_count** | Optional[RetryCount] | No | | -**fallback_branches** | Optional[FallbackBranches] | No | | -**branch_name** | Optional[BranchName] | No | The target branch the schedule should run on. | -**notifications_enabled** | Optional[NotificationsEnabled] | No | | -**target** | ReplaceScheduleRequestBuildTarget | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/ReplaceScheduleRequestBuildTarget.md b/docs/v2/Orchestration/models/ReplaceScheduleRequestBuildTarget.md deleted file mode 100644 index 6634fd50f..000000000 --- a/docs/v2/Orchestration/models/ReplaceScheduleRequestBuildTarget.md +++ /dev/null @@ -1,17 +0,0 @@ -# ReplaceScheduleRequestBuildTarget - -The targets of the build. - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -ReplaceScheduleRequestUpstreamTarget | upstream -ReplaceScheduleRequestManualTarget | manual -ReplaceScheduleRequestConnectingTarget | connecting - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/ReplaceScheduleRequestConnectingTarget.md b/docs/v2/Orchestration/models/ReplaceScheduleRequestConnectingTarget.md deleted file mode 100644 index 3e72f7263..000000000 --- a/docs/v2/Orchestration/models/ReplaceScheduleRequestConnectingTarget.md +++ /dev/null @@ -1,14 +0,0 @@ -# ReplaceScheduleRequestConnectingTarget - -ReplaceScheduleRequestConnectingTarget - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**ignored_rids** | Optional[List[BuildableRid]] | No | The datasets between the input datasets and target datasets to exclude. | -**target_rids** | List[BuildableRid] | Yes | The downstream target datasets (inclusive). | -**input_rids** | List[BuildableRid] | Yes | The upstream input datasets (exclusive). | -**type** | Literal["connecting"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/ReplaceScheduleRequestManualTarget.md b/docs/v2/Orchestration/models/ReplaceScheduleRequestManualTarget.md deleted file mode 100644 index b412c39bc..000000000 --- a/docs/v2/Orchestration/models/ReplaceScheduleRequestManualTarget.md +++ /dev/null @@ -1,12 +0,0 @@ -# ReplaceScheduleRequestManualTarget - -ReplaceScheduleRequestManualTarget - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**target_rids** | List[BuildableRid] | Yes | | -**type** | Literal["manual"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/ReplaceScheduleRequestProjectScope.md b/docs/v2/Orchestration/models/ReplaceScheduleRequestProjectScope.md deleted file mode 100644 index 9cf97df4f..000000000 --- a/docs/v2/Orchestration/models/ReplaceScheduleRequestProjectScope.md +++ /dev/null @@ -1,12 +0,0 @@ -# ReplaceScheduleRequestProjectScope - -ReplaceScheduleRequestProjectScope - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**project_rids** | List[ProjectRid] | Yes | | -**type** | Literal["project"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/ReplaceScheduleRequestScopeMode.md b/docs/v2/Orchestration/models/ReplaceScheduleRequestScopeMode.md deleted file mode 100644 index 8a297da53..000000000 --- a/docs/v2/Orchestration/models/ReplaceScheduleRequestScopeMode.md +++ /dev/null @@ -1,16 +0,0 @@ -# ReplaceScheduleRequestScopeMode - -The boundaries for the schedule build. - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -ReplaceScheduleRequestProjectScope | project -ReplaceScheduleRequestUserScope | user - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/ReplaceScheduleRequestUpstreamTarget.md b/docs/v2/Orchestration/models/ReplaceScheduleRequestUpstreamTarget.md deleted file mode 100644 index 5acbfb825..000000000 --- a/docs/v2/Orchestration/models/ReplaceScheduleRequestUpstreamTarget.md +++ /dev/null @@ -1,13 +0,0 @@ -# ReplaceScheduleRequestUpstreamTarget - -ReplaceScheduleRequestUpstreamTarget - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**ignored_rids** | Optional[List[BuildableRid]] | No | The datasets to ignore when calculating the final set of dataset to build. | -**target_rids** | List[BuildableRid] | Yes | The target datasets. | -**type** | Literal["upstream"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/ReplaceScheduleRequestUserScope.md b/docs/v2/Orchestration/models/ReplaceScheduleRequestUserScope.md deleted file mode 100644 index 83f60d4c4..000000000 --- a/docs/v2/Orchestration/models/ReplaceScheduleRequestUserScope.md +++ /dev/null @@ -1,11 +0,0 @@ -# ReplaceScheduleRequestUserScope - -ReplaceScheduleRequestUserScope - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["user"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/RetryBackoffDuration.md b/docs/v2/Orchestration/models/RetryBackoffDuration.md deleted file mode 100644 index f743e6e5a..000000000 --- a/docs/v2/Orchestration/models/RetryBackoffDuration.md +++ /dev/null @@ -1,12 +0,0 @@ -# RetryBackoffDuration - -The duration to wait before retrying after a Job fails. - - -## Type -```python -Duration -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/RetryCount.md b/docs/v2/Orchestration/models/RetryCount.md deleted file mode 100644 index 58f0456d4..000000000 --- a/docs/v2/Orchestration/models/RetryCount.md +++ /dev/null @@ -1,14 +0,0 @@ -# RetryCount - -The number of retry attempts for failed Jobs within the Build. A Job's failure is not considered final until -all retries have been attempted or an error occurs indicating that retries cannot be performed. Be aware, -not all types of failures can be retried. - - -## Type -```python -int -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/Schedule.md b/docs/v2/Orchestration/models/Schedule.md deleted file mode 100644 index bf0a06fa0..000000000 --- a/docs/v2/Orchestration/models/Schedule.md +++ /dev/null @@ -1,22 +0,0 @@ -# Schedule - -Schedule - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**rid** | ScheduleRid | Yes | | -**display_name** | Optional[str] | No | | -**description** | Optional[str] | No | | -**current_version_rid** | ScheduleVersionRid | Yes | The RID of the current schedule version | -**created_time** | CreatedTime | Yes | | -**created_by** | CreatedBy | Yes | | -**updated_time** | UpdatedTime | Yes | | -**updated_by** | UpdatedBy | Yes | | -**paused** | SchedulePaused | Yes | | -**trigger** | Optional[Trigger] | No | The schedule trigger. If the requesting user does not have permission to see the trigger, this will be empty. | -**action** | Action | Yes | | -**scope_mode** | ScopeMode | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/SchedulePaused.md b/docs/v2/Orchestration/models/SchedulePaused.md deleted file mode 100644 index 252856589..000000000 --- a/docs/v2/Orchestration/models/SchedulePaused.md +++ /dev/null @@ -1,11 +0,0 @@ -# SchedulePaused - -SchedulePaused - -## Type -```python -bool -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/ScheduleRun.md b/docs/v2/Orchestration/models/ScheduleRun.md deleted file mode 100644 index b128d6841..000000000 --- a/docs/v2/Orchestration/models/ScheduleRun.md +++ /dev/null @@ -1,16 +0,0 @@ -# ScheduleRun - -ScheduleRun - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**rid** | ScheduleRunRid | Yes | The RID of a schedule run | -**schedule_rid** | ScheduleRid | Yes | | -**schedule_version_rid** | ScheduleVersionRid | Yes | | -**created_time** | CreatedTime | Yes | The time at which the schedule run was created. | -**created_by** | Optional[CreatedBy] | No | The Foundry user who manually invoked this schedule run. Automatic trigger runs have this field set to empty. | -**result** | Optional[ScheduleRunResult] | No | The result of triggering the schedule. If empty, it means the service is still working on triggering the schedule. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/ScheduleRunError.md b/docs/v2/Orchestration/models/ScheduleRunError.md deleted file mode 100644 index b4a7e4d5a..000000000 --- a/docs/v2/Orchestration/models/ScheduleRunError.md +++ /dev/null @@ -1,13 +0,0 @@ -# ScheduleRunError - -An error occurred attempting to run the schedule. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**error_name** | ScheduleRunErrorName | Yes | | -**description** | str | Yes | | -**type** | Literal["error"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/ScheduleRunErrorName.md b/docs/v2/Orchestration/models/ScheduleRunErrorName.md deleted file mode 100644 index e8c14463f..000000000 --- a/docs/v2/Orchestration/models/ScheduleRunErrorName.md +++ /dev/null @@ -1,16 +0,0 @@ -# ScheduleRunErrorName - -ScheduleRunErrorName - -| **Value** | -| --------- | -| `"TargetResolutionFailure"` | -| `"CyclicDependency"` | -| `"IncompatibleTargets"` | -| `"PermissionDenied"` | -| `"JobSpecNotFound"` | -| `"ScheduleOwnerNotFound"` | -| `"Internal"` | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/ScheduleRunIgnored.md b/docs/v2/Orchestration/models/ScheduleRunIgnored.md deleted file mode 100644 index 7a347caf4..000000000 --- a/docs/v2/Orchestration/models/ScheduleRunIgnored.md +++ /dev/null @@ -1,12 +0,0 @@ -# ScheduleRunIgnored - -The schedule is not running as all targets are up-to-date. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["ignored"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/ScheduleRunResult.md b/docs/v2/Orchestration/models/ScheduleRunResult.md deleted file mode 100644 index f780f213c..000000000 --- a/docs/v2/Orchestration/models/ScheduleRunResult.md +++ /dev/null @@ -1,19 +0,0 @@ -# ScheduleRunResult - -The result of attempting to trigger the schedule. The schedule run will either be submitted as a build, -ignored if all targets are up-to-date or error. - - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -ScheduleRunIgnored | ignored -ScheduleRunSubmitted | submitted -ScheduleRunError | error - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/ScheduleRunRid.md b/docs/v2/Orchestration/models/ScheduleRunRid.md deleted file mode 100644 index 051088822..000000000 --- a/docs/v2/Orchestration/models/ScheduleRunRid.md +++ /dev/null @@ -1,11 +0,0 @@ -# ScheduleRunRid - -The RID of a schedule run - -## Type -```python -RID -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/ScheduleRunSubmitted.md b/docs/v2/Orchestration/models/ScheduleRunSubmitted.md deleted file mode 100644 index fe43a08ba..000000000 --- a/docs/v2/Orchestration/models/ScheduleRunSubmitted.md +++ /dev/null @@ -1,12 +0,0 @@ -# ScheduleRunSubmitted - -The schedule has been successfully triggered. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**build_rid** | BuildRid | Yes | | -**type** | Literal["submitted"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/ScheduleSucceededTrigger.md b/docs/v2/Orchestration/models/ScheduleSucceededTrigger.md deleted file mode 100644 index 9bee67238..000000000 --- a/docs/v2/Orchestration/models/ScheduleSucceededTrigger.md +++ /dev/null @@ -1,14 +0,0 @@ -# ScheduleSucceededTrigger - -Trigger whenever the specified schedule completes its action -successfully. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**schedule_rid** | ScheduleRid | Yes | | -**type** | Literal["scheduleSucceeded"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/ScheduleVersion.md b/docs/v2/Orchestration/models/ScheduleVersion.md deleted file mode 100644 index f9a8ed921..000000000 --- a/docs/v2/Orchestration/models/ScheduleVersion.md +++ /dev/null @@ -1,17 +0,0 @@ -# ScheduleVersion - -ScheduleVersion - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**rid** | ScheduleVersionRid | Yes | The RID of a schedule version | -**schedule_rid** | ScheduleRid | Yes | | -**created_time** | CreatedTime | Yes | The time the schedule version was created | -**created_by** | CreatedBy | Yes | The Foundry user who created the schedule version | -**trigger** | Optional[Trigger] | No | | -**action** | Action | Yes | | -**scope_mode** | ScopeMode | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/ScheduleVersionRid.md b/docs/v2/Orchestration/models/ScheduleVersionRid.md deleted file mode 100644 index d10d65f18..000000000 --- a/docs/v2/Orchestration/models/ScheduleVersionRid.md +++ /dev/null @@ -1,11 +0,0 @@ -# ScheduleVersionRid - -The RID of a schedule version - -## Type -```python -RID -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/ScopeMode.md b/docs/v2/Orchestration/models/ScopeMode.md deleted file mode 100644 index 4e1118293..000000000 --- a/docs/v2/Orchestration/models/ScopeMode.md +++ /dev/null @@ -1,16 +0,0 @@ -# ScopeMode - -The boundaries for the schedule build. - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -ProjectScope | project -UserScope | user - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/SearchBuildsAndFilter.md b/docs/v2/Orchestration/models/SearchBuildsAndFilter.md deleted file mode 100644 index 2b690b40e..000000000 --- a/docs/v2/Orchestration/models/SearchBuildsAndFilter.md +++ /dev/null @@ -1,12 +0,0 @@ -# SearchBuildsAndFilter - -Returns the Builds where every filter is satisfied. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**items** | List[SearchBuildsFilter] | Yes | | -**type** | Literal["and"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/SearchBuildsEqualsFilter.md b/docs/v2/Orchestration/models/SearchBuildsEqualsFilter.md deleted file mode 100644 index fb66bb57a..000000000 --- a/docs/v2/Orchestration/models/SearchBuildsEqualsFilter.md +++ /dev/null @@ -1,13 +0,0 @@ -# SearchBuildsEqualsFilter - -SearchBuildsEqualsFilter - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**field** | SearchBuildsEqualsFilterField | Yes | | -**value** | Any | Yes | | -**type** | Literal["eq"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/SearchBuildsEqualsFilterField.md b/docs/v2/Orchestration/models/SearchBuildsEqualsFilterField.md deleted file mode 100644 index 8f3001df5..000000000 --- a/docs/v2/Orchestration/models/SearchBuildsEqualsFilterField.md +++ /dev/null @@ -1,13 +0,0 @@ -# SearchBuildsEqualsFilterField - -SearchBuildsEqualsFilterField - -| **Value** | -| --------- | -| `"CREATED_BY"` | -| `"BRANCH_NAME"` | -| `"STATUS"` | -| `"RID"` | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/SearchBuildsFilter.md b/docs/v2/Orchestration/models/SearchBuildsFilter.md deleted file mode 100644 index 0ac26e51c..000000000 --- a/docs/v2/Orchestration/models/SearchBuildsFilter.md +++ /dev/null @@ -1,20 +0,0 @@ -# SearchBuildsFilter - -SearchBuildsFilter - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -SearchBuildsNotFilter | not -SearchBuildsOrFilter | or -SearchBuildsAndFilter | and -SearchBuildsLtFilter | lt -SearchBuildsGteFilter | gte -SearchBuildsEqualsFilter | eq - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/SearchBuildsGteFilter.md b/docs/v2/Orchestration/models/SearchBuildsGteFilter.md deleted file mode 100644 index 83fe40eb6..000000000 --- a/docs/v2/Orchestration/models/SearchBuildsGteFilter.md +++ /dev/null @@ -1,13 +0,0 @@ -# SearchBuildsGteFilter - -SearchBuildsGteFilter - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**field** | SearchBuildsGteFilterField | Yes | | -**value** | Any | Yes | | -**type** | Literal["gte"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/SearchBuildsGteFilterField.md b/docs/v2/Orchestration/models/SearchBuildsGteFilterField.md deleted file mode 100644 index f9d3d2e80..000000000 --- a/docs/v2/Orchestration/models/SearchBuildsGteFilterField.md +++ /dev/null @@ -1,11 +0,0 @@ -# SearchBuildsGteFilterField - -SearchBuildsGteFilterField - -| **Value** | -| --------- | -| `"STARTED_TIME"` | -| `"FINISHED_TIME"` | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/SearchBuildsLtFilter.md b/docs/v2/Orchestration/models/SearchBuildsLtFilter.md deleted file mode 100644 index 039f8beb8..000000000 --- a/docs/v2/Orchestration/models/SearchBuildsLtFilter.md +++ /dev/null @@ -1,13 +0,0 @@ -# SearchBuildsLtFilter - -SearchBuildsLtFilter - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**field** | SearchBuildsLtFilterField | Yes | | -**value** | Any | Yes | | -**type** | Literal["lt"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/SearchBuildsLtFilterField.md b/docs/v2/Orchestration/models/SearchBuildsLtFilterField.md deleted file mode 100644 index 82c81b0cb..000000000 --- a/docs/v2/Orchestration/models/SearchBuildsLtFilterField.md +++ /dev/null @@ -1,11 +0,0 @@ -# SearchBuildsLtFilterField - -SearchBuildsLtFilterField - -| **Value** | -| --------- | -| `"STARTED_TIME"` | -| `"FINISHED_TIME"` | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/SearchBuildsNotFilter.md b/docs/v2/Orchestration/models/SearchBuildsNotFilter.md deleted file mode 100644 index ccde7822f..000000000 --- a/docs/v2/Orchestration/models/SearchBuildsNotFilter.md +++ /dev/null @@ -1,12 +0,0 @@ -# SearchBuildsNotFilter - -Returns the Builds where the filter is not satisfied. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**value** | SearchBuildsFilter | Yes | | -**type** | Literal["not"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/SearchBuildsOrFilter.md b/docs/v2/Orchestration/models/SearchBuildsOrFilter.md deleted file mode 100644 index 651901116..000000000 --- a/docs/v2/Orchestration/models/SearchBuildsOrFilter.md +++ /dev/null @@ -1,12 +0,0 @@ -# SearchBuildsOrFilter - -Returns the Builds where at least one filter is satisfied. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**items** | List[SearchBuildsFilter] | Yes | | -**type** | Literal["or"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/SearchBuildsOrderBy.md b/docs/v2/Orchestration/models/SearchBuildsOrderBy.md deleted file mode 100644 index 630ac5154..000000000 --- a/docs/v2/Orchestration/models/SearchBuildsOrderBy.md +++ /dev/null @@ -1,11 +0,0 @@ -# SearchBuildsOrderBy - -SearchBuildsOrderBy - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**fields** | List[SearchBuildsOrderByItem] | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/SearchBuildsOrderByField.md b/docs/v2/Orchestration/models/SearchBuildsOrderByField.md deleted file mode 100644 index e7792d6ae..000000000 --- a/docs/v2/Orchestration/models/SearchBuildsOrderByField.md +++ /dev/null @@ -1,11 +0,0 @@ -# SearchBuildsOrderByField - -SearchBuildsOrderByField - -| **Value** | -| --------- | -| `"STARTED_TIME"` | -| `"FINISHED_TIME"` | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/SearchBuildsOrderByItem.md b/docs/v2/Orchestration/models/SearchBuildsOrderByItem.md deleted file mode 100644 index cc6eda23e..000000000 --- a/docs/v2/Orchestration/models/SearchBuildsOrderByItem.md +++ /dev/null @@ -1,12 +0,0 @@ -# SearchBuildsOrderByItem - -SearchBuildsOrderByItem - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**field** | SearchBuildsOrderByField | Yes | | -**direction** | OrderByDirection | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/SearchBuildsRequest.md b/docs/v2/Orchestration/models/SearchBuildsRequest.md deleted file mode 100644 index 871292c25..000000000 --- a/docs/v2/Orchestration/models/SearchBuildsRequest.md +++ /dev/null @@ -1,14 +0,0 @@ -# SearchBuildsRequest - -SearchBuildsRequest - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**where** | SearchBuildsFilter | Yes | | -**order_by** | Optional[SearchBuildsOrderBy] | No | | -**page_token** | Optional[PageToken] | No | | -**page_size** | Optional[PageSize] | No | The page size for the search request. If no value is provided, a default of `100` will be used. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/SearchBuildsResponse.md b/docs/v2/Orchestration/models/SearchBuildsResponse.md deleted file mode 100644 index d559cf46a..000000000 --- a/docs/v2/Orchestration/models/SearchBuildsResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# SearchBuildsResponse - -SearchBuildsResponse - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**data** | List[Build] | Yes | | -**next_page_token** | Optional[PageToken] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/TableUpdatedTrigger.md b/docs/v2/Orchestration/models/TableUpdatedTrigger.md deleted file mode 100644 index 2971c0c2f..000000000 --- a/docs/v2/Orchestration/models/TableUpdatedTrigger.md +++ /dev/null @@ -1,15 +0,0 @@ -# TableUpdatedTrigger - -Trigger whenever a new transaction is committed to the -table on the target branch. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**table_rid** | TableRid | Yes | | -**branch_name** | BranchName | Yes | | -**type** | Literal["tableUpdated"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/TimeTrigger.md b/docs/v2/Orchestration/models/TimeTrigger.md deleted file mode 100644 index da2f5814c..000000000 --- a/docs/v2/Orchestration/models/TimeTrigger.md +++ /dev/null @@ -1,13 +0,0 @@ -# TimeTrigger - -Trigger on a time based schedule. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**cron_expression** | CronExpression | Yes | | -**time_zone** | ZoneId | Yes | | -**type** | Literal["time"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/TransactionalMediaSetJobOutput.md b/docs/v2/Orchestration/models/TransactionalMediaSetJobOutput.md deleted file mode 100644 index a2ade8a84..000000000 --- a/docs/v2/Orchestration/models/TransactionalMediaSetJobOutput.md +++ /dev/null @@ -1,13 +0,0 @@ -# TransactionalMediaSetJobOutput - -TransactionalMediaSetJobOutput - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**media_set_rid** | MediaSetRid | Yes | | -**transaction_id** | Optional[str] | No | | -**type** | Literal["transactionalMediaSetJobOutput"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/Trigger.md b/docs/v2/Orchestration/models/Trigger.md deleted file mode 100644 index f88911450..000000000 --- a/docs/v2/Orchestration/models/Trigger.md +++ /dev/null @@ -1,24 +0,0 @@ -# Trigger - -Trigger - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -JobSucceededTrigger | jobSucceeded -OrTrigger | or -NewLogicTrigger | newLogic -TableUpdatedTrigger | tableUpdated -AndTrigger | and -DatasetUpdatedTrigger | datasetUpdated -ScheduleSucceededTrigger | scheduleSucceeded -MediaSetUpdatedTrigger | mediaSetUpdated -TimeTrigger | time -ManualTrigger | manual - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/UpstreamTarget.md b/docs/v2/Orchestration/models/UpstreamTarget.md deleted file mode 100644 index 0af7fbc98..000000000 --- a/docs/v2/Orchestration/models/UpstreamTarget.md +++ /dev/null @@ -1,13 +0,0 @@ -# UpstreamTarget - -Target the specified datasets along with all upstream datasets except the ignored datasets. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**target_rids** | List[BuildableRid] | Yes | The target datasets. | -**ignored_rids** | List[BuildableRid] | Yes | The datasets to ignore when calculating the final set of dataset to build. | -**type** | Literal["upstream"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/UserScope.md b/docs/v2/Orchestration/models/UserScope.md deleted file mode 100644 index d4eca1555..000000000 --- a/docs/v2/Orchestration/models/UserScope.md +++ /dev/null @@ -1,13 +0,0 @@ -# UserScope - -When triggered, the schedule will build all resources that the -associated user is permitted to build. - - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["user"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/SqlQueries/SqlQuery.md b/docs/v2/SqlQueries/SqlQuery.md deleted file mode 100644 index a91a4bdbb..000000000 --- a/docs/v2/SqlQueries/SqlQuery.md +++ /dev/null @@ -1,246 +0,0 @@ -# SqlQuery - -Method | HTTP request | Release Stage | -------------- | ------------- | ----- | -[**cancel**](#cancel) | **POST** /v2/sqlQueries/{sqlQueryId}/cancel | Public Beta | -[**execute**](#execute) | **POST** /v2/sqlQueries/execute | Public Beta | -[**get_results**](#get_results) | **GET** /v2/sqlQueries/{sqlQueryId}/getResults | Public Beta | -[**get_status**](#get_status) | **GET** /v2/sqlQueries/{sqlQueryId}/getStatus | Public Beta | - -# **cancel** -Cancels a query. If the query is no longer running this is effectively a no-op. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**sql_query_id** | SqlQueryId | The id of a query. | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**None** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# SqlQueryId | The id of a query. -sql_query_id = None -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.sql_queries.SqlQuery.cancel(sql_query_id, preview=preview) - print("The cancel response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling SqlQuery.cancel: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**204** | None | | None | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **execute** -Executes a new query. Only the user that invoked the query can operate on the query. The size of query -results are limited by default to 1 million rows. Contact your Palantir representative to discuss limit -increases. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**query** | str | The SQL query to execute. Queries should conform to the [Spark SQL dialect](https://spark.apache.org/docs/latest/sql-ref.html). This supports SELECT queries only. Datasets can be referenced in SQL queries by path or by RID. See the [documentation](https://www.palantir.com/docs/foundry/analytics-connectivity/odbc-jdbc-drivers/#use-sql-to-query-foundry-datasets) for more details. | | -**fallback_branch_ids** | Optional[List[BranchName]] | The list of branch ids to use as fallbacks if the query fails to execute on the primary branch. If a is not explicitly provided in the SQL query, the resource will be queried on the first fallback branch provided that exists. If no fallback branches are provided the default branch is used. This is `master` for most enrollments. | [optional] | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**QueryStatus** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# str | The SQL query to execute. Queries should conform to the [Spark SQL dialect](https://spark.apache.org/docs/latest/sql-ref.html). This supports SELECT queries only. Datasets can be referenced in SQL queries by path or by RID. See the [documentation](https://www.palantir.com/docs/foundry/analytics-connectivity/odbc-jdbc-drivers/#use-sql-to-query-foundry-datasets) for more details. -query = "SELECT * FROM `/Path/To/Dataset`" -# Optional[List[BranchName]] | The list of branch ids to use as fallbacks if the query fails to execute on the primary branch. If a is not explicitly provided in the SQL query, the resource will be queried on the first fallback branch provided that exists. If no fallback branches are provided the default branch is used. This is `master` for most enrollments. -fallback_branch_ids = ["master"] -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.sql_queries.SqlQuery.execute( - query=query, fallback_branch_ids=fallback_branch_ids, preview=preview - ) - print("The execute response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling SqlQuery.execute: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | QueryStatus | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **get_results** -Gets the results of a query. The results of the query are returned in the -[Apache Arrow](https://arrow.apache.org/) format. - -This endpoint implements long polling and requests will time out after one minute. They can be safely -retried while the query is still running. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**sql_query_id** | SqlQueryId | The id of a query. | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**bytes** - -> [!TIP] -> This operation returns tabular data that can be converted to data frame formats: -> -> ```python -> # Get data in Arrow format -> table_data = client.sql_queries.SqlQuery.get_results(sql_query_id, preview=preview) -> -> # Convert to a PyArrow Table -> arrow_table = table_data.to_pyarrow() -> -> # Convert to a Pandas DataFrame -> pandas_df = table_data.to_pandas() -> -> # Convert to a Polars DataFrame -> polars_df = table_data.to_polars() -> -> # Convert to a DuckDB relation -> duckdb_relation = table_data.to_duckdb() -> ``` -> -> For more details, see the [Data Frames section](../../../README.md#data-frames) in the README. - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# SqlQueryId | The id of a query. -sql_query_id = None -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.sql_queries.SqlQuery.get_results(sql_query_id, preview=preview) - print("The get_results response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling SqlQuery.get_results: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | bytes | | application/octet-stream | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **get_status** -Gets the status of a query. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**sql_query_id** | SqlQueryId | The id of a query. | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**QueryStatus** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# SqlQueryId | The id of a query. -sql_query_id = None -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.sql_queries.SqlQuery.get_status(sql_query_id, preview=preview) - print("The get_status response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling SqlQuery.get_status: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | QueryStatus | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - diff --git a/docs/v2/SqlQueries/models/CanceledQueryStatus.md b/docs/v2/SqlQueries/models/CanceledQueryStatus.md deleted file mode 100644 index cbaece177..000000000 --- a/docs/v2/SqlQueries/models/CanceledQueryStatus.md +++ /dev/null @@ -1,11 +0,0 @@ -# CanceledQueryStatus - -CanceledQueryStatus - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**type** | Literal["canceled"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/SqlQueries/models/ExecuteSqlQueryRequest.md b/docs/v2/SqlQueries/models/ExecuteSqlQueryRequest.md deleted file mode 100644 index 58bb613dd..000000000 --- a/docs/v2/SqlQueries/models/ExecuteSqlQueryRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# ExecuteSqlQueryRequest - -ExecuteSqlQueryRequest - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**query** | str | Yes | The SQL query to execute. Queries should conform to the [Spark SQL dialect](https://spark.apache.org/docs/latest/sql-ref.html). This supports SELECT queries only. Datasets can be referenced in SQL queries by path or by RID. See the [documentation](https://www.palantir.com/docs/foundry/analytics-connectivity/odbc-jdbc-drivers/#use-sql-to-query-foundry-datasets) for more details. | -**fallback_branch_ids** | Optional[List[BranchName]] | No | The list of branch ids to use as fallbacks if the query fails to execute on the primary branch. If a is not explicitly provided in the SQL query, the resource will be queried on the first fallback branch provided that exists. If no fallback branches are provided the default branch is used. This is `master` for most enrollments. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/SqlQueries/models/FailedQueryStatus.md b/docs/v2/SqlQueries/models/FailedQueryStatus.md deleted file mode 100644 index bc1436784..000000000 --- a/docs/v2/SqlQueries/models/FailedQueryStatus.md +++ /dev/null @@ -1,12 +0,0 @@ -# FailedQueryStatus - -FailedQueryStatus - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**error_message** | str | Yes | An error message describing why the query failed. | -**type** | Literal["failed"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/SqlQueries/models/QueryStatus.md b/docs/v2/SqlQueries/models/QueryStatus.md deleted file mode 100644 index 63dc2000c..000000000 --- a/docs/v2/SqlQueries/models/QueryStatus.md +++ /dev/null @@ -1,18 +0,0 @@ -# QueryStatus - -QueryStatus - -This is a discriminator type and does not contain any fields. Instead, it is a union -of of the models listed below. - -This discriminator class uses the `type` field to differentiate between classes. - -| Class | Value -| ------------ | ------------- -RunningQueryStatus | running -CanceledQueryStatus | canceled -FailedQueryStatus | failed -SucceededQueryStatus | succeeded - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/SqlQueries/models/RunningQueryStatus.md b/docs/v2/SqlQueries/models/RunningQueryStatus.md deleted file mode 100644 index 8953d9b68..000000000 --- a/docs/v2/SqlQueries/models/RunningQueryStatus.md +++ /dev/null @@ -1,12 +0,0 @@ -# RunningQueryStatus - -RunningQueryStatus - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**query_id** | SqlQueryId | Yes | | -**type** | Literal["running"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/SqlQueries/models/SqlQueryId.md b/docs/v2/SqlQueries/models/SqlQueryId.md deleted file mode 100644 index d0e8c3808..000000000 --- a/docs/v2/SqlQueries/models/SqlQueryId.md +++ /dev/null @@ -1,11 +0,0 @@ -# SqlQueryId - -The identifier of a SQL Query. - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/SqlQueries/models/SucceededQueryStatus.md b/docs/v2/SqlQueries/models/SucceededQueryStatus.md deleted file mode 100644 index 422a40fdf..000000000 --- a/docs/v2/SqlQueries/models/SucceededQueryStatus.md +++ /dev/null @@ -1,12 +0,0 @@ -# SucceededQueryStatus - -SucceededQueryStatus - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**query_id** | SqlQueryId | Yes | | -**type** | Literal["succeeded"] | Yes | None | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Streams/Dataset.md b/docs/v2/Streams/Dataset.md deleted file mode 100644 index c9c4fca62..000000000 --- a/docs/v2/Streams/Dataset.md +++ /dev/null @@ -1,92 +0,0 @@ -# Dataset - -Method | HTTP request | Release Stage | -------------- | ------------- | ----- | -[**create**](#create) | **POST** /v2/streams/datasets/create | Public Beta | - -# **create** -Creates a streaming dataset with a stream on the specified branch, or if no branch is specified, on the -default branch ('master' for most enrollments). For more information on streaming datasets, refer to the -[streams](https://palantir.com/docs/foundry/data-integration/streams/) user documentation. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**name** | DatasetName | | | -**parent_folder_rid** | FolderRid | | | -**schema** | StreamSchema | The Foundry schema to apply to the new stream. | | -**branch_name** | Optional[BranchName] | The branch to create the initial stream on. If not specified, the default branch will be used ('master' for most enrollments). | [optional] | -**compressed** | Optional[Compressed] | Whether or not compression is enabled for the stream. Defaults to false. | [optional] | -**partitions_count** | Optional[PartitionsCount] | The number of partitions for the Foundry stream. Generally, each partition can handle about 5 mb/s of data, so for higher volume streams, more partitions are recommended. If not specified, 1 partition is used. This value cannot be changed later. | [optional] | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | -**stream_type** | Optional[StreamType] | A conceptual representation of the expected shape of the data for a stream. HIGH_THROUGHPUT and LOW_LATENCY are not compatible with each other. Defaults to LOW_LATENCY. | [optional] | - -### Return type -**Dataset** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# DatasetName -name = "My Dataset" -# FolderRid -parent_folder_rid = "ri.compass.main.folder.c410f510-2937-420e-8ea3-8c9bcb3c1791" -# StreamSchema | The Foundry schema to apply to the new stream. -schema = { - "fields": [ - {"name": "timestamp", "schema": {"nullable": False, "dataType": {"type": "timestamp"}}}, - {"name": "value", "schema": {"nullable": False, "dataType": {"type": "string"}}}, - ], - "keyFieldNames": ["timestamp"], -} -# Optional[BranchName] | The branch to create the initial stream on. If not specified, the default branch will be used ('master' for most enrollments). -branch_name = "master" -# Optional[Compressed] | Whether or not compression is enabled for the stream. Defaults to false. -compressed = False -# Optional[PartitionsCount] | The number of partitions for the Foundry stream. Generally, each partition can handle about 5 mb/s of data, so for higher volume streams, more partitions are recommended. If not specified, 1 partition is used. This value cannot be changed later. -partitions_count = 1 -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None -# Optional[StreamType] | A conceptual representation of the expected shape of the data for a stream. HIGH_THROUGHPUT and LOW_LATENCY are not compatible with each other. Defaults to LOW_LATENCY. -stream_type = "LOW_LATENCY" - - -try: - api_response = client.streams.Dataset.create( - name=name, - parent_folder_rid=parent_folder_rid, - schema=schema, - branch_name=branch_name, - compressed=compressed, - partitions_count=partitions_count, - preview=preview, - stream_type=stream_type, - ) - print("The create response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Dataset.create: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | Dataset | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - diff --git a/docs/v2/Streams/Stream.md b/docs/v2/Streams/Stream.md deleted file mode 100644 index 6f1127d8a..000000000 --- a/docs/v2/Streams/Stream.md +++ /dev/null @@ -1,416 +0,0 @@ -# Stream - -Method | HTTP request | Release Stage | -------------- | ------------- | ----- | -[**create**](#create) | **POST** /v2/streams/datasets/{datasetRid}/streams | Public Beta | -[**get**](#get) | **GET** /v2/streams/datasets/{datasetRid}/streams/{streamBranchName} | Public Beta | -[**publish_binary_record**](#publish_binary_record) | **POST** /v2/highScale/streams/datasets/{datasetRid}/streams/{streamBranchName}/publishBinaryRecord | Public Beta | -[**publish_record**](#publish_record) | **POST** /v2/highScale/streams/datasets/{datasetRid}/streams/{streamBranchName}/publishRecord | Public Beta | -[**publish_records**](#publish_records) | **POST** /v2/highScale/streams/datasets/{datasetRid}/streams/{streamBranchName}/publishRecords | Public Beta | -[**reset**](#reset) | **POST** /v2/streams/datasets/{datasetRid}/streams/{streamBranchName}/reset | Public Beta | - -# **create** -Creates a new branch on the backing streaming dataset, and creates a new stream on that branch. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**dataset_rid** | DatasetRid | | | -**branch_name** | BranchName | | | -**schema** | CreateStreamRequestStreamSchema | The Foundry schema for this stream. | | -**compressed** | Optional[Compressed] | Whether or not compression is enabled for the stream. Defaults to false. | [optional] | -**partitions_count** | Optional[PartitionsCount] | The number of partitions for the Foundry stream. Defaults to 1. Generally, each partition can handle about 5 mb/s of data, so for higher volume streams, more partitions are recommended. | [optional] | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | -**stream_type** | Optional[StreamType] | A conceptual representation of the expected shape of the data for a stream. HIGH_THROUGHPUT and LOW_LATENCY are not compatible with each other. Defaults to LOW_LATENCY. | [optional] | - -### Return type -**Stream** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# DatasetRid -dataset_rid = None -# BranchName -branch_name = "master" -# CreateStreamRequestStreamSchema | The Foundry schema for this stream. -schema = None -# Optional[Compressed] | Whether or not compression is enabled for the stream. Defaults to false. -compressed = False -# Optional[PartitionsCount] | The number of partitions for the Foundry stream. Defaults to 1. Generally, each partition can handle about 5 mb/s of data, so for higher volume streams, more partitions are recommended. -partitions_count = 1 -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None -# Optional[StreamType] | A conceptual representation of the expected shape of the data for a stream. HIGH_THROUGHPUT and LOW_LATENCY are not compatible with each other. Defaults to LOW_LATENCY. -stream_type = "LOW_LATENCY" - - -try: - api_response = client.streams.Dataset.Stream.create( - dataset_rid, - branch_name=branch_name, - schema=schema, - compressed=compressed, - partitions_count=partitions_count, - preview=preview, - stream_type=stream_type, - ) - print("The create response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Stream.create: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | Stream | The created Stream | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **get** -Get a stream by its branch name. If the branch does not exist, there is no stream on that branch, or the -user does not have permission to access the stream, a 404 error will be returned. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**dataset_rid** | DatasetRid | | | -**stream_branch_name** | BranchName | | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**Stream** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# DatasetRid -dataset_rid = None -# BranchName -stream_branch_name = None -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.streams.Dataset.Stream.get( - dataset_rid, stream_branch_name, preview=preview - ) - print("The get response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Stream.get: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | Stream | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **publish_binary_record** -Publish a single binary record to the stream. The stream's schema must be a single binary field. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**dataset_rid** | DatasetRid | | | -**stream_branch_name** | BranchName | | | -**body** | bytes | The binary record to publish to the stream | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | -**view_rid** | Optional[ViewRid] | If provided, this operation will only write to the stream corresponding to the specified view rid. If not provided, this operation will write to the latest stream on the branch. Providing this value is an advanced configuration, to be used when additional control over the underlying streaming data structures is needed. | [optional] | - -### Return type -**None** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# DatasetRid -dataset_rid = None -# BranchName -stream_branch_name = None -# bytes | The binary record to publish to the stream -body = None -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None -# Optional[ViewRid] | If provided, this operation will only write to the stream corresponding to the specified view rid. If not provided, this operation will write to the latest stream on the branch. Providing this value is an advanced configuration, to be used when additional control over the underlying streaming data structures is needed. -view_rid = None - - -try: - api_response = client.streams.Dataset.Stream.publish_binary_record( - dataset_rid, stream_branch_name, body, preview=preview, view_rid=view_rid - ) - print("The publish_binary_record response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Stream.publish_binary_record: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**204** | None | | None | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **publish_record** -Publish a single record to the stream. The record will be validated against the stream's schema, and -rejected if it is invalid. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**dataset_rid** | DatasetRid | | | -**stream_branch_name** | BranchName | | | -**record** | Record | The record to publish to the stream | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | -**view_rid** | Optional[ViewRid] | If provided, this endpoint will only write to the stream corresponding to the specified view rid. If not provided, this endpoint will write the latest stream on the branch. Providing this value is an advanced configuration, to be used when additional control over the underlying streaming data structures is needed. | [optional] | - -### Return type -**None** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# DatasetRid -dataset_rid = None -# BranchName -stream_branch_name = None -# Record | The record to publish to the stream -record = {"timestamp": 1731426022784, "value": "Hello, World!"} -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None -# Optional[ViewRid] | If provided, this endpoint will only write to the stream corresponding to the specified view rid. If not provided, this endpoint will write the latest stream on the branch. Providing this value is an advanced configuration, to be used when additional control over the underlying streaming data structures is needed. -view_rid = "ri.foundry-streaming.main.view.ecd4f0f6-8526-4468-9eda-14939449ad79" - - -try: - api_response = client.streams.Dataset.Stream.publish_record( - dataset_rid, stream_branch_name, record=record, preview=preview, view_rid=view_rid - ) - print("The publish_record response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Stream.publish_record: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**204** | None | | None | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **publish_records** -Publish a batch of records to the stream. The records will be validated against the stream's schema, and -the batch will be rejected if one or more of the records are invalid. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**dataset_rid** | DatasetRid | | | -**stream_branch_name** | BranchName | | | -**records** | List[Record] | The records to publish to the stream | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | -**view_rid** | Optional[ViewRid] | If provided, this endpoint will only write to the stream corresponding to the specified view rid. If not provided, this endpoint will write to the latest stream on the branch. Providing this value is an advanced configuration, to be used when additional control over the underlying streaming data structures is needed. | [optional] | - -### Return type -**None** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# DatasetRid -dataset_rid = None -# BranchName -stream_branch_name = None -# List[Record] | The records to publish to the stream -records = [{"timestamp": 1731426022784, "value": "Hello, World!"}] -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None -# Optional[ViewRid] | If provided, this endpoint will only write to the stream corresponding to the specified view rid. If not provided, this endpoint will write to the latest stream on the branch. Providing this value is an advanced configuration, to be used when additional control over the underlying streaming data structures is needed. -view_rid = "ri.foundry-streaming.main.view.ecd4f0f6-8526-4468-9eda-14939449ad79" - - -try: - api_response = client.streams.Dataset.Stream.publish_records( - dataset_rid, stream_branch_name, records=records, preview=preview, view_rid=view_rid - ) - print("The publish_records response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Stream.publish_records: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**204** | None | | None | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **reset** -Reset the stream on the given dataset branch, clearing the existing records and allowing new configurations -to be applied. - -To change the stream settings without clearing the records, update the stream settings in-platform. - -This will create a new stream view (as seen by the change of the `viewRid` on the branch), -which will be the new stream view that will be written to for the branch. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**dataset_rid** | DatasetRid | | | -**stream_branch_name** | BranchName | | | -**compressed** | Optional[Compressed] | Whether or not compression is enabled for the stream. If omitted, the compression setting of the existing stream on the branch will be used. | [optional] | -**partitions_count** | Optional[PartitionsCount] | The number of partitions for the Foundry stream. Generally, each partition can handle about 5 mb/s of data, so for higher volume streams, more partitions are recommended. If omitted, the partitions count of the existing stream on the branch will be used. | [optional] | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | -**schema** | Optional[StreamSchema] | The Foundry schema to apply to the new stream. If omitted, the schema of the existing stream on the branch will be used. | [optional] | -**stream_type** | Optional[StreamType] | A conceptual representation of the expected shape of the data for a stream. HIGH_THROUGHPUT and LOW_LATENCY are not compatible with each other. Defaults to LOW_LATENCY. If omitted, the stream type of the existing stream on the branch will be used. | [optional] | - -### Return type -**Stream** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# DatasetRid -dataset_rid = None -# BranchName -stream_branch_name = None -# Optional[Compressed] | Whether or not compression is enabled for the stream. If omitted, the compression setting of the existing stream on the branch will be used. -compressed = False -# Optional[PartitionsCount] | The number of partitions for the Foundry stream. Generally, each partition can handle about 5 mb/s of data, so for higher volume streams, more partitions are recommended. If omitted, the partitions count of the existing stream on the branch will be used. -partitions_count = 1 -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None -# Optional[StreamSchema] | The Foundry schema to apply to the new stream. If omitted, the schema of the existing stream on the branch will be used. -schema = { - "fields": [ - {"name": "timestamp", "schema": {"nullable": False, "dataType": {"type": "timestamp"}}}, - {"name": "value", "schema": {"nullable": False, "dataType": {"type": "string"}}}, - ], - "keyFieldNames": ["timestamp"], -} -# Optional[StreamType] | A conceptual representation of the expected shape of the data for a stream. HIGH_THROUGHPUT and LOW_LATENCY are not compatible with each other. Defaults to LOW_LATENCY. If omitted, the stream type of the existing stream on the branch will be used. -stream_type = "LOW_LATENCY" - - -try: - api_response = client.streams.Dataset.Stream.reset( - dataset_rid, - stream_branch_name, - compressed=compressed, - partitions_count=partitions_count, - preview=preview, - schema=schema, - stream_type=stream_type, - ) - print("The reset response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Stream.reset: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | Stream | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - diff --git a/docs/v2/Streams/models/Compressed.md b/docs/v2/Streams/models/Compressed.md deleted file mode 100644 index 1f383af02..000000000 --- a/docs/v2/Streams/models/Compressed.md +++ /dev/null @@ -1,15 +0,0 @@ -# Compressed - -Compression helps reduce the size of the data being sent, resulting in lower network usage and -storage, at the cost of some additional CPU usage for compression and decompression. This stream type -is only recommended if your stream contains a high volume of repetitive strings and is experiencing poor -network bandwidth symptoms like non-zero lag, lower than expected throughput, or dropped records. - - -## Type -```python -bool -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Streams/models/CreateStreamRequest.md b/docs/v2/Streams/models/CreateStreamRequest.md deleted file mode 100644 index 153c4cb55..000000000 --- a/docs/v2/Streams/models/CreateStreamRequest.md +++ /dev/null @@ -1,15 +0,0 @@ -# CreateStreamRequest - -CreateStreamRequest - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**schema_** | CreateStreamRequestStreamSchema | Yes | The Foundry schema for this stream. | -**partitions_count** | Optional[PartitionsCount] | No | The number of partitions for the Foundry stream. Defaults to 1. Generally, each partition can handle about 5 mb/s of data, so for higher volume streams, more partitions are recommended. | -**stream_type** | Optional[StreamType] | No | A conceptual representation of the expected shape of the data for a stream. HIGH_THROUGHPUT and LOW_LATENCY are not compatible with each other. Defaults to LOW_LATENCY. | -**branch_name** | BranchName | Yes | | -**compressed** | Optional[Compressed] | No | Whether or not compression is enabled for the stream. Defaults to false. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Streams/models/CreateStreamRequestStreamSchema.md b/docs/v2/Streams/models/CreateStreamRequestStreamSchema.md deleted file mode 100644 index eb2b02be5..000000000 --- a/docs/v2/Streams/models/CreateStreamRequestStreamSchema.md +++ /dev/null @@ -1,13 +0,0 @@ -# CreateStreamRequestStreamSchema - -CreateStreamRequestStreamSchema - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**key_field_names** | Optional[List[FieldName]] | No | The names of the fields to be used as keys for partitioning records. These key fields are used to group all records with the same key into the same partition, to guarantee processing order of grouped records. These keys are not meant to uniquely identify records, and do not by themselves deduplicate records. To deduplicate records, provide a change data capture configuration for the schema. Key fields can only be of the following types: - Boolean - Byte - Date - Decimal - Integer - Long - Short - String - Timestamp For additional information on keys for Foundry streams, see the [streaming keys](https://palantir.com/docs/foundry/building-pipelines/streaming-keys/) user documentation. | -**fields** | List[Field] | Yes | | -**change_data_capture** | Optional[ChangeDataCaptureConfiguration] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Streams/models/CreateStreamingDatasetRequest.md b/docs/v2/Streams/models/CreateStreamingDatasetRequest.md deleted file mode 100644 index 74bf3cb5b..000000000 --- a/docs/v2/Streams/models/CreateStreamingDatasetRequest.md +++ /dev/null @@ -1,17 +0,0 @@ -# CreateStreamingDatasetRequest - -CreateStreamingDatasetRequest - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**name** | DatasetName | Yes | | -**parent_folder_rid** | FolderRid | Yes | | -**schema_** | StreamSchema | Yes | The Foundry schema to apply to the new stream. | -**branch_name** | Optional[BranchName] | No | The branch to create the initial stream on. If not specified, the default branch will be used ('master' for most enrollments). | -**partitions_count** | Optional[PartitionsCount] | No | The number of partitions for the Foundry stream. Generally, each partition can handle about 5 mb/s of data, so for higher volume streams, more partitions are recommended. If not specified, 1 partition is used. This value cannot be changed later. | -**stream_type** | Optional[StreamType] | No | A conceptual representation of the expected shape of the data for a stream. HIGH_THROUGHPUT and LOW_LATENCY are not compatible with each other. Defaults to LOW_LATENCY. | -**compressed** | Optional[Compressed] | No | Whether or not compression is enabled for the stream. Defaults to false. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Streams/models/Dataset.md b/docs/v2/Streams/models/Dataset.md deleted file mode 100644 index ab30e61ee..000000000 --- a/docs/v2/Streams/models/Dataset.md +++ /dev/null @@ -1,13 +0,0 @@ -# Dataset - -Dataset - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**rid** | DatasetRid | Yes | | -**name** | DatasetName | Yes | | -**parent_folder_rid** | FolderRid | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Streams/models/PartitionsCount.md b/docs/v2/Streams/models/PartitionsCount.md deleted file mode 100644 index de2394c96..000000000 --- a/docs/v2/Streams/models/PartitionsCount.md +++ /dev/null @@ -1,12 +0,0 @@ -# PartitionsCount - -The number of partitions for a Foundry stream. - - -## Type -```python -int -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Streams/models/PublishRecordToStreamRequest.md b/docs/v2/Streams/models/PublishRecordToStreamRequest.md deleted file mode 100644 index 4760b230d..000000000 --- a/docs/v2/Streams/models/PublishRecordToStreamRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# PublishRecordToStreamRequest - -PublishRecordToStreamRequest - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**record** | Record | Yes | The record to publish to the stream | -**view_rid** | Optional[ViewRid] | No | If provided, this endpoint will only write to the stream corresponding to the specified view rid. If not provided, this endpoint will write the latest stream on the branch. Providing this value is an advanced configuration, to be used when additional control over the underlying streaming data structures is needed. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Streams/models/PublishRecordsToStreamRequest.md b/docs/v2/Streams/models/PublishRecordsToStreamRequest.md deleted file mode 100644 index 176128a77..000000000 --- a/docs/v2/Streams/models/PublishRecordsToStreamRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# PublishRecordsToStreamRequest - -PublishRecordsToStreamRequest - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**records** | List[Record] | Yes | The records to publish to the stream | -**view_rid** | Optional[ViewRid] | No | If provided, this endpoint will only write to the stream corresponding to the specified view rid. If not provided, this endpoint will write to the latest stream on the branch. Providing this value is an advanced configuration, to be used when additional control over the underlying streaming data structures is needed. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Streams/models/Record.md b/docs/v2/Streams/models/Record.md deleted file mode 100644 index 501f4133f..000000000 --- a/docs/v2/Streams/models/Record.md +++ /dev/null @@ -1,12 +0,0 @@ -# Record - -A record to be published to a stream. - - -## Type -```python -Dict[str, Optional[Any]] -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Streams/models/ResetStreamRequest.md b/docs/v2/Streams/models/ResetStreamRequest.md deleted file mode 100644 index db9d00cbb..000000000 --- a/docs/v2/Streams/models/ResetStreamRequest.md +++ /dev/null @@ -1,14 +0,0 @@ -# ResetStreamRequest - -ResetStreamRequest - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**schema_** | Optional[StreamSchema] | No | The Foundry schema to apply to the new stream. If omitted, the schema of the existing stream on the branch will be used. | -**partitions_count** | Optional[PartitionsCount] | No | The number of partitions for the Foundry stream. Generally, each partition can handle about 5 mb/s of data, so for higher volume streams, more partitions are recommended. If omitted, the partitions count of the existing stream on the branch will be used. | -**stream_type** | Optional[StreamType] | No | A conceptual representation of the expected shape of the data for a stream. HIGH_THROUGHPUT and LOW_LATENCY are not compatible with each other. Defaults to LOW_LATENCY. If omitted, the stream type of the existing stream on the branch will be used. | -**compressed** | Optional[Compressed] | No | Whether or not compression is enabled for the stream. If omitted, the compression setting of the existing stream on the branch will be used. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Streams/models/Stream.md b/docs/v2/Streams/models/Stream.md deleted file mode 100644 index 8159b6b23..000000000 --- a/docs/v2/Streams/models/Stream.md +++ /dev/null @@ -1,16 +0,0 @@ -# Stream - -Stream - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**branch_name** | BranchName | Yes | | -**schema_** | StreamSchema | Yes | The Foundry schema for this stream. | -**view_rid** | ViewRid | Yes | The view that this stream corresponds to. | -**partitions_count** | PartitionsCount | Yes | The number of partitions for the Foundry stream. Defaults to 1. Generally, each partition can handle about 5 mb/s of data, so for higher volume streams, more partitions are recommended. | -**stream_type** | StreamType | Yes | A conceptual representation of the expected shape of the data for a stream. HIGH_THROUGHPUT and LOW_LATENCY are not compatible with each other. Defaults to LOW_LATENCY. | -**compressed** | Compressed | Yes | Whether or not compression is enabled for the stream. Defaults to false. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Streams/models/StreamType.md b/docs/v2/Streams/models/StreamType.md deleted file mode 100644 index 6c13b49db..000000000 --- a/docs/v2/Streams/models/StreamType.md +++ /dev/null @@ -1,22 +0,0 @@ -# StreamType - -LOW_LATENCY: The default stream type. Recommended for most use cases. - -HIGH_THROUGHPUT: Best for streams that send large amounts of data every second. Using this stream type might -introduce some non-zero latency at the expense of a higher throughput. This stream type is only -recommended if you inspect your stream metrics in-platform and observe that the average batch size is equal -to the max match size, or if jobs using the stream are failing due to Kafka producer batches expiring. For -additional information on inspecting stream metrics, refer to the -(stream monitoring)[/docs/foundry/data-integration/stream-monitoring/#viewing-metrics] documentation. - -For more information, refer to the [stream types](https://palantir.com/docs/foundry/data-integration/streams/#stream-types) -documentation. - - -| **Value** | -| --------- | -| `"LOW_LATENCY"` | -| `"HIGH_THROUGHPUT"` | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Streams/models/ViewRid.md b/docs/v2/Streams/models/ViewRid.md deleted file mode 100644 index ada8e0b88..000000000 --- a/docs/v2/Streams/models/ViewRid.md +++ /dev/null @@ -1,12 +0,0 @@ -# ViewRid - -The resource identifier (RID) of the view that represents a stream. - - -## Type -```python -RID -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/ThirdPartyApplications/ThirdPartyApplication.md b/docs/v2/ThirdPartyApplications/ThirdPartyApplication.md deleted file mode 100644 index c0a298832..000000000 --- a/docs/v2/ThirdPartyApplications/ThirdPartyApplication.md +++ /dev/null @@ -1,60 +0,0 @@ -# ThirdPartyApplication - -Method | HTTP request | Release Stage | -------------- | ------------- | ----- | -[**get**](#get) | **GET** /v2/thirdPartyApplications/{thirdPartyApplicationRid} | Private Beta | - -# **get** -Get the ThirdPartyApplication with the specified rid. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**third_party_application_rid** | ThirdPartyApplicationRid | An RID identifying a third-party application created in Developer Console. | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**ThirdPartyApplication** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# ThirdPartyApplicationRid | An RID identifying a third-party application created in Developer Console. -third_party_application_rid = ( - "ri.third-party-applications.main.application.292db3b2-b653-4de6-971c-7e97a7b881d6" -) -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.third_party_applications.ThirdPartyApplication.get( - third_party_application_rid, preview=preview - ) - print("The get response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling ThirdPartyApplication.get: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | ThirdPartyApplication | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - diff --git a/docs/v2/ThirdPartyApplications/Version.md b/docs/v2/ThirdPartyApplications/Version.md deleted file mode 100644 index d31e98723..000000000 --- a/docs/v2/ThirdPartyApplications/Version.md +++ /dev/null @@ -1,305 +0,0 @@ -# Version - -Method | HTTP request | Release Stage | -------------- | ------------- | ----- | -[**delete**](#delete) | **DELETE** /v2/thirdPartyApplications/{thirdPartyApplicationRid}/website/versions/{versionVersion} | Stable | -[**get**](#get) | **GET** /v2/thirdPartyApplications/{thirdPartyApplicationRid}/website/versions/{versionVersion} | Stable | -[**list**](#list) | **GET** /v2/thirdPartyApplications/{thirdPartyApplicationRid}/website/versions | Stable | -[**upload**](#upload) | **POST** /v2/thirdPartyApplications/{thirdPartyApplicationRid}/website/versions/upload | Stable | -[**upload_snapshot**](#upload_snapshot) | **POST** /v2/thirdPartyApplications/{thirdPartyApplicationRid}/website/versions/uploadSnapshot | Private Beta | - -# **delete** -Delete the Version with the specified version. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**third_party_application_rid** | ThirdPartyApplicationRid | An RID identifying a third-party application created in Developer Console. | | -**version_version** | VersionVersion | The semantic version of the Website. | | - -### Return type -**None** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# ThirdPartyApplicationRid | An RID identifying a third-party application created in Developer Console. -third_party_application_rid = ( - "ri.third-party-applications.main.application.292db3b2-b653-4de6-971c-7e97a7b881d6" -) -# VersionVersion | The semantic version of the Website. -version_version = "1.2.0" - - -try: - api_response = client.third_party_applications.ThirdPartyApplication.Website.Version.delete( - third_party_application_rid, version_version - ) - print("The delete response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Version.delete: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**204** | None | | None | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **get** -Get the Version with the specified version. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**third_party_application_rid** | ThirdPartyApplicationRid | An RID identifying a third-party application created in Developer Console. | | -**version_version** | VersionVersion | The semantic version of the Website. | | - -### Return type -**Version** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# ThirdPartyApplicationRid | An RID identifying a third-party application created in Developer Console. -third_party_application_rid = ( - "ri.third-party-applications.main.application.292db3b2-b653-4de6-971c-7e97a7b881d6" -) -# VersionVersion | The semantic version of the Website. -version_version = "1.2.0" - - -try: - api_response = client.third_party_applications.ThirdPartyApplication.Website.Version.get( - third_party_application_rid, version_version - ) - print("The get response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Version.get: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | Version | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **list** -Lists all Versions. - -This is a paged endpoint. Each page may be smaller or larger than the requested page size. However, it is guaranteed that if there are more results available, the `nextPageToken` field will be populated. To get the next page, make the same request again, but set the value of the `pageToken` query parameter to be value of the `nextPageToken` value of the previous response. If there is no `nextPageToken` field in the response, you are on the last page. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**third_party_application_rid** | ThirdPartyApplicationRid | An RID identifying a third-party application created in Developer Console. | | -**page_size** | Optional[PageSize] | The page size to use for the endpoint. | [optional] | -**page_token** | Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. | [optional] | - -### Return type -**ListVersionsResponse** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# ThirdPartyApplicationRid | An RID identifying a third-party application created in Developer Console. -third_party_application_rid = ( - "ri.third-party-applications.main.application.292db3b2-b653-4de6-971c-7e97a7b881d6" -) -# Optional[PageSize] | The page size to use for the endpoint. -page_size = None -# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. -page_token = None - - -try: - for version in client.third_party_applications.ThirdPartyApplication.Website.Version.list( - third_party_application_rid, page_size=page_size, page_token=page_token - ): - pprint(version) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Version.list: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | ListVersionsResponse | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **upload** -Upload a new version of the Website. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**third_party_application_rid** | ThirdPartyApplicationRid | An RID identifying a third-party application created in Developer Console. | | -**body** | bytes | The zip file that contains the contents of your application. For more information, refer to the [documentation](https://palantir.com/docs/foundry/ontology-sdk/deploy-osdk-application-on-foundry/) user documentation. | | -**version** | VersionVersion | | | - -### Return type -**Version** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# ThirdPartyApplicationRid | An RID identifying a third-party application created in Developer Console. -third_party_application_rid = ( - "ri.third-party-applications.main.application.292db3b2-b653-4de6-971c-7e97a7b881d6" -) -# bytes | The zip file that contains the contents of your application. For more information, refer to the [documentation](https://palantir.com/docs/foundry/ontology-sdk/deploy-osdk-application-on-foundry/) user documentation. -body = None -# VersionVersion -version = None - - -try: - api_response = client.third_party_applications.ThirdPartyApplication.Website.Version.upload( - third_party_application_rid, body, version=version - ) - print("The upload response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Version.upload: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | Version | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **upload_snapshot** -Upload a snapshot version of the Website. Snapshot versions are automatically deleted after two days. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**third_party_application_rid** | ThirdPartyApplicationRid | An RID identifying a third-party application created in Developer Console. | | -**body** | bytes | The zip file that contains the contents of your application. For more information, refer to the [documentation](https://palantir.com/docs/foundry/ontology-sdk/deploy-osdk-application-on-foundry/) user documentation. | | -**version** | VersionVersion | | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | -**snapshot_identifier** | Optional[str] | The identifier of the snapshot. If the identifier follows the format `foundry.v1@@@`, PR preview for such identifier will be accessible from foundry code repositories. | [optional] | - -### Return type -**Version** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# ThirdPartyApplicationRid | An RID identifying a third-party application created in Developer Console. -third_party_application_rid = ( - "ri.third-party-applications.main.application.292db3b2-b653-4de6-971c-7e97a7b881d6" -) -# bytes | The zip file that contains the contents of your application. For more information, refer to the [documentation](https://palantir.com/docs/foundry/ontology-sdk/deploy-osdk-application-on-foundry/) user documentation. -body = None -# VersionVersion -version = None -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None -# Optional[str] | The identifier of the snapshot. If the identifier follows the format `foundry.v1@@@`, PR preview for such identifier will be accessible from foundry code repositories. -snapshot_identifier = ( - "foundry.v1@ri.stemma.main.repository.a@ri.pull-request.main.pull-request.a@hash" -) - - -try: - api_response = ( - client.third_party_applications.ThirdPartyApplication.Website.Version.upload_snapshot( - third_party_application_rid, - body, - version=version, - preview=preview, - snapshot_identifier=snapshot_identifier, - ) - ) - print("The upload_snapshot response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Version.upload_snapshot: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | Version | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - diff --git a/docs/v2/ThirdPartyApplications/Website.md b/docs/v2/ThirdPartyApplications/Website.md deleted file mode 100644 index e439145ac..000000000 --- a/docs/v2/ThirdPartyApplications/Website.md +++ /dev/null @@ -1,164 +0,0 @@ -# Website - -Method | HTTP request | Release Stage | -------------- | ------------- | ----- | -[**deploy**](#deploy) | **POST** /v2/thirdPartyApplications/{thirdPartyApplicationRid}/website/deploy | Stable | -[**get**](#get) | **GET** /v2/thirdPartyApplications/{thirdPartyApplicationRid}/website | Stable | -[**undeploy**](#undeploy) | **POST** /v2/thirdPartyApplications/{thirdPartyApplicationRid}/website/undeploy | Stable | - -# **deploy** -Deploy a version of the Website. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**third_party_application_rid** | ThirdPartyApplicationRid | An RID identifying a third-party application created in Developer Console. | | -**version** | VersionVersion | | | - -### Return type -**Website** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# ThirdPartyApplicationRid | An RID identifying a third-party application created in Developer Console. -third_party_application_rid = ( - "ri.third-party-applications.main.application.292db3b2-b653-4de6-971c-7e97a7b881d6" -) -# VersionVersion -version = "1.2.0" - - -try: - api_response = client.third_party_applications.ThirdPartyApplication.Website.deploy( - third_party_application_rid, version=version - ) - print("The deploy response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Website.deploy: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | Website | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **get** -Get the Website. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**third_party_application_rid** | ThirdPartyApplicationRid | An RID identifying a third-party application created in Developer Console. | | - -### Return type -**Website** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# ThirdPartyApplicationRid | An RID identifying a third-party application created in Developer Console. -third_party_application_rid = ( - "ri.third-party-applications.main.application.292db3b2-b653-4de6-971c-7e97a7b881d6" -) - - -try: - api_response = client.third_party_applications.ThirdPartyApplication.Website.get( - third_party_application_rid - ) - print("The get response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Website.get: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | Website | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **undeploy** -Remove the currently deployed version of the Website. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**third_party_application_rid** | ThirdPartyApplicationRid | An RID identifying a third-party application created in Developer Console. | | - -### Return type -**Website** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# ThirdPartyApplicationRid | An RID identifying a third-party application created in Developer Console. -third_party_application_rid = ( - "ri.third-party-applications.main.application.292db3b2-b653-4de6-971c-7e97a7b881d6" -) - - -try: - api_response = client.third_party_applications.ThirdPartyApplication.Website.undeploy( - third_party_application_rid - ) - print("The undeploy response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Website.undeploy: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | Website | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - diff --git a/docs/v2/ThirdPartyApplications/models/DeployWebsiteRequest.md b/docs/v2/ThirdPartyApplications/models/DeployWebsiteRequest.md deleted file mode 100644 index aa158050b..000000000 --- a/docs/v2/ThirdPartyApplications/models/DeployWebsiteRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# DeployWebsiteRequest - -DeployWebsiteRequest - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**version** | VersionVersion | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/ThirdPartyApplications/models/ListVersionsResponse.md b/docs/v2/ThirdPartyApplications/models/ListVersionsResponse.md deleted file mode 100644 index 48e6eefeb..000000000 --- a/docs/v2/ThirdPartyApplications/models/ListVersionsResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListVersionsResponse - -ListVersionsResponse - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**data** | List[Version] | Yes | | -**next_page_token** | Optional[PageToken] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/ThirdPartyApplications/models/Subdomain.md b/docs/v2/ThirdPartyApplications/models/Subdomain.md deleted file mode 100644 index 1800c3c5e..000000000 --- a/docs/v2/ThirdPartyApplications/models/Subdomain.md +++ /dev/null @@ -1,11 +0,0 @@ -# Subdomain - -A subdomain from which a website is served. - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/ThirdPartyApplications/models/ThirdPartyApplication.md b/docs/v2/ThirdPartyApplications/models/ThirdPartyApplication.md deleted file mode 100644 index 9e347d0a6..000000000 --- a/docs/v2/ThirdPartyApplications/models/ThirdPartyApplication.md +++ /dev/null @@ -1,11 +0,0 @@ -# ThirdPartyApplication - -ThirdPartyApplication - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**rid** | ThirdPartyApplicationRid | Yes | An RID identifying a third-party application created in Developer Console. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/ThirdPartyApplications/models/ThirdPartyApplicationRid.md b/docs/v2/ThirdPartyApplications/models/ThirdPartyApplicationRid.md deleted file mode 100644 index a8e9754f1..000000000 --- a/docs/v2/ThirdPartyApplications/models/ThirdPartyApplicationRid.md +++ /dev/null @@ -1,11 +0,0 @@ -# ThirdPartyApplicationRid - -An RID identifying a third-party application created in Developer Console. - -## Type -```python -RID -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/ThirdPartyApplications/models/Version.md b/docs/v2/ThirdPartyApplications/models/Version.md deleted file mode 100644 index 6048048bf..000000000 --- a/docs/v2/ThirdPartyApplications/models/Version.md +++ /dev/null @@ -1,11 +0,0 @@ -# Version - -Version - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**version** | VersionVersion | Yes | The semantic version of the Website. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/ThirdPartyApplications/models/VersionVersion.md b/docs/v2/ThirdPartyApplications/models/VersionVersion.md deleted file mode 100644 index d261949d6..000000000 --- a/docs/v2/ThirdPartyApplications/models/VersionVersion.md +++ /dev/null @@ -1,11 +0,0 @@ -# VersionVersion - -The semantic version of the Website. - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/ThirdPartyApplications/models/Website.md b/docs/v2/ThirdPartyApplications/models/Website.md deleted file mode 100644 index d247582a5..000000000 --- a/docs/v2/ThirdPartyApplications/models/Website.md +++ /dev/null @@ -1,12 +0,0 @@ -# Website - -Website - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**deployed_version** | Optional[VersionVersion] | No | The version of the Website that is currently deployed. | -**subdomains** | List[Subdomain] | Yes | The subdomains from which the Website is currently served. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Widgets/DevModeSettings.md b/docs/v2/Widgets/DevModeSettings.md deleted file mode 100644 index 7838b903a..000000000 --- a/docs/v2/Widgets/DevModeSettings.md +++ /dev/null @@ -1,325 +0,0 @@ -# DevModeSettings - -Method | HTTP request | Release Stage | -------------- | ------------- | ----- | -[**disable**](#disable) | **POST** /v2/widgets/devModeSettings/disable | Private Beta | -[**enable**](#enable) | **POST** /v2/widgets/devModeSettings/enable | Private Beta | -[**get**](#get) | **GET** /v2/widgets/devModeSettings | Private Beta | -[**pause**](#pause) | **POST** /v2/widgets/devModeSettings/pause | Private Beta | -[**set_widget_set**](#set_widget_set) | **POST** /v2/widgets/devModeSettings/setWidgetSet | Private Beta | -[**set_widget_set_by_id**](#set_widget_set_by_id) | **POST** /v2/widgets/devModeSettings/setWidgetSetById | Private Beta | - -# **disable** -Disable dev mode for the user associated with the provided token. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**DevModeSettings** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.widgets.DevModeSettings.disable(preview=preview) - print("The disable response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling DevModeSettings.disable: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | DevModeSettings | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **enable** -Enable dev mode for the user associated with the provided token. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**DevModeSettings** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.widgets.DevModeSettings.enable(preview=preview) - print("The enable response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling DevModeSettings.enable: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | DevModeSettings | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **get** -Get the dev mode settings for the user associated with the provided token. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**DevModeSettings** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.widgets.DevModeSettings.get(preview=preview) - print("The get response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling DevModeSettings.get: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | DevModeSettings | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **pause** -Pause dev mode for the user associated with the provided token. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**DevModeSettings** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.widgets.DevModeSettings.pause(preview=preview) - print("The pause response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling DevModeSettings.pause: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | DevModeSettings | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **set_widget_set** -Set the dev mode settings for the given widget set for the user associated with the provided token. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**settings** | WidgetSetDevModeSettings | | | -**widget_set_rid** | WidgetSetRid | | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**DevModeSettings** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# WidgetSetDevModeSettings -settings = { - "widgetSettings": { - "ri.widgetregistry..widget.21dt2c42-b7df-4b23-880b-1436a3dred2e": { - "stylesheetEntrypoints": [{"filePath": "dist/app.js"}], - "scriptEntrypoints": [{"filePath": "dist/app.js", "scriptType": "DEFAULT"}], - } - } -} -# WidgetSetRid -widget_set_rid = "ri.widgetregistry..widget-set.21dt2c42-b7df-4b23-880b-1436a3dred2e" -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.widgets.DevModeSettings.set_widget_set( - settings=settings, widget_set_rid=widget_set_rid, preview=preview - ) - print("The set_widget_set response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling DevModeSettings.set_widget_set: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | DevModeSettings | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **set_widget_set_by_id** -Set the dev mode settings for the given widget set for the user associated with the -provided token. Uses widget IDs to identify widgets within the set. - - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**settings** | WidgetSetDevModeSettingsById | | | -**widget_set_rid** | WidgetSetRid | | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**DevModeSettings** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# WidgetSetDevModeSettingsById -settings = { - "widgetSettings": { - "myCustomWidget": { - "stylesheetEntrypoints": [{"filePath": "dist/app.js"}], - "scriptEntrypoints": [{"filePath": "dist/app.js", "scriptType": "DEFAULT"}], - } - } -} -# WidgetSetRid -widget_set_rid = "ri.widgetregistry..widget-set.21dt2c42-b7df-4b23-880b-1436a3dred2e" -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.widgets.DevModeSettings.set_widget_set_by_id( - settings=settings, widget_set_rid=widget_set_rid, preview=preview - ) - print("The set_widget_set_by_id response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling DevModeSettings.set_widget_set_by_id: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | DevModeSettings | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - diff --git a/docs/v2/Widgets/Release.md b/docs/v2/Widgets/Release.md deleted file mode 100644 index bbc6a5307..000000000 --- a/docs/v2/Widgets/Release.md +++ /dev/null @@ -1,177 +0,0 @@ -# Release - -Method | HTTP request | Release Stage | -------------- | ------------- | ----- | -[**delete**](#delete) | **DELETE** /v2/widgets/widgetSets/{widgetSetRid}/releases/{releaseVersion} | Private Beta | -[**get**](#get) | **GET** /v2/widgets/widgetSets/{widgetSetRid}/releases/{releaseVersion} | Private Beta | -[**list**](#list) | **GET** /v2/widgets/widgetSets/{widgetSetRid}/releases | Private Beta | - -# **delete** -Delete the Release with the specified version. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**widget_set_rid** | WidgetSetRid | A Resource Identifier (RID) identifying a widget set. | | -**release_version** | ReleaseVersion | The semantic version of the widget set. | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**None** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# WidgetSetRid | A Resource Identifier (RID) identifying a widget set. -widget_set_rid = "ri.widgetregistry..widget-set.21dt2c42-b7df-4b23-880b-1436a3dred2e" -# ReleaseVersion | The semantic version of the widget set. -release_version = "1.2.0" -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.widgets.WidgetSet.Release.delete( - widget_set_rid, release_version, preview=preview - ) - print("The delete response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Release.delete: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**204** | None | | None | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **get** -Get the Release with the specified version. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**widget_set_rid** | WidgetSetRid | A Resource Identifier (RID) identifying a widget set. | | -**release_version** | ReleaseVersion | The semantic version of the widget set. | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**Release** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# WidgetSetRid | A Resource Identifier (RID) identifying a widget set. -widget_set_rid = "ri.widgetregistry..widget-set.21dt2c42-b7df-4b23-880b-1436a3dred2e" -# ReleaseVersion | The semantic version of the widget set. -release_version = "1.2.0" -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.widgets.WidgetSet.Release.get( - widget_set_rid, release_version, preview=preview - ) - print("The get response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Release.get: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | Release | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **list** -Lists all Releases. - -This is a paged endpoint. Each page may be smaller or larger than the requested page size. However, it is guaranteed that if there are more results available, the `nextPageToken` field will be populated. To get the next page, make the same request again, but set the value of the `pageToken` query parameter to be value of the `nextPageToken` value of the previous response. If there is no `nextPageToken` field in the response, you are on the last page. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**widget_set_rid** | WidgetSetRid | A Resource Identifier (RID) identifying a widget set. | | -**page_size** | Optional[PageSize] | The page size to use for the endpoint. | [optional] | -**page_token** | Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. | [optional] | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**ListReleasesResponse** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# WidgetSetRid | A Resource Identifier (RID) identifying a widget set. -widget_set_rid = "ri.widgetregistry..widget-set.21dt2c42-b7df-4b23-880b-1436a3dred2e" -# Optional[PageSize] | The page size to use for the endpoint. -page_size = None -# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. -page_token = None -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - for release in client.widgets.WidgetSet.Release.list( - widget_set_rid, page_size=page_size, page_token=page_token, preview=preview - ): - pprint(release) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Release.list: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | ListReleasesResponse | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - diff --git a/docs/v2/Widgets/Repository.md b/docs/v2/Widgets/Repository.md deleted file mode 100644 index de2ae68e4..000000000 --- a/docs/v2/Widgets/Repository.md +++ /dev/null @@ -1,115 +0,0 @@ -# Repository - -Method | HTTP request | Release Stage | -------------- | ------------- | ----- | -[**get**](#get) | **GET** /v2/widgets/repositories/{repositoryRid} | Private Beta | -[**publish**](#publish) | **POST** /v2/widgets/repositories/{repositoryRid}/publish | Private Beta | - -# **get** -Get the Repository with the specified rid. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**repository_rid** | RepositoryRid | A Resource Identifier (RID) identifying a repository. | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**Repository** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# RepositoryRid | A Resource Identifier (RID) identifying a repository. -repository_rid = "ri.stemma.main.repository.e1r31370-3cf3-4ac4-9269-h1432d7fb0b4" -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.widgets.Repository.get(repository_rid, preview=preview) - print("The get response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Repository.get: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | Repository | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - -# **publish** -Publish a new release of a widget set. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**repository_rid** | RepositoryRid | A Resource Identifier (RID) identifying a repository. | | -**body** | bytes | The zip file that contains the contents of your widget set. It must include a valid manifest file at the path `.palantir/widgets.config.json`. | | -**repository_version** | RepositoryVersion | | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**Release** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# RepositoryRid | A Resource Identifier (RID) identifying a repository. -repository_rid = "ri.stemma.main.repository.e1r31370-3cf3-4ac4-9269-h1432d7fb0b4" -# bytes | The zip file that contains the contents of your widget set. It must include a valid manifest file at the path `.palantir/widgets.config.json`. -body = None -# RepositoryVersion -repository_version = None -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.widgets.Repository.publish( - repository_rid, body, repository_version=repository_version, preview=preview - ) - print("The publish response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling Repository.publish: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | Release | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - diff --git a/docs/v2/Widgets/WidgetSet.md b/docs/v2/Widgets/WidgetSet.md deleted file mode 100644 index aef32c88b..000000000 --- a/docs/v2/Widgets/WidgetSet.md +++ /dev/null @@ -1,56 +0,0 @@ -# WidgetSet - -Method | HTTP request | Release Stage | -------------- | ------------- | ----- | -[**get**](#get) | **GET** /v2/widgets/widgetSets/{widgetSetRid} | Private Beta | - -# **get** -Get the WidgetSet with the specified rid. - -### Parameters - -Name | Type | Description | Notes | -------------- | ------------- | ------------- | ------------- | -**widget_set_rid** | WidgetSetRid | A Resource Identifier (RID) identifying a widget set. | | -**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | - -### Return type -**WidgetSet** - -### Example - -```python -from foundry_sdk import FoundryClient -import foundry_sdk -from pprint import pprint - -client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") - -# WidgetSetRid | A Resource Identifier (RID) identifying a widget set. -widget_set_rid = "ri.widgetregistry..widget-set.21dt2c42-b7df-4b23-880b-1436a3dred2e" -# Optional[PreviewMode] | Enables the use of preview functionality. -preview = None - - -try: - api_response = client.widgets.WidgetSet.get(widget_set_rid, preview=preview) - print("The get response:\n") - pprint(api_response) -except foundry_sdk.PalantirRPCException as e: - print("HTTP error when calling WidgetSet.get: %s\n" % e) - -``` - - - -### Authorization - -See [README](../../../README.md#authorization) - -### HTTP response details -| Status Code | Type | Description | Content Type | -|-------------|-------------|-------------|------------------| -**200** | WidgetSet | | application/json | - -[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) - diff --git a/docs/v2/Widgets/models/DevModeSettings.md b/docs/v2/Widgets/models/DevModeSettings.md deleted file mode 100644 index a0b4e1344..000000000 --- a/docs/v2/Widgets/models/DevModeSettings.md +++ /dev/null @@ -1,12 +0,0 @@ -# DevModeSettings - -DevModeSettings - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**status** | DevModeStatus | Yes | | -**widget_set_settings** | Dict[WidgetSetRid, WidgetSetDevModeSettings] | Yes | The dev mode settings for each widget set, keyed by widget set RID. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Widgets/models/DevModeStatus.md b/docs/v2/Widgets/models/DevModeStatus.md deleted file mode 100644 index d7522420e..000000000 --- a/docs/v2/Widgets/models/DevModeStatus.md +++ /dev/null @@ -1,12 +0,0 @@ -# DevModeStatus - -The user's global development mode status for widget sets. - -| **Value** | -| --------- | -| `"ENABLED"` | -| `"PAUSED"` | -| `"DISABLED"` | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Widgets/models/FilePath.md b/docs/v2/Widgets/models/FilePath.md deleted file mode 100644 index 7805fa7ad..000000000 --- a/docs/v2/Widgets/models/FilePath.md +++ /dev/null @@ -1,11 +0,0 @@ -# FilePath - -A locator for a specific file in a widget set's release directory. - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Widgets/models/ListReleasesResponse.md b/docs/v2/Widgets/models/ListReleasesResponse.md deleted file mode 100644 index a22c34f80..000000000 --- a/docs/v2/Widgets/models/ListReleasesResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListReleasesResponse - -ListReleasesResponse - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**data** | List[Release] | Yes | | -**next_page_token** | Optional[PageToken] | No | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Widgets/models/Release.md b/docs/v2/Widgets/models/Release.md deleted file mode 100644 index 278942183..000000000 --- a/docs/v2/Widgets/models/Release.md +++ /dev/null @@ -1,14 +0,0 @@ -# Release - -Release - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**widget_set_rid** | WidgetSetRid | Yes | The Resource Identifier (RID) of the widget set this release is for. | -**version** | ReleaseVersion | Yes | The semantic version of the widget set. | -**locator** | ReleaseLocator | Yes | | -**description** | Optional[str] | No | The description of this release. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Widgets/models/ReleaseLocator.md b/docs/v2/Widgets/models/ReleaseLocator.md deleted file mode 100644 index 4fa87bcb1..000000000 --- a/docs/v2/Widgets/models/ReleaseLocator.md +++ /dev/null @@ -1,12 +0,0 @@ -# ReleaseLocator - -A locator for where the backing files of a release are stored. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**repository_rid** | RepositoryRid | Yes | The Resource Identifier (RID) of the repository that contains the release. | -**repository_version** | RepositoryVersion | Yes | The version of the repository storing the backing files. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Widgets/models/ReleaseVersion.md b/docs/v2/Widgets/models/ReleaseVersion.md deleted file mode 100644 index 4e16cc586..000000000 --- a/docs/v2/Widgets/models/ReleaseVersion.md +++ /dev/null @@ -1,11 +0,0 @@ -# ReleaseVersion - -The semantic version of the widget set. - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Widgets/models/Repository.md b/docs/v2/Widgets/models/Repository.md deleted file mode 100644 index c6fa79f7d..000000000 --- a/docs/v2/Widgets/models/Repository.md +++ /dev/null @@ -1,12 +0,0 @@ -# Repository - -Repository - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**rid** | RepositoryRid | Yes | A Resource Identifier (RID) identifying a repository. | -**widget_set_rid** | Optional[WidgetSetRid] | No | The Resource Identifier (RID) of the widget set that has authorized this repository to publish new widget releases. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Widgets/models/RepositoryRid.md b/docs/v2/Widgets/models/RepositoryRid.md deleted file mode 100644 index c16d2ba34..000000000 --- a/docs/v2/Widgets/models/RepositoryRid.md +++ /dev/null @@ -1,11 +0,0 @@ -# RepositoryRid - -A Resource Identifier (RID) identifying a repository. - -## Type -```python -RID -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Widgets/models/RepositoryVersion.md b/docs/v2/Widgets/models/RepositoryVersion.md deleted file mode 100644 index c85535e3f..000000000 --- a/docs/v2/Widgets/models/RepositoryVersion.md +++ /dev/null @@ -1,11 +0,0 @@ -# RepositoryVersion - -A semantic version of a repository storing backing files. - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Widgets/models/ScriptEntrypoint.md b/docs/v2/Widgets/models/ScriptEntrypoint.md deleted file mode 100644 index 986ac0e02..000000000 --- a/docs/v2/Widgets/models/ScriptEntrypoint.md +++ /dev/null @@ -1,12 +0,0 @@ -# ScriptEntrypoint - -A script entrypoint to be loaded into the runtime environment. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**file_path** | FilePath | Yes | A relative path from the root to a JavaScript entrypoint. It must satisfy: - Must contain one or more non-empty segments separated by `/`. - Each segment must only contain the following ASCII characters: a-z, A-Z, 0-9 and -_.. - Must have a maximum length of 100. | -**script_type** | ScriptType | Yes | Defines HTML "type" attribute to be used for the script entrypoint. The supported values are `DEFAULT` and `MODULE`, where `DEFAULT` maps to "text/javascript" and `MODULE` maps to "module". | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Widgets/models/ScriptType.md b/docs/v2/Widgets/models/ScriptType.md deleted file mode 100644 index e278203f8..000000000 --- a/docs/v2/Widgets/models/ScriptType.md +++ /dev/null @@ -1,11 +0,0 @@ -# ScriptType - -ScriptType - -| **Value** | -| --------- | -| `"DEFAULT"` | -| `"MODULE"` | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Widgets/models/SetWidgetSetDevModeSettingsByIdRequest.md b/docs/v2/Widgets/models/SetWidgetSetDevModeSettingsByIdRequest.md deleted file mode 100644 index 540165f0d..000000000 --- a/docs/v2/Widgets/models/SetWidgetSetDevModeSettingsByIdRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# SetWidgetSetDevModeSettingsByIdRequest - -SetWidgetSetDevModeSettingsByIdRequest - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**widget_set_rid** | WidgetSetRid | Yes | | -**settings** | WidgetSetDevModeSettingsById | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Widgets/models/SetWidgetSetDevModeSettingsRequest.md b/docs/v2/Widgets/models/SetWidgetSetDevModeSettingsRequest.md deleted file mode 100644 index 75639c980..000000000 --- a/docs/v2/Widgets/models/SetWidgetSetDevModeSettingsRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# SetWidgetSetDevModeSettingsRequest - -SetWidgetSetDevModeSettingsRequest - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**widget_set_rid** | WidgetSetRid | Yes | | -**settings** | WidgetSetDevModeSettings | Yes | | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Widgets/models/StylesheetEntrypoint.md b/docs/v2/Widgets/models/StylesheetEntrypoint.md deleted file mode 100644 index e4b7c6d1e..000000000 --- a/docs/v2/Widgets/models/StylesheetEntrypoint.md +++ /dev/null @@ -1,11 +0,0 @@ -# StylesheetEntrypoint - -A stylesheet entrypoint to be loaded into the runtime environment. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**file_path** | FilePath | Yes | A relative path from the root to a CSS entrypoint. It must satisfy: - Must contain one or more non-empty segments separated by `/`. - Each segment must only contain the following ASCII characters: a-z, A-Z, 0-9 and -_.. - Must have a maximum length of 100. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Widgets/models/WidgetDevModeSettings.md b/docs/v2/Widgets/models/WidgetDevModeSettings.md deleted file mode 100644 index c406831b1..000000000 --- a/docs/v2/Widgets/models/WidgetDevModeSettings.md +++ /dev/null @@ -1,12 +0,0 @@ -# WidgetDevModeSettings - -The settings for a given widget in development mode. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**script_entrypoints** | List[ScriptEntrypoint] | Yes | The entrypoint JavaScript files for the widget. | -**stylesheet_entrypoints** | List[StylesheetEntrypoint] | Yes | The entrypoint CSS files for the widget. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Widgets/models/WidgetId.md b/docs/v2/Widgets/models/WidgetId.md deleted file mode 100644 index 6f1b24ce0..000000000 --- a/docs/v2/Widgets/models/WidgetId.md +++ /dev/null @@ -1,18 +0,0 @@ -# WidgetId - -Human readable ID for a widget. Must be unique within a widget set. -Considered unsafe as it may contain user defined data. - -- Must only contain the following ASCII characters: a-z, A-Z and 0-9. -- Must not start with a number. -- Must have a maximum length of 100. -- Must be camelCase. - - -## Type -```python -str -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Widgets/models/WidgetRid.md b/docs/v2/Widgets/models/WidgetRid.md deleted file mode 100644 index a8f4374c2..000000000 --- a/docs/v2/Widgets/models/WidgetRid.md +++ /dev/null @@ -1,11 +0,0 @@ -# WidgetRid - -A Resource Identifier (RID) identifying a widget. - -## Type -```python -RID -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Widgets/models/WidgetSet.md b/docs/v2/Widgets/models/WidgetSet.md deleted file mode 100644 index 791930348..000000000 --- a/docs/v2/Widgets/models/WidgetSet.md +++ /dev/null @@ -1,12 +0,0 @@ -# WidgetSet - -WidgetSet - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**rid** | WidgetSetRid | Yes | A Resource Identifier (RID) identifying a widget set. | -**publish_repository_rid** | Optional[RepositoryRid] | No | The Resource Identifier (RID) of the repository that is authorized to publish new widget releases to this widget set through a manifest. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Widgets/models/WidgetSetDevModeSettings.md b/docs/v2/Widgets/models/WidgetSetDevModeSettings.md deleted file mode 100644 index 181d6c8da..000000000 --- a/docs/v2/Widgets/models/WidgetSetDevModeSettings.md +++ /dev/null @@ -1,12 +0,0 @@ -# WidgetSetDevModeSettings - -The settings for a widget set in development mode, keyed by widget RID. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**base_href** | str | Yes | The base path for the HTML file used to render the widget in dev mode. | -**widget_settings** | Dict[WidgetRid, WidgetDevModeSettings] | Yes | The dev mode settings for each widget in the widget set, keyed by widget RIDs. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Widgets/models/WidgetSetDevModeSettingsById.md b/docs/v2/Widgets/models/WidgetSetDevModeSettingsById.md deleted file mode 100644 index d163d788f..000000000 --- a/docs/v2/Widgets/models/WidgetSetDevModeSettingsById.md +++ /dev/null @@ -1,12 +0,0 @@ -# WidgetSetDevModeSettingsById - -The settings for a widget set in development mode, keyed by widget ID. - -## Properties -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -**base_href** | str | Yes | The base path for the HTML file used to render the widget in dev mode. | -**widget_settings** | Dict[WidgetId, WidgetDevModeSettings] | Yes | The dev mode settings for each widget in the widget set, keyed by widget IDs. | - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Widgets/models/WidgetSetRid.md b/docs/v2/Widgets/models/WidgetSetRid.md deleted file mode 100644 index 5a2fb12c2..000000000 --- a/docs/v2/Widgets/models/WidgetSetRid.md +++ /dev/null @@ -1,11 +0,0 @@ -# WidgetSetRid - -A Resource Identifier (RID) identifying a widget set. - -## Type -```python -RID -``` - - -[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/foundry_sdk/__init__.py b/foundry_sdk/__init__.py deleted file mode 100644 index 2e72b74f8..000000000 --- a/foundry_sdk/__init__.py +++ /dev/null @@ -1,115 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -from foundry_sdk._core import ApiResponse -from foundry_sdk._core import AsyncApiResponse -from foundry_sdk._core import AsyncPageIterator -from foundry_sdk._core import AsyncResourceIterator -from foundry_sdk._core import Auth -from foundry_sdk._core import ConfidentialClientAuth -from foundry_sdk._core import Config -from foundry_sdk._core import PageIterator -from foundry_sdk._core import PublicClientAuth -from foundry_sdk._core import ResourceIterator -from foundry_sdk._core import StreamedApiResponse -from foundry_sdk._core import StreamingContextManager -from foundry_sdk._core import TableResponse -from foundry_sdk._core import UserTokenAuth - -# Context and environment variables -from foundry_sdk._core.context_and_environment_vars import ATTRIBUTION_VAR -from foundry_sdk._core.context_and_environment_vars import HOSTNAME_ENV_VAR -from foundry_sdk._core.context_and_environment_vars import HOSTNAME_VAR -from foundry_sdk._core.context_and_environment_vars import TOKEN_ENV_VAR -from foundry_sdk._core.context_and_environment_vars import TOKEN_VAR -from foundry_sdk._errors import ApiNotFoundError -from foundry_sdk._errors import BadRequestError -from foundry_sdk._errors import ConflictError -from foundry_sdk._errors import ConnectionError -from foundry_sdk._errors import ConnectTimeout -from foundry_sdk._errors import EnvironmentNotConfigured -from foundry_sdk._errors import InternalServerError -from foundry_sdk._errors import NotAuthenticated -from foundry_sdk._errors import NotFoundError -from foundry_sdk._errors import PalantirException -from foundry_sdk._errors import PalantirRPCException -from foundry_sdk._errors import PermissionDeniedError -from foundry_sdk._errors import ProxyError -from foundry_sdk._errors import RateLimitError -from foundry_sdk._errors import ReadTimeout -from foundry_sdk._errors import RequestEntityTooLargeError -from foundry_sdk._errors import SDKInternalError -from foundry_sdk._errors import ServiceUnavailable -from foundry_sdk._errors import StreamConsumedError -from foundry_sdk._errors import TimeoutError -from foundry_sdk._errors import UnauthorizedError -from foundry_sdk._errors import UnprocessableEntityError -from foundry_sdk._errors import WriteTimeout - -# The OpenAPI document version from the spec information -# See https://swagger.io/specification/#info-object -# The SDK version -from foundry_sdk._versions import __openapi_document_version__ -from foundry_sdk._versions import __version__ -from foundry_sdk.v2 import AsyncFoundryClient -from foundry_sdk.v2 import FoundryClient - -# The OpenAPI specification version -# See https://swagger.io/specification/#versions - - -__all__ = [ - "__version__", - "__openapi_document_version__", - "Auth", - "ConfidentialClientAuth", - "PublicClientAuth", - "UserTokenAuth", - "Config", - "ATTRIBUTION_VAR", - "HOSTNAME_VAR", - "HOSTNAME_ENV_VAR", - "TOKEN_VAR", - "TOKEN_ENV_VAR", - "PalantirException", - "EnvironmentNotConfigured", - "NotAuthenticated", - "ConnectionError", - "ProxyError", - "PalantirRPCException", - "BadRequestError", - "UnauthorizedError", - "PermissionDeniedError", - "NotFoundError", - "UnprocessableEntityError", - "RateLimitError", - "ServiceUnavailable", - "RequestEntityTooLargeError", - "ConflictError", - "InternalServerError", - "SDKInternalError", - "StreamConsumedError", - "ConnectTimeout", - "ReadTimeout", - "WriteTimeout", - "TimeoutError", - "ApiNotFoundError", - "FoundryClient", - "AsyncFoundryClient", - "ResourceIterator", - "AsyncResourceIterator", - "PageIterator", - "AsyncPageIterator", -] diff --git a/foundry_sdk/_core/__init__.py b/foundry_sdk/_core/__init__.py deleted file mode 100644 index bdb78545a..000000000 --- a/foundry_sdk/_core/__init__.py +++ /dev/null @@ -1,46 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -from foundry_sdk._core.api_client import ApiClient -from foundry_sdk._core.api_client import ApiResponse -from foundry_sdk._core.api_client import AsyncApiClient -from foundry_sdk._core.api_client import AsyncApiResponse -from foundry_sdk._core.api_client import RequestInfo -from foundry_sdk._core.api_client import SdkInternal -from foundry_sdk._core.api_client import StreamedApiResponse -from foundry_sdk._core.api_client import StreamingContextManager -from foundry_sdk._core.api_client import async_with_raw_response -from foundry_sdk._core.api_client import async_with_streaming_response -from foundry_sdk._core.api_client import with_raw_response -from foundry_sdk._core.api_client import with_streaming_response -from foundry_sdk._core.auth_utils import Auth -from foundry_sdk._core.compute_module_pipeline_auth import ComputeModulePipelineAuth -from foundry_sdk._core.confidential_client_auth import ConfidentialClientAuth -from foundry_sdk._core.config import Config -from foundry_sdk._core.model_base import ModelBase -from foundry_sdk._core.public_client_auth import PublicClientAuth -from foundry_sdk._core.resource_iterator import AsyncPageIterator -from foundry_sdk._core.resource_iterator import AsyncResourceIterator -from foundry_sdk._core.resource_iterator import PageIterator -from foundry_sdk._core.resource_iterator import ResourceIterator -from foundry_sdk._core.table import TableResponse -from foundry_sdk._core.user_token_auth_client import UserTokenAuth -from foundry_sdk._core.utils import RID -from foundry_sdk._core.utils import UUID -from foundry_sdk._core.utils import AwareDatetime -from foundry_sdk._core.utils import Long -from foundry_sdk._core.utils import Timeout -from foundry_sdk._core.utils import maybe_ignore_preview -from foundry_sdk._core.utils import resolve_forward_references diff --git a/foundry_sdk/_core/api_client.py b/foundry_sdk/_core/api_client.py deleted file mode 100644 index 2cd44c823..000000000 --- a/foundry_sdk/_core/api_client.py +++ /dev/null @@ -1,836 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -from __future__ import annotations - -import contextlib -import functools -import json -import re -from abc import ABC -from abc import abstractmethod -from dataclasses import dataclass -from datetime import datetime -from datetime import timezone -from inspect import isclass -from random import Random -from random import SystemRandom -from typing import Any -from typing import AsyncIterator -from typing import Awaitable -from typing import Callable -from typing import Dict -from typing import Generic -from typing import Iterator -from typing import List -from typing import Literal -from typing import Optional -from typing import Tuple -from typing import Type -from typing import TypeVar -from typing import Union -from typing import cast -from typing import get_args -from typing import get_origin -from urllib.parse import quote - -import httpx -import pydantic -from retrying import retry # type: ignore -from typing_extensions import Annotated -from typing_extensions import NotRequired -from typing_extensions import ParamSpec -from typing_extensions import TypedDict - -from foundry_sdk._core.auth_utils import Auth -from foundry_sdk._core.auth_utils import Token -from foundry_sdk._core.config import Config -from foundry_sdk._core.http_client import AsyncHttpClient -from foundry_sdk._core.http_client import HttpClient -from foundry_sdk._core.resource_iterator import AsyncResourceIterator -from foundry_sdk._core.resource_iterator import ResourceIterator -from foundry_sdk._core.table import TableResponse -from foundry_sdk._core.utils import assert_non_empty_string -from foundry_sdk._errors import ApiNotFoundError -from foundry_sdk._errors import BadRequestError -from foundry_sdk._errors import ConflictError -from foundry_sdk._errors import ConnectionError -from foundry_sdk._errors import ConnectTimeout -from foundry_sdk._errors import InternalServerError -from foundry_sdk._errors import NotFoundError -from foundry_sdk._errors import PalantirRPCException -from foundry_sdk._errors import PermissionDeniedError -from foundry_sdk._errors import ProxyError -from foundry_sdk._errors import RateLimitError -from foundry_sdk._errors import ReadTimeout -from foundry_sdk._errors import RequestEntityTooLargeError -from foundry_sdk._errors import SDKInternalError -from foundry_sdk._errors import ServiceUnavailable -from foundry_sdk._errors import StreamConsumedError -from foundry_sdk._errors import UnauthorizedError -from foundry_sdk._errors import UnprocessableEntityError -from foundry_sdk._errors import WriteTimeout -from foundry_sdk._errors import deserialize_error -from foundry_sdk._versions import __version__ - -QueryParameters = Dict[str, Union[Any, List[Any]]] - - -@contextlib.contextmanager -def error_handling(): - try: - yield - except httpx.ProxyError as e: - raise ProxyError(str(e)) from e - except httpx.ConnectTimeout as e: - raise ConnectTimeout(str(e)) from e - except httpx.ConnectError as e: - raise ConnectionError(str(e)) from e - except httpx.ReadTimeout as e: - raise ReadTimeout(str(e)) from e - except httpx.WriteTimeout as e: - raise WriteTimeout(str(e)) from e - - -AnyParameters = ParamSpec("AnyParameters") - - -R = TypeVar("R") - - -def with_raw_response( - # HACK: There is no generic way to accept a "type" - # See https://github.com/python/mypy/issues/9773 - # This is solved in py 3.14 but for now, this allows us to accept a type R - # The purpose of passing in the response type "R" is so that we can properly - # type the modified function so that mypy/pyright (and code assist tools) - # understand the return value - # For example, if the return type is "User" then the new return type would - # be "ApiResponse[User]" - # We can't reliably get it from "func" which doesn't always match the return - # type of the API (e.g. the iterator response types) - response_type: Callable[[R], None], - func: Callable[AnyParameters, Any], -) -> Callable[AnyParameters, ApiResponse[R]]: - return cast( - Callable[AnyParameters, ApiResponse[R]], - functools.partial(func, _sdk_internal={"response_mode": "RAW"}), # type: ignore - ) - - -def with_streaming_response( - # See explanation in "with_raw_response" for why we need to the "response_type" parameter - response_type: Callable[[R], None], - func: Callable[AnyParameters, Any], -) -> Callable[AnyParameters, StreamingContextManager[R]]: - return cast( - Callable[AnyParameters, StreamingContextManager[R]], - functools.partial(func, _sdk_internal={"response_mode": "STREAMING"}), # type: ignore - ) - - -def async_with_raw_response( - # See explanation in "with_raw_response" for why we need to the "response_type" parameter - response_type: Callable[[R], None], - func: Callable[AnyParameters, Any], -) -> Callable[AnyParameters, Awaitable[AsyncApiResponse[R]]]: - return cast( - Callable[AnyParameters, AsyncApiResponse[R]], - functools.partial(func, _sdk_internal={"response_mode": "RAW"}), # type: ignore - ) - - -def async_with_streaming_response( - # See explanation in "with_raw_response" for why we need to the "response_type" parameter - response_type: Callable[[R], None], - func: Callable[AnyParameters, Any], -) -> Callable[AnyParameters, AsyncStreamingContextManager[Awaitable[R]]]: - return cast( - Callable[AnyParameters, StreamingContextManager[R]], - functools.partial(func, _sdk_internal={"response_mode": "STREAMING"}), # type: ignore - ) - - -ResponseMode = Literal["DECODED", "ITERATOR", "RAW", "STREAMING", "TABLE"] - - -# The SdkInternal dictionary is a flexible way to pass additional information to the API client -# when calling a method. Currently the only use case is setting the response mode but it can easily -# be extended without having to add additional parameters to the method signature. -SdkInternal = TypedDict("SdkInternal", {"response_mode": NotRequired[ResponseMode]}) - - -BaseValueType = Union[Any, Type[bytes], Type[pydantic.BaseModel], None] -ValueType = Union[BaseValueType, Annotated[Any, Any]] - - -def _get_annotated_origin(_type: ValueType) -> ValueType: - """Get the underlying type from an Annotated type""" - if get_origin(_type) is Annotated: - args = get_args(_type) - if args: - return _get_annotated_origin(args[0]) - return _type - - -def _get_is_optional(_type: ValueType) -> Tuple[bool, ValueType]: - """Get the underlying type from an Annotated type""" - if get_origin(_type) is Union: - args = get_args(_type) - if len(args) == 2 and type(None) in args: - return True, _get_annotated_origin(args[0] if args[1] is type(None) else args[1]) - return False, _type - - -@functools.lru_cache(maxsize=64) -def _get_type_adapter(_type: ValueType) -> pydantic.TypeAdapter: - """Get a cached TypeAdapter for the given type""" - return pydantic.TypeAdapter(_type) - - -@dataclass(frozen=True) -class RequestInfo: - method: str - resource_path: str - response_type: ValueType - query_params: QueryParameters - path_params: Dict[str, Any] - header_params: Dict[str, Any] - body: Any - request_timeout: Optional[int] - throwable_errors: Dict[str, Type[PalantirRPCException]] - response_mode: Optional[ResponseMode] = None - - def update( - self, - query_params: Optional[Dict[str, Any]] = None, - header_params: Optional[Dict[str, Any]] = None, - response_mode: Optional[ResponseMode] = None, - ): - return RequestInfo( - method=self.method, - resource_path=self.resource_path, - response_type=self.response_type, - query_params={**self.query_params, **(query_params or {})}, - path_params=self.path_params, - header_params={**self.header_params, **(header_params or {})}, - body=self.body, - request_timeout=self.request_timeout, - throwable_errors=self.throwable_errors, - response_mode=response_mode if response_mode is not None else self.response_mode, - ) - - @classmethod - def with_defaults( - cls, - method: str, - resource_path: str, - response_type: ValueType = None, - query_params: QueryParameters = {}, - path_params: Dict[str, Any] = {}, - header_params: Dict[str, Any] = {}, - body: Any = None, - request_timeout: Optional[int] = None, - throwable_errors: Dict[str, Type[PalantirRPCException]] = {}, - response_mode: Optional[ResponseMode] = None, - ): - return cls( - method=method, - resource_path=resource_path, - response_type=response_type, - query_params=query_params, - path_params=path_params, - header_params=header_params, - body=body, - request_timeout=request_timeout, - throwable_errors=throwable_errors, - response_mode=response_mode, - ) - - -T = TypeVar("T") - - -class BaseApiResponse(Generic[T]): - def __init__(self, request_info: RequestInfo, response: httpx.Response): - self._response = response - self._request_info = request_info - - @property - def status_code(self) -> int: - return self._response.status_code - - @property - def text(self) -> str: - return self._response.text - - def json(self): - content_type = self._response.headers.get("content-type") - if content_type is not None: - match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) - else: - match = None - - encoding = match.group(1) if match else "utf-8" - response_text = self._response.content.decode(encoding) - return json.loads(response_text) - - def decode(self) -> T: - _type = self._request_info.response_type - is_optional, _type = _get_is_optional(_type) - origin_type = _get_annotated_origin(_type) - - if _type is None: - return cast(T, None) - - if is_optional and self._response.content == b"": - return cast(T, None) - - if origin_type is bytes: - return cast(T, self._response.content) - - data = self.json() - - if origin_type is Any: - return data - - # Check if the type is a BaseModel class - if isclass(origin_type) and issubclass(origin_type, pydantic.BaseModel): - return cast(T, origin_type.model_validate(data)) - - adapter = _get_type_adapter(_type) - return cast(T, adapter.validate_python(data)) - - -class ApiResponse(Generic[T], BaseApiResponse[T]): - def close(self): - """Close the response and release the connection. Automatically called if the response - body is read to completion. - """ - self._response.close() - - -class AsyncApiResponse(Generic[T], BaseApiResponse[T]): - async def aclose(self): - """Close the response and release the connection. Automatically called if the response - body is read to completion. - """ - await self._response.aclose() - - -class StreamedApiResponse(Generic[T], ApiResponse[T]): - def __init__(self, request_info: RequestInfo, response: httpx.Response): - super().__init__(request_info, response) - - def iter_bytes(self, chunk_size: Optional[int] = None) -> Iterator[bytes]: - """ - :param chunk_size: The number of bytes that should be read into memory for each chunk. If set to None, the data will become available as it arrives in whatever size is sent from the host. - :type chunk_size: Optional[int] - """ - try: - for raw_bytes in self._response.iter_bytes(chunk_size=chunk_size): - yield raw_bytes - except httpx.StreamConsumed as e: - raise StreamConsumedError(str(e)) from e - - -class AsyncStreamedApiResponse(Generic[T], AsyncApiResponse[T]): - def __init__(self, request_info: RequestInfo, response: httpx.Response): - super().__init__(request_info, response) - - async def aiter_bytes(self, chunk_size: Optional[int] = None) -> AsyncIterator[bytes]: - """ - :param chunk_size: The number of bytes that should be read into memory for each chunk. If set to None, the data will become available as it arrives in whatever size is sent from the host. - :type chunk_size: Optional[int] - """ - try: - async for raw_bytes in self._response.aiter_bytes(chunk_size=chunk_size): - yield raw_bytes - except httpx.StreamConsumed as e: - raise StreamConsumedError(str(e)) from e - - -class StreamingContextManager(Generic[T]): - def __init__(self, request_info: RequestInfo, response: ApiResponse): - self._request_info = request_info - self._response = response - - def __enter__(self) -> StreamedApiResponse[T]: - return StreamedApiResponse[T](self._request_info, self._response._response) - - def __exit__( - self, - exc_type: Optional[Type[BaseException]], - exc_value: Optional[BaseException], - traceback: Optional[Any], - ) -> None: - self._response.close() - - -class AsyncStreamingContextManager(Generic[T]): - def __init__(self, request_info: RequestInfo, response: Awaitable[AsyncApiResponse]): - self._request_info = request_info - self._awaitable_response = response - self._response: Optional[AsyncApiResponse] = None - - async def __aenter__(self) -> AsyncStreamedApiResponse[T]: - self._response = await self._awaitable_response - return AsyncStreamedApiResponse[T](self._request_info, self._response._response) - - async def __aexit__( - self, - exc_type: Optional[Type[BaseException]], - exc_value: Optional[BaseException], - traceback: Optional[Any], - ) -> None: - if self._response is not None: - await self._response.aclose() - - -class BaseApiClient: - """ - The API client. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: Auth, - hostname: str, - config: Optional[Config] = None, - ): - if isinstance(auth, str): - # This is a common error so we have a special error message - # for these situations - raise TypeError( - "auth must be an instance of UserTokenAuth, ConfidentialClientAuth or " - "PublicClientAuth, not a string. You likely want to use " - "UserTokenAuth(token=)." - ) - elif not isinstance(auth, Auth): - raise TypeError( - "auth must be an instance of UserTokenAuth, ConfidentialClientAuth or " - "PublicClientAuth, not an instance of {type(auth)}." - ) - - assert_non_empty_string(hostname, "hostname") - - if config is not None and not isinstance(config, Config): - raise TypeError(f"config must be an instance of Config, not {type(config)}.") - - self._auth = auth - self._auth._parameterize(hostname, config) - - def _get_timeout(self, request_info: RequestInfo): - return ( - httpx.USE_CLIENT_DEFAULT - if request_info.request_timeout is None - else request_info.request_timeout - ) - - def _process_query_parameters(self, query_params: QueryParameters): - result: List[Tuple[str, Any]] = [] - - for key, value in query_params.items(): - if value is None: - continue - - if not isinstance(value, list): - result.append((key, value)) - continue - - # Explode list query parameters - for inner_value in value: - result.append((key, inner_value)) - - return result - - def _create_url(self, request_info: RequestInfo) -> str: - resource_path = request_info.resource_path - path_params = request_info.path_params - - for k, v in path_params.items(): - # the "safe" option defaults to "/" - # this does not work with the backend which expects "/" characters to be encoded - resource_path = resource_path.replace(f"{{{k}}}", quote(v, safe="")) - - return f"/api{resource_path}" - - def _create_headers(self, request_info: RequestInfo, token: Token) -> Dict[str, Any]: - return { - "Authorization": "Bearer " + token.access_token, - # Passing in None leads to this - # Header value must be str or bytes, not - **{ - key: ( - value.astimezone(timezone.utc).isoformat() - if isinstance(value, datetime) - else value if isinstance(value, (bytes, str)) else json.dumps(value) - ) - for key, value in request_info.header_params.items() - if value is not None - }, - } - - def _handle_error(self, req: RequestInfo, res: httpx.Response): - """Call this method if there is an error in the response. At this point, the response - should have already been fully received. - """ - if res.status_code == 404 and not res.text: - raise ApiNotFoundError( - f'The request to "{req.resource_path}" returned a 404 status code ' - "with no response body. This likely indicates that the API is not yet " - "available on your Foundry instance." - ) - - if res.status_code == 429: - raise RateLimitError(res.text) - elif res.status_code == 503: - raise ServiceUnavailable(res.text) - - try: - error_json = res.json() - except json.JSONDecodeError: - raise SDKInternalError( - f"Unexpected error response with status code {res.status_code}: {res.text}" - ) - - if error_instance := deserialize_error(error_json, req.throwable_errors): - raise error_instance - elif res.status_code == 400: - raise BadRequestError(error_json) - elif res.status_code == 401: - raise UnauthorizedError(error_json) - elif res.status_code == 403: - raise PermissionDeniedError(error_json) - elif res.status_code == 404: - raise NotFoundError(error_json) - elif res.status_code == 409: - raise ConflictError(error_json) - elif res.status_code == 413: - raise RequestEntityTooLargeError(error_json) - elif res.status_code == 422: - raise UnprocessableEntityError(error_json) - elif 500 <= res.status_code <= 599: - raise InternalServerError(error_json) - else: - raise PalantirRPCException(error_json) - - class _BaseModelJSONEncoder(json.JSONEncoder): - """Custom JSON encoder for handling Pydantic BaseModel objects and collections.""" - - def default(self, o): - if isinstance(o, pydantic.BaseModel): - return o.model_dump(exclude_none=True, by_alias=True) - elif isinstance(o, datetime): - # Convert datetime to ISO 8601 format string with UTC timezone - if o.tzinfo is None: - o = o.replace(tzinfo=timezone.utc) - return o.astimezone(timezone.utc).isoformat() - return super().default(o) - - def _serialize(self, value: Any) -> Optional[bytes]: - """ - Serialize the data passed in to JSON bytes. - - This method properly handles: - - bytes (returned as-is) - - None (returned as None) - - Pydantic BaseModel objects (serialized with exclude_none and by_alias) - - Lists/dictionaries containing BaseModel objects at any nesting level - - datetime objects (serialized to ISO 8601 format strings) - - Any other JSON serializable value - """ - if isinstance(value, bytes): - return value - elif value is None: - return None - else: - # Use custom encoder to handle BaseModel objects at any level of nesting - return json.dumps(value, cls=self._BaseModelJSONEncoder).encode() - - def _get_response_mode(self, request_info: RequestInfo) -> ResponseMode: - return request_info.response_mode if request_info.response_mode is not None else "DECODED" - - -class ApiMiddleware(ABC): - @abstractmethod - def call_api( - self, - request_info: RequestInfo, - next_call: Callable[[RequestInfo], Any], - ) -> Any: ... - - -def apply_middleware( - middleware: List[ApiMiddleware], - next_call: Callable[[RequestInfo], Any], -) -> Callable[[RequestInfo], Any]: - return functools.reduce( - lambda next_fn, mw: lambda req: mw.call_api(req, next_fn), - reversed(middleware), - lambda req: next_call(req), - ) - - -class RetryingMiddleware(ApiMiddleware): - """Middleware that implements automatic retry logic with exponential backoff.""" - - def __init__( - self, - max_retries: Optional[int] = None, - propagate_qos: Optional[ - Literal["AUTOMATIC_RETRY", "PROPAGATE_429_AND_503_TO_CALLER"] - ] = None, - backoff_slot_size_ms: Optional[int] = None, - random: Optional[Random] = None, - ): - self._max_retries = max_retries or 4 - self._propagate_qos = propagate_qos or "AUTOMATIC_RETRY" - self._backoff_slot_size_ms = backoff_slot_size_ms or 250 - self._random = random or SystemRandom() - - def call_api( - self, - request_info: RequestInfo, - next_call: Callable[[RequestInfo], Any], - ) -> Any: - @retry( - stop_max_attempt_number=self._max_retries, - retry_on_exception=self._is_retryable, - wait_func=self._get_backoff_ms, - ) - def call_api_retrying() -> Any: - return next_call(request_info) - - return call_api_retrying() - - def _is_retryable(self, exception: Exception) -> bool: - """ - Determine if an exception should trigger a retry. - - Retry behavior matches dialogue client: - https://github.com/palantir/dialogue/blob/ae875833ad3b6e7a1d6786b77a853a114f73ffee/dialogue-core/src/main/java/com/palantir/dialogue/core/RetryingChannel.java#L383 - """ - if self._propagate_qos == "AUTOMATIC_RETRY": - return isinstance(exception, (RateLimitError, ServiceUnavailable)) - return False - - def _get_backoff_ms( - self, previous_attempt_number: int, _delay_since_first_attempt_ms: int - ) -> int: - """ - Calculate backoff delay in milliseconds using exponential backoff with jitter. - - Formula matches dialogue client behavior: - https://github.com/palantir/dialogue/blob/ae875833ad3b6e7a1d6786b77a853a114f73ffee/dialogue-core/src/main/java/com/palantir/dialogue/core/RetryingChannel.java#L380 - """ - return self._backoff_slot_size_ms * round( - (2**previous_attempt_number) * self._random.random() - ) - - -class ApiClient(BaseApiClient): - def __init__( - self, - auth: Auth, - hostname: str, - config: Optional[Config] = None, - ): - super().__init__(auth, hostname, config) - self._session = HttpClient(hostname, config) - self._middleware: List[ApiMiddleware] = [ - RetryingMiddleware( - max_retries=config.max_retries if config else None, - propagate_qos=config.propagate_qos if config else None, - backoff_slot_size_ms=config.backoff_slot_size_ms if config else None, - ), - ] - - def call_api(self, request_info: RequestInfo) -> Any: - """Makes the HTTP request (synchronous)""" - # Wrap the actual call in the middleware chain - return apply_middleware(self._middleware, self._call_api)(request_info) - - def _call_api(self, request_info: RequestInfo) -> Any: - response_mode = self._get_response_mode(request_info) - - if response_mode == "ITERATOR": - # Extract the initial page_token from query_params if provided by the user - initial_page_token = cast(Optional[str], request_info.query_params.get("pageToken")) - - def fetch_page( - page_size: Optional[int], - next_page_token: Optional[str], - ) -> Tuple[Optional[str], List[Any]]: - result = self.call_api( - request_info.update( - # pageSize will already be present in the query params dictionary - query_params={"pageToken": next_page_token}, - # We want the response to be decoded for us - # If we don't do this, it will cause an infinite loop - response_mode="DECODED", - ), - ) - - return result.next_page_token, result.data or [] - - return ResourceIterator(paged_func=fetch_page, page_token=initial_page_token) - - with error_handling(): - - def make_request(token: Token): - request = self._session.build_request( - method=request_info.method, - url=self._create_url(request_info), - params=self._process_query_parameters(request_info.query_params), - content=self._serialize(request_info.body), - headers=self._create_headers(request_info, token), - timeout=self._get_timeout(request_info), - ) - - return self._session.send( - request=request, - stream=response_mode == "STREAMING", - ) - - res = self._auth.execute_with_token(make_request) - - self._check_for_errors(request_info, res) - api_response: ApiResponse[Any] = ApiResponse(request_info, res) - - if response_mode == "STREAMING": - return StreamingContextManager(request_info, api_response) - elif response_mode == "TABLE": - if res.content == b"": - return None - else: - return TableResponse(res.content) - elif response_mode == "RAW": - return api_response - else: - return api_response.decode() - - def _check_for_errors(self, request_info: RequestInfo, res: httpx.Response): - if 200 <= res.status_code <= 299: - return - - # If the user is streaming back the response, we need to make sure we - # wait for the entire response to be streamed back before we can access - # the content. If we don't do this, accessing "text" or calling ".json()" - # will raise an exception. - if request_info.response_mode == "STREAMING": - res.read() - - self._handle_error(request_info, res) - - -class AsyncApiClient(BaseApiClient): - def __init__( - self, - auth: Auth, - hostname: str, - config: Optional[Config] = None, - ): - super().__init__(auth, hostname, config) - self._client = AsyncHttpClient(hostname, config) - self._middleware: List[ApiMiddleware] = [ - RetryingMiddleware( - max_retries=config.max_retries if config else None, - propagate_qos=config.propagate_qos if config else None, - backoff_slot_size_ms=config.backoff_slot_size_ms if config else None, - ), - ] - - def call_api(self, request_info: RequestInfo) -> Any: - """Makes the HTTP request (asynchronous)""" - # Wrap the actual call in the middleware chain - return apply_middleware(self._middleware, self._call_api)(request_info) - - def _call_api(self, request_info: RequestInfo) -> Any: - response_mode = self._get_response_mode(request_info) - - if response_mode == "ITERATOR": - # Extract the initial page_token from query_params if provided by the user - initial_page_token = cast(Optional[str], request_info.query_params.get("pageToken")) - - async def fetch_page( - page_size: Optional[int], - next_page_token: Optional[str], - ) -> Tuple[Optional[str], List[Any]]: - response = await self._async_call_api( - request_info.update( - # pageSize will already be present in the query params dictionary - query_params={"pageToken": next_page_token}, - ), - response_mode="RAW", - ) - result = response.decode() - return result.next_page_token, result.data or [] - - return AsyncResourceIterator(paged_func=fetch_page, page_token=initial_page_token) - - if response_mode == "STREAMING": - return AsyncStreamingContextManager( - request_info, self._async_call_api(request_info, response_mode="STREAMING") - ) - else: - return self._async_call_api(request_info, response_mode) - - async def _async_call_api(self, request_info: RequestInfo, response_mode: ResponseMode) -> Any: - with error_handling(): - - async def make_request(token: Token): - request = self._client.build_request( - method=request_info.method, - url=self._create_url(request_info), - params=self._process_query_parameters(request_info.query_params), - content=self._serialize(request_info.body), - headers=self._create_headers(request_info, token), - timeout=self._get_timeout(request_info), - ) - - return await self._client.send(request=request, stream=response_mode == "STREAMING") - - res = await self._auth.execute_with_token(make_request) - - await self._check_for_errors(request_info, res) - api_response: AsyncApiResponse[Any] = AsyncApiResponse(request_info, res) - - if response_mode == "RAW" or response_mode == "STREAMING": - return api_response - elif response_mode == "TABLE": - if res.content == b"": - return None - else: - return TableResponse(res.content) - else: - return api_response.decode() - - async def _check_for_errors(self, request_info: RequestInfo, res: httpx.Response): - if 200 <= res.status_code <= 299: - return - - # If the user is streaming back the response, we need to make sure we - # wait for the entire response to be streamed back before we can access - # the content. If we don't do this, accessing "text" or calling ".json()" - # will raise an exception. - if request_info.response_mode == "STREAMING": - await res.aread() - - self._handle_error(request_info, res) diff --git a/foundry_sdk/_core/auth_utils.py b/foundry_sdk/_core/auth_utils.py deleted file mode 100644 index 6d2ee2489..000000000 --- a/foundry_sdk/_core/auth_utils.py +++ /dev/null @@ -1,52 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -from abc import ABC -from abc import abstractmethod -from typing import Callable -from typing import Optional -from typing import TypeVar - -import httpx - -from foundry_sdk._core.config import Config - - -class Token(ABC): - - @property - @abstractmethod - def access_token(self) -> str: - pass - - -T = TypeVar("T") - - -class Auth(ABC): - @abstractmethod - def get_token(self) -> "Token": - pass - - def _parameterize(self, hostname: str, config: Optional[Config]) -> None: - pass - - @abstractmethod - def execute_with_token(self, func: Callable[["Token"], T]) -> T: - pass - - @abstractmethod - def run_with_token(self, func: Callable[["Token"], T]) -> None: - pass diff --git a/foundry_sdk/_core/client_init_helpers.py b/foundry_sdk/_core/client_init_helpers.py deleted file mode 100644 index b74e495fd..000000000 --- a/foundry_sdk/_core/client_init_helpers.py +++ /dev/null @@ -1,54 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -from contextvars import ContextVar -from typing import Optional - -from foundry_sdk._core.auth_utils import Auth -from foundry_sdk._core.context_and_environment_vars import HOSTNAME_CONTEXT_VARS -from foundry_sdk._core.context_and_environment_vars import HOSTNAME_ENV_VARS -from foundry_sdk._core.context_and_environment_vars import TOKEN_CONTEXT_VARS -from foundry_sdk._core.context_and_environment_vars import TOKEN_ENV_VARS -from foundry_sdk._core.context_and_environment_vars import ( - maybe_get_value_from_context_or_environment_vars, -) # NOQA -from foundry_sdk._core.user_token_auth_client import UserTokenAuth -from foundry_sdk._errors.environment_not_configured import EnvironmentNotConfigured - - -def get_hostname_from_context_or_environment_vars() -> str: - hostname = maybe_get_value_from_context_or_environment_vars( - context_vars=HOSTNAME_CONTEXT_VARS, - env_vars=HOSTNAME_ENV_VARS, - ) - if hostname is None: - raise EnvironmentNotConfigured( - "Unable to configure client hostname. Please pass in `hostname` to FoundryClient, " - "or set the context variable in foundry_sdk." - ) - return hostname - - -def get_user_token_auth_from_context_or_environment_vars() -> Auth: - token = maybe_get_value_from_context_or_environment_vars( - context_vars=TOKEN_CONTEXT_VARS, - env_vars=TOKEN_ENV_VARS, - ) - if token is None: - raise EnvironmentNotConfigured( - "Unable to configure client auth. Please pass in `auth` to FoundryClient, " - "or set the context variable in foundry_sdk." - ) - return UserTokenAuth(token=token) diff --git a/foundry_sdk/_core/compute_module_pipeline_auth.py b/foundry_sdk/_core/compute_module_pipeline_auth.py deleted file mode 100644 index c1626bc69..000000000 --- a/foundry_sdk/_core/compute_module_pipeline_auth.py +++ /dev/null @@ -1,76 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import os -from typing import Callable -from typing import TypeVar -from typing import Union - -import httpx - -from foundry_sdk._core.user_token_auth_client import Auth -from foundry_sdk._core.user_token_auth_client import Token -from foundry_sdk._errors.environment_not_configured import EnvironmentNotConfigured -from foundry_sdk._errors.not_authenticated import NotAuthenticated - -T = TypeVar("T") - - -class _PipelineToken(Token): - - def __init__(self, token: str) -> None: - self._token = token - - @property - def access_token(self) -> str: - return self._token - - -TOKEN_PATH_ENV_VAR = "BUILD2_TOKEN" - - -class ComputeModulePipelineAuth(Auth): - """Use the token provided by Foundry when running in a Compute Module in Pipeline execution mode.""" - - _token: Union[Token, None] - - def __init__(self) -> None: - self._token = None - super().__init__() - - def get_token(self) -> Token: - if self._token is not None: - return self._token - - build2_token_path = os.environ.get(TOKEN_PATH_ENV_VAR) - if build2_token_path is None: - raise EnvironmentNotConfigured( - f"Missing environment variable {TOKEN_PATH_ENV_VAR}. Please ensure this code is running inside a Compute Module in Pipeline execution mode." - ) - - if not os.path.isfile(build2_token_path): - raise EnvironmentNotConfigured( - f"{TOKEN_PATH_ENV_VAR} environment variable points to a non-existent file: '{build2_token_path}'" - ) - - with open(build2_token_path, "r") as f: - self._token = _PipelineToken(f.read().strip()) - return self._token - - def execute_with_token(self, func: Callable[[Token], T]) -> T: - return func(self.get_token()) - - def run_with_token(self, func: Callable[[Token], T]) -> None: - func(self.get_token()) diff --git a/foundry_sdk/_core/confidential_client_auth.py b/foundry_sdk/_core/confidential_client_auth.py deleted file mode 100644 index b14430ac3..000000000 --- a/foundry_sdk/_core/confidential_client_auth.py +++ /dev/null @@ -1,96 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import time -from typing import List -from typing import Optional - -from foundry_sdk._core.config import Config -from foundry_sdk._core.oauth_utils import ConfidentialClientOAuthFlowProvider -from foundry_sdk._core.oauth_utils import OAuth -from foundry_sdk._core.oauth_utils import OAuthToken -from foundry_sdk._core.oauth_utils import SignInResponse -from foundry_sdk._core.oauth_utils import SignOutResponse -from foundry_sdk._core.utils import assert_non_empty_string - - -class ConfidentialClientAuth(OAuth): - """ - Client for Confidential Client OAuth-authenticated Ontology applications. - Runs a background thread to periodically refresh access token. - - :param client_id: OAuth client id to be used by the application. - :param client_secret: OAuth client secret to be used by the application. - :param scopes: The list of scopes to request. By default, no specific scope is provided and a token will be returned with all scopes. - :param hostname: Hostname for authentication. This is only required if using ConfidentialClientAuth independently of the FoundryClient. - :param config: The HTTP config for authentication. This is only required if using ConfidentialClientAuth independently of the FoundryClient. - """ - - def __init__( - self, - client_id: str, - client_secret: str, - hostname: Optional[str] = None, - scopes: Optional[List[str]] = None, - should_refresh: bool = True, - *, - config: Optional[Config] = None, - ) -> None: - assert_non_empty_string(client_id, "client_id") - assert_non_empty_string(client_secret, "client_secret") - - if hostname is not None: - assert_non_empty_string(hostname, "hostname") - - if scopes is not None: - if not isinstance(scopes, list): - raise TypeError(f"The scopes must be a list, not {type(scopes)}.") - - self._client_id = client_id - self._client_secret = client_secret - self._server_oauth_flow_provider = ConfidentialClientOAuthFlowProvider( - client_id, - client_secret, - scopes=scopes, - ) - super().__init__(hostname=hostname, should_refresh=should_refresh, config=config) - - @property - def scopes(self) -> List[str]: - return self._server_oauth_flow_provider.scopes or [] - - def get_token(self) -> OAuthToken: - if self._token is None: - self._token = self._server_oauth_flow_provider.get_token(self._get_client()) - - if self._should_refresh: - self._start_auto_refresh() - - return self._token - - def _revoke_token(self) -> None: - if self._token: - self._server_oauth_flow_provider.revoke_token( - self._get_client(), - self._token.access_token, - ) - - @property - def url(self) -> str: - return self._get_client().base_url.host - - def _try_refresh_token(self) -> bool: - self._token = self._server_oauth_flow_provider.get_token(self._get_client()) - return True diff --git a/foundry_sdk/_core/config.py b/foundry_sdk/_core/config.py deleted file mode 100644 index 2c014fe68..000000000 --- a/foundry_sdk/_core/config.py +++ /dev/null @@ -1,66 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -from dataclasses import dataclass -from typing import Any -from typing import Dict -from typing import Literal -from typing import Optional -from typing import Union - - -@dataclass -class Config: - """ - Configuration for the HTTP session. - """ - - default_headers: Optional[Dict[str, str]] = None - """HTTP headers to include with all requests.""" - - proxies: Optional[Dict[Literal["http", "https"], str]] = None - """Proxies to use for HTTP and HTTPS requests.""" - - timeout: Optional[Union[int, float]] = None - """The default timeout for all requests in seconds.""" - - verify: Union[bool, str] = True - """ - SSL verification, can be a boolean or a path to a CA bundle. When using an HTTPS proxy, - connection this value will be passed to the proxy's SSL context as well. - """ - - default_params: Optional[Dict[str, Any]] = None - """URL query parameters to include with all requests.""" - - scheme: Literal["http", "https"] = "https" - """URL scheme to use ('http' or 'https'). Defaults to 'https'.""" - - max_retries: Optional[int] = None - """ - The maximum number of times a failed request is retried. - If no value is provided, it defaults to 4. - """ - - propagate_qos: Optional[Literal["AUTOMATIC_RETRY", "PROPAGATE_429_AND_503_TO_CALLER"]] = None - """Indicates whether 429 and 503 status codes should be propagated as exceptions or retried.""" - - backoff_slot_size_ms: Optional[int] = None - """ - The size of one backoff time slot in milliseconds for call retries. For example, - an exponential backoff retry algorithm may choose a backoff time in [0, backoffSlotSize * 2^c] - for the c-th retry. - If no value is provided, it defaults to 250 milliseconds. - """ diff --git a/foundry_sdk/_core/context_and_environment_vars.py b/foundry_sdk/_core/context_and_environment_vars.py deleted file mode 100644 index d59be45c0..000000000 --- a/foundry_sdk/_core/context_and_environment_vars.py +++ /dev/null @@ -1,65 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -""" -Provides context and environment variables for the authentication user token and hostname. -They are used as an option to initialize the FoundryClient. -""" - -import os -from contextvars import ContextVar -from typing import Optional -from typing import TypeVar - -# Token and hostname variables -TOKEN_VAR: ContextVar[Optional[str]] = ContextVar("FOUNDRY_TOKEN", default=None) -HOSTNAME_VAR: ContextVar[Optional[str]] = ContextVar("FOUNDRY_HOSTNAME", default=None) -TOKEN_CONTEXT_VARS: list[ContextVar[Optional[str]]] = [TOKEN_VAR] -HOSTNAME_CONTEXT_VARS: list[ContextVar[Optional[str]]] = [HOSTNAME_VAR] - -TOKEN_ENV_VAR: str = "FOUNDRY_TOKEN" -HOSTNAME_ENV_VAR: str = "FOUNDRY_HOSTNAME" -TOKEN_ENV_VARS: list[str] = [TOKEN_ENV_VAR] -HOSTNAME_ENV_VARS: list[str] = [HOSTNAME_ENV_VAR] - -# Attribution variables -ATTRIBUTION_VAR: ContextVar[Optional[list[str]]] = ContextVar("ATTRIBUTION_RESOURCES", default=None) -ATTRIBUTION_CONTEXT_VARS: list[ContextVar[Optional[list[str]]]] = [ATTRIBUTION_VAR] - -T = TypeVar("T") - - -def _maybe_get_environment_var(env_vars: list[str]) -> Optional[str]: - for env_var in env_vars: - value = os.environ.get(env_var) - if value is not None: - return value - return None - - -def maybe_get_context_var( - context_vars: list[ContextVar[Optional[T]]], -) -> Optional[T]: - for context_var in context_vars: - value = context_var.get() - if value is not None: - return value - return None - - -def maybe_get_value_from_context_or_environment_vars( - context_vars: list[ContextVar[Optional[str]]], env_vars: list[str] -) -> Optional[str]: - return maybe_get_context_var(context_vars) or _maybe_get_environment_var(env_vars) diff --git a/foundry_sdk/_core/http_client.py b/foundry_sdk/_core/http_client.py deleted file mode 100644 index f8034420f..000000000 --- a/foundry_sdk/_core/http_client.py +++ /dev/null @@ -1,180 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import functools -import os -import ssl -import sys -from typing import Optional -from typing import Tuple -from typing import Union - -import httpcore -import httpx - -from foundry_sdk._core.config import Config -from foundry_sdk._core.context_and_environment_vars import ATTRIBUTION_CONTEXT_VARS -from foundry_sdk._core.context_and_environment_vars import maybe_get_context_var -from foundry_sdk._core.utils import AnyCallableT -from foundry_sdk._core.utils import remove_prefixes -from foundry_sdk._versions import __version__ - - -def type_safe_cache(func: AnyCallableT) -> AnyCallableT: - """A type safe version of @functools.cache""" - return functools.cache(func) # type: ignore - - -def _prepare_transport_data(verify: Union[bool, str], proxy_url: Optional[str]): - # If verify is a string, we need to create an SSL context ourself - # since httpx has deprecated strings as inputs - # This logic to check whether the path is a file or directory is - # the same logic as both httpx (before they deprecated string paths) and requests - # Otherwise, we let httpx create the SSL context for us from a True/False value - if isinstance(verify, str): - if os.path.isdir(verify): - ssl_context = ssl.create_default_context(capath=verify) - else: - ssl_context = ssl.create_default_context(cafile=verify) - else: - ssl_context = httpx.create_ssl_context(verify=verify) - - proxy: Optional[httpx.Proxy] = None - if proxy_url is not None: - if not proxy_url.startswith(("http://", "https://")): - raise ValueError(f"Proxy URL must start with http:// or https://: {proxy_url}") - - # We shold only pass the SSL context to the proxy iff the proxy is HTTPS - # Otherwise, httpx will throw an error - if proxy_url.startswith("https://"): - proxy = httpx.Proxy(url=proxy_url, ssl_context=ssl_context) - else: - proxy = httpx.Proxy(url=proxy_url) - - return ssl_context, proxy - - -@type_safe_cache -def _get_transport(verify: Union[bool, str], proxy_url: Optional[str]) -> httpx.BaseTransport: - ssl_context, proxy = _prepare_transport_data(verify, proxy_url) - return httpx.HTTPTransport(verify=ssl_context, proxy=proxy) - - -@type_safe_cache -def _get_async_transport( - verify: Union[bool, str], proxy_url: Optional[str] -) -> httpx.AsyncBaseTransport: - ssl_context, proxy = _prepare_transport_data(verify, proxy_url) - transport = httpx.AsyncHTTPTransport(verify=ssl_context, proxy=proxy) - - # In httpx 0.25.0 and 0.26.0 the proxy SSL context was not set correctly - # This was fixed in 0.27.0, but we need to set it manually for older versions - # See https://github.com/encode/httpx/pull/3175 - if ( - isinstance(transport._pool, httpcore.AsyncHTTPProxy) - and proxy is not None - and transport._pool._proxy_ssl_context is None - ): - transport._pool._proxy_ssl_context = proxy.ssl_context - - return transport - - -def _prepare_client_data( - hostname: str, - config: Optional[Config], -) -> Tuple[Config, str, Union[bool, str], dict]: - """Prepare common data for HttpClient and AsyncHttpClient.""" - config = config or Config() - hostname = remove_prefixes(hostname.strip("/"), ["https://", "http://"]) - verify = config.verify - - # If verity is set to True, then merge with env vars - # This is the same behavior as requests (although - # requests does not check for SSL_CERT_FILE) - if verify is True: - verify = ( - # For historical reasons, we continue to support REQUESTS_CA_BUNDLE - os.environ.get("REQUESTS_CA_BUNDLE") - or os.environ.get("SSL_CERT_FILE") - or True - ) - - attribution = maybe_get_context_var( - context_vars=ATTRIBUTION_CONTEXT_VARS, - ) - # When sending multiple values in a header, should be sent as a comma separated list per - # https://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2 - attribution_header = ", ".join(attribution) if attribution is not None else None - - headers = { - "User-Agent": f"python-foundry-platform-sdk/{__version__} python/{sys.version_info.major}.{sys.version_info.minor}", - **(config.default_headers or {}), - } - - if attribution_header is not None: - headers["attribution"] = attribution_header - - return config, hostname, verify, headers - - -class HttpClient(httpx.Client): - def __init__(self, hostname: str, config: Optional[Config] = None): - config, hostname, verify, headers = _prepare_client_data(hostname, config) - - # Expose this for testing, otherwise it is hard to access - self._verify = verify - - super().__init__( - headers=headers, - params=config.default_params, - transport=_get_transport(verify=verify, proxy_url=None), - mounts={ - scheme + "://": _get_transport(verify=verify, proxy_url=proxy_url) - for scheme, proxy_url in (config.proxies or {}).items() - }, - # Unlike requests, HTTPX does not follow redirects by default - # If you access an endpoint with a missing trailing slash, the server could redirect - # the user to the URL with the trailing slash. For example, accessing `/example` might - # redirect to `/example/`. - follow_redirects=True, - base_url=f"{config.scheme}://{hostname}", - timeout=config.timeout, - ) - - -class AsyncHttpClient(httpx.AsyncClient): - def __init__(self, hostname: str, config: Optional[Config] = None): - config, hostname, verify, headers = _prepare_client_data(hostname, config) - - # Expose this for testing, otherwise it is hard to access - self._verify = verify - - super().__init__( - headers=headers, - params=config.default_params, - transport=_get_async_transport(verify=verify, proxy_url=None), - mounts={ - scheme + "://": _get_async_transport(verify=verify, proxy_url=proxy_url) - for scheme, proxy_url in (config.proxies or {}).items() - }, - # Unlike requests, HTTPX does not follow redirects by default - # If you access an endpoint with a missing trailing slash, the server could redirect - # the user to the URL with the trailing slash. For example, accessing `/example` might - # redirect to `/example/`. - follow_redirects=True, - base_url=f"{config.scheme}://{hostname}", - timeout=config.timeout, - ) diff --git a/foundry_sdk/_core/model_base.py b/foundry_sdk/_core/model_base.py deleted file mode 100644 index 2b87077a9..000000000 --- a/foundry_sdk/_core/model_base.py +++ /dev/null @@ -1,98 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import json -import warnings -from typing import Any -from typing import Dict -from typing import Hashable -from typing import Optional -from typing import cast - -import pydantic - - -class ModelBase(pydantic.BaseModel): - """ - Base class for all model objects in the SDK. - - This base model supports being used as a dictionary key while preserving mutability. - It tracks if it has been used as a hash key and warns if mutation occurs after hashing. - """ - - model_config = {"extra": "allow", "populate_by_name": True} - - def __init__(self, **data): - super().__init__(**data) - self._hash_called = False - self._hash_value: Optional[int] = None - - def __hash__(self) -> int: - """ - Generate a hash based on class identity and attribute values. - """ - if self._hash_value is None: - self._hash_called = True - - def make_hashable(value: Any) -> Hashable: - if isinstance(value, dict): - return tuple((k, make_hashable(v)) for k, v in sorted(value.items())) - elif isinstance(value, (list, set)): - return tuple(make_hashable(v) for v in value) - else: - return value - - # Include class type in the hash - class_identifier = self.__class__.__name__ - - # Create hashable representations of all fields - hash_fields = tuple( - (field, make_hashable(getattr(self, field))) for field in self.model_fields - ) - - # Hash combination of class identifier and field values - self._hash_value = hash((class_identifier, hash_fields)) - - return self._hash_value - - def __setattr__(self, name: str, value: Any) -> None: - """ - Track attribute mutations and warn if the model has been hashed. - - Once a model has been used as a dictionary key, modifying it could cause - unexpected behavior, as the dictionary location is determined by the hash - value at insertion time. - """ - # Check if we're setting special attributes used by this class - if name in ("_hash_called", "_hash_value"): - super().__setattr__(name, value) - return - - # If hash has been called, warn about the mutation and reset the hash - if self._hash_called: - warnings.warn( - f"Modifying {self.__class__.__name__} after it has been used as a dictionary key " - "may lead to unexpected behavior.", - UserWarning, - stacklevel=2, - ) - # Reset the hash value since the object has changed - self._hash_value = None - - super().__setattr__(name, value) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using the field aliases.""" - return cast(Dict[str, Any], self.model_dump(by_alias=True, exclude_none=True)) diff --git a/foundry_sdk/_core/oauth_utils.py b/foundry_sdk/_core/oauth_utils.py deleted file mode 100644 index f6e293bdd..000000000 --- a/foundry_sdk/_core/oauth_utils.py +++ /dev/null @@ -1,408 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import base64 -import hashlib -import secrets -import string -import threading -import time -import warnings -from abc import ABC -from abc import abstractmethod -from typing import Any -from typing import Callable -from typing import Dict -from typing import List -from typing import Optional -from typing import TypeVar -from urllib.parse import urlencode - -import httpx -import pydantic - -from foundry_sdk._core.auth_utils import Auth -from foundry_sdk._core.auth_utils import Token -from foundry_sdk._core.config import Config -from foundry_sdk._core.http_client import HttpClient - - -class OAuthUtils: - base_context_path = "/multipass" - authorize_request_path = "/api/oauth2/authorize" - token_request_path = "/api/oauth2/token" - revoke_request_path = "/api/oauth2/revoke_token" - - @staticmethod - def get_token_uri(context_path: Optional[str] = None) -> str: - return OAuthUtils.create_uri(context_path, OAuthUtils.token_request_path) - - @staticmethod - def get_authorize_uri(context_path: Optional[str] = None) -> str: - return OAuthUtils.create_uri(context_path, OAuthUtils.authorize_request_path) - - @staticmethod - def get_revoke_uri(context_path: Optional[str] = None) -> str: - return OAuthUtils.create_uri(context_path, OAuthUtils.revoke_request_path) - - @staticmethod - def create_uri(context_path: Optional[str], request_path: str) -> str: - return (context_path or OAuthUtils.base_context_path) + request_path - - -class SignInResponse(pydantic.BaseModel): - session: Dict[str, Any] - - -class SignOutResponse(pydantic.BaseModel): - pass - - -class OAuthTokenResponse(pydantic.BaseModel): - access_token: str - token_type: str - expires_in: int - refresh_token: Optional[str] = None - - def __init__(self, token_response: Dict[str, Any]) -> None: - super().__init__(**token_response) - - -class OAuthToken(Token): - def __init__(self, token: OAuthTokenResponse): - self._token = token - - @property - def access_token(self) -> str: - return self._token.access_token - - @property - def refresh_token(self) -> Optional[str]: - return self._token.refresh_token - - @property - def expires_in(self) -> int: - return self._token.expires_in - - @property - def token_type(self) -> str: - return self._token.token_type - - def _calculate_expiration(self) -> int: - return int(self._token.expires_in * 1000 + self.current_time()) - - @property - def expires_at(self) -> int: - return self._calculate_expiration() - - @staticmethod - def current_time() -> int: - return int(time.time() * 1000) - - -class AuthorizeRequest(pydantic.BaseModel): - url: str - state: str - code_verifier: str - - -T = TypeVar("T") - - -class OAuth(Auth, ABC): - def __init__( - self, - hostname: Optional[str] = None, - should_refresh: bool = True, - *, - config: Optional[Config] = None, - ) -> None: - self._config = config - self._hostname = hostname - self._client: Optional[HttpClient] = None - self._should_refresh = should_refresh - self._stop_refresh_event = threading.Event() - self._token: Optional[OAuthToken] = None - - def sign_out(self) -> SignOutResponse: - self._revoke_token() - self._token = None - # Signal the auto-refresh thread to stop - self._stop_refresh_event.set() - return SignOutResponse() - - def execute_with_token(self, func: Callable[[OAuthToken], T]) -> T: - try: - if self._should_refresh: - return self._run_with_attempted_refresh(func) - else: - return func(self.get_token()) - except httpx.HTTPStatusError as e: - if e.response.status_code == 401: - self.sign_out() - raise e - except Exception as e: - raise e - - def run_with_token(self, func: Callable[[OAuthToken], T]) -> None: - self.execute_with_token(func) - - @abstractmethod - def get_token(self) -> OAuthToken: - pass - - @abstractmethod - def _revoke_token(self) -> None: - pass - - @abstractmethod - def _try_refresh_token(self) -> bool: - pass - - def _start_auto_refresh(self) -> None: - def _auto_refresh_token() -> None: - while True: - timeout = self._token.expires_in - 60 if self._token else 10 - if self._stop_refresh_event.wait(timeout): - return - if self._token: - self._try_refresh_token() - - refresh_thread = threading.Thread(target=_auto_refresh_token, daemon=True) - refresh_thread.start() - - def _run_with_attempted_refresh(self, func: Callable[[OAuthToken], T]) -> T: - """ - Attempt to run func, and if it fails with a 401, refresh the token and try again. - If it fails with a 401 again, raise the exception. - """ - try: - return func(self.get_token()) - except httpx.HTTPStatusError as e: - if e.response.status_code == 401: - if not self._try_refresh_token(): - warnings.warn("OAuth token refresh failed", UserWarning, stacklevel=2) - raise e - return func(self.get_token()) - else: - raise e - - def _parameterize(self, hostname: str, config: Optional[Config]) -> None: - if self._client is not None: - return - - if self._config is None: - self._config = config - else: - if self._config == config: - warnings.warn( - f"When a {self.__class__.__name__} instance is given to a FoundryClient, if a config " - "is not set it will be provided by the FoundryClient. You are using the same config " - "here and in the FoundryClient. Please remove the config parameter from the " - f"{self.__class__.__name__} initialization.", - UserWarning, - stacklevel=2, - ) - - if self._hostname is None: - self._hostname = hostname - else: - if self._hostname == hostname: - warnings.warn( - f"When a {self.__class__.__name__} instance is given to a FoundryClient, if a hostname " - "is not set it will be provided by the FoundryClient. You are using the same hostname " - "here and in the FoundryClient. Please remove the hostname parameter from the " - f"{self.__class__.__name__} initialization.", - UserWarning, - stacklevel=2, - ) - - # Set here so that the next call to _parameterize() doesn't re-create another HttpClient - # This method may be called many times dependening on how many different ApiClients - # are created with the same Auth object - self._client = HttpClient(hostname, config) - - def _get_client(self) -> HttpClient: - if self._client is None: - if self._hostname is None: - raise ValueError( - f"The hostname must be provided to {self.__class__.__name__} when fetching a token." - ) - - self._client = HttpClient(hostname=self._hostname, config=self._config) - - return self._client - - -class ConfidentialClientOAuthFlowProvider: - def __init__( - self, - client_id: str, - client_secret: str, - multipass_context_path: Optional[str] = None, - scopes: Optional[List[str]] = None, - ): - self._client_id = client_id - self._client_secret = client_secret - self.multipass_context_path = multipass_context_path - self.scopes = scopes - - @property - def client_id(self) -> str: - return self._client_id - - @property - def client_secret(self) -> str: - return self._client_secret - - def get_token(self, client: HttpClient) -> OAuthToken: - params = { - "client_id": self._client_id, - "client_secret": self._client_secret, - "grant_type": "client_credentials", - } - scopes = self.get_scopes() - if len(scopes) > 0: - params["scope"] = " ".join(scopes) - - token_url = OAuthUtils.get_token_uri(self.multipass_context_path) - response = client.post(token_url, data=params) - response.raise_for_status() - return OAuthToken(token=OAuthTokenResponse(token_response=response.json())) - - def revoke_token(self, client: HttpClient, access_token: str) -> None: - body = { - "client_id": self._client_id, - "client_secret": self._client_secret, - "token": access_token, - } - - token_url = OAuthUtils.get_revoke_uri(self.multipass_context_path) - revoke_token_response = client.post(token_url, data=body) - revoke_token_response.raise_for_status() - - def get_scopes(self) -> List[str]: - if not self.scopes: - return [] - return [*self.scopes, "offline_access"] - - -def generate_random_string(min_length: int = 43, max_length: int = 128) -> str: - characters = string.ascii_letters + string.digits + "-._~" - length = secrets.randbelow(max_length - min_length + 1) + min_length - return "".join(secrets.choice(characters) for _ in range(length)) - - -def generate_code_challenge(input_string: str) -> str: - # Calculate the SHA256 hash - sha256_hash = hashlib.sha256(input_string.encode("utf-8")).digest() - - # Base64-URL encode the hash and remove padding - base64url_encoded = base64.urlsafe_b64encode(sha256_hash).rstrip(b"=") - - return base64url_encoded.decode("utf-8") - - -class PublicClientOAuthFlowProvider: - def __init__( - self, - client_id: str, - redirect_url: str, - multipass_context_path: Optional[str] = None, - scopes: Optional[List[str]] = None, - ): - self._client_id = client_id - self._redirect_url = redirect_url - self.multipass_context_path = multipass_context_path - self.scopes = scopes - - @property - def client_id(self) -> str: - return self._client_id - - @property - def redirect_url(self) -> str: - return self._redirect_url - - def generate_auth_request(self, client: HttpClient) -> AuthorizeRequest: - state = generate_random_string() - code_verifier = generate_random_string() - code_challenge = generate_code_challenge(code_verifier) - - params = { - "response_type": "code", - "client_id": self._client_id, - "redirect_uri": self._redirect_url, - "code_challenge": code_challenge, - "code_challenge_method": "S256", - "state": state, - } - scopes = self.get_scopes() - if len(scopes) > 0: - params["scope"] = " ".join(scopes) - - authorize_url = OAuthUtils.get_authorize_uri(self.multipass_context_path) - - return AuthorizeRequest( - url=f"{client.base_url}{authorize_url}?{urlencode(params, doseq=True)}", - state=state, - code_verifier=code_verifier, - ) - - def get_token(self, client: HttpClient, code: str, code_verifier: str) -> OAuthToken: - headers = {"Content-Type": "application/x-www-form-urlencoded"} - params = { - "grant_type": "authorization_code", - "code": code, - "redirect_uri": self._redirect_url, - "client_id": self._client_id, - "code_verifier": code_verifier, - } - scopes = self.get_scopes() - if len(scopes) > 0: - params["scope"] = " ".join(scopes) - - token_url = OAuthUtils.get_token_uri(self.multipass_context_path) - response = client.post(token_url, data=params, headers=headers) - response.raise_for_status() - return OAuthToken(token=OAuthTokenResponse(token_response=response.json())) - - def refresh_token(self, client: HttpClient, refresh_token: str) -> OAuthToken: - headers = {"Content-Type": "application/x-www-form-urlencoded"} - params = { - "grant_type": "refresh_token", - "client_id": self._client_id, - "refresh_token": refresh_token, - } - - token_url = OAuthUtils.get_token_uri(self.multipass_context_path) - response = client.post(token_url, data=params, headers=headers) - response.raise_for_status() - return OAuthToken(token=OAuthTokenResponse(token_response=response.json())) - - def revoke_token(self, client: HttpClient, access_token: str) -> None: - body = { - "client_id": self._client_id, - "token": access_token, - } - - token_url = OAuthUtils.get_revoke_uri(self.multipass_context_path) - revoke_token_response = client.post(token_url, data=body) - revoke_token_response.raise_for_status() - - def get_scopes(self) -> List[str]: - if not self.scopes: - return [] - return [*self.scopes, "offline_access"] diff --git a/foundry_sdk/_core/page_iterator.py b/foundry_sdk/_core/page_iterator.py deleted file mode 100644 index ea3787256..000000000 --- a/foundry_sdk/_core/page_iterator.py +++ /dev/null @@ -1,144 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -from typing import Awaitable -from typing import Generic -from typing import List -from typing import Optional -from typing import Protocol -from typing import Tuple -from typing import TypeVar - -T = TypeVar("T") - - -class PageFunction(Generic[T], Protocol): - def __call__( - self, page_size: Optional[int], next_page_token: Optional[str] - ) -> Tuple[Optional[str], List[T]]: ... - - -class AsyncPageFunction(Generic[T], Protocol): - def __call__( - self, page_size: Optional[int], next_page_token: Optional[str] - ) -> Awaitable[Tuple[Optional[str], List[T]]]: ... - - -class PageIterator(Generic[T]): - """A generic class for iterating over paged responses.""" - - def __init__( - self, - paged_func: PageFunction[T], - page_size: Optional[int] = None, - page_token: Optional[str] = None, - ) -> None: - self._page_size: Optional[int] = page_size - self._paged_func: PageFunction[T] = paged_func - self._next_page_token: Optional[str] = page_token - self._has_next = True - self._data: List[T] = [] - self._get_data() - - @property - def next_page_token(self): - return self._next_page_token - - @property - def data(self): - return self._data - - def __iter__(self): - return self - - def __next__(self): - if not self._has_next: - raise StopIteration("End of iteration reached") - - data = self._data - self._get_data() - return data - - def _get_data(self): - if self._has_next: - self._next_page_token, self._data = self._paged_func( - page_size=self._page_size, next_page_token=self._next_page_token - ) - self._has_next = self._next_page_token is not None - else: - self._data = [] - - -class AsyncPageIterator(Generic[T]): - """A generic class for iterating over paged responses.""" - - def __init__( - self, - paged_func: AsyncPageFunction[T], - page_size: Optional[int] = None, - page_token: Optional[str] = None, - ) -> None: - self._page_size: Optional[int] = page_size - self._paged_func: AsyncPageFunction[T] = paged_func - self._next_page_token: Optional[str] = page_token - self._yielded_first = False - self._data: Optional[List[T]] = None - - async def get_next_page_token(self): - """ - Get the next page token. If the first page has not been fetched, it will be - loaded first. - """ - await self.get_data() - return self._next_page_token - - async def get_data(self): - """ - Get the current page of data. If the first page has not been fetched, it will be - loaded first. - """ - if self._data is None: - await self._get_data() - - # This should never be None, but mypy doesn't know that - assert self._data is not None - return self._data - - def __aiter__(self): - return self - - async def __anext__(self): - if self._yielded_first and self._next_page_token is None: - raise StopAsyncIteration("End of iteration reached") - - if not self._yielded_first: - self._yielded_first = True - - # Unlike the PageIterator, the AsyncPageIterator cannot - # fetch data in the constructor because it is async - if self._data is None: - await self._get_data() - else: - await self._get_data() - - # This should never be None, but mypy doesn't know that - assert self._data is not None - return self._data - - async def _get_data(self): - self._next_page_token, self._data = await self._paged_func( - page_size=self._page_size, - next_page_token=self._next_page_token, - ) diff --git a/foundry_sdk/_core/public_client_auth.py b/foundry_sdk/_core/public_client_auth.py deleted file mode 100644 index f7e957ff8..000000000 --- a/foundry_sdk/_core/public_client_auth.py +++ /dev/null @@ -1,110 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import time -from typing import List -from typing import Optional - -from foundry_sdk._core.config import Config -from foundry_sdk._core.oauth_utils import AuthorizeRequest -from foundry_sdk._core.oauth_utils import OAuth -from foundry_sdk._core.oauth_utils import OAuthToken -from foundry_sdk._core.oauth_utils import PublicClientOAuthFlowProvider -from foundry_sdk._core.oauth_utils import SignOutResponse -from foundry_sdk._errors.not_authenticated import NotAuthenticated - - -class PublicClientAuth(OAuth): - """ - Client for Public Client OAuth-authenticated Ontology applications. - Runs a background thread to periodically refresh access token. - - :param client_id: OAuth client id to be used by the application. - :param redirect_url: The URL the authorization server should redirect the user to after the user approves the request. - :param scopes: The list of scopes to request. By default, no specific scope is provided and a token will be returned with all scopes. - :param hostname: Hostname for authentication. This is only required if using PublicClientAuth independently of the FoundryClient. - :param config: The HTTP config for authentication. This is only required if using ConfidentialClientAuth independently of the FoundryClient. - """ - - def __init__( - self, - client_id: str, - redirect_url: str, - hostname: Optional[str] = None, - scopes: Optional[List[str]] = None, - should_refresh: bool = True, - *, - config: Optional[Config] = None, - ) -> None: - self._client_id = client_id - self._redirect_url = redirect_url - self._auth_request: Optional[AuthorizeRequest] = None - self._server_oauth_flow_provider = PublicClientOAuthFlowProvider( - client_id=client_id, - redirect_url=redirect_url, - scopes=scopes, - ) - super().__init__(hostname=hostname, should_refresh=should_refresh, config=config) - - @property - def scopes(self) -> List[str]: - return self._server_oauth_flow_provider.scopes or [] - - def get_token(self) -> OAuthToken: - if self._token is None: - raise NotAuthenticated("Client has not been authenticated.") - return self._token - - def _revoke_token(self) -> None: - if self._token: - self._server_oauth_flow_provider.revoke_token( - self._get_client(), - self._token.access_token, - ) - - def _try_refresh_token(self) -> bool: - if self._token and self._token.refresh_token: - self._token = self._server_oauth_flow_provider.refresh_token( - self._get_client(), - refresh_token=self._token.refresh_token, - ) - return True - return False - - @property - def url(self) -> str: - return self._get_client().base_url.host - - def sign_in(self) -> str: - self._auth_request = self._server_oauth_flow_provider.generate_auth_request( - self._get_client() - ) - return self._auth_request.url - - def set_token(self, code: str, state: str) -> None: - if not self._auth_request: - raise RuntimeError("Must sign in prior to setting token") - - if state != self._auth_request.state: - raise RuntimeError("Unable to verify state") - - self._token = self._server_oauth_flow_provider.get_token( - self._get_client(), - code=code, - code_verifier=self._auth_request.code_verifier, - ) - - if self._should_refresh: - self._start_auto_refresh() diff --git a/foundry_sdk/_core/resource_iterator.py b/foundry_sdk/_core/resource_iterator.py deleted file mode 100644 index c969cce86..000000000 --- a/foundry_sdk/_core/resource_iterator.py +++ /dev/null @@ -1,96 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import warnings -from typing import Generic -from typing import List -from typing import Optional -from typing import TypeVar - -from foundry_sdk._core.page_iterator import AsyncPageFunction -from foundry_sdk._core.page_iterator import AsyncPageIterator -from foundry_sdk._core.page_iterator import PageFunction -from foundry_sdk._core.page_iterator import PageIterator - -T = TypeVar("T") - - -class ResourceIterator(Generic[T]): - """A generic class for iterating over paged responses.""" - - def __init__( - self, - paged_func: PageFunction[T], - page_size: Optional[int] = None, - page_token: Optional[str] = None, - ) -> None: - self._page_iterator = PageIterator(paged_func, page_size, page_token) - self._index = 0 - - @property - def data(self) -> List[T]: - return self._page_iterator.data - - @property - def next_page_token(self) -> Optional[str]: - return self._page_iterator.next_page_token - - def __iter__(self): - return self - - def __next__(self): - while self._index >= len(self._page_iterator.data): - self._get_data() - - obj = self._page_iterator.data[self._index] - self._index += 1 - return obj - - def _get_data(self): - try: - next(self._page_iterator) - self._index = 0 - except StopIteration: - raise StopIteration("End of iteration reached") - - -class AsyncResourceIterator(Generic[T]): - """A generic class for async iterating over paged responses.""" - - def __init__( - self, - paged_func: AsyncPageFunction[T], - page_size: Optional[int] = None, - page_token: Optional[str] = None, - ) -> None: - self._page_iterator = AsyncPageIterator(paged_func, page_size, page_token) - self._data: Optional[List[T]] = None - self._index = 0 - - def __aiter__(self): - return self - - async def __anext__(self): - if self._data is None: - self._data = await self._page_iterator.__anext__() - - if self._index >= len(self._data): - self._data = await self._page_iterator.__anext__() - self._index = 0 - return await self.__anext__() - - obj = self._data[self._index] - self._index += 1 - return obj diff --git a/foundry_sdk/_core/table.py b/foundry_sdk/_core/table.py deleted file mode 100644 index a42d5ff27..000000000 --- a/foundry_sdk/_core/table.py +++ /dev/null @@ -1,82 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -from typing import TYPE_CHECKING -from typing import Any -from typing import Optional - -if TYPE_CHECKING: - import duckdb # type: ignore - import pandas as pd # type: ignore - import polars as pl # type: ignore - import pyarrow as pa # type: ignore - - -def _error_msg(package_required: str, convert_to: str, extra_dependency: str): - return ( - f"{package_required} is required to convert to {convert_to}. If you are using pip, " - f"you can install it with 'pip install foundry_sdk[{extra_dependency}]'." - ) - - -class TableResponse(bytes): - """A generic class for deserializing an Arrow Table into various formats.""" - - _arrow_table: Optional["pa.Table"] - - def __new__(cls, arrow_bytes: bytes): - instance = super().__new__(cls, arrow_bytes) - instance._arrow_table = None - return instance - - def to_pandas(self) -> "pd.DataFrame": - """Convert the bytes into a Pandas DataFrame.""" - try: - return self._get_arrow_table("pandas").to_pandas() - except ImportError: - raise ImportError(_error_msg("pandas", "a Pandas DataFrame", "pandas")) - - def to_polars(self) -> "pl.DataFrame": - """Convert the bytes into a Polars DataFrame.""" - try: - import polars as pl - - return pl.DataFrame(self._get_arrow_table("polars")) - except ImportError: - raise ImportError(_error_msg("polars", "a Polars DataFrame", "polars")) - - def to_pyarrow(self) -> "pa.Table": - """Convert the bytes into an Arrow Table.""" - return self._get_arrow_table("pyarrow") - - def to_duckdb(self) -> "duckdb.DuckDBPyRelation": - """Convert the bytes into a DuckDB relation.""" - try: - import duckdb - - return duckdb.from_arrow(self._get_arrow_table("duckdb")) - except ImportError: - raise ImportError(_error_msg("duckdb", "a DuckDB relation", "duckdb")) - - def _get_arrow_table(self, extra_dependency: str) -> "pa.Table": - try: - import pyarrow as pa - except ImportError: - raise ImportError(_error_msg("pyarrow", "an Arrow Table", extra_dependency)) - - if self._arrow_table is None: - self._arrow_table = pa.ipc.open_stream(self).read_all() - - return self._arrow_table diff --git a/foundry_sdk/_core/user_token_auth_client.py b/foundry_sdk/_core/user_token_auth_client.py deleted file mode 100644 index 08d580da7..000000000 --- a/foundry_sdk/_core/user_token_auth_client.py +++ /dev/null @@ -1,55 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import os -from typing import Callable -from typing import TypeVar - -import httpx - -from foundry_sdk._core.auth_utils import Auth -from foundry_sdk._core.auth_utils import Token -from foundry_sdk._core.utils import assert_non_empty_string -from foundry_sdk._errors.environment_not_configured import EnvironmentNotConfigured -from foundry_sdk._errors.not_authenticated import NotAuthenticated - -T = TypeVar("T") - - -class _UserToken(Token): - - def __init__(self, token: str) -> None: - self._token = token - - @property - def access_token(self) -> str: - return self._token - - -class UserTokenAuth(Auth): - def __init__(self, token: str) -> None: - assert_non_empty_string(token, "token") - self._token = _UserToken(token) - - def get_token(self) -> Token: - if self._token is None: - raise NotAuthenticated("Client has not been authenticated.") - return self._token - - def execute_with_token(self, func: Callable[[Token], T]) -> T: - return func(self.get_token()) - - def run_with_token(self, func: Callable[[Token], T]) -> None: - func(self.get_token()) diff --git a/foundry_sdk/_core/utils.py b/foundry_sdk/_core/utils.py deleted file mode 100644 index d6dc62bfd..000000000 --- a/foundry_sdk/_core/utils.py +++ /dev/null @@ -1,123 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import inspect -import typing -import warnings -from datetime import timezone -from functools import wraps -from typing import Any -from typing import Callable -from typing import ForwardRef -from typing import List -from typing import TypeVar - -import pydantic -from typing_extensions import Annotated - -RID = Annotated[ - str, - pydantic.StringConstraints( - pattern=r"^ri\.[a-z][a-z0-9-]*\.([a-z0-9][a-z0-9\-]*)?\.[a-z][a-z0-9-]*\.[a-zA-Z0-9._-]+$", - ), -] - - -UUID = Annotated[ - str, - pydantic.StringConstraints( - pattern=r"^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$", - ), -] - - -Long = Annotated[ - int, - pydantic.PlainSerializer( - lambda value: str(value), - return_type=str, - # Important: This ensures the value is not serialized when using to_dict() - # We only want to serialize when dumping to a JSON string - when_used="json", - ), -] -"""A long integer that is serialized to a string in JSON.""" - - -AwareDatetime = Annotated[ - pydantic.AwareDatetime, - pydantic.PlainSerializer( - lambda value: value.astimezone(timezone.utc).isoformat(), - return_type=str, - # Important: This ensures the value is not serialized when using to_dict() - # We only want to serialize when dumping to a JSON string - when_used="json", - ), -] -"""A datetime object that enforces timezones and is always serialized to UTC.""" - - -Timeout = Annotated[int, pydantic.Field(gt=0)] - - -def remove_prefixes(text: str, prefixes: List[str]): - for prefix in prefixes: - if text.startswith(prefix): - text = text[len(prefix) :] - return text - - -AnyCallableT = TypeVar("AnyCallableT", bound=Callable[..., Any]) - - -def maybe_ignore_preview(func: AnyCallableT) -> AnyCallableT: - sig = inspect.signature(func) - - @wraps(func) - def wrapper(*args: Any, **kwargs: Any) -> Any: - if "preview" in kwargs and "preview" not in sig.parameters: - warnings.warn( - f'The "preview" argument is not required when calling {func.__name__}() since the endpoint is not in beta.', - UserWarning, - ) - kwargs.pop("preview") - return func(*args, **kwargs) - - return wrapper # type: ignore - - -def resolve_forward_references(type_obj: Any, globalns: dict, localns: dict) -> Any: - if typing.get_origin(type_obj) is None: - return type_obj - - args = tuple( - ( - typing._eval_type(arg, globalns, localns) # type: ignore - if isinstance(arg, ForwardRef) - else resolve_forward_references(arg, globalns, localns) - ) - for arg in typing.get_args(type_obj) # type: ignore - ) - - setattr(type_obj, "__args__", args) - return type_obj - - -def assert_non_empty_string(value: str, name: str) -> None: - if not isinstance(value, str): - raise TypeError(f"The {name} must be a string, not {type(value)}.") - - if not value: - raise ValueError(f"The {name} cannot be empty.") diff --git a/foundry_sdk/_errors/__init__.py b/foundry_sdk/_errors/__init__.py deleted file mode 100644 index 457674352..000000000 --- a/foundry_sdk/_errors/__init__.py +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -from foundry_sdk._errors.api_not_found import ApiNotFoundError -from foundry_sdk._errors.connection_error import ConnectionError -from foundry_sdk._errors.connection_error import ProxyError -from foundry_sdk._errors.environment_not_configured import EnvironmentNotConfigured -from foundry_sdk._errors.not_authenticated import NotAuthenticated -from foundry_sdk._errors.palantir_exception import PalantirException -from foundry_sdk._errors.palantir_qos_exception import PalantirQoSException -from foundry_sdk._errors.palantir_qos_exception import RateLimitError -from foundry_sdk._errors.palantir_qos_exception import ServiceUnavailable -from foundry_sdk._errors.palantir_rpc_exception import BadRequestError -from foundry_sdk._errors.palantir_rpc_exception import ConflictError -from foundry_sdk._errors.palantir_rpc_exception import InternalServerError -from foundry_sdk._errors.palantir_rpc_exception import NotFoundError -from foundry_sdk._errors.palantir_rpc_exception import PalantirRPCException -from foundry_sdk._errors.palantir_rpc_exception import PermissionDeniedError -from foundry_sdk._errors.palantir_rpc_exception import RequestEntityTooLargeError -from foundry_sdk._errors.palantir_rpc_exception import UnauthorizedError -from foundry_sdk._errors.palantir_rpc_exception import UnprocessableEntityError -from foundry_sdk._errors.sdk_internal_error import SDKInternalError -from foundry_sdk._errors.sdk_internal_error import handle_unexpected -from foundry_sdk._errors.stream_error import StreamConsumedError -from foundry_sdk._errors.timeout_error import ConnectTimeout -from foundry_sdk._errors.timeout_error import ReadTimeout -from foundry_sdk._errors.timeout_error import TimeoutError -from foundry_sdk._errors.timeout_error import WriteTimeout -from foundry_sdk._errors.utils import deserialize_error diff --git a/foundry_sdk/_errors/api_not_found.py b/foundry_sdk/_errors/api_not_found.py deleted file mode 100644 index 1ae322aa4..000000000 --- a/foundry_sdk/_errors/api_not_found.py +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -from foundry_sdk._errors.palantir_exception import PalantirException - - -class ApiNotFoundError(PalantirException): - """The requested API was not found.""" - - def __init__(self, message: str) -> None: - super().__init__(message) diff --git a/foundry_sdk/_errors/connection_error.py b/foundry_sdk/_errors/connection_error.py deleted file mode 100644 index 67e727188..000000000 --- a/foundry_sdk/_errors/connection_error.py +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -from foundry_sdk._errors.palantir_exception import PalantirException - - -class ConnectionError(PalantirException): - """An issue occurred when connecting to the server. This also catches both ProxyError.""" - - -class ProxyError(ConnectionError): - """An issue occurred when connecting to or authenticating with a proxy server.""" diff --git a/foundry_sdk/_errors/environment_not_configured.py b/foundry_sdk/_errors/environment_not_configured.py deleted file mode 100644 index 2bb700053..000000000 --- a/foundry_sdk/_errors/environment_not_configured.py +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -from foundry_sdk._errors.palantir_exception import PalantirException - - -class EnvironmentNotConfigured(PalantirException): - def __init__(self, message: str) -> None: - super().__init__(message) diff --git a/foundry_sdk/_errors/not_authenticated.py b/foundry_sdk/_errors/not_authenticated.py deleted file mode 100644 index c3b3a6a67..000000000 --- a/foundry_sdk/_errors/not_authenticated.py +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -from foundry_sdk._errors.palantir_exception import PalantirException - - -class NotAuthenticated(PalantirException): - pass diff --git a/foundry_sdk/_errors/palantir_exception.py b/foundry_sdk/_errors/palantir_exception.py deleted file mode 100644 index 795fc101b..000000000 --- a/foundry_sdk/_errors/palantir_exception.py +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -class PalantirException(Exception): - """The root exception class all others inherit from.""" diff --git a/foundry_sdk/_errors/palantir_qos_exception.py b/foundry_sdk/_errors/palantir_qos_exception.py deleted file mode 100644 index a0a7ae3aa..000000000 --- a/foundry_sdk/_errors/palantir_qos_exception.py +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -from foundry_sdk._errors.palantir_exception import PalantirException - - -class PalantirQoSException(PalantirException): - """The root exception class for all QoS related exceptions.""" - - -class RateLimitError(PalantirQoSException): - """ - The service is experiencing too many requests. Reduce your request rate and retry your - request shortly. This error is thrown if a 429 status code is returned. - """ - - -class ServiceUnavailable(PalantirQoSException): - """ - The service is currently unavailable. Retry your request shortly. This error is thrown if a - 503 status code is returned. - """ diff --git a/foundry_sdk/_errors/palantir_rpc_exception.py b/foundry_sdk/_errors/palantir_rpc_exception.py deleted file mode 100644 index 4c2385537..000000000 --- a/foundry_sdk/_errors/palantir_rpc_exception.py +++ /dev/null @@ -1,79 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import json -from typing import Any -from typing import Dict - -from foundry_sdk._errors.palantir_exception import PalantirException - - -def format_error_message(fields: Dict[str, Any]) -> str: - return json.dumps(fields, sort_keys=True, indent=4, default=str) - - -class PalantirRPCException(PalantirException): - def __init__(self, error_metadata: Dict[str, Any]): - super().__init__(format_error_message(error_metadata)) - self.name = error_metadata.get("errorName") - self.parameters = error_metadata.get("parameters") - self.error_instance_id = error_metadata.get("errorInstanceId") - self.error_code = error_metadata.get("errorCode") - self.error_description = error_metadata.get("errorDescription") - - -class BadRequestError(PalantirRPCException): - """ - There was an issue with the request. This error is thrown if a 400 status code is returned. - """ - - -class UnauthorizedError(PalantirRPCException): - """ - The authorization header is missing or invalid. This error is thrown if a 401 status code is returned. - """ - - -class RequestEntityTooLargeError(PalantirRPCException): - """The request entity is too large. This error is thrown if a 413 status code is returned.""" - - -class PermissionDeniedError(PalantirRPCException): - """ - You are missing the necessary permissions to complete your request. This error is thrown if a - 403 status code is returned. - """ - - -class NotFoundError(PalantirRPCException): - """A Resource was not found. This error is thrown if a 404 status code is returned.""" - - -class UnprocessableEntityError(PalantirRPCException): - """ - One or more of the request's arguments are invalid. This error is thrown if a 422 status code - is returned. - """ - - -class ConflictError(PalantirRPCException): - """ - There was a conflict with another request. This error is thrown if a 409 status code is - returned. - """ - - -class InternalServerError(PalantirRPCException): - """An error occurred within the service. This error is thrown if a 5XX status code is returned.""" diff --git a/foundry_sdk/_errors/sdk_internal_error.py b/foundry_sdk/_errors/sdk_internal_error.py deleted file mode 100644 index 906c1d681..000000000 --- a/foundry_sdk/_errors/sdk_internal_error.py +++ /dev/null @@ -1,72 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import functools -import sys -from typing import Any -from typing import Callable -from typing import TypeVar - -import pydantic -from httpx import __version__ as __httpx_version__ -from pydantic import __version__ as __pydantic__version__ -from pydantic_core import __version__ as __pydantic_core_version__ - -from foundry_sdk._errors.palantir_exception import PalantirException -from foundry_sdk._versions import __openapi_document_version__ -from foundry_sdk._versions import __version__ - -AnyCallableT = TypeVar("AnyCallableT", bound=Callable[..., Any]) - - -def handle_unexpected(__func: AnyCallableT) -> AnyCallableT: - @functools.wraps(__func) - def validate(*args, **kwargs): - try: - return __func(*args, **kwargs) - except ( - PalantirException, - pydantic.ValidationError, - ) as e: - # pass through these exceptions - raise e - except Exception as e: - raise SDKInternalError(str(e)) from e - - return validate # type: ignore - - -class SDKInternalError(PalantirException): - def __init__(self, msg: str) -> None: - self.msg = msg - - def __str__(self): - message = self.msg - - sys_version = sys.version.replace("\n", " ") - message += ( - "\n\nThis is an unexpected issue and should be reported. " - "When filing an issue, make sure to copy the package information " - "listed below.\n\n" - f"OS: {sys.platform}\n" - f"Python Version: {sys_version}\n" - f"SDK Version: {__version__}\n" - f"OpenAPI Document Version: {__openapi_document_version__}\n" - f"Pydantic Version: {__pydantic__version__}\n" - f"Pydantic Core Version: {__pydantic_core_version__}\n" - f"Httpx Version: {__httpx_version__}\n" - ) - - return message diff --git a/foundry_sdk/_errors/stream_error.py b/foundry_sdk/_errors/stream_error.py deleted file mode 100644 index ab9effd73..000000000 --- a/foundry_sdk/_errors/stream_error.py +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -from foundry_sdk._errors.palantir_exception import PalantirException - - -class StreamConsumedError(PalantirException): - """The content of the given stream has already been consumed.""" diff --git a/foundry_sdk/_errors/timeout_error.py b/foundry_sdk/_errors/timeout_error.py deleted file mode 100644 index 8c9ce9be6..000000000 --- a/foundry_sdk/_errors/timeout_error.py +++ /dev/null @@ -1,33 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -from foundry_sdk._errors.connection_error import ConnectionError -from foundry_sdk._errors.palantir_exception import PalantirException - - -class TimeoutError(PalantirException): - """The request timed out. This error will catch both ConnectTimeout, ReadTimeout and WriteTimeout.""" - - -class ConnectTimeout(ConnectionError, TimeoutError): - """The request timed out when attempting to connect to the server.""" - - -class ReadTimeout(TimeoutError): - """The server did not send any data in the allotted amount of time.""" - - -class WriteTimeout(TimeoutError): - """There was a timeout when writing data to the server.""" diff --git a/foundry_sdk/_errors/utils.py b/foundry_sdk/_errors/utils.py deleted file mode 100644 index b025ca7b0..000000000 --- a/foundry_sdk/_errors/utils.py +++ /dev/null @@ -1,64 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import warnings -from typing import Any -from typing import Dict -from typing import Optional -from typing import Type -from typing import cast -from typing import get_type_hints - -import pydantic - -from foundry_sdk._errors.palantir_rpc_exception import PalantirRPCException -from foundry_sdk._errors.sdk_internal_error import SDKInternalError - - -def deserialize_error( - error_metadata: Dict[str, Any], - exception_classes: Dict[str, type], -) -> Optional[PalantirRPCException]: - try: - name = error_metadata["errorName"] - parameters = error_metadata["parameters"] - error_instance_id = error_metadata["errorInstanceId"] - except KeyError as e: - warnings.warn(str(SDKInternalError(f"Failed to find required error attributes: {e}"))) - - return None - - exc_class = exception_classes.get(name) - if exc_class is None: - return None - - annotations = get_type_hints(exc_class) - parameters_type = cast(Type[Dict[str, Any]], annotations["parameters"]) - adapter = pydantic.TypeAdapter(parameters_type) - - try: - parameters_instance = adapter.validate_python(parameters) - return exc_class( - name=name, parameters=parameters_instance, error_instance_id=error_instance_id - ) - except pydantic.ValidationError as e: - # For whatever reason, if we can't properly deserialize the error parameters we will throw PalantirRPCException - # instead of failing - # To provide additional details to the user we will add a bunch of metadata to the warning - # using the "SDKInternalError" class but just emit a warning - warning_message = str(SDKInternalError(f'Deserialization failed for error "{name}": {e}')) - - warnings.warn(warning_message) - return None diff --git a/foundry_sdk/_versions.py b/foundry_sdk/_versions.py deleted file mode 100644 index 7c2768971..000000000 --- a/foundry_sdk/_versions.py +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -# The version is set during the publishing step (since we can't know the version in advance) -# using the autorelease bot -__version__ = "0.0.0" - -__openapi_document_version__ = "1.1416.1" diff --git a/foundry_sdk/py.typed b/foundry_sdk/py.typed deleted file mode 100644 index e69de29bb..000000000 diff --git a/foundry_sdk/v1/__init__.py b/foundry_sdk/v1/__init__.py deleted file mode 100644 index 5c00d5f9d..000000000 --- a/foundry_sdk/v1/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -from foundry_sdk.v1.client import AsyncFoundryClient -from foundry_sdk.v1.client import FoundryClient - -__all__ = [ - "FoundryClient", - "AsyncFoundryClient", -] diff --git a/foundry_sdk/v1/cli.py b/foundry_sdk/v1/cli.py deleted file mode 100644 index 867cb2e5c..000000000 --- a/foundry_sdk/v1/cli.py +++ /dev/null @@ -1,1610 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -from __future__ import annotations - -import dataclasses -import io -import json -import os -import typing -from datetime import date as Date -from datetime import datetime - -import click - -from foundry_sdk import EnvironmentNotConfigured -from foundry_sdk import UserTokenAuth -from foundry_sdk.v1 import FoundryClient - - -@dataclasses.dataclass -class _Context: - obj: FoundryClient - - -def get_from_environ(key: str) -> str: - value = os.environ.get(key) - if value is None: - raise EnvironmentNotConfigured(f"Please set {key} using `export {key}=<{key}>`") - - return value - - -@click.group() # type: ignore -@click.pass_context # type: ignore -def cli(ctx: _Context): - """An experimental CLI for the Foundry API""" - ctx.obj = FoundryClient( - auth=UserTokenAuth(token=get_from_environ("FOUNDRY_TOKEN")), - hostname=get_from_environ("FOUNDRY_HOSTNAME"), - ) - - -@cli.group("core") -def core(): - pass - - -@cli.group("datasets") -def datasets(): - pass - - -@datasets.group("dataset") -def datasets_dataset(): - pass - - -@datasets_dataset.command("create") -@click.option("--name", type=str, required=True, help="""""") -@click.option("--parent_folder_rid", type=str, required=True, help="""""") -@click.pass_obj -def datasets_dataset_op_create( - client: FoundryClient, - name: str, - parent_folder_rid: str, -): - """ - Creates a new Dataset. A default branch - `master` for most enrollments - will be created on the Dataset. - - """ - result = client.datasets.Dataset.create( - name=name, - parent_folder_rid=parent_folder_rid, - ) - click.echo(repr(result)) - - -@datasets_dataset.command("delete_schema") -@click.argument("dataset_rid", type=str, required=True) -@click.option( - "--branch_id", - type=str, - required=False, - help="""The ID of the Branch on which to delete the schema. -""", -) -@click.option("--preview", type=bool, required=False, help="""""") -@click.option( - "--transaction_rid", - type=str, - required=False, - help="""The RID of the Transaction on which to delete the schema. -""", -) -@click.pass_obj -def datasets_dataset_op_delete_schema( - client: FoundryClient, - dataset_rid: str, - branch_id: typing.Optional[str], - preview: typing.Optional[bool], - transaction_rid: typing.Optional[str], -): - """ - Deletes the Schema from a Dataset and Branch. - - """ - result = client.datasets.Dataset.delete_schema( - dataset_rid=dataset_rid, - branch_id=branch_id, - preview=preview, - transaction_rid=transaction_rid, - ) - click.echo(repr(result)) - - -@datasets_dataset.command("get") -@click.argument("dataset_rid", type=str, required=True) -@click.pass_obj -def datasets_dataset_op_get( - client: FoundryClient, - dataset_rid: str, -): - """ - Gets the Dataset with the given DatasetRid. - - """ - result = client.datasets.Dataset.get( - dataset_rid=dataset_rid, - ) - click.echo(repr(result)) - - -@datasets_dataset.command("get_schema") -@click.argument("dataset_rid", type=str, required=True) -@click.option( - "--branch_id", - type=str, - required=False, - help="""The ID of the Branch. -""", -) -@click.option("--preview", type=bool, required=False, help="""""") -@click.option( - "--transaction_rid", - type=str, - required=False, - help="""The TransactionRid that contains the Schema. -""", -) -@click.pass_obj -def datasets_dataset_op_get_schema( - client: FoundryClient, - dataset_rid: str, - branch_id: typing.Optional[str], - preview: typing.Optional[bool], - transaction_rid: typing.Optional[str], -): - """ - Retrieves the Schema for a Dataset and Branch, if it exists. - - """ - result = client.datasets.Dataset.get_schema( - dataset_rid=dataset_rid, - branch_id=branch_id, - preview=preview, - transaction_rid=transaction_rid, - ) - click.echo(repr(result)) - - -@datasets_dataset.command("read") -@click.argument("dataset_rid", type=str, required=True) -@click.option( - "--format", - type=click.Choice(["ARROW", "CSV"]), - required=True, - help="""The export format. Must be `ARROW` or `CSV`. -""", -) -@click.option( - "--branch_id", type=str, required=False, help="""The identifier (name) of the Branch.""" -) -@click.option( - "--columns", - type=str, - required=False, - help="""A subset of the dataset columns to include in the result. Defaults to all columns. -""", -) -@click.option( - "--end_transaction_rid", - type=str, - required=False, - help="""The Resource Identifier (RID) of the end Transaction.""", -) -@click.option( - "--row_limit", - type=int, - required=False, - help="""A limit on the number of rows to return. Note that row ordering is non-deterministic. -""", -) -@click.option( - "--start_transaction_rid", - type=str, - required=False, - help="""The Resource Identifier (RID) of the start Transaction.""", -) -@click.pass_obj -def datasets_dataset_op_read( - client: FoundryClient, - dataset_rid: str, - format: typing.Literal["ARROW", "CSV"], - branch_id: typing.Optional[str], - columns: typing.Optional[str], - end_transaction_rid: typing.Optional[str], - row_limit: typing.Optional[int], - start_transaction_rid: typing.Optional[str], -): - """ - Gets the content of a dataset as a table in the specified format. - - This endpoint currently does not support views (virtual datasets composed of other datasets). For more information, refer to the [views documentation](https://palantir.com/docs/foundry/data-integration/views). - - """ - result = client.datasets.Dataset.read( - dataset_rid=dataset_rid, - format=format, - branch_id=branch_id, - columns=None if columns is None else json.loads(columns), - end_transaction_rid=end_transaction_rid, - row_limit=row_limit, - start_transaction_rid=start_transaction_rid, - ) - click.echo(result) - - -@datasets_dataset.command("replace_schema") -@click.argument("dataset_rid", type=str, required=True) -@click.argument("body", type=str, required=True) -@click.option( - "--branch_id", - type=str, - required=False, - help="""The ID of the Branch on which to put the Schema. -""", -) -@click.option("--preview", type=bool, required=False, help="""""") -@click.pass_obj -def datasets_dataset_op_replace_schema( - client: FoundryClient, - dataset_rid: str, - body: str, - branch_id: typing.Optional[str], - preview: typing.Optional[bool], -): - """ - Puts a Schema on an existing Dataset and Branch. - - """ - result = client.datasets.Dataset.replace_schema( - dataset_rid=dataset_rid, - body=json.loads(body), - branch_id=branch_id, - preview=preview, - ) - click.echo(repr(result)) - - -@datasets_dataset.group("transaction") -def datasets_dataset_transaction(): - pass - - -@datasets_dataset_transaction.command("abort") -@click.argument("dataset_rid", type=str, required=True) -@click.argument("transaction_rid", type=str, required=True) -@click.pass_obj -def datasets_dataset_transaction_op_abort( - client: FoundryClient, - dataset_rid: str, - transaction_rid: str, -): - """ - Aborts an open Transaction. File modifications made on this Transaction are not preserved and the Branch is - not updated. - - """ - result = client.datasets.Dataset.Transaction.abort( - dataset_rid=dataset_rid, - transaction_rid=transaction_rid, - ) - click.echo(repr(result)) - - -@datasets_dataset_transaction.command("commit") -@click.argument("dataset_rid", type=str, required=True) -@click.argument("transaction_rid", type=str, required=True) -@click.pass_obj -def datasets_dataset_transaction_op_commit( - client: FoundryClient, - dataset_rid: str, - transaction_rid: str, -): - """ - Commits an open Transaction. File modifications made on this Transaction are preserved and the Branch is - updated to point to the Transaction. - - """ - result = client.datasets.Dataset.Transaction.commit( - dataset_rid=dataset_rid, - transaction_rid=transaction_rid, - ) - click.echo(repr(result)) - - -@datasets_dataset_transaction.command("create") -@click.argument("dataset_rid", type=str, required=True) -@click.option( - "--branch_id", - type=str, - required=False, - help="""The identifier (name) of the Branch on which to create the Transaction. Defaults to `master` for most enrollments. -""", -) -@click.option( - "--transaction_type", - type=click.Choice(["APPEND", "UPDATE", "SNAPSHOT", "DELETE"]), - required=False, - help="""""", -) -@click.pass_obj -def datasets_dataset_transaction_op_create( - client: FoundryClient, - dataset_rid: str, - branch_id: typing.Optional[str], - transaction_type: typing.Optional[typing.Literal["APPEND", "UPDATE", "SNAPSHOT", "DELETE"]], -): - """ - Creates a Transaction on a Branch of a Dataset. - - """ - result = client.datasets.Dataset.Transaction.create( - dataset_rid=dataset_rid, - branch_id=branch_id, - transaction_type=transaction_type, - ) - click.echo(repr(result)) - - -@datasets_dataset_transaction.command("get") -@click.argument("dataset_rid", type=str, required=True) -@click.argument("transaction_rid", type=str, required=True) -@click.pass_obj -def datasets_dataset_transaction_op_get( - client: FoundryClient, - dataset_rid: str, - transaction_rid: str, -): - """ - Gets a Transaction of a Dataset. - - """ - result = client.datasets.Dataset.Transaction.get( - dataset_rid=dataset_rid, - transaction_rid=transaction_rid, - ) - click.echo(repr(result)) - - -@datasets_dataset.group("file") -def datasets_dataset_file(): - pass - - -@datasets_dataset_file.command("delete") -@click.argument("dataset_rid", type=str, required=True) -@click.argument("file_path", type=str, required=True) -@click.option( - "--branch_id", - type=str, - required=False, - help="""The identifier (name) of the Branch on which to delete the File. Defaults to `master` for most enrollments.""", -) -@click.option( - "--transaction_rid", - type=str, - required=False, - help="""The Resource Identifier (RID) of the open delete Transaction on which to delete the File.""", -) -@click.pass_obj -def datasets_dataset_file_op_delete( - client: FoundryClient, - dataset_rid: str, - file_path: str, - branch_id: typing.Optional[str], - transaction_rid: typing.Optional[str], -): - """ - Deletes a File from a Dataset. By default the file is deleted in a new transaction on the default - branch - `master` for most enrollments. The file will still be visible on historical views. - - #### Advanced Usage - - See [Datasets Core Concepts](https://palantir.com/docs/foundry/data-integration/datasets/) for details on using branches and transactions. - - To **delete a File from a specific Branch** specify the Branch's identifier as `branchId`. A new delete Transaction - will be created and committed on this branch. - - To **delete a File using a manually opened Transaction**, specify the Transaction's resource identifier - as `transactionRid`. The transaction must be of type `DELETE`. This is useful for deleting multiple files in a - single transaction. See [createTransaction](https://palantir.com/docs/foundry/api/datasets-resources/transactions/create-transaction/) to - open a transaction. - - """ - result = client.datasets.Dataset.File.delete( - dataset_rid=dataset_rid, - file_path=file_path, - branch_id=branch_id, - transaction_rid=transaction_rid, - ) - click.echo(repr(result)) - - -@datasets_dataset_file.command("get") -@click.argument("dataset_rid", type=str, required=True) -@click.argument("file_path", type=str, required=True) -@click.option( - "--branch_id", - type=str, - required=False, - help="""The identifier (name) of the Branch that contains the File. Defaults to `master` for most enrollments.""", -) -@click.option( - "--end_transaction_rid", - type=str, - required=False, - help="""The Resource Identifier (RID) of the end Transaction.""", -) -@click.option( - "--start_transaction_rid", - type=str, - required=False, - help="""The Resource Identifier (RID) of the start Transaction.""", -) -@click.pass_obj -def datasets_dataset_file_op_get( - client: FoundryClient, - dataset_rid: str, - file_path: str, - branch_id: typing.Optional[str], - end_transaction_rid: typing.Optional[str], - start_transaction_rid: typing.Optional[str], -): - """ - Gets metadata about a File contained in a Dataset. By default this retrieves the file's metadata from the latest - view of the default branch - `master` for most enrollments. - - #### Advanced Usage - - See [Datasets Core Concepts](https://palantir.com/docs/foundry/data-integration/datasets/) for details on using branches and transactions. - - To **get a file's metadata from a specific Branch** specify the Branch's identifier as `branchId`. This will - retrieve metadata for the most recent version of the file since the latest snapshot transaction, or the earliest - ancestor transaction of the branch if there are no snapshot transactions. - - To **get a file's metadata from the resolved view of a transaction** specify the Transaction's resource identifier - as `endTransactionRid`. This will retrieve metadata for the most recent version of the file since the latest snapshot - transaction, or the earliest ancestor transaction if there are no snapshot transactions. - - To **get a file's metadata from the resolved view of a range of transactions** specify the the start transaction's - resource identifier as `startTransactionRid` and the end transaction's resource identifier as `endTransactionRid`. - This will retrieve metadata for the most recent version of the file since the `startTransactionRid` up to the - `endTransactionRid`. Behavior is undefined when the start and end transactions do not belong to the same root-to-leaf path. - - To **get a file's metadata from a specific transaction** specify the Transaction's resource identifier as both the - `startTransactionRid` and `endTransactionRid`. - - """ - result = client.datasets.Dataset.File.get( - dataset_rid=dataset_rid, - file_path=file_path, - branch_id=branch_id, - end_transaction_rid=end_transaction_rid, - start_transaction_rid=start_transaction_rid, - ) - click.echo(repr(result)) - - -@datasets_dataset_file.command("list") -@click.argument("dataset_rid", type=str, required=True) -@click.option( - "--branch_id", - type=str, - required=False, - help="""The identifier (name) of the Branch on which to list Files. Defaults to `master` for most enrollments.""", -) -@click.option( - "--end_transaction_rid", - type=str, - required=False, - help="""The Resource Identifier (RID) of the end Transaction.""", -) -@click.option( - "--page_size", - type=int, - required=False, - help="""The desired size of the page to be returned. Defaults to 1,000. -See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. -""", -) -@click.option("--page_token", type=str, required=False, help="""""") -@click.option( - "--start_transaction_rid", - type=str, - required=False, - help="""The Resource Identifier (RID) of the start Transaction.""", -) -@click.pass_obj -def datasets_dataset_file_op_list( - client: FoundryClient, - dataset_rid: str, - branch_id: typing.Optional[str], - end_transaction_rid: typing.Optional[str], - page_size: typing.Optional[int], - page_token: typing.Optional[str], - start_transaction_rid: typing.Optional[str], -): - """ - Lists Files contained in a Dataset. By default files are listed on the latest view of the default - branch - `master` for most enrollments. - - This endpoint currently does not support views (virtual datasets composed of other datasets). For more information, refer to the [views documentation](https://palantir.com/docs/foundry/data-integration/views). - - #### Advanced Usage - - See [Datasets Core Concepts](https://palantir.com/docs/foundry/data-integration/datasets/) for details on using branches and transactions. - - To **list files on a specific Branch** specify the Branch's identifier as `branchId`. This will include the most - recent version of all files since the latest snapshot transaction, or the earliest ancestor transaction of the - branch if there are no snapshot transactions. - - To **list files on the resolved view of a transaction** specify the Transaction's resource identifier - as `endTransactionRid`. This will include the most recent version of all files since the latest snapshot - transaction, or the earliest ancestor transaction if there are no snapshot transactions. - - To **list files on the resolved view of a range of transactions** specify the the start transaction's resource - identifier as `startTransactionRid` and the end transaction's resource identifier as `endTransactionRid`. This - will include the most recent version of all files since the `startTransactionRid` up to the `endTransactionRid`. - Note that an intermediate snapshot transaction will remove all files from the view. Behavior is undefined when - the start and end transactions do not belong to the same root-to-leaf path. - - To **list files on a specific transaction** specify the Transaction's resource identifier as both the - `startTransactionRid` and `endTransactionRid`. This will include only files that were modified as part of that - Transaction. - - """ - result = client.datasets.Dataset.File.list( - dataset_rid=dataset_rid, - branch_id=branch_id, - end_transaction_rid=end_transaction_rid, - page_size=page_size, - page_token=page_token, - start_transaction_rid=start_transaction_rid, - ) - click.echo(repr(result)) - - -@datasets_dataset_file.command("read") -@click.argument("dataset_rid", type=str, required=True) -@click.argument("file_path", type=str, required=True) -@click.option( - "--branch_id", - type=str, - required=False, - help="""The identifier (name) of the Branch that contains the File. Defaults to `master` for most enrollments.""", -) -@click.option( - "--end_transaction_rid", - type=str, - required=False, - help="""The Resource Identifier (RID) of the end Transaction.""", -) -@click.option( - "--start_transaction_rid", - type=str, - required=False, - help="""The Resource Identifier (RID) of the start Transaction.""", -) -@click.pass_obj -def datasets_dataset_file_op_read( - client: FoundryClient, - dataset_rid: str, - file_path: str, - branch_id: typing.Optional[str], - end_transaction_rid: typing.Optional[str], - start_transaction_rid: typing.Optional[str], -): - """ - Gets the content of a File contained in a Dataset. By default this retrieves the file's content from the latest - view of the default branch - `master` for most enrollments. - - This endpoint currently does not support views (virtual datasets composed of other datasets). For more information, refer to the [views documentation](https://palantir.com/docs/foundry/data-integration/views). - - #### Advanced Usage - - See [Datasets Core Concepts](https://palantir.com/docs/foundry/data-integration/datasets/) for details on using branches and transactions. - - To **get a file's content from a specific Branch** specify the Branch's identifier as `branchId`. This will - retrieve the content for the most recent version of the file since the latest snapshot transaction, or the - earliest ancestor transaction of the branch if there are no snapshot transactions. - - To **get a file's content from the resolved view of a transaction** specify the Transaction's resource identifier - as `endTransactionRid`. This will retrieve the content for the most recent version of the file since the latest - snapshot transaction, or the earliest ancestor transaction if there are no snapshot transactions. - - To **get a file's content from the resolved view of a range of transactions** specify the the start transaction's - resource identifier as `startTransactionRid` and the end transaction's resource identifier as `endTransactionRid`. - This will retrieve the content for the most recent version of the file since the `startTransactionRid` up to the - `endTransactionRid`. Note that an intermediate snapshot transaction will remove all files from the view. Behavior - is undefined when the start and end transactions do not belong to the same root-to-leaf path. - - To **get a file's content from a specific transaction** specify the Transaction's resource identifier as both the - `startTransactionRid` and `endTransactionRid`. - - """ - result = client.datasets.Dataset.File.read( - dataset_rid=dataset_rid, - file_path=file_path, - branch_id=branch_id, - end_transaction_rid=end_transaction_rid, - start_transaction_rid=start_transaction_rid, - ) - click.echo(result) - - -@datasets_dataset_file.command("upload") -@click.argument("dataset_rid", type=str, required=True) -@click.argument("body", type=click.File("rb"), required=True) -@click.option( - "--file_path", type=str, required=True, help="""The File's path within the Dataset.""" -) -@click.option( - "--branch_id", - type=str, - required=False, - help="""The identifier (name) of the Branch on which to upload the File. Defaults to `master` for most enrollments.""", -) -@click.option( - "--transaction_rid", - type=str, - required=False, - help="""The Resource Identifier (RID) of the open Transaction on which to upload the File.""", -) -@click.option( - "--transaction_type", - type=click.Choice(["APPEND", "UPDATE", "SNAPSHOT", "DELETE"]), - required=False, - help="""The type of the Transaction to create when using branchId. Defaults to `UPDATE`.""", -) -@click.pass_obj -def datasets_dataset_file_op_upload( - client: FoundryClient, - dataset_rid: str, - body: io.BufferedReader, - file_path: str, - branch_id: typing.Optional[str], - transaction_rid: typing.Optional[str], - transaction_type: typing.Optional[typing.Literal["APPEND", "UPDATE", "SNAPSHOT", "DELETE"]], -): - """ - Uploads a File to an existing Dataset. - The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`. - - By default the file is uploaded to a new transaction on the default branch - `master` for most enrollments. - If the file already exists only the most recent version will be visible in the updated view. - - #### Advanced Usage - - See [Datasets Core Concepts](https://palantir.com/docs/foundry/data-integration/datasets/) for details on using branches and transactions. - - To **upload a file to a specific Branch** specify the Branch's identifier as `branchId`. A new transaction will - be created and committed on this branch. By default the TransactionType will be `UPDATE`, to override this - default specify `transactionType` in addition to `branchId`. - See [createBranch](https://palantir.com/docs/foundry/api/datasets-resources/branches/create-branch/) to create a custom branch. - - To **upload a file on a manually opened transaction** specify the Transaction's resource identifier as - `transactionRid`. This is useful for uploading multiple files in a single transaction. - See [createTransaction](https://palantir.com/docs/foundry/api/datasets-resources/transactions/create-transaction/) to open a transaction. - - """ - result = client.datasets.Dataset.File.upload( - dataset_rid=dataset_rid, - body=body.read(), - file_path=file_path, - branch_id=branch_id, - transaction_rid=transaction_rid, - transaction_type=transaction_type, - ) - click.echo(repr(result)) - - -@datasets_dataset.group("branch") -def datasets_dataset_branch(): - pass - - -@datasets_dataset_branch.command("create") -@click.argument("dataset_rid", type=str, required=True) -@click.option("--branch_id", type=str, required=True, help="""""") -@click.option("--transaction_rid", type=str, required=False, help="""""") -@click.pass_obj -def datasets_dataset_branch_op_create( - client: FoundryClient, - dataset_rid: str, - branch_id: str, - transaction_rid: typing.Optional[str], -): - """ - Creates a branch on an existing dataset. A branch may optionally point to a (committed) transaction. - - """ - result = client.datasets.Dataset.Branch.create( - dataset_rid=dataset_rid, - branch_id=branch_id, - transaction_rid=transaction_rid, - ) - click.echo(repr(result)) - - -@datasets_dataset_branch.command("delete") -@click.argument("dataset_rid", type=str, required=True) -@click.argument("branch_id", type=str, required=True) -@click.pass_obj -def datasets_dataset_branch_op_delete( - client: FoundryClient, - dataset_rid: str, - branch_id: str, -): - """ - Deletes the Branch with the given BranchId. - - """ - result = client.datasets.Dataset.Branch.delete( - dataset_rid=dataset_rid, - branch_id=branch_id, - ) - click.echo(repr(result)) - - -@datasets_dataset_branch.command("get") -@click.argument("dataset_rid", type=str, required=True) -@click.argument("branch_id", type=str, required=True) -@click.pass_obj -def datasets_dataset_branch_op_get( - client: FoundryClient, - dataset_rid: str, - branch_id: str, -): - """ - Get a Branch of a Dataset. - - """ - result = client.datasets.Dataset.Branch.get( - dataset_rid=dataset_rid, - branch_id=branch_id, - ) - click.echo(repr(result)) - - -@datasets_dataset_branch.command("list") -@click.argument("dataset_rid", type=str, required=True) -@click.option( - "--page_size", - type=int, - required=False, - help="""The desired size of the page to be returned. Defaults to 1,000. -See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. -""", -) -@click.option("--page_token", type=str, required=False, help="""""") -@click.pass_obj -def datasets_dataset_branch_op_list( - client: FoundryClient, - dataset_rid: str, - page_size: typing.Optional[int], - page_token: typing.Optional[str], -): - """ - Lists the Branches of a Dataset. - - """ - result = client.datasets.Dataset.Branch.list( - dataset_rid=dataset_rid, - page_size=page_size, - page_token=page_token, - ) - click.echo(repr(result)) - - -@cli.group("geo") -def geo(): - pass - - -@cli.group("ontologies") -def ontologies(): - pass - - -@ontologies.group("query") -def ontologies_query(): - pass - - -@ontologies_query.command("execute") -@click.argument("ontology_rid", type=str, required=True) -@click.argument("query_api_name", type=str, required=True) -@click.option("--parameters", type=str, required=True, help="""""") -@click.option( - "--attribution", - type=str, - required=False, - help="""The Attribution to be used when executing this request. -""", -) -@click.option( - "--trace_parent", - type=str, - required=False, - help="""The W3C trace parent header included in the request. -""", -) -@click.option( - "--trace_state", - type=str, - required=False, - help="""The W3C trace state header included in the request. -""", -) -@click.pass_obj -def ontologies_query_op_execute( - client: FoundryClient, - ontology_rid: str, - query_api_name: str, - parameters: str, - attribution: typing.Optional[str], - trace_parent: typing.Optional[str], - trace_state: typing.Optional[str], -): - """ - Executes a Query using the given parameters. Optional parameters do not need to be supplied. - - """ - result = client.ontologies.Query.execute( - ontology_rid=ontology_rid, - query_api_name=query_api_name, - parameters=json.loads(parameters), - attribution=attribution, - trace_parent=trace_parent, - trace_state=trace_state, - ) - click.echo(repr(result)) - - -@ontologies.group("ontology_object") -def ontologies_ontology_object(): - pass - - -@ontologies_ontology_object.command("aggregate") -@click.argument("ontology_rid", type=str, required=True) -@click.argument("object_type", type=str, required=True) -@click.option("--aggregation", type=str, required=True, help="""""") -@click.option("--group_by", type=str, required=True, help="""""") -@click.option("--query", type=str, required=False, help="""""") -@click.pass_obj -def ontologies_ontology_object_op_aggregate( - client: FoundryClient, - ontology_rid: str, - object_type: str, - aggregation: str, - group_by: str, - query: typing.Optional[str], -): - """ - Perform functions on object fields in the specified ontology and object type. - - """ - result = client.ontologies.OntologyObject.aggregate( - ontology_rid=ontology_rid, - object_type=object_type, - aggregation=json.loads(aggregation), - group_by=json.loads(group_by), - query=None if query is None else json.loads(query), - ) - click.echo(repr(result)) - - -@ontologies_ontology_object.command("get") -@click.argument("ontology_rid", type=str, required=True) -@click.argument("object_type", type=str, required=True) -@click.argument("primary_key", type=str, required=True) -@click.option( - "--properties", - type=str, - required=False, - help="""The properties of the object type that should be included in the response. Omit this parameter to get all -the properties. -""", -) -@click.pass_obj -def ontologies_ontology_object_op_get( - client: FoundryClient, - ontology_rid: str, - object_type: str, - primary_key: str, - properties: typing.Optional[str], -): - """ - Gets a specific object with the given primary key. - - """ - result = client.ontologies.OntologyObject.get( - ontology_rid=ontology_rid, - object_type=object_type, - primary_key=primary_key, - properties=None if properties is None else json.loads(properties), - ) - click.echo(repr(result)) - - -@ontologies_ontology_object.command("get_linked_object") -@click.argument("ontology_rid", type=str, required=True) -@click.argument("object_type", type=str, required=True) -@click.argument("primary_key", type=str, required=True) -@click.argument("link_type", type=str, required=True) -@click.argument("linked_object_primary_key", type=str, required=True) -@click.option( - "--properties", - type=str, - required=False, - help="""The properties of the object type that should be included in the response. Omit this parameter to get all -the properties. -""", -) -@click.pass_obj -def ontologies_ontology_object_op_get_linked_object( - client: FoundryClient, - ontology_rid: str, - object_type: str, - primary_key: str, - link_type: str, - linked_object_primary_key: str, - properties: typing.Optional[str], -): - """ - Get a specific linked object that originates from another object. If there is no link between the two objects, - LinkedObjectNotFound is thrown. - - """ - result = client.ontologies.OntologyObject.get_linked_object( - ontology_rid=ontology_rid, - object_type=object_type, - primary_key=primary_key, - link_type=link_type, - linked_object_primary_key=linked_object_primary_key, - properties=None if properties is None else json.loads(properties), - ) - click.echo(repr(result)) - - -@ontologies_ontology_object.command("list") -@click.argument("ontology_rid", type=str, required=True) -@click.argument("object_type", type=str, required=True) -@click.option("--order_by", type=str, required=False, help="""""") -@click.option( - "--page_size", - type=int, - required=False, - help="""The desired size of the page to be returned. Defaults to 1,000. -See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. -""", -) -@click.option("--page_token", type=str, required=False, help="""""") -@click.option( - "--properties", - type=str, - required=False, - help="""The properties of the object type that should be included in the response. Omit this parameter to get all -the properties. -""", -) -@click.pass_obj -def ontologies_ontology_object_op_list( - client: FoundryClient, - ontology_rid: str, - object_type: str, - order_by: typing.Optional[str], - page_size: typing.Optional[int], - page_token: typing.Optional[str], - properties: typing.Optional[str], -): - """ - Lists the objects for the given Ontology and object type. - - This endpoint supports filtering objects. - See the [Filtering Objects documentation](https://palantir.com/docs/foundry/api/ontology-resources/objects/ontology-object-basics#filter-objects) for details. - - Note that this endpoint does not guarantee consistency. Changes to the data could result in missing or - repeated objects in the response pages. - - For Object Storage V1 backed objects, this endpoint returns a maximum of 10,000 objects. After 10,000 objects have been returned and if more objects - are available, attempting to load another page will result in an `ObjectsExceededLimit` error being returned. There is no limit on Object Storage V2 backed objects. - - Each page may be smaller or larger than the requested page size. However, it - is guaranteed that if there are more results available, at least one result will be present - in the response. - - Note that null value properties will not be returned. - - """ - result = client.ontologies.OntologyObject.list( - ontology_rid=ontology_rid, - object_type=object_type, - order_by=order_by, - page_size=page_size, - page_token=page_token, - properties=None if properties is None else json.loads(properties), - ) - click.echo(repr(result)) - - -@ontologies_ontology_object.command("list_linked_objects") -@click.argument("ontology_rid", type=str, required=True) -@click.argument("object_type", type=str, required=True) -@click.argument("primary_key", type=str, required=True) -@click.argument("link_type", type=str, required=True) -@click.option("--order_by", type=str, required=False, help="""""") -@click.option( - "--page_size", - type=int, - required=False, - help="""The desired size of the page to be returned. Defaults to 1,000. -See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. -""", -) -@click.option("--page_token", type=str, required=False, help="""""") -@click.option( - "--properties", - type=str, - required=False, - help="""The properties of the object type that should be included in the response. Omit this parameter to get all -the properties. -""", -) -@click.pass_obj -def ontologies_ontology_object_op_list_linked_objects( - client: FoundryClient, - ontology_rid: str, - object_type: str, - primary_key: str, - link_type: str, - order_by: typing.Optional[str], - page_size: typing.Optional[int], - page_token: typing.Optional[str], - properties: typing.Optional[str], -): - """ - Lists the linked objects for a specific object and the given link type. - - This endpoint supports filtering objects. - See the [Filtering Objects documentation](https://palantir.com/docs/foundry/api/ontology-resources/objects/ontology-object-basics#filter-objects) for details. - - Note that this endpoint does not guarantee consistency. Changes to the data could result in missing or - repeated objects in the response pages. - - For Object Storage V1 backed objects, this endpoint returns a maximum of 10,000 objects. After 10,000 objects have been returned and if more objects - are available, attempting to load another page will result in an `ObjectsExceededLimit` error being returned. There is no limit on Object Storage V2 backed objects. - - Each page may be smaller or larger than the requested page size. However, it - is guaranteed that if there are more results available, at least one result will be present - in the response. - - Note that null value properties will not be returned. - - """ - result = client.ontologies.OntologyObject.list_linked_objects( - ontology_rid=ontology_rid, - object_type=object_type, - primary_key=primary_key, - link_type=link_type, - order_by=order_by, - page_size=page_size, - page_token=page_token, - properties=None if properties is None else json.loads(properties), - ) - click.echo(repr(result)) - - -@ontologies_ontology_object.command("search") -@click.argument("ontology_rid", type=str, required=True) -@click.argument("object_type", type=str, required=True) -@click.option( - "--fields", - type=str, - required=True, - help="""The API names of the object type properties to include in the response. -""", -) -@click.option("--query", type=str, required=True, help="""""") -@click.option("--order_by", type=str, required=False, help="""""") -@click.option("--page_size", type=int, required=False, help="""""") -@click.option("--page_token", type=str, required=False, help="""""") -@click.pass_obj -def ontologies_ontology_object_op_search( - client: FoundryClient, - ontology_rid: str, - object_type: str, - fields: str, - query: str, - order_by: typing.Optional[str], - page_size: typing.Optional[int], - page_token: typing.Optional[str], -): - """ - Search for objects in the specified ontology and object type. The request body is used - to filter objects based on the specified query. The supported queries are: - - | Query type | Description | Supported Types | - |----------|-----------------------------------------------------------------------------------|---------------------------------| - | lt | The provided property is less than the provided value. | number, string, date, timestamp | - | gt | The provided property is greater than the provided value. | number, string, date, timestamp | - | lte | The provided property is less than or equal to the provided value. | number, string, date, timestamp | - | gte | The provided property is greater than or equal to the provided value. | number, string, date, timestamp | - | eq | The provided property is exactly equal to the provided value. | number, string, date, timestamp | - | isNull | The provided property is (or is not) null. | all | - | contains | The provided property contains the provided value. | array | - | not | The sub-query does not match. | N/A (applied on a query) | - | and | All the sub-queries match. | N/A (applied on queries) | - | or | At least one of the sub-queries match. | N/A (applied on queries) | - | prefix | The provided property starts with the provided term. | string | - | phrase | The provided property contains the provided term as a substring. | string | - | anyTerm | The provided property contains at least one of the terms separated by whitespace. | string | - | allTerms | The provided property contains all the terms separated by whitespace. | string | - - Queries can be at most three levels deep. By default, terms are separated by whitespace or punctuation (`?!,:;-[](){}'"~`). Periods (`.`) on their own are ignored. - Partial terms are not matched by terms filters except where explicitly noted. - - """ - result = client.ontologies.OntologyObject.search( - ontology_rid=ontology_rid, - object_type=object_type, - fields=json.loads(fields), - query=json.loads(query), - order_by=None if order_by is None else json.loads(order_by), - page_size=page_size, - page_token=page_token, - ) - click.echo(repr(result)) - - -@ontologies.group("ontology") -def ontologies_ontology(): - pass - - -@ontologies_ontology.command("get") -@click.argument("ontology_rid", type=str, required=True) -@click.pass_obj -def ontologies_ontology_op_get( - client: FoundryClient, - ontology_rid: str, -): - """ - Gets a specific ontology with the given Ontology RID. - - """ - result = client.ontologies.Ontology.get( - ontology_rid=ontology_rid, - ) - click.echo(repr(result)) - - -@ontologies_ontology.command("list") -@click.pass_obj -def ontologies_ontology_op_list( - client: FoundryClient, -): - """ - Lists the Ontologies visible to the current user. - - """ - result = client.ontologies.Ontology.list() - click.echo(repr(result)) - - -@ontologies_ontology.group("query_type") -def ontologies_ontology_query_type(): - pass - - -@ontologies_ontology_query_type.command("get") -@click.argument("ontology_rid", type=str, required=True) -@click.argument("query_api_name", type=str, required=True) -@click.pass_obj -def ontologies_ontology_query_type_op_get( - client: FoundryClient, - ontology_rid: str, - query_api_name: str, -): - """ - Gets a specific query type with the given API name. - - """ - result = client.ontologies.Ontology.QueryType.get( - ontology_rid=ontology_rid, - query_api_name=query_api_name, - ) - click.echo(repr(result)) - - -@ontologies_ontology_query_type.command("list") -@click.argument("ontology_rid", type=str, required=True) -@click.option( - "--page_size", - type=int, - required=False, - help="""The desired size of the page to be returned. Defaults to 100. -See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. -""", -) -@click.option("--page_token", type=str, required=False, help="""""") -@click.pass_obj -def ontologies_ontology_query_type_op_list( - client: FoundryClient, - ontology_rid: str, - page_size: typing.Optional[int], - page_token: typing.Optional[str], -): - """ - Lists the query types for the given Ontology. - - Each page may be smaller than the requested page size. However, it is guaranteed that if there are more - results available, at least one result will be present in the response. - - """ - result = client.ontologies.Ontology.QueryType.list( - ontology_rid=ontology_rid, - page_size=page_size, - page_token=page_token, - ) - click.echo(repr(result)) - - -@ontologies_ontology.group("object_type") -def ontologies_ontology_object_type(): - pass - - -@ontologies_ontology_object_type.command("get") -@click.argument("ontology_rid", type=str, required=True) -@click.argument("object_type", type=str, required=True) -@click.pass_obj -def ontologies_ontology_object_type_op_get( - client: FoundryClient, - ontology_rid: str, - object_type: str, -): - """ - Gets a specific object type with the given API name. - - """ - result = client.ontologies.Ontology.ObjectType.get( - ontology_rid=ontology_rid, - object_type=object_type, - ) - click.echo(repr(result)) - - -@ontologies_ontology_object_type.command("get_outgoing_link_type") -@click.argument("ontology_rid", type=str, required=True) -@click.argument("object_type", type=str, required=True) -@click.argument("link_type", type=str, required=True) -@click.pass_obj -def ontologies_ontology_object_type_op_get_outgoing_link_type( - client: FoundryClient, - ontology_rid: str, - object_type: str, - link_type: str, -): - """ - Get an outgoing link for an object type. - - """ - result = client.ontologies.Ontology.ObjectType.get_outgoing_link_type( - ontology_rid=ontology_rid, - object_type=object_type, - link_type=link_type, - ) - click.echo(repr(result)) - - -@ontologies_ontology_object_type.command("list") -@click.argument("ontology_rid", type=str, required=True) -@click.option( - "--page_size", - type=int, - required=False, - help="""The desired size of the page to be returned. Defaults to 500. -See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. -""", -) -@click.option("--page_token", type=str, required=False, help="""""") -@click.pass_obj -def ontologies_ontology_object_type_op_list( - client: FoundryClient, - ontology_rid: str, - page_size: typing.Optional[int], - page_token: typing.Optional[str], -): - """ - Lists the object types for the given Ontology. - - Each page may be smaller or larger than the requested page size. However, it is guaranteed that if there are - more results available, at least one result will be present in the - response. - - """ - result = client.ontologies.Ontology.ObjectType.list( - ontology_rid=ontology_rid, - page_size=page_size, - page_token=page_token, - ) - click.echo(repr(result)) - - -@ontologies_ontology_object_type.command("list_outgoing_link_types") -@click.argument("ontology_rid", type=str, required=True) -@click.argument("object_type", type=str, required=True) -@click.option( - "--page_size", type=int, required=False, help="""The desired size of the page to be returned.""" -) -@click.option("--page_token", type=str, required=False, help="""""") -@click.pass_obj -def ontologies_ontology_object_type_op_list_outgoing_link_types( - client: FoundryClient, - ontology_rid: str, - object_type: str, - page_size: typing.Optional[int], - page_token: typing.Optional[str], -): - """ - List the outgoing links for an object type. - - """ - result = client.ontologies.Ontology.ObjectType.list_outgoing_link_types( - ontology_rid=ontology_rid, - object_type=object_type, - page_size=page_size, - page_token=page_token, - ) - click.echo(repr(result)) - - -@ontologies_ontology.group("action_type") -def ontologies_ontology_action_type(): - pass - - -@ontologies_ontology_action_type.command("get") -@click.argument("ontology_rid", type=str, required=True) -@click.argument("action_type_api_name", type=str, required=True) -@click.pass_obj -def ontologies_ontology_action_type_op_get( - client: FoundryClient, - ontology_rid: str, - action_type_api_name: str, -): - """ - Gets a specific action type with the given API name. - - """ - result = client.ontologies.Ontology.ActionType.get( - ontology_rid=ontology_rid, - action_type_api_name=action_type_api_name, - ) - click.echo(repr(result)) - - -@ontologies_ontology_action_type.command("list") -@click.argument("ontology_rid", type=str, required=True) -@click.option( - "--page_size", - type=int, - required=False, - help="""The desired size of the page to be returned. Defaults to 500. -See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. -""", -) -@click.option("--page_token", type=str, required=False, help="""""") -@click.pass_obj -def ontologies_ontology_action_type_op_list( - client: FoundryClient, - ontology_rid: str, - page_size: typing.Optional[int], - page_token: typing.Optional[str], -): - """ - Lists the action types for the given Ontology. - - Each page may be smaller than the requested page size. However, it is guaranteed that if there are more - results available, at least one result will be present in the response. - - """ - result = client.ontologies.Ontology.ActionType.list( - ontology_rid=ontology_rid, - page_size=page_size, - page_token=page_token, - ) - click.echo(repr(result)) - - -@ontologies.group("attachment") -def ontologies_attachment(): - pass - - -@ontologies_attachment.command("get") -@click.argument("attachment_rid", type=str, required=True) -@click.pass_obj -def ontologies_attachment_op_get( - client: FoundryClient, - attachment_rid: str, -): - """ - Get the metadata of an attachment. - - """ - result = client.ontologies.Attachment.get( - attachment_rid=attachment_rid, - ) - click.echo(repr(result)) - - -@ontologies_attachment.command("read") -@click.argument("attachment_rid", type=str, required=True) -@click.pass_obj -def ontologies_attachment_op_read( - client: FoundryClient, - attachment_rid: str, -): - """ - Get the content of an attachment. - - """ - result = client.ontologies.Attachment.read( - attachment_rid=attachment_rid, - ) - click.echo(result) - - -@ontologies_attachment.command("upload") -@click.argument("body", type=click.File("rb"), required=True) -@click.option( - "--content_length", - type=int, - required=True, - help="""The size in bytes of the file content being uploaded.""", -) -@click.option( - "--content_type", type=str, required=True, help="""The media type of the file being uploaded.""" -) -@click.option( - "--filename", type=str, required=True, help="""The name of the file being uploaded.""" -) -@click.pass_obj -def ontologies_attachment_op_upload( - client: FoundryClient, - body: io.BufferedReader, - content_length: int, - content_type: str, - filename: str, -): - """ - Upload an attachment to use in an action. Any attachment which has not been linked to an object via - an action within one hour after upload will be removed. - Previously mapped attachments which are not connected to any object anymore are also removed on - a biweekly basis. - The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`. - - """ - result = client.ontologies.Attachment.upload( - body=body.read(), - content_length=content_length, - content_type=content_type, - filename=filename, - ) - click.echo(repr(result)) - - -@ontologies.group("action") -def ontologies_action(): - pass - - -@ontologies_action.command("apply") -@click.argument("ontology_rid", type=str, required=True) -@click.argument("action_type", type=str, required=True) -@click.option("--parameters", type=str, required=True, help="""""") -@click.pass_obj -def ontologies_action_op_apply( - client: FoundryClient, - ontology_rid: str, - action_type: str, - parameters: str, -): - """ - Applies an action using the given parameters. - - Changes to objects or links stored in Object Storage V1 are eventually consistent and may take some time to be visible. - Edits to objects or links in Object Storage V2 will be visible immediately after the action completes. - - Note that [parameter default values](https://palantir.com/docs/foundry/action-types/parameters-default-value/) are not currently supported by - this endpoint. - - """ - result = client.ontologies.Action.apply( - ontology_rid=ontology_rid, - action_type=action_type, - parameters=json.loads(parameters), - ) - click.echo(repr(result)) - - -@ontologies_action.command("apply_batch") -@click.argument("ontology_rid", type=str, required=True) -@click.argument("action_type", type=str, required=True) -@click.option("--requests", type=str, required=True, help="""""") -@click.pass_obj -def ontologies_action_op_apply_batch( - client: FoundryClient, - ontology_rid: str, - action_type: str, - requests: str, -): - """ - Applies multiple actions (of the same Action Type) using the given parameters. - Changes to objects or links stored in Object Storage V1 are eventually consistent and may take some time to be visible. - Edits to objects or links in Object Storage V2 will be visible immediately after the action completes. - - Up to 20 actions may be applied in one call. Actions that only modify objects in Object Storage v2 and do not - call Functions may receive a higher limit. - - Note that [parameter default values](https://palantir.com/docs/foundry/action-types/parameters-default-value/) and - [notifications](https://palantir.com/docs/foundry/action-types/notifications/) are not currently supported by this endpoint. - - """ - result = client.ontologies.Action.apply_batch( - ontology_rid=ontology_rid, - action_type=action_type, - requests=json.loads(requests), - ) - click.echo(repr(result)) - - -@ontologies_action.command("validate") -@click.argument("ontology_rid", type=str, required=True) -@click.argument("action_type", type=str, required=True) -@click.option("--parameters", type=str, required=True, help="""""") -@click.pass_obj -def ontologies_action_op_validate( - client: FoundryClient, - ontology_rid: str, - action_type: str, - parameters: str, -): - """ - Validates if an action can be run with the given set of parameters. - The response contains the evaluation of parameters and **submission criteria** - that determine if the request is `VALID` or `INVALID`. - For performance reasons, validations will not consider existing objects or other data in Foundry. - For example, the uniqueness of a primary key or the existence of a user ID will not be checked. - Note that [parameter default values](https://palantir.com/docs/foundry/action-types/parameters-default-value/) are not currently supported by - this endpoint. Unspecified parameters will be given a default value of `null`. - - """ - result = client.ontologies.Action.validate( - ontology_rid=ontology_rid, - action_type=action_type, - parameters=json.loads(parameters), - ) - click.echo(repr(result)) - - -if __name__ == "__main__": - cli() diff --git a/foundry_sdk/v1/client.py b/foundry_sdk/v1/client.py deleted file mode 100644 index 19b046cfb..000000000 --- a/foundry_sdk/v1/client.py +++ /dev/null @@ -1,84 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing - -from foundry_sdk import _core as core -from foundry_sdk._core.client_init_helpers import ( - get_hostname_from_context_or_environment_vars, -) # NOQA -from foundry_sdk._core.client_init_helpers import ( - get_user_token_auth_from_context_or_environment_vars, -) # NOQA - - -class FoundryClient: - """ - The Foundry V1 API client. - - :param auth: Required. Your auth configuration. - :param hostname: Required. Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: typing.Optional[core.Auth] = None, - hostname: typing.Optional[str] = None, - config: typing.Optional[core.Config] = None, - ): - if auth is None: - auth = get_user_token_auth_from_context_or_environment_vars() - if hostname is None: - hostname = get_hostname_from_context_or_environment_vars() - - from foundry_sdk.v1.datasets._client import DatasetsClient - from foundry_sdk.v1.ontologies._client import OntologiesClient - - self.datasets = DatasetsClient(auth=auth, hostname=hostname, config=config) - self.ontologies = OntologiesClient(auth=auth, hostname=hostname, config=config) - - -class AsyncFoundryClient: - """ - The Async Foundry V1 API client. - - :param auth: Required. Your auth configuration. - :param hostname: Required. Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: typing.Optional[core.Auth] = None, - hostname: typing.Optional[str] = None, - config: typing.Optional[core.Config] = None, - preview: bool = False, - ): - if not preview: - raise ValueError( - "The AsyncFoundryClient client is in beta. " - "Please set the preview parameter to True to use it." - ) - if auth is None: - auth = get_user_token_auth_from_context_or_environment_vars() - if hostname is None: - hostname = get_hostname_from_context_or_environment_vars() - - from foundry_sdk.v1.datasets._client import AsyncDatasetsClient - from foundry_sdk.v1.ontologies._client import AsyncOntologiesClient - - self.datasets = AsyncDatasetsClient(auth=auth, hostname=hostname, config=config) - self.ontologies = AsyncOntologiesClient(auth=auth, hostname=hostname, config=config) diff --git a/foundry_sdk/v1/core/errors.py b/foundry_sdk/v1/core/errors.py deleted file mode 100644 index 9d69112e9..000000000 --- a/foundry_sdk/v1/core/errors.py +++ /dev/null @@ -1,204 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing -from dataclasses import dataclass - -import typing_extensions - -from foundry_sdk import _errors as errors -from foundry_sdk.v1.core import models as core_models - - -class ApiFeaturePreviewUsageOnlyParameters(typing_extensions.TypedDict): - """ - This feature is only supported in preview mode. Please use `preview=true` in the query - parameters to call this endpoint. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class ApiFeaturePreviewUsageOnly(errors.BadRequestError): - name: typing.Literal["ApiFeaturePreviewUsageOnly"] - parameters: ApiFeaturePreviewUsageOnlyParameters - error_instance_id: str - - -class ApiUsageDeniedParameters(typing_extensions.TypedDict): - """You are not allowed to use Palantir APIs.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - missingScope: typing_extensions.NotRequired[core_models.OperationScope] - - -@dataclass -class ApiUsageDenied(errors.PermissionDeniedError): - name: typing.Literal["ApiUsageDenied"] - parameters: ApiUsageDeniedParameters - error_instance_id: str - - -class FolderNotFoundParameters(typing_extensions.TypedDict): - """The requested folder could not be found, or the client token does not have access to it.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - folderRid: core_models.FolderRid - - -@dataclass -class FolderNotFound(errors.NotFoundError): - name: typing.Literal["FolderNotFound"] - parameters: FolderNotFoundParameters - error_instance_id: str - - -class FoundryBranchNotFoundParameters(typing_extensions.TypedDict): - """The requested foundry branch could not be found, or the client token does not have access to it.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - branch: core_models.FoundryBranch - - -@dataclass -class FoundryBranchNotFound(errors.NotFoundError): - name: typing.Literal["FoundryBranchNotFound"] - parameters: FoundryBranchNotFoundParameters - error_instance_id: str - - -class InvalidFilePathParameters(typing_extensions.TypedDict): - """The provided file path is not valid.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - filePath: core_models.FilePath - - -@dataclass -class InvalidFilePath(errors.BadRequestError): - name: typing.Literal["InvalidFilePath"] - parameters: InvalidFilePathParameters - error_instance_id: str - - -class InvalidPageSizeParameters(typing_extensions.TypedDict): - """The provided page size was zero or negative. Page sizes must be greater than zero.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - pageSize: core_models.PageSize - - -@dataclass -class InvalidPageSize(errors.BadRequestError): - name: typing.Literal["InvalidPageSize"] - parameters: InvalidPageSizeParameters - error_instance_id: str - - -class InvalidPageTokenParameters(typing_extensions.TypedDict): - """The provided page token could not be used to retrieve the next page of results.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - pageToken: core_models.PageToken - - -@dataclass -class InvalidPageToken(errors.BadRequestError): - name: typing.Literal["InvalidPageToken"] - parameters: InvalidPageTokenParameters - error_instance_id: str - - -class InvalidParameterCombinationParameters(typing_extensions.TypedDict): - """The given parameters are individually valid but cannot be used in the given combination.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - validCombinations: typing.List[typing.List[str]] - providedParameters: typing.List[str] - - -@dataclass -class InvalidParameterCombination(errors.BadRequestError): - name: typing.Literal["InvalidParameterCombination"] - parameters: InvalidParameterCombinationParameters - error_instance_id: str - - -class MissingPostBodyParameters(typing_extensions.TypedDict): - """A post body is required for this endpoint, but was not found in the request.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class MissingPostBody(errors.BadRequestError): - name: typing.Literal["MissingPostBody"] - parameters: MissingPostBodyParameters - error_instance_id: str - - -class ResourceNameAlreadyExistsParameters(typing_extensions.TypedDict): - """The provided resource name is already in use by another resource in the same folder.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - parentFolderRid: core_models.FolderRid - resourceName: str - - -@dataclass -class ResourceNameAlreadyExists(errors.ConflictError): - name: typing.Literal["ResourceNameAlreadyExists"] - parameters: ResourceNameAlreadyExistsParameters - error_instance_id: str - - -class UnknownDistanceUnitParameters(typing_extensions.TypedDict): - """An unknown distance unit was provided.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - unknownUnit: str - knownUnits: typing.List[core_models.DistanceUnit] - - -@dataclass -class UnknownDistanceUnit(errors.BadRequestError): - name: typing.Literal["UnknownDistanceUnit"] - parameters: UnknownDistanceUnitParameters - error_instance_id: str - - -__all__ = [ - "ApiFeaturePreviewUsageOnly", - "ApiUsageDenied", - "FolderNotFound", - "FoundryBranchNotFound", - "InvalidFilePath", - "InvalidPageSize", - "InvalidPageToken", - "InvalidParameterCombination", - "MissingPostBody", - "ResourceNameAlreadyExists", - "UnknownDistanceUnit", -] diff --git a/foundry_sdk/v1/core/models.py b/foundry_sdk/v1/core/models.py deleted file mode 100644 index 8931ecd22..000000000 --- a/foundry_sdk/v1/core/models.py +++ /dev/null @@ -1,279 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -from __future__ import annotations - -import typing - -import pydantic - -from foundry_sdk import _core as core - - -class AnyType(core.ModelBase): - """AnyType""" - - type: typing.Literal["any"] = "any" - - -class AttachmentType(core.ModelBase): - """AttachmentType""" - - type: typing.Literal["attachment"] = "attachment" - - -Attribution = str -"""Attribution for a request""" - - -class BinaryType(core.ModelBase): - """BinaryType""" - - type: typing.Literal["binary"] = "binary" - - -class BooleanType(core.ModelBase): - """BooleanType""" - - type: typing.Literal["boolean"] = "boolean" - - -class ByteType(core.ModelBase): - """ByteType""" - - type: typing.Literal["byte"] = "byte" - - -class CipherTextType(core.ModelBase): - """CipherTextType""" - - default_cipher_channel: typing.Optional[str] = pydantic.Field(alias=str("defaultCipherChannel"), default=None) # type: ignore[literal-required] - """An optional Cipher Channel RID which can be used for encryption updates to empty values.""" - - type: typing.Literal["cipherText"] = "cipherText" - - -ContentLength = core.Long -"""ContentLength""" - - -ContentType = str -"""ContentType""" - - -class DateType(core.ModelBase): - """DateType""" - - type: typing.Literal["date"] = "date" - - -class DecimalType(core.ModelBase): - """DecimalType""" - - precision: typing.Optional[int] = None - """The total number of digits of the Decimal type. The maximum value is 38.""" - - scale: typing.Optional[int] = None - """The number of digits to the right of the decimal point. The maximum value is 38.""" - - type: typing.Literal["decimal"] = "decimal" - - -DisplayName = str -"""The display name of the entity.""" - - -DistanceUnit = typing.Literal[ - "MILLIMETERS", - "CENTIMETERS", - "METERS", - "KILOMETERS", - "INCHES", - "FEET", - "YARDS", - "MILES", - "NAUTICAL_MILES", -] -"""DistanceUnit""" - - -class DoubleType(core.ModelBase): - """DoubleType""" - - type: typing.Literal["double"] = "double" - - -FilePath = str -"""The path to a File within Foundry. Examples: `my-file.txt`, `path/to/my-file.jpg`, `dataframe.snappy.parquet`.""" - - -Filename = str -"""The name of a File within Foundry. Examples: `my-file.txt`, `my-file.jpg`, `dataframe.snappy.parquet`.""" - - -class FloatType(core.ModelBase): - """FloatType""" - - type: typing.Literal["float"] = "float" - - -FolderRid = core.RID -"""FolderRid""" - - -FoundryBranch = str -"""The Foundry branch identifier, specifically its rid. Different identifier types may be used in the future as values.""" - - -class IntegerType(core.ModelBase): - """IntegerType""" - - type: typing.Literal["integer"] = "integer" - - -class LongType(core.ModelBase): - """LongType""" - - type: typing.Literal["long"] = "long" - - -class MarkingType(core.ModelBase): - """MarkingType""" - - type: typing.Literal["marking"] = "marking" - - -MediaType = str -""" -The [media type](https://www.iana.org/assignments/media-types/media-types.xhtml) of the file or attachment. -Examples: `application/json`, `application/pdf`, `application/octet-stream`, `image/jpeg` -""" - - -class NullType(core.ModelBase): - """NullType""" - - type: typing.Literal["null"] = "null" - - -OperationScope = str -"""OperationScope""" - - -PageSize = int -"""The page size to use for the endpoint.""" - - -PageToken = str -""" -The page token indicates where to start paging. This should be omitted from the first page's request. -To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response -and use it to populate the `pageToken` field of the next request. -""" - - -PreviewMode = bool -"""Enables the use of preview functionality.""" - - -ReleaseStatus = typing.Literal["ACTIVE", "ENDORSED", "EXPERIMENTAL", "DEPRECATED"] -"""The release status of the entity.""" - - -class ShortType(core.ModelBase): - """ShortType""" - - type: typing.Literal["short"] = "short" - - -SizeBytes = core.Long -"""The size of the file or attachment in bytes.""" - - -class StringType(core.ModelBase): - """StringType""" - - type: typing.Literal["string"] = "string" - - -StructFieldName = str -"""The name of a field in a `Struct`.""" - - -class TimestampType(core.ModelBase): - """TimestampType""" - - type: typing.Literal["timestamp"] = "timestamp" - - -TotalCount = core.Long -"""The total number of items across all pages.""" - - -TraceParent = str -"""The W3C Trace Context `traceparent` header value used to propagate distributed tracing information for Foundry telemetry. See https://www.w3.org/TR/trace-context/#traceparent-header for more details. Note the 16 byte trace ID encoded in the header must be derived from a time based uuid to be used within Foundry.""" - - -TraceState = str -"""The W3C Trace Context `tracestate` header value, which is used to propagate vendor specific distributed tracing information for Foundry telemetry. See https://www.w3.org/TR/trace-context/#tracestate-header for more details.""" - - -class UnsupportedType(core.ModelBase): - """UnsupportedType""" - - unsupported_type: str = pydantic.Field(alias=str("unsupportedType")) # type: ignore[literal-required] - type: typing.Literal["unsupported"] = "unsupported" - - -__all__ = [ - "AnyType", - "AttachmentType", - "Attribution", - "BinaryType", - "BooleanType", - "ByteType", - "CipherTextType", - "ContentLength", - "ContentType", - "DateType", - "DecimalType", - "DisplayName", - "DistanceUnit", - "DoubleType", - "FilePath", - "Filename", - "FloatType", - "FolderRid", - "FoundryBranch", - "IntegerType", - "LongType", - "MarkingType", - "MediaType", - "NullType", - "OperationScope", - "PageSize", - "PageToken", - "PreviewMode", - "ReleaseStatus", - "ShortType", - "SizeBytes", - "StringType", - "StructFieldName", - "TimestampType", - "TotalCount", - "TraceParent", - "TraceState", - "UnsupportedType", -] diff --git a/foundry_sdk/v1/datasets/__init__.py b/foundry_sdk/v1/datasets/__init__.py deleted file mode 100644 index f1688463c..000000000 --- a/foundry_sdk/v1/datasets/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -from foundry_sdk.v1.datasets._client import AsyncDatasetsClient -from foundry_sdk.v1.datasets._client import DatasetsClient - -__all__ = [ - "DatasetsClient", - "AsyncDatasetsClient", -] diff --git a/foundry_sdk/v1/datasets/_client.py b/foundry_sdk/v1/datasets/_client.py deleted file mode 100644 index a17b284d5..000000000 --- a/foundry_sdk/v1/datasets/_client.py +++ /dev/null @@ -1,69 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing -from functools import cached_property - -from foundry_sdk import _core as core - - -class DatasetsClient: - """ - The API client for the Datasets Namespace. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - - @cached_property - def Dataset(self): - from foundry_sdk.v1.datasets.dataset import DatasetClient - - return DatasetClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - -class AsyncDatasetsClient: - """ - The Async API client for the Datasets Namespace. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - from foundry_sdk.v1.datasets.dataset import AsyncDatasetClient - - self.Dataset = AsyncDatasetClient(auth=auth, hostname=hostname, config=config) diff --git a/foundry_sdk/v1/datasets/branch.py b/foundry_sdk/v1/datasets/branch.py deleted file mode 100644 index 3199247e8..000000000 --- a/foundry_sdk/v1/datasets/branch.py +++ /dev/null @@ -1,559 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing - -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v1.core import models as core_models -from foundry_sdk.v1.datasets import errors as datasets_errors -from foundry_sdk.v1.datasets import models as datasets_models - - -class BranchClient: - """ - The API client for the Branch Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _BranchClientStreaming(self) - self.with_raw_response = _BranchClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def create( - self, - dataset_rid: datasets_models.DatasetRid, - *, - branch_id: datasets_models.BranchId, - transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> datasets_models.Branch: - """ - Creates a branch on an existing dataset. A branch may optionally point to a (committed) transaction. - - :param dataset_rid: The Resource Identifier (RID) of the Dataset on which to create the Branch. - :type dataset_rid: DatasetRid - :param branch_id: - :type branch_id: BranchId - :param transaction_rid: - :type transaction_rid: Optional[TransactionRid] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: datasets_models.Branch - - :raises BranchAlreadyExists: The branch cannot be created because a branch with that name already exists. - :raises CreateBranchPermissionDenied: The provided token does not have permission to create a branch of this dataset. - :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. - :raises InvalidBranchId: The requested branch name cannot be used. Branch names cannot be empty and must not look like RIDs or UUIDs. - :raises TransactionNotCommitted: The given transaction has not been committed. - :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v1/datasets/{datasetRid}/branches", - query_params={}, - path_params={ - "datasetRid": dataset_rid, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=datasets_models.CreateBranchRequest( - branch_id=branch_id, - transaction_rid=transaction_rid, - ), - response_type=datasets_models.Branch, - request_timeout=request_timeout, - throwable_errors={ - "BranchAlreadyExists": datasets_errors.BranchAlreadyExists, - "CreateBranchPermissionDenied": datasets_errors.CreateBranchPermissionDenied, - "DatasetNotFound": datasets_errors.DatasetNotFound, - "InvalidBranchId": datasets_errors.InvalidBranchId, - "TransactionNotCommitted": datasets_errors.TransactionNotCommitted, - "TransactionNotFound": datasets_errors.TransactionNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def delete( - self, - dataset_rid: datasets_models.DatasetRid, - branch_id: datasets_models.BranchId, - *, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> None: - """ - Deletes the Branch with the given BranchId. - - :param dataset_rid: The Resource Identifier (RID) of the Dataset that contains the Branch. - :type dataset_rid: DatasetRid - :param branch_id: The identifier (name) of the Branch. - :type branch_id: BranchId - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: None - - :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. - :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. - :raises DeleteBranchPermissionDenied: The provided token does not have permission to delete the given branch from this dataset. - :raises InvalidBranchId: The requested branch name cannot be used. Branch names cannot be empty and must not look like RIDs or UUIDs. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="DELETE", - resource_path="/v1/datasets/{datasetRid}/branches/{branchId}", - query_params={}, - path_params={ - "datasetRid": dataset_rid, - "branchId": branch_id, - }, - header_params={}, - body=None, - response_type=None, - request_timeout=request_timeout, - throwable_errors={ - "BranchNotFound": datasets_errors.BranchNotFound, - "DatasetNotFound": datasets_errors.DatasetNotFound, - "DeleteBranchPermissionDenied": datasets_errors.DeleteBranchPermissionDenied, - "InvalidBranchId": datasets_errors.InvalidBranchId, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - dataset_rid: datasets_models.DatasetRid, - branch_id: datasets_models.BranchId, - *, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> datasets_models.Branch: - """ - Get a Branch of a Dataset. - - :param dataset_rid: The Resource Identifier (RID) of the Dataset that contains the Branch. - :type dataset_rid: DatasetRid - :param branch_id: The identifier (name) of the Branch. - :type branch_id: BranchId - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: datasets_models.Branch - - :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. - :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v1/datasets/{datasetRid}/branches/{branchId}", - query_params={}, - path_params={ - "datasetRid": dataset_rid, - "branchId": branch_id, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=datasets_models.Branch, - request_timeout=request_timeout, - throwable_errors={ - "BranchNotFound": datasets_errors.BranchNotFound, - "DatasetNotFound": datasets_errors.DatasetNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def list( - self, - dataset_rid: datasets_models.DatasetRid, - *, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.ResourceIterator[datasets_models.Branch]: - """ - Lists the Branches of a Dataset. - - :param dataset_rid: The Resource Identifier (RID) of the Dataset on which to list Branches. - :type dataset_rid: DatasetRid - :param page_size: The desired size of the page to be returned. Defaults to 1,000. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. - :type page_size: Optional[PageSize] - :param page_token: - :type page_token: Optional[PageToken] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.ResourceIterator[datasets_models.Branch] - - :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v1/datasets/{datasetRid}/branches", - query_params={ - "pageSize": page_size, - "pageToken": page_token, - }, - path_params={ - "datasetRid": dataset_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=datasets_models.ListBranchesResponse, - request_timeout=request_timeout, - throwable_errors={ - "DatasetNotFound": datasets_errors.DatasetNotFound, - }, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - -class _BranchClientRaw: - def __init__(self, client: BranchClient) -> None: - def create(_: datasets_models.Branch): ... - def delete(_: None): ... - def get(_: datasets_models.Branch): ... - def list(_: datasets_models.ListBranchesResponse): ... - - self.create = core.with_raw_response(create, client.create) - self.delete = core.with_raw_response(delete, client.delete) - self.get = core.with_raw_response(get, client.get) - self.list = core.with_raw_response(list, client.list) - - -class _BranchClientStreaming: - def __init__(self, client: BranchClient) -> None: - def create(_: datasets_models.Branch): ... - def get(_: datasets_models.Branch): ... - def list(_: datasets_models.ListBranchesResponse): ... - - self.create = core.with_streaming_response(create, client.create) - self.get = core.with_streaming_response(get, client.get) - self.list = core.with_streaming_response(list, client.list) - - -class AsyncBranchClient: - """ - The API client for the Branch Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AsyncBranchClientStreaming(self) - self.with_raw_response = _AsyncBranchClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def create( - self, - dataset_rid: datasets_models.DatasetRid, - *, - branch_id: datasets_models.BranchId, - transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[datasets_models.Branch]: - """ - Creates a branch on an existing dataset. A branch may optionally point to a (committed) transaction. - - :param dataset_rid: The Resource Identifier (RID) of the Dataset on which to create the Branch. - :type dataset_rid: DatasetRid - :param branch_id: - :type branch_id: BranchId - :param transaction_rid: - :type transaction_rid: Optional[TransactionRid] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[datasets_models.Branch] - - :raises BranchAlreadyExists: The branch cannot be created because a branch with that name already exists. - :raises CreateBranchPermissionDenied: The provided token does not have permission to create a branch of this dataset. - :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. - :raises InvalidBranchId: The requested branch name cannot be used. Branch names cannot be empty and must not look like RIDs or UUIDs. - :raises TransactionNotCommitted: The given transaction has not been committed. - :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v1/datasets/{datasetRid}/branches", - query_params={}, - path_params={ - "datasetRid": dataset_rid, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=datasets_models.CreateBranchRequest( - branch_id=branch_id, - transaction_rid=transaction_rid, - ), - response_type=datasets_models.Branch, - request_timeout=request_timeout, - throwable_errors={ - "BranchAlreadyExists": datasets_errors.BranchAlreadyExists, - "CreateBranchPermissionDenied": datasets_errors.CreateBranchPermissionDenied, - "DatasetNotFound": datasets_errors.DatasetNotFound, - "InvalidBranchId": datasets_errors.InvalidBranchId, - "TransactionNotCommitted": datasets_errors.TransactionNotCommitted, - "TransactionNotFound": datasets_errors.TransactionNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def delete( - self, - dataset_rid: datasets_models.DatasetRid, - branch_id: datasets_models.BranchId, - *, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[None]: - """ - Deletes the Branch with the given BranchId. - - :param dataset_rid: The Resource Identifier (RID) of the Dataset that contains the Branch. - :type dataset_rid: DatasetRid - :param branch_id: The identifier (name) of the Branch. - :type branch_id: BranchId - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[None] - - :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. - :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. - :raises DeleteBranchPermissionDenied: The provided token does not have permission to delete the given branch from this dataset. - :raises InvalidBranchId: The requested branch name cannot be used. Branch names cannot be empty and must not look like RIDs or UUIDs. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="DELETE", - resource_path="/v1/datasets/{datasetRid}/branches/{branchId}", - query_params={}, - path_params={ - "datasetRid": dataset_rid, - "branchId": branch_id, - }, - header_params={}, - body=None, - response_type=None, - request_timeout=request_timeout, - throwable_errors={ - "BranchNotFound": datasets_errors.BranchNotFound, - "DatasetNotFound": datasets_errors.DatasetNotFound, - "DeleteBranchPermissionDenied": datasets_errors.DeleteBranchPermissionDenied, - "InvalidBranchId": datasets_errors.InvalidBranchId, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - dataset_rid: datasets_models.DatasetRid, - branch_id: datasets_models.BranchId, - *, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[datasets_models.Branch]: - """ - Get a Branch of a Dataset. - - :param dataset_rid: The Resource Identifier (RID) of the Dataset that contains the Branch. - :type dataset_rid: DatasetRid - :param branch_id: The identifier (name) of the Branch. - :type branch_id: BranchId - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[datasets_models.Branch] - - :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. - :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v1/datasets/{datasetRid}/branches/{branchId}", - query_params={}, - path_params={ - "datasetRid": dataset_rid, - "branchId": branch_id, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=datasets_models.Branch, - request_timeout=request_timeout, - throwable_errors={ - "BranchNotFound": datasets_errors.BranchNotFound, - "DatasetNotFound": datasets_errors.DatasetNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def list( - self, - dataset_rid: datasets_models.DatasetRid, - *, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.AsyncResourceIterator[datasets_models.Branch]: - """ - Lists the Branches of a Dataset. - - :param dataset_rid: The Resource Identifier (RID) of the Dataset on which to list Branches. - :type dataset_rid: DatasetRid - :param page_size: The desired size of the page to be returned. Defaults to 1,000. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. - :type page_size: Optional[PageSize] - :param page_token: - :type page_token: Optional[PageToken] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.AsyncResourceIterator[datasets_models.Branch] - - :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v1/datasets/{datasetRid}/branches", - query_params={ - "pageSize": page_size, - "pageToken": page_token, - }, - path_params={ - "datasetRid": dataset_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=datasets_models.ListBranchesResponse, - request_timeout=request_timeout, - throwable_errors={ - "DatasetNotFound": datasets_errors.DatasetNotFound, - }, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - -class _AsyncBranchClientRaw: - def __init__(self, client: AsyncBranchClient) -> None: - def create(_: datasets_models.Branch): ... - def delete(_: None): ... - def get(_: datasets_models.Branch): ... - def list(_: datasets_models.ListBranchesResponse): ... - - self.create = core.async_with_raw_response(create, client.create) - self.delete = core.async_with_raw_response(delete, client.delete) - self.get = core.async_with_raw_response(get, client.get) - self.list = core.async_with_raw_response(list, client.list) - - -class _AsyncBranchClientStreaming: - def __init__(self, client: AsyncBranchClient) -> None: - def create(_: datasets_models.Branch): ... - def get(_: datasets_models.Branch): ... - def list(_: datasets_models.ListBranchesResponse): ... - - self.create = core.async_with_streaming_response(create, client.create) - self.get = core.async_with_streaming_response(get, client.get) - self.list = core.async_with_streaming_response(list, client.list) diff --git a/foundry_sdk/v1/datasets/dataset.py b/foundry_sdk/v1/datasets/dataset.py deleted file mode 100644 index 025487a4a..000000000 --- a/foundry_sdk/v1/datasets/dataset.py +++ /dev/null @@ -1,983 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing -from functools import cached_property - -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v1.core import errors as core_errors -from foundry_sdk.v1.core import models as core_models -from foundry_sdk.v1.datasets import errors as datasets_errors -from foundry_sdk.v1.datasets import models as datasets_models - - -class DatasetClient: - """ - The API client for the Dataset Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _DatasetClientStreaming(self) - self.with_raw_response = _DatasetClientRaw(self) - - @cached_property - def Branch(self): - from foundry_sdk.v1.datasets.branch import BranchClient - - return BranchClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @cached_property - def File(self): - from foundry_sdk.v1.datasets.file import FileClient - - return FileClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @cached_property - def Transaction(self): - from foundry_sdk.v1.datasets.transaction import TransactionClient - - return TransactionClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def create( - self, - *, - name: datasets_models.DatasetName, - parent_folder_rid: core_models.FolderRid, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> datasets_models.Dataset: - """ - Creates a new Dataset. A default branch - `master` for most enrollments - will be created on the Dataset. - - :param name: - :type name: DatasetName - :param parent_folder_rid: - :type parent_folder_rid: FolderRid - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: datasets_models.Dataset - - :raises BranchAlreadyExists: The branch cannot be created because a branch with that name already exists. - :raises CreateBranchPermissionDenied: The provided token does not have permission to create a branch of this dataset. - :raises CreateDatasetPermissionDenied: The provided token does not have permission to create a dataset in this folder. - :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. - :raises FolderNotFound: The requested folder could not be found, or the client token does not have access to it. - :raises InvalidBranchId: The requested branch name cannot be used. Branch names cannot be empty and must not look like RIDs or UUIDs. - :raises ResourceNameAlreadyExists: The provided resource name is already in use by another resource in the same folder. - :raises TransactionNotCommitted: The given transaction has not been committed. - :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v1/datasets", - query_params={}, - path_params={}, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=datasets_models.CreateDatasetRequest( - name=name, - parent_folder_rid=parent_folder_rid, - ), - response_type=datasets_models.Dataset, - request_timeout=request_timeout, - throwable_errors={ - "BranchAlreadyExists": datasets_errors.BranchAlreadyExists, - "CreateBranchPermissionDenied": datasets_errors.CreateBranchPermissionDenied, - "CreateDatasetPermissionDenied": datasets_errors.CreateDatasetPermissionDenied, - "DatasetNotFound": datasets_errors.DatasetNotFound, - "FolderNotFound": core_errors.FolderNotFound, - "InvalidBranchId": datasets_errors.InvalidBranchId, - "ResourceNameAlreadyExists": core_errors.ResourceNameAlreadyExists, - "TransactionNotCommitted": datasets_errors.TransactionNotCommitted, - "TransactionNotFound": datasets_errors.TransactionNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def delete_schema( - self, - dataset_rid: datasets_models.DatasetRid, - *, - branch_id: typing.Optional[datasets_models.BranchId] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> None: - """ - Deletes the Schema from a Dataset and Branch. - - :param dataset_rid: The RID of the Dataset on which to delete the schema. - :type dataset_rid: DatasetRid - :param branch_id: The ID of the Branch on which to delete the schema. - :type branch_id: Optional[BranchId] - :param preview: - :type preview: Optional[PreviewMode] - :param transaction_rid: The RID of the Transaction on which to delete the schema. - :type transaction_rid: Optional[TransactionRid] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: None - - :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. - :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. - :raises DeleteSchemaPermissionDenied: todo - :raises InvalidBranchId: The requested branch name cannot be used. Branch names cannot be empty and must not look like RIDs or UUIDs. - :raises SchemaNotFound: A schema could not be found for the given dataset and branch, or the client token does not have access to it. - :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="DELETE", - resource_path="/v1/datasets/{datasetRid}/schema", - query_params={ - "branchId": branch_id, - "preview": preview, - "transactionRid": transaction_rid, - }, - path_params={ - "datasetRid": dataset_rid, - }, - header_params={}, - body=None, - response_type=None, - request_timeout=request_timeout, - throwable_errors={ - "BranchNotFound": datasets_errors.BranchNotFound, - "DatasetNotFound": datasets_errors.DatasetNotFound, - "DeleteSchemaPermissionDenied": datasets_errors.DeleteSchemaPermissionDenied, - "InvalidBranchId": datasets_errors.InvalidBranchId, - "SchemaNotFound": datasets_errors.SchemaNotFound, - "TransactionNotFound": datasets_errors.TransactionNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - dataset_rid: datasets_models.DatasetRid, - *, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> datasets_models.Dataset: - """ - Gets the Dataset with the given DatasetRid. - - :param dataset_rid: - :type dataset_rid: DatasetRid - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: datasets_models.Dataset - - :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v1/datasets/{datasetRid}", - query_params={}, - path_params={ - "datasetRid": dataset_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=datasets_models.Dataset, - request_timeout=request_timeout, - throwable_errors={ - "DatasetNotFound": datasets_errors.DatasetNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get_schema( - self, - dataset_rid: datasets_models.DatasetRid, - *, - branch_id: typing.Optional[datasets_models.BranchId] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Optional[typing.Any]: - """ - Retrieves the Schema for a Dataset and Branch, if it exists. - - :param dataset_rid: The RID of the Dataset. - :type dataset_rid: DatasetRid - :param branch_id: The ID of the Branch. - :type branch_id: Optional[BranchId] - :param preview: - :type preview: Optional[PreviewMode] - :param transaction_rid: The TransactionRid that contains the Schema. - :type transaction_rid: Optional[TransactionRid] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Optional[typing.Any] - - :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. - :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. - :raises InvalidBranchId: The requested branch name cannot be used. Branch names cannot be empty and must not look like RIDs or UUIDs. - :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v1/datasets/{datasetRid}/schema", - query_params={ - "branchId": branch_id, - "preview": preview, - "transactionRid": transaction_rid, - }, - path_params={ - "datasetRid": dataset_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=typing.Optional[typing.Any], - request_timeout=request_timeout, - throwable_errors={ - "BranchNotFound": datasets_errors.BranchNotFound, - "DatasetNotFound": datasets_errors.DatasetNotFound, - "InvalidBranchId": datasets_errors.InvalidBranchId, - "TransactionNotFound": datasets_errors.TransactionNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def read( - self, - dataset_rid: datasets_models.DatasetRid, - *, - format: datasets_models.TableExportFormat, - branch_id: typing.Optional[datasets_models.BranchId] = None, - columns: typing.Optional[typing.List[str]] = None, - end_transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, - row_limit: typing.Optional[int] = None, - start_transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> bytes: - """ - Gets the content of a dataset as a table in the specified format. - - This endpoint currently does not support views (virtual datasets composed of other datasets). For more information, refer to the [views documentation](https://palantir.com/docs/foundry/data-integration/views). - - :param dataset_rid: The RID of the Dataset. - :type dataset_rid: DatasetRid - :param format: The export format. Must be `ARROW` or `CSV`. - :type format: TableExportFormat - :param branch_id: The identifier (name) of the Branch. - :type branch_id: Optional[BranchId] - :param columns: A subset of the dataset columns to include in the result. Defaults to all columns. - :type columns: Optional[List[str]] - :param end_transaction_rid: The Resource Identifier (RID) of the end Transaction. - :type end_transaction_rid: Optional[TransactionRid] - :param row_limit: A limit on the number of rows to return. Note that row ordering is non-deterministic. - :type row_limit: Optional[int] - :param start_transaction_rid: The Resource Identifier (RID) of the start Transaction. - :type start_transaction_rid: Optional[TransactionRid] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: bytes - - :raises ColumnTypesNotSupported: The dataset contains column types that are not supported. - :raises DatasetReadNotSupported: The dataset does not support being read. - :raises InvalidParameterCombination: The given parameters are individually valid but cannot be used in the given combination. - :raises ReadTablePermissionDenied: The provided token does not have permission to read the given dataset as a table. - :raises SchemaNotFound: A schema could not be found for the given dataset and branch, or the client token does not have access to it. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v1/datasets/{datasetRid}/readTable", - query_params={ - "format": format, - "branchId": branch_id, - "columns": columns, - "endTransactionRid": end_transaction_rid, - "rowLimit": row_limit, - "startTransactionRid": start_transaction_rid, - }, - path_params={ - "datasetRid": dataset_rid, - }, - header_params={ - "Accept": "*/*", - }, - body=None, - response_type=bytes, - request_timeout=request_timeout, - throwable_errors={ - "ColumnTypesNotSupported": datasets_errors.ColumnTypesNotSupported, - "DatasetReadNotSupported": datasets_errors.DatasetReadNotSupported, - "InvalidParameterCombination": core_errors.InvalidParameterCombination, - "ReadTablePermissionDenied": datasets_errors.ReadTablePermissionDenied, - "SchemaNotFound": datasets_errors.SchemaNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def replace_schema( - self, - dataset_rid: datasets_models.DatasetRid, - body: typing.Any, - *, - branch_id: typing.Optional[datasets_models.BranchId] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> None: - """ - Puts a Schema on an existing Dataset and Branch. - - :param dataset_rid: The RID of the Dataset on which to put the Schema. - :type dataset_rid: DatasetRid - :param body: Body of the request - :type body: Any - :param branch_id: The ID of the Branch on which to put the Schema. - :type branch_id: Optional[BranchId] - :param preview: - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: None - - :raises AbortTransactionPermissionDenied: The provided token does not have permission to abort the given transaction on the given dataset. - :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. - :raises CommitTransactionPermissionDenied: The provided token does not have permission to commit the given transaction on the given dataset. - :raises CreateTransactionPermissionDenied: The provided token does not have permission to create a transaction on this dataset. - :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. - :raises FileNotFoundOnTransactionRange: The requested file could not be found on the given transaction range, or the client token does not have access to it. - :raises InvalidBranchId: The requested branch name cannot be used. Branch names cannot be empty and must not look like RIDs or UUIDs. - :raises InvalidTransactionType: The given transaction type is not valid. Valid transaction types are `SNAPSHOT`, `UPDATE`, `APPEND`, and `DELETE`. - :raises OpenTransactionAlreadyExists: A transaction is already open on this dataset and branch. A branch of a dataset can only have one open transaction at a time. - :raises PutSchemaPermissionDenied: todo - :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. - :raises TransactionNotOpen: The given transaction is not open. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="PUT", - resource_path="/v1/datasets/{datasetRid}/schema", - query_params={ - "branchId": branch_id, - "preview": preview, - }, - path_params={ - "datasetRid": dataset_rid, - }, - header_params={ - "Content-Type": "application/json", - }, - body=body, - response_type=None, - request_timeout=request_timeout, - throwable_errors={ - "AbortTransactionPermissionDenied": datasets_errors.AbortTransactionPermissionDenied, - "BranchNotFound": datasets_errors.BranchNotFound, - "CommitTransactionPermissionDenied": datasets_errors.CommitTransactionPermissionDenied, - "CreateTransactionPermissionDenied": datasets_errors.CreateTransactionPermissionDenied, - "DatasetNotFound": datasets_errors.DatasetNotFound, - "FileNotFoundOnTransactionRange": datasets_errors.FileNotFoundOnTransactionRange, - "InvalidBranchId": datasets_errors.InvalidBranchId, - "InvalidTransactionType": datasets_errors.InvalidTransactionType, - "OpenTransactionAlreadyExists": datasets_errors.OpenTransactionAlreadyExists, - "PutSchemaPermissionDenied": datasets_errors.PutSchemaPermissionDenied, - "TransactionNotFound": datasets_errors.TransactionNotFound, - "TransactionNotOpen": datasets_errors.TransactionNotOpen, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _DatasetClientRaw: - def __init__(self, client: DatasetClient) -> None: - def create(_: datasets_models.Dataset): ... - def delete_schema(_: None): ... - def get(_: datasets_models.Dataset): ... - def get_schema(_: typing.Optional[typing.Any]): ... - def read(_: bytes): ... - def replace_schema(_: None): ... - - self.create = core.with_raw_response(create, client.create) - self.delete_schema = core.with_raw_response(delete_schema, client.delete_schema) - self.get = core.with_raw_response(get, client.get) - self.get_schema = core.with_raw_response(get_schema, client.get_schema) - self.read = core.with_raw_response(read, client.read) - self.replace_schema = core.with_raw_response(replace_schema, client.replace_schema) - - -class _DatasetClientStreaming: - def __init__(self, client: DatasetClient) -> None: - def create(_: datasets_models.Dataset): ... - def get(_: datasets_models.Dataset): ... - def get_schema(_: typing.Optional[typing.Any]): ... - def read(_: bytes): ... - - self.create = core.with_streaming_response(create, client.create) - self.get = core.with_streaming_response(get, client.get) - self.get_schema = core.with_streaming_response(get_schema, client.get_schema) - self.read = core.with_streaming_response(read, client.read) - - -class AsyncDatasetClient: - """ - The API client for the Dataset Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AsyncDatasetClientStreaming(self) - self.with_raw_response = _AsyncDatasetClientRaw(self) - - @cached_property - def Branch(self): - from foundry_sdk.v1.datasets.branch import AsyncBranchClient - - return AsyncBranchClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @cached_property - def File(self): - from foundry_sdk.v1.datasets.file import AsyncFileClient - - return AsyncFileClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @cached_property - def Transaction(self): - from foundry_sdk.v1.datasets.transaction import AsyncTransactionClient - - return AsyncTransactionClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def create( - self, - *, - name: datasets_models.DatasetName, - parent_folder_rid: core_models.FolderRid, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[datasets_models.Dataset]: - """ - Creates a new Dataset. A default branch - `master` for most enrollments - will be created on the Dataset. - - :param name: - :type name: DatasetName - :param parent_folder_rid: - :type parent_folder_rid: FolderRid - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[datasets_models.Dataset] - - :raises BranchAlreadyExists: The branch cannot be created because a branch with that name already exists. - :raises CreateBranchPermissionDenied: The provided token does not have permission to create a branch of this dataset. - :raises CreateDatasetPermissionDenied: The provided token does not have permission to create a dataset in this folder. - :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. - :raises FolderNotFound: The requested folder could not be found, or the client token does not have access to it. - :raises InvalidBranchId: The requested branch name cannot be used. Branch names cannot be empty and must not look like RIDs or UUIDs. - :raises ResourceNameAlreadyExists: The provided resource name is already in use by another resource in the same folder. - :raises TransactionNotCommitted: The given transaction has not been committed. - :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v1/datasets", - query_params={}, - path_params={}, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=datasets_models.CreateDatasetRequest( - name=name, - parent_folder_rid=parent_folder_rid, - ), - response_type=datasets_models.Dataset, - request_timeout=request_timeout, - throwable_errors={ - "BranchAlreadyExists": datasets_errors.BranchAlreadyExists, - "CreateBranchPermissionDenied": datasets_errors.CreateBranchPermissionDenied, - "CreateDatasetPermissionDenied": datasets_errors.CreateDatasetPermissionDenied, - "DatasetNotFound": datasets_errors.DatasetNotFound, - "FolderNotFound": core_errors.FolderNotFound, - "InvalidBranchId": datasets_errors.InvalidBranchId, - "ResourceNameAlreadyExists": core_errors.ResourceNameAlreadyExists, - "TransactionNotCommitted": datasets_errors.TransactionNotCommitted, - "TransactionNotFound": datasets_errors.TransactionNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def delete_schema( - self, - dataset_rid: datasets_models.DatasetRid, - *, - branch_id: typing.Optional[datasets_models.BranchId] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[None]: - """ - Deletes the Schema from a Dataset and Branch. - - :param dataset_rid: The RID of the Dataset on which to delete the schema. - :type dataset_rid: DatasetRid - :param branch_id: The ID of the Branch on which to delete the schema. - :type branch_id: Optional[BranchId] - :param preview: - :type preview: Optional[PreviewMode] - :param transaction_rid: The RID of the Transaction on which to delete the schema. - :type transaction_rid: Optional[TransactionRid] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[None] - - :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. - :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. - :raises DeleteSchemaPermissionDenied: todo - :raises InvalidBranchId: The requested branch name cannot be used. Branch names cannot be empty and must not look like RIDs or UUIDs. - :raises SchemaNotFound: A schema could not be found for the given dataset and branch, or the client token does not have access to it. - :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="DELETE", - resource_path="/v1/datasets/{datasetRid}/schema", - query_params={ - "branchId": branch_id, - "preview": preview, - "transactionRid": transaction_rid, - }, - path_params={ - "datasetRid": dataset_rid, - }, - header_params={}, - body=None, - response_type=None, - request_timeout=request_timeout, - throwable_errors={ - "BranchNotFound": datasets_errors.BranchNotFound, - "DatasetNotFound": datasets_errors.DatasetNotFound, - "DeleteSchemaPermissionDenied": datasets_errors.DeleteSchemaPermissionDenied, - "InvalidBranchId": datasets_errors.InvalidBranchId, - "SchemaNotFound": datasets_errors.SchemaNotFound, - "TransactionNotFound": datasets_errors.TransactionNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - dataset_rid: datasets_models.DatasetRid, - *, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[datasets_models.Dataset]: - """ - Gets the Dataset with the given DatasetRid. - - :param dataset_rid: - :type dataset_rid: DatasetRid - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[datasets_models.Dataset] - - :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v1/datasets/{datasetRid}", - query_params={}, - path_params={ - "datasetRid": dataset_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=datasets_models.Dataset, - request_timeout=request_timeout, - throwable_errors={ - "DatasetNotFound": datasets_errors.DatasetNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get_schema( - self, - dataset_rid: datasets_models.DatasetRid, - *, - branch_id: typing.Optional[datasets_models.BranchId] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[typing.Optional[typing.Any]]: - """ - Retrieves the Schema for a Dataset and Branch, if it exists. - - :param dataset_rid: The RID of the Dataset. - :type dataset_rid: DatasetRid - :param branch_id: The ID of the Branch. - :type branch_id: Optional[BranchId] - :param preview: - :type preview: Optional[PreviewMode] - :param transaction_rid: The TransactionRid that contains the Schema. - :type transaction_rid: Optional[TransactionRid] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[typing.Optional[typing.Any]] - - :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. - :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. - :raises InvalidBranchId: The requested branch name cannot be used. Branch names cannot be empty and must not look like RIDs or UUIDs. - :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v1/datasets/{datasetRid}/schema", - query_params={ - "branchId": branch_id, - "preview": preview, - "transactionRid": transaction_rid, - }, - path_params={ - "datasetRid": dataset_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=typing.Optional[typing.Any], - request_timeout=request_timeout, - throwable_errors={ - "BranchNotFound": datasets_errors.BranchNotFound, - "DatasetNotFound": datasets_errors.DatasetNotFound, - "InvalidBranchId": datasets_errors.InvalidBranchId, - "TransactionNotFound": datasets_errors.TransactionNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def read( - self, - dataset_rid: datasets_models.DatasetRid, - *, - format: datasets_models.TableExportFormat, - branch_id: typing.Optional[datasets_models.BranchId] = None, - columns: typing.Optional[typing.List[str]] = None, - end_transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, - row_limit: typing.Optional[int] = None, - start_transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[bytes]: - """ - Gets the content of a dataset as a table in the specified format. - - This endpoint currently does not support views (virtual datasets composed of other datasets). For more information, refer to the [views documentation](https://palantir.com/docs/foundry/data-integration/views). - - :param dataset_rid: The RID of the Dataset. - :type dataset_rid: DatasetRid - :param format: The export format. Must be `ARROW` or `CSV`. - :type format: TableExportFormat - :param branch_id: The identifier (name) of the Branch. - :type branch_id: Optional[BranchId] - :param columns: A subset of the dataset columns to include in the result. Defaults to all columns. - :type columns: Optional[List[str]] - :param end_transaction_rid: The Resource Identifier (RID) of the end Transaction. - :type end_transaction_rid: Optional[TransactionRid] - :param row_limit: A limit on the number of rows to return. Note that row ordering is non-deterministic. - :type row_limit: Optional[int] - :param start_transaction_rid: The Resource Identifier (RID) of the start Transaction. - :type start_transaction_rid: Optional[TransactionRid] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[bytes] - - :raises ColumnTypesNotSupported: The dataset contains column types that are not supported. - :raises DatasetReadNotSupported: The dataset does not support being read. - :raises InvalidParameterCombination: The given parameters are individually valid but cannot be used in the given combination. - :raises ReadTablePermissionDenied: The provided token does not have permission to read the given dataset as a table. - :raises SchemaNotFound: A schema could not be found for the given dataset and branch, or the client token does not have access to it. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v1/datasets/{datasetRid}/readTable", - query_params={ - "format": format, - "branchId": branch_id, - "columns": columns, - "endTransactionRid": end_transaction_rid, - "rowLimit": row_limit, - "startTransactionRid": start_transaction_rid, - }, - path_params={ - "datasetRid": dataset_rid, - }, - header_params={ - "Accept": "*/*", - }, - body=None, - response_type=bytes, - request_timeout=request_timeout, - throwable_errors={ - "ColumnTypesNotSupported": datasets_errors.ColumnTypesNotSupported, - "DatasetReadNotSupported": datasets_errors.DatasetReadNotSupported, - "InvalidParameterCombination": core_errors.InvalidParameterCombination, - "ReadTablePermissionDenied": datasets_errors.ReadTablePermissionDenied, - "SchemaNotFound": datasets_errors.SchemaNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def replace_schema( - self, - dataset_rid: datasets_models.DatasetRid, - body: typing.Any, - *, - branch_id: typing.Optional[datasets_models.BranchId] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[None]: - """ - Puts a Schema on an existing Dataset and Branch. - - :param dataset_rid: The RID of the Dataset on which to put the Schema. - :type dataset_rid: DatasetRid - :param body: Body of the request - :type body: Any - :param branch_id: The ID of the Branch on which to put the Schema. - :type branch_id: Optional[BranchId] - :param preview: - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[None] - - :raises AbortTransactionPermissionDenied: The provided token does not have permission to abort the given transaction on the given dataset. - :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. - :raises CommitTransactionPermissionDenied: The provided token does not have permission to commit the given transaction on the given dataset. - :raises CreateTransactionPermissionDenied: The provided token does not have permission to create a transaction on this dataset. - :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. - :raises FileNotFoundOnTransactionRange: The requested file could not be found on the given transaction range, or the client token does not have access to it. - :raises InvalidBranchId: The requested branch name cannot be used. Branch names cannot be empty and must not look like RIDs or UUIDs. - :raises InvalidTransactionType: The given transaction type is not valid. Valid transaction types are `SNAPSHOT`, `UPDATE`, `APPEND`, and `DELETE`. - :raises OpenTransactionAlreadyExists: A transaction is already open on this dataset and branch. A branch of a dataset can only have one open transaction at a time. - :raises PutSchemaPermissionDenied: todo - :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. - :raises TransactionNotOpen: The given transaction is not open. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="PUT", - resource_path="/v1/datasets/{datasetRid}/schema", - query_params={ - "branchId": branch_id, - "preview": preview, - }, - path_params={ - "datasetRid": dataset_rid, - }, - header_params={ - "Content-Type": "application/json", - }, - body=body, - response_type=None, - request_timeout=request_timeout, - throwable_errors={ - "AbortTransactionPermissionDenied": datasets_errors.AbortTransactionPermissionDenied, - "BranchNotFound": datasets_errors.BranchNotFound, - "CommitTransactionPermissionDenied": datasets_errors.CommitTransactionPermissionDenied, - "CreateTransactionPermissionDenied": datasets_errors.CreateTransactionPermissionDenied, - "DatasetNotFound": datasets_errors.DatasetNotFound, - "FileNotFoundOnTransactionRange": datasets_errors.FileNotFoundOnTransactionRange, - "InvalidBranchId": datasets_errors.InvalidBranchId, - "InvalidTransactionType": datasets_errors.InvalidTransactionType, - "OpenTransactionAlreadyExists": datasets_errors.OpenTransactionAlreadyExists, - "PutSchemaPermissionDenied": datasets_errors.PutSchemaPermissionDenied, - "TransactionNotFound": datasets_errors.TransactionNotFound, - "TransactionNotOpen": datasets_errors.TransactionNotOpen, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _AsyncDatasetClientRaw: - def __init__(self, client: AsyncDatasetClient) -> None: - def create(_: datasets_models.Dataset): ... - def delete_schema(_: None): ... - def get(_: datasets_models.Dataset): ... - def get_schema(_: typing.Optional[typing.Any]): ... - def read(_: bytes): ... - def replace_schema(_: None): ... - - self.create = core.async_with_raw_response(create, client.create) - self.delete_schema = core.async_with_raw_response(delete_schema, client.delete_schema) - self.get = core.async_with_raw_response(get, client.get) - self.get_schema = core.async_with_raw_response(get_schema, client.get_schema) - self.read = core.async_with_raw_response(read, client.read) - self.replace_schema = core.async_with_raw_response(replace_schema, client.replace_schema) - - -class _AsyncDatasetClientStreaming: - def __init__(self, client: AsyncDatasetClient) -> None: - def create(_: datasets_models.Dataset): ... - def get(_: datasets_models.Dataset): ... - def get_schema(_: typing.Optional[typing.Any]): ... - def read(_: bytes): ... - - self.create = core.async_with_streaming_response(create, client.create) - self.get = core.async_with_streaming_response(get, client.get) - self.get_schema = core.async_with_streaming_response(get_schema, client.get_schema) - self.read = core.async_with_streaming_response(read, client.read) diff --git a/foundry_sdk/v1/datasets/errors.py b/foundry_sdk/v1/datasets/errors.py deleted file mode 100644 index cd749b82c..000000000 --- a/foundry_sdk/v1/datasets/errors.py +++ /dev/null @@ -1,457 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing -from dataclasses import dataclass - -import typing_extensions - -from foundry_sdk import _errors as errors -from foundry_sdk.v1.core import models as core_models -from foundry_sdk.v1.datasets import models as datasets_models - - -class AbortTransactionPermissionDeniedParameters(typing_extensions.TypedDict): - """The provided token does not have permission to abort the given transaction on the given dataset.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - datasetRid: datasets_models.DatasetRid - transactionRid: datasets_models.TransactionRid - - -@dataclass -class AbortTransactionPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["AbortTransactionPermissionDenied"] - parameters: AbortTransactionPermissionDeniedParameters - error_instance_id: str - - -class BranchAlreadyExistsParameters(typing_extensions.TypedDict): - """The branch cannot be created because a branch with that name already exists.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - datasetRid: datasets_models.DatasetRid - branchId: datasets_models.BranchId - - -@dataclass -class BranchAlreadyExists(errors.ConflictError): - name: typing.Literal["BranchAlreadyExists"] - parameters: BranchAlreadyExistsParameters - error_instance_id: str - - -class BranchNotFoundParameters(typing_extensions.TypedDict): - """The requested branch could not be found, or the client token does not have access to it.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - datasetRid: datasets_models.DatasetRid - branchId: datasets_models.BranchId - - -@dataclass -class BranchNotFound(errors.NotFoundError): - name: typing.Literal["BranchNotFound"] - parameters: BranchNotFoundParameters - error_instance_id: str - - -class ColumnTypesNotSupportedParameters(typing_extensions.TypedDict): - """The dataset contains column types that are not supported.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - datasetRid: datasets_models.DatasetRid - - -@dataclass -class ColumnTypesNotSupported(errors.BadRequestError): - name: typing.Literal["ColumnTypesNotSupported"] - parameters: ColumnTypesNotSupportedParameters - error_instance_id: str - - -class CommitTransactionPermissionDeniedParameters(typing_extensions.TypedDict): - """The provided token does not have permission to commit the given transaction on the given dataset.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - datasetRid: datasets_models.DatasetRid - transactionRid: datasets_models.TransactionRid - - -@dataclass -class CommitTransactionPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["CommitTransactionPermissionDenied"] - parameters: CommitTransactionPermissionDeniedParameters - error_instance_id: str - - -class CreateBranchPermissionDeniedParameters(typing_extensions.TypedDict): - """The provided token does not have permission to create a branch of this dataset.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - datasetRid: datasets_models.DatasetRid - branchId: datasets_models.BranchId - - -@dataclass -class CreateBranchPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["CreateBranchPermissionDenied"] - parameters: CreateBranchPermissionDeniedParameters - error_instance_id: str - - -class CreateDatasetPermissionDeniedParameters(typing_extensions.TypedDict): - """The provided token does not have permission to create a dataset in this folder.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - parentFolderRid: core_models.FolderRid - name: datasets_models.DatasetName - - -@dataclass -class CreateDatasetPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["CreateDatasetPermissionDenied"] - parameters: CreateDatasetPermissionDeniedParameters - error_instance_id: str - - -class CreateTransactionPermissionDeniedParameters(typing_extensions.TypedDict): - """The provided token does not have permission to create a transaction on this dataset.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - datasetRid: datasets_models.DatasetRid - branchId: datasets_models.BranchId - - -@dataclass -class CreateTransactionPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["CreateTransactionPermissionDenied"] - parameters: CreateTransactionPermissionDeniedParameters - error_instance_id: str - - -class DatasetNotFoundParameters(typing_extensions.TypedDict): - """The requested dataset could not be found, or the client token does not have access to it.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - datasetRid: datasets_models.DatasetRid - - -@dataclass -class DatasetNotFound(errors.NotFoundError): - name: typing.Literal["DatasetNotFound"] - parameters: DatasetNotFoundParameters - error_instance_id: str - - -class DatasetReadNotSupportedParameters(typing_extensions.TypedDict): - """The dataset does not support being read.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - datasetRid: datasets_models.DatasetRid - - -@dataclass -class DatasetReadNotSupported(errors.BadRequestError): - name: typing.Literal["DatasetReadNotSupported"] - parameters: DatasetReadNotSupportedParameters - error_instance_id: str - - -class DeleteBranchPermissionDeniedParameters(typing_extensions.TypedDict): - """The provided token does not have permission to delete the given branch from this dataset.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - datasetRid: datasets_models.DatasetRid - branchId: datasets_models.BranchId - - -@dataclass -class DeleteBranchPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["DeleteBranchPermissionDenied"] - parameters: DeleteBranchPermissionDeniedParameters - error_instance_id: str - - -class DeleteSchemaPermissionDeniedParameters(typing_extensions.TypedDict): - """todo""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - datasetRid: datasets_models.DatasetRid - branchId: datasets_models.BranchId - transactionRid: typing_extensions.NotRequired[datasets_models.TransactionRid] - - -@dataclass -class DeleteSchemaPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["DeleteSchemaPermissionDenied"] - parameters: DeleteSchemaPermissionDeniedParameters - error_instance_id: str - - -class FileAlreadyExistsParameters(typing_extensions.TypedDict): - """The given file path already exists in the dataset and transaction.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - datasetRid: datasets_models.DatasetRid - transactionRid: datasets_models.TransactionRid - path: core_models.FilePath - - -@dataclass -class FileAlreadyExists(errors.NotFoundError): - name: typing.Literal["FileAlreadyExists"] - parameters: FileAlreadyExistsParameters - error_instance_id: str - - -class FileNotFoundOnBranchParameters(typing_extensions.TypedDict): - """The requested file could not be found on the given branch, or the client token does not have access to it.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - datasetRid: datasets_models.DatasetRid - branchId: datasets_models.BranchId - path: core_models.FilePath - - -@dataclass -class FileNotFoundOnBranch(errors.NotFoundError): - name: typing.Literal["FileNotFoundOnBranch"] - parameters: FileNotFoundOnBranchParameters - error_instance_id: str - - -class FileNotFoundOnTransactionRangeParameters(typing_extensions.TypedDict): - """The requested file could not be found on the given transaction range, or the client token does not have access to it.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - datasetRid: datasets_models.DatasetRid - startTransactionRid: typing_extensions.NotRequired[datasets_models.TransactionRid] - endTransactionRid: datasets_models.TransactionRid - path: core_models.FilePath - - -@dataclass -class FileNotFoundOnTransactionRange(errors.NotFoundError): - name: typing.Literal["FileNotFoundOnTransactionRange"] - parameters: FileNotFoundOnTransactionRangeParameters - error_instance_id: str - - -class InvalidBranchIdParameters(typing_extensions.TypedDict): - """The requested branch name cannot be used. Branch names cannot be empty and must not look like RIDs or UUIDs.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - branchId: datasets_models.BranchId - - -@dataclass -class InvalidBranchId(errors.BadRequestError): - name: typing.Literal["InvalidBranchId"] - parameters: InvalidBranchIdParameters - error_instance_id: str - - -class InvalidTransactionTypeParameters(typing_extensions.TypedDict): - """The given transaction type is not valid. Valid transaction types are `SNAPSHOT`, `UPDATE`, `APPEND`, and `DELETE`.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - datasetRid: datasets_models.DatasetRid - transactionRid: datasets_models.TransactionRid - transactionType: datasets_models.TransactionType - - -@dataclass -class InvalidTransactionType(errors.BadRequestError): - name: typing.Literal["InvalidTransactionType"] - parameters: InvalidTransactionTypeParameters - error_instance_id: str - - -class OpenTransactionAlreadyExistsParameters(typing_extensions.TypedDict): - """A transaction is already open on this dataset and branch. A branch of a dataset can only have one open transaction at a time.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - datasetRid: datasets_models.DatasetRid - branchId: datasets_models.BranchId - - -@dataclass -class OpenTransactionAlreadyExists(errors.ConflictError): - name: typing.Literal["OpenTransactionAlreadyExists"] - parameters: OpenTransactionAlreadyExistsParameters - error_instance_id: str - - -class PutSchemaPermissionDeniedParameters(typing_extensions.TypedDict): - """todo""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - datasetRid: datasets_models.DatasetRid - branchId: datasets_models.BranchId - - -@dataclass -class PutSchemaPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["PutSchemaPermissionDenied"] - parameters: PutSchemaPermissionDeniedParameters - error_instance_id: str - - -class ReadTablePermissionDeniedParameters(typing_extensions.TypedDict): - """The provided token does not have permission to read the given dataset as a table.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - datasetRid: datasets_models.DatasetRid - - -@dataclass -class ReadTablePermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["ReadTablePermissionDenied"] - parameters: ReadTablePermissionDeniedParameters - error_instance_id: str - - -class SchemaNotFoundParameters(typing_extensions.TypedDict): - """A schema could not be found for the given dataset and branch, or the client token does not have access to it.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - datasetRid: datasets_models.DatasetRid - branchId: datasets_models.BranchId - transactionRid: typing_extensions.NotRequired[datasets_models.TransactionRid] - - -@dataclass -class SchemaNotFound(errors.NotFoundError): - name: typing.Literal["SchemaNotFound"] - parameters: SchemaNotFoundParameters - error_instance_id: str - - -class TransactionNotCommittedParameters(typing_extensions.TypedDict): - """The given transaction has not been committed.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - datasetRid: datasets_models.DatasetRid - transactionRid: datasets_models.TransactionRid - transactionStatus: datasets_models.TransactionStatus - - -@dataclass -class TransactionNotCommitted(errors.BadRequestError): - name: typing.Literal["TransactionNotCommitted"] - parameters: TransactionNotCommittedParameters - error_instance_id: str - - -class TransactionNotFoundParameters(typing_extensions.TypedDict): - """The requested transaction could not be found on the dataset, or the client token does not have access to it.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - datasetRid: datasets_models.DatasetRid - transactionRid: datasets_models.TransactionRid - - -@dataclass -class TransactionNotFound(errors.NotFoundError): - name: typing.Literal["TransactionNotFound"] - parameters: TransactionNotFoundParameters - error_instance_id: str - - -class TransactionNotOpenParameters(typing_extensions.TypedDict): - """The given transaction is not open.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - datasetRid: datasets_models.DatasetRid - transactionRid: datasets_models.TransactionRid - transactionStatus: datasets_models.TransactionStatus - - -@dataclass -class TransactionNotOpen(errors.BadRequestError): - name: typing.Literal["TransactionNotOpen"] - parameters: TransactionNotOpenParameters - error_instance_id: str - - -class UploadFilePermissionDeniedParameters(typing_extensions.TypedDict): - """The provided token does not have permission to upload the given file to the given dataset and transaction.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - datasetRid: datasets_models.DatasetRid - transactionRid: datasets_models.TransactionRid - path: core_models.FilePath - - -@dataclass -class UploadFilePermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["UploadFilePermissionDenied"] - parameters: UploadFilePermissionDeniedParameters - error_instance_id: str - - -__all__ = [ - "AbortTransactionPermissionDenied", - "BranchAlreadyExists", - "BranchNotFound", - "ColumnTypesNotSupported", - "CommitTransactionPermissionDenied", - "CreateBranchPermissionDenied", - "CreateDatasetPermissionDenied", - "CreateTransactionPermissionDenied", - "DatasetNotFound", - "DatasetReadNotSupported", - "DeleteBranchPermissionDenied", - "DeleteSchemaPermissionDenied", - "FileAlreadyExists", - "FileNotFoundOnBranch", - "FileNotFoundOnTransactionRange", - "InvalidBranchId", - "InvalidTransactionType", - "OpenTransactionAlreadyExists", - "PutSchemaPermissionDenied", - "ReadTablePermissionDenied", - "SchemaNotFound", - "TransactionNotCommitted", - "TransactionNotFound", - "TransactionNotOpen", - "UploadFilePermissionDenied", -] diff --git a/foundry_sdk/v1/datasets/file.py b/foundry_sdk/v1/datasets/file.py deleted file mode 100644 index d3df70028..000000000 --- a/foundry_sdk/v1/datasets/file.py +++ /dev/null @@ -1,1108 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing - -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v1.core import errors as core_errors -from foundry_sdk.v1.core import models as core_models -from foundry_sdk.v1.datasets import errors as datasets_errors -from foundry_sdk.v1.datasets import models as datasets_models - - -class FileClient: - """ - The API client for the File Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _FileClientStreaming(self) - self.with_raw_response = _FileClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def delete( - self, - dataset_rid: datasets_models.DatasetRid, - file_path: core_models.FilePath, - *, - branch_id: typing.Optional[datasets_models.BranchId] = None, - transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> None: - """ - Deletes a File from a Dataset. By default the file is deleted in a new transaction on the default - branch - `master` for most enrollments. The file will still be visible on historical views. - - #### Advanced Usage - - See [Datasets Core Concepts](https://palantir.com/docs/foundry/data-integration/datasets/) for details on using branches and transactions. - - To **delete a File from a specific Branch** specify the Branch's identifier as `branchId`. A new delete Transaction - will be created and committed on this branch. - - To **delete a File using a manually opened Transaction**, specify the Transaction's resource identifier - as `transactionRid`. The transaction must be of type `DELETE`. This is useful for deleting multiple files in a - single transaction. See [createTransaction](https://palantir.com/docs/foundry/api/datasets-resources/transactions/create-transaction/) to - open a transaction. - - :param dataset_rid: The Resource Identifier (RID) of the Dataset on which to delete the File. - :type dataset_rid: DatasetRid - :param file_path: The File path within the Dataset. - :type file_path: FilePath - :param branch_id: The identifier (name) of the Branch on which to delete the File. Defaults to `master` for most enrollments. - :type branch_id: Optional[BranchId] - :param transaction_rid: The Resource Identifier (RID) of the open delete Transaction on which to delete the File. - :type transaction_rid: Optional[TransactionRid] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: None - - :raises AbortTransactionPermissionDenied: The provided token does not have permission to abort the given transaction on the given dataset. - :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. - :raises CommitTransactionPermissionDenied: The provided token does not have permission to commit the given transaction on the given dataset. - :raises CreateTransactionPermissionDenied: The provided token does not have permission to create a transaction on this dataset. - :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. - :raises FileNotFoundOnBranch: The requested file could not be found on the given branch, or the client token does not have access to it. - :raises FileNotFoundOnTransactionRange: The requested file could not be found on the given transaction range, or the client token does not have access to it. - :raises InvalidBranchId: The requested branch name cannot be used. Branch names cannot be empty and must not look like RIDs or UUIDs. - :raises InvalidParameterCombination: The given parameters are individually valid but cannot be used in the given combination. - :raises InvalidTransactionType: The given transaction type is not valid. Valid transaction types are `SNAPSHOT`, `UPDATE`, `APPEND`, and `DELETE`. - :raises OpenTransactionAlreadyExists: A transaction is already open on this dataset and branch. A branch of a dataset can only have one open transaction at a time. - :raises PutSchemaPermissionDenied: todo - :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. - :raises TransactionNotOpen: The given transaction is not open. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="DELETE", - resource_path="/v1/datasets/{datasetRid}/files/{filePath}", - query_params={ - "branchId": branch_id, - "transactionRid": transaction_rid, - }, - path_params={ - "datasetRid": dataset_rid, - "filePath": file_path, - }, - header_params={}, - body=None, - response_type=None, - request_timeout=request_timeout, - throwable_errors={ - "AbortTransactionPermissionDenied": datasets_errors.AbortTransactionPermissionDenied, - "BranchNotFound": datasets_errors.BranchNotFound, - "CommitTransactionPermissionDenied": datasets_errors.CommitTransactionPermissionDenied, - "CreateTransactionPermissionDenied": datasets_errors.CreateTransactionPermissionDenied, - "DatasetNotFound": datasets_errors.DatasetNotFound, - "FileNotFoundOnBranch": datasets_errors.FileNotFoundOnBranch, - "FileNotFoundOnTransactionRange": datasets_errors.FileNotFoundOnTransactionRange, - "InvalidBranchId": datasets_errors.InvalidBranchId, - "InvalidParameterCombination": core_errors.InvalidParameterCombination, - "InvalidTransactionType": datasets_errors.InvalidTransactionType, - "OpenTransactionAlreadyExists": datasets_errors.OpenTransactionAlreadyExists, - "PutSchemaPermissionDenied": datasets_errors.PutSchemaPermissionDenied, - "TransactionNotFound": datasets_errors.TransactionNotFound, - "TransactionNotOpen": datasets_errors.TransactionNotOpen, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - dataset_rid: datasets_models.DatasetRid, - file_path: core_models.FilePath, - *, - branch_id: typing.Optional[datasets_models.BranchId] = None, - end_transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, - start_transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> datasets_models.File: - """ - Gets metadata about a File contained in a Dataset. By default this retrieves the file's metadata from the latest - view of the default branch - `master` for most enrollments. - - #### Advanced Usage - - See [Datasets Core Concepts](https://palantir.com/docs/foundry/data-integration/datasets/) for details on using branches and transactions. - - To **get a file's metadata from a specific Branch** specify the Branch's identifier as `branchId`. This will - retrieve metadata for the most recent version of the file since the latest snapshot transaction, or the earliest - ancestor transaction of the branch if there are no snapshot transactions. - - To **get a file's metadata from the resolved view of a transaction** specify the Transaction's resource identifier - as `endTransactionRid`. This will retrieve metadata for the most recent version of the file since the latest snapshot - transaction, or the earliest ancestor transaction if there are no snapshot transactions. - - To **get a file's metadata from the resolved view of a range of transactions** specify the the start transaction's - resource identifier as `startTransactionRid` and the end transaction's resource identifier as `endTransactionRid`. - This will retrieve metadata for the most recent version of the file since the `startTransactionRid` up to the - `endTransactionRid`. Behavior is undefined when the start and end transactions do not belong to the same root-to-leaf path. - - To **get a file's metadata from a specific transaction** specify the Transaction's resource identifier as both the - `startTransactionRid` and `endTransactionRid`. - - :param dataset_rid: The Resource Identifier (RID) of the Dataset that contains the File. - :type dataset_rid: DatasetRid - :param file_path: The File's path within the Dataset. - :type file_path: FilePath - :param branch_id: The identifier (name) of the Branch that contains the File. Defaults to `master` for most enrollments. - :type branch_id: Optional[BranchId] - :param end_transaction_rid: The Resource Identifier (RID) of the end Transaction. - :type end_transaction_rid: Optional[TransactionRid] - :param start_transaction_rid: The Resource Identifier (RID) of the start Transaction. - :type start_transaction_rid: Optional[TransactionRid] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: datasets_models.File - - :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. - :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. - :raises FileNotFoundOnBranch: The requested file could not be found on the given branch, or the client token does not have access to it. - :raises FileNotFoundOnTransactionRange: The requested file could not be found on the given transaction range, or the client token does not have access to it. - :raises InvalidBranchId: The requested branch name cannot be used. Branch names cannot be empty and must not look like RIDs or UUIDs. - :raises InvalidParameterCombination: The given parameters are individually valid but cannot be used in the given combination. - :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v1/datasets/{datasetRid}/files/{filePath}", - query_params={ - "branchId": branch_id, - "endTransactionRid": end_transaction_rid, - "startTransactionRid": start_transaction_rid, - }, - path_params={ - "datasetRid": dataset_rid, - "filePath": file_path, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=datasets_models.File, - request_timeout=request_timeout, - throwable_errors={ - "BranchNotFound": datasets_errors.BranchNotFound, - "DatasetNotFound": datasets_errors.DatasetNotFound, - "FileNotFoundOnBranch": datasets_errors.FileNotFoundOnBranch, - "FileNotFoundOnTransactionRange": datasets_errors.FileNotFoundOnTransactionRange, - "InvalidBranchId": datasets_errors.InvalidBranchId, - "InvalidParameterCombination": core_errors.InvalidParameterCombination, - "TransactionNotFound": datasets_errors.TransactionNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def list( - self, - dataset_rid: datasets_models.DatasetRid, - *, - branch_id: typing.Optional[datasets_models.BranchId] = None, - end_transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - start_transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.ResourceIterator[datasets_models.File]: - """ - Lists Files contained in a Dataset. By default files are listed on the latest view of the default - branch - `master` for most enrollments. - - This endpoint currently does not support views (virtual datasets composed of other datasets). For more information, refer to the [views documentation](https://palantir.com/docs/foundry/data-integration/views). - - #### Advanced Usage - - See [Datasets Core Concepts](https://palantir.com/docs/foundry/data-integration/datasets/) for details on using branches and transactions. - - To **list files on a specific Branch** specify the Branch's identifier as `branchId`. This will include the most - recent version of all files since the latest snapshot transaction, or the earliest ancestor transaction of the - branch if there are no snapshot transactions. - - To **list files on the resolved view of a transaction** specify the Transaction's resource identifier - as `endTransactionRid`. This will include the most recent version of all files since the latest snapshot - transaction, or the earliest ancestor transaction if there are no snapshot transactions. - - To **list files on the resolved view of a range of transactions** specify the the start transaction's resource - identifier as `startTransactionRid` and the end transaction's resource identifier as `endTransactionRid`. This - will include the most recent version of all files since the `startTransactionRid` up to the `endTransactionRid`. - Note that an intermediate snapshot transaction will remove all files from the view. Behavior is undefined when - the start and end transactions do not belong to the same root-to-leaf path. - - To **list files on a specific transaction** specify the Transaction's resource identifier as both the - `startTransactionRid` and `endTransactionRid`. This will include only files that were modified as part of that - Transaction. - - :param dataset_rid: The Resource Identifier (RID) of the Dataset on which to list Files. - :type dataset_rid: DatasetRid - :param branch_id: The identifier (name) of the Branch on which to list Files. Defaults to `master` for most enrollments. - :type branch_id: Optional[BranchId] - :param end_transaction_rid: The Resource Identifier (RID) of the end Transaction. - :type end_transaction_rid: Optional[TransactionRid] - :param page_size: The desired size of the page to be returned. Defaults to 1,000. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. - :type page_size: Optional[PageSize] - :param page_token: - :type page_token: Optional[PageToken] - :param start_transaction_rid: The Resource Identifier (RID) of the start Transaction. - :type start_transaction_rid: Optional[TransactionRid] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.ResourceIterator[datasets_models.File] - - :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. - :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. - :raises InvalidBranchId: The requested branch name cannot be used. Branch names cannot be empty and must not look like RIDs or UUIDs. - :raises InvalidParameterCombination: The given parameters are individually valid but cannot be used in the given combination. - :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v1/datasets/{datasetRid}/files", - query_params={ - "branchId": branch_id, - "endTransactionRid": end_transaction_rid, - "pageSize": page_size, - "pageToken": page_token, - "startTransactionRid": start_transaction_rid, - }, - path_params={ - "datasetRid": dataset_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=datasets_models.ListFilesResponse, - request_timeout=request_timeout, - throwable_errors={ - "BranchNotFound": datasets_errors.BranchNotFound, - "DatasetNotFound": datasets_errors.DatasetNotFound, - "InvalidBranchId": datasets_errors.InvalidBranchId, - "InvalidParameterCombination": core_errors.InvalidParameterCombination, - "TransactionNotFound": datasets_errors.TransactionNotFound, - }, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def read( - self, - dataset_rid: datasets_models.DatasetRid, - file_path: core_models.FilePath, - *, - branch_id: typing.Optional[datasets_models.BranchId] = None, - end_transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, - start_transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> bytes: - """ - Gets the content of a File contained in a Dataset. By default this retrieves the file's content from the latest - view of the default branch - `master` for most enrollments. - - This endpoint currently does not support views (virtual datasets composed of other datasets). For more information, refer to the [views documentation](https://palantir.com/docs/foundry/data-integration/views). - - #### Advanced Usage - - See [Datasets Core Concepts](https://palantir.com/docs/foundry/data-integration/datasets/) for details on using branches and transactions. - - To **get a file's content from a specific Branch** specify the Branch's identifier as `branchId`. This will - retrieve the content for the most recent version of the file since the latest snapshot transaction, or the - earliest ancestor transaction of the branch if there are no snapshot transactions. - - To **get a file's content from the resolved view of a transaction** specify the Transaction's resource identifier - as `endTransactionRid`. This will retrieve the content for the most recent version of the file since the latest - snapshot transaction, or the earliest ancestor transaction if there are no snapshot transactions. - - To **get a file's content from the resolved view of a range of transactions** specify the the start transaction's - resource identifier as `startTransactionRid` and the end transaction's resource identifier as `endTransactionRid`. - This will retrieve the content for the most recent version of the file since the `startTransactionRid` up to the - `endTransactionRid`. Note that an intermediate snapshot transaction will remove all files from the view. Behavior - is undefined when the start and end transactions do not belong to the same root-to-leaf path. - - To **get a file's content from a specific transaction** specify the Transaction's resource identifier as both the - `startTransactionRid` and `endTransactionRid`. - - :param dataset_rid: The Resource Identifier (RID) of the Dataset that contains the File. - :type dataset_rid: DatasetRid - :param file_path: The File's path within the Dataset. - :type file_path: FilePath - :param branch_id: The identifier (name) of the Branch that contains the File. Defaults to `master` for most enrollments. - :type branch_id: Optional[BranchId] - :param end_transaction_rid: The Resource Identifier (RID) of the end Transaction. - :type end_transaction_rid: Optional[TransactionRid] - :param start_transaction_rid: The Resource Identifier (RID) of the start Transaction. - :type start_transaction_rid: Optional[TransactionRid] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: bytes - - :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. - :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. - :raises FileNotFoundOnBranch: The requested file could not be found on the given branch, or the client token does not have access to it. - :raises FileNotFoundOnTransactionRange: The requested file could not be found on the given transaction range, or the client token does not have access to it. - :raises InvalidBranchId: The requested branch name cannot be used. Branch names cannot be empty and must not look like RIDs or UUIDs. - :raises InvalidParameterCombination: The given parameters are individually valid but cannot be used in the given combination. - :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v1/datasets/{datasetRid}/files/{filePath}/content", - query_params={ - "branchId": branch_id, - "endTransactionRid": end_transaction_rid, - "startTransactionRid": start_transaction_rid, - }, - path_params={ - "datasetRid": dataset_rid, - "filePath": file_path, - }, - header_params={ - "Accept": "*/*", - }, - body=None, - response_type=bytes, - request_timeout=request_timeout, - throwable_errors={ - "BranchNotFound": datasets_errors.BranchNotFound, - "DatasetNotFound": datasets_errors.DatasetNotFound, - "FileNotFoundOnBranch": datasets_errors.FileNotFoundOnBranch, - "FileNotFoundOnTransactionRange": datasets_errors.FileNotFoundOnTransactionRange, - "InvalidBranchId": datasets_errors.InvalidBranchId, - "InvalidParameterCombination": core_errors.InvalidParameterCombination, - "TransactionNotFound": datasets_errors.TransactionNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def upload( - self, - dataset_rid: datasets_models.DatasetRid, - body: bytes, - *, - file_path: core_models.FilePath, - branch_id: typing.Optional[datasets_models.BranchId] = None, - transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, - transaction_type: typing.Optional[datasets_models.TransactionType] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> datasets_models.File: - """ - Uploads a File to an existing Dataset. - The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`. - - By default the file is uploaded to a new transaction on the default branch - `master` for most enrollments. - If the file already exists only the most recent version will be visible in the updated view. - - #### Advanced Usage - - See [Datasets Core Concepts](https://palantir.com/docs/foundry/data-integration/datasets/) for details on using branches and transactions. - - To **upload a file to a specific Branch** specify the Branch's identifier as `branchId`. A new transaction will - be created and committed on this branch. By default the TransactionType will be `UPDATE`, to override this - default specify `transactionType` in addition to `branchId`. - See [createBranch](https://palantir.com/docs/foundry/api/datasets-resources/branches/create-branch/) to create a custom branch. - - To **upload a file on a manually opened transaction** specify the Transaction's resource identifier as - `transactionRid`. This is useful for uploading multiple files in a single transaction. - See [createTransaction](https://palantir.com/docs/foundry/api/datasets-resources/transactions/create-transaction/) to open a transaction. - - :param dataset_rid: The Resource Identifier (RID) of the Dataset on which to upload the File. - :type dataset_rid: DatasetRid - :param body: Body of the request - :type body: bytes - :param file_path: The File's path within the Dataset. - :type file_path: FilePath - :param branch_id: The identifier (name) of the Branch on which to upload the File. Defaults to `master` for most enrollments. - :type branch_id: Optional[BranchId] - :param transaction_rid: The Resource Identifier (RID) of the open Transaction on which to upload the File. - :type transaction_rid: Optional[TransactionRid] - :param transaction_type: The type of the Transaction to create when using branchId. Defaults to `UPDATE`. - :type transaction_type: Optional[TransactionType] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: datasets_models.File - - :raises AbortTransactionPermissionDenied: The provided token does not have permission to abort the given transaction on the given dataset. - :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. - :raises CommitTransactionPermissionDenied: The provided token does not have permission to commit the given transaction on the given dataset. - :raises CreateTransactionPermissionDenied: The provided token does not have permission to create a transaction on this dataset. - :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. - :raises FileAlreadyExists: The given file path already exists in the dataset and transaction. - :raises InvalidBranchId: The requested branch name cannot be used. Branch names cannot be empty and must not look like RIDs or UUIDs. - :raises InvalidFilePath: The provided file path is not valid. - :raises InvalidParameterCombination: The given parameters are individually valid but cannot be used in the given combination. - :raises OpenTransactionAlreadyExists: A transaction is already open on this dataset and branch. A branch of a dataset can only have one open transaction at a time. - :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. - :raises TransactionNotOpen: The given transaction is not open. - :raises UploadFilePermissionDenied: The provided token does not have permission to upload the given file to the given dataset and transaction. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v1/datasets/{datasetRid}/files:upload", - query_params={ - "filePath": file_path, - "branchId": branch_id, - "transactionRid": transaction_rid, - "transactionType": transaction_type, - }, - path_params={ - "datasetRid": dataset_rid, - }, - header_params={ - "Content-Type": "*/*", - "Accept": "application/json", - }, - body=body, - response_type=datasets_models.File, - request_timeout=request_timeout, - throwable_errors={ - "AbortTransactionPermissionDenied": datasets_errors.AbortTransactionPermissionDenied, - "BranchNotFound": datasets_errors.BranchNotFound, - "CommitTransactionPermissionDenied": datasets_errors.CommitTransactionPermissionDenied, - "CreateTransactionPermissionDenied": datasets_errors.CreateTransactionPermissionDenied, - "DatasetNotFound": datasets_errors.DatasetNotFound, - "FileAlreadyExists": datasets_errors.FileAlreadyExists, - "InvalidBranchId": datasets_errors.InvalidBranchId, - "InvalidFilePath": core_errors.InvalidFilePath, - "InvalidParameterCombination": core_errors.InvalidParameterCombination, - "OpenTransactionAlreadyExists": datasets_errors.OpenTransactionAlreadyExists, - "TransactionNotFound": datasets_errors.TransactionNotFound, - "TransactionNotOpen": datasets_errors.TransactionNotOpen, - "UploadFilePermissionDenied": datasets_errors.UploadFilePermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _FileClientRaw: - def __init__(self, client: FileClient) -> None: - def delete(_: None): ... - def get(_: datasets_models.File): ... - def list(_: datasets_models.ListFilesResponse): ... - def read(_: bytes): ... - def upload(_: datasets_models.File): ... - - self.delete = core.with_raw_response(delete, client.delete) - self.get = core.with_raw_response(get, client.get) - self.list = core.with_raw_response(list, client.list) - self.read = core.with_raw_response(read, client.read) - self.upload = core.with_raw_response(upload, client.upload) - - -class _FileClientStreaming: - def __init__(self, client: FileClient) -> None: - def get(_: datasets_models.File): ... - def list(_: datasets_models.ListFilesResponse): ... - def read(_: bytes): ... - def upload(_: datasets_models.File): ... - - self.get = core.with_streaming_response(get, client.get) - self.list = core.with_streaming_response(list, client.list) - self.read = core.with_streaming_response(read, client.read) - self.upload = core.with_streaming_response(upload, client.upload) - - -class AsyncFileClient: - """ - The API client for the File Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AsyncFileClientStreaming(self) - self.with_raw_response = _AsyncFileClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def delete( - self, - dataset_rid: datasets_models.DatasetRid, - file_path: core_models.FilePath, - *, - branch_id: typing.Optional[datasets_models.BranchId] = None, - transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[None]: - """ - Deletes a File from a Dataset. By default the file is deleted in a new transaction on the default - branch - `master` for most enrollments. The file will still be visible on historical views. - - #### Advanced Usage - - See [Datasets Core Concepts](https://palantir.com/docs/foundry/data-integration/datasets/) for details on using branches and transactions. - - To **delete a File from a specific Branch** specify the Branch's identifier as `branchId`. A new delete Transaction - will be created and committed on this branch. - - To **delete a File using a manually opened Transaction**, specify the Transaction's resource identifier - as `transactionRid`. The transaction must be of type `DELETE`. This is useful for deleting multiple files in a - single transaction. See [createTransaction](https://palantir.com/docs/foundry/api/datasets-resources/transactions/create-transaction/) to - open a transaction. - - :param dataset_rid: The Resource Identifier (RID) of the Dataset on which to delete the File. - :type dataset_rid: DatasetRid - :param file_path: The File path within the Dataset. - :type file_path: FilePath - :param branch_id: The identifier (name) of the Branch on which to delete the File. Defaults to `master` for most enrollments. - :type branch_id: Optional[BranchId] - :param transaction_rid: The Resource Identifier (RID) of the open delete Transaction on which to delete the File. - :type transaction_rid: Optional[TransactionRid] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[None] - - :raises AbortTransactionPermissionDenied: The provided token does not have permission to abort the given transaction on the given dataset. - :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. - :raises CommitTransactionPermissionDenied: The provided token does not have permission to commit the given transaction on the given dataset. - :raises CreateTransactionPermissionDenied: The provided token does not have permission to create a transaction on this dataset. - :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. - :raises FileNotFoundOnBranch: The requested file could not be found on the given branch, or the client token does not have access to it. - :raises FileNotFoundOnTransactionRange: The requested file could not be found on the given transaction range, or the client token does not have access to it. - :raises InvalidBranchId: The requested branch name cannot be used. Branch names cannot be empty and must not look like RIDs or UUIDs. - :raises InvalidParameterCombination: The given parameters are individually valid but cannot be used in the given combination. - :raises InvalidTransactionType: The given transaction type is not valid. Valid transaction types are `SNAPSHOT`, `UPDATE`, `APPEND`, and `DELETE`. - :raises OpenTransactionAlreadyExists: A transaction is already open on this dataset and branch. A branch of a dataset can only have one open transaction at a time. - :raises PutSchemaPermissionDenied: todo - :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. - :raises TransactionNotOpen: The given transaction is not open. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="DELETE", - resource_path="/v1/datasets/{datasetRid}/files/{filePath}", - query_params={ - "branchId": branch_id, - "transactionRid": transaction_rid, - }, - path_params={ - "datasetRid": dataset_rid, - "filePath": file_path, - }, - header_params={}, - body=None, - response_type=None, - request_timeout=request_timeout, - throwable_errors={ - "AbortTransactionPermissionDenied": datasets_errors.AbortTransactionPermissionDenied, - "BranchNotFound": datasets_errors.BranchNotFound, - "CommitTransactionPermissionDenied": datasets_errors.CommitTransactionPermissionDenied, - "CreateTransactionPermissionDenied": datasets_errors.CreateTransactionPermissionDenied, - "DatasetNotFound": datasets_errors.DatasetNotFound, - "FileNotFoundOnBranch": datasets_errors.FileNotFoundOnBranch, - "FileNotFoundOnTransactionRange": datasets_errors.FileNotFoundOnTransactionRange, - "InvalidBranchId": datasets_errors.InvalidBranchId, - "InvalidParameterCombination": core_errors.InvalidParameterCombination, - "InvalidTransactionType": datasets_errors.InvalidTransactionType, - "OpenTransactionAlreadyExists": datasets_errors.OpenTransactionAlreadyExists, - "PutSchemaPermissionDenied": datasets_errors.PutSchemaPermissionDenied, - "TransactionNotFound": datasets_errors.TransactionNotFound, - "TransactionNotOpen": datasets_errors.TransactionNotOpen, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - dataset_rid: datasets_models.DatasetRid, - file_path: core_models.FilePath, - *, - branch_id: typing.Optional[datasets_models.BranchId] = None, - end_transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, - start_transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[datasets_models.File]: - """ - Gets metadata about a File contained in a Dataset. By default this retrieves the file's metadata from the latest - view of the default branch - `master` for most enrollments. - - #### Advanced Usage - - See [Datasets Core Concepts](https://palantir.com/docs/foundry/data-integration/datasets/) for details on using branches and transactions. - - To **get a file's metadata from a specific Branch** specify the Branch's identifier as `branchId`. This will - retrieve metadata for the most recent version of the file since the latest snapshot transaction, or the earliest - ancestor transaction of the branch if there are no snapshot transactions. - - To **get a file's metadata from the resolved view of a transaction** specify the Transaction's resource identifier - as `endTransactionRid`. This will retrieve metadata for the most recent version of the file since the latest snapshot - transaction, or the earliest ancestor transaction if there are no snapshot transactions. - - To **get a file's metadata from the resolved view of a range of transactions** specify the the start transaction's - resource identifier as `startTransactionRid` and the end transaction's resource identifier as `endTransactionRid`. - This will retrieve metadata for the most recent version of the file since the `startTransactionRid` up to the - `endTransactionRid`. Behavior is undefined when the start and end transactions do not belong to the same root-to-leaf path. - - To **get a file's metadata from a specific transaction** specify the Transaction's resource identifier as both the - `startTransactionRid` and `endTransactionRid`. - - :param dataset_rid: The Resource Identifier (RID) of the Dataset that contains the File. - :type dataset_rid: DatasetRid - :param file_path: The File's path within the Dataset. - :type file_path: FilePath - :param branch_id: The identifier (name) of the Branch that contains the File. Defaults to `master` for most enrollments. - :type branch_id: Optional[BranchId] - :param end_transaction_rid: The Resource Identifier (RID) of the end Transaction. - :type end_transaction_rid: Optional[TransactionRid] - :param start_transaction_rid: The Resource Identifier (RID) of the start Transaction. - :type start_transaction_rid: Optional[TransactionRid] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[datasets_models.File] - - :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. - :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. - :raises FileNotFoundOnBranch: The requested file could not be found on the given branch, or the client token does not have access to it. - :raises FileNotFoundOnTransactionRange: The requested file could not be found on the given transaction range, or the client token does not have access to it. - :raises InvalidBranchId: The requested branch name cannot be used. Branch names cannot be empty and must not look like RIDs or UUIDs. - :raises InvalidParameterCombination: The given parameters are individually valid but cannot be used in the given combination. - :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v1/datasets/{datasetRid}/files/{filePath}", - query_params={ - "branchId": branch_id, - "endTransactionRid": end_transaction_rid, - "startTransactionRid": start_transaction_rid, - }, - path_params={ - "datasetRid": dataset_rid, - "filePath": file_path, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=datasets_models.File, - request_timeout=request_timeout, - throwable_errors={ - "BranchNotFound": datasets_errors.BranchNotFound, - "DatasetNotFound": datasets_errors.DatasetNotFound, - "FileNotFoundOnBranch": datasets_errors.FileNotFoundOnBranch, - "FileNotFoundOnTransactionRange": datasets_errors.FileNotFoundOnTransactionRange, - "InvalidBranchId": datasets_errors.InvalidBranchId, - "InvalidParameterCombination": core_errors.InvalidParameterCombination, - "TransactionNotFound": datasets_errors.TransactionNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def list( - self, - dataset_rid: datasets_models.DatasetRid, - *, - branch_id: typing.Optional[datasets_models.BranchId] = None, - end_transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - start_transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.AsyncResourceIterator[datasets_models.File]: - """ - Lists Files contained in a Dataset. By default files are listed on the latest view of the default - branch - `master` for most enrollments. - - This endpoint currently does not support views (virtual datasets composed of other datasets). For more information, refer to the [views documentation](https://palantir.com/docs/foundry/data-integration/views). - - #### Advanced Usage - - See [Datasets Core Concepts](https://palantir.com/docs/foundry/data-integration/datasets/) for details on using branches and transactions. - - To **list files on a specific Branch** specify the Branch's identifier as `branchId`. This will include the most - recent version of all files since the latest snapshot transaction, or the earliest ancestor transaction of the - branch if there are no snapshot transactions. - - To **list files on the resolved view of a transaction** specify the Transaction's resource identifier - as `endTransactionRid`. This will include the most recent version of all files since the latest snapshot - transaction, or the earliest ancestor transaction if there are no snapshot transactions. - - To **list files on the resolved view of a range of transactions** specify the the start transaction's resource - identifier as `startTransactionRid` and the end transaction's resource identifier as `endTransactionRid`. This - will include the most recent version of all files since the `startTransactionRid` up to the `endTransactionRid`. - Note that an intermediate snapshot transaction will remove all files from the view. Behavior is undefined when - the start and end transactions do not belong to the same root-to-leaf path. - - To **list files on a specific transaction** specify the Transaction's resource identifier as both the - `startTransactionRid` and `endTransactionRid`. This will include only files that were modified as part of that - Transaction. - - :param dataset_rid: The Resource Identifier (RID) of the Dataset on which to list Files. - :type dataset_rid: DatasetRid - :param branch_id: The identifier (name) of the Branch on which to list Files. Defaults to `master` for most enrollments. - :type branch_id: Optional[BranchId] - :param end_transaction_rid: The Resource Identifier (RID) of the end Transaction. - :type end_transaction_rid: Optional[TransactionRid] - :param page_size: The desired size of the page to be returned. Defaults to 1,000. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. - :type page_size: Optional[PageSize] - :param page_token: - :type page_token: Optional[PageToken] - :param start_transaction_rid: The Resource Identifier (RID) of the start Transaction. - :type start_transaction_rid: Optional[TransactionRid] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.AsyncResourceIterator[datasets_models.File] - - :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. - :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. - :raises InvalidBranchId: The requested branch name cannot be used. Branch names cannot be empty and must not look like RIDs or UUIDs. - :raises InvalidParameterCombination: The given parameters are individually valid but cannot be used in the given combination. - :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v1/datasets/{datasetRid}/files", - query_params={ - "branchId": branch_id, - "endTransactionRid": end_transaction_rid, - "pageSize": page_size, - "pageToken": page_token, - "startTransactionRid": start_transaction_rid, - }, - path_params={ - "datasetRid": dataset_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=datasets_models.ListFilesResponse, - request_timeout=request_timeout, - throwable_errors={ - "BranchNotFound": datasets_errors.BranchNotFound, - "DatasetNotFound": datasets_errors.DatasetNotFound, - "InvalidBranchId": datasets_errors.InvalidBranchId, - "InvalidParameterCombination": core_errors.InvalidParameterCombination, - "TransactionNotFound": datasets_errors.TransactionNotFound, - }, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def read( - self, - dataset_rid: datasets_models.DatasetRid, - file_path: core_models.FilePath, - *, - branch_id: typing.Optional[datasets_models.BranchId] = None, - end_transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, - start_transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[bytes]: - """ - Gets the content of a File contained in a Dataset. By default this retrieves the file's content from the latest - view of the default branch - `master` for most enrollments. - - This endpoint currently does not support views (virtual datasets composed of other datasets). For more information, refer to the [views documentation](https://palantir.com/docs/foundry/data-integration/views). - - #### Advanced Usage - - See [Datasets Core Concepts](https://palantir.com/docs/foundry/data-integration/datasets/) for details on using branches and transactions. - - To **get a file's content from a specific Branch** specify the Branch's identifier as `branchId`. This will - retrieve the content for the most recent version of the file since the latest snapshot transaction, or the - earliest ancestor transaction of the branch if there are no snapshot transactions. - - To **get a file's content from the resolved view of a transaction** specify the Transaction's resource identifier - as `endTransactionRid`. This will retrieve the content for the most recent version of the file since the latest - snapshot transaction, or the earliest ancestor transaction if there are no snapshot transactions. - - To **get a file's content from the resolved view of a range of transactions** specify the the start transaction's - resource identifier as `startTransactionRid` and the end transaction's resource identifier as `endTransactionRid`. - This will retrieve the content for the most recent version of the file since the `startTransactionRid` up to the - `endTransactionRid`. Note that an intermediate snapshot transaction will remove all files from the view. Behavior - is undefined when the start and end transactions do not belong to the same root-to-leaf path. - - To **get a file's content from a specific transaction** specify the Transaction's resource identifier as both the - `startTransactionRid` and `endTransactionRid`. - - :param dataset_rid: The Resource Identifier (RID) of the Dataset that contains the File. - :type dataset_rid: DatasetRid - :param file_path: The File's path within the Dataset. - :type file_path: FilePath - :param branch_id: The identifier (name) of the Branch that contains the File. Defaults to `master` for most enrollments. - :type branch_id: Optional[BranchId] - :param end_transaction_rid: The Resource Identifier (RID) of the end Transaction. - :type end_transaction_rid: Optional[TransactionRid] - :param start_transaction_rid: The Resource Identifier (RID) of the start Transaction. - :type start_transaction_rid: Optional[TransactionRid] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[bytes] - - :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. - :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. - :raises FileNotFoundOnBranch: The requested file could not be found on the given branch, or the client token does not have access to it. - :raises FileNotFoundOnTransactionRange: The requested file could not be found on the given transaction range, or the client token does not have access to it. - :raises InvalidBranchId: The requested branch name cannot be used. Branch names cannot be empty and must not look like RIDs or UUIDs. - :raises InvalidParameterCombination: The given parameters are individually valid but cannot be used in the given combination. - :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v1/datasets/{datasetRid}/files/{filePath}/content", - query_params={ - "branchId": branch_id, - "endTransactionRid": end_transaction_rid, - "startTransactionRid": start_transaction_rid, - }, - path_params={ - "datasetRid": dataset_rid, - "filePath": file_path, - }, - header_params={ - "Accept": "*/*", - }, - body=None, - response_type=bytes, - request_timeout=request_timeout, - throwable_errors={ - "BranchNotFound": datasets_errors.BranchNotFound, - "DatasetNotFound": datasets_errors.DatasetNotFound, - "FileNotFoundOnBranch": datasets_errors.FileNotFoundOnBranch, - "FileNotFoundOnTransactionRange": datasets_errors.FileNotFoundOnTransactionRange, - "InvalidBranchId": datasets_errors.InvalidBranchId, - "InvalidParameterCombination": core_errors.InvalidParameterCombination, - "TransactionNotFound": datasets_errors.TransactionNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def upload( - self, - dataset_rid: datasets_models.DatasetRid, - body: bytes, - *, - file_path: core_models.FilePath, - branch_id: typing.Optional[datasets_models.BranchId] = None, - transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, - transaction_type: typing.Optional[datasets_models.TransactionType] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[datasets_models.File]: - """ - Uploads a File to an existing Dataset. - The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`. - - By default the file is uploaded to a new transaction on the default branch - `master` for most enrollments. - If the file already exists only the most recent version will be visible in the updated view. - - #### Advanced Usage - - See [Datasets Core Concepts](https://palantir.com/docs/foundry/data-integration/datasets/) for details on using branches and transactions. - - To **upload a file to a specific Branch** specify the Branch's identifier as `branchId`. A new transaction will - be created and committed on this branch. By default the TransactionType will be `UPDATE`, to override this - default specify `transactionType` in addition to `branchId`. - See [createBranch](https://palantir.com/docs/foundry/api/datasets-resources/branches/create-branch/) to create a custom branch. - - To **upload a file on a manually opened transaction** specify the Transaction's resource identifier as - `transactionRid`. This is useful for uploading multiple files in a single transaction. - See [createTransaction](https://palantir.com/docs/foundry/api/datasets-resources/transactions/create-transaction/) to open a transaction. - - :param dataset_rid: The Resource Identifier (RID) of the Dataset on which to upload the File. - :type dataset_rid: DatasetRid - :param body: Body of the request - :type body: bytes - :param file_path: The File's path within the Dataset. - :type file_path: FilePath - :param branch_id: The identifier (name) of the Branch on which to upload the File. Defaults to `master` for most enrollments. - :type branch_id: Optional[BranchId] - :param transaction_rid: The Resource Identifier (RID) of the open Transaction on which to upload the File. - :type transaction_rid: Optional[TransactionRid] - :param transaction_type: The type of the Transaction to create when using branchId. Defaults to `UPDATE`. - :type transaction_type: Optional[TransactionType] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[datasets_models.File] - - :raises AbortTransactionPermissionDenied: The provided token does not have permission to abort the given transaction on the given dataset. - :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. - :raises CommitTransactionPermissionDenied: The provided token does not have permission to commit the given transaction on the given dataset. - :raises CreateTransactionPermissionDenied: The provided token does not have permission to create a transaction on this dataset. - :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. - :raises FileAlreadyExists: The given file path already exists in the dataset and transaction. - :raises InvalidBranchId: The requested branch name cannot be used. Branch names cannot be empty and must not look like RIDs or UUIDs. - :raises InvalidFilePath: The provided file path is not valid. - :raises InvalidParameterCombination: The given parameters are individually valid but cannot be used in the given combination. - :raises OpenTransactionAlreadyExists: A transaction is already open on this dataset and branch. A branch of a dataset can only have one open transaction at a time. - :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. - :raises TransactionNotOpen: The given transaction is not open. - :raises UploadFilePermissionDenied: The provided token does not have permission to upload the given file to the given dataset and transaction. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v1/datasets/{datasetRid}/files:upload", - query_params={ - "filePath": file_path, - "branchId": branch_id, - "transactionRid": transaction_rid, - "transactionType": transaction_type, - }, - path_params={ - "datasetRid": dataset_rid, - }, - header_params={ - "Content-Type": "*/*", - "Accept": "application/json", - }, - body=body, - response_type=datasets_models.File, - request_timeout=request_timeout, - throwable_errors={ - "AbortTransactionPermissionDenied": datasets_errors.AbortTransactionPermissionDenied, - "BranchNotFound": datasets_errors.BranchNotFound, - "CommitTransactionPermissionDenied": datasets_errors.CommitTransactionPermissionDenied, - "CreateTransactionPermissionDenied": datasets_errors.CreateTransactionPermissionDenied, - "DatasetNotFound": datasets_errors.DatasetNotFound, - "FileAlreadyExists": datasets_errors.FileAlreadyExists, - "InvalidBranchId": datasets_errors.InvalidBranchId, - "InvalidFilePath": core_errors.InvalidFilePath, - "InvalidParameterCombination": core_errors.InvalidParameterCombination, - "OpenTransactionAlreadyExists": datasets_errors.OpenTransactionAlreadyExists, - "TransactionNotFound": datasets_errors.TransactionNotFound, - "TransactionNotOpen": datasets_errors.TransactionNotOpen, - "UploadFilePermissionDenied": datasets_errors.UploadFilePermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _AsyncFileClientRaw: - def __init__(self, client: AsyncFileClient) -> None: - def delete(_: None): ... - def get(_: datasets_models.File): ... - def list(_: datasets_models.ListFilesResponse): ... - def read(_: bytes): ... - def upload(_: datasets_models.File): ... - - self.delete = core.async_with_raw_response(delete, client.delete) - self.get = core.async_with_raw_response(get, client.get) - self.list = core.async_with_raw_response(list, client.list) - self.read = core.async_with_raw_response(read, client.read) - self.upload = core.async_with_raw_response(upload, client.upload) - - -class _AsyncFileClientStreaming: - def __init__(self, client: AsyncFileClient) -> None: - def get(_: datasets_models.File): ... - def list(_: datasets_models.ListFilesResponse): ... - def read(_: bytes): ... - def upload(_: datasets_models.File): ... - - self.get = core.async_with_streaming_response(get, client.get) - self.list = core.async_with_streaming_response(list, client.list) - self.read = core.async_with_streaming_response(read, client.read) - self.upload = core.async_with_streaming_response(upload, client.upload) diff --git a/foundry_sdk/v1/datasets/models.py b/foundry_sdk/v1/datasets/models.py deleted file mode 100644 index f62556c9d..000000000 --- a/foundry_sdk/v1/datasets/models.py +++ /dev/null @@ -1,143 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -from __future__ import annotations - -import typing - -import pydantic - -from foundry_sdk import _core as core -from foundry_sdk.v1.core import models as core_models - - -class Branch(core.ModelBase): - """A Branch of a Dataset.""" - - branch_id: BranchId = pydantic.Field(alias=str("branchId")) # type: ignore[literal-required] - transaction_rid: typing.Optional[TransactionRid] = pydantic.Field(alias=str("transactionRid"), default=None) # type: ignore[literal-required] - - -BranchId = str -"""The identifier (name) of a Branch.""" - - -class CreateBranchRequest(core.ModelBase): - """CreateBranchRequest""" - - branch_id: BranchId = pydantic.Field(alias=str("branchId")) # type: ignore[literal-required] - transaction_rid: typing.Optional[TransactionRid] = pydantic.Field(alias=str("transactionRid"), default=None) # type: ignore[literal-required] - - -class CreateDatasetRequest(core.ModelBase): - """CreateDatasetRequest""" - - name: DatasetName - parent_folder_rid: core_models.FolderRid = pydantic.Field(alias=str("parentFolderRid")) # type: ignore[literal-required] - - -class CreateTransactionRequest(core.ModelBase): - """CreateTransactionRequest""" - - transaction_type: typing.Optional[TransactionType] = pydantic.Field(alias=str("transactionType"), default=None) # type: ignore[literal-required] - - -class Dataset(core.ModelBase): - """Dataset""" - - rid: DatasetRid - name: DatasetName - parent_folder_rid: core_models.FolderRid = pydantic.Field(alias=str("parentFolderRid")) # type: ignore[literal-required] - - -DatasetName = str -"""DatasetName""" - - -DatasetRid = core.RID -"""The Resource Identifier (RID) of a Dataset.""" - - -class File(core.ModelBase): - """File""" - - path: core_models.FilePath - transaction_rid: TransactionRid = pydantic.Field(alias=str("transactionRid")) # type: ignore[literal-required] - size_bytes: typing.Optional[core.Long] = pydantic.Field(alias=str("sizeBytes"), default=None) # type: ignore[literal-required] - updated_time: core.AwareDatetime = pydantic.Field(alias=str("updatedTime")) # type: ignore[literal-required] - - -class ListBranchesResponse(core.ModelBase): - """ListBranchesResponse""" - - next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] - data: typing.List[Branch] - """The list of branches in the current page.""" - - -class ListFilesResponse(core.ModelBase): - """A page of Files and an optional page token that can be used to retrieve the next page.""" - - next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] - data: typing.List[File] - - -TableExportFormat = typing.Literal["ARROW", "CSV"] -"""Format for tabular dataset export.""" - - -class Transaction(core.ModelBase): - """An operation that modifies the files within a dataset.""" - - rid: TransactionRid - transaction_type: TransactionType = pydantic.Field(alias=str("transactionType")) # type: ignore[literal-required] - status: TransactionStatus - created_time: core.AwareDatetime = pydantic.Field(alias=str("createdTime")) # type: ignore[literal-required] - """The timestamp when the transaction was created, in ISO 8601 timestamp format.""" - - closed_time: typing.Optional[core.AwareDatetime] = pydantic.Field(alias=str("closedTime"), default=None) # type: ignore[literal-required] - """The timestamp when the transaction was closed, in ISO 8601 timestamp format.""" - - -TransactionRid = core.RID -"""The Resource Identifier (RID) of a Transaction.""" - - -TransactionStatus = typing.Literal["ABORTED", "COMMITTED", "OPEN"] -"""The status of a Transaction.""" - - -TransactionType = typing.Literal["APPEND", "UPDATE", "SNAPSHOT", "DELETE"] -"""The type of a Transaction.""" - - -__all__ = [ - "Branch", - "BranchId", - "CreateBranchRequest", - "CreateDatasetRequest", - "CreateTransactionRequest", - "Dataset", - "DatasetName", - "DatasetRid", - "File", - "ListBranchesResponse", - "ListFilesResponse", - "TableExportFormat", - "Transaction", - "TransactionRid", - "TransactionStatus", - "TransactionType", -] diff --git a/foundry_sdk/v1/datasets/transaction.py b/foundry_sdk/v1/datasets/transaction.py deleted file mode 100644 index 1ebae8648..000000000 --- a/foundry_sdk/v1/datasets/transaction.py +++ /dev/null @@ -1,570 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing - -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v1.datasets import errors as datasets_errors -from foundry_sdk.v1.datasets import models as datasets_models - - -class TransactionClient: - """ - The API client for the Transaction Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _TransactionClientStreaming(self) - self.with_raw_response = _TransactionClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def abort( - self, - dataset_rid: datasets_models.DatasetRid, - transaction_rid: datasets_models.TransactionRid, - *, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> datasets_models.Transaction: - """ - Aborts an open Transaction. File modifications made on this Transaction are not preserved and the Branch is - not updated. - - :param dataset_rid: The Resource Identifier (RID) of the Dataset that contains the Transaction. - :type dataset_rid: DatasetRid - :param transaction_rid: The Resource Identifier (RID) of the Transaction. - :type transaction_rid: TransactionRid - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: datasets_models.Transaction - - :raises AbortTransactionPermissionDenied: The provided token does not have permission to abort the given transaction on the given dataset. - :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. - :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. - :raises TransactionNotOpen: The given transaction is not open. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v1/datasets/{datasetRid}/transactions/{transactionRid}/abort", - query_params={}, - path_params={ - "datasetRid": dataset_rid, - "transactionRid": transaction_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=datasets_models.Transaction, - request_timeout=request_timeout, - throwable_errors={ - "AbortTransactionPermissionDenied": datasets_errors.AbortTransactionPermissionDenied, - "DatasetNotFound": datasets_errors.DatasetNotFound, - "TransactionNotFound": datasets_errors.TransactionNotFound, - "TransactionNotOpen": datasets_errors.TransactionNotOpen, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def commit( - self, - dataset_rid: datasets_models.DatasetRid, - transaction_rid: datasets_models.TransactionRid, - *, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> datasets_models.Transaction: - """ - Commits an open Transaction. File modifications made on this Transaction are preserved and the Branch is - updated to point to the Transaction. - - :param dataset_rid: The Resource Identifier (RID) of the Dataset that contains the Transaction. - :type dataset_rid: DatasetRid - :param transaction_rid: The Resource Identifier (RID) of the Transaction. - :type transaction_rid: TransactionRid - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: datasets_models.Transaction - - :raises CommitTransactionPermissionDenied: The provided token does not have permission to commit the given transaction on the given dataset. - :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. - :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. - :raises TransactionNotOpen: The given transaction is not open. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v1/datasets/{datasetRid}/transactions/{transactionRid}/commit", - query_params={}, - path_params={ - "datasetRid": dataset_rid, - "transactionRid": transaction_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=datasets_models.Transaction, - request_timeout=request_timeout, - throwable_errors={ - "CommitTransactionPermissionDenied": datasets_errors.CommitTransactionPermissionDenied, - "DatasetNotFound": datasets_errors.DatasetNotFound, - "TransactionNotFound": datasets_errors.TransactionNotFound, - "TransactionNotOpen": datasets_errors.TransactionNotOpen, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def create( - self, - dataset_rid: datasets_models.DatasetRid, - *, - branch_id: typing.Optional[datasets_models.BranchId] = None, - transaction_type: typing.Optional[datasets_models.TransactionType] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> datasets_models.Transaction: - """ - Creates a Transaction on a Branch of a Dataset. - - :param dataset_rid: The Resource Identifier (RID) of the Dataset on which to create the Transaction. - :type dataset_rid: DatasetRid - :param branch_id: The identifier (name) of the Branch on which to create the Transaction. Defaults to `master` for most enrollments. - :type branch_id: Optional[BranchId] - :param transaction_type: - :type transaction_type: Optional[TransactionType] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: datasets_models.Transaction - - :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. - :raises CreateTransactionPermissionDenied: The provided token does not have permission to create a transaction on this dataset. - :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. - :raises InvalidBranchId: The requested branch name cannot be used. Branch names cannot be empty and must not look like RIDs or UUIDs. - :raises OpenTransactionAlreadyExists: A transaction is already open on this dataset and branch. A branch of a dataset can only have one open transaction at a time. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v1/datasets/{datasetRid}/transactions", - query_params={ - "branchId": branch_id, - }, - path_params={ - "datasetRid": dataset_rid, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=datasets_models.CreateTransactionRequest( - transaction_type=transaction_type, - ), - response_type=datasets_models.Transaction, - request_timeout=request_timeout, - throwable_errors={ - "BranchNotFound": datasets_errors.BranchNotFound, - "CreateTransactionPermissionDenied": datasets_errors.CreateTransactionPermissionDenied, - "DatasetNotFound": datasets_errors.DatasetNotFound, - "InvalidBranchId": datasets_errors.InvalidBranchId, - "OpenTransactionAlreadyExists": datasets_errors.OpenTransactionAlreadyExists, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - dataset_rid: datasets_models.DatasetRid, - transaction_rid: datasets_models.TransactionRid, - *, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> datasets_models.Transaction: - """ - Gets a Transaction of a Dataset. - - :param dataset_rid: The Resource Identifier (RID) of the Dataset that contains the Transaction. - :type dataset_rid: DatasetRid - :param transaction_rid: The Resource Identifier (RID) of the Transaction. - :type transaction_rid: TransactionRid - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: datasets_models.Transaction - - :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. - :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v1/datasets/{datasetRid}/transactions/{transactionRid}", - query_params={}, - path_params={ - "datasetRid": dataset_rid, - "transactionRid": transaction_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=datasets_models.Transaction, - request_timeout=request_timeout, - throwable_errors={ - "DatasetNotFound": datasets_errors.DatasetNotFound, - "TransactionNotFound": datasets_errors.TransactionNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _TransactionClientRaw: - def __init__(self, client: TransactionClient) -> None: - def abort(_: datasets_models.Transaction): ... - def commit(_: datasets_models.Transaction): ... - def create(_: datasets_models.Transaction): ... - def get(_: datasets_models.Transaction): ... - - self.abort = core.with_raw_response(abort, client.abort) - self.commit = core.with_raw_response(commit, client.commit) - self.create = core.with_raw_response(create, client.create) - self.get = core.with_raw_response(get, client.get) - - -class _TransactionClientStreaming: - def __init__(self, client: TransactionClient) -> None: - def abort(_: datasets_models.Transaction): ... - def commit(_: datasets_models.Transaction): ... - def create(_: datasets_models.Transaction): ... - def get(_: datasets_models.Transaction): ... - - self.abort = core.with_streaming_response(abort, client.abort) - self.commit = core.with_streaming_response(commit, client.commit) - self.create = core.with_streaming_response(create, client.create) - self.get = core.with_streaming_response(get, client.get) - - -class AsyncTransactionClient: - """ - The API client for the Transaction Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AsyncTransactionClientStreaming(self) - self.with_raw_response = _AsyncTransactionClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def abort( - self, - dataset_rid: datasets_models.DatasetRid, - transaction_rid: datasets_models.TransactionRid, - *, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[datasets_models.Transaction]: - """ - Aborts an open Transaction. File modifications made on this Transaction are not preserved and the Branch is - not updated. - - :param dataset_rid: The Resource Identifier (RID) of the Dataset that contains the Transaction. - :type dataset_rid: DatasetRid - :param transaction_rid: The Resource Identifier (RID) of the Transaction. - :type transaction_rid: TransactionRid - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[datasets_models.Transaction] - - :raises AbortTransactionPermissionDenied: The provided token does not have permission to abort the given transaction on the given dataset. - :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. - :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. - :raises TransactionNotOpen: The given transaction is not open. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v1/datasets/{datasetRid}/transactions/{transactionRid}/abort", - query_params={}, - path_params={ - "datasetRid": dataset_rid, - "transactionRid": transaction_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=datasets_models.Transaction, - request_timeout=request_timeout, - throwable_errors={ - "AbortTransactionPermissionDenied": datasets_errors.AbortTransactionPermissionDenied, - "DatasetNotFound": datasets_errors.DatasetNotFound, - "TransactionNotFound": datasets_errors.TransactionNotFound, - "TransactionNotOpen": datasets_errors.TransactionNotOpen, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def commit( - self, - dataset_rid: datasets_models.DatasetRid, - transaction_rid: datasets_models.TransactionRid, - *, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[datasets_models.Transaction]: - """ - Commits an open Transaction. File modifications made on this Transaction are preserved and the Branch is - updated to point to the Transaction. - - :param dataset_rid: The Resource Identifier (RID) of the Dataset that contains the Transaction. - :type dataset_rid: DatasetRid - :param transaction_rid: The Resource Identifier (RID) of the Transaction. - :type transaction_rid: TransactionRid - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[datasets_models.Transaction] - - :raises CommitTransactionPermissionDenied: The provided token does not have permission to commit the given transaction on the given dataset. - :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. - :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. - :raises TransactionNotOpen: The given transaction is not open. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v1/datasets/{datasetRid}/transactions/{transactionRid}/commit", - query_params={}, - path_params={ - "datasetRid": dataset_rid, - "transactionRid": transaction_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=datasets_models.Transaction, - request_timeout=request_timeout, - throwable_errors={ - "CommitTransactionPermissionDenied": datasets_errors.CommitTransactionPermissionDenied, - "DatasetNotFound": datasets_errors.DatasetNotFound, - "TransactionNotFound": datasets_errors.TransactionNotFound, - "TransactionNotOpen": datasets_errors.TransactionNotOpen, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def create( - self, - dataset_rid: datasets_models.DatasetRid, - *, - branch_id: typing.Optional[datasets_models.BranchId] = None, - transaction_type: typing.Optional[datasets_models.TransactionType] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[datasets_models.Transaction]: - """ - Creates a Transaction on a Branch of a Dataset. - - :param dataset_rid: The Resource Identifier (RID) of the Dataset on which to create the Transaction. - :type dataset_rid: DatasetRid - :param branch_id: The identifier (name) of the Branch on which to create the Transaction. Defaults to `master` for most enrollments. - :type branch_id: Optional[BranchId] - :param transaction_type: - :type transaction_type: Optional[TransactionType] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[datasets_models.Transaction] - - :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. - :raises CreateTransactionPermissionDenied: The provided token does not have permission to create a transaction on this dataset. - :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. - :raises InvalidBranchId: The requested branch name cannot be used. Branch names cannot be empty and must not look like RIDs or UUIDs. - :raises OpenTransactionAlreadyExists: A transaction is already open on this dataset and branch. A branch of a dataset can only have one open transaction at a time. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v1/datasets/{datasetRid}/transactions", - query_params={ - "branchId": branch_id, - }, - path_params={ - "datasetRid": dataset_rid, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=datasets_models.CreateTransactionRequest( - transaction_type=transaction_type, - ), - response_type=datasets_models.Transaction, - request_timeout=request_timeout, - throwable_errors={ - "BranchNotFound": datasets_errors.BranchNotFound, - "CreateTransactionPermissionDenied": datasets_errors.CreateTransactionPermissionDenied, - "DatasetNotFound": datasets_errors.DatasetNotFound, - "InvalidBranchId": datasets_errors.InvalidBranchId, - "OpenTransactionAlreadyExists": datasets_errors.OpenTransactionAlreadyExists, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - dataset_rid: datasets_models.DatasetRid, - transaction_rid: datasets_models.TransactionRid, - *, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[datasets_models.Transaction]: - """ - Gets a Transaction of a Dataset. - - :param dataset_rid: The Resource Identifier (RID) of the Dataset that contains the Transaction. - :type dataset_rid: DatasetRid - :param transaction_rid: The Resource Identifier (RID) of the Transaction. - :type transaction_rid: TransactionRid - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[datasets_models.Transaction] - - :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. - :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v1/datasets/{datasetRid}/transactions/{transactionRid}", - query_params={}, - path_params={ - "datasetRid": dataset_rid, - "transactionRid": transaction_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=datasets_models.Transaction, - request_timeout=request_timeout, - throwable_errors={ - "DatasetNotFound": datasets_errors.DatasetNotFound, - "TransactionNotFound": datasets_errors.TransactionNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _AsyncTransactionClientRaw: - def __init__(self, client: AsyncTransactionClient) -> None: - def abort(_: datasets_models.Transaction): ... - def commit(_: datasets_models.Transaction): ... - def create(_: datasets_models.Transaction): ... - def get(_: datasets_models.Transaction): ... - - self.abort = core.async_with_raw_response(abort, client.abort) - self.commit = core.async_with_raw_response(commit, client.commit) - self.create = core.async_with_raw_response(create, client.create) - self.get = core.async_with_raw_response(get, client.get) - - -class _AsyncTransactionClientStreaming: - def __init__(self, client: AsyncTransactionClient) -> None: - def abort(_: datasets_models.Transaction): ... - def commit(_: datasets_models.Transaction): ... - def create(_: datasets_models.Transaction): ... - def get(_: datasets_models.Transaction): ... - - self.abort = core.async_with_streaming_response(abort, client.abort) - self.commit = core.async_with_streaming_response(commit, client.commit) - self.create = core.async_with_streaming_response(create, client.create) - self.get = core.async_with_streaming_response(get, client.get) diff --git a/foundry_sdk/v1/geo/errors.py b/foundry_sdk/v1/geo/errors.py deleted file mode 100644 index 6dd5770ff..000000000 --- a/foundry_sdk/v1/geo/errors.py +++ /dev/null @@ -1,16 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -__all__ = [] diff --git a/foundry_sdk/v1/geo/models.py b/foundry_sdk/v1/geo/models.py deleted file mode 100644 index 0c61c653d..000000000 --- a/foundry_sdk/v1/geo/models.py +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -from __future__ import annotations - -import pydantic - -from foundry_sdk import _core as core - -__all__ = [] diff --git a/foundry_sdk/v1/ontologies/__init__.py b/foundry_sdk/v1/ontologies/__init__.py deleted file mode 100644 index ad35b87de..000000000 --- a/foundry_sdk/v1/ontologies/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -from foundry_sdk.v1.ontologies._client import AsyncOntologiesClient -from foundry_sdk.v1.ontologies._client import OntologiesClient - -__all__ = [ - "OntologiesClient", - "AsyncOntologiesClient", -] diff --git a/foundry_sdk/v1/ontologies/_client.py b/foundry_sdk/v1/ontologies/_client.py deleted file mode 100644 index 6537b4998..000000000 --- a/foundry_sdk/v1/ontologies/_client.py +++ /dev/null @@ -1,121 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing -from functools import cached_property - -from foundry_sdk import _core as core - - -class OntologiesClient: - """ - The API client for the Ontologies Namespace. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - - @cached_property - def Action(self): - from foundry_sdk.v1.ontologies.action import ActionClient - - return ActionClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @cached_property - def Attachment(self): - from foundry_sdk.v1.ontologies.attachment import AttachmentClient - - return AttachmentClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @cached_property - def Ontology(self): - from foundry_sdk.v1.ontologies.ontology import OntologyClient - - return OntologyClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @cached_property - def OntologyObject(self): - from foundry_sdk.v1.ontologies.ontology_object import OntologyObjectClient - - return OntologyObjectClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @cached_property - def Query(self): - from foundry_sdk.v1.ontologies.query import QueryClient - - return QueryClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - -class AsyncOntologiesClient: - """ - The Async API client for the Ontologies Namespace. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - from foundry_sdk.v1.ontologies.action import AsyncActionClient - from foundry_sdk.v1.ontologies.attachment import AsyncAttachmentClient - from foundry_sdk.v1.ontologies.ontology import AsyncOntologyClient - from foundry_sdk.v1.ontologies.ontology_object import AsyncOntologyObjectClient - from foundry_sdk.v1.ontologies.query import AsyncQueryClient - - self.Action = AsyncActionClient(auth=auth, hostname=hostname, config=config) - - self.Attachment = AsyncAttachmentClient(auth=auth, hostname=hostname, config=config) - - self.Ontology = AsyncOntologyClient(auth=auth, hostname=hostname, config=config) - - self.OntologyObject = AsyncOntologyObjectClient(auth=auth, hostname=hostname, config=config) - - self.Query = AsyncQueryClient(auth=auth, hostname=hostname, config=config) diff --git a/foundry_sdk/v1/ontologies/action.py b/foundry_sdk/v1/ontologies/action.py deleted file mode 100644 index 5ed74831f..000000000 --- a/foundry_sdk/v1/ontologies/action.py +++ /dev/null @@ -1,463 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing - -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v1.ontologies import models as ontologies_models - - -class ActionClient: - """ - The API client for the Action Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _ActionClientStreaming(self) - self.with_raw_response = _ActionClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def apply( - self, - ontology_rid: ontologies_models.OntologyRid, - action_type: ontologies_models.ActionTypeApiName, - *, - parameters: typing.Dict[ - ontologies_models.ParameterId, typing.Optional[ontologies_models.DataValue] - ], - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> ontologies_models.ApplyActionResponse: - """ - Applies an action using the given parameters. - - Changes to objects or links stored in Object Storage V1 are eventually consistent and may take some time to be visible. - Edits to objects or links in Object Storage V2 will be visible immediately after the action completes. - - Note that [parameter default values](https://palantir.com/docs/foundry/action-types/parameters-default-value/) are not currently supported by - this endpoint. - - :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the action. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. - :type ontology_rid: OntologyRid - :param action_type: The API name of the action to apply. To find the API name for your action, use the **List action types** endpoint or check the **Ontology Manager**. - :type action_type: ActionTypeApiName - :param parameters: - :type parameters: Dict[ParameterId, Optional[DataValue]] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: ontologies_models.ApplyActionResponse - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v1/ontologies/{ontologyRid}/actions/{actionType}/apply", - query_params={}, - path_params={ - "ontologyRid": ontology_rid, - "actionType": action_type, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=ontologies_models.ApplyActionRequest( - parameters=parameters, - ), - response_type=ontologies_models.ApplyActionResponse, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def apply_batch( - self, - ontology_rid: ontologies_models.OntologyRid, - action_type: ontologies_models.ActionTypeApiName, - *, - requests: typing.List[ontologies_models.ApplyActionRequest], - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> ontologies_models.BatchApplyActionResponse: - """ - Applies multiple actions (of the same Action Type) using the given parameters. - Changes to objects or links stored in Object Storage V1 are eventually consistent and may take some time to be visible. - Edits to objects or links in Object Storage V2 will be visible immediately after the action completes. - - Up to 20 actions may be applied in one call. Actions that only modify objects in Object Storage v2 and do not - call Functions may receive a higher limit. - - Note that [parameter default values](https://palantir.com/docs/foundry/action-types/parameters-default-value/) and - [notifications](https://palantir.com/docs/foundry/action-types/notifications/) are not currently supported by this endpoint. - - :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the action. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. - :type ontology_rid: OntologyRid - :param action_type: The API name of the action to apply. To find the API name for your action, use the **List action types** endpoint or check the **Ontology Manager**. - :type action_type: ActionTypeApiName - :param requests: - :type requests: List[ApplyActionRequest] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: ontologies_models.BatchApplyActionResponse - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v1/ontologies/{ontologyRid}/actions/{actionType}/applyBatch", - query_params={}, - path_params={ - "ontologyRid": ontology_rid, - "actionType": action_type, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=ontologies_models.BatchApplyActionRequest( - requests=requests, - ), - response_type=ontologies_models.BatchApplyActionResponse, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def validate( - self, - ontology_rid: ontologies_models.OntologyRid, - action_type: ontologies_models.ActionTypeApiName, - *, - parameters: typing.Dict[ - ontologies_models.ParameterId, typing.Optional[ontologies_models.DataValue] - ], - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> ontologies_models.ValidateActionResponse: - """ - Validates if an action can be run with the given set of parameters. - The response contains the evaluation of parameters and **submission criteria** - that determine if the request is `VALID` or `INVALID`. - For performance reasons, validations will not consider existing objects or other data in Foundry. - For example, the uniqueness of a primary key or the existence of a user ID will not be checked. - Note that [parameter default values](https://palantir.com/docs/foundry/action-types/parameters-default-value/) are not currently supported by - this endpoint. Unspecified parameters will be given a default value of `null`. - - :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the action. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. - :type ontology_rid: OntologyRid - :param action_type: The API name of the action to validate. To find the API name for your action, use the **List action types** endpoint or check the **Ontology Manager**. - :type action_type: ActionTypeApiName - :param parameters: - :type parameters: Dict[ParameterId, Optional[DataValue]] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: ontologies_models.ValidateActionResponse - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v1/ontologies/{ontologyRid}/actions/{actionType}/validate", - query_params={}, - path_params={ - "ontologyRid": ontology_rid, - "actionType": action_type, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=ontologies_models.ValidateActionRequest( - parameters=parameters, - ), - response_type=ontologies_models.ValidateActionResponse, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _ActionClientRaw: - def __init__(self, client: ActionClient) -> None: - def apply(_: ontologies_models.ApplyActionResponse): ... - def apply_batch(_: ontologies_models.BatchApplyActionResponse): ... - def validate(_: ontologies_models.ValidateActionResponse): ... - - self.apply = core.with_raw_response(apply, client.apply) - self.apply_batch = core.with_raw_response(apply_batch, client.apply_batch) - self.validate = core.with_raw_response(validate, client.validate) - - -class _ActionClientStreaming: - def __init__(self, client: ActionClient) -> None: - def apply(_: ontologies_models.ApplyActionResponse): ... - def apply_batch(_: ontologies_models.BatchApplyActionResponse): ... - def validate(_: ontologies_models.ValidateActionResponse): ... - - self.apply = core.with_streaming_response(apply, client.apply) - self.apply_batch = core.with_streaming_response(apply_batch, client.apply_batch) - self.validate = core.with_streaming_response(validate, client.validate) - - -class AsyncActionClient: - """ - The API client for the Action Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AsyncActionClientStreaming(self) - self.with_raw_response = _AsyncActionClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def apply( - self, - ontology_rid: ontologies_models.OntologyRid, - action_type: ontologies_models.ActionTypeApiName, - *, - parameters: typing.Dict[ - ontologies_models.ParameterId, typing.Optional[ontologies_models.DataValue] - ], - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[ontologies_models.ApplyActionResponse]: - """ - Applies an action using the given parameters. - - Changes to objects or links stored in Object Storage V1 are eventually consistent and may take some time to be visible. - Edits to objects or links in Object Storage V2 will be visible immediately after the action completes. - - Note that [parameter default values](https://palantir.com/docs/foundry/action-types/parameters-default-value/) are not currently supported by - this endpoint. - - :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the action. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. - :type ontology_rid: OntologyRid - :param action_type: The API name of the action to apply. To find the API name for your action, use the **List action types** endpoint or check the **Ontology Manager**. - :type action_type: ActionTypeApiName - :param parameters: - :type parameters: Dict[ParameterId, Optional[DataValue]] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[ontologies_models.ApplyActionResponse] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v1/ontologies/{ontologyRid}/actions/{actionType}/apply", - query_params={}, - path_params={ - "ontologyRid": ontology_rid, - "actionType": action_type, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=ontologies_models.ApplyActionRequest( - parameters=parameters, - ), - response_type=ontologies_models.ApplyActionResponse, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def apply_batch( - self, - ontology_rid: ontologies_models.OntologyRid, - action_type: ontologies_models.ActionTypeApiName, - *, - requests: typing.List[ontologies_models.ApplyActionRequest], - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[ontologies_models.BatchApplyActionResponse]: - """ - Applies multiple actions (of the same Action Type) using the given parameters. - Changes to objects or links stored in Object Storage V1 are eventually consistent and may take some time to be visible. - Edits to objects or links in Object Storage V2 will be visible immediately after the action completes. - - Up to 20 actions may be applied in one call. Actions that only modify objects in Object Storage v2 and do not - call Functions may receive a higher limit. - - Note that [parameter default values](https://palantir.com/docs/foundry/action-types/parameters-default-value/) and - [notifications](https://palantir.com/docs/foundry/action-types/notifications/) are not currently supported by this endpoint. - - :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the action. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. - :type ontology_rid: OntologyRid - :param action_type: The API name of the action to apply. To find the API name for your action, use the **List action types** endpoint or check the **Ontology Manager**. - :type action_type: ActionTypeApiName - :param requests: - :type requests: List[ApplyActionRequest] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[ontologies_models.BatchApplyActionResponse] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v1/ontologies/{ontologyRid}/actions/{actionType}/applyBatch", - query_params={}, - path_params={ - "ontologyRid": ontology_rid, - "actionType": action_type, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=ontologies_models.BatchApplyActionRequest( - requests=requests, - ), - response_type=ontologies_models.BatchApplyActionResponse, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def validate( - self, - ontology_rid: ontologies_models.OntologyRid, - action_type: ontologies_models.ActionTypeApiName, - *, - parameters: typing.Dict[ - ontologies_models.ParameterId, typing.Optional[ontologies_models.DataValue] - ], - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[ontologies_models.ValidateActionResponse]: - """ - Validates if an action can be run with the given set of parameters. - The response contains the evaluation of parameters and **submission criteria** - that determine if the request is `VALID` or `INVALID`. - For performance reasons, validations will not consider existing objects or other data in Foundry. - For example, the uniqueness of a primary key or the existence of a user ID will not be checked. - Note that [parameter default values](https://palantir.com/docs/foundry/action-types/parameters-default-value/) are not currently supported by - this endpoint. Unspecified parameters will be given a default value of `null`. - - :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the action. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. - :type ontology_rid: OntologyRid - :param action_type: The API name of the action to validate. To find the API name for your action, use the **List action types** endpoint or check the **Ontology Manager**. - :type action_type: ActionTypeApiName - :param parameters: - :type parameters: Dict[ParameterId, Optional[DataValue]] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[ontologies_models.ValidateActionResponse] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v1/ontologies/{ontologyRid}/actions/{actionType}/validate", - query_params={}, - path_params={ - "ontologyRid": ontology_rid, - "actionType": action_type, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=ontologies_models.ValidateActionRequest( - parameters=parameters, - ), - response_type=ontologies_models.ValidateActionResponse, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _AsyncActionClientRaw: - def __init__(self, client: AsyncActionClient) -> None: - def apply(_: ontologies_models.ApplyActionResponse): ... - def apply_batch(_: ontologies_models.BatchApplyActionResponse): ... - def validate(_: ontologies_models.ValidateActionResponse): ... - - self.apply = core.async_with_raw_response(apply, client.apply) - self.apply_batch = core.async_with_raw_response(apply_batch, client.apply_batch) - self.validate = core.async_with_raw_response(validate, client.validate) - - -class _AsyncActionClientStreaming: - def __init__(self, client: AsyncActionClient) -> None: - def apply(_: ontologies_models.ApplyActionResponse): ... - def apply_batch(_: ontologies_models.BatchApplyActionResponse): ... - def validate(_: ontologies_models.ValidateActionResponse): ... - - self.apply = core.async_with_streaming_response(apply, client.apply) - self.apply_batch = core.async_with_streaming_response(apply_batch, client.apply_batch) - self.validate = core.async_with_streaming_response(validate, client.validate) diff --git a/foundry_sdk/v1/ontologies/action_type.py b/foundry_sdk/v1/ontologies/action_type.py deleted file mode 100644 index 4f7c12322..000000000 --- a/foundry_sdk/v1/ontologies/action_type.py +++ /dev/null @@ -1,300 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing - -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v1.core import models as core_models -from foundry_sdk.v1.ontologies import models as ontologies_models - - -class ActionTypeClient: - """ - The API client for the ActionType Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _ActionTypeClientStreaming(self) - self.with_raw_response = _ActionTypeClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - ontology_rid: ontologies_models.OntologyRid, - action_type_api_name: ontologies_models.ActionTypeApiName, - *, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> ontologies_models.ActionType: - """ - Gets a specific action type with the given API name. - - :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the action type. - :type ontology_rid: OntologyRid - :param action_type_api_name: The name of the action type in the API. - :type action_type_api_name: ActionTypeApiName - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: ontologies_models.ActionType - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v1/ontologies/{ontologyRid}/actionTypes/{actionTypeApiName}", - query_params={}, - path_params={ - "ontologyRid": ontology_rid, - "actionTypeApiName": action_type_api_name, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.ActionType, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def list( - self, - ontology_rid: ontologies_models.OntologyRid, - *, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.ResourceIterator[ontologies_models.ActionType]: - """ - Lists the action types for the given Ontology. - - Each page may be smaller than the requested page size. However, it is guaranteed that if there are more - results available, at least one result will be present in the response. - - :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the action types. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. - :type ontology_rid: OntologyRid - :param page_size: The desired size of the page to be returned. Defaults to 500. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. - :type page_size: Optional[PageSize] - :param page_token: - :type page_token: Optional[PageToken] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.ResourceIterator[ontologies_models.ActionType] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v1/ontologies/{ontologyRid}/actionTypes", - query_params={ - "pageSize": page_size, - "pageToken": page_token, - }, - path_params={ - "ontologyRid": ontology_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.ListActionTypesResponse, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - -class _ActionTypeClientRaw: - def __init__(self, client: ActionTypeClient) -> None: - def get(_: ontologies_models.ActionType): ... - def list(_: ontologies_models.ListActionTypesResponse): ... - - self.get = core.with_raw_response(get, client.get) - self.list = core.with_raw_response(list, client.list) - - -class _ActionTypeClientStreaming: - def __init__(self, client: ActionTypeClient) -> None: - def get(_: ontologies_models.ActionType): ... - def list(_: ontologies_models.ListActionTypesResponse): ... - - self.get = core.with_streaming_response(get, client.get) - self.list = core.with_streaming_response(list, client.list) - - -class AsyncActionTypeClient: - """ - The API client for the ActionType Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AsyncActionTypeClientStreaming(self) - self.with_raw_response = _AsyncActionTypeClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - ontology_rid: ontologies_models.OntologyRid, - action_type_api_name: ontologies_models.ActionTypeApiName, - *, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[ontologies_models.ActionType]: - """ - Gets a specific action type with the given API name. - - :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the action type. - :type ontology_rid: OntologyRid - :param action_type_api_name: The name of the action type in the API. - :type action_type_api_name: ActionTypeApiName - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[ontologies_models.ActionType] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v1/ontologies/{ontologyRid}/actionTypes/{actionTypeApiName}", - query_params={}, - path_params={ - "ontologyRid": ontology_rid, - "actionTypeApiName": action_type_api_name, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.ActionType, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def list( - self, - ontology_rid: ontologies_models.OntologyRid, - *, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.AsyncResourceIterator[ontologies_models.ActionType]: - """ - Lists the action types for the given Ontology. - - Each page may be smaller than the requested page size. However, it is guaranteed that if there are more - results available, at least one result will be present in the response. - - :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the action types. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. - :type ontology_rid: OntologyRid - :param page_size: The desired size of the page to be returned. Defaults to 500. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. - :type page_size: Optional[PageSize] - :param page_token: - :type page_token: Optional[PageToken] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.AsyncResourceIterator[ontologies_models.ActionType] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v1/ontologies/{ontologyRid}/actionTypes", - query_params={ - "pageSize": page_size, - "pageToken": page_token, - }, - path_params={ - "ontologyRid": ontology_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.ListActionTypesResponse, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - -class _AsyncActionTypeClientRaw: - def __init__(self, client: AsyncActionTypeClient) -> None: - def get(_: ontologies_models.ActionType): ... - def list(_: ontologies_models.ListActionTypesResponse): ... - - self.get = core.async_with_raw_response(get, client.get) - self.list = core.async_with_raw_response(list, client.list) - - -class _AsyncActionTypeClientStreaming: - def __init__(self, client: AsyncActionTypeClient) -> None: - def get(_: ontologies_models.ActionType): ... - def list(_: ontologies_models.ListActionTypesResponse): ... - - self.get = core.async_with_streaming_response(get, client.get) - self.list = core.async_with_streaming_response(list, client.list) diff --git a/foundry_sdk/v1/ontologies/attachment.py b/foundry_sdk/v1/ontologies/attachment.py deleted file mode 100644 index f6f39f2c5..000000000 --- a/foundry_sdk/v1/ontologies/attachment.py +++ /dev/null @@ -1,388 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing - -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v1.core import models as core_models -from foundry_sdk.v1.ontologies import models as ontologies_models - - -class AttachmentClient: - """ - The API client for the Attachment Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AttachmentClientStreaming(self) - self.with_raw_response = _AttachmentClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - attachment_rid: ontologies_models.AttachmentRid, - *, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> ontologies_models.Attachment: - """ - Get the metadata of an attachment. - - :param attachment_rid: The RID of the attachment. - :type attachment_rid: AttachmentRid - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: ontologies_models.Attachment - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v1/attachments/{attachmentRid}", - query_params={}, - path_params={ - "attachmentRid": attachment_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.Attachment, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def read( - self, - attachment_rid: ontologies_models.AttachmentRid, - *, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> bytes: - """ - Get the content of an attachment. - - :param attachment_rid: The RID of the attachment. - :type attachment_rid: AttachmentRid - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: bytes - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v1/attachments/{attachmentRid}/content", - query_params={}, - path_params={ - "attachmentRid": attachment_rid, - }, - header_params={ - "Accept": "*/*", - }, - body=None, - response_type=bytes, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def upload( - self, - body: bytes, - *, - content_length: core_models.ContentLength, - content_type: core_models.ContentType, - filename: core_models.Filename, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> ontologies_models.Attachment: - """ - Upload an attachment to use in an action. Any attachment which has not been linked to an object via - an action within one hour after upload will be removed. - Previously mapped attachments which are not connected to any object anymore are also removed on - a biweekly basis. - The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`. - - :param body: Body of the request - :type body: bytes - :param content_length: The size in bytes of the file content being uploaded. - :type content_length: ContentLength - :param content_type: The media type of the file being uploaded. - :type content_type: ContentType - :param filename: The name of the file being uploaded. - :type filename: Filename - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: ontologies_models.Attachment - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v1/attachments/upload", - query_params={ - "filename": filename, - }, - path_params={}, - header_params={ - "Content-Length": content_length, - "Content-Type": content_type, - "Content-Type": "*/*", - "Accept": "application/json", - }, - body=body, - response_type=ontologies_models.Attachment, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _AttachmentClientRaw: - def __init__(self, client: AttachmentClient) -> None: - def get(_: ontologies_models.Attachment): ... - def read(_: bytes): ... - def upload(_: ontologies_models.Attachment): ... - - self.get = core.with_raw_response(get, client.get) - self.read = core.with_raw_response(read, client.read) - self.upload = core.with_raw_response(upload, client.upload) - - -class _AttachmentClientStreaming: - def __init__(self, client: AttachmentClient) -> None: - def get(_: ontologies_models.Attachment): ... - def read(_: bytes): ... - def upload(_: ontologies_models.Attachment): ... - - self.get = core.with_streaming_response(get, client.get) - self.read = core.with_streaming_response(read, client.read) - self.upload = core.with_streaming_response(upload, client.upload) - - -class AsyncAttachmentClient: - """ - The API client for the Attachment Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AsyncAttachmentClientStreaming(self) - self.with_raw_response = _AsyncAttachmentClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - attachment_rid: ontologies_models.AttachmentRid, - *, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[ontologies_models.Attachment]: - """ - Get the metadata of an attachment. - - :param attachment_rid: The RID of the attachment. - :type attachment_rid: AttachmentRid - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[ontologies_models.Attachment] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v1/attachments/{attachmentRid}", - query_params={}, - path_params={ - "attachmentRid": attachment_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.Attachment, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def read( - self, - attachment_rid: ontologies_models.AttachmentRid, - *, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[bytes]: - """ - Get the content of an attachment. - - :param attachment_rid: The RID of the attachment. - :type attachment_rid: AttachmentRid - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[bytes] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v1/attachments/{attachmentRid}/content", - query_params={}, - path_params={ - "attachmentRid": attachment_rid, - }, - header_params={ - "Accept": "*/*", - }, - body=None, - response_type=bytes, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def upload( - self, - body: bytes, - *, - content_length: core_models.ContentLength, - content_type: core_models.ContentType, - filename: core_models.Filename, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[ontologies_models.Attachment]: - """ - Upload an attachment to use in an action. Any attachment which has not been linked to an object via - an action within one hour after upload will be removed. - Previously mapped attachments which are not connected to any object anymore are also removed on - a biweekly basis. - The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`. - - :param body: Body of the request - :type body: bytes - :param content_length: The size in bytes of the file content being uploaded. - :type content_length: ContentLength - :param content_type: The media type of the file being uploaded. - :type content_type: ContentType - :param filename: The name of the file being uploaded. - :type filename: Filename - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[ontologies_models.Attachment] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v1/attachments/upload", - query_params={ - "filename": filename, - }, - path_params={}, - header_params={ - "Content-Length": content_length, - "Content-Type": content_type, - "Content-Type": "*/*", - "Accept": "application/json", - }, - body=body, - response_type=ontologies_models.Attachment, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _AsyncAttachmentClientRaw: - def __init__(self, client: AsyncAttachmentClient) -> None: - def get(_: ontologies_models.Attachment): ... - def read(_: bytes): ... - def upload(_: ontologies_models.Attachment): ... - - self.get = core.async_with_raw_response(get, client.get) - self.read = core.async_with_raw_response(read, client.read) - self.upload = core.async_with_raw_response(upload, client.upload) - - -class _AsyncAttachmentClientStreaming: - def __init__(self, client: AsyncAttachmentClient) -> None: - def get(_: ontologies_models.Attachment): ... - def read(_: bytes): ... - def upload(_: ontologies_models.Attachment): ... - - self.get = core.async_with_streaming_response(get, client.get) - self.read = core.async_with_streaming_response(read, client.read) - self.upload = core.async_with_streaming_response(upload, client.upload) diff --git a/foundry_sdk/v1/ontologies/errors.py b/foundry_sdk/v1/ontologies/errors.py deleted file mode 100644 index e3afcd69d..000000000 --- a/foundry_sdk/v1/ontologies/errors.py +++ /dev/null @@ -1,2482 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing -from dataclasses import dataclass - -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v1.ontologies import models as ontologies_models - - -class ActionContainsDuplicateEditsParameters(typing_extensions.TypedDict): - """The given action request has multiple edits on the same object.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class ActionContainsDuplicateEdits(errors.ConflictError): - name: typing.Literal["ActionContainsDuplicateEdits"] - parameters: ActionContainsDuplicateEditsParameters - error_instance_id: str - - -class ActionEditedPropertiesNotFoundParameters(typing_extensions.TypedDict): - """ - Actions attempted to edit properties that could not be found on the object type. - Please contact the Ontology administrator to resolve this issue. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class ActionEditedPropertiesNotFound(errors.BadRequestError): - name: typing.Literal["ActionEditedPropertiesNotFound"] - parameters: ActionEditedPropertiesNotFoundParameters - error_instance_id: str - - -class ActionEditsReadOnlyEntityParameters(typing_extensions.TypedDict): - """The given action request performs edits on a type that is read-only or does not allow edits.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - entityTypeRid: typing_extensions.NotRequired[ontologies_models.ObjectTypeRid] - - -@dataclass -class ActionEditsReadOnlyEntity(errors.BadRequestError): - name: typing.Literal["ActionEditsReadOnlyEntity"] - parameters: ActionEditsReadOnlyEntityParameters - error_instance_id: str - - -class ActionNotFoundParameters(typing_extensions.TypedDict): - """The action is not found, or the user does not have access to it.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - actionRid: ontologies_models.ActionRid - - -@dataclass -class ActionNotFound(errors.NotFoundError): - name: typing.Literal["ActionNotFound"] - parameters: ActionNotFoundParameters - error_instance_id: str - - -class ActionParameterInterfaceTypeNotFoundParameters(typing_extensions.TypedDict): - """The parameter references an interface type that could not be found, or the client token does not have access to it.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - parameterId: ontologies_models.ParameterId - - -@dataclass -class ActionParameterInterfaceTypeNotFound(errors.NotFoundError): - name: typing.Literal["ActionParameterInterfaceTypeNotFound"] - parameters: ActionParameterInterfaceTypeNotFoundParameters - error_instance_id: str - - -class ActionParameterObjectNotFoundParameters(typing_extensions.TypedDict): - """The parameter object reference or parameter default value is not found, or the client token does not have access to it.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - parameterId: ontologies_models.ParameterId - - -@dataclass -class ActionParameterObjectNotFound(errors.NotFoundError): - name: typing.Literal["ActionParameterObjectNotFound"] - parameters: ActionParameterObjectNotFoundParameters - error_instance_id: str - - -class ActionParameterObjectTypeNotFoundParameters(typing_extensions.TypedDict): - """The parameter references an object type that could not be found, or the client token does not have access to it.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - parameterId: ontologies_models.ParameterId - - -@dataclass -class ActionParameterObjectTypeNotFound(errors.NotFoundError): - name: typing.Literal["ActionParameterObjectTypeNotFound"] - parameters: ActionParameterObjectTypeNotFoundParameters - error_instance_id: str - - -class ActionTypeNotFoundParameters(typing_extensions.TypedDict): - """The action type is not found, or the user does not have access to it.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - actionType: typing_extensions.NotRequired[ontologies_models.ActionTypeApiName] - rid: typing_extensions.NotRequired[ontologies_models.ActionTypeRid] - - -@dataclass -class ActionTypeNotFound(errors.NotFoundError): - name: typing.Literal["ActionTypeNotFound"] - parameters: ActionTypeNotFoundParameters - error_instance_id: str - - -class ActionValidationFailedParameters(typing_extensions.TypedDict): - """ - The validation failed for the given action parameters. Please use the `validateAction` endpoint for more - details. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - actionType: ontologies_models.ActionTypeApiName - - -@dataclass -class ActionValidationFailed(errors.BadRequestError): - name: typing.Literal["ActionValidationFailed"] - parameters: ActionValidationFailedParameters - error_instance_id: str - - -class AggregationAccuracyNotSupportedParameters(typing_extensions.TypedDict): - """ - The given aggregation cannot be performed with the requested accuracy. - Try allowing approximate results or adjust your aggregation request. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class AggregationAccuracyNotSupported(errors.BadRequestError): - name: typing.Literal["AggregationAccuracyNotSupported"] - parameters: AggregationAccuracyNotSupportedParameters - error_instance_id: str - - -class AggregationGroupCountExceededLimitParameters(typing_extensions.TypedDict): - """ - The number of groups in the aggregations grouping exceeded the allowed limit. This can typically be fixed by - adjusting your query to reduce the number of groups created by your aggregation. For instance: - - If you are using multiple `groupBy` clauses, try reducing the number of clauses. - - If you are using a `groupBy` clause with a high cardinality property, try filtering the data first - to reduce the number of groups. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - groupsCount: typing_extensions.NotRequired[int] - groupsLimit: typing_extensions.NotRequired[int] - - -@dataclass -class AggregationGroupCountExceededLimit(errors.BadRequestError): - name: typing.Literal["AggregationGroupCountExceededLimit"] - parameters: AggregationGroupCountExceededLimitParameters - error_instance_id: str - - -class AggregationMemoryExceededLimitParameters(typing_extensions.TypedDict): - """ - The amount of memory used in the request exceeded the limit. This can typically be fixed by - adjusting your query to reduce the number of groups created by your aggregation. For instance: - - If you are using multiple `groupBy` clauses, try reducing the number of clauses. - - If you are using a `groupBy` clause with a high cardinality property, try filtering the data first - to reduce the number of groups. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - memoryUsedBytes: typing_extensions.NotRequired[str] - memoryLimitBytes: str - - -@dataclass -class AggregationMemoryExceededLimit(errors.BadRequestError): - name: typing.Literal["AggregationMemoryExceededLimit"] - parameters: AggregationMemoryExceededLimitParameters - error_instance_id: str - - -class AggregationNestedObjectSetSizeExceededLimitParameters(typing_extensions.TypedDict): - """ - A nested object set within the aggregation exceeded the allowed limit. - This can be fixed by aggregating over fewer objects, such as by applying a filter. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - objectsCount: int - objectsLimit: int - - -@dataclass -class AggregationNestedObjectSetSizeExceededLimit(errors.BadRequestError): - name: typing.Literal["AggregationNestedObjectSetSizeExceededLimit"] - parameters: AggregationNestedObjectSetSizeExceededLimitParameters - error_instance_id: str - - -class ApplyActionFailedParameters(typing_extensions.TypedDict): - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class ApplyActionFailed(errors.BadRequestError): - name: typing.Literal["ApplyActionFailed"] - parameters: ApplyActionFailedParameters - error_instance_id: str - - -class AttachmentNotFoundParameters(typing_extensions.TypedDict): - """ - The requested attachment is not found, or the client token does not have access to it. - Attachments that are not attached to any objects are deleted after two weeks. - Attachments that have not been attached to an object can only be viewed by the user who uploaded them. - Attachments that have been attached to an object can be viewed by users who can view the object. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - attachmentRid: typing_extensions.NotRequired[ontologies_models.AttachmentRid] - - -@dataclass -class AttachmentNotFound(errors.NotFoundError): - name: typing.Literal["AttachmentNotFound"] - parameters: AttachmentNotFoundParameters - error_instance_id: str - - -class AttachmentRidAlreadyExistsParameters(typing_extensions.TypedDict): - """The provided attachment RID already exists and cannot be overwritten.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - attachmentRid: ontologies_models.AttachmentRid - - -@dataclass -class AttachmentRidAlreadyExists(errors.NotFoundError): - name: typing.Literal["AttachmentRidAlreadyExists"] - parameters: AttachmentRidAlreadyExistsParameters - error_instance_id: str - - -class AttachmentSizeExceededLimitParameters(typing_extensions.TypedDict): - """ - The file is too large to be uploaded as an attachment. - The maximum attachment size is 200MB. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - fileSizeBytes: str - fileLimitBytes: str - - -@dataclass -class AttachmentSizeExceededLimit(errors.BadRequestError): - name: typing.Literal["AttachmentSizeExceededLimit"] - parameters: AttachmentSizeExceededLimitParameters - error_instance_id: str - - -class CipherChannelNotFoundParameters(typing_extensions.TypedDict): - """ - The Cipher Channel was not found. - It either does not exist, or you do not have permission to see it. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - cipherChannel: core.RID - - -@dataclass -class CipherChannelNotFound(errors.NotFoundError): - name: typing.Literal["CipherChannelNotFound"] - parameters: CipherChannelNotFoundParameters - error_instance_id: str - - -class CompositePrimaryKeyNotSupportedParameters(typing_extensions.TypedDict): - """ - Primary keys consisting of multiple properties are not supported by this API. If you need support for this, - please reach out to Palantir Support. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - objectType: ontologies_models.ObjectTypeApiName - primaryKey: typing.List[ontologies_models.PropertyApiName] - - -@dataclass -class CompositePrimaryKeyNotSupported(errors.BadRequestError): - name: typing.Literal["CompositePrimaryKeyNotSupported"] - parameters: CompositePrimaryKeyNotSupportedParameters - error_instance_id: str - - -class ConsistentSnapshotErrorParameters(typing_extensions.TypedDict): - """ - An Ontology objects read failed because the Ontology snapshot snapshot used for consistent reads became - stale. Retrying the request typically resolves this. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class ConsistentSnapshotError(errors.ConflictError): - name: typing.Literal["ConsistentSnapshotError"] - parameters: ConsistentSnapshotErrorParameters - error_instance_id: str - - -class DefaultAndNullGroupsNotSupportedParameters(typing_extensions.TypedDict): - """Exact match groupBy clause cannot specify a default value and allow null values.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class DefaultAndNullGroupsNotSupported(errors.BadRequestError): - name: typing.Literal["DefaultAndNullGroupsNotSupported"] - parameters: DefaultAndNullGroupsNotSupportedParameters - error_instance_id: str - - -class DerivedPropertyApiNamesNotUniqueParameters(typing_extensions.TypedDict): - """At least one of the requested derived property API names already exist on the object set.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - derivedPropertyApiNames: typing.List[ontologies_models.DerivedPropertyApiName] - - -@dataclass -class DerivedPropertyApiNamesNotUnique(errors.BadRequestError): - name: typing.Literal["DerivedPropertyApiNamesNotUnique"] - parameters: DerivedPropertyApiNamesNotUniqueParameters - error_instance_id: str - - -class DuplicateOrderByParameters(typing_extensions.TypedDict): - """The requested sort order includes duplicate properties.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - properties: typing.List[ontologies_models.PropertyApiName] - - -@dataclass -class DuplicateOrderBy(errors.BadRequestError): - name: typing.Literal["DuplicateOrderBy"] - parameters: DuplicateOrderByParameters - error_instance_id: str - - -class EditObjectPermissionDeniedParameters(typing_extensions.TypedDict): - """The user does not have permission to edit this `ObjectType`.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class EditObjectPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["EditObjectPermissionDenied"] - parameters: EditObjectPermissionDeniedParameters - error_instance_id: str - - -class FunctionEncounteredUserFacingErrorParameters(typing_extensions.TypedDict): - """ - The authored function failed to execute because of a user induced error. The message argument - is meant to be displayed to the user. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - functionRid: ontologies_models.FunctionRid - functionVersion: ontologies_models.FunctionVersion - message: str - - -@dataclass -class FunctionEncounteredUserFacingError(errors.BadRequestError): - name: typing.Literal["FunctionEncounteredUserFacingError"] - parameters: FunctionEncounteredUserFacingErrorParameters - error_instance_id: str - - -class FunctionExecutionFailedParameters(typing_extensions.TypedDict): - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - functionRid: ontologies_models.FunctionRid - functionVersion: ontologies_models.FunctionVersion - message: typing_extensions.NotRequired[str] - stacktrace: typing_extensions.NotRequired[str] - - -@dataclass -class FunctionExecutionFailed(errors.BadRequestError): - name: typing.Literal["FunctionExecutionFailed"] - parameters: FunctionExecutionFailedParameters - error_instance_id: str - - -class FunctionExecutionTimedOutParameters(typing_extensions.TypedDict): - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - functionRid: ontologies_models.FunctionRid - functionVersion: ontologies_models.FunctionVersion - - -@dataclass -class FunctionExecutionTimedOut(errors.InternalServerError): - name: typing.Literal["FunctionExecutionTimedOut"] - parameters: FunctionExecutionTimedOutParameters - error_instance_id: str - - -class FunctionInvalidInputParameters(typing_extensions.TypedDict): - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - functionRid: ontologies_models.FunctionRid - functionVersion: ontologies_models.FunctionVersion - - -@dataclass -class FunctionInvalidInput(errors.BadRequestError): - name: typing.Literal["FunctionInvalidInput"] - parameters: FunctionInvalidInputParameters - error_instance_id: str - - -class HighScaleComputationNotEnabledParameters(typing_extensions.TypedDict): - """High-scale compute was required for this Ontology query but is not enabled on this enrollment.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class HighScaleComputationNotEnabled(errors.InternalServerError): - name: typing.Literal["HighScaleComputationNotEnabled"] - parameters: HighScaleComputationNotEnabledParameters - error_instance_id: str - - -class InterfaceBasedObjectSetNotSupportedParameters(typing_extensions.TypedDict): - """The requested object set type is not supported for interface-based object sets.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class InterfaceBasedObjectSetNotSupported(errors.BadRequestError): - name: typing.Literal["InterfaceBasedObjectSetNotSupported"] - parameters: InterfaceBasedObjectSetNotSupportedParameters - error_instance_id: str - - -class InterfaceLinkTypeNotFoundParameters(typing_extensions.TypedDict): - """The requested interface link type is not found, or the client token does not have access to it.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - interfaceTypeApiName: typing_extensions.NotRequired[ontologies_models.InterfaceTypeApiName] - interfaceTypeRid: typing_extensions.NotRequired[ontologies_models.InterfaceTypeRid] - interfaceLinkTypeApiName: typing_extensions.NotRequired[ - ontologies_models.InterfaceLinkTypeApiName - ] - interfaceLinkTypeRid: typing_extensions.NotRequired[ontologies_models.InterfaceLinkTypeRid] - - -@dataclass -class InterfaceLinkTypeNotFound(errors.NotFoundError): - name: typing.Literal["InterfaceLinkTypeNotFound"] - parameters: InterfaceLinkTypeNotFoundParameters - error_instance_id: str - - -class InterfacePropertiesHaveDifferentIdsParameters(typing_extensions.TypedDict): - """Properties used in ordering must have the same ids.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - properties: typing.List[ontologies_models.InterfacePropertyApiName] - - -@dataclass -class InterfacePropertiesHaveDifferentIds(errors.BadRequestError): - name: typing.Literal["InterfacePropertiesHaveDifferentIds"] - parameters: InterfacePropertiesHaveDifferentIdsParameters - error_instance_id: str - - -class InterfacePropertiesNotFoundParameters(typing_extensions.TypedDict): - """The requested interface property types are not present on every object type.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - objectType: typing.List[ontologies_models.ObjectTypeApiName] - missingInterfaceProperties: typing.List[ontologies_models.InterfacePropertyApiName] - - -@dataclass -class InterfacePropertiesNotFound(errors.NotFoundError): - name: typing.Literal["InterfacePropertiesNotFound"] - parameters: InterfacePropertiesNotFoundParameters - error_instance_id: str - - -class InterfacePropertyNotFoundParameters(typing_extensions.TypedDict): - """The requested interface property was not found on the interface type.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - interfaceType: ontologies_models.InterfaceTypeApiName - interfaceProperty: ontologies_models.InterfacePropertyApiName - - -@dataclass -class InterfacePropertyNotFound(errors.NotFoundError): - name: typing.Literal["InterfacePropertyNotFound"] - parameters: InterfacePropertyNotFoundParameters - error_instance_id: str - - -class InterfaceTypeNotFoundParameters(typing_extensions.TypedDict): - """The requested interface type is not found, or the client token does not have access to it.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - apiName: typing_extensions.NotRequired[ontologies_models.InterfaceTypeApiName] - rid: typing_extensions.NotRequired[ontologies_models.InterfaceTypeRid] - - -@dataclass -class InterfaceTypeNotFound(errors.NotFoundError): - name: typing.Literal["InterfaceTypeNotFound"] - parameters: InterfaceTypeNotFoundParameters - error_instance_id: str - - -class InterfaceTypesNotFoundParameters(typing_extensions.TypedDict): - """The requested interface types were not found, or the client token does not have access to it.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - apiName: typing.List[ontologies_models.InterfaceTypeApiName] - rid: typing.List[ontologies_models.InterfaceTypeRid] - - -@dataclass -class InterfaceTypesNotFound(errors.NotFoundError): - name: typing.Literal["InterfaceTypesNotFound"] - parameters: InterfaceTypesNotFoundParameters - error_instance_id: str - - -class InvalidAggregationOrderingParameters(typing_extensions.TypedDict): - """Aggregation ordering can only be applied to metrics with exactly one groupBy clause.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class InvalidAggregationOrdering(errors.BadRequestError): - name: typing.Literal["InvalidAggregationOrdering"] - parameters: InvalidAggregationOrderingParameters - error_instance_id: str - - -class InvalidAggregationOrderingWithNullValuesParameters(typing_extensions.TypedDict): - """Aggregation ordering cannot be applied for groupBy clauses that allow null values.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class InvalidAggregationOrderingWithNullValues(errors.BadRequestError): - name: typing.Literal["InvalidAggregationOrderingWithNullValues"] - parameters: InvalidAggregationOrderingWithNullValuesParameters - error_instance_id: str - - -class InvalidAggregationRangeParameters(typing_extensions.TypedDict): - """Aggregation range should include one lt or lte and one gt or gte.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class InvalidAggregationRange(errors.BadRequestError): - name: typing.Literal["InvalidAggregationRange"] - parameters: InvalidAggregationRangeParameters - error_instance_id: str - - -class InvalidAggregationRangePropertyTypeParameters(typing_extensions.TypedDict): - """Range group by is not supported by property type.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - property: ontologies_models.PropertyApiName - objectType: ontologies_models.ObjectTypeApiName - propertyBaseType: ontologies_models.ValueType - - -@dataclass -class InvalidAggregationRangePropertyType(errors.BadRequestError): - name: typing.Literal["InvalidAggregationRangePropertyType"] - parameters: InvalidAggregationRangePropertyTypeParameters - error_instance_id: str - - -class InvalidAggregationRangePropertyTypeForInterfaceParameters(typing_extensions.TypedDict): - """Range group by is not supported by interface property type.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - interfaceProperty: ontologies_models.InterfacePropertyApiName - interfaceType: ontologies_models.InterfaceTypeApiName - propertyBaseType: ontologies_models.ValueType - - -@dataclass -class InvalidAggregationRangePropertyTypeForInterface(errors.BadRequestError): - name: typing.Literal["InvalidAggregationRangePropertyTypeForInterface"] - parameters: InvalidAggregationRangePropertyTypeForInterfaceParameters - error_instance_id: str - - -class InvalidAggregationRangeValueParameters(typing_extensions.TypedDict): - """Aggregation value does not conform to the expected underlying type.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - property: ontologies_models.PropertyApiName - objectType: ontologies_models.ObjectTypeApiName - propertyBaseType: ontologies_models.ValueType - - -@dataclass -class InvalidAggregationRangeValue(errors.BadRequestError): - name: typing.Literal["InvalidAggregationRangeValue"] - parameters: InvalidAggregationRangeValueParameters - error_instance_id: str - - -class InvalidAggregationRangeValueForInterfaceParameters(typing_extensions.TypedDict): - """Aggregation value does not conform to the expected underlying type.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - interfaceProperty: ontologies_models.InterfacePropertyApiName - interfaceType: ontologies_models.InterfaceTypeApiName - propertyBaseType: ontologies_models.ValueType - - -@dataclass -class InvalidAggregationRangeValueForInterface(errors.BadRequestError): - name: typing.Literal["InvalidAggregationRangeValueForInterface"] - parameters: InvalidAggregationRangeValueForInterfaceParameters - error_instance_id: str - - -class InvalidApplyActionOptionCombinationParameters(typing_extensions.TypedDict): - """The given options are individually valid but cannot be used in the given combination.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - invalidCombination: typing_extensions.NotRequired[ontologies_models.ApplyActionRequestOptions] - - -@dataclass -class InvalidApplyActionOptionCombination(errors.BadRequestError): - name: typing.Literal["InvalidApplyActionOptionCombination"] - parameters: InvalidApplyActionOptionCombinationParameters - error_instance_id: str - - -class InvalidContentLengthParameters(typing_extensions.TypedDict): - """A `Content-Length` header is required for all uploads, but was missing or invalid.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class InvalidContentLength(errors.BadRequestError): - name: typing.Literal["InvalidContentLength"] - parameters: InvalidContentLengthParameters - error_instance_id: str - - -class InvalidContentTypeParameters(typing_extensions.TypedDict): - """ - The `Content-Type` cannot be inferred from the request content and filename. - Please check your request content and filename to ensure they are compatible. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class InvalidContentType(errors.BadRequestError): - name: typing.Literal["InvalidContentType"] - parameters: InvalidContentTypeParameters - error_instance_id: str - - -class InvalidDerivedPropertyDefinitionParameters(typing_extensions.TypedDict): - """Derived property definition was invalid due to shape of query or type checking.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - objectType: ontologies_models.ObjectTypeApiName - derivedProperty: ontologies_models.DerivedPropertyApiName - - -@dataclass -class InvalidDerivedPropertyDefinition(errors.BadRequestError): - name: typing.Literal["InvalidDerivedPropertyDefinition"] - parameters: InvalidDerivedPropertyDefinitionParameters - error_instance_id: str - - -class InvalidDurationGroupByPropertyTypeParameters(typing_extensions.TypedDict): - """Invalid property type for duration groupBy.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - property: ontologies_models.PropertyApiName - objectType: ontologies_models.ObjectTypeApiName - propertyBaseType: ontologies_models.ValueType - - -@dataclass -class InvalidDurationGroupByPropertyType(errors.BadRequestError): - name: typing.Literal["InvalidDurationGroupByPropertyType"] - parameters: InvalidDurationGroupByPropertyTypeParameters - error_instance_id: str - - -class InvalidDurationGroupByPropertyTypeForInterfaceParameters(typing_extensions.TypedDict): - """Invalid interface property type for duration groupBy.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - interfaceProperty: ontologies_models.InterfacePropertyApiName - interfaceType: ontologies_models.InterfaceTypeApiName - propertyBaseType: ontologies_models.ValueType - - -@dataclass -class InvalidDurationGroupByPropertyTypeForInterface(errors.BadRequestError): - name: typing.Literal["InvalidDurationGroupByPropertyTypeForInterface"] - parameters: InvalidDurationGroupByPropertyTypeForInterfaceParameters - error_instance_id: str - - -class InvalidDurationGroupByValueParameters(typing_extensions.TypedDict): - """ - Duration groupBy value is invalid. Units larger than day must have value `1` and date properties do not support - filtering on units smaller than day. As examples, neither bucketing by every two weeks nor bucketing a date by - every two hours are allowed. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class InvalidDurationGroupByValue(errors.BadRequestError): - name: typing.Literal["InvalidDurationGroupByValue"] - parameters: InvalidDurationGroupByValueParameters - error_instance_id: str - - -class InvalidFieldsParameters(typing_extensions.TypedDict): - """ - The value of the given field does not match the expected pattern. For example, an Ontology object property `id` - should be written `properties.id`. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - properties: typing.List[str] - - -@dataclass -class InvalidFields(errors.BadRequestError): - name: typing.Literal["InvalidFields"] - parameters: InvalidFieldsParameters - error_instance_id: str - - -class InvalidGroupIdParameters(typing_extensions.TypedDict): - """The provided value for a group id must be a UUID.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - groupId: str - - -@dataclass -class InvalidGroupId(errors.BadRequestError): - name: typing.Literal["InvalidGroupId"] - parameters: InvalidGroupIdParameters - error_instance_id: str - - -class InvalidOrderTypeParameters(typing_extensions.TypedDict): - """This query type does not support the provided order type""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - orderType: typing_extensions.NotRequired[ontologies_models.SearchOrderByType] - - -@dataclass -class InvalidOrderType(errors.BadRequestError): - name: typing.Literal["InvalidOrderType"] - parameters: InvalidOrderTypeParameters - error_instance_id: str - - -class InvalidParameterValueParameters(typing_extensions.TypedDict): - """ - The value of the given parameter is invalid. See the documentation of `DataValue` for details on - how parameters are represented. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - parameterBaseType: typing_extensions.NotRequired[ontologies_models.ValueType] - parameterDataType: typing_extensions.NotRequired[ontologies_models.OntologyDataType] - parameterId: ontologies_models.ParameterId - parameterValue: typing_extensions.NotRequired[ontologies_models.DataValue] - - -@dataclass -class InvalidParameterValue(errors.BadRequestError): - name: typing.Literal["InvalidParameterValue"] - parameters: InvalidParameterValueParameters - error_instance_id: str - - -class InvalidPropertyFilterValueParameters(typing_extensions.TypedDict): - """ - The value of the given property filter is invalid. For instance, 2 is an invalid value for - `isNull` in `properties.address.isNull=2` because the `isNull` filter expects a value of boolean type. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - expectedType: ontologies_models.ValueType - propertyFilter: ontologies_models.PropertyFilter - propertyFilterValue: ontologies_models.FilterValue - property: ontologies_models.PropertyApiName - - -@dataclass -class InvalidPropertyFilterValue(errors.BadRequestError): - name: typing.Literal["InvalidPropertyFilterValue"] - parameters: InvalidPropertyFilterValueParameters - error_instance_id: str - - -class InvalidPropertyFiltersCombinationParameters(typing_extensions.TypedDict): - """The provided filters cannot be used together.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - propertyFilters: typing.List[ontologies_models.PropertyFilter] - property: ontologies_models.PropertyApiName - - -@dataclass -class InvalidPropertyFiltersCombination(errors.BadRequestError): - name: typing.Literal["InvalidPropertyFiltersCombination"] - parameters: InvalidPropertyFiltersCombinationParameters - error_instance_id: str - - -class InvalidPropertyTypeParameters(typing_extensions.TypedDict): - """The given property type is not of the expected type.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - propertyBaseType: ontologies_models.ValueType - property: ontologies_models.PropertyApiName - - -@dataclass -class InvalidPropertyType(errors.BadRequestError): - name: typing.Literal["InvalidPropertyType"] - parameters: InvalidPropertyTypeParameters - error_instance_id: str - - -class InvalidPropertyValueParameters(typing_extensions.TypedDict): - """ - The value of the given property is invalid. See the documentation of `PropertyValue` for details on - how properties are represented. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - propertyBaseType: ontologies_models.ValueType - property: ontologies_models.PropertyApiName - propertyValue: ontologies_models.PropertyValue - - -@dataclass -class InvalidPropertyValue(errors.BadRequestError): - name: typing.Literal["InvalidPropertyValue"] - parameters: InvalidPropertyValueParameters - error_instance_id: str - - -class InvalidQueryOutputValueParameters(typing_extensions.TypedDict): - """ - The value of the query's output is invalid. This may be because the return value did not match the specified - output type or constraints. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - outputDataType: ontologies_models.QueryDataType - outputValue: typing_extensions.NotRequired[ontologies_models.DataValue] - functionRid: ontologies_models.FunctionRid - functionVersion: ontologies_models.FunctionVersion - - -@dataclass -class InvalidQueryOutputValue(errors.BadRequestError): - name: typing.Literal["InvalidQueryOutputValue"] - parameters: InvalidQueryOutputValueParameters - error_instance_id: str - - -class InvalidQueryParameterValueParameters(typing_extensions.TypedDict): - """ - The value of the given parameter is invalid. See the documentation of `DataValue` for details on - how parameters are represented. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - parameterDataType: ontologies_models.QueryDataType - parameterId: ontologies_models.ParameterId - parameterValue: typing_extensions.NotRequired[ontologies_models.DataValue] - - -@dataclass -class InvalidQueryParameterValue(errors.BadRequestError): - name: typing.Literal["InvalidQueryParameterValue"] - parameters: InvalidQueryParameterValueParameters - error_instance_id: str - - -class InvalidRangeQueryParameters(typing_extensions.TypedDict): - """The specified query range filter is invalid.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - lt: typing_extensions.NotRequired[typing.Any] - """Less than""" - - gt: typing_extensions.NotRequired[typing.Any] - """Greater than""" - - lte: typing_extensions.NotRequired[typing.Any] - """Less than or equal""" - - gte: typing_extensions.NotRequired[typing.Any] - """Greater than or equal""" - - field: str - - -@dataclass -class InvalidRangeQuery(errors.BadRequestError): - name: typing.Literal["InvalidRangeQuery"] - parameters: InvalidRangeQueryParameters - error_instance_id: str - - -class InvalidSortOrderParameters(typing_extensions.TypedDict): - """ - The requested sort order of one or more properties is invalid. Valid sort orders are 'asc' or 'desc'. Sort - order can also be omitted, and defaults to 'asc'. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - invalidSortOrder: str - - -@dataclass -class InvalidSortOrder(errors.BadRequestError): - name: typing.Literal["InvalidSortOrder"] - parameters: InvalidSortOrderParameters - error_instance_id: str - - -class InvalidSortTypeParameters(typing_extensions.TypedDict): - """The requested sort type of one or more clauses is invalid. Valid sort types are 'p' or 'properties'.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - invalidSortType: str - - -@dataclass -class InvalidSortType(errors.BadRequestError): - name: typing.Literal["InvalidSortType"] - parameters: InvalidSortTypeParameters - error_instance_id: str - - -class InvalidTransactionEditPropertyValueParameters(typing_extensions.TypedDict): - """ - The value of the given property is invalid. See the documentation of `DataValue` for details on - how properties are represented for transaction edits. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - propertyApiName: ontologies_models.PropertyApiName - propertyBaseType: ontologies_models.ValueType - propertyValue: ontologies_models.DataValue - - -@dataclass -class InvalidTransactionEditPropertyValue(errors.BadRequestError): - name: typing.Literal["InvalidTransactionEditPropertyValue"] - parameters: InvalidTransactionEditPropertyValueParameters - error_instance_id: str - - -class InvalidUserIdParameters(typing_extensions.TypedDict): - """The provided value for a user id must be a UUID.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - userId: str - - -@dataclass -class InvalidUserId(errors.BadRequestError): - name: typing.Literal["InvalidUserId"] - parameters: InvalidUserIdParameters - error_instance_id: str - - -class InvalidVectorDimensionParameters(typing_extensions.TypedDict): - """The dimensions of the provided vector don't match the dimensions of the embedding model being queried.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - expectedSize: int - providedSize: int - - -@dataclass -class InvalidVectorDimension(errors.BadRequestError): - name: typing.Literal["InvalidVectorDimension"] - parameters: InvalidVectorDimensionParameters - error_instance_id: str - - -class LinkAlreadyExistsParameters(typing_extensions.TypedDict): - """The link the user is attempting to create already exists.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class LinkAlreadyExists(errors.ConflictError): - name: typing.Literal["LinkAlreadyExists"] - parameters: LinkAlreadyExistsParameters - error_instance_id: str - - -class LinkTypeNotFoundParameters(typing_extensions.TypedDict): - """The link type is not found, or the user does not have access to it.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - objectType: typing_extensions.NotRequired[ontologies_models.ObjectTypeApiName] - linkType: typing_extensions.NotRequired[ontologies_models.LinkTypeApiName] - linkTypeId: typing_extensions.NotRequired[ontologies_models.LinkTypeId] - - -@dataclass -class LinkTypeNotFound(errors.NotFoundError): - name: typing.Literal["LinkTypeNotFound"] - parameters: LinkTypeNotFoundParameters - error_instance_id: str - - -class LinkedObjectNotFoundParameters(typing_extensions.TypedDict): - """The linked object with the given primary key is not found, or the user does not have access to it.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - linkType: ontologies_models.LinkTypeApiName - linkedObjectType: ontologies_models.ObjectTypeApiName - linkedObjectPrimaryKey: typing.Dict[ - ontologies_models.PropertyApiName, ontologies_models.PrimaryKeyValue - ] - - -@dataclass -class LinkedObjectNotFound(errors.NotFoundError): - name: typing.Literal["LinkedObjectNotFound"] - parameters: LinkedObjectNotFoundParameters - error_instance_id: str - - -class LoadObjectSetLinksNotSupportedParameters(typing_extensions.TypedDict): - """Bulk loading object set links is not supported by Object Storage v1.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class LoadObjectSetLinksNotSupported(errors.InternalServerError): - name: typing.Literal["LoadObjectSetLinksNotSupported"] - parameters: LoadObjectSetLinksNotSupportedParameters - error_instance_id: str - - -class MalformedPropertyFiltersParameters(typing_extensions.TypedDict): - """At least one of requested filters are malformed. Please look at the documentation of `PropertyFilter`.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - malformedPropertyFilter: str - - -@dataclass -class MalformedPropertyFilters(errors.BadRequestError): - name: typing.Literal["MalformedPropertyFilters"] - parameters: MalformedPropertyFiltersParameters - error_instance_id: str - - -class MarketplaceActionMappingNotFoundParameters(typing_extensions.TypedDict): - """The given action could not be mapped to a Marketplace installation.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - actionType: ontologies_models.ActionTypeApiName - artifactRepository: ontologies_models.ArtifactRepositoryRid - packageName: ontologies_models.SdkPackageName - - -@dataclass -class MarketplaceActionMappingNotFound(errors.NotFoundError): - name: typing.Literal["MarketplaceActionMappingNotFound"] - parameters: MarketplaceActionMappingNotFoundParameters - error_instance_id: str - - -class MarketplaceInstallationNotFoundParameters(typing_extensions.TypedDict): - """The given marketplace installation could not be found or the user does not have access to it.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - artifactRepository: ontologies_models.ArtifactRepositoryRid - packageName: ontologies_models.SdkPackageName - - -@dataclass -class MarketplaceInstallationNotFound(errors.NotFoundError): - name: typing.Literal["MarketplaceInstallationNotFound"] - parameters: MarketplaceInstallationNotFoundParameters - error_instance_id: str - - -class MarketplaceLinkMappingNotFoundParameters(typing_extensions.TypedDict): - """The given link could not be mapped to a Marketplace installation.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - linkType: ontologies_models.LinkTypeApiName - artifactRepository: ontologies_models.ArtifactRepositoryRid - packageName: ontologies_models.SdkPackageName - - -@dataclass -class MarketplaceLinkMappingNotFound(errors.NotFoundError): - name: typing.Literal["MarketplaceLinkMappingNotFound"] - parameters: MarketplaceLinkMappingNotFoundParameters - error_instance_id: str - - -class MarketplaceObjectMappingNotFoundParameters(typing_extensions.TypedDict): - """The given object could not be mapped to a Marketplace installation.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - objectType: ontologies_models.ObjectTypeApiName - artifactRepository: ontologies_models.ArtifactRepositoryRid - packageName: ontologies_models.SdkPackageName - - -@dataclass -class MarketplaceObjectMappingNotFound(errors.NotFoundError): - name: typing.Literal["MarketplaceObjectMappingNotFound"] - parameters: MarketplaceObjectMappingNotFoundParameters - error_instance_id: str - - -class MarketplaceQueryMappingNotFoundParameters(typing_extensions.TypedDict): - """The given query could not be mapped to a Marketplace installation.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - queryType: ontologies_models.QueryApiName - artifactRepository: ontologies_models.ArtifactRepositoryRid - packageName: ontologies_models.SdkPackageName - - -@dataclass -class MarketplaceQueryMappingNotFound(errors.NotFoundError): - name: typing.Literal["MarketplaceQueryMappingNotFound"] - parameters: MarketplaceQueryMappingNotFoundParameters - error_instance_id: str - - -class MarketplaceSdkActionMappingNotFoundParameters(typing_extensions.TypedDict): - """The given action could not be mapped to a Marketplace installation.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - actionType: ontologies_models.ActionTypeApiName - sdkPackageRid: ontologies_models.SdkPackageRid - sdkVersion: ontologies_models.SdkVersion - - -@dataclass -class MarketplaceSdkActionMappingNotFound(errors.NotFoundError): - name: typing.Literal["MarketplaceSdkActionMappingNotFound"] - parameters: MarketplaceSdkActionMappingNotFoundParameters - error_instance_id: str - - -class MarketplaceSdkInstallationNotFoundParameters(typing_extensions.TypedDict): - """The given marketplace installation could not be found or the user does not have access to it.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - sdkPackageRid: ontologies_models.SdkPackageRid - sdkVersion: ontologies_models.SdkVersion - - -@dataclass -class MarketplaceSdkInstallationNotFound(errors.NotFoundError): - name: typing.Literal["MarketplaceSdkInstallationNotFound"] - parameters: MarketplaceSdkInstallationNotFoundParameters - error_instance_id: str - - -class MarketplaceSdkLinkMappingNotFoundParameters(typing_extensions.TypedDict): - """The given link could not be mapped to a Marketplace installation.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - linkType: ontologies_models.LinkTypeApiName - sdkPackageRid: ontologies_models.SdkPackageRid - sdkVersion: ontologies_models.SdkVersion - - -@dataclass -class MarketplaceSdkLinkMappingNotFound(errors.NotFoundError): - name: typing.Literal["MarketplaceSdkLinkMappingNotFound"] - parameters: MarketplaceSdkLinkMappingNotFoundParameters - error_instance_id: str - - -class MarketplaceSdkObjectMappingNotFoundParameters(typing_extensions.TypedDict): - """The given object could not be mapped to a Marketplace installation.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - localObjectType: typing_extensions.NotRequired[ontologies_models.ObjectTypeApiName] - objectType: typing_extensions.NotRequired[ontologies_models.ObjectTypeRid] - sdkPackageRid: ontologies_models.SdkPackageRid - sdkVersion: ontologies_models.SdkVersion - - -@dataclass -class MarketplaceSdkObjectMappingNotFound(errors.NotFoundError): - name: typing.Literal["MarketplaceSdkObjectMappingNotFound"] - parameters: MarketplaceSdkObjectMappingNotFoundParameters - error_instance_id: str - - -class MarketplaceSdkPropertyMappingNotFoundParameters(typing_extensions.TypedDict): - """The given property could not be mapped to a Marketplace installation.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - propertyType: ontologies_models.PropertyApiName - objectType: ontologies_models.ObjectTypeApiName - sdkPackageRid: ontologies_models.SdkPackageRid - sdkVersion: ontologies_models.SdkVersion - - -@dataclass -class MarketplaceSdkPropertyMappingNotFound(errors.NotFoundError): - name: typing.Literal["MarketplaceSdkPropertyMappingNotFound"] - parameters: MarketplaceSdkPropertyMappingNotFoundParameters - error_instance_id: str - - -class MarketplaceSdkQueryMappingNotFoundParameters(typing_extensions.TypedDict): - """The given query could not be mapped to a Marketplace installation.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - queryType: ontologies_models.QueryApiName - sdkPackageRid: ontologies_models.SdkPackageRid - sdkVersion: ontologies_models.SdkVersion - - -@dataclass -class MarketplaceSdkQueryMappingNotFound(errors.NotFoundError): - name: typing.Literal["MarketplaceSdkQueryMappingNotFound"] - parameters: MarketplaceSdkQueryMappingNotFoundParameters - error_instance_id: str - - -class MissingParameterParameters(typing_extensions.TypedDict): - """ - Required parameters are missing. Please look at the `parameters` field to see which required parameters are - missing from the request. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - parameters: typing.List[ontologies_models.ParameterId] - - -@dataclass -class MissingParameter(errors.BadRequestError): - name: typing.Literal["MissingParameter"] - parameters: MissingParameterParameters - error_instance_id: str - - -class MultipleGroupByOnFieldNotSupportedParameters(typing_extensions.TypedDict): - """Aggregation cannot group by on the same field multiple times.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - duplicateFields: typing.List[str] - - -@dataclass -class MultipleGroupByOnFieldNotSupported(errors.BadRequestError): - name: typing.Literal["MultipleGroupByOnFieldNotSupported"] - parameters: MultipleGroupByOnFieldNotSupportedParameters - error_instance_id: str - - -class MultiplePropertyValuesNotSupportedParameters(typing_extensions.TypedDict): - """ - One of the requested property filters does not support multiple values. Please include only a single value for - it. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - propertyFilter: ontologies_models.PropertyFilter - property: ontologies_models.PropertyApiName - - -@dataclass -class MultiplePropertyValuesNotSupported(errors.BadRequestError): - name: typing.Literal["MultiplePropertyValuesNotSupported"] - parameters: MultiplePropertyValuesNotSupportedParameters - error_instance_id: str - - -class NotCipherFormattedParameters(typing_extensions.TypedDict): - """ - The value intended for decryption with Cipher is not formatted correctly. - It may already be a plaintext value and not require decryption. - Ensure it is correctly formatted (CIPHER::::::CIPHER). - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - value: str - - -@dataclass -class NotCipherFormatted(errors.BadRequestError): - name: typing.Literal["NotCipherFormatted"] - parameters: NotCipherFormattedParameters - error_instance_id: str - - -class ObjectAlreadyExistsParameters(typing_extensions.TypedDict): - """The object the user is attempting to create already exists.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class ObjectAlreadyExists(errors.ConflictError): - name: typing.Literal["ObjectAlreadyExists"] - parameters: ObjectAlreadyExistsParameters - error_instance_id: str - - -class ObjectChangedParameters(typing_extensions.TypedDict): - """An object used by this `Action` was changed by someone else while the `Action` was running.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - primaryKey: typing_extensions.NotRequired[ontologies_models.PropertyValue] - objectType: typing_extensions.NotRequired[ontologies_models.ObjectTypeApiName] - - -@dataclass -class ObjectChanged(errors.ConflictError): - name: typing.Literal["ObjectChanged"] - parameters: ObjectChangedParameters - error_instance_id: str - - -class ObjectNotFoundParameters(typing_extensions.TypedDict): - """The requested object is not found, or the client token does not have access to it.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - objectType: typing_extensions.NotRequired[ontologies_models.ObjectTypeApiName] - primaryKey: typing.Dict[ontologies_models.PropertyApiName, ontologies_models.PrimaryKeyValue] - - -@dataclass -class ObjectNotFound(errors.NotFoundError): - name: typing.Literal["ObjectNotFound"] - parameters: ObjectNotFoundParameters - error_instance_id: str - - -class ObjectSetNotFoundParameters(typing_extensions.TypedDict): - """The requested object set is not found, or the client token does not have access to it.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - objectSetRid: ontologies_models.ObjectSetRid - - -@dataclass -class ObjectSetNotFound(errors.NotFoundError): - name: typing.Literal["ObjectSetNotFound"] - parameters: ObjectSetNotFoundParameters - error_instance_id: str - - -class ObjectTypeNotFoundParameters(typing_extensions.TypedDict): - """The requested object type is not found, or the client token does not have access to it.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - objectType: typing_extensions.NotRequired[ontologies_models.ObjectTypeApiName] - objectTypeRid: typing_extensions.NotRequired[ontologies_models.ObjectTypeRid] - - -@dataclass -class ObjectTypeNotFound(errors.NotFoundError): - name: typing.Literal["ObjectTypeNotFound"] - parameters: ObjectTypeNotFoundParameters - error_instance_id: str - - -class ObjectTypeNotSyncedParameters(typing_extensions.TypedDict): - """ - The requested object type is not synced into the ontology. Please reach out to your Ontology - Administrator to re-index the object type in Ontology Management Application. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - objectType: ontologies_models.ObjectTypeApiName - - -@dataclass -class ObjectTypeNotSynced(errors.ConflictError): - name: typing.Literal["ObjectTypeNotSynced"] - parameters: ObjectTypeNotSyncedParameters - error_instance_id: str - - -class ObjectTypesNotSyncedParameters(typing_extensions.TypedDict): - """ - One or more of the requested object types are not synced into the ontology. Please reach out to your Ontology - Administrator to re-index the object type(s) in Ontology Management Application. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - objectTypes: typing.List[ontologies_models.ObjectTypeApiName] - - -@dataclass -class ObjectTypesNotSynced(errors.ConflictError): - name: typing.Literal["ObjectTypesNotSynced"] - parameters: ObjectTypesNotSyncedParameters - error_instance_id: str - - -class ObjectsExceededLimitParameters(typing_extensions.TypedDict): - """ - There are more objects, but they cannot be returned by this API. Only 10,000 objects are available through this - API for a given request. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class ObjectsExceededLimit(errors.BadRequestError): - name: typing.Literal["ObjectsExceededLimit"] - parameters: ObjectsExceededLimitParameters - error_instance_id: str - - -class ObjectsModifiedConcurrentlyParameters(typing_extensions.TypedDict): - """ - The provided objects are being modified concurrently and the operation would result in a conflict. - The client should retry the request later. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - functionRid: typing_extensions.NotRequired[ontologies_models.FunctionRid] - functionVersion: typing_extensions.NotRequired[ontologies_models.FunctionVersion] - - -@dataclass -class ObjectsModifiedConcurrently(errors.ConflictError): - name: typing.Literal["ObjectsModifiedConcurrently"] - parameters: ObjectsModifiedConcurrentlyParameters - error_instance_id: str - - -class OntologyApiNameNotUniqueParameters(typing_extensions.TypedDict): - """The given Ontology API name is not unique. Use the Ontology RID in place of the Ontology API name.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - ontologyApiName: ontologies_models.OntologyApiName - - -@dataclass -class OntologyApiNameNotUnique(errors.BadRequestError): - name: typing.Literal["OntologyApiNameNotUnique"] - parameters: OntologyApiNameNotUniqueParameters - error_instance_id: str - - -class OntologyEditsExceededLimitParameters(typing_extensions.TypedDict): - """ - The number of edits to the Ontology exceeded the allowed limit. - This may happen because of the request or because the Action is modifying too many objects. - Please change the size of your request or contact the Ontology administrator. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - editsCount: int - editsLimit: int - - -@dataclass -class OntologyEditsExceededLimit(errors.BadRequestError): - name: typing.Literal["OntologyEditsExceededLimit"] - parameters: OntologyEditsExceededLimitParameters - error_instance_id: str - - -class OntologyNotFoundParameters(typing_extensions.TypedDict): - """The requested Ontology is not found, or the client token does not have access to it.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - ontologyRid: typing_extensions.NotRequired[ontologies_models.OntologyRid] - apiName: typing_extensions.NotRequired[ontologies_models.OntologyApiName] - - -@dataclass -class OntologyNotFound(errors.NotFoundError): - name: typing.Literal["OntologyNotFound"] - parameters: OntologyNotFoundParameters - error_instance_id: str - - -class OntologySyncingParameters(typing_extensions.TypedDict): - """ - The requested object type has been changed in the **Ontology Manager** and changes are currently being applied. Wait a - few seconds and try again. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - objectType: ontologies_models.ObjectTypeApiName - - -@dataclass -class OntologySyncing(errors.ConflictError): - name: typing.Literal["OntologySyncing"] - parameters: OntologySyncingParameters - error_instance_id: str - - -class OntologySyncingObjectTypesParameters(typing_extensions.TypedDict): - """ - One or more requested object types have been changed in the **Ontology Manager** and changes are currently being - applied. Wait a few seconds and try again. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - objectTypes: typing.List[ontologies_models.ObjectTypeApiName] - - -@dataclass -class OntologySyncingObjectTypes(errors.ConflictError): - name: typing.Literal["OntologySyncingObjectTypes"] - parameters: OntologySyncingObjectTypesParameters - error_instance_id: str - - -class ParameterObjectNotFoundParameters(typing_extensions.TypedDict): - """The parameter object reference or parameter default value is not found, or the client token does not have access to it.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - objectType: ontologies_models.ObjectTypeApiName - primaryKey: typing.Dict[ontologies_models.PropertyApiName, ontologies_models.PrimaryKeyValue] - - -@dataclass -class ParameterObjectNotFound(errors.NotFoundError): - name: typing.Literal["ParameterObjectNotFound"] - parameters: ParameterObjectNotFoundParameters - error_instance_id: str - - -class ParameterObjectSetRidNotFoundParameters(typing_extensions.TypedDict): - """The parameter object set RID is not found, or the client token does not have access to it.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - objectSetRid: core.RID - - -@dataclass -class ParameterObjectSetRidNotFound(errors.NotFoundError): - name: typing.Literal["ParameterObjectSetRidNotFound"] - parameters: ParameterObjectSetRidNotFoundParameters - error_instance_id: str - - -class ParameterTypeNotSupportedParameters(typing_extensions.TypedDict): - """ - The type of the requested parameter is not currently supported by this API. If you need support for this, - please reach out to Palantir Support. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - parameterId: ontologies_models.ParameterId - parameterBaseType: ontologies_models.ValueType - - -@dataclass -class ParameterTypeNotSupported(errors.BadRequestError): - name: typing.Literal["ParameterTypeNotSupported"] - parameters: ParameterTypeNotSupportedParameters - error_instance_id: str - - -class ParametersNotFoundParameters(typing_extensions.TypedDict): - """ - The provided parameter ID was not found for the action. Please look at the `configuredParameterIds` field - to see which ones are available. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - actionType: ontologies_models.ActionTypeApiName - unknownParameterIds: typing.List[ontologies_models.ParameterId] - configuredParameterIds: typing.List[ontologies_models.ParameterId] - - -@dataclass -class ParametersNotFound(errors.BadRequestError): - name: typing.Literal["ParametersNotFound"] - parameters: ParametersNotFoundParameters - error_instance_id: str - - -class ParentAttachmentPermissionDeniedParameters(typing_extensions.TypedDict): - """The user does not have permission to parent attachments.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class ParentAttachmentPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["ParentAttachmentPermissionDenied"] - parameters: ParentAttachmentPermissionDeniedParameters - error_instance_id: str - - -class PropertiesHaveDifferentIdsParameters(typing_extensions.TypedDict): - """Properties used in ordering must have the same ids.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - properties: typing.List[ontologies_models.SharedPropertyTypeApiName] - - -@dataclass -class PropertiesHaveDifferentIds(errors.BadRequestError): - name: typing.Literal["PropertiesHaveDifferentIds"] - parameters: PropertiesHaveDifferentIdsParameters - error_instance_id: str - - -class PropertiesNotFilterableParameters(typing_extensions.TypedDict): - """ - Results could not be filtered by the requested properties. Please mark the properties as *Searchable* and - *Selectable* in the **Ontology Manager** to be able to filter on those properties. There may be a short delay - between the time a property is marked *Searchable* and *Selectable* and when it can be used. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - properties: typing.List[ontologies_models.PropertyApiName] - - -@dataclass -class PropertiesNotFilterable(errors.BadRequestError): - name: typing.Literal["PropertiesNotFilterable"] - parameters: PropertiesNotFilterableParameters - error_instance_id: str - - -class PropertiesNotFoundParameters(typing_extensions.TypedDict): - """The requested properties are not found on the object type.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - objectType: ontologies_models.ObjectTypeApiName - properties: typing.List[ontologies_models.PropertyApiName] - - -@dataclass -class PropertiesNotFound(errors.NotFoundError): - name: typing.Literal["PropertiesNotFound"] - parameters: PropertiesNotFoundParameters - error_instance_id: str - - -class PropertiesNotSearchableParameters(typing_extensions.TypedDict): - """ - Search is not enabled on the specified properties. Please mark the properties as *Searchable* - in the **Ontology Manager** to enable search on them. There may be a short delay - between the time a property is marked *Searchable* and when it can be used. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - propertyApiNames: typing.List[ontologies_models.PropertyApiName] - - -@dataclass -class PropertiesNotSearchable(errors.BadRequestError): - name: typing.Literal["PropertiesNotSearchable"] - parameters: PropertiesNotSearchableParameters - error_instance_id: str - - -class PropertiesNotSortableParameters(typing_extensions.TypedDict): - """ - Results could not be ordered by the requested properties. Please mark the properties as *Searchable* and - *Sortable* in the **Ontology Manager** to enable their use in `orderBy` parameters. There may be a short delay - between the time a property is set to *Searchable* and *Sortable* and when it can be used. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - properties: typing.List[ontologies_models.PropertyApiName] - - -@dataclass -class PropertiesNotSortable(errors.BadRequestError): - name: typing.Literal["PropertiesNotSortable"] - parameters: PropertiesNotSortableParameters - error_instance_id: str - - -class PropertyApiNameNotFoundParameters(typing_extensions.TypedDict): - """ - A property that was required to have an API name, such as a primary key, is missing one. You can set an API - name for it using the **Ontology Manager**. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - propertyId: ontologies_models.PropertyId - propertyBaseType: ontologies_models.ValueType - - -@dataclass -class PropertyApiNameNotFound(errors.BadRequestError): - name: typing.Literal["PropertyApiNameNotFound"] - parameters: PropertyApiNameNotFoundParameters - error_instance_id: str - - -class PropertyBaseTypeNotSupportedParameters(typing_extensions.TypedDict): - """ - The type of the requested property is not currently supported by this API. If you need support for this, - please reach out to Palantir Support. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - objectType: ontologies_models.ObjectTypeApiName - property: ontologies_models.PropertyApiName - propertyBaseType: ontologies_models.ValueType - - -@dataclass -class PropertyBaseTypeNotSupported(errors.BadRequestError): - name: typing.Literal["PropertyBaseTypeNotSupported"] - parameters: PropertyBaseTypeNotSupportedParameters - error_instance_id: str - - -class PropertyExactMatchingNotSupportedParameters(typing_extensions.TypedDict): - """A property that does not support exact matching is used in a setting that requires exact matching.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - propertyBaseType: ontologies_models.ValueType - propertyTypeRid: typing_extensions.NotRequired[ontologies_models.PropertyTypeRid] - - -@dataclass -class PropertyExactMatchingNotSupported(errors.BadRequestError): - name: typing.Literal["PropertyExactMatchingNotSupported"] - parameters: PropertyExactMatchingNotSupportedParameters - error_instance_id: str - - -class PropertyFiltersNotSupportedParameters(typing_extensions.TypedDict): - """ - At least one of the requested property filters are not supported. See the documentation of `PropertyFilter` for - a list of supported property filters. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - propertyFilters: typing.List[ontologies_models.PropertyFilter] - property: ontologies_models.PropertyApiName - - -@dataclass -class PropertyFiltersNotSupported(errors.BadRequestError): - name: typing.Literal["PropertyFiltersNotSupported"] - parameters: PropertyFiltersNotSupportedParameters - error_instance_id: str - - -class PropertyNotFoundParameters(typing_extensions.TypedDict): - """Failed to find a provided property for a given object.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class PropertyNotFound(errors.BadRequestError): - name: typing.Literal["PropertyNotFound"] - parameters: PropertyNotFoundParameters - error_instance_id: str - - -class PropertyNotFoundOnObjectParameters(typing_extensions.TypedDict): - """Could not find the given property on the object. The user may not have permissions to see this property or it may be configured incorrectly.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - objectTypeRid: ontologies_models.ObjectTypeRid - objectRid: ontologies_models.ObjectRid - objectPropertyRid: ontologies_models.PropertyTypeRid - - -@dataclass -class PropertyNotFoundOnObject(errors.BadRequestError): - name: typing.Literal["PropertyNotFoundOnObject"] - parameters: PropertyNotFoundOnObjectParameters - error_instance_id: str - - -class PropertyTypeDoesNotSupportNearestNeighborsParameters(typing_extensions.TypedDict): - """The provided propertyIdentifier is not configured with an embedding model in the ontology.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class PropertyTypeDoesNotSupportNearestNeighbors(errors.BadRequestError): - name: typing.Literal["PropertyTypeDoesNotSupportNearestNeighbors"] - parameters: PropertyTypeDoesNotSupportNearestNeighborsParameters - error_instance_id: str - - -class PropertyTypeNotFoundParameters(typing_extensions.TypedDict): - """The requested property type is not found, or the client token does not have access to it.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - objectTypeApiName: typing_extensions.NotRequired[ontologies_models.ObjectTypeApiName] - propertyApiName: typing_extensions.NotRequired[ontologies_models.PropertyApiName] - - -@dataclass -class PropertyTypeNotFound(errors.NotFoundError): - name: typing.Literal["PropertyTypeNotFound"] - parameters: PropertyTypeNotFoundParameters - error_instance_id: str - - -class PropertyTypeRidNotFoundParameters(typing_extensions.TypedDict): - """The requested property type RID is not found, or the client token does not have access to it.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - propertyTypeRid: typing_extensions.NotRequired[ontologies_models.PropertyTypeRid] - - -@dataclass -class PropertyTypeRidNotFound(errors.NotFoundError): - name: typing.Literal["PropertyTypeRidNotFound"] - parameters: PropertyTypeRidNotFoundParameters - error_instance_id: str - - -class PropertyTypesSearchNotSupportedParameters(typing_extensions.TypedDict): - """ - The search on the property types are not supported. See the `Search Objects` documentation for - a list of supported search queries on different property types. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - parameters: typing.Dict[ - ontologies_models.PropertyFilter, typing.List[ontologies_models.PropertyApiName] - ] - - -@dataclass -class PropertyTypesSearchNotSupported(errors.BadRequestError): - name: typing.Literal["PropertyTypesSearchNotSupported"] - parameters: PropertyTypesSearchNotSupportedParameters - error_instance_id: str - - -class QueryEncounteredUserFacingErrorParameters(typing_extensions.TypedDict): - """ - The authored `Query` failed to execute because of a user induced error. The message argument - is meant to be displayed to the user. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - functionRid: ontologies_models.FunctionRid - functionVersion: ontologies_models.FunctionVersion - message: str - - -@dataclass -class QueryEncounteredUserFacingError(errors.ConflictError): - name: typing.Literal["QueryEncounteredUserFacingError"] - parameters: QueryEncounteredUserFacingErrorParameters - error_instance_id: str - - -class QueryMemoryExceededLimitParameters(typing_extensions.TypedDict): - """Memory limits were exceeded for the `Query` execution.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - functionRid: ontologies_models.FunctionRid - functionVersion: ontologies_models.FunctionVersion - - -@dataclass -class QueryMemoryExceededLimit(errors.InternalServerError): - name: typing.Literal["QueryMemoryExceededLimit"] - parameters: QueryMemoryExceededLimitParameters - error_instance_id: str - - -class QueryNotFoundParameters(typing_extensions.TypedDict): - """The query is not found, or the user does not have access to it.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - query: ontologies_models.QueryApiName - - -@dataclass -class QueryNotFound(errors.NotFoundError): - name: typing.Literal["QueryNotFound"] - parameters: QueryNotFoundParameters - error_instance_id: str - - -class QueryRuntimeErrorParameters(typing_extensions.TypedDict): - """The authored `Query` failed to execute because of a runtime error.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - functionRid: ontologies_models.FunctionRid - functionVersion: ontologies_models.FunctionVersion - message: typing_extensions.NotRequired[str] - stacktrace: typing_extensions.NotRequired[str] - parameters: typing.Dict[ontologies_models.QueryRuntimeErrorParameter, str] - - -@dataclass -class QueryRuntimeError(errors.BadRequestError): - name: typing.Literal["QueryRuntimeError"] - parameters: QueryRuntimeErrorParameters - error_instance_id: str - - -class QueryTimeExceededLimitParameters(typing_extensions.TypedDict): - """Time limits were exceeded for the `Query` execution.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - functionRid: ontologies_models.FunctionRid - functionVersion: ontologies_models.FunctionVersion - - -@dataclass -class QueryTimeExceededLimit(errors.InternalServerError): - name: typing.Literal["QueryTimeExceededLimit"] - parameters: QueryTimeExceededLimitParameters - error_instance_id: str - - -class QueryVersionNotFoundParameters(typing_extensions.TypedDict): - """The query could not be found at the provided version.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - apiName: ontologies_models.QueryApiName - version: ontologies_models.FunctionVersion - - -@dataclass -class QueryVersionNotFound(errors.NotFoundError): - name: typing.Literal["QueryVersionNotFound"] - parameters: QueryVersionNotFoundParameters - error_instance_id: str - - -class RateLimitReachedParameters(typing_extensions.TypedDict): - """Unable to decrypt this CipherText because the available rate limits in Cipher licenses were reached.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - cipherChannel: core.RID - - -@dataclass -class RateLimitReached(errors.PermissionDeniedError): - name: typing.Literal["RateLimitReached"] - parameters: RateLimitReachedParameters - error_instance_id: str - - -class SharedPropertiesNotFoundParameters(typing_extensions.TypedDict): - """The requested shared property types are not present on every object type.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - objectType: typing.List[ontologies_models.ObjectTypeApiName] - missingSharedProperties: typing.List[ontologies_models.SharedPropertyTypeApiName] - - -@dataclass -class SharedPropertiesNotFound(errors.NotFoundError): - name: typing.Literal["SharedPropertiesNotFound"] - parameters: SharedPropertiesNotFoundParameters - error_instance_id: str - - -class SharedPropertyTypeNotFoundParameters(typing_extensions.TypedDict): - """The requested shared property type is not found, or the client token does not have access to it.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - apiName: typing_extensions.NotRequired[ontologies_models.SharedPropertyTypeApiName] - rid: typing_extensions.NotRequired[ontologies_models.SharedPropertyTypeRid] - - -@dataclass -class SharedPropertyTypeNotFound(errors.NotFoundError): - name: typing.Literal["SharedPropertyTypeNotFound"] - parameters: SharedPropertyTypeNotFoundParameters - error_instance_id: str - - -class SimilarityThresholdOutOfRangeParameters(typing_extensions.TypedDict): - """The value of the similarity threshold must be in the range 0 <= threshold <= 1.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - providedThreshold: float - - -@dataclass -class SimilarityThresholdOutOfRange(errors.BadRequestError): - name: typing.Literal["SimilarityThresholdOutOfRange"] - parameters: SimilarityThresholdOutOfRangeParameters - error_instance_id: str - - -class TooManyNearestNeighborsRequestedParameters(typing_extensions.TypedDict): - """The value of numNeighbors must be in the range 1 <= numNeighbors <= 500.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - requestedNumNeighbors: int - maxNumNeighbors: int - - -@dataclass -class TooManyNearestNeighborsRequested(errors.BadRequestError): - name: typing.Literal["TooManyNearestNeighborsRequested"] - parameters: TooManyNearestNeighborsRequestedParameters - error_instance_id: str - - -class UnauthorizedCipherOperationParameters(typing_extensions.TypedDict): - """The provided token does not have permission to take a specific Cipher operation.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - cipherChannel: core.RID - - -@dataclass -class UnauthorizedCipherOperation(errors.PermissionDeniedError): - name: typing.Literal["UnauthorizedCipherOperation"] - parameters: UnauthorizedCipherOperationParameters - error_instance_id: str - - -class UndecryptableValueParameters(typing_extensions.TypedDict): - """ - The value intended for decryption with Cipher cannot be decrypted. - Ensure it is correctly formatted (CIPHER:::::CIPHER). - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - value: str - - -@dataclass -class UndecryptableValue(errors.BadRequestError): - name: typing.Literal["UndecryptableValue"] - parameters: UndecryptableValueParameters - error_instance_id: str - - -class UniqueIdentifierLinkIdsDoNotExistInActionTypeParameters(typing_extensions.TypedDict): - """ - One or more unique identifier link IDs specified in apply action overrides could not be found - in the ActionType definition. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - unknownUniqueIdentifierLinkIds: typing.List[ontologies_models.UniqueIdentifierLinkId] - - -@dataclass -class UniqueIdentifierLinkIdsDoNotExistInActionType(errors.BadRequestError): - name: typing.Literal["UniqueIdentifierLinkIdsDoNotExistInActionType"] - parameters: UniqueIdentifierLinkIdsDoNotExistInActionTypeParameters - error_instance_id: str - - -class UnknownParameterParameters(typing_extensions.TypedDict): - """ - The provided parameters were not found. Please look at the `knownParameters` field - to see which ones are available. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - unknownParameters: typing.List[ontologies_models.ParameterId] - expectedParameters: typing.List[ontologies_models.ParameterId] - - -@dataclass -class UnknownParameter(errors.BadRequestError): - name: typing.Literal["UnknownParameter"] - parameters: UnknownParameterParameters - error_instance_id: str - - -class UnsupportedInterfaceBasedObjectSetParameters(typing_extensions.TypedDict): - """Aggregations on interface-based object sets are not supported for object sets with OSv1 objects.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - interfaceType: ontologies_models.InterfaceTypeApiName - - -@dataclass -class UnsupportedInterfaceBasedObjectSet(errors.BadRequestError): - name: typing.Literal["UnsupportedInterfaceBasedObjectSet"] - parameters: UnsupportedInterfaceBasedObjectSetParameters - error_instance_id: str - - -class UnsupportedObjectSetParameters(typing_extensions.TypedDict): - """The requested object set is not supported.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class UnsupportedObjectSet(errors.BadRequestError): - name: typing.Literal["UnsupportedObjectSet"] - parameters: UnsupportedObjectSetParameters - error_instance_id: str - - -class ValueTypeNotFoundParameters(typing_extensions.TypedDict): - """The value type is not found, or the user does not have access to it.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - valueType: typing_extensions.NotRequired[ontologies_models.ValueTypeApiName] - rid: typing_extensions.NotRequired[ontologies_models.ValueTypeRid] - - -@dataclass -class ValueTypeNotFound(errors.NotFoundError): - name: typing.Literal["ValueTypeNotFound"] - parameters: ValueTypeNotFoundParameters - error_instance_id: str - - -class ViewObjectPermissionDeniedParameters(typing_extensions.TypedDict): - """ - The provided token does not have permission to view any data sources backing this object type. Ensure the object - type has backing data sources configured and visible. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - objectType: ontologies_models.ObjectTypeApiName - - -@dataclass -class ViewObjectPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["ViewObjectPermissionDenied"] - parameters: ViewObjectPermissionDeniedParameters - error_instance_id: str - - -__all__ = [ - "ActionContainsDuplicateEdits", - "ActionEditedPropertiesNotFound", - "ActionEditsReadOnlyEntity", - "ActionNotFound", - "ActionParameterInterfaceTypeNotFound", - "ActionParameterObjectNotFound", - "ActionParameterObjectTypeNotFound", - "ActionTypeNotFound", - "ActionValidationFailed", - "AggregationAccuracyNotSupported", - "AggregationGroupCountExceededLimit", - "AggregationMemoryExceededLimit", - "AggregationNestedObjectSetSizeExceededLimit", - "ApplyActionFailed", - "AttachmentNotFound", - "AttachmentRidAlreadyExists", - "AttachmentSizeExceededLimit", - "CipherChannelNotFound", - "CompositePrimaryKeyNotSupported", - "ConsistentSnapshotError", - "DefaultAndNullGroupsNotSupported", - "DerivedPropertyApiNamesNotUnique", - "DuplicateOrderBy", - "EditObjectPermissionDenied", - "FunctionEncounteredUserFacingError", - "FunctionExecutionFailed", - "FunctionExecutionTimedOut", - "FunctionInvalidInput", - "HighScaleComputationNotEnabled", - "InterfaceBasedObjectSetNotSupported", - "InterfaceLinkTypeNotFound", - "InterfacePropertiesHaveDifferentIds", - "InterfacePropertiesNotFound", - "InterfacePropertyNotFound", - "InterfaceTypeNotFound", - "InterfaceTypesNotFound", - "InvalidAggregationOrdering", - "InvalidAggregationOrderingWithNullValues", - "InvalidAggregationRange", - "InvalidAggregationRangePropertyType", - "InvalidAggregationRangePropertyTypeForInterface", - "InvalidAggregationRangeValue", - "InvalidAggregationRangeValueForInterface", - "InvalidApplyActionOptionCombination", - "InvalidContentLength", - "InvalidContentType", - "InvalidDerivedPropertyDefinition", - "InvalidDurationGroupByPropertyType", - "InvalidDurationGroupByPropertyTypeForInterface", - "InvalidDurationGroupByValue", - "InvalidFields", - "InvalidGroupId", - "InvalidOrderType", - "InvalidParameterValue", - "InvalidPropertyFilterValue", - "InvalidPropertyFiltersCombination", - "InvalidPropertyType", - "InvalidPropertyValue", - "InvalidQueryOutputValue", - "InvalidQueryParameterValue", - "InvalidRangeQuery", - "InvalidSortOrder", - "InvalidSortType", - "InvalidTransactionEditPropertyValue", - "InvalidUserId", - "InvalidVectorDimension", - "LinkAlreadyExists", - "LinkTypeNotFound", - "LinkedObjectNotFound", - "LoadObjectSetLinksNotSupported", - "MalformedPropertyFilters", - "MarketplaceActionMappingNotFound", - "MarketplaceInstallationNotFound", - "MarketplaceLinkMappingNotFound", - "MarketplaceObjectMappingNotFound", - "MarketplaceQueryMappingNotFound", - "MarketplaceSdkActionMappingNotFound", - "MarketplaceSdkInstallationNotFound", - "MarketplaceSdkLinkMappingNotFound", - "MarketplaceSdkObjectMappingNotFound", - "MarketplaceSdkPropertyMappingNotFound", - "MarketplaceSdkQueryMappingNotFound", - "MissingParameter", - "MultipleGroupByOnFieldNotSupported", - "MultiplePropertyValuesNotSupported", - "NotCipherFormatted", - "ObjectAlreadyExists", - "ObjectChanged", - "ObjectNotFound", - "ObjectSetNotFound", - "ObjectTypeNotFound", - "ObjectTypeNotSynced", - "ObjectTypesNotSynced", - "ObjectsExceededLimit", - "ObjectsModifiedConcurrently", - "OntologyApiNameNotUnique", - "OntologyEditsExceededLimit", - "OntologyNotFound", - "OntologySyncing", - "OntologySyncingObjectTypes", - "ParameterObjectNotFound", - "ParameterObjectSetRidNotFound", - "ParameterTypeNotSupported", - "ParametersNotFound", - "ParentAttachmentPermissionDenied", - "PropertiesHaveDifferentIds", - "PropertiesNotFilterable", - "PropertiesNotFound", - "PropertiesNotSearchable", - "PropertiesNotSortable", - "PropertyApiNameNotFound", - "PropertyBaseTypeNotSupported", - "PropertyExactMatchingNotSupported", - "PropertyFiltersNotSupported", - "PropertyNotFound", - "PropertyNotFoundOnObject", - "PropertyTypeDoesNotSupportNearestNeighbors", - "PropertyTypeNotFound", - "PropertyTypeRidNotFound", - "PropertyTypesSearchNotSupported", - "QueryEncounteredUserFacingError", - "QueryMemoryExceededLimit", - "QueryNotFound", - "QueryRuntimeError", - "QueryTimeExceededLimit", - "QueryVersionNotFound", - "RateLimitReached", - "SharedPropertiesNotFound", - "SharedPropertyTypeNotFound", - "SimilarityThresholdOutOfRange", - "TooManyNearestNeighborsRequested", - "UnauthorizedCipherOperation", - "UndecryptableValue", - "UniqueIdentifierLinkIdsDoNotExistInActionType", - "UnknownParameter", - "UnsupportedInterfaceBasedObjectSet", - "UnsupportedObjectSet", - "ValueTypeNotFound", - "ViewObjectPermissionDenied", -] diff --git a/foundry_sdk/v1/ontologies/models.py b/foundry_sdk/v1/ontologies/models.py deleted file mode 100644 index b5bc3f361..000000000 --- a/foundry_sdk/v1/ontologies/models.py +++ /dev/null @@ -1,1702 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -from __future__ import annotations - -import typing - -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk.v1.core import models as core_models - -ActionRid = core.RID -"""The unique resource identifier for an action.""" - - -class ActionType(core.ModelBase): - """Represents an action type in the Ontology.""" - - api_name: ActionTypeApiName = pydantic.Field(alias=str("apiName")) # type: ignore[literal-required] - description: typing.Optional[str] = None - display_name: typing.Optional[core_models.DisplayName] = pydantic.Field(alias=str("displayName"), default=None) # type: ignore[literal-required] - status: core_models.ReleaseStatus - parameters: typing.Dict[ParameterId, Parameter] - rid: ActionTypeRid - operations: typing.List[LogicRule] - - -ActionTypeApiName = str -""" -The name of the action type in the API. To find the API name for your Action Type, use the `List action types` -endpoint or check the **Ontology Manager**. -""" - - -ActionTypeRid = core.RID -"""The unique resource identifier of an action type, useful for interacting with other Foundry APIs.""" - - -class AggregateObjectsRequest(core.ModelBase): - """AggregateObjectsRequest""" - - aggregation: typing.List[Aggregation] - query: typing.Optional[SearchJsonQuery] = None - group_by: typing.List[AggregationGroupBy] = pydantic.Field(alias=str("groupBy")) # type: ignore[literal-required] - - -class AggregateObjectsResponse(core.ModelBase): - """AggregateObjectsResponse""" - - excluded_items: typing.Optional[int] = pydantic.Field(alias=str("excludedItems"), default=None) # type: ignore[literal-required] - next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] - data: typing.List[AggregateObjectsResponseItem] - - -class AggregateObjectsResponseItem(core.ModelBase): - """AggregateObjectsResponseItem""" - - group: typing.Dict[AggregationGroupKey, AggregationGroupValue] - metrics: typing.List[AggregationMetricResult] - - -Aggregation = typing_extensions.Annotated[ - typing.Union[ - "ApproximateDistinctAggregation", - "MinAggregation", - "AvgAggregation", - "MaxAggregation", - "CountAggregation", - "SumAggregation", - ], - pydantic.Field(discriminator="type"), -] -"""Specifies an aggregation function.""" - - -class AggregationDurationGrouping(core.ModelBase): - """ - Divides objects into groups according to an interval. Note that this grouping applies only on date types. - The interval uses the ISO 8601 notation. For example, "PT1H2M34S" represents a duration of 3754 seconds. - """ - - field: FieldNameV1 - duration: Duration - type: typing.Literal["duration"] = "duration" - - -class AggregationExactGrouping(core.ModelBase): - """Divides objects into groups according to an exact value.""" - - field: FieldNameV1 - max_group_count: typing.Optional[int] = pydantic.Field(alias=str("maxGroupCount"), default=None) # type: ignore[literal-required] - type: typing.Literal["exact"] = "exact" - - -class AggregationFixedWidthGrouping(core.ModelBase): - """Divides objects into groups with the specified width.""" - - field: FieldNameV1 - fixed_width: int = pydantic.Field(alias=str("fixedWidth")) # type: ignore[literal-required] - type: typing.Literal["fixedWidth"] = "fixedWidth" - - -AggregationGroupBy = typing_extensions.Annotated[ - typing.Union[ - "AggregationDurationGrouping", - "AggregationFixedWidthGrouping", - "AggregationRangesGrouping", - "AggregationExactGrouping", - ], - pydantic.Field(discriminator="type"), -] -"""Specifies a grouping for aggregation results.""" - - -AggregationGroupKey = str -"""AggregationGroupKey""" - - -AggregationGroupValue = typing.Any -"""AggregationGroupValue""" - - -AggregationMetricName = str -"""A user-specified alias for an aggregation metric name.""" - - -class AggregationMetricResult(core.ModelBase): - """AggregationMetricResult""" - - name: str - value: typing.Optional[float] = None - """TBD""" - - -class AggregationRange(core.ModelBase): - """Specifies a date range from an inclusive start date to an exclusive end date.""" - - lt: typing.Optional[typing.Any] = None - """Exclusive end date.""" - - lte: typing.Optional[typing.Any] = None - """Inclusive end date.""" - - gt: typing.Optional[typing.Any] = None - """Exclusive start date.""" - - gte: typing.Optional[typing.Any] = None - """Inclusive start date.""" - - -class AggregationRangesGrouping(core.ModelBase): - """Divides objects into groups according to specified ranges.""" - - field: FieldNameV1 - ranges: typing.List[AggregationRange] - type: typing.Literal["ranges"] = "ranges" - - -class AllTermsQuery(core.ModelBase): - """ - Returns objects where the specified field contains all of the whitespace separated words in any - order in the provided value. This query supports fuzzy matching. - """ - - field: FieldNameV1 - value: str - fuzzy: typing.Optional[Fuzzy] = None - type: typing.Literal["allTerms"] = "allTerms" - - -class AndQuery(core.ModelBase): - """Returns objects where every query is satisfied.""" - - value: typing.List[SearchJsonQuery] - type: typing.Literal["and"] = "and" - - -class AnyTermQuery(core.ModelBase): - """ - Returns objects where the specified field contains any of the whitespace separated words in any - order in the provided value. This query supports fuzzy matching. - """ - - field: FieldNameV1 - value: str - fuzzy: typing.Optional[Fuzzy] = None - type: typing.Literal["anyTerm"] = "anyTerm" - - -ApplyActionMode = typing.Literal["VALIDATE_ONLY", "VALIDATE_AND_EXECUTE"] -"""ApplyActionMode""" - - -class ApplyActionRequest(core.ModelBase): - """ApplyActionRequest""" - - parameters: typing.Dict[ParameterId, typing.Optional[DataValue]] - - -class ApplyActionRequestOptions(core.ModelBase): - """ApplyActionRequestOptions""" - - mode: typing.Optional[ApplyActionMode] = None - return_edits: typing.Optional[ReturnEditsMode] = pydantic.Field(alias=str("returnEdits"), default=None) # type: ignore[literal-required] - - -class ApplyActionResponse(core.ModelBase): - """ApplyActionResponse""" - - -class ApproximateDistinctAggregation(core.ModelBase): - """Computes an approximate number of distinct values for the provided field.""" - - field: FieldNameV1 - name: typing.Optional[AggregationMetricName] = None - type: typing.Literal["approximateDistinct"] = "approximateDistinct" - - -class ArrayEvaluatedConstraint(core.ModelBase): - """Evaluated constraints of array parameters that support per-entry constraint evaluations.""" - - entries: typing.List[ArrayEntryEvaluatedConstraint] - type: typing.Literal["array"] = "array" - - -class ArraySizeConstraint(core.ModelBase): - """The parameter expects an array of values and the size of the array must fall within the defined range.""" - - lt: typing.Optional[typing.Any] = None - """Less than""" - - lte: typing.Optional[typing.Any] = None - """Less than or equal""" - - gt: typing.Optional[typing.Any] = None - """Greater than""" - - gte: typing.Optional[typing.Any] = None - """Greater than or equal""" - - type: typing.Literal["arraySize"] = "arraySize" - - -ArtifactRepositoryRid = core.RID -"""ArtifactRepositoryRid""" - - -class Attachment(core.ModelBase): - """The representation of an attachment.""" - - rid: AttachmentRid - filename: core_models.Filename - size_bytes: core_models.SizeBytes = pydantic.Field(alias=str("sizeBytes")) # type: ignore[literal-required] - media_type: core_models.MediaType = pydantic.Field(alias=str("mediaType")) # type: ignore[literal-required] - - -AttachmentRid = core.RID -"""The unique resource identifier of an attachment.""" - - -class AvgAggregation(core.ModelBase): - """Computes the average value for the provided field.""" - - field: FieldNameV1 - name: typing.Optional[AggregationMetricName] = None - type: typing.Literal["avg"] = "avg" - - -class BatchApplyActionRequest(core.ModelBase): - """BatchApplyActionRequest""" - - requests: typing.List[ApplyActionRequest] - - -class BatchApplyActionResponse(core.ModelBase): - """BatchApplyActionResponse""" - - -class ContainsQuery(core.ModelBase): - """Returns objects where the specified array contains a value.""" - - field: FieldNameV1 - value: PropertyValue - type: typing.Literal["contains"] = "contains" - - -class CountAggregation(core.ModelBase): - """Computes the total count of objects.""" - - name: typing.Optional[AggregationMetricName] = None - type: typing.Literal["count"] = "count" - - -class CreateInterfaceObjectRule(core.ModelBase): - """CreateInterfaceObjectRule""" - - interface_type_api_name: InterfaceTypeApiName = pydantic.Field(alias=str("interfaceTypeApiName")) # type: ignore[literal-required] - type: typing.Literal["createInterfaceObject"] = "createInterfaceObject" - - -class CreateLinkRule(core.ModelBase): - """CreateLinkRule""" - - link_type_api_name_ato_b: LinkTypeApiName = pydantic.Field(alias=str("linkTypeApiNameAtoB")) # type: ignore[literal-required] - link_type_api_name_bto_a: LinkTypeApiName = pydantic.Field(alias=str("linkTypeApiNameBtoA")) # type: ignore[literal-required] - a_side_object_type_api_name: ObjectTypeApiName = pydantic.Field(alias=str("aSideObjectTypeApiName")) # type: ignore[literal-required] - b_side_object_type_api_name: ObjectTypeApiName = pydantic.Field(alias=str("bSideObjectTypeApiName")) # type: ignore[literal-required] - type: typing.Literal["createLink"] = "createLink" - - -class CreateObjectRule(core.ModelBase): - """CreateObjectRule""" - - object_type_api_name: ObjectTypeApiName = pydantic.Field(alias=str("objectTypeApiName")) # type: ignore[literal-required] - type: typing.Literal["createObject"] = "createObject" - - -DataValue = typing.Any -""" -Represents the value of data in the following format. Note that these values can be nested, for example an array of structs. -| Type | JSON encoding | Example | -|-------------------------------------|-------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Array | array | `["alpha", "bravo", "charlie"]` | -| Attachment | string | `"ri.attachments.main.attachment.2f944bae-5851-4204-8615-920c969a9f2e"` | -| Boolean | boolean | `true` | -| Byte | number | `31` | -| CipherText | string | `"CIPHER::ri.bellaso.main.cipher-channel.e414ab9e-b606-499a-a0e1-844fa296ba7e::unzjs3VifsTxuIpf1fH1CJ7OaPBr2bzMMdozPaZJtCii8vVG60yXIEmzoOJaEl9mfFFe::CIPHER"` | -| Date | ISO 8601 extended local date string | `"2021-05-01"` | -| Decimal | string | `"2.718281828"` | -| Double | number | `3.14159265` | -| EntrySet | array of JSON objects | `[{"key": "EMP1234", "value": "true"}, {"key": "EMP4444", "value": "false"}]` | -| Float | number | `3.14159265` | -| Integer | number | `238940` | -| Long | string | `"58319870951433"` | -| Marking | string | `"MU"` | -| Null | null | `null` | -| Object Set | string OR the object set definition | `ri.object-set.main.versioned-object-set.h13274m8-23f5-431c-8aee-a4554157c57z` | -| Ontology Object Reference | JSON encoding of the object's primary key | `10033123` or `"EMP1234"` | -| Ontology Interface Object Reference | JSON encoding of the object's API name and primary key| `{"objectTypeApiName":"Employee", "primaryKeyValue":"EMP1234"}` | -| Ontology Object Type Reference | string of the object type's api name | `"Employee"` | -| Set | array | `["alpha", "bravo", "charlie"]` | -| Short | number | `8739` | -| String | string | `"Call me Ishmael"` | -| Struct | JSON object | `{"name": "John Doe", "age": 42}` | -| TwoDimensionalAggregation | JSON object | `{"groups": [{"key": "alpha", "value": 100}, {"key": "beta", "value": 101}]}` | -| ThreeDimensionalAggregation | JSON object | `{"groups": [{"key": "NYC", "groups": [{"key": "Engineer", "value" : 100}]}]}` | -| Timestamp | ISO 8601 extended offset date-time string in UTC zone | `"2021-01-04T05:00:00Z"` | -""" - - -class DeleteInterfaceObjectRule(core.ModelBase): - """DeleteInterfaceObjectRule""" - - interface_type_api_name: InterfaceTypeApiName = pydantic.Field(alias=str("interfaceTypeApiName")) # type: ignore[literal-required] - type: typing.Literal["deleteInterfaceObject"] = "deleteInterfaceObject" - - -class DeleteLinkRule(core.ModelBase): - """DeleteLinkRule""" - - link_type_api_name_ato_b: LinkTypeApiName = pydantic.Field(alias=str("linkTypeApiNameAtoB")) # type: ignore[literal-required] - link_type_api_name_bto_a: LinkTypeApiName = pydantic.Field(alias=str("linkTypeApiNameBtoA")) # type: ignore[literal-required] - a_side_object_type_api_name: ObjectTypeApiName = pydantic.Field(alias=str("aSideObjectTypeApiName")) # type: ignore[literal-required] - b_side_object_type_api_name: ObjectTypeApiName = pydantic.Field(alias=str("bSideObjectTypeApiName")) # type: ignore[literal-required] - type: typing.Literal["deleteLink"] = "deleteLink" - - -class DeleteObjectRule(core.ModelBase): - """DeleteObjectRule""" - - object_type_api_name: ObjectTypeApiName = pydantic.Field(alias=str("objectTypeApiName")) # type: ignore[literal-required] - type: typing.Literal["deleteObject"] = "deleteObject" - - -DerivedPropertyApiName = str -"""The name of the derived property that will be returned.""" - - -Duration = str -"""An ISO 8601 formatted duration.""" - - -class EntrySetType(core.ModelBase): - """EntrySetType""" - - key_type: QueryDataType = pydantic.Field(alias=str("keyType")) # type: ignore[literal-required] - value_type: QueryDataType = pydantic.Field(alias=str("valueType")) # type: ignore[literal-required] - type: typing.Literal["entrySet"] = "entrySet" - - -class EqualsQuery(core.ModelBase): - """Returns objects where the specified field is equal to a value.""" - - field: FieldNameV1 - value: PropertyValue - type: typing.Literal["eq"] = "eq" - - -class ExecuteQueryRequest(core.ModelBase): - """ExecuteQueryRequest""" - - parameters: typing.Dict[ParameterId, typing.Optional[DataValue]] - - -class ExecuteQueryResponse(core.ModelBase): - """ExecuteQueryResponse""" - - value: DataValue - - -FieldNameV1 = str -"""A reference to an Ontology object property with the form `properties.{propertyApiName}`.""" - - -FilterValue = str -""" -Represents the value of a property filter. For instance, false is the FilterValue in -`properties.{propertyApiName}.isNull=false`. -""" - - -FunctionRid = core.RID -"""The unique resource identifier of a Function, useful for interacting with other Foundry APIs.""" - - -FunctionVersion = str -""" -The version of the given Function, written `..-`, where `-` is optional. -Examples: `1.2.3`, `1.2.3-rc1`. -""" - - -Fuzzy = bool -"""Setting fuzzy to `true` allows approximate matching in search queries that support it.""" - - -class GroupMemberConstraint(core.ModelBase): - """The parameter value must be the user id of a member belonging to at least one of the groups defined by the constraint.""" - - type: typing.Literal["groupMember"] = "groupMember" - - -class GtQuery(core.ModelBase): - """Returns objects where the specified field is greater than a value.""" - - field: FieldNameV1 - value: PropertyValue - type: typing.Literal["gt"] = "gt" - - -class GteQuery(core.ModelBase): - """Returns objects where the specified field is greater than or equal to a value.""" - - field: FieldNameV1 - value: PropertyValue - type: typing.Literal["gte"] = "gte" - - -InterfaceLinkTypeApiName = str -""" -The name of the interface link type in the API. To find the API name for your Interface Link Type, check the -[Ontology Manager](https://palantir.com/docs/foundry/ontology-manager/overview/). -""" - - -InterfaceLinkTypeRid = core.RID -"""The unique resource identifier of an interface link type, useful for interacting with other Foundry APIs.""" - - -InterfacePropertyApiName = str -""" -The name of the interface property type in the API in lowerCamelCase format. To find the API name for your -interface property type, use the `List interface types` endpoint and check the `allPropertiesV2` field or check -the **Ontology Manager**. -""" - - -InterfaceTypeApiName = str -""" -The name of the interface type in the API in UpperCamelCase format. To find the API name for your interface -type, use the `List interface types` endpoint or check the **Ontology Manager**. -""" - - -InterfaceTypeRid = core.RID -"""The unique resource identifier of an interface, useful for interacting with other Foundry APIs.""" - - -class IsNullQuery(core.ModelBase): - """Returns objects based on the existence of the specified field.""" - - field: FieldNameV1 - value: bool - type: typing.Literal["isNull"] = "isNull" - - -LegacyObjectTypeId = str -""" -The unique ID of an object type. This is a legacy identifier and is not recommended for use in new applications. -To find the ID for your Object Type, check the **Ontology Manager**. -""" - - -LegacyPropertyId = str -""" -The unique ID of a property. This is a legacy identifier and is not recommended for use in new applications. -To find the ID for your property, check the **Ontology Manager**. -""" - - -LinkTypeApiName = str -""" -The name of the link type in the API. To find the API name for your Link Type, check the **Ontology Manager** -application. -""" - - -LinkTypeId = str -"""The unique ID of a link type. To find the ID for your link type, check the **Ontology Manager** application.""" - - -class LinkTypeSide(core.ModelBase): - """LinkTypeSide""" - - api_name: LinkTypeApiName = pydantic.Field(alias=str("apiName")) # type: ignore[literal-required] - display_name: core_models.DisplayName = pydantic.Field(alias=str("displayName")) # type: ignore[literal-required] - status: core_models.ReleaseStatus - object_type_api_name: ObjectTypeApiName = pydantic.Field(alias=str("objectTypeApiName")) # type: ignore[literal-required] - cardinality: LinkTypeSideCardinality - foreign_key_property_api_name: typing.Optional[PropertyApiName] = pydantic.Field(alias=str("foreignKeyPropertyApiName"), default=None) # type: ignore[literal-required] - - -LinkTypeSideCardinality = typing.Literal["ONE", "MANY"] -"""LinkTypeSideCardinality""" - - -class ListActionTypesResponse(core.ModelBase): - """ListActionTypesResponse""" - - next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] - data: typing.List[ActionType] - - -class ListLinkedObjectsResponse(core.ModelBase): - """ListLinkedObjectsResponse""" - - next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] - data: typing.List[OntologyObject] - - -class ListObjectTypesResponse(core.ModelBase): - """ListObjectTypesResponse""" - - next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] - data: typing.List[ObjectType] - """The list of object types in the current page.""" - - -class ListObjectsResponse(core.ModelBase): - """ListObjectsResponse""" - - next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] - data: typing.List[OntologyObject] - """The list of objects in the current page.""" - - total_count: core_models.TotalCount = pydantic.Field(alias=str("totalCount")) # type: ignore[literal-required] - - -class ListOntologiesResponse(core.ModelBase): - """ListOntologiesResponse""" - - data: typing.List[Ontology] - """The list of Ontologies the user has access to.""" - - -class ListOutgoingLinkTypesResponse(core.ModelBase): - """ListOutgoingLinkTypesResponse""" - - next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] - data: typing.List[LinkTypeSide] - """The list of link type sides in the current page.""" - - -class ListQueryTypesResponse(core.ModelBase): - """ListQueryTypesResponse""" - - next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] - data: typing.List[QueryType] - - -LogicRule = typing_extensions.Annotated[ - typing.Union[ - "DeleteInterfaceObjectRule", - "ModifyInterfaceObjectRule", - "ModifyObjectRule", - "DeleteObjectRule", - "CreateInterfaceObjectRule", - "DeleteLinkRule", - "CreateObjectRule", - "CreateLinkRule", - ], - pydantic.Field(discriminator="type"), -] -"""LogicRule""" - - -class LtQuery(core.ModelBase): - """Returns objects where the specified field is less than a value.""" - - field: FieldNameV1 - value: PropertyValue - type: typing.Literal["lt"] = "lt" - - -class LteQuery(core.ModelBase): - """Returns objects where the specified field is less than or equal to a value.""" - - field: FieldNameV1 - value: PropertyValue - type: typing.Literal["lte"] = "lte" - - -class MaxAggregation(core.ModelBase): - """Computes the maximum value for the provided field.""" - - field: FieldNameV1 - name: typing.Optional[AggregationMetricName] = None - type: typing.Literal["max"] = "max" - - -class MinAggregation(core.ModelBase): - """Computes the minimum value for the provided field.""" - - field: FieldNameV1 - name: typing.Optional[AggregationMetricName] = None - type: typing.Literal["min"] = "min" - - -class ModifyInterfaceObjectRule(core.ModelBase): - """ModifyInterfaceObjectRule""" - - interface_type_api_name: InterfaceTypeApiName = pydantic.Field(alias=str("interfaceTypeApiName")) # type: ignore[literal-required] - type: typing.Literal["modifyInterfaceObject"] = "modifyInterfaceObject" - - -class ModifyObjectRule(core.ModelBase): - """ModifyObjectRule""" - - object_type_api_name: ObjectTypeApiName = pydantic.Field(alias=str("objectTypeApiName")) # type: ignore[literal-required] - type: typing.Literal["modifyObject"] = "modifyObject" - - -class NotQuery(core.ModelBase): - """Returns objects where the query is not satisfied.""" - - value: SearchJsonQuery - type: typing.Literal["not"] = "not" - - -class ObjectPropertyValueConstraint(core.ModelBase): - """The parameter value must be a property value of an object found within an object set.""" - - type: typing.Literal["objectPropertyValue"] = "objectPropertyValue" - - -class ObjectQueryResultConstraint(core.ModelBase): - """The parameter value must be the primary key of an object found within an object set.""" - - type: typing.Literal["objectQueryResult"] = "objectQueryResult" - - -ObjectRid = core.RID -"""The unique resource identifier of an object, useful for interacting with other Foundry APIs.""" - - -ObjectSetRid = core.RID -"""ObjectSetRid""" - - -class ObjectType(core.ModelBase): - """Represents an object type in the Ontology.""" - - api_name: ObjectTypeApiName = pydantic.Field(alias=str("apiName")) # type: ignore[literal-required] - legacy_object_type_id: typing.Optional[LegacyObjectTypeId] = pydantic.Field(alias=str("legacyObjectTypeId"), default=None) # type: ignore[literal-required] - display_name: typing.Optional[core_models.DisplayName] = pydantic.Field(alias=str("displayName"), default=None) # type: ignore[literal-required] - status: core_models.ReleaseStatus - description: typing.Optional[str] = None - """The description of the object type.""" - - visibility: typing.Optional[ObjectTypeVisibility] = None - primary_key: typing.List[PropertyApiName] = pydantic.Field(alias=str("primaryKey")) # type: ignore[literal-required] - """The primary key of the object. This is a list of properties that can be used to uniquely identify the object.""" - - properties: typing.Dict[PropertyApiName, Property] - """A map of the properties of the object type.""" - - rid: ObjectTypeRid - - -ObjectTypeApiName = str -""" -The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the -`List object types` endpoint or check the **Ontology Manager**. -""" - - -ObjectTypeRid = core.RID -"""The unique resource identifier of an object type, useful for interacting with other Foundry APIs.""" - - -ObjectTypeVisibility = typing.Literal["NORMAL", "PROMINENT", "HIDDEN"] -"""The suggested visibility of the object type.""" - - -class OneOfConstraint(core.ModelBase): - """The parameter has a manually predefined set of options.""" - - options: typing.List[ParameterOption] - other_values_allowed: bool = pydantic.Field(alias=str("otherValuesAllowed")) # type: ignore[literal-required] - """A flag denoting whether custom, user provided values will be considered valid. This is configured via the **Allowed "Other" value** toggle in the **Ontology Manager**.""" - - type: typing.Literal["oneOf"] = "oneOf" - - -class Ontology(core.ModelBase): - """Metadata about an Ontology.""" - - api_name: OntologyApiName = pydantic.Field(alias=str("apiName")) # type: ignore[literal-required] - display_name: core_models.DisplayName = pydantic.Field(alias=str("displayName")) # type: ignore[literal-required] - description: str - rid: OntologyRid - - -OntologyApiName = str -"""OntologyApiName""" - - -class OntologyArrayType(core.ModelBase): - """OntologyArrayType""" - - item_type: OntologyDataType = pydantic.Field(alias=str("itemType")) # type: ignore[literal-required] - type: typing.Literal["array"] = "array" - - -OntologyDataType = typing_extensions.Annotated[ - typing.Union[ - core_models.DateType, - "OntologyStructType", - "OntologySetType", - core_models.StringType, - core_models.ByteType, - core_models.DoubleType, - core_models.IntegerType, - core_models.FloatType, - core_models.AnyType, - core_models.LongType, - core_models.BooleanType, - core_models.CipherTextType, - core_models.MarkingType, - core_models.UnsupportedType, - "OntologyArrayType", - "OntologyObjectSetType", - core_models.BinaryType, - core_models.ShortType, - core_models.DecimalType, - "OntologyMapType", - core_models.TimestampType, - "OntologyObjectType", - ], - pydantic.Field(discriminator="type"), -] -"""A union of all the primitive types used by Palantir's Ontology-based products.""" - - -class OntologyInterfaceObjectSetType(core.ModelBase): - """OntologyInterfaceObjectSetType""" - - interface_type_api_name: InterfaceTypeApiName = pydantic.Field(alias=str("interfaceTypeApiName")) # type: ignore[literal-required] - type: typing.Literal["interfaceObjectSet"] = "interfaceObjectSet" - - -class OntologyInterfaceObjectType(core.ModelBase): - """OntologyInterfaceObjectType""" - - interface_type_api_name: typing.Optional[InterfaceTypeApiName] = pydantic.Field(alias=str("interfaceTypeApiName"), default=None) # type: ignore[literal-required] - type: typing.Literal["interfaceObject"] = "interfaceObject" - - -class OntologyMapType(core.ModelBase): - """OntologyMapType""" - - key_type: OntologyDataType = pydantic.Field(alias=str("keyType")) # type: ignore[literal-required] - value_type: OntologyDataType = pydantic.Field(alias=str("valueType")) # type: ignore[literal-required] - type: typing.Literal["map"] = "map" - - -class OntologyObject(core.ModelBase): - """Represents an object in the Ontology.""" - - properties: typing.Dict[PropertyApiName, typing.Optional[PropertyValue]] - """A map of the property values of the object.""" - - rid: ObjectRid - - -class OntologyObjectSetType(core.ModelBase): - """OntologyObjectSetType""" - - object_api_name: typing.Optional[ObjectTypeApiName] = pydantic.Field(alias=str("objectApiName"), default=None) # type: ignore[literal-required] - object_type_api_name: typing.Optional[ObjectTypeApiName] = pydantic.Field(alias=str("objectTypeApiName"), default=None) # type: ignore[literal-required] - type: typing.Literal["objectSet"] = "objectSet" - - -class OntologyObjectType(core.ModelBase): - """OntologyObjectType""" - - object_api_name: ObjectTypeApiName = pydantic.Field(alias=str("objectApiName")) # type: ignore[literal-required] - object_type_api_name: ObjectTypeApiName = pydantic.Field(alias=str("objectTypeApiName")) # type: ignore[literal-required] - type: typing.Literal["object"] = "object" - - -OntologyRid = core.RID -""" -The unique Resource Identifier (RID) of the Ontology. To look up your Ontology RID, please use the -`List ontologies` endpoint or check the **Ontology Manager**. -""" - - -class OntologySetType(core.ModelBase): - """OntologySetType""" - - item_type: OntologyDataType = pydantic.Field(alias=str("itemType")) # type: ignore[literal-required] - type: typing.Literal["set"] = "set" - - -class OntologyStructField(core.ModelBase): - """OntologyStructField""" - - name: core_models.StructFieldName - field_type: OntologyDataType = pydantic.Field(alias=str("fieldType")) # type: ignore[literal-required] - required: bool - - -class OntologyStructType(core.ModelBase): - """OntologyStructType""" - - fields: typing.List[OntologyStructField] - type: typing.Literal["struct"] = "struct" - - -class OrQuery(core.ModelBase): - """Returns objects where at least 1 query is satisfied.""" - - value: typing.List[SearchJsonQuery] - type: typing.Literal["or"] = "or" - - -OrderBy = str -""" -A command representing the list of properties to order by. Properties should be delimited by commas and -prefixed by `p` or `properties`. The format expected format is -`orderBy=properties.{property}:{sortDirection},properties.{property}:{sortDirection}...` - -By default, the ordering for a property is ascending, and this can be explicitly specified by appending -`:asc` (for ascending) or `:desc` (for descending). - -Example: use `orderBy=properties.lastName:asc` to order by a single property, -`orderBy=properties.lastName,properties.firstName,properties.age:desc` to order by multiple properties. -You may also use the shorthand `p` instead of `properties` such as `orderBy=p.lastName:asc`. -""" - - -class Parameter(core.ModelBase): - """Details about a parameter of an action or query.""" - - description: typing.Optional[str] = None - base_type: ValueType = pydantic.Field(alias=str("baseType")) # type: ignore[literal-required] - data_type: typing.Optional[OntologyDataType] = pydantic.Field(alias=str("dataType"), default=None) # type: ignore[literal-required] - required: bool - - -ParameterEvaluatedConstraint = typing_extensions.Annotated[ - typing.Union[ - "StructEvaluatedConstraint", - "OneOfConstraint", - "ArrayEvaluatedConstraint", - "GroupMemberConstraint", - "ObjectPropertyValueConstraint", - "RangeConstraint", - "ArraySizeConstraint", - "ObjectQueryResultConstraint", - "StringLengthConstraint", - "StringRegexMatchConstraint", - "UnevaluableConstraint", - ], - pydantic.Field(discriminator="type"), -] -""" -A constraint that an action parameter value must satisfy in order to be considered valid. -Constraints can be configured on action parameters in the **Ontology Manager**. -Applicable constraints are determined dynamically based on parameter inputs. -Parameter values are evaluated against the final set of constraints. - -The type of the constraint. -| Type | Description | -|-----------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| `arraySize` | The parameter expects an array of values and the size of the array must fall within the defined range. | -| `groupMember` | The parameter value must be the user id of a member belonging to at least one of the groups defined by the constraint. | -| `objectPropertyValue` | The parameter value must be a property value of an object found within an object set. | -| `objectQueryResult` | The parameter value must be the primary key of an object found within an object set. | -| `oneOf` | The parameter has a manually predefined set of options. | -| `range` | The parameter value must be within the defined range. | -| `stringLength` | The parameter value must have a length within the defined range. | -| `stringRegexMatch` | The parameter value must match a predefined regular expression. | -| `unevaluable` | The parameter cannot be evaluated because it depends on another parameter or object set that can't be evaluated. This can happen when a parameter's allowed values are defined by another parameter that is missing or invalid. | -""" - - -class ParameterEvaluationResult(core.ModelBase): - """Represents the validity of a parameter against the configured constraints.""" - - result: ValidationResult - evaluated_constraints: typing.List[ParameterEvaluatedConstraint] = pydantic.Field(alias=str("evaluatedConstraints")) # type: ignore[literal-required] - required: bool - """Represents whether the parameter is a required input to the action.""" - - -ParameterId = str -""" -The unique identifier of the parameter. Parameters are used as inputs when an action or query is applied. -Parameters can be viewed and managed in the **Ontology Manager**. -""" - - -class ParameterOption(core.ModelBase): - """A possible value for the parameter. This is defined in the **Ontology Manager** by Actions admins.""" - - display_name: typing.Optional[core_models.DisplayName] = pydantic.Field(alias=str("displayName"), default=None) # type: ignore[literal-required] - value: typing.Optional[typing.Any] = None - """An allowed configured value for a parameter within an action.""" - - -class PhraseQuery(core.ModelBase): - """Returns objects where the specified field contains the provided value as a substring.""" - - field: FieldNameV1 - value: str - type: typing.Literal["phrase"] = "phrase" - - -class PrefixQuery(core.ModelBase): - """Returns objects where the specified field starts with the provided value.""" - - field: FieldNameV1 - value: str - type: typing.Literal["prefix"] = "prefix" - - -PrimaryKeyValue = typing.Any -"""Represents the primary key value that is used as a unique identifier for an object.""" - - -class Property(core.ModelBase): - """Details about some property of an object.""" - - description: typing.Optional[str] = None - display_name: typing.Optional[core_models.DisplayName] = pydantic.Field(alias=str("displayName"), default=None) # type: ignore[literal-required] - base_type: ValueType = pydantic.Field(alias=str("baseType")) # type: ignore[literal-required] - legacy_property_id: typing.Optional[LegacyPropertyId] = pydantic.Field(alias=str("legacyPropertyId"), default=None) # type: ignore[literal-required] - - -PropertyApiName = str -""" -The name of the property in the API. To find the API name for your property, use the `Get object type` -endpoint or check the **Ontology Manager**. -""" - - -PropertyFilter = str -""" -Represents a filter used on properties. - -Endpoints that accept this supports optional parameters that have the form: -`properties.{propertyApiName}.{propertyFilter}={propertyValueEscapedString}` to filter the returned objects. -For instance, you may use `properties.firstName.eq=John` to find objects that contain a property called -"firstName" that has the exact value of "John". - -The following are a list of supported property filters: - -- `properties.{propertyApiName}.contains` - supported on arrays and can be used to filter array properties - that have at least one of the provided values. If multiple query parameters are provided, then objects - that have any of the given values for the specified property will be matched. -- `properties.{propertyApiName}.eq` - used to filter objects that have the exact value for the provided - property. If multiple query parameters are provided, then objects that have any of the given values - will be matched. For instance, if the user provides a request by doing - `?properties.firstName.eq=John&properties.firstName.eq=Anna`, then objects that have a firstName property - of either John or Anna will be matched. This filter is supported on all property types except Arrays. -- `properties.{propertyApiName}.neq` - used to filter objects that do not have the provided property values. - Similar to the `eq` filter, if multiple values are provided, then objects that have any of the given values - will be excluded from the result. -- `properties.{propertyApiName}.lt`, `properties.{propertyApiName}.lte`, `properties.{propertyApiName}.gt` - `properties.{propertyApiName}.gte` - represent less than, less than or equal to, greater than, and greater - than or equal to respectively. These are supported on date, timestamp, byte, integer, long, double, decimal. -- `properties.{propertyApiName}.isNull` - used to filter objects where the provided property is (or is not) null. - This filter is supported on all property types. -""" - - -PropertyId = str -""" -The immutable ID of a property. Property IDs are only used to identify properties in the **Ontology Manager** -application and assign them API names. In every other case, API names should be used instead of property IDs. -""" - - -PropertyTypeRid = core.RID -"""PropertyTypeRid""" - - -PropertyValue = typing.Any -""" -Represents the value of a property in the following format. - -| Type | JSON encoding | Example | -|---------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------|----------------------------------------------------------------------------------------------------| -| Array | array | `["alpha", "bravo", "charlie"]` | -| [Attachment](https://palantir.com/docs/foundry/api/v2/ontologies-v2-resources/attachment-properties/attachment-property-basics/) | JSON encoded `AttachmentProperty` object | `{"rid":"ri.blobster.main.attachment.2f944bae-5851-4204-8615-920c969a9f2e"}` | -| Boolean | boolean | `true` | -| Byte | number | `31` | -| CipherText | string | `"CIPHER::ri.bellaso.main.cipher-channel.e414ab9e-b606-499a-a0e1-844fa296ba7e::unzjs3VifsTxuIpf1fH1CJ7OaPBr2bzMMdozPaZJtCii8vVG60yXIEmzoOJaEl9mfFFe::CIPHER"` | -| Date | ISO 8601 extended local date string | `"2021-05-01"` | -| Decimal | string | `"2.718281828"` | -| Double | number | `3.14159265` | -| Float | number | `3.14159265` | -| GeoPoint | geojson | `{"type":"Point","coordinates":[102.0,0.5]}` | -| GeoShape | geojson | `{"type":"LineString","coordinates":[[102.0,0.0],[103.0,1.0],[104.0,0.0],[105.0,1.0]]}` | -| Integer | number | `238940` | -| Long | string | `"58319870951433"` | -| [MediaReference](https://palantir.com/docs/foundry/api/v2/ontologies-v2-resources/media-reference-properties/media-reference-property-basics/)| JSON encoded `MediaReference` object | `{"mimeType":"application/pdf","reference":{"type":"mediaSetViewItem","mediaSetViewItem":{"mediaSetRid":"ri.mio.main.media-set.4153d42f-ca4b-4e42-8ca5-8e6aa7edb642","mediaSetViewRid":"ri.mio.main.view.82a798ad-d637-4595-acc6-987bcf16629b","mediaItemRid":"ri.mio.main.media-item.001ec98b-1620-4814-9e17-8e9c4e536225"}}}` | -| Short | number | `8739` | -| String | string | `"Call me Ishmael"` | -| Struct | JSON object of struct field API name -> value | {"firstName": "Alex", "lastName": "Karp"} | -| Timestamp | ISO 8601 extended offset date-time string in UTC zone | `"2021-01-04T05:00:00Z"` | -| [Timeseries](https://palantir.com/docs/foundry/api/v2/ontologies-v2-resources/time-series-properties/time-series-property-basics/) | JSON encoded `TimeseriesProperty` object or seriesId string | `{"seriesId": "wellPressureSeriesId", "syncRid": ri.time-series-catalog.main.sync.04f5ac1f-91bf-44f9-a51f-4f34e06e42df"}` or `{"templateRid": "ri.codex-emu.main.template.367cac64-e53b-4653-b111-f61856a63df9", "templateVersion": "0.0.0"}` or `"wellPressureSeriesId"`| | -| Vector | array | `[0.1, 0.3, 0.02, 0.05 , 0.8, 0.4]` | - -Note that for backwards compatibility, the Boolean, Byte, Double, Float, Integer, and Short types can also be encoded as JSON strings. -""" - - -PropertyValueEscapedString = str -"""Represents the value of a property in string format. This is used in URL parameters.""" - - -QueryAggregationKeyType = typing_extensions.Annotated[ - typing.Union[ - core_models.DateType, - core_models.BooleanType, - core_models.StringType, - core_models.DoubleType, - "QueryAggregationRangeType", - core_models.IntegerType, - core_models.TimestampType, - ], - pydantic.Field(discriminator="type"), -] -"""A union of all the types supported by query aggregation keys.""" - - -QueryAggregationRangeSubType = typing_extensions.Annotated[ - typing.Union[ - core_models.DateType, - core_models.DoubleType, - core_models.IntegerType, - core_models.TimestampType, - ], - pydantic.Field(discriminator="type"), -] -"""A union of all the types supported by query aggregation ranges.""" - - -class QueryAggregationRangeType(core.ModelBase): - """QueryAggregationRangeType""" - - sub_type: QueryAggregationRangeSubType = pydantic.Field(alias=str("subType")) # type: ignore[literal-required] - type: typing.Literal["range"] = "range" - - -QueryAggregationValueType = typing_extensions.Annotated[ - typing.Union[core_models.DateType, core_models.DoubleType, core_models.TimestampType], - pydantic.Field(discriminator="type"), -] -"""A union of all the types supported by query aggregation keys.""" - - -QueryApiName = str -"""The name of the Query in the API.""" - - -class QueryArrayType(core.ModelBase): - """QueryArrayType""" - - sub_type: QueryDataType = pydantic.Field(alias=str("subType")) # type: ignore[literal-required] - type: typing.Literal["array"] = "array" - - -QueryDataType = typing_extensions.Annotated[ - typing.Union[ - core_models.DateType, - "OntologyInterfaceObjectType", - "QueryStructType", - "QuerySetType", - core_models.StringType, - "EntrySetType", - core_models.DoubleType, - core_models.IntegerType, - "ThreeDimensionalAggregation", - "QueryUnionType", - core_models.FloatType, - core_models.LongType, - core_models.BooleanType, - core_models.UnsupportedType, - core_models.AttachmentType, - core_models.NullType, - "QueryArrayType", - "OntologyObjectSetType", - "TwoDimensionalAggregation", - "OntologyInterfaceObjectSetType", - "OntologyObjectType", - core_models.TimestampType, - ], - pydantic.Field(discriminator="type"), -] -"""A union of all the types supported by Ontology Query parameters or outputs.""" - - -QueryRuntimeErrorParameter = str -"""QueryRuntimeErrorParameter""" - - -class QuerySetType(core.ModelBase): - """QuerySetType""" - - sub_type: QueryDataType = pydantic.Field(alias=str("subType")) # type: ignore[literal-required] - type: typing.Literal["set"] = "set" - - -class QueryStructField(core.ModelBase): - """QueryStructField""" - - name: core_models.StructFieldName - field_type: QueryDataType = pydantic.Field(alias=str("fieldType")) # type: ignore[literal-required] - - -class QueryStructType(core.ModelBase): - """QueryStructType""" - - fields: typing.List[QueryStructField] - type: typing.Literal["struct"] = "struct" - - -class QueryType(core.ModelBase): - """Represents a query type in the Ontology.""" - - api_name: QueryApiName = pydantic.Field(alias=str("apiName")) # type: ignore[literal-required] - description: typing.Optional[str] = None - display_name: typing.Optional[core_models.DisplayName] = pydantic.Field(alias=str("displayName"), default=None) # type: ignore[literal-required] - parameters: typing.Dict[ParameterId, Parameter] - output: typing.Optional[OntologyDataType] = None - rid: FunctionRid - version: FunctionVersion - - -class QueryUnionType(core.ModelBase): - """QueryUnionType""" - - union_types: typing.List[QueryDataType] = pydantic.Field(alias=str("unionTypes")) # type: ignore[literal-required] - type: typing.Literal["union"] = "union" - - -class RangeConstraint(core.ModelBase): - """The parameter value must be within the defined range.""" - - lt: typing.Optional[typing.Any] = None - """Less than""" - - lte: typing.Optional[typing.Any] = None - """Less than or equal""" - - gt: typing.Optional[typing.Any] = None - """Greater than""" - - gte: typing.Optional[typing.Any] = None - """Greater than or equal""" - - type: typing.Literal["range"] = "range" - - -ReturnEditsMode = typing.Literal["ALL", "ALL_V2_WITH_DELETIONS", "NONE"] -"""ReturnEditsMode""" - - -SdkPackageName = str -"""SdkPackageName""" - - -SdkPackageRid = core.RID -"""SdkPackageRid""" - - -SdkVersion = str -"""SdkVersion""" - - -SearchJsonQuery = typing_extensions.Annotated[ - typing.Union[ - "OrQuery", - "PrefixQuery", - "LtQuery", - "AllTermsQuery", - "EqualsQuery", - "GtQuery", - "ContainsQuery", - "NotQuery", - "PhraseQuery", - "AndQuery", - "IsNullQuery", - "GteQuery", - "AnyTermQuery", - "LteQuery", - ], - pydantic.Field(discriminator="type"), -] -"""SearchJsonQuery""" - - -class SearchObjectsRequest(core.ModelBase): - """SearchObjectsRequest""" - - query: SearchJsonQuery - order_by: typing.Optional[SearchOrderBy] = pydantic.Field(alias=str("orderBy"), default=None) # type: ignore[literal-required] - page_size: typing.Optional[core_models.PageSize] = pydantic.Field(alias=str("pageSize"), default=None) # type: ignore[literal-required] - page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("pageToken"), default=None) # type: ignore[literal-required] - fields: typing.List[PropertyApiName] - """The API names of the object type properties to include in the response.""" - - -class SearchObjectsResponse(core.ModelBase): - """SearchObjectsResponse""" - - data: typing.List[OntologyObject] - next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] - total_count: core_models.TotalCount = pydantic.Field(alias=str("totalCount")) # type: ignore[literal-required] - - -class SearchOrderBy(core.ModelBase): - """Specifies the ordering of search results by a field and an ordering direction.""" - - fields: typing.List[SearchOrdering] - - -SearchOrderByType = typing.Literal["fields", "relevance"] -"""SearchOrderByType""" - - -class SearchOrdering(core.ModelBase): - """SearchOrdering""" - - field: FieldNameV1 - direction: typing.Optional[str] = None - """Specifies the ordering direction (can be either `asc` or `desc`)""" - - -SelectedPropertyApiName = str -""" -By default, whenever an object is requested, all of its properties are returned, except for properties of the -following types: -- Vector - -The response can be filtered to only include certain properties using the `properties` query parameter. Note -that ontology object set endpoints refer to this parameter as `select`. - -Properties to include can be specified in one of two ways. - -- A comma delimited list as the value for the `properties` query parameter - `properties={property1ApiName},{property2ApiName}` -- Multiple `properties` query parameters. - `properties={property1ApiName}&properties={property2ApiName}` - -The primary key of the object will always be returned even if it wasn't specified in the `properties` values. - -Unknown properties specified in the `properties` list will result in a `PropertiesNotFound` error. - -To find the API name for your property, use the `Get object type` endpoint or check the **Ontology Manager**. -""" - - -SharedPropertyTypeApiName = str -""" -The name of the shared property type in the API in lowerCamelCase format. To find the API name for your -shared property type, use the `List shared property types` endpoint or check the **Ontology Manager**. -""" - - -SharedPropertyTypeRid = core.RID -"""The unique resource identifier of an shared property type, useful for interacting with other Foundry APIs.""" - - -class StringLengthConstraint(core.ModelBase): - """ - The parameter value must have a length within the defined range. - *This range is always inclusive.* - """ - - lt: typing.Optional[typing.Any] = None - """Less than""" - - lte: typing.Optional[typing.Any] = None - """Less than or equal""" - - gt: typing.Optional[typing.Any] = None - """Greater than""" - - gte: typing.Optional[typing.Any] = None - """Greater than or equal""" - - type: typing.Literal["stringLength"] = "stringLength" - - -class StringRegexMatchConstraint(core.ModelBase): - """The parameter value must match a predefined regular expression.""" - - regex: str - """The regular expression configured in the **Ontology Manager**.""" - - configured_failure_message: typing.Optional[str] = pydantic.Field(alias=str("configuredFailureMessage"), default=None) # type: ignore[literal-required] - """ - The message indicating that the regular expression was not matched. - This is configured per parameter in the **Ontology Manager**. - """ - - type: typing.Literal["stringRegexMatch"] = "stringRegexMatch" - - -class StructEvaluatedConstraint(core.ModelBase): - """Represents the validity of a singleton struct parameter.""" - - struct_fields: typing.Dict[StructParameterFieldApiName, StructFieldEvaluationResult] = pydantic.Field(alias=str("structFields")) # type: ignore[literal-required] - type: typing.Literal["struct"] = "struct" - - -StructFieldEvaluatedConstraint = typing_extensions.Annotated[ - typing.Union[ - "OneOfConstraint", - "RangeConstraint", - "ObjectQueryResultConstraint", - "StringLengthConstraint", - "StringRegexMatchConstraint", - ], - pydantic.Field(discriminator="type"), -] -""" -A constraint that an action struct parameter field value must satisfy in order to be considered valid. -Constraints can be configured on fields of struct parameters in the **Ontology Manager**. -Applicable constraints are determined dynamically based on parameter inputs. -Parameter values are evaluated against the final set of constraints. - -The type of the constraint. -| Type | Description | -|-----------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| `oneOf` | The struct parameter field has a manually predefined set of options. | -| `range` | The struct parameter field value must be within the defined range. | -| `stringLength` | The struct parameter field value must have a length within the defined range. | -| `stringRegexMatch` | The struct parameter field value must match a predefined regular expression. | -| `objectQueryResult` | The struct parameter field value must be the primary key of an object found within an object set. | -""" - - -class StructFieldEvaluationResult(core.ModelBase): - """Represents the validity of a struct parameter's fields against the configured constraints.""" - - result: ValidationResult - evaluated_constraints: typing.List[StructFieldEvaluatedConstraint] = pydantic.Field(alias=str("evaluatedConstraints")) # type: ignore[literal-required] - required: bool - """Represents whether the parameter is a required input to the action.""" - - -StructParameterFieldApiName = str -"""The unique identifier of the struct parameter field.""" - - -class SubmissionCriteriaEvaluation(core.ModelBase): - """ - Contains the status of the **submission criteria**. - **Submission criteria** are the prerequisites that need to be satisfied before an Action can be applied. - These are configured in the **Ontology Manager**. - """ - - configured_failure_message: typing.Optional[str] = pydantic.Field(alias=str("configuredFailureMessage"), default=None) # type: ignore[literal-required] - """ - The message indicating one of the **submission criteria** was not satisfied. - This is configured per **submission criteria** in the **Ontology Manager**. - """ - - result: ValidationResult - - -class SumAggregation(core.ModelBase): - """Computes the sum of values for the provided field.""" - - field: FieldNameV1 - name: typing.Optional[AggregationMetricName] = None - type: typing.Literal["sum"] = "sum" - - -class ThreeDimensionalAggregation(core.ModelBase): - """ThreeDimensionalAggregation""" - - key_type: QueryAggregationKeyType = pydantic.Field(alias=str("keyType")) # type: ignore[literal-required] - value_type: TwoDimensionalAggregation = pydantic.Field(alias=str("valueType")) # type: ignore[literal-required] - type: typing.Literal["threeDimensionalAggregation"] = "threeDimensionalAggregation" - - -class TwoDimensionalAggregation(core.ModelBase): - """TwoDimensionalAggregation""" - - key_type: QueryAggregationKeyType = pydantic.Field(alias=str("keyType")) # type: ignore[literal-required] - value_type: QueryAggregationValueType = pydantic.Field(alias=str("valueType")) # type: ignore[literal-required] - type: typing.Literal["twoDimensionalAggregation"] = "twoDimensionalAggregation" - - -class UnevaluableConstraint(core.ModelBase): - """ - The parameter cannot be evaluated because it depends on another parameter or object set that can't be evaluated. - This can happen when a parameter's allowed values are defined by another parameter that is missing or invalid. - """ - - type: typing.Literal["unevaluable"] = "unevaluable" - - -UniqueIdentifierLinkId = core.UUID -"""A reference to a UniqueIdentifierArgument linkId defined for this action type.""" - - -class ValidateActionRequest(core.ModelBase): - """ValidateActionRequest""" - - parameters: typing.Dict[ParameterId, typing.Optional[DataValue]] - - -class ValidateActionResponse(core.ModelBase): - """ValidateActionResponse""" - - result: ValidationResult - submission_criteria: typing.List[SubmissionCriteriaEvaluation] = pydantic.Field(alias=str("submissionCriteria")) # type: ignore[literal-required] - parameters: typing.Dict[ParameterId, ParameterEvaluationResult] - - -ValidationResult = typing.Literal["VALID", "INVALID"] -"""Represents the state of a validation.""" - - -ValueType = str -""" -A string indicating the type of each data value. Note that these types can be nested, for example an array of -structs. - -| Type | JSON value | -|---------------------|-------------------------------------------------------------------------------------------------------------------| -| Array | `Array`, where `T` is the type of the array elements, e.g. `Array`. | -| Attachment | `Attachment` | -| Boolean | `Boolean` | -| Byte | `Byte` | -| CipherText | `CipherText` | -| Date | `LocalDate` | -| Decimal | `Decimal` | -| Double | `Double` | -| Float | `Float` | -| Integer | `Integer` | -| Long | `Long` | -| Marking | `Marking` | -| OntologyObject | `OntologyObject` where `T` is the API name of the referenced object type. | -| Short | `Short` | -| String | `String` | -| Struct | `Struct` where `T` contains field name and type pairs, e.g. `Struct<{ firstName: String, lastName: string }>` | -| Timeseries | `TimeSeries` where `T` is either `String` for an enum series or `Double` for a numeric series. | -| Timestamp | `Timestamp` | -""" - - -ValueTypeApiName = str -"""The name of the value type in the API in camelCase format.""" - - -ValueTypeRid = core.RID -"""ValueTypeRid""" - - -ArrayEntryEvaluatedConstraint = StructEvaluatedConstraint -"""Evaluated constraints for entries of array parameters for which per-entry evaluation is supported.""" - - -core.resolve_forward_references(Aggregation, globalns=globals(), localns=locals()) -core.resolve_forward_references(AggregationGroupBy, globalns=globals(), localns=locals()) -core.resolve_forward_references(LogicRule, globalns=globals(), localns=locals()) -core.resolve_forward_references(OntologyDataType, globalns=globals(), localns=locals()) -core.resolve_forward_references(ParameterEvaluatedConstraint, globalns=globals(), localns=locals()) -core.resolve_forward_references(QueryAggregationKeyType, globalns=globals(), localns=locals()) -core.resolve_forward_references(QueryAggregationRangeSubType, globalns=globals(), localns=locals()) -core.resolve_forward_references(QueryAggregationValueType, globalns=globals(), localns=locals()) -core.resolve_forward_references(QueryDataType, globalns=globals(), localns=locals()) -core.resolve_forward_references(SearchJsonQuery, globalns=globals(), localns=locals()) -core.resolve_forward_references( - StructFieldEvaluatedConstraint, globalns=globals(), localns=locals() -) - -__all__ = [ - "ActionRid", - "ActionType", - "ActionTypeApiName", - "ActionTypeRid", - "AggregateObjectsRequest", - "AggregateObjectsResponse", - "AggregateObjectsResponseItem", - "Aggregation", - "AggregationDurationGrouping", - "AggregationExactGrouping", - "AggregationFixedWidthGrouping", - "AggregationGroupBy", - "AggregationGroupKey", - "AggregationGroupValue", - "AggregationMetricName", - "AggregationMetricResult", - "AggregationRange", - "AggregationRangesGrouping", - "AllTermsQuery", - "AndQuery", - "AnyTermQuery", - "ApplyActionMode", - "ApplyActionRequest", - "ApplyActionRequestOptions", - "ApplyActionResponse", - "ApproximateDistinctAggregation", - "ArrayEntryEvaluatedConstraint", - "ArrayEvaluatedConstraint", - "ArraySizeConstraint", - "ArtifactRepositoryRid", - "Attachment", - "AttachmentRid", - "AvgAggregation", - "BatchApplyActionRequest", - "BatchApplyActionResponse", - "ContainsQuery", - "CountAggregation", - "CreateInterfaceObjectRule", - "CreateLinkRule", - "CreateObjectRule", - "DataValue", - "DeleteInterfaceObjectRule", - "DeleteLinkRule", - "DeleteObjectRule", - "DerivedPropertyApiName", - "Duration", - "EntrySetType", - "EqualsQuery", - "ExecuteQueryRequest", - "ExecuteQueryResponse", - "FieldNameV1", - "FilterValue", - "FunctionRid", - "FunctionVersion", - "Fuzzy", - "GroupMemberConstraint", - "GtQuery", - "GteQuery", - "InterfaceLinkTypeApiName", - "InterfaceLinkTypeRid", - "InterfacePropertyApiName", - "InterfaceTypeApiName", - "InterfaceTypeRid", - "IsNullQuery", - "LegacyObjectTypeId", - "LegacyPropertyId", - "LinkTypeApiName", - "LinkTypeId", - "LinkTypeSide", - "LinkTypeSideCardinality", - "ListActionTypesResponse", - "ListLinkedObjectsResponse", - "ListObjectTypesResponse", - "ListObjectsResponse", - "ListOntologiesResponse", - "ListOutgoingLinkTypesResponse", - "ListQueryTypesResponse", - "LogicRule", - "LtQuery", - "LteQuery", - "MaxAggregation", - "MinAggregation", - "ModifyInterfaceObjectRule", - "ModifyObjectRule", - "NotQuery", - "ObjectPropertyValueConstraint", - "ObjectQueryResultConstraint", - "ObjectRid", - "ObjectSetRid", - "ObjectType", - "ObjectTypeApiName", - "ObjectTypeRid", - "ObjectTypeVisibility", - "OneOfConstraint", - "Ontology", - "OntologyApiName", - "OntologyArrayType", - "OntologyDataType", - "OntologyInterfaceObjectSetType", - "OntologyInterfaceObjectType", - "OntologyMapType", - "OntologyObject", - "OntologyObjectSetType", - "OntologyObjectType", - "OntologyRid", - "OntologySetType", - "OntologyStructField", - "OntologyStructType", - "OrQuery", - "OrderBy", - "Parameter", - "ParameterEvaluatedConstraint", - "ParameterEvaluationResult", - "ParameterId", - "ParameterOption", - "PhraseQuery", - "PrefixQuery", - "PrimaryKeyValue", - "Property", - "PropertyApiName", - "PropertyFilter", - "PropertyId", - "PropertyTypeRid", - "PropertyValue", - "PropertyValueEscapedString", - "QueryAggregationKeyType", - "QueryAggregationRangeSubType", - "QueryAggregationRangeType", - "QueryAggregationValueType", - "QueryApiName", - "QueryArrayType", - "QueryDataType", - "QueryRuntimeErrorParameter", - "QuerySetType", - "QueryStructField", - "QueryStructType", - "QueryType", - "QueryUnionType", - "RangeConstraint", - "ReturnEditsMode", - "SdkPackageName", - "SdkPackageRid", - "SdkVersion", - "SearchJsonQuery", - "SearchObjectsRequest", - "SearchObjectsResponse", - "SearchOrderBy", - "SearchOrderByType", - "SearchOrdering", - "SelectedPropertyApiName", - "SharedPropertyTypeApiName", - "SharedPropertyTypeRid", - "StringLengthConstraint", - "StringRegexMatchConstraint", - "StructEvaluatedConstraint", - "StructFieldEvaluatedConstraint", - "StructFieldEvaluationResult", - "StructParameterFieldApiName", - "SubmissionCriteriaEvaluation", - "SumAggregation", - "ThreeDimensionalAggregation", - "TwoDimensionalAggregation", - "UnevaluableConstraint", - "UniqueIdentifierLinkId", - "ValidateActionRequest", - "ValidateActionResponse", - "ValidationResult", - "ValueType", - "ValueTypeApiName", - "ValueTypeRid", -] diff --git a/foundry_sdk/v1/ontologies/object_type.py b/foundry_sdk/v1/ontologies/object_type.py deleted file mode 100644 index f87b32942..000000000 --- a/foundry_sdk/v1/ontologies/object_type.py +++ /dev/null @@ -1,536 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing - -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v1.core import models as core_models -from foundry_sdk.v1.ontologies import models as ontologies_models - - -class ObjectTypeClient: - """ - The API client for the ObjectType Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _ObjectTypeClientStreaming(self) - self.with_raw_response = _ObjectTypeClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - ontology_rid: ontologies_models.OntologyRid, - object_type: ontologies_models.ObjectTypeApiName, - *, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> ontologies_models.ObjectType: - """ - Gets a specific object type with the given API name. - - :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the object type. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. - :type ontology_rid: OntologyRid - :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. - :type object_type: ObjectTypeApiName - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: ontologies_models.ObjectType - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v1/ontologies/{ontologyRid}/objectTypes/{objectType}", - query_params={}, - path_params={ - "ontologyRid": ontology_rid, - "objectType": object_type, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.ObjectType, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get_outgoing_link_type( - self, - ontology_rid: ontologies_models.OntologyRid, - object_type: ontologies_models.ObjectTypeApiName, - link_type: ontologies_models.LinkTypeApiName, - *, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> ontologies_models.LinkTypeSide: - """ - Get an outgoing link for an object type. - - :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the object type. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager** application. - :type ontology_rid: OntologyRid - :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager** application. - :type object_type: ObjectTypeApiName - :param link_type: The API name of the outgoing link. To find the API name for your link type, check the **Ontology Manager**. - :type link_type: LinkTypeApiName - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: ontologies_models.LinkTypeSide - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v1/ontologies/{ontologyRid}/objectTypes/{objectType}/outgoingLinkTypes/{linkType}", - query_params={}, - path_params={ - "ontologyRid": ontology_rid, - "objectType": object_type, - "linkType": link_type, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.LinkTypeSide, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def list( - self, - ontology_rid: ontologies_models.OntologyRid, - *, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.ResourceIterator[ontologies_models.ObjectType]: - """ - Lists the object types for the given Ontology. - - Each page may be smaller or larger than the requested page size. However, it is guaranteed that if there are - more results available, at least one result will be present in the - response. - - :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the object types. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. - :type ontology_rid: OntologyRid - :param page_size: The desired size of the page to be returned. Defaults to 500. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. - :type page_size: Optional[PageSize] - :param page_token: - :type page_token: Optional[PageToken] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.ResourceIterator[ontologies_models.ObjectType] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v1/ontologies/{ontologyRid}/objectTypes", - query_params={ - "pageSize": page_size, - "pageToken": page_token, - }, - path_params={ - "ontologyRid": ontology_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.ListObjectTypesResponse, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def list_outgoing_link_types( - self, - ontology_rid: ontologies_models.OntologyRid, - object_type: ontologies_models.ObjectTypeApiName, - *, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.ResourceIterator[ontologies_models.LinkTypeSide]: - """ - List the outgoing links for an object type. - - :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the object type. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager** application. - :type ontology_rid: OntologyRid - :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager** application. - :type object_type: ObjectTypeApiName - :param page_size: The desired size of the page to be returned. - :type page_size: Optional[PageSize] - :param page_token: - :type page_token: Optional[PageToken] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.ResourceIterator[ontologies_models.LinkTypeSide] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v1/ontologies/{ontologyRid}/objectTypes/{objectType}/outgoingLinkTypes", - query_params={ - "pageSize": page_size, - "pageToken": page_token, - }, - path_params={ - "ontologyRid": ontology_rid, - "objectType": object_type, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.ListOutgoingLinkTypesResponse, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - -class _ObjectTypeClientRaw: - def __init__(self, client: ObjectTypeClient) -> None: - def get(_: ontologies_models.ObjectType): ... - def get_outgoing_link_type(_: ontologies_models.LinkTypeSide): ... - def list(_: ontologies_models.ListObjectTypesResponse): ... - def list_outgoing_link_types(_: ontologies_models.ListOutgoingLinkTypesResponse): ... - - self.get = core.with_raw_response(get, client.get) - self.get_outgoing_link_type = core.with_raw_response( - get_outgoing_link_type, client.get_outgoing_link_type - ) - self.list = core.with_raw_response(list, client.list) - self.list_outgoing_link_types = core.with_raw_response( - list_outgoing_link_types, client.list_outgoing_link_types - ) - - -class _ObjectTypeClientStreaming: - def __init__(self, client: ObjectTypeClient) -> None: - def get(_: ontologies_models.ObjectType): ... - def get_outgoing_link_type(_: ontologies_models.LinkTypeSide): ... - def list(_: ontologies_models.ListObjectTypesResponse): ... - def list_outgoing_link_types(_: ontologies_models.ListOutgoingLinkTypesResponse): ... - - self.get = core.with_streaming_response(get, client.get) - self.get_outgoing_link_type = core.with_streaming_response( - get_outgoing_link_type, client.get_outgoing_link_type - ) - self.list = core.with_streaming_response(list, client.list) - self.list_outgoing_link_types = core.with_streaming_response( - list_outgoing_link_types, client.list_outgoing_link_types - ) - - -class AsyncObjectTypeClient: - """ - The API client for the ObjectType Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AsyncObjectTypeClientStreaming(self) - self.with_raw_response = _AsyncObjectTypeClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - ontology_rid: ontologies_models.OntologyRid, - object_type: ontologies_models.ObjectTypeApiName, - *, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[ontologies_models.ObjectType]: - """ - Gets a specific object type with the given API name. - - :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the object type. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. - :type ontology_rid: OntologyRid - :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. - :type object_type: ObjectTypeApiName - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[ontologies_models.ObjectType] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v1/ontologies/{ontologyRid}/objectTypes/{objectType}", - query_params={}, - path_params={ - "ontologyRid": ontology_rid, - "objectType": object_type, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.ObjectType, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get_outgoing_link_type( - self, - ontology_rid: ontologies_models.OntologyRid, - object_type: ontologies_models.ObjectTypeApiName, - link_type: ontologies_models.LinkTypeApiName, - *, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[ontologies_models.LinkTypeSide]: - """ - Get an outgoing link for an object type. - - :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the object type. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager** application. - :type ontology_rid: OntologyRid - :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager** application. - :type object_type: ObjectTypeApiName - :param link_type: The API name of the outgoing link. To find the API name for your link type, check the **Ontology Manager**. - :type link_type: LinkTypeApiName - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[ontologies_models.LinkTypeSide] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v1/ontologies/{ontologyRid}/objectTypes/{objectType}/outgoingLinkTypes/{linkType}", - query_params={}, - path_params={ - "ontologyRid": ontology_rid, - "objectType": object_type, - "linkType": link_type, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.LinkTypeSide, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def list( - self, - ontology_rid: ontologies_models.OntologyRid, - *, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.AsyncResourceIterator[ontologies_models.ObjectType]: - """ - Lists the object types for the given Ontology. - - Each page may be smaller or larger than the requested page size. However, it is guaranteed that if there are - more results available, at least one result will be present in the - response. - - :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the object types. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. - :type ontology_rid: OntologyRid - :param page_size: The desired size of the page to be returned. Defaults to 500. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. - :type page_size: Optional[PageSize] - :param page_token: - :type page_token: Optional[PageToken] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.AsyncResourceIterator[ontologies_models.ObjectType] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v1/ontologies/{ontologyRid}/objectTypes", - query_params={ - "pageSize": page_size, - "pageToken": page_token, - }, - path_params={ - "ontologyRid": ontology_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.ListObjectTypesResponse, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def list_outgoing_link_types( - self, - ontology_rid: ontologies_models.OntologyRid, - object_type: ontologies_models.ObjectTypeApiName, - *, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.AsyncResourceIterator[ontologies_models.LinkTypeSide]: - """ - List the outgoing links for an object type. - - :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the object type. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager** application. - :type ontology_rid: OntologyRid - :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager** application. - :type object_type: ObjectTypeApiName - :param page_size: The desired size of the page to be returned. - :type page_size: Optional[PageSize] - :param page_token: - :type page_token: Optional[PageToken] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.AsyncResourceIterator[ontologies_models.LinkTypeSide] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v1/ontologies/{ontologyRid}/objectTypes/{objectType}/outgoingLinkTypes", - query_params={ - "pageSize": page_size, - "pageToken": page_token, - }, - path_params={ - "ontologyRid": ontology_rid, - "objectType": object_type, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.ListOutgoingLinkTypesResponse, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - -class _AsyncObjectTypeClientRaw: - def __init__(self, client: AsyncObjectTypeClient) -> None: - def get(_: ontologies_models.ObjectType): ... - def get_outgoing_link_type(_: ontologies_models.LinkTypeSide): ... - def list(_: ontologies_models.ListObjectTypesResponse): ... - def list_outgoing_link_types(_: ontologies_models.ListOutgoingLinkTypesResponse): ... - - self.get = core.async_with_raw_response(get, client.get) - self.get_outgoing_link_type = core.async_with_raw_response( - get_outgoing_link_type, client.get_outgoing_link_type - ) - self.list = core.async_with_raw_response(list, client.list) - self.list_outgoing_link_types = core.async_with_raw_response( - list_outgoing_link_types, client.list_outgoing_link_types - ) - - -class _AsyncObjectTypeClientStreaming: - def __init__(self, client: AsyncObjectTypeClient) -> None: - def get(_: ontologies_models.ObjectType): ... - def get_outgoing_link_type(_: ontologies_models.LinkTypeSide): ... - def list(_: ontologies_models.ListObjectTypesResponse): ... - def list_outgoing_link_types(_: ontologies_models.ListOutgoingLinkTypesResponse): ... - - self.get = core.async_with_streaming_response(get, client.get) - self.get_outgoing_link_type = core.async_with_streaming_response( - get_outgoing_link_type, client.get_outgoing_link_type - ) - self.list = core.async_with_streaming_response(list, client.list) - self.list_outgoing_link_types = core.async_with_streaming_response( - list_outgoing_link_types, client.list_outgoing_link_types - ) diff --git a/foundry_sdk/v1/ontologies/ontology.py b/foundry_sdk/v1/ontologies/ontology.py deleted file mode 100644 index 1a9726c9f..000000000 --- a/foundry_sdk/v1/ontologies/ontology.py +++ /dev/null @@ -1,318 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing -from functools import cached_property - -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v1.ontologies import models as ontologies_models - - -class OntologyClient: - """ - The API client for the Ontology Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _OntologyClientStreaming(self) - self.with_raw_response = _OntologyClientRaw(self) - - @cached_property - def ActionType(self): - from foundry_sdk.v1.ontologies.action_type import ActionTypeClient - - return ActionTypeClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @cached_property - def ObjectType(self): - from foundry_sdk.v1.ontologies.object_type import ObjectTypeClient - - return ObjectTypeClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @cached_property - def QueryType(self): - from foundry_sdk.v1.ontologies.query_type import QueryTypeClient - - return QueryTypeClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - ontology_rid: ontologies_models.OntologyRid, - *, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> ontologies_models.Ontology: - """ - Gets a specific ontology with the given Ontology RID. - - :param ontology_rid: The unique Resource Identifier (RID) of the Ontology. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. - :type ontology_rid: OntologyRid - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: ontologies_models.Ontology - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v1/ontologies/{ontologyRid}", - query_params={}, - path_params={ - "ontologyRid": ontology_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.Ontology, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def list( - self, - *, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> ontologies_models.ListOntologiesResponse: - """ - Lists the Ontologies visible to the current user. - - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: ontologies_models.ListOntologiesResponse - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v1/ontologies", - query_params={}, - path_params={}, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.ListOntologiesResponse, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _OntologyClientRaw: - def __init__(self, client: OntologyClient) -> None: - def get(_: ontologies_models.Ontology): ... - def list(_: ontologies_models.ListOntologiesResponse): ... - - self.get = core.with_raw_response(get, client.get) - self.list = core.with_raw_response(list, client.list) - - -class _OntologyClientStreaming: - def __init__(self, client: OntologyClient) -> None: - def get(_: ontologies_models.Ontology): ... - def list(_: ontologies_models.ListOntologiesResponse): ... - - self.get = core.with_streaming_response(get, client.get) - self.list = core.with_streaming_response(list, client.list) - - -class AsyncOntologyClient: - """ - The API client for the Ontology Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AsyncOntologyClientStreaming(self) - self.with_raw_response = _AsyncOntologyClientRaw(self) - - @cached_property - def ActionType(self): - from foundry_sdk.v1.ontologies.action_type import AsyncActionTypeClient - - return AsyncActionTypeClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @cached_property - def ObjectType(self): - from foundry_sdk.v1.ontologies.object_type import AsyncObjectTypeClient - - return AsyncObjectTypeClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @cached_property - def QueryType(self): - from foundry_sdk.v1.ontologies.query_type import AsyncQueryTypeClient - - return AsyncQueryTypeClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - ontology_rid: ontologies_models.OntologyRid, - *, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[ontologies_models.Ontology]: - """ - Gets a specific ontology with the given Ontology RID. - - :param ontology_rid: The unique Resource Identifier (RID) of the Ontology. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. - :type ontology_rid: OntologyRid - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[ontologies_models.Ontology] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v1/ontologies/{ontologyRid}", - query_params={}, - path_params={ - "ontologyRid": ontology_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.Ontology, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def list( - self, - *, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[ontologies_models.ListOntologiesResponse]: - """ - Lists the Ontologies visible to the current user. - - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[ontologies_models.ListOntologiesResponse] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v1/ontologies", - query_params={}, - path_params={}, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.ListOntologiesResponse, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _AsyncOntologyClientRaw: - def __init__(self, client: AsyncOntologyClient) -> None: - def get(_: ontologies_models.Ontology): ... - def list(_: ontologies_models.ListOntologiesResponse): ... - - self.get = core.async_with_raw_response(get, client.get) - self.list = core.async_with_raw_response(list, client.list) - - -class _AsyncOntologyClientStreaming: - def __init__(self, client: AsyncOntologyClient) -> None: - def get(_: ontologies_models.Ontology): ... - def list(_: ontologies_models.ListOntologiesResponse): ... - - self.get = core.async_with_streaming_response(get, client.get) - self.list = core.async_with_streaming_response(list, client.list) diff --git a/foundry_sdk/v1/ontologies/ontology_object.py b/foundry_sdk/v1/ontologies/ontology_object.py deleted file mode 100644 index 343b4fec3..000000000 --- a/foundry_sdk/v1/ontologies/ontology_object.py +++ /dev/null @@ -1,994 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing - -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v1.core import models as core_models -from foundry_sdk.v1.ontologies import models as ontologies_models - - -class OntologyObjectClient: - """ - The API client for the OntologyObject Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _OntologyObjectClientStreaming(self) - self.with_raw_response = _OntologyObjectClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def aggregate( - self, - ontology_rid: ontologies_models.OntologyRid, - object_type: ontologies_models.ObjectTypeApiName, - *, - aggregation: typing.List[ontologies_models.Aggregation], - group_by: typing.List[ontologies_models.AggregationGroupBy], - query: typing.Optional[ontologies_models.SearchJsonQuery] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> ontologies_models.AggregateObjectsResponse: - """ - Perform functions on object fields in the specified ontology and object type. - - :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the objects. - :type ontology_rid: OntologyRid - :param object_type: The type of the object to aggregate on. - :type object_type: ObjectTypeApiName - :param aggregation: - :type aggregation: List[Aggregation] - :param group_by: - :type group_by: List[AggregationGroupBy] - :param query: - :type query: Optional[SearchJsonQuery] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: ontologies_models.AggregateObjectsResponse - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v1/ontologies/{ontologyRid}/objects/{objectType}/aggregate", - query_params={}, - path_params={ - "ontologyRid": ontology_rid, - "objectType": object_type, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=ontologies_models.AggregateObjectsRequest( - aggregation=aggregation, - query=query, - group_by=group_by, - ), - response_type=ontologies_models.AggregateObjectsResponse, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - ontology_rid: ontologies_models.OntologyRid, - object_type: ontologies_models.ObjectTypeApiName, - primary_key: ontologies_models.PropertyValueEscapedString, - *, - properties: typing.Optional[typing.List[ontologies_models.SelectedPropertyApiName]] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> ontologies_models.OntologyObject: - """ - Gets a specific object with the given primary key. - - :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the object. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. - :type ontology_rid: OntologyRid - :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. - :type object_type: ObjectTypeApiName - :param primary_key: The primary key of the requested object. To look up the expected primary key for your object type, use the `Get object type` endpoint or the **Ontology Manager**. - :type primary_key: PropertyValueEscapedString - :param properties: The properties of the object type that should be included in the response. Omit this parameter to get all the properties. - :type properties: Optional[List[SelectedPropertyApiName]] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: ontologies_models.OntologyObject - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v1/ontologies/{ontologyRid}/objects/{objectType}/{primaryKey}", - query_params={ - "properties": properties, - }, - path_params={ - "ontologyRid": ontology_rid, - "objectType": object_type, - "primaryKey": primary_key, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.OntologyObject, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get_linked_object( - self, - ontology_rid: ontologies_models.OntologyRid, - object_type: ontologies_models.ObjectTypeApiName, - primary_key: ontologies_models.PropertyValueEscapedString, - link_type: ontologies_models.LinkTypeApiName, - linked_object_primary_key: ontologies_models.PropertyValueEscapedString, - *, - properties: typing.Optional[typing.List[ontologies_models.SelectedPropertyApiName]] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> ontologies_models.OntologyObject: - """ - Get a specific linked object that originates from another object. If there is no link between the two objects, - LinkedObjectNotFound is thrown. - - :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the object. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. - :type ontology_rid: OntologyRid - :param object_type: The API name of the object from which the links originate. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. - :type object_type: ObjectTypeApiName - :param primary_key: The primary key of the object from which the link originates. To look up the expected primary key for your object type, use the `Get object type` endpoint or the **Ontology Manager**. - :type primary_key: PropertyValueEscapedString - :param link_type: The API name of the link that exists between the object and the requested objects. To find the API name for your link type, check the **Ontology Manager**. - :type link_type: LinkTypeApiName - :param linked_object_primary_key: The primary key of the requested linked object. To look up the expected primary key for your object type, use the `Get object type` endpoint (passing the linked object type) or the **Ontology Manager**. - :type linked_object_primary_key: PropertyValueEscapedString - :param properties: The properties of the object type that should be included in the response. Omit this parameter to get all the properties. - :type properties: Optional[List[SelectedPropertyApiName]] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: ontologies_models.OntologyObject - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v1/ontologies/{ontologyRid}/objects/{objectType}/{primaryKey}/links/{linkType}/{linkedObjectPrimaryKey}", - query_params={ - "properties": properties, - }, - path_params={ - "ontologyRid": ontology_rid, - "objectType": object_type, - "primaryKey": primary_key, - "linkType": link_type, - "linkedObjectPrimaryKey": linked_object_primary_key, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.OntologyObject, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def list( - self, - ontology_rid: ontologies_models.OntologyRid, - object_type: ontologies_models.ObjectTypeApiName, - *, - order_by: typing.Optional[ontologies_models.OrderBy] = None, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - properties: typing.Optional[typing.List[ontologies_models.SelectedPropertyApiName]] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.ResourceIterator[ontologies_models.OntologyObject]: - """ - Lists the objects for the given Ontology and object type. - - This endpoint supports filtering objects. - See the [Filtering Objects documentation](https://palantir.com/docs/foundry/api/ontology-resources/objects/ontology-object-basics#filter-objects) for details. - - Note that this endpoint does not guarantee consistency. Changes to the data could result in missing or - repeated objects in the response pages. - - For Object Storage V1 backed objects, this endpoint returns a maximum of 10,000 objects. After 10,000 objects have been returned and if more objects - are available, attempting to load another page will result in an `ObjectsExceededLimit` error being returned. There is no limit on Object Storage V2 backed objects. - - Each page may be smaller or larger than the requested page size. However, it - is guaranteed that if there are more results available, at least one result will be present - in the response. - - Note that null value properties will not be returned. - - :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the objects. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. - :type ontology_rid: OntologyRid - :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. - :type object_type: ObjectTypeApiName - :param order_by: - :type order_by: Optional[OrderBy] - :param page_size: The desired size of the page to be returned. Defaults to 1,000. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. - :type page_size: Optional[PageSize] - :param page_token: - :type page_token: Optional[PageToken] - :param properties: The properties of the object type that should be included in the response. Omit this parameter to get all the properties. - :type properties: Optional[List[SelectedPropertyApiName]] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.ResourceIterator[ontologies_models.OntologyObject] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v1/ontologies/{ontologyRid}/objects/{objectType}", - query_params={ - "orderBy": order_by, - "pageSize": page_size, - "pageToken": page_token, - "properties": properties, - }, - path_params={ - "ontologyRid": ontology_rid, - "objectType": object_type, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.ListObjectsResponse, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def list_linked_objects( - self, - ontology_rid: ontologies_models.OntologyRid, - object_type: ontologies_models.ObjectTypeApiName, - primary_key: ontologies_models.PropertyValueEscapedString, - link_type: ontologies_models.LinkTypeApiName, - *, - order_by: typing.Optional[ontologies_models.OrderBy] = None, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - properties: typing.Optional[typing.List[ontologies_models.SelectedPropertyApiName]] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.ResourceIterator[ontologies_models.OntologyObject]: - """ - Lists the linked objects for a specific object and the given link type. - - This endpoint supports filtering objects. - See the [Filtering Objects documentation](https://palantir.com/docs/foundry/api/ontology-resources/objects/ontology-object-basics#filter-objects) for details. - - Note that this endpoint does not guarantee consistency. Changes to the data could result in missing or - repeated objects in the response pages. - - For Object Storage V1 backed objects, this endpoint returns a maximum of 10,000 objects. After 10,000 objects have been returned and if more objects - are available, attempting to load another page will result in an `ObjectsExceededLimit` error being returned. There is no limit on Object Storage V2 backed objects. - - Each page may be smaller or larger than the requested page size. However, it - is guaranteed that if there are more results available, at least one result will be present - in the response. - - Note that null value properties will not be returned. - - :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the objects. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. - :type ontology_rid: OntologyRid - :param object_type: The API name of the object from which the links originate. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. - :type object_type: ObjectTypeApiName - :param primary_key: The primary key of the object from which the links originate. To look up the expected primary key for your object type, use the `Get object type` endpoint or the **Ontology Manager**. - :type primary_key: PropertyValueEscapedString - :param link_type: The API name of the link that exists between the object and the requested objects. To find the API name for your link type, check the **Ontology Manager**. - :type link_type: LinkTypeApiName - :param order_by: - :type order_by: Optional[OrderBy] - :param page_size: The desired size of the page to be returned. Defaults to 1,000. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. - :type page_size: Optional[PageSize] - :param page_token: - :type page_token: Optional[PageToken] - :param properties: The properties of the object type that should be included in the response. Omit this parameter to get all the properties. - :type properties: Optional[List[SelectedPropertyApiName]] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.ResourceIterator[ontologies_models.OntologyObject] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v1/ontologies/{ontologyRid}/objects/{objectType}/{primaryKey}/links/{linkType}", - query_params={ - "orderBy": order_by, - "pageSize": page_size, - "pageToken": page_token, - "properties": properties, - }, - path_params={ - "ontologyRid": ontology_rid, - "objectType": object_type, - "primaryKey": primary_key, - "linkType": link_type, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.ListLinkedObjectsResponse, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def search( - self, - ontology_rid: ontologies_models.OntologyRid, - object_type: ontologies_models.ObjectTypeApiName, - *, - fields: typing.List[ontologies_models.PropertyApiName], - query: ontologies_models.SearchJsonQuery, - order_by: typing.Optional[ontologies_models.SearchOrderBy] = None, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> ontologies_models.SearchObjectsResponse: - """ - Search for objects in the specified ontology and object type. The request body is used - to filter objects based on the specified query. The supported queries are: - - | Query type | Description | Supported Types | - |----------|-----------------------------------------------------------------------------------|---------------------------------| - | lt | The provided property is less than the provided value. | number, string, date, timestamp | - | gt | The provided property is greater than the provided value. | number, string, date, timestamp | - | lte | The provided property is less than or equal to the provided value. | number, string, date, timestamp | - | gte | The provided property is greater than or equal to the provided value. | number, string, date, timestamp | - | eq | The provided property is exactly equal to the provided value. | number, string, date, timestamp | - | isNull | The provided property is (or is not) null. | all | - | contains | The provided property contains the provided value. | array | - | not | The sub-query does not match. | N/A (applied on a query) | - | and | All the sub-queries match. | N/A (applied on queries) | - | or | At least one of the sub-queries match. | N/A (applied on queries) | - | prefix | The provided property starts with the provided term. | string | - | phrase | The provided property contains the provided term as a substring. | string | - | anyTerm | The provided property contains at least one of the terms separated by whitespace. | string | - | allTerms | The provided property contains all the terms separated by whitespace. | string | - - Queries can be at most three levels deep. By default, terms are separated by whitespace or punctuation (`?!,:;-[](){}'"~`). Periods (`.`) on their own are ignored. - Partial terms are not matched by terms filters except where explicitly noted. - - :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the objects. - :type ontology_rid: OntologyRid - :param object_type: The type of the requested objects. - :type object_type: ObjectTypeApiName - :param fields: The API names of the object type properties to include in the response. - :type fields: List[PropertyApiName] - :param query: - :type query: SearchJsonQuery - :param order_by: - :type order_by: Optional[SearchOrderBy] - :param page_size: - :type page_size: Optional[PageSize] - :param page_token: - :type page_token: Optional[PageToken] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: ontologies_models.SearchObjectsResponse - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v1/ontologies/{ontologyRid}/objects/{objectType}/search", - query_params={}, - path_params={ - "ontologyRid": ontology_rid, - "objectType": object_type, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=ontologies_models.SearchObjectsRequest( - query=query, - order_by=order_by, - page_size=page_size, - page_token=page_token, - fields=fields, - ), - response_type=ontologies_models.SearchObjectsResponse, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _OntologyObjectClientRaw: - def __init__(self, client: OntologyObjectClient) -> None: - def aggregate(_: ontologies_models.AggregateObjectsResponse): ... - def get(_: ontologies_models.OntologyObject): ... - def get_linked_object(_: ontologies_models.OntologyObject): ... - def list(_: ontologies_models.ListObjectsResponse): ... - def list_linked_objects(_: ontologies_models.ListLinkedObjectsResponse): ... - def search(_: ontologies_models.SearchObjectsResponse): ... - - self.aggregate = core.with_raw_response(aggregate, client.aggregate) - self.get = core.with_raw_response(get, client.get) - self.get_linked_object = core.with_raw_response(get_linked_object, client.get_linked_object) - self.list = core.with_raw_response(list, client.list) - self.list_linked_objects = core.with_raw_response( - list_linked_objects, client.list_linked_objects - ) - self.search = core.with_raw_response(search, client.search) - - -class _OntologyObjectClientStreaming: - def __init__(self, client: OntologyObjectClient) -> None: - def aggregate(_: ontologies_models.AggregateObjectsResponse): ... - def get(_: ontologies_models.OntologyObject): ... - def get_linked_object(_: ontologies_models.OntologyObject): ... - def list(_: ontologies_models.ListObjectsResponse): ... - def list_linked_objects(_: ontologies_models.ListLinkedObjectsResponse): ... - def search(_: ontologies_models.SearchObjectsResponse): ... - - self.aggregate = core.with_streaming_response(aggregate, client.aggregate) - self.get = core.with_streaming_response(get, client.get) - self.get_linked_object = core.with_streaming_response( - get_linked_object, client.get_linked_object - ) - self.list = core.with_streaming_response(list, client.list) - self.list_linked_objects = core.with_streaming_response( - list_linked_objects, client.list_linked_objects - ) - self.search = core.with_streaming_response(search, client.search) - - -class AsyncOntologyObjectClient: - """ - The API client for the OntologyObject Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AsyncOntologyObjectClientStreaming(self) - self.with_raw_response = _AsyncOntologyObjectClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def aggregate( - self, - ontology_rid: ontologies_models.OntologyRid, - object_type: ontologies_models.ObjectTypeApiName, - *, - aggregation: typing.List[ontologies_models.Aggregation], - group_by: typing.List[ontologies_models.AggregationGroupBy], - query: typing.Optional[ontologies_models.SearchJsonQuery] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[ontologies_models.AggregateObjectsResponse]: - """ - Perform functions on object fields in the specified ontology and object type. - - :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the objects. - :type ontology_rid: OntologyRid - :param object_type: The type of the object to aggregate on. - :type object_type: ObjectTypeApiName - :param aggregation: - :type aggregation: List[Aggregation] - :param group_by: - :type group_by: List[AggregationGroupBy] - :param query: - :type query: Optional[SearchJsonQuery] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[ontologies_models.AggregateObjectsResponse] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v1/ontologies/{ontologyRid}/objects/{objectType}/aggregate", - query_params={}, - path_params={ - "ontologyRid": ontology_rid, - "objectType": object_type, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=ontologies_models.AggregateObjectsRequest( - aggregation=aggregation, - query=query, - group_by=group_by, - ), - response_type=ontologies_models.AggregateObjectsResponse, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - ontology_rid: ontologies_models.OntologyRid, - object_type: ontologies_models.ObjectTypeApiName, - primary_key: ontologies_models.PropertyValueEscapedString, - *, - properties: typing.Optional[typing.List[ontologies_models.SelectedPropertyApiName]] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[ontologies_models.OntologyObject]: - """ - Gets a specific object with the given primary key. - - :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the object. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. - :type ontology_rid: OntologyRid - :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. - :type object_type: ObjectTypeApiName - :param primary_key: The primary key of the requested object. To look up the expected primary key for your object type, use the `Get object type` endpoint or the **Ontology Manager**. - :type primary_key: PropertyValueEscapedString - :param properties: The properties of the object type that should be included in the response. Omit this parameter to get all the properties. - :type properties: Optional[List[SelectedPropertyApiName]] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[ontologies_models.OntologyObject] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v1/ontologies/{ontologyRid}/objects/{objectType}/{primaryKey}", - query_params={ - "properties": properties, - }, - path_params={ - "ontologyRid": ontology_rid, - "objectType": object_type, - "primaryKey": primary_key, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.OntologyObject, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get_linked_object( - self, - ontology_rid: ontologies_models.OntologyRid, - object_type: ontologies_models.ObjectTypeApiName, - primary_key: ontologies_models.PropertyValueEscapedString, - link_type: ontologies_models.LinkTypeApiName, - linked_object_primary_key: ontologies_models.PropertyValueEscapedString, - *, - properties: typing.Optional[typing.List[ontologies_models.SelectedPropertyApiName]] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[ontologies_models.OntologyObject]: - """ - Get a specific linked object that originates from another object. If there is no link between the two objects, - LinkedObjectNotFound is thrown. - - :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the object. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. - :type ontology_rid: OntologyRid - :param object_type: The API name of the object from which the links originate. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. - :type object_type: ObjectTypeApiName - :param primary_key: The primary key of the object from which the link originates. To look up the expected primary key for your object type, use the `Get object type` endpoint or the **Ontology Manager**. - :type primary_key: PropertyValueEscapedString - :param link_type: The API name of the link that exists between the object and the requested objects. To find the API name for your link type, check the **Ontology Manager**. - :type link_type: LinkTypeApiName - :param linked_object_primary_key: The primary key of the requested linked object. To look up the expected primary key for your object type, use the `Get object type` endpoint (passing the linked object type) or the **Ontology Manager**. - :type linked_object_primary_key: PropertyValueEscapedString - :param properties: The properties of the object type that should be included in the response. Omit this parameter to get all the properties. - :type properties: Optional[List[SelectedPropertyApiName]] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[ontologies_models.OntologyObject] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v1/ontologies/{ontologyRid}/objects/{objectType}/{primaryKey}/links/{linkType}/{linkedObjectPrimaryKey}", - query_params={ - "properties": properties, - }, - path_params={ - "ontologyRid": ontology_rid, - "objectType": object_type, - "primaryKey": primary_key, - "linkType": link_type, - "linkedObjectPrimaryKey": linked_object_primary_key, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.OntologyObject, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def list( - self, - ontology_rid: ontologies_models.OntologyRid, - object_type: ontologies_models.ObjectTypeApiName, - *, - order_by: typing.Optional[ontologies_models.OrderBy] = None, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - properties: typing.Optional[typing.List[ontologies_models.SelectedPropertyApiName]] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.AsyncResourceIterator[ontologies_models.OntologyObject]: - """ - Lists the objects for the given Ontology and object type. - - This endpoint supports filtering objects. - See the [Filtering Objects documentation](https://palantir.com/docs/foundry/api/ontology-resources/objects/ontology-object-basics#filter-objects) for details. - - Note that this endpoint does not guarantee consistency. Changes to the data could result in missing or - repeated objects in the response pages. - - For Object Storage V1 backed objects, this endpoint returns a maximum of 10,000 objects. After 10,000 objects have been returned and if more objects - are available, attempting to load another page will result in an `ObjectsExceededLimit` error being returned. There is no limit on Object Storage V2 backed objects. - - Each page may be smaller or larger than the requested page size. However, it - is guaranteed that if there are more results available, at least one result will be present - in the response. - - Note that null value properties will not be returned. - - :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the objects. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. - :type ontology_rid: OntologyRid - :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. - :type object_type: ObjectTypeApiName - :param order_by: - :type order_by: Optional[OrderBy] - :param page_size: The desired size of the page to be returned. Defaults to 1,000. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. - :type page_size: Optional[PageSize] - :param page_token: - :type page_token: Optional[PageToken] - :param properties: The properties of the object type that should be included in the response. Omit this parameter to get all the properties. - :type properties: Optional[List[SelectedPropertyApiName]] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.AsyncResourceIterator[ontologies_models.OntologyObject] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v1/ontologies/{ontologyRid}/objects/{objectType}", - query_params={ - "orderBy": order_by, - "pageSize": page_size, - "pageToken": page_token, - "properties": properties, - }, - path_params={ - "ontologyRid": ontology_rid, - "objectType": object_type, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.ListObjectsResponse, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def list_linked_objects( - self, - ontology_rid: ontologies_models.OntologyRid, - object_type: ontologies_models.ObjectTypeApiName, - primary_key: ontologies_models.PropertyValueEscapedString, - link_type: ontologies_models.LinkTypeApiName, - *, - order_by: typing.Optional[ontologies_models.OrderBy] = None, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - properties: typing.Optional[typing.List[ontologies_models.SelectedPropertyApiName]] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.AsyncResourceIterator[ontologies_models.OntologyObject]: - """ - Lists the linked objects for a specific object and the given link type. - - This endpoint supports filtering objects. - See the [Filtering Objects documentation](https://palantir.com/docs/foundry/api/ontology-resources/objects/ontology-object-basics#filter-objects) for details. - - Note that this endpoint does not guarantee consistency. Changes to the data could result in missing or - repeated objects in the response pages. - - For Object Storage V1 backed objects, this endpoint returns a maximum of 10,000 objects. After 10,000 objects have been returned and if more objects - are available, attempting to load another page will result in an `ObjectsExceededLimit` error being returned. There is no limit on Object Storage V2 backed objects. - - Each page may be smaller or larger than the requested page size. However, it - is guaranteed that if there are more results available, at least one result will be present - in the response. - - Note that null value properties will not be returned. - - :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the objects. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. - :type ontology_rid: OntologyRid - :param object_type: The API name of the object from which the links originate. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. - :type object_type: ObjectTypeApiName - :param primary_key: The primary key of the object from which the links originate. To look up the expected primary key for your object type, use the `Get object type` endpoint or the **Ontology Manager**. - :type primary_key: PropertyValueEscapedString - :param link_type: The API name of the link that exists between the object and the requested objects. To find the API name for your link type, check the **Ontology Manager**. - :type link_type: LinkTypeApiName - :param order_by: - :type order_by: Optional[OrderBy] - :param page_size: The desired size of the page to be returned. Defaults to 1,000. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. - :type page_size: Optional[PageSize] - :param page_token: - :type page_token: Optional[PageToken] - :param properties: The properties of the object type that should be included in the response. Omit this parameter to get all the properties. - :type properties: Optional[List[SelectedPropertyApiName]] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.AsyncResourceIterator[ontologies_models.OntologyObject] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v1/ontologies/{ontologyRid}/objects/{objectType}/{primaryKey}/links/{linkType}", - query_params={ - "orderBy": order_by, - "pageSize": page_size, - "pageToken": page_token, - "properties": properties, - }, - path_params={ - "ontologyRid": ontology_rid, - "objectType": object_type, - "primaryKey": primary_key, - "linkType": link_type, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.ListLinkedObjectsResponse, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def search( - self, - ontology_rid: ontologies_models.OntologyRid, - object_type: ontologies_models.ObjectTypeApiName, - *, - fields: typing.List[ontologies_models.PropertyApiName], - query: ontologies_models.SearchJsonQuery, - order_by: typing.Optional[ontologies_models.SearchOrderBy] = None, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[ontologies_models.SearchObjectsResponse]: - """ - Search for objects in the specified ontology and object type. The request body is used - to filter objects based on the specified query. The supported queries are: - - | Query type | Description | Supported Types | - |----------|-----------------------------------------------------------------------------------|---------------------------------| - | lt | The provided property is less than the provided value. | number, string, date, timestamp | - | gt | The provided property is greater than the provided value. | number, string, date, timestamp | - | lte | The provided property is less than or equal to the provided value. | number, string, date, timestamp | - | gte | The provided property is greater than or equal to the provided value. | number, string, date, timestamp | - | eq | The provided property is exactly equal to the provided value. | number, string, date, timestamp | - | isNull | The provided property is (or is not) null. | all | - | contains | The provided property contains the provided value. | array | - | not | The sub-query does not match. | N/A (applied on a query) | - | and | All the sub-queries match. | N/A (applied on queries) | - | or | At least one of the sub-queries match. | N/A (applied on queries) | - | prefix | The provided property starts with the provided term. | string | - | phrase | The provided property contains the provided term as a substring. | string | - | anyTerm | The provided property contains at least one of the terms separated by whitespace. | string | - | allTerms | The provided property contains all the terms separated by whitespace. | string | - - Queries can be at most three levels deep. By default, terms are separated by whitespace or punctuation (`?!,:;-[](){}'"~`). Periods (`.`) on their own are ignored. - Partial terms are not matched by terms filters except where explicitly noted. - - :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the objects. - :type ontology_rid: OntologyRid - :param object_type: The type of the requested objects. - :type object_type: ObjectTypeApiName - :param fields: The API names of the object type properties to include in the response. - :type fields: List[PropertyApiName] - :param query: - :type query: SearchJsonQuery - :param order_by: - :type order_by: Optional[SearchOrderBy] - :param page_size: - :type page_size: Optional[PageSize] - :param page_token: - :type page_token: Optional[PageToken] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[ontologies_models.SearchObjectsResponse] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v1/ontologies/{ontologyRid}/objects/{objectType}/search", - query_params={}, - path_params={ - "ontologyRid": ontology_rid, - "objectType": object_type, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=ontologies_models.SearchObjectsRequest( - query=query, - order_by=order_by, - page_size=page_size, - page_token=page_token, - fields=fields, - ), - response_type=ontologies_models.SearchObjectsResponse, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _AsyncOntologyObjectClientRaw: - def __init__(self, client: AsyncOntologyObjectClient) -> None: - def aggregate(_: ontologies_models.AggregateObjectsResponse): ... - def get(_: ontologies_models.OntologyObject): ... - def get_linked_object(_: ontologies_models.OntologyObject): ... - def list(_: ontologies_models.ListObjectsResponse): ... - def list_linked_objects(_: ontologies_models.ListLinkedObjectsResponse): ... - def search(_: ontologies_models.SearchObjectsResponse): ... - - self.aggregate = core.async_with_raw_response(aggregate, client.aggregate) - self.get = core.async_with_raw_response(get, client.get) - self.get_linked_object = core.async_with_raw_response( - get_linked_object, client.get_linked_object - ) - self.list = core.async_with_raw_response(list, client.list) - self.list_linked_objects = core.async_with_raw_response( - list_linked_objects, client.list_linked_objects - ) - self.search = core.async_with_raw_response(search, client.search) - - -class _AsyncOntologyObjectClientStreaming: - def __init__(self, client: AsyncOntologyObjectClient) -> None: - def aggregate(_: ontologies_models.AggregateObjectsResponse): ... - def get(_: ontologies_models.OntologyObject): ... - def get_linked_object(_: ontologies_models.OntologyObject): ... - def list(_: ontologies_models.ListObjectsResponse): ... - def list_linked_objects(_: ontologies_models.ListLinkedObjectsResponse): ... - def search(_: ontologies_models.SearchObjectsResponse): ... - - self.aggregate = core.async_with_streaming_response(aggregate, client.aggregate) - self.get = core.async_with_streaming_response(get, client.get) - self.get_linked_object = core.async_with_streaming_response( - get_linked_object, client.get_linked_object - ) - self.list = core.async_with_streaming_response(list, client.list) - self.list_linked_objects = core.async_with_streaming_response( - list_linked_objects, client.list_linked_objects - ) - self.search = core.async_with_streaming_response(search, client.search) diff --git a/foundry_sdk/v1/ontologies/query.py b/foundry_sdk/v1/ontologies/query.py deleted file mode 100644 index 46de9e53a..000000000 --- a/foundry_sdk/v1/ontologies/query.py +++ /dev/null @@ -1,228 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing - -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v1.core import models as core_models -from foundry_sdk.v1.ontologies import models as ontologies_models - - -class QueryClient: - """ - The API client for the Query Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _QueryClientStreaming(self) - self.with_raw_response = _QueryClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def execute( - self, - ontology_rid: ontologies_models.OntologyRid, - query_api_name: ontologies_models.QueryApiName, - *, - parameters: typing.Dict[ - ontologies_models.ParameterId, typing.Optional[ontologies_models.DataValue] - ], - attribution: typing.Optional[core_models.Attribution] = None, - trace_parent: typing.Optional[core_models.TraceParent] = None, - trace_state: typing.Optional[core_models.TraceState] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> ontologies_models.ExecuteQueryResponse: - """ - Executes a Query using the given parameters. Optional parameters do not need to be supplied. - - :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the Query. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. - :type ontology_rid: OntologyRid - :param query_api_name: The API name of the Query to execute. - :type query_api_name: QueryApiName - :param parameters: - :type parameters: Dict[ParameterId, Optional[DataValue]] - :param attribution: The Attribution to be used when executing this request. - :type attribution: Optional[Attribution] - :param trace_parent: The W3C trace parent header included in the request. - :type trace_parent: Optional[TraceParent] - :param trace_state: The W3C trace state header included in the request. - :type trace_state: Optional[TraceState] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: ontologies_models.ExecuteQueryResponse - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v1/ontologies/{ontologyRid}/queries/{queryApiName}/execute", - query_params={}, - path_params={ - "ontologyRid": ontology_rid, - "queryApiName": query_api_name, - }, - header_params={ - "attribution": attribution, - "traceParent": trace_parent, - "traceState": trace_state, - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=ontologies_models.ExecuteQueryRequest( - parameters=parameters, - ), - response_type=ontologies_models.ExecuteQueryResponse, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _QueryClientRaw: - def __init__(self, client: QueryClient) -> None: - def execute(_: ontologies_models.ExecuteQueryResponse): ... - - self.execute = core.with_raw_response(execute, client.execute) - - -class _QueryClientStreaming: - def __init__(self, client: QueryClient) -> None: - def execute(_: ontologies_models.ExecuteQueryResponse): ... - - self.execute = core.with_streaming_response(execute, client.execute) - - -class AsyncQueryClient: - """ - The API client for the Query Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AsyncQueryClientStreaming(self) - self.with_raw_response = _AsyncQueryClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def execute( - self, - ontology_rid: ontologies_models.OntologyRid, - query_api_name: ontologies_models.QueryApiName, - *, - parameters: typing.Dict[ - ontologies_models.ParameterId, typing.Optional[ontologies_models.DataValue] - ], - attribution: typing.Optional[core_models.Attribution] = None, - trace_parent: typing.Optional[core_models.TraceParent] = None, - trace_state: typing.Optional[core_models.TraceState] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[ontologies_models.ExecuteQueryResponse]: - """ - Executes a Query using the given parameters. Optional parameters do not need to be supplied. - - :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the Query. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. - :type ontology_rid: OntologyRid - :param query_api_name: The API name of the Query to execute. - :type query_api_name: QueryApiName - :param parameters: - :type parameters: Dict[ParameterId, Optional[DataValue]] - :param attribution: The Attribution to be used when executing this request. - :type attribution: Optional[Attribution] - :param trace_parent: The W3C trace parent header included in the request. - :type trace_parent: Optional[TraceParent] - :param trace_state: The W3C trace state header included in the request. - :type trace_state: Optional[TraceState] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[ontologies_models.ExecuteQueryResponse] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v1/ontologies/{ontologyRid}/queries/{queryApiName}/execute", - query_params={}, - path_params={ - "ontologyRid": ontology_rid, - "queryApiName": query_api_name, - }, - header_params={ - "attribution": attribution, - "traceParent": trace_parent, - "traceState": trace_state, - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=ontologies_models.ExecuteQueryRequest( - parameters=parameters, - ), - response_type=ontologies_models.ExecuteQueryResponse, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _AsyncQueryClientRaw: - def __init__(self, client: AsyncQueryClient) -> None: - def execute(_: ontologies_models.ExecuteQueryResponse): ... - - self.execute = core.async_with_raw_response(execute, client.execute) - - -class _AsyncQueryClientStreaming: - def __init__(self, client: AsyncQueryClient) -> None: - def execute(_: ontologies_models.ExecuteQueryResponse): ... - - self.execute = core.async_with_streaming_response(execute, client.execute) diff --git a/foundry_sdk/v1/ontologies/query_type.py b/foundry_sdk/v1/ontologies/query_type.py deleted file mode 100644 index c6ec515dc..000000000 --- a/foundry_sdk/v1/ontologies/query_type.py +++ /dev/null @@ -1,300 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing - -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v1.core import models as core_models -from foundry_sdk.v1.ontologies import models as ontologies_models - - -class QueryTypeClient: - """ - The API client for the QueryType Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _QueryTypeClientStreaming(self) - self.with_raw_response = _QueryTypeClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - ontology_rid: ontologies_models.OntologyRid, - query_api_name: ontologies_models.QueryApiName, - *, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> ontologies_models.QueryType: - """ - Gets a specific query type with the given API name. - - :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the query type. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. - :type ontology_rid: OntologyRid - :param query_api_name: The API name of the query type. To find the API name, use the **List query types** endpoint or check the **Ontology Manager**. - :type query_api_name: QueryApiName - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: ontologies_models.QueryType - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v1/ontologies/{ontologyRid}/queryTypes/{queryApiName}", - query_params={}, - path_params={ - "ontologyRid": ontology_rid, - "queryApiName": query_api_name, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.QueryType, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def list( - self, - ontology_rid: ontologies_models.OntologyRid, - *, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.ResourceIterator[ontologies_models.QueryType]: - """ - Lists the query types for the given Ontology. - - Each page may be smaller than the requested page size. However, it is guaranteed that if there are more - results available, at least one result will be present in the response. - - :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the query types. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. - :type ontology_rid: OntologyRid - :param page_size: The desired size of the page to be returned. Defaults to 100. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. - :type page_size: Optional[PageSize] - :param page_token: - :type page_token: Optional[PageToken] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.ResourceIterator[ontologies_models.QueryType] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v1/ontologies/{ontologyRid}/queryTypes", - query_params={ - "pageSize": page_size, - "pageToken": page_token, - }, - path_params={ - "ontologyRid": ontology_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.ListQueryTypesResponse, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - -class _QueryTypeClientRaw: - def __init__(self, client: QueryTypeClient) -> None: - def get(_: ontologies_models.QueryType): ... - def list(_: ontologies_models.ListQueryTypesResponse): ... - - self.get = core.with_raw_response(get, client.get) - self.list = core.with_raw_response(list, client.list) - - -class _QueryTypeClientStreaming: - def __init__(self, client: QueryTypeClient) -> None: - def get(_: ontologies_models.QueryType): ... - def list(_: ontologies_models.ListQueryTypesResponse): ... - - self.get = core.with_streaming_response(get, client.get) - self.list = core.with_streaming_response(list, client.list) - - -class AsyncQueryTypeClient: - """ - The API client for the QueryType Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AsyncQueryTypeClientStreaming(self) - self.with_raw_response = _AsyncQueryTypeClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - ontology_rid: ontologies_models.OntologyRid, - query_api_name: ontologies_models.QueryApiName, - *, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[ontologies_models.QueryType]: - """ - Gets a specific query type with the given API name. - - :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the query type. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. - :type ontology_rid: OntologyRid - :param query_api_name: The API name of the query type. To find the API name, use the **List query types** endpoint or check the **Ontology Manager**. - :type query_api_name: QueryApiName - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[ontologies_models.QueryType] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v1/ontologies/{ontologyRid}/queryTypes/{queryApiName}", - query_params={}, - path_params={ - "ontologyRid": ontology_rid, - "queryApiName": query_api_name, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.QueryType, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def list( - self, - ontology_rid: ontologies_models.OntologyRid, - *, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.AsyncResourceIterator[ontologies_models.QueryType]: - """ - Lists the query types for the given Ontology. - - Each page may be smaller than the requested page size. However, it is guaranteed that if there are more - results available, at least one result will be present in the response. - - :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the query types. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. - :type ontology_rid: OntologyRid - :param page_size: The desired size of the page to be returned. Defaults to 100. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. - :type page_size: Optional[PageSize] - :param page_token: - :type page_token: Optional[PageToken] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.AsyncResourceIterator[ontologies_models.QueryType] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v1/ontologies/{ontologyRid}/queryTypes", - query_params={ - "pageSize": page_size, - "pageToken": page_token, - }, - path_params={ - "ontologyRid": ontology_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.ListQueryTypesResponse, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - -class _AsyncQueryTypeClientRaw: - def __init__(self, client: AsyncQueryTypeClient) -> None: - def get(_: ontologies_models.QueryType): ... - def list(_: ontologies_models.ListQueryTypesResponse): ... - - self.get = core.async_with_raw_response(get, client.get) - self.list = core.async_with_raw_response(list, client.list) - - -class _AsyncQueryTypeClientStreaming: - def __init__(self, client: AsyncQueryTypeClient) -> None: - def get(_: ontologies_models.QueryType): ... - def list(_: ontologies_models.ListQueryTypesResponse): ... - - self.get = core.async_with_streaming_response(get, client.get) - self.list = core.async_with_streaming_response(list, client.list) diff --git a/foundry_sdk/v2/__init__.py b/foundry_sdk/v2/__init__.py deleted file mode 100644 index 645f6b6cc..000000000 --- a/foundry_sdk/v2/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -from foundry_sdk.v2.client import AsyncFoundryClient -from foundry_sdk.v2.client import FoundryClient - -__all__ = [ - "FoundryClient", - "AsyncFoundryClient", -] diff --git a/foundry_sdk/v2/admin/__init__.py b/foundry_sdk/v2/admin/__init__.py deleted file mode 100644 index ddb02c365..000000000 --- a/foundry_sdk/v2/admin/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -from foundry_sdk.v2.admin._client import AdminClient -from foundry_sdk.v2.admin._client import AsyncAdminClient - -__all__ = [ - "AdminClient", - "AsyncAdminClient", -] diff --git a/foundry_sdk/v2/admin/_client.py b/foundry_sdk/v2/admin/_client.py deleted file mode 100644 index a0cd99426..000000000 --- a/foundry_sdk/v2/admin/_client.py +++ /dev/null @@ -1,149 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing -from functools import cached_property - -from foundry_sdk import _core as core - - -class AdminClient: - """ - The API client for the Admin Namespace. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - - @cached_property - def Enrollment(self): - from foundry_sdk.v2.admin.enrollment import EnrollmentClient - - return EnrollmentClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @cached_property - def Group(self): - from foundry_sdk.v2.admin.group import GroupClient - - return GroupClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @cached_property - def Marking(self): - from foundry_sdk.v2.admin.marking import MarkingClient - - return MarkingClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @cached_property - def MarkingCategory(self): - from foundry_sdk.v2.admin.marking_category import MarkingCategoryClient - - return MarkingCategoryClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @cached_property - def Organization(self): - from foundry_sdk.v2.admin.organization import OrganizationClient - - return OrganizationClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @cached_property - def Role(self): - from foundry_sdk.v2.admin.role import RoleClient - - return RoleClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @cached_property - def User(self): - from foundry_sdk.v2.admin.user import UserClient - - return UserClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - -class AsyncAdminClient: - """ - The Async API client for the Admin Namespace. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - from foundry_sdk.v2.admin.enrollment import AsyncEnrollmentClient - from foundry_sdk.v2.admin.group import AsyncGroupClient - from foundry_sdk.v2.admin.marking import AsyncMarkingClient - from foundry_sdk.v2.admin.marking_category import AsyncMarkingCategoryClient - from foundry_sdk.v2.admin.organization import AsyncOrganizationClient - from foundry_sdk.v2.admin.role import AsyncRoleClient - from foundry_sdk.v2.admin.user import AsyncUserClient - - self.Enrollment = AsyncEnrollmentClient(auth=auth, hostname=hostname, config=config) - - self.Group = AsyncGroupClient(auth=auth, hostname=hostname, config=config) - - self.Marking = AsyncMarkingClient(auth=auth, hostname=hostname, config=config) - - self.MarkingCategory = AsyncMarkingCategoryClient( - auth=auth, hostname=hostname, config=config - ) - - self.Organization = AsyncOrganizationClient(auth=auth, hostname=hostname, config=config) - - self.Role = AsyncRoleClient(auth=auth, hostname=hostname, config=config) - - self.User = AsyncUserClient(auth=auth, hostname=hostname, config=config) diff --git a/foundry_sdk/v2/admin/authentication_provider.py b/foundry_sdk/v2/admin/authentication_provider.py deleted file mode 100644 index 5054cf1e5..000000000 --- a/foundry_sdk/v2/admin/authentication_provider.py +++ /dev/null @@ -1,641 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing - -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v2.admin import errors as admin_errors -from foundry_sdk.v2.admin import models as admin_models -from foundry_sdk.v2.core import models as core_models - - -class AuthenticationProviderClient: - """ - The API client for the AuthenticationProvider Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AuthenticationProviderClientStreaming(self) - self.with_raw_response = _AuthenticationProviderClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - enrollment_rid: core_models.EnrollmentRid, - authentication_provider_rid: admin_models.AuthenticationProviderRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> admin_models.AuthenticationProvider: - """ - Get the AuthenticationProvider with the specified rid. - :param enrollment_rid: - :type enrollment_rid: EnrollmentRid - :param authentication_provider_rid: - :type authentication_provider_rid: AuthenticationProviderRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: admin_models.AuthenticationProvider - - :raises AuthenticationProviderNotFound: The given AuthenticationProvider could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/admin/enrollments/{enrollmentRid}/authenticationProviders/{authenticationProviderRid}", - query_params={ - "preview": preview, - }, - path_params={ - "enrollmentRid": enrollment_rid, - "authenticationProviderRid": authentication_provider_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=admin_models.AuthenticationProvider, - request_timeout=request_timeout, - throwable_errors={ - "AuthenticationProviderNotFound": admin_errors.AuthenticationProviderNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def list( - self, - enrollment_rid: core_models.EnrollmentRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> admin_models.ListAuthenticationProvidersResponse: - """ - Lists all AuthenticationProviders. - - - :param enrollment_rid: - :type enrollment_rid: EnrollmentRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: admin_models.ListAuthenticationProvidersResponse - - :raises EnrollmentNotFound: The given Enrollment could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/admin/enrollments/{enrollmentRid}/authenticationProviders", - query_params={ - "preview": preview, - }, - path_params={ - "enrollmentRid": enrollment_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=admin_models.ListAuthenticationProvidersResponse, - request_timeout=request_timeout, - throwable_errors={ - "EnrollmentNotFound": admin_errors.EnrollmentNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def preregister_group( - self, - enrollment_rid: core_models.EnrollmentRid, - authentication_provider_rid: admin_models.AuthenticationProviderRid, - *, - name: admin_models.GroupName, - organizations: typing.List[core_models.OrganizationRid], - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core_models.PrincipalId: - """ - Register a Group with a given name before any users with this group log in through this Authentication Provider. - Preregistered groups can be used anywhere other groups are used in the platform. - - :param enrollment_rid: - :type enrollment_rid: EnrollmentRid - :param authentication_provider_rid: - :type authentication_provider_rid: AuthenticationProviderRid - :param name: - :type name: GroupName - :param organizations: The RIDs of the Organizations that can view this group. - :type organizations: List[OrganizationRid] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core_models.PrincipalId - - :raises AuthenticationProviderNotFound: The given AuthenticationProvider could not be found. - :raises PreregisterGroupPermissionDenied: Could not preregisterGroup the AuthenticationProvider. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/admin/enrollments/{enrollmentRid}/authenticationProviders/{authenticationProviderRid}/preregisterGroup", - query_params={ - "preview": preview, - }, - path_params={ - "enrollmentRid": enrollment_rid, - "authenticationProviderRid": authentication_provider_rid, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=admin_models.PreregisterGroupRequest( - name=name, - organizations=organizations, - ), - response_type=core_models.PrincipalId, - request_timeout=request_timeout, - throwable_errors={ - "AuthenticationProviderNotFound": admin_errors.AuthenticationProviderNotFound, - "PreregisterGroupPermissionDenied": admin_errors.PreregisterGroupPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def preregister_user( - self, - enrollment_rid: core_models.EnrollmentRid, - authentication_provider_rid: admin_models.AuthenticationProviderRid, - *, - organization: core_models.OrganizationRid, - username: admin_models.UserUsername, - attributes: typing.Optional[ - typing.Dict[admin_models.AttributeName, admin_models.AttributeValues] - ] = None, - email: typing.Optional[str] = None, - family_name: typing.Optional[str] = None, - given_name: typing.Optional[str] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core_models.PrincipalId: - """ - Register a User with a given username before they log in to the platform for the first time through this - Authentication Provider. Preregistered users can be assigned to groups and roles prior to first login. - - :param enrollment_rid: - :type enrollment_rid: EnrollmentRid - :param authentication_provider_rid: - :type authentication_provider_rid: AuthenticationProviderRid - :param organization: The RID of the user's primary Organization. This may be changed when the user logs in for the first time depending on any configured Organization assignment rules. - :type organization: OrganizationRid - :param username: The new user's username. This must match one of the provider's supported username patterns. - :type username: UserUsername - :param attributes: - :type attributes: Optional[Dict[AttributeName, AttributeValues]] - :param email: - :type email: Optional[str] - :param family_name: - :type family_name: Optional[str] - :param given_name: - :type given_name: Optional[str] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core_models.PrincipalId - - :raises AuthenticationProviderNotFound: The given AuthenticationProvider could not be found. - :raises PreregisterUserPermissionDenied: Could not preregisterUser the AuthenticationProvider. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/admin/enrollments/{enrollmentRid}/authenticationProviders/{authenticationProviderRid}/preregisterUser", - query_params={ - "preview": preview, - }, - path_params={ - "enrollmentRid": enrollment_rid, - "authenticationProviderRid": authentication_provider_rid, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=admin_models.PreregisterUserRequest( - username=username, - organization=organization, - given_name=given_name, - family_name=family_name, - email=email, - attributes=attributes, - ), - response_type=core_models.PrincipalId, - request_timeout=request_timeout, - throwable_errors={ - "AuthenticationProviderNotFound": admin_errors.AuthenticationProviderNotFound, - "PreregisterUserPermissionDenied": admin_errors.PreregisterUserPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _AuthenticationProviderClientRaw: - def __init__(self, client: AuthenticationProviderClient) -> None: - def get(_: admin_models.AuthenticationProvider): ... - def list(_: admin_models.ListAuthenticationProvidersResponse): ... - def preregister_group(_: core_models.PrincipalId): ... - def preregister_user(_: core_models.PrincipalId): ... - - self.get = core.with_raw_response(get, client.get) - self.list = core.with_raw_response(list, client.list) - self.preregister_group = core.with_raw_response(preregister_group, client.preregister_group) - self.preregister_user = core.with_raw_response(preregister_user, client.preregister_user) - - -class _AuthenticationProviderClientStreaming: - def __init__(self, client: AuthenticationProviderClient) -> None: - def get(_: admin_models.AuthenticationProvider): ... - def list(_: admin_models.ListAuthenticationProvidersResponse): ... - def preregister_group(_: core_models.PrincipalId): ... - def preregister_user(_: core_models.PrincipalId): ... - - self.get = core.with_streaming_response(get, client.get) - self.list = core.with_streaming_response(list, client.list) - self.preregister_group = core.with_streaming_response( - preregister_group, client.preregister_group - ) - self.preregister_user = core.with_streaming_response( - preregister_user, client.preregister_user - ) - - -class AsyncAuthenticationProviderClient: - """ - The API client for the AuthenticationProvider Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AsyncAuthenticationProviderClientStreaming(self) - self.with_raw_response = _AsyncAuthenticationProviderClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - enrollment_rid: core_models.EnrollmentRid, - authentication_provider_rid: admin_models.AuthenticationProviderRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[admin_models.AuthenticationProvider]: - """ - Get the AuthenticationProvider with the specified rid. - :param enrollment_rid: - :type enrollment_rid: EnrollmentRid - :param authentication_provider_rid: - :type authentication_provider_rid: AuthenticationProviderRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[admin_models.AuthenticationProvider] - - :raises AuthenticationProviderNotFound: The given AuthenticationProvider could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/admin/enrollments/{enrollmentRid}/authenticationProviders/{authenticationProviderRid}", - query_params={ - "preview": preview, - }, - path_params={ - "enrollmentRid": enrollment_rid, - "authenticationProviderRid": authentication_provider_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=admin_models.AuthenticationProvider, - request_timeout=request_timeout, - throwable_errors={ - "AuthenticationProviderNotFound": admin_errors.AuthenticationProviderNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def list( - self, - enrollment_rid: core_models.EnrollmentRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[admin_models.ListAuthenticationProvidersResponse]: - """ - Lists all AuthenticationProviders. - - - :param enrollment_rid: - :type enrollment_rid: EnrollmentRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[admin_models.ListAuthenticationProvidersResponse] - - :raises EnrollmentNotFound: The given Enrollment could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/admin/enrollments/{enrollmentRid}/authenticationProviders", - query_params={ - "preview": preview, - }, - path_params={ - "enrollmentRid": enrollment_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=admin_models.ListAuthenticationProvidersResponse, - request_timeout=request_timeout, - throwable_errors={ - "EnrollmentNotFound": admin_errors.EnrollmentNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def preregister_group( - self, - enrollment_rid: core_models.EnrollmentRid, - authentication_provider_rid: admin_models.AuthenticationProviderRid, - *, - name: admin_models.GroupName, - organizations: typing.List[core_models.OrganizationRid], - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[core_models.PrincipalId]: - """ - Register a Group with a given name before any users with this group log in through this Authentication Provider. - Preregistered groups can be used anywhere other groups are used in the platform. - - :param enrollment_rid: - :type enrollment_rid: EnrollmentRid - :param authentication_provider_rid: - :type authentication_provider_rid: AuthenticationProviderRid - :param name: - :type name: GroupName - :param organizations: The RIDs of the Organizations that can view this group. - :type organizations: List[OrganizationRid] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[core_models.PrincipalId] - - :raises AuthenticationProviderNotFound: The given AuthenticationProvider could not be found. - :raises PreregisterGroupPermissionDenied: Could not preregisterGroup the AuthenticationProvider. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/admin/enrollments/{enrollmentRid}/authenticationProviders/{authenticationProviderRid}/preregisterGroup", - query_params={ - "preview": preview, - }, - path_params={ - "enrollmentRid": enrollment_rid, - "authenticationProviderRid": authentication_provider_rid, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=admin_models.PreregisterGroupRequest( - name=name, - organizations=organizations, - ), - response_type=core_models.PrincipalId, - request_timeout=request_timeout, - throwable_errors={ - "AuthenticationProviderNotFound": admin_errors.AuthenticationProviderNotFound, - "PreregisterGroupPermissionDenied": admin_errors.PreregisterGroupPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def preregister_user( - self, - enrollment_rid: core_models.EnrollmentRid, - authentication_provider_rid: admin_models.AuthenticationProviderRid, - *, - organization: core_models.OrganizationRid, - username: admin_models.UserUsername, - attributes: typing.Optional[ - typing.Dict[admin_models.AttributeName, admin_models.AttributeValues] - ] = None, - email: typing.Optional[str] = None, - family_name: typing.Optional[str] = None, - given_name: typing.Optional[str] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[core_models.PrincipalId]: - """ - Register a User with a given username before they log in to the platform for the first time through this - Authentication Provider. Preregistered users can be assigned to groups and roles prior to first login. - - :param enrollment_rid: - :type enrollment_rid: EnrollmentRid - :param authentication_provider_rid: - :type authentication_provider_rid: AuthenticationProviderRid - :param organization: The RID of the user's primary Organization. This may be changed when the user logs in for the first time depending on any configured Organization assignment rules. - :type organization: OrganizationRid - :param username: The new user's username. This must match one of the provider's supported username patterns. - :type username: UserUsername - :param attributes: - :type attributes: Optional[Dict[AttributeName, AttributeValues]] - :param email: - :type email: Optional[str] - :param family_name: - :type family_name: Optional[str] - :param given_name: - :type given_name: Optional[str] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[core_models.PrincipalId] - - :raises AuthenticationProviderNotFound: The given AuthenticationProvider could not be found. - :raises PreregisterUserPermissionDenied: Could not preregisterUser the AuthenticationProvider. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/admin/enrollments/{enrollmentRid}/authenticationProviders/{authenticationProviderRid}/preregisterUser", - query_params={ - "preview": preview, - }, - path_params={ - "enrollmentRid": enrollment_rid, - "authenticationProviderRid": authentication_provider_rid, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=admin_models.PreregisterUserRequest( - username=username, - organization=organization, - given_name=given_name, - family_name=family_name, - email=email, - attributes=attributes, - ), - response_type=core_models.PrincipalId, - request_timeout=request_timeout, - throwable_errors={ - "AuthenticationProviderNotFound": admin_errors.AuthenticationProviderNotFound, - "PreregisterUserPermissionDenied": admin_errors.PreregisterUserPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _AsyncAuthenticationProviderClientRaw: - def __init__(self, client: AsyncAuthenticationProviderClient) -> None: - def get(_: admin_models.AuthenticationProvider): ... - def list(_: admin_models.ListAuthenticationProvidersResponse): ... - def preregister_group(_: core_models.PrincipalId): ... - def preregister_user(_: core_models.PrincipalId): ... - - self.get = core.async_with_raw_response(get, client.get) - self.list = core.async_with_raw_response(list, client.list) - self.preregister_group = core.async_with_raw_response( - preregister_group, client.preregister_group - ) - self.preregister_user = core.async_with_raw_response( - preregister_user, client.preregister_user - ) - - -class _AsyncAuthenticationProviderClientStreaming: - def __init__(self, client: AsyncAuthenticationProviderClient) -> None: - def get(_: admin_models.AuthenticationProvider): ... - def list(_: admin_models.ListAuthenticationProvidersResponse): ... - def preregister_group(_: core_models.PrincipalId): ... - def preregister_user(_: core_models.PrincipalId): ... - - self.get = core.async_with_streaming_response(get, client.get) - self.list = core.async_with_streaming_response(list, client.list) - self.preregister_group = core.async_with_streaming_response( - preregister_group, client.preregister_group - ) - self.preregister_user = core.async_with_streaming_response( - preregister_user, client.preregister_user - ) diff --git a/foundry_sdk/v2/admin/enrollment.py b/foundry_sdk/v2/admin/enrollment.py deleted file mode 100644 index e2acb16b7..000000000 --- a/foundry_sdk/v2/admin/enrollment.py +++ /dev/null @@ -1,366 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing -from functools import cached_property - -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v2.admin import errors as admin_errors -from foundry_sdk.v2.admin import models as admin_models -from foundry_sdk.v2.core import models as core_models - - -class EnrollmentClient: - """ - The API client for the Enrollment Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _EnrollmentClientStreaming(self) - self.with_raw_response = _EnrollmentClientRaw(self) - - @cached_property - def EnrollmentRoleAssignment(self): - from foundry_sdk.v2.admin.enrollment_role_assignment import ( - EnrollmentRoleAssignmentClient, - ) # NOQA - - return EnrollmentRoleAssignmentClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @cached_property - def Host(self): - from foundry_sdk.v2.admin.host import HostClient - - return HostClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @cached_property - def AuthenticationProvider(self): - from foundry_sdk.v2.admin.authentication_provider import ( - AuthenticationProviderClient, - ) # NOQA - - return AuthenticationProviderClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - enrollment_rid: core_models.EnrollmentRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> admin_models.Enrollment: - """ - Get the Enrollment with the specified rid. - :param enrollment_rid: - :type enrollment_rid: EnrollmentRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: admin_models.Enrollment - - :raises EnrollmentNotFound: The given Enrollment could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/admin/enrollments/{enrollmentRid}", - query_params={ - "preview": preview, - }, - path_params={ - "enrollmentRid": enrollment_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=admin_models.Enrollment, - request_timeout=request_timeout, - throwable_errors={ - "EnrollmentNotFound": admin_errors.EnrollmentNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get_current( - self, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> admin_models.Enrollment: - """ - Returns the Enrollment associated with the current User's primary organization. - - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: admin_models.Enrollment - - :raises EnrollmentNotFound: The given Enrollment could not be found. - :raises GetCurrentEnrollmentPermissionDenied: Could not getCurrent the Enrollment. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/admin/enrollments/getCurrent", - query_params={ - "preview": preview, - }, - path_params={}, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=admin_models.Enrollment, - request_timeout=request_timeout, - throwable_errors={ - "EnrollmentNotFound": admin_errors.EnrollmentNotFound, - "GetCurrentEnrollmentPermissionDenied": admin_errors.GetCurrentEnrollmentPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _EnrollmentClientRaw: - def __init__(self, client: EnrollmentClient) -> None: - def get(_: admin_models.Enrollment): ... - def get_current(_: admin_models.Enrollment): ... - - self.get = core.with_raw_response(get, client.get) - self.get_current = core.with_raw_response(get_current, client.get_current) - - -class _EnrollmentClientStreaming: - def __init__(self, client: EnrollmentClient) -> None: - def get(_: admin_models.Enrollment): ... - def get_current(_: admin_models.Enrollment): ... - - self.get = core.with_streaming_response(get, client.get) - self.get_current = core.with_streaming_response(get_current, client.get_current) - - -class AsyncEnrollmentClient: - """ - The API client for the Enrollment Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AsyncEnrollmentClientStreaming(self) - self.with_raw_response = _AsyncEnrollmentClientRaw(self) - - @cached_property - def EnrollmentRoleAssignment(self): - from foundry_sdk.v2.admin.enrollment_role_assignment import ( - AsyncEnrollmentRoleAssignmentClient, - ) # NOQA - - return AsyncEnrollmentRoleAssignmentClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @cached_property - def Host(self): - from foundry_sdk.v2.admin.host import AsyncHostClient - - return AsyncHostClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @cached_property - def AuthenticationProvider(self): - from foundry_sdk.v2.admin.authentication_provider import ( - AsyncAuthenticationProviderClient, - ) # NOQA - - return AsyncAuthenticationProviderClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - enrollment_rid: core_models.EnrollmentRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[admin_models.Enrollment]: - """ - Get the Enrollment with the specified rid. - :param enrollment_rid: - :type enrollment_rid: EnrollmentRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[admin_models.Enrollment] - - :raises EnrollmentNotFound: The given Enrollment could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/admin/enrollments/{enrollmentRid}", - query_params={ - "preview": preview, - }, - path_params={ - "enrollmentRid": enrollment_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=admin_models.Enrollment, - request_timeout=request_timeout, - throwable_errors={ - "EnrollmentNotFound": admin_errors.EnrollmentNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get_current( - self, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[admin_models.Enrollment]: - """ - Returns the Enrollment associated with the current User's primary organization. - - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[admin_models.Enrollment] - - :raises EnrollmentNotFound: The given Enrollment could not be found. - :raises GetCurrentEnrollmentPermissionDenied: Could not getCurrent the Enrollment. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/admin/enrollments/getCurrent", - query_params={ - "preview": preview, - }, - path_params={}, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=admin_models.Enrollment, - request_timeout=request_timeout, - throwable_errors={ - "EnrollmentNotFound": admin_errors.EnrollmentNotFound, - "GetCurrentEnrollmentPermissionDenied": admin_errors.GetCurrentEnrollmentPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _AsyncEnrollmentClientRaw: - def __init__(self, client: AsyncEnrollmentClient) -> None: - def get(_: admin_models.Enrollment): ... - def get_current(_: admin_models.Enrollment): ... - - self.get = core.async_with_raw_response(get, client.get) - self.get_current = core.async_with_raw_response(get_current, client.get_current) - - -class _AsyncEnrollmentClientStreaming: - def __init__(self, client: AsyncEnrollmentClient) -> None: - def get(_: admin_models.Enrollment): ... - def get_current(_: admin_models.Enrollment): ... - - self.get = core.async_with_streaming_response(get, client.get) - self.get_current = core.async_with_streaming_response(get_current, client.get_current) diff --git a/foundry_sdk/v2/admin/enrollment_role_assignment.py b/foundry_sdk/v2/admin/enrollment_role_assignment.py deleted file mode 100644 index 483223e1c..000000000 --- a/foundry_sdk/v2/admin/enrollment_role_assignment.py +++ /dev/null @@ -1,451 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing - -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v2.admin import errors as admin_errors -from foundry_sdk.v2.admin import models as admin_models -from foundry_sdk.v2.core import models as core_models - - -class EnrollmentRoleAssignmentClient: - """ - The API client for the EnrollmentRoleAssignment Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _EnrollmentRoleAssignmentClientStreaming(self) - self.with_raw_response = _EnrollmentRoleAssignmentClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def add( - self, - enrollment_rid: core_models.EnrollmentRid, - *, - role_assignments: typing.List[core_models.RoleAssignmentUpdate], - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> None: - """ - Assign roles to principals for the given Enrollment. At most 100 role assignments can be added in a single request. - - :param enrollment_rid: - :type enrollment_rid: EnrollmentRid - :param role_assignments: - :type role_assignments: List[RoleAssignmentUpdate] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: None - - :raises AddEnrollmentRoleAssignmentsPermissionDenied: Could not add the EnrollmentRoleAssignment. - :raises EnrollmentNotFound: The given Enrollment could not be found. - :raises EnrollmentRoleNotFound: One of the provided role IDs was not found. - :raises PrincipalNotFound: A principal (User or Group) with the given PrincipalId could not be found - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/admin/enrollments/{enrollmentRid}/roleAssignments/add", - query_params={ - "preview": preview, - }, - path_params={ - "enrollmentRid": enrollment_rid, - }, - header_params={ - "Content-Type": "application/json", - }, - body=admin_models.AddEnrollmentRoleAssignmentsRequest( - role_assignments=role_assignments, - ), - response_type=None, - request_timeout=request_timeout, - throwable_errors={ - "AddEnrollmentRoleAssignmentsPermissionDenied": admin_errors.AddEnrollmentRoleAssignmentsPermissionDenied, - "EnrollmentNotFound": admin_errors.EnrollmentNotFound, - "EnrollmentRoleNotFound": admin_errors.EnrollmentRoleNotFound, - "PrincipalNotFound": admin_errors.PrincipalNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def list( - self, - enrollment_rid: core_models.EnrollmentRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> admin_models.ListEnrollmentRoleAssignmentsResponse: - """ - List all principals who are assigned a role for the given Enrollment. - - :param enrollment_rid: - :type enrollment_rid: EnrollmentRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: admin_models.ListEnrollmentRoleAssignmentsResponse - - :raises EnrollmentNotFound: The given Enrollment could not be found. - :raises ListEnrollmentRoleAssignmentsPermissionDenied: The provided token does not have permission to list assigned roles for this enrollment. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/admin/enrollments/{enrollmentRid}/roleAssignments", - query_params={ - "preview": preview, - }, - path_params={ - "enrollmentRid": enrollment_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=admin_models.ListEnrollmentRoleAssignmentsResponse, - request_timeout=request_timeout, - throwable_errors={ - "EnrollmentNotFound": admin_errors.EnrollmentNotFound, - "ListEnrollmentRoleAssignmentsPermissionDenied": admin_errors.ListEnrollmentRoleAssignmentsPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def remove( - self, - enrollment_rid: core_models.EnrollmentRid, - *, - role_assignments: typing.List[core_models.RoleAssignmentUpdate], - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> None: - """ - Remove roles from principals for the given Enrollment. At most 100 role assignments can be removed in a single request. - - :param enrollment_rid: - :type enrollment_rid: EnrollmentRid - :param role_assignments: - :type role_assignments: List[RoleAssignmentUpdate] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: None - - :raises EnrollmentNotFound: The given Enrollment could not be found. - :raises EnrollmentRoleNotFound: One of the provided role IDs was not found. - :raises PrincipalNotFound: A principal (User or Group) with the given PrincipalId could not be found - :raises RemoveEnrollmentRoleAssignmentsPermissionDenied: Could not remove the EnrollmentRoleAssignment. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/admin/enrollments/{enrollmentRid}/roleAssignments/remove", - query_params={ - "preview": preview, - }, - path_params={ - "enrollmentRid": enrollment_rid, - }, - header_params={ - "Content-Type": "application/json", - }, - body=admin_models.RemoveEnrollmentRoleAssignmentsRequest( - role_assignments=role_assignments, - ), - response_type=None, - request_timeout=request_timeout, - throwable_errors={ - "EnrollmentNotFound": admin_errors.EnrollmentNotFound, - "EnrollmentRoleNotFound": admin_errors.EnrollmentRoleNotFound, - "PrincipalNotFound": admin_errors.PrincipalNotFound, - "RemoveEnrollmentRoleAssignmentsPermissionDenied": admin_errors.RemoveEnrollmentRoleAssignmentsPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _EnrollmentRoleAssignmentClientRaw: - def __init__(self, client: EnrollmentRoleAssignmentClient) -> None: - def add(_: None): ... - def list(_: admin_models.ListEnrollmentRoleAssignmentsResponse): ... - def remove(_: None): ... - - self.add = core.with_raw_response(add, client.add) - self.list = core.with_raw_response(list, client.list) - self.remove = core.with_raw_response(remove, client.remove) - - -class _EnrollmentRoleAssignmentClientStreaming: - def __init__(self, client: EnrollmentRoleAssignmentClient) -> None: - def list(_: admin_models.ListEnrollmentRoleAssignmentsResponse): ... - - self.list = core.with_streaming_response(list, client.list) - - -class AsyncEnrollmentRoleAssignmentClient: - """ - The API client for the EnrollmentRoleAssignment Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AsyncEnrollmentRoleAssignmentClientStreaming(self) - self.with_raw_response = _AsyncEnrollmentRoleAssignmentClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def add( - self, - enrollment_rid: core_models.EnrollmentRid, - *, - role_assignments: typing.List[core_models.RoleAssignmentUpdate], - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[None]: - """ - Assign roles to principals for the given Enrollment. At most 100 role assignments can be added in a single request. - - :param enrollment_rid: - :type enrollment_rid: EnrollmentRid - :param role_assignments: - :type role_assignments: List[RoleAssignmentUpdate] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[None] - - :raises AddEnrollmentRoleAssignmentsPermissionDenied: Could not add the EnrollmentRoleAssignment. - :raises EnrollmentNotFound: The given Enrollment could not be found. - :raises EnrollmentRoleNotFound: One of the provided role IDs was not found. - :raises PrincipalNotFound: A principal (User or Group) with the given PrincipalId could not be found - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/admin/enrollments/{enrollmentRid}/roleAssignments/add", - query_params={ - "preview": preview, - }, - path_params={ - "enrollmentRid": enrollment_rid, - }, - header_params={ - "Content-Type": "application/json", - }, - body=admin_models.AddEnrollmentRoleAssignmentsRequest( - role_assignments=role_assignments, - ), - response_type=None, - request_timeout=request_timeout, - throwable_errors={ - "AddEnrollmentRoleAssignmentsPermissionDenied": admin_errors.AddEnrollmentRoleAssignmentsPermissionDenied, - "EnrollmentNotFound": admin_errors.EnrollmentNotFound, - "EnrollmentRoleNotFound": admin_errors.EnrollmentRoleNotFound, - "PrincipalNotFound": admin_errors.PrincipalNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def list( - self, - enrollment_rid: core_models.EnrollmentRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[admin_models.ListEnrollmentRoleAssignmentsResponse]: - """ - List all principals who are assigned a role for the given Enrollment. - - :param enrollment_rid: - :type enrollment_rid: EnrollmentRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[admin_models.ListEnrollmentRoleAssignmentsResponse] - - :raises EnrollmentNotFound: The given Enrollment could not be found. - :raises ListEnrollmentRoleAssignmentsPermissionDenied: The provided token does not have permission to list assigned roles for this enrollment. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/admin/enrollments/{enrollmentRid}/roleAssignments", - query_params={ - "preview": preview, - }, - path_params={ - "enrollmentRid": enrollment_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=admin_models.ListEnrollmentRoleAssignmentsResponse, - request_timeout=request_timeout, - throwable_errors={ - "EnrollmentNotFound": admin_errors.EnrollmentNotFound, - "ListEnrollmentRoleAssignmentsPermissionDenied": admin_errors.ListEnrollmentRoleAssignmentsPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def remove( - self, - enrollment_rid: core_models.EnrollmentRid, - *, - role_assignments: typing.List[core_models.RoleAssignmentUpdate], - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[None]: - """ - Remove roles from principals for the given Enrollment. At most 100 role assignments can be removed in a single request. - - :param enrollment_rid: - :type enrollment_rid: EnrollmentRid - :param role_assignments: - :type role_assignments: List[RoleAssignmentUpdate] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[None] - - :raises EnrollmentNotFound: The given Enrollment could not be found. - :raises EnrollmentRoleNotFound: One of the provided role IDs was not found. - :raises PrincipalNotFound: A principal (User or Group) with the given PrincipalId could not be found - :raises RemoveEnrollmentRoleAssignmentsPermissionDenied: Could not remove the EnrollmentRoleAssignment. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/admin/enrollments/{enrollmentRid}/roleAssignments/remove", - query_params={ - "preview": preview, - }, - path_params={ - "enrollmentRid": enrollment_rid, - }, - header_params={ - "Content-Type": "application/json", - }, - body=admin_models.RemoveEnrollmentRoleAssignmentsRequest( - role_assignments=role_assignments, - ), - response_type=None, - request_timeout=request_timeout, - throwable_errors={ - "EnrollmentNotFound": admin_errors.EnrollmentNotFound, - "EnrollmentRoleNotFound": admin_errors.EnrollmentRoleNotFound, - "PrincipalNotFound": admin_errors.PrincipalNotFound, - "RemoveEnrollmentRoleAssignmentsPermissionDenied": admin_errors.RemoveEnrollmentRoleAssignmentsPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _AsyncEnrollmentRoleAssignmentClientRaw: - def __init__(self, client: AsyncEnrollmentRoleAssignmentClient) -> None: - def add(_: None): ... - def list(_: admin_models.ListEnrollmentRoleAssignmentsResponse): ... - def remove(_: None): ... - - self.add = core.async_with_raw_response(add, client.add) - self.list = core.async_with_raw_response(list, client.list) - self.remove = core.async_with_raw_response(remove, client.remove) - - -class _AsyncEnrollmentRoleAssignmentClientStreaming: - def __init__(self, client: AsyncEnrollmentRoleAssignmentClient) -> None: - def list(_: admin_models.ListEnrollmentRoleAssignmentsResponse): ... - - self.list = core.async_with_streaming_response(list, client.list) diff --git a/foundry_sdk/v2/admin/errors.py b/foundry_sdk/v2/admin/errors.py deleted file mode 100644 index ff482838d..000000000 --- a/foundry_sdk/v2/admin/errors.py +++ /dev/null @@ -1,1101 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing -from dataclasses import dataclass - -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v2.admin import models as admin_models -from foundry_sdk.v2.core import models as core_models - - -class AddEnrollmentRoleAssignmentsPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not add the EnrollmentRoleAssignment.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - enrollmentRid: core_models.EnrollmentRid - - -@dataclass -class AddEnrollmentRoleAssignmentsPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["AddEnrollmentRoleAssignmentsPermissionDenied"] - parameters: AddEnrollmentRoleAssignmentsPermissionDeniedParameters - error_instance_id: str - - -class AddGroupMembersPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not add the GroupMember.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - groupId: core_models.GroupId - - -@dataclass -class AddGroupMembersPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["AddGroupMembersPermissionDenied"] - parameters: AddGroupMembersPermissionDeniedParameters - error_instance_id: str - - -class AddMarkingMembersPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not add the MarkingMember.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - markingId: core_models.MarkingId - - -@dataclass -class AddMarkingMembersPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["AddMarkingMembersPermissionDenied"] - parameters: AddMarkingMembersPermissionDeniedParameters - error_instance_id: str - - -class AddMarkingRoleAssignmentsPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not add the MarkingRoleAssignment.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - markingId: core_models.MarkingId - - -@dataclass -class AddMarkingRoleAssignmentsPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["AddMarkingRoleAssignmentsPermissionDenied"] - parameters: AddMarkingRoleAssignmentsPermissionDeniedParameters - error_instance_id: str - - -class AddOrganizationRoleAssignmentsPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not add the OrganizationRoleAssignment.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - organizationRid: core_models.OrganizationRid - - -@dataclass -class AddOrganizationRoleAssignmentsPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["AddOrganizationRoleAssignmentsPermissionDenied"] - parameters: AddOrganizationRoleAssignmentsPermissionDeniedParameters - error_instance_id: str - - -class AuthenticationProviderNotFoundParameters(typing_extensions.TypedDict): - """The given AuthenticationProvider could not be found.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - enrollmentRid: core_models.EnrollmentRid - authenticationProviderRid: admin_models.AuthenticationProviderRid - - -@dataclass -class AuthenticationProviderNotFound(errors.NotFoundError): - name: typing.Literal["AuthenticationProviderNotFound"] - parameters: AuthenticationProviderNotFoundParameters - error_instance_id: str - - -class CannotReplaceProviderInfoForPrincipalInProtectedRealmParameters(typing_extensions.TypedDict): - """Provider information for Principals in this Realm cannot be replaced.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - principalId: core_models.PrincipalId - realm: core_models.Realm - - -@dataclass -class CannotReplaceProviderInfoForPrincipalInProtectedRealm(errors.BadRequestError): - name: typing.Literal["CannotReplaceProviderInfoForPrincipalInProtectedRealm"] - parameters: CannotReplaceProviderInfoForPrincipalInProtectedRealmParameters - error_instance_id: str - - -class CreateGroupPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not create the Group.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class CreateGroupPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["CreateGroupPermissionDenied"] - parameters: CreateGroupPermissionDeniedParameters - error_instance_id: str - - -class CreateMarkingMissingInitialAdminRoleParameters(typing_extensions.TypedDict): - """At least one ADMIN role assignment must be provided when creating a marking.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class CreateMarkingMissingInitialAdminRole(errors.BadRequestError): - name: typing.Literal["CreateMarkingMissingInitialAdminRole"] - parameters: CreateMarkingMissingInitialAdminRoleParameters - error_instance_id: str - - -class CreateMarkingPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not create the Marking.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class CreateMarkingPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["CreateMarkingPermissionDenied"] - parameters: CreateMarkingPermissionDeniedParameters - error_instance_id: str - - -class CreateOrganizationMissingInitialAdminRoleParameters(typing_extensions.TypedDict): - """At least one organization:administrator role grant must be provided when creating a organization.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class CreateOrganizationMissingInitialAdminRole(errors.BadRequestError): - name: typing.Literal["CreateOrganizationMissingInitialAdminRole"] - parameters: CreateOrganizationMissingInitialAdminRoleParameters - error_instance_id: str - - -class CreateOrganizationPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not create the Organization.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class CreateOrganizationPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["CreateOrganizationPermissionDenied"] - parameters: CreateOrganizationPermissionDeniedParameters - error_instance_id: str - - -class DeleteGroupPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not delete the Group.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - groupId: core_models.GroupId - - -@dataclass -class DeleteGroupPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["DeleteGroupPermissionDenied"] - parameters: DeleteGroupPermissionDeniedParameters - error_instance_id: str - - -class DeleteUserPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not delete the User.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - userId: core_models.UserId - - -@dataclass -class DeleteUserPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["DeleteUserPermissionDenied"] - parameters: DeleteUserPermissionDeniedParameters - error_instance_id: str - - -class EnrollmentNotFoundParameters(typing_extensions.TypedDict): - """The given Enrollment could not be found.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - enrollmentRid: core_models.EnrollmentRid - - -@dataclass -class EnrollmentNotFound(errors.NotFoundError): - name: typing.Literal["EnrollmentNotFound"] - parameters: EnrollmentNotFoundParameters - error_instance_id: str - - -class EnrollmentRoleNotFoundParameters(typing_extensions.TypedDict): - """One of the provided role IDs was not found.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class EnrollmentRoleNotFound(errors.NotFoundError): - name: typing.Literal["EnrollmentRoleNotFound"] - parameters: EnrollmentRoleNotFoundParameters - error_instance_id: str - - -class GetCurrentEnrollmentPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not getCurrent the Enrollment.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class GetCurrentEnrollmentPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["GetCurrentEnrollmentPermissionDenied"] - parameters: GetCurrentEnrollmentPermissionDeniedParameters - error_instance_id: str - - -class GetCurrentUserPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not getCurrent the User.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class GetCurrentUserPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["GetCurrentUserPermissionDenied"] - parameters: GetCurrentUserPermissionDeniedParameters - error_instance_id: str - - -class GetGroupProviderInfoPermissionDeniedParameters(typing_extensions.TypedDict): - """The provided token does not have permission to view the provider information for the given group.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - groupId: core_models.GroupId - - -@dataclass -class GetGroupProviderInfoPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["GetGroupProviderInfoPermissionDenied"] - parameters: GetGroupProviderInfoPermissionDeniedParameters - error_instance_id: str - - -class GetMarkingCategoryPermissionDeniedParameters(typing_extensions.TypedDict): - """The provided token does not have permission to view the marking category.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - markingCategoryId: admin_models.MarkingCategoryId - - -@dataclass -class GetMarkingCategoryPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["GetMarkingCategoryPermissionDenied"] - parameters: GetMarkingCategoryPermissionDeniedParameters - error_instance_id: str - - -class GetMarkingPermissionDeniedParameters(typing_extensions.TypedDict): - """The provided token does not have permission to view the marking.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - markingId: core_models.MarkingId - - -@dataclass -class GetMarkingPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["GetMarkingPermissionDenied"] - parameters: GetMarkingPermissionDeniedParameters - error_instance_id: str - - -class GetMarkingsUserPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not getMarkings the User.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - userId: core_models.UserId - - -@dataclass -class GetMarkingsUserPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["GetMarkingsUserPermissionDenied"] - parameters: GetMarkingsUserPermissionDeniedParameters - error_instance_id: str - - -class GetProfilePictureOfUserPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not profilePicture the User.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - userId: core_models.UserId - - -@dataclass -class GetProfilePictureOfUserPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["GetProfilePictureOfUserPermissionDenied"] - parameters: GetProfilePictureOfUserPermissionDeniedParameters - error_instance_id: str - - -class GetUserProviderInfoPermissionDeniedParameters(typing_extensions.TypedDict): - """The provided token does not have permission to view the provider information for the given user.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - userId: core_models.UserId - - -@dataclass -class GetUserProviderInfoPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["GetUserProviderInfoPermissionDenied"] - parameters: GetUserProviderInfoPermissionDeniedParameters - error_instance_id: str - - -class GroupMembershipExpirationPolicyNotFoundParameters(typing_extensions.TypedDict): - """The given GroupMembershipExpirationPolicy could not be found.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - groupId: core_models.GroupId - - -@dataclass -class GroupMembershipExpirationPolicyNotFound(errors.NotFoundError): - name: typing.Literal["GroupMembershipExpirationPolicyNotFound"] - parameters: GroupMembershipExpirationPolicyNotFoundParameters - error_instance_id: str - - -class GroupNameAlreadyExistsParameters(typing_extensions.TypedDict): - """A group with this name already exists""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - groupName: str - - -@dataclass -class GroupNameAlreadyExists(errors.BadRequestError): - name: typing.Literal["GroupNameAlreadyExists"] - parameters: GroupNameAlreadyExistsParameters - error_instance_id: str - - -class GroupNotFoundParameters(typing_extensions.TypedDict): - """The given Group could not be found.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - groupId: core_models.GroupId - - -@dataclass -class GroupNotFound(errors.NotFoundError): - name: typing.Literal["GroupNotFound"] - parameters: GroupNotFoundParameters - error_instance_id: str - - -class GroupProviderInfoNotFoundParameters(typing_extensions.TypedDict): - """The given GroupProviderInfo could not be found.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - groupId: core_models.GroupId - - -@dataclass -class GroupProviderInfoNotFound(errors.NotFoundError): - name: typing.Literal["GroupProviderInfoNotFound"] - parameters: GroupProviderInfoNotFoundParameters - error_instance_id: str - - -class InvalidGroupMembershipExpirationParameters(typing_extensions.TypedDict): - """The member expiration you provided does not conform to the Group's requirements for member expirations.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - groupId: core_models.GroupId - earliestExpiration: core.AwareDatetime - maximumDuration: typing_extensions.NotRequired[core_models.DurationSeconds] - maximumValue: typing_extensions.NotRequired[admin_models.GroupMembershipExpiration] - - -@dataclass -class InvalidGroupMembershipExpiration(errors.BadRequestError): - name: typing.Literal["InvalidGroupMembershipExpiration"] - parameters: InvalidGroupMembershipExpirationParameters - error_instance_id: str - - -class InvalidGroupOrganizationsParameters(typing_extensions.TypedDict): - """At least one Organization RID must be provided for a group""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class InvalidGroupOrganizations(errors.BadRequestError): - name: typing.Literal["InvalidGroupOrganizations"] - parameters: InvalidGroupOrganizationsParameters - error_instance_id: str - - -class InvalidHostNameParameters(typing_extensions.TypedDict): - """The provided hostname must be a valid domain name. The only allowed characters are letters, numbers, periods, and hyphens.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - invalidHostName: str - - -@dataclass -class InvalidHostName(errors.BadRequestError): - name: typing.Literal["InvalidHostName"] - parameters: InvalidHostNameParameters - error_instance_id: str - - -class InvalidProfilePictureParameters(typing_extensions.TypedDict): - """The user's profile picture is not a valid image""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - userId: core_models.UserId - - -@dataclass -class InvalidProfilePicture(errors.BadRequestError): - name: typing.Literal["InvalidProfilePicture"] - parameters: InvalidProfilePictureParameters - error_instance_id: str - - -class ListAvailableRolesOrganizationPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not listAvailableRoles the Organization.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - organizationRid: core_models.OrganizationRid - - -@dataclass -class ListAvailableRolesOrganizationPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["ListAvailableRolesOrganizationPermissionDenied"] - parameters: ListAvailableRolesOrganizationPermissionDeniedParameters - error_instance_id: str - - -class ListEnrollmentRoleAssignmentsPermissionDeniedParameters(typing_extensions.TypedDict): - """The provided token does not have permission to list assigned roles for this enrollment.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - enrollmentRid: core_models.EnrollmentRid - - -@dataclass -class ListEnrollmentRoleAssignmentsPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["ListEnrollmentRoleAssignmentsPermissionDenied"] - parameters: ListEnrollmentRoleAssignmentsPermissionDeniedParameters - error_instance_id: str - - -class ListHostsPermissionDeniedParameters(typing_extensions.TypedDict): - """You do not have permission to list hosts for this enrollment""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - enrollmentRid: core_models.EnrollmentRid - - -@dataclass -class ListHostsPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["ListHostsPermissionDenied"] - parameters: ListHostsPermissionDeniedParameters - error_instance_id: str - - -class ListMarkingMembersPermissionDeniedParameters(typing_extensions.TypedDict): - """The provided token does not have permission to list the members of this marking.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - markingId: core_models.MarkingId - - -@dataclass -class ListMarkingMembersPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["ListMarkingMembersPermissionDenied"] - parameters: ListMarkingMembersPermissionDeniedParameters - error_instance_id: str - - -class ListMarkingRoleAssignmentsPermissionDeniedParameters(typing_extensions.TypedDict): - """The provided token does not have permission to list assigned roles for this marking.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - markingId: core_models.MarkingId - - -@dataclass -class ListMarkingRoleAssignmentsPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["ListMarkingRoleAssignmentsPermissionDenied"] - parameters: ListMarkingRoleAssignmentsPermissionDeniedParameters - error_instance_id: str - - -class ListOrganizationRoleAssignmentsPermissionDeniedParameters(typing_extensions.TypedDict): - """The provided token does not have permission to list assigned roles for this organization.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - organizationRid: core_models.OrganizationRid - - -@dataclass -class ListOrganizationRoleAssignmentsPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["ListOrganizationRoleAssignmentsPermissionDenied"] - parameters: ListOrganizationRoleAssignmentsPermissionDeniedParameters - error_instance_id: str - - -class MarkingCategoryNotFoundParameters(typing_extensions.TypedDict): - """The given MarkingCategory could not be found.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - markingCategoryId: admin_models.MarkingCategoryId - - -@dataclass -class MarkingCategoryNotFound(errors.NotFoundError): - name: typing.Literal["MarkingCategoryNotFound"] - parameters: MarkingCategoryNotFoundParameters - error_instance_id: str - - -class MarkingNameInCategoryAlreadyExistsParameters(typing_extensions.TypedDict): - """A marking with the same name already exists in the category.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - displayName: str - categoryId: admin_models.MarkingCategoryId - - -@dataclass -class MarkingNameInCategoryAlreadyExists(errors.BadRequestError): - name: typing.Literal["MarkingNameInCategoryAlreadyExists"] - parameters: MarkingNameInCategoryAlreadyExistsParameters - error_instance_id: str - - -class MarkingNameIsEmptyParameters(typing_extensions.TypedDict): - """The marking name is empty.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class MarkingNameIsEmpty(errors.BadRequestError): - name: typing.Literal["MarkingNameIsEmpty"] - parameters: MarkingNameIsEmptyParameters - error_instance_id: str - - -class MarkingNotFoundParameters(typing_extensions.TypedDict): - """The given Marking could not be found.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - markingId: core_models.MarkingId - - -@dataclass -class MarkingNotFound(errors.NotFoundError): - name: typing.Literal["MarkingNotFound"] - parameters: MarkingNotFoundParameters - error_instance_id: str - - -class OrganizationNameAlreadyExistsParameters(typing_extensions.TypedDict): - """An organization with the same name already exists.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - displayName: str - - -@dataclass -class OrganizationNameAlreadyExists(errors.BadRequestError): - name: typing.Literal["OrganizationNameAlreadyExists"] - parameters: OrganizationNameAlreadyExistsParameters - error_instance_id: str - - -class OrganizationNotFoundParameters(typing_extensions.TypedDict): - """The given Organization could not be found.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - organizationRid: core_models.OrganizationRid - - -@dataclass -class OrganizationNotFound(errors.NotFoundError): - name: typing.Literal["OrganizationNotFound"] - parameters: OrganizationNotFoundParameters - error_instance_id: str - - -class PreregisterGroupPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not preregisterGroup the AuthenticationProvider.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - enrollmentRid: core_models.EnrollmentRid - authenticationProviderRid: admin_models.AuthenticationProviderRid - - -@dataclass -class PreregisterGroupPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["PreregisterGroupPermissionDenied"] - parameters: PreregisterGroupPermissionDeniedParameters - error_instance_id: str - - -class PreregisterUserPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not preregisterUser the AuthenticationProvider.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - enrollmentRid: core_models.EnrollmentRid - authenticationProviderRid: admin_models.AuthenticationProviderRid - - -@dataclass -class PreregisterUserPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["PreregisterUserPermissionDenied"] - parameters: PreregisterUserPermissionDeniedParameters - error_instance_id: str - - -class PrincipalNotFoundParameters(typing_extensions.TypedDict): - """A principal (User or Group) with the given PrincipalId could not be found""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - principalId: core_models.PrincipalId - - -@dataclass -class PrincipalNotFound(errors.NotFoundError): - name: typing.Literal["PrincipalNotFound"] - parameters: PrincipalNotFoundParameters - error_instance_id: str - - -class ProfilePictureNotFoundParameters(typing_extensions.TypedDict): - """The user has not set a profile picture""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - userId: core_models.UserId - - -@dataclass -class ProfilePictureNotFound(errors.NotFoundError): - name: typing.Literal["ProfilePictureNotFound"] - parameters: ProfilePictureNotFoundParameters - error_instance_id: str - - -class ProfileServiceNotPresentParameters(typing_extensions.TypedDict): - """The Profile service is unexpectedly not present.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class ProfileServiceNotPresent(errors.InternalServerError): - name: typing.Literal["ProfileServiceNotPresent"] - parameters: ProfileServiceNotPresentParameters - error_instance_id: str - - -class RemoveEnrollmentRoleAssignmentsPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not remove the EnrollmentRoleAssignment.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - enrollmentRid: core_models.EnrollmentRid - - -@dataclass -class RemoveEnrollmentRoleAssignmentsPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["RemoveEnrollmentRoleAssignmentsPermissionDenied"] - parameters: RemoveEnrollmentRoleAssignmentsPermissionDeniedParameters - error_instance_id: str - - -class RemoveGroupMembersPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not remove the GroupMember.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - groupId: core_models.GroupId - - -@dataclass -class RemoveGroupMembersPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["RemoveGroupMembersPermissionDenied"] - parameters: RemoveGroupMembersPermissionDeniedParameters - error_instance_id: str - - -class RemoveMarkingMembersPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not remove the MarkingMember.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - markingId: core_models.MarkingId - - -@dataclass -class RemoveMarkingMembersPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["RemoveMarkingMembersPermissionDenied"] - parameters: RemoveMarkingMembersPermissionDeniedParameters - error_instance_id: str - - -class RemoveMarkingRoleAssignmentsPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not remove the MarkingRoleAssignment.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - markingId: core_models.MarkingId - - -@dataclass -class RemoveMarkingRoleAssignmentsPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["RemoveMarkingRoleAssignmentsPermissionDenied"] - parameters: RemoveMarkingRoleAssignmentsPermissionDeniedParameters - error_instance_id: str - - -class RemoveMarkingRoleAssignmentsRemoveAllAdministratorsNotAllowedParameters( - typing_extensions.TypedDict -): - """You cannot remove all administrators from a marking.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - markingId: core_models.MarkingId - currentAdministrators: typing.List[core_models.PrincipalId] - - -@dataclass -class RemoveMarkingRoleAssignmentsRemoveAllAdministratorsNotAllowed(errors.BadRequestError): - name: typing.Literal["RemoveMarkingRoleAssignmentsRemoveAllAdministratorsNotAllowed"] - parameters: RemoveMarkingRoleAssignmentsRemoveAllAdministratorsNotAllowedParameters - error_instance_id: str - - -class RemoveOrganizationRoleAssignmentsPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not remove the OrganizationRoleAssignment.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - organizationRid: core_models.OrganizationRid - - -@dataclass -class RemoveOrganizationRoleAssignmentsPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["RemoveOrganizationRoleAssignmentsPermissionDenied"] - parameters: RemoveOrganizationRoleAssignmentsPermissionDeniedParameters - error_instance_id: str - - -class ReplaceGroupMembershipExpirationPolicyPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not replace the GroupMembershipExpirationPolicy.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - groupId: core_models.GroupId - - -@dataclass -class ReplaceGroupMembershipExpirationPolicyPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["ReplaceGroupMembershipExpirationPolicyPermissionDenied"] - parameters: ReplaceGroupMembershipExpirationPolicyPermissionDeniedParameters - error_instance_id: str - - -class ReplaceGroupProviderInfoPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not replace the GroupProviderInfo.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - groupId: core_models.GroupId - - -@dataclass -class ReplaceGroupProviderInfoPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["ReplaceGroupProviderInfoPermissionDenied"] - parameters: ReplaceGroupProviderInfoPermissionDeniedParameters - error_instance_id: str - - -class ReplaceMarkingPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not replace the Marking.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - markingId: core_models.MarkingId - - -@dataclass -class ReplaceMarkingPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["ReplaceMarkingPermissionDenied"] - parameters: ReplaceMarkingPermissionDeniedParameters - error_instance_id: str - - -class ReplaceOrganizationPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not replace the Organization.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - organizationRid: core_models.OrganizationRid - - -@dataclass -class ReplaceOrganizationPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["ReplaceOrganizationPermissionDenied"] - parameters: ReplaceOrganizationPermissionDeniedParameters - error_instance_id: str - - -class ReplaceUserProviderInfoPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not replace the UserProviderInfo.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - userId: core_models.UserId - - -@dataclass -class ReplaceUserProviderInfoPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["ReplaceUserProviderInfoPermissionDenied"] - parameters: ReplaceUserProviderInfoPermissionDeniedParameters - error_instance_id: str - - -class RevokeAllTokensUserPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not revokeAllTokens the User.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - userId: core_models.UserId - - -@dataclass -class RevokeAllTokensUserPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["RevokeAllTokensUserPermissionDenied"] - parameters: RevokeAllTokensUserPermissionDeniedParameters - error_instance_id: str - - -class RoleNotFoundParameters(typing_extensions.TypedDict): - """The given Role could not be found.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - roleId: core_models.RoleId - - -@dataclass -class RoleNotFound(errors.NotFoundError): - name: typing.Literal["RoleNotFound"] - parameters: RoleNotFoundParameters - error_instance_id: str - - -class SearchGroupsPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not search the Group.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class SearchGroupsPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["SearchGroupsPermissionDenied"] - parameters: SearchGroupsPermissionDeniedParameters - error_instance_id: str - - -class SearchUsersPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not search the User.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class SearchUsersPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["SearchUsersPermissionDenied"] - parameters: SearchUsersPermissionDeniedParameters - error_instance_id: str - - -class UserDeletedParameters(typing_extensions.TypedDict): - """The user is deleted.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - principalId: core_models.UserId - - -@dataclass -class UserDeleted(errors.BadRequestError): - name: typing.Literal["UserDeleted"] - parameters: UserDeletedParameters - error_instance_id: str - - -class UserIsActiveParameters(typing_extensions.TypedDict): - """The user is an active user.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - principalId: core_models.UserId - - -@dataclass -class UserIsActive(errors.BadRequestError): - name: typing.Literal["UserIsActive"] - parameters: UserIsActiveParameters - error_instance_id: str - - -class UserNotFoundParameters(typing_extensions.TypedDict): - """The given User could not be found.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - userId: core_models.UserId - - -@dataclass -class UserNotFound(errors.NotFoundError): - name: typing.Literal["UserNotFound"] - parameters: UserNotFoundParameters - error_instance_id: str - - -class UserProviderInfoNotFoundParameters(typing_extensions.TypedDict): - """The given UserProviderInfo could not be found.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - userId: core_models.UserId - - -@dataclass -class UserProviderInfoNotFound(errors.NotFoundError): - name: typing.Literal["UserProviderInfoNotFound"] - parameters: UserProviderInfoNotFoundParameters - error_instance_id: str - - -__all__ = [ - "AddEnrollmentRoleAssignmentsPermissionDenied", - "AddGroupMembersPermissionDenied", - "AddMarkingMembersPermissionDenied", - "AddMarkingRoleAssignmentsPermissionDenied", - "AddOrganizationRoleAssignmentsPermissionDenied", - "AuthenticationProviderNotFound", - "CannotReplaceProviderInfoForPrincipalInProtectedRealm", - "CreateGroupPermissionDenied", - "CreateMarkingMissingInitialAdminRole", - "CreateMarkingPermissionDenied", - "CreateOrganizationMissingInitialAdminRole", - "CreateOrganizationPermissionDenied", - "DeleteGroupPermissionDenied", - "DeleteUserPermissionDenied", - "EnrollmentNotFound", - "EnrollmentRoleNotFound", - "GetCurrentEnrollmentPermissionDenied", - "GetCurrentUserPermissionDenied", - "GetGroupProviderInfoPermissionDenied", - "GetMarkingCategoryPermissionDenied", - "GetMarkingPermissionDenied", - "GetMarkingsUserPermissionDenied", - "GetProfilePictureOfUserPermissionDenied", - "GetUserProviderInfoPermissionDenied", - "GroupMembershipExpirationPolicyNotFound", - "GroupNameAlreadyExists", - "GroupNotFound", - "GroupProviderInfoNotFound", - "InvalidGroupMembershipExpiration", - "InvalidGroupOrganizations", - "InvalidHostName", - "InvalidProfilePicture", - "ListAvailableRolesOrganizationPermissionDenied", - "ListEnrollmentRoleAssignmentsPermissionDenied", - "ListHostsPermissionDenied", - "ListMarkingMembersPermissionDenied", - "ListMarkingRoleAssignmentsPermissionDenied", - "ListOrganizationRoleAssignmentsPermissionDenied", - "MarkingCategoryNotFound", - "MarkingNameInCategoryAlreadyExists", - "MarkingNameIsEmpty", - "MarkingNotFound", - "OrganizationNameAlreadyExists", - "OrganizationNotFound", - "PreregisterGroupPermissionDenied", - "PreregisterUserPermissionDenied", - "PrincipalNotFound", - "ProfilePictureNotFound", - "ProfileServiceNotPresent", - "RemoveEnrollmentRoleAssignmentsPermissionDenied", - "RemoveGroupMembersPermissionDenied", - "RemoveMarkingMembersPermissionDenied", - "RemoveMarkingRoleAssignmentsPermissionDenied", - "RemoveMarkingRoleAssignmentsRemoveAllAdministratorsNotAllowed", - "RemoveOrganizationRoleAssignmentsPermissionDenied", - "ReplaceGroupMembershipExpirationPolicyPermissionDenied", - "ReplaceGroupProviderInfoPermissionDenied", - "ReplaceMarkingPermissionDenied", - "ReplaceOrganizationPermissionDenied", - "ReplaceUserProviderInfoPermissionDenied", - "RevokeAllTokensUserPermissionDenied", - "RoleNotFound", - "SearchGroupsPermissionDenied", - "SearchUsersPermissionDenied", - "UserDeleted", - "UserIsActive", - "UserNotFound", - "UserProviderInfoNotFound", -] diff --git a/foundry_sdk/v2/admin/group.py b/foundry_sdk/v2/admin/group.py deleted file mode 100644 index 7ced8f588..000000000 --- a/foundry_sdk/v2/admin/group.py +++ /dev/null @@ -1,794 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing -from functools import cached_property - -import annotated_types -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v2.admin import errors as admin_errors -from foundry_sdk.v2.admin import models as admin_models -from foundry_sdk.v2.core import errors as core_errors -from foundry_sdk.v2.core import models as core_models - - -class GroupClient: - """ - The API client for the Group Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _GroupClientStreaming(self) - self.with_raw_response = _GroupClientRaw(self) - - @cached_property - def ProviderInfo(self): - from foundry_sdk.v2.admin.group_provider_info import GroupProviderInfoClient - - return GroupProviderInfoClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @cached_property - def GroupMember(self): - from foundry_sdk.v2.admin.group_member import GroupMemberClient - - return GroupMemberClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @cached_property - def MembershipExpirationPolicy(self): - from foundry_sdk.v2.admin.group_membership_expiration_policy import ( - GroupMembershipExpirationPolicyClient, - ) # NOQA - - return GroupMembershipExpirationPolicyClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def create( - self, - *, - attributes: typing.Dict[admin_models.AttributeName, admin_models.AttributeValues], - name: admin_models.GroupName, - organizations: typing.List[core_models.OrganizationRid], - description: typing.Optional[str] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> admin_models.Group: - """ - Creates a new Group. - :param attributes: A map of the Group's attributes. Attributes prefixed with "multipass:" are reserved for internal use by Foundry and are subject to change. - :type attributes: Dict[AttributeName, AttributeValues] - :param name: The name of the Group. - :type name: GroupName - :param organizations: The RIDs of the Organizations whose members can see this group. At least one Organization RID must be listed. - :type organizations: List[OrganizationRid] - :param description: A description of the Group. - :type description: Optional[str] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: admin_models.Group - - :raises CreateGroupPermissionDenied: Could not create the Group. - :raises GroupNameAlreadyExists: A group with this name already exists - :raises InvalidGroupOrganizations: At least one Organization RID must be provided for a group - :raises OrganizationNotFound: The given Organization could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/admin/groups", - query_params={}, - path_params={}, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=admin_models.CreateGroupRequest( - name=name, - organizations=organizations, - description=description, - attributes=attributes, - ), - response_type=admin_models.Group, - request_timeout=request_timeout, - throwable_errors={ - "CreateGroupPermissionDenied": admin_errors.CreateGroupPermissionDenied, - "GroupNameAlreadyExists": admin_errors.GroupNameAlreadyExists, - "InvalidGroupOrganizations": admin_errors.InvalidGroupOrganizations, - "OrganizationNotFound": admin_errors.OrganizationNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def delete( - self, - group_id: core_models.GroupId, - *, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> None: - """ - Delete the Group with the specified id. - :param group_id: - :type group_id: GroupId - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: None - - :raises DeleteGroupPermissionDenied: Could not delete the Group. - :raises GroupNotFound: The given Group could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="DELETE", - resource_path="/v2/admin/groups/{groupId}", - query_params={}, - path_params={ - "groupId": group_id, - }, - header_params={}, - body=None, - response_type=None, - request_timeout=request_timeout, - throwable_errors={ - "DeleteGroupPermissionDenied": admin_errors.DeleteGroupPermissionDenied, - "GroupNotFound": admin_errors.GroupNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - group_id: core_models.GroupId, - *, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> admin_models.Group: - """ - Get the Group with the specified id. - :param group_id: - :type group_id: GroupId - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: admin_models.Group - - :raises GroupNotFound: The given Group could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/admin/groups/{groupId}", - query_params={}, - path_params={ - "groupId": group_id, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=admin_models.Group, - request_timeout=request_timeout, - throwable_errors={ - "GroupNotFound": admin_errors.GroupNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get_batch( - self, - body: typing_extensions.Annotated[ - typing.List[admin_models.GetGroupsBatchRequestElement], - annotated_types.Len(min_length=1, max_length=500), - ], - *, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> admin_models.GetGroupsBatchResponse: - """ - Execute multiple get requests on Group. - - The maximum batch size for this endpoint is 500. - :param body: Body of the request - :type body: List[GetGroupsBatchRequestElement] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: admin_models.GetGroupsBatchResponse - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/admin/groups/getBatch", - query_params={}, - path_params={}, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=body, - response_type=admin_models.GetGroupsBatchResponse, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def list( - self, - *, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.ResourceIterator[admin_models.Group]: - """ - Lists all Groups. - - This is a paged endpoint. Each page may be smaller or larger than the requested page size. However, it is guaranteed that if there are more results available, the `nextPageToken` field will be populated. To get the next page, make the same request again, but set the value of the `pageToken` query parameter to be value of the `nextPageToken` value of the previous response. If there is no `nextPageToken` field in the response, you are on the last page. - :param page_size: The page size to use for the endpoint. - :type page_size: Optional[PageSize] - :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. - :type page_token: Optional[PageToken] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.ResourceIterator[admin_models.Group] - - :raises InvalidPageSize: The provided page size was zero or negative. Page sizes must be greater than zero. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/admin/groups", - query_params={ - "pageSize": page_size, - "pageToken": page_token, - }, - path_params={}, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=admin_models.ListGroupsResponse, - request_timeout=request_timeout, - throwable_errors={ - "InvalidPageSize": core_errors.InvalidPageSize, - }, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def search( - self, - *, - where: admin_models.GroupSearchFilter, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> admin_models.SearchGroupsResponse: - """ - Perform a case-insensitive prefix search for groups based on group name. - - :param where: - :type where: GroupSearchFilter - :param page_size: - :type page_size: Optional[PageSize] - :param page_token: - :type page_token: Optional[PageToken] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: admin_models.SearchGroupsResponse - - :raises InvalidPageSize: The provided page size was zero or negative. Page sizes must be greater than zero. - :raises SearchGroupsPermissionDenied: Could not search the Group. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/admin/groups/search", - query_params={}, - path_params={}, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=admin_models.SearchGroupsRequest( - where=where, - page_size=page_size, - page_token=page_token, - ), - response_type=admin_models.SearchGroupsResponse, - request_timeout=request_timeout, - throwable_errors={ - "InvalidPageSize": core_errors.InvalidPageSize, - "SearchGroupsPermissionDenied": admin_errors.SearchGroupsPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _GroupClientRaw: - def __init__(self, client: GroupClient) -> None: - def create(_: admin_models.Group): ... - def delete(_: None): ... - def get(_: admin_models.Group): ... - def get_batch(_: admin_models.GetGroupsBatchResponse): ... - def list(_: admin_models.ListGroupsResponse): ... - def search(_: admin_models.SearchGroupsResponse): ... - - self.create = core.with_raw_response(create, client.create) - self.delete = core.with_raw_response(delete, client.delete) - self.get = core.with_raw_response(get, client.get) - self.get_batch = core.with_raw_response(get_batch, client.get_batch) - self.list = core.with_raw_response(list, client.list) - self.search = core.with_raw_response(search, client.search) - - -class _GroupClientStreaming: - def __init__(self, client: GroupClient) -> None: - def create(_: admin_models.Group): ... - def get(_: admin_models.Group): ... - def get_batch(_: admin_models.GetGroupsBatchResponse): ... - def list(_: admin_models.ListGroupsResponse): ... - def search(_: admin_models.SearchGroupsResponse): ... - - self.create = core.with_streaming_response(create, client.create) - self.get = core.with_streaming_response(get, client.get) - self.get_batch = core.with_streaming_response(get_batch, client.get_batch) - self.list = core.with_streaming_response(list, client.list) - self.search = core.with_streaming_response(search, client.search) - - -class AsyncGroupClient: - """ - The API client for the Group Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AsyncGroupClientStreaming(self) - self.with_raw_response = _AsyncGroupClientRaw(self) - - @cached_property - def ProviderInfo(self): - from foundry_sdk.v2.admin.group_provider_info import AsyncGroupProviderInfoClient # NOQA - - return AsyncGroupProviderInfoClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @cached_property - def GroupMember(self): - from foundry_sdk.v2.admin.group_member import AsyncGroupMemberClient - - return AsyncGroupMemberClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @cached_property - def MembershipExpirationPolicy(self): - from foundry_sdk.v2.admin.group_membership_expiration_policy import ( - AsyncGroupMembershipExpirationPolicyClient, - ) # NOQA - - return AsyncGroupMembershipExpirationPolicyClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def create( - self, - *, - attributes: typing.Dict[admin_models.AttributeName, admin_models.AttributeValues], - name: admin_models.GroupName, - organizations: typing.List[core_models.OrganizationRid], - description: typing.Optional[str] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[admin_models.Group]: - """ - Creates a new Group. - :param attributes: A map of the Group's attributes. Attributes prefixed with "multipass:" are reserved for internal use by Foundry and are subject to change. - :type attributes: Dict[AttributeName, AttributeValues] - :param name: The name of the Group. - :type name: GroupName - :param organizations: The RIDs of the Organizations whose members can see this group. At least one Organization RID must be listed. - :type organizations: List[OrganizationRid] - :param description: A description of the Group. - :type description: Optional[str] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[admin_models.Group] - - :raises CreateGroupPermissionDenied: Could not create the Group. - :raises GroupNameAlreadyExists: A group with this name already exists - :raises InvalidGroupOrganizations: At least one Organization RID must be provided for a group - :raises OrganizationNotFound: The given Organization could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/admin/groups", - query_params={}, - path_params={}, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=admin_models.CreateGroupRequest( - name=name, - organizations=organizations, - description=description, - attributes=attributes, - ), - response_type=admin_models.Group, - request_timeout=request_timeout, - throwable_errors={ - "CreateGroupPermissionDenied": admin_errors.CreateGroupPermissionDenied, - "GroupNameAlreadyExists": admin_errors.GroupNameAlreadyExists, - "InvalidGroupOrganizations": admin_errors.InvalidGroupOrganizations, - "OrganizationNotFound": admin_errors.OrganizationNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def delete( - self, - group_id: core_models.GroupId, - *, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[None]: - """ - Delete the Group with the specified id. - :param group_id: - :type group_id: GroupId - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[None] - - :raises DeleteGroupPermissionDenied: Could not delete the Group. - :raises GroupNotFound: The given Group could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="DELETE", - resource_path="/v2/admin/groups/{groupId}", - query_params={}, - path_params={ - "groupId": group_id, - }, - header_params={}, - body=None, - response_type=None, - request_timeout=request_timeout, - throwable_errors={ - "DeleteGroupPermissionDenied": admin_errors.DeleteGroupPermissionDenied, - "GroupNotFound": admin_errors.GroupNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - group_id: core_models.GroupId, - *, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[admin_models.Group]: - """ - Get the Group with the specified id. - :param group_id: - :type group_id: GroupId - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[admin_models.Group] - - :raises GroupNotFound: The given Group could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/admin/groups/{groupId}", - query_params={}, - path_params={ - "groupId": group_id, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=admin_models.Group, - request_timeout=request_timeout, - throwable_errors={ - "GroupNotFound": admin_errors.GroupNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get_batch( - self, - body: typing_extensions.Annotated[ - typing.List[admin_models.GetGroupsBatchRequestElement], - annotated_types.Len(min_length=1, max_length=500), - ], - *, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[admin_models.GetGroupsBatchResponse]: - """ - Execute multiple get requests on Group. - - The maximum batch size for this endpoint is 500. - :param body: Body of the request - :type body: List[GetGroupsBatchRequestElement] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[admin_models.GetGroupsBatchResponse] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/admin/groups/getBatch", - query_params={}, - path_params={}, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=body, - response_type=admin_models.GetGroupsBatchResponse, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def list( - self, - *, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.AsyncResourceIterator[admin_models.Group]: - """ - Lists all Groups. - - This is a paged endpoint. Each page may be smaller or larger than the requested page size. However, it is guaranteed that if there are more results available, the `nextPageToken` field will be populated. To get the next page, make the same request again, but set the value of the `pageToken` query parameter to be value of the `nextPageToken` value of the previous response. If there is no `nextPageToken` field in the response, you are on the last page. - :param page_size: The page size to use for the endpoint. - :type page_size: Optional[PageSize] - :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. - :type page_token: Optional[PageToken] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.AsyncResourceIterator[admin_models.Group] - - :raises InvalidPageSize: The provided page size was zero or negative. Page sizes must be greater than zero. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/admin/groups", - query_params={ - "pageSize": page_size, - "pageToken": page_token, - }, - path_params={}, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=admin_models.ListGroupsResponse, - request_timeout=request_timeout, - throwable_errors={ - "InvalidPageSize": core_errors.InvalidPageSize, - }, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def search( - self, - *, - where: admin_models.GroupSearchFilter, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[admin_models.SearchGroupsResponse]: - """ - Perform a case-insensitive prefix search for groups based on group name. - - :param where: - :type where: GroupSearchFilter - :param page_size: - :type page_size: Optional[PageSize] - :param page_token: - :type page_token: Optional[PageToken] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[admin_models.SearchGroupsResponse] - - :raises InvalidPageSize: The provided page size was zero or negative. Page sizes must be greater than zero. - :raises SearchGroupsPermissionDenied: Could not search the Group. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/admin/groups/search", - query_params={}, - path_params={}, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=admin_models.SearchGroupsRequest( - where=where, - page_size=page_size, - page_token=page_token, - ), - response_type=admin_models.SearchGroupsResponse, - request_timeout=request_timeout, - throwable_errors={ - "InvalidPageSize": core_errors.InvalidPageSize, - "SearchGroupsPermissionDenied": admin_errors.SearchGroupsPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _AsyncGroupClientRaw: - def __init__(self, client: AsyncGroupClient) -> None: - def create(_: admin_models.Group): ... - def delete(_: None): ... - def get(_: admin_models.Group): ... - def get_batch(_: admin_models.GetGroupsBatchResponse): ... - def list(_: admin_models.ListGroupsResponse): ... - def search(_: admin_models.SearchGroupsResponse): ... - - self.create = core.async_with_raw_response(create, client.create) - self.delete = core.async_with_raw_response(delete, client.delete) - self.get = core.async_with_raw_response(get, client.get) - self.get_batch = core.async_with_raw_response(get_batch, client.get_batch) - self.list = core.async_with_raw_response(list, client.list) - self.search = core.async_with_raw_response(search, client.search) - - -class _AsyncGroupClientStreaming: - def __init__(self, client: AsyncGroupClient) -> None: - def create(_: admin_models.Group): ... - def get(_: admin_models.Group): ... - def get_batch(_: admin_models.GetGroupsBatchResponse): ... - def list(_: admin_models.ListGroupsResponse): ... - def search(_: admin_models.SearchGroupsResponse): ... - - self.create = core.async_with_streaming_response(create, client.create) - self.get = core.async_with_streaming_response(get, client.get) - self.get_batch = core.async_with_streaming_response(get_batch, client.get_batch) - self.list = core.async_with_streaming_response(list, client.list) - self.search = core.async_with_streaming_response(search, client.search) diff --git a/foundry_sdk/v2/admin/group_member.py b/foundry_sdk/v2/admin/group_member.py deleted file mode 100644 index becbae24a..000000000 --- a/foundry_sdk/v2/admin/group_member.py +++ /dev/null @@ -1,460 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing - -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v2.admin import errors as admin_errors -from foundry_sdk.v2.admin import models as admin_models -from foundry_sdk.v2.core import errors as core_errors -from foundry_sdk.v2.core import models as core_models - - -class GroupMemberClient: - """ - The API client for the GroupMember Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _GroupMemberClientStreaming(self) - self.with_raw_response = _GroupMemberClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def add( - self, - group_id: core_models.GroupId, - *, - principal_ids: typing.List[core_models.PrincipalId], - expiration: typing.Optional[admin_models.GroupMembershipExpiration] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> None: - """ - - :param group_id: - :type group_id: GroupId - :param principal_ids: - :type principal_ids: List[PrincipalId] - :param expiration: - :type expiration: Optional[GroupMembershipExpiration] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: None - - :raises AddGroupMembersPermissionDenied: Could not add the GroupMember. - :raises GroupNotFound: The given Group could not be found. - :raises InvalidGroupMembershipExpiration: The member expiration you provided does not conform to the Group's requirements for member expirations. - :raises PrincipalNotFound: A principal (User or Group) with the given PrincipalId could not be found - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/admin/groups/{groupId}/groupMembers/add", - query_params={}, - path_params={ - "groupId": group_id, - }, - header_params={ - "Content-Type": "application/json", - }, - body=admin_models.AddGroupMembersRequest( - principal_ids=principal_ids, - expiration=expiration, - ), - response_type=None, - request_timeout=request_timeout, - throwable_errors={ - "AddGroupMembersPermissionDenied": admin_errors.AddGroupMembersPermissionDenied, - "GroupNotFound": admin_errors.GroupNotFound, - "InvalidGroupMembershipExpiration": admin_errors.InvalidGroupMembershipExpiration, - "PrincipalNotFound": admin_errors.PrincipalNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def list( - self, - group_id: core_models.GroupId, - *, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - transitive: typing.Optional[bool] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.ResourceIterator[admin_models.GroupMember]: - """ - Lists all members (which can be a User or a Group) of a given Group. - - This is a paged endpoint. Each page may be smaller or larger than the requested page size. However, - it is guaranteed that if there are more results available, the `nextPageToken` field will be populated. - To get the next page, make the same request again, but set the value of the `pageToken` query parameter - to be value of the `nextPageToken` value of the previous response. If there is no `nextPageToken` field - in the response, you are on the last page. - - :param group_id: - :type group_id: GroupId - :param page_size: The page size to use for the endpoint. - :type page_size: Optional[PageSize] - :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. - :type page_token: Optional[PageToken] - :param transitive: When true, includes the transitive members of groups contained within this group. For example, say the Group has member Group A, and Group A has member User B. If `transitive=false` only Group A will be returned, but if `transitive=true` then Group A and User B will be returned. This will recursively resolve Groups through all layers of nesting. Defaults to false. - :type transitive: Optional[bool] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.ResourceIterator[admin_models.GroupMember] - - :raises GroupNotFound: The given Group could not be found. - :raises InvalidPageSize: The provided page size was zero or negative. Page sizes must be greater than zero. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/admin/groups/{groupId}/groupMembers", - query_params={ - "pageSize": page_size, - "pageToken": page_token, - "transitive": transitive, - }, - path_params={ - "groupId": group_id, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=admin_models.ListGroupMembersResponse, - request_timeout=request_timeout, - throwable_errors={ - "GroupNotFound": admin_errors.GroupNotFound, - "InvalidPageSize": core_errors.InvalidPageSize, - }, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def remove( - self, - group_id: core_models.GroupId, - *, - principal_ids: typing.List[core_models.PrincipalId], - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> None: - """ - - :param group_id: - :type group_id: GroupId - :param principal_ids: - :type principal_ids: List[PrincipalId] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: None - - :raises GroupNotFound: The given Group could not be found. - :raises PrincipalNotFound: A principal (User or Group) with the given PrincipalId could not be found - :raises RemoveGroupMembersPermissionDenied: Could not remove the GroupMember. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/admin/groups/{groupId}/groupMembers/remove", - query_params={}, - path_params={ - "groupId": group_id, - }, - header_params={ - "Content-Type": "application/json", - }, - body=admin_models.RemoveGroupMembersRequest( - principal_ids=principal_ids, - ), - response_type=None, - request_timeout=request_timeout, - throwable_errors={ - "GroupNotFound": admin_errors.GroupNotFound, - "PrincipalNotFound": admin_errors.PrincipalNotFound, - "RemoveGroupMembersPermissionDenied": admin_errors.RemoveGroupMembersPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _GroupMemberClientRaw: - def __init__(self, client: GroupMemberClient) -> None: - def add(_: None): ... - def list(_: admin_models.ListGroupMembersResponse): ... - def remove(_: None): ... - - self.add = core.with_raw_response(add, client.add) - self.list = core.with_raw_response(list, client.list) - self.remove = core.with_raw_response(remove, client.remove) - - -class _GroupMemberClientStreaming: - def __init__(self, client: GroupMemberClient) -> None: - def list(_: admin_models.ListGroupMembersResponse): ... - - self.list = core.with_streaming_response(list, client.list) - - -class AsyncGroupMemberClient: - """ - The API client for the GroupMember Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AsyncGroupMemberClientStreaming(self) - self.with_raw_response = _AsyncGroupMemberClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def add( - self, - group_id: core_models.GroupId, - *, - principal_ids: typing.List[core_models.PrincipalId], - expiration: typing.Optional[admin_models.GroupMembershipExpiration] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[None]: - """ - - :param group_id: - :type group_id: GroupId - :param principal_ids: - :type principal_ids: List[PrincipalId] - :param expiration: - :type expiration: Optional[GroupMembershipExpiration] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[None] - - :raises AddGroupMembersPermissionDenied: Could not add the GroupMember. - :raises GroupNotFound: The given Group could not be found. - :raises InvalidGroupMembershipExpiration: The member expiration you provided does not conform to the Group's requirements for member expirations. - :raises PrincipalNotFound: A principal (User or Group) with the given PrincipalId could not be found - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/admin/groups/{groupId}/groupMembers/add", - query_params={}, - path_params={ - "groupId": group_id, - }, - header_params={ - "Content-Type": "application/json", - }, - body=admin_models.AddGroupMembersRequest( - principal_ids=principal_ids, - expiration=expiration, - ), - response_type=None, - request_timeout=request_timeout, - throwable_errors={ - "AddGroupMembersPermissionDenied": admin_errors.AddGroupMembersPermissionDenied, - "GroupNotFound": admin_errors.GroupNotFound, - "InvalidGroupMembershipExpiration": admin_errors.InvalidGroupMembershipExpiration, - "PrincipalNotFound": admin_errors.PrincipalNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def list( - self, - group_id: core_models.GroupId, - *, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - transitive: typing.Optional[bool] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.AsyncResourceIterator[admin_models.GroupMember]: - """ - Lists all members (which can be a User or a Group) of a given Group. - - This is a paged endpoint. Each page may be smaller or larger than the requested page size. However, - it is guaranteed that if there are more results available, the `nextPageToken` field will be populated. - To get the next page, make the same request again, but set the value of the `pageToken` query parameter - to be value of the `nextPageToken` value of the previous response. If there is no `nextPageToken` field - in the response, you are on the last page. - - :param group_id: - :type group_id: GroupId - :param page_size: The page size to use for the endpoint. - :type page_size: Optional[PageSize] - :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. - :type page_token: Optional[PageToken] - :param transitive: When true, includes the transitive members of groups contained within this group. For example, say the Group has member Group A, and Group A has member User B. If `transitive=false` only Group A will be returned, but if `transitive=true` then Group A and User B will be returned. This will recursively resolve Groups through all layers of nesting. Defaults to false. - :type transitive: Optional[bool] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.AsyncResourceIterator[admin_models.GroupMember] - - :raises GroupNotFound: The given Group could not be found. - :raises InvalidPageSize: The provided page size was zero or negative. Page sizes must be greater than zero. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/admin/groups/{groupId}/groupMembers", - query_params={ - "pageSize": page_size, - "pageToken": page_token, - "transitive": transitive, - }, - path_params={ - "groupId": group_id, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=admin_models.ListGroupMembersResponse, - request_timeout=request_timeout, - throwable_errors={ - "GroupNotFound": admin_errors.GroupNotFound, - "InvalidPageSize": core_errors.InvalidPageSize, - }, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def remove( - self, - group_id: core_models.GroupId, - *, - principal_ids: typing.List[core_models.PrincipalId], - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[None]: - """ - - :param group_id: - :type group_id: GroupId - :param principal_ids: - :type principal_ids: List[PrincipalId] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[None] - - :raises GroupNotFound: The given Group could not be found. - :raises PrincipalNotFound: A principal (User or Group) with the given PrincipalId could not be found - :raises RemoveGroupMembersPermissionDenied: Could not remove the GroupMember. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/admin/groups/{groupId}/groupMembers/remove", - query_params={}, - path_params={ - "groupId": group_id, - }, - header_params={ - "Content-Type": "application/json", - }, - body=admin_models.RemoveGroupMembersRequest( - principal_ids=principal_ids, - ), - response_type=None, - request_timeout=request_timeout, - throwable_errors={ - "GroupNotFound": admin_errors.GroupNotFound, - "PrincipalNotFound": admin_errors.PrincipalNotFound, - "RemoveGroupMembersPermissionDenied": admin_errors.RemoveGroupMembersPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _AsyncGroupMemberClientRaw: - def __init__(self, client: AsyncGroupMemberClient) -> None: - def add(_: None): ... - def list(_: admin_models.ListGroupMembersResponse): ... - def remove(_: None): ... - - self.add = core.async_with_raw_response(add, client.add) - self.list = core.async_with_raw_response(list, client.list) - self.remove = core.async_with_raw_response(remove, client.remove) - - -class _AsyncGroupMemberClientStreaming: - def __init__(self, client: AsyncGroupMemberClient) -> None: - def list(_: admin_models.ListGroupMembersResponse): ... - - self.list = core.async_with_streaming_response(list, client.list) diff --git a/foundry_sdk/v2/admin/group_membership.py b/foundry_sdk/v2/admin/group_membership.py deleted file mode 100644 index 79262d494..000000000 --- a/foundry_sdk/v2/admin/group_membership.py +++ /dev/null @@ -1,236 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing - -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v2.admin import errors as admin_errors -from foundry_sdk.v2.admin import models as admin_models -from foundry_sdk.v2.core import errors as core_errors -from foundry_sdk.v2.core import models as core_models - - -class GroupMembershipClient: - """ - The API client for the GroupMembership Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _GroupMembershipClientStreaming(self) - self.with_raw_response = _GroupMembershipClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def list( - self, - user_id: core_models.UserId, - *, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - transitive: typing.Optional[bool] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.ResourceIterator[admin_models.GroupMembership]: - """ - Lists all Groups a given User is a member of. - - This is a paged endpoint. Each page may be smaller or larger than the requested page size. However, - it is guaranteed that if there are more results available, the `nextPageToken` field will be populated. - To get the next page, make the same request again, but set the value of the `pageToken` query parameter - to be value of the `nextPageToken` value of the previous response. If there is no `nextPageToken` field - in the response, you are on the last page. - - :param user_id: - :type user_id: UserId - :param page_size: The page size to use for the endpoint. - :type page_size: Optional[PageSize] - :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. - :type page_token: Optional[PageToken] - :param transitive: When true, includes the transitive memberships of the Groups the User is a member of. For example, say the User is a member of Group A, and Group A is a member of Group B. If `transitive=false` only Group A will be returned, but if `transitive=true` then Groups A and B will be returned. This will recursively resolve Groups through all layers of nesting. Defaults to false. - :type transitive: Optional[bool] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.ResourceIterator[admin_models.GroupMembership] - - :raises InvalidPageSize: The provided page size was zero or negative. Page sizes must be greater than zero. - :raises UserDeleted: The user is deleted. - :raises UserNotFound: The given User could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/admin/users/{userId}/groupMemberships", - query_params={ - "pageSize": page_size, - "pageToken": page_token, - "transitive": transitive, - }, - path_params={ - "userId": user_id, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=admin_models.ListGroupMembershipsResponse, - request_timeout=request_timeout, - throwable_errors={ - "InvalidPageSize": core_errors.InvalidPageSize, - "UserDeleted": admin_errors.UserDeleted, - "UserNotFound": admin_errors.UserNotFound, - }, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - -class _GroupMembershipClientRaw: - def __init__(self, client: GroupMembershipClient) -> None: - def list(_: admin_models.ListGroupMembershipsResponse): ... - - self.list = core.with_raw_response(list, client.list) - - -class _GroupMembershipClientStreaming: - def __init__(self, client: GroupMembershipClient) -> None: - def list(_: admin_models.ListGroupMembershipsResponse): ... - - self.list = core.with_streaming_response(list, client.list) - - -class AsyncGroupMembershipClient: - """ - The API client for the GroupMembership Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AsyncGroupMembershipClientStreaming(self) - self.with_raw_response = _AsyncGroupMembershipClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def list( - self, - user_id: core_models.UserId, - *, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - transitive: typing.Optional[bool] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.AsyncResourceIterator[admin_models.GroupMembership]: - """ - Lists all Groups a given User is a member of. - - This is a paged endpoint. Each page may be smaller or larger than the requested page size. However, - it is guaranteed that if there are more results available, the `nextPageToken` field will be populated. - To get the next page, make the same request again, but set the value of the `pageToken` query parameter - to be value of the `nextPageToken` value of the previous response. If there is no `nextPageToken` field - in the response, you are on the last page. - - :param user_id: - :type user_id: UserId - :param page_size: The page size to use for the endpoint. - :type page_size: Optional[PageSize] - :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. - :type page_token: Optional[PageToken] - :param transitive: When true, includes the transitive memberships of the Groups the User is a member of. For example, say the User is a member of Group A, and Group A is a member of Group B. If `transitive=false` only Group A will be returned, but if `transitive=true` then Groups A and B will be returned. This will recursively resolve Groups through all layers of nesting. Defaults to false. - :type transitive: Optional[bool] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.AsyncResourceIterator[admin_models.GroupMembership] - - :raises InvalidPageSize: The provided page size was zero or negative. Page sizes must be greater than zero. - :raises UserDeleted: The user is deleted. - :raises UserNotFound: The given User could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/admin/users/{userId}/groupMemberships", - query_params={ - "pageSize": page_size, - "pageToken": page_token, - "transitive": transitive, - }, - path_params={ - "userId": user_id, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=admin_models.ListGroupMembershipsResponse, - request_timeout=request_timeout, - throwable_errors={ - "InvalidPageSize": core_errors.InvalidPageSize, - "UserDeleted": admin_errors.UserDeleted, - "UserNotFound": admin_errors.UserNotFound, - }, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - -class _AsyncGroupMembershipClientRaw: - def __init__(self, client: AsyncGroupMembershipClient) -> None: - def list(_: admin_models.ListGroupMembershipsResponse): ... - - self.list = core.async_with_raw_response(list, client.list) - - -class _AsyncGroupMembershipClientStreaming: - def __init__(self, client: AsyncGroupMembershipClient) -> None: - def list(_: admin_models.ListGroupMembershipsResponse): ... - - self.list = core.async_with_streaming_response(list, client.list) diff --git a/foundry_sdk/v2/admin/group_membership_expiration_policy.py b/foundry_sdk/v2/admin/group_membership_expiration_policy.py deleted file mode 100644 index b94236027..000000000 --- a/foundry_sdk/v2/admin/group_membership_expiration_policy.py +++ /dev/null @@ -1,329 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing - -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v2.admin import errors as admin_errors -from foundry_sdk.v2.admin import models as admin_models -from foundry_sdk.v2.core import models as core_models - - -class GroupMembershipExpirationPolicyClient: - """ - The API client for the GroupMembershipExpirationPolicy Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _GroupMembershipExpirationPolicyClientStreaming(self) - self.with_raw_response = _GroupMembershipExpirationPolicyClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - group_id: core_models.GroupId, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> admin_models.GroupMembershipExpirationPolicy: - """ - Get the GroupMembershipExpirationPolicy. - :param group_id: - :type group_id: GroupId - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: admin_models.GroupMembershipExpirationPolicy - - :raises GroupMembershipExpirationPolicyNotFound: The given GroupMembershipExpirationPolicy could not be found. - :raises GroupNotFound: The given Group could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/admin/groups/{groupId}/membershipExpirationPolicy", - query_params={ - "preview": preview, - }, - path_params={ - "groupId": group_id, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=admin_models.GroupMembershipExpirationPolicy, - request_timeout=request_timeout, - throwable_errors={ - "GroupMembershipExpirationPolicyNotFound": admin_errors.GroupMembershipExpirationPolicyNotFound, - "GroupNotFound": admin_errors.GroupNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def replace( - self, - group_id: core_models.GroupId, - *, - maximum_duration: typing.Optional[core_models.DurationSeconds] = None, - maximum_value: typing.Optional[admin_models.GroupMembershipExpiration] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> admin_models.GroupMembershipExpirationPolicy: - """ - Replace the GroupMembershipExpirationPolicy. - :param group_id: - :type group_id: GroupId - :param maximum_duration: Members in this group must be added with expirations that are less than this duration in seconds into the future from the time they are added. - :type maximum_duration: Optional[DurationSeconds] - :param maximum_value: Members in this group must be added with expiration times that occur before this value. - :type maximum_value: Optional[GroupMembershipExpiration] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: admin_models.GroupMembershipExpirationPolicy - - :raises GroupNotFound: The given Group could not be found. - :raises ReplaceGroupMembershipExpirationPolicyPermissionDenied: Could not replace the GroupMembershipExpirationPolicy. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="PUT", - resource_path="/v2/admin/groups/{groupId}/membershipExpirationPolicy", - query_params={ - "preview": preview, - }, - path_params={ - "groupId": group_id, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=admin_models.ReplaceGroupMembershipExpirationPolicyRequest( - maximum_duration=maximum_duration, - maximum_value=maximum_value, - ), - response_type=admin_models.GroupMembershipExpirationPolicy, - request_timeout=request_timeout, - throwable_errors={ - "GroupNotFound": admin_errors.GroupNotFound, - "ReplaceGroupMembershipExpirationPolicyPermissionDenied": admin_errors.ReplaceGroupMembershipExpirationPolicyPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _GroupMembershipExpirationPolicyClientRaw: - def __init__(self, client: GroupMembershipExpirationPolicyClient) -> None: - def get(_: admin_models.GroupMembershipExpirationPolicy): ... - def replace(_: admin_models.GroupMembershipExpirationPolicy): ... - - self.get = core.with_raw_response(get, client.get) - self.replace = core.with_raw_response(replace, client.replace) - - -class _GroupMembershipExpirationPolicyClientStreaming: - def __init__(self, client: GroupMembershipExpirationPolicyClient) -> None: - def get(_: admin_models.GroupMembershipExpirationPolicy): ... - def replace(_: admin_models.GroupMembershipExpirationPolicy): ... - - self.get = core.with_streaming_response(get, client.get) - self.replace = core.with_streaming_response(replace, client.replace) - - -class AsyncGroupMembershipExpirationPolicyClient: - """ - The API client for the GroupMembershipExpirationPolicy Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AsyncGroupMembershipExpirationPolicyClientStreaming(self) - self.with_raw_response = _AsyncGroupMembershipExpirationPolicyClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - group_id: core_models.GroupId, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[admin_models.GroupMembershipExpirationPolicy]: - """ - Get the GroupMembershipExpirationPolicy. - :param group_id: - :type group_id: GroupId - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[admin_models.GroupMembershipExpirationPolicy] - - :raises GroupMembershipExpirationPolicyNotFound: The given GroupMembershipExpirationPolicy could not be found. - :raises GroupNotFound: The given Group could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/admin/groups/{groupId}/membershipExpirationPolicy", - query_params={ - "preview": preview, - }, - path_params={ - "groupId": group_id, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=admin_models.GroupMembershipExpirationPolicy, - request_timeout=request_timeout, - throwable_errors={ - "GroupMembershipExpirationPolicyNotFound": admin_errors.GroupMembershipExpirationPolicyNotFound, - "GroupNotFound": admin_errors.GroupNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def replace( - self, - group_id: core_models.GroupId, - *, - maximum_duration: typing.Optional[core_models.DurationSeconds] = None, - maximum_value: typing.Optional[admin_models.GroupMembershipExpiration] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[admin_models.GroupMembershipExpirationPolicy]: - """ - Replace the GroupMembershipExpirationPolicy. - :param group_id: - :type group_id: GroupId - :param maximum_duration: Members in this group must be added with expirations that are less than this duration in seconds into the future from the time they are added. - :type maximum_duration: Optional[DurationSeconds] - :param maximum_value: Members in this group must be added with expiration times that occur before this value. - :type maximum_value: Optional[GroupMembershipExpiration] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[admin_models.GroupMembershipExpirationPolicy] - - :raises GroupNotFound: The given Group could not be found. - :raises ReplaceGroupMembershipExpirationPolicyPermissionDenied: Could not replace the GroupMembershipExpirationPolicy. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="PUT", - resource_path="/v2/admin/groups/{groupId}/membershipExpirationPolicy", - query_params={ - "preview": preview, - }, - path_params={ - "groupId": group_id, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=admin_models.ReplaceGroupMembershipExpirationPolicyRequest( - maximum_duration=maximum_duration, - maximum_value=maximum_value, - ), - response_type=admin_models.GroupMembershipExpirationPolicy, - request_timeout=request_timeout, - throwable_errors={ - "GroupNotFound": admin_errors.GroupNotFound, - "ReplaceGroupMembershipExpirationPolicyPermissionDenied": admin_errors.ReplaceGroupMembershipExpirationPolicyPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _AsyncGroupMembershipExpirationPolicyClientRaw: - def __init__(self, client: AsyncGroupMembershipExpirationPolicyClient) -> None: - def get(_: admin_models.GroupMembershipExpirationPolicy): ... - def replace(_: admin_models.GroupMembershipExpirationPolicy): ... - - self.get = core.async_with_raw_response(get, client.get) - self.replace = core.async_with_raw_response(replace, client.replace) - - -class _AsyncGroupMembershipExpirationPolicyClientStreaming: - def __init__(self, client: AsyncGroupMembershipExpirationPolicyClient) -> None: - def get(_: admin_models.GroupMembershipExpirationPolicy): ... - def replace(_: admin_models.GroupMembershipExpirationPolicy): ... - - self.get = core.async_with_streaming_response(get, client.get) - self.replace = core.async_with_streaming_response(replace, client.replace) diff --git a/foundry_sdk/v2/admin/group_provider_info.py b/foundry_sdk/v2/admin/group_provider_info.py deleted file mode 100644 index a839476ae..000000000 --- a/foundry_sdk/v2/admin/group_provider_info.py +++ /dev/null @@ -1,337 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing - -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v2.admin import errors as admin_errors -from foundry_sdk.v2.admin import models as admin_models -from foundry_sdk.v2.core import models as core_models - - -class GroupProviderInfoClient: - """ - The API client for the GroupProviderInfo Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _GroupProviderInfoClientStreaming(self) - self.with_raw_response = _GroupProviderInfoClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - group_id: core_models.GroupId, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> admin_models.GroupProviderInfo: - """ - Get the GroupProviderInfo. - :param group_id: - :type group_id: GroupId - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: admin_models.GroupProviderInfo - - :raises GetGroupProviderInfoPermissionDenied: The provided token does not have permission to view the provider information for the given group. - :raises GroupNotFound: The given Group could not be found. - :raises GroupProviderInfoNotFound: The given GroupProviderInfo could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/admin/groups/{groupId}/providerInfo", - query_params={ - "preview": preview, - }, - path_params={ - "groupId": group_id, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=admin_models.GroupProviderInfo, - request_timeout=request_timeout, - throwable_errors={ - "GetGroupProviderInfoPermissionDenied": admin_errors.GetGroupProviderInfoPermissionDenied, - "GroupNotFound": admin_errors.GroupNotFound, - "GroupProviderInfoNotFound": admin_errors.GroupProviderInfoNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def replace( - self, - group_id: core_models.GroupId, - *, - provider_id: admin_models.ProviderId, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> admin_models.GroupProviderInfo: - """ - Replace the GroupProviderInfo. - :param group_id: - :type group_id: GroupId - :param provider_id: The ID of the Group in the external authentication provider. This value is determined by the authentication provider. At most one Group can have a given provider ID in a given Realm. - :type provider_id: ProviderId - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: admin_models.GroupProviderInfo - - :raises CannotReplaceProviderInfoForPrincipalInProtectedRealm: Provider information for Principals in this Realm cannot be replaced. - :raises GetGroupProviderInfoPermissionDenied: The provided token does not have permission to view the provider information for the given group. - :raises GroupNotFound: The given Group could not be found. - :raises GroupProviderInfoNotFound: The given GroupProviderInfo could not be found. - :raises ReplaceGroupProviderInfoPermissionDenied: Could not replace the GroupProviderInfo. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="PUT", - resource_path="/v2/admin/groups/{groupId}/providerInfo", - query_params={ - "preview": preview, - }, - path_params={ - "groupId": group_id, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=admin_models.ReplaceGroupProviderInfoRequest( - provider_id=provider_id, - ), - response_type=admin_models.GroupProviderInfo, - request_timeout=request_timeout, - throwable_errors={ - "CannotReplaceProviderInfoForPrincipalInProtectedRealm": admin_errors.CannotReplaceProviderInfoForPrincipalInProtectedRealm, - "GetGroupProviderInfoPermissionDenied": admin_errors.GetGroupProviderInfoPermissionDenied, - "GroupNotFound": admin_errors.GroupNotFound, - "GroupProviderInfoNotFound": admin_errors.GroupProviderInfoNotFound, - "ReplaceGroupProviderInfoPermissionDenied": admin_errors.ReplaceGroupProviderInfoPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _GroupProviderInfoClientRaw: - def __init__(self, client: GroupProviderInfoClient) -> None: - def get(_: admin_models.GroupProviderInfo): ... - def replace(_: admin_models.GroupProviderInfo): ... - - self.get = core.with_raw_response(get, client.get) - self.replace = core.with_raw_response(replace, client.replace) - - -class _GroupProviderInfoClientStreaming: - def __init__(self, client: GroupProviderInfoClient) -> None: - def get(_: admin_models.GroupProviderInfo): ... - def replace(_: admin_models.GroupProviderInfo): ... - - self.get = core.with_streaming_response(get, client.get) - self.replace = core.with_streaming_response(replace, client.replace) - - -class AsyncGroupProviderInfoClient: - """ - The API client for the GroupProviderInfo Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AsyncGroupProviderInfoClientStreaming(self) - self.with_raw_response = _AsyncGroupProviderInfoClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - group_id: core_models.GroupId, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[admin_models.GroupProviderInfo]: - """ - Get the GroupProviderInfo. - :param group_id: - :type group_id: GroupId - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[admin_models.GroupProviderInfo] - - :raises GetGroupProviderInfoPermissionDenied: The provided token does not have permission to view the provider information for the given group. - :raises GroupNotFound: The given Group could not be found. - :raises GroupProviderInfoNotFound: The given GroupProviderInfo could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/admin/groups/{groupId}/providerInfo", - query_params={ - "preview": preview, - }, - path_params={ - "groupId": group_id, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=admin_models.GroupProviderInfo, - request_timeout=request_timeout, - throwable_errors={ - "GetGroupProviderInfoPermissionDenied": admin_errors.GetGroupProviderInfoPermissionDenied, - "GroupNotFound": admin_errors.GroupNotFound, - "GroupProviderInfoNotFound": admin_errors.GroupProviderInfoNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def replace( - self, - group_id: core_models.GroupId, - *, - provider_id: admin_models.ProviderId, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[admin_models.GroupProviderInfo]: - """ - Replace the GroupProviderInfo. - :param group_id: - :type group_id: GroupId - :param provider_id: The ID of the Group in the external authentication provider. This value is determined by the authentication provider. At most one Group can have a given provider ID in a given Realm. - :type provider_id: ProviderId - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[admin_models.GroupProviderInfo] - - :raises CannotReplaceProviderInfoForPrincipalInProtectedRealm: Provider information for Principals in this Realm cannot be replaced. - :raises GetGroupProviderInfoPermissionDenied: The provided token does not have permission to view the provider information for the given group. - :raises GroupNotFound: The given Group could not be found. - :raises GroupProviderInfoNotFound: The given GroupProviderInfo could not be found. - :raises ReplaceGroupProviderInfoPermissionDenied: Could not replace the GroupProviderInfo. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="PUT", - resource_path="/v2/admin/groups/{groupId}/providerInfo", - query_params={ - "preview": preview, - }, - path_params={ - "groupId": group_id, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=admin_models.ReplaceGroupProviderInfoRequest( - provider_id=provider_id, - ), - response_type=admin_models.GroupProviderInfo, - request_timeout=request_timeout, - throwable_errors={ - "CannotReplaceProviderInfoForPrincipalInProtectedRealm": admin_errors.CannotReplaceProviderInfoForPrincipalInProtectedRealm, - "GetGroupProviderInfoPermissionDenied": admin_errors.GetGroupProviderInfoPermissionDenied, - "GroupNotFound": admin_errors.GroupNotFound, - "GroupProviderInfoNotFound": admin_errors.GroupProviderInfoNotFound, - "ReplaceGroupProviderInfoPermissionDenied": admin_errors.ReplaceGroupProviderInfoPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _AsyncGroupProviderInfoClientRaw: - def __init__(self, client: AsyncGroupProviderInfoClient) -> None: - def get(_: admin_models.GroupProviderInfo): ... - def replace(_: admin_models.GroupProviderInfo): ... - - self.get = core.async_with_raw_response(get, client.get) - self.replace = core.async_with_raw_response(replace, client.replace) - - -class _AsyncGroupProviderInfoClientStreaming: - def __init__(self, client: AsyncGroupProviderInfoClient) -> None: - def get(_: admin_models.GroupProviderInfo): ... - def replace(_: admin_models.GroupProviderInfo): ... - - self.get = core.async_with_streaming_response(get, client.get) - self.replace = core.async_with_streaming_response(replace, client.replace) diff --git a/foundry_sdk/v2/admin/host.py b/foundry_sdk/v2/admin/host.py deleted file mode 100644 index affd178cf..000000000 --- a/foundry_sdk/v2/admin/host.py +++ /dev/null @@ -1,226 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing - -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v2.admin import errors as admin_errors -from foundry_sdk.v2.admin import models as admin_models -from foundry_sdk.v2.core import errors as core_errors -from foundry_sdk.v2.core import models as core_models - - -class HostClient: - """ - The API client for the Host Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _HostClientStreaming(self) - self.with_raw_response = _HostClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def list( - self, - enrollment_rid: core_models.EnrollmentRid, - *, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.ResourceIterator[admin_models.Host]: - """ - Lists all Hosts. - - This is a paged endpoint. Each page may be smaller or larger than the requested page size. However, it is guaranteed that if there are more results available, the `nextPageToken` field will be populated. To get the next page, make the same request again, but set the value of the `pageToken` query parameter to be value of the `nextPageToken` value of the previous response. If there is no `nextPageToken` field in the response, you are on the last page. - :param enrollment_rid: - :type enrollment_rid: EnrollmentRid - :param page_size: The page size to use for the endpoint. - :type page_size: Optional[PageSize] - :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. - :type page_token: Optional[PageToken] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.ResourceIterator[admin_models.Host] - - :raises EnrollmentNotFound: The given Enrollment could not be found. - :raises InvalidPageSize: The provided page size was zero or negative. Page sizes must be greater than zero. - :raises ListHostsPermissionDenied: You do not have permission to list hosts for this enrollment - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/admin/enrollments/{enrollmentRid}/hosts", - query_params={ - "pageSize": page_size, - "pageToken": page_token, - "preview": preview, - }, - path_params={ - "enrollmentRid": enrollment_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=admin_models.ListHostsResponse, - request_timeout=request_timeout, - throwable_errors={ - "EnrollmentNotFound": admin_errors.EnrollmentNotFound, - "InvalidPageSize": core_errors.InvalidPageSize, - "ListHostsPermissionDenied": admin_errors.ListHostsPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - -class _HostClientRaw: - def __init__(self, client: HostClient) -> None: - def list(_: admin_models.ListHostsResponse): ... - - self.list = core.with_raw_response(list, client.list) - - -class _HostClientStreaming: - def __init__(self, client: HostClient) -> None: - def list(_: admin_models.ListHostsResponse): ... - - self.list = core.with_streaming_response(list, client.list) - - -class AsyncHostClient: - """ - The API client for the Host Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AsyncHostClientStreaming(self) - self.with_raw_response = _AsyncHostClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def list( - self, - enrollment_rid: core_models.EnrollmentRid, - *, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.AsyncResourceIterator[admin_models.Host]: - """ - Lists all Hosts. - - This is a paged endpoint. Each page may be smaller or larger than the requested page size. However, it is guaranteed that if there are more results available, the `nextPageToken` field will be populated. To get the next page, make the same request again, but set the value of the `pageToken` query parameter to be value of the `nextPageToken` value of the previous response. If there is no `nextPageToken` field in the response, you are on the last page. - :param enrollment_rid: - :type enrollment_rid: EnrollmentRid - :param page_size: The page size to use for the endpoint. - :type page_size: Optional[PageSize] - :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. - :type page_token: Optional[PageToken] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.AsyncResourceIterator[admin_models.Host] - - :raises EnrollmentNotFound: The given Enrollment could not be found. - :raises InvalidPageSize: The provided page size was zero or negative. Page sizes must be greater than zero. - :raises ListHostsPermissionDenied: You do not have permission to list hosts for this enrollment - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/admin/enrollments/{enrollmentRid}/hosts", - query_params={ - "pageSize": page_size, - "pageToken": page_token, - "preview": preview, - }, - path_params={ - "enrollmentRid": enrollment_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=admin_models.ListHostsResponse, - request_timeout=request_timeout, - throwable_errors={ - "EnrollmentNotFound": admin_errors.EnrollmentNotFound, - "InvalidPageSize": core_errors.InvalidPageSize, - "ListHostsPermissionDenied": admin_errors.ListHostsPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - -class _AsyncHostClientRaw: - def __init__(self, client: AsyncHostClient) -> None: - def list(_: admin_models.ListHostsResponse): ... - - self.list = core.async_with_raw_response(list, client.list) - - -class _AsyncHostClientStreaming: - def __init__(self, client: AsyncHostClient) -> None: - def list(_: admin_models.ListHostsResponse): ... - - self.list = core.async_with_streaming_response(list, client.list) diff --git a/foundry_sdk/v2/admin/marking.py b/foundry_sdk/v2/admin/marking.py deleted file mode 100644 index 0ec0bdebb..000000000 --- a/foundry_sdk/v2/admin/marking.py +++ /dev/null @@ -1,766 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing -from functools import cached_property - -import annotated_types -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v2.admin import errors as admin_errors -from foundry_sdk.v2.admin import models as admin_models -from foundry_sdk.v2.core import errors as core_errors -from foundry_sdk.v2.core import models as core_models - - -class MarkingClient: - """ - The API client for the Marking Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _MarkingClientStreaming(self) - self.with_raw_response = _MarkingClientRaw(self) - - @cached_property - def MarkingMember(self): - from foundry_sdk.v2.admin.marking_member import MarkingMemberClient - - return MarkingMemberClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @cached_property - def MarkingRoleAssignment(self): - from foundry_sdk.v2.admin.marking_role_assignment import MarkingRoleAssignmentClient # NOQA - - return MarkingRoleAssignmentClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def create( - self, - *, - category_id: admin_models.MarkingCategoryId, - initial_members: typing.List[core_models.PrincipalId], - initial_role_assignments: typing.List[admin_models.MarkingRoleUpdate], - name: admin_models.MarkingName, - description: typing.Optional[str] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> admin_models.Marking: - """ - Creates a new Marking. - :param category_id: - :type category_id: MarkingCategoryId - :param initial_members: Users and Groups that will be able to view resources protected by this Marking. This can be changed later through the MarkingMember operations. - :type initial_members: List[PrincipalId] - :param initial_role_assignments: The initial roles that will be assigned when the Marking is created. At least one ADMIN role must be provided. This can be changed later through the MarkingRoleAssignment operations. WARNING: If you do not include your own principal ID or the ID of a Group that you are a member of, you will create a Marking that you cannot administer. - :type initial_role_assignments: List[MarkingRoleUpdate] - :param name: - :type name: MarkingName - :param description: - :type description: Optional[str] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: admin_models.Marking - - :raises CreateMarkingMissingInitialAdminRole: At least one ADMIN role assignment must be provided when creating a marking. - :raises CreateMarkingPermissionDenied: Could not create the Marking. - :raises GetMarkingCategoryPermissionDenied: The provided token does not have permission to view the marking category. - :raises MarkingCategoryNotFound: The given MarkingCategory could not be found. - :raises MarkingNameInCategoryAlreadyExists: A marking with the same name already exists in the category. - :raises MarkingNameIsEmpty: The marking name is empty. - :raises PrincipalNotFound: A principal (User or Group) with the given PrincipalId could not be found - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/admin/markings", - query_params={ - "preview": preview, - }, - path_params={}, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=admin_models.CreateMarkingRequest( - initial_role_assignments=initial_role_assignments, - initial_members=initial_members, - name=name, - description=description, - category_id=category_id, - ), - response_type=admin_models.Marking, - request_timeout=request_timeout, - throwable_errors={ - "CreateMarkingMissingInitialAdminRole": admin_errors.CreateMarkingMissingInitialAdminRole, - "CreateMarkingPermissionDenied": admin_errors.CreateMarkingPermissionDenied, - "GetMarkingCategoryPermissionDenied": admin_errors.GetMarkingCategoryPermissionDenied, - "MarkingCategoryNotFound": admin_errors.MarkingCategoryNotFound, - "MarkingNameInCategoryAlreadyExists": admin_errors.MarkingNameInCategoryAlreadyExists, - "MarkingNameIsEmpty": admin_errors.MarkingNameIsEmpty, - "PrincipalNotFound": admin_errors.PrincipalNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - marking_id: core_models.MarkingId, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> admin_models.Marking: - """ - Get the Marking with the specified id. - :param marking_id: - :type marking_id: MarkingId - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: admin_models.Marking - - :raises GetMarkingPermissionDenied: The provided token does not have permission to view the marking. - :raises MarkingNotFound: The given Marking could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/admin/markings/{markingId}", - query_params={ - "preview": preview, - }, - path_params={ - "markingId": marking_id, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=admin_models.Marking, - request_timeout=request_timeout, - throwable_errors={ - "GetMarkingPermissionDenied": admin_errors.GetMarkingPermissionDenied, - "MarkingNotFound": admin_errors.MarkingNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get_batch( - self, - body: typing_extensions.Annotated[ - typing.List[admin_models.GetMarkingsBatchRequestElement], - annotated_types.Len(min_length=1, max_length=500), - ], - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> admin_models.GetMarkingsBatchResponse: - """ - Execute multiple get requests on Marking. - - The maximum batch size for this endpoint is 500. - :param body: Body of the request - :type body: List[GetMarkingsBatchRequestElement] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: admin_models.GetMarkingsBatchResponse - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/admin/markings/getBatch", - query_params={ - "preview": preview, - }, - path_params={}, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=body, - response_type=admin_models.GetMarkingsBatchResponse, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def list( - self, - *, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.ResourceIterator[admin_models.Marking]: - """ - Maximum page size 100. - :param page_size: The page size to use for the endpoint. - :type page_size: Optional[PageSize] - :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. - :type page_token: Optional[PageToken] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.ResourceIterator[admin_models.Marking] - - :raises InvalidPageSize: The provided page size was zero or negative. Page sizes must be greater than zero. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/admin/markings", - query_params={ - "pageSize": page_size, - "pageToken": page_token, - "preview": preview, - }, - path_params={}, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=admin_models.ListMarkingsResponse, - request_timeout=request_timeout, - throwable_errors={ - "InvalidPageSize": core_errors.InvalidPageSize, - }, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def replace( - self, - marking_id: core_models.MarkingId, - *, - name: admin_models.MarkingName, - description: typing.Optional[str] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> admin_models.Marking: - """ - Replace the Marking with the specified id. - :param marking_id: - :type marking_id: MarkingId - :param name: - :type name: MarkingName - :param description: - :type description: Optional[str] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: admin_models.Marking - - :raises GetMarkingCategoryPermissionDenied: The provided token does not have permission to view the marking category. - :raises GetMarkingPermissionDenied: The provided token does not have permission to view the marking. - :raises MarkingNameInCategoryAlreadyExists: A marking with the same name already exists in the category. - :raises MarkingNameIsEmpty: The marking name is empty. - :raises MarkingNotFound: The given Marking could not be found. - :raises ReplaceMarkingPermissionDenied: Could not replace the Marking. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="PUT", - resource_path="/v2/admin/markings/{markingId}", - query_params={ - "preview": preview, - }, - path_params={ - "markingId": marking_id, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=admin_models.ReplaceMarkingRequest( - name=name, - description=description, - ), - response_type=admin_models.Marking, - request_timeout=request_timeout, - throwable_errors={ - "GetMarkingCategoryPermissionDenied": admin_errors.GetMarkingCategoryPermissionDenied, - "GetMarkingPermissionDenied": admin_errors.GetMarkingPermissionDenied, - "MarkingNameInCategoryAlreadyExists": admin_errors.MarkingNameInCategoryAlreadyExists, - "MarkingNameIsEmpty": admin_errors.MarkingNameIsEmpty, - "MarkingNotFound": admin_errors.MarkingNotFound, - "ReplaceMarkingPermissionDenied": admin_errors.ReplaceMarkingPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _MarkingClientRaw: - def __init__(self, client: MarkingClient) -> None: - def create(_: admin_models.Marking): ... - def get(_: admin_models.Marking): ... - def get_batch(_: admin_models.GetMarkingsBatchResponse): ... - def list(_: admin_models.ListMarkingsResponse): ... - def replace(_: admin_models.Marking): ... - - self.create = core.with_raw_response(create, client.create) - self.get = core.with_raw_response(get, client.get) - self.get_batch = core.with_raw_response(get_batch, client.get_batch) - self.list = core.with_raw_response(list, client.list) - self.replace = core.with_raw_response(replace, client.replace) - - -class _MarkingClientStreaming: - def __init__(self, client: MarkingClient) -> None: - def create(_: admin_models.Marking): ... - def get(_: admin_models.Marking): ... - def get_batch(_: admin_models.GetMarkingsBatchResponse): ... - def list(_: admin_models.ListMarkingsResponse): ... - def replace(_: admin_models.Marking): ... - - self.create = core.with_streaming_response(create, client.create) - self.get = core.with_streaming_response(get, client.get) - self.get_batch = core.with_streaming_response(get_batch, client.get_batch) - self.list = core.with_streaming_response(list, client.list) - self.replace = core.with_streaming_response(replace, client.replace) - - -class AsyncMarkingClient: - """ - The API client for the Marking Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AsyncMarkingClientStreaming(self) - self.with_raw_response = _AsyncMarkingClientRaw(self) - - @cached_property - def MarkingMember(self): - from foundry_sdk.v2.admin.marking_member import AsyncMarkingMemberClient - - return AsyncMarkingMemberClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @cached_property - def MarkingRoleAssignment(self): - from foundry_sdk.v2.admin.marking_role_assignment import ( - AsyncMarkingRoleAssignmentClient, - ) # NOQA - - return AsyncMarkingRoleAssignmentClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def create( - self, - *, - category_id: admin_models.MarkingCategoryId, - initial_members: typing.List[core_models.PrincipalId], - initial_role_assignments: typing.List[admin_models.MarkingRoleUpdate], - name: admin_models.MarkingName, - description: typing.Optional[str] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[admin_models.Marking]: - """ - Creates a new Marking. - :param category_id: - :type category_id: MarkingCategoryId - :param initial_members: Users and Groups that will be able to view resources protected by this Marking. This can be changed later through the MarkingMember operations. - :type initial_members: List[PrincipalId] - :param initial_role_assignments: The initial roles that will be assigned when the Marking is created. At least one ADMIN role must be provided. This can be changed later through the MarkingRoleAssignment operations. WARNING: If you do not include your own principal ID or the ID of a Group that you are a member of, you will create a Marking that you cannot administer. - :type initial_role_assignments: List[MarkingRoleUpdate] - :param name: - :type name: MarkingName - :param description: - :type description: Optional[str] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[admin_models.Marking] - - :raises CreateMarkingMissingInitialAdminRole: At least one ADMIN role assignment must be provided when creating a marking. - :raises CreateMarkingPermissionDenied: Could not create the Marking. - :raises GetMarkingCategoryPermissionDenied: The provided token does not have permission to view the marking category. - :raises MarkingCategoryNotFound: The given MarkingCategory could not be found. - :raises MarkingNameInCategoryAlreadyExists: A marking with the same name already exists in the category. - :raises MarkingNameIsEmpty: The marking name is empty. - :raises PrincipalNotFound: A principal (User or Group) with the given PrincipalId could not be found - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/admin/markings", - query_params={ - "preview": preview, - }, - path_params={}, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=admin_models.CreateMarkingRequest( - initial_role_assignments=initial_role_assignments, - initial_members=initial_members, - name=name, - description=description, - category_id=category_id, - ), - response_type=admin_models.Marking, - request_timeout=request_timeout, - throwable_errors={ - "CreateMarkingMissingInitialAdminRole": admin_errors.CreateMarkingMissingInitialAdminRole, - "CreateMarkingPermissionDenied": admin_errors.CreateMarkingPermissionDenied, - "GetMarkingCategoryPermissionDenied": admin_errors.GetMarkingCategoryPermissionDenied, - "MarkingCategoryNotFound": admin_errors.MarkingCategoryNotFound, - "MarkingNameInCategoryAlreadyExists": admin_errors.MarkingNameInCategoryAlreadyExists, - "MarkingNameIsEmpty": admin_errors.MarkingNameIsEmpty, - "PrincipalNotFound": admin_errors.PrincipalNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - marking_id: core_models.MarkingId, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[admin_models.Marking]: - """ - Get the Marking with the specified id. - :param marking_id: - :type marking_id: MarkingId - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[admin_models.Marking] - - :raises GetMarkingPermissionDenied: The provided token does not have permission to view the marking. - :raises MarkingNotFound: The given Marking could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/admin/markings/{markingId}", - query_params={ - "preview": preview, - }, - path_params={ - "markingId": marking_id, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=admin_models.Marking, - request_timeout=request_timeout, - throwable_errors={ - "GetMarkingPermissionDenied": admin_errors.GetMarkingPermissionDenied, - "MarkingNotFound": admin_errors.MarkingNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get_batch( - self, - body: typing_extensions.Annotated[ - typing.List[admin_models.GetMarkingsBatchRequestElement], - annotated_types.Len(min_length=1, max_length=500), - ], - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[admin_models.GetMarkingsBatchResponse]: - """ - Execute multiple get requests on Marking. - - The maximum batch size for this endpoint is 500. - :param body: Body of the request - :type body: List[GetMarkingsBatchRequestElement] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[admin_models.GetMarkingsBatchResponse] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/admin/markings/getBatch", - query_params={ - "preview": preview, - }, - path_params={}, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=body, - response_type=admin_models.GetMarkingsBatchResponse, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def list( - self, - *, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.AsyncResourceIterator[admin_models.Marking]: - """ - Maximum page size 100. - :param page_size: The page size to use for the endpoint. - :type page_size: Optional[PageSize] - :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. - :type page_token: Optional[PageToken] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.AsyncResourceIterator[admin_models.Marking] - - :raises InvalidPageSize: The provided page size was zero or negative. Page sizes must be greater than zero. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/admin/markings", - query_params={ - "pageSize": page_size, - "pageToken": page_token, - "preview": preview, - }, - path_params={}, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=admin_models.ListMarkingsResponse, - request_timeout=request_timeout, - throwable_errors={ - "InvalidPageSize": core_errors.InvalidPageSize, - }, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def replace( - self, - marking_id: core_models.MarkingId, - *, - name: admin_models.MarkingName, - description: typing.Optional[str] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[admin_models.Marking]: - """ - Replace the Marking with the specified id. - :param marking_id: - :type marking_id: MarkingId - :param name: - :type name: MarkingName - :param description: - :type description: Optional[str] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[admin_models.Marking] - - :raises GetMarkingCategoryPermissionDenied: The provided token does not have permission to view the marking category. - :raises GetMarkingPermissionDenied: The provided token does not have permission to view the marking. - :raises MarkingNameInCategoryAlreadyExists: A marking with the same name already exists in the category. - :raises MarkingNameIsEmpty: The marking name is empty. - :raises MarkingNotFound: The given Marking could not be found. - :raises ReplaceMarkingPermissionDenied: Could not replace the Marking. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="PUT", - resource_path="/v2/admin/markings/{markingId}", - query_params={ - "preview": preview, - }, - path_params={ - "markingId": marking_id, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=admin_models.ReplaceMarkingRequest( - name=name, - description=description, - ), - response_type=admin_models.Marking, - request_timeout=request_timeout, - throwable_errors={ - "GetMarkingCategoryPermissionDenied": admin_errors.GetMarkingCategoryPermissionDenied, - "GetMarkingPermissionDenied": admin_errors.GetMarkingPermissionDenied, - "MarkingNameInCategoryAlreadyExists": admin_errors.MarkingNameInCategoryAlreadyExists, - "MarkingNameIsEmpty": admin_errors.MarkingNameIsEmpty, - "MarkingNotFound": admin_errors.MarkingNotFound, - "ReplaceMarkingPermissionDenied": admin_errors.ReplaceMarkingPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _AsyncMarkingClientRaw: - def __init__(self, client: AsyncMarkingClient) -> None: - def create(_: admin_models.Marking): ... - def get(_: admin_models.Marking): ... - def get_batch(_: admin_models.GetMarkingsBatchResponse): ... - def list(_: admin_models.ListMarkingsResponse): ... - def replace(_: admin_models.Marking): ... - - self.create = core.async_with_raw_response(create, client.create) - self.get = core.async_with_raw_response(get, client.get) - self.get_batch = core.async_with_raw_response(get_batch, client.get_batch) - self.list = core.async_with_raw_response(list, client.list) - self.replace = core.async_with_raw_response(replace, client.replace) - - -class _AsyncMarkingClientStreaming: - def __init__(self, client: AsyncMarkingClient) -> None: - def create(_: admin_models.Marking): ... - def get(_: admin_models.Marking): ... - def get_batch(_: admin_models.GetMarkingsBatchResponse): ... - def list(_: admin_models.ListMarkingsResponse): ... - def replace(_: admin_models.Marking): ... - - self.create = core.async_with_streaming_response(create, client.create) - self.get = core.async_with_streaming_response(get, client.get) - self.get_batch = core.async_with_streaming_response(get_batch, client.get_batch) - self.list = core.async_with_streaming_response(list, client.list) - self.replace = core.async_with_streaming_response(replace, client.replace) diff --git a/foundry_sdk/v2/admin/marking_category.py b/foundry_sdk/v2/admin/marking_category.py deleted file mode 100644 index 827357142..000000000 --- a/foundry_sdk/v2/admin/marking_category.py +++ /dev/null @@ -1,312 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing - -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v2.admin import errors as admin_errors -from foundry_sdk.v2.admin import models as admin_models -from foundry_sdk.v2.core import errors as core_errors -from foundry_sdk.v2.core import models as core_models - - -class MarkingCategoryClient: - """ - The API client for the MarkingCategory Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _MarkingCategoryClientStreaming(self) - self.with_raw_response = _MarkingCategoryClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - marking_category_id: admin_models.MarkingCategoryId, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> admin_models.MarkingCategory: - """ - Get the MarkingCategory with the specified id. - :param marking_category_id: - :type marking_category_id: MarkingCategoryId - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: admin_models.MarkingCategory - - :raises GetMarkingCategoryPermissionDenied: The provided token does not have permission to view the marking category. - :raises MarkingCategoryNotFound: The given MarkingCategory could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/admin/markingCategories/{markingCategoryId}", - query_params={ - "preview": preview, - }, - path_params={ - "markingCategoryId": marking_category_id, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=admin_models.MarkingCategory, - request_timeout=request_timeout, - throwable_errors={ - "GetMarkingCategoryPermissionDenied": admin_errors.GetMarkingCategoryPermissionDenied, - "MarkingCategoryNotFound": admin_errors.MarkingCategoryNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def list( - self, - *, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.ResourceIterator[admin_models.MarkingCategory]: - """ - Maximum page size 100. - :param page_size: The page size to use for the endpoint. - :type page_size: Optional[PageSize] - :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. - :type page_token: Optional[PageToken] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.ResourceIterator[admin_models.MarkingCategory] - - :raises InvalidPageSize: The provided page size was zero or negative. Page sizes must be greater than zero. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/admin/markingCategories", - query_params={ - "pageSize": page_size, - "pageToken": page_token, - "preview": preview, - }, - path_params={}, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=admin_models.ListMarkingCategoriesResponse, - request_timeout=request_timeout, - throwable_errors={ - "InvalidPageSize": core_errors.InvalidPageSize, - }, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - -class _MarkingCategoryClientRaw: - def __init__(self, client: MarkingCategoryClient) -> None: - def get(_: admin_models.MarkingCategory): ... - def list(_: admin_models.ListMarkingCategoriesResponse): ... - - self.get = core.with_raw_response(get, client.get) - self.list = core.with_raw_response(list, client.list) - - -class _MarkingCategoryClientStreaming: - def __init__(self, client: MarkingCategoryClient) -> None: - def get(_: admin_models.MarkingCategory): ... - def list(_: admin_models.ListMarkingCategoriesResponse): ... - - self.get = core.with_streaming_response(get, client.get) - self.list = core.with_streaming_response(list, client.list) - - -class AsyncMarkingCategoryClient: - """ - The API client for the MarkingCategory Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AsyncMarkingCategoryClientStreaming(self) - self.with_raw_response = _AsyncMarkingCategoryClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - marking_category_id: admin_models.MarkingCategoryId, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[admin_models.MarkingCategory]: - """ - Get the MarkingCategory with the specified id. - :param marking_category_id: - :type marking_category_id: MarkingCategoryId - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[admin_models.MarkingCategory] - - :raises GetMarkingCategoryPermissionDenied: The provided token does not have permission to view the marking category. - :raises MarkingCategoryNotFound: The given MarkingCategory could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/admin/markingCategories/{markingCategoryId}", - query_params={ - "preview": preview, - }, - path_params={ - "markingCategoryId": marking_category_id, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=admin_models.MarkingCategory, - request_timeout=request_timeout, - throwable_errors={ - "GetMarkingCategoryPermissionDenied": admin_errors.GetMarkingCategoryPermissionDenied, - "MarkingCategoryNotFound": admin_errors.MarkingCategoryNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def list( - self, - *, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.AsyncResourceIterator[admin_models.MarkingCategory]: - """ - Maximum page size 100. - :param page_size: The page size to use for the endpoint. - :type page_size: Optional[PageSize] - :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. - :type page_token: Optional[PageToken] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.AsyncResourceIterator[admin_models.MarkingCategory] - - :raises InvalidPageSize: The provided page size was zero or negative. Page sizes must be greater than zero. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/admin/markingCategories", - query_params={ - "pageSize": page_size, - "pageToken": page_token, - "preview": preview, - }, - path_params={}, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=admin_models.ListMarkingCategoriesResponse, - request_timeout=request_timeout, - throwable_errors={ - "InvalidPageSize": core_errors.InvalidPageSize, - }, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - -class _AsyncMarkingCategoryClientRaw: - def __init__(self, client: AsyncMarkingCategoryClient) -> None: - def get(_: admin_models.MarkingCategory): ... - def list(_: admin_models.ListMarkingCategoriesResponse): ... - - self.get = core.async_with_raw_response(get, client.get) - self.list = core.async_with_raw_response(list, client.list) - - -class _AsyncMarkingCategoryClientStreaming: - def __init__(self, client: AsyncMarkingCategoryClient) -> None: - def get(_: admin_models.MarkingCategory): ... - def list(_: admin_models.ListMarkingCategoriesResponse): ... - - self.get = core.async_with_streaming_response(get, client.get) - self.list = core.async_with_streaming_response(list, client.list) diff --git a/foundry_sdk/v2/admin/marking_member.py b/foundry_sdk/v2/admin/marking_member.py deleted file mode 100644 index 4b743cb2f..000000000 --- a/foundry_sdk/v2/admin/marking_member.py +++ /dev/null @@ -1,449 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing - -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v2.admin import errors as admin_errors -from foundry_sdk.v2.admin import models as admin_models -from foundry_sdk.v2.core import models as core_models - - -class MarkingMemberClient: - """ - The API client for the MarkingMember Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _MarkingMemberClientStreaming(self) - self.with_raw_response = _MarkingMemberClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def add( - self, - marking_id: core_models.MarkingId, - *, - principal_ids: typing.List[core_models.PrincipalId], - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> None: - """ - - :param marking_id: - :type marking_id: MarkingId - :param principal_ids: - :type principal_ids: List[PrincipalId] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: None - - :raises AddMarkingMembersPermissionDenied: Could not add the MarkingMember. - :raises GetMarkingPermissionDenied: The provided token does not have permission to view the marking. - :raises MarkingNotFound: The given Marking could not be found. - :raises PrincipalNotFound: A principal (User or Group) with the given PrincipalId could not be found - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/admin/markings/{markingId}/markingMembers/add", - query_params={}, - path_params={ - "markingId": marking_id, - }, - header_params={ - "Content-Type": "application/json", - }, - body=admin_models.AddMarkingMembersRequest( - principal_ids=principal_ids, - ), - response_type=None, - request_timeout=request_timeout, - throwable_errors={ - "AddMarkingMembersPermissionDenied": admin_errors.AddMarkingMembersPermissionDenied, - "GetMarkingPermissionDenied": admin_errors.GetMarkingPermissionDenied, - "MarkingNotFound": admin_errors.MarkingNotFound, - "PrincipalNotFound": admin_errors.PrincipalNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def list( - self, - marking_id: core_models.MarkingId, - *, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - transitive: typing.Optional[bool] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.ResourceIterator[admin_models.MarkingMember]: - """ - Lists all principals who can view resources protected by the given Marking. Ignores the `pageSize` parameter. - Requires `api:admin-write` because only marking administrators can view marking members. - - :param marking_id: - :type marking_id: MarkingId - :param page_size: The page size to use for the endpoint. - :type page_size: Optional[PageSize] - :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. - :type page_token: Optional[PageToken] - :param transitive: When true, includes the transitive members of groups contained within groups that are members of this Marking. For example, say the Marking has member Group A, and Group A has member User B. If `transitive=false` only Group A will be returned, but if `transitive=true` then Group A and User B will be returned. This will recursively resolve Groups through all layers of nesting. Defaults to false. - :type transitive: Optional[bool] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.ResourceIterator[admin_models.MarkingMember] - - :raises GetMarkingPermissionDenied: The provided token does not have permission to view the marking. - :raises ListMarkingMembersPermissionDenied: The provided token does not have permission to list the members of this marking. - :raises MarkingNotFound: The given Marking could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/admin/markings/{markingId}/markingMembers", - query_params={ - "pageSize": page_size, - "pageToken": page_token, - "transitive": transitive, - }, - path_params={ - "markingId": marking_id, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=admin_models.ListMarkingMembersResponse, - request_timeout=request_timeout, - throwable_errors={ - "GetMarkingPermissionDenied": admin_errors.GetMarkingPermissionDenied, - "ListMarkingMembersPermissionDenied": admin_errors.ListMarkingMembersPermissionDenied, - "MarkingNotFound": admin_errors.MarkingNotFound, - }, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def remove( - self, - marking_id: core_models.MarkingId, - *, - principal_ids: typing.List[core_models.PrincipalId], - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> None: - """ - - :param marking_id: - :type marking_id: MarkingId - :param principal_ids: - :type principal_ids: List[PrincipalId] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: None - - :raises GetMarkingPermissionDenied: The provided token does not have permission to view the marking. - :raises MarkingNotFound: The given Marking could not be found. - :raises PrincipalNotFound: A principal (User or Group) with the given PrincipalId could not be found - :raises RemoveMarkingMembersPermissionDenied: Could not remove the MarkingMember. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/admin/markings/{markingId}/markingMembers/remove", - query_params={}, - path_params={ - "markingId": marking_id, - }, - header_params={ - "Content-Type": "application/json", - }, - body=admin_models.RemoveMarkingMembersRequest( - principal_ids=principal_ids, - ), - response_type=None, - request_timeout=request_timeout, - throwable_errors={ - "GetMarkingPermissionDenied": admin_errors.GetMarkingPermissionDenied, - "MarkingNotFound": admin_errors.MarkingNotFound, - "PrincipalNotFound": admin_errors.PrincipalNotFound, - "RemoveMarkingMembersPermissionDenied": admin_errors.RemoveMarkingMembersPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _MarkingMemberClientRaw: - def __init__(self, client: MarkingMemberClient) -> None: - def add(_: None): ... - def list(_: admin_models.ListMarkingMembersResponse): ... - def remove(_: None): ... - - self.add = core.with_raw_response(add, client.add) - self.list = core.with_raw_response(list, client.list) - self.remove = core.with_raw_response(remove, client.remove) - - -class _MarkingMemberClientStreaming: - def __init__(self, client: MarkingMemberClient) -> None: - def list(_: admin_models.ListMarkingMembersResponse): ... - - self.list = core.with_streaming_response(list, client.list) - - -class AsyncMarkingMemberClient: - """ - The API client for the MarkingMember Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AsyncMarkingMemberClientStreaming(self) - self.with_raw_response = _AsyncMarkingMemberClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def add( - self, - marking_id: core_models.MarkingId, - *, - principal_ids: typing.List[core_models.PrincipalId], - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[None]: - """ - - :param marking_id: - :type marking_id: MarkingId - :param principal_ids: - :type principal_ids: List[PrincipalId] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[None] - - :raises AddMarkingMembersPermissionDenied: Could not add the MarkingMember. - :raises GetMarkingPermissionDenied: The provided token does not have permission to view the marking. - :raises MarkingNotFound: The given Marking could not be found. - :raises PrincipalNotFound: A principal (User or Group) with the given PrincipalId could not be found - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/admin/markings/{markingId}/markingMembers/add", - query_params={}, - path_params={ - "markingId": marking_id, - }, - header_params={ - "Content-Type": "application/json", - }, - body=admin_models.AddMarkingMembersRequest( - principal_ids=principal_ids, - ), - response_type=None, - request_timeout=request_timeout, - throwable_errors={ - "AddMarkingMembersPermissionDenied": admin_errors.AddMarkingMembersPermissionDenied, - "GetMarkingPermissionDenied": admin_errors.GetMarkingPermissionDenied, - "MarkingNotFound": admin_errors.MarkingNotFound, - "PrincipalNotFound": admin_errors.PrincipalNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def list( - self, - marking_id: core_models.MarkingId, - *, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - transitive: typing.Optional[bool] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.AsyncResourceIterator[admin_models.MarkingMember]: - """ - Lists all principals who can view resources protected by the given Marking. Ignores the `pageSize` parameter. - Requires `api:admin-write` because only marking administrators can view marking members. - - :param marking_id: - :type marking_id: MarkingId - :param page_size: The page size to use for the endpoint. - :type page_size: Optional[PageSize] - :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. - :type page_token: Optional[PageToken] - :param transitive: When true, includes the transitive members of groups contained within groups that are members of this Marking. For example, say the Marking has member Group A, and Group A has member User B. If `transitive=false` only Group A will be returned, but if `transitive=true` then Group A and User B will be returned. This will recursively resolve Groups through all layers of nesting. Defaults to false. - :type transitive: Optional[bool] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.AsyncResourceIterator[admin_models.MarkingMember] - - :raises GetMarkingPermissionDenied: The provided token does not have permission to view the marking. - :raises ListMarkingMembersPermissionDenied: The provided token does not have permission to list the members of this marking. - :raises MarkingNotFound: The given Marking could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/admin/markings/{markingId}/markingMembers", - query_params={ - "pageSize": page_size, - "pageToken": page_token, - "transitive": transitive, - }, - path_params={ - "markingId": marking_id, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=admin_models.ListMarkingMembersResponse, - request_timeout=request_timeout, - throwable_errors={ - "GetMarkingPermissionDenied": admin_errors.GetMarkingPermissionDenied, - "ListMarkingMembersPermissionDenied": admin_errors.ListMarkingMembersPermissionDenied, - "MarkingNotFound": admin_errors.MarkingNotFound, - }, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def remove( - self, - marking_id: core_models.MarkingId, - *, - principal_ids: typing.List[core_models.PrincipalId], - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[None]: - """ - - :param marking_id: - :type marking_id: MarkingId - :param principal_ids: - :type principal_ids: List[PrincipalId] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[None] - - :raises GetMarkingPermissionDenied: The provided token does not have permission to view the marking. - :raises MarkingNotFound: The given Marking could not be found. - :raises PrincipalNotFound: A principal (User or Group) with the given PrincipalId could not be found - :raises RemoveMarkingMembersPermissionDenied: Could not remove the MarkingMember. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/admin/markings/{markingId}/markingMembers/remove", - query_params={}, - path_params={ - "markingId": marking_id, - }, - header_params={ - "Content-Type": "application/json", - }, - body=admin_models.RemoveMarkingMembersRequest( - principal_ids=principal_ids, - ), - response_type=None, - request_timeout=request_timeout, - throwable_errors={ - "GetMarkingPermissionDenied": admin_errors.GetMarkingPermissionDenied, - "MarkingNotFound": admin_errors.MarkingNotFound, - "PrincipalNotFound": admin_errors.PrincipalNotFound, - "RemoveMarkingMembersPermissionDenied": admin_errors.RemoveMarkingMembersPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _AsyncMarkingMemberClientRaw: - def __init__(self, client: AsyncMarkingMemberClient) -> None: - def add(_: None): ... - def list(_: admin_models.ListMarkingMembersResponse): ... - def remove(_: None): ... - - self.add = core.async_with_raw_response(add, client.add) - self.list = core.async_with_raw_response(list, client.list) - self.remove = core.async_with_raw_response(remove, client.remove) - - -class _AsyncMarkingMemberClientStreaming: - def __init__(self, client: AsyncMarkingMemberClient) -> None: - def list(_: admin_models.ListMarkingMembersResponse): ... - - self.list = core.async_with_streaming_response(list, client.list) diff --git a/foundry_sdk/v2/admin/marking_role_assignment.py b/foundry_sdk/v2/admin/marking_role_assignment.py deleted file mode 100644 index f8a7ff4de..000000000 --- a/foundry_sdk/v2/admin/marking_role_assignment.py +++ /dev/null @@ -1,447 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing - -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v2.admin import errors as admin_errors -from foundry_sdk.v2.admin import models as admin_models -from foundry_sdk.v2.core import models as core_models - - -class MarkingRoleAssignmentClient: - """ - The API client for the MarkingRoleAssignment Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _MarkingRoleAssignmentClientStreaming(self) - self.with_raw_response = _MarkingRoleAssignmentClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def add( - self, - marking_id: core_models.MarkingId, - *, - role_assignments: typing.List[admin_models.MarkingRoleUpdate], - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> None: - """ - - :param marking_id: - :type marking_id: MarkingId - :param role_assignments: - :type role_assignments: List[MarkingRoleUpdate] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: None - - :raises AddMarkingRoleAssignmentsPermissionDenied: Could not add the MarkingRoleAssignment. - :raises GetMarkingPermissionDenied: The provided token does not have permission to view the marking. - :raises MarkingNotFound: The given Marking could not be found. - :raises PrincipalNotFound: A principal (User or Group) with the given PrincipalId could not be found - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/admin/markings/{markingId}/roleAssignments/add", - query_params={}, - path_params={ - "markingId": marking_id, - }, - header_params={ - "Content-Type": "application/json", - }, - body=admin_models.AddMarkingRoleAssignmentsRequest( - role_assignments=role_assignments, - ), - response_type=None, - request_timeout=request_timeout, - throwable_errors={ - "AddMarkingRoleAssignmentsPermissionDenied": admin_errors.AddMarkingRoleAssignmentsPermissionDenied, - "GetMarkingPermissionDenied": admin_errors.GetMarkingPermissionDenied, - "MarkingNotFound": admin_errors.MarkingNotFound, - "PrincipalNotFound": admin_errors.PrincipalNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def list( - self, - marking_id: core_models.MarkingId, - *, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.ResourceIterator[admin_models.MarkingRoleAssignment]: - """ - List all principals who are assigned a role for the given Marking. Ignores the `pageSize` parameter. - - :param marking_id: - :type marking_id: MarkingId - :param page_size: The page size to use for the endpoint. - :type page_size: Optional[PageSize] - :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. - :type page_token: Optional[PageToken] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.ResourceIterator[admin_models.MarkingRoleAssignment] - - :raises ListMarkingRoleAssignmentsPermissionDenied: The provided token does not have permission to list assigned roles for this marking. - :raises MarkingNotFound: The given Marking could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/admin/markings/{markingId}/roleAssignments", - query_params={ - "pageSize": page_size, - "pageToken": page_token, - }, - path_params={ - "markingId": marking_id, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=admin_models.ListMarkingRoleAssignmentsResponse, - request_timeout=request_timeout, - throwable_errors={ - "ListMarkingRoleAssignmentsPermissionDenied": admin_errors.ListMarkingRoleAssignmentsPermissionDenied, - "MarkingNotFound": admin_errors.MarkingNotFound, - }, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def remove( - self, - marking_id: core_models.MarkingId, - *, - role_assignments: typing.List[admin_models.MarkingRoleUpdate], - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> None: - """ - - :param marking_id: - :type marking_id: MarkingId - :param role_assignments: - :type role_assignments: List[MarkingRoleUpdate] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: None - - :raises GetMarkingPermissionDenied: The provided token does not have permission to view the marking. - :raises ListMarkingRoleAssignmentsPermissionDenied: The provided token does not have permission to list assigned roles for this marking. - :raises MarkingNotFound: The given Marking could not be found. - :raises PrincipalNotFound: A principal (User or Group) with the given PrincipalId could not be found - :raises RemoveMarkingMembersPermissionDenied: Could not remove the MarkingMember. - :raises RemoveMarkingRoleAssignmentsPermissionDenied: Could not remove the MarkingRoleAssignment. - :raises RemoveMarkingRoleAssignmentsRemoveAllAdministratorsNotAllowed: You cannot remove all administrators from a marking. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/admin/markings/{markingId}/roleAssignments/remove", - query_params={}, - path_params={ - "markingId": marking_id, - }, - header_params={ - "Content-Type": "application/json", - }, - body=admin_models.RemoveMarkingRoleAssignmentsRequest( - role_assignments=role_assignments, - ), - response_type=None, - request_timeout=request_timeout, - throwable_errors={ - "GetMarkingPermissionDenied": admin_errors.GetMarkingPermissionDenied, - "ListMarkingRoleAssignmentsPermissionDenied": admin_errors.ListMarkingRoleAssignmentsPermissionDenied, - "MarkingNotFound": admin_errors.MarkingNotFound, - "PrincipalNotFound": admin_errors.PrincipalNotFound, - "RemoveMarkingMembersPermissionDenied": admin_errors.RemoveMarkingMembersPermissionDenied, - "RemoveMarkingRoleAssignmentsPermissionDenied": admin_errors.RemoveMarkingRoleAssignmentsPermissionDenied, - "RemoveMarkingRoleAssignmentsRemoveAllAdministratorsNotAllowed": admin_errors.RemoveMarkingRoleAssignmentsRemoveAllAdministratorsNotAllowed, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _MarkingRoleAssignmentClientRaw: - def __init__(self, client: MarkingRoleAssignmentClient) -> None: - def add(_: None): ... - def list(_: admin_models.ListMarkingRoleAssignmentsResponse): ... - def remove(_: None): ... - - self.add = core.with_raw_response(add, client.add) - self.list = core.with_raw_response(list, client.list) - self.remove = core.with_raw_response(remove, client.remove) - - -class _MarkingRoleAssignmentClientStreaming: - def __init__(self, client: MarkingRoleAssignmentClient) -> None: - def list(_: admin_models.ListMarkingRoleAssignmentsResponse): ... - - self.list = core.with_streaming_response(list, client.list) - - -class AsyncMarkingRoleAssignmentClient: - """ - The API client for the MarkingRoleAssignment Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AsyncMarkingRoleAssignmentClientStreaming(self) - self.with_raw_response = _AsyncMarkingRoleAssignmentClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def add( - self, - marking_id: core_models.MarkingId, - *, - role_assignments: typing.List[admin_models.MarkingRoleUpdate], - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[None]: - """ - - :param marking_id: - :type marking_id: MarkingId - :param role_assignments: - :type role_assignments: List[MarkingRoleUpdate] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[None] - - :raises AddMarkingRoleAssignmentsPermissionDenied: Could not add the MarkingRoleAssignment. - :raises GetMarkingPermissionDenied: The provided token does not have permission to view the marking. - :raises MarkingNotFound: The given Marking could not be found. - :raises PrincipalNotFound: A principal (User or Group) with the given PrincipalId could not be found - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/admin/markings/{markingId}/roleAssignments/add", - query_params={}, - path_params={ - "markingId": marking_id, - }, - header_params={ - "Content-Type": "application/json", - }, - body=admin_models.AddMarkingRoleAssignmentsRequest( - role_assignments=role_assignments, - ), - response_type=None, - request_timeout=request_timeout, - throwable_errors={ - "AddMarkingRoleAssignmentsPermissionDenied": admin_errors.AddMarkingRoleAssignmentsPermissionDenied, - "GetMarkingPermissionDenied": admin_errors.GetMarkingPermissionDenied, - "MarkingNotFound": admin_errors.MarkingNotFound, - "PrincipalNotFound": admin_errors.PrincipalNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def list( - self, - marking_id: core_models.MarkingId, - *, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.AsyncResourceIterator[admin_models.MarkingRoleAssignment]: - """ - List all principals who are assigned a role for the given Marking. Ignores the `pageSize` parameter. - - :param marking_id: - :type marking_id: MarkingId - :param page_size: The page size to use for the endpoint. - :type page_size: Optional[PageSize] - :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. - :type page_token: Optional[PageToken] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.AsyncResourceIterator[admin_models.MarkingRoleAssignment] - - :raises ListMarkingRoleAssignmentsPermissionDenied: The provided token does not have permission to list assigned roles for this marking. - :raises MarkingNotFound: The given Marking could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/admin/markings/{markingId}/roleAssignments", - query_params={ - "pageSize": page_size, - "pageToken": page_token, - }, - path_params={ - "markingId": marking_id, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=admin_models.ListMarkingRoleAssignmentsResponse, - request_timeout=request_timeout, - throwable_errors={ - "ListMarkingRoleAssignmentsPermissionDenied": admin_errors.ListMarkingRoleAssignmentsPermissionDenied, - "MarkingNotFound": admin_errors.MarkingNotFound, - }, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def remove( - self, - marking_id: core_models.MarkingId, - *, - role_assignments: typing.List[admin_models.MarkingRoleUpdate], - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[None]: - """ - - :param marking_id: - :type marking_id: MarkingId - :param role_assignments: - :type role_assignments: List[MarkingRoleUpdate] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[None] - - :raises GetMarkingPermissionDenied: The provided token does not have permission to view the marking. - :raises ListMarkingRoleAssignmentsPermissionDenied: The provided token does not have permission to list assigned roles for this marking. - :raises MarkingNotFound: The given Marking could not be found. - :raises PrincipalNotFound: A principal (User or Group) with the given PrincipalId could not be found - :raises RemoveMarkingMembersPermissionDenied: Could not remove the MarkingMember. - :raises RemoveMarkingRoleAssignmentsPermissionDenied: Could not remove the MarkingRoleAssignment. - :raises RemoveMarkingRoleAssignmentsRemoveAllAdministratorsNotAllowed: You cannot remove all administrators from a marking. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/admin/markings/{markingId}/roleAssignments/remove", - query_params={}, - path_params={ - "markingId": marking_id, - }, - header_params={ - "Content-Type": "application/json", - }, - body=admin_models.RemoveMarkingRoleAssignmentsRequest( - role_assignments=role_assignments, - ), - response_type=None, - request_timeout=request_timeout, - throwable_errors={ - "GetMarkingPermissionDenied": admin_errors.GetMarkingPermissionDenied, - "ListMarkingRoleAssignmentsPermissionDenied": admin_errors.ListMarkingRoleAssignmentsPermissionDenied, - "MarkingNotFound": admin_errors.MarkingNotFound, - "PrincipalNotFound": admin_errors.PrincipalNotFound, - "RemoveMarkingMembersPermissionDenied": admin_errors.RemoveMarkingMembersPermissionDenied, - "RemoveMarkingRoleAssignmentsPermissionDenied": admin_errors.RemoveMarkingRoleAssignmentsPermissionDenied, - "RemoveMarkingRoleAssignmentsRemoveAllAdministratorsNotAllowed": admin_errors.RemoveMarkingRoleAssignmentsRemoveAllAdministratorsNotAllowed, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _AsyncMarkingRoleAssignmentClientRaw: - def __init__(self, client: AsyncMarkingRoleAssignmentClient) -> None: - def add(_: None): ... - def list(_: admin_models.ListMarkingRoleAssignmentsResponse): ... - def remove(_: None): ... - - self.add = core.async_with_raw_response(add, client.add) - self.list = core.async_with_raw_response(list, client.list) - self.remove = core.async_with_raw_response(remove, client.remove) - - -class _AsyncMarkingRoleAssignmentClientStreaming: - def __init__(self, client: AsyncMarkingRoleAssignmentClient) -> None: - def list(_: admin_models.ListMarkingRoleAssignmentsResponse): ... - - self.list = core.async_with_streaming_response(list, client.list) diff --git a/foundry_sdk/v2/admin/models.py b/foundry_sdk/v2/admin/models.py deleted file mode 100644 index 5eb6ee1ab..000000000 --- a/foundry_sdk/v2/admin/models.py +++ /dev/null @@ -1,884 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -from __future__ import annotations - -import typing - -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk.v2.core import models as core_models - - -class AddEnrollmentRoleAssignmentsRequest(core.ModelBase): - """AddEnrollmentRoleAssignmentsRequest""" - - role_assignments: typing.List[core_models.RoleAssignmentUpdate] = pydantic.Field(alias=str("roleAssignments")) # type: ignore[literal-required] - - -class AddGroupMembersRequest(core.ModelBase): - """AddGroupMembersRequest""" - - principal_ids: typing.List[core_models.PrincipalId] = pydantic.Field(alias=str("principalIds")) # type: ignore[literal-required] - expiration: typing.Optional[GroupMembershipExpiration] = None - - -class AddMarkingMembersRequest(core.ModelBase): - """AddMarkingMembersRequest""" - - principal_ids: typing.List[core_models.PrincipalId] = pydantic.Field(alias=str("principalIds")) # type: ignore[literal-required] - - -class AddMarkingRoleAssignmentsRequest(core.ModelBase): - """AddMarkingRoleAssignmentsRequest""" - - role_assignments: typing.List[MarkingRoleUpdate] = pydantic.Field(alias=str("roleAssignments")) # type: ignore[literal-required] - - -class AddOrganizationRoleAssignmentsRequest(core.ModelBase): - """AddOrganizationRoleAssignmentsRequest""" - - role_assignments: typing.List[core_models.RoleAssignmentUpdate] = pydantic.Field(alias=str("roleAssignments")) # type: ignore[literal-required] - - -AttributeName = str -"""AttributeName""" - - -AttributeValue = str -"""AttributeValue""" - - -AttributeValues = typing.List["AttributeValue"] -"""AttributeValues""" - - -AuthenticationProtocol = typing_extensions.Annotated[ - typing.Union["SamlAuthenticationProtocol", "OidcAuthenticationProtocol"], - pydantic.Field(discriminator="type"), -] -"""AuthenticationProtocol""" - - -class AuthenticationProvider(core.ModelBase): - """AuthenticationProvider""" - - rid: AuthenticationProviderRid - name: AuthenticationProviderName - realm: core_models.Realm - enabled: AuthenticationProviderEnabled - """Whether users can log in using this provider.""" - - supported_hosts: typing.List[HostName] = pydantic.Field(alias=str("supportedHosts")) # type: ignore[literal-required] - """This provider can only be utilized from these hosts.""" - - supported_username_patterns: typing.List[str] = pydantic.Field(alias=str("supportedUsernamePatterns")) # type: ignore[literal-required] - """Users who enter usernames that match these patterns will be redirected to this authentication provider.""" - - protocol: AuthenticationProtocol - - -AuthenticationProviderEnabled = bool -"""Whether users can log in using this provider.""" - - -AuthenticationProviderName = str -"""AuthenticationProviderName""" - - -AuthenticationProviderRid = core.RID -"""AuthenticationProviderRid""" - - -class CertificateInfo(core.ModelBase): - """CertificateInfo""" - - pem_certificate: str = pydantic.Field(alias=str("pemCertificate")) # type: ignore[literal-required] - """The certificate, in PEM format.""" - - common_name: typing.Optional[str] = pydantic.Field(alias=str("commonName"), default=None) # type: ignore[literal-required] - expiry_date: core.AwareDatetime = pydantic.Field(alias=str("expiryDate")) # type: ignore[literal-required] - usage_type: CertificateUsageType = pydantic.Field(alias=str("usageType")) # type: ignore[literal-required] - - -CertificateUsageType = typing.Literal["ENCRYPTION", "SIGNING", "UNSPECIFIED"] -"""CertificateUsageType""" - - -class CreateGroupRequest(core.ModelBase): - """CreateGroupRequest""" - - name: GroupName - """The name of the Group.""" - - organizations: typing.List[core_models.OrganizationRid] - """The RIDs of the Organizations whose members can see this group. At least one Organization RID must be listed.""" - - description: typing.Optional[str] = None - """A description of the Group.""" - - attributes: typing.Dict[AttributeName, AttributeValues] - """A map of the Group's attributes. Attributes prefixed with "multipass:" are reserved for internal use by Foundry and are subject to change.""" - - -class CreateMarkingRequest(core.ModelBase): - """CreateMarkingRequest""" - - initial_role_assignments: typing.List[MarkingRoleUpdate] = pydantic.Field(alias=str("initialRoleAssignments")) # type: ignore[literal-required] - """ - The initial roles that will be assigned when the Marking is created. At least one ADMIN role must be - provided. This can be changed later through the MarkingRoleAssignment operations. - - WARNING: If you do not include your own principal ID or the ID of a Group that you are a member of, - you will create a Marking that you cannot administer. - """ - - initial_members: typing.List[core_models.PrincipalId] = pydantic.Field(alias=str("initialMembers")) # type: ignore[literal-required] - """Users and Groups that will be able to view resources protected by this Marking. This can be changed later through the MarkingMember operations.""" - - name: MarkingName - description: typing.Optional[str] = None - category_id: MarkingCategoryId = pydantic.Field(alias=str("categoryId")) # type: ignore[literal-required] - - -class CreateOrganizationRequest(core.ModelBase): - """CreateOrganizationRequest""" - - administrators: typing.List[core_models.PrincipalId] - """The initial administrators of the Organization. At least one principal must be provided.""" - - enrollment_rid: core_models.EnrollmentRid = pydantic.Field(alias=str("enrollmentRid")) # type: ignore[literal-required] - """The RID of the Enrollment that this Organization belongs to. This must be provided.""" - - name: OrganizationName - host: typing.Optional[HostName] = None - """ - The primary host name of the Organization. This should be used when constructing URLs for users of this - Organization. - """ - - description: typing.Optional[str] = None - - -class Enrollment(core.ModelBase): - """Enrollment""" - - rid: core_models.EnrollmentRid - name: EnrollmentName - created_time: typing.Optional[core_models.CreatedTime] = pydantic.Field(alias=str("createdTime"), default=None) # type: ignore[literal-required] - - -EnrollmentName = str -"""EnrollmentName""" - - -class EnrollmentRoleAssignment(core.ModelBase): - """EnrollmentRoleAssignment""" - - principal_type: core_models.PrincipalType = pydantic.Field(alias=str("principalType")) # type: ignore[literal-required] - principal_id: core_models.PrincipalId = pydantic.Field(alias=str("principalId")) # type: ignore[literal-required] - role_id: core_models.RoleId = pydantic.Field(alias=str("roleId")) # type: ignore[literal-required] - - -class GetGroupsBatchRequestElement(core.ModelBase): - """GetGroupsBatchRequestElement""" - - group_id: core_models.GroupId = pydantic.Field(alias=str("groupId")) # type: ignore[literal-required] - - -class GetGroupsBatchResponse(core.ModelBase): - """GetGroupsBatchResponse""" - - data: typing.Dict[core_models.GroupId, Group] - - -class GetMarkingsBatchRequestElement(core.ModelBase): - """GetMarkingsBatchRequestElement""" - - marking_id: core_models.MarkingId = pydantic.Field(alias=str("markingId")) # type: ignore[literal-required] - - -class GetMarkingsBatchResponse(core.ModelBase): - """GetMarkingsBatchResponse""" - - data: typing.Dict[core_models.MarkingId, Marking] - - -class GetRolesBatchRequestElement(core.ModelBase): - """GetRolesBatchRequestElement""" - - role_id: core_models.RoleId = pydantic.Field(alias=str("roleId")) # type: ignore[literal-required] - - -class GetRolesBatchResponse(core.ModelBase): - """GetRolesBatchResponse""" - - data: typing.Dict[core_models.RoleId, Role] - - -class GetUserMarkingsResponse(core.ModelBase): - """GetUserMarkingsResponse""" - - view: typing.List[core_models.MarkingId] - """ - The markings that the user has access to. The user will be able to access resources protected with these - markings. This includes organization markings for organizations in which the user is a guest member. - """ - - -class GetUsersBatchRequestElement(core.ModelBase): - """GetUsersBatchRequestElement""" - - user_id: core_models.UserId = pydantic.Field(alias=str("userId")) # type: ignore[literal-required] - status: typing.Optional[core_models.UserStatus] = None - - -class GetUsersBatchResponse(core.ModelBase): - """GetUsersBatchResponse""" - - data: typing.Dict[core_models.UserId, User] - - -class Group(core.ModelBase): - """Group""" - - id: core_models.GroupId - name: GroupName - """The name of the Group.""" - - description: typing.Optional[str] = None - """A description of the Group.""" - - realm: core_models.Realm - organizations: typing.List[core_models.OrganizationRid] - """The RIDs of the Organizations whose members can see this group. At least one Organization RID must be listed.""" - - attributes: typing.Dict[AttributeName, AttributeValues] - """A map of the Group's attributes. Attributes prefixed with "multipass:" are reserved for internal use by Foundry and are subject to change.""" - - -class GroupMember(core.ModelBase): - """GroupMember""" - - principal_type: core_models.PrincipalType = pydantic.Field(alias=str("principalType")) # type: ignore[literal-required] - principal_id: core_models.PrincipalId = pydantic.Field(alias=str("principalId")) # type: ignore[literal-required] - - -class GroupMembership(core.ModelBase): - """GroupMembership""" - - group_id: core_models.GroupId = pydantic.Field(alias=str("groupId")) # type: ignore[literal-required] - - -GroupMembershipExpiration = core.AwareDatetime -"""GroupMembershipExpiration""" - - -class GroupMembershipExpirationPolicy(core.ModelBase): - """GroupMembershipExpirationPolicy""" - - maximum_value: typing.Optional[GroupMembershipExpiration] = pydantic.Field(alias=str("maximumValue"), default=None) # type: ignore[literal-required] - """Members in this group must be added with expiration times that occur before this value.""" - - maximum_duration: typing.Optional[core_models.DurationSeconds] = pydantic.Field(alias=str("maximumDuration"), default=None) # type: ignore[literal-required] - """Members in this group must be added with expirations that are less than this duration in seconds into the future from the time they are added.""" - - -GroupName = str -"""The name of the Group.""" - - -class GroupProviderInfo(core.ModelBase): - """GroupProviderInfo""" - - provider_id: ProviderId = pydantic.Field(alias=str("providerId")) # type: ignore[literal-required] - """ - The ID of the Group in the external authentication provider. This value is determined by the authentication provider. - At most one Group can have a given provider ID in a given Realm. - """ - - -class GroupSearchFilter(core.ModelBase): - """GroupSearchFilter""" - - type: PrincipalFilterType - value: str - - -class Host(core.ModelBase): - """Host""" - - host_name: HostName = pydantic.Field(alias=str("hostName")) # type: ignore[literal-required] - - -HostName = str -"""HostName""" - - -class ListAuthenticationProvidersResponse(core.ModelBase): - """ListAuthenticationProvidersResponse""" - - data: typing.List[AuthenticationProvider] - next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] - - -class ListAvailableOrganizationRolesResponse(core.ModelBase): - """ListAvailableOrganizationRolesResponse""" - - data: typing.List[core_models.Role] - - -class ListEnrollmentRoleAssignmentsResponse(core.ModelBase): - """ListEnrollmentRoleAssignmentsResponse""" - - data: typing.List[EnrollmentRoleAssignment] - next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] - - -class ListGroupMembersResponse(core.ModelBase): - """ListGroupMembersResponse""" - - data: typing.List[GroupMember] - next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] - - -class ListGroupMembershipsResponse(core.ModelBase): - """ListGroupMembershipsResponse""" - - data: typing.List[GroupMembership] - next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] - - -class ListGroupsResponse(core.ModelBase): - """ListGroupsResponse""" - - data: typing.List[Group] - next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] - - -class ListHostsResponse(core.ModelBase): - """ListHostsResponse""" - - data: typing.List[Host] - next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] - - -class ListMarkingCategoriesResponse(core.ModelBase): - """ListMarkingCategoriesResponse""" - - data: typing.List[MarkingCategory] - next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] - - -class ListMarkingMembersResponse(core.ModelBase): - """ListMarkingMembersResponse""" - - data: typing.List[MarkingMember] - next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] - - -class ListMarkingRoleAssignmentsResponse(core.ModelBase): - """ListMarkingRoleAssignmentsResponse""" - - data: typing.List[MarkingRoleAssignment] - next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] - - -class ListMarkingsResponse(core.ModelBase): - """ListMarkingsResponse""" - - data: typing.List[Marking] - next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] - - -class ListOrganizationRoleAssignmentsResponse(core.ModelBase): - """ListOrganizationRoleAssignmentsResponse""" - - data: typing.List[OrganizationRoleAssignment] - next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] - - -class ListUsersResponse(core.ModelBase): - """ListUsersResponse""" - - data: typing.List[User] - next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] - - -class Marking(core.ModelBase): - """Marking""" - - id: core_models.MarkingId - category_id: MarkingCategoryId = pydantic.Field(alias=str("categoryId")) # type: ignore[literal-required] - name: MarkingName - description: typing.Optional[str] = None - organization: typing.Optional[core_models.OrganizationRid] = None - """If this marking is associated with an Organization, its RID will be populated here.""" - - created_time: core_models.CreatedTime = pydantic.Field(alias=str("createdTime")) # type: ignore[literal-required] - created_by: typing.Optional[core_models.CreatedBy] = pydantic.Field(alias=str("createdBy"), default=None) # type: ignore[literal-required] - - -class MarkingCategory(core.ModelBase): - """MarkingCategory""" - - id: MarkingCategoryId - name: MarkingCategoryName - description: typing.Optional[str] = None - category_type: MarkingCategoryType = pydantic.Field(alias=str("categoryType")) # type: ignore[literal-required] - marking_type: MarkingType = pydantic.Field(alias=str("markingType")) # type: ignore[literal-required] - markings: typing.List[core_models.MarkingId] - created_time: core_models.CreatedTime = pydantic.Field(alias=str("createdTime")) # type: ignore[literal-required] - created_by: typing.Optional[core_models.CreatedBy] = pydantic.Field(alias=str("createdBy"), default=None) # type: ignore[literal-required] - - -MarkingCategoryId = str -""" -The ID of a marking category. For user-created categories, this will be a UUID. Markings associated with -Organizations are placed in a category with ID "Organization". -""" - - -MarkingCategoryName = str -"""MarkingCategoryName""" - - -MarkingCategoryType = typing.Literal["CONJUNCTIVE", "DISJUNCTIVE"] -"""MarkingCategoryType""" - - -class MarkingMember(core.ModelBase): - """MarkingMember""" - - principal_type: core_models.PrincipalType = pydantic.Field(alias=str("principalType")) # type: ignore[literal-required] - principal_id: core_models.PrincipalId = pydantic.Field(alias=str("principalId")) # type: ignore[literal-required] - - -MarkingName = str -"""MarkingName""" - - -MarkingRole = typing.Literal["ADMINISTER", "DECLASSIFY", "USE"] -""" -Represents the operations that a user can perform with regards to a Marking. - * ADMINISTER: The user can add and remove members from the Marking, update Marking Role Assignments, and change Marking metadata. - * DECLASSIFY: The user can remove the Marking from resources in the platform and stop the propagation of the Marking during a transform. - * USE: The user can apply the marking to resources in the platform. -""" - - -class MarkingRoleAssignment(core.ModelBase): - """MarkingRoleAssignment""" - - principal_type: core_models.PrincipalType = pydantic.Field(alias=str("principalType")) # type: ignore[literal-required] - principal_id: core_models.PrincipalId = pydantic.Field(alias=str("principalId")) # type: ignore[literal-required] - role: MarkingRole - - -class MarkingRoleUpdate(core.ModelBase): - """MarkingRoleUpdate""" - - role: MarkingRole - principal_id: core_models.PrincipalId = pydantic.Field(alias=str("principalId")) # type: ignore[literal-required] - - -MarkingType = typing.Literal["MANDATORY", "CBAC"] -"""MarkingType""" - - -class OidcAuthenticationProtocol(core.ModelBase): - """OidcAuthenticationProtocol""" - - type: typing.Literal["oidc"] = "oidc" - - -class Organization(core.ModelBase): - """Organization""" - - rid: core_models.OrganizationRid - name: OrganizationName - description: typing.Optional[str] = None - marking_id: core_models.MarkingId = pydantic.Field(alias=str("markingId")) # type: ignore[literal-required] - """ - The ID of this Organization's underlying marking. Organization guest access can be managed - by updating the membership of this Marking. - """ - - host: typing.Optional[HostName] = None - """ - The primary host name of the Organization. This should be used when constructing URLs for users of this - Organization. - """ - - -OrganizationName = str -"""OrganizationName""" - - -class OrganizationRoleAssignment(core.ModelBase): - """OrganizationRoleAssignment""" - - principal_type: core_models.PrincipalType = pydantic.Field(alias=str("principalType")) # type: ignore[literal-required] - principal_id: core_models.PrincipalId = pydantic.Field(alias=str("principalId")) # type: ignore[literal-required] - role_id: core_models.RoleId = pydantic.Field(alias=str("roleId")) # type: ignore[literal-required] - - -class PreregisterGroupRequest(core.ModelBase): - """PreregisterGroupRequest""" - - name: GroupName - organizations: typing.List[core_models.OrganizationRid] - """The RIDs of the Organizations that can view this group.""" - - -class PreregisterUserRequest(core.ModelBase): - """PreregisterUserRequest""" - - username: UserUsername - """The new user's username. This must match one of the provider's supported username patterns.""" - - organization: core_models.OrganizationRid - """ - The RID of the user's primary Organization. This may be changed when the user logs in for the first - time depending on any configured Organization assignment rules. - """ - - given_name: typing.Optional[str] = pydantic.Field(alias=str("givenName"), default=None) # type: ignore[literal-required] - family_name: typing.Optional[str] = pydantic.Field(alias=str("familyName"), default=None) # type: ignore[literal-required] - email: typing.Optional[str] = None - attributes: typing.Optional[typing.Dict[AttributeName, AttributeValues]] = None - - -PrincipalFilterType = typing.Literal["queryString"] -"""PrincipalFilterType""" - - -ProviderId = str -"""A value that uniquely identifies a User or Group in an external authentication provider. This value is determined by the external authentication provider and must be unique per Realm.""" - - -class RemoveEnrollmentRoleAssignmentsRequest(core.ModelBase): - """RemoveEnrollmentRoleAssignmentsRequest""" - - role_assignments: typing.List[core_models.RoleAssignmentUpdate] = pydantic.Field(alias=str("roleAssignments")) # type: ignore[literal-required] - - -class RemoveGroupMembersRequest(core.ModelBase): - """RemoveGroupMembersRequest""" - - principal_ids: typing.List[core_models.PrincipalId] = pydantic.Field(alias=str("principalIds")) # type: ignore[literal-required] - - -class RemoveMarkingMembersRequest(core.ModelBase): - """RemoveMarkingMembersRequest""" - - principal_ids: typing.List[core_models.PrincipalId] = pydantic.Field(alias=str("principalIds")) # type: ignore[literal-required] - - -class RemoveMarkingRoleAssignmentsRequest(core.ModelBase): - """RemoveMarkingRoleAssignmentsRequest""" - - role_assignments: typing.List[MarkingRoleUpdate] = pydantic.Field(alias=str("roleAssignments")) # type: ignore[literal-required] - - -class RemoveOrganizationRoleAssignmentsRequest(core.ModelBase): - """RemoveOrganizationRoleAssignmentsRequest""" - - role_assignments: typing.List[core_models.RoleAssignmentUpdate] = pydantic.Field(alias=str("roleAssignments")) # type: ignore[literal-required] - - -class ReplaceGroupMembershipExpirationPolicyRequest(core.ModelBase): - """ReplaceGroupMembershipExpirationPolicyRequest""" - - maximum_duration: typing.Optional[core_models.DurationSeconds] = pydantic.Field(alias=str("maximumDuration"), default=None) # type: ignore[literal-required] - """Members in this group must be added with expirations that are less than this duration in seconds into the future from the time they are added.""" - - maximum_value: typing.Optional[GroupMembershipExpiration] = pydantic.Field(alias=str("maximumValue"), default=None) # type: ignore[literal-required] - """Members in this group must be added with expiration times that occur before this value.""" - - -class ReplaceGroupProviderInfoRequest(core.ModelBase): - """ReplaceGroupProviderInfoRequest""" - - provider_id: ProviderId = pydantic.Field(alias=str("providerId")) # type: ignore[literal-required] - """ - The ID of the Group in the external authentication provider. This value is determined by the authentication provider. - At most one Group can have a given provider ID in a given Realm. - """ - - -class ReplaceMarkingRequest(core.ModelBase): - """ReplaceMarkingRequest""" - - name: MarkingName - description: typing.Optional[str] = None - - -class ReplaceOrganizationRequest(core.ModelBase): - """ReplaceOrganizationRequest""" - - name: OrganizationName - host: typing.Optional[HostName] = None - """ - The primary host name of the Organization. This should be used when constructing URLs for users of this - Organization. - """ - - description: typing.Optional[str] = None - - -class ReplaceUserProviderInfoRequest(core.ModelBase): - """ReplaceUserProviderInfoRequest""" - - provider_id: ProviderId = pydantic.Field(alias=str("providerId")) # type: ignore[literal-required] - """ - The ID of the User in the external authentication provider. This value is determined by the authentication provider. - At most one User can have a given provider ID in a given Realm. - """ - - -class Role(core.ModelBase): - """Role""" - - id: core_models.RoleId - display_name: RoleDisplayName = pydantic.Field(alias=str("displayName")) # type: ignore[literal-required] - description: RoleDescription - operations: typing.List[str] - """A list of permissions that this role has.""" - - can_assigns: typing.List[core_models.RoleId] = pydantic.Field(alias=str("canAssigns")) # type: ignore[literal-required] - """A list of roles that this role inherits.""" - - -RoleDescription = str -"""RoleDescription""" - - -RoleDisplayName = str -"""RoleDisplayName""" - - -class SamlAuthenticationProtocol(core.ModelBase): - """SamlAuthenticationProtocol""" - - service_provider_metadata: SamlServiceProviderMetadata = pydantic.Field(alias=str("serviceProviderMetadata")) # type: ignore[literal-required] - type: typing.Literal["saml"] = "saml" - - -class SamlServiceProviderMetadata(core.ModelBase): - """Information that describes a Foundry Authentication Provider as a SAML service provider. All information listed here is generated by Foundry.""" - - entity_id: str = pydantic.Field(alias=str("entityId")) # type: ignore[literal-required] - """The static SAML entity ID that represents this service provider.""" - - metadata_url: str = pydantic.Field(alias=str("metadataUrl")) # type: ignore[literal-required] - """A public URL from which this service provider metadata can be downloaded as XML.""" - - acs_urls: typing.List[str] = pydantic.Field(alias=str("acsUrls")) # type: ignore[literal-required] - """ - The Assertion Consumer Service (ACS) URLs for this service provider, to which the SAML identity provider - redirects authentication responses. - """ - - logout_urls: typing.List[str] = pydantic.Field(alias=str("logoutUrls")) # type: ignore[literal-required] - """The URLs for this service provider to which the SAML identity provider sends logout requests.""" - - certificates: typing.List[CertificateInfo] - - -class SearchGroupsRequest(core.ModelBase): - """SearchGroupsRequest""" - - where: GroupSearchFilter - page_size: typing.Optional[core_models.PageSize] = pydantic.Field(alias=str("pageSize"), default=None) # type: ignore[literal-required] - page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("pageToken"), default=None) # type: ignore[literal-required] - - -class SearchGroupsResponse(core.ModelBase): - """SearchGroupsResponse""" - - data: typing.List[Group] - next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] - - -class SearchUsersRequest(core.ModelBase): - """SearchUsersRequest""" - - where: UserSearchFilter - page_size: typing.Optional[core_models.PageSize] = pydantic.Field(alias=str("pageSize"), default=None) # type: ignore[literal-required] - page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("pageToken"), default=None) # type: ignore[literal-required] - - -class SearchUsersResponse(core.ModelBase): - """SearchUsersResponse""" - - data: typing.List[User] - next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] - - -class User(core.ModelBase): - """User""" - - id: core_models.UserId - username: UserUsername - """The Foundry username of the User. This is unique within the realm.""" - - given_name: typing.Optional[str] = pydantic.Field(alias=str("givenName"), default=None) # type: ignore[literal-required] - """The given name of the User.""" - - family_name: typing.Optional[str] = pydantic.Field(alias=str("familyName"), default=None) # type: ignore[literal-required] - """The family name (last name) of the User.""" - - email: typing.Optional[str] = None - """The email at which to contact a User. Multiple users may have the same email address.""" - - realm: core_models.Realm - organization: typing.Optional[core_models.OrganizationRid] = None - """The RID of the user's primary Organization. This will be blank for third-party application service users.""" - - status: core_models.UserStatus - """The current status of the user.""" - - attributes: typing.Dict[AttributeName, AttributeValues] - """ - A map of the User's attributes. Attributes prefixed with "multipass:" are reserved for internal use by - Foundry and are subject to change. Additional attributes may be configured by Foundry administrators in - Control Panel and populated by the User's SSO provider upon login. - """ - - -class UserProviderInfo(core.ModelBase): - """UserProviderInfo""" - - provider_id: ProviderId = pydantic.Field(alias=str("providerId")) # type: ignore[literal-required] - """ - The ID of the User in the external authentication provider. This value is determined by the authentication provider. - At most one User can have a given provider ID in a given Realm. - """ - - -class UserSearchFilter(core.ModelBase): - """UserSearchFilter""" - - type: PrincipalFilterType - value: str - - -UserUsername = str -"""The Foundry username of the User. This is unique within the realm.""" - - -core.resolve_forward_references(AttributeValues, globalns=globals(), localns=locals()) -core.resolve_forward_references(AuthenticationProtocol, globalns=globals(), localns=locals()) - -__all__ = [ - "AddEnrollmentRoleAssignmentsRequest", - "AddGroupMembersRequest", - "AddMarkingMembersRequest", - "AddMarkingRoleAssignmentsRequest", - "AddOrganizationRoleAssignmentsRequest", - "AttributeName", - "AttributeValue", - "AttributeValues", - "AuthenticationProtocol", - "AuthenticationProvider", - "AuthenticationProviderEnabled", - "AuthenticationProviderName", - "AuthenticationProviderRid", - "CertificateInfo", - "CertificateUsageType", - "CreateGroupRequest", - "CreateMarkingRequest", - "CreateOrganizationRequest", - "Enrollment", - "EnrollmentName", - "EnrollmentRoleAssignment", - "GetGroupsBatchRequestElement", - "GetGroupsBatchResponse", - "GetMarkingsBatchRequestElement", - "GetMarkingsBatchResponse", - "GetRolesBatchRequestElement", - "GetRolesBatchResponse", - "GetUserMarkingsResponse", - "GetUsersBatchRequestElement", - "GetUsersBatchResponse", - "Group", - "GroupMember", - "GroupMembership", - "GroupMembershipExpiration", - "GroupMembershipExpirationPolicy", - "GroupName", - "GroupProviderInfo", - "GroupSearchFilter", - "Host", - "HostName", - "ListAuthenticationProvidersResponse", - "ListAvailableOrganizationRolesResponse", - "ListEnrollmentRoleAssignmentsResponse", - "ListGroupMembersResponse", - "ListGroupMembershipsResponse", - "ListGroupsResponse", - "ListHostsResponse", - "ListMarkingCategoriesResponse", - "ListMarkingMembersResponse", - "ListMarkingRoleAssignmentsResponse", - "ListMarkingsResponse", - "ListOrganizationRoleAssignmentsResponse", - "ListUsersResponse", - "Marking", - "MarkingCategory", - "MarkingCategoryId", - "MarkingCategoryName", - "MarkingCategoryType", - "MarkingMember", - "MarkingName", - "MarkingRole", - "MarkingRoleAssignment", - "MarkingRoleUpdate", - "MarkingType", - "OidcAuthenticationProtocol", - "Organization", - "OrganizationName", - "OrganizationRoleAssignment", - "PreregisterGroupRequest", - "PreregisterUserRequest", - "PrincipalFilterType", - "ProviderId", - "RemoveEnrollmentRoleAssignmentsRequest", - "RemoveGroupMembersRequest", - "RemoveMarkingMembersRequest", - "RemoveMarkingRoleAssignmentsRequest", - "RemoveOrganizationRoleAssignmentsRequest", - "ReplaceGroupMembershipExpirationPolicyRequest", - "ReplaceGroupProviderInfoRequest", - "ReplaceMarkingRequest", - "ReplaceOrganizationRequest", - "ReplaceUserProviderInfoRequest", - "Role", - "RoleDescription", - "RoleDisplayName", - "SamlAuthenticationProtocol", - "SamlServiceProviderMetadata", - "SearchGroupsRequest", - "SearchGroupsResponse", - "SearchUsersRequest", - "SearchUsersResponse", - "User", - "UserProviderInfo", - "UserSearchFilter", - "UserUsername", -] diff --git a/foundry_sdk/v2/admin/organization.py b/foundry_sdk/v2/admin/organization.py deleted file mode 100644 index ba4e826d5..000000000 --- a/foundry_sdk/v2/admin/organization.py +++ /dev/null @@ -1,642 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing -from functools import cached_property - -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v2.admin import errors as admin_errors -from foundry_sdk.v2.admin import models as admin_models -from foundry_sdk.v2.core import models as core_models - - -class OrganizationClient: - """ - The API client for the Organization Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _OrganizationClientStreaming(self) - self.with_raw_response = _OrganizationClientRaw(self) - - @cached_property - def OrganizationRoleAssignment(self): - from foundry_sdk.v2.admin.organization_role_assignment import ( - OrganizationRoleAssignmentClient, - ) # NOQA - - return OrganizationRoleAssignmentClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def create( - self, - *, - administrators: typing.List[core_models.PrincipalId], - enrollment_rid: core_models.EnrollmentRid, - name: admin_models.OrganizationName, - description: typing.Optional[str] = None, - host: typing.Optional[admin_models.HostName] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> admin_models.Organization: - """ - Creates a new Organization. - :param administrators: The initial administrators of the Organization. At least one principal must be provided. - :type administrators: List[PrincipalId] - :param enrollment_rid: The RID of the Enrollment that this Organization belongs to. This must be provided. - :type enrollment_rid: EnrollmentRid - :param name: - :type name: OrganizationName - :param description: - :type description: Optional[str] - :param host: The primary host name of the Organization. This should be used when constructing URLs for users of this Organization. - :type host: Optional[HostName] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: admin_models.Organization - - :raises CreateOrganizationMissingInitialAdminRole: At least one organization:administrator role grant must be provided when creating a organization. - :raises CreateOrganizationPermissionDenied: Could not create the Organization. - :raises EnrollmentNotFound: The given Enrollment could not be found. - :raises OrganizationNameAlreadyExists: An organization with the same name already exists. - :raises OrganizationNotFound: The given Organization could not be found. - :raises PrincipalNotFound: A principal (User or Group) with the given PrincipalId could not be found - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/admin/organizations", - query_params={ - "preview": preview, - }, - path_params={}, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=admin_models.CreateOrganizationRequest( - administrators=administrators, - enrollment_rid=enrollment_rid, - name=name, - host=host, - description=description, - ), - response_type=admin_models.Organization, - request_timeout=request_timeout, - throwable_errors={ - "CreateOrganizationMissingInitialAdminRole": admin_errors.CreateOrganizationMissingInitialAdminRole, - "CreateOrganizationPermissionDenied": admin_errors.CreateOrganizationPermissionDenied, - "EnrollmentNotFound": admin_errors.EnrollmentNotFound, - "OrganizationNameAlreadyExists": admin_errors.OrganizationNameAlreadyExists, - "OrganizationNotFound": admin_errors.OrganizationNotFound, - "PrincipalNotFound": admin_errors.PrincipalNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - organization_rid: core_models.OrganizationRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> admin_models.Organization: - """ - Get the Organization with the specified rid. - :param organization_rid: - :type organization_rid: OrganizationRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: admin_models.Organization - - :raises OrganizationNotFound: The given Organization could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/admin/organizations/{organizationRid}", - query_params={ - "preview": preview, - }, - path_params={ - "organizationRid": organization_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=admin_models.Organization, - request_timeout=request_timeout, - throwable_errors={ - "OrganizationNotFound": admin_errors.OrganizationNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def list_available_roles( - self, - organization_rid: core_models.OrganizationRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> admin_models.ListAvailableOrganizationRolesResponse: - """ - List all roles that can be assigned to a principal for the given Organization. - - :param organization_rid: - :type organization_rid: OrganizationRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: admin_models.ListAvailableOrganizationRolesResponse - - :raises ListAvailableRolesOrganizationPermissionDenied: Could not listAvailableRoles the Organization. - :raises OrganizationNotFound: The given Organization could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/admin/organizations/{organizationRid}/listAvailableRoles", - query_params={ - "preview": preview, - }, - path_params={ - "organizationRid": organization_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=admin_models.ListAvailableOrganizationRolesResponse, - request_timeout=request_timeout, - throwable_errors={ - "ListAvailableRolesOrganizationPermissionDenied": admin_errors.ListAvailableRolesOrganizationPermissionDenied, - "OrganizationNotFound": admin_errors.OrganizationNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def replace( - self, - organization_rid: core_models.OrganizationRid, - *, - name: admin_models.OrganizationName, - description: typing.Optional[str] = None, - host: typing.Optional[admin_models.HostName] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> admin_models.Organization: - """ - Replace the Organization with the specified rid. - :param organization_rid: - :type organization_rid: OrganizationRid - :param name: - :type name: OrganizationName - :param description: - :type description: Optional[str] - :param host: The primary host name of the Organization. This should be used when constructing URLs for users of this Organization. - :type host: Optional[HostName] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: admin_models.Organization - - :raises InvalidHostName: The provided hostname must be a valid domain name. The only allowed characters are letters, numbers, periods, and hyphens. - :raises OrganizationNameAlreadyExists: An organization with the same name already exists. - :raises OrganizationNotFound: The given Organization could not be found. - :raises ReplaceOrganizationPermissionDenied: Could not replace the Organization. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="PUT", - resource_path="/v2/admin/organizations/{organizationRid}", - query_params={ - "preview": preview, - }, - path_params={ - "organizationRid": organization_rid, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=admin_models.ReplaceOrganizationRequest( - name=name, - host=host, - description=description, - ), - response_type=admin_models.Organization, - request_timeout=request_timeout, - throwable_errors={ - "InvalidHostName": admin_errors.InvalidHostName, - "OrganizationNameAlreadyExists": admin_errors.OrganizationNameAlreadyExists, - "OrganizationNotFound": admin_errors.OrganizationNotFound, - "ReplaceOrganizationPermissionDenied": admin_errors.ReplaceOrganizationPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _OrganizationClientRaw: - def __init__(self, client: OrganizationClient) -> None: - def create(_: admin_models.Organization): ... - def get(_: admin_models.Organization): ... - def list_available_roles(_: admin_models.ListAvailableOrganizationRolesResponse): ... - def replace(_: admin_models.Organization): ... - - self.create = core.with_raw_response(create, client.create) - self.get = core.with_raw_response(get, client.get) - self.list_available_roles = core.with_raw_response( - list_available_roles, client.list_available_roles - ) - self.replace = core.with_raw_response(replace, client.replace) - - -class _OrganizationClientStreaming: - def __init__(self, client: OrganizationClient) -> None: - def create(_: admin_models.Organization): ... - def get(_: admin_models.Organization): ... - def list_available_roles(_: admin_models.ListAvailableOrganizationRolesResponse): ... - def replace(_: admin_models.Organization): ... - - self.create = core.with_streaming_response(create, client.create) - self.get = core.with_streaming_response(get, client.get) - self.list_available_roles = core.with_streaming_response( - list_available_roles, client.list_available_roles - ) - self.replace = core.with_streaming_response(replace, client.replace) - - -class AsyncOrganizationClient: - """ - The API client for the Organization Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AsyncOrganizationClientStreaming(self) - self.with_raw_response = _AsyncOrganizationClientRaw(self) - - @cached_property - def OrganizationRoleAssignment(self): - from foundry_sdk.v2.admin.organization_role_assignment import ( - AsyncOrganizationRoleAssignmentClient, - ) # NOQA - - return AsyncOrganizationRoleAssignmentClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def create( - self, - *, - administrators: typing.List[core_models.PrincipalId], - enrollment_rid: core_models.EnrollmentRid, - name: admin_models.OrganizationName, - description: typing.Optional[str] = None, - host: typing.Optional[admin_models.HostName] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[admin_models.Organization]: - """ - Creates a new Organization. - :param administrators: The initial administrators of the Organization. At least one principal must be provided. - :type administrators: List[PrincipalId] - :param enrollment_rid: The RID of the Enrollment that this Organization belongs to. This must be provided. - :type enrollment_rid: EnrollmentRid - :param name: - :type name: OrganizationName - :param description: - :type description: Optional[str] - :param host: The primary host name of the Organization. This should be used when constructing URLs for users of this Organization. - :type host: Optional[HostName] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[admin_models.Organization] - - :raises CreateOrganizationMissingInitialAdminRole: At least one organization:administrator role grant must be provided when creating a organization. - :raises CreateOrganizationPermissionDenied: Could not create the Organization. - :raises EnrollmentNotFound: The given Enrollment could not be found. - :raises OrganizationNameAlreadyExists: An organization with the same name already exists. - :raises OrganizationNotFound: The given Organization could not be found. - :raises PrincipalNotFound: A principal (User or Group) with the given PrincipalId could not be found - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/admin/organizations", - query_params={ - "preview": preview, - }, - path_params={}, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=admin_models.CreateOrganizationRequest( - administrators=administrators, - enrollment_rid=enrollment_rid, - name=name, - host=host, - description=description, - ), - response_type=admin_models.Organization, - request_timeout=request_timeout, - throwable_errors={ - "CreateOrganizationMissingInitialAdminRole": admin_errors.CreateOrganizationMissingInitialAdminRole, - "CreateOrganizationPermissionDenied": admin_errors.CreateOrganizationPermissionDenied, - "EnrollmentNotFound": admin_errors.EnrollmentNotFound, - "OrganizationNameAlreadyExists": admin_errors.OrganizationNameAlreadyExists, - "OrganizationNotFound": admin_errors.OrganizationNotFound, - "PrincipalNotFound": admin_errors.PrincipalNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - organization_rid: core_models.OrganizationRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[admin_models.Organization]: - """ - Get the Organization with the specified rid. - :param organization_rid: - :type organization_rid: OrganizationRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[admin_models.Organization] - - :raises OrganizationNotFound: The given Organization could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/admin/organizations/{organizationRid}", - query_params={ - "preview": preview, - }, - path_params={ - "organizationRid": organization_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=admin_models.Organization, - request_timeout=request_timeout, - throwable_errors={ - "OrganizationNotFound": admin_errors.OrganizationNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def list_available_roles( - self, - organization_rid: core_models.OrganizationRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[admin_models.ListAvailableOrganizationRolesResponse]: - """ - List all roles that can be assigned to a principal for the given Organization. - - :param organization_rid: - :type organization_rid: OrganizationRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[admin_models.ListAvailableOrganizationRolesResponse] - - :raises ListAvailableRolesOrganizationPermissionDenied: Could not listAvailableRoles the Organization. - :raises OrganizationNotFound: The given Organization could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/admin/organizations/{organizationRid}/listAvailableRoles", - query_params={ - "preview": preview, - }, - path_params={ - "organizationRid": organization_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=admin_models.ListAvailableOrganizationRolesResponse, - request_timeout=request_timeout, - throwable_errors={ - "ListAvailableRolesOrganizationPermissionDenied": admin_errors.ListAvailableRolesOrganizationPermissionDenied, - "OrganizationNotFound": admin_errors.OrganizationNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def replace( - self, - organization_rid: core_models.OrganizationRid, - *, - name: admin_models.OrganizationName, - description: typing.Optional[str] = None, - host: typing.Optional[admin_models.HostName] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[admin_models.Organization]: - """ - Replace the Organization with the specified rid. - :param organization_rid: - :type organization_rid: OrganizationRid - :param name: - :type name: OrganizationName - :param description: - :type description: Optional[str] - :param host: The primary host name of the Organization. This should be used when constructing URLs for users of this Organization. - :type host: Optional[HostName] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[admin_models.Organization] - - :raises InvalidHostName: The provided hostname must be a valid domain name. The only allowed characters are letters, numbers, periods, and hyphens. - :raises OrganizationNameAlreadyExists: An organization with the same name already exists. - :raises OrganizationNotFound: The given Organization could not be found. - :raises ReplaceOrganizationPermissionDenied: Could not replace the Organization. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="PUT", - resource_path="/v2/admin/organizations/{organizationRid}", - query_params={ - "preview": preview, - }, - path_params={ - "organizationRid": organization_rid, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=admin_models.ReplaceOrganizationRequest( - name=name, - host=host, - description=description, - ), - response_type=admin_models.Organization, - request_timeout=request_timeout, - throwable_errors={ - "InvalidHostName": admin_errors.InvalidHostName, - "OrganizationNameAlreadyExists": admin_errors.OrganizationNameAlreadyExists, - "OrganizationNotFound": admin_errors.OrganizationNotFound, - "ReplaceOrganizationPermissionDenied": admin_errors.ReplaceOrganizationPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _AsyncOrganizationClientRaw: - def __init__(self, client: AsyncOrganizationClient) -> None: - def create(_: admin_models.Organization): ... - def get(_: admin_models.Organization): ... - def list_available_roles(_: admin_models.ListAvailableOrganizationRolesResponse): ... - def replace(_: admin_models.Organization): ... - - self.create = core.async_with_raw_response(create, client.create) - self.get = core.async_with_raw_response(get, client.get) - self.list_available_roles = core.async_with_raw_response( - list_available_roles, client.list_available_roles - ) - self.replace = core.async_with_raw_response(replace, client.replace) - - -class _AsyncOrganizationClientStreaming: - def __init__(self, client: AsyncOrganizationClient) -> None: - def create(_: admin_models.Organization): ... - def get(_: admin_models.Organization): ... - def list_available_roles(_: admin_models.ListAvailableOrganizationRolesResponse): ... - def replace(_: admin_models.Organization): ... - - self.create = core.async_with_streaming_response(create, client.create) - self.get = core.async_with_streaming_response(get, client.get) - self.list_available_roles = core.async_with_streaming_response( - list_available_roles, client.list_available_roles - ) - self.replace = core.async_with_streaming_response(replace, client.replace) diff --git a/foundry_sdk/v2/admin/organization_role_assignment.py b/foundry_sdk/v2/admin/organization_role_assignment.py deleted file mode 100644 index 37f0cd0ec..000000000 --- a/foundry_sdk/v2/admin/organization_role_assignment.py +++ /dev/null @@ -1,443 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing - -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v2.admin import errors as admin_errors -from foundry_sdk.v2.admin import models as admin_models -from foundry_sdk.v2.core import models as core_models - - -class OrganizationRoleAssignmentClient: - """ - The API client for the OrganizationRoleAssignment Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _OrganizationRoleAssignmentClientStreaming(self) - self.with_raw_response = _OrganizationRoleAssignmentClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def add( - self, - organization_rid: core_models.OrganizationRid, - *, - role_assignments: typing.List[core_models.RoleAssignmentUpdate], - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> None: - """ - Assign roles to principals for the given Organization. At most 100 role assignments can be added in a single request. - - :param organization_rid: - :type organization_rid: OrganizationRid - :param role_assignments: - :type role_assignments: List[RoleAssignmentUpdate] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: None - - :raises AddOrganizationRoleAssignmentsPermissionDenied: Could not add the OrganizationRoleAssignment. - :raises OrganizationNotFound: The given Organization could not be found. - :raises PrincipalNotFound: A principal (User or Group) with the given PrincipalId could not be found - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/admin/organizations/{organizationRid}/roleAssignments/add", - query_params={ - "preview": preview, - }, - path_params={ - "organizationRid": organization_rid, - }, - header_params={ - "Content-Type": "application/json", - }, - body=admin_models.AddOrganizationRoleAssignmentsRequest( - role_assignments=role_assignments, - ), - response_type=None, - request_timeout=request_timeout, - throwable_errors={ - "AddOrganizationRoleAssignmentsPermissionDenied": admin_errors.AddOrganizationRoleAssignmentsPermissionDenied, - "OrganizationNotFound": admin_errors.OrganizationNotFound, - "PrincipalNotFound": admin_errors.PrincipalNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def list( - self, - organization_rid: core_models.OrganizationRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> admin_models.ListOrganizationRoleAssignmentsResponse: - """ - List all principals who are assigned a role for the given Organization. - - :param organization_rid: - :type organization_rid: OrganizationRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: admin_models.ListOrganizationRoleAssignmentsResponse - - :raises ListOrganizationRoleAssignmentsPermissionDenied: The provided token does not have permission to list assigned roles for this organization. - :raises OrganizationNotFound: The given Organization could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/admin/organizations/{organizationRid}/roleAssignments", - query_params={ - "preview": preview, - }, - path_params={ - "organizationRid": organization_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=admin_models.ListOrganizationRoleAssignmentsResponse, - request_timeout=request_timeout, - throwable_errors={ - "ListOrganizationRoleAssignmentsPermissionDenied": admin_errors.ListOrganizationRoleAssignmentsPermissionDenied, - "OrganizationNotFound": admin_errors.OrganizationNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def remove( - self, - organization_rid: core_models.OrganizationRid, - *, - role_assignments: typing.List[core_models.RoleAssignmentUpdate], - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> None: - """ - Remove roles from principals for the given Organization. At most 100 role assignments can be removed in a single request. - - :param organization_rid: - :type organization_rid: OrganizationRid - :param role_assignments: - :type role_assignments: List[RoleAssignmentUpdate] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: None - - :raises OrganizationNotFound: The given Organization could not be found. - :raises PrincipalNotFound: A principal (User or Group) with the given PrincipalId could not be found - :raises RemoveOrganizationRoleAssignmentsPermissionDenied: Could not remove the OrganizationRoleAssignment. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/admin/organizations/{organizationRid}/roleAssignments/remove", - query_params={ - "preview": preview, - }, - path_params={ - "organizationRid": organization_rid, - }, - header_params={ - "Content-Type": "application/json", - }, - body=admin_models.RemoveOrganizationRoleAssignmentsRequest( - role_assignments=role_assignments, - ), - response_type=None, - request_timeout=request_timeout, - throwable_errors={ - "OrganizationNotFound": admin_errors.OrganizationNotFound, - "PrincipalNotFound": admin_errors.PrincipalNotFound, - "RemoveOrganizationRoleAssignmentsPermissionDenied": admin_errors.RemoveOrganizationRoleAssignmentsPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _OrganizationRoleAssignmentClientRaw: - def __init__(self, client: OrganizationRoleAssignmentClient) -> None: - def add(_: None): ... - def list(_: admin_models.ListOrganizationRoleAssignmentsResponse): ... - def remove(_: None): ... - - self.add = core.with_raw_response(add, client.add) - self.list = core.with_raw_response(list, client.list) - self.remove = core.with_raw_response(remove, client.remove) - - -class _OrganizationRoleAssignmentClientStreaming: - def __init__(self, client: OrganizationRoleAssignmentClient) -> None: - def list(_: admin_models.ListOrganizationRoleAssignmentsResponse): ... - - self.list = core.with_streaming_response(list, client.list) - - -class AsyncOrganizationRoleAssignmentClient: - """ - The API client for the OrganizationRoleAssignment Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AsyncOrganizationRoleAssignmentClientStreaming(self) - self.with_raw_response = _AsyncOrganizationRoleAssignmentClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def add( - self, - organization_rid: core_models.OrganizationRid, - *, - role_assignments: typing.List[core_models.RoleAssignmentUpdate], - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[None]: - """ - Assign roles to principals for the given Organization. At most 100 role assignments can be added in a single request. - - :param organization_rid: - :type organization_rid: OrganizationRid - :param role_assignments: - :type role_assignments: List[RoleAssignmentUpdate] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[None] - - :raises AddOrganizationRoleAssignmentsPermissionDenied: Could not add the OrganizationRoleAssignment. - :raises OrganizationNotFound: The given Organization could not be found. - :raises PrincipalNotFound: A principal (User or Group) with the given PrincipalId could not be found - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/admin/organizations/{organizationRid}/roleAssignments/add", - query_params={ - "preview": preview, - }, - path_params={ - "organizationRid": organization_rid, - }, - header_params={ - "Content-Type": "application/json", - }, - body=admin_models.AddOrganizationRoleAssignmentsRequest( - role_assignments=role_assignments, - ), - response_type=None, - request_timeout=request_timeout, - throwable_errors={ - "AddOrganizationRoleAssignmentsPermissionDenied": admin_errors.AddOrganizationRoleAssignmentsPermissionDenied, - "OrganizationNotFound": admin_errors.OrganizationNotFound, - "PrincipalNotFound": admin_errors.PrincipalNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def list( - self, - organization_rid: core_models.OrganizationRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[admin_models.ListOrganizationRoleAssignmentsResponse]: - """ - List all principals who are assigned a role for the given Organization. - - :param organization_rid: - :type organization_rid: OrganizationRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[admin_models.ListOrganizationRoleAssignmentsResponse] - - :raises ListOrganizationRoleAssignmentsPermissionDenied: The provided token does not have permission to list assigned roles for this organization. - :raises OrganizationNotFound: The given Organization could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/admin/organizations/{organizationRid}/roleAssignments", - query_params={ - "preview": preview, - }, - path_params={ - "organizationRid": organization_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=admin_models.ListOrganizationRoleAssignmentsResponse, - request_timeout=request_timeout, - throwable_errors={ - "ListOrganizationRoleAssignmentsPermissionDenied": admin_errors.ListOrganizationRoleAssignmentsPermissionDenied, - "OrganizationNotFound": admin_errors.OrganizationNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def remove( - self, - organization_rid: core_models.OrganizationRid, - *, - role_assignments: typing.List[core_models.RoleAssignmentUpdate], - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[None]: - """ - Remove roles from principals for the given Organization. At most 100 role assignments can be removed in a single request. - - :param organization_rid: - :type organization_rid: OrganizationRid - :param role_assignments: - :type role_assignments: List[RoleAssignmentUpdate] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[None] - - :raises OrganizationNotFound: The given Organization could not be found. - :raises PrincipalNotFound: A principal (User or Group) with the given PrincipalId could not be found - :raises RemoveOrganizationRoleAssignmentsPermissionDenied: Could not remove the OrganizationRoleAssignment. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/admin/organizations/{organizationRid}/roleAssignments/remove", - query_params={ - "preview": preview, - }, - path_params={ - "organizationRid": organization_rid, - }, - header_params={ - "Content-Type": "application/json", - }, - body=admin_models.RemoveOrganizationRoleAssignmentsRequest( - role_assignments=role_assignments, - ), - response_type=None, - request_timeout=request_timeout, - throwable_errors={ - "OrganizationNotFound": admin_errors.OrganizationNotFound, - "PrincipalNotFound": admin_errors.PrincipalNotFound, - "RemoveOrganizationRoleAssignmentsPermissionDenied": admin_errors.RemoveOrganizationRoleAssignmentsPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _AsyncOrganizationRoleAssignmentClientRaw: - def __init__(self, client: AsyncOrganizationRoleAssignmentClient) -> None: - def add(_: None): ... - def list(_: admin_models.ListOrganizationRoleAssignmentsResponse): ... - def remove(_: None): ... - - self.add = core.async_with_raw_response(add, client.add) - self.list = core.async_with_raw_response(list, client.list) - self.remove = core.async_with_raw_response(remove, client.remove) - - -class _AsyncOrganizationRoleAssignmentClientStreaming: - def __init__(self, client: AsyncOrganizationRoleAssignmentClient) -> None: - def list(_: admin_models.ListOrganizationRoleAssignmentsResponse): ... - - self.list = core.async_with_streaming_response(list, client.list) diff --git a/foundry_sdk/v2/admin/role.py b/foundry_sdk/v2/admin/role.py deleted file mode 100644 index e2d940487..000000000 --- a/foundry_sdk/v2/admin/role.py +++ /dev/null @@ -1,302 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing - -import annotated_types -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v2.admin import errors as admin_errors -from foundry_sdk.v2.admin import models as admin_models -from foundry_sdk.v2.core import models as core_models - - -class RoleClient: - """ - The API client for the Role Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _RoleClientStreaming(self) - self.with_raw_response = _RoleClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - role_id: core_models.RoleId, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> admin_models.Role: - """ - Get the Role with the specified id. - :param role_id: - :type role_id: RoleId - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: admin_models.Role - - :raises RoleNotFound: The given Role could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/admin/roles/{roleId}", - query_params={ - "preview": preview, - }, - path_params={ - "roleId": role_id, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=admin_models.Role, - request_timeout=request_timeout, - throwable_errors={ - "RoleNotFound": admin_errors.RoleNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get_batch( - self, - body: typing_extensions.Annotated[ - typing.List[admin_models.GetRolesBatchRequestElement], - annotated_types.Len(min_length=1, max_length=500), - ], - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> admin_models.GetRolesBatchResponse: - """ - Execute multiple get requests on Role. - - The maximum batch size for this endpoint is 500. - :param body: Body of the request - :type body: List[GetRolesBatchRequestElement] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: admin_models.GetRolesBatchResponse - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/admin/roles/getBatch", - query_params={ - "preview": preview, - }, - path_params={}, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=body, - response_type=admin_models.GetRolesBatchResponse, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _RoleClientRaw: - def __init__(self, client: RoleClient) -> None: - def get(_: admin_models.Role): ... - def get_batch(_: admin_models.GetRolesBatchResponse): ... - - self.get = core.with_raw_response(get, client.get) - self.get_batch = core.with_raw_response(get_batch, client.get_batch) - - -class _RoleClientStreaming: - def __init__(self, client: RoleClient) -> None: - def get(_: admin_models.Role): ... - def get_batch(_: admin_models.GetRolesBatchResponse): ... - - self.get = core.with_streaming_response(get, client.get) - self.get_batch = core.with_streaming_response(get_batch, client.get_batch) - - -class AsyncRoleClient: - """ - The API client for the Role Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AsyncRoleClientStreaming(self) - self.with_raw_response = _AsyncRoleClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - role_id: core_models.RoleId, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[admin_models.Role]: - """ - Get the Role with the specified id. - :param role_id: - :type role_id: RoleId - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[admin_models.Role] - - :raises RoleNotFound: The given Role could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/admin/roles/{roleId}", - query_params={ - "preview": preview, - }, - path_params={ - "roleId": role_id, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=admin_models.Role, - request_timeout=request_timeout, - throwable_errors={ - "RoleNotFound": admin_errors.RoleNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get_batch( - self, - body: typing_extensions.Annotated[ - typing.List[admin_models.GetRolesBatchRequestElement], - annotated_types.Len(min_length=1, max_length=500), - ], - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[admin_models.GetRolesBatchResponse]: - """ - Execute multiple get requests on Role. - - The maximum batch size for this endpoint is 500. - :param body: Body of the request - :type body: List[GetRolesBatchRequestElement] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[admin_models.GetRolesBatchResponse] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/admin/roles/getBatch", - query_params={ - "preview": preview, - }, - path_params={}, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=body, - response_type=admin_models.GetRolesBatchResponse, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _AsyncRoleClientRaw: - def __init__(self, client: AsyncRoleClient) -> None: - def get(_: admin_models.Role): ... - def get_batch(_: admin_models.GetRolesBatchResponse): ... - - self.get = core.async_with_raw_response(get, client.get) - self.get_batch = core.async_with_raw_response(get_batch, client.get_batch) - - -class _AsyncRoleClientStreaming: - def __init__(self, client: AsyncRoleClient) -> None: - def get(_: admin_models.Role): ... - def get_batch(_: admin_models.GetRolesBatchResponse): ... - - self.get = core.async_with_streaming_response(get, client.get) - self.get_batch = core.async_with_streaming_response(get_batch, client.get_batch) diff --git a/foundry_sdk/v2/admin/user.py b/foundry_sdk/v2/admin/user.py deleted file mode 100644 index 5aa581548..000000000 --- a/foundry_sdk/v2/admin/user.py +++ /dev/null @@ -1,1094 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing -from functools import cached_property - -import annotated_types -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v2.admin import errors as admin_errors -from foundry_sdk.v2.admin import models as admin_models -from foundry_sdk.v2.core import errors as core_errors -from foundry_sdk.v2.core import models as core_models - - -class UserClient: - """ - The API client for the User Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _UserClientStreaming(self) - self.with_raw_response = _UserClientRaw(self) - - @cached_property - def ProviderInfo(self): - from foundry_sdk.v2.admin.user_provider_info import UserProviderInfoClient - - return UserProviderInfoClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @cached_property - def GroupMembership(self): - from foundry_sdk.v2.admin.group_membership import GroupMembershipClient - - return GroupMembershipClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def delete( - self, - user_id: core_models.UserId, - *, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> None: - """ - Delete the User with the specified id. - :param user_id: - :type user_id: UserId - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: None - - :raises DeleteUserPermissionDenied: Could not delete the User. - :raises UserDeleted: The user is deleted. - :raises UserNotFound: The given User could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="DELETE", - resource_path="/v2/admin/users/{userId}", - query_params={}, - path_params={ - "userId": user_id, - }, - header_params={}, - body=None, - response_type=None, - request_timeout=request_timeout, - throwable_errors={ - "DeleteUserPermissionDenied": admin_errors.DeleteUserPermissionDenied, - "UserDeleted": admin_errors.UserDeleted, - "UserNotFound": admin_errors.UserNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - user_id: core_models.UserId, - *, - status: typing.Optional[core_models.UserStatus] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> admin_models.User: - """ - Get the User with the specified id. - :param user_id: - :type user_id: UserId - :param status: - :type status: Optional[UserStatus] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: admin_models.User - - :raises UserDeleted: The user is deleted. - :raises UserIsActive: The user is an active user. - :raises UserNotFound: The given User could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/admin/users/{userId}", - query_params={ - "status": status, - }, - path_params={ - "userId": user_id, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=admin_models.User, - request_timeout=request_timeout, - throwable_errors={ - "UserDeleted": admin_errors.UserDeleted, - "UserIsActive": admin_errors.UserIsActive, - "UserNotFound": admin_errors.UserNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get_batch( - self, - body: typing_extensions.Annotated[ - typing.List[admin_models.GetUsersBatchRequestElement], - annotated_types.Len(min_length=1, max_length=500), - ], - *, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> admin_models.GetUsersBatchResponse: - """ - Execute multiple get requests on User. - - The maximum batch size for this endpoint is 500. - :param body: Body of the request - :type body: List[GetUsersBatchRequestElement] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: admin_models.GetUsersBatchResponse - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/admin/users/getBatch", - query_params={}, - path_params={}, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=body, - response_type=admin_models.GetUsersBatchResponse, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get_current( - self, - *, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> admin_models.User: - """ - - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: admin_models.User - - :raises GetCurrentUserPermissionDenied: Could not getCurrent the User. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/admin/users/getCurrent", - query_params={}, - path_params={}, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=admin_models.User, - request_timeout=request_timeout, - throwable_errors={ - "GetCurrentUserPermissionDenied": admin_errors.GetCurrentUserPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get_markings( - self, - user_id: core_models.UserId, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> admin_models.GetUserMarkingsResponse: - """ - Retrieve Markings that the user is currently a member of. - :param user_id: - :type user_id: UserId - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: admin_models.GetUserMarkingsResponse - - :raises GetMarkingsUserPermissionDenied: Could not getMarkings the User. - :raises UserDeleted: The user is deleted. - :raises UserNotFound: The given User could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/admin/users/{userId}/getMarkings", - query_params={ - "preview": preview, - }, - path_params={ - "userId": user_id, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=admin_models.GetUserMarkingsResponse, - request_timeout=request_timeout, - throwable_errors={ - "GetMarkingsUserPermissionDenied": admin_errors.GetMarkingsUserPermissionDenied, - "UserDeleted": admin_errors.UserDeleted, - "UserNotFound": admin_errors.UserNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def list( - self, - *, - include: typing.Optional[core_models.UserStatus] = None, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.ResourceIterator[admin_models.User]: - """ - Lists all Users. - - This is a paged endpoint. Each page may be smaller or larger than the requested page size. However, it is guaranteed that if there are more results available, the `nextPageToken` field will be populated. To get the next page, make the same request again, but set the value of the `pageToken` query parameter to be value of the `nextPageToken` value of the previous response. If there is no `nextPageToken` field in the response, you are on the last page. - :param include: - :type include: Optional[UserStatus] - :param page_size: The page size to use for the endpoint. - :type page_size: Optional[PageSize] - :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. - :type page_token: Optional[PageToken] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.ResourceIterator[admin_models.User] - - :raises InvalidPageSize: The provided page size was zero or negative. Page sizes must be greater than zero. - :raises UserDeleted: The user is deleted. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/admin/users", - query_params={ - "include": include, - "pageSize": page_size, - "pageToken": page_token, - }, - path_params={}, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=admin_models.ListUsersResponse, - request_timeout=request_timeout, - throwable_errors={ - "InvalidPageSize": core_errors.InvalidPageSize, - "UserDeleted": admin_errors.UserDeleted, - }, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def profile_picture( - self, - user_id: core_models.UserId, - *, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Optional[bytes]: - """ - - :param user_id: - :type user_id: UserId - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Optional[bytes] - - :raises GetProfilePictureOfUserPermissionDenied: Could not profilePicture the User. - :raises InvalidProfilePicture: The user's profile picture is not a valid image - :raises ProfileServiceNotPresent: The Profile service is unexpectedly not present. - :raises UserDeleted: The user is deleted. - :raises UserNotFound: The given User could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/admin/users/{userId}/profilePicture", - query_params={}, - path_params={ - "userId": user_id, - }, - header_params={ - "Accept": "application/octet-stream", - }, - body=None, - response_type=typing.Optional[bytes], - request_timeout=request_timeout, - throwable_errors={ - "GetProfilePictureOfUserPermissionDenied": admin_errors.GetProfilePictureOfUserPermissionDenied, - "InvalidProfilePicture": admin_errors.InvalidProfilePicture, - "ProfileServiceNotPresent": admin_errors.ProfileServiceNotPresent, - "UserDeleted": admin_errors.UserDeleted, - "UserNotFound": admin_errors.UserNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def revoke_all_tokens( - self, - user_id: core_models.UserId, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> None: - """ - Revoke all active authentication tokens for the user including active browser sessions and long-lived - development tokens. If the user has active sessions in a browser, this will force re-authentication. - - The caller must have permission to manage users for the target user's organization. - - :param user_id: - :type user_id: UserId - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: None - - :raises RevokeAllTokensUserPermissionDenied: Could not revokeAllTokens the User. - :raises UserDeleted: The user is deleted. - :raises UserNotFound: The given User could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/admin/users/{userId}/revokeAllTokens", - query_params={ - "preview": preview, - }, - path_params={ - "userId": user_id, - }, - header_params={}, - body=None, - response_type=None, - request_timeout=request_timeout, - throwable_errors={ - "RevokeAllTokensUserPermissionDenied": admin_errors.RevokeAllTokensUserPermissionDenied, - "UserDeleted": admin_errors.UserDeleted, - "UserNotFound": admin_errors.UserNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def search( - self, - *, - where: admin_models.UserSearchFilter, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> admin_models.SearchUsersResponse: - """ - Perform a case-insensitive prefix search for users based on username, given name and family name. - - :param where: - :type where: UserSearchFilter - :param page_size: - :type page_size: Optional[PageSize] - :param page_token: - :type page_token: Optional[PageToken] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: admin_models.SearchUsersResponse - - :raises InvalidPageSize: The provided page size was zero or negative. Page sizes must be greater than zero. - :raises SearchUsersPermissionDenied: Could not search the User. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/admin/users/search", - query_params={}, - path_params={}, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=admin_models.SearchUsersRequest( - where=where, - page_size=page_size, - page_token=page_token, - ), - response_type=admin_models.SearchUsersResponse, - request_timeout=request_timeout, - throwable_errors={ - "InvalidPageSize": core_errors.InvalidPageSize, - "SearchUsersPermissionDenied": admin_errors.SearchUsersPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _UserClientRaw: - def __init__(self, client: UserClient) -> None: - def delete(_: None): ... - def get(_: admin_models.User): ... - def get_batch(_: admin_models.GetUsersBatchResponse): ... - def get_current(_: admin_models.User): ... - def get_markings(_: admin_models.GetUserMarkingsResponse): ... - def list(_: admin_models.ListUsersResponse): ... - def profile_picture(_: typing.Optional[bytes]): ... - def revoke_all_tokens(_: None): ... - def search(_: admin_models.SearchUsersResponse): ... - - self.delete = core.with_raw_response(delete, client.delete) - self.get = core.with_raw_response(get, client.get) - self.get_batch = core.with_raw_response(get_batch, client.get_batch) - self.get_current = core.with_raw_response(get_current, client.get_current) - self.get_markings = core.with_raw_response(get_markings, client.get_markings) - self.list = core.with_raw_response(list, client.list) - self.profile_picture = core.with_raw_response(profile_picture, client.profile_picture) - self.revoke_all_tokens = core.with_raw_response(revoke_all_tokens, client.revoke_all_tokens) - self.search = core.with_raw_response(search, client.search) - - -class _UserClientStreaming: - def __init__(self, client: UserClient) -> None: - def get(_: admin_models.User): ... - def get_batch(_: admin_models.GetUsersBatchResponse): ... - def get_current(_: admin_models.User): ... - def get_markings(_: admin_models.GetUserMarkingsResponse): ... - def list(_: admin_models.ListUsersResponse): ... - def profile_picture(_: typing.Optional[bytes]): ... - def search(_: admin_models.SearchUsersResponse): ... - - self.get = core.with_streaming_response(get, client.get) - self.get_batch = core.with_streaming_response(get_batch, client.get_batch) - self.get_current = core.with_streaming_response(get_current, client.get_current) - self.get_markings = core.with_streaming_response(get_markings, client.get_markings) - self.list = core.with_streaming_response(list, client.list) - self.profile_picture = core.with_streaming_response(profile_picture, client.profile_picture) - self.search = core.with_streaming_response(search, client.search) - - -class AsyncUserClient: - """ - The API client for the User Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AsyncUserClientStreaming(self) - self.with_raw_response = _AsyncUserClientRaw(self) - - @cached_property - def ProviderInfo(self): - from foundry_sdk.v2.admin.user_provider_info import AsyncUserProviderInfoClient - - return AsyncUserProviderInfoClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @cached_property - def GroupMembership(self): - from foundry_sdk.v2.admin.group_membership import AsyncGroupMembershipClient - - return AsyncGroupMembershipClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def delete( - self, - user_id: core_models.UserId, - *, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[None]: - """ - Delete the User with the specified id. - :param user_id: - :type user_id: UserId - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[None] - - :raises DeleteUserPermissionDenied: Could not delete the User. - :raises UserDeleted: The user is deleted. - :raises UserNotFound: The given User could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="DELETE", - resource_path="/v2/admin/users/{userId}", - query_params={}, - path_params={ - "userId": user_id, - }, - header_params={}, - body=None, - response_type=None, - request_timeout=request_timeout, - throwable_errors={ - "DeleteUserPermissionDenied": admin_errors.DeleteUserPermissionDenied, - "UserDeleted": admin_errors.UserDeleted, - "UserNotFound": admin_errors.UserNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - user_id: core_models.UserId, - *, - status: typing.Optional[core_models.UserStatus] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[admin_models.User]: - """ - Get the User with the specified id. - :param user_id: - :type user_id: UserId - :param status: - :type status: Optional[UserStatus] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[admin_models.User] - - :raises UserDeleted: The user is deleted. - :raises UserIsActive: The user is an active user. - :raises UserNotFound: The given User could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/admin/users/{userId}", - query_params={ - "status": status, - }, - path_params={ - "userId": user_id, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=admin_models.User, - request_timeout=request_timeout, - throwable_errors={ - "UserDeleted": admin_errors.UserDeleted, - "UserIsActive": admin_errors.UserIsActive, - "UserNotFound": admin_errors.UserNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get_batch( - self, - body: typing_extensions.Annotated[ - typing.List[admin_models.GetUsersBatchRequestElement], - annotated_types.Len(min_length=1, max_length=500), - ], - *, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[admin_models.GetUsersBatchResponse]: - """ - Execute multiple get requests on User. - - The maximum batch size for this endpoint is 500. - :param body: Body of the request - :type body: List[GetUsersBatchRequestElement] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[admin_models.GetUsersBatchResponse] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/admin/users/getBatch", - query_params={}, - path_params={}, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=body, - response_type=admin_models.GetUsersBatchResponse, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get_current( - self, - *, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[admin_models.User]: - """ - - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[admin_models.User] - - :raises GetCurrentUserPermissionDenied: Could not getCurrent the User. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/admin/users/getCurrent", - query_params={}, - path_params={}, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=admin_models.User, - request_timeout=request_timeout, - throwable_errors={ - "GetCurrentUserPermissionDenied": admin_errors.GetCurrentUserPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get_markings( - self, - user_id: core_models.UserId, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[admin_models.GetUserMarkingsResponse]: - """ - Retrieve Markings that the user is currently a member of. - :param user_id: - :type user_id: UserId - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[admin_models.GetUserMarkingsResponse] - - :raises GetMarkingsUserPermissionDenied: Could not getMarkings the User. - :raises UserDeleted: The user is deleted. - :raises UserNotFound: The given User could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/admin/users/{userId}/getMarkings", - query_params={ - "preview": preview, - }, - path_params={ - "userId": user_id, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=admin_models.GetUserMarkingsResponse, - request_timeout=request_timeout, - throwable_errors={ - "GetMarkingsUserPermissionDenied": admin_errors.GetMarkingsUserPermissionDenied, - "UserDeleted": admin_errors.UserDeleted, - "UserNotFound": admin_errors.UserNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def list( - self, - *, - include: typing.Optional[core_models.UserStatus] = None, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.AsyncResourceIterator[admin_models.User]: - """ - Lists all Users. - - This is a paged endpoint. Each page may be smaller or larger than the requested page size. However, it is guaranteed that if there are more results available, the `nextPageToken` field will be populated. To get the next page, make the same request again, but set the value of the `pageToken` query parameter to be value of the `nextPageToken` value of the previous response. If there is no `nextPageToken` field in the response, you are on the last page. - :param include: - :type include: Optional[UserStatus] - :param page_size: The page size to use for the endpoint. - :type page_size: Optional[PageSize] - :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. - :type page_token: Optional[PageToken] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.AsyncResourceIterator[admin_models.User] - - :raises InvalidPageSize: The provided page size was zero or negative. Page sizes must be greater than zero. - :raises UserDeleted: The user is deleted. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/admin/users", - query_params={ - "include": include, - "pageSize": page_size, - "pageToken": page_token, - }, - path_params={}, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=admin_models.ListUsersResponse, - request_timeout=request_timeout, - throwable_errors={ - "InvalidPageSize": core_errors.InvalidPageSize, - "UserDeleted": admin_errors.UserDeleted, - }, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def profile_picture( - self, - user_id: core_models.UserId, - *, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[typing.Optional[bytes]]: - """ - - :param user_id: - :type user_id: UserId - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[typing.Optional[bytes]] - - :raises GetProfilePictureOfUserPermissionDenied: Could not profilePicture the User. - :raises InvalidProfilePicture: The user's profile picture is not a valid image - :raises ProfileServiceNotPresent: The Profile service is unexpectedly not present. - :raises UserDeleted: The user is deleted. - :raises UserNotFound: The given User could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/admin/users/{userId}/profilePicture", - query_params={}, - path_params={ - "userId": user_id, - }, - header_params={ - "Accept": "application/octet-stream", - }, - body=None, - response_type=typing.Optional[bytes], - request_timeout=request_timeout, - throwable_errors={ - "GetProfilePictureOfUserPermissionDenied": admin_errors.GetProfilePictureOfUserPermissionDenied, - "InvalidProfilePicture": admin_errors.InvalidProfilePicture, - "ProfileServiceNotPresent": admin_errors.ProfileServiceNotPresent, - "UserDeleted": admin_errors.UserDeleted, - "UserNotFound": admin_errors.UserNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def revoke_all_tokens( - self, - user_id: core_models.UserId, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[None]: - """ - Revoke all active authentication tokens for the user including active browser sessions and long-lived - development tokens. If the user has active sessions in a browser, this will force re-authentication. - - The caller must have permission to manage users for the target user's organization. - - :param user_id: - :type user_id: UserId - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[None] - - :raises RevokeAllTokensUserPermissionDenied: Could not revokeAllTokens the User. - :raises UserDeleted: The user is deleted. - :raises UserNotFound: The given User could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/admin/users/{userId}/revokeAllTokens", - query_params={ - "preview": preview, - }, - path_params={ - "userId": user_id, - }, - header_params={}, - body=None, - response_type=None, - request_timeout=request_timeout, - throwable_errors={ - "RevokeAllTokensUserPermissionDenied": admin_errors.RevokeAllTokensUserPermissionDenied, - "UserDeleted": admin_errors.UserDeleted, - "UserNotFound": admin_errors.UserNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def search( - self, - *, - where: admin_models.UserSearchFilter, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[admin_models.SearchUsersResponse]: - """ - Perform a case-insensitive prefix search for users based on username, given name and family name. - - :param where: - :type where: UserSearchFilter - :param page_size: - :type page_size: Optional[PageSize] - :param page_token: - :type page_token: Optional[PageToken] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[admin_models.SearchUsersResponse] - - :raises InvalidPageSize: The provided page size was zero or negative. Page sizes must be greater than zero. - :raises SearchUsersPermissionDenied: Could not search the User. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/admin/users/search", - query_params={}, - path_params={}, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=admin_models.SearchUsersRequest( - where=where, - page_size=page_size, - page_token=page_token, - ), - response_type=admin_models.SearchUsersResponse, - request_timeout=request_timeout, - throwable_errors={ - "InvalidPageSize": core_errors.InvalidPageSize, - "SearchUsersPermissionDenied": admin_errors.SearchUsersPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _AsyncUserClientRaw: - def __init__(self, client: AsyncUserClient) -> None: - def delete(_: None): ... - def get(_: admin_models.User): ... - def get_batch(_: admin_models.GetUsersBatchResponse): ... - def get_current(_: admin_models.User): ... - def get_markings(_: admin_models.GetUserMarkingsResponse): ... - def list(_: admin_models.ListUsersResponse): ... - def profile_picture(_: typing.Optional[bytes]): ... - def revoke_all_tokens(_: None): ... - def search(_: admin_models.SearchUsersResponse): ... - - self.delete = core.async_with_raw_response(delete, client.delete) - self.get = core.async_with_raw_response(get, client.get) - self.get_batch = core.async_with_raw_response(get_batch, client.get_batch) - self.get_current = core.async_with_raw_response(get_current, client.get_current) - self.get_markings = core.async_with_raw_response(get_markings, client.get_markings) - self.list = core.async_with_raw_response(list, client.list) - self.profile_picture = core.async_with_raw_response(profile_picture, client.profile_picture) - self.revoke_all_tokens = core.async_with_raw_response( - revoke_all_tokens, client.revoke_all_tokens - ) - self.search = core.async_with_raw_response(search, client.search) - - -class _AsyncUserClientStreaming: - def __init__(self, client: AsyncUserClient) -> None: - def get(_: admin_models.User): ... - def get_batch(_: admin_models.GetUsersBatchResponse): ... - def get_current(_: admin_models.User): ... - def get_markings(_: admin_models.GetUserMarkingsResponse): ... - def list(_: admin_models.ListUsersResponse): ... - def profile_picture(_: typing.Optional[bytes]): ... - def search(_: admin_models.SearchUsersResponse): ... - - self.get = core.async_with_streaming_response(get, client.get) - self.get_batch = core.async_with_streaming_response(get_batch, client.get_batch) - self.get_current = core.async_with_streaming_response(get_current, client.get_current) - self.get_markings = core.async_with_streaming_response(get_markings, client.get_markings) - self.list = core.async_with_streaming_response(list, client.list) - self.profile_picture = core.async_with_streaming_response( - profile_picture, client.profile_picture - ) - self.search = core.async_with_streaming_response(search, client.search) diff --git a/foundry_sdk/v2/admin/user_provider_info.py b/foundry_sdk/v2/admin/user_provider_info.py deleted file mode 100644 index 9deb2f0e5..000000000 --- a/foundry_sdk/v2/admin/user_provider_info.py +++ /dev/null @@ -1,345 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing - -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v2.admin import errors as admin_errors -from foundry_sdk.v2.admin import models as admin_models -from foundry_sdk.v2.core import models as core_models - - -class UserProviderInfoClient: - """ - The API client for the UserProviderInfo Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _UserProviderInfoClientStreaming(self) - self.with_raw_response = _UserProviderInfoClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - user_id: core_models.UserId, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> admin_models.UserProviderInfo: - """ - Get the UserProviderInfo. - :param user_id: - :type user_id: UserId - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: admin_models.UserProviderInfo - - :raises GetUserProviderInfoPermissionDenied: The provided token does not have permission to view the provider information for the given user. - :raises UserDeleted: The user is deleted. - :raises UserNotFound: The given User could not be found. - :raises UserProviderInfoNotFound: The given UserProviderInfo could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/admin/users/{userId}/providerInfo", - query_params={ - "preview": preview, - }, - path_params={ - "userId": user_id, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=admin_models.UserProviderInfo, - request_timeout=request_timeout, - throwable_errors={ - "GetUserProviderInfoPermissionDenied": admin_errors.GetUserProviderInfoPermissionDenied, - "UserDeleted": admin_errors.UserDeleted, - "UserNotFound": admin_errors.UserNotFound, - "UserProviderInfoNotFound": admin_errors.UserProviderInfoNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def replace( - self, - user_id: core_models.UserId, - *, - provider_id: admin_models.ProviderId, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> admin_models.UserProviderInfo: - """ - Replace the UserProviderInfo. - :param user_id: - :type user_id: UserId - :param provider_id: The ID of the User in the external authentication provider. This value is determined by the authentication provider. At most one User can have a given provider ID in a given Realm. - :type provider_id: ProviderId - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: admin_models.UserProviderInfo - - :raises CannotReplaceProviderInfoForPrincipalInProtectedRealm: Provider information for Principals in this Realm cannot be replaced. - :raises GetUserProviderInfoPermissionDenied: The provided token does not have permission to view the provider information for the given user. - :raises ReplaceUserProviderInfoPermissionDenied: Could not replace the UserProviderInfo. - :raises UserDeleted: The user is deleted. - :raises UserNotFound: The given User could not be found. - :raises UserProviderInfoNotFound: The given UserProviderInfo could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="PUT", - resource_path="/v2/admin/users/{userId}/providerInfo", - query_params={ - "preview": preview, - }, - path_params={ - "userId": user_id, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=admin_models.ReplaceUserProviderInfoRequest( - provider_id=provider_id, - ), - response_type=admin_models.UserProviderInfo, - request_timeout=request_timeout, - throwable_errors={ - "CannotReplaceProviderInfoForPrincipalInProtectedRealm": admin_errors.CannotReplaceProviderInfoForPrincipalInProtectedRealm, - "GetUserProviderInfoPermissionDenied": admin_errors.GetUserProviderInfoPermissionDenied, - "ReplaceUserProviderInfoPermissionDenied": admin_errors.ReplaceUserProviderInfoPermissionDenied, - "UserDeleted": admin_errors.UserDeleted, - "UserNotFound": admin_errors.UserNotFound, - "UserProviderInfoNotFound": admin_errors.UserProviderInfoNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _UserProviderInfoClientRaw: - def __init__(self, client: UserProviderInfoClient) -> None: - def get(_: admin_models.UserProviderInfo): ... - def replace(_: admin_models.UserProviderInfo): ... - - self.get = core.with_raw_response(get, client.get) - self.replace = core.with_raw_response(replace, client.replace) - - -class _UserProviderInfoClientStreaming: - def __init__(self, client: UserProviderInfoClient) -> None: - def get(_: admin_models.UserProviderInfo): ... - def replace(_: admin_models.UserProviderInfo): ... - - self.get = core.with_streaming_response(get, client.get) - self.replace = core.with_streaming_response(replace, client.replace) - - -class AsyncUserProviderInfoClient: - """ - The API client for the UserProviderInfo Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AsyncUserProviderInfoClientStreaming(self) - self.with_raw_response = _AsyncUserProviderInfoClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - user_id: core_models.UserId, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[admin_models.UserProviderInfo]: - """ - Get the UserProviderInfo. - :param user_id: - :type user_id: UserId - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[admin_models.UserProviderInfo] - - :raises GetUserProviderInfoPermissionDenied: The provided token does not have permission to view the provider information for the given user. - :raises UserDeleted: The user is deleted. - :raises UserNotFound: The given User could not be found. - :raises UserProviderInfoNotFound: The given UserProviderInfo could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/admin/users/{userId}/providerInfo", - query_params={ - "preview": preview, - }, - path_params={ - "userId": user_id, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=admin_models.UserProviderInfo, - request_timeout=request_timeout, - throwable_errors={ - "GetUserProviderInfoPermissionDenied": admin_errors.GetUserProviderInfoPermissionDenied, - "UserDeleted": admin_errors.UserDeleted, - "UserNotFound": admin_errors.UserNotFound, - "UserProviderInfoNotFound": admin_errors.UserProviderInfoNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def replace( - self, - user_id: core_models.UserId, - *, - provider_id: admin_models.ProviderId, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[admin_models.UserProviderInfo]: - """ - Replace the UserProviderInfo. - :param user_id: - :type user_id: UserId - :param provider_id: The ID of the User in the external authentication provider. This value is determined by the authentication provider. At most one User can have a given provider ID in a given Realm. - :type provider_id: ProviderId - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[admin_models.UserProviderInfo] - - :raises CannotReplaceProviderInfoForPrincipalInProtectedRealm: Provider information for Principals in this Realm cannot be replaced. - :raises GetUserProviderInfoPermissionDenied: The provided token does not have permission to view the provider information for the given user. - :raises ReplaceUserProviderInfoPermissionDenied: Could not replace the UserProviderInfo. - :raises UserDeleted: The user is deleted. - :raises UserNotFound: The given User could not be found. - :raises UserProviderInfoNotFound: The given UserProviderInfo could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="PUT", - resource_path="/v2/admin/users/{userId}/providerInfo", - query_params={ - "preview": preview, - }, - path_params={ - "userId": user_id, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=admin_models.ReplaceUserProviderInfoRequest( - provider_id=provider_id, - ), - response_type=admin_models.UserProviderInfo, - request_timeout=request_timeout, - throwable_errors={ - "CannotReplaceProviderInfoForPrincipalInProtectedRealm": admin_errors.CannotReplaceProviderInfoForPrincipalInProtectedRealm, - "GetUserProviderInfoPermissionDenied": admin_errors.GetUserProviderInfoPermissionDenied, - "ReplaceUserProviderInfoPermissionDenied": admin_errors.ReplaceUserProviderInfoPermissionDenied, - "UserDeleted": admin_errors.UserDeleted, - "UserNotFound": admin_errors.UserNotFound, - "UserProviderInfoNotFound": admin_errors.UserProviderInfoNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _AsyncUserProviderInfoClientRaw: - def __init__(self, client: AsyncUserProviderInfoClient) -> None: - def get(_: admin_models.UserProviderInfo): ... - def replace(_: admin_models.UserProviderInfo): ... - - self.get = core.async_with_raw_response(get, client.get) - self.replace = core.async_with_raw_response(replace, client.replace) - - -class _AsyncUserProviderInfoClientStreaming: - def __init__(self, client: AsyncUserProviderInfoClient) -> None: - def get(_: admin_models.UserProviderInfo): ... - def replace(_: admin_models.UserProviderInfo): ... - - self.get = core.async_with_streaming_response(get, client.get) - self.replace = core.async_with_streaming_response(replace, client.replace) diff --git a/foundry_sdk/v2/aip_agents/__init__.py b/foundry_sdk/v2/aip_agents/__init__.py deleted file mode 100644 index 41ff57803..000000000 --- a/foundry_sdk/v2/aip_agents/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -from foundry_sdk.v2.aip_agents._client import AipAgentsClient -from foundry_sdk.v2.aip_agents._client import AsyncAipAgentsClient - -__all__ = [ - "AipAgentsClient", - "AsyncAipAgentsClient", -] diff --git a/foundry_sdk/v2/aip_agents/_client.py b/foundry_sdk/v2/aip_agents/_client.py deleted file mode 100644 index ba17f502a..000000000 --- a/foundry_sdk/v2/aip_agents/_client.py +++ /dev/null @@ -1,69 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing -from functools import cached_property - -from foundry_sdk import _core as core - - -class AipAgentsClient: - """ - The API client for the AipAgents Namespace. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - - @cached_property - def Agent(self): - from foundry_sdk.v2.aip_agents.agent import AgentClient - - return AgentClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - -class AsyncAipAgentsClient: - """ - The Async API client for the AipAgents Namespace. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - from foundry_sdk.v2.aip_agents.agent import AsyncAgentClient - - self.Agent = AsyncAgentClient(auth=auth, hostname=hostname, config=config) diff --git a/foundry_sdk/v2/aip_agents/agent.py b/foundry_sdk/v2/aip_agents/agent.py deleted file mode 100644 index c5611457f..000000000 --- a/foundry_sdk/v2/aip_agents/agent.py +++ /dev/null @@ -1,376 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing -from functools import cached_property - -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v2.aip_agents import errors as aip_agents_errors -from foundry_sdk.v2.aip_agents import models as aip_agents_models -from foundry_sdk.v2.core import models as core_models - - -class AgentClient: - """ - The API client for the Agent Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AgentClientStreaming(self) - self.with_raw_response = _AgentClientRaw(self) - - @cached_property - def AgentVersion(self): - from foundry_sdk.v2.aip_agents.agent_version import AgentVersionClient - - return AgentVersionClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @cached_property - def Session(self): - from foundry_sdk.v2.aip_agents.session import SessionClient - - return SessionClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def all_sessions( - self, - *, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.ResourceIterator[aip_agents_models.Session]: - """ - List all conversation sessions between the calling user and all accessible Agents that were created by this client. - Sessions are returned in order of most recently updated first. - - :param page_size: The maximum number of sessions to return in a single page. The maximum allowed value is 100. Defaults to 100 if not specified. - :type page_size: Optional[PageSize] - :param page_token: - :type page_token: Optional[PageToken] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.ResourceIterator[aip_agents_models.Session] - - :raises GetAllSessionsAgentsPermissionDenied: The calling user does not have permission to list all sessions across all Agents. Listing all sessions across all agents requires the `api:aip-agents-write` scope. - :raises ListSessionsForAgentsPermissionDenied: Could not allSessions the Agent. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/aipAgents/agents/allSessions", - query_params={ - "pageSize": page_size, - "pageToken": page_token, - "preview": preview, - }, - path_params={}, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=aip_agents_models.AgentsSessionsPage, - request_timeout=request_timeout, - throwable_errors={ - "GetAllSessionsAgentsPermissionDenied": aip_agents_errors.GetAllSessionsAgentsPermissionDenied, - "ListSessionsForAgentsPermissionDenied": aip_agents_errors.ListSessionsForAgentsPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - agent_rid: aip_agents_models.AgentRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - version: typing.Optional[aip_agents_models.AgentVersionString] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> aip_agents_models.Agent: - """ - Get details for an AIP Agent. - :param agent_rid: An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). - :type agent_rid: AgentRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param version: The version of the Agent to retrieve. If not specified, the latest published version will be returned. - :type version: Optional[AgentVersionString] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: aip_agents_models.Agent - - :raises AgentNotFound: The given Agent could not be found. - :raises AgentVersionNotFound: The given AgentVersion could not be found. - :raises InvalidAgentVersion: The provided version string is not a valid format for an Agent version. - :raises NoPublishedAgentVersion: Failed to retrieve the latest published version of the Agent because the Agent has no published versions. Try publishing the Agent in AIP Agent Studio to use the latest published version, or specify the version of the Agent to use. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/aipAgents/agents/{agentRid}", - query_params={ - "preview": preview, - "version": version, - }, - path_params={ - "agentRid": agent_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=aip_agents_models.Agent, - request_timeout=request_timeout, - throwable_errors={ - "AgentNotFound": aip_agents_errors.AgentNotFound, - "AgentVersionNotFound": aip_agents_errors.AgentVersionNotFound, - "InvalidAgentVersion": aip_agents_errors.InvalidAgentVersion, - "NoPublishedAgentVersion": aip_agents_errors.NoPublishedAgentVersion, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _AgentClientRaw: - def __init__(self, client: AgentClient) -> None: - def all_sessions(_: aip_agents_models.AgentsSessionsPage): ... - def get(_: aip_agents_models.Agent): ... - - self.all_sessions = core.with_raw_response(all_sessions, client.all_sessions) - self.get = core.with_raw_response(get, client.get) - - -class _AgentClientStreaming: - def __init__(self, client: AgentClient) -> None: - def all_sessions(_: aip_agents_models.AgentsSessionsPage): ... - def get(_: aip_agents_models.Agent): ... - - self.all_sessions = core.with_streaming_response(all_sessions, client.all_sessions) - self.get = core.with_streaming_response(get, client.get) - - -class AsyncAgentClient: - """ - The API client for the Agent Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AsyncAgentClientStreaming(self) - self.with_raw_response = _AsyncAgentClientRaw(self) - - @cached_property - def AgentVersion(self): - from foundry_sdk.v2.aip_agents.agent_version import AsyncAgentVersionClient - - return AsyncAgentVersionClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @cached_property - def Session(self): - from foundry_sdk.v2.aip_agents.session import AsyncSessionClient - - return AsyncSessionClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def all_sessions( - self, - *, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.AsyncResourceIterator[aip_agents_models.Session]: - """ - List all conversation sessions between the calling user and all accessible Agents that were created by this client. - Sessions are returned in order of most recently updated first. - - :param page_size: The maximum number of sessions to return in a single page. The maximum allowed value is 100. Defaults to 100 if not specified. - :type page_size: Optional[PageSize] - :param page_token: - :type page_token: Optional[PageToken] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.AsyncResourceIterator[aip_agents_models.Session] - - :raises GetAllSessionsAgentsPermissionDenied: The calling user does not have permission to list all sessions across all Agents. Listing all sessions across all agents requires the `api:aip-agents-write` scope. - :raises ListSessionsForAgentsPermissionDenied: Could not allSessions the Agent. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/aipAgents/agents/allSessions", - query_params={ - "pageSize": page_size, - "pageToken": page_token, - "preview": preview, - }, - path_params={}, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=aip_agents_models.AgentsSessionsPage, - request_timeout=request_timeout, - throwable_errors={ - "GetAllSessionsAgentsPermissionDenied": aip_agents_errors.GetAllSessionsAgentsPermissionDenied, - "ListSessionsForAgentsPermissionDenied": aip_agents_errors.ListSessionsForAgentsPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - agent_rid: aip_agents_models.AgentRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - version: typing.Optional[aip_agents_models.AgentVersionString] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[aip_agents_models.Agent]: - """ - Get details for an AIP Agent. - :param agent_rid: An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). - :type agent_rid: AgentRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param version: The version of the Agent to retrieve. If not specified, the latest published version will be returned. - :type version: Optional[AgentVersionString] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[aip_agents_models.Agent] - - :raises AgentNotFound: The given Agent could not be found. - :raises AgentVersionNotFound: The given AgentVersion could not be found. - :raises InvalidAgentVersion: The provided version string is not a valid format for an Agent version. - :raises NoPublishedAgentVersion: Failed to retrieve the latest published version of the Agent because the Agent has no published versions. Try publishing the Agent in AIP Agent Studio to use the latest published version, or specify the version of the Agent to use. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/aipAgents/agents/{agentRid}", - query_params={ - "preview": preview, - "version": version, - }, - path_params={ - "agentRid": agent_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=aip_agents_models.Agent, - request_timeout=request_timeout, - throwable_errors={ - "AgentNotFound": aip_agents_errors.AgentNotFound, - "AgentVersionNotFound": aip_agents_errors.AgentVersionNotFound, - "InvalidAgentVersion": aip_agents_errors.InvalidAgentVersion, - "NoPublishedAgentVersion": aip_agents_errors.NoPublishedAgentVersion, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _AsyncAgentClientRaw: - def __init__(self, client: AsyncAgentClient) -> None: - def all_sessions(_: aip_agents_models.AgentsSessionsPage): ... - def get(_: aip_agents_models.Agent): ... - - self.all_sessions = core.async_with_raw_response(all_sessions, client.all_sessions) - self.get = core.async_with_raw_response(get, client.get) - - -class _AsyncAgentClientStreaming: - def __init__(self, client: AsyncAgentClient) -> None: - def all_sessions(_: aip_agents_models.AgentsSessionsPage): ... - def get(_: aip_agents_models.Agent): ... - - self.all_sessions = core.async_with_streaming_response(all_sessions, client.all_sessions) - self.get = core.async_with_streaming_response(get, client.get) diff --git a/foundry_sdk/v2/aip_agents/agent_version.py b/foundry_sdk/v2/aip_agents/agent_version.py deleted file mode 100644 index 878b88783..000000000 --- a/foundry_sdk/v2/aip_agents/agent_version.py +++ /dev/null @@ -1,341 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing - -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v2.aip_agents import errors as aip_agents_errors -from foundry_sdk.v2.aip_agents import models as aip_agents_models -from foundry_sdk.v2.core import models as core_models - - -class AgentVersionClient: - """ - The API client for the AgentVersion Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AgentVersionClientStreaming(self) - self.with_raw_response = _AgentVersionClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - agent_rid: aip_agents_models.AgentRid, - agent_version_string: aip_agents_models.AgentVersionString, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> aip_agents_models.AgentVersion: - """ - Get version details for an AIP Agent. - :param agent_rid: An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). - :type agent_rid: AgentRid - :param agent_version_string: The semantic version of the Agent, formatted as "majorVersion.minorVersion". - :type agent_version_string: AgentVersionString - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: aip_agents_models.AgentVersion - - :raises AgentNotFound: The given Agent could not be found. - :raises AgentVersionNotFound: The given AgentVersion could not be found. - :raises InvalidAgentVersion: The provided version string is not a valid format for an Agent version. - :raises NoPublishedAgentVersion: Failed to retrieve the latest published version of the Agent because the Agent has no published versions. Try publishing the Agent in AIP Agent Studio to use the latest published version, or specify the version of the Agent to use. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/aipAgents/agents/{agentRid}/agentVersions/{agentVersionString}", - query_params={ - "preview": preview, - }, - path_params={ - "agentRid": agent_rid, - "agentVersionString": agent_version_string, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=aip_agents_models.AgentVersion, - request_timeout=request_timeout, - throwable_errors={ - "AgentNotFound": aip_agents_errors.AgentNotFound, - "AgentVersionNotFound": aip_agents_errors.AgentVersionNotFound, - "InvalidAgentVersion": aip_agents_errors.InvalidAgentVersion, - "NoPublishedAgentVersion": aip_agents_errors.NoPublishedAgentVersion, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def list( - self, - agent_rid: aip_agents_models.AgentRid, - *, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.ResourceIterator[aip_agents_models.AgentVersion]: - """ - List all versions for an AIP Agent. - Versions are returned in descending order, by most recent versions first. - - :param agent_rid: An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). - :type agent_rid: AgentRid - :param page_size: The page size to use for the endpoint. - :type page_size: Optional[PageSize] - :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. - :type page_token: Optional[PageToken] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.ResourceIterator[aip_agents_models.AgentVersion] - - :raises AgentNotFound: The given Agent could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/aipAgents/agents/{agentRid}/agentVersions", - query_params={ - "pageSize": page_size, - "pageToken": page_token, - "preview": preview, - }, - path_params={ - "agentRid": agent_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=aip_agents_models.ListAgentVersionsResponse, - request_timeout=request_timeout, - throwable_errors={ - "AgentNotFound": aip_agents_errors.AgentNotFound, - }, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - -class _AgentVersionClientRaw: - def __init__(self, client: AgentVersionClient) -> None: - def get(_: aip_agents_models.AgentVersion): ... - def list(_: aip_agents_models.ListAgentVersionsResponse): ... - - self.get = core.with_raw_response(get, client.get) - self.list = core.with_raw_response(list, client.list) - - -class _AgentVersionClientStreaming: - def __init__(self, client: AgentVersionClient) -> None: - def get(_: aip_agents_models.AgentVersion): ... - def list(_: aip_agents_models.ListAgentVersionsResponse): ... - - self.get = core.with_streaming_response(get, client.get) - self.list = core.with_streaming_response(list, client.list) - - -class AsyncAgentVersionClient: - """ - The API client for the AgentVersion Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AsyncAgentVersionClientStreaming(self) - self.with_raw_response = _AsyncAgentVersionClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - agent_rid: aip_agents_models.AgentRid, - agent_version_string: aip_agents_models.AgentVersionString, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[aip_agents_models.AgentVersion]: - """ - Get version details for an AIP Agent. - :param agent_rid: An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). - :type agent_rid: AgentRid - :param agent_version_string: The semantic version of the Agent, formatted as "majorVersion.minorVersion". - :type agent_version_string: AgentVersionString - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[aip_agents_models.AgentVersion] - - :raises AgentNotFound: The given Agent could not be found. - :raises AgentVersionNotFound: The given AgentVersion could not be found. - :raises InvalidAgentVersion: The provided version string is not a valid format for an Agent version. - :raises NoPublishedAgentVersion: Failed to retrieve the latest published version of the Agent because the Agent has no published versions. Try publishing the Agent in AIP Agent Studio to use the latest published version, or specify the version of the Agent to use. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/aipAgents/agents/{agentRid}/agentVersions/{agentVersionString}", - query_params={ - "preview": preview, - }, - path_params={ - "agentRid": agent_rid, - "agentVersionString": agent_version_string, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=aip_agents_models.AgentVersion, - request_timeout=request_timeout, - throwable_errors={ - "AgentNotFound": aip_agents_errors.AgentNotFound, - "AgentVersionNotFound": aip_agents_errors.AgentVersionNotFound, - "InvalidAgentVersion": aip_agents_errors.InvalidAgentVersion, - "NoPublishedAgentVersion": aip_agents_errors.NoPublishedAgentVersion, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def list( - self, - agent_rid: aip_agents_models.AgentRid, - *, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.AsyncResourceIterator[aip_agents_models.AgentVersion]: - """ - List all versions for an AIP Agent. - Versions are returned in descending order, by most recent versions first. - - :param agent_rid: An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). - :type agent_rid: AgentRid - :param page_size: The page size to use for the endpoint. - :type page_size: Optional[PageSize] - :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. - :type page_token: Optional[PageToken] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.AsyncResourceIterator[aip_agents_models.AgentVersion] - - :raises AgentNotFound: The given Agent could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/aipAgents/agents/{agentRid}/agentVersions", - query_params={ - "pageSize": page_size, - "pageToken": page_token, - "preview": preview, - }, - path_params={ - "agentRid": agent_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=aip_agents_models.ListAgentVersionsResponse, - request_timeout=request_timeout, - throwable_errors={ - "AgentNotFound": aip_agents_errors.AgentNotFound, - }, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - -class _AsyncAgentVersionClientRaw: - def __init__(self, client: AsyncAgentVersionClient) -> None: - def get(_: aip_agents_models.AgentVersion): ... - def list(_: aip_agents_models.ListAgentVersionsResponse): ... - - self.get = core.async_with_raw_response(get, client.get) - self.list = core.async_with_raw_response(list, client.list) - - -class _AsyncAgentVersionClientStreaming: - def __init__(self, client: AsyncAgentVersionClient) -> None: - def get(_: aip_agents_models.AgentVersion): ... - def list(_: aip_agents_models.ListAgentVersionsResponse): ... - - self.get = core.async_with_streaming_response(get, client.get) - self.list = core.async_with_streaming_response(list, client.list) diff --git a/foundry_sdk/v2/aip_agents/content.py b/foundry_sdk/v2/aip_agents/content.py deleted file mode 100644 index ffa53671d..000000000 --- a/foundry_sdk/v2/aip_agents/content.py +++ /dev/null @@ -1,213 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing - -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v2.aip_agents import errors as aip_agents_errors -from foundry_sdk.v2.aip_agents import models as aip_agents_models -from foundry_sdk.v2.core import models as core_models - - -class ContentClient: - """ - The API client for the Content Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _ContentClientStreaming(self) - self.with_raw_response = _ContentClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - agent_rid: aip_agents_models.AgentRid, - session_rid: aip_agents_models.SessionRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> aip_agents_models.Content: - """ - Get the conversation content for a session between the calling user and an Agent. - :param agent_rid: An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). - :type agent_rid: AgentRid - :param session_rid: The Resource Identifier (RID) of the conversation session. - :type session_rid: SessionRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: aip_agents_models.Content - - :raises AgentNotFound: The given Agent could not be found. - :raises ContentNotFound: The given Content could not be found. - :raises SessionNotFound: The given Session could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}/content", - query_params={ - "preview": preview, - }, - path_params={ - "agentRid": agent_rid, - "sessionRid": session_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=aip_agents_models.Content, - request_timeout=request_timeout, - throwable_errors={ - "AgentNotFound": aip_agents_errors.AgentNotFound, - "ContentNotFound": aip_agents_errors.ContentNotFound, - "SessionNotFound": aip_agents_errors.SessionNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _ContentClientRaw: - def __init__(self, client: ContentClient) -> None: - def get(_: aip_agents_models.Content): ... - - self.get = core.with_raw_response(get, client.get) - - -class _ContentClientStreaming: - def __init__(self, client: ContentClient) -> None: - def get(_: aip_agents_models.Content): ... - - self.get = core.with_streaming_response(get, client.get) - - -class AsyncContentClient: - """ - The API client for the Content Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AsyncContentClientStreaming(self) - self.with_raw_response = _AsyncContentClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - agent_rid: aip_agents_models.AgentRid, - session_rid: aip_agents_models.SessionRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[aip_agents_models.Content]: - """ - Get the conversation content for a session between the calling user and an Agent. - :param agent_rid: An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). - :type agent_rid: AgentRid - :param session_rid: The Resource Identifier (RID) of the conversation session. - :type session_rid: SessionRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[aip_agents_models.Content] - - :raises AgentNotFound: The given Agent could not be found. - :raises ContentNotFound: The given Content could not be found. - :raises SessionNotFound: The given Session could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}/content", - query_params={ - "preview": preview, - }, - path_params={ - "agentRid": agent_rid, - "sessionRid": session_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=aip_agents_models.Content, - request_timeout=request_timeout, - throwable_errors={ - "AgentNotFound": aip_agents_errors.AgentNotFound, - "ContentNotFound": aip_agents_errors.ContentNotFound, - "SessionNotFound": aip_agents_errors.SessionNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _AsyncContentClientRaw: - def __init__(self, client: AsyncContentClient) -> None: - def get(_: aip_agents_models.Content): ... - - self.get = core.async_with_raw_response(get, client.get) - - -class _AsyncContentClientStreaming: - def __init__(self, client: AsyncContentClient) -> None: - def get(_: aip_agents_models.Content): ... - - self.get = core.async_with_streaming_response(get, client.get) diff --git a/foundry_sdk/v2/aip_agents/errors.py b/foundry_sdk/v2/aip_agents/errors.py deleted file mode 100644 index 8bc4fe3df..000000000 --- a/foundry_sdk/v2/aip_agents/errors.py +++ /dev/null @@ -1,647 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing -from dataclasses import dataclass - -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v2.aip_agents import models as aip_agents_models -from foundry_sdk.v2.ontologies import models as ontologies_models - - -class AgentIterationsExceededLimitParameters(typing_extensions.TypedDict): - """ - The Agent was unable to produce an answer in the set number of maximum iterations. - This can happen if the Agent gets confused or stuck in a loop, or if the query is too complex. - Try a different query or review the Agent configuration in AIP Agent Studio. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - agentRid: aip_agents_models.AgentRid - sessionRid: aip_agents_models.SessionRid - details: str - """Any additional details provided for the error.""" - - -@dataclass -class AgentIterationsExceededLimit(errors.BadRequestError): - name: typing.Literal["AgentIterationsExceededLimit"] - parameters: AgentIterationsExceededLimitParameters - error_instance_id: str - - -class AgentNotFoundParameters(typing_extensions.TypedDict): - """The given Agent could not be found.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - agentRid: aip_agents_models.AgentRid - """An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/).""" - - -@dataclass -class AgentNotFound(errors.NotFoundError): - name: typing.Literal["AgentNotFound"] - parameters: AgentNotFoundParameters - error_instance_id: str - - -class AgentVersionNotFoundParameters(typing_extensions.TypedDict): - """The given AgentVersion could not be found.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - agentRid: aip_agents_models.AgentRid - """An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/).""" - - agentVersionString: aip_agents_models.AgentVersionString - """The semantic version of the Agent, formatted as "majorVersion.minorVersion".""" - - -@dataclass -class AgentVersionNotFound(errors.NotFoundError): - name: typing.Literal["AgentVersionNotFound"] - parameters: AgentVersionNotFoundParameters - error_instance_id: str - - -class BlockingContinueSessionPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not blockingContinue the Session.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - agentRid: aip_agents_models.AgentRid - """An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/).""" - - sessionRid: aip_agents_models.SessionRid - """The Resource Identifier (RID) of the conversation session.""" - - -@dataclass -class BlockingContinueSessionPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["BlockingContinueSessionPermissionDenied"] - parameters: BlockingContinueSessionPermissionDeniedParameters - error_instance_id: str - - -class CancelSessionFailedMessageNotInProgressParameters(typing_extensions.TypedDict): - """ - Unable to cancel the requested session exchange as no in-progress exchange was found - for the provided message identifier. - This is expected if no exchange was initiated with the provided message identifier - through a `streamingContinue` request, or if the exchange for this identifier has already completed - and cannot be canceled, or if the exchange has already been canceled. - This error can also occur if the cancellation was requested immediately after requesting the exchange - through a `streamingContinue` request, and the exchange has not started yet. - Clients should handle these errors gracefully, and can reload the session content to get the latest - conversation state. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - messageId: aip_agents_models.MessageId - """The message identifier that was requested for cancellation.""" - - agentRid: aip_agents_models.AgentRid - sessionRid: aip_agents_models.SessionRid - - -@dataclass -class CancelSessionFailedMessageNotInProgress(errors.BadRequestError): - name: typing.Literal["CancelSessionFailedMessageNotInProgress"] - parameters: CancelSessionFailedMessageNotInProgressParameters - error_instance_id: str - - -class CancelSessionPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not cancel the Session.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - agentRid: aip_agents_models.AgentRid - """An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/).""" - - sessionRid: aip_agents_models.SessionRid - """The Resource Identifier (RID) of the conversation session.""" - - -@dataclass -class CancelSessionPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["CancelSessionPermissionDenied"] - parameters: CancelSessionPermissionDeniedParameters - error_instance_id: str - - -class ContentNotFoundParameters(typing_extensions.TypedDict): - """The given Content could not be found.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - agentRid: aip_agents_models.AgentRid - """An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/).""" - - sessionRid: aip_agents_models.SessionRid - """The Resource Identifier (RID) of the conversation session.""" - - -@dataclass -class ContentNotFound(errors.NotFoundError): - name: typing.Literal["ContentNotFound"] - parameters: ContentNotFoundParameters - error_instance_id: str - - -class ContextSizeExceededLimitParameters(typing_extensions.TypedDict): - """ - Failed to generate a response for a session because the context size of the LLM has been exceeded. - Clients should either retry with a shorter message or create a new session and try re-sending the message. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - agentRid: aip_agents_models.AgentRid - sessionRid: aip_agents_models.SessionRid - details: str - """Any additional details provided for the error.""" - - -@dataclass -class ContextSizeExceededLimit(errors.BadRequestError): - name: typing.Literal["ContextSizeExceededLimit"] - parameters: ContextSizeExceededLimitParameters - error_instance_id: str - - -class CreateSessionPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not create the Session.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - agentRid: aip_agents_models.AgentRid - """An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/).""" - - -@dataclass -class CreateSessionPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["CreateSessionPermissionDenied"] - parameters: CreateSessionPermissionDeniedParameters - error_instance_id: str - - -class DeleteSessionPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not delete the Session.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - agentRid: aip_agents_models.AgentRid - """An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/).""" - - sessionRid: aip_agents_models.SessionRid - """The Resource Identifier (RID) of the conversation session.""" - - -@dataclass -class DeleteSessionPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["DeleteSessionPermissionDenied"] - parameters: DeleteSessionPermissionDeniedParameters - error_instance_id: str - - -class FunctionLocatorNotFoundParameters(typing_extensions.TypedDict): - """ - The specified function locator is configured for use by the Agent but could not be found. - The function type or version may not exist or the client token does not have access. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - agentRid: aip_agents_models.AgentRid - sessionRid: typing_extensions.NotRequired[aip_agents_models.SessionRid] - """The session RID where the error occurred. This is omitted if the error occurred during session creation.""" - - functionRid: core.RID - functionVersion: str - - -@dataclass -class FunctionLocatorNotFound(errors.NotFoundError): - name: typing.Literal["FunctionLocatorNotFound"] - parameters: FunctionLocatorNotFoundParameters - error_instance_id: str - - -class GetAllSessionsAgentsPermissionDeniedParameters(typing_extensions.TypedDict): - """ - The calling user does not have permission to list all sessions across all Agents. - Listing all sessions across all agents requires the `api:aip-agents-write` scope. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class GetAllSessionsAgentsPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["GetAllSessionsAgentsPermissionDenied"] - parameters: GetAllSessionsAgentsPermissionDeniedParameters - error_instance_id: str - - -class GetRagContextForSessionPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not ragContext the Session.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - agentRid: aip_agents_models.AgentRid - """An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/).""" - - sessionRid: aip_agents_models.SessionRid - """The Resource Identifier (RID) of the conversation session.""" - - -@dataclass -class GetRagContextForSessionPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["GetRagContextForSessionPermissionDenied"] - parameters: GetRagContextForSessionPermissionDeniedParameters - error_instance_id: str - - -class InvalidAgentVersionParameters(typing_extensions.TypedDict): - """The provided version string is not a valid format for an Agent version.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - agentRid: aip_agents_models.AgentRid - version: aip_agents_models.AgentVersionString - - -@dataclass -class InvalidAgentVersion(errors.BadRequestError): - name: typing.Literal["InvalidAgentVersion"] - parameters: InvalidAgentVersionParameters - error_instance_id: str - - -class InvalidParameterParameters(typing_extensions.TypedDict): - """ - The provided application variable is not valid for the Agent for this session. - Check the available application variables for the Agent under the `parameters` property, and version through the API with `getAgent`, or in AIP Agent Studio. - The Agent version used for the session can be checked through the API with `getSession`. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - agentRid: aip_agents_models.AgentRid - sessionRid: aip_agents_models.SessionRid - parameter: aip_agents_models.ParameterId - - -@dataclass -class InvalidParameter(errors.BadRequestError): - name: typing.Literal["InvalidParameter"] - parameters: InvalidParameterParameters - error_instance_id: str - - -class InvalidParameterTypeParameters(typing_extensions.TypedDict): - """ - The provided value does not match the expected type for the application variable configured on the Agent for this session. - Check the available application variables for the Agent under the `parameters` property, and version through the API with `getAgent`, or in AIP Agent Studio. - The Agent version used for the session can be checked through the API with `getSession`. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - agentRid: aip_agents_models.AgentRid - sessionRid: aip_agents_models.SessionRid - parameter: aip_agents_models.ParameterId - expectedType: str - receivedType: str - - -@dataclass -class InvalidParameterType(errors.BadRequestError): - name: typing.Literal["InvalidParameterType"] - parameters: InvalidParameterTypeParameters - error_instance_id: str - - -class ListSessionsForAgentsPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not allSessions the Agent.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class ListSessionsForAgentsPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["ListSessionsForAgentsPermissionDenied"] - parameters: ListSessionsForAgentsPermissionDeniedParameters - error_instance_id: str - - -class NoPublishedAgentVersionParameters(typing_extensions.TypedDict): - """ - Failed to retrieve the latest published version of the Agent because the Agent has no published versions. - Try publishing the Agent in AIP Agent Studio to use the latest published version, or specify the version of the Agent to use. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - agentRid: aip_agents_models.AgentRid - - -@dataclass -class NoPublishedAgentVersion(errors.BadRequestError): - name: typing.Literal["NoPublishedAgentVersion"] - parameters: NoPublishedAgentVersionParameters - error_instance_id: str - - -class ObjectTypeIdsNotFoundParameters(typing_extensions.TypedDict): - """ - Some object types are configured for use by the Agent but could not be found. - The object types either do not exist or the client token does not have access. - Object types can be checked by listing available object types through the API, or searching in [Ontology Manager](https://palantir.com/docs/foundry/ontology-manager/overview/). - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - agentRid: aip_agents_models.AgentRid - sessionRid: typing_extensions.NotRequired[aip_agents_models.SessionRid] - """The session RID where the error occurred. This is omitted if the error occurred during session creation.""" - - objectTypeIds: typing.List[ontologies_models.ObjectTypeId] - - -@dataclass -class ObjectTypeIdsNotFound(errors.NotFoundError): - name: typing.Literal["ObjectTypeIdsNotFound"] - parameters: ObjectTypeIdsNotFoundParameters - error_instance_id: str - - -class ObjectTypeRidsNotFoundParameters(typing_extensions.TypedDict): - """ - Some object types are configured for use by the Agent but could not be found. - The object types either do not exist or the client token does not have access. - Object types can be checked by listing available object types through the API, or searching in [Ontology Manager](https://palantir.com/docs/foundry/ontology-manager/overview/). - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - agentRid: aip_agents_models.AgentRid - sessionRid: typing_extensions.NotRequired[aip_agents_models.SessionRid] - """The session RID where the error occurred. This is omitted if the error occurred during session creation.""" - - objectTypeRids: typing.List[ontologies_models.ObjectTypeRid] - - -@dataclass -class ObjectTypeRidsNotFound(errors.NotFoundError): - name: typing.Literal["ObjectTypeRidsNotFound"] - parameters: ObjectTypeRidsNotFoundParameters - error_instance_id: str - - -class OntologyEntitiesNotFoundParameters(typing_extensions.TypedDict): - """ - Some ontology types are configured for use by the Agent but could not be found. - The types either do not exist or the client token does not have access. - Object types and their link types can be checked by listing available object/link types through the API, or searching in [Ontology Manager](https://palantir.com/docs/foundry/ontology-manager/overview/). - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - agentRid: aip_agents_models.AgentRid - sessionRid: typing_extensions.NotRequired[aip_agents_models.SessionRid] - """The session RID where the error occurred. This is omitted if the error occurred during session creation.""" - - objectTypeRids: typing.List[ontologies_models.ObjectTypeRid] - linkTypeRids: typing.List[ontologies_models.LinkTypeRid] - - -@dataclass -class OntologyEntitiesNotFound(errors.NotFoundError): - name: typing.Literal["OntologyEntitiesNotFound"] - parameters: OntologyEntitiesNotFoundParameters - error_instance_id: str - - -class RateLimitExceededParameters(typing_extensions.TypedDict): - """Failed to generate a response as the model rate limits were exceeded. Clients should wait and retry.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - agentRid: aip_agents_models.AgentRid - sessionRid: aip_agents_models.SessionRid - details: str - """Any additional details provided for the error.""" - - -@dataclass -class RateLimitExceeded(errors.BadRequestError): - name: typing.Literal["RateLimitExceeded"] - parameters: RateLimitExceededParameters - error_instance_id: str - - -class RetryAttemptsExceededParameters(typing_extensions.TypedDict): - """Failed to generate a response after retrying up to the configured number of retry attempts. Clients should wait and retry.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - agentRid: aip_agents_models.AgentRid - sessionRid: aip_agents_models.SessionRid - details: str - """Any additional details provided for the error.""" - - -@dataclass -class RetryAttemptsExceeded(errors.BadRequestError): - name: typing.Literal["RetryAttemptsExceeded"] - parameters: RetryAttemptsExceededParameters - error_instance_id: str - - -class RetryDeadlineExceededParameters(typing_extensions.TypedDict): - """Failed to generate a response after retrying up to the configured retry deadline. Clients should wait and retry.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - agentRid: aip_agents_models.AgentRid - sessionRid: aip_agents_models.SessionRid - details: str - """Any additional details provided for the error.""" - - -@dataclass -class RetryDeadlineExceeded(errors.BadRequestError): - name: typing.Literal["RetryDeadlineExceeded"] - parameters: RetryDeadlineExceededParameters - error_instance_id: str - - -class SessionExecutionFailedParameters(typing_extensions.TypedDict): - """Failed to generate a response for a session due to an unexpected error.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - agentRid: aip_agents_models.AgentRid - sessionRid: aip_agents_models.SessionRid - message: str - """The error message.""" - - details: str - """Any additional details provided for the error.""" - - -@dataclass -class SessionExecutionFailed(errors.InternalServerError): - name: typing.Literal["SessionExecutionFailed"] - parameters: SessionExecutionFailedParameters - error_instance_id: str - - -class SessionNotFoundParameters(typing_extensions.TypedDict): - """The given Session could not be found.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - agentRid: aip_agents_models.AgentRid - """An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/).""" - - sessionRid: aip_agents_models.SessionRid - """The Resource Identifier (RID) of the conversation session.""" - - -@dataclass -class SessionNotFound(errors.NotFoundError): - name: typing.Literal["SessionNotFound"] - parameters: SessionNotFoundParameters - error_instance_id: str - - -class SessionTraceIdAlreadyExistsParameters(typing_extensions.TypedDict): - """The provided trace ID already exists for the session and cannot be reused.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - agentRid: aip_agents_models.AgentRid - sessionRid: aip_agents_models.SessionRid - sessionTraceId: aip_agents_models.SessionTraceId - - -@dataclass -class SessionTraceIdAlreadyExists(errors.BadRequestError): - name: typing.Literal["SessionTraceIdAlreadyExists"] - parameters: SessionTraceIdAlreadyExistsParameters - error_instance_id: str - - -class SessionTraceNotFoundParameters(typing_extensions.TypedDict): - """The given SessionTrace could not be found.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - sessionTraceId: aip_agents_models.SessionTraceId - """The unique identifier for the trace.""" - - agentRid: aip_agents_models.AgentRid - """An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/).""" - - sessionRid: aip_agents_models.SessionRid - """The Resource Identifier (RID) of the conversation session.""" - - -@dataclass -class SessionTraceNotFound(errors.NotFoundError): - name: typing.Literal["SessionTraceNotFound"] - parameters: SessionTraceNotFoundParameters - error_instance_id: str - - -class StreamingContinueSessionPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not streamingContinue the Session.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - agentRid: aip_agents_models.AgentRid - """An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/).""" - - sessionRid: aip_agents_models.SessionRid - """The Resource Identifier (RID) of the conversation session.""" - - -@dataclass -class StreamingContinueSessionPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["StreamingContinueSessionPermissionDenied"] - parameters: StreamingContinueSessionPermissionDeniedParameters - error_instance_id: str - - -class UpdateSessionTitlePermissionDeniedParameters(typing_extensions.TypedDict): - """Could not updateTitle the Session.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - agentRid: aip_agents_models.AgentRid - """An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/).""" - - sessionRid: aip_agents_models.SessionRid - """The Resource Identifier (RID) of the conversation session.""" - - -@dataclass -class UpdateSessionTitlePermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["UpdateSessionTitlePermissionDenied"] - parameters: UpdateSessionTitlePermissionDeniedParameters - error_instance_id: str - - -__all__ = [ - "AgentIterationsExceededLimit", - "AgentNotFound", - "AgentVersionNotFound", - "BlockingContinueSessionPermissionDenied", - "CancelSessionFailedMessageNotInProgress", - "CancelSessionPermissionDenied", - "ContentNotFound", - "ContextSizeExceededLimit", - "CreateSessionPermissionDenied", - "DeleteSessionPermissionDenied", - "FunctionLocatorNotFound", - "GetAllSessionsAgentsPermissionDenied", - "GetRagContextForSessionPermissionDenied", - "InvalidAgentVersion", - "InvalidParameter", - "InvalidParameterType", - "ListSessionsForAgentsPermissionDenied", - "NoPublishedAgentVersion", - "ObjectTypeIdsNotFound", - "ObjectTypeRidsNotFound", - "OntologyEntitiesNotFound", - "RateLimitExceeded", - "RetryAttemptsExceeded", - "RetryDeadlineExceeded", - "SessionExecutionFailed", - "SessionNotFound", - "SessionTraceIdAlreadyExists", - "SessionTraceNotFound", - "StreamingContinueSessionPermissionDenied", - "UpdateSessionTitlePermissionDenied", -] diff --git a/foundry_sdk/v2/aip_agents/models.py b/foundry_sdk/v2/aip_agents/models.py deleted file mode 100644 index 60ad77bfd..000000000 --- a/foundry_sdk/v2/aip_agents/models.py +++ /dev/null @@ -1,722 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -from __future__ import annotations - -import typing - -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk.v2.core import models as core_models -from foundry_sdk.v2.functions import models as functions_models -from foundry_sdk.v2.ontologies import models as ontologies_models - - -class Agent(core.ModelBase): - """Agent""" - - rid: AgentRid - """An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/).""" - - version: AgentVersionString - """The version of this instance of the Agent.""" - - metadata: AgentMetadata - parameters: typing.Dict[ParameterId, Parameter] - """ - The types and names of variables configured for the Agent in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/) in the [application state](https://palantir.com/docs/foundry/agent-studio/application-state/). - These variables can be used to send custom values in prompts sent to an Agent to customize and control the Agent's behavior. - """ - - -AgentMarkdownResponse = str -"""The final answer for an exchange. Responses are formatted using markdown.""" - - -class AgentMetadata(core.ModelBase): - """Metadata for an Agent.""" - - display_name: str = pydantic.Field(alias=str("displayName")) # type: ignore[literal-required] - """The name of the Agent.""" - - description: typing.Optional[str] = None - """The description for the Agent.""" - - input_placeholder: typing.Optional[str] = pydantic.Field(alias=str("inputPlaceholder"), default=None) # type: ignore[literal-required] - """The default text to show as the placeholder input for chats with the Agent.""" - - suggested_prompts: typing.List[str] = pydantic.Field(alias=str("suggestedPrompts")) # type: ignore[literal-required] - """Prompts to show to the user as example messages to start a conversation with the Agent.""" - - -AgentRid = core.RID -"""An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/).""" - - -class AgentSessionRagContextResponse(core.ModelBase): - """Context retrieved from an Agent's configured context data sources which was relevant to the supplied user message.""" - - object_contexts: typing.List[ObjectContext] = pydantic.Field(alias=str("objectContexts")) # type: ignore[literal-required] - function_retrieved_contexts: typing.List[FunctionRetrievedContext] = pydantic.Field(alias=str("functionRetrievedContexts")) # type: ignore[literal-required] - - -class AgentVersion(core.ModelBase): - """AgentVersion""" - - string: AgentVersionString - """The semantic version of the Agent, formatted as "majorVersion.minorVersion".""" - - version: AgentVersionDetails - """Semantic version details of the Agent.""" - - -class AgentVersionDetails(core.ModelBase): - """Semantic version details for an Agent.""" - - major: int - """The major version of the Agent. Incremented every time the Agent is published.""" - - minor: int - """The minor version of the Agent. Incremented every time the Agent is saved.""" - - -AgentVersionString = str -"""The semantic version of the Agent, formatted as "majorVersion.minorVersion".""" - - -class AgentsSessionsPage(core.ModelBase): - """ - A page of results for sessions across all accessible Agents for the calling user. - Sessions are returned in order of most recently updated first. - """ - - next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] - """ - The page token that should be used when requesting the next page of results. - Empty if there are no more results to retrieve. - """ - - data: typing.List[Session] - - -class BlockingContinueSessionRequest(core.ModelBase): - """BlockingContinueSessionRequest""" - - user_input: UserTextInput = pydantic.Field(alias=str("userInput")) # type: ignore[literal-required] - """The user message for the Agent to respond to.""" - - parameter_inputs: typing.Dict[ParameterId, ParameterValue] = pydantic.Field(alias=str("parameterInputs")) # type: ignore[literal-required] - """Any supplied values for [application variables](https://palantir.com/docs/foundry/agent-studio/application-state/) to pass to the Agent for the exchange.""" - - contexts_override: typing.Optional[typing.List[InputContext]] = pydantic.Field(alias=str("contextsOverride"), default=None) # type: ignore[literal-required] - """ - If set, automatic [context retrieval](https://palantir.com/docs/foundry/agent-studio/retrieval-context/) is skipped and the list of specified context is provided to the Agent instead. - If omitted, relevant context for the user message is automatically retrieved and included in the prompt, based on data sources configured on the Agent for the session. - """ - - session_trace_id: typing.Optional[SessionTraceId] = pydantic.Field(alias=str("sessionTraceId"), default=None) # type: ignore[literal-required] - """ - The unique identifier to use for this continue session trace. By generating and passing this ID to the - `blockingContinue` endpoint, clients can use this trace ID to separately load details of the trace used - to generate a result, while the result is in progress. If omitted, it will be generated automatically. - Clients can check the generated ID by inspecting the `sessionTraceId` in the `SessionExchangeResult`. - """ - - -class CancelSessionRequest(core.ModelBase): - """CancelSessionRequest""" - - message_id: MessageId = pydantic.Field(alias=str("messageId")) # type: ignore[literal-required] - """ - The identifier for the in-progress exchange to cancel. - This should match the `messageId` which was provided when initiating the exchange with `streamingContinue`. - """ - - response: typing.Optional[AgentMarkdownResponse] = None - """ - When specified, the exchange is added to the session with the client-provided response as the result. - When omitted, the exchange is not added to the session. - """ - - -class CancelSessionResponse(core.ModelBase): - """CancelSessionResponse""" - - result: typing.Optional[SessionExchangeResult] = None - """ - If the `response` field was specified, this returns the result that was added to the session for the canceled exchange, with the client-provided response. - If no `response` was specified in the request, this returns an empty response, as no exchange was added to the session. - """ - - -class Content(core.ModelBase): - """Content""" - - exchanges: typing.List[SessionExchange] - """ - The conversation history for the session, represented as a list of exchanges. - Each exchange represents an initiating message from the user and the Agent's response. - Exchanges are returned in chronological order, starting with the first exchange. - """ - - -class CreateSessionRequest(core.ModelBase): - """CreateSessionRequest""" - - agent_version: typing.Optional[AgentVersionString] = pydantic.Field(alias=str("agentVersion"), default=None) # type: ignore[literal-required] - """ - The version of the Agent associated with the session. - This can be set by clients on session creation. - If not specified, defaults to use the latest published version of the Agent at session creation time. - """ - - -class FailureToolCallOutput(core.ModelBase): - """The failed output of a tool call.""" - - correction_message: str = pydantic.Field(alias=str("correctionMessage")) # type: ignore[literal-required] - """ - The correction message returned by the tool if the tool call was not successful. - This is a message that the tool returned to the Agent, which may be used to correct the - Agent's input to the tool. - """ - - type: typing.Literal["failure"] = "failure" - - -class FunctionRetrievedContext(core.ModelBase): - """Context retrieved from running a function to include as additional context in the prompt to the Agent.""" - - function_rid: functions_models.FunctionRid = pydantic.Field(alias=str("functionRid")) # type: ignore[literal-required] - function_version: functions_models.FunctionVersion = pydantic.Field(alias=str("functionVersion")) # type: ignore[literal-required] - retrieved_prompt: str = pydantic.Field(alias=str("retrievedPrompt")) # type: ignore[literal-required] - """String content returned from a context retrieval function.""" - - type: typing.Literal["functionRetrievedContext"] = "functionRetrievedContext" - - -class GetRagContextForSessionRequest(core.ModelBase): - """GetRagContextForSessionRequest""" - - user_input: UserTextInput = pydantic.Field(alias=str("userInput")) # type: ignore[literal-required] - """The user message to retrieve relevant context for from the configured Agent data sources.""" - - parameter_inputs: typing.Dict[ParameterId, ParameterValue] = pydantic.Field(alias=str("parameterInputs")) # type: ignore[literal-required] - """Any values for [application variables](https://palantir.com/docs/foundry/agent-studio/application-state/) to use for the context retrieval.""" - - -InputContext = typing_extensions.Annotated[ - typing.Union["FunctionRetrievedContext", "ObjectContext"], pydantic.Field(discriminator="type") -] -"""Custom retrieved [context](https://palantir.com/docs/foundry/agent-studio/retrieval-context/) to provide to an Agent for continuing a session.""" - - -class ListAgentVersionsResponse(core.ModelBase): - """ListAgentVersionsResponse""" - - data: typing.List[AgentVersion] - next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] - - -class ListSessionsResponse(core.ModelBase): - """ListSessionsResponse""" - - data: typing.List[Session] - next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] - - -MessageId = core.UUID -""" -An ephemeral client-generated Universally Unique Identifier (UUID) to identify a message for streamed session responses. -This can be used by clients to cancel a streamed exchange. -""" - - -class ObjectContext(core.ModelBase): - """Details of relevant retrieved object instances for a user's message to include as additional context in the prompt to the Agent.""" - - object_rids: typing.List[ontologies_models.ObjectRid] = pydantic.Field(alias=str("objectRids")) # type: ignore[literal-required] - """The RIDs of the relevant object instances to include in the prompt.""" - - property_type_rids: typing.List[ontologies_models.PropertyTypeRid] = pydantic.Field(alias=str("propertyTypeRids")) # type: ignore[literal-required] - """The RIDs of the property types for the given objects to include in the prompt.""" - - type: typing.Literal["objectContext"] = "objectContext" - - -class ObjectSetParameter(core.ModelBase): - """ObjectSetParameter""" - - expected_object_types: typing.List[ontologies_models.ObjectTypeId] = pydantic.Field(alias=str("expectedObjectTypes")) # type: ignore[literal-required] - """The types of objects that are expected in ObjectSet values passed for this variable.""" - - type: typing.Literal["objectSet"] = "objectSet" - - -class ObjectSetParameterValue(core.ModelBase): - """A value passed for `ObjectSetParameter` application variable types.""" - - object_set: ontologies_models.ObjectSet = pydantic.Field(alias=str("objectSet")) # type: ignore[literal-required] - ontology: ontologies_models.OntologyIdentifier - """ - The API name of the Ontology for the provided `ObjectSet`. - To find the API name, use the `List ontologies` endpoint or check the [Ontology Manager](https://palantir.com/docs/foundry/ontology-manager/overview/). - """ - - type: typing.Literal["objectSet"] = "objectSet" - - -class ObjectSetParameterValueUpdate(core.ModelBase): - """ObjectSetParameterValueUpdate""" - - value: ontologies_models.ObjectSetRid - type: typing.Literal["objectSet"] = "objectSet" - - -class Parameter(core.ModelBase): - """A variable configured in the application state of an Agent in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/).""" - - parameter_type: ParameterType = pydantic.Field(alias=str("parameterType")) # type: ignore[literal-required] - """Details of the types of values accepted and defaults for this variable.""" - - access: ParameterAccessMode - """The access mode controls how the Agent is able to interact with the variable.""" - - description: typing.Optional[str] = None - """ - A description to explain the use of this variable. - This description is injected into the Agent's prompt to provide context for when to use the variable. - """ - - -ParameterAccessMode = typing.Literal["READ_ONLY", "READ_WRITE"] -""" -READ_ONLY: Allows the variable to be read by the Agent, but the Agent cannot generate updates for it. -READ_WRITE: Allows the variable to be read and updated by the Agent. -""" - - -ParameterId = str -"""The unique identifier for a variable configured in the application state of an Agent in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/).""" - - -ParameterType = typing_extensions.Annotated[ - typing.Union["StringParameter", "ObjectSetParameter"], pydantic.Field(discriminator="type") -] -"""ParameterType""" - - -ParameterValue = typing_extensions.Annotated[ - typing.Union["StringParameterValue", "ObjectSetParameterValue"], - pydantic.Field(discriminator="type"), -] -"""The value provided for a variable configured in the [application state](https://palantir.com/docs/foundry/agent-studio/application-state/) of an Agent.""" - - -ParameterValueUpdate = typing_extensions.Annotated[ - typing.Union["StringParameterValue", "ObjectSetParameterValueUpdate"], - pydantic.Field(discriminator="type"), -] -""" -A value update for an [application variable](https://palantir.com/docs/foundry/agent-studio/application-state/) generated by the Agent. -For `StringParameter` types, this will be the updated string value. -For `ObjectSetParameter` types, this will be a Resource Identifier (RID) for the updated object set. -""" - - -class RidToolInputValue(core.ModelBase): - """A Resource Identifier (RID) that was passed as input to a tool.""" - - rid: core.RID - type: typing.Literal["rid"] = "rid" - - -class RidToolOutputValue(core.ModelBase): - """A Resource Identifier (RID) value that was returned from a tool.""" - - rid: core.RID - type: typing.Literal["rid"] = "rid" - - -class Session(core.ModelBase): - """Session""" - - rid: SessionRid - """The Resource Identifier (RID) of the conversation session.""" - - metadata: SessionMetadata - """Metadata about the session.""" - - agent_rid: AgentRid = pydantic.Field(alias=str("agentRid")) # type: ignore[literal-required] - """The Resource Identifier (RID) of the Agent associated with the session.""" - - agent_version: AgentVersionString = pydantic.Field(alias=str("agentVersion")) # type: ignore[literal-required] - """ - The version of the Agent associated with the session. - This can be set by clients on session creation. - If not specified, defaults to use the latest published version of the Agent at session creation time. - """ - - -class SessionExchange(core.ModelBase): - """Represents an individual exchange between a user and an Agent in a conversation session.""" - - user_input: UserTextInput = pydantic.Field(alias=str("userInput")) # type: ignore[literal-required] - """The user message that initiated the exchange.""" - - contexts: typing.Optional[SessionExchangeContexts] = None - """ - Additional retrieved context that was included in the prompt to the Agent. - This may include context that was passed by the client with the user input, or relevant context that was automatically retrieved and added based on available data sources configured on the Agent. - Empty if no additional context was included in the prompt. - """ - - result: SessionExchangeResult - """The final result for the exchange.""" - - -class SessionExchangeContexts(core.ModelBase): - """Retrieved context which was passed to the Agent as input for the exchange.""" - - object_contexts: typing.List[ObjectContext] = pydantic.Field(alias=str("objectContexts")) # type: ignore[literal-required] - """Relevant object context for the user's message that was included in the prompt to the Agent.""" - - function_retrieved_contexts: typing.List[FunctionRetrievedContext] = pydantic.Field(alias=str("functionRetrievedContexts")) # type: ignore[literal-required] - """Context retrieved from running a function that was included as additional context in the prompt to the Agent.""" - - -class SessionExchangeResult(core.ModelBase): - """The returned result from the Agent for a session exchange.""" - - agent_markdown_response: AgentMarkdownResponse = pydantic.Field(alias=str("agentMarkdownResponse")) # type: ignore[literal-required] - """The final text response generated by the Agent. Responses are formatted using markdown.""" - - parameter_updates: typing.Dict[ParameterId, ParameterValueUpdate] = pydantic.Field(alias=str("parameterUpdates")) # type: ignore[literal-required] - """ - Any updates to application variable values which were generated by the Agent for this exchange. - Updates can only be generated for application variables configured with `READ_WRITE` access on the Agent in AIP Agent Studio. - """ - - total_tokens_used: typing.Optional[int] = pydantic.Field(alias=str("totalTokensUsed"), default=None) # type: ignore[literal-required] - """Total tokens used to compute the result. Omitted if token usage information is not supported by the model used for the session.""" - - interrupted_output: bool = pydantic.Field(alias=str("interruptedOutput")) # type: ignore[literal-required] - """ - True if the exchange was canceled. - In that case, the response (if any) was provided by the client as part of the cancellation request rather than by the Agent. - """ - - session_trace_id: SessionTraceId = pydantic.Field(alias=str("sessionTraceId")) # type: ignore[literal-required] - """ - The unique identifier for the session trace. The session trace lists the sequence of steps that an Agent - takes to arrive at an answer. For example, a trace may include steps such as context retrieval and tool calls. - """ - - -class SessionMetadata(core.ModelBase): - """Metadata for a conversation session with an Agent.""" - - title: str - """The title of the session.""" - - created_time: core.AwareDatetime = pydantic.Field(alias=str("createdTime")) # type: ignore[literal-required] - """The time the session was created.""" - - updated_time: core.AwareDatetime = pydantic.Field(alias=str("updatedTime")) # type: ignore[literal-required] - """The time the session was last updated.""" - - message_count: int = pydantic.Field(alias=str("messageCount")) # type: ignore[literal-required] - """ - The count of messages in the session. - Includes both user messages and Agent replies, so each complete exchange counts as two messages. - """ - - estimated_expires_time: core.AwareDatetime = pydantic.Field(alias=str("estimatedExpiresTime")) # type: ignore[literal-required] - """ - The estimated time at which the session is due to expire. - Once a session has expired, it can no longer be accessed and a new session must be created. - The expiry time is automatically extended when new exchanges are added to the session. - """ - - -SessionRid = core.RID -"""The Resource Identifier (RID) of the conversation session.""" - - -class SessionTrace(core.ModelBase): - """SessionTrace""" - - id: SessionTraceId - """The unique identifier for the trace.""" - - status: SessionTraceStatus - """ - This indicates whether the Agent has finished generating the final response. Clients should keep polling - the `getSessionTrace` endpoint until the status is `COMPLETE`. - """ - - contexts: typing.Optional[SessionExchangeContexts] = None - """ - Any additional context which was provided by the client or retrieved automatically by the agent, grouped - by context type. Empty if no additional context was provided or configured to be automatically - retrieved. A present SessionExchangeContexts object with empty lists indicates that context retrieval - was attempted but no context was found. - Note that this field will only be populated once the response generation has completed. - """ - - tool_call_groups: typing.List[ToolCallGroup] = pydantic.Field(alias=str("toolCallGroups")) # type: ignore[literal-required] - """ - List of tool call groups that were triggered at the same point in the trace for the agent response - generation. The groups are returned in the same order as they were triggered by the agent. - """ - - -SessionTraceId = core.UUID -""" -The unique identifier for a trace. The trace lists the sequence of steps that an Agent took to arrive at an -answer. For example, a trace may include steps such as context retrieval and tool calls. -""" - - -SessionTraceStatus = typing.Literal["IN_PROGRESS", "COMPLETE"] -"""SessionTraceStatus""" - - -class StreamingContinueSessionRequest(core.ModelBase): - """StreamingContinueSessionRequest""" - - user_input: UserTextInput = pydantic.Field(alias=str("userInput")) # type: ignore[literal-required] - """The user message for the Agent to respond to.""" - - parameter_inputs: typing.Dict[ParameterId, ParameterValue] = pydantic.Field(alias=str("parameterInputs")) # type: ignore[literal-required] - """Any supplied values for [application variables](https://palantir.com/docs/foundry/agent-studio/application-state/) to pass to the Agent for the exchange.""" - - contexts_override: typing.Optional[typing.List[InputContext]] = pydantic.Field(alias=str("contextsOverride"), default=None) # type: ignore[literal-required] - """ - If set, automatic [context](https://palantir.com/docs/foundry/agent-studio/retrieval-context/) retrieval is skipped and the list of specified context is provided to the Agent instead. - If omitted, relevant context for the user message is automatically retrieved and included in the prompt, based on data sources configured on the Agent for the session. - """ - - message_id: typing.Optional[MessageId] = pydantic.Field(alias=str("messageId"), default=None) # type: ignore[literal-required] - """A client-generated Universally Unique Identifier (UUID) to identify the message, which the client can use to cancel the exchange before the streaming response is complete.""" - - session_trace_id: typing.Optional[SessionTraceId] = pydantic.Field(alias=str("sessionTraceId"), default=None) # type: ignore[literal-required] - """ - The unique identifier to use for this continue session trace. By generating and passing this ID to the - `streamingContinue` endpoint, clients can use this trace ID to separately load details of the trace used - to generate a result, while the result is in progress. If omitted, it will be generated automatically. - Clients can check the generated ID by inspecting the `sessionTraceId` in the `SessionExchangeResult`, - which can be loaded via the `getContent` endpoint. - """ - - -class StringParameter(core.ModelBase): - """StringParameter""" - - default_value: typing.Optional[str] = pydantic.Field(alias=str("defaultValue"), default=None) # type: ignore[literal-required] - """The default value to use for this variable.""" - - type: typing.Literal["string"] = "string" - - -class StringParameterValue(core.ModelBase): - """A value passed for `StringParameter` application variable types.""" - - value: str - type: typing.Literal["string"] = "string" - - -class StringToolInputValue(core.ModelBase): - """A string value that was passed as input to a tool.""" - - value: str - type: typing.Literal["string"] = "string" - - -class StringToolOutputValue(core.ModelBase): - """A string value that was returned from a tool.""" - - value: str - type: typing.Literal["string"] = "string" - - -class SuccessToolCallOutput(core.ModelBase): - """The successful output of a tool call.""" - - output: ToolOutputValue - type: typing.Literal["success"] = "success" - - -class ToolCall(core.ModelBase): - """A tool call with its input and output.""" - - tool_metadata: ToolMetadata = pydantic.Field(alias=str("toolMetadata")) # type: ignore[literal-required] - """Details about the tool that was called, including the name and type of the tool.""" - - input: ToolCallInput - output: typing.Optional[ToolCallOutput] = None - """Empty if the tool call is in progress.""" - - -class ToolCallGroup(core.ModelBase): - """List of tool calls that were triggered at the same point in the trace for the agent response generation.""" - - tool_calls: typing.List[ToolCall] = pydantic.Field(alias=str("toolCalls")) # type: ignore[literal-required] - - -class ToolCallInput(core.ModelBase): - """Input parameters for a tool call.""" - - thought: typing.Optional[str] = None - """Any additional message content that the Agent provided for why it chose to call the tool.""" - - inputs: typing.Dict[ToolInputName, ToolInputValue] - - -ToolCallOutput = typing_extensions.Annotated[ - typing.Union["SuccessToolCallOutput", "FailureToolCallOutput"], - pydantic.Field(discriminator="type"), -] -"""The output of a tool call.""" - - -ToolInputName = str -"""The name of a tool input parameter.""" - - -ToolInputValue = typing_extensions.Annotated[ - typing.Union["StringToolInputValue", "RidToolInputValue"], pydantic.Field(discriminator="type") -] -"""A tool input value, which can be either a string or a Resource Identifier (RID).""" - - -class ToolMetadata(core.ModelBase): - """Details about the used tool.""" - - name: str - """The name of the tool that was called, as configured on the Agent.""" - - type: ToolType - """The type of the tool that was called.""" - - -ToolOutputValue = typing_extensions.Annotated[ - typing.Union["StringToolOutputValue", "RidToolOutputValue"], - pydantic.Field(discriminator="type"), -] -"""A tool output value, which can be either a string or a Resource Identifier (RID).""" - - -ToolType = typing.Literal[ - "FUNCTION", - "ACTION", - "ONTOLOGY_SEMANTIC_SEARCH", - "OBJECT_QUERY", - "UPDATE_APPLICATION_VARIABLE", - "REQUEST_CLARIFICATION", - "OBJECT_QUERY_WITH_SQL", - "CODE_EXECUTION", -] -"""ToolType""" - - -class UpdateSessionTitleRequest(core.ModelBase): - """UpdateSessionTitleRequest""" - - title: str - """ - The new title for the session. - The maximum title length is 200 characters. Titles are truncated if they exceed this length. - """ - - -class UserTextInput(core.ModelBase): - """UserTextInput""" - - text: str - """The user message text.""" - - -core.resolve_forward_references(InputContext, globalns=globals(), localns=locals()) -core.resolve_forward_references(ParameterType, globalns=globals(), localns=locals()) -core.resolve_forward_references(ParameterValue, globalns=globals(), localns=locals()) -core.resolve_forward_references(ParameterValueUpdate, globalns=globals(), localns=locals()) -core.resolve_forward_references(ToolCallOutput, globalns=globals(), localns=locals()) -core.resolve_forward_references(ToolInputValue, globalns=globals(), localns=locals()) -core.resolve_forward_references(ToolOutputValue, globalns=globals(), localns=locals()) - -__all__ = [ - "Agent", - "AgentMarkdownResponse", - "AgentMetadata", - "AgentRid", - "AgentSessionRagContextResponse", - "AgentVersion", - "AgentVersionDetails", - "AgentVersionString", - "AgentsSessionsPage", - "BlockingContinueSessionRequest", - "CancelSessionRequest", - "CancelSessionResponse", - "Content", - "CreateSessionRequest", - "FailureToolCallOutput", - "FunctionRetrievedContext", - "GetRagContextForSessionRequest", - "InputContext", - "ListAgentVersionsResponse", - "ListSessionsResponse", - "MessageId", - "ObjectContext", - "ObjectSetParameter", - "ObjectSetParameterValue", - "ObjectSetParameterValueUpdate", - "Parameter", - "ParameterAccessMode", - "ParameterId", - "ParameterType", - "ParameterValue", - "ParameterValueUpdate", - "RidToolInputValue", - "RidToolOutputValue", - "Session", - "SessionExchange", - "SessionExchangeContexts", - "SessionExchangeResult", - "SessionMetadata", - "SessionRid", - "SessionTrace", - "SessionTraceId", - "SessionTraceStatus", - "StreamingContinueSessionRequest", - "StringParameter", - "StringParameterValue", - "StringToolInputValue", - "StringToolOutputValue", - "SuccessToolCallOutput", - "ToolCall", - "ToolCallGroup", - "ToolCallInput", - "ToolCallOutput", - "ToolInputName", - "ToolInputValue", - "ToolMetadata", - "ToolOutputValue", - "ToolType", - "UpdateSessionTitleRequest", - "UserTextInput", -] diff --git a/foundry_sdk/v2/aip_agents/session.py b/foundry_sdk/v2/aip_agents/session.py deleted file mode 100644 index b47d548fa..000000000 --- a/foundry_sdk/v2/aip_agents/session.py +++ /dev/null @@ -1,1542 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing -from functools import cached_property - -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v2.aip_agents import errors as aip_agents_errors -from foundry_sdk.v2.aip_agents import models as aip_agents_models -from foundry_sdk.v2.core import models as core_models - - -class SessionClient: - """ - The API client for the Session Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _SessionClientStreaming(self) - self.with_raw_response = _SessionClientRaw(self) - - @cached_property - def Content(self): - from foundry_sdk.v2.aip_agents.content import ContentClient - - return ContentClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @cached_property - def SessionTrace(self): - from foundry_sdk.v2.aip_agents.session_trace import SessionTraceClient - - return SessionTraceClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def blocking_continue( - self, - agent_rid: aip_agents_models.AgentRid, - session_rid: aip_agents_models.SessionRid, - *, - parameter_inputs: typing.Dict[ - aip_agents_models.ParameterId, aip_agents_models.ParameterValue - ], - user_input: aip_agents_models.UserTextInput, - contexts_override: typing.Optional[typing.List[aip_agents_models.InputContext]] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - session_trace_id: typing.Optional[aip_agents_models.SessionTraceId] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> aip_agents_models.SessionExchangeResult: - """ - Continue a conversation session with an Agent, or add the first exchange to a session after creation. - Adds a new exchange to the session with the provided inputs, and generates a response from the Agent. - Blocks on returning the result of the added exchange until the response is fully generated. - Streamed responses are also supported; see `streamingContinue` for details. - Concurrent requests to continue the same session are not supported. - Clients should wait to receive a response before sending the next message. - - :param agent_rid: An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). - :type agent_rid: AgentRid - :param session_rid: The Resource Identifier (RID) of the conversation session. - :type session_rid: SessionRid - :param parameter_inputs: Any supplied values for [application variables](https://palantir.com/docs/foundry/agent-studio/application-state/) to pass to the Agent for the exchange. - :type parameter_inputs: Dict[ParameterId, ParameterValue] - :param user_input: The user message for the Agent to respond to. - :type user_input: UserTextInput - :param contexts_override: If set, automatic [context retrieval](https://palantir.com/docs/foundry/agent-studio/retrieval-context/) is skipped and the list of specified context is provided to the Agent instead. If omitted, relevant context for the user message is automatically retrieved and included in the prompt, based on data sources configured on the Agent for the session. - :type contexts_override: Optional[List[InputContext]] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param session_trace_id: The unique identifier to use for this continue session trace. By generating and passing this ID to the `blockingContinue` endpoint, clients can use this trace ID to separately load details of the trace used to generate a result, while the result is in progress. If omitted, it will be generated automatically. Clients can check the generated ID by inspecting the `sessionTraceId` in the `SessionExchangeResult`. - :type session_trace_id: Optional[SessionTraceId] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: aip_agents_models.SessionExchangeResult - - :raises AgentIterationsExceededLimit: The Agent was unable to produce an answer in the set number of maximum iterations. This can happen if the Agent gets confused or stuck in a loop, or if the query is too complex. Try a different query or review the Agent configuration in AIP Agent Studio. - :raises AgentNotFound: The given Agent could not be found. - :raises BlockingContinueSessionPermissionDenied: Could not blockingContinue the Session. - :raises ContextSizeExceededLimit: Failed to generate a response for a session because the context size of the LLM has been exceeded. Clients should either retry with a shorter message or create a new session and try re-sending the message. - :raises FunctionLocatorNotFound: The specified function locator is configured for use by the Agent but could not be found. The function type or version may not exist or the client token does not have access. - :raises InvalidParameter: The provided application variable is not valid for the Agent for this session. Check the available application variables for the Agent under the `parameters` property, and version through the API with `getAgent`, or in AIP Agent Studio. The Agent version used for the session can be checked through the API with `getSession`. - :raises InvalidParameterType: The provided value does not match the expected type for the application variable configured on the Agent for this session. Check the available application variables for the Agent under the `parameters` property, and version through the API with `getAgent`, or in AIP Agent Studio. The Agent version used for the session can be checked through the API with `getSession`. - :raises ObjectTypeIdsNotFound: Some object types are configured for use by the Agent but could not be found. The object types either do not exist or the client token does not have access. Object types can be checked by listing available object types through the API, or searching in [Ontology Manager](https://palantir.com/docs/foundry/ontology-manager/overview/). - :raises ObjectTypeRidsNotFound: Some object types are configured for use by the Agent but could not be found. The object types either do not exist or the client token does not have access. Object types can be checked by listing available object types through the API, or searching in [Ontology Manager](https://palantir.com/docs/foundry/ontology-manager/overview/). - :raises OntologyEntitiesNotFound: Some ontology types are configured for use by the Agent but could not be found. The types either do not exist or the client token does not have access. Object types and their link types can be checked by listing available object/link types through the API, or searching in [Ontology Manager](https://palantir.com/docs/foundry/ontology-manager/overview/). - :raises RateLimitExceeded: Failed to generate a response as the model rate limits were exceeded. Clients should wait and retry. - :raises RetryAttemptsExceeded: Failed to generate a response after retrying up to the configured number of retry attempts. Clients should wait and retry. - :raises RetryDeadlineExceeded: Failed to generate a response after retrying up to the configured retry deadline. Clients should wait and retry. - :raises SessionExecutionFailed: Failed to generate a response for a session due to an unexpected error. - :raises SessionNotFound: The given Session could not be found. - :raises SessionTraceIdAlreadyExists: The provided trace ID already exists for the session and cannot be reused. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}/blockingContinue", - query_params={ - "preview": preview, - }, - path_params={ - "agentRid": agent_rid, - "sessionRid": session_rid, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=aip_agents_models.BlockingContinueSessionRequest( - user_input=user_input, - parameter_inputs=parameter_inputs, - contexts_override=contexts_override, - session_trace_id=session_trace_id, - ), - response_type=aip_agents_models.SessionExchangeResult, - request_timeout=request_timeout, - throwable_errors={ - "AgentIterationsExceededLimit": aip_agents_errors.AgentIterationsExceededLimit, - "AgentNotFound": aip_agents_errors.AgentNotFound, - "BlockingContinueSessionPermissionDenied": aip_agents_errors.BlockingContinueSessionPermissionDenied, - "ContextSizeExceededLimit": aip_agents_errors.ContextSizeExceededLimit, - "FunctionLocatorNotFound": aip_agents_errors.FunctionLocatorNotFound, - "InvalidParameter": aip_agents_errors.InvalidParameter, - "InvalidParameterType": aip_agents_errors.InvalidParameterType, - "ObjectTypeIdsNotFound": aip_agents_errors.ObjectTypeIdsNotFound, - "ObjectTypeRidsNotFound": aip_agents_errors.ObjectTypeRidsNotFound, - "OntologyEntitiesNotFound": aip_agents_errors.OntologyEntitiesNotFound, - "RateLimitExceeded": aip_agents_errors.RateLimitExceeded, - "RetryAttemptsExceeded": aip_agents_errors.RetryAttemptsExceeded, - "RetryDeadlineExceeded": aip_agents_errors.RetryDeadlineExceeded, - "SessionExecutionFailed": aip_agents_errors.SessionExecutionFailed, - "SessionNotFound": aip_agents_errors.SessionNotFound, - "SessionTraceIdAlreadyExists": aip_agents_errors.SessionTraceIdAlreadyExists, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def cancel( - self, - agent_rid: aip_agents_models.AgentRid, - session_rid: aip_agents_models.SessionRid, - *, - message_id: aip_agents_models.MessageId, - preview: typing.Optional[core_models.PreviewMode] = None, - response: typing.Optional[aip_agents_models.AgentMarkdownResponse] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> aip_agents_models.CancelSessionResponse: - """ - Cancel an in-progress streamed exchange with an Agent which was initiated with `streamingContinue`. - Canceling an exchange allows clients to prevent the exchange from being added to the session, or to provide a response to replace the Agent-generated response. - Note that canceling an exchange does not terminate the stream returned by `streamingContinue`; clients should close the stream on triggering the cancellation request to stop reading from the stream. - - :param agent_rid: An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). - :type agent_rid: AgentRid - :param session_rid: The Resource Identifier (RID) of the conversation session. - :type session_rid: SessionRid - :param message_id: The identifier for the in-progress exchange to cancel. This should match the `messageId` which was provided when initiating the exchange with `streamingContinue`. - :type message_id: MessageId - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param response: When specified, the exchange is added to the session with the client-provided response as the result. When omitted, the exchange is not added to the session. - :type response: Optional[AgentMarkdownResponse] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: aip_agents_models.CancelSessionResponse - - :raises AgentNotFound: The given Agent could not be found. - :raises CancelSessionFailedMessageNotInProgress: Unable to cancel the requested session exchange as no in-progress exchange was found for the provided message identifier. This is expected if no exchange was initiated with the provided message identifier through a `streamingContinue` request, or if the exchange for this identifier has already completed and cannot be canceled, or if the exchange has already been canceled. This error can also occur if the cancellation was requested immediately after requesting the exchange through a `streamingContinue` request, and the exchange has not started yet. Clients should handle these errors gracefully, and can reload the session content to get the latest conversation state. - :raises CancelSessionPermissionDenied: Could not cancel the Session. - :raises SessionNotFound: The given Session could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}/cancel", - query_params={ - "preview": preview, - }, - path_params={ - "agentRid": agent_rid, - "sessionRid": session_rid, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=aip_agents_models.CancelSessionRequest( - message_id=message_id, - response=response, - ), - response_type=aip_agents_models.CancelSessionResponse, - request_timeout=request_timeout, - throwable_errors={ - "AgentNotFound": aip_agents_errors.AgentNotFound, - "CancelSessionFailedMessageNotInProgress": aip_agents_errors.CancelSessionFailedMessageNotInProgress, - "CancelSessionPermissionDenied": aip_agents_errors.CancelSessionPermissionDenied, - "SessionNotFound": aip_agents_errors.SessionNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def create( - self, - agent_rid: aip_agents_models.AgentRid, - *, - agent_version: typing.Optional[aip_agents_models.AgentVersionString] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> aip_agents_models.Session: - """ - Create a new conversation session between the calling user and an Agent. - Use `blockingContinue` or `streamingContinue` to start adding exchanges to the session. - - :param agent_rid: An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). - :type agent_rid: AgentRid - :param agent_version: The version of the Agent associated with the session. This can be set by clients on session creation. If not specified, defaults to use the latest published version of the Agent at session creation time. - :type agent_version: Optional[AgentVersionString] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: aip_agents_models.Session - - :raises AgentNotFound: The given Agent could not be found. - :raises AgentVersionNotFound: The given AgentVersion could not be found. - :raises CreateSessionPermissionDenied: Could not create the Session. - :raises FunctionLocatorNotFound: The specified function locator is configured for use by the Agent but could not be found. The function type or version may not exist or the client token does not have access. - :raises InvalidAgentVersion: The provided version string is not a valid format for an Agent version. - :raises NoPublishedAgentVersion: Failed to retrieve the latest published version of the Agent because the Agent has no published versions. Try publishing the Agent in AIP Agent Studio to use the latest published version, or specify the version of the Agent to use. - :raises ObjectTypeIdsNotFound: Some object types are configured for use by the Agent but could not be found. The object types either do not exist or the client token does not have access. Object types can be checked by listing available object types through the API, or searching in [Ontology Manager](https://palantir.com/docs/foundry/ontology-manager/overview/). - :raises ObjectTypeRidsNotFound: Some object types are configured for use by the Agent but could not be found. The object types either do not exist or the client token does not have access. Object types can be checked by listing available object types through the API, or searching in [Ontology Manager](https://palantir.com/docs/foundry/ontology-manager/overview/). - :raises OntologyEntitiesNotFound: Some ontology types are configured for use by the Agent but could not be found. The types either do not exist or the client token does not have access. Object types and their link types can be checked by listing available object/link types through the API, or searching in [Ontology Manager](https://palantir.com/docs/foundry/ontology-manager/overview/). - :raises SessionNotFound: The given Session could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/aipAgents/agents/{agentRid}/sessions", - query_params={ - "preview": preview, - }, - path_params={ - "agentRid": agent_rid, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=aip_agents_models.CreateSessionRequest( - agent_version=agent_version, - ), - response_type=aip_agents_models.Session, - request_timeout=request_timeout, - throwable_errors={ - "AgentNotFound": aip_agents_errors.AgentNotFound, - "AgentVersionNotFound": aip_agents_errors.AgentVersionNotFound, - "CreateSessionPermissionDenied": aip_agents_errors.CreateSessionPermissionDenied, - "FunctionLocatorNotFound": aip_agents_errors.FunctionLocatorNotFound, - "InvalidAgentVersion": aip_agents_errors.InvalidAgentVersion, - "NoPublishedAgentVersion": aip_agents_errors.NoPublishedAgentVersion, - "ObjectTypeIdsNotFound": aip_agents_errors.ObjectTypeIdsNotFound, - "ObjectTypeRidsNotFound": aip_agents_errors.ObjectTypeRidsNotFound, - "OntologyEntitiesNotFound": aip_agents_errors.OntologyEntitiesNotFound, - "SessionNotFound": aip_agents_errors.SessionNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def delete( - self, - agent_rid: aip_agents_models.AgentRid, - session_rid: aip_agents_models.SessionRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> None: - """ - Delete a conversation session between the calling user and an Agent. - Once deleted, the session can no longer be accessed and will not appear in session lists. - - :param agent_rid: An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). - :type agent_rid: AgentRid - :param session_rid: The Resource Identifier (RID) of the conversation session. - :type session_rid: SessionRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: None - - :raises AgentNotFound: The given Agent could not be found. - :raises DeleteSessionPermissionDenied: Could not delete the Session. - :raises SessionNotFound: The given Session could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="DELETE", - resource_path="/v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}", - query_params={ - "preview": preview, - }, - path_params={ - "agentRid": agent_rid, - "sessionRid": session_rid, - }, - header_params={}, - body=None, - response_type=None, - request_timeout=request_timeout, - throwable_errors={ - "AgentNotFound": aip_agents_errors.AgentNotFound, - "DeleteSessionPermissionDenied": aip_agents_errors.DeleteSessionPermissionDenied, - "SessionNotFound": aip_agents_errors.SessionNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - agent_rid: aip_agents_models.AgentRid, - session_rid: aip_agents_models.SessionRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> aip_agents_models.Session: - """ - Get the details of a conversation session between the calling user and an Agent. - :param agent_rid: An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). - :type agent_rid: AgentRid - :param session_rid: The Resource Identifier (RID) of the conversation session. - :type session_rid: SessionRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: aip_agents_models.Session - - :raises AgentNotFound: The given Agent could not be found. - :raises SessionNotFound: The given Session could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}", - query_params={ - "preview": preview, - }, - path_params={ - "agentRid": agent_rid, - "sessionRid": session_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=aip_agents_models.Session, - request_timeout=request_timeout, - throwable_errors={ - "AgentNotFound": aip_agents_errors.AgentNotFound, - "SessionNotFound": aip_agents_errors.SessionNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def list( - self, - agent_rid: aip_agents_models.AgentRid, - *, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.ResourceIterator[aip_agents_models.Session]: - """ - List all conversation sessions between the calling user and an Agent that was created by this client. - This does not list sessions for the user created by other clients. - For example, any sessions created by the user in AIP Agent Studio will not be listed here. - Sessions are returned in order of most recently updated first. - - :param agent_rid: An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). - :type agent_rid: AgentRid - :param page_size: The page size to use for the endpoint. - :type page_size: Optional[PageSize] - :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. - :type page_token: Optional[PageToken] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.ResourceIterator[aip_agents_models.Session] - - :raises AgentNotFound: The given Agent could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/aipAgents/agents/{agentRid}/sessions", - query_params={ - "pageSize": page_size, - "pageToken": page_token, - "preview": preview, - }, - path_params={ - "agentRid": agent_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=aip_agents_models.ListSessionsResponse, - request_timeout=request_timeout, - throwable_errors={ - "AgentNotFound": aip_agents_errors.AgentNotFound, - }, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def rag_context( - self, - agent_rid: aip_agents_models.AgentRid, - session_rid: aip_agents_models.SessionRid, - *, - parameter_inputs: typing.Dict[ - aip_agents_models.ParameterId, aip_agents_models.ParameterValue - ], - user_input: aip_agents_models.UserTextInput, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> aip_agents_models.AgentSessionRagContextResponse: - """ - Retrieve relevant [context](https://palantir.com/docs/foundry/agent-studio/core-concepts/#retrieval-context) for a user message from the data sources configured for the session. - This allows clients to pre-retrieve context for a user message before sending it to the Agent with the `contextsOverride` option when continuing a session, to allow any pre-processing of the context before sending it to the Agent. - - :param agent_rid: An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). - :type agent_rid: AgentRid - :param session_rid: The Resource Identifier (RID) of the conversation session. - :type session_rid: SessionRid - :param parameter_inputs: Any values for [application variables](https://palantir.com/docs/foundry/agent-studio/application-state/) to use for the context retrieval. - :type parameter_inputs: Dict[ParameterId, ParameterValue] - :param user_input: The user message to retrieve relevant context for from the configured Agent data sources. - :type user_input: UserTextInput - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: aip_agents_models.AgentSessionRagContextResponse - - :raises AgentNotFound: The given Agent could not be found. - :raises FunctionLocatorNotFound: The specified function locator is configured for use by the Agent but could not be found. The function type or version may not exist or the client token does not have access. - :raises GetRagContextForSessionPermissionDenied: Could not ragContext the Session. - :raises ObjectTypeIdsNotFound: Some object types are configured for use by the Agent but could not be found. The object types either do not exist or the client token does not have access. Object types can be checked by listing available object types through the API, or searching in [Ontology Manager](https://palantir.com/docs/foundry/ontology-manager/overview/). - :raises ObjectTypeRidsNotFound: Some object types are configured for use by the Agent but could not be found. The object types either do not exist or the client token does not have access. Object types can be checked by listing available object types through the API, or searching in [Ontology Manager](https://palantir.com/docs/foundry/ontology-manager/overview/). - :raises OntologyEntitiesNotFound: Some ontology types are configured for use by the Agent but could not be found. The types either do not exist or the client token does not have access. Object types and their link types can be checked by listing available object/link types through the API, or searching in [Ontology Manager](https://palantir.com/docs/foundry/ontology-manager/overview/). - :raises SessionNotFound: The given Session could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="PUT", - resource_path="/v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}/ragContext", - query_params={ - "preview": preview, - }, - path_params={ - "agentRid": agent_rid, - "sessionRid": session_rid, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=aip_agents_models.GetRagContextForSessionRequest( - user_input=user_input, - parameter_inputs=parameter_inputs, - ), - response_type=aip_agents_models.AgentSessionRagContextResponse, - request_timeout=request_timeout, - throwable_errors={ - "AgentNotFound": aip_agents_errors.AgentNotFound, - "FunctionLocatorNotFound": aip_agents_errors.FunctionLocatorNotFound, - "GetRagContextForSessionPermissionDenied": aip_agents_errors.GetRagContextForSessionPermissionDenied, - "ObjectTypeIdsNotFound": aip_agents_errors.ObjectTypeIdsNotFound, - "ObjectTypeRidsNotFound": aip_agents_errors.ObjectTypeRidsNotFound, - "OntologyEntitiesNotFound": aip_agents_errors.OntologyEntitiesNotFound, - "SessionNotFound": aip_agents_errors.SessionNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def streaming_continue( - self, - agent_rid: aip_agents_models.AgentRid, - session_rid: aip_agents_models.SessionRid, - *, - parameter_inputs: typing.Dict[ - aip_agents_models.ParameterId, aip_agents_models.ParameterValue - ], - user_input: aip_agents_models.UserTextInput, - contexts_override: typing.Optional[typing.List[aip_agents_models.InputContext]] = None, - message_id: typing.Optional[aip_agents_models.MessageId] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - session_trace_id: typing.Optional[aip_agents_models.SessionTraceId] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> bytes: - """ - Continue a conversation session with an Agent, or add the first exchange to a session after creation. - Adds a new exchange to the session with the provided inputs, and generates a response from the Agent. - Returns a stream of the Agent response text (formatted using markdown) for clients to consume as the response is generated. - On completion of the streamed response, clients can load the full details of the exchange that was added to the session by reloading the session content. - Streamed exchanges also support cancellation; see `cancel` for details. - Concurrent requests to continue the same session are not supported. - Clients should wait to receive a response, or cancel the in-progress exchange, before sending the next message. - - :param agent_rid: An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). - :type agent_rid: AgentRid - :param session_rid: The Resource Identifier (RID) of the conversation session. - :type session_rid: SessionRid - :param parameter_inputs: Any supplied values for [application variables](https://palantir.com/docs/foundry/agent-studio/application-state/) to pass to the Agent for the exchange. - :type parameter_inputs: Dict[ParameterId, ParameterValue] - :param user_input: The user message for the Agent to respond to. - :type user_input: UserTextInput - :param contexts_override: If set, automatic [context](https://palantir.com/docs/foundry/agent-studio/retrieval-context/) retrieval is skipped and the list of specified context is provided to the Agent instead. If omitted, relevant context for the user message is automatically retrieved and included in the prompt, based on data sources configured on the Agent for the session. - :type contexts_override: Optional[List[InputContext]] - :param message_id: A client-generated Universally Unique Identifier (UUID) to identify the message, which the client can use to cancel the exchange before the streaming response is complete. - :type message_id: Optional[MessageId] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param session_trace_id: The unique identifier to use for this continue session trace. By generating and passing this ID to the `streamingContinue` endpoint, clients can use this trace ID to separately load details of the trace used to generate a result, while the result is in progress. If omitted, it will be generated automatically. Clients can check the generated ID by inspecting the `sessionTraceId` in the `SessionExchangeResult`, which can be loaded via the `getContent` endpoint. - :type session_trace_id: Optional[SessionTraceId] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: bytes - - :raises AgentNotFound: The given Agent could not be found. - :raises FunctionLocatorNotFound: The specified function locator is configured for use by the Agent but could not be found. The function type or version may not exist or the client token does not have access. - :raises InvalidParameter: The provided application variable is not valid for the Agent for this session. Check the available application variables for the Agent under the `parameters` property, and version through the API with `getAgent`, or in AIP Agent Studio. The Agent version used for the session can be checked through the API with `getSession`. - :raises InvalidParameterType: The provided value does not match the expected type for the application variable configured on the Agent for this session. Check the available application variables for the Agent under the `parameters` property, and version through the API with `getAgent`, or in AIP Agent Studio. The Agent version used for the session can be checked through the API with `getSession`. - :raises ObjectTypeIdsNotFound: Some object types are configured for use by the Agent but could not be found. The object types either do not exist or the client token does not have access. Object types can be checked by listing available object types through the API, or searching in [Ontology Manager](https://palantir.com/docs/foundry/ontology-manager/overview/). - :raises ObjectTypeRidsNotFound: Some object types are configured for use by the Agent but could not be found. The object types either do not exist or the client token does not have access. Object types can be checked by listing available object types through the API, or searching in [Ontology Manager](https://palantir.com/docs/foundry/ontology-manager/overview/). - :raises OntologyEntitiesNotFound: Some ontology types are configured for use by the Agent but could not be found. The types either do not exist or the client token does not have access. Object types and their link types can be checked by listing available object/link types through the API, or searching in [Ontology Manager](https://palantir.com/docs/foundry/ontology-manager/overview/). - :raises SessionNotFound: The given Session could not be found. - :raises SessionTraceIdAlreadyExists: The provided trace ID already exists for the session and cannot be reused. - :raises StreamingContinueSessionPermissionDenied: Could not streamingContinue the Session. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}/streamingContinue", - query_params={ - "preview": preview, - }, - path_params={ - "agentRid": agent_rid, - "sessionRid": session_rid, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/octet-stream", - }, - body=aip_agents_models.StreamingContinueSessionRequest( - user_input=user_input, - parameter_inputs=parameter_inputs, - contexts_override=contexts_override, - message_id=message_id, - session_trace_id=session_trace_id, - ), - response_type=bytes, - request_timeout=request_timeout, - throwable_errors={ - "AgentNotFound": aip_agents_errors.AgentNotFound, - "FunctionLocatorNotFound": aip_agents_errors.FunctionLocatorNotFound, - "InvalidParameter": aip_agents_errors.InvalidParameter, - "InvalidParameterType": aip_agents_errors.InvalidParameterType, - "ObjectTypeIdsNotFound": aip_agents_errors.ObjectTypeIdsNotFound, - "ObjectTypeRidsNotFound": aip_agents_errors.ObjectTypeRidsNotFound, - "OntologyEntitiesNotFound": aip_agents_errors.OntologyEntitiesNotFound, - "SessionNotFound": aip_agents_errors.SessionNotFound, - "SessionTraceIdAlreadyExists": aip_agents_errors.SessionTraceIdAlreadyExists, - "StreamingContinueSessionPermissionDenied": aip_agents_errors.StreamingContinueSessionPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def update_title( - self, - agent_rid: aip_agents_models.AgentRid, - session_rid: aip_agents_models.SessionRid, - *, - title: str, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> None: - """ - Update the title for a session. - Use this to set a custom title for a session to help identify it in the list of sessions with an Agent. - - :param agent_rid: An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). - :type agent_rid: AgentRid - :param session_rid: The Resource Identifier (RID) of the conversation session. - :type session_rid: SessionRid - :param title: The new title for the session. The maximum title length is 200 characters. Titles are truncated if they exceed this length. - :type title: str - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: None - - :raises AgentNotFound: The given Agent could not be found. - :raises SessionNotFound: The given Session could not be found. - :raises UpdateSessionTitlePermissionDenied: Could not updateTitle the Session. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="PUT", - resource_path="/v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}/updateTitle", - query_params={ - "preview": preview, - }, - path_params={ - "agentRid": agent_rid, - "sessionRid": session_rid, - }, - header_params={ - "Content-Type": "application/json", - }, - body=aip_agents_models.UpdateSessionTitleRequest( - title=title, - ), - response_type=None, - request_timeout=request_timeout, - throwable_errors={ - "AgentNotFound": aip_agents_errors.AgentNotFound, - "SessionNotFound": aip_agents_errors.SessionNotFound, - "UpdateSessionTitlePermissionDenied": aip_agents_errors.UpdateSessionTitlePermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _SessionClientRaw: - def __init__(self, client: SessionClient) -> None: - def blocking_continue(_: aip_agents_models.SessionExchangeResult): ... - def cancel(_: aip_agents_models.CancelSessionResponse): ... - def create(_: aip_agents_models.Session): ... - def delete(_: None): ... - def get(_: aip_agents_models.Session): ... - def list(_: aip_agents_models.ListSessionsResponse): ... - def rag_context(_: aip_agents_models.AgentSessionRagContextResponse): ... - def streaming_continue(_: bytes): ... - def update_title(_: None): ... - - self.blocking_continue = core.with_raw_response(blocking_continue, client.blocking_continue) - self.cancel = core.with_raw_response(cancel, client.cancel) - self.create = core.with_raw_response(create, client.create) - self.delete = core.with_raw_response(delete, client.delete) - self.get = core.with_raw_response(get, client.get) - self.list = core.with_raw_response(list, client.list) - self.rag_context = core.with_raw_response(rag_context, client.rag_context) - self.streaming_continue = core.with_raw_response( - streaming_continue, client.streaming_continue - ) - self.update_title = core.with_raw_response(update_title, client.update_title) - - -class _SessionClientStreaming: - def __init__(self, client: SessionClient) -> None: - def blocking_continue(_: aip_agents_models.SessionExchangeResult): ... - def cancel(_: aip_agents_models.CancelSessionResponse): ... - def create(_: aip_agents_models.Session): ... - def get(_: aip_agents_models.Session): ... - def list(_: aip_agents_models.ListSessionsResponse): ... - def rag_context(_: aip_agents_models.AgentSessionRagContextResponse): ... - def streaming_continue(_: bytes): ... - - self.blocking_continue = core.with_streaming_response( - blocking_continue, client.blocking_continue - ) - self.cancel = core.with_streaming_response(cancel, client.cancel) - self.create = core.with_streaming_response(create, client.create) - self.get = core.with_streaming_response(get, client.get) - self.list = core.with_streaming_response(list, client.list) - self.rag_context = core.with_streaming_response(rag_context, client.rag_context) - self.streaming_continue = core.with_streaming_response( - streaming_continue, client.streaming_continue - ) - - -class AsyncSessionClient: - """ - The API client for the Session Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AsyncSessionClientStreaming(self) - self.with_raw_response = _AsyncSessionClientRaw(self) - - @cached_property - def Content(self): - from foundry_sdk.v2.aip_agents.content import AsyncContentClient - - return AsyncContentClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @cached_property - def SessionTrace(self): - from foundry_sdk.v2.aip_agents.session_trace import AsyncSessionTraceClient - - return AsyncSessionTraceClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def blocking_continue( - self, - agent_rid: aip_agents_models.AgentRid, - session_rid: aip_agents_models.SessionRid, - *, - parameter_inputs: typing.Dict[ - aip_agents_models.ParameterId, aip_agents_models.ParameterValue - ], - user_input: aip_agents_models.UserTextInput, - contexts_override: typing.Optional[typing.List[aip_agents_models.InputContext]] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - session_trace_id: typing.Optional[aip_agents_models.SessionTraceId] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[aip_agents_models.SessionExchangeResult]: - """ - Continue a conversation session with an Agent, or add the first exchange to a session after creation. - Adds a new exchange to the session with the provided inputs, and generates a response from the Agent. - Blocks on returning the result of the added exchange until the response is fully generated. - Streamed responses are also supported; see `streamingContinue` for details. - Concurrent requests to continue the same session are not supported. - Clients should wait to receive a response before sending the next message. - - :param agent_rid: An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). - :type agent_rid: AgentRid - :param session_rid: The Resource Identifier (RID) of the conversation session. - :type session_rid: SessionRid - :param parameter_inputs: Any supplied values for [application variables](https://palantir.com/docs/foundry/agent-studio/application-state/) to pass to the Agent for the exchange. - :type parameter_inputs: Dict[ParameterId, ParameterValue] - :param user_input: The user message for the Agent to respond to. - :type user_input: UserTextInput - :param contexts_override: If set, automatic [context retrieval](https://palantir.com/docs/foundry/agent-studio/retrieval-context/) is skipped and the list of specified context is provided to the Agent instead. If omitted, relevant context for the user message is automatically retrieved and included in the prompt, based on data sources configured on the Agent for the session. - :type contexts_override: Optional[List[InputContext]] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param session_trace_id: The unique identifier to use for this continue session trace. By generating and passing this ID to the `blockingContinue` endpoint, clients can use this trace ID to separately load details of the trace used to generate a result, while the result is in progress. If omitted, it will be generated automatically. Clients can check the generated ID by inspecting the `sessionTraceId` in the `SessionExchangeResult`. - :type session_trace_id: Optional[SessionTraceId] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[aip_agents_models.SessionExchangeResult] - - :raises AgentIterationsExceededLimit: The Agent was unable to produce an answer in the set number of maximum iterations. This can happen if the Agent gets confused or stuck in a loop, or if the query is too complex. Try a different query or review the Agent configuration in AIP Agent Studio. - :raises AgentNotFound: The given Agent could not be found. - :raises BlockingContinueSessionPermissionDenied: Could not blockingContinue the Session. - :raises ContextSizeExceededLimit: Failed to generate a response for a session because the context size of the LLM has been exceeded. Clients should either retry with a shorter message or create a new session and try re-sending the message. - :raises FunctionLocatorNotFound: The specified function locator is configured for use by the Agent but could not be found. The function type or version may not exist or the client token does not have access. - :raises InvalidParameter: The provided application variable is not valid for the Agent for this session. Check the available application variables for the Agent under the `parameters` property, and version through the API with `getAgent`, or in AIP Agent Studio. The Agent version used for the session can be checked through the API with `getSession`. - :raises InvalidParameterType: The provided value does not match the expected type for the application variable configured on the Agent for this session. Check the available application variables for the Agent under the `parameters` property, and version through the API with `getAgent`, or in AIP Agent Studio. The Agent version used for the session can be checked through the API with `getSession`. - :raises ObjectTypeIdsNotFound: Some object types are configured for use by the Agent but could not be found. The object types either do not exist or the client token does not have access. Object types can be checked by listing available object types through the API, or searching in [Ontology Manager](https://palantir.com/docs/foundry/ontology-manager/overview/). - :raises ObjectTypeRidsNotFound: Some object types are configured for use by the Agent but could not be found. The object types either do not exist or the client token does not have access. Object types can be checked by listing available object types through the API, or searching in [Ontology Manager](https://palantir.com/docs/foundry/ontology-manager/overview/). - :raises OntologyEntitiesNotFound: Some ontology types are configured for use by the Agent but could not be found. The types either do not exist or the client token does not have access. Object types and their link types can be checked by listing available object/link types through the API, or searching in [Ontology Manager](https://palantir.com/docs/foundry/ontology-manager/overview/). - :raises RateLimitExceeded: Failed to generate a response as the model rate limits were exceeded. Clients should wait and retry. - :raises RetryAttemptsExceeded: Failed to generate a response after retrying up to the configured number of retry attempts. Clients should wait and retry. - :raises RetryDeadlineExceeded: Failed to generate a response after retrying up to the configured retry deadline. Clients should wait and retry. - :raises SessionExecutionFailed: Failed to generate a response for a session due to an unexpected error. - :raises SessionNotFound: The given Session could not be found. - :raises SessionTraceIdAlreadyExists: The provided trace ID already exists for the session and cannot be reused. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}/blockingContinue", - query_params={ - "preview": preview, - }, - path_params={ - "agentRid": agent_rid, - "sessionRid": session_rid, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=aip_agents_models.BlockingContinueSessionRequest( - user_input=user_input, - parameter_inputs=parameter_inputs, - contexts_override=contexts_override, - session_trace_id=session_trace_id, - ), - response_type=aip_agents_models.SessionExchangeResult, - request_timeout=request_timeout, - throwable_errors={ - "AgentIterationsExceededLimit": aip_agents_errors.AgentIterationsExceededLimit, - "AgentNotFound": aip_agents_errors.AgentNotFound, - "BlockingContinueSessionPermissionDenied": aip_agents_errors.BlockingContinueSessionPermissionDenied, - "ContextSizeExceededLimit": aip_agents_errors.ContextSizeExceededLimit, - "FunctionLocatorNotFound": aip_agents_errors.FunctionLocatorNotFound, - "InvalidParameter": aip_agents_errors.InvalidParameter, - "InvalidParameterType": aip_agents_errors.InvalidParameterType, - "ObjectTypeIdsNotFound": aip_agents_errors.ObjectTypeIdsNotFound, - "ObjectTypeRidsNotFound": aip_agents_errors.ObjectTypeRidsNotFound, - "OntologyEntitiesNotFound": aip_agents_errors.OntologyEntitiesNotFound, - "RateLimitExceeded": aip_agents_errors.RateLimitExceeded, - "RetryAttemptsExceeded": aip_agents_errors.RetryAttemptsExceeded, - "RetryDeadlineExceeded": aip_agents_errors.RetryDeadlineExceeded, - "SessionExecutionFailed": aip_agents_errors.SessionExecutionFailed, - "SessionNotFound": aip_agents_errors.SessionNotFound, - "SessionTraceIdAlreadyExists": aip_agents_errors.SessionTraceIdAlreadyExists, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def cancel( - self, - agent_rid: aip_agents_models.AgentRid, - session_rid: aip_agents_models.SessionRid, - *, - message_id: aip_agents_models.MessageId, - preview: typing.Optional[core_models.PreviewMode] = None, - response: typing.Optional[aip_agents_models.AgentMarkdownResponse] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[aip_agents_models.CancelSessionResponse]: - """ - Cancel an in-progress streamed exchange with an Agent which was initiated with `streamingContinue`. - Canceling an exchange allows clients to prevent the exchange from being added to the session, or to provide a response to replace the Agent-generated response. - Note that canceling an exchange does not terminate the stream returned by `streamingContinue`; clients should close the stream on triggering the cancellation request to stop reading from the stream. - - :param agent_rid: An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). - :type agent_rid: AgentRid - :param session_rid: The Resource Identifier (RID) of the conversation session. - :type session_rid: SessionRid - :param message_id: The identifier for the in-progress exchange to cancel. This should match the `messageId` which was provided when initiating the exchange with `streamingContinue`. - :type message_id: MessageId - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param response: When specified, the exchange is added to the session with the client-provided response as the result. When omitted, the exchange is not added to the session. - :type response: Optional[AgentMarkdownResponse] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[aip_agents_models.CancelSessionResponse] - - :raises AgentNotFound: The given Agent could not be found. - :raises CancelSessionFailedMessageNotInProgress: Unable to cancel the requested session exchange as no in-progress exchange was found for the provided message identifier. This is expected if no exchange was initiated with the provided message identifier through a `streamingContinue` request, or if the exchange for this identifier has already completed and cannot be canceled, or if the exchange has already been canceled. This error can also occur if the cancellation was requested immediately after requesting the exchange through a `streamingContinue` request, and the exchange has not started yet. Clients should handle these errors gracefully, and can reload the session content to get the latest conversation state. - :raises CancelSessionPermissionDenied: Could not cancel the Session. - :raises SessionNotFound: The given Session could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}/cancel", - query_params={ - "preview": preview, - }, - path_params={ - "agentRid": agent_rid, - "sessionRid": session_rid, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=aip_agents_models.CancelSessionRequest( - message_id=message_id, - response=response, - ), - response_type=aip_agents_models.CancelSessionResponse, - request_timeout=request_timeout, - throwable_errors={ - "AgentNotFound": aip_agents_errors.AgentNotFound, - "CancelSessionFailedMessageNotInProgress": aip_agents_errors.CancelSessionFailedMessageNotInProgress, - "CancelSessionPermissionDenied": aip_agents_errors.CancelSessionPermissionDenied, - "SessionNotFound": aip_agents_errors.SessionNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def create( - self, - agent_rid: aip_agents_models.AgentRid, - *, - agent_version: typing.Optional[aip_agents_models.AgentVersionString] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[aip_agents_models.Session]: - """ - Create a new conversation session between the calling user and an Agent. - Use `blockingContinue` or `streamingContinue` to start adding exchanges to the session. - - :param agent_rid: An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). - :type agent_rid: AgentRid - :param agent_version: The version of the Agent associated with the session. This can be set by clients on session creation. If not specified, defaults to use the latest published version of the Agent at session creation time. - :type agent_version: Optional[AgentVersionString] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[aip_agents_models.Session] - - :raises AgentNotFound: The given Agent could not be found. - :raises AgentVersionNotFound: The given AgentVersion could not be found. - :raises CreateSessionPermissionDenied: Could not create the Session. - :raises FunctionLocatorNotFound: The specified function locator is configured for use by the Agent but could not be found. The function type or version may not exist or the client token does not have access. - :raises InvalidAgentVersion: The provided version string is not a valid format for an Agent version. - :raises NoPublishedAgentVersion: Failed to retrieve the latest published version of the Agent because the Agent has no published versions. Try publishing the Agent in AIP Agent Studio to use the latest published version, or specify the version of the Agent to use. - :raises ObjectTypeIdsNotFound: Some object types are configured for use by the Agent but could not be found. The object types either do not exist or the client token does not have access. Object types can be checked by listing available object types through the API, or searching in [Ontology Manager](https://palantir.com/docs/foundry/ontology-manager/overview/). - :raises ObjectTypeRidsNotFound: Some object types are configured for use by the Agent but could not be found. The object types either do not exist or the client token does not have access. Object types can be checked by listing available object types through the API, or searching in [Ontology Manager](https://palantir.com/docs/foundry/ontology-manager/overview/). - :raises OntologyEntitiesNotFound: Some ontology types are configured for use by the Agent but could not be found. The types either do not exist or the client token does not have access. Object types and their link types can be checked by listing available object/link types through the API, or searching in [Ontology Manager](https://palantir.com/docs/foundry/ontology-manager/overview/). - :raises SessionNotFound: The given Session could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/aipAgents/agents/{agentRid}/sessions", - query_params={ - "preview": preview, - }, - path_params={ - "agentRid": agent_rid, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=aip_agents_models.CreateSessionRequest( - agent_version=agent_version, - ), - response_type=aip_agents_models.Session, - request_timeout=request_timeout, - throwable_errors={ - "AgentNotFound": aip_agents_errors.AgentNotFound, - "AgentVersionNotFound": aip_agents_errors.AgentVersionNotFound, - "CreateSessionPermissionDenied": aip_agents_errors.CreateSessionPermissionDenied, - "FunctionLocatorNotFound": aip_agents_errors.FunctionLocatorNotFound, - "InvalidAgentVersion": aip_agents_errors.InvalidAgentVersion, - "NoPublishedAgentVersion": aip_agents_errors.NoPublishedAgentVersion, - "ObjectTypeIdsNotFound": aip_agents_errors.ObjectTypeIdsNotFound, - "ObjectTypeRidsNotFound": aip_agents_errors.ObjectTypeRidsNotFound, - "OntologyEntitiesNotFound": aip_agents_errors.OntologyEntitiesNotFound, - "SessionNotFound": aip_agents_errors.SessionNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def delete( - self, - agent_rid: aip_agents_models.AgentRid, - session_rid: aip_agents_models.SessionRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[None]: - """ - Delete a conversation session between the calling user and an Agent. - Once deleted, the session can no longer be accessed and will not appear in session lists. - - :param agent_rid: An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). - :type agent_rid: AgentRid - :param session_rid: The Resource Identifier (RID) of the conversation session. - :type session_rid: SessionRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[None] - - :raises AgentNotFound: The given Agent could not be found. - :raises DeleteSessionPermissionDenied: Could not delete the Session. - :raises SessionNotFound: The given Session could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="DELETE", - resource_path="/v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}", - query_params={ - "preview": preview, - }, - path_params={ - "agentRid": agent_rid, - "sessionRid": session_rid, - }, - header_params={}, - body=None, - response_type=None, - request_timeout=request_timeout, - throwable_errors={ - "AgentNotFound": aip_agents_errors.AgentNotFound, - "DeleteSessionPermissionDenied": aip_agents_errors.DeleteSessionPermissionDenied, - "SessionNotFound": aip_agents_errors.SessionNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - agent_rid: aip_agents_models.AgentRid, - session_rid: aip_agents_models.SessionRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[aip_agents_models.Session]: - """ - Get the details of a conversation session between the calling user and an Agent. - :param agent_rid: An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). - :type agent_rid: AgentRid - :param session_rid: The Resource Identifier (RID) of the conversation session. - :type session_rid: SessionRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[aip_agents_models.Session] - - :raises AgentNotFound: The given Agent could not be found. - :raises SessionNotFound: The given Session could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}", - query_params={ - "preview": preview, - }, - path_params={ - "agentRid": agent_rid, - "sessionRid": session_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=aip_agents_models.Session, - request_timeout=request_timeout, - throwable_errors={ - "AgentNotFound": aip_agents_errors.AgentNotFound, - "SessionNotFound": aip_agents_errors.SessionNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def list( - self, - agent_rid: aip_agents_models.AgentRid, - *, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.AsyncResourceIterator[aip_agents_models.Session]: - """ - List all conversation sessions between the calling user and an Agent that was created by this client. - This does not list sessions for the user created by other clients. - For example, any sessions created by the user in AIP Agent Studio will not be listed here. - Sessions are returned in order of most recently updated first. - - :param agent_rid: An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). - :type agent_rid: AgentRid - :param page_size: The page size to use for the endpoint. - :type page_size: Optional[PageSize] - :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. - :type page_token: Optional[PageToken] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.AsyncResourceIterator[aip_agents_models.Session] - - :raises AgentNotFound: The given Agent could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/aipAgents/agents/{agentRid}/sessions", - query_params={ - "pageSize": page_size, - "pageToken": page_token, - "preview": preview, - }, - path_params={ - "agentRid": agent_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=aip_agents_models.ListSessionsResponse, - request_timeout=request_timeout, - throwable_errors={ - "AgentNotFound": aip_agents_errors.AgentNotFound, - }, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def rag_context( - self, - agent_rid: aip_agents_models.AgentRid, - session_rid: aip_agents_models.SessionRid, - *, - parameter_inputs: typing.Dict[ - aip_agents_models.ParameterId, aip_agents_models.ParameterValue - ], - user_input: aip_agents_models.UserTextInput, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[aip_agents_models.AgentSessionRagContextResponse]: - """ - Retrieve relevant [context](https://palantir.com/docs/foundry/agent-studio/core-concepts/#retrieval-context) for a user message from the data sources configured for the session. - This allows clients to pre-retrieve context for a user message before sending it to the Agent with the `contextsOverride` option when continuing a session, to allow any pre-processing of the context before sending it to the Agent. - - :param agent_rid: An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). - :type agent_rid: AgentRid - :param session_rid: The Resource Identifier (RID) of the conversation session. - :type session_rid: SessionRid - :param parameter_inputs: Any values for [application variables](https://palantir.com/docs/foundry/agent-studio/application-state/) to use for the context retrieval. - :type parameter_inputs: Dict[ParameterId, ParameterValue] - :param user_input: The user message to retrieve relevant context for from the configured Agent data sources. - :type user_input: UserTextInput - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[aip_agents_models.AgentSessionRagContextResponse] - - :raises AgentNotFound: The given Agent could not be found. - :raises FunctionLocatorNotFound: The specified function locator is configured for use by the Agent but could not be found. The function type or version may not exist or the client token does not have access. - :raises GetRagContextForSessionPermissionDenied: Could not ragContext the Session. - :raises ObjectTypeIdsNotFound: Some object types are configured for use by the Agent but could not be found. The object types either do not exist or the client token does not have access. Object types can be checked by listing available object types through the API, or searching in [Ontology Manager](https://palantir.com/docs/foundry/ontology-manager/overview/). - :raises ObjectTypeRidsNotFound: Some object types are configured for use by the Agent but could not be found. The object types either do not exist or the client token does not have access. Object types can be checked by listing available object types through the API, or searching in [Ontology Manager](https://palantir.com/docs/foundry/ontology-manager/overview/). - :raises OntologyEntitiesNotFound: Some ontology types are configured for use by the Agent but could not be found. The types either do not exist or the client token does not have access. Object types and their link types can be checked by listing available object/link types through the API, or searching in [Ontology Manager](https://palantir.com/docs/foundry/ontology-manager/overview/). - :raises SessionNotFound: The given Session could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="PUT", - resource_path="/v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}/ragContext", - query_params={ - "preview": preview, - }, - path_params={ - "agentRid": agent_rid, - "sessionRid": session_rid, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=aip_agents_models.GetRagContextForSessionRequest( - user_input=user_input, - parameter_inputs=parameter_inputs, - ), - response_type=aip_agents_models.AgentSessionRagContextResponse, - request_timeout=request_timeout, - throwable_errors={ - "AgentNotFound": aip_agents_errors.AgentNotFound, - "FunctionLocatorNotFound": aip_agents_errors.FunctionLocatorNotFound, - "GetRagContextForSessionPermissionDenied": aip_agents_errors.GetRagContextForSessionPermissionDenied, - "ObjectTypeIdsNotFound": aip_agents_errors.ObjectTypeIdsNotFound, - "ObjectTypeRidsNotFound": aip_agents_errors.ObjectTypeRidsNotFound, - "OntologyEntitiesNotFound": aip_agents_errors.OntologyEntitiesNotFound, - "SessionNotFound": aip_agents_errors.SessionNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def streaming_continue( - self, - agent_rid: aip_agents_models.AgentRid, - session_rid: aip_agents_models.SessionRid, - *, - parameter_inputs: typing.Dict[ - aip_agents_models.ParameterId, aip_agents_models.ParameterValue - ], - user_input: aip_agents_models.UserTextInput, - contexts_override: typing.Optional[typing.List[aip_agents_models.InputContext]] = None, - message_id: typing.Optional[aip_agents_models.MessageId] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - session_trace_id: typing.Optional[aip_agents_models.SessionTraceId] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[bytes]: - """ - Continue a conversation session with an Agent, or add the first exchange to a session after creation. - Adds a new exchange to the session with the provided inputs, and generates a response from the Agent. - Returns a stream of the Agent response text (formatted using markdown) for clients to consume as the response is generated. - On completion of the streamed response, clients can load the full details of the exchange that was added to the session by reloading the session content. - Streamed exchanges also support cancellation; see `cancel` for details. - Concurrent requests to continue the same session are not supported. - Clients should wait to receive a response, or cancel the in-progress exchange, before sending the next message. - - :param agent_rid: An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). - :type agent_rid: AgentRid - :param session_rid: The Resource Identifier (RID) of the conversation session. - :type session_rid: SessionRid - :param parameter_inputs: Any supplied values for [application variables](https://palantir.com/docs/foundry/agent-studio/application-state/) to pass to the Agent for the exchange. - :type parameter_inputs: Dict[ParameterId, ParameterValue] - :param user_input: The user message for the Agent to respond to. - :type user_input: UserTextInput - :param contexts_override: If set, automatic [context](https://palantir.com/docs/foundry/agent-studio/retrieval-context/) retrieval is skipped and the list of specified context is provided to the Agent instead. If omitted, relevant context for the user message is automatically retrieved and included in the prompt, based on data sources configured on the Agent for the session. - :type contexts_override: Optional[List[InputContext]] - :param message_id: A client-generated Universally Unique Identifier (UUID) to identify the message, which the client can use to cancel the exchange before the streaming response is complete. - :type message_id: Optional[MessageId] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param session_trace_id: The unique identifier to use for this continue session trace. By generating and passing this ID to the `streamingContinue` endpoint, clients can use this trace ID to separately load details of the trace used to generate a result, while the result is in progress. If omitted, it will be generated automatically. Clients can check the generated ID by inspecting the `sessionTraceId` in the `SessionExchangeResult`, which can be loaded via the `getContent` endpoint. - :type session_trace_id: Optional[SessionTraceId] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[bytes] - - :raises AgentNotFound: The given Agent could not be found. - :raises FunctionLocatorNotFound: The specified function locator is configured for use by the Agent but could not be found. The function type or version may not exist or the client token does not have access. - :raises InvalidParameter: The provided application variable is not valid for the Agent for this session. Check the available application variables for the Agent under the `parameters` property, and version through the API with `getAgent`, or in AIP Agent Studio. The Agent version used for the session can be checked through the API with `getSession`. - :raises InvalidParameterType: The provided value does not match the expected type for the application variable configured on the Agent for this session. Check the available application variables for the Agent under the `parameters` property, and version through the API with `getAgent`, or in AIP Agent Studio. The Agent version used for the session can be checked through the API with `getSession`. - :raises ObjectTypeIdsNotFound: Some object types are configured for use by the Agent but could not be found. The object types either do not exist or the client token does not have access. Object types can be checked by listing available object types through the API, or searching in [Ontology Manager](https://palantir.com/docs/foundry/ontology-manager/overview/). - :raises ObjectTypeRidsNotFound: Some object types are configured for use by the Agent but could not be found. The object types either do not exist or the client token does not have access. Object types can be checked by listing available object types through the API, or searching in [Ontology Manager](https://palantir.com/docs/foundry/ontology-manager/overview/). - :raises OntologyEntitiesNotFound: Some ontology types are configured for use by the Agent but could not be found. The types either do not exist or the client token does not have access. Object types and their link types can be checked by listing available object/link types through the API, or searching in [Ontology Manager](https://palantir.com/docs/foundry/ontology-manager/overview/). - :raises SessionNotFound: The given Session could not be found. - :raises SessionTraceIdAlreadyExists: The provided trace ID already exists for the session and cannot be reused. - :raises StreamingContinueSessionPermissionDenied: Could not streamingContinue the Session. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}/streamingContinue", - query_params={ - "preview": preview, - }, - path_params={ - "agentRid": agent_rid, - "sessionRid": session_rid, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/octet-stream", - }, - body=aip_agents_models.StreamingContinueSessionRequest( - user_input=user_input, - parameter_inputs=parameter_inputs, - contexts_override=contexts_override, - message_id=message_id, - session_trace_id=session_trace_id, - ), - response_type=bytes, - request_timeout=request_timeout, - throwable_errors={ - "AgentNotFound": aip_agents_errors.AgentNotFound, - "FunctionLocatorNotFound": aip_agents_errors.FunctionLocatorNotFound, - "InvalidParameter": aip_agents_errors.InvalidParameter, - "InvalidParameterType": aip_agents_errors.InvalidParameterType, - "ObjectTypeIdsNotFound": aip_agents_errors.ObjectTypeIdsNotFound, - "ObjectTypeRidsNotFound": aip_agents_errors.ObjectTypeRidsNotFound, - "OntologyEntitiesNotFound": aip_agents_errors.OntologyEntitiesNotFound, - "SessionNotFound": aip_agents_errors.SessionNotFound, - "SessionTraceIdAlreadyExists": aip_agents_errors.SessionTraceIdAlreadyExists, - "StreamingContinueSessionPermissionDenied": aip_agents_errors.StreamingContinueSessionPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def update_title( - self, - agent_rid: aip_agents_models.AgentRid, - session_rid: aip_agents_models.SessionRid, - *, - title: str, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[None]: - """ - Update the title for a session. - Use this to set a custom title for a session to help identify it in the list of sessions with an Agent. - - :param agent_rid: An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). - :type agent_rid: AgentRid - :param session_rid: The Resource Identifier (RID) of the conversation session. - :type session_rid: SessionRid - :param title: The new title for the session. The maximum title length is 200 characters. Titles are truncated if they exceed this length. - :type title: str - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[None] - - :raises AgentNotFound: The given Agent could not be found. - :raises SessionNotFound: The given Session could not be found. - :raises UpdateSessionTitlePermissionDenied: Could not updateTitle the Session. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="PUT", - resource_path="/v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}/updateTitle", - query_params={ - "preview": preview, - }, - path_params={ - "agentRid": agent_rid, - "sessionRid": session_rid, - }, - header_params={ - "Content-Type": "application/json", - }, - body=aip_agents_models.UpdateSessionTitleRequest( - title=title, - ), - response_type=None, - request_timeout=request_timeout, - throwable_errors={ - "AgentNotFound": aip_agents_errors.AgentNotFound, - "SessionNotFound": aip_agents_errors.SessionNotFound, - "UpdateSessionTitlePermissionDenied": aip_agents_errors.UpdateSessionTitlePermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _AsyncSessionClientRaw: - def __init__(self, client: AsyncSessionClient) -> None: - def blocking_continue(_: aip_agents_models.SessionExchangeResult): ... - def cancel(_: aip_agents_models.CancelSessionResponse): ... - def create(_: aip_agents_models.Session): ... - def delete(_: None): ... - def get(_: aip_agents_models.Session): ... - def list(_: aip_agents_models.ListSessionsResponse): ... - def rag_context(_: aip_agents_models.AgentSessionRagContextResponse): ... - def streaming_continue(_: bytes): ... - def update_title(_: None): ... - - self.blocking_continue = core.async_with_raw_response( - blocking_continue, client.blocking_continue - ) - self.cancel = core.async_with_raw_response(cancel, client.cancel) - self.create = core.async_with_raw_response(create, client.create) - self.delete = core.async_with_raw_response(delete, client.delete) - self.get = core.async_with_raw_response(get, client.get) - self.list = core.async_with_raw_response(list, client.list) - self.rag_context = core.async_with_raw_response(rag_context, client.rag_context) - self.streaming_continue = core.async_with_raw_response( - streaming_continue, client.streaming_continue - ) - self.update_title = core.async_with_raw_response(update_title, client.update_title) - - -class _AsyncSessionClientStreaming: - def __init__(self, client: AsyncSessionClient) -> None: - def blocking_continue(_: aip_agents_models.SessionExchangeResult): ... - def cancel(_: aip_agents_models.CancelSessionResponse): ... - def create(_: aip_agents_models.Session): ... - def get(_: aip_agents_models.Session): ... - def list(_: aip_agents_models.ListSessionsResponse): ... - def rag_context(_: aip_agents_models.AgentSessionRagContextResponse): ... - def streaming_continue(_: bytes): ... - - self.blocking_continue = core.async_with_streaming_response( - blocking_continue, client.blocking_continue - ) - self.cancel = core.async_with_streaming_response(cancel, client.cancel) - self.create = core.async_with_streaming_response(create, client.create) - self.get = core.async_with_streaming_response(get, client.get) - self.list = core.async_with_streaming_response(list, client.list) - self.rag_context = core.async_with_streaming_response(rag_context, client.rag_context) - self.streaming_continue = core.async_with_streaming_response( - streaming_continue, client.streaming_continue - ) diff --git a/foundry_sdk/v2/aip_agents/session_trace.py b/foundry_sdk/v2/aip_agents/session_trace.py deleted file mode 100644 index 8072d5f89..000000000 --- a/foundry_sdk/v2/aip_agents/session_trace.py +++ /dev/null @@ -1,227 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing - -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v2.aip_agents import errors as aip_agents_errors -from foundry_sdk.v2.aip_agents import models as aip_agents_models -from foundry_sdk.v2.core import models as core_models - - -class SessionTraceClient: - """ - The API client for the SessionTrace Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _SessionTraceClientStreaming(self) - self.with_raw_response = _SessionTraceClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - agent_rid: aip_agents_models.AgentRid, - session_rid: aip_agents_models.SessionRid, - session_trace_id: aip_agents_models.SessionTraceId, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> aip_agents_models.SessionTrace: - """ - Get the trace of an Agent response. The trace lists the sequence of steps that an Agent took to arrive at - an answer. For example, a trace may include steps such as context retrieval and tool calls. Clients should - poll this endpoint to check the realtime progress of a response until the trace is completed. - - :param agent_rid: An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). - :type agent_rid: AgentRid - :param session_rid: The Resource Identifier (RID) of the conversation session. - :type session_rid: SessionRid - :param session_trace_id: The unique identifier for the trace. - :type session_trace_id: SessionTraceId - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: aip_agents_models.SessionTrace - - :raises AgentNotFound: The given Agent could not be found. - :raises SessionNotFound: The given Session could not be found. - :raises SessionTraceNotFound: The given SessionTrace could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}/sessionTraces/{sessionTraceId}", - query_params={ - "preview": preview, - }, - path_params={ - "agentRid": agent_rid, - "sessionRid": session_rid, - "sessionTraceId": session_trace_id, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=aip_agents_models.SessionTrace, - request_timeout=request_timeout, - throwable_errors={ - "AgentNotFound": aip_agents_errors.AgentNotFound, - "SessionNotFound": aip_agents_errors.SessionNotFound, - "SessionTraceNotFound": aip_agents_errors.SessionTraceNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _SessionTraceClientRaw: - def __init__(self, client: SessionTraceClient) -> None: - def get(_: aip_agents_models.SessionTrace): ... - - self.get = core.with_raw_response(get, client.get) - - -class _SessionTraceClientStreaming: - def __init__(self, client: SessionTraceClient) -> None: - def get(_: aip_agents_models.SessionTrace): ... - - self.get = core.with_streaming_response(get, client.get) - - -class AsyncSessionTraceClient: - """ - The API client for the SessionTrace Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AsyncSessionTraceClientStreaming(self) - self.with_raw_response = _AsyncSessionTraceClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - agent_rid: aip_agents_models.AgentRid, - session_rid: aip_agents_models.SessionRid, - session_trace_id: aip_agents_models.SessionTraceId, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[aip_agents_models.SessionTrace]: - """ - Get the trace of an Agent response. The trace lists the sequence of steps that an Agent took to arrive at - an answer. For example, a trace may include steps such as context retrieval and tool calls. Clients should - poll this endpoint to check the realtime progress of a response until the trace is completed. - - :param agent_rid: An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). - :type agent_rid: AgentRid - :param session_rid: The Resource Identifier (RID) of the conversation session. - :type session_rid: SessionRid - :param session_trace_id: The unique identifier for the trace. - :type session_trace_id: SessionTraceId - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[aip_agents_models.SessionTrace] - - :raises AgentNotFound: The given Agent could not be found. - :raises SessionNotFound: The given Session could not be found. - :raises SessionTraceNotFound: The given SessionTrace could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}/sessionTraces/{sessionTraceId}", - query_params={ - "preview": preview, - }, - path_params={ - "agentRid": agent_rid, - "sessionRid": session_rid, - "sessionTraceId": session_trace_id, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=aip_agents_models.SessionTrace, - request_timeout=request_timeout, - throwable_errors={ - "AgentNotFound": aip_agents_errors.AgentNotFound, - "SessionNotFound": aip_agents_errors.SessionNotFound, - "SessionTraceNotFound": aip_agents_errors.SessionTraceNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _AsyncSessionTraceClientRaw: - def __init__(self, client: AsyncSessionTraceClient) -> None: - def get(_: aip_agents_models.SessionTrace): ... - - self.get = core.async_with_raw_response(get, client.get) - - -class _AsyncSessionTraceClientStreaming: - def __init__(self, client: AsyncSessionTraceClient) -> None: - def get(_: aip_agents_models.SessionTrace): ... - - self.get = core.async_with_streaming_response(get, client.get) diff --git a/foundry_sdk/v2/audit/__init__.py b/foundry_sdk/v2/audit/__init__.py deleted file mode 100644 index 6fe00c3b3..000000000 --- a/foundry_sdk/v2/audit/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -from foundry_sdk.v2.audit._client import AsyncAuditClient -from foundry_sdk.v2.audit._client import AuditClient - -__all__ = [ - "AuditClient", - "AsyncAuditClient", -] diff --git a/foundry_sdk/v2/audit/_client.py b/foundry_sdk/v2/audit/_client.py deleted file mode 100644 index 793fd5604..000000000 --- a/foundry_sdk/v2/audit/_client.py +++ /dev/null @@ -1,69 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing -from functools import cached_property - -from foundry_sdk import _core as core - - -class AuditClient: - """ - The API client for the Audit Namespace. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - - @cached_property - def Organization(self): - from foundry_sdk.v2.audit.organization import OrganizationClient - - return OrganizationClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - -class AsyncAuditClient: - """ - The Async API client for the Audit Namespace. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - from foundry_sdk.v2.audit.organization import AsyncOrganizationClient - - self.Organization = AsyncOrganizationClient(auth=auth, hostname=hostname, config=config) diff --git a/foundry_sdk/v2/audit/errors.py b/foundry_sdk/v2/audit/errors.py deleted file mode 100644 index 4c95c3ce4..000000000 --- a/foundry_sdk/v2/audit/errors.py +++ /dev/null @@ -1,72 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing -from dataclasses import dataclass - -import typing_extensions - -from foundry_sdk import _errors as errors -from foundry_sdk.v2.audit import models as audit_models -from foundry_sdk.v2.core import models as core_models - - -class GetLogFileContentPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not content the LogFile.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - organizationRid: core_models.OrganizationRid - logFileId: audit_models.FileId - - -@dataclass -class GetLogFileContentPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["GetLogFileContentPermissionDenied"] - parameters: GetLogFileContentPermissionDeniedParameters - error_instance_id: str - - -class ListLogFilesPermissionDeniedParameters(typing_extensions.TypedDict): - """The provided token does not have permission to list audit log files.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class ListLogFilesPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["ListLogFilesPermissionDenied"] - parameters: ListLogFilesPermissionDeniedParameters - error_instance_id: str - - -class MissingStartDateParameters(typing_extensions.TypedDict): - """Start date is required to list audit log files.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class MissingStartDate(errors.BadRequestError): - name: typing.Literal["MissingStartDate"] - parameters: MissingStartDateParameters - error_instance_id: str - - -__all__ = [ - "GetLogFileContentPermissionDenied", - "ListLogFilesPermissionDenied", - "MissingStartDate", -] diff --git a/foundry_sdk/v2/audit/log_file.py b/foundry_sdk/v2/audit/log_file.py deleted file mode 100644 index ecbd137ba..000000000 --- a/foundry_sdk/v2/audit/log_file.py +++ /dev/null @@ -1,332 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing -from datetime import date - -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v2.audit import errors as audit_errors -from foundry_sdk.v2.audit import models as audit_models -from foundry_sdk.v2.core import models as core_models - - -class LogFileClient: - """ - The API client for the LogFile Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _LogFileClientStreaming(self) - self.with_raw_response = _LogFileClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def content( - self, - organization_rid: core_models.OrganizationRid, - log_file_id: audit_models.FileId, - *, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> bytes: - """ - - :param organization_rid: - :type organization_rid: OrganizationRid - :param log_file_id: - :type log_file_id: FileId - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: bytes - - :raises GetLogFileContentPermissionDenied: Could not content the LogFile. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/audit/organizations/{organizationRid}/logFiles/{logFileId}/content", - query_params={}, - path_params={ - "organizationRid": organization_rid, - "logFileId": log_file_id, - }, - header_params={ - "Accept": "application/octet-stream", - }, - body=None, - response_type=bytes, - request_timeout=request_timeout, - throwable_errors={ - "GetLogFileContentPermissionDenied": audit_errors.GetLogFileContentPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def list( - self, - organization_rid: core_models.OrganizationRid, - *, - end_date: typing.Optional[date] = None, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - start_date: typing.Optional[date] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.ResourceIterator[audit_models.LogFile]: - """ - Lists all LogFiles. - - This is a paged endpoint. Each page may be smaller or larger than the requested page size. However, it is guaranteed that if there are more results available, the `nextPageToken` field will be populated. To get the next page, make the same request again, but set the value of the `pageToken` query parameter to be value of the `nextPageToken` value of the previous response. If there is no `nextPageToken` field in the response, you are on the last page. - :param organization_rid: - :type organization_rid: OrganizationRid - :param end_date: List log files for audit events up until this date (inclusive). If absent, defaults to no end date. Use the returned `nextPageToken` to continually poll the `listLogFiles` endpoint to list the latest available logs. - :type end_date: Optional[date] - :param page_size: The page size to use for the endpoint. - :type page_size: Optional[PageSize] - :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. - :type page_token: Optional[PageToken] - :param start_date: List log files for audit events starting from this date. This parameter is required for the initial request (when `pageToken` is not provided). - :type start_date: Optional[date] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.ResourceIterator[audit_models.LogFile] - - :raises ListLogFilesPermissionDenied: The provided token does not have permission to list audit log files. - :raises MissingStartDate: Start date is required to list audit log files. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/audit/organizations/{organizationRid}/logFiles", - query_params={ - "endDate": end_date, - "pageSize": page_size, - "pageToken": page_token, - "startDate": start_date, - }, - path_params={ - "organizationRid": organization_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=audit_models.ListLogFilesResponse, - request_timeout=request_timeout, - throwable_errors={ - "ListLogFilesPermissionDenied": audit_errors.ListLogFilesPermissionDenied, - "MissingStartDate": audit_errors.MissingStartDate, - }, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - -class _LogFileClientRaw: - def __init__(self, client: LogFileClient) -> None: - def content(_: bytes): ... - def list(_: audit_models.ListLogFilesResponse): ... - - self.content = core.with_raw_response(content, client.content) - self.list = core.with_raw_response(list, client.list) - - -class _LogFileClientStreaming: - def __init__(self, client: LogFileClient) -> None: - def content(_: bytes): ... - def list(_: audit_models.ListLogFilesResponse): ... - - self.content = core.with_streaming_response(content, client.content) - self.list = core.with_streaming_response(list, client.list) - - -class AsyncLogFileClient: - """ - The API client for the LogFile Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AsyncLogFileClientStreaming(self) - self.with_raw_response = _AsyncLogFileClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def content( - self, - organization_rid: core_models.OrganizationRid, - log_file_id: audit_models.FileId, - *, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[bytes]: - """ - - :param organization_rid: - :type organization_rid: OrganizationRid - :param log_file_id: - :type log_file_id: FileId - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[bytes] - - :raises GetLogFileContentPermissionDenied: Could not content the LogFile. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/audit/organizations/{organizationRid}/logFiles/{logFileId}/content", - query_params={}, - path_params={ - "organizationRid": organization_rid, - "logFileId": log_file_id, - }, - header_params={ - "Accept": "application/octet-stream", - }, - body=None, - response_type=bytes, - request_timeout=request_timeout, - throwable_errors={ - "GetLogFileContentPermissionDenied": audit_errors.GetLogFileContentPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def list( - self, - organization_rid: core_models.OrganizationRid, - *, - end_date: typing.Optional[date] = None, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - start_date: typing.Optional[date] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.AsyncResourceIterator[audit_models.LogFile]: - """ - Lists all LogFiles. - - This is a paged endpoint. Each page may be smaller or larger than the requested page size. However, it is guaranteed that if there are more results available, the `nextPageToken` field will be populated. To get the next page, make the same request again, but set the value of the `pageToken` query parameter to be value of the `nextPageToken` value of the previous response. If there is no `nextPageToken` field in the response, you are on the last page. - :param organization_rid: - :type organization_rid: OrganizationRid - :param end_date: List log files for audit events up until this date (inclusive). If absent, defaults to no end date. Use the returned `nextPageToken` to continually poll the `listLogFiles` endpoint to list the latest available logs. - :type end_date: Optional[date] - :param page_size: The page size to use for the endpoint. - :type page_size: Optional[PageSize] - :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. - :type page_token: Optional[PageToken] - :param start_date: List log files for audit events starting from this date. This parameter is required for the initial request (when `pageToken` is not provided). - :type start_date: Optional[date] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.AsyncResourceIterator[audit_models.LogFile] - - :raises ListLogFilesPermissionDenied: The provided token does not have permission to list audit log files. - :raises MissingStartDate: Start date is required to list audit log files. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/audit/organizations/{organizationRid}/logFiles", - query_params={ - "endDate": end_date, - "pageSize": page_size, - "pageToken": page_token, - "startDate": start_date, - }, - path_params={ - "organizationRid": organization_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=audit_models.ListLogFilesResponse, - request_timeout=request_timeout, - throwable_errors={ - "ListLogFilesPermissionDenied": audit_errors.ListLogFilesPermissionDenied, - "MissingStartDate": audit_errors.MissingStartDate, - }, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - -class _AsyncLogFileClientRaw: - def __init__(self, client: AsyncLogFileClient) -> None: - def content(_: bytes): ... - def list(_: audit_models.ListLogFilesResponse): ... - - self.content = core.async_with_raw_response(content, client.content) - self.list = core.async_with_raw_response(list, client.list) - - -class _AsyncLogFileClientStreaming: - def __init__(self, client: AsyncLogFileClient) -> None: - def content(_: bytes): ... - def list(_: audit_models.ListLogFilesResponse): ... - - self.content = core.async_with_streaming_response(content, client.content) - self.list = core.async_with_streaming_response(list, client.list) diff --git a/foundry_sdk/v2/audit/models.py b/foundry_sdk/v2/audit/models.py deleted file mode 100644 index 2a84da4ce..000000000 --- a/foundry_sdk/v2/audit/models.py +++ /dev/null @@ -1,46 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -from __future__ import annotations - -import typing - -import pydantic - -from foundry_sdk import _core as core -from foundry_sdk.v2.core import models as core_models - -FileId = str -"""The ID of an audit log file""" - - -class ListLogFilesResponse(core.ModelBase): - """ListLogFilesResponse""" - - data: typing.List[LogFile] - next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] - - -class LogFile(core.ModelBase): - """LogFile""" - - id: FileId - - -__all__ = [ - "FileId", - "ListLogFilesResponse", - "LogFile", -] diff --git a/foundry_sdk/v2/audit/organization.py b/foundry_sdk/v2/audit/organization.py deleted file mode 100644 index 692be0989..000000000 --- a/foundry_sdk/v2/audit/organization.py +++ /dev/null @@ -1,111 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing -from functools import cached_property - -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors - - -class OrganizationClient: - """ - The API client for the Organization Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _OrganizationClientStreaming(self) - self.with_raw_response = _OrganizationClientRaw(self) - - @cached_property - def LogFile(self): - from foundry_sdk.v2.audit.log_file import LogFileClient - - return LogFileClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - -class _OrganizationClientRaw: - def __init__(self, client: OrganizationClient) -> None: - pass - - -class _OrganizationClientStreaming: - def __init__(self, client: OrganizationClient) -> None: - pass - - -class AsyncOrganizationClient: - """ - The API client for the Organization Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AsyncOrganizationClientStreaming(self) - self.with_raw_response = _AsyncOrganizationClientRaw(self) - - @cached_property - def LogFile(self): - from foundry_sdk.v2.audit.log_file import AsyncLogFileClient - - return AsyncLogFileClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - -class _AsyncOrganizationClientRaw: - def __init__(self, client: AsyncOrganizationClient) -> None: - pass - - -class _AsyncOrganizationClientStreaming: - def __init__(self, client: AsyncOrganizationClient) -> None: - pass diff --git a/foundry_sdk/v2/cli.py b/foundry_sdk/v2/cli.py deleted file mode 100644 index b9ddbc202..000000000 --- a/foundry_sdk/v2/cli.py +++ /dev/null @@ -1,11411 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -from __future__ import annotations - -import dataclasses -import io -import json -import os -import typing -from datetime import date as Date -from datetime import datetime - -import click - -from foundry_sdk import EnvironmentNotConfigured -from foundry_sdk import UserTokenAuth -from foundry_sdk.v2 import FoundryClient - - -@dataclasses.dataclass -class _Context: - obj: FoundryClient - - -def get_from_environ(key: str) -> str: - value = os.environ.get(key) - if value is None: - raise EnvironmentNotConfigured(f"Please set {key} using `export {key}=<{key}>`") - - return value - - -@click.group() # type: ignore -@click.pass_context # type: ignore -def cli(ctx: _Context): - """An experimental CLI for the Foundry API""" - ctx.obj = FoundryClient( - auth=UserTokenAuth(token=get_from_environ("FOUNDRY_TOKEN")), - hostname=get_from_environ("FOUNDRY_HOSTNAME"), - ) - - -@cli.group("admin") -def admin(): - pass - - -@admin.group("user") -def admin_user(): - pass - - -@admin_user.command("delete") -@click.argument("user_id", type=str, required=True) -@click.pass_obj -def admin_user_op_delete( - client: FoundryClient, - user_id: str, -): - """ - Delete the User with the specified id. - """ - result = client.admin.User.delete( - user_id=user_id, - ) - click.echo(repr(result)) - - -@admin_user.command("get") -@click.argument("user_id", type=str, required=True) -@click.option("--status", type=click.Choice(["ACTIVE", "DELETED"]), required=False, help="""""") -@click.pass_obj -def admin_user_op_get( - client: FoundryClient, - user_id: str, - status: typing.Optional[typing.Literal["ACTIVE", "DELETED"]], -): - """ - Get the User with the specified id. - """ - result = client.admin.User.get( - user_id=user_id, - status=status, - ) - click.echo(repr(result)) - - -@admin_user.command("get_batch") -@click.argument("body", type=str, required=True) -@click.pass_obj -def admin_user_op_get_batch( - client: FoundryClient, - body: str, -): - """ - Execute multiple get requests on User. - - The maximum batch size for this endpoint is 500. - """ - result = client.admin.User.get_batch( - body=json.loads(body), - ) - click.echo(repr(result)) - - -@admin_user.command("get_current") -@click.pass_obj -def admin_user_op_get_current( - client: FoundryClient, -): - """ """ - result = client.admin.User.get_current() - click.echo(repr(result)) - - -@admin_user.command("get_markings") -@click.argument("user_id", type=str, required=True) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def admin_user_op_get_markings( - client: FoundryClient, - user_id: str, - preview: typing.Optional[bool], -): - """ - Retrieve Markings that the user is currently a member of. - """ - result = client.admin.User.get_markings( - user_id=user_id, - preview=preview, - ) - click.echo(repr(result)) - - -@admin_user.command("list") -@click.option("--include", type=click.Choice(["ACTIVE", "DELETED"]), required=False, help="""""") -@click.option( - "--page_size", type=int, required=False, help="""The page size to use for the endpoint.""" -) -@click.option( - "--page_token", - type=str, - required=False, - help="""The page token indicates where to start paging. This should be omitted from the first page's request. -To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response -and use it to populate the `pageToken` field of the next request.""", -) -@click.pass_obj -def admin_user_op_list( - client: FoundryClient, - include: typing.Optional[typing.Literal["ACTIVE", "DELETED"]], - page_size: typing.Optional[int], - page_token: typing.Optional[str], -): - """ - Lists all Users. - - This is a paged endpoint. Each page may be smaller or larger than the requested page size. However, it is guaranteed that if there are more results available, the `nextPageToken` field will be populated. To get the next page, make the same request again, but set the value of the `pageToken` query parameter to be value of the `nextPageToken` value of the previous response. If there is no `nextPageToken` field in the response, you are on the last page. - """ - result = client.admin.User.list( - include=include, - page_size=page_size, - page_token=page_token, - ) - click.echo(repr(result)) - - -@admin_user.command("profile_picture") -@click.argument("user_id", type=str, required=True) -@click.pass_obj -def admin_user_op_profile_picture( - client: FoundryClient, - user_id: str, -): - """ """ - result = client.admin.User.profile_picture( - user_id=user_id, - ) - click.echo(repr(result)) - - -@admin_user.command("revoke_all_tokens") -@click.argument("user_id", type=str, required=True) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def admin_user_op_revoke_all_tokens( - client: FoundryClient, - user_id: str, - preview: typing.Optional[bool], -): - """ - Revoke all active authentication tokens for the user including active browser sessions and long-lived - development tokens. If the user has active sessions in a browser, this will force re-authentication. - - The caller must have permission to manage users for the target user's organization. - - """ - result = client.admin.User.revoke_all_tokens( - user_id=user_id, - preview=preview, - ) - click.echo(repr(result)) - - -@admin_user.command("search") -@click.option("--where", type=str, required=True, help="""""") -@click.option("--page_size", type=int, required=False, help="""""") -@click.option("--page_token", type=str, required=False, help="""""") -@click.pass_obj -def admin_user_op_search( - client: FoundryClient, - where: str, - page_size: typing.Optional[int], - page_token: typing.Optional[str], -): - """ - Perform a case-insensitive prefix search for users based on username, given name and family name. - - """ - result = client.admin.User.search( - where=json.loads(where), - page_size=page_size, - page_token=page_token, - ) - click.echo(repr(result)) - - -@admin_user.group("group_membership") -def admin_user_group_membership(): - pass - - -@admin_user_group_membership.command("list") -@click.argument("user_id", type=str, required=True) -@click.option( - "--page_size", type=int, required=False, help="""The page size to use for the endpoint.""" -) -@click.option( - "--page_token", - type=str, - required=False, - help="""The page token indicates where to start paging. This should be omitted from the first page's request. -To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response -and use it to populate the `pageToken` field of the next request.""", -) -@click.option( - "--transitive", - type=bool, - required=False, - help="""When true, includes the transitive memberships of the Groups the User is a member of. For example, say the -User is a member of Group A, and Group A is a member of Group B. If `transitive=false` only Group A will -be returned, but if `transitive=true` then Groups A and B will be returned. This -will recursively resolve Groups through all layers of nesting. - -Defaults to false. -""", -) -@click.pass_obj -def admin_user_group_membership_op_list( - client: FoundryClient, - user_id: str, - page_size: typing.Optional[int], - page_token: typing.Optional[str], - transitive: typing.Optional[bool], -): - """ - Lists all Groups a given User is a member of. - - This is a paged endpoint. Each page may be smaller or larger than the requested page size. However, - it is guaranteed that if there are more results available, the `nextPageToken` field will be populated. - To get the next page, make the same request again, but set the value of the `pageToken` query parameter - to be value of the `nextPageToken` value of the previous response. If there is no `nextPageToken` field - in the response, you are on the last page. - - """ - result = client.admin.User.GroupMembership.list( - user_id=user_id, - page_size=page_size, - page_token=page_token, - transitive=transitive, - ) - click.echo(repr(result)) - - -@admin_user.group("user_provider_info") -def admin_user_user_provider_info(): - pass - - -@admin_user_user_provider_info.command("get") -@click.argument("user_id", type=str, required=True) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def admin_user_user_provider_info_op_get( - client: FoundryClient, - user_id: str, - preview: typing.Optional[bool], -): - """ - Get the UserProviderInfo. - """ - result = client.admin.User.ProviderInfo.get( - user_id=user_id, - preview=preview, - ) - click.echo(repr(result)) - - -@admin_user_user_provider_info.command("replace") -@click.argument("user_id", type=str, required=True) -@click.option( - "--provider_id", - type=str, - required=True, - help="""The ID of the User in the external authentication provider. This value is determined by the authentication provider. -At most one User can have a given provider ID in a given Realm. -""", -) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def admin_user_user_provider_info_op_replace( - client: FoundryClient, - user_id: str, - provider_id: str, - preview: typing.Optional[bool], -): - """ - Replace the UserProviderInfo. - """ - result = client.admin.User.ProviderInfo.replace( - user_id=user_id, - provider_id=provider_id, - preview=preview, - ) - click.echo(repr(result)) - - -@admin.group("role") -def admin_role(): - pass - - -@admin_role.command("get") -@click.argument("role_id", type=str, required=True) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def admin_role_op_get( - client: FoundryClient, - role_id: str, - preview: typing.Optional[bool], -): - """ - Get the Role with the specified id. - """ - result = client.admin.Role.get( - role_id=role_id, - preview=preview, - ) - click.echo(repr(result)) - - -@admin_role.command("get_batch") -@click.argument("body", type=str, required=True) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def admin_role_op_get_batch( - client: FoundryClient, - body: str, - preview: typing.Optional[bool], -): - """ - Execute multiple get requests on Role. - - The maximum batch size for this endpoint is 500. - """ - result = client.admin.Role.get_batch( - body=json.loads(body), - preview=preview, - ) - click.echo(repr(result)) - - -@admin.group("organization") -def admin_organization(): - pass - - -@admin_organization.command("create") -@click.option( - "--administrators", - type=str, - required=True, - help="""The initial administrators of the Organization. At least one principal must be provided. -""", -) -@click.option( - "--enrollment_rid", - type=str, - required=True, - help="""The RID of the Enrollment that this Organization belongs to. This must be provided. -""", -) -@click.option("--name", type=str, required=True, help="""""") -@click.option("--description", type=str, required=False, help="""""") -@click.option( - "--host", - type=str, - required=False, - help="""The primary host name of the Organization. This should be used when constructing URLs for users of this -Organization. -""", -) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def admin_organization_op_create( - client: FoundryClient, - administrators: str, - enrollment_rid: str, - name: str, - description: typing.Optional[str], - host: typing.Optional[str], - preview: typing.Optional[bool], -): - """ - Creates a new Organization. - """ - result = client.admin.Organization.create( - administrators=json.loads(administrators), - enrollment_rid=enrollment_rid, - name=name, - description=description, - host=host, - preview=preview, - ) - click.echo(repr(result)) - - -@admin_organization.command("get") -@click.argument("organization_rid", type=str, required=True) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def admin_organization_op_get( - client: FoundryClient, - organization_rid: str, - preview: typing.Optional[bool], -): - """ - Get the Organization with the specified rid. - """ - result = client.admin.Organization.get( - organization_rid=organization_rid, - preview=preview, - ) - click.echo(repr(result)) - - -@admin_organization.command("list_available_roles") -@click.argument("organization_rid", type=str, required=True) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def admin_organization_op_list_available_roles( - client: FoundryClient, - organization_rid: str, - preview: typing.Optional[bool], -): - """ - List all roles that can be assigned to a principal for the given Organization. - - """ - result = client.admin.Organization.list_available_roles( - organization_rid=organization_rid, - preview=preview, - ) - click.echo(repr(result)) - - -@admin_organization.command("replace") -@click.argument("organization_rid", type=str, required=True) -@click.option("--name", type=str, required=True, help="""""") -@click.option("--description", type=str, required=False, help="""""") -@click.option( - "--host", - type=str, - required=False, - help="""The primary host name of the Organization. This should be used when constructing URLs for users of this -Organization. -""", -) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def admin_organization_op_replace( - client: FoundryClient, - organization_rid: str, - name: str, - description: typing.Optional[str], - host: typing.Optional[str], - preview: typing.Optional[bool], -): - """ - Replace the Organization with the specified rid. - """ - result = client.admin.Organization.replace( - organization_rid=organization_rid, - name=name, - description=description, - host=host, - preview=preview, - ) - click.echo(repr(result)) - - -@admin_organization.group("organization_role_assignment") -def admin_organization_organization_role_assignment(): - pass - - -@admin_organization_organization_role_assignment.command("add") -@click.argument("organization_rid", type=str, required=True) -@click.option("--role_assignments", type=str, required=True, help="""""") -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def admin_organization_organization_role_assignment_op_add( - client: FoundryClient, - organization_rid: str, - role_assignments: str, - preview: typing.Optional[bool], -): - """ - Assign roles to principals for the given Organization. At most 100 role assignments can be added in a single request. - - """ - result = client.admin.Organization.OrganizationRoleAssignment.add( - organization_rid=organization_rid, - role_assignments=json.loads(role_assignments), - preview=preview, - ) - click.echo(repr(result)) - - -@admin_organization_organization_role_assignment.command("list") -@click.argument("organization_rid", type=str, required=True) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def admin_organization_organization_role_assignment_op_list( - client: FoundryClient, - organization_rid: str, - preview: typing.Optional[bool], -): - """ - List all principals who are assigned a role for the given Organization. - - """ - result = client.admin.Organization.OrganizationRoleAssignment.list( - organization_rid=organization_rid, - preview=preview, - ) - click.echo(repr(result)) - - -@admin_organization_organization_role_assignment.command("remove") -@click.argument("organization_rid", type=str, required=True) -@click.option("--role_assignments", type=str, required=True, help="""""") -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def admin_organization_organization_role_assignment_op_remove( - client: FoundryClient, - organization_rid: str, - role_assignments: str, - preview: typing.Optional[bool], -): - """ - Remove roles from principals for the given Organization. At most 100 role assignments can be removed in a single request. - - """ - result = client.admin.Organization.OrganizationRoleAssignment.remove( - organization_rid=organization_rid, - role_assignments=json.loads(role_assignments), - preview=preview, - ) - click.echo(repr(result)) - - -@admin.group("marking_category") -def admin_marking_category(): - pass - - -@admin_marking_category.command("get") -@click.argument("marking_category_id", type=str, required=True) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def admin_marking_category_op_get( - client: FoundryClient, - marking_category_id: str, - preview: typing.Optional[bool], -): - """ - Get the MarkingCategory with the specified id. - """ - result = client.admin.MarkingCategory.get( - marking_category_id=marking_category_id, - preview=preview, - ) - click.echo(repr(result)) - - -@admin_marking_category.command("list") -@click.option( - "--page_size", type=int, required=False, help="""The page size to use for the endpoint.""" -) -@click.option( - "--page_token", - type=str, - required=False, - help="""The page token indicates where to start paging. This should be omitted from the first page's request. -To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response -and use it to populate the `pageToken` field of the next request.""", -) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def admin_marking_category_op_list( - client: FoundryClient, - page_size: typing.Optional[int], - page_token: typing.Optional[str], - preview: typing.Optional[bool], -): - """ - Maximum page size 100. - """ - result = client.admin.MarkingCategory.list( - page_size=page_size, - page_token=page_token, - preview=preview, - ) - click.echo(repr(result)) - - -@admin.group("marking") -def admin_marking(): - pass - - -@admin_marking.command("create") -@click.option("--category_id", type=str, required=True, help="""""") -@click.option( - "--initial_members", - type=str, - required=True, - help="""Users and Groups that will be able to view resources protected by this Marking. This can be changed later through the MarkingMember operations. -""", -) -@click.option( - "--initial_role_assignments", - type=str, - required=True, - help="""The initial roles that will be assigned when the Marking is created. At least one ADMIN role must be -provided. This can be changed later through the MarkingRoleAssignment operations. - -WARNING: If you do not include your own principal ID or the ID of a Group that you are a member of, -you will create a Marking that you cannot administer. -""", -) -@click.option("--name", type=str, required=True, help="""""") -@click.option("--description", type=str, required=False, help="""""") -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def admin_marking_op_create( - client: FoundryClient, - category_id: str, - initial_members: str, - initial_role_assignments: str, - name: str, - description: typing.Optional[str], - preview: typing.Optional[bool], -): - """ - Creates a new Marking. - """ - result = client.admin.Marking.create( - category_id=category_id, - initial_members=json.loads(initial_members), - initial_role_assignments=json.loads(initial_role_assignments), - name=name, - description=description, - preview=preview, - ) - click.echo(repr(result)) - - -@admin_marking.command("get") -@click.argument("marking_id", type=str, required=True) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def admin_marking_op_get( - client: FoundryClient, - marking_id: str, - preview: typing.Optional[bool], -): - """ - Get the Marking with the specified id. - """ - result = client.admin.Marking.get( - marking_id=marking_id, - preview=preview, - ) - click.echo(repr(result)) - - -@admin_marking.command("get_batch") -@click.argument("body", type=str, required=True) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def admin_marking_op_get_batch( - client: FoundryClient, - body: str, - preview: typing.Optional[bool], -): - """ - Execute multiple get requests on Marking. - - The maximum batch size for this endpoint is 500. - """ - result = client.admin.Marking.get_batch( - body=json.loads(body), - preview=preview, - ) - click.echo(repr(result)) - - -@admin_marking.command("list") -@click.option( - "--page_size", type=int, required=False, help="""The page size to use for the endpoint.""" -) -@click.option( - "--page_token", - type=str, - required=False, - help="""The page token indicates where to start paging. This should be omitted from the first page's request. -To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response -and use it to populate the `pageToken` field of the next request.""", -) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def admin_marking_op_list( - client: FoundryClient, - page_size: typing.Optional[int], - page_token: typing.Optional[str], - preview: typing.Optional[bool], -): - """ - Maximum page size 100. - """ - result = client.admin.Marking.list( - page_size=page_size, - page_token=page_token, - preview=preview, - ) - click.echo(repr(result)) - - -@admin_marking.command("replace") -@click.argument("marking_id", type=str, required=True) -@click.option("--name", type=str, required=True, help="""""") -@click.option("--description", type=str, required=False, help="""""") -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def admin_marking_op_replace( - client: FoundryClient, - marking_id: str, - name: str, - description: typing.Optional[str], - preview: typing.Optional[bool], -): - """ - Replace the Marking with the specified id. - """ - result = client.admin.Marking.replace( - marking_id=marking_id, - name=name, - description=description, - preview=preview, - ) - click.echo(repr(result)) - - -@admin_marking.group("marking_role_assignment") -def admin_marking_marking_role_assignment(): - pass - - -@admin_marking_marking_role_assignment.command("add") -@click.argument("marking_id", type=str, required=True) -@click.option("--role_assignments", type=str, required=True, help="""""") -@click.pass_obj -def admin_marking_marking_role_assignment_op_add( - client: FoundryClient, - marking_id: str, - role_assignments: str, -): - """ """ - result = client.admin.Marking.MarkingRoleAssignment.add( - marking_id=marking_id, - role_assignments=json.loads(role_assignments), - ) - click.echo(repr(result)) - - -@admin_marking_marking_role_assignment.command("list") -@click.argument("marking_id", type=str, required=True) -@click.option( - "--page_size", type=int, required=False, help="""The page size to use for the endpoint.""" -) -@click.option( - "--page_token", - type=str, - required=False, - help="""The page token indicates where to start paging. This should be omitted from the first page's request. -To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response -and use it to populate the `pageToken` field of the next request.""", -) -@click.pass_obj -def admin_marking_marking_role_assignment_op_list( - client: FoundryClient, - marking_id: str, - page_size: typing.Optional[int], - page_token: typing.Optional[str], -): - """ - List all principals who are assigned a role for the given Marking. Ignores the `pageSize` parameter. - - """ - result = client.admin.Marking.MarkingRoleAssignment.list( - marking_id=marking_id, - page_size=page_size, - page_token=page_token, - ) - click.echo(repr(result)) - - -@admin_marking_marking_role_assignment.command("remove") -@click.argument("marking_id", type=str, required=True) -@click.option("--role_assignments", type=str, required=True, help="""""") -@click.pass_obj -def admin_marking_marking_role_assignment_op_remove( - client: FoundryClient, - marking_id: str, - role_assignments: str, -): - """ """ - result = client.admin.Marking.MarkingRoleAssignment.remove( - marking_id=marking_id, - role_assignments=json.loads(role_assignments), - ) - click.echo(repr(result)) - - -@admin_marking.group("marking_member") -def admin_marking_marking_member(): - pass - - -@admin_marking_marking_member.command("add") -@click.argument("marking_id", type=str, required=True) -@click.option("--principal_ids", type=str, required=True, help="""""") -@click.pass_obj -def admin_marking_marking_member_op_add( - client: FoundryClient, - marking_id: str, - principal_ids: str, -): - """ """ - result = client.admin.Marking.MarkingMember.add( - marking_id=marking_id, - principal_ids=json.loads(principal_ids), - ) - click.echo(repr(result)) - - -@admin_marking_marking_member.command("list") -@click.argument("marking_id", type=str, required=True) -@click.option( - "--page_size", type=int, required=False, help="""The page size to use for the endpoint.""" -) -@click.option( - "--page_token", - type=str, - required=False, - help="""The page token indicates where to start paging. This should be omitted from the first page's request. -To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response -and use it to populate the `pageToken` field of the next request.""", -) -@click.option( - "--transitive", - type=bool, - required=False, - help="""When true, includes the transitive members of groups contained within groups that are members of this -Marking. For example, say the Marking has member Group A, and Group A has member User B. If -`transitive=false` only Group A will be returned, but if `transitive=true` then Group A and User B -will be returned. This will recursively resolve Groups through all layers of nesting. - -Defaults to false. -""", -) -@click.pass_obj -def admin_marking_marking_member_op_list( - client: FoundryClient, - marking_id: str, - page_size: typing.Optional[int], - page_token: typing.Optional[str], - transitive: typing.Optional[bool], -): - """ - Lists all principals who can view resources protected by the given Marking. Ignores the `pageSize` parameter. - Requires `api:admin-write` because only marking administrators can view marking members. - - """ - result = client.admin.Marking.MarkingMember.list( - marking_id=marking_id, - page_size=page_size, - page_token=page_token, - transitive=transitive, - ) - click.echo(repr(result)) - - -@admin_marking_marking_member.command("remove") -@click.argument("marking_id", type=str, required=True) -@click.option("--principal_ids", type=str, required=True, help="""""") -@click.pass_obj -def admin_marking_marking_member_op_remove( - client: FoundryClient, - marking_id: str, - principal_ids: str, -): - """ """ - result = client.admin.Marking.MarkingMember.remove( - marking_id=marking_id, - principal_ids=json.loads(principal_ids), - ) - click.echo(repr(result)) - - -@admin.group("group") -def admin_group(): - pass - - -@admin_group.command("create") -@click.option( - "--attributes", - type=str, - required=True, - help="""A map of the Group's attributes. Attributes prefixed with "multipass:" are reserved for internal use by Foundry and are subject to change.""", -) -@click.option("--name", type=str, required=True, help="""The name of the Group.""") -@click.option( - "--organizations", - type=str, - required=True, - help="""The RIDs of the Organizations whose members can see this group. At least one Organization RID must be listed. -""", -) -@click.option("--description", type=str, required=False, help="""A description of the Group.""") -@click.pass_obj -def admin_group_op_create( - client: FoundryClient, - attributes: str, - name: str, - organizations: str, - description: typing.Optional[str], -): - """ - Creates a new Group. - """ - result = client.admin.Group.create( - attributes=json.loads(attributes), - name=name, - organizations=json.loads(organizations), - description=description, - ) - click.echo(repr(result)) - - -@admin_group.command("delete") -@click.argument("group_id", type=str, required=True) -@click.pass_obj -def admin_group_op_delete( - client: FoundryClient, - group_id: str, -): - """ - Delete the Group with the specified id. - """ - result = client.admin.Group.delete( - group_id=group_id, - ) - click.echo(repr(result)) - - -@admin_group.command("get") -@click.argument("group_id", type=str, required=True) -@click.pass_obj -def admin_group_op_get( - client: FoundryClient, - group_id: str, -): - """ - Get the Group with the specified id. - """ - result = client.admin.Group.get( - group_id=group_id, - ) - click.echo(repr(result)) - - -@admin_group.command("get_batch") -@click.argument("body", type=str, required=True) -@click.pass_obj -def admin_group_op_get_batch( - client: FoundryClient, - body: str, -): - """ - Execute multiple get requests on Group. - - The maximum batch size for this endpoint is 500. - """ - result = client.admin.Group.get_batch( - body=json.loads(body), - ) - click.echo(repr(result)) - - -@admin_group.command("list") -@click.option( - "--page_size", type=int, required=False, help="""The page size to use for the endpoint.""" -) -@click.option( - "--page_token", - type=str, - required=False, - help="""The page token indicates where to start paging. This should be omitted from the first page's request. -To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response -and use it to populate the `pageToken` field of the next request.""", -) -@click.pass_obj -def admin_group_op_list( - client: FoundryClient, - page_size: typing.Optional[int], - page_token: typing.Optional[str], -): - """ - Lists all Groups. - - This is a paged endpoint. Each page may be smaller or larger than the requested page size. However, it is guaranteed that if there are more results available, the `nextPageToken` field will be populated. To get the next page, make the same request again, but set the value of the `pageToken` query parameter to be value of the `nextPageToken` value of the previous response. If there is no `nextPageToken` field in the response, you are on the last page. - """ - result = client.admin.Group.list( - page_size=page_size, - page_token=page_token, - ) - click.echo(repr(result)) - - -@admin_group.command("search") -@click.option("--where", type=str, required=True, help="""""") -@click.option("--page_size", type=int, required=False, help="""""") -@click.option("--page_token", type=str, required=False, help="""""") -@click.pass_obj -def admin_group_op_search( - client: FoundryClient, - where: str, - page_size: typing.Optional[int], - page_token: typing.Optional[str], -): - """ - Perform a case-insensitive prefix search for groups based on group name. - - """ - result = client.admin.Group.search( - where=json.loads(where), - page_size=page_size, - page_token=page_token, - ) - click.echo(repr(result)) - - -@admin_group.group("group_membership_expiration_policy") -def admin_group_group_membership_expiration_policy(): - pass - - -@admin_group_group_membership_expiration_policy.command("get") -@click.argument("group_id", type=str, required=True) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def admin_group_group_membership_expiration_policy_op_get( - client: FoundryClient, - group_id: str, - preview: typing.Optional[bool], -): - """ - Get the GroupMembershipExpirationPolicy. - """ - result = client.admin.Group.MembershipExpirationPolicy.get( - group_id=group_id, - preview=preview, - ) - click.echo(repr(result)) - - -@admin_group_group_membership_expiration_policy.command("replace") -@click.argument("group_id", type=str, required=True) -@click.option( - "--maximum_duration", - type=int, - required=False, - help="""Members in this group must be added with expirations that are less than this duration in seconds into the future from the time they are added. -""", -) -@click.option( - "--maximum_value", - type=click.DateTime(), - required=False, - help="""Members in this group must be added with expiration times that occur before this value.""", -) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def admin_group_group_membership_expiration_policy_op_replace( - client: FoundryClient, - group_id: str, - maximum_duration: typing.Optional[int], - maximum_value: typing.Optional[datetime], - preview: typing.Optional[bool], -): - """ - Replace the GroupMembershipExpirationPolicy. - """ - result = client.admin.Group.MembershipExpirationPolicy.replace( - group_id=group_id, - maximum_duration=maximum_duration, - maximum_value=maximum_value, - preview=preview, - ) - click.echo(repr(result)) - - -@admin_group.group("group_member") -def admin_group_group_member(): - pass - - -@admin_group_group_member.command("add") -@click.argument("group_id", type=str, required=True) -@click.option("--principal_ids", type=str, required=True, help="""""") -@click.option("--expiration", type=click.DateTime(), required=False, help="""""") -@click.pass_obj -def admin_group_group_member_op_add( - client: FoundryClient, - group_id: str, - principal_ids: str, - expiration: typing.Optional[datetime], -): - """ """ - result = client.admin.Group.GroupMember.add( - group_id=group_id, - principal_ids=json.loads(principal_ids), - expiration=expiration, - ) - click.echo(repr(result)) - - -@admin_group_group_member.command("list") -@click.argument("group_id", type=str, required=True) -@click.option( - "--page_size", type=int, required=False, help="""The page size to use for the endpoint.""" -) -@click.option( - "--page_token", - type=str, - required=False, - help="""The page token indicates where to start paging. This should be omitted from the first page's request. -To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response -and use it to populate the `pageToken` field of the next request.""", -) -@click.option( - "--transitive", - type=bool, - required=False, - help="""When true, includes the transitive members of groups contained within this group. For example, say the -Group has member Group A, and Group A has member User B. If `transitive=false` only Group A will -be returned, but if `transitive=true` then Group A and User B will be returned. This -will recursively resolve Groups through all layers of nesting. - -Defaults to false. -""", -) -@click.pass_obj -def admin_group_group_member_op_list( - client: FoundryClient, - group_id: str, - page_size: typing.Optional[int], - page_token: typing.Optional[str], - transitive: typing.Optional[bool], -): - """ - Lists all members (which can be a User or a Group) of a given Group. - - This is a paged endpoint. Each page may be smaller or larger than the requested page size. However, - it is guaranteed that if there are more results available, the `nextPageToken` field will be populated. - To get the next page, make the same request again, but set the value of the `pageToken` query parameter - to be value of the `nextPageToken` value of the previous response. If there is no `nextPageToken` field - in the response, you are on the last page. - - """ - result = client.admin.Group.GroupMember.list( - group_id=group_id, - page_size=page_size, - page_token=page_token, - transitive=transitive, - ) - click.echo(repr(result)) - - -@admin_group_group_member.command("remove") -@click.argument("group_id", type=str, required=True) -@click.option("--principal_ids", type=str, required=True, help="""""") -@click.pass_obj -def admin_group_group_member_op_remove( - client: FoundryClient, - group_id: str, - principal_ids: str, -): - """ """ - result = client.admin.Group.GroupMember.remove( - group_id=group_id, - principal_ids=json.loads(principal_ids), - ) - click.echo(repr(result)) - - -@admin_group.group("group_provider_info") -def admin_group_group_provider_info(): - pass - - -@admin_group_group_provider_info.command("get") -@click.argument("group_id", type=str, required=True) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def admin_group_group_provider_info_op_get( - client: FoundryClient, - group_id: str, - preview: typing.Optional[bool], -): - """ - Get the GroupProviderInfo. - """ - result = client.admin.Group.ProviderInfo.get( - group_id=group_id, - preview=preview, - ) - click.echo(repr(result)) - - -@admin_group_group_provider_info.command("replace") -@click.argument("group_id", type=str, required=True) -@click.option( - "--provider_id", - type=str, - required=True, - help="""The ID of the Group in the external authentication provider. This value is determined by the authentication provider. -At most one Group can have a given provider ID in a given Realm. -""", -) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def admin_group_group_provider_info_op_replace( - client: FoundryClient, - group_id: str, - provider_id: str, - preview: typing.Optional[bool], -): - """ - Replace the GroupProviderInfo. - """ - result = client.admin.Group.ProviderInfo.replace( - group_id=group_id, - provider_id=provider_id, - preview=preview, - ) - click.echo(repr(result)) - - -@admin.group("enrollment") -def admin_enrollment(): - pass - - -@admin_enrollment.command("get") -@click.argument("enrollment_rid", type=str, required=True) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def admin_enrollment_op_get( - client: FoundryClient, - enrollment_rid: str, - preview: typing.Optional[bool], -): - """ - Get the Enrollment with the specified rid. - """ - result = client.admin.Enrollment.get( - enrollment_rid=enrollment_rid, - preview=preview, - ) - click.echo(repr(result)) - - -@admin_enrollment.command("get_current") -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def admin_enrollment_op_get_current( - client: FoundryClient, - preview: typing.Optional[bool], -): - """ - Returns the Enrollment associated with the current User's primary organization. - - """ - result = client.admin.Enrollment.get_current( - preview=preview, - ) - click.echo(repr(result)) - - -@admin_enrollment.group("authentication_provider") -def admin_enrollment_authentication_provider(): - pass - - -@admin_enrollment_authentication_provider.command("get") -@click.argument("enrollment_rid", type=str, required=True) -@click.argument("authentication_provider_rid", type=str, required=True) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def admin_enrollment_authentication_provider_op_get( - client: FoundryClient, - enrollment_rid: str, - authentication_provider_rid: str, - preview: typing.Optional[bool], -): - """ - Get the AuthenticationProvider with the specified rid. - """ - result = client.admin.Enrollment.AuthenticationProvider.get( - enrollment_rid=enrollment_rid, - authentication_provider_rid=authentication_provider_rid, - preview=preview, - ) - click.echo(repr(result)) - - -@admin_enrollment_authentication_provider.command("list") -@click.argument("enrollment_rid", type=str, required=True) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def admin_enrollment_authentication_provider_op_list( - client: FoundryClient, - enrollment_rid: str, - preview: typing.Optional[bool], -): - """ - Lists all AuthenticationProviders. - - - """ - result = client.admin.Enrollment.AuthenticationProvider.list( - enrollment_rid=enrollment_rid, - preview=preview, - ) - click.echo(repr(result)) - - -@admin_enrollment_authentication_provider.command("preregister_group") -@click.argument("enrollment_rid", type=str, required=True) -@click.argument("authentication_provider_rid", type=str, required=True) -@click.option("--name", type=str, required=True, help="""""") -@click.option( - "--organizations", - type=str, - required=True, - help="""The RIDs of the Organizations that can view this group. -""", -) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def admin_enrollment_authentication_provider_op_preregister_group( - client: FoundryClient, - enrollment_rid: str, - authentication_provider_rid: str, - name: str, - organizations: str, - preview: typing.Optional[bool], -): - """ - Register a Group with a given name before any users with this group log in through this Authentication Provider. - Preregistered groups can be used anywhere other groups are used in the platform. - - """ - result = client.admin.Enrollment.AuthenticationProvider.preregister_group( - enrollment_rid=enrollment_rid, - authentication_provider_rid=authentication_provider_rid, - name=name, - organizations=json.loads(organizations), - preview=preview, - ) - click.echo(repr(result)) - - -@admin_enrollment_authentication_provider.command("preregister_user") -@click.argument("enrollment_rid", type=str, required=True) -@click.argument("authentication_provider_rid", type=str, required=True) -@click.option( - "--organization", - type=str, - required=True, - help="""The RID of the user's primary Organization. This may be changed when the user logs in for the first -time depending on any configured Organization assignment rules. -""", -) -@click.option( - "--username", - type=str, - required=True, - help="""The new user's username. This must match one of the provider's supported username patterns.""", -) -@click.option("--attributes", type=str, required=False, help="""""") -@click.option("--email", type=str, required=False, help="""""") -@click.option("--family_name", type=str, required=False, help="""""") -@click.option("--given_name", type=str, required=False, help="""""") -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def admin_enrollment_authentication_provider_op_preregister_user( - client: FoundryClient, - enrollment_rid: str, - authentication_provider_rid: str, - organization: str, - username: str, - attributes: typing.Optional[str], - email: typing.Optional[str], - family_name: typing.Optional[str], - given_name: typing.Optional[str], - preview: typing.Optional[bool], -): - """ - Register a User with a given username before they log in to the platform for the first time through this - Authentication Provider. Preregistered users can be assigned to groups and roles prior to first login. - - """ - result = client.admin.Enrollment.AuthenticationProvider.preregister_user( - enrollment_rid=enrollment_rid, - authentication_provider_rid=authentication_provider_rid, - organization=organization, - username=username, - attributes=None if attributes is None else json.loads(attributes), - email=email, - family_name=family_name, - given_name=given_name, - preview=preview, - ) - click.echo(repr(result)) - - -@admin_enrollment.group("host") -def admin_enrollment_host(): - pass - - -@admin_enrollment_host.command("list") -@click.argument("enrollment_rid", type=str, required=True) -@click.option( - "--page_size", type=int, required=False, help="""The page size to use for the endpoint.""" -) -@click.option( - "--page_token", - type=str, - required=False, - help="""The page token indicates where to start paging. This should be omitted from the first page's request. -To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response -and use it to populate the `pageToken` field of the next request.""", -) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def admin_enrollment_host_op_list( - client: FoundryClient, - enrollment_rid: str, - page_size: typing.Optional[int], - page_token: typing.Optional[str], - preview: typing.Optional[bool], -): - """ - Lists all Hosts. - - This is a paged endpoint. Each page may be smaller or larger than the requested page size. However, it is guaranteed that if there are more results available, the `nextPageToken` field will be populated. To get the next page, make the same request again, but set the value of the `pageToken` query parameter to be value of the `nextPageToken` value of the previous response. If there is no `nextPageToken` field in the response, you are on the last page. - """ - result = client.admin.Enrollment.Host.list( - enrollment_rid=enrollment_rid, - page_size=page_size, - page_token=page_token, - preview=preview, - ) - click.echo(repr(result)) - - -@admin_enrollment.group("enrollment_role_assignment") -def admin_enrollment_enrollment_role_assignment(): - pass - - -@admin_enrollment_enrollment_role_assignment.command("add") -@click.argument("enrollment_rid", type=str, required=True) -@click.option("--role_assignments", type=str, required=True, help="""""") -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def admin_enrollment_enrollment_role_assignment_op_add( - client: FoundryClient, - enrollment_rid: str, - role_assignments: str, - preview: typing.Optional[bool], -): - """ - Assign roles to principals for the given Enrollment. At most 100 role assignments can be added in a single request. - - """ - result = client.admin.Enrollment.EnrollmentRoleAssignment.add( - enrollment_rid=enrollment_rid, - role_assignments=json.loads(role_assignments), - preview=preview, - ) - click.echo(repr(result)) - - -@admin_enrollment_enrollment_role_assignment.command("list") -@click.argument("enrollment_rid", type=str, required=True) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def admin_enrollment_enrollment_role_assignment_op_list( - client: FoundryClient, - enrollment_rid: str, - preview: typing.Optional[bool], -): - """ - List all principals who are assigned a role for the given Enrollment. - - """ - result = client.admin.Enrollment.EnrollmentRoleAssignment.list( - enrollment_rid=enrollment_rid, - preview=preview, - ) - click.echo(repr(result)) - - -@admin_enrollment_enrollment_role_assignment.command("remove") -@click.argument("enrollment_rid", type=str, required=True) -@click.option("--role_assignments", type=str, required=True, help="""""") -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def admin_enrollment_enrollment_role_assignment_op_remove( - client: FoundryClient, - enrollment_rid: str, - role_assignments: str, - preview: typing.Optional[bool], -): - """ - Remove roles from principals for the given Enrollment. At most 100 role assignments can be removed in a single request. - - """ - result = client.admin.Enrollment.EnrollmentRoleAssignment.remove( - enrollment_rid=enrollment_rid, - role_assignments=json.loads(role_assignments), - preview=preview, - ) - click.echo(repr(result)) - - -@cli.group("aip_agents") -def aip_agents(): - pass - - -@aip_agents.group("agent") -def aip_agents_agent(): - pass - - -@aip_agents_agent.command("all_sessions") -@click.option( - "--page_size", - type=int, - required=False, - help="""The maximum number of sessions to return in a single page. The maximum allowed value is 100. -Defaults to 100 if not specified. -""", -) -@click.option("--page_token", type=str, required=False, help="""""") -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def aip_agents_agent_op_all_sessions( - client: FoundryClient, - page_size: typing.Optional[int], - page_token: typing.Optional[str], - preview: typing.Optional[bool], -): - """ - List all conversation sessions between the calling user and all accessible Agents that were created by this client. - Sessions are returned in order of most recently updated first. - - """ - result = client.aip_agents.Agent.all_sessions( - page_size=page_size, - page_token=page_token, - preview=preview, - ) - click.echo(repr(result)) - - -@aip_agents_agent.command("get") -@click.argument("agent_rid", type=str, required=True) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.option( - "--version", - type=str, - required=False, - help="""The version of the Agent to retrieve. If not specified, the latest published version will be returned. -""", -) -@click.pass_obj -def aip_agents_agent_op_get( - client: FoundryClient, - agent_rid: str, - preview: typing.Optional[bool], - version: typing.Optional[str], -): - """ - Get details for an AIP Agent. - """ - result = client.aip_agents.Agent.get( - agent_rid=agent_rid, - preview=preview, - version=version, - ) - click.echo(repr(result)) - - -@aip_agents_agent.group("session") -def aip_agents_agent_session(): - pass - - -@aip_agents_agent_session.command("blocking_continue") -@click.argument("agent_rid", type=str, required=True) -@click.argument("session_rid", type=str, required=True) -@click.option( - "--parameter_inputs", - type=str, - required=True, - help="""Any supplied values for [application variables](https://palantir.com/docs/foundry/agent-studio/application-state/) to pass to the Agent for the exchange. -""", -) -@click.option( - "--user_input", - type=str, - required=True, - help="""The user message for the Agent to respond to.""", -) -@click.option( - "--contexts_override", - type=str, - required=False, - help="""If set, automatic [context retrieval](https://palantir.com/docs/foundry/agent-studio/retrieval-context/) is skipped and the list of specified context is provided to the Agent instead. -If omitted, relevant context for the user message is automatically retrieved and included in the prompt, based on data sources configured on the Agent for the session. -""", -) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.option( - "--session_trace_id", - type=str, - required=False, - help="""The unique identifier to use for this continue session trace. By generating and passing this ID to the -`blockingContinue` endpoint, clients can use this trace ID to separately load details of the trace used -to generate a result, while the result is in progress. If omitted, it will be generated automatically. -Clients can check the generated ID by inspecting the `sessionTraceId` in the `SessionExchangeResult`. -""", -) -@click.pass_obj -def aip_agents_agent_session_op_blocking_continue( - client: FoundryClient, - agent_rid: str, - session_rid: str, - parameter_inputs: str, - user_input: str, - contexts_override: typing.Optional[str], - preview: typing.Optional[bool], - session_trace_id: typing.Optional[str], -): - """ - Continue a conversation session with an Agent, or add the first exchange to a session after creation. - Adds a new exchange to the session with the provided inputs, and generates a response from the Agent. - Blocks on returning the result of the added exchange until the response is fully generated. - Streamed responses are also supported; see `streamingContinue` for details. - Concurrent requests to continue the same session are not supported. - Clients should wait to receive a response before sending the next message. - - """ - result = client.aip_agents.Agent.Session.blocking_continue( - agent_rid=agent_rid, - session_rid=session_rid, - parameter_inputs=json.loads(parameter_inputs), - user_input=json.loads(user_input), - contexts_override=None if contexts_override is None else json.loads(contexts_override), - preview=preview, - session_trace_id=session_trace_id, - ) - click.echo(repr(result)) - - -@aip_agents_agent_session.command("cancel") -@click.argument("agent_rid", type=str, required=True) -@click.argument("session_rid", type=str, required=True) -@click.option( - "--message_id", - type=str, - required=True, - help="""The identifier for the in-progress exchange to cancel. -This should match the `messageId` which was provided when initiating the exchange with `streamingContinue`. -""", -) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.option( - "--response", - type=str, - required=False, - help="""When specified, the exchange is added to the session with the client-provided response as the result. -When omitted, the exchange is not added to the session. -""", -) -@click.pass_obj -def aip_agents_agent_session_op_cancel( - client: FoundryClient, - agent_rid: str, - session_rid: str, - message_id: str, - preview: typing.Optional[bool], - response: typing.Optional[str], -): - """ - Cancel an in-progress streamed exchange with an Agent which was initiated with `streamingContinue`. - Canceling an exchange allows clients to prevent the exchange from being added to the session, or to provide a response to replace the Agent-generated response. - Note that canceling an exchange does not terminate the stream returned by `streamingContinue`; clients should close the stream on triggering the cancellation request to stop reading from the stream. - - """ - result = client.aip_agents.Agent.Session.cancel( - agent_rid=agent_rid, - session_rid=session_rid, - message_id=message_id, - preview=preview, - response=response, - ) - click.echo(repr(result)) - - -@aip_agents_agent_session.command("create") -@click.argument("agent_rid", type=str, required=True) -@click.option( - "--agent_version", - type=str, - required=False, - help="""The version of the Agent associated with the session. -This can be set by clients on session creation. -If not specified, defaults to use the latest published version of the Agent at session creation time. -""", -) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def aip_agents_agent_session_op_create( - client: FoundryClient, - agent_rid: str, - agent_version: typing.Optional[str], - preview: typing.Optional[bool], -): - """ - Create a new conversation session between the calling user and an Agent. - Use `blockingContinue` or `streamingContinue` to start adding exchanges to the session. - - """ - result = client.aip_agents.Agent.Session.create( - agent_rid=agent_rid, - agent_version=agent_version, - preview=preview, - ) - click.echo(repr(result)) - - -@aip_agents_agent_session.command("delete") -@click.argument("agent_rid", type=str, required=True) -@click.argument("session_rid", type=str, required=True) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def aip_agents_agent_session_op_delete( - client: FoundryClient, - agent_rid: str, - session_rid: str, - preview: typing.Optional[bool], -): - """ - Delete a conversation session between the calling user and an Agent. - Once deleted, the session can no longer be accessed and will not appear in session lists. - - """ - result = client.aip_agents.Agent.Session.delete( - agent_rid=agent_rid, - session_rid=session_rid, - preview=preview, - ) - click.echo(repr(result)) - - -@aip_agents_agent_session.command("get") -@click.argument("agent_rid", type=str, required=True) -@click.argument("session_rid", type=str, required=True) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def aip_agents_agent_session_op_get( - client: FoundryClient, - agent_rid: str, - session_rid: str, - preview: typing.Optional[bool], -): - """ - Get the details of a conversation session between the calling user and an Agent. - """ - result = client.aip_agents.Agent.Session.get( - agent_rid=agent_rid, - session_rid=session_rid, - preview=preview, - ) - click.echo(repr(result)) - - -@aip_agents_agent_session.command("list") -@click.argument("agent_rid", type=str, required=True) -@click.option( - "--page_size", type=int, required=False, help="""The page size to use for the endpoint.""" -) -@click.option( - "--page_token", - type=str, - required=False, - help="""The page token indicates where to start paging. This should be omitted from the first page's request. -To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response -and use it to populate the `pageToken` field of the next request.""", -) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def aip_agents_agent_session_op_list( - client: FoundryClient, - agent_rid: str, - page_size: typing.Optional[int], - page_token: typing.Optional[str], - preview: typing.Optional[bool], -): - """ - List all conversation sessions between the calling user and an Agent that was created by this client. - This does not list sessions for the user created by other clients. - For example, any sessions created by the user in AIP Agent Studio will not be listed here. - Sessions are returned in order of most recently updated first. - - """ - result = client.aip_agents.Agent.Session.list( - agent_rid=agent_rid, - page_size=page_size, - page_token=page_token, - preview=preview, - ) - click.echo(repr(result)) - - -@aip_agents_agent_session.command("rag_context") -@click.argument("agent_rid", type=str, required=True) -@click.argument("session_rid", type=str, required=True) -@click.option( - "--parameter_inputs", - type=str, - required=True, - help="""Any values for [application variables](https://palantir.com/docs/foundry/agent-studio/application-state/) to use for the context retrieval. -""", -) -@click.option( - "--user_input", - type=str, - required=True, - help="""The user message to retrieve relevant context for from the configured Agent data sources.""", -) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def aip_agents_agent_session_op_rag_context( - client: FoundryClient, - agent_rid: str, - session_rid: str, - parameter_inputs: str, - user_input: str, - preview: typing.Optional[bool], -): - """ - Retrieve relevant [context](https://palantir.com/docs/foundry/agent-studio/core-concepts/#retrieval-context) for a user message from the data sources configured for the session. - This allows clients to pre-retrieve context for a user message before sending it to the Agent with the `contextsOverride` option when continuing a session, to allow any pre-processing of the context before sending it to the Agent. - - """ - result = client.aip_agents.Agent.Session.rag_context( - agent_rid=agent_rid, - session_rid=session_rid, - parameter_inputs=json.loads(parameter_inputs), - user_input=json.loads(user_input), - preview=preview, - ) - click.echo(repr(result)) - - -@aip_agents_agent_session.command("streaming_continue") -@click.argument("agent_rid", type=str, required=True) -@click.argument("session_rid", type=str, required=True) -@click.option( - "--parameter_inputs", - type=str, - required=True, - help="""Any supplied values for [application variables](https://palantir.com/docs/foundry/agent-studio/application-state/) to pass to the Agent for the exchange. -""", -) -@click.option( - "--user_input", - type=str, - required=True, - help="""The user message for the Agent to respond to.""", -) -@click.option( - "--contexts_override", - type=str, - required=False, - help="""If set, automatic [context](https://palantir.com/docs/foundry/agent-studio/retrieval-context/) retrieval is skipped and the list of specified context is provided to the Agent instead. -If omitted, relevant context for the user message is automatically retrieved and included in the prompt, based on data sources configured on the Agent for the session. -""", -) -@click.option( - "--message_id", - type=str, - required=False, - help="""A client-generated Universally Unique Identifier (UUID) to identify the message, which the client can use to cancel the exchange before the streaming response is complete. -""", -) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.option( - "--session_trace_id", - type=str, - required=False, - help="""The unique identifier to use for this continue session trace. By generating and passing this ID to the -`streamingContinue` endpoint, clients can use this trace ID to separately load details of the trace used -to generate a result, while the result is in progress. If omitted, it will be generated automatically. -Clients can check the generated ID by inspecting the `sessionTraceId` in the `SessionExchangeResult`, -which can be loaded via the `getContent` endpoint. -""", -) -@click.pass_obj -def aip_agents_agent_session_op_streaming_continue( - client: FoundryClient, - agent_rid: str, - session_rid: str, - parameter_inputs: str, - user_input: str, - contexts_override: typing.Optional[str], - message_id: typing.Optional[str], - preview: typing.Optional[bool], - session_trace_id: typing.Optional[str], -): - """ - Continue a conversation session with an Agent, or add the first exchange to a session after creation. - Adds a new exchange to the session with the provided inputs, and generates a response from the Agent. - Returns a stream of the Agent response text (formatted using markdown) for clients to consume as the response is generated. - On completion of the streamed response, clients can load the full details of the exchange that was added to the session by reloading the session content. - Streamed exchanges also support cancellation; see `cancel` for details. - Concurrent requests to continue the same session are not supported. - Clients should wait to receive a response, or cancel the in-progress exchange, before sending the next message. - - """ - result = client.aip_agents.Agent.Session.streaming_continue( - agent_rid=agent_rid, - session_rid=session_rid, - parameter_inputs=json.loads(parameter_inputs), - user_input=json.loads(user_input), - contexts_override=None if contexts_override is None else json.loads(contexts_override), - message_id=message_id, - preview=preview, - session_trace_id=session_trace_id, - ) - click.echo(result) - - -@aip_agents_agent_session.command("update_title") -@click.argument("agent_rid", type=str, required=True) -@click.argument("session_rid", type=str, required=True) -@click.option( - "--title", - type=str, - required=True, - help="""The new title for the session. -The maximum title length is 200 characters. Titles are truncated if they exceed this length. -""", -) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def aip_agents_agent_session_op_update_title( - client: FoundryClient, - agent_rid: str, - session_rid: str, - title: str, - preview: typing.Optional[bool], -): - """ - Update the title for a session. - Use this to set a custom title for a session to help identify it in the list of sessions with an Agent. - - """ - result = client.aip_agents.Agent.Session.update_title( - agent_rid=agent_rid, - session_rid=session_rid, - title=title, - preview=preview, - ) - click.echo(repr(result)) - - -@aip_agents_agent_session.group("session_trace") -def aip_agents_agent_session_session_trace(): - pass - - -@aip_agents_agent_session_session_trace.command("get") -@click.argument("agent_rid", type=str, required=True) -@click.argument("session_rid", type=str, required=True) -@click.argument("session_trace_id", type=str, required=True) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def aip_agents_agent_session_session_trace_op_get( - client: FoundryClient, - agent_rid: str, - session_rid: str, - session_trace_id: str, - preview: typing.Optional[bool], -): - """ - Get the trace of an Agent response. The trace lists the sequence of steps that an Agent took to arrive at - an answer. For example, a trace may include steps such as context retrieval and tool calls. Clients should - poll this endpoint to check the realtime progress of a response until the trace is completed. - - """ - result = client.aip_agents.Agent.Session.SessionTrace.get( - agent_rid=agent_rid, - session_rid=session_rid, - session_trace_id=session_trace_id, - preview=preview, - ) - click.echo(repr(result)) - - -@aip_agents_agent_session.group("content") -def aip_agents_agent_session_content(): - pass - - -@aip_agents_agent_session_content.command("get") -@click.argument("agent_rid", type=str, required=True) -@click.argument("session_rid", type=str, required=True) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def aip_agents_agent_session_content_op_get( - client: FoundryClient, - agent_rid: str, - session_rid: str, - preview: typing.Optional[bool], -): - """ - Get the conversation content for a session between the calling user and an Agent. - """ - result = client.aip_agents.Agent.Session.Content.get( - agent_rid=agent_rid, - session_rid=session_rid, - preview=preview, - ) - click.echo(repr(result)) - - -@aip_agents_agent.group("agent_version") -def aip_agents_agent_agent_version(): - pass - - -@aip_agents_agent_agent_version.command("get") -@click.argument("agent_rid", type=str, required=True) -@click.argument("agent_version_string", type=str, required=True) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def aip_agents_agent_agent_version_op_get( - client: FoundryClient, - agent_rid: str, - agent_version_string: str, - preview: typing.Optional[bool], -): - """ - Get version details for an AIP Agent. - """ - result = client.aip_agents.Agent.AgentVersion.get( - agent_rid=agent_rid, - agent_version_string=agent_version_string, - preview=preview, - ) - click.echo(repr(result)) - - -@aip_agents_agent_agent_version.command("list") -@click.argument("agent_rid", type=str, required=True) -@click.option( - "--page_size", type=int, required=False, help="""The page size to use for the endpoint.""" -) -@click.option( - "--page_token", - type=str, - required=False, - help="""The page token indicates where to start paging. This should be omitted from the first page's request. -To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response -and use it to populate the `pageToken` field of the next request.""", -) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def aip_agents_agent_agent_version_op_list( - client: FoundryClient, - agent_rid: str, - page_size: typing.Optional[int], - page_token: typing.Optional[str], - preview: typing.Optional[bool], -): - """ - List all versions for an AIP Agent. - Versions are returned in descending order, by most recent versions first. - - """ - result = client.aip_agents.Agent.AgentVersion.list( - agent_rid=agent_rid, - page_size=page_size, - page_token=page_token, - preview=preview, - ) - click.echo(repr(result)) - - -@cli.group("audit") -def audit(): - pass - - -@audit.group("organization") -def audit_organization(): - pass - - -@audit_organization.group("log_file") -def audit_organization_log_file(): - pass - - -@audit_organization_log_file.command("content") -@click.argument("organization_rid", type=str, required=True) -@click.argument("log_file_id", type=str, required=True) -@click.pass_obj -def audit_organization_log_file_op_content( - client: FoundryClient, - organization_rid: str, - log_file_id: str, -): - """ """ - result = client.audit.Organization.LogFile.content( - organization_rid=organization_rid, - log_file_id=log_file_id, - ) - click.echo(result) - - -@audit_organization_log_file.command("list") -@click.argument("organization_rid", type=str, required=True) -@click.option( - "--end_date", - type=str, - required=False, - help="""List log files for audit events up until this date (inclusive). If absent, defaults to no end date. Use the returned `nextPageToken` to continually poll the `listLogFiles` endpoint to list the latest available logs. -""", -) -@click.option( - "--page_size", type=int, required=False, help="""The page size to use for the endpoint.""" -) -@click.option( - "--page_token", - type=str, - required=False, - help="""The page token indicates where to start paging. This should be omitted from the first page's request. -To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response -and use it to populate the `pageToken` field of the next request.""", -) -@click.option( - "--start_date", - type=str, - required=False, - help="""List log files for audit events starting from this date. This parameter is required for the initial request (when `pageToken` is not provided). -""", -) -@click.pass_obj -def audit_organization_log_file_op_list( - client: FoundryClient, - organization_rid: str, - end_date: typing.Optional[str], - page_size: typing.Optional[int], - page_token: typing.Optional[str], - start_date: typing.Optional[str], -): - """ - Lists all LogFiles. - - This is a paged endpoint. Each page may be smaller or larger than the requested page size. However, it is guaranteed that if there are more results available, the `nextPageToken` field will be populated. To get the next page, make the same request again, but set the value of the `pageToken` query parameter to be value of the `nextPageToken` value of the previous response. If there is no `nextPageToken` field in the response, you are on the last page. - """ - result = client.audit.Organization.LogFile.list( - organization_rid=organization_rid, - end_date=None if end_date is None else Date.fromisoformat(end_date), - page_size=page_size, - page_token=page_token, - start_date=None if start_date is None else Date.fromisoformat(start_date), - ) - click.echo(repr(result)) - - -@cli.group("connectivity") -def connectivity(): - pass - - -@connectivity.group("connection") -def connectivity_connection(): - pass - - -@connectivity_connection.command("create") -@click.option("--configuration", type=str, required=True, help="""""") -@click.option( - "--display_name", - type=str, - required=True, - help="""The display name of the Connection. The display name must not be blank.""", -) -@click.option("--parent_folder_rid", type=str, required=True, help="""""") -@click.option("--worker", type=str, required=True, help="""""") -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def connectivity_connection_op_create( - client: FoundryClient, - configuration: str, - display_name: str, - parent_folder_rid: str, - worker: str, - preview: typing.Optional[bool], -): - """ - Creates a new Connection with a [direct connection](https://palantir.com/docs/foundry/data-connection/core-concepts/#direct-connection) runtime. - - Any secrets specified in the request body are transmitted over the network encrypted using TLS. Once the - secrets reach Foundry's servers, they will be temporarily decrypted and remain in plaintext in memory to - be processed as needed. They will stay in plaintext in memory until the garbage collection process cleans - up the memory. The secrets are always stored encrypted on our servers. - By using this endpoint, you acknowledge and accept any potential risks associated with the temporary - in-memory handling of secrets. If you do not want your secrets to be temporarily decrypted, you should - use the Foundry UI instead. - - """ - result = client.connectivity.Connection.create( - configuration=json.loads(configuration), - display_name=display_name, - parent_folder_rid=parent_folder_rid, - worker=json.loads(worker), - preview=preview, - ) - click.echo(repr(result)) - - -@connectivity_connection.command("get") -@click.argument("connection_rid", type=str, required=True) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def connectivity_connection_op_get( - client: FoundryClient, - connection_rid: str, - preview: typing.Optional[bool], -): - """ - Get the Connection with the specified rid. - """ - result = client.connectivity.Connection.get( - connection_rid=connection_rid, - preview=preview, - ) - click.echo(repr(result)) - - -@connectivity_connection.command("get_configuration") -@click.argument("connection_rid", type=str, required=True) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def connectivity_connection_op_get_configuration( - client: FoundryClient, - connection_rid: str, - preview: typing.Optional[bool], -): - """ - Retrieves the ConnectionConfiguration of the [Connection](https://palantir.com/docs/foundry/data-connection/set-up-source/) itself. - This operation is intended for use when other Connection data is not required, providing a lighter-weight alternative to `getConnection` operation. - - """ - result = client.connectivity.Connection.get_configuration( - connection_rid=connection_rid, - preview=preview, - ) - click.echo(repr(result)) - - -@connectivity_connection.command("get_configuration_batch") -@click.argument("body", type=str, required=True) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def connectivity_connection_op_get_configuration_batch( - client: FoundryClient, - body: str, - preview: typing.Optional[bool], -): - """ - Returns a map of Connection RIDs to their corresponding configurations. - Connections are filtered from the response if they don't exist or the requesting token lacks the required permissions. - - - The maximum batch size for this endpoint is 200. - """ - result = client.connectivity.Connection.get_configuration_batch( - body=json.loads(body), - preview=preview, - ) - click.echo(repr(result)) - - -@connectivity_connection.command("update_export_settings") -@click.argument("connection_rid", type=str, required=True) -@click.option("--export_settings", type=str, required=True, help="""""") -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def connectivity_connection_op_update_export_settings( - client: FoundryClient, - connection_rid: str, - export_settings: str, - preview: typing.Optional[bool], -): - """ - Updates the [export settings on the Connection.](https://palantir.com/docs/foundry/data-connection/export-overview/#enable-exports-for-source) - Only users with Information Security Officer role can modify the export settings. - - """ - result = client.connectivity.Connection.update_export_settings( - connection_rid=connection_rid, - export_settings=json.loads(export_settings), - preview=preview, - ) - click.echo(repr(result)) - - -@connectivity_connection.command("update_secrets") -@click.argument("connection_rid", type=str, required=True) -@click.option( - "--secrets", - type=str, - required=True, - help="""The secrets to be updated. The specified secret names must already be configured on the connection. -""", -) -@click.pass_obj -def connectivity_connection_op_update_secrets( - client: FoundryClient, - connection_rid: str, - secrets: str, -): - """ - Updates the secrets on the connection to the specified secret values. - Secrets that are currently configured on the connection but are omitted in the request will remain unchanged. - - Secrets are transmitted over the network encrypted using TLS. Once the secrets reach Foundry's servers, - they will be temporarily decrypted and remain in plaintext in memory to be processed as needed. - They will stay in plaintext in memory until the garbage collection process cleans up the memory. - The secrets are always stored encrypted on our servers. - - By using this endpoint, you acknowledge and accept any potential risks associated with the temporary - in-memory handling of secrets. If you do not want your secrets to be temporarily decrypted, you should - use the Foundry UI instead. - - """ - result = client.connectivity.Connection.update_secrets( - connection_rid=connection_rid, - secrets=json.loads(secrets), - ) - click.echo(repr(result)) - - -@connectivity_connection.command("upload_custom_jdbc_drivers") -@click.argument("connection_rid", type=str, required=True) -@click.argument("body", type=click.File("rb"), required=True) -@click.option( - "--file_name", - type=str, - required=True, - help="""The file name of the uploaded JDBC driver. Must end with .jar -""", -) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def connectivity_connection_op_upload_custom_jdbc_drivers( - client: FoundryClient, - connection_rid: str, - body: io.BufferedReader, - file_name: str, - preview: typing.Optional[bool], -): - """ - Upload custom jdbc drivers to an existing JDBC connection. - The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`. - - """ - result = client.connectivity.Connection.upload_custom_jdbc_drivers( - connection_rid=connection_rid, - body=body.read(), - file_name=file_name, - preview=preview, - ) - click.echo(repr(result)) - - -@connectivity_connection.group("virtual_table") -def connectivity_connection_virtual_table(): - pass - - -@connectivity_connection_virtual_table.command("create") -@click.argument("connection_rid", type=str, required=True) -@click.option("--config", type=str, required=True, help="""""") -@click.option("--name", type=str, required=True, help="""""") -@click.option("--parent_rid", type=str, required=True, help="""""") -@click.option("--markings", type=str, required=False, help="""""") -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def connectivity_connection_virtual_table_op_create( - client: FoundryClient, - connection_rid: str, - config: str, - name: str, - parent_rid: str, - markings: typing.Optional[str], - preview: typing.Optional[bool], -): - """ - Creates a new [Virtual Table](https://palantir.com/docs/foundry/data-integration/virtual-tables/) from an upstream table. The VirtualTable will be created - in the specified parent folder and can be queried through Foundry's data access APIs. - - """ - result = client.connectivity.Connection.VirtualTable.create( - connection_rid=connection_rid, - config=json.loads(config), - name=name, - parent_rid=parent_rid, - markings=None if markings is None else json.loads(markings), - preview=preview, - ) - click.echo(repr(result)) - - -@connectivity_connection.group("table_import") -def connectivity_connection_table_import(): - pass - - -@connectivity_connection_table_import.command("create") -@click.argument("connection_rid", type=str, required=True) -@click.option("--config", type=str, required=True, help="""""") -@click.option( - "--dataset_rid", - type=str, - required=True, - help="""The RID of the output dataset. Can not be modified after the table import is created.""", -) -@click.option("--display_name", type=str, required=True, help="""""") -@click.option( - "--import_mode", type=click.Choice(["SNAPSHOT", "APPEND"]), required=True, help="""""" -) -@click.option( - "--allow_schema_changes", - type=bool, - required=False, - help="""Allow the TableImport to succeed if the schema of imported rows does not match the existing dataset's schema. Defaults to false for new table imports.""", -) -@click.option( - "--branch_name", - type=str, - required=False, - help="""The branch name in the output dataset that will contain the imported data. Defaults to `master` for most enrollments. Can not be modified after the table import is created.""", -) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def connectivity_connection_table_import_op_create( - client: FoundryClient, - connection_rid: str, - config: str, - dataset_rid: str, - display_name: str, - import_mode: typing.Literal["SNAPSHOT", "APPEND"], - allow_schema_changes: typing.Optional[bool], - branch_name: typing.Optional[str], - preview: typing.Optional[bool], -): - """ - Creates a new TableImport. - """ - result = client.connectivity.Connection.TableImport.create( - connection_rid=connection_rid, - config=json.loads(config), - dataset_rid=dataset_rid, - display_name=display_name, - import_mode=import_mode, - allow_schema_changes=allow_schema_changes, - branch_name=branch_name, - preview=preview, - ) - click.echo(repr(result)) - - -@connectivity_connection_table_import.command("delete") -@click.argument("connection_rid", type=str, required=True) -@click.argument("table_import_rid", type=str, required=True) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def connectivity_connection_table_import_op_delete( - client: FoundryClient, - connection_rid: str, - table_import_rid: str, - preview: typing.Optional[bool], -): - """ - Delete the TableImport with the specified RID. - Deleting the table import does not delete the destination dataset but the dataset will no longer - be updated by this import. - - """ - result = client.connectivity.Connection.TableImport.delete( - connection_rid=connection_rid, - table_import_rid=table_import_rid, - preview=preview, - ) - click.echo(repr(result)) - - -@connectivity_connection_table_import.command("execute") -@click.argument("connection_rid", type=str, required=True) -@click.argument("table_import_rid", type=str, required=True) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def connectivity_connection_table_import_op_execute( - client: FoundryClient, - connection_rid: str, - table_import_rid: str, - preview: typing.Optional[bool], -): - """ - Executes the TableImport, which runs asynchronously as a [Foundry Build](https://palantir.com/docs/foundry/data-integration/builds/). - The returned BuildRid can be used to check the status via the Orchestration API. - - """ - result = client.connectivity.Connection.TableImport.execute( - connection_rid=connection_rid, - table_import_rid=table_import_rid, - preview=preview, - ) - click.echo(repr(result)) - - -@connectivity_connection_table_import.command("get") -@click.argument("connection_rid", type=str, required=True) -@click.argument("table_import_rid", type=str, required=True) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def connectivity_connection_table_import_op_get( - client: FoundryClient, - connection_rid: str, - table_import_rid: str, - preview: typing.Optional[bool], -): - """ - Get the TableImport with the specified rid. - """ - result = client.connectivity.Connection.TableImport.get( - connection_rid=connection_rid, - table_import_rid=table_import_rid, - preview=preview, - ) - click.echo(repr(result)) - - -@connectivity_connection_table_import.command("list") -@click.argument("connection_rid", type=str, required=True) -@click.option( - "--page_size", type=int, required=False, help="""The page size to use for the endpoint.""" -) -@click.option( - "--page_token", - type=str, - required=False, - help="""The page token indicates where to start paging. This should be omitted from the first page's request. -To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response -and use it to populate the `pageToken` field of the next request.""", -) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def connectivity_connection_table_import_op_list( - client: FoundryClient, - connection_rid: str, - page_size: typing.Optional[int], - page_token: typing.Optional[str], - preview: typing.Optional[bool], -): - """ - Lists all table imports defined for this connection. - Only table imports that the user has permissions to view will be returned. - - """ - result = client.connectivity.Connection.TableImport.list( - connection_rid=connection_rid, - page_size=page_size, - page_token=page_token, - preview=preview, - ) - click.echo(repr(result)) - - -@connectivity_connection_table_import.command("replace") -@click.argument("connection_rid", type=str, required=True) -@click.argument("table_import_rid", type=str, required=True) -@click.option("--config", type=str, required=True, help="""""") -@click.option("--display_name", type=str, required=True, help="""""") -@click.option( - "--import_mode", type=click.Choice(["SNAPSHOT", "APPEND"]), required=True, help="""""" -) -@click.option( - "--allow_schema_changes", - type=bool, - required=False, - help="""Allow the TableImport to succeed if the schema of imported rows does not match the existing dataset's schema. Defaults to false for new table imports.""", -) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def connectivity_connection_table_import_op_replace( - client: FoundryClient, - connection_rid: str, - table_import_rid: str, - config: str, - display_name: str, - import_mode: typing.Literal["SNAPSHOT", "APPEND"], - allow_schema_changes: typing.Optional[bool], - preview: typing.Optional[bool], -): - """ - Replace the TableImport with the specified rid. - """ - result = client.connectivity.Connection.TableImport.replace( - connection_rid=connection_rid, - table_import_rid=table_import_rid, - config=json.loads(config), - display_name=display_name, - import_mode=import_mode, - allow_schema_changes=allow_schema_changes, - preview=preview, - ) - click.echo(repr(result)) - - -@connectivity_connection.group("file_import") -def connectivity_connection_file_import(): - pass - - -@connectivity_connection_file_import.command("create") -@click.argument("connection_rid", type=str, required=True) -@click.option( - "--dataset_rid", - type=str, - required=True, - help="""The RID of the output dataset. Can not be modified after the file import is created.""", -) -@click.option("--display_name", type=str, required=True, help="""""") -@click.option( - "--file_import_filters", - type=str, - required=True, - help="""Use filters to limit which files should be imported. Filters are applied in the order they are defined. A different ordering of filters may lead to a more optimized import. [Learn more about optimizing file imports.](https://palantir.com/docs/foundry/data-connection/file-based-syncs/#optimize-file-based-syncs)""", -) -@click.option( - "--import_mode", type=click.Choice(["SNAPSHOT", "APPEND", "UPDATE"]), required=True, help="""""" -) -@click.option( - "--branch_name", - type=str, - required=False, - help="""The branch name in the output dataset that will contain the imported data. Defaults to `master` for most enrollments. Can not be modified after the file import is created.""", -) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.option( - "--subfolder", - type=str, - required=False, - help="""A subfolder in the external system that will be imported. If not specified, defaults to the root folder of the external system.""", -) -@click.pass_obj -def connectivity_connection_file_import_op_create( - client: FoundryClient, - connection_rid: str, - dataset_rid: str, - display_name: str, - file_import_filters: str, - import_mode: typing.Literal["SNAPSHOT", "APPEND", "UPDATE"], - branch_name: typing.Optional[str], - preview: typing.Optional[bool], - subfolder: typing.Optional[str], -): - """ - Creates a new FileImport. - """ - result = client.connectivity.Connection.FileImport.create( - connection_rid=connection_rid, - dataset_rid=dataset_rid, - display_name=display_name, - file_import_filters=json.loads(file_import_filters), - import_mode=import_mode, - branch_name=branch_name, - preview=preview, - subfolder=subfolder, - ) - click.echo(repr(result)) - - -@connectivity_connection_file_import.command("delete") -@click.argument("connection_rid", type=str, required=True) -@click.argument("file_import_rid", type=str, required=True) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def connectivity_connection_file_import_op_delete( - client: FoundryClient, - connection_rid: str, - file_import_rid: str, - preview: typing.Optional[bool], -): - """ - Delete the FileImport with the specified RID. - Deleting the file import does not delete the destination dataset but the dataset will no longer - be updated by this import. - - """ - result = client.connectivity.Connection.FileImport.delete( - connection_rid=connection_rid, - file_import_rid=file_import_rid, - preview=preview, - ) - click.echo(repr(result)) - - -@connectivity_connection_file_import.command("execute") -@click.argument("connection_rid", type=str, required=True) -@click.argument("file_import_rid", type=str, required=True) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def connectivity_connection_file_import_op_execute( - client: FoundryClient, - connection_rid: str, - file_import_rid: str, - preview: typing.Optional[bool], -): - """ - Executes the FileImport, which runs asynchronously as a [Foundry Build](https://palantir.com/docs/foundry/data-integration/builds/). - The returned BuildRid can be used to check the status via the Orchestration API. - - """ - result = client.connectivity.Connection.FileImport.execute( - connection_rid=connection_rid, - file_import_rid=file_import_rid, - preview=preview, - ) - click.echo(repr(result)) - - -@connectivity_connection_file_import.command("get") -@click.argument("connection_rid", type=str, required=True) -@click.argument("file_import_rid", type=str, required=True) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def connectivity_connection_file_import_op_get( - client: FoundryClient, - connection_rid: str, - file_import_rid: str, - preview: typing.Optional[bool], -): - """ - Get the FileImport with the specified rid. - """ - result = client.connectivity.Connection.FileImport.get( - connection_rid=connection_rid, - file_import_rid=file_import_rid, - preview=preview, - ) - click.echo(repr(result)) - - -@connectivity_connection_file_import.command("list") -@click.argument("connection_rid", type=str, required=True) -@click.option( - "--page_size", type=int, required=False, help="""The page size to use for the endpoint.""" -) -@click.option( - "--page_token", - type=str, - required=False, - help="""The page token indicates where to start paging. This should be omitted from the first page's request. -To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response -and use it to populate the `pageToken` field of the next request.""", -) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def connectivity_connection_file_import_op_list( - client: FoundryClient, - connection_rid: str, - page_size: typing.Optional[int], - page_token: typing.Optional[str], - preview: typing.Optional[bool], -): - """ - Lists all file imports defined for this connection. - Only file imports that the user has permissions to view will be returned. - - """ - result = client.connectivity.Connection.FileImport.list( - connection_rid=connection_rid, - page_size=page_size, - page_token=page_token, - preview=preview, - ) - click.echo(repr(result)) - - -@connectivity_connection_file_import.command("replace") -@click.argument("connection_rid", type=str, required=True) -@click.argument("file_import_rid", type=str, required=True) -@click.option("--display_name", type=str, required=True, help="""""") -@click.option( - "--file_import_filters", - type=str, - required=True, - help="""Use filters to limit which files should be imported. Filters are applied in the order they are defined. A different ordering of filters may lead to a more optimized import. [Learn more about optimizing file imports.](https://palantir.com/docs/foundry/data-connection/file-based-syncs/#optimize-file-based-syncs)""", -) -@click.option( - "--import_mode", type=click.Choice(["SNAPSHOT", "APPEND", "UPDATE"]), required=True, help="""""" -) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.option( - "--subfolder", - type=str, - required=False, - help="""A subfolder in the external system that will be imported. If not specified, defaults to the root folder of the external system.""", -) -@click.pass_obj -def connectivity_connection_file_import_op_replace( - client: FoundryClient, - connection_rid: str, - file_import_rid: str, - display_name: str, - file_import_filters: str, - import_mode: typing.Literal["SNAPSHOT", "APPEND", "UPDATE"], - preview: typing.Optional[bool], - subfolder: typing.Optional[str], -): - """ - Replace the FileImport with the specified rid. - """ - result = client.connectivity.Connection.FileImport.replace( - connection_rid=connection_rid, - file_import_rid=file_import_rid, - display_name=display_name, - file_import_filters=json.loads(file_import_filters), - import_mode=import_mode, - preview=preview, - subfolder=subfolder, - ) - click.echo(repr(result)) - - -@cli.group("core") -def core(): - pass - - -@cli.group("data_health") -def data_health(): - pass - - -@data_health.group("check_report") -def data_health_check_report(): - pass - - -@data_health_check_report.command("get") -@click.argument("check_report_rid", type=str, required=True) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def data_health_check_report_op_get( - client: FoundryClient, - check_report_rid: str, - preview: typing.Optional[bool], -): - """ - Get the CheckReport with the specified rid. - """ - result = client.data_health.CheckReport.get( - check_report_rid=check_report_rid, - preview=preview, - ) - click.echo(repr(result)) - - -@data_health.group("check") -def data_health_check(): - pass - - -@data_health_check.command("create") -@click.option("--config", type=str, required=True, help="""""") -@click.option("--intent", type=str, required=False, help="""""") -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def data_health_check_op_create( - client: FoundryClient, - config: str, - intent: typing.Optional[str], - preview: typing.Optional[bool], -): - """ - Creates a new Check. - """ - result = client.data_health.Check.create( - config=json.loads(config), - intent=intent, - preview=preview, - ) - click.echo(repr(result)) - - -@data_health_check.command("delete") -@click.argument("check_rid", type=str, required=True) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def data_health_check_op_delete( - client: FoundryClient, - check_rid: str, - preview: typing.Optional[bool], -): - """ - Delete the Check with the specified rid. - """ - result = client.data_health.Check.delete( - check_rid=check_rid, - preview=preview, - ) - click.echo(repr(result)) - - -@data_health_check.command("get") -@click.argument("check_rid", type=str, required=True) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def data_health_check_op_get( - client: FoundryClient, - check_rid: str, - preview: typing.Optional[bool], -): - """ - Get the Check with the specified rid. - """ - result = client.data_health.Check.get( - check_rid=check_rid, - preview=preview, - ) - click.echo(repr(result)) - - -@data_health_check.command("replace") -@click.argument("check_rid", type=str, required=True) -@click.option("--config", type=str, required=True, help="""""") -@click.option("--intent", type=str, required=False, help="""""") -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def data_health_check_op_replace( - client: FoundryClient, - check_rid: str, - config: str, - intent: typing.Optional[str], - preview: typing.Optional[bool], -): - """ - Replace the Check with the specified rid. Changing the type of a check after it has been created is not supported. - """ - result = client.data_health.Check.replace( - check_rid=check_rid, - config=json.loads(config), - intent=intent, - preview=preview, - ) - click.echo(repr(result)) - - -@cli.group("datasets") -def datasets(): - pass - - -@datasets.group("view") -def datasets_view(): - pass - - -@datasets_view.command("add_backing_datasets") -@click.argument("view_dataset_rid", type=str, required=True) -@click.option("--backing_datasets", type=str, required=True, help="""""") -@click.option("--branch", type=str, required=False, help="""""") -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def datasets_view_op_add_backing_datasets( - client: FoundryClient, - view_dataset_rid: str, - backing_datasets: str, - branch: typing.Optional[str], - preview: typing.Optional[bool], -): - """ - Adds one or more backing datasets to a View. Any duplicates with the same dataset RID and branch name are - ignored. - - """ - result = client.datasets.View.add_backing_datasets( - view_dataset_rid=view_dataset_rid, - backing_datasets=json.loads(backing_datasets), - branch=branch, - preview=preview, - ) - click.echo(repr(result)) - - -@datasets_view.command("add_primary_key") -@click.argument("view_dataset_rid", type=str, required=True) -@click.option("--primary_key", type=str, required=True, help="""""") -@click.option("--branch", type=str, required=False, help="""""") -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def datasets_view_op_add_primary_key( - client: FoundryClient, - view_dataset_rid: str, - primary_key: str, - branch: typing.Optional[str], - preview: typing.Optional[bool], -): - """ - Adds a primary key to a View that does not already have one. Primary keys are treated as - guarantees provided by the creator of the dataset. - - """ - result = client.datasets.View.add_primary_key( - view_dataset_rid=view_dataset_rid, - primary_key=json.loads(primary_key), - branch=branch, - preview=preview, - ) - click.echo(repr(result)) - - -@datasets_view.command("create") -@click.option("--backing_datasets", type=str, required=True, help="""""") -@click.option("--parent_folder_rid", type=str, required=True, help="""""") -@click.option("--view_name", type=str, required=True, help="""""") -@click.option( - "--branch", - type=str, - required=False, - help="""The branch name of the View. If not specified, defaults to `master` for most enrollments.""", -) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.option("--primary_key", type=str, required=False, help="""""") -@click.pass_obj -def datasets_view_op_create( - client: FoundryClient, - backing_datasets: str, - parent_folder_rid: str, - view_name: str, - branch: typing.Optional[str], - preview: typing.Optional[bool], - primary_key: typing.Optional[str], -): - """ - Create a new View. - """ - result = client.datasets.View.create( - backing_datasets=json.loads(backing_datasets), - parent_folder_rid=parent_folder_rid, - view_name=view_name, - branch=branch, - preview=preview, - primary_key=None if primary_key is None else json.loads(primary_key), - ) - click.echo(repr(result)) - - -@datasets_view.command("get") -@click.argument("view_dataset_rid", type=str, required=True) -@click.option("--branch", type=str, required=False, help="""""") -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def datasets_view_op_get( - client: FoundryClient, - view_dataset_rid: str, - branch: typing.Optional[str], - preview: typing.Optional[bool], -): - """ - Get metadata for a View. - """ - result = client.datasets.View.get( - view_dataset_rid=view_dataset_rid, - branch=branch, - preview=preview, - ) - click.echo(repr(result)) - - -@datasets_view.command("remove_backing_datasets") -@click.argument("view_dataset_rid", type=str, required=True) -@click.option("--backing_datasets", type=str, required=True, help="""""") -@click.option("--branch", type=str, required=False, help="""""") -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def datasets_view_op_remove_backing_datasets( - client: FoundryClient, - view_dataset_rid: str, - backing_datasets: str, - branch: typing.Optional[str], - preview: typing.Optional[bool], -): - """ - Removes specified backing datasets from a View. Removing a dataset triggers a - [SNAPSHOT](https://palantir.com/docs/foundry/data-integration/datasets#snapshot) transaction on the next update. If a - specified dataset does not exist, no error is thrown. - - """ - result = client.datasets.View.remove_backing_datasets( - view_dataset_rid=view_dataset_rid, - backing_datasets=json.loads(backing_datasets), - branch=branch, - preview=preview, - ) - click.echo(repr(result)) - - -@datasets_view.command("replace_backing_datasets") -@click.argument("view_dataset_rid", type=str, required=True) -@click.option("--backing_datasets", type=str, required=True, help="""""") -@click.option("--branch", type=str, required=False, help="""""") -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def datasets_view_op_replace_backing_datasets( - client: FoundryClient, - view_dataset_rid: str, - backing_datasets: str, - branch: typing.Optional[str], - preview: typing.Optional[bool], -): - """ - Replaces the backing datasets for a View. Removing any backing dataset triggers a - [SNAPSHOT](https://palantir.com/docs/foundry/data-integration/datasets#snapshot) transaction the next time the View is updated. - - """ - result = client.datasets.View.replace_backing_datasets( - view_dataset_rid=view_dataset_rid, - backing_datasets=json.loads(backing_datasets), - branch=branch, - preview=preview, - ) - click.echo(repr(result)) - - -@datasets.group("dataset") -def datasets_dataset(): - pass - - -@datasets_dataset.command("create") -@click.option("--name", type=str, required=True, help="""""") -@click.option("--parent_folder_rid", type=str, required=True, help="""""") -@click.pass_obj -def datasets_dataset_op_create( - client: FoundryClient, - name: str, - parent_folder_rid: str, -): - """ - Creates a new Dataset. A default branch - `master` for most enrollments - will be created on the Dataset. - - """ - result = client.datasets.Dataset.create( - name=name, - parent_folder_rid=parent_folder_rid, - ) - click.echo(repr(result)) - - -@datasets_dataset.command("get") -@click.argument("dataset_rid", type=str, required=True) -@click.pass_obj -def datasets_dataset_op_get( - client: FoundryClient, - dataset_rid: str, -): - """ - Get the Dataset with the specified rid. - """ - result = client.datasets.Dataset.get( - dataset_rid=dataset_rid, - ) - click.echo(repr(result)) - - -@datasets_dataset.command("get_health_checks") -@click.argument("dataset_rid", type=str, required=True) -@click.option( - "--branch_name", - type=str, - required=False, - help="""The name of the Branch. If none is provided, the default Branch name - `master` for most enrollments - will be used. -""", -) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def datasets_dataset_op_get_health_checks( - client: FoundryClient, - dataset_rid: str, - branch_name: typing.Optional[str], - preview: typing.Optional[bool], -): - """ - Get the RIDs of the Data Health Checks that are configured for the given Dataset. - - """ - result = client.datasets.Dataset.get_health_checks( - dataset_rid=dataset_rid, - branch_name=branch_name, - preview=preview, - ) - click.echo(repr(result)) - - -@datasets_dataset.command("get_schedules") -@click.argument("dataset_rid", type=str, required=True) -@click.option( - "--branch_name", - type=str, - required=False, - help="""The name of the Branch. If none is provided, the default Branch name - `master` for most enrollments - will be used. -""", -) -@click.option("--page_size", type=int, required=False, help="""""") -@click.option("--page_token", type=str, required=False, help="""""") -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def datasets_dataset_op_get_schedules( - client: FoundryClient, - dataset_rid: str, - branch_name: typing.Optional[str], - page_size: typing.Optional[int], - page_token: typing.Optional[str], - preview: typing.Optional[bool], -): - """ - Get the RIDs of the Schedules that target the given Dataset - - """ - result = client.datasets.Dataset.get_schedules( - dataset_rid=dataset_rid, - branch_name=branch_name, - page_size=page_size, - page_token=page_token, - preview=preview, - ) - click.echo(repr(result)) - - -@datasets_dataset.command("get_schema") -@click.argument("dataset_rid", type=str, required=True) -@click.option("--branch_name", type=str, required=False, help="""""") -@click.option( - "--end_transaction_rid", - type=str, - required=False, - help="""The Resource Identifier (RID) of the end Transaction. If a user does not provide a value, the RID of the latest committed transaction will be used. -""", -) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.option( - "--version_id", - type=str, - required=False, - help="""The schema version that should be used. If none is provided, the latest version will be used. -""", -) -@click.pass_obj -def datasets_dataset_op_get_schema( - client: FoundryClient, - dataset_rid: str, - branch_name: typing.Optional[str], - end_transaction_rid: typing.Optional[str], - preview: typing.Optional[bool], - version_id: typing.Optional[str], -): - """ - Gets a dataset's schema. If no `endTransactionRid` is provided, the latest committed version will be used. - - """ - result = client.datasets.Dataset.get_schema( - dataset_rid=dataset_rid, - branch_name=branch_name, - end_transaction_rid=end_transaction_rid, - preview=preview, - version_id=version_id, - ) - click.echo(repr(result)) - - -@datasets_dataset.command("get_schema_batch") -@click.argument("body", type=str, required=True) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def datasets_dataset_op_get_schema_batch( - client: FoundryClient, - body: str, - preview: typing.Optional[bool], -): - """ - Fetch schemas for multiple datasets in a single request. Datasets not found - or inaccessible to the user will be omitted from the response. - - - The maximum batch size for this endpoint is 1000. - """ - result = client.datasets.Dataset.get_schema_batch( - body=json.loads(body), - preview=preview, - ) - click.echo(repr(result)) - - -@datasets_dataset.command("jobs") -@click.argument("dataset_rid", type=str, required=True) -@click.option("--order_by", type=str, required=True, help="""""") -@click.option( - "--branch_name", - type=str, - required=False, - help="""The name of the Branch. If none is provided, the default Branch name - `master` for most enrollments - will be used. -""", -) -@click.option( - "--page_size", - type=int, - required=False, - help="""Max number of results to return. A limit of 1000 on if no limit is supplied in the search request -""", -) -@click.option("--page_token", type=str, required=False, help="""""") -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.option("--where", type=str, required=False, help="""""") -@click.pass_obj -def datasets_dataset_op_jobs( - client: FoundryClient, - dataset_rid: str, - order_by: str, - branch_name: typing.Optional[str], - page_size: typing.Optional[int], - page_token: typing.Optional[str], - preview: typing.Optional[bool], - where: typing.Optional[str], -): - """ - Get the RIDs of the Jobs for the given dataset. By default, returned Jobs are sorted in descending order by the Job start time. - - """ - result = client.datasets.Dataset.jobs( - dataset_rid=dataset_rid, - order_by=json.loads(order_by), - branch_name=branch_name, - page_size=page_size, - page_token=page_token, - preview=preview, - where=None if where is None else json.loads(where), - ) - click.echo(repr(result)) - - -@datasets_dataset.command("put_schema") -@click.argument("dataset_rid", type=str, required=True) -@click.option( - "--schema", - type=str, - required=True, - help="""The schema that will be added. -""", -) -@click.option("--branch_name", type=str, required=False, help="""""") -@click.option( - "--dataframe_reader", - type=click.Choice(["AVRO", "CSV", "PARQUET", "DATASOURCE"]), - required=False, - help="""The dataframe reader used for reading the dataset schema. Defaults to PARQUET.""", -) -@click.option( - "--end_transaction_rid", - type=str, - required=False, - help="""The Resource Identifier (RID) of the end Transaction. -""", -) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def datasets_dataset_op_put_schema( - client: FoundryClient, - dataset_rid: str, - schema: str, - branch_name: typing.Optional[str], - dataframe_reader: typing.Optional[typing.Literal["AVRO", "CSV", "PARQUET", "DATASOURCE"]], - end_transaction_rid: typing.Optional[str], - preview: typing.Optional[bool], -): - """ - Adds a schema on an existing dataset using a PUT request. - - """ - result = client.datasets.Dataset.put_schema( - dataset_rid=dataset_rid, - schema=json.loads(schema), - branch_name=branch_name, - dataframe_reader=dataframe_reader, - end_transaction_rid=end_transaction_rid, - preview=preview, - ) - click.echo(repr(result)) - - -@datasets_dataset.command("read_table") -@click.argument("dataset_rid", type=str, required=True) -@click.option( - "--format", - type=click.Choice(["ARROW", "CSV"]), - required=True, - help="""The export format. Must be `ARROW` or `CSV`. -""", -) -@click.option( - "--branch_name", - type=str, - required=False, - help="""The name of the Branch. -""", -) -@click.option( - "--columns", - type=str, - required=False, - help="""A subset of the dataset columns to include in the result. Defaults to all columns. -""", -) -@click.option( - "--end_transaction_rid", - type=str, - required=False, - help="""The Resource Identifier (RID) of the end Transaction. -""", -) -@click.option( - "--row_limit", - type=int, - required=False, - help="""A limit on the number of rows to return. Note that row ordering is non-deterministic. -""", -) -@click.option( - "--start_transaction_rid", - type=str, - required=False, - help="""The Resource Identifier (RID) of the start Transaction. -""", -) -@click.pass_obj -def datasets_dataset_op_read_table( - client: FoundryClient, - dataset_rid: str, - format: typing.Literal["ARROW", "CSV"], - branch_name: typing.Optional[str], - columns: typing.Optional[str], - end_transaction_rid: typing.Optional[str], - row_limit: typing.Optional[int], - start_transaction_rid: typing.Optional[str], -): - """ - Gets the content of a dataset as a table in the specified format. - - This endpoint currently does not support views (virtual datasets composed of other datasets). - - """ - result = client.datasets.Dataset.read_table( - dataset_rid=dataset_rid, - format=format, - branch_name=branch_name, - columns=None if columns is None else json.loads(columns), - end_transaction_rid=end_transaction_rid, - row_limit=row_limit, - start_transaction_rid=start_transaction_rid, - ) - click.echo(result) - - -@datasets_dataset.command("transactions") -@click.argument("dataset_rid", type=str, required=True) -@click.option( - "--page_size", type=int, required=False, help="""The page size to use for the endpoint.""" -) -@click.option( - "--page_token", - type=str, - required=False, - help="""The page token indicates where to start paging. This should be omitted from the first page's request. -To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response -and use it to populate the `pageToken` field of the next request.""", -) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def datasets_dataset_op_transactions( - client: FoundryClient, - dataset_rid: str, - page_size: typing.Optional[int], - page_token: typing.Optional[str], - preview: typing.Optional[bool], -): - """ - Get the Transaction history for the given Dataset. When requesting all transactions, the endpoint returns them in reverse chronological order. - - """ - result = client.datasets.Dataset.transactions( - dataset_rid=dataset_rid, - page_size=page_size, - page_token=page_token, - preview=preview, - ) - click.echo(repr(result)) - - -@datasets_dataset.group("file") -def datasets_dataset_file(): - pass - - -@datasets_dataset_file.command("content") -@click.argument("dataset_rid", type=str, required=True) -@click.argument("file_path", type=str, required=True) -@click.option( - "--branch_name", - type=str, - required=False, - help="""The name of the Branch that contains the File. Defaults to `master` for most enrollments. -""", -) -@click.option( - "--end_transaction_rid", - type=str, - required=False, - help="""The Resource Identifier (RID) of the end Transaction. -""", -) -@click.option( - "--start_transaction_rid", - type=str, - required=False, - help="""The Resource Identifier (RID) of the start Transaction. -""", -) -@click.pass_obj -def datasets_dataset_file_op_content( - client: FoundryClient, - dataset_rid: str, - file_path: str, - branch_name: typing.Optional[str], - end_transaction_rid: typing.Optional[str], - start_transaction_rid: typing.Optional[str], -): - """ - Gets the content of a File contained in a Dataset. By default this retrieves the file's content from the latest - view of the default branch - `master` for most enrollments. - #### Advanced Usage - See [Datasets Core Concepts](https://palantir.com/docs/foundry/data-integration/datasets/) for details on using branches and transactions. - To **get a file's content from a specific Branch** specify the Branch's name as `branchName`. This will - retrieve the content for the most recent version of the file since the latest snapshot transaction, or the - earliest ancestor transaction of the branch if there are no snapshot transactions. - To **get a file's content from the resolved view of a transaction** specify the Transaction's resource identifier - as `endTransactionRid`. This will retrieve the content for the most recent version of the file since the latest - snapshot transaction, or the earliest ancestor transaction if there are no snapshot transactions. - To **get a file's content from the resolved view of a range of transactions** specify the the start transaction's - resource identifier as `startTransactionRid` and the end transaction's resource identifier as `endTransactionRid`. - This will retrieve the content for the most recent version of the file since the `startTransactionRid` up to the - `endTransactionRid`. Note that an intermediate snapshot transaction will remove all files from the view. Behavior - is undefined when the start and end transactions do not belong to the same root-to-leaf path. - To **get a file's content from a specific transaction** specify the Transaction's resource identifier as both the - `startTransactionRid` and `endTransactionRid`. - - """ - result = client.datasets.Dataset.File.content( - dataset_rid=dataset_rid, - file_path=file_path, - branch_name=branch_name, - end_transaction_rid=end_transaction_rid, - start_transaction_rid=start_transaction_rid, - ) - click.echo(result) - - -@datasets_dataset_file.command("delete") -@click.argument("dataset_rid", type=str, required=True) -@click.argument("file_path", type=str, required=True) -@click.option( - "--branch_name", - type=str, - required=False, - help="""The name of the Branch on which to delete the File. Defaults to `master` for most enrollments. -""", -) -@click.option( - "--transaction_rid", - type=str, - required=False, - help="""The Resource Identifier (RID) of the open delete Transaction on which to delete the File. -""", -) -@click.pass_obj -def datasets_dataset_file_op_delete( - client: FoundryClient, - dataset_rid: str, - file_path: str, - branch_name: typing.Optional[str], - transaction_rid: typing.Optional[str], -): - """ - Deletes a File from a Dataset. By default the file is deleted in a new transaction on the default - branch - `master` for most enrollments. The file will still be visible on historical views. - #### Advanced Usage - See [Datasets Core Concepts](https://palantir.com/docs/foundry/data-integration/datasets/) for details on using branches and transactions. - To **delete a File from a specific Branch** specify the Branch's name as `branchName`. A new delete Transaction - will be created and committed on this branch. - To **delete a File using a manually opened Transaction**, specify the Transaction's resource identifier - as `transactionRid`. The transaction must be of type `DELETE`. This is useful for deleting multiple files in a - single transaction. See [createTransaction](https://palantir.com/docs/foundry/api/datasets-resources/transactions/create-transaction/) to - open a transaction. - - """ - result = client.datasets.Dataset.File.delete( - dataset_rid=dataset_rid, - file_path=file_path, - branch_name=branch_name, - transaction_rid=transaction_rid, - ) - click.echo(repr(result)) - - -@datasets_dataset_file.command("get") -@click.argument("dataset_rid", type=str, required=True) -@click.argument("file_path", type=str, required=True) -@click.option( - "--branch_name", - type=str, - required=False, - help="""The name of the Branch that contains the File. Defaults to `master` for most enrollments. -""", -) -@click.option( - "--end_transaction_rid", - type=str, - required=False, - help="""The Resource Identifier (RID) of the end Transaction. -""", -) -@click.option( - "--start_transaction_rid", - type=str, - required=False, - help="""The Resource Identifier (RID) of the start Transaction. -""", -) -@click.pass_obj -def datasets_dataset_file_op_get( - client: FoundryClient, - dataset_rid: str, - file_path: str, - branch_name: typing.Optional[str], - end_transaction_rid: typing.Optional[str], - start_transaction_rid: typing.Optional[str], -): - """ - Gets metadata about a File contained in a Dataset. By default this retrieves the file's metadata from the latest - view of the default branch - `master` for most enrollments. - #### Advanced Usage - See [Datasets Core Concepts](https://palantir.com/docs/foundry/data-integration/datasets/) for details on using branches and transactions. - To **get a file's metadata from a specific Branch** specify the Branch's name as `branchName`. This will - retrieve metadata for the most recent version of the file since the latest snapshot transaction, or the earliest - ancestor transaction of the branch if there are no snapshot transactions. - To **get a file's metadata from the resolved view of a transaction** specify the Transaction's resource identifier - as `endTransactionRid`. This will retrieve metadata for the most recent version of the file since the latest snapshot - transaction, or the earliest ancestor transaction if there are no snapshot transactions. - To **get a file's metadata from the resolved view of a range of transactions** specify the the start transaction's - resource identifier as `startTransactionRid` and the end transaction's resource identifier as `endTransactionRid`. - This will retrieve metadata for the most recent version of the file since the `startTransactionRid` up to the - `endTransactionRid`. Behavior is undefined when the start and end transactions do not belong to the same root-to-leaf path. - To **get a file's metadata from a specific transaction** specify the Transaction's resource identifier as both the - `startTransactionRid` and `endTransactionRid`. - - """ - result = client.datasets.Dataset.File.get( - dataset_rid=dataset_rid, - file_path=file_path, - branch_name=branch_name, - end_transaction_rid=end_transaction_rid, - start_transaction_rid=start_transaction_rid, - ) - click.echo(repr(result)) - - -@datasets_dataset_file.command("list") -@click.argument("dataset_rid", type=str, required=True) -@click.option( - "--branch_name", - type=str, - required=False, - help="""The name of the Branch on which to list Files. Defaults to `master` for most enrollments. -""", -) -@click.option( - "--end_transaction_rid", - type=str, - required=False, - help="""The Resource Identifier (RID) of the end Transaction. -""", -) -@click.option( - "--page_size", type=int, required=False, help="""The page size to use for the endpoint.""" -) -@click.option( - "--page_token", - type=str, - required=False, - help="""The page token indicates where to start paging. This should be omitted from the first page's request. -To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response -and use it to populate the `pageToken` field of the next request.""", -) -@click.option( - "--start_transaction_rid", - type=str, - required=False, - help="""The Resource Identifier (RID) of the start Transaction. -""", -) -@click.pass_obj -def datasets_dataset_file_op_list( - client: FoundryClient, - dataset_rid: str, - branch_name: typing.Optional[str], - end_transaction_rid: typing.Optional[str], - page_size: typing.Optional[int], - page_token: typing.Optional[str], - start_transaction_rid: typing.Optional[str], -): - """ - Lists Files contained in a Dataset. By default files are listed on the latest view of the default - branch - `master` for most enrollments. - #### Advanced Usage - See [Datasets Core Concepts](https://palantir.com/docs/foundry/data-integration/datasets/) for details on using branches and transactions. - To **list files on a specific Branch** specify the Branch's name as `branchName`. This will include the most - recent version of all files since the latest snapshot transaction, or the earliest ancestor transaction of the - branch if there are no snapshot transactions. - To **list files on the resolved view of a transaction** specify the Transaction's resource identifier - as `endTransactionRid`. This will include the most recent version of all files since the latest snapshot - transaction, or the earliest ancestor transaction if there are no snapshot transactions. - To **list files on the resolved view of a range of transactions** specify the the start transaction's resource - identifier as `startTransactionRid` and the end transaction's resource identifier as `endTransactionRid`. This - will include the most recent version of all files since the `startTransactionRid` up to the `endTransactionRid`. - Note that an intermediate snapshot transaction will remove all files from the view. Behavior is undefined when - the start and end transactions do not belong to the same root-to-leaf path. - To **list files on a specific transaction** specify the Transaction's resource identifier as both the - `startTransactionRid` and `endTransactionRid`. This will include only files that were modified as part of that - Transaction. - - """ - result = client.datasets.Dataset.File.list( - dataset_rid=dataset_rid, - branch_name=branch_name, - end_transaction_rid=end_transaction_rid, - page_size=page_size, - page_token=page_token, - start_transaction_rid=start_transaction_rid, - ) - click.echo(repr(result)) - - -@datasets_dataset_file.command("upload") -@click.argument("dataset_rid", type=str, required=True) -@click.argument("file_path", type=str, required=True) -@click.argument("body", type=click.File("rb"), required=True) -@click.option( - "--branch_name", - type=str, - required=False, - help="""The name of the Branch on which to upload the File. Defaults to `master` for most enrollments. -""", -) -@click.option( - "--transaction_rid", - type=str, - required=False, - help="""The Resource Identifier (RID) of the open Transaction on which to upload the File. -""", -) -@click.option( - "--transaction_type", - type=click.Choice(["APPEND", "UPDATE", "SNAPSHOT", "DELETE"]), - required=False, - help="""The type of the Transaction to create when using branchName. Defaults to `UPDATE`. -""", -) -@click.pass_obj -def datasets_dataset_file_op_upload( - client: FoundryClient, - dataset_rid: str, - file_path: str, - body: io.BufferedReader, - branch_name: typing.Optional[str], - transaction_rid: typing.Optional[str], - transaction_type: typing.Optional[typing.Literal["APPEND", "UPDATE", "SNAPSHOT", "DELETE"]], -): - """ - Uploads a File to an existing Dataset. - The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`. - By default the file is uploaded to a new transaction on the default branch - `master` for most enrollments. - If the file already exists only the most recent version will be visible in the updated view. - #### Advanced Usage - See [Datasets Core Concepts](https://palantir.com/docs/foundry/data-integration/datasets/) for details on using branches and transactions. - To **upload a file to a specific Branch** specify the Branch's name as `branchName`. A new transaction will - be created and committed on this branch. By default the TransactionType will be `UPDATE`, to override this - default specify `transactionType` in addition to `branchName`. - See [createBranch](https://palantir.com/docs/foundry/api/datasets-resources/branches/create-branch/) to create a custom branch. - To **upload a file on a manually opened transaction** specify the Transaction's resource identifier as - `transactionRid`. This is useful for uploading multiple files in a single transaction. - See [createTransaction](https://palantir.com/docs/foundry/api/datasets-resources/transactions/create-transaction/) to open a transaction. - - """ - result = client.datasets.Dataset.File.upload( - dataset_rid=dataset_rid, - file_path=file_path, - body=body.read(), - branch_name=branch_name, - transaction_rid=transaction_rid, - transaction_type=transaction_type, - ) - click.echo(repr(result)) - - -@datasets_dataset.group("transaction") -def datasets_dataset_transaction(): - pass - - -@datasets_dataset_transaction.command("abort") -@click.argument("dataset_rid", type=str, required=True) -@click.argument("transaction_rid", type=str, required=True) -@click.pass_obj -def datasets_dataset_transaction_op_abort( - client: FoundryClient, - dataset_rid: str, - transaction_rid: str, -): - """ - Aborts an open Transaction. File modifications made on this Transaction are not preserved and the Branch is - not updated. - - """ - result = client.datasets.Dataset.Transaction.abort( - dataset_rid=dataset_rid, - transaction_rid=transaction_rid, - ) - click.echo(repr(result)) - - -@datasets_dataset_transaction.command("build") -@click.argument("dataset_rid", type=str, required=True) -@click.argument("transaction_rid", type=str, required=True) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def datasets_dataset_transaction_op_build( - client: FoundryClient, - dataset_rid: str, - transaction_rid: str, - preview: typing.Optional[bool], -): - """ - Get the [Build](https://palantir.com/docs/foundry/data-integration/builds#builds) that computed the - given Transaction. Not all Transactions have an associated Build. For example, if a Dataset - is updated by a User uploading a CSV file into the browser, no Build will be tied to the Transaction. - - """ - result = client.datasets.Dataset.Transaction.build( - dataset_rid=dataset_rid, - transaction_rid=transaction_rid, - preview=preview, - ) - click.echo(repr(result)) - - -@datasets_dataset_transaction.command("commit") -@click.argument("dataset_rid", type=str, required=True) -@click.argument("transaction_rid", type=str, required=True) -@click.pass_obj -def datasets_dataset_transaction_op_commit( - client: FoundryClient, - dataset_rid: str, - transaction_rid: str, -): - """ - Commits an open Transaction. File modifications made on this Transaction are preserved and the Branch is - updated to point to the Transaction. - - """ - result = client.datasets.Dataset.Transaction.commit( - dataset_rid=dataset_rid, - transaction_rid=transaction_rid, - ) - click.echo(repr(result)) - - -@datasets_dataset_transaction.command("create") -@click.argument("dataset_rid", type=str, required=True) -@click.option( - "--transaction_type", - type=click.Choice(["APPEND", "UPDATE", "SNAPSHOT", "DELETE"]), - required=True, - help="""""", -) -@click.option( - "--branch_name", - type=str, - required=False, - help="""The name of the Branch on which to create the Transaction. Defaults to `master` for most enrollments. -""", -) -@click.pass_obj -def datasets_dataset_transaction_op_create( - client: FoundryClient, - dataset_rid: str, - transaction_type: typing.Literal["APPEND", "UPDATE", "SNAPSHOT", "DELETE"], - branch_name: typing.Optional[str], -): - """ - Creates a Transaction on a Branch of a Dataset. - - """ - result = client.datasets.Dataset.Transaction.create( - dataset_rid=dataset_rid, - transaction_type=transaction_type, - branch_name=branch_name, - ) - click.echo(repr(result)) - - -@datasets_dataset_transaction.command("get") -@click.argument("dataset_rid", type=str, required=True) -@click.argument("transaction_rid", type=str, required=True) -@click.pass_obj -def datasets_dataset_transaction_op_get( - client: FoundryClient, - dataset_rid: str, - transaction_rid: str, -): - """ - Gets a Transaction of a Dataset. - - """ - result = client.datasets.Dataset.Transaction.get( - dataset_rid=dataset_rid, - transaction_rid=transaction_rid, - ) - click.echo(repr(result)) - - -@datasets_dataset_transaction.command("job") -@click.argument("dataset_rid", type=str, required=True) -@click.argument("transaction_rid", type=str, required=True) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def datasets_dataset_transaction_op_job( - client: FoundryClient, - dataset_rid: str, - transaction_rid: str, - preview: typing.Optional[bool], -): - """ - Get the [Job](https://palantir.com/docs/foundry/data-integration/builds#jobs-and-jobspecs) that computed the - given Transaction. Not all Transactions have an associated Job. For example, if a Dataset - is updated by a User uploading a CSV file into the browser, no Job will be tied to the Transaction. - - """ - result = client.datasets.Dataset.Transaction.job( - dataset_rid=dataset_rid, - transaction_rid=transaction_rid, - preview=preview, - ) - click.echo(repr(result)) - - -@datasets_dataset.group("branch") -def datasets_dataset_branch(): - pass - - -@datasets_dataset_branch.command("create") -@click.argument("dataset_rid", type=str, required=True) -@click.option("--name", type=str, required=True, help="""""") -@click.option( - "--transaction_rid", - type=str, - required=False, - help="""The most recent OPEN or COMMITTED transaction on the branch. This will never be an ABORTED transaction.""", -) -@click.pass_obj -def datasets_dataset_branch_op_create( - client: FoundryClient, - dataset_rid: str, - name: str, - transaction_rid: typing.Optional[str], -): - """ - Creates a branch on an existing dataset. A branch may optionally point to a (committed) transaction. - - """ - result = client.datasets.Dataset.Branch.create( - dataset_rid=dataset_rid, - name=name, - transaction_rid=transaction_rid, - ) - click.echo(repr(result)) - - -@datasets_dataset_branch.command("delete") -@click.argument("dataset_rid", type=str, required=True) -@click.argument("branch_name", type=str, required=True) -@click.pass_obj -def datasets_dataset_branch_op_delete( - client: FoundryClient, - dataset_rid: str, - branch_name: str, -): - """ - Deletes the Branch with the given BranchName. - - """ - result = client.datasets.Dataset.Branch.delete( - dataset_rid=dataset_rid, - branch_name=branch_name, - ) - click.echo(repr(result)) - - -@datasets_dataset_branch.command("get") -@click.argument("dataset_rid", type=str, required=True) -@click.argument("branch_name", type=str, required=True) -@click.pass_obj -def datasets_dataset_branch_op_get( - client: FoundryClient, - dataset_rid: str, - branch_name: str, -): - """ - Get a Branch of a Dataset. - - """ - result = client.datasets.Dataset.Branch.get( - dataset_rid=dataset_rid, - branch_name=branch_name, - ) - click.echo(repr(result)) - - -@datasets_dataset_branch.command("list") -@click.argument("dataset_rid", type=str, required=True) -@click.option( - "--page_size", type=int, required=False, help="""The page size to use for the endpoint.""" -) -@click.option( - "--page_token", - type=str, - required=False, - help="""The page token indicates where to start paging. This should be omitted from the first page's request. -To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response -and use it to populate the `pageToken` field of the next request.""", -) -@click.pass_obj -def datasets_dataset_branch_op_list( - client: FoundryClient, - dataset_rid: str, - page_size: typing.Optional[int], - page_token: typing.Optional[str], -): - """ - Lists the Branches of a Dataset. - - """ - result = client.datasets.Dataset.Branch.list( - dataset_rid=dataset_rid, - page_size=page_size, - page_token=page_token, - ) - click.echo(repr(result)) - - -@datasets_dataset_branch.command("transactions") -@click.argument("dataset_rid", type=str, required=True) -@click.argument("branch_name", type=str, required=True) -@click.option( - "--page_size", - type=int, - required=False, - help="""The default pageSize is 20 transactions and the maximum allowed pageSize is 50 transactions -""", -) -@click.option("--page_token", type=str, required=False, help="""""") -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def datasets_dataset_branch_op_transactions( - client: FoundryClient, - dataset_rid: str, - branch_name: str, - page_size: typing.Optional[int], - page_token: typing.Optional[str], - preview: typing.Optional[bool], -): - """ - Get the Transaction history for the given Dataset. When requesting all transactions, the endpoint returns them in reverse chronological order. - - """ - result = client.datasets.Dataset.Branch.transactions( - dataset_rid=dataset_rid, - branch_name=branch_name, - page_size=page_size, - page_token=page_token, - preview=preview, - ) - click.echo(repr(result)) - - -@cli.group("filesystem") -def filesystem(): - pass - - -@filesystem.group("space") -def filesystem_space(): - pass - - -@filesystem_space.command("create") -@click.option( - "--deletion_policy_organizations", - type=str, - required=True, - help="""By default, this Space will use a Last Out deletion policy, meaning that this Space and its projects will be deleted when the last Organization listed here is deleted. Only Organizations in the Space's Enrollment can be included here. -""", -) -@click.option("--display_name", type=str, required=True, help="""""") -@click.option( - "--enrollment_rid", - type=str, - required=True, - help="""The RID of the Enrollment that this Space belongs to. -""", -) -@click.option( - "--organizations", - type=str, - required=True, - help="""The list of Organizations that are provisioned access to this Space. In order to access this Space, a user must be a member of at least one of these Organizations. -""", -) -@click.option( - "--default_role_set_id", - type=str, - required=False, - help="""The ID of the default Role Set for this Space, which defines the set of roles that Projects in this Space must use. If not provided, the default Role Set for Projects will be used. -""", -) -@click.option("--description", type=str, required=False, help="""The description of the Space.""") -@click.option( - "--file_system_id", - type=str, - required=False, - help="""The ID of the Filesystem for this Space, which is where the contents of the Space are stored. If not provided, the default Filesystem for this Enrollment will be used.""", -) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.option( - "--usage_account_rid", - type=str, - required=False, - help="""The RID of the Usage Account for this Space. Resource usage for projects in this space will accrue to this Usage Account by default. If not provided, the default Usage Account for this Enrollment will be used.""", -) -@click.pass_obj -def filesystem_space_op_create( - client: FoundryClient, - deletion_policy_organizations: str, - display_name: str, - enrollment_rid: str, - organizations: str, - default_role_set_id: typing.Optional[str], - description: typing.Optional[str], - file_system_id: typing.Optional[str], - preview: typing.Optional[bool], - usage_account_rid: typing.Optional[str], -): - """ - Creates a new Space. - """ - result = client.filesystem.Space.create( - deletion_policy_organizations=json.loads(deletion_policy_organizations), - display_name=display_name, - enrollment_rid=enrollment_rid, - organizations=json.loads(organizations), - default_role_set_id=default_role_set_id, - description=description, - file_system_id=file_system_id, - preview=preview, - usage_account_rid=usage_account_rid, - ) - click.echo(repr(result)) - - -@filesystem_space.command("delete") -@click.argument("space_rid", type=str, required=True) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def filesystem_space_op_delete( - client: FoundryClient, - space_rid: str, - preview: typing.Optional[bool], -): - """ - Delete the space. This will only work if the Space is empty, meaning any Projects or Resources have been deleted first. - - """ - result = client.filesystem.Space.delete( - space_rid=space_rid, - preview=preview, - ) - click.echo(repr(result)) - - -@filesystem_space.command("get") -@click.argument("space_rid", type=str, required=True) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def filesystem_space_op_get( - client: FoundryClient, - space_rid: str, - preview: typing.Optional[bool], -): - """ - Get the Space with the specified rid. - """ - result = client.filesystem.Space.get( - space_rid=space_rid, - preview=preview, - ) - click.echo(repr(result)) - - -@filesystem_space.command("list") -@click.option( - "--page_size", type=int, required=False, help="""The page size to use for the endpoint.""" -) -@click.option( - "--page_token", - type=str, - required=False, - help="""The page token indicates where to start paging. This should be omitted from the first page's request. -To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response -and use it to populate the `pageToken` field of the next request.""", -) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def filesystem_space_op_list( - client: FoundryClient, - page_size: typing.Optional[int], - page_token: typing.Optional[str], - preview: typing.Optional[bool], -): - """ - Lists all Spaces. - - This is a paged endpoint. Each page may be smaller or larger than the requested page size. However, it is guaranteed that if there are more results available, the `nextPageToken` field will be populated. To get the next page, make the same request again, but set the value of the `pageToken` query parameter to be value of the `nextPageToken` value of the previous response. If there is no `nextPageToken` field in the response, you are on the last page. - """ - result = client.filesystem.Space.list( - page_size=page_size, - page_token=page_token, - preview=preview, - ) - click.echo(repr(result)) - - -@filesystem_space.command("replace") -@click.argument("space_rid", type=str, required=True) -@click.option("--display_name", type=str, required=True, help="""""") -@click.option( - "--default_role_set_id", - type=str, - required=False, - help="""The ID of the default Role Set for this Space, which defines the set of roles that Projects in this Space must use. If not provided, the default Role Set for Projects will be used. -""", -) -@click.option("--description", type=str, required=False, help="""The description of the Space.""") -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.option( - "--usage_account_rid", - type=str, - required=False, - help="""The RID of the Usage Account for this Space. Resource usage for projects in this space will accrue to this Usage Account by default. If not provided, the default Usage Account for this Enrollment will be used.""", -) -@click.pass_obj -def filesystem_space_op_replace( - client: FoundryClient, - space_rid: str, - display_name: str, - default_role_set_id: typing.Optional[str], - description: typing.Optional[str], - preview: typing.Optional[bool], - usage_account_rid: typing.Optional[str], -): - """ - Replace the Space with the specified rid. - """ - result = client.filesystem.Space.replace( - space_rid=space_rid, - display_name=display_name, - default_role_set_id=default_role_set_id, - description=description, - preview=preview, - usage_account_rid=usage_account_rid, - ) - click.echo(repr(result)) - - -@filesystem.group("resource") -def filesystem_resource(): - pass - - -@filesystem_resource.command("add_markings") -@click.argument("resource_rid", type=str, required=True) -@click.option("--marking_ids", type=str, required=True, help="""""") -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def filesystem_resource_op_add_markings( - client: FoundryClient, - resource_rid: str, - marking_ids: str, - preview: typing.Optional[bool], -): - """ - Adds a list of Markings to a resource. - """ - result = client.filesystem.Resource.add_markings( - resource_rid=resource_rid, - marking_ids=json.loads(marking_ids), - preview=preview, - ) - click.echo(repr(result)) - - -@filesystem_resource.command("delete") -@click.argument("resource_rid", type=str, required=True) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def filesystem_resource_op_delete( - client: FoundryClient, - resource_rid: str, - preview: typing.Optional[bool], -): - """ - Move the given resource to the trash. Following this operation, the resource can be restored, using the - `restore` operation, or permanently deleted using the `permanentlyDelete` operation. - - """ - result = client.filesystem.Resource.delete( - resource_rid=resource_rid, - preview=preview, - ) - click.echo(repr(result)) - - -@filesystem_resource.command("get") -@click.argument("resource_rid", type=str, required=True) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def filesystem_resource_op_get( - client: FoundryClient, - resource_rid: str, - preview: typing.Optional[bool], -): - """ - Get the Resource with the specified rid. - """ - result = client.filesystem.Resource.get( - resource_rid=resource_rid, - preview=preview, - ) - click.echo(repr(result)) - - -@filesystem_resource.command("get_access_requirements") -@click.argument("resource_rid", type=str, required=True) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def filesystem_resource_op_get_access_requirements( - client: FoundryClient, - resource_rid: str, - preview: typing.Optional[bool], -): - """ - Returns a list of access requirements a user needs in order to view a resource. Access requirements are - composed of Organizations and Markings, and can either be applied directly to the resource or inherited. - - """ - result = client.filesystem.Resource.get_access_requirements( - resource_rid=resource_rid, - preview=preview, - ) - click.echo(repr(result)) - - -@filesystem_resource.command("get_batch") -@click.argument("body", type=str, required=True) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def filesystem_resource_op_get_batch( - client: FoundryClient, - body: str, - preview: typing.Optional[bool], -): - """ - Fetches multiple resources in a single request. - Returns a map from RID to the corresponding resource. If a resource does not exist, or if it is a root folder or space, its RID will not be included in the map. - At most 1,000 resources should be requested at once. - - - The maximum batch size for this endpoint is 1000. - """ - result = client.filesystem.Resource.get_batch( - body=json.loads(body), - preview=preview, - ) - click.echo(repr(result)) - - -@filesystem_resource.command("get_by_path") -@click.option( - "--path", - type=str, - required=True, - help="""The path to the Resource. The leading slash is optional.""", -) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def filesystem_resource_op_get_by_path( - client: FoundryClient, - path: str, - preview: typing.Optional[bool], -): - """ - Get a Resource by its absolute path. - """ - result = client.filesystem.Resource.get_by_path( - path=path, - preview=preview, - ) - click.echo(repr(result)) - - -@filesystem_resource.command("get_by_path_batch") -@click.argument("body", type=str, required=True) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def filesystem_resource_op_get_by_path_batch( - client: FoundryClient, - body: str, - preview: typing.Optional[bool], -): - """ - Gets multiple Resources by their absolute paths. - Returns a list of resources. If a path does not exist, is inaccessible, or refers to - a root folder or space, it will not be included in the response. - At most 1,000 paths should be requested at once. - - - The maximum batch size for this endpoint is 1000. - """ - result = client.filesystem.Resource.get_by_path_batch( - body=json.loads(body), - preview=preview, - ) - click.echo(repr(result)) - - -@filesystem_resource.command("markings") -@click.argument("resource_rid", type=str, required=True) -@click.option( - "--page_size", type=int, required=False, help="""The page size to use for the endpoint.""" -) -@click.option( - "--page_token", - type=str, - required=False, - help="""The page token indicates where to start paging. This should be omitted from the first page's request. -To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response -and use it to populate the `pageToken` field of the next request.""", -) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def filesystem_resource_op_markings( - client: FoundryClient, - resource_rid: str, - page_size: typing.Optional[int], - page_token: typing.Optional[str], - preview: typing.Optional[bool], -): - """ - List of Markings directly applied to a resource. The number of Markings on a resource is typically small - so the `pageSize` and `pageToken` parameters are not required. - - """ - result = client.filesystem.Resource.markings( - resource_rid=resource_rid, - page_size=page_size, - page_token=page_token, - preview=preview, - ) - click.echo(repr(result)) - - -@filesystem_resource.command("permanently_delete") -@click.argument("resource_rid", type=str, required=True) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def filesystem_resource_op_permanently_delete( - client: FoundryClient, - resource_rid: str, - preview: typing.Optional[bool], -): - """ - Permanently delete the given resource from the trash. If the Resource is not directly trashed, a - `ResourceNotTrashed` error will be thrown. - - """ - result = client.filesystem.Resource.permanently_delete( - resource_rid=resource_rid, - preview=preview, - ) - click.echo(repr(result)) - - -@filesystem_resource.command("remove_markings") -@click.argument("resource_rid", type=str, required=True) -@click.option("--marking_ids", type=str, required=True, help="""""") -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def filesystem_resource_op_remove_markings( - client: FoundryClient, - resource_rid: str, - marking_ids: str, - preview: typing.Optional[bool], -): - """ - Removes Markings from a resource. - """ - result = client.filesystem.Resource.remove_markings( - resource_rid=resource_rid, - marking_ids=json.loads(marking_ids), - preview=preview, - ) - click.echo(repr(result)) - - -@filesystem_resource.command("restore") -@click.argument("resource_rid", type=str, required=True) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def filesystem_resource_op_restore( - client: FoundryClient, - resource_rid: str, - preview: typing.Optional[bool], -): - """ - Restore the given resource and any directly trashed ancestors from the trash. If the resource is not - trashed, this operation will be ignored. - - """ - result = client.filesystem.Resource.restore( - resource_rid=resource_rid, - preview=preview, - ) - click.echo(repr(result)) - - -@filesystem_resource.group("resource_role") -def filesystem_resource_resource_role(): - pass - - -@filesystem_resource_resource_role.command("add") -@click.argument("resource_rid", type=str, required=True) -@click.option("--roles", type=str, required=True, help="""""") -@click.pass_obj -def filesystem_resource_resource_role_op_add( - client: FoundryClient, - resource_rid: str, - roles: str, -): - """ """ - result = client.filesystem.Resource.Role.add( - resource_rid=resource_rid, - roles=json.loads(roles), - ) - click.echo(repr(result)) - - -@filesystem_resource_resource_role.command("list") -@click.argument("resource_rid", type=str, required=True) -@click.option( - "--include_inherited", - type=bool, - required=False, - help="""Whether to include inherited roles on the resource.""", -) -@click.option( - "--page_size", type=int, required=False, help="""The page size to use for the endpoint.""" -) -@click.option( - "--page_token", - type=str, - required=False, - help="""The page token indicates where to start paging. This should be omitted from the first page's request. -To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response -and use it to populate the `pageToken` field of the next request.""", -) -@click.pass_obj -def filesystem_resource_resource_role_op_list( - client: FoundryClient, - resource_rid: str, - include_inherited: typing.Optional[bool], - page_size: typing.Optional[int], - page_token: typing.Optional[str], -): - """ - List the roles on a resource. - - """ - result = client.filesystem.Resource.Role.list( - resource_rid=resource_rid, - include_inherited=include_inherited, - page_size=page_size, - page_token=page_token, - ) - click.echo(repr(result)) - - -@filesystem_resource_resource_role.command("remove") -@click.argument("resource_rid", type=str, required=True) -@click.option("--roles", type=str, required=True, help="""""") -@click.pass_obj -def filesystem_resource_resource_role_op_remove( - client: FoundryClient, - resource_rid: str, - roles: str, -): - """ """ - result = client.filesystem.Resource.Role.remove( - resource_rid=resource_rid, - roles=json.loads(roles), - ) - click.echo(repr(result)) - - -@filesystem.group("project") -def filesystem_project(): - pass - - -@filesystem_project.command("add_organizations") -@click.argument("project_rid", type=str, required=True) -@click.option("--organization_rids", type=str, required=True, help="""""") -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def filesystem_project_op_add_organizations( - client: FoundryClient, - project_rid: str, - organization_rids: str, - preview: typing.Optional[bool], -): - """ - Adds a list of Organizations to a Project. - """ - result = client.filesystem.Project.add_organizations( - project_rid=project_rid, - organization_rids=json.loads(organization_rids), - preview=preview, - ) - click.echo(repr(result)) - - -@filesystem_project.command("create") -@click.option("--default_roles", type=str, required=True, help="""""") -@click.option("--display_name", type=str, required=True, help="""""") -@click.option("--organization_rids", type=str, required=True, help="""""") -@click.option("--role_grants", type=str, required=True, help="""""") -@click.option("--space_rid", type=str, required=True, help="""""") -@click.option("--description", type=str, required=False, help="""""") -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def filesystem_project_op_create( - client: FoundryClient, - default_roles: str, - display_name: str, - organization_rids: str, - role_grants: str, - space_rid: str, - description: typing.Optional[str], - preview: typing.Optional[bool], -): - """ - Creates a new Project. - - Note that third-party applications using this endpoint via OAuth2 cannot be associated with an - Ontology SDK as this will reduce the scope of operations to only those within specified projects. - When creating the application, select "No, I won't use an Ontology SDK" on the Resources page. - - """ - result = client.filesystem.Project.create( - default_roles=json.loads(default_roles), - display_name=display_name, - organization_rids=json.loads(organization_rids), - role_grants=json.loads(role_grants), - space_rid=space_rid, - description=description, - preview=preview, - ) - click.echo(repr(result)) - - -@filesystem_project.command("create_from_template") -@click.option("--template_rid", type=str, required=True, help="""""") -@click.option("--variable_values", type=str, required=True, help="""""") -@click.option("--default_roles", type=str, required=False, help="""""") -@click.option("--organization_rids", type=str, required=False, help="""""") -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.option("--project_description", type=str, required=False, help="""""") -@click.pass_obj -def filesystem_project_op_create_from_template( - client: FoundryClient, - template_rid: str, - variable_values: str, - default_roles: typing.Optional[str], - organization_rids: typing.Optional[str], - preview: typing.Optional[bool], - project_description: typing.Optional[str], -): - """ - Creates a project from a project template. - """ - result = client.filesystem.Project.create_from_template( - template_rid=template_rid, - variable_values=json.loads(variable_values), - default_roles=None if default_roles is None else json.loads(default_roles), - organization_rids=None if organization_rids is None else json.loads(organization_rids), - preview=preview, - project_description=project_description, - ) - click.echo(repr(result)) - - -@filesystem_project.command("get") -@click.argument("project_rid", type=str, required=True) -@click.pass_obj -def filesystem_project_op_get( - client: FoundryClient, - project_rid: str, -): - """ - Get the Project with the specified rid. - """ - result = client.filesystem.Project.get( - project_rid=project_rid, - ) - click.echo(repr(result)) - - -@filesystem_project.command("organizations") -@click.argument("project_rid", type=str, required=True) -@click.option( - "--page_size", type=int, required=False, help="""The page size to use for the endpoint.""" -) -@click.option( - "--page_token", - type=str, - required=False, - help="""The page token indicates where to start paging. This should be omitted from the first page's request. -To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response -and use it to populate the `pageToken` field of the next request.""", -) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def filesystem_project_op_organizations( - client: FoundryClient, - project_rid: str, - page_size: typing.Optional[int], - page_token: typing.Optional[str], - preview: typing.Optional[bool], -): - """ - List of Organizations directly applied to a Project. The number of Organizations on a Project is - typically small so the `pageSize` and `pageToken` parameters are not required. - - """ - result = client.filesystem.Project.organizations( - project_rid=project_rid, - page_size=page_size, - page_token=page_token, - preview=preview, - ) - click.echo(repr(result)) - - -@filesystem_project.command("remove_organizations") -@click.argument("project_rid", type=str, required=True) -@click.option("--organization_rids", type=str, required=True, help="""""") -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def filesystem_project_op_remove_organizations( - client: FoundryClient, - project_rid: str, - organization_rids: str, - preview: typing.Optional[bool], -): - """ - Removes Organizations from a Project. - """ - result = client.filesystem.Project.remove_organizations( - project_rid=project_rid, - organization_rids=json.loads(organization_rids), - preview=preview, - ) - click.echo(repr(result)) - - -@filesystem_project.command("replace") -@click.argument("project_rid", type=str, required=True) -@click.option( - "--display_name", - type=str, - required=True, - help="""The display name of the Project. Must be unique and cannot contain a /""", -) -@click.option( - "--description", - type=str, - required=False, - help="""The description associated with the Project.""", -) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def filesystem_project_op_replace( - client: FoundryClient, - project_rid: str, - display_name: str, - description: typing.Optional[str], - preview: typing.Optional[bool], -): - """ - Replace the Project with the specified rid. - """ - result = client.filesystem.Project.replace( - project_rid=project_rid, - display_name=display_name, - description=description, - preview=preview, - ) - click.echo(repr(result)) - - -@filesystem.group("folder") -def filesystem_folder(): - pass - - -@filesystem_folder.command("children") -@click.argument("folder_rid", type=str, required=True) -@click.option( - "--page_size", type=int, required=False, help="""The page size to use for the endpoint.""" -) -@click.option( - "--page_token", - type=str, - required=False, - help="""The page token indicates where to start paging. This should be omitted from the first page's request. -To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response -and use it to populate the `pageToken` field of the next request.""", -) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def filesystem_folder_op_children( - client: FoundryClient, - folder_rid: str, - page_size: typing.Optional[int], - page_token: typing.Optional[str], - preview: typing.Optional[bool], -): - """ - List all child Resources of the Folder. - - This is a paged endpoint. The page size will be limited to 2,000 results per page. If no page size is - provided, this page size will also be used as the default. - - """ - result = client.filesystem.Folder.children( - folder_rid=folder_rid, - page_size=page_size, - page_token=page_token, - preview=preview, - ) - click.echo(repr(result)) - - -@filesystem_folder.command("create") -@click.option("--display_name", type=str, required=True, help="""""") -@click.option( - "--parent_folder_rid", - type=str, - required=True, - help="""The parent folder Resource Identifier (RID). For Projects, this will be the Space RID and for Spaces, -this value will be the root folder (`ri.compass.main.folder.0`). -""", -) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def filesystem_folder_op_create( - client: FoundryClient, - display_name: str, - parent_folder_rid: str, - preview: typing.Optional[bool], -): - """ - Creates a new Folder. - """ - result = client.filesystem.Folder.create( - display_name=display_name, - parent_folder_rid=parent_folder_rid, - preview=preview, - ) - click.echo(repr(result)) - - -@filesystem_folder.command("get") -@click.argument("folder_rid", type=str, required=True) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def filesystem_folder_op_get( - client: FoundryClient, - folder_rid: str, - preview: typing.Optional[bool], -): - """ - Get the Folder with the specified rid. - """ - result = client.filesystem.Folder.get( - folder_rid=folder_rid, - preview=preview, - ) - click.echo(repr(result)) - - -@filesystem_folder.command("get_batch") -@click.argument("body", type=str, required=True) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def filesystem_folder_op_get_batch( - client: FoundryClient, - body: str, - preview: typing.Optional[bool], -): - """ - Fetches multiple folders in a single request. - - - The maximum batch size for this endpoint is 1000. - """ - result = client.filesystem.Folder.get_batch( - body=json.loads(body), - preview=preview, - ) - click.echo(repr(result)) - - -@cli.group("functions") -def functions(): - pass - - -@functions.group("value_type") -def functions_value_type(): - pass - - -@functions_value_type.command("get") -@click.argument("value_type_rid", type=str, required=True) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def functions_value_type_op_get( - client: FoundryClient, - value_type_rid: str, - preview: typing.Optional[bool], -): - """ - Gets a specific value type with the given RID. The latest version is returned. - - """ - result = client.functions.ValueType.get( - value_type_rid=value_type_rid, - preview=preview, - ) - click.echo(repr(result)) - - -@functions_value_type.group("version_id") -def functions_value_type_version_id(): - pass - - -@functions_value_type_version_id.command("get") -@click.argument("value_type_rid", type=str, required=True) -@click.argument("version_id_version_id", type=str, required=True) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def functions_value_type_version_id_op_get( - client: FoundryClient, - value_type_rid: str, - version_id_version_id: str, - preview: typing.Optional[bool], -): - """ - Gets a specific value type with the given RID. The specified version is returned. - - """ - result = client.functions.ValueType.VersionId.get( - value_type_rid=value_type_rid, - version_id_version_id=version_id_version_id, - preview=preview, - ) - click.echo(repr(result)) - - -@functions.group("query") -def functions_query(): - pass - - -@functions_query.command("execute") -@click.argument("query_api_name", type=str, required=True) -@click.option("--parameters", type=str, required=True, help="""""") -@click.option("--attribution", type=str, required=False, help="""""") -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.option("--trace_parent", type=str, required=False, help="""""") -@click.option("--trace_state", type=str, required=False, help="""""") -@click.option( - "--transaction_id", - type=str, - required=False, - help="""The ID of a transaction to read from. Transactions are an experimental feature and all workflows may not be supported.""", -) -@click.option("--version", type=str, required=False, help="""""") -@click.pass_obj -def functions_query_op_execute( - client: FoundryClient, - query_api_name: str, - parameters: str, - attribution: typing.Optional[str], - preview: typing.Optional[bool], - trace_parent: typing.Optional[str], - trace_state: typing.Optional[str], - transaction_id: typing.Optional[str], - version: typing.Optional[str], -): - """ - Executes a Query using the given parameters. By default, this executes the latest version of the query. - - This endpoint is maintained for backward compatibility only. - - For all new implementations, use the `streamingExecute` endpoint, which supports all function types - and provides enhanced functionality. - - """ - result = client.functions.Query.execute( - query_api_name=query_api_name, - parameters=json.loads(parameters), - attribution=attribution, - preview=preview, - trace_parent=trace_parent, - trace_state=trace_state, - transaction_id=transaction_id, - version=version, - ) - click.echo(repr(result)) - - -@functions_query.command("get") -@click.argument("query_api_name", type=str, required=True) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.option("--version", type=str, required=False, help="""""") -@click.pass_obj -def functions_query_op_get( - client: FoundryClient, - query_api_name: str, - preview: typing.Optional[bool], - version: typing.Optional[str], -): - """ - Gets a specific query type with the given API name. By default, this gets the latest version of the query. - - """ - result = client.functions.Query.get( - query_api_name=query_api_name, - preview=preview, - version=version, - ) - click.echo(repr(result)) - - -@functions_query.command("get_by_rid") -@click.option("--rid", type=str, required=True, help="""""") -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.option("--version", type=str, required=False, help="""""") -@click.pass_obj -def functions_query_op_get_by_rid( - client: FoundryClient, - rid: str, - preview: typing.Optional[bool], - version: typing.Optional[str], -): - """ - Gets a specific query type with the given RID.By default, this gets the latest version of the query. - - """ - result = client.functions.Query.get_by_rid( - rid=rid, - preview=preview, - version=version, - ) - click.echo(repr(result)) - - -@functions_query.command("streaming_execute") -@click.argument("query_api_name", type=str, required=True) -@click.option("--parameters", type=str, required=True, help="""""") -@click.option("--attribution", type=str, required=False, help="""""") -@click.option( - "--ontology", - type=str, - required=False, - help="""Optional ontology identifier (RID or API name). When provided, executes an ontology-scoped -function. When omitted, executes a global function. -""", -) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.option("--trace_parent", type=str, required=False, help="""""") -@click.option("--trace_state", type=str, required=False, help="""""") -@click.option( - "--transaction_id", - type=str, - required=False, - help="""The ID of a transaction to read from. Transactions are an experimental feature and all workflows may not be supported.""", -) -@click.option("--version", type=str, required=False, help="""""") -@click.pass_obj -def functions_query_op_streaming_execute( - client: FoundryClient, - query_api_name: str, - parameters: str, - attribution: typing.Optional[str], - ontology: typing.Optional[str], - preview: typing.Optional[bool], - trace_parent: typing.Optional[str], - trace_state: typing.Optional[str], - transaction_id: typing.Optional[str], - version: typing.Optional[str], -): - """ - Executes a Query using the given parameters, returning results as an NDJSON stream. By default, this executes the latest version of the query. - - This endpoint supports all Query functions. The endpoint name 'streamingExecute' refers to the NDJSON - streaming response format. Both streaming and non-streaming functions can use this endpoint. - Non-streaming functions return a single-line NDJSON response, while streaming functions return multi-line NDJSON responses. - This is the recommended endpoint for all query execution. - - The response is returned as a binary stream in NDJSON (Newline Delimited JSON) format, where each line - is a StreamingExecuteQueryResponse containing either a data batch or an error. - - For a function returning a list of 5 records with a batch size of 3, the response stream would contain - two lines. The first line contains the first 3 items, and the second line contains the remaining 2 items: - - ``` - {"type":"data","value":[{"productId":"SKU-001","price":29.99},{"productId":"SKU-002","price":49.99},{"productId":"SKU-003","price":19.99}]} - {"type":"data","value":[{"productId":"SKU-004","price":39.99},{"productId":"SKU-005","price":59.99}]} - ``` - - Each line is a separate JSON object followed by a newline character. Clients should parse the stream - line-by-line to process results as they arrive. If an error occurs during execution, the stream will - contain an error line: - - ``` - {"type":"error","errorCode":"INVALID_ARGUMENT","errorName":"QueryRuntimeError","errorInstanceId":"3f8a9c7b-2e4d-4a1f-9b8c-7d6e5f4a3b2c","errorDescription":"Division by zero","parameters":{}} - ``` - - """ - result = client.functions.Query.streaming_execute( - query_api_name=query_api_name, - parameters=json.loads(parameters), - attribution=attribution, - ontology=ontology, - preview=preview, - trace_parent=trace_parent, - trace_state=trace_state, - transaction_id=transaction_id, - version=version, - ) - click.echo(result) - - -@cli.group("geo") -def geo(): - pass - - -@cli.group("language_models") -def language_models(): - pass - - -@language_models.group("open_ai_model") -def language_models_open_ai_model(): - pass - - -@language_models_open_ai_model.command("embeddings") -@click.argument("open_ai_model_model_id", type=str, required=True) -@click.option( - "--input", - type=str, - required=True, - help="""Input text to embed, encoded as an array of strings. Each input must not exceed the max input -tokens for the model (8192 tokens for all embedding models). -""", -) -@click.option("--attribution", type=str, required=False, help="""""") -@click.option( - "--dimensions", - type=int, - required=False, - help="""The number of dimensions the resulting output embeddings should have. -Only supported in text-embedding-3 and later models. -""", -) -@click.option( - "--encoding_format", - type=click.Choice(["FLOAT", "BASE64"]), - required=False, - help="""The format to return the embeddings in. Can be either float or base64.""", -) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def language_models_open_ai_model_op_embeddings( - client: FoundryClient, - open_ai_model_model_id: str, - input: str, - attribution: typing.Optional[str], - dimensions: typing.Optional[int], - encoding_format: typing.Optional[typing.Literal["FLOAT", "BASE64"]], - preview: typing.Optional[bool], -): - """ """ - result = client.language_models.OpenAiModel.embeddings( - open_ai_model_model_id=open_ai_model_model_id, - input=json.loads(input), - attribution=attribution, - dimensions=dimensions, - encoding_format=encoding_format, - preview=preview, - ) - click.echo(repr(result)) - - -@language_models.group("anthropic_model") -def language_models_anthropic_model(): - pass - - -@language_models_anthropic_model.command("messages") -@click.argument("anthropic_model_model_id", type=str, required=True) -@click.option( - "--max_tokens", - type=int, - required=True, - help="""The maximum number of tokens to generate before stopping.""", -) -@click.option( - "--messages", - type=str, - required=True, - help="""Input messages to the model. This can include a single user-role message or multiple messages with -alternating user and assistant roles. -""", -) -@click.option("--attribution", type=str, required=False, help="""""") -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.option( - "--stop_sequences", - type=str, - required=False, - help="""Custom text sequences that will cause the model to stop generating.""", -) -@click.option( - "--system", - type=str, - required=False, - help="""A system prompt is a way of providing context and instructions to Claude, such as specifying a -particular goal or role. As of now, sending multiple system prompts is not supported. -""", -) -@click.option( - "--temperature", - type=float, - required=False, - help="""Amount of randomness injected into the response. Ranges from 0.0 to 1.0. Note that even with -temperature of 0.0, the results will not be fully deterministic. Defaults to 1.0 -""", -) -@click.option( - "--thinking", - type=str, - required=False, - help="""Configuration for enabling Claude's extended thinking.""", -) -@click.option( - "--tool_choice", - type=str, - required=False, - help="""How the model should use the provided tools.""", -) -@click.option( - "--tools", type=str, required=False, help="""Definitions of tools that the model may use.""" -) -@click.option( - "--top_k", - type=int, - required=False, - help="""Only sample from the top K options for each subsequent token.""", -) -@click.option( - "--top_p", - type=float, - required=False, - help="""Use nucleus sampling. You should either alter temperature or top_p, but not both""", -) -@click.pass_obj -def language_models_anthropic_model_op_messages( - client: FoundryClient, - anthropic_model_model_id: str, - max_tokens: int, - messages: str, - attribution: typing.Optional[str], - preview: typing.Optional[bool], - stop_sequences: typing.Optional[str], - system: typing.Optional[str], - temperature: typing.Optional[float], - thinking: typing.Optional[str], - tool_choice: typing.Optional[str], - tools: typing.Optional[str], - top_k: typing.Optional[int], - top_p: typing.Optional[float], -): - """ """ - result = client.language_models.AnthropicModel.messages( - anthropic_model_model_id=anthropic_model_model_id, - max_tokens=max_tokens, - messages=json.loads(messages), - attribution=attribution, - preview=preview, - stop_sequences=None if stop_sequences is None else json.loads(stop_sequences), - system=None if system is None else json.loads(system), - temperature=temperature, - thinking=None if thinking is None else json.loads(thinking), - tool_choice=None if tool_choice is None else json.loads(tool_choice), - tools=None if tools is None else json.loads(tools), - top_k=top_k, - top_p=top_p, - ) - click.echo(repr(result)) - - -@cli.group("media_sets") -def media_sets(): - pass - - -@media_sets.group("media_set") -def media_sets_media_set(): - pass - - -@media_sets_media_set.command("abort") -@click.argument("media_set_rid", type=str, required=True) -@click.argument("transaction_id", type=str, required=True) -@click.option( - "--preview", - type=bool, - required=False, - help="""A boolean flag that, when set to true, enables the use of beta features in preview mode. -""", -) -@click.pass_obj -def media_sets_media_set_op_abort( - client: FoundryClient, - media_set_rid: str, - transaction_id: str, - preview: typing.Optional[bool], -): - """ - Aborts an open transaction. Items uploaded to the media set during this transaction will be deleted. - - """ - result = client.media_sets.MediaSet.abort( - media_set_rid=media_set_rid, - transaction_id=transaction_id, - preview=preview, - ) - click.echo(repr(result)) - - -@media_sets_media_set.command("calculate") -@click.argument("media_set_rid", type=str, required=True) -@click.argument("media_item_rid", type=str, required=True) -@click.option( - "--preview", - type=bool, - required=False, - help="""A boolean flag that, when set to true, enables the use of beta features in preview mode. -""", -) -@click.option("--read_token", type=str, required=False, help="""""") -@click.pass_obj -def media_sets_media_set_op_calculate( - client: FoundryClient, - media_set_rid: str, - media_item_rid: str, - preview: typing.Optional[bool], - read_token: typing.Optional[str], -): - """ - Starts calculation of a thumbnail for a given image. - - """ - result = client.media_sets.MediaSet.calculate( - media_set_rid=media_set_rid, - media_item_rid=media_item_rid, - preview=preview, - read_token=read_token, - ) - click.echo(repr(result)) - - -@media_sets_media_set.command("commit") -@click.argument("media_set_rid", type=str, required=True) -@click.argument("transaction_id", type=str, required=True) -@click.option( - "--preview", - type=bool, - required=False, - help="""A boolean flag that, when set to true, enables the use of beta features in preview mode. -""", -) -@click.pass_obj -def media_sets_media_set_op_commit( - client: FoundryClient, - media_set_rid: str, - transaction_id: str, - preview: typing.Optional[bool], -): - """ - Commits an open transaction. On success, items uploaded to the media set during this transaction will become available. - - """ - result = client.media_sets.MediaSet.commit( - media_set_rid=media_set_rid, - transaction_id=transaction_id, - preview=preview, - ) - click.echo(repr(result)) - - -@media_sets_media_set.command("create") -@click.argument("media_set_rid", type=str, required=True) -@click.option( - "--branch_name", - type=str, - required=False, - help="""The branch on which to open the transaction. Defaults to `master` for most enrollments. -""", -) -@click.option( - "--preview", - type=bool, - required=False, - help="""A boolean flag that, when set to true, enables the use of beta features in preview mode. -""", -) -@click.pass_obj -def media_sets_media_set_op_create( - client: FoundryClient, - media_set_rid: str, - branch_name: typing.Optional[str], - preview: typing.Optional[bool], -): - """ - Creates a new transaction. Items uploaded to the media set while this transaction is open will not be reflected until the transaction is committed. - - """ - result = client.media_sets.MediaSet.create( - media_set_rid=media_set_rid, - branch_name=branch_name, - preview=preview, - ) - click.echo(repr(result)) - - -@media_sets_media_set.command("get_rid_by_path") -@click.argument("media_set_rid", type=str, required=True) -@click.option( - "--media_item_path", - type=str, - required=True, - help="""The path of the media item. -""", -) -@click.option( - "--branch_name", - type=str, - required=False, - help="""Specifies the specific branch by name in which to search for this media item. May not be provided if branch rid or view rid are provided.""", -) -@click.option( - "--branch_rid", - type=str, - required=False, - help="""Specifies the specific branch by rid in which to search for this media item. May not be provided if branch name or view rid are provided.""", -) -@click.option( - "--preview", - type=bool, - required=False, - help="""A boolean flag that, when set to true, enables the use of beta features in preview mode. -""", -) -@click.option( - "--view_rid", - type=str, - required=False, - help="""Specifies the specific view by rid in which to search for this media item. May not be provided if branch name or branch rid are provided.""", -) -@click.pass_obj -def media_sets_media_set_op_get_rid_by_path( - client: FoundryClient, - media_set_rid: str, - media_item_path: str, - branch_name: typing.Optional[str], - branch_rid: typing.Optional[str], - preview: typing.Optional[bool], - view_rid: typing.Optional[str], -): - """ - Returns the media item RID for the media item with the specified path. - - """ - result = client.media_sets.MediaSet.get_rid_by_path( - media_set_rid=media_set_rid, - media_item_path=media_item_path, - branch_name=branch_name, - branch_rid=branch_rid, - preview=preview, - view_rid=view_rid, - ) - click.echo(repr(result)) - - -@media_sets_media_set.command("info") -@click.argument("media_set_rid", type=str, required=True) -@click.argument("media_item_rid", type=str, required=True) -@click.option( - "--preview", - type=bool, - required=False, - help="""A boolean flag that, when set to true, enables the use of beta features in preview mode. -""", -) -@click.option("--read_token", type=str, required=False, help="""""") -@click.pass_obj -def media_sets_media_set_op_info( - client: FoundryClient, - media_set_rid: str, - media_item_rid: str, - preview: typing.Optional[bool], - read_token: typing.Optional[str], -): - """ - Gets information about the media item. - - """ - result = client.media_sets.MediaSet.info( - media_set_rid=media_set_rid, - media_item_rid=media_item_rid, - preview=preview, - read_token=read_token, - ) - click.echo(repr(result)) - - -@media_sets_media_set.command("read") -@click.argument("media_set_rid", type=str, required=True) -@click.argument("media_item_rid", type=str, required=True) -@click.option( - "--preview", - type=bool, - required=False, - help="""A boolean flag that, when set to true, enables the use of beta features in preview mode. -""", -) -@click.option("--read_token", type=str, required=False, help="""""") -@click.pass_obj -def media_sets_media_set_op_read( - client: FoundryClient, - media_set_rid: str, - media_item_rid: str, - preview: typing.Optional[bool], - read_token: typing.Optional[str], -): - """ - Gets the content of a media item. - - """ - result = client.media_sets.MediaSet.read( - media_set_rid=media_set_rid, - media_item_rid=media_item_rid, - preview=preview, - read_token=read_token, - ) - click.echo(result) - - -@media_sets_media_set.command("read_original") -@click.argument("media_set_rid", type=str, required=True) -@click.argument("media_item_rid", type=str, required=True) -@click.option( - "--preview", - type=bool, - required=False, - help="""A boolean flag that, when set to true, enables the use of beta features in preview mode. -""", -) -@click.option("--read_token", type=str, required=False, help="""""") -@click.pass_obj -def media_sets_media_set_op_read_original( - client: FoundryClient, - media_set_rid: str, - media_item_rid: str, - preview: typing.Optional[bool], - read_token: typing.Optional[str], -): - """ - Gets the content of an original file uploaded to the media item, even if it was transformed on upload due to being an additional input format. - - """ - result = client.media_sets.MediaSet.read_original( - media_set_rid=media_set_rid, - media_item_rid=media_item_rid, - preview=preview, - read_token=read_token, - ) - click.echo(result) - - -@media_sets_media_set.command("reference") -@click.argument("media_set_rid", type=str, required=True) -@click.argument("media_item_rid", type=str, required=True) -@click.option( - "--preview", - type=bool, - required=False, - help="""A boolean flag that, when set to true, enables the use of beta features in preview mode. -""", -) -@click.option("--read_token", type=str, required=False, help="""""") -@click.pass_obj -def media_sets_media_set_op_reference( - client: FoundryClient, - media_set_rid: str, - media_item_rid: str, - preview: typing.Optional[bool], - read_token: typing.Optional[str], -): - """ - Gets the [media reference](https://palantir.com/docs/foundry/data-integration/media-sets/#media-references) for this media item. - - """ - result = client.media_sets.MediaSet.reference( - media_set_rid=media_set_rid, - media_item_rid=media_item_rid, - preview=preview, - read_token=read_token, - ) - click.echo(repr(result)) - - -@media_sets_media_set.command("retrieve") -@click.argument("media_set_rid", type=str, required=True) -@click.argument("media_item_rid", type=str, required=True) -@click.option( - "--preview", - type=bool, - required=False, - help="""A boolean flag that, when set to true, enables the use of beta features in preview mode. -""", -) -@click.option("--read_token", type=str, required=False, help="""""") -@click.pass_obj -def media_sets_media_set_op_retrieve( - client: FoundryClient, - media_set_rid: str, - media_item_rid: str, - preview: typing.Optional[bool], - read_token: typing.Optional[str], -): - """ - Retrieves a successfully calculated thumbnail for a given image. - - Thumbnails are 200px wide in the format of `image/webp` - - """ - result = client.media_sets.MediaSet.retrieve( - media_set_rid=media_set_rid, - media_item_rid=media_item_rid, - preview=preview, - read_token=read_token, - ) - click.echo(result) - - -@media_sets_media_set.command("upload") -@click.argument("media_set_rid", type=str, required=True) -@click.argument("body", type=click.File("rb"), required=True) -@click.option( - "--branch_name", - type=str, - required=False, - help="""Specifies the specific branch by name to which this media item will be uploaded. May not be provided if branch rid or view rid are provided.""", -) -@click.option( - "--branch_rid", - type=str, - required=False, - help="""Specifies the specific branch by rid to which this media item will be uploaded. May not be provided if branch name or view rid are provided.""", -) -@click.option( - "--media_item_path", - type=str, - required=False, - help="""An identifier for a media item within a media set. Necessary if the backing media set requires paths.""", -) -@click.option( - "--preview", - type=bool, - required=False, - help="""A boolean flag that, when set to true, enables the use of beta features in preview mode. -""", -) -@click.option( - "--transaction_id", - type=str, - required=False, - help="""The id of the transaction associated with this request. Required if this is a transactional media set. -""", -) -@click.option( - "--view_rid", - type=str, - required=False, - help="""Specifies the specific view by rid to which this media item will be uploaded. May not be provided if branch name or branch rid are provided.""", -) -@click.pass_obj -def media_sets_media_set_op_upload( - client: FoundryClient, - media_set_rid: str, - body: io.BufferedReader, - branch_name: typing.Optional[str], - branch_rid: typing.Optional[str], - media_item_path: typing.Optional[str], - preview: typing.Optional[bool], - transaction_id: typing.Optional[str], - view_rid: typing.Optional[str], -): - """ - Uploads a media item to an existing media set. - The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`. - A branch name, or branch rid, or view rid may optionally be specified. If none is specified, the item will be uploaded to the default branch. If more than one is specified, an error is thrown. - - """ - result = client.media_sets.MediaSet.upload( - media_set_rid=media_set_rid, - body=body.read(), - branch_name=branch_name, - branch_rid=branch_rid, - media_item_path=media_item_path, - preview=preview, - transaction_id=transaction_id, - view_rid=view_rid, - ) - click.echo(repr(result)) - - -@media_sets_media_set.command("upload_media") -@click.argument("body", type=click.File("rb"), required=True) -@click.option( - "--filename", - type=str, - required=True, - help="""The path to write the media item to. Required if the backing media set requires paths. -""", -) -@click.option( - "--attribution", type=str, required=False, help="""used for passing through usage attribution""" -) -@click.option( - "--preview", - type=bool, - required=False, - help="""A boolean flag that, when set to true, enables the use of beta features in preview mode. -""", -) -@click.pass_obj -def media_sets_media_set_op_upload_media( - client: FoundryClient, - body: io.BufferedReader, - filename: str, - attribution: typing.Optional[str], - preview: typing.Optional[bool], -): - """ - Uploads a temporary media item. If the media item isn't persisted within 1 hour, the item will be deleted. - - If multiple resources are attributed to, usage will be attributed to the first one in the list. - - The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`. - Third-party applications using this endpoint via OAuth2 must request the following operation scopes: `api:ontologies-read api:ontologies-write`. - - """ - result = client.media_sets.MediaSet.upload_media( - body=body.read(), - filename=filename, - attribution=attribution, - preview=preview, - ) - click.echo(repr(result)) - - -@cli.group("models") -def models(): - pass - - -@models.group("model") -def models_model(): - pass - - -@models_model.command("create") -@click.option("--name", type=str, required=True, help="""""") -@click.option("--parent_folder_rid", type=str, required=True, help="""""") -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def models_model_op_create( - client: FoundryClient, - name: str, - parent_folder_rid: str, - preview: typing.Optional[bool], -): - """ - Creates a new Model with no versions. - """ - result = client.models.Model.create( - name=name, - parent_folder_rid=parent_folder_rid, - preview=preview, - ) - click.echo(repr(result)) - - -@models_model.command("get") -@click.argument("model_rid", type=str, required=True) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def models_model_op_get( - client: FoundryClient, - model_rid: str, - preview: typing.Optional[bool], -): - """ - Retrieves a Model by its Resource Identifier (RID). - """ - result = client.models.Model.get( - model_rid=model_rid, - preview=preview, - ) - click.echo(repr(result)) - - -@models_model.group("model_version") -def models_model_model_version(): - pass - - -@models_model_model_version.command("create") -@click.argument("model_rid", type=str, required=True) -@click.option("--backing_repositories", type=str, required=True, help="""""") -@click.option("--conda_requirements", type=str, required=True, help="""""") -@click.option("--model_api", type=str, required=True, help="""""") -@click.option("--model_files", type=str, required=True, help="""""") -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def models_model_model_version_op_create( - client: FoundryClient, - model_rid: str, - backing_repositories: str, - conda_requirements: str, - model_api: str, - model_files: str, - preview: typing.Optional[bool], -): - """ - Creates a new Model Version on an existing model. - """ - result = client.models.Model.Version.create( - model_rid=model_rid, - backing_repositories=json.loads(backing_repositories), - conda_requirements=json.loads(conda_requirements), - model_api=json.loads(model_api), - model_files=json.loads(model_files), - preview=preview, - ) - click.echo(repr(result)) - - -@models_model_model_version.command("get") -@click.argument("model_rid", type=str, required=True) -@click.argument("model_version_rid", type=str, required=True) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def models_model_model_version_op_get( - client: FoundryClient, - model_rid: str, - model_version_rid: str, - preview: typing.Optional[bool], -): - """ - Retrieves a Model Version by its Resource Identifier (RID). - """ - result = client.models.Model.Version.get( - model_rid=model_rid, - model_version_rid=model_version_rid, - preview=preview, - ) - click.echo(repr(result)) - - -@models_model_model_version.command("list") -@click.argument("model_rid", type=str, required=True) -@click.option( - "--page_size", type=int, required=False, help="""The page size to use for the endpoint.""" -) -@click.option( - "--page_token", - type=str, - required=False, - help="""The page token indicates where to start paging. This should be omitted from the first page's request. -To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response -and use it to populate the `pageToken` field of the next request.""", -) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def models_model_model_version_op_list( - client: FoundryClient, - model_rid: str, - page_size: typing.Optional[int], - page_token: typing.Optional[str], - preview: typing.Optional[bool], -): - """ - Lists all Model Versions for a given Model. - """ - result = client.models.Model.Version.list( - model_rid=model_rid, - page_size=page_size, - page_token=page_token, - preview=preview, - ) - click.echo(repr(result)) - - -@cli.group("ontologies") -def ontologies(): - pass - - -@ontologies.group("time_series_value_bank_property") -def ontologies_time_series_value_bank_property(): - pass - - -@ontologies_time_series_value_bank_property.command("get_latest_value") -@click.argument("ontology", type=str, required=True) -@click.argument("object_type", type=str, required=True) -@click.argument("primary_key", type=str, required=True) -@click.argument("property_name", type=str, required=True) -@click.option( - "--sdk_package_rid", - type=str, - required=False, - help="""The package rid of the generated SDK. -""", -) -@click.option( - "--sdk_version", - type=str, - required=False, - help="""The version of the generated SDK. -""", -) -@click.pass_obj -def ontologies_time_series_value_bank_property_op_get_latest_value( - client: FoundryClient, - ontology: str, - object_type: str, - primary_key: str, - property_name: str, - sdk_package_rid: typing.Optional[str], - sdk_version: typing.Optional[str], -): - """ - Get the latest value of a property backed by a timeseries. If a specific geotime series integration has both a history and a live integration, we will give precedence to the live integration. - - """ - result = client.ontologies.TimeSeriesValueBankProperty.get_latest_value( - ontology=ontology, - object_type=object_type, - primary_key=primary_key, - property_name=property_name, - sdk_package_rid=sdk_package_rid, - sdk_version=sdk_version, - ) - click.echo(repr(result)) - - -@ontologies_time_series_value_bank_property.command("stream_values") -@click.argument("ontology", type=str, required=True) -@click.argument("object_type", type=str, required=True) -@click.argument("primary_key", type=str, required=True) -@click.argument("property", type=str, required=True) -@click.option("--range", type=str, required=False, help="""""") -@click.option( - "--sdk_package_rid", - type=str, - required=False, - help="""The package rid of the generated SDK. -""", -) -@click.option( - "--sdk_version", - type=str, - required=False, - help="""The version of the generated SDK. -""", -) -@click.pass_obj -def ontologies_time_series_value_bank_property_op_stream_values( - client: FoundryClient, - ontology: str, - object_type: str, - primary_key: str, - property: str, - range: typing.Optional[str], - sdk_package_rid: typing.Optional[str], - sdk_version: typing.Optional[str], -): - """ - Stream all of the points of a time series property (this includes geotime series references). - - """ - result = client.ontologies.TimeSeriesValueBankProperty.stream_values( - ontology=ontology, - object_type=object_type, - primary_key=primary_key, - property=property, - range=None if range is None else json.loads(range), - sdk_package_rid=sdk_package_rid, - sdk_version=sdk_version, - ) - click.echo(result) - - -@ontologies.group("time_series_property_v2") -def ontologies_time_series_property_v2(): - pass - - -@ontologies_time_series_property_v2.command("get_first_point") -@click.argument("ontology", type=str, required=True) -@click.argument("object_type", type=str, required=True) -@click.argument("primary_key", type=str, required=True) -@click.argument("property", type=str, required=True) -@click.option( - "--sdk_package_rid", - type=str, - required=False, - help="""The package rid of the generated SDK. -""", -) -@click.option( - "--sdk_version", - type=str, - required=False, - help="""The version of the generated SDK. -""", -) -@click.pass_obj -def ontologies_time_series_property_v2_op_get_first_point( - client: FoundryClient, - ontology: str, - object_type: str, - primary_key: str, - property: str, - sdk_package_rid: typing.Optional[str], - sdk_version: typing.Optional[str], -): - """ - Get the first point of a time series property. - - """ - result = client.ontologies.TimeSeriesPropertyV2.get_first_point( - ontology=ontology, - object_type=object_type, - primary_key=primary_key, - property=property, - sdk_package_rid=sdk_package_rid, - sdk_version=sdk_version, - ) - click.echo(repr(result)) - - -@ontologies_time_series_property_v2.command("get_last_point") -@click.argument("ontology", type=str, required=True) -@click.argument("object_type", type=str, required=True) -@click.argument("primary_key", type=str, required=True) -@click.argument("property", type=str, required=True) -@click.option( - "--sdk_package_rid", - type=str, - required=False, - help="""The package rid of the generated SDK. -""", -) -@click.option( - "--sdk_version", - type=str, - required=False, - help="""The version of the generated SDK. -""", -) -@click.pass_obj -def ontologies_time_series_property_v2_op_get_last_point( - client: FoundryClient, - ontology: str, - object_type: str, - primary_key: str, - property: str, - sdk_package_rid: typing.Optional[str], - sdk_version: typing.Optional[str], -): - """ - Get the last point of a time series property. - - """ - result = client.ontologies.TimeSeriesPropertyV2.get_last_point( - ontology=ontology, - object_type=object_type, - primary_key=primary_key, - property=property, - sdk_package_rid=sdk_package_rid, - sdk_version=sdk_version, - ) - click.echo(repr(result)) - - -@ontologies_time_series_property_v2.command("stream_points") -@click.argument("ontology", type=str, required=True) -@click.argument("object_type", type=str, required=True) -@click.argument("primary_key", type=str, required=True) -@click.argument("property", type=str, required=True) -@click.option("--aggregate", type=str, required=False, help="""""") -@click.option( - "--format", - type=click.Choice(["JSON", "ARROW"]), - required=False, - help="""The output format to serialize the output binary stream in. Default is -JSON. ARROW is more efficient than JSON at streaming a large sized response. -""", -) -@click.option("--range", type=str, required=False, help="""""") -@click.option( - "--sdk_package_rid", - type=str, - required=False, - help="""The package rid of the generated SDK. -""", -) -@click.option( - "--sdk_version", - type=str, - required=False, - help="""The version of the generated SDK. -""", -) -@click.pass_obj -def ontologies_time_series_property_v2_op_stream_points( - client: FoundryClient, - ontology: str, - object_type: str, - primary_key: str, - property: str, - aggregate: typing.Optional[str], - format: typing.Optional[typing.Literal["JSON", "ARROW"]], - range: typing.Optional[str], - sdk_package_rid: typing.Optional[str], - sdk_version: typing.Optional[str], -): - """ - Stream all of the points of a time series property. - - """ - result = client.ontologies.TimeSeriesPropertyV2.stream_points( - ontology=ontology, - object_type=object_type, - primary_key=primary_key, - property=property, - aggregate=None if aggregate is None else json.loads(aggregate), - format=format, - range=None if range is None else json.loads(range), - sdk_package_rid=sdk_package_rid, - sdk_version=sdk_version, - ) - click.echo(result) - - -@ontologies.group("query") -def ontologies_query(): - pass - - -@ontologies_query.command("execute") -@click.argument("ontology", type=str, required=True) -@click.argument("query_api_name", type=str, required=True) -@click.option("--parameters", type=str, required=True, help="""""") -@click.option( - "--attribution", - type=str, - required=False, - help="""The Attribution to be used when executing this request. -""", -) -@click.option( - "--sdk_package_rid", - type=str, - required=False, - help="""The package rid of the generated SDK. -""", -) -@click.option( - "--sdk_version", - type=str, - required=False, - help="""The version of the generated SDK. -""", -) -@click.option( - "--trace_parent", - type=str, - required=False, - help="""The W3C trace parent header included in the request. -""", -) -@click.option( - "--trace_state", - type=str, - required=False, - help="""The W3C trace state header included in the request. -""", -) -@click.option( - "--transaction_id", - type=str, - required=False, - help="""The ID of an Ontology transaction to read from. -Transactions are an experimental feature and all workflows may not be supported. -""", -) -@click.option( - "--version", - type=str, - required=False, - help="""The version of the Query to execute. -""", -) -@click.pass_obj -def ontologies_query_op_execute( - client: FoundryClient, - ontology: str, - query_api_name: str, - parameters: str, - attribution: typing.Optional[str], - sdk_package_rid: typing.Optional[str], - sdk_version: typing.Optional[str], - trace_parent: typing.Optional[str], - trace_state: typing.Optional[str], - transaction_id: typing.Optional[str], - version: typing.Optional[str], -): - """ - Executes a Query using the given parameters. By default, the latest version of the Query is executed. - - Optional parameters do not need to be supplied. - - """ - result = client.ontologies.Query.execute( - ontology=ontology, - query_api_name=query_api_name, - parameters=json.loads(parameters), - attribution=attribution, - sdk_package_rid=sdk_package_rid, - sdk_version=sdk_version, - trace_parent=trace_parent, - trace_state=trace_state, - transaction_id=transaction_id, - version=version, - ) - click.echo(repr(result)) - - -@ontologies.group("ontology_value_type") -def ontologies_ontology_value_type(): - pass - - -@ontologies_ontology_value_type.command("get") -@click.argument("ontology", type=str, required=True) -@click.argument("value_type", type=str, required=True) -@click.option( - "--preview", - type=bool, - required=False, - help="""A boolean flag that, when set to true, enables the use of beta features in preview mode. -""", -) -@click.pass_obj -def ontologies_ontology_value_type_op_get( - client: FoundryClient, - ontology: str, - value_type: str, - preview: typing.Optional[bool], -): - """ - Gets a specific value type with the given API name. - - """ - result = client.ontologies.OntologyValueType.get( - ontology=ontology, - value_type=value_type, - preview=preview, - ) - click.echo(repr(result)) - - -@ontologies_ontology_value_type.command("list") -@click.argument("ontology", type=str, required=True) -@click.option( - "--preview", - type=bool, - required=False, - help="""A boolean flag that, when set to true, enables the use of beta features in preview mode. -""", -) -@click.pass_obj -def ontologies_ontology_value_type_op_list( - client: FoundryClient, - ontology: str, - preview: typing.Optional[bool], -): - """ - Lists the latest versions of the value types for the given Ontology. - - """ - result = client.ontologies.OntologyValueType.list( - ontology=ontology, - preview=preview, - ) - click.echo(repr(result)) - - -@ontologies.group("ontology_transaction") -def ontologies_ontology_transaction(): - pass - - -@ontologies_ontology_transaction.command("post_edits") -@click.argument("ontology", type=str, required=True) -@click.argument("transaction_id", type=str, required=True) -@click.option("--edits", type=str, required=True, help="""""") -@click.option( - "--preview", - type=bool, - required=False, - help="""A boolean flag that, when set to true, enables the use of beta features in preview mode. -""", -) -@click.pass_obj -def ontologies_ontology_transaction_op_post_edits( - client: FoundryClient, - ontology: str, - transaction_id: str, - edits: str, - preview: typing.Optional[bool], -): - """ - Applies a set of edits to a transaction in order. - - """ - result = client.ontologies.OntologyTransaction.post_edits( - ontology=ontology, - transaction_id=transaction_id, - edits=json.loads(edits), - preview=preview, - ) - click.echo(repr(result)) - - -@ontologies.group("ontology_object_set") -def ontologies_ontology_object_set(): - pass - - -@ontologies_ontology_object_set.command("aggregate") -@click.argument("ontology", type=str, required=True) -@click.option("--aggregation", type=str, required=True, help="""""") -@click.option("--group_by", type=str, required=True, help="""""") -@click.option("--object_set", type=str, required=True, help="""""") -@click.option( - "--accuracy", - type=click.Choice(["REQUIRE_ACCURATE", "ALLOW_APPROXIMATE"]), - required=False, - help="""""", -) -@click.option( - "--branch", - type=str, - required=False, - help="""The Foundry branch to aggregate the objects from. If not specified, the default branch is used. -Branches are an experimental feature and not all workflows are supported. -""", -) -@click.option("--include_compute_usage", type=bool, required=False, help="""""") -@click.option( - "--sdk_package_rid", - type=str, - required=False, - help="""The package rid of the generated SDK. -""", -) -@click.option( - "--sdk_version", - type=str, - required=False, - help="""The package version of the generated SDK. -""", -) -@click.option( - "--transaction_id", - type=str, - required=False, - help="""The ID of an Ontology transaction to read from. -Transactions are an experimental feature and all workflows may not be supported. -""", -) -@click.pass_obj -def ontologies_ontology_object_set_op_aggregate( - client: FoundryClient, - ontology: str, - aggregation: str, - group_by: str, - object_set: str, - accuracy: typing.Optional[typing.Literal["REQUIRE_ACCURATE", "ALLOW_APPROXIMATE"]], - branch: typing.Optional[str], - include_compute_usage: typing.Optional[bool], - sdk_package_rid: typing.Optional[str], - sdk_version: typing.Optional[str], - transaction_id: typing.Optional[str], -): - """ - Aggregates the ontology objects present in the `ObjectSet` from the provided object set definition. - - """ - result = client.ontologies.OntologyObjectSet.aggregate( - ontology=ontology, - aggregation=json.loads(aggregation), - group_by=json.loads(group_by), - object_set=json.loads(object_set), - accuracy=accuracy, - branch=branch, - include_compute_usage=include_compute_usage, - sdk_package_rid=sdk_package_rid, - sdk_version=sdk_version, - transaction_id=transaction_id, - ) - click.echo(repr(result)) - - -@ontologies_ontology_object_set.command("create_temporary") -@click.argument("ontology", type=str, required=True) -@click.option("--object_set", type=str, required=True, help="""""") -@click.option( - "--sdk_package_rid", - type=str, - required=False, - help="""The package rid of the generated SDK. -""", -) -@click.option( - "--sdk_version", - type=str, - required=False, - help="""The package version of the generated SDK. -""", -) -@click.pass_obj -def ontologies_ontology_object_set_op_create_temporary( - client: FoundryClient, - ontology: str, - object_set: str, - sdk_package_rid: typing.Optional[str], - sdk_version: typing.Optional[str], -): - """ - Creates a temporary `ObjectSet` from the given definition. This `ObjectSet` expires after one hour. - - """ - result = client.ontologies.OntologyObjectSet.create_temporary( - ontology=ontology, - object_set=json.loads(object_set), - sdk_package_rid=sdk_package_rid, - sdk_version=sdk_version, - ) - click.echo(repr(result)) - - -@ontologies_ontology_object_set.command("get") -@click.argument("ontology", type=str, required=True) -@click.argument("object_set_rid", type=str, required=True) -@click.pass_obj -def ontologies_ontology_object_set_op_get( - client: FoundryClient, - ontology: str, - object_set_rid: str, -): - """ - Gets the definition of the `ObjectSet` with the given RID. - - """ - result = client.ontologies.OntologyObjectSet.get( - ontology=ontology, - object_set_rid=object_set_rid, - ) - click.echo(repr(result)) - - -@ontologies_ontology_object_set.command("load") -@click.argument("ontology", type=str, required=True) -@click.option("--object_set", type=str, required=True, help="""""") -@click.option("--select", type=str, required=True, help="""""") -@click.option( - "--select_v2", - type=str, - required=True, - help="""The identifiers of the properties to include in the response. Only selectV2 or select should be populated, -but not both. -""", -) -@click.option( - "--branch", - type=str, - required=False, - help="""The Foundry branch to load the object set from. If not specified, the default branch is used. -Branches are an experimental feature and not all workflows are supported. -""", -) -@click.option( - "--exclude_rid", - type=bool, - required=False, - help="""A flag to exclude the retrieval of the `__rid` property. -Setting this to true may improve performance of this endpoint for object types in OSV2. -""", -) -@click.option("--include_compute_usage", type=bool, required=False, help="""""") -@click.option("--order_by", type=str, required=False, help="""""") -@click.option("--page_size", type=int, required=False, help="""""") -@click.option("--page_token", type=str, required=False, help="""""") -@click.option( - "--sdk_package_rid", - type=str, - required=False, - help="""The package rid of the generated SDK. -""", -) -@click.option( - "--sdk_version", - type=str, - required=False, - help="""The package version of the generated SDK. -""", -) -@click.option( - "--snapshot", - type=bool, - required=False, - help="""A flag to use snapshot consistency when paging. -Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. -Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. -This defaults to false if not specified, which means you will always get the latest results. -""", -) -@click.option( - "--transaction_id", - type=str, - required=False, - help="""The ID of an Ontology transaction to read from. -Transactions are an experimental feature and all workflows may not be supported. -""", -) -@click.pass_obj -def ontologies_ontology_object_set_op_load( - client: FoundryClient, - ontology: str, - object_set: str, - select: str, - select_v2: str, - branch: typing.Optional[str], - exclude_rid: typing.Optional[bool], - include_compute_usage: typing.Optional[bool], - order_by: typing.Optional[str], - page_size: typing.Optional[int], - page_token: typing.Optional[str], - sdk_package_rid: typing.Optional[str], - sdk_version: typing.Optional[str], - snapshot: typing.Optional[bool], - transaction_id: typing.Optional[str], -): - """ - Load the ontology objects present in the `ObjectSet` from the provided object set definition. - - For Object Storage V1 backed objects, this endpoint returns a maximum of 10,000 objects. After 10,000 objects have been returned and if more objects - are available, attempting to load another page will result in an `ObjectsExceededLimit` error being returned. There is no limit on Object Storage V2 backed objects. - - Note that null value properties will not be returned. - - Vector properties will not be returned unless included in the `select` parameter. - - """ - result = client.ontologies.OntologyObjectSet.load( - ontology=ontology, - object_set=json.loads(object_set), - select=json.loads(select), - select_v2=json.loads(select_v2), - branch=branch, - exclude_rid=exclude_rid, - include_compute_usage=include_compute_usage, - order_by=None if order_by is None else json.loads(order_by), - page_size=page_size, - page_token=page_token, - sdk_package_rid=sdk_package_rid, - sdk_version=sdk_version, - snapshot=snapshot, - transaction_id=transaction_id, - ) - click.echo(repr(result)) - - -@ontologies_ontology_object_set.command("load_links") -@click.argument("ontology", type=str, required=True) -@click.option("--links", type=str, required=True, help="""""") -@click.option("--object_set", type=str, required=True, help="""""") -@click.option( - "--branch", - type=str, - required=False, - help="""The Foundry branch to aggregate the objects from. If not specified, the default branch is used. -Branches are an experimental feature and not all workflows are supported. -""", -) -@click.option("--include_compute_usage", type=bool, required=False, help="""""") -@click.option("--page_token", type=str, required=False, help="""""") -@click.option( - "--preview", - type=bool, - required=False, - help="""A boolean flag that, when set to true, enables the use of beta features in preview mode. -""", -) -@click.option( - "--sdk_package_rid", - type=str, - required=False, - help="""The package rid of the generated SDK. -""", -) -@click.option( - "--sdk_version", - type=str, - required=False, - help="""The package version of the generated SDK. -""", -) -@click.pass_obj -def ontologies_ontology_object_set_op_load_links( - client: FoundryClient, - ontology: str, - links: str, - object_set: str, - branch: typing.Optional[str], - include_compute_usage: typing.Optional[bool], - page_token: typing.Optional[str], - preview: typing.Optional[bool], - sdk_package_rid: typing.Optional[str], - sdk_version: typing.Optional[str], -): - """ - Loads the specified links from the defined object set. - - Links are defined as a link type API name and object locators for the source and target objects - where only the `__primaryKey` and `__apiName` properties are loaded. - - Links are grouped by source object locator; however, the links for a given source object may be - split over multiple entries with the same source object locator. - - Please keep these limitations in mind: - - Links returned may be stale. For example, primary keys returned by this endpoint may not exist anymore. - - This endpoint requests links for 1,000 objects at a time. If, for any page of 1,000 objects, there are more - than 100,000 links present, results are limited to 100,000 links and should be considered partial. - - This endpoint does not support OSv1 links and will return an error if links provided are backed by OSv1. - - This endpoint currently does not support interface object sets or interface links, but support will be added in the near future. - - """ - result = client.ontologies.OntologyObjectSet.load_links( - ontology=ontology, - links=json.loads(links), - object_set=json.loads(object_set), - branch=branch, - include_compute_usage=include_compute_usage, - page_token=page_token, - preview=preview, - sdk_package_rid=sdk_package_rid, - sdk_version=sdk_version, - ) - click.echo(repr(result)) - - -@ontologies_ontology_object_set.command("load_multiple_object_types") -@click.argument("ontology", type=str, required=True) -@click.option("--object_set", type=str, required=True, help="""""") -@click.option("--select", type=str, required=True, help="""""") -@click.option( - "--select_v2", - type=str, - required=True, - help="""The identifiers of the properties to include in the response. Only selectV2 or select should be populated, -but not both. -""", -) -@click.option( - "--branch", - type=str, - required=False, - help="""The Foundry branch to load the object set for multiple object types. If not specified, the default branch is used. -Branches are an experimental feature and not all workflows are supported. -""", -) -@click.option( - "--exclude_rid", - type=bool, - required=False, - help="""A flag to exclude the retrieval of the `$rid` property. -Setting this to true may improve performance of this endpoint for object types in OSV2. -""", -) -@click.option("--include_compute_usage", type=bool, required=False, help="""""") -@click.option("--order_by", type=str, required=False, help="""""") -@click.option("--page_size", type=int, required=False, help="""""") -@click.option("--page_token", type=str, required=False, help="""""") -@click.option( - "--preview", - type=bool, - required=False, - help="""A boolean flag that, when set to true, enables the use of beta features in preview mode. -""", -) -@click.option( - "--sdk_package_rid", - type=str, - required=False, - help="""The package rid of the generated SDK. -""", -) -@click.option( - "--sdk_version", - type=str, - required=False, - help="""The package version of the generated SDK. -""", -) -@click.option( - "--snapshot", - type=bool, - required=False, - help="""A flag to use snapshot consistency when paging. -Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. -Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. -This defaults to false if not specified, which means you will always get the latest results. -""", -) -@click.option( - "--transaction_id", - type=str, - required=False, - help="""The ID of an Ontology transaction to read from. -Transactions are an experimental feature and all workflows may not be supported. -""", -) -@click.pass_obj -def ontologies_ontology_object_set_op_load_multiple_object_types( - client: FoundryClient, - ontology: str, - object_set: str, - select: str, - select_v2: str, - branch: typing.Optional[str], - exclude_rid: typing.Optional[bool], - include_compute_usage: typing.Optional[bool], - order_by: typing.Optional[str], - page_size: typing.Optional[int], - page_token: typing.Optional[str], - preview: typing.Optional[bool], - sdk_package_rid: typing.Optional[str], - sdk_version: typing.Optional[str], - snapshot: typing.Optional[bool], - transaction_id: typing.Optional[str], -): - """ - Load the ontology objects present in the `ObjectSet` from the provided object set definition. The resulting - objects may be scoped to an object type, in which all the selected properties on the object type are returned, or scoped - to an interface, in which only the object type properties that implement the properties of any interfaces in its - scope are returned. For objects that are scoped to an interface in the result, a mapping from interface to - object implementation is returned in order to interpret the objects as the interfaces that they implement. - - For Object Storage V1 backed objects, this endpoint returns a maximum of 10,000 objects. After 10,000 objects have been returned and if more objects - are available, attempting to load another page will result in an `ObjectsExceededLimit` error being returned. There is no limit on Object Storage V2 backed objects. - - Note that null value properties will not be returned. In addition, property metadata (rid, apiName, and primaryKey) - will be prefixed with '$' instead of '__' as is the case in `loadObjects`. - - Vector properties will not be returned unless included in the `select` parameter. - - """ - result = client.ontologies.OntologyObjectSet.load_multiple_object_types( - ontology=ontology, - object_set=json.loads(object_set), - select=json.loads(select), - select_v2=json.loads(select_v2), - branch=branch, - exclude_rid=exclude_rid, - include_compute_usage=include_compute_usage, - order_by=None if order_by is None else json.loads(order_by), - page_size=page_size, - page_token=page_token, - preview=preview, - sdk_package_rid=sdk_package_rid, - sdk_version=sdk_version, - snapshot=snapshot, - transaction_id=transaction_id, - ) - click.echo(repr(result)) - - -@ontologies_ontology_object_set.command("load_objects_or_interfaces") -@click.argument("ontology", type=str, required=True) -@click.option("--object_set", type=str, required=True, help="""""") -@click.option("--select", type=str, required=True, help="""""") -@click.option( - "--select_v2", - type=str, - required=True, - help="""The identifiers of the properties to include in the response. Only selectV2 or select should be populated, -but not both. -""", -) -@click.option( - "--branch", - type=str, - required=False, - help="""The Foundry branch to load the objects or interfaces from. If not specified, the default branch is used. -Branches are an experimental feature and not all workflows are supported. -""", -) -@click.option( - "--exclude_rid", - type=bool, - required=False, - help="""A flag to exclude the retrieval of the `$rid` property. -Setting this to true may improve performance of this endpoint for object types in OSV2. -""", -) -@click.option("--order_by", type=str, required=False, help="""""") -@click.option("--page_size", type=int, required=False, help="""""") -@click.option("--page_token", type=str, required=False, help="""""") -@click.option( - "--preview", - type=bool, - required=False, - help="""A boolean flag that, when set to true, enables the use of beta features in preview mode. -""", -) -@click.option( - "--sdk_package_rid", - type=str, - required=False, - help="""The package rid of the generated SDK. -""", -) -@click.option( - "--sdk_version", - type=str, - required=False, - help="""The package version of the generated SDK. -""", -) -@click.option( - "--snapshot", - type=bool, - required=False, - help="""A flag to use snapshot consistency when paging. -Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. -Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. -This defaults to false if not specified, which means you will always get the latest results. -""", -) -@click.pass_obj -def ontologies_ontology_object_set_op_load_objects_or_interfaces( - client: FoundryClient, - ontology: str, - object_set: str, - select: str, - select_v2: str, - branch: typing.Optional[str], - exclude_rid: typing.Optional[bool], - order_by: typing.Optional[str], - page_size: typing.Optional[int], - page_token: typing.Optional[str], - preview: typing.Optional[bool], - sdk_package_rid: typing.Optional[str], - sdk_version: typing.Optional[str], - snapshot: typing.Optional[bool], -): - """ - Load the ontology objects present in the `ObjectSet` from the provided object set definition. If the requested - object set contains interfaces and the object can be viewed as an interface, it will contain the properties - defined by the interface. If not, it will contain the properties defined by its object type. This allows directly - loading all objects of an interface where all objects are viewed as the interface, for example. - - Note that the result object set cannot contain a mix of objects with "interface" properties and "object type" - properties. Attempting to load an object set like this will result in an error. - - For Object Storage V1 backed objects, this endpoint returns a maximum of 10,000 objects. After 10,000 objects have been returned and if more objects - are available, attempting to load another page will result in an `ObjectsExceededLimit` error being returned. There is no limit on Object Storage V2 backed objects. - - Note that null value properties will not be returned. In addition, property metadata (rid, apiName, and primaryKey) - will be prefixed with '$' instead of '__' as is the case in `/loadObjects`. - - Vector properties will not be returned unless included in the `select` parameter. - - """ - result = client.ontologies.OntologyObjectSet.load_objects_or_interfaces( - ontology=ontology, - object_set=json.loads(object_set), - select=json.loads(select), - select_v2=json.loads(select_v2), - branch=branch, - exclude_rid=exclude_rid, - order_by=None if order_by is None else json.loads(order_by), - page_size=page_size, - page_token=page_token, - preview=preview, - sdk_package_rid=sdk_package_rid, - sdk_version=sdk_version, - snapshot=snapshot, - ) - click.echo(repr(result)) - - -@ontologies.group("ontology_object") -def ontologies_ontology_object(): - pass - - -@ontologies_ontology_object.command("aggregate") -@click.argument("ontology", type=str, required=True) -@click.argument("object_type", type=str, required=True) -@click.option("--aggregation", type=str, required=True, help="""""") -@click.option("--group_by", type=str, required=True, help="""""") -@click.option( - "--accuracy", - type=click.Choice(["REQUIRE_ACCURATE", "ALLOW_APPROXIMATE"]), - required=False, - help="""""", -) -@click.option( - "--branch", - type=str, - required=False, - help="""The Foundry branch to aggregate objects from. If not specified, the default branch will be used. -Branches are an experimental feature and not all workflows are supported. -""", -) -@click.option( - "--sdk_package_rid", - type=str, - required=False, - help="""The package rid of the generated SDK. -""", -) -@click.option( - "--sdk_version", - type=str, - required=False, - help="""The version of the generated SDK. -""", -) -@click.option("--where", type=str, required=False, help="""""") -@click.pass_obj -def ontologies_ontology_object_op_aggregate( - client: FoundryClient, - ontology: str, - object_type: str, - aggregation: str, - group_by: str, - accuracy: typing.Optional[typing.Literal["REQUIRE_ACCURATE", "ALLOW_APPROXIMATE"]], - branch: typing.Optional[str], - sdk_package_rid: typing.Optional[str], - sdk_version: typing.Optional[str], - where: typing.Optional[str], -): - """ - Perform functions on object fields in the specified ontology and object type. - - """ - result = client.ontologies.OntologyObject.aggregate( - ontology=ontology, - object_type=object_type, - aggregation=json.loads(aggregation), - group_by=json.loads(group_by), - accuracy=accuracy, - branch=branch, - sdk_package_rid=sdk_package_rid, - sdk_version=sdk_version, - where=None if where is None else json.loads(where), - ) - click.echo(repr(result)) - - -@ontologies_ontology_object.command("count") -@click.argument("ontology", type=str, required=True) -@click.argument("object_type", type=str, required=True) -@click.option( - "--branch", - type=str, - required=False, - help="""The Foundry branch to count the objects from. If not specified, the default branch is used. -Branches are an experimental feature and not all workflows are supported. -""", -) -@click.option( - "--sdk_package_rid", - type=str, - required=False, - help="""The package rid of the generated SDK. -""", -) -@click.option( - "--sdk_version", - type=str, - required=False, - help="""The package version of the generated SDK. -""", -) -@click.pass_obj -def ontologies_ontology_object_op_count( - client: FoundryClient, - ontology: str, - object_type: str, - branch: typing.Optional[str], - sdk_package_rid: typing.Optional[str], - sdk_version: typing.Optional[str], -): - """ - Returns a count of the objects of the given object type. - - """ - result = client.ontologies.OntologyObject.count( - ontology=ontology, - object_type=object_type, - branch=branch, - sdk_package_rid=sdk_package_rid, - sdk_version=sdk_version, - ) - click.echo(repr(result)) - - -@ontologies_ontology_object.command("get") -@click.argument("ontology", type=str, required=True) -@click.argument("object_type", type=str, required=True) -@click.argument("primary_key", type=str, required=True) -@click.option( - "--branch", - type=str, - required=False, - help="""The Foundry branch to get the object from. If not specified, the default branch is used. -Branches are an experimental feature and not all workflows are supported. -""", -) -@click.option( - "--exclude_rid", - type=bool, - required=False, - help="""A flag to exclude the retrieval of the `__rid` property. -Setting this to true may improve performance of this endpoint for object types in OSV2. -""", -) -@click.option( - "--sdk_package_rid", - type=str, - required=False, - help="""The package rid of the generated SDK. -""", -) -@click.option( - "--sdk_version", - type=str, - required=False, - help="""The version of the generated SDK. -""", -) -@click.option( - "--select", - type=str, - required=False, - help="""The properties of the object type that should be included in the response. Omit this parameter to get all -the properties. -""", -) -@click.pass_obj -def ontologies_ontology_object_op_get( - client: FoundryClient, - ontology: str, - object_type: str, - primary_key: str, - branch: typing.Optional[str], - exclude_rid: typing.Optional[bool], - sdk_package_rid: typing.Optional[str], - sdk_version: typing.Optional[str], - select: typing.Optional[str], -): - """ - Gets a specific object with the given primary key. - - """ - result = client.ontologies.OntologyObject.get( - ontology=ontology, - object_type=object_type, - primary_key=primary_key, - branch=branch, - exclude_rid=exclude_rid, - sdk_package_rid=sdk_package_rid, - sdk_version=sdk_version, - select=None if select is None else json.loads(select), - ) - click.echo(repr(result)) - - -@ontologies_ontology_object.command("list") -@click.argument("ontology", type=str, required=True) -@click.argument("object_type", type=str, required=True) -@click.option( - "--branch", - type=str, - required=False, - help="""The Foundry branch to list objects from. If not specified, the default branch will be used. -Branches are an experimental feature and not all workflows are supported. -""", -) -@click.option( - "--exclude_rid", - type=bool, - required=False, - help="""A flag to exclude the retrieval of the `__rid` property. -Setting this to true may improve performance of this endpoint for object types in OSV2. -""", -) -@click.option("--order_by", type=str, required=False, help="""""") -@click.option( - "--page_size", - type=int, - required=False, - help="""The desired size of the page to be returned. Defaults to 1,000. -See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. -""", -) -@click.option("--page_token", type=str, required=False, help="""""") -@click.option( - "--sdk_package_rid", - type=str, - required=False, - help="""The package rid of the generated SDK. -""", -) -@click.option( - "--sdk_version", - type=str, - required=False, - help="""The version of the generated SDK. -""", -) -@click.option( - "--select", - type=str, - required=False, - help="""The properties of the object type that should be included in the response. Omit this parameter to get all -the properties. -""", -) -@click.option( - "--snapshot", - type=bool, - required=False, - help="""A flag to use snapshot consistency when paging. -Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. -Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. -This defaults to false if not specified, which means you will always get the latest results. -""", -) -@click.pass_obj -def ontologies_ontology_object_op_list( - client: FoundryClient, - ontology: str, - object_type: str, - branch: typing.Optional[str], - exclude_rid: typing.Optional[bool], - order_by: typing.Optional[str], - page_size: typing.Optional[int], - page_token: typing.Optional[str], - sdk_package_rid: typing.Optional[str], - sdk_version: typing.Optional[str], - select: typing.Optional[str], - snapshot: typing.Optional[bool], -): - """ - Lists the objects for the given Ontology and object type. - - Note that this endpoint does not guarantee consistency. Changes to the data could result in missing or - repeated objects in the response pages. - - For Object Storage V1 backed objects, this endpoint returns a maximum of 10,000 objects. After 10,000 objects have been returned and if more objects - are available, attempting to load another page will result in an `ObjectsExceededLimit` error being returned. There is no limit on Object Storage V2 backed objects. - - Each page may be smaller or larger than the requested page size. However, it - is guaranteed that if there are more results available, at least one result will be present - in the response. - - Note that null value properties will not be returned. - - """ - result = client.ontologies.OntologyObject.list( - ontology=ontology, - object_type=object_type, - branch=branch, - exclude_rid=exclude_rid, - order_by=order_by, - page_size=page_size, - page_token=page_token, - sdk_package_rid=sdk_package_rid, - sdk_version=sdk_version, - select=None if select is None else json.loads(select), - snapshot=snapshot, - ) - click.echo(repr(result)) - - -@ontologies_ontology_object.command("search") -@click.argument("ontology", type=str, required=True) -@click.argument("object_type", type=str, required=True) -@click.option( - "--select", - type=str, - required=True, - help="""The API names of the object type properties to include in the response. -""", -) -@click.option( - "--select_v2", - type=str, - required=True, - help="""The identifiers of the properties to include in the response. Only selectV2 or select should be populated, -but not both. -""", -) -@click.option( - "--branch", - type=str, - required=False, - help="""The Foundry branch to search objects from. If not specified, the default branch will be used. -Branches are an experimental feature and not all workflows are supported. -""", -) -@click.option( - "--exclude_rid", - type=bool, - required=False, - help="""A flag to exclude the retrieval of the `__rid` property. -Setting this to true may improve performance of this endpoint for object types in OSV2. -""", -) -@click.option("--order_by", type=str, required=False, help="""""") -@click.option("--page_size", type=int, required=False, help="""""") -@click.option("--page_token", type=str, required=False, help="""""") -@click.option( - "--sdk_package_rid", - type=str, - required=False, - help="""The package rid of the generated SDK. -""", -) -@click.option( - "--sdk_version", - type=str, - required=False, - help="""The version of the generated SDK. -""", -) -@click.option( - "--snapshot", - type=bool, - required=False, - help="""A flag to use snapshot consistency when paging. -Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. -Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. -This defaults to false if not specified, which means you will always get the latest results. -""", -) -@click.option("--where", type=str, required=False, help="""""") -@click.pass_obj -def ontologies_ontology_object_op_search( - client: FoundryClient, - ontology: str, - object_type: str, - select: str, - select_v2: str, - branch: typing.Optional[str], - exclude_rid: typing.Optional[bool], - order_by: typing.Optional[str], - page_size: typing.Optional[int], - page_token: typing.Optional[str], - sdk_package_rid: typing.Optional[str], - sdk_version: typing.Optional[str], - snapshot: typing.Optional[bool], - where: typing.Optional[str], -): - """ - Search for objects in the specified ontology and object type. The request body is used - to filter objects based on the specified query. The supported queries are: - - | Query type | Description | Supported Types | - |-----------------------------------------|-------------------------------------------------------------------------------------------------------------------|---------------------------------| - | lt | The provided property is less than the provided value. | number, string, date, timestamp | - | gt | The provided property is greater than the provided value. | number, string, date, timestamp | - | lte | The provided property is less than or equal to the provided value. | number, string, date, timestamp | - | gte | The provided property is greater than or equal to the provided value. | number, string, date, timestamp | - | eq | The provided property is exactly equal to the provided value. | number, string, date, timestamp | - | isNull | The provided property is (or is not) null. | all | - | contains | The provided property contains the provided value. | array | - | not | The sub-query does not match. | N/A (applied on a query) | - | and | All the sub-queries match. | N/A (applied on queries) | - | or | At least one of the sub-queries match. | N/A (applied on queries) | - | containsAllTermsInOrderPrefixLastTerm | The provided property contains all the terms provided in order. The last term can be a partial prefix match. | string | - | containsAllTermsInOrder | The provided property contains the provided term as a substring. | string | - | containsAnyTerm | The provided property contains at least one of the terms separated by whitespace. | string | - | containsAllTerms | The provided property contains all the terms separated by whitespace. | string | - | startsWith | Deprecated alias for containsAllTermsInOrderPrefixLastTerm. | string | - - Queries can be at most three levels deep. By default, terms are separated by whitespace or punctuation (`?!,:;-[](){}'"~`). Periods (`.`) on their own are ignored. - Partial terms are not matched by terms filters except where explicitly noted. - - """ - result = client.ontologies.OntologyObject.search( - ontology=ontology, - object_type=object_type, - select=json.loads(select), - select_v2=json.loads(select_v2), - branch=branch, - exclude_rid=exclude_rid, - order_by=None if order_by is None else json.loads(order_by), - page_size=page_size, - page_token=page_token, - sdk_package_rid=sdk_package_rid, - sdk_version=sdk_version, - snapshot=snapshot, - where=None if where is None else json.loads(where), - ) - click.echo(repr(result)) - - -@ontologies.group("ontology_interface") -def ontologies_ontology_interface(): - pass - - -@ontologies_ontology_interface.command("aggregate") -@click.argument("ontology", type=str, required=True) -@click.argument("interface_type", type=str, required=True) -@click.option("--aggregation", type=str, required=True, help="""""") -@click.option("--group_by", type=str, required=True, help="""""") -@click.option( - "--accuracy", - type=click.Choice(["REQUIRE_ACCURATE", "ALLOW_APPROXIMATE"]), - required=False, - help="""""", -) -@click.option( - "--branch", - type=str, - required=False, - help="""The Foundry branch to aggregate objects from. If not specified, the default branch will be used. -Branches are an experimental feature and not all workflows are supported. -""", -) -@click.option( - "--preview", - type=bool, - required=False, - help="""A boolean flag that, when set to true, enables the use of beta features in preview mode. -""", -) -@click.option("--where", type=str, required=False, help="""""") -@click.pass_obj -def ontologies_ontology_interface_op_aggregate( - client: FoundryClient, - ontology: str, - interface_type: str, - aggregation: str, - group_by: str, - accuracy: typing.Optional[typing.Literal["REQUIRE_ACCURATE", "ALLOW_APPROXIMATE"]], - branch: typing.Optional[str], - preview: typing.Optional[bool], - where: typing.Optional[str], -): - """ - :::callout{theme=warning title=Warning} - This endpoint will be removed once TS OSDK is updated to use `objectSets/aggregate` with interface object - sets. - ::: - Perform functions on object fields in the specified ontology and of the specified interface type. Any - properties specified in the query must be shared property type API names defined on the interface. - - """ - result = client.ontologies.OntologyInterface.aggregate( - ontology=ontology, - interface_type=interface_type, - aggregation=json.loads(aggregation), - group_by=json.loads(group_by), - accuracy=accuracy, - branch=branch, - preview=preview, - where=None if where is None else json.loads(where), - ) - click.echo(repr(result)) - - -@ontologies_ontology_interface.command("get") -@click.argument("ontology", type=str, required=True) -@click.argument("interface_type", type=str, required=True) -@click.option( - "--branch", - type=str, - required=False, - help="""The Foundry branch to load the interface type definition from. If not specified, the default branch will be used. -Branches are an experimental feature and not all workflows are supported. -""", -) -@click.option( - "--preview", - type=bool, - required=False, - help="""A boolean flag that, when set to true, enables the use of beta features in preview mode. -""", -) -@click.option( - "--sdk_package_rid", - type=str, - required=False, - help="""The package rid of the generated SDK. -""", -) -@click.option( - "--sdk_version", - type=str, - required=False, - help="""The version of the generated SDK. -""", -) -@click.pass_obj -def ontologies_ontology_interface_op_get( - client: FoundryClient, - ontology: str, - interface_type: str, - branch: typing.Optional[str], - preview: typing.Optional[bool], - sdk_package_rid: typing.Optional[str], - sdk_version: typing.Optional[str], -): - """ - Gets a specific interface type with the given API name. - - """ - result = client.ontologies.OntologyInterface.get( - ontology=ontology, - interface_type=interface_type, - branch=branch, - preview=preview, - sdk_package_rid=sdk_package_rid, - sdk_version=sdk_version, - ) - click.echo(repr(result)) - - -@ontologies_ontology_interface.command("get_outgoing_interface_link_type") -@click.argument("ontology", type=str, required=True) -@click.argument("interface_type", type=str, required=True) -@click.argument("interface_link_type", type=str, required=True) -@click.option( - "--branch", - type=str, - required=False, - help="""The Foundry branch to get the outgoing link types for an object type from. If not specified, the default branch will be used. -Branches are an experimental feature and not all workflows are supported. -""", -) -@click.pass_obj -def ontologies_ontology_interface_op_get_outgoing_interface_link_type( - client: FoundryClient, - ontology: str, - interface_type: str, - interface_link_type: str, - branch: typing.Optional[str], -): - """ - Get an outgoing interface link type for an interface type. - - """ - result = client.ontologies.OntologyInterface.get_outgoing_interface_link_type( - ontology=ontology, - interface_type=interface_type, - interface_link_type=interface_link_type, - branch=branch, - ) - click.echo(repr(result)) - - -@ontologies_ontology_interface.command("list") -@click.argument("ontology", type=str, required=True) -@click.option( - "--branch", - type=str, - required=False, - help="""The Foundry branch to list the interface types from. If not specified, the default branch will be used. -Branches are an experimental feature and not all workflows are supported. -""", -) -@click.option( - "--page_size", - type=int, - required=False, - help="""The desired size of the page to be returned. Defaults to 500. -See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. -""", -) -@click.option("--page_token", type=str, required=False, help="""""") -@click.option( - "--preview", - type=bool, - required=False, - help="""A boolean flag that, when set to true, enables the use of beta features in preview mode. -""", -) -@click.pass_obj -def ontologies_ontology_interface_op_list( - client: FoundryClient, - ontology: str, - branch: typing.Optional[str], - page_size: typing.Optional[int], - page_token: typing.Optional[str], - preview: typing.Optional[bool], -): - """ - Lists the interface types for the given Ontology. - - Each page may be smaller than the requested page size. However, it is guaranteed that if there are more - results available, at least one result will be present in the response. - - """ - result = client.ontologies.OntologyInterface.list( - ontology=ontology, - branch=branch, - page_size=page_size, - page_token=page_token, - preview=preview, - ) - click.echo(repr(result)) - - -@ontologies_ontology_interface.command("list_interface_linked_objects") -@click.argument("ontology", type=str, required=True) -@click.argument("interface_type", type=str, required=True) -@click.argument("object_type", type=str, required=True) -@click.argument("primary_key", type=str, required=True) -@click.argument("interface_link_type", type=str, required=True) -@click.option( - "--branch", - type=str, - required=False, - help="""The Foundry branch to get the outgoing link types for an object type from. If not specified, the default branch will be used. -Branches are an experimental feature and not all workflows are supported. -""", -) -@click.option( - "--exclude_rid", - type=bool, - required=False, - help="""A flag to exclude the retrieval of the `__rid` property. -Setting this to true may improve performance of this endpoint for object types in OSV2. -""", -) -@click.option("--order_by", type=str, required=False, help="""""") -@click.option( - "--page_size", - type=int, - required=False, - help="""The desired size of the page to be returned. Defaults to 1,000. -See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. -""", -) -@click.option("--page_token", type=str, required=False, help="""""") -@click.option( - "--preview", - type=bool, - required=False, - help="""A boolean flag that, when set to true, enables the use of beta features in preview mode. -""", -) -@click.option( - "--select", - type=str, - required=False, - help="""The properties of the object type that should be included in the response. Omit this parameter to get all -the properties. -""", -) -@click.option( - "--snapshot", - type=bool, - required=False, - help="""A flag to use snapshot consistency when paging. -Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. -Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. -This defaults to false if not specified, which means you will always get the latest results. -""", -) -@click.pass_obj -def ontologies_ontology_interface_op_list_interface_linked_objects( - client: FoundryClient, - ontology: str, - interface_type: str, - object_type: str, - primary_key: str, - interface_link_type: str, - branch: typing.Optional[str], - exclude_rid: typing.Optional[bool], - order_by: typing.Optional[str], - page_size: typing.Optional[int], - page_token: typing.Optional[str], - preview: typing.Optional[bool], - select: typing.Optional[str], - snapshot: typing.Optional[bool], -): - """ - Lists the linked objects for a specific object and the given interface link type. - - Note that this endpoint does not guarantee consistency. Changes to the data could result in missing or - repeated objects in the response pages. - - For Object Storage V1 backed objects, this endpoint returns a maximum of 10,000 objects. After 10,000 objects have been returned and if more objects - are available, attempting to load another page will result in an `ObjectsExceededLimit` error being returned. There is no limit on Object Storage V2 backed objects. - - Each page may be smaller or larger than the requested page size. However, it - is guaranteed that if there are more results available, at least one result will be present - in the response. - - Note that null value properties will not be returned. - - """ - result = client.ontologies.OntologyInterface.list_interface_linked_objects( - ontology=ontology, - interface_type=interface_type, - object_type=object_type, - primary_key=primary_key, - interface_link_type=interface_link_type, - branch=branch, - exclude_rid=exclude_rid, - order_by=order_by, - page_size=page_size, - page_token=page_token, - preview=preview, - select=None if select is None else json.loads(select), - snapshot=snapshot, - ) - click.echo(repr(result)) - - -@ontologies_ontology_interface.command("list_objects_for_interface") -@click.argument("ontology", type=str, required=True) -@click.argument("interface_type", type=str, required=True) -@click.option( - "--branch", - type=str, - required=False, - help="""The Foundry branch to list objects from. If not specified, the default branch will be used. -Branches are an experimental feature and not all workflows are supported. -""", -) -@click.option( - "--exclude_rid", - type=bool, - required=False, - help="""A flag to exclude the retrieval of the `__rid` property. -Setting this to true may improve performance of this endpoint for object types in OSV2. -""", -) -@click.option("--order_by", type=str, required=False, help="""""") -@click.option( - "--page_size", - type=int, - required=False, - help="""The desired size of the page to be returned. Defaults to 1,000. -See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. -""", -) -@click.option("--page_token", type=str, required=False, help="""""") -@click.option( - "--select", - type=str, - required=False, - help="""The properties of the interface type that should be included in the response. Omit this parameter to get all -the properties. -""", -) -@click.option( - "--snapshot", - type=bool, - required=False, - help="""A flag to use snapshot consistency when paging. -Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. -Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. -This defaults to false if not specified, which means you will always get the latest results. -""", -) -@click.pass_obj -def ontologies_ontology_interface_op_list_objects_for_interface( - client: FoundryClient, - ontology: str, - interface_type: str, - branch: typing.Optional[str], - exclude_rid: typing.Optional[bool], - order_by: typing.Optional[str], - page_size: typing.Optional[int], - page_token: typing.Optional[str], - select: typing.Optional[str], - snapshot: typing.Optional[bool], -): - """ - Lists the objects for the given Ontology and interface type. - - Note that this endpoint does not guarantee consistency, unless you use the snapshot flag specified below. Changes to the data could result in missing or - repeated objects in the response pages. - - For Object Storage V1 backed objects, this endpoint returns a maximum of 10,000 objects. After 10,000 objects have been returned and if more objects - are available, attempting to load another page will result in an `ObjectsExceededLimit` error being returned. There is no limit on Object Storage V2 backed objects. - - Each page may be smaller or larger than the requested page size. However, it - is guaranteed that if there are more results available, at least one result will be present - in the response. - - Note that null value properties will not be returned. - - """ - result = client.ontologies.OntologyInterface.list_objects_for_interface( - ontology=ontology, - interface_type=interface_type, - branch=branch, - exclude_rid=exclude_rid, - order_by=order_by, - page_size=page_size, - page_token=page_token, - select=None if select is None else json.loads(select), - snapshot=snapshot, - ) - click.echo(repr(result)) - - -@ontologies_ontology_interface.command("list_outgoing_interface_link_types") -@click.argument("ontology", type=str, required=True) -@click.argument("interface_type", type=str, required=True) -@click.option( - "--branch", - type=str, - required=False, - help="""The Foundry branch to get the outgoing link type from. If not specified, the default branch will be used. -Branches are an experimental feature and not all workflows are supported. -""", -) -@click.pass_obj -def ontologies_ontology_interface_op_list_outgoing_interface_link_types( - client: FoundryClient, - ontology: str, - interface_type: str, - branch: typing.Optional[str], -): - """ - List the outgoing interface link types for an interface type. - - """ - result = client.ontologies.OntologyInterface.list_outgoing_interface_link_types( - ontology=ontology, - interface_type=interface_type, - branch=branch, - ) - click.echo(repr(result)) - - -@ontologies_ontology_interface.command("search") -@click.argument("ontology", type=str, required=True) -@click.argument("interface_type", type=str, required=True) -@click.option( - "--augmented_interface_property_types", - type=str, - required=True, - help="""A map from interface type API name to a list of interface property type API names. For each returned object, -if the object implements an interface that is a key in the map, then we augment the response for that object -type with the list of properties specified in the value. -""", -) -@click.option( - "--augmented_properties", - type=str, - required=True, - help="""A map from object type API name to a list of property type API names. For each returned object, if the -object’s object type is a key in the map, then we augment the response for that object type with the list -of properties specified in the value. -""", -) -@click.option( - "--augmented_shared_property_types", - type=str, - required=True, - help="""A map from interface type API name to a list of shared property type API names. For each returned object, if -the object implements an interface that is a key in the map, then we augment the response for that object -type with the list of properties specified in the value. -""", -) -@click.option( - "--other_interface_types", - type=str, - required=True, - help="""A list of interface type API names. Object types must implement all the mentioned interfaces in order to be -included in the response. -""", -) -@click.option( - "--selected_interface_property_types", - type=str, - required=True, - help="""A list of interface property type API names of the interface type that should be included in the response. -Omit this parameter to include all properties of the interface type in the response. -""", -) -@click.option( - "--selected_object_types", - type=str, - required=True, - help="""A list of object type API names that should be included in the response. If non-empty, object types that are -not mentioned will not be included in the response even if they implement the specified interface. Omit the -parameter to include all object types. -""", -) -@click.option( - "--selected_shared_property_types", - type=str, - required=True, - help="""A list of shared property type API names of the interface type that should be included in the response. -Omit this parameter to include all properties of the interface type in the response. -""", -) -@click.option( - "--branch", - type=str, - required=False, - help="""The Foundry branch to search objects from. If not specified, the default branch will be used. -Branches are an experimental feature and not all workflows are supported. -""", -) -@click.option("--order_by", type=str, required=False, help="""""") -@click.option("--page_size", type=int, required=False, help="""""") -@click.option("--page_token", type=str, required=False, help="""""") -@click.option( - "--preview", - type=bool, - required=False, - help="""A boolean flag that, when set to true, enables the use of beta features in preview mode. -""", -) -@click.option("--where", type=str, required=False, help="""""") -@click.pass_obj -def ontologies_ontology_interface_op_search( - client: FoundryClient, - ontology: str, - interface_type: str, - augmented_interface_property_types: str, - augmented_properties: str, - augmented_shared_property_types: str, - other_interface_types: str, - selected_interface_property_types: str, - selected_object_types: str, - selected_shared_property_types: str, - branch: typing.Optional[str], - order_by: typing.Optional[str], - page_size: typing.Optional[int], - page_token: typing.Optional[str], - preview: typing.Optional[bool], - where: typing.Optional[str], -): - """ - :::callout{theme=warning title=Warning} - This endpoint will be removed once TS OSDK is updated to use `objectSets/loadObjects` with interface object - sets. - ::: - Search for objects in the specified ontology and interface type. Any properties specified in the "where" or - "orderBy" parameters must be shared property type API names defined on the interface. The following search - queries are supported: - - | Query type | Description | Supported Types | - |-----------------------------------------|-------------------------------------------------------------------------------------------------------------------|---------------------------------| - | lt | The provided property is less than the provided value. | number, string, date, timestamp | - | gt | The provided property is greater than the provided value. | number, string, date, timestamp | - | lte | The provided property is less than or equal to the provided value. | number, string, date, timestamp | - | gte | The provided property is greater than or equal to the provided value. | number, string, date, timestamp | - | eq | The provided property is exactly equal to the provided value. | number, string, date, timestamp | - | isNull | The provided property is (or is not) null. | all | - | contains | The provided property contains the provided value. | array | - | not | The sub-query does not match. | N/A (applied on a query) | - | and | All the sub-queries match. | N/A (applied on queries) | - | or | At least one of the sub-queries match. | N/A (applied on queries) | - | startsWith | The provided property starts with the provided term. | string | - | containsAllTermsInOrderPrefixLastTerm | The provided property contains all the terms provided in order. The last term can be a partial prefix match. | string | - | containsAllTermsInOrder | The provided property contains the provided terms as a substring. | string | - | containsAnyTerm | The provided property contains at least one of the terms separated by whitespace. | string | - | containsAllTerms | The provided property contains all the terms separated by whitespace. | string | - - Queries can be at most three levels deep. By default, terms are separated by whitespace or punctuation (`?!,:;-[](){}'"~`). Periods (`.`) on their own are ignored. - Partial terms are not matched by terms filters except where explicitly noted. - - Attempting to use an unsupported query will result in a validation error. Third-party applications using this - endpoint via OAuth2 must request the following operation scope: `api:ontologies-read`. - - """ - result = client.ontologies.OntologyInterface.search( - ontology=ontology, - interface_type=interface_type, - augmented_interface_property_types=json.loads(augmented_interface_property_types), - augmented_properties=json.loads(augmented_properties), - augmented_shared_property_types=json.loads(augmented_shared_property_types), - other_interface_types=json.loads(other_interface_types), - selected_interface_property_types=json.loads(selected_interface_property_types), - selected_object_types=json.loads(selected_object_types), - selected_shared_property_types=json.loads(selected_shared_property_types), - branch=branch, - order_by=None if order_by is None else json.loads(order_by), - page_size=page_size, - page_token=page_token, - preview=preview, - where=None if where is None else json.loads(where), - ) - click.echo(repr(result)) - - -@ontologies.group("ontology") -def ontologies_ontology(): - pass - - -@ontologies_ontology.command("get") -@click.argument("ontology", type=str, required=True) -@click.pass_obj -def ontologies_ontology_op_get( - client: FoundryClient, - ontology: str, -): - """ - Gets a specific ontology for a given Ontology API name or RID. - - """ - result = client.ontologies.Ontology.get( - ontology=ontology, - ) - click.echo(repr(result)) - - -@ontologies_ontology.command("get_full_metadata") -@click.argument("ontology", type=str, required=True) -@click.option( - "--branch", - type=str, - required=False, - help="""The Foundry branch to load metadata from. If not specified, the default branch will be used. -Branches are an experimental feature and not all workflows are supported. -""", -) -@click.pass_obj -def ontologies_ontology_op_get_full_metadata( - client: FoundryClient, - ontology: str, - branch: typing.Optional[str], -): - """ - Get the full Ontology metadata. This includes the objects, links, actions, queries, and interfaces. - This endpoint is designed to return as much metadata as possible in a single request to support OSDK workflows. - It may omit certain entities rather than fail the request. - - """ - result = client.ontologies.Ontology.get_full_metadata( - ontology=ontology, - branch=branch, - ) - click.echo(repr(result)) - - -@ontologies_ontology.command("list") -@click.pass_obj -def ontologies_ontology_op_list( - client: FoundryClient, -): - """ - Lists the Ontologies visible to the current user. - - """ - result = client.ontologies.Ontology.list() - click.echo(repr(result)) - - -@ontologies_ontology.command("load_metadata") -@click.argument("ontology", type=str, required=True) -@click.option("--action_types", type=str, required=True, help="""""") -@click.option("--interface_types", type=str, required=True, help="""""") -@click.option("--link_types", type=str, required=True, help="""""") -@click.option("--object_types", type=str, required=True, help="""""") -@click.option("--query_types", type=str, required=True, help="""""") -@click.option( - "--branch", - type=str, - required=False, - help="""The Foundry branch to load metadata from. If not specified, the default branch will be used. -Branches are an experimental feature and not all workflows are supported. -""", -) -@click.option( - "--preview", - type=bool, - required=False, - help="""A boolean flag that, when set to true, enables the use of beta features in preview mode. -""", -) -@click.pass_obj -def ontologies_ontology_op_load_metadata( - client: FoundryClient, - ontology: str, - action_types: str, - interface_types: str, - link_types: str, - object_types: str, - query_types: str, - branch: typing.Optional[str], - preview: typing.Optional[bool], -): - """ - Load Ontology metadata for the requested object, link, action, query, and interface types. - - """ - result = client.ontologies.Ontology.load_metadata( - ontology=ontology, - action_types=json.loads(action_types), - interface_types=json.loads(interface_types), - link_types=json.loads(link_types), - object_types=json.loads(object_types), - query_types=json.loads(query_types), - branch=branch, - preview=preview, - ) - click.echo(repr(result)) - - -@ontologies_ontology.group("query_type") -def ontologies_ontology_query_type(): - pass - - -@ontologies_ontology_query_type.command("get") -@click.argument("ontology", type=str, required=True) -@click.argument("query_api_name", type=str, required=True) -@click.option( - "--sdk_package_rid", - type=str, - required=False, - help="""The package rid of the generated SDK. -""", -) -@click.option( - "--sdk_version", - type=str, - required=False, - help="""The version of the generated SDK. -""", -) -@click.option( - "--version", - type=str, - required=False, - help="""The version of the Query to get. -""", -) -@click.pass_obj -def ontologies_ontology_query_type_op_get( - client: FoundryClient, - ontology: str, - query_api_name: str, - sdk_package_rid: typing.Optional[str], - sdk_version: typing.Optional[str], - version: typing.Optional[str], -): - """ - Gets a specific query type with the given API name. - - """ - result = client.ontologies.Ontology.QueryType.get( - ontology=ontology, - query_api_name=query_api_name, - sdk_package_rid=sdk_package_rid, - sdk_version=sdk_version, - version=version, - ) - click.echo(repr(result)) - - -@ontologies_ontology_query_type.command("list") -@click.argument("ontology", type=str, required=True) -@click.option( - "--page_size", - type=int, - required=False, - help="""The desired size of the page to be returned. Defaults to 100. -See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. -""", -) -@click.option("--page_token", type=str, required=False, help="""""") -@click.pass_obj -def ontologies_ontology_query_type_op_list( - client: FoundryClient, - ontology: str, - page_size: typing.Optional[int], - page_token: typing.Optional[str], -): - """ - Lists the query types for the given Ontology. - - Each page may be smaller than the requested page size. However, it is guaranteed that if there are more - results available, at least one result will be present in the response. - - """ - result = client.ontologies.Ontology.QueryType.list( - ontology=ontology, - page_size=page_size, - page_token=page_token, - ) - click.echo(repr(result)) - - -@ontologies_ontology.group("object_type") -def ontologies_ontology_object_type(): - pass - - -@ontologies_ontology_object_type.command("get") -@click.argument("ontology", type=str, required=True) -@click.argument("object_type", type=str, required=True) -@click.option( - "--branch", - type=str, - required=False, - help="""The Foundry branch to load the object type definition from. If not specified, the default branch will be used. -Branches are an experimental feature and not all workflows are supported. -""", -) -@click.pass_obj -def ontologies_ontology_object_type_op_get( - client: FoundryClient, - ontology: str, - object_type: str, - branch: typing.Optional[str], -): - """ - Gets a specific object type with the given API name. - - """ - result = client.ontologies.Ontology.ObjectType.get( - ontology=ontology, - object_type=object_type, - branch=branch, - ) - click.echo(repr(result)) - - -@ontologies_ontology_object_type.command("get_full_metadata") -@click.argument("ontology", type=str, required=True) -@click.argument("object_type", type=str, required=True) -@click.option( - "--branch", - type=str, - required=False, - help="""The Foundry branch to load the action type definition from. If not specified, the default branch will be used. -Branches are an experimental feature and not all workflows are supported. -""", -) -@click.option( - "--preview", - type=bool, - required=False, - help="""A boolean flag that, when set to true, enables the use of beta features in preview mode. -""", -) -@click.option( - "--sdk_package_rid", - type=str, - required=False, - help="""The package rid of the generated SDK. -""", -) -@click.option( - "--sdk_version", - type=str, - required=False, - help="""The version of the generated SDK. -""", -) -@click.pass_obj -def ontologies_ontology_object_type_op_get_full_metadata( - client: FoundryClient, - ontology: str, - object_type: str, - branch: typing.Optional[str], - preview: typing.Optional[bool], - sdk_package_rid: typing.Optional[str], - sdk_version: typing.Optional[str], -): - """ - Gets the full metadata for a specific object type with the given API name. - - """ - result = client.ontologies.Ontology.ObjectType.get_full_metadata( - ontology=ontology, - object_type=object_type, - branch=branch, - preview=preview, - sdk_package_rid=sdk_package_rid, - sdk_version=sdk_version, - ) - click.echo(repr(result)) - - -@ontologies_ontology_object_type.command("get_outgoing_link_type") -@click.argument("ontology", type=str, required=True) -@click.argument("object_type", type=str, required=True) -@click.argument("link_type", type=str, required=True) -@click.option( - "--branch", - type=str, - required=False, - help="""The Foundry branch to get the outgoing link types for an object type from. If not specified, the default branch will be used. -Branches are an experimental feature and not all workflows are supported. -""", -) -@click.pass_obj -def ontologies_ontology_object_type_op_get_outgoing_link_type( - client: FoundryClient, - ontology: str, - object_type: str, - link_type: str, - branch: typing.Optional[str], -): - """ - Get an outgoing link for an object type. - - """ - result = client.ontologies.Ontology.ObjectType.get_outgoing_link_type( - ontology=ontology, - object_type=object_type, - link_type=link_type, - branch=branch, - ) - click.echo(repr(result)) - - -@ontologies_ontology_object_type.command("list") -@click.argument("ontology", type=str, required=True) -@click.option( - "--branch", - type=str, - required=False, - help="""The Foundry branch to list the object types from. If not specified, the default branch will be used. -Branches are an experimental feature and not all workflows are supported. -""", -) -@click.option( - "--page_size", - type=int, - required=False, - help="""The desired size of the page to be returned. Defaults to 500. -See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. -""", -) -@click.option("--page_token", type=str, required=False, help="""""") -@click.pass_obj -def ontologies_ontology_object_type_op_list( - client: FoundryClient, - ontology: str, - branch: typing.Optional[str], - page_size: typing.Optional[int], - page_token: typing.Optional[str], -): - """ - Lists the object types for the given Ontology. - - Each page may be smaller or larger than the requested page size. However, it is guaranteed that if there are - more results available, at least one result will be present in the - response. - - """ - result = client.ontologies.Ontology.ObjectType.list( - ontology=ontology, - branch=branch, - page_size=page_size, - page_token=page_token, - ) - click.echo(repr(result)) - - -@ontologies_ontology_object_type.command("list_outgoing_link_types") -@click.argument("ontology", type=str, required=True) -@click.argument("object_type", type=str, required=True) -@click.option( - "--branch", - type=str, - required=False, - help="""The Foundry branch to load the outgoing link types from. If not specified, the default branch will be used. -Branches are an experimental feature and not all workflows are supported. -""", -) -@click.option( - "--page_size", type=int, required=False, help="""The desired size of the page to be returned.""" -) -@click.option("--page_token", type=str, required=False, help="""""") -@click.pass_obj -def ontologies_ontology_object_type_op_list_outgoing_link_types( - client: FoundryClient, - ontology: str, - object_type: str, - branch: typing.Optional[str], - page_size: typing.Optional[int], - page_token: typing.Optional[str], -): - """ - List the outgoing links for an object type. - - """ - result = client.ontologies.Ontology.ObjectType.list_outgoing_link_types( - ontology=ontology, - object_type=object_type, - branch=branch, - page_size=page_size, - page_token=page_token, - ) - click.echo(repr(result)) - - -@ontologies_ontology.group("action_type") -def ontologies_ontology_action_type(): - pass - - -@ontologies_ontology_action_type.command("get") -@click.argument("ontology", type=str, required=True) -@click.argument("action_type", type=str, required=True) -@click.option( - "--branch", - type=str, - required=False, - help="""The Foundry branch to load the action type definition from. If not specified, the default branch will be used. -Branches are an experimental feature and not all workflows are supported. -""", -) -@click.pass_obj -def ontologies_ontology_action_type_op_get( - client: FoundryClient, - ontology: str, - action_type: str, - branch: typing.Optional[str], -): - """ - Gets a specific action type with the given API name. - - """ - result = client.ontologies.Ontology.ActionType.get( - ontology=ontology, - action_type=action_type, - branch=branch, - ) - click.echo(repr(result)) - - -@ontologies_ontology_action_type.command("get_by_rid") -@click.argument("ontology", type=str, required=True) -@click.argument("action_type_rid", type=str, required=True) -@click.option( - "--branch", - type=str, - required=False, - help="""The Foundry branch to load the action type definition from. If not specified, the default branch will be used. -Branches are an experimental feature and not all workflows are supported. -""", -) -@click.pass_obj -def ontologies_ontology_action_type_op_get_by_rid( - client: FoundryClient, - ontology: str, - action_type_rid: str, - branch: typing.Optional[str], -): - """ - Gets a specific action type with the given RID. - - """ - result = client.ontologies.Ontology.ActionType.get_by_rid( - ontology=ontology, - action_type_rid=action_type_rid, - branch=branch, - ) - click.echo(repr(result)) - - -@ontologies_ontology_action_type.command("list") -@click.argument("ontology", type=str, required=True) -@click.option( - "--branch", - type=str, - required=False, - help="""The Foundry branch to list the action types from. If not specified, the default branch will be used. -Branches are an experimental feature and not all workflows are supported. -""", -) -@click.option( - "--page_size", - type=int, - required=False, - help="""The desired size of the page to be returned. Defaults to 500. -See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. -""", -) -@click.option("--page_token", type=str, required=False, help="""""") -@click.pass_obj -def ontologies_ontology_action_type_op_list( - client: FoundryClient, - ontology: str, - branch: typing.Optional[str], - page_size: typing.Optional[int], - page_token: typing.Optional[str], -): - """ - Lists the action types for the given Ontology. - - Each page may be smaller than the requested page size. However, it is guaranteed that if there are more - results available, at least one result will be present in the response. - - """ - result = client.ontologies.Ontology.ActionType.list( - ontology=ontology, - branch=branch, - page_size=page_size, - page_token=page_token, - ) - click.echo(repr(result)) - - -@ontologies.group("media_reference_property") -def ontologies_media_reference_property(): - pass - - -@ontologies_media_reference_property.command("get_media_content") -@click.argument("ontology", type=str, required=True) -@click.argument("object_type", type=str, required=True) -@click.argument("primary_key", type=str, required=True) -@click.argument("property", type=str, required=True) -@click.option( - "--preview", - type=bool, - required=False, - help="""A boolean flag that, when set to true, enables the use of beta features in preview mode. -""", -) -@click.option( - "--sdk_package_rid", - type=str, - required=False, - help="""The package rid of the generated SDK. -""", -) -@click.option( - "--sdk_version", - type=str, - required=False, - help="""The version of the generated SDK. -""", -) -@click.pass_obj -def ontologies_media_reference_property_op_get_media_content( - client: FoundryClient, - ontology: str, - object_type: str, - primary_key: str, - property: str, - preview: typing.Optional[bool], - sdk_package_rid: typing.Optional[str], - sdk_version: typing.Optional[str], -): - """ - Gets the content of a media item referenced by this property. - - """ - result = client.ontologies.MediaReferenceProperty.get_media_content( - ontology=ontology, - object_type=object_type, - primary_key=primary_key, - property=property, - preview=preview, - sdk_package_rid=sdk_package_rid, - sdk_version=sdk_version, - ) - click.echo(result) - - -@ontologies_media_reference_property.command("get_media_metadata") -@click.argument("ontology", type=str, required=True) -@click.argument("object_type", type=str, required=True) -@click.argument("primary_key", type=str, required=True) -@click.argument("property", type=str, required=True) -@click.option( - "--preview", - type=bool, - required=False, - help="""A boolean flag that, when set to true, enables the use of beta features in preview mode. -""", -) -@click.option( - "--sdk_package_rid", - type=str, - required=False, - help="""The package rid of the generated SDK. -""", -) -@click.option( - "--sdk_version", - type=str, - required=False, - help="""The version of the generated SDK. -""", -) -@click.pass_obj -def ontologies_media_reference_property_op_get_media_metadata( - client: FoundryClient, - ontology: str, - object_type: str, - primary_key: str, - property: str, - preview: typing.Optional[bool], - sdk_package_rid: typing.Optional[str], - sdk_version: typing.Optional[str], -): - """ - Gets metadata about the media item referenced by this property. - - """ - result = client.ontologies.MediaReferenceProperty.get_media_metadata( - ontology=ontology, - object_type=object_type, - primary_key=primary_key, - property=property, - preview=preview, - sdk_package_rid=sdk_package_rid, - sdk_version=sdk_version, - ) - click.echo(repr(result)) - - -@ontologies_media_reference_property.command("upload") -@click.argument("ontology", type=str, required=True) -@click.argument("object_type", type=str, required=True) -@click.argument("property", type=str, required=True) -@click.argument("body", type=click.File("rb"), required=True) -@click.option( - "--media_item_path", - type=str, - required=False, - help="""A path for the media item within its backing media set. Required if the backing media set requires paths. -""", -) -@click.option( - "--preview", - type=bool, - required=False, - help="""A boolean flag that, when set to true, enables the use of beta features in preview mode. -""", -) -@click.pass_obj -def ontologies_media_reference_property_op_upload( - client: FoundryClient, - ontology: str, - object_type: str, - property: str, - body: io.BufferedReader, - media_item_path: typing.Optional[str], - preview: typing.Optional[bool], -): - """ - Uploads a media item to the media set which backs the specified property. The property must be backed by a single media set and branch, otherwise an error will be thrown. - The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`. - - """ - result = client.ontologies.MediaReferenceProperty.upload( - ontology=ontology, - object_type=object_type, - property=property, - body=body.read(), - media_item_path=media_item_path, - preview=preview, - ) - click.echo(repr(result)) - - -@ontologies.group("linked_object") -def ontologies_linked_object(): - pass - - -@ontologies_linked_object.command("get_linked_object") -@click.argument("ontology", type=str, required=True) -@click.argument("object_type", type=str, required=True) -@click.argument("primary_key", type=str, required=True) -@click.argument("link_type", type=str, required=True) -@click.argument("linked_object_primary_key", type=str, required=True) -@click.option( - "--branch", - type=str, - required=False, - help="""The Foundry branch to load the object set for multiple object types. If not specified, the default branch is used. -Branches are an experimental feature and not all workflows are supported. -""", -) -@click.option( - "--exclude_rid", - type=bool, - required=False, - help="""A flag to exclude the retrieval of the `__rid` property. -Setting this to true may improve performance of this endpoint for object types in OSV2. -""", -) -@click.option( - "--sdk_package_rid", - type=str, - required=False, - help="""The package rid of the generated SDK. -""", -) -@click.option( - "--sdk_version", - type=str, - required=False, - help="""The version of the generated SDK. -""", -) -@click.option( - "--select", - type=str, - required=False, - help="""The properties of the object type that should be included in the response. Omit this parameter to get all -the properties. -""", -) -@click.pass_obj -def ontologies_linked_object_op_get_linked_object( - client: FoundryClient, - ontology: str, - object_type: str, - primary_key: str, - link_type: str, - linked_object_primary_key: str, - branch: typing.Optional[str], - exclude_rid: typing.Optional[bool], - sdk_package_rid: typing.Optional[str], - sdk_version: typing.Optional[str], - select: typing.Optional[str], -): - """ - Get a specific linked object that originates from another object. - - If there is no link between the two objects, `LinkedObjectNotFound` is thrown. - - """ - result = client.ontologies.LinkedObject.get_linked_object( - ontology=ontology, - object_type=object_type, - primary_key=primary_key, - link_type=link_type, - linked_object_primary_key=linked_object_primary_key, - branch=branch, - exclude_rid=exclude_rid, - sdk_package_rid=sdk_package_rid, - sdk_version=sdk_version, - select=None if select is None else json.loads(select), - ) - click.echo(repr(result)) - - -@ontologies_linked_object.command("list_linked_objects") -@click.argument("ontology", type=str, required=True) -@click.argument("object_type", type=str, required=True) -@click.argument("primary_key", type=str, required=True) -@click.argument("link_type", type=str, required=True) -@click.option( - "--branch", - type=str, - required=False, - help="""The Foundry branch to list linked objects from. If not specified, the default branch will be used. -Branches are an experimental feature and not all workflows are supported. -""", -) -@click.option( - "--exclude_rid", - type=bool, - required=False, - help="""A flag to exclude the retrieval of the `__rid` property. -Setting this to true may improve performance of this endpoint for object types in OSV2. -""", -) -@click.option("--order_by", type=str, required=False, help="""""") -@click.option( - "--page_size", - type=int, - required=False, - help="""The desired size of the page to be returned. Defaults to 1,000. -See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. -""", -) -@click.option("--page_token", type=str, required=False, help="""""") -@click.option( - "--sdk_package_rid", - type=str, - required=False, - help="""The package rid of the generated SDK. -""", -) -@click.option( - "--sdk_version", - type=str, - required=False, - help="""The version of the generated SDK. -""", -) -@click.option( - "--select", - type=str, - required=False, - help="""The properties of the object type that should be included in the response. Omit this parameter to get all -the properties. -""", -) -@click.option( - "--snapshot", - type=bool, - required=False, - help="""A flag to use snapshot consistency when paging. -Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. -Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. -This defaults to false if not specified, which means you will always get the latest results. -""", -) -@click.pass_obj -def ontologies_linked_object_op_list_linked_objects( - client: FoundryClient, - ontology: str, - object_type: str, - primary_key: str, - link_type: str, - branch: typing.Optional[str], - exclude_rid: typing.Optional[bool], - order_by: typing.Optional[str], - page_size: typing.Optional[int], - page_token: typing.Optional[str], - sdk_package_rid: typing.Optional[str], - sdk_version: typing.Optional[str], - select: typing.Optional[str], - snapshot: typing.Optional[bool], -): - """ - Lists the linked objects for a specific object and the given link type. - - Note that this endpoint does not guarantee consistency. Changes to the data could result in missing or - repeated objects in the response pages. - - For Object Storage V1 backed objects, this endpoint returns a maximum of 10,000 objects. After 10,000 objects have been returned and if more objects - are available, attempting to load another page will result in an `ObjectsExceededLimit` error being returned. There is no limit on Object Storage V2 backed objects. - - Each page may be smaller or larger than the requested page size. However, it - is guaranteed that if there are more results available, at least one result will be present - in the response. - - Note that null value properties will not be returned. - - """ - result = client.ontologies.LinkedObject.list_linked_objects( - ontology=ontology, - object_type=object_type, - primary_key=primary_key, - link_type=link_type, - branch=branch, - exclude_rid=exclude_rid, - order_by=order_by, - page_size=page_size, - page_token=page_token, - sdk_package_rid=sdk_package_rid, - sdk_version=sdk_version, - select=None if select is None else json.loads(select), - snapshot=snapshot, - ) - click.echo(repr(result)) - - -@ontologies.group("cipher_text_property") -def ontologies_cipher_text_property(): - pass - - -@ontologies_cipher_text_property.command("decrypt") -@click.argument("ontology", type=str, required=True) -@click.argument("object_type", type=str, required=True) -@click.argument("primary_key", type=str, required=True) -@click.argument("property", type=str, required=True) -@click.pass_obj -def ontologies_cipher_text_property_op_decrypt( - client: FoundryClient, - ontology: str, - object_type: str, - primary_key: str, - property: str, -): - """ - Decrypt the value of a ciphertext property. - - """ - result = client.ontologies.CipherTextProperty.decrypt( - ontology=ontology, - object_type=object_type, - primary_key=primary_key, - property=property, - ) - click.echo(repr(result)) - - -@ontologies.group("attachment_property") -def ontologies_attachment_property(): - pass - - -@ontologies_attachment_property.command("get_attachment") -@click.argument("ontology", type=str, required=True) -@click.argument("object_type", type=str, required=True) -@click.argument("primary_key", type=str, required=True) -@click.argument("property", type=str, required=True) -@click.option( - "--sdk_package_rid", - type=str, - required=False, - help="""The package rid of the generated SDK. -""", -) -@click.option( - "--sdk_version", - type=str, - required=False, - help="""The version of the generated SDK. -""", -) -@click.pass_obj -def ontologies_attachment_property_op_get_attachment( - client: FoundryClient, - ontology: str, - object_type: str, - primary_key: str, - property: str, - sdk_package_rid: typing.Optional[str], - sdk_version: typing.Optional[str], -): - """ - Get the metadata of attachments parented to the given object. - - """ - result = client.ontologies.AttachmentProperty.get_attachment( - ontology=ontology, - object_type=object_type, - primary_key=primary_key, - property=property, - sdk_package_rid=sdk_package_rid, - sdk_version=sdk_version, - ) - click.echo(repr(result)) - - -@ontologies_attachment_property.command("get_attachment_by_rid") -@click.argument("ontology", type=str, required=True) -@click.argument("object_type", type=str, required=True) -@click.argument("primary_key", type=str, required=True) -@click.argument("property", type=str, required=True) -@click.argument("attachment_rid", type=str, required=True) -@click.option( - "--sdk_package_rid", - type=str, - required=False, - help="""The package rid of the generated SDK. -""", -) -@click.option( - "--sdk_version", - type=str, - required=False, - help="""The version of the generated SDK. -""", -) -@click.pass_obj -def ontologies_attachment_property_op_get_attachment_by_rid( - client: FoundryClient, - ontology: str, - object_type: str, - primary_key: str, - property: str, - attachment_rid: str, - sdk_package_rid: typing.Optional[str], - sdk_version: typing.Optional[str], -): - """ - Get the metadata of a particular attachment in an attachment list. - - """ - result = client.ontologies.AttachmentProperty.get_attachment_by_rid( - ontology=ontology, - object_type=object_type, - primary_key=primary_key, - property=property, - attachment_rid=attachment_rid, - sdk_package_rid=sdk_package_rid, - sdk_version=sdk_version, - ) - click.echo(repr(result)) - - -@ontologies_attachment_property.command("read_attachment") -@click.argument("ontology", type=str, required=True) -@click.argument("object_type", type=str, required=True) -@click.argument("primary_key", type=str, required=True) -@click.argument("property", type=str, required=True) -@click.option( - "--sdk_package_rid", - type=str, - required=False, - help="""The package rid of the generated SDK. -""", -) -@click.option( - "--sdk_version", - type=str, - required=False, - help="""The version of the generated SDK. -""", -) -@click.pass_obj -def ontologies_attachment_property_op_read_attachment( - client: FoundryClient, - ontology: str, - object_type: str, - primary_key: str, - property: str, - sdk_package_rid: typing.Optional[str], - sdk_version: typing.Optional[str], -): - """ - Get the content of an attachment. - - """ - result = client.ontologies.AttachmentProperty.read_attachment( - ontology=ontology, - object_type=object_type, - primary_key=primary_key, - property=property, - sdk_package_rid=sdk_package_rid, - sdk_version=sdk_version, - ) - click.echo(result) - - -@ontologies_attachment_property.command("read_attachment_by_rid") -@click.argument("ontology", type=str, required=True) -@click.argument("object_type", type=str, required=True) -@click.argument("primary_key", type=str, required=True) -@click.argument("property", type=str, required=True) -@click.argument("attachment_rid", type=str, required=True) -@click.option( - "--sdk_package_rid", - type=str, - required=False, - help="""The package rid of the generated SDK. -""", -) -@click.option( - "--sdk_version", - type=str, - required=False, - help="""The version of the generated SDK. -""", -) -@click.pass_obj -def ontologies_attachment_property_op_read_attachment_by_rid( - client: FoundryClient, - ontology: str, - object_type: str, - primary_key: str, - property: str, - attachment_rid: str, - sdk_package_rid: typing.Optional[str], - sdk_version: typing.Optional[str], -): - """ - Get the content of an attachment by its RID. - - The RID must exist in the attachment array of the property. - - """ - result = client.ontologies.AttachmentProperty.read_attachment_by_rid( - ontology=ontology, - object_type=object_type, - primary_key=primary_key, - property=property, - attachment_rid=attachment_rid, - sdk_package_rid=sdk_package_rid, - sdk_version=sdk_version, - ) - click.echo(result) - - -@ontologies.group("attachment") -def ontologies_attachment(): - pass - - -@ontologies_attachment.command("get") -@click.argument("attachment_rid", type=str, required=True) -@click.pass_obj -def ontologies_attachment_op_get( - client: FoundryClient, - attachment_rid: str, -): - """ - Get the metadata of an attachment. - - """ - result = client.ontologies.Attachment.get( - attachment_rid=attachment_rid, - ) - click.echo(repr(result)) - - -@ontologies_attachment.command("read") -@click.argument("attachment_rid", type=str, required=True) -@click.pass_obj -def ontologies_attachment_op_read( - client: FoundryClient, - attachment_rid: str, -): - """ - Get the content of an attachment. - - """ - result = client.ontologies.Attachment.read( - attachment_rid=attachment_rid, - ) - click.echo(result) - - -@ontologies_attachment.command("upload") -@click.argument("body", type=click.File("rb"), required=True) -@click.option( - "--content_length", - type=int, - required=True, - help="""The size in bytes of the file content being uploaded.""", -) -@click.option( - "--content_type", type=str, required=True, help="""The media type of the file being uploaded.""" -) -@click.option( - "--filename", type=str, required=True, help="""The name of the file being uploaded.""" -) -@click.pass_obj -def ontologies_attachment_op_upload( - client: FoundryClient, - body: io.BufferedReader, - content_length: int, - content_type: str, - filename: str, -): - """ - Upload an attachment to use in an action. Any attachment which has not been linked to an object via - an action within one hour after upload will be removed. - Previously mapped attachments which are not connected to any object anymore are also removed on - a biweekly basis. - The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`. - - """ - result = client.ontologies.Attachment.upload( - body=body.read(), - content_length=content_length, - content_type=content_type, - filename=filename, - ) - click.echo(repr(result)) - - -@ontologies_attachment.command("upload_with_rid") -@click.argument("attachment_rid", type=str, required=True) -@click.argument("body", type=click.File("rb"), required=True) -@click.option( - "--content_length", - type=int, - required=True, - help="""The size in bytes of the file content being uploaded.""", -) -@click.option( - "--content_type", type=str, required=True, help="""The media type of the file being uploaded.""" -) -@click.option( - "--filename", type=str, required=True, help="""The name of the file being uploaded.""" -) -@click.option( - "--preview", - type=bool, - required=False, - help="""A boolean flag that, when set to true, enables the use of beta features in preview mode. -""", -) -@click.pass_obj -def ontologies_attachment_op_upload_with_rid( - client: FoundryClient, - attachment_rid: str, - body: io.BufferedReader, - content_length: int, - content_type: str, - filename: str, - preview: typing.Optional[bool], -): - """ - This endpoint is identical to `/v2/ontologies/attachments/upload` but additionally accepts a previously - generated `AttachmentRid`. - - """ - result = client.ontologies.Attachment.upload_with_rid( - attachment_rid=attachment_rid, - body=body.read(), - content_length=content_length, - content_type=content_type, - filename=filename, - preview=preview, - ) - click.echo(repr(result)) - - -@ontologies.group("action_type_full_metadata") -def ontologies_action_type_full_metadata(): - pass - - -@ontologies_action_type_full_metadata.command("get") -@click.argument("ontology", type=str, required=True) -@click.argument("action_type", type=str, required=True) -@click.option( - "--branch", - type=str, - required=False, - help="""The Foundry branch to load the action type definition from. If not specified, the default branch will be used. -""", -) -@click.pass_obj -def ontologies_action_type_full_metadata_op_get( - client: FoundryClient, - ontology: str, - action_type: str, - branch: typing.Optional[str], -): - """ - Gets the full metadata associated with an action type. - - """ - result = client.ontologies.ActionTypeFullMetadata.get( - ontology=ontology, - action_type=action_type, - branch=branch, - ) - click.echo(repr(result)) - - -@ontologies_action_type_full_metadata.command("list") -@click.argument("ontology", type=str, required=True) -@click.option( - "--branch", - type=str, - required=False, - help="""The Foundry branch to list the action types from. If not specified, the default branch will be used. -Branches are an experimental feature and not all workflows are supported. -""", -) -@click.option( - "--page_size", - type=int, - required=False, - help="""The desired size of the page to be returned. Defaults to 500. -See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. -""", -) -@click.option("--page_token", type=str, required=False, help="""""") -@click.pass_obj -def ontologies_action_type_full_metadata_op_list( - client: FoundryClient, - ontology: str, - branch: typing.Optional[str], - page_size: typing.Optional[int], - page_token: typing.Optional[str], -): - """ - Lists the action types (with full metadata) for the given Ontology. - - Each page may be smaller than the requested page size. However, it is guaranteed that if there are more - results available, at least one result will be present in the response. - - """ - result = client.ontologies.ActionTypeFullMetadata.list( - ontology=ontology, - branch=branch, - page_size=page_size, - page_token=page_token, - ) - click.echo(repr(result)) - - -@ontologies.group("action") -def ontologies_action(): - pass - - -@ontologies_action.command("apply") -@click.argument("ontology", type=str, required=True) -@click.argument("action", type=str, required=True) -@click.option("--parameters", type=str, required=True, help="""""") -@click.option( - "--branch", - type=str, - required=False, - help="""The Foundry branch to apply the action against. If not specified, the default branch is used. -Branches are an experimental feature and not all workflows are supported. -""", -) -@click.option("--options", type=str, required=False, help="""""") -@click.option( - "--sdk_package_rid", - type=str, - required=False, - help="""The package rid of the generated SDK. -""", -) -@click.option( - "--sdk_version", - type=str, - required=False, - help="""The version of the generated SDK. -""", -) -@click.pass_obj -def ontologies_action_op_apply( - client: FoundryClient, - ontology: str, - action: str, - parameters: str, - branch: typing.Optional[str], - options: typing.Optional[str], - sdk_package_rid: typing.Optional[str], - sdk_version: typing.Optional[str], -): - """ - Applies an action using the given parameters. - - Changes to objects or links stored in Object Storage V1 are eventually consistent and may take some time to be visible. - Edits to objects or links in Object Storage V2 will be visible immediately after the action completes. - - Note that a 200 HTTP status code only indicates that the request was received and processed by the server. - See the validation result in the response body to determine if the action was applied successfully. - - Note that [parameter default values](https://palantir.com/docs/foundry/action-types/parameters-default-value/) are not currently supported by - this endpoint. - - """ - result = client.ontologies.Action.apply( - ontology=ontology, - action=action, - parameters=json.loads(parameters), - branch=branch, - options=None if options is None else json.loads(options), - sdk_package_rid=sdk_package_rid, - sdk_version=sdk_version, - ) - click.echo(repr(result)) - - -@ontologies_action.command("apply_batch") -@click.argument("ontology", type=str, required=True) -@click.argument("action", type=str, required=True) -@click.option("--requests", type=str, required=True, help="""""") -@click.option( - "--branch", - type=str, - required=False, - help="""The Foundry branch to apply the action against. If not specified, the default branch is used. -Branches are an experimental feature and not all workflows are supported. -""", -) -@click.option("--options", type=str, required=False, help="""""") -@click.option( - "--sdk_package_rid", - type=str, - required=False, - help="""The package rid of the generated SDK. -""", -) -@click.option( - "--sdk_version", - type=str, - required=False, - help="""The version of the generated SDK. -""", -) -@click.pass_obj -def ontologies_action_op_apply_batch( - client: FoundryClient, - ontology: str, - action: str, - requests: str, - branch: typing.Optional[str], - options: typing.Optional[str], - sdk_package_rid: typing.Optional[str], - sdk_version: typing.Optional[str], -): - """ - Applies multiple actions (of the same Action Type) using the given parameters. - - Changes to objects or links stored in Object Storage V1 are eventually consistent and may take some time to be visible. - Edits to objects or links in Object Storage V2 will be visible immediately after the action completes. - - Up to 20 actions may be applied in one call. Actions that only modify objects in Object Storage v2 and do not - call Functions may receive a higher limit. - - Note that [notifications](https://palantir.com/docs/foundry/action-types/notifications/) are not currently supported by this endpoint. - - """ - result = client.ontologies.Action.apply_batch( - ontology=ontology, - action=action, - requests=json.loads(requests), - branch=branch, - options=None if options is None else json.loads(options), - sdk_package_rid=sdk_package_rid, - sdk_version=sdk_version, - ) - click.echo(repr(result)) - - -@ontologies_action.command("apply_with_overrides") -@click.argument("ontology", type=str, required=True) -@click.argument("action", type=str, required=True) -@click.option("--overrides", type=str, required=True, help="""""") -@click.option("--request", type=str, required=True, help="""""") -@click.option( - "--branch", - type=str, - required=False, - help="""The Foundry branch to apply the action against. If not specified, the default branch is used. -Branches are an experimental feature and not all workflows are supported. -""", -) -@click.option( - "--sdk_package_rid", - type=str, - required=False, - help="""The package rid of the generated SDK. -""", -) -@click.option( - "--sdk_version", - type=str, - required=False, - help="""The version of the generated SDK. -""", -) -@click.pass_obj -def ontologies_action_op_apply_with_overrides( - client: FoundryClient, - ontology: str, - action: str, - overrides: str, - request: str, - branch: typing.Optional[str], - sdk_package_rid: typing.Optional[str], - sdk_version: typing.Optional[str], -): - """ - Same as regular apply action operation, but allows specifying overrides for UniqueIdentifier and - CurrentTime generated action parameters. - - """ - result = client.ontologies.Action.apply_with_overrides( - ontology=ontology, - action=action, - overrides=json.loads(overrides), - request=json.loads(request), - branch=branch, - sdk_package_rid=sdk_package_rid, - sdk_version=sdk_version, - ) - click.echo(repr(result)) - - -@cli.group("orchestration") -def orchestration(): - pass - - -@orchestration.group("schedule_version") -def orchestration_schedule_version(): - pass - - -@orchestration_schedule_version.command("get") -@click.argument("schedule_version_rid", type=str, required=True) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def orchestration_schedule_version_op_get( - client: FoundryClient, - schedule_version_rid: str, - preview: typing.Optional[bool], -): - """ - Get the ScheduleVersion with the specified rid. - """ - result = client.orchestration.ScheduleVersion.get( - schedule_version_rid=schedule_version_rid, - preview=preview, - ) - click.echo(repr(result)) - - -@orchestration_schedule_version.command("schedule") -@click.argument("schedule_version_rid", type=str, required=True) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def orchestration_schedule_version_op_schedule( - client: FoundryClient, - schedule_version_rid: str, - preview: typing.Optional[bool], -): - """ """ - result = client.orchestration.ScheduleVersion.schedule( - schedule_version_rid=schedule_version_rid, - preview=preview, - ) - click.echo(repr(result)) - - -@orchestration.group("schedule_run") -def orchestration_schedule_run(): - pass - - -@orchestration.group("schedule") -def orchestration_schedule(): - pass - - -@orchestration_schedule.command("create") -@click.option("--action", type=str, required=True, help="""""") -@click.option("--description", type=str, required=False, help="""""") -@click.option("--display_name", type=str, required=False, help="""""") -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.option("--scope_mode", type=str, required=False, help="""""") -@click.option( - "--trigger", - type=str, - required=False, - help="""The schedule trigger. If the requesting user does not have -permission to see the trigger, this will be empty. -""", -) -@click.pass_obj -def orchestration_schedule_op_create( - client: FoundryClient, - action: str, - description: typing.Optional[str], - display_name: typing.Optional[str], - preview: typing.Optional[bool], - scope_mode: typing.Optional[str], - trigger: typing.Optional[str], -): - """ - Creates a new Schedule. - """ - result = client.orchestration.Schedule.create( - action=json.loads(action), - description=description, - display_name=display_name, - preview=preview, - scope_mode=None if scope_mode is None else json.loads(scope_mode), - trigger=None if trigger is None else json.loads(trigger), - ) - click.echo(repr(result)) - - -@orchestration_schedule.command("delete") -@click.argument("schedule_rid", type=str, required=True) -@click.pass_obj -def orchestration_schedule_op_delete( - client: FoundryClient, - schedule_rid: str, -): - """ - Delete the Schedule with the specified rid. - """ - result = client.orchestration.Schedule.delete( - schedule_rid=schedule_rid, - ) - click.echo(repr(result)) - - -@orchestration_schedule.command("get") -@click.argument("schedule_rid", type=str, required=True) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def orchestration_schedule_op_get( - client: FoundryClient, - schedule_rid: str, - preview: typing.Optional[bool], -): - """ - Get the Schedule with the specified rid. - """ - result = client.orchestration.Schedule.get( - schedule_rid=schedule_rid, - preview=preview, - ) - click.echo(repr(result)) - - -@orchestration_schedule.command("get_affected_resources") -@click.argument("schedule_rid", type=str, required=True) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def orchestration_schedule_op_get_affected_resources( - client: FoundryClient, - schedule_rid: str, - preview: typing.Optional[bool], -): - """ """ - result = client.orchestration.Schedule.get_affected_resources( - schedule_rid=schedule_rid, - preview=preview, - ) - click.echo(repr(result)) - - -@orchestration_schedule.command("get_batch") -@click.argument("body", type=str, required=True) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def orchestration_schedule_op_get_batch( - client: FoundryClient, - body: str, - preview: typing.Optional[bool], -): - """ - Fetch multiple schedules in a single request. Schedules not found or inaccessible to the user will be - omitted from the response. - - - The maximum batch size for this endpoint is 1000. - """ - result = client.orchestration.Schedule.get_batch( - body=json.loads(body), - preview=preview, - ) - click.echo(repr(result)) - - -@orchestration_schedule.command("pause") -@click.argument("schedule_rid", type=str, required=True) -@click.pass_obj -def orchestration_schedule_op_pause( - client: FoundryClient, - schedule_rid: str, -): - """ """ - result = client.orchestration.Schedule.pause( - schedule_rid=schedule_rid, - ) - click.echo(repr(result)) - - -@orchestration_schedule.command("replace") -@click.argument("schedule_rid", type=str, required=True) -@click.option("--action", type=str, required=True, help="""""") -@click.option("--description", type=str, required=False, help="""""") -@click.option("--display_name", type=str, required=False, help="""""") -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.option("--scope_mode", type=str, required=False, help="""""") -@click.option( - "--trigger", - type=str, - required=False, - help="""The schedule trigger. If the requesting user does not have -permission to see the trigger, this will be empty. -""", -) -@click.pass_obj -def orchestration_schedule_op_replace( - client: FoundryClient, - schedule_rid: str, - action: str, - description: typing.Optional[str], - display_name: typing.Optional[str], - preview: typing.Optional[bool], - scope_mode: typing.Optional[str], - trigger: typing.Optional[str], -): - """ - Replace the Schedule with the specified rid. - """ - result = client.orchestration.Schedule.replace( - schedule_rid=schedule_rid, - action=json.loads(action), - description=description, - display_name=display_name, - preview=preview, - scope_mode=None if scope_mode is None else json.loads(scope_mode), - trigger=None if trigger is None else json.loads(trigger), - ) - click.echo(repr(result)) - - -@orchestration_schedule.command("run") -@click.argument("schedule_rid", type=str, required=True) -@click.pass_obj -def orchestration_schedule_op_run( - client: FoundryClient, - schedule_rid: str, -): - """ """ - result = client.orchestration.Schedule.run( - schedule_rid=schedule_rid, - ) - click.echo(repr(result)) - - -@orchestration_schedule.command("runs") -@click.argument("schedule_rid", type=str, required=True) -@click.option( - "--page_size", type=int, required=False, help="""The page size to use for the endpoint.""" -) -@click.option( - "--page_token", - type=str, - required=False, - help="""The page token indicates where to start paging. This should be omitted from the first page's request. -To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response -and use it to populate the `pageToken` field of the next request.""", -) -@click.pass_obj -def orchestration_schedule_op_runs( - client: FoundryClient, - schedule_rid: str, - page_size: typing.Optional[int], - page_token: typing.Optional[str], -): - """ - Get the most recent runs of a Schedule. If no page size is provided, a page size of 100 will be used. - - """ - result = client.orchestration.Schedule.runs( - schedule_rid=schedule_rid, - page_size=page_size, - page_token=page_token, - ) - click.echo(repr(result)) - - -@orchestration_schedule.command("unpause") -@click.argument("schedule_rid", type=str, required=True) -@click.pass_obj -def orchestration_schedule_op_unpause( - client: FoundryClient, - schedule_rid: str, -): - """ """ - result = client.orchestration.Schedule.unpause( - schedule_rid=schedule_rid, - ) - click.echo(repr(result)) - - -@orchestration.group("job") -def orchestration_job(): - pass - - -@orchestration_job.command("get") -@click.argument("job_rid", type=str, required=True) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def orchestration_job_op_get( - client: FoundryClient, - job_rid: str, - preview: typing.Optional[bool], -): - """ - Get the Job with the specified rid. - """ - result = client.orchestration.Job.get( - job_rid=job_rid, - preview=preview, - ) - click.echo(repr(result)) - - -@orchestration_job.command("get_batch") -@click.argument("body", type=str, required=True) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def orchestration_job_op_get_batch( - client: FoundryClient, - body: str, - preview: typing.Optional[bool], -): - """ - Execute multiple get requests on Job. - - The maximum batch size for this endpoint is 500. - """ - result = client.orchestration.Job.get_batch( - body=json.loads(body), - preview=preview, - ) - click.echo(repr(result)) - - -@orchestration.group("build") -def orchestration_build(): - pass - - -@orchestration_build.command("cancel") -@click.argument("build_rid", type=str, required=True) -@click.pass_obj -def orchestration_build_op_cancel( - client: FoundryClient, - build_rid: str, -): - """ - Request a cancellation for all unfinished jobs in a build. The build's status will not update immediately. This endpoint is asynchronous and a success response indicates that the cancellation request has been acknowledged and the build is expected to be canceled soon. If the build has already finished or finishes shortly after the request and before the cancellation, the build will not change. - - """ - result = client.orchestration.Build.cancel( - build_rid=build_rid, - ) - click.echo(repr(result)) - - -@orchestration_build.command("create") -@click.option("--fallback_branches", type=str, required=True, help="""""") -@click.option("--target", type=str, required=True, help="""The targets of the schedule.""") -@click.option("--abort_on_failure", type=bool, required=False, help="""""") -@click.option( - "--branch_name", type=str, required=False, help="""The target branch the build should run on.""" -) -@click.option("--force_build", type=bool, required=False, help="""""") -@click.option("--notifications_enabled", type=bool, required=False, help="""""") -@click.option("--retry_backoff_duration", type=str, required=False, help="""""") -@click.option( - "--retry_count", - type=int, - required=False, - help="""The number of retry attempts for failed jobs.""", -) -@click.pass_obj -def orchestration_build_op_create( - client: FoundryClient, - fallback_branches: str, - target: str, - abort_on_failure: typing.Optional[bool], - branch_name: typing.Optional[str], - force_build: typing.Optional[bool], - notifications_enabled: typing.Optional[bool], - retry_backoff_duration: typing.Optional[str], - retry_count: typing.Optional[int], -): - """ """ - result = client.orchestration.Build.create( - fallback_branches=json.loads(fallback_branches), - target=json.loads(target), - abort_on_failure=abort_on_failure, - branch_name=branch_name, - force_build=force_build, - notifications_enabled=notifications_enabled, - retry_backoff_duration=( - None if retry_backoff_duration is None else json.loads(retry_backoff_duration) - ), - retry_count=retry_count, - ) - click.echo(repr(result)) - - -@orchestration_build.command("get") -@click.argument("build_rid", type=str, required=True) -@click.pass_obj -def orchestration_build_op_get( - client: FoundryClient, - build_rid: str, -): - """ - Get the Build with the specified rid. - """ - result = client.orchestration.Build.get( - build_rid=build_rid, - ) - click.echo(repr(result)) - - -@orchestration_build.command("get_batch") -@click.argument("body", type=str, required=True) -@click.pass_obj -def orchestration_build_op_get_batch( - client: FoundryClient, - body: str, -): - """ - Execute multiple get requests on Build. - - The maximum batch size for this endpoint is 100. - """ - result = client.orchestration.Build.get_batch( - body=json.loads(body), - ) - click.echo(repr(result)) - - -@orchestration_build.command("jobs") -@click.argument("build_rid", type=str, required=True) -@click.option( - "--page_size", type=int, required=False, help="""The page size to use for the endpoint.""" -) -@click.option( - "--page_token", - type=str, - required=False, - help="""The page token indicates where to start paging. This should be omitted from the first page's request. -To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response -and use it to populate the `pageToken` field of the next request.""", -) -@click.pass_obj -def orchestration_build_op_jobs( - client: FoundryClient, - build_rid: str, - page_size: typing.Optional[int], - page_token: typing.Optional[str], -): - """ - Get the Jobs in the Build. - """ - result = client.orchestration.Build.jobs( - build_rid=build_rid, - page_size=page_size, - page_token=page_token, - ) - click.echo(repr(result)) - - -@orchestration_build.command("search") -@click.option("--where", type=str, required=True, help="""""") -@click.option("--order_by", type=str, required=False, help="""""") -@click.option( - "--page_size", - type=int, - required=False, - help="""The page size for the search request. If no value is provided, a default of `100` will be used. -""", -) -@click.option("--page_token", type=str, required=False, help="""""") -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def orchestration_build_op_search( - client: FoundryClient, - where: str, - order_by: typing.Optional[str], - page_size: typing.Optional[int], - page_token: typing.Optional[str], - preview: typing.Optional[bool], -): - """ - Search for Builds. - """ - result = client.orchestration.Build.search( - where=json.loads(where), - order_by=None if order_by is None else json.loads(order_by), - page_size=page_size, - page_token=page_token, - preview=preview, - ) - click.echo(repr(result)) - - -@cli.group("sql_queries") -def sql_queries(): - pass - - -@sql_queries.group("sql_query") -def sql_queries_sql_query(): - pass - - -@sql_queries_sql_query.command("cancel") -@click.argument("sql_query_id", type=str, required=True) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def sql_queries_sql_query_op_cancel( - client: FoundryClient, - sql_query_id: str, - preview: typing.Optional[bool], -): - """ - Cancels a query. If the query is no longer running this is effectively a no-op. - - """ - result = client.sql_queries.SqlQuery.cancel( - sql_query_id=sql_query_id, - preview=preview, - ) - click.echo(repr(result)) - - -@sql_queries_sql_query.command("execute") -@click.option( - "--query", - type=str, - required=True, - help="""The SQL query to execute. Queries should conform to the -[Spark SQL dialect](https://spark.apache.org/docs/latest/sql-ref.html). This supports SELECT -queries only. Datasets can be referenced in SQL queries by path or by RID. See the -[documentation](https://www.palantir.com/docs/foundry/analytics-connectivity/odbc-jdbc-drivers/#use-sql-to-query-foundry-datasets) -for more details. -""", -) -@click.option( - "--fallback_branch_ids", - type=str, - required=False, - help="""The list of branch ids to use as fallbacks if the query fails to execute on the primary branch. If a -is not explicitly provided in the SQL query, the resource will be queried on the first fallback branch -provided that exists. If no fallback branches are provided the default branch is used. This is -`master` for most enrollments. -""", -) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def sql_queries_sql_query_op_execute( - client: FoundryClient, - query: str, - fallback_branch_ids: typing.Optional[str], - preview: typing.Optional[bool], -): - """ - Executes a new query. Only the user that invoked the query can operate on the query. The size of query - results are limited by default to 1 million rows. Contact your Palantir representative to discuss limit - increases. - - """ - result = client.sql_queries.SqlQuery.execute( - query=query, - fallback_branch_ids=( - None if fallback_branch_ids is None else json.loads(fallback_branch_ids) - ), - preview=preview, - ) - click.echo(repr(result)) - - -@sql_queries_sql_query.command("get_results") -@click.argument("sql_query_id", type=str, required=True) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def sql_queries_sql_query_op_get_results( - client: FoundryClient, - sql_query_id: str, - preview: typing.Optional[bool], -): - """ - Gets the results of a query. The results of the query are returned in the - [Apache Arrow](https://arrow.apache.org/) format. - - This endpoint implements long polling and requests will time out after one minute. They can be safely - retried while the query is still running. - - """ - result = client.sql_queries.SqlQuery.get_results( - sql_query_id=sql_query_id, - preview=preview, - ) - click.echo(result) - - -@sql_queries_sql_query.command("get_status") -@click.argument("sql_query_id", type=str, required=True) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def sql_queries_sql_query_op_get_status( - client: FoundryClient, - sql_query_id: str, - preview: typing.Optional[bool], -): - """ - Gets the status of a query. - - """ - result = client.sql_queries.SqlQuery.get_status( - sql_query_id=sql_query_id, - preview=preview, - ) - click.echo(repr(result)) - - -@cli.group("streams") -def streams(): - pass - - -@streams.group("dataset") -def streams_dataset(): - pass - - -@streams_dataset.command("create") -@click.option("--name", type=str, required=True, help="""""") -@click.option("--parent_folder_rid", type=str, required=True, help="""""") -@click.option( - "--schema", - type=str, - required=True, - help="""The Foundry schema to apply to the new stream. -""", -) -@click.option( - "--branch_name", - type=str, - required=False, - help="""The branch to create the initial stream on. If not specified, the default branch will be used -('master' for most enrollments). -""", -) -@click.option( - "--compressed", - type=bool, - required=False, - help="""Whether or not compression is enabled for the stream. Defaults to false. -""", -) -@click.option( - "--partitions_count", - type=int, - required=False, - help="""The number of partitions for the Foundry stream. - -Generally, each partition can handle about 5 mb/s of data, so for higher volume streams, more partitions -are recommended. - -If not specified, 1 partition is used. - -This value cannot be changed later. -""", -) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.option( - "--stream_type", - type=click.Choice(["LOW_LATENCY", "HIGH_THROUGHPUT"]), - required=False, - help="""A conceptual representation of the expected shape of the data for a stream. HIGH_THROUGHPUT and -LOW_LATENCY are not compatible with each other. Defaults to LOW_LATENCY. -""", -) -@click.pass_obj -def streams_dataset_op_create( - client: FoundryClient, - name: str, - parent_folder_rid: str, - schema: str, - branch_name: typing.Optional[str], - compressed: typing.Optional[bool], - partitions_count: typing.Optional[int], - preview: typing.Optional[bool], - stream_type: typing.Optional[typing.Literal["LOW_LATENCY", "HIGH_THROUGHPUT"]], -): - """ - Creates a streaming dataset with a stream on the specified branch, or if no branch is specified, on the - default branch ('master' for most enrollments). For more information on streaming datasets, refer to the - [streams](https://palantir.com/docs/foundry/data-integration/streams/) user documentation. - - """ - result = client.streams.Dataset.create( - name=name, - parent_folder_rid=parent_folder_rid, - schema=json.loads(schema), - branch_name=branch_name, - compressed=compressed, - partitions_count=partitions_count, - preview=preview, - stream_type=stream_type, - ) - click.echo(repr(result)) - - -@streams_dataset.group("stream") -def streams_dataset_stream(): - pass - - -@streams_dataset_stream.command("create") -@click.argument("dataset_rid", type=str, required=True) -@click.option("--branch_name", type=str, required=True, help="""""") -@click.option("--schema", type=str, required=True, help="""The Foundry schema for this stream.""") -@click.option( - "--compressed", - type=bool, - required=False, - help="""Whether or not compression is enabled for the stream. Defaults to false. -""", -) -@click.option( - "--partitions_count", - type=int, - required=False, - help="""The number of partitions for the Foundry stream. Defaults to 1. - -Generally, each partition can handle about 5 mb/s of data, so for higher volume streams, more partitions -are recommended. -""", -) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.option( - "--stream_type", - type=click.Choice(["LOW_LATENCY", "HIGH_THROUGHPUT"]), - required=False, - help="""A conceptual representation of the expected shape of the data for a stream. HIGH_THROUGHPUT and -LOW_LATENCY are not compatible with each other. Defaults to LOW_LATENCY. -""", -) -@click.pass_obj -def streams_dataset_stream_op_create( - client: FoundryClient, - dataset_rid: str, - branch_name: str, - schema: str, - compressed: typing.Optional[bool], - partitions_count: typing.Optional[int], - preview: typing.Optional[bool], - stream_type: typing.Optional[typing.Literal["LOW_LATENCY", "HIGH_THROUGHPUT"]], -): - """ - Creates a new branch on the backing streaming dataset, and creates a new stream on that branch. - - """ - result = client.streams.Dataset.Stream.create( - dataset_rid=dataset_rid, - branch_name=branch_name, - schema=json.loads(schema), - compressed=compressed, - partitions_count=partitions_count, - preview=preview, - stream_type=stream_type, - ) - click.echo(repr(result)) - - -@streams_dataset_stream.command("get") -@click.argument("dataset_rid", type=str, required=True) -@click.argument("stream_branch_name", type=str, required=True) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def streams_dataset_stream_op_get( - client: FoundryClient, - dataset_rid: str, - stream_branch_name: str, - preview: typing.Optional[bool], -): - """ - Get a stream by its branch name. If the branch does not exist, there is no stream on that branch, or the - user does not have permission to access the stream, a 404 error will be returned. - - """ - result = client.streams.Dataset.Stream.get( - dataset_rid=dataset_rid, - stream_branch_name=stream_branch_name, - preview=preview, - ) - click.echo(repr(result)) - - -@streams_dataset_stream.command("publish_binary_record") -@click.argument("dataset_rid", type=str, required=True) -@click.argument("stream_branch_name", type=str, required=True) -@click.argument("body", type=click.File("rb"), required=True) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.option( - "--view_rid", - type=str, - required=False, - help="""If provided, this operation will only write to the stream corresponding to the specified view rid. If -not provided, this operation will write to the latest stream on the branch. - -Providing this value is an advanced configuration, to be used when additional control over the -underlying streaming data structures is needed. -""", -) -@click.pass_obj -def streams_dataset_stream_op_publish_binary_record( - client: FoundryClient, - dataset_rid: str, - stream_branch_name: str, - body: io.BufferedReader, - preview: typing.Optional[bool], - view_rid: typing.Optional[str], -): - """ - Publish a single binary record to the stream. The stream's schema must be a single binary field. - - """ - result = client.streams.Dataset.Stream.publish_binary_record( - dataset_rid=dataset_rid, - stream_branch_name=stream_branch_name, - body=body.read(), - preview=preview, - view_rid=view_rid, - ) - click.echo(repr(result)) - - -@streams_dataset_stream.command("publish_record") -@click.argument("dataset_rid", type=str, required=True) -@click.argument("stream_branch_name", type=str, required=True) -@click.option( - "--record", - type=str, - required=True, - help="""The record to publish to the stream -""", -) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.option( - "--view_rid", - type=str, - required=False, - help="""If provided, this endpoint will only write to the stream corresponding to the specified view rid. If -not provided, this endpoint will write the latest stream on the branch. - -Providing this value is an advanced configuration, to be used when additional control over the -underlying streaming data structures is needed. -""", -) -@click.pass_obj -def streams_dataset_stream_op_publish_record( - client: FoundryClient, - dataset_rid: str, - stream_branch_name: str, - record: str, - preview: typing.Optional[bool], - view_rid: typing.Optional[str], -): - """ - Publish a single record to the stream. The record will be validated against the stream's schema, and - rejected if it is invalid. - - """ - result = client.streams.Dataset.Stream.publish_record( - dataset_rid=dataset_rid, - stream_branch_name=stream_branch_name, - record=json.loads(record), - preview=preview, - view_rid=view_rid, - ) - click.echo(repr(result)) - - -@streams_dataset_stream.command("publish_records") -@click.argument("dataset_rid", type=str, required=True) -@click.argument("stream_branch_name", type=str, required=True) -@click.option( - "--records", - type=str, - required=True, - help="""The records to publish to the stream -""", -) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.option( - "--view_rid", - type=str, - required=False, - help="""If provided, this endpoint will only write to the stream corresponding to the specified view rid. If -not provided, this endpoint will write to the latest stream on the branch. - -Providing this value is an advanced configuration, to be used when additional control over the -underlying streaming data structures is needed. -""", -) -@click.pass_obj -def streams_dataset_stream_op_publish_records( - client: FoundryClient, - dataset_rid: str, - stream_branch_name: str, - records: str, - preview: typing.Optional[bool], - view_rid: typing.Optional[str], -): - """ - Publish a batch of records to the stream. The records will be validated against the stream's schema, and - the batch will be rejected if one or more of the records are invalid. - - """ - result = client.streams.Dataset.Stream.publish_records( - dataset_rid=dataset_rid, - stream_branch_name=stream_branch_name, - records=json.loads(records), - preview=preview, - view_rid=view_rid, - ) - click.echo(repr(result)) - - -@streams_dataset_stream.command("reset") -@click.argument("dataset_rid", type=str, required=True) -@click.argument("stream_branch_name", type=str, required=True) -@click.option( - "--compressed", - type=bool, - required=False, - help="""Whether or not compression is enabled for the stream. - -If omitted, the compression setting of the existing stream on the branch will be used. -""", -) -@click.option( - "--partitions_count", - type=int, - required=False, - help="""The number of partitions for the Foundry stream. -Generally, each partition can handle about 5 mb/s of data, so for higher volume streams, more partitions -are recommended. - -If omitted, the partitions count of the existing stream on the branch will be used. -""", -) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.option( - "--schema", - type=str, - required=False, - help="""The Foundry schema to apply to the new stream. - -If omitted, the schema of the existing stream on the branch will be used. -""", -) -@click.option( - "--stream_type", - type=click.Choice(["LOW_LATENCY", "HIGH_THROUGHPUT"]), - required=False, - help="""A conceptual representation of the expected shape of the data for a stream. HIGH_THROUGHPUT and -LOW_LATENCY are not compatible with each other. Defaults to LOW_LATENCY. - -If omitted, the stream type of the existing stream on the branch will be used. -""", -) -@click.pass_obj -def streams_dataset_stream_op_reset( - client: FoundryClient, - dataset_rid: str, - stream_branch_name: str, - compressed: typing.Optional[bool], - partitions_count: typing.Optional[int], - preview: typing.Optional[bool], - schema: typing.Optional[str], - stream_type: typing.Optional[typing.Literal["LOW_LATENCY", "HIGH_THROUGHPUT"]], -): - """ - Reset the stream on the given dataset branch, clearing the existing records and allowing new configurations - to be applied. - - To change the stream settings without clearing the records, update the stream settings in-platform. - - This will create a new stream view (as seen by the change of the `viewRid` on the branch), - which will be the new stream view that will be written to for the branch. - - """ - result = client.streams.Dataset.Stream.reset( - dataset_rid=dataset_rid, - stream_branch_name=stream_branch_name, - compressed=compressed, - partitions_count=partitions_count, - preview=preview, - schema=None if schema is None else json.loads(schema), - stream_type=stream_type, - ) - click.echo(repr(result)) - - -@cli.group("third_party_applications") -def third_party_applications(): - pass - - -@third_party_applications.group("third_party_application") -def third_party_applications_third_party_application(): - pass - - -@third_party_applications_third_party_application.command("get") -@click.argument("third_party_application_rid", type=str, required=True) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def third_party_applications_third_party_application_op_get( - client: FoundryClient, - third_party_application_rid: str, - preview: typing.Optional[bool], -): - """ - Get the ThirdPartyApplication with the specified rid. - """ - result = client.third_party_applications.ThirdPartyApplication.get( - third_party_application_rid=third_party_application_rid, - preview=preview, - ) - click.echo(repr(result)) - - -@third_party_applications_third_party_application.group("website") -def third_party_applications_third_party_application_website(): - pass - - -@third_party_applications_third_party_application_website.command("deploy") -@click.argument("third_party_application_rid", type=str, required=True) -@click.option("--version", type=str, required=True, help="""""") -@click.pass_obj -def third_party_applications_third_party_application_website_op_deploy( - client: FoundryClient, - third_party_application_rid: str, - version: str, -): - """ - Deploy a version of the Website. - """ - result = client.third_party_applications.ThirdPartyApplication.Website.deploy( - third_party_application_rid=third_party_application_rid, - version=version, - ) - click.echo(repr(result)) - - -@third_party_applications_third_party_application_website.command("get") -@click.argument("third_party_application_rid", type=str, required=True) -@click.pass_obj -def third_party_applications_third_party_application_website_op_get( - client: FoundryClient, - third_party_application_rid: str, -): - """ - Get the Website. - """ - result = client.third_party_applications.ThirdPartyApplication.Website.get( - third_party_application_rid=third_party_application_rid, - ) - click.echo(repr(result)) - - -@third_party_applications_third_party_application_website.command("undeploy") -@click.argument("third_party_application_rid", type=str, required=True) -@click.pass_obj -def third_party_applications_third_party_application_website_op_undeploy( - client: FoundryClient, - third_party_application_rid: str, -): - """ - Remove the currently deployed version of the Website. - """ - result = client.third_party_applications.ThirdPartyApplication.Website.undeploy( - third_party_application_rid=third_party_application_rid, - ) - click.echo(repr(result)) - - -@third_party_applications_third_party_application_website.group("version") -def third_party_applications_third_party_application_website_version(): - pass - - -@third_party_applications_third_party_application_website_version.command("delete") -@click.argument("third_party_application_rid", type=str, required=True) -@click.argument("version_version", type=str, required=True) -@click.pass_obj -def third_party_applications_third_party_application_website_version_op_delete( - client: FoundryClient, - third_party_application_rid: str, - version_version: str, -): - """ - Delete the Version with the specified version. - """ - result = client.third_party_applications.ThirdPartyApplication.Website.Version.delete( - third_party_application_rid=third_party_application_rid, - version_version=version_version, - ) - click.echo(repr(result)) - - -@third_party_applications_third_party_application_website_version.command("get") -@click.argument("third_party_application_rid", type=str, required=True) -@click.argument("version_version", type=str, required=True) -@click.pass_obj -def third_party_applications_third_party_application_website_version_op_get( - client: FoundryClient, - third_party_application_rid: str, - version_version: str, -): - """ - Get the Version with the specified version. - """ - result = client.third_party_applications.ThirdPartyApplication.Website.Version.get( - third_party_application_rid=third_party_application_rid, - version_version=version_version, - ) - click.echo(repr(result)) - - -@third_party_applications_third_party_application_website_version.command("list") -@click.argument("third_party_application_rid", type=str, required=True) -@click.option( - "--page_size", type=int, required=False, help="""The page size to use for the endpoint.""" -) -@click.option( - "--page_token", - type=str, - required=False, - help="""The page token indicates where to start paging. This should be omitted from the first page's request. -To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response -and use it to populate the `pageToken` field of the next request.""", -) -@click.pass_obj -def third_party_applications_third_party_application_website_version_op_list( - client: FoundryClient, - third_party_application_rid: str, - page_size: typing.Optional[int], - page_token: typing.Optional[str], -): - """ - Lists all Versions. - - This is a paged endpoint. Each page may be smaller or larger than the requested page size. However, it is guaranteed that if there are more results available, the `nextPageToken` field will be populated. To get the next page, make the same request again, but set the value of the `pageToken` query parameter to be value of the `nextPageToken` value of the previous response. If there is no `nextPageToken` field in the response, you are on the last page. - """ - result = client.third_party_applications.ThirdPartyApplication.Website.Version.list( - third_party_application_rid=third_party_application_rid, - page_size=page_size, - page_token=page_token, - ) - click.echo(repr(result)) - - -@third_party_applications_third_party_application_website_version.command("upload") -@click.argument("third_party_application_rid", type=str, required=True) -@click.argument("body", type=click.File("rb"), required=True) -@click.option("--version", type=str, required=True, help="""""") -@click.pass_obj -def third_party_applications_third_party_application_website_version_op_upload( - client: FoundryClient, - third_party_application_rid: str, - body: io.BufferedReader, - version: str, -): - """ - Upload a new version of the Website. - """ - result = client.third_party_applications.ThirdPartyApplication.Website.Version.upload( - third_party_application_rid=third_party_application_rid, - body=body.read(), - version=version, - ) - click.echo(repr(result)) - - -@third_party_applications_third_party_application_website_version.command("upload_snapshot") -@click.argument("third_party_application_rid", type=str, required=True) -@click.argument("body", type=click.File("rb"), required=True) -@click.option("--version", type=str, required=True, help="""""") -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.option( - "--snapshot_identifier", - type=str, - required=False, - help="""The identifier of the snapshot. If the identifier follows the format -`foundry.v1@@@`, PR preview for such identifier will be -accessible from foundry code repositories. -""", -) -@click.pass_obj -def third_party_applications_third_party_application_website_version_op_upload_snapshot( - client: FoundryClient, - third_party_application_rid: str, - body: io.BufferedReader, - version: str, - preview: typing.Optional[bool], - snapshot_identifier: typing.Optional[str], -): - """ - Upload a snapshot version of the Website. Snapshot versions are automatically deleted after two days. - - """ - result = client.third_party_applications.ThirdPartyApplication.Website.Version.upload_snapshot( - third_party_application_rid=third_party_application_rid, - body=body.read(), - version=version, - preview=preview, - snapshot_identifier=snapshot_identifier, - ) - click.echo(repr(result)) - - -@cli.group("widgets") -def widgets(): - pass - - -@widgets.group("widget_set") -def widgets_widget_set(): - pass - - -@widgets_widget_set.command("get") -@click.argument("widget_set_rid", type=str, required=True) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def widgets_widget_set_op_get( - client: FoundryClient, - widget_set_rid: str, - preview: typing.Optional[bool], -): - """ - Get the WidgetSet with the specified rid. - """ - result = client.widgets.WidgetSet.get( - widget_set_rid=widget_set_rid, - preview=preview, - ) - click.echo(repr(result)) - - -@widgets_widget_set.group("release") -def widgets_widget_set_release(): - pass - - -@widgets_widget_set_release.command("delete") -@click.argument("widget_set_rid", type=str, required=True) -@click.argument("release_version", type=str, required=True) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def widgets_widget_set_release_op_delete( - client: FoundryClient, - widget_set_rid: str, - release_version: str, - preview: typing.Optional[bool], -): - """ - Delete the Release with the specified version. - """ - result = client.widgets.WidgetSet.Release.delete( - widget_set_rid=widget_set_rid, - release_version=release_version, - preview=preview, - ) - click.echo(repr(result)) - - -@widgets_widget_set_release.command("get") -@click.argument("widget_set_rid", type=str, required=True) -@click.argument("release_version", type=str, required=True) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def widgets_widget_set_release_op_get( - client: FoundryClient, - widget_set_rid: str, - release_version: str, - preview: typing.Optional[bool], -): - """ - Get the Release with the specified version. - """ - result = client.widgets.WidgetSet.Release.get( - widget_set_rid=widget_set_rid, - release_version=release_version, - preview=preview, - ) - click.echo(repr(result)) - - -@widgets_widget_set_release.command("list") -@click.argument("widget_set_rid", type=str, required=True) -@click.option( - "--page_size", type=int, required=False, help="""The page size to use for the endpoint.""" -) -@click.option( - "--page_token", - type=str, - required=False, - help="""The page token indicates where to start paging. This should be omitted from the first page's request. -To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response -and use it to populate the `pageToken` field of the next request.""", -) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def widgets_widget_set_release_op_list( - client: FoundryClient, - widget_set_rid: str, - page_size: typing.Optional[int], - page_token: typing.Optional[str], - preview: typing.Optional[bool], -): - """ - Lists all Releases. - - This is a paged endpoint. Each page may be smaller or larger than the requested page size. However, it is guaranteed that if there are more results available, the `nextPageToken` field will be populated. To get the next page, make the same request again, but set the value of the `pageToken` query parameter to be value of the `nextPageToken` value of the previous response. If there is no `nextPageToken` field in the response, you are on the last page. - """ - result = client.widgets.WidgetSet.Release.list( - widget_set_rid=widget_set_rid, - page_size=page_size, - page_token=page_token, - preview=preview, - ) - click.echo(repr(result)) - - -@widgets.group("repository") -def widgets_repository(): - pass - - -@widgets_repository.command("get") -@click.argument("repository_rid", type=str, required=True) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def widgets_repository_op_get( - client: FoundryClient, - repository_rid: str, - preview: typing.Optional[bool], -): - """ - Get the Repository with the specified rid. - """ - result = client.widgets.Repository.get( - repository_rid=repository_rid, - preview=preview, - ) - click.echo(repr(result)) - - -@widgets_repository.command("publish") -@click.argument("repository_rid", type=str, required=True) -@click.argument("body", type=click.File("rb"), required=True) -@click.option("--repository_version", type=str, required=True, help="""""") -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def widgets_repository_op_publish( - client: FoundryClient, - repository_rid: str, - body: io.BufferedReader, - repository_version: str, - preview: typing.Optional[bool], -): - """ - Publish a new release of a widget set. - """ - result = client.widgets.Repository.publish( - repository_rid=repository_rid, - body=body.read(), - repository_version=repository_version, - preview=preview, - ) - click.echo(repr(result)) - - -@widgets.group("dev_mode_settings") -def widgets_dev_mode_settings(): - pass - - -@widgets_dev_mode_settings.command("disable") -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def widgets_dev_mode_settings_op_disable( - client: FoundryClient, - preview: typing.Optional[bool], -): - """ - Disable dev mode for the user associated with the provided token. - """ - result = client.widgets.DevModeSettings.disable( - preview=preview, - ) - click.echo(repr(result)) - - -@widgets_dev_mode_settings.command("enable") -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def widgets_dev_mode_settings_op_enable( - client: FoundryClient, - preview: typing.Optional[bool], -): - """ - Enable dev mode for the user associated with the provided token. - """ - result = client.widgets.DevModeSettings.enable( - preview=preview, - ) - click.echo(repr(result)) - - -@widgets_dev_mode_settings.command("get") -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def widgets_dev_mode_settings_op_get( - client: FoundryClient, - preview: typing.Optional[bool], -): - """ - Get the dev mode settings for the user associated with the provided token. - """ - result = client.widgets.DevModeSettings.get( - preview=preview, - ) - click.echo(repr(result)) - - -@widgets_dev_mode_settings.command("pause") -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def widgets_dev_mode_settings_op_pause( - client: FoundryClient, - preview: typing.Optional[bool], -): - """ - Pause dev mode for the user associated with the provided token. - """ - result = client.widgets.DevModeSettings.pause( - preview=preview, - ) - click.echo(repr(result)) - - -@widgets_dev_mode_settings.command("set_widget_set") -@click.option("--settings", type=str, required=True, help="""""") -@click.option("--widget_set_rid", type=str, required=True, help="""""") -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def widgets_dev_mode_settings_op_set_widget_set( - client: FoundryClient, - settings: str, - widget_set_rid: str, - preview: typing.Optional[bool], -): - """ - Set the dev mode settings for the given widget set for the user associated with the provided token. - """ - result = client.widgets.DevModeSettings.set_widget_set( - settings=json.loads(settings), - widget_set_rid=widget_set_rid, - preview=preview, - ) - click.echo(repr(result)) - - -@widgets_dev_mode_settings.command("set_widget_set_by_id") -@click.option("--settings", type=str, required=True, help="""""") -@click.option("--widget_set_rid", type=str, required=True, help="""""") -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) -@click.pass_obj -def widgets_dev_mode_settings_op_set_widget_set_by_id( - client: FoundryClient, - settings: str, - widget_set_rid: str, - preview: typing.Optional[bool], -): - """ - Set the dev mode settings for the given widget set for the user associated with the - provided token. Uses widget IDs to identify widgets within the set. - - """ - result = client.widgets.DevModeSettings.set_widget_set_by_id( - settings=json.loads(settings), - widget_set_rid=widget_set_rid, - preview=preview, - ) - click.echo(repr(result)) - - -if __name__ == "__main__": - cli() diff --git a/foundry_sdk/v2/client.py b/foundry_sdk/v2/client.py deleted file mode 100644 index 6ee5bfefd..000000000 --- a/foundry_sdk/v2/client.py +++ /dev/null @@ -1,154 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing - -from foundry_sdk import _core as core -from foundry_sdk._core.client_init_helpers import ( - get_hostname_from_context_or_environment_vars, -) # NOQA -from foundry_sdk._core.client_init_helpers import ( - get_user_token_auth_from_context_or_environment_vars, -) # NOQA - - -class FoundryClient: - """ - The Foundry V2 API client. - - :param auth: Required. Your auth configuration. - :param hostname: Required. Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: typing.Optional[core.Auth] = None, - hostname: typing.Optional[str] = None, - config: typing.Optional[core.Config] = None, - ): - if auth is None: - auth = get_user_token_auth_from_context_or_environment_vars() - if hostname is None: - hostname = get_hostname_from_context_or_environment_vars() - - from foundry_sdk.v2.admin._client import AdminClient - from foundry_sdk.v2.aip_agents._client import AipAgentsClient - from foundry_sdk.v2.audit._client import AuditClient - from foundry_sdk.v2.connectivity._client import ConnectivityClient - from foundry_sdk.v2.data_health._client import DataHealthClient - from foundry_sdk.v2.datasets._client import DatasetsClient - from foundry_sdk.v2.filesystem._client import FilesystemClient - from foundry_sdk.v2.functions._client import FunctionsClient - from foundry_sdk.v2.language_models._client import LanguageModelsClient - from foundry_sdk.v2.media_sets._client import MediaSetsClient - from foundry_sdk.v2.models._client import ModelsClient - from foundry_sdk.v2.ontologies._client import OntologiesClient - from foundry_sdk.v2.orchestration._client import OrchestrationClient - from foundry_sdk.v2.sql_queries._client import SqlQueriesClient - from foundry_sdk.v2.streams._client import StreamsClient - from foundry_sdk.v2.third_party_applications._client import ( - ThirdPartyApplicationsClient, - ) # NOQA - from foundry_sdk.v2.widgets._client import WidgetsClient - - self.admin = AdminClient(auth=auth, hostname=hostname, config=config) - self.aip_agents = AipAgentsClient(auth=auth, hostname=hostname, config=config) - self.audit = AuditClient(auth=auth, hostname=hostname, config=config) - self.connectivity = ConnectivityClient(auth=auth, hostname=hostname, config=config) - self.data_health = DataHealthClient(auth=auth, hostname=hostname, config=config) - self.datasets = DatasetsClient(auth=auth, hostname=hostname, config=config) - self.filesystem = FilesystemClient(auth=auth, hostname=hostname, config=config) - self.functions = FunctionsClient(auth=auth, hostname=hostname, config=config) - self.language_models = LanguageModelsClient(auth=auth, hostname=hostname, config=config) - self.media_sets = MediaSetsClient(auth=auth, hostname=hostname, config=config) - self.models = ModelsClient(auth=auth, hostname=hostname, config=config) - self.ontologies = OntologiesClient(auth=auth, hostname=hostname, config=config) - self.orchestration = OrchestrationClient(auth=auth, hostname=hostname, config=config) - self.sql_queries = SqlQueriesClient(auth=auth, hostname=hostname, config=config) - self.streams = StreamsClient(auth=auth, hostname=hostname, config=config) - self.third_party_applications = ThirdPartyApplicationsClient( - auth=auth, hostname=hostname, config=config - ) - self.widgets = WidgetsClient(auth=auth, hostname=hostname, config=config) - - -class AsyncFoundryClient: - """ - The Async Foundry V2 API client. - - :param auth: Required. Your auth configuration. - :param hostname: Required. Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: typing.Optional[core.Auth] = None, - hostname: typing.Optional[str] = None, - config: typing.Optional[core.Config] = None, - preview: bool = False, - ): - if not preview: - raise ValueError( - "The AsyncFoundryClient client is in beta. " - "Please set the preview parameter to True to use it." - ) - if auth is None: - auth = get_user_token_auth_from_context_or_environment_vars() - if hostname is None: - hostname = get_hostname_from_context_or_environment_vars() - - from foundry_sdk.v2.admin._client import AsyncAdminClient - from foundry_sdk.v2.aip_agents._client import AsyncAipAgentsClient - from foundry_sdk.v2.audit._client import AsyncAuditClient - from foundry_sdk.v2.connectivity._client import AsyncConnectivityClient - from foundry_sdk.v2.data_health._client import AsyncDataHealthClient - from foundry_sdk.v2.datasets._client import AsyncDatasetsClient - from foundry_sdk.v2.filesystem._client import AsyncFilesystemClient - from foundry_sdk.v2.functions._client import AsyncFunctionsClient - from foundry_sdk.v2.language_models._client import AsyncLanguageModelsClient - from foundry_sdk.v2.media_sets._client import AsyncMediaSetsClient - from foundry_sdk.v2.models._client import AsyncModelsClient - from foundry_sdk.v2.ontologies._client import AsyncOntologiesClient - from foundry_sdk.v2.orchestration._client import AsyncOrchestrationClient - from foundry_sdk.v2.sql_queries._client import AsyncSqlQueriesClient - from foundry_sdk.v2.streams._client import AsyncStreamsClient - from foundry_sdk.v2.third_party_applications._client import ( - AsyncThirdPartyApplicationsClient, - ) # NOQA - from foundry_sdk.v2.widgets._client import AsyncWidgetsClient - - self.admin = AsyncAdminClient(auth=auth, hostname=hostname, config=config) - self.aip_agents = AsyncAipAgentsClient(auth=auth, hostname=hostname, config=config) - self.audit = AsyncAuditClient(auth=auth, hostname=hostname, config=config) - self.connectivity = AsyncConnectivityClient(auth=auth, hostname=hostname, config=config) - self.data_health = AsyncDataHealthClient(auth=auth, hostname=hostname, config=config) - self.datasets = AsyncDatasetsClient(auth=auth, hostname=hostname, config=config) - self.filesystem = AsyncFilesystemClient(auth=auth, hostname=hostname, config=config) - self.functions = AsyncFunctionsClient(auth=auth, hostname=hostname, config=config) - self.language_models = AsyncLanguageModelsClient( - auth=auth, hostname=hostname, config=config - ) - self.media_sets = AsyncMediaSetsClient(auth=auth, hostname=hostname, config=config) - self.models = AsyncModelsClient(auth=auth, hostname=hostname, config=config) - self.ontologies = AsyncOntologiesClient(auth=auth, hostname=hostname, config=config) - self.orchestration = AsyncOrchestrationClient(auth=auth, hostname=hostname, config=config) - self.sql_queries = AsyncSqlQueriesClient(auth=auth, hostname=hostname, config=config) - self.streams = AsyncStreamsClient(auth=auth, hostname=hostname, config=config) - self.third_party_applications = AsyncThirdPartyApplicationsClient( - auth=auth, hostname=hostname, config=config - ) - self.widgets = AsyncWidgetsClient(auth=auth, hostname=hostname, config=config) diff --git a/foundry_sdk/v2/connectivity/__init__.py b/foundry_sdk/v2/connectivity/__init__.py deleted file mode 100644 index 8ad403fad..000000000 --- a/foundry_sdk/v2/connectivity/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -from foundry_sdk.v2.connectivity._client import AsyncConnectivityClient -from foundry_sdk.v2.connectivity._client import ConnectivityClient - -__all__ = [ - "ConnectivityClient", - "AsyncConnectivityClient", -] diff --git a/foundry_sdk/v2/connectivity/_client.py b/foundry_sdk/v2/connectivity/_client.py deleted file mode 100644 index 028ab1759..000000000 --- a/foundry_sdk/v2/connectivity/_client.py +++ /dev/null @@ -1,69 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing -from functools import cached_property - -from foundry_sdk import _core as core - - -class ConnectivityClient: - """ - The API client for the Connectivity Namespace. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - - @cached_property - def Connection(self): - from foundry_sdk.v2.connectivity.connection import ConnectionClient - - return ConnectionClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - -class AsyncConnectivityClient: - """ - The Async API client for the Connectivity Namespace. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - from foundry_sdk.v2.connectivity.connection import AsyncConnectionClient - - self.Connection = AsyncConnectionClient(auth=auth, hostname=hostname, config=config) diff --git a/foundry_sdk/v2/connectivity/connection.py b/foundry_sdk/v2/connectivity/connection.py deleted file mode 100644 index 695b1fa38..000000000 --- a/foundry_sdk/v2/connectivity/connection.py +++ /dev/null @@ -1,1075 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing -from functools import cached_property - -import annotated_types -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v2.connectivity import errors as connectivity_errors -from foundry_sdk.v2.connectivity import models as connectivity_models -from foundry_sdk.v2.core import models as core_models -from foundry_sdk.v2.filesystem import errors as filesystem_errors -from foundry_sdk.v2.filesystem import models as filesystem_models - - -class ConnectionClient: - """ - The API client for the Connection Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _ConnectionClientStreaming(self) - self.with_raw_response = _ConnectionClientRaw(self) - - @cached_property - def FileImport(self): - from foundry_sdk.v2.connectivity.file_import import FileImportClient - - return FileImportClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @cached_property - def TableImport(self): - from foundry_sdk.v2.connectivity.table_import import TableImportClient - - return TableImportClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @cached_property - def VirtualTable(self): - from foundry_sdk.v2.connectivity.virtual_table import VirtualTableClient - - return VirtualTableClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def create( - self, - *, - configuration: connectivity_models.CreateConnectionRequestConnectionConfiguration, - display_name: connectivity_models.ConnectionDisplayName, - parent_folder_rid: filesystem_models.FolderRid, - worker: connectivity_models.CreateConnectionRequestConnectionWorker, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> connectivity_models.Connection: - """ - Creates a new Connection with a [direct connection](https://palantir.com/docs/foundry/data-connection/core-concepts/#direct-connection) runtime. - - Any secrets specified in the request body are transmitted over the network encrypted using TLS. Once the - secrets reach Foundry's servers, they will be temporarily decrypted and remain in plaintext in memory to - be processed as needed. They will stay in plaintext in memory until the garbage collection process cleans - up the memory. The secrets are always stored encrypted on our servers. - By using this endpoint, you acknowledge and accept any potential risks associated with the temporary - in-memory handling of secrets. If you do not want your secrets to be temporarily decrypted, you should - use the Foundry UI instead. - - :param configuration: - :type configuration: CreateConnectionRequestConnectionConfiguration - :param display_name: The display name of the Connection. The display name must not be blank. - :type display_name: ConnectionDisplayName - :param parent_folder_rid: - :type parent_folder_rid: FolderRid - :param worker: - :type worker: CreateConnectionRequestConnectionWorker - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: connectivity_models.Connection - - :raises ConnectionNotFound: The given Connection could not be found. - :raises ConnectionTypeNotSupported: The specified connection is not yet supported in the Platform API. - :raises CreateConnectionPermissionDenied: Could not create the Connection. - :raises FolderNotFound: The given Folder could not be found. - :raises ParentFolderNotFoundForConnection: The parent folder for the specified connection could not be found. - :raises PropertyCannotBeBlank: The specified property cannot be blank. - :raises UnknownWorkerCannotBeUsedForCreatingOrUpdatingConnections: The UnknownWorker cannot be used for creating or updating connections. Please use the Foundry worker instead. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/connectivity/connections", - query_params={ - "preview": preview, - }, - path_params={}, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=connectivity_models.CreateConnectionRequest( - parent_folder_rid=parent_folder_rid, - configuration=configuration, - display_name=display_name, - worker=worker, - ), - response_type=connectivity_models.Connection, - request_timeout=request_timeout, - throwable_errors={ - "ConnectionNotFound": connectivity_errors.ConnectionNotFound, - "ConnectionTypeNotSupported": connectivity_errors.ConnectionTypeNotSupported, - "CreateConnectionPermissionDenied": connectivity_errors.CreateConnectionPermissionDenied, - "FolderNotFound": filesystem_errors.FolderNotFound, - "ParentFolderNotFoundForConnection": connectivity_errors.ParentFolderNotFoundForConnection, - "PropertyCannotBeBlank": connectivity_errors.PropertyCannotBeBlank, - "UnknownWorkerCannotBeUsedForCreatingOrUpdatingConnections": connectivity_errors.UnknownWorkerCannotBeUsedForCreatingOrUpdatingConnections, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - connection_rid: connectivity_models.ConnectionRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> connectivity_models.Connection: - """ - Get the Connection with the specified rid. - :param connection_rid: - :type connection_rid: ConnectionRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: connectivity_models.Connection - - :raises ConnectionNotFound: The given Connection could not be found. - :raises ConnectionTypeNotSupported: The specified connection is not yet supported in the Platform API. - :raises ParentFolderNotFoundForConnection: The parent folder for the specified connection could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/connectivity/connections/{connectionRid}", - query_params={ - "preview": preview, - }, - path_params={ - "connectionRid": connection_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=connectivity_models.Connection, - request_timeout=request_timeout, - throwable_errors={ - "ConnectionNotFound": connectivity_errors.ConnectionNotFound, - "ConnectionTypeNotSupported": connectivity_errors.ConnectionTypeNotSupported, - "ParentFolderNotFoundForConnection": connectivity_errors.ParentFolderNotFoundForConnection, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get_configuration( - self, - connection_rid: connectivity_models.ConnectionRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> connectivity_models.ConnectionConfiguration: - """ - Retrieves the ConnectionConfiguration of the [Connection](https://palantir.com/docs/foundry/data-connection/set-up-source/) itself. - This operation is intended for use when other Connection data is not required, providing a lighter-weight alternative to `getConnection` operation. - - :param connection_rid: - :type connection_rid: ConnectionRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: connectivity_models.ConnectionConfiguration - - :raises ConnectionNotFound: The given Connection could not be found. - :raises ConnectionTypeNotSupported: The specified connection is not yet supported in the Platform API. - :raises GetConfigurationPermissionDenied: Could not getConfiguration the Connection. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/connectivity/connections/{connectionRid}/getConfiguration", - query_params={ - "preview": preview, - }, - path_params={ - "connectionRid": connection_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=connectivity_models.ConnectionConfiguration, - request_timeout=request_timeout, - throwable_errors={ - "ConnectionNotFound": connectivity_errors.ConnectionNotFound, - "ConnectionTypeNotSupported": connectivity_errors.ConnectionTypeNotSupported, - "GetConfigurationPermissionDenied": connectivity_errors.GetConfigurationPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get_configuration_batch( - self, - body: typing_extensions.Annotated[ - typing.List[connectivity_models.GetConfigurationConnectionsBatchRequestElement], - annotated_types.Len(min_length=1, max_length=200), - ], - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> connectivity_models.GetConfigurationConnectionsBatchResponse: - """ - Returns a map of Connection RIDs to their corresponding configurations. - Connections are filtered from the response if they don't exist or the requesting token lacks the required permissions. - - - The maximum batch size for this endpoint is 200. - :param body: Body of the request - :type body: List[GetConfigurationConnectionsBatchRequestElement] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: connectivity_models.GetConfigurationConnectionsBatchResponse - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/connectivity/connections/getConfigurationBatch", - query_params={ - "preview": preview, - }, - path_params={}, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=body, - response_type=connectivity_models.GetConfigurationConnectionsBatchResponse, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def update_export_settings( - self, - connection_rid: connectivity_models.ConnectionRid, - *, - export_settings: connectivity_models.ConnectionExportSettings, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> None: - """ - Updates the [export settings on the Connection.](https://palantir.com/docs/foundry/data-connection/export-overview/#enable-exports-for-source) - Only users with Information Security Officer role can modify the export settings. - - :param connection_rid: - :type connection_rid: ConnectionRid - :param export_settings: - :type export_settings: ConnectionExportSettings - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: None - - :raises ConnectionNotFound: The given Connection could not be found. - :raises UpdateExportSettingsForConnectionPermissionDenied: Could not updateExportSettings the Connection. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/connectivity/connections/{connectionRid}/updateExportSettings", - query_params={ - "preview": preview, - }, - path_params={ - "connectionRid": connection_rid, - }, - header_params={ - "Content-Type": "application/json", - }, - body=connectivity_models.UpdateExportSettingsForConnectionRequest( - export_settings=export_settings, - ), - response_type=None, - request_timeout=request_timeout, - throwable_errors={ - "ConnectionNotFound": connectivity_errors.ConnectionNotFound, - "UpdateExportSettingsForConnectionPermissionDenied": connectivity_errors.UpdateExportSettingsForConnectionPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def update_secrets( - self, - connection_rid: connectivity_models.ConnectionRid, - *, - secrets: typing.Dict[connectivity_models.SecretName, connectivity_models.PlaintextValue], - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> None: - """ - Updates the secrets on the connection to the specified secret values. - Secrets that are currently configured on the connection but are omitted in the request will remain unchanged. - - Secrets are transmitted over the network encrypted using TLS. Once the secrets reach Foundry's servers, - they will be temporarily decrypted and remain in plaintext in memory to be processed as needed. - They will stay in plaintext in memory until the garbage collection process cleans up the memory. - The secrets are always stored encrypted on our servers. - - By using this endpoint, you acknowledge and accept any potential risks associated with the temporary - in-memory handling of secrets. If you do not want your secrets to be temporarily decrypted, you should - use the Foundry UI instead. - - :param connection_rid: - :type connection_rid: ConnectionRid - :param secrets: The secrets to be updated. The specified secret names must already be configured on the connection. - :type secrets: Dict[SecretName, PlaintextValue] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: None - - :raises ConnectionNotFound: The given Connection could not be found. - :raises SecretNamesDoNotExist: The secret names provided do not exist on the connection. - :raises UpdateSecretsForConnectionPermissionDenied: Could not update secrets for the Connection. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/connectivity/connections/{connectionRid}/updateSecrets", - query_params={}, - path_params={ - "connectionRid": connection_rid, - }, - header_params={ - "Content-Type": "application/json", - }, - body=connectivity_models.UpdateSecretsForConnectionRequest( - secrets=secrets, - ), - response_type=None, - request_timeout=request_timeout, - throwable_errors={ - "ConnectionNotFound": connectivity_errors.ConnectionNotFound, - "SecretNamesDoNotExist": connectivity_errors.SecretNamesDoNotExist, - "UpdateSecretsForConnectionPermissionDenied": connectivity_errors.UpdateSecretsForConnectionPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def upload_custom_jdbc_drivers( - self, - connection_rid: connectivity_models.ConnectionRid, - body: bytes, - *, - file_name: str, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> connectivity_models.Connection: - """ - Upload custom jdbc drivers to an existing JDBC connection. - The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`. - - :param connection_rid: - :type connection_rid: ConnectionRid - :param body: Body of the request - :type body: bytes - :param file_name: The file name of the uploaded JDBC driver. Must end with .jar - :type file_name: str - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: connectivity_models.Connection - - :raises ConnectionNotFound: The given Connection could not be found. - :raises UploadCustomJdbcDriversConnectionPermissionDenied: Could not uploadCustomJdbcDrivers the Connection. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/connectivity/connections/{connectionRid}/uploadCustomJdbcDrivers", - query_params={ - "fileName": file_name, - "preview": preview, - }, - path_params={ - "connectionRid": connection_rid, - }, - header_params={ - "Content-Type": "application/octet-stream", - "Accept": "application/json", - }, - body=body, - response_type=connectivity_models.Connection, - request_timeout=request_timeout, - throwable_errors={ - "ConnectionNotFound": connectivity_errors.ConnectionNotFound, - "UploadCustomJdbcDriversConnectionPermissionDenied": connectivity_errors.UploadCustomJdbcDriversConnectionPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _ConnectionClientRaw: - def __init__(self, client: ConnectionClient) -> None: - def create(_: connectivity_models.Connection): ... - def get(_: connectivity_models.Connection): ... - def get_configuration(_: connectivity_models.ConnectionConfiguration): ... - def get_configuration_batch( - _: connectivity_models.GetConfigurationConnectionsBatchResponse, - ): ... - def update_export_settings(_: None): ... - def update_secrets(_: None): ... - def upload_custom_jdbc_drivers(_: connectivity_models.Connection): ... - - self.create = core.with_raw_response(create, client.create) - self.get = core.with_raw_response(get, client.get) - self.get_configuration = core.with_raw_response(get_configuration, client.get_configuration) - self.get_configuration_batch = core.with_raw_response( - get_configuration_batch, client.get_configuration_batch - ) - self.update_export_settings = core.with_raw_response( - update_export_settings, client.update_export_settings - ) - self.update_secrets = core.with_raw_response(update_secrets, client.update_secrets) - self.upload_custom_jdbc_drivers = core.with_raw_response( - upload_custom_jdbc_drivers, client.upload_custom_jdbc_drivers - ) - - -class _ConnectionClientStreaming: - def __init__(self, client: ConnectionClient) -> None: - def create(_: connectivity_models.Connection): ... - def get(_: connectivity_models.Connection): ... - def get_configuration(_: connectivity_models.ConnectionConfiguration): ... - def get_configuration_batch( - _: connectivity_models.GetConfigurationConnectionsBatchResponse, - ): ... - def upload_custom_jdbc_drivers(_: connectivity_models.Connection): ... - - self.create = core.with_streaming_response(create, client.create) - self.get = core.with_streaming_response(get, client.get) - self.get_configuration = core.with_streaming_response( - get_configuration, client.get_configuration - ) - self.get_configuration_batch = core.with_streaming_response( - get_configuration_batch, client.get_configuration_batch - ) - self.upload_custom_jdbc_drivers = core.with_streaming_response( - upload_custom_jdbc_drivers, client.upload_custom_jdbc_drivers - ) - - -class AsyncConnectionClient: - """ - The API client for the Connection Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AsyncConnectionClientStreaming(self) - self.with_raw_response = _AsyncConnectionClientRaw(self) - - @cached_property - def FileImport(self): - from foundry_sdk.v2.connectivity.file_import import AsyncFileImportClient - - return AsyncFileImportClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @cached_property - def TableImport(self): - from foundry_sdk.v2.connectivity.table_import import AsyncTableImportClient - - return AsyncTableImportClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @cached_property - def VirtualTable(self): - from foundry_sdk.v2.connectivity.virtual_table import AsyncVirtualTableClient - - return AsyncVirtualTableClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def create( - self, - *, - configuration: connectivity_models.CreateConnectionRequestConnectionConfiguration, - display_name: connectivity_models.ConnectionDisplayName, - parent_folder_rid: filesystem_models.FolderRid, - worker: connectivity_models.CreateConnectionRequestConnectionWorker, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[connectivity_models.Connection]: - """ - Creates a new Connection with a [direct connection](https://palantir.com/docs/foundry/data-connection/core-concepts/#direct-connection) runtime. - - Any secrets specified in the request body are transmitted over the network encrypted using TLS. Once the - secrets reach Foundry's servers, they will be temporarily decrypted and remain in plaintext in memory to - be processed as needed. They will stay in plaintext in memory until the garbage collection process cleans - up the memory. The secrets are always stored encrypted on our servers. - By using this endpoint, you acknowledge and accept any potential risks associated with the temporary - in-memory handling of secrets. If you do not want your secrets to be temporarily decrypted, you should - use the Foundry UI instead. - - :param configuration: - :type configuration: CreateConnectionRequestConnectionConfiguration - :param display_name: The display name of the Connection. The display name must not be blank. - :type display_name: ConnectionDisplayName - :param parent_folder_rid: - :type parent_folder_rid: FolderRid - :param worker: - :type worker: CreateConnectionRequestConnectionWorker - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[connectivity_models.Connection] - - :raises ConnectionNotFound: The given Connection could not be found. - :raises ConnectionTypeNotSupported: The specified connection is not yet supported in the Platform API. - :raises CreateConnectionPermissionDenied: Could not create the Connection. - :raises FolderNotFound: The given Folder could not be found. - :raises ParentFolderNotFoundForConnection: The parent folder for the specified connection could not be found. - :raises PropertyCannotBeBlank: The specified property cannot be blank. - :raises UnknownWorkerCannotBeUsedForCreatingOrUpdatingConnections: The UnknownWorker cannot be used for creating or updating connections. Please use the Foundry worker instead. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/connectivity/connections", - query_params={ - "preview": preview, - }, - path_params={}, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=connectivity_models.CreateConnectionRequest( - parent_folder_rid=parent_folder_rid, - configuration=configuration, - display_name=display_name, - worker=worker, - ), - response_type=connectivity_models.Connection, - request_timeout=request_timeout, - throwable_errors={ - "ConnectionNotFound": connectivity_errors.ConnectionNotFound, - "ConnectionTypeNotSupported": connectivity_errors.ConnectionTypeNotSupported, - "CreateConnectionPermissionDenied": connectivity_errors.CreateConnectionPermissionDenied, - "FolderNotFound": filesystem_errors.FolderNotFound, - "ParentFolderNotFoundForConnection": connectivity_errors.ParentFolderNotFoundForConnection, - "PropertyCannotBeBlank": connectivity_errors.PropertyCannotBeBlank, - "UnknownWorkerCannotBeUsedForCreatingOrUpdatingConnections": connectivity_errors.UnknownWorkerCannotBeUsedForCreatingOrUpdatingConnections, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - connection_rid: connectivity_models.ConnectionRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[connectivity_models.Connection]: - """ - Get the Connection with the specified rid. - :param connection_rid: - :type connection_rid: ConnectionRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[connectivity_models.Connection] - - :raises ConnectionNotFound: The given Connection could not be found. - :raises ConnectionTypeNotSupported: The specified connection is not yet supported in the Platform API. - :raises ParentFolderNotFoundForConnection: The parent folder for the specified connection could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/connectivity/connections/{connectionRid}", - query_params={ - "preview": preview, - }, - path_params={ - "connectionRid": connection_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=connectivity_models.Connection, - request_timeout=request_timeout, - throwable_errors={ - "ConnectionNotFound": connectivity_errors.ConnectionNotFound, - "ConnectionTypeNotSupported": connectivity_errors.ConnectionTypeNotSupported, - "ParentFolderNotFoundForConnection": connectivity_errors.ParentFolderNotFoundForConnection, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get_configuration( - self, - connection_rid: connectivity_models.ConnectionRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[connectivity_models.ConnectionConfiguration]: - """ - Retrieves the ConnectionConfiguration of the [Connection](https://palantir.com/docs/foundry/data-connection/set-up-source/) itself. - This operation is intended for use when other Connection data is not required, providing a lighter-weight alternative to `getConnection` operation. - - :param connection_rid: - :type connection_rid: ConnectionRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[connectivity_models.ConnectionConfiguration] - - :raises ConnectionNotFound: The given Connection could not be found. - :raises ConnectionTypeNotSupported: The specified connection is not yet supported in the Platform API. - :raises GetConfigurationPermissionDenied: Could not getConfiguration the Connection. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/connectivity/connections/{connectionRid}/getConfiguration", - query_params={ - "preview": preview, - }, - path_params={ - "connectionRid": connection_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=connectivity_models.ConnectionConfiguration, - request_timeout=request_timeout, - throwable_errors={ - "ConnectionNotFound": connectivity_errors.ConnectionNotFound, - "ConnectionTypeNotSupported": connectivity_errors.ConnectionTypeNotSupported, - "GetConfigurationPermissionDenied": connectivity_errors.GetConfigurationPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get_configuration_batch( - self, - body: typing_extensions.Annotated[ - typing.List[connectivity_models.GetConfigurationConnectionsBatchRequestElement], - annotated_types.Len(min_length=1, max_length=200), - ], - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[connectivity_models.GetConfigurationConnectionsBatchResponse]: - """ - Returns a map of Connection RIDs to their corresponding configurations. - Connections are filtered from the response if they don't exist or the requesting token lacks the required permissions. - - - The maximum batch size for this endpoint is 200. - :param body: Body of the request - :type body: List[GetConfigurationConnectionsBatchRequestElement] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[connectivity_models.GetConfigurationConnectionsBatchResponse] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/connectivity/connections/getConfigurationBatch", - query_params={ - "preview": preview, - }, - path_params={}, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=body, - response_type=connectivity_models.GetConfigurationConnectionsBatchResponse, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def update_export_settings( - self, - connection_rid: connectivity_models.ConnectionRid, - *, - export_settings: connectivity_models.ConnectionExportSettings, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[None]: - """ - Updates the [export settings on the Connection.](https://palantir.com/docs/foundry/data-connection/export-overview/#enable-exports-for-source) - Only users with Information Security Officer role can modify the export settings. - - :param connection_rid: - :type connection_rid: ConnectionRid - :param export_settings: - :type export_settings: ConnectionExportSettings - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[None] - - :raises ConnectionNotFound: The given Connection could not be found. - :raises UpdateExportSettingsForConnectionPermissionDenied: Could not updateExportSettings the Connection. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/connectivity/connections/{connectionRid}/updateExportSettings", - query_params={ - "preview": preview, - }, - path_params={ - "connectionRid": connection_rid, - }, - header_params={ - "Content-Type": "application/json", - }, - body=connectivity_models.UpdateExportSettingsForConnectionRequest( - export_settings=export_settings, - ), - response_type=None, - request_timeout=request_timeout, - throwable_errors={ - "ConnectionNotFound": connectivity_errors.ConnectionNotFound, - "UpdateExportSettingsForConnectionPermissionDenied": connectivity_errors.UpdateExportSettingsForConnectionPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def update_secrets( - self, - connection_rid: connectivity_models.ConnectionRid, - *, - secrets: typing.Dict[connectivity_models.SecretName, connectivity_models.PlaintextValue], - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[None]: - """ - Updates the secrets on the connection to the specified secret values. - Secrets that are currently configured on the connection but are omitted in the request will remain unchanged. - - Secrets are transmitted over the network encrypted using TLS. Once the secrets reach Foundry's servers, - they will be temporarily decrypted and remain in plaintext in memory to be processed as needed. - They will stay in plaintext in memory until the garbage collection process cleans up the memory. - The secrets are always stored encrypted on our servers. - - By using this endpoint, you acknowledge and accept any potential risks associated with the temporary - in-memory handling of secrets. If you do not want your secrets to be temporarily decrypted, you should - use the Foundry UI instead. - - :param connection_rid: - :type connection_rid: ConnectionRid - :param secrets: The secrets to be updated. The specified secret names must already be configured on the connection. - :type secrets: Dict[SecretName, PlaintextValue] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[None] - - :raises ConnectionNotFound: The given Connection could not be found. - :raises SecretNamesDoNotExist: The secret names provided do not exist on the connection. - :raises UpdateSecretsForConnectionPermissionDenied: Could not update secrets for the Connection. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/connectivity/connections/{connectionRid}/updateSecrets", - query_params={}, - path_params={ - "connectionRid": connection_rid, - }, - header_params={ - "Content-Type": "application/json", - }, - body=connectivity_models.UpdateSecretsForConnectionRequest( - secrets=secrets, - ), - response_type=None, - request_timeout=request_timeout, - throwable_errors={ - "ConnectionNotFound": connectivity_errors.ConnectionNotFound, - "SecretNamesDoNotExist": connectivity_errors.SecretNamesDoNotExist, - "UpdateSecretsForConnectionPermissionDenied": connectivity_errors.UpdateSecretsForConnectionPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def upload_custom_jdbc_drivers( - self, - connection_rid: connectivity_models.ConnectionRid, - body: bytes, - *, - file_name: str, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[connectivity_models.Connection]: - """ - Upload custom jdbc drivers to an existing JDBC connection. - The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`. - - :param connection_rid: - :type connection_rid: ConnectionRid - :param body: Body of the request - :type body: bytes - :param file_name: The file name of the uploaded JDBC driver. Must end with .jar - :type file_name: str - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[connectivity_models.Connection] - - :raises ConnectionNotFound: The given Connection could not be found. - :raises UploadCustomJdbcDriversConnectionPermissionDenied: Could not uploadCustomJdbcDrivers the Connection. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/connectivity/connections/{connectionRid}/uploadCustomJdbcDrivers", - query_params={ - "fileName": file_name, - "preview": preview, - }, - path_params={ - "connectionRid": connection_rid, - }, - header_params={ - "Content-Type": "application/octet-stream", - "Accept": "application/json", - }, - body=body, - response_type=connectivity_models.Connection, - request_timeout=request_timeout, - throwable_errors={ - "ConnectionNotFound": connectivity_errors.ConnectionNotFound, - "UploadCustomJdbcDriversConnectionPermissionDenied": connectivity_errors.UploadCustomJdbcDriversConnectionPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _AsyncConnectionClientRaw: - def __init__(self, client: AsyncConnectionClient) -> None: - def create(_: connectivity_models.Connection): ... - def get(_: connectivity_models.Connection): ... - def get_configuration(_: connectivity_models.ConnectionConfiguration): ... - def get_configuration_batch( - _: connectivity_models.GetConfigurationConnectionsBatchResponse, - ): ... - def update_export_settings(_: None): ... - def update_secrets(_: None): ... - def upload_custom_jdbc_drivers(_: connectivity_models.Connection): ... - - self.create = core.async_with_raw_response(create, client.create) - self.get = core.async_with_raw_response(get, client.get) - self.get_configuration = core.async_with_raw_response( - get_configuration, client.get_configuration - ) - self.get_configuration_batch = core.async_with_raw_response( - get_configuration_batch, client.get_configuration_batch - ) - self.update_export_settings = core.async_with_raw_response( - update_export_settings, client.update_export_settings - ) - self.update_secrets = core.async_with_raw_response(update_secrets, client.update_secrets) - self.upload_custom_jdbc_drivers = core.async_with_raw_response( - upload_custom_jdbc_drivers, client.upload_custom_jdbc_drivers - ) - - -class _AsyncConnectionClientStreaming: - def __init__(self, client: AsyncConnectionClient) -> None: - def create(_: connectivity_models.Connection): ... - def get(_: connectivity_models.Connection): ... - def get_configuration(_: connectivity_models.ConnectionConfiguration): ... - def get_configuration_batch( - _: connectivity_models.GetConfigurationConnectionsBatchResponse, - ): ... - def upload_custom_jdbc_drivers(_: connectivity_models.Connection): ... - - self.create = core.async_with_streaming_response(create, client.create) - self.get = core.async_with_streaming_response(get, client.get) - self.get_configuration = core.async_with_streaming_response( - get_configuration, client.get_configuration - ) - self.get_configuration_batch = core.async_with_streaming_response( - get_configuration_batch, client.get_configuration_batch - ) - self.upload_custom_jdbc_drivers = core.async_with_streaming_response( - upload_custom_jdbc_drivers, client.upload_custom_jdbc_drivers - ) diff --git a/foundry_sdk/v2/connectivity/errors.py b/foundry_sdk/v2/connectivity/errors.py deleted file mode 100644 index 049d472c7..000000000 --- a/foundry_sdk/v2/connectivity/errors.py +++ /dev/null @@ -1,780 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing -from dataclasses import dataclass - -import typing_extensions - -from foundry_sdk import _errors as errors -from foundry_sdk.v2.connectivity import models as connectivity_models -from foundry_sdk.v2.core import models as core_models -from foundry_sdk.v2.filesystem import models as filesystem_models - - -class AdditionalSecretsMustBeSpecifiedAsPlaintextValueMapParameters(typing_extensions.TypedDict): - """The additional secrets must be specified as a plaintext value map.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class AdditionalSecretsMustBeSpecifiedAsPlaintextValueMap(errors.BadRequestError): - name: typing.Literal["AdditionalSecretsMustBeSpecifiedAsPlaintextValueMap"] - parameters: AdditionalSecretsMustBeSpecifiedAsPlaintextValueMapParameters - error_instance_id: str - - -class ConnectionDetailsNotDeterminedParameters(typing_extensions.TypedDict): - """Details of the connection (such as which types of import it supports) could not be determined.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - connectionRid: connectivity_models.ConnectionRid - connectionType: str - - -@dataclass -class ConnectionDetailsNotDetermined(errors.InternalServerError): - name: typing.Literal["ConnectionDetailsNotDetermined"] - parameters: ConnectionDetailsNotDeterminedParameters - error_instance_id: str - - -class ConnectionNotFoundParameters(typing_extensions.TypedDict): - """The given Connection could not be found.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - connectionRid: connectivity_models.ConnectionRid - - -@dataclass -class ConnectionNotFound(errors.NotFoundError): - name: typing.Literal["ConnectionNotFound"] - parameters: ConnectionNotFoundParameters - error_instance_id: str - - -class ConnectionTypeNotSupportedParameters(typing_extensions.TypedDict): - """The specified connection is not yet supported in the Platform API.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - connectionType: str - - -@dataclass -class ConnectionTypeNotSupported(errors.BadRequestError): - name: typing.Literal["ConnectionTypeNotSupported"] - parameters: ConnectionTypeNotSupportedParameters - error_instance_id: str - - -class CreateConnectionPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not create the Connection.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class CreateConnectionPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["CreateConnectionPermissionDenied"] - parameters: CreateConnectionPermissionDeniedParameters - error_instance_id: str - - -class CreateFileImportPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not create the FileImport.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - connectionRid: connectivity_models.ConnectionRid - - -@dataclass -class CreateFileImportPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["CreateFileImportPermissionDenied"] - parameters: CreateFileImportPermissionDeniedParameters - error_instance_id: str - - -class CreateTableImportPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not create the TableImport.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - connectionRid: connectivity_models.ConnectionRid - - -@dataclass -class CreateTableImportPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["CreateTableImportPermissionDenied"] - parameters: CreateTableImportPermissionDeniedParameters - error_instance_id: str - - -class CreateVirtualTablePermissionDeniedParameters(typing_extensions.TypedDict): - """Could not create the VirtualTable.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - connectionRid: connectivity_models.ConnectionRid - - -@dataclass -class CreateVirtualTablePermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["CreateVirtualTablePermissionDenied"] - parameters: CreateVirtualTablePermissionDeniedParameters - error_instance_id: str - - -class DeleteFileImportPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not delete the FileImport.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - fileImportRid: connectivity_models.FileImportRid - connectionRid: connectivity_models.ConnectionRid - - -@dataclass -class DeleteFileImportPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["DeleteFileImportPermissionDenied"] - parameters: DeleteFileImportPermissionDeniedParameters - error_instance_id: str - - -class DeleteTableImportPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not delete the TableImport.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - tableImportRid: connectivity_models.TableImportRid - connectionRid: connectivity_models.ConnectionRid - - -@dataclass -class DeleteTableImportPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["DeleteTableImportPermissionDenied"] - parameters: DeleteTableImportPermissionDeniedParameters - error_instance_id: str - - -class DomainMustUseHttpsWithAuthenticationParameters(typing_extensions.TypedDict): - """The domain must use HTTPS if authentication is required.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class DomainMustUseHttpsWithAuthentication(errors.BadRequestError): - name: typing.Literal["DomainMustUseHttpsWithAuthentication"] - parameters: DomainMustUseHttpsWithAuthenticationParameters - error_instance_id: str - - -class DriverContentMustBeUploadedAsJarParameters(typing_extensions.TypedDict): - """The driver content must be provided as a jar.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - driverName: str - - -@dataclass -class DriverContentMustBeUploadedAsJar(errors.BadRequestError): - name: typing.Literal["DriverContentMustBeUploadedAsJar"] - parameters: DriverContentMustBeUploadedAsJarParameters - error_instance_id: str - - -class DriverJarAlreadyExistsParameters(typing_extensions.TypedDict): - """Duplicate jar with different versions already exists on connection.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - driverName: str - connectionRid: connectivity_models.ConnectionRid - - -@dataclass -class DriverJarAlreadyExists(errors.ConflictError): - name: typing.Literal["DriverJarAlreadyExists"] - parameters: DriverJarAlreadyExistsParameters - error_instance_id: str - - -class EncryptedPropertyMustBeSpecifiedAsPlaintextValueParameters(typing_extensions.TypedDict): - """The encrypted property must be specified as a plaintext value.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - propertyName: str - - -@dataclass -class EncryptedPropertyMustBeSpecifiedAsPlaintextValue(errors.BadRequestError): - name: typing.Literal["EncryptedPropertyMustBeSpecifiedAsPlaintextValue"] - parameters: EncryptedPropertyMustBeSpecifiedAsPlaintextValueParameters - error_instance_id: str - - -class ExecuteFileImportPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not execute the FileImport.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - fileImportRid: connectivity_models.FileImportRid - connectionRid: connectivity_models.ConnectionRid - - -@dataclass -class ExecuteFileImportPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["ExecuteFileImportPermissionDenied"] - parameters: ExecuteFileImportPermissionDeniedParameters - error_instance_id: str - - -class ExecuteTableImportPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not execute the TableImport.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - tableImportRid: connectivity_models.TableImportRid - connectionRid: connectivity_models.ConnectionRid - - -@dataclass -class ExecuteTableImportPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["ExecuteTableImportPermissionDenied"] - parameters: ExecuteTableImportPermissionDeniedParameters - error_instance_id: str - - -class FileAtLeastCountFilterInvalidMinCountParameters(typing_extensions.TypedDict): - """The provided `minFilesCount` property in the FileAtLeastCountFilter must be strictly greater than 0.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - minFilesCount: int - - -@dataclass -class FileAtLeastCountFilterInvalidMinCount(errors.BadRequestError): - name: typing.Literal["FileAtLeastCountFilterInvalidMinCount"] - parameters: FileAtLeastCountFilterInvalidMinCountParameters - error_instance_id: str - - -class FileImportCustomFilterCannotBeUsedToCreateOrUpdateFileImportsParameters( - typing_extensions.TypedDict -): - """ - Custom file import filters can be fetched but cannot currently be used - when creating or updating file imports. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - config: typing.Any - - -@dataclass -class FileImportCustomFilterCannotBeUsedToCreateOrUpdateFileImports(errors.BadRequestError): - name: typing.Literal["FileImportCustomFilterCannotBeUsedToCreateOrUpdateFileImports"] - parameters: FileImportCustomFilterCannotBeUsedToCreateOrUpdateFileImportsParameters - error_instance_id: str - - -class FileImportNotFoundParameters(typing_extensions.TypedDict): - """The given FileImport could not be found.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - fileImportRid: connectivity_models.FileImportRid - connectionRid: connectivity_models.ConnectionRid - - -@dataclass -class FileImportNotFound(errors.NotFoundError): - name: typing.Literal["FileImportNotFound"] - parameters: FileImportNotFoundParameters - error_instance_id: str - - -class FileImportNotSupportedForConnectionParameters(typing_extensions.TypedDict): - """The specified connection does not support file imports.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - connectionRid: connectivity_models.ConnectionRid - - -@dataclass -class FileImportNotSupportedForConnection(errors.BadRequestError): - name: typing.Literal["FileImportNotSupportedForConnection"] - parameters: FileImportNotSupportedForConnectionParameters - error_instance_id: str - - -class FileSizeFilterGreaterThanCannotBeNegativeParameters(typing_extensions.TypedDict): - """The `gt` property in the FileSizeFilter cannot be a negative number.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - gt: core_models.SizeBytes - - -@dataclass -class FileSizeFilterGreaterThanCannotBeNegative(errors.BadRequestError): - name: typing.Literal["FileSizeFilterGreaterThanCannotBeNegative"] - parameters: FileSizeFilterGreaterThanCannotBeNegativeParameters - error_instance_id: str - - -class FileSizeFilterInvalidGreaterThanAndLessThanRangeParameters(typing_extensions.TypedDict): - """ - The provided `gt` and `lt` properties in the FileSizeFilter are invalid. No files will ever - satisfy the provided range. The value specified for `gt` must be strictly less than `lt - 1`. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - gt: core_models.SizeBytes - lt: core_models.SizeBytes - - -@dataclass -class FileSizeFilterInvalidGreaterThanAndLessThanRange(errors.BadRequestError): - name: typing.Literal["FileSizeFilterInvalidGreaterThanAndLessThanRange"] - parameters: FileSizeFilterInvalidGreaterThanAndLessThanRangeParameters - error_instance_id: str - - -class FileSizeFilterLessThanMustBeOneByteOrLargerParameters(typing_extensions.TypedDict): - """The `lt` property in the FileSizeFilter must be at least 1 byte.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - lt: core_models.SizeBytes - - -@dataclass -class FileSizeFilterLessThanMustBeOneByteOrLarger(errors.BadRequestError): - name: typing.Literal["FileSizeFilterLessThanMustBeOneByteOrLarger"] - parameters: FileSizeFilterLessThanMustBeOneByteOrLargerParameters - error_instance_id: str - - -class FileSizeFilterMissingGreaterThanAndLessThanParameters(typing_extensions.TypedDict): - """ - Both the `gt` and `lt` properties are missing from the FileSizeFilter. At least one of these - properties must be present - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class FileSizeFilterMissingGreaterThanAndLessThan(errors.BadRequestError): - name: typing.Literal["FileSizeFilterMissingGreaterThanAndLessThan"] - parameters: FileSizeFilterMissingGreaterThanAndLessThanParameters - error_instance_id: str - - -class FilesCountLimitFilterInvalidLimitParameters(typing_extensions.TypedDict): - """The `filesCount` property in the FilesCountLimitFilter must be strictly greater than 0.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - filesCount: int - - -@dataclass -class FilesCountLimitFilterInvalidLimit(errors.BadRequestError): - name: typing.Literal["FilesCountLimitFilterInvalidLimit"] - parameters: FilesCountLimitFilterInvalidLimitParameters - error_instance_id: str - - -class GetConfigurationPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not getConfiguration the Connection.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - connectionRid: connectivity_models.ConnectionRid - - -@dataclass -class GetConfigurationPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["GetConfigurationPermissionDenied"] - parameters: GetConfigurationPermissionDeniedParameters - error_instance_id: str - - -class HostNameCannotHaveProtocolOrPortParameters(typing_extensions.TypedDict): - """The hostname should not include a protocol (e.g., https://) or port number (e.g., :443).""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - hostName: str - - -@dataclass -class HostNameCannotHaveProtocolOrPort(errors.BadRequestError): - name: typing.Literal["HostNameCannotHaveProtocolOrPort"] - parameters: HostNameCannotHaveProtocolOrPortParameters - error_instance_id: str - - -class InvalidShareNameParameters(typing_extensions.TypedDict): - """The share name is invalid. Share names cannot contain the following characters: \ / : * ? " < > |""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - shareName: str - - -@dataclass -class InvalidShareName(errors.BadRequestError): - name: typing.Literal["InvalidShareName"] - parameters: InvalidShareNameParameters - error_instance_id: str - - -class InvalidVirtualTableConnectionParameters(typing_extensions.TypedDict): - """The specified connection is invalid or inaccessible.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - connection: connectivity_models.ConnectionRid - reason: connectivity_models.InvalidConnectionReason - - -@dataclass -class InvalidVirtualTableConnection(errors.BadRequestError): - name: typing.Literal["InvalidVirtualTableConnection"] - parameters: InvalidVirtualTableConnectionParameters - error_instance_id: str - - -class ParentFolderNotFoundForConnectionParameters(typing_extensions.TypedDict): - """The parent folder for the specified connection could not be found.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - connectionRid: connectivity_models.ConnectionRid - - -@dataclass -class ParentFolderNotFoundForConnection(errors.NotFoundError): - name: typing.Literal["ParentFolderNotFoundForConnection"] - parameters: ParentFolderNotFoundForConnectionParameters - error_instance_id: str - - -class PortNotInRangeParameters(typing_extensions.TypedDict): - """The specified port is not in the valid range (1-65535).""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - port: int - - -@dataclass -class PortNotInRange(errors.BadRequestError): - name: typing.Literal["PortNotInRange"] - parameters: PortNotInRangeParameters - error_instance_id: str - - -class PropertyCannotBeBlankParameters(typing_extensions.TypedDict): - """The specified property cannot be blank.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - propertyName: str - - -@dataclass -class PropertyCannotBeBlank(errors.BadRequestError): - name: typing.Literal["PropertyCannotBeBlank"] - parameters: PropertyCannotBeBlankParameters - error_instance_id: str - - -class PropertyCannotBeEmptyParameters(typing_extensions.TypedDict): - """The specified property cannot be empty.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - propertyName: str - - -@dataclass -class PropertyCannotBeEmpty(errors.BadRequestError): - name: typing.Literal["PropertyCannotBeEmpty"] - parameters: PropertyCannotBeEmptyParameters - error_instance_id: str - - -class ReplaceFileImportPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not replace the FileImport.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - fileImportRid: connectivity_models.FileImportRid - connectionRid: connectivity_models.ConnectionRid - - -@dataclass -class ReplaceFileImportPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["ReplaceFileImportPermissionDenied"] - parameters: ReplaceFileImportPermissionDeniedParameters - error_instance_id: str - - -class ReplaceTableImportPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not replace the TableImport.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - tableImportRid: connectivity_models.TableImportRid - connectionRid: connectivity_models.ConnectionRid - - -@dataclass -class ReplaceTableImportPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["ReplaceTableImportPermissionDenied"] - parameters: ReplaceTableImportPermissionDeniedParameters - error_instance_id: str - - -class SecretNamesDoNotExistParameters(typing_extensions.TypedDict): - """The secret names provided do not exist on the connection.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - connectionRid: connectivity_models.ConnectionRid - secretNames: typing.List[connectivity_models.SecretName] - - -@dataclass -class SecretNamesDoNotExist(errors.BadRequestError): - name: typing.Literal["SecretNamesDoNotExist"] - parameters: SecretNamesDoNotExistParameters - error_instance_id: str - - -class TableImportNotFoundParameters(typing_extensions.TypedDict): - """The given TableImport could not be found.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - tableImportRid: connectivity_models.TableImportRid - connectionRid: connectivity_models.ConnectionRid - - -@dataclass -class TableImportNotFound(errors.NotFoundError): - name: typing.Literal["TableImportNotFound"] - parameters: TableImportNotFoundParameters - error_instance_id: str - - -class TableImportNotSupportedForConnectionParameters(typing_extensions.TypedDict): - """The specified connection does not support creating or replacing a table import with the specified config.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - connectionRid: connectivity_models.ConnectionRid - tableImportType: str - - -@dataclass -class TableImportNotSupportedForConnection(errors.BadRequestError): - name: typing.Literal["TableImportNotSupportedForConnection"] - parameters: TableImportNotSupportedForConnectionParameters - error_instance_id: str - - -class TableImportTypeNotSupportedParameters(typing_extensions.TypedDict): - """The specified table import type is not yet supported in the Platform API.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - tableImportType: str - - -@dataclass -class TableImportTypeNotSupported(errors.InternalServerError): - name: typing.Literal["TableImportTypeNotSupported"] - parameters: TableImportTypeNotSupportedParameters - error_instance_id: str - - -class UnknownWorkerCannotBeUsedForCreatingOrUpdatingConnectionsParameters( - typing_extensions.TypedDict -): - """The UnknownWorker cannot be used for creating or updating connections. Please use the Foundry worker instead.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class UnknownWorkerCannotBeUsedForCreatingOrUpdatingConnections(errors.BadRequestError): - name: typing.Literal["UnknownWorkerCannotBeUsedForCreatingOrUpdatingConnections"] - parameters: UnknownWorkerCannotBeUsedForCreatingOrUpdatingConnectionsParameters - error_instance_id: str - - -class UpdateExportSettingsForConnectionPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not updateExportSettings the Connection.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - connectionRid: connectivity_models.ConnectionRid - - -@dataclass -class UpdateExportSettingsForConnectionPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["UpdateExportSettingsForConnectionPermissionDenied"] - parameters: UpdateExportSettingsForConnectionPermissionDeniedParameters - error_instance_id: str - - -class UpdateSecretsForConnectionPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not update secrets for the Connection.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - connectionRid: connectivity_models.ConnectionRid - - -@dataclass -class UpdateSecretsForConnectionPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["UpdateSecretsForConnectionPermissionDenied"] - parameters: UpdateSecretsForConnectionPermissionDeniedParameters - error_instance_id: str - - -class UploadCustomJdbcDriverNotSupportForConnectionParameters(typing_extensions.TypedDict): - """Only JDBC connections support uploading custom JDBC drivers.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - connectionType: str - - -@dataclass -class UploadCustomJdbcDriverNotSupportForConnection(errors.BadRequestError): - name: typing.Literal["UploadCustomJdbcDriverNotSupportForConnection"] - parameters: UploadCustomJdbcDriverNotSupportForConnectionParameters - error_instance_id: str - - -class UploadCustomJdbcDriversConnectionPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not uploadCustomJdbcDrivers the Connection.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - connectionRid: connectivity_models.ConnectionRid - - -@dataclass -class UploadCustomJdbcDriversConnectionPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["UploadCustomJdbcDriversConnectionPermissionDenied"] - parameters: UploadCustomJdbcDriversConnectionPermissionDeniedParameters - error_instance_id: str - - -class VirtualTableAlreadyExistsParameters(typing_extensions.TypedDict): - """A VirtualTable with the same name already exists in the parent folder.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - parentRid: filesystem_models.FolderRid - name: connectivity_models.TableName - - -@dataclass -class VirtualTableAlreadyExists(errors.ConflictError): - name: typing.Literal["VirtualTableAlreadyExists"] - parameters: VirtualTableAlreadyExistsParameters - error_instance_id: str - - -class VirtualTableRegisterFromSourcePermissionDeniedParameters(typing_extensions.TypedDict): - """User lacks permission to use the specified connection for virtual table registration.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class VirtualTableRegisterFromSourcePermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["VirtualTableRegisterFromSourcePermissionDenied"] - parameters: VirtualTableRegisterFromSourcePermissionDeniedParameters - error_instance_id: str - - -__all__ = [ - "AdditionalSecretsMustBeSpecifiedAsPlaintextValueMap", - "ConnectionDetailsNotDetermined", - "ConnectionNotFound", - "ConnectionTypeNotSupported", - "CreateConnectionPermissionDenied", - "CreateFileImportPermissionDenied", - "CreateTableImportPermissionDenied", - "CreateVirtualTablePermissionDenied", - "DeleteFileImportPermissionDenied", - "DeleteTableImportPermissionDenied", - "DomainMustUseHttpsWithAuthentication", - "DriverContentMustBeUploadedAsJar", - "DriverJarAlreadyExists", - "EncryptedPropertyMustBeSpecifiedAsPlaintextValue", - "ExecuteFileImportPermissionDenied", - "ExecuteTableImportPermissionDenied", - "FileAtLeastCountFilterInvalidMinCount", - "FileImportCustomFilterCannotBeUsedToCreateOrUpdateFileImports", - "FileImportNotFound", - "FileImportNotSupportedForConnection", - "FileSizeFilterGreaterThanCannotBeNegative", - "FileSizeFilterInvalidGreaterThanAndLessThanRange", - "FileSizeFilterLessThanMustBeOneByteOrLarger", - "FileSizeFilterMissingGreaterThanAndLessThan", - "FilesCountLimitFilterInvalidLimit", - "GetConfigurationPermissionDenied", - "HostNameCannotHaveProtocolOrPort", - "InvalidShareName", - "InvalidVirtualTableConnection", - "ParentFolderNotFoundForConnection", - "PortNotInRange", - "PropertyCannotBeBlank", - "PropertyCannotBeEmpty", - "ReplaceFileImportPermissionDenied", - "ReplaceTableImportPermissionDenied", - "SecretNamesDoNotExist", - "TableImportNotFound", - "TableImportNotSupportedForConnection", - "TableImportTypeNotSupported", - "UnknownWorkerCannotBeUsedForCreatingOrUpdatingConnections", - "UpdateExportSettingsForConnectionPermissionDenied", - "UpdateSecretsForConnectionPermissionDenied", - "UploadCustomJdbcDriverNotSupportForConnection", - "UploadCustomJdbcDriversConnectionPermissionDenied", - "VirtualTableAlreadyExists", - "VirtualTableRegisterFromSourcePermissionDenied", -] diff --git a/foundry_sdk/v2/connectivity/file_import.py b/foundry_sdk/v2/connectivity/file_import.py deleted file mode 100644 index 33a168bf2..000000000 --- a/foundry_sdk/v2/connectivity/file_import.py +++ /dev/null @@ -1,937 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing - -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v2.connectivity import errors as connectivity_errors -from foundry_sdk.v2.connectivity import models as connectivity_models -from foundry_sdk.v2.core import models as core_models -from foundry_sdk.v2.datasets import errors as datasets_errors -from foundry_sdk.v2.datasets import models as datasets_models - - -class FileImportClient: - """ - The API client for the FileImport Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _FileImportClientStreaming(self) - self.with_raw_response = _FileImportClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def create( - self, - connection_rid: connectivity_models.ConnectionRid, - *, - dataset_rid: datasets_models.DatasetRid, - display_name: connectivity_models.FileImportDisplayName, - file_import_filters: typing.List[connectivity_models.FileImportFilter], - import_mode: connectivity_models.FileImportMode, - branch_name: typing.Optional[datasets_models.BranchName] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - subfolder: typing.Optional[str] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> connectivity_models.FileImport: - """ - Creates a new FileImport. - :param connection_rid: - :type connection_rid: ConnectionRid - :param dataset_rid: The RID of the output dataset. Can not be modified after the file import is created. - :type dataset_rid: DatasetRid - :param display_name: - :type display_name: FileImportDisplayName - :param file_import_filters: Use filters to limit which files should be imported. Filters are applied in the order they are defined. A different ordering of filters may lead to a more optimized import. [Learn more about optimizing file imports.](https://palantir.com/docs/foundry/data-connection/file-based-syncs/#optimize-file-based-syncs) - :type file_import_filters: List[FileImportFilter] - :param import_mode: - :type import_mode: FileImportMode - :param branch_name: The branch name in the output dataset that will contain the imported data. Defaults to `master` for most enrollments. Can not be modified after the file import is created. - :type branch_name: Optional[BranchName] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param subfolder: A subfolder in the external system that will be imported. If not specified, defaults to the root folder of the external system. - :type subfolder: Optional[str] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: connectivity_models.FileImport - - :raises ConnectionDetailsNotDetermined: Details of the connection (such as which types of import it supports) could not be determined. - :raises ConnectionNotFound: The given Connection could not be found. - :raises CreateFileImportPermissionDenied: Could not create the FileImport. - :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. - :raises FileAtLeastCountFilterInvalidMinCount: The provided `minFilesCount` property in the FileAtLeastCountFilter must be strictly greater than 0. - :raises FileImportCustomFilterCannotBeUsedToCreateOrUpdateFileImports: Custom file import filters can be fetched but cannot currently be used when creating or updating file imports. - :raises FileImportNotSupportedForConnection: The specified connection does not support file imports. - :raises FileSizeFilterGreaterThanCannotBeNegative: The `gt` property in the FileSizeFilter cannot be a negative number. - :raises FileSizeFilterInvalidGreaterThanAndLessThanRange: The provided `gt` and `lt` properties in the FileSizeFilter are invalid. No files will ever satisfy the provided range. The value specified for `gt` must be strictly less than `lt - 1`. - :raises FileSizeFilterLessThanMustBeOneByteOrLarger: The `lt` property in the FileSizeFilter must be at least 1 byte. - :raises FileSizeFilterMissingGreaterThanAndLessThan: Both the `gt` and `lt` properties are missing from the FileSizeFilter. At least one of these properties must be present - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/connectivity/connections/{connectionRid}/fileImports", - query_params={ - "preview": preview, - }, - path_params={ - "connectionRid": connection_rid, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=connectivity_models.CreateFileImportRequest( - dataset_rid=dataset_rid, - import_mode=import_mode, - display_name=display_name, - branch_name=branch_name, - subfolder=subfolder, - file_import_filters=file_import_filters, - ), - response_type=connectivity_models.FileImport, - request_timeout=request_timeout, - throwable_errors={ - "ConnectionDetailsNotDetermined": connectivity_errors.ConnectionDetailsNotDetermined, - "ConnectionNotFound": connectivity_errors.ConnectionNotFound, - "CreateFileImportPermissionDenied": connectivity_errors.CreateFileImportPermissionDenied, - "DatasetNotFound": datasets_errors.DatasetNotFound, - "FileAtLeastCountFilterInvalidMinCount": connectivity_errors.FileAtLeastCountFilterInvalidMinCount, - "FileImportCustomFilterCannotBeUsedToCreateOrUpdateFileImports": connectivity_errors.FileImportCustomFilterCannotBeUsedToCreateOrUpdateFileImports, - "FileImportNotSupportedForConnection": connectivity_errors.FileImportNotSupportedForConnection, - "FileSizeFilterGreaterThanCannotBeNegative": connectivity_errors.FileSizeFilterGreaterThanCannotBeNegative, - "FileSizeFilterInvalidGreaterThanAndLessThanRange": connectivity_errors.FileSizeFilterInvalidGreaterThanAndLessThanRange, - "FileSizeFilterLessThanMustBeOneByteOrLarger": connectivity_errors.FileSizeFilterLessThanMustBeOneByteOrLarger, - "FileSizeFilterMissingGreaterThanAndLessThan": connectivity_errors.FileSizeFilterMissingGreaterThanAndLessThan, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def delete( - self, - connection_rid: connectivity_models.ConnectionRid, - file_import_rid: connectivity_models.FileImportRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> None: - """ - Delete the FileImport with the specified RID. - Deleting the file import does not delete the destination dataset but the dataset will no longer - be updated by this import. - - :param connection_rid: - :type connection_rid: ConnectionRid - :param file_import_rid: - :type file_import_rid: FileImportRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: None - - :raises DeleteFileImportPermissionDenied: Could not delete the FileImport. - :raises FileImportNotFound: The given FileImport could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="DELETE", - resource_path="/v2/connectivity/connections/{connectionRid}/fileImports/{fileImportRid}", - query_params={ - "preview": preview, - }, - path_params={ - "connectionRid": connection_rid, - "fileImportRid": file_import_rid, - }, - header_params={}, - body=None, - response_type=None, - request_timeout=request_timeout, - throwable_errors={ - "DeleteFileImportPermissionDenied": connectivity_errors.DeleteFileImportPermissionDenied, - "FileImportNotFound": connectivity_errors.FileImportNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def execute( - self, - connection_rid: connectivity_models.ConnectionRid, - file_import_rid: connectivity_models.FileImportRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core_models.BuildRid: - """ - Executes the FileImport, which runs asynchronously as a [Foundry Build](https://palantir.com/docs/foundry/data-integration/builds/). - The returned BuildRid can be used to check the status via the Orchestration API. - - :param connection_rid: - :type connection_rid: ConnectionRid - :param file_import_rid: - :type file_import_rid: FileImportRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core_models.BuildRid - - :raises ExecuteFileImportPermissionDenied: Could not execute the FileImport. - :raises FileImportNotFound: The given FileImport could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/connectivity/connections/{connectionRid}/fileImports/{fileImportRid}/execute", - query_params={ - "preview": preview, - }, - path_params={ - "connectionRid": connection_rid, - "fileImportRid": file_import_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=core_models.BuildRid, - request_timeout=request_timeout, - throwable_errors={ - "ExecuteFileImportPermissionDenied": connectivity_errors.ExecuteFileImportPermissionDenied, - "FileImportNotFound": connectivity_errors.FileImportNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - connection_rid: connectivity_models.ConnectionRid, - file_import_rid: connectivity_models.FileImportRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> connectivity_models.FileImport: - """ - Get the FileImport with the specified rid. - :param connection_rid: - :type connection_rid: ConnectionRid - :param file_import_rid: - :type file_import_rid: FileImportRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: connectivity_models.FileImport - - :raises FileImportNotFound: The given FileImport could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/connectivity/connections/{connectionRid}/fileImports/{fileImportRid}", - query_params={ - "preview": preview, - }, - path_params={ - "connectionRid": connection_rid, - "fileImportRid": file_import_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=connectivity_models.FileImport, - request_timeout=request_timeout, - throwable_errors={ - "FileImportNotFound": connectivity_errors.FileImportNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def list( - self, - connection_rid: connectivity_models.ConnectionRid, - *, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.ResourceIterator[connectivity_models.FileImport]: - """ - Lists all file imports defined for this connection. - Only file imports that the user has permissions to view will be returned. - - :param connection_rid: - :type connection_rid: ConnectionRid - :param page_size: The page size to use for the endpoint. - :type page_size: Optional[PageSize] - :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. - :type page_token: Optional[PageToken] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.ResourceIterator[connectivity_models.FileImport] - - :raises ConnectionNotFound: The given Connection could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/connectivity/connections/{connectionRid}/fileImports", - query_params={ - "pageSize": page_size, - "pageToken": page_token, - "preview": preview, - }, - path_params={ - "connectionRid": connection_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=connectivity_models.ListFileImportsResponse, - request_timeout=request_timeout, - throwable_errors={ - "ConnectionNotFound": connectivity_errors.ConnectionNotFound, - }, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def replace( - self, - connection_rid: connectivity_models.ConnectionRid, - file_import_rid: connectivity_models.FileImportRid, - *, - display_name: connectivity_models.FileImportDisplayName, - file_import_filters: typing.List[connectivity_models.FileImportFilter], - import_mode: connectivity_models.FileImportMode, - preview: typing.Optional[core_models.PreviewMode] = None, - subfolder: typing.Optional[str] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> connectivity_models.FileImport: - """ - Replace the FileImport with the specified rid. - :param connection_rid: - :type connection_rid: ConnectionRid - :param file_import_rid: - :type file_import_rid: FileImportRid - :param display_name: - :type display_name: FileImportDisplayName - :param file_import_filters: Use filters to limit which files should be imported. Filters are applied in the order they are defined. A different ordering of filters may lead to a more optimized import. [Learn more about optimizing file imports.](https://palantir.com/docs/foundry/data-connection/file-based-syncs/#optimize-file-based-syncs) - :type file_import_filters: List[FileImportFilter] - :param import_mode: - :type import_mode: FileImportMode - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param subfolder: A subfolder in the external system that will be imported. If not specified, defaults to the root folder of the external system. - :type subfolder: Optional[str] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: connectivity_models.FileImport - - :raises FileAtLeastCountFilterInvalidMinCount: The provided `minFilesCount` property in the FileAtLeastCountFilter must be strictly greater than 0. - :raises FileImportCustomFilterCannotBeUsedToCreateOrUpdateFileImports: Custom file import filters can be fetched but cannot currently be used when creating or updating file imports. - :raises FileImportNotFound: The given FileImport could not be found. - :raises FileSizeFilterGreaterThanCannotBeNegative: The `gt` property in the FileSizeFilter cannot be a negative number. - :raises FileSizeFilterInvalidGreaterThanAndLessThanRange: The provided `gt` and `lt` properties in the FileSizeFilter are invalid. No files will ever satisfy the provided range. The value specified for `gt` must be strictly less than `lt - 1`. - :raises FileSizeFilterLessThanMustBeOneByteOrLarger: The `lt` property in the FileSizeFilter must be at least 1 byte. - :raises FileSizeFilterMissingGreaterThanAndLessThan: Both the `gt` and `lt` properties are missing from the FileSizeFilter. At least one of these properties must be present - :raises ReplaceFileImportPermissionDenied: Could not replace the FileImport. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="PUT", - resource_path="/v2/connectivity/connections/{connectionRid}/fileImports/{fileImportRid}", - query_params={ - "preview": preview, - }, - path_params={ - "connectionRid": connection_rid, - "fileImportRid": file_import_rid, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=connectivity_models.ReplaceFileImportRequest( - import_mode=import_mode, - display_name=display_name, - subfolder=subfolder, - file_import_filters=file_import_filters, - ), - response_type=connectivity_models.FileImport, - request_timeout=request_timeout, - throwable_errors={ - "FileAtLeastCountFilterInvalidMinCount": connectivity_errors.FileAtLeastCountFilterInvalidMinCount, - "FileImportCustomFilterCannotBeUsedToCreateOrUpdateFileImports": connectivity_errors.FileImportCustomFilterCannotBeUsedToCreateOrUpdateFileImports, - "FileImportNotFound": connectivity_errors.FileImportNotFound, - "FileSizeFilterGreaterThanCannotBeNegative": connectivity_errors.FileSizeFilterGreaterThanCannotBeNegative, - "FileSizeFilterInvalidGreaterThanAndLessThanRange": connectivity_errors.FileSizeFilterInvalidGreaterThanAndLessThanRange, - "FileSizeFilterLessThanMustBeOneByteOrLarger": connectivity_errors.FileSizeFilterLessThanMustBeOneByteOrLarger, - "FileSizeFilterMissingGreaterThanAndLessThan": connectivity_errors.FileSizeFilterMissingGreaterThanAndLessThan, - "ReplaceFileImportPermissionDenied": connectivity_errors.ReplaceFileImportPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _FileImportClientRaw: - def __init__(self, client: FileImportClient) -> None: - def create(_: connectivity_models.FileImport): ... - def delete(_: None): ... - def execute(_: core_models.BuildRid): ... - def get(_: connectivity_models.FileImport): ... - def list(_: connectivity_models.ListFileImportsResponse): ... - def replace(_: connectivity_models.FileImport): ... - - self.create = core.with_raw_response(create, client.create) - self.delete = core.with_raw_response(delete, client.delete) - self.execute = core.with_raw_response(execute, client.execute) - self.get = core.with_raw_response(get, client.get) - self.list = core.with_raw_response(list, client.list) - self.replace = core.with_raw_response(replace, client.replace) - - -class _FileImportClientStreaming: - def __init__(self, client: FileImportClient) -> None: - def create(_: connectivity_models.FileImport): ... - def execute(_: core_models.BuildRid): ... - def get(_: connectivity_models.FileImport): ... - def list(_: connectivity_models.ListFileImportsResponse): ... - def replace(_: connectivity_models.FileImport): ... - - self.create = core.with_streaming_response(create, client.create) - self.execute = core.with_streaming_response(execute, client.execute) - self.get = core.with_streaming_response(get, client.get) - self.list = core.with_streaming_response(list, client.list) - self.replace = core.with_streaming_response(replace, client.replace) - - -class AsyncFileImportClient: - """ - The API client for the FileImport Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AsyncFileImportClientStreaming(self) - self.with_raw_response = _AsyncFileImportClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def create( - self, - connection_rid: connectivity_models.ConnectionRid, - *, - dataset_rid: datasets_models.DatasetRid, - display_name: connectivity_models.FileImportDisplayName, - file_import_filters: typing.List[connectivity_models.FileImportFilter], - import_mode: connectivity_models.FileImportMode, - branch_name: typing.Optional[datasets_models.BranchName] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - subfolder: typing.Optional[str] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[connectivity_models.FileImport]: - """ - Creates a new FileImport. - :param connection_rid: - :type connection_rid: ConnectionRid - :param dataset_rid: The RID of the output dataset. Can not be modified after the file import is created. - :type dataset_rid: DatasetRid - :param display_name: - :type display_name: FileImportDisplayName - :param file_import_filters: Use filters to limit which files should be imported. Filters are applied in the order they are defined. A different ordering of filters may lead to a more optimized import. [Learn more about optimizing file imports.](https://palantir.com/docs/foundry/data-connection/file-based-syncs/#optimize-file-based-syncs) - :type file_import_filters: List[FileImportFilter] - :param import_mode: - :type import_mode: FileImportMode - :param branch_name: The branch name in the output dataset that will contain the imported data. Defaults to `master` for most enrollments. Can not be modified after the file import is created. - :type branch_name: Optional[BranchName] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param subfolder: A subfolder in the external system that will be imported. If not specified, defaults to the root folder of the external system. - :type subfolder: Optional[str] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[connectivity_models.FileImport] - - :raises ConnectionDetailsNotDetermined: Details of the connection (such as which types of import it supports) could not be determined. - :raises ConnectionNotFound: The given Connection could not be found. - :raises CreateFileImportPermissionDenied: Could not create the FileImport. - :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. - :raises FileAtLeastCountFilterInvalidMinCount: The provided `minFilesCount` property in the FileAtLeastCountFilter must be strictly greater than 0. - :raises FileImportCustomFilterCannotBeUsedToCreateOrUpdateFileImports: Custom file import filters can be fetched but cannot currently be used when creating or updating file imports. - :raises FileImportNotSupportedForConnection: The specified connection does not support file imports. - :raises FileSizeFilterGreaterThanCannotBeNegative: The `gt` property in the FileSizeFilter cannot be a negative number. - :raises FileSizeFilterInvalidGreaterThanAndLessThanRange: The provided `gt` and `lt` properties in the FileSizeFilter are invalid. No files will ever satisfy the provided range. The value specified for `gt` must be strictly less than `lt - 1`. - :raises FileSizeFilterLessThanMustBeOneByteOrLarger: The `lt` property in the FileSizeFilter must be at least 1 byte. - :raises FileSizeFilterMissingGreaterThanAndLessThan: Both the `gt` and `lt` properties are missing from the FileSizeFilter. At least one of these properties must be present - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/connectivity/connections/{connectionRid}/fileImports", - query_params={ - "preview": preview, - }, - path_params={ - "connectionRid": connection_rid, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=connectivity_models.CreateFileImportRequest( - dataset_rid=dataset_rid, - import_mode=import_mode, - display_name=display_name, - branch_name=branch_name, - subfolder=subfolder, - file_import_filters=file_import_filters, - ), - response_type=connectivity_models.FileImport, - request_timeout=request_timeout, - throwable_errors={ - "ConnectionDetailsNotDetermined": connectivity_errors.ConnectionDetailsNotDetermined, - "ConnectionNotFound": connectivity_errors.ConnectionNotFound, - "CreateFileImportPermissionDenied": connectivity_errors.CreateFileImportPermissionDenied, - "DatasetNotFound": datasets_errors.DatasetNotFound, - "FileAtLeastCountFilterInvalidMinCount": connectivity_errors.FileAtLeastCountFilterInvalidMinCount, - "FileImportCustomFilterCannotBeUsedToCreateOrUpdateFileImports": connectivity_errors.FileImportCustomFilterCannotBeUsedToCreateOrUpdateFileImports, - "FileImportNotSupportedForConnection": connectivity_errors.FileImportNotSupportedForConnection, - "FileSizeFilterGreaterThanCannotBeNegative": connectivity_errors.FileSizeFilterGreaterThanCannotBeNegative, - "FileSizeFilterInvalidGreaterThanAndLessThanRange": connectivity_errors.FileSizeFilterInvalidGreaterThanAndLessThanRange, - "FileSizeFilterLessThanMustBeOneByteOrLarger": connectivity_errors.FileSizeFilterLessThanMustBeOneByteOrLarger, - "FileSizeFilterMissingGreaterThanAndLessThan": connectivity_errors.FileSizeFilterMissingGreaterThanAndLessThan, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def delete( - self, - connection_rid: connectivity_models.ConnectionRid, - file_import_rid: connectivity_models.FileImportRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[None]: - """ - Delete the FileImport with the specified RID. - Deleting the file import does not delete the destination dataset but the dataset will no longer - be updated by this import. - - :param connection_rid: - :type connection_rid: ConnectionRid - :param file_import_rid: - :type file_import_rid: FileImportRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[None] - - :raises DeleteFileImportPermissionDenied: Could not delete the FileImport. - :raises FileImportNotFound: The given FileImport could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="DELETE", - resource_path="/v2/connectivity/connections/{connectionRid}/fileImports/{fileImportRid}", - query_params={ - "preview": preview, - }, - path_params={ - "connectionRid": connection_rid, - "fileImportRid": file_import_rid, - }, - header_params={}, - body=None, - response_type=None, - request_timeout=request_timeout, - throwable_errors={ - "DeleteFileImportPermissionDenied": connectivity_errors.DeleteFileImportPermissionDenied, - "FileImportNotFound": connectivity_errors.FileImportNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def execute( - self, - connection_rid: connectivity_models.ConnectionRid, - file_import_rid: connectivity_models.FileImportRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[core_models.BuildRid]: - """ - Executes the FileImport, which runs asynchronously as a [Foundry Build](https://palantir.com/docs/foundry/data-integration/builds/). - The returned BuildRid can be used to check the status via the Orchestration API. - - :param connection_rid: - :type connection_rid: ConnectionRid - :param file_import_rid: - :type file_import_rid: FileImportRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[core_models.BuildRid] - - :raises ExecuteFileImportPermissionDenied: Could not execute the FileImport. - :raises FileImportNotFound: The given FileImport could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/connectivity/connections/{connectionRid}/fileImports/{fileImportRid}/execute", - query_params={ - "preview": preview, - }, - path_params={ - "connectionRid": connection_rid, - "fileImportRid": file_import_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=core_models.BuildRid, - request_timeout=request_timeout, - throwable_errors={ - "ExecuteFileImportPermissionDenied": connectivity_errors.ExecuteFileImportPermissionDenied, - "FileImportNotFound": connectivity_errors.FileImportNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - connection_rid: connectivity_models.ConnectionRid, - file_import_rid: connectivity_models.FileImportRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[connectivity_models.FileImport]: - """ - Get the FileImport with the specified rid. - :param connection_rid: - :type connection_rid: ConnectionRid - :param file_import_rid: - :type file_import_rid: FileImportRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[connectivity_models.FileImport] - - :raises FileImportNotFound: The given FileImport could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/connectivity/connections/{connectionRid}/fileImports/{fileImportRid}", - query_params={ - "preview": preview, - }, - path_params={ - "connectionRid": connection_rid, - "fileImportRid": file_import_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=connectivity_models.FileImport, - request_timeout=request_timeout, - throwable_errors={ - "FileImportNotFound": connectivity_errors.FileImportNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def list( - self, - connection_rid: connectivity_models.ConnectionRid, - *, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.AsyncResourceIterator[connectivity_models.FileImport]: - """ - Lists all file imports defined for this connection. - Only file imports that the user has permissions to view will be returned. - - :param connection_rid: - :type connection_rid: ConnectionRid - :param page_size: The page size to use for the endpoint. - :type page_size: Optional[PageSize] - :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. - :type page_token: Optional[PageToken] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.AsyncResourceIterator[connectivity_models.FileImport] - - :raises ConnectionNotFound: The given Connection could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/connectivity/connections/{connectionRid}/fileImports", - query_params={ - "pageSize": page_size, - "pageToken": page_token, - "preview": preview, - }, - path_params={ - "connectionRid": connection_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=connectivity_models.ListFileImportsResponse, - request_timeout=request_timeout, - throwable_errors={ - "ConnectionNotFound": connectivity_errors.ConnectionNotFound, - }, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def replace( - self, - connection_rid: connectivity_models.ConnectionRid, - file_import_rid: connectivity_models.FileImportRid, - *, - display_name: connectivity_models.FileImportDisplayName, - file_import_filters: typing.List[connectivity_models.FileImportFilter], - import_mode: connectivity_models.FileImportMode, - preview: typing.Optional[core_models.PreviewMode] = None, - subfolder: typing.Optional[str] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[connectivity_models.FileImport]: - """ - Replace the FileImport with the specified rid. - :param connection_rid: - :type connection_rid: ConnectionRid - :param file_import_rid: - :type file_import_rid: FileImportRid - :param display_name: - :type display_name: FileImportDisplayName - :param file_import_filters: Use filters to limit which files should be imported. Filters are applied in the order they are defined. A different ordering of filters may lead to a more optimized import. [Learn more about optimizing file imports.](https://palantir.com/docs/foundry/data-connection/file-based-syncs/#optimize-file-based-syncs) - :type file_import_filters: List[FileImportFilter] - :param import_mode: - :type import_mode: FileImportMode - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param subfolder: A subfolder in the external system that will be imported. If not specified, defaults to the root folder of the external system. - :type subfolder: Optional[str] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[connectivity_models.FileImport] - - :raises FileAtLeastCountFilterInvalidMinCount: The provided `minFilesCount` property in the FileAtLeastCountFilter must be strictly greater than 0. - :raises FileImportCustomFilterCannotBeUsedToCreateOrUpdateFileImports: Custom file import filters can be fetched but cannot currently be used when creating or updating file imports. - :raises FileImportNotFound: The given FileImport could not be found. - :raises FileSizeFilterGreaterThanCannotBeNegative: The `gt` property in the FileSizeFilter cannot be a negative number. - :raises FileSizeFilterInvalidGreaterThanAndLessThanRange: The provided `gt` and `lt` properties in the FileSizeFilter are invalid. No files will ever satisfy the provided range. The value specified for `gt` must be strictly less than `lt - 1`. - :raises FileSizeFilterLessThanMustBeOneByteOrLarger: The `lt` property in the FileSizeFilter must be at least 1 byte. - :raises FileSizeFilterMissingGreaterThanAndLessThan: Both the `gt` and `lt` properties are missing from the FileSizeFilter. At least one of these properties must be present - :raises ReplaceFileImportPermissionDenied: Could not replace the FileImport. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="PUT", - resource_path="/v2/connectivity/connections/{connectionRid}/fileImports/{fileImportRid}", - query_params={ - "preview": preview, - }, - path_params={ - "connectionRid": connection_rid, - "fileImportRid": file_import_rid, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=connectivity_models.ReplaceFileImportRequest( - import_mode=import_mode, - display_name=display_name, - subfolder=subfolder, - file_import_filters=file_import_filters, - ), - response_type=connectivity_models.FileImport, - request_timeout=request_timeout, - throwable_errors={ - "FileAtLeastCountFilterInvalidMinCount": connectivity_errors.FileAtLeastCountFilterInvalidMinCount, - "FileImportCustomFilterCannotBeUsedToCreateOrUpdateFileImports": connectivity_errors.FileImportCustomFilterCannotBeUsedToCreateOrUpdateFileImports, - "FileImportNotFound": connectivity_errors.FileImportNotFound, - "FileSizeFilterGreaterThanCannotBeNegative": connectivity_errors.FileSizeFilterGreaterThanCannotBeNegative, - "FileSizeFilterInvalidGreaterThanAndLessThanRange": connectivity_errors.FileSizeFilterInvalidGreaterThanAndLessThanRange, - "FileSizeFilterLessThanMustBeOneByteOrLarger": connectivity_errors.FileSizeFilterLessThanMustBeOneByteOrLarger, - "FileSizeFilterMissingGreaterThanAndLessThan": connectivity_errors.FileSizeFilterMissingGreaterThanAndLessThan, - "ReplaceFileImportPermissionDenied": connectivity_errors.ReplaceFileImportPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _AsyncFileImportClientRaw: - def __init__(self, client: AsyncFileImportClient) -> None: - def create(_: connectivity_models.FileImport): ... - def delete(_: None): ... - def execute(_: core_models.BuildRid): ... - def get(_: connectivity_models.FileImport): ... - def list(_: connectivity_models.ListFileImportsResponse): ... - def replace(_: connectivity_models.FileImport): ... - - self.create = core.async_with_raw_response(create, client.create) - self.delete = core.async_with_raw_response(delete, client.delete) - self.execute = core.async_with_raw_response(execute, client.execute) - self.get = core.async_with_raw_response(get, client.get) - self.list = core.async_with_raw_response(list, client.list) - self.replace = core.async_with_raw_response(replace, client.replace) - - -class _AsyncFileImportClientStreaming: - def __init__(self, client: AsyncFileImportClient) -> None: - def create(_: connectivity_models.FileImport): ... - def execute(_: core_models.BuildRid): ... - def get(_: connectivity_models.FileImport): ... - def list(_: connectivity_models.ListFileImportsResponse): ... - def replace(_: connectivity_models.FileImport): ... - - self.create = core.async_with_streaming_response(create, client.create) - self.execute = core.async_with_streaming_response(execute, client.execute) - self.get = core.async_with_streaming_response(get, client.get) - self.list = core.async_with_streaming_response(list, client.list) - self.replace = core.async_with_streaming_response(replace, client.replace) diff --git a/foundry_sdk/v2/connectivity/models.py b/foundry_sdk/v2/connectivity/models.py deleted file mode 100644 index 83cc2779f..000000000 --- a/foundry_sdk/v2/connectivity/models.py +++ /dev/null @@ -1,2268 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -from __future__ import annotations - -import decimal -import typing -from datetime import date - -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk.v2.core import models as core_models -from foundry_sdk.v2.datasets import models as datasets_models -from foundry_sdk.v2.filesystem import models as filesystem_models - - -class ApiKeyAuthentication(core.ModelBase): - """ - The API key used to authenticate to the external system. - This can be configured as a header or query parameter. - """ - - location: RestRequestApiKeyLocation - """The location of the API key in the request.""" - - api_key: EncryptedProperty = pydantic.Field(alias=str("apiKey")) # type: ignore[literal-required] - """The value of the API key.""" - - type: typing.Literal["apiKey"] = "apiKey" - - -class AsPlaintextValue(core.ModelBase): - """AsPlaintextValue""" - - value: PlaintextValue - type: typing.Literal["asPlaintextValue"] = "asPlaintextValue" - - -class AsSecretName(core.ModelBase): - """AsSecretName""" - - value: SecretName - type: typing.Literal["asSecretName"] = "asSecretName" - - -class AwsAccessKey(core.ModelBase): - """ - [Access keys](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html) are long-term - credentials for an IAM user or the AWS account root user. - Access keys consist of two parts: an access key ID (for example, AKIAIOSFODNN7EXAMPLE) and a secret access - key (for example, wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY). You must use both the access key ID and - secret access key together to authenticate your requests. - """ - - access_key_id: str = pydantic.Field(alias=str("accessKeyId")) # type: ignore[literal-required] - secret_access_key: EncryptedProperty = pydantic.Field(alias=str("secretAccessKey")) # type: ignore[literal-required] - type: typing.Literal["awsAccessKey"] = "awsAccessKey" - - -class AwsOidcAuthentication(core.ModelBase): - """ - [OpenID Connect (OIDC)](https://palantir.com/docs/foundry/data-connection/oidc/) is an open authentication protocol that allows - you to authenticate to external system resources without the use of static credentials. - """ - - audience: str - """The configured audience that identifies the external system.""" - - issuer_url: str = pydantic.Field(alias=str("issuerUrl")) # type: ignore[literal-required] - """The URL that identifies Foundry as an OIDC identity provider.""" - - subject: ConnectionRid - """The RID of the Connection that is connecting to the external system.""" - - type: typing.Literal["oidc"] = "oidc" - - -class BasicCredentials(core.ModelBase): - """BasicCredentials""" - - username: str - password: EncryptedProperty - type: typing.Literal["basic"] = "basic" - - -class BearerToken(core.ModelBase): - """The bearer token used to authenticate to the external system.""" - - bearer_token: EncryptedProperty = pydantic.Field(alias=str("bearerToken")) # type: ignore[literal-required] - type: typing.Literal["bearerToken"] = "bearerToken" - - -class BigQueryVirtualTableConfig(core.ModelBase): - """Pointer to the table in BigQuery. Uses the BigQuery table identifier of project, dataset and table.""" - - project: str - """The BigQuery project name.""" - - dataset: str - """The BigQuery dataset name.""" - - table: str - """The BigQuery table name.""" - - type: typing.Literal["bigquery"] = "bigquery" - - -class CloudIdentity(core.ModelBase): - """ - [Cloud identities](https://palantir.com/docs/foundry/administration/configure-cloud-identities/) allow you to authenticate to - cloud provider resources without the use of static credentials. - """ - - cloud_identity_rid: CloudIdentityRid = pydantic.Field(alias=str("cloudIdentityRid")) # type: ignore[literal-required] - type: typing.Literal["cloudIdentity"] = "cloudIdentity" - - -CloudIdentityRid = core.RID -"""The Resource Identifier (RID) of a Cloud Identity.""" - - -class Connection(core.ModelBase): - """Connection""" - - rid: ConnectionRid - parent_folder_rid: filesystem_models.FolderRid = pydantic.Field(alias=str("parentFolderRid")) # type: ignore[literal-required] - display_name: ConnectionDisplayName = pydantic.Field(alias=str("displayName")) # type: ignore[literal-required] - """The display name of the Connection. The display name must not be blank.""" - - export_settings: ConnectionExportSettings = pydantic.Field(alias=str("exportSettings")) # type: ignore[literal-required] - worker: ConnectionWorker - configuration: ConnectionConfiguration - - -ConnectionConfiguration = typing_extensions.Annotated[ - typing.Union[ - "S3ConnectionConfiguration", - "RestConnectionConfiguration", - "SnowflakeConnectionConfiguration", - "DatabricksConnectionConfiguration", - "SmbConnectionConfiguration", - "JdbcConnectionConfiguration", - ], - pydantic.Field(discriminator="type"), -] -"""ConnectionConfiguration""" - - -ConnectionDisplayName = str -"""The display name of the Connection. The display name must not be blank.""" - - -class ConnectionExportSettings(core.ModelBase): - """The [export settings of a Connection](https://palantir.com/docs/foundry/data-connection/export-overview/#enable-exports-for-source).""" - - exports_enabled: bool = pydantic.Field(alias=str("exportsEnabled")) # type: ignore[literal-required] - """Allow exporting datasets from Foundry to this Connection.""" - - export_enabled_without_markings_validation: bool = pydantic.Field(alias=str("exportEnabledWithoutMarkingsValidation")) # type: ignore[literal-required] - """ - In certain interactive workflows the Connection can be used in, it is not currently possible to validate the - security markings of the data being exported. - By enabling exports without markings validation, you acknowledge that you are responsible for ensuring - that the data being exported is compliant with your organization's policies. - """ - - -ConnectionRid = core.RID -"""The Resource Identifier (RID) of a Connection (also known as a source).""" - - -ConnectionWorker = typing_extensions.Annotated[ - typing.Union["UnknownWorker", "FoundryWorker"], pydantic.Field(discriminator="type") -] -""" -[The worker of a Connection](https://palantir.com/docs/foundry/data-connection/core-concepts/#workers), which defines where -compute for capabilities are run. -""" - - -class CreateConnectionRequest(core.ModelBase): - """CreateConnectionRequest""" - - parent_folder_rid: filesystem_models.FolderRid = pydantic.Field(alias=str("parentFolderRid")) # type: ignore[literal-required] - configuration: CreateConnectionRequestConnectionConfiguration - display_name: ConnectionDisplayName = pydantic.Field(alias=str("displayName")) # type: ignore[literal-required] - """The display name of the Connection. The display name must not be blank.""" - - worker: CreateConnectionRequestConnectionWorker - - -class CreateConnectionRequestAsPlaintextValue(core.ModelBase): - """CreateConnectionRequestAsPlaintextValue""" - - value: PlaintextValue - type: typing.Literal["asPlaintextValue"] = "asPlaintextValue" - - -class CreateConnectionRequestAsSecretName(core.ModelBase): - """CreateConnectionRequestAsSecretName""" - - value: SecretName - type: typing.Literal["asSecretName"] = "asSecretName" - - -class CreateConnectionRequestBasicCredentials(core.ModelBase): - """CreateConnectionRequestBasicCredentials""" - - password: CreateConnectionRequestEncryptedProperty - username: str - type: typing.Literal["basic"] = "basic" - - -CreateConnectionRequestConnectionConfiguration = typing_extensions.Annotated[ - typing.Union[ - "CreateConnectionRequestS3ConnectionConfiguration", - "CreateConnectionRequestRestConnectionConfiguration", - "CreateConnectionRequestSnowflakeConnectionConfiguration", - "CreateConnectionRequestDatabricksConnectionConfiguration", - "CreateConnectionRequestSmbConnectionConfiguration", - "CreateConnectionRequestJdbcConnectionConfiguration", - ], - pydantic.Field(discriminator="type"), -] -"""CreateConnectionRequestConnectionConfiguration""" - - -CreateConnectionRequestConnectionWorker = typing_extensions.Annotated[ - typing.Union["CreateConnectionRequestUnknownWorker", "CreateConnectionRequestFoundryWorker"], - pydantic.Field(discriminator="type"), -] -""" -[The worker of a Connection](https://palantir.com/docs/foundry/data-connection/core-concepts/#workers), which defines where -compute for capabilities are run. -""" - - -CreateConnectionRequestDatabricksAuthenticationMode = typing_extensions.Annotated[ - typing.Union[ - "CreateConnectionRequestWorkflowIdentityFederation", - "CreateConnectionRequestOauthMachineToMachineAuth", - "CreateConnectionRequestPersonalAccessToken", - "CreateConnectionRequestBasicCredentials", - ], - pydantic.Field(discriminator="type"), -] -"""The method of authentication for connecting to an external Databricks system.""" - - -class CreateConnectionRequestDatabricksConnectionConfiguration(core.ModelBase): - """CreateConnectionRequestDatabricksConnectionConfiguration""" - - host_name: str = pydantic.Field(alias=str("hostName")) # type: ignore[literal-required] - """The hostname of the Databricks workspace.""" - - http_path: str = pydantic.Field(alias=str("httpPath")) # type: ignore[literal-required] - """The Databricks compute resource’s HTTP Path value.""" - - jdbc_properties: JdbcProperties = pydantic.Field(alias=str("jdbcProperties")) # type: ignore[literal-required] - authentication: CreateConnectionRequestDatabricksAuthenticationMode - """The method of authentication to use.""" - - type: typing.Literal["databricks"] = "databricks" - - -CreateConnectionRequestEncryptedProperty = typing_extensions.Annotated[ - typing.Union["CreateConnectionRequestAsSecretName", "CreateConnectionRequestAsPlaintextValue"], - pydantic.Field(discriminator="type"), -] -""" -When reading an encrypted property, the secret name representing the encrypted value will be returned. -When writing to an encrypted property: -- If a plaintext value is passed as an input, the plaintext value will be encrypted and saved to the property. -- If a secret name is passed as an input, the secret name must match the existing secret name of the property - and the property will retain its previously encrypted value. -""" - - -class CreateConnectionRequestFoundryWorker(core.ModelBase): - """CreateConnectionRequestFoundryWorker""" - - network_egress_policy_rids: typing.List[NetworkEgressPolicyRid] = pydantic.Field(alias=str("networkEgressPolicyRids")) # type: ignore[literal-required] - type: typing.Literal["foundryWorker"] = "foundryWorker" - - -class CreateConnectionRequestJdbcConnectionConfiguration(core.ModelBase): - """CreateConnectionRequestJdbcConnectionConfiguration""" - - credentials: typing.Optional[BasicCredentials] = None - driver_class: str = pydantic.Field(alias=str("driverClass")) # type: ignore[literal-required] - """The fully-qualified driver class name that is used to connect to the database.""" - - jdbc_properties: JdbcProperties = pydantic.Field(alias=str("jdbcProperties")) # type: ignore[literal-required] - url: str - """The URL that the JDBC driver uses to connect to a database.""" - - type: typing.Literal["jdbc"] = "jdbc" - - -class CreateConnectionRequestOauthMachineToMachineAuth(core.ModelBase): - """CreateConnectionRequestOauthMachineToMachineAuth""" - - client_id: str = pydantic.Field(alias=str("clientID")) # type: ignore[literal-required] - """The client ID for the service principal.""" - - client_secret: CreateConnectionRequestEncryptedProperty = pydantic.Field(alias=str("clientSecret")) # type: ignore[literal-required] - """The value of the client secret.""" - - type: typing.Literal["oauthM2M"] = "oauthM2M" - - -class CreateConnectionRequestPersonalAccessToken(core.ModelBase): - """CreateConnectionRequestPersonalAccessToken""" - - personal_access_token: CreateConnectionRequestEncryptedProperty = pydantic.Field(alias=str("personalAccessToken")) # type: ignore[literal-required] - type: typing.Literal["personalAccessToken"] = "personalAccessToken" - - -class CreateConnectionRequestRestConnectionConfiguration(core.ModelBase): - """CreateConnectionRequestRestConnectionConfiguration""" - - additional_secrets: typing.Optional[RestConnectionAdditionalSecrets] = pydantic.Field(alias=str("additionalSecrets"), default=None) # type: ignore[literal-required] - """ - Additional secrets that can be referenced in code and webhook configurations. - If not provided, no additional secrets will be created. - """ - - oauth2_client_rid: typing.Optional[core.RID] = pydantic.Field(alias=str("oauth2ClientRid"), default=None) # type: ignore[literal-required] - """ - The RID of the [Outbound application](https://palantir.com/docs/foundry/administration/configure-outbound-applications) that is used to authenticate to the external system via OAuth2. - Currently, a connection may use only one outbound application for OAuth 2.0 authentication. - Selecting a different outbound application will update the configuration for all domains with OAuth 2.0 as the selected authorization. - """ - - domains: typing.List[Domain] - """ - The domains that the connection is allowed to access. - At least one domain must be specified. - """ - - type: typing.Literal["rest"] = "rest" - - -class CreateConnectionRequestS3ConnectionConfiguration(core.ModelBase): - """CreateConnectionRequestS3ConnectionConfiguration""" - - connection_timeout_millis: typing.Optional[core.Long] = pydantic.Field(alias=str("connectionTimeoutMillis"), default=None) # type: ignore[literal-required] - """ - The amount of time (in milliseconds) to wait when initially establishing a connection before giving up and timing out. - If not specified, defaults to 10000 as defined by the [AWS SDK default](https://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/ClientConfiguration.html#DEFAULT_CONNECTION_TIMEOUT). - """ - - max_error_retry: typing.Optional[int] = pydantic.Field(alias=str("maxErrorRetry"), default=None) # type: ignore[literal-required] - """ - The maximum number of retry attempts for failed requests to the S3 service. - If not specified, defaults to 3 as defined by the [AWS SDK default](https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/retry-strategy.html#retry-strategies). - """ - - bucket_url: str = pydantic.Field(alias=str("bucketUrl")) # type: ignore[literal-required] - """The URL of the S3 bucket. The URL should contain a trailing slash.""" - - client_kms_configuration: typing.Optional[S3KmsConfiguration] = pydantic.Field(alias=str("clientKmsConfiguration"), default=None) # type: ignore[literal-required] - """ - The client-side KMS key to use for encryption and decryption of data in the S3 bucket. - If not specified, the default KMS key for the bucket is used. - """ - - match_subfolder_exactly: typing.Optional[bool] = pydantic.Field(alias=str("matchSubfolderExactly"), default=None) # type: ignore[literal-required] - """ - If true, only files in the subfolder specified in the bucket URL will be synced. - If false, all files in the bucket will be synced. - If not specified, defaults to false. - """ - - sts_role_configuration: typing.Optional[StsRoleConfiguration] = pydantic.Field(alias=str("stsRoleConfiguration"), default=None) # type: ignore[literal-required] - """The configuration needed to assume a role to connect to the S3 external system.""" - - s3_endpoint: typing.Optional[str] = pydantic.Field(alias=str("s3Endpoint"), default=None) # type: ignore[literal-required] - """ - The endpoint of the S3 service. This is used to connect to a custom S3 service that is not AWS S3. - If not specified, defaults to the [AWS S3 endpoint](https://docs.aws.amazon.com/general/latest/gr/s3.html). - Warning: Specifying a region and a custom endpoint containing a region can lead to unexpected behavior. - """ - - socket_timeout_millis: typing.Optional[core.Long] = pydantic.Field(alias=str("socketTimeoutMillis"), default=None) # type: ignore[literal-required] - """ - The amount of time (in milliseconds) to wait for data to be transferred over an established, open connection. - If not specified, defaults to 50000 as defined by the [AWS SDK default](https://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/ClientConfiguration.html#DEFAULT_SOCKET_TIMEOUT). - """ - - enable_requester_pays: typing.Optional[bool] = pydantic.Field(alias=str("enableRequesterPays"), default=None) # type: ignore[literal-required] - """ - Defaults to false, unless set and overwritten. - If true, includes the [requester pays header](https://docs.aws.amazon.com/AmazonS3/latest/userguide/RequesterPaysBuckets.html) - in requests, allowing reads from requester pays buckets. - """ - - s3_endpoint_signing_region: typing.Optional[Region] = pydantic.Field(alias=str("s3EndpointSigningRegion"), default=None) # type: ignore[literal-required] - """ - The region used when constructing the S3 client using a custom endpoint. - This is often not required and would only be needed if you are using the S3 connector with an S3-compliant third-party API, - and are also setting a custom endpoint that requires a non-default region. - """ - - region: typing.Optional[Region] = None - """ - The region representing the location of the S3 bucket. - Warning: Specifying a region and a custom endpoint containing a region can lead to unexpected behavior. - """ - - authentication_mode: typing.Optional[S3AuthenticationMode] = pydantic.Field(alias=str("authenticationMode"), default=None) # type: ignore[literal-required] - """ - The authentication mode to use to connect to the S3 external system. No authentication mode is required - to connect to publicly accessible AWS S3 buckets. - """ - - proxy_configuration: typing.Optional[S3ProxyConfiguration] = pydantic.Field(alias=str("proxyConfiguration"), default=None) # type: ignore[literal-required] - """The configuration needed to connect to the S3 external system through a proxy.""" - - max_connections: typing.Optional[int] = pydantic.Field(alias=str("maxConnections"), default=None) # type: ignore[literal-required] - """ - The maximum number of HTTP connections to the S3 service per sync. - If not specified, defaults to 50 as defined by the [AWS SDK default](https://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/ClientConfiguration.html#DEFAULT_MAX_CONNECTIONS). - """ - - type: typing.Literal["s3"] = "s3" - - -class CreateConnectionRequestSmbConnectionConfiguration(core.ModelBase): - """CreateConnectionRequestSmbConnectionConfiguration""" - - proxy: typing.Optional[SmbProxyConfiguration] = None - hostname: str - """ - Any identifier that can resolve to a server hosting an SMB share. This includes IP addresses, local - network names (e.g. FS-SERVER-01) or FQDNs. Should not include any protocol information like https://, smb://, etc - """ - - port: typing.Optional[int] = None - """445 by default""" - - auth: CreateConnectionRequestSmbAuth - share: str - """ - Must be a valid SMB share name. - https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-fscc/dc9978d7-6299-4c5a-a22d-a039cdc716ea - """ - - base_directory: typing.Optional[str] = pydantic.Field(alias=str("baseDirectory"), default=None) # type: ignore[literal-required] - """All reads and writes in this source will happen in this subdirectory""" - - require_message_signing: typing.Optional[bool] = pydantic.Field(alias=str("requireMessageSigning"), default=None) # type: ignore[literal-required] - """ - If true, the client will request that the server sign all messages. If the server does not support - message signing, the connection will fail. Defaults to true. - """ - - type: typing.Literal["smb"] = "smb" - - -class CreateConnectionRequestSmbUsernamePasswordAuth(core.ModelBase): - """CreateConnectionRequestSmbUsernamePasswordAuth""" - - password: CreateConnectionRequestEncryptedProperty - domain: typing.Optional[str] = None - """ - Optionally specify a Windows domain to use when authenticating. Normal DNS domain restrictions apply - but the top-level domain might be something non-standard like .local. Defaults to WORKGROUP - """ - - username: str - type: typing.Literal["usernamePassword"] = "usernamePassword" - - -CreateConnectionRequestSnowflakeAuthenticationMode = typing_extensions.Annotated[ - typing.Union[ - "CreateConnectionRequestSnowflakeExternalOauth", - "CreateConnectionRequestSnowflakeKeyPairAuthentication", - "CreateConnectionRequestBasicCredentials", - ], - pydantic.Field(discriminator="type"), -] -"""CreateConnectionRequestSnowflakeAuthenticationMode""" - - -class CreateConnectionRequestSnowflakeConnectionConfiguration(core.ModelBase): - """CreateConnectionRequestSnowflakeConnectionConfiguration""" - - schema_: typing.Optional[str] = pydantic.Field(alias=str("schema"), default=None) # type: ignore[literal-required] - """ - Specifies the default schema to use for the specified database once connected. If unspecified, - defaults to the empty string. - The specified schema should be an existing schema for which the specified default role has privileges. - - See https://docs.snowflake.com/developer-guide/jdbc/jdbc-parameters#schema - """ - - database: typing.Optional[str] = None - """ - Specifies the default database to use once connected. If unspecified, defaults to the empty string. - The specified database should be an existing database for which the specified default role has privileges. - - See https://docs.snowflake.com/developer-guide/jdbc/jdbc-parameters#db - """ - - role: typing.Optional[str] = None - """ - Specifies the default access control role to use in the Snowflake session initiated by the driver. - If unspecified, no role will be used when the session is initiated by the driver. - - The specified role should be an existing role that has already been assigned to the specified user for - the driver. If the specified role has not already been assigned to the user, the role is not used when - the session is initiated by the driver. - - See https://docs.snowflake.com/developer-guide/jdbc/jdbc-parameters#role - """ - - account_identifier: str = pydantic.Field(alias=str("accountIdentifier")) # type: ignore[literal-required] - """ - An [account identifier](https://docs.snowflake.com/en/user-guide/admin-account-identifier) uniquely - identifies a Snowflake account within your organization, as well as throughout the global network of - Snowflake-supported cloud platforms and cloud regions. - - The URL for an account uses the following format: .snowflakecomputing.com. - An example URL is https://acme-test_aws_us_east_2.snowflakecomputing.com. - """ - - jdbc_properties: JdbcProperties = pydantic.Field(alias=str("jdbcProperties")) # type: ignore[literal-required] - warehouse: typing.Optional[str] = None - """ - Specifies the virtual warehouse to use once connected. If unspecified, defaults to the empty string. - The specified warehouse should be an existing warehouse for which the specified default role has privileges. - - See https://docs.snowflake.com/developer-guide/jdbc/jdbc-parameters#warehouse - """ - - authentication_mode: CreateConnectionRequestSnowflakeAuthenticationMode = pydantic.Field(alias=str("authenticationMode")) # type: ignore[literal-required] - """The authentication mode to use to connect to the Snowflake database.""" - - type: typing.Literal["snowflake"] = "snowflake" - - -class CreateConnectionRequestSnowflakeExternalOauth(core.ModelBase): - """CreateConnectionRequestSnowflakeExternalOauth""" - - type: typing.Literal["externalOauth"] = "externalOauth" - - -class CreateConnectionRequestSnowflakeKeyPairAuthentication(core.ModelBase): - """CreateConnectionRequestSnowflakeKeyPairAuthentication""" - - private_key: CreateConnectionRequestEncryptedProperty = pydantic.Field(alias=str("privateKey")) # type: ignore[literal-required] - user: str - type: typing.Literal["keyPair"] = "keyPair" - - -class CreateConnectionRequestUnknownWorker(core.ModelBase): - """CreateConnectionRequestUnknownWorker""" - - type: typing.Literal["unknownWorker"] = "unknownWorker" - - -class CreateConnectionRequestWorkflowIdentityFederation(core.ModelBase): - """CreateConnectionRequestWorkflowIdentityFederation""" - - audience: str - """ - Identifies the recipients that the access token is intended for as a string URI. - This should be the primary host name where the Connection lives. - """ - - service_principal_application_id: typing.Optional[str] = pydantic.Field(alias=str("servicePrincipalApplicationId"), default=None) # type: ignore[literal-required] - """ - The ID of the Databricks [service principal](https://docs.databricks.com/aws/en/admin/users-groups/service-principals). - If provided, a federated JWT token is exchanged using a - service principal federation policy. If not provided, a federated JWT token is exchanged using an account - federation policy. - """ - - type: typing.Literal["workflowIdentityFederation"] = "workflowIdentityFederation" - - -class CreateFileImportRequest(core.ModelBase): - """CreateFileImportRequest""" - - dataset_rid: datasets_models.DatasetRid = pydantic.Field(alias=str("datasetRid")) # type: ignore[literal-required] - """The RID of the output dataset. Can not be modified after the file import is created.""" - - import_mode: FileImportMode = pydantic.Field(alias=str("importMode")) # type: ignore[literal-required] - display_name: FileImportDisplayName = pydantic.Field(alias=str("displayName")) # type: ignore[literal-required] - branch_name: typing.Optional[datasets_models.BranchName] = pydantic.Field(alias=str("branchName"), default=None) # type: ignore[literal-required] - """The branch name in the output dataset that will contain the imported data. Defaults to `master` for most enrollments. Can not be modified after the file import is created.""" - - subfolder: typing.Optional[str] = None - """A subfolder in the external system that will be imported. If not specified, defaults to the root folder of the external system.""" - - file_import_filters: typing.List[FileImportFilter] = pydantic.Field(alias=str("fileImportFilters")) # type: ignore[literal-required] - """Use filters to limit which files should be imported. Filters are applied in the order they are defined. A different ordering of filters may lead to a more optimized import. [Learn more about optimizing file imports.](https://palantir.com/docs/foundry/data-connection/file-based-syncs/#optimize-file-based-syncs)""" - - -class CreateTableImportRequest(core.ModelBase): - """CreateTableImportRequest""" - - dataset_rid: datasets_models.DatasetRid = pydantic.Field(alias=str("datasetRid")) # type: ignore[literal-required] - """The RID of the output dataset. Can not be modified after the table import is created.""" - - import_mode: TableImportMode = pydantic.Field(alias=str("importMode")) # type: ignore[literal-required] - display_name: TableImportDisplayName = pydantic.Field(alias=str("displayName")) # type: ignore[literal-required] - allow_schema_changes: typing.Optional[TableImportAllowSchemaChanges] = pydantic.Field(alias=str("allowSchemaChanges"), default=None) # type: ignore[literal-required] - """Allow the TableImport to succeed if the schema of imported rows does not match the existing dataset's schema. Defaults to false for new table imports.""" - - branch_name: typing.Optional[datasets_models.BranchName] = pydantic.Field(alias=str("branchName"), default=None) # type: ignore[literal-required] - """The branch name in the output dataset that will contain the imported data. Defaults to `master` for most enrollments. Can not be modified after the table import is created.""" - - config: CreateTableImportRequestTableImportConfig - - -class CreateTableImportRequestDatabricksTableImportConfig(core.ModelBase): - """CreateTableImportRequestDatabricksTableImportConfig""" - - initial_incremental_state: typing.Optional[TableImportInitialIncrementalState] = pydantic.Field(alias=str("initialIncrementalState"), default=None) # type: ignore[literal-required] - query: TableImportQuery - type: typing.Literal["databricksImportConfig"] = "databricksImportConfig" - - -class CreateTableImportRequestJdbcTableImportConfig(core.ModelBase): - """CreateTableImportRequestJdbcTableImportConfig""" - - initial_incremental_state: typing.Optional[TableImportInitialIncrementalState] = pydantic.Field(alias=str("initialIncrementalState"), default=None) # type: ignore[literal-required] - query: TableImportQuery - type: typing.Literal["jdbcImportConfig"] = "jdbcImportConfig" - - -class CreateTableImportRequestMicrosoftAccessTableImportConfig(core.ModelBase): - """CreateTableImportRequestMicrosoftAccessTableImportConfig""" - - initial_incremental_state: typing.Optional[TableImportInitialIncrementalState] = pydantic.Field(alias=str("initialIncrementalState"), default=None) # type: ignore[literal-required] - query: TableImportQuery - type: typing.Literal["microsoftAccessImportConfig"] = "microsoftAccessImportConfig" - - -class CreateTableImportRequestMicrosoftSqlServerTableImportConfig(core.ModelBase): - """CreateTableImportRequestMicrosoftSqlServerTableImportConfig""" - - initial_incremental_state: typing.Optional[TableImportInitialIncrementalState] = pydantic.Field(alias=str("initialIncrementalState"), default=None) # type: ignore[literal-required] - query: TableImportQuery - type: typing.Literal["microsoftSqlServerImportConfig"] = "microsoftSqlServerImportConfig" - - -class CreateTableImportRequestOracleTableImportConfig(core.ModelBase): - """CreateTableImportRequestOracleTableImportConfig""" - - initial_incremental_state: typing.Optional[TableImportInitialIncrementalState] = pydantic.Field(alias=str("initialIncrementalState"), default=None) # type: ignore[literal-required] - query: TableImportQuery - type: typing.Literal["oracleImportConfig"] = "oracleImportConfig" - - -class CreateTableImportRequestPostgreSqlTableImportConfig(core.ModelBase): - """CreateTableImportRequestPostgreSqlTableImportConfig""" - - initial_incremental_state: typing.Optional[TableImportInitialIncrementalState] = pydantic.Field(alias=str("initialIncrementalState"), default=None) # type: ignore[literal-required] - query: TableImportQuery - type: typing.Literal["postgreSqlImportConfig"] = "postgreSqlImportConfig" - - -class CreateTableImportRequestSnowflakeTableImportConfig(core.ModelBase): - """CreateTableImportRequestSnowflakeTableImportConfig""" - - initial_incremental_state: typing.Optional[TableImportInitialIncrementalState] = pydantic.Field(alias=str("initialIncrementalState"), default=None) # type: ignore[literal-required] - query: TableImportQuery - type: typing.Literal["snowflakeImportConfig"] = "snowflakeImportConfig" - - -CreateTableImportRequestTableImportConfig = typing_extensions.Annotated[ - typing.Union[ - "CreateTableImportRequestDatabricksTableImportConfig", - "CreateTableImportRequestJdbcTableImportConfig", - "CreateTableImportRequestMicrosoftSqlServerTableImportConfig", - "CreateTableImportRequestPostgreSqlTableImportConfig", - "CreateTableImportRequestMicrosoftAccessTableImportConfig", - "CreateTableImportRequestSnowflakeTableImportConfig", - "CreateTableImportRequestOracleTableImportConfig", - ], - pydantic.Field(discriminator="type"), -] -"""The import configuration for a specific [connector type](https://palantir.com/docs/foundry/data-integration/source-type-overview).""" - - -class CreateVirtualTableRequest(core.ModelBase): - """CreateVirtualTableRequest""" - - markings: typing.Optional[typing.List[core_models.MarkingId]] = None - parent_rid: filesystem_models.FolderRid = pydantic.Field(alias=str("parentRid")) # type: ignore[literal-required] - name: TableName - config: VirtualTableConfig - - -DatabricksAuthenticationMode = typing_extensions.Annotated[ - typing.Union[ - "WorkflowIdentityFederation", - "OauthMachineToMachineAuth", - "PersonalAccessToken", - "BasicCredentials", - ], - pydantic.Field(discriminator="type"), -] -"""The method of authentication for connecting to an external Databricks system.""" - - -class DatabricksConnectionConfiguration(core.ModelBase): - """ - The configuration needed to connect to a [Databricks external system](https://palantir.com/docs/foundry/available-connectors/databricks). - Refer to the [official Databricks documentation](https://docs.databricks.com/aws/en/integrations/compute-details) - for more information on how to obtain connection details for your system. - """ - - host_name: str = pydantic.Field(alias=str("hostName")) # type: ignore[literal-required] - """The hostname of the Databricks workspace.""" - - http_path: str = pydantic.Field(alias=str("httpPath")) # type: ignore[literal-required] - """The Databricks compute resource’s HTTP Path value.""" - - authentication: DatabricksAuthenticationMode - """The method of authentication to use.""" - - jdbc_properties: JdbcProperties = pydantic.Field(alias=str("jdbcProperties")) # type: ignore[literal-required] - type: typing.Literal["databricks"] = "databricks" - - -class DatabricksTableImportConfig(core.ModelBase): - """The table import configuration for a [Databricks connection](https://palantir.com/docs/foundry/available-connectors/databricks).""" - - query: TableImportQuery - initial_incremental_state: typing.Optional[TableImportInitialIncrementalState] = pydantic.Field(alias=str("initialIncrementalState"), default=None) # type: ignore[literal-required] - type: typing.Literal["databricksImportConfig"] = "databricksImportConfig" - - -class DateColumnInitialIncrementalState(core.ModelBase): - """The state for an incremental table import using a column with a date type.""" - - column_name: str = pydantic.Field(alias=str("columnName")) # type: ignore[literal-required] - current_value: date = pydantic.Field(alias=str("currentValue")) # type: ignore[literal-required] - """The initial incremental state value for the date column to reference in the query.""" - - type: typing.Literal["dateColumnInitialIncrementalState"] = "dateColumnInitialIncrementalState" - - -class DecimalColumnInitialIncrementalState(core.ModelBase): - """The state for an incremental table import using a column with a decimal data type.""" - - column_name: str = pydantic.Field(alias=str("columnName")) # type: ignore[literal-required] - current_value: decimal.Decimal = pydantic.Field(alias=str("currentValue")) # type: ignore[literal-required] - """The initial incremental state value for the decimal column to reference in the query.""" - - type: typing.Literal["decimalColumnInitialIncrementalState"] = ( - "decimalColumnInitialIncrementalState" - ) - - -class DeltaVirtualTableConfig(core.ModelBase): - """Pointer to the Delta table in cloud object storage (e.g., Azure Data Lake Storage, Google Cloud Storage, S3).""" - - path: str - """The path of the Delta table in object storage.""" - - type: typing.Literal["delta"] = "delta" - - -class Domain(core.ModelBase): - """The domain that the connection is allowed to access.""" - - scheme: typing.Optional[UriScheme] = None - """ - The scheme of the domain that the connection is allowed to access. - If not specified, defaults to HTTPS. - """ - - host: str - """The domain name, IPv4, or IPv6 address.""" - - port: typing.Optional[int] = None - """The port number of the domain that the connection is allowed to access.""" - - auth: typing.Optional[RestAuthenticationMode] = None - """ - The URI scheme must be HTTPS if using any authentication. - If not specified, no authentication is required. - """ - - -EncryptedProperty = typing_extensions.Annotated[ - typing.Union["AsSecretName", "AsPlaintextValue"], pydantic.Field(discriminator="type") -] -""" -When reading an encrypted property, the secret name representing the encrypted value will be returned. -When writing to an encrypted property: -- If a plaintext value is passed as an input, the plaintext value will be encrypted and saved to the property. -- If a secret name is passed as an input, the secret name must match the existing secret name of the property - and the property will retain its previously encrypted value. -""" - - -class FileAnyPathMatchesFilter(core.ModelBase): - """If any file has a relative path matching the regular expression, sync all files in the subfolder that are not otherwise filtered.""" - - regex: str - """The regular expression for the relative path to match against.""" - - type: typing.Literal["anyPathMatchesFilter"] = "anyPathMatchesFilter" - - -class FileAtLeastCountFilter(core.ModelBase): - """Import all filtered files only if there are at least the specified number of files remaining.""" - - min_files_count: int = pydantic.Field(alias=str("minFilesCount")) # type: ignore[literal-required] - """ - The minimum number of files remaining expected. - The value specified must be greater than 0. - """ - - type: typing.Literal["atLeastCountFilter"] = "atLeastCountFilter" - - -class FileChangedSinceLastUploadFilter(core.ModelBase): - """ - Only import files that have changed or been added since the last import run. Whether or not a file is considered to be changed is determined by the specified file properties. - This will exclude files uploaded in any previous imports, regardless of the file import mode used. A SNAPSHOT file import mode does not reset the filter. - """ - - file_properties: typing.List[FileProperty] = pydantic.Field(alias=str("fileProperties")) # type: ignore[literal-required] - """ - The criteria on which to determine whether a file has been changed or not since the last import. - If any of the specified criteria have changed, the file is consider changed. The criteria include: - - LAST_MODIFIED: The file's last modified timestamp has changed since the last import. - SIZE: The file's size has changed since the last import. - - If no criteria are specified, only newly added files will be imported. - """ - - type: typing.Literal["changedSinceLastUploadFilter"] = "changedSinceLastUploadFilter" - - -FileFormat = typing.Literal["AVRO", "CSV", "PARQUET"] -"""The format of files in the upstream source.""" - - -class FileImport(core.ModelBase): - """FileImport""" - - rid: FileImportRid - connection_rid: ConnectionRid = pydantic.Field(alias=str("connectionRid")) # type: ignore[literal-required] - """The RID of the Connection (also known as a source) that the File Import uses to import data.""" - - dataset_rid: datasets_models.DatasetRid = pydantic.Field(alias=str("datasetRid")) # type: ignore[literal-required] - """The RID of the output dataset. Can not be modified after the file import is created.""" - - branch_name: typing.Optional[datasets_models.BranchName] = pydantic.Field(alias=str("branchName"), default=None) # type: ignore[literal-required] - """The branch name in the output dataset that will contain the imported data. Defaults to `master` for most enrollments. Can not be modified after the file import is created.""" - - display_name: FileImportDisplayName = pydantic.Field(alias=str("displayName")) # type: ignore[literal-required] - file_import_filters: typing.List[FileImportFilter] = pydantic.Field(alias=str("fileImportFilters")) # type: ignore[literal-required] - """Use filters to limit which files should be imported. Filters are applied in the order they are defined. A different ordering of filters may lead to a more optimized import. [Learn more about optimizing file imports.](https://palantir.com/docs/foundry/data-connection/file-based-syncs/#optimize-file-based-syncs)""" - - import_mode: FileImportMode = pydantic.Field(alias=str("importMode")) # type: ignore[literal-required] - subfolder: typing.Optional[str] = None - """A subfolder in the external system that will be imported. If not specified, defaults to the root folder of the external system.""" - - -class FileImportCustomFilter(core.ModelBase): - """ - A custom file import filter. Custom file import filters can be fetched but cannot currently be used - when creating or updating file imports. - """ - - config: typing.Any - type: typing.Literal["customFilter"] = "customFilter" - - -FileImportDisplayName = str -"""FileImportDisplayName""" - - -FileImportFilter = typing_extensions.Annotated[ - typing.Union[ - "FilePathNotMatchesFilter", - "FileAnyPathMatchesFilter", - "FilesCountLimitFilter", - "FileChangedSinceLastUploadFilter", - "FileImportCustomFilter", - "FileLastModifiedAfterFilter", - "FilePathMatchesFilter", - "FileAtLeastCountFilter", - "FileSizeFilter", - ], - pydantic.Field(discriminator="type"), -] -""" -[Filters](https://palantir.com/docs/foundry/data-connection/file-based-syncs/#filters) allow you to filter source files -before they are imported into Foundry. -""" - - -FileImportMode = typing.Literal["SNAPSHOT", "APPEND", "UPDATE"] -""" -Import mode governs how raw files are read from an external system, and written into a Foundry dataset. - -SNAPSHOT: Defines a new dataset state consisting only of files from a particular import execution. -APPEND: Purely additive and yields data from previous import executions in addition to newly added files. -UPDATE: Replaces existing files from previous import executions based on file names. -""" - - -FileImportRid = core.RID -"""The Resource Identifier (RID) of a FileImport (also known as a batch sync).""" - - -class FileLastModifiedAfterFilter(core.ModelBase): - """Only import files that have been modified after a specified timestamp""" - - after_timestamp: typing.Optional[core.AwareDatetime] = pydantic.Field(alias=str("afterTimestamp"), default=None) # type: ignore[literal-required] - """ - Timestamp threshold, specified in ISO-8601 format. - If not specified, defaults to the timestamp the filter is added to the file import. - """ - - type: typing.Literal["lastModifiedAfterFilter"] = "lastModifiedAfterFilter" - - -class FilePathMatchesFilter(core.ModelBase): - """ - Only import files whose path (relative to the root of the source) matches the regular expression. - - **Example** - Suppose we are importing files from `relative/subfolder`. - `relative/subfolder` contains: - - `relative/subfolder/include-file.txt` - - `relative/subfolder/exclude-file.txt` - - `relative/subfolder/other-file.txt` - - With the `relative/subfolder/include-.*.txt` regex, only `relative/subfolder/include-file.txt` will be imported. - """ - - regex: str - """Must be written to match the paths relative to the root of the source, even if a subfolder is specified.""" - - type: typing.Literal["pathMatchesFilter"] = "pathMatchesFilter" - - -class FilePathNotMatchesFilter(core.ModelBase): - """ - Only import files whose path (relative to the root of the source) does not match the regular expression. - - **Example** - Suppose we are importing files from `relative/subfolder`. - `relative/subfolder` contains: - - `relative/subfolder/include-file.txt` - - `relative/subfolder/exclude-file.txt` - - `relative/subfolder/other-file.txt` - - With the `relative/subfolder/exclude-.*.txt` regex, both `relative/subfolder/include-file.txt` and `relative/subfolder/other-file.txt` will be imported, - and `relative/subfolder/exclude-file.txt` will be excluded from the import. - """ - - regex: str - """Must be written to match the paths relative to the root of the source, even if a subfolder is specified.""" - - type: typing.Literal["pathNotMatchesFilter"] = "pathNotMatchesFilter" - - -FileProperty = typing.Literal["LAST_MODIFIED", "SIZE"] -"""FileProperty""" - - -class FileSizeFilter(core.ModelBase): - """ - Only import files whose size is between the specified minimum and maximum values. - At least one of `gt` or `lt` should be present. - If both are present, the value specified for `gt` must be strictly less than `lt - 1`. - """ - - gt: typing.Optional[core_models.SizeBytes] = None - """ - File size must be greater than this number for it to be imported. - The value specified cannot be a negative number. - """ - - lt: typing.Optional[core_models.SizeBytes] = None - """ - File size must be less than this number for it to be imported. - The value specified must be at least 1 byte. - """ - - type: typing.Literal["fileSizeFilter"] = "fileSizeFilter" - - -class FilesCountLimitFilter(core.ModelBase): - """ - Only retain `filesCount` number of files in each transaction. - The choice of files to retain is made without any guarantee of order. - This option can increase the reliability of incremental syncs. - """ - - files_count: int = pydantic.Field(alias=str("filesCount")) # type: ignore[literal-required] - """The number of files to import in the transaction. The value specified must be positive.""" - - type: typing.Literal["filesCountLimitFilter"] = "filesCountLimitFilter" - - -class FilesVirtualTableConfig(core.ModelBase): - """Pointer to the table in cloud object storage (e.g., Azure Data Lake Storage, Google Cloud Storage, S3).""" - - format: FileFormat - path: str - """ - Storage path for the data in the underlying file system, i.e. paths like `/foo/bar`. The scheme is not - included. May be either a folder or file. A non-partitioned table will have a single location. A - partitioned table can have multiple locations, one for each partition. - """ - - type: typing.Literal["files"] = "files" - - -class FoundryWorker(core.ModelBase): - """ - The [Foundry worker](https://palantir.com/docs/foundry/data-connection/core-concepts/#foundry-worker) is used to run capabilities - in Foundry. - This is the preferred method for connections, as these connections benefit from Foundry's containerized - and scalable job execution, improved stability and do not incur the maintenance overhead associated with agents. - """ - - network_egress_policy_rids: typing.List[NetworkEgressPolicyRid] = pydantic.Field(alias=str("networkEgressPolicyRids")) # type: ignore[literal-required] - type: typing.Literal["foundryWorker"] = "foundryWorker" - - -class GetConfigurationConnectionsBatchRequestElement(core.ModelBase): - """GetConfigurationConnectionsBatchRequestElement""" - - connection_rid: ConnectionRid = pydantic.Field(alias=str("connectionRid")) # type: ignore[literal-required] - - -class GetConfigurationConnectionsBatchResponse(core.ModelBase): - """GetConfigurationConnectionsBatchResponse""" - - data: typing.Dict[ConnectionRid, ConnectionConfiguration] - - -class GlueVirtualTableConfig(core.ModelBase): - """Pointer to the table in AWS Glue.""" - - database: str - """The database name.""" - - table: str - """The table name.""" - - type: typing.Literal["glue"] = "glue" - - -class HeaderApiKey(core.ModelBase): - """HeaderApiKey""" - - header_name: str = pydantic.Field(alias=str("headerName")) # type: ignore[literal-required] - """The name of the header that the API key is passed in.""" - - type: typing.Literal["header"] = "header" - - -class IcebergVirtualTableConfig(core.ModelBase): - """Pointer to the Iceberg table.""" - - table_identifier: str = pydantic.Field(alias=str("tableIdentifier")) # type: ignore[literal-required] - """The identifier of the Iceberg table.""" - - warehouse_path: typing.Optional[str] = pydantic.Field(alias=str("warehousePath"), default=None) # type: ignore[literal-required] - """ - The path to the folder in the file system containing the Iceberg table. Can be omitted when the - connection is configured with a catalog that does not rely on warehouse path. - """ - - type: typing.Literal["iceberg"] = "iceberg" - - -class IntegerColumnInitialIncrementalState(core.ModelBase): - """The state for an incremental table import using a numeric integer datatype.""" - - column_name: str = pydantic.Field(alias=str("columnName")) # type: ignore[literal-required] - current_value: int = pydantic.Field(alias=str("currentValue")) # type: ignore[literal-required] - """The initial incremental state value for the integer column to reference in the query.""" - - type: typing.Literal["integerColumnInitialIncrementalState"] = ( - "integerColumnInitialIncrementalState" - ) - - -InvalidConnectionReason = typing.Literal[ - "CONNECTION_NOT_FOUND", - "INVALID_CREDENTIALS", - "NETWORK_POLICY_VIOLATION", - "CONNECTION_UNAVAILABLE", - "CANNOT_DESERIALIZE", - "CANNOT_SUBSTITUTE_SECRETS", - "CANNOT_USE_USER_HOME_FOLDER", - "INVALID_SOURCE_RUNTIME", - "INVALID_SOURCE_TYPE", - "MISSING_CREDENTIALS", - "MISSING_PROXY_SETTINGS", - "NOT_CLOUD_RUNTIME", - "NO_AGENTS_ASSIGNED", - "SERVICE_UNAVAILABLE", - "TOO_MANY_REQUESTS", - "AZURE_CONTAINER_DOES_NOT_EXIST", - "AZURE_MANAGED_IDENTITY_AUTH_NOT_SUPPORTED", - "AZURE_REFRESH_TOKEN_AUTH_NOT_SUPPORTED", - "AZURE_SHARED_ACCESS_SIGNATURE_AUTH_NOT_SUPPORTED", - "AZURE_SHARED_KEY_AUTH_NOT_SUPPORTED", - "AZURE_TENANT_NOT_FOUND", - "INVALID_ABFS_ROOT_DIRECTORY", - "INVALID_CLIENT_ENDPOINT", - "DATABRICKS_AUTH_UNSUPPORTED", - "DATABRICKS_BASIC_AUTH_NOT_SUPPORTED", - "DATABRICKS_INVALID_CLIENT_CREDENTIALS", - "DATABRICKS_INVALID_HOST", - "DATABRICKS_INVALID_HTTP_PATH", - "DATABRICKS_INVALID_OIDC_CREDENTIALS", - "DATABRICKS_INVALID_TOKEN_URL", - "GCP_INSTANCE_AUTH_NOT_SUPPORTED", - "GCP_INVALID_OIDC_CREDENTIALS", - "INVALID_GCS_CONFIG", - "INVALID_GCS_URL", - "GCS_INVALID_PREFIX_PATH", - "MISSING_GLUE_CATALOG", - "INVALID_HIVE_URL", - "INVALID_KERBEROS_URL", - "MISSING_HIVE_CONFIGURATION", - "ICEBERG_CATALOG_UNSUPPORTED", - "INVALID_ICEBERG_CATALOG_URL", - "INVALID_ICEBERG_TOKEN_URL", - "CONNECTION_FAILED", - "INVALID_JDBC_DRIVER", - "INVALID_JDBC_URL", - "AWS_BUCKET_DOES_NOT_EXIST", - "AWS_SESSION_TOKEN_NOT_SUPPORTED", - "INVALID_S3_ENDPOINT", - "INVALID_S3_URL", - "INVALID_STS_ENDPOINT", - "MISSING_STS_ROLE", - "STS_ASSUME_ROLE_DENIED", - "INVALID_SNOWFLAKE_URL", - "SNOWFLAKE_IAM_AUTH_NOT_SUPPORTED", - "SNOWFLAKE_RSA_AUTH_NOT_SUPPORTED", - "INVALID_UNITY_CATALOG_TOKEN_URL", - "INVALID_UNITY_CATALOG_URL", - "MISSING_UNITY_CATALOG", - "UNITY_CATALOG_EXTERNAL_ACCESS_NOT_ENABLED", - "UNITY_CATALOG_INSUFFICIENT_PERMISSIONS", - "UNITY_CATALOG_TEMPORARY_CREDENTIALS_FAILED", -] -"""Reasons why a connection configuration is invalid.""" - - -class JdbcConnectionConfiguration(core.ModelBase): - """The configuration needed to connect to an external system using the JDBC protocol.""" - - url: str - """The URL that the JDBC driver uses to connect to a database.""" - - driver_class: str = pydantic.Field(alias=str("driverClass")) # type: ignore[literal-required] - """The fully-qualified driver class name that is used to connect to the database.""" - - uploaded_jdbc_drivers: typing.List[JdbcDriverArtifactName] = pydantic.Field(alias=str("uploadedJdbcDrivers")) # type: ignore[literal-required] - """ - The list of uploaded JDBC driver names. - To upload drivers to a JDBC connection, use the uploadCustomJdbcDrivers endpoint - """ - - jdbc_properties: JdbcProperties = pydantic.Field(alias=str("jdbcProperties")) # type: ignore[literal-required] - credentials: typing.Optional[BasicCredentials] = None - type: typing.Literal["jdbc"] = "jdbc" - - -JdbcDriverArtifactName = str -"""The name of the uploaded JDBC artifact.""" - - -JdbcProperties = typing.Dict[str, str] -""" -A map of [properties](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Properties.html) passed -to the JDBC driver to configure behavior. Refer to the documentation of your specific connection type for additional -available JDBC properties to add to your connection configuration. -This should only contain unencrypted properties, all values specified here are sent unencrypted to Foundry. -""" - - -class JdbcTableImportConfig(core.ModelBase): - """The import configuration for a [custom JDBC connection](https://palantir.com/docs/foundry/available-connectors/custom-jdbc-sources).""" - - query: TableImportQuery - initial_incremental_state: typing.Optional[TableImportInitialIncrementalState] = pydantic.Field(alias=str("initialIncrementalState"), default=None) # type: ignore[literal-required] - type: typing.Literal["jdbcImportConfig"] = "jdbcImportConfig" - - -class ListFileImportsResponse(core.ModelBase): - """ListFileImportsResponse""" - - data: typing.List[FileImport] - next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] - - -class ListTableImportsResponse(core.ModelBase): - """ListTableImportsResponse""" - - data: typing.List[TableImport] - next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] - - -class LongColumnInitialIncrementalState(core.ModelBase): - """The state for an incremental table import using a column with a numeric long datatype.""" - - column_name: str = pydantic.Field(alias=str("columnName")) # type: ignore[literal-required] - current_value: core.Long = pydantic.Field(alias=str("currentValue")) # type: ignore[literal-required] - """The initial incremental state value for the long column to reference in the query.""" - - type: typing.Literal["longColumnInitialIncrementalState"] = "longColumnInitialIncrementalState" - - -class MicrosoftAccessTableImportConfig(core.ModelBase): - """The import configuration for a [Microsoft Access connection](https://palantir.com/docs/foundry/available-connectors/microsoft-access).""" - - query: TableImportQuery - initial_incremental_state: typing.Optional[TableImportInitialIncrementalState] = pydantic.Field(alias=str("initialIncrementalState"), default=None) # type: ignore[literal-required] - type: typing.Literal["microsoftAccessImportConfig"] = "microsoftAccessImportConfig" - - -class MicrosoftSqlServerTableImportConfig(core.ModelBase): - """The import configuration for a [Microsoft SQL Server connection](https://palantir.com/docs/foundry/available-connectors/microsoft-sql-server).""" - - query: TableImportQuery - initial_incremental_state: typing.Optional[TableImportInitialIncrementalState] = pydantic.Field(alias=str("initialIncrementalState"), default=None) # type: ignore[literal-required] - type: typing.Literal["microsoftSqlServerImportConfig"] = "microsoftSqlServerImportConfig" - - -NetworkEgressPolicyRid = core.RID -"""The Resource Identifier (RID) of a Network Egress Policy.""" - - -class OauthMachineToMachineAuth(core.ModelBase): - """ - Authenticate as a service principal using OAuth. Create a service principal in Databricks and generate an OAuth secret to obtain a client ID and secret. - Read the [official Databricks documentation](https://docs.databricks.com/aws/en/dev-tools/auth/oauth-m2m) for more information about OAuth machine-to-machine - authentication. - """ - - client_id: str = pydantic.Field(alias=str("clientID")) # type: ignore[literal-required] - """The client ID for the service principal.""" - - client_secret: EncryptedProperty = pydantic.Field(alias=str("clientSecret")) # type: ignore[literal-required] - """The value of the client secret.""" - - type: typing.Literal["oauthM2M"] = "oauthM2M" - - -class OracleTableImportConfig(core.ModelBase): - """The import configuration for an Oracle Database 21 connection.""" - - query: TableImportQuery - initial_incremental_state: typing.Optional[TableImportInitialIncrementalState] = pydantic.Field(alias=str("initialIncrementalState"), default=None) # type: ignore[literal-required] - type: typing.Literal["oracleImportConfig"] = "oracleImportConfig" - - -class PersonalAccessToken(core.ModelBase): - """ - Authenticate as a user or service principal using a personal access token. - Read the [official Databricks documentation](https://docs.databricks.com/aws/en/dev-tools/auth/pat) for information on generating a personal access token. - """ - - personal_access_token: EncryptedProperty = pydantic.Field(alias=str("personalAccessToken")) # type: ignore[literal-required] - type: typing.Literal["personalAccessToken"] = "personalAccessToken" - - -PlaintextValue = str -"""PlaintextValue""" - - -class PostgreSqlTableImportConfig(core.ModelBase): - """The import configuration for a [PostgreSQL connection](https://palantir.com/docs/foundry/available-connectors/postgresql).""" - - query: TableImportQuery - initial_incremental_state: typing.Optional[TableImportInitialIncrementalState] = pydantic.Field(alias=str("initialIncrementalState"), default=None) # type: ignore[literal-required] - type: typing.Literal["postgreSqlImportConfig"] = "postgreSqlImportConfig" - - -Protocol = typing.Literal["HTTP", "HTTPS"] -"""Protocol to establish a connection with another system.""" - - -class QueryParameterApiKey(core.ModelBase): - """QueryParameterApiKey""" - - query_parameter_name: str = pydantic.Field(alias=str("queryParameterName")) # type: ignore[literal-required] - """The name of the query parameter that the API key is passed in.""" - - type: typing.Literal["queryParameter"] = "queryParameter" - - -Region = str -"""The region of the external system.""" - - -class ReplaceFileImportRequest(core.ModelBase): - """ReplaceFileImportRequest""" - - import_mode: FileImportMode = pydantic.Field(alias=str("importMode")) # type: ignore[literal-required] - display_name: FileImportDisplayName = pydantic.Field(alias=str("displayName")) # type: ignore[literal-required] - subfolder: typing.Optional[str] = None - """A subfolder in the external system that will be imported. If not specified, defaults to the root folder of the external system.""" - - file_import_filters: typing.List[FileImportFilter] = pydantic.Field(alias=str("fileImportFilters")) # type: ignore[literal-required] - """Use filters to limit which files should be imported. Filters are applied in the order they are defined. A different ordering of filters may lead to a more optimized import. [Learn more about optimizing file imports.](https://palantir.com/docs/foundry/data-connection/file-based-syncs/#optimize-file-based-syncs)""" - - -class ReplaceTableImportRequest(core.ModelBase): - """ReplaceTableImportRequest""" - - import_mode: TableImportMode = pydantic.Field(alias=str("importMode")) # type: ignore[literal-required] - display_name: TableImportDisplayName = pydantic.Field(alias=str("displayName")) # type: ignore[literal-required] - allow_schema_changes: typing.Optional[TableImportAllowSchemaChanges] = pydantic.Field(alias=str("allowSchemaChanges"), default=None) # type: ignore[literal-required] - """Allow the TableImport to succeed if the schema of imported rows does not match the existing dataset's schema. Defaults to false for new table imports.""" - - config: ReplaceTableImportRequestTableImportConfig - - -class ReplaceTableImportRequestDatabricksTableImportConfig(core.ModelBase): - """ReplaceTableImportRequestDatabricksTableImportConfig""" - - initial_incremental_state: typing.Optional[TableImportInitialIncrementalState] = pydantic.Field(alias=str("initialIncrementalState"), default=None) # type: ignore[literal-required] - query: TableImportQuery - type: typing.Literal["databricksImportConfig"] = "databricksImportConfig" - - -class ReplaceTableImportRequestJdbcTableImportConfig(core.ModelBase): - """ReplaceTableImportRequestJdbcTableImportConfig""" - - initial_incremental_state: typing.Optional[TableImportInitialIncrementalState] = pydantic.Field(alias=str("initialIncrementalState"), default=None) # type: ignore[literal-required] - query: TableImportQuery - type: typing.Literal["jdbcImportConfig"] = "jdbcImportConfig" - - -class ReplaceTableImportRequestMicrosoftAccessTableImportConfig(core.ModelBase): - """ReplaceTableImportRequestMicrosoftAccessTableImportConfig""" - - initial_incremental_state: typing.Optional[TableImportInitialIncrementalState] = pydantic.Field(alias=str("initialIncrementalState"), default=None) # type: ignore[literal-required] - query: TableImportQuery - type: typing.Literal["microsoftAccessImportConfig"] = "microsoftAccessImportConfig" - - -class ReplaceTableImportRequestMicrosoftSqlServerTableImportConfig(core.ModelBase): - """ReplaceTableImportRequestMicrosoftSqlServerTableImportConfig""" - - initial_incremental_state: typing.Optional[TableImportInitialIncrementalState] = pydantic.Field(alias=str("initialIncrementalState"), default=None) # type: ignore[literal-required] - query: TableImportQuery - type: typing.Literal["microsoftSqlServerImportConfig"] = "microsoftSqlServerImportConfig" - - -class ReplaceTableImportRequestOracleTableImportConfig(core.ModelBase): - """ReplaceTableImportRequestOracleTableImportConfig""" - - initial_incremental_state: typing.Optional[TableImportInitialIncrementalState] = pydantic.Field(alias=str("initialIncrementalState"), default=None) # type: ignore[literal-required] - query: TableImportQuery - type: typing.Literal["oracleImportConfig"] = "oracleImportConfig" - - -class ReplaceTableImportRequestPostgreSqlTableImportConfig(core.ModelBase): - """ReplaceTableImportRequestPostgreSqlTableImportConfig""" - - initial_incremental_state: typing.Optional[TableImportInitialIncrementalState] = pydantic.Field(alias=str("initialIncrementalState"), default=None) # type: ignore[literal-required] - query: TableImportQuery - type: typing.Literal["postgreSqlImportConfig"] = "postgreSqlImportConfig" - - -class ReplaceTableImportRequestSnowflakeTableImportConfig(core.ModelBase): - """ReplaceTableImportRequestSnowflakeTableImportConfig""" - - initial_incremental_state: typing.Optional[TableImportInitialIncrementalState] = pydantic.Field(alias=str("initialIncrementalState"), default=None) # type: ignore[literal-required] - query: TableImportQuery - type: typing.Literal["snowflakeImportConfig"] = "snowflakeImportConfig" - - -ReplaceTableImportRequestTableImportConfig = typing_extensions.Annotated[ - typing.Union[ - "ReplaceTableImportRequestDatabricksTableImportConfig", - "ReplaceTableImportRequestJdbcTableImportConfig", - "ReplaceTableImportRequestMicrosoftSqlServerTableImportConfig", - "ReplaceTableImportRequestPostgreSqlTableImportConfig", - "ReplaceTableImportRequestMicrosoftAccessTableImportConfig", - "ReplaceTableImportRequestSnowflakeTableImportConfig", - "ReplaceTableImportRequestOracleTableImportConfig", - ], - pydantic.Field(discriminator="type"), -] -"""The import configuration for a specific [connector type](https://palantir.com/docs/foundry/data-integration/source-type-overview).""" - - -RestAuthenticationMode = typing_extensions.Annotated[ - typing.Union["BearerToken", "ApiKeyAuthentication", "BasicCredentials", "RestConnectionOAuth2"], - pydantic.Field(discriminator="type"), -] -"""The method of authentication for connecting to an external REST system.""" - - -RestConnectionAdditionalSecrets = typing_extensions.Annotated[ - typing.Union["SecretsWithPlaintextValues", "SecretsNames"], pydantic.Field(discriminator="type") -] -""" -When creating or updating additional secrets, use SecretsWithPlaintextValues. -When fetching the RestConnectionConfiguration, SecretsNames will be provided. -""" - - -class RestConnectionConfiguration(core.ModelBase): - """The configuration needed to connect to a [REST external system](https://palantir.com/docs/foundry/available-connectors/rest-apis).""" - - domains: typing.List[Domain] - """ - The domains that the connection is allowed to access. - At least one domain must be specified. - """ - - additional_secrets: typing.Optional[RestConnectionAdditionalSecrets] = pydantic.Field(alias=str("additionalSecrets"), default=None) # type: ignore[literal-required] - """ - Additional secrets that can be referenced in code and webhook configurations. - If not provided, no additional secrets will be created. - """ - - oauth2_client_rid: typing.Optional[core.RID] = pydantic.Field(alias=str("oauth2ClientRid"), default=None) # type: ignore[literal-required] - """ - The RID of the [Outbound application](https://palantir.com/docs/foundry/administration/configure-outbound-applications) that is used to authenticate to the external system via OAuth2. - Currently, a connection may use only one outbound application for OAuth 2.0 authentication. - Selecting a different outbound application will update the configuration for all domains with OAuth 2.0 as the selected authorization. - """ - - type: typing.Literal["rest"] = "rest" - - -class RestConnectionOAuth2(core.ModelBase): - """ - In order to use OAuth2 you must have an Outbound application configured in the [Foundry Control Panel Organization settings](https://palantir.com/docs/foundry/administration/configure-outbound-applications#create-an-outbound-application). - The RID of the Outbound application must be configured in the RestConnectionConfiguration in the `oauth2ClientRid` field. - """ - - type: typing.Literal["oauth2"] = "oauth2" - - -RestRequestApiKeyLocation = typing_extensions.Annotated[ - typing.Union["HeaderApiKey", "QueryParameterApiKey"], pydantic.Field(discriminator="type") -] -"""The location of the API key in the request.""" - - -S3AuthenticationMode = typing_extensions.Annotated[ - typing.Union["AwsAccessKey", "CloudIdentity", "AwsOidcAuthentication"], - pydantic.Field(discriminator="type"), -] -"""S3AuthenticationMode""" - - -class S3ConnectionConfiguration(core.ModelBase): - """ - The configuration needed to connect to an [AWS S3 external system (or any other S3-like external systems that - implement the s3a protocol)](https://palantir.com/docs/foundry/available-connectors/amazon-s3/#amazon-s3). - """ - - bucket_url: str = pydantic.Field(alias=str("bucketUrl")) # type: ignore[literal-required] - """The URL of the S3 bucket. The URL should contain a trailing slash.""" - - s3_endpoint: typing.Optional[str] = pydantic.Field(alias=str("s3Endpoint"), default=None) # type: ignore[literal-required] - """ - The endpoint of the S3 service. This is used to connect to a custom S3 service that is not AWS S3. - If not specified, defaults to the [AWS S3 endpoint](https://docs.aws.amazon.com/general/latest/gr/s3.html). - Warning: Specifying a region and a custom endpoint containing a region can lead to unexpected behavior. - """ - - region: typing.Optional[Region] = None - """ - The region representing the location of the S3 bucket. - Warning: Specifying a region and a custom endpoint containing a region can lead to unexpected behavior. - """ - - authentication_mode: typing.Optional[S3AuthenticationMode] = pydantic.Field(alias=str("authenticationMode"), default=None) # type: ignore[literal-required] - """ - The authentication mode to use to connect to the S3 external system. No authentication mode is required - to connect to publicly accessible AWS S3 buckets. - """ - - s3_endpoint_signing_region: typing.Optional[Region] = pydantic.Field(alias=str("s3EndpointSigningRegion"), default=None) # type: ignore[literal-required] - """ - The region used when constructing the S3 client using a custom endpoint. - This is often not required and would only be needed if you are using the S3 connector with an S3-compliant third-party API, - and are also setting a custom endpoint that requires a non-default region. - """ - - client_kms_configuration: typing.Optional[S3KmsConfiguration] = pydantic.Field(alias=str("clientKmsConfiguration"), default=None) # type: ignore[literal-required] - """ - The client-side KMS key to use for encryption and decryption of data in the S3 bucket. - If not specified, the default KMS key for the bucket is used. - """ - - sts_role_configuration: typing.Optional[StsRoleConfiguration] = pydantic.Field(alias=str("stsRoleConfiguration"), default=None) # type: ignore[literal-required] - """The configuration needed to assume a role to connect to the S3 external system.""" - - proxy_configuration: typing.Optional[S3ProxyConfiguration] = pydantic.Field(alias=str("proxyConfiguration"), default=None) # type: ignore[literal-required] - """The configuration needed to connect to the S3 external system through a proxy.""" - - max_connections: typing.Optional[int] = pydantic.Field(alias=str("maxConnections"), default=None) # type: ignore[literal-required] - """ - The maximum number of HTTP connections to the S3 service per sync. - If not specified, defaults to 50 as defined by the [AWS SDK default](https://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/ClientConfiguration.html#DEFAULT_MAX_CONNECTIONS). - """ - - connection_timeout_millis: typing.Optional[core.Long] = pydantic.Field(alias=str("connectionTimeoutMillis"), default=None) # type: ignore[literal-required] - """ - The amount of time (in milliseconds) to wait when initially establishing a connection before giving up and timing out. - If not specified, defaults to 10000 as defined by the [AWS SDK default](https://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/ClientConfiguration.html#DEFAULT_CONNECTION_TIMEOUT). - """ - - socket_timeout_millis: typing.Optional[core.Long] = pydantic.Field(alias=str("socketTimeoutMillis"), default=None) # type: ignore[literal-required] - """ - The amount of time (in milliseconds) to wait for data to be transferred over an established, open connection. - If not specified, defaults to 50000 as defined by the [AWS SDK default](https://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/ClientConfiguration.html#DEFAULT_SOCKET_TIMEOUT). - """ - - max_error_retry: typing.Optional[int] = pydantic.Field(alias=str("maxErrorRetry"), default=None) # type: ignore[literal-required] - """ - The maximum number of retry attempts for failed requests to the S3 service. - If not specified, defaults to 3 as defined by the [AWS SDK default](https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/retry-strategy.html#retry-strategies). - """ - - match_subfolder_exactly: typing.Optional[bool] = pydantic.Field(alias=str("matchSubfolderExactly"), default=None) # type: ignore[literal-required] - """ - If true, only files in the subfolder specified in the bucket URL will be synced. - If false, all files in the bucket will be synced. - If not specified, defaults to false. - """ - - enable_requester_pays: typing.Optional[bool] = pydantic.Field(alias=str("enableRequesterPays"), default=None) # type: ignore[literal-required] - """ - Defaults to false, unless set and overwritten. - If true, includes the [requester pays header](https://docs.aws.amazon.com/AmazonS3/latest/userguide/RequesterPaysBuckets.html) - in requests, allowing reads from requester pays buckets. - """ - - type: typing.Literal["s3"] = "s3" - - -class S3KmsConfiguration(core.ModelBase): - """S3KmsConfiguration""" - - kms_key: str = pydantic.Field(alias=str("kmsKey")) # type: ignore[literal-required] - """ - The client-side KMS key to use for encryption and decryption of data in the S3 bucket. - If not specified, the default KMS key for the bucket is used. - """ - - kms_region: typing.Optional[Region] = pydantic.Field(alias=str("kmsRegion"), default=None) # type: ignore[literal-required] - """ - The region of the client-side KMS key to use for encryption and decryption of data in the S3 bucket. - If not specified, the default KMS key region for the bucket is used. - """ - - -class S3ProxyConfiguration(core.ModelBase): - """S3ProxyConfiguration""" - - host: str - """ - Domain name, IPv4, or IPv6 address. - `protocol` and `port` must be specified separately. - """ - - port: int - non_proxy_hosts: typing.Optional[typing.List[str]] = pydantic.Field(alias=str("nonProxyHosts"), default=None) # type: ignore[literal-required] - """A list of hosts that can bypass the proxy, such as those used for STS Role. You can also use "*" wildcards.""" - - protocol: typing.Optional[Protocol] = None - """If defined, must be "HTTP" or "HTTPS". Defaults to "HTTPS".""" - - credentials: typing.Optional[BasicCredentials] = None - - -SecretName = str -"""SecretName""" - - -class SecretsNames(core.ModelBase): - """ - A list of secret names that can be referenced in code and webhook configurations. - This will be provided to the client when fetching the RestConnectionConfiguration. - """ - - secret_names: typing.List[SecretName] = pydantic.Field(alias=str("secretNames")) # type: ignore[literal-required] - """The names of the additional secrets that can be referenced in code and webhook configurations.""" - - type: typing.Literal["asSecretsNames"] = "asSecretsNames" - - -class SecretsWithPlaintextValues(core.ModelBase): - """ - A map representing secret name to plaintext secret value pairs. - This should be used when creating or updating additional secrets for a REST connection. - """ - - secrets: typing.Dict[SecretName, PlaintextValue] - """The additional secrets that can be referenced in code and webhook configurations.""" - - type: typing.Literal["asSecretsWithPlaintextValues"] = "asSecretsWithPlaintextValues" - - -class SmbConnectionConfiguration(core.ModelBase): - """SmbConnectionConfiguration""" - - hostname: str - """ - Any identifier that can resolve to a server hosting an SMB share. This includes IP addresses, local - network names (e.g. FS-SERVER-01) or FQDNs. Should not include any protocol information like https://, smb://, etc - """ - - port: typing.Optional[int] = None - """445 by default""" - - proxy: typing.Optional[SmbProxyConfiguration] = None - share: str - """ - Must be a valid SMB share name. - https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-fscc/dc9978d7-6299-4c5a-a22d-a039cdc716ea - """ - - base_directory: typing.Optional[str] = pydantic.Field(alias=str("baseDirectory"), default=None) # type: ignore[literal-required] - """All reads and writes in this source will happen in this subdirectory""" - - auth: SmbAuth - require_message_signing: typing.Optional[bool] = pydantic.Field(alias=str("requireMessageSigning"), default=None) # type: ignore[literal-required] - """ - If true, the client will request that the server sign all messages. If the server does not support - message signing, the connection will fail. Defaults to true. - """ - - type: typing.Literal["smb"] = "smb" - - -class SmbProxyConfiguration(core.ModelBase): - """Egress proxy to pass all traffic through.""" - - hostname: str - port: int - protocol: SmbProxyType - - -SmbProxyType = typing.Literal["HTTP", "SOCKS"] -"""SmbProxyType""" - - -class SmbUsernamePasswordAuth(core.ModelBase): - """SmbUsernamePasswordAuth""" - - username: str - password: EncryptedProperty - domain: typing.Optional[str] = None - """ - Optionally specify a Windows domain to use when authenticating. Normal DNS domain restrictions apply - but the top-level domain might be something non-standard like .local. Defaults to WORKGROUP - """ - - type: typing.Literal["usernamePassword"] = "usernamePassword" - - -SnowflakeAuthenticationMode = typing_extensions.Annotated[ - typing.Union["SnowflakeExternalOauth", "SnowflakeKeyPairAuthentication", "BasicCredentials"], - pydantic.Field(discriminator="type"), -] -"""SnowflakeAuthenticationMode""" - - -class SnowflakeConnectionConfiguration(core.ModelBase): - """The configuration needed to connect to a Snowflake database.""" - - account_identifier: str = pydantic.Field(alias=str("accountIdentifier")) # type: ignore[literal-required] - """ - An [account identifier](https://docs.snowflake.com/en/user-guide/admin-account-identifier) uniquely - identifies a Snowflake account within your organization, as well as throughout the global network of - Snowflake-supported cloud platforms and cloud regions. - - The URL for an account uses the following format: .snowflakecomputing.com. - An example URL is https://acme-test_aws_us_east_2.snowflakecomputing.com. - """ - - database: typing.Optional[str] = None - """ - Specifies the default database to use once connected. If unspecified, defaults to the empty string. - The specified database should be an existing database for which the specified default role has privileges. - - See https://docs.snowflake.com/developer-guide/jdbc/jdbc-parameters#db - """ - - role: typing.Optional[str] = None - """ - Specifies the default access control role to use in the Snowflake session initiated by the driver. - If unspecified, no role will be used when the session is initiated by the driver. - - The specified role should be an existing role that has already been assigned to the specified user for - the driver. If the specified role has not already been assigned to the user, the role is not used when - the session is initiated by the driver. - - See https://docs.snowflake.com/developer-guide/jdbc/jdbc-parameters#role - """ - - schema_: typing.Optional[str] = pydantic.Field(alias=str("schema"), default=None) # type: ignore[literal-required] - """ - Specifies the default schema to use for the specified database once connected. If unspecified, - defaults to the empty string. - The specified schema should be an existing schema for which the specified default role has privileges. - - See https://docs.snowflake.com/developer-guide/jdbc/jdbc-parameters#schema - """ - - warehouse: typing.Optional[str] = None - """ - Specifies the virtual warehouse to use once connected. If unspecified, defaults to the empty string. - The specified warehouse should be an existing warehouse for which the specified default role has privileges. - - See https://docs.snowflake.com/developer-guide/jdbc/jdbc-parameters#warehouse - """ - - authentication_mode: SnowflakeAuthenticationMode = pydantic.Field(alias=str("authenticationMode")) # type: ignore[literal-required] - """The authentication mode to use to connect to the Snowflake database.""" - - jdbc_properties: JdbcProperties = pydantic.Field(alias=str("jdbcProperties")) # type: ignore[literal-required] - type: typing.Literal["snowflake"] = "snowflake" - - -class SnowflakeExternalOauth(core.ModelBase): - """ - Use an External OAuth security integration to connect and authenticate to Snowflake. - - See https://docs.snowflake.com/en/user-guide/oauth-ext-custom - """ - - audience: str - """Identifies the recipients that the access token is intended for as a string URI.""" - - issuer_url: str = pydantic.Field(alias=str("issuerUrl")) # type: ignore[literal-required] - """Identifies the principal that issued the access token as a string URI.""" - - subject: ConnectionRid - """The RID of the Connection that is connecting to the external system.""" - - type: typing.Literal["externalOauth"] = "externalOauth" - - -class SnowflakeKeyPairAuthentication(core.ModelBase): - """ - Use a key-pair to connect and authenticate to Snowflake. - - See https://docs.snowflake.com/en/user-guide/key-pair-auth - """ - - user: str - private_key: EncryptedProperty = pydantic.Field(alias=str("privateKey")) # type: ignore[literal-required] - type: typing.Literal["keyPair"] = "keyPair" - - -class SnowflakeTableImportConfig(core.ModelBase): - """The table import configuration for a [Snowflake connection](https://palantir.com/docs/foundry/available-connectors/snowflake).""" - - query: TableImportQuery - initial_incremental_state: typing.Optional[TableImportInitialIncrementalState] = pydantic.Field(alias=str("initialIncrementalState"), default=None) # type: ignore[literal-required] - type: typing.Literal["snowflakeImportConfig"] = "snowflakeImportConfig" - - -class SnowflakeVirtualTableConfig(core.ModelBase): - """Pointer to the table in Snowflake. Uses the Snowflake table identifier of database, schema and table.""" - - database: str - """The database name.""" - - schema_: str = pydantic.Field(alias=str("schema")) # type: ignore[literal-required] - """The schema name.""" - - table: str - """The table name.""" - - type: typing.Literal["snowflake"] = "snowflake" - - -class StringColumnInitialIncrementalState(core.ModelBase): - """The state for an incremental table import using a column with a string data type.""" - - column_name: str = pydantic.Field(alias=str("columnName")) # type: ignore[literal-required] - current_value: str = pydantic.Field(alias=str("currentValue")) # type: ignore[literal-required] - """The initial incremental state value for the string column to reference in the query.""" - - type: typing.Literal["stringColumnInitialIncrementalState"] = ( - "stringColumnInitialIncrementalState" - ) - - -class StsRoleConfiguration(core.ModelBase): - """StsRoleConfiguration""" - - role_arn: str = pydantic.Field(alias=str("roleArn")) # type: ignore[literal-required] - """ - The Amazon Resource Name (ARN) of the role to assume. - For more information, see the official [AWS documentation](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html#principal-arn-format). - """ - - role_session_name: str = pydantic.Field(alias=str("roleSessionName")) # type: ignore[literal-required] - """ - An identifier for the assumed role session. - The value can be any string that you assume will be unique within the AWS account. - For more information, see the official [AWS documentation](https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRole.html#API_AssumeRole_RequestParameters). - """ - - role_session_duration: typing.Optional[core_models.Duration] = pydantic.Field(alias=str("roleSessionDuration"), default=None) # type: ignore[literal-required] - """ - The duration of the role session. - The value specified can range from 900 seconds (15 minutes) up to the maximum session duration set for the role. - The maximum session duration setting can have a value from 1 hour to 12 hours. For more details see the official [AWS documentation](https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRole.html#API_AssumeRole_RequestParameters). - """ - - external_id: typing.Optional[str] = pydantic.Field(alias=str("externalId"), default=None) # type: ignore[literal-required] - """ - A unique identifier that is used by third parties when assuming roles in their customers' accounts. - For more information, see the official [AWS documentation](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_externalid.html). - """ - - sts_endpoint: typing.Optional[str] = pydantic.Field(alias=str("stsEndpoint"), default=None) # type: ignore[literal-required] - """ - By default, the AWS Security Token Service (AWS STS) is available as a global service, and all AWS STS requests go to a single endpoint at https://sts.amazonaws.com. - AWS recommends using Regional AWS STS endpoints instead of the global endpoint to reduce latency, build in redundancy, and increase session token validity. - """ - - -class TableImport(core.ModelBase): - """TableImport""" - - rid: TableImportRid - connection_rid: ConnectionRid = pydantic.Field(alias=str("connectionRid")) # type: ignore[literal-required] - """The RID of the Connection (also known as a source) that the Table Import uses to import data.""" - - dataset_rid: datasets_models.DatasetRid = pydantic.Field(alias=str("datasetRid")) # type: ignore[literal-required] - """The RID of the output dataset. Can not be modified after the table import is created.""" - - branch_name: typing.Optional[datasets_models.BranchName] = pydantic.Field(alias=str("branchName"), default=None) # type: ignore[literal-required] - """The branch name in the output dataset that will contain the imported data. Defaults to `master` for most enrollments. Can not be modified after the table import is created.""" - - display_name: TableImportDisplayName = pydantic.Field(alias=str("displayName")) # type: ignore[literal-required] - import_mode: TableImportMode = pydantic.Field(alias=str("importMode")) # type: ignore[literal-required] - allow_schema_changes: TableImportAllowSchemaChanges = pydantic.Field(alias=str("allowSchemaChanges")) # type: ignore[literal-required] - """Allow the TableImport to succeed if the schema of imported rows does not match the existing dataset's schema. Defaults to false for new table imports.""" - - config: TableImportConfig - - -TableImportAllowSchemaChanges = bool -"""Allow the TableImport to succeed if the schema of imported rows does not match the existing dataset's schema. Defaults to false for new table imports.""" - - -TableImportConfig = typing_extensions.Annotated[ - typing.Union[ - "DatabricksTableImportConfig", - "JdbcTableImportConfig", - "MicrosoftSqlServerTableImportConfig", - "PostgreSqlTableImportConfig", - "MicrosoftAccessTableImportConfig", - "SnowflakeTableImportConfig", - "OracleTableImportConfig", - ], - pydantic.Field(discriminator="type"), -] -"""The import configuration for a specific [connector type](https://palantir.com/docs/foundry/data-integration/source-type-overview).""" - - -TableImportDisplayName = str -"""TableImportDisplayName""" - - -TableImportInitialIncrementalState = typing_extensions.Annotated[ - typing.Union[ - "StringColumnInitialIncrementalState", - "DateColumnInitialIncrementalState", - "IntegerColumnInitialIncrementalState", - "TimestampColumnInitialIncrementalState", - "LongColumnInitialIncrementalState", - "DecimalColumnInitialIncrementalState", - ], - pydantic.Field(discriminator="type"), -] -""" -The incremental configuration for a table import enables append-style transactions from the same table without duplication of data. -You must provide a monotonically increasing column such as a timestamp or id and an initial value for this column. -An incremental table import will import rows where the value is greater than the largest already imported. - -You can use the '?' character to reference the incremental state value when constructing your query. -Normally this would be used in a WHERE clause or similar filter applied in order to only sync data with an incremental column value -larger than the previously observed maximum value stored in the incremental state. -""" - - -TableImportMode = typing.Literal["SNAPSHOT", "APPEND"] -""" -Import mode governs how data is read from an external system, and written into a Foundry dataset. - -SNAPSHOT: Defines a new dataset state consisting only of data from a particular import execution. -APPEND: Purely additive and yields data from previous import executions in addition to newly added data. -""" - - -TableImportQuery = str -""" -A single SQL query can be executed per sync, which should output a data table -and avoid operations like invoking stored procedures. -The query results are saved to the output dataset in Foundry. -""" - - -TableImportRid = core.RID -"""The Resource Identifier (RID) of a TableImport (also known as a batch sync).""" - - -TableName = str -"""The name of a VirtualTable.""" - - -TableRid = core.RID -"""The Resource Identifier (RID) of a registered VirtualTable.""" - - -class TimestampColumnInitialIncrementalState(core.ModelBase): - """TimestampColumnInitialIncrementalState""" - - column_name: str = pydantic.Field(alias=str("columnName")) # type: ignore[literal-required] - current_value: core.AwareDatetime = pydantic.Field(alias=str("currentValue")) # type: ignore[literal-required] - """The initial incremental state value for the timestamp column in UTC to reference in the query.""" - - type: typing.Literal["timestampColumnInitialIncrementalState"] = ( - "timestampColumnInitialIncrementalState" - ) - - -class UnityVirtualTableConfig(core.ModelBase): - """Pointer to the table in Unity Catalog. Uses the Databricks table identifier of catalog, schema and table.""" - - catalog: str - """The catalog name.""" - - schema_: str = pydantic.Field(alias=str("schema")) # type: ignore[literal-required] - """The schema name.""" - - table: str - """The table name.""" - - type: typing.Literal["unity"] = "unity" - - -class UnknownWorker(core.ModelBase): - """ - A ConnectionWorker that is not supported in the Platform APIs. This can happen because either the - ConnectionWorker configuration is malformed, or because the ConnectionWorker is a legacy one. - The ConnectionWorker should be updated to use the [Foundry worker](https://palantir.com/docs/foundry/data-connection/core-concepts/#foundry-worker) - with either direct egress policies or agent proxy egress policies. - """ - - type: typing.Literal["unknownWorker"] = "unknownWorker" - - -class UpdateExportSettingsForConnectionRequest(core.ModelBase): - """UpdateExportSettingsForConnectionRequest""" - - export_settings: ConnectionExportSettings = pydantic.Field(alias=str("exportSettings")) # type: ignore[literal-required] - - -class UpdateSecretsForConnectionRequest(core.ModelBase): - """UpdateSecretsForConnectionRequest""" - - secrets: typing.Dict[SecretName, PlaintextValue] - """The secrets to be updated. The specified secret names must already be configured on the connection.""" - - -UriScheme = typing.Literal["HTTP", "HTTPS"] -"""Defines supported URI schemes to be used for external connections.""" - - -class VirtualTable(core.ModelBase): - """VirtualTable""" - - rid: TableRid - name: TableName - parent_rid: filesystem_models.FolderRid = pydantic.Field(alias=str("parentRid")) # type: ignore[literal-required] - config: VirtualTableConfig - markings: typing.Optional[typing.List[core_models.MarkingId]] = None - - -VirtualTableConfig = typing_extensions.Annotated[ - typing.Union[ - "SnowflakeVirtualTableConfig", - "UnityVirtualTableConfig", - "GlueVirtualTableConfig", - "DeltaVirtualTableConfig", - "IcebergVirtualTableConfig", - "FilesVirtualTableConfig", - "BigQueryVirtualTableConfig", - ], - pydantic.Field(discriminator="type"), -] -"""VirtualTableConfig""" - - -class WorkflowIdentityFederation(core.ModelBase): - """ - Authenticate as a service principal using workload identity federation. This is the recommended way to connect to Databricks. - Workload identity federation allows workloads running in Foundry to access Databricks APIs without the need for Databricks secrets. - Refer to our [OIDC documentation](https://palantir.com/docs/foundry/data-connection/oidc) for an overview of how OpenID Connect is supported in Foundry. - A service principal federation policy must exist in Databricks to allow Foundry to act as an identity provider. - Refer to the [official documentation](https://docs.databricks.com/aws/en/dev-tools/auth/oauth-federation) for guidance. - """ - - service_principal_application_id: typing.Optional[str] = pydantic.Field(alias=str("servicePrincipalApplicationId"), default=None) # type: ignore[literal-required] - """ - The ID of the Databricks [service principal](https://docs.databricks.com/aws/en/admin/users-groups/service-principals). - If provided, a federated JWT token is exchanged using a - service principal federation policy. If not provided, a federated JWT token is exchanged using an account - federation policy. - """ - - issuer_url: str = pydantic.Field(alias=str("issuerUrl")) # type: ignore[literal-required] - """Identifies the principal that issued the access token as a string URI.""" - - audience: str - """ - Identifies the recipients that the access token is intended for as a string URI. - This should be the primary host name where the Connection lives. - """ - - subject: ConnectionRid - """The RID of the Connection that is connecting to the external system.""" - - type: typing.Literal["workflowIdentityFederation"] = "workflowIdentityFederation" - - -CreateConnectionRequestSmbAuth = CreateConnectionRequestSmbUsernamePasswordAuth -"""CreateConnectionRequestSmbAuth""" - - -SmbAuth = SmbUsernamePasswordAuth -"""SmbAuth""" - - -core.resolve_forward_references(ConnectionConfiguration, globalns=globals(), localns=locals()) -core.resolve_forward_references(ConnectionWorker, globalns=globals(), localns=locals()) -core.resolve_forward_references( - CreateConnectionRequestConnectionConfiguration, globalns=globals(), localns=locals() -) -core.resolve_forward_references( - CreateConnectionRequestConnectionWorker, globalns=globals(), localns=locals() -) -core.resolve_forward_references( - CreateConnectionRequestDatabricksAuthenticationMode, globalns=globals(), localns=locals() -) -core.resolve_forward_references( - CreateConnectionRequestEncryptedProperty, globalns=globals(), localns=locals() -) -core.resolve_forward_references( - CreateConnectionRequestSnowflakeAuthenticationMode, globalns=globals(), localns=locals() -) -core.resolve_forward_references( - CreateTableImportRequestTableImportConfig, globalns=globals(), localns=locals() -) -core.resolve_forward_references(DatabricksAuthenticationMode, globalns=globals(), localns=locals()) -core.resolve_forward_references(EncryptedProperty, globalns=globals(), localns=locals()) -core.resolve_forward_references(FileImportFilter, globalns=globals(), localns=locals()) -core.resolve_forward_references(JdbcProperties, globalns=globals(), localns=locals()) -core.resolve_forward_references( - ReplaceTableImportRequestTableImportConfig, globalns=globals(), localns=locals() -) -core.resolve_forward_references(RestAuthenticationMode, globalns=globals(), localns=locals()) -core.resolve_forward_references( - RestConnectionAdditionalSecrets, globalns=globals(), localns=locals() -) -core.resolve_forward_references(RestRequestApiKeyLocation, globalns=globals(), localns=locals()) -core.resolve_forward_references(S3AuthenticationMode, globalns=globals(), localns=locals()) -core.resolve_forward_references(SnowflakeAuthenticationMode, globalns=globals(), localns=locals()) -core.resolve_forward_references(TableImportConfig, globalns=globals(), localns=locals()) -core.resolve_forward_references( - TableImportInitialIncrementalState, globalns=globals(), localns=locals() -) -core.resolve_forward_references(VirtualTableConfig, globalns=globals(), localns=locals()) - -__all__ = [ - "ApiKeyAuthentication", - "AsPlaintextValue", - "AsSecretName", - "AwsAccessKey", - "AwsOidcAuthentication", - "BasicCredentials", - "BearerToken", - "BigQueryVirtualTableConfig", - "CloudIdentity", - "CloudIdentityRid", - "Connection", - "ConnectionConfiguration", - "ConnectionDisplayName", - "ConnectionExportSettings", - "ConnectionRid", - "ConnectionWorker", - "CreateConnectionRequest", - "CreateConnectionRequestAsPlaintextValue", - "CreateConnectionRequestAsSecretName", - "CreateConnectionRequestBasicCredentials", - "CreateConnectionRequestConnectionConfiguration", - "CreateConnectionRequestConnectionWorker", - "CreateConnectionRequestDatabricksAuthenticationMode", - "CreateConnectionRequestDatabricksConnectionConfiguration", - "CreateConnectionRequestEncryptedProperty", - "CreateConnectionRequestFoundryWorker", - "CreateConnectionRequestJdbcConnectionConfiguration", - "CreateConnectionRequestOauthMachineToMachineAuth", - "CreateConnectionRequestPersonalAccessToken", - "CreateConnectionRequestRestConnectionConfiguration", - "CreateConnectionRequestS3ConnectionConfiguration", - "CreateConnectionRequestSmbAuth", - "CreateConnectionRequestSmbConnectionConfiguration", - "CreateConnectionRequestSmbUsernamePasswordAuth", - "CreateConnectionRequestSnowflakeAuthenticationMode", - "CreateConnectionRequestSnowflakeConnectionConfiguration", - "CreateConnectionRequestSnowflakeExternalOauth", - "CreateConnectionRequestSnowflakeKeyPairAuthentication", - "CreateConnectionRequestUnknownWorker", - "CreateConnectionRequestWorkflowIdentityFederation", - "CreateFileImportRequest", - "CreateTableImportRequest", - "CreateTableImportRequestDatabricksTableImportConfig", - "CreateTableImportRequestJdbcTableImportConfig", - "CreateTableImportRequestMicrosoftAccessTableImportConfig", - "CreateTableImportRequestMicrosoftSqlServerTableImportConfig", - "CreateTableImportRequestOracleTableImportConfig", - "CreateTableImportRequestPostgreSqlTableImportConfig", - "CreateTableImportRequestSnowflakeTableImportConfig", - "CreateTableImportRequestTableImportConfig", - "CreateVirtualTableRequest", - "DatabricksAuthenticationMode", - "DatabricksConnectionConfiguration", - "DatabricksTableImportConfig", - "DateColumnInitialIncrementalState", - "DecimalColumnInitialIncrementalState", - "DeltaVirtualTableConfig", - "Domain", - "EncryptedProperty", - "FileAnyPathMatchesFilter", - "FileAtLeastCountFilter", - "FileChangedSinceLastUploadFilter", - "FileFormat", - "FileImport", - "FileImportCustomFilter", - "FileImportDisplayName", - "FileImportFilter", - "FileImportMode", - "FileImportRid", - "FileLastModifiedAfterFilter", - "FilePathMatchesFilter", - "FilePathNotMatchesFilter", - "FileProperty", - "FileSizeFilter", - "FilesCountLimitFilter", - "FilesVirtualTableConfig", - "FoundryWorker", - "GetConfigurationConnectionsBatchRequestElement", - "GetConfigurationConnectionsBatchResponse", - "GlueVirtualTableConfig", - "HeaderApiKey", - "IcebergVirtualTableConfig", - "IntegerColumnInitialIncrementalState", - "InvalidConnectionReason", - "JdbcConnectionConfiguration", - "JdbcDriverArtifactName", - "JdbcProperties", - "JdbcTableImportConfig", - "ListFileImportsResponse", - "ListTableImportsResponse", - "LongColumnInitialIncrementalState", - "MicrosoftAccessTableImportConfig", - "MicrosoftSqlServerTableImportConfig", - "NetworkEgressPolicyRid", - "OauthMachineToMachineAuth", - "OracleTableImportConfig", - "PersonalAccessToken", - "PlaintextValue", - "PostgreSqlTableImportConfig", - "Protocol", - "QueryParameterApiKey", - "Region", - "ReplaceFileImportRequest", - "ReplaceTableImportRequest", - "ReplaceTableImportRequestDatabricksTableImportConfig", - "ReplaceTableImportRequestJdbcTableImportConfig", - "ReplaceTableImportRequestMicrosoftAccessTableImportConfig", - "ReplaceTableImportRequestMicrosoftSqlServerTableImportConfig", - "ReplaceTableImportRequestOracleTableImportConfig", - "ReplaceTableImportRequestPostgreSqlTableImportConfig", - "ReplaceTableImportRequestSnowflakeTableImportConfig", - "ReplaceTableImportRequestTableImportConfig", - "RestAuthenticationMode", - "RestConnectionAdditionalSecrets", - "RestConnectionConfiguration", - "RestConnectionOAuth2", - "RestRequestApiKeyLocation", - "S3AuthenticationMode", - "S3ConnectionConfiguration", - "S3KmsConfiguration", - "S3ProxyConfiguration", - "SecretName", - "SecretsNames", - "SecretsWithPlaintextValues", - "SmbAuth", - "SmbConnectionConfiguration", - "SmbProxyConfiguration", - "SmbProxyType", - "SmbUsernamePasswordAuth", - "SnowflakeAuthenticationMode", - "SnowflakeConnectionConfiguration", - "SnowflakeExternalOauth", - "SnowflakeKeyPairAuthentication", - "SnowflakeTableImportConfig", - "SnowflakeVirtualTableConfig", - "StringColumnInitialIncrementalState", - "StsRoleConfiguration", - "TableImport", - "TableImportAllowSchemaChanges", - "TableImportConfig", - "TableImportDisplayName", - "TableImportInitialIncrementalState", - "TableImportMode", - "TableImportQuery", - "TableImportRid", - "TableName", - "TableRid", - "TimestampColumnInitialIncrementalState", - "UnityVirtualTableConfig", - "UnknownWorker", - "UpdateExportSettingsForConnectionRequest", - "UpdateSecretsForConnectionRequest", - "UriScheme", - "VirtualTable", - "VirtualTableConfig", - "WorkflowIdentityFederation", -] diff --git a/foundry_sdk/v2/connectivity/table_import.py b/foundry_sdk/v2/connectivity/table_import.py deleted file mode 100644 index dabde28c1..000000000 --- a/foundry_sdk/v2/connectivity/table_import.py +++ /dev/null @@ -1,921 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing - -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v2.connectivity import errors as connectivity_errors -from foundry_sdk.v2.connectivity import models as connectivity_models -from foundry_sdk.v2.core import models as core_models -from foundry_sdk.v2.datasets import errors as datasets_errors -from foundry_sdk.v2.datasets import models as datasets_models - - -class TableImportClient: - """ - The API client for the TableImport Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _TableImportClientStreaming(self) - self.with_raw_response = _TableImportClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def create( - self, - connection_rid: connectivity_models.ConnectionRid, - *, - config: connectivity_models.CreateTableImportRequestTableImportConfig, - dataset_rid: datasets_models.DatasetRid, - display_name: connectivity_models.TableImportDisplayName, - import_mode: connectivity_models.TableImportMode, - allow_schema_changes: typing.Optional[ - connectivity_models.TableImportAllowSchemaChanges - ] = None, - branch_name: typing.Optional[datasets_models.BranchName] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> connectivity_models.TableImport: - """ - Creates a new TableImport. - :param connection_rid: - :type connection_rid: ConnectionRid - :param config: - :type config: CreateTableImportRequestTableImportConfig - :param dataset_rid: The RID of the output dataset. Can not be modified after the table import is created. - :type dataset_rid: DatasetRid - :param display_name: - :type display_name: TableImportDisplayName - :param import_mode: - :type import_mode: TableImportMode - :param allow_schema_changes: Allow the TableImport to succeed if the schema of imported rows does not match the existing dataset's schema. Defaults to false for new table imports. - :type allow_schema_changes: Optional[TableImportAllowSchemaChanges] - :param branch_name: The branch name in the output dataset that will contain the imported data. Defaults to `master` for most enrollments. Can not be modified after the table import is created. - :type branch_name: Optional[BranchName] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: connectivity_models.TableImport - - :raises ConnectionDetailsNotDetermined: Details of the connection (such as which types of import it supports) could not be determined. - :raises ConnectionNotFound: The given Connection could not be found. - :raises CreateTableImportPermissionDenied: Could not create the TableImport. - :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. - :raises TableImportNotSupportedForConnection: The specified connection does not support creating or replacing a table import with the specified config. - :raises TableImportTypeNotSupported: The specified table import type is not yet supported in the Platform API. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/connectivity/connections/{connectionRid}/tableImports", - query_params={ - "preview": preview, - }, - path_params={ - "connectionRid": connection_rid, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=connectivity_models.CreateTableImportRequest( - dataset_rid=dataset_rid, - import_mode=import_mode, - display_name=display_name, - allow_schema_changes=allow_schema_changes, - branch_name=branch_name, - config=config, - ), - response_type=connectivity_models.TableImport, - request_timeout=request_timeout, - throwable_errors={ - "ConnectionDetailsNotDetermined": connectivity_errors.ConnectionDetailsNotDetermined, - "ConnectionNotFound": connectivity_errors.ConnectionNotFound, - "CreateTableImportPermissionDenied": connectivity_errors.CreateTableImportPermissionDenied, - "DatasetNotFound": datasets_errors.DatasetNotFound, - "TableImportNotSupportedForConnection": connectivity_errors.TableImportNotSupportedForConnection, - "TableImportTypeNotSupported": connectivity_errors.TableImportTypeNotSupported, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def delete( - self, - connection_rid: connectivity_models.ConnectionRid, - table_import_rid: connectivity_models.TableImportRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> None: - """ - Delete the TableImport with the specified RID. - Deleting the table import does not delete the destination dataset but the dataset will no longer - be updated by this import. - - :param connection_rid: - :type connection_rid: ConnectionRid - :param table_import_rid: - :type table_import_rid: TableImportRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: None - - :raises DeleteTableImportPermissionDenied: Could not delete the TableImport. - :raises TableImportNotFound: The given TableImport could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="DELETE", - resource_path="/v2/connectivity/connections/{connectionRid}/tableImports/{tableImportRid}", - query_params={ - "preview": preview, - }, - path_params={ - "connectionRid": connection_rid, - "tableImportRid": table_import_rid, - }, - header_params={}, - body=None, - response_type=None, - request_timeout=request_timeout, - throwable_errors={ - "DeleteTableImportPermissionDenied": connectivity_errors.DeleteTableImportPermissionDenied, - "TableImportNotFound": connectivity_errors.TableImportNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def execute( - self, - connection_rid: connectivity_models.ConnectionRid, - table_import_rid: connectivity_models.TableImportRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core_models.BuildRid: - """ - Executes the TableImport, which runs asynchronously as a [Foundry Build](https://palantir.com/docs/foundry/data-integration/builds/). - The returned BuildRid can be used to check the status via the Orchestration API. - - :param connection_rid: - :type connection_rid: ConnectionRid - :param table_import_rid: - :type table_import_rid: TableImportRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core_models.BuildRid - - :raises ExecuteTableImportPermissionDenied: Could not execute the TableImport. - :raises TableImportNotFound: The given TableImport could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/connectivity/connections/{connectionRid}/tableImports/{tableImportRid}/execute", - query_params={ - "preview": preview, - }, - path_params={ - "connectionRid": connection_rid, - "tableImportRid": table_import_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=core_models.BuildRid, - request_timeout=request_timeout, - throwable_errors={ - "ExecuteTableImportPermissionDenied": connectivity_errors.ExecuteTableImportPermissionDenied, - "TableImportNotFound": connectivity_errors.TableImportNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - connection_rid: connectivity_models.ConnectionRid, - table_import_rid: connectivity_models.TableImportRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> connectivity_models.TableImport: - """ - Get the TableImport with the specified rid. - :param connection_rid: - :type connection_rid: ConnectionRid - :param table_import_rid: - :type table_import_rid: TableImportRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: connectivity_models.TableImport - - :raises TableImportNotFound: The given TableImport could not be found. - :raises TableImportTypeNotSupported: The specified table import type is not yet supported in the Platform API. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/connectivity/connections/{connectionRid}/tableImports/{tableImportRid}", - query_params={ - "preview": preview, - }, - path_params={ - "connectionRid": connection_rid, - "tableImportRid": table_import_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=connectivity_models.TableImport, - request_timeout=request_timeout, - throwable_errors={ - "TableImportNotFound": connectivity_errors.TableImportNotFound, - "TableImportTypeNotSupported": connectivity_errors.TableImportTypeNotSupported, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def list( - self, - connection_rid: connectivity_models.ConnectionRid, - *, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.ResourceIterator[connectivity_models.TableImport]: - """ - Lists all table imports defined for this connection. - Only table imports that the user has permissions to view will be returned. - - :param connection_rid: - :type connection_rid: ConnectionRid - :param page_size: The page size to use for the endpoint. - :type page_size: Optional[PageSize] - :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. - :type page_token: Optional[PageToken] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.ResourceIterator[connectivity_models.TableImport] - - :raises ConnectionNotFound: The given Connection could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/connectivity/connections/{connectionRid}/tableImports", - query_params={ - "pageSize": page_size, - "pageToken": page_token, - "preview": preview, - }, - path_params={ - "connectionRid": connection_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=connectivity_models.ListTableImportsResponse, - request_timeout=request_timeout, - throwable_errors={ - "ConnectionNotFound": connectivity_errors.ConnectionNotFound, - }, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def replace( - self, - connection_rid: connectivity_models.ConnectionRid, - table_import_rid: connectivity_models.TableImportRid, - *, - config: connectivity_models.ReplaceTableImportRequestTableImportConfig, - display_name: connectivity_models.TableImportDisplayName, - import_mode: connectivity_models.TableImportMode, - allow_schema_changes: typing.Optional[ - connectivity_models.TableImportAllowSchemaChanges - ] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> connectivity_models.TableImport: - """ - Replace the TableImport with the specified rid. - :param connection_rid: - :type connection_rid: ConnectionRid - :param table_import_rid: - :type table_import_rid: TableImportRid - :param config: - :type config: ReplaceTableImportRequestTableImportConfig - :param display_name: - :type display_name: TableImportDisplayName - :param import_mode: - :type import_mode: TableImportMode - :param allow_schema_changes: Allow the TableImport to succeed if the schema of imported rows does not match the existing dataset's schema. Defaults to false for new table imports. - :type allow_schema_changes: Optional[TableImportAllowSchemaChanges] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: connectivity_models.TableImport - - :raises ConnectionDetailsNotDetermined: Details of the connection (such as which types of import it supports) could not be determined. - :raises ConnectionNotFound: The given Connection could not be found. - :raises ReplaceTableImportPermissionDenied: Could not replace the TableImport. - :raises TableImportNotFound: The given TableImport could not be found. - :raises TableImportNotSupportedForConnection: The specified connection does not support creating or replacing a table import with the specified config. - :raises TableImportTypeNotSupported: The specified table import type is not yet supported in the Platform API. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="PUT", - resource_path="/v2/connectivity/connections/{connectionRid}/tableImports/{tableImportRid}", - query_params={ - "preview": preview, - }, - path_params={ - "connectionRid": connection_rid, - "tableImportRid": table_import_rid, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=connectivity_models.ReplaceTableImportRequest( - import_mode=import_mode, - display_name=display_name, - allow_schema_changes=allow_schema_changes, - config=config, - ), - response_type=connectivity_models.TableImport, - request_timeout=request_timeout, - throwable_errors={ - "ConnectionDetailsNotDetermined": connectivity_errors.ConnectionDetailsNotDetermined, - "ConnectionNotFound": connectivity_errors.ConnectionNotFound, - "ReplaceTableImportPermissionDenied": connectivity_errors.ReplaceTableImportPermissionDenied, - "TableImportNotFound": connectivity_errors.TableImportNotFound, - "TableImportNotSupportedForConnection": connectivity_errors.TableImportNotSupportedForConnection, - "TableImportTypeNotSupported": connectivity_errors.TableImportTypeNotSupported, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _TableImportClientRaw: - def __init__(self, client: TableImportClient) -> None: - def create(_: connectivity_models.TableImport): ... - def delete(_: None): ... - def execute(_: core_models.BuildRid): ... - def get(_: connectivity_models.TableImport): ... - def list(_: connectivity_models.ListTableImportsResponse): ... - def replace(_: connectivity_models.TableImport): ... - - self.create = core.with_raw_response(create, client.create) - self.delete = core.with_raw_response(delete, client.delete) - self.execute = core.with_raw_response(execute, client.execute) - self.get = core.with_raw_response(get, client.get) - self.list = core.with_raw_response(list, client.list) - self.replace = core.with_raw_response(replace, client.replace) - - -class _TableImportClientStreaming: - def __init__(self, client: TableImportClient) -> None: - def create(_: connectivity_models.TableImport): ... - def execute(_: core_models.BuildRid): ... - def get(_: connectivity_models.TableImport): ... - def list(_: connectivity_models.ListTableImportsResponse): ... - def replace(_: connectivity_models.TableImport): ... - - self.create = core.with_streaming_response(create, client.create) - self.execute = core.with_streaming_response(execute, client.execute) - self.get = core.with_streaming_response(get, client.get) - self.list = core.with_streaming_response(list, client.list) - self.replace = core.with_streaming_response(replace, client.replace) - - -class AsyncTableImportClient: - """ - The API client for the TableImport Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AsyncTableImportClientStreaming(self) - self.with_raw_response = _AsyncTableImportClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def create( - self, - connection_rid: connectivity_models.ConnectionRid, - *, - config: connectivity_models.CreateTableImportRequestTableImportConfig, - dataset_rid: datasets_models.DatasetRid, - display_name: connectivity_models.TableImportDisplayName, - import_mode: connectivity_models.TableImportMode, - allow_schema_changes: typing.Optional[ - connectivity_models.TableImportAllowSchemaChanges - ] = None, - branch_name: typing.Optional[datasets_models.BranchName] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[connectivity_models.TableImport]: - """ - Creates a new TableImport. - :param connection_rid: - :type connection_rid: ConnectionRid - :param config: - :type config: CreateTableImportRequestTableImportConfig - :param dataset_rid: The RID of the output dataset. Can not be modified after the table import is created. - :type dataset_rid: DatasetRid - :param display_name: - :type display_name: TableImportDisplayName - :param import_mode: - :type import_mode: TableImportMode - :param allow_schema_changes: Allow the TableImport to succeed if the schema of imported rows does not match the existing dataset's schema. Defaults to false for new table imports. - :type allow_schema_changes: Optional[TableImportAllowSchemaChanges] - :param branch_name: The branch name in the output dataset that will contain the imported data. Defaults to `master` for most enrollments. Can not be modified after the table import is created. - :type branch_name: Optional[BranchName] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[connectivity_models.TableImport] - - :raises ConnectionDetailsNotDetermined: Details of the connection (such as which types of import it supports) could not be determined. - :raises ConnectionNotFound: The given Connection could not be found. - :raises CreateTableImportPermissionDenied: Could not create the TableImport. - :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. - :raises TableImportNotSupportedForConnection: The specified connection does not support creating or replacing a table import with the specified config. - :raises TableImportTypeNotSupported: The specified table import type is not yet supported in the Platform API. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/connectivity/connections/{connectionRid}/tableImports", - query_params={ - "preview": preview, - }, - path_params={ - "connectionRid": connection_rid, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=connectivity_models.CreateTableImportRequest( - dataset_rid=dataset_rid, - import_mode=import_mode, - display_name=display_name, - allow_schema_changes=allow_schema_changes, - branch_name=branch_name, - config=config, - ), - response_type=connectivity_models.TableImport, - request_timeout=request_timeout, - throwable_errors={ - "ConnectionDetailsNotDetermined": connectivity_errors.ConnectionDetailsNotDetermined, - "ConnectionNotFound": connectivity_errors.ConnectionNotFound, - "CreateTableImportPermissionDenied": connectivity_errors.CreateTableImportPermissionDenied, - "DatasetNotFound": datasets_errors.DatasetNotFound, - "TableImportNotSupportedForConnection": connectivity_errors.TableImportNotSupportedForConnection, - "TableImportTypeNotSupported": connectivity_errors.TableImportTypeNotSupported, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def delete( - self, - connection_rid: connectivity_models.ConnectionRid, - table_import_rid: connectivity_models.TableImportRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[None]: - """ - Delete the TableImport with the specified RID. - Deleting the table import does not delete the destination dataset but the dataset will no longer - be updated by this import. - - :param connection_rid: - :type connection_rid: ConnectionRid - :param table_import_rid: - :type table_import_rid: TableImportRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[None] - - :raises DeleteTableImportPermissionDenied: Could not delete the TableImport. - :raises TableImportNotFound: The given TableImport could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="DELETE", - resource_path="/v2/connectivity/connections/{connectionRid}/tableImports/{tableImportRid}", - query_params={ - "preview": preview, - }, - path_params={ - "connectionRid": connection_rid, - "tableImportRid": table_import_rid, - }, - header_params={}, - body=None, - response_type=None, - request_timeout=request_timeout, - throwable_errors={ - "DeleteTableImportPermissionDenied": connectivity_errors.DeleteTableImportPermissionDenied, - "TableImportNotFound": connectivity_errors.TableImportNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def execute( - self, - connection_rid: connectivity_models.ConnectionRid, - table_import_rid: connectivity_models.TableImportRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[core_models.BuildRid]: - """ - Executes the TableImport, which runs asynchronously as a [Foundry Build](https://palantir.com/docs/foundry/data-integration/builds/). - The returned BuildRid can be used to check the status via the Orchestration API. - - :param connection_rid: - :type connection_rid: ConnectionRid - :param table_import_rid: - :type table_import_rid: TableImportRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[core_models.BuildRid] - - :raises ExecuteTableImportPermissionDenied: Could not execute the TableImport. - :raises TableImportNotFound: The given TableImport could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/connectivity/connections/{connectionRid}/tableImports/{tableImportRid}/execute", - query_params={ - "preview": preview, - }, - path_params={ - "connectionRid": connection_rid, - "tableImportRid": table_import_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=core_models.BuildRid, - request_timeout=request_timeout, - throwable_errors={ - "ExecuteTableImportPermissionDenied": connectivity_errors.ExecuteTableImportPermissionDenied, - "TableImportNotFound": connectivity_errors.TableImportNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - connection_rid: connectivity_models.ConnectionRid, - table_import_rid: connectivity_models.TableImportRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[connectivity_models.TableImport]: - """ - Get the TableImport with the specified rid. - :param connection_rid: - :type connection_rid: ConnectionRid - :param table_import_rid: - :type table_import_rid: TableImportRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[connectivity_models.TableImport] - - :raises TableImportNotFound: The given TableImport could not be found. - :raises TableImportTypeNotSupported: The specified table import type is not yet supported in the Platform API. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/connectivity/connections/{connectionRid}/tableImports/{tableImportRid}", - query_params={ - "preview": preview, - }, - path_params={ - "connectionRid": connection_rid, - "tableImportRid": table_import_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=connectivity_models.TableImport, - request_timeout=request_timeout, - throwable_errors={ - "TableImportNotFound": connectivity_errors.TableImportNotFound, - "TableImportTypeNotSupported": connectivity_errors.TableImportTypeNotSupported, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def list( - self, - connection_rid: connectivity_models.ConnectionRid, - *, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.AsyncResourceIterator[connectivity_models.TableImport]: - """ - Lists all table imports defined for this connection. - Only table imports that the user has permissions to view will be returned. - - :param connection_rid: - :type connection_rid: ConnectionRid - :param page_size: The page size to use for the endpoint. - :type page_size: Optional[PageSize] - :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. - :type page_token: Optional[PageToken] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.AsyncResourceIterator[connectivity_models.TableImport] - - :raises ConnectionNotFound: The given Connection could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/connectivity/connections/{connectionRid}/tableImports", - query_params={ - "pageSize": page_size, - "pageToken": page_token, - "preview": preview, - }, - path_params={ - "connectionRid": connection_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=connectivity_models.ListTableImportsResponse, - request_timeout=request_timeout, - throwable_errors={ - "ConnectionNotFound": connectivity_errors.ConnectionNotFound, - }, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def replace( - self, - connection_rid: connectivity_models.ConnectionRid, - table_import_rid: connectivity_models.TableImportRid, - *, - config: connectivity_models.ReplaceTableImportRequestTableImportConfig, - display_name: connectivity_models.TableImportDisplayName, - import_mode: connectivity_models.TableImportMode, - allow_schema_changes: typing.Optional[ - connectivity_models.TableImportAllowSchemaChanges - ] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[connectivity_models.TableImport]: - """ - Replace the TableImport with the specified rid. - :param connection_rid: - :type connection_rid: ConnectionRid - :param table_import_rid: - :type table_import_rid: TableImportRid - :param config: - :type config: ReplaceTableImportRequestTableImportConfig - :param display_name: - :type display_name: TableImportDisplayName - :param import_mode: - :type import_mode: TableImportMode - :param allow_schema_changes: Allow the TableImport to succeed if the schema of imported rows does not match the existing dataset's schema. Defaults to false for new table imports. - :type allow_schema_changes: Optional[TableImportAllowSchemaChanges] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[connectivity_models.TableImport] - - :raises ConnectionDetailsNotDetermined: Details of the connection (such as which types of import it supports) could not be determined. - :raises ConnectionNotFound: The given Connection could not be found. - :raises ReplaceTableImportPermissionDenied: Could not replace the TableImport. - :raises TableImportNotFound: The given TableImport could not be found. - :raises TableImportNotSupportedForConnection: The specified connection does not support creating or replacing a table import with the specified config. - :raises TableImportTypeNotSupported: The specified table import type is not yet supported in the Platform API. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="PUT", - resource_path="/v2/connectivity/connections/{connectionRid}/tableImports/{tableImportRid}", - query_params={ - "preview": preview, - }, - path_params={ - "connectionRid": connection_rid, - "tableImportRid": table_import_rid, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=connectivity_models.ReplaceTableImportRequest( - import_mode=import_mode, - display_name=display_name, - allow_schema_changes=allow_schema_changes, - config=config, - ), - response_type=connectivity_models.TableImport, - request_timeout=request_timeout, - throwable_errors={ - "ConnectionDetailsNotDetermined": connectivity_errors.ConnectionDetailsNotDetermined, - "ConnectionNotFound": connectivity_errors.ConnectionNotFound, - "ReplaceTableImportPermissionDenied": connectivity_errors.ReplaceTableImportPermissionDenied, - "TableImportNotFound": connectivity_errors.TableImportNotFound, - "TableImportNotSupportedForConnection": connectivity_errors.TableImportNotSupportedForConnection, - "TableImportTypeNotSupported": connectivity_errors.TableImportTypeNotSupported, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _AsyncTableImportClientRaw: - def __init__(self, client: AsyncTableImportClient) -> None: - def create(_: connectivity_models.TableImport): ... - def delete(_: None): ... - def execute(_: core_models.BuildRid): ... - def get(_: connectivity_models.TableImport): ... - def list(_: connectivity_models.ListTableImportsResponse): ... - def replace(_: connectivity_models.TableImport): ... - - self.create = core.async_with_raw_response(create, client.create) - self.delete = core.async_with_raw_response(delete, client.delete) - self.execute = core.async_with_raw_response(execute, client.execute) - self.get = core.async_with_raw_response(get, client.get) - self.list = core.async_with_raw_response(list, client.list) - self.replace = core.async_with_raw_response(replace, client.replace) - - -class _AsyncTableImportClientStreaming: - def __init__(self, client: AsyncTableImportClient) -> None: - def create(_: connectivity_models.TableImport): ... - def execute(_: core_models.BuildRid): ... - def get(_: connectivity_models.TableImport): ... - def list(_: connectivity_models.ListTableImportsResponse): ... - def replace(_: connectivity_models.TableImport): ... - - self.create = core.async_with_streaming_response(create, client.create) - self.execute = core.async_with_streaming_response(execute, client.execute) - self.get = core.async_with_streaming_response(get, client.get) - self.list = core.async_with_streaming_response(list, client.list) - self.replace = core.async_with_streaming_response(replace, client.replace) diff --git a/foundry_sdk/v2/connectivity/virtual_table.py b/foundry_sdk/v2/connectivity/virtual_table.py deleted file mode 100644 index fe5e7051d..000000000 --- a/foundry_sdk/v2/connectivity/virtual_table.py +++ /dev/null @@ -1,254 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing - -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v2.connectivity import errors as connectivity_errors -from foundry_sdk.v2.connectivity import models as connectivity_models -from foundry_sdk.v2.core import models as core_models -from foundry_sdk.v2.filesystem import models as filesystem_models - - -class VirtualTableClient: - """ - The API client for the VirtualTable Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _VirtualTableClientStreaming(self) - self.with_raw_response = _VirtualTableClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def create( - self, - connection_rid: connectivity_models.ConnectionRid, - *, - config: connectivity_models.VirtualTableConfig, - name: connectivity_models.TableName, - parent_rid: filesystem_models.FolderRid, - markings: typing.Optional[typing.List[core_models.MarkingId]] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> connectivity_models.VirtualTable: - """ - Creates a new [Virtual Table](https://palantir.com/docs/foundry/data-integration/virtual-tables/) from an upstream table. The VirtualTable will be created - in the specified parent folder and can be queried through Foundry's data access APIs. - - :param connection_rid: - :type connection_rid: ConnectionRid - :param config: - :type config: VirtualTableConfig - :param name: - :type name: TableName - :param parent_rid: - :type parent_rid: FolderRid - :param markings: - :type markings: Optional[List[MarkingId]] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: connectivity_models.VirtualTable - - :raises ConnectionNotFound: The given Connection could not be found. - :raises CreateVirtualTablePermissionDenied: Could not create the VirtualTable. - :raises InvalidVirtualTableConnection: The specified connection is invalid or inaccessible. - :raises VirtualTableAlreadyExists: A VirtualTable with the same name already exists in the parent folder. - :raises VirtualTableRegisterFromSourcePermissionDenied: User lacks permission to use the specified connection for virtual table registration. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/connectivity/connections/{connectionRid}/virtualTables", - query_params={ - "preview": preview, - }, - path_params={ - "connectionRid": connection_rid, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=connectivity_models.CreateVirtualTableRequest( - markings=markings, - parent_rid=parent_rid, - name=name, - config=config, - ), - response_type=connectivity_models.VirtualTable, - request_timeout=request_timeout, - throwable_errors={ - "ConnectionNotFound": connectivity_errors.ConnectionNotFound, - "CreateVirtualTablePermissionDenied": connectivity_errors.CreateVirtualTablePermissionDenied, - "InvalidVirtualTableConnection": connectivity_errors.InvalidVirtualTableConnection, - "VirtualTableAlreadyExists": connectivity_errors.VirtualTableAlreadyExists, - "VirtualTableRegisterFromSourcePermissionDenied": connectivity_errors.VirtualTableRegisterFromSourcePermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _VirtualTableClientRaw: - def __init__(self, client: VirtualTableClient) -> None: - def create(_: connectivity_models.VirtualTable): ... - - self.create = core.with_raw_response(create, client.create) - - -class _VirtualTableClientStreaming: - def __init__(self, client: VirtualTableClient) -> None: - def create(_: connectivity_models.VirtualTable): ... - - self.create = core.with_streaming_response(create, client.create) - - -class AsyncVirtualTableClient: - """ - The API client for the VirtualTable Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AsyncVirtualTableClientStreaming(self) - self.with_raw_response = _AsyncVirtualTableClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def create( - self, - connection_rid: connectivity_models.ConnectionRid, - *, - config: connectivity_models.VirtualTableConfig, - name: connectivity_models.TableName, - parent_rid: filesystem_models.FolderRid, - markings: typing.Optional[typing.List[core_models.MarkingId]] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[connectivity_models.VirtualTable]: - """ - Creates a new [Virtual Table](https://palantir.com/docs/foundry/data-integration/virtual-tables/) from an upstream table. The VirtualTable will be created - in the specified parent folder and can be queried through Foundry's data access APIs. - - :param connection_rid: - :type connection_rid: ConnectionRid - :param config: - :type config: VirtualTableConfig - :param name: - :type name: TableName - :param parent_rid: - :type parent_rid: FolderRid - :param markings: - :type markings: Optional[List[MarkingId]] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[connectivity_models.VirtualTable] - - :raises ConnectionNotFound: The given Connection could not be found. - :raises CreateVirtualTablePermissionDenied: Could not create the VirtualTable. - :raises InvalidVirtualTableConnection: The specified connection is invalid or inaccessible. - :raises VirtualTableAlreadyExists: A VirtualTable with the same name already exists in the parent folder. - :raises VirtualTableRegisterFromSourcePermissionDenied: User lacks permission to use the specified connection for virtual table registration. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/connectivity/connections/{connectionRid}/virtualTables", - query_params={ - "preview": preview, - }, - path_params={ - "connectionRid": connection_rid, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=connectivity_models.CreateVirtualTableRequest( - markings=markings, - parent_rid=parent_rid, - name=name, - config=config, - ), - response_type=connectivity_models.VirtualTable, - request_timeout=request_timeout, - throwable_errors={ - "ConnectionNotFound": connectivity_errors.ConnectionNotFound, - "CreateVirtualTablePermissionDenied": connectivity_errors.CreateVirtualTablePermissionDenied, - "InvalidVirtualTableConnection": connectivity_errors.InvalidVirtualTableConnection, - "VirtualTableAlreadyExists": connectivity_errors.VirtualTableAlreadyExists, - "VirtualTableRegisterFromSourcePermissionDenied": connectivity_errors.VirtualTableRegisterFromSourcePermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _AsyncVirtualTableClientRaw: - def __init__(self, client: AsyncVirtualTableClient) -> None: - def create(_: connectivity_models.VirtualTable): ... - - self.create = core.async_with_raw_response(create, client.create) - - -class _AsyncVirtualTableClientStreaming: - def __init__(self, client: AsyncVirtualTableClient) -> None: - def create(_: connectivity_models.VirtualTable): ... - - self.create = core.async_with_streaming_response(create, client.create) diff --git a/foundry_sdk/v2/core/errors.py b/foundry_sdk/v2/core/errors.py deleted file mode 100644 index faec61968..000000000 --- a/foundry_sdk/v2/core/errors.py +++ /dev/null @@ -1,387 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing -from dataclasses import dataclass - -import typing_extensions - -from foundry_sdk import _errors as errors -from foundry_sdk.v2.core import models as core_models - - -class ApiFeaturePreviewUsageOnlyParameters(typing_extensions.TypedDict): - """ - This feature is only supported in preview mode. Please use `preview=true` in the query - parameters to call this endpoint. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class ApiFeaturePreviewUsageOnly(errors.BadRequestError): - name: typing.Literal["ApiFeaturePreviewUsageOnly"] - parameters: ApiFeaturePreviewUsageOnlyParameters - error_instance_id: str - - -class ApiUsageDeniedParameters(typing_extensions.TypedDict): - """You are not allowed to use Palantir APIs.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - missingScope: typing_extensions.NotRequired[core_models.OperationScope] - - -@dataclass -class ApiUsageDenied(errors.PermissionDeniedError): - name: typing.Literal["ApiUsageDenied"] - parameters: ApiUsageDeniedParameters - error_instance_id: str - - -class BatchRequestSizeExceededLimitParameters(typing_extensions.TypedDict): - """The submitted batch request was too large.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - maximumBatchSize: int - """The maximum size of batch requests that can be sent to this endpoint.""" - - providedBatchSize: int - """The size of the batch request that was sent to this endpoint.""" - - -@dataclass -class BatchRequestSizeExceededLimit(errors.BadRequestError): - name: typing.Literal["BatchRequestSizeExceededLimit"] - parameters: BatchRequestSizeExceededLimitParameters - error_instance_id: str - - -class FolderNotFoundParameters(typing_extensions.TypedDict): - """The requested folder could not be found, or the client token does not have access to it.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - folderRid: core_models.FolderRid - - -@dataclass -class FolderNotFound(errors.NotFoundError): - name: typing.Literal["FolderNotFound"] - parameters: FolderNotFoundParameters - error_instance_id: str - - -class FoundryBranchNotFoundParameters(typing_extensions.TypedDict): - """The requested foundry branch could not be found, or the client token does not have access to it.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - branch: core_models.FoundryBranch - - -@dataclass -class FoundryBranchNotFound(errors.NotFoundError): - name: typing.Literal["FoundryBranchNotFound"] - parameters: FoundryBranchNotFoundParameters - error_instance_id: str - - -class InvalidAndFilterParameters(typing_extensions.TypedDict): - """The provided AND filter should have at least one sub-filter.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class InvalidAndFilter(errors.BadRequestError): - name: typing.Literal["InvalidAndFilter"] - parameters: InvalidAndFilterParameters - error_instance_id: str - - -class InvalidAttributionHeaderParameters(typing_extensions.TypedDict): - """ - The attribution provided in the header could not be parsed to a valid RID, or to a comma separated list of - valid RIDs. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - header: str - - -@dataclass -class InvalidAttributionHeader(errors.BadRequestError): - name: typing.Literal["InvalidAttributionHeader"] - parameters: InvalidAttributionHeaderParameters - error_instance_id: str - - -class InvalidChangeDataCaptureConfigurationParameters(typing_extensions.TypedDict): - """The change data capture configuration is invalid.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class InvalidChangeDataCaptureConfiguration(errors.BadRequestError): - name: typing.Literal["InvalidChangeDataCaptureConfiguration"] - parameters: InvalidChangeDataCaptureConfigurationParameters - error_instance_id: str - - -class InvalidFieldSchemaParameters(typing_extensions.TypedDict): - """The field schema failed validations""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - fieldName: typing_extensions.NotRequired[core_models.FieldName] - message: str - - -@dataclass -class InvalidFieldSchema(errors.BadRequestError): - name: typing.Literal["InvalidFieldSchema"] - parameters: InvalidFieldSchemaParameters - error_instance_id: str - - -class InvalidFilePathParameters(typing_extensions.TypedDict): - """The provided file path is invalid.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - filePath: core_models.FilePath - - -@dataclass -class InvalidFilePath(errors.BadRequestError): - name: typing.Literal["InvalidFilePath"] - parameters: InvalidFilePathParameters - error_instance_id: str - - -class InvalidFilterValueParameters(typing_extensions.TypedDict): - """The provided filter value is invalid.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - field: str - value: typing.Any - expectedType: core_models.FilterType - - -@dataclass -class InvalidFilterValue(errors.BadRequestError): - name: typing.Literal["InvalidFilterValue"] - parameters: InvalidFilterValueParameters - error_instance_id: str - - -class InvalidOrFilterParameters(typing_extensions.TypedDict): - """The provided OR filter should have at least one sub-filter.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class InvalidOrFilter(errors.BadRequestError): - name: typing.Literal["InvalidOrFilter"] - parameters: InvalidOrFilterParameters - error_instance_id: str - - -class InvalidPageSizeParameters(typing_extensions.TypedDict): - """The provided page size was zero or negative. Page sizes must be greater than zero.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - pageSize: core_models.PageSize - """The page size to use for the endpoint.""" - - -@dataclass -class InvalidPageSize(errors.BadRequestError): - name: typing.Literal["InvalidPageSize"] - parameters: InvalidPageSizeParameters - error_instance_id: str - - -class InvalidPageTokenParameters(typing_extensions.TypedDict): - """The provided page token is invalid.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - pageToken: core_models.PageToken - """ - The page token indicates where to start paging. This should be omitted from the first page's request. - To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response - and use it to populate the `pageToken` field of the next request. - """ - - -@dataclass -class InvalidPageToken(errors.BadRequestError): - name: typing.Literal["InvalidPageToken"] - parameters: InvalidPageTokenParameters - error_instance_id: str - - -class InvalidParameterCombinationParameters(typing_extensions.TypedDict): - """The given parameters are individually valid but cannot be used in the given combination.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - validCombinations: typing.List[typing.List[str]] - providedParameters: typing.List[str] - - -@dataclass -class InvalidParameterCombination(errors.BadRequestError): - name: typing.Literal["InvalidParameterCombination"] - parameters: InvalidParameterCombinationParameters - error_instance_id: str - - -class InvalidSchemaParameters(typing_extensions.TypedDict): - """The schema failed validations""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - errorType: str - message: str - - -@dataclass -class InvalidSchema(errors.BadRequestError): - name: typing.Literal["InvalidSchema"] - parameters: InvalidSchemaParameters - error_instance_id: str - - -class InvalidTimeZoneParameters(typing_extensions.TypedDict): - """The time zone is invalid.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - timeZone: core_models.ZoneId - - -@dataclass -class InvalidTimeZone(errors.BadRequestError): - name: typing.Literal["InvalidTimeZone"] - parameters: InvalidTimeZoneParameters - error_instance_id: str - - -class MissingBatchRequestParameters(typing_extensions.TypedDict): - """Batch requests must contain at least one element.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class MissingBatchRequest(errors.BadRequestError): - name: typing.Literal["MissingBatchRequest"] - parameters: MissingBatchRequestParameters - error_instance_id: str - - -class MissingPostBodyParameters(typing_extensions.TypedDict): - """A post body is required for this endpoint, but was not found in the request.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class MissingPostBody(errors.BadRequestError): - name: typing.Literal["MissingPostBody"] - parameters: MissingPostBodyParameters - error_instance_id: str - - -class ResourceNameAlreadyExistsParameters(typing_extensions.TypedDict): - """The provided resource name is already in use by another resource in the same folder.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - parentFolderRid: core_models.FolderRid - resourceName: str - - -@dataclass -class ResourceNameAlreadyExists(errors.ConflictError): - name: typing.Literal["ResourceNameAlreadyExists"] - parameters: ResourceNameAlreadyExistsParameters - error_instance_id: str - - -class SchemaIsNotStreamSchemaParameters(typing_extensions.TypedDict): - """The requested schema could not be converted into a stream schema.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class SchemaIsNotStreamSchema(errors.BadRequestError): - name: typing.Literal["SchemaIsNotStreamSchema"] - parameters: SchemaIsNotStreamSchemaParameters - error_instance_id: str - - -class UnknownDistanceUnitParameters(typing_extensions.TypedDict): - """An unknown distance unit was provided.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - unknownUnit: str - knownUnits: typing.List[core_models.DistanceUnit] - - -@dataclass -class UnknownDistanceUnit(errors.BadRequestError): - name: typing.Literal["UnknownDistanceUnit"] - parameters: UnknownDistanceUnitParameters - error_instance_id: str - - -__all__ = [ - "ApiFeaturePreviewUsageOnly", - "ApiUsageDenied", - "BatchRequestSizeExceededLimit", - "FolderNotFound", - "FoundryBranchNotFound", - "InvalidAndFilter", - "InvalidAttributionHeader", - "InvalidChangeDataCaptureConfiguration", - "InvalidFieldSchema", - "InvalidFilePath", - "InvalidFilterValue", - "InvalidOrFilter", - "InvalidPageSize", - "InvalidPageToken", - "InvalidParameterCombination", - "InvalidSchema", - "InvalidTimeZone", - "MissingBatchRequest", - "MissingPostBody", - "ResourceNameAlreadyExists", - "SchemaIsNotStreamSchema", - "UnknownDistanceUnit", -] diff --git a/foundry_sdk/v2/core/models.py b/foundry_sdk/v2/core/models.py deleted file mode 100644 index a5d3935e1..000000000 --- a/foundry_sdk/v2/core/models.py +++ /dev/null @@ -1,1037 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -from __future__ import annotations - -import typing - -import pydantic -import typing_extensions - -from foundry_sdk import _core as core - - -class AnyType(core.ModelBase): - """AnyType""" - - type: typing.Literal["any"] = "any" - - -class ArrayFieldType(core.ModelBase): - """ArrayFieldType""" - - items_schema: FieldSchema = pydantic.Field(alias=str("itemsSchema")) # type: ignore[literal-required] - type: typing.Literal["array"] = "array" - - -class AttachmentType(core.ModelBase): - """AttachmentType""" - - type: typing.Literal["attachment"] = "attachment" - - -Attribution = str -"""Attribution for a request""" - - -class BinaryType(core.ModelBase): - """BinaryType""" - - type: typing.Literal["binary"] = "binary" - - -class BooleanType(core.ModelBase): - """BooleanType""" - - type: typing.Literal["boolean"] = "boolean" - - -class BranchMetadata(core.ModelBase): - """Metadata about a Foundry branch.""" - - rid: FoundryBranch - - -BuildRid = core.RID -"""The RID of a Build.""" - - -class ByteType(core.ModelBase): - """ByteType""" - - type: typing.Literal["byte"] = "byte" - - -CheckReportRid = core.RID -"""The unique resource identifier (RID) of a Data Health Check Report.""" - - -CheckRid = core.RID -"""The unique resource identifier (RID) of a Data Health Check.""" - - -class CipherTextType(core.ModelBase): - """CipherTextType""" - - default_cipher_channel: typing.Optional[core.RID] = pydantic.Field(alias=str("defaultCipherChannel"), default=None) # type: ignore[literal-required] - """An optional Cipher Channel RID which can be used for encryption updates to empty values.""" - - type: typing.Literal["cipherText"] = "cipherText" - - -ComputeSeconds = float -"""A measurement of compute usage expressed in [compute-seconds](https://palantir.com/docs/foundry/resource-management/usage-types#compute-second). For more information, please refer to the [Usage types](https://palantir.com/docs/foundry/resource-management/usage-types) documentation.""" - - -ContentLength = core.Long -"""ContentLength""" - - -ContentType = str -"""ContentType""" - - -CreatedTime = core.AwareDatetime -"""The time at which the resource was created.""" - - -CustomMetadata = typing.Dict[str, typing.Any] -"""CustomMetadata""" - - -class DatasetFieldSchema(core.ModelBase): - """A field in a Foundry dataset.""" - - type: SchemaFieldType - name: typing.Optional[FieldName] = None - """The name of a column. May be absent in nested schema objects.""" - - nullable: bool - """Indicates whether values of this field may be null.""" - - user_defined_type_class: typing.Optional[str] = pydantic.Field(alias=str("userDefinedTypeClass"), default=None) # type: ignore[literal-required] - """Canonical classname of the user-defined type for this field. This should be a subclass of Spark's `UserDefinedType`.""" - - custom_metadata: typing.Optional[CustomMetadata] = pydantic.Field(alias=str("customMetadata"), default=None) # type: ignore[literal-required] - """User-supplied custom metadata about the column, such as Foundry web archetypes, descriptions, etc.""" - - array_subtype: typing.Optional[DatasetFieldSchema] = pydantic.Field(alias=str("arraySubtype"), default=None) # type: ignore[literal-required] - """Only used when field type is array.""" - - precision: typing.Optional[int] = None - """Only used when field type is decimal.""" - - scale: typing.Optional[int] = None - """Only used when field type is decimal.""" - - map_key_type: typing.Optional[DatasetFieldSchema] = pydantic.Field(alias=str("mapKeyType"), default=None) # type: ignore[literal-required] - """Only used when field type is map.""" - - map_value_type: typing.Optional[DatasetFieldSchema] = pydantic.Field(alias=str("mapValueType"), default=None) # type: ignore[literal-required] - """Only used when field type is map.""" - - sub_schemas: typing.Optional[typing.List[DatasetFieldSchema]] = pydantic.Field(alias=str("subSchemas"), default=None) # type: ignore[literal-required] - """Only used when field type is struct.""" - - -class DatasetSchema(core.ModelBase): - """The schema for a Foundry dataset. Files uploaded to this dataset must match this schema.""" - - field_schema_list: typing.List[DatasetFieldSchema] = pydantic.Field(alias=str("fieldSchemaList")) # type: ignore[literal-required] - - -class DateType(core.ModelBase): - """DateType""" - - type: typing.Literal["date"] = "date" - - -class DecimalType(core.ModelBase): - """DecimalType""" - - precision: typing.Optional[int] = None - """The total number of digits of the Decimal type. The maximum value is 38.""" - - scale: typing.Optional[int] = None - """The number of digits to the right of the decimal point. The maximum value is 38.""" - - type: typing.Literal["decimal"] = "decimal" - - -DisplayName = str -"""The display name of the entity.""" - - -class Distance(core.ModelBase): - """A measurement of distance.""" - - value: float - unit: DistanceUnit - - -DistanceUnit = typing.Literal[ - "MILLIMETERS", - "CENTIMETERS", - "METERS", - "KILOMETERS", - "INCHES", - "FEET", - "YARDS", - "MILES", - "NAUTICAL_MILES", -] -"""DistanceUnit""" - - -class DoubleType(core.ModelBase): - """DoubleType""" - - type: typing.Literal["double"] = "double" - - -class Duration(core.ModelBase): - """A measurement of duration.""" - - value: int - """The duration value.""" - - unit: TimeUnit - """The unit of duration.""" - - -DurationSeconds = core.Long -"""A duration of time measured in seconds.""" - - -EmbeddingModel = typing_extensions.Annotated[ - typing.Union["LmsEmbeddingModel", "FoundryLiveDeployment"], pydantic.Field(discriminator="type") -] -"""EmbeddingModel""" - - -EnrollmentRid = core.RID -"""EnrollmentRid""" - - -class Field(core.ModelBase): - """ - A field in a Foundry schema. For more information on supported data types, see the - [supported field types](https://palantir.com/docs/foundry/data-integration/datasets/#supported-field-types) user documentation. - """ - - name: FieldName - schema_: FieldSchema = pydantic.Field(alias=str("schema")) # type: ignore[literal-required] - - -FieldDataType = typing_extensions.Annotated[ - typing.Union[ - "StructFieldType", - "DateType", - "StringType", - "ByteType", - "DoubleType", - "IntegerType", - "FloatType", - "LongType", - "BooleanType", - "ArrayFieldType", - "BinaryType", - "ShortType", - "DecimalType", - "MapFieldType", - "TimestampType", - ], - pydantic.Field(discriminator="type"), -] -"""FieldDataType""" - - -FieldName = str -"""FieldName""" - - -class FieldSchema(core.ModelBase): - """The specification of the type of a Foundry schema field.""" - - nullable: bool - custom_metadata: typing.Optional[CustomMetadata] = pydantic.Field(alias=str("customMetadata"), default=None) # type: ignore[literal-required] - data_type: FieldDataType = pydantic.Field(alias=str("dataType")) # type: ignore[literal-required] - - -FilePath = str -"""The path to a File within Foundry. Examples: `my-file.txt`, `path/to/my-file.jpg`, `dataframe.snappy.parquet`.""" - - -Filename = str -"""The name of a File within Foundry. Examples: `my-file.txt`, `my-file.jpg`, `dataframe.snappy.parquet`.""" - - -class FilterBinaryType(core.ModelBase): - """FilterBinaryType""" - - type: typing.Literal["binary"] = "binary" - - -class FilterBooleanType(core.ModelBase): - """FilterBooleanType""" - - type: typing.Literal["boolean"] = "boolean" - - -class FilterDateTimeType(core.ModelBase): - """FilterDateTimeType""" - - type: typing.Literal["dateTime"] = "dateTime" - - -class FilterDateType(core.ModelBase): - """FilterDateType""" - - type: typing.Literal["date"] = "date" - - -class FilterDoubleType(core.ModelBase): - """FilterDoubleType""" - - type: typing.Literal["double"] = "double" - - -class FilterEnumType(core.ModelBase): - """FilterEnumType""" - - values: typing.List[str] - """The values allowed by the enum type.""" - - type: typing.Literal["enum"] = "enum" - - -class FilterFloatType(core.ModelBase): - """FilterFloatType""" - - type: typing.Literal["float"] = "float" - - -class FilterIntegerType(core.ModelBase): - """FilterIntegerType""" - - type: typing.Literal["integer"] = "integer" - - -class FilterLongType(core.ModelBase): - """FilterLongType""" - - type: typing.Literal["long"] = "long" - - -class FilterRidType(core.ModelBase): - """FilterRidType""" - - type: typing.Literal["rid"] = "rid" - - -class FilterStringType(core.ModelBase): - """FilterStringType""" - - type: typing.Literal["string"] = "string" - - -FilterType = typing_extensions.Annotated[ - typing.Union[ - "FilterDateTimeType", - "FilterDateType", - "FilterBooleanType", - "FilterStringType", - "FilterDoubleType", - "FilterBinaryType", - "FilterIntegerType", - "FilterFloatType", - "FilterRidType", - "FilterUuidType", - "FilterEnumType", - "FilterLongType", - ], - pydantic.Field(discriminator="type"), -] -"""FilterType""" - - -class FilterUuidType(core.ModelBase): - """FilterUuidType""" - - type: typing.Literal["uuid"] = "uuid" - - -class FloatType(core.ModelBase): - """FloatType""" - - type: typing.Literal["float"] = "float" - - -FolderRid = core.RID -"""FolderRid""" - - -FoundryBranch = str -"""The Foundry branch identifier, specifically its rid. Different identifier types may be used in the future as values.""" - - -class FoundryLiveDeployment(core.ModelBase): - """FoundryLiveDeployment""" - - rid: typing.Optional[core.RID] = None - """The live deployment identifier. This rid is of the format 'ri.foundry-ml-live.main.live-deployment.'.""" - - input_param_name: typing.Optional[str] = pydantic.Field(alias=str("inputParamName"), default=None) # type: ignore[literal-required] - """The name of the input parameter to the model which should contain the query string.""" - - output_param_name: typing.Optional[str] = pydantic.Field(alias=str("outputParamName"), default=None) # type: ignore[literal-required] - """The name of the output parameter to the model which should contain the computed embedding.""" - - type: typing.Literal["foundryLiveDeployment"] = "foundryLiveDeployment" - - -class FullRowChangeDataCaptureConfiguration(core.ModelBase): - """ - Configuration for change data capture which resolves the latest state of the dataset based on new full rows - being pushed to the stream. For example, if a value for a row is updated, it is only sufficient to publish - the entire new state of that row to the stream. - """ - - deletion_field_name: FieldName = pydantic.Field(alias=str("deletionFieldName")) # type: ignore[literal-required] - """The name of a boolean field in the schema that indicates whether or not a row has been deleted.""" - - ordering_field_name: FieldName = pydantic.Field(alias=str("orderingFieldName")) # type: ignore[literal-required] - """ - The name of an ordering field that determines the newest state for a row in the dataset. - - The ordering field can only be of the following types: - - Byte - - Date - - Decimal - - Integer - - Long - - Short - - String - - Timestamp - """ - - type: typing.Literal["fullRow"] = "fullRow" - - -class GeoPointType(core.ModelBase): - """GeoPointType""" - - type: typing.Literal["geopoint"] = "geopoint" - - -class GeoShapeType(core.ModelBase): - """GeoShapeType""" - - type: typing.Literal["geoshape"] = "geoshape" - - -class GeohashType(core.ModelBase): - """GeohashType""" - - type: typing.Literal["geohash"] = "geohash" - - -class GeotimeSeriesReferenceType(core.ModelBase): - """GeotimeSeriesReferenceType""" - - type: typing.Literal["geotimeSeriesReference"] = "geotimeSeriesReference" - - -GroupId = core.UUID -"""A Foundry Group ID.""" - - -GroupName = str -"""The display name of a multipass group.""" - - -GroupRid = core.RID -"""The unique resource identifier (RID) of a multipass group.""" - - -IncludeComputeUsage = bool -""" -Indicates whether the response should include compute usage details for the request. This feature is currently -only available for OSDK applications. -Note: Enabling this flag may slow down query performance and is not recommended for use in production. -""" - - -class IntegerType(core.ModelBase): - """IntegerType""" - - type: typing.Literal["integer"] = "integer" - - -JobRid = core.RID -"""The RID of a Job.""" - - -class LmsEmbeddingModel(core.ModelBase): - """A model provided by Language Model Service.""" - - value: LmsEmbeddingModelValue - type: typing.Literal["lms"] = "lms" - - -LmsEmbeddingModelValue = typing.Literal[ - "OPENAI_TEXT_EMBEDDING_ADA_002", - "TEXT_EMBEDDING_3_LARGE", - "TEXT_EMBEDDING_3_SMALL", - "SNOWFLAKE_ARCTIC_EMBED_M", - "INSTRUCTOR_LARGE", - "BGE_BASE_EN_V1_5", -] -"""LmsEmbeddingModelValue""" - - -class LongType(core.ModelBase): - """LongType""" - - type: typing.Literal["long"] = "long" - - -class MapFieldType(core.ModelBase): - """MapFieldType""" - - key_schema: FieldSchema = pydantic.Field(alias=str("keySchema")) # type: ignore[literal-required] - value_schema: FieldSchema = pydantic.Field(alias=str("valueSchema")) # type: ignore[literal-required] - type: typing.Literal["map"] = "map" - - -MarkingId = str -"""The ID of a security marking.""" - - -class MarkingType(core.ModelBase): - """MarkingType""" - - type: typing.Literal["marking"] = "marking" - - -MediaItemPath = str -""" -A user-specified identifier for a media item within a media set. -Paths must be less than 256 characters long. -If multiple items are written to the same media set at the same path, then when retrieving by path the media -item which was written last is returned. -""" - - -MediaItemReadToken = str -"""A token that grants access to read specific media items.""" - - -MediaItemRid = core.RID -"""The Resource Identifier (RID) of an individual Media Item within a Media Set in Foundry.""" - - -class MediaReference(core.ModelBase): - """The representation of a media reference.""" - - mime_type: MediaType = pydantic.Field(alias=str("mimeType")) # type: ignore[literal-required] - reference: Reference - - -class MediaReferenceType(core.ModelBase): - """MediaReferenceType""" - - type: typing.Literal["mediaReference"] = "mediaReference" - - -MediaSetRid = core.RID -"""The Resource Identifier (RID) of a Media Set in Foundry.""" - - -class MediaSetViewItem(core.ModelBase): - """MediaSetViewItem""" - - media_set_rid: MediaSetRid = pydantic.Field(alias=str("mediaSetRid")) # type: ignore[literal-required] - media_set_view_rid: MediaSetViewRid = pydantic.Field(alias=str("mediaSetViewRid")) # type: ignore[literal-required] - media_item_rid: MediaItemRid = pydantic.Field(alias=str("mediaItemRid")) # type: ignore[literal-required] - token: typing.Optional[MediaItemReadToken] = None - - -class MediaSetViewItemWrapper(core.ModelBase): - """MediaSetViewItemWrapper""" - - media_set_view_item: MediaSetViewItem = pydantic.Field(alias=str("mediaSetViewItem")) # type: ignore[literal-required] - type: typing.Literal["mediaSetViewItem"] = "mediaSetViewItem" - - -MediaSetViewRid = core.RID -"""The Resource Identifier (RID) of a single View of a Media Set. A Media Set View is an independent collection of Media Items.""" - - -MediaType = str -""" -The [media type](https://www.iana.org/assignments/media-types/media-types.xhtml) of the file or attachment. -Examples: `application/json`, `application/pdf`, `application/octet-stream`, `image/jpeg` -""" - - -class NullType(core.ModelBase): - """NullType""" - - type: typing.Literal["null"] = "null" - - -class NumericOrNonNumericType(core.ModelBase): - """ - The time series property can either contain either numeric or non-numeric data. This enables mixed sensor types - where some sensor time series are numeric and others are categorical. A boolean property reference can be used - to determine if the series is numeric or non-numeric. Without this property, the series type can be either - numeric or non-numeric and must be inferred from the result of a time series query. - """ - - is_non_numeric_property_type_id: typing.Optional[str] = pydantic.Field(alias=str("isNonNumericPropertyTypeId"), default=None) # type: ignore[literal-required] - """ - The boolean property type ID specifying whether the series is numeric or non-numeric. If the value is true, - the series is non-numeric. - """ - - type: typing.Literal["numericOrNonNumeric"] = "numericOrNonNumeric" - - -Operation = str -""" -An operation that can be performed on a resource. Operations are used to define the permissions that a Role has. -Operations are typically in the format `service:action`, where `service` is related to the type of resource and `action` is the action being performed. -""" - - -OperationScope = str -"""OperationScope""" - - -OrderByDirection = typing.Literal["ASC", "DESC"] -"""Specifies the ordering direction (can be either `ASC` or `DESC`)""" - - -OrganizationRid = core.RID -"""OrganizationRid""" - - -PageSize = int -"""The page size to use for the endpoint.""" - - -PageToken = str -""" -The page token indicates where to start paging. This should be omitted from the first page's request. -To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response -and use it to populate the `pageToken` field of the next request. -""" - - -PreviewMode = bool -"""Enables the use of preview functionality.""" - - -PrincipalId = core.UUID -"""The ID of a Foundry Group or User.""" - - -PrincipalType = typing.Literal["USER", "GROUP"] -"""PrincipalType""" - - -Realm = str -""" -Identifies which Realm a User or Group is a member of. -The `palantir-internal-realm` is used for Users or Groups that are created in Foundry by administrators and not associated with any SSO provider. -""" - - -ReleaseStatus = typing.Literal["ACTIVE", "ENDORSED", "EXPERIMENTAL", "DEPRECATED"] -"""The release status of the entity.""" - - -class Role(core.ModelBase): - """A set of permissions that can be assigned to a principal for a specific resource type.""" - - id: RoleId - role_set_id: RoleSetId = pydantic.Field(alias=str("roleSetId")) # type: ignore[literal-required] - name: str - description: str - is_default: bool = pydantic.Field(alias=str("isDefault")) # type: ignore[literal-required] - """Default roles are provided by Palantir and cannot be edited or modified by administrators.""" - - type: RoleContext - """The type of resource that is valid for this role.""" - - operations: typing.List[Operation] - """The operations that a principal can perform with this role on the assigned resource.""" - - -class RoleAssignmentUpdate(core.ModelBase): - """RoleAssignmentUpdate""" - - role_id: RoleId = pydantic.Field(alias=str("roleId")) # type: ignore[literal-required] - principal_id: PrincipalId = pydantic.Field(alias=str("principalId")) # type: ignore[literal-required] - - -RoleContext = typing.Literal["ORGANIZATION"] -"""RoleContext""" - - -RoleId = str -""" -The unique ID for a Role. Roles are sets of permissions that grant different levels of access to resources. -The default roles in Foundry are: Owner, Editor, Viewer, and Discoverer. See more about -[roles](https://palantir.com/docs/foundry/security/projects-and-roles#roles) in the user documentation. -""" - - -RoleSetId = str -"""RoleSetId""" - - -ScheduleRid = core.RID -"""The RID of a Schedule.""" - - -SchemaFieldType = typing.Literal[ - "ARRAY", - "BINARY", - "BOOLEAN", - "BYTE", - "DATE", - "DECIMAL", - "DOUBLE", - "FLOAT", - "INTEGER", - "LONG", - "MAP", - "SHORT", - "STRING", - "STRUCT", - "TIMESTAMP", -] -"""The data type of a column in a dataset schema.""" - - -class ShortType(core.ModelBase): - """ShortType""" - - type: typing.Literal["short"] = "short" - - -SizeBytes = core.Long -"""The size of the file or attachment in bytes.""" - - -class StreamSchema(core.ModelBase): - """The schema for a Foundry stream. Records pushed to this stream must match this schema.""" - - fields: typing.List[Field] - key_field_names: typing.Optional[typing.List[FieldName]] = pydantic.Field(alias=str("keyFieldNames"), default=None) # type: ignore[literal-required] - """ - The names of the fields to be used as keys for partitioning records. These key fields are used to group - all records with the same key into the same partition, to guarantee processing order of grouped records. These - keys are not meant to uniquely identify records, and do not by themselves deduplicate records. To deduplicate - records, provide a change data capture configuration for the schema. - - Key fields can only be of the following types: - - Boolean - - Byte - - Date - - Decimal - - Integer - - Long - - Short - - String - - Timestamp - - For additional information on keys for Foundry streams, see the - [streaming keys](https://palantir.com/docs/foundry/building-pipelines/streaming-keys/) user documentation. - """ - - change_data_capture: typing.Optional[ChangeDataCaptureConfiguration] = pydantic.Field(alias=str("changeDataCapture"), default=None) # type: ignore[literal-required] - - -class StringType(core.ModelBase): - """StringType""" - - type: typing.Literal["string"] = "string" - - -StructFieldName = str -"""The name of a field in a `Struct`.""" - - -class StructFieldType(core.ModelBase): - """StructFieldType""" - - sub_fields: typing.List[Field] = pydantic.Field(alias=str("subFields")) # type: ignore[literal-required] - type: typing.Literal["struct"] = "struct" - - -TableRid = core.RID -"""The Resource Identifier (RID) of a Table.""" - - -TimeSeriesItemType = typing_extensions.Annotated[ - typing.Union["StringType", "DoubleType", "NumericOrNonNumericType"], - pydantic.Field(discriminator="type"), -] -"""A union of the types supported by time series properties.""" - - -TimeUnit = typing.Literal[ - "MILLISECONDS", "SECONDS", "MINUTES", "HOURS", "DAYS", "WEEKS", "MONTHS", "YEARS" -] -"""TimeUnit""" - - -class TimeseriesType(core.ModelBase): - """TimeseriesType""" - - item_type: TimeSeriesItemType = pydantic.Field(alias=str("itemType")) # type: ignore[literal-required] - type: typing.Literal["timeseries"] = "timeseries" - - -class TimestampType(core.ModelBase): - """TimestampType""" - - type: typing.Literal["timestamp"] = "timestamp" - - -TotalCount = core.Long -"""The total number of items across all pages.""" - - -TraceParent = str -"""The W3C Trace Context `traceparent` header value used to propagate distributed tracing information for Foundry telemetry. See https://www.w3.org/TR/trace-context/#traceparent-header for more details. Note the 16 byte trace ID encoded in the header must be derived from a time based uuid to be used within Foundry.""" - - -TraceState = str -"""The W3C Trace Context `tracestate` header value, which is used to propagate vendor specific distributed tracing information for Foundry telemetry. See https://www.w3.org/TR/trace-context/#tracestate-header for more details.""" - - -class UnsupportedType(core.ModelBase): - """UnsupportedType""" - - unsupported_type: str = pydantic.Field(alias=str("unsupportedType")) # type: ignore[literal-required] - type: typing.Literal["unsupported"] = "unsupported" - - -UpdatedTime = core.AwareDatetime -"""The time at which the resource was most recently updated.""" - - -UserId = core.UUID -"""A Foundry User ID.""" - - -UserStatus = typing.Literal["ACTIVE", "DELETED"] -"""Present status of user.""" - - -class VectorSimilarityFunction(core.ModelBase): - """ - The vector similarity function to support approximate nearest neighbors search. Will result in an index - specific for the function. - """ - - value: typing.Optional[VectorSimilarityFunctionValue] = None - - -VectorSimilarityFunctionValue = typing.Literal[ - "COSINE_SIMILARITY", "DOT_PRODUCT", "EUCLIDEAN_DISTANCE" -] -"""VectorSimilarityFunctionValue""" - - -class VectorType(core.ModelBase): - """Represents a fixed size vector of floats. These can be used for vector similarity searches.""" - - dimension: int - """The dimension of the vector.""" - - supports_search_with: typing.List[VectorSimilarityFunction] = pydantic.Field(alias=str("supportsSearchWith")) # type: ignore[literal-required] - embedding_model: typing.Optional[EmbeddingModel] = pydantic.Field(alias=str("embeddingModel"), default=None) # type: ignore[literal-required] - type: typing.Literal["vector"] = "vector" - - -VersionId = core.UUID -"""The version identifier of a dataset schema.""" - - -ZoneId = str -"""A string representation of a java.time.ZoneId""" - - -ChangeDataCaptureConfiguration = FullRowChangeDataCaptureConfiguration -""" -Configuration for utilizing the stream as a change data capture (CDC) dataset. To configure CDC on a stream, at -least one key needs to be provided. - -For more information on CDC in -Foundry, see the [Change Data Capture](https://palantir.com/docs/foundry/data-integration/change-data-capture/) user documentation. -""" - - -CreatedBy = PrincipalId -"""The Foundry user who created this resource""" - - -Reference = MediaSetViewItemWrapper -"""A union of the types supported by media reference properties.""" - - -UpdatedBy = UserId -"""The Foundry user who last updated this resource""" - - -core.resolve_forward_references(CustomMetadata, globalns=globals(), localns=locals()) -core.resolve_forward_references(EmbeddingModel, globalns=globals(), localns=locals()) -core.resolve_forward_references(FieldDataType, globalns=globals(), localns=locals()) -core.resolve_forward_references(FilterType, globalns=globals(), localns=locals()) -core.resolve_forward_references(TimeSeriesItemType, globalns=globals(), localns=locals()) - -__all__ = [ - "AnyType", - "ArrayFieldType", - "AttachmentType", - "Attribution", - "BinaryType", - "BooleanType", - "BranchMetadata", - "BuildRid", - "ByteType", - "ChangeDataCaptureConfiguration", - "CheckReportRid", - "CheckRid", - "CipherTextType", - "ComputeSeconds", - "ContentLength", - "ContentType", - "CreatedBy", - "CreatedTime", - "CustomMetadata", - "DatasetFieldSchema", - "DatasetSchema", - "DateType", - "DecimalType", - "DisplayName", - "Distance", - "DistanceUnit", - "DoubleType", - "Duration", - "DurationSeconds", - "EmbeddingModel", - "EnrollmentRid", - "Field", - "FieldDataType", - "FieldName", - "FieldSchema", - "FilePath", - "Filename", - "FilterBinaryType", - "FilterBooleanType", - "FilterDateTimeType", - "FilterDateType", - "FilterDoubleType", - "FilterEnumType", - "FilterFloatType", - "FilterIntegerType", - "FilterLongType", - "FilterRidType", - "FilterStringType", - "FilterType", - "FilterUuidType", - "FloatType", - "FolderRid", - "FoundryBranch", - "FoundryLiveDeployment", - "FullRowChangeDataCaptureConfiguration", - "GeoPointType", - "GeoShapeType", - "GeohashType", - "GeotimeSeriesReferenceType", - "GroupId", - "GroupName", - "GroupRid", - "IncludeComputeUsage", - "IntegerType", - "JobRid", - "LmsEmbeddingModel", - "LmsEmbeddingModelValue", - "LongType", - "MapFieldType", - "MarkingId", - "MarkingType", - "MediaItemPath", - "MediaItemReadToken", - "MediaItemRid", - "MediaReference", - "MediaReferenceType", - "MediaSetRid", - "MediaSetViewItem", - "MediaSetViewItemWrapper", - "MediaSetViewRid", - "MediaType", - "NullType", - "NumericOrNonNumericType", - "Operation", - "OperationScope", - "OrderByDirection", - "OrganizationRid", - "PageSize", - "PageToken", - "PreviewMode", - "PrincipalId", - "PrincipalType", - "Realm", - "Reference", - "ReleaseStatus", - "Role", - "RoleAssignmentUpdate", - "RoleContext", - "RoleId", - "RoleSetId", - "ScheduleRid", - "SchemaFieldType", - "ShortType", - "SizeBytes", - "StreamSchema", - "StringType", - "StructFieldName", - "StructFieldType", - "TableRid", - "TimeSeriesItemType", - "TimeUnit", - "TimeseriesType", - "TimestampType", - "TotalCount", - "TraceParent", - "TraceState", - "UnsupportedType", - "UpdatedBy", - "UpdatedTime", - "UserId", - "UserStatus", - "VectorSimilarityFunction", - "VectorSimilarityFunctionValue", - "VectorType", - "VersionId", - "ZoneId", -] diff --git a/foundry_sdk/v2/data_health/__init__.py b/foundry_sdk/v2/data_health/__init__.py deleted file mode 100644 index 801ceab0d..000000000 --- a/foundry_sdk/v2/data_health/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -from foundry_sdk.v2.data_health._client import AsyncDataHealthClient -from foundry_sdk.v2.data_health._client import DataHealthClient - -__all__ = [ - "DataHealthClient", - "AsyncDataHealthClient", -] diff --git a/foundry_sdk/v2/data_health/_client.py b/foundry_sdk/v2/data_health/_client.py deleted file mode 100644 index c82d01e6f..000000000 --- a/foundry_sdk/v2/data_health/_client.py +++ /dev/null @@ -1,82 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing -from functools import cached_property - -from foundry_sdk import _core as core - - -class DataHealthClient: - """ - The API client for the DataHealth Namespace. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - - @cached_property - def Check(self): - from foundry_sdk.v2.data_health.check import CheckClient - - return CheckClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @cached_property - def CheckReport(self): - from foundry_sdk.v2.data_health.check_report import CheckReportClient - - return CheckReportClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - -class AsyncDataHealthClient: - """ - The Async API client for the DataHealth Namespace. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - from foundry_sdk.v2.data_health.check import AsyncCheckClient - from foundry_sdk.v2.data_health.check_report import AsyncCheckReportClient - - self.Check = AsyncCheckClient(auth=auth, hostname=hostname, config=config) - - self.CheckReport = AsyncCheckReportClient(auth=auth, hostname=hostname, config=config) diff --git a/foundry_sdk/v2/data_health/check.py b/foundry_sdk/v2/data_health/check.py deleted file mode 100644 index 2b711cf58..000000000 --- a/foundry_sdk/v2/data_health/check.py +++ /dev/null @@ -1,591 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing - -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v2.core import models as core_models -from foundry_sdk.v2.data_health import errors as data_health_errors -from foundry_sdk.v2.data_health import models as data_health_models - - -class CheckClient: - """ - The API client for the Check Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _CheckClientStreaming(self) - self.with_raw_response = _CheckClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def create( - self, - *, - config: data_health_models.CheckConfig, - intent: typing.Optional[data_health_models.CheckIntent] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> data_health_models.Check: - """ - Creates a new Check. - :param config: - :type config: CheckConfig - :param intent: - :type intent: Optional[CheckIntent] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: data_health_models.Check - - :raises CheckAlreadyExists: A check of the given type for the given subject(s) already exists. The conflicting check will be returned if the provided token has permission to view it. - :raises CheckTypeNotSupported: The type of the requested check is not yet supported in the Platform API. - :raises CreateCheckPermissionDenied: Could not create the Check. - :raises InvalidNumericColumnCheckConfig: The NumericColumnCheckConfig is invalid. It must contain at least one of numericBounds or trend. - :raises InvalidPercentageCheckConfig: The PercentageCheckConfig is invalid. It must contain at least one of percentageBounds or medianDeviation. - :raises InvalidTimeCheckConfig: The TimeCheckConfig is invalid. It must contain at least one of timeBounds or medianDeviation. - :raises InvalidTrendConfig: The TrendConfig is invalid. It must contain at least one of trendType or differenceBounds. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/dataHealth/checks", - query_params={ - "preview": preview, - }, - path_params={}, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=data_health_models.CreateCheckRequest( - config=config, - intent=intent, - ), - response_type=data_health_models.Check, - request_timeout=request_timeout, - throwable_errors={ - "CheckAlreadyExists": data_health_errors.CheckAlreadyExists, - "CheckTypeNotSupported": data_health_errors.CheckTypeNotSupported, - "CreateCheckPermissionDenied": data_health_errors.CreateCheckPermissionDenied, - "InvalidNumericColumnCheckConfig": data_health_errors.InvalidNumericColumnCheckConfig, - "InvalidPercentageCheckConfig": data_health_errors.InvalidPercentageCheckConfig, - "InvalidTimeCheckConfig": data_health_errors.InvalidTimeCheckConfig, - "InvalidTrendConfig": data_health_errors.InvalidTrendConfig, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def delete( - self, - check_rid: core_models.CheckRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> None: - """ - Delete the Check with the specified rid. - :param check_rid: - :type check_rid: CheckRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: None - - :raises CheckNotFound: The given Check could not be found. - :raises DeleteCheckPermissionDenied: Could not delete the Check. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="DELETE", - resource_path="/v2/dataHealth/checks/{checkRid}", - query_params={ - "preview": preview, - }, - path_params={ - "checkRid": check_rid, - }, - header_params={}, - body=None, - response_type=None, - request_timeout=request_timeout, - throwable_errors={ - "CheckNotFound": data_health_errors.CheckNotFound, - "DeleteCheckPermissionDenied": data_health_errors.DeleteCheckPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - check_rid: core_models.CheckRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> data_health_models.Check: - """ - Get the Check with the specified rid. - :param check_rid: - :type check_rid: CheckRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: data_health_models.Check - - :raises CheckNotFound: The given Check could not be found. - :raises CheckTypeNotSupported: The type of the requested check is not yet supported in the Platform API. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/dataHealth/checks/{checkRid}", - query_params={ - "preview": preview, - }, - path_params={ - "checkRid": check_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=data_health_models.Check, - request_timeout=request_timeout, - throwable_errors={ - "CheckNotFound": data_health_errors.CheckNotFound, - "CheckTypeNotSupported": data_health_errors.CheckTypeNotSupported, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def replace( - self, - check_rid: core_models.CheckRid, - *, - config: data_health_models.ReplaceCheckConfig, - intent: typing.Optional[data_health_models.CheckIntent] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> data_health_models.Check: - """ - Replace the Check with the specified rid. Changing the type of a check after it has been created is not supported. - :param check_rid: - :type check_rid: CheckRid - :param config: - :type config: ReplaceCheckConfig - :param intent: - :type intent: Optional[CheckIntent] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: data_health_models.Check - - :raises CheckNotFound: The given Check could not be found. - :raises CheckTypeNotSupported: The type of the requested check is not yet supported in the Platform API. - :raises InvalidNumericColumnCheckConfig: The NumericColumnCheckConfig is invalid. It must contain at least one of numericBounds or trend. - :raises InvalidPercentageCheckConfig: The PercentageCheckConfig is invalid. It must contain at least one of percentageBounds or medianDeviation. - :raises InvalidTimeCheckConfig: The TimeCheckConfig is invalid. It must contain at least one of timeBounds or medianDeviation. - :raises InvalidTrendConfig: The TrendConfig is invalid. It must contain at least one of trendType or differenceBounds. - :raises ModifyingCheckTypeNotSupported: Changing the type of a check after it has been created is not supported. - :raises ReplaceCheckPermissionDenied: Could not replace the Check. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="PUT", - resource_path="/v2/dataHealth/checks/{checkRid}", - query_params={ - "preview": preview, - }, - path_params={ - "checkRid": check_rid, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=data_health_models.ReplaceCheckRequest( - config=config, - intent=intent, - ), - response_type=data_health_models.Check, - request_timeout=request_timeout, - throwable_errors={ - "CheckNotFound": data_health_errors.CheckNotFound, - "CheckTypeNotSupported": data_health_errors.CheckTypeNotSupported, - "InvalidNumericColumnCheckConfig": data_health_errors.InvalidNumericColumnCheckConfig, - "InvalidPercentageCheckConfig": data_health_errors.InvalidPercentageCheckConfig, - "InvalidTimeCheckConfig": data_health_errors.InvalidTimeCheckConfig, - "InvalidTrendConfig": data_health_errors.InvalidTrendConfig, - "ModifyingCheckTypeNotSupported": data_health_errors.ModifyingCheckTypeNotSupported, - "ReplaceCheckPermissionDenied": data_health_errors.ReplaceCheckPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _CheckClientRaw: - def __init__(self, client: CheckClient) -> None: - def create(_: data_health_models.Check): ... - def delete(_: None): ... - def get(_: data_health_models.Check): ... - def replace(_: data_health_models.Check): ... - - self.create = core.with_raw_response(create, client.create) - self.delete = core.with_raw_response(delete, client.delete) - self.get = core.with_raw_response(get, client.get) - self.replace = core.with_raw_response(replace, client.replace) - - -class _CheckClientStreaming: - def __init__(self, client: CheckClient) -> None: - def create(_: data_health_models.Check): ... - def get(_: data_health_models.Check): ... - def replace(_: data_health_models.Check): ... - - self.create = core.with_streaming_response(create, client.create) - self.get = core.with_streaming_response(get, client.get) - self.replace = core.with_streaming_response(replace, client.replace) - - -class AsyncCheckClient: - """ - The API client for the Check Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AsyncCheckClientStreaming(self) - self.with_raw_response = _AsyncCheckClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def create( - self, - *, - config: data_health_models.CheckConfig, - intent: typing.Optional[data_health_models.CheckIntent] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[data_health_models.Check]: - """ - Creates a new Check. - :param config: - :type config: CheckConfig - :param intent: - :type intent: Optional[CheckIntent] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[data_health_models.Check] - - :raises CheckAlreadyExists: A check of the given type for the given subject(s) already exists. The conflicting check will be returned if the provided token has permission to view it. - :raises CheckTypeNotSupported: The type of the requested check is not yet supported in the Platform API. - :raises CreateCheckPermissionDenied: Could not create the Check. - :raises InvalidNumericColumnCheckConfig: The NumericColumnCheckConfig is invalid. It must contain at least one of numericBounds or trend. - :raises InvalidPercentageCheckConfig: The PercentageCheckConfig is invalid. It must contain at least one of percentageBounds or medianDeviation. - :raises InvalidTimeCheckConfig: The TimeCheckConfig is invalid. It must contain at least one of timeBounds or medianDeviation. - :raises InvalidTrendConfig: The TrendConfig is invalid. It must contain at least one of trendType or differenceBounds. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/dataHealth/checks", - query_params={ - "preview": preview, - }, - path_params={}, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=data_health_models.CreateCheckRequest( - config=config, - intent=intent, - ), - response_type=data_health_models.Check, - request_timeout=request_timeout, - throwable_errors={ - "CheckAlreadyExists": data_health_errors.CheckAlreadyExists, - "CheckTypeNotSupported": data_health_errors.CheckTypeNotSupported, - "CreateCheckPermissionDenied": data_health_errors.CreateCheckPermissionDenied, - "InvalidNumericColumnCheckConfig": data_health_errors.InvalidNumericColumnCheckConfig, - "InvalidPercentageCheckConfig": data_health_errors.InvalidPercentageCheckConfig, - "InvalidTimeCheckConfig": data_health_errors.InvalidTimeCheckConfig, - "InvalidTrendConfig": data_health_errors.InvalidTrendConfig, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def delete( - self, - check_rid: core_models.CheckRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[None]: - """ - Delete the Check with the specified rid. - :param check_rid: - :type check_rid: CheckRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[None] - - :raises CheckNotFound: The given Check could not be found. - :raises DeleteCheckPermissionDenied: Could not delete the Check. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="DELETE", - resource_path="/v2/dataHealth/checks/{checkRid}", - query_params={ - "preview": preview, - }, - path_params={ - "checkRid": check_rid, - }, - header_params={}, - body=None, - response_type=None, - request_timeout=request_timeout, - throwable_errors={ - "CheckNotFound": data_health_errors.CheckNotFound, - "DeleteCheckPermissionDenied": data_health_errors.DeleteCheckPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - check_rid: core_models.CheckRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[data_health_models.Check]: - """ - Get the Check with the specified rid. - :param check_rid: - :type check_rid: CheckRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[data_health_models.Check] - - :raises CheckNotFound: The given Check could not be found. - :raises CheckTypeNotSupported: The type of the requested check is not yet supported in the Platform API. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/dataHealth/checks/{checkRid}", - query_params={ - "preview": preview, - }, - path_params={ - "checkRid": check_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=data_health_models.Check, - request_timeout=request_timeout, - throwable_errors={ - "CheckNotFound": data_health_errors.CheckNotFound, - "CheckTypeNotSupported": data_health_errors.CheckTypeNotSupported, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def replace( - self, - check_rid: core_models.CheckRid, - *, - config: data_health_models.ReplaceCheckConfig, - intent: typing.Optional[data_health_models.CheckIntent] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[data_health_models.Check]: - """ - Replace the Check with the specified rid. Changing the type of a check after it has been created is not supported. - :param check_rid: - :type check_rid: CheckRid - :param config: - :type config: ReplaceCheckConfig - :param intent: - :type intent: Optional[CheckIntent] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[data_health_models.Check] - - :raises CheckNotFound: The given Check could not be found. - :raises CheckTypeNotSupported: The type of the requested check is not yet supported in the Platform API. - :raises InvalidNumericColumnCheckConfig: The NumericColumnCheckConfig is invalid. It must contain at least one of numericBounds or trend. - :raises InvalidPercentageCheckConfig: The PercentageCheckConfig is invalid. It must contain at least one of percentageBounds or medianDeviation. - :raises InvalidTimeCheckConfig: The TimeCheckConfig is invalid. It must contain at least one of timeBounds or medianDeviation. - :raises InvalidTrendConfig: The TrendConfig is invalid. It must contain at least one of trendType or differenceBounds. - :raises ModifyingCheckTypeNotSupported: Changing the type of a check after it has been created is not supported. - :raises ReplaceCheckPermissionDenied: Could not replace the Check. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="PUT", - resource_path="/v2/dataHealth/checks/{checkRid}", - query_params={ - "preview": preview, - }, - path_params={ - "checkRid": check_rid, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=data_health_models.ReplaceCheckRequest( - config=config, - intent=intent, - ), - response_type=data_health_models.Check, - request_timeout=request_timeout, - throwable_errors={ - "CheckNotFound": data_health_errors.CheckNotFound, - "CheckTypeNotSupported": data_health_errors.CheckTypeNotSupported, - "InvalidNumericColumnCheckConfig": data_health_errors.InvalidNumericColumnCheckConfig, - "InvalidPercentageCheckConfig": data_health_errors.InvalidPercentageCheckConfig, - "InvalidTimeCheckConfig": data_health_errors.InvalidTimeCheckConfig, - "InvalidTrendConfig": data_health_errors.InvalidTrendConfig, - "ModifyingCheckTypeNotSupported": data_health_errors.ModifyingCheckTypeNotSupported, - "ReplaceCheckPermissionDenied": data_health_errors.ReplaceCheckPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _AsyncCheckClientRaw: - def __init__(self, client: AsyncCheckClient) -> None: - def create(_: data_health_models.Check): ... - def delete(_: None): ... - def get(_: data_health_models.Check): ... - def replace(_: data_health_models.Check): ... - - self.create = core.async_with_raw_response(create, client.create) - self.delete = core.async_with_raw_response(delete, client.delete) - self.get = core.async_with_raw_response(get, client.get) - self.replace = core.async_with_raw_response(replace, client.replace) - - -class _AsyncCheckClientStreaming: - def __init__(self, client: AsyncCheckClient) -> None: - def create(_: data_health_models.Check): ... - def get(_: data_health_models.Check): ... - def replace(_: data_health_models.Check): ... - - self.create = core.async_with_streaming_response(create, client.create) - self.get = core.async_with_streaming_response(get, client.get) - self.replace = core.async_with_streaming_response(replace, client.replace) diff --git a/foundry_sdk/v2/data_health/check_report.py b/foundry_sdk/v2/data_health/check_report.py deleted file mode 100644 index f3afd7f16..000000000 --- a/foundry_sdk/v2/data_health/check_report.py +++ /dev/null @@ -1,201 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing - -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v2.core import models as core_models -from foundry_sdk.v2.data_health import errors as data_health_errors -from foundry_sdk.v2.data_health import models as data_health_models - - -class CheckReportClient: - """ - The API client for the CheckReport Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _CheckReportClientStreaming(self) - self.with_raw_response = _CheckReportClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - check_report_rid: core_models.CheckReportRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> data_health_models.CheckReport: - """ - Get the CheckReport with the specified rid. - :param check_report_rid: - :type check_report_rid: CheckReportRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: data_health_models.CheckReport - - :raises CheckReportNotFound: The given CheckReport could not be found. - :raises CheckTypeNotSupported: The type of the requested check is not yet supported in the Platform API. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/dataHealth/checkReports/{checkReportRid}", - query_params={ - "preview": preview, - }, - path_params={ - "checkReportRid": check_report_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=data_health_models.CheckReport, - request_timeout=request_timeout, - throwable_errors={ - "CheckReportNotFound": data_health_errors.CheckReportNotFound, - "CheckTypeNotSupported": data_health_errors.CheckTypeNotSupported, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _CheckReportClientRaw: - def __init__(self, client: CheckReportClient) -> None: - def get(_: data_health_models.CheckReport): ... - - self.get = core.with_raw_response(get, client.get) - - -class _CheckReportClientStreaming: - def __init__(self, client: CheckReportClient) -> None: - def get(_: data_health_models.CheckReport): ... - - self.get = core.with_streaming_response(get, client.get) - - -class AsyncCheckReportClient: - """ - The API client for the CheckReport Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AsyncCheckReportClientStreaming(self) - self.with_raw_response = _AsyncCheckReportClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - check_report_rid: core_models.CheckReportRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[data_health_models.CheckReport]: - """ - Get the CheckReport with the specified rid. - :param check_report_rid: - :type check_report_rid: CheckReportRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[data_health_models.CheckReport] - - :raises CheckReportNotFound: The given CheckReport could not be found. - :raises CheckTypeNotSupported: The type of the requested check is not yet supported in the Platform API. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/dataHealth/checkReports/{checkReportRid}", - query_params={ - "preview": preview, - }, - path_params={ - "checkReportRid": check_report_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=data_health_models.CheckReport, - request_timeout=request_timeout, - throwable_errors={ - "CheckReportNotFound": data_health_errors.CheckReportNotFound, - "CheckTypeNotSupported": data_health_errors.CheckTypeNotSupported, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _AsyncCheckReportClientRaw: - def __init__(self, client: AsyncCheckReportClient) -> None: - def get(_: data_health_models.CheckReport): ... - - self.get = core.async_with_raw_response(get, client.get) - - -class _AsyncCheckReportClientStreaming: - def __init__(self, client: AsyncCheckReportClient) -> None: - def get(_: data_health_models.CheckReport): ... - - self.get = core.async_with_streaming_response(get, client.get) diff --git a/foundry_sdk/v2/data_health/errors.py b/foundry_sdk/v2/data_health/errors.py deleted file mode 100644 index 5b89e36fb..000000000 --- a/foundry_sdk/v2/data_health/errors.py +++ /dev/null @@ -1,253 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing -from dataclasses import dataclass - -import typing_extensions - -from foundry_sdk import _errors as errors -from foundry_sdk.v2.core import models as core_models -from foundry_sdk.v2.data_health import models as data_health_models - - -class CheckAlreadyExistsParameters(typing_extensions.TypedDict): - """ - A check of the given type for the given subject(s) already exists. The conflicting check will be returned - if the provided token has permission to view it. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - conflictingCheck: typing_extensions.NotRequired[data_health_models.Check] - - -@dataclass -class CheckAlreadyExists(errors.ConflictError): - name: typing.Literal["CheckAlreadyExists"] - parameters: CheckAlreadyExistsParameters - error_instance_id: str - - -class CheckNotFoundParameters(typing_extensions.TypedDict): - """The given Check could not be found.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - checkRid: core_models.CheckRid - - -@dataclass -class CheckNotFound(errors.NotFoundError): - name: typing.Literal["CheckNotFound"] - parameters: CheckNotFoundParameters - error_instance_id: str - - -class CheckReportNotFoundParameters(typing_extensions.TypedDict): - """The given CheckReport could not be found.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - checkReportRid: core_models.CheckReportRid - - -@dataclass -class CheckReportNotFound(errors.NotFoundError): - name: typing.Literal["CheckReportNotFound"] - parameters: CheckReportNotFoundParameters - error_instance_id: str - - -class CheckTypeNotSupportedParameters(typing_extensions.TypedDict): - """The type of the requested check is not yet supported in the Platform API.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - checkType: str - - -@dataclass -class CheckTypeNotSupported(errors.BadRequestError): - name: typing.Literal["CheckTypeNotSupported"] - parameters: CheckTypeNotSupportedParameters - error_instance_id: str - - -class CreateCheckPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not create the Check.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class CreateCheckPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["CreateCheckPermissionDenied"] - parameters: CreateCheckPermissionDeniedParameters - error_instance_id: str - - -class DeleteCheckPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not delete the Check.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - checkRid: core_models.CheckRid - - -@dataclass -class DeleteCheckPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["DeleteCheckPermissionDenied"] - parameters: DeleteCheckPermissionDeniedParameters - error_instance_id: str - - -class InvalidNumericColumnCheckConfigParameters(typing_extensions.TypedDict): - """The NumericColumnCheckConfig is invalid. It must contain at least one of numericBounds or trend.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class InvalidNumericColumnCheckConfig(errors.BadRequestError): - name: typing.Literal["InvalidNumericColumnCheckConfig"] - parameters: InvalidNumericColumnCheckConfigParameters - error_instance_id: str - - -class InvalidPercentageCheckConfigParameters(typing_extensions.TypedDict): - """The PercentageCheckConfig is invalid. It must contain at least one of percentageBounds or medianDeviation.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class InvalidPercentageCheckConfig(errors.BadRequestError): - name: typing.Literal["InvalidPercentageCheckConfig"] - parameters: InvalidPercentageCheckConfigParameters - error_instance_id: str - - -class InvalidTimeCheckConfigParameters(typing_extensions.TypedDict): - """The TimeCheckConfig is invalid. It must contain at least one of timeBounds or medianDeviation.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class InvalidTimeCheckConfig(errors.BadRequestError): - name: typing.Literal["InvalidTimeCheckConfig"] - parameters: InvalidTimeCheckConfigParameters - error_instance_id: str - - -class InvalidTrendConfigParameters(typing_extensions.TypedDict): - """The TrendConfig is invalid. It must contain at least one of trendType or differenceBounds.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class InvalidTrendConfig(errors.BadRequestError): - name: typing.Literal["InvalidTrendConfig"] - parameters: InvalidTrendConfigParameters - error_instance_id: str - - -class ModifyingCheckTypeNotSupportedParameters(typing_extensions.TypedDict): - """Changing the type of a check after it has been created is not supported.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - originalCheckType: str - newCheckType: str - - -@dataclass -class ModifyingCheckTypeNotSupported(errors.BadRequestError): - name: typing.Literal["ModifyingCheckTypeNotSupported"] - parameters: ModifyingCheckTypeNotSupportedParameters - error_instance_id: str - - -class PercentageValueAboveMaximumParameters(typing_extensions.TypedDict): - """PercentageValue must be less than or equal to 100.0""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - value: float - """The value that was provided.""" - - maxInclusive: float - """The maximum value allowed.""" - - -@dataclass -class PercentageValueAboveMaximum(errors.BadRequestError): - name: typing.Literal["PercentageValueAboveMaximum"] - parameters: PercentageValueAboveMaximumParameters - error_instance_id: str - - -class PercentageValueBelowMinimumParameters(typing_extensions.TypedDict): - """PercentageValue must be greater than or equal to 0.0""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - value: float - """The value that was provided.""" - - minInclusive: float - """The minimum value allowed.""" - - -@dataclass -class PercentageValueBelowMinimum(errors.BadRequestError): - name: typing.Literal["PercentageValueBelowMinimum"] - parameters: PercentageValueBelowMinimumParameters - error_instance_id: str - - -class ReplaceCheckPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not replace the Check.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - checkRid: core_models.CheckRid - - -@dataclass -class ReplaceCheckPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["ReplaceCheckPermissionDenied"] - parameters: ReplaceCheckPermissionDeniedParameters - error_instance_id: str - - -__all__ = [ - "CheckAlreadyExists", - "CheckNotFound", - "CheckReportNotFound", - "CheckTypeNotSupported", - "CreateCheckPermissionDenied", - "DeleteCheckPermissionDenied", - "InvalidNumericColumnCheckConfig", - "InvalidPercentageCheckConfig", - "InvalidTimeCheckConfig", - "InvalidTrendConfig", - "ModifyingCheckTypeNotSupported", - "PercentageValueAboveMaximum", - "PercentageValueBelowMinimum", - "ReplaceCheckPermissionDenied", -] diff --git a/foundry_sdk/v2/data_health/models.py b/foundry_sdk/v2/data_health/models.py deleted file mode 100644 index de99b334a..000000000 --- a/foundry_sdk/v2/data_health/models.py +++ /dev/null @@ -1,732 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -from __future__ import annotations - -import typing - -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk.v2.core import models as core_models -from foundry_sdk.v2.datasets import models as datasets_models - - -class AllowedColumnValuesCheckConfig(core.ModelBase): - """Checks that values in a column are within an allowed set of values.""" - - subject: DatasetSubject - column_name: ColumnName = pydantic.Field(alias=str("columnName")) # type: ignore[literal-required] - allowed_values: typing.List[ColumnValue] = pydantic.Field(alias=str("allowedValues")) # type: ignore[literal-required] - allow_null: typing.Optional[bool] = pydantic.Field(alias=str("allowNull"), default=None) # type: ignore[literal-required] - severity: SeverityLevel - type: typing.Literal["allowedColumnValues"] = "allowedColumnValues" - - -class ApproximateUniquePercentageCheckConfig(core.ModelBase): - """Checks the approximate percentage of unique values in a specific column.""" - - subject: DatasetSubject - percentage_check_config: PercentageCheckConfig = pydantic.Field(alias=str("percentageCheckConfig")) # type: ignore[literal-required] - type: typing.Literal["approximateUniquePercentage"] = "approximateUniquePercentage" - - -class BooleanColumnValue(core.ModelBase): - """A boolean column value.""" - - value: bool - type: typing.Literal["boolean"] = "boolean" - - -class BuildDurationCheckConfig(core.ModelBase): - """Checks the total time a build takes to complete.""" - - subject: DatasetSubject - time_check_config: TimeCheckConfig = pydantic.Field(alias=str("timeCheckConfig")) # type: ignore[literal-required] - type: typing.Literal["buildDuration"] = "buildDuration" - - -class BuildStatusCheckConfig(core.ModelBase): - """Checks the status of the most recent build of the dataset.""" - - subject: DatasetSubject - status_check_config: StatusCheckConfig = pydantic.Field(alias=str("statusCheckConfig")) # type: ignore[literal-required] - type: typing.Literal["buildStatus"] = "buildStatus" - - -class Check(core.ModelBase): - """Check""" - - rid: core_models.CheckRid - groups: typing.List[CheckGroupRid] - config: CheckConfig - intent: typing.Optional[CheckIntent] = None - created_by: typing.Optional[core_models.CreatedBy] = pydantic.Field(alias=str("createdBy"), default=None) # type: ignore[literal-required] - """The user that created the Check.""" - - updated_time: typing.Optional[core_models.UpdatedTime] = pydantic.Field(alias=str("updatedTime"), default=None) # type: ignore[literal-required] - """The timestamp when the Check was last updated.""" - - -CheckConfig = typing_extensions.Annotated[ - typing.Union[ - "NumericColumnRangeCheckConfig", - "JobStatusCheckConfig", - "NumericColumnMeanCheckConfig", - "DateColumnRangeCheckConfig", - "JobDurationCheckConfig", - "ApproximateUniquePercentageCheckConfig", - "BuildStatusCheckConfig", - "ColumnTypeCheckConfig", - "AllowedColumnValuesCheckConfig", - "NullPercentageCheckConfig", - "TotalColumnCountCheckConfig", - "NumericColumnMedianCheckConfig", - "BuildDurationCheckConfig", - "SchemaComparisonCheckConfig", - "PrimaryKeyCheckConfig", - ], - pydantic.Field(discriminator="type"), -] -"""Configuration of a check.""" - - -CheckGroupRid = core.RID -"""The unique resource identifier (RID) of a CheckGroup.""" - - -CheckIntent = str -"""A note about why the Check was set up.""" - - -class CheckReport(core.ModelBase): - """CheckReport""" - - rid: core_models.CheckReportRid - check: Check - """Snapshot of the check configuration when this report was created. This will not change if the check is later modified.""" - - result: CheckResult - created_time: core_models.CreatedTime = pydantic.Field(alias=str("createdTime")) # type: ignore[literal-required] - - -class CheckResult(core.ModelBase): - """The result of running a check.""" - - status: CheckResultStatus - message: typing.Optional[str] = None - """Further details about the result of the check.""" - - -CheckResultStatus = typing.Literal[ - "PASSED", "FAILED", "WARNING", "ERROR", "NOT_APPLICABLE", "NOT_COMPUTABLE" -] -"""The status of a check report execution.""" - - -class ColumnCountConfig(core.ModelBase): - """Configuration for column count validation with severity settings.""" - - expected_value: core.Long = pydantic.Field(alias=str("expectedValue")) # type: ignore[literal-required] - severity: SeverityLevel - - -class ColumnInfo(core.ModelBase): - """Information about a column including its name and type.""" - - name: ColumnName - column_type: typing.Optional[core_models.SchemaFieldType] = pydantic.Field(alias=str("columnType"), default=None) # type: ignore[literal-required] - - -ColumnName = str -"""ColumnName""" - - -class ColumnTypeCheckConfig(core.ModelBase): - """Checks the existence and optionally the type of a specific column.""" - - subject: DatasetSubject - column_type_config: ColumnTypeConfig = pydantic.Field(alias=str("columnTypeConfig")) # type: ignore[literal-required] - type: typing.Literal["columnType"] = "columnType" - - -class ColumnTypeConfig(core.ModelBase): - """Configuration for column type validation with severity settings.""" - - column_name: ColumnName = pydantic.Field(alias=str("columnName")) # type: ignore[literal-required] - expected_type: typing.Optional[core_models.SchemaFieldType] = pydantic.Field(alias=str("expectedType"), default=None) # type: ignore[literal-required] - severity: SeverityLevel - - -ColumnValue = typing_extensions.Annotated[ - typing.Union[ - "DateColumnValue", "BooleanColumnValue", "StringColumnValue", "NumericColumnValue" - ], - pydantic.Field(discriminator="type"), -] -"""A column value that can be of different types.""" - - -class CreateCheckRequest(core.ModelBase): - """CreateCheckRequest""" - - config: CheckConfig - intent: typing.Optional[CheckIntent] = None - - -class DatasetSubject(core.ModelBase): - """A dataset resource type.""" - - dataset_rid: datasets_models.DatasetRid = pydantic.Field(alias=str("datasetRid")) # type: ignore[literal-required] - branch_id: datasets_models.BranchName = pydantic.Field(alias=str("branchId")) # type: ignore[literal-required] - - -class DateBounds(core.ModelBase): - """The range of date values a check is expected to be within.""" - - lower_bound: typing.Optional[core.AwareDatetime] = pydantic.Field(alias=str("lowerBound"), default=None) # type: ignore[literal-required] - upper_bound: typing.Optional[core.AwareDatetime] = pydantic.Field(alias=str("upperBound"), default=None) # type: ignore[literal-required] - - -class DateBoundsConfig(core.ModelBase): - """Configuration for date bounds check with severity settings.""" - - date_bounds: DateBounds = pydantic.Field(alias=str("dateBounds")) # type: ignore[literal-required] - severity: SeverityLevel - - -class DateColumnRangeCheckConfig(core.ModelBase): - """Checks that values in a date column fall within a specified range.""" - - subject: DatasetSubject - column_name: ColumnName = pydantic.Field(alias=str("columnName")) # type: ignore[literal-required] - date_bounds_config: DateBoundsConfig = pydantic.Field(alias=str("dateBoundsConfig")) # type: ignore[literal-required] - type: typing.Literal["dateColumnRange"] = "dateColumnRange" - - -class DateColumnValue(core.ModelBase): - """A date column value.""" - - value: core.AwareDatetime - type: typing.Literal["date"] = "date" - - -class EscalationConfig(core.ModelBase): - """The configuration for when the severity of the failing health check should be escalated to CRITICAL – after a given number of failures, possibly within a time interval.""" - - failures_to_critical: int = pydantic.Field(alias=str("failuresToCritical")) # type: ignore[literal-required] - time_interval_in_seconds: typing.Optional[core.Long] = pydantic.Field(alias=str("timeIntervalInSeconds"), default=None) # type: ignore[literal-required] - - -class JobDurationCheckConfig(core.ModelBase): - """Checks the total time a job takes to complete.""" - - subject: DatasetSubject - time_check_config: TimeCheckConfig = pydantic.Field(alias=str("timeCheckConfig")) # type: ignore[literal-required] - type: typing.Literal["jobDuration"] = "jobDuration" - - -class JobStatusCheckConfig(core.ModelBase): - """Checks the status of the most recent job run on the dataset.""" - - subject: DatasetSubject - status_check_config: StatusCheckConfig = pydantic.Field(alias=str("statusCheckConfig")) # type: ignore[literal-required] - type: typing.Literal["jobStatus"] = "jobStatus" - - -class MedianDeviation(core.ModelBase): - """The number of thresholds the build's duration differs from the median.""" - - bounds_type: typing.Optional[MedianDeviationBoundsType] = pydantic.Field(alias=str("boundsType"), default=None) # type: ignore[literal-required] - data_points: int = pydantic.Field(alias=str("dataPoints")) # type: ignore[literal-required] - deviation_threshold: float = pydantic.Field(alias=str("deviationThreshold")) # type: ignore[literal-required] - - -MedianDeviationBoundsType = typing.Literal["LOWER_BOUND", "UPPER_BOUND", "TWO_TAILED"] -"""The three types of median deviations a bounds type can have: - LOWER_BOUND – Tests for significant deviations below the median value, - UPPER_BOUND – Tests for significant deviations above the median value, - TWO_TAILED – Tests for significant deviations in either direction from the median value.""" - - -class MedianDeviationConfig(core.ModelBase): - """Configuration for median deviation check with severity settings.""" - - median_deviation: MedianDeviation = pydantic.Field(alias=str("medianDeviation")) # type: ignore[literal-required] - severity: SeverityLevel - - -class NullPercentageCheckConfig(core.ModelBase): - """Checks the percentage of null values in a specific column.""" - - subject: DatasetSubject - percentage_check_config: PercentageCheckConfig = pydantic.Field(alias=str("percentageCheckConfig")) # type: ignore[literal-required] - type: typing.Literal["nullPercentage"] = "nullPercentage" - - -class NumericBounds(core.ModelBase): - """The range of numeric values a check is expected to be within.""" - - lower_bound: typing.Optional[float] = pydantic.Field(alias=str("lowerBound"), default=None) # type: ignore[literal-required] - upper_bound: typing.Optional[float] = pydantic.Field(alias=str("upperBound"), default=None) # type: ignore[literal-required] - - -class NumericBoundsConfig(core.ModelBase): - """Configuration for numeric bounds check with severity settings.""" - - numeric_bounds: NumericBounds = pydantic.Field(alias=str("numericBounds")) # type: ignore[literal-required] - severity: SeverityLevel - - -class NumericColumnCheckConfig(core.ModelBase): - """Configuration for numeric column-based checks (such as mean or median). At least one of numericBounds or trend must be specified. Both may be provided to validate both the absolute value range and the trend behavior over time.""" - - column_name: ColumnName = pydantic.Field(alias=str("columnName")) # type: ignore[literal-required] - numeric_bounds: typing.Optional[NumericBoundsConfig] = pydantic.Field(alias=str("numericBounds"), default=None) # type: ignore[literal-required] - trend: typing.Optional[TrendConfig] = None - - -class NumericColumnMeanCheckConfig(core.ModelBase): - """Checks the mean value of a numeric column.""" - - subject: DatasetSubject - numeric_column_check_config: NumericColumnCheckConfig = pydantic.Field(alias=str("numericColumnCheckConfig")) # type: ignore[literal-required] - type: typing.Literal["numericColumnMean"] = "numericColumnMean" - - -class NumericColumnMedianCheckConfig(core.ModelBase): - """Checks the median value of a numeric column.""" - - subject: DatasetSubject - numeric_column_check_config: NumericColumnCheckConfig = pydantic.Field(alias=str("numericColumnCheckConfig")) # type: ignore[literal-required] - type: typing.Literal["numericColumnMedian"] = "numericColumnMedian" - - -class NumericColumnRangeCheckConfig(core.ModelBase): - """Checks that values in a numeric column fall within a specified range.""" - - subject: DatasetSubject - column_name: ColumnName = pydantic.Field(alias=str("columnName")) # type: ignore[literal-required] - numeric_bounds_config: NumericBoundsConfig = pydantic.Field(alias=str("numericBoundsConfig")) # type: ignore[literal-required] - type: typing.Literal["numericColumnRange"] = "numericColumnRange" - - -class NumericColumnValue(core.ModelBase): - """A numeric column value.""" - - value: float - type: typing.Literal["numeric"] = "numeric" - - -class PercentageBounds(core.ModelBase): - """The configuration for the range of percentage values between which the health check is expected to succeed.""" - - lower_bound_percentage: typing.Optional[PercentageValue] = pydantic.Field(alias=str("lowerBoundPercentage"), default=None) # type: ignore[literal-required] - upper_bound_percentage: typing.Optional[PercentageValue] = pydantic.Field(alias=str("upperBoundPercentage"), default=None) # type: ignore[literal-required] - - -class PercentageBoundsConfig(core.ModelBase): - """Configuration for percentage bounds check with severity settings.""" - - percentage_bounds: PercentageBounds = pydantic.Field(alias=str("percentageBounds")) # type: ignore[literal-required] - severity: SeverityLevel - - -class PercentageCheckConfig(core.ModelBase): - """Configuration for percentage-based checks (such as null percentage).""" - - column_name: ColumnName = pydantic.Field(alias=str("columnName")) # type: ignore[literal-required] - percentage_bounds: typing.Optional[PercentageBoundsConfig] = pydantic.Field(alias=str("percentageBounds"), default=None) # type: ignore[literal-required] - median_deviation: typing.Optional[MedianDeviationConfig] = pydantic.Field(alias=str("medianDeviation"), default=None) # type: ignore[literal-required] - - -PercentageValue = float -""" -A percentage value in the range 0.0 to 100.0. - -Validation rules: - * must be greater than or equal to 0.0 - * must be less than or equal to 100.0 -""" - - -class PrimaryKeyCheckConfig(core.ModelBase): - """Checks the uniqueness and non-null values of one or more columns (primary key constraint).""" - - subject: DatasetSubject - primary_key_config: PrimaryKeyConfig = pydantic.Field(alias=str("primaryKeyConfig")) # type: ignore[literal-required] - type: typing.Literal["primaryKey"] = "primaryKey" - - -class PrimaryKeyConfig(core.ModelBase): - """Configuration for primary key validation with severity settings.""" - - column_names: typing.List[ColumnName] = pydantic.Field(alias=str("columnNames")) # type: ignore[literal-required] - severity: SeverityLevel - - -class ReplaceAllowedColumnValuesCheckConfig(core.ModelBase): - """ReplaceAllowedColumnValuesCheckConfig""" - - allowed_values: typing.List[ColumnValue] = pydantic.Field(alias=str("allowedValues")) # type: ignore[literal-required] - severity: SeverityLevel - allow_null: typing.Optional[bool] = pydantic.Field(alias=str("allowNull"), default=None) # type: ignore[literal-required] - type: typing.Literal["allowedColumnValues"] = "allowedColumnValues" - - -class ReplaceApproximateUniquePercentageCheckConfig(core.ModelBase): - """ReplaceApproximateUniquePercentageCheckConfig""" - - percentage_check_config: ReplacePercentageCheckConfig = pydantic.Field(alias=str("percentageCheckConfig")) # type: ignore[literal-required] - type: typing.Literal["approximateUniquePercentage"] = "approximateUniquePercentage" - - -class ReplaceBuildDurationCheckConfig(core.ModelBase): - """ReplaceBuildDurationCheckConfig""" - - time_check_config: TimeCheckConfig = pydantic.Field(alias=str("timeCheckConfig")) # type: ignore[literal-required] - type: typing.Literal["buildDuration"] = "buildDuration" - - -class ReplaceBuildStatusCheckConfig(core.ModelBase): - """ReplaceBuildStatusCheckConfig""" - - status_check_config: StatusCheckConfig = pydantic.Field(alias=str("statusCheckConfig")) # type: ignore[literal-required] - type: typing.Literal["buildStatus"] = "buildStatus" - - -ReplaceCheckConfig = typing_extensions.Annotated[ - typing.Union[ - "ReplaceNumericColumnRangeCheckConfig", - "ReplaceJobStatusCheckConfig", - "ReplaceNumericColumnMeanCheckConfig", - "ReplaceDateColumnRangeCheckConfig", - "ReplaceJobDurationCheckConfig", - "ReplaceApproximateUniquePercentageCheckConfig", - "ReplaceBuildStatusCheckConfig", - "ReplaceColumnTypeCheckConfig", - "ReplaceAllowedColumnValuesCheckConfig", - "ReplaceNullPercentageCheckConfig", - "ReplaceTotalColumnCountCheckConfig", - "ReplaceNumericColumnMedianCheckConfig", - "ReplaceBuildDurationCheckConfig", - "ReplaceSchemaComparisonCheckConfig", - "ReplacePrimaryKeyCheckConfig", - ], - pydantic.Field(discriminator="type"), -] -"""Configuration of a check.""" - - -class ReplaceCheckRequest(core.ModelBase): - """ReplaceCheckRequest""" - - config: ReplaceCheckConfig - intent: typing.Optional[CheckIntent] = None - - -class ReplaceColumnTypeCheckConfig(core.ModelBase): - """ReplaceColumnTypeCheckConfig""" - - column_type_config: ReplaceColumnTypeConfig = pydantic.Field(alias=str("columnTypeConfig")) # type: ignore[literal-required] - type: typing.Literal["columnType"] = "columnType" - - -class ReplaceColumnTypeConfig(core.ModelBase): - """ReplaceColumnTypeConfig""" - - severity: SeverityLevel - expected_type: typing.Optional[core_models.SchemaFieldType] = pydantic.Field(alias=str("expectedType"), default=None) # type: ignore[literal-required] - - -class ReplaceDateColumnRangeCheckConfig(core.ModelBase): - """ReplaceDateColumnRangeCheckConfig""" - - date_bounds_config: DateBoundsConfig = pydantic.Field(alias=str("dateBoundsConfig")) # type: ignore[literal-required] - type: typing.Literal["dateColumnRange"] = "dateColumnRange" - - -class ReplaceJobDurationCheckConfig(core.ModelBase): - """ReplaceJobDurationCheckConfig""" - - time_check_config: TimeCheckConfig = pydantic.Field(alias=str("timeCheckConfig")) # type: ignore[literal-required] - type: typing.Literal["jobDuration"] = "jobDuration" - - -class ReplaceJobStatusCheckConfig(core.ModelBase): - """ReplaceJobStatusCheckConfig""" - - status_check_config: StatusCheckConfig = pydantic.Field(alias=str("statusCheckConfig")) # type: ignore[literal-required] - type: typing.Literal["jobStatus"] = "jobStatus" - - -class ReplaceNullPercentageCheckConfig(core.ModelBase): - """ReplaceNullPercentageCheckConfig""" - - percentage_check_config: ReplacePercentageCheckConfig = pydantic.Field(alias=str("percentageCheckConfig")) # type: ignore[literal-required] - type: typing.Literal["nullPercentage"] = "nullPercentage" - - -class ReplaceNumericColumnCheckConfig(core.ModelBase): - """ReplaceNumericColumnCheckConfig""" - - numeric_bounds: typing.Optional[NumericBoundsConfig] = pydantic.Field(alias=str("numericBounds"), default=None) # type: ignore[literal-required] - trend: typing.Optional[TrendConfig] = None - - -class ReplaceNumericColumnMeanCheckConfig(core.ModelBase): - """ReplaceNumericColumnMeanCheckConfig""" - - numeric_column_check_config: ReplaceNumericColumnCheckConfig = pydantic.Field(alias=str("numericColumnCheckConfig")) # type: ignore[literal-required] - type: typing.Literal["numericColumnMean"] = "numericColumnMean" - - -class ReplaceNumericColumnMedianCheckConfig(core.ModelBase): - """ReplaceNumericColumnMedianCheckConfig""" - - numeric_column_check_config: ReplaceNumericColumnCheckConfig = pydantic.Field(alias=str("numericColumnCheckConfig")) # type: ignore[literal-required] - type: typing.Literal["numericColumnMedian"] = "numericColumnMedian" - - -class ReplaceNumericColumnRangeCheckConfig(core.ModelBase): - """ReplaceNumericColumnRangeCheckConfig""" - - numeric_bounds_config: NumericBoundsConfig = pydantic.Field(alias=str("numericBoundsConfig")) # type: ignore[literal-required] - type: typing.Literal["numericColumnRange"] = "numericColumnRange" - - -class ReplacePercentageCheckConfig(core.ModelBase): - """ReplacePercentageCheckConfig""" - - median_deviation: typing.Optional[MedianDeviationConfig] = pydantic.Field(alias=str("medianDeviation"), default=None) # type: ignore[literal-required] - percentage_bounds: typing.Optional[PercentageBoundsConfig] = pydantic.Field(alias=str("percentageBounds"), default=None) # type: ignore[literal-required] - - -class ReplacePrimaryKeyCheckConfig(core.ModelBase): - """ReplacePrimaryKeyCheckConfig""" - - primary_key_config: ReplacePrimaryKeyConfig = pydantic.Field(alias=str("primaryKeyConfig")) # type: ignore[literal-required] - type: typing.Literal["primaryKey"] = "primaryKey" - - -class ReplacePrimaryKeyConfig(core.ModelBase): - """ReplacePrimaryKeyConfig""" - - severity: SeverityLevel - - -class ReplaceSchemaComparisonCheckConfig(core.ModelBase): - """ReplaceSchemaComparisonCheckConfig""" - - schema_comparison_config: SchemaComparisonConfig = pydantic.Field(alias=str("schemaComparisonConfig")) # type: ignore[literal-required] - type: typing.Literal["schemaComparison"] = "schemaComparison" - - -class ReplaceTotalColumnCountCheckConfig(core.ModelBase): - """ReplaceTotalColumnCountCheckConfig""" - - column_count_config: ColumnCountConfig = pydantic.Field(alias=str("columnCountConfig")) # type: ignore[literal-required] - type: typing.Literal["totalColumnCount"] = "totalColumnCount" - - -class SchemaComparisonCheckConfig(core.ModelBase): - """Checks the dataset schema against an expected schema.""" - - subject: DatasetSubject - schema_comparison_config: SchemaComparisonConfig = pydantic.Field(alias=str("schemaComparisonConfig")) # type: ignore[literal-required] - type: typing.Literal["schemaComparison"] = "schemaComparison" - - -class SchemaComparisonConfig(core.ModelBase): - """Configuration for schema comparison validation with severity settings.""" - - expected_schema: SchemaInfo = pydantic.Field(alias=str("expectedSchema")) # type: ignore[literal-required] - schema_comparison_type: SchemaComparisonType = pydantic.Field(alias=str("schemaComparisonType")) # type: ignore[literal-required] - severity: SeverityLevel - - -SchemaComparisonType = typing.Literal[ - "EXACT_MATCH_ORDERED_COLUMNS", - "EXACT_MATCH_UNORDERED_COLUMNS", - "COLUMN_ADDITIONS_ALLOWED", - "COLUMN_ADDITIONS_ALLOWED_STRICT", -] -""" -The type of schema comparison to perform: -- EXACT_MATCH_ORDERED_COLUMNS: Schemas must have identical columns in the same order. -- EXACT_MATCH_UNORDERED_COLUMNS: Schemas must have identical columns but order doesn't matter. -- COLUMN_ADDITIONS_ALLOWED: Expected schema columns must be present, additional columns are allowed and - missing column types are ignored. -- COLUMN_ADDITIONS_ALLOWED_STRICT: Expected schema columns must be present, additional columns are allowed. - Both expected and actual columns must specify types and they must match exactly. -""" - - -class SchemaInfo(core.ModelBase): - """Information about a dataset schema including all columns.""" - - columns: typing.List[ColumnInfo] - - -SeverityLevel = typing.Literal["MODERATE", "CRITICAL"] -"""The severity level of the check. Possible values are MODERATE or CRITICAL.""" - - -class StatusCheckConfig(core.ModelBase): - """StatusCheckConfig""" - - severity: SeverityLevel - escalation_config: typing.Optional[EscalationConfig] = pydantic.Field(alias=str("escalationConfig"), default=None) # type: ignore[literal-required] - - -class StringColumnValue(core.ModelBase): - """A string column value.""" - - value: str - type: typing.Literal["string"] = "string" - - -class TimeBounds(core.ModelBase): - """The configuration for the range of time between which the health check is expected to succeed.""" - - lower_bound_in_seconds: typing.Optional[core.Long] = pydantic.Field(alias=str("lowerBoundInSeconds"), default=None) # type: ignore[literal-required] - upper_bound_in_seconds: typing.Optional[core.Long] = pydantic.Field(alias=str("upperBoundInSeconds"), default=None) # type: ignore[literal-required] - - -class TimeBoundsConfig(core.ModelBase): - """Configuration for time bounds check with severity settings.""" - - time_bounds: TimeBounds = pydantic.Field(alias=str("timeBounds")) # type: ignore[literal-required] - severity: SeverityLevel - - -class TimeCheckConfig(core.ModelBase): - """TimeCheckConfig""" - - time_bounds: typing.Optional[TimeBoundsConfig] = pydantic.Field(alias=str("timeBounds"), default=None) # type: ignore[literal-required] - median_deviation: typing.Optional[MedianDeviationConfig] = pydantic.Field(alias=str("medianDeviation"), default=None) # type: ignore[literal-required] - - -class TotalColumnCountCheckConfig(core.ModelBase): - """Checks the total number of columns in the dataset.""" - - subject: DatasetSubject - column_count_config: ColumnCountConfig = pydantic.Field(alias=str("columnCountConfig")) # type: ignore[literal-required] - type: typing.Literal["totalColumnCount"] = "totalColumnCount" - - -class TrendConfig(core.ModelBase): - """Configuration for trend-based validation with severity settings. At least one of trendType or differenceBounds must be specified. Both may be provided to validate both the trend pattern and the magnitude of change.""" - - trend_type: typing.Optional[TrendType] = pydantic.Field(alias=str("trendType"), default=None) # type: ignore[literal-required] - difference_bounds: typing.Optional[NumericBounds] = pydantic.Field(alias=str("differenceBounds"), default=None) # type: ignore[literal-required] - severity: SeverityLevel - - -TrendType = typing.Literal[ - "NON_INCREASING", "NON_DECREASING", "STRICTLY_INCREASING", "STRICTLY_DECREASING", "CONSTANT" -] -""" -The type of trend to validate: -- NON_INCREASING: Values should not increase over time -- NON_DECREASING: Values should not decrease over time -- STRICTLY_INCREASING: Values should strictly increase over time -- STRICTLY_DECREASING: Values should strictly decrease over time -- CONSTANT: Values should remain constant over time -""" - - -core.resolve_forward_references(CheckConfig, globalns=globals(), localns=locals()) -core.resolve_forward_references(ColumnValue, globalns=globals(), localns=locals()) -core.resolve_forward_references(ReplaceCheckConfig, globalns=globals(), localns=locals()) - -__all__ = [ - "AllowedColumnValuesCheckConfig", - "ApproximateUniquePercentageCheckConfig", - "BooleanColumnValue", - "BuildDurationCheckConfig", - "BuildStatusCheckConfig", - "Check", - "CheckConfig", - "CheckGroupRid", - "CheckIntent", - "CheckReport", - "CheckResult", - "CheckResultStatus", - "ColumnCountConfig", - "ColumnInfo", - "ColumnName", - "ColumnTypeCheckConfig", - "ColumnTypeConfig", - "ColumnValue", - "CreateCheckRequest", - "DatasetSubject", - "DateBounds", - "DateBoundsConfig", - "DateColumnRangeCheckConfig", - "DateColumnValue", - "EscalationConfig", - "JobDurationCheckConfig", - "JobStatusCheckConfig", - "MedianDeviation", - "MedianDeviationBoundsType", - "MedianDeviationConfig", - "NullPercentageCheckConfig", - "NumericBounds", - "NumericBoundsConfig", - "NumericColumnCheckConfig", - "NumericColumnMeanCheckConfig", - "NumericColumnMedianCheckConfig", - "NumericColumnRangeCheckConfig", - "NumericColumnValue", - "PercentageBounds", - "PercentageBoundsConfig", - "PercentageCheckConfig", - "PercentageValue", - "PrimaryKeyCheckConfig", - "PrimaryKeyConfig", - "ReplaceAllowedColumnValuesCheckConfig", - "ReplaceApproximateUniquePercentageCheckConfig", - "ReplaceBuildDurationCheckConfig", - "ReplaceBuildStatusCheckConfig", - "ReplaceCheckConfig", - "ReplaceCheckRequest", - "ReplaceColumnTypeCheckConfig", - "ReplaceColumnTypeConfig", - "ReplaceDateColumnRangeCheckConfig", - "ReplaceJobDurationCheckConfig", - "ReplaceJobStatusCheckConfig", - "ReplaceNullPercentageCheckConfig", - "ReplaceNumericColumnCheckConfig", - "ReplaceNumericColumnMeanCheckConfig", - "ReplaceNumericColumnMedianCheckConfig", - "ReplaceNumericColumnRangeCheckConfig", - "ReplacePercentageCheckConfig", - "ReplacePrimaryKeyCheckConfig", - "ReplacePrimaryKeyConfig", - "ReplaceSchemaComparisonCheckConfig", - "ReplaceTotalColumnCountCheckConfig", - "SchemaComparisonCheckConfig", - "SchemaComparisonConfig", - "SchemaComparisonType", - "SchemaInfo", - "SeverityLevel", - "StatusCheckConfig", - "StringColumnValue", - "TimeBounds", - "TimeBoundsConfig", - "TimeCheckConfig", - "TotalColumnCountCheckConfig", - "TrendConfig", - "TrendType", -] diff --git a/foundry_sdk/v2/datasets/__init__.py b/foundry_sdk/v2/datasets/__init__.py deleted file mode 100644 index 06a678bea..000000000 --- a/foundry_sdk/v2/datasets/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -from foundry_sdk.v2.datasets._client import AsyncDatasetsClient -from foundry_sdk.v2.datasets._client import DatasetsClient - -__all__ = [ - "DatasetsClient", - "AsyncDatasetsClient", -] diff --git a/foundry_sdk/v2/datasets/_client.py b/foundry_sdk/v2/datasets/_client.py deleted file mode 100644 index 400f5799a..000000000 --- a/foundry_sdk/v2/datasets/_client.py +++ /dev/null @@ -1,82 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing -from functools import cached_property - -from foundry_sdk import _core as core - - -class DatasetsClient: - """ - The API client for the Datasets Namespace. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - - @cached_property - def Dataset(self): - from foundry_sdk.v2.datasets.dataset import DatasetClient - - return DatasetClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @cached_property - def View(self): - from foundry_sdk.v2.datasets.view import ViewClient - - return ViewClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - -class AsyncDatasetsClient: - """ - The Async API client for the Datasets Namespace. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - from foundry_sdk.v2.datasets.dataset import AsyncDatasetClient - from foundry_sdk.v2.datasets.view import AsyncViewClient - - self.Dataset = AsyncDatasetClient(auth=auth, hostname=hostname, config=config) - - self.View = AsyncViewClient(auth=auth, hostname=hostname, config=config) diff --git a/foundry_sdk/v2/datasets/branch.py b/foundry_sdk/v2/datasets/branch.py deleted file mode 100644 index 1236616a8..000000000 --- a/foundry_sdk/v2/datasets/branch.py +++ /dev/null @@ -1,710 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing - -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v2.core import errors as core_errors -from foundry_sdk.v2.core import models as core_models -from foundry_sdk.v2.datasets import errors as datasets_errors -from foundry_sdk.v2.datasets import models as datasets_models - - -class BranchClient: - """ - The API client for the Branch Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _BranchClientStreaming(self) - self.with_raw_response = _BranchClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def create( - self, - dataset_rid: datasets_models.DatasetRid, - *, - name: datasets_models.BranchName, - transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> datasets_models.Branch: - """ - Creates a branch on an existing dataset. A branch may optionally point to a (committed) transaction. - - :param dataset_rid: - :type dataset_rid: DatasetRid - :param name: - :type name: BranchName - :param transaction_rid: The most recent OPEN or COMMITTED transaction on the branch. This will never be an ABORTED transaction. - :type transaction_rid: Optional[TransactionRid] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: datasets_models.Branch - - :raises BranchAlreadyExists: The branch cannot be created because a branch with that name already exists. - :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. - :raises CreateBranchPermissionDenied: The provided token does not have permission to create a branch of this dataset. - :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. - :raises InvalidBranchName: The requested branch name cannot be used. Branch names cannot be empty and must not look like RIDs or UUIDs. - :raises TransactionNotCommitted: The given transaction has not been committed. - :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/datasets/{datasetRid}/branches", - query_params={}, - path_params={ - "datasetRid": dataset_rid, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=datasets_models.CreateBranchRequest( - transaction_rid=transaction_rid, - name=name, - ), - response_type=datasets_models.Branch, - request_timeout=request_timeout, - throwable_errors={ - "BranchAlreadyExists": datasets_errors.BranchAlreadyExists, - "BranchNotFound": datasets_errors.BranchNotFound, - "CreateBranchPermissionDenied": datasets_errors.CreateBranchPermissionDenied, - "DatasetNotFound": datasets_errors.DatasetNotFound, - "InvalidBranchName": datasets_errors.InvalidBranchName, - "TransactionNotCommitted": datasets_errors.TransactionNotCommitted, - "TransactionNotFound": datasets_errors.TransactionNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def delete( - self, - dataset_rid: datasets_models.DatasetRid, - branch_name: datasets_models.BranchName, - *, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> None: - """ - Deletes the Branch with the given BranchName. - - :param dataset_rid: - :type dataset_rid: DatasetRid - :param branch_name: - :type branch_name: BranchName - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: None - - :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. - :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. - :raises DeleteBranchPermissionDenied: The provided token does not have permission to delete the given branch from this dataset. - :raises InvalidBranchName: The requested branch name cannot be used. Branch names cannot be empty and must not look like RIDs or UUIDs. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="DELETE", - resource_path="/v2/datasets/{datasetRid}/branches/{branchName}", - query_params={}, - path_params={ - "datasetRid": dataset_rid, - "branchName": branch_name, - }, - header_params={}, - body=None, - response_type=None, - request_timeout=request_timeout, - throwable_errors={ - "BranchNotFound": datasets_errors.BranchNotFound, - "DatasetNotFound": datasets_errors.DatasetNotFound, - "DeleteBranchPermissionDenied": datasets_errors.DeleteBranchPermissionDenied, - "InvalidBranchName": datasets_errors.InvalidBranchName, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - dataset_rid: datasets_models.DatasetRid, - branch_name: datasets_models.BranchName, - *, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> datasets_models.Branch: - """ - Get a Branch of a Dataset. - - :param dataset_rid: - :type dataset_rid: DatasetRid - :param branch_name: - :type branch_name: BranchName - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: datasets_models.Branch - - :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. - :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/datasets/{datasetRid}/branches/{branchName}", - query_params={}, - path_params={ - "datasetRid": dataset_rid, - "branchName": branch_name, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=datasets_models.Branch, - request_timeout=request_timeout, - throwable_errors={ - "BranchNotFound": datasets_errors.BranchNotFound, - "DatasetNotFound": datasets_errors.DatasetNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def list( - self, - dataset_rid: datasets_models.DatasetRid, - *, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.ResourceIterator[datasets_models.Branch]: - """ - Lists the Branches of a Dataset. - - :param dataset_rid: - :type dataset_rid: DatasetRid - :param page_size: The page size to use for the endpoint. - :type page_size: Optional[PageSize] - :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. - :type page_token: Optional[PageToken] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.ResourceIterator[datasets_models.Branch] - - :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. - :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. - :raises InvalidPageSize: The provided page size was zero or negative. Page sizes must be greater than zero. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/datasets/{datasetRid}/branches", - query_params={ - "pageSize": page_size, - "pageToken": page_token, - }, - path_params={ - "datasetRid": dataset_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=datasets_models.ListBranchesResponse, - request_timeout=request_timeout, - throwable_errors={ - "BranchNotFound": datasets_errors.BranchNotFound, - "DatasetNotFound": datasets_errors.DatasetNotFound, - "InvalidPageSize": core_errors.InvalidPageSize, - }, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def transactions( - self, - dataset_rid: datasets_models.DatasetRid, - branch_name: datasets_models.BranchName, - *, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.ResourceIterator[datasets_models.Transaction]: - """ - Get the Transaction history for the given Dataset. When requesting all transactions, the endpoint returns them in reverse chronological order. - - :param dataset_rid: - :type dataset_rid: DatasetRid - :param branch_name: - :type branch_name: BranchName - :param page_size: The default pageSize is 20 transactions and the maximum allowed pageSize is 50 transactions - :type page_size: Optional[PageSize] - :param page_token: - :type page_token: Optional[PageToken] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.ResourceIterator[datasets_models.Transaction] - - :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. - :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. - :raises GetBranchTransactionHistoryPermissionDenied: Could not transactions the Branch. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/datasets/{datasetRid}/branches/{branchName}/transactions", - query_params={ - "pageSize": page_size, - "pageToken": page_token, - "preview": preview, - }, - path_params={ - "datasetRid": dataset_rid, - "branchName": branch_name, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=datasets_models.ListTransactionsResponse, - request_timeout=request_timeout, - throwable_errors={ - "BranchNotFound": datasets_errors.BranchNotFound, - "DatasetNotFound": datasets_errors.DatasetNotFound, - "GetBranchTransactionHistoryPermissionDenied": datasets_errors.GetBranchTransactionHistoryPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - -class _BranchClientRaw: - def __init__(self, client: BranchClient) -> None: - def create(_: datasets_models.Branch): ... - def delete(_: None): ... - def get(_: datasets_models.Branch): ... - def list(_: datasets_models.ListBranchesResponse): ... - def transactions(_: datasets_models.ListTransactionsResponse): ... - - self.create = core.with_raw_response(create, client.create) - self.delete = core.with_raw_response(delete, client.delete) - self.get = core.with_raw_response(get, client.get) - self.list = core.with_raw_response(list, client.list) - self.transactions = core.with_raw_response(transactions, client.transactions) - - -class _BranchClientStreaming: - def __init__(self, client: BranchClient) -> None: - def create(_: datasets_models.Branch): ... - def get(_: datasets_models.Branch): ... - def list(_: datasets_models.ListBranchesResponse): ... - def transactions(_: datasets_models.ListTransactionsResponse): ... - - self.create = core.with_streaming_response(create, client.create) - self.get = core.with_streaming_response(get, client.get) - self.list = core.with_streaming_response(list, client.list) - self.transactions = core.with_streaming_response(transactions, client.transactions) - - -class AsyncBranchClient: - """ - The API client for the Branch Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AsyncBranchClientStreaming(self) - self.with_raw_response = _AsyncBranchClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def create( - self, - dataset_rid: datasets_models.DatasetRid, - *, - name: datasets_models.BranchName, - transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[datasets_models.Branch]: - """ - Creates a branch on an existing dataset. A branch may optionally point to a (committed) transaction. - - :param dataset_rid: - :type dataset_rid: DatasetRid - :param name: - :type name: BranchName - :param transaction_rid: The most recent OPEN or COMMITTED transaction on the branch. This will never be an ABORTED transaction. - :type transaction_rid: Optional[TransactionRid] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[datasets_models.Branch] - - :raises BranchAlreadyExists: The branch cannot be created because a branch with that name already exists. - :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. - :raises CreateBranchPermissionDenied: The provided token does not have permission to create a branch of this dataset. - :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. - :raises InvalidBranchName: The requested branch name cannot be used. Branch names cannot be empty and must not look like RIDs or UUIDs. - :raises TransactionNotCommitted: The given transaction has not been committed. - :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/datasets/{datasetRid}/branches", - query_params={}, - path_params={ - "datasetRid": dataset_rid, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=datasets_models.CreateBranchRequest( - transaction_rid=transaction_rid, - name=name, - ), - response_type=datasets_models.Branch, - request_timeout=request_timeout, - throwable_errors={ - "BranchAlreadyExists": datasets_errors.BranchAlreadyExists, - "BranchNotFound": datasets_errors.BranchNotFound, - "CreateBranchPermissionDenied": datasets_errors.CreateBranchPermissionDenied, - "DatasetNotFound": datasets_errors.DatasetNotFound, - "InvalidBranchName": datasets_errors.InvalidBranchName, - "TransactionNotCommitted": datasets_errors.TransactionNotCommitted, - "TransactionNotFound": datasets_errors.TransactionNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def delete( - self, - dataset_rid: datasets_models.DatasetRid, - branch_name: datasets_models.BranchName, - *, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[None]: - """ - Deletes the Branch with the given BranchName. - - :param dataset_rid: - :type dataset_rid: DatasetRid - :param branch_name: - :type branch_name: BranchName - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[None] - - :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. - :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. - :raises DeleteBranchPermissionDenied: The provided token does not have permission to delete the given branch from this dataset. - :raises InvalidBranchName: The requested branch name cannot be used. Branch names cannot be empty and must not look like RIDs or UUIDs. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="DELETE", - resource_path="/v2/datasets/{datasetRid}/branches/{branchName}", - query_params={}, - path_params={ - "datasetRid": dataset_rid, - "branchName": branch_name, - }, - header_params={}, - body=None, - response_type=None, - request_timeout=request_timeout, - throwable_errors={ - "BranchNotFound": datasets_errors.BranchNotFound, - "DatasetNotFound": datasets_errors.DatasetNotFound, - "DeleteBranchPermissionDenied": datasets_errors.DeleteBranchPermissionDenied, - "InvalidBranchName": datasets_errors.InvalidBranchName, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - dataset_rid: datasets_models.DatasetRid, - branch_name: datasets_models.BranchName, - *, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[datasets_models.Branch]: - """ - Get a Branch of a Dataset. - - :param dataset_rid: - :type dataset_rid: DatasetRid - :param branch_name: - :type branch_name: BranchName - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[datasets_models.Branch] - - :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. - :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/datasets/{datasetRid}/branches/{branchName}", - query_params={}, - path_params={ - "datasetRid": dataset_rid, - "branchName": branch_name, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=datasets_models.Branch, - request_timeout=request_timeout, - throwable_errors={ - "BranchNotFound": datasets_errors.BranchNotFound, - "DatasetNotFound": datasets_errors.DatasetNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def list( - self, - dataset_rid: datasets_models.DatasetRid, - *, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.AsyncResourceIterator[datasets_models.Branch]: - """ - Lists the Branches of a Dataset. - - :param dataset_rid: - :type dataset_rid: DatasetRid - :param page_size: The page size to use for the endpoint. - :type page_size: Optional[PageSize] - :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. - :type page_token: Optional[PageToken] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.AsyncResourceIterator[datasets_models.Branch] - - :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. - :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. - :raises InvalidPageSize: The provided page size was zero or negative. Page sizes must be greater than zero. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/datasets/{datasetRid}/branches", - query_params={ - "pageSize": page_size, - "pageToken": page_token, - }, - path_params={ - "datasetRid": dataset_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=datasets_models.ListBranchesResponse, - request_timeout=request_timeout, - throwable_errors={ - "BranchNotFound": datasets_errors.BranchNotFound, - "DatasetNotFound": datasets_errors.DatasetNotFound, - "InvalidPageSize": core_errors.InvalidPageSize, - }, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def transactions( - self, - dataset_rid: datasets_models.DatasetRid, - branch_name: datasets_models.BranchName, - *, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.AsyncResourceIterator[datasets_models.Transaction]: - """ - Get the Transaction history for the given Dataset. When requesting all transactions, the endpoint returns them in reverse chronological order. - - :param dataset_rid: - :type dataset_rid: DatasetRid - :param branch_name: - :type branch_name: BranchName - :param page_size: The default pageSize is 20 transactions and the maximum allowed pageSize is 50 transactions - :type page_size: Optional[PageSize] - :param page_token: - :type page_token: Optional[PageToken] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.AsyncResourceIterator[datasets_models.Transaction] - - :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. - :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. - :raises GetBranchTransactionHistoryPermissionDenied: Could not transactions the Branch. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/datasets/{datasetRid}/branches/{branchName}/transactions", - query_params={ - "pageSize": page_size, - "pageToken": page_token, - "preview": preview, - }, - path_params={ - "datasetRid": dataset_rid, - "branchName": branch_name, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=datasets_models.ListTransactionsResponse, - request_timeout=request_timeout, - throwable_errors={ - "BranchNotFound": datasets_errors.BranchNotFound, - "DatasetNotFound": datasets_errors.DatasetNotFound, - "GetBranchTransactionHistoryPermissionDenied": datasets_errors.GetBranchTransactionHistoryPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - -class _AsyncBranchClientRaw: - def __init__(self, client: AsyncBranchClient) -> None: - def create(_: datasets_models.Branch): ... - def delete(_: None): ... - def get(_: datasets_models.Branch): ... - def list(_: datasets_models.ListBranchesResponse): ... - def transactions(_: datasets_models.ListTransactionsResponse): ... - - self.create = core.async_with_raw_response(create, client.create) - self.delete = core.async_with_raw_response(delete, client.delete) - self.get = core.async_with_raw_response(get, client.get) - self.list = core.async_with_raw_response(list, client.list) - self.transactions = core.async_with_raw_response(transactions, client.transactions) - - -class _AsyncBranchClientStreaming: - def __init__(self, client: AsyncBranchClient) -> None: - def create(_: datasets_models.Branch): ... - def get(_: datasets_models.Branch): ... - def list(_: datasets_models.ListBranchesResponse): ... - def transactions(_: datasets_models.ListTransactionsResponse): ... - - self.create = core.async_with_streaming_response(create, client.create) - self.get = core.async_with_streaming_response(get, client.get) - self.list = core.async_with_streaming_response(list, client.list) - self.transactions = core.async_with_streaming_response(transactions, client.transactions) diff --git a/foundry_sdk/v2/datasets/dataset.py b/foundry_sdk/v2/datasets/dataset.py deleted file mode 100644 index 99eff13b7..000000000 --- a/foundry_sdk/v2/datasets/dataset.py +++ /dev/null @@ -1,1550 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing -from functools import cached_property - -import annotated_types -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v2.core import errors as core_errors -from foundry_sdk.v2.core import models as core_models -from foundry_sdk.v2.datasets import errors as datasets_errors -from foundry_sdk.v2.datasets import models as datasets_models -from foundry_sdk.v2.filesystem import errors as filesystem_errors -from foundry_sdk.v2.filesystem import models as filesystem_models - - -class DatasetClient: - """ - The API client for the Dataset Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _DatasetClientStreaming(self) - self.with_raw_response = _DatasetClientRaw(self) - - @cached_property - def Branch(self): - from foundry_sdk.v2.datasets.branch import BranchClient - - return BranchClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @cached_property - def Transaction(self): - from foundry_sdk.v2.datasets.transaction import TransactionClient - - return TransactionClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @cached_property - def File(self): - from foundry_sdk.v2.datasets.file import FileClient - - return FileClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def create( - self, - *, - name: datasets_models.DatasetName, - parent_folder_rid: filesystem_models.FolderRid, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> datasets_models.Dataset: - """ - Creates a new Dataset. A default branch - `master` for most enrollments - will be created on the Dataset. - - :param name: - :type name: DatasetName - :param parent_folder_rid: - :type parent_folder_rid: FolderRid - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: datasets_models.Dataset - - :raises BranchAlreadyExists: The branch cannot be created because a branch with that name already exists. - :raises CreateBranchPermissionDenied: The provided token does not have permission to create a branch of this dataset. - :raises CreateDatasetPermissionDenied: The provided token does not have permission to create a dataset in this folder. - :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. - :raises FolderNotFound: The given Folder could not be found. - :raises InvalidBranchName: The requested branch name cannot be used. Branch names cannot be empty and must not look like RIDs or UUIDs. - :raises InvalidDisplayName: The display name of a Resource should not be exactly `.` or `..`, contain a forward slash `/` and must be less than or equal to 700 characters. - :raises ResourceNameAlreadyExists: The provided resource name is already in use by another resource in the same folder. - :raises TransactionNotCommitted: The given transaction has not been committed. - :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/datasets", - query_params={}, - path_params={}, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=datasets_models.CreateDatasetRequest( - parent_folder_rid=parent_folder_rid, - name=name, - ), - response_type=datasets_models.Dataset, - request_timeout=request_timeout, - throwable_errors={ - "BranchAlreadyExists": datasets_errors.BranchAlreadyExists, - "CreateBranchPermissionDenied": datasets_errors.CreateBranchPermissionDenied, - "CreateDatasetPermissionDenied": datasets_errors.CreateDatasetPermissionDenied, - "DatasetNotFound": datasets_errors.DatasetNotFound, - "FolderNotFound": filesystem_errors.FolderNotFound, - "InvalidBranchName": datasets_errors.InvalidBranchName, - "InvalidDisplayName": filesystem_errors.InvalidDisplayName, - "ResourceNameAlreadyExists": filesystem_errors.ResourceNameAlreadyExists, - "TransactionNotCommitted": datasets_errors.TransactionNotCommitted, - "TransactionNotFound": datasets_errors.TransactionNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - dataset_rid: datasets_models.DatasetRid, - *, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> datasets_models.Dataset: - """ - Get the Dataset with the specified rid. - :param dataset_rid: - :type dataset_rid: DatasetRid - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: datasets_models.Dataset - - :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. - :raises ResourceNameAlreadyExists: The provided resource name is already in use by another resource in the same folder. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/datasets/{datasetRid}", - query_params={}, - path_params={ - "datasetRid": dataset_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=datasets_models.Dataset, - request_timeout=request_timeout, - throwable_errors={ - "DatasetNotFound": datasets_errors.DatasetNotFound, - "ResourceNameAlreadyExists": filesystem_errors.ResourceNameAlreadyExists, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get_health_checks( - self, - dataset_rid: datasets_models.DatasetRid, - *, - branch_name: typing.Optional[datasets_models.BranchName] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> datasets_models.ListHealthChecksResponse: - """ - Get the RIDs of the Data Health Checks that are configured for the given Dataset. - - :param dataset_rid: - :type dataset_rid: DatasetRid - :param branch_name: The name of the Branch. If none is provided, the default Branch name - `master` for most enrollments - will be used. - :type branch_name: Optional[BranchName] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: datasets_models.ListHealthChecksResponse - - :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. - :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. - :raises GetDatasetHealthChecksPermissionDenied: Could not getHealthChecks the Dataset. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/datasets/{datasetRid}/getHealthChecks", - query_params={ - "branchName": branch_name, - "preview": preview, - }, - path_params={ - "datasetRid": dataset_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=datasets_models.ListHealthChecksResponse, - request_timeout=request_timeout, - throwable_errors={ - "BranchNotFound": datasets_errors.BranchNotFound, - "DatasetNotFound": datasets_errors.DatasetNotFound, - "GetDatasetHealthChecksPermissionDenied": datasets_errors.GetDatasetHealthChecksPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get_schedules( - self, - dataset_rid: datasets_models.DatasetRid, - *, - branch_name: typing.Optional[datasets_models.BranchName] = None, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.ResourceIterator[core_models.ScheduleRid]: - """ - Get the RIDs of the Schedules that target the given Dataset - - :param dataset_rid: - :type dataset_rid: DatasetRid - :param branch_name: The name of the Branch. If none is provided, the default Branch name - `master` for most enrollments - will be used. - :type branch_name: Optional[BranchName] - :param page_size: - :type page_size: Optional[PageSize] - :param page_token: - :type page_token: Optional[PageToken] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.ResourceIterator[core_models.ScheduleRid] - - :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. - :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. - :raises GetDatasetSchedulesPermissionDenied: Could not getSchedules the Dataset. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/datasets/{datasetRid}/getSchedules", - query_params={ - "branchName": branch_name, - "pageSize": page_size, - "pageToken": page_token, - "preview": preview, - }, - path_params={ - "datasetRid": dataset_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=datasets_models.ListSchedulesResponse, - request_timeout=request_timeout, - throwable_errors={ - "BranchNotFound": datasets_errors.BranchNotFound, - "DatasetNotFound": datasets_errors.DatasetNotFound, - "GetDatasetSchedulesPermissionDenied": datasets_errors.GetDatasetSchedulesPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get_schema( - self, - dataset_rid: datasets_models.DatasetRid, - *, - branch_name: typing.Optional[datasets_models.BranchName] = None, - end_transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - version_id: typing.Optional[core_models.VersionId] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> datasets_models.GetDatasetSchemaResponse: - """ - Gets a dataset's schema. If no `endTransactionRid` is provided, the latest committed version will be used. - - :param dataset_rid: - :type dataset_rid: DatasetRid - :param branch_name: - :type branch_name: Optional[BranchName] - :param end_transaction_rid: The Resource Identifier (RID) of the end Transaction. If a user does not provide a value, the RID of the latest committed transaction will be used. - :type end_transaction_rid: Optional[TransactionRid] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param version_id: The schema version that should be used. If none is provided, the latest version will be used. - :type version_id: Optional[VersionId] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: datasets_models.GetDatasetSchemaResponse - - :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. - :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. - :raises DatasetViewNotFound: The requested dataset view could not be found. A dataset view represents the effective file contents of a dataset for a branch at a point in time, calculated from transactions (SNAPSHOT, APPEND, UPDATE, DELETE). The view may not exist if the dataset has no transactions, contains no files, the branch is not valid, or the client token does not have access to it. - :raises GetDatasetSchemaPermissionDenied: Could not getSchema the Dataset. - :raises InvalidParameterCombination: The given parameters are individually valid but cannot be used in the given combination. - :raises SchemaNotFound: A schema could not be found for the given dataset and branch, or the client token does not have access to it. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/datasets/{datasetRid}/getSchema", - query_params={ - "branchName": branch_name, - "endTransactionRid": end_transaction_rid, - "preview": preview, - "versionId": version_id, - }, - path_params={ - "datasetRid": dataset_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=datasets_models.GetDatasetSchemaResponse, - request_timeout=request_timeout, - throwable_errors={ - "BranchNotFound": datasets_errors.BranchNotFound, - "DatasetNotFound": datasets_errors.DatasetNotFound, - "DatasetViewNotFound": datasets_errors.DatasetViewNotFound, - "GetDatasetSchemaPermissionDenied": datasets_errors.GetDatasetSchemaPermissionDenied, - "InvalidParameterCombination": core_errors.InvalidParameterCombination, - "SchemaNotFound": datasets_errors.SchemaNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get_schema_batch( - self, - body: typing_extensions.Annotated[ - typing.List[datasets_models.GetSchemaDatasetsBatchRequestElement], - annotated_types.Len(min_length=1, max_length=1000), - ], - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> datasets_models.GetSchemaDatasetsBatchResponse: - """ - Fetch schemas for multiple datasets in a single request. Datasets not found - or inaccessible to the user will be omitted from the response. - - - The maximum batch size for this endpoint is 1000. - :param body: Body of the request - :type body: List[GetSchemaDatasetsBatchRequestElement] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: datasets_models.GetSchemaDatasetsBatchResponse - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/datasets/getSchemaBatch", - query_params={ - "preview": preview, - }, - path_params={}, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=body, - response_type=datasets_models.GetSchemaDatasetsBatchResponse, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def jobs( - self, - dataset_rid: datasets_models.DatasetRid, - *, - order_by: typing.List[datasets_models.GetDatasetJobsSort], - branch_name: typing.Optional[datasets_models.BranchName] = None, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - where: typing.Optional[datasets_models.GetDatasetJobsQuery] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.ResourceIterator[datasets_models.JobDetails]: - """ - Get the RIDs of the Jobs for the given dataset. By default, returned Jobs are sorted in descending order by the Job start time. - - :param dataset_rid: - :type dataset_rid: DatasetRid - :param order_by: - :type order_by: List[GetDatasetJobsSort] - :param branch_name: The name of the Branch. If none is provided, the default Branch name - `master` for most enrollments - will be used. - :type branch_name: Optional[BranchName] - :param page_size: Max number of results to return. A limit of 1000 on if no limit is supplied in the search request - :type page_size: Optional[PageSize] - :param page_token: - :type page_token: Optional[PageToken] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param where: - :type where: Optional[GetDatasetJobsQuery] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.ResourceIterator[datasets_models.JobDetails] - - :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. - :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. - :raises GetDatasetJobsPermissionDenied: Could not jobs the Dataset. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/datasets/{datasetRid}/jobs", - query_params={ - "branchName": branch_name, - "pageSize": page_size, - "pageToken": page_token, - "preview": preview, - }, - path_params={ - "datasetRid": dataset_rid, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=datasets_models.GetDatasetJobsRequest( - where=where, - order_by=order_by, - ), - response_type=datasets_models.GetJobResponse, - request_timeout=request_timeout, - throwable_errors={ - "BranchNotFound": datasets_errors.BranchNotFound, - "DatasetNotFound": datasets_errors.DatasetNotFound, - "GetDatasetJobsPermissionDenied": datasets_errors.GetDatasetJobsPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def put_schema( - self, - dataset_rid: datasets_models.DatasetRid, - *, - schema: core_models.DatasetSchema, - branch_name: typing.Optional[datasets_models.BranchName] = None, - dataframe_reader: typing.Optional[datasets_models.DataframeReader] = None, - end_transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> datasets_models.GetDatasetSchemaResponse: - """ - Adds a schema on an existing dataset using a PUT request. - - :param dataset_rid: - :type dataset_rid: DatasetRid - :param schema: The schema that will be added. - :type schema: DatasetSchema - :param branch_name: - :type branch_name: Optional[BranchName] - :param dataframe_reader: The dataframe reader used for reading the dataset schema. Defaults to PARQUET. - :type dataframe_reader: Optional[DataframeReader] - :param end_transaction_rid: The Resource Identifier (RID) of the end Transaction. - :type end_transaction_rid: Optional[TransactionRid] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: datasets_models.GetDatasetSchemaResponse - - :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. - :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. - :raises DatasetViewNotFound: The requested dataset view could not be found. A dataset view represents the effective file contents of a dataset for a branch at a point in time, calculated from transactions (SNAPSHOT, APPEND, UPDATE, DELETE). The view may not exist if the dataset has no transactions, contains no files, the branch is not valid, or the client token does not have access to it. - :raises InvalidSchema: The schema failed validations - :raises PutDatasetSchemaPermissionDenied: Could not putSchema the Dataset. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="PUT", - resource_path="/v2/datasets/{datasetRid}/putSchema", - query_params={ - "preview": preview, - }, - path_params={ - "datasetRid": dataset_rid, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=datasets_models.PutDatasetSchemaRequest( - branch_name=branch_name, - dataframe_reader=dataframe_reader, - end_transaction_rid=end_transaction_rid, - schema_=schema, - ), - response_type=datasets_models.GetDatasetSchemaResponse, - request_timeout=request_timeout, - throwable_errors={ - "BranchNotFound": datasets_errors.BranchNotFound, - "DatasetNotFound": datasets_errors.DatasetNotFound, - "DatasetViewNotFound": datasets_errors.DatasetViewNotFound, - "InvalidSchema": core_errors.InvalidSchema, - "PutDatasetSchemaPermissionDenied": datasets_errors.PutDatasetSchemaPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def read_table( - self, - dataset_rid: datasets_models.DatasetRid, - *, - format: datasets_models.TableExportFormat, - branch_name: typing.Optional[datasets_models.BranchName] = None, - columns: typing.Optional[typing.List[str]] = None, - end_transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, - row_limit: typing.Optional[int] = None, - start_transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.TableResponse: - """ - Gets the content of a dataset as a table in the specified format. - - This endpoint currently does not support views (virtual datasets composed of other datasets). - - :param dataset_rid: - :type dataset_rid: DatasetRid - :param format: The export format. Must be `ARROW` or `CSV`. - :type format: TableExportFormat - :param branch_name: The name of the Branch. - :type branch_name: Optional[BranchName] - :param columns: A subset of the dataset columns to include in the result. Defaults to all columns. - :type columns: Optional[List[str]] - :param end_transaction_rid: The Resource Identifier (RID) of the end Transaction. - :type end_transaction_rid: Optional[TransactionRid] - :param row_limit: A limit on the number of rows to return. Note that row ordering is non-deterministic. - :type row_limit: Optional[int] - :param start_transaction_rid: The Resource Identifier (RID) of the start Transaction. - :type start_transaction_rid: Optional[TransactionRid] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.TableResponse - - - :raises ColumnTypesNotSupported: The dataset contains column types that are not supported. - :raises DatasetReadNotSupported: The dataset does not support being read. - :raises InvalidParameterCombination: The given parameters are individually valid but cannot be used in the given combination. - :raises ReadTableDatasetPermissionDenied: The provided token does not have permission to read the given dataset as a table. - :raises ReadTableError: An error occurred while reading the table. Refer to the message for more details. - :raises ReadTableRowLimitExceeded: The request to read the table generates a result that exceeds the allowed number of rows. For datasets not stored as Parquet there is a limit of 1 million rows. For datasets stored as Parquet there is no limit. - :raises ReadTableTimeout: The request to read the table timed out. - :raises SchemaNotFound: A schema could not be found for the given dataset and branch, or the client token does not have access to it. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/datasets/{datasetRid}/readTable", - query_params={ - "format": format, - "branchName": branch_name, - "columns": columns, - "endTransactionRid": end_transaction_rid, - "rowLimit": row_limit, - "startTransactionRid": start_transaction_rid, - }, - path_params={ - "datasetRid": dataset_rid, - }, - header_params={ - "Accept": "application/octet-stream", - }, - body=None, - response_type=bytes, - request_timeout=request_timeout, - throwable_errors={ - "ColumnTypesNotSupported": datasets_errors.ColumnTypesNotSupported, - "DatasetReadNotSupported": datasets_errors.DatasetReadNotSupported, - "InvalidParameterCombination": core_errors.InvalidParameterCombination, - "ReadTableDatasetPermissionDenied": datasets_errors.ReadTableDatasetPermissionDenied, - "ReadTableError": datasets_errors.ReadTableError, - "ReadTableRowLimitExceeded": datasets_errors.ReadTableRowLimitExceeded, - "ReadTableTimeout": datasets_errors.ReadTableTimeout, - "SchemaNotFound": datasets_errors.SchemaNotFound, - }, - response_mode=_sdk_internal.get("response_mode", "TABLE"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def transactions( - self, - dataset_rid: datasets_models.DatasetRid, - *, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.ResourceIterator[datasets_models.Transaction]: - """ - Get the Transaction history for the given Dataset. When requesting all transactions, the endpoint returns them in reverse chronological order. - - :param dataset_rid: - :type dataset_rid: DatasetRid - :param page_size: The page size to use for the endpoint. - :type page_size: Optional[PageSize] - :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. - :type page_token: Optional[PageToken] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.ResourceIterator[datasets_models.Transaction] - - :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. - :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/datasets/{datasetRid}/transactions", - query_params={ - "pageSize": page_size, - "pageToken": page_token, - "preview": preview, - }, - path_params={ - "datasetRid": dataset_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=datasets_models.ListTransactionsOfDatasetResponse, - request_timeout=request_timeout, - throwable_errors={ - "BranchNotFound": datasets_errors.BranchNotFound, - "DatasetNotFound": datasets_errors.DatasetNotFound, - }, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - -class _DatasetClientRaw: - def __init__(self, client: DatasetClient) -> None: - def create(_: datasets_models.Dataset): ... - def get(_: datasets_models.Dataset): ... - def get_health_checks(_: datasets_models.ListHealthChecksResponse): ... - def get_schedules(_: datasets_models.ListSchedulesResponse): ... - def get_schema(_: datasets_models.GetDatasetSchemaResponse): ... - def get_schema_batch(_: datasets_models.GetSchemaDatasetsBatchResponse): ... - def jobs(_: datasets_models.GetJobResponse): ... - def put_schema(_: datasets_models.GetDatasetSchemaResponse): ... - def read_table(_: bytes): ... - def transactions(_: datasets_models.ListTransactionsOfDatasetResponse): ... - - self.create = core.with_raw_response(create, client.create) - self.get = core.with_raw_response(get, client.get) - self.get_health_checks = core.with_raw_response(get_health_checks, client.get_health_checks) - self.get_schedules = core.with_raw_response(get_schedules, client.get_schedules) - self.get_schema = core.with_raw_response(get_schema, client.get_schema) - self.get_schema_batch = core.with_raw_response(get_schema_batch, client.get_schema_batch) - self.jobs = core.with_raw_response(jobs, client.jobs) - self.put_schema = core.with_raw_response(put_schema, client.put_schema) - self.read_table = core.with_raw_response(read_table, client.read_table) - self.transactions = core.with_raw_response(transactions, client.transactions) - - -class _DatasetClientStreaming: - def __init__(self, client: DatasetClient) -> None: - def create(_: datasets_models.Dataset): ... - def get(_: datasets_models.Dataset): ... - def get_health_checks(_: datasets_models.ListHealthChecksResponse): ... - def get_schedules(_: datasets_models.ListSchedulesResponse): ... - def get_schema(_: datasets_models.GetDatasetSchemaResponse): ... - def get_schema_batch(_: datasets_models.GetSchemaDatasetsBatchResponse): ... - def jobs(_: datasets_models.GetJobResponse): ... - def put_schema(_: datasets_models.GetDatasetSchemaResponse): ... - def read_table(_: bytes): ... - def transactions(_: datasets_models.ListTransactionsOfDatasetResponse): ... - - self.create = core.with_streaming_response(create, client.create) - self.get = core.with_streaming_response(get, client.get) - self.get_health_checks = core.with_streaming_response( - get_health_checks, client.get_health_checks - ) - self.get_schedules = core.with_streaming_response(get_schedules, client.get_schedules) - self.get_schema = core.with_streaming_response(get_schema, client.get_schema) - self.get_schema_batch = core.with_streaming_response( - get_schema_batch, client.get_schema_batch - ) - self.jobs = core.with_streaming_response(jobs, client.jobs) - self.put_schema = core.with_streaming_response(put_schema, client.put_schema) - self.read_table = core.with_streaming_response(read_table, client.read_table) - self.transactions = core.with_streaming_response(transactions, client.transactions) - - -class AsyncDatasetClient: - """ - The API client for the Dataset Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AsyncDatasetClientStreaming(self) - self.with_raw_response = _AsyncDatasetClientRaw(self) - - @cached_property - def Branch(self): - from foundry_sdk.v2.datasets.branch import AsyncBranchClient - - return AsyncBranchClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @cached_property - def Transaction(self): - from foundry_sdk.v2.datasets.transaction import AsyncTransactionClient - - return AsyncTransactionClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @cached_property - def File(self): - from foundry_sdk.v2.datasets.file import AsyncFileClient - - return AsyncFileClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def create( - self, - *, - name: datasets_models.DatasetName, - parent_folder_rid: filesystem_models.FolderRid, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[datasets_models.Dataset]: - """ - Creates a new Dataset. A default branch - `master` for most enrollments - will be created on the Dataset. - - :param name: - :type name: DatasetName - :param parent_folder_rid: - :type parent_folder_rid: FolderRid - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[datasets_models.Dataset] - - :raises BranchAlreadyExists: The branch cannot be created because a branch with that name already exists. - :raises CreateBranchPermissionDenied: The provided token does not have permission to create a branch of this dataset. - :raises CreateDatasetPermissionDenied: The provided token does not have permission to create a dataset in this folder. - :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. - :raises FolderNotFound: The given Folder could not be found. - :raises InvalidBranchName: The requested branch name cannot be used. Branch names cannot be empty and must not look like RIDs or UUIDs. - :raises InvalidDisplayName: The display name of a Resource should not be exactly `.` or `..`, contain a forward slash `/` and must be less than or equal to 700 characters. - :raises ResourceNameAlreadyExists: The provided resource name is already in use by another resource in the same folder. - :raises TransactionNotCommitted: The given transaction has not been committed. - :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/datasets", - query_params={}, - path_params={}, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=datasets_models.CreateDatasetRequest( - parent_folder_rid=parent_folder_rid, - name=name, - ), - response_type=datasets_models.Dataset, - request_timeout=request_timeout, - throwable_errors={ - "BranchAlreadyExists": datasets_errors.BranchAlreadyExists, - "CreateBranchPermissionDenied": datasets_errors.CreateBranchPermissionDenied, - "CreateDatasetPermissionDenied": datasets_errors.CreateDatasetPermissionDenied, - "DatasetNotFound": datasets_errors.DatasetNotFound, - "FolderNotFound": filesystem_errors.FolderNotFound, - "InvalidBranchName": datasets_errors.InvalidBranchName, - "InvalidDisplayName": filesystem_errors.InvalidDisplayName, - "ResourceNameAlreadyExists": filesystem_errors.ResourceNameAlreadyExists, - "TransactionNotCommitted": datasets_errors.TransactionNotCommitted, - "TransactionNotFound": datasets_errors.TransactionNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - dataset_rid: datasets_models.DatasetRid, - *, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[datasets_models.Dataset]: - """ - Get the Dataset with the specified rid. - :param dataset_rid: - :type dataset_rid: DatasetRid - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[datasets_models.Dataset] - - :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. - :raises ResourceNameAlreadyExists: The provided resource name is already in use by another resource in the same folder. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/datasets/{datasetRid}", - query_params={}, - path_params={ - "datasetRid": dataset_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=datasets_models.Dataset, - request_timeout=request_timeout, - throwable_errors={ - "DatasetNotFound": datasets_errors.DatasetNotFound, - "ResourceNameAlreadyExists": filesystem_errors.ResourceNameAlreadyExists, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get_health_checks( - self, - dataset_rid: datasets_models.DatasetRid, - *, - branch_name: typing.Optional[datasets_models.BranchName] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[datasets_models.ListHealthChecksResponse]: - """ - Get the RIDs of the Data Health Checks that are configured for the given Dataset. - - :param dataset_rid: - :type dataset_rid: DatasetRid - :param branch_name: The name of the Branch. If none is provided, the default Branch name - `master` for most enrollments - will be used. - :type branch_name: Optional[BranchName] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[datasets_models.ListHealthChecksResponse] - - :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. - :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. - :raises GetDatasetHealthChecksPermissionDenied: Could not getHealthChecks the Dataset. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/datasets/{datasetRid}/getHealthChecks", - query_params={ - "branchName": branch_name, - "preview": preview, - }, - path_params={ - "datasetRid": dataset_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=datasets_models.ListHealthChecksResponse, - request_timeout=request_timeout, - throwable_errors={ - "BranchNotFound": datasets_errors.BranchNotFound, - "DatasetNotFound": datasets_errors.DatasetNotFound, - "GetDatasetHealthChecksPermissionDenied": datasets_errors.GetDatasetHealthChecksPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get_schedules( - self, - dataset_rid: datasets_models.DatasetRid, - *, - branch_name: typing.Optional[datasets_models.BranchName] = None, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.AsyncResourceIterator[core_models.ScheduleRid]: - """ - Get the RIDs of the Schedules that target the given Dataset - - :param dataset_rid: - :type dataset_rid: DatasetRid - :param branch_name: The name of the Branch. If none is provided, the default Branch name - `master` for most enrollments - will be used. - :type branch_name: Optional[BranchName] - :param page_size: - :type page_size: Optional[PageSize] - :param page_token: - :type page_token: Optional[PageToken] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.AsyncResourceIterator[core_models.ScheduleRid] - - :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. - :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. - :raises GetDatasetSchedulesPermissionDenied: Could not getSchedules the Dataset. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/datasets/{datasetRid}/getSchedules", - query_params={ - "branchName": branch_name, - "pageSize": page_size, - "pageToken": page_token, - "preview": preview, - }, - path_params={ - "datasetRid": dataset_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=datasets_models.ListSchedulesResponse, - request_timeout=request_timeout, - throwable_errors={ - "BranchNotFound": datasets_errors.BranchNotFound, - "DatasetNotFound": datasets_errors.DatasetNotFound, - "GetDatasetSchedulesPermissionDenied": datasets_errors.GetDatasetSchedulesPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get_schema( - self, - dataset_rid: datasets_models.DatasetRid, - *, - branch_name: typing.Optional[datasets_models.BranchName] = None, - end_transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - version_id: typing.Optional[core_models.VersionId] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[datasets_models.GetDatasetSchemaResponse]: - """ - Gets a dataset's schema. If no `endTransactionRid` is provided, the latest committed version will be used. - - :param dataset_rid: - :type dataset_rid: DatasetRid - :param branch_name: - :type branch_name: Optional[BranchName] - :param end_transaction_rid: The Resource Identifier (RID) of the end Transaction. If a user does not provide a value, the RID of the latest committed transaction will be used. - :type end_transaction_rid: Optional[TransactionRid] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param version_id: The schema version that should be used. If none is provided, the latest version will be used. - :type version_id: Optional[VersionId] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[datasets_models.GetDatasetSchemaResponse] - - :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. - :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. - :raises DatasetViewNotFound: The requested dataset view could not be found. A dataset view represents the effective file contents of a dataset for a branch at a point in time, calculated from transactions (SNAPSHOT, APPEND, UPDATE, DELETE). The view may not exist if the dataset has no transactions, contains no files, the branch is not valid, or the client token does not have access to it. - :raises GetDatasetSchemaPermissionDenied: Could not getSchema the Dataset. - :raises InvalidParameterCombination: The given parameters are individually valid but cannot be used in the given combination. - :raises SchemaNotFound: A schema could not be found for the given dataset and branch, or the client token does not have access to it. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/datasets/{datasetRid}/getSchema", - query_params={ - "branchName": branch_name, - "endTransactionRid": end_transaction_rid, - "preview": preview, - "versionId": version_id, - }, - path_params={ - "datasetRid": dataset_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=datasets_models.GetDatasetSchemaResponse, - request_timeout=request_timeout, - throwable_errors={ - "BranchNotFound": datasets_errors.BranchNotFound, - "DatasetNotFound": datasets_errors.DatasetNotFound, - "DatasetViewNotFound": datasets_errors.DatasetViewNotFound, - "GetDatasetSchemaPermissionDenied": datasets_errors.GetDatasetSchemaPermissionDenied, - "InvalidParameterCombination": core_errors.InvalidParameterCombination, - "SchemaNotFound": datasets_errors.SchemaNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get_schema_batch( - self, - body: typing_extensions.Annotated[ - typing.List[datasets_models.GetSchemaDatasetsBatchRequestElement], - annotated_types.Len(min_length=1, max_length=1000), - ], - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[datasets_models.GetSchemaDatasetsBatchResponse]: - """ - Fetch schemas for multiple datasets in a single request. Datasets not found - or inaccessible to the user will be omitted from the response. - - - The maximum batch size for this endpoint is 1000. - :param body: Body of the request - :type body: List[GetSchemaDatasetsBatchRequestElement] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[datasets_models.GetSchemaDatasetsBatchResponse] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/datasets/getSchemaBatch", - query_params={ - "preview": preview, - }, - path_params={}, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=body, - response_type=datasets_models.GetSchemaDatasetsBatchResponse, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def jobs( - self, - dataset_rid: datasets_models.DatasetRid, - *, - order_by: typing.List[datasets_models.GetDatasetJobsSort], - branch_name: typing.Optional[datasets_models.BranchName] = None, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - where: typing.Optional[datasets_models.GetDatasetJobsQuery] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.AsyncResourceIterator[datasets_models.JobDetails]: - """ - Get the RIDs of the Jobs for the given dataset. By default, returned Jobs are sorted in descending order by the Job start time. - - :param dataset_rid: - :type dataset_rid: DatasetRid - :param order_by: - :type order_by: List[GetDatasetJobsSort] - :param branch_name: The name of the Branch. If none is provided, the default Branch name - `master` for most enrollments - will be used. - :type branch_name: Optional[BranchName] - :param page_size: Max number of results to return. A limit of 1000 on if no limit is supplied in the search request - :type page_size: Optional[PageSize] - :param page_token: - :type page_token: Optional[PageToken] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param where: - :type where: Optional[GetDatasetJobsQuery] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.AsyncResourceIterator[datasets_models.JobDetails] - - :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. - :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. - :raises GetDatasetJobsPermissionDenied: Could not jobs the Dataset. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/datasets/{datasetRid}/jobs", - query_params={ - "branchName": branch_name, - "pageSize": page_size, - "pageToken": page_token, - "preview": preview, - }, - path_params={ - "datasetRid": dataset_rid, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=datasets_models.GetDatasetJobsRequest( - where=where, - order_by=order_by, - ), - response_type=datasets_models.GetJobResponse, - request_timeout=request_timeout, - throwable_errors={ - "BranchNotFound": datasets_errors.BranchNotFound, - "DatasetNotFound": datasets_errors.DatasetNotFound, - "GetDatasetJobsPermissionDenied": datasets_errors.GetDatasetJobsPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def put_schema( - self, - dataset_rid: datasets_models.DatasetRid, - *, - schema: core_models.DatasetSchema, - branch_name: typing.Optional[datasets_models.BranchName] = None, - dataframe_reader: typing.Optional[datasets_models.DataframeReader] = None, - end_transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[datasets_models.GetDatasetSchemaResponse]: - """ - Adds a schema on an existing dataset using a PUT request. - - :param dataset_rid: - :type dataset_rid: DatasetRid - :param schema: The schema that will be added. - :type schema: DatasetSchema - :param branch_name: - :type branch_name: Optional[BranchName] - :param dataframe_reader: The dataframe reader used for reading the dataset schema. Defaults to PARQUET. - :type dataframe_reader: Optional[DataframeReader] - :param end_transaction_rid: The Resource Identifier (RID) of the end Transaction. - :type end_transaction_rid: Optional[TransactionRid] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[datasets_models.GetDatasetSchemaResponse] - - :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. - :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. - :raises DatasetViewNotFound: The requested dataset view could not be found. A dataset view represents the effective file contents of a dataset for a branch at a point in time, calculated from transactions (SNAPSHOT, APPEND, UPDATE, DELETE). The view may not exist if the dataset has no transactions, contains no files, the branch is not valid, or the client token does not have access to it. - :raises InvalidSchema: The schema failed validations - :raises PutDatasetSchemaPermissionDenied: Could not putSchema the Dataset. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="PUT", - resource_path="/v2/datasets/{datasetRid}/putSchema", - query_params={ - "preview": preview, - }, - path_params={ - "datasetRid": dataset_rid, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=datasets_models.PutDatasetSchemaRequest( - branch_name=branch_name, - dataframe_reader=dataframe_reader, - end_transaction_rid=end_transaction_rid, - schema_=schema, - ), - response_type=datasets_models.GetDatasetSchemaResponse, - request_timeout=request_timeout, - throwable_errors={ - "BranchNotFound": datasets_errors.BranchNotFound, - "DatasetNotFound": datasets_errors.DatasetNotFound, - "DatasetViewNotFound": datasets_errors.DatasetViewNotFound, - "InvalidSchema": core_errors.InvalidSchema, - "PutDatasetSchemaPermissionDenied": datasets_errors.PutDatasetSchemaPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def read_table( - self, - dataset_rid: datasets_models.DatasetRid, - *, - format: datasets_models.TableExportFormat, - branch_name: typing.Optional[datasets_models.BranchName] = None, - columns: typing.Optional[typing.List[str]] = None, - end_transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, - row_limit: typing.Optional[int] = None, - start_transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[core.TableResponse]: - """ - Gets the content of a dataset as a table in the specified format. - - This endpoint currently does not support views (virtual datasets composed of other datasets). - - :param dataset_rid: - :type dataset_rid: DatasetRid - :param format: The export format. Must be `ARROW` or `CSV`. - :type format: TableExportFormat - :param branch_name: The name of the Branch. - :type branch_name: Optional[BranchName] - :param columns: A subset of the dataset columns to include in the result. Defaults to all columns. - :type columns: Optional[List[str]] - :param end_transaction_rid: The Resource Identifier (RID) of the end Transaction. - :type end_transaction_rid: Optional[TransactionRid] - :param row_limit: A limit on the number of rows to return. Note that row ordering is non-deterministic. - :type row_limit: Optional[int] - :param start_transaction_rid: The Resource Identifier (RID) of the start Transaction. - :type start_transaction_rid: Optional[TransactionRid] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[core.TableResponse - ] - - :raises ColumnTypesNotSupported: The dataset contains column types that are not supported. - :raises DatasetReadNotSupported: The dataset does not support being read. - :raises InvalidParameterCombination: The given parameters are individually valid but cannot be used in the given combination. - :raises ReadTableDatasetPermissionDenied: The provided token does not have permission to read the given dataset as a table. - :raises ReadTableError: An error occurred while reading the table. Refer to the message for more details. - :raises ReadTableRowLimitExceeded: The request to read the table generates a result that exceeds the allowed number of rows. For datasets not stored as Parquet there is a limit of 1 million rows. For datasets stored as Parquet there is no limit. - :raises ReadTableTimeout: The request to read the table timed out. - :raises SchemaNotFound: A schema could not be found for the given dataset and branch, or the client token does not have access to it. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/datasets/{datasetRid}/readTable", - query_params={ - "format": format, - "branchName": branch_name, - "columns": columns, - "endTransactionRid": end_transaction_rid, - "rowLimit": row_limit, - "startTransactionRid": start_transaction_rid, - }, - path_params={ - "datasetRid": dataset_rid, - }, - header_params={ - "Accept": "application/octet-stream", - }, - body=None, - response_type=bytes, - request_timeout=request_timeout, - throwable_errors={ - "ColumnTypesNotSupported": datasets_errors.ColumnTypesNotSupported, - "DatasetReadNotSupported": datasets_errors.DatasetReadNotSupported, - "InvalidParameterCombination": core_errors.InvalidParameterCombination, - "ReadTableDatasetPermissionDenied": datasets_errors.ReadTableDatasetPermissionDenied, - "ReadTableError": datasets_errors.ReadTableError, - "ReadTableRowLimitExceeded": datasets_errors.ReadTableRowLimitExceeded, - "ReadTableTimeout": datasets_errors.ReadTableTimeout, - "SchemaNotFound": datasets_errors.SchemaNotFound, - }, - response_mode=_sdk_internal.get("response_mode", "TABLE"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def transactions( - self, - dataset_rid: datasets_models.DatasetRid, - *, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.AsyncResourceIterator[datasets_models.Transaction]: - """ - Get the Transaction history for the given Dataset. When requesting all transactions, the endpoint returns them in reverse chronological order. - - :param dataset_rid: - :type dataset_rid: DatasetRid - :param page_size: The page size to use for the endpoint. - :type page_size: Optional[PageSize] - :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. - :type page_token: Optional[PageToken] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.AsyncResourceIterator[datasets_models.Transaction] - - :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. - :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/datasets/{datasetRid}/transactions", - query_params={ - "pageSize": page_size, - "pageToken": page_token, - "preview": preview, - }, - path_params={ - "datasetRid": dataset_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=datasets_models.ListTransactionsOfDatasetResponse, - request_timeout=request_timeout, - throwable_errors={ - "BranchNotFound": datasets_errors.BranchNotFound, - "DatasetNotFound": datasets_errors.DatasetNotFound, - }, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - -class _AsyncDatasetClientRaw: - def __init__(self, client: AsyncDatasetClient) -> None: - def create(_: datasets_models.Dataset): ... - def get(_: datasets_models.Dataset): ... - def get_health_checks(_: datasets_models.ListHealthChecksResponse): ... - def get_schedules(_: datasets_models.ListSchedulesResponse): ... - def get_schema(_: datasets_models.GetDatasetSchemaResponse): ... - def get_schema_batch(_: datasets_models.GetSchemaDatasetsBatchResponse): ... - def jobs(_: datasets_models.GetJobResponse): ... - def put_schema(_: datasets_models.GetDatasetSchemaResponse): ... - def read_table(_: bytes): ... - def transactions(_: datasets_models.ListTransactionsOfDatasetResponse): ... - - self.create = core.async_with_raw_response(create, client.create) - self.get = core.async_with_raw_response(get, client.get) - self.get_health_checks = core.async_with_raw_response( - get_health_checks, client.get_health_checks - ) - self.get_schedules = core.async_with_raw_response(get_schedules, client.get_schedules) - self.get_schema = core.async_with_raw_response(get_schema, client.get_schema) - self.get_schema_batch = core.async_with_raw_response( - get_schema_batch, client.get_schema_batch - ) - self.jobs = core.async_with_raw_response(jobs, client.jobs) - self.put_schema = core.async_with_raw_response(put_schema, client.put_schema) - self.read_table = core.async_with_raw_response(read_table, client.read_table) - self.transactions = core.async_with_raw_response(transactions, client.transactions) - - -class _AsyncDatasetClientStreaming: - def __init__(self, client: AsyncDatasetClient) -> None: - def create(_: datasets_models.Dataset): ... - def get(_: datasets_models.Dataset): ... - def get_health_checks(_: datasets_models.ListHealthChecksResponse): ... - def get_schedules(_: datasets_models.ListSchedulesResponse): ... - def get_schema(_: datasets_models.GetDatasetSchemaResponse): ... - def get_schema_batch(_: datasets_models.GetSchemaDatasetsBatchResponse): ... - def jobs(_: datasets_models.GetJobResponse): ... - def put_schema(_: datasets_models.GetDatasetSchemaResponse): ... - def read_table(_: bytes): ... - def transactions(_: datasets_models.ListTransactionsOfDatasetResponse): ... - - self.create = core.async_with_streaming_response(create, client.create) - self.get = core.async_with_streaming_response(get, client.get) - self.get_health_checks = core.async_with_streaming_response( - get_health_checks, client.get_health_checks - ) - self.get_schedules = core.async_with_streaming_response(get_schedules, client.get_schedules) - self.get_schema = core.async_with_streaming_response(get_schema, client.get_schema) - self.get_schema_batch = core.async_with_streaming_response( - get_schema_batch, client.get_schema_batch - ) - self.jobs = core.async_with_streaming_response(jobs, client.jobs) - self.put_schema = core.async_with_streaming_response(put_schema, client.put_schema) - self.read_table = core.async_with_streaming_response(read_table, client.read_table) - self.transactions = core.async_with_streaming_response(transactions, client.transactions) diff --git a/foundry_sdk/v2/datasets/errors.py b/foundry_sdk/v2/datasets/errors.py deleted file mode 100644 index e8b4aaf56..000000000 --- a/foundry_sdk/v2/datasets/errors.py +++ /dev/null @@ -1,974 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing -from dataclasses import dataclass - -import typing_extensions - -from foundry_sdk import _errors as errors -from foundry_sdk.v2.core import models as core_models -from foundry_sdk.v2.datasets import models as datasets_models -from foundry_sdk.v2.filesystem import models as filesystem_models - - -class AbortTransactionPermissionDeniedParameters(typing_extensions.TypedDict): - """The provided token does not have permission to abort the given transaction on the given dataset.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - datasetRid: datasets_models.DatasetRid - transactionRid: datasets_models.TransactionRid - - -@dataclass -class AbortTransactionPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["AbortTransactionPermissionDenied"] - parameters: AbortTransactionPermissionDeniedParameters - error_instance_id: str - - -class AddBackingDatasetsPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not addBackingDatasets the View.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - viewDatasetRid: datasets_models.DatasetRid - """The rid of the View.""" - - -@dataclass -class AddBackingDatasetsPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["AddBackingDatasetsPermissionDenied"] - parameters: AddBackingDatasetsPermissionDeniedParameters - error_instance_id: str - - -class AddPrimaryKeyPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not addPrimaryKey the View.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - viewDatasetRid: datasets_models.DatasetRid - """The rid of the View.""" - - -@dataclass -class AddPrimaryKeyPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["AddPrimaryKeyPermissionDenied"] - parameters: AddPrimaryKeyPermissionDeniedParameters - error_instance_id: str - - -class BranchAlreadyExistsParameters(typing_extensions.TypedDict): - """The branch cannot be created because a branch with that name already exists.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - datasetRid: datasets_models.DatasetRid - branchName: datasets_models.BranchName - - -@dataclass -class BranchAlreadyExists(errors.ConflictError): - name: typing.Literal["BranchAlreadyExists"] - parameters: BranchAlreadyExistsParameters - error_instance_id: str - - -class BranchNotFoundParameters(typing_extensions.TypedDict): - """The requested branch could not be found, or the client token does not have access to it.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - datasetRid: datasets_models.DatasetRid - branchName: datasets_models.BranchName - - -@dataclass -class BranchNotFound(errors.NotFoundError): - name: typing.Literal["BranchNotFound"] - parameters: BranchNotFoundParameters - error_instance_id: str - - -class BuildTransactionPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not build the Transaction.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - datasetRid: datasets_models.DatasetRid - transactionRid: datasets_models.TransactionRid - - -@dataclass -class BuildTransactionPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["BuildTransactionPermissionDenied"] - parameters: BuildTransactionPermissionDeniedParameters - error_instance_id: str - - -class ColumnTypesNotSupportedParameters(typing_extensions.TypedDict): - """The dataset contains column types that are not supported.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - datasetRid: datasets_models.DatasetRid - - -@dataclass -class ColumnTypesNotSupported(errors.BadRequestError): - name: typing.Literal["ColumnTypesNotSupported"] - parameters: ColumnTypesNotSupportedParameters - error_instance_id: str - - -class CommitTransactionPermissionDeniedParameters(typing_extensions.TypedDict): - """The provided token does not have permission to commit the given transaction on the given dataset.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - datasetRid: datasets_models.DatasetRid - transactionRid: datasets_models.TransactionRid - - -@dataclass -class CommitTransactionPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["CommitTransactionPermissionDenied"] - parameters: CommitTransactionPermissionDeniedParameters - error_instance_id: str - - -class CreateBranchPermissionDeniedParameters(typing_extensions.TypedDict): - """The provided token does not have permission to create a branch of this dataset.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - datasetRid: datasets_models.DatasetRid - branchName: datasets_models.BranchName - - -@dataclass -class CreateBranchPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["CreateBranchPermissionDenied"] - parameters: CreateBranchPermissionDeniedParameters - error_instance_id: str - - -class CreateDatasetPermissionDeniedParameters(typing_extensions.TypedDict): - """The provided token does not have permission to create a dataset in this folder.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - parentFolderRid: filesystem_models.FolderRid - name: datasets_models.DatasetName - - -@dataclass -class CreateDatasetPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["CreateDatasetPermissionDenied"] - parameters: CreateDatasetPermissionDeniedParameters - error_instance_id: str - - -class CreateTransactionPermissionDeniedParameters(typing_extensions.TypedDict): - """The provided token does not have permission to create a transaction on this dataset.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - datasetRid: datasets_models.DatasetRid - branchName: typing_extensions.NotRequired[datasets_models.BranchName] - - -@dataclass -class CreateTransactionPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["CreateTransactionPermissionDenied"] - parameters: CreateTransactionPermissionDeniedParameters - error_instance_id: str - - -class CreateViewPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not create the View.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class CreateViewPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["CreateViewPermissionDenied"] - parameters: CreateViewPermissionDeniedParameters - error_instance_id: str - - -class DatasetNotFoundParameters(typing_extensions.TypedDict): - """The requested dataset could not be found, or the client token does not have access to it.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - datasetRid: datasets_models.DatasetRid - - -@dataclass -class DatasetNotFound(errors.NotFoundError): - name: typing.Literal["DatasetNotFound"] - parameters: DatasetNotFoundParameters - error_instance_id: str - - -class DatasetReadNotSupportedParameters(typing_extensions.TypedDict): - """The dataset does not support being read.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - datasetRid: datasets_models.DatasetRid - - -@dataclass -class DatasetReadNotSupported(errors.BadRequestError): - name: typing.Literal["DatasetReadNotSupported"] - parameters: DatasetReadNotSupportedParameters - error_instance_id: str - - -class DatasetViewNotFoundParameters(typing_extensions.TypedDict): - """ - The requested dataset view could not be found. A dataset view represents the effective file contents of a dataset - for a branch at a point in time, calculated from transactions (SNAPSHOT, APPEND, UPDATE, DELETE). The view may not - exist if the dataset has no transactions, contains no files, the branch is not valid, or the client token does not have access to it. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - datasetRid: datasets_models.DatasetRid - branch: datasets_models.BranchName - - -@dataclass -class DatasetViewNotFound(errors.NotFoundError): - name: typing.Literal["DatasetViewNotFound"] - parameters: DatasetViewNotFoundParameters - error_instance_id: str - - -class DeleteBranchPermissionDeniedParameters(typing_extensions.TypedDict): - """The provided token does not have permission to delete the given branch from this dataset.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - datasetRid: datasets_models.DatasetRid - branchName: datasets_models.BranchName - - -@dataclass -class DeleteBranchPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["DeleteBranchPermissionDenied"] - parameters: DeleteBranchPermissionDeniedParameters - error_instance_id: str - - -class DeleteFilePermissionDeniedParameters(typing_extensions.TypedDict): - """Could not delete the File.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - datasetRid: datasets_models.DatasetRid - filePath: core_models.FilePath - - -@dataclass -class DeleteFilePermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["DeleteFilePermissionDenied"] - parameters: DeleteFilePermissionDeniedParameters - error_instance_id: str - - -class DeleteSchemaPermissionDeniedParameters(typing_extensions.TypedDict): - """todo""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - datasetRid: datasets_models.DatasetRid - branchName: datasets_models.BranchName - transactionId: typing_extensions.NotRequired[datasets_models.TransactionRid] - - -@dataclass -class DeleteSchemaPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["DeleteSchemaPermissionDenied"] - parameters: DeleteSchemaPermissionDeniedParameters - error_instance_id: str - - -class FileAlreadyExistsParameters(typing_extensions.TypedDict): - """The given file path already exists in the dataset and transaction.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - datasetRid: datasets_models.DatasetRid - transactionRid: datasets_models.TransactionRid - path: core_models.FilePath - - -@dataclass -class FileAlreadyExists(errors.NotFoundError): - name: typing.Literal["FileAlreadyExists"] - parameters: FileAlreadyExistsParameters - error_instance_id: str - - -class FileNotFoundParameters(typing_extensions.TypedDict): - """The given File could not be found.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - datasetRid: datasets_models.DatasetRid - filePath: core_models.FilePath - - -@dataclass -class FileNotFound(errors.NotFoundError): - name: typing.Literal["FileNotFound"] - parameters: FileNotFoundParameters - error_instance_id: str - - -class FileNotFoundOnBranchParameters(typing_extensions.TypedDict): - """The requested file could not be found on the given branch, or the client token does not have access to it.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - datasetRid: datasets_models.DatasetRid - branchName: datasets_models.BranchName - path: core_models.FilePath - - -@dataclass -class FileNotFoundOnBranch(errors.NotFoundError): - name: typing.Literal["FileNotFoundOnBranch"] - parameters: FileNotFoundOnBranchParameters - error_instance_id: str - - -class FileNotFoundOnTransactionRangeParameters(typing_extensions.TypedDict): - """The requested file could not be found on the given transaction range, or the client token does not have access to it.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - datasetRid: datasets_models.DatasetRid - startTransactionRid: typing_extensions.NotRequired[datasets_models.TransactionRid] - endTransactionRid: datasets_models.TransactionRid - path: core_models.FilePath - - -@dataclass -class FileNotFoundOnTransactionRange(errors.NotFoundError): - name: typing.Literal["FileNotFoundOnTransactionRange"] - parameters: FileNotFoundOnTransactionRangeParameters - error_instance_id: str - - -class GetBranchTransactionHistoryPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not transactions the Branch.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - datasetRid: datasets_models.DatasetRid - branchName: datasets_models.BranchName - - -@dataclass -class GetBranchTransactionHistoryPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["GetBranchTransactionHistoryPermissionDenied"] - parameters: GetBranchTransactionHistoryPermissionDeniedParameters - error_instance_id: str - - -class GetDatasetHealthChecksPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not getHealthChecks the Dataset.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - datasetRid: datasets_models.DatasetRid - - -@dataclass -class GetDatasetHealthChecksPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["GetDatasetHealthChecksPermissionDenied"] - parameters: GetDatasetHealthChecksPermissionDeniedParameters - error_instance_id: str - - -class GetDatasetJobsPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not jobs the Dataset.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - datasetRid: datasets_models.DatasetRid - - -@dataclass -class GetDatasetJobsPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["GetDatasetJobsPermissionDenied"] - parameters: GetDatasetJobsPermissionDeniedParameters - error_instance_id: str - - -class GetDatasetSchedulesPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not getSchedules the Dataset.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - datasetRid: datasets_models.DatasetRid - - -@dataclass -class GetDatasetSchedulesPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["GetDatasetSchedulesPermissionDenied"] - parameters: GetDatasetSchedulesPermissionDeniedParameters - error_instance_id: str - - -class GetDatasetSchemaPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not getSchema the Dataset.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - datasetRid: datasets_models.DatasetRid - - -@dataclass -class GetDatasetSchemaPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["GetDatasetSchemaPermissionDenied"] - parameters: GetDatasetSchemaPermissionDeniedParameters - error_instance_id: str - - -class GetFileContentPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not content the File.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - datasetRid: datasets_models.DatasetRid - filePath: core_models.FilePath - - -@dataclass -class GetFileContentPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["GetFileContentPermissionDenied"] - parameters: GetFileContentPermissionDeniedParameters - error_instance_id: str - - -class InputBackingDatasetNotInOutputViewProjectParameters(typing_extensions.TypedDict): - """ - One or more backing datasets do not live in the same project as the view. Either move the input datasets to - the same project as the view or add them as project references. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class InputBackingDatasetNotInOutputViewProject(errors.BadRequestError): - name: typing.Literal["InputBackingDatasetNotInOutputViewProject"] - parameters: InputBackingDatasetNotInOutputViewProjectParameters - error_instance_id: str - - -class InvalidBranchNameParameters(typing_extensions.TypedDict): - """The requested branch name cannot be used. Branch names cannot be empty and must not look like RIDs or UUIDs.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - branchName: datasets_models.BranchName - - -@dataclass -class InvalidBranchName(errors.BadRequestError): - name: typing.Literal["InvalidBranchName"] - parameters: InvalidBranchNameParameters - error_instance_id: str - - -class InvalidTransactionTypeParameters(typing_extensions.TypedDict): - """The given transaction type is not valid. Valid transaction types are `SNAPSHOT`, `UPDATE`, `APPEND`, and `DELETE`.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - datasetRid: datasets_models.DatasetRid - transactionRid: datasets_models.TransactionRid - transactionType: datasets_models.TransactionType - - -@dataclass -class InvalidTransactionType(errors.BadRequestError): - name: typing.Literal["InvalidTransactionType"] - parameters: InvalidTransactionTypeParameters - error_instance_id: str - - -class InvalidViewBackingDatasetParameters(typing_extensions.TypedDict): - """Either you do not have access to one or more of the backing datasets or it does not exist.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class InvalidViewBackingDataset(errors.BadRequestError): - name: typing.Literal["InvalidViewBackingDataset"] - parameters: InvalidViewBackingDatasetParameters - error_instance_id: str - - -class InvalidViewPrimaryKeyColumnTypeParameters(typing_extensions.TypedDict): - """ - The type of each referenced column in the primary key must be one of the following: BYTE, SHORT, DECIMAL, - INTEGER, LONG, STRING, BOOLEAN, TIMESTAMP or DATE. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - primaryKeyColumns: typing.List[str] - invalidColumns: typing.List[str] - - -@dataclass -class InvalidViewPrimaryKeyColumnType(errors.BadRequestError): - name: typing.Literal["InvalidViewPrimaryKeyColumnType"] - parameters: InvalidViewPrimaryKeyColumnTypeParameters - error_instance_id: str - - -class InvalidViewPrimaryKeyDeletionColumnParameters(typing_extensions.TypedDict): - """The deletion column must be a boolean.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - deletionColumn: str - deletionColumnType: core_models.SchemaFieldType - - -@dataclass -class InvalidViewPrimaryKeyDeletionColumn(errors.BadRequestError): - name: typing.Literal["InvalidViewPrimaryKeyDeletionColumn"] - parameters: InvalidViewPrimaryKeyDeletionColumnParameters - error_instance_id: str - - -class JobTransactionPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not job the Transaction.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - datasetRid: datasets_models.DatasetRid - transactionRid: datasets_models.TransactionRid - - -@dataclass -class JobTransactionPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["JobTransactionPermissionDenied"] - parameters: JobTransactionPermissionDeniedParameters - error_instance_id: str - - -class NotAllColumnsInPrimaryKeyArePresentParameters(typing_extensions.TypedDict): - """Not all columns in the View's primary key are present in the dataset(s).""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - primaryKeyColumns: typing.List[str] - missingColumns: typing.List[str] - - -@dataclass -class NotAllColumnsInPrimaryKeyArePresent(errors.BadRequestError): - name: typing.Literal["NotAllColumnsInPrimaryKeyArePresent"] - parameters: NotAllColumnsInPrimaryKeyArePresentParameters - error_instance_id: str - - -class OpenTransactionAlreadyExistsParameters(typing_extensions.TypedDict): - """A transaction is already open on this dataset and branch. A branch of a dataset can only have one open transaction at a time.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - datasetRid: datasets_models.DatasetRid - branchName: datasets_models.BranchName - - -@dataclass -class OpenTransactionAlreadyExists(errors.ConflictError): - name: typing.Literal["OpenTransactionAlreadyExists"] - parameters: OpenTransactionAlreadyExistsParameters - error_instance_id: str - - -class PutDatasetSchemaPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not putSchema the Dataset.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - datasetRid: datasets_models.DatasetRid - - -@dataclass -class PutDatasetSchemaPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["PutDatasetSchemaPermissionDenied"] - parameters: PutDatasetSchemaPermissionDeniedParameters - error_instance_id: str - - -class PutSchemaPermissionDeniedParameters(typing_extensions.TypedDict): - """todo""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - datasetRid: datasets_models.DatasetRid - branchName: datasets_models.BranchName - - -@dataclass -class PutSchemaPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["PutSchemaPermissionDenied"] - parameters: PutSchemaPermissionDeniedParameters - error_instance_id: str - - -class ReadTableDatasetPermissionDeniedParameters(typing_extensions.TypedDict): - """The provided token does not have permission to read the given dataset as a table.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - datasetRid: datasets_models.DatasetRid - - -@dataclass -class ReadTableDatasetPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["ReadTableDatasetPermissionDenied"] - parameters: ReadTableDatasetPermissionDeniedParameters - error_instance_id: str - - -class ReadTableErrorParameters(typing_extensions.TypedDict): - """An error occurred while reading the table. Refer to the message for more details.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - datasetRid: datasets_models.DatasetRid - message: str - - -@dataclass -class ReadTableError(errors.InternalServerError): - name: typing.Literal["ReadTableError"] - parameters: ReadTableErrorParameters - error_instance_id: str - - -class ReadTableRowLimitExceededParameters(typing_extensions.TypedDict): - """ - The request to read the table generates a result that exceeds the allowed number of rows. For datasets not - stored as Parquet there is a limit of 1 million rows. For datasets stored as Parquet there is no limit. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - datasetRid: datasets_models.DatasetRid - - -@dataclass -class ReadTableRowLimitExceeded(errors.BadRequestError): - name: typing.Literal["ReadTableRowLimitExceeded"] - parameters: ReadTableRowLimitExceededParameters - error_instance_id: str - - -class ReadTableTimeoutParameters(typing_extensions.TypedDict): - """The request to read the table timed out.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - datasetRid: datasets_models.DatasetRid - - -@dataclass -class ReadTableTimeout(errors.InternalServerError): - name: typing.Literal["ReadTableTimeout"] - parameters: ReadTableTimeoutParameters - error_instance_id: str - - -class RemoveBackingDatasetsPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not removeBackingDatasets the View.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - viewDatasetRid: datasets_models.DatasetRid - """The rid of the View.""" - - -@dataclass -class RemoveBackingDatasetsPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["RemoveBackingDatasetsPermissionDenied"] - parameters: RemoveBackingDatasetsPermissionDeniedParameters - error_instance_id: str - - -class ReplaceBackingDatasetsPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not replaceBackingDatasets the View.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - viewDatasetRid: datasets_models.DatasetRid - """The rid of the View.""" - - -@dataclass -class ReplaceBackingDatasetsPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["ReplaceBackingDatasetsPermissionDenied"] - parameters: ReplaceBackingDatasetsPermissionDeniedParameters - error_instance_id: str - - -class SchemaNotFoundParameters(typing_extensions.TypedDict): - """A schema could not be found for the given dataset and branch, or the client token does not have access to it.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - datasetRid: datasets_models.DatasetRid - branchName: datasets_models.BranchName - transactionRid: typing_extensions.NotRequired[datasets_models.TransactionRid] - - -@dataclass -class SchemaNotFound(errors.NotFoundError): - name: typing.Literal["SchemaNotFound"] - parameters: SchemaNotFoundParameters - error_instance_id: str - - -class TransactionNotCommittedParameters(typing_extensions.TypedDict): - """The given transaction has not been committed.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - datasetRid: datasets_models.DatasetRid - transactionRid: datasets_models.TransactionRid - transactionStatus: datasets_models.TransactionStatus - - -@dataclass -class TransactionNotCommitted(errors.BadRequestError): - name: typing.Literal["TransactionNotCommitted"] - parameters: TransactionNotCommittedParameters - error_instance_id: str - - -class TransactionNotFoundParameters(typing_extensions.TypedDict): - """The requested transaction could not be found on the dataset, or the client token does not have access to it.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - datasetRid: datasets_models.DatasetRid - transactionRid: datasets_models.TransactionRid - - -@dataclass -class TransactionNotFound(errors.NotFoundError): - name: typing.Literal["TransactionNotFound"] - parameters: TransactionNotFoundParameters - error_instance_id: str - - -class TransactionNotOpenParameters(typing_extensions.TypedDict): - """The given transaction is not open.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - datasetRid: datasets_models.DatasetRid - transactionRid: datasets_models.TransactionRid - transactionStatus: datasets_models.TransactionStatus - - -@dataclass -class TransactionNotOpen(errors.BadRequestError): - name: typing.Literal["TransactionNotOpen"] - parameters: TransactionNotOpenParameters - error_instance_id: str - - -class UploadFilePermissionDeniedParameters(typing_extensions.TypedDict): - """The provided token does not have permission to upload the given file to the given dataset and transaction.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - datasetRid: datasets_models.DatasetRid - transactionRid: datasets_models.TransactionRid - path: core_models.FilePath - - -@dataclass -class UploadFilePermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["UploadFilePermissionDenied"] - parameters: UploadFilePermissionDeniedParameters - error_instance_id: str - - -class ViewDatasetCleanupFailedParameters(typing_extensions.TypedDict): - """Failed to delete dataset following View creation failure.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - viewDatasetRid: datasets_models.DatasetRid - - -@dataclass -class ViewDatasetCleanupFailed(errors.InternalServerError): - name: typing.Literal["ViewDatasetCleanupFailed"] - parameters: ViewDatasetCleanupFailedParameters - error_instance_id: str - - -class ViewNotFoundParameters(typing_extensions.TypedDict): - """ - The requested View could not be found. Either the view does not exist, the branch is not valid or the - client token does not have access to it. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - viewDatasetRid: datasets_models.DatasetRid - branch: datasets_models.BranchName - - -@dataclass -class ViewNotFound(errors.NotFoundError): - name: typing.Literal["ViewNotFound"] - parameters: ViewNotFoundParameters - error_instance_id: str - - -class ViewPrimaryKeyCannotBeModifiedParameters(typing_extensions.TypedDict): - """A primary key already exits.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class ViewPrimaryKeyCannotBeModified(errors.ConflictError): - name: typing.Literal["ViewPrimaryKeyCannotBeModified"] - parameters: ViewPrimaryKeyCannotBeModifiedParameters - error_instance_id: str - - -class ViewPrimaryKeyDeletionColumnNotInDatasetSchemaParameters(typing_extensions.TypedDict): - """The deletion column is not present in the dataset.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - deletionColumn: str - - -@dataclass -class ViewPrimaryKeyDeletionColumnNotInDatasetSchema(errors.BadRequestError): - name: typing.Literal["ViewPrimaryKeyDeletionColumnNotInDatasetSchema"] - parameters: ViewPrimaryKeyDeletionColumnNotInDatasetSchemaParameters - error_instance_id: str - - -class ViewPrimaryKeyMustContainAtLeastOneColumnParameters(typing_extensions.TypedDict): - """No columns were provided as part of the primary key""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class ViewPrimaryKeyMustContainAtLeastOneColumn(errors.BadRequestError): - name: typing.Literal["ViewPrimaryKeyMustContainAtLeastOneColumn"] - parameters: ViewPrimaryKeyMustContainAtLeastOneColumnParameters - error_instance_id: str - - -class ViewPrimaryKeyRequiresBackingDatasetsParameters(typing_extensions.TypedDict): - """Cannot add a primary key to a View that does not have any backing datasets.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class ViewPrimaryKeyRequiresBackingDatasets(errors.BadRequestError): - name: typing.Literal["ViewPrimaryKeyRequiresBackingDatasets"] - parameters: ViewPrimaryKeyRequiresBackingDatasetsParameters - error_instance_id: str - - -__all__ = [ - "AbortTransactionPermissionDenied", - "AddBackingDatasetsPermissionDenied", - "AddPrimaryKeyPermissionDenied", - "BranchAlreadyExists", - "BranchNotFound", - "BuildTransactionPermissionDenied", - "ColumnTypesNotSupported", - "CommitTransactionPermissionDenied", - "CreateBranchPermissionDenied", - "CreateDatasetPermissionDenied", - "CreateTransactionPermissionDenied", - "CreateViewPermissionDenied", - "DatasetNotFound", - "DatasetReadNotSupported", - "DatasetViewNotFound", - "DeleteBranchPermissionDenied", - "DeleteFilePermissionDenied", - "DeleteSchemaPermissionDenied", - "FileAlreadyExists", - "FileNotFound", - "FileNotFoundOnBranch", - "FileNotFoundOnTransactionRange", - "GetBranchTransactionHistoryPermissionDenied", - "GetDatasetHealthChecksPermissionDenied", - "GetDatasetJobsPermissionDenied", - "GetDatasetSchedulesPermissionDenied", - "GetDatasetSchemaPermissionDenied", - "GetFileContentPermissionDenied", - "InputBackingDatasetNotInOutputViewProject", - "InvalidBranchName", - "InvalidTransactionType", - "InvalidViewBackingDataset", - "InvalidViewPrimaryKeyColumnType", - "InvalidViewPrimaryKeyDeletionColumn", - "JobTransactionPermissionDenied", - "NotAllColumnsInPrimaryKeyArePresent", - "OpenTransactionAlreadyExists", - "PutDatasetSchemaPermissionDenied", - "PutSchemaPermissionDenied", - "ReadTableDatasetPermissionDenied", - "ReadTableError", - "ReadTableRowLimitExceeded", - "ReadTableTimeout", - "RemoveBackingDatasetsPermissionDenied", - "ReplaceBackingDatasetsPermissionDenied", - "SchemaNotFound", - "TransactionNotCommitted", - "TransactionNotFound", - "TransactionNotOpen", - "UploadFilePermissionDenied", - "ViewDatasetCleanupFailed", - "ViewNotFound", - "ViewPrimaryKeyCannotBeModified", - "ViewPrimaryKeyDeletionColumnNotInDatasetSchema", - "ViewPrimaryKeyMustContainAtLeastOneColumn", - "ViewPrimaryKeyRequiresBackingDatasets", -] diff --git a/foundry_sdk/v2/datasets/file.py b/foundry_sdk/v2/datasets/file.py deleted file mode 100644 index c6e539d5d..000000000 --- a/foundry_sdk/v2/datasets/file.py +++ /dev/null @@ -1,1058 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing - -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v2.core import errors as core_errors -from foundry_sdk.v2.core import models as core_models -from foundry_sdk.v2.datasets import errors as datasets_errors -from foundry_sdk.v2.datasets import models as datasets_models - - -class FileClient: - """ - The API client for the File Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _FileClientStreaming(self) - self.with_raw_response = _FileClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def content( - self, - dataset_rid: datasets_models.DatasetRid, - file_path: core_models.FilePath, - *, - branch_name: typing.Optional[datasets_models.BranchName] = None, - end_transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, - start_transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> bytes: - """ - Gets the content of a File contained in a Dataset. By default this retrieves the file's content from the latest - view of the default branch - `master` for most enrollments. - #### Advanced Usage - See [Datasets Core Concepts](https://palantir.com/docs/foundry/data-integration/datasets/) for details on using branches and transactions. - To **get a file's content from a specific Branch** specify the Branch's name as `branchName`. This will - retrieve the content for the most recent version of the file since the latest snapshot transaction, or the - earliest ancestor transaction of the branch if there are no snapshot transactions. - To **get a file's content from the resolved view of a transaction** specify the Transaction's resource identifier - as `endTransactionRid`. This will retrieve the content for the most recent version of the file since the latest - snapshot transaction, or the earliest ancestor transaction if there are no snapshot transactions. - To **get a file's content from the resolved view of a range of transactions** specify the the start transaction's - resource identifier as `startTransactionRid` and the end transaction's resource identifier as `endTransactionRid`. - This will retrieve the content for the most recent version of the file since the `startTransactionRid` up to the - `endTransactionRid`. Note that an intermediate snapshot transaction will remove all files from the view. Behavior - is undefined when the start and end transactions do not belong to the same root-to-leaf path. - To **get a file's content from a specific transaction** specify the Transaction's resource identifier as both the - `startTransactionRid` and `endTransactionRid`. - - :param dataset_rid: - :type dataset_rid: DatasetRid - :param file_path: - :type file_path: FilePath - :param branch_name: The name of the Branch that contains the File. Defaults to `master` for most enrollments. - :type branch_name: Optional[BranchName] - :param end_transaction_rid: The Resource Identifier (RID) of the end Transaction. - :type end_transaction_rid: Optional[TransactionRid] - :param start_transaction_rid: The Resource Identifier (RID) of the start Transaction. - :type start_transaction_rid: Optional[TransactionRid] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: bytes - - :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. - :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. - :raises FileNotFoundOnBranch: The requested file could not be found on the given branch, or the client token does not have access to it. - :raises FileNotFoundOnTransactionRange: The requested file could not be found on the given transaction range, or the client token does not have access to it. - :raises GetFileContentPermissionDenied: Could not content the File. - :raises InvalidBranchName: The requested branch name cannot be used. Branch names cannot be empty and must not look like RIDs or UUIDs. - :raises InvalidParameterCombination: The given parameters are individually valid but cannot be used in the given combination. - :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/datasets/{datasetRid}/files/{filePath}/content", - query_params={ - "branchName": branch_name, - "endTransactionRid": end_transaction_rid, - "startTransactionRid": start_transaction_rid, - }, - path_params={ - "datasetRid": dataset_rid, - "filePath": file_path, - }, - header_params={ - "Accept": "application/octet-stream", - }, - body=None, - response_type=bytes, - request_timeout=request_timeout, - throwable_errors={ - "BranchNotFound": datasets_errors.BranchNotFound, - "DatasetNotFound": datasets_errors.DatasetNotFound, - "FileNotFoundOnBranch": datasets_errors.FileNotFoundOnBranch, - "FileNotFoundOnTransactionRange": datasets_errors.FileNotFoundOnTransactionRange, - "GetFileContentPermissionDenied": datasets_errors.GetFileContentPermissionDenied, - "InvalidBranchName": datasets_errors.InvalidBranchName, - "InvalidParameterCombination": core_errors.InvalidParameterCombination, - "TransactionNotFound": datasets_errors.TransactionNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def delete( - self, - dataset_rid: datasets_models.DatasetRid, - file_path: core_models.FilePath, - *, - branch_name: typing.Optional[datasets_models.BranchName] = None, - transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> None: - """ - Deletes a File from a Dataset. By default the file is deleted in a new transaction on the default - branch - `master` for most enrollments. The file will still be visible on historical views. - #### Advanced Usage - See [Datasets Core Concepts](https://palantir.com/docs/foundry/data-integration/datasets/) for details on using branches and transactions. - To **delete a File from a specific Branch** specify the Branch's name as `branchName`. A new delete Transaction - will be created and committed on this branch. - To **delete a File using a manually opened Transaction**, specify the Transaction's resource identifier - as `transactionRid`. The transaction must be of type `DELETE`. This is useful for deleting multiple files in a - single transaction. See [createTransaction](https://palantir.com/docs/foundry/api/datasets-resources/transactions/create-transaction/) to - open a transaction. - - :param dataset_rid: - :type dataset_rid: DatasetRid - :param file_path: - :type file_path: FilePath - :param branch_name: The name of the Branch on which to delete the File. Defaults to `master` for most enrollments. - :type branch_name: Optional[BranchName] - :param transaction_rid: The Resource Identifier (RID) of the open delete Transaction on which to delete the File. - :type transaction_rid: Optional[TransactionRid] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: None - - :raises AbortTransactionPermissionDenied: The provided token does not have permission to abort the given transaction on the given dataset. - :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. - :raises CommitTransactionPermissionDenied: The provided token does not have permission to commit the given transaction on the given dataset. - :raises CreateTransactionPermissionDenied: The provided token does not have permission to create a transaction on this dataset. - :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. - :raises DeleteFilePermissionDenied: Could not delete the File. - :raises FileNotFoundOnBranch: The requested file could not be found on the given branch, or the client token does not have access to it. - :raises FileNotFoundOnTransactionRange: The requested file could not be found on the given transaction range, or the client token does not have access to it. - :raises InvalidBranchName: The requested branch name cannot be used. Branch names cannot be empty and must not look like RIDs or UUIDs. - :raises InvalidParameterCombination: The given parameters are individually valid but cannot be used in the given combination. - :raises InvalidTransactionType: The given transaction type is not valid. Valid transaction types are `SNAPSHOT`, `UPDATE`, `APPEND`, and `DELETE`. - :raises OpenTransactionAlreadyExists: A transaction is already open on this dataset and branch. A branch of a dataset can only have one open transaction at a time. - :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. - :raises TransactionNotOpen: The given transaction is not open. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="DELETE", - resource_path="/v2/datasets/{datasetRid}/files/{filePath}", - query_params={ - "branchName": branch_name, - "transactionRid": transaction_rid, - }, - path_params={ - "datasetRid": dataset_rid, - "filePath": file_path, - }, - header_params={}, - body=None, - response_type=None, - request_timeout=request_timeout, - throwable_errors={ - "AbortTransactionPermissionDenied": datasets_errors.AbortTransactionPermissionDenied, - "BranchNotFound": datasets_errors.BranchNotFound, - "CommitTransactionPermissionDenied": datasets_errors.CommitTransactionPermissionDenied, - "CreateTransactionPermissionDenied": datasets_errors.CreateTransactionPermissionDenied, - "DatasetNotFound": datasets_errors.DatasetNotFound, - "DeleteFilePermissionDenied": datasets_errors.DeleteFilePermissionDenied, - "FileNotFoundOnBranch": datasets_errors.FileNotFoundOnBranch, - "FileNotFoundOnTransactionRange": datasets_errors.FileNotFoundOnTransactionRange, - "InvalidBranchName": datasets_errors.InvalidBranchName, - "InvalidParameterCombination": core_errors.InvalidParameterCombination, - "InvalidTransactionType": datasets_errors.InvalidTransactionType, - "OpenTransactionAlreadyExists": datasets_errors.OpenTransactionAlreadyExists, - "TransactionNotFound": datasets_errors.TransactionNotFound, - "TransactionNotOpen": datasets_errors.TransactionNotOpen, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - dataset_rid: datasets_models.DatasetRid, - file_path: core_models.FilePath, - *, - branch_name: typing.Optional[datasets_models.BranchName] = None, - end_transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, - start_transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> datasets_models.File: - """ - Gets metadata about a File contained in a Dataset. By default this retrieves the file's metadata from the latest - view of the default branch - `master` for most enrollments. - #### Advanced Usage - See [Datasets Core Concepts](https://palantir.com/docs/foundry/data-integration/datasets/) for details on using branches and transactions. - To **get a file's metadata from a specific Branch** specify the Branch's name as `branchName`. This will - retrieve metadata for the most recent version of the file since the latest snapshot transaction, or the earliest - ancestor transaction of the branch if there are no snapshot transactions. - To **get a file's metadata from the resolved view of a transaction** specify the Transaction's resource identifier - as `endTransactionRid`. This will retrieve metadata for the most recent version of the file since the latest snapshot - transaction, or the earliest ancestor transaction if there are no snapshot transactions. - To **get a file's metadata from the resolved view of a range of transactions** specify the the start transaction's - resource identifier as `startTransactionRid` and the end transaction's resource identifier as `endTransactionRid`. - This will retrieve metadata for the most recent version of the file since the `startTransactionRid` up to the - `endTransactionRid`. Behavior is undefined when the start and end transactions do not belong to the same root-to-leaf path. - To **get a file's metadata from a specific transaction** specify the Transaction's resource identifier as both the - `startTransactionRid` and `endTransactionRid`. - - :param dataset_rid: - :type dataset_rid: DatasetRid - :param file_path: - :type file_path: FilePath - :param branch_name: The name of the Branch that contains the File. Defaults to `master` for most enrollments. - :type branch_name: Optional[BranchName] - :param end_transaction_rid: The Resource Identifier (RID) of the end Transaction. - :type end_transaction_rid: Optional[TransactionRid] - :param start_transaction_rid: The Resource Identifier (RID) of the start Transaction. - :type start_transaction_rid: Optional[TransactionRid] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: datasets_models.File - - :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. - :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. - :raises FileNotFound: The given File could not be found. - :raises FileNotFoundOnBranch: The requested file could not be found on the given branch, or the client token does not have access to it. - :raises FileNotFoundOnTransactionRange: The requested file could not be found on the given transaction range, or the client token does not have access to it. - :raises InvalidBranchName: The requested branch name cannot be used. Branch names cannot be empty and must not look like RIDs or UUIDs. - :raises InvalidParameterCombination: The given parameters are individually valid but cannot be used in the given combination. - :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/datasets/{datasetRid}/files/{filePath}", - query_params={ - "branchName": branch_name, - "endTransactionRid": end_transaction_rid, - "startTransactionRid": start_transaction_rid, - }, - path_params={ - "datasetRid": dataset_rid, - "filePath": file_path, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=datasets_models.File, - request_timeout=request_timeout, - throwable_errors={ - "BranchNotFound": datasets_errors.BranchNotFound, - "DatasetNotFound": datasets_errors.DatasetNotFound, - "FileNotFound": datasets_errors.FileNotFound, - "FileNotFoundOnBranch": datasets_errors.FileNotFoundOnBranch, - "FileNotFoundOnTransactionRange": datasets_errors.FileNotFoundOnTransactionRange, - "InvalidBranchName": datasets_errors.InvalidBranchName, - "InvalidParameterCombination": core_errors.InvalidParameterCombination, - "TransactionNotFound": datasets_errors.TransactionNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def list( - self, - dataset_rid: datasets_models.DatasetRid, - *, - branch_name: typing.Optional[datasets_models.BranchName] = None, - end_transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - start_transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.ResourceIterator[datasets_models.File]: - """ - Lists Files contained in a Dataset. By default files are listed on the latest view of the default - branch - `master` for most enrollments. - #### Advanced Usage - See [Datasets Core Concepts](https://palantir.com/docs/foundry/data-integration/datasets/) for details on using branches and transactions. - To **list files on a specific Branch** specify the Branch's name as `branchName`. This will include the most - recent version of all files since the latest snapshot transaction, or the earliest ancestor transaction of the - branch if there are no snapshot transactions. - To **list files on the resolved view of a transaction** specify the Transaction's resource identifier - as `endTransactionRid`. This will include the most recent version of all files since the latest snapshot - transaction, or the earliest ancestor transaction if there are no snapshot transactions. - To **list files on the resolved view of a range of transactions** specify the the start transaction's resource - identifier as `startTransactionRid` and the end transaction's resource identifier as `endTransactionRid`. This - will include the most recent version of all files since the `startTransactionRid` up to the `endTransactionRid`. - Note that an intermediate snapshot transaction will remove all files from the view. Behavior is undefined when - the start and end transactions do not belong to the same root-to-leaf path. - To **list files on a specific transaction** specify the Transaction's resource identifier as both the - `startTransactionRid` and `endTransactionRid`. This will include only files that were modified as part of that - Transaction. - - :param dataset_rid: - :type dataset_rid: DatasetRid - :param branch_name: The name of the Branch on which to list Files. Defaults to `master` for most enrollments. - :type branch_name: Optional[BranchName] - :param end_transaction_rid: The Resource Identifier (RID) of the end Transaction. - :type end_transaction_rid: Optional[TransactionRid] - :param page_size: The page size to use for the endpoint. - :type page_size: Optional[PageSize] - :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. - :type page_token: Optional[PageToken] - :param start_transaction_rid: The Resource Identifier (RID) of the start Transaction. - :type start_transaction_rid: Optional[TransactionRid] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.ResourceIterator[datasets_models.File] - - :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. - :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. - :raises InvalidBranchName: The requested branch name cannot be used. Branch names cannot be empty and must not look like RIDs or UUIDs. - :raises InvalidPageSize: The provided page size was zero or negative. Page sizes must be greater than zero. - :raises InvalidParameterCombination: The given parameters are individually valid but cannot be used in the given combination. - :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/datasets/{datasetRid}/files", - query_params={ - "branchName": branch_name, - "endTransactionRid": end_transaction_rid, - "pageSize": page_size, - "pageToken": page_token, - "startTransactionRid": start_transaction_rid, - }, - path_params={ - "datasetRid": dataset_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=datasets_models.ListFilesResponse, - request_timeout=request_timeout, - throwable_errors={ - "BranchNotFound": datasets_errors.BranchNotFound, - "DatasetNotFound": datasets_errors.DatasetNotFound, - "InvalidBranchName": datasets_errors.InvalidBranchName, - "InvalidPageSize": core_errors.InvalidPageSize, - "InvalidParameterCombination": core_errors.InvalidParameterCombination, - "TransactionNotFound": datasets_errors.TransactionNotFound, - }, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def upload( - self, - dataset_rid: datasets_models.DatasetRid, - file_path: core_models.FilePath, - body: bytes, - *, - branch_name: typing.Optional[datasets_models.BranchName] = None, - transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, - transaction_type: typing.Optional[datasets_models.TransactionType] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> datasets_models.File: - """ - Uploads a File to an existing Dataset. - The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`. - By default the file is uploaded to a new transaction on the default branch - `master` for most enrollments. - If the file already exists only the most recent version will be visible in the updated view. - #### Advanced Usage - See [Datasets Core Concepts](https://palantir.com/docs/foundry/data-integration/datasets/) for details on using branches and transactions. - To **upload a file to a specific Branch** specify the Branch's name as `branchName`. A new transaction will - be created and committed on this branch. By default the TransactionType will be `UPDATE`, to override this - default specify `transactionType` in addition to `branchName`. - See [createBranch](https://palantir.com/docs/foundry/api/datasets-resources/branches/create-branch/) to create a custom branch. - To **upload a file on a manually opened transaction** specify the Transaction's resource identifier as - `transactionRid`. This is useful for uploading multiple files in a single transaction. - See [createTransaction](https://palantir.com/docs/foundry/api/datasets-resources/transactions/create-transaction/) to open a transaction. - - :param dataset_rid: - :type dataset_rid: DatasetRid - :param file_path: - :type file_path: FilePath - :param body: Body of the request - :type body: bytes - :param branch_name: The name of the Branch on which to upload the File. Defaults to `master` for most enrollments. - :type branch_name: Optional[BranchName] - :param transaction_rid: The Resource Identifier (RID) of the open Transaction on which to upload the File. - :type transaction_rid: Optional[TransactionRid] - :param transaction_type: The type of the Transaction to create when using branchName. Defaults to `UPDATE`. - :type transaction_type: Optional[TransactionType] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: datasets_models.File - - :raises AbortTransactionPermissionDenied: The provided token does not have permission to abort the given transaction on the given dataset. - :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. - :raises CommitTransactionPermissionDenied: The provided token does not have permission to commit the given transaction on the given dataset. - :raises CreateTransactionPermissionDenied: The provided token does not have permission to create a transaction on this dataset. - :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. - :raises FileAlreadyExists: The given file path already exists in the dataset and transaction. - :raises InvalidBranchName: The requested branch name cannot be used. Branch names cannot be empty and must not look like RIDs or UUIDs. - :raises InvalidFilePath: The provided file path is invalid. - :raises InvalidParameterCombination: The given parameters are individually valid but cannot be used in the given combination. - :raises OpenTransactionAlreadyExists: A transaction is already open on this dataset and branch. A branch of a dataset can only have one open transaction at a time. - :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. - :raises TransactionNotOpen: The given transaction is not open. - :raises UploadFilePermissionDenied: The provided token does not have permission to upload the given file to the given dataset and transaction. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/datasets/{datasetRid}/files/{filePath}/upload", - query_params={ - "branchName": branch_name, - "transactionRid": transaction_rid, - "transactionType": transaction_type, - }, - path_params={ - "datasetRid": dataset_rid, - "filePath": file_path, - }, - header_params={ - "Content-Type": "application/octet-stream", - "Accept": "application/json", - }, - body=body, - response_type=datasets_models.File, - request_timeout=request_timeout, - throwable_errors={ - "AbortTransactionPermissionDenied": datasets_errors.AbortTransactionPermissionDenied, - "BranchNotFound": datasets_errors.BranchNotFound, - "CommitTransactionPermissionDenied": datasets_errors.CommitTransactionPermissionDenied, - "CreateTransactionPermissionDenied": datasets_errors.CreateTransactionPermissionDenied, - "DatasetNotFound": datasets_errors.DatasetNotFound, - "FileAlreadyExists": datasets_errors.FileAlreadyExists, - "InvalidBranchName": datasets_errors.InvalidBranchName, - "InvalidFilePath": core_errors.InvalidFilePath, - "InvalidParameterCombination": core_errors.InvalidParameterCombination, - "OpenTransactionAlreadyExists": datasets_errors.OpenTransactionAlreadyExists, - "TransactionNotFound": datasets_errors.TransactionNotFound, - "TransactionNotOpen": datasets_errors.TransactionNotOpen, - "UploadFilePermissionDenied": datasets_errors.UploadFilePermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _FileClientRaw: - def __init__(self, client: FileClient) -> None: - def content(_: bytes): ... - def delete(_: None): ... - def get(_: datasets_models.File): ... - def list(_: datasets_models.ListFilesResponse): ... - def upload(_: datasets_models.File): ... - - self.content = core.with_raw_response(content, client.content) - self.delete = core.with_raw_response(delete, client.delete) - self.get = core.with_raw_response(get, client.get) - self.list = core.with_raw_response(list, client.list) - self.upload = core.with_raw_response(upload, client.upload) - - -class _FileClientStreaming: - def __init__(self, client: FileClient) -> None: - def content(_: bytes): ... - def get(_: datasets_models.File): ... - def list(_: datasets_models.ListFilesResponse): ... - def upload(_: datasets_models.File): ... - - self.content = core.with_streaming_response(content, client.content) - self.get = core.with_streaming_response(get, client.get) - self.list = core.with_streaming_response(list, client.list) - self.upload = core.with_streaming_response(upload, client.upload) - - -class AsyncFileClient: - """ - The API client for the File Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AsyncFileClientStreaming(self) - self.with_raw_response = _AsyncFileClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def content( - self, - dataset_rid: datasets_models.DatasetRid, - file_path: core_models.FilePath, - *, - branch_name: typing.Optional[datasets_models.BranchName] = None, - end_transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, - start_transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[bytes]: - """ - Gets the content of a File contained in a Dataset. By default this retrieves the file's content from the latest - view of the default branch - `master` for most enrollments. - #### Advanced Usage - See [Datasets Core Concepts](https://palantir.com/docs/foundry/data-integration/datasets/) for details on using branches and transactions. - To **get a file's content from a specific Branch** specify the Branch's name as `branchName`. This will - retrieve the content for the most recent version of the file since the latest snapshot transaction, or the - earliest ancestor transaction of the branch if there are no snapshot transactions. - To **get a file's content from the resolved view of a transaction** specify the Transaction's resource identifier - as `endTransactionRid`. This will retrieve the content for the most recent version of the file since the latest - snapshot transaction, or the earliest ancestor transaction if there are no snapshot transactions. - To **get a file's content from the resolved view of a range of transactions** specify the the start transaction's - resource identifier as `startTransactionRid` and the end transaction's resource identifier as `endTransactionRid`. - This will retrieve the content for the most recent version of the file since the `startTransactionRid` up to the - `endTransactionRid`. Note that an intermediate snapshot transaction will remove all files from the view. Behavior - is undefined when the start and end transactions do not belong to the same root-to-leaf path. - To **get a file's content from a specific transaction** specify the Transaction's resource identifier as both the - `startTransactionRid` and `endTransactionRid`. - - :param dataset_rid: - :type dataset_rid: DatasetRid - :param file_path: - :type file_path: FilePath - :param branch_name: The name of the Branch that contains the File. Defaults to `master` for most enrollments. - :type branch_name: Optional[BranchName] - :param end_transaction_rid: The Resource Identifier (RID) of the end Transaction. - :type end_transaction_rid: Optional[TransactionRid] - :param start_transaction_rid: The Resource Identifier (RID) of the start Transaction. - :type start_transaction_rid: Optional[TransactionRid] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[bytes] - - :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. - :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. - :raises FileNotFoundOnBranch: The requested file could not be found on the given branch, or the client token does not have access to it. - :raises FileNotFoundOnTransactionRange: The requested file could not be found on the given transaction range, or the client token does not have access to it. - :raises GetFileContentPermissionDenied: Could not content the File. - :raises InvalidBranchName: The requested branch name cannot be used. Branch names cannot be empty and must not look like RIDs or UUIDs. - :raises InvalidParameterCombination: The given parameters are individually valid but cannot be used in the given combination. - :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/datasets/{datasetRid}/files/{filePath}/content", - query_params={ - "branchName": branch_name, - "endTransactionRid": end_transaction_rid, - "startTransactionRid": start_transaction_rid, - }, - path_params={ - "datasetRid": dataset_rid, - "filePath": file_path, - }, - header_params={ - "Accept": "application/octet-stream", - }, - body=None, - response_type=bytes, - request_timeout=request_timeout, - throwable_errors={ - "BranchNotFound": datasets_errors.BranchNotFound, - "DatasetNotFound": datasets_errors.DatasetNotFound, - "FileNotFoundOnBranch": datasets_errors.FileNotFoundOnBranch, - "FileNotFoundOnTransactionRange": datasets_errors.FileNotFoundOnTransactionRange, - "GetFileContentPermissionDenied": datasets_errors.GetFileContentPermissionDenied, - "InvalidBranchName": datasets_errors.InvalidBranchName, - "InvalidParameterCombination": core_errors.InvalidParameterCombination, - "TransactionNotFound": datasets_errors.TransactionNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def delete( - self, - dataset_rid: datasets_models.DatasetRid, - file_path: core_models.FilePath, - *, - branch_name: typing.Optional[datasets_models.BranchName] = None, - transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[None]: - """ - Deletes a File from a Dataset. By default the file is deleted in a new transaction on the default - branch - `master` for most enrollments. The file will still be visible on historical views. - #### Advanced Usage - See [Datasets Core Concepts](https://palantir.com/docs/foundry/data-integration/datasets/) for details on using branches and transactions. - To **delete a File from a specific Branch** specify the Branch's name as `branchName`. A new delete Transaction - will be created and committed on this branch. - To **delete a File using a manually opened Transaction**, specify the Transaction's resource identifier - as `transactionRid`. The transaction must be of type `DELETE`. This is useful for deleting multiple files in a - single transaction. See [createTransaction](https://palantir.com/docs/foundry/api/datasets-resources/transactions/create-transaction/) to - open a transaction. - - :param dataset_rid: - :type dataset_rid: DatasetRid - :param file_path: - :type file_path: FilePath - :param branch_name: The name of the Branch on which to delete the File. Defaults to `master` for most enrollments. - :type branch_name: Optional[BranchName] - :param transaction_rid: The Resource Identifier (RID) of the open delete Transaction on which to delete the File. - :type transaction_rid: Optional[TransactionRid] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[None] - - :raises AbortTransactionPermissionDenied: The provided token does not have permission to abort the given transaction on the given dataset. - :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. - :raises CommitTransactionPermissionDenied: The provided token does not have permission to commit the given transaction on the given dataset. - :raises CreateTransactionPermissionDenied: The provided token does not have permission to create a transaction on this dataset. - :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. - :raises DeleteFilePermissionDenied: Could not delete the File. - :raises FileNotFoundOnBranch: The requested file could not be found on the given branch, or the client token does not have access to it. - :raises FileNotFoundOnTransactionRange: The requested file could not be found on the given transaction range, or the client token does not have access to it. - :raises InvalidBranchName: The requested branch name cannot be used. Branch names cannot be empty and must not look like RIDs or UUIDs. - :raises InvalidParameterCombination: The given parameters are individually valid but cannot be used in the given combination. - :raises InvalidTransactionType: The given transaction type is not valid. Valid transaction types are `SNAPSHOT`, `UPDATE`, `APPEND`, and `DELETE`. - :raises OpenTransactionAlreadyExists: A transaction is already open on this dataset and branch. A branch of a dataset can only have one open transaction at a time. - :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. - :raises TransactionNotOpen: The given transaction is not open. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="DELETE", - resource_path="/v2/datasets/{datasetRid}/files/{filePath}", - query_params={ - "branchName": branch_name, - "transactionRid": transaction_rid, - }, - path_params={ - "datasetRid": dataset_rid, - "filePath": file_path, - }, - header_params={}, - body=None, - response_type=None, - request_timeout=request_timeout, - throwable_errors={ - "AbortTransactionPermissionDenied": datasets_errors.AbortTransactionPermissionDenied, - "BranchNotFound": datasets_errors.BranchNotFound, - "CommitTransactionPermissionDenied": datasets_errors.CommitTransactionPermissionDenied, - "CreateTransactionPermissionDenied": datasets_errors.CreateTransactionPermissionDenied, - "DatasetNotFound": datasets_errors.DatasetNotFound, - "DeleteFilePermissionDenied": datasets_errors.DeleteFilePermissionDenied, - "FileNotFoundOnBranch": datasets_errors.FileNotFoundOnBranch, - "FileNotFoundOnTransactionRange": datasets_errors.FileNotFoundOnTransactionRange, - "InvalidBranchName": datasets_errors.InvalidBranchName, - "InvalidParameterCombination": core_errors.InvalidParameterCombination, - "InvalidTransactionType": datasets_errors.InvalidTransactionType, - "OpenTransactionAlreadyExists": datasets_errors.OpenTransactionAlreadyExists, - "TransactionNotFound": datasets_errors.TransactionNotFound, - "TransactionNotOpen": datasets_errors.TransactionNotOpen, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - dataset_rid: datasets_models.DatasetRid, - file_path: core_models.FilePath, - *, - branch_name: typing.Optional[datasets_models.BranchName] = None, - end_transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, - start_transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[datasets_models.File]: - """ - Gets metadata about a File contained in a Dataset. By default this retrieves the file's metadata from the latest - view of the default branch - `master` for most enrollments. - #### Advanced Usage - See [Datasets Core Concepts](https://palantir.com/docs/foundry/data-integration/datasets/) for details on using branches and transactions. - To **get a file's metadata from a specific Branch** specify the Branch's name as `branchName`. This will - retrieve metadata for the most recent version of the file since the latest snapshot transaction, or the earliest - ancestor transaction of the branch if there are no snapshot transactions. - To **get a file's metadata from the resolved view of a transaction** specify the Transaction's resource identifier - as `endTransactionRid`. This will retrieve metadata for the most recent version of the file since the latest snapshot - transaction, or the earliest ancestor transaction if there are no snapshot transactions. - To **get a file's metadata from the resolved view of a range of transactions** specify the the start transaction's - resource identifier as `startTransactionRid` and the end transaction's resource identifier as `endTransactionRid`. - This will retrieve metadata for the most recent version of the file since the `startTransactionRid` up to the - `endTransactionRid`. Behavior is undefined when the start and end transactions do not belong to the same root-to-leaf path. - To **get a file's metadata from a specific transaction** specify the Transaction's resource identifier as both the - `startTransactionRid` and `endTransactionRid`. - - :param dataset_rid: - :type dataset_rid: DatasetRid - :param file_path: - :type file_path: FilePath - :param branch_name: The name of the Branch that contains the File. Defaults to `master` for most enrollments. - :type branch_name: Optional[BranchName] - :param end_transaction_rid: The Resource Identifier (RID) of the end Transaction. - :type end_transaction_rid: Optional[TransactionRid] - :param start_transaction_rid: The Resource Identifier (RID) of the start Transaction. - :type start_transaction_rid: Optional[TransactionRid] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[datasets_models.File] - - :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. - :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. - :raises FileNotFound: The given File could not be found. - :raises FileNotFoundOnBranch: The requested file could not be found on the given branch, or the client token does not have access to it. - :raises FileNotFoundOnTransactionRange: The requested file could not be found on the given transaction range, or the client token does not have access to it. - :raises InvalidBranchName: The requested branch name cannot be used. Branch names cannot be empty and must not look like RIDs or UUIDs. - :raises InvalidParameterCombination: The given parameters are individually valid but cannot be used in the given combination. - :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/datasets/{datasetRid}/files/{filePath}", - query_params={ - "branchName": branch_name, - "endTransactionRid": end_transaction_rid, - "startTransactionRid": start_transaction_rid, - }, - path_params={ - "datasetRid": dataset_rid, - "filePath": file_path, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=datasets_models.File, - request_timeout=request_timeout, - throwable_errors={ - "BranchNotFound": datasets_errors.BranchNotFound, - "DatasetNotFound": datasets_errors.DatasetNotFound, - "FileNotFound": datasets_errors.FileNotFound, - "FileNotFoundOnBranch": datasets_errors.FileNotFoundOnBranch, - "FileNotFoundOnTransactionRange": datasets_errors.FileNotFoundOnTransactionRange, - "InvalidBranchName": datasets_errors.InvalidBranchName, - "InvalidParameterCombination": core_errors.InvalidParameterCombination, - "TransactionNotFound": datasets_errors.TransactionNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def list( - self, - dataset_rid: datasets_models.DatasetRid, - *, - branch_name: typing.Optional[datasets_models.BranchName] = None, - end_transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - start_transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.AsyncResourceIterator[datasets_models.File]: - """ - Lists Files contained in a Dataset. By default files are listed on the latest view of the default - branch - `master` for most enrollments. - #### Advanced Usage - See [Datasets Core Concepts](https://palantir.com/docs/foundry/data-integration/datasets/) for details on using branches and transactions. - To **list files on a specific Branch** specify the Branch's name as `branchName`. This will include the most - recent version of all files since the latest snapshot transaction, or the earliest ancestor transaction of the - branch if there are no snapshot transactions. - To **list files on the resolved view of a transaction** specify the Transaction's resource identifier - as `endTransactionRid`. This will include the most recent version of all files since the latest snapshot - transaction, or the earliest ancestor transaction if there are no snapshot transactions. - To **list files on the resolved view of a range of transactions** specify the the start transaction's resource - identifier as `startTransactionRid` and the end transaction's resource identifier as `endTransactionRid`. This - will include the most recent version of all files since the `startTransactionRid` up to the `endTransactionRid`. - Note that an intermediate snapshot transaction will remove all files from the view. Behavior is undefined when - the start and end transactions do not belong to the same root-to-leaf path. - To **list files on a specific transaction** specify the Transaction's resource identifier as both the - `startTransactionRid` and `endTransactionRid`. This will include only files that were modified as part of that - Transaction. - - :param dataset_rid: - :type dataset_rid: DatasetRid - :param branch_name: The name of the Branch on which to list Files. Defaults to `master` for most enrollments. - :type branch_name: Optional[BranchName] - :param end_transaction_rid: The Resource Identifier (RID) of the end Transaction. - :type end_transaction_rid: Optional[TransactionRid] - :param page_size: The page size to use for the endpoint. - :type page_size: Optional[PageSize] - :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. - :type page_token: Optional[PageToken] - :param start_transaction_rid: The Resource Identifier (RID) of the start Transaction. - :type start_transaction_rid: Optional[TransactionRid] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.AsyncResourceIterator[datasets_models.File] - - :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. - :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. - :raises InvalidBranchName: The requested branch name cannot be used. Branch names cannot be empty and must not look like RIDs or UUIDs. - :raises InvalidPageSize: The provided page size was zero or negative. Page sizes must be greater than zero. - :raises InvalidParameterCombination: The given parameters are individually valid but cannot be used in the given combination. - :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/datasets/{datasetRid}/files", - query_params={ - "branchName": branch_name, - "endTransactionRid": end_transaction_rid, - "pageSize": page_size, - "pageToken": page_token, - "startTransactionRid": start_transaction_rid, - }, - path_params={ - "datasetRid": dataset_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=datasets_models.ListFilesResponse, - request_timeout=request_timeout, - throwable_errors={ - "BranchNotFound": datasets_errors.BranchNotFound, - "DatasetNotFound": datasets_errors.DatasetNotFound, - "InvalidBranchName": datasets_errors.InvalidBranchName, - "InvalidPageSize": core_errors.InvalidPageSize, - "InvalidParameterCombination": core_errors.InvalidParameterCombination, - "TransactionNotFound": datasets_errors.TransactionNotFound, - }, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def upload( - self, - dataset_rid: datasets_models.DatasetRid, - file_path: core_models.FilePath, - body: bytes, - *, - branch_name: typing.Optional[datasets_models.BranchName] = None, - transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, - transaction_type: typing.Optional[datasets_models.TransactionType] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[datasets_models.File]: - """ - Uploads a File to an existing Dataset. - The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`. - By default the file is uploaded to a new transaction on the default branch - `master` for most enrollments. - If the file already exists only the most recent version will be visible in the updated view. - #### Advanced Usage - See [Datasets Core Concepts](https://palantir.com/docs/foundry/data-integration/datasets/) for details on using branches and transactions. - To **upload a file to a specific Branch** specify the Branch's name as `branchName`. A new transaction will - be created and committed on this branch. By default the TransactionType will be `UPDATE`, to override this - default specify `transactionType` in addition to `branchName`. - See [createBranch](https://palantir.com/docs/foundry/api/datasets-resources/branches/create-branch/) to create a custom branch. - To **upload a file on a manually opened transaction** specify the Transaction's resource identifier as - `transactionRid`. This is useful for uploading multiple files in a single transaction. - See [createTransaction](https://palantir.com/docs/foundry/api/datasets-resources/transactions/create-transaction/) to open a transaction. - - :param dataset_rid: - :type dataset_rid: DatasetRid - :param file_path: - :type file_path: FilePath - :param body: Body of the request - :type body: bytes - :param branch_name: The name of the Branch on which to upload the File. Defaults to `master` for most enrollments. - :type branch_name: Optional[BranchName] - :param transaction_rid: The Resource Identifier (RID) of the open Transaction on which to upload the File. - :type transaction_rid: Optional[TransactionRid] - :param transaction_type: The type of the Transaction to create when using branchName. Defaults to `UPDATE`. - :type transaction_type: Optional[TransactionType] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[datasets_models.File] - - :raises AbortTransactionPermissionDenied: The provided token does not have permission to abort the given transaction on the given dataset. - :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. - :raises CommitTransactionPermissionDenied: The provided token does not have permission to commit the given transaction on the given dataset. - :raises CreateTransactionPermissionDenied: The provided token does not have permission to create a transaction on this dataset. - :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. - :raises FileAlreadyExists: The given file path already exists in the dataset and transaction. - :raises InvalidBranchName: The requested branch name cannot be used. Branch names cannot be empty and must not look like RIDs or UUIDs. - :raises InvalidFilePath: The provided file path is invalid. - :raises InvalidParameterCombination: The given parameters are individually valid but cannot be used in the given combination. - :raises OpenTransactionAlreadyExists: A transaction is already open on this dataset and branch. A branch of a dataset can only have one open transaction at a time. - :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. - :raises TransactionNotOpen: The given transaction is not open. - :raises UploadFilePermissionDenied: The provided token does not have permission to upload the given file to the given dataset and transaction. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/datasets/{datasetRid}/files/{filePath}/upload", - query_params={ - "branchName": branch_name, - "transactionRid": transaction_rid, - "transactionType": transaction_type, - }, - path_params={ - "datasetRid": dataset_rid, - "filePath": file_path, - }, - header_params={ - "Content-Type": "application/octet-stream", - "Accept": "application/json", - }, - body=body, - response_type=datasets_models.File, - request_timeout=request_timeout, - throwable_errors={ - "AbortTransactionPermissionDenied": datasets_errors.AbortTransactionPermissionDenied, - "BranchNotFound": datasets_errors.BranchNotFound, - "CommitTransactionPermissionDenied": datasets_errors.CommitTransactionPermissionDenied, - "CreateTransactionPermissionDenied": datasets_errors.CreateTransactionPermissionDenied, - "DatasetNotFound": datasets_errors.DatasetNotFound, - "FileAlreadyExists": datasets_errors.FileAlreadyExists, - "InvalidBranchName": datasets_errors.InvalidBranchName, - "InvalidFilePath": core_errors.InvalidFilePath, - "InvalidParameterCombination": core_errors.InvalidParameterCombination, - "OpenTransactionAlreadyExists": datasets_errors.OpenTransactionAlreadyExists, - "TransactionNotFound": datasets_errors.TransactionNotFound, - "TransactionNotOpen": datasets_errors.TransactionNotOpen, - "UploadFilePermissionDenied": datasets_errors.UploadFilePermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _AsyncFileClientRaw: - def __init__(self, client: AsyncFileClient) -> None: - def content(_: bytes): ... - def delete(_: None): ... - def get(_: datasets_models.File): ... - def list(_: datasets_models.ListFilesResponse): ... - def upload(_: datasets_models.File): ... - - self.content = core.async_with_raw_response(content, client.content) - self.delete = core.async_with_raw_response(delete, client.delete) - self.get = core.async_with_raw_response(get, client.get) - self.list = core.async_with_raw_response(list, client.list) - self.upload = core.async_with_raw_response(upload, client.upload) - - -class _AsyncFileClientStreaming: - def __init__(self, client: AsyncFileClient) -> None: - def content(_: bytes): ... - def get(_: datasets_models.File): ... - def list(_: datasets_models.ListFilesResponse): ... - def upload(_: datasets_models.File): ... - - self.content = core.async_with_streaming_response(content, client.content) - self.get = core.async_with_streaming_response(get, client.get) - self.list = core.async_with_streaming_response(list, client.list) - self.upload = core.async_with_streaming_response(upload, client.upload) diff --git a/foundry_sdk/v2/datasets/models.py b/foundry_sdk/v2/datasets/models.py deleted file mode 100644 index b16747c73..000000000 --- a/foundry_sdk/v2/datasets/models.py +++ /dev/null @@ -1,466 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -from __future__ import annotations - -import typing - -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk.v2.core import models as core_models -from foundry_sdk.v2.filesystem import models as filesystem_models - - -class AddBackingDatasetsRequest(core.ModelBase): - """AddBackingDatasetsRequest""" - - branch: typing.Optional[BranchName] = None - backing_datasets: typing.List[ViewBackingDataset] = pydantic.Field(alias=str("backingDatasets")) # type: ignore[literal-required] - - -class AddPrimaryKeyRequest(core.ModelBase): - """AddPrimaryKeyRequest""" - - branch: typing.Optional[BranchName] = None - primary_key: ViewPrimaryKey = pydantic.Field(alias=str("primaryKey")) # type: ignore[literal-required] - - -class Branch(core.ModelBase): - """Branch""" - - name: BranchName - transaction_rid: typing.Optional[TransactionRid] = pydantic.Field(alias=str("transactionRid"), default=None) # type: ignore[literal-required] - """The most recent OPEN or COMMITTED transaction on the branch. This will never be an ABORTED transaction.""" - - -BranchName = str -"""The name of a Branch.""" - - -class CreateBranchRequest(core.ModelBase): - """CreateBranchRequest""" - - transaction_rid: typing.Optional[TransactionRid] = pydantic.Field(alias=str("transactionRid"), default=None) # type: ignore[literal-required] - """The most recent OPEN or COMMITTED transaction on the branch. This will never be an ABORTED transaction.""" - - name: BranchName - - -class CreateDatasetRequest(core.ModelBase): - """CreateDatasetRequest""" - - parent_folder_rid: filesystem_models.FolderRid = pydantic.Field(alias=str("parentFolderRid")) # type: ignore[literal-required] - name: DatasetName - - -class CreateTransactionRequest(core.ModelBase): - """CreateTransactionRequest""" - - transaction_type: TransactionType = pydantic.Field(alias=str("transactionType")) # type: ignore[literal-required] - - -class CreateViewRequest(core.ModelBase): - """CreateViewRequest""" - - parent_folder_rid: filesystem_models.FolderRid = pydantic.Field(alias=str("parentFolderRid")) # type: ignore[literal-required] - view_name: DatasetName = pydantic.Field(alias=str("viewName")) # type: ignore[literal-required] - backing_datasets: typing.List[ViewBackingDataset] = pydantic.Field(alias=str("backingDatasets")) # type: ignore[literal-required] - branch: typing.Optional[BranchName] = None - """The branch name of the View. If not specified, defaults to `master` for most enrollments.""" - - primary_key: typing.Optional[ViewPrimaryKey] = pydantic.Field(alias=str("primaryKey"), default=None) # type: ignore[literal-required] - - -DataframeReader = typing.Literal["AVRO", "CSV", "PARQUET", "DATASOURCE"] -"""The dataframe reader used for reading the dataset schema.""" - - -class Dataset(core.ModelBase): - """Dataset""" - - rid: DatasetRid - name: DatasetName - parent_folder_rid: filesystem_models.FolderRid = pydantic.Field(alias=str("parentFolderRid")) # type: ignore[literal-required] - - -DatasetName = str -"""DatasetName""" - - -DatasetRid = core.RID -"""The Resource Identifier (RID) of a Dataset.""" - - -class File(core.ModelBase): - """File""" - - path: core_models.FilePath - transaction_rid: TransactionRid = pydantic.Field(alias=str("transactionRid")) # type: ignore[literal-required] - size_bytes: typing.Optional[core.Long] = pydantic.Field(alias=str("sizeBytes"), default=None) # type: ignore[literal-required] - updated_time: FileUpdatedTime = pydantic.Field(alias=str("updatedTime")) # type: ignore[literal-required] - - -FileUpdatedTime = core.AwareDatetime -"""FileUpdatedTime""" - - -class GetDatasetJobsAndFilter(core.ModelBase): - """GetDatasetJobsAndFilter""" - - items: typing.List[GetDatasetJobsQuery] - type: typing.Literal["and"] = "and" - - -GetDatasetJobsComparisonType = typing.Literal["GTE", "LT"] -"""GetDatasetJobsComparisonType""" - - -class GetDatasetJobsOrFilter(core.ModelBase): - """GetDatasetJobsOrFilter""" - - items: typing.List[GetDatasetJobsQuery] - type: typing.Literal["or"] = "or" - - -GetDatasetJobsQuery = typing_extensions.Annotated[ - typing.Union["GetDatasetJobsOrFilter", "GetDatasetJobsAndFilter", "GetDatasetJobsTimeFilter"], - pydantic.Field(discriminator="type"), -] -"""Query for getting jobs on given dataset.""" - - -class GetDatasetJobsRequest(core.ModelBase): - """GetDatasetJobsRequest""" - - where: typing.Optional[GetDatasetJobsQuery] = None - order_by: typing.List[GetDatasetJobsSort] = pydantic.Field(alias=str("orderBy")) # type: ignore[literal-required] - - -class GetDatasetJobsSort(core.ModelBase): - """GetDatasetJobsSort""" - - sort_type: GetDatasetJobsSortType = pydantic.Field(alias=str("sortType")) # type: ignore[literal-required] - sort_direction: GetDatasetJobsSortDirection = pydantic.Field(alias=str("sortDirection")) # type: ignore[literal-required] - - -GetDatasetJobsSortDirection = typing.Literal["ASCENDING", "DESCENDING"] -"""GetDatasetJobsSortDirection""" - - -GetDatasetJobsSortType = typing.Literal["BY_STARTED_TIME", "BY_FINISHED_TIME"] -"""GetDatasetJobsSortType""" - - -class GetDatasetJobsTimeFilter(core.ModelBase): - """GetDatasetJobsTimeFilter""" - - field: GetDatasetJobsTimeFilterField - comparison_type: GetDatasetJobsComparisonType = pydantic.Field(alias=str("comparisonType")) # type: ignore[literal-required] - value: core.AwareDatetime - type: typing.Literal["timeFilter"] = "timeFilter" - - -GetDatasetJobsTimeFilterField = typing.Literal["SUBMITTED_TIME", "FINISHED_TIME"] -"""GetDatasetJobsTimeFilterField""" - - -class GetDatasetSchemaResponse(core.ModelBase): - """GetDatasetSchemaResponse""" - - branch_name: BranchName = pydantic.Field(alias=str("branchName")) # type: ignore[literal-required] - end_transaction_rid: TransactionRid = pydantic.Field(alias=str("endTransactionRid")) # type: ignore[literal-required] - schema_: core_models.DatasetSchema = pydantic.Field(alias=str("schema")) # type: ignore[literal-required] - version_id: core_models.VersionId = pydantic.Field(alias=str("versionId")) # type: ignore[literal-required] - - -class GetJobResponse(core.ModelBase): - """GetJobResponse""" - - data: typing.List[JobDetails] - next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] - - -class GetSchemaDatasetsBatchRequestElement(core.ModelBase): - """GetSchemaDatasetsBatchRequestElement""" - - end_transaction_rid: typing.Optional[TransactionRid] = pydantic.Field(alias=str("endTransactionRid"), default=None) # type: ignore[literal-required] - """The Resource Identifier (RID) of the end Transaction. If a user does not provide a value, the RID of the latest committed transaction will be used.""" - - dataset_rid: DatasetRid = pydantic.Field(alias=str("datasetRid")) # type: ignore[literal-required] - version_id: typing.Optional[core_models.VersionId] = pydantic.Field(alias=str("versionId"), default=None) # type: ignore[literal-required] - """The schema version that should be used. If none is provided, the latest version will be used.""" - - branch_name: typing.Optional[BranchName] = pydantic.Field(alias=str("branchName"), default=None) # type: ignore[literal-required] - - -class GetSchemaDatasetsBatchResponse(core.ModelBase): - """GetSchemaDatasetsBatchResponse""" - - data: typing.Dict[DatasetRid, GetDatasetSchemaResponse] - - -class JobDetails(core.ModelBase): - """JobDetails""" - - job_rid: core_models.JobRid = pydantic.Field(alias=str("jobRid")) # type: ignore[literal-required] - - -class ListBranchesResponse(core.ModelBase): - """ListBranchesResponse""" - - data: typing.List[Branch] - next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] - - -class ListFilesResponse(core.ModelBase): - """ListFilesResponse""" - - data: typing.List[File] - next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] - - -class ListHealthChecksResponse(core.ModelBase): - """ListHealthChecksResponse""" - - data: typing.List[core_models.CheckRid] - - -class ListSchedulesResponse(core.ModelBase): - """ListSchedulesResponse""" - - data: typing.List[core_models.ScheduleRid] - next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] - - -class ListTransactionsOfDatasetResponse(core.ModelBase): - """ListTransactionsOfDatasetResponse""" - - data: typing.List[Transaction] - next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] - - -class ListTransactionsResponse(core.ModelBase): - """ListTransactionsResponse""" - - data: typing.List[Transaction] - next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] - - -class PrimaryKeyLatestWinsResolutionStrategy(core.ModelBase): - """Picks the row with the highest value of a list of columns, compared in order.""" - - columns: typing.List[str] - type: typing.Literal["latestWins"] = "latestWins" - - -class PrimaryKeyResolutionDuplicate(core.ModelBase): - """Duplicate primary key values may exist within the dataset – resolution required.""" - - deletion_column: typing.Optional[str] = pydantic.Field(alias=str("deletionColumn"), default=None) # type: ignore[literal-required] - """ - The name of the boolean column that indicates whether a row should be considered deleted. Based on the - `resolutionStrategy`, if the final row selected for a given primary key has `true` in this column, that - row will be excluded from the results. Otherwise, it will be included. - """ - - resolution_strategy: PrimaryKeyResolutionStrategy = pydantic.Field(alias=str("resolutionStrategy")) # type: ignore[literal-required] - type: typing.Literal["duplicate"] = "duplicate" - - -class PrimaryKeyResolutionUnique(core.ModelBase): - """Primary key values are unique within the dataset – no conflicts.""" - - type: typing.Literal["unique"] = "unique" - - -class PutDatasetSchemaRequest(core.ModelBase): - """PutDatasetSchemaRequest""" - - branch_name: typing.Optional[BranchName] = pydantic.Field(alias=str("branchName"), default=None) # type: ignore[literal-required] - dataframe_reader: typing.Optional[DataframeReader] = pydantic.Field(alias=str("dataframeReader"), default=None) # type: ignore[literal-required] - """The dataframe reader used for reading the dataset schema. Defaults to PARQUET.""" - - end_transaction_rid: typing.Optional[TransactionRid] = pydantic.Field(alias=str("endTransactionRid"), default=None) # type: ignore[literal-required] - """The Resource Identifier (RID) of the end Transaction.""" - - schema_: core_models.DatasetSchema = pydantic.Field(alias=str("schema")) # type: ignore[literal-required] - """The schema that will be added.""" - - -class RemoveBackingDatasetsRequest(core.ModelBase): - """RemoveBackingDatasetsRequest""" - - branch: typing.Optional[BranchName] = None - backing_datasets: typing.List[ViewBackingDataset] = pydantic.Field(alias=str("backingDatasets")) # type: ignore[literal-required] - - -class ReplaceBackingDatasetsRequest(core.ModelBase): - """ReplaceBackingDatasetsRequest""" - - branch: typing.Optional[BranchName] = None - backing_datasets: typing.List[ViewBackingDataset] = pydantic.Field(alias=str("backingDatasets")) # type: ignore[literal-required] - - -TableExportFormat = typing.Literal["ARROW", "CSV"] -"""Format for tabular dataset export.""" - - -class Transaction(core.ModelBase): - """Transaction""" - - rid: TransactionRid - transaction_type: TransactionType = pydantic.Field(alias=str("transactionType")) # type: ignore[literal-required] - status: TransactionStatus - created_time: TransactionCreatedTime = pydantic.Field(alias=str("createdTime")) # type: ignore[literal-required] - """The timestamp when the transaction was created, in ISO 8601 timestamp format.""" - - closed_time: typing.Optional[core.AwareDatetime] = pydantic.Field(alias=str("closedTime"), default=None) # type: ignore[literal-required] - """The timestamp when the transaction was closed, in ISO 8601 timestamp format.""" - - -TransactionCreatedTime = core.AwareDatetime -"""The timestamp when the transaction was created, in ISO 8601 timestamp format.""" - - -TransactionRid = core.RID -"""The Resource Identifier (RID) of a Transaction.""" - - -TransactionStatus = typing.Literal["ABORTED", "COMMITTED", "OPEN"] -"""The status of a Transaction.""" - - -TransactionType = typing.Literal["APPEND", "UPDATE", "SNAPSHOT", "DELETE"] -"""The type of a Transaction.""" - - -class View(core.ModelBase): - """View""" - - view_name: DatasetName = pydantic.Field(alias=str("viewName")) # type: ignore[literal-required] - dataset_rid: DatasetRid = pydantic.Field(alias=str("datasetRid")) # type: ignore[literal-required] - """The rid of the View.""" - - parent_folder_rid: filesystem_models.FolderRid = pydantic.Field(alias=str("parentFolderRid")) # type: ignore[literal-required] - branch: typing.Optional[BranchName] = None - """The branch name of the View. If not specified, defaults to `master` for most enrollments.""" - - backing_datasets: typing.List[ViewBackingDataset] = pydantic.Field(alias=str("backingDatasets")) # type: ignore[literal-required] - primary_key: typing.Optional[ViewPrimaryKey] = pydantic.Field(alias=str("primaryKey"), default=None) # type: ignore[literal-required] - - -class ViewBackingDataset(core.ModelBase): - """One of the Datasets backing a View.""" - - branch: BranchName - dataset_rid: DatasetRid = pydantic.Field(alias=str("datasetRid")) # type: ignore[literal-required] - - -class ViewPrimaryKey(core.ModelBase): - """ - The primary key of the dataset. Primary keys are treated as guarantees provided by the creator of the - dataset. - """ - - columns: typing.List[str] - """ - The columns that constitute the primary key. These columns must satisfy the following constraints: - - The list of columns must be non-empty. - - The list must not contain duplicate columns after applying column normalization. - - Each referenced column must exist in the schema. - - The type of each referenced column must be one of the following: `BYTE`, `SHORT`, `DECIMAL`, `INTEGER`, - `LONG`, `STRING`, `BOOLEAN`, `TIMESTAMP` or `DATE`. - """ - - resolution: ViewPrimaryKeyResolution - """ - The semantics of the primary key within the dataset. For example, the unique resolution means that every - row in the dataset has a distinct primary key. The value of this field represents a contract for writers - of the dataset. Writers are responsible for maintaining any related invariants, and readers may make - optimizations based on this. Violating the assumptions of the resolution can cause undefined behavior, - for example, having duplicate primary keys with the unique resolution. - """ - - -ViewPrimaryKeyResolution = typing_extensions.Annotated[ - typing.Union["PrimaryKeyResolutionUnique", "PrimaryKeyResolutionDuplicate"], - pydantic.Field(discriminator="type"), -] -"""Specifies how primary key conflicts are resolved within the view.""" - - -PrimaryKeyResolutionStrategy = PrimaryKeyLatestWinsResolutionStrategy -"""PrimaryKeyResolutionStrategy""" - - -core.resolve_forward_references(GetDatasetJobsQuery, globalns=globals(), localns=locals()) -core.resolve_forward_references(ViewPrimaryKeyResolution, globalns=globals(), localns=locals()) - -__all__ = [ - "AddBackingDatasetsRequest", - "AddPrimaryKeyRequest", - "Branch", - "BranchName", - "CreateBranchRequest", - "CreateDatasetRequest", - "CreateTransactionRequest", - "CreateViewRequest", - "DataframeReader", - "Dataset", - "DatasetName", - "DatasetRid", - "File", - "FileUpdatedTime", - "GetDatasetJobsAndFilter", - "GetDatasetJobsComparisonType", - "GetDatasetJobsOrFilter", - "GetDatasetJobsQuery", - "GetDatasetJobsRequest", - "GetDatasetJobsSort", - "GetDatasetJobsSortDirection", - "GetDatasetJobsSortType", - "GetDatasetJobsTimeFilter", - "GetDatasetJobsTimeFilterField", - "GetDatasetSchemaResponse", - "GetJobResponse", - "GetSchemaDatasetsBatchRequestElement", - "GetSchemaDatasetsBatchResponse", - "JobDetails", - "ListBranchesResponse", - "ListFilesResponse", - "ListHealthChecksResponse", - "ListSchedulesResponse", - "ListTransactionsOfDatasetResponse", - "ListTransactionsResponse", - "PrimaryKeyLatestWinsResolutionStrategy", - "PrimaryKeyResolutionDuplicate", - "PrimaryKeyResolutionStrategy", - "PrimaryKeyResolutionUnique", - "PutDatasetSchemaRequest", - "RemoveBackingDatasetsRequest", - "ReplaceBackingDatasetsRequest", - "TableExportFormat", - "Transaction", - "TransactionCreatedTime", - "TransactionRid", - "TransactionStatus", - "TransactionType", - "View", - "ViewBackingDataset", - "ViewPrimaryKey", - "ViewPrimaryKeyResolution", -] diff --git a/foundry_sdk/v2/datasets/transaction.py b/foundry_sdk/v2/datasets/transaction.py deleted file mode 100644 index d10d6a640..000000000 --- a/foundry_sdk/v2/datasets/transaction.py +++ /dev/null @@ -1,823 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing - -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v2.core import models as core_models -from foundry_sdk.v2.datasets import errors as datasets_errors -from foundry_sdk.v2.datasets import models as datasets_models - - -class TransactionClient: - """ - The API client for the Transaction Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _TransactionClientStreaming(self) - self.with_raw_response = _TransactionClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def abort( - self, - dataset_rid: datasets_models.DatasetRid, - transaction_rid: datasets_models.TransactionRid, - *, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> datasets_models.Transaction: - """ - Aborts an open Transaction. File modifications made on this Transaction are not preserved and the Branch is - not updated. - - :param dataset_rid: - :type dataset_rid: DatasetRid - :param transaction_rid: - :type transaction_rid: TransactionRid - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: datasets_models.Transaction - - :raises AbortTransactionPermissionDenied: The provided token does not have permission to abort the given transaction on the given dataset. - :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. - :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. - :raises TransactionNotOpen: The given transaction is not open. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/datasets/{datasetRid}/transactions/{transactionRid}/abort", - query_params={}, - path_params={ - "datasetRid": dataset_rid, - "transactionRid": transaction_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=datasets_models.Transaction, - request_timeout=request_timeout, - throwable_errors={ - "AbortTransactionPermissionDenied": datasets_errors.AbortTransactionPermissionDenied, - "DatasetNotFound": datasets_errors.DatasetNotFound, - "TransactionNotFound": datasets_errors.TransactionNotFound, - "TransactionNotOpen": datasets_errors.TransactionNotOpen, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def build( - self, - dataset_rid: datasets_models.DatasetRid, - transaction_rid: datasets_models.TransactionRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Optional[core_models.BuildRid]: - """ - Get the [Build](https://palantir.com/docs/foundry/data-integration/builds#builds) that computed the - given Transaction. Not all Transactions have an associated Build. For example, if a Dataset - is updated by a User uploading a CSV file into the browser, no Build will be tied to the Transaction. - - :param dataset_rid: - :type dataset_rid: DatasetRid - :param transaction_rid: - :type transaction_rid: TransactionRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Optional[core_models.BuildRid] - - :raises BuildTransactionPermissionDenied: Could not build the Transaction. - :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. - :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/datasets/{datasetRid}/transactions/{transactionRid}/build", - query_params={ - "preview": preview, - }, - path_params={ - "datasetRid": dataset_rid, - "transactionRid": transaction_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=typing.Optional[core_models.BuildRid], - request_timeout=request_timeout, - throwable_errors={ - "BuildTransactionPermissionDenied": datasets_errors.BuildTransactionPermissionDenied, - "DatasetNotFound": datasets_errors.DatasetNotFound, - "TransactionNotFound": datasets_errors.TransactionNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def commit( - self, - dataset_rid: datasets_models.DatasetRid, - transaction_rid: datasets_models.TransactionRid, - *, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> datasets_models.Transaction: - """ - Commits an open Transaction. File modifications made on this Transaction are preserved and the Branch is - updated to point to the Transaction. - - :param dataset_rid: - :type dataset_rid: DatasetRid - :param transaction_rid: - :type transaction_rid: TransactionRid - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: datasets_models.Transaction - - :raises CommitTransactionPermissionDenied: The provided token does not have permission to commit the given transaction on the given dataset. - :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. - :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. - :raises TransactionNotOpen: The given transaction is not open. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/datasets/{datasetRid}/transactions/{transactionRid}/commit", - query_params={}, - path_params={ - "datasetRid": dataset_rid, - "transactionRid": transaction_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=datasets_models.Transaction, - request_timeout=request_timeout, - throwable_errors={ - "CommitTransactionPermissionDenied": datasets_errors.CommitTransactionPermissionDenied, - "DatasetNotFound": datasets_errors.DatasetNotFound, - "TransactionNotFound": datasets_errors.TransactionNotFound, - "TransactionNotOpen": datasets_errors.TransactionNotOpen, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def create( - self, - dataset_rid: datasets_models.DatasetRid, - *, - transaction_type: datasets_models.TransactionType, - branch_name: typing.Optional[datasets_models.BranchName] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> datasets_models.Transaction: - """ - Creates a Transaction on a Branch of a Dataset. - - :param dataset_rid: - :type dataset_rid: DatasetRid - :param transaction_type: - :type transaction_type: TransactionType - :param branch_name: The name of the Branch on which to create the Transaction. Defaults to `master` for most enrollments. - :type branch_name: Optional[BranchName] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: datasets_models.Transaction - - :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. - :raises CreateTransactionPermissionDenied: The provided token does not have permission to create a transaction on this dataset. - :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. - :raises InvalidBranchName: The requested branch name cannot be used. Branch names cannot be empty and must not look like RIDs or UUIDs. - :raises OpenTransactionAlreadyExists: A transaction is already open on this dataset and branch. A branch of a dataset can only have one open transaction at a time. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/datasets/{datasetRid}/transactions", - query_params={ - "branchName": branch_name, - }, - path_params={ - "datasetRid": dataset_rid, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=datasets_models.CreateTransactionRequest( - transaction_type=transaction_type, - ), - response_type=datasets_models.Transaction, - request_timeout=request_timeout, - throwable_errors={ - "BranchNotFound": datasets_errors.BranchNotFound, - "CreateTransactionPermissionDenied": datasets_errors.CreateTransactionPermissionDenied, - "DatasetNotFound": datasets_errors.DatasetNotFound, - "InvalidBranchName": datasets_errors.InvalidBranchName, - "OpenTransactionAlreadyExists": datasets_errors.OpenTransactionAlreadyExists, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - dataset_rid: datasets_models.DatasetRid, - transaction_rid: datasets_models.TransactionRid, - *, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> datasets_models.Transaction: - """ - Gets a Transaction of a Dataset. - - :param dataset_rid: - :type dataset_rid: DatasetRid - :param transaction_rid: - :type transaction_rid: TransactionRid - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: datasets_models.Transaction - - :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. - :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/datasets/{datasetRid}/transactions/{transactionRid}", - query_params={}, - path_params={ - "datasetRid": dataset_rid, - "transactionRid": transaction_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=datasets_models.Transaction, - request_timeout=request_timeout, - throwable_errors={ - "DatasetNotFound": datasets_errors.DatasetNotFound, - "TransactionNotFound": datasets_errors.TransactionNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def job( - self, - dataset_rid: datasets_models.DatasetRid, - transaction_rid: datasets_models.TransactionRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Optional[core_models.JobRid]: - """ - Get the [Job](https://palantir.com/docs/foundry/data-integration/builds#jobs-and-jobspecs) that computed the - given Transaction. Not all Transactions have an associated Job. For example, if a Dataset - is updated by a User uploading a CSV file into the browser, no Job will be tied to the Transaction. - - :param dataset_rid: - :type dataset_rid: DatasetRid - :param transaction_rid: - :type transaction_rid: TransactionRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Optional[core_models.JobRid] - - :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. - :raises JobTransactionPermissionDenied: Could not job the Transaction. - :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/datasets/{datasetRid}/transactions/{transactionRid}/job", - query_params={ - "preview": preview, - }, - path_params={ - "datasetRid": dataset_rid, - "transactionRid": transaction_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=typing.Optional[core_models.JobRid], - request_timeout=request_timeout, - throwable_errors={ - "DatasetNotFound": datasets_errors.DatasetNotFound, - "JobTransactionPermissionDenied": datasets_errors.JobTransactionPermissionDenied, - "TransactionNotFound": datasets_errors.TransactionNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _TransactionClientRaw: - def __init__(self, client: TransactionClient) -> None: - def abort(_: datasets_models.Transaction): ... - def build(_: typing.Optional[core_models.BuildRid]): ... - def commit(_: datasets_models.Transaction): ... - def create(_: datasets_models.Transaction): ... - def get(_: datasets_models.Transaction): ... - def job(_: typing.Optional[core_models.JobRid]): ... - - self.abort = core.with_raw_response(abort, client.abort) - self.build = core.with_raw_response(build, client.build) - self.commit = core.with_raw_response(commit, client.commit) - self.create = core.with_raw_response(create, client.create) - self.get = core.with_raw_response(get, client.get) - self.job = core.with_raw_response(job, client.job) - - -class _TransactionClientStreaming: - def __init__(self, client: TransactionClient) -> None: - def abort(_: datasets_models.Transaction): ... - def build(_: typing.Optional[core_models.BuildRid]): ... - def commit(_: datasets_models.Transaction): ... - def create(_: datasets_models.Transaction): ... - def get(_: datasets_models.Transaction): ... - def job(_: typing.Optional[core_models.JobRid]): ... - - self.abort = core.with_streaming_response(abort, client.abort) - self.build = core.with_streaming_response(build, client.build) - self.commit = core.with_streaming_response(commit, client.commit) - self.create = core.with_streaming_response(create, client.create) - self.get = core.with_streaming_response(get, client.get) - self.job = core.with_streaming_response(job, client.job) - - -class AsyncTransactionClient: - """ - The API client for the Transaction Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AsyncTransactionClientStreaming(self) - self.with_raw_response = _AsyncTransactionClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def abort( - self, - dataset_rid: datasets_models.DatasetRid, - transaction_rid: datasets_models.TransactionRid, - *, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[datasets_models.Transaction]: - """ - Aborts an open Transaction. File modifications made on this Transaction are not preserved and the Branch is - not updated. - - :param dataset_rid: - :type dataset_rid: DatasetRid - :param transaction_rid: - :type transaction_rid: TransactionRid - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[datasets_models.Transaction] - - :raises AbortTransactionPermissionDenied: The provided token does not have permission to abort the given transaction on the given dataset. - :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. - :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. - :raises TransactionNotOpen: The given transaction is not open. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/datasets/{datasetRid}/transactions/{transactionRid}/abort", - query_params={}, - path_params={ - "datasetRid": dataset_rid, - "transactionRid": transaction_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=datasets_models.Transaction, - request_timeout=request_timeout, - throwable_errors={ - "AbortTransactionPermissionDenied": datasets_errors.AbortTransactionPermissionDenied, - "DatasetNotFound": datasets_errors.DatasetNotFound, - "TransactionNotFound": datasets_errors.TransactionNotFound, - "TransactionNotOpen": datasets_errors.TransactionNotOpen, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def build( - self, - dataset_rid: datasets_models.DatasetRid, - transaction_rid: datasets_models.TransactionRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[typing.Optional[core_models.BuildRid]]: - """ - Get the [Build](https://palantir.com/docs/foundry/data-integration/builds#builds) that computed the - given Transaction. Not all Transactions have an associated Build. For example, if a Dataset - is updated by a User uploading a CSV file into the browser, no Build will be tied to the Transaction. - - :param dataset_rid: - :type dataset_rid: DatasetRid - :param transaction_rid: - :type transaction_rid: TransactionRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[typing.Optional[core_models.BuildRid]] - - :raises BuildTransactionPermissionDenied: Could not build the Transaction. - :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. - :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/datasets/{datasetRid}/transactions/{transactionRid}/build", - query_params={ - "preview": preview, - }, - path_params={ - "datasetRid": dataset_rid, - "transactionRid": transaction_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=typing.Optional[core_models.BuildRid], - request_timeout=request_timeout, - throwable_errors={ - "BuildTransactionPermissionDenied": datasets_errors.BuildTransactionPermissionDenied, - "DatasetNotFound": datasets_errors.DatasetNotFound, - "TransactionNotFound": datasets_errors.TransactionNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def commit( - self, - dataset_rid: datasets_models.DatasetRid, - transaction_rid: datasets_models.TransactionRid, - *, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[datasets_models.Transaction]: - """ - Commits an open Transaction. File modifications made on this Transaction are preserved and the Branch is - updated to point to the Transaction. - - :param dataset_rid: - :type dataset_rid: DatasetRid - :param transaction_rid: - :type transaction_rid: TransactionRid - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[datasets_models.Transaction] - - :raises CommitTransactionPermissionDenied: The provided token does not have permission to commit the given transaction on the given dataset. - :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. - :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. - :raises TransactionNotOpen: The given transaction is not open. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/datasets/{datasetRid}/transactions/{transactionRid}/commit", - query_params={}, - path_params={ - "datasetRid": dataset_rid, - "transactionRid": transaction_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=datasets_models.Transaction, - request_timeout=request_timeout, - throwable_errors={ - "CommitTransactionPermissionDenied": datasets_errors.CommitTransactionPermissionDenied, - "DatasetNotFound": datasets_errors.DatasetNotFound, - "TransactionNotFound": datasets_errors.TransactionNotFound, - "TransactionNotOpen": datasets_errors.TransactionNotOpen, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def create( - self, - dataset_rid: datasets_models.DatasetRid, - *, - transaction_type: datasets_models.TransactionType, - branch_name: typing.Optional[datasets_models.BranchName] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[datasets_models.Transaction]: - """ - Creates a Transaction on a Branch of a Dataset. - - :param dataset_rid: - :type dataset_rid: DatasetRid - :param transaction_type: - :type transaction_type: TransactionType - :param branch_name: The name of the Branch on which to create the Transaction. Defaults to `master` for most enrollments. - :type branch_name: Optional[BranchName] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[datasets_models.Transaction] - - :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. - :raises CreateTransactionPermissionDenied: The provided token does not have permission to create a transaction on this dataset. - :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. - :raises InvalidBranchName: The requested branch name cannot be used. Branch names cannot be empty and must not look like RIDs or UUIDs. - :raises OpenTransactionAlreadyExists: A transaction is already open on this dataset and branch. A branch of a dataset can only have one open transaction at a time. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/datasets/{datasetRid}/transactions", - query_params={ - "branchName": branch_name, - }, - path_params={ - "datasetRid": dataset_rid, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=datasets_models.CreateTransactionRequest( - transaction_type=transaction_type, - ), - response_type=datasets_models.Transaction, - request_timeout=request_timeout, - throwable_errors={ - "BranchNotFound": datasets_errors.BranchNotFound, - "CreateTransactionPermissionDenied": datasets_errors.CreateTransactionPermissionDenied, - "DatasetNotFound": datasets_errors.DatasetNotFound, - "InvalidBranchName": datasets_errors.InvalidBranchName, - "OpenTransactionAlreadyExists": datasets_errors.OpenTransactionAlreadyExists, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - dataset_rid: datasets_models.DatasetRid, - transaction_rid: datasets_models.TransactionRid, - *, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[datasets_models.Transaction]: - """ - Gets a Transaction of a Dataset. - - :param dataset_rid: - :type dataset_rid: DatasetRid - :param transaction_rid: - :type transaction_rid: TransactionRid - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[datasets_models.Transaction] - - :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. - :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/datasets/{datasetRid}/transactions/{transactionRid}", - query_params={}, - path_params={ - "datasetRid": dataset_rid, - "transactionRid": transaction_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=datasets_models.Transaction, - request_timeout=request_timeout, - throwable_errors={ - "DatasetNotFound": datasets_errors.DatasetNotFound, - "TransactionNotFound": datasets_errors.TransactionNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def job( - self, - dataset_rid: datasets_models.DatasetRid, - transaction_rid: datasets_models.TransactionRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[typing.Optional[core_models.JobRid]]: - """ - Get the [Job](https://palantir.com/docs/foundry/data-integration/builds#jobs-and-jobspecs) that computed the - given Transaction. Not all Transactions have an associated Job. For example, if a Dataset - is updated by a User uploading a CSV file into the browser, no Job will be tied to the Transaction. - - :param dataset_rid: - :type dataset_rid: DatasetRid - :param transaction_rid: - :type transaction_rid: TransactionRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[typing.Optional[core_models.JobRid]] - - :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. - :raises JobTransactionPermissionDenied: Could not job the Transaction. - :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/datasets/{datasetRid}/transactions/{transactionRid}/job", - query_params={ - "preview": preview, - }, - path_params={ - "datasetRid": dataset_rid, - "transactionRid": transaction_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=typing.Optional[core_models.JobRid], - request_timeout=request_timeout, - throwable_errors={ - "DatasetNotFound": datasets_errors.DatasetNotFound, - "JobTransactionPermissionDenied": datasets_errors.JobTransactionPermissionDenied, - "TransactionNotFound": datasets_errors.TransactionNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _AsyncTransactionClientRaw: - def __init__(self, client: AsyncTransactionClient) -> None: - def abort(_: datasets_models.Transaction): ... - def build(_: typing.Optional[core_models.BuildRid]): ... - def commit(_: datasets_models.Transaction): ... - def create(_: datasets_models.Transaction): ... - def get(_: datasets_models.Transaction): ... - def job(_: typing.Optional[core_models.JobRid]): ... - - self.abort = core.async_with_raw_response(abort, client.abort) - self.build = core.async_with_raw_response(build, client.build) - self.commit = core.async_with_raw_response(commit, client.commit) - self.create = core.async_with_raw_response(create, client.create) - self.get = core.async_with_raw_response(get, client.get) - self.job = core.async_with_raw_response(job, client.job) - - -class _AsyncTransactionClientStreaming: - def __init__(self, client: AsyncTransactionClient) -> None: - def abort(_: datasets_models.Transaction): ... - def build(_: typing.Optional[core_models.BuildRid]): ... - def commit(_: datasets_models.Transaction): ... - def create(_: datasets_models.Transaction): ... - def get(_: datasets_models.Transaction): ... - def job(_: typing.Optional[core_models.JobRid]): ... - - self.abort = core.async_with_streaming_response(abort, client.abort) - self.build = core.async_with_streaming_response(build, client.build) - self.commit = core.async_with_streaming_response(commit, client.commit) - self.create = core.async_with_streaming_response(create, client.create) - self.get = core.async_with_streaming_response(get, client.get) - self.job = core.async_with_streaming_response(job, client.job) diff --git a/foundry_sdk/v2/datasets/view.py b/foundry_sdk/v2/datasets/view.py deleted file mode 100644 index 0eb279a8f..000000000 --- a/foundry_sdk/v2/datasets/view.py +++ /dev/null @@ -1,1009 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing - -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v2.core import models as core_models -from foundry_sdk.v2.datasets import errors as datasets_errors -from foundry_sdk.v2.datasets import models as datasets_models -from foundry_sdk.v2.filesystem import errors as filesystem_errors -from foundry_sdk.v2.filesystem import models as filesystem_models - - -class ViewClient: - """ - The API client for the View Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _ViewClientStreaming(self) - self.with_raw_response = _ViewClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def add_backing_datasets( - self, - view_dataset_rid: datasets_models.DatasetRid, - *, - backing_datasets: typing.List[datasets_models.ViewBackingDataset], - branch: typing.Optional[datasets_models.BranchName] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> datasets_models.View: - """ - Adds one or more backing datasets to a View. Any duplicates with the same dataset RID and branch name are - ignored. - - :param view_dataset_rid: The rid of the View. - :type view_dataset_rid: DatasetRid - :param backing_datasets: - :type backing_datasets: List[ViewBackingDataset] - :param branch: - :type branch: Optional[BranchName] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: datasets_models.View - - :raises AddBackingDatasetsPermissionDenied: Could not addBackingDatasets the View. - :raises InputBackingDatasetNotInOutputViewProject: One or more backing datasets do not live in the same project as the view. Either move the input datasets to the same project as the view or add them as project references. - :raises InvalidViewBackingDataset: Either you do not have access to one or more of the backing datasets or it does not exist. - :raises ViewNotFound: The requested View could not be found. Either the view does not exist, the branch is not valid or the client token does not have access to it. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/datasets/views/{viewDatasetRid}/addBackingDatasets", - query_params={ - "preview": preview, - }, - path_params={ - "viewDatasetRid": view_dataset_rid, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=datasets_models.AddBackingDatasetsRequest( - branch=branch, - backing_datasets=backing_datasets, - ), - response_type=datasets_models.View, - request_timeout=request_timeout, - throwable_errors={ - "AddBackingDatasetsPermissionDenied": datasets_errors.AddBackingDatasetsPermissionDenied, - "InputBackingDatasetNotInOutputViewProject": datasets_errors.InputBackingDatasetNotInOutputViewProject, - "InvalidViewBackingDataset": datasets_errors.InvalidViewBackingDataset, - "ViewNotFound": datasets_errors.ViewNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def add_primary_key( - self, - view_dataset_rid: datasets_models.DatasetRid, - *, - primary_key: datasets_models.ViewPrimaryKey, - branch: typing.Optional[datasets_models.BranchName] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> datasets_models.View: - """ - Adds a primary key to a View that does not already have one. Primary keys are treated as - guarantees provided by the creator of the dataset. - - :param view_dataset_rid: The rid of the View. - :type view_dataset_rid: DatasetRid - :param primary_key: - :type primary_key: ViewPrimaryKey - :param branch: - :type branch: Optional[BranchName] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: datasets_models.View - - :raises AddPrimaryKeyPermissionDenied: Could not addPrimaryKey the View. - :raises InvalidViewPrimaryKeyColumnType: The type of each referenced column in the primary key must be one of the following: BYTE, SHORT, DECIMAL, INTEGER, LONG, STRING, BOOLEAN, TIMESTAMP or DATE. - :raises InvalidViewPrimaryKeyDeletionColumn: The deletion column must be a boolean. - :raises NotAllColumnsInPrimaryKeyArePresent: Not all columns in the View's primary key are present in the dataset(s). - :raises ViewNotFound: The requested View could not be found. Either the view does not exist, the branch is not valid or the client token does not have access to it. - :raises ViewPrimaryKeyCannotBeModified: A primary key already exits. - :raises ViewPrimaryKeyDeletionColumnNotInDatasetSchema: The deletion column is not present in the dataset. - :raises ViewPrimaryKeyMustContainAtLeastOneColumn: No columns were provided as part of the primary key - :raises ViewPrimaryKeyRequiresBackingDatasets: Cannot add a primary key to a View that does not have any backing datasets. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/datasets/views/{viewDatasetRid}/addPrimaryKey", - query_params={ - "preview": preview, - }, - path_params={ - "viewDatasetRid": view_dataset_rid, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=datasets_models.AddPrimaryKeyRequest( - branch=branch, - primary_key=primary_key, - ), - response_type=datasets_models.View, - request_timeout=request_timeout, - throwable_errors={ - "AddPrimaryKeyPermissionDenied": datasets_errors.AddPrimaryKeyPermissionDenied, - "InvalidViewPrimaryKeyColumnType": datasets_errors.InvalidViewPrimaryKeyColumnType, - "InvalidViewPrimaryKeyDeletionColumn": datasets_errors.InvalidViewPrimaryKeyDeletionColumn, - "NotAllColumnsInPrimaryKeyArePresent": datasets_errors.NotAllColumnsInPrimaryKeyArePresent, - "ViewNotFound": datasets_errors.ViewNotFound, - "ViewPrimaryKeyCannotBeModified": datasets_errors.ViewPrimaryKeyCannotBeModified, - "ViewPrimaryKeyDeletionColumnNotInDatasetSchema": datasets_errors.ViewPrimaryKeyDeletionColumnNotInDatasetSchema, - "ViewPrimaryKeyMustContainAtLeastOneColumn": datasets_errors.ViewPrimaryKeyMustContainAtLeastOneColumn, - "ViewPrimaryKeyRequiresBackingDatasets": datasets_errors.ViewPrimaryKeyRequiresBackingDatasets, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def create( - self, - *, - backing_datasets: typing.List[datasets_models.ViewBackingDataset], - parent_folder_rid: filesystem_models.FolderRid, - view_name: datasets_models.DatasetName, - branch: typing.Optional[datasets_models.BranchName] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - primary_key: typing.Optional[datasets_models.ViewPrimaryKey] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> datasets_models.View: - """ - Create a new View. - :param backing_datasets: - :type backing_datasets: List[ViewBackingDataset] - :param parent_folder_rid: - :type parent_folder_rid: FolderRid - :param view_name: - :type view_name: DatasetName - :param branch: The branch name of the View. If not specified, defaults to `master` for most enrollments. - :type branch: Optional[BranchName] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param primary_key: - :type primary_key: Optional[ViewPrimaryKey] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: datasets_models.View - - :raises CreateDatasetPermissionDenied: The provided token does not have permission to create a dataset in this folder. - :raises CreateViewPermissionDenied: Could not create the View. - :raises FolderNotFound: The given Folder could not be found. - :raises InputBackingDatasetNotInOutputViewProject: One or more backing datasets do not live in the same project as the view. Either move the input datasets to the same project as the view or add them as project references. - :raises InvalidDisplayName: The display name of a Resource should not be exactly `.` or `..`, contain a forward slash `/` and must be less than or equal to 700 characters. - :raises InvalidViewBackingDataset: Either you do not have access to one or more of the backing datasets or it does not exist. - :raises InvalidViewPrimaryKeyColumnType: The type of each referenced column in the primary key must be one of the following: BYTE, SHORT, DECIMAL, INTEGER, LONG, STRING, BOOLEAN, TIMESTAMP or DATE. - :raises InvalidViewPrimaryKeyDeletionColumn: The deletion column must be a boolean. - :raises NotAllColumnsInPrimaryKeyArePresent: Not all columns in the View's primary key are present in the dataset(s). - :raises ResourceNameAlreadyExists: The provided resource name is already in use by another resource in the same folder. - :raises ViewDatasetCleanupFailed: Failed to delete dataset following View creation failure. - :raises ViewNotFound: The requested View could not be found. Either the view does not exist, the branch is not valid or the client token does not have access to it. - :raises ViewPrimaryKeyDeletionColumnNotInDatasetSchema: The deletion column is not present in the dataset. - :raises ViewPrimaryKeyMustContainAtLeastOneColumn: No columns were provided as part of the primary key - :raises ViewPrimaryKeyRequiresBackingDatasets: Cannot add a primary key to a View that does not have any backing datasets. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/datasets/views", - query_params={ - "preview": preview, - }, - path_params={}, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=datasets_models.CreateViewRequest( - parent_folder_rid=parent_folder_rid, - view_name=view_name, - backing_datasets=backing_datasets, - branch=branch, - primary_key=primary_key, - ), - response_type=datasets_models.View, - request_timeout=request_timeout, - throwable_errors={ - "CreateDatasetPermissionDenied": datasets_errors.CreateDatasetPermissionDenied, - "CreateViewPermissionDenied": datasets_errors.CreateViewPermissionDenied, - "FolderNotFound": filesystem_errors.FolderNotFound, - "InputBackingDatasetNotInOutputViewProject": datasets_errors.InputBackingDatasetNotInOutputViewProject, - "InvalidDisplayName": filesystem_errors.InvalidDisplayName, - "InvalidViewBackingDataset": datasets_errors.InvalidViewBackingDataset, - "InvalidViewPrimaryKeyColumnType": datasets_errors.InvalidViewPrimaryKeyColumnType, - "InvalidViewPrimaryKeyDeletionColumn": datasets_errors.InvalidViewPrimaryKeyDeletionColumn, - "NotAllColumnsInPrimaryKeyArePresent": datasets_errors.NotAllColumnsInPrimaryKeyArePresent, - "ResourceNameAlreadyExists": filesystem_errors.ResourceNameAlreadyExists, - "ViewDatasetCleanupFailed": datasets_errors.ViewDatasetCleanupFailed, - "ViewNotFound": datasets_errors.ViewNotFound, - "ViewPrimaryKeyDeletionColumnNotInDatasetSchema": datasets_errors.ViewPrimaryKeyDeletionColumnNotInDatasetSchema, - "ViewPrimaryKeyMustContainAtLeastOneColumn": datasets_errors.ViewPrimaryKeyMustContainAtLeastOneColumn, - "ViewPrimaryKeyRequiresBackingDatasets": datasets_errors.ViewPrimaryKeyRequiresBackingDatasets, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - view_dataset_rid: datasets_models.DatasetRid, - *, - branch: typing.Optional[datasets_models.BranchName] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> datasets_models.View: - """ - Get metadata for a View. - :param view_dataset_rid: The rid of the View. - :type view_dataset_rid: DatasetRid - :param branch: - :type branch: Optional[BranchName] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: datasets_models.View - - :raises ViewNotFound: The requested View could not be found. Either the view does not exist, the branch is not valid or the client token does not have access to it. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/datasets/views/{viewDatasetRid}", - query_params={ - "branch": branch, - "preview": preview, - }, - path_params={ - "viewDatasetRid": view_dataset_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=datasets_models.View, - request_timeout=request_timeout, - throwable_errors={ - "ViewNotFound": datasets_errors.ViewNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def remove_backing_datasets( - self, - view_dataset_rid: datasets_models.DatasetRid, - *, - backing_datasets: typing.List[datasets_models.ViewBackingDataset], - branch: typing.Optional[datasets_models.BranchName] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> datasets_models.View: - """ - Removes specified backing datasets from a View. Removing a dataset triggers a - [SNAPSHOT](https://palantir.com/docs/foundry/data-integration/datasets#snapshot) transaction on the next update. If a - specified dataset does not exist, no error is thrown. - - :param view_dataset_rid: The rid of the View. - :type view_dataset_rid: DatasetRid - :param backing_datasets: - :type backing_datasets: List[ViewBackingDataset] - :param branch: - :type branch: Optional[BranchName] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: datasets_models.View - - :raises InputBackingDatasetNotInOutputViewProject: One or more backing datasets do not live in the same project as the view. Either move the input datasets to the same project as the view or add them as project references. - :raises InvalidViewBackingDataset: Either you do not have access to one or more of the backing datasets or it does not exist. - :raises RemoveBackingDatasetsPermissionDenied: Could not removeBackingDatasets the View. - :raises ViewNotFound: The requested View could not be found. Either the view does not exist, the branch is not valid or the client token does not have access to it. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/datasets/views/{viewDatasetRid}/removeBackingDatasets", - query_params={ - "preview": preview, - }, - path_params={ - "viewDatasetRid": view_dataset_rid, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=datasets_models.RemoveBackingDatasetsRequest( - branch=branch, - backing_datasets=backing_datasets, - ), - response_type=datasets_models.View, - request_timeout=request_timeout, - throwable_errors={ - "InputBackingDatasetNotInOutputViewProject": datasets_errors.InputBackingDatasetNotInOutputViewProject, - "InvalidViewBackingDataset": datasets_errors.InvalidViewBackingDataset, - "RemoveBackingDatasetsPermissionDenied": datasets_errors.RemoveBackingDatasetsPermissionDenied, - "ViewNotFound": datasets_errors.ViewNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def replace_backing_datasets( - self, - view_dataset_rid: datasets_models.DatasetRid, - *, - backing_datasets: typing.List[datasets_models.ViewBackingDataset], - branch: typing.Optional[datasets_models.BranchName] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> datasets_models.View: - """ - Replaces the backing datasets for a View. Removing any backing dataset triggers a - [SNAPSHOT](https://palantir.com/docs/foundry/data-integration/datasets#snapshot) transaction the next time the View is updated. - - :param view_dataset_rid: The rid of the View. - :type view_dataset_rid: DatasetRid - :param backing_datasets: - :type backing_datasets: List[ViewBackingDataset] - :param branch: - :type branch: Optional[BranchName] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: datasets_models.View - - :raises InputBackingDatasetNotInOutputViewProject: One or more backing datasets do not live in the same project as the view. Either move the input datasets to the same project as the view or add them as project references. - :raises InvalidViewBackingDataset: Either you do not have access to one or more of the backing datasets or it does not exist. - :raises ReplaceBackingDatasetsPermissionDenied: Could not replaceBackingDatasets the View. - :raises ViewNotFound: The requested View could not be found. Either the view does not exist, the branch is not valid or the client token does not have access to it. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="PUT", - resource_path="/v2/datasets/views/{viewDatasetRid}/replaceBackingDatasets", - query_params={ - "preview": preview, - }, - path_params={ - "viewDatasetRid": view_dataset_rid, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=datasets_models.ReplaceBackingDatasetsRequest( - branch=branch, - backing_datasets=backing_datasets, - ), - response_type=datasets_models.View, - request_timeout=request_timeout, - throwable_errors={ - "InputBackingDatasetNotInOutputViewProject": datasets_errors.InputBackingDatasetNotInOutputViewProject, - "InvalidViewBackingDataset": datasets_errors.InvalidViewBackingDataset, - "ReplaceBackingDatasetsPermissionDenied": datasets_errors.ReplaceBackingDatasetsPermissionDenied, - "ViewNotFound": datasets_errors.ViewNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _ViewClientRaw: - def __init__(self, client: ViewClient) -> None: - def add_backing_datasets(_: datasets_models.View): ... - def add_primary_key(_: datasets_models.View): ... - def create(_: datasets_models.View): ... - def get(_: datasets_models.View): ... - def remove_backing_datasets(_: datasets_models.View): ... - def replace_backing_datasets(_: datasets_models.View): ... - - self.add_backing_datasets = core.with_raw_response( - add_backing_datasets, client.add_backing_datasets - ) - self.add_primary_key = core.with_raw_response(add_primary_key, client.add_primary_key) - self.create = core.with_raw_response(create, client.create) - self.get = core.with_raw_response(get, client.get) - self.remove_backing_datasets = core.with_raw_response( - remove_backing_datasets, client.remove_backing_datasets - ) - self.replace_backing_datasets = core.with_raw_response( - replace_backing_datasets, client.replace_backing_datasets - ) - - -class _ViewClientStreaming: - def __init__(self, client: ViewClient) -> None: - def add_backing_datasets(_: datasets_models.View): ... - def add_primary_key(_: datasets_models.View): ... - def create(_: datasets_models.View): ... - def get(_: datasets_models.View): ... - def remove_backing_datasets(_: datasets_models.View): ... - def replace_backing_datasets(_: datasets_models.View): ... - - self.add_backing_datasets = core.with_streaming_response( - add_backing_datasets, client.add_backing_datasets - ) - self.add_primary_key = core.with_streaming_response(add_primary_key, client.add_primary_key) - self.create = core.with_streaming_response(create, client.create) - self.get = core.with_streaming_response(get, client.get) - self.remove_backing_datasets = core.with_streaming_response( - remove_backing_datasets, client.remove_backing_datasets - ) - self.replace_backing_datasets = core.with_streaming_response( - replace_backing_datasets, client.replace_backing_datasets - ) - - -class AsyncViewClient: - """ - The API client for the View Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AsyncViewClientStreaming(self) - self.with_raw_response = _AsyncViewClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def add_backing_datasets( - self, - view_dataset_rid: datasets_models.DatasetRid, - *, - backing_datasets: typing.List[datasets_models.ViewBackingDataset], - branch: typing.Optional[datasets_models.BranchName] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[datasets_models.View]: - """ - Adds one or more backing datasets to a View. Any duplicates with the same dataset RID and branch name are - ignored. - - :param view_dataset_rid: The rid of the View. - :type view_dataset_rid: DatasetRid - :param backing_datasets: - :type backing_datasets: List[ViewBackingDataset] - :param branch: - :type branch: Optional[BranchName] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[datasets_models.View] - - :raises AddBackingDatasetsPermissionDenied: Could not addBackingDatasets the View. - :raises InputBackingDatasetNotInOutputViewProject: One or more backing datasets do not live in the same project as the view. Either move the input datasets to the same project as the view or add them as project references. - :raises InvalidViewBackingDataset: Either you do not have access to one or more of the backing datasets or it does not exist. - :raises ViewNotFound: The requested View could not be found. Either the view does not exist, the branch is not valid or the client token does not have access to it. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/datasets/views/{viewDatasetRid}/addBackingDatasets", - query_params={ - "preview": preview, - }, - path_params={ - "viewDatasetRid": view_dataset_rid, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=datasets_models.AddBackingDatasetsRequest( - branch=branch, - backing_datasets=backing_datasets, - ), - response_type=datasets_models.View, - request_timeout=request_timeout, - throwable_errors={ - "AddBackingDatasetsPermissionDenied": datasets_errors.AddBackingDatasetsPermissionDenied, - "InputBackingDatasetNotInOutputViewProject": datasets_errors.InputBackingDatasetNotInOutputViewProject, - "InvalidViewBackingDataset": datasets_errors.InvalidViewBackingDataset, - "ViewNotFound": datasets_errors.ViewNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def add_primary_key( - self, - view_dataset_rid: datasets_models.DatasetRid, - *, - primary_key: datasets_models.ViewPrimaryKey, - branch: typing.Optional[datasets_models.BranchName] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[datasets_models.View]: - """ - Adds a primary key to a View that does not already have one. Primary keys are treated as - guarantees provided by the creator of the dataset. - - :param view_dataset_rid: The rid of the View. - :type view_dataset_rid: DatasetRid - :param primary_key: - :type primary_key: ViewPrimaryKey - :param branch: - :type branch: Optional[BranchName] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[datasets_models.View] - - :raises AddPrimaryKeyPermissionDenied: Could not addPrimaryKey the View. - :raises InvalidViewPrimaryKeyColumnType: The type of each referenced column in the primary key must be one of the following: BYTE, SHORT, DECIMAL, INTEGER, LONG, STRING, BOOLEAN, TIMESTAMP or DATE. - :raises InvalidViewPrimaryKeyDeletionColumn: The deletion column must be a boolean. - :raises NotAllColumnsInPrimaryKeyArePresent: Not all columns in the View's primary key are present in the dataset(s). - :raises ViewNotFound: The requested View could not be found. Either the view does not exist, the branch is not valid or the client token does not have access to it. - :raises ViewPrimaryKeyCannotBeModified: A primary key already exits. - :raises ViewPrimaryKeyDeletionColumnNotInDatasetSchema: The deletion column is not present in the dataset. - :raises ViewPrimaryKeyMustContainAtLeastOneColumn: No columns were provided as part of the primary key - :raises ViewPrimaryKeyRequiresBackingDatasets: Cannot add a primary key to a View that does not have any backing datasets. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/datasets/views/{viewDatasetRid}/addPrimaryKey", - query_params={ - "preview": preview, - }, - path_params={ - "viewDatasetRid": view_dataset_rid, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=datasets_models.AddPrimaryKeyRequest( - branch=branch, - primary_key=primary_key, - ), - response_type=datasets_models.View, - request_timeout=request_timeout, - throwable_errors={ - "AddPrimaryKeyPermissionDenied": datasets_errors.AddPrimaryKeyPermissionDenied, - "InvalidViewPrimaryKeyColumnType": datasets_errors.InvalidViewPrimaryKeyColumnType, - "InvalidViewPrimaryKeyDeletionColumn": datasets_errors.InvalidViewPrimaryKeyDeletionColumn, - "NotAllColumnsInPrimaryKeyArePresent": datasets_errors.NotAllColumnsInPrimaryKeyArePresent, - "ViewNotFound": datasets_errors.ViewNotFound, - "ViewPrimaryKeyCannotBeModified": datasets_errors.ViewPrimaryKeyCannotBeModified, - "ViewPrimaryKeyDeletionColumnNotInDatasetSchema": datasets_errors.ViewPrimaryKeyDeletionColumnNotInDatasetSchema, - "ViewPrimaryKeyMustContainAtLeastOneColumn": datasets_errors.ViewPrimaryKeyMustContainAtLeastOneColumn, - "ViewPrimaryKeyRequiresBackingDatasets": datasets_errors.ViewPrimaryKeyRequiresBackingDatasets, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def create( - self, - *, - backing_datasets: typing.List[datasets_models.ViewBackingDataset], - parent_folder_rid: filesystem_models.FolderRid, - view_name: datasets_models.DatasetName, - branch: typing.Optional[datasets_models.BranchName] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - primary_key: typing.Optional[datasets_models.ViewPrimaryKey] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[datasets_models.View]: - """ - Create a new View. - :param backing_datasets: - :type backing_datasets: List[ViewBackingDataset] - :param parent_folder_rid: - :type parent_folder_rid: FolderRid - :param view_name: - :type view_name: DatasetName - :param branch: The branch name of the View. If not specified, defaults to `master` for most enrollments. - :type branch: Optional[BranchName] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param primary_key: - :type primary_key: Optional[ViewPrimaryKey] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[datasets_models.View] - - :raises CreateDatasetPermissionDenied: The provided token does not have permission to create a dataset in this folder. - :raises CreateViewPermissionDenied: Could not create the View. - :raises FolderNotFound: The given Folder could not be found. - :raises InputBackingDatasetNotInOutputViewProject: One or more backing datasets do not live in the same project as the view. Either move the input datasets to the same project as the view or add them as project references. - :raises InvalidDisplayName: The display name of a Resource should not be exactly `.` or `..`, contain a forward slash `/` and must be less than or equal to 700 characters. - :raises InvalidViewBackingDataset: Either you do not have access to one or more of the backing datasets or it does not exist. - :raises InvalidViewPrimaryKeyColumnType: The type of each referenced column in the primary key must be one of the following: BYTE, SHORT, DECIMAL, INTEGER, LONG, STRING, BOOLEAN, TIMESTAMP or DATE. - :raises InvalidViewPrimaryKeyDeletionColumn: The deletion column must be a boolean. - :raises NotAllColumnsInPrimaryKeyArePresent: Not all columns in the View's primary key are present in the dataset(s). - :raises ResourceNameAlreadyExists: The provided resource name is already in use by another resource in the same folder. - :raises ViewDatasetCleanupFailed: Failed to delete dataset following View creation failure. - :raises ViewNotFound: The requested View could not be found. Either the view does not exist, the branch is not valid or the client token does not have access to it. - :raises ViewPrimaryKeyDeletionColumnNotInDatasetSchema: The deletion column is not present in the dataset. - :raises ViewPrimaryKeyMustContainAtLeastOneColumn: No columns were provided as part of the primary key - :raises ViewPrimaryKeyRequiresBackingDatasets: Cannot add a primary key to a View that does not have any backing datasets. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/datasets/views", - query_params={ - "preview": preview, - }, - path_params={}, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=datasets_models.CreateViewRequest( - parent_folder_rid=parent_folder_rid, - view_name=view_name, - backing_datasets=backing_datasets, - branch=branch, - primary_key=primary_key, - ), - response_type=datasets_models.View, - request_timeout=request_timeout, - throwable_errors={ - "CreateDatasetPermissionDenied": datasets_errors.CreateDatasetPermissionDenied, - "CreateViewPermissionDenied": datasets_errors.CreateViewPermissionDenied, - "FolderNotFound": filesystem_errors.FolderNotFound, - "InputBackingDatasetNotInOutputViewProject": datasets_errors.InputBackingDatasetNotInOutputViewProject, - "InvalidDisplayName": filesystem_errors.InvalidDisplayName, - "InvalidViewBackingDataset": datasets_errors.InvalidViewBackingDataset, - "InvalidViewPrimaryKeyColumnType": datasets_errors.InvalidViewPrimaryKeyColumnType, - "InvalidViewPrimaryKeyDeletionColumn": datasets_errors.InvalidViewPrimaryKeyDeletionColumn, - "NotAllColumnsInPrimaryKeyArePresent": datasets_errors.NotAllColumnsInPrimaryKeyArePresent, - "ResourceNameAlreadyExists": filesystem_errors.ResourceNameAlreadyExists, - "ViewDatasetCleanupFailed": datasets_errors.ViewDatasetCleanupFailed, - "ViewNotFound": datasets_errors.ViewNotFound, - "ViewPrimaryKeyDeletionColumnNotInDatasetSchema": datasets_errors.ViewPrimaryKeyDeletionColumnNotInDatasetSchema, - "ViewPrimaryKeyMustContainAtLeastOneColumn": datasets_errors.ViewPrimaryKeyMustContainAtLeastOneColumn, - "ViewPrimaryKeyRequiresBackingDatasets": datasets_errors.ViewPrimaryKeyRequiresBackingDatasets, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - view_dataset_rid: datasets_models.DatasetRid, - *, - branch: typing.Optional[datasets_models.BranchName] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[datasets_models.View]: - """ - Get metadata for a View. - :param view_dataset_rid: The rid of the View. - :type view_dataset_rid: DatasetRid - :param branch: - :type branch: Optional[BranchName] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[datasets_models.View] - - :raises ViewNotFound: The requested View could not be found. Either the view does not exist, the branch is not valid or the client token does not have access to it. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/datasets/views/{viewDatasetRid}", - query_params={ - "branch": branch, - "preview": preview, - }, - path_params={ - "viewDatasetRid": view_dataset_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=datasets_models.View, - request_timeout=request_timeout, - throwable_errors={ - "ViewNotFound": datasets_errors.ViewNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def remove_backing_datasets( - self, - view_dataset_rid: datasets_models.DatasetRid, - *, - backing_datasets: typing.List[datasets_models.ViewBackingDataset], - branch: typing.Optional[datasets_models.BranchName] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[datasets_models.View]: - """ - Removes specified backing datasets from a View. Removing a dataset triggers a - [SNAPSHOT](https://palantir.com/docs/foundry/data-integration/datasets#snapshot) transaction on the next update. If a - specified dataset does not exist, no error is thrown. - - :param view_dataset_rid: The rid of the View. - :type view_dataset_rid: DatasetRid - :param backing_datasets: - :type backing_datasets: List[ViewBackingDataset] - :param branch: - :type branch: Optional[BranchName] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[datasets_models.View] - - :raises InputBackingDatasetNotInOutputViewProject: One or more backing datasets do not live in the same project as the view. Either move the input datasets to the same project as the view or add them as project references. - :raises InvalidViewBackingDataset: Either you do not have access to one or more of the backing datasets or it does not exist. - :raises RemoveBackingDatasetsPermissionDenied: Could not removeBackingDatasets the View. - :raises ViewNotFound: The requested View could not be found. Either the view does not exist, the branch is not valid or the client token does not have access to it. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/datasets/views/{viewDatasetRid}/removeBackingDatasets", - query_params={ - "preview": preview, - }, - path_params={ - "viewDatasetRid": view_dataset_rid, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=datasets_models.RemoveBackingDatasetsRequest( - branch=branch, - backing_datasets=backing_datasets, - ), - response_type=datasets_models.View, - request_timeout=request_timeout, - throwable_errors={ - "InputBackingDatasetNotInOutputViewProject": datasets_errors.InputBackingDatasetNotInOutputViewProject, - "InvalidViewBackingDataset": datasets_errors.InvalidViewBackingDataset, - "RemoveBackingDatasetsPermissionDenied": datasets_errors.RemoveBackingDatasetsPermissionDenied, - "ViewNotFound": datasets_errors.ViewNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def replace_backing_datasets( - self, - view_dataset_rid: datasets_models.DatasetRid, - *, - backing_datasets: typing.List[datasets_models.ViewBackingDataset], - branch: typing.Optional[datasets_models.BranchName] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[datasets_models.View]: - """ - Replaces the backing datasets for a View. Removing any backing dataset triggers a - [SNAPSHOT](https://palantir.com/docs/foundry/data-integration/datasets#snapshot) transaction the next time the View is updated. - - :param view_dataset_rid: The rid of the View. - :type view_dataset_rid: DatasetRid - :param backing_datasets: - :type backing_datasets: List[ViewBackingDataset] - :param branch: - :type branch: Optional[BranchName] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[datasets_models.View] - - :raises InputBackingDatasetNotInOutputViewProject: One or more backing datasets do not live in the same project as the view. Either move the input datasets to the same project as the view or add them as project references. - :raises InvalidViewBackingDataset: Either you do not have access to one or more of the backing datasets or it does not exist. - :raises ReplaceBackingDatasetsPermissionDenied: Could not replaceBackingDatasets the View. - :raises ViewNotFound: The requested View could not be found. Either the view does not exist, the branch is not valid or the client token does not have access to it. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="PUT", - resource_path="/v2/datasets/views/{viewDatasetRid}/replaceBackingDatasets", - query_params={ - "preview": preview, - }, - path_params={ - "viewDatasetRid": view_dataset_rid, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=datasets_models.ReplaceBackingDatasetsRequest( - branch=branch, - backing_datasets=backing_datasets, - ), - response_type=datasets_models.View, - request_timeout=request_timeout, - throwable_errors={ - "InputBackingDatasetNotInOutputViewProject": datasets_errors.InputBackingDatasetNotInOutputViewProject, - "InvalidViewBackingDataset": datasets_errors.InvalidViewBackingDataset, - "ReplaceBackingDatasetsPermissionDenied": datasets_errors.ReplaceBackingDatasetsPermissionDenied, - "ViewNotFound": datasets_errors.ViewNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _AsyncViewClientRaw: - def __init__(self, client: AsyncViewClient) -> None: - def add_backing_datasets(_: datasets_models.View): ... - def add_primary_key(_: datasets_models.View): ... - def create(_: datasets_models.View): ... - def get(_: datasets_models.View): ... - def remove_backing_datasets(_: datasets_models.View): ... - def replace_backing_datasets(_: datasets_models.View): ... - - self.add_backing_datasets = core.async_with_raw_response( - add_backing_datasets, client.add_backing_datasets - ) - self.add_primary_key = core.async_with_raw_response(add_primary_key, client.add_primary_key) - self.create = core.async_with_raw_response(create, client.create) - self.get = core.async_with_raw_response(get, client.get) - self.remove_backing_datasets = core.async_with_raw_response( - remove_backing_datasets, client.remove_backing_datasets - ) - self.replace_backing_datasets = core.async_with_raw_response( - replace_backing_datasets, client.replace_backing_datasets - ) - - -class _AsyncViewClientStreaming: - def __init__(self, client: AsyncViewClient) -> None: - def add_backing_datasets(_: datasets_models.View): ... - def add_primary_key(_: datasets_models.View): ... - def create(_: datasets_models.View): ... - def get(_: datasets_models.View): ... - def remove_backing_datasets(_: datasets_models.View): ... - def replace_backing_datasets(_: datasets_models.View): ... - - self.add_backing_datasets = core.async_with_streaming_response( - add_backing_datasets, client.add_backing_datasets - ) - self.add_primary_key = core.async_with_streaming_response( - add_primary_key, client.add_primary_key - ) - self.create = core.async_with_streaming_response(create, client.create) - self.get = core.async_with_streaming_response(get, client.get) - self.remove_backing_datasets = core.async_with_streaming_response( - remove_backing_datasets, client.remove_backing_datasets - ) - self.replace_backing_datasets = core.async_with_streaming_response( - replace_backing_datasets, client.replace_backing_datasets - ) diff --git a/foundry_sdk/v2/filesystem/__init__.py b/foundry_sdk/v2/filesystem/__init__.py deleted file mode 100644 index 26f3fb8b7..000000000 --- a/foundry_sdk/v2/filesystem/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -from foundry_sdk.v2.filesystem._client import AsyncFilesystemClient -from foundry_sdk.v2.filesystem._client import FilesystemClient - -__all__ = [ - "FilesystemClient", - "AsyncFilesystemClient", -] diff --git a/foundry_sdk/v2/filesystem/_client.py b/foundry_sdk/v2/filesystem/_client.py deleted file mode 100644 index e74095e27..000000000 --- a/foundry_sdk/v2/filesystem/_client.py +++ /dev/null @@ -1,108 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing -from functools import cached_property - -from foundry_sdk import _core as core - - -class FilesystemClient: - """ - The API client for the Filesystem Namespace. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - - @cached_property - def Folder(self): - from foundry_sdk.v2.filesystem.folder import FolderClient - - return FolderClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @cached_property - def Project(self): - from foundry_sdk.v2.filesystem.project import ProjectClient - - return ProjectClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @cached_property - def Resource(self): - from foundry_sdk.v2.filesystem.resource import ResourceClient - - return ResourceClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @cached_property - def Space(self): - from foundry_sdk.v2.filesystem.space import SpaceClient - - return SpaceClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - -class AsyncFilesystemClient: - """ - The Async API client for the Filesystem Namespace. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - from foundry_sdk.v2.filesystem.folder import AsyncFolderClient - from foundry_sdk.v2.filesystem.project import AsyncProjectClient - from foundry_sdk.v2.filesystem.resource import AsyncResourceClient - from foundry_sdk.v2.filesystem.space import AsyncSpaceClient - - self.Folder = AsyncFolderClient(auth=auth, hostname=hostname, config=config) - - self.Project = AsyncProjectClient(auth=auth, hostname=hostname, config=config) - - self.Resource = AsyncResourceClient(auth=auth, hostname=hostname, config=config) - - self.Space = AsyncSpaceClient(auth=auth, hostname=hostname, config=config) diff --git a/foundry_sdk/v2/filesystem/errors.py b/foundry_sdk/v2/filesystem/errors.py deleted file mode 100644 index 7b75f718f..000000000 --- a/foundry_sdk/v2/filesystem/errors.py +++ /dev/null @@ -1,1139 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing -from dataclasses import dataclass - -import typing_extensions - -from foundry_sdk import _errors as errors -from foundry_sdk.v2.core import models as core_models -from foundry_sdk.v2.filesystem import models as filesystem_models - - -class AddGroupToParentGroupPermissionDeniedParameters(typing_extensions.TypedDict): - """The user is not authorized to add a a group to the parent group required to create the project from template.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - parentGroupsWithoutPermission: typing.List[core_models.GroupRid] - - -@dataclass -class AddGroupToParentGroupPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["AddGroupToParentGroupPermissionDenied"] - parameters: AddGroupToParentGroupPermissionDeniedParameters - error_instance_id: str - - -class AddMarkingsPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not addMarkings the Resource.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - resourceRid: filesystem_models.ResourceRid - - -@dataclass -class AddMarkingsPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["AddMarkingsPermissionDenied"] - parameters: AddMarkingsPermissionDeniedParameters - error_instance_id: str - - -class AddOrganizationsPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not addOrganizations the Project.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - projectRid: filesystem_models.ProjectRid - - -@dataclass -class AddOrganizationsPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["AddOrganizationsPermissionDenied"] - parameters: AddOrganizationsPermissionDeniedParameters - error_instance_id: str - - -class AddResourceRolesPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not add the ResourceRole.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - resourceRid: filesystem_models.ResourceRid - - -@dataclass -class AddResourceRolesPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["AddResourceRolesPermissionDenied"] - parameters: AddResourceRolesPermissionDeniedParameters - error_instance_id: str - - -class CreateFolderOutsideProjectNotSupportedParameters(typing_extensions.TypedDict): - """The given Resource is not a folder.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - parentFolderRid: filesystem_models.FolderRid - - -@dataclass -class CreateFolderOutsideProjectNotSupported(errors.BadRequestError): - name: typing.Literal["CreateFolderOutsideProjectNotSupported"] - parameters: CreateFolderOutsideProjectNotSupportedParameters - error_instance_id: str - - -class CreateFolderPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not create the Folder.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class CreateFolderPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["CreateFolderPermissionDenied"] - parameters: CreateFolderPermissionDeniedParameters - error_instance_id: str - - -class CreateGroupPermissionDeniedParameters(typing_extensions.TypedDict): - """The user is not authorized to create the group in the organization required to create the project from template.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - organizationsWithoutPermission: typing.List[core_models.OrganizationRid] - - -@dataclass -class CreateGroupPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["CreateGroupPermissionDenied"] - parameters: CreateGroupPermissionDeniedParameters - error_instance_id: str - - -class CreateProjectFromTemplatePermissionDeniedParameters(typing_extensions.TypedDict): - """Could not createFromTemplate the Project.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class CreateProjectFromTemplatePermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["CreateProjectFromTemplatePermissionDenied"] - parameters: CreateProjectFromTemplatePermissionDeniedParameters - error_instance_id: str - - -class CreateProjectNoOwnerLikeRoleGrantParameters(typing_extensions.TypedDict): - """The create project request would create a project with no principal being granted an owner-like role. As a result, there would be no user with administrative privileges over the project. A role is defined to be owner-like if it has the `compass:edit-project` operation. In the common case of the default role-set, this is just the `compass:manage` role.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - grantedRoleIds: typing.List[core_models.RoleId] - roleSetOwnerLikeRoleIds: typing.List[core_models.RoleId] - - -@dataclass -class CreateProjectNoOwnerLikeRoleGrant(errors.BadRequestError): - name: typing.Literal["CreateProjectNoOwnerLikeRoleGrant"] - parameters: CreateProjectNoOwnerLikeRoleGrantParameters - error_instance_id: str - - -class CreateProjectPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not create the Project.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class CreateProjectPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["CreateProjectPermissionDenied"] - parameters: CreateProjectPermissionDeniedParameters - error_instance_id: str - - -class CreateSpacePermissionDeniedParameters(typing_extensions.TypedDict): - """Could not create the Space.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class CreateSpacePermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["CreateSpacePermissionDenied"] - parameters: CreateSpacePermissionDeniedParameters - error_instance_id: str - - -class DefaultRolesNotInSpaceRoleSetParameters(typing_extensions.TypedDict): - """The requested default roles are not in the role set of the space for the project template.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class DefaultRolesNotInSpaceRoleSet(errors.BadRequestError): - name: typing.Literal["DefaultRolesNotInSpaceRoleSet"] - parameters: DefaultRolesNotInSpaceRoleSetParameters - error_instance_id: str - - -class DeleteResourcePermissionDeniedParameters(typing_extensions.TypedDict): - """Could not delete the Resource.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - resourceRid: filesystem_models.ResourceRid - - -@dataclass -class DeleteResourcePermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["DeleteResourcePermissionDenied"] - parameters: DeleteResourcePermissionDeniedParameters - error_instance_id: str - - -class DeleteSpacePermissionDeniedParameters(typing_extensions.TypedDict): - """Could not delete the Space.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - spaceRid: filesystem_models.SpaceRid - - -@dataclass -class DeleteSpacePermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["DeleteSpacePermissionDenied"] - parameters: DeleteSpacePermissionDeniedParameters - error_instance_id: str - - -class EnrollmentNotFoundParameters(typing_extensions.TypedDict): - """An enrollment was not found for the user.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - enrollmentRid: core_models.EnrollmentRid - - -@dataclass -class EnrollmentNotFound(errors.NotFoundError): - name: typing.Literal["EnrollmentNotFound"] - parameters: EnrollmentNotFoundParameters - error_instance_id: str - - -class FolderNotFoundParameters(typing_extensions.TypedDict): - """The given Folder could not be found.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - folderRid: filesystem_models.FolderRid - - -@dataclass -class FolderNotFound(errors.NotFoundError): - name: typing.Literal["FolderNotFound"] - parameters: FolderNotFoundParameters - error_instance_id: str - - -class ForbiddenOperationOnAutosavedResourceParameters(typing_extensions.TypedDict): - """Performing this operation on an autosaved resource is not supported.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - resourceRid: filesystem_models.ResourceRid - - -@dataclass -class ForbiddenOperationOnAutosavedResource(errors.BadRequestError): - name: typing.Literal["ForbiddenOperationOnAutosavedResource"] - parameters: ForbiddenOperationOnAutosavedResourceParameters - error_instance_id: str - - -class ForbiddenOperationOnHiddenResourceParameters(typing_extensions.TypedDict): - """Performing this operation on a hidden resource is not supported.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - resourceRid: filesystem_models.ResourceRid - - -@dataclass -class ForbiddenOperationOnHiddenResource(errors.BadRequestError): - name: typing.Literal["ForbiddenOperationOnHiddenResource"] - parameters: ForbiddenOperationOnHiddenResourceParameters - error_instance_id: str - - -class GetAccessRequirementsPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not getAccessRequirements the Resource.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - resourceRid: filesystem_models.ResourceRid - - -@dataclass -class GetAccessRequirementsPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["GetAccessRequirementsPermissionDenied"] - parameters: GetAccessRequirementsPermissionDeniedParameters - error_instance_id: str - - -class GetByPathPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not getByPath the Resource.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class GetByPathPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["GetByPathPermissionDenied"] - parameters: GetByPathPermissionDeniedParameters - error_instance_id: str - - -class GetRootFolderNotSupportedParameters(typing_extensions.TypedDict): - """Getting the root folder as a resource is not supported.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class GetRootFolderNotSupported(errors.BadRequestError): - name: typing.Literal["GetRootFolderNotSupported"] - parameters: GetRootFolderNotSupportedParameters - error_instance_id: str - - -class GetSpaceResourceNotSupportedParameters(typing_extensions.TypedDict): - """Getting a space as a resource is not supported.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - spaceRid: filesystem_models.SpaceRid - - -@dataclass -class GetSpaceResourceNotSupported(errors.BadRequestError): - name: typing.Literal["GetSpaceResourceNotSupported"] - parameters: GetSpaceResourceNotSupportedParameters - error_instance_id: str - - -class InvalidDefaultRolesParameters(typing_extensions.TypedDict): - """Either the user has not passed default roles for a template with suggested default roles, or has passed default roles for a template with fixed default roles.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class InvalidDefaultRoles(errors.BadRequestError): - name: typing.Literal["InvalidDefaultRoles"] - parameters: InvalidDefaultRolesParameters - error_instance_id: str - - -class InvalidDescriptionParameters(typing_extensions.TypedDict): - """Either the user has not passed a value for a template with unset project description, or has passed a value for a template with fixed project description.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class InvalidDescription(errors.BadRequestError): - name: typing.Literal["InvalidDescription"] - parameters: InvalidDescriptionParameters - error_instance_id: str - - -class InvalidDisplayNameParameters(typing_extensions.TypedDict): - """ - The display name of a Resource should not be exactly `.` or `..`, contain a forward slash `/` and must be - less than or equal to 700 characters. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - displayName: filesystem_models.ResourceDisplayName - - -@dataclass -class InvalidDisplayName(errors.BadRequestError): - name: typing.Literal["InvalidDisplayName"] - parameters: InvalidDisplayNameParameters - error_instance_id: str - - -class InvalidFolderParameters(typing_extensions.TypedDict): - """The given Resource is not a Folder.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - resourceRid: filesystem_models.ResourceRid - - -@dataclass -class InvalidFolder(errors.BadRequestError): - name: typing.Literal["InvalidFolder"] - parameters: InvalidFolderParameters - error_instance_id: str - - -class InvalidOrganizationHierarchyParameters(typing_extensions.TypedDict): - """ - Organizations on a project must also exist on the parent space. This error is thrown if the configuration - of a project's organizations (on creation or subsequently) results in the project being marked with either - no organizations in a marked space, or with an organization that is not present on the parent space. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - organizationRids: typing.List[core_models.OrganizationRid] - - -@dataclass -class InvalidOrganizationHierarchy(errors.BadRequestError): - name: typing.Literal["InvalidOrganizationHierarchy"] - parameters: InvalidOrganizationHierarchyParameters - error_instance_id: str - - -class InvalidOrganizationsParameters(typing_extensions.TypedDict): - """Either the user has not passed organizations for a template with suggested organizations, or has passed organization for a template with fixed organizations.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class InvalidOrganizations(errors.BadRequestError): - name: typing.Literal["InvalidOrganizations"] - parameters: InvalidOrganizationsParameters - error_instance_id: str - - -class InvalidPathParameters(typing_extensions.TypedDict): - """ - The given path is invalid. - - A valid path has all components separated by a single `/`. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - path: filesystem_models.ResourcePath - - -@dataclass -class InvalidPath(errors.BadRequestError): - name: typing.Literal["InvalidPath"] - parameters: InvalidPathParameters - error_instance_id: str - - -class InvalidPrincipalIdsForGroupTemplateParameters(typing_extensions.TypedDict): - """The template requested for project creation contains principal IDs that do not exist.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - invalidPrincipalIds: typing.List[core_models.PrincipalId] - - -@dataclass -class InvalidPrincipalIdsForGroupTemplate(errors.BadRequestError): - name: typing.Literal["InvalidPrincipalIdsForGroupTemplate"] - parameters: InvalidPrincipalIdsForGroupTemplateParameters - error_instance_id: str - - -class InvalidRoleIdsParameters(typing_extensions.TypedDict): - """A roleId referenced in either default roles or role grants does not exist in the project role set for the space.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - requestedRoleIds: typing.List[core_models.RoleId] - """All referenced role ids in the create project request.""" - - -@dataclass -class InvalidRoleIds(errors.BadRequestError): - name: typing.Literal["InvalidRoleIds"] - parameters: InvalidRoleIdsParameters - error_instance_id: str - - -class InvalidVariableParameters(typing_extensions.TypedDict): - """A variable referenced in the request to create project from template is not defined on the template.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - templateVariableId: str - - -@dataclass -class InvalidVariable(errors.BadRequestError): - name: typing.Literal["InvalidVariable"] - parameters: InvalidVariableParameters - error_instance_id: str - - -class InvalidVariableEnumOptionParameters(typing_extensions.TypedDict): - """The value passed in the request to create project from template for an enum type variable is not a valid option.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - variableId: str - invalidOption: str - validOptions: typing.List[str] - - -@dataclass -class InvalidVariableEnumOption(errors.BadRequestError): - name: typing.Literal["InvalidVariableEnumOption"] - parameters: InvalidVariableEnumOptionParameters - error_instance_id: str - - -class MarkingNotFoundParameters(typing_extensions.TypedDict): - """A provided marking ID cannot be found.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - markingIds: typing.List[core_models.MarkingId] - - -@dataclass -class MarkingNotFound(errors.NotFoundError): - name: typing.Literal["MarkingNotFound"] - parameters: MarkingNotFoundParameters - error_instance_id: str - - -class MissingDisplayNameParameters(typing_extensions.TypedDict): - """A Display Name must be provided.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class MissingDisplayName(errors.BadRequestError): - name: typing.Literal["MissingDisplayName"] - parameters: MissingDisplayNameParameters - error_instance_id: str - - -class MissingVariableValueParameters(typing_extensions.TypedDict): - """A variable defined on the template requested for project creation does not have a value set in the request.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - templateVariableId: str - - -@dataclass -class MissingVariableValue(errors.BadRequestError): - name: typing.Literal["MissingVariableValue"] - parameters: MissingVariableValueParameters - error_instance_id: str - - -class NotAuthorizedToApplyOrganizationParameters(typing_extensions.TypedDict): - """The user is not authorized to apply at least one of the organization markings required to create the project from template.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - organizationRids: typing.List[core_models.OrganizationRid] - - -@dataclass -class NotAuthorizedToApplyOrganization(errors.BadRequestError): - name: typing.Literal["NotAuthorizedToApplyOrganization"] - parameters: NotAuthorizedToApplyOrganizationParameters - error_instance_id: str - - -class OrganizationCannotBeRemovedParameters(typing_extensions.TypedDict): - """ - An organization cannot be removed from a project if it would result in a project with no organizations - under a space marked with an organization. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - organizationRids: typing.List[core_models.OrganizationRid] - - -@dataclass -class OrganizationCannotBeRemoved(errors.BadRequestError): - name: typing.Literal["OrganizationCannotBeRemoved"] - parameters: OrganizationCannotBeRemovedParameters - error_instance_id: str - - -class OrganizationMarkingNotOnSpaceParameters(typing_extensions.TypedDict): - """At least one of the organization markings associated with a passed organization is not applied on the requested space.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - spaceRid: filesystem_models.SpaceRid - organizationRids: typing.List[core_models.OrganizationRid] - - -@dataclass -class OrganizationMarkingNotOnSpace(errors.BadRequestError): - name: typing.Literal["OrganizationMarkingNotOnSpace"] - parameters: OrganizationMarkingNotOnSpaceParameters - error_instance_id: str - - -class OrganizationMarkingNotSupportedParameters(typing_extensions.TypedDict): - """ - Adding an organization marking as a regular marking is not supported. Use the organization endpoints on a - project resource instead. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - markingIds: typing.List[core_models.MarkingId] - - -@dataclass -class OrganizationMarkingNotSupported(errors.BadRequestError): - name: typing.Literal["OrganizationMarkingNotSupported"] - parameters: OrganizationMarkingNotSupportedParameters - error_instance_id: str - - -class OrganizationsNotFoundParameters(typing_extensions.TypedDict): - """At least one organization RID could not be found.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - organizationRids: typing.List[core_models.OrganizationRid] - - -@dataclass -class OrganizationsNotFound(errors.NotFoundError): - name: typing.Literal["OrganizationsNotFound"] - parameters: OrganizationsNotFoundParameters - error_instance_id: str - - -class PathNotFoundParameters(typing_extensions.TypedDict): - """The given path could not be found.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - path: filesystem_models.ResourcePath - - -@dataclass -class PathNotFound(errors.NotFoundError): - name: typing.Literal["PathNotFound"] - parameters: PathNotFoundParameters - error_instance_id: str - - -class PermanentlyDeleteResourcePermissionDeniedParameters(typing_extensions.TypedDict): - """Could not permanentlyDelete the Resource.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - resourceRid: filesystem_models.ResourceRid - - -@dataclass -class PermanentlyDeleteResourcePermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["PermanentlyDeleteResourcePermissionDenied"] - parameters: PermanentlyDeleteResourcePermissionDeniedParameters - error_instance_id: str - - -class ProjectCreationNotSupportedParameters(typing_extensions.TypedDict): - """Project creation is not supported in the current user's space.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - spaceRid: filesystem_models.SpaceRid - - -@dataclass -class ProjectCreationNotSupported(errors.BadRequestError): - name: typing.Literal["ProjectCreationNotSupported"] - parameters: ProjectCreationNotSupportedParameters - error_instance_id: str - - -class ProjectNameAlreadyExistsParameters(typing_extensions.TypedDict): - """The requested display name for the created project is already being used in the space.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - displayName: filesystem_models.ResourceDisplayName - spaceRid: filesystem_models.SpaceRid - - -@dataclass -class ProjectNameAlreadyExists(errors.ConflictError): - name: typing.Literal["ProjectNameAlreadyExists"] - parameters: ProjectNameAlreadyExistsParameters - error_instance_id: str - - -class ProjectNotFoundParameters(typing_extensions.TypedDict): - """The given Project could not be found.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - projectRid: filesystem_models.ProjectRid - - -@dataclass -class ProjectNotFound(errors.NotFoundError): - name: typing.Literal["ProjectNotFound"] - parameters: ProjectNotFoundParameters - error_instance_id: str - - -class ProjectTemplateNotFoundParameters(typing_extensions.TypedDict): - """The project template RID referenced cannot be found.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - projectTemplateRid: filesystem_models.ProjectTemplateRid - - -@dataclass -class ProjectTemplateNotFound(errors.NotFoundError): - name: typing.Literal["ProjectTemplateNotFound"] - parameters: ProjectTemplateNotFoundParameters - error_instance_id: str - - -class RemoveMarkingsPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not removeMarkings the Resource.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - resourceRid: filesystem_models.ResourceRid - - -@dataclass -class RemoveMarkingsPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["RemoveMarkingsPermissionDenied"] - parameters: RemoveMarkingsPermissionDeniedParameters - error_instance_id: str - - -class RemoveOrganizationsPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not removeOrganizations the Project.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - projectRid: filesystem_models.ProjectRid - - -@dataclass -class RemoveOrganizationsPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["RemoveOrganizationsPermissionDenied"] - parameters: RemoveOrganizationsPermissionDeniedParameters - error_instance_id: str - - -class RemoveResourceRolesPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not remove the ResourceRole.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - resourceRid: filesystem_models.ResourceRid - - -@dataclass -class RemoveResourceRolesPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["RemoveResourceRolesPermissionDenied"] - parameters: RemoveResourceRolesPermissionDeniedParameters - error_instance_id: str - - -class ReplaceProjectPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not replace the Project.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - projectRid: filesystem_models.ProjectRid - - -@dataclass -class ReplaceProjectPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["ReplaceProjectPermissionDenied"] - parameters: ReplaceProjectPermissionDeniedParameters - error_instance_id: str - - -class ReplaceSpacePermissionDeniedParameters(typing_extensions.TypedDict): - """Could not replace the Space.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - spaceRid: filesystem_models.SpaceRid - - -@dataclass -class ReplaceSpacePermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["ReplaceSpacePermissionDenied"] - parameters: ReplaceSpacePermissionDeniedParameters - error_instance_id: str - - -class ReservedSpaceCannotBeReplacedParameters(typing_extensions.TypedDict): - """The spaceRid provided is for a reserved space in Foundry which cannot be replaced.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class ReservedSpaceCannotBeReplaced(errors.BadRequestError): - name: typing.Literal["ReservedSpaceCannotBeReplaced"] - parameters: ReservedSpaceCannotBeReplacedParameters - error_instance_id: str - - -class ResourceNameAlreadyExistsParameters(typing_extensions.TypedDict): - """The provided resource name is already in use by another resource in the same folder.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - parentFolderRid: filesystem_models.FolderRid - displayName: str - - -@dataclass -class ResourceNameAlreadyExists(errors.ConflictError): - name: typing.Literal["ResourceNameAlreadyExists"] - parameters: ResourceNameAlreadyExistsParameters - error_instance_id: str - - -class ResourceNotDirectlyTrashedParameters(typing_extensions.TypedDict): - """The Resource is not directly trashed.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - resourceRid: filesystem_models.ResourceRid - - -@dataclass -class ResourceNotDirectlyTrashed(errors.BadRequestError): - name: typing.Literal["ResourceNotDirectlyTrashed"] - parameters: ResourceNotDirectlyTrashedParameters - error_instance_id: str - - -class ResourceNotFoundParameters(typing_extensions.TypedDict): - """The given Resource could not be found.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - resourceRid: filesystem_models.ResourceRid - - -@dataclass -class ResourceNotFound(errors.NotFoundError): - name: typing.Literal["ResourceNotFound"] - parameters: ResourceNotFoundParameters - error_instance_id: str - - -class ResourceNotTrashedParameters(typing_extensions.TypedDict): - """The Resource should be directly trashed before being permanently deleted.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - resourceRid: filesystem_models.ResourceRid - - -@dataclass -class ResourceNotTrashed(errors.BadRequestError): - name: typing.Literal["ResourceNotTrashed"] - parameters: ResourceNotTrashedParameters - error_instance_id: str - - -class RestoreResourcePermissionDeniedParameters(typing_extensions.TypedDict): - """Could not restore the Resource.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - resourceRid: filesystem_models.ResourceRid - - -@dataclass -class RestoreResourcePermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["RestoreResourcePermissionDenied"] - parameters: RestoreResourcePermissionDeniedParameters - error_instance_id: str - - -class RoleSetNotFoundParameters(typing_extensions.TypedDict): - """The role set provided in the request to create or replace a space could not be found.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - roleSetRid: core_models.RoleSetId - - -@dataclass -class RoleSetNotFound(errors.NotFoundError): - name: typing.Literal["RoleSetNotFound"] - parameters: RoleSetNotFoundParameters - error_instance_id: str - - -class SpaceInternalErrorParameters(typing_extensions.TypedDict): - """An internal error occurred when trying to create or replace the space.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class SpaceInternalError(errors.InternalServerError): - name: typing.Literal["SpaceInternalError"] - parameters: SpaceInternalErrorParameters - error_instance_id: str - - -class SpaceInvalidArgumentParameters(typing_extensions.TypedDict): - """An invalid argument was provided in the request to create or replace a space.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class SpaceInvalidArgument(errors.BadRequestError): - name: typing.Literal["SpaceInvalidArgument"] - parameters: SpaceInvalidArgumentParameters - error_instance_id: str - - -class SpaceNameInvalidParameters(typing_extensions.TypedDict): - """The provided space name is invalid. It may be a reserved name or contain invalid characters.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class SpaceNameInvalid(errors.BadRequestError): - name: typing.Literal["SpaceNameInvalid"] - parameters: SpaceNameInvalidParameters - error_instance_id: str - - -class SpaceNotEmptyParameters(typing_extensions.TypedDict): - """The space cannot be deleted because it contains resources.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - spaceRid: filesystem_models.SpaceRid - - -@dataclass -class SpaceNotEmpty(errors.InternalServerError): - name: typing.Literal["SpaceNotEmpty"] - parameters: SpaceNotEmptyParameters - error_instance_id: str - - -class SpaceNotFoundParameters(typing_extensions.TypedDict): - """The given Space could not be found.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - spaceRid: filesystem_models.SpaceRid - - -@dataclass -class SpaceNotFound(errors.NotFoundError): - name: typing.Literal["SpaceNotFound"] - parameters: SpaceNotFoundParameters - error_instance_id: str - - -class TemplateGroupNameConflictParameters(typing_extensions.TypedDict): - """Creating the project from template would attempt to create new groups with names conflicting either with other new groups, or existing groups.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - conflictingGroupNames: typing.List[core_models.GroupName] - - -@dataclass -class TemplateGroupNameConflict(errors.ConflictError): - name: typing.Literal["TemplateGroupNameConflict"] - parameters: TemplateGroupNameConflictParameters - error_instance_id: str - - -class TemplateMarkingNameConflictParameters(typing_extensions.TypedDict): - """Creating the project from template would attempt to create new markings with names conflicting either with other new markings, or existing markings.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - conflictingMarkingNames: typing.List[str] - - -@dataclass -class TemplateMarkingNameConflict(errors.ConflictError): - name: typing.Literal["TemplateMarkingNameConflict"] - parameters: TemplateMarkingNameConflictParameters - error_instance_id: str - - -class TrashingAutosavedResourcesNotSupportedParameters(typing_extensions.TypedDict): - """Auto-saved Resources cannot be trashed.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - resourceRid: filesystem_models.ResourceRid - - -@dataclass -class TrashingAutosavedResourcesNotSupported(errors.BadRequestError): - name: typing.Literal["TrashingAutosavedResourcesNotSupported"] - parameters: TrashingAutosavedResourcesNotSupportedParameters - error_instance_id: str - - -class TrashingHiddenResourcesNotSupportedParameters(typing_extensions.TypedDict): - """Hidden Resources cannot be trashed.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - resourceRid: filesystem_models.ResourceRid - - -@dataclass -class TrashingHiddenResourcesNotSupported(errors.BadRequestError): - name: typing.Literal["TrashingHiddenResourcesNotSupported"] - parameters: TrashingHiddenResourcesNotSupportedParameters - error_instance_id: str - - -class TrashingSpaceNotSupportedParameters(typing_extensions.TypedDict): - """Spaces cannot be trashed.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - resourceRid: filesystem_models.ResourceRid - - -@dataclass -class TrashingSpaceNotSupported(errors.BadRequestError): - name: typing.Literal["TrashingSpaceNotSupported"] - parameters: TrashingSpaceNotSupportedParameters - error_instance_id: str - - -class UsageAccountServiceIsNotPresentParameters(typing_extensions.TypedDict): - """The Usage Accounts service is unexpectedly not present.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class UsageAccountServiceIsNotPresent(errors.InternalServerError): - name: typing.Literal["UsageAccountServiceIsNotPresent"] - parameters: UsageAccountServiceIsNotPresentParameters - error_instance_id: str - - -__all__ = [ - "AddGroupToParentGroupPermissionDenied", - "AddMarkingsPermissionDenied", - "AddOrganizationsPermissionDenied", - "AddResourceRolesPermissionDenied", - "CreateFolderOutsideProjectNotSupported", - "CreateFolderPermissionDenied", - "CreateGroupPermissionDenied", - "CreateProjectFromTemplatePermissionDenied", - "CreateProjectNoOwnerLikeRoleGrant", - "CreateProjectPermissionDenied", - "CreateSpacePermissionDenied", - "DefaultRolesNotInSpaceRoleSet", - "DeleteResourcePermissionDenied", - "DeleteSpacePermissionDenied", - "EnrollmentNotFound", - "FolderNotFound", - "ForbiddenOperationOnAutosavedResource", - "ForbiddenOperationOnHiddenResource", - "GetAccessRequirementsPermissionDenied", - "GetByPathPermissionDenied", - "GetRootFolderNotSupported", - "GetSpaceResourceNotSupported", - "InvalidDefaultRoles", - "InvalidDescription", - "InvalidDisplayName", - "InvalidFolder", - "InvalidOrganizationHierarchy", - "InvalidOrganizations", - "InvalidPath", - "InvalidPrincipalIdsForGroupTemplate", - "InvalidRoleIds", - "InvalidVariable", - "InvalidVariableEnumOption", - "MarkingNotFound", - "MissingDisplayName", - "MissingVariableValue", - "NotAuthorizedToApplyOrganization", - "OrganizationCannotBeRemoved", - "OrganizationMarkingNotOnSpace", - "OrganizationMarkingNotSupported", - "OrganizationsNotFound", - "PathNotFound", - "PermanentlyDeleteResourcePermissionDenied", - "ProjectCreationNotSupported", - "ProjectNameAlreadyExists", - "ProjectNotFound", - "ProjectTemplateNotFound", - "RemoveMarkingsPermissionDenied", - "RemoveOrganizationsPermissionDenied", - "RemoveResourceRolesPermissionDenied", - "ReplaceProjectPermissionDenied", - "ReplaceSpacePermissionDenied", - "ReservedSpaceCannotBeReplaced", - "ResourceNameAlreadyExists", - "ResourceNotDirectlyTrashed", - "ResourceNotFound", - "ResourceNotTrashed", - "RestoreResourcePermissionDenied", - "RoleSetNotFound", - "SpaceInternalError", - "SpaceInvalidArgument", - "SpaceNameInvalid", - "SpaceNotEmpty", - "SpaceNotFound", - "TemplateGroupNameConflict", - "TemplateMarkingNameConflict", - "TrashingAutosavedResourcesNotSupported", - "TrashingHiddenResourcesNotSupported", - "TrashingSpaceNotSupported", - "UsageAccountServiceIsNotPresent", -] diff --git a/foundry_sdk/v2/filesystem/folder.py b/foundry_sdk/v2/filesystem/folder.py deleted file mode 100644 index ee728bc80..000000000 --- a/foundry_sdk/v2/filesystem/folder.py +++ /dev/null @@ -1,598 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing - -import annotated_types -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v2.core import models as core_models -from foundry_sdk.v2.filesystem import errors as filesystem_errors -from foundry_sdk.v2.filesystem import models as filesystem_models - - -class FolderClient: - """ - The API client for the Folder Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _FolderClientStreaming(self) - self.with_raw_response = _FolderClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def children( - self, - folder_rid: filesystem_models.FolderRid, - *, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.ResourceIterator[filesystem_models.Resource]: - """ - List all child Resources of the Folder. - - This is a paged endpoint. The page size will be limited to 2,000 results per page. If no page size is - provided, this page size will also be used as the default. - - :param folder_rid: - :type folder_rid: FolderRid - :param page_size: The page size to use for the endpoint. - :type page_size: Optional[PageSize] - :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. - :type page_token: Optional[PageToken] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.ResourceIterator[filesystem_models.Resource] - - :raises FolderNotFound: The given Folder could not be found. - :raises GetRootFolderNotSupported: Getting the root folder as a resource is not supported. - :raises GetSpaceResourceNotSupported: Getting a space as a resource is not supported. - :raises InvalidFolder: The given Resource is not a Folder. - :raises ResourceNotFound: The given Resource could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/filesystem/folders/{folderRid}/children", - query_params={ - "pageSize": page_size, - "pageToken": page_token, - "preview": preview, - }, - path_params={ - "folderRid": folder_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=filesystem_models.ListChildrenOfFolderResponse, - request_timeout=request_timeout, - throwable_errors={ - "FolderNotFound": filesystem_errors.FolderNotFound, - "GetRootFolderNotSupported": filesystem_errors.GetRootFolderNotSupported, - "GetSpaceResourceNotSupported": filesystem_errors.GetSpaceResourceNotSupported, - "InvalidFolder": filesystem_errors.InvalidFolder, - "ResourceNotFound": filesystem_errors.ResourceNotFound, - }, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def create( - self, - *, - display_name: filesystem_models.ResourceDisplayName, - parent_folder_rid: filesystem_models.FolderRid, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> filesystem_models.Folder: - """ - Creates a new Folder. - :param display_name: - :type display_name: ResourceDisplayName - :param parent_folder_rid: The parent folder Resource Identifier (RID). For Projects, this will be the Space RID and for Spaces, this value will be the root folder (`ri.compass.main.folder.0`). - :type parent_folder_rid: FolderRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: filesystem_models.Folder - - :raises CreateFolderOutsideProjectNotSupported: The given Resource is not a folder. - :raises CreateFolderPermissionDenied: Could not create the Folder. - :raises FolderNotFound: The given Folder could not be found. - :raises GetRootFolderNotSupported: Getting the root folder as a resource is not supported. - :raises InvalidDisplayName: The display name of a Resource should not be exactly `.` or `..`, contain a forward slash `/` and must be less than or equal to 700 characters. - :raises InvalidFolder: The given Resource is not a Folder. - :raises MissingDisplayName: A Display Name must be provided. - :raises ResourceNameAlreadyExists: The provided resource name is already in use by another resource in the same folder. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/filesystem/folders", - query_params={ - "preview": preview, - }, - path_params={}, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=filesystem_models.CreateFolderRequest( - parent_folder_rid=parent_folder_rid, - display_name=display_name, - ), - response_type=filesystem_models.Folder, - request_timeout=request_timeout, - throwable_errors={ - "CreateFolderOutsideProjectNotSupported": filesystem_errors.CreateFolderOutsideProjectNotSupported, - "CreateFolderPermissionDenied": filesystem_errors.CreateFolderPermissionDenied, - "FolderNotFound": filesystem_errors.FolderNotFound, - "GetRootFolderNotSupported": filesystem_errors.GetRootFolderNotSupported, - "InvalidDisplayName": filesystem_errors.InvalidDisplayName, - "InvalidFolder": filesystem_errors.InvalidFolder, - "MissingDisplayName": filesystem_errors.MissingDisplayName, - "ResourceNameAlreadyExists": filesystem_errors.ResourceNameAlreadyExists, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - folder_rid: filesystem_models.FolderRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> filesystem_models.Folder: - """ - Get the Folder with the specified rid. - :param folder_rid: - :type folder_rid: FolderRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: filesystem_models.Folder - - :raises FolderNotFound: The given Folder could not be found. - :raises GetRootFolderNotSupported: Getting the root folder as a resource is not supported. - :raises InvalidFolder: The given Resource is not a Folder. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/filesystem/folders/{folderRid}", - query_params={ - "preview": preview, - }, - path_params={ - "folderRid": folder_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=filesystem_models.Folder, - request_timeout=request_timeout, - throwable_errors={ - "FolderNotFound": filesystem_errors.FolderNotFound, - "GetRootFolderNotSupported": filesystem_errors.GetRootFolderNotSupported, - "InvalidFolder": filesystem_errors.InvalidFolder, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get_batch( - self, - body: typing_extensions.Annotated[ - typing.List[filesystem_models.GetFoldersBatchRequestElement], - annotated_types.Len(min_length=1, max_length=1000), - ], - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> filesystem_models.GetFoldersBatchResponse: - """ - Fetches multiple folders in a single request. - - - The maximum batch size for this endpoint is 1000. - :param body: Body of the request - :type body: List[GetFoldersBatchRequestElement] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: filesystem_models.GetFoldersBatchResponse - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/filesystem/folders/getBatch", - query_params={ - "preview": preview, - }, - path_params={}, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=body, - response_type=filesystem_models.GetFoldersBatchResponse, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _FolderClientRaw: - def __init__(self, client: FolderClient) -> None: - def children(_: filesystem_models.ListChildrenOfFolderResponse): ... - def create(_: filesystem_models.Folder): ... - def get(_: filesystem_models.Folder): ... - def get_batch(_: filesystem_models.GetFoldersBatchResponse): ... - - self.children = core.with_raw_response(children, client.children) - self.create = core.with_raw_response(create, client.create) - self.get = core.with_raw_response(get, client.get) - self.get_batch = core.with_raw_response(get_batch, client.get_batch) - - -class _FolderClientStreaming: - def __init__(self, client: FolderClient) -> None: - def children(_: filesystem_models.ListChildrenOfFolderResponse): ... - def create(_: filesystem_models.Folder): ... - def get(_: filesystem_models.Folder): ... - def get_batch(_: filesystem_models.GetFoldersBatchResponse): ... - - self.children = core.with_streaming_response(children, client.children) - self.create = core.with_streaming_response(create, client.create) - self.get = core.with_streaming_response(get, client.get) - self.get_batch = core.with_streaming_response(get_batch, client.get_batch) - - -class AsyncFolderClient: - """ - The API client for the Folder Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AsyncFolderClientStreaming(self) - self.with_raw_response = _AsyncFolderClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def children( - self, - folder_rid: filesystem_models.FolderRid, - *, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.AsyncResourceIterator[filesystem_models.Resource]: - """ - List all child Resources of the Folder. - - This is a paged endpoint. The page size will be limited to 2,000 results per page. If no page size is - provided, this page size will also be used as the default. - - :param folder_rid: - :type folder_rid: FolderRid - :param page_size: The page size to use for the endpoint. - :type page_size: Optional[PageSize] - :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. - :type page_token: Optional[PageToken] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.AsyncResourceIterator[filesystem_models.Resource] - - :raises FolderNotFound: The given Folder could not be found. - :raises GetRootFolderNotSupported: Getting the root folder as a resource is not supported. - :raises GetSpaceResourceNotSupported: Getting a space as a resource is not supported. - :raises InvalidFolder: The given Resource is not a Folder. - :raises ResourceNotFound: The given Resource could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/filesystem/folders/{folderRid}/children", - query_params={ - "pageSize": page_size, - "pageToken": page_token, - "preview": preview, - }, - path_params={ - "folderRid": folder_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=filesystem_models.ListChildrenOfFolderResponse, - request_timeout=request_timeout, - throwable_errors={ - "FolderNotFound": filesystem_errors.FolderNotFound, - "GetRootFolderNotSupported": filesystem_errors.GetRootFolderNotSupported, - "GetSpaceResourceNotSupported": filesystem_errors.GetSpaceResourceNotSupported, - "InvalidFolder": filesystem_errors.InvalidFolder, - "ResourceNotFound": filesystem_errors.ResourceNotFound, - }, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def create( - self, - *, - display_name: filesystem_models.ResourceDisplayName, - parent_folder_rid: filesystem_models.FolderRid, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[filesystem_models.Folder]: - """ - Creates a new Folder. - :param display_name: - :type display_name: ResourceDisplayName - :param parent_folder_rid: The parent folder Resource Identifier (RID). For Projects, this will be the Space RID and for Spaces, this value will be the root folder (`ri.compass.main.folder.0`). - :type parent_folder_rid: FolderRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[filesystem_models.Folder] - - :raises CreateFolderOutsideProjectNotSupported: The given Resource is not a folder. - :raises CreateFolderPermissionDenied: Could not create the Folder. - :raises FolderNotFound: The given Folder could not be found. - :raises GetRootFolderNotSupported: Getting the root folder as a resource is not supported. - :raises InvalidDisplayName: The display name of a Resource should not be exactly `.` or `..`, contain a forward slash `/` and must be less than or equal to 700 characters. - :raises InvalidFolder: The given Resource is not a Folder. - :raises MissingDisplayName: A Display Name must be provided. - :raises ResourceNameAlreadyExists: The provided resource name is already in use by another resource in the same folder. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/filesystem/folders", - query_params={ - "preview": preview, - }, - path_params={}, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=filesystem_models.CreateFolderRequest( - parent_folder_rid=parent_folder_rid, - display_name=display_name, - ), - response_type=filesystem_models.Folder, - request_timeout=request_timeout, - throwable_errors={ - "CreateFolderOutsideProjectNotSupported": filesystem_errors.CreateFolderOutsideProjectNotSupported, - "CreateFolderPermissionDenied": filesystem_errors.CreateFolderPermissionDenied, - "FolderNotFound": filesystem_errors.FolderNotFound, - "GetRootFolderNotSupported": filesystem_errors.GetRootFolderNotSupported, - "InvalidDisplayName": filesystem_errors.InvalidDisplayName, - "InvalidFolder": filesystem_errors.InvalidFolder, - "MissingDisplayName": filesystem_errors.MissingDisplayName, - "ResourceNameAlreadyExists": filesystem_errors.ResourceNameAlreadyExists, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - folder_rid: filesystem_models.FolderRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[filesystem_models.Folder]: - """ - Get the Folder with the specified rid. - :param folder_rid: - :type folder_rid: FolderRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[filesystem_models.Folder] - - :raises FolderNotFound: The given Folder could not be found. - :raises GetRootFolderNotSupported: Getting the root folder as a resource is not supported. - :raises InvalidFolder: The given Resource is not a Folder. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/filesystem/folders/{folderRid}", - query_params={ - "preview": preview, - }, - path_params={ - "folderRid": folder_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=filesystem_models.Folder, - request_timeout=request_timeout, - throwable_errors={ - "FolderNotFound": filesystem_errors.FolderNotFound, - "GetRootFolderNotSupported": filesystem_errors.GetRootFolderNotSupported, - "InvalidFolder": filesystem_errors.InvalidFolder, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get_batch( - self, - body: typing_extensions.Annotated[ - typing.List[filesystem_models.GetFoldersBatchRequestElement], - annotated_types.Len(min_length=1, max_length=1000), - ], - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[filesystem_models.GetFoldersBatchResponse]: - """ - Fetches multiple folders in a single request. - - - The maximum batch size for this endpoint is 1000. - :param body: Body of the request - :type body: List[GetFoldersBatchRequestElement] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[filesystem_models.GetFoldersBatchResponse] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/filesystem/folders/getBatch", - query_params={ - "preview": preview, - }, - path_params={}, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=body, - response_type=filesystem_models.GetFoldersBatchResponse, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _AsyncFolderClientRaw: - def __init__(self, client: AsyncFolderClient) -> None: - def children(_: filesystem_models.ListChildrenOfFolderResponse): ... - def create(_: filesystem_models.Folder): ... - def get(_: filesystem_models.Folder): ... - def get_batch(_: filesystem_models.GetFoldersBatchResponse): ... - - self.children = core.async_with_raw_response(children, client.children) - self.create = core.async_with_raw_response(create, client.create) - self.get = core.async_with_raw_response(get, client.get) - self.get_batch = core.async_with_raw_response(get_batch, client.get_batch) - - -class _AsyncFolderClientStreaming: - def __init__(self, client: AsyncFolderClient) -> None: - def children(_: filesystem_models.ListChildrenOfFolderResponse): ... - def create(_: filesystem_models.Folder): ... - def get(_: filesystem_models.Folder): ... - def get_batch(_: filesystem_models.GetFoldersBatchResponse): ... - - self.children = core.async_with_streaming_response(children, client.children) - self.create = core.async_with_streaming_response(create, client.create) - self.get = core.async_with_streaming_response(get, client.get) - self.get_batch = core.async_with_streaming_response(get_batch, client.get_batch) diff --git a/foundry_sdk/v2/filesystem/models.py b/foundry_sdk/v2/filesystem/models.py deleted file mode 100644 index 881589b68..000000000 --- a/foundry_sdk/v2/filesystem/models.py +++ /dev/null @@ -1,668 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -from __future__ import annotations - -import typing - -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk.v2.core import models as core_models - - -class AccessRequirements(core.ModelBase): - """ - Access requirements for a resource are composed of Markings and Organizations. Organizations are disjunctive, - while Markings are conjunctive. - """ - - organizations: typing.List[Organization] - markings: typing.List[Marking] - - -class AddMarkingsRequest(core.ModelBase): - """AddMarkingsRequest""" - - marking_ids: typing.List[core_models.MarkingId] = pydantic.Field(alias=str("markingIds")) # type: ignore[literal-required] - - -class AddOrganizationsRequest(core.ModelBase): - """AddOrganizationsRequest""" - - organization_rids: typing.List[core_models.OrganizationRid] = pydantic.Field(alias=str("organizationRids")) # type: ignore[literal-required] - - -class AddResourceRolesRequest(core.ModelBase): - """AddResourceRolesRequest""" - - roles: typing.List[ResourceRoleIdentifier] - - -class CreateFolderRequest(core.ModelBase): - """CreateFolderRequest""" - - parent_folder_rid: FolderRid = pydantic.Field(alias=str("parentFolderRid")) # type: ignore[literal-required] - """ - The parent folder Resource Identifier (RID). For Projects, this will be the Space RID and for Spaces, - this value will be the root folder (`ri.compass.main.folder.0`). - """ - - display_name: ResourceDisplayName = pydantic.Field(alias=str("displayName")) # type: ignore[literal-required] - - -class CreateProjectFromTemplateRequest(core.ModelBase): - """CreateProjectFromTemplateRequest""" - - template_rid: ProjectTemplateRid = pydantic.Field(alias=str("templateRid")) # type: ignore[literal-required] - variable_values: typing.Dict[ProjectTemplateVariableId, ProjectTemplateVariableValue] = pydantic.Field(alias=str("variableValues")) # type: ignore[literal-required] - default_roles: typing.Optional[typing.List[core_models.RoleId]] = pydantic.Field(alias=str("defaultRoles"), default=None) # type: ignore[literal-required] - organization_rids: typing.Optional[typing.List[core_models.OrganizationRid]] = pydantic.Field(alias=str("organizationRids"), default=None) # type: ignore[literal-required] - project_description: typing.Optional[str] = pydantic.Field(alias=str("projectDescription"), default=None) # type: ignore[literal-required] - - -class CreateProjectRequest(core.ModelBase): - """CreateProjectRequest""" - - display_name: ResourceDisplayName = pydantic.Field(alias=str("displayName")) # type: ignore[literal-required] - description: typing.Optional[str] = None - space_rid: SpaceRid = pydantic.Field(alias=str("spaceRid")) # type: ignore[literal-required] - role_grants: typing.Dict[core_models.RoleId, typing.List[PrincipalWithId]] = pydantic.Field(alias=str("roleGrants")) # type: ignore[literal-required] - default_roles: typing.List[core_models.RoleId] = pydantic.Field(alias=str("defaultRoles")) # type: ignore[literal-required] - organization_rids: typing.List[core_models.OrganizationRid] = pydantic.Field(alias=str("organizationRids")) # type: ignore[literal-required] - - -class CreateSpaceRequest(core.ModelBase): - """CreateSpaceRequest""" - - enrollment_rid: core_models.EnrollmentRid = pydantic.Field(alias=str("enrollmentRid")) # type: ignore[literal-required] - """The RID of the Enrollment that this Space belongs to.""" - - usage_account_rid: typing.Optional[UsageAccountRid] = pydantic.Field(alias=str("usageAccountRid"), default=None) # type: ignore[literal-required] - """The RID of the Usage Account for this Space. Resource usage for projects in this space will accrue to this Usage Account by default. If not provided, the default Usage Account for this Enrollment will be used.""" - - file_system_id: typing.Optional[FileSystemId] = pydantic.Field(alias=str("fileSystemId"), default=None) # type: ignore[literal-required] - """The ID of the Filesystem for this Space, which is where the contents of the Space are stored. If not provided, the default Filesystem for this Enrollment will be used.""" - - display_name: ResourceDisplayName = pydantic.Field(alias=str("displayName")) # type: ignore[literal-required] - organizations: typing.List[core_models.OrganizationRid] - """The list of Organizations that are provisioned access to this Space. In order to access this Space, a user must be a member of at least one of these Organizations.""" - - description: typing.Optional[str] = None - """The description of the Space.""" - - deletion_policy_organizations: typing.List[core_models.OrganizationRid] = pydantic.Field(alias=str("deletionPolicyOrganizations")) # type: ignore[literal-required] - """By default, this Space will use a Last Out deletion policy, meaning that this Space and its projects will be deleted when the last Organization listed here is deleted. Only Organizations in the Space's Enrollment can be included here.""" - - default_role_set_id: typing.Optional[core_models.RoleSetId] = pydantic.Field(alias=str("defaultRoleSetId"), default=None) # type: ignore[literal-required] - """The ID of the default Role Set for this Space, which defines the set of roles that Projects in this Space must use. If not provided, the default Role Set for Projects will be used.""" - - -class Everyone(core.ModelBase): - """A principal representing all users of the platform.""" - - type: typing.Literal["everyone"] = "everyone" - - -FileSystemId = str -"""The ID of the filesystem that will be used for all projects in the Space.""" - - -class Folder(core.ModelBase): - """Folder""" - - rid: FolderRid - display_name: ResourceDisplayName = pydantic.Field(alias=str("displayName")) # type: ignore[literal-required] - description: typing.Optional[str] = None - """The description associated with the Folder.""" - - documentation: typing.Optional[str] = None - """The documentation associated with the Folder.""" - - path: ResourcePath - type: FolderType - created_by: core_models.CreatedBy = pydantic.Field(alias=str("createdBy")) # type: ignore[literal-required] - updated_by: core_models.UpdatedBy = pydantic.Field(alias=str("updatedBy")) # type: ignore[literal-required] - created_time: core_models.CreatedTime = pydantic.Field(alias=str("createdTime")) # type: ignore[literal-required] - updated_time: core_models.UpdatedTime = pydantic.Field(alias=str("updatedTime")) # type: ignore[literal-required] - trash_status: TrashStatus = pydantic.Field(alias=str("trashStatus")) # type: ignore[literal-required] - """ - The trash status of the Folder. If trashed, this could either be because the Folder itself has been - trashed or because one of its ancestors has been trashed. - """ - - parent_folder_rid: FolderRid = pydantic.Field(alias=str("parentFolderRid")) # type: ignore[literal-required] - """ - The parent folder Resource Identifier (RID). For Projects, this will be the Space RID and for Spaces, - this value will be the root folder (`ri.compass.main.folder.0`). - """ - - project_rid: typing.Optional[ProjectRid] = pydantic.Field(alias=str("projectRid"), default=None) # type: ignore[literal-required] - """ - The Project Resource Identifier (RID) that the Folder lives in. If the Folder is a Space, this value will - not be defined. - """ - - space_rid: SpaceRid = pydantic.Field(alias=str("spaceRid")) # type: ignore[literal-required] - """ - The Space Resource Identifier (RID) that the Folder lives in. If the Folder is a Space, this value will - be the same as the Folder RID. - """ - - -FolderRid = core.RID -"""The unique resource identifier (RID) of a Folder.""" - - -FolderType = typing.Literal["FOLDER", "SPACE", "PROJECT"] -""" -A folder can be a regular Folder, a -[Project](https://palantir.com/docs/foundry/getting-started/projects-and-resources/#projects) or a -[Space](https://palantir.com/docs/foundry/security/orgs-and-spaces/#spaces). -""" - - -class GetByPathResourcesBatchRequestElement(core.ModelBase): - """GetByPathResourcesBatchRequestElement""" - - path: ResourcePath - """The path to the Resource. The leading slash is optional.""" - - -class GetByPathResourcesBatchResponse(core.ModelBase): - """GetByPathResourcesBatchResponse""" - - data: typing.List[Resource] - - -class GetFoldersBatchRequestElement(core.ModelBase): - """GetFoldersBatchRequestElement""" - - folder_rid: FolderRid = pydantic.Field(alias=str("folderRid")) # type: ignore[literal-required] - - -class GetFoldersBatchResponse(core.ModelBase): - """GetFoldersBatchResponse""" - - data: typing.Dict[FolderRid, Folder] - - -class GetResourcesBatchRequestElement(core.ModelBase): - """GetResourcesBatchRequestElement""" - - resource_rid: ResourceRid = pydantic.Field(alias=str("resourceRid")) # type: ignore[literal-required] - - -class GetResourcesBatchResponse(core.ModelBase): - """GetResourcesBatchResponse""" - - data: typing.Dict[ResourceRid, Resource] - - -IsDirectlyApplied = bool -""" -Boolean flag to indicate if the marking is directly applied to the resource, or if it's applied -to a parent resource and inherited by the current resource. -""" - - -class ListChildrenOfFolderResponse(core.ModelBase): - """ListChildrenOfFolderResponse""" - - data: typing.List[Resource] - next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] - - -class ListMarkingsOfResourceResponse(core.ModelBase): - """ListMarkingsOfResourceResponse""" - - data: typing.List[core_models.MarkingId] - next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] - - -class ListOrganizationsOfProjectResponse(core.ModelBase): - """ListOrganizationsOfProjectResponse""" - - data: typing.List[core_models.OrganizationRid] - next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] - - -class ListResourceRolesResponse(core.ModelBase): - """ListResourceRolesResponse""" - - data: typing.List[ResourceRole] - next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] - - -class ListSpacesResponse(core.ModelBase): - """ListSpacesResponse""" - - data: typing.List[Space] - next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] - - -class Marking(core.ModelBase): - """ - [Markings](https://palantir.com/docs/foundry/security/markings/) provide an additional level of access control for files, - folders, and Projects within Foundry. Markings define eligibility criteria that restrict visibility - and actions to users who meet those criteria. To access a resource, a user must be a member of all - Markings applied to a resource to access it. - """ - - marking_id: core_models.MarkingId = pydantic.Field(alias=str("markingId")) # type: ignore[literal-required] - is_directly_applied: IsDirectlyApplied = pydantic.Field(alias=str("isDirectlyApplied")) # type: ignore[literal-required] - - -class Organization(core.ModelBase): - """ - [Organizations](https://palantir.com/docs/foundry/security/orgs-and-spaces/#organizations) are access requirements applied to - Projects that enforce strict silos between groups of users and resources. Every user is a member of only - one Organization, but can be a guest member of multiple Organizations. In order to meet access requirements, - users must be a member or guest member of at least one Organization applied to a Project. - Organizations are inherited via the file hierarchy and direct dependencies. - """ - - marking_id: core_models.MarkingId = pydantic.Field(alias=str("markingId")) # type: ignore[literal-required] - organization_rid: core_models.OrganizationRid = pydantic.Field(alias=str("organizationRid")) # type: ignore[literal-required] - is_directly_applied: IsDirectlyApplied = pydantic.Field(alias=str("isDirectlyApplied")) # type: ignore[literal-required] - - -class PrincipalIdOnly(core.ModelBase): - """Represents a principal with just an ID, without the type.""" - - principal_id: core_models.PrincipalId = pydantic.Field(alias=str("principalId")) # type: ignore[literal-required] - type: typing.Literal["principalIdOnly"] = "principalIdOnly" - - -class PrincipalWithId(core.ModelBase): - """Represents a user principal or group principal with an ID.""" - - principal_id: core_models.PrincipalId = pydantic.Field(alias=str("principalId")) # type: ignore[literal-required] - principal_type: core_models.PrincipalType = pydantic.Field(alias=str("principalType")) # type: ignore[literal-required] - type: typing.Literal["principalWithId"] = "principalWithId" - - -class Project(core.ModelBase): - """Project""" - - rid: ProjectRid - display_name: ResourceDisplayName = pydantic.Field(alias=str("displayName")) # type: ignore[literal-required] - """The display name of the Project. Must be unique and cannot contain a /""" - - description: typing.Optional[str] = None - """The description associated with the Project.""" - - documentation: typing.Optional[str] = None - """The documentation associated with the Project.""" - - path: ResourcePath - created_by: core_models.CreatedBy = pydantic.Field(alias=str("createdBy")) # type: ignore[literal-required] - updated_by: core_models.UpdatedBy = pydantic.Field(alias=str("updatedBy")) # type: ignore[literal-required] - created_time: core_models.CreatedTime = pydantic.Field(alias=str("createdTime")) # type: ignore[literal-required] - updated_time: core_models.UpdatedTime = pydantic.Field(alias=str("updatedTime")) # type: ignore[literal-required] - trash_status: TrashStatus = pydantic.Field(alias=str("trashStatus")) # type: ignore[literal-required] - """The trash status of the Project.""" - - space_rid: SpaceRid = pydantic.Field(alias=str("spaceRid")) # type: ignore[literal-required] - """The Space Resource Identifier (RID) that the Project lives in.""" - - -ProjectRid = core.RID -"""The unique resource identifier (RID) of a Project.""" - - -ProjectTemplateRid = core.RID -"""The unique resource identifier (RID) of a project template.""" - - -ProjectTemplateVariableId = str -"""An identifier for a variable used in a project template.""" - - -ProjectTemplateVariableValue = str -"""The value assigned to a variable used in a project template.""" - - -class RemoveMarkingsRequest(core.ModelBase): - """RemoveMarkingsRequest""" - - marking_ids: typing.List[core_models.MarkingId] = pydantic.Field(alias=str("markingIds")) # type: ignore[literal-required] - - -class RemoveOrganizationsRequest(core.ModelBase): - """RemoveOrganizationsRequest""" - - organization_rids: typing.List[core_models.OrganizationRid] = pydantic.Field(alias=str("organizationRids")) # type: ignore[literal-required] - - -class RemoveResourceRolesRequest(core.ModelBase): - """RemoveResourceRolesRequest""" - - roles: typing.List[ResourceRoleIdentifier] - - -class ReplaceProjectRequest(core.ModelBase): - """ReplaceProjectRequest""" - - display_name: ResourceDisplayName = pydantic.Field(alias=str("displayName")) # type: ignore[literal-required] - """The display name of the Project. Must be unique and cannot contain a /""" - - description: typing.Optional[str] = None - """The description associated with the Project.""" - - -class ReplaceSpaceRequest(core.ModelBase): - """ReplaceSpaceRequest""" - - usage_account_rid: typing.Optional[UsageAccountRid] = pydantic.Field(alias=str("usageAccountRid"), default=None) # type: ignore[literal-required] - """The RID of the Usage Account for this Space. Resource usage for projects in this space will accrue to this Usage Account by default. If not provided, the default Usage Account for this Enrollment will be used.""" - - display_name: ResourceDisplayName = pydantic.Field(alias=str("displayName")) # type: ignore[literal-required] - description: typing.Optional[str] = None - """The description of the Space.""" - - default_role_set_id: typing.Optional[core_models.RoleSetId] = pydantic.Field(alias=str("defaultRoleSetId"), default=None) # type: ignore[literal-required] - """The ID of the default Role Set for this Space, which defines the set of roles that Projects in this Space must use. If not provided, the default Role Set for Projects will be used.""" - - -class Resource(core.ModelBase): - """Resource""" - - rid: ResourceRid - display_name: ResourceDisplayName = pydantic.Field(alias=str("displayName")) # type: ignore[literal-required] - """The display name of the Resource""" - - description: typing.Optional[str] = None - """The description of the Resource""" - - documentation: typing.Optional[str] = None - """The documentation associated with the Resource""" - - path: ResourcePath - """The full path to the resource, including the resource name itself""" - - type: ResourceType - """The type of the Resource derived from the Resource Identifier (RID).""" - - created_by: core_models.CreatedBy = pydantic.Field(alias=str("createdBy")) # type: ignore[literal-required] - """The user that created the Resource.""" - - updated_by: core_models.UpdatedBy = pydantic.Field(alias=str("updatedBy")) # type: ignore[literal-required] - """The user that last updated the Resource.""" - - created_time: core_models.CreatedTime = pydantic.Field(alias=str("createdTime")) # type: ignore[literal-required] - """The timestamp that the Resource was last created.""" - - updated_time: core_models.UpdatedTime = pydantic.Field(alias=str("updatedTime")) # type: ignore[literal-required] - """ - The timestamp that the Resource was last modified. For folders, this includes any of its descendants. For - top level folders (spaces and projects), this is not updated by child updates for performance reasons. - """ - - trash_status: TrashStatus = pydantic.Field(alias=str("trashStatus")) # type: ignore[literal-required] - """ - The trash status of the Resource. If trashed, this could either be because the Resource itself has been - trashed or because one of its ancestors has been trashed. - """ - - parent_folder_rid: FolderRid = pydantic.Field(alias=str("parentFolderRid")) # type: ignore[literal-required] - """The parent folder Resource Identifier (RID). For projects, this will be the Space RID.""" - - project_rid: ProjectRid = pydantic.Field(alias=str("projectRid")) # type: ignore[literal-required] - """ - The Project Resource Identifier (RID) that the Resource lives in. If the Resource itself is a - Project, this value will still be populated with the Project RID. - """ - - space_rid: SpaceRid = pydantic.Field(alias=str("spaceRid")) # type: ignore[literal-required] - """The Space Resource Identifier (RID) that the Resource lives in.""" - - -ResourceDisplayName = str -"""The display name of the Resource""" - - -ResourcePath = str -"""The full path to the resource, including the resource name itself""" - - -ResourceRid = core.RID -"""The unique resource identifier (RID) of a Resource.""" - - -class ResourceRole(core.ModelBase): - """ResourceRole""" - - resource_role_principal: ResourceRolePrincipal = pydantic.Field(alias=str("resourceRolePrincipal")) # type: ignore[literal-required] - role_id: core_models.RoleId = pydantic.Field(alias=str("roleId")) # type: ignore[literal-required] - - -class ResourceRoleIdentifier(core.ModelBase): - """A role grant on a resource for add/remove operations that doesn't require specifying the principal type.""" - - resource_role_principal: ResourceRolePrincipalIdentifier = pydantic.Field(alias=str("resourceRolePrincipal")) # type: ignore[literal-required] - role_id: core_models.RoleId = pydantic.Field(alias=str("roleId")) # type: ignore[literal-required] - - -ResourceRolePrincipal = typing_extensions.Annotated[ - typing.Union["PrincipalWithId", "Everyone"], pydantic.Field(discriminator="type") -] -"""ResourceRolePrincipal""" - - -ResourceRolePrincipalIdentifier = typing_extensions.Annotated[ - typing.Union["PrincipalIdOnly", "Everyone"], pydantic.Field(discriminator="type") -] -"""A principal for resource role operations that doesn't require specifying the principal type.""" - - -ResourceType = pydantic.SkipValidation[ - typing.Literal[ - "AIP_PROFILE", - "AIP_AGENTS_AGENT", - "AIP_AGENTS_SESSION", - "AIP_ASSIST_FLOW_CAPTURE", - "AIP_ASSIST_WALKTHROUGH", - "ARTIFACTS_REPOSITORY", - "BELLASO_CIPHER_CHANNEL", - "BELLASO_CIPHER_LICENSE", - "BLACKSMITH_DOCUMENT", - "BLOBSTER_ARCHIVE", - "BLOBSTER_AUDIO", - "BLOBSTER_BLOB", - "BLOBSTER_CODE", - "BLOBSTER_CONFIGURATION", - "BLOBSTER_DOCUMENT", - "BLOBSTER_IMAGE", - "BLOBSTER_JUPYTERNOTEBOOK", - "BLOBSTER_PDF", - "BLOBSTER_PRESENTATION", - "BLOBSTER_SPREADSHEET", - "BLOBSTER_VIDEO", - "BLOBSTER_XML", - "CARBON_WORKSPACE", - "COMPASS_FOLDER", - "COMPASS_WEB_LINK", - "CONTOUR_ANALYSIS", - "DATA_HEALTH_MONITORING_VIEW", - "DECISIONS_EXPLORATION", - "DREDDIE_PIPELINE", - "EDDIE_LOGIC", - "EDDIE_PIPELINE", - "FFORMS_FORM", - "FLOW_WORKFLOW", - "FOUNDRY_DATASET", - "FOUNDRY_DEPLOYED_APP", - "FOUNDRY_ACADEMY_TUTORIAL", - "FOUNDRY_CONTAINER_SERVICE_CONTAINER", - "FOUNDRY_ML_OBJECTIVE", - "FOUNDRY_TEMPLATES_TEMPLATE", - "FUSION_DOCUMENT", - "GEOTIME_CATALOG_INTEGRATION", - "GPS_VIEW", - "HUBBLE_EXPLORATION_LAYOUT", - "HYPERAUTO_INTEGRATION", - "LOGIC_FLOWS_CONNECTED_FLOW", - "MACHINERY_DOCUMENT", - "MAGRITTE_AGENT", - "MAGRITTE_DRIVER", - "MAGRITTE_EXPORT", - "MAGRITTE_SOURCE", - "MARKETPLACE_BLOCK_SET_INSTALLATION", - "MARKETPLACE_BLOCK_SET_REPO", - "MARKETPLACE_LOCAL", - "MARKETPLACE_REMOTE_STORE", - "MIO_MEDIA_SET", - "MODELS_MODEL", - "MODELS_MODEL_VERSION", - "MONOCLE_GRAPH", - "NOTEPAD_NOTEPAD", - "NOTEPAD_NOTEPAD_TEMPLATE", - "OBJECT_SENTINEL_MONITOR", - "OBJECT_SET_VERSIONED_OBJECT_SET", - "OPUS_GRAPH", - "OPUS_GRAPH_TEMPLATE", - "OPUS_MAP", - "OPUS_MAP_LAYER", - "OPUS_MAP_TEMPLATE", - "OPUS_SEARCH_AROUND", - "QUIVER_ANALYSIS", - "QUIVER_ARTIFACT", - "QUIVER_DASHBOARD", - "QUIVER_FUNCTION", - "QUIVER_OBJECT_SET_PATH", - "REPORT_REPORT", - "SLATE_DOCUMENT", - "SOLUTION_DESIGN_DIAGRAM", - "STEMMA_REPOSITORY", - "TABLES_TABLE", - "TAURUS_WORKFLOW", - "THIRD_PARTY_APPLICATIONS_APPLICATION", - "TIME_SERIES_CATALOG_SYNC", - "VECTOR_TEMPLATE", - "VECTOR_WORKBOOK", - "WORKSHOP_MODULE", - "WORKSHOP_STATE", - ] -] - -"""The type of the Resource derived from the Resource Identifier (RID).""" - - -class Space(core.ModelBase): - """Space""" - - rid: SpaceRid - display_name: ResourceDisplayName = pydantic.Field(alias=str("displayName")) # type: ignore[literal-required] - description: typing.Optional[str] = None - """The description of the Space.""" - - path: ResourcePath - file_system_id: FileSystemId = pydantic.Field(alias=str("fileSystemId")) # type: ignore[literal-required] - """The ID of the Filesystem for this Space, which is where the contents of the Space are stored. If not provided, the default Filesystem for this Enrollment will be used.""" - - usage_account_rid: UsageAccountRid = pydantic.Field(alias=str("usageAccountRid")) # type: ignore[literal-required] - """The RID of the Usage Account for this Space. Resource usage for projects in this space will accrue to this Usage Account by default. If not provided, the default Usage Account for this Enrollment will be used.""" - - organizations: typing.List[core_models.OrganizationRid] - """The list of Organizations that are provisioned access to this Space. In order to access this Space, a user must be a member of at least one of these Organizations.""" - - deletion_policy_organizations: typing.List[core_models.OrganizationRid] = pydantic.Field(alias=str("deletionPolicyOrganizations")) # type: ignore[literal-required] - """By default, this Space will use a Last Out deletion policy, meaning that this Space and its projects will be deleted when the last Organization listed here is deleted. Only Organizations in the Space's Enrollment can be included here.""" - - default_role_set_id: core_models.RoleSetId = pydantic.Field(alias=str("defaultRoleSetId")) # type: ignore[literal-required] - """The ID of the default Role Set for this Space, which defines the set of roles that Projects in this Space must use. If not provided, the default Role Set for Projects will be used.""" - - space_maven_identifier: typing.Optional[SpaceMavenIdentifier] = pydantic.Field(alias=str("spaceMavenIdentifier"), default=None) # type: ignore[literal-required] - """The maven identifier used as the prefix to the maven coordinate that uniquely identifies resources published from this space. This is only present if configured in control panel in the space settings.""" - - -SpaceMavenIdentifier = str -"""The maven identifier used as the prefix to the maven coordinate that uniquely identifies resources published from this space.""" - - -SpaceRid = core.RID -"""The unique resource identifier (RID) of a Space.""" - - -TrashStatus = typing.Literal["DIRECTLY_TRASHED", "ANCESTOR_TRASHED", "NOT_TRASHED"] -"""TrashStatus""" - - -UsageAccountRid = core.RID -"""The unique resource identifier (RID) of the usage account that will be used as a default on project creation.""" - - -core.resolve_forward_references(ResourceRolePrincipal, globalns=globals(), localns=locals()) -core.resolve_forward_references( - ResourceRolePrincipalIdentifier, globalns=globals(), localns=locals() -) - -__all__ = [ - "AccessRequirements", - "AddMarkingsRequest", - "AddOrganizationsRequest", - "AddResourceRolesRequest", - "CreateFolderRequest", - "CreateProjectFromTemplateRequest", - "CreateProjectRequest", - "CreateSpaceRequest", - "Everyone", - "FileSystemId", - "Folder", - "FolderRid", - "FolderType", - "GetByPathResourcesBatchRequestElement", - "GetByPathResourcesBatchResponse", - "GetFoldersBatchRequestElement", - "GetFoldersBatchResponse", - "GetResourcesBatchRequestElement", - "GetResourcesBatchResponse", - "IsDirectlyApplied", - "ListChildrenOfFolderResponse", - "ListMarkingsOfResourceResponse", - "ListOrganizationsOfProjectResponse", - "ListResourceRolesResponse", - "ListSpacesResponse", - "Marking", - "Organization", - "PrincipalIdOnly", - "PrincipalWithId", - "Project", - "ProjectRid", - "ProjectTemplateRid", - "ProjectTemplateVariableId", - "ProjectTemplateVariableValue", - "RemoveMarkingsRequest", - "RemoveOrganizationsRequest", - "RemoveResourceRolesRequest", - "ReplaceProjectRequest", - "ReplaceSpaceRequest", - "Resource", - "ResourceDisplayName", - "ResourcePath", - "ResourceRid", - "ResourceRole", - "ResourceRoleIdentifier", - "ResourceRolePrincipal", - "ResourceRolePrincipalIdentifier", - "ResourceType", - "Space", - "SpaceMavenIdentifier", - "SpaceRid", - "TrashStatus", - "UsageAccountRid", -] diff --git a/foundry_sdk/v2/filesystem/project.py b/foundry_sdk/v2/filesystem/project.py deleted file mode 100644 index 33385946c..000000000 --- a/foundry_sdk/v2/filesystem/project.py +++ /dev/null @@ -1,1121 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing - -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v2.core import models as core_models -from foundry_sdk.v2.filesystem import errors as filesystem_errors -from foundry_sdk.v2.filesystem import models as filesystem_models - - -class ProjectClient: - """ - The API client for the Project Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _ProjectClientStreaming(self) - self.with_raw_response = _ProjectClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def add_organizations( - self, - project_rid: filesystem_models.ProjectRid, - *, - organization_rids: typing.List[core_models.OrganizationRid], - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> None: - """ - Adds a list of Organizations to a Project. - :param project_rid: - :type project_rid: ProjectRid - :param organization_rids: - :type organization_rids: List[OrganizationRid] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: None - - :raises AddOrganizationsPermissionDenied: Could not addOrganizations the Project. - :raises InvalidOrganizationHierarchy: Organizations on a project must also exist on the parent space. This error is thrown if the configuration of a project's organizations (on creation or subsequently) results in the project being marked with either no organizations in a marked space, or with an organization that is not present on the parent space. - :raises OrganizationsNotFound: At least one organization RID could not be found. - :raises ProjectNotFound: The given Project could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/filesystem/projects/{projectRid}/addOrganizations", - query_params={ - "preview": preview, - }, - path_params={ - "projectRid": project_rid, - }, - header_params={ - "Content-Type": "application/json", - }, - body=filesystem_models.AddOrganizationsRequest( - organization_rids=organization_rids, - ), - response_type=None, - request_timeout=request_timeout, - throwable_errors={ - "AddOrganizationsPermissionDenied": filesystem_errors.AddOrganizationsPermissionDenied, - "InvalidOrganizationHierarchy": filesystem_errors.InvalidOrganizationHierarchy, - "OrganizationsNotFound": filesystem_errors.OrganizationsNotFound, - "ProjectNotFound": filesystem_errors.ProjectNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def create( - self, - *, - default_roles: typing.List[core_models.RoleId], - display_name: filesystem_models.ResourceDisplayName, - organization_rids: typing.List[core_models.OrganizationRid], - role_grants: typing.Dict[ - core_models.RoleId, typing.List[filesystem_models.PrincipalWithId] - ], - space_rid: filesystem_models.SpaceRid, - description: typing.Optional[str] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> filesystem_models.Project: - """ - Creates a new Project. - - Note that third-party applications using this endpoint via OAuth2 cannot be associated with an - Ontology SDK as this will reduce the scope of operations to only those within specified projects. - When creating the application, select "No, I won't use an Ontology SDK" on the Resources page. - - :param default_roles: - :type default_roles: List[RoleId] - :param display_name: - :type display_name: ResourceDisplayName - :param organization_rids: - :type organization_rids: List[OrganizationRid] - :param role_grants: - :type role_grants: Dict[RoleId, List[PrincipalWithId]] - :param space_rid: - :type space_rid: SpaceRid - :param description: - :type description: Optional[str] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: filesystem_models.Project - - :raises CreateProjectNoOwnerLikeRoleGrant: The create project request would create a project with no principal being granted an owner-like role. As a result, there would be no user with administrative privileges over the project. A role is defined to be owner-like if it has the `compass:edit-project` operation. In the common case of the default role-set, this is just the `compass:manage` role. - :raises CreateProjectPermissionDenied: Could not create the Project. - :raises InvalidDisplayName: The display name of a Resource should not be exactly `.` or `..`, contain a forward slash `/` and must be less than or equal to 700 characters. - :raises InvalidRoleIds: A roleId referenced in either default roles or role grants does not exist in the project role set for the space. - :raises OrganizationMarkingNotOnSpace: At least one of the organization markings associated with a passed organization is not applied on the requested space. - :raises OrganizationsNotFound: At least one organization RID could not be found. - :raises ProjectCreationNotSupported: Project creation is not supported in the current user's space. - :raises ProjectNameAlreadyExists: The requested display name for the created project is already being used in the space. - :raises ProjectNotFound: The given Project could not be found. - :raises SpaceNotFound: The given Space could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/filesystem/projects/create", - query_params={ - "preview": preview, - }, - path_params={}, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=filesystem_models.CreateProjectRequest( - display_name=display_name, - description=description, - space_rid=space_rid, - role_grants=role_grants, - default_roles=default_roles, - organization_rids=organization_rids, - ), - response_type=filesystem_models.Project, - request_timeout=request_timeout, - throwable_errors={ - "CreateProjectNoOwnerLikeRoleGrant": filesystem_errors.CreateProjectNoOwnerLikeRoleGrant, - "CreateProjectPermissionDenied": filesystem_errors.CreateProjectPermissionDenied, - "InvalidDisplayName": filesystem_errors.InvalidDisplayName, - "InvalidRoleIds": filesystem_errors.InvalidRoleIds, - "OrganizationMarkingNotOnSpace": filesystem_errors.OrganizationMarkingNotOnSpace, - "OrganizationsNotFound": filesystem_errors.OrganizationsNotFound, - "ProjectCreationNotSupported": filesystem_errors.ProjectCreationNotSupported, - "ProjectNameAlreadyExists": filesystem_errors.ProjectNameAlreadyExists, - "ProjectNotFound": filesystem_errors.ProjectNotFound, - "SpaceNotFound": filesystem_errors.SpaceNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def create_from_template( - self, - *, - template_rid: filesystem_models.ProjectTemplateRid, - variable_values: typing.Dict[ - filesystem_models.ProjectTemplateVariableId, - filesystem_models.ProjectTemplateVariableValue, - ], - default_roles: typing.Optional[typing.List[core_models.RoleId]] = None, - organization_rids: typing.Optional[typing.List[core_models.OrganizationRid]] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - project_description: typing.Optional[str] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> filesystem_models.Project: - """ - Creates a project from a project template. - :param template_rid: - :type template_rid: ProjectTemplateRid - :param variable_values: - :type variable_values: Dict[ProjectTemplateVariableId, ProjectTemplateVariableValue] - :param default_roles: - :type default_roles: Optional[List[RoleId]] - :param organization_rids: - :type organization_rids: Optional[List[OrganizationRid]] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param project_description: - :type project_description: Optional[str] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: filesystem_models.Project - - :raises AddGroupToParentGroupPermissionDenied: The user is not authorized to add a a group to the parent group required to create the project from template. - :raises CreateGroupPermissionDenied: The user is not authorized to create the group in the organization required to create the project from template. - :raises CreateProjectFromTemplatePermissionDenied: Could not createFromTemplate the Project. - :raises CreateProjectNoOwnerLikeRoleGrant: The create project request would create a project with no principal being granted an owner-like role. As a result, there would be no user with administrative privileges over the project. A role is defined to be owner-like if it has the `compass:edit-project` operation. In the common case of the default role-set, this is just the `compass:manage` role. - :raises DefaultRolesNotInSpaceRoleSet: The requested default roles are not in the role set of the space for the project template. - :raises InvalidDefaultRoles: Either the user has not passed default roles for a template with suggested default roles, or has passed default roles for a template with fixed default roles. - :raises InvalidDescription: Either the user has not passed a value for a template with unset project description, or has passed a value for a template with fixed project description. - :raises InvalidOrganizationHierarchy: Organizations on a project must also exist on the parent space. This error is thrown if the configuration of a project's organizations (on creation or subsequently) results in the project being marked with either no organizations in a marked space, or with an organization that is not present on the parent space. - :raises InvalidOrganizations: Either the user has not passed organizations for a template with suggested organizations, or has passed organization for a template with fixed organizations. - :raises InvalidPrincipalIdsForGroupTemplate: The template requested for project creation contains principal IDs that do not exist. - :raises InvalidVariable: A variable referenced in the request to create project from template is not defined on the template. - :raises InvalidVariableEnumOption: The value passed in the request to create project from template for an enum type variable is not a valid option. - :raises MissingVariableValue: A variable defined on the template requested for project creation does not have a value set in the request. - :raises NotAuthorizedToApplyOrganization: The user is not authorized to apply at least one of the organization markings required to create the project from template. - :raises OrganizationsNotFound: At least one organization RID could not be found. - :raises ProjectNotFound: The given Project could not be found. - :raises ProjectTemplateNotFound: The project template RID referenced cannot be found. - :raises TemplateGroupNameConflict: Creating the project from template would attempt to create new groups with names conflicting either with other new groups, or existing groups. - :raises TemplateMarkingNameConflict: Creating the project from template would attempt to create new markings with names conflicting either with other new markings, or existing markings. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/filesystem/projects/createFromTemplate", - query_params={ - "preview": preview, - }, - path_params={}, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=filesystem_models.CreateProjectFromTemplateRequest( - template_rid=template_rid, - variable_values=variable_values, - default_roles=default_roles, - organization_rids=organization_rids, - project_description=project_description, - ), - response_type=filesystem_models.Project, - request_timeout=request_timeout, - throwable_errors={ - "AddGroupToParentGroupPermissionDenied": filesystem_errors.AddGroupToParentGroupPermissionDenied, - "CreateGroupPermissionDenied": filesystem_errors.CreateGroupPermissionDenied, - "CreateProjectFromTemplatePermissionDenied": filesystem_errors.CreateProjectFromTemplatePermissionDenied, - "CreateProjectNoOwnerLikeRoleGrant": filesystem_errors.CreateProjectNoOwnerLikeRoleGrant, - "DefaultRolesNotInSpaceRoleSet": filesystem_errors.DefaultRolesNotInSpaceRoleSet, - "InvalidDefaultRoles": filesystem_errors.InvalidDefaultRoles, - "InvalidDescription": filesystem_errors.InvalidDescription, - "InvalidOrganizationHierarchy": filesystem_errors.InvalidOrganizationHierarchy, - "InvalidOrganizations": filesystem_errors.InvalidOrganizations, - "InvalidPrincipalIdsForGroupTemplate": filesystem_errors.InvalidPrincipalIdsForGroupTemplate, - "InvalidVariable": filesystem_errors.InvalidVariable, - "InvalidVariableEnumOption": filesystem_errors.InvalidVariableEnumOption, - "MissingVariableValue": filesystem_errors.MissingVariableValue, - "NotAuthorizedToApplyOrganization": filesystem_errors.NotAuthorizedToApplyOrganization, - "OrganizationsNotFound": filesystem_errors.OrganizationsNotFound, - "ProjectNotFound": filesystem_errors.ProjectNotFound, - "ProjectTemplateNotFound": filesystem_errors.ProjectTemplateNotFound, - "TemplateGroupNameConflict": filesystem_errors.TemplateGroupNameConflict, - "TemplateMarkingNameConflict": filesystem_errors.TemplateMarkingNameConflict, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - project_rid: filesystem_models.ProjectRid, - *, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> filesystem_models.Project: - """ - Get the Project with the specified rid. - :param project_rid: - :type project_rid: ProjectRid - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: filesystem_models.Project - - :raises ProjectNotFound: The given Project could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/filesystem/projects/{projectRid}", - query_params={}, - path_params={ - "projectRid": project_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=filesystem_models.Project, - request_timeout=request_timeout, - throwable_errors={ - "ProjectNotFound": filesystem_errors.ProjectNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def organizations( - self, - project_rid: filesystem_models.ProjectRid, - *, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.ResourceIterator[core_models.OrganizationRid]: - """ - List of Organizations directly applied to a Project. The number of Organizations on a Project is - typically small so the `pageSize` and `pageToken` parameters are not required. - - :param project_rid: - :type project_rid: ProjectRid - :param page_size: The page size to use for the endpoint. - :type page_size: Optional[PageSize] - :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. - :type page_token: Optional[PageToken] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.ResourceIterator[core_models.OrganizationRid] - - :raises ProjectNotFound: The given Project could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/filesystem/projects/{projectRid}/organizations", - query_params={ - "pageSize": page_size, - "pageToken": page_token, - "preview": preview, - }, - path_params={ - "projectRid": project_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=filesystem_models.ListOrganizationsOfProjectResponse, - request_timeout=request_timeout, - throwable_errors={ - "ProjectNotFound": filesystem_errors.ProjectNotFound, - }, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def remove_organizations( - self, - project_rid: filesystem_models.ProjectRid, - *, - organization_rids: typing.List[core_models.OrganizationRid], - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> None: - """ - Removes Organizations from a Project. - :param project_rid: - :type project_rid: ProjectRid - :param organization_rids: - :type organization_rids: List[OrganizationRid] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: None - - :raises InvalidOrganizationHierarchy: Organizations on a project must also exist on the parent space. This error is thrown if the configuration of a project's organizations (on creation or subsequently) results in the project being marked with either no organizations in a marked space, or with an organization that is not present on the parent space. - :raises OrganizationCannotBeRemoved: An organization cannot be removed from a project if it would result in a project with no organizations under a space marked with an organization. - :raises OrganizationsNotFound: At least one organization RID could not be found. - :raises ProjectNotFound: The given Project could not be found. - :raises RemoveOrganizationsPermissionDenied: Could not removeOrganizations the Project. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/filesystem/projects/{projectRid}/removeOrganizations", - query_params={ - "preview": preview, - }, - path_params={ - "projectRid": project_rid, - }, - header_params={ - "Content-Type": "application/json", - }, - body=filesystem_models.RemoveOrganizationsRequest( - organization_rids=organization_rids, - ), - response_type=None, - request_timeout=request_timeout, - throwable_errors={ - "InvalidOrganizationHierarchy": filesystem_errors.InvalidOrganizationHierarchy, - "OrganizationCannotBeRemoved": filesystem_errors.OrganizationCannotBeRemoved, - "OrganizationsNotFound": filesystem_errors.OrganizationsNotFound, - "ProjectNotFound": filesystem_errors.ProjectNotFound, - "RemoveOrganizationsPermissionDenied": filesystem_errors.RemoveOrganizationsPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def replace( - self, - project_rid: filesystem_models.ProjectRid, - *, - display_name: filesystem_models.ResourceDisplayName, - description: typing.Optional[str] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> filesystem_models.Project: - """ - Replace the Project with the specified rid. - :param project_rid: - :type project_rid: ProjectRid - :param display_name: The display name of the Project. Must be unique and cannot contain a / - :type display_name: ResourceDisplayName - :param description: The description associated with the Project. - :type description: Optional[str] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: filesystem_models.Project - - :raises InvalidDisplayName: The display name of a Resource should not be exactly `.` or `..`, contain a forward slash `/` and must be less than or equal to 700 characters. - :raises ProjectNameAlreadyExists: The requested display name for the created project is already being used in the space. - :raises ProjectNotFound: The given Project could not be found. - :raises ReplaceProjectPermissionDenied: Could not replace the Project. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="PUT", - resource_path="/v2/filesystem/projects/{projectRid}", - query_params={ - "preview": preview, - }, - path_params={ - "projectRid": project_rid, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=filesystem_models.ReplaceProjectRequest( - display_name=display_name, - description=description, - ), - response_type=filesystem_models.Project, - request_timeout=request_timeout, - throwable_errors={ - "InvalidDisplayName": filesystem_errors.InvalidDisplayName, - "ProjectNameAlreadyExists": filesystem_errors.ProjectNameAlreadyExists, - "ProjectNotFound": filesystem_errors.ProjectNotFound, - "ReplaceProjectPermissionDenied": filesystem_errors.ReplaceProjectPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _ProjectClientRaw: - def __init__(self, client: ProjectClient) -> None: - def add_organizations(_: None): ... - def create(_: filesystem_models.Project): ... - def create_from_template(_: filesystem_models.Project): ... - def get(_: filesystem_models.Project): ... - def organizations(_: filesystem_models.ListOrganizationsOfProjectResponse): ... - def remove_organizations(_: None): ... - def replace(_: filesystem_models.Project): ... - - self.add_organizations = core.with_raw_response(add_organizations, client.add_organizations) - self.create = core.with_raw_response(create, client.create) - self.create_from_template = core.with_raw_response( - create_from_template, client.create_from_template - ) - self.get = core.with_raw_response(get, client.get) - self.organizations = core.with_raw_response(organizations, client.organizations) - self.remove_organizations = core.with_raw_response( - remove_organizations, client.remove_organizations - ) - self.replace = core.with_raw_response(replace, client.replace) - - -class _ProjectClientStreaming: - def __init__(self, client: ProjectClient) -> None: - def create(_: filesystem_models.Project): ... - def create_from_template(_: filesystem_models.Project): ... - def get(_: filesystem_models.Project): ... - def organizations(_: filesystem_models.ListOrganizationsOfProjectResponse): ... - def replace(_: filesystem_models.Project): ... - - self.create = core.with_streaming_response(create, client.create) - self.create_from_template = core.with_streaming_response( - create_from_template, client.create_from_template - ) - self.get = core.with_streaming_response(get, client.get) - self.organizations = core.with_streaming_response(organizations, client.organizations) - self.replace = core.with_streaming_response(replace, client.replace) - - -class AsyncProjectClient: - """ - The API client for the Project Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AsyncProjectClientStreaming(self) - self.with_raw_response = _AsyncProjectClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def add_organizations( - self, - project_rid: filesystem_models.ProjectRid, - *, - organization_rids: typing.List[core_models.OrganizationRid], - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[None]: - """ - Adds a list of Organizations to a Project. - :param project_rid: - :type project_rid: ProjectRid - :param organization_rids: - :type organization_rids: List[OrganizationRid] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[None] - - :raises AddOrganizationsPermissionDenied: Could not addOrganizations the Project. - :raises InvalidOrganizationHierarchy: Organizations on a project must also exist on the parent space. This error is thrown if the configuration of a project's organizations (on creation or subsequently) results in the project being marked with either no organizations in a marked space, or with an organization that is not present on the parent space. - :raises OrganizationsNotFound: At least one organization RID could not be found. - :raises ProjectNotFound: The given Project could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/filesystem/projects/{projectRid}/addOrganizations", - query_params={ - "preview": preview, - }, - path_params={ - "projectRid": project_rid, - }, - header_params={ - "Content-Type": "application/json", - }, - body=filesystem_models.AddOrganizationsRequest( - organization_rids=organization_rids, - ), - response_type=None, - request_timeout=request_timeout, - throwable_errors={ - "AddOrganizationsPermissionDenied": filesystem_errors.AddOrganizationsPermissionDenied, - "InvalidOrganizationHierarchy": filesystem_errors.InvalidOrganizationHierarchy, - "OrganizationsNotFound": filesystem_errors.OrganizationsNotFound, - "ProjectNotFound": filesystem_errors.ProjectNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def create( - self, - *, - default_roles: typing.List[core_models.RoleId], - display_name: filesystem_models.ResourceDisplayName, - organization_rids: typing.List[core_models.OrganizationRid], - role_grants: typing.Dict[ - core_models.RoleId, typing.List[filesystem_models.PrincipalWithId] - ], - space_rid: filesystem_models.SpaceRid, - description: typing.Optional[str] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[filesystem_models.Project]: - """ - Creates a new Project. - - Note that third-party applications using this endpoint via OAuth2 cannot be associated with an - Ontology SDK as this will reduce the scope of operations to only those within specified projects. - When creating the application, select "No, I won't use an Ontology SDK" on the Resources page. - - :param default_roles: - :type default_roles: List[RoleId] - :param display_name: - :type display_name: ResourceDisplayName - :param organization_rids: - :type organization_rids: List[OrganizationRid] - :param role_grants: - :type role_grants: Dict[RoleId, List[PrincipalWithId]] - :param space_rid: - :type space_rid: SpaceRid - :param description: - :type description: Optional[str] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[filesystem_models.Project] - - :raises CreateProjectNoOwnerLikeRoleGrant: The create project request would create a project with no principal being granted an owner-like role. As a result, there would be no user with administrative privileges over the project. A role is defined to be owner-like if it has the `compass:edit-project` operation. In the common case of the default role-set, this is just the `compass:manage` role. - :raises CreateProjectPermissionDenied: Could not create the Project. - :raises InvalidDisplayName: The display name of a Resource should not be exactly `.` or `..`, contain a forward slash `/` and must be less than or equal to 700 characters. - :raises InvalidRoleIds: A roleId referenced in either default roles or role grants does not exist in the project role set for the space. - :raises OrganizationMarkingNotOnSpace: At least one of the organization markings associated with a passed organization is not applied on the requested space. - :raises OrganizationsNotFound: At least one organization RID could not be found. - :raises ProjectCreationNotSupported: Project creation is not supported in the current user's space. - :raises ProjectNameAlreadyExists: The requested display name for the created project is already being used in the space. - :raises ProjectNotFound: The given Project could not be found. - :raises SpaceNotFound: The given Space could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/filesystem/projects/create", - query_params={ - "preview": preview, - }, - path_params={}, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=filesystem_models.CreateProjectRequest( - display_name=display_name, - description=description, - space_rid=space_rid, - role_grants=role_grants, - default_roles=default_roles, - organization_rids=organization_rids, - ), - response_type=filesystem_models.Project, - request_timeout=request_timeout, - throwable_errors={ - "CreateProjectNoOwnerLikeRoleGrant": filesystem_errors.CreateProjectNoOwnerLikeRoleGrant, - "CreateProjectPermissionDenied": filesystem_errors.CreateProjectPermissionDenied, - "InvalidDisplayName": filesystem_errors.InvalidDisplayName, - "InvalidRoleIds": filesystem_errors.InvalidRoleIds, - "OrganizationMarkingNotOnSpace": filesystem_errors.OrganizationMarkingNotOnSpace, - "OrganizationsNotFound": filesystem_errors.OrganizationsNotFound, - "ProjectCreationNotSupported": filesystem_errors.ProjectCreationNotSupported, - "ProjectNameAlreadyExists": filesystem_errors.ProjectNameAlreadyExists, - "ProjectNotFound": filesystem_errors.ProjectNotFound, - "SpaceNotFound": filesystem_errors.SpaceNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def create_from_template( - self, - *, - template_rid: filesystem_models.ProjectTemplateRid, - variable_values: typing.Dict[ - filesystem_models.ProjectTemplateVariableId, - filesystem_models.ProjectTemplateVariableValue, - ], - default_roles: typing.Optional[typing.List[core_models.RoleId]] = None, - organization_rids: typing.Optional[typing.List[core_models.OrganizationRid]] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - project_description: typing.Optional[str] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[filesystem_models.Project]: - """ - Creates a project from a project template. - :param template_rid: - :type template_rid: ProjectTemplateRid - :param variable_values: - :type variable_values: Dict[ProjectTemplateVariableId, ProjectTemplateVariableValue] - :param default_roles: - :type default_roles: Optional[List[RoleId]] - :param organization_rids: - :type organization_rids: Optional[List[OrganizationRid]] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param project_description: - :type project_description: Optional[str] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[filesystem_models.Project] - - :raises AddGroupToParentGroupPermissionDenied: The user is not authorized to add a a group to the parent group required to create the project from template. - :raises CreateGroupPermissionDenied: The user is not authorized to create the group in the organization required to create the project from template. - :raises CreateProjectFromTemplatePermissionDenied: Could not createFromTemplate the Project. - :raises CreateProjectNoOwnerLikeRoleGrant: The create project request would create a project with no principal being granted an owner-like role. As a result, there would be no user with administrative privileges over the project. A role is defined to be owner-like if it has the `compass:edit-project` operation. In the common case of the default role-set, this is just the `compass:manage` role. - :raises DefaultRolesNotInSpaceRoleSet: The requested default roles are not in the role set of the space for the project template. - :raises InvalidDefaultRoles: Either the user has not passed default roles for a template with suggested default roles, or has passed default roles for a template with fixed default roles. - :raises InvalidDescription: Either the user has not passed a value for a template with unset project description, or has passed a value for a template with fixed project description. - :raises InvalidOrganizationHierarchy: Organizations on a project must also exist on the parent space. This error is thrown if the configuration of a project's organizations (on creation or subsequently) results in the project being marked with either no organizations in a marked space, or with an organization that is not present on the parent space. - :raises InvalidOrganizations: Either the user has not passed organizations for a template with suggested organizations, or has passed organization for a template with fixed organizations. - :raises InvalidPrincipalIdsForGroupTemplate: The template requested for project creation contains principal IDs that do not exist. - :raises InvalidVariable: A variable referenced in the request to create project from template is not defined on the template. - :raises InvalidVariableEnumOption: The value passed in the request to create project from template for an enum type variable is not a valid option. - :raises MissingVariableValue: A variable defined on the template requested for project creation does not have a value set in the request. - :raises NotAuthorizedToApplyOrganization: The user is not authorized to apply at least one of the organization markings required to create the project from template. - :raises OrganizationsNotFound: At least one organization RID could not be found. - :raises ProjectNotFound: The given Project could not be found. - :raises ProjectTemplateNotFound: The project template RID referenced cannot be found. - :raises TemplateGroupNameConflict: Creating the project from template would attempt to create new groups with names conflicting either with other new groups, or existing groups. - :raises TemplateMarkingNameConflict: Creating the project from template would attempt to create new markings with names conflicting either with other new markings, or existing markings. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/filesystem/projects/createFromTemplate", - query_params={ - "preview": preview, - }, - path_params={}, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=filesystem_models.CreateProjectFromTemplateRequest( - template_rid=template_rid, - variable_values=variable_values, - default_roles=default_roles, - organization_rids=organization_rids, - project_description=project_description, - ), - response_type=filesystem_models.Project, - request_timeout=request_timeout, - throwable_errors={ - "AddGroupToParentGroupPermissionDenied": filesystem_errors.AddGroupToParentGroupPermissionDenied, - "CreateGroupPermissionDenied": filesystem_errors.CreateGroupPermissionDenied, - "CreateProjectFromTemplatePermissionDenied": filesystem_errors.CreateProjectFromTemplatePermissionDenied, - "CreateProjectNoOwnerLikeRoleGrant": filesystem_errors.CreateProjectNoOwnerLikeRoleGrant, - "DefaultRolesNotInSpaceRoleSet": filesystem_errors.DefaultRolesNotInSpaceRoleSet, - "InvalidDefaultRoles": filesystem_errors.InvalidDefaultRoles, - "InvalidDescription": filesystem_errors.InvalidDescription, - "InvalidOrganizationHierarchy": filesystem_errors.InvalidOrganizationHierarchy, - "InvalidOrganizations": filesystem_errors.InvalidOrganizations, - "InvalidPrincipalIdsForGroupTemplate": filesystem_errors.InvalidPrincipalIdsForGroupTemplate, - "InvalidVariable": filesystem_errors.InvalidVariable, - "InvalidVariableEnumOption": filesystem_errors.InvalidVariableEnumOption, - "MissingVariableValue": filesystem_errors.MissingVariableValue, - "NotAuthorizedToApplyOrganization": filesystem_errors.NotAuthorizedToApplyOrganization, - "OrganizationsNotFound": filesystem_errors.OrganizationsNotFound, - "ProjectNotFound": filesystem_errors.ProjectNotFound, - "ProjectTemplateNotFound": filesystem_errors.ProjectTemplateNotFound, - "TemplateGroupNameConflict": filesystem_errors.TemplateGroupNameConflict, - "TemplateMarkingNameConflict": filesystem_errors.TemplateMarkingNameConflict, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - project_rid: filesystem_models.ProjectRid, - *, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[filesystem_models.Project]: - """ - Get the Project with the specified rid. - :param project_rid: - :type project_rid: ProjectRid - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[filesystem_models.Project] - - :raises ProjectNotFound: The given Project could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/filesystem/projects/{projectRid}", - query_params={}, - path_params={ - "projectRid": project_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=filesystem_models.Project, - request_timeout=request_timeout, - throwable_errors={ - "ProjectNotFound": filesystem_errors.ProjectNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def organizations( - self, - project_rid: filesystem_models.ProjectRid, - *, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.AsyncResourceIterator[core_models.OrganizationRid]: - """ - List of Organizations directly applied to a Project. The number of Organizations on a Project is - typically small so the `pageSize` and `pageToken` parameters are not required. - - :param project_rid: - :type project_rid: ProjectRid - :param page_size: The page size to use for the endpoint. - :type page_size: Optional[PageSize] - :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. - :type page_token: Optional[PageToken] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.AsyncResourceIterator[core_models.OrganizationRid] - - :raises ProjectNotFound: The given Project could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/filesystem/projects/{projectRid}/organizations", - query_params={ - "pageSize": page_size, - "pageToken": page_token, - "preview": preview, - }, - path_params={ - "projectRid": project_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=filesystem_models.ListOrganizationsOfProjectResponse, - request_timeout=request_timeout, - throwable_errors={ - "ProjectNotFound": filesystem_errors.ProjectNotFound, - }, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def remove_organizations( - self, - project_rid: filesystem_models.ProjectRid, - *, - organization_rids: typing.List[core_models.OrganizationRid], - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[None]: - """ - Removes Organizations from a Project. - :param project_rid: - :type project_rid: ProjectRid - :param organization_rids: - :type organization_rids: List[OrganizationRid] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[None] - - :raises InvalidOrganizationHierarchy: Organizations on a project must also exist on the parent space. This error is thrown if the configuration of a project's organizations (on creation or subsequently) results in the project being marked with either no organizations in a marked space, or with an organization that is not present on the parent space. - :raises OrganizationCannotBeRemoved: An organization cannot be removed from a project if it would result in a project with no organizations under a space marked with an organization. - :raises OrganizationsNotFound: At least one organization RID could not be found. - :raises ProjectNotFound: The given Project could not be found. - :raises RemoveOrganizationsPermissionDenied: Could not removeOrganizations the Project. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/filesystem/projects/{projectRid}/removeOrganizations", - query_params={ - "preview": preview, - }, - path_params={ - "projectRid": project_rid, - }, - header_params={ - "Content-Type": "application/json", - }, - body=filesystem_models.RemoveOrganizationsRequest( - organization_rids=organization_rids, - ), - response_type=None, - request_timeout=request_timeout, - throwable_errors={ - "InvalidOrganizationHierarchy": filesystem_errors.InvalidOrganizationHierarchy, - "OrganizationCannotBeRemoved": filesystem_errors.OrganizationCannotBeRemoved, - "OrganizationsNotFound": filesystem_errors.OrganizationsNotFound, - "ProjectNotFound": filesystem_errors.ProjectNotFound, - "RemoveOrganizationsPermissionDenied": filesystem_errors.RemoveOrganizationsPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def replace( - self, - project_rid: filesystem_models.ProjectRid, - *, - display_name: filesystem_models.ResourceDisplayName, - description: typing.Optional[str] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[filesystem_models.Project]: - """ - Replace the Project with the specified rid. - :param project_rid: - :type project_rid: ProjectRid - :param display_name: The display name of the Project. Must be unique and cannot contain a / - :type display_name: ResourceDisplayName - :param description: The description associated with the Project. - :type description: Optional[str] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[filesystem_models.Project] - - :raises InvalidDisplayName: The display name of a Resource should not be exactly `.` or `..`, contain a forward slash `/` and must be less than or equal to 700 characters. - :raises ProjectNameAlreadyExists: The requested display name for the created project is already being used in the space. - :raises ProjectNotFound: The given Project could not be found. - :raises ReplaceProjectPermissionDenied: Could not replace the Project. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="PUT", - resource_path="/v2/filesystem/projects/{projectRid}", - query_params={ - "preview": preview, - }, - path_params={ - "projectRid": project_rid, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=filesystem_models.ReplaceProjectRequest( - display_name=display_name, - description=description, - ), - response_type=filesystem_models.Project, - request_timeout=request_timeout, - throwable_errors={ - "InvalidDisplayName": filesystem_errors.InvalidDisplayName, - "ProjectNameAlreadyExists": filesystem_errors.ProjectNameAlreadyExists, - "ProjectNotFound": filesystem_errors.ProjectNotFound, - "ReplaceProjectPermissionDenied": filesystem_errors.ReplaceProjectPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _AsyncProjectClientRaw: - def __init__(self, client: AsyncProjectClient) -> None: - def add_organizations(_: None): ... - def create(_: filesystem_models.Project): ... - def create_from_template(_: filesystem_models.Project): ... - def get(_: filesystem_models.Project): ... - def organizations(_: filesystem_models.ListOrganizationsOfProjectResponse): ... - def remove_organizations(_: None): ... - def replace(_: filesystem_models.Project): ... - - self.add_organizations = core.async_with_raw_response( - add_organizations, client.add_organizations - ) - self.create = core.async_with_raw_response(create, client.create) - self.create_from_template = core.async_with_raw_response( - create_from_template, client.create_from_template - ) - self.get = core.async_with_raw_response(get, client.get) - self.organizations = core.async_with_raw_response(organizations, client.organizations) - self.remove_organizations = core.async_with_raw_response( - remove_organizations, client.remove_organizations - ) - self.replace = core.async_with_raw_response(replace, client.replace) - - -class _AsyncProjectClientStreaming: - def __init__(self, client: AsyncProjectClient) -> None: - def create(_: filesystem_models.Project): ... - def create_from_template(_: filesystem_models.Project): ... - def get(_: filesystem_models.Project): ... - def organizations(_: filesystem_models.ListOrganizationsOfProjectResponse): ... - def replace(_: filesystem_models.Project): ... - - self.create = core.async_with_streaming_response(create, client.create) - self.create_from_template = core.async_with_streaming_response( - create_from_template, client.create_from_template - ) - self.get = core.async_with_streaming_response(get, client.get) - self.organizations = core.async_with_streaming_response(organizations, client.organizations) - self.replace = core.async_with_streaming_response(replace, client.replace) diff --git a/foundry_sdk/v2/filesystem/resource.py b/foundry_sdk/v2/filesystem/resource.py deleted file mode 100644 index bbd7ac2d4..000000000 --- a/foundry_sdk/v2/filesystem/resource.py +++ /dev/null @@ -1,1417 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing -from functools import cached_property - -import annotated_types -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v2.core import models as core_models -from foundry_sdk.v2.filesystem import errors as filesystem_errors -from foundry_sdk.v2.filesystem import models as filesystem_models - - -class ResourceClient: - """ - The API client for the Resource Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _ResourceClientStreaming(self) - self.with_raw_response = _ResourceClientRaw(self) - - @cached_property - def Role(self): - from foundry_sdk.v2.filesystem.resource_role import ResourceRoleClient - - return ResourceRoleClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def add_markings( - self, - resource_rid: filesystem_models.ResourceRid, - *, - marking_ids: typing.List[core_models.MarkingId], - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> None: - """ - Adds a list of Markings to a resource. - :param resource_rid: - :type resource_rid: ResourceRid - :param marking_ids: - :type marking_ids: List[MarkingId] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: None - - :raises AddMarkingsPermissionDenied: Could not addMarkings the Resource. - :raises ForbiddenOperationOnAutosavedResource: Performing this operation on an autosaved resource is not supported. - :raises ForbiddenOperationOnHiddenResource: Performing this operation on a hidden resource is not supported. - :raises MarkingNotFound: A provided marking ID cannot be found. - :raises OrganizationMarkingNotSupported: Adding an organization marking as a regular marking is not supported. Use the organization endpoints on a project resource instead. - :raises ResourceNotFound: The given Resource could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/filesystem/resources/{resourceRid}/addMarkings", - query_params={ - "preview": preview, - }, - path_params={ - "resourceRid": resource_rid, - }, - header_params={ - "Content-Type": "application/json", - }, - body=filesystem_models.AddMarkingsRequest( - marking_ids=marking_ids, - ), - response_type=None, - request_timeout=request_timeout, - throwable_errors={ - "AddMarkingsPermissionDenied": filesystem_errors.AddMarkingsPermissionDenied, - "ForbiddenOperationOnAutosavedResource": filesystem_errors.ForbiddenOperationOnAutosavedResource, - "ForbiddenOperationOnHiddenResource": filesystem_errors.ForbiddenOperationOnHiddenResource, - "MarkingNotFound": filesystem_errors.MarkingNotFound, - "OrganizationMarkingNotSupported": filesystem_errors.OrganizationMarkingNotSupported, - "ResourceNotFound": filesystem_errors.ResourceNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def delete( - self, - resource_rid: filesystem_models.ResourceRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> None: - """ - Move the given resource to the trash. Following this operation, the resource can be restored, using the - `restore` operation, or permanently deleted using the `permanentlyDelete` operation. - - :param resource_rid: - :type resource_rid: ResourceRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: None - - :raises DeleteResourcePermissionDenied: Could not delete the Resource. - :raises ResourceNotFound: The given Resource could not be found. - :raises TrashingAutosavedResourcesNotSupported: Auto-saved Resources cannot be trashed. - :raises TrashingHiddenResourcesNotSupported: Hidden Resources cannot be trashed. - :raises TrashingSpaceNotSupported: Spaces cannot be trashed. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="DELETE", - resource_path="/v2/filesystem/resources/{resourceRid}", - query_params={ - "preview": preview, - }, - path_params={ - "resourceRid": resource_rid, - }, - header_params={}, - body=None, - response_type=None, - request_timeout=request_timeout, - throwable_errors={ - "DeleteResourcePermissionDenied": filesystem_errors.DeleteResourcePermissionDenied, - "ResourceNotFound": filesystem_errors.ResourceNotFound, - "TrashingAutosavedResourcesNotSupported": filesystem_errors.TrashingAutosavedResourcesNotSupported, - "TrashingHiddenResourcesNotSupported": filesystem_errors.TrashingHiddenResourcesNotSupported, - "TrashingSpaceNotSupported": filesystem_errors.TrashingSpaceNotSupported, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - resource_rid: filesystem_models.ResourceRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> filesystem_models.Resource: - """ - Get the Resource with the specified rid. - :param resource_rid: - :type resource_rid: ResourceRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: filesystem_models.Resource - - :raises GetRootFolderNotSupported: Getting the root folder as a resource is not supported. - :raises GetSpaceResourceNotSupported: Getting a space as a resource is not supported. - :raises ResourceNotFound: The given Resource could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/filesystem/resources/{resourceRid}", - query_params={ - "preview": preview, - }, - path_params={ - "resourceRid": resource_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=filesystem_models.Resource, - request_timeout=request_timeout, - throwable_errors={ - "GetRootFolderNotSupported": filesystem_errors.GetRootFolderNotSupported, - "GetSpaceResourceNotSupported": filesystem_errors.GetSpaceResourceNotSupported, - "ResourceNotFound": filesystem_errors.ResourceNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get_access_requirements( - self, - resource_rid: filesystem_models.ResourceRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> filesystem_models.AccessRequirements: - """ - Returns a list of access requirements a user needs in order to view a resource. Access requirements are - composed of Organizations and Markings, and can either be applied directly to the resource or inherited. - - :param resource_rid: - :type resource_rid: ResourceRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: filesystem_models.AccessRequirements - - :raises GetAccessRequirementsPermissionDenied: Could not getAccessRequirements the Resource. - :raises ResourceNotFound: The given Resource could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/filesystem/resources/{resourceRid}/getAccessRequirements", - query_params={ - "preview": preview, - }, - path_params={ - "resourceRid": resource_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=filesystem_models.AccessRequirements, - request_timeout=request_timeout, - throwable_errors={ - "GetAccessRequirementsPermissionDenied": filesystem_errors.GetAccessRequirementsPermissionDenied, - "ResourceNotFound": filesystem_errors.ResourceNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get_batch( - self, - body: typing_extensions.Annotated[ - typing.List[filesystem_models.GetResourcesBatchRequestElement], - annotated_types.Len(min_length=1, max_length=1000), - ], - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> filesystem_models.GetResourcesBatchResponse: - """ - Fetches multiple resources in a single request. - Returns a map from RID to the corresponding resource. If a resource does not exist, or if it is a root folder or space, its RID will not be included in the map. - At most 1,000 resources should be requested at once. - - - The maximum batch size for this endpoint is 1000. - :param body: Body of the request - :type body: List[GetResourcesBatchRequestElement] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: filesystem_models.GetResourcesBatchResponse - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/filesystem/resources/getBatch", - query_params={ - "preview": preview, - }, - path_params={}, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=body, - response_type=filesystem_models.GetResourcesBatchResponse, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get_by_path( - self, - *, - path: filesystem_models.ResourcePath, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> filesystem_models.Resource: - """ - Get a Resource by its absolute path. - :param path: The path to the Resource. The leading slash is optional. - :type path: ResourcePath - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: filesystem_models.Resource - - :raises GetByPathPermissionDenied: Could not getByPath the Resource. - :raises GetRootFolderNotSupported: Getting the root folder as a resource is not supported. - :raises GetSpaceResourceNotSupported: Getting a space as a resource is not supported. - :raises InvalidPath: The given path is invalid. A valid path has all components separated by a single `/`. - :raises PathNotFound: The given path could not be found. - :raises ResourceNotFound: The given Resource could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/filesystem/resources/getByPath", - query_params={ - "path": path, - "preview": preview, - }, - path_params={}, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=filesystem_models.Resource, - request_timeout=request_timeout, - throwable_errors={ - "GetByPathPermissionDenied": filesystem_errors.GetByPathPermissionDenied, - "GetRootFolderNotSupported": filesystem_errors.GetRootFolderNotSupported, - "GetSpaceResourceNotSupported": filesystem_errors.GetSpaceResourceNotSupported, - "InvalidPath": filesystem_errors.InvalidPath, - "PathNotFound": filesystem_errors.PathNotFound, - "ResourceNotFound": filesystem_errors.ResourceNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get_by_path_batch( - self, - body: typing_extensions.Annotated[ - typing.List[filesystem_models.GetByPathResourcesBatchRequestElement], - annotated_types.Len(min_length=1, max_length=1000), - ], - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> filesystem_models.GetByPathResourcesBatchResponse: - """ - Gets multiple Resources by their absolute paths. - Returns a list of resources. If a path does not exist, is inaccessible, or refers to - a root folder or space, it will not be included in the response. - At most 1,000 paths should be requested at once. - - - The maximum batch size for this endpoint is 1000. - :param body: Body of the request - :type body: List[GetByPathResourcesBatchRequestElement] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: filesystem_models.GetByPathResourcesBatchResponse - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/filesystem/resources/getByPathBatch", - query_params={ - "preview": preview, - }, - path_params={}, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=body, - response_type=filesystem_models.GetByPathResourcesBatchResponse, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def markings( - self, - resource_rid: filesystem_models.ResourceRid, - *, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.ResourceIterator[core_models.MarkingId]: - """ - List of Markings directly applied to a resource. The number of Markings on a resource is typically small - so the `pageSize` and `pageToken` parameters are not required. - - :param resource_rid: - :type resource_rid: ResourceRid - :param page_size: The page size to use for the endpoint. - :type page_size: Optional[PageSize] - :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. - :type page_token: Optional[PageToken] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.ResourceIterator[core_models.MarkingId] - - :raises ResourceNotFound: The given Resource could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/filesystem/resources/{resourceRid}/markings", - query_params={ - "pageSize": page_size, - "pageToken": page_token, - "preview": preview, - }, - path_params={ - "resourceRid": resource_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=filesystem_models.ListMarkingsOfResourceResponse, - request_timeout=request_timeout, - throwable_errors={ - "ResourceNotFound": filesystem_errors.ResourceNotFound, - }, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def permanently_delete( - self, - resource_rid: filesystem_models.ResourceRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> None: - """ - Permanently delete the given resource from the trash. If the Resource is not directly trashed, a - `ResourceNotTrashed` error will be thrown. - - :param resource_rid: - :type resource_rid: ResourceRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: None - - :raises PermanentlyDeleteResourcePermissionDenied: Could not permanentlyDelete the Resource. - :raises ResourceNotFound: The given Resource could not be found. - :raises ResourceNotTrashed: The Resource should be directly trashed before being permanently deleted. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/filesystem/resources/{resourceRid}/permanentlyDelete", - query_params={ - "preview": preview, - }, - path_params={ - "resourceRid": resource_rid, - }, - header_params={}, - body=None, - response_type=None, - request_timeout=request_timeout, - throwable_errors={ - "PermanentlyDeleteResourcePermissionDenied": filesystem_errors.PermanentlyDeleteResourcePermissionDenied, - "ResourceNotFound": filesystem_errors.ResourceNotFound, - "ResourceNotTrashed": filesystem_errors.ResourceNotTrashed, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def remove_markings( - self, - resource_rid: filesystem_models.ResourceRid, - *, - marking_ids: typing.List[core_models.MarkingId], - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> None: - """ - Removes Markings from a resource. - :param resource_rid: - :type resource_rid: ResourceRid - :param marking_ids: - :type marking_ids: List[MarkingId] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: None - - :raises ForbiddenOperationOnAutosavedResource: Performing this operation on an autosaved resource is not supported. - :raises ForbiddenOperationOnHiddenResource: Performing this operation on a hidden resource is not supported. - :raises MarkingNotFound: A provided marking ID cannot be found. - :raises OrganizationMarkingNotSupported: Adding an organization marking as a regular marking is not supported. Use the organization endpoints on a project resource instead. - :raises RemoveMarkingsPermissionDenied: Could not removeMarkings the Resource. - :raises ResourceNotFound: The given Resource could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/filesystem/resources/{resourceRid}/removeMarkings", - query_params={ - "preview": preview, - }, - path_params={ - "resourceRid": resource_rid, - }, - header_params={ - "Content-Type": "application/json", - }, - body=filesystem_models.RemoveMarkingsRequest( - marking_ids=marking_ids, - ), - response_type=None, - request_timeout=request_timeout, - throwable_errors={ - "ForbiddenOperationOnAutosavedResource": filesystem_errors.ForbiddenOperationOnAutosavedResource, - "ForbiddenOperationOnHiddenResource": filesystem_errors.ForbiddenOperationOnHiddenResource, - "MarkingNotFound": filesystem_errors.MarkingNotFound, - "OrganizationMarkingNotSupported": filesystem_errors.OrganizationMarkingNotSupported, - "RemoveMarkingsPermissionDenied": filesystem_errors.RemoveMarkingsPermissionDenied, - "ResourceNotFound": filesystem_errors.ResourceNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def restore( - self, - resource_rid: filesystem_models.ResourceRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> None: - """ - Restore the given resource and any directly trashed ancestors from the trash. If the resource is not - trashed, this operation will be ignored. - - :param resource_rid: - :type resource_rid: ResourceRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: None - - :raises ResourceNotDirectlyTrashed: The Resource is not directly trashed. - :raises ResourceNotFound: The given Resource could not be found. - :raises RestoreResourcePermissionDenied: Could not restore the Resource. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/filesystem/resources/{resourceRid}/restore", - query_params={ - "preview": preview, - }, - path_params={ - "resourceRid": resource_rid, - }, - header_params={}, - body=None, - response_type=None, - request_timeout=request_timeout, - throwable_errors={ - "ResourceNotDirectlyTrashed": filesystem_errors.ResourceNotDirectlyTrashed, - "ResourceNotFound": filesystem_errors.ResourceNotFound, - "RestoreResourcePermissionDenied": filesystem_errors.RestoreResourcePermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _ResourceClientRaw: - def __init__(self, client: ResourceClient) -> None: - def add_markings(_: None): ... - def delete(_: None): ... - def get(_: filesystem_models.Resource): ... - def get_access_requirements(_: filesystem_models.AccessRequirements): ... - def get_batch(_: filesystem_models.GetResourcesBatchResponse): ... - def get_by_path(_: filesystem_models.Resource): ... - def get_by_path_batch(_: filesystem_models.GetByPathResourcesBatchResponse): ... - def markings(_: filesystem_models.ListMarkingsOfResourceResponse): ... - def permanently_delete(_: None): ... - def remove_markings(_: None): ... - def restore(_: None): ... - - self.add_markings = core.with_raw_response(add_markings, client.add_markings) - self.delete = core.with_raw_response(delete, client.delete) - self.get = core.with_raw_response(get, client.get) - self.get_access_requirements = core.with_raw_response( - get_access_requirements, client.get_access_requirements - ) - self.get_batch = core.with_raw_response(get_batch, client.get_batch) - self.get_by_path = core.with_raw_response(get_by_path, client.get_by_path) - self.get_by_path_batch = core.with_raw_response(get_by_path_batch, client.get_by_path_batch) - self.markings = core.with_raw_response(markings, client.markings) - self.permanently_delete = core.with_raw_response( - permanently_delete, client.permanently_delete - ) - self.remove_markings = core.with_raw_response(remove_markings, client.remove_markings) - self.restore = core.with_raw_response(restore, client.restore) - - -class _ResourceClientStreaming: - def __init__(self, client: ResourceClient) -> None: - def get(_: filesystem_models.Resource): ... - def get_access_requirements(_: filesystem_models.AccessRequirements): ... - def get_batch(_: filesystem_models.GetResourcesBatchResponse): ... - def get_by_path(_: filesystem_models.Resource): ... - def get_by_path_batch(_: filesystem_models.GetByPathResourcesBatchResponse): ... - def markings(_: filesystem_models.ListMarkingsOfResourceResponse): ... - - self.get = core.with_streaming_response(get, client.get) - self.get_access_requirements = core.with_streaming_response( - get_access_requirements, client.get_access_requirements - ) - self.get_batch = core.with_streaming_response(get_batch, client.get_batch) - self.get_by_path = core.with_streaming_response(get_by_path, client.get_by_path) - self.get_by_path_batch = core.with_streaming_response( - get_by_path_batch, client.get_by_path_batch - ) - self.markings = core.with_streaming_response(markings, client.markings) - - -class AsyncResourceClient: - """ - The API client for the Resource Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AsyncResourceClientStreaming(self) - self.with_raw_response = _AsyncResourceClientRaw(self) - - @cached_property - def Role(self): - from foundry_sdk.v2.filesystem.resource_role import AsyncResourceRoleClient - - return AsyncResourceRoleClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def add_markings( - self, - resource_rid: filesystem_models.ResourceRid, - *, - marking_ids: typing.List[core_models.MarkingId], - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[None]: - """ - Adds a list of Markings to a resource. - :param resource_rid: - :type resource_rid: ResourceRid - :param marking_ids: - :type marking_ids: List[MarkingId] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[None] - - :raises AddMarkingsPermissionDenied: Could not addMarkings the Resource. - :raises ForbiddenOperationOnAutosavedResource: Performing this operation on an autosaved resource is not supported. - :raises ForbiddenOperationOnHiddenResource: Performing this operation on a hidden resource is not supported. - :raises MarkingNotFound: A provided marking ID cannot be found. - :raises OrganizationMarkingNotSupported: Adding an organization marking as a regular marking is not supported. Use the organization endpoints on a project resource instead. - :raises ResourceNotFound: The given Resource could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/filesystem/resources/{resourceRid}/addMarkings", - query_params={ - "preview": preview, - }, - path_params={ - "resourceRid": resource_rid, - }, - header_params={ - "Content-Type": "application/json", - }, - body=filesystem_models.AddMarkingsRequest( - marking_ids=marking_ids, - ), - response_type=None, - request_timeout=request_timeout, - throwable_errors={ - "AddMarkingsPermissionDenied": filesystem_errors.AddMarkingsPermissionDenied, - "ForbiddenOperationOnAutosavedResource": filesystem_errors.ForbiddenOperationOnAutosavedResource, - "ForbiddenOperationOnHiddenResource": filesystem_errors.ForbiddenOperationOnHiddenResource, - "MarkingNotFound": filesystem_errors.MarkingNotFound, - "OrganizationMarkingNotSupported": filesystem_errors.OrganizationMarkingNotSupported, - "ResourceNotFound": filesystem_errors.ResourceNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def delete( - self, - resource_rid: filesystem_models.ResourceRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[None]: - """ - Move the given resource to the trash. Following this operation, the resource can be restored, using the - `restore` operation, or permanently deleted using the `permanentlyDelete` operation. - - :param resource_rid: - :type resource_rid: ResourceRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[None] - - :raises DeleteResourcePermissionDenied: Could not delete the Resource. - :raises ResourceNotFound: The given Resource could not be found. - :raises TrashingAutosavedResourcesNotSupported: Auto-saved Resources cannot be trashed. - :raises TrashingHiddenResourcesNotSupported: Hidden Resources cannot be trashed. - :raises TrashingSpaceNotSupported: Spaces cannot be trashed. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="DELETE", - resource_path="/v2/filesystem/resources/{resourceRid}", - query_params={ - "preview": preview, - }, - path_params={ - "resourceRid": resource_rid, - }, - header_params={}, - body=None, - response_type=None, - request_timeout=request_timeout, - throwable_errors={ - "DeleteResourcePermissionDenied": filesystem_errors.DeleteResourcePermissionDenied, - "ResourceNotFound": filesystem_errors.ResourceNotFound, - "TrashingAutosavedResourcesNotSupported": filesystem_errors.TrashingAutosavedResourcesNotSupported, - "TrashingHiddenResourcesNotSupported": filesystem_errors.TrashingHiddenResourcesNotSupported, - "TrashingSpaceNotSupported": filesystem_errors.TrashingSpaceNotSupported, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - resource_rid: filesystem_models.ResourceRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[filesystem_models.Resource]: - """ - Get the Resource with the specified rid. - :param resource_rid: - :type resource_rid: ResourceRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[filesystem_models.Resource] - - :raises GetRootFolderNotSupported: Getting the root folder as a resource is not supported. - :raises GetSpaceResourceNotSupported: Getting a space as a resource is not supported. - :raises ResourceNotFound: The given Resource could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/filesystem/resources/{resourceRid}", - query_params={ - "preview": preview, - }, - path_params={ - "resourceRid": resource_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=filesystem_models.Resource, - request_timeout=request_timeout, - throwable_errors={ - "GetRootFolderNotSupported": filesystem_errors.GetRootFolderNotSupported, - "GetSpaceResourceNotSupported": filesystem_errors.GetSpaceResourceNotSupported, - "ResourceNotFound": filesystem_errors.ResourceNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get_access_requirements( - self, - resource_rid: filesystem_models.ResourceRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[filesystem_models.AccessRequirements]: - """ - Returns a list of access requirements a user needs in order to view a resource. Access requirements are - composed of Organizations and Markings, and can either be applied directly to the resource or inherited. - - :param resource_rid: - :type resource_rid: ResourceRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[filesystem_models.AccessRequirements] - - :raises GetAccessRequirementsPermissionDenied: Could not getAccessRequirements the Resource. - :raises ResourceNotFound: The given Resource could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/filesystem/resources/{resourceRid}/getAccessRequirements", - query_params={ - "preview": preview, - }, - path_params={ - "resourceRid": resource_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=filesystem_models.AccessRequirements, - request_timeout=request_timeout, - throwable_errors={ - "GetAccessRequirementsPermissionDenied": filesystem_errors.GetAccessRequirementsPermissionDenied, - "ResourceNotFound": filesystem_errors.ResourceNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get_batch( - self, - body: typing_extensions.Annotated[ - typing.List[filesystem_models.GetResourcesBatchRequestElement], - annotated_types.Len(min_length=1, max_length=1000), - ], - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[filesystem_models.GetResourcesBatchResponse]: - """ - Fetches multiple resources in a single request. - Returns a map from RID to the corresponding resource. If a resource does not exist, or if it is a root folder or space, its RID will not be included in the map. - At most 1,000 resources should be requested at once. - - - The maximum batch size for this endpoint is 1000. - :param body: Body of the request - :type body: List[GetResourcesBatchRequestElement] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[filesystem_models.GetResourcesBatchResponse] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/filesystem/resources/getBatch", - query_params={ - "preview": preview, - }, - path_params={}, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=body, - response_type=filesystem_models.GetResourcesBatchResponse, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get_by_path( - self, - *, - path: filesystem_models.ResourcePath, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[filesystem_models.Resource]: - """ - Get a Resource by its absolute path. - :param path: The path to the Resource. The leading slash is optional. - :type path: ResourcePath - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[filesystem_models.Resource] - - :raises GetByPathPermissionDenied: Could not getByPath the Resource. - :raises GetRootFolderNotSupported: Getting the root folder as a resource is not supported. - :raises GetSpaceResourceNotSupported: Getting a space as a resource is not supported. - :raises InvalidPath: The given path is invalid. A valid path has all components separated by a single `/`. - :raises PathNotFound: The given path could not be found. - :raises ResourceNotFound: The given Resource could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/filesystem/resources/getByPath", - query_params={ - "path": path, - "preview": preview, - }, - path_params={}, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=filesystem_models.Resource, - request_timeout=request_timeout, - throwable_errors={ - "GetByPathPermissionDenied": filesystem_errors.GetByPathPermissionDenied, - "GetRootFolderNotSupported": filesystem_errors.GetRootFolderNotSupported, - "GetSpaceResourceNotSupported": filesystem_errors.GetSpaceResourceNotSupported, - "InvalidPath": filesystem_errors.InvalidPath, - "PathNotFound": filesystem_errors.PathNotFound, - "ResourceNotFound": filesystem_errors.ResourceNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get_by_path_batch( - self, - body: typing_extensions.Annotated[ - typing.List[filesystem_models.GetByPathResourcesBatchRequestElement], - annotated_types.Len(min_length=1, max_length=1000), - ], - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[filesystem_models.GetByPathResourcesBatchResponse]: - """ - Gets multiple Resources by their absolute paths. - Returns a list of resources. If a path does not exist, is inaccessible, or refers to - a root folder or space, it will not be included in the response. - At most 1,000 paths should be requested at once. - - - The maximum batch size for this endpoint is 1000. - :param body: Body of the request - :type body: List[GetByPathResourcesBatchRequestElement] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[filesystem_models.GetByPathResourcesBatchResponse] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/filesystem/resources/getByPathBatch", - query_params={ - "preview": preview, - }, - path_params={}, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=body, - response_type=filesystem_models.GetByPathResourcesBatchResponse, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def markings( - self, - resource_rid: filesystem_models.ResourceRid, - *, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.AsyncResourceIterator[core_models.MarkingId]: - """ - List of Markings directly applied to a resource. The number of Markings on a resource is typically small - so the `pageSize` and `pageToken` parameters are not required. - - :param resource_rid: - :type resource_rid: ResourceRid - :param page_size: The page size to use for the endpoint. - :type page_size: Optional[PageSize] - :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. - :type page_token: Optional[PageToken] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.AsyncResourceIterator[core_models.MarkingId] - - :raises ResourceNotFound: The given Resource could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/filesystem/resources/{resourceRid}/markings", - query_params={ - "pageSize": page_size, - "pageToken": page_token, - "preview": preview, - }, - path_params={ - "resourceRid": resource_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=filesystem_models.ListMarkingsOfResourceResponse, - request_timeout=request_timeout, - throwable_errors={ - "ResourceNotFound": filesystem_errors.ResourceNotFound, - }, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def permanently_delete( - self, - resource_rid: filesystem_models.ResourceRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[None]: - """ - Permanently delete the given resource from the trash. If the Resource is not directly trashed, a - `ResourceNotTrashed` error will be thrown. - - :param resource_rid: - :type resource_rid: ResourceRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[None] - - :raises PermanentlyDeleteResourcePermissionDenied: Could not permanentlyDelete the Resource. - :raises ResourceNotFound: The given Resource could not be found. - :raises ResourceNotTrashed: The Resource should be directly trashed before being permanently deleted. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/filesystem/resources/{resourceRid}/permanentlyDelete", - query_params={ - "preview": preview, - }, - path_params={ - "resourceRid": resource_rid, - }, - header_params={}, - body=None, - response_type=None, - request_timeout=request_timeout, - throwable_errors={ - "PermanentlyDeleteResourcePermissionDenied": filesystem_errors.PermanentlyDeleteResourcePermissionDenied, - "ResourceNotFound": filesystem_errors.ResourceNotFound, - "ResourceNotTrashed": filesystem_errors.ResourceNotTrashed, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def remove_markings( - self, - resource_rid: filesystem_models.ResourceRid, - *, - marking_ids: typing.List[core_models.MarkingId], - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[None]: - """ - Removes Markings from a resource. - :param resource_rid: - :type resource_rid: ResourceRid - :param marking_ids: - :type marking_ids: List[MarkingId] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[None] - - :raises ForbiddenOperationOnAutosavedResource: Performing this operation on an autosaved resource is not supported. - :raises ForbiddenOperationOnHiddenResource: Performing this operation on a hidden resource is not supported. - :raises MarkingNotFound: A provided marking ID cannot be found. - :raises OrganizationMarkingNotSupported: Adding an organization marking as a regular marking is not supported. Use the organization endpoints on a project resource instead. - :raises RemoveMarkingsPermissionDenied: Could not removeMarkings the Resource. - :raises ResourceNotFound: The given Resource could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/filesystem/resources/{resourceRid}/removeMarkings", - query_params={ - "preview": preview, - }, - path_params={ - "resourceRid": resource_rid, - }, - header_params={ - "Content-Type": "application/json", - }, - body=filesystem_models.RemoveMarkingsRequest( - marking_ids=marking_ids, - ), - response_type=None, - request_timeout=request_timeout, - throwable_errors={ - "ForbiddenOperationOnAutosavedResource": filesystem_errors.ForbiddenOperationOnAutosavedResource, - "ForbiddenOperationOnHiddenResource": filesystem_errors.ForbiddenOperationOnHiddenResource, - "MarkingNotFound": filesystem_errors.MarkingNotFound, - "OrganizationMarkingNotSupported": filesystem_errors.OrganizationMarkingNotSupported, - "RemoveMarkingsPermissionDenied": filesystem_errors.RemoveMarkingsPermissionDenied, - "ResourceNotFound": filesystem_errors.ResourceNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def restore( - self, - resource_rid: filesystem_models.ResourceRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[None]: - """ - Restore the given resource and any directly trashed ancestors from the trash. If the resource is not - trashed, this operation will be ignored. - - :param resource_rid: - :type resource_rid: ResourceRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[None] - - :raises ResourceNotDirectlyTrashed: The Resource is not directly trashed. - :raises ResourceNotFound: The given Resource could not be found. - :raises RestoreResourcePermissionDenied: Could not restore the Resource. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/filesystem/resources/{resourceRid}/restore", - query_params={ - "preview": preview, - }, - path_params={ - "resourceRid": resource_rid, - }, - header_params={}, - body=None, - response_type=None, - request_timeout=request_timeout, - throwable_errors={ - "ResourceNotDirectlyTrashed": filesystem_errors.ResourceNotDirectlyTrashed, - "ResourceNotFound": filesystem_errors.ResourceNotFound, - "RestoreResourcePermissionDenied": filesystem_errors.RestoreResourcePermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _AsyncResourceClientRaw: - def __init__(self, client: AsyncResourceClient) -> None: - def add_markings(_: None): ... - def delete(_: None): ... - def get(_: filesystem_models.Resource): ... - def get_access_requirements(_: filesystem_models.AccessRequirements): ... - def get_batch(_: filesystem_models.GetResourcesBatchResponse): ... - def get_by_path(_: filesystem_models.Resource): ... - def get_by_path_batch(_: filesystem_models.GetByPathResourcesBatchResponse): ... - def markings(_: filesystem_models.ListMarkingsOfResourceResponse): ... - def permanently_delete(_: None): ... - def remove_markings(_: None): ... - def restore(_: None): ... - - self.add_markings = core.async_with_raw_response(add_markings, client.add_markings) - self.delete = core.async_with_raw_response(delete, client.delete) - self.get = core.async_with_raw_response(get, client.get) - self.get_access_requirements = core.async_with_raw_response( - get_access_requirements, client.get_access_requirements - ) - self.get_batch = core.async_with_raw_response(get_batch, client.get_batch) - self.get_by_path = core.async_with_raw_response(get_by_path, client.get_by_path) - self.get_by_path_batch = core.async_with_raw_response( - get_by_path_batch, client.get_by_path_batch - ) - self.markings = core.async_with_raw_response(markings, client.markings) - self.permanently_delete = core.async_with_raw_response( - permanently_delete, client.permanently_delete - ) - self.remove_markings = core.async_with_raw_response(remove_markings, client.remove_markings) - self.restore = core.async_with_raw_response(restore, client.restore) - - -class _AsyncResourceClientStreaming: - def __init__(self, client: AsyncResourceClient) -> None: - def get(_: filesystem_models.Resource): ... - def get_access_requirements(_: filesystem_models.AccessRequirements): ... - def get_batch(_: filesystem_models.GetResourcesBatchResponse): ... - def get_by_path(_: filesystem_models.Resource): ... - def get_by_path_batch(_: filesystem_models.GetByPathResourcesBatchResponse): ... - def markings(_: filesystem_models.ListMarkingsOfResourceResponse): ... - - self.get = core.async_with_streaming_response(get, client.get) - self.get_access_requirements = core.async_with_streaming_response( - get_access_requirements, client.get_access_requirements - ) - self.get_batch = core.async_with_streaming_response(get_batch, client.get_batch) - self.get_by_path = core.async_with_streaming_response(get_by_path, client.get_by_path) - self.get_by_path_batch = core.async_with_streaming_response( - get_by_path_batch, client.get_by_path_batch - ) - self.markings = core.async_with_streaming_response(markings, client.markings) diff --git a/foundry_sdk/v2/filesystem/resource_role.py b/foundry_sdk/v2/filesystem/resource_role.py deleted file mode 100644 index 9942b4dc3..000000000 --- a/foundry_sdk/v2/filesystem/resource_role.py +++ /dev/null @@ -1,440 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing - -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v2.admin import errors as admin_errors -from foundry_sdk.v2.core import models as core_models -from foundry_sdk.v2.filesystem import errors as filesystem_errors -from foundry_sdk.v2.filesystem import models as filesystem_models - - -class ResourceRoleClient: - """ - The API client for the ResourceRole Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _ResourceRoleClientStreaming(self) - self.with_raw_response = _ResourceRoleClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def add( - self, - resource_rid: filesystem_models.ResourceRid, - *, - roles: typing.List[filesystem_models.ResourceRoleIdentifier], - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> None: - """ - - :param resource_rid: - :type resource_rid: ResourceRid - :param roles: - :type roles: List[ResourceRoleIdentifier] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: None - - :raises AddResourceRolesPermissionDenied: Could not add the ResourceRole. - :raises InvalidRoleIds: A roleId referenced in either default roles or role grants does not exist in the project role set for the space. - :raises PrincipalNotFound: A principal (User or Group) with the given PrincipalId could not be found - :raises ResourceNotFound: The given Resource could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/filesystem/resources/{resourceRid}/roles/add", - query_params={}, - path_params={ - "resourceRid": resource_rid, - }, - header_params={ - "Content-Type": "application/json", - }, - body=filesystem_models.AddResourceRolesRequest( - roles=roles, - ), - response_type=None, - request_timeout=request_timeout, - throwable_errors={ - "AddResourceRolesPermissionDenied": filesystem_errors.AddResourceRolesPermissionDenied, - "InvalidRoleIds": filesystem_errors.InvalidRoleIds, - "PrincipalNotFound": admin_errors.PrincipalNotFound, - "ResourceNotFound": filesystem_errors.ResourceNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def list( - self, - resource_rid: filesystem_models.ResourceRid, - *, - include_inherited: typing.Optional[bool] = None, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.ResourceIterator[filesystem_models.ResourceRole]: - """ - List the roles on a resource. - - :param resource_rid: - :type resource_rid: ResourceRid - :param include_inherited: Whether to include inherited roles on the resource. - :type include_inherited: Optional[bool] - :param page_size: The page size to use for the endpoint. - :type page_size: Optional[PageSize] - :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. - :type page_token: Optional[PageToken] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.ResourceIterator[filesystem_models.ResourceRole] - - :raises ResourceNotFound: The given Resource could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/filesystem/resources/{resourceRid}/roles", - query_params={ - "includeInherited": include_inherited, - "pageSize": page_size, - "pageToken": page_token, - }, - path_params={ - "resourceRid": resource_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=filesystem_models.ListResourceRolesResponse, - request_timeout=request_timeout, - throwable_errors={ - "ResourceNotFound": filesystem_errors.ResourceNotFound, - }, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def remove( - self, - resource_rid: filesystem_models.ResourceRid, - *, - roles: typing.List[filesystem_models.ResourceRoleIdentifier], - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> None: - """ - - :param resource_rid: - :type resource_rid: ResourceRid - :param roles: - :type roles: List[ResourceRoleIdentifier] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: None - - :raises InvalidRoleIds: A roleId referenced in either default roles or role grants does not exist in the project role set for the space. - :raises PrincipalNotFound: A principal (User or Group) with the given PrincipalId could not be found - :raises RemoveResourceRolesPermissionDenied: Could not remove the ResourceRole. - :raises ResourceNotFound: The given Resource could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/filesystem/resources/{resourceRid}/roles/remove", - query_params={}, - path_params={ - "resourceRid": resource_rid, - }, - header_params={ - "Content-Type": "application/json", - }, - body=filesystem_models.RemoveResourceRolesRequest( - roles=roles, - ), - response_type=None, - request_timeout=request_timeout, - throwable_errors={ - "InvalidRoleIds": filesystem_errors.InvalidRoleIds, - "PrincipalNotFound": admin_errors.PrincipalNotFound, - "RemoveResourceRolesPermissionDenied": filesystem_errors.RemoveResourceRolesPermissionDenied, - "ResourceNotFound": filesystem_errors.ResourceNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _ResourceRoleClientRaw: - def __init__(self, client: ResourceRoleClient) -> None: - def add(_: None): ... - def list(_: filesystem_models.ListResourceRolesResponse): ... - def remove(_: None): ... - - self.add = core.with_raw_response(add, client.add) - self.list = core.with_raw_response(list, client.list) - self.remove = core.with_raw_response(remove, client.remove) - - -class _ResourceRoleClientStreaming: - def __init__(self, client: ResourceRoleClient) -> None: - def list(_: filesystem_models.ListResourceRolesResponse): ... - - self.list = core.with_streaming_response(list, client.list) - - -class AsyncResourceRoleClient: - """ - The API client for the ResourceRole Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AsyncResourceRoleClientStreaming(self) - self.with_raw_response = _AsyncResourceRoleClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def add( - self, - resource_rid: filesystem_models.ResourceRid, - *, - roles: typing.List[filesystem_models.ResourceRoleIdentifier], - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[None]: - """ - - :param resource_rid: - :type resource_rid: ResourceRid - :param roles: - :type roles: List[ResourceRoleIdentifier] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[None] - - :raises AddResourceRolesPermissionDenied: Could not add the ResourceRole. - :raises InvalidRoleIds: A roleId referenced in either default roles or role grants does not exist in the project role set for the space. - :raises PrincipalNotFound: A principal (User or Group) with the given PrincipalId could not be found - :raises ResourceNotFound: The given Resource could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/filesystem/resources/{resourceRid}/roles/add", - query_params={}, - path_params={ - "resourceRid": resource_rid, - }, - header_params={ - "Content-Type": "application/json", - }, - body=filesystem_models.AddResourceRolesRequest( - roles=roles, - ), - response_type=None, - request_timeout=request_timeout, - throwable_errors={ - "AddResourceRolesPermissionDenied": filesystem_errors.AddResourceRolesPermissionDenied, - "InvalidRoleIds": filesystem_errors.InvalidRoleIds, - "PrincipalNotFound": admin_errors.PrincipalNotFound, - "ResourceNotFound": filesystem_errors.ResourceNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def list( - self, - resource_rid: filesystem_models.ResourceRid, - *, - include_inherited: typing.Optional[bool] = None, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.AsyncResourceIterator[filesystem_models.ResourceRole]: - """ - List the roles on a resource. - - :param resource_rid: - :type resource_rid: ResourceRid - :param include_inherited: Whether to include inherited roles on the resource. - :type include_inherited: Optional[bool] - :param page_size: The page size to use for the endpoint. - :type page_size: Optional[PageSize] - :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. - :type page_token: Optional[PageToken] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.AsyncResourceIterator[filesystem_models.ResourceRole] - - :raises ResourceNotFound: The given Resource could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/filesystem/resources/{resourceRid}/roles", - query_params={ - "includeInherited": include_inherited, - "pageSize": page_size, - "pageToken": page_token, - }, - path_params={ - "resourceRid": resource_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=filesystem_models.ListResourceRolesResponse, - request_timeout=request_timeout, - throwable_errors={ - "ResourceNotFound": filesystem_errors.ResourceNotFound, - }, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def remove( - self, - resource_rid: filesystem_models.ResourceRid, - *, - roles: typing.List[filesystem_models.ResourceRoleIdentifier], - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[None]: - """ - - :param resource_rid: - :type resource_rid: ResourceRid - :param roles: - :type roles: List[ResourceRoleIdentifier] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[None] - - :raises InvalidRoleIds: A roleId referenced in either default roles or role grants does not exist in the project role set for the space. - :raises PrincipalNotFound: A principal (User or Group) with the given PrincipalId could not be found - :raises RemoveResourceRolesPermissionDenied: Could not remove the ResourceRole. - :raises ResourceNotFound: The given Resource could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/filesystem/resources/{resourceRid}/roles/remove", - query_params={}, - path_params={ - "resourceRid": resource_rid, - }, - header_params={ - "Content-Type": "application/json", - }, - body=filesystem_models.RemoveResourceRolesRequest( - roles=roles, - ), - response_type=None, - request_timeout=request_timeout, - throwable_errors={ - "InvalidRoleIds": filesystem_errors.InvalidRoleIds, - "PrincipalNotFound": admin_errors.PrincipalNotFound, - "RemoveResourceRolesPermissionDenied": filesystem_errors.RemoveResourceRolesPermissionDenied, - "ResourceNotFound": filesystem_errors.ResourceNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _AsyncResourceRoleClientRaw: - def __init__(self, client: AsyncResourceRoleClient) -> None: - def add(_: None): ... - def list(_: filesystem_models.ListResourceRolesResponse): ... - def remove(_: None): ... - - self.add = core.async_with_raw_response(add, client.add) - self.list = core.async_with_raw_response(list, client.list) - self.remove = core.async_with_raw_response(remove, client.remove) - - -class _AsyncResourceRoleClientStreaming: - def __init__(self, client: AsyncResourceRoleClient) -> None: - def list(_: filesystem_models.ListResourceRolesResponse): ... - - self.list = core.async_with_streaming_response(list, client.list) diff --git a/foundry_sdk/v2/filesystem/space.py b/foundry_sdk/v2/filesystem/space.py deleted file mode 100644 index 031916037..000000000 --- a/foundry_sdk/v2/filesystem/space.py +++ /dev/null @@ -1,763 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing - -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v2.core import models as core_models -from foundry_sdk.v2.filesystem import errors as filesystem_errors -from foundry_sdk.v2.filesystem import models as filesystem_models - - -class SpaceClient: - """ - The API client for the Space Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _SpaceClientStreaming(self) - self.with_raw_response = _SpaceClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def create( - self, - *, - deletion_policy_organizations: typing.List[core_models.OrganizationRid], - display_name: filesystem_models.ResourceDisplayName, - enrollment_rid: core_models.EnrollmentRid, - organizations: typing.List[core_models.OrganizationRid], - default_role_set_id: typing.Optional[core_models.RoleSetId] = None, - description: typing.Optional[str] = None, - file_system_id: typing.Optional[filesystem_models.FileSystemId] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - usage_account_rid: typing.Optional[filesystem_models.UsageAccountRid] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> filesystem_models.Space: - """ - Creates a new Space. - :param deletion_policy_organizations: By default, this Space will use a Last Out deletion policy, meaning that this Space and its projects will be deleted when the last Organization listed here is deleted. Only Organizations in the Space's Enrollment can be included here. - :type deletion_policy_organizations: List[OrganizationRid] - :param display_name: - :type display_name: ResourceDisplayName - :param enrollment_rid: The RID of the Enrollment that this Space belongs to. - :type enrollment_rid: EnrollmentRid - :param organizations: The list of Organizations that are provisioned access to this Space. In order to access this Space, a user must be a member of at least one of these Organizations. - :type organizations: List[OrganizationRid] - :param default_role_set_id: The ID of the default Role Set for this Space, which defines the set of roles that Projects in this Space must use. If not provided, the default Role Set for Projects will be used. - :type default_role_set_id: Optional[RoleSetId] - :param description: The description of the Space. - :type description: Optional[str] - :param file_system_id: The ID of the Filesystem for this Space, which is where the contents of the Space are stored. If not provided, the default Filesystem for this Enrollment will be used. - :type file_system_id: Optional[FileSystemId] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param usage_account_rid: The RID of the Usage Account for this Space. Resource usage for projects in this space will accrue to this Usage Account by default. If not provided, the default Usage Account for this Enrollment will be used. - :type usage_account_rid: Optional[UsageAccountRid] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: filesystem_models.Space - - :raises CreateSpacePermissionDenied: Could not create the Space. - :raises EnrollmentNotFound: An enrollment was not found for the user. - :raises OrganizationsNotFound: At least one organization RID could not be found. - :raises RoleSetNotFound: The role set provided in the request to create or replace a space could not be found. - :raises SpaceInternalError: An internal error occurred when trying to create or replace the space. - :raises SpaceInvalidArgument: An invalid argument was provided in the request to create or replace a space. - :raises SpaceNameInvalid: The provided space name is invalid. It may be a reserved name or contain invalid characters. - :raises SpaceNotFound: The given Space could not be found. - :raises UsageAccountServiceIsNotPresent: The Usage Accounts service is unexpectedly not present. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/filesystem/spaces", - query_params={ - "preview": preview, - }, - path_params={}, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=filesystem_models.CreateSpaceRequest( - enrollment_rid=enrollment_rid, - usage_account_rid=usage_account_rid, - file_system_id=file_system_id, - display_name=display_name, - organizations=organizations, - description=description, - deletion_policy_organizations=deletion_policy_organizations, - default_role_set_id=default_role_set_id, - ), - response_type=filesystem_models.Space, - request_timeout=request_timeout, - throwable_errors={ - "CreateSpacePermissionDenied": filesystem_errors.CreateSpacePermissionDenied, - "EnrollmentNotFound": filesystem_errors.EnrollmentNotFound, - "OrganizationsNotFound": filesystem_errors.OrganizationsNotFound, - "RoleSetNotFound": filesystem_errors.RoleSetNotFound, - "SpaceInternalError": filesystem_errors.SpaceInternalError, - "SpaceInvalidArgument": filesystem_errors.SpaceInvalidArgument, - "SpaceNameInvalid": filesystem_errors.SpaceNameInvalid, - "SpaceNotFound": filesystem_errors.SpaceNotFound, - "UsageAccountServiceIsNotPresent": filesystem_errors.UsageAccountServiceIsNotPresent, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def delete( - self, - space_rid: filesystem_models.SpaceRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> None: - """ - Delete the space. This will only work if the Space is empty, meaning any Projects or Resources have been deleted first. - - :param space_rid: - :type space_rid: SpaceRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: None - - :raises DeleteSpacePermissionDenied: Could not delete the Space. - :raises SpaceNotEmpty: The space cannot be deleted because it contains resources. - :raises SpaceNotFound: The given Space could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="DELETE", - resource_path="/v2/filesystem/spaces/{spaceRid}", - query_params={ - "preview": preview, - }, - path_params={ - "spaceRid": space_rid, - }, - header_params={}, - body=None, - response_type=None, - request_timeout=request_timeout, - throwable_errors={ - "DeleteSpacePermissionDenied": filesystem_errors.DeleteSpacePermissionDenied, - "SpaceNotEmpty": filesystem_errors.SpaceNotEmpty, - "SpaceNotFound": filesystem_errors.SpaceNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - space_rid: filesystem_models.SpaceRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> filesystem_models.Space: - """ - Get the Space with the specified rid. - :param space_rid: - :type space_rid: SpaceRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: filesystem_models.Space - - :raises SpaceNotFound: The given Space could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/filesystem/spaces/{spaceRid}", - query_params={ - "preview": preview, - }, - path_params={ - "spaceRid": space_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=filesystem_models.Space, - request_timeout=request_timeout, - throwable_errors={ - "SpaceNotFound": filesystem_errors.SpaceNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def list( - self, - *, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.ResourceIterator[filesystem_models.Space]: - """ - Lists all Spaces. - - This is a paged endpoint. Each page may be smaller or larger than the requested page size. However, it is guaranteed that if there are more results available, the `nextPageToken` field will be populated. To get the next page, make the same request again, but set the value of the `pageToken` query parameter to be value of the `nextPageToken` value of the previous response. If there is no `nextPageToken` field in the response, you are on the last page. - :param page_size: The page size to use for the endpoint. - :type page_size: Optional[PageSize] - :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. - :type page_token: Optional[PageToken] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.ResourceIterator[filesystem_models.Space] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/filesystem/spaces", - query_params={ - "pageSize": page_size, - "pageToken": page_token, - "preview": preview, - }, - path_params={}, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=filesystem_models.ListSpacesResponse, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def replace( - self, - space_rid: filesystem_models.SpaceRid, - *, - display_name: filesystem_models.ResourceDisplayName, - default_role_set_id: typing.Optional[core_models.RoleSetId] = None, - description: typing.Optional[str] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - usage_account_rid: typing.Optional[filesystem_models.UsageAccountRid] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> filesystem_models.Space: - """ - Replace the Space with the specified rid. - :param space_rid: - :type space_rid: SpaceRid - :param display_name: - :type display_name: ResourceDisplayName - :param default_role_set_id: The ID of the default Role Set for this Space, which defines the set of roles that Projects in this Space must use. If not provided, the default Role Set for Projects will be used. - :type default_role_set_id: Optional[RoleSetId] - :param description: The description of the Space. - :type description: Optional[str] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param usage_account_rid: The RID of the Usage Account for this Space. Resource usage for projects in this space will accrue to this Usage Account by default. If not provided, the default Usage Account for this Enrollment will be used. - :type usage_account_rid: Optional[UsageAccountRid] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: filesystem_models.Space - - :raises ReplaceSpacePermissionDenied: Could not replace the Space. - :raises ReservedSpaceCannotBeReplaced: The spaceRid provided is for a reserved space in Foundry which cannot be replaced. - :raises RoleSetNotFound: The role set provided in the request to create or replace a space could not be found. - :raises SpaceInvalidArgument: An invalid argument was provided in the request to create or replace a space. - :raises SpaceNameInvalid: The provided space name is invalid. It may be a reserved name or contain invalid characters. - :raises SpaceNotFound: The given Space could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="PUT", - resource_path="/v2/filesystem/spaces/{spaceRid}", - query_params={ - "preview": preview, - }, - path_params={ - "spaceRid": space_rid, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=filesystem_models.ReplaceSpaceRequest( - usage_account_rid=usage_account_rid, - display_name=display_name, - description=description, - default_role_set_id=default_role_set_id, - ), - response_type=filesystem_models.Space, - request_timeout=request_timeout, - throwable_errors={ - "ReplaceSpacePermissionDenied": filesystem_errors.ReplaceSpacePermissionDenied, - "ReservedSpaceCannotBeReplaced": filesystem_errors.ReservedSpaceCannotBeReplaced, - "RoleSetNotFound": filesystem_errors.RoleSetNotFound, - "SpaceInvalidArgument": filesystem_errors.SpaceInvalidArgument, - "SpaceNameInvalid": filesystem_errors.SpaceNameInvalid, - "SpaceNotFound": filesystem_errors.SpaceNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _SpaceClientRaw: - def __init__(self, client: SpaceClient) -> None: - def create(_: filesystem_models.Space): ... - def delete(_: None): ... - def get(_: filesystem_models.Space): ... - def list(_: filesystem_models.ListSpacesResponse): ... - def replace(_: filesystem_models.Space): ... - - self.create = core.with_raw_response(create, client.create) - self.delete = core.with_raw_response(delete, client.delete) - self.get = core.with_raw_response(get, client.get) - self.list = core.with_raw_response(list, client.list) - self.replace = core.with_raw_response(replace, client.replace) - - -class _SpaceClientStreaming: - def __init__(self, client: SpaceClient) -> None: - def create(_: filesystem_models.Space): ... - def get(_: filesystem_models.Space): ... - def list(_: filesystem_models.ListSpacesResponse): ... - def replace(_: filesystem_models.Space): ... - - self.create = core.with_streaming_response(create, client.create) - self.get = core.with_streaming_response(get, client.get) - self.list = core.with_streaming_response(list, client.list) - self.replace = core.with_streaming_response(replace, client.replace) - - -class AsyncSpaceClient: - """ - The API client for the Space Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AsyncSpaceClientStreaming(self) - self.with_raw_response = _AsyncSpaceClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def create( - self, - *, - deletion_policy_organizations: typing.List[core_models.OrganizationRid], - display_name: filesystem_models.ResourceDisplayName, - enrollment_rid: core_models.EnrollmentRid, - organizations: typing.List[core_models.OrganizationRid], - default_role_set_id: typing.Optional[core_models.RoleSetId] = None, - description: typing.Optional[str] = None, - file_system_id: typing.Optional[filesystem_models.FileSystemId] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - usage_account_rid: typing.Optional[filesystem_models.UsageAccountRid] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[filesystem_models.Space]: - """ - Creates a new Space. - :param deletion_policy_organizations: By default, this Space will use a Last Out deletion policy, meaning that this Space and its projects will be deleted when the last Organization listed here is deleted. Only Organizations in the Space's Enrollment can be included here. - :type deletion_policy_organizations: List[OrganizationRid] - :param display_name: - :type display_name: ResourceDisplayName - :param enrollment_rid: The RID of the Enrollment that this Space belongs to. - :type enrollment_rid: EnrollmentRid - :param organizations: The list of Organizations that are provisioned access to this Space. In order to access this Space, a user must be a member of at least one of these Organizations. - :type organizations: List[OrganizationRid] - :param default_role_set_id: The ID of the default Role Set for this Space, which defines the set of roles that Projects in this Space must use. If not provided, the default Role Set for Projects will be used. - :type default_role_set_id: Optional[RoleSetId] - :param description: The description of the Space. - :type description: Optional[str] - :param file_system_id: The ID of the Filesystem for this Space, which is where the contents of the Space are stored. If not provided, the default Filesystem for this Enrollment will be used. - :type file_system_id: Optional[FileSystemId] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param usage_account_rid: The RID of the Usage Account for this Space. Resource usage for projects in this space will accrue to this Usage Account by default. If not provided, the default Usage Account for this Enrollment will be used. - :type usage_account_rid: Optional[UsageAccountRid] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[filesystem_models.Space] - - :raises CreateSpacePermissionDenied: Could not create the Space. - :raises EnrollmentNotFound: An enrollment was not found for the user. - :raises OrganizationsNotFound: At least one organization RID could not be found. - :raises RoleSetNotFound: The role set provided in the request to create or replace a space could not be found. - :raises SpaceInternalError: An internal error occurred when trying to create or replace the space. - :raises SpaceInvalidArgument: An invalid argument was provided in the request to create or replace a space. - :raises SpaceNameInvalid: The provided space name is invalid. It may be a reserved name or contain invalid characters. - :raises SpaceNotFound: The given Space could not be found. - :raises UsageAccountServiceIsNotPresent: The Usage Accounts service is unexpectedly not present. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/filesystem/spaces", - query_params={ - "preview": preview, - }, - path_params={}, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=filesystem_models.CreateSpaceRequest( - enrollment_rid=enrollment_rid, - usage_account_rid=usage_account_rid, - file_system_id=file_system_id, - display_name=display_name, - organizations=organizations, - description=description, - deletion_policy_organizations=deletion_policy_organizations, - default_role_set_id=default_role_set_id, - ), - response_type=filesystem_models.Space, - request_timeout=request_timeout, - throwable_errors={ - "CreateSpacePermissionDenied": filesystem_errors.CreateSpacePermissionDenied, - "EnrollmentNotFound": filesystem_errors.EnrollmentNotFound, - "OrganizationsNotFound": filesystem_errors.OrganizationsNotFound, - "RoleSetNotFound": filesystem_errors.RoleSetNotFound, - "SpaceInternalError": filesystem_errors.SpaceInternalError, - "SpaceInvalidArgument": filesystem_errors.SpaceInvalidArgument, - "SpaceNameInvalid": filesystem_errors.SpaceNameInvalid, - "SpaceNotFound": filesystem_errors.SpaceNotFound, - "UsageAccountServiceIsNotPresent": filesystem_errors.UsageAccountServiceIsNotPresent, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def delete( - self, - space_rid: filesystem_models.SpaceRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[None]: - """ - Delete the space. This will only work if the Space is empty, meaning any Projects or Resources have been deleted first. - - :param space_rid: - :type space_rid: SpaceRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[None] - - :raises DeleteSpacePermissionDenied: Could not delete the Space. - :raises SpaceNotEmpty: The space cannot be deleted because it contains resources. - :raises SpaceNotFound: The given Space could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="DELETE", - resource_path="/v2/filesystem/spaces/{spaceRid}", - query_params={ - "preview": preview, - }, - path_params={ - "spaceRid": space_rid, - }, - header_params={}, - body=None, - response_type=None, - request_timeout=request_timeout, - throwable_errors={ - "DeleteSpacePermissionDenied": filesystem_errors.DeleteSpacePermissionDenied, - "SpaceNotEmpty": filesystem_errors.SpaceNotEmpty, - "SpaceNotFound": filesystem_errors.SpaceNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - space_rid: filesystem_models.SpaceRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[filesystem_models.Space]: - """ - Get the Space with the specified rid. - :param space_rid: - :type space_rid: SpaceRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[filesystem_models.Space] - - :raises SpaceNotFound: The given Space could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/filesystem/spaces/{spaceRid}", - query_params={ - "preview": preview, - }, - path_params={ - "spaceRid": space_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=filesystem_models.Space, - request_timeout=request_timeout, - throwable_errors={ - "SpaceNotFound": filesystem_errors.SpaceNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def list( - self, - *, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.AsyncResourceIterator[filesystem_models.Space]: - """ - Lists all Spaces. - - This is a paged endpoint. Each page may be smaller or larger than the requested page size. However, it is guaranteed that if there are more results available, the `nextPageToken` field will be populated. To get the next page, make the same request again, but set the value of the `pageToken` query parameter to be value of the `nextPageToken` value of the previous response. If there is no `nextPageToken` field in the response, you are on the last page. - :param page_size: The page size to use for the endpoint. - :type page_size: Optional[PageSize] - :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. - :type page_token: Optional[PageToken] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.AsyncResourceIterator[filesystem_models.Space] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/filesystem/spaces", - query_params={ - "pageSize": page_size, - "pageToken": page_token, - "preview": preview, - }, - path_params={}, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=filesystem_models.ListSpacesResponse, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def replace( - self, - space_rid: filesystem_models.SpaceRid, - *, - display_name: filesystem_models.ResourceDisplayName, - default_role_set_id: typing.Optional[core_models.RoleSetId] = None, - description: typing.Optional[str] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - usage_account_rid: typing.Optional[filesystem_models.UsageAccountRid] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[filesystem_models.Space]: - """ - Replace the Space with the specified rid. - :param space_rid: - :type space_rid: SpaceRid - :param display_name: - :type display_name: ResourceDisplayName - :param default_role_set_id: The ID of the default Role Set for this Space, which defines the set of roles that Projects in this Space must use. If not provided, the default Role Set for Projects will be used. - :type default_role_set_id: Optional[RoleSetId] - :param description: The description of the Space. - :type description: Optional[str] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param usage_account_rid: The RID of the Usage Account for this Space. Resource usage for projects in this space will accrue to this Usage Account by default. If not provided, the default Usage Account for this Enrollment will be used. - :type usage_account_rid: Optional[UsageAccountRid] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[filesystem_models.Space] - - :raises ReplaceSpacePermissionDenied: Could not replace the Space. - :raises ReservedSpaceCannotBeReplaced: The spaceRid provided is for a reserved space in Foundry which cannot be replaced. - :raises RoleSetNotFound: The role set provided in the request to create or replace a space could not be found. - :raises SpaceInvalidArgument: An invalid argument was provided in the request to create or replace a space. - :raises SpaceNameInvalid: The provided space name is invalid. It may be a reserved name or contain invalid characters. - :raises SpaceNotFound: The given Space could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="PUT", - resource_path="/v2/filesystem/spaces/{spaceRid}", - query_params={ - "preview": preview, - }, - path_params={ - "spaceRid": space_rid, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=filesystem_models.ReplaceSpaceRequest( - usage_account_rid=usage_account_rid, - display_name=display_name, - description=description, - default_role_set_id=default_role_set_id, - ), - response_type=filesystem_models.Space, - request_timeout=request_timeout, - throwable_errors={ - "ReplaceSpacePermissionDenied": filesystem_errors.ReplaceSpacePermissionDenied, - "ReservedSpaceCannotBeReplaced": filesystem_errors.ReservedSpaceCannotBeReplaced, - "RoleSetNotFound": filesystem_errors.RoleSetNotFound, - "SpaceInvalidArgument": filesystem_errors.SpaceInvalidArgument, - "SpaceNameInvalid": filesystem_errors.SpaceNameInvalid, - "SpaceNotFound": filesystem_errors.SpaceNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _AsyncSpaceClientRaw: - def __init__(self, client: AsyncSpaceClient) -> None: - def create(_: filesystem_models.Space): ... - def delete(_: None): ... - def get(_: filesystem_models.Space): ... - def list(_: filesystem_models.ListSpacesResponse): ... - def replace(_: filesystem_models.Space): ... - - self.create = core.async_with_raw_response(create, client.create) - self.delete = core.async_with_raw_response(delete, client.delete) - self.get = core.async_with_raw_response(get, client.get) - self.list = core.async_with_raw_response(list, client.list) - self.replace = core.async_with_raw_response(replace, client.replace) - - -class _AsyncSpaceClientStreaming: - def __init__(self, client: AsyncSpaceClient) -> None: - def create(_: filesystem_models.Space): ... - def get(_: filesystem_models.Space): ... - def list(_: filesystem_models.ListSpacesResponse): ... - def replace(_: filesystem_models.Space): ... - - self.create = core.async_with_streaming_response(create, client.create) - self.get = core.async_with_streaming_response(get, client.get) - self.list = core.async_with_streaming_response(list, client.list) - self.replace = core.async_with_streaming_response(replace, client.replace) diff --git a/foundry_sdk/v2/functions/__init__.py b/foundry_sdk/v2/functions/__init__.py deleted file mode 100644 index 50e3b4928..000000000 --- a/foundry_sdk/v2/functions/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -from foundry_sdk.v2.functions._client import AsyncFunctionsClient -from foundry_sdk.v2.functions._client import FunctionsClient - -__all__ = [ - "FunctionsClient", - "AsyncFunctionsClient", -] diff --git a/foundry_sdk/v2/functions/_client.py b/foundry_sdk/v2/functions/_client.py deleted file mode 100644 index e24fb6edd..000000000 --- a/foundry_sdk/v2/functions/_client.py +++ /dev/null @@ -1,82 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing -from functools import cached_property - -from foundry_sdk import _core as core - - -class FunctionsClient: - """ - The API client for the Functions Namespace. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - - @cached_property - def Query(self): - from foundry_sdk.v2.functions.query import QueryClient - - return QueryClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @cached_property - def ValueType(self): - from foundry_sdk.v2.functions.value_type import ValueTypeClient - - return ValueTypeClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - -class AsyncFunctionsClient: - """ - The Async API client for the Functions Namespace. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - from foundry_sdk.v2.functions.query import AsyncQueryClient - from foundry_sdk.v2.functions.value_type import AsyncValueTypeClient - - self.Query = AsyncQueryClient(auth=auth, hostname=hostname, config=config) - - self.ValueType = AsyncValueTypeClient(auth=auth, hostname=hostname, config=config) diff --git a/foundry_sdk/v2/functions/errors.py b/foundry_sdk/v2/functions/errors.py deleted file mode 100644 index d17d371d4..000000000 --- a/foundry_sdk/v2/functions/errors.py +++ /dev/null @@ -1,315 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing -from dataclasses import dataclass - -import typing_extensions - -from foundry_sdk import _errors as errors -from foundry_sdk.v2.functions import models as functions_models - - -class ConsistentSnapshotErrorParameters(typing_extensions.TypedDict): - """ - The query failed because the Ontology snapshot used for consistent reads became stale. Retrying the request - typically resolves this. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - functionRid: functions_models.FunctionRid - functionVersion: functions_models.FunctionVersion - - -@dataclass -class ConsistentSnapshotError(errors.ConflictError): - name: typing.Literal["ConsistentSnapshotError"] - parameters: ConsistentSnapshotErrorParameters - error_instance_id: str - - -class ExecuteQueryPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not execute the Query.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - queryApiName: functions_models.QueryApiName - - -@dataclass -class ExecuteQueryPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["ExecuteQueryPermissionDenied"] - parameters: ExecuteQueryPermissionDeniedParameters - error_instance_id: str - - -class GetByRidQueriesPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not getByRid the Query.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class GetByRidQueriesPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["GetByRidQueriesPermissionDenied"] - parameters: GetByRidQueriesPermissionDeniedParameters - error_instance_id: str - - -class InvalidQueryOutputValueParameters(typing_extensions.TypedDict): - """ - The value of the query's output is invalid. This may be because the return value did not match the specified - output type or constraints. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - outputDataType: functions_models.QueryDataType - outputValue: typing_extensions.NotRequired[functions_models.DataValue] - functionRid: functions_models.FunctionRid - functionVersion: functions_models.FunctionVersion - - -@dataclass -class InvalidQueryOutputValue(errors.BadRequestError): - name: typing.Literal["InvalidQueryOutputValue"] - parameters: InvalidQueryOutputValueParameters - error_instance_id: str - - -class InvalidQueryParameterValueParameters(typing_extensions.TypedDict): - """ - The value of the given parameter is invalid. See the documentation of `DataValue` for details on - how parameters are represented. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - parameterDataType: functions_models.QueryDataType - parameterId: functions_models.ParameterId - parameterValue: typing_extensions.NotRequired[functions_models.DataValue] - - -@dataclass -class InvalidQueryParameterValue(errors.BadRequestError): - name: typing.Literal["InvalidQueryParameterValue"] - parameters: InvalidQueryParameterValueParameters - error_instance_id: str - - -class MissingParameterParameters(typing_extensions.TypedDict): - """ - Required parameters are missing. Please look at the `parameters` field to see which required parameters are - missing from the request. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - parameters: typing.List[functions_models.ParameterId] - - -@dataclass -class MissingParameter(errors.BadRequestError): - name: typing.Literal["MissingParameter"] - parameters: MissingParameterParameters - error_instance_id: str - - -class QueryEncounteredUserFacingErrorParameters(typing_extensions.TypedDict): - """ - The authored `Query` failed to execute because of a user induced error. The message argument - is meant to be displayed to the user. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - functionRid: functions_models.FunctionRid - functionVersion: functions_models.FunctionVersion - message: str - - -@dataclass -class QueryEncounteredUserFacingError(errors.ConflictError): - name: typing.Literal["QueryEncounteredUserFacingError"] - parameters: QueryEncounteredUserFacingErrorParameters - error_instance_id: str - - -class QueryMemoryExceededLimitParameters(typing_extensions.TypedDict): - """Memory limits were exceeded for the `Query` execution.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - functionRid: functions_models.FunctionRid - functionVersion: functions_models.FunctionVersion - - -@dataclass -class QueryMemoryExceededLimit(errors.InternalServerError): - name: typing.Literal["QueryMemoryExceededLimit"] - parameters: QueryMemoryExceededLimitParameters - error_instance_id: str - - -class QueryNotFoundParameters(typing_extensions.TypedDict): - """The given Query could not be found.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - queryApiName: functions_models.QueryApiName - - -@dataclass -class QueryNotFound(errors.NotFoundError): - name: typing.Literal["QueryNotFound"] - parameters: QueryNotFoundParameters - error_instance_id: str - - -class QueryRuntimeErrorParameters(typing_extensions.TypedDict): - """The authored `Query` failed to execute because of a runtime error.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - functionRid: functions_models.FunctionRid - functionVersion: functions_models.FunctionVersion - message: typing_extensions.NotRequired[str] - stacktrace: typing_extensions.NotRequired[str] - parameters: typing.Dict[functions_models.QueryRuntimeErrorParameter, str] - - -@dataclass -class QueryRuntimeError(errors.BadRequestError): - name: typing.Literal["QueryRuntimeError"] - parameters: QueryRuntimeErrorParameters - error_instance_id: str - - -class QueryTimeExceededLimitParameters(typing_extensions.TypedDict): - """Time limits were exceeded for the `Query` execution.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - functionRid: functions_models.FunctionRid - functionVersion: functions_models.FunctionVersion - - -@dataclass -class QueryTimeExceededLimit(errors.InternalServerError): - name: typing.Literal["QueryTimeExceededLimit"] - parameters: QueryTimeExceededLimitParameters - error_instance_id: str - - -class QueryVersionNotFoundParameters(typing_extensions.TypedDict): - """The query could not be found at the provided version.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - apiName: functions_models.QueryApiName - version: functions_models.FunctionVersion - - -@dataclass -class QueryVersionNotFound(errors.NotFoundError): - name: typing.Literal["QueryVersionNotFound"] - parameters: QueryVersionNotFoundParameters - error_instance_id: str - - -class StreamingExecuteQueryPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not streamingExecute the Query.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - queryApiName: functions_models.QueryApiName - - -@dataclass -class StreamingExecuteQueryPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["StreamingExecuteQueryPermissionDenied"] - parameters: StreamingExecuteQueryPermissionDeniedParameters - error_instance_id: str - - -class UnknownParameterParameters(typing_extensions.TypedDict): - """ - The provided parameters were not found. Please look at the `knownParameters` field - to see which ones are available. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - unknownParameters: typing.List[functions_models.ParameterId] - expectedParameters: typing.List[functions_models.ParameterId] - - -@dataclass -class UnknownParameter(errors.BadRequestError): - name: typing.Literal["UnknownParameter"] - parameters: UnknownParameterParameters - error_instance_id: str - - -class ValueTypeNotFoundParameters(typing_extensions.TypedDict): - """The given ValueType could not be found.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - valueTypeRid: functions_models.ValueTypeRid - - -@dataclass -class ValueTypeNotFound(errors.NotFoundError): - name: typing.Literal["ValueTypeNotFound"] - parameters: ValueTypeNotFoundParameters - error_instance_id: str - - -class VersionIdNotFoundParameters(typing_extensions.TypedDict): - """The given VersionId could not be found.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - valueTypeRid: functions_models.ValueTypeRid - versionIdVersionId: functions_models.ValueTypeVersionId - - -@dataclass -class VersionIdNotFound(errors.NotFoundError): - name: typing.Literal["VersionIdNotFound"] - parameters: VersionIdNotFoundParameters - error_instance_id: str - - -__all__ = [ - "ConsistentSnapshotError", - "ExecuteQueryPermissionDenied", - "GetByRidQueriesPermissionDenied", - "InvalidQueryOutputValue", - "InvalidQueryParameterValue", - "MissingParameter", - "QueryEncounteredUserFacingError", - "QueryMemoryExceededLimit", - "QueryNotFound", - "QueryRuntimeError", - "QueryTimeExceededLimit", - "QueryVersionNotFound", - "StreamingExecuteQueryPermissionDenied", - "UnknownParameter", - "ValueTypeNotFound", - "VersionIdNotFound", -] diff --git a/foundry_sdk/v2/functions/models.py b/foundry_sdk/v2/functions/models.py deleted file mode 100644 index 692c46903..000000000 --- a/foundry_sdk/v2/functions/models.py +++ /dev/null @@ -1,653 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -from __future__ import annotations - -import typing - -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk.v2.core import models as core_models -from foundry_sdk.v2.ontologies import models as ontologies_models - - -class ArrayConstraint(core.ModelBase): - """ArrayConstraint""" - - minimum_size: typing.Optional[int] = pydantic.Field(alias=str("minimumSize"), default=None) # type: ignore[literal-required] - maximum_size: typing.Optional[int] = pydantic.Field(alias=str("maximumSize"), default=None) # type: ignore[literal-required] - unique_values: bool = pydantic.Field(alias=str("uniqueValues")) # type: ignore[literal-required] - value_constraint: typing.Optional[ValueTypeConstraint] = pydantic.Field(alias=str("valueConstraint"), default=None) # type: ignore[literal-required] - type: typing.Literal["array"] = "array" - - -DataValue = typing.Any -""" -Represents the value of data in the following format. Note that these values can be nested, for example an array of structs. -| Type | JSON encoding | Example | -|-----------------------------|-------------------------------------------------------|-------------------------------------------------------------------------------| -| Array | array | `["alpha", "bravo", "charlie"]` | -| Attachment | string | `"ri.attachments.main.attachment.2f944bae-5851-4204-8615-920c969a9f2e"` | -| Boolean | boolean | `true` | -| Byte | number | `31` | -| Date | ISO 8601 extended local date string | `"2021-05-01"` | -| Decimal | string | `"2.718281828"` | -| Float | number | `3.14159265` | -| Double | number | `3.14159265` | -| Integer | number | `238940` | -| Long | string | `"58319870951433"` | -| Marking | string | `"MU"` | -| Null | null | `null` | -| Set | array | `["alpha", "bravo", "charlie"]` | -| Short | number | `8739` | -| String | string | `"Call me Ishmael"` | -| Struct | JSON object | `{"name": "John Doe", "age": 42}` | -| TwoDimensionalAggregation | JSON object | `{"groups": [{"key": "alpha", "value": 100}, {"key": "beta", "value": 101}]}` | -| ThreeDimensionalAggregation | JSON object | `{"groups": [{"key": "NYC", "groups": [{"key": "Engineer", "value" : 100}]}]}`| -| Timestamp | ISO 8601 extended offset date-time string in UTC zone | `"2021-01-04T05:00:00Z"` | -""" - - -class EnumConstraint(core.ModelBase): - """EnumConstraint""" - - options: typing.List[typing.Any] - type: typing.Literal["enum"] = "enum" - - -class ExecuteQueryRequest(core.ModelBase): - """ExecuteQueryRequest""" - - parameters: typing.Dict[ParameterId, typing.Optional[DataValue]] - version: typing.Optional[FunctionVersion] = None - - -class ExecuteQueryResponse(core.ModelBase): - """ExecuteQueryResponse""" - - value: DataValue - - -FunctionRid = core.RID -"""The unique resource identifier of a Function, useful for interacting with other Foundry APIs.""" - - -FunctionVersion = str -""" -The version of the given Function, written `..-`, where `-` is optional. -Examples: `1.2.3`, `1.2.3-rc1`. -""" - - -class GetByRidQueriesRequest(core.ModelBase): - """GetByRidQueriesRequest""" - - rid: FunctionRid - version: typing.Optional[FunctionVersion] = None - - -class LengthConstraint(core.ModelBase): - """LengthConstraint""" - - minimum_length: typing.Optional[int] = pydantic.Field(alias=str("minimumLength"), default=None) # type: ignore[literal-required] - maximum_length: typing.Optional[int] = pydantic.Field(alias=str("maximumLength"), default=None) # type: ignore[literal-required] - type: typing.Literal["length"] = "length" - - -class MapConstraint(core.ModelBase): - """MapConstraint""" - - key_constraints: typing.List[ValueTypeConstraint] = pydantic.Field(alias=str("keyConstraints")) # type: ignore[literal-required] - value_constraints: typing.List[ValueTypeConstraint] = pydantic.Field(alias=str("valueConstraints")) # type: ignore[literal-required] - unique_values: bool = pydantic.Field(alias=str("uniqueValues")) # type: ignore[literal-required] - type: typing.Literal["map"] = "map" - - -class NullableConstraint(core.ModelBase): - """NullableConstraint""" - - value: NullableConstraintValue - type: typing.Literal["nullable"] = "nullable" - - -NullableConstraintValue = typing.Literal["NULLABLE", "NOT_NULLABLE"] -"""NullableConstraintValue""" - - -class Parameter(core.ModelBase): - """Details about a parameter of a query.""" - - description: typing.Optional[str] = None - data_type: QueryDataType = pydantic.Field(alias=str("dataType")) # type: ignore[literal-required] - - -ParameterId = str -""" -The unique identifier of the parameter. Parameters are used as inputs when an action or query is applied. -Parameters can be viewed and managed in the **Ontology Manager**. -""" - - -class Query(core.ModelBase): - """Query""" - - api_name: QueryApiName = pydantic.Field(alias=str("apiName")) # type: ignore[literal-required] - description: typing.Optional[str] = None - display_name: typing.Optional[core_models.DisplayName] = pydantic.Field(alias=str("displayName"), default=None) # type: ignore[literal-required] - parameters: typing.Dict[ParameterId, Parameter] - output: QueryDataType - rid: FunctionRid - version: FunctionVersion - - -QueryAggregationKeyType = typing_extensions.Annotated[ - typing.Union[ - core_models.DateType, - core_models.BooleanType, - core_models.StringType, - core_models.DoubleType, - "QueryAggregationRangeType", - core_models.IntegerType, - core_models.TimestampType, - ], - pydantic.Field(discriminator="type"), -] -"""A union of all the types supported by query aggregation keys.""" - - -QueryAggregationRangeSubType = typing_extensions.Annotated[ - typing.Union[ - core_models.DateType, - core_models.DoubleType, - core_models.IntegerType, - core_models.TimestampType, - ], - pydantic.Field(discriminator="type"), -] -"""A union of all the types supported by query aggregation ranges.""" - - -class QueryAggregationRangeType(core.ModelBase): - """QueryAggregationRangeType""" - - sub_type: QueryAggregationRangeSubType = pydantic.Field(alias=str("subType")) # type: ignore[literal-required] - type: typing.Literal["range"] = "range" - - -QueryAggregationValueType = typing_extensions.Annotated[ - typing.Union[core_models.DateType, core_models.DoubleType, core_models.TimestampType], - pydantic.Field(discriminator="type"), -] -"""A union of all the types supported by query aggregation keys.""" - - -QueryApiName = str -"""The name of the Query in the API.""" - - -class QueryArrayType(core.ModelBase): - """QueryArrayType""" - - sub_type: QueryDataType = pydantic.Field(alias=str("subType")) # type: ignore[literal-required] - type: typing.Literal["array"] = "array" - - -QueryDataType = typing_extensions.Annotated[ - typing.Union[ - core_models.DateType, - "QueryStructType", - "QuerySetType", - core_models.StringType, - core_models.DoubleType, - core_models.IntegerType, - "ThreeDimensionalAggregation", - "QueryUnionType", - core_models.FloatType, - core_models.LongType, - core_models.BooleanType, - core_models.UnsupportedType, - core_models.AttachmentType, - core_models.NullType, - "QueryArrayType", - "TwoDimensionalAggregation", - "ValueTypeReference", - core_models.TimestampType, - ], - pydantic.Field(discriminator="type"), -] -"""A union of all the types supported by Query parameters or outputs.""" - - -QueryRuntimeErrorParameter = str -"""QueryRuntimeErrorParameter""" - - -class QuerySetType(core.ModelBase): - """QuerySetType""" - - sub_type: QueryDataType = pydantic.Field(alias=str("subType")) # type: ignore[literal-required] - type: typing.Literal["set"] = "set" - - -class QueryStructField(core.ModelBase): - """QueryStructField""" - - name: StructFieldName - field_type: QueryDataType = pydantic.Field(alias=str("fieldType")) # type: ignore[literal-required] - - -class QueryStructType(core.ModelBase): - """QueryStructType""" - - fields: typing.List[QueryStructField] - type: typing.Literal["struct"] = "struct" - - -class QueryUnionType(core.ModelBase): - """QueryUnionType""" - - union_types: typing.List[QueryDataType] = pydantic.Field(alias=str("unionTypes")) # type: ignore[literal-required] - type: typing.Literal["union"] = "union" - - -class RangesConstraint(core.ModelBase): - """RangesConstraint""" - - minimum_value: typing.Optional[typing.Any] = pydantic.Field(alias=str("minimumValue"), default=None) # type: ignore[literal-required] - maximum_value: typing.Optional[typing.Any] = pydantic.Field(alias=str("maximumValue"), default=None) # type: ignore[literal-required] - type: typing.Literal["range"] = "range" - - -class RegexConstraint(core.ModelBase): - """RegexConstraint""" - - pattern: str - partial_match: bool = pydantic.Field(alias=str("partialMatch")) # type: ignore[literal-required] - type: typing.Literal["regex"] = "regex" - - -class RidConstraint(core.ModelBase): - """RidConstraint""" - - type: typing.Literal["rid"] = "rid" - - -class StreamingExecuteQueryRequest(core.ModelBase): - """StreamingExecuteQueryRequest""" - - ontology: typing.Optional[ontologies_models.OntologyIdentifier] = None - """ - Optional ontology identifier (RID or API name). When provided, executes an ontology-scoped - function. When omitted, executes a global function. - """ - - parameters: typing.Dict[ParameterId, typing.Optional[DataValue]] - version: typing.Optional[FunctionVersion] = None - - -class StructConstraint(core.ModelBase): - """StructConstraint""" - - fields: typing.Dict[StructFieldApiName, ValueTypeApiName] - type: typing.Literal["struct"] = "struct" - - -StructFieldApiName = str -"""StructFieldApiName""" - - -StructFieldName = str -"""The name of a field in a `Struct`.""" - - -class StructV1Constraint(core.ModelBase): - """StructV1Constraint""" - - fields: typing.Dict[StructFieldApiName, ValueTypeConstraint] - type: typing.Literal["structV1"] = "structV1" - - -class ThreeDimensionalAggregation(core.ModelBase): - """ThreeDimensionalAggregation""" - - key_type: QueryAggregationKeyType = pydantic.Field(alias=str("keyType")) # type: ignore[literal-required] - value_type: TwoDimensionalAggregation = pydantic.Field(alias=str("valueType")) # type: ignore[literal-required] - type: typing.Literal["threeDimensionalAggregation"] = "threeDimensionalAggregation" - - -TransactionId = str -"""The ID identifying a transaction.""" - - -class TwoDimensionalAggregation(core.ModelBase): - """TwoDimensionalAggregation""" - - key_type: QueryAggregationKeyType = pydantic.Field(alias=str("keyType")) # type: ignore[literal-required] - value_type: QueryAggregationValueType = pydantic.Field(alias=str("valueType")) # type: ignore[literal-required] - type: typing.Literal["twoDimensionalAggregation"] = "twoDimensionalAggregation" - - -class UuidConstraint(core.ModelBase): - """UuidConstraint""" - - type: typing.Literal["uuid"] = "uuid" - - -class ValueType(core.ModelBase): - """ValueType""" - - rid: ValueTypeRid - version: ValueTypeVersion - version_id: ValueTypeVersionId = pydantic.Field(alias=str("versionId")) # type: ignore[literal-required] - api_name: ValueTypeApiName = pydantic.Field(alias=str("apiName")) # type: ignore[literal-required] - display_name: core_models.DisplayName = pydantic.Field(alias=str("displayName")) # type: ignore[literal-required] - description: typing.Optional[ValueTypeDescription] = None - base_type: typing.Optional[ValueTypeDataType] = pydantic.Field(alias=str("baseType"), default=None) # type: ignore[literal-required] - constraints: typing.List[ValueTypeConstraint] - - -ValueTypeApiName = str -"""The registered API name for the value type.""" - - -ValueTypeConstraint = typing_extensions.Annotated[ - typing.Union[ - "StructConstraint", - "StructV1Constraint", - "RegexConstraint", - "NullableConstraint", - "ArrayConstraint", - "LengthConstraint", - "RangesConstraint", - "RidConstraint", - "MapConstraint", - "UuidConstraint", - "EnumConstraint", - ], - pydantic.Field(discriminator="type"), -] -"""ValueTypeConstraint""" - - -ValueTypeDataType = typing_extensions.Annotated[ - typing.Union[ - "ValueTypeDataTypeDateType", - "ValueTypeDataTypeStructType", - "ValueTypeDataTypeStringType", - "ValueTypeDataTypeByteType", - "ValueTypeDataTypeDoubleType", - "ValueTypeDataTypeOptionalType", - "ValueTypeDataTypeIntegerType", - "ValueTypeDataTypeUnionType", - "ValueTypeDataTypeFloatType", - "ValueTypeDataTypeLongType", - "ValueTypeDataTypeBooleanType", - "ValueTypeDataTypeArrayType", - "ValueTypeDataTypeBinaryType", - "ValueTypeDataTypeValueTypeReference", - "ValueTypeDataTypeShortType", - "ValueTypeDataTypeDecimalType", - "ValueTypeDataTypeMapType", - "ValueTypeDataTypeTimestampType", - ], - pydantic.Field(discriminator="type"), -] -"""The underlying base type of a value type.""" - - -class ValueTypeDataTypeArrayType(core.ModelBase): - """ValueTypeDataTypeArrayType""" - - sub_type: ValueTypeDataType = pydantic.Field(alias=str("subType")) # type: ignore[literal-required] - type: typing.Literal["array"] = "array" - - -class ValueTypeDataTypeBinaryType(core.ModelBase): - """ValueTypeDataTypeBinaryType""" - - type: typing.Literal["binary"] = "binary" - - -class ValueTypeDataTypeBooleanType(core.ModelBase): - """ValueTypeDataTypeBooleanType""" - - type: typing.Literal["boolean"] = "boolean" - - -class ValueTypeDataTypeByteType(core.ModelBase): - """ValueTypeDataTypeByteType""" - - type: typing.Literal["byte"] = "byte" - - -class ValueTypeDataTypeDateType(core.ModelBase): - """ValueTypeDataTypeDateType""" - - type: typing.Literal["date"] = "date" - - -class ValueTypeDataTypeDecimalType(core.ModelBase): - """ValueTypeDataTypeDecimalType""" - - type: typing.Literal["decimal"] = "decimal" - - -class ValueTypeDataTypeDoubleType(core.ModelBase): - """ValueTypeDataTypeDoubleType""" - - type: typing.Literal["double"] = "double" - - -class ValueTypeDataTypeFloatType(core.ModelBase): - """ValueTypeDataTypeFloatType""" - - type: typing.Literal["float"] = "float" - - -class ValueTypeDataTypeIntegerType(core.ModelBase): - """ValueTypeDataTypeIntegerType""" - - type: typing.Literal["integer"] = "integer" - - -class ValueTypeDataTypeLongType(core.ModelBase): - """ValueTypeDataTypeLongType""" - - type: typing.Literal["long"] = "long" - - -class ValueTypeDataTypeMapType(core.ModelBase): - """ValueTypeDataTypeMapType""" - - key_type: ValueTypeDataType = pydantic.Field(alias=str("keyType")) # type: ignore[literal-required] - value_type: ValueTypeDataType = pydantic.Field(alias=str("valueType")) # type: ignore[literal-required] - type: typing.Literal["map"] = "map" - - -class ValueTypeDataTypeOptionalType(core.ModelBase): - """ValueTypeDataTypeOptionalType""" - - wrapped_type: ValueTypeDataType = pydantic.Field(alias=str("wrappedType")) # type: ignore[literal-required] - type: typing.Literal["optional"] = "optional" - - -class ValueTypeDataTypeShortType(core.ModelBase): - """ValueTypeDataTypeShortType""" - - type: typing.Literal["short"] = "short" - - -class ValueTypeDataTypeStringType(core.ModelBase): - """ValueTypeDataTypeStringType""" - - type: typing.Literal["string"] = "string" - - -class ValueTypeDataTypeStructElement(core.ModelBase): - """ValueTypeDataTypeStructElement""" - - name: ValueTypeDataTypeStructFieldIdentifier - field_type: ValueTypeDataType = pydantic.Field(alias=str("fieldType")) # type: ignore[literal-required] - - -ValueTypeDataTypeStructFieldIdentifier = str -"""ValueTypeDataTypeStructFieldIdentifier""" - - -class ValueTypeDataTypeStructType(core.ModelBase): - """ValueTypeDataTypeStructType""" - - fields: typing.List[ValueTypeDataTypeStructElement] - type: typing.Literal["struct"] = "struct" - - -class ValueTypeDataTypeTimestampType(core.ModelBase): - """ValueTypeDataTypeTimestampType""" - - type: typing.Literal["timestamp"] = "timestamp" - - -class ValueTypeDataTypeUnionType(core.ModelBase): - """ValueTypeDataTypeUnionType""" - - member_types: typing.List[ValueTypeDataType] = pydantic.Field(alias=str("memberTypes")) # type: ignore[literal-required] - type: typing.Literal["union"] = "union" - - -class ValueTypeDataTypeValueTypeReference(core.ModelBase): - """ValueTypeDataTypeValueTypeReference""" - - rid: ValueTypeRid - version_id: ValueTypeVersionId = pydantic.Field(alias=str("versionId")) # type: ignore[literal-required] - type: typing.Literal["valueTypeReference"] = "valueTypeReference" - - -ValueTypeDescription = str -"""A description of the value type.""" - - -class ValueTypeReference(core.ModelBase): - """A reference to a value type that has been registered in the Ontology.""" - - rid: ValueTypeRid - version_id: ValueTypeVersionId = pydantic.Field(alias=str("versionId")) # type: ignore[literal-required] - type: typing.Literal["valueTypeReference"] = "valueTypeReference" - - -ValueTypeRid = core.RID -"""The RID of a value type that has been registered in the Ontology.""" - - -ValueTypeVersion = str -"""The version of a value type that has been registered in the Ontology.""" - - -ValueTypeVersionId = core.UUID -"""The version ID of a value type that has been registered in the Ontology.""" - - -class VersionId(core.ModelBase): - """VersionId""" - - rid: ValueTypeRid - version: ValueTypeVersion - version_id: ValueTypeVersionId = pydantic.Field(alias=str("versionId")) # type: ignore[literal-required] - api_name: ValueTypeApiName = pydantic.Field(alias=str("apiName")) # type: ignore[literal-required] - display_name: core_models.DisplayName = pydantic.Field(alias=str("displayName")) # type: ignore[literal-required] - description: typing.Optional[ValueTypeDescription] = None - base_type: typing.Optional[ValueTypeDataType] = pydantic.Field(alias=str("baseType"), default=None) # type: ignore[literal-required] - constraints: typing.List[ValueTypeConstraint] - - -core.resolve_forward_references(QueryAggregationKeyType, globalns=globals(), localns=locals()) -core.resolve_forward_references(QueryAggregationRangeSubType, globalns=globals(), localns=locals()) -core.resolve_forward_references(QueryAggregationValueType, globalns=globals(), localns=locals()) -core.resolve_forward_references(QueryDataType, globalns=globals(), localns=locals()) -core.resolve_forward_references(ValueTypeConstraint, globalns=globals(), localns=locals()) -core.resolve_forward_references(ValueTypeDataType, globalns=globals(), localns=locals()) - -__all__ = [ - "ArrayConstraint", - "DataValue", - "EnumConstraint", - "ExecuteQueryRequest", - "ExecuteQueryResponse", - "FunctionRid", - "FunctionVersion", - "GetByRidQueriesRequest", - "LengthConstraint", - "MapConstraint", - "NullableConstraint", - "NullableConstraintValue", - "Parameter", - "ParameterId", - "Query", - "QueryAggregationKeyType", - "QueryAggregationRangeSubType", - "QueryAggregationRangeType", - "QueryAggregationValueType", - "QueryApiName", - "QueryArrayType", - "QueryDataType", - "QueryRuntimeErrorParameter", - "QuerySetType", - "QueryStructField", - "QueryStructType", - "QueryUnionType", - "RangesConstraint", - "RegexConstraint", - "RidConstraint", - "StreamingExecuteQueryRequest", - "StructConstraint", - "StructFieldApiName", - "StructFieldName", - "StructV1Constraint", - "ThreeDimensionalAggregation", - "TransactionId", - "TwoDimensionalAggregation", - "UuidConstraint", - "ValueType", - "ValueTypeApiName", - "ValueTypeConstraint", - "ValueTypeDataType", - "ValueTypeDataTypeArrayType", - "ValueTypeDataTypeBinaryType", - "ValueTypeDataTypeBooleanType", - "ValueTypeDataTypeByteType", - "ValueTypeDataTypeDateType", - "ValueTypeDataTypeDecimalType", - "ValueTypeDataTypeDoubleType", - "ValueTypeDataTypeFloatType", - "ValueTypeDataTypeIntegerType", - "ValueTypeDataTypeLongType", - "ValueTypeDataTypeMapType", - "ValueTypeDataTypeOptionalType", - "ValueTypeDataTypeShortType", - "ValueTypeDataTypeStringType", - "ValueTypeDataTypeStructElement", - "ValueTypeDataTypeStructFieldIdentifier", - "ValueTypeDataTypeStructType", - "ValueTypeDataTypeTimestampType", - "ValueTypeDataTypeUnionType", - "ValueTypeDataTypeValueTypeReference", - "ValueTypeDescription", - "ValueTypeReference", - "ValueTypeRid", - "ValueTypeVersion", - "ValueTypeVersionId", - "VersionId", -] diff --git a/foundry_sdk/v2/functions/query.py b/foundry_sdk/v2/functions/query.py deleted file mode 100644 index b5cdcd470..000000000 --- a/foundry_sdk/v2/functions/query.py +++ /dev/null @@ -1,720 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing - -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v2.core import models as core_models -from foundry_sdk.v2.functions import errors as functions_errors -from foundry_sdk.v2.functions import models as functions_models -from foundry_sdk.v2.ontologies import models as ontologies_models - - -class QueryClient: - """ - The API client for the Query Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _QueryClientStreaming(self) - self.with_raw_response = _QueryClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def execute( - self, - query_api_name: functions_models.QueryApiName, - *, - parameters: typing.Dict[ - functions_models.ParameterId, typing.Optional[functions_models.DataValue] - ], - attribution: typing.Optional[core_models.Attribution] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - trace_parent: typing.Optional[core_models.TraceParent] = None, - trace_state: typing.Optional[core_models.TraceState] = None, - transaction_id: typing.Optional[functions_models.TransactionId] = None, - version: typing.Optional[functions_models.FunctionVersion] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> functions_models.ExecuteQueryResponse: - """ - Executes a Query using the given parameters. By default, this executes the latest version of the query. - - This endpoint is maintained for backward compatibility only. - - For all new implementations, use the `streamingExecute` endpoint, which supports all function types - and provides enhanced functionality. - - :param query_api_name: - :type query_api_name: QueryApiName - :param parameters: - :type parameters: Dict[ParameterId, Optional[DataValue]] - :param attribution: - :type attribution: Optional[Attribution] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param trace_parent: - :type trace_parent: Optional[TraceParent] - :param trace_state: - :type trace_state: Optional[TraceState] - :param transaction_id: The ID of a transaction to read from. Transactions are an experimental feature and all workflows may not be supported. - :type transaction_id: Optional[TransactionId] - :param version: - :type version: Optional[FunctionVersion] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: functions_models.ExecuteQueryResponse - - :raises ExecuteQueryPermissionDenied: Could not execute the Query. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/functions/queries/{queryApiName}/execute", - query_params={ - "preview": preview, - "transactionId": transaction_id, - }, - path_params={ - "queryApiName": query_api_name, - }, - header_params={ - "attribution": attribution, - "traceParent": trace_parent, - "traceState": trace_state, - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=functions_models.ExecuteQueryRequest( - parameters=parameters, - version=version, - ), - response_type=functions_models.ExecuteQueryResponse, - request_timeout=request_timeout, - throwable_errors={ - "ExecuteQueryPermissionDenied": functions_errors.ExecuteQueryPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - query_api_name: functions_models.QueryApiName, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - version: typing.Optional[functions_models.FunctionVersion] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> functions_models.Query: - """ - Gets a specific query type with the given API name. By default, this gets the latest version of the query. - - :param query_api_name: - :type query_api_name: QueryApiName - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param version: - :type version: Optional[FunctionVersion] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: functions_models.Query - - :raises QueryNotFound: The given Query could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/functions/queries/{queryApiName}", - query_params={ - "preview": preview, - "version": version, - }, - path_params={ - "queryApiName": query_api_name, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=functions_models.Query, - request_timeout=request_timeout, - throwable_errors={ - "QueryNotFound": functions_errors.QueryNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get_by_rid( - self, - *, - rid: functions_models.FunctionRid, - preview: typing.Optional[core_models.PreviewMode] = None, - version: typing.Optional[functions_models.FunctionVersion] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> functions_models.Query: - """ - Gets a specific query type with the given RID.By default, this gets the latest version of the query. - - :param rid: - :type rid: FunctionRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param version: - :type version: Optional[FunctionVersion] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: functions_models.Query - - :raises GetByRidQueriesPermissionDenied: Could not getByRid the Query. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/functions/queries/getByRid", - query_params={ - "preview": preview, - }, - path_params={}, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=functions_models.GetByRidQueriesRequest( - rid=rid, - version=version, - ), - response_type=functions_models.Query, - request_timeout=request_timeout, - throwable_errors={ - "GetByRidQueriesPermissionDenied": functions_errors.GetByRidQueriesPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def streaming_execute( - self, - query_api_name: functions_models.QueryApiName, - *, - parameters: typing.Dict[ - functions_models.ParameterId, typing.Optional[functions_models.DataValue] - ], - attribution: typing.Optional[core_models.Attribution] = None, - ontology: typing.Optional[ontologies_models.OntologyIdentifier] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - trace_parent: typing.Optional[core_models.TraceParent] = None, - trace_state: typing.Optional[core_models.TraceState] = None, - transaction_id: typing.Optional[functions_models.TransactionId] = None, - version: typing.Optional[functions_models.FunctionVersion] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> bytes: - """ - Executes a Query using the given parameters, returning results as an NDJSON stream. By default, this executes the latest version of the query. - - This endpoint supports all Query functions. The endpoint name 'streamingExecute' refers to the NDJSON - streaming response format. Both streaming and non-streaming functions can use this endpoint. - Non-streaming functions return a single-line NDJSON response, while streaming functions return multi-line NDJSON responses. - This is the recommended endpoint for all query execution. - - The response is returned as a binary stream in NDJSON (Newline Delimited JSON) format, where each line - is a StreamingExecuteQueryResponse containing either a data batch or an error. - - For a function returning a list of 5 records with a batch size of 3, the response stream would contain - two lines. The first line contains the first 3 items, and the second line contains the remaining 2 items: - - ``` - {"type":"data","value":[{"productId":"SKU-001","price":29.99},{"productId":"SKU-002","price":49.99},{"productId":"SKU-003","price":19.99}]} - {"type":"data","value":[{"productId":"SKU-004","price":39.99},{"productId":"SKU-005","price":59.99}]} - ``` - - Each line is a separate JSON object followed by a newline character. Clients should parse the stream - line-by-line to process results as they arrive. If an error occurs during execution, the stream will - contain an error line: - - ``` - {"type":"error","errorCode":"INVALID_ARGUMENT","errorName":"QueryRuntimeError","errorInstanceId":"3f8a9c7b-2e4d-4a1f-9b8c-7d6e5f4a3b2c","errorDescription":"Division by zero","parameters":{}} - ``` - - :param query_api_name: - :type query_api_name: QueryApiName - :param parameters: - :type parameters: Dict[ParameterId, Optional[DataValue]] - :param attribution: - :type attribution: Optional[Attribution] - :param ontology: Optional ontology identifier (RID or API name). When provided, executes an ontology-scoped function. When omitted, executes a global function. - :type ontology: Optional[OntologyIdentifier] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param trace_parent: - :type trace_parent: Optional[TraceParent] - :param trace_state: - :type trace_state: Optional[TraceState] - :param transaction_id: The ID of a transaction to read from. Transactions are an experimental feature and all workflows may not be supported. - :type transaction_id: Optional[TransactionId] - :param version: - :type version: Optional[FunctionVersion] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: bytes - - :raises StreamingExecuteQueryPermissionDenied: Could not streamingExecute the Query. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/functions/queries/{queryApiName}/streamingExecute", - query_params={ - "preview": preview, - "transactionId": transaction_id, - }, - path_params={ - "queryApiName": query_api_name, - }, - header_params={ - "attribution": attribution, - "traceParent": trace_parent, - "traceState": trace_state, - "Content-Type": "application/json", - "Accept": "application/octet-stream", - }, - body=functions_models.StreamingExecuteQueryRequest( - ontology=ontology, - parameters=parameters, - version=version, - ), - response_type=bytes, - request_timeout=request_timeout, - throwable_errors={ - "StreamingExecuteQueryPermissionDenied": functions_errors.StreamingExecuteQueryPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _QueryClientRaw: - def __init__(self, client: QueryClient) -> None: - def execute(_: functions_models.ExecuteQueryResponse): ... - def get(_: functions_models.Query): ... - def get_by_rid(_: functions_models.Query): ... - def streaming_execute(_: bytes): ... - - self.execute = core.with_raw_response(execute, client.execute) - self.get = core.with_raw_response(get, client.get) - self.get_by_rid = core.with_raw_response(get_by_rid, client.get_by_rid) - self.streaming_execute = core.with_raw_response(streaming_execute, client.streaming_execute) - - -class _QueryClientStreaming: - def __init__(self, client: QueryClient) -> None: - def execute(_: functions_models.ExecuteQueryResponse): ... - def get(_: functions_models.Query): ... - def get_by_rid(_: functions_models.Query): ... - def streaming_execute(_: bytes): ... - - self.execute = core.with_streaming_response(execute, client.execute) - self.get = core.with_streaming_response(get, client.get) - self.get_by_rid = core.with_streaming_response(get_by_rid, client.get_by_rid) - self.streaming_execute = core.with_streaming_response( - streaming_execute, client.streaming_execute - ) - - -class AsyncQueryClient: - """ - The API client for the Query Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AsyncQueryClientStreaming(self) - self.with_raw_response = _AsyncQueryClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def execute( - self, - query_api_name: functions_models.QueryApiName, - *, - parameters: typing.Dict[ - functions_models.ParameterId, typing.Optional[functions_models.DataValue] - ], - attribution: typing.Optional[core_models.Attribution] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - trace_parent: typing.Optional[core_models.TraceParent] = None, - trace_state: typing.Optional[core_models.TraceState] = None, - transaction_id: typing.Optional[functions_models.TransactionId] = None, - version: typing.Optional[functions_models.FunctionVersion] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[functions_models.ExecuteQueryResponse]: - """ - Executes a Query using the given parameters. By default, this executes the latest version of the query. - - This endpoint is maintained for backward compatibility only. - - For all new implementations, use the `streamingExecute` endpoint, which supports all function types - and provides enhanced functionality. - - :param query_api_name: - :type query_api_name: QueryApiName - :param parameters: - :type parameters: Dict[ParameterId, Optional[DataValue]] - :param attribution: - :type attribution: Optional[Attribution] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param trace_parent: - :type trace_parent: Optional[TraceParent] - :param trace_state: - :type trace_state: Optional[TraceState] - :param transaction_id: The ID of a transaction to read from. Transactions are an experimental feature and all workflows may not be supported. - :type transaction_id: Optional[TransactionId] - :param version: - :type version: Optional[FunctionVersion] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[functions_models.ExecuteQueryResponse] - - :raises ExecuteQueryPermissionDenied: Could not execute the Query. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/functions/queries/{queryApiName}/execute", - query_params={ - "preview": preview, - "transactionId": transaction_id, - }, - path_params={ - "queryApiName": query_api_name, - }, - header_params={ - "attribution": attribution, - "traceParent": trace_parent, - "traceState": trace_state, - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=functions_models.ExecuteQueryRequest( - parameters=parameters, - version=version, - ), - response_type=functions_models.ExecuteQueryResponse, - request_timeout=request_timeout, - throwable_errors={ - "ExecuteQueryPermissionDenied": functions_errors.ExecuteQueryPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - query_api_name: functions_models.QueryApiName, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - version: typing.Optional[functions_models.FunctionVersion] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[functions_models.Query]: - """ - Gets a specific query type with the given API name. By default, this gets the latest version of the query. - - :param query_api_name: - :type query_api_name: QueryApiName - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param version: - :type version: Optional[FunctionVersion] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[functions_models.Query] - - :raises QueryNotFound: The given Query could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/functions/queries/{queryApiName}", - query_params={ - "preview": preview, - "version": version, - }, - path_params={ - "queryApiName": query_api_name, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=functions_models.Query, - request_timeout=request_timeout, - throwable_errors={ - "QueryNotFound": functions_errors.QueryNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get_by_rid( - self, - *, - rid: functions_models.FunctionRid, - preview: typing.Optional[core_models.PreviewMode] = None, - version: typing.Optional[functions_models.FunctionVersion] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[functions_models.Query]: - """ - Gets a specific query type with the given RID.By default, this gets the latest version of the query. - - :param rid: - :type rid: FunctionRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param version: - :type version: Optional[FunctionVersion] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[functions_models.Query] - - :raises GetByRidQueriesPermissionDenied: Could not getByRid the Query. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/functions/queries/getByRid", - query_params={ - "preview": preview, - }, - path_params={}, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=functions_models.GetByRidQueriesRequest( - rid=rid, - version=version, - ), - response_type=functions_models.Query, - request_timeout=request_timeout, - throwable_errors={ - "GetByRidQueriesPermissionDenied": functions_errors.GetByRidQueriesPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def streaming_execute( - self, - query_api_name: functions_models.QueryApiName, - *, - parameters: typing.Dict[ - functions_models.ParameterId, typing.Optional[functions_models.DataValue] - ], - attribution: typing.Optional[core_models.Attribution] = None, - ontology: typing.Optional[ontologies_models.OntologyIdentifier] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - trace_parent: typing.Optional[core_models.TraceParent] = None, - trace_state: typing.Optional[core_models.TraceState] = None, - transaction_id: typing.Optional[functions_models.TransactionId] = None, - version: typing.Optional[functions_models.FunctionVersion] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[bytes]: - """ - Executes a Query using the given parameters, returning results as an NDJSON stream. By default, this executes the latest version of the query. - - This endpoint supports all Query functions. The endpoint name 'streamingExecute' refers to the NDJSON - streaming response format. Both streaming and non-streaming functions can use this endpoint. - Non-streaming functions return a single-line NDJSON response, while streaming functions return multi-line NDJSON responses. - This is the recommended endpoint for all query execution. - - The response is returned as a binary stream in NDJSON (Newline Delimited JSON) format, where each line - is a StreamingExecuteQueryResponse containing either a data batch or an error. - - For a function returning a list of 5 records with a batch size of 3, the response stream would contain - two lines. The first line contains the first 3 items, and the second line contains the remaining 2 items: - - ``` - {"type":"data","value":[{"productId":"SKU-001","price":29.99},{"productId":"SKU-002","price":49.99},{"productId":"SKU-003","price":19.99}]} - {"type":"data","value":[{"productId":"SKU-004","price":39.99},{"productId":"SKU-005","price":59.99}]} - ``` - - Each line is a separate JSON object followed by a newline character. Clients should parse the stream - line-by-line to process results as they arrive. If an error occurs during execution, the stream will - contain an error line: - - ``` - {"type":"error","errorCode":"INVALID_ARGUMENT","errorName":"QueryRuntimeError","errorInstanceId":"3f8a9c7b-2e4d-4a1f-9b8c-7d6e5f4a3b2c","errorDescription":"Division by zero","parameters":{}} - ``` - - :param query_api_name: - :type query_api_name: QueryApiName - :param parameters: - :type parameters: Dict[ParameterId, Optional[DataValue]] - :param attribution: - :type attribution: Optional[Attribution] - :param ontology: Optional ontology identifier (RID or API name). When provided, executes an ontology-scoped function. When omitted, executes a global function. - :type ontology: Optional[OntologyIdentifier] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param trace_parent: - :type trace_parent: Optional[TraceParent] - :param trace_state: - :type trace_state: Optional[TraceState] - :param transaction_id: The ID of a transaction to read from. Transactions are an experimental feature and all workflows may not be supported. - :type transaction_id: Optional[TransactionId] - :param version: - :type version: Optional[FunctionVersion] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[bytes] - - :raises StreamingExecuteQueryPermissionDenied: Could not streamingExecute the Query. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/functions/queries/{queryApiName}/streamingExecute", - query_params={ - "preview": preview, - "transactionId": transaction_id, - }, - path_params={ - "queryApiName": query_api_name, - }, - header_params={ - "attribution": attribution, - "traceParent": trace_parent, - "traceState": trace_state, - "Content-Type": "application/json", - "Accept": "application/octet-stream", - }, - body=functions_models.StreamingExecuteQueryRequest( - ontology=ontology, - parameters=parameters, - version=version, - ), - response_type=bytes, - request_timeout=request_timeout, - throwable_errors={ - "StreamingExecuteQueryPermissionDenied": functions_errors.StreamingExecuteQueryPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _AsyncQueryClientRaw: - def __init__(self, client: AsyncQueryClient) -> None: - def execute(_: functions_models.ExecuteQueryResponse): ... - def get(_: functions_models.Query): ... - def get_by_rid(_: functions_models.Query): ... - def streaming_execute(_: bytes): ... - - self.execute = core.async_with_raw_response(execute, client.execute) - self.get = core.async_with_raw_response(get, client.get) - self.get_by_rid = core.async_with_raw_response(get_by_rid, client.get_by_rid) - self.streaming_execute = core.async_with_raw_response( - streaming_execute, client.streaming_execute - ) - - -class _AsyncQueryClientStreaming: - def __init__(self, client: AsyncQueryClient) -> None: - def execute(_: functions_models.ExecuteQueryResponse): ... - def get(_: functions_models.Query): ... - def get_by_rid(_: functions_models.Query): ... - def streaming_execute(_: bytes): ... - - self.execute = core.async_with_streaming_response(execute, client.execute) - self.get = core.async_with_streaming_response(get, client.get) - self.get_by_rid = core.async_with_streaming_response(get_by_rid, client.get_by_rid) - self.streaming_execute = core.async_with_streaming_response( - streaming_execute, client.streaming_execute - ) diff --git a/foundry_sdk/v2/functions/value_type.py b/foundry_sdk/v2/functions/value_type.py deleted file mode 100644 index 231e7f2a2..000000000 --- a/foundry_sdk/v2/functions/value_type.py +++ /dev/null @@ -1,220 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing -from functools import cached_property - -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v2.core import models as core_models -from foundry_sdk.v2.functions import errors as functions_errors -from foundry_sdk.v2.functions import models as functions_models - - -class ValueTypeClient: - """ - The API client for the ValueType Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _ValueTypeClientStreaming(self) - self.with_raw_response = _ValueTypeClientRaw(self) - - @cached_property - def VersionId(self): - from foundry_sdk.v2.functions.version_id import VersionIdClient - - return VersionIdClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - value_type_rid: functions_models.ValueTypeRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> functions_models.ValueType: - """ - Gets a specific value type with the given RID. The latest version is returned. - - :param value_type_rid: - :type value_type_rid: ValueTypeRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: functions_models.ValueType - - :raises ValueTypeNotFound: The given ValueType could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/functions/valueTypes/{valueTypeRid}", - query_params={ - "preview": preview, - }, - path_params={ - "valueTypeRid": value_type_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=functions_models.ValueType, - request_timeout=request_timeout, - throwable_errors={ - "ValueTypeNotFound": functions_errors.ValueTypeNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _ValueTypeClientRaw: - def __init__(self, client: ValueTypeClient) -> None: - def get(_: functions_models.ValueType): ... - - self.get = core.with_raw_response(get, client.get) - - -class _ValueTypeClientStreaming: - def __init__(self, client: ValueTypeClient) -> None: - def get(_: functions_models.ValueType): ... - - self.get = core.with_streaming_response(get, client.get) - - -class AsyncValueTypeClient: - """ - The API client for the ValueType Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AsyncValueTypeClientStreaming(self) - self.with_raw_response = _AsyncValueTypeClientRaw(self) - - @cached_property - def VersionId(self): - from foundry_sdk.v2.functions.version_id import AsyncVersionIdClient - - return AsyncVersionIdClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - value_type_rid: functions_models.ValueTypeRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[functions_models.ValueType]: - """ - Gets a specific value type with the given RID. The latest version is returned. - - :param value_type_rid: - :type value_type_rid: ValueTypeRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[functions_models.ValueType] - - :raises ValueTypeNotFound: The given ValueType could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/functions/valueTypes/{valueTypeRid}", - query_params={ - "preview": preview, - }, - path_params={ - "valueTypeRid": value_type_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=functions_models.ValueType, - request_timeout=request_timeout, - throwable_errors={ - "ValueTypeNotFound": functions_errors.ValueTypeNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _AsyncValueTypeClientRaw: - def __init__(self, client: AsyncValueTypeClient) -> None: - def get(_: functions_models.ValueType): ... - - self.get = core.async_with_raw_response(get, client.get) - - -class _AsyncValueTypeClientStreaming: - def __init__(self, client: AsyncValueTypeClient) -> None: - def get(_: functions_models.ValueType): ... - - self.get = core.async_with_streaming_response(get, client.get) diff --git a/foundry_sdk/v2/functions/version_id.py b/foundry_sdk/v2/functions/version_id.py deleted file mode 100644 index ad197cd51..000000000 --- a/foundry_sdk/v2/functions/version_id.py +++ /dev/null @@ -1,207 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing - -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v2.core import models as core_models -from foundry_sdk.v2.functions import errors as functions_errors -from foundry_sdk.v2.functions import models as functions_models - - -class VersionIdClient: - """ - The API client for the VersionId Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _VersionIdClientStreaming(self) - self.with_raw_response = _VersionIdClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - value_type_rid: functions_models.ValueTypeRid, - version_id_version_id: functions_models.ValueTypeVersionId, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> functions_models.VersionId: - """ - Gets a specific value type with the given RID. The specified version is returned. - - :param value_type_rid: - :type value_type_rid: ValueTypeRid - :param version_id_version_id: - :type version_id_version_id: ValueTypeVersionId - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: functions_models.VersionId - - :raises VersionIdNotFound: The given VersionId could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/functions/valueTypes/{valueTypeRid}/versionIds/{versionIdVersionId}", - query_params={ - "preview": preview, - }, - path_params={ - "valueTypeRid": value_type_rid, - "versionIdVersionId": version_id_version_id, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=functions_models.VersionId, - request_timeout=request_timeout, - throwable_errors={ - "VersionIdNotFound": functions_errors.VersionIdNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _VersionIdClientRaw: - def __init__(self, client: VersionIdClient) -> None: - def get(_: functions_models.VersionId): ... - - self.get = core.with_raw_response(get, client.get) - - -class _VersionIdClientStreaming: - def __init__(self, client: VersionIdClient) -> None: - def get(_: functions_models.VersionId): ... - - self.get = core.with_streaming_response(get, client.get) - - -class AsyncVersionIdClient: - """ - The API client for the VersionId Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AsyncVersionIdClientStreaming(self) - self.with_raw_response = _AsyncVersionIdClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - value_type_rid: functions_models.ValueTypeRid, - version_id_version_id: functions_models.ValueTypeVersionId, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[functions_models.VersionId]: - """ - Gets a specific value type with the given RID. The specified version is returned. - - :param value_type_rid: - :type value_type_rid: ValueTypeRid - :param version_id_version_id: - :type version_id_version_id: ValueTypeVersionId - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[functions_models.VersionId] - - :raises VersionIdNotFound: The given VersionId could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/functions/valueTypes/{valueTypeRid}/versionIds/{versionIdVersionId}", - query_params={ - "preview": preview, - }, - path_params={ - "valueTypeRid": value_type_rid, - "versionIdVersionId": version_id_version_id, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=functions_models.VersionId, - request_timeout=request_timeout, - throwable_errors={ - "VersionIdNotFound": functions_errors.VersionIdNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _AsyncVersionIdClientRaw: - def __init__(self, client: AsyncVersionIdClient) -> None: - def get(_: functions_models.VersionId): ... - - self.get = core.async_with_raw_response(get, client.get) - - -class _AsyncVersionIdClientStreaming: - def __init__(self, client: AsyncVersionIdClient) -> None: - def get(_: functions_models.VersionId): ... - - self.get = core.async_with_streaming_response(get, client.get) diff --git a/foundry_sdk/v2/geo/errors.py b/foundry_sdk/v2/geo/errors.py deleted file mode 100644 index 6dd5770ff..000000000 --- a/foundry_sdk/v2/geo/errors.py +++ /dev/null @@ -1,16 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -__all__ = [] diff --git a/foundry_sdk/v2/geo/models.py b/foundry_sdk/v2/geo/models.py deleted file mode 100644 index 0dc7bfb5c..000000000 --- a/foundry_sdk/v2/geo/models.py +++ /dev/null @@ -1,226 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -from __future__ import annotations - -import typing - -import annotated_types -import pydantic -import typing_extensions - -from foundry_sdk import _core as core - -BBox = typing.List["Coordinate"] -""" -A GeoJSON object MAY have a member named "bbox" to include -information on the coordinate range for its Geometries, Features, or -FeatureCollections. The value of the bbox member MUST be an array of -length 2*n where n is the number of dimensions represented in the -contained geometries, with all axes of the most southwesterly point -followed by all axes of the more northeasterly point. The axes order -of a bbox follows the axes order of geometries. -""" - - -Coordinate = float -"""Coordinate""" - - -class Feature(core.ModelBase): - """GeoJSon 'Feature' object""" - - geometry: typing.Optional[Geometry] = None - properties: typing.Dict[FeaturePropertyKey, typing.Any] - """ - A `Feature` object has a member with the name "properties". The - value of the properties member is an object (any JSON object or a - JSON null value). - """ - - id: typing.Optional[typing.Any] = None - """ - If a `Feature` has a commonly used identifier, that identifier - SHOULD be included as a member of the Feature object with the name - "id", and the value of this member is either a JSON string or - number. - """ - - bbox: typing.Optional[BBox] = None - type: typing.Literal["Feature"] = "Feature" - - -class FeatureCollection(core.ModelBase): - """GeoJSon 'FeatureCollection' object""" - - features: typing.List[FeatureCollectionTypes] - bbox: typing.Optional[BBox] = None - type: typing.Literal["FeatureCollection"] = "FeatureCollection" - - -FeaturePropertyKey = str -"""FeaturePropertyKey""" - - -class GeoPoint(core.ModelBase): - """GeoPoint""" - - coordinates: Position - bbox: typing.Optional[BBox] = None - type: typing.Literal["Point"] = "Point" - - -Geometry = typing_extensions.Annotated[ - typing.Union[ - "MultiPoint", - "GeometryCollection", - "MultiLineString", - "LineString", - "MultiPolygon", - "GeoPoint", - "Polygon", - ], - pydantic.Field(discriminator="type"), -] -"""Abstract type for all GeoJSon object except Feature and FeatureCollection""" - - -class GeometryCollection(core.ModelBase): - """ - GeoJSon geometry collection - - GeometryCollections composed of a single part or a number of parts of a - single type SHOULD be avoided when that single part or a single object - of multipart type (MultiPoint, MultiLineString, or MultiPolygon) could - be used instead. - """ - - geometries: typing.List[Geometry] - bbox: typing.Optional[BBox] = None - type: typing.Literal["GeometryCollection"] = "GeometryCollection" - - -class LineString(core.ModelBase): - """LineString""" - - coordinates: typing.Optional[LineStringCoordinates] = None - bbox: typing.Optional[BBox] = None - type: typing.Literal["LineString"] = "LineString" - - -LineStringCoordinates = typing_extensions.Annotated[ - typing.List["Position"], annotated_types.Len(min_length=2) -] -"""GeoJSon fundamental geometry construct, array of two or more positions.""" - - -LinearRing = typing_extensions.Annotated[typing.List["Position"], annotated_types.Len(min_length=4)] -""" -A linear ring is a closed LineString with four or more positions. - -The first and last positions are equivalent, and they MUST contain -identical values; their representation SHOULD also be identical. - -A linear ring is the boundary of a surface or the boundary of a hole in -a surface. - -A linear ring MUST follow the right-hand rule with respect to the area -it bounds, i.e., exterior rings are counterclockwise, and holes are -clockwise. -""" - - -class MultiLineString(core.ModelBase): - """MultiLineString""" - - coordinates: typing.List[LineStringCoordinates] - bbox: typing.Optional[BBox] = None - type: typing.Literal["MultiLineString"] = "MultiLineString" - - -class MultiPoint(core.ModelBase): - """MultiPoint""" - - coordinates: typing.List[Position] - bbox: typing.Optional[BBox] = None - type: typing.Literal["MultiPoint"] = "MultiPoint" - - -class MultiPolygon(core.ModelBase): - """MultiPolygon""" - - coordinates: typing.List[typing.List[LinearRing]] - bbox: typing.Optional[BBox] = None - type: typing.Literal["MultiPolygon"] = "MultiPolygon" - - -class Polygon(core.ModelBase): - """Polygon""" - - coordinates: typing.List[LinearRing] - bbox: typing.Optional[BBox] = None - type: typing.Literal["Polygon"] = "Polygon" - - -Position = typing_extensions.Annotated[ - typing.List["Coordinate"], annotated_types.Len(min_length=2, max_length=3) -] -""" -GeoJSon fundamental geometry construct. - -A position is an array of numbers. There MUST be two or more elements. -The first two elements are longitude and latitude, precisely in that order and using decimal numbers. -Altitude or elevation MAY be included as an optional third element. - -Implementations SHOULD NOT extend positions beyond three elements -because the semantics of extra elements are unspecified and ambiguous. -Historically, some implementations have used a fourth element to carry -a linear referencing measure (sometimes denoted as "M") or a numerical -timestamp, but in most situations a parser will not be able to properly -interpret these values. The interpretation and meaning of additional -elements is beyond the scope of this specification, and additional -elements MAY be ignored by parsers. -""" - - -FeatureCollectionTypes = Feature -"""FeatureCollectionTypes""" - - -core.resolve_forward_references(BBox, globalns=globals(), localns=locals()) -core.resolve_forward_references(Geometry, globalns=globals(), localns=locals()) -core.resolve_forward_references(LineStringCoordinates, globalns=globals(), localns=locals()) -core.resolve_forward_references(LinearRing, globalns=globals(), localns=locals()) -core.resolve_forward_references(Position, globalns=globals(), localns=locals()) - -__all__ = [ - "BBox", - "Coordinate", - "Feature", - "FeatureCollection", - "FeatureCollectionTypes", - "FeaturePropertyKey", - "GeoPoint", - "Geometry", - "GeometryCollection", - "LineString", - "LineStringCoordinates", - "LinearRing", - "MultiLineString", - "MultiPoint", - "MultiPolygon", - "Polygon", - "Position", -] diff --git a/foundry_sdk/v2/language_models/__init__.py b/foundry_sdk/v2/language_models/__init__.py deleted file mode 100644 index 06c162f14..000000000 --- a/foundry_sdk/v2/language_models/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -from foundry_sdk.v2.language_models._client import AsyncLanguageModelsClient -from foundry_sdk.v2.language_models._client import LanguageModelsClient - -__all__ = [ - "LanguageModelsClient", - "AsyncLanguageModelsClient", -] diff --git a/foundry_sdk/v2/language_models/_client.py b/foundry_sdk/v2/language_models/_client.py deleted file mode 100644 index 9a3d2dd3f..000000000 --- a/foundry_sdk/v2/language_models/_client.py +++ /dev/null @@ -1,82 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing -from functools import cached_property - -from foundry_sdk import _core as core - - -class LanguageModelsClient: - """ - The API client for the LanguageModels Namespace. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - - @cached_property - def AnthropicModel(self): - from foundry_sdk.v2.language_models.anthropic_model import AnthropicModelClient - - return AnthropicModelClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @cached_property - def OpenAiModel(self): - from foundry_sdk.v2.language_models.open_ai_model import OpenAiModelClient - - return OpenAiModelClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - -class AsyncLanguageModelsClient: - """ - The Async API client for the LanguageModels Namespace. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - from foundry_sdk.v2.language_models.anthropic_model import AsyncAnthropicModelClient # NOQA - from foundry_sdk.v2.language_models.open_ai_model import AsyncOpenAiModelClient - - self.AnthropicModel = AsyncAnthropicModelClient(auth=auth, hostname=hostname, config=config) - - self.OpenAiModel = AsyncOpenAiModelClient(auth=auth, hostname=hostname, config=config) diff --git a/foundry_sdk/v2/language_models/anthropic_model.py b/foundry_sdk/v2/language_models/anthropic_model.py deleted file mode 100644 index 2d69600e6..000000000 --- a/foundry_sdk/v2/language_models/anthropic_model.py +++ /dev/null @@ -1,297 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing - -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v2.core import models as core_models -from foundry_sdk.v2.language_models import errors as language_models_errors -from foundry_sdk.v2.language_models import models as language_models_models - - -class AnthropicModelClient: - """ - The API client for the AnthropicModel Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AnthropicModelClientStreaming(self) - self.with_raw_response = _AnthropicModelClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def messages( - self, - anthropic_model_model_id: language_models_models.LanguageModelApiName, - *, - max_tokens: int, - messages: typing.List[language_models_models.AnthropicMessage], - attribution: typing.Optional[core_models.Attribution] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - stop_sequences: typing.Optional[typing.List[str]] = None, - system: typing.Optional[typing.List[language_models_models.AnthropicSystemMessage]] = None, - temperature: typing.Optional[float] = None, - thinking: typing.Optional[language_models_models.AnthropicThinkingConfig] = None, - tool_choice: typing.Optional[language_models_models.AnthropicToolChoice] = None, - tools: typing.Optional[typing.List[language_models_models.AnthropicTool]] = None, - top_k: typing.Optional[int] = None, - top_p: typing.Optional[float] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> language_models_models.AnthropicMessagesResponse: - """ - - :param anthropic_model_model_id: - :type anthropic_model_model_id: LanguageModelApiName - :param max_tokens: The maximum number of tokens to generate before stopping. - :type max_tokens: int - :param messages: Input messages to the model. This can include a single user-role message or multiple messages with alternating user and assistant roles. - :type messages: List[AnthropicMessage] - :param attribution: - :type attribution: Optional[Attribution] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param stop_sequences: Custom text sequences that will cause the model to stop generating. - :type stop_sequences: Optional[List[str]] - :param system: A system prompt is a way of providing context and instructions to Claude, such as specifying a particular goal or role. As of now, sending multiple system prompts is not supported. - :type system: Optional[List[AnthropicSystemMessage]] - :param temperature: Amount of randomness injected into the response. Ranges from 0.0 to 1.0. Note that even with temperature of 0.0, the results will not be fully deterministic. Defaults to 1.0 - :type temperature: Optional[float] - :param thinking: Configuration for enabling Claude's extended thinking. - :type thinking: Optional[AnthropicThinkingConfig] - :param tool_choice: How the model should use the provided tools. - :type tool_choice: Optional[AnthropicToolChoice] - :param tools: Definitions of tools that the model may use. - :type tools: Optional[List[AnthropicTool]] - :param top_k: Only sample from the top K options for each subsequent token. - :type top_k: Optional[int] - :param top_p: Use nucleus sampling. You should either alter temperature or top_p, but not both - :type top_p: Optional[float] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: language_models_models.AnthropicMessagesResponse - - :raises AnthropicMessagesPermissionDenied: Could not messages the AnthropicModel. - :raises MultipleSystemPromptsNotSupported: Multiple system prompts are not currently supported, but will be in the future. - :raises MultipleToolResultContentsNotSupported: Multiple tool result contents are not currently supported, but will be in the future. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/languageModels/anthropic/{anthropicModelModelId}/messages", - query_params={ - "preview": preview, - }, - path_params={ - "anthropicModelModelId": anthropic_model_model_id, - }, - header_params={ - "attribution": attribution, - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=language_models_models.AnthropicMessagesRequest( - messages=messages, - max_tokens=max_tokens, - stop_sequences=stop_sequences, - system=system, - temperature=temperature, - thinking=thinking, - tool_choice=tool_choice, - tools=tools, - top_k=top_k, - top_p=top_p, - ), - response_type=language_models_models.AnthropicMessagesResponse, - request_timeout=request_timeout, - throwable_errors={ - "AnthropicMessagesPermissionDenied": language_models_errors.AnthropicMessagesPermissionDenied, - "MultipleSystemPromptsNotSupported": language_models_errors.MultipleSystemPromptsNotSupported, - "MultipleToolResultContentsNotSupported": language_models_errors.MultipleToolResultContentsNotSupported, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _AnthropicModelClientRaw: - def __init__(self, client: AnthropicModelClient) -> None: - def messages(_: language_models_models.AnthropicMessagesResponse): ... - - self.messages = core.with_raw_response(messages, client.messages) - - -class _AnthropicModelClientStreaming: - def __init__(self, client: AnthropicModelClient) -> None: - def messages(_: language_models_models.AnthropicMessagesResponse): ... - - self.messages = core.with_streaming_response(messages, client.messages) - - -class AsyncAnthropicModelClient: - """ - The API client for the AnthropicModel Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AsyncAnthropicModelClientStreaming(self) - self.with_raw_response = _AsyncAnthropicModelClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def messages( - self, - anthropic_model_model_id: language_models_models.LanguageModelApiName, - *, - max_tokens: int, - messages: typing.List[language_models_models.AnthropicMessage], - attribution: typing.Optional[core_models.Attribution] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - stop_sequences: typing.Optional[typing.List[str]] = None, - system: typing.Optional[typing.List[language_models_models.AnthropicSystemMessage]] = None, - temperature: typing.Optional[float] = None, - thinking: typing.Optional[language_models_models.AnthropicThinkingConfig] = None, - tool_choice: typing.Optional[language_models_models.AnthropicToolChoice] = None, - tools: typing.Optional[typing.List[language_models_models.AnthropicTool]] = None, - top_k: typing.Optional[int] = None, - top_p: typing.Optional[float] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[language_models_models.AnthropicMessagesResponse]: - """ - - :param anthropic_model_model_id: - :type anthropic_model_model_id: LanguageModelApiName - :param max_tokens: The maximum number of tokens to generate before stopping. - :type max_tokens: int - :param messages: Input messages to the model. This can include a single user-role message or multiple messages with alternating user and assistant roles. - :type messages: List[AnthropicMessage] - :param attribution: - :type attribution: Optional[Attribution] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param stop_sequences: Custom text sequences that will cause the model to stop generating. - :type stop_sequences: Optional[List[str]] - :param system: A system prompt is a way of providing context and instructions to Claude, such as specifying a particular goal or role. As of now, sending multiple system prompts is not supported. - :type system: Optional[List[AnthropicSystemMessage]] - :param temperature: Amount of randomness injected into the response. Ranges from 0.0 to 1.0. Note that even with temperature of 0.0, the results will not be fully deterministic. Defaults to 1.0 - :type temperature: Optional[float] - :param thinking: Configuration for enabling Claude's extended thinking. - :type thinking: Optional[AnthropicThinkingConfig] - :param tool_choice: How the model should use the provided tools. - :type tool_choice: Optional[AnthropicToolChoice] - :param tools: Definitions of tools that the model may use. - :type tools: Optional[List[AnthropicTool]] - :param top_k: Only sample from the top K options for each subsequent token. - :type top_k: Optional[int] - :param top_p: Use nucleus sampling. You should either alter temperature or top_p, but not both - :type top_p: Optional[float] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[language_models_models.AnthropicMessagesResponse] - - :raises AnthropicMessagesPermissionDenied: Could not messages the AnthropicModel. - :raises MultipleSystemPromptsNotSupported: Multiple system prompts are not currently supported, but will be in the future. - :raises MultipleToolResultContentsNotSupported: Multiple tool result contents are not currently supported, but will be in the future. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/languageModels/anthropic/{anthropicModelModelId}/messages", - query_params={ - "preview": preview, - }, - path_params={ - "anthropicModelModelId": anthropic_model_model_id, - }, - header_params={ - "attribution": attribution, - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=language_models_models.AnthropicMessagesRequest( - messages=messages, - max_tokens=max_tokens, - stop_sequences=stop_sequences, - system=system, - temperature=temperature, - thinking=thinking, - tool_choice=tool_choice, - tools=tools, - top_k=top_k, - top_p=top_p, - ), - response_type=language_models_models.AnthropicMessagesResponse, - request_timeout=request_timeout, - throwable_errors={ - "AnthropicMessagesPermissionDenied": language_models_errors.AnthropicMessagesPermissionDenied, - "MultipleSystemPromptsNotSupported": language_models_errors.MultipleSystemPromptsNotSupported, - "MultipleToolResultContentsNotSupported": language_models_errors.MultipleToolResultContentsNotSupported, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _AsyncAnthropicModelClientRaw: - def __init__(self, client: AsyncAnthropicModelClient) -> None: - def messages(_: language_models_models.AnthropicMessagesResponse): ... - - self.messages = core.async_with_raw_response(messages, client.messages) - - -class _AsyncAnthropicModelClientStreaming: - def __init__(self, client: AsyncAnthropicModelClient) -> None: - def messages(_: language_models_models.AnthropicMessagesResponse): ... - - self.messages = core.async_with_streaming_response(messages, client.messages) diff --git a/foundry_sdk/v2/language_models/errors.py b/foundry_sdk/v2/language_models/errors.py deleted file mode 100644 index c5eeaac2e..000000000 --- a/foundry_sdk/v2/language_models/errors.py +++ /dev/null @@ -1,90 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing -from dataclasses import dataclass - -import typing_extensions - -from foundry_sdk import _errors as errors -from foundry_sdk.v2.language_models import models as language_models_models - - -class AnthropicMessagesPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not messages the AnthropicModel.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - anthropicModelModelId: language_models_models.LanguageModelApiName - - -@dataclass -class AnthropicMessagesPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["AnthropicMessagesPermissionDenied"] - parameters: AnthropicMessagesPermissionDeniedParameters - error_instance_id: str - - -class MultipleSystemPromptsNotSupportedParameters(typing_extensions.TypedDict): - """Multiple system prompts are not currently supported, but will be in the future.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - systemPromptSize: int - - -@dataclass -class MultipleSystemPromptsNotSupported(errors.BadRequestError): - name: typing.Literal["MultipleSystemPromptsNotSupported"] - parameters: MultipleSystemPromptsNotSupportedParameters - error_instance_id: str - - -class MultipleToolResultContentsNotSupportedParameters(typing_extensions.TypedDict): - """Multiple tool result contents are not currently supported, but will be in the future.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - toolResultContentsSize: int - - -@dataclass -class MultipleToolResultContentsNotSupported(errors.BadRequestError): - name: typing.Literal["MultipleToolResultContentsNotSupported"] - parameters: MultipleToolResultContentsNotSupportedParameters - error_instance_id: str - - -class OpenAiEmbeddingsPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not embeddings the OpenAiModel.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - openAiModelModelId: language_models_models.LanguageModelApiName - - -@dataclass -class OpenAiEmbeddingsPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["OpenAiEmbeddingsPermissionDenied"] - parameters: OpenAiEmbeddingsPermissionDeniedParameters - error_instance_id: str - - -__all__ = [ - "AnthropicMessagesPermissionDenied", - "MultipleSystemPromptsNotSupported", - "MultipleToolResultContentsNotSupported", - "OpenAiEmbeddingsPermissionDenied", -] diff --git a/foundry_sdk/v2/language_models/models.py b/foundry_sdk/v2/language_models/models.py deleted file mode 100644 index 1db1dd200..000000000 --- a/foundry_sdk/v2/language_models/models.py +++ /dev/null @@ -1,496 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -from __future__ import annotations - -import typing - -import pydantic -import typing_extensions - -from foundry_sdk import _core as core - - -class AnthropicAnyToolChoice(core.ModelBase): - """AnthropicAnyToolChoice""" - - disable_parallel_tool_use: typing.Optional[AnthropicDisableParallelToolUse] = pydantic.Field(alias=str("disableParallelToolUse"), default=None) # type: ignore[literal-required] - type: typing.Literal["any"] = "any" - - -class AnthropicAutoToolChoice(core.ModelBase): - """AnthropicAutoToolChoice""" - - disable_parallel_tool_use: typing.Optional[AnthropicDisableParallelToolUse] = pydantic.Field(alias=str("disableParallelToolUse"), default=None) # type: ignore[literal-required] - type: typing.Literal["auto"] = "auto" - - -class AnthropicBase64PdfDocumentSource(core.ModelBase): - """AnthropicBase64PdfDocumentSource""" - - data: str - type: typing.Literal["pdf"] = "pdf" - - -class AnthropicCharacterLocationCitation(core.ModelBase): - """AnthropicCharacterLocationCitation""" - - cited_text: str = pydantic.Field(alias=str("citedText")) # type: ignore[literal-required] - document_index: int = pydantic.Field(alias=str("documentIndex")) # type: ignore[literal-required] - document_title: typing.Optional[str] = pydantic.Field(alias=str("documentTitle"), default=None) # type: ignore[literal-required] - start_char_index: int = pydantic.Field(alias=str("startCharIndex")) # type: ignore[literal-required] - end_char_index: int = pydantic.Field(alias=str("endCharIndex")) # type: ignore[literal-required] - type: typing.Literal["charLocation"] = "charLocation" - - -AnthropicCompletionContent = typing_extensions.Annotated[ - typing.Union[ - "AnthropicCompletionToolUse", - "AnthropicCompletionText", - "AnthropicCompletionThinking", - "AnthropicCompletionRedactedThinking", - ], - pydantic.Field(discriminator="type"), -] -"""AnthropicCompletionContent""" - - -class AnthropicCompletionRedactedThinking(core.ModelBase): - """AnthropicCompletionRedactedThinking""" - - data: str - type: typing.Literal["redactedThinking"] = "redactedThinking" - - -class AnthropicCompletionText(core.ModelBase): - """AnthropicCompletionText""" - - text: str - citations: typing.Optional[typing.List[AnthropicCompletionCitation]] = None - type: typing.Literal["text"] = "text" - - -class AnthropicCompletionThinking(core.ModelBase): - """AnthropicCompletionThinking""" - - signature: str - thinking: str - type: typing.Literal["thinking"] = "thinking" - - -class AnthropicCompletionToolUse(core.ModelBase): - """AnthropicCompletionToolUse""" - - id: str - input: typing.Any - name: str - type: typing.Literal["toolUse"] = "toolUse" - - -class AnthropicCustomTool(core.ModelBase): - """AnthropicCustomTool""" - - name: str - description: typing.Optional[str] = None - input_schema: JsonSchema = pydantic.Field(alias=str("inputSchema")) # type: ignore[literal-required] - type: typing.Literal["custom"] = "custom" - - -AnthropicDisableParallelToolUse = bool -""" -Whether to disable parallel tool use. Defaults to false. If set to true, the model will output -exactly one tool use. -""" - - -class AnthropicDisabledThinking(core.ModelBase): - """AnthropicDisabledThinking""" - - type: typing.Literal["disabled"] = "disabled" - - -class AnthropicDocument(core.ModelBase): - """AnthropicDocument""" - - source: AnthropicDocumentSource - cache_control: typing.Optional[AnthropicCacheControl] = pydantic.Field(alias=str("cacheControl"), default=None) # type: ignore[literal-required] - citations: typing.Optional[AnthropicDocumentCitations] = None - context: typing.Optional[str] = None - title: typing.Optional[str] = None - type: typing.Literal["document"] = "document" - - -class AnthropicDocumentCitations(core.ModelBase): - """AnthropicDocumentCitations""" - - enabled: bool - - -AnthropicDocumentSource = typing_extensions.Annotated[ - typing.Union["AnthropicBase64PdfDocumentSource", "AnthropicTextDocumentSource"], - pydantic.Field(discriminator="type"), -] -"""AnthropicDocumentSource""" - - -class AnthropicEnabledThinking(core.ModelBase): - """AnthropicEnabledThinking""" - - budget_tokens: int = pydantic.Field(alias=str("budgetTokens")) # type: ignore[literal-required] - """Must be greater than 1024.""" - - type: typing.Literal["enabled"] = "enabled" - - -class AnthropicEphemeralCacheControl(core.ModelBase): - """This currently does not support the ttl field, but will in the future.""" - - type: typing.Literal["ephemeral"] = "ephemeral" - - -class AnthropicImage(core.ModelBase): - """AnthropicImage""" - - source: AnthropicImageSource - cache_control: typing.Optional[AnthropicCacheControl] = pydantic.Field(alias=str("cacheControl"), default=None) # type: ignore[literal-required] - type: typing.Literal["image"] = "image" - - -class AnthropicImageBase64Source(core.ModelBase): - """AnthropicImageBase64Source""" - - data: str - media_type: AnthropicMediaType = pydantic.Field(alias=str("mediaType")) # type: ignore[literal-required] - """This can include image/jpeg, image/png, image/gif or image/webp.""" - - type: typing.Literal["base64"] = "base64" - - -AnthropicMediaType = typing.Literal["IMAGE_JPEG", "IMAGE_PNG", "IMAGE_GIF", "IMAGE_WEBP"] -"""AnthropicMediaType""" - - -class AnthropicMessage(core.ModelBase): - """AnthropicMessage""" - - content: typing.List[AnthropicMessageContent] - role: AnthropicMessageRole - - -AnthropicMessageContent = typing_extensions.Annotated[ - typing.Union[ - "AnthropicImage", - "AnthropicToolUse", - "AnthropicDocument", - "AnthropicText", - "AnthropicToolResult", - "AnthropicThinking", - "AnthropicRedactedThinking", - ], - pydantic.Field(discriminator="type"), -] -"""AnthropicMessageContent""" - - -AnthropicMessageRole = typing.Literal["USER", "ASSISTANT"] -"""AnthropicMessageRole""" - - -class AnthropicMessagesRequest(core.ModelBase): - """AnthropicMessagesRequest""" - - messages: typing.List[AnthropicMessage] - """ - Input messages to the model. This can include a single user-role message or multiple messages with - alternating user and assistant roles. - """ - - max_tokens: int = pydantic.Field(alias=str("maxTokens")) # type: ignore[literal-required] - """The maximum number of tokens to generate before stopping.""" - - stop_sequences: typing.Optional[typing.List[str]] = pydantic.Field(alias=str("stopSequences"), default=None) # type: ignore[literal-required] - """Custom text sequences that will cause the model to stop generating.""" - - system: typing.Optional[typing.List[AnthropicSystemMessage]] = None - """ - A system prompt is a way of providing context and instructions to Claude, such as specifying a - particular goal or role. As of now, sending multiple system prompts is not supported. - """ - - temperature: typing.Optional[float] = None - """ - Amount of randomness injected into the response. Ranges from 0.0 to 1.0. Note that even with - temperature of 0.0, the results will not be fully deterministic. Defaults to 1.0 - """ - - thinking: typing.Optional[AnthropicThinkingConfig] = None - """Configuration for enabling Claude's extended thinking.""" - - tool_choice: typing.Optional[AnthropicToolChoice] = pydantic.Field(alias=str("toolChoice"), default=None) # type: ignore[literal-required] - """How the model should use the provided tools.""" - - tools: typing.Optional[typing.List[AnthropicTool]] = None - """Definitions of tools that the model may use.""" - - top_k: typing.Optional[int] = pydantic.Field(alias=str("topK"), default=None) # type: ignore[literal-required] - """Only sample from the top K options for each subsequent token.""" - - top_p: typing.Optional[float] = pydantic.Field(alias=str("topP"), default=None) # type: ignore[literal-required] - """Use nucleus sampling. You should either alter temperature or top_p, but not both""" - - -class AnthropicMessagesResponse(core.ModelBase): - """AnthropicMessagesResponse""" - - content: typing.List[AnthropicCompletionContent] - id: str - model: str - role: AnthropicMessageRole - stop_reason: typing.Optional[str] = pydantic.Field(alias=str("stopReason"), default=None) # type: ignore[literal-required] - stop_sequence: typing.Optional[str] = pydantic.Field(alias=str("stopSequence"), default=None) # type: ignore[literal-required] - usage: AnthropicTokenUsage - - -class AnthropicNoneToolChoice(core.ModelBase): - """AnthropicNoneToolChoice""" - - type: typing.Literal["none"] = "none" - - -class AnthropicRedactedThinking(core.ModelBase): - """AnthropicRedactedThinking""" - - data: str - type: typing.Literal["redactedThinking"] = "redactedThinking" - - -class AnthropicText(core.ModelBase): - """AnthropicText""" - - text: str - citations: typing.Optional[typing.List[AnthropicCompletionCitation]] = None - cache_control: typing.Optional[AnthropicCacheControl] = pydantic.Field(alias=str("cacheControl"), default=None) # type: ignore[literal-required] - type: typing.Literal["text"] = "text" - - -class AnthropicTextDocumentSource(core.ModelBase): - """AnthropicTextDocumentSource""" - - data: str - type: typing.Literal["text"] = "text" - - -class AnthropicThinking(core.ModelBase): - """AnthropicThinking""" - - signature: str - thinking: str - type: typing.Literal["thinking"] = "thinking" - - -AnthropicThinkingConfig = typing_extensions.Annotated[ - typing.Union["AnthropicDisabledThinking", "AnthropicEnabledThinking"], - pydantic.Field(discriminator="type"), -] -"""AnthropicThinkingConfig""" - - -class AnthropicTokenUsage(core.ModelBase): - """AnthropicTokenUsage""" - - cache_creation_input_tokens: typing.Optional[int] = pydantic.Field(alias=str("cacheCreationInputTokens"), default=None) # type: ignore[literal-required] - cache_read_input_tokens: typing.Optional[int] = pydantic.Field(alias=str("cacheReadInputTokens"), default=None) # type: ignore[literal-required] - input_tokens: int = pydantic.Field(alias=str("inputTokens")) # type: ignore[literal-required] - output_tokens: int = pydantic.Field(alias=str("outputTokens")) # type: ignore[literal-required] - - -AnthropicToolChoice = typing_extensions.Annotated[ - typing.Union[ - "AnthropicAutoToolChoice", - "AnthropicNoneToolChoice", - "AnthropicAnyToolChoice", - "AnthropicToolToolChoice", - ], - pydantic.Field(discriminator="type"), -] -"""AnthropicToolChoice""" - - -class AnthropicToolResult(core.ModelBase): - """AnthropicToolResult""" - - tool_use_id: str = pydantic.Field(alias=str("toolUseId")) # type: ignore[literal-required] - content: typing.Optional[typing.List[AnthropicToolResultContent]] = None - is_error: typing.Optional[bool] = pydantic.Field(alias=str("isError"), default=None) # type: ignore[literal-required] - cache_control: typing.Optional[AnthropicCacheControl] = pydantic.Field(alias=str("cacheControl"), default=None) # type: ignore[literal-required] - type: typing.Literal["toolResult"] = "toolResult" - - -class AnthropicToolToolChoice(core.ModelBase): - """AnthropicToolToolChoice""" - - name: str - disable_parallel_tool_use: typing.Optional[AnthropicDisableParallelToolUse] = pydantic.Field(alias=str("disableParallelToolUse"), default=None) # type: ignore[literal-required] - type: typing.Literal["tool"] = "tool" - - -class AnthropicToolUse(core.ModelBase): - """AnthropicToolUse""" - - id: str - input: typing.Any - name: str - cache_control: typing.Optional[AnthropicCacheControl] = pydantic.Field(alias=str("cacheControl"), default=None) # type: ignore[literal-required] - type: typing.Literal["toolUse"] = "toolUse" - - -JsonSchema = typing.Dict[str, typing.Any] -"""JsonSchema""" - - -LanguageModelApiName = str -"""The name of the LanguageModel in the API.""" - - -OpenAiEmbeddingInput = typing.List[str] -"""OpenAiEmbeddingInput""" - - -class OpenAiEmbeddingTokenUsage(core.ModelBase): - """OpenAiEmbeddingTokenUsage""" - - prompt_tokens: int = pydantic.Field(alias=str("promptTokens")) # type: ignore[literal-required] - """Number of tokens in the prompt""" - - -class OpenAiEmbeddingsRequest(core.ModelBase): - """OpenAiEmbeddingsRequest""" - - input: OpenAiEmbeddingInput - """ - Input text to embed, encoded as an array of strings. Each input must not exceed the max input - tokens for the model (8192 tokens for all embedding models). - """ - - dimensions: typing.Optional[int] = None - """ - The number of dimensions the resulting output embeddings should have. - Only supported in text-embedding-3 and later models. - """ - - encoding_format: typing.Optional[OpenAiEncodingFormat] = pydantic.Field(alias=str("encodingFormat"), default=None) # type: ignore[literal-required] - """The format to return the embeddings in. Can be either float or base64.""" - - -class OpenAiEmbeddingsResponse(core.ModelBase): - """OpenAiEmbeddingsResponse""" - - data: typing.List[typing.List[float]] - """List of embedding vectors""" - - model: str - """The ID of the model used""" - - usage: OpenAiEmbeddingTokenUsage - """Usage statistics for the request""" - - -OpenAiEncodingFormat = typing.Literal["FLOAT", "BASE64"] -"""OpenAiEncodingFormat""" - - -AnthropicCacheControl = AnthropicEphemeralCacheControl -"""AnthropicCacheControl""" - - -AnthropicCompletionCitation = AnthropicCharacterLocationCitation -"""AnthropicCompletionCitation""" - - -AnthropicImageSource = AnthropicImageBase64Source -"""AnthropicImageSource""" - - -AnthropicSystemMessage = AnthropicText -"""AnthropicSystemMessage""" - - -AnthropicTool = AnthropicCustomTool -"""AnthropicTool""" - - -AnthropicToolResultContent = AnthropicText -"""AnthropicToolResultContent""" - - -core.resolve_forward_references(AnthropicCompletionContent, globalns=globals(), localns=locals()) -core.resolve_forward_references(AnthropicDocumentSource, globalns=globals(), localns=locals()) -core.resolve_forward_references(AnthropicMessageContent, globalns=globals(), localns=locals()) -core.resolve_forward_references(AnthropicThinkingConfig, globalns=globals(), localns=locals()) -core.resolve_forward_references(AnthropicToolChoice, globalns=globals(), localns=locals()) -core.resolve_forward_references(JsonSchema, globalns=globals(), localns=locals()) -core.resolve_forward_references(OpenAiEmbeddingInput, globalns=globals(), localns=locals()) - -__all__ = [ - "AnthropicAnyToolChoice", - "AnthropicAutoToolChoice", - "AnthropicBase64PdfDocumentSource", - "AnthropicCacheControl", - "AnthropicCharacterLocationCitation", - "AnthropicCompletionCitation", - "AnthropicCompletionContent", - "AnthropicCompletionRedactedThinking", - "AnthropicCompletionText", - "AnthropicCompletionThinking", - "AnthropicCompletionToolUse", - "AnthropicCustomTool", - "AnthropicDisableParallelToolUse", - "AnthropicDisabledThinking", - "AnthropicDocument", - "AnthropicDocumentCitations", - "AnthropicDocumentSource", - "AnthropicEnabledThinking", - "AnthropicEphemeralCacheControl", - "AnthropicImage", - "AnthropicImageBase64Source", - "AnthropicImageSource", - "AnthropicMediaType", - "AnthropicMessage", - "AnthropicMessageContent", - "AnthropicMessageRole", - "AnthropicMessagesRequest", - "AnthropicMessagesResponse", - "AnthropicNoneToolChoice", - "AnthropicRedactedThinking", - "AnthropicSystemMessage", - "AnthropicText", - "AnthropicTextDocumentSource", - "AnthropicThinking", - "AnthropicThinkingConfig", - "AnthropicTokenUsage", - "AnthropicTool", - "AnthropicToolChoice", - "AnthropicToolResult", - "AnthropicToolResultContent", - "AnthropicToolToolChoice", - "AnthropicToolUse", - "JsonSchema", - "LanguageModelApiName", - "OpenAiEmbeddingInput", - "OpenAiEmbeddingTokenUsage", - "OpenAiEmbeddingsRequest", - "OpenAiEmbeddingsResponse", - "OpenAiEncodingFormat", -] diff --git a/foundry_sdk/v2/language_models/open_ai_model.py b/foundry_sdk/v2/language_models/open_ai_model.py deleted file mode 100644 index 4bd6159ca..000000000 --- a/foundry_sdk/v2/language_models/open_ai_model.py +++ /dev/null @@ -1,233 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing - -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v2.core import models as core_models -from foundry_sdk.v2.language_models import errors as language_models_errors -from foundry_sdk.v2.language_models import models as language_models_models - - -class OpenAiModelClient: - """ - The API client for the OpenAiModel Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _OpenAiModelClientStreaming(self) - self.with_raw_response = _OpenAiModelClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def embeddings( - self, - open_ai_model_model_id: language_models_models.LanguageModelApiName, - *, - input: language_models_models.OpenAiEmbeddingInput, - attribution: typing.Optional[core_models.Attribution] = None, - dimensions: typing.Optional[int] = None, - encoding_format: typing.Optional[language_models_models.OpenAiEncodingFormat] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> language_models_models.OpenAiEmbeddingsResponse: - """ - - :param open_ai_model_model_id: - :type open_ai_model_model_id: LanguageModelApiName - :param input: Input text to embed, encoded as an array of strings. Each input must not exceed the max input tokens for the model (8192 tokens for all embedding models). - :type input: OpenAiEmbeddingInput - :param attribution: - :type attribution: Optional[Attribution] - :param dimensions: The number of dimensions the resulting output embeddings should have. Only supported in text-embedding-3 and later models. - :type dimensions: Optional[int] - :param encoding_format: The format to return the embeddings in. Can be either float or base64. - :type encoding_format: Optional[OpenAiEncodingFormat] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: language_models_models.OpenAiEmbeddingsResponse - - :raises OpenAiEmbeddingsPermissionDenied: Could not embeddings the OpenAiModel. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/languageModels/openAi/{openAiModelModelId}/embeddings", - query_params={ - "preview": preview, - }, - path_params={ - "openAiModelModelId": open_ai_model_model_id, - }, - header_params={ - "attribution": attribution, - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=language_models_models.OpenAiEmbeddingsRequest( - input=input, - dimensions=dimensions, - encoding_format=encoding_format, - ), - response_type=language_models_models.OpenAiEmbeddingsResponse, - request_timeout=request_timeout, - throwable_errors={ - "OpenAiEmbeddingsPermissionDenied": language_models_errors.OpenAiEmbeddingsPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _OpenAiModelClientRaw: - def __init__(self, client: OpenAiModelClient) -> None: - def embeddings(_: language_models_models.OpenAiEmbeddingsResponse): ... - - self.embeddings = core.with_raw_response(embeddings, client.embeddings) - - -class _OpenAiModelClientStreaming: - def __init__(self, client: OpenAiModelClient) -> None: - def embeddings(_: language_models_models.OpenAiEmbeddingsResponse): ... - - self.embeddings = core.with_streaming_response(embeddings, client.embeddings) - - -class AsyncOpenAiModelClient: - """ - The API client for the OpenAiModel Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AsyncOpenAiModelClientStreaming(self) - self.with_raw_response = _AsyncOpenAiModelClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def embeddings( - self, - open_ai_model_model_id: language_models_models.LanguageModelApiName, - *, - input: language_models_models.OpenAiEmbeddingInput, - attribution: typing.Optional[core_models.Attribution] = None, - dimensions: typing.Optional[int] = None, - encoding_format: typing.Optional[language_models_models.OpenAiEncodingFormat] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[language_models_models.OpenAiEmbeddingsResponse]: - """ - - :param open_ai_model_model_id: - :type open_ai_model_model_id: LanguageModelApiName - :param input: Input text to embed, encoded as an array of strings. Each input must not exceed the max input tokens for the model (8192 tokens for all embedding models). - :type input: OpenAiEmbeddingInput - :param attribution: - :type attribution: Optional[Attribution] - :param dimensions: The number of dimensions the resulting output embeddings should have. Only supported in text-embedding-3 and later models. - :type dimensions: Optional[int] - :param encoding_format: The format to return the embeddings in. Can be either float or base64. - :type encoding_format: Optional[OpenAiEncodingFormat] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[language_models_models.OpenAiEmbeddingsResponse] - - :raises OpenAiEmbeddingsPermissionDenied: Could not embeddings the OpenAiModel. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/languageModels/openAi/{openAiModelModelId}/embeddings", - query_params={ - "preview": preview, - }, - path_params={ - "openAiModelModelId": open_ai_model_model_id, - }, - header_params={ - "attribution": attribution, - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=language_models_models.OpenAiEmbeddingsRequest( - input=input, - dimensions=dimensions, - encoding_format=encoding_format, - ), - response_type=language_models_models.OpenAiEmbeddingsResponse, - request_timeout=request_timeout, - throwable_errors={ - "OpenAiEmbeddingsPermissionDenied": language_models_errors.OpenAiEmbeddingsPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _AsyncOpenAiModelClientRaw: - def __init__(self, client: AsyncOpenAiModelClient) -> None: - def embeddings(_: language_models_models.OpenAiEmbeddingsResponse): ... - - self.embeddings = core.async_with_raw_response(embeddings, client.embeddings) - - -class _AsyncOpenAiModelClientStreaming: - def __init__(self, client: AsyncOpenAiModelClient) -> None: - def embeddings(_: language_models_models.OpenAiEmbeddingsResponse): ... - - self.embeddings = core.async_with_streaming_response(embeddings, client.embeddings) diff --git a/foundry_sdk/v2/media_sets/__init__.py b/foundry_sdk/v2/media_sets/__init__.py deleted file mode 100644 index 7bad3f77d..000000000 --- a/foundry_sdk/v2/media_sets/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -from foundry_sdk.v2.media_sets._client import AsyncMediaSetsClient -from foundry_sdk.v2.media_sets._client import MediaSetsClient - -__all__ = [ - "MediaSetsClient", - "AsyncMediaSetsClient", -] diff --git a/foundry_sdk/v2/media_sets/_client.py b/foundry_sdk/v2/media_sets/_client.py deleted file mode 100644 index e35c1ba49..000000000 --- a/foundry_sdk/v2/media_sets/_client.py +++ /dev/null @@ -1,69 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing -from functools import cached_property - -from foundry_sdk import _core as core - - -class MediaSetsClient: - """ - The API client for the MediaSets Namespace. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - - @cached_property - def MediaSet(self): - from foundry_sdk.v2.media_sets.media_set import MediaSetClient - - return MediaSetClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - -class AsyncMediaSetsClient: - """ - The Async API client for the MediaSets Namespace. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - from foundry_sdk.v2.media_sets.media_set import AsyncMediaSetClient - - self.MediaSet = AsyncMediaSetClient(auth=auth, hostname=hostname, config=config) diff --git a/foundry_sdk/v2/media_sets/errors.py b/foundry_sdk/v2/media_sets/errors.py deleted file mode 100644 index 9cb6a0b83..000000000 --- a/foundry_sdk/v2/media_sets/errors.py +++ /dev/null @@ -1,274 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing -from dataclasses import dataclass - -import typing_extensions - -from foundry_sdk import _errors as errors -from foundry_sdk.v2.core import models as core_models -from foundry_sdk.v2.media_sets import models as media_sets_models - - -class ConflictingMediaSetIdentifiersParameters(typing_extensions.TypedDict): - """Client provided more than one of branch name, branch rid, or view rid as arguments. Only one may be specified.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class ConflictingMediaSetIdentifiers(errors.BadRequestError): - name: typing.Literal["ConflictingMediaSetIdentifiers"] - parameters: ConflictingMediaSetIdentifiersParameters - error_instance_id: str - - -class GetMediaItemRidByPathPermissionDeniedParameters(typing_extensions.TypedDict): - """The token does not have permission to view paths in this media set.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - mediaSetRid: core_models.MediaSetRid - - -@dataclass -class GetMediaItemRidByPathPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["GetMediaItemRidByPathPermissionDenied"] - parameters: GetMediaItemRidByPathPermissionDeniedParameters - error_instance_id: str - - -class InvalidMediaItemSchemaParameters(typing_extensions.TypedDict): - """The media item does not match the schema of the media set.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - mediaSetRid: core_models.MediaSetRid - path: typing_extensions.NotRequired[core_models.MediaItemPath] - - -@dataclass -class InvalidMediaItemSchema(errors.BadRequestError): - name: typing.Literal["InvalidMediaItemSchema"] - parameters: InvalidMediaItemSchemaParameters - error_instance_id: str - - -class MediaItemHasUnsupportedSecuritySettingsParameters(typing_extensions.TypedDict): - """The file cannot be read because it contains unsupported security settings (for example, public-key security handlers in a PDF).""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - mediaSetRid: core_models.MediaSetRid - path: typing_extensions.NotRequired[core_models.MediaItemPath] - - -@dataclass -class MediaItemHasUnsupportedSecuritySettings(errors.BadRequestError): - name: typing.Literal["MediaItemHasUnsupportedSecuritySettings"] - parameters: MediaItemHasUnsupportedSecuritySettingsParameters - error_instance_id: str - - -class MediaItemImageUnparsableParameters(typing_extensions.TypedDict): - """The file cannot be parsed as an image.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - mediaSetRid: core_models.MediaSetRid - path: typing_extensions.NotRequired[core_models.MediaItemPath] - - -@dataclass -class MediaItemImageUnparsable(errors.BadRequestError): - name: typing.Literal["MediaItemImageUnparsable"] - parameters: MediaItemImageUnparsableParameters - error_instance_id: str - - -class MediaItemIsPasswordProtectedParameters(typing_extensions.TypedDict): - """The file cannot be read because it is password protected.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - mediaSetRid: core_models.MediaSetRid - path: typing_extensions.NotRequired[core_models.MediaItemPath] - - -@dataclass -class MediaItemIsPasswordProtected(errors.BadRequestError): - name: typing.Literal["MediaItemIsPasswordProtected"] - parameters: MediaItemIsPasswordProtectedParameters - error_instance_id: str - - -class MediaItemNotFoundParameters(typing_extensions.TypedDict): - """The requested media item could not be found, or the client token does not have access to it.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - mediaSetRid: core_models.MediaSetRid - mediaItemRid: core_models.MediaItemRid - - -@dataclass -class MediaItemNotFound(errors.NotFoundError): - name: typing.Literal["MediaItemNotFound"] - parameters: MediaItemNotFoundParameters - error_instance_id: str - - -class MediaItemXmlUnparsableParameters(typing_extensions.TypedDict): - """The document cannot be parsed due to an unrecognized XML structure.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - mediaItemXmlFormat: media_sets_models.MediaItemXmlFormat - mediaSetRid: core_models.MediaSetRid - path: typing_extensions.NotRequired[core_models.MediaItemPath] - - -@dataclass -class MediaItemXmlUnparsable(errors.BadRequestError): - name: typing.Literal["MediaItemXmlUnparsable"] - parameters: MediaItemXmlUnparsableParameters - error_instance_id: str - - -class MediaSetNotFoundParameters(typing_extensions.TypedDict): - """The requested media set could not be found, or the client token does not have access to it.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - mediaSetRid: core_models.MediaSetRid - - -@dataclass -class MediaSetNotFound(errors.NotFoundError): - name: typing.Literal["MediaSetNotFound"] - parameters: MediaSetNotFoundParameters - error_instance_id: str - - -class MediaSetOpenTransactionAlreadyExistsParameters(typing_extensions.TypedDict): - """A transaction is already open on this media set and branch. A branch of a media set can only have one open transaction at a time.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - mediaSetRid: core_models.MediaSetRid - - -@dataclass -class MediaSetOpenTransactionAlreadyExists(errors.ConflictError): - name: typing.Literal["MediaSetOpenTransactionAlreadyExists"] - parameters: MediaSetOpenTransactionAlreadyExistsParameters - error_instance_id: str - - -class MissingMediaItemContentParameters(typing_extensions.TypedDict): - """The file has no bytes.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - mediaSetRid: core_models.MediaSetRid - path: typing_extensions.NotRequired[core_models.MediaItemPath] - - -@dataclass -class MissingMediaItemContent(errors.BadRequestError): - name: typing.Literal["MissingMediaItemContent"] - parameters: MissingMediaItemContentParameters - error_instance_id: str - - -class MissingMediaItemPathParameters(typing_extensions.TypedDict): - """The given media set requires paths but no path was provided.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - mediaSetRid: core_models.MediaSetRid - - -@dataclass -class MissingMediaItemPath(errors.BadRequestError): - name: typing.Literal["MissingMediaItemPath"] - parameters: MissingMediaItemPathParameters - error_instance_id: str - - -class TemporaryMediaUploadInsufficientPermissionsParameters(typing_extensions.TypedDict): - """ - Insufficient permissions to use this endpoint. This may be because that you are using a custom client instead of - an official Palantir client library. If so, please try again using OSDK, Python Functions, or TypeScript - Functions V2. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class TemporaryMediaUploadInsufficientPermissions(errors.PermissionDeniedError): - name: typing.Literal["TemporaryMediaUploadInsufficientPermissions"] - parameters: TemporaryMediaUploadInsufficientPermissionsParameters - error_instance_id: str - - -class TemporaryMediaUploadUnknownFailureParameters(typing_extensions.TypedDict): - """An unknown error occurred, please try again, and if this continues please contact your Palantir representative.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class TemporaryMediaUploadUnknownFailure(errors.InternalServerError): - name: typing.Literal["TemporaryMediaUploadUnknownFailure"] - parameters: TemporaryMediaUploadUnknownFailureParameters - error_instance_id: str - - -class TransformedMediaItemNotFoundParameters(typing_extensions.TypedDict): - """The requested media item could not be found, or the client token does not have access to it.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - mediaSetRid: core_models.MediaSetRid - mediaItemRid: core_models.MediaItemRid - - -@dataclass -class TransformedMediaItemNotFound(errors.NotFoundError): - name: typing.Literal["TransformedMediaItemNotFound"] - parameters: TransformedMediaItemNotFoundParameters - error_instance_id: str - - -__all__ = [ - "ConflictingMediaSetIdentifiers", - "GetMediaItemRidByPathPermissionDenied", - "InvalidMediaItemSchema", - "MediaItemHasUnsupportedSecuritySettings", - "MediaItemImageUnparsable", - "MediaItemIsPasswordProtected", - "MediaItemNotFound", - "MediaItemXmlUnparsable", - "MediaSetNotFound", - "MediaSetOpenTransactionAlreadyExists", - "MissingMediaItemContent", - "MissingMediaItemPath", - "TemporaryMediaUploadInsufficientPermissions", - "TemporaryMediaUploadUnknownFailure", - "TransformedMediaItemNotFound", -] diff --git a/foundry_sdk/v2/media_sets/media_set.py b/foundry_sdk/v2/media_sets/media_set.py deleted file mode 100644 index c568f66d6..000000000 --- a/foundry_sdk/v2/media_sets/media_set.py +++ /dev/null @@ -1,1486 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing - -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v2.core import models as core_models -from foundry_sdk.v2.media_sets import models as media_sets_models - - -class MediaSetClient: - """ - The API client for the MediaSet Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _MediaSetClientStreaming(self) - self.with_raw_response = _MediaSetClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def abort( - self, - media_set_rid: core_models.MediaSetRid, - transaction_id: media_sets_models.TransactionId, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> None: - """ - Aborts an open transaction. Items uploaded to the media set during this transaction will be deleted. - - :param media_set_rid: - :type media_set_rid: MediaSetRid - :param transaction_id: - :type transaction_id: TransactionId - :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: None - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/mediasets/{mediaSetRid}/transactions/{transactionId}/abort", - query_params={ - "preview": preview, - }, - path_params={ - "mediaSetRid": media_set_rid, - "transactionId": transaction_id, - }, - header_params={}, - body=None, - response_type=None, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def calculate( - self, - media_set_rid: core_models.MediaSetRid, - media_item_rid: core_models.MediaItemRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - read_token: typing.Optional[core_models.MediaItemReadToken] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> media_sets_models.TrackedTransformationResponse: - """ - Starts calculation of a thumbnail for a given image. - - :param media_set_rid: The RID of the media set. - :type media_set_rid: MediaSetRid - :param media_item_rid: The RID of the media item. - :type media_item_rid: MediaItemRid - :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. - :type preview: Optional[PreviewMode] - :param read_token: - :type read_token: Optional[MediaItemReadToken] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: media_sets_models.TrackedTransformationResponse - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/mediasets/{mediaSetRid}/items/{mediaItemRid}/transform/imagery/thumbnail/calculate", - query_params={ - "preview": preview, - }, - path_params={ - "mediaSetRid": media_set_rid, - "mediaItemRid": media_item_rid, - }, - header_params={ - "ReadToken": read_token, - "Accept": "application/json", - }, - body=None, - response_type=media_sets_models.TrackedTransformationResponse, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def commit( - self, - media_set_rid: core_models.MediaSetRid, - transaction_id: media_sets_models.TransactionId, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> None: - """ - Commits an open transaction. On success, items uploaded to the media set during this transaction will become available. - - :param media_set_rid: - :type media_set_rid: MediaSetRid - :param transaction_id: - :type transaction_id: TransactionId - :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: None - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/mediasets/{mediaSetRid}/transactions/{transactionId}/commit", - query_params={ - "preview": preview, - }, - path_params={ - "mediaSetRid": media_set_rid, - "transactionId": transaction_id, - }, - header_params={}, - body=None, - response_type=None, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def create( - self, - media_set_rid: core_models.MediaSetRid, - *, - branch_name: typing.Optional[media_sets_models.BranchName] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> media_sets_models.TransactionId: - """ - Creates a new transaction. Items uploaded to the media set while this transaction is open will not be reflected until the transaction is committed. - - :param media_set_rid: - :type media_set_rid: MediaSetRid - :param branch_name: The branch on which to open the transaction. Defaults to `master` for most enrollments. - :type branch_name: Optional[BranchName] - :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: media_sets_models.TransactionId - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/mediasets/{mediaSetRid}/transactions", - query_params={ - "branchName": branch_name, - "preview": preview, - }, - path_params={ - "mediaSetRid": media_set_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=media_sets_models.TransactionId, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get_rid_by_path( - self, - media_set_rid: core_models.MediaSetRid, - *, - media_item_path: core_models.MediaItemPath, - branch_name: typing.Optional[media_sets_models.BranchName] = None, - branch_rid: typing.Optional[media_sets_models.BranchRid] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - view_rid: typing.Optional[core_models.MediaSetViewRid] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> media_sets_models.GetMediaItemRidByPathResponse: - """ - Returns the media item RID for the media item with the specified path. - - :param media_set_rid: The RID of the media set. - :type media_set_rid: MediaSetRid - :param media_item_path: The path of the media item. - :type media_item_path: MediaItemPath - :param branch_name: Specifies the specific branch by name in which to search for this media item. May not be provided if branch rid or view rid are provided. - :type branch_name: Optional[BranchName] - :param branch_rid: Specifies the specific branch by rid in which to search for this media item. May not be provided if branch name or view rid are provided. - :type branch_rid: Optional[BranchRid] - :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. - :type preview: Optional[PreviewMode] - :param view_rid: Specifies the specific view by rid in which to search for this media item. May not be provided if branch name or branch rid are provided. - :type view_rid: Optional[MediaSetViewRid] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: media_sets_models.GetMediaItemRidByPathResponse - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/mediasets/{mediaSetRid}/items/getRidByPath", - query_params={ - "mediaItemPath": media_item_path, - "branchName": branch_name, - "branchRid": branch_rid, - "preview": preview, - "viewRid": view_rid, - }, - path_params={ - "mediaSetRid": media_set_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=media_sets_models.GetMediaItemRidByPathResponse, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def info( - self, - media_set_rid: core_models.MediaSetRid, - media_item_rid: core_models.MediaItemRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - read_token: typing.Optional[core_models.MediaItemReadToken] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> media_sets_models.GetMediaItemInfoResponse: - """ - Gets information about the media item. - - :param media_set_rid: The RID of the media set. - :type media_set_rid: MediaSetRid - :param media_item_rid: The RID of the media item. - :type media_item_rid: MediaItemRid - :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. - :type preview: Optional[PreviewMode] - :param read_token: - :type read_token: Optional[MediaItemReadToken] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: media_sets_models.GetMediaItemInfoResponse - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/mediasets/{mediaSetRid}/items/{mediaItemRid}", - query_params={ - "preview": preview, - }, - path_params={ - "mediaSetRid": media_set_rid, - "mediaItemRid": media_item_rid, - }, - header_params={ - "ReadToken": read_token, - "Accept": "application/json", - }, - body=None, - response_type=media_sets_models.GetMediaItemInfoResponse, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def read( - self, - media_set_rid: core_models.MediaSetRid, - media_item_rid: core_models.MediaItemRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - read_token: typing.Optional[core_models.MediaItemReadToken] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> bytes: - """ - Gets the content of a media item. - - :param media_set_rid: - :type media_set_rid: MediaSetRid - :param media_item_rid: - :type media_item_rid: MediaItemRid - :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. - :type preview: Optional[PreviewMode] - :param read_token: - :type read_token: Optional[MediaItemReadToken] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: bytes - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/mediasets/{mediaSetRid}/items/{mediaItemRid}/content", - query_params={ - "preview": preview, - }, - path_params={ - "mediaSetRid": media_set_rid, - "mediaItemRid": media_item_rid, - }, - header_params={ - "ReadToken": read_token, - "Accept": "*/*", - }, - body=None, - response_type=bytes, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def read_original( - self, - media_set_rid: core_models.MediaSetRid, - media_item_rid: core_models.MediaItemRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - read_token: typing.Optional[core_models.MediaItemReadToken] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> bytes: - """ - Gets the content of an original file uploaded to the media item, even if it was transformed on upload due to being an additional input format. - - :param media_set_rid: - :type media_set_rid: MediaSetRid - :param media_item_rid: - :type media_item_rid: MediaItemRid - :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. - :type preview: Optional[PreviewMode] - :param read_token: - :type read_token: Optional[MediaItemReadToken] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: bytes - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/mediasets/{mediaSetRid}/items/{mediaItemRid}/original", - query_params={ - "preview": preview, - }, - path_params={ - "mediaSetRid": media_set_rid, - "mediaItemRid": media_item_rid, - }, - header_params={ - "ReadToken": read_token, - "Accept": "*/*", - }, - body=None, - response_type=bytes, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def reference( - self, - media_set_rid: core_models.MediaSetRid, - media_item_rid: core_models.MediaItemRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - read_token: typing.Optional[core_models.MediaItemReadToken] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core_models.MediaReference: - """ - Gets the [media reference](https://palantir.com/docs/foundry/data-integration/media-sets/#media-references) for this media item. - - :param media_set_rid: The RID of the media set. - :type media_set_rid: MediaSetRid - :param media_item_rid: The RID of the media item. - :type media_item_rid: MediaItemRid - :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. - :type preview: Optional[PreviewMode] - :param read_token: - :type read_token: Optional[MediaItemReadToken] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core_models.MediaReference - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/mediasets/{mediaSetRid}/items/{mediaItemRid}/reference", - query_params={ - "preview": preview, - }, - path_params={ - "mediaSetRid": media_set_rid, - "mediaItemRid": media_item_rid, - }, - header_params={ - "ReadToken": read_token, - "Accept": "application/json", - }, - body=None, - response_type=core_models.MediaReference, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def retrieve( - self, - media_set_rid: core_models.MediaSetRid, - media_item_rid: core_models.MediaItemRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - read_token: typing.Optional[core_models.MediaItemReadToken] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> bytes: - """ - Retrieves a successfully calculated thumbnail for a given image. - - Thumbnails are 200px wide in the format of `image/webp` - - :param media_set_rid: The RID of the media set. - :type media_set_rid: MediaSetRid - :param media_item_rid: The RID of the media item. - :type media_item_rid: MediaItemRid - :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. - :type preview: Optional[PreviewMode] - :param read_token: - :type read_token: Optional[MediaItemReadToken] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: bytes - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/mediasets/{mediaSetRid}/items/{mediaItemRid}/transform/imagery/thumbnail/retrieve", - query_params={ - "preview": preview, - }, - path_params={ - "mediaSetRid": media_set_rid, - "mediaItemRid": media_item_rid, - }, - header_params={ - "ReadToken": read_token, - "Accept": "*/*", - }, - body=None, - response_type=bytes, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def upload( - self, - media_set_rid: core_models.MediaSetRid, - body: bytes, - *, - branch_name: typing.Optional[media_sets_models.BranchName] = None, - branch_rid: typing.Optional[media_sets_models.BranchRid] = None, - media_item_path: typing.Optional[core_models.MediaItemPath] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - transaction_id: typing.Optional[media_sets_models.TransactionId] = None, - view_rid: typing.Optional[core_models.MediaSetViewRid] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> media_sets_models.PutMediaItemResponse: - """ - Uploads a media item to an existing media set. - The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`. - A branch name, or branch rid, or view rid may optionally be specified. If none is specified, the item will be uploaded to the default branch. If more than one is specified, an error is thrown. - - :param media_set_rid: - :type media_set_rid: MediaSetRid - :param body: Body of the request - :type body: bytes - :param branch_name: Specifies the specific branch by name to which this media item will be uploaded. May not be provided if branch rid or view rid are provided. - :type branch_name: Optional[BranchName] - :param branch_rid: Specifies the specific branch by rid to which this media item will be uploaded. May not be provided if branch name or view rid are provided. - :type branch_rid: Optional[BranchRid] - :param media_item_path: An identifier for a media item within a media set. Necessary if the backing media set requires paths. - :type media_item_path: Optional[MediaItemPath] - :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. - :type preview: Optional[PreviewMode] - :param transaction_id: The id of the transaction associated with this request. Required if this is a transactional media set. - :type transaction_id: Optional[TransactionId] - :param view_rid: Specifies the specific view by rid to which this media item will be uploaded. May not be provided if branch name or branch rid are provided. - :type view_rid: Optional[MediaSetViewRid] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: media_sets_models.PutMediaItemResponse - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/mediasets/{mediaSetRid}/items", - query_params={ - "branchName": branch_name, - "branchRid": branch_rid, - "mediaItemPath": media_item_path, - "preview": preview, - "transactionId": transaction_id, - "viewRid": view_rid, - }, - path_params={ - "mediaSetRid": media_set_rid, - }, - header_params={ - "Content-Type": "*/*", - "Accept": "application/json", - }, - body=body, - response_type=media_sets_models.PutMediaItemResponse, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def upload_media( - self, - body: bytes, - *, - filename: core_models.MediaItemPath, - attribution: typing.Optional[core_models.Attribution] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core_models.MediaReference: - """ - Uploads a temporary media item. If the media item isn't persisted within 1 hour, the item will be deleted. - - If multiple resources are attributed to, usage will be attributed to the first one in the list. - - The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`. - Third-party applications using this endpoint via OAuth2 must request the following operation scopes: `api:ontologies-read api:ontologies-write`. - - :param body: Body of the request - :type body: bytes - :param filename: The path to write the media item to. Required if the backing media set requires paths. - :type filename: MediaItemPath - :param attribution: used for passing through usage attribution - :type attribution: Optional[Attribution] - :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core_models.MediaReference - """ - - return self._api_client.call_api( - core.RequestInfo( - method="PUT", - resource_path="/v2/mediasets/media/upload", - query_params={ - "filename": filename, - "preview": preview, - }, - path_params={}, - header_params={ - "attribution": attribution, - "Content-Type": "*/*", - "Accept": "application/json", - }, - body=body, - response_type=core_models.MediaReference, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _MediaSetClientRaw: - def __init__(self, client: MediaSetClient) -> None: - def abort(_: None): ... - def calculate(_: media_sets_models.TrackedTransformationResponse): ... - def commit(_: None): ... - def create(_: media_sets_models.TransactionId): ... - def get_rid_by_path(_: media_sets_models.GetMediaItemRidByPathResponse): ... - def info(_: media_sets_models.GetMediaItemInfoResponse): ... - def read(_: bytes): ... - def read_original(_: bytes): ... - def reference(_: core_models.MediaReference): ... - def retrieve(_: bytes): ... - def upload(_: media_sets_models.PutMediaItemResponse): ... - def upload_media(_: core_models.MediaReference): ... - - self.abort = core.with_raw_response(abort, client.abort) - self.calculate = core.with_raw_response(calculate, client.calculate) - self.commit = core.with_raw_response(commit, client.commit) - self.create = core.with_raw_response(create, client.create) - self.get_rid_by_path = core.with_raw_response(get_rid_by_path, client.get_rid_by_path) - self.info = core.with_raw_response(info, client.info) - self.read = core.with_raw_response(read, client.read) - self.read_original = core.with_raw_response(read_original, client.read_original) - self.reference = core.with_raw_response(reference, client.reference) - self.retrieve = core.with_raw_response(retrieve, client.retrieve) - self.upload = core.with_raw_response(upload, client.upload) - self.upload_media = core.with_raw_response(upload_media, client.upload_media) - - -class _MediaSetClientStreaming: - def __init__(self, client: MediaSetClient) -> None: - def calculate(_: media_sets_models.TrackedTransformationResponse): ... - def create(_: media_sets_models.TransactionId): ... - def get_rid_by_path(_: media_sets_models.GetMediaItemRidByPathResponse): ... - def info(_: media_sets_models.GetMediaItemInfoResponse): ... - def read(_: bytes): ... - def read_original(_: bytes): ... - def reference(_: core_models.MediaReference): ... - def retrieve(_: bytes): ... - def upload(_: media_sets_models.PutMediaItemResponse): ... - def upload_media(_: core_models.MediaReference): ... - - self.calculate = core.with_streaming_response(calculate, client.calculate) - self.create = core.with_streaming_response(create, client.create) - self.get_rid_by_path = core.with_streaming_response(get_rid_by_path, client.get_rid_by_path) - self.info = core.with_streaming_response(info, client.info) - self.read = core.with_streaming_response(read, client.read) - self.read_original = core.with_streaming_response(read_original, client.read_original) - self.reference = core.with_streaming_response(reference, client.reference) - self.retrieve = core.with_streaming_response(retrieve, client.retrieve) - self.upload = core.with_streaming_response(upload, client.upload) - self.upload_media = core.with_streaming_response(upload_media, client.upload_media) - - -class AsyncMediaSetClient: - """ - The API client for the MediaSet Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AsyncMediaSetClientStreaming(self) - self.with_raw_response = _AsyncMediaSetClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def abort( - self, - media_set_rid: core_models.MediaSetRid, - transaction_id: media_sets_models.TransactionId, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[None]: - """ - Aborts an open transaction. Items uploaded to the media set during this transaction will be deleted. - - :param media_set_rid: - :type media_set_rid: MediaSetRid - :param transaction_id: - :type transaction_id: TransactionId - :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[None] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/mediasets/{mediaSetRid}/transactions/{transactionId}/abort", - query_params={ - "preview": preview, - }, - path_params={ - "mediaSetRid": media_set_rid, - "transactionId": transaction_id, - }, - header_params={}, - body=None, - response_type=None, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def calculate( - self, - media_set_rid: core_models.MediaSetRid, - media_item_rid: core_models.MediaItemRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - read_token: typing.Optional[core_models.MediaItemReadToken] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[media_sets_models.TrackedTransformationResponse]: - """ - Starts calculation of a thumbnail for a given image. - - :param media_set_rid: The RID of the media set. - :type media_set_rid: MediaSetRid - :param media_item_rid: The RID of the media item. - :type media_item_rid: MediaItemRid - :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. - :type preview: Optional[PreviewMode] - :param read_token: - :type read_token: Optional[MediaItemReadToken] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[media_sets_models.TrackedTransformationResponse] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/mediasets/{mediaSetRid}/items/{mediaItemRid}/transform/imagery/thumbnail/calculate", - query_params={ - "preview": preview, - }, - path_params={ - "mediaSetRid": media_set_rid, - "mediaItemRid": media_item_rid, - }, - header_params={ - "ReadToken": read_token, - "Accept": "application/json", - }, - body=None, - response_type=media_sets_models.TrackedTransformationResponse, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def commit( - self, - media_set_rid: core_models.MediaSetRid, - transaction_id: media_sets_models.TransactionId, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[None]: - """ - Commits an open transaction. On success, items uploaded to the media set during this transaction will become available. - - :param media_set_rid: - :type media_set_rid: MediaSetRid - :param transaction_id: - :type transaction_id: TransactionId - :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[None] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/mediasets/{mediaSetRid}/transactions/{transactionId}/commit", - query_params={ - "preview": preview, - }, - path_params={ - "mediaSetRid": media_set_rid, - "transactionId": transaction_id, - }, - header_params={}, - body=None, - response_type=None, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def create( - self, - media_set_rid: core_models.MediaSetRid, - *, - branch_name: typing.Optional[media_sets_models.BranchName] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[media_sets_models.TransactionId]: - """ - Creates a new transaction. Items uploaded to the media set while this transaction is open will not be reflected until the transaction is committed. - - :param media_set_rid: - :type media_set_rid: MediaSetRid - :param branch_name: The branch on which to open the transaction. Defaults to `master` for most enrollments. - :type branch_name: Optional[BranchName] - :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[media_sets_models.TransactionId] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/mediasets/{mediaSetRid}/transactions", - query_params={ - "branchName": branch_name, - "preview": preview, - }, - path_params={ - "mediaSetRid": media_set_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=media_sets_models.TransactionId, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get_rid_by_path( - self, - media_set_rid: core_models.MediaSetRid, - *, - media_item_path: core_models.MediaItemPath, - branch_name: typing.Optional[media_sets_models.BranchName] = None, - branch_rid: typing.Optional[media_sets_models.BranchRid] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - view_rid: typing.Optional[core_models.MediaSetViewRid] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[media_sets_models.GetMediaItemRidByPathResponse]: - """ - Returns the media item RID for the media item with the specified path. - - :param media_set_rid: The RID of the media set. - :type media_set_rid: MediaSetRid - :param media_item_path: The path of the media item. - :type media_item_path: MediaItemPath - :param branch_name: Specifies the specific branch by name in which to search for this media item. May not be provided if branch rid or view rid are provided. - :type branch_name: Optional[BranchName] - :param branch_rid: Specifies the specific branch by rid in which to search for this media item. May not be provided if branch name or view rid are provided. - :type branch_rid: Optional[BranchRid] - :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. - :type preview: Optional[PreviewMode] - :param view_rid: Specifies the specific view by rid in which to search for this media item. May not be provided if branch name or branch rid are provided. - :type view_rid: Optional[MediaSetViewRid] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[media_sets_models.GetMediaItemRidByPathResponse] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/mediasets/{mediaSetRid}/items/getRidByPath", - query_params={ - "mediaItemPath": media_item_path, - "branchName": branch_name, - "branchRid": branch_rid, - "preview": preview, - "viewRid": view_rid, - }, - path_params={ - "mediaSetRid": media_set_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=media_sets_models.GetMediaItemRidByPathResponse, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def info( - self, - media_set_rid: core_models.MediaSetRid, - media_item_rid: core_models.MediaItemRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - read_token: typing.Optional[core_models.MediaItemReadToken] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[media_sets_models.GetMediaItemInfoResponse]: - """ - Gets information about the media item. - - :param media_set_rid: The RID of the media set. - :type media_set_rid: MediaSetRid - :param media_item_rid: The RID of the media item. - :type media_item_rid: MediaItemRid - :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. - :type preview: Optional[PreviewMode] - :param read_token: - :type read_token: Optional[MediaItemReadToken] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[media_sets_models.GetMediaItemInfoResponse] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/mediasets/{mediaSetRid}/items/{mediaItemRid}", - query_params={ - "preview": preview, - }, - path_params={ - "mediaSetRid": media_set_rid, - "mediaItemRid": media_item_rid, - }, - header_params={ - "ReadToken": read_token, - "Accept": "application/json", - }, - body=None, - response_type=media_sets_models.GetMediaItemInfoResponse, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def read( - self, - media_set_rid: core_models.MediaSetRid, - media_item_rid: core_models.MediaItemRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - read_token: typing.Optional[core_models.MediaItemReadToken] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[bytes]: - """ - Gets the content of a media item. - - :param media_set_rid: - :type media_set_rid: MediaSetRid - :param media_item_rid: - :type media_item_rid: MediaItemRid - :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. - :type preview: Optional[PreviewMode] - :param read_token: - :type read_token: Optional[MediaItemReadToken] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[bytes] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/mediasets/{mediaSetRid}/items/{mediaItemRid}/content", - query_params={ - "preview": preview, - }, - path_params={ - "mediaSetRid": media_set_rid, - "mediaItemRid": media_item_rid, - }, - header_params={ - "ReadToken": read_token, - "Accept": "*/*", - }, - body=None, - response_type=bytes, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def read_original( - self, - media_set_rid: core_models.MediaSetRid, - media_item_rid: core_models.MediaItemRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - read_token: typing.Optional[core_models.MediaItemReadToken] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[bytes]: - """ - Gets the content of an original file uploaded to the media item, even if it was transformed on upload due to being an additional input format. - - :param media_set_rid: - :type media_set_rid: MediaSetRid - :param media_item_rid: - :type media_item_rid: MediaItemRid - :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. - :type preview: Optional[PreviewMode] - :param read_token: - :type read_token: Optional[MediaItemReadToken] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[bytes] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/mediasets/{mediaSetRid}/items/{mediaItemRid}/original", - query_params={ - "preview": preview, - }, - path_params={ - "mediaSetRid": media_set_rid, - "mediaItemRid": media_item_rid, - }, - header_params={ - "ReadToken": read_token, - "Accept": "*/*", - }, - body=None, - response_type=bytes, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def reference( - self, - media_set_rid: core_models.MediaSetRid, - media_item_rid: core_models.MediaItemRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - read_token: typing.Optional[core_models.MediaItemReadToken] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[core_models.MediaReference]: - """ - Gets the [media reference](https://palantir.com/docs/foundry/data-integration/media-sets/#media-references) for this media item. - - :param media_set_rid: The RID of the media set. - :type media_set_rid: MediaSetRid - :param media_item_rid: The RID of the media item. - :type media_item_rid: MediaItemRid - :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. - :type preview: Optional[PreviewMode] - :param read_token: - :type read_token: Optional[MediaItemReadToken] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[core_models.MediaReference] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/mediasets/{mediaSetRid}/items/{mediaItemRid}/reference", - query_params={ - "preview": preview, - }, - path_params={ - "mediaSetRid": media_set_rid, - "mediaItemRid": media_item_rid, - }, - header_params={ - "ReadToken": read_token, - "Accept": "application/json", - }, - body=None, - response_type=core_models.MediaReference, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def retrieve( - self, - media_set_rid: core_models.MediaSetRid, - media_item_rid: core_models.MediaItemRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - read_token: typing.Optional[core_models.MediaItemReadToken] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[bytes]: - """ - Retrieves a successfully calculated thumbnail for a given image. - - Thumbnails are 200px wide in the format of `image/webp` - - :param media_set_rid: The RID of the media set. - :type media_set_rid: MediaSetRid - :param media_item_rid: The RID of the media item. - :type media_item_rid: MediaItemRid - :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. - :type preview: Optional[PreviewMode] - :param read_token: - :type read_token: Optional[MediaItemReadToken] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[bytes] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/mediasets/{mediaSetRid}/items/{mediaItemRid}/transform/imagery/thumbnail/retrieve", - query_params={ - "preview": preview, - }, - path_params={ - "mediaSetRid": media_set_rid, - "mediaItemRid": media_item_rid, - }, - header_params={ - "ReadToken": read_token, - "Accept": "*/*", - }, - body=None, - response_type=bytes, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def upload( - self, - media_set_rid: core_models.MediaSetRid, - body: bytes, - *, - branch_name: typing.Optional[media_sets_models.BranchName] = None, - branch_rid: typing.Optional[media_sets_models.BranchRid] = None, - media_item_path: typing.Optional[core_models.MediaItemPath] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - transaction_id: typing.Optional[media_sets_models.TransactionId] = None, - view_rid: typing.Optional[core_models.MediaSetViewRid] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[media_sets_models.PutMediaItemResponse]: - """ - Uploads a media item to an existing media set. - The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`. - A branch name, or branch rid, or view rid may optionally be specified. If none is specified, the item will be uploaded to the default branch. If more than one is specified, an error is thrown. - - :param media_set_rid: - :type media_set_rid: MediaSetRid - :param body: Body of the request - :type body: bytes - :param branch_name: Specifies the specific branch by name to which this media item will be uploaded. May not be provided if branch rid or view rid are provided. - :type branch_name: Optional[BranchName] - :param branch_rid: Specifies the specific branch by rid to which this media item will be uploaded. May not be provided if branch name or view rid are provided. - :type branch_rid: Optional[BranchRid] - :param media_item_path: An identifier for a media item within a media set. Necessary if the backing media set requires paths. - :type media_item_path: Optional[MediaItemPath] - :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. - :type preview: Optional[PreviewMode] - :param transaction_id: The id of the transaction associated with this request. Required if this is a transactional media set. - :type transaction_id: Optional[TransactionId] - :param view_rid: Specifies the specific view by rid to which this media item will be uploaded. May not be provided if branch name or branch rid are provided. - :type view_rid: Optional[MediaSetViewRid] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[media_sets_models.PutMediaItemResponse] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/mediasets/{mediaSetRid}/items", - query_params={ - "branchName": branch_name, - "branchRid": branch_rid, - "mediaItemPath": media_item_path, - "preview": preview, - "transactionId": transaction_id, - "viewRid": view_rid, - }, - path_params={ - "mediaSetRid": media_set_rid, - }, - header_params={ - "Content-Type": "*/*", - "Accept": "application/json", - }, - body=body, - response_type=media_sets_models.PutMediaItemResponse, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def upload_media( - self, - body: bytes, - *, - filename: core_models.MediaItemPath, - attribution: typing.Optional[core_models.Attribution] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[core_models.MediaReference]: - """ - Uploads a temporary media item. If the media item isn't persisted within 1 hour, the item will be deleted. - - If multiple resources are attributed to, usage will be attributed to the first one in the list. - - The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`. - Third-party applications using this endpoint via OAuth2 must request the following operation scopes: `api:ontologies-read api:ontologies-write`. - - :param body: Body of the request - :type body: bytes - :param filename: The path to write the media item to. Required if the backing media set requires paths. - :type filename: MediaItemPath - :param attribution: used for passing through usage attribution - :type attribution: Optional[Attribution] - :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[core_models.MediaReference] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="PUT", - resource_path="/v2/mediasets/media/upload", - query_params={ - "filename": filename, - "preview": preview, - }, - path_params={}, - header_params={ - "attribution": attribution, - "Content-Type": "*/*", - "Accept": "application/json", - }, - body=body, - response_type=core_models.MediaReference, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _AsyncMediaSetClientRaw: - def __init__(self, client: AsyncMediaSetClient) -> None: - def abort(_: None): ... - def calculate(_: media_sets_models.TrackedTransformationResponse): ... - def commit(_: None): ... - def create(_: media_sets_models.TransactionId): ... - def get_rid_by_path(_: media_sets_models.GetMediaItemRidByPathResponse): ... - def info(_: media_sets_models.GetMediaItemInfoResponse): ... - def read(_: bytes): ... - def read_original(_: bytes): ... - def reference(_: core_models.MediaReference): ... - def retrieve(_: bytes): ... - def upload(_: media_sets_models.PutMediaItemResponse): ... - def upload_media(_: core_models.MediaReference): ... - - self.abort = core.async_with_raw_response(abort, client.abort) - self.calculate = core.async_with_raw_response(calculate, client.calculate) - self.commit = core.async_with_raw_response(commit, client.commit) - self.create = core.async_with_raw_response(create, client.create) - self.get_rid_by_path = core.async_with_raw_response(get_rid_by_path, client.get_rid_by_path) - self.info = core.async_with_raw_response(info, client.info) - self.read = core.async_with_raw_response(read, client.read) - self.read_original = core.async_with_raw_response(read_original, client.read_original) - self.reference = core.async_with_raw_response(reference, client.reference) - self.retrieve = core.async_with_raw_response(retrieve, client.retrieve) - self.upload = core.async_with_raw_response(upload, client.upload) - self.upload_media = core.async_with_raw_response(upload_media, client.upload_media) - - -class _AsyncMediaSetClientStreaming: - def __init__(self, client: AsyncMediaSetClient) -> None: - def calculate(_: media_sets_models.TrackedTransformationResponse): ... - def create(_: media_sets_models.TransactionId): ... - def get_rid_by_path(_: media_sets_models.GetMediaItemRidByPathResponse): ... - def info(_: media_sets_models.GetMediaItemInfoResponse): ... - def read(_: bytes): ... - def read_original(_: bytes): ... - def reference(_: core_models.MediaReference): ... - def retrieve(_: bytes): ... - def upload(_: media_sets_models.PutMediaItemResponse): ... - def upload_media(_: core_models.MediaReference): ... - - self.calculate = core.async_with_streaming_response(calculate, client.calculate) - self.create = core.async_with_streaming_response(create, client.create) - self.get_rid_by_path = core.async_with_streaming_response( - get_rid_by_path, client.get_rid_by_path - ) - self.info = core.async_with_streaming_response(info, client.info) - self.read = core.async_with_streaming_response(read, client.read) - self.read_original = core.async_with_streaming_response(read_original, client.read_original) - self.reference = core.async_with_streaming_response(reference, client.reference) - self.retrieve = core.async_with_streaming_response(retrieve, client.retrieve) - self.upload = core.async_with_streaming_response(upload, client.upload) - self.upload_media = core.async_with_streaming_response(upload_media, client.upload_media) diff --git a/foundry_sdk/v2/media_sets/models.py b/foundry_sdk/v2/media_sets/models.py deleted file mode 100644 index 8b2bf3add..000000000 --- a/foundry_sdk/v2/media_sets/models.py +++ /dev/null @@ -1,129 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -from __future__ import annotations - -import typing - -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk.v2.core import models as core_models - -BranchName = str -""" -A name for a media set branch. Valid branch names must be (a) non-empty, (b) less than 256 characters, and -(c) not a valid ResourceIdentifier. -""" - - -BranchRid = core.RID -"""A resource identifier that identifies a branch of a media set.""" - - -class GetMediaItemInfoResponse(core.ModelBase): - """GetMediaItemInfoResponse""" - - view_rid: core_models.MediaSetViewRid = pydantic.Field(alias=str("viewRid")) # type: ignore[literal-required] - path: typing.Optional[core_models.MediaItemPath] = None - logical_timestamp: LogicalTimestamp = pydantic.Field(alias=str("logicalTimestamp")) # type: ignore[literal-required] - attribution: typing.Optional[MediaAttribution] = None - - -class GetMediaItemRidByPathResponse(core.ModelBase): - """GetMediaItemRidByPathResponse""" - - media_item_rid: typing.Optional[core_models.MediaItemRid] = pydantic.Field(alias=str("mediaItemRid"), default=None) # type: ignore[literal-required] - - -LogicalTimestamp = core.Long -""" -A number representing a logical ordering to be used for transactions, etc. -This can be interpreted as a timestamp in microseconds, but may differ slightly from system clock time due -to clock drift and slight adjustments for the sake of ordering. - -Only positive timestamps (representing times after epoch) are supported. -""" - - -class MediaAttribution(core.ModelBase): - """MediaAttribution""" - - creator_id: core_models.UserId = pydantic.Field(alias=str("creatorId")) # type: ignore[literal-required] - creation_timestamp: core.AwareDatetime = pydantic.Field(alias=str("creationTimestamp")) # type: ignore[literal-required] - """The timestamp when the media item was created, in ISO 8601 timestamp format.""" - - -MediaItemXmlFormat = typing.Literal["DOCX", "XLSX", "PPTX"] -"""Format of the media item attempted to be decoded based on the XML structure.""" - - -class PutMediaItemResponse(core.ModelBase): - """PutMediaItemResponse""" - - media_item_rid: core_models.MediaItemRid = pydantic.Field(alias=str("mediaItemRid")) # type: ignore[literal-required] - - -class TrackedTransformationFailedResponse(core.ModelBase): - """TrackedTransformationFailedResponse""" - - type: typing.Literal["failed"] = "failed" - - -class TrackedTransformationPendingResponse(core.ModelBase): - """TrackedTransformationPendingResponse""" - - type: typing.Literal["pending"] = "pending" - - -TrackedTransformationResponse = typing_extensions.Annotated[ - typing.Union[ - "TrackedTransformationPendingResponse", - "TrackedTransformationFailedResponse", - "TrackedTransformationSuccessfulResponse", - ], - pydantic.Field(discriminator="type"), -] -"""TrackedTransformationResponse""" - - -class TrackedTransformationSuccessfulResponse(core.ModelBase): - """TrackedTransformationSuccessfulResponse""" - - type: typing.Literal["successful"] = "successful" - - -TransactionId = core.UUID -"""An identifier which represents a transaction on a media set.""" - - -core.resolve_forward_references(TrackedTransformationResponse, globalns=globals(), localns=locals()) - -__all__ = [ - "BranchName", - "BranchRid", - "GetMediaItemInfoResponse", - "GetMediaItemRidByPathResponse", - "LogicalTimestamp", - "MediaAttribution", - "MediaItemXmlFormat", - "PutMediaItemResponse", - "TrackedTransformationFailedResponse", - "TrackedTransformationPendingResponse", - "TrackedTransformationResponse", - "TrackedTransformationSuccessfulResponse", - "TransactionId", -] diff --git a/foundry_sdk/v2/models/__init__.py b/foundry_sdk/v2/models/__init__.py deleted file mode 100644 index dce842078..000000000 --- a/foundry_sdk/v2/models/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -from foundry_sdk.v2.models._client import AsyncModelsClient -from foundry_sdk.v2.models._client import ModelsClient - -__all__ = [ - "ModelsClient", - "AsyncModelsClient", -] diff --git a/foundry_sdk/v2/models/_client.py b/foundry_sdk/v2/models/_client.py deleted file mode 100644 index e4d3fd923..000000000 --- a/foundry_sdk/v2/models/_client.py +++ /dev/null @@ -1,69 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing -from functools import cached_property - -from foundry_sdk import _core as core - - -class ModelsClient: - """ - The API client for the Models Namespace. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - - @cached_property - def Model(self): - from foundry_sdk.v2.models.model import ModelClient - - return ModelClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - -class AsyncModelsClient: - """ - The Async API client for the Models Namespace. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - from foundry_sdk.v2.models.model import AsyncModelClient - - self.Model = AsyncModelClient(auth=auth, hostname=hostname, config=config) diff --git a/foundry_sdk/v2/models/errors.py b/foundry_sdk/v2/models/errors.py deleted file mode 100644 index 788dc1e22..000000000 --- a/foundry_sdk/v2/models/errors.py +++ /dev/null @@ -1,123 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing -from dataclasses import dataclass - -import typing_extensions - -from foundry_sdk import _errors as errors -from foundry_sdk.v2.models import models as models_models - - -class CondaSolveFailureForProvidedPackagesParameters(typing_extensions.TypedDict): - """Thrown when conda solve fails for the provided input packages.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - errorType: str - errorMessage: str - - -@dataclass -class CondaSolveFailureForProvidedPackages(errors.BadRequestError): - name: typing.Literal["CondaSolveFailureForProvidedPackages"] - parameters: CondaSolveFailureForProvidedPackagesParameters - error_instance_id: str - - -class CreateModelPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not create the Model.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class CreateModelPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["CreateModelPermissionDenied"] - parameters: CreateModelPermissionDeniedParameters - error_instance_id: str - - -class CreateModelVersionPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not create the ModelVersion.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - modelRid: models_models.ModelRid - - -@dataclass -class CreateModelVersionPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["CreateModelVersionPermissionDenied"] - parameters: CreateModelVersionPermissionDeniedParameters - error_instance_id: str - - -class InvalidModelApiParameters(typing_extensions.TypedDict): - """The model api failed validations""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - errorType: str - message: str - - -@dataclass -class InvalidModelApi(errors.BadRequestError): - name: typing.Literal["InvalidModelApi"] - parameters: InvalidModelApiParameters - error_instance_id: str - - -class ModelNotFoundParameters(typing_extensions.TypedDict): - """The given Model could not be found.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - modelRid: models_models.ModelRid - - -@dataclass -class ModelNotFound(errors.NotFoundError): - name: typing.Literal["ModelNotFound"] - parameters: ModelNotFoundParameters - error_instance_id: str - - -class ModelVersionNotFoundParameters(typing_extensions.TypedDict): - """The given ModelVersion could not be found.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - modelRid: models_models.ModelRid - modelVersionRid: models_models.ModelVersionRid - - -@dataclass -class ModelVersionNotFound(errors.NotFoundError): - name: typing.Literal["ModelVersionNotFound"] - parameters: ModelVersionNotFoundParameters - error_instance_id: str - - -__all__ = [ - "CondaSolveFailureForProvidedPackages", - "CreateModelPermissionDenied", - "CreateModelVersionPermissionDenied", - "InvalidModelApi", - "ModelNotFound", - "ModelVersionNotFound", -] diff --git a/foundry_sdk/v2/models/model.py b/foundry_sdk/v2/models/model.py deleted file mode 100644 index 6bcdb3623..000000000 --- a/foundry_sdk/v2/models/model.py +++ /dev/null @@ -1,333 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing -from functools import cached_property - -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v2.core import models as core_models -from foundry_sdk.v2.filesystem import models as filesystem_models -from foundry_sdk.v2.models import errors as models_errors -from foundry_sdk.v2.models import models as models_models - - -class ModelClient: - """ - The API client for the Model Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _ModelClientStreaming(self) - self.with_raw_response = _ModelClientRaw(self) - - @cached_property - def Version(self): - from foundry_sdk.v2.models.model_version import ModelVersionClient - - return ModelVersionClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def create( - self, - *, - name: models_models.ModelName, - parent_folder_rid: filesystem_models.FolderRid, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> models_models.Model: - """ - Creates a new Model with no versions. - :param name: - :type name: ModelName - :param parent_folder_rid: - :type parent_folder_rid: FolderRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: models_models.Model - - :raises CreateModelPermissionDenied: Could not create the Model. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/models", - query_params={ - "preview": preview, - }, - path_params={}, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=models_models.CreateModelRequest( - name=name, - parent_folder_rid=parent_folder_rid, - ), - response_type=models_models.Model, - request_timeout=request_timeout, - throwable_errors={ - "CreateModelPermissionDenied": models_errors.CreateModelPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - model_rid: models_models.ModelRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> models_models.Model: - """ - Retrieves a Model by its Resource Identifier (RID). - :param model_rid: - :type model_rid: ModelRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: models_models.Model - - :raises ModelNotFound: The given Model could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/models/{modelRid}", - query_params={ - "preview": preview, - }, - path_params={ - "modelRid": model_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=models_models.Model, - request_timeout=request_timeout, - throwable_errors={ - "ModelNotFound": models_errors.ModelNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _ModelClientRaw: - def __init__(self, client: ModelClient) -> None: - def create(_: models_models.Model): ... - def get(_: models_models.Model): ... - - self.create = core.with_raw_response(create, client.create) - self.get = core.with_raw_response(get, client.get) - - -class _ModelClientStreaming: - def __init__(self, client: ModelClient) -> None: - def create(_: models_models.Model): ... - def get(_: models_models.Model): ... - - self.create = core.with_streaming_response(create, client.create) - self.get = core.with_streaming_response(get, client.get) - - -class AsyncModelClient: - """ - The API client for the Model Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AsyncModelClientStreaming(self) - self.with_raw_response = _AsyncModelClientRaw(self) - - @cached_property - def Version(self): - from foundry_sdk.v2.models.model_version import AsyncModelVersionClient - - return AsyncModelVersionClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def create( - self, - *, - name: models_models.ModelName, - parent_folder_rid: filesystem_models.FolderRid, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[models_models.Model]: - """ - Creates a new Model with no versions. - :param name: - :type name: ModelName - :param parent_folder_rid: - :type parent_folder_rid: FolderRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[models_models.Model] - - :raises CreateModelPermissionDenied: Could not create the Model. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/models", - query_params={ - "preview": preview, - }, - path_params={}, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=models_models.CreateModelRequest( - name=name, - parent_folder_rid=parent_folder_rid, - ), - response_type=models_models.Model, - request_timeout=request_timeout, - throwable_errors={ - "CreateModelPermissionDenied": models_errors.CreateModelPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - model_rid: models_models.ModelRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[models_models.Model]: - """ - Retrieves a Model by its Resource Identifier (RID). - :param model_rid: - :type model_rid: ModelRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[models_models.Model] - - :raises ModelNotFound: The given Model could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/models/{modelRid}", - query_params={ - "preview": preview, - }, - path_params={ - "modelRid": model_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=models_models.Model, - request_timeout=request_timeout, - throwable_errors={ - "ModelNotFound": models_errors.ModelNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _AsyncModelClientRaw: - def __init__(self, client: AsyncModelClient) -> None: - def create(_: models_models.Model): ... - def get(_: models_models.Model): ... - - self.create = core.async_with_raw_response(create, client.create) - self.get = core.async_with_raw_response(get, client.get) - - -class _AsyncModelClientStreaming: - def __init__(self, client: AsyncModelClient) -> None: - def create(_: models_models.Model): ... - def get(_: models_models.Model): ... - - self.create = core.async_with_streaming_response(create, client.create) - self.get = core.async_with_streaming_response(get, client.get) diff --git a/foundry_sdk/v2/models/model_version.py b/foundry_sdk/v2/models/model_version.py deleted file mode 100644 index 23a34bda7..000000000 --- a/foundry_sdk/v2/models/model_version.py +++ /dev/null @@ -1,457 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing - -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v2.core import models as core_models -from foundry_sdk.v2.models import errors as models_errors -from foundry_sdk.v2.models import models as models_models - - -class ModelVersionClient: - """ - The API client for the ModelVersion Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _ModelVersionClientStreaming(self) - self.with_raw_response = _ModelVersionClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def create( - self, - model_rid: models_models.ModelRid, - *, - backing_repositories: typing.List[core.RID], - conda_requirements: typing.List[str], - model_api: models_models.ModelApi, - model_files: models_models.ModelFiles, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> models_models.ModelVersion: - """ - Creates a new Model Version on an existing model. - :param model_rid: - :type model_rid: ModelRid - :param backing_repositories: - :type backing_repositories: List[RID] - :param conda_requirements: - :type conda_requirements: List[str] - :param model_api: - :type model_api: ModelApi - :param model_files: - :type model_files: ModelFiles - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: models_models.ModelVersion - - :raises CreateModelVersionPermissionDenied: Could not create the ModelVersion. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/models/{modelRid}/versions", - query_params={ - "preview": preview, - }, - path_params={ - "modelRid": model_rid, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=models_models.CreateModelVersionRequest( - model_files=model_files, - backing_repositories=backing_repositories, - conda_requirements=conda_requirements, - model_api=model_api, - ), - response_type=models_models.ModelVersion, - request_timeout=request_timeout, - throwable_errors={ - "CreateModelVersionPermissionDenied": models_errors.CreateModelVersionPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - model_rid: models_models.ModelRid, - model_version_rid: models_models.ModelVersionRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> models_models.ModelVersion: - """ - Retrieves a Model Version by its Resource Identifier (RID). - :param model_rid: - :type model_rid: ModelRid - :param model_version_rid: - :type model_version_rid: ModelVersionRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: models_models.ModelVersion - - :raises ModelVersionNotFound: The given ModelVersion could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/models/{modelRid}/versions/{modelVersionRid}", - query_params={ - "preview": preview, - }, - path_params={ - "modelRid": model_rid, - "modelVersionRid": model_version_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=models_models.ModelVersion, - request_timeout=request_timeout, - throwable_errors={ - "ModelVersionNotFound": models_errors.ModelVersionNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def list( - self, - model_rid: models_models.ModelRid, - *, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.ResourceIterator[models_models.ModelVersion]: - """ - Lists all Model Versions for a given Model. - :param model_rid: - :type model_rid: ModelRid - :param page_size: The page size to use for the endpoint. - :type page_size: Optional[PageSize] - :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. - :type page_token: Optional[PageToken] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.ResourceIterator[models_models.ModelVersion] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/models/{modelRid}/versions", - query_params={ - "pageSize": page_size, - "pageToken": page_token, - "preview": preview, - }, - path_params={ - "modelRid": model_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=models_models.ListModelVersionsResponse, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - -class _ModelVersionClientRaw: - def __init__(self, client: ModelVersionClient) -> None: - def create(_: models_models.ModelVersion): ... - def get(_: models_models.ModelVersion): ... - def list(_: models_models.ListModelVersionsResponse): ... - - self.create = core.with_raw_response(create, client.create) - self.get = core.with_raw_response(get, client.get) - self.list = core.with_raw_response(list, client.list) - - -class _ModelVersionClientStreaming: - def __init__(self, client: ModelVersionClient) -> None: - def create(_: models_models.ModelVersion): ... - def get(_: models_models.ModelVersion): ... - def list(_: models_models.ListModelVersionsResponse): ... - - self.create = core.with_streaming_response(create, client.create) - self.get = core.with_streaming_response(get, client.get) - self.list = core.with_streaming_response(list, client.list) - - -class AsyncModelVersionClient: - """ - The API client for the ModelVersion Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AsyncModelVersionClientStreaming(self) - self.with_raw_response = _AsyncModelVersionClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def create( - self, - model_rid: models_models.ModelRid, - *, - backing_repositories: typing.List[core.RID], - conda_requirements: typing.List[str], - model_api: models_models.ModelApi, - model_files: models_models.ModelFiles, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[models_models.ModelVersion]: - """ - Creates a new Model Version on an existing model. - :param model_rid: - :type model_rid: ModelRid - :param backing_repositories: - :type backing_repositories: List[RID] - :param conda_requirements: - :type conda_requirements: List[str] - :param model_api: - :type model_api: ModelApi - :param model_files: - :type model_files: ModelFiles - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[models_models.ModelVersion] - - :raises CreateModelVersionPermissionDenied: Could not create the ModelVersion. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/models/{modelRid}/versions", - query_params={ - "preview": preview, - }, - path_params={ - "modelRid": model_rid, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=models_models.CreateModelVersionRequest( - model_files=model_files, - backing_repositories=backing_repositories, - conda_requirements=conda_requirements, - model_api=model_api, - ), - response_type=models_models.ModelVersion, - request_timeout=request_timeout, - throwable_errors={ - "CreateModelVersionPermissionDenied": models_errors.CreateModelVersionPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - model_rid: models_models.ModelRid, - model_version_rid: models_models.ModelVersionRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[models_models.ModelVersion]: - """ - Retrieves a Model Version by its Resource Identifier (RID). - :param model_rid: - :type model_rid: ModelRid - :param model_version_rid: - :type model_version_rid: ModelVersionRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[models_models.ModelVersion] - - :raises ModelVersionNotFound: The given ModelVersion could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/models/{modelRid}/versions/{modelVersionRid}", - query_params={ - "preview": preview, - }, - path_params={ - "modelRid": model_rid, - "modelVersionRid": model_version_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=models_models.ModelVersion, - request_timeout=request_timeout, - throwable_errors={ - "ModelVersionNotFound": models_errors.ModelVersionNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def list( - self, - model_rid: models_models.ModelRid, - *, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.AsyncResourceIterator[models_models.ModelVersion]: - """ - Lists all Model Versions for a given Model. - :param model_rid: - :type model_rid: ModelRid - :param page_size: The page size to use for the endpoint. - :type page_size: Optional[PageSize] - :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. - :type page_token: Optional[PageToken] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.AsyncResourceIterator[models_models.ModelVersion] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/models/{modelRid}/versions", - query_params={ - "pageSize": page_size, - "pageToken": page_token, - "preview": preview, - }, - path_params={ - "modelRid": model_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=models_models.ListModelVersionsResponse, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - -class _AsyncModelVersionClientRaw: - def __init__(self, client: AsyncModelVersionClient) -> None: - def create(_: models_models.ModelVersion): ... - def get(_: models_models.ModelVersion): ... - def list(_: models_models.ListModelVersionsResponse): ... - - self.create = core.async_with_raw_response(create, client.create) - self.get = core.async_with_raw_response(get, client.get) - self.list = core.async_with_raw_response(list, client.list) - - -class _AsyncModelVersionClientStreaming: - def __init__(self, client: AsyncModelVersionClient) -> None: - def create(_: models_models.ModelVersion): ... - def get(_: models_models.ModelVersion): ... - def list(_: models_models.ListModelVersionsResponse): ... - - self.create = core.async_with_streaming_response(create, client.create) - self.get = core.async_with_streaming_response(get, client.get) - self.list = core.async_with_streaming_response(list, client.list) diff --git a/foundry_sdk/v2/models/models.py b/foundry_sdk/v2/models/models.py deleted file mode 100644 index 6cb328c96..000000000 --- a/foundry_sdk/v2/models/models.py +++ /dev/null @@ -1,219 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -from __future__ import annotations - -import typing - -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk.v2.core import models as core_models -from foundry_sdk.v2.filesystem import models as filesystem_models - - -class CreateModelRequest(core.ModelBase): - """CreateModelRequest""" - - name: ModelName - parent_folder_rid: filesystem_models.FolderRid = pydantic.Field(alias=str("parentFolderRid")) # type: ignore[literal-required] - - -class CreateModelVersionRequest(core.ModelBase): - """CreateModelVersionRequest""" - - model_files: ModelFiles = pydantic.Field(alias=str("modelFiles")) # type: ignore[literal-required] - backing_repositories: typing.List[core.RID] = pydantic.Field(alias=str("backingRepositories")) # type: ignore[literal-required] - conda_requirements: typing.List[str] = pydantic.Field(alias=str("condaRequirements")) # type: ignore[literal-required] - model_api: ModelApi = pydantic.Field(alias=str("modelApi")) # type: ignore[literal-required] - - -class DillModelFiles(core.ModelBase): - """DillModelFiles""" - - serialized_model_function: str = pydantic.Field(alias=str("serializedModelFunction")) # type: ignore[literal-required] - type: typing.Literal["dill"] = "dill" - - -class ListModelVersionsResponse(core.ModelBase): - """ListModelVersionsResponse""" - - data: typing.List[ModelVersion] - next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] - - -class Model(core.ModelBase): - """Model""" - - rid: ModelRid - - -class ModelApi(core.ModelBase): - """The Model API is a specification that describes the inputs and outputs of a machine learning model. It is used to define the interface for the model, including the types of data that can be passed to it and the types of data that it will return.""" - - inputs: typing.List[ModelApiInput] - outputs: typing.List[ModelApiOutput] - - -class ModelApiAnyType(core.ModelBase): - """ModelApiAnyType""" - - type: typing.Literal["any"] = "any" - - -class ModelApiArrayType(core.ModelBase): - """ModelApiArrayType""" - - item_type: ModelApiDataType = pydantic.Field(alias=str("itemType")) # type: ignore[literal-required] - type: typing.Literal["array"] = "array" - - -class ModelApiColumn(core.ModelBase): - """ModelApiColumn""" - - name: str - required: typing.Optional[bool] = None - """true by default; false if the column can be null or omitted""" - - data_type: ModelApiDataType = pydantic.Field(alias=str("dataType")) # type: ignore[literal-required] - - -ModelApiDataType = typing_extensions.Annotated[ - typing.Union[ - core_models.DateType, - core_models.BooleanType, - core_models.UnsupportedType, - core_models.StringType, - "ModelApiArrayType", - core_models.DoubleType, - core_models.IntegerType, - core_models.FloatType, - "ModelApiAnyType", - "ModelApiMapType", - core_models.LongType, - core_models.TimestampType, - ], - pydantic.Field(discriminator="type"), -] -"""ModelApiDataType""" - - -ModelApiInput = typing_extensions.Annotated[ - typing.Union[core_models.UnsupportedType, "ModelApiParameterType", "ModelApiTabularType"], - pydantic.Field(discriminator="type"), -] -"""ModelApiInput""" - - -class ModelApiMapType(core.ModelBase): - """ModelApiMapType""" - - key_type: ModelApiDataType = pydantic.Field(alias=str("keyType")) # type: ignore[literal-required] - value_type: ModelApiDataType = pydantic.Field(alias=str("valueType")) # type: ignore[literal-required] - type: typing.Literal["map"] = "map" - - -ModelApiOutput = typing_extensions.Annotated[ - typing.Union[core_models.UnsupportedType, "ModelApiParameterType", "ModelApiTabularType"], - pydantic.Field(discriminator="type"), -] -"""ModelApiOutput""" - - -class ModelApiParameterType(core.ModelBase): - """ModelApiParameterType""" - - name: str - required: typing.Optional[bool] = None - """true by default; false if the input or output can be null or omitted""" - - data_type: ModelApiDataType = pydantic.Field(alias=str("dataType")) # type: ignore[literal-required] - type: typing.Literal["parameter"] = "parameter" - - -ModelApiTabularFormat = typing.Literal["PANDAS", "SPARK"] -"""ModelApiTabularFormat""" - - -class ModelApiTabularType(core.ModelBase): - """ModelApiTabularType""" - - name: str - required: typing.Optional[bool] = None - """true by default; false if the input or output can be null or omitted""" - - columns: typing.List[ModelApiColumn] - format: typing.Optional[ModelApiTabularFormat] = None - """Dataframe format the model will receive or is expected to return for this input or output. PANDAS is the default.""" - - type: typing.Literal["tabular"] = "tabular" - - -ModelName = str -"""ModelName""" - - -ModelRid = core.RID -"""The Resource Identifier (RID) of a Model.""" - - -class ModelVersion(core.ModelBase): - """ModelVersion""" - - rid: ModelVersionRid - model_api: ModelApi = pydantic.Field(alias=str("modelApi")) # type: ignore[literal-required] - conda_requirements: typing.List[str] = pydantic.Field(alias=str("condaRequirements")) # type: ignore[literal-required] - backing_repositories: typing.List[core.RID] = pydantic.Field(alias=str("backingRepositories")) # type: ignore[literal-required] - - -ModelVersionRid = core.RID -"""The Resource Identifier (RID) of a Model Version.""" - - -ModelFiles = DillModelFiles -""" -The serialized data of a machine learning model. This can include the model's parameters, architecture, and any other relevant information needed to reconstruct the model. -Must be a base64-encoded string of a dill-serialized model function. -""" - - -core.resolve_forward_references(ModelApiDataType, globalns=globals(), localns=locals()) -core.resolve_forward_references(ModelApiInput, globalns=globals(), localns=locals()) -core.resolve_forward_references(ModelApiOutput, globalns=globals(), localns=locals()) - -__all__ = [ - "CreateModelRequest", - "CreateModelVersionRequest", - "DillModelFiles", - "ListModelVersionsResponse", - "Model", - "ModelApi", - "ModelApiAnyType", - "ModelApiArrayType", - "ModelApiColumn", - "ModelApiDataType", - "ModelApiInput", - "ModelApiMapType", - "ModelApiOutput", - "ModelApiParameterType", - "ModelApiTabularFormat", - "ModelApiTabularType", - "ModelFiles", - "ModelName", - "ModelRid", - "ModelVersion", - "ModelVersionRid", -] diff --git a/foundry_sdk/v2/ontologies/__init__.py b/foundry_sdk/v2/ontologies/__init__.py deleted file mode 100644 index b5ca6a499..000000000 --- a/foundry_sdk/v2/ontologies/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -from foundry_sdk.v2.ontologies._client import AsyncOntologiesClient -from foundry_sdk.v2.ontologies._client import OntologiesClient - -__all__ = [ - "OntologiesClient", - "AsyncOntologiesClient", -] diff --git a/foundry_sdk/v2/ontologies/_client.py b/foundry_sdk/v2/ontologies/_client.py deleted file mode 100644 index 6548e64f0..000000000 --- a/foundry_sdk/v2/ontologies/_client.py +++ /dev/null @@ -1,312 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing -from functools import cached_property - -from foundry_sdk import _core as core - - -class OntologiesClient: - """ - The API client for the Ontologies Namespace. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - - @cached_property - def Action(self): - from foundry_sdk.v2.ontologies.action import ActionClient - - return ActionClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @cached_property - def ActionTypeFullMetadata(self): - from foundry_sdk.v2.ontologies.action_type_full_metadata import ( - ActionTypeFullMetadataClient, - ) # NOQA - - return ActionTypeFullMetadataClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @cached_property - def Attachment(self): - from foundry_sdk.v2.ontologies.attachment import AttachmentClient - - return AttachmentClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @cached_property - def AttachmentProperty(self): - from foundry_sdk.v2.ontologies.attachment_property import AttachmentPropertyClient # NOQA - - return AttachmentPropertyClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @cached_property - def CipherTextProperty(self): - from foundry_sdk.v2.ontologies.cipher_text_property import CipherTextPropertyClient # NOQA - - return CipherTextPropertyClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @cached_property - def LinkedObject(self): - from foundry_sdk.v2.ontologies.linked_object import LinkedObjectClient - - return LinkedObjectClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @cached_property - def MediaReferenceProperty(self): - from foundry_sdk.v2.ontologies.media_reference_property import ( - MediaReferencePropertyClient, - ) # NOQA - - return MediaReferencePropertyClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @cached_property - def Ontology(self): - from foundry_sdk.v2.ontologies.ontology import OntologyClient - - return OntologyClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @cached_property - def OntologyInterface(self): - from foundry_sdk.v2.ontologies.ontology_interface import OntologyInterfaceClient - - return OntologyInterfaceClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @cached_property - def OntologyObject(self): - from foundry_sdk.v2.ontologies.ontology_object import OntologyObjectClient - - return OntologyObjectClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @cached_property - def OntologyObjectSet(self): - from foundry_sdk.v2.ontologies.ontology_object_set import OntologyObjectSetClient # NOQA - - return OntologyObjectSetClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @cached_property - def OntologyTransaction(self): - from foundry_sdk.v2.ontologies.ontology_transaction import OntologyTransactionClient # NOQA - - return OntologyTransactionClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @cached_property - def OntologyValueType(self): - from foundry_sdk.v2.ontologies.ontology_value_type import OntologyValueTypeClient # NOQA - - return OntologyValueTypeClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @cached_property - def Query(self): - from foundry_sdk.v2.ontologies.query import QueryClient - - return QueryClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @cached_property - def TimeSeriesPropertyV2(self): - from foundry_sdk.v2.ontologies.time_series_property_v2 import ( - TimeSeriesPropertyV2Client, - ) # NOQA - - return TimeSeriesPropertyV2Client( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @cached_property - def TimeSeriesValueBankProperty(self): - from foundry_sdk.v2.ontologies.time_series_value_bank_property import ( - TimeSeriesValueBankPropertyClient, - ) # NOQA - - return TimeSeriesValueBankPropertyClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - -class AsyncOntologiesClient: - """ - The Async API client for the Ontologies Namespace. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - from foundry_sdk.v2.ontologies.action import AsyncActionClient - from foundry_sdk.v2.ontologies.action_type_full_metadata import ( - AsyncActionTypeFullMetadataClient, - ) # NOQA - from foundry_sdk.v2.ontologies.attachment import AsyncAttachmentClient - from foundry_sdk.v2.ontologies.attachment_property import ( - AsyncAttachmentPropertyClient, - ) # NOQA - from foundry_sdk.v2.ontologies.cipher_text_property import ( - AsyncCipherTextPropertyClient, - ) # NOQA - from foundry_sdk.v2.ontologies.linked_object import AsyncLinkedObjectClient - from foundry_sdk.v2.ontologies.media_reference_property import ( - AsyncMediaReferencePropertyClient, - ) # NOQA - from foundry_sdk.v2.ontologies.ontology import AsyncOntologyClient - from foundry_sdk.v2.ontologies.ontology_interface import ( - AsyncOntologyInterfaceClient, - ) # NOQA - from foundry_sdk.v2.ontologies.ontology_object import AsyncOntologyObjectClient - from foundry_sdk.v2.ontologies.ontology_object_set import ( - AsyncOntologyObjectSetClient, - ) # NOQA - from foundry_sdk.v2.ontologies.ontology_transaction import ( - AsyncOntologyTransactionClient, - ) # NOQA - from foundry_sdk.v2.ontologies.ontology_value_type import ( - AsyncOntologyValueTypeClient, - ) # NOQA - from foundry_sdk.v2.ontologies.query import AsyncQueryClient - from foundry_sdk.v2.ontologies.time_series_property_v2 import ( - AsyncTimeSeriesPropertyV2Client, - ) # NOQA - from foundry_sdk.v2.ontologies.time_series_value_bank_property import ( - AsyncTimeSeriesValueBankPropertyClient, - ) # NOQA - - self.Action = AsyncActionClient(auth=auth, hostname=hostname, config=config) - - self.ActionTypeFullMetadata = AsyncActionTypeFullMetadataClient( - auth=auth, hostname=hostname, config=config - ) - - self.Attachment = AsyncAttachmentClient(auth=auth, hostname=hostname, config=config) - - self.AttachmentProperty = AsyncAttachmentPropertyClient( - auth=auth, hostname=hostname, config=config - ) - - self.CipherTextProperty = AsyncCipherTextPropertyClient( - auth=auth, hostname=hostname, config=config - ) - - self.LinkedObject = AsyncLinkedObjectClient(auth=auth, hostname=hostname, config=config) - - self.MediaReferenceProperty = AsyncMediaReferencePropertyClient( - auth=auth, hostname=hostname, config=config - ) - - self.Ontology = AsyncOntologyClient(auth=auth, hostname=hostname, config=config) - - self.OntologyInterface = AsyncOntologyInterfaceClient( - auth=auth, hostname=hostname, config=config - ) - - self.OntologyObject = AsyncOntologyObjectClient(auth=auth, hostname=hostname, config=config) - - self.OntologyObjectSet = AsyncOntologyObjectSetClient( - auth=auth, hostname=hostname, config=config - ) - - self.OntologyTransaction = AsyncOntologyTransactionClient( - auth=auth, hostname=hostname, config=config - ) - - self.OntologyValueType = AsyncOntologyValueTypeClient( - auth=auth, hostname=hostname, config=config - ) - - self.Query = AsyncQueryClient(auth=auth, hostname=hostname, config=config) - - self.TimeSeriesPropertyV2 = AsyncTimeSeriesPropertyV2Client( - auth=auth, hostname=hostname, config=config - ) - - self.TimeSeriesValueBankProperty = AsyncTimeSeriesValueBankPropertyClient( - auth=auth, hostname=hostname, config=config - ) diff --git a/foundry_sdk/v2/ontologies/action.py b/foundry_sdk/v2/ontologies/action.py deleted file mode 100644 index 061e4b3c1..000000000 --- a/foundry_sdk/v2/ontologies/action.py +++ /dev/null @@ -1,566 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing - -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v2.core import models as core_models -from foundry_sdk.v2.ontologies import models as ontologies_models - - -class ActionClient: - """ - The API client for the Action Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _ActionClientStreaming(self) - self.with_raw_response = _ActionClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def apply( - self, - ontology: ontologies_models.OntologyIdentifier, - action: ontologies_models.ActionTypeApiName, - *, - parameters: typing.Dict[ - ontologies_models.ParameterId, typing.Optional[ontologies_models.DataValue] - ], - branch: typing.Optional[core_models.FoundryBranch] = None, - options: typing.Optional[ontologies_models.ApplyActionRequestOptions] = None, - sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, - sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> ontologies_models.SyncApplyActionResponseV2: - """ - Applies an action using the given parameters. - - Changes to objects or links stored in Object Storage V1 are eventually consistent and may take some time to be visible. - Edits to objects or links in Object Storage V2 will be visible immediately after the action completes. - - Note that a 200 HTTP status code only indicates that the request was received and processed by the server. - See the validation result in the response body to determine if the action was applied successfully. - - Note that [parameter default values](https://palantir.com/docs/foundry/action-types/parameters-default-value/) are not currently supported by - this endpoint. - - :param ontology: - :type ontology: OntologyIdentifier - :param action: The API name of the action to apply. To find the API name for your action, use the **List action types** endpoint or check the **Ontology Manager**. - :type action: ActionTypeApiName - :param parameters: - :type parameters: Dict[ParameterId, Optional[DataValue]] - :param branch: The Foundry branch to apply the action against. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported. - :type branch: Optional[FoundryBranch] - :param options: - :type options: Optional[ApplyActionRequestOptions] - :param sdk_package_rid: The package rid of the generated SDK. - :type sdk_package_rid: Optional[SdkPackageRid] - :param sdk_version: The version of the generated SDK. - :type sdk_version: Optional[SdkVersion] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: ontologies_models.SyncApplyActionResponseV2 - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/ontologies/{ontology}/actions/{action}/apply", - query_params={ - "branch": branch, - "sdkPackageRid": sdk_package_rid, - "sdkVersion": sdk_version, - }, - path_params={ - "ontology": ontology, - "action": action, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=ontologies_models.ApplyActionRequestV2( - options=options, - parameters=parameters, - ), - response_type=ontologies_models.SyncApplyActionResponseV2, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def apply_batch( - self, - ontology: ontologies_models.OntologyIdentifier, - action: ontologies_models.ActionTypeApiName, - *, - requests: typing.List[ontologies_models.BatchApplyActionRequestItem], - branch: typing.Optional[core_models.FoundryBranch] = None, - options: typing.Optional[ontologies_models.BatchApplyActionRequestOptions] = None, - sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, - sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> ontologies_models.BatchApplyActionResponseV2: - """ - Applies multiple actions (of the same Action Type) using the given parameters. - - Changes to objects or links stored in Object Storage V1 are eventually consistent and may take some time to be visible. - Edits to objects or links in Object Storage V2 will be visible immediately after the action completes. - - Up to 20 actions may be applied in one call. Actions that only modify objects in Object Storage v2 and do not - call Functions may receive a higher limit. - - Note that [notifications](https://palantir.com/docs/foundry/action-types/notifications/) are not currently supported by this endpoint. - - :param ontology: - :type ontology: OntologyIdentifier - :param action: The API name of the action to apply. To find the API name for your action, use the **List action types** endpoint or check the **Ontology Manager**. - :type action: ActionTypeApiName - :param requests: - :type requests: List[BatchApplyActionRequestItem] - :param branch: The Foundry branch to apply the action against. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported. - :type branch: Optional[FoundryBranch] - :param options: - :type options: Optional[BatchApplyActionRequestOptions] - :param sdk_package_rid: The package rid of the generated SDK. - :type sdk_package_rid: Optional[SdkPackageRid] - :param sdk_version: The version of the generated SDK. - :type sdk_version: Optional[SdkVersion] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: ontologies_models.BatchApplyActionResponseV2 - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/ontologies/{ontology}/actions/{action}/applyBatch", - query_params={ - "branch": branch, - "sdkPackageRid": sdk_package_rid, - "sdkVersion": sdk_version, - }, - path_params={ - "ontology": ontology, - "action": action, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=ontologies_models.BatchApplyActionRequestV2( - options=options, - requests=requests, - ), - response_type=ontologies_models.BatchApplyActionResponseV2, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def apply_with_overrides( - self, - ontology: ontologies_models.OntologyIdentifier, - action: ontologies_models.ActionTypeApiName, - *, - overrides: ontologies_models.ApplyActionOverrides, - request: ontologies_models.ApplyActionRequestV2, - branch: typing.Optional[core_models.FoundryBranch] = None, - sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, - sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> ontologies_models.SyncApplyActionResponseV2: - """ - Same as regular apply action operation, but allows specifying overrides for UniqueIdentifier and - CurrentTime generated action parameters. - - :param ontology: - :type ontology: OntologyIdentifier - :param action: The API name of the action to apply. To find the API name for your action, use the **List action types** endpoint or check the **Ontology Manager**. - :type action: ActionTypeApiName - :param overrides: - :type overrides: ApplyActionOverrides - :param request: - :type request: ApplyActionRequestV2 - :param branch: The Foundry branch to apply the action against. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported. - :type branch: Optional[FoundryBranch] - :param sdk_package_rid: The package rid of the generated SDK. - :type sdk_package_rid: Optional[SdkPackageRid] - :param sdk_version: The version of the generated SDK. - :type sdk_version: Optional[SdkVersion] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: ontologies_models.SyncApplyActionResponseV2 - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/ontologies/{ontology}/actions/{action}/applyWithOverrides", - query_params={ - "branch": branch, - "sdkPackageRid": sdk_package_rid, - "sdkVersion": sdk_version, - }, - path_params={ - "ontology": ontology, - "action": action, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=ontologies_models.ApplyActionWithOverridesRequest( - request=request, - overrides=overrides, - ), - response_type=ontologies_models.SyncApplyActionResponseV2, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _ActionClientRaw: - def __init__(self, client: ActionClient) -> None: - def apply(_: ontologies_models.SyncApplyActionResponseV2): ... - def apply_batch(_: ontologies_models.BatchApplyActionResponseV2): ... - def apply_with_overrides(_: ontologies_models.SyncApplyActionResponseV2): ... - - self.apply = core.with_raw_response(apply, client.apply) - self.apply_batch = core.with_raw_response(apply_batch, client.apply_batch) - self.apply_with_overrides = core.with_raw_response( - apply_with_overrides, client.apply_with_overrides - ) - - -class _ActionClientStreaming: - def __init__(self, client: ActionClient) -> None: - def apply(_: ontologies_models.SyncApplyActionResponseV2): ... - def apply_batch(_: ontologies_models.BatchApplyActionResponseV2): ... - def apply_with_overrides(_: ontologies_models.SyncApplyActionResponseV2): ... - - self.apply = core.with_streaming_response(apply, client.apply) - self.apply_batch = core.with_streaming_response(apply_batch, client.apply_batch) - self.apply_with_overrides = core.with_streaming_response( - apply_with_overrides, client.apply_with_overrides - ) - - -class AsyncActionClient: - """ - The API client for the Action Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AsyncActionClientStreaming(self) - self.with_raw_response = _AsyncActionClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def apply( - self, - ontology: ontologies_models.OntologyIdentifier, - action: ontologies_models.ActionTypeApiName, - *, - parameters: typing.Dict[ - ontologies_models.ParameterId, typing.Optional[ontologies_models.DataValue] - ], - branch: typing.Optional[core_models.FoundryBranch] = None, - options: typing.Optional[ontologies_models.ApplyActionRequestOptions] = None, - sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, - sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[ontologies_models.SyncApplyActionResponseV2]: - """ - Applies an action using the given parameters. - - Changes to objects or links stored in Object Storage V1 are eventually consistent and may take some time to be visible. - Edits to objects or links in Object Storage V2 will be visible immediately after the action completes. - - Note that a 200 HTTP status code only indicates that the request was received and processed by the server. - See the validation result in the response body to determine if the action was applied successfully. - - Note that [parameter default values](https://palantir.com/docs/foundry/action-types/parameters-default-value/) are not currently supported by - this endpoint. - - :param ontology: - :type ontology: OntologyIdentifier - :param action: The API name of the action to apply. To find the API name for your action, use the **List action types** endpoint or check the **Ontology Manager**. - :type action: ActionTypeApiName - :param parameters: - :type parameters: Dict[ParameterId, Optional[DataValue]] - :param branch: The Foundry branch to apply the action against. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported. - :type branch: Optional[FoundryBranch] - :param options: - :type options: Optional[ApplyActionRequestOptions] - :param sdk_package_rid: The package rid of the generated SDK. - :type sdk_package_rid: Optional[SdkPackageRid] - :param sdk_version: The version of the generated SDK. - :type sdk_version: Optional[SdkVersion] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[ontologies_models.SyncApplyActionResponseV2] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/ontologies/{ontology}/actions/{action}/apply", - query_params={ - "branch": branch, - "sdkPackageRid": sdk_package_rid, - "sdkVersion": sdk_version, - }, - path_params={ - "ontology": ontology, - "action": action, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=ontologies_models.ApplyActionRequestV2( - options=options, - parameters=parameters, - ), - response_type=ontologies_models.SyncApplyActionResponseV2, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def apply_batch( - self, - ontology: ontologies_models.OntologyIdentifier, - action: ontologies_models.ActionTypeApiName, - *, - requests: typing.List[ontologies_models.BatchApplyActionRequestItem], - branch: typing.Optional[core_models.FoundryBranch] = None, - options: typing.Optional[ontologies_models.BatchApplyActionRequestOptions] = None, - sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, - sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[ontologies_models.BatchApplyActionResponseV2]: - """ - Applies multiple actions (of the same Action Type) using the given parameters. - - Changes to objects or links stored in Object Storage V1 are eventually consistent and may take some time to be visible. - Edits to objects or links in Object Storage V2 will be visible immediately after the action completes. - - Up to 20 actions may be applied in one call. Actions that only modify objects in Object Storage v2 and do not - call Functions may receive a higher limit. - - Note that [notifications](https://palantir.com/docs/foundry/action-types/notifications/) are not currently supported by this endpoint. - - :param ontology: - :type ontology: OntologyIdentifier - :param action: The API name of the action to apply. To find the API name for your action, use the **List action types** endpoint or check the **Ontology Manager**. - :type action: ActionTypeApiName - :param requests: - :type requests: List[BatchApplyActionRequestItem] - :param branch: The Foundry branch to apply the action against. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported. - :type branch: Optional[FoundryBranch] - :param options: - :type options: Optional[BatchApplyActionRequestOptions] - :param sdk_package_rid: The package rid of the generated SDK. - :type sdk_package_rid: Optional[SdkPackageRid] - :param sdk_version: The version of the generated SDK. - :type sdk_version: Optional[SdkVersion] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[ontologies_models.BatchApplyActionResponseV2] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/ontologies/{ontology}/actions/{action}/applyBatch", - query_params={ - "branch": branch, - "sdkPackageRid": sdk_package_rid, - "sdkVersion": sdk_version, - }, - path_params={ - "ontology": ontology, - "action": action, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=ontologies_models.BatchApplyActionRequestV2( - options=options, - requests=requests, - ), - response_type=ontologies_models.BatchApplyActionResponseV2, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def apply_with_overrides( - self, - ontology: ontologies_models.OntologyIdentifier, - action: ontologies_models.ActionTypeApiName, - *, - overrides: ontologies_models.ApplyActionOverrides, - request: ontologies_models.ApplyActionRequestV2, - branch: typing.Optional[core_models.FoundryBranch] = None, - sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, - sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[ontologies_models.SyncApplyActionResponseV2]: - """ - Same as regular apply action operation, but allows specifying overrides for UniqueIdentifier and - CurrentTime generated action parameters. - - :param ontology: - :type ontology: OntologyIdentifier - :param action: The API name of the action to apply. To find the API name for your action, use the **List action types** endpoint or check the **Ontology Manager**. - :type action: ActionTypeApiName - :param overrides: - :type overrides: ApplyActionOverrides - :param request: - :type request: ApplyActionRequestV2 - :param branch: The Foundry branch to apply the action against. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported. - :type branch: Optional[FoundryBranch] - :param sdk_package_rid: The package rid of the generated SDK. - :type sdk_package_rid: Optional[SdkPackageRid] - :param sdk_version: The version of the generated SDK. - :type sdk_version: Optional[SdkVersion] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[ontologies_models.SyncApplyActionResponseV2] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/ontologies/{ontology}/actions/{action}/applyWithOverrides", - query_params={ - "branch": branch, - "sdkPackageRid": sdk_package_rid, - "sdkVersion": sdk_version, - }, - path_params={ - "ontology": ontology, - "action": action, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=ontologies_models.ApplyActionWithOverridesRequest( - request=request, - overrides=overrides, - ), - response_type=ontologies_models.SyncApplyActionResponseV2, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _AsyncActionClientRaw: - def __init__(self, client: AsyncActionClient) -> None: - def apply(_: ontologies_models.SyncApplyActionResponseV2): ... - def apply_batch(_: ontologies_models.BatchApplyActionResponseV2): ... - def apply_with_overrides(_: ontologies_models.SyncApplyActionResponseV2): ... - - self.apply = core.async_with_raw_response(apply, client.apply) - self.apply_batch = core.async_with_raw_response(apply_batch, client.apply_batch) - self.apply_with_overrides = core.async_with_raw_response( - apply_with_overrides, client.apply_with_overrides - ) - - -class _AsyncActionClientStreaming: - def __init__(self, client: AsyncActionClient) -> None: - def apply(_: ontologies_models.SyncApplyActionResponseV2): ... - def apply_batch(_: ontologies_models.BatchApplyActionResponseV2): ... - def apply_with_overrides(_: ontologies_models.SyncApplyActionResponseV2): ... - - self.apply = core.async_with_streaming_response(apply, client.apply) - self.apply_batch = core.async_with_streaming_response(apply_batch, client.apply_batch) - self.apply_with_overrides = core.async_with_streaming_response( - apply_with_overrides, client.apply_with_overrides - ) diff --git a/foundry_sdk/v2/ontologies/action_type.py b/foundry_sdk/v2/ontologies/action_type.py deleted file mode 100644 index 059fbc553..000000000 --- a/foundry_sdk/v2/ontologies/action_type.py +++ /dev/null @@ -1,424 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing - -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v2.core import models as core_models -from foundry_sdk.v2.ontologies import models as ontologies_models - - -class ActionTypeClient: - """ - The API client for the ActionType Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _ActionTypeClientStreaming(self) - self.with_raw_response = _ActionTypeClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - ontology: ontologies_models.OntologyIdentifier, - action_type: ontologies_models.ActionTypeApiName, - *, - branch: typing.Optional[core_models.FoundryBranch] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> ontologies_models.ActionTypeV2: - """ - Gets a specific action type with the given API name. - - :param ontology: - :type ontology: OntologyIdentifier - :param action_type: The name of the action type in the API. - :type action_type: ActionTypeApiName - :param branch: The Foundry branch to load the action type definition from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. - :type branch: Optional[FoundryBranch] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: ontologies_models.ActionTypeV2 - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/ontologies/{ontology}/actionTypes/{actionType}", - query_params={ - "branch": branch, - }, - path_params={ - "ontology": ontology, - "actionType": action_type, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.ActionTypeV2, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get_by_rid( - self, - ontology: ontologies_models.OntologyIdentifier, - action_type_rid: ontologies_models.ActionTypeRid, - *, - branch: typing.Optional[core_models.FoundryBranch] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> ontologies_models.ActionTypeV2: - """ - Gets a specific action type with the given RID. - - :param ontology: - :type ontology: OntologyIdentifier - :param action_type_rid: The RID of the action type. - :type action_type_rid: ActionTypeRid - :param branch: The Foundry branch to load the action type definition from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. - :type branch: Optional[FoundryBranch] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: ontologies_models.ActionTypeV2 - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/ontologies/{ontology}/actionTypes/byRid/{actionTypeRid}", - query_params={ - "branch": branch, - }, - path_params={ - "ontology": ontology, - "actionTypeRid": action_type_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.ActionTypeV2, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def list( - self, - ontology: ontologies_models.OntologyIdentifier, - *, - branch: typing.Optional[core_models.FoundryBranch] = None, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.ResourceIterator[ontologies_models.ActionTypeV2]: - """ - Lists the action types for the given Ontology. - - Each page may be smaller than the requested page size. However, it is guaranteed that if there are more - results available, at least one result will be present in the response. - - :param ontology: - :type ontology: OntologyIdentifier - :param branch: The Foundry branch to list the action types from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. - :type branch: Optional[FoundryBranch] - :param page_size: The desired size of the page to be returned. Defaults to 500. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. - :type page_size: Optional[PageSize] - :param page_token: - :type page_token: Optional[PageToken] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.ResourceIterator[ontologies_models.ActionTypeV2] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/ontologies/{ontology}/actionTypes", - query_params={ - "branch": branch, - "pageSize": page_size, - "pageToken": page_token, - }, - path_params={ - "ontology": ontology, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.ListActionTypesResponseV2, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - -class _ActionTypeClientRaw: - def __init__(self, client: ActionTypeClient) -> None: - def get(_: ontologies_models.ActionTypeV2): ... - def get_by_rid(_: ontologies_models.ActionTypeV2): ... - def list(_: ontologies_models.ListActionTypesResponseV2): ... - - self.get = core.with_raw_response(get, client.get) - self.get_by_rid = core.with_raw_response(get_by_rid, client.get_by_rid) - self.list = core.with_raw_response(list, client.list) - - -class _ActionTypeClientStreaming: - def __init__(self, client: ActionTypeClient) -> None: - def get(_: ontologies_models.ActionTypeV2): ... - def get_by_rid(_: ontologies_models.ActionTypeV2): ... - def list(_: ontologies_models.ListActionTypesResponseV2): ... - - self.get = core.with_streaming_response(get, client.get) - self.get_by_rid = core.with_streaming_response(get_by_rid, client.get_by_rid) - self.list = core.with_streaming_response(list, client.list) - - -class AsyncActionTypeClient: - """ - The API client for the ActionType Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AsyncActionTypeClientStreaming(self) - self.with_raw_response = _AsyncActionTypeClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - ontology: ontologies_models.OntologyIdentifier, - action_type: ontologies_models.ActionTypeApiName, - *, - branch: typing.Optional[core_models.FoundryBranch] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[ontologies_models.ActionTypeV2]: - """ - Gets a specific action type with the given API name. - - :param ontology: - :type ontology: OntologyIdentifier - :param action_type: The name of the action type in the API. - :type action_type: ActionTypeApiName - :param branch: The Foundry branch to load the action type definition from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. - :type branch: Optional[FoundryBranch] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[ontologies_models.ActionTypeV2] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/ontologies/{ontology}/actionTypes/{actionType}", - query_params={ - "branch": branch, - }, - path_params={ - "ontology": ontology, - "actionType": action_type, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.ActionTypeV2, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get_by_rid( - self, - ontology: ontologies_models.OntologyIdentifier, - action_type_rid: ontologies_models.ActionTypeRid, - *, - branch: typing.Optional[core_models.FoundryBranch] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[ontologies_models.ActionTypeV2]: - """ - Gets a specific action type with the given RID. - - :param ontology: - :type ontology: OntologyIdentifier - :param action_type_rid: The RID of the action type. - :type action_type_rid: ActionTypeRid - :param branch: The Foundry branch to load the action type definition from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. - :type branch: Optional[FoundryBranch] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[ontologies_models.ActionTypeV2] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/ontologies/{ontology}/actionTypes/byRid/{actionTypeRid}", - query_params={ - "branch": branch, - }, - path_params={ - "ontology": ontology, - "actionTypeRid": action_type_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.ActionTypeV2, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def list( - self, - ontology: ontologies_models.OntologyIdentifier, - *, - branch: typing.Optional[core_models.FoundryBranch] = None, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.AsyncResourceIterator[ontologies_models.ActionTypeV2]: - """ - Lists the action types for the given Ontology. - - Each page may be smaller than the requested page size. However, it is guaranteed that if there are more - results available, at least one result will be present in the response. - - :param ontology: - :type ontology: OntologyIdentifier - :param branch: The Foundry branch to list the action types from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. - :type branch: Optional[FoundryBranch] - :param page_size: The desired size of the page to be returned. Defaults to 500. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. - :type page_size: Optional[PageSize] - :param page_token: - :type page_token: Optional[PageToken] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.AsyncResourceIterator[ontologies_models.ActionTypeV2] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/ontologies/{ontology}/actionTypes", - query_params={ - "branch": branch, - "pageSize": page_size, - "pageToken": page_token, - }, - path_params={ - "ontology": ontology, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.ListActionTypesResponseV2, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - -class _AsyncActionTypeClientRaw: - def __init__(self, client: AsyncActionTypeClient) -> None: - def get(_: ontologies_models.ActionTypeV2): ... - def get_by_rid(_: ontologies_models.ActionTypeV2): ... - def list(_: ontologies_models.ListActionTypesResponseV2): ... - - self.get = core.async_with_raw_response(get, client.get) - self.get_by_rid = core.async_with_raw_response(get_by_rid, client.get_by_rid) - self.list = core.async_with_raw_response(list, client.list) - - -class _AsyncActionTypeClientStreaming: - def __init__(self, client: AsyncActionTypeClient) -> None: - def get(_: ontologies_models.ActionTypeV2): ... - def get_by_rid(_: ontologies_models.ActionTypeV2): ... - def list(_: ontologies_models.ListActionTypesResponseV2): ... - - self.get = core.async_with_streaming_response(get, client.get) - self.get_by_rid = core.async_with_streaming_response(get_by_rid, client.get_by_rid) - self.list = core.async_with_streaming_response(list, client.list) diff --git a/foundry_sdk/v2/ontologies/action_type_full_metadata.py b/foundry_sdk/v2/ontologies/action_type_full_metadata.py deleted file mode 100644 index c24fa1f52..000000000 --- a/foundry_sdk/v2/ontologies/action_type_full_metadata.py +++ /dev/null @@ -1,318 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing - -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v2.core import models as core_models -from foundry_sdk.v2.ontologies import models as ontologies_models - - -class ActionTypeFullMetadataClient: - """ - The API client for the ActionTypeFullMetadata Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _ActionTypeFullMetadataClientStreaming(self) - self.with_raw_response = _ActionTypeFullMetadataClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - ontology: ontologies_models.OntologyIdentifier, - action_type: ontologies_models.ActionTypeApiName, - *, - branch: typing.Optional[core_models.FoundryBranch] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> ontologies_models.ActionTypeFullMetadata: - """ - Gets the full metadata associated with an action type. - - :param ontology: The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. - :type ontology: OntologyIdentifier - :param action_type: The name of the action type in the API. - :type action_type: ActionTypeApiName - :param branch: The Foundry branch to load the action type definition from. If not specified, the default branch will be used. - :type branch: Optional[FoundryBranch] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: ontologies_models.ActionTypeFullMetadata - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/ontologies/{ontology}/actionTypes/{actionType}/fullMetadata", - query_params={ - "branch": branch, - }, - path_params={ - "ontology": ontology, - "actionType": action_type, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.ActionTypeFullMetadata, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def list( - self, - ontology: ontologies_models.OntologyIdentifier, - *, - branch: typing.Optional[core_models.FoundryBranch] = None, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.ResourceIterator[ontologies_models.ActionTypeFullMetadata]: - """ - Lists the action types (with full metadata) for the given Ontology. - - Each page may be smaller than the requested page size. However, it is guaranteed that if there are more - results available, at least one result will be present in the response. - - :param ontology: - :type ontology: OntologyIdentifier - :param branch: The Foundry branch to list the action types from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. - :type branch: Optional[FoundryBranch] - :param page_size: The desired size of the page to be returned. Defaults to 500. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. - :type page_size: Optional[PageSize] - :param page_token: - :type page_token: Optional[PageToken] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.ResourceIterator[ontologies_models.ActionTypeFullMetadata] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/ontologies/{ontology}/actionTypesFullMetadata", - query_params={ - "branch": branch, - "pageSize": page_size, - "pageToken": page_token, - }, - path_params={ - "ontology": ontology, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.ListActionTypesFullMetadataResponse, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - -class _ActionTypeFullMetadataClientRaw: - def __init__(self, client: ActionTypeFullMetadataClient) -> None: - def get(_: ontologies_models.ActionTypeFullMetadata): ... - def list(_: ontologies_models.ListActionTypesFullMetadataResponse): ... - - self.get = core.with_raw_response(get, client.get) - self.list = core.with_raw_response(list, client.list) - - -class _ActionTypeFullMetadataClientStreaming: - def __init__(self, client: ActionTypeFullMetadataClient) -> None: - def get(_: ontologies_models.ActionTypeFullMetadata): ... - def list(_: ontologies_models.ListActionTypesFullMetadataResponse): ... - - self.get = core.with_streaming_response(get, client.get) - self.list = core.with_streaming_response(list, client.list) - - -class AsyncActionTypeFullMetadataClient: - """ - The API client for the ActionTypeFullMetadata Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AsyncActionTypeFullMetadataClientStreaming(self) - self.with_raw_response = _AsyncActionTypeFullMetadataClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - ontology: ontologies_models.OntologyIdentifier, - action_type: ontologies_models.ActionTypeApiName, - *, - branch: typing.Optional[core_models.FoundryBranch] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[ontologies_models.ActionTypeFullMetadata]: - """ - Gets the full metadata associated with an action type. - - :param ontology: The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. - :type ontology: OntologyIdentifier - :param action_type: The name of the action type in the API. - :type action_type: ActionTypeApiName - :param branch: The Foundry branch to load the action type definition from. If not specified, the default branch will be used. - :type branch: Optional[FoundryBranch] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[ontologies_models.ActionTypeFullMetadata] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/ontologies/{ontology}/actionTypes/{actionType}/fullMetadata", - query_params={ - "branch": branch, - }, - path_params={ - "ontology": ontology, - "actionType": action_type, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.ActionTypeFullMetadata, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def list( - self, - ontology: ontologies_models.OntologyIdentifier, - *, - branch: typing.Optional[core_models.FoundryBranch] = None, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.AsyncResourceIterator[ontologies_models.ActionTypeFullMetadata]: - """ - Lists the action types (with full metadata) for the given Ontology. - - Each page may be smaller than the requested page size. However, it is guaranteed that if there are more - results available, at least one result will be present in the response. - - :param ontology: - :type ontology: OntologyIdentifier - :param branch: The Foundry branch to list the action types from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. - :type branch: Optional[FoundryBranch] - :param page_size: The desired size of the page to be returned. Defaults to 500. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. - :type page_size: Optional[PageSize] - :param page_token: - :type page_token: Optional[PageToken] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.AsyncResourceIterator[ontologies_models.ActionTypeFullMetadata] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/ontologies/{ontology}/actionTypesFullMetadata", - query_params={ - "branch": branch, - "pageSize": page_size, - "pageToken": page_token, - }, - path_params={ - "ontology": ontology, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.ListActionTypesFullMetadataResponse, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - -class _AsyncActionTypeFullMetadataClientRaw: - def __init__(self, client: AsyncActionTypeFullMetadataClient) -> None: - def get(_: ontologies_models.ActionTypeFullMetadata): ... - def list(_: ontologies_models.ListActionTypesFullMetadataResponse): ... - - self.get = core.async_with_raw_response(get, client.get) - self.list = core.async_with_raw_response(list, client.list) - - -class _AsyncActionTypeFullMetadataClientStreaming: - def __init__(self, client: AsyncActionTypeFullMetadataClient) -> None: - def get(_: ontologies_models.ActionTypeFullMetadata): ... - def list(_: ontologies_models.ListActionTypesFullMetadataResponse): ... - - self.get = core.async_with_streaming_response(get, client.get) - self.list = core.async_with_streaming_response(list, client.list) diff --git a/foundry_sdk/v2/ontologies/attachment.py b/foundry_sdk/v2/ontologies/attachment.py deleted file mode 100644 index 34ec96deb..000000000 --- a/foundry_sdk/v2/ontologies/attachment.py +++ /dev/null @@ -1,522 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing - -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v2.core import models as core_models -from foundry_sdk.v2.ontologies import models as ontologies_models - - -class AttachmentClient: - """ - The API client for the Attachment Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AttachmentClientStreaming(self) - self.with_raw_response = _AttachmentClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - attachment_rid: ontologies_models.AttachmentRid, - *, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> ontologies_models.AttachmentV2: - """ - Get the metadata of an attachment. - - :param attachment_rid: The RID of the attachment. - :type attachment_rid: AttachmentRid - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: ontologies_models.AttachmentV2 - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/ontologies/attachments/{attachmentRid}", - query_params={}, - path_params={ - "attachmentRid": attachment_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.AttachmentV2, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def read( - self, - attachment_rid: ontologies_models.AttachmentRid, - *, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> bytes: - """ - Get the content of an attachment. - - :param attachment_rid: The RID of the attachment. - :type attachment_rid: AttachmentRid - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: bytes - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/ontologies/attachments/{attachmentRid}/content", - query_params={}, - path_params={ - "attachmentRid": attachment_rid, - }, - header_params={ - "Accept": "*/*", - }, - body=None, - response_type=bytes, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def upload( - self, - body: bytes, - *, - content_length: core_models.ContentLength, - content_type: core_models.ContentType, - filename: core_models.Filename, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> ontologies_models.AttachmentV2: - """ - Upload an attachment to use in an action. Any attachment which has not been linked to an object via - an action within one hour after upload will be removed. - Previously mapped attachments which are not connected to any object anymore are also removed on - a biweekly basis. - The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`. - - :param body: Body of the request - :type body: bytes - :param content_length: The size in bytes of the file content being uploaded. - :type content_length: ContentLength - :param content_type: The media type of the file being uploaded. - :type content_type: ContentType - :param filename: The name of the file being uploaded. - :type filename: Filename - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: ontologies_models.AttachmentV2 - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/ontologies/attachments/upload", - query_params={ - "filename": filename, - }, - path_params={}, - header_params={ - "Content-Length": content_length, - "Content-Type": content_type, - "Content-Type": "*/*", - "Accept": "application/json", - }, - body=body, - response_type=ontologies_models.AttachmentV2, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def upload_with_rid( - self, - attachment_rid: ontologies_models.AttachmentRid, - body: bytes, - *, - content_length: core_models.ContentLength, - content_type: core_models.ContentType, - filename: core_models.Filename, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> ontologies_models.AttachmentV2: - """ - This endpoint is identical to `/v2/ontologies/attachments/upload` but additionally accepts a previously - generated `AttachmentRid`. - - :param attachment_rid: The `AttachmentRid` of the attachment being uploaded. - :type attachment_rid: AttachmentRid - :param body: Body of the request - :type body: bytes - :param content_length: The size in bytes of the file content being uploaded. - :type content_length: ContentLength - :param content_type: The media type of the file being uploaded. - :type content_type: ContentType - :param filename: The name of the file being uploaded. - :type filename: Filename - :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: ontologies_models.AttachmentV2 - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/ontologies/attachments/upload/{attachmentRid}", - query_params={ - "filename": filename, - "preview": preview, - }, - path_params={ - "attachmentRid": attachment_rid, - }, - header_params={ - "Content-Length": content_length, - "Content-Type": content_type, - "Content-Type": "*/*", - "Accept": "application/json", - }, - body=body, - response_type=ontologies_models.AttachmentV2, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _AttachmentClientRaw: - def __init__(self, client: AttachmentClient) -> None: - def get(_: ontologies_models.AttachmentV2): ... - def read(_: bytes): ... - def upload(_: ontologies_models.AttachmentV2): ... - def upload_with_rid(_: ontologies_models.AttachmentV2): ... - - self.get = core.with_raw_response(get, client.get) - self.read = core.with_raw_response(read, client.read) - self.upload = core.with_raw_response(upload, client.upload) - self.upload_with_rid = core.with_raw_response(upload_with_rid, client.upload_with_rid) - - -class _AttachmentClientStreaming: - def __init__(self, client: AttachmentClient) -> None: - def get(_: ontologies_models.AttachmentV2): ... - def read(_: bytes): ... - def upload(_: ontologies_models.AttachmentV2): ... - def upload_with_rid(_: ontologies_models.AttachmentV2): ... - - self.get = core.with_streaming_response(get, client.get) - self.read = core.with_streaming_response(read, client.read) - self.upload = core.with_streaming_response(upload, client.upload) - self.upload_with_rid = core.with_streaming_response(upload_with_rid, client.upload_with_rid) - - -class AsyncAttachmentClient: - """ - The API client for the Attachment Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AsyncAttachmentClientStreaming(self) - self.with_raw_response = _AsyncAttachmentClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - attachment_rid: ontologies_models.AttachmentRid, - *, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[ontologies_models.AttachmentV2]: - """ - Get the metadata of an attachment. - - :param attachment_rid: The RID of the attachment. - :type attachment_rid: AttachmentRid - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[ontologies_models.AttachmentV2] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/ontologies/attachments/{attachmentRid}", - query_params={}, - path_params={ - "attachmentRid": attachment_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.AttachmentV2, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def read( - self, - attachment_rid: ontologies_models.AttachmentRid, - *, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[bytes]: - """ - Get the content of an attachment. - - :param attachment_rid: The RID of the attachment. - :type attachment_rid: AttachmentRid - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[bytes] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/ontologies/attachments/{attachmentRid}/content", - query_params={}, - path_params={ - "attachmentRid": attachment_rid, - }, - header_params={ - "Accept": "*/*", - }, - body=None, - response_type=bytes, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def upload( - self, - body: bytes, - *, - content_length: core_models.ContentLength, - content_type: core_models.ContentType, - filename: core_models.Filename, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[ontologies_models.AttachmentV2]: - """ - Upload an attachment to use in an action. Any attachment which has not been linked to an object via - an action within one hour after upload will be removed. - Previously mapped attachments which are not connected to any object anymore are also removed on - a biweekly basis. - The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`. - - :param body: Body of the request - :type body: bytes - :param content_length: The size in bytes of the file content being uploaded. - :type content_length: ContentLength - :param content_type: The media type of the file being uploaded. - :type content_type: ContentType - :param filename: The name of the file being uploaded. - :type filename: Filename - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[ontologies_models.AttachmentV2] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/ontologies/attachments/upload", - query_params={ - "filename": filename, - }, - path_params={}, - header_params={ - "Content-Length": content_length, - "Content-Type": content_type, - "Content-Type": "*/*", - "Accept": "application/json", - }, - body=body, - response_type=ontologies_models.AttachmentV2, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def upload_with_rid( - self, - attachment_rid: ontologies_models.AttachmentRid, - body: bytes, - *, - content_length: core_models.ContentLength, - content_type: core_models.ContentType, - filename: core_models.Filename, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[ontologies_models.AttachmentV2]: - """ - This endpoint is identical to `/v2/ontologies/attachments/upload` but additionally accepts a previously - generated `AttachmentRid`. - - :param attachment_rid: The `AttachmentRid` of the attachment being uploaded. - :type attachment_rid: AttachmentRid - :param body: Body of the request - :type body: bytes - :param content_length: The size in bytes of the file content being uploaded. - :type content_length: ContentLength - :param content_type: The media type of the file being uploaded. - :type content_type: ContentType - :param filename: The name of the file being uploaded. - :type filename: Filename - :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[ontologies_models.AttachmentV2] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/ontologies/attachments/upload/{attachmentRid}", - query_params={ - "filename": filename, - "preview": preview, - }, - path_params={ - "attachmentRid": attachment_rid, - }, - header_params={ - "Content-Length": content_length, - "Content-Type": content_type, - "Content-Type": "*/*", - "Accept": "application/json", - }, - body=body, - response_type=ontologies_models.AttachmentV2, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _AsyncAttachmentClientRaw: - def __init__(self, client: AsyncAttachmentClient) -> None: - def get(_: ontologies_models.AttachmentV2): ... - def read(_: bytes): ... - def upload(_: ontologies_models.AttachmentV2): ... - def upload_with_rid(_: ontologies_models.AttachmentV2): ... - - self.get = core.async_with_raw_response(get, client.get) - self.read = core.async_with_raw_response(read, client.read) - self.upload = core.async_with_raw_response(upload, client.upload) - self.upload_with_rid = core.async_with_raw_response(upload_with_rid, client.upload_with_rid) - - -class _AsyncAttachmentClientStreaming: - def __init__(self, client: AsyncAttachmentClient) -> None: - def get(_: ontologies_models.AttachmentV2): ... - def read(_: bytes): ... - def upload(_: ontologies_models.AttachmentV2): ... - def upload_with_rid(_: ontologies_models.AttachmentV2): ... - - self.get = core.async_with_streaming_response(get, client.get) - self.read = core.async_with_streaming_response(read, client.read) - self.upload = core.async_with_streaming_response(upload, client.upload) - self.upload_with_rid = core.async_with_streaming_response( - upload_with_rid, client.upload_with_rid - ) diff --git a/foundry_sdk/v2/ontologies/attachment_property.py b/foundry_sdk/v2/ontologies/attachment_property.py deleted file mode 100644 index 950ca7aa4..000000000 --- a/foundry_sdk/v2/ontologies/attachment_property.py +++ /dev/null @@ -1,651 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing - -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v2.ontologies import models as ontologies_models - - -class AttachmentPropertyClient: - """ - The API client for the AttachmentProperty Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AttachmentPropertyClientStreaming(self) - self.with_raw_response = _AttachmentPropertyClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get_attachment( - self, - ontology: ontologies_models.OntologyIdentifier, - object_type: ontologies_models.ObjectTypeApiName, - primary_key: ontologies_models.PropertyValueEscapedString, - property: ontologies_models.PropertyApiName, - *, - sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, - sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> ontologies_models.AttachmentMetadataResponse: - """ - Get the metadata of attachments parented to the given object. - - :param ontology: - :type ontology: OntologyIdentifier - :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. - :type object_type: ObjectTypeApiName - :param primary_key: The primary key of the object containing the attachment. - :type primary_key: PropertyValueEscapedString - :param property: The API name of the attachment property. To find the API name for your attachment, check the **Ontology Manager** or use the **Get object type** endpoint. - :type property: PropertyApiName - :param sdk_package_rid: The package rid of the generated SDK. - :type sdk_package_rid: Optional[SdkPackageRid] - :param sdk_version: The version of the generated SDK. - :type sdk_version: Optional[SdkVersion] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: ontologies_models.AttachmentMetadataResponse - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/attachments/{property}", - query_params={ - "sdkPackageRid": sdk_package_rid, - "sdkVersion": sdk_version, - }, - path_params={ - "ontology": ontology, - "objectType": object_type, - "primaryKey": primary_key, - "property": property, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.AttachmentMetadataResponse, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get_attachment_by_rid( - self, - ontology: ontologies_models.OntologyIdentifier, - object_type: ontologies_models.ObjectTypeApiName, - primary_key: ontologies_models.PropertyValueEscapedString, - property: ontologies_models.PropertyApiName, - attachment_rid: ontologies_models.AttachmentRid, - *, - sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, - sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> ontologies_models.AttachmentV2: - """ - Get the metadata of a particular attachment in an attachment list. - - :param ontology: - :type ontology: OntologyIdentifier - :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. - :type object_type: ObjectTypeApiName - :param primary_key: The primary key of the object containing the attachment. - :type primary_key: PropertyValueEscapedString - :param property: The API name of the attachment property. To find the API name for your attachment, check the **Ontology Manager** or use the **Get object type** endpoint. - :type property: PropertyApiName - :param attachment_rid: The RID of the attachment. - :type attachment_rid: AttachmentRid - :param sdk_package_rid: The package rid of the generated SDK. - :type sdk_package_rid: Optional[SdkPackageRid] - :param sdk_version: The version of the generated SDK. - :type sdk_version: Optional[SdkVersion] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: ontologies_models.AttachmentV2 - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/attachments/{property}/{attachmentRid}", - query_params={ - "sdkPackageRid": sdk_package_rid, - "sdkVersion": sdk_version, - }, - path_params={ - "ontology": ontology, - "objectType": object_type, - "primaryKey": primary_key, - "property": property, - "attachmentRid": attachment_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.AttachmentV2, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def read_attachment( - self, - ontology: ontologies_models.OntologyIdentifier, - object_type: ontologies_models.ObjectTypeApiName, - primary_key: ontologies_models.PropertyValueEscapedString, - property: ontologies_models.PropertyApiName, - *, - sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, - sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> bytes: - """ - Get the content of an attachment. - - :param ontology: - :type ontology: OntologyIdentifier - :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. - :type object_type: ObjectTypeApiName - :param primary_key: The primary key of the object containing the attachment. - :type primary_key: PropertyValueEscapedString - :param property: The API name of the attachment property. To find the API name for your attachment, check the **Ontology Manager** or use the **Get object type** endpoint. - :type property: PropertyApiName - :param sdk_package_rid: The package rid of the generated SDK. - :type sdk_package_rid: Optional[SdkPackageRid] - :param sdk_version: The version of the generated SDK. - :type sdk_version: Optional[SdkVersion] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: bytes - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/attachments/{property}/content", - query_params={ - "sdkPackageRid": sdk_package_rid, - "sdkVersion": sdk_version, - }, - path_params={ - "ontology": ontology, - "objectType": object_type, - "primaryKey": primary_key, - "property": property, - }, - header_params={ - "Accept": "*/*", - }, - body=None, - response_type=bytes, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def read_attachment_by_rid( - self, - ontology: ontologies_models.OntologyIdentifier, - object_type: ontologies_models.ObjectTypeApiName, - primary_key: ontologies_models.PropertyValueEscapedString, - property: ontologies_models.PropertyApiName, - attachment_rid: ontologies_models.AttachmentRid, - *, - sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, - sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> bytes: - """ - Get the content of an attachment by its RID. - - The RID must exist in the attachment array of the property. - - :param ontology: - :type ontology: OntologyIdentifier - :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. - :type object_type: ObjectTypeApiName - :param primary_key: The primary key of the object containing the attachment. - :type primary_key: PropertyValueEscapedString - :param property: The API name of the attachment property. To find the API name for your attachment, check the **Ontology Manager** or use the **Get object type** endpoint. - :type property: PropertyApiName - :param attachment_rid: The RID of the attachment. - :type attachment_rid: AttachmentRid - :param sdk_package_rid: The package rid of the generated SDK. - :type sdk_package_rid: Optional[SdkPackageRid] - :param sdk_version: The version of the generated SDK. - :type sdk_version: Optional[SdkVersion] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: bytes - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/attachments/{property}/{attachmentRid}/content", - query_params={ - "sdkPackageRid": sdk_package_rid, - "sdkVersion": sdk_version, - }, - path_params={ - "ontology": ontology, - "objectType": object_type, - "primaryKey": primary_key, - "property": property, - "attachmentRid": attachment_rid, - }, - header_params={ - "Accept": "*/*", - }, - body=None, - response_type=bytes, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _AttachmentPropertyClientRaw: - def __init__(self, client: AttachmentPropertyClient) -> None: - def get_attachment(_: ontologies_models.AttachmentMetadataResponse): ... - def get_attachment_by_rid(_: ontologies_models.AttachmentV2): ... - def read_attachment(_: bytes): ... - def read_attachment_by_rid(_: bytes): ... - - self.get_attachment = core.with_raw_response(get_attachment, client.get_attachment) - self.get_attachment_by_rid = core.with_raw_response( - get_attachment_by_rid, client.get_attachment_by_rid - ) - self.read_attachment = core.with_raw_response(read_attachment, client.read_attachment) - self.read_attachment_by_rid = core.with_raw_response( - read_attachment_by_rid, client.read_attachment_by_rid - ) - - -class _AttachmentPropertyClientStreaming: - def __init__(self, client: AttachmentPropertyClient) -> None: - def get_attachment(_: ontologies_models.AttachmentMetadataResponse): ... - def get_attachment_by_rid(_: ontologies_models.AttachmentV2): ... - def read_attachment(_: bytes): ... - def read_attachment_by_rid(_: bytes): ... - - self.get_attachment = core.with_streaming_response(get_attachment, client.get_attachment) - self.get_attachment_by_rid = core.with_streaming_response( - get_attachment_by_rid, client.get_attachment_by_rid - ) - self.read_attachment = core.with_streaming_response(read_attachment, client.read_attachment) - self.read_attachment_by_rid = core.with_streaming_response( - read_attachment_by_rid, client.read_attachment_by_rid - ) - - -class AsyncAttachmentPropertyClient: - """ - The API client for the AttachmentProperty Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AsyncAttachmentPropertyClientStreaming(self) - self.with_raw_response = _AsyncAttachmentPropertyClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get_attachment( - self, - ontology: ontologies_models.OntologyIdentifier, - object_type: ontologies_models.ObjectTypeApiName, - primary_key: ontologies_models.PropertyValueEscapedString, - property: ontologies_models.PropertyApiName, - *, - sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, - sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[ontologies_models.AttachmentMetadataResponse]: - """ - Get the metadata of attachments parented to the given object. - - :param ontology: - :type ontology: OntologyIdentifier - :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. - :type object_type: ObjectTypeApiName - :param primary_key: The primary key of the object containing the attachment. - :type primary_key: PropertyValueEscapedString - :param property: The API name of the attachment property. To find the API name for your attachment, check the **Ontology Manager** or use the **Get object type** endpoint. - :type property: PropertyApiName - :param sdk_package_rid: The package rid of the generated SDK. - :type sdk_package_rid: Optional[SdkPackageRid] - :param sdk_version: The version of the generated SDK. - :type sdk_version: Optional[SdkVersion] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[ontologies_models.AttachmentMetadataResponse] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/attachments/{property}", - query_params={ - "sdkPackageRid": sdk_package_rid, - "sdkVersion": sdk_version, - }, - path_params={ - "ontology": ontology, - "objectType": object_type, - "primaryKey": primary_key, - "property": property, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.AttachmentMetadataResponse, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get_attachment_by_rid( - self, - ontology: ontologies_models.OntologyIdentifier, - object_type: ontologies_models.ObjectTypeApiName, - primary_key: ontologies_models.PropertyValueEscapedString, - property: ontologies_models.PropertyApiName, - attachment_rid: ontologies_models.AttachmentRid, - *, - sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, - sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[ontologies_models.AttachmentV2]: - """ - Get the metadata of a particular attachment in an attachment list. - - :param ontology: - :type ontology: OntologyIdentifier - :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. - :type object_type: ObjectTypeApiName - :param primary_key: The primary key of the object containing the attachment. - :type primary_key: PropertyValueEscapedString - :param property: The API name of the attachment property. To find the API name for your attachment, check the **Ontology Manager** or use the **Get object type** endpoint. - :type property: PropertyApiName - :param attachment_rid: The RID of the attachment. - :type attachment_rid: AttachmentRid - :param sdk_package_rid: The package rid of the generated SDK. - :type sdk_package_rid: Optional[SdkPackageRid] - :param sdk_version: The version of the generated SDK. - :type sdk_version: Optional[SdkVersion] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[ontologies_models.AttachmentV2] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/attachments/{property}/{attachmentRid}", - query_params={ - "sdkPackageRid": sdk_package_rid, - "sdkVersion": sdk_version, - }, - path_params={ - "ontology": ontology, - "objectType": object_type, - "primaryKey": primary_key, - "property": property, - "attachmentRid": attachment_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.AttachmentV2, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def read_attachment( - self, - ontology: ontologies_models.OntologyIdentifier, - object_type: ontologies_models.ObjectTypeApiName, - primary_key: ontologies_models.PropertyValueEscapedString, - property: ontologies_models.PropertyApiName, - *, - sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, - sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[bytes]: - """ - Get the content of an attachment. - - :param ontology: - :type ontology: OntologyIdentifier - :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. - :type object_type: ObjectTypeApiName - :param primary_key: The primary key of the object containing the attachment. - :type primary_key: PropertyValueEscapedString - :param property: The API name of the attachment property. To find the API name for your attachment, check the **Ontology Manager** or use the **Get object type** endpoint. - :type property: PropertyApiName - :param sdk_package_rid: The package rid of the generated SDK. - :type sdk_package_rid: Optional[SdkPackageRid] - :param sdk_version: The version of the generated SDK. - :type sdk_version: Optional[SdkVersion] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[bytes] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/attachments/{property}/content", - query_params={ - "sdkPackageRid": sdk_package_rid, - "sdkVersion": sdk_version, - }, - path_params={ - "ontology": ontology, - "objectType": object_type, - "primaryKey": primary_key, - "property": property, - }, - header_params={ - "Accept": "*/*", - }, - body=None, - response_type=bytes, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def read_attachment_by_rid( - self, - ontology: ontologies_models.OntologyIdentifier, - object_type: ontologies_models.ObjectTypeApiName, - primary_key: ontologies_models.PropertyValueEscapedString, - property: ontologies_models.PropertyApiName, - attachment_rid: ontologies_models.AttachmentRid, - *, - sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, - sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[bytes]: - """ - Get the content of an attachment by its RID. - - The RID must exist in the attachment array of the property. - - :param ontology: - :type ontology: OntologyIdentifier - :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. - :type object_type: ObjectTypeApiName - :param primary_key: The primary key of the object containing the attachment. - :type primary_key: PropertyValueEscapedString - :param property: The API name of the attachment property. To find the API name for your attachment, check the **Ontology Manager** or use the **Get object type** endpoint. - :type property: PropertyApiName - :param attachment_rid: The RID of the attachment. - :type attachment_rid: AttachmentRid - :param sdk_package_rid: The package rid of the generated SDK. - :type sdk_package_rid: Optional[SdkPackageRid] - :param sdk_version: The version of the generated SDK. - :type sdk_version: Optional[SdkVersion] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[bytes] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/attachments/{property}/{attachmentRid}/content", - query_params={ - "sdkPackageRid": sdk_package_rid, - "sdkVersion": sdk_version, - }, - path_params={ - "ontology": ontology, - "objectType": object_type, - "primaryKey": primary_key, - "property": property, - "attachmentRid": attachment_rid, - }, - header_params={ - "Accept": "*/*", - }, - body=None, - response_type=bytes, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _AsyncAttachmentPropertyClientRaw: - def __init__(self, client: AsyncAttachmentPropertyClient) -> None: - def get_attachment(_: ontologies_models.AttachmentMetadataResponse): ... - def get_attachment_by_rid(_: ontologies_models.AttachmentV2): ... - def read_attachment(_: bytes): ... - def read_attachment_by_rid(_: bytes): ... - - self.get_attachment = core.async_with_raw_response(get_attachment, client.get_attachment) - self.get_attachment_by_rid = core.async_with_raw_response( - get_attachment_by_rid, client.get_attachment_by_rid - ) - self.read_attachment = core.async_with_raw_response(read_attachment, client.read_attachment) - self.read_attachment_by_rid = core.async_with_raw_response( - read_attachment_by_rid, client.read_attachment_by_rid - ) - - -class _AsyncAttachmentPropertyClientStreaming: - def __init__(self, client: AsyncAttachmentPropertyClient) -> None: - def get_attachment(_: ontologies_models.AttachmentMetadataResponse): ... - def get_attachment_by_rid(_: ontologies_models.AttachmentV2): ... - def read_attachment(_: bytes): ... - def read_attachment_by_rid(_: bytes): ... - - self.get_attachment = core.async_with_streaming_response( - get_attachment, client.get_attachment - ) - self.get_attachment_by_rid = core.async_with_streaming_response( - get_attachment_by_rid, client.get_attachment_by_rid - ) - self.read_attachment = core.async_with_streaming_response( - read_attachment, client.read_attachment - ) - self.read_attachment_by_rid = core.async_with_streaming_response( - read_attachment_by_rid, client.read_attachment_by_rid - ) diff --git a/foundry_sdk/v2/ontologies/cipher_text_property.py b/foundry_sdk/v2/ontologies/cipher_text_property.py deleted file mode 100644 index 1d9ae4201..000000000 --- a/foundry_sdk/v2/ontologies/cipher_text_property.py +++ /dev/null @@ -1,203 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing - -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v2.ontologies import models as ontologies_models - - -class CipherTextPropertyClient: - """ - The API client for the CipherTextProperty Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _CipherTextPropertyClientStreaming(self) - self.with_raw_response = _CipherTextPropertyClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def decrypt( - self, - ontology: ontologies_models.OntologyIdentifier, - object_type: ontologies_models.ObjectTypeApiName, - primary_key: ontologies_models.PropertyValueEscapedString, - property: ontologies_models.PropertyApiName, - *, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> ontologies_models.DecryptionResult: - """ - Decrypt the value of a ciphertext property. - - :param ontology: - :type ontology: OntologyIdentifier - :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. - :type object_type: ObjectTypeApiName - :param primary_key: The primary key of the object with the CipherText property. - :type primary_key: PropertyValueEscapedString - :param property: The API name of the CipherText property. To find the API name for your CipherText property, check the **Ontology Manager** or use the **Get object type** endpoint. - :type property: PropertyApiName - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: ontologies_models.DecryptionResult - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/ciphertexts/{property}/decrypt", - query_params={}, - path_params={ - "ontology": ontology, - "objectType": object_type, - "primaryKey": primary_key, - "property": property, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.DecryptionResult, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _CipherTextPropertyClientRaw: - def __init__(self, client: CipherTextPropertyClient) -> None: - def decrypt(_: ontologies_models.DecryptionResult): ... - - self.decrypt = core.with_raw_response(decrypt, client.decrypt) - - -class _CipherTextPropertyClientStreaming: - def __init__(self, client: CipherTextPropertyClient) -> None: - def decrypt(_: ontologies_models.DecryptionResult): ... - - self.decrypt = core.with_streaming_response(decrypt, client.decrypt) - - -class AsyncCipherTextPropertyClient: - """ - The API client for the CipherTextProperty Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AsyncCipherTextPropertyClientStreaming(self) - self.with_raw_response = _AsyncCipherTextPropertyClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def decrypt( - self, - ontology: ontologies_models.OntologyIdentifier, - object_type: ontologies_models.ObjectTypeApiName, - primary_key: ontologies_models.PropertyValueEscapedString, - property: ontologies_models.PropertyApiName, - *, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[ontologies_models.DecryptionResult]: - """ - Decrypt the value of a ciphertext property. - - :param ontology: - :type ontology: OntologyIdentifier - :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. - :type object_type: ObjectTypeApiName - :param primary_key: The primary key of the object with the CipherText property. - :type primary_key: PropertyValueEscapedString - :param property: The API name of the CipherText property. To find the API name for your CipherText property, check the **Ontology Manager** or use the **Get object type** endpoint. - :type property: PropertyApiName - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[ontologies_models.DecryptionResult] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/ciphertexts/{property}/decrypt", - query_params={}, - path_params={ - "ontology": ontology, - "objectType": object_type, - "primaryKey": primary_key, - "property": property, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.DecryptionResult, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _AsyncCipherTextPropertyClientRaw: - def __init__(self, client: AsyncCipherTextPropertyClient) -> None: - def decrypt(_: ontologies_models.DecryptionResult): ... - - self.decrypt = core.async_with_raw_response(decrypt, client.decrypt) - - -class _AsyncCipherTextPropertyClientStreaming: - def __init__(self, client: AsyncCipherTextPropertyClient) -> None: - def decrypt(_: ontologies_models.DecryptionResult): ... - - self.decrypt = core.async_with_streaming_response(decrypt, client.decrypt) diff --git a/foundry_sdk/v2/ontologies/errors.py b/foundry_sdk/v2/ontologies/errors.py deleted file mode 100644 index 41dbd739f..000000000 --- a/foundry_sdk/v2/ontologies/errors.py +++ /dev/null @@ -1,2482 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing -from dataclasses import dataclass - -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v2.ontologies import models as ontologies_models - - -class ActionContainsDuplicateEditsParameters(typing_extensions.TypedDict): - """The given action request has multiple edits on the same object.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class ActionContainsDuplicateEdits(errors.ConflictError): - name: typing.Literal["ActionContainsDuplicateEdits"] - parameters: ActionContainsDuplicateEditsParameters - error_instance_id: str - - -class ActionEditedPropertiesNotFoundParameters(typing_extensions.TypedDict): - """ - Actions attempted to edit properties that could not be found on the object type. - Please contact the Ontology administrator to resolve this issue. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class ActionEditedPropertiesNotFound(errors.BadRequestError): - name: typing.Literal["ActionEditedPropertiesNotFound"] - parameters: ActionEditedPropertiesNotFoundParameters - error_instance_id: str - - -class ActionEditsReadOnlyEntityParameters(typing_extensions.TypedDict): - """The given action request performs edits on a type that is read-only or does not allow edits.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - entityTypeRid: typing_extensions.NotRequired[ontologies_models.ObjectTypeRid] - - -@dataclass -class ActionEditsReadOnlyEntity(errors.BadRequestError): - name: typing.Literal["ActionEditsReadOnlyEntity"] - parameters: ActionEditsReadOnlyEntityParameters - error_instance_id: str - - -class ActionNotFoundParameters(typing_extensions.TypedDict): - """The action is not found, or the user does not have access to it.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - actionRid: ontologies_models.ActionRid - - -@dataclass -class ActionNotFound(errors.NotFoundError): - name: typing.Literal["ActionNotFound"] - parameters: ActionNotFoundParameters - error_instance_id: str - - -class ActionParameterInterfaceTypeNotFoundParameters(typing_extensions.TypedDict): - """The parameter references an interface type that could not be found, or the client token does not have access to it.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - parameterId: ontologies_models.ParameterId - - -@dataclass -class ActionParameterInterfaceTypeNotFound(errors.NotFoundError): - name: typing.Literal["ActionParameterInterfaceTypeNotFound"] - parameters: ActionParameterInterfaceTypeNotFoundParameters - error_instance_id: str - - -class ActionParameterObjectNotFoundParameters(typing_extensions.TypedDict): - """The parameter object reference or parameter default value is not found, or the client token does not have access to it.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - parameterId: ontologies_models.ParameterId - - -@dataclass -class ActionParameterObjectNotFound(errors.NotFoundError): - name: typing.Literal["ActionParameterObjectNotFound"] - parameters: ActionParameterObjectNotFoundParameters - error_instance_id: str - - -class ActionParameterObjectTypeNotFoundParameters(typing_extensions.TypedDict): - """The parameter references an object type that could not be found, or the client token does not have access to it.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - parameterId: ontologies_models.ParameterId - - -@dataclass -class ActionParameterObjectTypeNotFound(errors.NotFoundError): - name: typing.Literal["ActionParameterObjectTypeNotFound"] - parameters: ActionParameterObjectTypeNotFoundParameters - error_instance_id: str - - -class ActionTypeNotFoundParameters(typing_extensions.TypedDict): - """The action type is not found, or the user does not have access to it.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - actionType: typing_extensions.NotRequired[ontologies_models.ActionTypeApiName] - rid: typing_extensions.NotRequired[ontologies_models.ActionTypeRid] - - -@dataclass -class ActionTypeNotFound(errors.NotFoundError): - name: typing.Literal["ActionTypeNotFound"] - parameters: ActionTypeNotFoundParameters - error_instance_id: str - - -class ActionValidationFailedParameters(typing_extensions.TypedDict): - """ - The validation failed for the given action parameters. Please use the `validateAction` endpoint for more - details. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - actionType: ontologies_models.ActionTypeApiName - - -@dataclass -class ActionValidationFailed(errors.BadRequestError): - name: typing.Literal["ActionValidationFailed"] - parameters: ActionValidationFailedParameters - error_instance_id: str - - -class AggregationAccuracyNotSupportedParameters(typing_extensions.TypedDict): - """ - The given aggregation cannot be performed with the requested accuracy. - Try allowing approximate results or adjust your aggregation request. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class AggregationAccuracyNotSupported(errors.BadRequestError): - name: typing.Literal["AggregationAccuracyNotSupported"] - parameters: AggregationAccuracyNotSupportedParameters - error_instance_id: str - - -class AggregationGroupCountExceededLimitParameters(typing_extensions.TypedDict): - """ - The number of groups in the aggregations grouping exceeded the allowed limit. This can typically be fixed by - adjusting your query to reduce the number of groups created by your aggregation. For instance: - - If you are using multiple `groupBy` clauses, try reducing the number of clauses. - - If you are using a `groupBy` clause with a high cardinality property, try filtering the data first - to reduce the number of groups. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - groupsCount: typing_extensions.NotRequired[int] - groupsLimit: typing_extensions.NotRequired[int] - - -@dataclass -class AggregationGroupCountExceededLimit(errors.BadRequestError): - name: typing.Literal["AggregationGroupCountExceededLimit"] - parameters: AggregationGroupCountExceededLimitParameters - error_instance_id: str - - -class AggregationMemoryExceededLimitParameters(typing_extensions.TypedDict): - """ - The amount of memory used in the request exceeded the limit. This can typically be fixed by - adjusting your query to reduce the number of groups created by your aggregation. For instance: - - If you are using multiple `groupBy` clauses, try reducing the number of clauses. - - If you are using a `groupBy` clause with a high cardinality property, try filtering the data first - to reduce the number of groups. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - memoryUsedBytes: typing_extensions.NotRequired[str] - memoryLimitBytes: str - - -@dataclass -class AggregationMemoryExceededLimit(errors.BadRequestError): - name: typing.Literal["AggregationMemoryExceededLimit"] - parameters: AggregationMemoryExceededLimitParameters - error_instance_id: str - - -class AggregationNestedObjectSetSizeExceededLimitParameters(typing_extensions.TypedDict): - """ - A nested object set within the aggregation exceeded the allowed limit. - This can be fixed by aggregating over fewer objects, such as by applying a filter. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - objectsCount: int - objectsLimit: int - - -@dataclass -class AggregationNestedObjectSetSizeExceededLimit(errors.BadRequestError): - name: typing.Literal["AggregationNestedObjectSetSizeExceededLimit"] - parameters: AggregationNestedObjectSetSizeExceededLimitParameters - error_instance_id: str - - -class ApplyActionFailedParameters(typing_extensions.TypedDict): - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class ApplyActionFailed(errors.BadRequestError): - name: typing.Literal["ApplyActionFailed"] - parameters: ApplyActionFailedParameters - error_instance_id: str - - -class AttachmentNotFoundParameters(typing_extensions.TypedDict): - """ - The requested attachment is not found, or the client token does not have access to it. - Attachments that are not attached to any objects are deleted after two weeks. - Attachments that have not been attached to an object can only be viewed by the user who uploaded them. - Attachments that have been attached to an object can be viewed by users who can view the object. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - attachmentRid: typing_extensions.NotRequired[ontologies_models.AttachmentRid] - - -@dataclass -class AttachmentNotFound(errors.NotFoundError): - name: typing.Literal["AttachmentNotFound"] - parameters: AttachmentNotFoundParameters - error_instance_id: str - - -class AttachmentRidAlreadyExistsParameters(typing_extensions.TypedDict): - """The provided attachment RID already exists and cannot be overwritten.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - attachmentRid: ontologies_models.AttachmentRid - - -@dataclass -class AttachmentRidAlreadyExists(errors.NotFoundError): - name: typing.Literal["AttachmentRidAlreadyExists"] - parameters: AttachmentRidAlreadyExistsParameters - error_instance_id: str - - -class AttachmentSizeExceededLimitParameters(typing_extensions.TypedDict): - """ - The file is too large to be uploaded as an attachment. - The maximum attachment size is 200MB. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - fileSizeBytes: str - fileLimitBytes: str - - -@dataclass -class AttachmentSizeExceededLimit(errors.BadRequestError): - name: typing.Literal["AttachmentSizeExceededLimit"] - parameters: AttachmentSizeExceededLimitParameters - error_instance_id: str - - -class CipherChannelNotFoundParameters(typing_extensions.TypedDict): - """ - The Cipher Channel was not found. - It either does not exist, or you do not have permission to see it. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - cipherChannel: core.RID - - -@dataclass -class CipherChannelNotFound(errors.NotFoundError): - name: typing.Literal["CipherChannelNotFound"] - parameters: CipherChannelNotFoundParameters - error_instance_id: str - - -class CompositePrimaryKeyNotSupportedParameters(typing_extensions.TypedDict): - """ - Primary keys consisting of multiple properties are not supported by this API. If you need support for this, - please reach out to Palantir Support. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - objectType: ontologies_models.ObjectTypeApiName - primaryKey: typing.List[ontologies_models.PropertyApiName] - - -@dataclass -class CompositePrimaryKeyNotSupported(errors.BadRequestError): - name: typing.Literal["CompositePrimaryKeyNotSupported"] - parameters: CompositePrimaryKeyNotSupportedParameters - error_instance_id: str - - -class ConsistentSnapshotErrorParameters(typing_extensions.TypedDict): - """ - An Ontology objects read failed because the Ontology snapshot snapshot used for consistent reads became - stale. Retrying the request typically resolves this. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class ConsistentSnapshotError(errors.ConflictError): - name: typing.Literal["ConsistentSnapshotError"] - parameters: ConsistentSnapshotErrorParameters - error_instance_id: str - - -class DefaultAndNullGroupsNotSupportedParameters(typing_extensions.TypedDict): - """Exact match groupBy clause cannot specify a default value and allow null values.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class DefaultAndNullGroupsNotSupported(errors.BadRequestError): - name: typing.Literal["DefaultAndNullGroupsNotSupported"] - parameters: DefaultAndNullGroupsNotSupportedParameters - error_instance_id: str - - -class DerivedPropertyApiNamesNotUniqueParameters(typing_extensions.TypedDict): - """At least one of the requested derived property API names already exist on the object set.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - derivedPropertyApiNames: typing.List[ontologies_models.DerivedPropertyApiName] - - -@dataclass -class DerivedPropertyApiNamesNotUnique(errors.BadRequestError): - name: typing.Literal["DerivedPropertyApiNamesNotUnique"] - parameters: DerivedPropertyApiNamesNotUniqueParameters - error_instance_id: str - - -class DuplicateOrderByParameters(typing_extensions.TypedDict): - """The requested sort order includes duplicate properties.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - properties: typing.List[ontologies_models.PropertyApiName] - - -@dataclass -class DuplicateOrderBy(errors.BadRequestError): - name: typing.Literal["DuplicateOrderBy"] - parameters: DuplicateOrderByParameters - error_instance_id: str - - -class EditObjectPermissionDeniedParameters(typing_extensions.TypedDict): - """The user does not have permission to edit this `ObjectType`.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class EditObjectPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["EditObjectPermissionDenied"] - parameters: EditObjectPermissionDeniedParameters - error_instance_id: str - - -class FunctionEncounteredUserFacingErrorParameters(typing_extensions.TypedDict): - """ - The authored function failed to execute because of a user induced error. The message argument - is meant to be displayed to the user. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - functionRid: ontologies_models.FunctionRid - functionVersion: ontologies_models.FunctionVersion - message: str - - -@dataclass -class FunctionEncounteredUserFacingError(errors.BadRequestError): - name: typing.Literal["FunctionEncounteredUserFacingError"] - parameters: FunctionEncounteredUserFacingErrorParameters - error_instance_id: str - - -class FunctionExecutionFailedParameters(typing_extensions.TypedDict): - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - functionRid: ontologies_models.FunctionRid - functionVersion: ontologies_models.FunctionVersion - message: typing_extensions.NotRequired[str] - stacktrace: typing_extensions.NotRequired[str] - - -@dataclass -class FunctionExecutionFailed(errors.BadRequestError): - name: typing.Literal["FunctionExecutionFailed"] - parameters: FunctionExecutionFailedParameters - error_instance_id: str - - -class FunctionExecutionTimedOutParameters(typing_extensions.TypedDict): - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - functionRid: ontologies_models.FunctionRid - functionVersion: ontologies_models.FunctionVersion - - -@dataclass -class FunctionExecutionTimedOut(errors.InternalServerError): - name: typing.Literal["FunctionExecutionTimedOut"] - parameters: FunctionExecutionTimedOutParameters - error_instance_id: str - - -class FunctionInvalidInputParameters(typing_extensions.TypedDict): - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - functionRid: ontologies_models.FunctionRid - functionVersion: ontologies_models.FunctionVersion - - -@dataclass -class FunctionInvalidInput(errors.BadRequestError): - name: typing.Literal["FunctionInvalidInput"] - parameters: FunctionInvalidInputParameters - error_instance_id: str - - -class HighScaleComputationNotEnabledParameters(typing_extensions.TypedDict): - """High-scale compute was required for this Ontology query but is not enabled on this enrollment.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class HighScaleComputationNotEnabled(errors.InternalServerError): - name: typing.Literal["HighScaleComputationNotEnabled"] - parameters: HighScaleComputationNotEnabledParameters - error_instance_id: str - - -class InterfaceBasedObjectSetNotSupportedParameters(typing_extensions.TypedDict): - """The requested object set type is not supported for interface-based object sets.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class InterfaceBasedObjectSetNotSupported(errors.BadRequestError): - name: typing.Literal["InterfaceBasedObjectSetNotSupported"] - parameters: InterfaceBasedObjectSetNotSupportedParameters - error_instance_id: str - - -class InterfaceLinkTypeNotFoundParameters(typing_extensions.TypedDict): - """The requested interface link type is not found, or the client token does not have access to it.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - interfaceTypeApiName: typing_extensions.NotRequired[ontologies_models.InterfaceTypeApiName] - interfaceTypeRid: typing_extensions.NotRequired[ontologies_models.InterfaceTypeRid] - interfaceLinkTypeApiName: typing_extensions.NotRequired[ - ontologies_models.InterfaceLinkTypeApiName - ] - interfaceLinkTypeRid: typing_extensions.NotRequired[ontologies_models.InterfaceLinkTypeRid] - - -@dataclass -class InterfaceLinkTypeNotFound(errors.NotFoundError): - name: typing.Literal["InterfaceLinkTypeNotFound"] - parameters: InterfaceLinkTypeNotFoundParameters - error_instance_id: str - - -class InterfacePropertiesHaveDifferentIdsParameters(typing_extensions.TypedDict): - """Properties used in ordering must have the same ids.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - properties: typing.List[ontologies_models.InterfacePropertyApiName] - - -@dataclass -class InterfacePropertiesHaveDifferentIds(errors.BadRequestError): - name: typing.Literal["InterfacePropertiesHaveDifferentIds"] - parameters: InterfacePropertiesHaveDifferentIdsParameters - error_instance_id: str - - -class InterfacePropertiesNotFoundParameters(typing_extensions.TypedDict): - """The requested interface property types are not present on every object type.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - objectType: typing.List[ontologies_models.ObjectTypeApiName] - missingInterfaceProperties: typing.List[ontologies_models.InterfacePropertyApiName] - - -@dataclass -class InterfacePropertiesNotFound(errors.NotFoundError): - name: typing.Literal["InterfacePropertiesNotFound"] - parameters: InterfacePropertiesNotFoundParameters - error_instance_id: str - - -class InterfacePropertyNotFoundParameters(typing_extensions.TypedDict): - """The requested interface property was not found on the interface type.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - interfaceType: ontologies_models.InterfaceTypeApiName - interfaceProperty: ontologies_models.InterfacePropertyApiName - - -@dataclass -class InterfacePropertyNotFound(errors.NotFoundError): - name: typing.Literal["InterfacePropertyNotFound"] - parameters: InterfacePropertyNotFoundParameters - error_instance_id: str - - -class InterfaceTypeNotFoundParameters(typing_extensions.TypedDict): - """The requested interface type is not found, or the client token does not have access to it.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - apiName: typing_extensions.NotRequired[ontologies_models.InterfaceTypeApiName] - rid: typing_extensions.NotRequired[ontologies_models.InterfaceTypeRid] - - -@dataclass -class InterfaceTypeNotFound(errors.NotFoundError): - name: typing.Literal["InterfaceTypeNotFound"] - parameters: InterfaceTypeNotFoundParameters - error_instance_id: str - - -class InterfaceTypesNotFoundParameters(typing_extensions.TypedDict): - """The requested interface types were not found, or the client token does not have access to it.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - apiName: typing.List[ontologies_models.InterfaceTypeApiName] - rid: typing.List[ontologies_models.InterfaceTypeRid] - - -@dataclass -class InterfaceTypesNotFound(errors.NotFoundError): - name: typing.Literal["InterfaceTypesNotFound"] - parameters: InterfaceTypesNotFoundParameters - error_instance_id: str - - -class InvalidAggregationOrderingParameters(typing_extensions.TypedDict): - """Aggregation ordering can only be applied to metrics with exactly one groupBy clause.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class InvalidAggregationOrdering(errors.BadRequestError): - name: typing.Literal["InvalidAggregationOrdering"] - parameters: InvalidAggregationOrderingParameters - error_instance_id: str - - -class InvalidAggregationOrderingWithNullValuesParameters(typing_extensions.TypedDict): - """Aggregation ordering cannot be applied for groupBy clauses that allow null values.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class InvalidAggregationOrderingWithNullValues(errors.BadRequestError): - name: typing.Literal["InvalidAggregationOrderingWithNullValues"] - parameters: InvalidAggregationOrderingWithNullValuesParameters - error_instance_id: str - - -class InvalidAggregationRangeParameters(typing_extensions.TypedDict): - """Aggregation range should include one lt or lte and one gt or gte.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class InvalidAggregationRange(errors.BadRequestError): - name: typing.Literal["InvalidAggregationRange"] - parameters: InvalidAggregationRangeParameters - error_instance_id: str - - -class InvalidAggregationRangePropertyTypeParameters(typing_extensions.TypedDict): - """Range group by is not supported by property type.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - property: ontologies_models.PropertyApiName - objectType: ontologies_models.ObjectTypeApiName - propertyBaseType: ontologies_models.ValueType - - -@dataclass -class InvalidAggregationRangePropertyType(errors.BadRequestError): - name: typing.Literal["InvalidAggregationRangePropertyType"] - parameters: InvalidAggregationRangePropertyTypeParameters - error_instance_id: str - - -class InvalidAggregationRangePropertyTypeForInterfaceParameters(typing_extensions.TypedDict): - """Range group by is not supported by interface property type.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - interfaceProperty: ontologies_models.InterfacePropertyApiName - interfaceType: ontologies_models.InterfaceTypeApiName - propertyBaseType: ontologies_models.ValueType - - -@dataclass -class InvalidAggregationRangePropertyTypeForInterface(errors.BadRequestError): - name: typing.Literal["InvalidAggregationRangePropertyTypeForInterface"] - parameters: InvalidAggregationRangePropertyTypeForInterfaceParameters - error_instance_id: str - - -class InvalidAggregationRangeValueParameters(typing_extensions.TypedDict): - """Aggregation value does not conform to the expected underlying type.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - property: ontologies_models.PropertyApiName - objectType: ontologies_models.ObjectTypeApiName - propertyBaseType: ontologies_models.ValueType - - -@dataclass -class InvalidAggregationRangeValue(errors.BadRequestError): - name: typing.Literal["InvalidAggregationRangeValue"] - parameters: InvalidAggregationRangeValueParameters - error_instance_id: str - - -class InvalidAggregationRangeValueForInterfaceParameters(typing_extensions.TypedDict): - """Aggregation value does not conform to the expected underlying type.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - interfaceProperty: ontologies_models.InterfacePropertyApiName - interfaceType: ontologies_models.InterfaceTypeApiName - propertyBaseType: ontologies_models.ValueType - - -@dataclass -class InvalidAggregationRangeValueForInterface(errors.BadRequestError): - name: typing.Literal["InvalidAggregationRangeValueForInterface"] - parameters: InvalidAggregationRangeValueForInterfaceParameters - error_instance_id: str - - -class InvalidApplyActionOptionCombinationParameters(typing_extensions.TypedDict): - """The given options are individually valid but cannot be used in the given combination.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - invalidCombination: typing_extensions.NotRequired[ontologies_models.ApplyActionRequestOptions] - - -@dataclass -class InvalidApplyActionOptionCombination(errors.BadRequestError): - name: typing.Literal["InvalidApplyActionOptionCombination"] - parameters: InvalidApplyActionOptionCombinationParameters - error_instance_id: str - - -class InvalidContentLengthParameters(typing_extensions.TypedDict): - """A `Content-Length` header is required for all uploads, but was missing or invalid.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class InvalidContentLength(errors.BadRequestError): - name: typing.Literal["InvalidContentLength"] - parameters: InvalidContentLengthParameters - error_instance_id: str - - -class InvalidContentTypeParameters(typing_extensions.TypedDict): - """ - The `Content-Type` cannot be inferred from the request content and filename. - Please check your request content and filename to ensure they are compatible. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class InvalidContentType(errors.BadRequestError): - name: typing.Literal["InvalidContentType"] - parameters: InvalidContentTypeParameters - error_instance_id: str - - -class InvalidDerivedPropertyDefinitionParameters(typing_extensions.TypedDict): - """Derived property definition was invalid due to shape of query or type checking.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - objectType: ontologies_models.ObjectTypeApiName - derivedProperty: ontologies_models.DerivedPropertyApiName - - -@dataclass -class InvalidDerivedPropertyDefinition(errors.BadRequestError): - name: typing.Literal["InvalidDerivedPropertyDefinition"] - parameters: InvalidDerivedPropertyDefinitionParameters - error_instance_id: str - - -class InvalidDurationGroupByPropertyTypeParameters(typing_extensions.TypedDict): - """Invalid property type for duration groupBy.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - property: ontologies_models.PropertyApiName - objectType: ontologies_models.ObjectTypeApiName - propertyBaseType: ontologies_models.ValueType - - -@dataclass -class InvalidDurationGroupByPropertyType(errors.BadRequestError): - name: typing.Literal["InvalidDurationGroupByPropertyType"] - parameters: InvalidDurationGroupByPropertyTypeParameters - error_instance_id: str - - -class InvalidDurationGroupByPropertyTypeForInterfaceParameters(typing_extensions.TypedDict): - """Invalid interface property type for duration groupBy.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - interfaceProperty: ontologies_models.InterfacePropertyApiName - interfaceType: ontologies_models.InterfaceTypeApiName - propertyBaseType: ontologies_models.ValueType - - -@dataclass -class InvalidDurationGroupByPropertyTypeForInterface(errors.BadRequestError): - name: typing.Literal["InvalidDurationGroupByPropertyTypeForInterface"] - parameters: InvalidDurationGroupByPropertyTypeForInterfaceParameters - error_instance_id: str - - -class InvalidDurationGroupByValueParameters(typing_extensions.TypedDict): - """ - Duration groupBy value is invalid. Units larger than day must have value `1` and date properties do not support - filtering on units smaller than day. As examples, neither bucketing by every two weeks nor bucketing a date by - every two hours are allowed. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class InvalidDurationGroupByValue(errors.BadRequestError): - name: typing.Literal["InvalidDurationGroupByValue"] - parameters: InvalidDurationGroupByValueParameters - error_instance_id: str - - -class InvalidFieldsParameters(typing_extensions.TypedDict): - """ - The value of the given field does not match the expected pattern. For example, an Ontology object property `id` - should be written `properties.id`. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - properties: typing.List[str] - - -@dataclass -class InvalidFields(errors.BadRequestError): - name: typing.Literal["InvalidFields"] - parameters: InvalidFieldsParameters - error_instance_id: str - - -class InvalidGroupIdParameters(typing_extensions.TypedDict): - """The provided value for a group id must be a UUID.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - groupId: str - - -@dataclass -class InvalidGroupId(errors.BadRequestError): - name: typing.Literal["InvalidGroupId"] - parameters: InvalidGroupIdParameters - error_instance_id: str - - -class InvalidOrderTypeParameters(typing_extensions.TypedDict): - """This query type does not support the provided order type""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - orderType: typing_extensions.NotRequired[ontologies_models.SearchOrderByType] - - -@dataclass -class InvalidOrderType(errors.BadRequestError): - name: typing.Literal["InvalidOrderType"] - parameters: InvalidOrderTypeParameters - error_instance_id: str - - -class InvalidParameterValueParameters(typing_extensions.TypedDict): - """ - The value of the given parameter is invalid. See the documentation of `DataValue` for details on - how parameters are represented. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - parameterBaseType: typing_extensions.NotRequired[ontologies_models.ValueType] - parameterDataType: typing_extensions.NotRequired[ontologies_models.OntologyDataType] - parameterId: ontologies_models.ParameterId - parameterValue: typing_extensions.NotRequired[ontologies_models.DataValue] - - -@dataclass -class InvalidParameterValue(errors.BadRequestError): - name: typing.Literal["InvalidParameterValue"] - parameters: InvalidParameterValueParameters - error_instance_id: str - - -class InvalidPropertyFilterValueParameters(typing_extensions.TypedDict): - """ - The value of the given property filter is invalid. For instance, 2 is an invalid value for - `isNull` in `properties.address.isNull=2` because the `isNull` filter expects a value of boolean type. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - expectedType: ontologies_models.ValueType - propertyFilter: ontologies_models.PropertyFilter - propertyFilterValue: ontologies_models.FilterValue - property: ontologies_models.PropertyApiName - - -@dataclass -class InvalidPropertyFilterValue(errors.BadRequestError): - name: typing.Literal["InvalidPropertyFilterValue"] - parameters: InvalidPropertyFilterValueParameters - error_instance_id: str - - -class InvalidPropertyFiltersCombinationParameters(typing_extensions.TypedDict): - """The provided filters cannot be used together.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - propertyFilters: typing.List[ontologies_models.PropertyFilter] - property: ontologies_models.PropertyApiName - - -@dataclass -class InvalidPropertyFiltersCombination(errors.BadRequestError): - name: typing.Literal["InvalidPropertyFiltersCombination"] - parameters: InvalidPropertyFiltersCombinationParameters - error_instance_id: str - - -class InvalidPropertyTypeParameters(typing_extensions.TypedDict): - """The given property type is not of the expected type.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - propertyBaseType: ontologies_models.ValueType - property: ontologies_models.PropertyApiName - - -@dataclass -class InvalidPropertyType(errors.BadRequestError): - name: typing.Literal["InvalidPropertyType"] - parameters: InvalidPropertyTypeParameters - error_instance_id: str - - -class InvalidPropertyValueParameters(typing_extensions.TypedDict): - """ - The value of the given property is invalid. See the documentation of `PropertyValue` for details on - how properties are represented. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - propertyBaseType: ontologies_models.ValueType - property: ontologies_models.PropertyApiName - propertyValue: ontologies_models.PropertyValue - - -@dataclass -class InvalidPropertyValue(errors.BadRequestError): - name: typing.Literal["InvalidPropertyValue"] - parameters: InvalidPropertyValueParameters - error_instance_id: str - - -class InvalidQueryOutputValueParameters(typing_extensions.TypedDict): - """ - The value of the query's output is invalid. This may be because the return value did not match the specified - output type or constraints. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - outputDataType: ontologies_models.QueryDataType - outputValue: typing_extensions.NotRequired[ontologies_models.DataValue] - functionRid: ontologies_models.FunctionRid - functionVersion: ontologies_models.FunctionVersion - - -@dataclass -class InvalidQueryOutputValue(errors.BadRequestError): - name: typing.Literal["InvalidQueryOutputValue"] - parameters: InvalidQueryOutputValueParameters - error_instance_id: str - - -class InvalidQueryParameterValueParameters(typing_extensions.TypedDict): - """ - The value of the given parameter is invalid. See the documentation of `DataValue` for details on - how parameters are represented. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - parameterDataType: ontologies_models.QueryDataType - parameterId: ontologies_models.ParameterId - parameterValue: typing_extensions.NotRequired[ontologies_models.DataValue] - - -@dataclass -class InvalidQueryParameterValue(errors.BadRequestError): - name: typing.Literal["InvalidQueryParameterValue"] - parameters: InvalidQueryParameterValueParameters - error_instance_id: str - - -class InvalidRangeQueryParameters(typing_extensions.TypedDict): - """The specified query range filter is invalid.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - lt: typing_extensions.NotRequired[typing.Any] - """Less than""" - - gt: typing_extensions.NotRequired[typing.Any] - """Greater than""" - - lte: typing_extensions.NotRequired[typing.Any] - """Less than or equal""" - - gte: typing_extensions.NotRequired[typing.Any] - """Greater than or equal""" - - field: str - - -@dataclass -class InvalidRangeQuery(errors.BadRequestError): - name: typing.Literal["InvalidRangeQuery"] - parameters: InvalidRangeQueryParameters - error_instance_id: str - - -class InvalidSortOrderParameters(typing_extensions.TypedDict): - """ - The requested sort order of one or more properties is invalid. Valid sort orders are 'asc' or 'desc'. Sort - order can also be omitted, and defaults to 'asc'. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - invalidSortOrder: str - - -@dataclass -class InvalidSortOrder(errors.BadRequestError): - name: typing.Literal["InvalidSortOrder"] - parameters: InvalidSortOrderParameters - error_instance_id: str - - -class InvalidSortTypeParameters(typing_extensions.TypedDict): - """The requested sort type of one or more clauses is invalid. Valid sort types are 'p' or 'properties'.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - invalidSortType: str - - -@dataclass -class InvalidSortType(errors.BadRequestError): - name: typing.Literal["InvalidSortType"] - parameters: InvalidSortTypeParameters - error_instance_id: str - - -class InvalidTransactionEditPropertyValueParameters(typing_extensions.TypedDict): - """ - The value of the given property is invalid. See the documentation of `DataValue` for details on - how properties are represented for transaction edits. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - propertyApiName: ontologies_models.PropertyApiName - propertyBaseType: ontologies_models.ValueType - propertyValue: ontologies_models.DataValue - - -@dataclass -class InvalidTransactionEditPropertyValue(errors.BadRequestError): - name: typing.Literal["InvalidTransactionEditPropertyValue"] - parameters: InvalidTransactionEditPropertyValueParameters - error_instance_id: str - - -class InvalidUserIdParameters(typing_extensions.TypedDict): - """The provided value for a user id must be a UUID.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - userId: str - - -@dataclass -class InvalidUserId(errors.BadRequestError): - name: typing.Literal["InvalidUserId"] - parameters: InvalidUserIdParameters - error_instance_id: str - - -class InvalidVectorDimensionParameters(typing_extensions.TypedDict): - """The dimensions of the provided vector don't match the dimensions of the embedding model being queried.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - expectedSize: int - providedSize: int - - -@dataclass -class InvalidVectorDimension(errors.BadRequestError): - name: typing.Literal["InvalidVectorDimension"] - parameters: InvalidVectorDimensionParameters - error_instance_id: str - - -class LinkAlreadyExistsParameters(typing_extensions.TypedDict): - """The link the user is attempting to create already exists.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class LinkAlreadyExists(errors.ConflictError): - name: typing.Literal["LinkAlreadyExists"] - parameters: LinkAlreadyExistsParameters - error_instance_id: str - - -class LinkTypeNotFoundParameters(typing_extensions.TypedDict): - """The link type is not found, or the user does not have access to it.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - objectType: typing_extensions.NotRequired[ontologies_models.ObjectTypeApiName] - linkType: typing_extensions.NotRequired[ontologies_models.LinkTypeApiName] - linkTypeId: typing_extensions.NotRequired[ontologies_models.LinkTypeId] - - -@dataclass -class LinkTypeNotFound(errors.NotFoundError): - name: typing.Literal["LinkTypeNotFound"] - parameters: LinkTypeNotFoundParameters - error_instance_id: str - - -class LinkedObjectNotFoundParameters(typing_extensions.TypedDict): - """The linked object with the given primary key is not found, or the user does not have access to it.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - linkType: ontologies_models.LinkTypeApiName - linkedObjectType: ontologies_models.ObjectTypeApiName - linkedObjectPrimaryKey: typing.Dict[ - ontologies_models.PropertyApiName, ontologies_models.PrimaryKeyValue - ] - - -@dataclass -class LinkedObjectNotFound(errors.NotFoundError): - name: typing.Literal["LinkedObjectNotFound"] - parameters: LinkedObjectNotFoundParameters - error_instance_id: str - - -class LoadObjectSetLinksNotSupportedParameters(typing_extensions.TypedDict): - """Bulk loading object set links is not supported by Object Storage v1.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class LoadObjectSetLinksNotSupported(errors.InternalServerError): - name: typing.Literal["LoadObjectSetLinksNotSupported"] - parameters: LoadObjectSetLinksNotSupportedParameters - error_instance_id: str - - -class MalformedPropertyFiltersParameters(typing_extensions.TypedDict): - """At least one of requested filters are malformed. Please look at the documentation of `PropertyFilter`.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - malformedPropertyFilter: str - - -@dataclass -class MalformedPropertyFilters(errors.BadRequestError): - name: typing.Literal["MalformedPropertyFilters"] - parameters: MalformedPropertyFiltersParameters - error_instance_id: str - - -class MarketplaceActionMappingNotFoundParameters(typing_extensions.TypedDict): - """The given action could not be mapped to a Marketplace installation.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - actionType: ontologies_models.ActionTypeApiName - artifactRepository: ontologies_models.ArtifactRepositoryRid - packageName: ontologies_models.SdkPackageName - - -@dataclass -class MarketplaceActionMappingNotFound(errors.NotFoundError): - name: typing.Literal["MarketplaceActionMappingNotFound"] - parameters: MarketplaceActionMappingNotFoundParameters - error_instance_id: str - - -class MarketplaceInstallationNotFoundParameters(typing_extensions.TypedDict): - """The given marketplace installation could not be found or the user does not have access to it.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - artifactRepository: ontologies_models.ArtifactRepositoryRid - packageName: ontologies_models.SdkPackageName - - -@dataclass -class MarketplaceInstallationNotFound(errors.NotFoundError): - name: typing.Literal["MarketplaceInstallationNotFound"] - parameters: MarketplaceInstallationNotFoundParameters - error_instance_id: str - - -class MarketplaceLinkMappingNotFoundParameters(typing_extensions.TypedDict): - """The given link could not be mapped to a Marketplace installation.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - linkType: ontologies_models.LinkTypeApiName - artifactRepository: ontologies_models.ArtifactRepositoryRid - packageName: ontologies_models.SdkPackageName - - -@dataclass -class MarketplaceLinkMappingNotFound(errors.NotFoundError): - name: typing.Literal["MarketplaceLinkMappingNotFound"] - parameters: MarketplaceLinkMappingNotFoundParameters - error_instance_id: str - - -class MarketplaceObjectMappingNotFoundParameters(typing_extensions.TypedDict): - """The given object could not be mapped to a Marketplace installation.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - objectType: ontologies_models.ObjectTypeApiName - artifactRepository: ontologies_models.ArtifactRepositoryRid - packageName: ontologies_models.SdkPackageName - - -@dataclass -class MarketplaceObjectMappingNotFound(errors.NotFoundError): - name: typing.Literal["MarketplaceObjectMappingNotFound"] - parameters: MarketplaceObjectMappingNotFoundParameters - error_instance_id: str - - -class MarketplaceQueryMappingNotFoundParameters(typing_extensions.TypedDict): - """The given query could not be mapped to a Marketplace installation.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - queryType: ontologies_models.QueryApiName - artifactRepository: ontologies_models.ArtifactRepositoryRid - packageName: ontologies_models.SdkPackageName - - -@dataclass -class MarketplaceQueryMappingNotFound(errors.NotFoundError): - name: typing.Literal["MarketplaceQueryMappingNotFound"] - parameters: MarketplaceQueryMappingNotFoundParameters - error_instance_id: str - - -class MarketplaceSdkActionMappingNotFoundParameters(typing_extensions.TypedDict): - """The given action could not be mapped to a Marketplace installation.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - actionType: ontologies_models.ActionTypeApiName - sdkPackageRid: ontologies_models.SdkPackageRid - sdkVersion: ontologies_models.SdkVersion - - -@dataclass -class MarketplaceSdkActionMappingNotFound(errors.NotFoundError): - name: typing.Literal["MarketplaceSdkActionMappingNotFound"] - parameters: MarketplaceSdkActionMappingNotFoundParameters - error_instance_id: str - - -class MarketplaceSdkInstallationNotFoundParameters(typing_extensions.TypedDict): - """The given marketplace installation could not be found or the user does not have access to it.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - sdkPackageRid: ontologies_models.SdkPackageRid - sdkVersion: ontologies_models.SdkVersion - - -@dataclass -class MarketplaceSdkInstallationNotFound(errors.NotFoundError): - name: typing.Literal["MarketplaceSdkInstallationNotFound"] - parameters: MarketplaceSdkInstallationNotFoundParameters - error_instance_id: str - - -class MarketplaceSdkLinkMappingNotFoundParameters(typing_extensions.TypedDict): - """The given link could not be mapped to a Marketplace installation.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - linkType: ontologies_models.LinkTypeApiName - sdkPackageRid: ontologies_models.SdkPackageRid - sdkVersion: ontologies_models.SdkVersion - - -@dataclass -class MarketplaceSdkLinkMappingNotFound(errors.NotFoundError): - name: typing.Literal["MarketplaceSdkLinkMappingNotFound"] - parameters: MarketplaceSdkLinkMappingNotFoundParameters - error_instance_id: str - - -class MarketplaceSdkObjectMappingNotFoundParameters(typing_extensions.TypedDict): - """The given object could not be mapped to a Marketplace installation.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - localObjectType: typing_extensions.NotRequired[ontologies_models.ObjectTypeApiName] - objectType: typing_extensions.NotRequired[ontologies_models.ObjectTypeRid] - sdkPackageRid: ontologies_models.SdkPackageRid - sdkVersion: ontologies_models.SdkVersion - - -@dataclass -class MarketplaceSdkObjectMappingNotFound(errors.NotFoundError): - name: typing.Literal["MarketplaceSdkObjectMappingNotFound"] - parameters: MarketplaceSdkObjectMappingNotFoundParameters - error_instance_id: str - - -class MarketplaceSdkPropertyMappingNotFoundParameters(typing_extensions.TypedDict): - """The given property could not be mapped to a Marketplace installation.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - propertyType: ontologies_models.PropertyApiName - objectType: ontologies_models.ObjectTypeApiName - sdkPackageRid: ontologies_models.SdkPackageRid - sdkVersion: ontologies_models.SdkVersion - - -@dataclass -class MarketplaceSdkPropertyMappingNotFound(errors.NotFoundError): - name: typing.Literal["MarketplaceSdkPropertyMappingNotFound"] - parameters: MarketplaceSdkPropertyMappingNotFoundParameters - error_instance_id: str - - -class MarketplaceSdkQueryMappingNotFoundParameters(typing_extensions.TypedDict): - """The given query could not be mapped to a Marketplace installation.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - queryType: ontologies_models.QueryApiName - sdkPackageRid: ontologies_models.SdkPackageRid - sdkVersion: ontologies_models.SdkVersion - - -@dataclass -class MarketplaceSdkQueryMappingNotFound(errors.NotFoundError): - name: typing.Literal["MarketplaceSdkQueryMappingNotFound"] - parameters: MarketplaceSdkQueryMappingNotFoundParameters - error_instance_id: str - - -class MissingParameterParameters(typing_extensions.TypedDict): - """ - Required parameters are missing. Please look at the `parameters` field to see which required parameters are - missing from the request. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - parameters: typing.List[ontologies_models.ParameterId] - - -@dataclass -class MissingParameter(errors.BadRequestError): - name: typing.Literal["MissingParameter"] - parameters: MissingParameterParameters - error_instance_id: str - - -class MultipleGroupByOnFieldNotSupportedParameters(typing_extensions.TypedDict): - """Aggregation cannot group by on the same field multiple times.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - duplicateFields: typing.List[str] - - -@dataclass -class MultipleGroupByOnFieldNotSupported(errors.BadRequestError): - name: typing.Literal["MultipleGroupByOnFieldNotSupported"] - parameters: MultipleGroupByOnFieldNotSupportedParameters - error_instance_id: str - - -class MultiplePropertyValuesNotSupportedParameters(typing_extensions.TypedDict): - """ - One of the requested property filters does not support multiple values. Please include only a single value for - it. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - propertyFilter: ontologies_models.PropertyFilter - property: ontologies_models.PropertyApiName - - -@dataclass -class MultiplePropertyValuesNotSupported(errors.BadRequestError): - name: typing.Literal["MultiplePropertyValuesNotSupported"] - parameters: MultiplePropertyValuesNotSupportedParameters - error_instance_id: str - - -class NotCipherFormattedParameters(typing_extensions.TypedDict): - """ - The value intended for decryption with Cipher is not formatted correctly. - It may already be a plaintext value and not require decryption. - Ensure it is correctly formatted (CIPHER::::::CIPHER). - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - value: str - - -@dataclass -class NotCipherFormatted(errors.BadRequestError): - name: typing.Literal["NotCipherFormatted"] - parameters: NotCipherFormattedParameters - error_instance_id: str - - -class ObjectAlreadyExistsParameters(typing_extensions.TypedDict): - """The object the user is attempting to create already exists.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class ObjectAlreadyExists(errors.ConflictError): - name: typing.Literal["ObjectAlreadyExists"] - parameters: ObjectAlreadyExistsParameters - error_instance_id: str - - -class ObjectChangedParameters(typing_extensions.TypedDict): - """An object used by this `Action` was changed by someone else while the `Action` was running.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - primaryKey: typing_extensions.NotRequired[ontologies_models.PropertyValue] - objectType: typing_extensions.NotRequired[ontologies_models.ObjectTypeApiName] - - -@dataclass -class ObjectChanged(errors.ConflictError): - name: typing.Literal["ObjectChanged"] - parameters: ObjectChangedParameters - error_instance_id: str - - -class ObjectNotFoundParameters(typing_extensions.TypedDict): - """The requested object is not found, or the client token does not have access to it.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - objectType: typing_extensions.NotRequired[ontologies_models.ObjectTypeApiName] - primaryKey: typing.Dict[ontologies_models.PropertyApiName, ontologies_models.PrimaryKeyValue] - - -@dataclass -class ObjectNotFound(errors.NotFoundError): - name: typing.Literal["ObjectNotFound"] - parameters: ObjectNotFoundParameters - error_instance_id: str - - -class ObjectSetNotFoundParameters(typing_extensions.TypedDict): - """The requested object set is not found, or the client token does not have access to it.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - objectSetRid: ontologies_models.ObjectSetRid - - -@dataclass -class ObjectSetNotFound(errors.NotFoundError): - name: typing.Literal["ObjectSetNotFound"] - parameters: ObjectSetNotFoundParameters - error_instance_id: str - - -class ObjectTypeNotFoundParameters(typing_extensions.TypedDict): - """The requested object type is not found, or the client token does not have access to it.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - objectType: typing_extensions.NotRequired[ontologies_models.ObjectTypeApiName] - objectTypeRid: typing_extensions.NotRequired[ontologies_models.ObjectTypeRid] - - -@dataclass -class ObjectTypeNotFound(errors.NotFoundError): - name: typing.Literal["ObjectTypeNotFound"] - parameters: ObjectTypeNotFoundParameters - error_instance_id: str - - -class ObjectTypeNotSyncedParameters(typing_extensions.TypedDict): - """ - The requested object type is not synced into the ontology. Please reach out to your Ontology - Administrator to re-index the object type in Ontology Management Application. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - objectType: ontologies_models.ObjectTypeApiName - - -@dataclass -class ObjectTypeNotSynced(errors.ConflictError): - name: typing.Literal["ObjectTypeNotSynced"] - parameters: ObjectTypeNotSyncedParameters - error_instance_id: str - - -class ObjectTypesNotSyncedParameters(typing_extensions.TypedDict): - """ - One or more of the requested object types are not synced into the ontology. Please reach out to your Ontology - Administrator to re-index the object type(s) in Ontology Management Application. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - objectTypes: typing.List[ontologies_models.ObjectTypeApiName] - - -@dataclass -class ObjectTypesNotSynced(errors.ConflictError): - name: typing.Literal["ObjectTypesNotSynced"] - parameters: ObjectTypesNotSyncedParameters - error_instance_id: str - - -class ObjectsExceededLimitParameters(typing_extensions.TypedDict): - """ - There are more objects, but they cannot be returned by this API. Only 10,000 objects are available through this - API for a given request. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class ObjectsExceededLimit(errors.BadRequestError): - name: typing.Literal["ObjectsExceededLimit"] - parameters: ObjectsExceededLimitParameters - error_instance_id: str - - -class ObjectsModifiedConcurrentlyParameters(typing_extensions.TypedDict): - """ - The provided objects are being modified concurrently and the operation would result in a conflict. - The client should retry the request later. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - functionRid: typing_extensions.NotRequired[ontologies_models.FunctionRid] - functionVersion: typing_extensions.NotRequired[ontologies_models.FunctionVersion] - - -@dataclass -class ObjectsModifiedConcurrently(errors.ConflictError): - name: typing.Literal["ObjectsModifiedConcurrently"] - parameters: ObjectsModifiedConcurrentlyParameters - error_instance_id: str - - -class OntologyApiNameNotUniqueParameters(typing_extensions.TypedDict): - """The given Ontology API name is not unique. Use the Ontology RID in place of the Ontology API name.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - ontologyApiName: ontologies_models.OntologyApiName - - -@dataclass -class OntologyApiNameNotUnique(errors.BadRequestError): - name: typing.Literal["OntologyApiNameNotUnique"] - parameters: OntologyApiNameNotUniqueParameters - error_instance_id: str - - -class OntologyEditsExceededLimitParameters(typing_extensions.TypedDict): - """ - The number of edits to the Ontology exceeded the allowed limit. - This may happen because of the request or because the Action is modifying too many objects. - Please change the size of your request or contact the Ontology administrator. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - editsCount: int - editsLimit: int - - -@dataclass -class OntologyEditsExceededLimit(errors.BadRequestError): - name: typing.Literal["OntologyEditsExceededLimit"] - parameters: OntologyEditsExceededLimitParameters - error_instance_id: str - - -class OntologyNotFoundParameters(typing_extensions.TypedDict): - """The requested Ontology is not found, or the client token does not have access to it.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - ontologyRid: typing_extensions.NotRequired[ontologies_models.OntologyRid] - apiName: typing_extensions.NotRequired[ontologies_models.OntologyApiName] - - -@dataclass -class OntologyNotFound(errors.NotFoundError): - name: typing.Literal["OntologyNotFound"] - parameters: OntologyNotFoundParameters - error_instance_id: str - - -class OntologySyncingParameters(typing_extensions.TypedDict): - """ - The requested object type has been changed in the **Ontology Manager** and changes are currently being applied. Wait a - few seconds and try again. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - objectType: ontologies_models.ObjectTypeApiName - - -@dataclass -class OntologySyncing(errors.ConflictError): - name: typing.Literal["OntologySyncing"] - parameters: OntologySyncingParameters - error_instance_id: str - - -class OntologySyncingObjectTypesParameters(typing_extensions.TypedDict): - """ - One or more requested object types have been changed in the **Ontology Manager** and changes are currently being - applied. Wait a few seconds and try again. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - objectTypes: typing.List[ontologies_models.ObjectTypeApiName] - - -@dataclass -class OntologySyncingObjectTypes(errors.ConflictError): - name: typing.Literal["OntologySyncingObjectTypes"] - parameters: OntologySyncingObjectTypesParameters - error_instance_id: str - - -class ParameterObjectNotFoundParameters(typing_extensions.TypedDict): - """The parameter object reference or parameter default value is not found, or the client token does not have access to it.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - objectType: ontologies_models.ObjectTypeApiName - primaryKey: typing.Dict[ontologies_models.PropertyApiName, ontologies_models.PrimaryKeyValue] - - -@dataclass -class ParameterObjectNotFound(errors.NotFoundError): - name: typing.Literal["ParameterObjectNotFound"] - parameters: ParameterObjectNotFoundParameters - error_instance_id: str - - -class ParameterObjectSetRidNotFoundParameters(typing_extensions.TypedDict): - """The parameter object set RID is not found, or the client token does not have access to it.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - objectSetRid: core.RID - - -@dataclass -class ParameterObjectSetRidNotFound(errors.NotFoundError): - name: typing.Literal["ParameterObjectSetRidNotFound"] - parameters: ParameterObjectSetRidNotFoundParameters - error_instance_id: str - - -class ParameterTypeNotSupportedParameters(typing_extensions.TypedDict): - """ - The type of the requested parameter is not currently supported by this API. If you need support for this, - please reach out to Palantir Support. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - parameterId: ontologies_models.ParameterId - parameterBaseType: ontologies_models.ValueType - - -@dataclass -class ParameterTypeNotSupported(errors.BadRequestError): - name: typing.Literal["ParameterTypeNotSupported"] - parameters: ParameterTypeNotSupportedParameters - error_instance_id: str - - -class ParametersNotFoundParameters(typing_extensions.TypedDict): - """ - The provided parameter ID was not found for the action. Please look at the `configuredParameterIds` field - to see which ones are available. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - actionType: ontologies_models.ActionTypeApiName - unknownParameterIds: typing.List[ontologies_models.ParameterId] - configuredParameterIds: typing.List[ontologies_models.ParameterId] - - -@dataclass -class ParametersNotFound(errors.BadRequestError): - name: typing.Literal["ParametersNotFound"] - parameters: ParametersNotFoundParameters - error_instance_id: str - - -class ParentAttachmentPermissionDeniedParameters(typing_extensions.TypedDict): - """The user does not have permission to parent attachments.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class ParentAttachmentPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["ParentAttachmentPermissionDenied"] - parameters: ParentAttachmentPermissionDeniedParameters - error_instance_id: str - - -class PropertiesHaveDifferentIdsParameters(typing_extensions.TypedDict): - """Properties used in ordering must have the same ids.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - properties: typing.List[ontologies_models.SharedPropertyTypeApiName] - - -@dataclass -class PropertiesHaveDifferentIds(errors.BadRequestError): - name: typing.Literal["PropertiesHaveDifferentIds"] - parameters: PropertiesHaveDifferentIdsParameters - error_instance_id: str - - -class PropertiesNotFilterableParameters(typing_extensions.TypedDict): - """ - Results could not be filtered by the requested properties. Please mark the properties as *Searchable* and - *Selectable* in the **Ontology Manager** to be able to filter on those properties. There may be a short delay - between the time a property is marked *Searchable* and *Selectable* and when it can be used. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - properties: typing.List[ontologies_models.PropertyApiName] - - -@dataclass -class PropertiesNotFilterable(errors.BadRequestError): - name: typing.Literal["PropertiesNotFilterable"] - parameters: PropertiesNotFilterableParameters - error_instance_id: str - - -class PropertiesNotFoundParameters(typing_extensions.TypedDict): - """The requested properties are not found on the object type.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - objectType: ontologies_models.ObjectTypeApiName - properties: typing.List[ontologies_models.PropertyApiName] - - -@dataclass -class PropertiesNotFound(errors.NotFoundError): - name: typing.Literal["PropertiesNotFound"] - parameters: PropertiesNotFoundParameters - error_instance_id: str - - -class PropertiesNotSearchableParameters(typing_extensions.TypedDict): - """ - Search is not enabled on the specified properties. Please mark the properties as *Searchable* - in the **Ontology Manager** to enable search on them. There may be a short delay - between the time a property is marked *Searchable* and when it can be used. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - propertyApiNames: typing.List[ontologies_models.PropertyApiName] - - -@dataclass -class PropertiesNotSearchable(errors.BadRequestError): - name: typing.Literal["PropertiesNotSearchable"] - parameters: PropertiesNotSearchableParameters - error_instance_id: str - - -class PropertiesNotSortableParameters(typing_extensions.TypedDict): - """ - Results could not be ordered by the requested properties. Please mark the properties as *Searchable* and - *Sortable* in the **Ontology Manager** to enable their use in `orderBy` parameters. There may be a short delay - between the time a property is set to *Searchable* and *Sortable* and when it can be used. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - properties: typing.List[ontologies_models.PropertyApiName] - - -@dataclass -class PropertiesNotSortable(errors.BadRequestError): - name: typing.Literal["PropertiesNotSortable"] - parameters: PropertiesNotSortableParameters - error_instance_id: str - - -class PropertyApiNameNotFoundParameters(typing_extensions.TypedDict): - """ - A property that was required to have an API name, such as a primary key, is missing one. You can set an API - name for it using the **Ontology Manager**. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - propertyId: ontologies_models.PropertyId - propertyBaseType: ontologies_models.ValueType - - -@dataclass -class PropertyApiNameNotFound(errors.BadRequestError): - name: typing.Literal["PropertyApiNameNotFound"] - parameters: PropertyApiNameNotFoundParameters - error_instance_id: str - - -class PropertyBaseTypeNotSupportedParameters(typing_extensions.TypedDict): - """ - The type of the requested property is not currently supported by this API. If you need support for this, - please reach out to Palantir Support. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - objectType: ontologies_models.ObjectTypeApiName - property: ontologies_models.PropertyApiName - propertyBaseType: ontologies_models.ValueType - - -@dataclass -class PropertyBaseTypeNotSupported(errors.BadRequestError): - name: typing.Literal["PropertyBaseTypeNotSupported"] - parameters: PropertyBaseTypeNotSupportedParameters - error_instance_id: str - - -class PropertyExactMatchingNotSupportedParameters(typing_extensions.TypedDict): - """A property that does not support exact matching is used in a setting that requires exact matching.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - propertyBaseType: ontologies_models.ValueType - propertyTypeRid: typing_extensions.NotRequired[ontologies_models.PropertyTypeRid] - - -@dataclass -class PropertyExactMatchingNotSupported(errors.BadRequestError): - name: typing.Literal["PropertyExactMatchingNotSupported"] - parameters: PropertyExactMatchingNotSupportedParameters - error_instance_id: str - - -class PropertyFiltersNotSupportedParameters(typing_extensions.TypedDict): - """ - At least one of the requested property filters are not supported. See the documentation of `PropertyFilter` for - a list of supported property filters. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - propertyFilters: typing.List[ontologies_models.PropertyFilter] - property: ontologies_models.PropertyApiName - - -@dataclass -class PropertyFiltersNotSupported(errors.BadRequestError): - name: typing.Literal["PropertyFiltersNotSupported"] - parameters: PropertyFiltersNotSupportedParameters - error_instance_id: str - - -class PropertyNotFoundParameters(typing_extensions.TypedDict): - """Failed to find a provided property for a given object.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class PropertyNotFound(errors.BadRequestError): - name: typing.Literal["PropertyNotFound"] - parameters: PropertyNotFoundParameters - error_instance_id: str - - -class PropertyNotFoundOnObjectParameters(typing_extensions.TypedDict): - """Could not find the given property on the object. The user may not have permissions to see this property or it may be configured incorrectly.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - objectTypeRid: ontologies_models.ObjectTypeRid - objectRid: ontologies_models.ObjectRid - objectPropertyRid: ontologies_models.PropertyTypeRid - - -@dataclass -class PropertyNotFoundOnObject(errors.BadRequestError): - name: typing.Literal["PropertyNotFoundOnObject"] - parameters: PropertyNotFoundOnObjectParameters - error_instance_id: str - - -class PropertyTypeDoesNotSupportNearestNeighborsParameters(typing_extensions.TypedDict): - """The provided propertyIdentifier is not configured with an embedding model in the ontology.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class PropertyTypeDoesNotSupportNearestNeighbors(errors.BadRequestError): - name: typing.Literal["PropertyTypeDoesNotSupportNearestNeighbors"] - parameters: PropertyTypeDoesNotSupportNearestNeighborsParameters - error_instance_id: str - - -class PropertyTypeNotFoundParameters(typing_extensions.TypedDict): - """The requested property type is not found, or the client token does not have access to it.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - objectTypeApiName: typing_extensions.NotRequired[ontologies_models.ObjectTypeApiName] - propertyApiName: typing_extensions.NotRequired[ontologies_models.PropertyApiName] - - -@dataclass -class PropertyTypeNotFound(errors.NotFoundError): - name: typing.Literal["PropertyTypeNotFound"] - parameters: PropertyTypeNotFoundParameters - error_instance_id: str - - -class PropertyTypeRidNotFoundParameters(typing_extensions.TypedDict): - """The requested property type RID is not found, or the client token does not have access to it.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - propertyTypeRid: typing_extensions.NotRequired[ontologies_models.PropertyTypeRid] - - -@dataclass -class PropertyTypeRidNotFound(errors.NotFoundError): - name: typing.Literal["PropertyTypeRidNotFound"] - parameters: PropertyTypeRidNotFoundParameters - error_instance_id: str - - -class PropertyTypesSearchNotSupportedParameters(typing_extensions.TypedDict): - """ - The search on the property types are not supported. See the `Search Objects` documentation for - a list of supported search queries on different property types. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - parameters: typing.Dict[ - ontologies_models.PropertyFilter, typing.List[ontologies_models.PropertyApiName] - ] - - -@dataclass -class PropertyTypesSearchNotSupported(errors.BadRequestError): - name: typing.Literal["PropertyTypesSearchNotSupported"] - parameters: PropertyTypesSearchNotSupportedParameters - error_instance_id: str - - -class QueryEncounteredUserFacingErrorParameters(typing_extensions.TypedDict): - """ - The authored `Query` failed to execute because of a user induced error. The message argument - is meant to be displayed to the user. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - functionRid: ontologies_models.FunctionRid - functionVersion: ontologies_models.FunctionVersion - message: str - - -@dataclass -class QueryEncounteredUserFacingError(errors.ConflictError): - name: typing.Literal["QueryEncounteredUserFacingError"] - parameters: QueryEncounteredUserFacingErrorParameters - error_instance_id: str - - -class QueryMemoryExceededLimitParameters(typing_extensions.TypedDict): - """Memory limits were exceeded for the `Query` execution.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - functionRid: ontologies_models.FunctionRid - functionVersion: ontologies_models.FunctionVersion - - -@dataclass -class QueryMemoryExceededLimit(errors.InternalServerError): - name: typing.Literal["QueryMemoryExceededLimit"] - parameters: QueryMemoryExceededLimitParameters - error_instance_id: str - - -class QueryNotFoundParameters(typing_extensions.TypedDict): - """The query is not found, or the user does not have access to it.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - query: ontologies_models.QueryApiName - - -@dataclass -class QueryNotFound(errors.NotFoundError): - name: typing.Literal["QueryNotFound"] - parameters: QueryNotFoundParameters - error_instance_id: str - - -class QueryRuntimeErrorParameters(typing_extensions.TypedDict): - """The authored `Query` failed to execute because of a runtime error.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - functionRid: ontologies_models.FunctionRid - functionVersion: ontologies_models.FunctionVersion - message: typing_extensions.NotRequired[str] - stacktrace: typing_extensions.NotRequired[str] - parameters: typing.Dict[ontologies_models.QueryRuntimeErrorParameter, str] - - -@dataclass -class QueryRuntimeError(errors.BadRequestError): - name: typing.Literal["QueryRuntimeError"] - parameters: QueryRuntimeErrorParameters - error_instance_id: str - - -class QueryTimeExceededLimitParameters(typing_extensions.TypedDict): - """Time limits were exceeded for the `Query` execution.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - functionRid: ontologies_models.FunctionRid - functionVersion: ontologies_models.FunctionVersion - - -@dataclass -class QueryTimeExceededLimit(errors.InternalServerError): - name: typing.Literal["QueryTimeExceededLimit"] - parameters: QueryTimeExceededLimitParameters - error_instance_id: str - - -class QueryVersionNotFoundParameters(typing_extensions.TypedDict): - """The query could not be found at the provided version.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - apiName: ontologies_models.QueryApiName - version: ontologies_models.FunctionVersion - - -@dataclass -class QueryVersionNotFound(errors.NotFoundError): - name: typing.Literal["QueryVersionNotFound"] - parameters: QueryVersionNotFoundParameters - error_instance_id: str - - -class RateLimitReachedParameters(typing_extensions.TypedDict): - """Unable to decrypt this CipherText because the available rate limits in Cipher licenses were reached.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - cipherChannel: core.RID - - -@dataclass -class RateLimitReached(errors.PermissionDeniedError): - name: typing.Literal["RateLimitReached"] - parameters: RateLimitReachedParameters - error_instance_id: str - - -class SharedPropertiesNotFoundParameters(typing_extensions.TypedDict): - """The requested shared property types are not present on every object type.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - objectType: typing.List[ontologies_models.ObjectTypeApiName] - missingSharedProperties: typing.List[ontologies_models.SharedPropertyTypeApiName] - - -@dataclass -class SharedPropertiesNotFound(errors.NotFoundError): - name: typing.Literal["SharedPropertiesNotFound"] - parameters: SharedPropertiesNotFoundParameters - error_instance_id: str - - -class SharedPropertyTypeNotFoundParameters(typing_extensions.TypedDict): - """The requested shared property type is not found, or the client token does not have access to it.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - apiName: typing_extensions.NotRequired[ontologies_models.SharedPropertyTypeApiName] - rid: typing_extensions.NotRequired[ontologies_models.SharedPropertyTypeRid] - - -@dataclass -class SharedPropertyTypeNotFound(errors.NotFoundError): - name: typing.Literal["SharedPropertyTypeNotFound"] - parameters: SharedPropertyTypeNotFoundParameters - error_instance_id: str - - -class SimilarityThresholdOutOfRangeParameters(typing_extensions.TypedDict): - """The value of the similarity threshold must be in the range 0 <= threshold <= 1.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - providedThreshold: float - - -@dataclass -class SimilarityThresholdOutOfRange(errors.BadRequestError): - name: typing.Literal["SimilarityThresholdOutOfRange"] - parameters: SimilarityThresholdOutOfRangeParameters - error_instance_id: str - - -class TooManyNearestNeighborsRequestedParameters(typing_extensions.TypedDict): - """The value of numNeighbors must be in the range 1 <= numNeighbors <= 500.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - requestedNumNeighbors: int - maxNumNeighbors: int - - -@dataclass -class TooManyNearestNeighborsRequested(errors.BadRequestError): - name: typing.Literal["TooManyNearestNeighborsRequested"] - parameters: TooManyNearestNeighborsRequestedParameters - error_instance_id: str - - -class UnauthorizedCipherOperationParameters(typing_extensions.TypedDict): - """The provided token does not have permission to take a specific Cipher operation.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - cipherChannel: core.RID - - -@dataclass -class UnauthorizedCipherOperation(errors.PermissionDeniedError): - name: typing.Literal["UnauthorizedCipherOperation"] - parameters: UnauthorizedCipherOperationParameters - error_instance_id: str - - -class UndecryptableValueParameters(typing_extensions.TypedDict): - """ - The value intended for decryption with Cipher cannot be decrypted. - Ensure it is correctly formatted (CIPHER:::::CIPHER). - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - value: str - - -@dataclass -class UndecryptableValue(errors.BadRequestError): - name: typing.Literal["UndecryptableValue"] - parameters: UndecryptableValueParameters - error_instance_id: str - - -class UniqueIdentifierLinkIdsDoNotExistInActionTypeParameters(typing_extensions.TypedDict): - """ - One or more unique identifier link IDs specified in apply action overrides could not be found - in the ActionType definition. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - unknownUniqueIdentifierLinkIds: typing.List[ontologies_models.UniqueIdentifierLinkId] - - -@dataclass -class UniqueIdentifierLinkIdsDoNotExistInActionType(errors.BadRequestError): - name: typing.Literal["UniqueIdentifierLinkIdsDoNotExistInActionType"] - parameters: UniqueIdentifierLinkIdsDoNotExistInActionTypeParameters - error_instance_id: str - - -class UnknownParameterParameters(typing_extensions.TypedDict): - """ - The provided parameters were not found. Please look at the `knownParameters` field - to see which ones are available. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - unknownParameters: typing.List[ontologies_models.ParameterId] - expectedParameters: typing.List[ontologies_models.ParameterId] - - -@dataclass -class UnknownParameter(errors.BadRequestError): - name: typing.Literal["UnknownParameter"] - parameters: UnknownParameterParameters - error_instance_id: str - - -class UnsupportedInterfaceBasedObjectSetParameters(typing_extensions.TypedDict): - """Aggregations on interface-based object sets are not supported for object sets with OSv1 objects.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - interfaceType: ontologies_models.InterfaceTypeApiName - - -@dataclass -class UnsupportedInterfaceBasedObjectSet(errors.BadRequestError): - name: typing.Literal["UnsupportedInterfaceBasedObjectSet"] - parameters: UnsupportedInterfaceBasedObjectSetParameters - error_instance_id: str - - -class UnsupportedObjectSetParameters(typing_extensions.TypedDict): - """The requested object set is not supported.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class UnsupportedObjectSet(errors.BadRequestError): - name: typing.Literal["UnsupportedObjectSet"] - parameters: UnsupportedObjectSetParameters - error_instance_id: str - - -class ValueTypeNotFoundParameters(typing_extensions.TypedDict): - """The value type is not found, or the user does not have access to it.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - valueType: typing_extensions.NotRequired[ontologies_models.ValueTypeApiName] - rid: typing_extensions.NotRequired[ontologies_models.ValueTypeRid] - - -@dataclass -class ValueTypeNotFound(errors.NotFoundError): - name: typing.Literal["ValueTypeNotFound"] - parameters: ValueTypeNotFoundParameters - error_instance_id: str - - -class ViewObjectPermissionDeniedParameters(typing_extensions.TypedDict): - """ - The provided token does not have permission to view any data sources backing this object type. Ensure the object - type has backing data sources configured and visible. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - objectType: ontologies_models.ObjectTypeApiName - - -@dataclass -class ViewObjectPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["ViewObjectPermissionDenied"] - parameters: ViewObjectPermissionDeniedParameters - error_instance_id: str - - -__all__ = [ - "ActionContainsDuplicateEdits", - "ActionEditedPropertiesNotFound", - "ActionEditsReadOnlyEntity", - "ActionNotFound", - "ActionParameterInterfaceTypeNotFound", - "ActionParameterObjectNotFound", - "ActionParameterObjectTypeNotFound", - "ActionTypeNotFound", - "ActionValidationFailed", - "AggregationAccuracyNotSupported", - "AggregationGroupCountExceededLimit", - "AggregationMemoryExceededLimit", - "AggregationNestedObjectSetSizeExceededLimit", - "ApplyActionFailed", - "AttachmentNotFound", - "AttachmentRidAlreadyExists", - "AttachmentSizeExceededLimit", - "CipherChannelNotFound", - "CompositePrimaryKeyNotSupported", - "ConsistentSnapshotError", - "DefaultAndNullGroupsNotSupported", - "DerivedPropertyApiNamesNotUnique", - "DuplicateOrderBy", - "EditObjectPermissionDenied", - "FunctionEncounteredUserFacingError", - "FunctionExecutionFailed", - "FunctionExecutionTimedOut", - "FunctionInvalidInput", - "HighScaleComputationNotEnabled", - "InterfaceBasedObjectSetNotSupported", - "InterfaceLinkTypeNotFound", - "InterfacePropertiesHaveDifferentIds", - "InterfacePropertiesNotFound", - "InterfacePropertyNotFound", - "InterfaceTypeNotFound", - "InterfaceTypesNotFound", - "InvalidAggregationOrdering", - "InvalidAggregationOrderingWithNullValues", - "InvalidAggregationRange", - "InvalidAggregationRangePropertyType", - "InvalidAggregationRangePropertyTypeForInterface", - "InvalidAggregationRangeValue", - "InvalidAggregationRangeValueForInterface", - "InvalidApplyActionOptionCombination", - "InvalidContentLength", - "InvalidContentType", - "InvalidDerivedPropertyDefinition", - "InvalidDurationGroupByPropertyType", - "InvalidDurationGroupByPropertyTypeForInterface", - "InvalidDurationGroupByValue", - "InvalidFields", - "InvalidGroupId", - "InvalidOrderType", - "InvalidParameterValue", - "InvalidPropertyFilterValue", - "InvalidPropertyFiltersCombination", - "InvalidPropertyType", - "InvalidPropertyValue", - "InvalidQueryOutputValue", - "InvalidQueryParameterValue", - "InvalidRangeQuery", - "InvalidSortOrder", - "InvalidSortType", - "InvalidTransactionEditPropertyValue", - "InvalidUserId", - "InvalidVectorDimension", - "LinkAlreadyExists", - "LinkTypeNotFound", - "LinkedObjectNotFound", - "LoadObjectSetLinksNotSupported", - "MalformedPropertyFilters", - "MarketplaceActionMappingNotFound", - "MarketplaceInstallationNotFound", - "MarketplaceLinkMappingNotFound", - "MarketplaceObjectMappingNotFound", - "MarketplaceQueryMappingNotFound", - "MarketplaceSdkActionMappingNotFound", - "MarketplaceSdkInstallationNotFound", - "MarketplaceSdkLinkMappingNotFound", - "MarketplaceSdkObjectMappingNotFound", - "MarketplaceSdkPropertyMappingNotFound", - "MarketplaceSdkQueryMappingNotFound", - "MissingParameter", - "MultipleGroupByOnFieldNotSupported", - "MultiplePropertyValuesNotSupported", - "NotCipherFormatted", - "ObjectAlreadyExists", - "ObjectChanged", - "ObjectNotFound", - "ObjectSetNotFound", - "ObjectTypeNotFound", - "ObjectTypeNotSynced", - "ObjectTypesNotSynced", - "ObjectsExceededLimit", - "ObjectsModifiedConcurrently", - "OntologyApiNameNotUnique", - "OntologyEditsExceededLimit", - "OntologyNotFound", - "OntologySyncing", - "OntologySyncingObjectTypes", - "ParameterObjectNotFound", - "ParameterObjectSetRidNotFound", - "ParameterTypeNotSupported", - "ParametersNotFound", - "ParentAttachmentPermissionDenied", - "PropertiesHaveDifferentIds", - "PropertiesNotFilterable", - "PropertiesNotFound", - "PropertiesNotSearchable", - "PropertiesNotSortable", - "PropertyApiNameNotFound", - "PropertyBaseTypeNotSupported", - "PropertyExactMatchingNotSupported", - "PropertyFiltersNotSupported", - "PropertyNotFound", - "PropertyNotFoundOnObject", - "PropertyTypeDoesNotSupportNearestNeighbors", - "PropertyTypeNotFound", - "PropertyTypeRidNotFound", - "PropertyTypesSearchNotSupported", - "QueryEncounteredUserFacingError", - "QueryMemoryExceededLimit", - "QueryNotFound", - "QueryRuntimeError", - "QueryTimeExceededLimit", - "QueryVersionNotFound", - "RateLimitReached", - "SharedPropertiesNotFound", - "SharedPropertyTypeNotFound", - "SimilarityThresholdOutOfRange", - "TooManyNearestNeighborsRequested", - "UnauthorizedCipherOperation", - "UndecryptableValue", - "UniqueIdentifierLinkIdsDoNotExistInActionType", - "UnknownParameter", - "UnsupportedInterfaceBasedObjectSet", - "UnsupportedObjectSet", - "ValueTypeNotFound", - "ViewObjectPermissionDenied", -] diff --git a/foundry_sdk/v2/ontologies/linked_object.py b/foundry_sdk/v2/ontologies/linked_object.py deleted file mode 100644 index 3692c0655..000000000 --- a/foundry_sdk/v2/ontologies/linked_object.py +++ /dev/null @@ -1,482 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing - -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v2.core import models as core_models -from foundry_sdk.v2.ontologies import models as ontologies_models - - -class LinkedObjectClient: - """ - The API client for the LinkedObject Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _LinkedObjectClientStreaming(self) - self.with_raw_response = _LinkedObjectClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get_linked_object( - self, - ontology: ontologies_models.OntologyIdentifier, - object_type: ontologies_models.ObjectTypeApiName, - primary_key: ontologies_models.PropertyValueEscapedString, - link_type: ontologies_models.LinkTypeApiName, - linked_object_primary_key: ontologies_models.PropertyValueEscapedString, - *, - branch: typing.Optional[core_models.FoundryBranch] = None, - exclude_rid: typing.Optional[bool] = None, - sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, - sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, - select: typing.Optional[typing.List[ontologies_models.SelectedPropertyApiName]] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> ontologies_models.OntologyObjectV2: - """ - Get a specific linked object that originates from another object. - - If there is no link between the two objects, `LinkedObjectNotFound` is thrown. - - :param ontology: - :type ontology: OntologyIdentifier - :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. - :type object_type: ObjectTypeApiName - :param primary_key: The primary key of the object from which the links originate. To look up the expected primary key for your object type, use the `Get object type` endpoint or the **Ontology Manager**. - :type primary_key: PropertyValueEscapedString - :param link_type: The API name of the link that exists between the object and the requested objects. To find the API name for your link type, check the **Ontology Manager**. - :type link_type: LinkTypeApiName - :param linked_object_primary_key: The primary key of the requested linked object. To look up the expected primary key for your object type, use the `Get object type` endpoint (passing the linked object type) or the **Ontology Manager**. - :type linked_object_primary_key: PropertyValueEscapedString - :param branch: The Foundry branch to load the object set for multiple object types. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported. - :type branch: Optional[FoundryBranch] - :param exclude_rid: A flag to exclude the retrieval of the `__rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2. - :type exclude_rid: Optional[bool] - :param sdk_package_rid: The package rid of the generated SDK. - :type sdk_package_rid: Optional[SdkPackageRid] - :param sdk_version: The version of the generated SDK. - :type sdk_version: Optional[SdkVersion] - :param select: The properties of the object type that should be included in the response. Omit this parameter to get all the properties. - :type select: Optional[List[SelectedPropertyApiName]] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: ontologies_models.OntologyObjectV2 - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/links/{linkType}/{linkedObjectPrimaryKey}", - query_params={ - "branch": branch, - "excludeRid": exclude_rid, - "sdkPackageRid": sdk_package_rid, - "sdkVersion": sdk_version, - "select": select, - }, - path_params={ - "ontology": ontology, - "objectType": object_type, - "primaryKey": primary_key, - "linkType": link_type, - "linkedObjectPrimaryKey": linked_object_primary_key, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.OntologyObjectV2, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def list_linked_objects( - self, - ontology: ontologies_models.OntologyIdentifier, - object_type: ontologies_models.ObjectTypeApiName, - primary_key: ontologies_models.PropertyValueEscapedString, - link_type: ontologies_models.LinkTypeApiName, - *, - branch: typing.Optional[core_models.FoundryBranch] = None, - exclude_rid: typing.Optional[bool] = None, - order_by: typing.Optional[ontologies_models.OrderBy] = None, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, - sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, - select: typing.Optional[typing.List[ontologies_models.SelectedPropertyApiName]] = None, - snapshot: typing.Optional[bool] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.ResourceIterator[ontologies_models.OntologyObjectV2]: - """ - Lists the linked objects for a specific object and the given link type. - - Note that this endpoint does not guarantee consistency. Changes to the data could result in missing or - repeated objects in the response pages. - - For Object Storage V1 backed objects, this endpoint returns a maximum of 10,000 objects. After 10,000 objects have been returned and if more objects - are available, attempting to load another page will result in an `ObjectsExceededLimit` error being returned. There is no limit on Object Storage V2 backed objects. - - Each page may be smaller or larger than the requested page size. However, it - is guaranteed that if there are more results available, at least one result will be present - in the response. - - Note that null value properties will not be returned. - - :param ontology: - :type ontology: OntologyIdentifier - :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. - :type object_type: ObjectTypeApiName - :param primary_key: The primary key of the object from which the links originate. To look up the expected primary key for your object type, use the `Get object type` endpoint or the **Ontology Manager**. - :type primary_key: PropertyValueEscapedString - :param link_type: The API name of the link that exists between the object and the requested objects. To find the API name for your link type, check the **Ontology Manager**. - :type link_type: LinkTypeApiName - :param branch: The Foundry branch to list linked objects from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. - :type branch: Optional[FoundryBranch] - :param exclude_rid: A flag to exclude the retrieval of the `__rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2. - :type exclude_rid: Optional[bool] - :param order_by: - :type order_by: Optional[OrderBy] - :param page_size: The desired size of the page to be returned. Defaults to 1,000. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. - :type page_size: Optional[PageSize] - :param page_token: - :type page_token: Optional[PageToken] - :param sdk_package_rid: The package rid of the generated SDK. - :type sdk_package_rid: Optional[SdkPackageRid] - :param sdk_version: The version of the generated SDK. - :type sdk_version: Optional[SdkVersion] - :param select: The properties of the object type that should be included in the response. Omit this parameter to get all the properties. - :type select: Optional[List[SelectedPropertyApiName]] - :param snapshot: A flag to use snapshot consistency when paging. Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. This defaults to false if not specified, which means you will always get the latest results. - :type snapshot: Optional[bool] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.ResourceIterator[ontologies_models.OntologyObjectV2] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/links/{linkType}", - query_params={ - "branch": branch, - "excludeRid": exclude_rid, - "orderBy": order_by, - "pageSize": page_size, - "pageToken": page_token, - "sdkPackageRid": sdk_package_rid, - "sdkVersion": sdk_version, - "select": select, - "snapshot": snapshot, - }, - path_params={ - "ontology": ontology, - "objectType": object_type, - "primaryKey": primary_key, - "linkType": link_type, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.ListLinkedObjectsResponseV2, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - -class _LinkedObjectClientRaw: - def __init__(self, client: LinkedObjectClient) -> None: - def get_linked_object(_: ontologies_models.OntologyObjectV2): ... - def list_linked_objects(_: ontologies_models.ListLinkedObjectsResponseV2): ... - - self.get_linked_object = core.with_raw_response(get_linked_object, client.get_linked_object) - self.list_linked_objects = core.with_raw_response( - list_linked_objects, client.list_linked_objects - ) - - -class _LinkedObjectClientStreaming: - def __init__(self, client: LinkedObjectClient) -> None: - def get_linked_object(_: ontologies_models.OntologyObjectV2): ... - def list_linked_objects(_: ontologies_models.ListLinkedObjectsResponseV2): ... - - self.get_linked_object = core.with_streaming_response( - get_linked_object, client.get_linked_object - ) - self.list_linked_objects = core.with_streaming_response( - list_linked_objects, client.list_linked_objects - ) - - -class AsyncLinkedObjectClient: - """ - The API client for the LinkedObject Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AsyncLinkedObjectClientStreaming(self) - self.with_raw_response = _AsyncLinkedObjectClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get_linked_object( - self, - ontology: ontologies_models.OntologyIdentifier, - object_type: ontologies_models.ObjectTypeApiName, - primary_key: ontologies_models.PropertyValueEscapedString, - link_type: ontologies_models.LinkTypeApiName, - linked_object_primary_key: ontologies_models.PropertyValueEscapedString, - *, - branch: typing.Optional[core_models.FoundryBranch] = None, - exclude_rid: typing.Optional[bool] = None, - sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, - sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, - select: typing.Optional[typing.List[ontologies_models.SelectedPropertyApiName]] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[ontologies_models.OntologyObjectV2]: - """ - Get a specific linked object that originates from another object. - - If there is no link between the two objects, `LinkedObjectNotFound` is thrown. - - :param ontology: - :type ontology: OntologyIdentifier - :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. - :type object_type: ObjectTypeApiName - :param primary_key: The primary key of the object from which the links originate. To look up the expected primary key for your object type, use the `Get object type` endpoint or the **Ontology Manager**. - :type primary_key: PropertyValueEscapedString - :param link_type: The API name of the link that exists between the object and the requested objects. To find the API name for your link type, check the **Ontology Manager**. - :type link_type: LinkTypeApiName - :param linked_object_primary_key: The primary key of the requested linked object. To look up the expected primary key for your object type, use the `Get object type` endpoint (passing the linked object type) or the **Ontology Manager**. - :type linked_object_primary_key: PropertyValueEscapedString - :param branch: The Foundry branch to load the object set for multiple object types. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported. - :type branch: Optional[FoundryBranch] - :param exclude_rid: A flag to exclude the retrieval of the `__rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2. - :type exclude_rid: Optional[bool] - :param sdk_package_rid: The package rid of the generated SDK. - :type sdk_package_rid: Optional[SdkPackageRid] - :param sdk_version: The version of the generated SDK. - :type sdk_version: Optional[SdkVersion] - :param select: The properties of the object type that should be included in the response. Omit this parameter to get all the properties. - :type select: Optional[List[SelectedPropertyApiName]] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[ontologies_models.OntologyObjectV2] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/links/{linkType}/{linkedObjectPrimaryKey}", - query_params={ - "branch": branch, - "excludeRid": exclude_rid, - "sdkPackageRid": sdk_package_rid, - "sdkVersion": sdk_version, - "select": select, - }, - path_params={ - "ontology": ontology, - "objectType": object_type, - "primaryKey": primary_key, - "linkType": link_type, - "linkedObjectPrimaryKey": linked_object_primary_key, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.OntologyObjectV2, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def list_linked_objects( - self, - ontology: ontologies_models.OntologyIdentifier, - object_type: ontologies_models.ObjectTypeApiName, - primary_key: ontologies_models.PropertyValueEscapedString, - link_type: ontologies_models.LinkTypeApiName, - *, - branch: typing.Optional[core_models.FoundryBranch] = None, - exclude_rid: typing.Optional[bool] = None, - order_by: typing.Optional[ontologies_models.OrderBy] = None, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, - sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, - select: typing.Optional[typing.List[ontologies_models.SelectedPropertyApiName]] = None, - snapshot: typing.Optional[bool] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.AsyncResourceIterator[ontologies_models.OntologyObjectV2]: - """ - Lists the linked objects for a specific object and the given link type. - - Note that this endpoint does not guarantee consistency. Changes to the data could result in missing or - repeated objects in the response pages. - - For Object Storage V1 backed objects, this endpoint returns a maximum of 10,000 objects. After 10,000 objects have been returned and if more objects - are available, attempting to load another page will result in an `ObjectsExceededLimit` error being returned. There is no limit on Object Storage V2 backed objects. - - Each page may be smaller or larger than the requested page size. However, it - is guaranteed that if there are more results available, at least one result will be present - in the response. - - Note that null value properties will not be returned. - - :param ontology: - :type ontology: OntologyIdentifier - :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. - :type object_type: ObjectTypeApiName - :param primary_key: The primary key of the object from which the links originate. To look up the expected primary key for your object type, use the `Get object type` endpoint or the **Ontology Manager**. - :type primary_key: PropertyValueEscapedString - :param link_type: The API name of the link that exists between the object and the requested objects. To find the API name for your link type, check the **Ontology Manager**. - :type link_type: LinkTypeApiName - :param branch: The Foundry branch to list linked objects from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. - :type branch: Optional[FoundryBranch] - :param exclude_rid: A flag to exclude the retrieval of the `__rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2. - :type exclude_rid: Optional[bool] - :param order_by: - :type order_by: Optional[OrderBy] - :param page_size: The desired size of the page to be returned. Defaults to 1,000. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. - :type page_size: Optional[PageSize] - :param page_token: - :type page_token: Optional[PageToken] - :param sdk_package_rid: The package rid of the generated SDK. - :type sdk_package_rid: Optional[SdkPackageRid] - :param sdk_version: The version of the generated SDK. - :type sdk_version: Optional[SdkVersion] - :param select: The properties of the object type that should be included in the response. Omit this parameter to get all the properties. - :type select: Optional[List[SelectedPropertyApiName]] - :param snapshot: A flag to use snapshot consistency when paging. Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. This defaults to false if not specified, which means you will always get the latest results. - :type snapshot: Optional[bool] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.AsyncResourceIterator[ontologies_models.OntologyObjectV2] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/links/{linkType}", - query_params={ - "branch": branch, - "excludeRid": exclude_rid, - "orderBy": order_by, - "pageSize": page_size, - "pageToken": page_token, - "sdkPackageRid": sdk_package_rid, - "sdkVersion": sdk_version, - "select": select, - "snapshot": snapshot, - }, - path_params={ - "ontology": ontology, - "objectType": object_type, - "primaryKey": primary_key, - "linkType": link_type, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.ListLinkedObjectsResponseV2, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - -class _AsyncLinkedObjectClientRaw: - def __init__(self, client: AsyncLinkedObjectClient) -> None: - def get_linked_object(_: ontologies_models.OntologyObjectV2): ... - def list_linked_objects(_: ontologies_models.ListLinkedObjectsResponseV2): ... - - self.get_linked_object = core.async_with_raw_response( - get_linked_object, client.get_linked_object - ) - self.list_linked_objects = core.async_with_raw_response( - list_linked_objects, client.list_linked_objects - ) - - -class _AsyncLinkedObjectClientStreaming: - def __init__(self, client: AsyncLinkedObjectClient) -> None: - def get_linked_object(_: ontologies_models.OntologyObjectV2): ... - def list_linked_objects(_: ontologies_models.ListLinkedObjectsResponseV2): ... - - self.get_linked_object = core.async_with_streaming_response( - get_linked_object, client.get_linked_object - ) - self.list_linked_objects = core.async_with_streaming_response( - list_linked_objects, client.list_linked_objects - ) diff --git a/foundry_sdk/v2/ontologies/media_reference_property.py b/foundry_sdk/v2/ontologies/media_reference_property.py deleted file mode 100644 index e963d0692..000000000 --- a/foundry_sdk/v2/ontologies/media_reference_property.py +++ /dev/null @@ -1,514 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing - -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v2.core import models as core_models -from foundry_sdk.v2.ontologies import models as ontologies_models - - -class MediaReferencePropertyClient: - """ - The API client for the MediaReferenceProperty Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _MediaReferencePropertyClientStreaming(self) - self.with_raw_response = _MediaReferencePropertyClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get_media_content( - self, - ontology: ontologies_models.OntologyIdentifier, - object_type: ontologies_models.ObjectTypeApiName, - primary_key: ontologies_models.PropertyValueEscapedString, - property: ontologies_models.PropertyApiName, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, - sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> bytes: - """ - Gets the content of a media item referenced by this property. - - :param ontology: - :type ontology: OntologyIdentifier - :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. - :type object_type: ObjectTypeApiName - :param primary_key: The primary key of the object with the media reference property. - :type primary_key: PropertyValueEscapedString - :param property: The API name of the media reference property. To find the API name, check the **Ontology Manager** or use the **Get object type** endpoint. - :type property: PropertyApiName - :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. - :type preview: Optional[PreviewMode] - :param sdk_package_rid: The package rid of the generated SDK. - :type sdk_package_rid: Optional[SdkPackageRid] - :param sdk_version: The version of the generated SDK. - :type sdk_version: Optional[SdkVersion] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: bytes - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/media/{property}/content", - query_params={ - "preview": preview, - "sdkPackageRid": sdk_package_rid, - "sdkVersion": sdk_version, - }, - path_params={ - "ontology": ontology, - "objectType": object_type, - "primaryKey": primary_key, - "property": property, - }, - header_params={ - "Accept": "*/*", - }, - body=None, - response_type=bytes, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get_media_metadata( - self, - ontology: ontologies_models.OntologyIdentifier, - object_type: ontologies_models.ObjectTypeApiName, - primary_key: ontologies_models.PropertyValueEscapedString, - property: ontologies_models.PropertyApiName, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, - sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> ontologies_models.MediaMetadata: - """ - Gets metadata about the media item referenced by this property. - - :param ontology: - :type ontology: OntologyIdentifier - :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. - :type object_type: ObjectTypeApiName - :param primary_key: The primary key of the object with the media reference property. - :type primary_key: PropertyValueEscapedString - :param property: The API name of the media reference backed property. To find the API name, check the **Ontology Manager** or use the **Get object type** endpoint. - :type property: PropertyApiName - :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. - :type preview: Optional[PreviewMode] - :param sdk_package_rid: The package rid of the generated SDK. - :type sdk_package_rid: Optional[SdkPackageRid] - :param sdk_version: The version of the generated SDK. - :type sdk_version: Optional[SdkVersion] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: ontologies_models.MediaMetadata - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/media/{property}/metadata", - query_params={ - "preview": preview, - "sdkPackageRid": sdk_package_rid, - "sdkVersion": sdk_version, - }, - path_params={ - "ontology": ontology, - "objectType": object_type, - "primaryKey": primary_key, - "property": property, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.MediaMetadata, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def upload( - self, - ontology: ontologies_models.OntologyIdentifier, - object_type: ontologies_models.ObjectTypeApiName, - property: ontologies_models.PropertyApiName, - body: bytes, - *, - media_item_path: typing.Optional[core_models.MediaItemPath] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core_models.MediaReference: - """ - Uploads a media item to the media set which backs the specified property. The property must be backed by a single media set and branch, otherwise an error will be thrown. - The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`. - - :param ontology: - :type ontology: OntologyIdentifier - :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. - :type object_type: ObjectTypeApiName - :param property: The API name of the media reference property. To find the API name, check the **Ontology Manager** or use the **Get object type** endpoint. - :type property: PropertyApiName - :param body: Body of the request - :type body: bytes - :param media_item_path: A path for the media item within its backing media set. Required if the backing media set requires paths. - :type media_item_path: Optional[MediaItemPath] - :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core_models.MediaReference - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/ontologies/{ontology}/objectTypes/{objectType}/media/{property}/upload", - query_params={ - "mediaItemPath": media_item_path, - "preview": preview, - }, - path_params={ - "ontology": ontology, - "objectType": object_type, - "property": property, - }, - header_params={ - "Content-Type": "*/*", - "Accept": "application/json", - }, - body=body, - response_type=core_models.MediaReference, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _MediaReferencePropertyClientRaw: - def __init__(self, client: MediaReferencePropertyClient) -> None: - def get_media_content(_: bytes): ... - def get_media_metadata(_: ontologies_models.MediaMetadata): ... - def upload(_: core_models.MediaReference): ... - - self.get_media_content = core.with_raw_response(get_media_content, client.get_media_content) - self.get_media_metadata = core.with_raw_response( - get_media_metadata, client.get_media_metadata - ) - self.upload = core.with_raw_response(upload, client.upload) - - -class _MediaReferencePropertyClientStreaming: - def __init__(self, client: MediaReferencePropertyClient) -> None: - def get_media_content(_: bytes): ... - def get_media_metadata(_: ontologies_models.MediaMetadata): ... - def upload(_: core_models.MediaReference): ... - - self.get_media_content = core.with_streaming_response( - get_media_content, client.get_media_content - ) - self.get_media_metadata = core.with_streaming_response( - get_media_metadata, client.get_media_metadata - ) - self.upload = core.with_streaming_response(upload, client.upload) - - -class AsyncMediaReferencePropertyClient: - """ - The API client for the MediaReferenceProperty Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AsyncMediaReferencePropertyClientStreaming(self) - self.with_raw_response = _AsyncMediaReferencePropertyClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get_media_content( - self, - ontology: ontologies_models.OntologyIdentifier, - object_type: ontologies_models.ObjectTypeApiName, - primary_key: ontologies_models.PropertyValueEscapedString, - property: ontologies_models.PropertyApiName, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, - sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[bytes]: - """ - Gets the content of a media item referenced by this property. - - :param ontology: - :type ontology: OntologyIdentifier - :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. - :type object_type: ObjectTypeApiName - :param primary_key: The primary key of the object with the media reference property. - :type primary_key: PropertyValueEscapedString - :param property: The API name of the media reference property. To find the API name, check the **Ontology Manager** or use the **Get object type** endpoint. - :type property: PropertyApiName - :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. - :type preview: Optional[PreviewMode] - :param sdk_package_rid: The package rid of the generated SDK. - :type sdk_package_rid: Optional[SdkPackageRid] - :param sdk_version: The version of the generated SDK. - :type sdk_version: Optional[SdkVersion] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[bytes] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/media/{property}/content", - query_params={ - "preview": preview, - "sdkPackageRid": sdk_package_rid, - "sdkVersion": sdk_version, - }, - path_params={ - "ontology": ontology, - "objectType": object_type, - "primaryKey": primary_key, - "property": property, - }, - header_params={ - "Accept": "*/*", - }, - body=None, - response_type=bytes, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get_media_metadata( - self, - ontology: ontologies_models.OntologyIdentifier, - object_type: ontologies_models.ObjectTypeApiName, - primary_key: ontologies_models.PropertyValueEscapedString, - property: ontologies_models.PropertyApiName, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, - sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[ontologies_models.MediaMetadata]: - """ - Gets metadata about the media item referenced by this property. - - :param ontology: - :type ontology: OntologyIdentifier - :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. - :type object_type: ObjectTypeApiName - :param primary_key: The primary key of the object with the media reference property. - :type primary_key: PropertyValueEscapedString - :param property: The API name of the media reference backed property. To find the API name, check the **Ontology Manager** or use the **Get object type** endpoint. - :type property: PropertyApiName - :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. - :type preview: Optional[PreviewMode] - :param sdk_package_rid: The package rid of the generated SDK. - :type sdk_package_rid: Optional[SdkPackageRid] - :param sdk_version: The version of the generated SDK. - :type sdk_version: Optional[SdkVersion] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[ontologies_models.MediaMetadata] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/media/{property}/metadata", - query_params={ - "preview": preview, - "sdkPackageRid": sdk_package_rid, - "sdkVersion": sdk_version, - }, - path_params={ - "ontology": ontology, - "objectType": object_type, - "primaryKey": primary_key, - "property": property, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.MediaMetadata, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def upload( - self, - ontology: ontologies_models.OntologyIdentifier, - object_type: ontologies_models.ObjectTypeApiName, - property: ontologies_models.PropertyApiName, - body: bytes, - *, - media_item_path: typing.Optional[core_models.MediaItemPath] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[core_models.MediaReference]: - """ - Uploads a media item to the media set which backs the specified property. The property must be backed by a single media set and branch, otherwise an error will be thrown. - The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`. - - :param ontology: - :type ontology: OntologyIdentifier - :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. - :type object_type: ObjectTypeApiName - :param property: The API name of the media reference property. To find the API name, check the **Ontology Manager** or use the **Get object type** endpoint. - :type property: PropertyApiName - :param body: Body of the request - :type body: bytes - :param media_item_path: A path for the media item within its backing media set. Required if the backing media set requires paths. - :type media_item_path: Optional[MediaItemPath] - :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[core_models.MediaReference] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/ontologies/{ontology}/objectTypes/{objectType}/media/{property}/upload", - query_params={ - "mediaItemPath": media_item_path, - "preview": preview, - }, - path_params={ - "ontology": ontology, - "objectType": object_type, - "property": property, - }, - header_params={ - "Content-Type": "*/*", - "Accept": "application/json", - }, - body=body, - response_type=core_models.MediaReference, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _AsyncMediaReferencePropertyClientRaw: - def __init__(self, client: AsyncMediaReferencePropertyClient) -> None: - def get_media_content(_: bytes): ... - def get_media_metadata(_: ontologies_models.MediaMetadata): ... - def upload(_: core_models.MediaReference): ... - - self.get_media_content = core.async_with_raw_response( - get_media_content, client.get_media_content - ) - self.get_media_metadata = core.async_with_raw_response( - get_media_metadata, client.get_media_metadata - ) - self.upload = core.async_with_raw_response(upload, client.upload) - - -class _AsyncMediaReferencePropertyClientStreaming: - def __init__(self, client: AsyncMediaReferencePropertyClient) -> None: - def get_media_content(_: bytes): ... - def get_media_metadata(_: ontologies_models.MediaMetadata): ... - def upload(_: core_models.MediaReference): ... - - self.get_media_content = core.async_with_streaming_response( - get_media_content, client.get_media_content - ) - self.get_media_metadata = core.async_with_streaming_response( - get_media_metadata, client.get_media_metadata - ) - self.upload = core.async_with_streaming_response(upload, client.upload) diff --git a/foundry_sdk/v2/ontologies/models.py b/foundry_sdk/v2/ontologies/models.py deleted file mode 100644 index e1813d5f0..000000000 --- a/foundry_sdk/v2/ontologies/models.py +++ /dev/null @@ -1,5170 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -from __future__ import annotations - -import typing - -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk.v2.core import models as core_models -from foundry_sdk.v2.geo import models as geo_models - - -class AbsoluteTimeRange(core.ModelBase): - """ISO 8601 timestamps forming a range for a time series query. Start is inclusive and end is exclusive.""" - - start_time: typing.Optional[core.AwareDatetime] = pydantic.Field(alias=str("startTime"), default=None) # type: ignore[literal-required] - end_time: typing.Optional[core.AwareDatetime] = pydantic.Field(alias=str("endTime"), default=None) # type: ignore[literal-required] - type: typing.Literal["absolute"] = "absolute" - - -class AbsoluteValuePropertyExpression(core.ModelBase): - """Calculates absolute value of a numeric value.""" - - property: DerivedPropertyDefinition - type: typing.Literal["absoluteValue"] = "absoluteValue" - - -ActionExecutionTime = core.AwareDatetime -"""An ISO 8601 timestamp.""" - - -ActionLogicRule = typing_extensions.Annotated[ - typing.Union[ - "ModifyInterfaceLogicRule", - "CreateOrModifyObjectLogicRule", - "ModifyObjectLogicRule", - "DeleteLinkLogicRule", - "CreateObjectLogicRule", - "CreateLinkLogicRule", - "BatchedFunctionLogicRule", - "CreateOrModifyObjectLogicRuleV2", - "DeleteInterfaceLinkLogicRule", - "DeleteObjectLogicRule", - "FunctionLogicRule", - "CreateInterfaceLinkLogicRule", - "CreateInterfaceLogicRule", - ], - pydantic.Field(discriminator="type"), -] -"""A detailed operation for an Action""" - - -class ActionParameterArrayType(core.ModelBase): - """ActionParameterArrayType""" - - sub_type: ActionParameterType = pydantic.Field(alias=str("subType")) # type: ignore[literal-required] - type: typing.Literal["array"] = "array" - - -ActionParameterType = typing_extensions.Annotated[ - typing.Union[ - core_models.DateType, - "OntologyInterfaceObjectType", - "OntologyStructType", - core_models.StringType, - core_models.DoubleType, - core_models.IntegerType, - core_models.GeoShapeType, - core_models.LongType, - "OntologyObjectTypeReferenceType", - core_models.BooleanType, - core_models.MarkingType, - core_models.AttachmentType, - core_models.MediaReferenceType, - "ActionParameterArrayType", - "OntologyObjectSetType", - core_models.GeohashType, - core_models.VectorType, - "OntologyObjectType", - core_models.TimestampType, - ], - pydantic.Field(discriminator="type"), -] -"""A union of all the types supported by Ontology Action parameters.""" - - -class ActionParameterV2(core.ModelBase): - """Details about a parameter of an action.""" - - display_name: core_models.DisplayName = pydantic.Field(alias=str("displayName")) # type: ignore[literal-required] - description: typing.Optional[str] = None - data_type: ActionParameterType = pydantic.Field(alias=str("dataType")) # type: ignore[literal-required] - required: bool - - -ActionResults = typing_extensions.Annotated[ - typing.Union["ObjectEdits", "ObjectTypeEdits"], pydantic.Field(discriminator="type") -] -"""ActionResults""" - - -ActionRid = core.RID -"""The unique resource identifier for an action.""" - - -ActionTypeApiName = str -""" -The name of the action type in the API. To find the API name for your Action Type, use the `List action types` -endpoint or check the **Ontology Manager**. -""" - - -class ActionTypeFullMetadata(core.ModelBase): - """Returns the full metadata for an Action type in the Ontology.""" - - action_type: ActionTypeV2 = pydantic.Field(alias=str("actionType")) # type: ignore[literal-required] - full_logic_rules: typing.List[ActionLogicRule] = pydantic.Field(alias=str("fullLogicRules")) # type: ignore[literal-required] - - -ActionTypeRid = core.RID -"""The unique resource identifier of an action type, useful for interacting with other Foundry APIs.""" - - -class ActionTypeV2(core.ModelBase): - """Represents an action type in the Ontology.""" - - api_name: ActionTypeApiName = pydantic.Field(alias=str("apiName")) # type: ignore[literal-required] - description: typing.Optional[str] = None - display_name: typing.Optional[core_models.DisplayName] = pydantic.Field(alias=str("displayName"), default=None) # type: ignore[literal-required] - status: core_models.ReleaseStatus - parameters: typing.Dict[ParameterId, ActionParameterV2] - rid: ActionTypeRid - operations: typing.List[LogicRule] - tool_description: typing.Optional[str] = pydantic.Field(alias=str("toolDescription"), default=None) # type: ignore[literal-required] - """Optional description intended for tool use contexts, such as AI agents.""" - - -class ActivePropertyTypeStatus(core.ModelBase): - """ - This status indicates that the PropertyType will not change on short notice and should thus be safe to use in - user facing workflows. - """ - - type: typing.Literal["active"] = "active" - - -class AddLink(core.ModelBase): - """AddLink""" - - link_type_api_name_ato_b: LinkTypeApiName = pydantic.Field(alias=str("linkTypeApiNameAtoB")) # type: ignore[literal-required] - link_type_api_name_bto_a: LinkTypeApiName = pydantic.Field(alias=str("linkTypeApiNameBtoA")) # type: ignore[literal-required] - a_side_object: LinkSideObject = pydantic.Field(alias=str("aSideObject")) # type: ignore[literal-required] - b_side_object: LinkSideObject = pydantic.Field(alias=str("bSideObject")) # type: ignore[literal-required] - type: typing.Literal["addLink"] = "addLink" - - -class AddLinkEdit(core.ModelBase): - """AddLinkEdit""" - - object_type: ObjectTypeApiName = pydantic.Field(alias=str("objectType")) # type: ignore[literal-required] - primary_key: PrimaryKeyValue = pydantic.Field(alias=str("primaryKey")) # type: ignore[literal-required] - link_type: LinkTypeApiName = pydantic.Field(alias=str("linkType")) # type: ignore[literal-required] - linked_object_primary_key: PrimaryKeyValue = pydantic.Field(alias=str("linkedObjectPrimaryKey")) # type: ignore[literal-required] - type: typing.Literal["addLink"] = "addLink" - - -class AddObject(core.ModelBase): - """AddObject""" - - primary_key: PropertyValue = pydantic.Field(alias=str("primaryKey")) # type: ignore[literal-required] - object_type: ObjectTypeApiName = pydantic.Field(alias=str("objectType")) # type: ignore[literal-required] - type: typing.Literal["addObject"] = "addObject" - - -class AddObjectEdit(core.ModelBase): - """AddObjectEdit""" - - object_type: ObjectTypeApiName = pydantic.Field(alias=str("objectType")) # type: ignore[literal-required] - properties: typing.Dict[PropertyApiName, DataValue] - type: typing.Literal["addObject"] = "addObject" - - -class AddPropertyExpression(core.ModelBase): - """Adds two or more numeric values.""" - - properties: typing.List[DerivedPropertyDefinition] - type: typing.Literal["add"] = "add" - - -class Affix(core.ModelBase): - """Affix""" - - prefix: typing.Optional[PropertyTypeReferenceOrStringConstant] = None - postfix: typing.Optional[PropertyTypeReferenceOrStringConstant] = None - - -class AggregateObjectSetRequestV2(core.ModelBase): - """AggregateObjectSetRequestV2""" - - aggregation: typing.List[AggregationV2] - object_set: ObjectSet = pydantic.Field(alias=str("objectSet")) # type: ignore[literal-required] - group_by: typing.List[AggregationGroupByV2] = pydantic.Field(alias=str("groupBy")) # type: ignore[literal-required] - accuracy: typing.Optional[AggregationAccuracyRequest] = None - include_compute_usage: typing.Optional[core_models.IncludeComputeUsage] = pydantic.Field(alias=str("includeComputeUsage"), default=None) # type: ignore[literal-required] - - -class AggregateObjectsRequestV2(core.ModelBase): - """AggregateObjectsRequestV2""" - - aggregation: typing.List[AggregationV2] - where: typing.Optional[SearchJsonQueryV2] = None - group_by: typing.List[AggregationGroupByV2] = pydantic.Field(alias=str("groupBy")) # type: ignore[literal-required] - accuracy: typing.Optional[AggregationAccuracyRequest] = None - - -class AggregateObjectsResponseItemV2(core.ModelBase): - """AggregateObjectsResponseItemV2""" - - group: typing.Dict[AggregationGroupKeyV2, typing.Optional[AggregationGroupValueV2]] - metrics: typing.List[AggregationMetricResultV2] - - -class AggregateObjectsResponseV2(core.ModelBase): - """AggregateObjectsResponseV2""" - - excluded_items: typing.Optional[int] = pydantic.Field(alias=str("excludedItems"), default=None) # type: ignore[literal-required] - accuracy: AggregationAccuracy - data: typing.List[AggregateObjectsResponseItemV2] - compute_usage: typing.Optional[core_models.ComputeSeconds] = pydantic.Field(alias=str("computeUsage"), default=None) # type: ignore[literal-required] - - -class AggregateTimeSeries(core.ModelBase): - """AggregateTimeSeries""" - - method: TimeSeriesAggregationMethod - strategy: TimeSeriesAggregationStrategy - - -AggregationAccuracy = typing.Literal["ACCURATE", "APPROXIMATE"] -"""AggregationAccuracy""" - - -AggregationAccuracyRequest = typing.Literal["REQUIRE_ACCURATE", "ALLOW_APPROXIMATE"] -"""AggregationAccuracyRequest""" - - -class AggregationDurationGroupingV2(core.ModelBase): - """ - Divides objects into groups according to an interval. Note that this grouping applies only on date and timestamp types. - When grouping by `YEARS`, `QUARTERS`, `MONTHS`, or `WEEKS`, the `value` must be set to `1`. - """ - - field: PropertyApiName - value: int - unit: TimeUnit - type: typing.Literal["duration"] = "duration" - - -class AggregationExactGroupingV2(core.ModelBase): - """Divides objects into groups according to an exact value.""" - - field: PropertyApiName - max_group_count: typing.Optional[int] = pydantic.Field(alias=str("maxGroupCount"), default=None) # type: ignore[literal-required] - default_value: typing.Optional[str] = pydantic.Field(alias=str("defaultValue"), default=None) # type: ignore[literal-required] - """ - Includes a group with the specified default value that includes all objects where the specified field's value is null. - Cannot be used with includeNullValues. - """ - - include_null_values: typing.Optional[bool] = pydantic.Field(alias=str("includeNullValues"), default=None) # type: ignore[literal-required] - """ - Includes a group with a null value that includes all objects where the specified field's value is null. - Cannot be used with defaultValue or orderBy clauses on the aggregation. - """ - - type: typing.Literal["exact"] = "exact" - - -class AggregationFixedWidthGroupingV2(core.ModelBase): - """Divides objects into groups with the specified width.""" - - field: PropertyApiName - fixed_width: int = pydantic.Field(alias=str("fixedWidth")) # type: ignore[literal-required] - type: typing.Literal["fixedWidth"] = "fixedWidth" - - -AggregationGroupByV2 = typing_extensions.Annotated[ - typing.Union[ - "AggregationDurationGroupingV2", - "AggregationFixedWidthGroupingV2", - "AggregationRangesGroupingV2", - "AggregationExactGroupingV2", - ], - pydantic.Field(discriminator="type"), -] -"""Specifies a grouping for aggregation results.""" - - -AggregationGroupKeyV2 = str -"""AggregationGroupKeyV2""" - - -AggregationGroupValueV2 = typing.Any -"""AggregationGroupValueV2""" - - -AggregationMetricName = str -"""A user-specified alias for an aggregation metric name.""" - - -class AggregationMetricResultV2(core.ModelBase): - """AggregationMetricResultV2""" - - name: str - value: typing.Optional[typing.Any] = None - """ - The value of the metric. This will be a double in the case of - a numeric metric, or a date string in the case of a date metric. - """ - - -class AggregationRangeV2(core.ModelBase): - """Specifies a range from an inclusive start value to an exclusive end value.""" - - start_value: typing.Any = pydantic.Field(alias=str("startValue")) # type: ignore[literal-required] - """Inclusive start.""" - - end_value: typing.Any = pydantic.Field(alias=str("endValue")) # type: ignore[literal-required] - """Exclusive end.""" - - -class AggregationRangesGroupingV2(core.ModelBase): - """Divides objects into groups according to specified ranges.""" - - field: PropertyApiName - ranges: typing.List[AggregationRangeV2] - type: typing.Literal["ranges"] = "ranges" - - -AggregationV2 = typing_extensions.Annotated[ - typing.Union[ - "ApproximateDistinctAggregationV2", - "MinAggregationV2", - "AvgAggregationV2", - "MaxAggregationV2", - "ApproximatePercentileAggregationV2", - "CountAggregationV2", - "SumAggregationV2", - "ExactDistinctAggregationV2", - ], - pydantic.Field(discriminator="type"), -] -"""Specifies an aggregation function.""" - - -class AllOfRule(core.ModelBase): - """Matches intervals satisfying all the rules in the query""" - - rules: typing.List[IntervalQueryRule] - max_gaps: typing.Optional[int] = pydantic.Field(alias=str("maxGaps"), default=None) # type: ignore[literal-required] - """The maximum gaps between the intervals produced by the sub-rules. If not set, then gaps are not considered.""" - - ordered: bool - """If true, the matched intervals must occur in order.""" - - type: typing.Literal["allOf"] = "allOf" - - -class AndQueryV2(core.ModelBase): - """Returns objects where every query is satisfied.""" - - value: typing.List[SearchJsonQueryV2] - type: typing.Literal["and"] = "and" - - -class AnyOfRule(core.ModelBase): - """Matches intervals satisfying any of the rules in the query""" - - rules: typing.List[IntervalQueryRule] - type: typing.Literal["anyOf"] = "anyOf" - - -ApplyActionMode = typing.Literal["VALIDATE_ONLY", "VALIDATE_AND_EXECUTE"] -"""ApplyActionMode""" - - -class ApplyActionOverrides(core.ModelBase): - """ApplyActionOverrides""" - - unique_identifier_link_id_values: typing.Dict[UniqueIdentifierLinkId, UniqueIdentifierValue] = pydantic.Field(alias=str("uniqueIdentifierLinkIdValues")) # type: ignore[literal-required] - action_execution_time: typing.Optional[ActionExecutionTime] = pydantic.Field(alias=str("actionExecutionTime"), default=None) # type: ignore[literal-required] - - -class ApplyActionRequestOptions(core.ModelBase): - """ApplyActionRequestOptions""" - - mode: typing.Optional[ApplyActionMode] = None - return_edits: typing.Optional[ReturnEditsMode] = pydantic.Field(alias=str("returnEdits"), default=None) # type: ignore[literal-required] - - -class ApplyActionRequestV2(core.ModelBase): - """ApplyActionRequestV2""" - - options: typing.Optional[ApplyActionRequestOptions] = None - parameters: typing.Dict[ParameterId, typing.Optional[DataValue]] - - -class ApplyActionWithOverridesRequest(core.ModelBase): - """ApplyActionWithOverridesRequest""" - - request: ApplyActionRequestV2 - overrides: ApplyActionOverrides - - -class ApplyReducersAndExtractMainValueLoadLevel(core.ModelBase): - """Performs both apply reducers and extract main value to return the reduced main value.""" - - type: typing.Literal["applyReducersAndExtractMainValue"] = "applyReducersAndExtractMainValue" - - -class ApplyReducersLoadLevel(core.ModelBase): - """Returns a single value of an array as configured in the ontology.""" - - type: typing.Literal["applyReducers"] = "applyReducers" - - -class ApproximateDistinctAggregationV2(core.ModelBase): - """Computes an approximate number of distinct values for the provided field.""" - - field: PropertyApiName - name: typing.Optional[AggregationMetricName] = None - direction: typing.Optional[OrderByDirection] = None - type: typing.Literal["approximateDistinct"] = "approximateDistinct" - - -class ApproximatePercentileAggregationV2(core.ModelBase): - """Computes the approximate percentile value for the provided field. Requires Object Storage V2.""" - - field: PropertyApiName - name: typing.Optional[AggregationMetricName] = None - approximate_percentile: float = pydantic.Field(alias=str("approximatePercentile")) # type: ignore[literal-required] - direction: typing.Optional[OrderByDirection] = None - type: typing.Literal["approximatePercentile"] = "approximatePercentile" - - -class ArrayConstraint(core.ModelBase): - """ArrayConstraint""" - - minimum_size: typing.Optional[int] = pydantic.Field(alias=str("minimumSize"), default=None) # type: ignore[literal-required] - maximum_size: typing.Optional[int] = pydantic.Field(alias=str("maximumSize"), default=None) # type: ignore[literal-required] - unique_values: bool = pydantic.Field(alias=str("uniqueValues")) # type: ignore[literal-required] - value_constraint: typing.Optional[ValueTypeConstraint] = pydantic.Field(alias=str("valueConstraint"), default=None) # type: ignore[literal-required] - type: typing.Literal["array"] = "array" - - -class ArrayEvaluatedConstraint(core.ModelBase): - """Evaluated constraints of array parameters that support per-entry constraint evaluations.""" - - entries: typing.List[ArrayEntryEvaluatedConstraint] - type: typing.Literal["array"] = "array" - - -class ArraySizeConstraint(core.ModelBase): - """The parameter expects an array of values and the size of the array must fall within the defined range.""" - - lt: typing.Optional[typing.Any] = None - """Less than""" - - lte: typing.Optional[typing.Any] = None - """Less than or equal""" - - gt: typing.Optional[typing.Any] = None - """Greater than""" - - gte: typing.Optional[typing.Any] = None - """Greater than or equal""" - - type: typing.Literal["arraySize"] = "arraySize" - - -ArtifactRepositoryRid = core.RID -"""ArtifactRepositoryRid""" - - -AttachmentMetadataResponse = typing_extensions.Annotated[ - typing.Union["AttachmentV2", "ListAttachmentsResponseV2"], pydantic.Field(discriminator="type") -] -"""The attachment metadata response""" - - -AttachmentRid = core.RID -"""The unique resource identifier of an attachment.""" - - -class AttachmentV2(core.ModelBase): - """The representation of an attachment.""" - - rid: AttachmentRid - filename: core_models.Filename - size_bytes: core_models.SizeBytes = pydantic.Field(alias=str("sizeBytes")) # type: ignore[literal-required] - media_type: core_models.MediaType = pydantic.Field(alias=str("mediaType")) # type: ignore[literal-required] - type: typing.Literal["single"] = "single" - - -class AvgAggregationV2(core.ModelBase): - """Computes the average value for the provided field.""" - - field: PropertyApiName - name: typing.Optional[AggregationMetricName] = None - direction: typing.Optional[OrderByDirection] = None - type: typing.Literal["avg"] = "avg" - - -BatchActionObjectEdit = typing_extensions.Annotated[ - typing.Union["ModifyObject", "AddObject", "AddLink"], pydantic.Field(discriminator="type") -] -"""BatchActionObjectEdit""" - - -class BatchActionObjectEdits(core.ModelBase): - """BatchActionObjectEdits""" - - edits: typing.List[BatchActionObjectEdit] - added_object_count: int = pydantic.Field(alias=str("addedObjectCount")) # type: ignore[literal-required] - modified_objects_count: int = pydantic.Field(alias=str("modifiedObjectsCount")) # type: ignore[literal-required] - deleted_objects_count: int = pydantic.Field(alias=str("deletedObjectsCount")) # type: ignore[literal-required] - added_links_count: int = pydantic.Field(alias=str("addedLinksCount")) # type: ignore[literal-required] - deleted_links_count: int = pydantic.Field(alias=str("deletedLinksCount")) # type: ignore[literal-required] - type: typing.Literal["edits"] = "edits" - - -BatchActionResults = typing_extensions.Annotated[ - typing.Union["BatchActionObjectEdits", "ObjectTypeEdits"], pydantic.Field(discriminator="type") -] -"""BatchActionResults""" - - -class BatchApplyActionRequestItem(core.ModelBase): - """BatchApplyActionRequestItem""" - - parameters: typing.Dict[ParameterId, typing.Optional[DataValue]] - - -class BatchApplyActionRequestOptions(core.ModelBase): - """BatchApplyActionRequestOptions""" - - return_edits: typing.Optional[BatchReturnEditsMode] = pydantic.Field(alias=str("returnEdits"), default=None) # type: ignore[literal-required] - - -class BatchApplyActionRequestV2(core.ModelBase): - """BatchApplyActionRequestV2""" - - options: typing.Optional[BatchApplyActionRequestOptions] = None - requests: typing.List[BatchApplyActionRequestItem] - - -class BatchApplyActionResponseV2(core.ModelBase): - """BatchApplyActionResponseV2""" - - edits: typing.Optional[BatchActionResults] = None - - -BatchReturnEditsMode = typing.Literal["ALL", "NONE"] -"""BatchReturnEditsMode""" - - -class BatchedFunctionLogicRule(core.ModelBase): - """BatchedFunctionLogicRule""" - - object_set_rid_input_name: FunctionParameterName = pydantic.Field(alias=str("objectSetRidInputName")) # type: ignore[literal-required] - function_rule: FunctionLogicRule = pydantic.Field(alias=str("functionRule")) # type: ignore[literal-required] - type: typing.Literal["batchedFunction"] = "batchedFunction" - - -class BlueprintIcon(core.ModelBase): - """BlueprintIcon""" - - color: str - """A hexadecimal color code.""" - - name: str - """ - The [name](https://blueprintjs.com/docs/#icons/icons-list) of the Blueprint icon. - Used to specify the Blueprint icon to represent the object type in a React app. - """ - - type: typing.Literal["blueprint"] = "blueprint" - - -class BoundingBoxValue(core.ModelBase): - """The top left and bottom right coordinate points that make up the bounding box.""" - - top_left: WithinBoundingBoxPoint = pydantic.Field(alias=str("topLeft")) # type: ignore[literal-required] - bottom_right: WithinBoundingBoxPoint = pydantic.Field(alias=str("bottomRight")) # type: ignore[literal-required] - - -class CenterPoint(core.ModelBase): - """The coordinate point to use as the center of the distance query.""" - - center: CenterPointTypes - distance: core_models.Distance - - -class ContainsAllTermsInOrderPrefixLastTerm(core.ModelBase): - """ - Returns objects where the specified field contains all of the terms in the order provided, - but they do have to be adjacent to each other. - The last term can be a partial prefix match. Allows you to specify a property to query on - by a variety of means. Either `field` or `propertyIdentifier` can be supplied, but not both. - """ - - field: typing.Optional[PropertyApiName] = None - property_identifier: typing.Optional[PropertyIdentifier] = pydantic.Field(alias=str("propertyIdentifier"), default=None) # type: ignore[literal-required] - value: str - type: typing.Literal["containsAllTermsInOrderPrefixLastTerm"] = ( - "containsAllTermsInOrderPrefixLastTerm" - ) - - -class ContainsAllTermsInOrderQuery(core.ModelBase): - """ - Returns objects where the specified field contains all of the terms in the order provided, - but they do have to be adjacent to each other. Allows you to specify a property to query on - by a variety of means. Either `field` or `propertyIdentifier` must be supplied, but not both. - """ - - field: typing.Optional[PropertyApiName] = None - property_identifier: typing.Optional[PropertyIdentifier] = pydantic.Field(alias=str("propertyIdentifier"), default=None) # type: ignore[literal-required] - value: str - type: typing.Literal["containsAllTermsInOrder"] = "containsAllTermsInOrder" - - -class ContainsAllTermsQuery(core.ModelBase): - """ - Returns objects where the specified field contains all of the whitespace separated words in any - order in the provided value. This query supports fuzzy matching. Allows you to specify a property to query on - by a variety of means. Either `field` or `propertyIdentifier` must be supplied, but not both. - """ - - field: typing.Optional[PropertyApiName] = None - property_identifier: typing.Optional[PropertyIdentifier] = pydantic.Field(alias=str("propertyIdentifier"), default=None) # type: ignore[literal-required] - value: str - fuzzy: typing.Optional[FuzzyV2] = None - type: typing.Literal["containsAllTerms"] = "containsAllTerms" - - -class ContainsAnyTermQuery(core.ModelBase): - """ - Returns objects where the specified field contains any of the whitespace separated words in any - order in the provided value. This query supports fuzzy matching. Allows you to specify a property to query on - by a variety of means. Either `field` or `propertyIdentifier` must be supplied, but not both. - """ - - field: typing.Optional[PropertyApiName] = None - property_identifier: typing.Optional[PropertyIdentifier] = pydantic.Field(alias=str("propertyIdentifier"), default=None) # type: ignore[literal-required] - value: str - fuzzy: typing.Optional[FuzzyV2] = None - type: typing.Literal["containsAnyTerm"] = "containsAnyTerm" - - -class ContainsQueryV2(core.ModelBase): - """ - Returns objects where the specified array contains a value. Allows you to specify a property to query on by a - variety of means. Either `field` or `propertyIdentifier` must be supplied, but not both. - """ - - field: typing.Optional[PropertyApiName] = None - property_identifier: typing.Optional[PropertyIdentifier] = pydantic.Field(alias=str("propertyIdentifier"), default=None) # type: ignore[literal-required] - value: PropertyValue - type: typing.Literal["contains"] = "contains" - - -class CountAggregationV2(core.ModelBase): - """Computes the total count of objects.""" - - name: typing.Optional[AggregationMetricName] = None - direction: typing.Optional[OrderByDirection] = None - type: typing.Literal["count"] = "count" - - -class CountObjectsResponseV2(core.ModelBase): - """CountObjectsResponseV2""" - - count: typing.Optional[int] = None - - -class CreateInterfaceLinkLogicRule(core.ModelBase): - """CreateInterfaceLinkLogicRule""" - - interface_type_api_name: InterfaceTypeApiName = pydantic.Field(alias=str("interfaceTypeApiName")) # type: ignore[literal-required] - interface_link_type_api_name: InterfaceLinkTypeApiName = pydantic.Field(alias=str("interfaceLinkTypeApiName")) # type: ignore[literal-required] - source_object: ParameterId = pydantic.Field(alias=str("sourceObject")) # type: ignore[literal-required] - target_object: ParameterId = pydantic.Field(alias=str("targetObject")) # type: ignore[literal-required] - type: typing.Literal["createInterfaceLink"] = "createInterfaceLink" - - -class CreateInterfaceLogicRule(core.ModelBase): - """CreateInterfaceLogicRule""" - - interface_type_api_name: InterfaceTypeApiName = pydantic.Field(alias=str("interfaceTypeApiName")) # type: ignore[literal-required] - object_type: ParameterId = pydantic.Field(alias=str("objectType")) # type: ignore[literal-required] - shared_property_arguments: typing.Dict[SharedPropertyTypeApiName, LogicRuleArgument] = pydantic.Field(alias=str("sharedPropertyArguments")) # type: ignore[literal-required] - struct_property_arguments: typing.Dict[SharedPropertyTypeApiName, typing.Dict[StructFieldApiName, StructFieldArgument]] = pydantic.Field(alias=str("structPropertyArguments")) # type: ignore[literal-required] - type: typing.Literal["createInterface"] = "createInterface" - - -class CreateInterfaceObjectRule(core.ModelBase): - """CreateInterfaceObjectRule""" - - interface_type_api_name: InterfaceTypeApiName = pydantic.Field(alias=str("interfaceTypeApiName")) # type: ignore[literal-required] - type: typing.Literal["createInterfaceObject"] = "createInterfaceObject" - - -class CreateLinkLogicRule(core.ModelBase): - """CreateLinkLogicRule""" - - link_type_api_name: LinkTypeApiName = pydantic.Field(alias=str("linkTypeApiName")) # type: ignore[literal-required] - source_object: ParameterId = pydantic.Field(alias=str("sourceObject")) # type: ignore[literal-required] - target_object: ParameterId = pydantic.Field(alias=str("targetObject")) # type: ignore[literal-required] - type: typing.Literal["createLink"] = "createLink" - - -class CreateLinkRule(core.ModelBase): - """CreateLinkRule""" - - link_type_api_name_ato_b: LinkTypeApiName = pydantic.Field(alias=str("linkTypeApiNameAtoB")) # type: ignore[literal-required] - link_type_api_name_bto_a: LinkTypeApiName = pydantic.Field(alias=str("linkTypeApiNameBtoA")) # type: ignore[literal-required] - a_side_object_type_api_name: ObjectTypeApiName = pydantic.Field(alias=str("aSideObjectTypeApiName")) # type: ignore[literal-required] - b_side_object_type_api_name: ObjectTypeApiName = pydantic.Field(alias=str("bSideObjectTypeApiName")) # type: ignore[literal-required] - type: typing.Literal["createLink"] = "createLink" - - -class CreateObjectLogicRule(core.ModelBase): - """CreateObjectLogicRule""" - - object_type_api_name: ObjectTypeApiName = pydantic.Field(alias=str("objectTypeApiName")) # type: ignore[literal-required] - property_arguments: typing.Dict[PropertyApiName, LogicRuleArgument] = pydantic.Field(alias=str("propertyArguments")) # type: ignore[literal-required] - struct_property_arguments: typing.Dict[PropertyApiName, typing.Dict[StructFieldApiName, StructFieldArgument]] = pydantic.Field(alias=str("structPropertyArguments")) # type: ignore[literal-required] - type: typing.Literal["createObject"] = "createObject" - - -class CreateObjectRule(core.ModelBase): - """CreateObjectRule""" - - object_type_api_name: ObjectTypeApiName = pydantic.Field(alias=str("objectTypeApiName")) # type: ignore[literal-required] - type: typing.Literal["createObject"] = "createObject" - - -class CreateOrModifyObjectLogicRule(core.ModelBase): - """CreateOrModifyObjectLogicRule""" - - object_type_api_name: ObjectTypeApiName = pydantic.Field(alias=str("objectTypeApiName")) # type: ignore[literal-required] - property_arguments: typing.Dict[PropertyApiName, LogicRuleArgument] = pydantic.Field(alias=str("propertyArguments")) # type: ignore[literal-required] - struct_property_arguments: typing.Dict[PropertyApiName, typing.Dict[StructFieldApiName, StructFieldArgument]] = pydantic.Field(alias=str("structPropertyArguments")) # type: ignore[literal-required] - type: typing.Literal["createOrModifyObject"] = "createOrModifyObject" - - -class CreateOrModifyObjectLogicRuleV2(core.ModelBase): - """CreateOrModifyObjectLogicRuleV2""" - - object_to_modify: ParameterId = pydantic.Field(alias=str("objectToModify")) # type: ignore[literal-required] - property_arguments: typing.Dict[PropertyApiName, LogicRuleArgument] = pydantic.Field(alias=str("propertyArguments")) # type: ignore[literal-required] - struct_property_arguments: typing.Dict[PropertyApiName, typing.Dict[StructFieldApiName, StructFieldArgument]] = pydantic.Field(alias=str("structPropertyArguments")) # type: ignore[literal-required] - type: typing.Literal["createOrModifyObjectV2"] = "createOrModifyObjectV2" - - -class CreateTemporaryObjectSetRequestV2(core.ModelBase): - """CreateTemporaryObjectSetRequestV2""" - - object_set: ObjectSet = pydantic.Field(alias=str("objectSet")) # type: ignore[literal-required] - - -class CreateTemporaryObjectSetResponseV2(core.ModelBase): - """CreateTemporaryObjectSetResponseV2""" - - object_set_rid: ObjectSetRid = pydantic.Field(alias=str("objectSetRid")) # type: ignore[literal-required] - - -class CurrentTimeArgument(core.ModelBase): - """Represents the current time argument in a logic rule.""" - - type: typing.Literal["currentTime"] = "currentTime" - - -class CurrentUserArgument(core.ModelBase): - """Represents the current user argument in a logic rule.""" - - type: typing.Literal["currentUser"] = "currentUser" - - -DataValue = typing.Any -""" -Represents the value of data in the following format. Note that these values can be nested, for example an array of structs. -| Type | JSON encoding | Example | -|-------------------------------------|-------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Array | array | `["alpha", "bravo", "charlie"]` | -| Attachment | string | `"ri.attachments.main.attachment.2f944bae-5851-4204-8615-920c969a9f2e"` | -| Boolean | boolean | `true` | -| Byte | number | `31` | -| CipherText | string | `"CIPHER::ri.bellaso.main.cipher-channel.e414ab9e-b606-499a-a0e1-844fa296ba7e::unzjs3VifsTxuIpf1fH1CJ7OaPBr2bzMMdozPaZJtCii8vVG60yXIEmzoOJaEl9mfFFe::CIPHER"` | -| Date | ISO 8601 extended local date string | `"2021-05-01"` | -| Decimal | string | `"2.718281828"` | -| Double | number | `3.14159265` | -| EntrySet | array of JSON objects | `[{"key": "EMP1234", "value": "true"}, {"key": "EMP4444", "value": "false"}]` | -| Float | number | `3.14159265` | -| Integer | number | `238940` | -| Long | string | `"58319870951433"` | -| Marking | string | `"MU"` | -| Null | null | `null` | -| Object Set | string OR the object set definition | `ri.object-set.main.versioned-object-set.h13274m8-23f5-431c-8aee-a4554157c57z` | -| Ontology Object Reference | JSON encoding of the object's primary key | `10033123` or `"EMP1234"` | -| Ontology Interface Object Reference | JSON encoding of the object's API name and primary key| `{"objectTypeApiName":"Employee", "primaryKeyValue":"EMP1234"}` | -| Ontology Object Type Reference | string of the object type's api name | `"Employee"` | -| Set | array | `["alpha", "bravo", "charlie"]` | -| Short | number | `8739` | -| String | string | `"Call me Ishmael"` | -| Struct | JSON object | `{"name": "John Doe", "age": 42}` | -| TwoDimensionalAggregation | JSON object | `{"groups": [{"key": "alpha", "value": 100}, {"key": "beta", "value": 101}]}` | -| ThreeDimensionalAggregation | JSON object | `{"groups": [{"key": "NYC", "groups": [{"key": "Engineer", "value" : 100}]}]}` | -| Timestamp | ISO 8601 extended offset date-time string in UTC zone | `"2021-01-04T05:00:00Z"` | -""" - - -DatetimeFormat = typing_extensions.Annotated[ - typing.Union["DatetimeStringFormat", "DatetimeLocalizedFormat"], - pydantic.Field(discriminator="type"), -] -"""DatetimeFormat""" - - -class DatetimeLocalizedFormat(core.ModelBase): - """Predefined localized formatting options.""" - - format: DatetimeLocalizedFormatType - type: typing.Literal["localizedFormat"] = "localizedFormat" - - -DatetimeLocalizedFormatType = typing.Literal[ - "DATE_FORMAT_RELATIVE_TO_NOW", - "DATE_FORMAT_DATE", - "DATE_FORMAT_YEAR_AND_MONTH", - "DATE_FORMAT_DATE_TIME", - "DATE_FORMAT_DATE_TIME_SHORT", - "DATE_FORMAT_TIME", - "DATE_FORMAT_ISO_INSTANT", -] -"""Localized date/time format types.""" - - -class DatetimeStringFormat(core.ModelBase): - """A strictly specified date format pattern.""" - - pattern: str - """A valid format string composed of date/time patterns.""" - - type: typing.Literal["stringFormat"] = "stringFormat" - - -DatetimeTimezone = typing_extensions.Annotated[ - typing.Union["DatetimeTimezoneStatic", "DatetimeTimezoneUser"], - pydantic.Field(discriminator="type"), -] -"""DatetimeTimezone""" - - -class DatetimeTimezoneStatic(core.ModelBase): - """DatetimeTimezoneStatic""" - - zone_id: PropertyTypeReferenceOrStringConstant = pydantic.Field(alias=str("zoneId")) # type: ignore[literal-required] - type: typing.Literal["static"] = "static" - - -class DatetimeTimezoneUser(core.ModelBase): - """The user's local timezone.""" - - type: typing.Literal["user"] = "user" - - -class DecryptionResult(core.ModelBase): - """The result of a CipherText decryption. If successful, the plaintext decrypted value will be returned. Otherwise, an error will be thrown.""" - - plaintext: typing.Optional[Plaintext] = None - - -class DeleteInterfaceLinkLogicRule(core.ModelBase): - """DeleteInterfaceLinkLogicRule""" - - interface_type_api_name: InterfaceTypeApiName = pydantic.Field(alias=str("interfaceTypeApiName")) # type: ignore[literal-required] - interface_link_type_api_name: InterfaceLinkTypeApiName = pydantic.Field(alias=str("interfaceLinkTypeApiName")) # type: ignore[literal-required] - source_object: ParameterId = pydantic.Field(alias=str("sourceObject")) # type: ignore[literal-required] - target_object: ParameterId = pydantic.Field(alias=str("targetObject")) # type: ignore[literal-required] - type: typing.Literal["deleteInterfaceLink"] = "deleteInterfaceLink" - - -class DeleteInterfaceObjectRule(core.ModelBase): - """DeleteInterfaceObjectRule""" - - interface_type_api_name: InterfaceTypeApiName = pydantic.Field(alias=str("interfaceTypeApiName")) # type: ignore[literal-required] - type: typing.Literal["deleteInterfaceObject"] = "deleteInterfaceObject" - - -class DeleteLink(core.ModelBase): - """DeleteLink""" - - link_type_api_name_ato_b: LinkTypeApiName = pydantic.Field(alias=str("linkTypeApiNameAtoB")) # type: ignore[literal-required] - link_type_api_name_bto_a: LinkTypeApiName = pydantic.Field(alias=str("linkTypeApiNameBtoA")) # type: ignore[literal-required] - a_side_object: LinkSideObject = pydantic.Field(alias=str("aSideObject")) # type: ignore[literal-required] - b_side_object: LinkSideObject = pydantic.Field(alias=str("bSideObject")) # type: ignore[literal-required] - type: typing.Literal["deleteLink"] = "deleteLink" - - -class DeleteLinkEdit(core.ModelBase): - """DeleteLinkEdit""" - - object_type: ObjectTypeApiName = pydantic.Field(alias=str("objectType")) # type: ignore[literal-required] - primary_key: PrimaryKeyValue = pydantic.Field(alias=str("primaryKey")) # type: ignore[literal-required] - link_type: LinkTypeApiName = pydantic.Field(alias=str("linkType")) # type: ignore[literal-required] - linked_object_primary_key: PrimaryKeyValue = pydantic.Field(alias=str("linkedObjectPrimaryKey")) # type: ignore[literal-required] - type: typing.Literal["removeLink"] = "removeLink" - - -class DeleteLinkLogicRule(core.ModelBase): - """DeleteLinkLogicRule""" - - link_type_api_name: LinkTypeApiName = pydantic.Field(alias=str("linkTypeApiName")) # type: ignore[literal-required] - source_object: ParameterId = pydantic.Field(alias=str("sourceObject")) # type: ignore[literal-required] - target_object: ParameterId = pydantic.Field(alias=str("targetObject")) # type: ignore[literal-required] - type: typing.Literal["deleteLink"] = "deleteLink" - - -class DeleteLinkRule(core.ModelBase): - """DeleteLinkRule""" - - link_type_api_name_ato_b: LinkTypeApiName = pydantic.Field(alias=str("linkTypeApiNameAtoB")) # type: ignore[literal-required] - link_type_api_name_bto_a: LinkTypeApiName = pydantic.Field(alias=str("linkTypeApiNameBtoA")) # type: ignore[literal-required] - a_side_object_type_api_name: ObjectTypeApiName = pydantic.Field(alias=str("aSideObjectTypeApiName")) # type: ignore[literal-required] - b_side_object_type_api_name: ObjectTypeApiName = pydantic.Field(alias=str("bSideObjectTypeApiName")) # type: ignore[literal-required] - type: typing.Literal["deleteLink"] = "deleteLink" - - -class DeleteObject(core.ModelBase): - """DeleteObject""" - - primary_key: PropertyValue = pydantic.Field(alias=str("primaryKey")) # type: ignore[literal-required] - object_type: ObjectTypeApiName = pydantic.Field(alias=str("objectType")) # type: ignore[literal-required] - type: typing.Literal["deleteObject"] = "deleteObject" - - -class DeleteObjectEdit(core.ModelBase): - """DeleteObjectEdit""" - - object_type: ObjectTypeApiName = pydantic.Field(alias=str("objectType")) # type: ignore[literal-required] - primary_key: PropertyValue = pydantic.Field(alias=str("primaryKey")) # type: ignore[literal-required] - type: typing.Literal["deleteObject"] = "deleteObject" - - -class DeleteObjectLogicRule(core.ModelBase): - """DeleteObjectLogicRule""" - - object_to_delete: ParameterId = pydantic.Field(alias=str("objectToDelete")) # type: ignore[literal-required] - type: typing.Literal["deleteObject"] = "deleteObject" - - -class DeleteObjectRule(core.ModelBase): - """DeleteObjectRule""" - - object_type_api_name: ObjectTypeApiName = pydantic.Field(alias=str("objectTypeApiName")) # type: ignore[literal-required] - type: typing.Literal["deleteObject"] = "deleteObject" - - -class DeprecatedPropertyTypeStatus(core.ModelBase): - """ - This status indicates that the PropertyType is reaching the end of its life and will be removed as per the - deadline specified. - """ - - message: str - deadline: core.AwareDatetime - replaced_by: typing.Optional[PropertyTypeRid] = pydantic.Field(alias=str("replacedBy"), default=None) # type: ignore[literal-required] - type: typing.Literal["deprecated"] = "deprecated" - - -DerivedPropertyApiName = str -"""The name of the derived property that will be returned.""" - - -DerivedPropertyDefinition = typing_extensions.Annotated[ - typing.Union[ - "AddPropertyExpression", - "AbsoluteValuePropertyExpression", - "ExtractPropertyExpression", - "SelectedPropertyExpression", - "NegatePropertyExpression", - "SubtractPropertyExpression", - "PropertyApiNameSelector", - "LeastPropertyExpression", - "DividePropertyExpression", - "MultiplyPropertyExpression", - "GreatestPropertyExpression", - ], - pydantic.Field(discriminator="type"), -] -"""Definition of a derived property.""" - - -class DividePropertyExpression(core.ModelBase): - """Divides the left numeric value by the right numeric value.""" - - left: DerivedPropertyDefinition - right: DerivedPropertyDefinition - type: typing.Literal["divide"] = "divide" - - -class DoesNotIntersectBoundingBoxQuery(core.ModelBase): - """ - Returns objects where the specified field does not intersect the bounding box provided. Allows you to specify a - property to query on by a variety of means. Either `field` or `propertyIdentifier` must be supplied, but not - both. - """ - - field: typing.Optional[PropertyApiName] = None - property_identifier: typing.Optional[PropertyIdentifier] = pydantic.Field(alias=str("propertyIdentifier"), default=None) # type: ignore[literal-required] - value: BoundingBoxValue - type: typing.Literal["doesNotIntersectBoundingBox"] = "doesNotIntersectBoundingBox" - - -class DoesNotIntersectPolygonQuery(core.ModelBase): - """ - Returns objects where the specified field does not intersect the polygon provided. Allows you to specify a - property to query on by a variety of means. Either `field` or `propertyIdentifier` must be supplied, but not - both. - """ - - field: typing.Optional[PropertyApiName] = None - property_identifier: typing.Optional[PropertyIdentifier] = pydantic.Field(alias=str("propertyIdentifier"), default=None) # type: ignore[literal-required] - value: PolygonValue - type: typing.Literal["doesNotIntersectPolygon"] = "doesNotIntersectPolygon" - - -class DoubleVector(core.ModelBase): - """ - The vector to search with. The vector must be of the same dimension as the vectors stored in the provided - propertyIdentifier. - """ - - value: typing.List[float] - type: typing.Literal["vector"] = "vector" - - -DurationBaseValue = typing.Literal["SECONDS", "MILLISECONDS"] -"""Specifies the unit of the input duration value.""" - - -DurationFormatStyle = typing_extensions.Annotated[ - typing.Union["HumanReadableFormat", "TimeCodeFormat"], pydantic.Field(discriminator="type") -] -"""DurationFormatStyle""" - - -DurationPrecision = typing.Literal["DAYS", "HOURS", "MINUTES", "SECONDS", "AUTO"] -"""Specifies the maximum precision to apply when formatting a duration.""" - - -class EntrySetType(core.ModelBase): - """EntrySetType""" - - key_type: QueryDataType = pydantic.Field(alias=str("keyType")) # type: ignore[literal-required] - value_type: QueryDataType = pydantic.Field(alias=str("valueType")) # type: ignore[literal-required] - type: typing.Literal["entrySet"] = "entrySet" - - -class EnumConstraint(core.ModelBase): - """EnumConstraint""" - - options: typing.List[typing.Optional[PropertyValue]] - type: typing.Literal["enum"] = "enum" - - -class EqualsQueryV2(core.ModelBase): - """ - Returns objects where the specified field is equal to a value. Allows you to specify a property to query on - by a variety of means. Either `field` or `propertyIdentifier` must be supplied, but not both. - """ - - field: typing.Optional[PropertyApiName] = None - property_identifier: typing.Optional[PropertyIdentifier] = pydantic.Field(alias=str("propertyIdentifier"), default=None) # type: ignore[literal-required] - value: PropertyValue - type: typing.Literal["eq"] = "eq" - - -class ExactDistinctAggregationV2(core.ModelBase): - """Computes an exact number of distinct values for the provided field. May be slower than an approximate distinct aggregation. Requires Object Storage V2.""" - - field: PropertyApiName - name: typing.Optional[AggregationMetricName] = None - direction: typing.Optional[OrderByDirection] = None - type: typing.Literal["exactDistinct"] = "exactDistinct" - - -class ExamplePropertyTypeStatus(core.ModelBase): - """ - This status indicates that the PropertyType is an example. It is backed by notional data that should not be - used for actual workflows, but can be used to test those workflows. - """ - - type: typing.Literal["example"] = "example" - - -class ExecuteQueryRequest(core.ModelBase): - """ExecuteQueryRequest""" - - parameters: typing.Dict[ParameterId, typing.Optional[DataValue]] - - -class ExecuteQueryResponse(core.ModelBase): - """ExecuteQueryResponse""" - - value: DataValue - - -class ExperimentalPropertyTypeStatus(core.ModelBase): - """This status indicates that the PropertyType is in development.""" - - type: typing.Literal["experimental"] = "experimental" - - -ExtractDatePart = typing.Literal["DAYS", "MONTHS", "QUARTERS", "YEARS"] -"""ExtractDatePart""" - - -class ExtractMainValueLoadLevel(core.ModelBase): - """Returns the main value of a struct as configured in the ontology.""" - - type: typing.Literal["extractMainValue"] = "extractMainValue" - - -class ExtractPropertyExpression(core.ModelBase): - """Extracts the specified date part from a date or timestamp.""" - - property: DerivedPropertyDefinition - part: ExtractDatePart - type: typing.Literal["extract"] = "extract" - - -FilterValue = str -""" -Represents the value of a property filter. For instance, false is the FilterValue in -`properties.{propertyApiName}.isNull=false`. -""" - - -FixedValuesMapKey = int -"""Integer key for fixed value mapping.""" - - -class FunctionLogicRule(core.ModelBase): - """FunctionLogicRule""" - - function_rid: FunctionRid = pydantic.Field(alias=str("functionRid")) # type: ignore[literal-required] - function_version: FunctionVersion = pydantic.Field(alias=str("functionVersion")) # type: ignore[literal-required] - function_input_values: typing.Dict[FunctionParameterName, LogicRuleArgument] = pydantic.Field(alias=str("functionInputValues")) # type: ignore[literal-required] - type: typing.Literal["function"] = "function" - - -FunctionParameterName = str -"""The name of an input to a function.""" - - -FunctionRid = core.RID -"""The unique resource identifier of a Function, useful for interacting with other Foundry APIs.""" - - -FunctionVersion = str -""" -The version of the given Function, written `..-`, where `-` is optional. -Examples: `1.2.3`, `1.2.3-rc1`. -""" - - -FuzzyV2 = bool -"""Setting fuzzy to `true` allows approximate matching in search queries that support it.""" - - -class GetSelectedPropertyOperation(core.ModelBase): - """ - Gets a single value of a property. Throws if the target object set is on the MANY side of the link and could - explode the cardinality. - - Use collectList or collectSet which will return a list of values in that case. - """ - - selected_property_api_name: PropertyApiName = pydantic.Field(alias=str("selectedPropertyApiName")) # type: ignore[literal-required] - type: typing.Literal["get"] = "get" - - -class GreatestPropertyExpression(core.ModelBase): - """Finds greatest of two or more numeric, date or timestamp values.""" - - properties: typing.List[DerivedPropertyDefinition] - type: typing.Literal["greatest"] = "greatest" - - -class GroupMemberConstraint(core.ModelBase): - """The parameter value must be the user id of a member belonging to at least one of the groups defined by the constraint.""" - - type: typing.Literal["groupMember"] = "groupMember" - - -class GtQueryV2(core.ModelBase): - """ - Returns objects where the specified field is greater than a value. Allows you to specify a property to query on - by a variety of means. Either `field` or `propertyIdentifier` must be supplied, but not both. - """ - - field: typing.Optional[PropertyApiName] = None - property_identifier: typing.Optional[PropertyIdentifier] = pydantic.Field(alias=str("propertyIdentifier"), default=None) # type: ignore[literal-required] - value: PropertyValue - type: typing.Literal["gt"] = "gt" - - -class GteQueryV2(core.ModelBase): - """ - Returns objects where the specified field is greater than or equal to a value. Allows you to specify a property - to query on by a variety of means. Either `field` or `propertyIdentifier` must be supplied, but not both. - """ - - field: typing.Optional[PropertyApiName] = None - property_identifier: typing.Optional[PropertyIdentifier] = pydantic.Field(alias=str("propertyIdentifier"), default=None) # type: ignore[literal-required] - value: PropertyValue - type: typing.Literal["gte"] = "gte" - - -class HumanReadableFormat(core.ModelBase): - """Formats the duration as a human-readable written string.""" - - show_full_units: typing.Optional[bool] = pydantic.Field(alias=str("showFullUnits"), default=None) # type: ignore[literal-required] - """Whether to show full or abbreviated time units.""" - - type: typing.Literal["humanReadable"] = "humanReadable" - - -class InQuery(core.ModelBase): - """ - Returns objects where the specified field equals any of the provided values. Allows you to - specify a property to query on by a variety of means. Either `field` or `propertyIdentifier` must be supplied, - but not both. - """ - - field: typing.Optional[PropertyApiName] = None - property_identifier: typing.Optional[PropertyIdentifier] = pydantic.Field(alias=str("propertyIdentifier"), default=None) # type: ignore[literal-required] - value: typing.List[PropertyValue] - type: typing.Literal["in"] = "in" - - -class InterfaceDefinedPropertyType(core.ModelBase): - """ - An interface property type with an additional field to indicate constraints that need to be satisfied by - implementing object property types. - """ - - rid: InterfacePropertyTypeRid - api_name: InterfacePropertyApiName = pydantic.Field(alias=str("apiName")) # type: ignore[literal-required] - display_name: core_models.DisplayName = pydantic.Field(alias=str("displayName")) # type: ignore[literal-required] - description: typing.Optional[str] = None - """The description of the interface property type.""" - - data_type: ObjectPropertyType = pydantic.Field(alias=str("dataType")) # type: ignore[literal-required] - value_type_api_name: typing.Optional[ValueTypeApiName] = pydantic.Field(alias=str("valueTypeApiName"), default=None) # type: ignore[literal-required] - require_implementation: bool = pydantic.Field(alias=str("requireImplementation")) # type: ignore[literal-required] - """Whether each implementing object type must declare an implementation for this property.""" - - type: typing.Literal["interfaceDefinedPropertyType"] = "interfaceDefinedPropertyType" - - -class InterfaceLinkType(core.ModelBase): - """ - A link type constraint defined at the interface level where the implementation of the links is provided - by the implementing object types. - """ - - rid: InterfaceLinkTypeRid - api_name: InterfaceLinkTypeApiName = pydantic.Field(alias=str("apiName")) # type: ignore[literal-required] - display_name: core_models.DisplayName = pydantic.Field(alias=str("displayName")) # type: ignore[literal-required] - description: typing.Optional[str] = None - """The description of the interface link type.""" - - linked_entity_api_name: InterfaceLinkTypeLinkedEntityApiName = pydantic.Field(alias=str("linkedEntityApiName")) # type: ignore[literal-required] - cardinality: InterfaceLinkTypeCardinality - required: bool - """Whether each implementing object type must declare at least one implementation of this link.""" - - -InterfaceLinkTypeApiName = str -""" -The name of the interface link type in the API. To find the API name for your Interface Link Type, check the -[Ontology Manager](https://palantir.com/docs/foundry/ontology-manager/overview/). -""" - - -InterfaceLinkTypeCardinality = typing.Literal["ONE", "MANY"] -""" -The cardinality of the link in the given direction. Cardinality can be "ONE", meaning an object can -link to zero or one other objects, or "MANY", meaning an object can link to any number of other objects. -""" - - -InterfaceLinkTypeLinkedEntityApiName = typing_extensions.Annotated[ - typing.Union["LinkedObjectTypeApiName", "LinkedInterfaceTypeApiName"], - pydantic.Field(discriminator="type"), -] -"""A reference to the linked entity. This can either be an object or an interface type.""" - - -InterfaceLinkTypeRid = core.RID -"""The unique resource identifier of an interface link type, useful for interacting with other Foundry APIs.""" - - -class InterfaceParameterPropertyArgument(core.ModelBase): - """Represents an interface parameter property argument in a logic rule.""" - - parameter_id: ParameterId = pydantic.Field(alias=str("parameterId")) # type: ignore[literal-required] - shared_property_type_rid: core.RID = pydantic.Field(alias=str("sharedPropertyTypeRid")) # type: ignore[literal-required] - type: typing.Literal["interfaceParameterPropertyValue"] = "interfaceParameterPropertyValue" - - -InterfacePropertyApiName = str -""" -The name of the interface property type in the API in lowerCamelCase format. To find the API name for your -interface property type, use the `List interface types` endpoint and check the `allPropertiesV2` field or check -the **Ontology Manager**. -""" - - -class InterfacePropertyLocalPropertyImplementation(core.ModelBase): - """An implementation of an interface property via a local property.""" - - property_api_name: PropertyApiName = pydantic.Field(alias=str("propertyApiName")) # type: ignore[literal-required] - type: typing.Literal["localPropertyImplementation"] = "localPropertyImplementation" - - -class InterfacePropertyReducedPropertyImplementation(core.ModelBase): - """An implementation of an interface property via applying reducers on the nested implementation.""" - - implementation: NestedInterfacePropertyTypeImplementation - type: typing.Literal["reducedPropertyImplementation"] = "reducedPropertyImplementation" - - -class InterfacePropertyStructFieldImplementation(core.ModelBase): - """An implementation of an interface property via the field of a local struct property.""" - - struct_field_of_property: StructFieldOfPropertyImplementation = pydantic.Field(alias=str("structFieldOfProperty")) # type: ignore[literal-required] - type: typing.Literal["structFieldImplementation"] = "structFieldImplementation" - - -class InterfacePropertyStructImplementation(core.ModelBase): - """ - An implementation of a struct interface property via a local struct property. Specifies a mapping of interface - struct fields to local struct fields or properties. - """ - - mapping: InterfacePropertyStructImplementationMapping - type: typing.Literal["structImplementation"] = "structImplementation" - - -InterfacePropertyStructImplementationMapping = typing.Dict[ - "StructFieldApiName", "PropertyOrStructFieldOfPropertyImplementation" -] -""" -An implementation of a struct interface property via a local struct property. Specifies a mapping of interface -struct fields to local struct fields or properties. -""" - - -InterfacePropertyType = typing_extensions.Annotated[ - typing.Union["InterfaceDefinedPropertyType", "InterfaceSharedPropertyType"], - pydantic.Field(discriminator="type"), -] -""" -The definition of an interface property type on an interface. An interface property can either be backed by a -shared property type or defined on the interface directly. -""" - - -InterfacePropertyTypeImplementation = typing_extensions.Annotated[ - typing.Union[ - "InterfacePropertyStructFieldImplementation", - "InterfacePropertyStructImplementation", - "InterfacePropertyLocalPropertyImplementation", - "InterfacePropertyReducedPropertyImplementation", - ], - pydantic.Field(discriminator="type"), -] -"""Describes how an object type implements an interface property.""" - - -InterfacePropertyTypeRid = core.RID -"""The unique resource identifier of an interface property type, useful for interacting with other Foundry APIs.""" - - -class InterfaceSharedPropertyType(core.ModelBase): - """ - A shared property type with an additional field to indicate whether the property must be included on every - object type that implements the interface, or whether it is optional. - """ - - rid: SharedPropertyTypeRid - api_name: SharedPropertyTypeApiName = pydantic.Field(alias=str("apiName")) # type: ignore[literal-required] - display_name: core_models.DisplayName = pydantic.Field(alias=str("displayName")) # type: ignore[literal-required] - description: typing.Optional[str] = None - """A short text that describes the SharedPropertyType.""" - - data_type: ObjectPropertyType = pydantic.Field(alias=str("dataType")) # type: ignore[literal-required] - value_type_api_name: typing.Optional[ValueTypeApiName] = pydantic.Field(alias=str("valueTypeApiName"), default=None) # type: ignore[literal-required] - value_formatting: typing.Optional[PropertyValueFormattingRule] = pydantic.Field(alias=str("valueFormatting"), default=None) # type: ignore[literal-required] - required: bool - """Whether each implementing object type must declare an implementation for this property.""" - - type: typing.Literal["interfaceSharedPropertyType"] = "interfaceSharedPropertyType" - - -InterfaceToObjectTypeMapping = typing.Dict["SharedPropertyTypeApiName", "PropertyApiName"] -"""Represents an implementation of an interface (the mapping of interface property to local property).""" - - -InterfaceToObjectTypeMappingV2 = typing.Dict[ - "InterfacePropertyApiName", "InterfacePropertyTypeImplementation" -] -"""Represents an implementation of an interface (the mapping of interface property to how it is implemented.""" - - -InterfaceToObjectTypeMappings = typing.Dict["ObjectTypeApiName", "InterfaceToObjectTypeMapping"] -"""Map from object type to the interface-to-object-type mapping for that object type.""" - - -InterfaceToObjectTypeMappingsV2 = typing.Dict["ObjectTypeApiName", "InterfaceToObjectTypeMappingV2"] -"""Map from object type to the interface property implementations of that object type.""" - - -class InterfaceType(core.ModelBase): - """Represents an interface type in the Ontology.""" - - rid: InterfaceTypeRid - api_name: InterfaceTypeApiName = pydantic.Field(alias=str("apiName")) # type: ignore[literal-required] - display_name: core_models.DisplayName = pydantic.Field(alias=str("displayName")) # type: ignore[literal-required] - description: typing.Optional[str] = None - """The description of the interface.""" - - properties: typing.Dict[SharedPropertyTypeApiName, InterfaceSharedPropertyType] - """ - A map from a shared property type API name to the corresponding shared property type. The map describes the - set of properties the interface has. A shared property type must be unique across all of the properties. - This field only includes properties on the interface that are backed by shared property types. - """ - - all_properties: typing.Dict[SharedPropertyTypeApiName, InterfaceSharedPropertyType] = pydantic.Field(alias=str("allProperties")) # type: ignore[literal-required] - """ - A map from a shared property type API name to the corresponding shared property type. The map describes the - set of properties the interface has, including properties from all directly and indirectly extended - interfaces. - This field only includes properties on the interface that are backed by shared property types. - """ - - properties_v2: typing.Dict[InterfacePropertyApiName, InterfacePropertyType] = pydantic.Field(alias=str("propertiesV2")) # type: ignore[literal-required] - """ - A map from a interface property type API name to the corresponding interface property type. The map - describes the set of properties the interface has. An interface property can either be backed by a shared - property or it can be defined directly on the interface. - """ - - all_properties_v2: typing.Dict[InterfacePropertyApiName, ResolvedInterfacePropertyType] = pydantic.Field(alias=str("allPropertiesV2")) # type: ignore[literal-required] - """ - A map from a interface property type API name to the corresponding interface property type. The map - describes the set of properties the interface has, including properties from all directly and indirectly - extended interfaces. - """ - - extends_interfaces: typing.List[InterfaceTypeApiName] = pydantic.Field(alias=str("extendsInterfaces")) # type: ignore[literal-required] - """ - A list of interface API names that this interface extends. An interface can extend other interfaces to - inherit their properties. - """ - - all_extends_interfaces: typing.List[InterfaceTypeApiName] = pydantic.Field(alias=str("allExtendsInterfaces")) # type: ignore[literal-required] - """A list of interface API names that this interface extends, both directly and indirectly.""" - - implemented_by_object_types: typing.List[ObjectTypeApiName] = pydantic.Field(alias=str("implementedByObjectTypes")) # type: ignore[literal-required] - """A list of object API names that implement this interface.""" - - links: typing.Dict[InterfaceLinkTypeApiName, InterfaceLinkType] - """ - A map from an interface link type API name to the corresponding interface link type. The map describes the - set of link types the interface has. - """ - - all_links: typing.Dict[InterfaceLinkTypeApiName, InterfaceLinkType] = pydantic.Field(alias=str("allLinks")) # type: ignore[literal-required] - """ - A map from an interface link type API name to the corresponding interface link type. The map describes the - set of link types the interface has, including links from all directly and indirectly extended interfaces. - """ - - -InterfaceTypeApiName = str -""" -The name of the interface type in the API in UpperCamelCase format. To find the API name for your interface -type, use the `List interface types` endpoint or check the **Ontology Manager**. -""" - - -InterfaceTypeRid = core.RID -"""The unique resource identifier of an interface, useful for interacting with other Foundry APIs.""" - - -class IntersectsBoundingBoxQuery(core.ModelBase): - """ - Returns objects where the specified field intersects the bounding box provided. Allows you to specify a property - to query on by a variety of means. Either `field` or `propertyIdentifier` must be supplied, but not both. - """ - - field: typing.Optional[PropertyApiName] = None - property_identifier: typing.Optional[PropertyIdentifier] = pydantic.Field(alias=str("propertyIdentifier"), default=None) # type: ignore[literal-required] - value: BoundingBoxValue - type: typing.Literal["intersectsBoundingBox"] = "intersectsBoundingBox" - - -class IntersectsPolygonQuery(core.ModelBase): - """ - Returns objects where the specified field intersects the polygon provided. Allows you to specify a property to - query on by a variety of means. Either `field` or `propertyIdentifier` must be supplied, but not both. - """ - - field: typing.Optional[PropertyApiName] = None - property_identifier: typing.Optional[PropertyIdentifier] = pydantic.Field(alias=str("propertyIdentifier"), default=None) # type: ignore[literal-required] - value: PolygonValue - type: typing.Literal["intersectsPolygon"] = "intersectsPolygon" - - -class IntervalQuery(core.ModelBase): - """ - Returns objects where the specified field matches the sub-rule provided. This applies to the analyzed form of - text fields. Either `field` or `propertyIdentifier` can be supplied, but not both. - """ - - field: typing.Optional[PropertyApiName] = None - property_identifier: typing.Optional[PropertyIdentifier] = pydantic.Field(alias=str("propertyIdentifier"), default=None) # type: ignore[literal-required] - rule: IntervalQueryRule - type: typing.Literal["interval"] = "interval" - - -IntervalQueryRule = typing_extensions.Annotated[ - typing.Union["AllOfRule", "MatchRule", "AnyOfRule", "PrefixOnLastTokenRule"], - pydantic.Field(discriminator="type"), -] -"""Sub-rule used for evaluating an IntervalQuery""" - - -class IsNullQueryV2(core.ModelBase): - """ - Returns objects based on the existence of the specified field. Allows you to specify a property to query on - by a variety of means. Either `field` or `propertyIdentifier` must be supplied, but not both. - """ - - field: typing.Optional[PropertyApiName] = None - property_identifier: typing.Optional[PropertyIdentifier] = pydantic.Field(alias=str("propertyIdentifier"), default=None) # type: ignore[literal-required] - value: bool - type: typing.Literal["isNull"] = "isNull" - - -KnownType = typing.Literal["USER_OR_GROUP_ID", "RESOURCE_RID", "ARTIFACT_GID"] -""" -Known Foundry types for specialized formatting: -- userOrGroupRid: Format as user or group -- resourceRid: Format as resource -- artifactGid: Format as artifact -""" - - -class LeastPropertyExpression(core.ModelBase): - """Finds least of two or more numeric, date or timestamp values.""" - - properties: typing.List[DerivedPropertyDefinition] - type: typing.Literal["least"] = "least" - - -class LengthConstraint(core.ModelBase): - """LengthConstraint""" - - minimum_length: typing.Optional[float] = pydantic.Field(alias=str("minimumLength"), default=None) # type: ignore[literal-required] - maximum_length: typing.Optional[float] = pydantic.Field(alias=str("maximumLength"), default=None) # type: ignore[literal-required] - type: typing.Literal["length"] = "length" - - -class LinkSideObject(core.ModelBase): - """LinkSideObject""" - - primary_key: PropertyValue = pydantic.Field(alias=str("primaryKey")) # type: ignore[literal-required] - object_type: ObjectTypeApiName = pydantic.Field(alias=str("objectType")) # type: ignore[literal-required] - - -LinkTypeApiName = str -""" -The name of the link type in the API. To find the API name for your Link Type, check the **Ontology Manager** -application. -""" - - -LinkTypeId = str -"""The unique ID of a link type. To find the ID for your link type, check the **Ontology Manager** application.""" - - -LinkTypeRid = core.RID -"""LinkTypeRid""" - - -LinkTypeSideCardinality = typing.Literal["ONE", "MANY"] -"""LinkTypeSideCardinality""" - - -class LinkTypeSideV2(core.ModelBase): - """ - `foreignKeyPropertyApiName` is the API name of the foreign key on this object type. If absent, the link is - either a m2m link or the linked object has the foreign key and this object type has the primary key. - """ - - api_name: LinkTypeApiName = pydantic.Field(alias=str("apiName")) # type: ignore[literal-required] - display_name: core_models.DisplayName = pydantic.Field(alias=str("displayName")) # type: ignore[literal-required] - status: core_models.ReleaseStatus - object_type_api_name: ObjectTypeApiName = pydantic.Field(alias=str("objectTypeApiName")) # type: ignore[literal-required] - cardinality: LinkTypeSideCardinality - foreign_key_property_api_name: typing.Optional[PropertyApiName] = pydantic.Field(alias=str("foreignKeyPropertyApiName"), default=None) # type: ignore[literal-required] - link_type_rid: LinkTypeRid = pydantic.Field(alias=str("linkTypeRid")) # type: ignore[literal-required] - - -class LinkedInterfaceTypeApiName(core.ModelBase): - """A reference to the linked interface type.""" - - api_name: InterfaceTypeApiName = pydantic.Field(alias=str("apiName")) # type: ignore[literal-required] - type: typing.Literal["interfaceTypeApiName"] = "interfaceTypeApiName" - - -class LinkedObjectLocator(core.ModelBase): - """ - Does not contain information about the source object. Should be used in a nested type that provides information about source objects. - The `targetObject` Ontology Object in this response will only ever have the `__primaryKey` and `__apiName` - fields present, thus functioning as object locators rather than full objects. - """ - - target_object: typing.Optional[OntologyObjectV2] = pydantic.Field(alias=str("targetObject"), default=None) # type: ignore[literal-required] - link_type: typing.Optional[LinkTypeApiName] = pydantic.Field(alias=str("linkType"), default=None) # type: ignore[literal-required] - - -class LinkedObjectTypeApiName(core.ModelBase): - """A reference to the linked object type.""" - - api_name: ObjectTypeApiName = pydantic.Field(alias=str("apiName")) # type: ignore[literal-required] - type: typing.Literal["objectTypeApiName"] = "objectTypeApiName" - - -class LinksFromObject(core.ModelBase): - """ - The Ontology Objects in this response will only ever have the `__primaryKey` and `__apiName` - fields present, thus functioning as object locators rather than full objects. - """ - - source_object: typing.Optional[OntologyObjectV2] = pydantic.Field(alias=str("sourceObject"), default=None) # type: ignore[literal-required] - linked_objects: typing.List[LinkedObjectLocator] = pydantic.Field(alias=str("linkedObjects")) # type: ignore[literal-required] - - -class ListActionTypesFullMetadataResponse(core.ModelBase): - """ListActionTypesFullMetadataResponse""" - - next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] - data: typing.List[ActionTypeFullMetadata] - - -class ListActionTypesResponseV2(core.ModelBase): - """ListActionTypesResponseV2""" - - next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] - data: typing.List[ActionTypeV2] - - -class ListAttachmentsResponseV2(core.ModelBase): - """ListAttachmentsResponseV2""" - - data: typing.List[AttachmentV2] - next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] - type: typing.Literal["multiple"] = "multiple" - - -class ListInterfaceLinkedObjectsResponse(core.ModelBase): - """ListInterfaceLinkedObjectsResponse""" - - data: typing.List[OntologyObjectV2] - next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] - - -class ListInterfaceTypesResponse(core.ModelBase): - """ListInterfaceTypesResponse""" - - next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] - data: typing.List[InterfaceType] - - -class ListLinkedObjectsResponseV2(core.ModelBase): - """ListLinkedObjectsResponseV2""" - - data: typing.List[OntologyObjectV2] - next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] - - -class ListObjectTypesV2Response(core.ModelBase): - """ListObjectTypesV2Response""" - - next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] - data: typing.List[ObjectTypeV2] - """The list of object types in the current page.""" - - -class ListObjectsForInterfaceResponse(core.ModelBase): - """ListObjectsForInterfaceResponse""" - - next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] - data: typing.List[OntologyObjectV2] - """The list of interface instances in the current page.""" - - total_count: core_models.TotalCount = pydantic.Field(alias=str("totalCount")) # type: ignore[literal-required] - - -class ListObjectsResponseV2(core.ModelBase): - """ListObjectsResponseV2""" - - next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] - data: typing.List[OntologyObjectV2] - """The list of objects in the current page.""" - - total_count: core_models.TotalCount = pydantic.Field(alias=str("totalCount")) # type: ignore[literal-required] - - -class ListOntologiesV2Response(core.ModelBase): - """ListOntologiesV2Response""" - - data: typing.List[OntologyV2] - """The list of Ontologies the user has access to.""" - - -class ListOntologyValueTypesResponse(core.ModelBase): - """ListOntologyValueTypesResponse""" - - data: typing.List[OntologyValueType] - - -class ListOutgoingInterfaceLinkTypesResponse(core.ModelBase): - """ListOutgoingInterfaceLinkTypesResponse""" - - next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] - data: typing.List[InterfaceLinkType] - """The list of interface link types in the current page.""" - - -class ListOutgoingLinkTypesResponseV2(core.ModelBase): - """ListOutgoingLinkTypesResponseV2""" - - next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] - data: typing.List[LinkTypeSideV2] - """The list of link type sides in the current page.""" - - -class ListQueryTypesResponseV2(core.ModelBase): - """ListQueryTypesResponseV2""" - - next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] - data: typing.List[QueryTypeV2] - - -class LoadObjectSetLinksRequestV2(core.ModelBase): - """LoadObjectSetLinksRequestV2""" - - object_set: ObjectSet = pydantic.Field(alias=str("objectSet")) # type: ignore[literal-required] - links: typing.List[LinkTypeApiName] - page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("pageToken"), default=None) # type: ignore[literal-required] - include_compute_usage: typing.Optional[core_models.IncludeComputeUsage] = pydantic.Field(alias=str("includeComputeUsage"), default=None) # type: ignore[literal-required] - - -class LoadObjectSetLinksResponseV2(core.ModelBase): - """LoadObjectSetLinksResponseV2""" - - data: typing.List[LinksFromObject] - next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] - compute_usage: typing.Optional[core_models.ComputeSeconds] = pydantic.Field(alias=str("computeUsage"), default=None) # type: ignore[literal-required] - - -class LoadObjectSetRequestV2(core.ModelBase): - """Represents the API POST body when loading an `ObjectSet`.""" - - object_set: ObjectSet = pydantic.Field(alias=str("objectSet")) # type: ignore[literal-required] - order_by: typing.Optional[SearchOrderByV2] = pydantic.Field(alias=str("orderBy"), default=None) # type: ignore[literal-required] - select: typing.List[SelectedPropertyApiName] - select_v2: typing.Optional[typing.List[PropertyIdentifier]] = pydantic.Field(alias=str("selectV2"), default=None) # type: ignore[literal-required] - """ - The identifiers of the properties to include in the response. Only selectV2 or select should be populated, - but not both. - """ - - page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("pageToken"), default=None) # type: ignore[literal-required] - page_size: typing.Optional[core_models.PageSize] = pydantic.Field(alias=str("pageSize"), default=None) # type: ignore[literal-required] - exclude_rid: typing.Optional[bool] = pydantic.Field(alias=str("excludeRid"), default=None) # type: ignore[literal-required] - """ - A flag to exclude the retrieval of the `__rid` property. - Setting this to true may improve performance of this endpoint for object types in OSV2. - """ - - snapshot: typing.Optional[bool] = None - """ - A flag to use snapshot consistency when paging. - Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. - Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. - This defaults to false if not specified, which means you will always get the latest results. - """ - - include_compute_usage: typing.Optional[core_models.IncludeComputeUsage] = pydantic.Field(alias=str("includeComputeUsage"), default=None) # type: ignore[literal-required] - - -class LoadObjectSetResponseV2(core.ModelBase): - """Represents the API response when loading an `ObjectSet`.""" - - data: typing.List[OntologyObjectV2] - """The list of objects in the current Page.""" - - next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] - total_count: core_models.TotalCount = pydantic.Field(alias=str("totalCount")) # type: ignore[literal-required] - compute_usage: typing.Optional[core_models.ComputeSeconds] = pydantic.Field(alias=str("computeUsage"), default=None) # type: ignore[literal-required] - - -class LoadObjectSetV2MultipleObjectTypesRequest(core.ModelBase): - """Represents the API POST body when loading an `ObjectSet`. Used on the `/loadObjectsMultipleObjectTypes` endpoint only.""" - - object_set: ObjectSet = pydantic.Field(alias=str("objectSet")) # type: ignore[literal-required] - order_by: typing.Optional[SearchOrderByV2] = pydantic.Field(alias=str("orderBy"), default=None) # type: ignore[literal-required] - select: typing.List[SelectedPropertyApiName] - select_v2: typing.Optional[typing.List[PropertyIdentifier]] = pydantic.Field(alias=str("selectV2"), default=None) # type: ignore[literal-required] - """ - The identifiers of the properties to include in the response. Only selectV2 or select should be populated, - but not both. - """ - - page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("pageToken"), default=None) # type: ignore[literal-required] - page_size: typing.Optional[core_models.PageSize] = pydantic.Field(alias=str("pageSize"), default=None) # type: ignore[literal-required] - exclude_rid: typing.Optional[bool] = pydantic.Field(alias=str("excludeRid"), default=None) # type: ignore[literal-required] - """ - A flag to exclude the retrieval of the `$rid` property. - Setting this to true may improve performance of this endpoint for object types in OSV2. - """ - - snapshot: typing.Optional[bool] = None - """ - A flag to use snapshot consistency when paging. - Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. - Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. - This defaults to false if not specified, which means you will always get the latest results. - """ - - include_compute_usage: typing.Optional[core_models.IncludeComputeUsage] = pydantic.Field(alias=str("includeComputeUsage"), default=None) # type: ignore[literal-required] - - -class LoadObjectSetV2MultipleObjectTypesResponse(core.ModelBase): - """ - Represents the API response when loading an `ObjectSet`. An `interfaceToObjectTypeMappings` field is - optionally returned if the type scope of the returned object set includes any interfaces. The "type scope" - of an object set refers to whether objects contain all their properties (object-type type scope) or just the - properties that implement interface properties (interface type scope). There can be multiple type scopes in a - single object set- some objects may have all their properties and some may only have interface properties. - - The `interfaceToObjectTypeMappings` field contains mappings from `SharedPropertyTypeApiName`s on the interface(s) to - `PropertyApiName` for properties on the object(s). - - The `interfaceToObjectTypeMappingsV2` field contains mappings from `InterfacePropertyApiName`s on the - interface(s) to `InterfacePropertyTypeImplementation` for properties on the object(s). This therefore includes - implementations of both properties backed by SharedPropertyTypes as well as properties defined on the interface. - """ - - data: typing.List[OntologyObjectV2] - """The list of objects in the current page.""" - - next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] - total_count: core_models.TotalCount = pydantic.Field(alias=str("totalCount")) # type: ignore[literal-required] - interface_to_object_type_mappings: typing.Dict[InterfaceTypeApiName, InterfaceToObjectTypeMappings] = pydantic.Field(alias=str("interfaceToObjectTypeMappings")) # type: ignore[literal-required] - interface_to_object_type_mappings_v2: typing.Dict[InterfaceTypeApiName, InterfaceToObjectTypeMappingsV2] = pydantic.Field(alias=str("interfaceToObjectTypeMappingsV2")) # type: ignore[literal-required] - compute_usage: typing.Optional[core_models.ComputeSeconds] = pydantic.Field(alias=str("computeUsage"), default=None) # type: ignore[literal-required] - - -class LoadObjectSetV2ObjectsOrInterfacesRequest(core.ModelBase): - """Represents the API POST body when loading an `ObjectSet`. Used on the `/loadObjectsOrInterfaces` endpoint only.""" - - object_set: ObjectSet = pydantic.Field(alias=str("objectSet")) # type: ignore[literal-required] - order_by: typing.Optional[SearchOrderByV2] = pydantic.Field(alias=str("orderBy"), default=None) # type: ignore[literal-required] - select: typing.List[SelectedPropertyApiName] - select_v2: typing.Optional[typing.List[PropertyIdentifier]] = pydantic.Field(alias=str("selectV2"), default=None) # type: ignore[literal-required] - """ - The identifiers of the properties to include in the response. Only selectV2 or select should be populated, - but not both. - """ - - page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("pageToken"), default=None) # type: ignore[literal-required] - page_size: typing.Optional[core_models.PageSize] = pydantic.Field(alias=str("pageSize"), default=None) # type: ignore[literal-required] - exclude_rid: typing.Optional[bool] = pydantic.Field(alias=str("excludeRid"), default=None) # type: ignore[literal-required] - """ - A flag to exclude the retrieval of the `$rid` property. - Setting this to true may improve performance of this endpoint for object types in OSV2. - """ - - snapshot: typing.Optional[bool] = None - """ - A flag to use snapshot consistency when paging. - Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. - Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. - This defaults to false if not specified, which means you will always get the latest results. - """ - - -class LoadObjectSetV2ObjectsOrInterfacesResponse(core.ModelBase): - """ - Represents the API response when loading an `ObjectSet`. Objects in the returned set can either have properties - defined by an interface that the objects belong to or properties defined by the object type of the object. - """ - - data: typing.List[OntologyObjectV2] - """The list of objects in the current page.""" - - next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] - total_count: core_models.TotalCount = pydantic.Field(alias=str("totalCount")) # type: ignore[literal-required] - - -class LoadOntologyMetadataRequest(core.ModelBase): - """The Ontology metadata (i.e., object, link, action, query, and interface types) to load.""" - - object_types: typing.List[ObjectTypeApiName] = pydantic.Field(alias=str("objectTypes")) # type: ignore[literal-required] - link_types: typing.List[LinkTypeApiName] = pydantic.Field(alias=str("linkTypes")) # type: ignore[literal-required] - action_types: typing.List[ActionTypeApiName] = pydantic.Field(alias=str("actionTypes")) # type: ignore[literal-required] - query_types: typing.List[VersionedQueryTypeApiName] = pydantic.Field(alias=str("queryTypes")) # type: ignore[literal-required] - interface_types: typing.List[InterfaceTypeApiName] = pydantic.Field(alias=str("interfaceTypes")) # type: ignore[literal-required] - - -LogicRule = typing_extensions.Annotated[ - typing.Union[ - "DeleteInterfaceObjectRule", - "ModifyInterfaceObjectRule", - "ModifyObjectRule", - "DeleteObjectRule", - "CreateInterfaceObjectRule", - "DeleteLinkRule", - "CreateObjectRule", - "CreateLinkRule", - ], - pydantic.Field(discriminator="type"), -] -"""LogicRule""" - - -LogicRuleArgument = typing_extensions.Annotated[ - typing.Union[ - "CurrentTimeArgument", - "StaticArgument", - "CurrentUserArgument", - "ParameterIdArgument", - "InterfaceParameterPropertyArgument", - "SynchronousWebhookOutputArgument", - "ObjectParameterPropertyArgument", - "UniqueIdentifierArgument", - ], - pydantic.Field(discriminator="type"), -] -"""Represents an argument for a logic rule operation. An argument can be passed in via the action parameters, as a static value, or as some other value.""" - - -class LtQueryV2(core.ModelBase): - """ - Returns objects where the specified field is less than a value. Allows you to specify a property to query on - by a variety of means. Either `field` or `propertyIdentifier` must be supplied, but not both. - """ - - field: typing.Optional[PropertyApiName] = None - property_identifier: typing.Optional[PropertyIdentifier] = pydantic.Field(alias=str("propertyIdentifier"), default=None) # type: ignore[literal-required] - value: PropertyValue - type: typing.Literal["lt"] = "lt" - - -class LteQueryV2(core.ModelBase): - """ - Returns objects where the specified field is less than or equal to a value. Allows you to specify a property to - query on by a variety of means. Either `field` or `propertyIdentifier` must be supplied, but not both. - """ - - field: typing.Optional[PropertyApiName] = None - property_identifier: typing.Optional[PropertyIdentifier] = pydantic.Field(alias=str("propertyIdentifier"), default=None) # type: ignore[literal-required] - value: PropertyValue - type: typing.Literal["lte"] = "lte" - - -class MatchRule(core.ModelBase): - """Matches intervals containing the terms in the query""" - - query: str - max_gaps: typing.Optional[int] = pydantic.Field(alias=str("maxGaps"), default=None) # type: ignore[literal-required] - """ - The maximum gaps between matched terms in the interval. For example, in the text "quick brown fox", - the terms "quick" and "fox" have a gap of one. If not set, then gaps are not considered. - """ - - ordered: bool - """If true, the matched terms must occur in order.""" - - type: typing.Literal["match"] = "match" - - -class MaxAggregationV2(core.ModelBase): - """Computes the maximum value for the provided field.""" - - field: PropertyApiName - name: typing.Optional[AggregationMetricName] = None - direction: typing.Optional[OrderByDirection] = None - type: typing.Literal["max"] = "max" - - -class MediaMetadata(core.ModelBase): - """MediaMetadata""" - - path: typing.Optional[core_models.MediaItemPath] = None - size_bytes: core_models.SizeBytes = pydantic.Field(alias=str("sizeBytes")) # type: ignore[literal-required] - media_type: core_models.MediaType = pydantic.Field(alias=str("mediaType")) # type: ignore[literal-required] - - -class MinAggregationV2(core.ModelBase): - """Computes the minimum value for the provided field.""" - - field: PropertyApiName - name: typing.Optional[AggregationMetricName] = None - direction: typing.Optional[OrderByDirection] = None - type: typing.Literal["min"] = "min" - - -class ModifyInterfaceLogicRule(core.ModelBase): - """ModifyInterfaceLogicRule""" - - interface_object_to_modify: ParameterId = pydantic.Field(alias=str("interfaceObjectToModify")) # type: ignore[literal-required] - shared_property_arguments: typing.Dict[SharedPropertyTypeApiName, LogicRuleArgument] = pydantic.Field(alias=str("sharedPropertyArguments")) # type: ignore[literal-required] - struct_property_arguments: typing.Dict[SharedPropertyTypeApiName, typing.Dict[StructFieldApiName, StructFieldArgument]] = pydantic.Field(alias=str("structPropertyArguments")) # type: ignore[literal-required] - type: typing.Literal["modifyInterface"] = "modifyInterface" - - -class ModifyInterfaceObjectRule(core.ModelBase): - """ModifyInterfaceObjectRule""" - - interface_type_api_name: InterfaceTypeApiName = pydantic.Field(alias=str("interfaceTypeApiName")) # type: ignore[literal-required] - type: typing.Literal["modifyInterfaceObject"] = "modifyInterfaceObject" - - -class ModifyObject(core.ModelBase): - """ModifyObject""" - - primary_key: PropertyValue = pydantic.Field(alias=str("primaryKey")) # type: ignore[literal-required] - object_type: ObjectTypeApiName = pydantic.Field(alias=str("objectType")) # type: ignore[literal-required] - type: typing.Literal["modifyObject"] = "modifyObject" - - -class ModifyObjectEdit(core.ModelBase): - """ModifyObjectEdit""" - - object_type: ObjectTypeApiName = pydantic.Field(alias=str("objectType")) # type: ignore[literal-required] - primary_key: PropertyValue = pydantic.Field(alias=str("primaryKey")) # type: ignore[literal-required] - properties: typing.Dict[PropertyApiName, DataValue] - type: typing.Literal["modifyObject"] = "modifyObject" - - -class ModifyObjectLogicRule(core.ModelBase): - """ModifyObjectLogicRule""" - - object_to_modify: ParameterId = pydantic.Field(alias=str("objectToModify")) # type: ignore[literal-required] - property_arguments: typing.Dict[PropertyApiName, LogicRuleArgument] = pydantic.Field(alias=str("propertyArguments")) # type: ignore[literal-required] - struct_property_arguments: typing.Dict[PropertyApiName, typing.Dict[StructFieldApiName, StructFieldArgument]] = pydantic.Field(alias=str("structPropertyArguments")) # type: ignore[literal-required] - type: typing.Literal["modifyObject"] = "modifyObject" - - -class ModifyObjectRule(core.ModelBase): - """ModifyObjectRule""" - - object_type_api_name: ObjectTypeApiName = pydantic.Field(alias=str("objectTypeApiName")) # type: ignore[literal-required] - type: typing.Literal["modifyObject"] = "modifyObject" - - -class MultiplyPropertyExpression(core.ModelBase): - """Multiplies two or more numeric values.""" - - properties: typing.List[DerivedPropertyDefinition] - type: typing.Literal["multiply"] = "multiply" - - -NearestNeighborsQuery = typing_extensions.Annotated[ - typing.Union["DoubleVector", "NearestNeighborsQueryText"], pydantic.Field(discriminator="type") -] -""" -Queries support either a vector matching the embedding model defined on the property, or text that is -automatically embedded. -""" - - -class NearestNeighborsQueryText(core.ModelBase): - """Automatically embed the text in a vector using the embedding model configured for the given propertyIdentifier.""" - - value: str - type: typing.Literal["text"] = "text" - - -class NegatePropertyExpression(core.ModelBase): - """Negates a numeric value.""" - - property: DerivedPropertyDefinition - type: typing.Literal["negate"] = "negate" - - -NestedInterfacePropertyTypeImplementation = typing_extensions.Annotated[ - typing.Union[ - "InterfacePropertyStructFieldImplementation", - "InterfacePropertyStructImplementation", - "InterfacePropertyLocalPropertyImplementation", - ], - pydantic.Field(discriminator="type"), -] -""" -Describes how an object type implements an interface property when a reducer is applied to it. Is missing a -reduced property implementation to prevent arbitrarily nested implementations. -""" - - -class NestedQueryAggregation(core.ModelBase): - """NestedQueryAggregation""" - - key: typing.Any - groups: typing.List[QueryAggregation] - - -class NotQueryV2(core.ModelBase): - """Returns objects where the query is not satisfied.""" - - value: SearchJsonQueryV2 - type: typing.Literal["not"] = "not" - - -class NumberFormatAffix(core.ModelBase): - """ - Attach arbitrary text before and/or after the formatted number. - Example: prefix "USD " and postfix " total" displays as "USD 1,234.56 total" - """ - - base_format_options: NumberFormatOptions = pydantic.Field(alias=str("baseFormatOptions")) # type: ignore[literal-required] - affix: Affix - type: typing.Literal["affix"] = "affix" - - -class NumberFormatCurrency(core.ModelBase): - """ - Format numbers as currency values with proper symbols and styling. - Example: 1234.56 with currency "USD" displays as "USD 1,234.56" (standard) or "USD 1.2K" (compact) - """ - - base_format_options: NumberFormatOptions = pydantic.Field(alias=str("baseFormatOptions")) # type: ignore[literal-required] - style: NumberFormatCurrencyStyle - currency_code: PropertyTypeReferenceOrStringConstant = pydantic.Field(alias=str("currencyCode")) # type: ignore[literal-required] - type: typing.Literal["currency"] = "currency" - - -NumberFormatCurrencyStyle = typing.Literal["STANDARD", "COMPACT"] -""" -Currency rendering style options: -- STANDARD: Full currency formatting (e.g., "USD 1,234.56") -- COMPACT: Abbreviated currency formatting (e.g., "USD 1.2K") -""" - - -class NumberFormatCustomUnit(core.ModelBase): - """ - Format numbers with custom units not supported by standard formatting. - Use this for domain-specific units like "requests/sec", "widgets", etc. - Example: 1500 with unit "widgets" displays as "1,500 widgets" - """ - - base_format_options: NumberFormatOptions = pydantic.Field(alias=str("baseFormatOptions")) # type: ignore[literal-required] - unit: PropertyTypeReferenceOrStringConstant - type: typing.Literal["customUnit"] = "customUnit" - - -class NumberFormatDuration(core.ModelBase): - """ - Format numeric values representing time durations. - - Human readable: 3661 seconds displays as "1h 1m 1s" - - Timecode: 3661 seconds displays as "01:01:01" - """ - - format_style: DurationFormatStyle = pydantic.Field(alias=str("formatStyle")) # type: ignore[literal-required] - precision: typing.Optional[DurationPrecision] = None - base_value: DurationBaseValue = pydantic.Field(alias=str("baseValue")) # type: ignore[literal-required] - type: typing.Literal["duration"] = "duration" - - -class NumberFormatFixedValues(core.ModelBase): - """ - Map integer values to custom human-readable strings. - Example: {1: "First", 2: "Second", 3: "Third"} would display 2 as "Second". - """ - - values: typing.Dict[FixedValuesMapKey, str] - type: typing.Literal["fixedValues"] = "fixedValues" - - -NumberFormatNotation = typing.Literal["STANDARD", "SCIENTIFIC", "ENGINEERING", "COMPACT"] -""" -Number notation style options: -- STANDARD: Regular number display ("1,234") -- SCIENTIFIC: Scientific notation ("1.234E3") -- ENGINEERING: Engineering notation ("1.234E3") -- COMPACT: Compact notation ("1.2K") -""" - - -class NumberFormatOptions(core.ModelBase): - """ - Base number formatting options that can be applied to all number formatters. - Controls precision, grouping, rounding, and notation. Consistent with JavaScript's Intl.NumberFormat. - - Examples: - - useGrouping: true makes 1234567 display as "1,234,567" - - maximumFractionDigits: 2 makes 3.14159 display as "3.14" - - notation: SCIENTIFIC makes 1234 display as "1.234E3" - """ - - use_grouping: typing.Optional[bool] = pydantic.Field(alias=str("useGrouping"), default=None) # type: ignore[literal-required] - """If true, show a locale-appropriate number grouping (e.g. thousands for en).""" - - convert_negative_to_parenthesis: typing.Optional[bool] = pydantic.Field(alias=str("convertNegativeToParenthesis"), default=None) # type: ignore[literal-required] - """If true, wrap negative numbers in parentheses instead of a minus sign.""" - - minimum_integer_digits: typing.Optional[int] = pydantic.Field(alias=str("minimumIntegerDigits"), default=None) # type: ignore[literal-required] - minimum_fraction_digits: typing.Optional[int] = pydantic.Field(alias=str("minimumFractionDigits"), default=None) # type: ignore[literal-required] - maximum_fraction_digits: typing.Optional[int] = pydantic.Field(alias=str("maximumFractionDigits"), default=None) # type: ignore[literal-required] - minimum_significant_digits: typing.Optional[int] = pydantic.Field(alias=str("minimumSignificantDigits"), default=None) # type: ignore[literal-required] - maximum_significant_digits: typing.Optional[int] = pydantic.Field(alias=str("maximumSignificantDigits"), default=None) # type: ignore[literal-required] - notation: typing.Optional[NumberFormatNotation] = None - rounding_mode: typing.Optional[NumberRoundingMode] = pydantic.Field(alias=str("roundingMode"), default=None) # type: ignore[literal-required] - - -class NumberFormatRatio(core.ModelBase): - """ - Display the value as a ratio with different scaling factors and suffixes: - - PERCENTAGE: Multiply by 100 and add "%" suffix (0.15 → "15%") - - PER_MILLE: Multiply by 1000 and add "‰" suffix (0.015 → "15‰") - - BASIS_POINTS: Multiply by 10000 and add "bps" suffix (0.0015 → "15bps") - """ - - ratio_type: NumberRatioType = pydantic.Field(alias=str("ratioType")) # type: ignore[literal-required] - base_format_options: NumberFormatOptions = pydantic.Field(alias=str("baseFormatOptions")) # type: ignore[literal-required] - type: typing.Literal["ratio"] = "ratio" - - -class NumberFormatScale(core.ModelBase): - """ - Scale the numeric value by dividing by the specified factor and append an appropriate suffix. - - THOUSANDS: 1500 displays as "1.5K" - - MILLIONS: 2500000 displays as "2.5M" - - BILLIONS: 3200000000 displays as "3.2B" - """ - - scale_type: NumberScaleType = pydantic.Field(alias=str("scaleType")) # type: ignore[literal-required] - base_format_options: NumberFormatOptions = pydantic.Field(alias=str("baseFormatOptions")) # type: ignore[literal-required] - type: typing.Literal["scale"] = "scale" - - -class NumberFormatStandard(core.ModelBase): - """ - Standard number formatting with configurable options. - This provides basic number formatting without any special units, scaling, or transformations. - """ - - base_format_options: NumberFormatOptions = pydantic.Field(alias=str("baseFormatOptions")) # type: ignore[literal-required] - type: typing.Literal["standard"] = "standard" - - -class NumberFormatStandardUnit(core.ModelBase): - """ - Format numbers with standard units supported by Intl.NumberFormat. - Examples: "meter", "kilogram", "celsius", "percent" - Input: 25 with unit "celsius" displays as "25 degrees C" - """ - - base_format_options: NumberFormatOptions = pydantic.Field(alias=str("baseFormatOptions")) # type: ignore[literal-required] - unit: PropertyTypeReferenceOrStringConstant - type: typing.Literal["standardUnit"] = "standardUnit" - - -NumberRatioType = typing.Literal["PERCENTAGE", "PER_MILLE", "BASIS_POINTS"] -""" -Ratio format options for displaying proportional values: -- PERCENTAGE: Multiply by 100 and add "%" suffix -- PER_MILLE: Multiply by 1000 and add "‰" suffix -- BASIS_POINTS: Multiply by 10000 and add "bps" suffix -""" - - -NumberRoundingMode = typing.Literal["CEIL", "FLOOR", "ROUND_CLOSEST"] -""" -Number rounding behavior: -- CEIL: Always round up (3.1 becomes 4) -- FLOOR: Always round down (3.9 becomes 3) -- ROUND_CLOSEST: Round to nearest (3.4 becomes 3, 3.6 becomes 4) -""" - - -NumberScaleType = typing.Literal["THOUSANDS", "MILLIONS", "BILLIONS"] -""" -Scale factor options for large numbers: -- THOUSANDS: Divide by 1,000 and add "K" suffix -- MILLIONS: Divide by 1,000,000 and add "M" suffix -- BILLIONS: Divide by 1,000,000,000 and add "B" suffix -""" - - -ObjectEdit = typing_extensions.Annotated[ - typing.Union["ModifyObject", "DeleteObject", "AddObject", "DeleteLink", "AddLink"], - pydantic.Field(discriminator="type"), -] -"""ObjectEdit""" - - -class ObjectEdits(core.ModelBase): - """ObjectEdits""" - - edits: typing.List[ObjectEdit] - added_object_count: int = pydantic.Field(alias=str("addedObjectCount")) # type: ignore[literal-required] - modified_objects_count: int = pydantic.Field(alias=str("modifiedObjectsCount")) # type: ignore[literal-required] - deleted_objects_count: int = pydantic.Field(alias=str("deletedObjectsCount")) # type: ignore[literal-required] - added_links_count: int = pydantic.Field(alias=str("addedLinksCount")) # type: ignore[literal-required] - deleted_links_count: int = pydantic.Field(alias=str("deletedLinksCount")) # type: ignore[literal-required] - type: typing.Literal["edits"] = "edits" - - -class ObjectParameterPropertyArgument(core.ModelBase): - """Represents an object parameter property argument in a logic rule.""" - - parameter_id: ParameterId = pydantic.Field(alias=str("parameterId")) # type: ignore[literal-required] - property_type_api_name: PropertyTypeApiName = pydantic.Field(alias=str("propertyTypeApiName")) # type: ignore[literal-required] - type: typing.Literal["objectParameterPropertyValue"] = "objectParameterPropertyValue" - - -ObjectPropertyType = typing_extensions.Annotated[ - typing.Union[ - core_models.DateType, - "StructType", - core_models.StringType, - core_models.ByteType, - core_models.DoubleType, - core_models.GeoPointType, - core_models.GeotimeSeriesReferenceType, - core_models.IntegerType, - core_models.FloatType, - core_models.GeoShapeType, - core_models.LongType, - core_models.BooleanType, - core_models.CipherTextType, - core_models.MarkingType, - core_models.AttachmentType, - core_models.MediaReferenceType, - core_models.TimeseriesType, - "OntologyObjectArrayType", - core_models.ShortType, - core_models.VectorType, - core_models.DecimalType, - core_models.TimestampType, - ], - pydantic.Field(discriminator="type"), -] -"""A union of all the types supported by Ontology Object properties.""" - - -class ObjectPropertyValueConstraint(core.ModelBase): - """The parameter value must be a property value of an object found within an object set.""" - - type: typing.Literal["objectPropertyValue"] = "objectPropertyValue" - - -class ObjectQueryResultConstraint(core.ModelBase): - """The parameter value must be the primary key of an object found within an object set.""" - - type: typing.Literal["objectQueryResult"] = "objectQueryResult" - - -ObjectRid = core.RID -"""The unique resource identifier of an object, useful for interacting with other Foundry APIs.""" - - -ObjectSet = typing_extensions.Annotated[ - typing.Union[ - "ObjectSetSearchAroundType", - "ObjectSetStaticType", - "ObjectSetIntersectionType", - "ObjectSetWithPropertiesType", - "ObjectSetInterfaceLinkSearchAroundType", - "ObjectSetSubtractType", - "ObjectSetNearestNeighborsType", - "ObjectSetUnionType", - "ObjectSetAsTypeType", - "ObjectSetMethodInputType", - "ObjectSetReferenceType", - "ObjectSetFilterType", - "ObjectSetInterfaceBaseType", - "ObjectSetAsBaseObjectTypesType", - "ObjectSetBaseType", - ], - pydantic.Field(discriminator="type"), -] -"""Represents the definition of an `ObjectSet` in the `Ontology`.""" - - -class ObjectSetAsBaseObjectTypesType(core.ModelBase): - """ - Casts the objects in the object set to their base type and thus ensures objects are returned with all of their - properties in the resulting object set, not just the properties that implement interface properties. - """ - - object_set: ObjectSet = pydantic.Field(alias=str("objectSet")) # type: ignore[literal-required] - type: typing.Literal["asBaseObjectTypes"] = "asBaseObjectTypes" - - -class ObjectSetAsTypeType(core.ModelBase): - """ - Casts an object set to a specified object type or interface type API name. Any object whose object type does - not match the object type provided or implement the interface type provided will be dropped from the resulting - object set. - """ - - entity_type: str = pydantic.Field(alias=str("entityType")) # type: ignore[literal-required] - """An object type or interface type API name.""" - - object_set: ObjectSet = pydantic.Field(alias=str("objectSet")) # type: ignore[literal-required] - type: typing.Literal["asType"] = "asType" - - -class ObjectSetBaseType(core.ModelBase): - """ObjectSetBaseType""" - - object_type: str = pydantic.Field(alias=str("objectType")) # type: ignore[literal-required] - """The API name of the object type.""" - - type: typing.Literal["base"] = "base" - - -class ObjectSetFilterType(core.ModelBase): - """ObjectSetFilterType""" - - object_set: ObjectSet = pydantic.Field(alias=str("objectSet")) # type: ignore[literal-required] - where: SearchJsonQueryV2 - type: typing.Literal["filter"] = "filter" - - -class ObjectSetInterfaceBaseType(core.ModelBase): - """ObjectSetInterfaceBaseType""" - - interface_type: str = pydantic.Field(alias=str("interfaceType")) # type: ignore[literal-required] - """ - An object set with objects that implement the interface with the given interface API name. The objects in - the object set will only have properties that implement properties of the given interface, unless you set the includeAllBaseObjectProperties flag. - """ - - include_all_base_object_properties: typing.Optional[bool] = pydantic.Field(alias=str("includeAllBaseObjectProperties"), default=None) # type: ignore[literal-required] - """ - A flag that will return all of the underlying object properties for the objects that implement the interface. - This includes properties that don't explicitly implement an SPT on the interface. - """ - - type: typing.Literal["interfaceBase"] = "interfaceBase" - - -class ObjectSetInterfaceLinkSearchAroundType(core.ModelBase): - """ObjectSetInterfaceLinkSearchAroundType""" - - object_set: ObjectSet = pydantic.Field(alias=str("objectSet")) # type: ignore[literal-required] - interface_link: InterfaceLinkTypeApiName = pydantic.Field(alias=str("interfaceLink")) # type: ignore[literal-required] - type: typing.Literal["interfaceLinkSearchAround"] = "interfaceLinkSearchAround" - - -class ObjectSetIntersectionType(core.ModelBase): - """ObjectSetIntersectionType""" - - object_sets: typing.List[ObjectSet] = pydantic.Field(alias=str("objectSets")) # type: ignore[literal-required] - type: typing.Literal["intersect"] = "intersect" - - -class ObjectSetMethodInputType(core.ModelBase): - """ - ObjectSet which is the root of a MethodObjectSet definition. - - This feature is experimental and not yet generally available. - """ - - type: typing.Literal["methodInput"] = "methodInput" - - -class ObjectSetNearestNeighborsType(core.ModelBase): - """ - ObjectSet containing the top `numNeighbors` objects with `propertyIdentifier` nearest to the input vector or - text. This can only be performed on a property with type vector that has been configured to be searched with - approximate nearest neighbors using a similarity function configured in the Ontology. - - A non-zero score for each resulting object is returned when the `orderType` in the `orderBy` field is set to - `relevance`. Note that: - - Scores will not be returned if a nearestNeighbors object set is composed through union, subtraction - or intersection with non-nearestNeighbors object sets. - - If results have scores, the order of the scores will be decreasing (duplicate scores are possible). - """ - - object_set: ObjectSet = pydantic.Field(alias=str("objectSet")) # type: ignore[literal-required] - property_identifier: PropertyIdentifier = pydantic.Field(alias=str("propertyIdentifier")) # type: ignore[literal-required] - num_neighbors: int = pydantic.Field(alias=str("numNeighbors")) # type: ignore[literal-required] - """ - The number of objects to return. If the number of documents in the objectType is less than the provided - value, all objects will be returned. This value is limited to 1 <= numNeighbors <= 500. - """ - - similarity_threshold: typing.Optional[float] = pydantic.Field(alias=str("similarityThreshold"), default=None) # type: ignore[literal-required] - """ - The similarity threshold results must be above to be included in the returned in the object set. - 0 <= Threshold <= 1. Where 1 is identical and 0 is least similar. - """ - - query: NearestNeighborsQuery - type: typing.Literal["nearestNeighbors"] = "nearestNeighbors" - - -class ObjectSetReferenceType(core.ModelBase): - """ObjectSetReferenceType""" - - reference: ObjectSetRid - type: typing.Literal["reference"] = "reference" - - -ObjectSetRid = core.RID -"""ObjectSetRid""" - - -class ObjectSetSearchAroundType(core.ModelBase): - """ObjectSetSearchAroundType""" - - object_set: ObjectSet = pydantic.Field(alias=str("objectSet")) # type: ignore[literal-required] - link: LinkTypeApiName - type: typing.Literal["searchAround"] = "searchAround" - - -class ObjectSetStaticType(core.ModelBase): - """ObjectSetStaticType""" - - objects: typing.List[ObjectRid] - type: typing.Literal["static"] = "static" - - -class ObjectSetSubtractType(core.ModelBase): - """ObjectSetSubtractType""" - - object_sets: typing.List[ObjectSet] = pydantic.Field(alias=str("objectSets")) # type: ignore[literal-required] - type: typing.Literal["subtract"] = "subtract" - - -class ObjectSetUnionType(core.ModelBase): - """ObjectSetUnionType""" - - object_sets: typing.List[ObjectSet] = pydantic.Field(alias=str("objectSets")) # type: ignore[literal-required] - type: typing.Literal["union"] = "union" - - -class ObjectSetWithPropertiesType(core.ModelBase): - """ - ObjectSet which returns objects with additional derived properties. - - This feature is experimental and not yet generally available. - """ - - object_set: ObjectSet = pydantic.Field(alias=str("objectSet")) # type: ignore[literal-required] - derived_properties: typing.Dict[DerivedPropertyApiName, DerivedPropertyDefinition] = pydantic.Field(alias=str("derivedProperties")) # type: ignore[literal-required] - """Map of the name of the derived property to return and its definition""" - - type: typing.Literal["withProperties"] = "withProperties" - - -ObjectTypeApiName = str -""" -The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the -`List object types` endpoint or check the **Ontology Manager**. -""" - - -class ObjectTypeEdits(core.ModelBase): - """ObjectTypeEdits""" - - edited_object_types: typing.List[ObjectTypeApiName] = pydantic.Field(alias=str("editedObjectTypes")) # type: ignore[literal-required] - type: typing.Literal["largeScaleEdits"] = "largeScaleEdits" - - -class ObjectTypeFullMetadata(core.ModelBase): - """ObjectTypeFullMetadata""" - - object_type: ObjectTypeV2 = pydantic.Field(alias=str("objectType")) # type: ignore[literal-required] - link_types: typing.List[LinkTypeSideV2] = pydantic.Field(alias=str("linkTypes")) # type: ignore[literal-required] - implements_interfaces: typing.List[InterfaceTypeApiName] = pydantic.Field(alias=str("implementsInterfaces")) # type: ignore[literal-required] - """A list of interfaces that this object type implements.""" - - implements_interfaces2: typing.Dict[InterfaceTypeApiName, ObjectTypeInterfaceImplementation] = pydantic.Field(alias=str("implementsInterfaces2")) # type: ignore[literal-required] - """A list of interfaces that this object type implements and how it implements them.""" - - shared_property_type_mapping: typing.Dict[SharedPropertyTypeApiName, PropertyApiName] = pydantic.Field(alias=str("sharedPropertyTypeMapping")) # type: ignore[literal-required] - """ - A map from shared property type API name to backing local property API name for the shared property types - present on this object type. - """ - - -ObjectTypeId = str -"""The unique identifier (ID) for an object type. This can be viewed in [Ontology Manager](https://palantir.com/docs/foundry/ontology-manager/overview/).""" - - -class ObjectTypeInterfaceImplementation(core.ModelBase): - """ObjectTypeInterfaceImplementation""" - - properties: typing.Dict[SharedPropertyTypeApiName, PropertyApiName] - properties_v2: typing.Dict[InterfacePropertyApiName, InterfacePropertyTypeImplementation] = pydantic.Field(alias=str("propertiesV2")) # type: ignore[literal-required] - links: typing.Dict[InterfaceLinkTypeApiName, typing.List[LinkTypeApiName]] - - -ObjectTypeRid = core.RID -"""The unique resource identifier of an object type, useful for interacting with other Foundry APIs.""" - - -class ObjectTypeV2(core.ModelBase): - """Represents an object type in the Ontology.""" - - api_name: ObjectTypeApiName = pydantic.Field(alias=str("apiName")) # type: ignore[literal-required] - display_name: core_models.DisplayName = pydantic.Field(alias=str("displayName")) # type: ignore[literal-required] - status: core_models.ReleaseStatus - description: typing.Optional[str] = None - """The description of the object type.""" - - plural_display_name: str = pydantic.Field(alias=str("pluralDisplayName")) # type: ignore[literal-required] - """The plural display name of the object type.""" - - icon: Icon - primary_key: PropertyApiName = pydantic.Field(alias=str("primaryKey")) # type: ignore[literal-required] - properties: typing.Dict[PropertyApiName, PropertyV2] - """A map of the properties of the object type.""" - - rid: ObjectTypeRid - title_property: PropertyApiName = pydantic.Field(alias=str("titleProperty")) # type: ignore[literal-required] - visibility: typing.Optional[ObjectTypeVisibility] = None - - -ObjectTypeVisibility = typing.Literal["NORMAL", "PROMINENT", "HIDDEN"] -"""The suggested visibility of the object type.""" - - -class OneOfConstraint(core.ModelBase): - """The parameter has a manually predefined set of options.""" - - options: typing.List[ParameterOption] - other_values_allowed: bool = pydantic.Field(alias=str("otherValuesAllowed")) # type: ignore[literal-required] - """A flag denoting whether custom, user provided values will be considered valid. This is configured via the **Allowed "Other" value** toggle in the **Ontology Manager**.""" - - type: typing.Literal["oneOf"] = "oneOf" - - -OntologyApiName = str -"""OntologyApiName""" - - -class OntologyArrayType(core.ModelBase): - """OntologyArrayType""" - - item_type: OntologyDataType = pydantic.Field(alias=str("itemType")) # type: ignore[literal-required] - type: typing.Literal["array"] = "array" - - -OntologyDataType = typing_extensions.Annotated[ - typing.Union[ - core_models.DateType, - "OntologyStructType", - "OntologySetType", - core_models.StringType, - core_models.ByteType, - core_models.DoubleType, - core_models.IntegerType, - core_models.FloatType, - core_models.AnyType, - core_models.LongType, - core_models.BooleanType, - core_models.CipherTextType, - core_models.MarkingType, - core_models.UnsupportedType, - "OntologyArrayType", - "OntologyObjectSetType", - core_models.BinaryType, - core_models.ShortType, - core_models.DecimalType, - "OntologyMapType", - core_models.TimestampType, - "OntologyObjectType", - ], - pydantic.Field(discriminator="type"), -] -"""A union of all the primitive types used by Palantir's Ontology-based products.""" - - -class OntologyFullMetadata(core.ModelBase): - """OntologyFullMetadata""" - - ontology: OntologyV2 - object_types: typing.Dict[ObjectTypeApiName, ObjectTypeFullMetadata] = pydantic.Field(alias=str("objectTypes")) # type: ignore[literal-required] - action_types: typing.Dict[ActionTypeApiName, ActionTypeV2] = pydantic.Field(alias=str("actionTypes")) # type: ignore[literal-required] - query_types: typing.Dict[VersionedQueryTypeApiName, QueryTypeV2] = pydantic.Field(alias=str("queryTypes")) # type: ignore[literal-required] - interface_types: typing.Dict[InterfaceTypeApiName, InterfaceType] = pydantic.Field(alias=str("interfaceTypes")) # type: ignore[literal-required] - shared_property_types: typing.Dict[SharedPropertyTypeApiName, SharedPropertyType] = pydantic.Field(alias=str("sharedPropertyTypes")) # type: ignore[literal-required] - branch: typing.Optional[core_models.BranchMetadata] = None - value_types: typing.Dict[ValueTypeApiName, OntologyValueType] = pydantic.Field(alias=str("valueTypes")) # type: ignore[literal-required] - - -OntologyIdentifier = str -""" -The API name or RID of the Ontology. To find the API name or RID, use the **List Ontologies** endpoint or -check the **Ontology Manager**. -""" - - -class OntologyInterfaceObjectSetType(core.ModelBase): - """OntologyInterfaceObjectSetType""" - - interface_type_api_name: InterfaceTypeApiName = pydantic.Field(alias=str("interfaceTypeApiName")) # type: ignore[literal-required] - type: typing.Literal["interfaceObjectSet"] = "interfaceObjectSet" - - -class OntologyInterfaceObjectType(core.ModelBase): - """OntologyInterfaceObjectType""" - - interface_type_api_name: typing.Optional[InterfaceTypeApiName] = pydantic.Field(alias=str("interfaceTypeApiName"), default=None) # type: ignore[literal-required] - type: typing.Literal["interfaceObject"] = "interfaceObject" - - -class OntologyMapType(core.ModelBase): - """OntologyMapType""" - - key_type: OntologyDataType = pydantic.Field(alias=str("keyType")) # type: ignore[literal-required] - value_type: OntologyDataType = pydantic.Field(alias=str("valueType")) # type: ignore[literal-required] - type: typing.Literal["map"] = "map" - - -class OntologyObjectArrayType(core.ModelBase): - """OntologyObjectArrayType""" - - sub_type: ObjectPropertyType = pydantic.Field(alias=str("subType")) # type: ignore[literal-required] - reducers: typing.List[OntologyObjectArrayTypeReducer] - """ - If non-empty, this property can be reduced to a single value of the subtype. The reducers are applied in - order to determine a winning value. The array can be loaded as a reduced value or as the full array in an - object set. - """ - - type: typing.Literal["array"] = "array" - - -class OntologyObjectArrayTypeReducer(core.ModelBase): - """OntologyObjectArrayTypeReducer""" - - direction: OntologyObjectArrayTypeReducerSortDirection - field: typing.Optional[StructFieldApiName] = None - - -OntologyObjectArrayTypeReducerSortDirection = typing.Literal[ - "ASCENDING_NULLS_LAST", "DESCENDING_NULLS_LAST" -] -"""OntologyObjectArrayTypeReducerSortDirection""" - - -class OntologyObjectSetType(core.ModelBase): - """OntologyObjectSetType""" - - object_api_name: typing.Optional[ObjectTypeApiName] = pydantic.Field(alias=str("objectApiName"), default=None) # type: ignore[literal-required] - object_type_api_name: typing.Optional[ObjectTypeApiName] = pydantic.Field(alias=str("objectTypeApiName"), default=None) # type: ignore[literal-required] - type: typing.Literal["objectSet"] = "objectSet" - - -class OntologyObjectType(core.ModelBase): - """OntologyObjectType""" - - object_api_name: ObjectTypeApiName = pydantic.Field(alias=str("objectApiName")) # type: ignore[literal-required] - object_type_api_name: ObjectTypeApiName = pydantic.Field(alias=str("objectTypeApiName")) # type: ignore[literal-required] - type: typing.Literal["object"] = "object" - - -class OntologyObjectTypeReferenceType(core.ModelBase): - """OntologyObjectTypeReferenceType""" - - type: typing.Literal["objectType"] = "objectType" - - -OntologyObjectV2 = typing.Dict["PropertyApiName", "PropertyValue"] -"""Represents an object in the Ontology.""" - - -OntologyRid = core.RID -""" -The unique Resource Identifier (RID) of the Ontology. To look up your Ontology RID, please use the -`List ontologies` endpoint or check the **Ontology Manager**. -""" - - -class OntologySetType(core.ModelBase): - """OntologySetType""" - - item_type: OntologyDataType = pydantic.Field(alias=str("itemType")) # type: ignore[literal-required] - type: typing.Literal["set"] = "set" - - -class OntologyStructField(core.ModelBase): - """OntologyStructField""" - - name: core_models.StructFieldName - field_type: OntologyDataType = pydantic.Field(alias=str("fieldType")) # type: ignore[literal-required] - required: bool - - -class OntologyStructType(core.ModelBase): - """OntologyStructType""" - - fields: typing.List[OntologyStructField] - type: typing.Literal["struct"] = "struct" - - -OntologyTransactionId = str -"""The ID identifying a transaction.""" - - -class OntologyV2(core.ModelBase): - """Metadata about an Ontology.""" - - api_name: OntologyApiName = pydantic.Field(alias=str("apiName")) # type: ignore[literal-required] - display_name: core_models.DisplayName = pydantic.Field(alias=str("displayName")) # type: ignore[literal-required] - description: str - rid: OntologyRid - - -class OntologyValueType(core.ModelBase): - """OntologyValueType""" - - api_name: ValueTypeApiName = pydantic.Field(alias=str("apiName")) # type: ignore[literal-required] - display_name: core_models.DisplayName = pydantic.Field(alias=str("displayName")) # type: ignore[literal-required] - description: typing.Optional[str] = None - rid: ValueTypeRid - status: typing.Optional[ValueTypeStatus] = None - field_type: ValueTypeFieldType = pydantic.Field(alias=str("fieldType")) # type: ignore[literal-required] - version: str - constraints: typing.List[ValueTypeConstraint] - - -class OrQueryV2(core.ModelBase): - """Returns objects where at least 1 query is satisfied.""" - - value: typing.List[SearchJsonQueryV2] - type: typing.Literal["or"] = "or" - - -OrderBy = str -""" -A command representing the list of properties to order by. Properties should be delimited by commas and -prefixed by `p` or `properties`. The format expected format is -`orderBy=properties.{property}:{sortDirection},properties.{property}:{sortDirection}...` - -By default, the ordering for a property is ascending, and this can be explicitly specified by appending -`:asc` (for ascending) or `:desc` (for descending). - -Example: use `orderBy=properties.lastName:asc` to order by a single property, -`orderBy=properties.lastName,properties.firstName,properties.age:desc` to order by multiple properties. -You may also use the shorthand `p` instead of `properties` such as `orderBy=p.lastName:asc`. -""" - - -OrderByDirection = typing.Literal["ASC", "DESC"] -"""OrderByDirection""" - - -ParameterEvaluatedConstraint = typing_extensions.Annotated[ - typing.Union[ - "StructEvaluatedConstraint", - "OneOfConstraint", - "ArrayEvaluatedConstraint", - "GroupMemberConstraint", - "ObjectPropertyValueConstraint", - "RangeConstraint", - "ArraySizeConstraint", - "ObjectQueryResultConstraint", - "StringLengthConstraint", - "StringRegexMatchConstraint", - "UnevaluableConstraint", - ], - pydantic.Field(discriminator="type"), -] -""" -A constraint that an action parameter value must satisfy in order to be considered valid. -Constraints can be configured on action parameters in the **Ontology Manager**. -Applicable constraints are determined dynamically based on parameter inputs. -Parameter values are evaluated against the final set of constraints. - -The type of the constraint. -| Type | Description | -|-----------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| `arraySize` | The parameter expects an array of values and the size of the array must fall within the defined range. | -| `groupMember` | The parameter value must be the user id of a member belonging to at least one of the groups defined by the constraint. | -| `objectPropertyValue` | The parameter value must be a property value of an object found within an object set. | -| `objectQueryResult` | The parameter value must be the primary key of an object found within an object set. | -| `oneOf` | The parameter has a manually predefined set of options. | -| `range` | The parameter value must be within the defined range. | -| `stringLength` | The parameter value must have a length within the defined range. | -| `stringRegexMatch` | The parameter value must match a predefined regular expression. | -| `unevaluable` | The parameter cannot be evaluated because it depends on another parameter or object set that can't be evaluated. This can happen when a parameter's allowed values are defined by another parameter that is missing or invalid. | -""" - - -class ParameterEvaluationResult(core.ModelBase): - """Represents the validity of a parameter against the configured constraints.""" - - result: ValidationResult - evaluated_constraints: typing.List[ParameterEvaluatedConstraint] = pydantic.Field(alias=str("evaluatedConstraints")) # type: ignore[literal-required] - required: bool - """Represents whether the parameter is a required input to the action.""" - - -ParameterId = str -""" -The unique identifier of the parameter. Parameters are used as inputs when an action or query is applied. -Parameters can be viewed and managed in the **Ontology Manager**. -""" - - -class ParameterIdArgument(core.ModelBase): - """Represents a parameter ID argument in a logic rule.""" - - parameter_id: ParameterId = pydantic.Field(alias=str("parameterId")) # type: ignore[literal-required] - type: typing.Literal["parameterId"] = "parameterId" - - -class ParameterOption(core.ModelBase): - """A possible value for the parameter. This is defined in the **Ontology Manager** by Actions admins.""" - - display_name: typing.Optional[core_models.DisplayName] = pydantic.Field(alias=str("displayName"), default=None) # type: ignore[literal-required] - value: typing.Optional[typing.Any] = None - """An allowed configured value for a parameter within an action.""" - - -Plaintext = str -"""Plaintext""" - - -class PostTransactionEditsRequest(core.ModelBase): - """The request payload for staging edits to a transaction.""" - - edits: typing.List[TransactionEdit] - - -class PostTransactionEditsResponse(core.ModelBase): - """PostTransactionEditsResponse""" - - -class PreciseDuration(core.ModelBase): - """A measurement of duration.""" - - value: int - """The duration value.""" - - unit: PreciseTimeUnit - type: typing.Literal["duration"] = "duration" - - -PreciseTimeUnit = typing.Literal["NANOSECONDS", "SECONDS", "MINUTES", "HOURS", "DAYS", "WEEKS"] -"""The unit of a fixed-width duration. Each day is 24 hours and each week is 7 days.""" - - -class PrefixOnLastTokenRule(core.ModelBase): - """ - Matches intervals containing all the terms, using exact match for all but the last term, and prefix match for - the last term. Ordering of the terms in the query is preserved. - """ - - query: str - type: typing.Literal["prefixOnLastToken"] = "prefixOnLastToken" - - -PrimaryKeyValue = typing.Any -"""Represents the primary key value that is used as a unique identifier for an object.""" - - -PropertyApiName = str -""" -The name of the property in the API. To find the API name for your property, use the `Get object type` -endpoint or check the **Ontology Manager**. -""" - - -class PropertyApiNameSelector(core.ModelBase): - """A property api name that references properties to query on.""" - - api_name: PropertyApiName = pydantic.Field(alias=str("apiName")) # type: ignore[literal-required] - type: typing.Literal["property"] = "property" - - -class PropertyBooleanFormattingRule(core.ModelBase): - """Formatting configuration for boolean property values.""" - - value_if_true: str = pydantic.Field(alias=str("valueIfTrue")) # type: ignore[literal-required] - """Value to display if this boolean is true""" - - value_if_false: str = pydantic.Field(alias=str("valueIfFalse")) # type: ignore[literal-required] - """Value to display if this boolean is false""" - - type: typing.Literal["boolean"] = "boolean" - - -class PropertyDateFormattingRule(core.ModelBase): - """Formatting configuration for date property values.""" - - format: DatetimeFormat - type: typing.Literal["date"] = "date" - - -PropertyFilter = str -""" -Represents a filter used on properties. - -Endpoints that accept this supports optional parameters that have the form: -`properties.{propertyApiName}.{propertyFilter}={propertyValueEscapedString}` to filter the returned objects. -For instance, you may use `properties.firstName.eq=John` to find objects that contain a property called -"firstName" that has the exact value of "John". - -The following are a list of supported property filters: - -- `properties.{propertyApiName}.contains` - supported on arrays and can be used to filter array properties - that have at least one of the provided values. If multiple query parameters are provided, then objects - that have any of the given values for the specified property will be matched. -- `properties.{propertyApiName}.eq` - used to filter objects that have the exact value for the provided - property. If multiple query parameters are provided, then objects that have any of the given values - will be matched. For instance, if the user provides a request by doing - `?properties.firstName.eq=John&properties.firstName.eq=Anna`, then objects that have a firstName property - of either John or Anna will be matched. This filter is supported on all property types except Arrays. -- `properties.{propertyApiName}.neq` - used to filter objects that do not have the provided property values. - Similar to the `eq` filter, if multiple values are provided, then objects that have any of the given values - will be excluded from the result. -- `properties.{propertyApiName}.lt`, `properties.{propertyApiName}.lte`, `properties.{propertyApiName}.gt` - `properties.{propertyApiName}.gte` - represent less than, less than or equal to, greater than, and greater - than or equal to respectively. These are supported on date, timestamp, byte, integer, long, double, decimal. -- `properties.{propertyApiName}.isNull` - used to filter objects where the provided property is (or is not) null. - This filter is supported on all property types. -""" - - -PropertyId = str -""" -The immutable ID of a property. Property IDs are only used to identify properties in the **Ontology Manager** -application and assign them API names. In every other case, API names should be used instead of property IDs. -""" - - -PropertyIdentifier = typing_extensions.Annotated[ - typing.Union["PropertyApiNameSelector", "StructFieldSelector", "PropertyWithLoadLevelSelector"], - pydantic.Field(discriminator="type"), -] -"""An identifier used to select properties or struct fields.""" - - -class PropertyImplementation(core.ModelBase): - """PropertyImplementation""" - - property_api_name: PropertyApiName = pydantic.Field(alias=str("propertyApiName")) # type: ignore[literal-required] - type: typing.Literal["property"] = "property" - - -class PropertyKnownTypeFormattingRule(core.ModelBase): - """Formatting configuration for known Foundry types.""" - - known_type: KnownType = pydantic.Field(alias=str("knownType")) # type: ignore[literal-required] - type: typing.Literal["knownType"] = "knownType" - - -PropertyLoadLevel = typing_extensions.Annotated[ - typing.Union[ - "ApplyReducersAndExtractMainValueLoadLevel", - "ApplyReducersLoadLevel", - "ExtractMainValueLoadLevel", - ], - pydantic.Field(discriminator="type"), -] -""" -The load level of the property: -- APPLY_REDUCERS: Returns a single value of an array as configured in the ontology. -- EXTRACT_MAIN_VALUE: Returns the main value of a struct as configured in the ontology. -- APPLY_REDUCERS_AND_EXTRACT_MAIN_VALUE: Performs both to return the reduced main value. -""" - - -class PropertyNumberFormattingRule(core.ModelBase): - """Wrapper for numeric formatting options.""" - - number_type: PropertyNumberFormattingRuleType = pydantic.Field(alias=str("numberType")) # type: ignore[literal-required] - type: typing.Literal["number"] = "number" - - -PropertyNumberFormattingRuleType = typing_extensions.Annotated[ - typing.Union[ - "NumberFormatStandard", - "NumberFormatDuration", - "NumberFormatFixedValues", - "NumberFormatAffix", - "NumberFormatScale", - "NumberFormatCurrency", - "NumberFormatStandardUnit", - "NumberFormatCustomUnit", - "NumberFormatRatio", - ], - pydantic.Field(discriminator="type"), -] -"""PropertyNumberFormattingRuleType""" - - -PropertyOrStructFieldOfPropertyImplementation = typing_extensions.Annotated[ - typing.Union["StructFieldOfPropertyImplementation", "PropertyImplementation"], - pydantic.Field(discriminator="type"), -] -"""PropertyOrStructFieldOfPropertyImplementation""" - - -class PropertyTimestampFormattingRule(core.ModelBase): - """Formatting configuration for timestamp property values.""" - - format: DatetimeFormat - display_timezone: DatetimeTimezone = pydantic.Field(alias=str("displayTimezone")) # type: ignore[literal-required] - type: typing.Literal["timestamp"] = "timestamp" - - -PropertyTypeApiName = str -"""PropertyTypeApiName""" - - -class PropertyTypeReference(core.ModelBase): - """PropertyTypeReference""" - - property_api_name: str = pydantic.Field(alias=str("propertyApiName")) # type: ignore[literal-required] - """The API name of the PropertyType""" - - type: typing.Literal["propertyType"] = "propertyType" - - -PropertyTypeReferenceOrStringConstant = typing_extensions.Annotated[ - typing.Union["StringConstant", "PropertyTypeReference"], pydantic.Field(discriminator="type") -] -"""PropertyTypeReferenceOrStringConstant""" - - -PropertyTypeRid = core.RID -"""PropertyTypeRid""" - - -PropertyTypeStatus = typing_extensions.Annotated[ - typing.Union[ - "DeprecatedPropertyTypeStatus", - "ActivePropertyTypeStatus", - "ExperimentalPropertyTypeStatus", - "ExamplePropertyTypeStatus", - ], - pydantic.Field(discriminator="type"), -] -"""The status to indicate whether the PropertyType is either Experimental, Active, Deprecated, or Example.""" - - -PropertyTypeVisibility = typing.Literal["NORMAL", "PROMINENT", "HIDDEN"] -"""PropertyTypeVisibility""" - - -class PropertyV2(core.ModelBase): - """Details about some property of an object.""" - - description: typing.Optional[str] = None - display_name: typing.Optional[core_models.DisplayName] = pydantic.Field(alias=str("displayName"), default=None) # type: ignore[literal-required] - data_type: ObjectPropertyType = pydantic.Field(alias=str("dataType")) # type: ignore[literal-required] - rid: PropertyTypeRid - status: typing.Optional[PropertyTypeStatus] = None - visibility: typing.Optional[PropertyTypeVisibility] = None - value_type_api_name: typing.Optional[ValueTypeApiName] = pydantic.Field(alias=str("valueTypeApiName"), default=None) # type: ignore[literal-required] - value_formatting: typing.Optional[PropertyValueFormattingRule] = pydantic.Field(alias=str("valueFormatting"), default=None) # type: ignore[literal-required] - - -PropertyValue = typing.Any -""" -Represents the value of a property in the following format. - -| Type | JSON encoding | Example | -|---------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------|----------------------------------------------------------------------------------------------------| -| Array | array | `["alpha", "bravo", "charlie"]` | -| [Attachment](https://palantir.com/docs/foundry/api/v2/ontologies-v2-resources/attachment-properties/attachment-property-basics/) | JSON encoded `AttachmentProperty` object | `{"rid":"ri.blobster.main.attachment.2f944bae-5851-4204-8615-920c969a9f2e"}` | -| Boolean | boolean | `true` | -| Byte | number | `31` | -| CipherText | string | `"CIPHER::ri.bellaso.main.cipher-channel.e414ab9e-b606-499a-a0e1-844fa296ba7e::unzjs3VifsTxuIpf1fH1CJ7OaPBr2bzMMdozPaZJtCii8vVG60yXIEmzoOJaEl9mfFFe::CIPHER"` | -| Date | ISO 8601 extended local date string | `"2021-05-01"` | -| Decimal | string | `"2.718281828"` | -| Double | number | `3.14159265` | -| Float | number | `3.14159265` | -| GeoPoint | geojson | `{"type":"Point","coordinates":[102.0,0.5]}` | -| GeoShape | geojson | `{"type":"LineString","coordinates":[[102.0,0.0],[103.0,1.0],[104.0,0.0],[105.0,1.0]]}` | -| Integer | number | `238940` | -| Long | string | `"58319870951433"` | -| [MediaReference](https://palantir.com/docs/foundry/api/v2/ontologies-v2-resources/media-reference-properties/media-reference-property-basics/)| JSON encoded `MediaReference` object | `{"mimeType":"application/pdf","reference":{"type":"mediaSetViewItem","mediaSetViewItem":{"mediaSetRid":"ri.mio.main.media-set.4153d42f-ca4b-4e42-8ca5-8e6aa7edb642","mediaSetViewRid":"ri.mio.main.view.82a798ad-d637-4595-acc6-987bcf16629b","mediaItemRid":"ri.mio.main.media-item.001ec98b-1620-4814-9e17-8e9c4e536225"}}}` | -| Short | number | `8739` | -| String | string | `"Call me Ishmael"` | -| Struct | JSON object of struct field API name -> value | {"firstName": "Alex", "lastName": "Karp"} | -| Timestamp | ISO 8601 extended offset date-time string in UTC zone | `"2021-01-04T05:00:00Z"` | -| [Timeseries](https://palantir.com/docs/foundry/api/v2/ontologies-v2-resources/time-series-properties/time-series-property-basics/) | JSON encoded `TimeseriesProperty` object or seriesId string | `{"seriesId": "wellPressureSeriesId", "syncRid": ri.time-series-catalog.main.sync.04f5ac1f-91bf-44f9-a51f-4f34e06e42df"}` or `{"templateRid": "ri.codex-emu.main.template.367cac64-e53b-4653-b111-f61856a63df9", "templateVersion": "0.0.0"}` or `"wellPressureSeriesId"`| | -| Vector | array | `[0.1, 0.3, 0.02, 0.05 , 0.8, 0.4]` | - -Note that for backwards compatibility, the Boolean, Byte, Double, Float, Integer, and Short types can also be encoded as JSON strings. -""" - - -PropertyValueEscapedString = str -"""Represents the value of a property in string format. This is used in URL parameters.""" - - -PropertyValueFormattingRule = typing_extensions.Annotated[ - typing.Union[ - "PropertyDateFormattingRule", - "PropertyNumberFormattingRule", - "PropertyBooleanFormattingRule", - "PropertyKnownTypeFormattingRule", - "PropertyTimestampFormattingRule", - ], - pydantic.Field(discriminator="type"), -] -""" -This feature is experimental and may change in a future release. -Comprehensive formatting configuration for displaying property values in user interfaces. -Supports different value types including numbers, dates, timestamps, booleans, and known Foundry types. - -Each formatter type provides specific options tailored to that data type: -- Numbers: Support for percentages, currencies, units, scaling, and custom formatting -- Dates/Timestamps: Localized and custom formatting patterns -- Booleans: Custom true/false display text -- Known types: Special formatting for Foundry-specific identifiers -""" - - -class PropertyWithLoadLevelSelector(core.ModelBase): - """ - A combination of a property identifier and the load level to apply to the property. You can select a reduced - value for arrays and the main value for structs. If the provided load level cannot be applied to the property - type, then it will be ignored. This selector is experimental and may not work in filters or sorts. - """ - - property_identifier: PropertyIdentifier = pydantic.Field(alias=str("propertyIdentifier")) # type: ignore[literal-required] - load_level: PropertyLoadLevel = pydantic.Field(alias=str("loadLevel")) # type: ignore[literal-required] - type: typing.Literal["propertyWithLoadLevel"] = "propertyWithLoadLevel" - - -class QueryAggregation(core.ModelBase): - """QueryAggregation""" - - key: typing.Any - value: typing.Any - - -QueryAggregationKeyType = typing_extensions.Annotated[ - typing.Union[ - core_models.DateType, - core_models.BooleanType, - core_models.StringType, - core_models.DoubleType, - "QueryAggregationRangeType", - core_models.IntegerType, - core_models.TimestampType, - ], - pydantic.Field(discriminator="type"), -] -"""A union of all the types supported by query aggregation keys.""" - - -QueryAggregationRangeSubType = typing_extensions.Annotated[ - typing.Union[ - core_models.DateType, - core_models.DoubleType, - core_models.IntegerType, - core_models.TimestampType, - ], - pydantic.Field(discriminator="type"), -] -"""A union of all the types supported by query aggregation ranges.""" - - -class QueryAggregationRangeType(core.ModelBase): - """QueryAggregationRangeType""" - - sub_type: QueryAggregationRangeSubType = pydantic.Field(alias=str("subType")) # type: ignore[literal-required] - type: typing.Literal["range"] = "range" - - -QueryAggregationValueType = typing_extensions.Annotated[ - typing.Union[core_models.DateType, core_models.DoubleType, core_models.TimestampType], - pydantic.Field(discriminator="type"), -] -"""A union of all the types supported by query aggregation keys.""" - - -QueryApiName = str -"""The name of the Query in the API.""" - - -class QueryArrayType(core.ModelBase): - """QueryArrayType""" - - sub_type: QueryDataType = pydantic.Field(alias=str("subType")) # type: ignore[literal-required] - type: typing.Literal["array"] = "array" - - -QueryDataType = typing_extensions.Annotated[ - typing.Union[ - core_models.DateType, - "OntologyInterfaceObjectType", - "QueryStructType", - "QuerySetType", - core_models.StringType, - "EntrySetType", - core_models.DoubleType, - core_models.IntegerType, - "ThreeDimensionalAggregation", - "QueryUnionType", - core_models.FloatType, - core_models.LongType, - core_models.BooleanType, - core_models.UnsupportedType, - core_models.AttachmentType, - core_models.NullType, - "QueryArrayType", - "OntologyObjectSetType", - "TwoDimensionalAggregation", - "OntologyInterfaceObjectSetType", - "OntologyObjectType", - core_models.TimestampType, - ], - pydantic.Field(discriminator="type"), -] -"""A union of all the types supported by Ontology Query parameters or outputs.""" - - -class QueryParameterV2(core.ModelBase): - """Details about a parameter of a query.""" - - description: typing.Optional[str] = None - data_type: QueryDataType = pydantic.Field(alias=str("dataType")) # type: ignore[literal-required] - - -QueryRuntimeErrorParameter = str -"""QueryRuntimeErrorParameter""" - - -class QuerySetType(core.ModelBase): - """QuerySetType""" - - sub_type: QueryDataType = pydantic.Field(alias=str("subType")) # type: ignore[literal-required] - type: typing.Literal["set"] = "set" - - -class QueryStructField(core.ModelBase): - """QueryStructField""" - - name: core_models.StructFieldName - field_type: QueryDataType = pydantic.Field(alias=str("fieldType")) # type: ignore[literal-required] - - -class QueryStructType(core.ModelBase): - """QueryStructType""" - - fields: typing.List[QueryStructField] - type: typing.Literal["struct"] = "struct" - - -class QueryThreeDimensionalAggregation(core.ModelBase): - """QueryThreeDimensionalAggregation""" - - groups: typing.List[NestedQueryAggregation] - - -class QueryTwoDimensionalAggregation(core.ModelBase): - """QueryTwoDimensionalAggregation""" - - groups: typing.List[QueryAggregation] - - -class QueryTypeV2(core.ModelBase): - """Represents a query type in the Ontology.""" - - api_name: QueryApiName = pydantic.Field(alias=str("apiName")) # type: ignore[literal-required] - description: typing.Optional[str] = None - display_name: typing.Optional[core_models.DisplayName] = pydantic.Field(alias=str("displayName"), default=None) # type: ignore[literal-required] - parameters: typing.Dict[ParameterId, QueryParameterV2] - output: QueryDataType - rid: FunctionRid - version: FunctionVersion - - -class QueryUnionType(core.ModelBase): - """QueryUnionType""" - - union_types: typing.List[QueryDataType] = pydantic.Field(alias=str("unionTypes")) # type: ignore[literal-required] - type: typing.Literal["union"] = "union" - - -class RangeConstraint(core.ModelBase): - """The parameter value must be within the defined range.""" - - lt: typing.Optional[typing.Any] = None - """Less than""" - - lte: typing.Optional[typing.Any] = None - """Less than or equal""" - - gt: typing.Optional[typing.Any] = None - """Greater than""" - - gte: typing.Optional[typing.Any] = None - """Greater than or equal""" - - type: typing.Literal["range"] = "range" - - -class RangesConstraint(core.ModelBase): - """RangesConstraint""" - - minimum_value: typing.Optional[PropertyValue] = pydantic.Field(alias=str("minimumValue"), default=None) # type: ignore[literal-required] - maximum_value: typing.Optional[PropertyValue] = pydantic.Field(alias=str("maximumValue"), default=None) # type: ignore[literal-required] - type: typing.Literal["range"] = "range" - - -class RegexConstraint(core.ModelBase): - """RegexConstraint""" - - pattern: str - partial_match: bool = pydantic.Field(alias=str("partialMatch")) # type: ignore[literal-required] - type: typing.Literal["regex"] = "regex" - - -class RegexQuery(core.ModelBase): - """ - Returns objects where the specified field matches the regex pattern provided. This applies to the non-analyzed - form of text fields and supports standard regex syntax of dot (.), star(*) and question mark(?). - Either `field` or `propertyIdentifier` can be supplied, but not both. - """ - - field: typing.Optional[PropertyApiName] = None - property_identifier: typing.Optional[PropertyIdentifier] = pydantic.Field(alias=str("propertyIdentifier"), default=None) # type: ignore[literal-required] - value: str - type: typing.Literal["regex"] = "regex" - - -class RelativeDateRangeQuery(core.ModelBase): - """ - Returns objects where the specified date or timestamp property falls within a relative date range. - The bounds are calculated relative to query execution time and rounded to midnight in the specified timezone. - """ - - field: typing.Optional[PropertyApiName] = None - """The property API name to filter on (either field or propertyIdentifier must be provided).""" - - property_identifier: typing.Optional[PropertyIdentifier] = pydantic.Field(alias=str("propertyIdentifier"), default=None) # type: ignore[literal-required] - """The property identifier to filter on (either field or propertyIdentifier must be provided).""" - - relative_start_time: typing.Optional[RelativeDateRangeBound] = pydantic.Field(alias=str("relativeStartTime"), default=None) # type: ignore[literal-required] - """ - The lower bound relative to query time (inclusive). Negative values go into the past. - For example, { value: -7, timeUnit: DAY } means 7 days ago. - """ - - relative_end_time: typing.Optional[RelativeDateRangeBound] = pydantic.Field(alias=str("relativeEndTime"), default=None) # type: ignore[literal-required] - """ - The upper bound relative to query time (exclusive). Negative values go into the past. - For example, { value: 1, timeUnit: MONTH } means the start of next month. - """ - - time_zone_id: str = pydantic.Field(alias=str("timeZoneId")) # type: ignore[literal-required] - """ - Time zone ID for midnight calculation (e.g., "America/New_York", "Europe/London", "Etc/UTC"). - See https://en.wikipedia.org/wiki/List_of_tz_database_time_zones for valid values. - """ - - type: typing.Literal["relativeDateRange"] = "relativeDateRange" - - -class RelativePointInTime(core.ModelBase): - """A point in time specified relative to query execution time.""" - - value: int - """The numeric value of the time offset. Negative values indicate the past, positive values the future.""" - - time_unit: RelativeTimeUnit = pydantic.Field(alias=str("timeUnit")) # type: ignore[literal-required] - """The unit of time for the value.""" - - type: typing.Literal["relativePoint"] = "relativePoint" - - -class RelativeTime(core.ModelBase): - """A relative time, such as "3 days before" or "2 hours after" the current moment.""" - - when: RelativeTimeRelation - value: int - unit: RelativeTimeSeriesTimeUnit - - -class RelativeTimeRange(core.ModelBase): - """A relative time range for a time series query.""" - - start_time: typing.Optional[RelativeTime] = pydantic.Field(alias=str("startTime"), default=None) # type: ignore[literal-required] - end_time: typing.Optional[RelativeTime] = pydantic.Field(alias=str("endTime"), default=None) # type: ignore[literal-required] - type: typing.Literal["relative"] = "relative" - - -RelativeTimeRelation = typing.Literal["BEFORE", "AFTER"] -"""RelativeTimeRelation""" - - -RelativeTimeSeriesTimeUnit = typing.Literal[ - "MILLISECONDS", "SECONDS", "MINUTES", "HOURS", "DAYS", "WEEKS", "MONTHS", "YEARS" -] -"""RelativeTimeSeriesTimeUnit""" - - -RelativeTimeUnit = typing.Literal["DAY", "WEEK", "MONTH", "YEAR"] -"""Units for relative time calculations.""" - - -class ResolvedInterfacePropertyType(core.ModelBase): - """ - An interface property type with additional fields to indicate constraints that need to be satisfied by - implementing object property types. - """ - - rid: InterfacePropertyTypeRid - api_name: InterfacePropertyApiName = pydantic.Field(alias=str("apiName")) # type: ignore[literal-required] - display_name: core_models.DisplayName = pydantic.Field(alias=str("displayName")) # type: ignore[literal-required] - description: typing.Optional[str] = None - """A short text that describes the InterfacePropertyType.""" - - data_type: ObjectPropertyType = pydantic.Field(alias=str("dataType")) # type: ignore[literal-required] - value_type_api_name: typing.Optional[ValueTypeApiName] = pydantic.Field(alias=str("valueTypeApiName"), default=None) # type: ignore[literal-required] - value_formatting: typing.Optional[PropertyValueFormattingRule] = pydantic.Field(alias=str("valueFormatting"), default=None) # type: ignore[literal-required] - require_implementation: bool = pydantic.Field(alias=str("requireImplementation")) # type: ignore[literal-required] - """Whether each implementing object type must declare an implementation for this property.""" - - -ReturnEditsMode = typing.Literal["ALL", "ALL_V2_WITH_DELETIONS", "NONE"] -"""ReturnEditsMode""" - - -class RidConstraint(core.ModelBase): - """The string must be a valid RID (Resource Identifier).""" - - type: typing.Literal["rid"] = "rid" - - -class RollingAggregateWindowPoints(core.ModelBase): - """Number of points in each window.""" - - count: int - type: typing.Literal["pointsCount"] = "pointsCount" - - -SdkPackageName = str -"""SdkPackageName""" - - -SdkPackageRid = core.RID -"""SdkPackageRid""" - - -SdkVersion = str -"""SdkVersion""" - - -SearchJsonQueryV2 = typing_extensions.Annotated[ - typing.Union[ - "LtQueryV2", - "DoesNotIntersectBoundingBoxQuery", - "RelativeDateRangeQuery", - "WildcardQuery", - "WithinDistanceOfQuery", - "WithinBoundingBoxQuery", - "NotQueryV2", - "IntersectsBoundingBoxQuery", - "AndQueryV2", - "ContainsAllTermsInOrderPrefixLastTerm", - "GteQueryV2", - "ContainsAllTermsInOrderQuery", - "WithinPolygonQuery", - "IntersectsPolygonQuery", - "LteQueryV2", - "OrQueryV2", - "InQuery", - "DoesNotIntersectPolygonQuery", - "EqualsQueryV2", - "ContainsAllTermsQuery", - "GtQueryV2", - "ContainsQueryV2", - "RegexQuery", - "IsNullQueryV2", - "ContainsAnyTermQuery", - "IntervalQuery", - "StartsWithQuery", - ], - pydantic.Field(discriminator="type"), -] -"""SearchJsonQueryV2""" - - -class SearchObjectsForInterfaceRequest(core.ModelBase): - """SearchObjectsForInterfaceRequest""" - - where: typing.Optional[SearchJsonQueryV2] = None - order_by: typing.Optional[SearchOrderByV2] = pydantic.Field(alias=str("orderBy"), default=None) # type: ignore[literal-required] - augmented_properties: typing.Dict[ObjectTypeApiName, typing.List[PropertyApiName]] = pydantic.Field(alias=str("augmentedProperties")) # type: ignore[literal-required] - """ - A map from object type API name to a list of property type API names. For each returned object, if the - object’s object type is a key in the map, then we augment the response for that object type with the list - of properties specified in the value. - """ - - augmented_shared_property_types: typing.Dict[InterfaceTypeApiName, typing.List[SharedPropertyTypeApiName]] = pydantic.Field(alias=str("augmentedSharedPropertyTypes")) # type: ignore[literal-required] - """ - A map from interface type API name to a list of shared property type API names. For each returned object, if - the object implements an interface that is a key in the map, then we augment the response for that object - type with the list of properties specified in the value. - """ - - augmented_interface_property_types: typing.Dict[InterfaceTypeApiName, typing.List[InterfacePropertyApiName]] = pydantic.Field(alias=str("augmentedInterfacePropertyTypes")) # type: ignore[literal-required] - """ - A map from interface type API name to a list of interface property type API names. For each returned object, - if the object implements an interface that is a key in the map, then we augment the response for that object - type with the list of properties specified in the value. - """ - - selected_shared_property_types: typing.List[SharedPropertyTypeApiName] = pydantic.Field(alias=str("selectedSharedPropertyTypes")) # type: ignore[literal-required] - """ - A list of shared property type API names of the interface type that should be included in the response. - Omit this parameter to include all properties of the interface type in the response. - """ - - selected_interface_property_types: typing.List[InterfacePropertyApiName] = pydantic.Field(alias=str("selectedInterfacePropertyTypes")) # type: ignore[literal-required] - """ - A list of interface property type API names of the interface type that should be included in the response. - Omit this parameter to include all properties of the interface type in the response. - """ - - selected_object_types: typing.List[ObjectTypeApiName] = pydantic.Field(alias=str("selectedObjectTypes")) # type: ignore[literal-required] - """ - A list of object type API names that should be included in the response. If non-empty, object types that are - not mentioned will not be included in the response even if they implement the specified interface. Omit the - parameter to include all object types. - """ - - other_interface_types: typing.List[InterfaceTypeApiName] = pydantic.Field(alias=str("otherInterfaceTypes")) # type: ignore[literal-required] - """ - A list of interface type API names. Object types must implement all the mentioned interfaces in order to be - included in the response. - """ - - page_size: typing.Optional[core_models.PageSize] = pydantic.Field(alias=str("pageSize"), default=None) # type: ignore[literal-required] - page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("pageToken"), default=None) # type: ignore[literal-required] - - -class SearchObjectsRequestV2(core.ModelBase): - """SearchObjectsRequestV2""" - - where: typing.Optional[SearchJsonQueryV2] = None - order_by: typing.Optional[SearchOrderByV2] = pydantic.Field(alias=str("orderBy"), default=None) # type: ignore[literal-required] - page_size: typing.Optional[core_models.PageSize] = pydantic.Field(alias=str("pageSize"), default=None) # type: ignore[literal-required] - page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("pageToken"), default=None) # type: ignore[literal-required] - select: typing.List[PropertyApiName] - """The API names of the object type properties to include in the response.""" - - select_v2: typing.Optional[typing.List[PropertyIdentifier]] = pydantic.Field(alias=str("selectV2"), default=None) # type: ignore[literal-required] - """ - The identifiers of the properties to include in the response. Only selectV2 or select should be populated, - but not both. - """ - - exclude_rid: typing.Optional[bool] = pydantic.Field(alias=str("excludeRid"), default=None) # type: ignore[literal-required] - """ - A flag to exclude the retrieval of the `__rid` property. - Setting this to true may improve performance of this endpoint for object types in OSV2. - """ - - snapshot: typing.Optional[bool] = None - """ - A flag to use snapshot consistency when paging. - Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. - Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. - This defaults to false if not specified, which means you will always get the latest results. - """ - - -class SearchObjectsResponseV2(core.ModelBase): - """SearchObjectsResponseV2""" - - data: typing.List[OntologyObjectV2] - next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] - total_count: core_models.TotalCount = pydantic.Field(alias=str("totalCount")) # type: ignore[literal-required] - - -SearchOrderByType = typing.Literal["fields", "relevance"] -"""SearchOrderByType""" - - -class SearchOrderByV2(core.ModelBase): - """Specifies the ordering of search results by a field and an ordering direction or by relevance if scores are required in a nearestNeighbors query. By default `orderType` is set to `fields`.""" - - order_type: typing.Optional[SearchOrderByType] = pydantic.Field(alias=str("orderType"), default=None) # type: ignore[literal-required] - fields: typing.List[SearchOrderingV2] - - -class SearchOrderingV2(core.ModelBase): - """SearchOrderingV2""" - - field: PropertyApiName - direction: typing.Optional[str] = None - """Specifies the ordering direction (can be either `asc` or `desc`)""" - - -SelectedPropertyApiName = str -""" -By default, whenever an object is requested, all of its properties are returned, except for properties of the -following types: -- Vector - -The response can be filtered to only include certain properties using the `properties` query parameter. Note -that ontology object set endpoints refer to this parameter as `select`. - -Properties to include can be specified in one of two ways. - -- A comma delimited list as the value for the `properties` query parameter - `properties={property1ApiName},{property2ApiName}` -- Multiple `properties` query parameters. - `properties={property1ApiName}&properties={property2ApiName}` - -The primary key of the object will always be returned even if it wasn't specified in the `properties` values. - -Unknown properties specified in the `properties` list will result in a `PropertiesNotFound` error. - -To find the API name for your property, use the `Get object type` endpoint or check the **Ontology Manager**. -""" - - -class SelectedPropertyApproximateDistinctAggregation(core.ModelBase): - """Computes an approximate number of distinct values for the provided field.""" - - selected_property_api_name: PropertyApiName = pydantic.Field(alias=str("selectedPropertyApiName")) # type: ignore[literal-required] - type: typing.Literal["approximateDistinct"] = "approximateDistinct" - - -class SelectedPropertyApproximatePercentileAggregation(core.ModelBase): - """Computes the approximate percentile value for the provided field.""" - - selected_property_api_name: PropertyApiName = pydantic.Field(alias=str("selectedPropertyApiName")) # type: ignore[literal-required] - approximate_percentile: float = pydantic.Field(alias=str("approximatePercentile")) # type: ignore[literal-required] - type: typing.Literal["approximatePercentile"] = "approximatePercentile" - - -class SelectedPropertyAvgAggregation(core.ModelBase): - """Computes the average value for the provided field.""" - - selected_property_api_name: PropertyApiName = pydantic.Field(alias=str("selectedPropertyApiName")) # type: ignore[literal-required] - type: typing.Literal["avg"] = "avg" - - -class SelectedPropertyCollectListAggregation(core.ModelBase): - """ - Lists all values of a property up to the specified limit. The maximum supported limit is 100, by default. - - NOTE: A separate count aggregation should be used to determine the total count of values, to account for - a possible truncation of the returned list. - - Ignores objects for which a property is absent, so the returned list will contain non-null values only. - Returns an empty list when none of the objects have values for a provided property. - """ - - selected_property_api_name: PropertyApiName = pydantic.Field(alias=str("selectedPropertyApiName")) # type: ignore[literal-required] - limit: int - """Maximum number of values to collect. The maximum supported limit is 100.""" - - type: typing.Literal["collectList"] = "collectList" - - -class SelectedPropertyCollectSetAggregation(core.ModelBase): - """ - Lists all distinct values of a property up to the specified limit. The maximum supported limit is 100. - - NOTE: A separate cardinality / exactCardinality aggregation should be used to determine the total count of - values, to account for a possible truncation of the returned set. - - Ignores objects for which a property is absent, so the returned list will contain non-null values only. - Returns an empty list when none of the objects have values for a provided property. - """ - - selected_property_api_name: PropertyApiName = pydantic.Field(alias=str("selectedPropertyApiName")) # type: ignore[literal-required] - limit: int - """Maximum number of values to collect. The maximum supported limit is 100.""" - - type: typing.Literal["collectSet"] = "collectSet" - - -class SelectedPropertyCountAggregation(core.ModelBase): - """Computes the total count of objects.""" - - type: typing.Literal["count"] = "count" - - -class SelectedPropertyExactDistinctAggregation(core.ModelBase): - """Computes an exact number of distinct values for the provided field. May be slower than an approximate distinct aggregation.""" - - selected_property_api_name: PropertyApiName = pydantic.Field(alias=str("selectedPropertyApiName")) # type: ignore[literal-required] - type: typing.Literal["exactDistinct"] = "exactDistinct" - - -class SelectedPropertyExpression(core.ModelBase): - """Definition for a selected property over a MethodObjectSet.""" - - object_set: MethodObjectSet = pydantic.Field(alias=str("objectSet")) # type: ignore[literal-required] - operation: SelectedPropertyOperation - type: typing.Literal["selection"] = "selection" - - -class SelectedPropertyMaxAggregation(core.ModelBase): - """Computes the maximum value for the provided field.""" - - selected_property_api_name: PropertyApiName = pydantic.Field(alias=str("selectedPropertyApiName")) # type: ignore[literal-required] - type: typing.Literal["max"] = "max" - - -class SelectedPropertyMinAggregation(core.ModelBase): - """Computes the minimum value for the provided field.""" - - selected_property_api_name: PropertyApiName = pydantic.Field(alias=str("selectedPropertyApiName")) # type: ignore[literal-required] - type: typing.Literal["min"] = "min" - - -SelectedPropertyOperation = typing_extensions.Annotated[ - typing.Union[ - "SelectedPropertyApproximateDistinctAggregation", - "SelectedPropertyMinAggregation", - "SelectedPropertyAvgAggregation", - "SelectedPropertyMaxAggregation", - "SelectedPropertyApproximatePercentileAggregation", - "GetSelectedPropertyOperation", - "SelectedPropertyCountAggregation", - "SelectedPropertySumAggregation", - "SelectedPropertyCollectListAggregation", - "SelectedPropertyExactDistinctAggregation", - "SelectedPropertyCollectSetAggregation", - ], - pydantic.Field(discriminator="type"), -] -"""Operation on a selected property, can be an aggregation function or retrieval of a single selected property""" - - -class SelectedPropertySumAggregation(core.ModelBase): - """Computes the sum of values for the provided field.""" - - selected_property_api_name: PropertyApiName = pydantic.Field(alias=str("selectedPropertyApiName")) # type: ignore[literal-required] - type: typing.Literal["sum"] = "sum" - - -class SharedPropertyType(core.ModelBase): - """A property type that can be shared across object types.""" - - rid: SharedPropertyTypeRid - api_name: SharedPropertyTypeApiName = pydantic.Field(alias=str("apiName")) # type: ignore[literal-required] - display_name: core_models.DisplayName = pydantic.Field(alias=str("displayName")) # type: ignore[literal-required] - description: typing.Optional[str] = None - """A short text that describes the SharedPropertyType.""" - - data_type: ObjectPropertyType = pydantic.Field(alias=str("dataType")) # type: ignore[literal-required] - value_type_api_name: typing.Optional[ValueTypeApiName] = pydantic.Field(alias=str("valueTypeApiName"), default=None) # type: ignore[literal-required] - value_formatting: typing.Optional[PropertyValueFormattingRule] = pydantic.Field(alias=str("valueFormatting"), default=None) # type: ignore[literal-required] - - -SharedPropertyTypeApiName = str -""" -The name of the shared property type in the API in lowerCamelCase format. To find the API name for your -shared property type, use the `List shared property types` endpoint or check the **Ontology Manager**. -""" - - -SharedPropertyTypeRid = core.RID -"""The unique resource identifier of an shared property type, useful for interacting with other Foundry APIs.""" - - -class StartsWithQuery(core.ModelBase): - """ - Deprecated alias for `containsAllTermsInOrderPrefixLastTerm`, which is preferred because the name `startsWith` is misleading. - Returns objects where the specified field starts with the provided value. Allows you to specify a property to - query on by a variety of means. Either `field` or `propertyIdentifier` must be supplied, but not both. - """ - - field: typing.Optional[PropertyApiName] = None - property_identifier: typing.Optional[PropertyIdentifier] = pydantic.Field(alias=str("propertyIdentifier"), default=None) # type: ignore[literal-required] - value: str - type: typing.Literal["startsWith"] = "startsWith" - - -class StaticArgument(core.ModelBase): - """Represents a static argument in a logic rule.""" - - value: DataValue - type: typing.Literal["staticValue"] = "staticValue" - - -class StreamTimeSeriesPointsRequest(core.ModelBase): - """StreamTimeSeriesPointsRequest""" - - range: typing.Optional[TimeRange] = None - aggregate: typing.Optional[AggregateTimeSeries] = None - - -class StreamTimeSeriesValuesRequest(core.ModelBase): - """StreamTimeSeriesValuesRequest""" - - range: typing.Optional[TimeRange] = None - - -StreamingOutputFormat = typing.Literal["JSON", "ARROW"] -""" -Which format to serialize the binary stream in. -ARROW is more efficient for streaming a large sized response. -""" - - -class StringConstant(core.ModelBase): - """StringConstant""" - - value: str - type: typing.Literal["constant"] = "constant" - - -class StringLengthConstraint(core.ModelBase): - """ - The parameter value must have a length within the defined range. - *This range is always inclusive.* - """ - - lt: typing.Optional[typing.Any] = None - """Less than""" - - lte: typing.Optional[typing.Any] = None - """Less than or equal""" - - gt: typing.Optional[typing.Any] = None - """Greater than""" - - gte: typing.Optional[typing.Any] = None - """Greater than or equal""" - - type: typing.Literal["stringLength"] = "stringLength" - - -class StringRegexMatchConstraint(core.ModelBase): - """The parameter value must match a predefined regular expression.""" - - regex: str - """The regular expression configured in the **Ontology Manager**.""" - - configured_failure_message: typing.Optional[str] = pydantic.Field(alias=str("configuredFailureMessage"), default=None) # type: ignore[literal-required] - """ - The message indicating that the regular expression was not matched. - This is configured per parameter in the **Ontology Manager**. - """ - - type: typing.Literal["stringRegexMatch"] = "stringRegexMatch" - - -class StructConstraint(core.ModelBase): - """StructConstraint""" - - properties: typing.Dict[PropertyApiName, ValueTypeApiName] - """A map of the properties of the struct type to the value type applied to that property.""" - - type: typing.Literal["struct"] = "struct" - - -class StructEvaluatedConstraint(core.ModelBase): - """Represents the validity of a singleton struct parameter.""" - - struct_fields: typing.Dict[StructParameterFieldApiName, StructFieldEvaluationResult] = pydantic.Field(alias=str("structFields")) # type: ignore[literal-required] - type: typing.Literal["struct"] = "struct" - - -StructFieldApiName = str -"""The name of a struct field in the Ontology.""" - - -StructFieldArgument = typing_extensions.Annotated[ - typing.Union["StructListParameterFieldArgument", "StructParameterFieldArgument"], - pydantic.Field(discriminator="type"), -] -"""Represents an argument used for an individual struct field.""" - - -StructFieldEvaluatedConstraint = typing_extensions.Annotated[ - typing.Union[ - "OneOfConstraint", - "RangeConstraint", - "ObjectQueryResultConstraint", - "StringLengthConstraint", - "StringRegexMatchConstraint", - ], - pydantic.Field(discriminator="type"), -] -""" -A constraint that an action struct parameter field value must satisfy in order to be considered valid. -Constraints can be configured on fields of struct parameters in the **Ontology Manager**. -Applicable constraints are determined dynamically based on parameter inputs. -Parameter values are evaluated against the final set of constraints. - -The type of the constraint. -| Type | Description | -|-----------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| `oneOf` | The struct parameter field has a manually predefined set of options. | -| `range` | The struct parameter field value must be within the defined range. | -| `stringLength` | The struct parameter field value must have a length within the defined range. | -| `stringRegexMatch` | The struct parameter field value must match a predefined regular expression. | -| `objectQueryResult` | The struct parameter field value must be the primary key of an object found within an object set. | -""" - - -class StructFieldEvaluationResult(core.ModelBase): - """Represents the validity of a struct parameter's fields against the configured constraints.""" - - result: ValidationResult - evaluated_constraints: typing.List[StructFieldEvaluatedConstraint] = pydantic.Field(alias=str("evaluatedConstraints")) # type: ignore[literal-required] - required: bool - """Represents whether the parameter is a required input to the action.""" - - -class StructFieldOfPropertyImplementation(core.ModelBase): - """StructFieldOfPropertyImplementation""" - - property_api_name: PropertyApiName = pydantic.Field(alias=str("propertyApiName")) # type: ignore[literal-required] - struct_field_api_name: StructFieldApiName = pydantic.Field(alias=str("structFieldApiName")) # type: ignore[literal-required] - type: typing.Literal["structFieldOfProperty"] = "structFieldOfProperty" - - -class StructFieldSelector(core.ModelBase): - """ - A combination of a property identifier and the load level to apply to the property. You can select a reduced - value for arrays and the main value for structs. If the provided load level cannot be applied to the property - type, then it will be ignored. This selector is experimental and may not work in filters or sorts. - """ - - property_api_name: PropertyApiName = pydantic.Field(alias=str("propertyApiName")) # type: ignore[literal-required] - struct_field_api_name: StructFieldApiName = pydantic.Field(alias=str("structFieldApiName")) # type: ignore[literal-required] - type: typing.Literal["structField"] = "structField" - - -class StructFieldType(core.ModelBase): - """StructFieldType""" - - api_name: StructFieldApiName = pydantic.Field(alias=str("apiName")) # type: ignore[literal-required] - rid: StructFieldTypeRid - data_type: ObjectPropertyType = pydantic.Field(alias=str("dataType")) # type: ignore[literal-required] - - -StructFieldTypeRid = core.RID -"""The unique resource identifier of a struct field, useful for interacting with other Foundry APIs.""" - - -class StructListParameterFieldArgument(core.ModelBase): - """Represents a struct list parameter field argument in a logic rule.""" - - parameter_id: ParameterId = pydantic.Field(alias=str("parameterId")) # type: ignore[literal-required] - struct_parameter_field_api_name: StructParameterFieldApiName = pydantic.Field(alias=str("structParameterFieldApiName")) # type: ignore[literal-required] - type: typing.Literal["structListParameterFieldValue"] = "structListParameterFieldValue" - - -StructParameterFieldApiName = str -"""The unique identifier of the struct parameter field.""" - - -class StructParameterFieldArgument(core.ModelBase): - """Represents a struct parameter field argument in a logic rule.""" - - parameter_id: ParameterId = pydantic.Field(alias=str("parameterId")) # type: ignore[literal-required] - struct_parameter_field_api_name: StructParameterFieldApiName = pydantic.Field(alias=str("structParameterFieldApiName")) # type: ignore[literal-required] - type: typing.Literal["structParameterFieldValue"] = "structParameterFieldValue" - - -class StructType(core.ModelBase): - """StructType""" - - struct_field_types: typing.List[StructFieldType] = pydantic.Field(alias=str("structFieldTypes")) # type: ignore[literal-required] - main_value: typing.Optional[StructTypeMainValue] = pydantic.Field(alias=str("mainValue"), default=None) # type: ignore[literal-required] - type: typing.Literal["struct"] = "struct" - - -class StructTypeMainValue(core.ModelBase): - """StructTypeMainValue""" - - main_value_type: ObjectPropertyType = pydantic.Field(alias=str("mainValueType")) # type: ignore[literal-required] - fields: typing.List[StructFieldApiName] - """The fields which comprise the main value of the struct.""" - - -class SubmissionCriteriaEvaluation(core.ModelBase): - """ - Contains the status of the **submission criteria**. - **Submission criteria** are the prerequisites that need to be satisfied before an Action can be applied. - These are configured in the **Ontology Manager**. - """ - - configured_failure_message: typing.Optional[str] = pydantic.Field(alias=str("configuredFailureMessage"), default=None) # type: ignore[literal-required] - """ - The message indicating one of the **submission criteria** was not satisfied. - This is configured per **submission criteria** in the **Ontology Manager**. - """ - - result: ValidationResult - - -class SubtractPropertyExpression(core.ModelBase): - """Subtracts the right numeric value from the left numeric value.""" - - left: DerivedPropertyDefinition - right: DerivedPropertyDefinition - type: typing.Literal["subtract"] = "subtract" - - -class SumAggregationV2(core.ModelBase): - """Computes the sum of values for the provided field.""" - - field: PropertyApiName - name: typing.Optional[AggregationMetricName] = None - direction: typing.Optional[OrderByDirection] = None - type: typing.Literal["sum"] = "sum" - - -class SyncApplyActionResponseV2(core.ModelBase): - """SyncApplyActionResponseV2""" - - validation: typing.Optional[ValidateActionResponseV2] = None - edits: typing.Optional[ActionResults] = None - - -class SynchronousWebhookOutputArgument(core.ModelBase): - """Represents a synchronous webhook output argument in a logic rule.""" - - webhook_output_param_name: str = pydantic.Field(alias=str("webhookOutputParamName")) # type: ignore[literal-required] - """The name of the webhook output parameter.""" - - type: typing.Literal["synchronousWebhookOutput"] = "synchronousWebhookOutput" - - -class ThreeDimensionalAggregation(core.ModelBase): - """ThreeDimensionalAggregation""" - - key_type: QueryAggregationKeyType = pydantic.Field(alias=str("keyType")) # type: ignore[literal-required] - value_type: TwoDimensionalAggregation = pydantic.Field(alias=str("valueType")) # type: ignore[literal-required] - type: typing.Literal["threeDimensionalAggregation"] = "threeDimensionalAggregation" - - -class TimeCodeFormat(core.ModelBase): - """Formats the duration in a timecode format.""" - - type: typing.Literal["timecode"] = "timecode" - - -TimeRange = typing_extensions.Annotated[ - typing.Union["AbsoluteTimeRange", "RelativeTimeRange"], pydantic.Field(discriminator="type") -] -"""An absolute or relative range for a time series query.""" - - -TimeSeriesAggregationMethod = typing.Literal[ - "SUM", - "MEAN", - "STANDARD_DEVIATION", - "MAX", - "MIN", - "PERCENT_CHANGE", - "DIFFERENCE", - "PRODUCT", - "COUNT", - "FIRST", - "LAST", -] -"""The aggregation function to use for aggregating time series data.""" - - -TimeSeriesAggregationStrategy = typing_extensions.Annotated[ - typing.Union[ - "TimeSeriesRollingAggregate", "TimeSeriesPeriodicAggregate", "TimeSeriesCumulativeAggregate" - ], - pydantic.Field(discriminator="type"), -] -""" -CUMULATIVE aggregates all points up to the current point. -ROLLING aggregates all points in a rolling window whose size is either the specified number of points or -time duration. -PERIODIC aggregates all points in specified time windows. -""" - - -class TimeSeriesCumulativeAggregate(core.ModelBase): - """ - The cumulative aggregate is calculated progressively for each point in the input time series, - considering all preceding points up to and including the current point. - """ - - type: typing.Literal["cumulative"] = "cumulative" - - -class TimeSeriesPeriodicAggregate(core.ModelBase): - """ - Aggregates values over discrete, periodic windows for a given time series. - - A periodic window divides the time series into windows of fixed durations. - For each window, an aggregate function is applied to the points within that window. The result is a time series - with values representing the aggregate for each window. Windows with no data points are not included - in the output. - - Periodic aggregation is useful for downsampling a continuous stream of data to larger granularities such as - hourly, daily, monthly. - """ - - window_size: PreciseDuration = pydantic.Field(alias=str("windowSize")) # type: ignore[literal-required] - alignment_timestamp: typing.Optional[core.AwareDatetime] = pydantic.Field(alias=str("alignmentTimestamp"), default=None) # type: ignore[literal-required] - """ - The timestamp used to align the result, such that ticks in the result time series will lie at integer - multiples of the window duration from the alignment timestamp. - - Default is the first epoch timestamp (January 1, 1970, 00:00:00 UTC) so that all aggregated points have - timestamps at midnight UTC at the start of each window duration. - - For example, for a weekly aggregate with alignment timestamp 5 January, 8:33PM, - each aggregated timestamp will lie on the 7 day intervals at 8:33PM starting at 5 January. - """ - - window_type: TimeSeriesWindowType = pydantic.Field(alias=str("windowType")) # type: ignore[literal-required] - type: typing.Literal["periodic"] = "periodic" - - -class TimeSeriesPoint(core.ModelBase): - """A time and value pair.""" - - time: core.AwareDatetime - """An ISO 8601 timestamp""" - - value: typing.Any - """An object which is either an enum String or a double number.""" - - -class TimeSeriesRollingAggregate(core.ModelBase): - """TimeSeriesRollingAggregate""" - - window_size: TimeSeriesRollingAggregateWindow = pydantic.Field(alias=str("windowSize")) # type: ignore[literal-required] - type: typing.Literal["rolling"] = "rolling" - - -TimeSeriesRollingAggregateWindow = typing_extensions.Annotated[ - typing.Union["PreciseDuration", "RollingAggregateWindowPoints"], - pydantic.Field(discriminator="type"), -] -""" -A rolling window is a moving subset of data points that ends at the current timestamp (inclusive) -and spans a specified duration (window size). As new data points are added, old points fall out of the -window if they are outside the specified duration. - -Rolling windows are commonly used for smoothing data, detecting trends, and reducing noise -in time series analysis. -""" - - -TimeSeriesWindowType = typing.Literal["START", "END"] -"""TimeSeriesWindowType""" - - -TimeUnit = typing.Literal[ - "MILLISECONDS", "SECONDS", "MINUTES", "HOURS", "DAYS", "WEEKS", "MONTHS", "YEARS", "QUARTERS" -] -"""TimeUnit""" - - -class TimeseriesEntry(core.ModelBase): - """A time and value pair.""" - - time: core.AwareDatetime - """An ISO 8601 timestamp""" - - value: typing.Any - """An object which is either an enum String, double number, or a geopoint.""" - - -TransactionEdit = typing_extensions.Annotated[ - typing.Union[ - "ModifyObjectEdit", "DeleteObjectEdit", "AddObjectEdit", "DeleteLinkEdit", "AddLinkEdit" - ], - pydantic.Field(discriminator="type"), -] -"""TransactionEdit""" - - -class TwoDimensionalAggregation(core.ModelBase): - """TwoDimensionalAggregation""" - - key_type: QueryAggregationKeyType = pydantic.Field(alias=str("keyType")) # type: ignore[literal-required] - value_type: QueryAggregationValueType = pydantic.Field(alias=str("valueType")) # type: ignore[literal-required] - type: typing.Literal["twoDimensionalAggregation"] = "twoDimensionalAggregation" - - -class UnevaluableConstraint(core.ModelBase): - """ - The parameter cannot be evaluated because it depends on another parameter or object set that can't be evaluated. - This can happen when a parameter's allowed values are defined by another parameter that is missing or invalid. - """ - - type: typing.Literal["unevaluable"] = "unevaluable" - - -class UniqueIdentifierArgument(core.ModelBase): - """Represents a unique identifier argument in a logic rule.""" - - link_id: typing.Optional[core.UUID] = pydantic.Field(alias=str("linkId"), default=None) # type: ignore[literal-required] - """ - By default all UniqueIdentifier Logic Rule arguments will generate different UUID. - If the linkId is present all Logic Rules with the same linkId will all have the same uuid generated as the value. - """ - - type: typing.Literal["uniqueIdentifier"] = "uniqueIdentifier" - - -UniqueIdentifierLinkId = core.UUID -"""A reference to a UniqueIdentifierArgument linkId defined for this action type.""" - - -UniqueIdentifierValue = core.UUID -""" -An override value to be used for a UniqueIdentifier action parameter, instead of -the value being automatically generated. -""" - - -class UuidConstraint(core.ModelBase): - """The string must be a valid UUID (Universally Unique Identifier).""" - - type: typing.Literal["uuid"] = "uuid" - - -class ValidateActionResponseV2(core.ModelBase): - """ValidateActionResponseV2""" - - result: ValidationResult - submission_criteria: typing.List[SubmissionCriteriaEvaluation] = pydantic.Field(alias=str("submissionCriteria")) # type: ignore[literal-required] - parameters: typing.Dict[ParameterId, ParameterEvaluationResult] - - -ValidationResult = typing.Literal["VALID", "INVALID"] -"""Represents the state of a validation.""" - - -ValueType = str -""" -A string indicating the type of each data value. Note that these types can be nested, for example an array of -structs. - -| Type | JSON value | -|---------------------|-------------------------------------------------------------------------------------------------------------------| -| Array | `Array`, where `T` is the type of the array elements, e.g. `Array`. | -| Attachment | `Attachment` | -| Boolean | `Boolean` | -| Byte | `Byte` | -| CipherText | `CipherText` | -| Date | `LocalDate` | -| Decimal | `Decimal` | -| Double | `Double` | -| Float | `Float` | -| Integer | `Integer` | -| Long | `Long` | -| Marking | `Marking` | -| OntologyObject | `OntologyObject` where `T` is the API name of the referenced object type. | -| Short | `Short` | -| String | `String` | -| Struct | `Struct` where `T` contains field name and type pairs, e.g. `Struct<{ firstName: String, lastName: string }>` | -| Timeseries | `TimeSeries` where `T` is either `String` for an enum series or `Double` for a numeric series. | -| Timestamp | `Timestamp` | -""" - - -ValueTypeApiName = str -"""The name of the value type in the API in camelCase format.""" - - -class ValueTypeArrayType(core.ModelBase): - """ValueTypeArrayType""" - - sub_type: typing.Optional[ValueTypeFieldType] = pydantic.Field(alias=str("subType"), default=None) # type: ignore[literal-required] - type: typing.Literal["array"] = "array" - - -ValueTypeConstraint = typing_extensions.Annotated[ - typing.Union[ - "StructConstraint", - "RegexConstraint", - core_models.UnsupportedType, - "ArrayConstraint", - "LengthConstraint", - "RangesConstraint", - "RidConstraint", - "UuidConstraint", - "EnumConstraint", - ], - pydantic.Field(discriminator="type"), -] -"""ValueTypeConstraint""" - - -class ValueTypeDecimalType(core.ModelBase): - """ValueTypeDecimalType""" - - type: typing.Literal["decimal"] = "decimal" - - -ValueTypeFieldType = typing_extensions.Annotated[ - typing.Union[ - core_models.DateType, - "ValueTypeStructType", - core_models.StringType, - core_models.ByteType, - core_models.DoubleType, - "ValueTypeOptionalType", - core_models.IntegerType, - "ValueTypeUnionType", - core_models.FloatType, - core_models.LongType, - "ValueTypeReferenceType", - core_models.BooleanType, - "ValueTypeArrayType", - core_models.BinaryType, - core_models.ShortType, - "ValueTypeDecimalType", - "ValueTypeMapType", - core_models.TimestampType, - ], - pydantic.Field(discriminator="type"), -] -"""ValueTypeFieldType""" - - -class ValueTypeMapType(core.ModelBase): - """ValueTypeMapType""" - - key_type: typing.Optional[ValueTypeFieldType] = pydantic.Field(alias=str("keyType"), default=None) # type: ignore[literal-required] - value_type: typing.Optional[ValueTypeFieldType] = pydantic.Field(alias=str("valueType"), default=None) # type: ignore[literal-required] - type: typing.Literal["map"] = "map" - - -class ValueTypeOptionalType(core.ModelBase): - """ValueTypeOptionalType""" - - wrapped_type: typing.Optional[ValueTypeFieldType] = pydantic.Field(alias=str("wrappedType"), default=None) # type: ignore[literal-required] - type: typing.Literal["optional"] = "optional" - - -class ValueTypeReferenceType(core.ModelBase): - """ValueTypeReferenceType""" - - type: typing.Literal["reference"] = "reference" - - -ValueTypeRid = core.RID -"""ValueTypeRid""" - - -ValueTypeStatus = typing.Literal["ACTIVE", "DEPRECATED"] -"""ValueTypeStatus""" - - -class ValueTypeStructField(core.ModelBase): - """ValueTypeStructField""" - - name: typing.Optional[core_models.StructFieldName] = None - field_type: typing.Optional[ValueTypeFieldType] = pydantic.Field(alias=str("fieldType"), default=None) # type: ignore[literal-required] - - -class ValueTypeStructType(core.ModelBase): - """ValueTypeStructType""" - - fields: typing.List[ValueTypeStructField] - type: typing.Literal["struct"] = "struct" - - -class ValueTypeUnionType(core.ModelBase): - """ValueTypeUnionType""" - - member_types: typing.List[ValueTypeFieldType] = pydantic.Field(alias=str("memberTypes")) # type: ignore[literal-required] - type: typing.Literal["union"] = "union" - - -VersionedQueryTypeApiName = str -""" -The name of the Query in the API and an optional version identifier separated by a colon. -If the API name contains a colon, then a version identifier of either "latest" or a semantic version must -be included. -If the API does not contain a colon, then either the version identifier must be excluded or a version -identifier of a semantic version must be included. -Examples: 'myGroup:myFunction:latest', 'myGroup:myFunction:1.0.0', 'myFunction', 'myFunction:2.0.0' -""" - - -class WildcardQuery(core.ModelBase): - """ - Returns objects where the specified field matches the wildcard pattern provided. - Either `field` or `propertyIdentifier` can be supplied, but not both. - """ - - field: typing.Optional[PropertyApiName] = None - property_identifier: typing.Optional[PropertyIdentifier] = pydantic.Field(alias=str("propertyIdentifier"), default=None) # type: ignore[literal-required] - value: str - type: typing.Literal["wildcard"] = "wildcard" - - -class WithinBoundingBoxQuery(core.ModelBase): - """ - Returns objects where the specified field contains a point within the bounding box provided. Allows you to - specify a property to query on by a variety of means. Either `field` or `propertyIdentifier` must be supplied, - but not both. - """ - - field: typing.Optional[PropertyApiName] = None - property_identifier: typing.Optional[PropertyIdentifier] = pydantic.Field(alias=str("propertyIdentifier"), default=None) # type: ignore[literal-required] - value: BoundingBoxValue - type: typing.Literal["withinBoundingBox"] = "withinBoundingBox" - - -class WithinDistanceOfQuery(core.ModelBase): - """ - Returns objects where the specified field contains a point within the distance provided of the center point. - Allows you to specify a property to query on by a variety of means. Either `field` or `propertyIdentifier` - must be supplied, but not both. - """ - - field: typing.Optional[PropertyApiName] = None - property_identifier: typing.Optional[PropertyIdentifier] = pydantic.Field(alias=str("propertyIdentifier"), default=None) # type: ignore[literal-required] - value: CenterPoint - type: typing.Literal["withinDistanceOf"] = "withinDistanceOf" - - -class WithinPolygonQuery(core.ModelBase): - """ - Returns objects where the specified field contains a point within the polygon provided. Allows you to specify a - property to query on by a variety of means. Either `field` or `propertyIdentifier` must be supplied, but not - both. - """ - - field: typing.Optional[PropertyApiName] = None - property_identifier: typing.Optional[PropertyIdentifier] = pydantic.Field(alias=str("propertyIdentifier"), default=None) # type: ignore[literal-required] - value: PolygonValue - type: typing.Literal["withinPolygon"] = "withinPolygon" - - -ArrayEntryEvaluatedConstraint = StructEvaluatedConstraint -"""Evaluated constraints for entries of array parameters for which per-entry evaluation is supported.""" - - -CenterPointTypes = geo_models.GeoPoint -"""CenterPointTypes""" - - -Icon = BlueprintIcon -"""A union currently only consisting of the BlueprintIcon (more icon types may be added in the future).""" - - -MethodObjectSet = ObjectSet -"""MethodObjectSet""" - - -PolygonValue = geo_models.Polygon -"""PolygonValue""" - - -RelativeDateRangeBound = RelativePointInTime -"""Specifies a bound for a relative date range query.""" - - -WithinBoundingBoxPoint = geo_models.GeoPoint -"""WithinBoundingBoxPoint""" - - -core.resolve_forward_references(ActionLogicRule, globalns=globals(), localns=locals()) -core.resolve_forward_references(ActionParameterType, globalns=globals(), localns=locals()) -core.resolve_forward_references(ActionResults, globalns=globals(), localns=locals()) -core.resolve_forward_references(AggregationGroupByV2, globalns=globals(), localns=locals()) -core.resolve_forward_references(AggregationV2, globalns=globals(), localns=locals()) -core.resolve_forward_references(AttachmentMetadataResponse, globalns=globals(), localns=locals()) -core.resolve_forward_references(BatchActionObjectEdit, globalns=globals(), localns=locals()) -core.resolve_forward_references(BatchActionResults, globalns=globals(), localns=locals()) -core.resolve_forward_references(DatetimeFormat, globalns=globals(), localns=locals()) -core.resolve_forward_references(DatetimeTimezone, globalns=globals(), localns=locals()) -core.resolve_forward_references(DerivedPropertyDefinition, globalns=globals(), localns=locals()) -core.resolve_forward_references(DurationFormatStyle, globalns=globals(), localns=locals()) -core.resolve_forward_references( - InterfaceLinkTypeLinkedEntityApiName, globalns=globals(), localns=locals() -) -core.resolve_forward_references( - InterfacePropertyStructImplementationMapping, globalns=globals(), localns=locals() -) -core.resolve_forward_references(InterfacePropertyType, globalns=globals(), localns=locals()) -core.resolve_forward_references( - InterfacePropertyTypeImplementation, globalns=globals(), localns=locals() -) -core.resolve_forward_references(InterfaceToObjectTypeMapping, globalns=globals(), localns=locals()) -core.resolve_forward_references( - InterfaceToObjectTypeMappingV2, globalns=globals(), localns=locals() -) -core.resolve_forward_references(InterfaceToObjectTypeMappings, globalns=globals(), localns=locals()) -core.resolve_forward_references( - InterfaceToObjectTypeMappingsV2, globalns=globals(), localns=locals() -) -core.resolve_forward_references(IntervalQueryRule, globalns=globals(), localns=locals()) -core.resolve_forward_references(LogicRule, globalns=globals(), localns=locals()) -core.resolve_forward_references(LogicRuleArgument, globalns=globals(), localns=locals()) -core.resolve_forward_references(NearestNeighborsQuery, globalns=globals(), localns=locals()) -core.resolve_forward_references( - NestedInterfacePropertyTypeImplementation, globalns=globals(), localns=locals() -) -core.resolve_forward_references(ObjectEdit, globalns=globals(), localns=locals()) -core.resolve_forward_references(ObjectPropertyType, globalns=globals(), localns=locals()) -core.resolve_forward_references(ObjectSet, globalns=globals(), localns=locals()) -core.resolve_forward_references(OntologyDataType, globalns=globals(), localns=locals()) -core.resolve_forward_references(OntologyObjectV2, globalns=globals(), localns=locals()) -core.resolve_forward_references(ParameterEvaluatedConstraint, globalns=globals(), localns=locals()) -core.resolve_forward_references(PropertyIdentifier, globalns=globals(), localns=locals()) -core.resolve_forward_references(PropertyLoadLevel, globalns=globals(), localns=locals()) -core.resolve_forward_references( - PropertyNumberFormattingRuleType, globalns=globals(), localns=locals() -) -core.resolve_forward_references( - PropertyOrStructFieldOfPropertyImplementation, globalns=globals(), localns=locals() -) -core.resolve_forward_references( - PropertyTypeReferenceOrStringConstant, globalns=globals(), localns=locals() -) -core.resolve_forward_references(PropertyTypeStatus, globalns=globals(), localns=locals()) -core.resolve_forward_references(PropertyValueFormattingRule, globalns=globals(), localns=locals()) -core.resolve_forward_references(QueryAggregationKeyType, globalns=globals(), localns=locals()) -core.resolve_forward_references(QueryAggregationRangeSubType, globalns=globals(), localns=locals()) -core.resolve_forward_references(QueryAggregationValueType, globalns=globals(), localns=locals()) -core.resolve_forward_references(QueryDataType, globalns=globals(), localns=locals()) -core.resolve_forward_references(SearchJsonQueryV2, globalns=globals(), localns=locals()) -core.resolve_forward_references(SelectedPropertyOperation, globalns=globals(), localns=locals()) -core.resolve_forward_references(StructFieldArgument, globalns=globals(), localns=locals()) -core.resolve_forward_references( - StructFieldEvaluatedConstraint, globalns=globals(), localns=locals() -) -core.resolve_forward_references(TimeRange, globalns=globals(), localns=locals()) -core.resolve_forward_references(TimeSeriesAggregationStrategy, globalns=globals(), localns=locals()) -core.resolve_forward_references( - TimeSeriesRollingAggregateWindow, globalns=globals(), localns=locals() -) -core.resolve_forward_references(TransactionEdit, globalns=globals(), localns=locals()) -core.resolve_forward_references(ValueTypeConstraint, globalns=globals(), localns=locals()) -core.resolve_forward_references(ValueTypeFieldType, globalns=globals(), localns=locals()) - -__all__ = [ - "AbsoluteTimeRange", - "AbsoluteValuePropertyExpression", - "ActionExecutionTime", - "ActionLogicRule", - "ActionParameterArrayType", - "ActionParameterType", - "ActionParameterV2", - "ActionResults", - "ActionRid", - "ActionTypeApiName", - "ActionTypeFullMetadata", - "ActionTypeRid", - "ActionTypeV2", - "ActivePropertyTypeStatus", - "AddLink", - "AddLinkEdit", - "AddObject", - "AddObjectEdit", - "AddPropertyExpression", - "Affix", - "AggregateObjectSetRequestV2", - "AggregateObjectsRequestV2", - "AggregateObjectsResponseItemV2", - "AggregateObjectsResponseV2", - "AggregateTimeSeries", - "AggregationAccuracy", - "AggregationAccuracyRequest", - "AggregationDurationGroupingV2", - "AggregationExactGroupingV2", - "AggregationFixedWidthGroupingV2", - "AggregationGroupByV2", - "AggregationGroupKeyV2", - "AggregationGroupValueV2", - "AggregationMetricName", - "AggregationMetricResultV2", - "AggregationRangeV2", - "AggregationRangesGroupingV2", - "AggregationV2", - "AllOfRule", - "AndQueryV2", - "AnyOfRule", - "ApplyActionMode", - "ApplyActionOverrides", - "ApplyActionRequestOptions", - "ApplyActionRequestV2", - "ApplyActionWithOverridesRequest", - "ApplyReducersAndExtractMainValueLoadLevel", - "ApplyReducersLoadLevel", - "ApproximateDistinctAggregationV2", - "ApproximatePercentileAggregationV2", - "ArrayConstraint", - "ArrayEntryEvaluatedConstraint", - "ArrayEvaluatedConstraint", - "ArraySizeConstraint", - "ArtifactRepositoryRid", - "AttachmentMetadataResponse", - "AttachmentRid", - "AttachmentV2", - "AvgAggregationV2", - "BatchActionObjectEdit", - "BatchActionObjectEdits", - "BatchActionResults", - "BatchApplyActionRequestItem", - "BatchApplyActionRequestOptions", - "BatchApplyActionRequestV2", - "BatchApplyActionResponseV2", - "BatchReturnEditsMode", - "BatchedFunctionLogicRule", - "BlueprintIcon", - "BoundingBoxValue", - "CenterPoint", - "CenterPointTypes", - "ContainsAllTermsInOrderPrefixLastTerm", - "ContainsAllTermsInOrderQuery", - "ContainsAllTermsQuery", - "ContainsAnyTermQuery", - "ContainsQueryV2", - "CountAggregationV2", - "CountObjectsResponseV2", - "CreateInterfaceLinkLogicRule", - "CreateInterfaceLogicRule", - "CreateInterfaceObjectRule", - "CreateLinkLogicRule", - "CreateLinkRule", - "CreateObjectLogicRule", - "CreateObjectRule", - "CreateOrModifyObjectLogicRule", - "CreateOrModifyObjectLogicRuleV2", - "CreateTemporaryObjectSetRequestV2", - "CreateTemporaryObjectSetResponseV2", - "CurrentTimeArgument", - "CurrentUserArgument", - "DataValue", - "DatetimeFormat", - "DatetimeLocalizedFormat", - "DatetimeLocalizedFormatType", - "DatetimeStringFormat", - "DatetimeTimezone", - "DatetimeTimezoneStatic", - "DatetimeTimezoneUser", - "DecryptionResult", - "DeleteInterfaceLinkLogicRule", - "DeleteInterfaceObjectRule", - "DeleteLink", - "DeleteLinkEdit", - "DeleteLinkLogicRule", - "DeleteLinkRule", - "DeleteObject", - "DeleteObjectEdit", - "DeleteObjectLogicRule", - "DeleteObjectRule", - "DeprecatedPropertyTypeStatus", - "DerivedPropertyApiName", - "DerivedPropertyDefinition", - "DividePropertyExpression", - "DoesNotIntersectBoundingBoxQuery", - "DoesNotIntersectPolygonQuery", - "DoubleVector", - "DurationBaseValue", - "DurationFormatStyle", - "DurationPrecision", - "EntrySetType", - "EnumConstraint", - "EqualsQueryV2", - "ExactDistinctAggregationV2", - "ExamplePropertyTypeStatus", - "ExecuteQueryRequest", - "ExecuteQueryResponse", - "ExperimentalPropertyTypeStatus", - "ExtractDatePart", - "ExtractMainValueLoadLevel", - "ExtractPropertyExpression", - "FilterValue", - "FixedValuesMapKey", - "FunctionLogicRule", - "FunctionParameterName", - "FunctionRid", - "FunctionVersion", - "FuzzyV2", - "GetSelectedPropertyOperation", - "GreatestPropertyExpression", - "GroupMemberConstraint", - "GtQueryV2", - "GteQueryV2", - "HumanReadableFormat", - "Icon", - "InQuery", - "InterfaceDefinedPropertyType", - "InterfaceLinkType", - "InterfaceLinkTypeApiName", - "InterfaceLinkTypeCardinality", - "InterfaceLinkTypeLinkedEntityApiName", - "InterfaceLinkTypeRid", - "InterfaceParameterPropertyArgument", - "InterfacePropertyApiName", - "InterfacePropertyLocalPropertyImplementation", - "InterfacePropertyReducedPropertyImplementation", - "InterfacePropertyStructFieldImplementation", - "InterfacePropertyStructImplementation", - "InterfacePropertyStructImplementationMapping", - "InterfacePropertyType", - "InterfacePropertyTypeImplementation", - "InterfacePropertyTypeRid", - "InterfaceSharedPropertyType", - "InterfaceToObjectTypeMapping", - "InterfaceToObjectTypeMappingV2", - "InterfaceToObjectTypeMappings", - "InterfaceToObjectTypeMappingsV2", - "InterfaceType", - "InterfaceTypeApiName", - "InterfaceTypeRid", - "IntersectsBoundingBoxQuery", - "IntersectsPolygonQuery", - "IntervalQuery", - "IntervalQueryRule", - "IsNullQueryV2", - "KnownType", - "LeastPropertyExpression", - "LengthConstraint", - "LinkSideObject", - "LinkTypeApiName", - "LinkTypeId", - "LinkTypeRid", - "LinkTypeSideCardinality", - "LinkTypeSideV2", - "LinkedInterfaceTypeApiName", - "LinkedObjectLocator", - "LinkedObjectTypeApiName", - "LinksFromObject", - "ListActionTypesFullMetadataResponse", - "ListActionTypesResponseV2", - "ListAttachmentsResponseV2", - "ListInterfaceLinkedObjectsResponse", - "ListInterfaceTypesResponse", - "ListLinkedObjectsResponseV2", - "ListObjectTypesV2Response", - "ListObjectsForInterfaceResponse", - "ListObjectsResponseV2", - "ListOntologiesV2Response", - "ListOntologyValueTypesResponse", - "ListOutgoingInterfaceLinkTypesResponse", - "ListOutgoingLinkTypesResponseV2", - "ListQueryTypesResponseV2", - "LoadObjectSetLinksRequestV2", - "LoadObjectSetLinksResponseV2", - "LoadObjectSetRequestV2", - "LoadObjectSetResponseV2", - "LoadObjectSetV2MultipleObjectTypesRequest", - "LoadObjectSetV2MultipleObjectTypesResponse", - "LoadObjectSetV2ObjectsOrInterfacesRequest", - "LoadObjectSetV2ObjectsOrInterfacesResponse", - "LoadOntologyMetadataRequest", - "LogicRule", - "LogicRuleArgument", - "LtQueryV2", - "LteQueryV2", - "MatchRule", - "MaxAggregationV2", - "MediaMetadata", - "MethodObjectSet", - "MinAggregationV2", - "ModifyInterfaceLogicRule", - "ModifyInterfaceObjectRule", - "ModifyObject", - "ModifyObjectEdit", - "ModifyObjectLogicRule", - "ModifyObjectRule", - "MultiplyPropertyExpression", - "NearestNeighborsQuery", - "NearestNeighborsQueryText", - "NegatePropertyExpression", - "NestedInterfacePropertyTypeImplementation", - "NestedQueryAggregation", - "NotQueryV2", - "NumberFormatAffix", - "NumberFormatCurrency", - "NumberFormatCurrencyStyle", - "NumberFormatCustomUnit", - "NumberFormatDuration", - "NumberFormatFixedValues", - "NumberFormatNotation", - "NumberFormatOptions", - "NumberFormatRatio", - "NumberFormatScale", - "NumberFormatStandard", - "NumberFormatStandardUnit", - "NumberRatioType", - "NumberRoundingMode", - "NumberScaleType", - "ObjectEdit", - "ObjectEdits", - "ObjectParameterPropertyArgument", - "ObjectPropertyType", - "ObjectPropertyValueConstraint", - "ObjectQueryResultConstraint", - "ObjectRid", - "ObjectSet", - "ObjectSetAsBaseObjectTypesType", - "ObjectSetAsTypeType", - "ObjectSetBaseType", - "ObjectSetFilterType", - "ObjectSetInterfaceBaseType", - "ObjectSetInterfaceLinkSearchAroundType", - "ObjectSetIntersectionType", - "ObjectSetMethodInputType", - "ObjectSetNearestNeighborsType", - "ObjectSetReferenceType", - "ObjectSetRid", - "ObjectSetSearchAroundType", - "ObjectSetStaticType", - "ObjectSetSubtractType", - "ObjectSetUnionType", - "ObjectSetWithPropertiesType", - "ObjectTypeApiName", - "ObjectTypeEdits", - "ObjectTypeFullMetadata", - "ObjectTypeId", - "ObjectTypeInterfaceImplementation", - "ObjectTypeRid", - "ObjectTypeV2", - "ObjectTypeVisibility", - "OneOfConstraint", - "OntologyApiName", - "OntologyArrayType", - "OntologyDataType", - "OntologyFullMetadata", - "OntologyIdentifier", - "OntologyInterfaceObjectSetType", - "OntologyInterfaceObjectType", - "OntologyMapType", - "OntologyObjectArrayType", - "OntologyObjectArrayTypeReducer", - "OntologyObjectArrayTypeReducerSortDirection", - "OntologyObjectSetType", - "OntologyObjectType", - "OntologyObjectTypeReferenceType", - "OntologyObjectV2", - "OntologyRid", - "OntologySetType", - "OntologyStructField", - "OntologyStructType", - "OntologyTransactionId", - "OntologyV2", - "OntologyValueType", - "OrQueryV2", - "OrderBy", - "OrderByDirection", - "ParameterEvaluatedConstraint", - "ParameterEvaluationResult", - "ParameterId", - "ParameterIdArgument", - "ParameterOption", - "Plaintext", - "PolygonValue", - "PostTransactionEditsRequest", - "PostTransactionEditsResponse", - "PreciseDuration", - "PreciseTimeUnit", - "PrefixOnLastTokenRule", - "PrimaryKeyValue", - "PropertyApiName", - "PropertyApiNameSelector", - "PropertyBooleanFormattingRule", - "PropertyDateFormattingRule", - "PropertyFilter", - "PropertyId", - "PropertyIdentifier", - "PropertyImplementation", - "PropertyKnownTypeFormattingRule", - "PropertyLoadLevel", - "PropertyNumberFormattingRule", - "PropertyNumberFormattingRuleType", - "PropertyOrStructFieldOfPropertyImplementation", - "PropertyTimestampFormattingRule", - "PropertyTypeApiName", - "PropertyTypeReference", - "PropertyTypeReferenceOrStringConstant", - "PropertyTypeRid", - "PropertyTypeStatus", - "PropertyTypeVisibility", - "PropertyV2", - "PropertyValue", - "PropertyValueEscapedString", - "PropertyValueFormattingRule", - "PropertyWithLoadLevelSelector", - "QueryAggregation", - "QueryAggregationKeyType", - "QueryAggregationRangeSubType", - "QueryAggregationRangeType", - "QueryAggregationValueType", - "QueryApiName", - "QueryArrayType", - "QueryDataType", - "QueryParameterV2", - "QueryRuntimeErrorParameter", - "QuerySetType", - "QueryStructField", - "QueryStructType", - "QueryThreeDimensionalAggregation", - "QueryTwoDimensionalAggregation", - "QueryTypeV2", - "QueryUnionType", - "RangeConstraint", - "RangesConstraint", - "RegexConstraint", - "RegexQuery", - "RelativeDateRangeBound", - "RelativeDateRangeQuery", - "RelativePointInTime", - "RelativeTime", - "RelativeTimeRange", - "RelativeTimeRelation", - "RelativeTimeSeriesTimeUnit", - "RelativeTimeUnit", - "ResolvedInterfacePropertyType", - "ReturnEditsMode", - "RidConstraint", - "RollingAggregateWindowPoints", - "SdkPackageName", - "SdkPackageRid", - "SdkVersion", - "SearchJsonQueryV2", - "SearchObjectsForInterfaceRequest", - "SearchObjectsRequestV2", - "SearchObjectsResponseV2", - "SearchOrderByType", - "SearchOrderByV2", - "SearchOrderingV2", - "SelectedPropertyApiName", - "SelectedPropertyApproximateDistinctAggregation", - "SelectedPropertyApproximatePercentileAggregation", - "SelectedPropertyAvgAggregation", - "SelectedPropertyCollectListAggregation", - "SelectedPropertyCollectSetAggregation", - "SelectedPropertyCountAggregation", - "SelectedPropertyExactDistinctAggregation", - "SelectedPropertyExpression", - "SelectedPropertyMaxAggregation", - "SelectedPropertyMinAggregation", - "SelectedPropertyOperation", - "SelectedPropertySumAggregation", - "SharedPropertyType", - "SharedPropertyTypeApiName", - "SharedPropertyTypeRid", - "StartsWithQuery", - "StaticArgument", - "StreamTimeSeriesPointsRequest", - "StreamTimeSeriesValuesRequest", - "StreamingOutputFormat", - "StringConstant", - "StringLengthConstraint", - "StringRegexMatchConstraint", - "StructConstraint", - "StructEvaluatedConstraint", - "StructFieldApiName", - "StructFieldArgument", - "StructFieldEvaluatedConstraint", - "StructFieldEvaluationResult", - "StructFieldOfPropertyImplementation", - "StructFieldSelector", - "StructFieldType", - "StructFieldTypeRid", - "StructListParameterFieldArgument", - "StructParameterFieldApiName", - "StructParameterFieldArgument", - "StructType", - "StructTypeMainValue", - "SubmissionCriteriaEvaluation", - "SubtractPropertyExpression", - "SumAggregationV2", - "SyncApplyActionResponseV2", - "SynchronousWebhookOutputArgument", - "ThreeDimensionalAggregation", - "TimeCodeFormat", - "TimeRange", - "TimeSeriesAggregationMethod", - "TimeSeriesAggregationStrategy", - "TimeSeriesCumulativeAggregate", - "TimeSeriesPeriodicAggregate", - "TimeSeriesPoint", - "TimeSeriesRollingAggregate", - "TimeSeriesRollingAggregateWindow", - "TimeSeriesWindowType", - "TimeUnit", - "TimeseriesEntry", - "TransactionEdit", - "TwoDimensionalAggregation", - "UnevaluableConstraint", - "UniqueIdentifierArgument", - "UniqueIdentifierLinkId", - "UniqueIdentifierValue", - "UuidConstraint", - "ValidateActionResponseV2", - "ValidationResult", - "ValueType", - "ValueTypeApiName", - "ValueTypeArrayType", - "ValueTypeConstraint", - "ValueTypeDecimalType", - "ValueTypeFieldType", - "ValueTypeMapType", - "ValueTypeOptionalType", - "ValueTypeReferenceType", - "ValueTypeRid", - "ValueTypeStatus", - "ValueTypeStructField", - "ValueTypeStructType", - "ValueTypeUnionType", - "VersionedQueryTypeApiName", - "WildcardQuery", - "WithinBoundingBoxPoint", - "WithinBoundingBoxQuery", - "WithinDistanceOfQuery", - "WithinPolygonQuery", -] diff --git a/foundry_sdk/v2/ontologies/object_type.py b/foundry_sdk/v2/ontologies/object_type.py deleted file mode 100644 index 48b04de05..000000000 --- a/foundry_sdk/v2/ontologies/object_type.py +++ /dev/null @@ -1,708 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing - -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v2.core import models as core_models -from foundry_sdk.v2.ontologies import models as ontologies_models - - -class ObjectTypeClient: - """ - The API client for the ObjectType Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _ObjectTypeClientStreaming(self) - self.with_raw_response = _ObjectTypeClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - ontology: ontologies_models.OntologyIdentifier, - object_type: ontologies_models.ObjectTypeApiName, - *, - branch: typing.Optional[core_models.FoundryBranch] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> ontologies_models.ObjectTypeV2: - """ - Gets a specific object type with the given API name. - - :param ontology: - :type ontology: OntologyIdentifier - :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. - :type object_type: ObjectTypeApiName - :param branch: The Foundry branch to load the object type definition from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. - :type branch: Optional[FoundryBranch] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: ontologies_models.ObjectTypeV2 - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/ontologies/{ontology}/objectTypes/{objectType}", - query_params={ - "branch": branch, - }, - path_params={ - "ontology": ontology, - "objectType": object_type, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.ObjectTypeV2, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get_full_metadata( - self, - ontology: ontologies_models.OntologyIdentifier, - object_type: ontologies_models.ObjectTypeApiName, - *, - branch: typing.Optional[core_models.FoundryBranch] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, - sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> ontologies_models.ObjectTypeFullMetadata: - """ - Gets the full metadata for a specific object type with the given API name. - - :param ontology: - :type ontology: OntologyIdentifier - :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. - :type object_type: ObjectTypeApiName - :param branch: The Foundry branch to load the action type definition from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. - :type branch: Optional[FoundryBranch] - :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. - :type preview: Optional[PreviewMode] - :param sdk_package_rid: The package rid of the generated SDK. - :type sdk_package_rid: Optional[SdkPackageRid] - :param sdk_version: The version of the generated SDK. - :type sdk_version: Optional[SdkVersion] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: ontologies_models.ObjectTypeFullMetadata - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/ontologies/{ontology}/objectTypes/{objectType}/fullMetadata", - query_params={ - "branch": branch, - "preview": preview, - "sdkPackageRid": sdk_package_rid, - "sdkVersion": sdk_version, - }, - path_params={ - "ontology": ontology, - "objectType": object_type, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.ObjectTypeFullMetadata, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get_outgoing_link_type( - self, - ontology: ontologies_models.OntologyIdentifier, - object_type: ontologies_models.ObjectTypeApiName, - link_type: ontologies_models.LinkTypeApiName, - *, - branch: typing.Optional[core_models.FoundryBranch] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> ontologies_models.LinkTypeSideV2: - """ - Get an outgoing link for an object type. - - :param ontology: - :type ontology: OntologyIdentifier - :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager** application. - :type object_type: ObjectTypeApiName - :param link_type: The API name of the outgoing link. To find the API name for your link type, check the **Ontology Manager**. - :type link_type: LinkTypeApiName - :param branch: The Foundry branch to get the outgoing link types for an object type from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. - :type branch: Optional[FoundryBranch] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: ontologies_models.LinkTypeSideV2 - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/ontologies/{ontology}/objectTypes/{objectType}/outgoingLinkTypes/{linkType}", - query_params={ - "branch": branch, - }, - path_params={ - "ontology": ontology, - "objectType": object_type, - "linkType": link_type, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.LinkTypeSideV2, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def list( - self, - ontology: ontologies_models.OntologyIdentifier, - *, - branch: typing.Optional[core_models.FoundryBranch] = None, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.ResourceIterator[ontologies_models.ObjectTypeV2]: - """ - Lists the object types for the given Ontology. - - Each page may be smaller or larger than the requested page size. However, it is guaranteed that if there are - more results available, at least one result will be present in the - response. - - :param ontology: - :type ontology: OntologyIdentifier - :param branch: The Foundry branch to list the object types from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. - :type branch: Optional[FoundryBranch] - :param page_size: The desired size of the page to be returned. Defaults to 500. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. - :type page_size: Optional[PageSize] - :param page_token: - :type page_token: Optional[PageToken] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.ResourceIterator[ontologies_models.ObjectTypeV2] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/ontologies/{ontology}/objectTypes", - query_params={ - "branch": branch, - "pageSize": page_size, - "pageToken": page_token, - }, - path_params={ - "ontology": ontology, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.ListObjectTypesV2Response, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def list_outgoing_link_types( - self, - ontology: ontologies_models.OntologyIdentifier, - object_type: ontologies_models.ObjectTypeApiName, - *, - branch: typing.Optional[core_models.FoundryBranch] = None, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.ResourceIterator[ontologies_models.LinkTypeSideV2]: - """ - List the outgoing links for an object type. - - :param ontology: - :type ontology: OntologyIdentifier - :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager** application. - :type object_type: ObjectTypeApiName - :param branch: The Foundry branch to load the outgoing link types from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. - :type branch: Optional[FoundryBranch] - :param page_size: The desired size of the page to be returned. - :type page_size: Optional[PageSize] - :param page_token: - :type page_token: Optional[PageToken] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.ResourceIterator[ontologies_models.LinkTypeSideV2] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/ontologies/{ontology}/objectTypes/{objectType}/outgoingLinkTypes", - query_params={ - "branch": branch, - "pageSize": page_size, - "pageToken": page_token, - }, - path_params={ - "ontology": ontology, - "objectType": object_type, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.ListOutgoingLinkTypesResponseV2, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - -class _ObjectTypeClientRaw: - def __init__(self, client: ObjectTypeClient) -> None: - def get(_: ontologies_models.ObjectTypeV2): ... - def get_full_metadata(_: ontologies_models.ObjectTypeFullMetadata): ... - def get_outgoing_link_type(_: ontologies_models.LinkTypeSideV2): ... - def list(_: ontologies_models.ListObjectTypesV2Response): ... - def list_outgoing_link_types(_: ontologies_models.ListOutgoingLinkTypesResponseV2): ... - - self.get = core.with_raw_response(get, client.get) - self.get_full_metadata = core.with_raw_response(get_full_metadata, client.get_full_metadata) - self.get_outgoing_link_type = core.with_raw_response( - get_outgoing_link_type, client.get_outgoing_link_type - ) - self.list = core.with_raw_response(list, client.list) - self.list_outgoing_link_types = core.with_raw_response( - list_outgoing_link_types, client.list_outgoing_link_types - ) - - -class _ObjectTypeClientStreaming: - def __init__(self, client: ObjectTypeClient) -> None: - def get(_: ontologies_models.ObjectTypeV2): ... - def get_full_metadata(_: ontologies_models.ObjectTypeFullMetadata): ... - def get_outgoing_link_type(_: ontologies_models.LinkTypeSideV2): ... - def list(_: ontologies_models.ListObjectTypesV2Response): ... - def list_outgoing_link_types(_: ontologies_models.ListOutgoingLinkTypesResponseV2): ... - - self.get = core.with_streaming_response(get, client.get) - self.get_full_metadata = core.with_streaming_response( - get_full_metadata, client.get_full_metadata - ) - self.get_outgoing_link_type = core.with_streaming_response( - get_outgoing_link_type, client.get_outgoing_link_type - ) - self.list = core.with_streaming_response(list, client.list) - self.list_outgoing_link_types = core.with_streaming_response( - list_outgoing_link_types, client.list_outgoing_link_types - ) - - -class AsyncObjectTypeClient: - """ - The API client for the ObjectType Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AsyncObjectTypeClientStreaming(self) - self.with_raw_response = _AsyncObjectTypeClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - ontology: ontologies_models.OntologyIdentifier, - object_type: ontologies_models.ObjectTypeApiName, - *, - branch: typing.Optional[core_models.FoundryBranch] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[ontologies_models.ObjectTypeV2]: - """ - Gets a specific object type with the given API name. - - :param ontology: - :type ontology: OntologyIdentifier - :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. - :type object_type: ObjectTypeApiName - :param branch: The Foundry branch to load the object type definition from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. - :type branch: Optional[FoundryBranch] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[ontologies_models.ObjectTypeV2] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/ontologies/{ontology}/objectTypes/{objectType}", - query_params={ - "branch": branch, - }, - path_params={ - "ontology": ontology, - "objectType": object_type, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.ObjectTypeV2, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get_full_metadata( - self, - ontology: ontologies_models.OntologyIdentifier, - object_type: ontologies_models.ObjectTypeApiName, - *, - branch: typing.Optional[core_models.FoundryBranch] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, - sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[ontologies_models.ObjectTypeFullMetadata]: - """ - Gets the full metadata for a specific object type with the given API name. - - :param ontology: - :type ontology: OntologyIdentifier - :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. - :type object_type: ObjectTypeApiName - :param branch: The Foundry branch to load the action type definition from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. - :type branch: Optional[FoundryBranch] - :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. - :type preview: Optional[PreviewMode] - :param sdk_package_rid: The package rid of the generated SDK. - :type sdk_package_rid: Optional[SdkPackageRid] - :param sdk_version: The version of the generated SDK. - :type sdk_version: Optional[SdkVersion] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[ontologies_models.ObjectTypeFullMetadata] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/ontologies/{ontology}/objectTypes/{objectType}/fullMetadata", - query_params={ - "branch": branch, - "preview": preview, - "sdkPackageRid": sdk_package_rid, - "sdkVersion": sdk_version, - }, - path_params={ - "ontology": ontology, - "objectType": object_type, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.ObjectTypeFullMetadata, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get_outgoing_link_type( - self, - ontology: ontologies_models.OntologyIdentifier, - object_type: ontologies_models.ObjectTypeApiName, - link_type: ontologies_models.LinkTypeApiName, - *, - branch: typing.Optional[core_models.FoundryBranch] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[ontologies_models.LinkTypeSideV2]: - """ - Get an outgoing link for an object type. - - :param ontology: - :type ontology: OntologyIdentifier - :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager** application. - :type object_type: ObjectTypeApiName - :param link_type: The API name of the outgoing link. To find the API name for your link type, check the **Ontology Manager**. - :type link_type: LinkTypeApiName - :param branch: The Foundry branch to get the outgoing link types for an object type from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. - :type branch: Optional[FoundryBranch] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[ontologies_models.LinkTypeSideV2] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/ontologies/{ontology}/objectTypes/{objectType}/outgoingLinkTypes/{linkType}", - query_params={ - "branch": branch, - }, - path_params={ - "ontology": ontology, - "objectType": object_type, - "linkType": link_type, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.LinkTypeSideV2, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def list( - self, - ontology: ontologies_models.OntologyIdentifier, - *, - branch: typing.Optional[core_models.FoundryBranch] = None, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.AsyncResourceIterator[ontologies_models.ObjectTypeV2]: - """ - Lists the object types for the given Ontology. - - Each page may be smaller or larger than the requested page size. However, it is guaranteed that if there are - more results available, at least one result will be present in the - response. - - :param ontology: - :type ontology: OntologyIdentifier - :param branch: The Foundry branch to list the object types from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. - :type branch: Optional[FoundryBranch] - :param page_size: The desired size of the page to be returned. Defaults to 500. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. - :type page_size: Optional[PageSize] - :param page_token: - :type page_token: Optional[PageToken] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.AsyncResourceIterator[ontologies_models.ObjectTypeV2] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/ontologies/{ontology}/objectTypes", - query_params={ - "branch": branch, - "pageSize": page_size, - "pageToken": page_token, - }, - path_params={ - "ontology": ontology, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.ListObjectTypesV2Response, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def list_outgoing_link_types( - self, - ontology: ontologies_models.OntologyIdentifier, - object_type: ontologies_models.ObjectTypeApiName, - *, - branch: typing.Optional[core_models.FoundryBranch] = None, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.AsyncResourceIterator[ontologies_models.LinkTypeSideV2]: - """ - List the outgoing links for an object type. - - :param ontology: - :type ontology: OntologyIdentifier - :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager** application. - :type object_type: ObjectTypeApiName - :param branch: The Foundry branch to load the outgoing link types from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. - :type branch: Optional[FoundryBranch] - :param page_size: The desired size of the page to be returned. - :type page_size: Optional[PageSize] - :param page_token: - :type page_token: Optional[PageToken] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.AsyncResourceIterator[ontologies_models.LinkTypeSideV2] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/ontologies/{ontology}/objectTypes/{objectType}/outgoingLinkTypes", - query_params={ - "branch": branch, - "pageSize": page_size, - "pageToken": page_token, - }, - path_params={ - "ontology": ontology, - "objectType": object_type, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.ListOutgoingLinkTypesResponseV2, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - -class _AsyncObjectTypeClientRaw: - def __init__(self, client: AsyncObjectTypeClient) -> None: - def get(_: ontologies_models.ObjectTypeV2): ... - def get_full_metadata(_: ontologies_models.ObjectTypeFullMetadata): ... - def get_outgoing_link_type(_: ontologies_models.LinkTypeSideV2): ... - def list(_: ontologies_models.ListObjectTypesV2Response): ... - def list_outgoing_link_types(_: ontologies_models.ListOutgoingLinkTypesResponseV2): ... - - self.get = core.async_with_raw_response(get, client.get) - self.get_full_metadata = core.async_with_raw_response( - get_full_metadata, client.get_full_metadata - ) - self.get_outgoing_link_type = core.async_with_raw_response( - get_outgoing_link_type, client.get_outgoing_link_type - ) - self.list = core.async_with_raw_response(list, client.list) - self.list_outgoing_link_types = core.async_with_raw_response( - list_outgoing_link_types, client.list_outgoing_link_types - ) - - -class _AsyncObjectTypeClientStreaming: - def __init__(self, client: AsyncObjectTypeClient) -> None: - def get(_: ontologies_models.ObjectTypeV2): ... - def get_full_metadata(_: ontologies_models.ObjectTypeFullMetadata): ... - def get_outgoing_link_type(_: ontologies_models.LinkTypeSideV2): ... - def list(_: ontologies_models.ListObjectTypesV2Response): ... - def list_outgoing_link_types(_: ontologies_models.ListOutgoingLinkTypesResponseV2): ... - - self.get = core.async_with_streaming_response(get, client.get) - self.get_full_metadata = core.async_with_streaming_response( - get_full_metadata, client.get_full_metadata - ) - self.get_outgoing_link_type = core.async_with_streaming_response( - get_outgoing_link_type, client.get_outgoing_link_type - ) - self.list = core.async_with_streaming_response(list, client.list) - self.list_outgoing_link_types = core.async_with_streaming_response( - list_outgoing_link_types, client.list_outgoing_link_types - ) diff --git a/foundry_sdk/v2/ontologies/ontology.py b/foundry_sdk/v2/ontologies/ontology.py deleted file mode 100644 index c412bea13..000000000 --- a/foundry_sdk/v2/ontologies/ontology.py +++ /dev/null @@ -1,577 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing -from functools import cached_property - -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v2.core import models as core_models -from foundry_sdk.v2.ontologies import models as ontologies_models - - -class OntologyClient: - """ - The API client for the Ontology Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _OntologyClientStreaming(self) - self.with_raw_response = _OntologyClientRaw(self) - - @cached_property - def ActionType(self): - from foundry_sdk.v2.ontologies.action_type import ActionTypeClient - - return ActionTypeClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @cached_property - def ObjectType(self): - from foundry_sdk.v2.ontologies.object_type import ObjectTypeClient - - return ObjectTypeClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @cached_property - def QueryType(self): - from foundry_sdk.v2.ontologies.query_type import QueryTypeClient - - return QueryTypeClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - ontology: ontologies_models.OntologyIdentifier, - *, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> ontologies_models.OntologyV2: - """ - Gets a specific ontology for a given Ontology API name or RID. - - :param ontology: - :type ontology: OntologyIdentifier - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: ontologies_models.OntologyV2 - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/ontologies/{ontology}", - query_params={}, - path_params={ - "ontology": ontology, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.OntologyV2, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get_full_metadata( - self, - ontology: ontologies_models.OntologyIdentifier, - *, - branch: typing.Optional[core_models.FoundryBranch] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> ontologies_models.OntologyFullMetadata: - """ - Get the full Ontology metadata. This includes the objects, links, actions, queries, and interfaces. - This endpoint is designed to return as much metadata as possible in a single request to support OSDK workflows. - It may omit certain entities rather than fail the request. - - :param ontology: - :type ontology: OntologyIdentifier - :param branch: The Foundry branch to load metadata from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. - :type branch: Optional[FoundryBranch] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: ontologies_models.OntologyFullMetadata - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/ontologies/{ontology}/fullMetadata", - query_params={ - "branch": branch, - }, - path_params={ - "ontology": ontology, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.OntologyFullMetadata, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def list( - self, - *, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> ontologies_models.ListOntologiesV2Response: - """ - Lists the Ontologies visible to the current user. - - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: ontologies_models.ListOntologiesV2Response - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/ontologies", - query_params={}, - path_params={}, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.ListOntologiesV2Response, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def load_metadata( - self, - ontology: ontologies_models.OntologyIdentifier, - *, - action_types: typing.List[ontologies_models.ActionTypeApiName], - interface_types: typing.List[ontologies_models.InterfaceTypeApiName], - link_types: typing.List[ontologies_models.LinkTypeApiName], - object_types: typing.List[ontologies_models.ObjectTypeApiName], - query_types: typing.List[ontologies_models.VersionedQueryTypeApiName], - branch: typing.Optional[core_models.FoundryBranch] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> ontologies_models.OntologyFullMetadata: - """ - Load Ontology metadata for the requested object, link, action, query, and interface types. - - :param ontology: - :type ontology: OntologyIdentifier - :param action_types: - :type action_types: List[ActionTypeApiName] - :param interface_types: - :type interface_types: List[InterfaceTypeApiName] - :param link_types: - :type link_types: List[LinkTypeApiName] - :param object_types: - :type object_types: List[ObjectTypeApiName] - :param query_types: - :type query_types: List[VersionedQueryTypeApiName] - :param branch: The Foundry branch to load metadata from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. - :type branch: Optional[FoundryBranch] - :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: ontologies_models.OntologyFullMetadata - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/ontologies/{ontology}/metadata", - query_params={ - "branch": branch, - "preview": preview, - }, - path_params={ - "ontology": ontology, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=ontologies_models.LoadOntologyMetadataRequest( - object_types=object_types, - link_types=link_types, - action_types=action_types, - query_types=query_types, - interface_types=interface_types, - ), - response_type=ontologies_models.OntologyFullMetadata, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _OntologyClientRaw: - def __init__(self, client: OntologyClient) -> None: - def get(_: ontologies_models.OntologyV2): ... - def get_full_metadata(_: ontologies_models.OntologyFullMetadata): ... - def list(_: ontologies_models.ListOntologiesV2Response): ... - def load_metadata(_: ontologies_models.OntologyFullMetadata): ... - - self.get = core.with_raw_response(get, client.get) - self.get_full_metadata = core.with_raw_response(get_full_metadata, client.get_full_metadata) - self.list = core.with_raw_response(list, client.list) - self.load_metadata = core.with_raw_response(load_metadata, client.load_metadata) - - -class _OntologyClientStreaming: - def __init__(self, client: OntologyClient) -> None: - def get(_: ontologies_models.OntologyV2): ... - def get_full_metadata(_: ontologies_models.OntologyFullMetadata): ... - def list(_: ontologies_models.ListOntologiesV2Response): ... - def load_metadata(_: ontologies_models.OntologyFullMetadata): ... - - self.get = core.with_streaming_response(get, client.get) - self.get_full_metadata = core.with_streaming_response( - get_full_metadata, client.get_full_metadata - ) - self.list = core.with_streaming_response(list, client.list) - self.load_metadata = core.with_streaming_response(load_metadata, client.load_metadata) - - -class AsyncOntologyClient: - """ - The API client for the Ontology Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AsyncOntologyClientStreaming(self) - self.with_raw_response = _AsyncOntologyClientRaw(self) - - @cached_property - def ActionType(self): - from foundry_sdk.v2.ontologies.action_type import AsyncActionTypeClient - - return AsyncActionTypeClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @cached_property - def ObjectType(self): - from foundry_sdk.v2.ontologies.object_type import AsyncObjectTypeClient - - return AsyncObjectTypeClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @cached_property - def QueryType(self): - from foundry_sdk.v2.ontologies.query_type import AsyncQueryTypeClient - - return AsyncQueryTypeClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - ontology: ontologies_models.OntologyIdentifier, - *, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[ontologies_models.OntologyV2]: - """ - Gets a specific ontology for a given Ontology API name or RID. - - :param ontology: - :type ontology: OntologyIdentifier - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[ontologies_models.OntologyV2] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/ontologies/{ontology}", - query_params={}, - path_params={ - "ontology": ontology, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.OntologyV2, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get_full_metadata( - self, - ontology: ontologies_models.OntologyIdentifier, - *, - branch: typing.Optional[core_models.FoundryBranch] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[ontologies_models.OntologyFullMetadata]: - """ - Get the full Ontology metadata. This includes the objects, links, actions, queries, and interfaces. - This endpoint is designed to return as much metadata as possible in a single request to support OSDK workflows. - It may omit certain entities rather than fail the request. - - :param ontology: - :type ontology: OntologyIdentifier - :param branch: The Foundry branch to load metadata from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. - :type branch: Optional[FoundryBranch] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[ontologies_models.OntologyFullMetadata] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/ontologies/{ontology}/fullMetadata", - query_params={ - "branch": branch, - }, - path_params={ - "ontology": ontology, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.OntologyFullMetadata, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def list( - self, - *, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[ontologies_models.ListOntologiesV2Response]: - """ - Lists the Ontologies visible to the current user. - - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[ontologies_models.ListOntologiesV2Response] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/ontologies", - query_params={}, - path_params={}, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.ListOntologiesV2Response, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def load_metadata( - self, - ontology: ontologies_models.OntologyIdentifier, - *, - action_types: typing.List[ontologies_models.ActionTypeApiName], - interface_types: typing.List[ontologies_models.InterfaceTypeApiName], - link_types: typing.List[ontologies_models.LinkTypeApiName], - object_types: typing.List[ontologies_models.ObjectTypeApiName], - query_types: typing.List[ontologies_models.VersionedQueryTypeApiName], - branch: typing.Optional[core_models.FoundryBranch] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[ontologies_models.OntologyFullMetadata]: - """ - Load Ontology metadata for the requested object, link, action, query, and interface types. - - :param ontology: - :type ontology: OntologyIdentifier - :param action_types: - :type action_types: List[ActionTypeApiName] - :param interface_types: - :type interface_types: List[InterfaceTypeApiName] - :param link_types: - :type link_types: List[LinkTypeApiName] - :param object_types: - :type object_types: List[ObjectTypeApiName] - :param query_types: - :type query_types: List[VersionedQueryTypeApiName] - :param branch: The Foundry branch to load metadata from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. - :type branch: Optional[FoundryBranch] - :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[ontologies_models.OntologyFullMetadata] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/ontologies/{ontology}/metadata", - query_params={ - "branch": branch, - "preview": preview, - }, - path_params={ - "ontology": ontology, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=ontologies_models.LoadOntologyMetadataRequest( - object_types=object_types, - link_types=link_types, - action_types=action_types, - query_types=query_types, - interface_types=interface_types, - ), - response_type=ontologies_models.OntologyFullMetadata, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _AsyncOntologyClientRaw: - def __init__(self, client: AsyncOntologyClient) -> None: - def get(_: ontologies_models.OntologyV2): ... - def get_full_metadata(_: ontologies_models.OntologyFullMetadata): ... - def list(_: ontologies_models.ListOntologiesV2Response): ... - def load_metadata(_: ontologies_models.OntologyFullMetadata): ... - - self.get = core.async_with_raw_response(get, client.get) - self.get_full_metadata = core.async_with_raw_response( - get_full_metadata, client.get_full_metadata - ) - self.list = core.async_with_raw_response(list, client.list) - self.load_metadata = core.async_with_raw_response(load_metadata, client.load_metadata) - - -class _AsyncOntologyClientStreaming: - def __init__(self, client: AsyncOntologyClient) -> None: - def get(_: ontologies_models.OntologyV2): ... - def get_full_metadata(_: ontologies_models.OntologyFullMetadata): ... - def list(_: ontologies_models.ListOntologiesV2Response): ... - def load_metadata(_: ontologies_models.OntologyFullMetadata): ... - - self.get = core.async_with_streaming_response(get, client.get) - self.get_full_metadata = core.async_with_streaming_response( - get_full_metadata, client.get_full_metadata - ) - self.list = core.async_with_streaming_response(list, client.list) - self.load_metadata = core.async_with_streaming_response(load_metadata, client.load_metadata) diff --git a/foundry_sdk/v2/ontologies/ontology_interface.py b/foundry_sdk/v2/ontologies/ontology_interface.py deleted file mode 100644 index c96aa6a57..000000000 --- a/foundry_sdk/v2/ontologies/ontology_interface.py +++ /dev/null @@ -1,1448 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing - -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v2.core import models as core_models -from foundry_sdk.v2.ontologies import models as ontologies_models - - -class OntologyInterfaceClient: - """ - The API client for the OntologyInterface Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _OntologyInterfaceClientStreaming(self) - self.with_raw_response = _OntologyInterfaceClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def aggregate( - self, - ontology: ontologies_models.OntologyIdentifier, - interface_type: ontologies_models.InterfaceTypeApiName, - *, - aggregation: typing.List[ontologies_models.AggregationV2], - group_by: typing.List[ontologies_models.AggregationGroupByV2], - accuracy: typing.Optional[ontologies_models.AggregationAccuracyRequest] = None, - branch: typing.Optional[core_models.FoundryBranch] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - where: typing.Optional[ontologies_models.SearchJsonQueryV2] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> ontologies_models.AggregateObjectsResponseV2: - """ - :::callout{theme=warning title=Warning} - This endpoint will be removed once TS OSDK is updated to use `objectSets/aggregate` with interface object - sets. - ::: - Perform functions on object fields in the specified ontology and of the specified interface type. Any - properties specified in the query must be shared property type API names defined on the interface. - - :param ontology: - :type ontology: OntologyIdentifier - :param interface_type: The API name of the interface type. To find the API name, use the **List interface types** endpoint or check the **Ontology Manager**. - :type interface_type: InterfaceTypeApiName - :param aggregation: - :type aggregation: List[AggregationV2] - :param group_by: - :type group_by: List[AggregationGroupByV2] - :param accuracy: - :type accuracy: Optional[AggregationAccuracyRequest] - :param branch: The Foundry branch to aggregate objects from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. - :type branch: Optional[FoundryBranch] - :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. - :type preview: Optional[PreviewMode] - :param where: - :type where: Optional[SearchJsonQueryV2] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: ontologies_models.AggregateObjectsResponseV2 - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/ontologies/{ontology}/interfaces/{interfaceType}/aggregate", - query_params={ - "branch": branch, - "preview": preview, - }, - path_params={ - "ontology": ontology, - "interfaceType": interface_type, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=ontologies_models.AggregateObjectsRequestV2( - aggregation=aggregation, - where=where, - group_by=group_by, - accuracy=accuracy, - ), - response_type=ontologies_models.AggregateObjectsResponseV2, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - ontology: ontologies_models.OntologyIdentifier, - interface_type: ontologies_models.InterfaceTypeApiName, - *, - branch: typing.Optional[core_models.FoundryBranch] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, - sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> ontologies_models.InterfaceType: - """ - Gets a specific interface type with the given API name. - - :param ontology: - :type ontology: OntologyIdentifier - :param interface_type: The API name of the interface type. To find the API name, use the **List interface types** endpoint or check the **Ontology Manager**. - :type interface_type: InterfaceTypeApiName - :param branch: The Foundry branch to load the interface type definition from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. - :type branch: Optional[FoundryBranch] - :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. - :type preview: Optional[PreviewMode] - :param sdk_package_rid: The package rid of the generated SDK. - :type sdk_package_rid: Optional[SdkPackageRid] - :param sdk_version: The version of the generated SDK. - :type sdk_version: Optional[SdkVersion] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: ontologies_models.InterfaceType - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/ontologies/{ontology}/interfaceTypes/{interfaceType}", - query_params={ - "branch": branch, - "preview": preview, - "sdkPackageRid": sdk_package_rid, - "sdkVersion": sdk_version, - }, - path_params={ - "ontology": ontology, - "interfaceType": interface_type, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.InterfaceType, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get_outgoing_interface_link_type( - self, - ontology: ontologies_models.OntologyIdentifier, - interface_type: ontologies_models.InterfaceTypeApiName, - interface_link_type: ontologies_models.InterfaceLinkTypeApiName, - *, - branch: typing.Optional[core_models.FoundryBranch] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> ontologies_models.InterfaceLinkType: - """ - Get an outgoing interface link type for an interface type. - - :param ontology: - :type ontology: OntologyIdentifier - :param interface_type: The API name of the interface type. To find the API name, use the **List interface types** endpoint or check the **Ontology Manager** application. - :type interface_type: InterfaceTypeApiName - :param interface_link_type: The API name of the outgoing interface link. To find the API name for your interface link type, check the **Ontology Manager** page for the parent interface. - :type interface_link_type: InterfaceLinkTypeApiName - :param branch: The Foundry branch to get the outgoing link types for an object type from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. - :type branch: Optional[FoundryBranch] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: ontologies_models.InterfaceLinkType - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/ontologies/{ontology}/interfaceTypes/{interfaceType}/outgoingLinkTypes/{interfaceLinkType}", - query_params={ - "branch": branch, - }, - path_params={ - "ontology": ontology, - "interfaceType": interface_type, - "interfaceLinkType": interface_link_type, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.InterfaceLinkType, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def list( - self, - ontology: ontologies_models.OntologyIdentifier, - *, - branch: typing.Optional[core_models.FoundryBranch] = None, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.ResourceIterator[ontologies_models.InterfaceType]: - """ - Lists the interface types for the given Ontology. - - Each page may be smaller than the requested page size. However, it is guaranteed that if there are more - results available, at least one result will be present in the response. - - :param ontology: - :type ontology: OntologyIdentifier - :param branch: The Foundry branch to list the interface types from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. - :type branch: Optional[FoundryBranch] - :param page_size: The desired size of the page to be returned. Defaults to 500. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. - :type page_size: Optional[PageSize] - :param page_token: - :type page_token: Optional[PageToken] - :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.ResourceIterator[ontologies_models.InterfaceType] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/ontologies/{ontology}/interfaceTypes", - query_params={ - "branch": branch, - "pageSize": page_size, - "pageToken": page_token, - "preview": preview, - }, - path_params={ - "ontology": ontology, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.ListInterfaceTypesResponse, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def list_interface_linked_objects( - self, - ontology: ontologies_models.OntologyIdentifier, - interface_type: ontologies_models.InterfaceTypeApiName, - object_type: ontologies_models.ObjectTypeApiName, - primary_key: ontologies_models.PropertyValueEscapedString, - interface_link_type: ontologies_models.InterfaceLinkTypeApiName, - *, - branch: typing.Optional[core_models.FoundryBranch] = None, - exclude_rid: typing.Optional[bool] = None, - order_by: typing.Optional[ontologies_models.OrderBy] = None, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - select: typing.Optional[typing.List[ontologies_models.SelectedPropertyApiName]] = None, - snapshot: typing.Optional[bool] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.ResourceIterator[ontologies_models.OntologyObjectV2]: - """ - Lists the linked objects for a specific object and the given interface link type. - - Note that this endpoint does not guarantee consistency. Changes to the data could result in missing or - repeated objects in the response pages. - - For Object Storage V1 backed objects, this endpoint returns a maximum of 10,000 objects. After 10,000 objects have been returned and if more objects - are available, attempting to load another page will result in an `ObjectsExceededLimit` error being returned. There is no limit on Object Storage V2 backed objects. - - Each page may be smaller or larger than the requested page size. However, it - is guaranteed that if there are more results available, at least one result will be present - in the response. - - Note that null value properties will not be returned. - - :param ontology: The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. - :type ontology: OntologyIdentifier - :param interface_type: The API name of the interface type. To find the API name, use the **List interface types** endpoint or check the **Ontology Manager** application. - :type interface_type: InterfaceTypeApiName - :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. - :type object_type: ObjectTypeApiName - :param primary_key: The primary key of the object from which to **start** the interface link traversal. To look up the expected primary key for your object type, use the `Get object type` endpoint or the **Ontology Manager**. - :type primary_key: PropertyValueEscapedString - :param interface_link_type: The API name of the outgoing interface link. To find the API name for your interface link type, check the **Ontology Manager** page for the parent interface. - :type interface_link_type: InterfaceLinkTypeApiName - :param branch: The Foundry branch to get the outgoing link types for an object type from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. - :type branch: Optional[FoundryBranch] - :param exclude_rid: A flag to exclude the retrieval of the `__rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2. - :type exclude_rid: Optional[bool] - :param order_by: - :type order_by: Optional[OrderBy] - :param page_size: The desired size of the page to be returned. Defaults to 1,000. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. - :type page_size: Optional[PageSize] - :param page_token: - :type page_token: Optional[PageToken] - :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. - :type preview: Optional[PreviewMode] - :param select: The properties of the object type that should be included in the response. Omit this parameter to get all the properties. - :type select: Optional[List[SelectedPropertyApiName]] - :param snapshot: A flag to use snapshot consistency when paging. Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. This defaults to false if not specified, which means you will always get the latest results. - :type snapshot: Optional[bool] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.ResourceIterator[ontologies_models.OntologyObjectV2] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/ontologies/{ontology}/interfaces/{interfaceType}/{objectType}/{primaryKey}/links/{interfaceLinkType}", - query_params={ - "branch": branch, - "excludeRid": exclude_rid, - "orderBy": order_by, - "pageSize": page_size, - "pageToken": page_token, - "preview": preview, - "select": select, - "snapshot": snapshot, - }, - path_params={ - "ontology": ontology, - "interfaceType": interface_type, - "objectType": object_type, - "primaryKey": primary_key, - "interfaceLinkType": interface_link_type, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.ListInterfaceLinkedObjectsResponse, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def list_objects_for_interface( - self, - ontology: ontologies_models.OntologyIdentifier, - interface_type: ontologies_models.InterfaceTypeApiName, - *, - branch: typing.Optional[core_models.FoundryBranch] = None, - exclude_rid: typing.Optional[bool] = None, - order_by: typing.Optional[ontologies_models.OrderBy] = None, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - select: typing.Optional[typing.List[ontologies_models.SelectedPropertyApiName]] = None, - snapshot: typing.Optional[bool] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.ResourceIterator[ontologies_models.OntologyObjectV2]: - """ - Lists the objects for the given Ontology and interface type. - - Note that this endpoint does not guarantee consistency, unless you use the snapshot flag specified below. Changes to the data could result in missing or - repeated objects in the response pages. - - For Object Storage V1 backed objects, this endpoint returns a maximum of 10,000 objects. After 10,000 objects have been returned and if more objects - are available, attempting to load another page will result in an `ObjectsExceededLimit` error being returned. There is no limit on Object Storage V2 backed objects. - - Each page may be smaller or larger than the requested page size. However, it - is guaranteed that if there are more results available, at least one result will be present - in the response. - - Note that null value properties will not be returned. - - :param ontology: The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. - :type ontology: OntologyIdentifier - :param interface_type: The API name of the interface type. To find the API name, use the **List interface types** endpoint or check the **Ontology Manager**. - :type interface_type: InterfaceTypeApiName - :param branch: The Foundry branch to list objects from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. - :type branch: Optional[FoundryBranch] - :param exclude_rid: A flag to exclude the retrieval of the `__rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2. - :type exclude_rid: Optional[bool] - :param order_by: - :type order_by: Optional[OrderBy] - :param page_size: The desired size of the page to be returned. Defaults to 1,000. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. - :type page_size: Optional[PageSize] - :param page_token: - :type page_token: Optional[PageToken] - :param select: The properties of the interface type that should be included in the response. Omit this parameter to get all the properties. - :type select: Optional[List[SelectedPropertyApiName]] - :param snapshot: A flag to use snapshot consistency when paging. Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. This defaults to false if not specified, which means you will always get the latest results. - :type snapshot: Optional[bool] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.ResourceIterator[ontologies_models.OntologyObjectV2] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/ontologies/{ontology}/interfaces/{interfaceType}", - query_params={ - "branch": branch, - "excludeRid": exclude_rid, - "orderBy": order_by, - "pageSize": page_size, - "pageToken": page_token, - "select": select, - "snapshot": snapshot, - }, - path_params={ - "ontology": ontology, - "interfaceType": interface_type, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.ListObjectsForInterfaceResponse, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def list_outgoing_interface_link_types( - self, - ontology: ontologies_models.OntologyIdentifier, - interface_type: ontologies_models.InterfaceTypeApiName, - *, - branch: typing.Optional[core_models.FoundryBranch] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> ontologies_models.ListOutgoingInterfaceLinkTypesResponse: - """ - List the outgoing interface link types for an interface type. - - :param ontology: - :type ontology: OntologyIdentifier - :param interface_type: The API name of the interface type. To find the API name, use the **List interface types** endpoint or check the **Ontology Manager** application. - :type interface_type: InterfaceTypeApiName - :param branch: The Foundry branch to get the outgoing link type from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. - :type branch: Optional[FoundryBranch] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: ontologies_models.ListOutgoingInterfaceLinkTypesResponse - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/ontologies/{ontology}/interfaceTypes/{interfaceType}/outgoingLinkTypes", - query_params={ - "branch": branch, - }, - path_params={ - "ontology": ontology, - "interfaceType": interface_type, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.ListOutgoingInterfaceLinkTypesResponse, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def search( - self, - ontology: ontologies_models.OntologyIdentifier, - interface_type: ontologies_models.InterfaceTypeApiName, - *, - augmented_interface_property_types: typing.Dict[ - ontologies_models.InterfaceTypeApiName, - typing.List[ontologies_models.InterfacePropertyApiName], - ], - augmented_properties: typing.Dict[ - ontologies_models.ObjectTypeApiName, typing.List[ontologies_models.PropertyApiName] - ], - augmented_shared_property_types: typing.Dict[ - ontologies_models.InterfaceTypeApiName, - typing.List[ontologies_models.SharedPropertyTypeApiName], - ], - other_interface_types: typing.List[ontologies_models.InterfaceTypeApiName], - selected_interface_property_types: typing.List[ontologies_models.InterfacePropertyApiName], - selected_object_types: typing.List[ontologies_models.ObjectTypeApiName], - selected_shared_property_types: typing.List[ontologies_models.SharedPropertyTypeApiName], - branch: typing.Optional[core_models.FoundryBranch] = None, - order_by: typing.Optional[ontologies_models.SearchOrderByV2] = None, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - where: typing.Optional[ontologies_models.SearchJsonQueryV2] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> ontologies_models.SearchObjectsResponseV2: - """ - :::callout{theme=warning title=Warning} - This endpoint will be removed once TS OSDK is updated to use `objectSets/loadObjects` with interface object - sets. - ::: - Search for objects in the specified ontology and interface type. Any properties specified in the "where" or - "orderBy" parameters must be shared property type API names defined on the interface. The following search - queries are supported: - - | Query type | Description | Supported Types | - |-----------------------------------------|-------------------------------------------------------------------------------------------------------------------|---------------------------------| - | lt | The provided property is less than the provided value. | number, string, date, timestamp | - | gt | The provided property is greater than the provided value. | number, string, date, timestamp | - | lte | The provided property is less than or equal to the provided value. | number, string, date, timestamp | - | gte | The provided property is greater than or equal to the provided value. | number, string, date, timestamp | - | eq | The provided property is exactly equal to the provided value. | number, string, date, timestamp | - | isNull | The provided property is (or is not) null. | all | - | contains | The provided property contains the provided value. | array | - | not | The sub-query does not match. | N/A (applied on a query) | - | and | All the sub-queries match. | N/A (applied on queries) | - | or | At least one of the sub-queries match. | N/A (applied on queries) | - | startsWith | The provided property starts with the provided term. | string | - | containsAllTermsInOrderPrefixLastTerm | The provided property contains all the terms provided in order. The last term can be a partial prefix match. | string | - | containsAllTermsInOrder | The provided property contains the provided terms as a substring. | string | - | containsAnyTerm | The provided property contains at least one of the terms separated by whitespace. | string | - | containsAllTerms | The provided property contains all the terms separated by whitespace. | string | - - Queries can be at most three levels deep. By default, terms are separated by whitespace or punctuation (`?!,:;-[](){}'"~`). Periods (`.`) on their own are ignored. - Partial terms are not matched by terms filters except where explicitly noted. - - Attempting to use an unsupported query will result in a validation error. Third-party applications using this - endpoint via OAuth2 must request the following operation scope: `api:ontologies-read`. - - :param ontology: - :type ontology: OntologyIdentifier - :param interface_type: The API name of the interface type. To find the API name, use the **List interface types** endpoint or check the **Ontology Manager**. - :type interface_type: InterfaceTypeApiName - :param augmented_interface_property_types: A map from interface type API name to a list of interface property type API names. For each returned object, if the object implements an interface that is a key in the map, then we augment the response for that object type with the list of properties specified in the value. - :type augmented_interface_property_types: Dict[InterfaceTypeApiName, List[InterfacePropertyApiName]] - :param augmented_properties: A map from object type API name to a list of property type API names. For each returned object, if the object’s object type is a key in the map, then we augment the response for that object type with the list of properties specified in the value. - :type augmented_properties: Dict[ObjectTypeApiName, List[PropertyApiName]] - :param augmented_shared_property_types: A map from interface type API name to a list of shared property type API names. For each returned object, if the object implements an interface that is a key in the map, then we augment the response for that object type with the list of properties specified in the value. - :type augmented_shared_property_types: Dict[InterfaceTypeApiName, List[SharedPropertyTypeApiName]] - :param other_interface_types: A list of interface type API names. Object types must implement all the mentioned interfaces in order to be included in the response. - :type other_interface_types: List[InterfaceTypeApiName] - :param selected_interface_property_types: A list of interface property type API names of the interface type that should be included in the response. Omit this parameter to include all properties of the interface type in the response. - :type selected_interface_property_types: List[InterfacePropertyApiName] - :param selected_object_types: A list of object type API names that should be included in the response. If non-empty, object types that are not mentioned will not be included in the response even if they implement the specified interface. Omit the parameter to include all object types. - :type selected_object_types: List[ObjectTypeApiName] - :param selected_shared_property_types: A list of shared property type API names of the interface type that should be included in the response. Omit this parameter to include all properties of the interface type in the response. - :type selected_shared_property_types: List[SharedPropertyTypeApiName] - :param branch: The Foundry branch to search objects from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. - :type branch: Optional[FoundryBranch] - :param order_by: - :type order_by: Optional[SearchOrderByV2] - :param page_size: - :type page_size: Optional[PageSize] - :param page_token: - :type page_token: Optional[PageToken] - :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. - :type preview: Optional[PreviewMode] - :param where: - :type where: Optional[SearchJsonQueryV2] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: ontologies_models.SearchObjectsResponseV2 - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/ontologies/{ontology}/interfaces/{interfaceType}/search", - query_params={ - "branch": branch, - "preview": preview, - }, - path_params={ - "ontology": ontology, - "interfaceType": interface_type, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=ontologies_models.SearchObjectsForInterfaceRequest( - where=where, - order_by=order_by, - augmented_properties=augmented_properties, - augmented_shared_property_types=augmented_shared_property_types, - augmented_interface_property_types=augmented_interface_property_types, - selected_shared_property_types=selected_shared_property_types, - selected_interface_property_types=selected_interface_property_types, - selected_object_types=selected_object_types, - other_interface_types=other_interface_types, - page_size=page_size, - page_token=page_token, - ), - response_type=ontologies_models.SearchObjectsResponseV2, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _OntologyInterfaceClientRaw: - def __init__(self, client: OntologyInterfaceClient) -> None: - def aggregate(_: ontologies_models.AggregateObjectsResponseV2): ... - def get(_: ontologies_models.InterfaceType): ... - def get_outgoing_interface_link_type(_: ontologies_models.InterfaceLinkType): ... - def list(_: ontologies_models.ListInterfaceTypesResponse): ... - def list_interface_linked_objects( - _: ontologies_models.ListInterfaceLinkedObjectsResponse, - ): ... - def list_objects_for_interface(_: ontologies_models.ListObjectsForInterfaceResponse): ... - def list_outgoing_interface_link_types( - _: ontologies_models.ListOutgoingInterfaceLinkTypesResponse, - ): ... - def search(_: ontologies_models.SearchObjectsResponseV2): ... - - self.aggregate = core.with_raw_response(aggregate, client.aggregate) - self.get = core.with_raw_response(get, client.get) - self.get_outgoing_interface_link_type = core.with_raw_response( - get_outgoing_interface_link_type, client.get_outgoing_interface_link_type - ) - self.list = core.with_raw_response(list, client.list) - self.list_interface_linked_objects = core.with_raw_response( - list_interface_linked_objects, client.list_interface_linked_objects - ) - self.list_objects_for_interface = core.with_raw_response( - list_objects_for_interface, client.list_objects_for_interface - ) - self.list_outgoing_interface_link_types = core.with_raw_response( - list_outgoing_interface_link_types, client.list_outgoing_interface_link_types - ) - self.search = core.with_raw_response(search, client.search) - - -class _OntologyInterfaceClientStreaming: - def __init__(self, client: OntologyInterfaceClient) -> None: - def aggregate(_: ontologies_models.AggregateObjectsResponseV2): ... - def get(_: ontologies_models.InterfaceType): ... - def get_outgoing_interface_link_type(_: ontologies_models.InterfaceLinkType): ... - def list(_: ontologies_models.ListInterfaceTypesResponse): ... - def list_interface_linked_objects( - _: ontologies_models.ListInterfaceLinkedObjectsResponse, - ): ... - def list_objects_for_interface(_: ontologies_models.ListObjectsForInterfaceResponse): ... - def list_outgoing_interface_link_types( - _: ontologies_models.ListOutgoingInterfaceLinkTypesResponse, - ): ... - def search(_: ontologies_models.SearchObjectsResponseV2): ... - - self.aggregate = core.with_streaming_response(aggregate, client.aggregate) - self.get = core.with_streaming_response(get, client.get) - self.get_outgoing_interface_link_type = core.with_streaming_response( - get_outgoing_interface_link_type, client.get_outgoing_interface_link_type - ) - self.list = core.with_streaming_response(list, client.list) - self.list_interface_linked_objects = core.with_streaming_response( - list_interface_linked_objects, client.list_interface_linked_objects - ) - self.list_objects_for_interface = core.with_streaming_response( - list_objects_for_interface, client.list_objects_for_interface - ) - self.list_outgoing_interface_link_types = core.with_streaming_response( - list_outgoing_interface_link_types, client.list_outgoing_interface_link_types - ) - self.search = core.with_streaming_response(search, client.search) - - -class AsyncOntologyInterfaceClient: - """ - The API client for the OntologyInterface Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AsyncOntologyInterfaceClientStreaming(self) - self.with_raw_response = _AsyncOntologyInterfaceClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def aggregate( - self, - ontology: ontologies_models.OntologyIdentifier, - interface_type: ontologies_models.InterfaceTypeApiName, - *, - aggregation: typing.List[ontologies_models.AggregationV2], - group_by: typing.List[ontologies_models.AggregationGroupByV2], - accuracy: typing.Optional[ontologies_models.AggregationAccuracyRequest] = None, - branch: typing.Optional[core_models.FoundryBranch] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - where: typing.Optional[ontologies_models.SearchJsonQueryV2] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[ontologies_models.AggregateObjectsResponseV2]: - """ - :::callout{theme=warning title=Warning} - This endpoint will be removed once TS OSDK is updated to use `objectSets/aggregate` with interface object - sets. - ::: - Perform functions on object fields in the specified ontology and of the specified interface type. Any - properties specified in the query must be shared property type API names defined on the interface. - - :param ontology: - :type ontology: OntologyIdentifier - :param interface_type: The API name of the interface type. To find the API name, use the **List interface types** endpoint or check the **Ontology Manager**. - :type interface_type: InterfaceTypeApiName - :param aggregation: - :type aggregation: List[AggregationV2] - :param group_by: - :type group_by: List[AggregationGroupByV2] - :param accuracy: - :type accuracy: Optional[AggregationAccuracyRequest] - :param branch: The Foundry branch to aggregate objects from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. - :type branch: Optional[FoundryBranch] - :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. - :type preview: Optional[PreviewMode] - :param where: - :type where: Optional[SearchJsonQueryV2] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[ontologies_models.AggregateObjectsResponseV2] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/ontologies/{ontology}/interfaces/{interfaceType}/aggregate", - query_params={ - "branch": branch, - "preview": preview, - }, - path_params={ - "ontology": ontology, - "interfaceType": interface_type, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=ontologies_models.AggregateObjectsRequestV2( - aggregation=aggregation, - where=where, - group_by=group_by, - accuracy=accuracy, - ), - response_type=ontologies_models.AggregateObjectsResponseV2, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - ontology: ontologies_models.OntologyIdentifier, - interface_type: ontologies_models.InterfaceTypeApiName, - *, - branch: typing.Optional[core_models.FoundryBranch] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, - sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[ontologies_models.InterfaceType]: - """ - Gets a specific interface type with the given API name. - - :param ontology: - :type ontology: OntologyIdentifier - :param interface_type: The API name of the interface type. To find the API name, use the **List interface types** endpoint or check the **Ontology Manager**. - :type interface_type: InterfaceTypeApiName - :param branch: The Foundry branch to load the interface type definition from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. - :type branch: Optional[FoundryBranch] - :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. - :type preview: Optional[PreviewMode] - :param sdk_package_rid: The package rid of the generated SDK. - :type sdk_package_rid: Optional[SdkPackageRid] - :param sdk_version: The version of the generated SDK. - :type sdk_version: Optional[SdkVersion] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[ontologies_models.InterfaceType] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/ontologies/{ontology}/interfaceTypes/{interfaceType}", - query_params={ - "branch": branch, - "preview": preview, - "sdkPackageRid": sdk_package_rid, - "sdkVersion": sdk_version, - }, - path_params={ - "ontology": ontology, - "interfaceType": interface_type, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.InterfaceType, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get_outgoing_interface_link_type( - self, - ontology: ontologies_models.OntologyIdentifier, - interface_type: ontologies_models.InterfaceTypeApiName, - interface_link_type: ontologies_models.InterfaceLinkTypeApiName, - *, - branch: typing.Optional[core_models.FoundryBranch] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[ontologies_models.InterfaceLinkType]: - """ - Get an outgoing interface link type for an interface type. - - :param ontology: - :type ontology: OntologyIdentifier - :param interface_type: The API name of the interface type. To find the API name, use the **List interface types** endpoint or check the **Ontology Manager** application. - :type interface_type: InterfaceTypeApiName - :param interface_link_type: The API name of the outgoing interface link. To find the API name for your interface link type, check the **Ontology Manager** page for the parent interface. - :type interface_link_type: InterfaceLinkTypeApiName - :param branch: The Foundry branch to get the outgoing link types for an object type from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. - :type branch: Optional[FoundryBranch] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[ontologies_models.InterfaceLinkType] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/ontologies/{ontology}/interfaceTypes/{interfaceType}/outgoingLinkTypes/{interfaceLinkType}", - query_params={ - "branch": branch, - }, - path_params={ - "ontology": ontology, - "interfaceType": interface_type, - "interfaceLinkType": interface_link_type, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.InterfaceLinkType, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def list( - self, - ontology: ontologies_models.OntologyIdentifier, - *, - branch: typing.Optional[core_models.FoundryBranch] = None, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.AsyncResourceIterator[ontologies_models.InterfaceType]: - """ - Lists the interface types for the given Ontology. - - Each page may be smaller than the requested page size. However, it is guaranteed that if there are more - results available, at least one result will be present in the response. - - :param ontology: - :type ontology: OntologyIdentifier - :param branch: The Foundry branch to list the interface types from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. - :type branch: Optional[FoundryBranch] - :param page_size: The desired size of the page to be returned. Defaults to 500. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. - :type page_size: Optional[PageSize] - :param page_token: - :type page_token: Optional[PageToken] - :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.AsyncResourceIterator[ontologies_models.InterfaceType] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/ontologies/{ontology}/interfaceTypes", - query_params={ - "branch": branch, - "pageSize": page_size, - "pageToken": page_token, - "preview": preview, - }, - path_params={ - "ontology": ontology, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.ListInterfaceTypesResponse, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def list_interface_linked_objects( - self, - ontology: ontologies_models.OntologyIdentifier, - interface_type: ontologies_models.InterfaceTypeApiName, - object_type: ontologies_models.ObjectTypeApiName, - primary_key: ontologies_models.PropertyValueEscapedString, - interface_link_type: ontologies_models.InterfaceLinkTypeApiName, - *, - branch: typing.Optional[core_models.FoundryBranch] = None, - exclude_rid: typing.Optional[bool] = None, - order_by: typing.Optional[ontologies_models.OrderBy] = None, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - select: typing.Optional[typing.List[ontologies_models.SelectedPropertyApiName]] = None, - snapshot: typing.Optional[bool] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.AsyncResourceIterator[ontologies_models.OntologyObjectV2]: - """ - Lists the linked objects for a specific object and the given interface link type. - - Note that this endpoint does not guarantee consistency. Changes to the data could result in missing or - repeated objects in the response pages. - - For Object Storage V1 backed objects, this endpoint returns a maximum of 10,000 objects. After 10,000 objects have been returned and if more objects - are available, attempting to load another page will result in an `ObjectsExceededLimit` error being returned. There is no limit on Object Storage V2 backed objects. - - Each page may be smaller or larger than the requested page size. However, it - is guaranteed that if there are more results available, at least one result will be present - in the response. - - Note that null value properties will not be returned. - - :param ontology: The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. - :type ontology: OntologyIdentifier - :param interface_type: The API name of the interface type. To find the API name, use the **List interface types** endpoint or check the **Ontology Manager** application. - :type interface_type: InterfaceTypeApiName - :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. - :type object_type: ObjectTypeApiName - :param primary_key: The primary key of the object from which to **start** the interface link traversal. To look up the expected primary key for your object type, use the `Get object type` endpoint or the **Ontology Manager**. - :type primary_key: PropertyValueEscapedString - :param interface_link_type: The API name of the outgoing interface link. To find the API name for your interface link type, check the **Ontology Manager** page for the parent interface. - :type interface_link_type: InterfaceLinkTypeApiName - :param branch: The Foundry branch to get the outgoing link types for an object type from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. - :type branch: Optional[FoundryBranch] - :param exclude_rid: A flag to exclude the retrieval of the `__rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2. - :type exclude_rid: Optional[bool] - :param order_by: - :type order_by: Optional[OrderBy] - :param page_size: The desired size of the page to be returned. Defaults to 1,000. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. - :type page_size: Optional[PageSize] - :param page_token: - :type page_token: Optional[PageToken] - :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. - :type preview: Optional[PreviewMode] - :param select: The properties of the object type that should be included in the response. Omit this parameter to get all the properties. - :type select: Optional[List[SelectedPropertyApiName]] - :param snapshot: A flag to use snapshot consistency when paging. Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. This defaults to false if not specified, which means you will always get the latest results. - :type snapshot: Optional[bool] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.AsyncResourceIterator[ontologies_models.OntologyObjectV2] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/ontologies/{ontology}/interfaces/{interfaceType}/{objectType}/{primaryKey}/links/{interfaceLinkType}", - query_params={ - "branch": branch, - "excludeRid": exclude_rid, - "orderBy": order_by, - "pageSize": page_size, - "pageToken": page_token, - "preview": preview, - "select": select, - "snapshot": snapshot, - }, - path_params={ - "ontology": ontology, - "interfaceType": interface_type, - "objectType": object_type, - "primaryKey": primary_key, - "interfaceLinkType": interface_link_type, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.ListInterfaceLinkedObjectsResponse, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def list_objects_for_interface( - self, - ontology: ontologies_models.OntologyIdentifier, - interface_type: ontologies_models.InterfaceTypeApiName, - *, - branch: typing.Optional[core_models.FoundryBranch] = None, - exclude_rid: typing.Optional[bool] = None, - order_by: typing.Optional[ontologies_models.OrderBy] = None, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - select: typing.Optional[typing.List[ontologies_models.SelectedPropertyApiName]] = None, - snapshot: typing.Optional[bool] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.AsyncResourceIterator[ontologies_models.OntologyObjectV2]: - """ - Lists the objects for the given Ontology and interface type. - - Note that this endpoint does not guarantee consistency, unless you use the snapshot flag specified below. Changes to the data could result in missing or - repeated objects in the response pages. - - For Object Storage V1 backed objects, this endpoint returns a maximum of 10,000 objects. After 10,000 objects have been returned and if more objects - are available, attempting to load another page will result in an `ObjectsExceededLimit` error being returned. There is no limit on Object Storage V2 backed objects. - - Each page may be smaller or larger than the requested page size. However, it - is guaranteed that if there are more results available, at least one result will be present - in the response. - - Note that null value properties will not be returned. - - :param ontology: The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. - :type ontology: OntologyIdentifier - :param interface_type: The API name of the interface type. To find the API name, use the **List interface types** endpoint or check the **Ontology Manager**. - :type interface_type: InterfaceTypeApiName - :param branch: The Foundry branch to list objects from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. - :type branch: Optional[FoundryBranch] - :param exclude_rid: A flag to exclude the retrieval of the `__rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2. - :type exclude_rid: Optional[bool] - :param order_by: - :type order_by: Optional[OrderBy] - :param page_size: The desired size of the page to be returned. Defaults to 1,000. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. - :type page_size: Optional[PageSize] - :param page_token: - :type page_token: Optional[PageToken] - :param select: The properties of the interface type that should be included in the response. Omit this parameter to get all the properties. - :type select: Optional[List[SelectedPropertyApiName]] - :param snapshot: A flag to use snapshot consistency when paging. Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. This defaults to false if not specified, which means you will always get the latest results. - :type snapshot: Optional[bool] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.AsyncResourceIterator[ontologies_models.OntologyObjectV2] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/ontologies/{ontology}/interfaces/{interfaceType}", - query_params={ - "branch": branch, - "excludeRid": exclude_rid, - "orderBy": order_by, - "pageSize": page_size, - "pageToken": page_token, - "select": select, - "snapshot": snapshot, - }, - path_params={ - "ontology": ontology, - "interfaceType": interface_type, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.ListObjectsForInterfaceResponse, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def list_outgoing_interface_link_types( - self, - ontology: ontologies_models.OntologyIdentifier, - interface_type: ontologies_models.InterfaceTypeApiName, - *, - branch: typing.Optional[core_models.FoundryBranch] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[ontologies_models.ListOutgoingInterfaceLinkTypesResponse]: - """ - List the outgoing interface link types for an interface type. - - :param ontology: - :type ontology: OntologyIdentifier - :param interface_type: The API name of the interface type. To find the API name, use the **List interface types** endpoint or check the **Ontology Manager** application. - :type interface_type: InterfaceTypeApiName - :param branch: The Foundry branch to get the outgoing link type from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. - :type branch: Optional[FoundryBranch] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[ontologies_models.ListOutgoingInterfaceLinkTypesResponse] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/ontologies/{ontology}/interfaceTypes/{interfaceType}/outgoingLinkTypes", - query_params={ - "branch": branch, - }, - path_params={ - "ontology": ontology, - "interfaceType": interface_type, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.ListOutgoingInterfaceLinkTypesResponse, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def search( - self, - ontology: ontologies_models.OntologyIdentifier, - interface_type: ontologies_models.InterfaceTypeApiName, - *, - augmented_interface_property_types: typing.Dict[ - ontologies_models.InterfaceTypeApiName, - typing.List[ontologies_models.InterfacePropertyApiName], - ], - augmented_properties: typing.Dict[ - ontologies_models.ObjectTypeApiName, typing.List[ontologies_models.PropertyApiName] - ], - augmented_shared_property_types: typing.Dict[ - ontologies_models.InterfaceTypeApiName, - typing.List[ontologies_models.SharedPropertyTypeApiName], - ], - other_interface_types: typing.List[ontologies_models.InterfaceTypeApiName], - selected_interface_property_types: typing.List[ontologies_models.InterfacePropertyApiName], - selected_object_types: typing.List[ontologies_models.ObjectTypeApiName], - selected_shared_property_types: typing.List[ontologies_models.SharedPropertyTypeApiName], - branch: typing.Optional[core_models.FoundryBranch] = None, - order_by: typing.Optional[ontologies_models.SearchOrderByV2] = None, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - where: typing.Optional[ontologies_models.SearchJsonQueryV2] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[ontologies_models.SearchObjectsResponseV2]: - """ - :::callout{theme=warning title=Warning} - This endpoint will be removed once TS OSDK is updated to use `objectSets/loadObjects` with interface object - sets. - ::: - Search for objects in the specified ontology and interface type. Any properties specified in the "where" or - "orderBy" parameters must be shared property type API names defined on the interface. The following search - queries are supported: - - | Query type | Description | Supported Types | - |-----------------------------------------|-------------------------------------------------------------------------------------------------------------------|---------------------------------| - | lt | The provided property is less than the provided value. | number, string, date, timestamp | - | gt | The provided property is greater than the provided value. | number, string, date, timestamp | - | lte | The provided property is less than or equal to the provided value. | number, string, date, timestamp | - | gte | The provided property is greater than or equal to the provided value. | number, string, date, timestamp | - | eq | The provided property is exactly equal to the provided value. | number, string, date, timestamp | - | isNull | The provided property is (or is not) null. | all | - | contains | The provided property contains the provided value. | array | - | not | The sub-query does not match. | N/A (applied on a query) | - | and | All the sub-queries match. | N/A (applied on queries) | - | or | At least one of the sub-queries match. | N/A (applied on queries) | - | startsWith | The provided property starts with the provided term. | string | - | containsAllTermsInOrderPrefixLastTerm | The provided property contains all the terms provided in order. The last term can be a partial prefix match. | string | - | containsAllTermsInOrder | The provided property contains the provided terms as a substring. | string | - | containsAnyTerm | The provided property contains at least one of the terms separated by whitespace. | string | - | containsAllTerms | The provided property contains all the terms separated by whitespace. | string | - - Queries can be at most three levels deep. By default, terms are separated by whitespace or punctuation (`?!,:;-[](){}'"~`). Periods (`.`) on their own are ignored. - Partial terms are not matched by terms filters except where explicitly noted. - - Attempting to use an unsupported query will result in a validation error. Third-party applications using this - endpoint via OAuth2 must request the following operation scope: `api:ontologies-read`. - - :param ontology: - :type ontology: OntologyIdentifier - :param interface_type: The API name of the interface type. To find the API name, use the **List interface types** endpoint or check the **Ontology Manager**. - :type interface_type: InterfaceTypeApiName - :param augmented_interface_property_types: A map from interface type API name to a list of interface property type API names. For each returned object, if the object implements an interface that is a key in the map, then we augment the response for that object type with the list of properties specified in the value. - :type augmented_interface_property_types: Dict[InterfaceTypeApiName, List[InterfacePropertyApiName]] - :param augmented_properties: A map from object type API name to a list of property type API names. For each returned object, if the object’s object type is a key in the map, then we augment the response for that object type with the list of properties specified in the value. - :type augmented_properties: Dict[ObjectTypeApiName, List[PropertyApiName]] - :param augmented_shared_property_types: A map from interface type API name to a list of shared property type API names. For each returned object, if the object implements an interface that is a key in the map, then we augment the response for that object type with the list of properties specified in the value. - :type augmented_shared_property_types: Dict[InterfaceTypeApiName, List[SharedPropertyTypeApiName]] - :param other_interface_types: A list of interface type API names. Object types must implement all the mentioned interfaces in order to be included in the response. - :type other_interface_types: List[InterfaceTypeApiName] - :param selected_interface_property_types: A list of interface property type API names of the interface type that should be included in the response. Omit this parameter to include all properties of the interface type in the response. - :type selected_interface_property_types: List[InterfacePropertyApiName] - :param selected_object_types: A list of object type API names that should be included in the response. If non-empty, object types that are not mentioned will not be included in the response even if they implement the specified interface. Omit the parameter to include all object types. - :type selected_object_types: List[ObjectTypeApiName] - :param selected_shared_property_types: A list of shared property type API names of the interface type that should be included in the response. Omit this parameter to include all properties of the interface type in the response. - :type selected_shared_property_types: List[SharedPropertyTypeApiName] - :param branch: The Foundry branch to search objects from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. - :type branch: Optional[FoundryBranch] - :param order_by: - :type order_by: Optional[SearchOrderByV2] - :param page_size: - :type page_size: Optional[PageSize] - :param page_token: - :type page_token: Optional[PageToken] - :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. - :type preview: Optional[PreviewMode] - :param where: - :type where: Optional[SearchJsonQueryV2] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[ontologies_models.SearchObjectsResponseV2] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/ontologies/{ontology}/interfaces/{interfaceType}/search", - query_params={ - "branch": branch, - "preview": preview, - }, - path_params={ - "ontology": ontology, - "interfaceType": interface_type, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=ontologies_models.SearchObjectsForInterfaceRequest( - where=where, - order_by=order_by, - augmented_properties=augmented_properties, - augmented_shared_property_types=augmented_shared_property_types, - augmented_interface_property_types=augmented_interface_property_types, - selected_shared_property_types=selected_shared_property_types, - selected_interface_property_types=selected_interface_property_types, - selected_object_types=selected_object_types, - other_interface_types=other_interface_types, - page_size=page_size, - page_token=page_token, - ), - response_type=ontologies_models.SearchObjectsResponseV2, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _AsyncOntologyInterfaceClientRaw: - def __init__(self, client: AsyncOntologyInterfaceClient) -> None: - def aggregate(_: ontologies_models.AggregateObjectsResponseV2): ... - def get(_: ontologies_models.InterfaceType): ... - def get_outgoing_interface_link_type(_: ontologies_models.InterfaceLinkType): ... - def list(_: ontologies_models.ListInterfaceTypesResponse): ... - def list_interface_linked_objects( - _: ontologies_models.ListInterfaceLinkedObjectsResponse, - ): ... - def list_objects_for_interface(_: ontologies_models.ListObjectsForInterfaceResponse): ... - def list_outgoing_interface_link_types( - _: ontologies_models.ListOutgoingInterfaceLinkTypesResponse, - ): ... - def search(_: ontologies_models.SearchObjectsResponseV2): ... - - self.aggregate = core.async_with_raw_response(aggregate, client.aggregate) - self.get = core.async_with_raw_response(get, client.get) - self.get_outgoing_interface_link_type = core.async_with_raw_response( - get_outgoing_interface_link_type, client.get_outgoing_interface_link_type - ) - self.list = core.async_with_raw_response(list, client.list) - self.list_interface_linked_objects = core.async_with_raw_response( - list_interface_linked_objects, client.list_interface_linked_objects - ) - self.list_objects_for_interface = core.async_with_raw_response( - list_objects_for_interface, client.list_objects_for_interface - ) - self.list_outgoing_interface_link_types = core.async_with_raw_response( - list_outgoing_interface_link_types, client.list_outgoing_interface_link_types - ) - self.search = core.async_with_raw_response(search, client.search) - - -class _AsyncOntologyInterfaceClientStreaming: - def __init__(self, client: AsyncOntologyInterfaceClient) -> None: - def aggregate(_: ontologies_models.AggregateObjectsResponseV2): ... - def get(_: ontologies_models.InterfaceType): ... - def get_outgoing_interface_link_type(_: ontologies_models.InterfaceLinkType): ... - def list(_: ontologies_models.ListInterfaceTypesResponse): ... - def list_interface_linked_objects( - _: ontologies_models.ListInterfaceLinkedObjectsResponse, - ): ... - def list_objects_for_interface(_: ontologies_models.ListObjectsForInterfaceResponse): ... - def list_outgoing_interface_link_types( - _: ontologies_models.ListOutgoingInterfaceLinkTypesResponse, - ): ... - def search(_: ontologies_models.SearchObjectsResponseV2): ... - - self.aggregate = core.async_with_streaming_response(aggregate, client.aggregate) - self.get = core.async_with_streaming_response(get, client.get) - self.get_outgoing_interface_link_type = core.async_with_streaming_response( - get_outgoing_interface_link_type, client.get_outgoing_interface_link_type - ) - self.list = core.async_with_streaming_response(list, client.list) - self.list_interface_linked_objects = core.async_with_streaming_response( - list_interface_linked_objects, client.list_interface_linked_objects - ) - self.list_objects_for_interface = core.async_with_streaming_response( - list_objects_for_interface, client.list_objects_for_interface - ) - self.list_outgoing_interface_link_types = core.async_with_streaming_response( - list_outgoing_interface_link_types, client.list_outgoing_interface_link_types - ) - self.search = core.async_with_streaming_response(search, client.search) diff --git a/foundry_sdk/v2/ontologies/ontology_object.py b/foundry_sdk/v2/ontologies/ontology_object.py deleted file mode 100644 index d162fbfc6..000000000 --- a/foundry_sdk/v2/ontologies/ontology_object.py +++ /dev/null @@ -1,945 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing - -import pydantic - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v2.core import models as core_models -from foundry_sdk.v2.ontologies import models as ontologies_models - - -class OntologyObjectClient: - """ - The API client for the OntologyObject Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _OntologyObjectClientStreaming(self) - self.with_raw_response = _OntologyObjectClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def aggregate( - self, - ontology: ontologies_models.OntologyIdentifier, - object_type: ontologies_models.ObjectTypeApiName, - *, - aggregation: typing.List[ontologies_models.AggregationV2], - group_by: typing.List[ontologies_models.AggregationGroupByV2], - accuracy: typing.Optional[ontologies_models.AggregationAccuracyRequest] = None, - branch: typing.Optional[core_models.FoundryBranch] = None, - sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, - sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, - where: typing.Optional[ontologies_models.SearchJsonQueryV2] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> ontologies_models.AggregateObjectsResponseV2: - """ - Perform functions on object fields in the specified ontology and object type. - - :param ontology: - :type ontology: OntologyIdentifier - :param object_type: The type of the object to aggregate on. - :type object_type: ObjectTypeApiName - :param aggregation: - :type aggregation: List[AggregationV2] - :param group_by: - :type group_by: List[AggregationGroupByV2] - :param accuracy: - :type accuracy: Optional[AggregationAccuracyRequest] - :param branch: The Foundry branch to aggregate objects from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. - :type branch: Optional[FoundryBranch] - :param sdk_package_rid: The package rid of the generated SDK. - :type sdk_package_rid: Optional[SdkPackageRid] - :param sdk_version: The version of the generated SDK. - :type sdk_version: Optional[SdkVersion] - :param where: - :type where: Optional[SearchJsonQueryV2] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: ontologies_models.AggregateObjectsResponseV2 - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/ontologies/{ontology}/objects/{objectType}/aggregate", - query_params={ - "branch": branch, - "sdkPackageRid": sdk_package_rid, - "sdkVersion": sdk_version, - }, - path_params={ - "ontology": ontology, - "objectType": object_type, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=ontologies_models.AggregateObjectsRequestV2( - aggregation=aggregation, - where=where, - group_by=group_by, - accuracy=accuracy, - ), - response_type=ontologies_models.AggregateObjectsResponseV2, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def count( - self, - ontology: ontologies_models.OntologyIdentifier, - object_type: ontologies_models.ObjectTypeApiName, - *, - branch: typing.Optional[core_models.FoundryBranch] = None, - sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, - sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> ontologies_models.CountObjectsResponseV2: - """ - Returns a count of the objects of the given object type. - - :param ontology: - :type ontology: OntologyIdentifier - :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. - :type object_type: ObjectTypeApiName - :param branch: The Foundry branch to count the objects from. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported. - :type branch: Optional[FoundryBranch] - :param sdk_package_rid: The package rid of the generated SDK. - :type sdk_package_rid: Optional[SdkPackageRid] - :param sdk_version: The package version of the generated SDK. - :type sdk_version: Optional[SdkVersion] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: ontologies_models.CountObjectsResponseV2 - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/ontologies/{ontology}/objects/{objectType}/count", - query_params={ - "branch": branch, - "sdkPackageRid": sdk_package_rid, - "sdkVersion": sdk_version, - }, - path_params={ - "ontology": ontology, - "objectType": object_type, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.CountObjectsResponseV2, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - ontology: ontologies_models.OntologyIdentifier, - object_type: ontologies_models.ObjectTypeApiName, - primary_key: ontologies_models.PropertyValueEscapedString, - *, - branch: typing.Optional[core_models.FoundryBranch] = None, - exclude_rid: typing.Optional[bool] = None, - sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, - sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, - select: typing.Optional[typing.List[ontologies_models.SelectedPropertyApiName]] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> ontologies_models.OntologyObjectV2: - """ - Gets a specific object with the given primary key. - - :param ontology: - :type ontology: OntologyIdentifier - :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. - :type object_type: ObjectTypeApiName - :param primary_key: The primary key of the requested object. To look up the expected primary key for your object type, use the `Get object type` endpoint or the **Ontology Manager**. - :type primary_key: PropertyValueEscapedString - :param branch: The Foundry branch to get the object from. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported. - :type branch: Optional[FoundryBranch] - :param exclude_rid: A flag to exclude the retrieval of the `__rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2. - :type exclude_rid: Optional[bool] - :param sdk_package_rid: The package rid of the generated SDK. - :type sdk_package_rid: Optional[SdkPackageRid] - :param sdk_version: The version of the generated SDK. - :type sdk_version: Optional[SdkVersion] - :param select: The properties of the object type that should be included in the response. Omit this parameter to get all the properties. - :type select: Optional[List[SelectedPropertyApiName]] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: ontologies_models.OntologyObjectV2 - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}", - query_params={ - "branch": branch, - "excludeRid": exclude_rid, - "sdkPackageRid": sdk_package_rid, - "sdkVersion": sdk_version, - "select": select, - }, - path_params={ - "ontology": ontology, - "objectType": object_type, - "primaryKey": primary_key, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.OntologyObjectV2, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def list( - self, - ontology: ontologies_models.OntologyIdentifier, - object_type: ontologies_models.ObjectTypeApiName, - *, - branch: typing.Optional[core_models.FoundryBranch] = None, - exclude_rid: typing.Optional[bool] = None, - order_by: typing.Optional[ontologies_models.OrderBy] = None, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, - sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, - select: typing.Optional[typing.List[ontologies_models.SelectedPropertyApiName]] = None, - snapshot: typing.Optional[bool] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.ResourceIterator[ontologies_models.OntologyObjectV2]: - """ - Lists the objects for the given Ontology and object type. - - Note that this endpoint does not guarantee consistency. Changes to the data could result in missing or - repeated objects in the response pages. - - For Object Storage V1 backed objects, this endpoint returns a maximum of 10,000 objects. After 10,000 objects have been returned and if more objects - are available, attempting to load another page will result in an `ObjectsExceededLimit` error being returned. There is no limit on Object Storage V2 backed objects. - - Each page may be smaller or larger than the requested page size. However, it - is guaranteed that if there are more results available, at least one result will be present - in the response. - - Note that null value properties will not be returned. - - :param ontology: - :type ontology: OntologyIdentifier - :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. - :type object_type: ObjectTypeApiName - :param branch: The Foundry branch to list objects from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. - :type branch: Optional[FoundryBranch] - :param exclude_rid: A flag to exclude the retrieval of the `__rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2. - :type exclude_rid: Optional[bool] - :param order_by: - :type order_by: Optional[OrderBy] - :param page_size: The desired size of the page to be returned. Defaults to 1,000. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. - :type page_size: Optional[PageSize] - :param page_token: - :type page_token: Optional[PageToken] - :param sdk_package_rid: The package rid of the generated SDK. - :type sdk_package_rid: Optional[SdkPackageRid] - :param sdk_version: The version of the generated SDK. - :type sdk_version: Optional[SdkVersion] - :param select: The properties of the object type that should be included in the response. Omit this parameter to get all the properties. - :type select: Optional[List[SelectedPropertyApiName]] - :param snapshot: A flag to use snapshot consistency when paging. Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. This defaults to false if not specified, which means you will always get the latest results. - :type snapshot: Optional[bool] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.ResourceIterator[ontologies_models.OntologyObjectV2] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/ontologies/{ontology}/objects/{objectType}", - query_params={ - "branch": branch, - "excludeRid": exclude_rid, - "orderBy": order_by, - "pageSize": page_size, - "pageToken": page_token, - "sdkPackageRid": sdk_package_rid, - "sdkVersion": sdk_version, - "select": select, - "snapshot": snapshot, - }, - path_params={ - "ontology": ontology, - "objectType": object_type, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.ListObjectsResponseV2, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def search( - self, - ontology: ontologies_models.OntologyIdentifier, - object_type: ontologies_models.ObjectTypeApiName, - *, - select: typing.List[ontologies_models.PropertyApiName], - select_v2: typing.Optional[typing.List[ontologies_models.PropertyIdentifier]] = None, - branch: typing.Optional[core_models.FoundryBranch] = None, - exclude_rid: typing.Optional[bool] = None, - order_by: typing.Optional[ontologies_models.SearchOrderByV2] = None, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, - sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, - snapshot: typing.Optional[bool] = None, - where: typing.Optional[ontologies_models.SearchJsonQueryV2] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> ontologies_models.SearchObjectsResponseV2: - """ - Search for objects in the specified ontology and object type. The request body is used - to filter objects based on the specified query. The supported queries are: - - | Query type | Description | Supported Types | - |-----------------------------------------|-------------------------------------------------------------------------------------------------------------------|---------------------------------| - | lt | The provided property is less than the provided value. | number, string, date, timestamp | - | gt | The provided property is greater than the provided value. | number, string, date, timestamp | - | lte | The provided property is less than or equal to the provided value. | number, string, date, timestamp | - | gte | The provided property is greater than or equal to the provided value. | number, string, date, timestamp | - | eq | The provided property is exactly equal to the provided value. | number, string, date, timestamp | - | isNull | The provided property is (or is not) null. | all | - | contains | The provided property contains the provided value. | array | - | not | The sub-query does not match. | N/A (applied on a query) | - | and | All the sub-queries match. | N/A (applied on queries) | - | or | At least one of the sub-queries match. | N/A (applied on queries) | - | containsAllTermsInOrderPrefixLastTerm | The provided property contains all the terms provided in order. The last term can be a partial prefix match. | string | - | containsAllTermsInOrder | The provided property contains the provided term as a substring. | string | - | containsAnyTerm | The provided property contains at least one of the terms separated by whitespace. | string | - | containsAllTerms | The provided property contains all the terms separated by whitespace. | string | - | startsWith | Deprecated alias for containsAllTermsInOrderPrefixLastTerm. | string | - - Queries can be at most three levels deep. By default, terms are separated by whitespace or punctuation (`?!,:;-[](){}'"~`). Periods (`.`) on their own are ignored. - Partial terms are not matched by terms filters except where explicitly noted. - - :param ontology: - :type ontology: OntologyIdentifier - :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. - :type object_type: ObjectTypeApiName - :param select: The API names of the object type properties to include in the response. - :type select: List[PropertyApiName] - :param select_v2: The identifiers of the properties to include in the response. Only selectV2 or select should be populated, but not both. - :type select_v2: Optional[List[PropertyIdentifier]] - :param branch: The Foundry branch to search objects from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. - :type branch: Optional[FoundryBranch] - :param exclude_rid: A flag to exclude the retrieval of the `__rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2. - :type exclude_rid: Optional[bool] - :param order_by: - :type order_by: Optional[SearchOrderByV2] - :param page_size: - :type page_size: Optional[PageSize] - :param page_token: - :type page_token: Optional[PageToken] - :param sdk_package_rid: The package rid of the generated SDK. - :type sdk_package_rid: Optional[SdkPackageRid] - :param sdk_version: The version of the generated SDK. - :type sdk_version: Optional[SdkVersion] - :param snapshot: A flag to use snapshot consistency when paging. Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. This defaults to false if not specified, which means you will always get the latest results. - :type snapshot: Optional[bool] - :param where: - :type where: Optional[SearchJsonQueryV2] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: ontologies_models.SearchObjectsResponseV2 - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/ontologies/{ontology}/objects/{objectType}/search", - query_params={ - "branch": branch, - "sdkPackageRid": sdk_package_rid, - "sdkVersion": sdk_version, - }, - path_params={ - "ontology": ontology, - "objectType": object_type, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=ontologies_models.SearchObjectsRequestV2( - where=where, - order_by=order_by, - page_size=page_size, - page_token=page_token, - select=select, - select_v2=select_v2, - exclude_rid=exclude_rid, - snapshot=snapshot, - ), - response_type=ontologies_models.SearchObjectsResponseV2, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _OntologyObjectClientRaw: - def __init__(self, client: OntologyObjectClient) -> None: - def aggregate(_: ontologies_models.AggregateObjectsResponseV2): ... - def count(_: ontologies_models.CountObjectsResponseV2): ... - def get(_: ontologies_models.OntologyObjectV2): ... - def list(_: ontologies_models.ListObjectsResponseV2): ... - def search(_: ontologies_models.SearchObjectsResponseV2): ... - - self.aggregate = core.with_raw_response(aggregate, client.aggregate) - self.count = core.with_raw_response(count, client.count) - self.get = core.with_raw_response(get, client.get) - self.list = core.with_raw_response(list, client.list) - self.search = core.with_raw_response(search, client.search) - - -class _OntologyObjectClientStreaming: - def __init__(self, client: OntologyObjectClient) -> None: - def aggregate(_: ontologies_models.AggregateObjectsResponseV2): ... - def count(_: ontologies_models.CountObjectsResponseV2): ... - def get(_: ontologies_models.OntologyObjectV2): ... - def list(_: ontologies_models.ListObjectsResponseV2): ... - def search(_: ontologies_models.SearchObjectsResponseV2): ... - - self.aggregate = core.with_streaming_response(aggregate, client.aggregate) - self.count = core.with_streaming_response(count, client.count) - self.get = core.with_streaming_response(get, client.get) - self.list = core.with_streaming_response(list, client.list) - self.search = core.with_streaming_response(search, client.search) - - -class AsyncOntologyObjectClient: - """ - The API client for the OntologyObject Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AsyncOntologyObjectClientStreaming(self) - self.with_raw_response = _AsyncOntologyObjectClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def aggregate( - self, - ontology: ontologies_models.OntologyIdentifier, - object_type: ontologies_models.ObjectTypeApiName, - *, - aggregation: typing.List[ontologies_models.AggregationV2], - group_by: typing.List[ontologies_models.AggregationGroupByV2], - accuracy: typing.Optional[ontologies_models.AggregationAccuracyRequest] = None, - branch: typing.Optional[core_models.FoundryBranch] = None, - sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, - sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, - where: typing.Optional[ontologies_models.SearchJsonQueryV2] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[ontologies_models.AggregateObjectsResponseV2]: - """ - Perform functions on object fields in the specified ontology and object type. - - :param ontology: - :type ontology: OntologyIdentifier - :param object_type: The type of the object to aggregate on. - :type object_type: ObjectTypeApiName - :param aggregation: - :type aggregation: List[AggregationV2] - :param group_by: - :type group_by: List[AggregationGroupByV2] - :param accuracy: - :type accuracy: Optional[AggregationAccuracyRequest] - :param branch: The Foundry branch to aggregate objects from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. - :type branch: Optional[FoundryBranch] - :param sdk_package_rid: The package rid of the generated SDK. - :type sdk_package_rid: Optional[SdkPackageRid] - :param sdk_version: The version of the generated SDK. - :type sdk_version: Optional[SdkVersion] - :param where: - :type where: Optional[SearchJsonQueryV2] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[ontologies_models.AggregateObjectsResponseV2] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/ontologies/{ontology}/objects/{objectType}/aggregate", - query_params={ - "branch": branch, - "sdkPackageRid": sdk_package_rid, - "sdkVersion": sdk_version, - }, - path_params={ - "ontology": ontology, - "objectType": object_type, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=ontologies_models.AggregateObjectsRequestV2( - aggregation=aggregation, - where=where, - group_by=group_by, - accuracy=accuracy, - ), - response_type=ontologies_models.AggregateObjectsResponseV2, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def count( - self, - ontology: ontologies_models.OntologyIdentifier, - object_type: ontologies_models.ObjectTypeApiName, - *, - branch: typing.Optional[core_models.FoundryBranch] = None, - sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, - sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[ontologies_models.CountObjectsResponseV2]: - """ - Returns a count of the objects of the given object type. - - :param ontology: - :type ontology: OntologyIdentifier - :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. - :type object_type: ObjectTypeApiName - :param branch: The Foundry branch to count the objects from. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported. - :type branch: Optional[FoundryBranch] - :param sdk_package_rid: The package rid of the generated SDK. - :type sdk_package_rid: Optional[SdkPackageRid] - :param sdk_version: The package version of the generated SDK. - :type sdk_version: Optional[SdkVersion] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[ontologies_models.CountObjectsResponseV2] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/ontologies/{ontology}/objects/{objectType}/count", - query_params={ - "branch": branch, - "sdkPackageRid": sdk_package_rid, - "sdkVersion": sdk_version, - }, - path_params={ - "ontology": ontology, - "objectType": object_type, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.CountObjectsResponseV2, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - ontology: ontologies_models.OntologyIdentifier, - object_type: ontologies_models.ObjectTypeApiName, - primary_key: ontologies_models.PropertyValueEscapedString, - *, - branch: typing.Optional[core_models.FoundryBranch] = None, - exclude_rid: typing.Optional[bool] = None, - sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, - sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, - select: typing.Optional[typing.List[ontologies_models.SelectedPropertyApiName]] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[ontologies_models.OntologyObjectV2]: - """ - Gets a specific object with the given primary key. - - :param ontology: - :type ontology: OntologyIdentifier - :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. - :type object_type: ObjectTypeApiName - :param primary_key: The primary key of the requested object. To look up the expected primary key for your object type, use the `Get object type` endpoint or the **Ontology Manager**. - :type primary_key: PropertyValueEscapedString - :param branch: The Foundry branch to get the object from. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported. - :type branch: Optional[FoundryBranch] - :param exclude_rid: A flag to exclude the retrieval of the `__rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2. - :type exclude_rid: Optional[bool] - :param sdk_package_rid: The package rid of the generated SDK. - :type sdk_package_rid: Optional[SdkPackageRid] - :param sdk_version: The version of the generated SDK. - :type sdk_version: Optional[SdkVersion] - :param select: The properties of the object type that should be included in the response. Omit this parameter to get all the properties. - :type select: Optional[List[SelectedPropertyApiName]] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[ontologies_models.OntologyObjectV2] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}", - query_params={ - "branch": branch, - "excludeRid": exclude_rid, - "sdkPackageRid": sdk_package_rid, - "sdkVersion": sdk_version, - "select": select, - }, - path_params={ - "ontology": ontology, - "objectType": object_type, - "primaryKey": primary_key, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.OntologyObjectV2, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def list( - self, - ontology: ontologies_models.OntologyIdentifier, - object_type: ontologies_models.ObjectTypeApiName, - *, - branch: typing.Optional[core_models.FoundryBranch] = None, - exclude_rid: typing.Optional[bool] = None, - order_by: typing.Optional[ontologies_models.OrderBy] = None, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, - sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, - select: typing.Optional[typing.List[ontologies_models.SelectedPropertyApiName]] = None, - snapshot: typing.Optional[bool] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.AsyncResourceIterator[ontologies_models.OntologyObjectV2]: - """ - Lists the objects for the given Ontology and object type. - - Note that this endpoint does not guarantee consistency. Changes to the data could result in missing or - repeated objects in the response pages. - - For Object Storage V1 backed objects, this endpoint returns a maximum of 10,000 objects. After 10,000 objects have been returned and if more objects - are available, attempting to load another page will result in an `ObjectsExceededLimit` error being returned. There is no limit on Object Storage V2 backed objects. - - Each page may be smaller or larger than the requested page size. However, it - is guaranteed that if there are more results available, at least one result will be present - in the response. - - Note that null value properties will not be returned. - - :param ontology: - :type ontology: OntologyIdentifier - :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. - :type object_type: ObjectTypeApiName - :param branch: The Foundry branch to list objects from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. - :type branch: Optional[FoundryBranch] - :param exclude_rid: A flag to exclude the retrieval of the `__rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2. - :type exclude_rid: Optional[bool] - :param order_by: - :type order_by: Optional[OrderBy] - :param page_size: The desired size of the page to be returned. Defaults to 1,000. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. - :type page_size: Optional[PageSize] - :param page_token: - :type page_token: Optional[PageToken] - :param sdk_package_rid: The package rid of the generated SDK. - :type sdk_package_rid: Optional[SdkPackageRid] - :param sdk_version: The version of the generated SDK. - :type sdk_version: Optional[SdkVersion] - :param select: The properties of the object type that should be included in the response. Omit this parameter to get all the properties. - :type select: Optional[List[SelectedPropertyApiName]] - :param snapshot: A flag to use snapshot consistency when paging. Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. This defaults to false if not specified, which means you will always get the latest results. - :type snapshot: Optional[bool] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.AsyncResourceIterator[ontologies_models.OntologyObjectV2] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/ontologies/{ontology}/objects/{objectType}", - query_params={ - "branch": branch, - "excludeRid": exclude_rid, - "orderBy": order_by, - "pageSize": page_size, - "pageToken": page_token, - "sdkPackageRid": sdk_package_rid, - "sdkVersion": sdk_version, - "select": select, - "snapshot": snapshot, - }, - path_params={ - "ontology": ontology, - "objectType": object_type, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.ListObjectsResponseV2, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def search( - self, - ontology: ontologies_models.OntologyIdentifier, - object_type: ontologies_models.ObjectTypeApiName, - *, - select: typing.List[ontologies_models.PropertyApiName], - select_v2: typing.Optional[typing.List[ontologies_models.PropertyIdentifier]] = None, - branch: typing.Optional[core_models.FoundryBranch] = None, - exclude_rid: typing.Optional[bool] = None, - order_by: typing.Optional[ontologies_models.SearchOrderByV2] = None, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, - sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, - snapshot: typing.Optional[bool] = None, - where: typing.Optional[ontologies_models.SearchJsonQueryV2] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[ontologies_models.SearchObjectsResponseV2]: - """ - Search for objects in the specified ontology and object type. The request body is used - to filter objects based on the specified query. The supported queries are: - - | Query type | Description | Supported Types | - |-----------------------------------------|-------------------------------------------------------------------------------------------------------------------|---------------------------------| - | lt | The provided property is less than the provided value. | number, string, date, timestamp | - | gt | The provided property is greater than the provided value. | number, string, date, timestamp | - | lte | The provided property is less than or equal to the provided value. | number, string, date, timestamp | - | gte | The provided property is greater than or equal to the provided value. | number, string, date, timestamp | - | eq | The provided property is exactly equal to the provided value. | number, string, date, timestamp | - | isNull | The provided property is (or is not) null. | all | - | contains | The provided property contains the provided value. | array | - | not | The sub-query does not match. | N/A (applied on a query) | - | and | All the sub-queries match. | N/A (applied on queries) | - | or | At least one of the sub-queries match. | N/A (applied on queries) | - | containsAllTermsInOrderPrefixLastTerm | The provided property contains all the terms provided in order. The last term can be a partial prefix match. | string | - | containsAllTermsInOrder | The provided property contains the provided term as a substring. | string | - | containsAnyTerm | The provided property contains at least one of the terms separated by whitespace. | string | - | containsAllTerms | The provided property contains all the terms separated by whitespace. | string | - | startsWith | Deprecated alias for containsAllTermsInOrderPrefixLastTerm. | string | - - Queries can be at most three levels deep. By default, terms are separated by whitespace or punctuation (`?!,:;-[](){}'"~`). Periods (`.`) on their own are ignored. - Partial terms are not matched by terms filters except where explicitly noted. - - :param ontology: - :type ontology: OntologyIdentifier - :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. - :type object_type: ObjectTypeApiName - :param select: The API names of the object type properties to include in the response. - :type select: List[PropertyApiName] - :param select_v2: The identifiers of the properties to include in the response. Only selectV2 or select should be populated, but not both. - :type select_v2: Optional[List[PropertyIdentifier]] - :param branch: The Foundry branch to search objects from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. - :type branch: Optional[FoundryBranch] - :param exclude_rid: A flag to exclude the retrieval of the `__rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2. - :type exclude_rid: Optional[bool] - :param order_by: - :type order_by: Optional[SearchOrderByV2] - :param page_size: - :type page_size: Optional[PageSize] - :param page_token: - :type page_token: Optional[PageToken] - :param sdk_package_rid: The package rid of the generated SDK. - :type sdk_package_rid: Optional[SdkPackageRid] - :param sdk_version: The version of the generated SDK. - :type sdk_version: Optional[SdkVersion] - :param snapshot: A flag to use snapshot consistency when paging. Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. This defaults to false if not specified, which means you will always get the latest results. - :type snapshot: Optional[bool] - :param where: - :type where: Optional[SearchJsonQueryV2] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[ontologies_models.SearchObjectsResponseV2] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/ontologies/{ontology}/objects/{objectType}/search", - query_params={ - "branch": branch, - "sdkPackageRid": sdk_package_rid, - "sdkVersion": sdk_version, - }, - path_params={ - "ontology": ontology, - "objectType": object_type, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=ontologies_models.SearchObjectsRequestV2( - where=where, - order_by=order_by, - page_size=page_size, - page_token=page_token, - select=select, - select_v2=select_v2, - exclude_rid=exclude_rid, - snapshot=snapshot, - ), - response_type=ontologies_models.SearchObjectsResponseV2, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _AsyncOntologyObjectClientRaw: - def __init__(self, client: AsyncOntologyObjectClient) -> None: - def aggregate(_: ontologies_models.AggregateObjectsResponseV2): ... - def count(_: ontologies_models.CountObjectsResponseV2): ... - def get(_: ontologies_models.OntologyObjectV2): ... - def list(_: ontologies_models.ListObjectsResponseV2): ... - def search(_: ontologies_models.SearchObjectsResponseV2): ... - - self.aggregate = core.async_with_raw_response(aggregate, client.aggregate) - self.count = core.async_with_raw_response(count, client.count) - self.get = core.async_with_raw_response(get, client.get) - self.list = core.async_with_raw_response(list, client.list) - self.search = core.async_with_raw_response(search, client.search) - - -class _AsyncOntologyObjectClientStreaming: - def __init__(self, client: AsyncOntologyObjectClient) -> None: - def aggregate(_: ontologies_models.AggregateObjectsResponseV2): ... - def count(_: ontologies_models.CountObjectsResponseV2): ... - def get(_: ontologies_models.OntologyObjectV2): ... - def list(_: ontologies_models.ListObjectsResponseV2): ... - def search(_: ontologies_models.SearchObjectsResponseV2): ... - - self.aggregate = core.async_with_streaming_response(aggregate, client.aggregate) - self.count = core.async_with_streaming_response(count, client.count) - self.get = core.async_with_streaming_response(get, client.get) - self.list = core.async_with_streaming_response(list, client.list) - self.search = core.async_with_streaming_response(search, client.search) diff --git a/foundry_sdk/v2/ontologies/ontology_object_set.py b/foundry_sdk/v2/ontologies/ontology_object_set.py deleted file mode 100644 index 4ac4224f9..000000000 --- a/foundry_sdk/v2/ontologies/ontology_object_set.py +++ /dev/null @@ -1,1353 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing - -import pydantic - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v2.core import models as core_models -from foundry_sdk.v2.ontologies import models as ontologies_models - - -class OntologyObjectSetClient: - """ - The API client for the OntologyObjectSet Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _OntologyObjectSetClientStreaming(self) - self.with_raw_response = _OntologyObjectSetClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def aggregate( - self, - ontology: ontologies_models.OntologyIdentifier, - *, - aggregation: typing.List[ontologies_models.AggregationV2], - group_by: typing.List[ontologies_models.AggregationGroupByV2], - object_set: ontologies_models.ObjectSet, - accuracy: typing.Optional[ontologies_models.AggregationAccuracyRequest] = None, - branch: typing.Optional[core_models.FoundryBranch] = None, - include_compute_usage: typing.Optional[core_models.IncludeComputeUsage] = None, - sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, - sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, - transaction_id: typing.Optional[ontologies_models.OntologyTransactionId] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> ontologies_models.AggregateObjectsResponseV2: - """ - Aggregates the ontology objects present in the `ObjectSet` from the provided object set definition. - - :param ontology: - :type ontology: OntologyIdentifier - :param aggregation: - :type aggregation: List[AggregationV2] - :param group_by: - :type group_by: List[AggregationGroupByV2] - :param object_set: - :type object_set: ObjectSet - :param accuracy: - :type accuracy: Optional[AggregationAccuracyRequest] - :param branch: The Foundry branch to aggregate the objects from. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported. - :type branch: Optional[FoundryBranch] - :param include_compute_usage: - :type include_compute_usage: Optional[IncludeComputeUsage] - :param sdk_package_rid: The package rid of the generated SDK. - :type sdk_package_rid: Optional[SdkPackageRid] - :param sdk_version: The package version of the generated SDK. - :type sdk_version: Optional[SdkVersion] - :param transaction_id: The ID of an Ontology transaction to read from. Transactions are an experimental feature and all workflows may not be supported. - :type transaction_id: Optional[OntologyTransactionId] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: ontologies_models.AggregateObjectsResponseV2 - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/ontologies/{ontology}/objectSets/aggregate", - query_params={ - "branch": branch, - "sdkPackageRid": sdk_package_rid, - "sdkVersion": sdk_version, - "transactionId": transaction_id, - }, - path_params={ - "ontology": ontology, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=ontologies_models.AggregateObjectSetRequestV2( - aggregation=aggregation, - object_set=object_set, - group_by=group_by, - accuracy=accuracy, - include_compute_usage=include_compute_usage, - ), - response_type=ontologies_models.AggregateObjectsResponseV2, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def create_temporary( - self, - ontology: ontologies_models.OntologyIdentifier, - *, - object_set: ontologies_models.ObjectSet, - sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, - sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> ontologies_models.CreateTemporaryObjectSetResponseV2: - """ - Creates a temporary `ObjectSet` from the given definition. This `ObjectSet` expires after one hour. - - :param ontology: - :type ontology: OntologyIdentifier - :param object_set: - :type object_set: ObjectSet - :param sdk_package_rid: The package rid of the generated SDK. - :type sdk_package_rid: Optional[SdkPackageRid] - :param sdk_version: The package version of the generated SDK. - :type sdk_version: Optional[SdkVersion] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: ontologies_models.CreateTemporaryObjectSetResponseV2 - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/ontologies/{ontology}/objectSets/createTemporary", - query_params={ - "sdkPackageRid": sdk_package_rid, - "sdkVersion": sdk_version, - }, - path_params={ - "ontology": ontology, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=ontologies_models.CreateTemporaryObjectSetRequestV2( - object_set=object_set, - ), - response_type=ontologies_models.CreateTemporaryObjectSetResponseV2, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - ontology: ontologies_models.OntologyIdentifier, - object_set_rid: ontologies_models.ObjectSetRid, - *, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> ontologies_models.ObjectSet: - """ - Gets the definition of the `ObjectSet` with the given RID. - - :param ontology: - :type ontology: OntologyIdentifier - :param object_set_rid: The RID of the object set. - :type object_set_rid: ObjectSetRid - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: ontologies_models.ObjectSet - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/ontologies/{ontology}/objectSets/{objectSetRid}", - query_params={}, - path_params={ - "ontology": ontology, - "objectSetRid": object_set_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.ObjectSet, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def load( - self, - ontology: ontologies_models.OntologyIdentifier, - *, - object_set: ontologies_models.ObjectSet, - select: typing.List[ontologies_models.SelectedPropertyApiName], - select_v2: typing.Optional[typing.List[ontologies_models.PropertyIdentifier]] = None, - branch: typing.Optional[core_models.FoundryBranch] = None, - exclude_rid: typing.Optional[bool] = None, - include_compute_usage: typing.Optional[core_models.IncludeComputeUsage] = None, - order_by: typing.Optional[ontologies_models.SearchOrderByV2] = None, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, - sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, - snapshot: typing.Optional[bool] = None, - transaction_id: typing.Optional[ontologies_models.OntologyTransactionId] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> ontologies_models.LoadObjectSetResponseV2: - """ - Load the ontology objects present in the `ObjectSet` from the provided object set definition. - - For Object Storage V1 backed objects, this endpoint returns a maximum of 10,000 objects. After 10,000 objects have been returned and if more objects - are available, attempting to load another page will result in an `ObjectsExceededLimit` error being returned. There is no limit on Object Storage V2 backed objects. - - Note that null value properties will not be returned. - - Vector properties will not be returned unless included in the `select` parameter. - - :param ontology: - :type ontology: OntologyIdentifier - :param object_set: - :type object_set: ObjectSet - :param select: - :type select: List[SelectedPropertyApiName] - :param select_v2: The identifiers of the properties to include in the response. Only selectV2 or select should be populated, but not both. - :type select_v2: Optional[List[PropertyIdentifier]] - :param branch: The Foundry branch to load the object set from. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported. - :type branch: Optional[FoundryBranch] - :param exclude_rid: A flag to exclude the retrieval of the `__rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2. - :type exclude_rid: Optional[bool] - :param include_compute_usage: - :type include_compute_usage: Optional[IncludeComputeUsage] - :param order_by: - :type order_by: Optional[SearchOrderByV2] - :param page_size: - :type page_size: Optional[PageSize] - :param page_token: - :type page_token: Optional[PageToken] - :param sdk_package_rid: The package rid of the generated SDK. - :type sdk_package_rid: Optional[SdkPackageRid] - :param sdk_version: The package version of the generated SDK. - :type sdk_version: Optional[SdkVersion] - :param snapshot: A flag to use snapshot consistency when paging. Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. This defaults to false if not specified, which means you will always get the latest results. - :type snapshot: Optional[bool] - :param transaction_id: The ID of an Ontology transaction to read from. Transactions are an experimental feature and all workflows may not be supported. - :type transaction_id: Optional[OntologyTransactionId] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: ontologies_models.LoadObjectSetResponseV2 - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/ontologies/{ontology}/objectSets/loadObjects", - query_params={ - "branch": branch, - "sdkPackageRid": sdk_package_rid, - "sdkVersion": sdk_version, - "transactionId": transaction_id, - }, - path_params={ - "ontology": ontology, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=ontologies_models.LoadObjectSetRequestV2( - object_set=object_set, - order_by=order_by, - select=select, - select_v2=select_v2, - page_token=page_token, - page_size=page_size, - exclude_rid=exclude_rid, - snapshot=snapshot, - include_compute_usage=include_compute_usage, - ), - response_type=ontologies_models.LoadObjectSetResponseV2, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def load_links( - self, - ontology: ontologies_models.OntologyIdentifier, - *, - links: typing.List[ontologies_models.LinkTypeApiName], - object_set: ontologies_models.ObjectSet, - branch: typing.Optional[core_models.FoundryBranch] = None, - include_compute_usage: typing.Optional[core_models.IncludeComputeUsage] = None, - page_token: typing.Optional[core_models.PageToken] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, - sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> ontologies_models.LoadObjectSetLinksResponseV2: - """ - Loads the specified links from the defined object set. - - Links are defined as a link type API name and object locators for the source and target objects - where only the `__primaryKey` and `__apiName` properties are loaded. - - Links are grouped by source object locator; however, the links for a given source object may be - split over multiple entries with the same source object locator. - - Please keep these limitations in mind: - - Links returned may be stale. For example, primary keys returned by this endpoint may not exist anymore. - - This endpoint requests links for 1,000 objects at a time. If, for any page of 1,000 objects, there are more - than 100,000 links present, results are limited to 100,000 links and should be considered partial. - - This endpoint does not support OSv1 links and will return an error if links provided are backed by OSv1. - - This endpoint currently does not support interface object sets or interface links, but support will be added in the near future. - - :param ontology: - :type ontology: OntologyIdentifier - :param links: - :type links: List[LinkTypeApiName] - :param object_set: - :type object_set: ObjectSet - :param branch: The Foundry branch to aggregate the objects from. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported. - :type branch: Optional[FoundryBranch] - :param include_compute_usage: - :type include_compute_usage: Optional[IncludeComputeUsage] - :param page_token: - :type page_token: Optional[PageToken] - :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. - :type preview: Optional[PreviewMode] - :param sdk_package_rid: The package rid of the generated SDK. - :type sdk_package_rid: Optional[SdkPackageRid] - :param sdk_version: The package version of the generated SDK. - :type sdk_version: Optional[SdkVersion] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: ontologies_models.LoadObjectSetLinksResponseV2 - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/ontologies/{ontology}/objectSets/loadLinks", - query_params={ - "branch": branch, - "preview": preview, - "sdkPackageRid": sdk_package_rid, - "sdkVersion": sdk_version, - }, - path_params={ - "ontology": ontology, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=ontologies_models.LoadObjectSetLinksRequestV2( - object_set=object_set, - links=links, - page_token=page_token, - include_compute_usage=include_compute_usage, - ), - response_type=ontologies_models.LoadObjectSetLinksResponseV2, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def load_multiple_object_types( - self, - ontology: ontologies_models.OntologyIdentifier, - *, - object_set: ontologies_models.ObjectSet, - select: typing.List[ontologies_models.SelectedPropertyApiName], - select_v2: typing.Optional[typing.List[ontologies_models.PropertyIdentifier]] = None, - branch: typing.Optional[core_models.FoundryBranch] = None, - exclude_rid: typing.Optional[bool] = None, - include_compute_usage: typing.Optional[core_models.IncludeComputeUsage] = None, - order_by: typing.Optional[ontologies_models.SearchOrderByV2] = None, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, - sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, - snapshot: typing.Optional[bool] = None, - transaction_id: typing.Optional[ontologies_models.OntologyTransactionId] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> ontologies_models.LoadObjectSetV2MultipleObjectTypesResponse: - """ - Load the ontology objects present in the `ObjectSet` from the provided object set definition. The resulting - objects may be scoped to an object type, in which all the selected properties on the object type are returned, or scoped - to an interface, in which only the object type properties that implement the properties of any interfaces in its - scope are returned. For objects that are scoped to an interface in the result, a mapping from interface to - object implementation is returned in order to interpret the objects as the interfaces that they implement. - - For Object Storage V1 backed objects, this endpoint returns a maximum of 10,000 objects. After 10,000 objects have been returned and if more objects - are available, attempting to load another page will result in an `ObjectsExceededLimit` error being returned. There is no limit on Object Storage V2 backed objects. - - Note that null value properties will not be returned. In addition, property metadata (rid, apiName, and primaryKey) - will be prefixed with '$' instead of '__' as is the case in `loadObjects`. - - Vector properties will not be returned unless included in the `select` parameter. - - :param ontology: - :type ontology: OntologyIdentifier - :param object_set: - :type object_set: ObjectSet - :param select: - :type select: List[SelectedPropertyApiName] - :param select_v2: The identifiers of the properties to include in the response. Only selectV2 or select should be populated, but not both. - :type select_v2: Optional[List[PropertyIdentifier]] - :param branch: The Foundry branch to load the object set for multiple object types. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported. - :type branch: Optional[FoundryBranch] - :param exclude_rid: A flag to exclude the retrieval of the `$rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2. - :type exclude_rid: Optional[bool] - :param include_compute_usage: - :type include_compute_usage: Optional[IncludeComputeUsage] - :param order_by: - :type order_by: Optional[SearchOrderByV2] - :param page_size: - :type page_size: Optional[PageSize] - :param page_token: - :type page_token: Optional[PageToken] - :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. - :type preview: Optional[PreviewMode] - :param sdk_package_rid: The package rid of the generated SDK. - :type sdk_package_rid: Optional[SdkPackageRid] - :param sdk_version: The package version of the generated SDK. - :type sdk_version: Optional[SdkVersion] - :param snapshot: A flag to use snapshot consistency when paging. Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. This defaults to false if not specified, which means you will always get the latest results. - :type snapshot: Optional[bool] - :param transaction_id: The ID of an Ontology transaction to read from. Transactions are an experimental feature and all workflows may not be supported. - :type transaction_id: Optional[OntologyTransactionId] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: ontologies_models.LoadObjectSetV2MultipleObjectTypesResponse - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/ontologies/{ontology}/objectSets/loadObjectsMultipleObjectTypes", - query_params={ - "branch": branch, - "preview": preview, - "sdkPackageRid": sdk_package_rid, - "sdkVersion": sdk_version, - "transactionId": transaction_id, - }, - path_params={ - "ontology": ontology, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=ontologies_models.LoadObjectSetV2MultipleObjectTypesRequest( - object_set=object_set, - order_by=order_by, - select=select, - select_v2=select_v2, - page_token=page_token, - page_size=page_size, - exclude_rid=exclude_rid, - snapshot=snapshot, - include_compute_usage=include_compute_usage, - ), - response_type=ontologies_models.LoadObjectSetV2MultipleObjectTypesResponse, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def load_objects_or_interfaces( - self, - ontology: ontologies_models.OntologyIdentifier, - *, - object_set: ontologies_models.ObjectSet, - select: typing.List[ontologies_models.SelectedPropertyApiName], - select_v2: typing.Optional[typing.List[ontologies_models.PropertyIdentifier]] = None, - branch: typing.Optional[core_models.FoundryBranch] = None, - exclude_rid: typing.Optional[bool] = None, - order_by: typing.Optional[ontologies_models.SearchOrderByV2] = None, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, - sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, - snapshot: typing.Optional[bool] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> ontologies_models.LoadObjectSetV2ObjectsOrInterfacesResponse: - """ - Load the ontology objects present in the `ObjectSet` from the provided object set definition. If the requested - object set contains interfaces and the object can be viewed as an interface, it will contain the properties - defined by the interface. If not, it will contain the properties defined by its object type. This allows directly - loading all objects of an interface where all objects are viewed as the interface, for example. - - Note that the result object set cannot contain a mix of objects with "interface" properties and "object type" - properties. Attempting to load an object set like this will result in an error. - - For Object Storage V1 backed objects, this endpoint returns a maximum of 10,000 objects. After 10,000 objects have been returned and if more objects - are available, attempting to load another page will result in an `ObjectsExceededLimit` error being returned. There is no limit on Object Storage V2 backed objects. - - Note that null value properties will not be returned. In addition, property metadata (rid, apiName, and primaryKey) - will be prefixed with '$' instead of '__' as is the case in `/loadObjects`. - - Vector properties will not be returned unless included in the `select` parameter. - - :param ontology: - :type ontology: OntologyIdentifier - :param object_set: - :type object_set: ObjectSet - :param select: - :type select: List[SelectedPropertyApiName] - :param select_v2: The identifiers of the properties to include in the response. Only selectV2 or select should be populated, but not both. - :type select_v2: Optional[List[PropertyIdentifier]] - :param branch: The Foundry branch to load the objects or interfaces from. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported. - :type branch: Optional[FoundryBranch] - :param exclude_rid: A flag to exclude the retrieval of the `$rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2. - :type exclude_rid: Optional[bool] - :param order_by: - :type order_by: Optional[SearchOrderByV2] - :param page_size: - :type page_size: Optional[PageSize] - :param page_token: - :type page_token: Optional[PageToken] - :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. - :type preview: Optional[PreviewMode] - :param sdk_package_rid: The package rid of the generated SDK. - :type sdk_package_rid: Optional[SdkPackageRid] - :param sdk_version: The package version of the generated SDK. - :type sdk_version: Optional[SdkVersion] - :param snapshot: A flag to use snapshot consistency when paging. Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. This defaults to false if not specified, which means you will always get the latest results. - :type snapshot: Optional[bool] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: ontologies_models.LoadObjectSetV2ObjectsOrInterfacesResponse - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/ontologies/{ontology}/objectSets/loadObjectsOrInterfaces", - query_params={ - "branch": branch, - "preview": preview, - "sdkPackageRid": sdk_package_rid, - "sdkVersion": sdk_version, - }, - path_params={ - "ontology": ontology, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=ontologies_models.LoadObjectSetV2ObjectsOrInterfacesRequest( - object_set=object_set, - order_by=order_by, - select=select, - select_v2=select_v2, - page_token=page_token, - page_size=page_size, - exclude_rid=exclude_rid, - snapshot=snapshot, - ), - response_type=ontologies_models.LoadObjectSetV2ObjectsOrInterfacesResponse, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _OntologyObjectSetClientRaw: - def __init__(self, client: OntologyObjectSetClient) -> None: - def aggregate(_: ontologies_models.AggregateObjectsResponseV2): ... - def create_temporary(_: ontologies_models.CreateTemporaryObjectSetResponseV2): ... - def get(_: ontologies_models.ObjectSet): ... - def load(_: ontologies_models.LoadObjectSetResponseV2): ... - def load_links(_: ontologies_models.LoadObjectSetLinksResponseV2): ... - def load_multiple_object_types( - _: ontologies_models.LoadObjectSetV2MultipleObjectTypesResponse, - ): ... - def load_objects_or_interfaces( - _: ontologies_models.LoadObjectSetV2ObjectsOrInterfacesResponse, - ): ... - - self.aggregate = core.with_raw_response(aggregate, client.aggregate) - self.create_temporary = core.with_raw_response(create_temporary, client.create_temporary) - self.get = core.with_raw_response(get, client.get) - self.load = core.with_raw_response(load, client.load) - self.load_links = core.with_raw_response(load_links, client.load_links) - self.load_multiple_object_types = core.with_raw_response( - load_multiple_object_types, client.load_multiple_object_types - ) - self.load_objects_or_interfaces = core.with_raw_response( - load_objects_or_interfaces, client.load_objects_or_interfaces - ) - - -class _OntologyObjectSetClientStreaming: - def __init__(self, client: OntologyObjectSetClient) -> None: - def aggregate(_: ontologies_models.AggregateObjectsResponseV2): ... - def create_temporary(_: ontologies_models.CreateTemporaryObjectSetResponseV2): ... - def get(_: ontologies_models.ObjectSet): ... - def load(_: ontologies_models.LoadObjectSetResponseV2): ... - def load_links(_: ontologies_models.LoadObjectSetLinksResponseV2): ... - def load_multiple_object_types( - _: ontologies_models.LoadObjectSetV2MultipleObjectTypesResponse, - ): ... - def load_objects_or_interfaces( - _: ontologies_models.LoadObjectSetV2ObjectsOrInterfacesResponse, - ): ... - - self.aggregate = core.with_streaming_response(aggregate, client.aggregate) - self.create_temporary = core.with_streaming_response( - create_temporary, client.create_temporary - ) - self.get = core.with_streaming_response(get, client.get) - self.load = core.with_streaming_response(load, client.load) - self.load_links = core.with_streaming_response(load_links, client.load_links) - self.load_multiple_object_types = core.with_streaming_response( - load_multiple_object_types, client.load_multiple_object_types - ) - self.load_objects_or_interfaces = core.with_streaming_response( - load_objects_or_interfaces, client.load_objects_or_interfaces - ) - - -class AsyncOntologyObjectSetClient: - """ - The API client for the OntologyObjectSet Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AsyncOntologyObjectSetClientStreaming(self) - self.with_raw_response = _AsyncOntologyObjectSetClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def aggregate( - self, - ontology: ontologies_models.OntologyIdentifier, - *, - aggregation: typing.List[ontologies_models.AggregationV2], - group_by: typing.List[ontologies_models.AggregationGroupByV2], - object_set: ontologies_models.ObjectSet, - accuracy: typing.Optional[ontologies_models.AggregationAccuracyRequest] = None, - branch: typing.Optional[core_models.FoundryBranch] = None, - include_compute_usage: typing.Optional[core_models.IncludeComputeUsage] = None, - sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, - sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, - transaction_id: typing.Optional[ontologies_models.OntologyTransactionId] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[ontologies_models.AggregateObjectsResponseV2]: - """ - Aggregates the ontology objects present in the `ObjectSet` from the provided object set definition. - - :param ontology: - :type ontology: OntologyIdentifier - :param aggregation: - :type aggregation: List[AggregationV2] - :param group_by: - :type group_by: List[AggregationGroupByV2] - :param object_set: - :type object_set: ObjectSet - :param accuracy: - :type accuracy: Optional[AggregationAccuracyRequest] - :param branch: The Foundry branch to aggregate the objects from. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported. - :type branch: Optional[FoundryBranch] - :param include_compute_usage: - :type include_compute_usage: Optional[IncludeComputeUsage] - :param sdk_package_rid: The package rid of the generated SDK. - :type sdk_package_rid: Optional[SdkPackageRid] - :param sdk_version: The package version of the generated SDK. - :type sdk_version: Optional[SdkVersion] - :param transaction_id: The ID of an Ontology transaction to read from. Transactions are an experimental feature and all workflows may not be supported. - :type transaction_id: Optional[OntologyTransactionId] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[ontologies_models.AggregateObjectsResponseV2] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/ontologies/{ontology}/objectSets/aggregate", - query_params={ - "branch": branch, - "sdkPackageRid": sdk_package_rid, - "sdkVersion": sdk_version, - "transactionId": transaction_id, - }, - path_params={ - "ontology": ontology, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=ontologies_models.AggregateObjectSetRequestV2( - aggregation=aggregation, - object_set=object_set, - group_by=group_by, - accuracy=accuracy, - include_compute_usage=include_compute_usage, - ), - response_type=ontologies_models.AggregateObjectsResponseV2, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def create_temporary( - self, - ontology: ontologies_models.OntologyIdentifier, - *, - object_set: ontologies_models.ObjectSet, - sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, - sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[ontologies_models.CreateTemporaryObjectSetResponseV2]: - """ - Creates a temporary `ObjectSet` from the given definition. This `ObjectSet` expires after one hour. - - :param ontology: - :type ontology: OntologyIdentifier - :param object_set: - :type object_set: ObjectSet - :param sdk_package_rid: The package rid of the generated SDK. - :type sdk_package_rid: Optional[SdkPackageRid] - :param sdk_version: The package version of the generated SDK. - :type sdk_version: Optional[SdkVersion] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[ontologies_models.CreateTemporaryObjectSetResponseV2] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/ontologies/{ontology}/objectSets/createTemporary", - query_params={ - "sdkPackageRid": sdk_package_rid, - "sdkVersion": sdk_version, - }, - path_params={ - "ontology": ontology, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=ontologies_models.CreateTemporaryObjectSetRequestV2( - object_set=object_set, - ), - response_type=ontologies_models.CreateTemporaryObjectSetResponseV2, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - ontology: ontologies_models.OntologyIdentifier, - object_set_rid: ontologies_models.ObjectSetRid, - *, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[ontologies_models.ObjectSet]: - """ - Gets the definition of the `ObjectSet` with the given RID. - - :param ontology: - :type ontology: OntologyIdentifier - :param object_set_rid: The RID of the object set. - :type object_set_rid: ObjectSetRid - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[ontologies_models.ObjectSet] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/ontologies/{ontology}/objectSets/{objectSetRid}", - query_params={}, - path_params={ - "ontology": ontology, - "objectSetRid": object_set_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.ObjectSet, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def load( - self, - ontology: ontologies_models.OntologyIdentifier, - *, - object_set: ontologies_models.ObjectSet, - select: typing.List[ontologies_models.SelectedPropertyApiName], - select_v2: typing.Optional[typing.List[ontologies_models.PropertyIdentifier]] = None, - branch: typing.Optional[core_models.FoundryBranch] = None, - exclude_rid: typing.Optional[bool] = None, - include_compute_usage: typing.Optional[core_models.IncludeComputeUsage] = None, - order_by: typing.Optional[ontologies_models.SearchOrderByV2] = None, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, - sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, - snapshot: typing.Optional[bool] = None, - transaction_id: typing.Optional[ontologies_models.OntologyTransactionId] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[ontologies_models.LoadObjectSetResponseV2]: - """ - Load the ontology objects present in the `ObjectSet` from the provided object set definition. - - For Object Storage V1 backed objects, this endpoint returns a maximum of 10,000 objects. After 10,000 objects have been returned and if more objects - are available, attempting to load another page will result in an `ObjectsExceededLimit` error being returned. There is no limit on Object Storage V2 backed objects. - - Note that null value properties will not be returned. - - Vector properties will not be returned unless included in the `select` parameter. - - :param ontology: - :type ontology: OntologyIdentifier - :param object_set: - :type object_set: ObjectSet - :param select: - :type select: List[SelectedPropertyApiName] - :param select_v2: The identifiers of the properties to include in the response. Only selectV2 or select should be populated, but not both. - :type select_v2: Optional[List[PropertyIdentifier]] - :param branch: The Foundry branch to load the object set from. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported. - :type branch: Optional[FoundryBranch] - :param exclude_rid: A flag to exclude the retrieval of the `__rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2. - :type exclude_rid: Optional[bool] - :param include_compute_usage: - :type include_compute_usage: Optional[IncludeComputeUsage] - :param order_by: - :type order_by: Optional[SearchOrderByV2] - :param page_size: - :type page_size: Optional[PageSize] - :param page_token: - :type page_token: Optional[PageToken] - :param sdk_package_rid: The package rid of the generated SDK. - :type sdk_package_rid: Optional[SdkPackageRid] - :param sdk_version: The package version of the generated SDK. - :type sdk_version: Optional[SdkVersion] - :param snapshot: A flag to use snapshot consistency when paging. Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. This defaults to false if not specified, which means you will always get the latest results. - :type snapshot: Optional[bool] - :param transaction_id: The ID of an Ontology transaction to read from. Transactions are an experimental feature and all workflows may not be supported. - :type transaction_id: Optional[OntologyTransactionId] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[ontologies_models.LoadObjectSetResponseV2] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/ontologies/{ontology}/objectSets/loadObjects", - query_params={ - "branch": branch, - "sdkPackageRid": sdk_package_rid, - "sdkVersion": sdk_version, - "transactionId": transaction_id, - }, - path_params={ - "ontology": ontology, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=ontologies_models.LoadObjectSetRequestV2( - object_set=object_set, - order_by=order_by, - select=select, - select_v2=select_v2, - page_token=page_token, - page_size=page_size, - exclude_rid=exclude_rid, - snapshot=snapshot, - include_compute_usage=include_compute_usage, - ), - response_type=ontologies_models.LoadObjectSetResponseV2, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def load_links( - self, - ontology: ontologies_models.OntologyIdentifier, - *, - links: typing.List[ontologies_models.LinkTypeApiName], - object_set: ontologies_models.ObjectSet, - branch: typing.Optional[core_models.FoundryBranch] = None, - include_compute_usage: typing.Optional[core_models.IncludeComputeUsage] = None, - page_token: typing.Optional[core_models.PageToken] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, - sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[ontologies_models.LoadObjectSetLinksResponseV2]: - """ - Loads the specified links from the defined object set. - - Links are defined as a link type API name and object locators for the source and target objects - where only the `__primaryKey` and `__apiName` properties are loaded. - - Links are grouped by source object locator; however, the links for a given source object may be - split over multiple entries with the same source object locator. - - Please keep these limitations in mind: - - Links returned may be stale. For example, primary keys returned by this endpoint may not exist anymore. - - This endpoint requests links for 1,000 objects at a time. If, for any page of 1,000 objects, there are more - than 100,000 links present, results are limited to 100,000 links and should be considered partial. - - This endpoint does not support OSv1 links and will return an error if links provided are backed by OSv1. - - This endpoint currently does not support interface object sets or interface links, but support will be added in the near future. - - :param ontology: - :type ontology: OntologyIdentifier - :param links: - :type links: List[LinkTypeApiName] - :param object_set: - :type object_set: ObjectSet - :param branch: The Foundry branch to aggregate the objects from. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported. - :type branch: Optional[FoundryBranch] - :param include_compute_usage: - :type include_compute_usage: Optional[IncludeComputeUsage] - :param page_token: - :type page_token: Optional[PageToken] - :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. - :type preview: Optional[PreviewMode] - :param sdk_package_rid: The package rid of the generated SDK. - :type sdk_package_rid: Optional[SdkPackageRid] - :param sdk_version: The package version of the generated SDK. - :type sdk_version: Optional[SdkVersion] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[ontologies_models.LoadObjectSetLinksResponseV2] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/ontologies/{ontology}/objectSets/loadLinks", - query_params={ - "branch": branch, - "preview": preview, - "sdkPackageRid": sdk_package_rid, - "sdkVersion": sdk_version, - }, - path_params={ - "ontology": ontology, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=ontologies_models.LoadObjectSetLinksRequestV2( - object_set=object_set, - links=links, - page_token=page_token, - include_compute_usage=include_compute_usage, - ), - response_type=ontologies_models.LoadObjectSetLinksResponseV2, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def load_multiple_object_types( - self, - ontology: ontologies_models.OntologyIdentifier, - *, - object_set: ontologies_models.ObjectSet, - select: typing.List[ontologies_models.SelectedPropertyApiName], - select_v2: typing.Optional[typing.List[ontologies_models.PropertyIdentifier]] = None, - branch: typing.Optional[core_models.FoundryBranch] = None, - exclude_rid: typing.Optional[bool] = None, - include_compute_usage: typing.Optional[core_models.IncludeComputeUsage] = None, - order_by: typing.Optional[ontologies_models.SearchOrderByV2] = None, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, - sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, - snapshot: typing.Optional[bool] = None, - transaction_id: typing.Optional[ontologies_models.OntologyTransactionId] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[ontologies_models.LoadObjectSetV2MultipleObjectTypesResponse]: - """ - Load the ontology objects present in the `ObjectSet` from the provided object set definition. The resulting - objects may be scoped to an object type, in which all the selected properties on the object type are returned, or scoped - to an interface, in which only the object type properties that implement the properties of any interfaces in its - scope are returned. For objects that are scoped to an interface in the result, a mapping from interface to - object implementation is returned in order to interpret the objects as the interfaces that they implement. - - For Object Storage V1 backed objects, this endpoint returns a maximum of 10,000 objects. After 10,000 objects have been returned and if more objects - are available, attempting to load another page will result in an `ObjectsExceededLimit` error being returned. There is no limit on Object Storage V2 backed objects. - - Note that null value properties will not be returned. In addition, property metadata (rid, apiName, and primaryKey) - will be prefixed with '$' instead of '__' as is the case in `loadObjects`. - - Vector properties will not be returned unless included in the `select` parameter. - - :param ontology: - :type ontology: OntologyIdentifier - :param object_set: - :type object_set: ObjectSet - :param select: - :type select: List[SelectedPropertyApiName] - :param select_v2: The identifiers of the properties to include in the response. Only selectV2 or select should be populated, but not both. - :type select_v2: Optional[List[PropertyIdentifier]] - :param branch: The Foundry branch to load the object set for multiple object types. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported. - :type branch: Optional[FoundryBranch] - :param exclude_rid: A flag to exclude the retrieval of the `$rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2. - :type exclude_rid: Optional[bool] - :param include_compute_usage: - :type include_compute_usage: Optional[IncludeComputeUsage] - :param order_by: - :type order_by: Optional[SearchOrderByV2] - :param page_size: - :type page_size: Optional[PageSize] - :param page_token: - :type page_token: Optional[PageToken] - :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. - :type preview: Optional[PreviewMode] - :param sdk_package_rid: The package rid of the generated SDK. - :type sdk_package_rid: Optional[SdkPackageRid] - :param sdk_version: The package version of the generated SDK. - :type sdk_version: Optional[SdkVersion] - :param snapshot: A flag to use snapshot consistency when paging. Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. This defaults to false if not specified, which means you will always get the latest results. - :type snapshot: Optional[bool] - :param transaction_id: The ID of an Ontology transaction to read from. Transactions are an experimental feature and all workflows may not be supported. - :type transaction_id: Optional[OntologyTransactionId] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[ontologies_models.LoadObjectSetV2MultipleObjectTypesResponse] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/ontologies/{ontology}/objectSets/loadObjectsMultipleObjectTypes", - query_params={ - "branch": branch, - "preview": preview, - "sdkPackageRid": sdk_package_rid, - "sdkVersion": sdk_version, - "transactionId": transaction_id, - }, - path_params={ - "ontology": ontology, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=ontologies_models.LoadObjectSetV2MultipleObjectTypesRequest( - object_set=object_set, - order_by=order_by, - select=select, - select_v2=select_v2, - page_token=page_token, - page_size=page_size, - exclude_rid=exclude_rid, - snapshot=snapshot, - include_compute_usage=include_compute_usage, - ), - response_type=ontologies_models.LoadObjectSetV2MultipleObjectTypesResponse, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def load_objects_or_interfaces( - self, - ontology: ontologies_models.OntologyIdentifier, - *, - object_set: ontologies_models.ObjectSet, - select: typing.List[ontologies_models.SelectedPropertyApiName], - select_v2: typing.Optional[typing.List[ontologies_models.PropertyIdentifier]] = None, - branch: typing.Optional[core_models.FoundryBranch] = None, - exclude_rid: typing.Optional[bool] = None, - order_by: typing.Optional[ontologies_models.SearchOrderByV2] = None, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, - sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, - snapshot: typing.Optional[bool] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[ontologies_models.LoadObjectSetV2ObjectsOrInterfacesResponse]: - """ - Load the ontology objects present in the `ObjectSet` from the provided object set definition. If the requested - object set contains interfaces and the object can be viewed as an interface, it will contain the properties - defined by the interface. If not, it will contain the properties defined by its object type. This allows directly - loading all objects of an interface where all objects are viewed as the interface, for example. - - Note that the result object set cannot contain a mix of objects with "interface" properties and "object type" - properties. Attempting to load an object set like this will result in an error. - - For Object Storage V1 backed objects, this endpoint returns a maximum of 10,000 objects. After 10,000 objects have been returned and if more objects - are available, attempting to load another page will result in an `ObjectsExceededLimit` error being returned. There is no limit on Object Storage V2 backed objects. - - Note that null value properties will not be returned. In addition, property metadata (rid, apiName, and primaryKey) - will be prefixed with '$' instead of '__' as is the case in `/loadObjects`. - - Vector properties will not be returned unless included in the `select` parameter. - - :param ontology: - :type ontology: OntologyIdentifier - :param object_set: - :type object_set: ObjectSet - :param select: - :type select: List[SelectedPropertyApiName] - :param select_v2: The identifiers of the properties to include in the response. Only selectV2 or select should be populated, but not both. - :type select_v2: Optional[List[PropertyIdentifier]] - :param branch: The Foundry branch to load the objects or interfaces from. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported. - :type branch: Optional[FoundryBranch] - :param exclude_rid: A flag to exclude the retrieval of the `$rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2. - :type exclude_rid: Optional[bool] - :param order_by: - :type order_by: Optional[SearchOrderByV2] - :param page_size: - :type page_size: Optional[PageSize] - :param page_token: - :type page_token: Optional[PageToken] - :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. - :type preview: Optional[PreviewMode] - :param sdk_package_rid: The package rid of the generated SDK. - :type sdk_package_rid: Optional[SdkPackageRid] - :param sdk_version: The package version of the generated SDK. - :type sdk_version: Optional[SdkVersion] - :param snapshot: A flag to use snapshot consistency when paging. Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. This defaults to false if not specified, which means you will always get the latest results. - :type snapshot: Optional[bool] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[ontologies_models.LoadObjectSetV2ObjectsOrInterfacesResponse] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/ontologies/{ontology}/objectSets/loadObjectsOrInterfaces", - query_params={ - "branch": branch, - "preview": preview, - "sdkPackageRid": sdk_package_rid, - "sdkVersion": sdk_version, - }, - path_params={ - "ontology": ontology, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=ontologies_models.LoadObjectSetV2ObjectsOrInterfacesRequest( - object_set=object_set, - order_by=order_by, - select=select, - select_v2=select_v2, - page_token=page_token, - page_size=page_size, - exclude_rid=exclude_rid, - snapshot=snapshot, - ), - response_type=ontologies_models.LoadObjectSetV2ObjectsOrInterfacesResponse, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _AsyncOntologyObjectSetClientRaw: - def __init__(self, client: AsyncOntologyObjectSetClient) -> None: - def aggregate(_: ontologies_models.AggregateObjectsResponseV2): ... - def create_temporary(_: ontologies_models.CreateTemporaryObjectSetResponseV2): ... - def get(_: ontologies_models.ObjectSet): ... - def load(_: ontologies_models.LoadObjectSetResponseV2): ... - def load_links(_: ontologies_models.LoadObjectSetLinksResponseV2): ... - def load_multiple_object_types( - _: ontologies_models.LoadObjectSetV2MultipleObjectTypesResponse, - ): ... - def load_objects_or_interfaces( - _: ontologies_models.LoadObjectSetV2ObjectsOrInterfacesResponse, - ): ... - - self.aggregate = core.async_with_raw_response(aggregate, client.aggregate) - self.create_temporary = core.async_with_raw_response( - create_temporary, client.create_temporary - ) - self.get = core.async_with_raw_response(get, client.get) - self.load = core.async_with_raw_response(load, client.load) - self.load_links = core.async_with_raw_response(load_links, client.load_links) - self.load_multiple_object_types = core.async_with_raw_response( - load_multiple_object_types, client.load_multiple_object_types - ) - self.load_objects_or_interfaces = core.async_with_raw_response( - load_objects_or_interfaces, client.load_objects_or_interfaces - ) - - -class _AsyncOntologyObjectSetClientStreaming: - def __init__(self, client: AsyncOntologyObjectSetClient) -> None: - def aggregate(_: ontologies_models.AggregateObjectsResponseV2): ... - def create_temporary(_: ontologies_models.CreateTemporaryObjectSetResponseV2): ... - def get(_: ontologies_models.ObjectSet): ... - def load(_: ontologies_models.LoadObjectSetResponseV2): ... - def load_links(_: ontologies_models.LoadObjectSetLinksResponseV2): ... - def load_multiple_object_types( - _: ontologies_models.LoadObjectSetV2MultipleObjectTypesResponse, - ): ... - def load_objects_or_interfaces( - _: ontologies_models.LoadObjectSetV2ObjectsOrInterfacesResponse, - ): ... - - self.aggregate = core.async_with_streaming_response(aggregate, client.aggregate) - self.create_temporary = core.async_with_streaming_response( - create_temporary, client.create_temporary - ) - self.get = core.async_with_streaming_response(get, client.get) - self.load = core.async_with_streaming_response(load, client.load) - self.load_links = core.async_with_streaming_response(load_links, client.load_links) - self.load_multiple_object_types = core.async_with_streaming_response( - load_multiple_object_types, client.load_multiple_object_types - ) - self.load_objects_or_interfaces = core.async_with_streaming_response( - load_objects_or_interfaces, client.load_objects_or_interfaces - ) diff --git a/foundry_sdk/v2/ontologies/ontology_transaction.py b/foundry_sdk/v2/ontologies/ontology_transaction.py deleted file mode 100644 index 5b351e2bf..000000000 --- a/foundry_sdk/v2/ontologies/ontology_transaction.py +++ /dev/null @@ -1,210 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing - -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v2.core import models as core_models -from foundry_sdk.v2.ontologies import models as ontologies_models - - -class OntologyTransactionClient: - """ - The API client for the OntologyTransaction Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _OntologyTransactionClientStreaming(self) - self.with_raw_response = _OntologyTransactionClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def post_edits( - self, - ontology: ontologies_models.OntologyIdentifier, - transaction_id: ontologies_models.OntologyTransactionId, - *, - edits: typing.List[ontologies_models.TransactionEdit], - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> ontologies_models.PostTransactionEditsResponse: - """ - Applies a set of edits to a transaction in order. - - :param ontology: - :type ontology: OntologyIdentifier - :param transaction_id: The ID of the transaction to apply edits to. Transactions are an experimental feature and all workflows may not be supported. - :type transaction_id: OntologyTransactionId - :param edits: - :type edits: List[TransactionEdit] - :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: ontologies_models.PostTransactionEditsResponse - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/ontologies/{ontology}/transactions/{transactionId}/edits", - query_params={ - "preview": preview, - }, - path_params={ - "ontology": ontology, - "transactionId": transaction_id, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=ontologies_models.PostTransactionEditsRequest( - edits=edits, - ), - response_type=ontologies_models.PostTransactionEditsResponse, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _OntologyTransactionClientRaw: - def __init__(self, client: OntologyTransactionClient) -> None: - def post_edits(_: ontologies_models.PostTransactionEditsResponse): ... - - self.post_edits = core.with_raw_response(post_edits, client.post_edits) - - -class _OntologyTransactionClientStreaming: - def __init__(self, client: OntologyTransactionClient) -> None: - def post_edits(_: ontologies_models.PostTransactionEditsResponse): ... - - self.post_edits = core.with_streaming_response(post_edits, client.post_edits) - - -class AsyncOntologyTransactionClient: - """ - The API client for the OntologyTransaction Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AsyncOntologyTransactionClientStreaming(self) - self.with_raw_response = _AsyncOntologyTransactionClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def post_edits( - self, - ontology: ontologies_models.OntologyIdentifier, - transaction_id: ontologies_models.OntologyTransactionId, - *, - edits: typing.List[ontologies_models.TransactionEdit], - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[ontologies_models.PostTransactionEditsResponse]: - """ - Applies a set of edits to a transaction in order. - - :param ontology: - :type ontology: OntologyIdentifier - :param transaction_id: The ID of the transaction to apply edits to. Transactions are an experimental feature and all workflows may not be supported. - :type transaction_id: OntologyTransactionId - :param edits: - :type edits: List[TransactionEdit] - :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[ontologies_models.PostTransactionEditsResponse] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/ontologies/{ontology}/transactions/{transactionId}/edits", - query_params={ - "preview": preview, - }, - path_params={ - "ontology": ontology, - "transactionId": transaction_id, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=ontologies_models.PostTransactionEditsRequest( - edits=edits, - ), - response_type=ontologies_models.PostTransactionEditsResponse, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _AsyncOntologyTransactionClientRaw: - def __init__(self, client: AsyncOntologyTransactionClient) -> None: - def post_edits(_: ontologies_models.PostTransactionEditsResponse): ... - - self.post_edits = core.async_with_raw_response(post_edits, client.post_edits) - - -class _AsyncOntologyTransactionClientStreaming: - def __init__(self, client: AsyncOntologyTransactionClient) -> None: - def post_edits(_: ontologies_models.PostTransactionEditsResponse): ... - - self.post_edits = core.async_with_streaming_response(post_edits, client.post_edits) diff --git a/foundry_sdk/v2/ontologies/ontology_value_type.py b/foundry_sdk/v2/ontologies/ontology_value_type.py deleted file mode 100644 index f96010edf..000000000 --- a/foundry_sdk/v2/ontologies/ontology_value_type.py +++ /dev/null @@ -1,296 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing - -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v2.core import models as core_models -from foundry_sdk.v2.ontologies import models as ontologies_models - - -class OntologyValueTypeClient: - """ - The API client for the OntologyValueType Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _OntologyValueTypeClientStreaming(self) - self.with_raw_response = _OntologyValueTypeClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - ontology: ontologies_models.OntologyIdentifier, - value_type: ontologies_models.ValueTypeApiName, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> ontologies_models.OntologyValueType: - """ - Gets a specific value type with the given API name. - - :param ontology: - :type ontology: OntologyIdentifier - :param value_type: The API name of the value type. To find the API name, use the **List value types** endpoint or check the **Ontology Manager**. - :type value_type: ValueTypeApiName - :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: ontologies_models.OntologyValueType - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/ontologies/{ontology}/valueTypes/{valueType}", - query_params={ - "preview": preview, - }, - path_params={ - "ontology": ontology, - "valueType": value_type, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.OntologyValueType, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def list( - self, - ontology: ontologies_models.OntologyIdentifier, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> ontologies_models.ListOntologyValueTypesResponse: - """ - Lists the latest versions of the value types for the given Ontology. - - :param ontology: - :type ontology: OntologyIdentifier - :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: ontologies_models.ListOntologyValueTypesResponse - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/ontologies/{ontology}/valueTypes", - query_params={ - "preview": preview, - }, - path_params={ - "ontology": ontology, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.ListOntologyValueTypesResponse, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _OntologyValueTypeClientRaw: - def __init__(self, client: OntologyValueTypeClient) -> None: - def get(_: ontologies_models.OntologyValueType): ... - def list(_: ontologies_models.ListOntologyValueTypesResponse): ... - - self.get = core.with_raw_response(get, client.get) - self.list = core.with_raw_response(list, client.list) - - -class _OntologyValueTypeClientStreaming: - def __init__(self, client: OntologyValueTypeClient) -> None: - def get(_: ontologies_models.OntologyValueType): ... - def list(_: ontologies_models.ListOntologyValueTypesResponse): ... - - self.get = core.with_streaming_response(get, client.get) - self.list = core.with_streaming_response(list, client.list) - - -class AsyncOntologyValueTypeClient: - """ - The API client for the OntologyValueType Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AsyncOntologyValueTypeClientStreaming(self) - self.with_raw_response = _AsyncOntologyValueTypeClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - ontology: ontologies_models.OntologyIdentifier, - value_type: ontologies_models.ValueTypeApiName, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[ontologies_models.OntologyValueType]: - """ - Gets a specific value type with the given API name. - - :param ontology: - :type ontology: OntologyIdentifier - :param value_type: The API name of the value type. To find the API name, use the **List value types** endpoint or check the **Ontology Manager**. - :type value_type: ValueTypeApiName - :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[ontologies_models.OntologyValueType] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/ontologies/{ontology}/valueTypes/{valueType}", - query_params={ - "preview": preview, - }, - path_params={ - "ontology": ontology, - "valueType": value_type, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.OntologyValueType, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def list( - self, - ontology: ontologies_models.OntologyIdentifier, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[ontologies_models.ListOntologyValueTypesResponse]: - """ - Lists the latest versions of the value types for the given Ontology. - - :param ontology: - :type ontology: OntologyIdentifier - :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[ontologies_models.ListOntologyValueTypesResponse] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/ontologies/{ontology}/valueTypes", - query_params={ - "preview": preview, - }, - path_params={ - "ontology": ontology, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.ListOntologyValueTypesResponse, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _AsyncOntologyValueTypeClientRaw: - def __init__(self, client: AsyncOntologyValueTypeClient) -> None: - def get(_: ontologies_models.OntologyValueType): ... - def list(_: ontologies_models.ListOntologyValueTypesResponse): ... - - self.get = core.async_with_raw_response(get, client.get) - self.list = core.async_with_raw_response(list, client.list) - - -class _AsyncOntologyValueTypeClientStreaming: - def __init__(self, client: AsyncOntologyValueTypeClient) -> None: - def get(_: ontologies_models.OntologyValueType): ... - def list(_: ontologies_models.ListOntologyValueTypesResponse): ... - - self.get = core.async_with_streaming_response(get, client.get) - self.list = core.async_with_streaming_response(list, client.list) diff --git a/foundry_sdk/v2/ontologies/query.py b/foundry_sdk/v2/ontologies/query.py deleted file mode 100644 index 706b21fce..000000000 --- a/foundry_sdk/v2/ontologies/query.py +++ /dev/null @@ -1,266 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing - -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v2.core import models as core_models -from foundry_sdk.v2.ontologies import models as ontologies_models - - -class QueryClient: - """ - The API client for the Query Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _QueryClientStreaming(self) - self.with_raw_response = _QueryClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def execute( - self, - ontology: ontologies_models.OntologyIdentifier, - query_api_name: ontologies_models.QueryApiName, - *, - parameters: typing.Dict[ - ontologies_models.ParameterId, typing.Optional[ontologies_models.DataValue] - ], - attribution: typing.Optional[core_models.Attribution] = None, - sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, - sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, - trace_parent: typing.Optional[core_models.TraceParent] = None, - trace_state: typing.Optional[core_models.TraceState] = None, - transaction_id: typing.Optional[ontologies_models.OntologyTransactionId] = None, - version: typing.Optional[ontologies_models.FunctionVersion] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> ontologies_models.ExecuteQueryResponse: - """ - Executes a Query using the given parameters. By default, the latest version of the Query is executed. - - Optional parameters do not need to be supplied. - - :param ontology: - :type ontology: OntologyIdentifier - :param query_api_name: The API name of the Query to execute. - :type query_api_name: QueryApiName - :param parameters: - :type parameters: Dict[ParameterId, Optional[DataValue]] - :param attribution: The Attribution to be used when executing this request. - :type attribution: Optional[Attribution] - :param sdk_package_rid: The package rid of the generated SDK. - :type sdk_package_rid: Optional[SdkPackageRid] - :param sdk_version: The version of the generated SDK. - :type sdk_version: Optional[SdkVersion] - :param trace_parent: The W3C trace parent header included in the request. - :type trace_parent: Optional[TraceParent] - :param trace_state: The W3C trace state header included in the request. - :type trace_state: Optional[TraceState] - :param transaction_id: The ID of an Ontology transaction to read from. Transactions are an experimental feature and all workflows may not be supported. - :type transaction_id: Optional[OntologyTransactionId] - :param version: The version of the Query to execute. - :type version: Optional[FunctionVersion] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: ontologies_models.ExecuteQueryResponse - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/ontologies/{ontology}/queries/{queryApiName}/execute", - query_params={ - "sdkPackageRid": sdk_package_rid, - "sdkVersion": sdk_version, - "transactionId": transaction_id, - "version": version, - }, - path_params={ - "ontology": ontology, - "queryApiName": query_api_name, - }, - header_params={ - "attribution": attribution, - "traceParent": trace_parent, - "traceState": trace_state, - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=ontologies_models.ExecuteQueryRequest( - parameters=parameters, - ), - response_type=ontologies_models.ExecuteQueryResponse, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _QueryClientRaw: - def __init__(self, client: QueryClient) -> None: - def execute(_: ontologies_models.ExecuteQueryResponse): ... - - self.execute = core.with_raw_response(execute, client.execute) - - -class _QueryClientStreaming: - def __init__(self, client: QueryClient) -> None: - def execute(_: ontologies_models.ExecuteQueryResponse): ... - - self.execute = core.with_streaming_response(execute, client.execute) - - -class AsyncQueryClient: - """ - The API client for the Query Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AsyncQueryClientStreaming(self) - self.with_raw_response = _AsyncQueryClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def execute( - self, - ontology: ontologies_models.OntologyIdentifier, - query_api_name: ontologies_models.QueryApiName, - *, - parameters: typing.Dict[ - ontologies_models.ParameterId, typing.Optional[ontologies_models.DataValue] - ], - attribution: typing.Optional[core_models.Attribution] = None, - sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, - sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, - trace_parent: typing.Optional[core_models.TraceParent] = None, - trace_state: typing.Optional[core_models.TraceState] = None, - transaction_id: typing.Optional[ontologies_models.OntologyTransactionId] = None, - version: typing.Optional[ontologies_models.FunctionVersion] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[ontologies_models.ExecuteQueryResponse]: - """ - Executes a Query using the given parameters. By default, the latest version of the Query is executed. - - Optional parameters do not need to be supplied. - - :param ontology: - :type ontology: OntologyIdentifier - :param query_api_name: The API name of the Query to execute. - :type query_api_name: QueryApiName - :param parameters: - :type parameters: Dict[ParameterId, Optional[DataValue]] - :param attribution: The Attribution to be used when executing this request. - :type attribution: Optional[Attribution] - :param sdk_package_rid: The package rid of the generated SDK. - :type sdk_package_rid: Optional[SdkPackageRid] - :param sdk_version: The version of the generated SDK. - :type sdk_version: Optional[SdkVersion] - :param trace_parent: The W3C trace parent header included in the request. - :type trace_parent: Optional[TraceParent] - :param trace_state: The W3C trace state header included in the request. - :type trace_state: Optional[TraceState] - :param transaction_id: The ID of an Ontology transaction to read from. Transactions are an experimental feature and all workflows may not be supported. - :type transaction_id: Optional[OntologyTransactionId] - :param version: The version of the Query to execute. - :type version: Optional[FunctionVersion] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[ontologies_models.ExecuteQueryResponse] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/ontologies/{ontology}/queries/{queryApiName}/execute", - query_params={ - "sdkPackageRid": sdk_package_rid, - "sdkVersion": sdk_version, - "transactionId": transaction_id, - "version": version, - }, - path_params={ - "ontology": ontology, - "queryApiName": query_api_name, - }, - header_params={ - "attribution": attribution, - "traceParent": trace_parent, - "traceState": trace_state, - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=ontologies_models.ExecuteQueryRequest( - parameters=parameters, - ), - response_type=ontologies_models.ExecuteQueryResponse, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _AsyncQueryClientRaw: - def __init__(self, client: AsyncQueryClient) -> None: - def execute(_: ontologies_models.ExecuteQueryResponse): ... - - self.execute = core.async_with_raw_response(execute, client.execute) - - -class _AsyncQueryClientStreaming: - def __init__(self, client: AsyncQueryClient) -> None: - def execute(_: ontologies_models.ExecuteQueryResponse): ... - - self.execute = core.async_with_streaming_response(execute, client.execute) diff --git a/foundry_sdk/v2/ontologies/query_type.py b/foundry_sdk/v2/ontologies/query_type.py deleted file mode 100644 index 79f15d171..000000000 --- a/foundry_sdk/v2/ontologies/query_type.py +++ /dev/null @@ -1,326 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing - -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v2.core import models as core_models -from foundry_sdk.v2.ontologies import models as ontologies_models - - -class QueryTypeClient: - """ - The API client for the QueryType Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _QueryTypeClientStreaming(self) - self.with_raw_response = _QueryTypeClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - ontology: ontologies_models.OntologyIdentifier, - query_api_name: ontologies_models.QueryApiName, - *, - sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, - sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, - version: typing.Optional[ontologies_models.FunctionVersion] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> ontologies_models.QueryTypeV2: - """ - Gets a specific query type with the given API name. - - :param ontology: - :type ontology: OntologyIdentifier - :param query_api_name: The API name of the query type. To find the API name, use the **List query types** endpoint or check the **Ontology Manager**. - :type query_api_name: QueryApiName - :param sdk_package_rid: The package rid of the generated SDK. - :type sdk_package_rid: Optional[SdkPackageRid] - :param sdk_version: The version of the generated SDK. - :type sdk_version: Optional[SdkVersion] - :param version: The version of the Query to get. - :type version: Optional[FunctionVersion] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: ontologies_models.QueryTypeV2 - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/ontologies/{ontology}/queryTypes/{queryApiName}", - query_params={ - "sdkPackageRid": sdk_package_rid, - "sdkVersion": sdk_version, - "version": version, - }, - path_params={ - "ontology": ontology, - "queryApiName": query_api_name, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.QueryTypeV2, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def list( - self, - ontology: ontologies_models.OntologyIdentifier, - *, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.ResourceIterator[ontologies_models.QueryTypeV2]: - """ - Lists the query types for the given Ontology. - - Each page may be smaller than the requested page size. However, it is guaranteed that if there are more - results available, at least one result will be present in the response. - - :param ontology: - :type ontology: OntologyIdentifier - :param page_size: The desired size of the page to be returned. Defaults to 100. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. - :type page_size: Optional[PageSize] - :param page_token: - :type page_token: Optional[PageToken] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.ResourceIterator[ontologies_models.QueryTypeV2] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/ontologies/{ontology}/queryTypes", - query_params={ - "pageSize": page_size, - "pageToken": page_token, - }, - path_params={ - "ontology": ontology, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.ListQueryTypesResponseV2, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - -class _QueryTypeClientRaw: - def __init__(self, client: QueryTypeClient) -> None: - def get(_: ontologies_models.QueryTypeV2): ... - def list(_: ontologies_models.ListQueryTypesResponseV2): ... - - self.get = core.with_raw_response(get, client.get) - self.list = core.with_raw_response(list, client.list) - - -class _QueryTypeClientStreaming: - def __init__(self, client: QueryTypeClient) -> None: - def get(_: ontologies_models.QueryTypeV2): ... - def list(_: ontologies_models.ListQueryTypesResponseV2): ... - - self.get = core.with_streaming_response(get, client.get) - self.list = core.with_streaming_response(list, client.list) - - -class AsyncQueryTypeClient: - """ - The API client for the QueryType Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AsyncQueryTypeClientStreaming(self) - self.with_raw_response = _AsyncQueryTypeClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - ontology: ontologies_models.OntologyIdentifier, - query_api_name: ontologies_models.QueryApiName, - *, - sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, - sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, - version: typing.Optional[ontologies_models.FunctionVersion] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[ontologies_models.QueryTypeV2]: - """ - Gets a specific query type with the given API name. - - :param ontology: - :type ontology: OntologyIdentifier - :param query_api_name: The API name of the query type. To find the API name, use the **List query types** endpoint or check the **Ontology Manager**. - :type query_api_name: QueryApiName - :param sdk_package_rid: The package rid of the generated SDK. - :type sdk_package_rid: Optional[SdkPackageRid] - :param sdk_version: The version of the generated SDK. - :type sdk_version: Optional[SdkVersion] - :param version: The version of the Query to get. - :type version: Optional[FunctionVersion] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[ontologies_models.QueryTypeV2] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/ontologies/{ontology}/queryTypes/{queryApiName}", - query_params={ - "sdkPackageRid": sdk_package_rid, - "sdkVersion": sdk_version, - "version": version, - }, - path_params={ - "ontology": ontology, - "queryApiName": query_api_name, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.QueryTypeV2, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def list( - self, - ontology: ontologies_models.OntologyIdentifier, - *, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.AsyncResourceIterator[ontologies_models.QueryTypeV2]: - """ - Lists the query types for the given Ontology. - - Each page may be smaller than the requested page size. However, it is guaranteed that if there are more - results available, at least one result will be present in the response. - - :param ontology: - :type ontology: OntologyIdentifier - :param page_size: The desired size of the page to be returned. Defaults to 100. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. - :type page_size: Optional[PageSize] - :param page_token: - :type page_token: Optional[PageToken] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.AsyncResourceIterator[ontologies_models.QueryTypeV2] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/ontologies/{ontology}/queryTypes", - query_params={ - "pageSize": page_size, - "pageToken": page_token, - }, - path_params={ - "ontology": ontology, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=ontologies_models.ListQueryTypesResponseV2, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - -class _AsyncQueryTypeClientRaw: - def __init__(self, client: AsyncQueryTypeClient) -> None: - def get(_: ontologies_models.QueryTypeV2): ... - def list(_: ontologies_models.ListQueryTypesResponseV2): ... - - self.get = core.async_with_raw_response(get, client.get) - self.list = core.async_with_raw_response(list, client.list) - - -class _AsyncQueryTypeClientStreaming: - def __init__(self, client: AsyncQueryTypeClient) -> None: - def get(_: ontologies_models.QueryTypeV2): ... - def list(_: ontologies_models.ListQueryTypesResponseV2): ... - - self.get = core.async_with_streaming_response(get, client.get) - self.list = core.async_with_streaming_response(list, client.list) diff --git a/foundry_sdk/v2/ontologies/time_series_property_v2.py b/foundry_sdk/v2/ontologies/time_series_property_v2.py deleted file mode 100644 index ab1944e1b..000000000 --- a/foundry_sdk/v2/ontologies/time_series_property_v2.py +++ /dev/null @@ -1,513 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing - -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v2.ontologies import models as ontologies_models - - -class TimeSeriesPropertyV2Client: - """ - The API client for the TimeSeriesPropertyV2 Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _TimeSeriesPropertyV2ClientStreaming(self) - self.with_raw_response = _TimeSeriesPropertyV2ClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get_first_point( - self, - ontology: ontologies_models.OntologyIdentifier, - object_type: ontologies_models.ObjectTypeApiName, - primary_key: ontologies_models.PropertyValueEscapedString, - property: ontologies_models.PropertyApiName, - *, - sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, - sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Optional[ontologies_models.TimeSeriesPoint]: - """ - Get the first point of a time series property. - - :param ontology: - :type ontology: OntologyIdentifier - :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. - :type object_type: ObjectTypeApiName - :param primary_key: The primary key of the object with the time series property. - :type primary_key: PropertyValueEscapedString - :param property: The API name of the time series property. To find the API name for your time series property, check the **Ontology Manager** or use the **Get object type** endpoint. - :type property: PropertyApiName - :param sdk_package_rid: The package rid of the generated SDK. - :type sdk_package_rid: Optional[SdkPackageRid] - :param sdk_version: The version of the generated SDK. - :type sdk_version: Optional[SdkVersion] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Optional[ontologies_models.TimeSeriesPoint] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/timeseries/{property}/firstPoint", - query_params={ - "sdkPackageRid": sdk_package_rid, - "sdkVersion": sdk_version, - }, - path_params={ - "ontology": ontology, - "objectType": object_type, - "primaryKey": primary_key, - "property": property, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=typing.Optional[ontologies_models.TimeSeriesPoint], - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get_last_point( - self, - ontology: ontologies_models.OntologyIdentifier, - object_type: ontologies_models.ObjectTypeApiName, - primary_key: ontologies_models.PropertyValueEscapedString, - property: ontologies_models.PropertyApiName, - *, - sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, - sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Optional[ontologies_models.TimeSeriesPoint]: - """ - Get the last point of a time series property. - - :param ontology: - :type ontology: OntologyIdentifier - :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. - :type object_type: ObjectTypeApiName - :param primary_key: The primary key of the object with the time series property. - :type primary_key: PropertyValueEscapedString - :param property: The API name of the time series property. To find the API name for your time series property, check the **Ontology Manager** or use the **Get object type** endpoint. - :type property: PropertyApiName - :param sdk_package_rid: The package rid of the generated SDK. - :type sdk_package_rid: Optional[SdkPackageRid] - :param sdk_version: The version of the generated SDK. - :type sdk_version: Optional[SdkVersion] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Optional[ontologies_models.TimeSeriesPoint] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/timeseries/{property}/lastPoint", - query_params={ - "sdkPackageRid": sdk_package_rid, - "sdkVersion": sdk_version, - }, - path_params={ - "ontology": ontology, - "objectType": object_type, - "primaryKey": primary_key, - "property": property, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=typing.Optional[ontologies_models.TimeSeriesPoint], - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def stream_points( - self, - ontology: ontologies_models.OntologyIdentifier, - object_type: ontologies_models.ObjectTypeApiName, - primary_key: ontologies_models.PropertyValueEscapedString, - property: ontologies_models.PropertyApiName, - *, - aggregate: typing.Optional[ontologies_models.AggregateTimeSeries] = None, - format: typing.Optional[ontologies_models.StreamingOutputFormat] = None, - range: typing.Optional[ontologies_models.TimeRange] = None, - sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, - sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> bytes: - """ - Stream all of the points of a time series property. - - :param ontology: - :type ontology: OntologyIdentifier - :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. - :type object_type: ObjectTypeApiName - :param primary_key: The primary key of the object with the time series property. - :type primary_key: PropertyValueEscapedString - :param property: The API name of the time series property. To find the API name for your time series property, check the **Ontology Manager** or use the **Get object type** endpoint. - :type property: PropertyApiName - :param aggregate: - :type aggregate: Optional[AggregateTimeSeries] - :param format: The output format to serialize the output binary stream in. Default is JSON. ARROW is more efficient than JSON at streaming a large sized response. - :type format: Optional[StreamingOutputFormat] - :param range: - :type range: Optional[TimeRange] - :param sdk_package_rid: The package rid of the generated SDK. - :type sdk_package_rid: Optional[SdkPackageRid] - :param sdk_version: The version of the generated SDK. - :type sdk_version: Optional[SdkVersion] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: bytes - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/timeseries/{property}/streamPoints", - query_params={ - "format": format, - "sdkPackageRid": sdk_package_rid, - "sdkVersion": sdk_version, - }, - path_params={ - "ontology": ontology, - "objectType": object_type, - "primaryKey": primary_key, - "property": property, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "*/*", - }, - body=ontologies_models.StreamTimeSeriesPointsRequest( - range=range, - aggregate=aggregate, - ), - response_type=bytes, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _TimeSeriesPropertyV2ClientRaw: - def __init__(self, client: TimeSeriesPropertyV2Client) -> None: - def get_first_point(_: typing.Optional[ontologies_models.TimeSeriesPoint]): ... - def get_last_point(_: typing.Optional[ontologies_models.TimeSeriesPoint]): ... - def stream_points(_: bytes): ... - - self.get_first_point = core.with_raw_response(get_first_point, client.get_first_point) - self.get_last_point = core.with_raw_response(get_last_point, client.get_last_point) - self.stream_points = core.with_raw_response(stream_points, client.stream_points) - - -class _TimeSeriesPropertyV2ClientStreaming: - def __init__(self, client: TimeSeriesPropertyV2Client) -> None: - def get_first_point(_: typing.Optional[ontologies_models.TimeSeriesPoint]): ... - def get_last_point(_: typing.Optional[ontologies_models.TimeSeriesPoint]): ... - def stream_points(_: bytes): ... - - self.get_first_point = core.with_streaming_response(get_first_point, client.get_first_point) - self.get_last_point = core.with_streaming_response(get_last_point, client.get_last_point) - self.stream_points = core.with_streaming_response(stream_points, client.stream_points) - - -class AsyncTimeSeriesPropertyV2Client: - """ - The API client for the TimeSeriesPropertyV2 Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AsyncTimeSeriesPropertyV2ClientStreaming(self) - self.with_raw_response = _AsyncTimeSeriesPropertyV2ClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get_first_point( - self, - ontology: ontologies_models.OntologyIdentifier, - object_type: ontologies_models.ObjectTypeApiName, - primary_key: ontologies_models.PropertyValueEscapedString, - property: ontologies_models.PropertyApiName, - *, - sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, - sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[typing.Optional[ontologies_models.TimeSeriesPoint]]: - """ - Get the first point of a time series property. - - :param ontology: - :type ontology: OntologyIdentifier - :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. - :type object_type: ObjectTypeApiName - :param primary_key: The primary key of the object with the time series property. - :type primary_key: PropertyValueEscapedString - :param property: The API name of the time series property. To find the API name for your time series property, check the **Ontology Manager** or use the **Get object type** endpoint. - :type property: PropertyApiName - :param sdk_package_rid: The package rid of the generated SDK. - :type sdk_package_rid: Optional[SdkPackageRid] - :param sdk_version: The version of the generated SDK. - :type sdk_version: Optional[SdkVersion] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[typing.Optional[ontologies_models.TimeSeriesPoint]] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/timeseries/{property}/firstPoint", - query_params={ - "sdkPackageRid": sdk_package_rid, - "sdkVersion": sdk_version, - }, - path_params={ - "ontology": ontology, - "objectType": object_type, - "primaryKey": primary_key, - "property": property, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=typing.Optional[ontologies_models.TimeSeriesPoint], - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get_last_point( - self, - ontology: ontologies_models.OntologyIdentifier, - object_type: ontologies_models.ObjectTypeApiName, - primary_key: ontologies_models.PropertyValueEscapedString, - property: ontologies_models.PropertyApiName, - *, - sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, - sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[typing.Optional[ontologies_models.TimeSeriesPoint]]: - """ - Get the last point of a time series property. - - :param ontology: - :type ontology: OntologyIdentifier - :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. - :type object_type: ObjectTypeApiName - :param primary_key: The primary key of the object with the time series property. - :type primary_key: PropertyValueEscapedString - :param property: The API name of the time series property. To find the API name for your time series property, check the **Ontology Manager** or use the **Get object type** endpoint. - :type property: PropertyApiName - :param sdk_package_rid: The package rid of the generated SDK. - :type sdk_package_rid: Optional[SdkPackageRid] - :param sdk_version: The version of the generated SDK. - :type sdk_version: Optional[SdkVersion] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[typing.Optional[ontologies_models.TimeSeriesPoint]] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/timeseries/{property}/lastPoint", - query_params={ - "sdkPackageRid": sdk_package_rid, - "sdkVersion": sdk_version, - }, - path_params={ - "ontology": ontology, - "objectType": object_type, - "primaryKey": primary_key, - "property": property, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=typing.Optional[ontologies_models.TimeSeriesPoint], - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def stream_points( - self, - ontology: ontologies_models.OntologyIdentifier, - object_type: ontologies_models.ObjectTypeApiName, - primary_key: ontologies_models.PropertyValueEscapedString, - property: ontologies_models.PropertyApiName, - *, - aggregate: typing.Optional[ontologies_models.AggregateTimeSeries] = None, - format: typing.Optional[ontologies_models.StreamingOutputFormat] = None, - range: typing.Optional[ontologies_models.TimeRange] = None, - sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, - sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[bytes]: - """ - Stream all of the points of a time series property. - - :param ontology: - :type ontology: OntologyIdentifier - :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. - :type object_type: ObjectTypeApiName - :param primary_key: The primary key of the object with the time series property. - :type primary_key: PropertyValueEscapedString - :param property: The API name of the time series property. To find the API name for your time series property, check the **Ontology Manager** or use the **Get object type** endpoint. - :type property: PropertyApiName - :param aggregate: - :type aggregate: Optional[AggregateTimeSeries] - :param format: The output format to serialize the output binary stream in. Default is JSON. ARROW is more efficient than JSON at streaming a large sized response. - :type format: Optional[StreamingOutputFormat] - :param range: - :type range: Optional[TimeRange] - :param sdk_package_rid: The package rid of the generated SDK. - :type sdk_package_rid: Optional[SdkPackageRid] - :param sdk_version: The version of the generated SDK. - :type sdk_version: Optional[SdkVersion] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[bytes] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/timeseries/{property}/streamPoints", - query_params={ - "format": format, - "sdkPackageRid": sdk_package_rid, - "sdkVersion": sdk_version, - }, - path_params={ - "ontology": ontology, - "objectType": object_type, - "primaryKey": primary_key, - "property": property, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "*/*", - }, - body=ontologies_models.StreamTimeSeriesPointsRequest( - range=range, - aggregate=aggregate, - ), - response_type=bytes, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _AsyncTimeSeriesPropertyV2ClientRaw: - def __init__(self, client: AsyncTimeSeriesPropertyV2Client) -> None: - def get_first_point(_: typing.Optional[ontologies_models.TimeSeriesPoint]): ... - def get_last_point(_: typing.Optional[ontologies_models.TimeSeriesPoint]): ... - def stream_points(_: bytes): ... - - self.get_first_point = core.async_with_raw_response(get_first_point, client.get_first_point) - self.get_last_point = core.async_with_raw_response(get_last_point, client.get_last_point) - self.stream_points = core.async_with_raw_response(stream_points, client.stream_points) - - -class _AsyncTimeSeriesPropertyV2ClientStreaming: - def __init__(self, client: AsyncTimeSeriesPropertyV2Client) -> None: - def get_first_point(_: typing.Optional[ontologies_models.TimeSeriesPoint]): ... - def get_last_point(_: typing.Optional[ontologies_models.TimeSeriesPoint]): ... - def stream_points(_: bytes): ... - - self.get_first_point = core.async_with_streaming_response( - get_first_point, client.get_first_point - ) - self.get_last_point = core.async_with_streaming_response( - get_last_point, client.get_last_point - ) - self.stream_points = core.async_with_streaming_response(stream_points, client.stream_points) diff --git a/foundry_sdk/v2/ontologies/time_series_value_bank_property.py b/foundry_sdk/v2/ontologies/time_series_value_bank_property.py deleted file mode 100644 index cbdf7dddf..000000000 --- a/foundry_sdk/v2/ontologies/time_series_value_bank_property.py +++ /dev/null @@ -1,369 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing - -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v2.ontologies import models as ontologies_models - - -class TimeSeriesValueBankPropertyClient: - """ - The API client for the TimeSeriesValueBankProperty Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _TimeSeriesValueBankPropertyClientStreaming(self) - self.with_raw_response = _TimeSeriesValueBankPropertyClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get_latest_value( - self, - ontology: ontologies_models.OntologyIdentifier, - object_type: ontologies_models.ObjectTypeApiName, - primary_key: ontologies_models.PropertyValueEscapedString, - property_name: ontologies_models.PropertyApiName, - *, - sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, - sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Optional[ontologies_models.TimeseriesEntry]: - """ - Get the latest value of a property backed by a timeseries. If a specific geotime series integration has both a history and a live integration, we will give precedence to the live integration. - - :param ontology: - :type ontology: OntologyIdentifier - :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. - :type object_type: ObjectTypeApiName - :param primary_key: The primary key of the object with the timeseries property. - :type primary_key: PropertyValueEscapedString - :param property_name: The API name of the timeseries property. To find the API name for your property value bank property, check the **Ontology Manager** or use the **Get object type** endpoint. - :type property_name: PropertyApiName - :param sdk_package_rid: The package rid of the generated SDK. - :type sdk_package_rid: Optional[SdkPackageRid] - :param sdk_version: The version of the generated SDK. - :type sdk_version: Optional[SdkVersion] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Optional[ontologies_models.TimeseriesEntry] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/timeseries/{propertyName}/latestValue", - query_params={ - "sdkPackageRid": sdk_package_rid, - "sdkVersion": sdk_version, - }, - path_params={ - "ontology": ontology, - "objectType": object_type, - "primaryKey": primary_key, - "propertyName": property_name, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=typing.Optional[ontologies_models.TimeseriesEntry], - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def stream_values( - self, - ontology: ontologies_models.OntologyIdentifier, - object_type: ontologies_models.ObjectTypeApiName, - primary_key: ontologies_models.PropertyValueEscapedString, - property: ontologies_models.PropertyApiName, - *, - range: typing.Optional[ontologies_models.TimeRange] = None, - sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, - sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> bytes: - """ - Stream all of the points of a time series property (this includes geotime series references). - - :param ontology: - :type ontology: OntologyIdentifier - :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. - :type object_type: ObjectTypeApiName - :param primary_key: The primary key of the object with the time series property. - :type primary_key: PropertyValueEscapedString - :param property: The API name of the time series backed property. To find the API name, check the **Ontology Manager** or use the **Get object type** endpoint. - :type property: PropertyApiName - :param range: - :type range: Optional[TimeRange] - :param sdk_package_rid: The package rid of the generated SDK. - :type sdk_package_rid: Optional[SdkPackageRid] - :param sdk_version: The version of the generated SDK. - :type sdk_version: Optional[SdkVersion] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: bytes - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/timeseries/{property}/streamValues", - query_params={ - "sdkPackageRid": sdk_package_rid, - "sdkVersion": sdk_version, - }, - path_params={ - "ontology": ontology, - "objectType": object_type, - "primaryKey": primary_key, - "property": property, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "*/*", - }, - body=ontologies_models.StreamTimeSeriesValuesRequest( - range=range, - ), - response_type=bytes, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _TimeSeriesValueBankPropertyClientRaw: - def __init__(self, client: TimeSeriesValueBankPropertyClient) -> None: - def get_latest_value(_: typing.Optional[ontologies_models.TimeseriesEntry]): ... - def stream_values(_: bytes): ... - - self.get_latest_value = core.with_raw_response(get_latest_value, client.get_latest_value) - self.stream_values = core.with_raw_response(stream_values, client.stream_values) - - -class _TimeSeriesValueBankPropertyClientStreaming: - def __init__(self, client: TimeSeriesValueBankPropertyClient) -> None: - def get_latest_value(_: typing.Optional[ontologies_models.TimeseriesEntry]): ... - def stream_values(_: bytes): ... - - self.get_latest_value = core.with_streaming_response( - get_latest_value, client.get_latest_value - ) - self.stream_values = core.with_streaming_response(stream_values, client.stream_values) - - -class AsyncTimeSeriesValueBankPropertyClient: - """ - The API client for the TimeSeriesValueBankProperty Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AsyncTimeSeriesValueBankPropertyClientStreaming(self) - self.with_raw_response = _AsyncTimeSeriesValueBankPropertyClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get_latest_value( - self, - ontology: ontologies_models.OntologyIdentifier, - object_type: ontologies_models.ObjectTypeApiName, - primary_key: ontologies_models.PropertyValueEscapedString, - property_name: ontologies_models.PropertyApiName, - *, - sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, - sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[typing.Optional[ontologies_models.TimeseriesEntry]]: - """ - Get the latest value of a property backed by a timeseries. If a specific geotime series integration has both a history and a live integration, we will give precedence to the live integration. - - :param ontology: - :type ontology: OntologyIdentifier - :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. - :type object_type: ObjectTypeApiName - :param primary_key: The primary key of the object with the timeseries property. - :type primary_key: PropertyValueEscapedString - :param property_name: The API name of the timeseries property. To find the API name for your property value bank property, check the **Ontology Manager** or use the **Get object type** endpoint. - :type property_name: PropertyApiName - :param sdk_package_rid: The package rid of the generated SDK. - :type sdk_package_rid: Optional[SdkPackageRid] - :param sdk_version: The version of the generated SDK. - :type sdk_version: Optional[SdkVersion] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[typing.Optional[ontologies_models.TimeseriesEntry]] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/timeseries/{propertyName}/latestValue", - query_params={ - "sdkPackageRid": sdk_package_rid, - "sdkVersion": sdk_version, - }, - path_params={ - "ontology": ontology, - "objectType": object_type, - "primaryKey": primary_key, - "propertyName": property_name, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=typing.Optional[ontologies_models.TimeseriesEntry], - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def stream_values( - self, - ontology: ontologies_models.OntologyIdentifier, - object_type: ontologies_models.ObjectTypeApiName, - primary_key: ontologies_models.PropertyValueEscapedString, - property: ontologies_models.PropertyApiName, - *, - range: typing.Optional[ontologies_models.TimeRange] = None, - sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, - sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[bytes]: - """ - Stream all of the points of a time series property (this includes geotime series references). - - :param ontology: - :type ontology: OntologyIdentifier - :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. - :type object_type: ObjectTypeApiName - :param primary_key: The primary key of the object with the time series property. - :type primary_key: PropertyValueEscapedString - :param property: The API name of the time series backed property. To find the API name, check the **Ontology Manager** or use the **Get object type** endpoint. - :type property: PropertyApiName - :param range: - :type range: Optional[TimeRange] - :param sdk_package_rid: The package rid of the generated SDK. - :type sdk_package_rid: Optional[SdkPackageRid] - :param sdk_version: The version of the generated SDK. - :type sdk_version: Optional[SdkVersion] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[bytes] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/timeseries/{property}/streamValues", - query_params={ - "sdkPackageRid": sdk_package_rid, - "sdkVersion": sdk_version, - }, - path_params={ - "ontology": ontology, - "objectType": object_type, - "primaryKey": primary_key, - "property": property, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "*/*", - }, - body=ontologies_models.StreamTimeSeriesValuesRequest( - range=range, - ), - response_type=bytes, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _AsyncTimeSeriesValueBankPropertyClientRaw: - def __init__(self, client: AsyncTimeSeriesValueBankPropertyClient) -> None: - def get_latest_value(_: typing.Optional[ontologies_models.TimeseriesEntry]): ... - def stream_values(_: bytes): ... - - self.get_latest_value = core.async_with_raw_response( - get_latest_value, client.get_latest_value - ) - self.stream_values = core.async_with_raw_response(stream_values, client.stream_values) - - -class _AsyncTimeSeriesValueBankPropertyClientStreaming: - def __init__(self, client: AsyncTimeSeriesValueBankPropertyClient) -> None: - def get_latest_value(_: typing.Optional[ontologies_models.TimeseriesEntry]): ... - def stream_values(_: bytes): ... - - self.get_latest_value = core.async_with_streaming_response( - get_latest_value, client.get_latest_value - ) - self.stream_values = core.async_with_streaming_response(stream_values, client.stream_values) diff --git a/foundry_sdk/v2/orchestration/__init__.py b/foundry_sdk/v2/orchestration/__init__.py deleted file mode 100644 index 2eaef33bb..000000000 --- a/foundry_sdk/v2/orchestration/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -from foundry_sdk.v2.orchestration._client import AsyncOrchestrationClient -from foundry_sdk.v2.orchestration._client import OrchestrationClient - -__all__ = [ - "OrchestrationClient", - "AsyncOrchestrationClient", -] diff --git a/foundry_sdk/v2/orchestration/_client.py b/foundry_sdk/v2/orchestration/_client.py deleted file mode 100644 index e1f3f5578..000000000 --- a/foundry_sdk/v2/orchestration/_client.py +++ /dev/null @@ -1,123 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing -from functools import cached_property - -from foundry_sdk import _core as core - - -class OrchestrationClient: - """ - The API client for the Orchestration Namespace. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - - @cached_property - def Build(self): - from foundry_sdk.v2.orchestration.build import BuildClient - - return BuildClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @cached_property - def Job(self): - from foundry_sdk.v2.orchestration.job import JobClient - - return JobClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @cached_property - def Schedule(self): - from foundry_sdk.v2.orchestration.schedule import ScheduleClient - - return ScheduleClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @cached_property - def ScheduleRun(self): - from foundry_sdk.v2.orchestration.schedule_run import ScheduleRunClient - - return ScheduleRunClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @cached_property - def ScheduleVersion(self): - from foundry_sdk.v2.orchestration.schedule_version import ScheduleVersionClient - - return ScheduleVersionClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - -class AsyncOrchestrationClient: - """ - The Async API client for the Orchestration Namespace. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - from foundry_sdk.v2.orchestration.build import AsyncBuildClient - from foundry_sdk.v2.orchestration.job import AsyncJobClient - from foundry_sdk.v2.orchestration.schedule import AsyncScheduleClient - from foundry_sdk.v2.orchestration.schedule_run import AsyncScheduleRunClient - from foundry_sdk.v2.orchestration.schedule_version import AsyncScheduleVersionClient # NOQA - - self.Build = AsyncBuildClient(auth=auth, hostname=hostname, config=config) - - self.Job = AsyncJobClient(auth=auth, hostname=hostname, config=config) - - self.Schedule = AsyncScheduleClient(auth=auth, hostname=hostname, config=config) - - self.ScheduleRun = AsyncScheduleRunClient(auth=auth, hostname=hostname, config=config) - - self.ScheduleVersion = AsyncScheduleVersionClient( - auth=auth, hostname=hostname, config=config - ) diff --git a/foundry_sdk/v2/orchestration/build.py b/foundry_sdk/v2/orchestration/build.py deleted file mode 100644 index 3e87a7f82..000000000 --- a/foundry_sdk/v2/orchestration/build.py +++ /dev/null @@ -1,757 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing - -import annotated_types -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v2.core import models as core_models -from foundry_sdk.v2.datasets import models as datasets_models -from foundry_sdk.v2.orchestration import errors as orchestration_errors -from foundry_sdk.v2.orchestration import models as orchestration_models - - -class BuildClient: - """ - The API client for the Build Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _BuildClientStreaming(self) - self.with_raw_response = _BuildClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def cancel( - self, - build_rid: core_models.BuildRid, - *, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> None: - """ - Request a cancellation for all unfinished jobs in a build. The build's status will not update immediately. This endpoint is asynchronous and a success response indicates that the cancellation request has been acknowledged and the build is expected to be canceled soon. If the build has already finished or finishes shortly after the request and before the cancellation, the build will not change. - - :param build_rid: The RID of a Build. - :type build_rid: BuildRid - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: None - - :raises CancelBuildPermissionDenied: Could not cancel the Build. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/orchestration/builds/{buildRid}/cancel", - query_params={}, - path_params={ - "buildRid": build_rid, - }, - header_params={}, - body=None, - response_type=None, - request_timeout=request_timeout, - throwable_errors={ - "CancelBuildPermissionDenied": orchestration_errors.CancelBuildPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def create( - self, - *, - fallback_branches: orchestration_models.FallbackBranches, - target: orchestration_models.BuildTarget, - abort_on_failure: typing.Optional[orchestration_models.AbortOnFailure] = None, - branch_name: typing.Optional[datasets_models.BranchName] = None, - force_build: typing.Optional[orchestration_models.ForceBuild] = None, - notifications_enabled: typing.Optional[orchestration_models.NotificationsEnabled] = None, - retry_backoff_duration: typing.Optional[orchestration_models.RetryBackoffDuration] = None, - retry_count: typing.Optional[orchestration_models.RetryCount] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> orchestration_models.Build: - """ - - :param fallback_branches: - :type fallback_branches: FallbackBranches - :param target: The targets of the schedule. - :type target: BuildTarget - :param abort_on_failure: - :type abort_on_failure: Optional[AbortOnFailure] - :param branch_name: The target branch the build should run on. - :type branch_name: Optional[BranchName] - :param force_build: - :type force_build: Optional[ForceBuild] - :param notifications_enabled: - :type notifications_enabled: Optional[NotificationsEnabled] - :param retry_backoff_duration: - :type retry_backoff_duration: Optional[RetryBackoffDuration] - :param retry_count: The number of retry attempts for failed jobs. - :type retry_count: Optional[RetryCount] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: orchestration_models.Build - - :raises CreateBuildPermissionDenied: Could not create the Build. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/orchestration/builds/create", - query_params={}, - path_params={}, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=orchestration_models.CreateBuildRequest( - target=target, - branch_name=branch_name, - fallback_branches=fallback_branches, - force_build=force_build, - retry_count=retry_count, - retry_backoff_duration=retry_backoff_duration, - abort_on_failure=abort_on_failure, - notifications_enabled=notifications_enabled, - ), - response_type=orchestration_models.Build, - request_timeout=request_timeout, - throwable_errors={ - "CreateBuildPermissionDenied": orchestration_errors.CreateBuildPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - build_rid: core_models.BuildRid, - *, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> orchestration_models.Build: - """ - Get the Build with the specified rid. - :param build_rid: The RID of a Build. - :type build_rid: BuildRid - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: orchestration_models.Build - - :raises BuildNotFound: The given Build could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/orchestration/builds/{buildRid}", - query_params={}, - path_params={ - "buildRid": build_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=orchestration_models.Build, - request_timeout=request_timeout, - throwable_errors={ - "BuildNotFound": orchestration_errors.BuildNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get_batch( - self, - body: typing_extensions.Annotated[ - typing.List[orchestration_models.GetBuildsBatchRequestElement], - annotated_types.Len(min_length=1, max_length=100), - ], - *, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> orchestration_models.GetBuildsBatchResponse: - """ - Execute multiple get requests on Build. - - The maximum batch size for this endpoint is 100. - :param body: Body of the request - :type body: List[GetBuildsBatchRequestElement] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: orchestration_models.GetBuildsBatchResponse - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/orchestration/builds/getBatch", - query_params={}, - path_params={}, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=body, - response_type=orchestration_models.GetBuildsBatchResponse, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def jobs( - self, - build_rid: core_models.BuildRid, - *, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.ResourceIterator[orchestration_models.Job]: - """ - Get the Jobs in the Build. - :param build_rid: The RID of a Build. - :type build_rid: BuildRid - :param page_size: The page size to use for the endpoint. - :type page_size: Optional[PageSize] - :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. - :type page_token: Optional[PageToken] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.ResourceIterator[orchestration_models.Job] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/orchestration/builds/{buildRid}/jobs", - query_params={ - "pageSize": page_size, - "pageToken": page_token, - }, - path_params={ - "buildRid": build_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=orchestration_models.ListJobsOfBuildResponse, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def search( - self, - *, - where: orchestration_models.SearchBuildsFilter, - order_by: typing.Optional[orchestration_models.SearchBuildsOrderBy] = None, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> orchestration_models.SearchBuildsResponse: - """ - Search for Builds. - :param where: - :type where: SearchBuildsFilter - :param order_by: - :type order_by: Optional[SearchBuildsOrderBy] - :param page_size: The page size for the search request. If no value is provided, a default of `100` will be used. - :type page_size: Optional[PageSize] - :param page_token: - :type page_token: Optional[PageToken] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: orchestration_models.SearchBuildsResponse - - :raises SearchBuildsPermissionDenied: Could not search the Build. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/orchestration/builds/search", - query_params={ - "preview": preview, - }, - path_params={}, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=orchestration_models.SearchBuildsRequest( - where=where, - order_by=order_by, - page_token=page_token, - page_size=page_size, - ), - response_type=orchestration_models.SearchBuildsResponse, - request_timeout=request_timeout, - throwable_errors={ - "SearchBuildsPermissionDenied": orchestration_errors.SearchBuildsPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _BuildClientRaw: - def __init__(self, client: BuildClient) -> None: - def cancel(_: None): ... - def create(_: orchestration_models.Build): ... - def get(_: orchestration_models.Build): ... - def get_batch(_: orchestration_models.GetBuildsBatchResponse): ... - def jobs(_: orchestration_models.ListJobsOfBuildResponse): ... - def search(_: orchestration_models.SearchBuildsResponse): ... - - self.cancel = core.with_raw_response(cancel, client.cancel) - self.create = core.with_raw_response(create, client.create) - self.get = core.with_raw_response(get, client.get) - self.get_batch = core.with_raw_response(get_batch, client.get_batch) - self.jobs = core.with_raw_response(jobs, client.jobs) - self.search = core.with_raw_response(search, client.search) - - -class _BuildClientStreaming: - def __init__(self, client: BuildClient) -> None: - def create(_: orchestration_models.Build): ... - def get(_: orchestration_models.Build): ... - def get_batch(_: orchestration_models.GetBuildsBatchResponse): ... - def jobs(_: orchestration_models.ListJobsOfBuildResponse): ... - def search(_: orchestration_models.SearchBuildsResponse): ... - - self.create = core.with_streaming_response(create, client.create) - self.get = core.with_streaming_response(get, client.get) - self.get_batch = core.with_streaming_response(get_batch, client.get_batch) - self.jobs = core.with_streaming_response(jobs, client.jobs) - self.search = core.with_streaming_response(search, client.search) - - -class AsyncBuildClient: - """ - The API client for the Build Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AsyncBuildClientStreaming(self) - self.with_raw_response = _AsyncBuildClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def cancel( - self, - build_rid: core_models.BuildRid, - *, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[None]: - """ - Request a cancellation for all unfinished jobs in a build. The build's status will not update immediately. This endpoint is asynchronous and a success response indicates that the cancellation request has been acknowledged and the build is expected to be canceled soon. If the build has already finished or finishes shortly after the request and before the cancellation, the build will not change. - - :param build_rid: The RID of a Build. - :type build_rid: BuildRid - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[None] - - :raises CancelBuildPermissionDenied: Could not cancel the Build. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/orchestration/builds/{buildRid}/cancel", - query_params={}, - path_params={ - "buildRid": build_rid, - }, - header_params={}, - body=None, - response_type=None, - request_timeout=request_timeout, - throwable_errors={ - "CancelBuildPermissionDenied": orchestration_errors.CancelBuildPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def create( - self, - *, - fallback_branches: orchestration_models.FallbackBranches, - target: orchestration_models.BuildTarget, - abort_on_failure: typing.Optional[orchestration_models.AbortOnFailure] = None, - branch_name: typing.Optional[datasets_models.BranchName] = None, - force_build: typing.Optional[orchestration_models.ForceBuild] = None, - notifications_enabled: typing.Optional[orchestration_models.NotificationsEnabled] = None, - retry_backoff_duration: typing.Optional[orchestration_models.RetryBackoffDuration] = None, - retry_count: typing.Optional[orchestration_models.RetryCount] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[orchestration_models.Build]: - """ - - :param fallback_branches: - :type fallback_branches: FallbackBranches - :param target: The targets of the schedule. - :type target: BuildTarget - :param abort_on_failure: - :type abort_on_failure: Optional[AbortOnFailure] - :param branch_name: The target branch the build should run on. - :type branch_name: Optional[BranchName] - :param force_build: - :type force_build: Optional[ForceBuild] - :param notifications_enabled: - :type notifications_enabled: Optional[NotificationsEnabled] - :param retry_backoff_duration: - :type retry_backoff_duration: Optional[RetryBackoffDuration] - :param retry_count: The number of retry attempts for failed jobs. - :type retry_count: Optional[RetryCount] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[orchestration_models.Build] - - :raises CreateBuildPermissionDenied: Could not create the Build. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/orchestration/builds/create", - query_params={}, - path_params={}, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=orchestration_models.CreateBuildRequest( - target=target, - branch_name=branch_name, - fallback_branches=fallback_branches, - force_build=force_build, - retry_count=retry_count, - retry_backoff_duration=retry_backoff_duration, - abort_on_failure=abort_on_failure, - notifications_enabled=notifications_enabled, - ), - response_type=orchestration_models.Build, - request_timeout=request_timeout, - throwable_errors={ - "CreateBuildPermissionDenied": orchestration_errors.CreateBuildPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - build_rid: core_models.BuildRid, - *, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[orchestration_models.Build]: - """ - Get the Build with the specified rid. - :param build_rid: The RID of a Build. - :type build_rid: BuildRid - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[orchestration_models.Build] - - :raises BuildNotFound: The given Build could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/orchestration/builds/{buildRid}", - query_params={}, - path_params={ - "buildRid": build_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=orchestration_models.Build, - request_timeout=request_timeout, - throwable_errors={ - "BuildNotFound": orchestration_errors.BuildNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get_batch( - self, - body: typing_extensions.Annotated[ - typing.List[orchestration_models.GetBuildsBatchRequestElement], - annotated_types.Len(min_length=1, max_length=100), - ], - *, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[orchestration_models.GetBuildsBatchResponse]: - """ - Execute multiple get requests on Build. - - The maximum batch size for this endpoint is 100. - :param body: Body of the request - :type body: List[GetBuildsBatchRequestElement] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[orchestration_models.GetBuildsBatchResponse] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/orchestration/builds/getBatch", - query_params={}, - path_params={}, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=body, - response_type=orchestration_models.GetBuildsBatchResponse, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def jobs( - self, - build_rid: core_models.BuildRid, - *, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.AsyncResourceIterator[orchestration_models.Job]: - """ - Get the Jobs in the Build. - :param build_rid: The RID of a Build. - :type build_rid: BuildRid - :param page_size: The page size to use for the endpoint. - :type page_size: Optional[PageSize] - :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. - :type page_token: Optional[PageToken] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.AsyncResourceIterator[orchestration_models.Job] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/orchestration/builds/{buildRid}/jobs", - query_params={ - "pageSize": page_size, - "pageToken": page_token, - }, - path_params={ - "buildRid": build_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=orchestration_models.ListJobsOfBuildResponse, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def search( - self, - *, - where: orchestration_models.SearchBuildsFilter, - order_by: typing.Optional[orchestration_models.SearchBuildsOrderBy] = None, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[orchestration_models.SearchBuildsResponse]: - """ - Search for Builds. - :param where: - :type where: SearchBuildsFilter - :param order_by: - :type order_by: Optional[SearchBuildsOrderBy] - :param page_size: The page size for the search request. If no value is provided, a default of `100` will be used. - :type page_size: Optional[PageSize] - :param page_token: - :type page_token: Optional[PageToken] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[orchestration_models.SearchBuildsResponse] - - :raises SearchBuildsPermissionDenied: Could not search the Build. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/orchestration/builds/search", - query_params={ - "preview": preview, - }, - path_params={}, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=orchestration_models.SearchBuildsRequest( - where=where, - order_by=order_by, - page_token=page_token, - page_size=page_size, - ), - response_type=orchestration_models.SearchBuildsResponse, - request_timeout=request_timeout, - throwable_errors={ - "SearchBuildsPermissionDenied": orchestration_errors.SearchBuildsPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _AsyncBuildClientRaw: - def __init__(self, client: AsyncBuildClient) -> None: - def cancel(_: None): ... - def create(_: orchestration_models.Build): ... - def get(_: orchestration_models.Build): ... - def get_batch(_: orchestration_models.GetBuildsBatchResponse): ... - def jobs(_: orchestration_models.ListJobsOfBuildResponse): ... - def search(_: orchestration_models.SearchBuildsResponse): ... - - self.cancel = core.async_with_raw_response(cancel, client.cancel) - self.create = core.async_with_raw_response(create, client.create) - self.get = core.async_with_raw_response(get, client.get) - self.get_batch = core.async_with_raw_response(get_batch, client.get_batch) - self.jobs = core.async_with_raw_response(jobs, client.jobs) - self.search = core.async_with_raw_response(search, client.search) - - -class _AsyncBuildClientStreaming: - def __init__(self, client: AsyncBuildClient) -> None: - def create(_: orchestration_models.Build): ... - def get(_: orchestration_models.Build): ... - def get_batch(_: orchestration_models.GetBuildsBatchResponse): ... - def jobs(_: orchestration_models.ListJobsOfBuildResponse): ... - def search(_: orchestration_models.SearchBuildsResponse): ... - - self.create = core.async_with_streaming_response(create, client.create) - self.get = core.async_with_streaming_response(get, client.get) - self.get_batch = core.async_with_streaming_response(get_batch, client.get_batch) - self.jobs = core.async_with_streaming_response(jobs, client.jobs) - self.search = core.async_with_streaming_response(search, client.search) diff --git a/foundry_sdk/v2/orchestration/errors.py b/foundry_sdk/v2/orchestration/errors.py deleted file mode 100644 index f5bdf14f6..000000000 --- a/foundry_sdk/v2/orchestration/errors.py +++ /dev/null @@ -1,574 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing -from dataclasses import dataclass - -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v2.core import models as core_models -from foundry_sdk.v2.orchestration import models as orchestration_models - - -class BuildInputsNotFoundParameters(typing_extensions.TypedDict): - """The given build inputs could be found.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - resourceRids: typing.List[core.RID] - - -@dataclass -class BuildInputsNotFound(errors.NotFoundError): - name: typing.Literal["BuildInputsNotFound"] - parameters: BuildInputsNotFoundParameters - error_instance_id: str - - -class BuildInputsPermissionDeniedParameters(typing_extensions.TypedDict): - """The provided token does not have permission to use the given resources as inputs to the build.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - resourceRids: typing.List[core.RID] - - -@dataclass -class BuildInputsPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["BuildInputsPermissionDenied"] - parameters: BuildInputsPermissionDeniedParameters - error_instance_id: str - - -class BuildNotFoundParameters(typing_extensions.TypedDict): - """The given Build could not be found.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - buildRid: core_models.BuildRid - """The RID of a Build.""" - - -@dataclass -class BuildNotFound(errors.NotFoundError): - name: typing.Literal["BuildNotFound"] - parameters: BuildNotFoundParameters - error_instance_id: str - - -class BuildNotRunningParameters(typing_extensions.TypedDict): - """The build is not currently running.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - buildRid: core_models.BuildRid - - -@dataclass -class BuildNotRunning(errors.BadRequestError): - name: typing.Literal["BuildNotRunning"] - parameters: BuildNotRunningParameters - error_instance_id: str - - -class BuildTargetsMissingJobSpecsParameters(typing_extensions.TypedDict): - """The action targets are missing job specs.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - resourceRids: typing.List[core.RID] - - -@dataclass -class BuildTargetsMissingJobSpecs(errors.BadRequestError): - name: typing.Literal["BuildTargetsMissingJobSpecs"] - parameters: BuildTargetsMissingJobSpecsParameters - error_instance_id: str - - -class BuildTargetsNotFoundParameters(typing_extensions.TypedDict): - """The given build targets could not be found.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - resourceRids: typing.List[core.RID] - - -@dataclass -class BuildTargetsNotFound(errors.NotFoundError): - name: typing.Literal["BuildTargetsNotFound"] - parameters: BuildTargetsNotFoundParameters - error_instance_id: str - - -class BuildTargetsPermissionDeniedParameters(typing_extensions.TypedDict): - """The provided token does not have permission to build the given resources.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - resourceRids: typing.List[core.RID] - - -@dataclass -class BuildTargetsPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["BuildTargetsPermissionDenied"] - parameters: BuildTargetsPermissionDeniedParameters - error_instance_id: str - - -class BuildTargetsResolutionErrorParameters(typing_extensions.TypedDict): - """Unable to resolve the given target to a set of targets to build.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class BuildTargetsResolutionError(errors.BadRequestError): - name: typing.Literal["BuildTargetsResolutionError"] - parameters: BuildTargetsResolutionErrorParameters - error_instance_id: str - - -class BuildTargetsUpToDateParameters(typing_extensions.TypedDict): - """ - The build targets are up to date and no Build was created. To rebuild the targets regardless, - use the force build option when creating the Build. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class BuildTargetsUpToDate(errors.BadRequestError): - name: typing.Literal["BuildTargetsUpToDate"] - parameters: BuildTargetsUpToDateParameters - error_instance_id: str - - -class CancelBuildPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not cancel the Build.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - buildRid: core_models.BuildRid - """The RID of a Build.""" - - -@dataclass -class CancelBuildPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["CancelBuildPermissionDenied"] - parameters: CancelBuildPermissionDeniedParameters - error_instance_id: str - - -class CreateBuildPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not create the Build.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class CreateBuildPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["CreateBuildPermissionDenied"] - parameters: CreateBuildPermissionDeniedParameters - error_instance_id: str - - -class CreateSchedulePermissionDeniedParameters(typing_extensions.TypedDict): - """Could not create the Schedule.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class CreateSchedulePermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["CreateSchedulePermissionDenied"] - parameters: CreateSchedulePermissionDeniedParameters - error_instance_id: str - - -class DeleteSchedulePermissionDeniedParameters(typing_extensions.TypedDict): - """Could not delete the Schedule.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - scheduleRid: core_models.ScheduleRid - - -@dataclass -class DeleteSchedulePermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["DeleteSchedulePermissionDenied"] - parameters: DeleteSchedulePermissionDeniedParameters - error_instance_id: str - - -class GetAffectedResourcesSchedulePermissionDeniedParameters(typing_extensions.TypedDict): - """Could not getAffectedResources the Schedule.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - scheduleRid: core_models.ScheduleRid - - -@dataclass -class GetAffectedResourcesSchedulePermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["GetAffectedResourcesSchedulePermissionDenied"] - parameters: GetAffectedResourcesSchedulePermissionDeniedParameters - error_instance_id: str - - -class InvalidAndTriggerParameters(typing_extensions.TypedDict): - """The AND trigger should have at least one value.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class InvalidAndTrigger(errors.BadRequestError): - name: typing.Literal["InvalidAndTrigger"] - parameters: InvalidAndTriggerParameters - error_instance_id: str - - -class InvalidMediaSetTriggerParameters(typing_extensions.TypedDict): - """The given MediaSet rid is invalid.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - mediaSetRid: core_models.MediaSetRid - - -@dataclass -class InvalidMediaSetTrigger(errors.BadRequestError): - name: typing.Literal["InvalidMediaSetTrigger"] - parameters: InvalidMediaSetTriggerParameters - error_instance_id: str - - -class InvalidOrTriggerParameters(typing_extensions.TypedDict): - """The OR trigger should have at least one value.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class InvalidOrTrigger(errors.BadRequestError): - name: typing.Literal["InvalidOrTrigger"] - parameters: InvalidOrTriggerParameters - error_instance_id: str - - -class InvalidScheduleDescriptionParameters(typing_extensions.TypedDict): - """The schedule description is too long.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class InvalidScheduleDescription(errors.BadRequestError): - name: typing.Literal["InvalidScheduleDescription"] - parameters: InvalidScheduleDescriptionParameters - error_instance_id: str - - -class InvalidScheduleNameParameters(typing_extensions.TypedDict): - """The schedule name is too long.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class InvalidScheduleName(errors.BadRequestError): - name: typing.Literal["InvalidScheduleName"] - parameters: InvalidScheduleNameParameters - error_instance_id: str - - -class InvalidTimeTriggerParameters(typing_extensions.TypedDict): - """The schedule trigger cron expression is invalid.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - cronExpression: orchestration_models.CronExpression - - -@dataclass -class InvalidTimeTrigger(errors.BadRequestError): - name: typing.Literal["InvalidTimeTrigger"] - parameters: InvalidTimeTriggerParameters - error_instance_id: str - - -class JobNotFoundParameters(typing_extensions.TypedDict): - """The given Job could not be found.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - jobRid: core_models.JobRid - """The RID of a Job.""" - - -@dataclass -class JobNotFound(errors.NotFoundError): - name: typing.Literal["JobNotFound"] - parameters: JobNotFoundParameters - error_instance_id: str - - -class MissingBuildTargetsParameters(typing_extensions.TypedDict): - """The build target must contains at least one dataset target.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class MissingBuildTargets(errors.BadRequestError): - name: typing.Literal["MissingBuildTargets"] - parameters: MissingBuildTargetsParameters - error_instance_id: str - - -class MissingConnectingBuildInputsParameters(typing_extensions.TypedDict): - """The connecting build target must contains at least one input dataset target.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class MissingConnectingBuildInputs(errors.BadRequestError): - name: typing.Literal["MissingConnectingBuildInputs"] - parameters: MissingConnectingBuildInputsParameters - error_instance_id: str - - -class MissingTriggerParameters(typing_extensions.TypedDict): - """You must pass in a trigger when creating or updating a schedule.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class MissingTrigger(errors.BadRequestError): - name: typing.Literal["MissingTrigger"] - parameters: MissingTriggerParameters - error_instance_id: str - - -class PauseSchedulePermissionDeniedParameters(typing_extensions.TypedDict): - """Could not pause the Schedule.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - scheduleRid: core_models.ScheduleRid - - -@dataclass -class PauseSchedulePermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["PauseSchedulePermissionDenied"] - parameters: PauseSchedulePermissionDeniedParameters - error_instance_id: str - - -class ReplaceSchedulePermissionDeniedParameters(typing_extensions.TypedDict): - """Could not replace the Schedule.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - scheduleRid: core_models.ScheduleRid - - -@dataclass -class ReplaceSchedulePermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["ReplaceSchedulePermissionDenied"] - parameters: ReplaceSchedulePermissionDeniedParameters - error_instance_id: str - - -class RunSchedulePermissionDeniedParameters(typing_extensions.TypedDict): - """Could not run the Schedule.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - scheduleRid: core_models.ScheduleRid - - -@dataclass -class RunSchedulePermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["RunSchedulePermissionDenied"] - parameters: RunSchedulePermissionDeniedParameters - error_instance_id: str - - -class ScheduleAlreadyRunningParameters(typing_extensions.TypedDict): - """The target schedule is currently running.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - scheduleRid: core_models.ScheduleRid - - -@dataclass -class ScheduleAlreadyRunning(errors.ConflictError): - name: typing.Literal["ScheduleAlreadyRunning"] - parameters: ScheduleAlreadyRunningParameters - error_instance_id: str - - -class ScheduleNotFoundParameters(typing_extensions.TypedDict): - """The given Schedule could not be found.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - scheduleRid: core_models.ScheduleRid - - -@dataclass -class ScheduleNotFound(errors.NotFoundError): - name: typing.Literal["ScheduleNotFound"] - parameters: ScheduleNotFoundParameters - error_instance_id: str - - -class ScheduleTriggerResourcesNotFoundParameters(typing_extensions.TypedDict): - """The given resources in the schedule trigger could not be found.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - resourceRids: typing.List[core.RID] - - -@dataclass -class ScheduleTriggerResourcesNotFound(errors.NotFoundError): - name: typing.Literal["ScheduleTriggerResourcesNotFound"] - parameters: ScheduleTriggerResourcesNotFoundParameters - error_instance_id: str - - -class ScheduleTriggerResourcesPermissionDeniedParameters(typing_extensions.TypedDict): - """The provided token does not have permission to use the given resources as a schedule trigger.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - resourceRids: typing.List[core.RID] - - -@dataclass -class ScheduleTriggerResourcesPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["ScheduleTriggerResourcesPermissionDenied"] - parameters: ScheduleTriggerResourcesPermissionDeniedParameters - error_instance_id: str - - -class ScheduleVersionNotFoundParameters(typing_extensions.TypedDict): - """The given ScheduleVersion could not be found.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - scheduleVersionRid: orchestration_models.ScheduleVersionRid - """The RID of a schedule version""" - - -@dataclass -class ScheduleVersionNotFound(errors.NotFoundError): - name: typing.Literal["ScheduleVersionNotFound"] - parameters: ScheduleVersionNotFoundParameters - error_instance_id: str - - -class SearchBuildsPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not search the Build.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class SearchBuildsPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["SearchBuildsPermissionDenied"] - parameters: SearchBuildsPermissionDeniedParameters - error_instance_id: str - - -class TargetNotSupportedParameters(typing_extensions.TypedDict): - """ - The schedule target is not supported. The schedule target must be either a connecting target, upstream - target or list of single dataset targets. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - scheduleRid: core_models.ScheduleRid - - -@dataclass -class TargetNotSupported(errors.BadRequestError): - name: typing.Literal["TargetNotSupported"] - parameters: TargetNotSupportedParameters - error_instance_id: str - - -class UnpauseSchedulePermissionDeniedParameters(typing_extensions.TypedDict): - """Could not unpause the Schedule.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - scheduleRid: core_models.ScheduleRid - - -@dataclass -class UnpauseSchedulePermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["UnpauseSchedulePermissionDenied"] - parameters: UnpauseSchedulePermissionDeniedParameters - error_instance_id: str - - -__all__ = [ - "BuildInputsNotFound", - "BuildInputsPermissionDenied", - "BuildNotFound", - "BuildNotRunning", - "BuildTargetsMissingJobSpecs", - "BuildTargetsNotFound", - "BuildTargetsPermissionDenied", - "BuildTargetsResolutionError", - "BuildTargetsUpToDate", - "CancelBuildPermissionDenied", - "CreateBuildPermissionDenied", - "CreateSchedulePermissionDenied", - "DeleteSchedulePermissionDenied", - "GetAffectedResourcesSchedulePermissionDenied", - "InvalidAndTrigger", - "InvalidMediaSetTrigger", - "InvalidOrTrigger", - "InvalidScheduleDescription", - "InvalidScheduleName", - "InvalidTimeTrigger", - "JobNotFound", - "MissingBuildTargets", - "MissingConnectingBuildInputs", - "MissingTrigger", - "PauseSchedulePermissionDenied", - "ReplaceSchedulePermissionDenied", - "RunSchedulePermissionDenied", - "ScheduleAlreadyRunning", - "ScheduleNotFound", - "ScheduleTriggerResourcesNotFound", - "ScheduleTriggerResourcesPermissionDenied", - "ScheduleVersionNotFound", - "SearchBuildsPermissionDenied", - "TargetNotSupported", - "UnpauseSchedulePermissionDenied", -] diff --git a/foundry_sdk/v2/orchestration/job.py b/foundry_sdk/v2/orchestration/job.py deleted file mode 100644 index 609fb2820..000000000 --- a/foundry_sdk/v2/orchestration/job.py +++ /dev/null @@ -1,302 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing - -import annotated_types -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v2.core import models as core_models -from foundry_sdk.v2.orchestration import errors as orchestration_errors -from foundry_sdk.v2.orchestration import models as orchestration_models - - -class JobClient: - """ - The API client for the Job Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _JobClientStreaming(self) - self.with_raw_response = _JobClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - job_rid: core_models.JobRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> orchestration_models.Job: - """ - Get the Job with the specified rid. - :param job_rid: The RID of a Job. - :type job_rid: JobRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: orchestration_models.Job - - :raises JobNotFound: The given Job could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/orchestration/jobs/{jobRid}", - query_params={ - "preview": preview, - }, - path_params={ - "jobRid": job_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=orchestration_models.Job, - request_timeout=request_timeout, - throwable_errors={ - "JobNotFound": orchestration_errors.JobNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get_batch( - self, - body: typing_extensions.Annotated[ - typing.List[orchestration_models.GetJobsBatchRequestElement], - annotated_types.Len(min_length=1, max_length=500), - ], - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> orchestration_models.GetJobsBatchResponse: - """ - Execute multiple get requests on Job. - - The maximum batch size for this endpoint is 500. - :param body: Body of the request - :type body: List[GetJobsBatchRequestElement] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: orchestration_models.GetJobsBatchResponse - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/orchestration/jobs/getBatch", - query_params={ - "preview": preview, - }, - path_params={}, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=body, - response_type=orchestration_models.GetJobsBatchResponse, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _JobClientRaw: - def __init__(self, client: JobClient) -> None: - def get(_: orchestration_models.Job): ... - def get_batch(_: orchestration_models.GetJobsBatchResponse): ... - - self.get = core.with_raw_response(get, client.get) - self.get_batch = core.with_raw_response(get_batch, client.get_batch) - - -class _JobClientStreaming: - def __init__(self, client: JobClient) -> None: - def get(_: orchestration_models.Job): ... - def get_batch(_: orchestration_models.GetJobsBatchResponse): ... - - self.get = core.with_streaming_response(get, client.get) - self.get_batch = core.with_streaming_response(get_batch, client.get_batch) - - -class AsyncJobClient: - """ - The API client for the Job Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AsyncJobClientStreaming(self) - self.with_raw_response = _AsyncJobClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - job_rid: core_models.JobRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[orchestration_models.Job]: - """ - Get the Job with the specified rid. - :param job_rid: The RID of a Job. - :type job_rid: JobRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[orchestration_models.Job] - - :raises JobNotFound: The given Job could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/orchestration/jobs/{jobRid}", - query_params={ - "preview": preview, - }, - path_params={ - "jobRid": job_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=orchestration_models.Job, - request_timeout=request_timeout, - throwable_errors={ - "JobNotFound": orchestration_errors.JobNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get_batch( - self, - body: typing_extensions.Annotated[ - typing.List[orchestration_models.GetJobsBatchRequestElement], - annotated_types.Len(min_length=1, max_length=500), - ], - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[orchestration_models.GetJobsBatchResponse]: - """ - Execute multiple get requests on Job. - - The maximum batch size for this endpoint is 500. - :param body: Body of the request - :type body: List[GetJobsBatchRequestElement] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[orchestration_models.GetJobsBatchResponse] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/orchestration/jobs/getBatch", - query_params={ - "preview": preview, - }, - path_params={}, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=body, - response_type=orchestration_models.GetJobsBatchResponse, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _AsyncJobClientRaw: - def __init__(self, client: AsyncJobClient) -> None: - def get(_: orchestration_models.Job): ... - def get_batch(_: orchestration_models.GetJobsBatchResponse): ... - - self.get = core.async_with_raw_response(get, client.get) - self.get_batch = core.async_with_raw_response(get_batch, client.get_batch) - - -class _AsyncJobClientStreaming: - def __init__(self, client: AsyncJobClient) -> None: - def get(_: orchestration_models.Job): ... - def get_batch(_: orchestration_models.GetJobsBatchResponse): ... - - self.get = core.async_with_streaming_response(get, client.get) - self.get_batch = core.async_with_streaming_response(get_batch, client.get_batch) diff --git a/foundry_sdk/v2/orchestration/models.py b/foundry_sdk/v2/orchestration/models.py deleted file mode 100644 index 653c0cb70..000000000 --- a/foundry_sdk/v2/orchestration/models.py +++ /dev/null @@ -1,963 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -from __future__ import annotations - -import typing - -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk.v2.core import models as core_models -from foundry_sdk.v2.datasets import models as datasets_models -from foundry_sdk.v2.filesystem import models as filesystem_models - -AbortOnFailure = bool -""" -If any job in the build is unsuccessful, immediately finish the -build by cancelling all other jobs. -""" - - -class Action(core.ModelBase): - """Action""" - - target: BuildTarget - branch_name: datasets_models.BranchName = pydantic.Field(alias=str("branchName")) # type: ignore[literal-required] - """The target branch the schedule should run on.""" - - fallback_branches: FallbackBranches = pydantic.Field(alias=str("fallbackBranches")) # type: ignore[literal-required] - force_build: ForceBuild = pydantic.Field(alias=str("forceBuild")) # type: ignore[literal-required] - retry_count: typing.Optional[RetryCount] = pydantic.Field(alias=str("retryCount"), default=None) # type: ignore[literal-required] - retry_backoff_duration: typing.Optional[RetryBackoffDuration] = pydantic.Field(alias=str("retryBackoffDuration"), default=None) # type: ignore[literal-required] - abort_on_failure: AbortOnFailure = pydantic.Field(alias=str("abortOnFailure")) # type: ignore[literal-required] - notifications_enabled: NotificationsEnabled = pydantic.Field(alias=str("notificationsEnabled")) # type: ignore[literal-required] - - -class AffectedResourcesResponse(core.ModelBase): - """AffectedResourcesResponse""" - - datasets: typing.List[BuildableRid] - - -class AndTrigger(core.ModelBase): - """Trigger after all of the given triggers emit an event.""" - - triggers: typing.List[Trigger] - type: typing.Literal["and"] = "and" - - -class Build(core.ModelBase): - """Build""" - - rid: core_models.BuildRid - """The RID of a Build.""" - - branch_name: datasets_models.BranchName = pydantic.Field(alias=str("branchName")) # type: ignore[literal-required] - """The branch that the build is running on.""" - - created_time: core_models.CreatedTime = pydantic.Field(alias=str("createdTime")) # type: ignore[literal-required] - """The timestamp that the build was created.""" - - created_by: core_models.CreatedBy = pydantic.Field(alias=str("createdBy")) # type: ignore[literal-required] - """The user who created the build.""" - - fallback_branches: FallbackBranches = pydantic.Field(alias=str("fallbackBranches")) # type: ignore[literal-required] - job_rids: typing.List[core_models.JobRid] = pydantic.Field(alias=str("jobRids")) # type: ignore[literal-required] - retry_count: RetryCount = pydantic.Field(alias=str("retryCount")) # type: ignore[literal-required] - retry_backoff_duration: RetryBackoffDuration = pydantic.Field(alias=str("retryBackoffDuration")) # type: ignore[literal-required] - abort_on_failure: AbortOnFailure = pydantic.Field(alias=str("abortOnFailure")) # type: ignore[literal-required] - status: BuildStatus - schedule_rid: typing.Optional[core_models.ScheduleRid] = pydantic.Field(alias=str("scheduleRid"), default=None) # type: ignore[literal-required] - """Schedule RID of the Schedule that triggered this build. If a user triggered the build, Schedule RID will be empty.""" - - -BuildStatus = typing.Literal["RUNNING", "SUCCEEDED", "FAILED", "CANCELED"] -"""The status of the build.""" - - -BuildTarget = typing_extensions.Annotated[ - typing.Union["UpstreamTarget", "ManualTarget", "ConnectingTarget"], - pydantic.Field(discriminator="type"), -] -"""The targets of the build.""" - - -BuildableRid = core.RID -""" -The Resource Identifier (RID) of a Resource that can be built. For example, this is a Dataset RID, Media Set -RID or Restricted View RID. -""" - - -class ConnectingTarget(core.ModelBase): - """ - All datasets between the input datasets (exclusive) and the - target datasets (inclusive) except for the datasets to ignore. - """ - - input_rids: typing.List[BuildableRid] = pydantic.Field(alias=str("inputRids")) # type: ignore[literal-required] - """The upstream input datasets (exclusive).""" - - target_rids: typing.List[BuildableRid] = pydantic.Field(alias=str("targetRids")) # type: ignore[literal-required] - """The downstream target datasets (inclusive).""" - - ignored_rids: typing.List[BuildableRid] = pydantic.Field(alias=str("ignoredRids")) # type: ignore[literal-required] - """The datasets between the input datasets and target datasets to exclude.""" - - type: typing.Literal["connecting"] = "connecting" - - -class CreateBuildRequest(core.ModelBase): - """CreateBuildRequest""" - - target: BuildTarget - """The targets of the schedule.""" - - branch_name: typing.Optional[datasets_models.BranchName] = pydantic.Field(alias=str("branchName"), default=None) # type: ignore[literal-required] - """The target branch the build should run on.""" - - fallback_branches: FallbackBranches = pydantic.Field(alias=str("fallbackBranches")) # type: ignore[literal-required] - force_build: typing.Optional[ForceBuild] = pydantic.Field(alias=str("forceBuild"), default=None) # type: ignore[literal-required] - retry_count: typing.Optional[RetryCount] = pydantic.Field(alias=str("retryCount"), default=None) # type: ignore[literal-required] - """The number of retry attempts for failed jobs.""" - - retry_backoff_duration: typing.Optional[RetryBackoffDuration] = pydantic.Field(alias=str("retryBackoffDuration"), default=None) # type: ignore[literal-required] - abort_on_failure: typing.Optional[AbortOnFailure] = pydantic.Field(alias=str("abortOnFailure"), default=None) # type: ignore[literal-required] - notifications_enabled: typing.Optional[NotificationsEnabled] = pydantic.Field(alias=str("notificationsEnabled"), default=None) # type: ignore[literal-required] - - -class CreateScheduleRequest(core.ModelBase): - """CreateScheduleRequest""" - - display_name: typing.Optional[str] = pydantic.Field(alias=str("displayName"), default=None) # type: ignore[literal-required] - description: typing.Optional[str] = None - action: CreateScheduleRequestAction - trigger: typing.Optional[Trigger] = None - """ - The schedule trigger. If the requesting user does not have - permission to see the trigger, this will be empty. - """ - - scope_mode: typing.Optional[CreateScheduleRequestScopeMode] = pydantic.Field(alias=str("scopeMode"), default=None) # type: ignore[literal-required] - - -class CreateScheduleRequestAction(core.ModelBase): - """CreateScheduleRequestAction""" - - abort_on_failure: typing.Optional[AbortOnFailure] = pydantic.Field(alias=str("abortOnFailure"), default=None) # type: ignore[literal-required] - force_build: typing.Optional[ForceBuild] = pydantic.Field(alias=str("forceBuild"), default=None) # type: ignore[literal-required] - retry_backoff_duration: typing.Optional[RetryBackoffDuration] = pydantic.Field(alias=str("retryBackoffDuration"), default=None) # type: ignore[literal-required] - retry_count: typing.Optional[RetryCount] = pydantic.Field(alias=str("retryCount"), default=None) # type: ignore[literal-required] - fallback_branches: typing.Optional[FallbackBranches] = pydantic.Field(alias=str("fallbackBranches"), default=None) # type: ignore[literal-required] - branch_name: typing.Optional[datasets_models.BranchName] = pydantic.Field(alias=str("branchName"), default=None) # type: ignore[literal-required] - """The target branch the schedule should run on.""" - - notifications_enabled: typing.Optional[NotificationsEnabled] = pydantic.Field(alias=str("notificationsEnabled"), default=None) # type: ignore[literal-required] - target: CreateScheduleRequestBuildTarget - - -CreateScheduleRequestBuildTarget = typing_extensions.Annotated[ - typing.Union[ - "CreateScheduleRequestUpstreamTarget", - "CreateScheduleRequestManualTarget", - "CreateScheduleRequestConnectingTarget", - ], - pydantic.Field(discriminator="type"), -] -"""The targets of the build.""" - - -class CreateScheduleRequestConnectingTarget(core.ModelBase): - """CreateScheduleRequestConnectingTarget""" - - ignored_rids: typing.Optional[typing.List[BuildableRid]] = pydantic.Field(alias=str("ignoredRids"), default=None) # type: ignore[literal-required] - """The datasets between the input datasets and target datasets to exclude.""" - - target_rids: typing.List[BuildableRid] = pydantic.Field(alias=str("targetRids")) # type: ignore[literal-required] - """The downstream target datasets (inclusive).""" - - input_rids: typing.List[BuildableRid] = pydantic.Field(alias=str("inputRids")) # type: ignore[literal-required] - """The upstream input datasets (exclusive).""" - - type: typing.Literal["connecting"] = "connecting" - - -class CreateScheduleRequestManualTarget(core.ModelBase): - """CreateScheduleRequestManualTarget""" - - target_rids: typing.List[BuildableRid] = pydantic.Field(alias=str("targetRids")) # type: ignore[literal-required] - type: typing.Literal["manual"] = "manual" - - -class CreateScheduleRequestProjectScope(core.ModelBase): - """CreateScheduleRequestProjectScope""" - - project_rids: typing.List[filesystem_models.ProjectRid] = pydantic.Field(alias=str("projectRids")) # type: ignore[literal-required] - type: typing.Literal["project"] = "project" - - -CreateScheduleRequestScopeMode = typing_extensions.Annotated[ - typing.Union["CreateScheduleRequestProjectScope", "CreateScheduleRequestUserScope"], - pydantic.Field(discriminator="type"), -] -"""The boundaries for the schedule build.""" - - -class CreateScheduleRequestUpstreamTarget(core.ModelBase): - """CreateScheduleRequestUpstreamTarget""" - - ignored_rids: typing.Optional[typing.List[BuildableRid]] = pydantic.Field(alias=str("ignoredRids"), default=None) # type: ignore[literal-required] - """The datasets to ignore when calculating the final set of dataset to build.""" - - target_rids: typing.List[BuildableRid] = pydantic.Field(alias=str("targetRids")) # type: ignore[literal-required] - """The target datasets.""" - - type: typing.Literal["upstream"] = "upstream" - - -class CreateScheduleRequestUserScope(core.ModelBase): - """CreateScheduleRequestUserScope""" - - type: typing.Literal["user"] = "user" - - -CronExpression = str -""" -A standard CRON expression with minute, hour, day, month -and day of week. -""" - - -class DatasetJobOutput(core.ModelBase): - """DatasetJobOutput""" - - dataset_rid: datasets_models.DatasetRid = pydantic.Field(alias=str("datasetRid")) # type: ignore[literal-required] - output_transaction_rid: typing.Optional[datasets_models.TransactionRid] = pydantic.Field(alias=str("outputTransactionRid"), default=None) # type: ignore[literal-required] - type: typing.Literal["datasetJobOutput"] = "datasetJobOutput" - - -class DatasetUpdatedTrigger(core.ModelBase): - """ - Trigger whenever a new transaction is committed to the - dataset on the target branch. - """ - - dataset_rid: datasets_models.DatasetRid = pydantic.Field(alias=str("datasetRid")) # type: ignore[literal-required] - branch_name: datasets_models.BranchName = pydantic.Field(alias=str("branchName")) # type: ignore[literal-required] - type: typing.Literal["datasetUpdated"] = "datasetUpdated" - - -FallbackBranches = typing.List[datasets_models.BranchName] -""" -The branches to retrieve JobSpecs from if no JobSpec is found on the -target branch. -""" - - -ForceBuild = bool -"""Whether to ignore staleness information when running the build.""" - - -class GetBuildsBatchRequestElement(core.ModelBase): - """GetBuildsBatchRequestElement""" - - build_rid: core_models.BuildRid = pydantic.Field(alias=str("buildRid")) # type: ignore[literal-required] - """The RID of a Build.""" - - -class GetBuildsBatchResponse(core.ModelBase): - """GetBuildsBatchResponse""" - - data: typing.Dict[core_models.BuildRid, Build] - - -class GetJobsBatchRequestElement(core.ModelBase): - """GetJobsBatchRequestElement""" - - job_rid: core_models.JobRid = pydantic.Field(alias=str("jobRid")) # type: ignore[literal-required] - """The RID of a Job.""" - - -class GetJobsBatchResponse(core.ModelBase): - """GetJobsBatchResponse""" - - data: typing.Dict[core_models.JobRid, Job] - - -class GetSchedulesBatchRequestElement(core.ModelBase): - """GetSchedulesBatchRequestElement""" - - schedule_rid: core_models.ScheduleRid = pydantic.Field(alias=str("scheduleRid")) # type: ignore[literal-required] - - -class GetSchedulesBatchResponse(core.ModelBase): - """GetSchedulesBatchResponse""" - - data: typing.Dict[core_models.ScheduleRid, Schedule] - - -class Job(core.ModelBase): - """Job""" - - rid: core_models.JobRid - """The RID of a Job.""" - - build_rid: core_models.BuildRid = pydantic.Field(alias=str("buildRid")) # type: ignore[literal-required] - """The RID of the Build that the Job belongs to.""" - - started_time: JobStartedTime = pydantic.Field(alias=str("startedTime")) # type: ignore[literal-required] - """The time this job started waiting for the dependencies to be resolved.""" - - latest_attempt_start_time: typing.Optional[core.AwareDatetime] = pydantic.Field(alias=str("latestAttemptStartTime"), default=None) # type: ignore[literal-required] - """The time this job's latest attempt started running. This field may be empty or outdated if the job failed to start.""" - - finished_time: typing.Optional[core.AwareDatetime] = pydantic.Field(alias=str("finishedTime"), default=None) # type: ignore[literal-required] - """The time this job was finished.""" - - job_status: JobStatus = pydantic.Field(alias=str("jobStatus")) # type: ignore[literal-required] - outputs: typing.List[JobOutput] - """ - Outputs of the Job. Only outputs with supported types are listed here; unsupported types are omitted. - Currently supported types are Dataset and Media Set outputs. - """ - - -JobOutput = typing_extensions.Annotated[ - typing.Union["DatasetJobOutput", "TransactionalMediaSetJobOutput"], - pydantic.Field(discriminator="type"), -] -"""Other types of Job Outputs exist in Foundry. Currently, only Dataset and Media Set are supported by the API.""" - - -JobStartedTime = core.AwareDatetime -"""The time this job started waiting for the dependencies to be resolved.""" - - -JobStatus = typing.Literal["WAITING", "RUNNING", "SUCCEEDED", "FAILED", "CANCELED", "DID_NOT_RUN"] -"""The status of the job.""" - - -class JobSucceededTrigger(core.ModelBase): - """ - Trigger whenever a job succeeds on the dataset and on the target - branch. - """ - - dataset_rid: datasets_models.DatasetRid = pydantic.Field(alias=str("datasetRid")) # type: ignore[literal-required] - branch_name: datasets_models.BranchName = pydantic.Field(alias=str("branchName")) # type: ignore[literal-required] - type: typing.Literal["jobSucceeded"] = "jobSucceeded" - - -class ListJobsOfBuildResponse(core.ModelBase): - """ListJobsOfBuildResponse""" - - data: typing.List[Job] - next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] - - -class ListRunsOfScheduleResponse(core.ModelBase): - """ListRunsOfScheduleResponse""" - - data: typing.List[ScheduleRun] - next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] - - -class ManualTarget(core.ModelBase): - """Manually specify all datasets to build.""" - - target_rids: typing.List[BuildableRid] = pydantic.Field(alias=str("targetRids")) # type: ignore[literal-required] - type: typing.Literal["manual"] = "manual" - - -class ManualTrigger(core.ModelBase): - """Only trigger the Schedule manually. If placed in an AND or OR condition, this Trigger will be ignored.""" - - type: typing.Literal["manual"] = "manual" - - -class MediaSetUpdatedTrigger(core.ModelBase): - """ - Trigger whenever an update is made to a media set on the target - branch. For transactional media sets, this happens when a transaction - is committed. For non-transactional media sets, this event happens - eventually (but not necessary immediately) after an update. - """ - - media_set_rid: core_models.MediaSetRid = pydantic.Field(alias=str("mediaSetRid")) # type: ignore[literal-required] - branch_name: datasets_models.BranchName = pydantic.Field(alias=str("branchName")) # type: ignore[literal-required] - type: typing.Literal["mediaSetUpdated"] = "mediaSetUpdated" - - -class NewLogicTrigger(core.ModelBase): - """ - Trigger whenever a new JobSpec is put on the dataset and on - that branch. - """ - - branch_name: datasets_models.BranchName = pydantic.Field(alias=str("branchName")) # type: ignore[literal-required] - dataset_rid: datasets_models.DatasetRid = pydantic.Field(alias=str("datasetRid")) # type: ignore[literal-required] - type: typing.Literal["newLogic"] = "newLogic" - - -NotificationsEnabled = bool -""" -Whether to receive a notification at the end of the build. -The notification will be sent to the user that has most recently edited the schedule. -No notification will be sent if the schedule has `scopeMode` set to `ProjectScope`. -""" - - -class OrTrigger(core.ModelBase): - """Trigger whenever any of the given triggers emit an event.""" - - triggers: typing.List[Trigger] - type: typing.Literal["or"] = "or" - - -class ProjectScope(core.ModelBase): - """The schedule will only build resources in the following projects.""" - - project_rids: typing.List[filesystem_models.ProjectRid] = pydantic.Field(alias=str("projectRids")) # type: ignore[literal-required] - type: typing.Literal["project"] = "project" - - -class ReplaceScheduleRequest(core.ModelBase): - """ReplaceScheduleRequest""" - - display_name: typing.Optional[str] = pydantic.Field(alias=str("displayName"), default=None) # type: ignore[literal-required] - description: typing.Optional[str] = None - action: ReplaceScheduleRequestAction - trigger: typing.Optional[Trigger] = None - """ - The schedule trigger. If the requesting user does not have - permission to see the trigger, this will be empty. - """ - - scope_mode: typing.Optional[ReplaceScheduleRequestScopeMode] = pydantic.Field(alias=str("scopeMode"), default=None) # type: ignore[literal-required] - - -class ReplaceScheduleRequestAction(core.ModelBase): - """ReplaceScheduleRequestAction""" - - abort_on_failure: typing.Optional[AbortOnFailure] = pydantic.Field(alias=str("abortOnFailure"), default=None) # type: ignore[literal-required] - force_build: typing.Optional[ForceBuild] = pydantic.Field(alias=str("forceBuild"), default=None) # type: ignore[literal-required] - retry_backoff_duration: typing.Optional[RetryBackoffDuration] = pydantic.Field(alias=str("retryBackoffDuration"), default=None) # type: ignore[literal-required] - retry_count: typing.Optional[RetryCount] = pydantic.Field(alias=str("retryCount"), default=None) # type: ignore[literal-required] - fallback_branches: typing.Optional[FallbackBranches] = pydantic.Field(alias=str("fallbackBranches"), default=None) # type: ignore[literal-required] - branch_name: typing.Optional[datasets_models.BranchName] = pydantic.Field(alias=str("branchName"), default=None) # type: ignore[literal-required] - """The target branch the schedule should run on.""" - - notifications_enabled: typing.Optional[NotificationsEnabled] = pydantic.Field(alias=str("notificationsEnabled"), default=None) # type: ignore[literal-required] - target: ReplaceScheduleRequestBuildTarget - - -ReplaceScheduleRequestBuildTarget = typing_extensions.Annotated[ - typing.Union[ - "ReplaceScheduleRequestUpstreamTarget", - "ReplaceScheduleRequestManualTarget", - "ReplaceScheduleRequestConnectingTarget", - ], - pydantic.Field(discriminator="type"), -] -"""The targets of the build.""" - - -class ReplaceScheduleRequestConnectingTarget(core.ModelBase): - """ReplaceScheduleRequestConnectingTarget""" - - ignored_rids: typing.Optional[typing.List[BuildableRid]] = pydantic.Field(alias=str("ignoredRids"), default=None) # type: ignore[literal-required] - """The datasets between the input datasets and target datasets to exclude.""" - - target_rids: typing.List[BuildableRid] = pydantic.Field(alias=str("targetRids")) # type: ignore[literal-required] - """The downstream target datasets (inclusive).""" - - input_rids: typing.List[BuildableRid] = pydantic.Field(alias=str("inputRids")) # type: ignore[literal-required] - """The upstream input datasets (exclusive).""" - - type: typing.Literal["connecting"] = "connecting" - - -class ReplaceScheduleRequestManualTarget(core.ModelBase): - """ReplaceScheduleRequestManualTarget""" - - target_rids: typing.List[BuildableRid] = pydantic.Field(alias=str("targetRids")) # type: ignore[literal-required] - type: typing.Literal["manual"] = "manual" - - -class ReplaceScheduleRequestProjectScope(core.ModelBase): - """ReplaceScheduleRequestProjectScope""" - - project_rids: typing.List[filesystem_models.ProjectRid] = pydantic.Field(alias=str("projectRids")) # type: ignore[literal-required] - type: typing.Literal["project"] = "project" - - -ReplaceScheduleRequestScopeMode = typing_extensions.Annotated[ - typing.Union["ReplaceScheduleRequestProjectScope", "ReplaceScheduleRequestUserScope"], - pydantic.Field(discriminator="type"), -] -"""The boundaries for the schedule build.""" - - -class ReplaceScheduleRequestUpstreamTarget(core.ModelBase): - """ReplaceScheduleRequestUpstreamTarget""" - - ignored_rids: typing.Optional[typing.List[BuildableRid]] = pydantic.Field(alias=str("ignoredRids"), default=None) # type: ignore[literal-required] - """The datasets to ignore when calculating the final set of dataset to build.""" - - target_rids: typing.List[BuildableRid] = pydantic.Field(alias=str("targetRids")) # type: ignore[literal-required] - """The target datasets.""" - - type: typing.Literal["upstream"] = "upstream" - - -class ReplaceScheduleRequestUserScope(core.ModelBase): - """ReplaceScheduleRequestUserScope""" - - type: typing.Literal["user"] = "user" - - -RetryCount = int -""" -The number of retry attempts for failed Jobs within the Build. A Job's failure is not considered final until -all retries have been attempted or an error occurs indicating that retries cannot be performed. Be aware, -not all types of failures can be retried. -""" - - -class Schedule(core.ModelBase): - """Schedule""" - - rid: core_models.ScheduleRid - display_name: typing.Optional[str] = pydantic.Field(alias=str("displayName"), default=None) # type: ignore[literal-required] - description: typing.Optional[str] = None - current_version_rid: ScheduleVersionRid = pydantic.Field(alias=str("currentVersionRid")) # type: ignore[literal-required] - """The RID of the current schedule version""" - - created_time: core_models.CreatedTime = pydantic.Field(alias=str("createdTime")) # type: ignore[literal-required] - created_by: core_models.CreatedBy = pydantic.Field(alias=str("createdBy")) # type: ignore[literal-required] - updated_time: core_models.UpdatedTime = pydantic.Field(alias=str("updatedTime")) # type: ignore[literal-required] - updated_by: core_models.UpdatedBy = pydantic.Field(alias=str("updatedBy")) # type: ignore[literal-required] - paused: SchedulePaused - trigger: typing.Optional[Trigger] = None - """ - The schedule trigger. If the requesting user does not have - permission to see the trigger, this will be empty. - """ - - action: Action - scope_mode: ScopeMode = pydantic.Field(alias=str("scopeMode")) # type: ignore[literal-required] - - -SchedulePaused = bool -"""SchedulePaused""" - - -class ScheduleRun(core.ModelBase): - """ScheduleRun""" - - rid: ScheduleRunRid - """The RID of a schedule run""" - - schedule_rid: core_models.ScheduleRid = pydantic.Field(alias=str("scheduleRid")) # type: ignore[literal-required] - schedule_version_rid: ScheduleVersionRid = pydantic.Field(alias=str("scheduleVersionRid")) # type: ignore[literal-required] - created_time: core_models.CreatedTime = pydantic.Field(alias=str("createdTime")) # type: ignore[literal-required] - """The time at which the schedule run was created.""" - - created_by: typing.Optional[core_models.CreatedBy] = pydantic.Field(alias=str("createdBy"), default=None) # type: ignore[literal-required] - """ - The Foundry user who manually invoked this schedule run. Automatic trigger runs have this field set to - empty. - """ - - result: typing.Optional[ScheduleRunResult] = None - """ - The result of triggering the schedule. If empty, it means the service - is still working on triggering the schedule. - """ - - -class ScheduleRunError(core.ModelBase): - """An error occurred attempting to run the schedule.""" - - error_name: ScheduleRunErrorName = pydantic.Field(alias=str("errorName")) # type: ignore[literal-required] - description: str - type: typing.Literal["error"] = "error" - - -ScheduleRunErrorName = typing.Literal[ - "TargetResolutionFailure", - "CyclicDependency", - "IncompatibleTargets", - "PermissionDenied", - "JobSpecNotFound", - "ScheduleOwnerNotFound", - "Internal", -] -"""ScheduleRunErrorName""" - - -class ScheduleRunIgnored(core.ModelBase): - """The schedule is not running as all targets are up-to-date.""" - - type: typing.Literal["ignored"] = "ignored" - - -ScheduleRunResult = typing_extensions.Annotated[ - typing.Union["ScheduleRunIgnored", "ScheduleRunSubmitted", "ScheduleRunError"], - pydantic.Field(discriminator="type"), -] -""" -The result of attempting to trigger the schedule. The schedule run will either be submitted as a build, -ignored if all targets are up-to-date or error. -""" - - -ScheduleRunRid = core.RID -"""The RID of a schedule run""" - - -class ScheduleRunSubmitted(core.ModelBase): - """The schedule has been successfully triggered.""" - - build_rid: core_models.BuildRid = pydantic.Field(alias=str("buildRid")) # type: ignore[literal-required] - type: typing.Literal["submitted"] = "submitted" - - -class ScheduleSucceededTrigger(core.ModelBase): - """ - Trigger whenever the specified schedule completes its action - successfully. - """ - - schedule_rid: core_models.ScheduleRid = pydantic.Field(alias=str("scheduleRid")) # type: ignore[literal-required] - type: typing.Literal["scheduleSucceeded"] = "scheduleSucceeded" - - -class ScheduleVersion(core.ModelBase): - """ScheduleVersion""" - - rid: ScheduleVersionRid - """The RID of a schedule version""" - - schedule_rid: core_models.ScheduleRid = pydantic.Field(alias=str("scheduleRid")) # type: ignore[literal-required] - created_time: core_models.CreatedTime = pydantic.Field(alias=str("createdTime")) # type: ignore[literal-required] - """The time the schedule version was created""" - - created_by: core_models.CreatedBy = pydantic.Field(alias=str("createdBy")) # type: ignore[literal-required] - """The Foundry user who created the schedule version""" - - trigger: typing.Optional[Trigger] = None - action: Action - scope_mode: ScopeMode = pydantic.Field(alias=str("scopeMode")) # type: ignore[literal-required] - - -ScheduleVersionRid = core.RID -"""The RID of a schedule version""" - - -ScopeMode = typing_extensions.Annotated[ - typing.Union["ProjectScope", "UserScope"], pydantic.Field(discriminator="type") -] -"""The boundaries for the schedule build.""" - - -class SearchBuildsAndFilter(core.ModelBase): - """Returns the Builds where every filter is satisfied.""" - - items: typing.List[SearchBuildsFilter] - type: typing.Literal["and"] = "and" - - -class SearchBuildsEqualsFilter(core.ModelBase): - """SearchBuildsEqualsFilter""" - - field: SearchBuildsEqualsFilterField - value: typing.Any - type: typing.Literal["eq"] = "eq" - - -SearchBuildsEqualsFilterField = typing.Literal["CREATED_BY", "BRANCH_NAME", "STATUS", "RID"] -"""SearchBuildsEqualsFilterField""" - - -SearchBuildsFilter = typing_extensions.Annotated[ - typing.Union[ - "SearchBuildsNotFilter", - "SearchBuildsOrFilter", - "SearchBuildsAndFilter", - "SearchBuildsLtFilter", - "SearchBuildsGteFilter", - "SearchBuildsEqualsFilter", - ], - pydantic.Field(discriminator="type"), -] -"""SearchBuildsFilter""" - - -class SearchBuildsGteFilter(core.ModelBase): - """SearchBuildsGteFilter""" - - field: SearchBuildsGteFilterField - value: typing.Any - type: typing.Literal["gte"] = "gte" - - -SearchBuildsGteFilterField = typing.Literal["STARTED_TIME", "FINISHED_TIME"] -"""SearchBuildsGteFilterField""" - - -class SearchBuildsLtFilter(core.ModelBase): - """SearchBuildsLtFilter""" - - field: SearchBuildsLtFilterField - value: typing.Any - type: typing.Literal["lt"] = "lt" - - -SearchBuildsLtFilterField = typing.Literal["STARTED_TIME", "FINISHED_TIME"] -"""SearchBuildsLtFilterField""" - - -class SearchBuildsNotFilter(core.ModelBase): - """Returns the Builds where the filter is not satisfied.""" - - value: SearchBuildsFilter - type: typing.Literal["not"] = "not" - - -class SearchBuildsOrFilter(core.ModelBase): - """Returns the Builds where at least one filter is satisfied.""" - - items: typing.List[SearchBuildsFilter] - type: typing.Literal["or"] = "or" - - -class SearchBuildsOrderBy(core.ModelBase): - """SearchBuildsOrderBy""" - - fields: typing.List[SearchBuildsOrderByItem] - - -SearchBuildsOrderByField = typing.Literal["STARTED_TIME", "FINISHED_TIME"] -"""SearchBuildsOrderByField""" - - -class SearchBuildsOrderByItem(core.ModelBase): - """SearchBuildsOrderByItem""" - - field: SearchBuildsOrderByField - direction: core_models.OrderByDirection - - -class SearchBuildsRequest(core.ModelBase): - """SearchBuildsRequest""" - - where: SearchBuildsFilter - order_by: typing.Optional[SearchBuildsOrderBy] = pydantic.Field(alias=str("orderBy"), default=None) # type: ignore[literal-required] - page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("pageToken"), default=None) # type: ignore[literal-required] - page_size: typing.Optional[core_models.PageSize] = pydantic.Field(alias=str("pageSize"), default=None) # type: ignore[literal-required] - """The page size for the search request. If no value is provided, a default of `100` will be used.""" - - -class SearchBuildsResponse(core.ModelBase): - """SearchBuildsResponse""" - - data: typing.List[Build] - next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] - - -class TableUpdatedTrigger(core.ModelBase): - """ - Trigger whenever a new transaction is committed to the - table on the target branch. - """ - - table_rid: core_models.TableRid = pydantic.Field(alias=str("tableRid")) # type: ignore[literal-required] - branch_name: datasets_models.BranchName = pydantic.Field(alias=str("branchName")) # type: ignore[literal-required] - type: typing.Literal["tableUpdated"] = "tableUpdated" - - -class TimeTrigger(core.ModelBase): - """Trigger on a time based schedule.""" - - cron_expression: CronExpression = pydantic.Field(alias=str("cronExpression")) # type: ignore[literal-required] - time_zone: core_models.ZoneId = pydantic.Field(alias=str("timeZone")) # type: ignore[literal-required] - type: typing.Literal["time"] = "time" - - -class TransactionalMediaSetJobOutput(core.ModelBase): - """TransactionalMediaSetJobOutput""" - - media_set_rid: core_models.MediaSetRid = pydantic.Field(alias=str("mediaSetRid")) # type: ignore[literal-required] - transaction_id: typing.Optional[str] = pydantic.Field(alias=str("transactionId"), default=None) # type: ignore[literal-required] - type: typing.Literal["transactionalMediaSetJobOutput"] = "transactionalMediaSetJobOutput" - - -Trigger = typing_extensions.Annotated[ - typing.Union[ - "JobSucceededTrigger", - "OrTrigger", - "NewLogicTrigger", - "TableUpdatedTrigger", - "AndTrigger", - "DatasetUpdatedTrigger", - "ScheduleSucceededTrigger", - "MediaSetUpdatedTrigger", - "TimeTrigger", - "ManualTrigger", - ], - pydantic.Field(discriminator="type"), -] -"""Trigger""" - - -class UpstreamTarget(core.ModelBase): - """Target the specified datasets along with all upstream datasets except the ignored datasets.""" - - target_rids: typing.List[BuildableRid] = pydantic.Field(alias=str("targetRids")) # type: ignore[literal-required] - """The target datasets.""" - - ignored_rids: typing.List[BuildableRid] = pydantic.Field(alias=str("ignoredRids")) # type: ignore[literal-required] - """The datasets to ignore when calculating the final set of dataset to build.""" - - type: typing.Literal["upstream"] = "upstream" - - -class UserScope(core.ModelBase): - """ - When triggered, the schedule will build all resources that the - associated user is permitted to build. - """ - - type: typing.Literal["user"] = "user" - - -RetryBackoffDuration = core_models.Duration -"""The duration to wait before retrying after a Job fails.""" - - -core.resolve_forward_references(BuildTarget, globalns=globals(), localns=locals()) -core.resolve_forward_references( - CreateScheduleRequestBuildTarget, globalns=globals(), localns=locals() -) -core.resolve_forward_references( - CreateScheduleRequestScopeMode, globalns=globals(), localns=locals() -) -core.resolve_forward_references(FallbackBranches, globalns=globals(), localns=locals()) -core.resolve_forward_references(JobOutput, globalns=globals(), localns=locals()) -core.resolve_forward_references( - ReplaceScheduleRequestBuildTarget, globalns=globals(), localns=locals() -) -core.resolve_forward_references( - ReplaceScheduleRequestScopeMode, globalns=globals(), localns=locals() -) -core.resolve_forward_references(ScheduleRunResult, globalns=globals(), localns=locals()) -core.resolve_forward_references(ScopeMode, globalns=globals(), localns=locals()) -core.resolve_forward_references(SearchBuildsFilter, globalns=globals(), localns=locals()) -core.resolve_forward_references(Trigger, globalns=globals(), localns=locals()) - -__all__ = [ - "AbortOnFailure", - "Action", - "AffectedResourcesResponse", - "AndTrigger", - "Build", - "BuildStatus", - "BuildTarget", - "BuildableRid", - "ConnectingTarget", - "CreateBuildRequest", - "CreateScheduleRequest", - "CreateScheduleRequestAction", - "CreateScheduleRequestBuildTarget", - "CreateScheduleRequestConnectingTarget", - "CreateScheduleRequestManualTarget", - "CreateScheduleRequestProjectScope", - "CreateScheduleRequestScopeMode", - "CreateScheduleRequestUpstreamTarget", - "CreateScheduleRequestUserScope", - "CronExpression", - "DatasetJobOutput", - "DatasetUpdatedTrigger", - "FallbackBranches", - "ForceBuild", - "GetBuildsBatchRequestElement", - "GetBuildsBatchResponse", - "GetJobsBatchRequestElement", - "GetJobsBatchResponse", - "GetSchedulesBatchRequestElement", - "GetSchedulesBatchResponse", - "Job", - "JobOutput", - "JobStartedTime", - "JobStatus", - "JobSucceededTrigger", - "ListJobsOfBuildResponse", - "ListRunsOfScheduleResponse", - "ManualTarget", - "ManualTrigger", - "MediaSetUpdatedTrigger", - "NewLogicTrigger", - "NotificationsEnabled", - "OrTrigger", - "ProjectScope", - "ReplaceScheduleRequest", - "ReplaceScheduleRequestAction", - "ReplaceScheduleRequestBuildTarget", - "ReplaceScheduleRequestConnectingTarget", - "ReplaceScheduleRequestManualTarget", - "ReplaceScheduleRequestProjectScope", - "ReplaceScheduleRequestScopeMode", - "ReplaceScheduleRequestUpstreamTarget", - "ReplaceScheduleRequestUserScope", - "RetryBackoffDuration", - "RetryCount", - "Schedule", - "SchedulePaused", - "ScheduleRun", - "ScheduleRunError", - "ScheduleRunErrorName", - "ScheduleRunIgnored", - "ScheduleRunResult", - "ScheduleRunRid", - "ScheduleRunSubmitted", - "ScheduleSucceededTrigger", - "ScheduleVersion", - "ScheduleVersionRid", - "ScopeMode", - "SearchBuildsAndFilter", - "SearchBuildsEqualsFilter", - "SearchBuildsEqualsFilterField", - "SearchBuildsFilter", - "SearchBuildsGteFilter", - "SearchBuildsGteFilterField", - "SearchBuildsLtFilter", - "SearchBuildsLtFilterField", - "SearchBuildsNotFilter", - "SearchBuildsOrFilter", - "SearchBuildsOrderBy", - "SearchBuildsOrderByField", - "SearchBuildsOrderByItem", - "SearchBuildsRequest", - "SearchBuildsResponse", - "TableUpdatedTrigger", - "TimeTrigger", - "TransactionalMediaSetJobOutput", - "Trigger", - "UpstreamTarget", - "UserScope", -] diff --git a/foundry_sdk/v2/orchestration/schedule.py b/foundry_sdk/v2/orchestration/schedule.py deleted file mode 100644 index be6754233..000000000 --- a/foundry_sdk/v2/orchestration/schedule.py +++ /dev/null @@ -1,1162 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing - -import annotated_types -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v2.core import models as core_models -from foundry_sdk.v2.orchestration import errors as orchestration_errors -from foundry_sdk.v2.orchestration import models as orchestration_models - - -class ScheduleClient: - """ - The API client for the Schedule Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _ScheduleClientStreaming(self) - self.with_raw_response = _ScheduleClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def create( - self, - *, - action: orchestration_models.CreateScheduleRequestAction, - description: typing.Optional[str] = None, - display_name: typing.Optional[str] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - scope_mode: typing.Optional[orchestration_models.CreateScheduleRequestScopeMode] = None, - trigger: typing.Optional[orchestration_models.Trigger] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> orchestration_models.Schedule: - """ - Creates a new Schedule. - :param action: - :type action: CreateScheduleRequestAction - :param description: - :type description: Optional[str] - :param display_name: - :type display_name: Optional[str] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param scope_mode: - :type scope_mode: Optional[CreateScheduleRequestScopeMode] - :param trigger: The schedule trigger. If the requesting user does not have permission to see the trigger, this will be empty. - :type trigger: Optional[Trigger] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: orchestration_models.Schedule - - :raises CreateSchedulePermissionDenied: Could not create the Schedule. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/orchestration/schedules", - query_params={ - "preview": preview, - }, - path_params={}, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=orchestration_models.CreateScheduleRequest( - display_name=display_name, - description=description, - action=action, - trigger=trigger, - scope_mode=scope_mode, - ), - response_type=orchestration_models.Schedule, - request_timeout=request_timeout, - throwable_errors={ - "CreateSchedulePermissionDenied": orchestration_errors.CreateSchedulePermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def delete( - self, - schedule_rid: core_models.ScheduleRid, - *, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> None: - """ - Delete the Schedule with the specified rid. - :param schedule_rid: - :type schedule_rid: ScheduleRid - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: None - - :raises DeleteSchedulePermissionDenied: Could not delete the Schedule. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="DELETE", - resource_path="/v2/orchestration/schedules/{scheduleRid}", - query_params={}, - path_params={ - "scheduleRid": schedule_rid, - }, - header_params={}, - body=None, - response_type=None, - request_timeout=request_timeout, - throwable_errors={ - "DeleteSchedulePermissionDenied": orchestration_errors.DeleteSchedulePermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - schedule_rid: core_models.ScheduleRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> orchestration_models.Schedule: - """ - Get the Schedule with the specified rid. - :param schedule_rid: - :type schedule_rid: ScheduleRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: orchestration_models.Schedule - - :raises ScheduleNotFound: The given Schedule could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/orchestration/schedules/{scheduleRid}", - query_params={ - "preview": preview, - }, - path_params={ - "scheduleRid": schedule_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=orchestration_models.Schedule, - request_timeout=request_timeout, - throwable_errors={ - "ScheduleNotFound": orchestration_errors.ScheduleNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get_affected_resources( - self, - schedule_rid: core_models.ScheduleRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> orchestration_models.AffectedResourcesResponse: - """ - - :param schedule_rid: - :type schedule_rid: ScheduleRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: orchestration_models.AffectedResourcesResponse - - :raises GetAffectedResourcesSchedulePermissionDenied: Could not getAffectedResources the Schedule. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/orchestration/schedules/{scheduleRid}/getAffectedResources", - query_params={ - "preview": preview, - }, - path_params={ - "scheduleRid": schedule_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=orchestration_models.AffectedResourcesResponse, - request_timeout=request_timeout, - throwable_errors={ - "GetAffectedResourcesSchedulePermissionDenied": orchestration_errors.GetAffectedResourcesSchedulePermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get_batch( - self, - body: typing_extensions.Annotated[ - typing.List[orchestration_models.GetSchedulesBatchRequestElement], - annotated_types.Len(min_length=1, max_length=1000), - ], - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> orchestration_models.GetSchedulesBatchResponse: - """ - Fetch multiple schedules in a single request. Schedules not found or inaccessible to the user will be - omitted from the response. - - - The maximum batch size for this endpoint is 1000. - :param body: Body of the request - :type body: List[GetSchedulesBatchRequestElement] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: orchestration_models.GetSchedulesBatchResponse - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/orchestration/schedules/getBatch", - query_params={ - "preview": preview, - }, - path_params={}, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=body, - response_type=orchestration_models.GetSchedulesBatchResponse, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def pause( - self, - schedule_rid: core_models.ScheduleRid, - *, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> None: - """ - - :param schedule_rid: - :type schedule_rid: ScheduleRid - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: None - - :raises PauseSchedulePermissionDenied: Could not pause the Schedule. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/orchestration/schedules/{scheduleRid}/pause", - query_params={}, - path_params={ - "scheduleRid": schedule_rid, - }, - header_params={}, - body=None, - response_type=None, - request_timeout=request_timeout, - throwable_errors={ - "PauseSchedulePermissionDenied": orchestration_errors.PauseSchedulePermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def replace( - self, - schedule_rid: core_models.ScheduleRid, - *, - action: orchestration_models.ReplaceScheduleRequestAction, - description: typing.Optional[str] = None, - display_name: typing.Optional[str] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - scope_mode: typing.Optional[orchestration_models.ReplaceScheduleRequestScopeMode] = None, - trigger: typing.Optional[orchestration_models.Trigger] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> orchestration_models.Schedule: - """ - Replace the Schedule with the specified rid. - :param schedule_rid: - :type schedule_rid: ScheduleRid - :param action: - :type action: ReplaceScheduleRequestAction - :param description: - :type description: Optional[str] - :param display_name: - :type display_name: Optional[str] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param scope_mode: - :type scope_mode: Optional[ReplaceScheduleRequestScopeMode] - :param trigger: The schedule trigger. If the requesting user does not have permission to see the trigger, this will be empty. - :type trigger: Optional[Trigger] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: orchestration_models.Schedule - - :raises ReplaceSchedulePermissionDenied: Could not replace the Schedule. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="PUT", - resource_path="/v2/orchestration/schedules/{scheduleRid}", - query_params={ - "preview": preview, - }, - path_params={ - "scheduleRid": schedule_rid, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=orchestration_models.ReplaceScheduleRequest( - display_name=display_name, - description=description, - action=action, - trigger=trigger, - scope_mode=scope_mode, - ), - response_type=orchestration_models.Schedule, - request_timeout=request_timeout, - throwable_errors={ - "ReplaceSchedulePermissionDenied": orchestration_errors.ReplaceSchedulePermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def run( - self, - schedule_rid: core_models.ScheduleRid, - *, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> orchestration_models.ScheduleRun: - """ - - :param schedule_rid: - :type schedule_rid: ScheduleRid - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: orchestration_models.ScheduleRun - - :raises RunSchedulePermissionDenied: Could not run the Schedule. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/orchestration/schedules/{scheduleRid}/run", - query_params={}, - path_params={ - "scheduleRid": schedule_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=orchestration_models.ScheduleRun, - request_timeout=request_timeout, - throwable_errors={ - "RunSchedulePermissionDenied": orchestration_errors.RunSchedulePermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def runs( - self, - schedule_rid: core_models.ScheduleRid, - *, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.ResourceIterator[orchestration_models.ScheduleRun]: - """ - Get the most recent runs of a Schedule. If no page size is provided, a page size of 100 will be used. - - :param schedule_rid: - :type schedule_rid: ScheduleRid - :param page_size: The page size to use for the endpoint. - :type page_size: Optional[PageSize] - :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. - :type page_token: Optional[PageToken] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.ResourceIterator[orchestration_models.ScheduleRun] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/orchestration/schedules/{scheduleRid}/runs", - query_params={ - "pageSize": page_size, - "pageToken": page_token, - }, - path_params={ - "scheduleRid": schedule_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=orchestration_models.ListRunsOfScheduleResponse, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def unpause( - self, - schedule_rid: core_models.ScheduleRid, - *, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> None: - """ - - :param schedule_rid: - :type schedule_rid: ScheduleRid - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: None - - :raises UnpauseSchedulePermissionDenied: Could not unpause the Schedule. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/orchestration/schedules/{scheduleRid}/unpause", - query_params={}, - path_params={ - "scheduleRid": schedule_rid, - }, - header_params={}, - body=None, - response_type=None, - request_timeout=request_timeout, - throwable_errors={ - "UnpauseSchedulePermissionDenied": orchestration_errors.UnpauseSchedulePermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _ScheduleClientRaw: - def __init__(self, client: ScheduleClient) -> None: - def create(_: orchestration_models.Schedule): ... - def delete(_: None): ... - def get(_: orchestration_models.Schedule): ... - def get_affected_resources(_: orchestration_models.AffectedResourcesResponse): ... - def get_batch(_: orchestration_models.GetSchedulesBatchResponse): ... - def pause(_: None): ... - def replace(_: orchestration_models.Schedule): ... - def run(_: orchestration_models.ScheduleRun): ... - def runs(_: orchestration_models.ListRunsOfScheduleResponse): ... - def unpause(_: None): ... - - self.create = core.with_raw_response(create, client.create) - self.delete = core.with_raw_response(delete, client.delete) - self.get = core.with_raw_response(get, client.get) - self.get_affected_resources = core.with_raw_response( - get_affected_resources, client.get_affected_resources - ) - self.get_batch = core.with_raw_response(get_batch, client.get_batch) - self.pause = core.with_raw_response(pause, client.pause) - self.replace = core.with_raw_response(replace, client.replace) - self.run = core.with_raw_response(run, client.run) - self.runs = core.with_raw_response(runs, client.runs) - self.unpause = core.with_raw_response(unpause, client.unpause) - - -class _ScheduleClientStreaming: - def __init__(self, client: ScheduleClient) -> None: - def create(_: orchestration_models.Schedule): ... - def get(_: orchestration_models.Schedule): ... - def get_affected_resources(_: orchestration_models.AffectedResourcesResponse): ... - def get_batch(_: orchestration_models.GetSchedulesBatchResponse): ... - def replace(_: orchestration_models.Schedule): ... - def run(_: orchestration_models.ScheduleRun): ... - def runs(_: orchestration_models.ListRunsOfScheduleResponse): ... - - self.create = core.with_streaming_response(create, client.create) - self.get = core.with_streaming_response(get, client.get) - self.get_affected_resources = core.with_streaming_response( - get_affected_resources, client.get_affected_resources - ) - self.get_batch = core.with_streaming_response(get_batch, client.get_batch) - self.replace = core.with_streaming_response(replace, client.replace) - self.run = core.with_streaming_response(run, client.run) - self.runs = core.with_streaming_response(runs, client.runs) - - -class AsyncScheduleClient: - """ - The API client for the Schedule Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AsyncScheduleClientStreaming(self) - self.with_raw_response = _AsyncScheduleClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def create( - self, - *, - action: orchestration_models.CreateScheduleRequestAction, - description: typing.Optional[str] = None, - display_name: typing.Optional[str] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - scope_mode: typing.Optional[orchestration_models.CreateScheduleRequestScopeMode] = None, - trigger: typing.Optional[orchestration_models.Trigger] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[orchestration_models.Schedule]: - """ - Creates a new Schedule. - :param action: - :type action: CreateScheduleRequestAction - :param description: - :type description: Optional[str] - :param display_name: - :type display_name: Optional[str] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param scope_mode: - :type scope_mode: Optional[CreateScheduleRequestScopeMode] - :param trigger: The schedule trigger. If the requesting user does not have permission to see the trigger, this will be empty. - :type trigger: Optional[Trigger] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[orchestration_models.Schedule] - - :raises CreateSchedulePermissionDenied: Could not create the Schedule. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/orchestration/schedules", - query_params={ - "preview": preview, - }, - path_params={}, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=orchestration_models.CreateScheduleRequest( - display_name=display_name, - description=description, - action=action, - trigger=trigger, - scope_mode=scope_mode, - ), - response_type=orchestration_models.Schedule, - request_timeout=request_timeout, - throwable_errors={ - "CreateSchedulePermissionDenied": orchestration_errors.CreateSchedulePermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def delete( - self, - schedule_rid: core_models.ScheduleRid, - *, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[None]: - """ - Delete the Schedule with the specified rid. - :param schedule_rid: - :type schedule_rid: ScheduleRid - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[None] - - :raises DeleteSchedulePermissionDenied: Could not delete the Schedule. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="DELETE", - resource_path="/v2/orchestration/schedules/{scheduleRid}", - query_params={}, - path_params={ - "scheduleRid": schedule_rid, - }, - header_params={}, - body=None, - response_type=None, - request_timeout=request_timeout, - throwable_errors={ - "DeleteSchedulePermissionDenied": orchestration_errors.DeleteSchedulePermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - schedule_rid: core_models.ScheduleRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[orchestration_models.Schedule]: - """ - Get the Schedule with the specified rid. - :param schedule_rid: - :type schedule_rid: ScheduleRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[orchestration_models.Schedule] - - :raises ScheduleNotFound: The given Schedule could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/orchestration/schedules/{scheduleRid}", - query_params={ - "preview": preview, - }, - path_params={ - "scheduleRid": schedule_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=orchestration_models.Schedule, - request_timeout=request_timeout, - throwable_errors={ - "ScheduleNotFound": orchestration_errors.ScheduleNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get_affected_resources( - self, - schedule_rid: core_models.ScheduleRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[orchestration_models.AffectedResourcesResponse]: - """ - - :param schedule_rid: - :type schedule_rid: ScheduleRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[orchestration_models.AffectedResourcesResponse] - - :raises GetAffectedResourcesSchedulePermissionDenied: Could not getAffectedResources the Schedule. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/orchestration/schedules/{scheduleRid}/getAffectedResources", - query_params={ - "preview": preview, - }, - path_params={ - "scheduleRid": schedule_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=orchestration_models.AffectedResourcesResponse, - request_timeout=request_timeout, - throwable_errors={ - "GetAffectedResourcesSchedulePermissionDenied": orchestration_errors.GetAffectedResourcesSchedulePermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get_batch( - self, - body: typing_extensions.Annotated[ - typing.List[orchestration_models.GetSchedulesBatchRequestElement], - annotated_types.Len(min_length=1, max_length=1000), - ], - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[orchestration_models.GetSchedulesBatchResponse]: - """ - Fetch multiple schedules in a single request. Schedules not found or inaccessible to the user will be - omitted from the response. - - - The maximum batch size for this endpoint is 1000. - :param body: Body of the request - :type body: List[GetSchedulesBatchRequestElement] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[orchestration_models.GetSchedulesBatchResponse] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/orchestration/schedules/getBatch", - query_params={ - "preview": preview, - }, - path_params={}, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=body, - response_type=orchestration_models.GetSchedulesBatchResponse, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def pause( - self, - schedule_rid: core_models.ScheduleRid, - *, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[None]: - """ - - :param schedule_rid: - :type schedule_rid: ScheduleRid - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[None] - - :raises PauseSchedulePermissionDenied: Could not pause the Schedule. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/orchestration/schedules/{scheduleRid}/pause", - query_params={}, - path_params={ - "scheduleRid": schedule_rid, - }, - header_params={}, - body=None, - response_type=None, - request_timeout=request_timeout, - throwable_errors={ - "PauseSchedulePermissionDenied": orchestration_errors.PauseSchedulePermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def replace( - self, - schedule_rid: core_models.ScheduleRid, - *, - action: orchestration_models.ReplaceScheduleRequestAction, - description: typing.Optional[str] = None, - display_name: typing.Optional[str] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - scope_mode: typing.Optional[orchestration_models.ReplaceScheduleRequestScopeMode] = None, - trigger: typing.Optional[orchestration_models.Trigger] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[orchestration_models.Schedule]: - """ - Replace the Schedule with the specified rid. - :param schedule_rid: - :type schedule_rid: ScheduleRid - :param action: - :type action: ReplaceScheduleRequestAction - :param description: - :type description: Optional[str] - :param display_name: - :type display_name: Optional[str] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param scope_mode: - :type scope_mode: Optional[ReplaceScheduleRequestScopeMode] - :param trigger: The schedule trigger. If the requesting user does not have permission to see the trigger, this will be empty. - :type trigger: Optional[Trigger] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[orchestration_models.Schedule] - - :raises ReplaceSchedulePermissionDenied: Could not replace the Schedule. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="PUT", - resource_path="/v2/orchestration/schedules/{scheduleRid}", - query_params={ - "preview": preview, - }, - path_params={ - "scheduleRid": schedule_rid, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=orchestration_models.ReplaceScheduleRequest( - display_name=display_name, - description=description, - action=action, - trigger=trigger, - scope_mode=scope_mode, - ), - response_type=orchestration_models.Schedule, - request_timeout=request_timeout, - throwable_errors={ - "ReplaceSchedulePermissionDenied": orchestration_errors.ReplaceSchedulePermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def run( - self, - schedule_rid: core_models.ScheduleRid, - *, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[orchestration_models.ScheduleRun]: - """ - - :param schedule_rid: - :type schedule_rid: ScheduleRid - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[orchestration_models.ScheduleRun] - - :raises RunSchedulePermissionDenied: Could not run the Schedule. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/orchestration/schedules/{scheduleRid}/run", - query_params={}, - path_params={ - "scheduleRid": schedule_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=orchestration_models.ScheduleRun, - request_timeout=request_timeout, - throwable_errors={ - "RunSchedulePermissionDenied": orchestration_errors.RunSchedulePermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def runs( - self, - schedule_rid: core_models.ScheduleRid, - *, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.AsyncResourceIterator[orchestration_models.ScheduleRun]: - """ - Get the most recent runs of a Schedule. If no page size is provided, a page size of 100 will be used. - - :param schedule_rid: - :type schedule_rid: ScheduleRid - :param page_size: The page size to use for the endpoint. - :type page_size: Optional[PageSize] - :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. - :type page_token: Optional[PageToken] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.AsyncResourceIterator[orchestration_models.ScheduleRun] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/orchestration/schedules/{scheduleRid}/runs", - query_params={ - "pageSize": page_size, - "pageToken": page_token, - }, - path_params={ - "scheduleRid": schedule_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=orchestration_models.ListRunsOfScheduleResponse, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def unpause( - self, - schedule_rid: core_models.ScheduleRid, - *, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[None]: - """ - - :param schedule_rid: - :type schedule_rid: ScheduleRid - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[None] - - :raises UnpauseSchedulePermissionDenied: Could not unpause the Schedule. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/orchestration/schedules/{scheduleRid}/unpause", - query_params={}, - path_params={ - "scheduleRid": schedule_rid, - }, - header_params={}, - body=None, - response_type=None, - request_timeout=request_timeout, - throwable_errors={ - "UnpauseSchedulePermissionDenied": orchestration_errors.UnpauseSchedulePermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _AsyncScheduleClientRaw: - def __init__(self, client: AsyncScheduleClient) -> None: - def create(_: orchestration_models.Schedule): ... - def delete(_: None): ... - def get(_: orchestration_models.Schedule): ... - def get_affected_resources(_: orchestration_models.AffectedResourcesResponse): ... - def get_batch(_: orchestration_models.GetSchedulesBatchResponse): ... - def pause(_: None): ... - def replace(_: orchestration_models.Schedule): ... - def run(_: orchestration_models.ScheduleRun): ... - def runs(_: orchestration_models.ListRunsOfScheduleResponse): ... - def unpause(_: None): ... - - self.create = core.async_with_raw_response(create, client.create) - self.delete = core.async_with_raw_response(delete, client.delete) - self.get = core.async_with_raw_response(get, client.get) - self.get_affected_resources = core.async_with_raw_response( - get_affected_resources, client.get_affected_resources - ) - self.get_batch = core.async_with_raw_response(get_batch, client.get_batch) - self.pause = core.async_with_raw_response(pause, client.pause) - self.replace = core.async_with_raw_response(replace, client.replace) - self.run = core.async_with_raw_response(run, client.run) - self.runs = core.async_with_raw_response(runs, client.runs) - self.unpause = core.async_with_raw_response(unpause, client.unpause) - - -class _AsyncScheduleClientStreaming: - def __init__(self, client: AsyncScheduleClient) -> None: - def create(_: orchestration_models.Schedule): ... - def get(_: orchestration_models.Schedule): ... - def get_affected_resources(_: orchestration_models.AffectedResourcesResponse): ... - def get_batch(_: orchestration_models.GetSchedulesBatchResponse): ... - def replace(_: orchestration_models.Schedule): ... - def run(_: orchestration_models.ScheduleRun): ... - def runs(_: orchestration_models.ListRunsOfScheduleResponse): ... - - self.create = core.async_with_streaming_response(create, client.create) - self.get = core.async_with_streaming_response(get, client.get) - self.get_affected_resources = core.async_with_streaming_response( - get_affected_resources, client.get_affected_resources - ) - self.get_batch = core.async_with_streaming_response(get_batch, client.get_batch) - self.replace = core.async_with_streaming_response(replace, client.replace) - self.run = core.async_with_streaming_response(run, client.run) - self.runs = core.async_with_streaming_response(runs, client.runs) diff --git a/foundry_sdk/v2/orchestration/schedule_run.py b/foundry_sdk/v2/orchestration/schedule_run.py deleted file mode 100644 index fe4bed026..000000000 --- a/foundry_sdk/v2/orchestration/schedule_run.py +++ /dev/null @@ -1,90 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing - -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors - - -class ScheduleRunClient: - """ - The API client for the ScheduleRun Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _ScheduleRunClientStreaming(self) - self.with_raw_response = _ScheduleRunClientRaw(self) - - -class _ScheduleRunClientRaw: - def __init__(self, client: ScheduleRunClient) -> None: - pass - - -class _ScheduleRunClientStreaming: - def __init__(self, client: ScheduleRunClient) -> None: - pass - - -class AsyncScheduleRunClient: - """ - The API client for the ScheduleRun Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AsyncScheduleRunClientStreaming(self) - self.with_raw_response = _AsyncScheduleRunClientRaw(self) - - -class _AsyncScheduleRunClientRaw: - def __init__(self, client: AsyncScheduleRunClient) -> None: - pass - - -class _AsyncScheduleRunClientStreaming: - def __init__(self, client: AsyncScheduleRunClient) -> None: - pass diff --git a/foundry_sdk/v2/orchestration/schedule_version.py b/foundry_sdk/v2/orchestration/schedule_version.py deleted file mode 100644 index 2f39e20bd..000000000 --- a/foundry_sdk/v2/orchestration/schedule_version.py +++ /dev/null @@ -1,293 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing - -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v2.core import models as core_models -from foundry_sdk.v2.orchestration import errors as orchestration_errors -from foundry_sdk.v2.orchestration import models as orchestration_models - - -class ScheduleVersionClient: - """ - The API client for the ScheduleVersion Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _ScheduleVersionClientStreaming(self) - self.with_raw_response = _ScheduleVersionClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - schedule_version_rid: orchestration_models.ScheduleVersionRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> orchestration_models.ScheduleVersion: - """ - Get the ScheduleVersion with the specified rid. - :param schedule_version_rid: The RID of a schedule version - :type schedule_version_rid: ScheduleVersionRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: orchestration_models.ScheduleVersion - - :raises ScheduleVersionNotFound: The given ScheduleVersion could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/orchestration/scheduleVersions/{scheduleVersionRid}", - query_params={ - "preview": preview, - }, - path_params={ - "scheduleVersionRid": schedule_version_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=orchestration_models.ScheduleVersion, - request_timeout=request_timeout, - throwable_errors={ - "ScheduleVersionNotFound": orchestration_errors.ScheduleVersionNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def schedule( - self, - schedule_version_rid: orchestration_models.ScheduleVersionRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Optional[orchestration_models.Schedule]: - """ - - :param schedule_version_rid: The RID of a schedule version - :type schedule_version_rid: ScheduleVersionRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Optional[orchestration_models.Schedule] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/orchestration/scheduleVersions/{scheduleVersionRid}/schedule", - query_params={ - "preview": preview, - }, - path_params={ - "scheduleVersionRid": schedule_version_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=typing.Optional[orchestration_models.Schedule], - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _ScheduleVersionClientRaw: - def __init__(self, client: ScheduleVersionClient) -> None: - def get(_: orchestration_models.ScheduleVersion): ... - def schedule(_: typing.Optional[orchestration_models.Schedule]): ... - - self.get = core.with_raw_response(get, client.get) - self.schedule = core.with_raw_response(schedule, client.schedule) - - -class _ScheduleVersionClientStreaming: - def __init__(self, client: ScheduleVersionClient) -> None: - def get(_: orchestration_models.ScheduleVersion): ... - def schedule(_: typing.Optional[orchestration_models.Schedule]): ... - - self.get = core.with_streaming_response(get, client.get) - self.schedule = core.with_streaming_response(schedule, client.schedule) - - -class AsyncScheduleVersionClient: - """ - The API client for the ScheduleVersion Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AsyncScheduleVersionClientStreaming(self) - self.with_raw_response = _AsyncScheduleVersionClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - schedule_version_rid: orchestration_models.ScheduleVersionRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[orchestration_models.ScheduleVersion]: - """ - Get the ScheduleVersion with the specified rid. - :param schedule_version_rid: The RID of a schedule version - :type schedule_version_rid: ScheduleVersionRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[orchestration_models.ScheduleVersion] - - :raises ScheduleVersionNotFound: The given ScheduleVersion could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/orchestration/scheduleVersions/{scheduleVersionRid}", - query_params={ - "preview": preview, - }, - path_params={ - "scheduleVersionRid": schedule_version_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=orchestration_models.ScheduleVersion, - request_timeout=request_timeout, - throwable_errors={ - "ScheduleVersionNotFound": orchestration_errors.ScheduleVersionNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def schedule( - self, - schedule_version_rid: orchestration_models.ScheduleVersionRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[typing.Optional[orchestration_models.Schedule]]: - """ - - :param schedule_version_rid: The RID of a schedule version - :type schedule_version_rid: ScheduleVersionRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[typing.Optional[orchestration_models.Schedule]] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/orchestration/scheduleVersions/{scheduleVersionRid}/schedule", - query_params={ - "preview": preview, - }, - path_params={ - "scheduleVersionRid": schedule_version_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=typing.Optional[orchestration_models.Schedule], - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _AsyncScheduleVersionClientRaw: - def __init__(self, client: AsyncScheduleVersionClient) -> None: - def get(_: orchestration_models.ScheduleVersion): ... - def schedule(_: typing.Optional[orchestration_models.Schedule]): ... - - self.get = core.async_with_raw_response(get, client.get) - self.schedule = core.async_with_raw_response(schedule, client.schedule) - - -class _AsyncScheduleVersionClientStreaming: - def __init__(self, client: AsyncScheduleVersionClient) -> None: - def get(_: orchestration_models.ScheduleVersion): ... - def schedule(_: typing.Optional[orchestration_models.Schedule]): ... - - self.get = core.async_with_streaming_response(get, client.get) - self.schedule = core.async_with_streaming_response(schedule, client.schedule) diff --git a/foundry_sdk/v2/sql_queries/__init__.py b/foundry_sdk/v2/sql_queries/__init__.py deleted file mode 100644 index 80a07c1a4..000000000 --- a/foundry_sdk/v2/sql_queries/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -from foundry_sdk.v2.sql_queries._client import AsyncSqlQueriesClient -from foundry_sdk.v2.sql_queries._client import SqlQueriesClient - -__all__ = [ - "SqlQueriesClient", - "AsyncSqlQueriesClient", -] diff --git a/foundry_sdk/v2/sql_queries/_client.py b/foundry_sdk/v2/sql_queries/_client.py deleted file mode 100644 index 2f1eb6816..000000000 --- a/foundry_sdk/v2/sql_queries/_client.py +++ /dev/null @@ -1,69 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing -from functools import cached_property - -from foundry_sdk import _core as core - - -class SqlQueriesClient: - """ - The API client for the SqlQueries Namespace. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - - @cached_property - def SqlQuery(self): - from foundry_sdk.v2.sql_queries.sql_query import SqlQueryClient - - return SqlQueryClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - -class AsyncSqlQueriesClient: - """ - The Async API client for the SqlQueries Namespace. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - from foundry_sdk.v2.sql_queries.sql_query import AsyncSqlQueryClient - - self.SqlQuery = AsyncSqlQueryClient(auth=auth, hostname=hostname, config=config) diff --git a/foundry_sdk/v2/sql_queries/errors.py b/foundry_sdk/v2/sql_queries/errors.py deleted file mode 100644 index fcb5a3ae9..000000000 --- a/foundry_sdk/v2/sql_queries/errors.py +++ /dev/null @@ -1,190 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing -from dataclasses import dataclass - -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v2.sql_queries import models as sql_queries_models - - -class CancelSqlQueryPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not cancel the SqlQuery.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - sqlQueryId: sql_queries_models.SqlQueryId - """The id of a query.""" - - -@dataclass -class CancelSqlQueryPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["CancelSqlQueryPermissionDenied"] - parameters: CancelSqlQueryPermissionDeniedParameters - error_instance_id: str - - -class ExecuteSqlQueryPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not execute the SqlQuery.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class ExecuteSqlQueryPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["ExecuteSqlQueryPermissionDenied"] - parameters: ExecuteSqlQueryPermissionDeniedParameters - error_instance_id: str - - -class GetResultsSqlQueryPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not getResults the SqlQuery.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - sqlQueryId: sql_queries_models.SqlQueryId - """The id of a query.""" - - -@dataclass -class GetResultsSqlQueryPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["GetResultsSqlQueryPermissionDenied"] - parameters: GetResultsSqlQueryPermissionDeniedParameters - error_instance_id: str - - -class GetStatusSqlQueryPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not getStatus the SqlQuery.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - sqlQueryId: sql_queries_models.SqlQueryId - """The id of a query.""" - - -@dataclass -class GetStatusSqlQueryPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["GetStatusSqlQueryPermissionDenied"] - parameters: GetStatusSqlQueryPermissionDeniedParameters - error_instance_id: str - - -class QueryCanceledParameters(typing_extensions.TypedDict): - """The query was canceled.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - queryId: sql_queries_models.SqlQueryId - - -@dataclass -class QueryCanceled(errors.BadRequestError): - name: typing.Literal["QueryCanceled"] - parameters: QueryCanceledParameters - error_instance_id: str - - -class QueryFailedParameters(typing_extensions.TypedDict): - """The query failed.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - queryId: sql_queries_models.SqlQueryId - errorMessage: str - - -@dataclass -class QueryFailed(errors.InternalServerError): - name: typing.Literal["QueryFailed"] - parameters: QueryFailedParameters - error_instance_id: str - - -class QueryParseErrorParameters(typing_extensions.TypedDict): - """The query cannot be parsed.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - errorMessage: str - - -@dataclass -class QueryParseError(errors.BadRequestError): - name: typing.Literal["QueryParseError"] - parameters: QueryParseErrorParameters - error_instance_id: str - - -class QueryPermissionDeniedParameters(typing_extensions.TypedDict): - """The provided token does not have permission to access the given query.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - queryId: sql_queries_models.SqlQueryId - - -@dataclass -class QueryPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["QueryPermissionDenied"] - parameters: QueryPermissionDeniedParameters - error_instance_id: str - - -class QueryRunningParameters(typing_extensions.TypedDict): - """The query is running.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - queryId: sql_queries_models.SqlQueryId - - -@dataclass -class QueryRunning(errors.BadRequestError): - name: typing.Literal["QueryRunning"] - parameters: QueryRunningParameters - error_instance_id: str - - -class ReadQueryInputsPermissionDeniedParameters(typing_extensions.TypedDict): - """The provided token does not have permission to access the inputs to the query.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - rids: typing.List[core.RID] - """The RIDs of the inputs to the query that the user does not have permission to query.""" - - -@dataclass -class ReadQueryInputsPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["ReadQueryInputsPermissionDenied"] - parameters: ReadQueryInputsPermissionDeniedParameters - error_instance_id: str - - -__all__ = [ - "CancelSqlQueryPermissionDenied", - "ExecuteSqlQueryPermissionDenied", - "GetResultsSqlQueryPermissionDenied", - "GetStatusSqlQueryPermissionDenied", - "QueryCanceled", - "QueryFailed", - "QueryParseError", - "QueryPermissionDenied", - "QueryRunning", - "ReadQueryInputsPermissionDenied", -] diff --git a/foundry_sdk/v2/sql_queries/models.py b/foundry_sdk/v2/sql_queries/models.py deleted file mode 100644 index 5d8f9151d..000000000 --- a/foundry_sdk/v2/sql_queries/models.py +++ /dev/null @@ -1,100 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -from __future__ import annotations - -import typing - -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk.v2.datasets import models as datasets_models - - -class CanceledQueryStatus(core.ModelBase): - """CanceledQueryStatus""" - - type: typing.Literal["canceled"] = "canceled" - - -class ExecuteSqlQueryRequest(core.ModelBase): - """ExecuteSqlQueryRequest""" - - query: str - """ - The SQL query to execute. Queries should conform to the - [Spark SQL dialect](https://spark.apache.org/docs/latest/sql-ref.html). This supports SELECT - queries only. Datasets can be referenced in SQL queries by path or by RID. See the - [documentation](https://www.palantir.com/docs/foundry/analytics-connectivity/odbc-jdbc-drivers/#use-sql-to-query-foundry-datasets) - for more details. - """ - - fallback_branch_ids: typing.Optional[typing.List[datasets_models.BranchName]] = pydantic.Field(alias=str("fallbackBranchIds"), default=None) # type: ignore[literal-required] - """ - The list of branch ids to use as fallbacks if the query fails to execute on the primary branch. If a - is not explicitly provided in the SQL query, the resource will be queried on the first fallback branch - provided that exists. If no fallback branches are provided the default branch is used. This is - `master` for most enrollments. - """ - - -class FailedQueryStatus(core.ModelBase): - """FailedQueryStatus""" - - error_message: str = pydantic.Field(alias=str("errorMessage")) # type: ignore[literal-required] - """An error message describing why the query failed.""" - - type: typing.Literal["failed"] = "failed" - - -QueryStatus = typing_extensions.Annotated[ - typing.Union[ - "RunningQueryStatus", "CanceledQueryStatus", "FailedQueryStatus", "SucceededQueryStatus" - ], - pydantic.Field(discriminator="type"), -] -"""QueryStatus""" - - -class RunningQueryStatus(core.ModelBase): - """RunningQueryStatus""" - - query_id: SqlQueryId = pydantic.Field(alias=str("queryId")) # type: ignore[literal-required] - type: typing.Literal["running"] = "running" - - -SqlQueryId = str -"""The identifier of a SQL Query.""" - - -class SucceededQueryStatus(core.ModelBase): - """SucceededQueryStatus""" - - query_id: SqlQueryId = pydantic.Field(alias=str("queryId")) # type: ignore[literal-required] - type: typing.Literal["succeeded"] = "succeeded" - - -core.resolve_forward_references(QueryStatus, globalns=globals(), localns=locals()) - -__all__ = [ - "CanceledQueryStatus", - "ExecuteSqlQueryRequest", - "FailedQueryStatus", - "QueryStatus", - "RunningQueryStatus", - "SqlQueryId", - "SucceededQueryStatus", -] diff --git a/foundry_sdk/v2/sql_queries/sql_query.py b/foundry_sdk/v2/sql_queries/sql_query.py deleted file mode 100644 index 541b12d4d..000000000 --- a/foundry_sdk/v2/sql_queries/sql_query.py +++ /dev/null @@ -1,630 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing - -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v2.core import models as core_models -from foundry_sdk.v2.datasets import models as datasets_models -from foundry_sdk.v2.sql_queries import errors as sql_queries_errors -from foundry_sdk.v2.sql_queries import models as sql_queries_models - - -class SqlQueryClient: - """ - The API client for the SqlQuery Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _SqlQueryClientStreaming(self) - self.with_raw_response = _SqlQueryClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def cancel( - self, - sql_query_id: sql_queries_models.SqlQueryId, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> None: - """ - Cancels a query. If the query is no longer running this is effectively a no-op. - - :param sql_query_id: The id of a query. - :type sql_query_id: SqlQueryId - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: None - - :raises CancelSqlQueryPermissionDenied: Could not cancel the SqlQuery. - :raises QueryCanceled: The query was canceled. - :raises QueryFailed: The query failed. - :raises QueryParseError: The query cannot be parsed. - :raises QueryPermissionDenied: The provided token does not have permission to access the given query. - :raises QueryRunning: The query is running. - :raises ReadQueryInputsPermissionDenied: The provided token does not have permission to access the inputs to the query. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/sqlQueries/{sqlQueryId}/cancel", - query_params={ - "preview": preview, - }, - path_params={ - "sqlQueryId": sql_query_id, - }, - header_params={}, - body=None, - response_type=None, - request_timeout=request_timeout, - throwable_errors={ - "CancelSqlQueryPermissionDenied": sql_queries_errors.CancelSqlQueryPermissionDenied, - "QueryCanceled": sql_queries_errors.QueryCanceled, - "QueryFailed": sql_queries_errors.QueryFailed, - "QueryParseError": sql_queries_errors.QueryParseError, - "QueryPermissionDenied": sql_queries_errors.QueryPermissionDenied, - "QueryRunning": sql_queries_errors.QueryRunning, - "ReadQueryInputsPermissionDenied": sql_queries_errors.ReadQueryInputsPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def execute( - self, - *, - query: str, - fallback_branch_ids: typing.Optional[typing.List[datasets_models.BranchName]] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> sql_queries_models.QueryStatus: - """ - Executes a new query. Only the user that invoked the query can operate on the query. The size of query - results are limited by default to 1 million rows. Contact your Palantir representative to discuss limit - increases. - - :param query: The SQL query to execute. Queries should conform to the [Spark SQL dialect](https://spark.apache.org/docs/latest/sql-ref.html). This supports SELECT queries only. Datasets can be referenced in SQL queries by path or by RID. See the [documentation](https://www.palantir.com/docs/foundry/analytics-connectivity/odbc-jdbc-drivers/#use-sql-to-query-foundry-datasets) for more details. - :type query: str - :param fallback_branch_ids: The list of branch ids to use as fallbacks if the query fails to execute on the primary branch. If a is not explicitly provided in the SQL query, the resource will be queried on the first fallback branch provided that exists. If no fallback branches are provided the default branch is used. This is `master` for most enrollments. - :type fallback_branch_ids: Optional[List[BranchName]] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: sql_queries_models.QueryStatus - - :raises ExecuteSqlQueryPermissionDenied: Could not execute the SqlQuery. - :raises QueryCanceled: The query was canceled. - :raises QueryFailed: The query failed. - :raises QueryParseError: The query cannot be parsed. - :raises QueryPermissionDenied: The provided token does not have permission to access the given query. - :raises QueryRunning: The query is running. - :raises ReadQueryInputsPermissionDenied: The provided token does not have permission to access the inputs to the query. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/sqlQueries/execute", - query_params={ - "preview": preview, - }, - path_params={}, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=sql_queries_models.ExecuteSqlQueryRequest( - query=query, - fallback_branch_ids=fallback_branch_ids, - ), - response_type=sql_queries_models.QueryStatus, - request_timeout=request_timeout, - throwable_errors={ - "ExecuteSqlQueryPermissionDenied": sql_queries_errors.ExecuteSqlQueryPermissionDenied, - "QueryCanceled": sql_queries_errors.QueryCanceled, - "QueryFailed": sql_queries_errors.QueryFailed, - "QueryParseError": sql_queries_errors.QueryParseError, - "QueryPermissionDenied": sql_queries_errors.QueryPermissionDenied, - "QueryRunning": sql_queries_errors.QueryRunning, - "ReadQueryInputsPermissionDenied": sql_queries_errors.ReadQueryInputsPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get_results( - self, - sql_query_id: sql_queries_models.SqlQueryId, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.TableResponse: - """ - Gets the results of a query. The results of the query are returned in the - [Apache Arrow](https://arrow.apache.org/) format. - - This endpoint implements long polling and requests will time out after one minute. They can be safely - retried while the query is still running. - - :param sql_query_id: The id of a query. - :type sql_query_id: SqlQueryId - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.TableResponse - - - :raises GetResultsSqlQueryPermissionDenied: Could not getResults the SqlQuery. - :raises QueryCanceled: The query was canceled. - :raises QueryFailed: The query failed. - :raises QueryParseError: The query cannot be parsed. - :raises QueryPermissionDenied: The provided token does not have permission to access the given query. - :raises QueryRunning: The query is running. - :raises ReadQueryInputsPermissionDenied: The provided token does not have permission to access the inputs to the query. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/sqlQueries/{sqlQueryId}/getResults", - query_params={ - "preview": preview, - }, - path_params={ - "sqlQueryId": sql_query_id, - }, - header_params={ - "Accept": "application/octet-stream", - }, - body=None, - response_type=bytes, - request_timeout=request_timeout, - throwable_errors={ - "GetResultsSqlQueryPermissionDenied": sql_queries_errors.GetResultsSqlQueryPermissionDenied, - "QueryCanceled": sql_queries_errors.QueryCanceled, - "QueryFailed": sql_queries_errors.QueryFailed, - "QueryParseError": sql_queries_errors.QueryParseError, - "QueryPermissionDenied": sql_queries_errors.QueryPermissionDenied, - "QueryRunning": sql_queries_errors.QueryRunning, - "ReadQueryInputsPermissionDenied": sql_queries_errors.ReadQueryInputsPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode", "TABLE"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get_status( - self, - sql_query_id: sql_queries_models.SqlQueryId, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> sql_queries_models.QueryStatus: - """ - Gets the status of a query. - - :param sql_query_id: The id of a query. - :type sql_query_id: SqlQueryId - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: sql_queries_models.QueryStatus - - :raises GetStatusSqlQueryPermissionDenied: Could not getStatus the SqlQuery. - :raises QueryCanceled: The query was canceled. - :raises QueryFailed: The query failed. - :raises QueryParseError: The query cannot be parsed. - :raises QueryPermissionDenied: The provided token does not have permission to access the given query. - :raises QueryRunning: The query is running. - :raises ReadQueryInputsPermissionDenied: The provided token does not have permission to access the inputs to the query. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/sqlQueries/{sqlQueryId}/getStatus", - query_params={ - "preview": preview, - }, - path_params={ - "sqlQueryId": sql_query_id, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=sql_queries_models.QueryStatus, - request_timeout=request_timeout, - throwable_errors={ - "GetStatusSqlQueryPermissionDenied": sql_queries_errors.GetStatusSqlQueryPermissionDenied, - "QueryCanceled": sql_queries_errors.QueryCanceled, - "QueryFailed": sql_queries_errors.QueryFailed, - "QueryParseError": sql_queries_errors.QueryParseError, - "QueryPermissionDenied": sql_queries_errors.QueryPermissionDenied, - "QueryRunning": sql_queries_errors.QueryRunning, - "ReadQueryInputsPermissionDenied": sql_queries_errors.ReadQueryInputsPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _SqlQueryClientRaw: - def __init__(self, client: SqlQueryClient) -> None: - def cancel(_: None): ... - def execute(_: sql_queries_models.QueryStatus): ... - def get_results(_: bytes): ... - def get_status(_: sql_queries_models.QueryStatus): ... - - self.cancel = core.with_raw_response(cancel, client.cancel) - self.execute = core.with_raw_response(execute, client.execute) - self.get_results = core.with_raw_response(get_results, client.get_results) - self.get_status = core.with_raw_response(get_status, client.get_status) - - -class _SqlQueryClientStreaming: - def __init__(self, client: SqlQueryClient) -> None: - def execute(_: sql_queries_models.QueryStatus): ... - def get_results(_: bytes): ... - def get_status(_: sql_queries_models.QueryStatus): ... - - self.execute = core.with_streaming_response(execute, client.execute) - self.get_results = core.with_streaming_response(get_results, client.get_results) - self.get_status = core.with_streaming_response(get_status, client.get_status) - - -class AsyncSqlQueryClient: - """ - The API client for the SqlQuery Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AsyncSqlQueryClientStreaming(self) - self.with_raw_response = _AsyncSqlQueryClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def cancel( - self, - sql_query_id: sql_queries_models.SqlQueryId, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[None]: - """ - Cancels a query. If the query is no longer running this is effectively a no-op. - - :param sql_query_id: The id of a query. - :type sql_query_id: SqlQueryId - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[None] - - :raises CancelSqlQueryPermissionDenied: Could not cancel the SqlQuery. - :raises QueryCanceled: The query was canceled. - :raises QueryFailed: The query failed. - :raises QueryParseError: The query cannot be parsed. - :raises QueryPermissionDenied: The provided token does not have permission to access the given query. - :raises QueryRunning: The query is running. - :raises ReadQueryInputsPermissionDenied: The provided token does not have permission to access the inputs to the query. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/sqlQueries/{sqlQueryId}/cancel", - query_params={ - "preview": preview, - }, - path_params={ - "sqlQueryId": sql_query_id, - }, - header_params={}, - body=None, - response_type=None, - request_timeout=request_timeout, - throwable_errors={ - "CancelSqlQueryPermissionDenied": sql_queries_errors.CancelSqlQueryPermissionDenied, - "QueryCanceled": sql_queries_errors.QueryCanceled, - "QueryFailed": sql_queries_errors.QueryFailed, - "QueryParseError": sql_queries_errors.QueryParseError, - "QueryPermissionDenied": sql_queries_errors.QueryPermissionDenied, - "QueryRunning": sql_queries_errors.QueryRunning, - "ReadQueryInputsPermissionDenied": sql_queries_errors.ReadQueryInputsPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def execute( - self, - *, - query: str, - fallback_branch_ids: typing.Optional[typing.List[datasets_models.BranchName]] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[sql_queries_models.QueryStatus]: - """ - Executes a new query. Only the user that invoked the query can operate on the query. The size of query - results are limited by default to 1 million rows. Contact your Palantir representative to discuss limit - increases. - - :param query: The SQL query to execute. Queries should conform to the [Spark SQL dialect](https://spark.apache.org/docs/latest/sql-ref.html). This supports SELECT queries only. Datasets can be referenced in SQL queries by path or by RID. See the [documentation](https://www.palantir.com/docs/foundry/analytics-connectivity/odbc-jdbc-drivers/#use-sql-to-query-foundry-datasets) for more details. - :type query: str - :param fallback_branch_ids: The list of branch ids to use as fallbacks if the query fails to execute on the primary branch. If a is not explicitly provided in the SQL query, the resource will be queried on the first fallback branch provided that exists. If no fallback branches are provided the default branch is used. This is `master` for most enrollments. - :type fallback_branch_ids: Optional[List[BranchName]] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[sql_queries_models.QueryStatus] - - :raises ExecuteSqlQueryPermissionDenied: Could not execute the SqlQuery. - :raises QueryCanceled: The query was canceled. - :raises QueryFailed: The query failed. - :raises QueryParseError: The query cannot be parsed. - :raises QueryPermissionDenied: The provided token does not have permission to access the given query. - :raises QueryRunning: The query is running. - :raises ReadQueryInputsPermissionDenied: The provided token does not have permission to access the inputs to the query. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/sqlQueries/execute", - query_params={ - "preview": preview, - }, - path_params={}, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=sql_queries_models.ExecuteSqlQueryRequest( - query=query, - fallback_branch_ids=fallback_branch_ids, - ), - response_type=sql_queries_models.QueryStatus, - request_timeout=request_timeout, - throwable_errors={ - "ExecuteSqlQueryPermissionDenied": sql_queries_errors.ExecuteSqlQueryPermissionDenied, - "QueryCanceled": sql_queries_errors.QueryCanceled, - "QueryFailed": sql_queries_errors.QueryFailed, - "QueryParseError": sql_queries_errors.QueryParseError, - "QueryPermissionDenied": sql_queries_errors.QueryPermissionDenied, - "QueryRunning": sql_queries_errors.QueryRunning, - "ReadQueryInputsPermissionDenied": sql_queries_errors.ReadQueryInputsPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get_results( - self, - sql_query_id: sql_queries_models.SqlQueryId, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[core.TableResponse]: - """ - Gets the results of a query. The results of the query are returned in the - [Apache Arrow](https://arrow.apache.org/) format. - - This endpoint implements long polling and requests will time out after one minute. They can be safely - retried while the query is still running. - - :param sql_query_id: The id of a query. - :type sql_query_id: SqlQueryId - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[core.TableResponse - ] - - :raises GetResultsSqlQueryPermissionDenied: Could not getResults the SqlQuery. - :raises QueryCanceled: The query was canceled. - :raises QueryFailed: The query failed. - :raises QueryParseError: The query cannot be parsed. - :raises QueryPermissionDenied: The provided token does not have permission to access the given query. - :raises QueryRunning: The query is running. - :raises ReadQueryInputsPermissionDenied: The provided token does not have permission to access the inputs to the query. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/sqlQueries/{sqlQueryId}/getResults", - query_params={ - "preview": preview, - }, - path_params={ - "sqlQueryId": sql_query_id, - }, - header_params={ - "Accept": "application/octet-stream", - }, - body=None, - response_type=bytes, - request_timeout=request_timeout, - throwable_errors={ - "GetResultsSqlQueryPermissionDenied": sql_queries_errors.GetResultsSqlQueryPermissionDenied, - "QueryCanceled": sql_queries_errors.QueryCanceled, - "QueryFailed": sql_queries_errors.QueryFailed, - "QueryParseError": sql_queries_errors.QueryParseError, - "QueryPermissionDenied": sql_queries_errors.QueryPermissionDenied, - "QueryRunning": sql_queries_errors.QueryRunning, - "ReadQueryInputsPermissionDenied": sql_queries_errors.ReadQueryInputsPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode", "TABLE"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get_status( - self, - sql_query_id: sql_queries_models.SqlQueryId, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[sql_queries_models.QueryStatus]: - """ - Gets the status of a query. - - :param sql_query_id: The id of a query. - :type sql_query_id: SqlQueryId - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[sql_queries_models.QueryStatus] - - :raises GetStatusSqlQueryPermissionDenied: Could not getStatus the SqlQuery. - :raises QueryCanceled: The query was canceled. - :raises QueryFailed: The query failed. - :raises QueryParseError: The query cannot be parsed. - :raises QueryPermissionDenied: The provided token does not have permission to access the given query. - :raises QueryRunning: The query is running. - :raises ReadQueryInputsPermissionDenied: The provided token does not have permission to access the inputs to the query. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/sqlQueries/{sqlQueryId}/getStatus", - query_params={ - "preview": preview, - }, - path_params={ - "sqlQueryId": sql_query_id, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=sql_queries_models.QueryStatus, - request_timeout=request_timeout, - throwable_errors={ - "GetStatusSqlQueryPermissionDenied": sql_queries_errors.GetStatusSqlQueryPermissionDenied, - "QueryCanceled": sql_queries_errors.QueryCanceled, - "QueryFailed": sql_queries_errors.QueryFailed, - "QueryParseError": sql_queries_errors.QueryParseError, - "QueryPermissionDenied": sql_queries_errors.QueryPermissionDenied, - "QueryRunning": sql_queries_errors.QueryRunning, - "ReadQueryInputsPermissionDenied": sql_queries_errors.ReadQueryInputsPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _AsyncSqlQueryClientRaw: - def __init__(self, client: AsyncSqlQueryClient) -> None: - def cancel(_: None): ... - def execute(_: sql_queries_models.QueryStatus): ... - def get_results(_: bytes): ... - def get_status(_: sql_queries_models.QueryStatus): ... - - self.cancel = core.async_with_raw_response(cancel, client.cancel) - self.execute = core.async_with_raw_response(execute, client.execute) - self.get_results = core.async_with_raw_response(get_results, client.get_results) - self.get_status = core.async_with_raw_response(get_status, client.get_status) - - -class _AsyncSqlQueryClientStreaming: - def __init__(self, client: AsyncSqlQueryClient) -> None: - def execute(_: sql_queries_models.QueryStatus): ... - def get_results(_: bytes): ... - def get_status(_: sql_queries_models.QueryStatus): ... - - self.execute = core.async_with_streaming_response(execute, client.execute) - self.get_results = core.async_with_streaming_response(get_results, client.get_results) - self.get_status = core.async_with_streaming_response(get_status, client.get_status) diff --git a/foundry_sdk/v2/streams/__init__.py b/foundry_sdk/v2/streams/__init__.py deleted file mode 100644 index 2aef148a3..000000000 --- a/foundry_sdk/v2/streams/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -from foundry_sdk.v2.streams._client import AsyncStreamsClient -from foundry_sdk.v2.streams._client import StreamsClient - -__all__ = [ - "StreamsClient", - "AsyncStreamsClient", -] diff --git a/foundry_sdk/v2/streams/_client.py b/foundry_sdk/v2/streams/_client.py deleted file mode 100644 index 401be6e97..000000000 --- a/foundry_sdk/v2/streams/_client.py +++ /dev/null @@ -1,69 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing -from functools import cached_property - -from foundry_sdk import _core as core - - -class StreamsClient: - """ - The API client for the Streams Namespace. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - - @cached_property - def Dataset(self): - from foundry_sdk.v2.streams.dataset import DatasetClient - - return DatasetClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - -class AsyncStreamsClient: - """ - The Async API client for the Streams Namespace. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - from foundry_sdk.v2.streams.dataset import AsyncDatasetClient - - self.Dataset = AsyncDatasetClient(auth=auth, hostname=hostname, config=config) diff --git a/foundry_sdk/v2/streams/dataset.py b/foundry_sdk/v2/streams/dataset.py deleted file mode 100644 index 373bfa2b4..000000000 --- a/foundry_sdk/v2/streams/dataset.py +++ /dev/null @@ -1,298 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing -from functools import cached_property - -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v2.core import errors as core_errors -from foundry_sdk.v2.core import models as core_models -from foundry_sdk.v2.datasets import models as datasets_models -from foundry_sdk.v2.filesystem import errors as filesystem_errors -from foundry_sdk.v2.filesystem import models as filesystem_models -from foundry_sdk.v2.streams import errors as streams_errors -from foundry_sdk.v2.streams import models as streams_models - - -class DatasetClient: - """ - The API client for the Dataset Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _DatasetClientStreaming(self) - self.with_raw_response = _DatasetClientRaw(self) - - @cached_property - def Stream(self): - from foundry_sdk.v2.streams.stream import StreamClient - - return StreamClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def create( - self, - *, - name: datasets_models.DatasetName, - parent_folder_rid: filesystem_models.FolderRid, - schema: core_models.StreamSchema, - branch_name: typing.Optional[datasets_models.BranchName] = None, - compressed: typing.Optional[streams_models.Compressed] = None, - partitions_count: typing.Optional[streams_models.PartitionsCount] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - stream_type: typing.Optional[streams_models.StreamType] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> streams_models.Dataset: - """ - Creates a streaming dataset with a stream on the specified branch, or if no branch is specified, on the - default branch ('master' for most enrollments). For more information on streaming datasets, refer to the - [streams](https://palantir.com/docs/foundry/data-integration/streams/) user documentation. - - :param name: - :type name: DatasetName - :param parent_folder_rid: - :type parent_folder_rid: FolderRid - :param schema: The Foundry schema to apply to the new stream. - :type schema: StreamSchema - :param branch_name: The branch to create the initial stream on. If not specified, the default branch will be used ('master' for most enrollments). - :type branch_name: Optional[BranchName] - :param compressed: Whether or not compression is enabled for the stream. Defaults to false. - :type compressed: Optional[Compressed] - :param partitions_count: The number of partitions for the Foundry stream. Generally, each partition can handle about 5 mb/s of data, so for higher volume streams, more partitions are recommended. If not specified, 1 partition is used. This value cannot be changed later. - :type partitions_count: Optional[PartitionsCount] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param stream_type: A conceptual representation of the expected shape of the data for a stream. HIGH_THROUGHPUT and LOW_LATENCY are not compatible with each other. Defaults to LOW_LATENCY. - :type stream_type: Optional[StreamType] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: streams_models.Dataset - - :raises CannotCreateStreamingDatasetInUserFolder: Cannot create a streaming dataset in a user folder. - :raises CreateStreamingDatasetPermissionDenied: Could not create the Dataset. - :raises InvalidFieldSchema: The field schema failed validations - :raises InvalidSchema: The schema failed validations - :raises InvalidStreamType: The stream type is invalid. - :raises ResourceNameAlreadyExists: The provided resource name is already in use by another resource in the same folder. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/streams/datasets/create", - query_params={ - "preview": preview, - }, - path_params={}, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=streams_models.CreateStreamingDatasetRequest( - name=name, - parent_folder_rid=parent_folder_rid, - schema_=schema, - branch_name=branch_name, - partitions_count=partitions_count, - stream_type=stream_type, - compressed=compressed, - ), - response_type=streams_models.Dataset, - request_timeout=request_timeout, - throwable_errors={ - "CannotCreateStreamingDatasetInUserFolder": streams_errors.CannotCreateStreamingDatasetInUserFolder, - "CreateStreamingDatasetPermissionDenied": streams_errors.CreateStreamingDatasetPermissionDenied, - "InvalidFieldSchema": core_errors.InvalidFieldSchema, - "InvalidSchema": core_errors.InvalidSchema, - "InvalidStreamType": streams_errors.InvalidStreamType, - "ResourceNameAlreadyExists": filesystem_errors.ResourceNameAlreadyExists, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _DatasetClientRaw: - def __init__(self, client: DatasetClient) -> None: - def create(_: streams_models.Dataset): ... - - self.create = core.with_raw_response(create, client.create) - - -class _DatasetClientStreaming: - def __init__(self, client: DatasetClient) -> None: - def create(_: streams_models.Dataset): ... - - self.create = core.with_streaming_response(create, client.create) - - -class AsyncDatasetClient: - """ - The API client for the Dataset Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AsyncDatasetClientStreaming(self) - self.with_raw_response = _AsyncDatasetClientRaw(self) - - @cached_property - def Stream(self): - from foundry_sdk.v2.streams.stream import AsyncStreamClient - - return AsyncStreamClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def create( - self, - *, - name: datasets_models.DatasetName, - parent_folder_rid: filesystem_models.FolderRid, - schema: core_models.StreamSchema, - branch_name: typing.Optional[datasets_models.BranchName] = None, - compressed: typing.Optional[streams_models.Compressed] = None, - partitions_count: typing.Optional[streams_models.PartitionsCount] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - stream_type: typing.Optional[streams_models.StreamType] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[streams_models.Dataset]: - """ - Creates a streaming dataset with a stream on the specified branch, or if no branch is specified, on the - default branch ('master' for most enrollments). For more information on streaming datasets, refer to the - [streams](https://palantir.com/docs/foundry/data-integration/streams/) user documentation. - - :param name: - :type name: DatasetName - :param parent_folder_rid: - :type parent_folder_rid: FolderRid - :param schema: The Foundry schema to apply to the new stream. - :type schema: StreamSchema - :param branch_name: The branch to create the initial stream on. If not specified, the default branch will be used ('master' for most enrollments). - :type branch_name: Optional[BranchName] - :param compressed: Whether or not compression is enabled for the stream. Defaults to false. - :type compressed: Optional[Compressed] - :param partitions_count: The number of partitions for the Foundry stream. Generally, each partition can handle about 5 mb/s of data, so for higher volume streams, more partitions are recommended. If not specified, 1 partition is used. This value cannot be changed later. - :type partitions_count: Optional[PartitionsCount] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param stream_type: A conceptual representation of the expected shape of the data for a stream. HIGH_THROUGHPUT and LOW_LATENCY are not compatible with each other. Defaults to LOW_LATENCY. - :type stream_type: Optional[StreamType] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[streams_models.Dataset] - - :raises CannotCreateStreamingDatasetInUserFolder: Cannot create a streaming dataset in a user folder. - :raises CreateStreamingDatasetPermissionDenied: Could not create the Dataset. - :raises InvalidFieldSchema: The field schema failed validations - :raises InvalidSchema: The schema failed validations - :raises InvalidStreamType: The stream type is invalid. - :raises ResourceNameAlreadyExists: The provided resource name is already in use by another resource in the same folder. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/streams/datasets/create", - query_params={ - "preview": preview, - }, - path_params={}, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=streams_models.CreateStreamingDatasetRequest( - name=name, - parent_folder_rid=parent_folder_rid, - schema_=schema, - branch_name=branch_name, - partitions_count=partitions_count, - stream_type=stream_type, - compressed=compressed, - ), - response_type=streams_models.Dataset, - request_timeout=request_timeout, - throwable_errors={ - "CannotCreateStreamingDatasetInUserFolder": streams_errors.CannotCreateStreamingDatasetInUserFolder, - "CreateStreamingDatasetPermissionDenied": streams_errors.CreateStreamingDatasetPermissionDenied, - "InvalidFieldSchema": core_errors.InvalidFieldSchema, - "InvalidSchema": core_errors.InvalidSchema, - "InvalidStreamType": streams_errors.InvalidStreamType, - "ResourceNameAlreadyExists": filesystem_errors.ResourceNameAlreadyExists, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _AsyncDatasetClientRaw: - def __init__(self, client: AsyncDatasetClient) -> None: - def create(_: streams_models.Dataset): ... - - self.create = core.async_with_raw_response(create, client.create) - - -class _AsyncDatasetClientStreaming: - def __init__(self, client: AsyncDatasetClient) -> None: - def create(_: streams_models.Dataset): ... - - self.create = core.async_with_streaming_response(create, client.create) diff --git a/foundry_sdk/v2/streams/errors.py b/foundry_sdk/v2/streams/errors.py deleted file mode 100644 index e3b13fc25..000000000 --- a/foundry_sdk/v2/streams/errors.py +++ /dev/null @@ -1,272 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing -from dataclasses import dataclass - -import typing_extensions - -from foundry_sdk import _errors as errors -from foundry_sdk.v2.datasets import models as datasets_models -from foundry_sdk.v2.filesystem import models as filesystem_models -from foundry_sdk.v2.streams import models as streams_models - - -class CannotCreateStreamingDatasetInUserFolderParameters(typing_extensions.TypedDict): - """Cannot create a streaming dataset in a user folder.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - parentFolderRid: filesystem_models.FolderRid - - -@dataclass -class CannotCreateStreamingDatasetInUserFolder(errors.BadRequestError): - name: typing.Literal["CannotCreateStreamingDatasetInUserFolder"] - parameters: CannotCreateStreamingDatasetInUserFolderParameters - error_instance_id: str - - -class CannotWriteToTrashedStreamParameters(typing_extensions.TypedDict): - """Cannot write to a stream that is in the trash.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - datasetRid: datasets_models.DatasetRid - - -@dataclass -class CannotWriteToTrashedStream(errors.BadRequestError): - name: typing.Literal["CannotWriteToTrashedStream"] - parameters: CannotWriteToTrashedStreamParameters - error_instance_id: str - - -class CreateStreamPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not create the Stream.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - datasetRid: datasets_models.DatasetRid - streamBranchName: datasets_models.BranchName - - -@dataclass -class CreateStreamPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["CreateStreamPermissionDenied"] - parameters: CreateStreamPermissionDeniedParameters - error_instance_id: str - - -class CreateStreamingDatasetPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not create the Dataset.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class CreateStreamingDatasetPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["CreateStreamingDatasetPermissionDenied"] - parameters: CreateStreamingDatasetPermissionDeniedParameters - error_instance_id: str - - -class FailedToProcessBinaryRecordParameters(typing_extensions.TypedDict): - """The byte stream could not be processed.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class FailedToProcessBinaryRecord(errors.InternalServerError): - name: typing.Literal["FailedToProcessBinaryRecord"] - parameters: FailedToProcessBinaryRecordParameters - error_instance_id: str - - -class InvalidStreamNoSchemaParameters(typing_extensions.TypedDict): - """The requested stream exists but is invalid, as it does not have a schema.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - datasetRid: datasets_models.DatasetRid - branchName: datasets_models.BranchName - viewRid: typing_extensions.NotRequired[streams_models.ViewRid] - - -@dataclass -class InvalidStreamNoSchema(errors.BadRequestError): - name: typing.Literal["InvalidStreamNoSchema"] - parameters: InvalidStreamNoSchemaParameters - error_instance_id: str - - -class InvalidStreamTypeParameters(typing_extensions.TypedDict): - """The stream type is invalid.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - streamType: str - - -@dataclass -class InvalidStreamType(errors.BadRequestError): - name: typing.Literal["InvalidStreamType"] - parameters: InvalidStreamTypeParameters - error_instance_id: str - - -class PublishBinaryRecordToStreamPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not publishBinaryRecord the Stream.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - datasetRid: datasets_models.DatasetRid - streamBranchName: datasets_models.BranchName - - -@dataclass -class PublishBinaryRecordToStreamPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["PublishBinaryRecordToStreamPermissionDenied"] - parameters: PublishBinaryRecordToStreamPermissionDeniedParameters - error_instance_id: str - - -class PublishRecordToStreamPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not publishRecord the Stream.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - datasetRid: datasets_models.DatasetRid - streamBranchName: datasets_models.BranchName - - -@dataclass -class PublishRecordToStreamPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["PublishRecordToStreamPermissionDenied"] - parameters: PublishRecordToStreamPermissionDeniedParameters - error_instance_id: str - - -class PublishRecordsToStreamPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not publishRecords the Stream.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - datasetRid: datasets_models.DatasetRid - streamBranchName: datasets_models.BranchName - - -@dataclass -class PublishRecordsToStreamPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["PublishRecordsToStreamPermissionDenied"] - parameters: PublishRecordsToStreamPermissionDeniedParameters - error_instance_id: str - - -class RecordDoesNotMatchStreamSchemaParameters(typing_extensions.TypedDict): - """A provided record does not match the stream schema""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - datasetRid: datasets_models.DatasetRid - branchName: datasets_models.BranchName - viewRid: typing_extensions.NotRequired[streams_models.ViewRid] - - -@dataclass -class RecordDoesNotMatchStreamSchema(errors.BadRequestError): - name: typing.Literal["RecordDoesNotMatchStreamSchema"] - parameters: RecordDoesNotMatchStreamSchemaParameters - error_instance_id: str - - -class RecordTooLargeParameters(typing_extensions.TypedDict): - """A record is too large to be published to the stream. On most enrollments, the maximum record size is 1MB.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class RecordTooLarge(errors.RequestEntityTooLargeError): - name: typing.Literal["RecordTooLarge"] - parameters: RecordTooLargeParameters - error_instance_id: str - - -class ResetStreamPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not reset the Stream.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - datasetRid: datasets_models.DatasetRid - streamBranchName: datasets_models.BranchName - - -@dataclass -class ResetStreamPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["ResetStreamPermissionDenied"] - parameters: ResetStreamPermissionDeniedParameters - error_instance_id: str - - -class StreamNotFoundParameters(typing_extensions.TypedDict): - """The given Stream could not be found.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - datasetRid: datasets_models.DatasetRid - streamBranchName: datasets_models.BranchName - - -@dataclass -class StreamNotFound(errors.NotFoundError): - name: typing.Literal["StreamNotFound"] - parameters: StreamNotFoundParameters - error_instance_id: str - - -class ViewNotFoundParameters(typing_extensions.TypedDict): - """No view for the provided view rid provided could be found.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - viewRid: streams_models.ViewRid - - -@dataclass -class ViewNotFound(errors.NotFoundError): - name: typing.Literal["ViewNotFound"] - parameters: ViewNotFoundParameters - error_instance_id: str - - -__all__ = [ - "CannotCreateStreamingDatasetInUserFolder", - "CannotWriteToTrashedStream", - "CreateStreamPermissionDenied", - "CreateStreamingDatasetPermissionDenied", - "FailedToProcessBinaryRecord", - "InvalidStreamNoSchema", - "InvalidStreamType", - "PublishBinaryRecordToStreamPermissionDenied", - "PublishRecordToStreamPermissionDenied", - "PublishRecordsToStreamPermissionDenied", - "RecordDoesNotMatchStreamSchema", - "RecordTooLarge", - "ResetStreamPermissionDenied", - "StreamNotFound", - "ViewNotFound", -] diff --git a/foundry_sdk/v2/streams/models.py b/foundry_sdk/v2/streams/models.py deleted file mode 100644 index b73d7d260..000000000 --- a/foundry_sdk/v2/streams/models.py +++ /dev/null @@ -1,273 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -from __future__ import annotations - -import typing - -import pydantic - -from foundry_sdk import _core as core -from foundry_sdk.v2.core import models as core_models -from foundry_sdk.v2.datasets import models as datasets_models -from foundry_sdk.v2.filesystem import models as filesystem_models - -Compressed = bool -""" -Compression helps reduce the size of the data being sent, resulting in lower network usage and -storage, at the cost of some additional CPU usage for compression and decompression. This stream type -is only recommended if your stream contains a high volume of repetitive strings and is experiencing poor -network bandwidth symptoms like non-zero lag, lower than expected throughput, or dropped records. -""" - - -class CreateStreamRequest(core.ModelBase): - """CreateStreamRequest""" - - schema_: CreateStreamRequestStreamSchema = pydantic.Field(alias=str("schema")) # type: ignore[literal-required] - """The Foundry schema for this stream.""" - - partitions_count: typing.Optional[PartitionsCount] = pydantic.Field(alias=str("partitionsCount"), default=None) # type: ignore[literal-required] - """ - The number of partitions for the Foundry stream. Defaults to 1. - - Generally, each partition can handle about 5 mb/s of data, so for higher volume streams, more partitions - are recommended. - """ - - stream_type: typing.Optional[StreamType] = pydantic.Field(alias=str("streamType"), default=None) # type: ignore[literal-required] - """ - A conceptual representation of the expected shape of the data for a stream. HIGH_THROUGHPUT and - LOW_LATENCY are not compatible with each other. Defaults to LOW_LATENCY. - """ - - branch_name: datasets_models.BranchName = pydantic.Field(alias=str("branchName")) # type: ignore[literal-required] - compressed: typing.Optional[Compressed] = None - """Whether or not compression is enabled for the stream. Defaults to false.""" - - -class CreateStreamRequestStreamSchema(core.ModelBase): - """CreateStreamRequestStreamSchema""" - - key_field_names: typing.Optional[typing.List[core_models.FieldName]] = pydantic.Field(alias=str("keyFieldNames"), default=None) # type: ignore[literal-required] - """ - The names of the fields to be used as keys for partitioning records. These key fields are used to group - all records with the same key into the same partition, to guarantee processing order of grouped records. These - keys are not meant to uniquely identify records, and do not by themselves deduplicate records. To deduplicate - records, provide a change data capture configuration for the schema. - - Key fields can only be of the following types: - - Boolean - - Byte - - Date - - Decimal - - Integer - - Long - - Short - - String - - Timestamp - - For additional information on keys for Foundry streams, see the - [streaming keys](https://palantir.com/docs/foundry/building-pipelines/streaming-keys/) user documentation. - """ - - fields: typing.List[core_models.Field] - change_data_capture: typing.Optional[core_models.ChangeDataCaptureConfiguration] = pydantic.Field(alias=str("changeDataCapture"), default=None) # type: ignore[literal-required] - - -class CreateStreamingDatasetRequest(core.ModelBase): - """CreateStreamingDatasetRequest""" - - name: datasets_models.DatasetName - parent_folder_rid: filesystem_models.FolderRid = pydantic.Field(alias=str("parentFolderRid")) # type: ignore[literal-required] - schema_: core_models.StreamSchema = pydantic.Field(alias=str("schema")) # type: ignore[literal-required] - """The Foundry schema to apply to the new stream.""" - - branch_name: typing.Optional[datasets_models.BranchName] = pydantic.Field(alias=str("branchName"), default=None) # type: ignore[literal-required] - """ - The branch to create the initial stream on. If not specified, the default branch will be used - ('master' for most enrollments). - """ - - partitions_count: typing.Optional[PartitionsCount] = pydantic.Field(alias=str("partitionsCount"), default=None) # type: ignore[literal-required] - """ - The number of partitions for the Foundry stream. - - Generally, each partition can handle about 5 mb/s of data, so for higher volume streams, more partitions - are recommended. - - If not specified, 1 partition is used. - - This value cannot be changed later. - """ - - stream_type: typing.Optional[StreamType] = pydantic.Field(alias=str("streamType"), default=None) # type: ignore[literal-required] - """ - A conceptual representation of the expected shape of the data for a stream. HIGH_THROUGHPUT and - LOW_LATENCY are not compatible with each other. Defaults to LOW_LATENCY. - """ - - compressed: typing.Optional[Compressed] = None - """Whether or not compression is enabled for the stream. Defaults to false.""" - - -class Dataset(core.ModelBase): - """Dataset""" - - rid: datasets_models.DatasetRid - name: datasets_models.DatasetName - parent_folder_rid: filesystem_models.FolderRid = pydantic.Field(alias=str("parentFolderRid")) # type: ignore[literal-required] - - -PartitionsCount = int -"""The number of partitions for a Foundry stream.""" - - -class PublishRecordToStreamRequest(core.ModelBase): - """PublishRecordToStreamRequest""" - - record: Record - """The record to publish to the stream""" - - view_rid: typing.Optional[ViewRid] = pydantic.Field(alias=str("viewRid"), default=None) # type: ignore[literal-required] - """ - If provided, this endpoint will only write to the stream corresponding to the specified view rid. If - not provided, this endpoint will write the latest stream on the branch. - - Providing this value is an advanced configuration, to be used when additional control over the - underlying streaming data structures is needed. - """ - - -class PublishRecordsToStreamRequest(core.ModelBase): - """PublishRecordsToStreamRequest""" - - records: typing.List[Record] - """The records to publish to the stream""" - - view_rid: typing.Optional[ViewRid] = pydantic.Field(alias=str("viewRid"), default=None) # type: ignore[literal-required] - """ - If provided, this endpoint will only write to the stream corresponding to the specified view rid. If - not provided, this endpoint will write to the latest stream on the branch. - - Providing this value is an advanced configuration, to be used when additional control over the - underlying streaming data structures is needed. - """ - - -Record = typing.Dict[str, typing.Optional[typing.Any]] -"""A record to be published to a stream.""" - - -class ResetStreamRequest(core.ModelBase): - """ResetStreamRequest""" - - schema_: typing.Optional[core_models.StreamSchema] = pydantic.Field(alias=str("schema"), default=None) # type: ignore[literal-required] - """ - The Foundry schema to apply to the new stream. - - If omitted, the schema of the existing stream on the branch will be used. - """ - - partitions_count: typing.Optional[PartitionsCount] = pydantic.Field(alias=str("partitionsCount"), default=None) # type: ignore[literal-required] - """ - The number of partitions for the Foundry stream. - Generally, each partition can handle about 5 mb/s of data, so for higher volume streams, more partitions - are recommended. - - If omitted, the partitions count of the existing stream on the branch will be used. - """ - - stream_type: typing.Optional[StreamType] = pydantic.Field(alias=str("streamType"), default=None) # type: ignore[literal-required] - """ - A conceptual representation of the expected shape of the data for a stream. HIGH_THROUGHPUT and - LOW_LATENCY are not compatible with each other. Defaults to LOW_LATENCY. - - If omitted, the stream type of the existing stream on the branch will be used. - """ - - compressed: typing.Optional[Compressed] = None - """ - Whether or not compression is enabled for the stream. - - If omitted, the compression setting of the existing stream on the branch will be used. - """ - - -class Stream(core.ModelBase): - """Stream""" - - branch_name: datasets_models.BranchName = pydantic.Field(alias=str("branchName")) # type: ignore[literal-required] - schema_: core_models.StreamSchema = pydantic.Field(alias=str("schema")) # type: ignore[literal-required] - """The Foundry schema for this stream.""" - - view_rid: ViewRid = pydantic.Field(alias=str("viewRid")) # type: ignore[literal-required] - """The view that this stream corresponds to.""" - - partitions_count: PartitionsCount = pydantic.Field(alias=str("partitionsCount")) # type: ignore[literal-required] - """ - The number of partitions for the Foundry stream. Defaults to 1. - - Generally, each partition can handle about 5 mb/s of data, so for higher volume streams, more partitions - are recommended. - """ - - stream_type: StreamType = pydantic.Field(alias=str("streamType")) # type: ignore[literal-required] - """ - A conceptual representation of the expected shape of the data for a stream. HIGH_THROUGHPUT and - LOW_LATENCY are not compatible with each other. Defaults to LOW_LATENCY. - """ - - compressed: Compressed - """Whether or not compression is enabled for the stream. Defaults to false.""" - - -StreamType = typing.Literal["LOW_LATENCY", "HIGH_THROUGHPUT"] -""" -LOW_LATENCY: The default stream type. Recommended for most use cases. - -HIGH_THROUGHPUT: Best for streams that send large amounts of data every second. Using this stream type might -introduce some non-zero latency at the expense of a higher throughput. This stream type is only -recommended if you inspect your stream metrics in-platform and observe that the average batch size is equal -to the max match size, or if jobs using the stream are failing due to Kafka producer batches expiring. For -additional information on inspecting stream metrics, refer to the -(stream monitoring)[/docs/foundry/data-integration/stream-monitoring/#viewing-metrics] documentation. - -For more information, refer to the [stream types](https://palantir.com/docs/foundry/data-integration/streams/#stream-types) -documentation. -""" - - -ViewRid = core.RID -"""The resource identifier (RID) of the view that represents a stream.""" - - -core.resolve_forward_references(Record, globalns=globals(), localns=locals()) - -__all__ = [ - "Compressed", - "CreateStreamRequest", - "CreateStreamRequestStreamSchema", - "CreateStreamingDatasetRequest", - "Dataset", - "PartitionsCount", - "PublishRecordToStreamRequest", - "PublishRecordsToStreamRequest", - "Record", - "ResetStreamRequest", - "Stream", - "StreamType", - "ViewRid", -] diff --git a/foundry_sdk/v2/streams/stream.py b/foundry_sdk/v2/streams/stream.py deleted file mode 100644 index 1a72d09eb..000000000 --- a/foundry_sdk/v2/streams/stream.py +++ /dev/null @@ -1,960 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing - -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v2.core import errors as core_errors -from foundry_sdk.v2.core import models as core_models -from foundry_sdk.v2.datasets import errors as datasets_errors -from foundry_sdk.v2.datasets import models as datasets_models -from foundry_sdk.v2.streams import errors as streams_errors -from foundry_sdk.v2.streams import models as streams_models - - -class StreamClient: - """ - The API client for the Stream Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _StreamClientStreaming(self) - self.with_raw_response = _StreamClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def create( - self, - dataset_rid: datasets_models.DatasetRid, - *, - branch_name: datasets_models.BranchName, - schema: streams_models.CreateStreamRequestStreamSchema, - compressed: typing.Optional[streams_models.Compressed] = None, - partitions_count: typing.Optional[streams_models.PartitionsCount] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - stream_type: typing.Optional[streams_models.StreamType] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> streams_models.Stream: - """ - Creates a new branch on the backing streaming dataset, and creates a new stream on that branch. - - :param dataset_rid: - :type dataset_rid: DatasetRid - :param branch_name: - :type branch_name: BranchName - :param schema: The Foundry schema for this stream. - :type schema: CreateStreamRequestStreamSchema - :param compressed: Whether or not compression is enabled for the stream. Defaults to false. - :type compressed: Optional[Compressed] - :param partitions_count: The number of partitions for the Foundry stream. Defaults to 1. Generally, each partition can handle about 5 mb/s of data, so for higher volume streams, more partitions are recommended. - :type partitions_count: Optional[PartitionsCount] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param stream_type: A conceptual representation of the expected shape of the data for a stream. HIGH_THROUGHPUT and LOW_LATENCY are not compatible with each other. Defaults to LOW_LATENCY. - :type stream_type: Optional[StreamType] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: streams_models.Stream - - :raises BranchAlreadyExists: The branch cannot be created because a branch with that name already exists. - :raises CreateStreamPermissionDenied: Could not create the Stream. - :raises InvalidFieldSchema: The field schema failed validations - :raises InvalidSchema: The schema failed validations - :raises InvalidStreamType: The stream type is invalid. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/streams/datasets/{datasetRid}/streams", - query_params={ - "preview": preview, - }, - path_params={ - "datasetRid": dataset_rid, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=streams_models.CreateStreamRequest( - schema_=schema, - partitions_count=partitions_count, - stream_type=stream_type, - branch_name=branch_name, - compressed=compressed, - ), - response_type=streams_models.Stream, - request_timeout=request_timeout, - throwable_errors={ - "BranchAlreadyExists": datasets_errors.BranchAlreadyExists, - "CreateStreamPermissionDenied": streams_errors.CreateStreamPermissionDenied, - "InvalidFieldSchema": core_errors.InvalidFieldSchema, - "InvalidSchema": core_errors.InvalidSchema, - "InvalidStreamType": streams_errors.InvalidStreamType, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - dataset_rid: datasets_models.DatasetRid, - stream_branch_name: datasets_models.BranchName, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> streams_models.Stream: - """ - Get a stream by its branch name. If the branch does not exist, there is no stream on that branch, or the - user does not have permission to access the stream, a 404 error will be returned. - - :param dataset_rid: - :type dataset_rid: DatasetRid - :param stream_branch_name: - :type stream_branch_name: BranchName - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: streams_models.Stream - - :raises InvalidFieldSchema: The field schema failed validations - :raises InvalidStreamNoSchema: The requested stream exists but is invalid, as it does not have a schema. - :raises InvalidStreamType: The stream type is invalid. - :raises StreamNotFound: The given Stream could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/streams/datasets/{datasetRid}/streams/{streamBranchName}", - query_params={ - "preview": preview, - }, - path_params={ - "datasetRid": dataset_rid, - "streamBranchName": stream_branch_name, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=streams_models.Stream, - request_timeout=request_timeout, - throwable_errors={ - "InvalidFieldSchema": core_errors.InvalidFieldSchema, - "InvalidStreamNoSchema": streams_errors.InvalidStreamNoSchema, - "InvalidStreamType": streams_errors.InvalidStreamType, - "StreamNotFound": streams_errors.StreamNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def publish_binary_record( - self, - dataset_rid: datasets_models.DatasetRid, - stream_branch_name: datasets_models.BranchName, - body: bytes, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - view_rid: typing.Optional[streams_models.ViewRid] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> None: - """ - Publish a single binary record to the stream. The stream's schema must be a single binary field. - - :param dataset_rid: - :type dataset_rid: DatasetRid - :param stream_branch_name: - :type stream_branch_name: BranchName - :param body: The binary record to publish to the stream - :type body: bytes - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param view_rid: If provided, this operation will only write to the stream corresponding to the specified view rid. If not provided, this operation will write to the latest stream on the branch. Providing this value is an advanced configuration, to be used when additional control over the underlying streaming data structures is needed. - :type view_rid: Optional[ViewRid] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: None - - :raises PublishBinaryRecordToStreamPermissionDenied: Could not publishBinaryRecord the Stream. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/highScale/streams/datasets/{datasetRid}/streams/{streamBranchName}/publishBinaryRecord", - query_params={ - "preview": preview, - "viewRid": view_rid, - }, - path_params={ - "datasetRid": dataset_rid, - "streamBranchName": stream_branch_name, - }, - header_params={ - "Content-Type": "application/octet-stream", - }, - body=body, - response_type=None, - request_timeout=request_timeout, - throwable_errors={ - "PublishBinaryRecordToStreamPermissionDenied": streams_errors.PublishBinaryRecordToStreamPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def publish_record( - self, - dataset_rid: datasets_models.DatasetRid, - stream_branch_name: datasets_models.BranchName, - *, - record: streams_models.Record, - preview: typing.Optional[core_models.PreviewMode] = None, - view_rid: typing.Optional[streams_models.ViewRid] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> None: - """ - Publish a single record to the stream. The record will be validated against the stream's schema, and - rejected if it is invalid. - - :param dataset_rid: - :type dataset_rid: DatasetRid - :param stream_branch_name: - :type stream_branch_name: BranchName - :param record: The record to publish to the stream - :type record: Record - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param view_rid: If provided, this endpoint will only write to the stream corresponding to the specified view rid. If not provided, this endpoint will write the latest stream on the branch. Providing this value is an advanced configuration, to be used when additional control over the underlying streaming data structures is needed. - :type view_rid: Optional[ViewRid] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: None - - :raises PublishRecordToStreamPermissionDenied: Could not publishRecord the Stream. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/highScale/streams/datasets/{datasetRid}/streams/{streamBranchName}/publishRecord", - query_params={ - "preview": preview, - }, - path_params={ - "datasetRid": dataset_rid, - "streamBranchName": stream_branch_name, - }, - header_params={ - "Content-Type": "application/json", - }, - body=streams_models.PublishRecordToStreamRequest( - record=record, - view_rid=view_rid, - ), - response_type=None, - request_timeout=request_timeout, - throwable_errors={ - "PublishRecordToStreamPermissionDenied": streams_errors.PublishRecordToStreamPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def publish_records( - self, - dataset_rid: datasets_models.DatasetRid, - stream_branch_name: datasets_models.BranchName, - *, - records: typing.List[streams_models.Record], - preview: typing.Optional[core_models.PreviewMode] = None, - view_rid: typing.Optional[streams_models.ViewRid] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> None: - """ - Publish a batch of records to the stream. The records will be validated against the stream's schema, and - the batch will be rejected if one or more of the records are invalid. - - :param dataset_rid: - :type dataset_rid: DatasetRid - :param stream_branch_name: - :type stream_branch_name: BranchName - :param records: The records to publish to the stream - :type records: List[Record] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param view_rid: If provided, this endpoint will only write to the stream corresponding to the specified view rid. If not provided, this endpoint will write to the latest stream on the branch. Providing this value is an advanced configuration, to be used when additional control over the underlying streaming data structures is needed. - :type view_rid: Optional[ViewRid] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: None - - :raises PublishRecordsToStreamPermissionDenied: Could not publishRecords the Stream. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/highScale/streams/datasets/{datasetRid}/streams/{streamBranchName}/publishRecords", - query_params={ - "preview": preview, - }, - path_params={ - "datasetRid": dataset_rid, - "streamBranchName": stream_branch_name, - }, - header_params={ - "Content-Type": "application/json", - }, - body=streams_models.PublishRecordsToStreamRequest( - records=records, - view_rid=view_rid, - ), - response_type=None, - request_timeout=request_timeout, - throwable_errors={ - "PublishRecordsToStreamPermissionDenied": streams_errors.PublishRecordsToStreamPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def reset( - self, - dataset_rid: datasets_models.DatasetRid, - stream_branch_name: datasets_models.BranchName, - *, - compressed: typing.Optional[streams_models.Compressed] = None, - partitions_count: typing.Optional[streams_models.PartitionsCount] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - schema: typing.Optional[core_models.StreamSchema] = None, - stream_type: typing.Optional[streams_models.StreamType] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> streams_models.Stream: - """ - Reset the stream on the given dataset branch, clearing the existing records and allowing new configurations - to be applied. - - To change the stream settings without clearing the records, update the stream settings in-platform. - - This will create a new stream view (as seen by the change of the `viewRid` on the branch), - which will be the new stream view that will be written to for the branch. - - :param dataset_rid: - :type dataset_rid: DatasetRid - :param stream_branch_name: - :type stream_branch_name: BranchName - :param compressed: Whether or not compression is enabled for the stream. If omitted, the compression setting of the existing stream on the branch will be used. - :type compressed: Optional[Compressed] - :param partitions_count: The number of partitions for the Foundry stream. Generally, each partition can handle about 5 mb/s of data, so for higher volume streams, more partitions are recommended. If omitted, the partitions count of the existing stream on the branch will be used. - :type partitions_count: Optional[PartitionsCount] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param schema: The Foundry schema to apply to the new stream. If omitted, the schema of the existing stream on the branch will be used. - :type schema: Optional[StreamSchema] - :param stream_type: A conceptual representation of the expected shape of the data for a stream. HIGH_THROUGHPUT and LOW_LATENCY are not compatible with each other. Defaults to LOW_LATENCY. If omitted, the stream type of the existing stream on the branch will be used. - :type stream_type: Optional[StreamType] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: streams_models.Stream - - :raises InvalidFieldSchema: The field schema failed validations - :raises InvalidSchema: The schema failed validations - :raises InvalidStreamNoSchema: The requested stream exists but is invalid, as it does not have a schema. - :raises InvalidStreamType: The stream type is invalid. - :raises ResetStreamPermissionDenied: Could not reset the Stream. - :raises StreamNotFound: The given Stream could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/streams/datasets/{datasetRid}/streams/{streamBranchName}/reset", - query_params={ - "preview": preview, - }, - path_params={ - "datasetRid": dataset_rid, - "streamBranchName": stream_branch_name, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=streams_models.ResetStreamRequest( - schema_=schema, - partitions_count=partitions_count, - stream_type=stream_type, - compressed=compressed, - ), - response_type=streams_models.Stream, - request_timeout=request_timeout, - throwable_errors={ - "InvalidFieldSchema": core_errors.InvalidFieldSchema, - "InvalidSchema": core_errors.InvalidSchema, - "InvalidStreamNoSchema": streams_errors.InvalidStreamNoSchema, - "InvalidStreamType": streams_errors.InvalidStreamType, - "ResetStreamPermissionDenied": streams_errors.ResetStreamPermissionDenied, - "StreamNotFound": streams_errors.StreamNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _StreamClientRaw: - def __init__(self, client: StreamClient) -> None: - def create(_: streams_models.Stream): ... - def get(_: streams_models.Stream): ... - def publish_binary_record(_: None): ... - def publish_record(_: None): ... - def publish_records(_: None): ... - def reset(_: streams_models.Stream): ... - - self.create = core.with_raw_response(create, client.create) - self.get = core.with_raw_response(get, client.get) - self.publish_binary_record = core.with_raw_response( - publish_binary_record, client.publish_binary_record - ) - self.publish_record = core.with_raw_response(publish_record, client.publish_record) - self.publish_records = core.with_raw_response(publish_records, client.publish_records) - self.reset = core.with_raw_response(reset, client.reset) - - -class _StreamClientStreaming: - def __init__(self, client: StreamClient) -> None: - def create(_: streams_models.Stream): ... - def get(_: streams_models.Stream): ... - def reset(_: streams_models.Stream): ... - - self.create = core.with_streaming_response(create, client.create) - self.get = core.with_streaming_response(get, client.get) - self.reset = core.with_streaming_response(reset, client.reset) - - -class AsyncStreamClient: - """ - The API client for the Stream Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AsyncStreamClientStreaming(self) - self.with_raw_response = _AsyncStreamClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def create( - self, - dataset_rid: datasets_models.DatasetRid, - *, - branch_name: datasets_models.BranchName, - schema: streams_models.CreateStreamRequestStreamSchema, - compressed: typing.Optional[streams_models.Compressed] = None, - partitions_count: typing.Optional[streams_models.PartitionsCount] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - stream_type: typing.Optional[streams_models.StreamType] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[streams_models.Stream]: - """ - Creates a new branch on the backing streaming dataset, and creates a new stream on that branch. - - :param dataset_rid: - :type dataset_rid: DatasetRid - :param branch_name: - :type branch_name: BranchName - :param schema: The Foundry schema for this stream. - :type schema: CreateStreamRequestStreamSchema - :param compressed: Whether or not compression is enabled for the stream. Defaults to false. - :type compressed: Optional[Compressed] - :param partitions_count: The number of partitions for the Foundry stream. Defaults to 1. Generally, each partition can handle about 5 mb/s of data, so for higher volume streams, more partitions are recommended. - :type partitions_count: Optional[PartitionsCount] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param stream_type: A conceptual representation of the expected shape of the data for a stream. HIGH_THROUGHPUT and LOW_LATENCY are not compatible with each other. Defaults to LOW_LATENCY. - :type stream_type: Optional[StreamType] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[streams_models.Stream] - - :raises BranchAlreadyExists: The branch cannot be created because a branch with that name already exists. - :raises CreateStreamPermissionDenied: Could not create the Stream. - :raises InvalidFieldSchema: The field schema failed validations - :raises InvalidSchema: The schema failed validations - :raises InvalidStreamType: The stream type is invalid. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/streams/datasets/{datasetRid}/streams", - query_params={ - "preview": preview, - }, - path_params={ - "datasetRid": dataset_rid, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=streams_models.CreateStreamRequest( - schema_=schema, - partitions_count=partitions_count, - stream_type=stream_type, - branch_name=branch_name, - compressed=compressed, - ), - response_type=streams_models.Stream, - request_timeout=request_timeout, - throwable_errors={ - "BranchAlreadyExists": datasets_errors.BranchAlreadyExists, - "CreateStreamPermissionDenied": streams_errors.CreateStreamPermissionDenied, - "InvalidFieldSchema": core_errors.InvalidFieldSchema, - "InvalidSchema": core_errors.InvalidSchema, - "InvalidStreamType": streams_errors.InvalidStreamType, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - dataset_rid: datasets_models.DatasetRid, - stream_branch_name: datasets_models.BranchName, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[streams_models.Stream]: - """ - Get a stream by its branch name. If the branch does not exist, there is no stream on that branch, or the - user does not have permission to access the stream, a 404 error will be returned. - - :param dataset_rid: - :type dataset_rid: DatasetRid - :param stream_branch_name: - :type stream_branch_name: BranchName - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[streams_models.Stream] - - :raises InvalidFieldSchema: The field schema failed validations - :raises InvalidStreamNoSchema: The requested stream exists but is invalid, as it does not have a schema. - :raises InvalidStreamType: The stream type is invalid. - :raises StreamNotFound: The given Stream could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/streams/datasets/{datasetRid}/streams/{streamBranchName}", - query_params={ - "preview": preview, - }, - path_params={ - "datasetRid": dataset_rid, - "streamBranchName": stream_branch_name, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=streams_models.Stream, - request_timeout=request_timeout, - throwable_errors={ - "InvalidFieldSchema": core_errors.InvalidFieldSchema, - "InvalidStreamNoSchema": streams_errors.InvalidStreamNoSchema, - "InvalidStreamType": streams_errors.InvalidStreamType, - "StreamNotFound": streams_errors.StreamNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def publish_binary_record( - self, - dataset_rid: datasets_models.DatasetRid, - stream_branch_name: datasets_models.BranchName, - body: bytes, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - view_rid: typing.Optional[streams_models.ViewRid] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[None]: - """ - Publish a single binary record to the stream. The stream's schema must be a single binary field. - - :param dataset_rid: - :type dataset_rid: DatasetRid - :param stream_branch_name: - :type stream_branch_name: BranchName - :param body: The binary record to publish to the stream - :type body: bytes - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param view_rid: If provided, this operation will only write to the stream corresponding to the specified view rid. If not provided, this operation will write to the latest stream on the branch. Providing this value is an advanced configuration, to be used when additional control over the underlying streaming data structures is needed. - :type view_rid: Optional[ViewRid] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[None] - - :raises PublishBinaryRecordToStreamPermissionDenied: Could not publishBinaryRecord the Stream. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/highScale/streams/datasets/{datasetRid}/streams/{streamBranchName}/publishBinaryRecord", - query_params={ - "preview": preview, - "viewRid": view_rid, - }, - path_params={ - "datasetRid": dataset_rid, - "streamBranchName": stream_branch_name, - }, - header_params={ - "Content-Type": "application/octet-stream", - }, - body=body, - response_type=None, - request_timeout=request_timeout, - throwable_errors={ - "PublishBinaryRecordToStreamPermissionDenied": streams_errors.PublishBinaryRecordToStreamPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def publish_record( - self, - dataset_rid: datasets_models.DatasetRid, - stream_branch_name: datasets_models.BranchName, - *, - record: streams_models.Record, - preview: typing.Optional[core_models.PreviewMode] = None, - view_rid: typing.Optional[streams_models.ViewRid] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[None]: - """ - Publish a single record to the stream. The record will be validated against the stream's schema, and - rejected if it is invalid. - - :param dataset_rid: - :type dataset_rid: DatasetRid - :param stream_branch_name: - :type stream_branch_name: BranchName - :param record: The record to publish to the stream - :type record: Record - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param view_rid: If provided, this endpoint will only write to the stream corresponding to the specified view rid. If not provided, this endpoint will write the latest stream on the branch. Providing this value is an advanced configuration, to be used when additional control over the underlying streaming data structures is needed. - :type view_rid: Optional[ViewRid] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[None] - - :raises PublishRecordToStreamPermissionDenied: Could not publishRecord the Stream. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/highScale/streams/datasets/{datasetRid}/streams/{streamBranchName}/publishRecord", - query_params={ - "preview": preview, - }, - path_params={ - "datasetRid": dataset_rid, - "streamBranchName": stream_branch_name, - }, - header_params={ - "Content-Type": "application/json", - }, - body=streams_models.PublishRecordToStreamRequest( - record=record, - view_rid=view_rid, - ), - response_type=None, - request_timeout=request_timeout, - throwable_errors={ - "PublishRecordToStreamPermissionDenied": streams_errors.PublishRecordToStreamPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def publish_records( - self, - dataset_rid: datasets_models.DatasetRid, - stream_branch_name: datasets_models.BranchName, - *, - records: typing.List[streams_models.Record], - preview: typing.Optional[core_models.PreviewMode] = None, - view_rid: typing.Optional[streams_models.ViewRid] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[None]: - """ - Publish a batch of records to the stream. The records will be validated against the stream's schema, and - the batch will be rejected if one or more of the records are invalid. - - :param dataset_rid: - :type dataset_rid: DatasetRid - :param stream_branch_name: - :type stream_branch_name: BranchName - :param records: The records to publish to the stream - :type records: List[Record] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param view_rid: If provided, this endpoint will only write to the stream corresponding to the specified view rid. If not provided, this endpoint will write to the latest stream on the branch. Providing this value is an advanced configuration, to be used when additional control over the underlying streaming data structures is needed. - :type view_rid: Optional[ViewRid] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[None] - - :raises PublishRecordsToStreamPermissionDenied: Could not publishRecords the Stream. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/highScale/streams/datasets/{datasetRid}/streams/{streamBranchName}/publishRecords", - query_params={ - "preview": preview, - }, - path_params={ - "datasetRid": dataset_rid, - "streamBranchName": stream_branch_name, - }, - header_params={ - "Content-Type": "application/json", - }, - body=streams_models.PublishRecordsToStreamRequest( - records=records, - view_rid=view_rid, - ), - response_type=None, - request_timeout=request_timeout, - throwable_errors={ - "PublishRecordsToStreamPermissionDenied": streams_errors.PublishRecordsToStreamPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def reset( - self, - dataset_rid: datasets_models.DatasetRid, - stream_branch_name: datasets_models.BranchName, - *, - compressed: typing.Optional[streams_models.Compressed] = None, - partitions_count: typing.Optional[streams_models.PartitionsCount] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - schema: typing.Optional[core_models.StreamSchema] = None, - stream_type: typing.Optional[streams_models.StreamType] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[streams_models.Stream]: - """ - Reset the stream on the given dataset branch, clearing the existing records and allowing new configurations - to be applied. - - To change the stream settings without clearing the records, update the stream settings in-platform. - - This will create a new stream view (as seen by the change of the `viewRid` on the branch), - which will be the new stream view that will be written to for the branch. - - :param dataset_rid: - :type dataset_rid: DatasetRid - :param stream_branch_name: - :type stream_branch_name: BranchName - :param compressed: Whether or not compression is enabled for the stream. If omitted, the compression setting of the existing stream on the branch will be used. - :type compressed: Optional[Compressed] - :param partitions_count: The number of partitions for the Foundry stream. Generally, each partition can handle about 5 mb/s of data, so for higher volume streams, more partitions are recommended. If omitted, the partitions count of the existing stream on the branch will be used. - :type partitions_count: Optional[PartitionsCount] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param schema: The Foundry schema to apply to the new stream. If omitted, the schema of the existing stream on the branch will be used. - :type schema: Optional[StreamSchema] - :param stream_type: A conceptual representation of the expected shape of the data for a stream. HIGH_THROUGHPUT and LOW_LATENCY are not compatible with each other. Defaults to LOW_LATENCY. If omitted, the stream type of the existing stream on the branch will be used. - :type stream_type: Optional[StreamType] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[streams_models.Stream] - - :raises InvalidFieldSchema: The field schema failed validations - :raises InvalidSchema: The schema failed validations - :raises InvalidStreamNoSchema: The requested stream exists but is invalid, as it does not have a schema. - :raises InvalidStreamType: The stream type is invalid. - :raises ResetStreamPermissionDenied: Could not reset the Stream. - :raises StreamNotFound: The given Stream could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/streams/datasets/{datasetRid}/streams/{streamBranchName}/reset", - query_params={ - "preview": preview, - }, - path_params={ - "datasetRid": dataset_rid, - "streamBranchName": stream_branch_name, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=streams_models.ResetStreamRequest( - schema_=schema, - partitions_count=partitions_count, - stream_type=stream_type, - compressed=compressed, - ), - response_type=streams_models.Stream, - request_timeout=request_timeout, - throwable_errors={ - "InvalidFieldSchema": core_errors.InvalidFieldSchema, - "InvalidSchema": core_errors.InvalidSchema, - "InvalidStreamNoSchema": streams_errors.InvalidStreamNoSchema, - "InvalidStreamType": streams_errors.InvalidStreamType, - "ResetStreamPermissionDenied": streams_errors.ResetStreamPermissionDenied, - "StreamNotFound": streams_errors.StreamNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _AsyncStreamClientRaw: - def __init__(self, client: AsyncStreamClient) -> None: - def create(_: streams_models.Stream): ... - def get(_: streams_models.Stream): ... - def publish_binary_record(_: None): ... - def publish_record(_: None): ... - def publish_records(_: None): ... - def reset(_: streams_models.Stream): ... - - self.create = core.async_with_raw_response(create, client.create) - self.get = core.async_with_raw_response(get, client.get) - self.publish_binary_record = core.async_with_raw_response( - publish_binary_record, client.publish_binary_record - ) - self.publish_record = core.async_with_raw_response(publish_record, client.publish_record) - self.publish_records = core.async_with_raw_response(publish_records, client.publish_records) - self.reset = core.async_with_raw_response(reset, client.reset) - - -class _AsyncStreamClientStreaming: - def __init__(self, client: AsyncStreamClient) -> None: - def create(_: streams_models.Stream): ... - def get(_: streams_models.Stream): ... - def reset(_: streams_models.Stream): ... - - self.create = core.async_with_streaming_response(create, client.create) - self.get = core.async_with_streaming_response(get, client.get) - self.reset = core.async_with_streaming_response(reset, client.reset) diff --git a/foundry_sdk/v2/third_party_applications/__init__.py b/foundry_sdk/v2/third_party_applications/__init__.py deleted file mode 100644 index f23d3d134..000000000 --- a/foundry_sdk/v2/third_party_applications/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -from foundry_sdk.v2.third_party_applications._client import ( - AsyncThirdPartyApplicationsClient, -) # NOQA -from foundry_sdk.v2.third_party_applications._client import ThirdPartyApplicationsClient - -__all__ = [ - "ThirdPartyApplicationsClient", - "AsyncThirdPartyApplicationsClient", -] diff --git a/foundry_sdk/v2/third_party_applications/_client.py b/foundry_sdk/v2/third_party_applications/_client.py deleted file mode 100644 index 858314ceb..000000000 --- a/foundry_sdk/v2/third_party_applications/_client.py +++ /dev/null @@ -1,75 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing -from functools import cached_property - -from foundry_sdk import _core as core - - -class ThirdPartyApplicationsClient: - """ - The API client for the ThirdPartyApplications Namespace. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - - @cached_property - def ThirdPartyApplication(self): - from foundry_sdk.v2.third_party_applications.third_party_application import ( - ThirdPartyApplicationClient, - ) # NOQA - - return ThirdPartyApplicationClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - -class AsyncThirdPartyApplicationsClient: - """ - The Async API client for the ThirdPartyApplications Namespace. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - from foundry_sdk.v2.third_party_applications.third_party_application import ( - AsyncThirdPartyApplicationClient, - ) # NOQA - - self.ThirdPartyApplication = AsyncThirdPartyApplicationClient( - auth=auth, hostname=hostname, config=config - ) diff --git a/foundry_sdk/v2/third_party_applications/errors.py b/foundry_sdk/v2/third_party_applications/errors.py deleted file mode 100644 index d025e2705..000000000 --- a/foundry_sdk/v2/third_party_applications/errors.py +++ /dev/null @@ -1,275 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing -from dataclasses import dataclass - -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v2.third_party_applications import ( - models as third_party_applications_models, -) # NOQA - - -class CannotDeleteDeployedVersionParameters(typing_extensions.TypedDict): - """The given website version is deployed. You must un-deploy it before deleting it.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - version: third_party_applications_models.VersionVersion - - -@dataclass -class CannotDeleteDeployedVersion(errors.BadRequestError): - name: typing.Literal["CannotDeleteDeployedVersion"] - parameters: CannotDeleteDeployedVersionParameters - error_instance_id: str - - -class DeleteVersionPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not delete the Version.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - thirdPartyApplicationRid: third_party_applications_models.ThirdPartyApplicationRid - """An RID identifying a third-party application created in Developer Console.""" - - versionVersion: third_party_applications_models.VersionVersion - """The semantic version of the Website.""" - - -@dataclass -class DeleteVersionPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["DeleteVersionPermissionDenied"] - parameters: DeleteVersionPermissionDeniedParameters - error_instance_id: str - - -class DeployWebsitePermissionDeniedParameters(typing_extensions.TypedDict): - """Could not deploy the Website.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - thirdPartyApplicationRid: third_party_applications_models.ThirdPartyApplicationRid - """An RID identifying a third-party application created in Developer Console.""" - - -@dataclass -class DeployWebsitePermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["DeployWebsitePermissionDenied"] - parameters: DeployWebsitePermissionDeniedParameters - error_instance_id: str - - -class FileCountLimitExceededParameters(typing_extensions.TypedDict): - """The .zip archive contains too many files.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - fileCountLimit: int - - -@dataclass -class FileCountLimitExceeded(errors.BadRequestError): - name: typing.Literal["FileCountLimitExceeded"] - parameters: FileCountLimitExceededParameters - error_instance_id: str - - -class FileSizeLimitExceededParameters(typing_extensions.TypedDict): - """ - A file inside the .zip archive is too big. You must ensure that all files inside - the .zip archive are within the limit. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - fileSizeBytesLimit: core.Long - currentFileSizeBytes: core.Long - currentFilePath: str - - -@dataclass -class FileSizeLimitExceeded(errors.BadRequestError): - name: typing.Literal["FileSizeLimitExceeded"] - parameters: FileSizeLimitExceededParameters - error_instance_id: str - - -class InvalidVersionParameters(typing_extensions.TypedDict): - """The given website version is invalid. Versions must follow semantic versioning with major, minor, and patch versions separate by periods, e.g. `0.1.0` or `1.2.3`.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - version: str - - -@dataclass -class InvalidVersion(errors.BadRequestError): - name: typing.Literal["InvalidVersion"] - parameters: InvalidVersionParameters - error_instance_id: str - - -class ThirdPartyApplicationNotFoundParameters(typing_extensions.TypedDict): - """The given ThirdPartyApplication could not be found.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - thirdPartyApplicationRid: third_party_applications_models.ThirdPartyApplicationRid - """An RID identifying a third-party application created in Developer Console.""" - - -@dataclass -class ThirdPartyApplicationNotFound(errors.NotFoundError): - name: typing.Literal["ThirdPartyApplicationNotFound"] - parameters: ThirdPartyApplicationNotFoundParameters - error_instance_id: str - - -class UndeployWebsitePermissionDeniedParameters(typing_extensions.TypedDict): - """Could not undeploy the Website.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - thirdPartyApplicationRid: third_party_applications_models.ThirdPartyApplicationRid - """An RID identifying a third-party application created in Developer Console.""" - - -@dataclass -class UndeployWebsitePermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["UndeployWebsitePermissionDenied"] - parameters: UndeployWebsitePermissionDeniedParameters - error_instance_id: str - - -class UploadSnapshotVersionPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not uploadSnapshot the Version.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - thirdPartyApplicationRid: third_party_applications_models.ThirdPartyApplicationRid - """An RID identifying a third-party application created in Developer Console.""" - - -@dataclass -class UploadSnapshotVersionPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["UploadSnapshotVersionPermissionDenied"] - parameters: UploadSnapshotVersionPermissionDeniedParameters - error_instance_id: str - - -class UploadVersionPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not upload the Version.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - thirdPartyApplicationRid: third_party_applications_models.ThirdPartyApplicationRid - """An RID identifying a third-party application created in Developer Console.""" - - -@dataclass -class UploadVersionPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["UploadVersionPermissionDenied"] - parameters: UploadVersionPermissionDeniedParameters - error_instance_id: str - - -class VersionAlreadyExistsParameters(typing_extensions.TypedDict): - """The given website version already exists.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - version: third_party_applications_models.VersionVersion - - -@dataclass -class VersionAlreadyExists(errors.ConflictError): - name: typing.Literal["VersionAlreadyExists"] - parameters: VersionAlreadyExistsParameters - error_instance_id: str - - -class VersionLimitExceededParameters(typing_extensions.TypedDict): - """ - The website contains too many versions. You must delete an old version before - uploading a new one. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - versionLimit: int - - -@dataclass -class VersionLimitExceeded(errors.BadRequestError): - name: typing.Literal["VersionLimitExceeded"] - parameters: VersionLimitExceededParameters - error_instance_id: str - - -class VersionNotFoundParameters(typing_extensions.TypedDict): - """The given Version could not be found.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - thirdPartyApplicationRid: third_party_applications_models.ThirdPartyApplicationRid - """An RID identifying a third-party application created in Developer Console.""" - - versionVersion: third_party_applications_models.VersionVersion - """The semantic version of the Website.""" - - -@dataclass -class VersionNotFound(errors.NotFoundError): - name: typing.Literal["VersionNotFound"] - parameters: VersionNotFoundParameters - error_instance_id: str - - -class WebsiteNotFoundParameters(typing_extensions.TypedDict): - """The given Website could not be found.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - thirdPartyApplicationRid: third_party_applications_models.ThirdPartyApplicationRid - """An RID identifying a third-party application created in Developer Console.""" - - -@dataclass -class WebsiteNotFound(errors.NotFoundError): - name: typing.Literal["WebsiteNotFound"] - parameters: WebsiteNotFoundParameters - error_instance_id: str - - -__all__ = [ - "CannotDeleteDeployedVersion", - "DeleteVersionPermissionDenied", - "DeployWebsitePermissionDenied", - "FileCountLimitExceeded", - "FileSizeLimitExceeded", - "InvalidVersion", - "ThirdPartyApplicationNotFound", - "UndeployWebsitePermissionDenied", - "UploadSnapshotVersionPermissionDenied", - "UploadVersionPermissionDenied", - "VersionAlreadyExists", - "VersionLimitExceeded", - "VersionNotFound", - "WebsiteNotFound", -] diff --git a/foundry_sdk/v2/third_party_applications/models.py b/foundry_sdk/v2/third_party_applications/models.py deleted file mode 100644 index a37e952d5..000000000 --- a/foundry_sdk/v2/third_party_applications/models.py +++ /dev/null @@ -1,84 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -from __future__ import annotations - -import typing - -import pydantic - -from foundry_sdk import _core as core -from foundry_sdk.v2.core import models as core_models - - -class DeployWebsiteRequest(core.ModelBase): - """DeployWebsiteRequest""" - - version: VersionVersion - - -class ListVersionsResponse(core.ModelBase): - """ListVersionsResponse""" - - data: typing.List[Version] - next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] - - -Subdomain = str -"""A subdomain from which a website is served.""" - - -class ThirdPartyApplication(core.ModelBase): - """ThirdPartyApplication""" - - rid: ThirdPartyApplicationRid - """An RID identifying a third-party application created in Developer Console.""" - - -ThirdPartyApplicationRid = core.RID -"""An RID identifying a third-party application created in Developer Console.""" - - -class Version(core.ModelBase): - """Version""" - - version: VersionVersion - """The semantic version of the Website.""" - - -VersionVersion = str -"""The semantic version of the Website.""" - - -class Website(core.ModelBase): - """Website""" - - deployed_version: typing.Optional[VersionVersion] = pydantic.Field(alias=str("deployedVersion"), default=None) # type: ignore[literal-required] - """The version of the Website that is currently deployed.""" - - subdomains: typing.List[Subdomain] - """The subdomains from which the Website is currently served.""" - - -__all__ = [ - "DeployWebsiteRequest", - "ListVersionsResponse", - "Subdomain", - "ThirdPartyApplication", - "ThirdPartyApplicationRid", - "Version", - "VersionVersion", - "Website", -] diff --git a/foundry_sdk/v2/third_party_applications/third_party_application.py b/foundry_sdk/v2/third_party_applications/third_party_application.py deleted file mode 100644 index b6746fc68..000000000 --- a/foundry_sdk/v2/third_party_applications/third_party_application.py +++ /dev/null @@ -1,222 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing -from functools import cached_property - -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v2.core import models as core_models -from foundry_sdk.v2.third_party_applications import ( - errors as third_party_applications_errors, -) # NOQA -from foundry_sdk.v2.third_party_applications import ( - models as third_party_applications_models, -) # NOQA - - -class ThirdPartyApplicationClient: - """ - The API client for the ThirdPartyApplication Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _ThirdPartyApplicationClientStreaming(self) - self.with_raw_response = _ThirdPartyApplicationClientRaw(self) - - @cached_property - def Website(self): - from foundry_sdk.v2.third_party_applications.website import WebsiteClient - - return WebsiteClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - third_party_application_rid: third_party_applications_models.ThirdPartyApplicationRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> third_party_applications_models.ThirdPartyApplication: - """ - Get the ThirdPartyApplication with the specified rid. - :param third_party_application_rid: An RID identifying a third-party application created in Developer Console. - :type third_party_application_rid: ThirdPartyApplicationRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: third_party_applications_models.ThirdPartyApplication - - :raises ThirdPartyApplicationNotFound: The given ThirdPartyApplication could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/thirdPartyApplications/{thirdPartyApplicationRid}", - query_params={ - "preview": preview, - }, - path_params={ - "thirdPartyApplicationRid": third_party_application_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=third_party_applications_models.ThirdPartyApplication, - request_timeout=request_timeout, - throwable_errors={ - "ThirdPartyApplicationNotFound": third_party_applications_errors.ThirdPartyApplicationNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _ThirdPartyApplicationClientRaw: - def __init__(self, client: ThirdPartyApplicationClient) -> None: - def get(_: third_party_applications_models.ThirdPartyApplication): ... - - self.get = core.with_raw_response(get, client.get) - - -class _ThirdPartyApplicationClientStreaming: - def __init__(self, client: ThirdPartyApplicationClient) -> None: - def get(_: third_party_applications_models.ThirdPartyApplication): ... - - self.get = core.with_streaming_response(get, client.get) - - -class AsyncThirdPartyApplicationClient: - """ - The API client for the ThirdPartyApplication Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AsyncThirdPartyApplicationClientStreaming(self) - self.with_raw_response = _AsyncThirdPartyApplicationClientRaw(self) - - @cached_property - def Website(self): - from foundry_sdk.v2.third_party_applications.website import AsyncWebsiteClient - - return AsyncWebsiteClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - third_party_application_rid: third_party_applications_models.ThirdPartyApplicationRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[third_party_applications_models.ThirdPartyApplication]: - """ - Get the ThirdPartyApplication with the specified rid. - :param third_party_application_rid: An RID identifying a third-party application created in Developer Console. - :type third_party_application_rid: ThirdPartyApplicationRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[third_party_applications_models.ThirdPartyApplication] - - :raises ThirdPartyApplicationNotFound: The given ThirdPartyApplication could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/thirdPartyApplications/{thirdPartyApplicationRid}", - query_params={ - "preview": preview, - }, - path_params={ - "thirdPartyApplicationRid": third_party_application_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=third_party_applications_models.ThirdPartyApplication, - request_timeout=request_timeout, - throwable_errors={ - "ThirdPartyApplicationNotFound": third_party_applications_errors.ThirdPartyApplicationNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _AsyncThirdPartyApplicationClientRaw: - def __init__(self, client: AsyncThirdPartyApplicationClient) -> None: - def get(_: third_party_applications_models.ThirdPartyApplication): ... - - self.get = core.async_with_raw_response(get, client.get) - - -class _AsyncThirdPartyApplicationClientStreaming: - def __init__(self, client: AsyncThirdPartyApplicationClient) -> None: - def get(_: third_party_applications_models.ThirdPartyApplication): ... - - self.get = core.async_with_streaming_response(get, client.get) diff --git a/foundry_sdk/v2/third_party_applications/version.py b/foundry_sdk/v2/third_party_applications/version.py deleted file mode 100644 index 03469cae2..000000000 --- a/foundry_sdk/v2/third_party_applications/version.py +++ /dev/null @@ -1,645 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing - -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v2.core import models as core_models -from foundry_sdk.v2.third_party_applications import ( - errors as third_party_applications_errors, -) # NOQA -from foundry_sdk.v2.third_party_applications import ( - models as third_party_applications_models, -) # NOQA - - -class VersionClient: - """ - The API client for the Version Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _VersionClientStreaming(self) - self.with_raw_response = _VersionClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def delete( - self, - third_party_application_rid: third_party_applications_models.ThirdPartyApplicationRid, - version_version: third_party_applications_models.VersionVersion, - *, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> None: - """ - Delete the Version with the specified version. - :param third_party_application_rid: An RID identifying a third-party application created in Developer Console. - :type third_party_application_rid: ThirdPartyApplicationRid - :param version_version: The semantic version of the Website. - :type version_version: VersionVersion - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: None - - :raises DeleteVersionPermissionDenied: Could not delete the Version. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="DELETE", - resource_path="/v2/thirdPartyApplications/{thirdPartyApplicationRid}/website/versions/{versionVersion}", - query_params={}, - path_params={ - "thirdPartyApplicationRid": third_party_application_rid, - "versionVersion": version_version, - }, - header_params={}, - body=None, - response_type=None, - request_timeout=request_timeout, - throwable_errors={ - "DeleteVersionPermissionDenied": third_party_applications_errors.DeleteVersionPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - third_party_application_rid: third_party_applications_models.ThirdPartyApplicationRid, - version_version: third_party_applications_models.VersionVersion, - *, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> third_party_applications_models.Version: - """ - Get the Version with the specified version. - :param third_party_application_rid: An RID identifying a third-party application created in Developer Console. - :type third_party_application_rid: ThirdPartyApplicationRid - :param version_version: The semantic version of the Website. - :type version_version: VersionVersion - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: third_party_applications_models.Version - - :raises VersionNotFound: The given Version could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/thirdPartyApplications/{thirdPartyApplicationRid}/website/versions/{versionVersion}", - query_params={}, - path_params={ - "thirdPartyApplicationRid": third_party_application_rid, - "versionVersion": version_version, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=third_party_applications_models.Version, - request_timeout=request_timeout, - throwable_errors={ - "VersionNotFound": third_party_applications_errors.VersionNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def list( - self, - third_party_application_rid: third_party_applications_models.ThirdPartyApplicationRid, - *, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.ResourceIterator[third_party_applications_models.Version]: - """ - Lists all Versions. - - This is a paged endpoint. Each page may be smaller or larger than the requested page size. However, it is guaranteed that if there are more results available, the `nextPageToken` field will be populated. To get the next page, make the same request again, but set the value of the `pageToken` query parameter to be value of the `nextPageToken` value of the previous response. If there is no `nextPageToken` field in the response, you are on the last page. - :param third_party_application_rid: An RID identifying a third-party application created in Developer Console. - :type third_party_application_rid: ThirdPartyApplicationRid - :param page_size: The page size to use for the endpoint. - :type page_size: Optional[PageSize] - :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. - :type page_token: Optional[PageToken] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.ResourceIterator[third_party_applications_models.Version] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/thirdPartyApplications/{thirdPartyApplicationRid}/website/versions", - query_params={ - "pageSize": page_size, - "pageToken": page_token, - }, - path_params={ - "thirdPartyApplicationRid": third_party_application_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=third_party_applications_models.ListVersionsResponse, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def upload( - self, - third_party_application_rid: third_party_applications_models.ThirdPartyApplicationRid, - body: bytes, - *, - version: third_party_applications_models.VersionVersion, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> third_party_applications_models.Version: - """ - Upload a new version of the Website. - :param third_party_application_rid: An RID identifying a third-party application created in Developer Console. - :type third_party_application_rid: ThirdPartyApplicationRid - :param body: The zip file that contains the contents of your application. For more information, refer to the [documentation](https://palantir.com/docs/foundry/ontology-sdk/deploy-osdk-application-on-foundry/) user documentation. - :type body: bytes - :param version: - :type version: VersionVersion - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: third_party_applications_models.Version - - :raises UploadVersionPermissionDenied: Could not upload the Version. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/thirdPartyApplications/{thirdPartyApplicationRid}/website/versions/upload", - query_params={ - "version": version, - }, - path_params={ - "thirdPartyApplicationRid": third_party_application_rid, - }, - header_params={ - "Content-Type": "application/octet-stream", - "Accept": "application/json", - }, - body=body, - response_type=third_party_applications_models.Version, - request_timeout=request_timeout, - throwable_errors={ - "UploadVersionPermissionDenied": third_party_applications_errors.UploadVersionPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def upload_snapshot( - self, - third_party_application_rid: third_party_applications_models.ThirdPartyApplicationRid, - body: bytes, - *, - version: third_party_applications_models.VersionVersion, - preview: typing.Optional[core_models.PreviewMode] = None, - snapshot_identifier: typing.Optional[str] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> third_party_applications_models.Version: - """ - Upload a snapshot version of the Website. Snapshot versions are automatically deleted after two days. - - :param third_party_application_rid: An RID identifying a third-party application created in Developer Console. - :type third_party_application_rid: ThirdPartyApplicationRid - :param body: The zip file that contains the contents of your application. For more information, refer to the [documentation](https://palantir.com/docs/foundry/ontology-sdk/deploy-osdk-application-on-foundry/) user documentation. - :type body: bytes - :param version: - :type version: VersionVersion - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param snapshot_identifier: The identifier of the snapshot. If the identifier follows the format `foundry.v1@@@`, PR preview for such identifier will be accessible from foundry code repositories. - :type snapshot_identifier: Optional[str] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: third_party_applications_models.Version - - :raises UploadSnapshotVersionPermissionDenied: Could not uploadSnapshot the Version. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/thirdPartyApplications/{thirdPartyApplicationRid}/website/versions/uploadSnapshot", - query_params={ - "version": version, - "preview": preview, - "snapshotIdentifier": snapshot_identifier, - }, - path_params={ - "thirdPartyApplicationRid": third_party_application_rid, - }, - header_params={ - "Content-Type": "application/octet-stream", - "Accept": "application/json", - }, - body=body, - response_type=third_party_applications_models.Version, - request_timeout=request_timeout, - throwable_errors={ - "UploadSnapshotVersionPermissionDenied": third_party_applications_errors.UploadSnapshotVersionPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _VersionClientRaw: - def __init__(self, client: VersionClient) -> None: - def delete(_: None): ... - def get(_: third_party_applications_models.Version): ... - def list(_: third_party_applications_models.ListVersionsResponse): ... - def upload(_: third_party_applications_models.Version): ... - def upload_snapshot(_: third_party_applications_models.Version): ... - - self.delete = core.with_raw_response(delete, client.delete) - self.get = core.with_raw_response(get, client.get) - self.list = core.with_raw_response(list, client.list) - self.upload = core.with_raw_response(upload, client.upload) - self.upload_snapshot = core.with_raw_response(upload_snapshot, client.upload_snapshot) - - -class _VersionClientStreaming: - def __init__(self, client: VersionClient) -> None: - def get(_: third_party_applications_models.Version): ... - def list(_: third_party_applications_models.ListVersionsResponse): ... - def upload(_: third_party_applications_models.Version): ... - def upload_snapshot(_: third_party_applications_models.Version): ... - - self.get = core.with_streaming_response(get, client.get) - self.list = core.with_streaming_response(list, client.list) - self.upload = core.with_streaming_response(upload, client.upload) - self.upload_snapshot = core.with_streaming_response(upload_snapshot, client.upload_snapshot) - - -class AsyncVersionClient: - """ - The API client for the Version Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AsyncVersionClientStreaming(self) - self.with_raw_response = _AsyncVersionClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def delete( - self, - third_party_application_rid: third_party_applications_models.ThirdPartyApplicationRid, - version_version: third_party_applications_models.VersionVersion, - *, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[None]: - """ - Delete the Version with the specified version. - :param third_party_application_rid: An RID identifying a third-party application created in Developer Console. - :type third_party_application_rid: ThirdPartyApplicationRid - :param version_version: The semantic version of the Website. - :type version_version: VersionVersion - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[None] - - :raises DeleteVersionPermissionDenied: Could not delete the Version. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="DELETE", - resource_path="/v2/thirdPartyApplications/{thirdPartyApplicationRid}/website/versions/{versionVersion}", - query_params={}, - path_params={ - "thirdPartyApplicationRid": third_party_application_rid, - "versionVersion": version_version, - }, - header_params={}, - body=None, - response_type=None, - request_timeout=request_timeout, - throwable_errors={ - "DeleteVersionPermissionDenied": third_party_applications_errors.DeleteVersionPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - third_party_application_rid: third_party_applications_models.ThirdPartyApplicationRid, - version_version: third_party_applications_models.VersionVersion, - *, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[third_party_applications_models.Version]: - """ - Get the Version with the specified version. - :param third_party_application_rid: An RID identifying a third-party application created in Developer Console. - :type third_party_application_rid: ThirdPartyApplicationRid - :param version_version: The semantic version of the Website. - :type version_version: VersionVersion - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[third_party_applications_models.Version] - - :raises VersionNotFound: The given Version could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/thirdPartyApplications/{thirdPartyApplicationRid}/website/versions/{versionVersion}", - query_params={}, - path_params={ - "thirdPartyApplicationRid": third_party_application_rid, - "versionVersion": version_version, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=third_party_applications_models.Version, - request_timeout=request_timeout, - throwable_errors={ - "VersionNotFound": third_party_applications_errors.VersionNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def list( - self, - third_party_application_rid: third_party_applications_models.ThirdPartyApplicationRid, - *, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.AsyncResourceIterator[third_party_applications_models.Version]: - """ - Lists all Versions. - - This is a paged endpoint. Each page may be smaller or larger than the requested page size. However, it is guaranteed that if there are more results available, the `nextPageToken` field will be populated. To get the next page, make the same request again, but set the value of the `pageToken` query parameter to be value of the `nextPageToken` value of the previous response. If there is no `nextPageToken` field in the response, you are on the last page. - :param third_party_application_rid: An RID identifying a third-party application created in Developer Console. - :type third_party_application_rid: ThirdPartyApplicationRid - :param page_size: The page size to use for the endpoint. - :type page_size: Optional[PageSize] - :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. - :type page_token: Optional[PageToken] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.AsyncResourceIterator[third_party_applications_models.Version] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/thirdPartyApplications/{thirdPartyApplicationRid}/website/versions", - query_params={ - "pageSize": page_size, - "pageToken": page_token, - }, - path_params={ - "thirdPartyApplicationRid": third_party_application_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=third_party_applications_models.ListVersionsResponse, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def upload( - self, - third_party_application_rid: third_party_applications_models.ThirdPartyApplicationRid, - body: bytes, - *, - version: third_party_applications_models.VersionVersion, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[third_party_applications_models.Version]: - """ - Upload a new version of the Website. - :param third_party_application_rid: An RID identifying a third-party application created in Developer Console. - :type third_party_application_rid: ThirdPartyApplicationRid - :param body: The zip file that contains the contents of your application. For more information, refer to the [documentation](https://palantir.com/docs/foundry/ontology-sdk/deploy-osdk-application-on-foundry/) user documentation. - :type body: bytes - :param version: - :type version: VersionVersion - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[third_party_applications_models.Version] - - :raises UploadVersionPermissionDenied: Could not upload the Version. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/thirdPartyApplications/{thirdPartyApplicationRid}/website/versions/upload", - query_params={ - "version": version, - }, - path_params={ - "thirdPartyApplicationRid": third_party_application_rid, - }, - header_params={ - "Content-Type": "application/octet-stream", - "Accept": "application/json", - }, - body=body, - response_type=third_party_applications_models.Version, - request_timeout=request_timeout, - throwable_errors={ - "UploadVersionPermissionDenied": third_party_applications_errors.UploadVersionPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def upload_snapshot( - self, - third_party_application_rid: third_party_applications_models.ThirdPartyApplicationRid, - body: bytes, - *, - version: third_party_applications_models.VersionVersion, - preview: typing.Optional[core_models.PreviewMode] = None, - snapshot_identifier: typing.Optional[str] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[third_party_applications_models.Version]: - """ - Upload a snapshot version of the Website. Snapshot versions are automatically deleted after two days. - - :param third_party_application_rid: An RID identifying a third-party application created in Developer Console. - :type third_party_application_rid: ThirdPartyApplicationRid - :param body: The zip file that contains the contents of your application. For more information, refer to the [documentation](https://palantir.com/docs/foundry/ontology-sdk/deploy-osdk-application-on-foundry/) user documentation. - :type body: bytes - :param version: - :type version: VersionVersion - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param snapshot_identifier: The identifier of the snapshot. If the identifier follows the format `foundry.v1@@@`, PR preview for such identifier will be accessible from foundry code repositories. - :type snapshot_identifier: Optional[str] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[third_party_applications_models.Version] - - :raises UploadSnapshotVersionPermissionDenied: Could not uploadSnapshot the Version. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/thirdPartyApplications/{thirdPartyApplicationRid}/website/versions/uploadSnapshot", - query_params={ - "version": version, - "preview": preview, - "snapshotIdentifier": snapshot_identifier, - }, - path_params={ - "thirdPartyApplicationRid": third_party_application_rid, - }, - header_params={ - "Content-Type": "application/octet-stream", - "Accept": "application/json", - }, - body=body, - response_type=third_party_applications_models.Version, - request_timeout=request_timeout, - throwable_errors={ - "UploadSnapshotVersionPermissionDenied": third_party_applications_errors.UploadSnapshotVersionPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _AsyncVersionClientRaw: - def __init__(self, client: AsyncVersionClient) -> None: - def delete(_: None): ... - def get(_: third_party_applications_models.Version): ... - def list(_: third_party_applications_models.ListVersionsResponse): ... - def upload(_: third_party_applications_models.Version): ... - def upload_snapshot(_: third_party_applications_models.Version): ... - - self.delete = core.async_with_raw_response(delete, client.delete) - self.get = core.async_with_raw_response(get, client.get) - self.list = core.async_with_raw_response(list, client.list) - self.upload = core.async_with_raw_response(upload, client.upload) - self.upload_snapshot = core.async_with_raw_response(upload_snapshot, client.upload_snapshot) - - -class _AsyncVersionClientStreaming: - def __init__(self, client: AsyncVersionClient) -> None: - def get(_: third_party_applications_models.Version): ... - def list(_: third_party_applications_models.ListVersionsResponse): ... - def upload(_: third_party_applications_models.Version): ... - def upload_snapshot(_: third_party_applications_models.Version): ... - - self.get = core.async_with_streaming_response(get, client.get) - self.list = core.async_with_streaming_response(list, client.list) - self.upload = core.async_with_streaming_response(upload, client.upload) - self.upload_snapshot = core.async_with_streaming_response( - upload_snapshot, client.upload_snapshot - ) diff --git a/foundry_sdk/v2/third_party_applications/website.py b/foundry_sdk/v2/third_party_applications/website.py deleted file mode 100644 index 0cc5e8172..000000000 --- a/foundry_sdk/v2/third_party_applications/website.py +++ /dev/null @@ -1,411 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing -from functools import cached_property - -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v2.third_party_applications import ( - errors as third_party_applications_errors, -) # NOQA -from foundry_sdk.v2.third_party_applications import ( - models as third_party_applications_models, -) # NOQA - - -class WebsiteClient: - """ - The API client for the Website Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _WebsiteClientStreaming(self) - self.with_raw_response = _WebsiteClientRaw(self) - - @cached_property - def Version(self): - from foundry_sdk.v2.third_party_applications.version import VersionClient - - return VersionClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def deploy( - self, - third_party_application_rid: third_party_applications_models.ThirdPartyApplicationRid, - *, - version: third_party_applications_models.VersionVersion, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> third_party_applications_models.Website: - """ - Deploy a version of the Website. - :param third_party_application_rid: An RID identifying a third-party application created in Developer Console. - :type third_party_application_rid: ThirdPartyApplicationRid - :param version: - :type version: VersionVersion - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: third_party_applications_models.Website - - :raises DeployWebsitePermissionDenied: Could not deploy the Website. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/thirdPartyApplications/{thirdPartyApplicationRid}/website/deploy", - query_params={}, - path_params={ - "thirdPartyApplicationRid": third_party_application_rid, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=third_party_applications_models.DeployWebsiteRequest( - version=version, - ), - response_type=third_party_applications_models.Website, - request_timeout=request_timeout, - throwable_errors={ - "DeployWebsitePermissionDenied": third_party_applications_errors.DeployWebsitePermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - third_party_application_rid: third_party_applications_models.ThirdPartyApplicationRid, - *, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> third_party_applications_models.Website: - """ - Get the Website. - :param third_party_application_rid: An RID identifying a third-party application created in Developer Console. - :type third_party_application_rid: ThirdPartyApplicationRid - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: third_party_applications_models.Website - - :raises WebsiteNotFound: The given Website could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/thirdPartyApplications/{thirdPartyApplicationRid}/website", - query_params={}, - path_params={ - "thirdPartyApplicationRid": third_party_application_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=third_party_applications_models.Website, - request_timeout=request_timeout, - throwable_errors={ - "WebsiteNotFound": third_party_applications_errors.WebsiteNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def undeploy( - self, - third_party_application_rid: third_party_applications_models.ThirdPartyApplicationRid, - *, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> third_party_applications_models.Website: - """ - Remove the currently deployed version of the Website. - :param third_party_application_rid: An RID identifying a third-party application created in Developer Console. - :type third_party_application_rid: ThirdPartyApplicationRid - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: third_party_applications_models.Website - - :raises UndeployWebsitePermissionDenied: Could not undeploy the Website. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/thirdPartyApplications/{thirdPartyApplicationRid}/website/undeploy", - query_params={}, - path_params={ - "thirdPartyApplicationRid": third_party_application_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=third_party_applications_models.Website, - request_timeout=request_timeout, - throwable_errors={ - "UndeployWebsitePermissionDenied": third_party_applications_errors.UndeployWebsitePermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _WebsiteClientRaw: - def __init__(self, client: WebsiteClient) -> None: - def deploy(_: third_party_applications_models.Website): ... - def get(_: third_party_applications_models.Website): ... - def undeploy(_: third_party_applications_models.Website): ... - - self.deploy = core.with_raw_response(deploy, client.deploy) - self.get = core.with_raw_response(get, client.get) - self.undeploy = core.with_raw_response(undeploy, client.undeploy) - - -class _WebsiteClientStreaming: - def __init__(self, client: WebsiteClient) -> None: - def deploy(_: third_party_applications_models.Website): ... - def get(_: third_party_applications_models.Website): ... - def undeploy(_: third_party_applications_models.Website): ... - - self.deploy = core.with_streaming_response(deploy, client.deploy) - self.get = core.with_streaming_response(get, client.get) - self.undeploy = core.with_streaming_response(undeploy, client.undeploy) - - -class AsyncWebsiteClient: - """ - The API client for the Website Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AsyncWebsiteClientStreaming(self) - self.with_raw_response = _AsyncWebsiteClientRaw(self) - - @cached_property - def Version(self): - from foundry_sdk.v2.third_party_applications.version import AsyncVersionClient - - return AsyncVersionClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def deploy( - self, - third_party_application_rid: third_party_applications_models.ThirdPartyApplicationRid, - *, - version: third_party_applications_models.VersionVersion, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[third_party_applications_models.Website]: - """ - Deploy a version of the Website. - :param third_party_application_rid: An RID identifying a third-party application created in Developer Console. - :type third_party_application_rid: ThirdPartyApplicationRid - :param version: - :type version: VersionVersion - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[third_party_applications_models.Website] - - :raises DeployWebsitePermissionDenied: Could not deploy the Website. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/thirdPartyApplications/{thirdPartyApplicationRid}/website/deploy", - query_params={}, - path_params={ - "thirdPartyApplicationRid": third_party_application_rid, - }, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=third_party_applications_models.DeployWebsiteRequest( - version=version, - ), - response_type=third_party_applications_models.Website, - request_timeout=request_timeout, - throwable_errors={ - "DeployWebsitePermissionDenied": third_party_applications_errors.DeployWebsitePermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - third_party_application_rid: third_party_applications_models.ThirdPartyApplicationRid, - *, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[third_party_applications_models.Website]: - """ - Get the Website. - :param third_party_application_rid: An RID identifying a third-party application created in Developer Console. - :type third_party_application_rid: ThirdPartyApplicationRid - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[third_party_applications_models.Website] - - :raises WebsiteNotFound: The given Website could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/thirdPartyApplications/{thirdPartyApplicationRid}/website", - query_params={}, - path_params={ - "thirdPartyApplicationRid": third_party_application_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=third_party_applications_models.Website, - request_timeout=request_timeout, - throwable_errors={ - "WebsiteNotFound": third_party_applications_errors.WebsiteNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def undeploy( - self, - third_party_application_rid: third_party_applications_models.ThirdPartyApplicationRid, - *, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[third_party_applications_models.Website]: - """ - Remove the currently deployed version of the Website. - :param third_party_application_rid: An RID identifying a third-party application created in Developer Console. - :type third_party_application_rid: ThirdPartyApplicationRid - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[third_party_applications_models.Website] - - :raises UndeployWebsitePermissionDenied: Could not undeploy the Website. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/thirdPartyApplications/{thirdPartyApplicationRid}/website/undeploy", - query_params={}, - path_params={ - "thirdPartyApplicationRid": third_party_application_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=third_party_applications_models.Website, - request_timeout=request_timeout, - throwable_errors={ - "UndeployWebsitePermissionDenied": third_party_applications_errors.UndeployWebsitePermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _AsyncWebsiteClientRaw: - def __init__(self, client: AsyncWebsiteClient) -> None: - def deploy(_: third_party_applications_models.Website): ... - def get(_: third_party_applications_models.Website): ... - def undeploy(_: third_party_applications_models.Website): ... - - self.deploy = core.async_with_raw_response(deploy, client.deploy) - self.get = core.async_with_raw_response(get, client.get) - self.undeploy = core.async_with_raw_response(undeploy, client.undeploy) - - -class _AsyncWebsiteClientStreaming: - def __init__(self, client: AsyncWebsiteClient) -> None: - def deploy(_: third_party_applications_models.Website): ... - def get(_: third_party_applications_models.Website): ... - def undeploy(_: third_party_applications_models.Website): ... - - self.deploy = core.async_with_streaming_response(deploy, client.deploy) - self.get = core.async_with_streaming_response(get, client.get) - self.undeploy = core.async_with_streaming_response(undeploy, client.undeploy) diff --git a/foundry_sdk/v2/widgets/__init__.py b/foundry_sdk/v2/widgets/__init__.py deleted file mode 100644 index 6405a46a6..000000000 --- a/foundry_sdk/v2/widgets/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -from foundry_sdk.v2.widgets._client import AsyncWidgetsClient -from foundry_sdk.v2.widgets._client import WidgetsClient - -__all__ = [ - "WidgetsClient", - "AsyncWidgetsClient", -] diff --git a/foundry_sdk/v2/widgets/_client.py b/foundry_sdk/v2/widgets/_client.py deleted file mode 100644 index 43a2866e6..000000000 --- a/foundry_sdk/v2/widgets/_client.py +++ /dev/null @@ -1,97 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing -from functools import cached_property - -from foundry_sdk import _core as core - - -class WidgetsClient: - """ - The API client for the Widgets Namespace. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - - @cached_property - def DevModeSettings(self): - from foundry_sdk.v2.widgets.dev_mode_settings import DevModeSettingsClient - - return DevModeSettingsClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @cached_property - def Repository(self): - from foundry_sdk.v2.widgets.repository import RepositoryClient - - return RepositoryClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @cached_property - def WidgetSet(self): - from foundry_sdk.v2.widgets.widget_set import WidgetSetClient - - return WidgetSetClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - -class AsyncWidgetsClient: - """ - The Async API client for the Widgets Namespace. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - from foundry_sdk.v2.widgets.dev_mode_settings import AsyncDevModeSettingsClient - from foundry_sdk.v2.widgets.repository import AsyncRepositoryClient - from foundry_sdk.v2.widgets.widget_set import AsyncWidgetSetClient - - self.DevModeSettings = AsyncDevModeSettingsClient( - auth=auth, hostname=hostname, config=config - ) - - self.Repository = AsyncRepositoryClient(auth=auth, hostname=hostname, config=config) - - self.WidgetSet = AsyncWidgetSetClient(auth=auth, hostname=hostname, config=config) diff --git a/foundry_sdk/v2/widgets/dev_mode_settings.py b/foundry_sdk/v2/widgets/dev_mode_settings.py deleted file mode 100644 index d822e33f6..000000000 --- a/foundry_sdk/v2/widgets/dev_mode_settings.py +++ /dev/null @@ -1,711 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing - -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v2.core import models as core_models -from foundry_sdk.v2.widgets import errors as widgets_errors -from foundry_sdk.v2.widgets import models as widgets_models - - -class DevModeSettingsClient: - """ - The API client for the DevModeSettings Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _DevModeSettingsClientStreaming(self) - self.with_raw_response = _DevModeSettingsClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def disable( - self, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> widgets_models.DevModeSettings: - """ - Disable dev mode for the user associated with the provided token. - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: widgets_models.DevModeSettings - - :raises DisableDevModeSettingsPermissionDenied: Could not disable the DevModeSettings. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/widgets/devModeSettings/disable", - query_params={ - "preview": preview, - }, - path_params={}, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=widgets_models.DevModeSettings, - request_timeout=request_timeout, - throwable_errors={ - "DisableDevModeSettingsPermissionDenied": widgets_errors.DisableDevModeSettingsPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def enable( - self, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> widgets_models.DevModeSettings: - """ - Enable dev mode for the user associated with the provided token. - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: widgets_models.DevModeSettings - - :raises EnableDevModeSettingsPermissionDenied: Could not enable the DevModeSettings. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/widgets/devModeSettings/enable", - query_params={ - "preview": preview, - }, - path_params={}, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=widgets_models.DevModeSettings, - request_timeout=request_timeout, - throwable_errors={ - "EnableDevModeSettingsPermissionDenied": widgets_errors.EnableDevModeSettingsPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> widgets_models.DevModeSettings: - """ - Get the dev mode settings for the user associated with the provided token. - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: widgets_models.DevModeSettings - - :raises DevModeSettingsNotFound: The given DevModeSettings could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/widgets/devModeSettings", - query_params={ - "preview": preview, - }, - path_params={}, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=widgets_models.DevModeSettings, - request_timeout=request_timeout, - throwable_errors={ - "DevModeSettingsNotFound": widgets_errors.DevModeSettingsNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def pause( - self, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> widgets_models.DevModeSettings: - """ - Pause dev mode for the user associated with the provided token. - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: widgets_models.DevModeSettings - - :raises PauseDevModeSettingsPermissionDenied: Could not pause the DevModeSettings. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/widgets/devModeSettings/pause", - query_params={ - "preview": preview, - }, - path_params={}, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=widgets_models.DevModeSettings, - request_timeout=request_timeout, - throwable_errors={ - "PauseDevModeSettingsPermissionDenied": widgets_errors.PauseDevModeSettingsPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def set_widget_set( - self, - *, - settings: widgets_models.WidgetSetDevModeSettings, - widget_set_rid: widgets_models.WidgetSetRid, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> widgets_models.DevModeSettings: - """ - Set the dev mode settings for the given widget set for the user associated with the provided token. - :param settings: - :type settings: WidgetSetDevModeSettings - :param widget_set_rid: - :type widget_set_rid: WidgetSetRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: widgets_models.DevModeSettings - - :raises SetWidgetSetDevModeSettingsPermissionDenied: Could not setWidgetSet the DevModeSettings. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/widgets/devModeSettings/setWidgetSet", - query_params={ - "preview": preview, - }, - path_params={}, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=widgets_models.SetWidgetSetDevModeSettingsRequest( - widget_set_rid=widget_set_rid, - settings=settings, - ), - response_type=widgets_models.DevModeSettings, - request_timeout=request_timeout, - throwable_errors={ - "SetWidgetSetDevModeSettingsPermissionDenied": widgets_errors.SetWidgetSetDevModeSettingsPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def set_widget_set_by_id( - self, - *, - settings: widgets_models.WidgetSetDevModeSettingsById, - widget_set_rid: widgets_models.WidgetSetRid, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> widgets_models.DevModeSettings: - """ - Set the dev mode settings for the given widget set for the user associated with the - provided token. Uses widget IDs to identify widgets within the set. - - :param settings: - :type settings: WidgetSetDevModeSettingsById - :param widget_set_rid: - :type widget_set_rid: WidgetSetRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: widgets_models.DevModeSettings - - :raises SetWidgetSetDevModeSettingsByIdPermissionDenied: Could not setWidgetSetById the DevModeSettings. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/widgets/devModeSettings/setWidgetSetById", - query_params={ - "preview": preview, - }, - path_params={}, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=widgets_models.SetWidgetSetDevModeSettingsByIdRequest( - widget_set_rid=widget_set_rid, - settings=settings, - ), - response_type=widgets_models.DevModeSettings, - request_timeout=request_timeout, - throwable_errors={ - "SetWidgetSetDevModeSettingsByIdPermissionDenied": widgets_errors.SetWidgetSetDevModeSettingsByIdPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _DevModeSettingsClientRaw: - def __init__(self, client: DevModeSettingsClient) -> None: - def disable(_: widgets_models.DevModeSettings): ... - def enable(_: widgets_models.DevModeSettings): ... - def get(_: widgets_models.DevModeSettings): ... - def pause(_: widgets_models.DevModeSettings): ... - def set_widget_set(_: widgets_models.DevModeSettings): ... - def set_widget_set_by_id(_: widgets_models.DevModeSettings): ... - - self.disable = core.with_raw_response(disable, client.disable) - self.enable = core.with_raw_response(enable, client.enable) - self.get = core.with_raw_response(get, client.get) - self.pause = core.with_raw_response(pause, client.pause) - self.set_widget_set = core.with_raw_response(set_widget_set, client.set_widget_set) - self.set_widget_set_by_id = core.with_raw_response( - set_widget_set_by_id, client.set_widget_set_by_id - ) - - -class _DevModeSettingsClientStreaming: - def __init__(self, client: DevModeSettingsClient) -> None: - def disable(_: widgets_models.DevModeSettings): ... - def enable(_: widgets_models.DevModeSettings): ... - def get(_: widgets_models.DevModeSettings): ... - def pause(_: widgets_models.DevModeSettings): ... - def set_widget_set(_: widgets_models.DevModeSettings): ... - def set_widget_set_by_id(_: widgets_models.DevModeSettings): ... - - self.disable = core.with_streaming_response(disable, client.disable) - self.enable = core.with_streaming_response(enable, client.enable) - self.get = core.with_streaming_response(get, client.get) - self.pause = core.with_streaming_response(pause, client.pause) - self.set_widget_set = core.with_streaming_response(set_widget_set, client.set_widget_set) - self.set_widget_set_by_id = core.with_streaming_response( - set_widget_set_by_id, client.set_widget_set_by_id - ) - - -class AsyncDevModeSettingsClient: - """ - The API client for the DevModeSettings Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AsyncDevModeSettingsClientStreaming(self) - self.with_raw_response = _AsyncDevModeSettingsClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def disable( - self, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[widgets_models.DevModeSettings]: - """ - Disable dev mode for the user associated with the provided token. - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[widgets_models.DevModeSettings] - - :raises DisableDevModeSettingsPermissionDenied: Could not disable the DevModeSettings. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/widgets/devModeSettings/disable", - query_params={ - "preview": preview, - }, - path_params={}, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=widgets_models.DevModeSettings, - request_timeout=request_timeout, - throwable_errors={ - "DisableDevModeSettingsPermissionDenied": widgets_errors.DisableDevModeSettingsPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def enable( - self, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[widgets_models.DevModeSettings]: - """ - Enable dev mode for the user associated with the provided token. - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[widgets_models.DevModeSettings] - - :raises EnableDevModeSettingsPermissionDenied: Could not enable the DevModeSettings. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/widgets/devModeSettings/enable", - query_params={ - "preview": preview, - }, - path_params={}, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=widgets_models.DevModeSettings, - request_timeout=request_timeout, - throwable_errors={ - "EnableDevModeSettingsPermissionDenied": widgets_errors.EnableDevModeSettingsPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[widgets_models.DevModeSettings]: - """ - Get the dev mode settings for the user associated with the provided token. - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[widgets_models.DevModeSettings] - - :raises DevModeSettingsNotFound: The given DevModeSettings could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/widgets/devModeSettings", - query_params={ - "preview": preview, - }, - path_params={}, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=widgets_models.DevModeSettings, - request_timeout=request_timeout, - throwable_errors={ - "DevModeSettingsNotFound": widgets_errors.DevModeSettingsNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def pause( - self, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[widgets_models.DevModeSettings]: - """ - Pause dev mode for the user associated with the provided token. - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[widgets_models.DevModeSettings] - - :raises PauseDevModeSettingsPermissionDenied: Could not pause the DevModeSettings. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/widgets/devModeSettings/pause", - query_params={ - "preview": preview, - }, - path_params={}, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=widgets_models.DevModeSettings, - request_timeout=request_timeout, - throwable_errors={ - "PauseDevModeSettingsPermissionDenied": widgets_errors.PauseDevModeSettingsPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def set_widget_set( - self, - *, - settings: widgets_models.WidgetSetDevModeSettings, - widget_set_rid: widgets_models.WidgetSetRid, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[widgets_models.DevModeSettings]: - """ - Set the dev mode settings for the given widget set for the user associated with the provided token. - :param settings: - :type settings: WidgetSetDevModeSettings - :param widget_set_rid: - :type widget_set_rid: WidgetSetRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[widgets_models.DevModeSettings] - - :raises SetWidgetSetDevModeSettingsPermissionDenied: Could not setWidgetSet the DevModeSettings. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/widgets/devModeSettings/setWidgetSet", - query_params={ - "preview": preview, - }, - path_params={}, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=widgets_models.SetWidgetSetDevModeSettingsRequest( - widget_set_rid=widget_set_rid, - settings=settings, - ), - response_type=widgets_models.DevModeSettings, - request_timeout=request_timeout, - throwable_errors={ - "SetWidgetSetDevModeSettingsPermissionDenied": widgets_errors.SetWidgetSetDevModeSettingsPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def set_widget_set_by_id( - self, - *, - settings: widgets_models.WidgetSetDevModeSettingsById, - widget_set_rid: widgets_models.WidgetSetRid, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[widgets_models.DevModeSettings]: - """ - Set the dev mode settings for the given widget set for the user associated with the - provided token. Uses widget IDs to identify widgets within the set. - - :param settings: - :type settings: WidgetSetDevModeSettingsById - :param widget_set_rid: - :type widget_set_rid: WidgetSetRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[widgets_models.DevModeSettings] - - :raises SetWidgetSetDevModeSettingsByIdPermissionDenied: Could not setWidgetSetById the DevModeSettings. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/widgets/devModeSettings/setWidgetSetById", - query_params={ - "preview": preview, - }, - path_params={}, - header_params={ - "Content-Type": "application/json", - "Accept": "application/json", - }, - body=widgets_models.SetWidgetSetDevModeSettingsByIdRequest( - widget_set_rid=widget_set_rid, - settings=settings, - ), - response_type=widgets_models.DevModeSettings, - request_timeout=request_timeout, - throwable_errors={ - "SetWidgetSetDevModeSettingsByIdPermissionDenied": widgets_errors.SetWidgetSetDevModeSettingsByIdPermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _AsyncDevModeSettingsClientRaw: - def __init__(self, client: AsyncDevModeSettingsClient) -> None: - def disable(_: widgets_models.DevModeSettings): ... - def enable(_: widgets_models.DevModeSettings): ... - def get(_: widgets_models.DevModeSettings): ... - def pause(_: widgets_models.DevModeSettings): ... - def set_widget_set(_: widgets_models.DevModeSettings): ... - def set_widget_set_by_id(_: widgets_models.DevModeSettings): ... - - self.disable = core.async_with_raw_response(disable, client.disable) - self.enable = core.async_with_raw_response(enable, client.enable) - self.get = core.async_with_raw_response(get, client.get) - self.pause = core.async_with_raw_response(pause, client.pause) - self.set_widget_set = core.async_with_raw_response(set_widget_set, client.set_widget_set) - self.set_widget_set_by_id = core.async_with_raw_response( - set_widget_set_by_id, client.set_widget_set_by_id - ) - - -class _AsyncDevModeSettingsClientStreaming: - def __init__(self, client: AsyncDevModeSettingsClient) -> None: - def disable(_: widgets_models.DevModeSettings): ... - def enable(_: widgets_models.DevModeSettings): ... - def get(_: widgets_models.DevModeSettings): ... - def pause(_: widgets_models.DevModeSettings): ... - def set_widget_set(_: widgets_models.DevModeSettings): ... - def set_widget_set_by_id(_: widgets_models.DevModeSettings): ... - - self.disable = core.async_with_streaming_response(disable, client.disable) - self.enable = core.async_with_streaming_response(enable, client.enable) - self.get = core.async_with_streaming_response(get, client.get) - self.pause = core.async_with_streaming_response(pause, client.pause) - self.set_widget_set = core.async_with_streaming_response( - set_widget_set, client.set_widget_set - ) - self.set_widget_set_by_id = core.async_with_streaming_response( - set_widget_set_by_id, client.set_widget_set_by_id - ) diff --git a/foundry_sdk/v2/widgets/errors.py b/foundry_sdk/v2/widgets/errors.py deleted file mode 100644 index 10baf0b2f..000000000 --- a/foundry_sdk/v2/widgets/errors.py +++ /dev/null @@ -1,844 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing -from dataclasses import dataclass - -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v2.widgets import models as widgets_models - - -class DeleteReleasePermissionDeniedParameters(typing_extensions.TypedDict): - """Could not delete the Release.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - widgetSetRid: widgets_models.WidgetSetRid - """A Resource Identifier (RID) identifying a widget set.""" - - releaseVersion: widgets_models.ReleaseVersion - """The semantic version of the widget set.""" - - -@dataclass -class DeleteReleasePermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["DeleteReleasePermissionDenied"] - parameters: DeleteReleasePermissionDeniedParameters - error_instance_id: str - - -class DevModeSettingsNotFoundParameters(typing_extensions.TypedDict): - """The given DevModeSettings could not be found.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class DevModeSettingsNotFound(errors.NotFoundError): - name: typing.Literal["DevModeSettingsNotFound"] - parameters: DevModeSettingsNotFoundParameters - error_instance_id: str - - -class DisableDevModeSettingsPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not disable the DevModeSettings.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class DisableDevModeSettingsPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["DisableDevModeSettingsPermissionDenied"] - parameters: DisableDevModeSettingsPermissionDeniedParameters - error_instance_id: str - - -class EnableDevModeSettingsPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not enable the DevModeSettings.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class EnableDevModeSettingsPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["EnableDevModeSettingsPermissionDenied"] - parameters: EnableDevModeSettingsPermissionDeniedParameters - error_instance_id: str - - -class FileCountLimitExceededParameters(typing_extensions.TypedDict): - """The .zip archive contains too many files.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - fileCountLimit: int - - -@dataclass -class FileCountLimitExceeded(errors.BadRequestError): - name: typing.Literal["FileCountLimitExceeded"] - parameters: FileCountLimitExceededParameters - error_instance_id: str - - -class FileSizeLimitExceededParameters(typing_extensions.TypedDict): - """ - A file inside the .zip archive is too big. You must ensure that all files inside - the .zip archive are within the limit. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - fileSizeBytesLimit: core.Long - currentFileSizeBytes: core.Long - currentFilePath: str - - -@dataclass -class FileSizeLimitExceeded(errors.BadRequestError): - name: typing.Literal["FileSizeLimitExceeded"] - parameters: FileSizeLimitExceededParameters - error_instance_id: str - - -class GetDevModeSettingsPermissionDeniedParameters(typing_extensions.TypedDict): - """The provided token does not have permission to access dev mode settings.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class GetDevModeSettingsPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["GetDevModeSettingsPermissionDenied"] - parameters: GetDevModeSettingsPermissionDeniedParameters - error_instance_id: str - - -class InvalidDevModeBaseHrefParameters(typing_extensions.TypedDict): - """ - The base href in the dev mode settings is invalid. It must be a valid localhost URL - with an optional port. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - baseHref: str - - -@dataclass -class InvalidDevModeBaseHref(errors.BadRequestError): - name: typing.Literal["InvalidDevModeBaseHref"] - parameters: InvalidDevModeBaseHrefParameters - error_instance_id: str - - -class InvalidDevModeEntrypointCssCountParameters(typing_extensions.TypedDict): - """ - The dev mode settings contains too many CSS entrypoints. You must limit the number - of CSS entrypoints to the maximum allowed. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - reason: str - entrypointCssCount: int - - -@dataclass -class InvalidDevModeEntrypointCssCount(errors.BadRequestError): - name: typing.Literal["InvalidDevModeEntrypointCssCount"] - parameters: InvalidDevModeEntrypointCssCountParameters - error_instance_id: str - - -class InvalidDevModeEntrypointJsCountParameters(typing_extensions.TypedDict): - """ - The dev mode settings contains too many JavaScript entrypoints. You must limit the number - of JavaScript entrypoints to the maximum allowed. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - reason: str - entrypointJsCount: int - - -@dataclass -class InvalidDevModeEntrypointJsCount(errors.BadRequestError): - name: typing.Literal["InvalidDevModeEntrypointJsCount"] - parameters: InvalidDevModeEntrypointJsCountParameters - error_instance_id: str - - -class InvalidDevModeFilePathParameters(typing_extensions.TypedDict): - """ - The dev mode settings contains an invalid entrypoint file path. The file path must be a - valid localhost URL with an optional port and a file path. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - reason: str - filePath: str - - -@dataclass -class InvalidDevModeFilePath(errors.BadRequestError): - name: typing.Literal["InvalidDevModeFilePath"] - parameters: InvalidDevModeFilePathParameters - error_instance_id: str - - -class InvalidDevModeWidgetSettingsCountParameters(typing_extensions.TypedDict): - """ - The dev mode settings contains too many widget settings. You must limit the number of - widget settings to the maximum allowed. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - reason: str - widgetSettingsCount: int - - -@dataclass -class InvalidDevModeWidgetSettingsCount(errors.BadRequestError): - name: typing.Literal["InvalidDevModeWidgetSettingsCount"] - parameters: InvalidDevModeWidgetSettingsCountParameters - error_instance_id: str - - -class InvalidEntrypointCssCountParameters(typing_extensions.TypedDict): - """ - The widget declares too many CSS entrypoints. You must limit the number - of CSS entrypoints to the maximum allowed. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - reason: str - entrypointCssCount: int - - -@dataclass -class InvalidEntrypointCssCount(errors.BadRequestError): - name: typing.Literal["InvalidEntrypointCssCount"] - parameters: InvalidEntrypointCssCountParameters - error_instance_id: str - - -class InvalidEntrypointJsCountParameters(typing_extensions.TypedDict): - """ - The widget declares too many JavaScript entrypoints. You must limit the number - of JavaScript entrypoints to the maximum allowed. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - reason: str - entrypointJsCount: int - - -@dataclass -class InvalidEntrypointJsCount(errors.BadRequestError): - name: typing.Literal["InvalidEntrypointJsCount"] - parameters: InvalidEntrypointJsCountParameters - error_instance_id: str - - -class InvalidEventCountParameters(typing_extensions.TypedDict): - """The widget config contains too many events.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - reason: str - eventCount: int - - -@dataclass -class InvalidEventCount(errors.BadRequestError): - name: typing.Literal["InvalidEventCount"] - parameters: InvalidEventCountParameters - error_instance_id: str - - -class InvalidEventDisplayNameParameters(typing_extensions.TypedDict): - """The event display name is invalid.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - reason: str - eventDisplayName: str - - -@dataclass -class InvalidEventDisplayName(errors.BadRequestError): - name: typing.Literal["InvalidEventDisplayName"] - parameters: InvalidEventDisplayNameParameters - error_instance_id: str - - -class InvalidEventIdParameters(typing_extensions.TypedDict): - """The event id is invalid.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - reason: str - eventId: str - - -@dataclass -class InvalidEventId(errors.BadRequestError): - name: typing.Literal["InvalidEventId"] - parameters: InvalidEventIdParameters - error_instance_id: str - - -class InvalidEventParameterParameters(typing_extensions.TypedDict): - """The event parameter is invalid.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - reason: str - eventParameterId: str - - -@dataclass -class InvalidEventParameter(errors.BadRequestError): - name: typing.Literal["InvalidEventParameter"] - parameters: InvalidEventParameterParameters - error_instance_id: str - - -class InvalidEventParameterCountParameters(typing_extensions.TypedDict): - """The widget config contains an event with too many event parameters.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - reason: str - eventParameterCount: int - - -@dataclass -class InvalidEventParameterCount(errors.BadRequestError): - name: typing.Literal["InvalidEventParameterCount"] - parameters: InvalidEventParameterCountParameters - error_instance_id: str - - -class InvalidEventParameterIdParameters(typing_extensions.TypedDict): - """The event parameter id is invalid.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - reason: str - eventParameterId: str - - -@dataclass -class InvalidEventParameterId(errors.BadRequestError): - name: typing.Literal["InvalidEventParameterId"] - parameters: InvalidEventParameterIdParameters - error_instance_id: str - - -class InvalidEventParameterUpdateIdParameters(typing_extensions.TypedDict): - """The event references an invalid parameter id.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - reason: str - parameterUpdateId: str - - -@dataclass -class InvalidEventParameterUpdateId(errors.BadRequestError): - name: typing.Literal["InvalidEventParameterUpdateId"] - parameters: InvalidEventParameterUpdateIdParameters - error_instance_id: str - - -class InvalidFilePathParameters(typing_extensions.TypedDict): - """The widget declares an invalid production entrypoint file path.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - reason: str - filePath: str - - -@dataclass -class InvalidFilePath(errors.BadRequestError): - name: typing.Literal["InvalidFilePath"] - parameters: InvalidFilePathParameters - error_instance_id: str - - -class InvalidManifestParameters(typing_extensions.TypedDict): - """ - The manifest file in the .zip archive at the path `.palantir/widgets.config.json` - could not be found or is not well formed. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - reason: str - value: typing_extensions.NotRequired[typing.Any] - - -@dataclass -class InvalidManifest(errors.BadRequestError): - name: typing.Literal["InvalidManifest"] - parameters: InvalidManifestParameters - error_instance_id: str - - -class InvalidObjectSetEventParameterTypeParameters(typing_extensions.TypedDict): - """The object set event parameter type is invalid.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - reason: str - eventParameterId: str - value: typing_extensions.NotRequired[typing.Any] - - -@dataclass -class InvalidObjectSetEventParameterType(errors.BadRequestError): - name: typing.Literal["InvalidObjectSetEventParameterType"] - parameters: InvalidObjectSetEventParameterTypeParameters - error_instance_id: str - - -class InvalidObjectSetParameterTypeParameters(typing_extensions.TypedDict): - """The object set parameter type is invalid.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - reason: str - parameterId: str - value: typing_extensions.NotRequired[typing.Any] - - -@dataclass -class InvalidObjectSetParameterType(errors.BadRequestError): - name: typing.Literal["InvalidObjectSetParameterType"] - parameters: InvalidObjectSetParameterTypeParameters - error_instance_id: str - - -class InvalidParameterCountParameters(typing_extensions.TypedDict): - """The widget config contains too many parameters.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - reason: str - parameterCount: int - - -@dataclass -class InvalidParameterCount(errors.BadRequestError): - name: typing.Literal["InvalidParameterCount"] - parameters: InvalidParameterCountParameters - error_instance_id: str - - -class InvalidParameterDisplayNameParameters(typing_extensions.TypedDict): - """The parameter display name is invalid.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - reason: str - parameterDisplayName: str - - -@dataclass -class InvalidParameterDisplayName(errors.BadRequestError): - name: typing.Literal["InvalidParameterDisplayName"] - parameters: InvalidParameterDisplayNameParameters - error_instance_id: str - - -class InvalidParameterIdParameters(typing_extensions.TypedDict): - """The parameter id is invalid.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - reason: str - parameterId: str - - -@dataclass -class InvalidParameterId(errors.BadRequestError): - name: typing.Literal["InvalidParameterId"] - parameters: InvalidParameterIdParameters - error_instance_id: str - - -class InvalidPublishRepositoryParameters(typing_extensions.TypedDict): - """The manifest file targets a widget set that has not linked the repository to publish.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class InvalidPublishRepository(errors.BadRequestError): - name: typing.Literal["InvalidPublishRepository"] - parameters: InvalidPublishRepositoryParameters - error_instance_id: str - - -class InvalidReleaseDescriptionParameters(typing_extensions.TypedDict): - """The release description is invalid.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - reason: str - releaseDescription: str - - -@dataclass -class InvalidReleaseDescription(errors.BadRequestError): - name: typing.Literal["InvalidReleaseDescription"] - parameters: InvalidReleaseDescriptionParameters - error_instance_id: str - - -class InvalidReleaseWidgetsCountParameters(typing_extensions.TypedDict): - """The release contains zero widgets or too many widgets.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - reason: str - widgetsCount: int - - -@dataclass -class InvalidReleaseWidgetsCount(errors.BadRequestError): - name: typing.Literal["InvalidReleaseWidgetsCount"] - parameters: InvalidReleaseWidgetsCountParameters - error_instance_id: str - - -class InvalidVersionParameters(typing_extensions.TypedDict): - """ - The given version is invalid. Versions must follow semantic versioning with major, minor, - and patch versions separate by periods, e.g. `0.1.0` or `1.2.3`. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - version: str - - -@dataclass -class InvalidVersion(errors.BadRequestError): - name: typing.Literal["InvalidVersion"] - parameters: InvalidVersionParameters - error_instance_id: str - - -class InvalidWidgetDescriptionParameters(typing_extensions.TypedDict): - """The widget description is invalid.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - reason: str - widgetDescription: str - - -@dataclass -class InvalidWidgetDescription(errors.BadRequestError): - name: typing.Literal["InvalidWidgetDescription"] - parameters: InvalidWidgetDescriptionParameters - error_instance_id: str - - -class InvalidWidgetIdParameters(typing_extensions.TypedDict): - """The widget id is invalid.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - reason: str - widgetId: str - - -@dataclass -class InvalidWidgetId(errors.BadRequestError): - name: typing.Literal["InvalidWidgetId"] - parameters: InvalidWidgetIdParameters - error_instance_id: str - - -class InvalidWidgetNameParameters(typing_extensions.TypedDict): - """The widget name is invalid.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - reason: str - widgetName: str - - -@dataclass -class InvalidWidgetName(errors.BadRequestError): - name: typing.Literal["InvalidWidgetName"] - parameters: InvalidWidgetNameParameters - error_instance_id: str - - -class OntologySdkNotFoundParameters(typing_extensions.TypedDict): - """A referenced Ontology SDK package could not be found.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - sdkPackageRid: core.RID - sdkVersion: str - - -@dataclass -class OntologySdkNotFound(errors.NotFoundError): - name: typing.Literal["OntologySdkNotFound"] - parameters: OntologySdkNotFoundParameters - error_instance_id: str - - -class PauseDevModeSettingsPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not pause the DevModeSettings.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class PauseDevModeSettingsPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["PauseDevModeSettingsPermissionDenied"] - parameters: PauseDevModeSettingsPermissionDeniedParameters - error_instance_id: str - - -class PublishReleasePermissionDeniedParameters(typing_extensions.TypedDict): - """Could not publish the Repository.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - repositoryRid: widgets_models.RepositoryRid - """A Resource Identifier (RID) identifying a repository.""" - - -@dataclass -class PublishReleasePermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["PublishReleasePermissionDenied"] - parameters: PublishReleasePermissionDeniedParameters - error_instance_id: str - - -class ReleaseNotFoundParameters(typing_extensions.TypedDict): - """The given Release could not be found.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - widgetSetRid: widgets_models.WidgetSetRid - """A Resource Identifier (RID) identifying a widget set.""" - - releaseVersion: widgets_models.ReleaseVersion - """The semantic version of the widget set.""" - - -@dataclass -class ReleaseNotFound(errors.NotFoundError): - name: typing.Literal["ReleaseNotFound"] - parameters: ReleaseNotFoundParameters - error_instance_id: str - - -class RepositoryNotFoundParameters(typing_extensions.TypedDict): - """The given Repository could not be found.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - repositoryRid: widgets_models.RepositoryRid - """A Resource Identifier (RID) identifying a repository.""" - - -@dataclass -class RepositoryNotFound(errors.NotFoundError): - name: typing.Literal["RepositoryNotFound"] - parameters: RepositoryNotFoundParameters - error_instance_id: str - - -class SetWidgetSetDevModeSettingsByIdPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not setWidgetSetById the DevModeSettings.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class SetWidgetSetDevModeSettingsByIdPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["SetWidgetSetDevModeSettingsByIdPermissionDenied"] - parameters: SetWidgetSetDevModeSettingsByIdPermissionDeniedParameters - error_instance_id: str - - -class SetWidgetSetDevModeSettingsPermissionDeniedParameters(typing_extensions.TypedDict): - """Could not setWidgetSet the DevModeSettings.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - -@dataclass -class SetWidgetSetDevModeSettingsPermissionDenied(errors.PermissionDeniedError): - name: typing.Literal["SetWidgetSetDevModeSettingsPermissionDenied"] - parameters: SetWidgetSetDevModeSettingsPermissionDeniedParameters - error_instance_id: str - - -class VersionAlreadyExistsParameters(typing_extensions.TypedDict): - """The given version already exists.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - version: str - - -@dataclass -class VersionAlreadyExists(errors.ConflictError): - name: typing.Literal["VersionAlreadyExists"] - parameters: VersionAlreadyExistsParameters - error_instance_id: str - - -class VersionLimitExceededParameters(typing_extensions.TypedDict): - """ - The widget set contains too many versions. You must delete an old version before - uploading a new one. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - versionLimit: int - - -@dataclass -class VersionLimitExceeded(errors.BadRequestError): - name: typing.Literal["VersionLimitExceeded"] - parameters: VersionLimitExceededParameters - error_instance_id: str - - -class WidgetIdNotFoundParameters(typing_extensions.TypedDict): - """ - A non-existent widget id was provided. If creating a new widget, you must first publish your changes before - previewing with developer mode. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - widgetSetRid: widgets_models.WidgetSetRid - widgetId: str - - -@dataclass -class WidgetIdNotFound(errors.NotFoundError): - name: typing.Literal["WidgetIdNotFound"] - parameters: WidgetIdNotFoundParameters - error_instance_id: str - - -class WidgetLimitExceededParameters(typing_extensions.TypedDict): - """ - The widget set contains too many widgets. You must delete another widget before - creating a new one. - """ - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - widgetLimit: int - - -@dataclass -class WidgetLimitExceeded(errors.BadRequestError): - name: typing.Literal["WidgetLimitExceeded"] - parameters: WidgetLimitExceededParameters - error_instance_id: str - - -class WidgetSetNotFoundParameters(typing_extensions.TypedDict): - """The given WidgetSet could not be found.""" - - __pydantic_config__ = {"extra": "allow"} # type: ignore - - widgetSetRid: widgets_models.WidgetSetRid - """A Resource Identifier (RID) identifying a widget set.""" - - -@dataclass -class WidgetSetNotFound(errors.NotFoundError): - name: typing.Literal["WidgetSetNotFound"] - parameters: WidgetSetNotFoundParameters - error_instance_id: str - - -__all__ = [ - "DeleteReleasePermissionDenied", - "DevModeSettingsNotFound", - "DisableDevModeSettingsPermissionDenied", - "EnableDevModeSettingsPermissionDenied", - "FileCountLimitExceeded", - "FileSizeLimitExceeded", - "GetDevModeSettingsPermissionDenied", - "InvalidDevModeBaseHref", - "InvalidDevModeEntrypointCssCount", - "InvalidDevModeEntrypointJsCount", - "InvalidDevModeFilePath", - "InvalidDevModeWidgetSettingsCount", - "InvalidEntrypointCssCount", - "InvalidEntrypointJsCount", - "InvalidEventCount", - "InvalidEventDisplayName", - "InvalidEventId", - "InvalidEventParameter", - "InvalidEventParameterCount", - "InvalidEventParameterId", - "InvalidEventParameterUpdateId", - "InvalidFilePath", - "InvalidManifest", - "InvalidObjectSetEventParameterType", - "InvalidObjectSetParameterType", - "InvalidParameterCount", - "InvalidParameterDisplayName", - "InvalidParameterId", - "InvalidPublishRepository", - "InvalidReleaseDescription", - "InvalidReleaseWidgetsCount", - "InvalidVersion", - "InvalidWidgetDescription", - "InvalidWidgetId", - "InvalidWidgetName", - "OntologySdkNotFound", - "PauseDevModeSettingsPermissionDenied", - "PublishReleasePermissionDenied", - "ReleaseNotFound", - "RepositoryNotFound", - "SetWidgetSetDevModeSettingsByIdPermissionDenied", - "SetWidgetSetDevModeSettingsPermissionDenied", - "VersionAlreadyExists", - "VersionLimitExceeded", - "WidgetIdNotFound", - "WidgetLimitExceeded", - "WidgetSetNotFound", -] diff --git a/foundry_sdk/v2/widgets/models.py b/foundry_sdk/v2/widgets/models.py deleted file mode 100644 index 3880ba401..000000000 --- a/foundry_sdk/v2/widgets/models.py +++ /dev/null @@ -1,235 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -from __future__ import annotations - -import typing - -import pydantic - -from foundry_sdk import _core as core -from foundry_sdk.v2.core import models as core_models - - -class DevModeSettings(core.ModelBase): - """DevModeSettings""" - - status: DevModeStatus - widget_set_settings: typing.Dict[WidgetSetRid, WidgetSetDevModeSettings] = pydantic.Field(alias=str("widgetSetSettings")) # type: ignore[literal-required] - """The dev mode settings for each widget set, keyed by widget set RID.""" - - -DevModeStatus = typing.Literal["ENABLED", "PAUSED", "DISABLED"] -"""The user's global development mode status for widget sets.""" - - -FilePath = str -"""A locator for a specific file in a widget set's release directory.""" - - -class ListReleasesResponse(core.ModelBase): - """ListReleasesResponse""" - - data: typing.List[Release] - next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] - - -class Release(core.ModelBase): - """Release""" - - widget_set_rid: WidgetSetRid = pydantic.Field(alias=str("widgetSetRid")) # type: ignore[literal-required] - """The Resource Identifier (RID) of the widget set this release is for.""" - - version: ReleaseVersion - """The semantic version of the widget set.""" - - locator: ReleaseLocator - description: typing.Optional[str] = None - """The description of this release.""" - - -class ReleaseLocator(core.ModelBase): - """A locator for where the backing files of a release are stored.""" - - repository_rid: RepositoryRid = pydantic.Field(alias=str("repositoryRid")) # type: ignore[literal-required] - """The Resource Identifier (RID) of the repository that contains the release.""" - - repository_version: RepositoryVersion = pydantic.Field(alias=str("repositoryVersion")) # type: ignore[literal-required] - """The version of the repository storing the backing files.""" - - -ReleaseVersion = str -"""The semantic version of the widget set.""" - - -class Repository(core.ModelBase): - """Repository""" - - rid: RepositoryRid - """A Resource Identifier (RID) identifying a repository.""" - - widget_set_rid: typing.Optional[WidgetSetRid] = pydantic.Field(alias=str("widgetSetRid"), default=None) # type: ignore[literal-required] - """ - The Resource Identifier (RID) of the widget set that has authorized this repository - to publish new widget releases. - """ - - -RepositoryRid = core.RID -"""A Resource Identifier (RID) identifying a repository.""" - - -RepositoryVersion = str -"""A semantic version of a repository storing backing files.""" - - -class ScriptEntrypoint(core.ModelBase): - """A script entrypoint to be loaded into the runtime environment.""" - - file_path: FilePath = pydantic.Field(alias=str("filePath")) # type: ignore[literal-required] - """ - A relative path from the root to a JavaScript entrypoint. It must satisfy: - - - Must contain one or more non-empty segments separated by `/`. - - Each segment must only contain the following ASCII characters: a-z, A-Z, 0-9 and -_.. - - Must have a maximum length of 100. - """ - - script_type: ScriptType = pydantic.Field(alias=str("scriptType")) # type: ignore[literal-required] - """ - Defines HTML "type" attribute to be used for the script entrypoint. The supported - values are `DEFAULT` and `MODULE`, where `DEFAULT` maps to "text/javascript" and - `MODULE` maps to "module". - """ - - -ScriptType = typing.Literal["DEFAULT", "MODULE"] -"""ScriptType""" - - -class SetWidgetSetDevModeSettingsByIdRequest(core.ModelBase): - """SetWidgetSetDevModeSettingsByIdRequest""" - - widget_set_rid: WidgetSetRid = pydantic.Field(alias=str("widgetSetRid")) # type: ignore[literal-required] - settings: WidgetSetDevModeSettingsById - - -class SetWidgetSetDevModeSettingsRequest(core.ModelBase): - """SetWidgetSetDevModeSettingsRequest""" - - widget_set_rid: WidgetSetRid = pydantic.Field(alias=str("widgetSetRid")) # type: ignore[literal-required] - settings: WidgetSetDevModeSettings - - -class StylesheetEntrypoint(core.ModelBase): - """A stylesheet entrypoint to be loaded into the runtime environment.""" - - file_path: FilePath = pydantic.Field(alias=str("filePath")) # type: ignore[literal-required] - """ - A relative path from the root to a CSS entrypoint. It must satisfy: - - - Must contain one or more non-empty segments separated by `/`. - - Each segment must only contain the following ASCII characters: a-z, A-Z, 0-9 and -_.. - - Must have a maximum length of 100. - """ - - -class WidgetDevModeSettings(core.ModelBase): - """The settings for a given widget in development mode.""" - - script_entrypoints: typing.List[ScriptEntrypoint] = pydantic.Field(alias=str("scriptEntrypoints")) # type: ignore[literal-required] - """The entrypoint JavaScript files for the widget.""" - - stylesheet_entrypoints: typing.List[StylesheetEntrypoint] = pydantic.Field(alias=str("stylesheetEntrypoints")) # type: ignore[literal-required] - """The entrypoint CSS files for the widget.""" - - -WidgetId = str -""" -Human readable ID for a widget. Must be unique within a widget set. -Considered unsafe as it may contain user defined data. - -- Must only contain the following ASCII characters: a-z, A-Z and 0-9. -- Must not start with a number. -- Must have a maximum length of 100. -- Must be camelCase. -""" - - -WidgetRid = core.RID -"""A Resource Identifier (RID) identifying a widget.""" - - -class WidgetSet(core.ModelBase): - """WidgetSet""" - - rid: WidgetSetRid - """A Resource Identifier (RID) identifying a widget set.""" - - publish_repository_rid: typing.Optional[RepositoryRid] = pydantic.Field(alias=str("publishRepositoryRid"), default=None) # type: ignore[literal-required] - """ - The Resource Identifier (RID) of the repository that is authorized to publish new - widget releases to this widget set through a manifest. - """ - - -class WidgetSetDevModeSettings(core.ModelBase): - """The settings for a widget set in development mode, keyed by widget RID.""" - - base_href: str = pydantic.Field(alias=str("baseHref")) # type: ignore[literal-required] - """The base path for the HTML file used to render the widget in dev mode.""" - - widget_settings: typing.Dict[WidgetRid, WidgetDevModeSettings] = pydantic.Field(alias=str("widgetSettings")) # type: ignore[literal-required] - """The dev mode settings for each widget in the widget set, keyed by widget RIDs.""" - - -class WidgetSetDevModeSettingsById(core.ModelBase): - """The settings for a widget set in development mode, keyed by widget ID.""" - - base_href: str = pydantic.Field(alias=str("baseHref")) # type: ignore[literal-required] - """The base path for the HTML file used to render the widget in dev mode.""" - - widget_settings: typing.Dict[WidgetId, WidgetDevModeSettings] = pydantic.Field(alias=str("widgetSettings")) # type: ignore[literal-required] - """The dev mode settings for each widget in the widget set, keyed by widget IDs.""" - - -WidgetSetRid = core.RID -"""A Resource Identifier (RID) identifying a widget set.""" - - -__all__ = [ - "DevModeSettings", - "DevModeStatus", - "FilePath", - "ListReleasesResponse", - "Release", - "ReleaseLocator", - "ReleaseVersion", - "Repository", - "RepositoryRid", - "RepositoryVersion", - "ScriptEntrypoint", - "ScriptType", - "SetWidgetSetDevModeSettingsByIdRequest", - "SetWidgetSetDevModeSettingsRequest", - "StylesheetEntrypoint", - "WidgetDevModeSettings", - "WidgetId", - "WidgetRid", - "WidgetSet", - "WidgetSetDevModeSettings", - "WidgetSetDevModeSettingsById", - "WidgetSetRid", -] diff --git a/foundry_sdk/v2/widgets/release.py b/foundry_sdk/v2/widgets/release.py deleted file mode 100644 index a0bd91213..000000000 --- a/foundry_sdk/v2/widgets/release.py +++ /dev/null @@ -1,425 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing - -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v2.core import models as core_models -from foundry_sdk.v2.widgets import errors as widgets_errors -from foundry_sdk.v2.widgets import models as widgets_models - - -class ReleaseClient: - """ - The API client for the Release Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _ReleaseClientStreaming(self) - self.with_raw_response = _ReleaseClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def delete( - self, - widget_set_rid: widgets_models.WidgetSetRid, - release_version: widgets_models.ReleaseVersion, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> None: - """ - Delete the Release with the specified version. - :param widget_set_rid: A Resource Identifier (RID) identifying a widget set. - :type widget_set_rid: WidgetSetRid - :param release_version: The semantic version of the widget set. - :type release_version: ReleaseVersion - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: None - - :raises DeleteReleasePermissionDenied: Could not delete the Release. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="DELETE", - resource_path="/v2/widgets/widgetSets/{widgetSetRid}/releases/{releaseVersion}", - query_params={ - "preview": preview, - }, - path_params={ - "widgetSetRid": widget_set_rid, - "releaseVersion": release_version, - }, - header_params={}, - body=None, - response_type=None, - request_timeout=request_timeout, - throwable_errors={ - "DeleteReleasePermissionDenied": widgets_errors.DeleteReleasePermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - widget_set_rid: widgets_models.WidgetSetRid, - release_version: widgets_models.ReleaseVersion, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> widgets_models.Release: - """ - Get the Release with the specified version. - :param widget_set_rid: A Resource Identifier (RID) identifying a widget set. - :type widget_set_rid: WidgetSetRid - :param release_version: The semantic version of the widget set. - :type release_version: ReleaseVersion - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: widgets_models.Release - - :raises ReleaseNotFound: The given Release could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/widgets/widgetSets/{widgetSetRid}/releases/{releaseVersion}", - query_params={ - "preview": preview, - }, - path_params={ - "widgetSetRid": widget_set_rid, - "releaseVersion": release_version, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=widgets_models.Release, - request_timeout=request_timeout, - throwable_errors={ - "ReleaseNotFound": widgets_errors.ReleaseNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def list( - self, - widget_set_rid: widgets_models.WidgetSetRid, - *, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.ResourceIterator[widgets_models.Release]: - """ - Lists all Releases. - - This is a paged endpoint. Each page may be smaller or larger than the requested page size. However, it is guaranteed that if there are more results available, the `nextPageToken` field will be populated. To get the next page, make the same request again, but set the value of the `pageToken` query parameter to be value of the `nextPageToken` value of the previous response. If there is no `nextPageToken` field in the response, you are on the last page. - :param widget_set_rid: A Resource Identifier (RID) identifying a widget set. - :type widget_set_rid: WidgetSetRid - :param page_size: The page size to use for the endpoint. - :type page_size: Optional[PageSize] - :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. - :type page_token: Optional[PageToken] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.ResourceIterator[widgets_models.Release] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/widgets/widgetSets/{widgetSetRid}/releases", - query_params={ - "pageSize": page_size, - "pageToken": page_token, - "preview": preview, - }, - path_params={ - "widgetSetRid": widget_set_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=widgets_models.ListReleasesResponse, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - -class _ReleaseClientRaw: - def __init__(self, client: ReleaseClient) -> None: - def delete(_: None): ... - def get(_: widgets_models.Release): ... - def list(_: widgets_models.ListReleasesResponse): ... - - self.delete = core.with_raw_response(delete, client.delete) - self.get = core.with_raw_response(get, client.get) - self.list = core.with_raw_response(list, client.list) - - -class _ReleaseClientStreaming: - def __init__(self, client: ReleaseClient) -> None: - def get(_: widgets_models.Release): ... - def list(_: widgets_models.ListReleasesResponse): ... - - self.get = core.with_streaming_response(get, client.get) - self.list = core.with_streaming_response(list, client.list) - - -class AsyncReleaseClient: - """ - The API client for the Release Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AsyncReleaseClientStreaming(self) - self.with_raw_response = _AsyncReleaseClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def delete( - self, - widget_set_rid: widgets_models.WidgetSetRid, - release_version: widgets_models.ReleaseVersion, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[None]: - """ - Delete the Release with the specified version. - :param widget_set_rid: A Resource Identifier (RID) identifying a widget set. - :type widget_set_rid: WidgetSetRid - :param release_version: The semantic version of the widget set. - :type release_version: ReleaseVersion - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[None] - - :raises DeleteReleasePermissionDenied: Could not delete the Release. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="DELETE", - resource_path="/v2/widgets/widgetSets/{widgetSetRid}/releases/{releaseVersion}", - query_params={ - "preview": preview, - }, - path_params={ - "widgetSetRid": widget_set_rid, - "releaseVersion": release_version, - }, - header_params={}, - body=None, - response_type=None, - request_timeout=request_timeout, - throwable_errors={ - "DeleteReleasePermissionDenied": widgets_errors.DeleteReleasePermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - widget_set_rid: widgets_models.WidgetSetRid, - release_version: widgets_models.ReleaseVersion, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[widgets_models.Release]: - """ - Get the Release with the specified version. - :param widget_set_rid: A Resource Identifier (RID) identifying a widget set. - :type widget_set_rid: WidgetSetRid - :param release_version: The semantic version of the widget set. - :type release_version: ReleaseVersion - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[widgets_models.Release] - - :raises ReleaseNotFound: The given Release could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/widgets/widgetSets/{widgetSetRid}/releases/{releaseVersion}", - query_params={ - "preview": preview, - }, - path_params={ - "widgetSetRid": widget_set_rid, - "releaseVersion": release_version, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=widgets_models.Release, - request_timeout=request_timeout, - throwable_errors={ - "ReleaseNotFound": widgets_errors.ReleaseNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def list( - self, - widget_set_rid: widgets_models.WidgetSetRid, - *, - page_size: typing.Optional[core_models.PageSize] = None, - page_token: typing.Optional[core_models.PageToken] = None, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> core.AsyncResourceIterator[widgets_models.Release]: - """ - Lists all Releases. - - This is a paged endpoint. Each page may be smaller or larger than the requested page size. However, it is guaranteed that if there are more results available, the `nextPageToken` field will be populated. To get the next page, make the same request again, but set the value of the `pageToken` query parameter to be value of the `nextPageToken` value of the previous response. If there is no `nextPageToken` field in the response, you are on the last page. - :param widget_set_rid: A Resource Identifier (RID) identifying a widget set. - :type widget_set_rid: WidgetSetRid - :param page_size: The page size to use for the endpoint. - :type page_size: Optional[PageSize] - :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. - :type page_token: Optional[PageToken] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: core.AsyncResourceIterator[widgets_models.Release] - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/widgets/widgetSets/{widgetSetRid}/releases", - query_params={ - "pageSize": page_size, - "pageToken": page_token, - "preview": preview, - }, - path_params={ - "widgetSetRid": widget_set_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=widgets_models.ListReleasesResponse, - request_timeout=request_timeout, - throwable_errors={}, - response_mode=_sdk_internal.get("response_mode", "ITERATOR"), - ), - ) - - -class _AsyncReleaseClientRaw: - def __init__(self, client: AsyncReleaseClient) -> None: - def delete(_: None): ... - def get(_: widgets_models.Release): ... - def list(_: widgets_models.ListReleasesResponse): ... - - self.delete = core.async_with_raw_response(delete, client.delete) - self.get = core.async_with_raw_response(get, client.get) - self.list = core.async_with_raw_response(list, client.list) - - -class _AsyncReleaseClientStreaming: - def __init__(self, client: AsyncReleaseClient) -> None: - def get(_: widgets_models.Release): ... - def list(_: widgets_models.ListReleasesResponse): ... - - self.get = core.async_with_streaming_response(get, client.get) - self.list = core.async_with_streaming_response(list, client.list) diff --git a/foundry_sdk/v2/widgets/repository.py b/foundry_sdk/v2/widgets/repository.py deleted file mode 100644 index 00b490184..000000000 --- a/foundry_sdk/v2/widgets/repository.py +++ /dev/null @@ -1,317 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing - -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v2.core import models as core_models -from foundry_sdk.v2.widgets import errors as widgets_errors -from foundry_sdk.v2.widgets import models as widgets_models - - -class RepositoryClient: - """ - The API client for the Repository Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _RepositoryClientStreaming(self) - self.with_raw_response = _RepositoryClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - repository_rid: widgets_models.RepositoryRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> widgets_models.Repository: - """ - Get the Repository with the specified rid. - :param repository_rid: A Resource Identifier (RID) identifying a repository. - :type repository_rid: RepositoryRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: widgets_models.Repository - - :raises RepositoryNotFound: The given Repository could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/widgets/repositories/{repositoryRid}", - query_params={ - "preview": preview, - }, - path_params={ - "repositoryRid": repository_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=widgets_models.Repository, - request_timeout=request_timeout, - throwable_errors={ - "RepositoryNotFound": widgets_errors.RepositoryNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def publish( - self, - repository_rid: widgets_models.RepositoryRid, - body: bytes, - *, - repository_version: widgets_models.RepositoryVersion, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> widgets_models.Release: - """ - Publish a new release of a widget set. - :param repository_rid: A Resource Identifier (RID) identifying a repository. - :type repository_rid: RepositoryRid - :param body: The zip file that contains the contents of your widget set. It must include a valid manifest file at the path `.palantir/widgets.config.json`. - :type body: bytes - :param repository_version: - :type repository_version: RepositoryVersion - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: widgets_models.Release - - :raises PublishReleasePermissionDenied: Could not publish the Repository. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/widgets/repositories/{repositoryRid}/publish", - query_params={ - "repositoryVersion": repository_version, - "preview": preview, - }, - path_params={ - "repositoryRid": repository_rid, - }, - header_params={ - "Content-Type": "application/octet-stream", - "Accept": "application/json", - }, - body=body, - response_type=widgets_models.Release, - request_timeout=request_timeout, - throwable_errors={ - "PublishReleasePermissionDenied": widgets_errors.PublishReleasePermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _RepositoryClientRaw: - def __init__(self, client: RepositoryClient) -> None: - def get(_: widgets_models.Repository): ... - def publish(_: widgets_models.Release): ... - - self.get = core.with_raw_response(get, client.get) - self.publish = core.with_raw_response(publish, client.publish) - - -class _RepositoryClientStreaming: - def __init__(self, client: RepositoryClient) -> None: - def get(_: widgets_models.Repository): ... - def publish(_: widgets_models.Release): ... - - self.get = core.with_streaming_response(get, client.get) - self.publish = core.with_streaming_response(publish, client.publish) - - -class AsyncRepositoryClient: - """ - The API client for the Repository Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AsyncRepositoryClientStreaming(self) - self.with_raw_response = _AsyncRepositoryClientRaw(self) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - repository_rid: widgets_models.RepositoryRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[widgets_models.Repository]: - """ - Get the Repository with the specified rid. - :param repository_rid: A Resource Identifier (RID) identifying a repository. - :type repository_rid: RepositoryRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[widgets_models.Repository] - - :raises RepositoryNotFound: The given Repository could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/widgets/repositories/{repositoryRid}", - query_params={ - "preview": preview, - }, - path_params={ - "repositoryRid": repository_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=widgets_models.Repository, - request_timeout=request_timeout, - throwable_errors={ - "RepositoryNotFound": widgets_errors.RepositoryNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def publish( - self, - repository_rid: widgets_models.RepositoryRid, - body: bytes, - *, - repository_version: widgets_models.RepositoryVersion, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[widgets_models.Release]: - """ - Publish a new release of a widget set. - :param repository_rid: A Resource Identifier (RID) identifying a repository. - :type repository_rid: RepositoryRid - :param body: The zip file that contains the contents of your widget set. It must include a valid manifest file at the path `.palantir/widgets.config.json`. - :type body: bytes - :param repository_version: - :type repository_version: RepositoryVersion - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[widgets_models.Release] - - :raises PublishReleasePermissionDenied: Could not publish the Repository. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="POST", - resource_path="/v2/widgets/repositories/{repositoryRid}/publish", - query_params={ - "repositoryVersion": repository_version, - "preview": preview, - }, - path_params={ - "repositoryRid": repository_rid, - }, - header_params={ - "Content-Type": "application/octet-stream", - "Accept": "application/json", - }, - body=body, - response_type=widgets_models.Release, - request_timeout=request_timeout, - throwable_errors={ - "PublishReleasePermissionDenied": widgets_errors.PublishReleasePermissionDenied, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _AsyncRepositoryClientRaw: - def __init__(self, client: AsyncRepositoryClient) -> None: - def get(_: widgets_models.Repository): ... - def publish(_: widgets_models.Release): ... - - self.get = core.async_with_raw_response(get, client.get) - self.publish = core.async_with_raw_response(publish, client.publish) - - -class _AsyncRepositoryClientStreaming: - def __init__(self, client: AsyncRepositoryClient) -> None: - def get(_: widgets_models.Repository): ... - def publish(_: widgets_models.Release): ... - - self.get = core.async_with_streaming_response(get, client.get) - self.publish = core.async_with_streaming_response(publish, client.publish) diff --git a/foundry_sdk/v2/widgets/widget_set.py b/foundry_sdk/v2/widgets/widget_set.py deleted file mode 100644 index 8566c6455..000000000 --- a/foundry_sdk/v2/widgets/widget_set.py +++ /dev/null @@ -1,218 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import typing -from functools import cached_property - -import pydantic -import typing_extensions - -from foundry_sdk import _core as core -from foundry_sdk import _errors as errors -from foundry_sdk.v2.core import models as core_models -from foundry_sdk.v2.widgets import errors as widgets_errors -from foundry_sdk.v2.widgets import models as widgets_models - - -class WidgetSetClient: - """ - The API client for the WidgetSet Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _WidgetSetClientStreaming(self) - self.with_raw_response = _WidgetSetClientRaw(self) - - @cached_property - def Release(self): - from foundry_sdk.v2.widgets.release import ReleaseClient - - return ReleaseClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - widget_set_rid: widgets_models.WidgetSetRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> widgets_models.WidgetSet: - """ - Get the WidgetSet with the specified rid. - :param widget_set_rid: A Resource Identifier (RID) identifying a widget set. - :type widget_set_rid: WidgetSetRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: widgets_models.WidgetSet - - :raises WidgetSetNotFound: The given WidgetSet could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/widgets/widgetSets/{widgetSetRid}", - query_params={ - "preview": preview, - }, - path_params={ - "widgetSetRid": widget_set_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=widgets_models.WidgetSet, - request_timeout=request_timeout, - throwable_errors={ - "WidgetSetNotFound": widgets_errors.WidgetSetNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _WidgetSetClientRaw: - def __init__(self, client: WidgetSetClient) -> None: - def get(_: widgets_models.WidgetSet): ... - - self.get = core.with_raw_response(get, client.get) - - -class _WidgetSetClientStreaming: - def __init__(self, client: WidgetSetClient) -> None: - def get(_: widgets_models.WidgetSet): ... - - self.get = core.with_streaming_response(get, client.get) - - -class AsyncWidgetSetClient: - """ - The API client for the WidgetSet Resource. - - :param auth: Your auth configuration. - :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. - :param config: Optionally specify the configuration for the HTTP session. - """ - - def __init__( - self, - auth: core.Auth, - hostname: str, - config: typing.Optional[core.Config] = None, - ): - self._auth = auth - self._hostname = hostname - self._config = config - self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) - - self.with_streaming_response = _AsyncWidgetSetClientStreaming(self) - self.with_raw_response = _AsyncWidgetSetClientRaw(self) - - @cached_property - def Release(self): - from foundry_sdk.v2.widgets.release import AsyncReleaseClient - - return AsyncReleaseClient( - auth=self._auth, - hostname=self._hostname, - config=self._config, - ) - - @core.maybe_ignore_preview - @pydantic.validate_call - @errors.handle_unexpected - def get( - self, - widget_set_rid: widgets_models.WidgetSetRid, - *, - preview: typing.Optional[core_models.PreviewMode] = None, - request_timeout: typing.Optional[core.Timeout] = None, - _sdk_internal: core.SdkInternal = {}, - ) -> typing.Awaitable[widgets_models.WidgetSet]: - """ - Get the WidgetSet with the specified rid. - :param widget_set_rid: A Resource Identifier (RID) identifying a widget set. - :type widget_set_rid: WidgetSetRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] - :param request_timeout: timeout setting for this request in seconds. - :type request_timeout: Optional[int] - :return: Returns the result object. - :rtype: typing.Awaitable[widgets_models.WidgetSet] - - :raises WidgetSetNotFound: The given WidgetSet could not be found. - """ - - return self._api_client.call_api( - core.RequestInfo( - method="GET", - resource_path="/v2/widgets/widgetSets/{widgetSetRid}", - query_params={ - "preview": preview, - }, - path_params={ - "widgetSetRid": widget_set_rid, - }, - header_params={ - "Accept": "application/json", - }, - body=None, - response_type=widgets_models.WidgetSet, - request_timeout=request_timeout, - throwable_errors={ - "WidgetSetNotFound": widgets_errors.WidgetSetNotFound, - }, - response_mode=_sdk_internal.get("response_mode"), - ), - ) - - -class _AsyncWidgetSetClientRaw: - def __init__(self, client: AsyncWidgetSetClient) -> None: - def get(_: widgets_models.WidgetSet): ... - - self.get = core.async_with_raw_response(get, client.get) - - -class _AsyncWidgetSetClientStreaming: - def __init__(self, client: AsyncWidgetSetClient) -> None: - def get(_: widgets_models.WidgetSet): ... - - self.get = core.async_with_streaming_response(get, client.get) diff --git a/pyproject.toml b/pyproject.toml deleted file mode 100644 index ead96e02b..000000000 --- a/pyproject.toml +++ /dev/null @@ -1,46 +0,0 @@ -[tool.poetry] -name = "foundry-platform-sdk" -version = "0.0.0" -description = "The official Python library for the Foundry API" -license = "Apache-2.0" -readme = "README.md" -authors = ["Palantir Technologies, Inc."] -repository = "https://github.com/palantir/foundry-platform-python" -keywords = ["Palantir", "Foundry", "SDK", "Client", "API"] -packages = [{ include = "foundry_sdk" }] - -[tool.poetry.dependencies] -annotated-types = ">=0.7.0, <1.0.0" -pydantic = ">=2.6.0, <3.0.0" -python = "^3.9" -httpx = ">=0.25.0, <1.0.0" -typing-extensions = ">=4.7.1, <5.0.0" -h11 = ">=0.16.0, <1.0.0" # CVE-2025-43859 -retrying = "^1.3.7" - -[tool.poetry.group.test.dependencies] -expects = ">=0.9.0" -mockito = ">=1.5.1" -pytest = ">=7.4.0" -pytest-asyncio = ">=0.23.0" -uvicorn = ">=0.34.0" -fastapi = ">=0.115.6" - -[tool.poetry.extras] -cli = ["click"] -pandas = ["pandas", "pyarrow"] -polars = ["polars", "pyarrow"] -pyarrow = ["pyarrow"] -duckdb = ["duckdb", "pyarrow"] - -[tool.black] -line_length = 100 - -[build-system] -requires = ["setuptools >= 35.0.2", "poetry-core>=1.0.0"] -build-backend = "poetry.core.masonry.api" - - -[tool.poetry.scripts] -foundry_sdk_v1 = "foundry_sdk.v1.cli:cli" -foundry_sdk_v2 = "foundry_sdk.v2.cli:cli" diff --git a/scripts/set_npm_version.js b/scripts/set_npm_version.js deleted file mode 100644 index 455fa4081..000000000 --- a/scripts/set_npm_version.js +++ /dev/null @@ -1,13 +0,0 @@ -const fs = require('fs'); -const { execSync } = require('child_process'); - -const gitVersion = execSync('git describe --tags --abbrev=0').toString().trim(); - -console.log(`Setting version to ${gitVersion}...`); - -const path = 'docs-snippets-npm/package.json'; -const content = JSON.parse(fs.readFileSync(path, 'utf8')); -content.version = gitVersion; -fs.writeFileSync(path, JSON.stringify(content, null, 2)); - -console.log('Done!'); diff --git a/scripts/set_python_version.py b/scripts/set_python_version.py deleted file mode 100644 index e7b8aca1c..000000000 --- a/scripts/set_python_version.py +++ /dev/null @@ -1,17 +0,0 @@ -import subprocess - -gitversion = subprocess.check_output("git describe --tags --abbrev=0".split()).decode().strip() - -print(f"Setting version to {gitversion}...") - -path = "foundry_sdk/_versions.py" - -with open(path, "r") as f: - content = f.read() - -content = content.replace('__version__ = "0.0.0"', f'__version__ = "{gitversion}"') - -with open(path, "w") as f: - f.write(content) - -print("Done!") diff --git a/tests/auth/__init__.py b/tests/auth/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/tests/auth/test_confidential_client.py b/tests/auth/test_confidential_client.py deleted file mode 100644 index a6d662ac1..000000000 --- a/tests/auth/test_confidential_client.py +++ /dev/null @@ -1,163 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import contextlib - -import httpx -import pytest -from mockito import any -from mockito import spy -from mockito import unstub -from mockito import verify -from mockito import when - -from foundry_sdk._core.confidential_client_auth import ConfidentialClientAuth -from foundry_sdk._core.oauth_utils import SignInResponse - -RESPONSE = { - "access_token": "access_token", - "token_type": "foo", - "expires_in": 3600, -} - - -@contextlib.contextmanager -def stubbed_auth(should_refresh=True, token_response=RESPONSE): - auth = ConfidentialClientAuth( - client_id="client_id", - client_secret="client_secret", - hostname="https://a.b.c.com", - should_refresh=should_refresh, - ) - - response = httpx.Response( - request=httpx.Request("GET", "foo"), status_code=200, json=token_response - ) - when(auth._get_client()).post("/multipass/api/oauth2/token", data=any()).thenReturn(response) - - response = httpx.Response(request=httpx.Request("GET", "foo"), status_code=200) - when(auth._get_client()).post("/multipass/api/oauth2/revoke_token", data=any()).thenReturn( - response - ) - - when(auth)._try_refresh_token().thenCallOriginalImplementation() - when(auth).sign_out().thenCallOriginalImplementation() - - yield auth - unstub() - - -def test_confidential_client_instantiate(): - auth = ConfidentialClientAuth( - client_id="client_id", - client_secret="client_secret", - hostname="https://a.b.c.com", - should_refresh=True, - ) - assert auth._client_id == "client_id" - assert auth._client_secret == "client_secret" - assert auth._hostname == "https://a.b.c.com" - assert auth._token == None - assert auth.url == "a.b.c.com" - assert auth._should_refresh == True - - -def test_confidential_client_url(): - assert ( - ConfidentialClientAuth(client_id="1", client_secret="1", hostname="https://a.b.c.com").url - == "a.b.c.com" - ) - assert ( - ConfidentialClientAuth(client_id="1", client_secret="1", hostname="http://a.b.c.com").url - == "a.b.c.com" - ) - assert ( - ConfidentialClientAuth(client_id="1", client_secret="1", hostname="a.b.c.com/").url - == "a.b.c.com" - ) - - -def test_confidential_client_get_token(): - with stubbed_auth() as auth: - assert auth.get_token().access_token == "access_token" - - -def test_confidential_client_sign_out(): - with stubbed_auth() as auth: - auth.get_token() - assert auth._token is not None - auth.sign_out() - assert auth._token is None - assert auth._stop_refresh_event._flag == True # type: ignore - - -def test_confidential_client_execute_with_token_successful_method(): - with stubbed_auth() as auth: - assert auth.execute_with_token(lambda _: httpx.Response(200)).status_code == 200 - verify(auth, times=0)._refresh_token() - - -def test_confidential_client_execute_with_token_failing_method(): - with stubbed_auth() as auth: - - def raise_(ex): - raise ex - - with pytest.raises(ValueError): - auth.execute_with_token(lambda _: raise_(ValueError("Oops!"))) - - verify(auth, times=0)._refresh_token() - verify(auth, times=0).sign_out() - - -def test_confidential_client_execute_with_token_method_raises_401(): - with stubbed_auth() as auth: - - def raise_401(): - e = httpx.HTTPStatusError( - "foo", - request=httpx.Request("foo", url="foo"), - response=httpx.Response(status_code=401), - ) - raise e - - with pytest.raises(httpx.HTTPStatusError): - auth.execute_with_token(lambda _: raise_401()) - - verify(auth, times=1)._try_refresh_token() - verify(auth, times=1).sign_out() - - -def test_invalid_client_id_raises_appropriate_error(): - assert pytest.raises(TypeError, lambda: ConfidentialClientAuth()) # type: ignore - assert pytest.raises(TypeError, lambda: ConfidentialClientAuth(1, "1")) # type: ignore - assert pytest.raises(TypeError, lambda: ConfidentialClientAuth(None, "1")) # type: ignore - assert pytest.raises(ValueError, lambda: ConfidentialClientAuth("", "1")) - - -def test_invalid_client_secret_raises_appropriate_error(): - assert pytest.raises(TypeError, lambda: ConfidentialClientAuth("1")) # type: ignore - assert pytest.raises(TypeError, lambda: ConfidentialClientAuth("1", 1)) # type: ignore - assert pytest.raises(TypeError, lambda: ConfidentialClientAuth("1", None)) # type: ignore - assert pytest.raises(ValueError, lambda: ConfidentialClientAuth("1", "")) - - -def test_invalid_hostname_raises_appropriate_error(): - assert pytest.raises(TypeError, lambda: ConfidentialClientAuth("1", "1", 1)) # type: ignore - assert pytest.raises(ValueError, lambda: ConfidentialClientAuth("1", "1", "")) # type: ignore - - -def test_invalid_scopes_raises_appropriate_error(): - assert pytest.raises(TypeError, lambda: ConfidentialClientAuth("1", "1", scopes=1)) # type: ignore diff --git a/tests/auth/test_confidential_client_oauth_flow_provider.py b/tests/auth/test_confidential_client_oauth_flow_provider.py deleted file mode 100644 index 467a83da0..000000000 --- a/tests/auth/test_confidential_client_oauth_flow_provider.py +++ /dev/null @@ -1,106 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import httpx -import pytest -from expects import equal -from expects import expect -from mockito import mock -from mockito import unstub -from mockito import when - -from foundry_sdk._core.http_client import HttpClient -from foundry_sdk._core.oauth_utils import ConfidentialClientOAuthFlowProvider -from foundry_sdk._core.oauth_utils import OAuthUtils - - -@pytest.fixture(name="client", scope="module") -def instantiate_server_oauth_flow_provider(): - return ConfidentialClientOAuthFlowProvider( - client_id="client_id", - client_secret="client_secret", - multipass_context_path="/multipass", - scopes=["scope1", "scope2"], - ) - - -@pytest.fixture(scope="module") -def http_client(): - return HttpClient("https://a.b.c.com") - - -def test_get_token(client, http_client): - response = mock(httpx.Response) - when(response).raise_for_status().thenReturn(None) - when(response).json().thenReturn( - {"access_token": "example_token", "expires_in": 42, "token_type": "Bearer"} - ) - when(http_client).post( - "/multipass/api/oauth2/token", - data={ - "client_id": "client_id", - "client_secret": "client_secret", - "grant_type": "client_credentials", - "scope": "scope1 scope2 offline_access", - }, - ).thenReturn(response) - token = client.get_token(http_client) - expect(token.access_token).to(equal("example_token")) - expect(token.token_type).to(equal("Bearer")) - unstub() - - -def test_get_token_throws_when_unsuccessful(client, http_client): - response = mock(httpx.Response) - when(response).raise_for_status().thenRaise( - httpx.HTTPStatusError( - "Foo", - request=httpx.Request("GET", "/foo/bar"), - response=httpx.Response(200), - ), - ) - when(http_client).post( - "/multipass/api/oauth2/token", - data={ - "client_id": "client_id", - "client_secret": "client_secret", - "grant_type": "client_credentials", - "scope": "scope1 scope2 offline_access", - }, - ).thenReturn(response) - - with pytest.raises(httpx.HTTPStatusError): - client.get_token(http_client) - - unstub() - - -def test_revoke_token(client, http_client): - response = mock(httpx.Response) - when(response).raise_for_status().thenReturn(None) - when(http_client).post( - "/multipass/api/oauth2/revoke_token", - data={ - "client_id": "client_id", - "client_secret": "client_secret", - "token": "token_to_be_revoked", - }, - ).thenReturn(response) - client.revoke_token(http_client, "token_to_be_revoked") - unstub() - - -def test_get_scopes(client): - expect(client.get_scopes()).to(equal(["scope1", "scope2", "offline_access"])) diff --git a/tests/auth/test_oauth_utils.py b/tests/auth/test_oauth_utils.py deleted file mode 100644 index 707ab5998..000000000 --- a/tests/auth/test_oauth_utils.py +++ /dev/null @@ -1,87 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -from expects import equal -from expects import expect -from mockito import unstub -from mockito import when - -from foundry_sdk._core.oauth_utils import ConfidentialClientOAuthFlowProvider -from foundry_sdk._core.oauth_utils import OAuthToken -from foundry_sdk._core.oauth_utils import OAuthTokenResponse -from foundry_sdk._core.oauth_utils import OAuthUtils -from foundry_sdk._core.oauth_utils import PublicClientOAuthFlowProvider - - -def test_get_token_uri(): - expect(OAuthUtils.get_token_uri()).to(equal("/multipass/api/oauth2/token")) - - -def test_get_authorize_uri(): - expect(OAuthUtils.get_authorize_uri()).to(equal("/multipass/api/oauth2/authorize")) - - -def test_get_revoke_uri(): - expect(OAuthUtils.get_revoke_uri()).to(equal("/multipass/api/oauth2/revoke_token")) - - -def test_create_uri(): - expect(OAuthUtils.create_uri("/api/v2/datasets", "/abc")).to(equal("/api/v2/datasets/abc")) - expect(OAuthUtils.create_uri("/api/v2/datasets", "/abc")).to(equal("/api/v2/datasets/abc")) - - -def test_confidential_client_no_scopes(): - provider = ConfidentialClientOAuthFlowProvider("CLIENT_ID", "CLIENT_SECRET", "URL", scopes=None) - assert provider.get_scopes() == [] - - provider.scopes = [] - assert provider.get_scopes() == [] - - -def test_confidential_client_with_scopes(): - provider = ConfidentialClientOAuthFlowProvider( - "CLIENT_ID", "CLIENT_SECRET", "URL", scopes=["test"] - ) - assert provider.get_scopes() == ["test", "offline_access"] - - -def test_public_client_no_scopes(): - provider = PublicClientOAuthFlowProvider("CLIENT_ID", "REDIRECT_URL", "URL", scopes=None) - assert provider.get_scopes() == [] - - provider.scopes = [] - assert provider.get_scopes() == [] - - -def test_public_client_with_scopes(): - provider = PublicClientOAuthFlowProvider("CLIENT_ID", "REDIRECT_URL", "URL", scopes=["test"]) - assert provider.get_scopes() == ["test", "offline_access"] - - -def test_token_from_dict(): - import foundry_sdk._core.oauth_utils as module_under_test - - when(module_under_test.time).time().thenReturn(123) - token = OAuthToken( - OAuthTokenResponse( - {"access_token": "example_token", "expires_in": 42, "token_type": "Bearer"} - ) - ) - expect(token.access_token).to(equal("example_token")) - expect(token.token_type).to(equal("Bearer")) - expect(token.expires_in).to(equal(42)) - expect(token.expires_at).to(equal(123 * 1000 + 42 * 1000)) - expect(token._calculate_expiration()).to(equal(123 * 1000 + 42 * 1000)) - unstub() diff --git a/tests/auth/test_public_client.py b/tests/auth/test_public_client.py deleted file mode 100644 index 839c76b3a..000000000 --- a/tests/auth/test_public_client.py +++ /dev/null @@ -1,178 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import contextlib - -import httpx -import pytest -from mockito import any -from mockito import spy -from mockito import unstub -from mockito import verify -from mockito import when - -from foundry_sdk._core.auth_utils import Token -from foundry_sdk._core.oauth_utils import AuthorizeRequest -from foundry_sdk._core.oauth_utils import OAuthToken -from foundry_sdk._core.oauth_utils import OAuthTokenResponse -from foundry_sdk._core.public_client_auth import PublicClientAuth -from foundry_sdk._errors.not_authenticated import NotAuthenticated - -RESPONSE = { - "access_token": "access_token", - "token_type": "foo", - "expires_in": 3600, - "refresh_token": "bar", -} - - -@contextlib.contextmanager -def stubbed_auth(should_refresh=True, token_response=RESPONSE): - auth = PublicClientAuth( - client_id="client_id", - redirect_url="redirect_url", - hostname="https://a.b.c.com", - should_refresh=should_refresh, - ) - - response = httpx.Response( - request=httpx.Request("GET", "foo"), status_code=200, json=token_response - ) - when(auth._get_client()).post( - "/multipass/api/oauth2/token", - headers={"Content-Type": "application/x-www-form-urlencoded"}, - data=any(), - ).thenReturn(response) - - response = httpx.Response(request=httpx.Request("GET", "foo"), status_code=200) - when(auth._get_client()).post("/multipass/api/oauth2/revoke_token", data=any()).thenReturn( - response - ) - - when(auth)._try_refresh_token().thenCallOriginalImplementation() - when(auth).sign_out().thenCallOriginalImplementation() - - yield auth - unstub() - - -def _sign_in(auth: PublicClientAuth): - auth.sign_in() - assert auth._auth_request is not None - auth.set_token(code="", state=auth._auth_request.state) - - -def test_public_client_instantiate(): - auth = PublicClientAuth( - client_id="client_id", - redirect_url="redirect_url", - hostname="https://a.b.c.com", - should_refresh=True, - ) - assert auth._client_id == "client_id" - assert auth._redirect_url == "redirect_url" - assert auth._token == None - assert auth.url == "a.b.c.com" - assert auth._should_refresh == True - - -def test_public_client_sign_in(): - with stubbed_auth() as auth: - assert auth.sign_in().startswith("https://a.b.c.com/multipass/api/oauth2/authorize?") - assert auth._auth_request is not None - - -def test_public_client_set_token(): - with stubbed_auth() as auth: - auth.sign_in() - assert auth._auth_request is not None - - auth.set_token(code="", state=auth._auth_request.state) - assert auth._token is not None - assert auth._token.access_token == "access_token" - - -def test_public_client_url(): - assert ( - PublicClientAuth(client_id="", redirect_url="", hostname="https://a.b.c.com").url - == "a.b.c.com" - ) - assert ( - PublicClientAuth(client_id="", redirect_url="", hostname="http://a.b.c.com").url - == "a.b.c.com" - ) - assert PublicClientAuth(client_id="", redirect_url="", hostname="a.b.c.com/").url == "a.b.c.com" - - -def test_public_client_get_token(): - with stubbed_auth() as auth: - _sign_in(auth) - assert isinstance(auth.get_token(), Token) - - -def test_public_client_sign_out(): - with stubbed_auth() as auth: - _sign_in(auth) - assert auth._token is not None - - auth.sign_out() - assert auth._token is None - assert auth._stop_refresh_event._flag == True # type: ignore - - -def test_public_client_get_token_throws_if_not_signed_in(): - with stubbed_auth() as auth: - with pytest.raises(NotAuthenticated) as e: - auth.get_token() - - assert str(e.value) == "Client has not been authenticated." - - -def test_public_client_execute_with_token_successful_method(): - with stubbed_auth() as auth: - _sign_in(auth) - assert auth.execute_with_token(lambda _: httpx.Response(200)).status_code == 200 - verify(auth, times=0)._refresh_token() - - -def test_public_client_execute_with_token_failing_method(): - with stubbed_auth() as auth: - _sign_in(auth) - - def raise_(ex): - raise ex - - with pytest.raises(ValueError): - auth.execute_with_token(lambda _: raise_(ValueError("Oops!"))) - - verify(auth, times=0)._refresh_token() - - -def test_public_client_execute_with_token_method_raises_401(): - with stubbed_auth() as auth: - _sign_in(auth) - - def raise_401(): - e = httpx.HTTPStatusError( - "foo", - request=httpx.Request("foo", url="foo"), - response=httpx.Response(status_code=401), - ) - raise e - - with pytest.raises(httpx.HTTPStatusError): - auth.execute_with_token(lambda _: raise_401()) - - verify(auth, times=1)._try_refresh_token() diff --git a/tests/auth/test_public_client_oauth_flow_provider.py b/tests/auth/test_public_client_oauth_flow_provider.py deleted file mode 100644 index 991df1ee9..000000000 --- a/tests/auth/test_public_client_oauth_flow_provider.py +++ /dev/null @@ -1,136 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import httpx -import pytest -from expects import equal -from expects import expect -from expects import raise_error -from mockito import mock -from mockito import unstub -from mockito import when - -from foundry_sdk._core.http_client import HttpClient -from foundry_sdk._core.oauth_utils import OAuthUtils -from foundry_sdk._core.oauth_utils import PublicClientOAuthFlowProvider - - -@pytest.fixture(name="client", scope="module") -def instantiate_server_oauth_flow_provider(): - return PublicClientOAuthFlowProvider( - client_id="client_id", - redirect_url="redirect_url", - multipass_context_path="/multipass", - scopes=["scope1", "scope2"], - ) - - -@pytest.fixture(scope="module") -def http_client(): - return HttpClient("https://a.b.c.com") - - -def test_get_token(http_client, client): - response = mock(httpx.Response) - when(response).raise_for_status().thenReturn(None) - when(response).json().thenReturn( - {"access_token": "example_token", "expires_in": 42, "token_type": "Bearer"} - ) - - headers = {"Content-Type": "application/x-www-form-urlencoded"} - params = { - "grant_type": "authorization_code", - "code": "code", - "redirect_uri": "redirect_url", - "client_id": "client_id", - "code_verifier": "code_verifier", - "scope": "scope1 scope2 offline_access", - } - - when(http_client).post("/multipass/api/oauth2/token", data=params, headers=headers).thenReturn( - response - ) - token = client.get_token(http_client, code="code", code_verifier="code_verifier") - expect(token.access_token).to(equal("example_token")) - expect(token.token_type).to(equal("Bearer")) - unstub() - - -def test_get_token_throws_when_unsuccessful(http_client, client): - response = mock(httpx.Response) - when(response).raise_for_status().thenRaise( - httpx.HTTPStatusError( - "Foo", - request=httpx.Request("GET", "/foo/bar"), - response=httpx.Response(200), - ), - ) - - headers = {"Content-Type": "application/x-www-form-urlencoded"} - params = { - "grant_type": "authorization_code", - "code": "code", - "redirect_uri": "redirect_url", - "client_id": "client_id", - "code_verifier": "code_verifier", - "scope": "scope1 scope2 offline_access", - } - - when(http_client).post("/multipass/api/oauth2/token", data=params, headers=headers).thenReturn( - response - ) - - with pytest.raises(httpx.HTTPStatusError): - client.get_token(http_client, code="code", code_verifier="code_verifier") - - unstub() - - -def test_refresh_token(http_client, client): - response = mock(httpx.Response) - when(response).raise_for_status().thenReturn(None) - when(response).json().thenReturn( - {"access_token": "example_token", "expires_in": 42, "token_type": "Bearer"} - ) - - headers = {"Content-Type": "application/x-www-form-urlencoded"} - params = { - "grant_type": "refresh_token", - "client_id": "client_id", - "refresh_token": "refresh_token", - } - - when(http_client).post("/multipass/api/oauth2/token", data=params, headers=headers).thenReturn( - response - ) - token = client.refresh_token(http_client, refresh_token="refresh_token") - expect(token.access_token).to(equal("example_token")) - expect(token.token_type).to(equal("Bearer")) - unstub() - - -def test_revoke_token(http_client, client): - response = mock(httpx.Response) - when(response).raise_for_status().thenReturn(None) - when(http_client).post( - "/multipass/api/oauth2/revoke_token", - data={"client_id": "client_id", "token": "token_to_be_revoked"}, - ).thenReturn(response) - client.revoke_token(http_client, "token_to_be_revoked") - unstub() - - -def test_get_scopes(http_client, client): - expect(client.get_scopes()).to(equal(["scope1", "scope2", "offline_access"])) diff --git a/tests/auth/test_user_auth_token_client.py b/tests/auth/test_user_auth_token_client.py deleted file mode 100644 index f48cc3269..000000000 --- a/tests/auth/test_user_auth_token_client.py +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import pytest - -from foundry_sdk import UserTokenAuth - - -def test_invalid_token_raises_appropriate_error(): - assert pytest.raises(TypeError, lambda: UserTokenAuth()) # type: ignore - assert pytest.raises(TypeError, lambda: UserTokenAuth(1)) # type: ignore - assert pytest.raises(TypeError, lambda: UserTokenAuth(None)) # type: ignore - assert pytest.raises(ValueError, lambda: UserTokenAuth("")) diff --git a/tests/conftest.py b/tests/conftest.py deleted file mode 100644 index 0fa59f668..000000000 --- a/tests/conftest.py +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import subprocess -import time - -import pytest - -PORT = 8123 - - -@pytest.fixture(scope="session", autouse=True) -def fastapi_server(): - # Start the server - process = subprocess.Popen( - ["uvicorn", "tests.server:app", "--host", "127.0.0.1", "--port", str(PORT)] - ) - time.sleep(2) # Wait a moment for the server to start - - yield - - # Teardown: Stop the server - process.terminate() diff --git a/tests/functions/__init__.py b/tests/functions/__init__.py deleted file mode 100644 index 490e9ab88..000000000 --- a/tests/functions/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. diff --git a/tests/server.py b/tests/server.py deleted file mode 100644 index b5e7600a6..000000000 --- a/tests/server.py +++ /dev/null @@ -1,82 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import time -from typing import List -from typing import Optional - -from fastapi import APIRouter -from fastapi import FastAPI -from fastapi import HTTPException -from fastapi import Request -from fastapi.responses import StreamingResponse -from pydantic import BaseModel -from pydantic import Field - -app = FastAPI() -router = APIRouter() - - -class FooBar(BaseModel): - foo: str - bar: int - - -@router.get("/foo/bar", response_model=FooBar) -def foo_bar() -> FooBar: - return FooBar(foo="foo", bar=2) - - -class FooData(BaseModel): - data: List[FooBar] - next_page_token: Optional[str] = Field(alias="nextPageToken", default=None) - - -@router.get("/foo/iterator", response_model=FooData) -def foo_iterator() -> FooData: - return FooData( - data=[ - FooBar(foo="foo", bar=1), - FooBar(foo="foo", bar=2), - ], - nextPageToken=None, - ) - - -@router.get("/foo/timeout", response_model=FooBar) -def timeout() -> FooBar: - time.sleep(10) - return FooBar(foo="foo", bar=2) - - -@router.get("/foo/stream") -def stream() -> StreamingResponse: - content = "foo\nbar\nbaz" - - def generate_data(): - lines = content.split("\n") - for i, line in enumerate(lines): - is_final_line = i == len(lines) - 1 - yield line if is_final_line else line + "\n" - - return StreamingResponse(generate_data(), media_type="text/plain") - - -@app.api_route("/proxy/error", methods=["CONNECT"]) -def proxy_error(full_path: str): - raise HTTPException(status_code=400, detail="Bad Request") - - -app.include_router(router, prefix="/api") diff --git a/tests/test_api_client.py b/tests/test_api_client.py deleted file mode 100644 index 8ea89d13c..000000000 --- a/tests/test_api_client.py +++ /dev/null @@ -1,664 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import json -import warnings -from datetime import datetime -from datetime import timezone -from typing import Any -from typing import AsyncIterator -from typing import Dict -from typing import List -from typing import Literal -from typing import Optional -from typing import Union -from typing import cast -from unittest.mock import ANY -from unittest.mock import Mock -from unittest.mock import patch - -import httpx -import pytest - -from foundry_sdk import ApiNotFoundError -from foundry_sdk import BadRequestError -from foundry_sdk import ConfidentialClientAuth -from foundry_sdk import Config -from foundry_sdk import ConflictError -from foundry_sdk import ConnectionError -from foundry_sdk import InternalServerError -from foundry_sdk import NotFoundError -from foundry_sdk import PalantirRPCException -from foundry_sdk import PermissionDeniedError -from foundry_sdk import ProxyError -from foundry_sdk import RateLimitError -from foundry_sdk import ReadTimeout -from foundry_sdk import RequestEntityTooLargeError -from foundry_sdk import ServiceUnavailable -from foundry_sdk import StreamConsumedError -from foundry_sdk import UnauthorizedError -from foundry_sdk import UnprocessableEntityError -from foundry_sdk import UserTokenAuth -from foundry_sdk import WriteTimeout -from foundry_sdk import __version__ -from foundry_sdk._core import ApiClient -from foundry_sdk._core import ApiResponse -from foundry_sdk._core import AsyncApiClient -from foundry_sdk._core import RequestInfo -from tests.server import FooBar -from tests.server import FooData - -HOSTNAME = "localhost:8123" - - -class AttrDict(Dict[str, Any]): - def __init__(self, *args: Any, **kwargs: Any): - super(AttrDict, self).__init__(*args, **kwargs) - self.__dict__ = self - - -EXAMPLE_ERROR = json.dumps( - { - "errorCode": "ERROR_CODE", - "errorName": "ERROR_NAME", - "errorInstanceId": "123", - "parameters": {}, - } -) - -EMPTY_BODY = "" - - -def assert_called_with(client: Union[ApiClient, AsyncApiClient], **kwargs): - if isinstance(client, AsyncApiClient): - build_request = cast(Mock, client._client.build_request) - else: - build_request = cast(Mock, client._session.build_request) - - build_request.assert_called_with( - **{ - "method": ANY, - "url": ANY, - "headers": ANY, - "params": ANY, - "content": ANY, - "timeout": ANY, - **kwargs, - } - ) - - -def _throw(exception: Exception): - def wrapper(*_args, **_kwargs): - raise exception - - return wrapper - - -def get_mock_awaitable(return_value): - async def mock_awaitable(*args, **kwargs): - return return_value - - return Mock(wraps=mock_awaitable) - - -def create_mock_client(config: Optional[Config] = None, hostname=HOSTNAME): - client = ApiClient(auth=UserTokenAuth(token="bar"), hostname=hostname, config=config) - client._session.build_request = Mock(wraps=client._session.build_request) - client._session.send = Mock(return_value=AttrDict(status_code=200, content=b"", headers={})) - return client - - -def create_async_mock_client(config: Optional[Config] = None, hostname=HOSTNAME): - client = AsyncApiClient(auth=UserTokenAuth(token="bar"), hostname=hostname, config=config) - client._client.build_request = Mock(wraps=client._client.build_request) - client._client.send = get_mock_awaitable(AttrDict(status_code=200, content=b"", headers={})) - return client - - -def create_client( - config: Optional[Config] = None, - hostname=HOSTNAME, - scheme: Literal["https", "http"] = "http", -): - config = config or Config() - config.scheme = scheme - return ApiClient(auth=UserTokenAuth(token="bar"), hostname=hostname, config=config) - - -def create_async_client( - config: Optional[Config] = None, - hostname=HOSTNAME, - scheme: Literal["https", "http"] = "http", -): - config = config or Config() - config.scheme = scheme - return AsyncApiClient(auth=UserTokenAuth(token="bar"), hostname=hostname, config=config) - - -def test_authorization_header(): - client = create_mock_client() - client.call_api(RequestInfo.with_defaults("GET", "/foo/bar")) - # Ensure the bearer token gets added to the headers - assert_called_with(client, headers={"Authorization": "Bearer bar"}) - - -def test_timeout(): - client = create_mock_client(config=Config(timeout=60)) - client.call_api(RequestInfo.with_defaults("GET", "/foo/bar", request_timeout=30)) - assert_called_with(client, timeout=30) - - -def test_config_passed_to_http_client(): - # Just check that at least one config var was set correctly to ensure - # the config is being passed to the http client - client = create_client(config=Config(timeout=60)) - assert client._session.timeout == httpx.Timeout(60) - - -def test_path_encoding(): - client = create_mock_client() - - client.call_api( - RequestInfo.with_defaults( - "GET", - "/files/{path}", - path_params={"path": "/my/file.txt"}, - ) - ) - - assert_called_with(client, url="/api/files/%2Fmy%2Ffile.txt") - - -def test_null_query_params(): - client = create_mock_client() - client.call_api( - RequestInfo.with_defaults("GET", "/foo/bar", query_params={"foo": "foo", "bar": None}) - ) - assert_called_with(client, url="/api/foo/bar", params=[("foo", "foo")]) - - -def test_shared_transport(): - client1 = create_mock_client() - client2 = create_mock_client() - session1 = client1._session - session2 = client2._session - assert session1._transport == session2._transport - - -def call_api_helper( - status_code: int, - data: str, - headers: Dict[str, str] = {}, -): - client = ApiClient(auth=UserTokenAuth(token="bar"), hostname="foo") - - client._session.send = Mock( - return_value=AttrDict( - status_code=status_code, - headers=headers, - content=data.encode(), - text=data, - json=lambda: json.loads(data), - ) - ) - - return client.call_api(RequestInfo.with_defaults("POST", "/abc")) - - -def test_call_api_400(): - with pytest.raises(BadRequestError) as info: - call_api_helper(status_code=400, data=EXAMPLE_ERROR, headers={"Header": "A"}) - - assert info.value.name == "ERROR_NAME" - assert info.value.error_instance_id == "123" - assert info.value.parameters == {} - - -def test_401_error(): - with pytest.raises(UnauthorizedError): - call_api_helper(status_code=401, data=EXAMPLE_ERROR) - - -def test_403_error(): - with pytest.raises(PermissionDeniedError): - call_api_helper(status_code=403, data=EXAMPLE_ERROR) - - -def test_404_error(): - with pytest.raises(NotFoundError): - call_api_helper(status_code=404, data=EXAMPLE_ERROR) - - -def test_404_with_no_body(): - with pytest.raises(ApiNotFoundError): - call_api_helper(status_code=404, data=EMPTY_BODY) - - -def test_422_error(): - with pytest.raises(UnprocessableEntityError): - call_api_helper(status_code=422, data=EXAMPLE_ERROR) - - -def test_429_error(): - with pytest.raises(RateLimitError): - call_api_helper(status_code=429, data=EMPTY_BODY) - - -def test_503_with_propagate_to_caller(): - client = ApiClient( - auth=UserTokenAuth(token="bar"), - hostname="foo", - config=Config(propagate_qos="PROPAGATE_429_AND_503_TO_CALLER"), - ) - - client._session.send = Mock( - side_effect=( - AttrDict(status_code=503, headers={}, content=b"", text=""), - AttrDict(status_code=200, headers={}, content=b"", text=""), - ) - ) - - with pytest.raises(ServiceUnavailable): - client.call_api(RequestInfo.with_defaults("POST", "/abc")) - - assert client._session.send.call_count == 1 - - -def test_503_with_retry(): - client = ApiClient( - auth=UserTokenAuth(token="bar"), - hostname="foo", - config=Config(propagate_qos="AUTOMATIC_RETRY"), - ) - - client._session.send = Mock( - side_effect=( - AttrDict(status_code=503, headers={}, content=b"", text=""), - AttrDict(status_code=200, headers={}, content=b"", text=""), - ) - ) - - response = client.call_api(RequestInfo.with_defaults("POST", "/abc", response_mode="RAW")) - assert response.status_code == 200 - - assert client._session.send.call_count == 2 - - -def test_413_error(): - with pytest.raises(RequestEntityTooLargeError): - call_api_helper(status_code=413, data=EXAMPLE_ERROR) - - -def test_409_error(): - with pytest.raises(ConflictError): - call_api_helper(status_code=409, data=EXAMPLE_ERROR) - - -def test_call_api_500(): - with pytest.raises(InternalServerError): - call_api_helper(status_code=500, data=EXAMPLE_ERROR) - - -def test_call_api_599(): - with pytest.raises(InternalServerError): - call_api_helper(status_code=599, data=EXAMPLE_ERROR) - - -def test_call_api_600(): - with pytest.raises(PalantirRPCException): - call_api_helper(status_code=600, data=EXAMPLE_ERROR) - - -def test_cannot_cause_invalid_url_error(): - client = create_client() - request_info = RequestInfo.with_defaults("GET", "/foo/{bar}", path_params={"bar": "|https://"}) - - # This confirms that the path parameters are encoded since "|https://" in a URL is invalid - # The encoded path doesn't exist so we get back a 404 error - with pytest.raises(NotFoundError): - client.call_api(request_info) - - -def test_connect_timeout(): - client = create_client(hostname="localhost:9876", config=Config(timeout=1e-6)) - request_info = RequestInfo.with_defaults("GET", "/foo/bar") - - with pytest.raises(ConnectionError): - client.call_api(request_info) - - -def test_read_timeout(): - client = create_client(config=Config(timeout=1e-6)) - request_info = RequestInfo.with_defaults("GET", "/foo/timeout") - - with pytest.raises(ReadTimeout): - client.call_api(request_info) - - -def test_write_timeout(): - client = create_client(config=Config(timeout=1e-6)) - data = b"*" * 1024 * 1024 * 100 - request_info = RequestInfo.with_defaults("GET", "/foo/timeout", body=data) - - with pytest.raises(WriteTimeout): - client.call_api(request_info) - - -def test_stream_consumed_error(): - client = create_client() - request_info = RequestInfo.with_defaults("GET", "/foo/stream", response_mode="STREAMING") - - with client.call_api(request_info) as response: - for _ in response.iter_bytes(): - pass - - with pytest.raises(StreamConsumedError): - for _ in response.iter_bytes(): - pass - - -def test_streaming_response_type(): - client = create_client() - request_info = RequestInfo.with_defaults("GET", "/foo/stream", response_mode="STREAMING") - - with client.call_api(request_info) as response: - iterator = response.iter_bytes() - assert next(iterator) == b"foo\n" - assert next(iterator) == b"bar\n" - assert next(iterator) == b"baz" - - -def test_raw_response_type(): - client = create_client() - request_info = RequestInfo.with_defaults("GET", "/foo/bar", response_mode="RAW") - - response = client.call_api(request_info) - assert response.text == '{"foo":"foo","bar":2}' - assert response.json() == {"foo": "foo", "bar": 2} - - -def test_iterator_response_type(): - client = create_client() - request_info = RequestInfo.with_defaults( - "GET", - "/foo/iterator", - response_mode="ITERATOR", - response_type=FooData, - ) - - response = client.call_api(request_info) - assert len(response.data) == 2 - assert len(list(response)) == 2 - - -def test_proxy_error(): - client = create_client() - request_info = RequestInfo.with_defaults("GET", "/proxy/error") - - # I can't figure out a way to mock "ProxyError" since it involves connecting to a server - # using https - # https://github.com/encode/httpcore/blob/a1735520e3826ccc861cdadf3e692abfbb19ac6a/httpcore/_sync/http_proxy.py#L156 - # This is an error we could hit so I'll just use the mock library to simulate the error - with patch("httpx.Client.send", side_effect=_throw(httpx.ProxyError("foo"))): - with pytest.raises(ProxyError): - client.call_api(request_info) - - -def test_ssl_error(): - client = create_client(scheme="https", config=Config(timeout=1)) - request_info = RequestInfo.with_defaults("GET", "localhost:8123") - - with pytest.raises(ConnectionError) as error: - client.call_api(request_info) - - assert "SSL" in str(error.value) - - -def test_passing_in_str_auth(): - with pytest.raises(TypeError) as e: - ApiClient(auth="foo", hostname="localhost:8123") # type: ignore - assert str(e.value).startswith( - "auth must be an instance of UserTokenAuth, ConfidentialClientAuth or PublicClientAuth, not a string." - ) - - with pytest.raises(TypeError) as e: - AsyncApiClient(auth="foo", hostname="localhost:8123") # type: ignore - assert str(e.value).startswith( - "auth must be an instance of UserTokenAuth, ConfidentialClientAuth or PublicClientAuth, not a string." - ) - - -def test_passing_in_int_to_auth(): - with pytest.raises(TypeError) as e: - ApiClient(auth=2, hostname="localhost:8123") # type: ignore - assert ( - str(e.value) - == "auth must be an instance of UserTokenAuth, ConfidentialClientAuth or PublicClientAuth, not an instance of int." - ) - - with pytest.raises(TypeError) as e: - AsyncApiClient(auth=2, hostname="localhost:8123") # type: ignore - assert ( - str(e.value) - == "auth must be an instance of UserTokenAuth, ConfidentialClientAuth or PublicClientAuth, not an instance of int." - ) - - -def test_passing_in_int_to_hostname(): - with pytest.raises(TypeError) as e: - ApiClient(auth=UserTokenAuth(token="foo"), hostname=2) # type: ignore - assert str(e.value) == "hostname must be a string, not int." - - with pytest.raises(TypeError) as e: - AsyncApiClient(auth=UserTokenAuth(token="foo"), hostname=2) # type: ignore - assert str(e.value) == "hostname must be a string, not int." - - -def test_passing_in_int_to_config(): - with pytest.raises(TypeError) as e: - ApiClient(auth=UserTokenAuth(token="foo"), hostname="localhost:1234", config=2) # type: ignore - assert str(e.value) == "config must be an instance of Config, not int." - - with pytest.raises(TypeError) as e: - AsyncApiClient(auth=UserTokenAuth(token="foo"), hostname="localhost:1234", config=2) # type: ignore - assert str(e.value) == "config must be an instance of Config, not int." - - -def test_config_shared_with_auth(): - config = Config(timeout=1) - auth = ConfidentialClientAuth(client_id="foo", client_secret="bar") - assert auth._hostname is None - assert auth._config is None - - with warnings.catch_warnings(record=True) as w: - ApiClient(auth=auth, hostname="localhost:1234", config=config) - assert len(w) == 0 - - assert auth._hostname == "localhost:1234" - assert auth._config == config - - -def test_auth_config_prioritized(): - auth_config = Config(timeout=1) - auth = ConfidentialClientAuth( - client_id="foo", client_secret="bar", hostname="localhost:9876", config=auth_config - ) - - with warnings.catch_warnings(record=True) as w: - ApiClient(auth=auth, hostname="localhost:1234", config=Config(timeout=2)) - # No warning because the hostnames are different - assert len(w) == 0 - - # Make sure the ApiClient hostname is prioritized - assert auth._hostname == "localhost:9876" - assert auth._config == auth_config - - -def test_duplicate_auth_config_warns(): - hostname = "localhost:1234" - config = Config(timeout=1) - auth = ConfidentialClientAuth( - client_id="foo", client_secret="bar", hostname=hostname, config=config - ) - - with warnings.catch_warnings(record=True) as w: - ApiClient(auth=auth, hostname=hostname, config=config) - # Two warnings because both the hostname and config are the same - assert len(w) == 2 - - # Make sure the ApiClient hostname is prioritized - assert auth._hostname == hostname - assert auth._config == config - - -def test_create_headers(): - client = create_client() - expected_headers = { - "Authorization": "Bearer bar", - "bool_header": "true", - "bytes_header": "bytes".encode("utf-8"), - "datetime_header": "2025-01-01T10:00:00+00:00", - "float_header": "123.123", - "int_header": "123", - "str_header": "string", - } - assert expected_headers == client._create_headers( - request_info=RequestInfo.with_defaults( - "GET", - "/files/{path}", - header_params={ - "bool_header": True, - "bytes_header": "bytes".encode("utf-8"), - "datetime_header": datetime(2025, 1, 1, 10, 0, 0, tzinfo=timezone.utc), - "float_header": 123.123, - "int_header": 123, - "str_header": "string", - "optional_header": None, - }, - ), - token=UserTokenAuth(token="bar").get_token(), - ) - - -def test_response_decode_bytes(): - response = ApiResponse( - RequestInfo.with_defaults("GET", "/foo/bar", response_type=bytes), - httpx.Response(200, content=b"foo"), - ) - - assert response.decode() == b"foo" - - -def test_response_decode_present_optional_bytes(): - response = ApiResponse( - RequestInfo.with_defaults("GET", "/foo/bar", response_type=Optional[bytes]), - httpx.Response(200, content=b"foo"), - ) - - assert response.decode() == b"foo" - - -def test_response_decode_empty_optional_bytes(): - response = ApiResponse( - RequestInfo.with_defaults("GET", "/foo/bar", response_type=Optional[bytes]), - httpx.Response(200, content=b""), - ) - - assert response.decode() is None - - -@pytest.mark.asyncio(scope="session") -async def test_async_headers(): - client = create_async_mock_client() - await client.call_api(RequestInfo.with_defaults("GET", "/foo", header_params={"Foo": "Bar"})) - assert_called_with(client, headers={"Authorization": "Bearer bar", "Foo": "Bar"}) - - -@pytest.mark.asyncio(scope="session") -async def test_async_timeout(): - client = create_async_mock_client(config=Config(timeout=60)) - await client.call_api(RequestInfo.with_defaults("GET", "/foo/bar", request_timeout=30)) - assert_called_with(client, timeout=30) - - -@pytest.mark.asyncio(scope="session") -async def test_async_path(): - client = create_async_mock_client() - await client.call_api(RequestInfo.with_defaults("GET", "/files")) - assert_called_with(client, url="/api/files") - - -@pytest.mark.asyncio(scope="session") -async def test_async_query_params(): - client = create_async_mock_client() - await client.call_api(RequestInfo.with_defaults("GET", "/foo", query_params={"foo": "bar"})) - assert_called_with(client, url="/api/foo", params=[("foo", "bar")]) - - -@pytest.mark.asyncio(scope="session") -async def test_async_default_raw_response_type(): - client = create_async_client() - request_info = RequestInfo.with_defaults( - "GET", "/foo/bar", response_mode="DECODED", response_type=FooBar - ) - - response = await client.call_api(request_info) - assert response == FooBar(foo="foo", bar=2) - - -@pytest.mark.asyncio(scope="session") -async def test_async_streaming_response_type(): - client = create_async_client() - request_info = RequestInfo.with_defaults("GET", "/foo/stream", response_mode="STREAMING") - - async with client.call_api(request_info) as response: - iterator = response.aiter_bytes() - assert await iterator.__anext__() == b"foo\n" - assert await iterator.__anext__() == b"bar\n" - assert await iterator.__anext__() == b"baz" - - -@pytest.mark.asyncio(scope="session") -async def test_async_raw_response_type(): - client = create_async_client() - request_info = RequestInfo.with_defaults("GET", "/foo/bar", response_mode="RAW") - - response = await client.call_api(request_info) - assert response.text == '{"foo":"foo","bar":2}' - assert response.json() == {"foo": "foo", "bar": 2} - - -async def collect_async_iterator(aiterator: AsyncIterator[Any]) -> List[Any]: - """Collects the items from an async iterator into a list.""" - result = [] - async for item in aiterator: - result.append(item) - return result - - -@pytest.mark.asyncio(scope="session") -async def test_async_iterator_response_type(): - client = create_async_client() - request_info = RequestInfo.with_defaults( - "GET", - "/foo/iterator", - response_mode="ITERATOR", - response_type=FooData, - ) - - response = client.call_api(request_info) - assert len(await response._page_iterator.get_data()) == 2 - assert len(await collect_async_iterator(response)) == 2 diff --git a/tests/test_body_serialization.py b/tests/test_body_serialization.py deleted file mode 100644 index 4eadcd7a3..000000000 --- a/tests/test_body_serialization.py +++ /dev/null @@ -1,513 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import json -from datetime import datetime -from datetime import timedelta -from datetime import timezone -from typing import Any -from typing import Dict -from typing import Generic -from typing import List -from typing import Literal -from typing import Optional -from typing import TypeVar -from typing import Union - -import httpx -import pydantic -import pytest -from typing_extensions import Annotated - -from foundry_sdk._core.api_client import BaseApiClient - - -# Test models for serialization -class SimpleModel(pydantic.BaseModel): - name: str - count: int - - -class ComplexModel(pydantic.BaseModel): - id: str - date: datetime - nested: SimpleModel - tags: List[str] = [] - optional_field: Optional[int] = None - - -class ModelWithArray(pydantic.BaseModel): - id: str - items: List[SimpleModel] - - -class ModelWithOptionalArray(pydantic.BaseModel): - id: str - items: Optional[List[SimpleModel]] = None - - -class ModelWithNestedArrays(pydantic.BaseModel): - id: str - matrix: List[List[SimpleModel]] - - -# Create a test client for serialization tests -class TestApiClient(BaseApiClient): - """A minimal implementation for testing the serialization logic""" - - def __init__(self): - pass # Skip the standard initialization - - -# Helper function to serialize and then deserialize back to verify correctness -def serialize_and_deserialize(client: TestApiClient, data: Any) -> Any: - """ - Serialize data using the client's _serialize method and then deserialize it back to a generic Python object (e.g., dict or list). - Note: This does NOT reconstruct the original input type if it was a custom class. - """ - serialized = client._serialize(data) - # If None is returned, it means the data was None - if serialized is None: - return None - # Decode the bytes and parse as JSON - return json.loads(serialized.decode("utf-8")) - - -# ----- Basic Serialization Tests ----- - - -def test_serialize_none(): - """Test serializing None value.""" - client = TestApiClient() - result = client._serialize(None) - assert result is None - - -def test_serialize_bytes(): - """Test that bytes are passed through as-is.""" - client = TestApiClient() - raw_bytes = b"raw byte content" - result = client._serialize(raw_bytes) - assert result is raw_bytes # Should return the same bytes object - - -def test_serialize_primitive_types(): - """Test serializing primitive JSON types.""" - client = TestApiClient() - - # String - assert json.loads((client._serialize("test string") or b"").decode()) == "test string" - - # Number - assert json.loads((client._serialize(42) or b"").decode()) == 42 - assert json.loads((client._serialize(3.14) or b"").decode()) == 3.14 - - # Boolean - assert json.loads((client._serialize(True) or b"").decode()) == True - assert json.loads((client._serialize(False) or b"").decode()) == False - - # Array of primitives - assert json.loads((client._serialize([1, 2, 3]) or b"").decode()) == [1, 2, 3] - - # Object of primitives - assert json.loads((client._serialize({"key": "value"}) or b"").decode()) == {"key": "value"} - - -# ----- Pydantic BaseModel Serialization Tests ----- - - -def test_serialize_simple_model(): - """Test serializing a single simple Pydantic model.""" - client = TestApiClient() - model = SimpleModel(name="test", count=42) - - result = serialize_and_deserialize(client, model) - assert result == {"name": "test", "count": 42} - - -def test_serialize_complex_model(): - """Test serializing a complex Pydantic model with nested objects.""" - client = TestApiClient() - - now = datetime(2023, 1, 1, 12, 0, 0, tzinfo=timezone.utc) - model = ComplexModel( - id="test-id", date=now, nested=SimpleModel(name="nested", count=10), tags=["tag1", "tag2"] - ) - - result = serialize_and_deserialize(client, model) - assert result == { - "id": "test-id", - "date": "2023-01-01T12:00:00+00:00", - "nested": {"name": "nested", "count": 10}, - "tags": ["tag1", "tag2"], - } - - # Optional fields that are None should be excluded - assert "optional_field" not in result - - -def test_serialize_model_with_none_fields(): - """Test that None fields are properly excluded from serialization.""" - client = TestApiClient() - - model = ComplexModel( - id="test-id", - date=datetime(2023, 1, 1, tzinfo=timezone.utc), - nested=SimpleModel(name="nested", count=10), - optional_field=None, - ) - - result = serialize_and_deserialize(client, model) - assert "optional_field" not in result - - -# ----- Array Serialization Tests ----- - - -def test_serialize_array_of_models(): - """Test serializing an array of Pydantic models.""" - client = TestApiClient() - - models = [ - SimpleModel(name="item1", count=1), - SimpleModel(name="item2", count=2), - SimpleModel(name="item3", count=3), - ] - - result = serialize_and_deserialize(client, models) - assert result == [ - {"name": "item1", "count": 1}, - {"name": "item2", "count": 2}, - {"name": "item3", "count": 3}, - ] - - -def test_serialize_empty_array(): - """Test serializing an empty array.""" - client = TestApiClient() - result = serialize_and_deserialize(client, []) - assert result == [] - - -def test_serialize_array_with_none(): - """Test serializing an array containing None values.""" - client = TestApiClient() - - # Array with None values - data = [SimpleModel(name="item1", count=1), None, SimpleModel(name="item3", count=3)] - - result = serialize_and_deserialize(client, data) - assert result == [{"name": "item1", "count": 1}, None, {"name": "item3", "count": 3}] - - -def test_serialize_mixed_array(): - """Test serializing a mixed array with different types including models.""" - client = TestApiClient() - - data = ["string", 42, {"key": "value"}, SimpleModel(name="model", count=1), [1, 2, 3]] - - result = serialize_and_deserialize(client, data) - assert result == ["string", 42, {"key": "value"}, {"name": "model", "count": 1}, [1, 2, 3]] - - -# ----- Nested Structure Serialization Tests ----- - - -def test_serialize_model_with_array(): - """Test serializing a model that contains an array of models.""" - client = TestApiClient() - - model = ModelWithArray( - id="test-id", items=[SimpleModel(name="item1", count=1), SimpleModel(name="item2", count=2)] - ) - - result = serialize_and_deserialize(client, model) - assert result == { - "id": "test-id", - "items": [{"name": "item1", "count": 1}, {"name": "item2", "count": 2}], - } - - -def test_serialize_model_with_optional_array_present(): - """Test serializing a model with an optional array that is present.""" - client = TestApiClient() - - model = ModelWithOptionalArray(id="test-id", items=[SimpleModel(name="item", count=1)]) - - result = serialize_and_deserialize(client, model) - assert result == {"id": "test-id", "items": [{"name": "item", "count": 1}]} - - -def test_serialize_model_with_optional_array_none(): - """Test serializing a model with an optional array that is None.""" - client = TestApiClient() - - model = ModelWithOptionalArray(id="test-id") # items defaults to None - - result = serialize_and_deserialize(client, model) - assert result == {"id": "test-id"} - assert "items" not in result - - -def test_serialize_model_with_nested_arrays(): - """Test serializing a model with nested arrays of models.""" - client = TestApiClient() - - model = ModelWithNestedArrays( - id="test-id", - matrix=[ - [SimpleModel(name="1,1", count=11), SimpleModel(name="1,2", count=12)], - [SimpleModel(name="2,1", count=21), SimpleModel(name="2,2", count=22)], - ], - ) - - result = serialize_and_deserialize(client, model) - assert result == { - "id": "test-id", - "matrix": [ - [{"name": "1,1", "count": 11}, {"name": "1,2", "count": 12}], - [{"name": "2,1", "count": 21}, {"name": "2,2", "count": 22}], - ], - } - - -def test_serialize_deeply_nested_structure(): - """Test serializing a deeply nested structure with models at various levels.""" - client = TestApiClient() - - data = { - "top_level": SimpleModel(name="top", count=1), - "nested": { - "model": SimpleModel(name="nested", count=2), - "list": [SimpleModel(name="list1", count=3), SimpleModel(name="list2", count=4)], - }, - "matrix": [ - [SimpleModel(name="m11", count=11), SimpleModel(name="m12", count=12)], - [SimpleModel(name="m21", count=21), SimpleModel(name="m22", count=22)], - ], - "mixed": [ - {"model": SimpleModel(name="mixed", count=5)}, - [SimpleModel(name="array", count=6)], - ], - } - - result = serialize_and_deserialize(client, data) - assert result == { - "top_level": {"name": "top", "count": 1}, - "nested": { - "model": {"name": "nested", "count": 2}, - "list": [{"name": "list1", "count": 3}, {"name": "list2", "count": 4}], - }, - "matrix": [ - [{"name": "m11", "count": 11}, {"name": "m12", "count": 12}], - [{"name": "m21", "count": 21}, {"name": "m22", "count": 22}], - ], - "mixed": [{"model": {"name": "mixed", "count": 5}}, [{"name": "array", "count": 6}]], - } - - -# ----- Dictionary Serialization Tests ----- - - -def test_serialize_dict_with_model_values(): - """Test serializing a dictionary with model values.""" - client = TestApiClient() - - data = { - "model1": SimpleModel(name="first", count=1), - "model2": SimpleModel(name="second", count=2), - } - - result = serialize_and_deserialize(client, data) - assert result == { - "model1": {"name": "first", "count": 1}, - "model2": {"name": "second", "count": 2}, - } - - -def test_serialize_dict_with_mixed_values(): - """Test serializing a dictionary with a mix of model and non-model values.""" - client = TestApiClient() - - data = { - "model": SimpleModel(name="model", count=1), - "string": "text value", - "number": 42, - "boolean": True, - "array": [1, 2, 3], - "nested_array": [SimpleModel(name="nested", count=2)], - } - - result = serialize_and_deserialize(client, data) - assert result == { - "model": {"name": "model", "count": 1}, - "string": "text value", - "number": 42, - "boolean": True, - "array": [1, 2, 3], - "nested_array": [{"name": "nested", "count": 2}], - } - - -def test_serialize_dict_with_nested_dicts(): - """Test serializing a dictionary with nested dictionaries containing models.""" - client = TestApiClient() - - data = {"level1": {"level2": {"model": SimpleModel(name="deeply_nested", count=42)}}} - - result = serialize_and_deserialize(client, data) - assert result == {"level1": {"level2": {"model": {"name": "deeply_nested", "count": 42}}}} - - -# ----- Special Cases and Edge Cases ----- - - -def test_serialize_model_with_alias(): - """Test serializing a model with field aliases.""" - client = TestApiClient() - - class ModelWithAlias(pydantic.BaseModel): - user_id: str = pydantic.Field(alias="userId") - created_at: datetime = pydantic.Field(alias="createdAt") - - model = ModelWithAlias(userId="test-user", createdAt=datetime(2023, 1, 1, tzinfo=timezone.utc)) - - result = serialize_and_deserialize(client, model) - # Should use the aliases in the output JSON - assert "userId" in result - assert "createdAt" in result - assert "user_id" not in result - assert "created_at" not in result - - -def test_serialize_cyclic_references(): - """Test that serializing cyclic references raises an exception.""" - client = TestApiClient() - - # Create a cyclic reference - a = {} - b = {"a": a} - a["b"] = b - - with pytest.raises((TypeError, ValueError)): - client._serialize(a) - - -def test_serialize_datetime_values(): - """Test serializing datetime values in models.""" - client = TestApiClient() - - # UTC datetime - utc_dt = datetime(2023, 1, 1, 12, 0, 0, tzinfo=timezone.utc) - model = ComplexModel(id="test", date=utc_dt, nested=SimpleModel(name="test", count=1)) - - result = serialize_and_deserialize(client, model) - assert result["date"] == "2023-01-01T12:00:00+00:00" - - # Non-UTC datetime - est_tz = timezone(timedelta(hours=-5)) - est_dt = datetime(2023, 1, 1, 7, 0, 0, tzinfo=est_tz) - model = ComplexModel(id="test", date=est_dt, nested=SimpleModel(name="test", count=1)) - - result = serialize_and_deserialize(client, model) - # Should be normalized to UTC in ISO format - assert result["date"] == "2023-01-01T12:00:00+00:00" - - -def test_serialize_real_world_complex_payload(): - """Test serializing a complex real-world-like request payload.""" - client = TestApiClient() - - # Create a complex nested payload similar to what might be used in a real API - class Address(pydantic.BaseModel): - street: str - city: str - postal_code: str - country: str - - class Contact(pydantic.BaseModel): - email: str - phone: Optional[str] = None - - class User(pydantic.BaseModel): - id: str - name: str - address: Address - contacts: List[Contact] - is_active: bool = True - created_at: datetime - last_login: Optional[datetime] = None - preferences: Dict[str, Any] = {} - - class OrderItem(pydantic.BaseModel): - product_id: str = pydantic.Field(alias="productId") - quantity: int - unit_price: float = pydantic.Field(alias="unitPrice") - - class Order(pydantic.BaseModel): - id: str - user: User - items: List[OrderItem] - total_amount: float = pydantic.Field(alias="totalAmount") - status: Literal["pending", "processing", "shipped", "delivered"] - shipping_address: Optional[Address] = pydantic.Field(alias="shippingAddress", default=None) - - # Create an instance with deeply nested structure - order = Order( - id="order-123", - user=User( - id="user-456", - name="John Doe", - address=Address( - street="123 Main St", city="Anytown", postal_code="12345", country="USA" - ), - contacts=[ - Contact(email="john@example.com", phone="+1234567890"), - Contact(email="johndoe@work.com"), - ], - created_at=datetime(2022, 1, 1, tzinfo=timezone.utc), - preferences={"theme": "dark", "notifications": True}, - ), - items=[ - OrderItem(productId="prod-1", quantity=2, unitPrice=29.99), - OrderItem(productId="prod-2", quantity=1, unitPrice=49.99), - ], - totalAmount=109.97, - status="processing", - shippingAddress=Address( - street="456 Shipping Ave", city="Shipville", postal_code="54321", country="USA" - ), - ) - - result = serialize_and_deserialize(client, order) - - # Validate the structure and content of the serialized data - assert result["id"] == "order-123" - assert result["user"]["name"] == "John Doe" - assert result["user"]["address"]["city"] == "Anytown" - assert result["user"]["contacts"][0]["email"] == "john@example.com" - assert result["user"]["contacts"][1].get("phone") is None - assert result["items"][0]["productId"] == "prod-1" - assert result["totalAmount"] == 109.97 - assert result["status"] == "processing" - assert result["shippingAddress"]["street"] == "456 Shipping Ave" - - # Check that aliases are properly used - assert "productId" in result["items"][0] - assert "product_id" not in result["items"][0] - assert "totalAmount" in result - assert "total_amount" not in result - assert "shippingAddress" in result - assert "shipping_address" not in result diff --git a/tests/test_client_init_helpers.py b/tests/test_client_init_helpers.py deleted file mode 100644 index 57c472736..000000000 --- a/tests/test_client_init_helpers.py +++ /dev/null @@ -1,154 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import os -from contextvars import ContextVar -from typing import Optional -from unittest.mock import patch - -from expects import equal -from expects import expect -from expects import raise_error - -from foundry_sdk._core.client_init_helpers import ( - get_hostname_from_context_or_environment_vars, -) # NOQA -from foundry_sdk._core.client_init_helpers import ( - get_user_token_auth_from_context_or_environment_vars, -) # NOQA -from foundry_sdk._core.context_and_environment_vars import HOSTNAME_ENV_VAR -from foundry_sdk._core.context_and_environment_vars import HOSTNAME_VAR -from foundry_sdk._core.context_and_environment_vars import TOKEN_ENV_VAR -from foundry_sdk._core.context_and_environment_vars import TOKEN_VAR -from foundry_sdk._core.context_and_environment_vars import _maybe_get_environment_var -from foundry_sdk._core.context_and_environment_vars import maybe_get_context_var -from foundry_sdk._core.context_and_environment_vars import ( - maybe_get_value_from_context_or_environment_vars, -) # NOQA -from foundry_sdk._errors.environment_not_configured import EnvironmentNotConfigured - -CONTEXT_VAR1: ContextVar[Optional[str]] = ContextVar("CONTEXT VAR1", default=None) -CONTEXT_VAR2: ContextVar[Optional[str]] = ContextVar("CONTEXT VAR2", default=None) - - -def test_maybe_get_context_var(): - example_context_vars = [CONTEXT_VAR1, CONTEXT_VAR2] - - CONTEXT_VAR2.set("context_var 2") - expect(maybe_get_context_var(context_vars=example_context_vars)).to(equal("context_var 2")) - CONTEXT_VAR2.set(None) - - CONTEXT_VAR1.set("context_var 1") - CONTEXT_VAR2.set("context_var 2") - expect(maybe_get_context_var(context_vars=example_context_vars)).to(equal("context_var 1")) - CONTEXT_VAR1.set(None) - CONTEXT_VAR2.set(None) - - -def test_maybe_get_environment_var(): - example_env_vars = ["ENV VAR1", "ENV VAR2", "ENV VAR3"] - - with patch.dict(os.environ, {"ENV VAR3": "environment_var 3"}): - expect(_maybe_get_environment_var(env_vars=example_env_vars)).to(equal("environment_var 3")) - with patch.dict(os.environ, {"ENV VAR1": "environment_var 1", "ENV VAR3": "environment_var 3"}): - expect(_maybe_get_environment_var(env_vars=example_env_vars)).to(equal("environment_var 1")) - - -def test_get_value_from_context_or_env(): - # Test case 1: Context variable is set - CONTEXT_VAR1.set("context_var") - expect( - maybe_get_value_from_context_or_environment_vars( - context_vars=[CONTEXT_VAR1], env_vars=["ENV_VAR_NAME"] - ) - ).to(equal("context_var")) - CONTEXT_VAR1.set(None) - - # Test case 2: Context variable is not set and FOUNDRY_HOSTNAME environment variable is set - with patch.dict(os.environ, {"ENV_VAR_NAME": "environment_var"}): - expect( - maybe_get_value_from_context_or_environment_vars( - context_vars=[CONTEXT_VAR1], env_vars=["ENV_VAR_NAME"] - ) - ).to(equal("environment_var")) - - # Test case 3: Both Context variable and environment variable are not set - expect( - maybe_get_value_from_context_or_environment_vars( - context_vars=[CONTEXT_VAR1], env_vars=["ENV_VAR_NAME"] - ) - ).to(equal(None)) - - # Test case 4: Test context vars are used before env vars - CONTEXT_VAR1.set("context_var") - with patch.dict(os.environ, {"ENV_VAR_NAME": "environment_var"}): - expect( - maybe_get_value_from_context_or_environment_vars( - context_vars=[CONTEXT_VAR1], env_vars=["ENV_VAR_NAME"] - ) - ).to(equal("context_var")) - CONTEXT_VAR1.set(None) - - -def test_get_hostname_from_context_or_environment_vars(): - # Test case 1: Context variable is set - HOSTNAME_VAR.set("hostname_context_var") - expect(get_hostname_from_context_or_environment_vars()).to(equal("hostname_context_var")) - HOSTNAME_VAR.set(None) - - # Test case 2: Context variable is not set and environment variable is set - with patch.dict(os.environ, {HOSTNAME_ENV_VAR: "hostname_environment_var"}): - expect(get_hostname_from_context_or_environment_vars()).to( - equal("hostname_environment_var") - ) - - # Test case 3: Both Context variable and environment variable are not set - expect(lambda: get_hostname_from_context_or_environment_vars()).to( - raise_error(EnvironmentNotConfigured) - ) - - # Test case 4: Test Context variables are used before environment variables - HOSTNAME_VAR.set("hostname_context_var") - with patch.dict(os.environ, {HOSTNAME_ENV_VAR: "hostname_environment_var"}): - expect(get_hostname_from_context_or_environment_vars()).to(equal("hostname_context_var")) - HOSTNAME_VAR.set(None) - - -def test_get_user_token_auth_from_context_or_environment_vars(): - # Test case 1: Context variable is set - TOKEN_VAR.set("user_token_context_var") - expect(get_user_token_auth_from_context_or_environment_vars().get_token().access_token).to( - equal("user_token_context_var") - ) - TOKEN_VAR.set(None) - - # Test case 2: Context variable is not set and environment variable is set - with patch.dict(os.environ, {TOKEN_ENV_VAR: "user_token_environment_var"}): - expect(get_user_token_auth_from_context_or_environment_vars().get_token().access_token).to( - equal("user_token_environment_var") - ) - - # Test case 3: Both Context variable and environment variable are not set - expect(lambda: get_user_token_auth_from_context_or_environment_vars()).to( - raise_error(EnvironmentNotConfigured) - ) - - # Test case 4: Test Context variables are used before environment variables - TOKEN_VAR.set("user_token_context_var") - with patch.dict(os.environ, {TOKEN_ENV_VAR: "user_token_environment_var"}): - expect(get_user_token_auth_from_context_or_environment_vars().get_token().access_token).to( - equal("user_token_context_var") - ) - TOKEN_VAR.set(None) diff --git a/tests/test_datetime.py b/tests/test_datetime.py deleted file mode 100644 index 02c94e5b4..000000000 --- a/tests/test_datetime.py +++ /dev/null @@ -1,27 +0,0 @@ -from datetime import datetime -from datetime import timezone - -import pydantic -import pytest - - -class Model(pydantic.BaseModel): - datetype: pydantic.AwareDatetime - - -def test_init_fails_without_timezone(): - with pytest.raises(pydantic.ValidationError): - Model(datetype=datetime.now()) - - -def test_validate_python_fails_without_timezone(): - with pytest.raises(pydantic.ValidationError): - Model.model_validate({"datetype": "2022-01-01T00:00:00"}) - - -def test_init_passes_with_timezone(): - Model(datetype=datetime.now(tz=timezone.utc)) - - -def test_validate_python_passes_with_timezone(): - Model.model_validate({"datetype": "2022-01-01T00:00:00Z"}) diff --git a/tests/test_discriminators.py b/tests/test_discriminators.py deleted file mode 100644 index 42e712895..000000000 --- a/tests/test_discriminators.py +++ /dev/null @@ -1,102 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import pydantic -import pytest - -from foundry_sdk.v1.core import models as models_core_v1 -from foundry_sdk.v1.datasets import models as models_datasets_v1 -from foundry_sdk.v1.geo import models as models_geo_v1 -from foundry_sdk.v1.ontologies import models as models_ontologies_v1 -from foundry_sdk.v2.admin import models as models_admin_v2 -from foundry_sdk.v2.aip_agents import models as models_aip_agents_v2 -from foundry_sdk.v2.audit import models as models_audit_v2 -from foundry_sdk.v2.connectivity import models as models_connectivity_v2 -from foundry_sdk.v2.core import models as models_core_v2 -from foundry_sdk.v2.data_health import models as models_data_health_v2 -from foundry_sdk.v2.datasets import models as models_datasets_v2 -from foundry_sdk.v2.filesystem import models as models_filesystem_v2 -from foundry_sdk.v2.functions import models as models_functions_v2 -from foundry_sdk.v2.geo import models as models_geo_v2 -from foundry_sdk.v2.language_models import models as models_language_models_v2 -from foundry_sdk.v2.media_sets import models as models_media_sets_v2 -from foundry_sdk.v2.models import models as models_models_v2 -from foundry_sdk.v2.ontologies import models as models_ontologies_v2 -from foundry_sdk.v2.orchestration import models as models_orchestration_v2 -from foundry_sdk.v2.sql_queries import models as models_sql_queries_v2 -from foundry_sdk.v2.streams import models as models_streams_v2 -from foundry_sdk.v2.third_party_applications import ( - models as models_third_party_applications_v2, -) # NOQA -from foundry_sdk.v2.widgets import models as models_widgets_v2 - - -def test_can_validate_types(): - """ - The discriminators types are difficult to construct. This test ensures - that all discriminators are importable without raising any issues. - """ - - for models, model_name in [ - *[(models_core_v1, model_name) for model_name in dir(models_core_v1)], - *[(models_datasets_v1, model_name) for model_name in dir(models_datasets_v1)], - *[(models_geo_v1, model_name) for model_name in dir(models_geo_v1)], - *[(models_ontologies_v1, model_name) for model_name in dir(models_ontologies_v1)], - *[(models_admin_v2, model_name) for model_name in dir(models_admin_v2)], - *[(models_aip_agents_v2, model_name) for model_name in dir(models_aip_agents_v2)], - *[(models_audit_v2, model_name) for model_name in dir(models_audit_v2)], - *[(models_connectivity_v2, model_name) for model_name in dir(models_connectivity_v2)], - *[(models_core_v2, model_name) for model_name in dir(models_core_v2)], - *[(models_data_health_v2, model_name) for model_name in dir(models_data_health_v2)], - *[(models_datasets_v2, model_name) for model_name in dir(models_datasets_v2)], - *[(models_filesystem_v2, model_name) for model_name in dir(models_filesystem_v2)], - *[(models_functions_v2, model_name) for model_name in dir(models_functions_v2)], - *[(models_geo_v2, model_name) for model_name in dir(models_geo_v2)], - *[(models_language_models_v2, model_name) for model_name in dir(models_language_models_v2)], - *[(models_media_sets_v2, model_name) for model_name in dir(models_media_sets_v2)], - *[(models_models_v2, model_name) for model_name in dir(models_models_v2)], - *[(models_ontologies_v2, model_name) for model_name in dir(models_ontologies_v2)], - *[(models_orchestration_v2, model_name) for model_name in dir(models_orchestration_v2)], - *[(models_sql_queries_v2, model_name) for model_name in dir(models_sql_queries_v2)], - *[(models_streams_v2, model_name) for model_name in dir(models_streams_v2)], - *[ - (models_third_party_applications_v2, model_name) - for model_name in dir(models_third_party_applications_v2) - ], - *[(models_widgets_v2, model_name) for model_name in dir(models_widgets_v2)], - ]: - klass = getattr(models, model_name) - - if "Annotated[Union[" not in str(klass): - continue - - try: - ta = pydantic.TypeAdapter(klass) - except pydantic.PydanticUndefinedAnnotation as e: - print(model_name, str(klass)) - raise e - - with pytest.raises(pydantic.ValidationError) as error: - ta.validate_python({}) - - assert error.value.errors(include_url=False) == [ - { - "type": "union_tag_not_found", - "loc": (), - "msg": "Unable to extract tag using discriminator 'type'", - "input": {}, - "ctx": {"discriminator": "'type'"}, - } - ] diff --git a/tests/test_errors.py b/tests/test_errors.py deleted file mode 100644 index 8862c5152..000000000 --- a/tests/test_errors.py +++ /dev/null @@ -1,50 +0,0 @@ -import warnings - -import pytest - -from foundry_sdk import PalantirRPCException -from foundry_sdk._errors.utils import deserialize_error -from foundry_sdk.v1.datasets.errors import BranchNotFound - - -class MockError(PalantirRPCException): - def __init__(self, name): - super().__init__(name) - - -ERRORS_MAP = { - "MockError": MockError, - "BranchNotFound": BranchNotFound, -} - - -def test_correctly_deserializes_error(): - error = deserialize_error( - { - "errorName": "BranchNotFound", - "errorInstanceId": "123", - "parameters": {"datasetRid": "ri.a.b.c.d", "branchId": "main"}, - }, - ERRORS_MAP, - ) - - assert isinstance(error, PalantirRPCException) - assert isinstance(error, BranchNotFound) - assert error.name == "BranchNotFound" - assert error.error_instance_id == "123" - assert error.parameters == {"datasetRid": "ri.a.b.c.d", "branchId": "main"} - - -def test_falls_back_to_standard_if_parsing_fails(): - with warnings.catch_warnings(record=True) as w: - error = deserialize_error( - { - "errorName": "BranchNotFound", - "errorInstanceId": "123", - "parameters": {"datasetRid": "ri.a.b.c.d", "branchId": 123}, - }, - ERRORS_MAP, - ) - - assert len(w) == 1 - assert error is None diff --git a/tests/test_exception.py b/tests/test_exception.py deleted file mode 100644 index 41065a3ec..000000000 --- a/tests/test_exception.py +++ /dev/null @@ -1,108 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import inspect -import json -import re -import sys -from types import ModuleType -from typing import List -from typing import Type - -import pydantic -import pytest - -from foundry_sdk import _errors -from foundry_sdk._errors.palantir_rpc_exception import PalantirRPCException -from foundry_sdk._errors.sdk_internal_error import PalantirException -from foundry_sdk._errors.sdk_internal_error import SDKInternalError -from foundry_sdk._errors.sdk_internal_error import handle_unexpected - - -def find_exception_subclasses(module: ModuleType) -> List[Type[Exception]]: - exception_subclasses = [] - - # Get all members of the module - members = inspect.getmembers(module) - - for name, obj in members: - # Check if the member is a class - if inspect.isclass(obj): - # Check if the class is a subclass of Exception - if issubclass(obj, Exception): - exception_subclasses.append(obj) - - return exception_subclasses - - -def test_sdk_internal_error(): - with pytest.raises(SDKInternalError) as error: - raise SDKInternalError("test") - - assert ( - re.match( - r"""^test\n -This is an unexpected issue and should be reported. When filing an issue, make sure to copy the package information listed below.\n -OS: \w+ -Python Version: \d+\.\d+\.\d+[^\n]+ -SDK Version: \d+\.\d+\.\d+ -OpenAPI Document Version: \d+\.\d+\.\d+ -Pydantic Version: \d+\.\d+\.\d+ -Pydantic Core Version: \d+\.\d+\.\d+ -Httpx Version: \d+\.\d+\.\d+ -$""", - str(error.value), - ) - is not None - ), "Mismatch with text: " + str(error.value) - - -def test_handle_unexpected_fails_for_unkonwn_exception(): - @handle_unexpected - def raises_unknown_exception(): - raise ValueError("test") - - with pytest.raises(SDKInternalError) as error: - raises_unknown_exception() - - assert error.value.msg == "test" - - -def test_all_errors_subclass_palantir_exception(): - classes = find_exception_subclasses(_errors) - assert len(classes) >= 5 # sanity check we are finding the classes - for klass in find_exception_subclasses(_errors): - assert issubclass(klass, PalantirException) - - -def test_handle_unexpected_ignores_palantir_exception(): - @handle_unexpected - def raises_known_exception(): - raise PalantirException("Foo") - - with pytest.raises(PalantirException): - raises_known_exception() - - -def test_handle_unexpected_ignores_validation_error(): - class Model(pydantic.BaseModel): - foo: str - - @handle_unexpected - def raises_known_exception(): - Model.model_validate({"foo": 123}) - - with pytest.raises(pydantic.ValidationError): - raises_known_exception() diff --git a/tests/test_http_client.py b/tests/test_http_client.py deleted file mode 100644 index 31397fcbc..000000000 --- a/tests/test_http_client.py +++ /dev/null @@ -1,333 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import os -import ssl -import sys -from typing import Any -from typing import Optional -from typing import Type -from typing import TypeVar -from unittest.mock import patch - -import httpcore -import httpx -import pytest -from httpx._utils import URLPattern - -from foundry_sdk._core.config import Config -from foundry_sdk._core.http_client import AsyncHttpClient -from foundry_sdk._core.http_client import HttpClient -from foundry_sdk._versions import __version__ - - -def assert_http_transport(transport: Optional[httpx.BaseTransport]) -> httpx.HTTPTransport: - return assert_isinstance(transport, httpx.HTTPTransport) - - -def assert_async_http_transport( - transport: Optional[httpx.AsyncBaseTransport], -) -> httpx.AsyncHTTPTransport: - return assert_isinstance(transport, httpx.AsyncHTTPTransport) - - -def assert_http_proxy(pool: Optional[httpcore.ConnectionPool]) -> httpcore.HTTPProxy: - return assert_isinstance(pool, httpcore.HTTPProxy) - - -def assert_async_http_proxy( - pool: Optional[httpcore.AsyncConnectionPool], -) -> httpcore.AsyncHTTPProxy: - return assert_isinstance(pool, httpcore.AsyncHTTPProxy) - - -T = TypeVar("T") - - -def assert_isinstance(instance: Any, type: Type[T]) -> T: - if not isinstance(instance, type): - raise Exception(f"Not an instance of {type}", instance) - - return instance - - -def create_client(config: Optional[Config] = None): - config = config or Config() - return HttpClient("localhost:8123", config=config) - - -def create_async_client(config: Optional[Config] = None): - config = config or Config() - return AsyncHttpClient("localhost:8123", config=config) - - -def test_clean_hostname(): - assert HttpClient("http://example.com").base_url.host == "example.com" - assert HttpClient("https://example.com").base_url.host == "example.com" - assert HttpClient("example.com/").base_url.host == "example.com" - assert HttpClient("example.com").base_url.host == "example.com" - - -@pytest.fixture -def tmp_cert(tmp_path): - cert_file = tmp_path / "cert.pem" - cert_file.write_text("cert") - yield cert_file.as_posix() - - -@pytest.fixture -def tmp_cert_dupe(tmp_path): - cert_file = tmp_path / "cert.pem" - cert_file.write_text("cert") - yield cert_file.as_posix() - - -@pytest.fixture -def patch_ssl_verify(): - with patch.object(ssl.SSLContext, "load_verify_locations") as mock_method: - # You can specify a return value or a side effect if needed - mock_method.return_value = None # Example: make it do nothing - yield mock_method - - -@pytest.fixture -def temp_os_env(): - old_environ = os.environ.copy() - - # Make sure to start with a clean slate - for key in ["REQUESTS_CA_BUNDLE", "SSL_CERT_FILE"]: - if key in os.environ: - os.environ.pop(key) - - yield os.environ - os.environ = old_environ - - -def test_requests_env_var(temp_os_env, patch_ssl_verify, tmp_cert: str): - temp_os_env["REQUESTS_CA_BUNDLE"] = tmp_cert - assert create_client(Config(verify=True))._verify == tmp_cert - - -def test_ssl_cert_file_env_var(temp_os_env, patch_ssl_verify, tmp_cert: str): - temp_os_env["SSL_CERT_FILE"] = tmp_cert - assert create_client(Config(verify=True))._verify == tmp_cert - - -def test_verify_false_env_var(temp_os_env, patch_ssl_verify, tmp_cert: str): - temp_os_env["REQUESTS_CA_BUNDLE"] = tmp_cert - assert create_client(Config(verify=False))._verify == False - - -def test_cert_path_takes_precedence(temp_os_env, patch_ssl_verify, tmp_cert: str, tmp_cert_dupe): - temp_os_env["REQUESTS_CA_BUNDLE"] = tmp_cert - assert create_client(Config(verify=tmp_cert_dupe))._verify == tmp_cert_dupe - - -def test_default_headers(): - """Test that the user agent is set correctly.""" - client = create_client() - assert client.headers == { - "Accept-Encoding": "gzip, deflate", - "Accept": "*/*", - "Connection": "keep-alive", - "User-Agent": f"python-foundry-platform-sdk/{__version__} python/3.{sys.version_info.minor}", - } - - """Test that additional headers can be added.""" - client = create_client(Config(default_headers={"Foo": "Bar"})) - assert client.headers == { - "Accept-Encoding": "gzip, deflate", - "Accept": "*/*", - "Connection": "keep-alive", - "Foo": "Bar", - "User-Agent": f"python-foundry-platform-sdk/{__version__} python/3.{sys.version_info.minor}", - } - - -def test_proxies(): - client = create_client(Config(proxies={"https": "https://foo.bar", "http": "http://foo.bar"})) - - transport = assert_http_transport(client._mounts[URLPattern("https://")]) - proxy = assert_http_proxy(transport._pool) - assert proxy._ssl_context is not None - assert proxy._ssl_context.verify_mode == ssl.VerifyMode.CERT_REQUIRED - assert proxy._proxy_ssl_context is not None - assert proxy._proxy_ssl_context.verify_mode == ssl.VerifyMode.CERT_REQUIRED - assert proxy._proxy_url.scheme == b"https" - assert proxy._proxy_url.host == b"foo.bar" - - transport = assert_http_transport(client._mounts[URLPattern("http://")]) - proxy = assert_http_proxy(transport._pool) - assert proxy._ssl_context is not None - assert proxy._ssl_context.verify_mode == ssl.VerifyMode.CERT_REQUIRED - assert proxy._proxy_ssl_context is None - assert proxy._proxy_url.scheme == b"http" - assert proxy._proxy_url.host == b"foo.bar" - - -def test_bad_proxy_url(): - with pytest.raises(ValueError): - create_client(Config(proxies={"https": "htts://foo.bar"})) - - -def test_timeout(): - client = create_client(config=Config(timeout=60)) - assert client.timeout == httpx.Timeout(60) - - -def test_verify_configures_transport(): - client = create_client() - transport = assert_http_transport(client._transport) - pool = assert_isinstance(transport._pool, httpcore.ConnectionPool) - - assert pool._ssl_context is not None - assert pool._ssl_context.verify_mode == ssl.VerifyMode.CERT_REQUIRED - - client = create_client(Config(verify=False)) - transport = assert_http_transport(client._transport) - pool = assert_isinstance(transport._pool, httpcore.ConnectionPool) - - assert pool._ssl_context is not None - assert pool._ssl_context.verify_mode == ssl.VerifyMode.CERT_NONE - - -def test_default_params(): - client = create_client(Config(default_params={"foo": "bar"})) - assert client.params._dict == {"foo": ["bar"]} - - -def test_scheme(): - client = create_client() - assert str(client.base_url) == "https://localhost:8123" - - client = create_client(Config(scheme="http")) - assert str(client.base_url) == "http://localhost:8123" - - -def test_async_headers(): - client = create_async_client(Config(default_headers={"Foo": "Bar", "User-Agent": "Baz"})) - assert client.headers == { - "Accept-Encoding": "gzip, deflate", - "Accept": "*/*", - "Connection": "keep-alive", - "Foo": "Bar", - "User-Agent": "Baz", - } - - -def test_async_bad_proxy_url(): - with pytest.raises(ValueError): - create_async_client(Config(proxies={"https": "htts://foo.bar"})) - - -def test_async_timeout(): - client = create_async_client(config=Config(timeout=60)) - assert client.timeout == httpx.Timeout(60) - - -def test_async_verify_configures_transport(): - client = create_async_client() - transport = assert_async_http_transport(client._transport) - pool = assert_isinstance(transport._pool, httpcore.AsyncConnectionPool) - - assert pool._ssl_context is not None - assert pool._ssl_context.verify_mode == ssl.VerifyMode.CERT_REQUIRED - - client = create_async_client(Config(verify=False)) - transport = assert_async_http_transport(client._transport) - pool = assert_isinstance(transport._pool, httpcore.AsyncConnectionPool) - - assert pool._ssl_context is not None - assert pool._ssl_context.verify_mode == ssl.VerifyMode.CERT_NONE - - -def test_async_default_params(): - client = create_async_client(Config(default_params={"foo": "bar"})) - assert client.params._dict == {"foo": ["bar"]} - - -def test_async_scheme(): - client = create_async_client() - assert str(client.base_url) == "https://localhost:8123" - - client = create_client(Config(scheme="http")) - assert str(client.base_url) == "http://localhost:8123" - - -def test_attribution_header_present(): - """Test that attribution header is added when context var is set.""" - from foundry_sdk._core.context_and_environment_vars import ATTRIBUTION_VAR - - # Save the original value to restore after test - original_value = ATTRIBUTION_VAR.get() - - try: - # Set attribution value - ATTRIBUTION_VAR.set(["test-attribution-source"]) - - # Create client and check headers - client = create_client() - assert "attribution" in client.headers - assert client.headers["attribution"] == "test-attribution-source" - - # Test with multiple attribution values - ATTRIBUTION_VAR.set(["source1", "source2"]) - client = create_client() - assert client.headers["attribution"] == "source1, source2" - finally: - # Restore original value - ATTRIBUTION_VAR.set(original_value) - - -def test_attribution_header_not_present(): - """Test that attribution header is not added when context var is None.""" - from foundry_sdk._core.context_and_environment_vars import ATTRIBUTION_VAR - - # Save the original value to restore after test - original_value = ATTRIBUTION_VAR.get() - - try: - # Set attribution value to None - ATTRIBUTION_VAR.set(None) - - # Create client and check headers - client = create_client() - assert "attribution" not in client.headers - finally: - # Restore original value - ATTRIBUTION_VAR.set(original_value) - - -def test_async_proxies(): - client = create_async_client( - Config(proxies={"https": "https://foo.bar", "http": "http://foo.bar"}) - ) - - transport = assert_async_http_transport(client._mounts[URLPattern("https://")]) - proxy = assert_async_http_proxy(transport._pool) - assert proxy._ssl_context is not None - assert proxy._ssl_context.verify_mode == ssl.VerifyMode.CERT_REQUIRED - assert proxy._proxy_ssl_context is not None - assert proxy._proxy_ssl_context.verify_mode == ssl.VerifyMode.CERT_REQUIRED - assert proxy._proxy_url.scheme == b"https" - assert proxy._proxy_url.host == b"foo.bar" - - transport = assert_async_http_transport(client._mounts[URLPattern("http://")]) - proxy = assert_async_http_proxy(transport._pool) - assert proxy._ssl_context is not None - assert proxy._ssl_context.verify_mode == ssl.VerifyMode.CERT_REQUIRED - assert proxy._proxy_ssl_context is None - assert proxy._proxy_url.scheme == b"http" - assert proxy._proxy_url.host == b"foo.bar" diff --git a/tests/test_model_base.py b/tests/test_model_base.py deleted file mode 100644 index 87cc8d296..000000000 --- a/tests/test_model_base.py +++ /dev/null @@ -1,288 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import warnings -from typing import Any -from typing import Dict -from typing import List -from typing import Optional -from typing import Set -from typing import Tuple - -import pytest - -from foundry_sdk._core import ModelBase - - -def test_can_be_used_as_dict_key() -> None: - """Test that ModelBase objects can be used as dictionary keys.""" - - class TestModel(ModelBase): - name: str - age: int - - model1 = TestModel(name="Alice", age=30) - model2 = TestModel(name="Alice", age=30) # Same data as model1 - model3 = TestModel(name="Bob", age=25) # Different data - - # Models with same content should be equal - assert model1 == model2 - assert model1 != model3 - - # Models with same content should have same hash - assert hash(model1) == hash(model2) - assert hash(model1) != hash(model3) - - # Use models as dict keys - data = {} - data[model1] = "First model" - data[model3] = "Third model" - - # Should retrieve by equivalent object - assert data[model2] == "First model" - assert len(data) == 2 - - -def test_hash_value_cached() -> None: - """Test that hash value is calculated only once and cached.""" - - class SimpleModel(ModelBase): - value: str - - model = SimpleModel(value="test") - - # Access hash first time - should calculate - hash1 = hash(model) - - # Access hash second time - should use cached value - hash2 = hash(model) - - assert hash1 == hash2 - assert model._hash_called is True - assert model._hash_value == hash1 - - -def test_warns_on_mutation_after_hash() -> None: - """Test that a warning is issued when a model is modified after being hashed.""" - - class MutableModel(ModelBase): - value: str - count: int = 0 - - model = MutableModel(value="original") - - # Use as dict key to trigger hash calculation - data = {model: "some value"} - - # Should warn when modified after hash - with pytest.warns( - UserWarning, match="Modifying MutableModel after it has been used as a dictionary key" - ): - model.value = "changed" - - # Hash value should be reset - assert model._hash_value is None - - # Re-hashing should work - new_hash = hash(model) - - # But we can add it back - data[model] = "updated value" - assert data[model] == "updated value" - - -def test_hash_includes_class_identity() -> None: - """Test that models with identical attributes but different classes have different hashes.""" - - class UserModel(ModelBase): - name: str - age: int - - class PersonModel(ModelBase): - name: str - age: int - - user = UserModel(name="Alice", age=30) - person = PersonModel(name="Alice", age=30) - - # Despite having identical attributes, hashes should differ due to class identity - assert hash(user) != hash(person) - - # Dictionaries should treat them as separate keys - data = {} - data[user] = "User data" - data[person] = "Person data" - - assert len(data) == 2 - assert data[user] == "User data" - assert data[person] == "Person data" - - -def test_hash_with_different_data_structures() -> None: - """Test that models with different data structures hash correctly.""" - - class StructuredModel(ModelBase): - tuple_field: Tuple[str, int] - list_field: List[str] - dict_field: Dict[str, Any] - set_field: Set[int] - - model1 = StructuredModel( - tuple_field=("hello", 42), - list_field=["a", "b", "c"], - dict_field={"key1": "value1", "key2": 123}, - set_field={1, 2, 3}, - ) - - model2 = StructuredModel( - tuple_field=("hello", 42), - list_field=["a", "b", "c"], - dict_field={"key1": "value1", "key2": 123}, - set_field={1, 2, 3}, - ) - - # Models with identical content should have same hash - assert hash(model1) == hash(model2) - - # Changing a tuple element should result in a different hash - model3 = StructuredModel( - tuple_field=("world", 42), # Different first element - list_field=["a", "b", "c"], - dict_field={"key1": "value1", "key2": 123}, - set_field={1, 2, 3}, - ) - assert hash(model1) != hash(model3) - - # Changing list order should result in a different hash - model4 = StructuredModel( - tuple_field=("hello", 42), - list_field=["a", "c", "b"], # Different order - dict_field={"key1": "value1", "key2": 123}, - set_field={1, 2, 3}, - ) - assert hash(model1) != hash(model4) - - # Adding a dict key should result in a different hash - model5 = StructuredModel( - tuple_field=("hello", 42), - list_field=["a", "b", "c"], - dict_field={"key1": "value1", "key2": 123, "key3": True}, # Additional key - set_field={1, 2, 3}, - ) - assert hash(model1) != hash(model5) - - # Changing set elements should result in a different hash - model6 = StructuredModel( - tuple_field=("hello", 42), - list_field=["a", "b", "c"], - dict_field={"key1": "value1", "key2": 123}, - set_field={1, 2, 4}, # 3 replaced with 4 - ) - assert hash(model1) != hash(model6) - - -def test_hash_with_nested_models() -> None: - """Test that models with nested model structures hash correctly.""" - - class Address(ModelBase): - street: str - city: str - postal_code: Optional[str] = None - - class Person(ModelBase): - name: str - address: Address - tags: List[str] - metadata: Dict[str, Any] - - # Create two models with identical nested structures - address1 = Address(street="123 Main St", city="Springfield") - person1 = Person( - name="Alice", - address=address1, - tags=["employee", "manager"], - metadata={"id": 123, "active": True}, - ) - - address2 = Address(street="123 Main St", city="Springfield") - person2 = Person( - name="Alice", - address=address2, - tags=["employee", "manager"], - metadata={"id": 123, "active": True}, - ) - - # Different address object but same content - assert address1 is not address2 - - # Models with identical content (including nested structures) should have same hash - assert hash(person1) == hash(person2) - - # Test a model with a different nested model - person3 = Person( - name="Alice", - address=Address(street="456 Elm St", city="Springfield"), # Different street - tags=["employee", "manager"], - metadata={"id": 123, "active": True}, - ) - - assert hash(person1) != hash(person3) - - # Test a model with nullable nested fields - address_with_postal = Address(street="123 Main St", city="Springfield", postal_code="12345") - person_with_postal = Person( - name="Alice", - address=address_with_postal, - tags=["employee", "manager"], - metadata={"id": 123, "active": True}, - ) - - assert hash(person1) != hash(person_with_postal) - - # Test with deeply nested structures - deeply_nested_person = Person( - name="Bob", - address=address1, - tags=["employee", "manager"], - metadata={ - "id": 456, - "active": True, - "history": { - "previous_roles": ["intern", "associate"], - "performance": {"2022": "Excellent", "2023": "Outstanding"}, - }, - }, - ) - - # Should be hashable despite complex nested structure - hash_value = hash(deeply_nested_person) - assert isinstance(hash_value, int) - - # Two identical deep structures should hash the same - deeply_nested_person2 = Person( - name="Bob", - address=address1, - tags=["employee", "manager"], - metadata={ - "id": 456, - "active": True, - "history": { - "previous_roles": ["intern", "associate"], - "performance": {"2022": "Excellent", "2023": "Outstanding"}, - }, - }, - ) - - assert hash(deeply_nested_person) == hash(deeply_nested_person2) diff --git a/tests/test_page_iterator.py b/tests/test_page_iterator.py deleted file mode 100644 index 0190f99bd..000000000 --- a/tests/test_page_iterator.py +++ /dev/null @@ -1,138 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -from typing import Any -from typing import AsyncIterator -from typing import Optional - -import pytest - -from foundry_sdk._core.page_iterator import AsyncPageIterator -from foundry_sdk._core.page_iterator import PageIterator - - -def create_page_func(total_items: int, default_page_size: int): - def page_function(page_size: Optional[int], next_page_token: Optional[str]): - page_size = page_size or default_page_size - next_page_token_int = int(next_page_token or "0") - - items = list(range(next_page_token_int, min(next_page_token_int + page_size, total_items))) - next_page_token = ( - str(next_page_token_int + page_size) - if next_page_token_int + page_size < total_items - else None - ) - - return (next_page_token, items) - - return page_function - - -def create_async_page_func(total_items: int, default_page_size: int): - async def page_function(page_size: Optional[int], next_page_token: Optional[str]): - page_size = page_size or default_page_size - next_page_token_int = int(next_page_token or "0") - - items = list(range(next_page_token_int, min(next_page_token_int + page_size, total_items))) - next_page_token = ( - str(next_page_token_int + page_size) - if next_page_token_int + page_size < total_items - else None - ) - - return (next_page_token, items) - - return page_function - - -def create_iterator(total_items: int, default_page_size: int): - return PageIterator[int](create_page_func(total_items, default_page_size)) - - -def create_async_iterator(total_items: int, default_page_size: int): - return AsyncPageIterator[int](create_async_page_func(total_items, default_page_size)) - - -def test_empty_iterator(): - iterator = create_iterator(0, 5) - assert iterator.data == [] - assert iterator.next_page_token is None - assert list(iterator) == [] - - -def test_iterator_with_one_item(): - iterator = create_iterator(1, 5) - assert iterator.data == [0] - assert iterator.next_page_token is None - assert list(iterator) == [] - - -def test_iterator_with_5_pages_of_5(): - iterator = create_iterator(25, 5) - - assert iterator.data == [0, 1, 2, 3, 4] - assert iterator.next_page_token == "5" - assert next(iterator) == [0, 1, 2, 3, 4] - assert iterator.next_page_token == "10" - - assert next(iterator) == [5, 6, 7, 8, 9] - assert iterator.next_page_token == "15" - - # Make sure it finishes the last 2 pages - assert len(list(iterator)) == 2 - - # And then confirm there is nothing left - with pytest.raises(StopIteration): - next(iterator) - - -async def alist(iterator: AsyncIterator[Any]) -> Any: - return [gen async for gen in iterator] - - -@pytest.mark.asyncio(scope="session") -async def test_empty_async_iterator(): - iterator = create_async_iterator(0, 5) - assert await iterator.get_data() == [] - assert await iterator.get_next_page_token() is None - assert await alist(iterator) == [[]] - - -@pytest.mark.asyncio(scope="session") -async def test_async_iterator_with_one_item(): - iterator = create_async_iterator(1, 5) - assert await iterator.get_data() == [0] - assert await iterator.get_next_page_token() is None - assert await alist(iterator) == [[0]] - - -@pytest.mark.asyncio(scope="session") -async def test_async_iterator_with_5_pages_of_5(): - iterator = create_async_iterator(25, 5) - - assert await iterator.get_data() == [0, 1, 2, 3, 4] - assert await iterator.get_next_page_token() == "5" - assert await iterator.__anext__() == [0, 1, 2, 3, 4] - assert await iterator.get_next_page_token() == "5" - - assert await iterator.__anext__() == [5, 6, 7, 8, 9] - assert await iterator.get_next_page_token() == "10" - - # Make sure it finishes the last 3 pages - assert len(await alist(iterator)) == 3 - - # And then confirm there is nothing left - with pytest.raises(StopAsyncIteration): - await iterator.__anext__() diff --git a/tests/test_performance.py b/tests/test_performance.py deleted file mode 100644 index ce82416b9..000000000 --- a/tests/test_performance.py +++ /dev/null @@ -1,423 +0,0 @@ -import timeit - -import pytest - - -def test_import_v1_client_performance(): - import_time = timeit.timeit( - stmt="import foundry_sdk.v1", - setup="import sys; sys.modules.pop('foundry_sdk.v1', None);", - number=1, - ) - - assert import_time < 0.25 - - -def test_client_v1_initialization_performance(): - init_time = timeit.timeit( - stmt="foundry_sdk.v1.FoundryClient(foundry_sdk.UserTokenAuth(token='token'), hostname='localhost')", - setup="import sys; sys.modules.pop('foundry_sdk.v1', None);import foundry_sdk; import foundry_sdk.v1", - number=1, - ) - - assert init_time < 0.25 - - -def test_datasets_v1_client_access_performance(): - init_and_access_time = timeit.timeit( - stmt="foundry_sdk.v1.FoundryClient(foundry_sdk.UserTokenAuth(token='token'), hostname='localhost').datasets", - setup="import sys; sys.modules.pop('foundry_sdk.v1', None);import foundry_sdk; import foundry_sdk.v1", - number=1, - ) - - assert init_and_access_time < 0.5 - - -def test_datasets_v1_models_import_performance(): - init_and_access_time = timeit.timeit( - stmt="import foundry_sdk.v1.datasets.models", - setup="import sys; sys.modules.pop('foundry_sdk.v1.datasets.models', None)", - number=1, - ) - - assert init_and_access_time < 0.5 - - -def test_ontologies_v1_client_access_performance(): - init_and_access_time = timeit.timeit( - stmt="foundry_sdk.v1.FoundryClient(foundry_sdk.UserTokenAuth(token='token'), hostname='localhost').ontologies", - setup="import sys; sys.modules.pop('foundry_sdk.v1', None);import foundry_sdk; import foundry_sdk.v1", - number=1, - ) - - assert init_and_access_time < 0.5 - - -def test_ontologies_v1_models_import_performance(): - init_and_access_time = timeit.timeit( - stmt="import foundry_sdk.v1.ontologies.models", - setup="import sys; sys.modules.pop('foundry_sdk.v1.ontologies.models', None)", - number=1, - ) - - assert init_and_access_time < 0.5 - - -def test_import_v2_client_performance(): - import_time = timeit.timeit( - stmt="import foundry_sdk.v2", - setup="import sys; sys.modules.pop('foundry_sdk.v2', None);", - number=1, - ) - - assert import_time < 0.25 - - -def test_client_v2_initialization_performance(): - init_time = timeit.timeit( - stmt="foundry_sdk.v2.FoundryClient(foundry_sdk.UserTokenAuth(token='token'), hostname='localhost')", - setup="import sys; sys.modules.pop('foundry_sdk.v2', None);import foundry_sdk; import foundry_sdk.v2", - number=1, - ) - - assert init_time < 0.25 - - -def test_admin_v2_client_access_performance(): - init_and_access_time = timeit.timeit( - stmt="foundry_sdk.v2.FoundryClient(foundry_sdk.UserTokenAuth(token='token'), hostname='localhost').admin", - setup="import sys; sys.modules.pop('foundry_sdk.v2', None);import foundry_sdk; import foundry_sdk.v2", - number=1, - ) - - assert init_and_access_time < 0.5 - - -def test_admin_v2_models_import_performance(): - init_and_access_time = timeit.timeit( - stmt="import foundry_sdk.v2.admin.models", - setup="import sys; sys.modules.pop('foundry_sdk.v2.admin.models', None)", - number=1, - ) - - assert init_and_access_time < 0.5 - - -def test_aip_agents_v2_client_access_performance(): - init_and_access_time = timeit.timeit( - stmt="foundry_sdk.v2.FoundryClient(foundry_sdk.UserTokenAuth(token='token'), hostname='localhost').aip_agents", - setup="import sys; sys.modules.pop('foundry_sdk.v2', None);import foundry_sdk; import foundry_sdk.v2", - number=1, - ) - - assert init_and_access_time < 0.5 - - -def test_aip_agents_v2_models_import_performance(): - init_and_access_time = timeit.timeit( - stmt="import foundry_sdk.v2.aip_agents.models", - setup="import sys; sys.modules.pop('foundry_sdk.v2.aip_agents.models', None)", - number=1, - ) - - assert init_and_access_time < 0.5 - - -def test_audit_v2_client_access_performance(): - init_and_access_time = timeit.timeit( - stmt="foundry_sdk.v2.FoundryClient(foundry_sdk.UserTokenAuth(token='token'), hostname='localhost').audit", - setup="import sys; sys.modules.pop('foundry_sdk.v2', None);import foundry_sdk; import foundry_sdk.v2", - number=1, - ) - - assert init_and_access_time < 0.5 - - -def test_audit_v2_models_import_performance(): - init_and_access_time = timeit.timeit( - stmt="import foundry_sdk.v2.audit.models", - setup="import sys; sys.modules.pop('foundry_sdk.v2.audit.models', None)", - number=1, - ) - - assert init_and_access_time < 0.5 - - -def test_connectivity_v2_client_access_performance(): - init_and_access_time = timeit.timeit( - stmt="foundry_sdk.v2.FoundryClient(foundry_sdk.UserTokenAuth(token='token'), hostname='localhost').connectivity", - setup="import sys; sys.modules.pop('foundry_sdk.v2', None);import foundry_sdk; import foundry_sdk.v2", - number=1, - ) - - assert init_and_access_time < 0.5 - - -def test_connectivity_v2_models_import_performance(): - init_and_access_time = timeit.timeit( - stmt="import foundry_sdk.v2.connectivity.models", - setup="import sys; sys.modules.pop('foundry_sdk.v2.connectivity.models', None)", - number=1, - ) - - assert init_and_access_time < 0.5 - - -def test_data_health_v2_client_access_performance(): - init_and_access_time = timeit.timeit( - stmt="foundry_sdk.v2.FoundryClient(foundry_sdk.UserTokenAuth(token='token'), hostname='localhost').data_health", - setup="import sys; sys.modules.pop('foundry_sdk.v2', None);import foundry_sdk; import foundry_sdk.v2", - number=1, - ) - - assert init_and_access_time < 0.5 - - -def test_data_health_v2_models_import_performance(): - init_and_access_time = timeit.timeit( - stmt="import foundry_sdk.v2.data_health.models", - setup="import sys; sys.modules.pop('foundry_sdk.v2.data_health.models', None)", - number=1, - ) - - assert init_and_access_time < 0.5 - - -def test_datasets_v2_client_access_performance(): - init_and_access_time = timeit.timeit( - stmt="foundry_sdk.v2.FoundryClient(foundry_sdk.UserTokenAuth(token='token'), hostname='localhost').datasets", - setup="import sys; sys.modules.pop('foundry_sdk.v2', None);import foundry_sdk; import foundry_sdk.v2", - number=1, - ) - - assert init_and_access_time < 0.5 - - -def test_datasets_v2_models_import_performance(): - init_and_access_time = timeit.timeit( - stmt="import foundry_sdk.v2.datasets.models", - setup="import sys; sys.modules.pop('foundry_sdk.v2.datasets.models', None)", - number=1, - ) - - assert init_and_access_time < 0.5 - - -def test_filesystem_v2_client_access_performance(): - init_and_access_time = timeit.timeit( - stmt="foundry_sdk.v2.FoundryClient(foundry_sdk.UserTokenAuth(token='token'), hostname='localhost').filesystem", - setup="import sys; sys.modules.pop('foundry_sdk.v2', None);import foundry_sdk; import foundry_sdk.v2", - number=1, - ) - - assert init_and_access_time < 0.5 - - -def test_filesystem_v2_models_import_performance(): - init_and_access_time = timeit.timeit( - stmt="import foundry_sdk.v2.filesystem.models", - setup="import sys; sys.modules.pop('foundry_sdk.v2.filesystem.models', None)", - number=1, - ) - - assert init_and_access_time < 0.5 - - -def test_functions_v2_client_access_performance(): - init_and_access_time = timeit.timeit( - stmt="foundry_sdk.v2.FoundryClient(foundry_sdk.UserTokenAuth(token='token'), hostname='localhost').functions", - setup="import sys; sys.modules.pop('foundry_sdk.v2', None);import foundry_sdk; import foundry_sdk.v2", - number=1, - ) - - assert init_and_access_time < 0.5 - - -def test_functions_v2_models_import_performance(): - init_and_access_time = timeit.timeit( - stmt="import foundry_sdk.v2.functions.models", - setup="import sys; sys.modules.pop('foundry_sdk.v2.functions.models', None)", - number=1, - ) - - assert init_and_access_time < 0.5 - - -def test_language_models_v2_client_access_performance(): - init_and_access_time = timeit.timeit( - stmt="foundry_sdk.v2.FoundryClient(foundry_sdk.UserTokenAuth(token='token'), hostname='localhost').language_models", - setup="import sys; sys.modules.pop('foundry_sdk.v2', None);import foundry_sdk; import foundry_sdk.v2", - number=1, - ) - - assert init_and_access_time < 0.5 - - -def test_language_models_v2_models_import_performance(): - init_and_access_time = timeit.timeit( - stmt="import foundry_sdk.v2.language_models.models", - setup="import sys; sys.modules.pop('foundry_sdk.v2.language_models.models', None)", - number=1, - ) - - assert init_and_access_time < 0.5 - - -def test_media_sets_v2_client_access_performance(): - init_and_access_time = timeit.timeit( - stmt="foundry_sdk.v2.FoundryClient(foundry_sdk.UserTokenAuth(token='token'), hostname='localhost').media_sets", - setup="import sys; sys.modules.pop('foundry_sdk.v2', None);import foundry_sdk; import foundry_sdk.v2", - number=1, - ) - - assert init_and_access_time < 0.5 - - -def test_media_sets_v2_models_import_performance(): - init_and_access_time = timeit.timeit( - stmt="import foundry_sdk.v2.media_sets.models", - setup="import sys; sys.modules.pop('foundry_sdk.v2.media_sets.models', None)", - number=1, - ) - - assert init_and_access_time < 0.5 - - -def test_models_v2_client_access_performance(): - init_and_access_time = timeit.timeit( - stmt="foundry_sdk.v2.FoundryClient(foundry_sdk.UserTokenAuth(token='token'), hostname='localhost').models", - setup="import sys; sys.modules.pop('foundry_sdk.v2', None);import foundry_sdk; import foundry_sdk.v2", - number=1, - ) - - assert init_and_access_time < 0.5 - - -def test_models_v2_models_import_performance(): - init_and_access_time = timeit.timeit( - stmt="import foundry_sdk.v2.models.models", - setup="import sys; sys.modules.pop('foundry_sdk.v2.models.models', None)", - number=1, - ) - - assert init_and_access_time < 0.5 - - -def test_ontologies_v2_client_access_performance(): - init_and_access_time = timeit.timeit( - stmt="foundry_sdk.v2.FoundryClient(foundry_sdk.UserTokenAuth(token='token'), hostname='localhost').ontologies", - setup="import sys; sys.modules.pop('foundry_sdk.v2', None);import foundry_sdk; import foundry_sdk.v2", - number=1, - ) - - assert init_and_access_time < 0.5 - - -def test_ontologies_v2_models_import_performance(): - init_and_access_time = timeit.timeit( - stmt="import foundry_sdk.v2.ontologies.models", - setup="import sys; sys.modules.pop('foundry_sdk.v2.ontologies.models', None)", - number=1, - ) - - assert init_and_access_time < 0.5 - - -def test_orchestration_v2_client_access_performance(): - init_and_access_time = timeit.timeit( - stmt="foundry_sdk.v2.FoundryClient(foundry_sdk.UserTokenAuth(token='token'), hostname='localhost').orchestration", - setup="import sys; sys.modules.pop('foundry_sdk.v2', None);import foundry_sdk; import foundry_sdk.v2", - number=1, - ) - - assert init_and_access_time < 0.5 - - -def test_orchestration_v2_models_import_performance(): - init_and_access_time = timeit.timeit( - stmt="import foundry_sdk.v2.orchestration.models", - setup="import sys; sys.modules.pop('foundry_sdk.v2.orchestration.models', None)", - number=1, - ) - - assert init_and_access_time < 0.5 - - -def test_sql_queries_v2_client_access_performance(): - init_and_access_time = timeit.timeit( - stmt="foundry_sdk.v2.FoundryClient(foundry_sdk.UserTokenAuth(token='token'), hostname='localhost').sql_queries", - setup="import sys; sys.modules.pop('foundry_sdk.v2', None);import foundry_sdk; import foundry_sdk.v2", - number=1, - ) - - assert init_and_access_time < 0.5 - - -def test_sql_queries_v2_models_import_performance(): - init_and_access_time = timeit.timeit( - stmt="import foundry_sdk.v2.sql_queries.models", - setup="import sys; sys.modules.pop('foundry_sdk.v2.sql_queries.models', None)", - number=1, - ) - - assert init_and_access_time < 0.5 - - -def test_streams_v2_client_access_performance(): - init_and_access_time = timeit.timeit( - stmt="foundry_sdk.v2.FoundryClient(foundry_sdk.UserTokenAuth(token='token'), hostname='localhost').streams", - setup="import sys; sys.modules.pop('foundry_sdk.v2', None);import foundry_sdk; import foundry_sdk.v2", - number=1, - ) - - assert init_and_access_time < 0.5 - - -def test_streams_v2_models_import_performance(): - init_and_access_time = timeit.timeit( - stmt="import foundry_sdk.v2.streams.models", - setup="import sys; sys.modules.pop('foundry_sdk.v2.streams.models', None)", - number=1, - ) - - assert init_and_access_time < 0.5 - - -def test_third_party_applications_v2_client_access_performance(): - init_and_access_time = timeit.timeit( - stmt="foundry_sdk.v2.FoundryClient(foundry_sdk.UserTokenAuth(token='token'), hostname='localhost').third_party_applications", - setup="import sys; sys.modules.pop('foundry_sdk.v2', None);import foundry_sdk; import foundry_sdk.v2", - number=1, - ) - - assert init_and_access_time < 0.5 - - -def test_third_party_applications_v2_models_import_performance(): - init_and_access_time = timeit.timeit( - stmt="import foundry_sdk.v2.third_party_applications.models", - setup="import sys; sys.modules.pop('foundry_sdk.v2.third_party_applications.models', None)", - number=1, - ) - - assert init_and_access_time < 0.5 - - -def test_widgets_v2_client_access_performance(): - init_and_access_time = timeit.timeit( - stmt="foundry_sdk.v2.FoundryClient(foundry_sdk.UserTokenAuth(token='token'), hostname='localhost').widgets", - setup="import sys; sys.modules.pop('foundry_sdk.v2', None);import foundry_sdk; import foundry_sdk.v2", - number=1, - ) - - assert init_and_access_time < 0.5 - - -def test_widgets_v2_models_import_performance(): - init_and_access_time = timeit.timeit( - stmt="import foundry_sdk.v2.widgets.models", - setup="import sys; sys.modules.pop('foundry_sdk.v2.widgets.models', None)", - number=1, - ) - - assert init_and_access_time < 0.5 diff --git a/tests/test_resorce_import.py b/tests/test_resorce_import.py deleted file mode 100644 index 7459211e7..000000000 --- a/tests/test_resorce_import.py +++ /dev/null @@ -1,582 +0,0 @@ -def test_datasets_v1_branch_import(): - from foundry_sdk.v1.datasets.branch import BranchClient - - assert BranchClient is not None - - -def test_datasets_v1_dataset_import(): - from foundry_sdk.v1.datasets.dataset import DatasetClient - - assert DatasetClient is not None - - -def test_datasets_v1_file_import(): - from foundry_sdk.v1.datasets.file import FileClient - - assert FileClient is not None - - -def test_datasets_v1_transaction_import(): - from foundry_sdk.v1.datasets.transaction import TransactionClient - - assert TransactionClient is not None - - -def test_ontologies_v1_action_import(): - from foundry_sdk.v1.ontologies.action import ActionClient - - assert ActionClient is not None - - -def test_ontologies_v1_action_type_import(): - from foundry_sdk.v1.ontologies.action_type import ActionTypeClient - - assert ActionTypeClient is not None - - -def test_ontologies_v1_attachment_import(): - from foundry_sdk.v1.ontologies.attachment import AttachmentClient - - assert AttachmentClient is not None - - -def test_ontologies_v1_object_type_import(): - from foundry_sdk.v1.ontologies.object_type import ObjectTypeClient - - assert ObjectTypeClient is not None - - -def test_ontologies_v1_ontology_import(): - from foundry_sdk.v1.ontologies.ontology import OntologyClient - - assert OntologyClient is not None - - -def test_ontologies_v1_ontology_object_import(): - from foundry_sdk.v1.ontologies.ontology_object import OntologyObjectClient - - assert OntologyObjectClient is not None - - -def test_ontologies_v1_query_import(): - from foundry_sdk.v1.ontologies.query import QueryClient - - assert QueryClient is not None - - -def test_ontologies_v1_query_type_import(): - from foundry_sdk.v1.ontologies.query_type import QueryTypeClient - - assert QueryTypeClient is not None - - -def test_admin_v2_authentication_provider_import(): - from foundry_sdk.v2.admin.authentication_provider import AuthenticationProviderClient # NOQA - - assert AuthenticationProviderClient is not None - - -def test_admin_v2_enrollment_import(): - from foundry_sdk.v2.admin.enrollment import EnrollmentClient - - assert EnrollmentClient is not None - - -def test_admin_v2_enrollment_role_assignment_import(): - from foundry_sdk.v2.admin.enrollment_role_assignment import ( - EnrollmentRoleAssignmentClient, - ) # NOQA - - assert EnrollmentRoleAssignmentClient is not None - - -def test_admin_v2_group_import(): - from foundry_sdk.v2.admin.group import GroupClient - - assert GroupClient is not None - - -def test_admin_v2_group_member_import(): - from foundry_sdk.v2.admin.group_member import GroupMemberClient - - assert GroupMemberClient is not None - - -def test_admin_v2_group_membership_import(): - from foundry_sdk.v2.admin.group_membership import GroupMembershipClient - - assert GroupMembershipClient is not None - - -def test_admin_v2_group_membership_expiration_policy_import(): - from foundry_sdk.v2.admin.group_membership_expiration_policy import ( - GroupMembershipExpirationPolicyClient, - ) # NOQA - - assert GroupMembershipExpirationPolicyClient is not None - - -def test_admin_v2_group_provider_info_import(): - from foundry_sdk.v2.admin.group_provider_info import GroupProviderInfoClient - - assert GroupProviderInfoClient is not None - - -def test_admin_v2_host_import(): - from foundry_sdk.v2.admin.host import HostClient - - assert HostClient is not None - - -def test_admin_v2_marking_import(): - from foundry_sdk.v2.admin.marking import MarkingClient - - assert MarkingClient is not None - - -def test_admin_v2_marking_category_import(): - from foundry_sdk.v2.admin.marking_category import MarkingCategoryClient - - assert MarkingCategoryClient is not None - - -def test_admin_v2_marking_member_import(): - from foundry_sdk.v2.admin.marking_member import MarkingMemberClient - - assert MarkingMemberClient is not None - - -def test_admin_v2_marking_role_assignment_import(): - from foundry_sdk.v2.admin.marking_role_assignment import MarkingRoleAssignmentClient - - assert MarkingRoleAssignmentClient is not None - - -def test_admin_v2_organization_import(): - from foundry_sdk.v2.admin.organization import OrganizationClient - - assert OrganizationClient is not None - - -def test_admin_v2_organization_role_assignment_import(): - from foundry_sdk.v2.admin.organization_role_assignment import ( - OrganizationRoleAssignmentClient, - ) # NOQA - - assert OrganizationRoleAssignmentClient is not None - - -def test_admin_v2_role_import(): - from foundry_sdk.v2.admin.role import RoleClient - - assert RoleClient is not None - - -def test_admin_v2_user_import(): - from foundry_sdk.v2.admin.user import UserClient - - assert UserClient is not None - - -def test_admin_v2_user_provider_info_import(): - from foundry_sdk.v2.admin.user_provider_info import UserProviderInfoClient - - assert UserProviderInfoClient is not None - - -def test_aip_agents_v2_agent_import(): - from foundry_sdk.v2.aip_agents.agent import AgentClient - - assert AgentClient is not None - - -def test_aip_agents_v2_agent_version_import(): - from foundry_sdk.v2.aip_agents.agent_version import AgentVersionClient - - assert AgentVersionClient is not None - - -def test_aip_agents_v2_content_import(): - from foundry_sdk.v2.aip_agents.content import ContentClient - - assert ContentClient is not None - - -def test_aip_agents_v2_session_import(): - from foundry_sdk.v2.aip_agents.session import SessionClient - - assert SessionClient is not None - - -def test_aip_agents_v2_session_trace_import(): - from foundry_sdk.v2.aip_agents.session_trace import SessionTraceClient - - assert SessionTraceClient is not None - - -def test_audit_v2_log_file_import(): - from foundry_sdk.v2.audit.log_file import LogFileClient - - assert LogFileClient is not None - - -def test_audit_v2_organization_import(): - from foundry_sdk.v2.audit.organization import OrganizationClient - - assert OrganizationClient is not None - - -def test_connectivity_v2_connection_import(): - from foundry_sdk.v2.connectivity.connection import ConnectionClient - - assert ConnectionClient is not None - - -def test_connectivity_v2_file_import_import(): - from foundry_sdk.v2.connectivity.file_import import FileImportClient - - assert FileImportClient is not None - - -def test_connectivity_v2_table_import_import(): - from foundry_sdk.v2.connectivity.table_import import TableImportClient - - assert TableImportClient is not None - - -def test_connectivity_v2_virtual_table_import(): - from foundry_sdk.v2.connectivity.virtual_table import VirtualTableClient - - assert VirtualTableClient is not None - - -def test_data_health_v2_check_import(): - from foundry_sdk.v2.data_health.check import CheckClient - - assert CheckClient is not None - - -def test_data_health_v2_check_report_import(): - from foundry_sdk.v2.data_health.check_report import CheckReportClient - - assert CheckReportClient is not None - - -def test_datasets_v2_branch_import(): - from foundry_sdk.v2.datasets.branch import BranchClient - - assert BranchClient is not None - - -def test_datasets_v2_dataset_import(): - from foundry_sdk.v2.datasets.dataset import DatasetClient - - assert DatasetClient is not None - - -def test_datasets_v2_file_import(): - from foundry_sdk.v2.datasets.file import FileClient - - assert FileClient is not None - - -def test_datasets_v2_transaction_import(): - from foundry_sdk.v2.datasets.transaction import TransactionClient - - assert TransactionClient is not None - - -def test_datasets_v2_view_import(): - from foundry_sdk.v2.datasets.view import ViewClient - - assert ViewClient is not None - - -def test_filesystem_v2_folder_import(): - from foundry_sdk.v2.filesystem.folder import FolderClient - - assert FolderClient is not None - - -def test_filesystem_v2_project_import(): - from foundry_sdk.v2.filesystem.project import ProjectClient - - assert ProjectClient is not None - - -def test_filesystem_v2_resource_import(): - from foundry_sdk.v2.filesystem.resource import ResourceClient - - assert ResourceClient is not None - - -def test_filesystem_v2_resource_role_import(): - from foundry_sdk.v2.filesystem.resource_role import ResourceRoleClient - - assert ResourceRoleClient is not None - - -def test_filesystem_v2_space_import(): - from foundry_sdk.v2.filesystem.space import SpaceClient - - assert SpaceClient is not None - - -def test_functions_v2_query_import(): - from foundry_sdk.v2.functions.query import QueryClient - - assert QueryClient is not None - - -def test_functions_v2_value_type_import(): - from foundry_sdk.v2.functions.value_type import ValueTypeClient - - assert ValueTypeClient is not None - - -def test_functions_v2_version_id_import(): - from foundry_sdk.v2.functions.version_id import VersionIdClient - - assert VersionIdClient is not None - - -def test_language_models_v2_anthropic_model_import(): - from foundry_sdk.v2.language_models.anthropic_model import AnthropicModelClient - - assert AnthropicModelClient is not None - - -def test_language_models_v2_open_ai_model_import(): - from foundry_sdk.v2.language_models.open_ai_model import OpenAiModelClient - - assert OpenAiModelClient is not None - - -def test_media_sets_v2_media_set_import(): - from foundry_sdk.v2.media_sets.media_set import MediaSetClient - - assert MediaSetClient is not None - - -def test_models_v2_model_import(): - from foundry_sdk.v2.models.model import ModelClient - - assert ModelClient is not None - - -def test_models_v2_model_version_import(): - from foundry_sdk.v2.models.model_version import ModelVersionClient - - assert ModelVersionClient is not None - - -def test_ontologies_v2_action_import(): - from foundry_sdk.v2.ontologies.action import ActionClient - - assert ActionClient is not None - - -def test_ontologies_v2_action_type_import(): - from foundry_sdk.v2.ontologies.action_type import ActionTypeClient - - assert ActionTypeClient is not None - - -def test_ontologies_v2_action_type_full_metadata_import(): - from foundry_sdk.v2.ontologies.action_type_full_metadata import ( - ActionTypeFullMetadataClient, - ) # NOQA - - assert ActionTypeFullMetadataClient is not None - - -def test_ontologies_v2_attachment_import(): - from foundry_sdk.v2.ontologies.attachment import AttachmentClient - - assert AttachmentClient is not None - - -def test_ontologies_v2_attachment_property_import(): - from foundry_sdk.v2.ontologies.attachment_property import AttachmentPropertyClient - - assert AttachmentPropertyClient is not None - - -def test_ontologies_v2_cipher_text_property_import(): - from foundry_sdk.v2.ontologies.cipher_text_property import CipherTextPropertyClient - - assert CipherTextPropertyClient is not None - - -def test_ontologies_v2_linked_object_import(): - from foundry_sdk.v2.ontologies.linked_object import LinkedObjectClient - - assert LinkedObjectClient is not None - - -def test_ontologies_v2_media_reference_property_import(): - from foundry_sdk.v2.ontologies.media_reference_property import ( - MediaReferencePropertyClient, - ) # NOQA - - assert MediaReferencePropertyClient is not None - - -def test_ontologies_v2_object_type_import(): - from foundry_sdk.v2.ontologies.object_type import ObjectTypeClient - - assert ObjectTypeClient is not None - - -def test_ontologies_v2_ontology_import(): - from foundry_sdk.v2.ontologies.ontology import OntologyClient - - assert OntologyClient is not None - - -def test_ontologies_v2_ontology_interface_import(): - from foundry_sdk.v2.ontologies.ontology_interface import OntologyInterfaceClient - - assert OntologyInterfaceClient is not None - - -def test_ontologies_v2_ontology_object_import(): - from foundry_sdk.v2.ontologies.ontology_object import OntologyObjectClient - - assert OntologyObjectClient is not None - - -def test_ontologies_v2_ontology_object_set_import(): - from foundry_sdk.v2.ontologies.ontology_object_set import OntologyObjectSetClient - - assert OntologyObjectSetClient is not None - - -def test_ontologies_v2_ontology_transaction_import(): - from foundry_sdk.v2.ontologies.ontology_transaction import OntologyTransactionClient - - assert OntologyTransactionClient is not None - - -def test_ontologies_v2_ontology_value_type_import(): - from foundry_sdk.v2.ontologies.ontology_value_type import OntologyValueTypeClient - - assert OntologyValueTypeClient is not None - - -def test_ontologies_v2_query_import(): - from foundry_sdk.v2.ontologies.query import QueryClient - - assert QueryClient is not None - - -def test_ontologies_v2_query_type_import(): - from foundry_sdk.v2.ontologies.query_type import QueryTypeClient - - assert QueryTypeClient is not None - - -def test_ontologies_v2_time_series_property_v2_import(): - from foundry_sdk.v2.ontologies.time_series_property_v2 import TimeSeriesPropertyV2Client # NOQA - - assert TimeSeriesPropertyV2Client is not None - - -def test_ontologies_v2_time_series_value_bank_property_import(): - from foundry_sdk.v2.ontologies.time_series_value_bank_property import ( - TimeSeriesValueBankPropertyClient, - ) # NOQA - - assert TimeSeriesValueBankPropertyClient is not None - - -def test_orchestration_v2_build_import(): - from foundry_sdk.v2.orchestration.build import BuildClient - - assert BuildClient is not None - - -def test_orchestration_v2_job_import(): - from foundry_sdk.v2.orchestration.job import JobClient - - assert JobClient is not None - - -def test_orchestration_v2_schedule_import(): - from foundry_sdk.v2.orchestration.schedule import ScheduleClient - - assert ScheduleClient is not None - - -def test_orchestration_v2_schedule_run_import(): - from foundry_sdk.v2.orchestration.schedule_run import ScheduleRunClient - - assert ScheduleRunClient is not None - - -def test_orchestration_v2_schedule_version_import(): - from foundry_sdk.v2.orchestration.schedule_version import ScheduleVersionClient - - assert ScheduleVersionClient is not None - - -def test_sql_queries_v2_sql_query_import(): - from foundry_sdk.v2.sql_queries.sql_query import SqlQueryClient - - assert SqlQueryClient is not None - - -def test_streams_v2_dataset_import(): - from foundry_sdk.v2.streams.dataset import DatasetClient - - assert DatasetClient is not None - - -def test_streams_v2_stream_import(): - from foundry_sdk.v2.streams.stream import StreamClient - - assert StreamClient is not None - - -def test_third_party_applications_v2_third_party_application_import(): - from foundry_sdk.v2.third_party_applications.third_party_application import ( - ThirdPartyApplicationClient, - ) # NOQA - - assert ThirdPartyApplicationClient is not None - - -def test_third_party_applications_v2_version_import(): - from foundry_sdk.v2.third_party_applications.version import VersionClient - - assert VersionClient is not None - - -def test_third_party_applications_v2_website_import(): - from foundry_sdk.v2.third_party_applications.website import WebsiteClient - - assert WebsiteClient is not None - - -def test_widgets_v2_dev_mode_settings_import(): - from foundry_sdk.v2.widgets.dev_mode_settings import DevModeSettingsClient - - assert DevModeSettingsClient is not None - - -def test_widgets_v2_release_import(): - from foundry_sdk.v2.widgets.release import ReleaseClient - - assert ReleaseClient is not None - - -def test_widgets_v2_repository_import(): - from foundry_sdk.v2.widgets.repository import RepositoryClient - - assert RepositoryClient is not None - - -def test_widgets_v2_widget_set_import(): - from foundry_sdk.v2.widgets.widget_set import WidgetSetClient - - assert WidgetSetClient is not None diff --git a/tests/test_resource_iterator.py b/tests/test_resource_iterator.py deleted file mode 100644 index 805e6b2c8..000000000 --- a/tests/test_resource_iterator.py +++ /dev/null @@ -1,215 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -from typing import Any -from typing import Optional - -import pytest - -from foundry_sdk._core.resource_iterator import AsyncResourceIterator -from foundry_sdk._core.resource_iterator import ResourceIterator -from tests.test_page_iterator import alist -from tests.test_page_iterator import create_async_page_func -from tests.test_page_iterator import create_page_func - - -def create_iterator(total_items: int, default_page_size: int): - return ResourceIterator[int](create_page_func(total_items, default_page_size)) - - -def create_async_iterator(total_items: int, default_page_size: int): - return AsyncResourceIterator[int](create_async_page_func(total_items, default_page_size)) - - -def test_empty_iterator(): - iterator = create_iterator(0, 5) - assert iterator.data == [] - assert iterator.next_page_token is None - assert list(iterator) == [] - - -def test_iterator_with_one_item(): - iterator = create_iterator(1, 5) - assert iterator.data == [0] - assert iterator.next_page_token is None - assert list(iterator) == [0] - - -def test_iterator_with_5_pages_of_5(): - iterator = create_iterator(25, 5) - - # Check it can traverse from page to page correctly - # Page 1 - assert iterator.data == [0, 1, 2, 3, 4] - assert iterator.next_page_token == "5" - assert next(iterator) == 0 - assert next(iterator) == 1 - assert next(iterator) == 2 - assert next(iterator) == 3 - assert next(iterator) == 4 - assert iterator.data == [0, 1, 2, 3, 4] - - # Page 1 - assert next(iterator) == 5 - assert iterator.data == [5, 6, 7, 8, 9] - assert iterator.next_page_token == "10" - assert next(iterator) == 6 - assert next(iterator) == 7 - assert next(iterator) == 8 - assert next(iterator) == 9 - - # Make sure it finishes the last 3 pages - assert len(list(iterator)) == 15 - - # And then confirm there is nothing left - with pytest.raises(StopIteration): - next(iterator) - - -@pytest.mark.asyncio(scope="session") -async def test_empty_async_iterator(): - iterator = create_async_iterator(0, 5) - assert await iterator._page_iterator.get_data() == [] - assert await iterator._page_iterator.get_next_page_token() is None - assert await alist(iterator) == [] - - -@pytest.mark.asyncio(scope="session") -async def test_async_iterator_with_one_item(): - iterator = create_async_iterator(1, 5) - assert await iterator._page_iterator.get_data() == [0] - assert await iterator._page_iterator.get_next_page_token() is None - assert await alist(iterator) == [0] - - -@pytest.mark.asyncio(scope="session") -async def test_async_iterator_with_5_pages_of_5(): - iterator = create_async_iterator(25, 5) - - # Check it can traverse from page to page correctly - # Page 1 - assert await iterator.__anext__() == 0 - assert await iterator.__anext__() == 1 - assert await iterator.__anext__() == 2 - assert await iterator.__anext__() == 3 - assert await iterator.__anext__() == 4 - assert await iterator._page_iterator.get_data() == [0, 1, 2, 3, 4] - - # Page 1 - assert await iterator.__anext__() == 5 - assert await iterator.__anext__() == 6 - assert await iterator.__anext__() == 7 - assert await iterator.__anext__() == 8 - assert await iterator.__anext__() == 9 - assert await iterator._page_iterator.get_data() == [5, 6, 7, 8, 9] - - # Make sure it finishes the last 3 pages - assert len(await alist(iterator)) == 15 - - # And then confirm there is nothing left - with pytest.raises(StopAsyncIteration): - await iterator.__anext__() - - -def test_iterator_with_empty_page_in_middle(): - def page_func_with_empty_page(page_size: Optional[int], next_page_token: Optional[str]): - """Page function that returns: [0,1,2], [], [3,4,5], None""" - page_token = next_page_token or "page1" - - if page_token == "page1": - return ("page2", [0, 1, 2]) - elif page_token == "page2": - # Empty page but pagination continues - return ("page3", []) - elif page_token == "page3": - return (None, [3, 4, 5]) - else: - return (None, []) - - iterator = ResourceIterator[int](page_func_with_empty_page) - - # Should successfully iterate through all items, skipping the empty page - result = list(iterator) - assert result == [0, 1, 2, 3, 4, 5] - - -@pytest.mark.asyncio(scope="session") -async def test_async_iterator_with_empty_page_in_middle(): - async def async_page_func_with_empty_page( - page_size: Optional[int], next_page_token: Optional[str] - ): - """Async page function that returns: [0,1,2], [], [3,4,5], None""" - page_token = next_page_token or "page1" - - if page_token == "page1": - return ("page2", [0, 1, 2]) - elif page_token == "page2": - # Empty page but pagination continues - return ("page3", []) - elif page_token == "page3": - return (None, [3, 4, 5]) - else: - return (None, []) - - iterator = AsyncResourceIterator[int](async_page_func_with_empty_page) - - # Should successfully iterate through all items, skipping the empty page - result = await alist(iterator) - assert result == [0, 1, 2, 3, 4, 5] - - -def test_iterator_with_initial_page_token(): - def page_func(page_size: Optional[int], next_page_token: Optional[str]): - """Page function that returns different data based on page_token""" - page_token = next_page_token or "page1" - - if page_token == "page1": - return ("page2", [0, 1, 2]) - elif page_token == "page2": - return ("page3", [3, 4, 5]) - elif page_token == "page3": - return (None, [6, 7, 8]) - else: - return (None, []) - - # Start from page2 instead of page1 - iterator = ResourceIterator[int](page_func, page_token="page2") - - # Should only get items from page2 onwards: [3, 4, 5, 6, 7, 8] - result = list(iterator) - assert result == [3, 4, 5, 6, 7, 8] - - -@pytest.mark.asyncio(scope="session") -async def test_async_iterator_with_initial_page_token(): - async def async_page_func(page_size: Optional[int], next_page_token: Optional[str]): - """Async page function that returns different data based on page_token""" - page_token = next_page_token or "page1" - - if page_token == "page1": - return ("page2", [0, 1, 2]) - elif page_token == "page2": - return ("page3", [3, 4, 5]) - elif page_token == "page3": - return (None, [6, 7, 8]) - else: - return (None, []) - - # Start from page2 instead of page1 - iterator = AsyncResourceIterator[int](async_page_func, page_token="page2") - - # Should only get items from page2 onwards: [3, 4, 5, 6, 7, 8] - result = await alist(iterator) - assert result == [3, 4, 5, 6, 7, 8] diff --git a/tests/test_response_types.py b/tests/test_response_types.py deleted file mode 100644 index 0927acbe9..000000000 --- a/tests/test_response_types.py +++ /dev/null @@ -1,652 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import decimal -import json -from datetime import date -from datetime import datetime -from datetime import timezone -from typing import Any -from typing import Dict -from typing import Generic -from typing import List -from typing import Literal -from typing import Optional -from typing import TypeVar -from typing import Union - -import httpx -import pydantic -import pytest -from typing_extensions import Annotated - -from foundry_sdk._core import ApiResponse -from foundry_sdk._core import RequestInfo -from foundry_sdk._core.utils import RID -from foundry_sdk._core.utils import UUID -from foundry_sdk._core.utils import AwareDatetime -from foundry_sdk._core.utils import Long -from tests.server import FooBar - - -# Simple BaseModel types for testing -class SimpleModel(pydantic.BaseModel): - value: str - - -class ModelWithAnnotation(pydantic.BaseModel): - value: Annotated[str, pydantic.Field(min_length=3)] - - -# Union type with discriminator -class RunningStatus(pydantic.BaseModel): - type: Literal["RUNNING"] = "RUNNING" - percent_complete: int - - -class FailedStatus(pydantic.BaseModel): - type: Literal["FAILED"] = "FAILED" - error_message: str - - -class CompletedStatus(pydantic.BaseModel): - type: Literal["COMPLETED"] = "COMPLETED" - result: str - - -# Define Status using Annotated for discriminator -Status = Annotated[ - Union[RunningStatus, FailedStatus, CompletedStatus], - pydantic.Field(discriminator="type"), -] - -# Optional Annotated Union -OptionalStatus = Optional[Status] - - -def create_response(response_type: Any, json_content: Any) -> ApiResponse: - """Helper function to create ApiResponse objects for testing.""" - return ApiResponse( - RequestInfo.with_defaults("GET", "/test/endpoint", response_type=response_type), - httpx.Response(200, content=json.dumps(json_content).encode()), - ) - - -def create_bytes_response(response_type: Any, content: bytes) -> ApiResponse: - """Helper function to create ApiResponse objects with raw bytes for testing.""" - return ApiResponse( - RequestInfo.with_defaults("GET", "/test/endpoint", response_type=response_type), - httpx.Response(200, content=content), - ) - - -# ----- Tests for Simple Types ----- - - -def test_decode_bytes(): - """Test decoding raw bytes.""" - response = create_bytes_response(bytes, b"raw bytes content") - result = response.decode() - assert result == b"raw bytes content" - assert isinstance(result, bytes) - - -def test_decode_optional_bytes_present(): - """Test decoding Optional[bytes] when content is present.""" - response = create_bytes_response(Optional[bytes], b"optional bytes content") - result = response.decode() - assert result == b"optional bytes content" - assert isinstance(result, bytes) - - -def test_decode_optional_bytes_empty(): - """Test decoding Optional[bytes] when content is empty.""" - response = create_bytes_response(Optional[bytes], b"") - result = response.decode() - assert result is None - - -def test_decode_none(): - response = create_response(None, "foo") - result = response.decode() - assert result is None - - -def test_decode_any_type(): - """Test decoding Any.""" - json_data = {"key": "value", "number": 42} - response = create_response(Any, json_data) - result = response.decode() - assert result == json_data - - json_data = {"key": "value", "number": 42} - response = create_response(Annotated[Any, pydantic.Field(description="test")], json_data) - result = response.decode() - assert result == json_data - - -def test_decode_string(): - """Test decoding a string.""" - json_data = "string value" - response = create_response(str, json_data) - result = response.decode() - assert result == json_data - assert isinstance(result, str) - - -def test_decode_integer(): - """Test decoding an integer.""" - json_data = 42 - response = create_response(int, json_data) - result = response.decode() - assert result == json_data - assert isinstance(result, int) - - -def test_decode_float(): - """Test decoding a float.""" - json_data = 42.5 - response = create_response(float, json_data) - result = response.decode() - assert result == json_data - assert isinstance(result, float) - - -def test_decode_boolean(): - """Test decoding a boolean.""" - json_data = True - response = create_response(bool, json_data) - result = response.decode() - assert result == json_data - assert isinstance(result, bool) - - -def test_decode_literal(): - """Test decoding a literal type.""" - json_data = "option1" - response = create_response(Literal["option1", "option2", "option3"], json_data) - result = response.decode() - assert result == json_data - assert result == "option1" - - -# ----- Tests for Collection Types ----- - - -def test_decode_list(): - """Test decoding a list of values.""" - json_data = ["item1", "item2", "item3"] - response = create_response(List[str], json_data) - result = response.decode() - assert result == json_data - assert isinstance(result, list) - assert all(isinstance(item, str) for item in result) - - -def test_decode_list_of_models(): - """Test decoding a list of models.""" - json_data = [{"value": "test1"}, {"value": "test2"}] - response = create_response(List[SimpleModel], json_data) - result = response.decode() - assert isinstance(result, list) - assert all(isinstance(item, SimpleModel) for item in result) - assert result[0].value == "test1" - assert result[1].value == "test2" - - -def test_decode_annotated_list(): - """Test decoding a list with length annotations.""" - json_data = ["item1", "item2", "item3"] - response = create_response( - Annotated[List[str], pydantic.Field(min_length=1, max_length=10)], - json_data, - ) - result = response.decode() - assert result == json_data - assert isinstance(result, list) - assert all(isinstance(item, str) for item in result) - - -def test_decode_dict(): - """Test decoding a dictionary.""" - json_data = {"key1": "value1", "key2": "value2"} - response = create_response(Dict[str, str], json_data) - result = response.decode() - assert result == json_data - assert isinstance(result, dict) - assert all(isinstance(key, str) and isinstance(value, str) for key, value in result.items()) - - -def test_decode_dict_with_model_values(): - """Test decoding a dictionary with model values.""" - json_data = {"key1": {"value": "test1"}, "key2": {"value": "test2"}} - response = create_response(Dict[str, SimpleModel], json_data) - result = response.decode() - assert isinstance(result, dict) - assert all( - isinstance(key, str) and isinstance(value, SimpleModel) for key, value in result.items() - ) - assert result["key1"].value == "test1" - assert result["key2"].value == "test2" - - -# ----- Tests for Special Types ----- - - -def test_decode_decimal(): - """Test decoding a decimal.Decimal.""" - json_data = "123.456" # Decimals are serialized as strings - response = create_response(decimal.Decimal, json_data) - result = response.decode() - assert isinstance(result, decimal.Decimal) - assert result == decimal.Decimal("123.456") - - -def test_decode_datetime(): - """Test decoding an AwareDatetime.""" - json_data = "2023-01-01T12:00:00Z" - response = create_response(AwareDatetime, json_data) - result = response.decode() - assert isinstance(result, datetime) - assert result.tzinfo is not None # Ensure it's timezone aware - assert result.year == 2023 - assert result.month == 1 - assert result.day == 1 - assert result.hour == 12 - - -def test_decode_date(): - """Test decoding a date.""" - json_data = "2023-01-01" - response = create_response(date, json_data) - result = response.decode() - assert isinstance(result, date) - assert result.year == 2023 - assert result.month == 1 - assert result.day == 1 - - -def test_decode_rid(): - """Test decoding a RID.""" - json_data = "ri.foundry.main.dataset.1234abcd" - response = create_response(RID, json_data) - result = response.decode() - assert isinstance(result, str) - assert result == json_data - - -def test_decode_uuid(): - """Test decoding a UUID.""" - json_data = "123e4567-e89b-12d3-a456-426614174000" - response = create_response(UUID, json_data) - result = response.decode() - assert isinstance(result, str) - assert result == json_data - - -def test_decode_long(): - """Test decoding a Long.""" - # Long values are typically integers that get serialized as strings in JSON - json_data = "9223372036854775807" # Max int64 value - response = create_response(Long, json_data) - result = response.decode() - assert isinstance(result, int) - assert result == 9223372036854775807 - - -# ----- Tests for Pydantic Models ----- - - -def test_decode_base_model(): - """Test decoding a simple BaseModel.""" - json_data = {"value": "test string"} - response = create_response(SimpleModel, json_data) - result = response.decode() - assert isinstance(result, SimpleModel) - assert result.value == "test string" - - -def test_decode_optional_base_model_present(): - """Test decoding Optional[BaseModel] when content is present.""" - json_data = {"value": "test string"} - response = create_response(Optional[SimpleModel], json_data) - result = response.decode() - assert isinstance(result, SimpleModel) - assert result.value == "test string" - - -def test_decode_optional_base_model_empty(): - """Test decoding Optional[BaseModel] when content is empty.""" - response = create_bytes_response(Optional[SimpleModel], b"") - result = response.decode() - assert result is None - - -def test_decode_annotated_base_model(): - """Test decoding an Annotated BaseModel.""" - json_data = {"value": "test string"} - response = create_response( - Annotated[SimpleModel, pydantic.Field(description="A test model")], - json_data, - ) - result = response.decode() - assert isinstance(result, SimpleModel) - assert result.value == "test string" - - -def test_decode_model_with_annotation(): - """Test decoding a model with annotated fields.""" - json_data = {"value": "test string"} - response = create_response(ModelWithAnnotation, json_data) - result = response.decode() - assert isinstance(result, ModelWithAnnotation) - assert result.value == "test string" - - -# ----- Tests for Union and Discriminated Types ----- - - -def test_decode_union_with_discriminator_running(): - """Test decoding a union type with discriminator (running status).""" - json_data = {"type": "RUNNING", "percent_complete": 75} - response = create_response(Status, json_data) - result = response.decode() - assert isinstance(result, RunningStatus) - assert result.type == "RUNNING" - assert result.percent_complete == 75 - - -def test_decode_union_with_discriminator_failed(): - """Test decoding a union type with discriminator (failed status).""" - json_data = {"type": "FAILED", "error_message": "Something went wrong"} - response = create_response(Status, json_data) - result = response.decode() - assert isinstance(result, FailedStatus) - assert result.type == "FAILED" - assert result.error_message == "Something went wrong" - - -def test_decode_union_with_discriminator_completed(): - """Test decoding a union type with discriminator (completed status).""" - json_data = {"type": "COMPLETED", "result": "Success!"} - response = create_response(Status, json_data) - result = response.decode() - assert isinstance(result, CompletedStatus) - assert result.type == "COMPLETED" - assert result.result == "Success!" - - -def test_decode_optional_union_with_discriminator_present(): - """Test decoding an Optional union type with discriminator when content is present.""" - json_data = {"type": "RUNNING", "percent_complete": 50} - response = create_response(OptionalStatus, json_data) - result = response.decode() - assert isinstance(result, RunningStatus) - assert result.type == "RUNNING" - assert result.percent_complete == 50 - - -def test_decode_optional_union_with_discriminator_empty(): - """Test decoding an Optional union type with discriminator when content is empty.""" - response = create_bytes_response(OptionalStatus, b"") - result = response.decode() - assert result is None - - -# ----- Tests for Nested and Complex Types ----- - - -def test_decode_annotated_optional_base_model(): - """Test decoding an Annotated Optional BaseModel.""" - json_data = {"value": "test string"} - response = create_response( - Annotated[Optional[SimpleModel], pydantic.Field(description="Optional model")], - json_data, - ) - result = response.decode() - assert isinstance(result, SimpleModel) - assert result.value == "test string" - - -def test_decode_optional_annotated_base_model(): - """Test decoding an Optional Annotated BaseModel.""" - json_data = {"value": "test string"} - response = create_response( - Optional[Annotated[SimpleModel, pydantic.Field(description="Annotated model")]], - json_data, - ) - result = response.decode() - assert isinstance(result, SimpleModel) - assert result.value == "test string" - - -def test_decode_optional_annotated_base_model_empty(): - """Test decoding an Optional Annotated BaseModel when content is empty.""" - response = create_bytes_response( - Optional[Annotated[SimpleModel, pydantic.Field(description="Annotated model")]], - b"", - ) - result = response.decode() - assert result is None - - -def test_decode_annotated_optional_annotated_base_model(): - """Test decoding an Annotated Optional Annotated BaseModel (deeply nested).""" - json_data = {"value": "test string"} - response = create_response( - Annotated[ - Optional[ - Annotated[ - SimpleModel, - pydantic.Field(description="Inner annotation"), - ] - ], - pydantic.Field(description="Outer annotation"), - ], - json_data, - ) - result = response.decode() - assert isinstance(result, SimpleModel) - assert result.value == "test string" - - -def test_decode_nested_unions(): - """Test decoding nested Union types.""" - json_data = {"type": "RUNNING", "percent_complete": 25} - nested_union = Union[Status, SimpleModel] - response = create_response(nested_union, json_data) - result = response.decode() - assert isinstance(result, RunningStatus) - assert result.type == "RUNNING" - assert result.percent_complete == 25 - - -def test_decode_list_of_optional_models(): - """Test decoding a list of optional models.""" - json_data = [{"value": "test1"}, None, {"value": "test3"}] - response = create_response(List[Optional[SimpleModel]], json_data) - result = response.decode() - assert isinstance(result, list) - assert isinstance(result[0], SimpleModel) - assert result[1] is None - assert isinstance(result[2], SimpleModel) - assert result[0].value == "test1" - assert result[2].value == "test3" - - -def test_decode_dict_with_complex_values(): - """Test decoding a dictionary with complex value types.""" - json_data = { - "model": {"value": "test"}, - "list": [1, 2, 3], - "nested": {"key": {"value": "nested value"}}, - } - response = create_response( - Dict[str, Union[SimpleModel, List[int], Dict[str, SimpleModel]]], - json_data, - ) - result = response.decode() - assert isinstance(result, dict) - assert isinstance(result["model"], SimpleModel) - assert isinstance(result["list"], list) - assert isinstance(result["nested"], dict) - assert isinstance(result["nested"]["key"], SimpleModel) - assert result["model"].value == "test" - assert result["list"] == [1, 2, 3] - assert result["nested"]["key"].value == "nested value" - - -# ----- Tests for Generic Types ----- - -T = TypeVar("T") - - -class GenericModel(pydantic.BaseModel, Generic[T]): - """A generic model for testing.""" - - value: T - - -def test_decode_generic_model(): - """Test decoding a generic model.""" - json_data = {"value": "test string"} - response = create_response(GenericModel[str], json_data) - result = response.decode() - assert isinstance(result, GenericModel) - assert result.value == "test string" - - json_data = {"value": 42} - response = create_response(GenericModel[int], json_data) - result = response.decode() - assert isinstance(result, GenericModel) - assert result.value == 42 - - -# ----- Tests for Type Mismatches ----- - - -def test_decode_string_when_int_expected(): - """Test decoding a string when an int was expected.""" - json_data = "not an integer" - response = create_response(int, json_data) - with pytest.raises(pydantic.ValidationError): - response.decode() - - -def test_decode_int_when_string_expected(): - """Test decoding an int when a string was expected.""" - json_data = 42 - response = create_response(str, json_data) - with pytest.raises(pydantic.ValidationError): - response.decode() - - -def test_decode_wrong_union_discriminator_value(): - """Test decoding a union with a discriminator value that doesn't match any option.""" - json_data = {"type": "UNKNOWN", "some_field": "value"} - response = create_response(Status, json_data) - with pytest.raises(pydantic.ValidationError): - response.decode() - - -def test_decode_missing_union_discriminator(): - """Test decoding a union with a missing discriminator field.""" - json_data = {"some_field": "value"} - response = create_response(Status, json_data) - with pytest.raises(pydantic.ValidationError): - response.decode() - - -def test_decode_list_with_wrong_element_type(): - """Test decoding a list where elements don't match expected type.""" - json_data = ["string", 123, True] # Mixed types - response = create_response(List[int], json_data) - with pytest.raises(pydantic.ValidationError): - response.decode() - - -def test_decode_model_missing_required_fields(): - """Test decoding a model with missing required fields.""" - json_data = {} # Missing required 'value' field - response = create_response(SimpleModel, json_data) - with pytest.raises(pydantic.ValidationError): - response.decode() - - -def test_decode_non_json_as_model(): - """Test decoding non-JSON data as a model.""" - response = create_bytes_response(SimpleModel, b"Not a JSON object") - with pytest.raises(json.JSONDecodeError): - response.decode() - - -def test_decode_wrong_datetime_format(): - """Test decoding a datetime with wrong format.""" - json_data = "01/01/2023" # Wrong format - response = create_response(AwareDatetime, json_data) - with pytest.raises(pydantic.ValidationError): - response.decode() - - -def test_decode_invalid_rid(): - """Test decoding an invalid RID.""" - json_data = "not-a-valid-rid" - response = create_response(RID, json_data) - with pytest.raises(pydantic.ValidationError): - response.decode() - - -def test_decode_dict_with_wrong_value_type(): - """Test decoding a dict with values of wrong type.""" - json_data = {"key1": 123, "key2": 456} # Numbers instead of strings - response = create_response(Dict[str, SimpleModel], json_data) - with pytest.raises(pydantic.ValidationError): - response.decode() - - -def test_decode_malformed_json_model(): - """Test decoding malformed JSON for a model.""" - json_data = {"value": {"nested": "object"}} # Value should be string not object - response = create_response(SimpleModel, json_data) - with pytest.raises(pydantic.ValidationError): - response.decode() - - -def test_decode_validation_error(): - """Test validation error when decoding a model with invalid data.""" - # This should fail validation because the value is too short (min_length=3) - json_data = {"value": "ab"} - response = create_response(ModelWithAnnotation, json_data) - - with pytest.raises(pydantic.ValidationError): - response.decode() - - -def test_decode_multiple_type_adapter_calls(): - """Test that the type adapter cache is working.""" - # Create multiple responses with the same type to test caching - json_data1 = {"type": "RUNNING", "percent_complete": 25} - json_data2 = {"type": "FAILED", "error_message": "Error message"} - - response1 = create_response(Status, json_data1) - result1 = response1.decode() - - response2 = create_response(Status, json_data2) - result2 = response2.decode() - - assert isinstance(result1, RunningStatus) - assert isinstance(result2, FailedStatus) - assert result1.type == "RUNNING" - assert result2.type == "FAILED" diff --git a/tests/test_utils.py b/tests/test_utils.py deleted file mode 100644 index 897ff663b..000000000 --- a/tests/test_utils.py +++ /dev/null @@ -1,185 +0,0 @@ -import typing -import warnings -from datetime import datetime -from datetime import timedelta -from datetime import timezone - -import pytest -import typing_extensions -from pydantic import BaseModel -from pydantic import ValidationError - -from foundry_sdk._core.utils import RID -from foundry_sdk._core.utils import UUID -from foundry_sdk._core.utils import AwareDatetime -from foundry_sdk._core.utils import Long -from foundry_sdk._core.utils import maybe_ignore_preview -from foundry_sdk._core.utils import remove_prefixes -from foundry_sdk._core.utils import resolve_forward_references - - -def test_remove_prefixes(): - assert remove_prefixes("http://example.com", ["https://", "http://"]) == "example.com" - assert remove_prefixes("https://example.com", ["https://", "http://"]) == "example.com" - assert remove_prefixes("example.com", ["https://", "http://"]) == "example.com" - - -def test_no_warning_when_preview_not_passed(): - @maybe_ignore_preview - def my_func_without_preview(preview: bool = False): - pass - - with warnings.catch_warnings(record=True) as w: - warnings.simplefilter("always") - my_func_without_preview() - assert len(w) == 0 # No warnings should be emitted - - -def test_no_warning_when_expected_preview(): - @maybe_ignore_preview - def my_func_without_preview(preview: bool = False): - pass - - with warnings.catch_warnings(record=True) as w: - warnings.simplefilter("always") - my_func_without_preview(preview=True) - assert len(w) == 0 # No warnings should be emitted - - -def test_warns_about_unexpected_preview(): - @maybe_ignore_preview - def my_func_without_preview(): - pass - - with pytest.warns( - UserWarning, - match=r'The "preview" argument is not required when calling my_func_without_preview\(\) since the endpoint is not in beta.', - ): - my_func_without_preview(preview=True) # type: ignore - - -def test_accepts_valid_rid(): - class WithRid(BaseModel): - rid: RID - - WithRid.model_validate({"rid": "ri.a.b.c.d"}) - WithRid.model_validate({"rid": "ri.foundry.main.dataset.b737e24d-6b19-43aa-93d5-da9fc4073f6"}) - - -def test_rejects_invalid_rid(): - class WithRid(BaseModel): - rid: RID - - with pytest.raises(ValidationError): - WithRid.model_validate({"rid": "ri.a.b.c"}) - - with pytest.raises(ValidationError): - WithRid.model_validate({"rid": "ri.foundry.main.0.b737e24d-6b19-43aa-93d5-da9fc4073f6"}) - - -def test_accepts_valid_uuid(): - class WithUuid(BaseModel): - uuid: UUID - - WithUuid.model_validate({"uuid": "b737e24d-6b19-43aa-93d5-da9fc4073f6e"}) - - -def test_rejects_invalid_uuid(): - class WithUuid(BaseModel): - uuid: UUID - - with pytest.raises(ValidationError): - WithUuid.model_validate({"uuid": "c"}) - - with pytest.raises(ValidationError): - WithUuid.model_validate({"uuid": "621f9a07-69e2-46c7-8015-c3bb8ee422e"}) - - -def test_accepts_valid_long(): - class WithLong(BaseModel): - long: Long - - WithLong.model_validate({"long": "1234"}) - WithLong.model_validate({"long": 1234}) - - -def test_rejects_invalid_long(): - class WithLong(BaseModel): - long: Long - - with pytest.raises(ValidationError): - WithLong.model_validate({"long": "a1234"}) - - -def test_long_serializes_to_string(): - class WithLong(BaseModel): - long: Long - - assert WithLong(long=123).model_dump_json() == '{"long":"123"}' - - -def test_accepts_valid_datetime(): - class WithDatetime(BaseModel): - datetime: AwareDatetime - - WithDatetime.model_validate({"datetime": datetime.now(timezone.utc)}) - - -def test_rejects_invalid_datetime(): - class WithDatetime(BaseModel): - datetime: AwareDatetime - - with pytest.raises(ValidationError): - WithDatetime.model_validate({"datetime": datetime.now()}) - - -def test_datetime_serializes_to_string(): - class WithDatetime(BaseModel): - datetime: AwareDatetime - - t = datetime(2023, 10, 1, 12, 0, 0, tzinfo=timezone.utc) - assert WithDatetime(datetime=t).model_dump_json() == '{"datetime":"2023-10-01T12:00:00+00:00"}' - - -def test_non_utc_datetime_serializes_to_utc_string(): - class WithDatetime(BaseModel): - datetime: AwareDatetime - - t = datetime(2023, 10, 1, 12, 0, 0, tzinfo=timezone(timedelta(hours=2))) - assert WithDatetime(datetime=t).model_dump_json() == '{"datetime":"2023-10-01T10:00:00+00:00"}' - - -def test_resolve_dict_forward_references(): - A = typing.Dict[str, "B"] - B = str - - assert A == typing.Dict[str, "B"] - resolve_forward_references(A, globals(), locals()) - assert A == typing.Dict[str, str] - - -def test_resolve_annotated_union_forward_references(): - A = typing_extensions.Annotated[typing.Union["B", "C"], "Foo Bar"] - B = str - C = int - - resolve_forward_references(A, globals(), locals()) - assert A == typing_extensions.Annotated[typing.Union[str, int], "Foo Bar"] - - -def test_resolve_duplicate_forward_references(): - A = typing.List["C"] - B = typing.List["C"] - C = typing.List[float] - - resolve_forward_references(B, globals(), locals()) - resolve_forward_references(A, globals(), locals()) - assert A == typing.List[typing.List[float]] - - -def test_resolve_double_forward_reference(): - A = typing.List[typing.List["B"]] - B = float - - resolve_forward_references(A, globals(), locals()) - assert A == typing.List[typing.List[float]] diff --git a/tox.ini b/tox.ini deleted file mode 100644 index 0ab32e3e8..000000000 --- a/tox.ini +++ /dev/null @@ -1,34 +0,0 @@ -[tox] -isolated_build = true -envlist = py{39,310,311,312}, pylint, mypy, black - -[testenv] -setenv = - PYTHONPATH = {toxinidir} -deps = - pydantic=={env:PYDANTIC_VERSION} - httpx=={env:HTTPX_VERSION} - pyright - click - polars - duckdb - pyarrow - annotated-types>=0.7.0,<1.0.0 - typing-extensions>=4.7.1,<5.0.0 - expects>=0.9.0 - mockito>=1.5.1 - pytest>=7.4.0 - pytest-asyncio>=0.23.0 - uvicorn>=0.34.0 - fastapi>=0.115.6 -allowlist_externals = poetry -commands = - poetry run pytest --tb=short tests/ - pyright foundry_sdk/ -passenv = PYDANTIC_VERSION,HTTPX_VERSION - -[testenv:black] -deps = - black == 24.1.1 -commands = - black --check foundry_sdk tests From 296ef1fc8a41f180f0d84b785656e9c66127855c Mon Sep 17 00:00:00 2001 From: overtonch Date: Tue, 10 Feb 2026 16:20:18 -0500 Subject: [PATCH 13/16] files --- assets/language_model_utils.py | 134 ++++++++++++++++++++++++++++ assets/test_language_model_utils.py | 131 +++++++++++++++++++++++++++ 2 files changed, 265 insertions(+) create mode 100644 assets/language_model_utils.py create mode 100644 assets/test_language_model_utils.py diff --git a/assets/language_model_utils.py b/assets/language_model_utils.py new file mode 100644 index 000000000..754ab412d --- /dev/null +++ b/assets/language_model_utils.py @@ -0,0 +1,134 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +from typing import Optional + +from foundry_sdk._core.config import Config +from foundry_sdk._core.context_and_environment_vars import HOSTNAME_VAR +from foundry_sdk._core.context_and_environment_vars import TOKEN_VAR +from foundry_sdk._core.http_client import HttpClient + + +def _get_api_gateway_base_url(*, preview: bool = False) -> str: + """Get the Foundry hostname from the current execution context. + + Args: + preview: Must be set to True to use this beta feature. + + Returns: + The Foundry API gateway base URL. + + Raises: + ValueError: If preview is not set to True. + RuntimeError: If the Foundry API gateway base URL is not available in the current context. + """ + if not preview: + raise ValueError( + "get_api_gateway_base_url() is in beta. " + "Please set the preview parameter to True to use it." + ) + hostname = HOSTNAME_VAR.get() + if hostname is None: + raise RuntimeError("Foundry API gateway base URL is not available in the current context.") + return hostname + + +def get_foundry_token(*, preview: bool = False) -> str: + """Get the Foundry token from the current execution context. + + Args: + preview: Must be set to True to use this beta feature. + + Returns: + The Foundry token. + + Raises: + ValueError: If preview is not set to True. + RuntimeError: If the Foundry token is not available in the current context. + """ + if not preview: + raise ValueError( + "get_foundry_token() is in beta. " "Please set the preview parameter to True to use it." + ) + token = TOKEN_VAR.get() + if token is None: + raise RuntimeError("Foundry token is not available in the current context.") + return token + + +def get_openai_base_url(*, preview: bool = False) -> str: + """Get the OpenAI proxy base URL for the current Foundry environment. + + Args: + preview: Must be set to True to use this beta feature. + + Returns: + The OpenAI proxy base URL. + + Raises: + ValueError: If preview is not set to True. + RuntimeError: If the Foundry API gateway base URL is not available in the current context. + """ + if not preview: + raise ValueError( + "get_openai_base_url() is in beta. " + "Please set the preview parameter to True to use it." + ) + hostname = _get_api_gateway_base_url(preview=True) + return f"https://{hostname}/api/v1/models/openai" + + +def get_anthropic_base_url(*, preview: bool = False) -> str: + """Get the Anthropic proxy base URL for the current Foundry environment. + + Args: + preview: Must be set to True to use this beta feature. + + Returns: + The Anthropic proxy base URL. + + Raises: + ValueError: If preview is not set to True. + RuntimeError: If the Foundry API gateway base URL is not available in the current context. + """ + if not preview: + raise ValueError( + "get_anthropic_base_url() is in beta. " + "Please set the preview parameter to True to use it." + ) + hostname = _get_api_gateway_base_url(preview=True) + return f"https://{hostname}/api/v1/models/anthropic" + + +def get_http_client(*, preview: bool = False, config: Optional[Config] = None) -> HttpClient: + """Get an HTTP client configured for the current Foundry environment. + + Args: + preview: Must be set to True to use this beta feature. + config: Optional configuration for the HTTP client. + + Returns: + An HttpClient instance configured with the Foundry hostname. + + Raises: + ValueError: If preview is not set to True. + RuntimeError: If the Foundry API gateway base URL is not available in the current context. + """ + if not preview: + raise ValueError( + "get_http_client() is in beta. " "Please set the preview parameter to True to use it." + ) + hostname = _get_api_gateway_base_url(preview=True) + return HttpClient(hostname=hostname, config=config) diff --git a/assets/test_language_model_utils.py b/assets/test_language_model_utils.py new file mode 100644 index 000000000..404fc6435 --- /dev/null +++ b/assets/test_language_model_utils.py @@ -0,0 +1,131 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import pytest + +from foundry_sdk._core.context_and_environment_vars import HOSTNAME_VAR +from foundry_sdk._core.context_and_environment_vars import TOKEN_VAR +from foundry_sdk._core.http_client import HttpClient +from foundry_sdk.v2.language_models import ( + get_anthropic_base_url, + get_foundry_token, + get_http_client, + get_openai_base_url, +) +from foundry_sdk.v2.language_models.utils import _get_api_gateway_base_url + + +class TestPreviewParameter: + """Test that all functions require preview=True.""" + + def test__get_api_gateway_base_url_requires_preview(self): + with pytest.raises(ValueError, match="preview parameter"): + _get_api_gateway_base_url() + + def test_get_foundry_token_requires_preview(self): + with pytest.raises(ValueError, match="preview parameter"): + get_foundry_token() + + def test_get_openai_base_url_requires_preview(self): + with pytest.raises(ValueError, match="preview parameter"): + get_openai_base_url() + + def test_get_anthropic_base_url_requires_preview(self): + with pytest.raises(ValueError, match="preview parameter"): + get_anthropic_base_url() + + def test_get_http_client_requires_preview(self): + with pytest.raises(ValueError, match="preview parameter"): + get_http_client() + + +class TestGetApiGatewayBaseUrl: + """Test _get_api_gateway_base_url function.""" + + def test_returns_hostname_from_context(self): + token = HOSTNAME_VAR.set("test.palantirfoundry.com") + try: + result = _get_api_gateway_base_url(preview=True) + assert result == "test.palantirfoundry.com" + finally: + HOSTNAME_VAR.reset(token) + + def test_raises_runtime_error_when_not_in_context(self): + with pytest.raises(RuntimeError, match="not available"): + _get_api_gateway_base_url(preview=True) + + +class TestGetFoundryToken: + """Test get_foundry_token function.""" + + def test_returns_token_from_context(self): + token = TOKEN_VAR.set("test-token-12345") + try: + result = get_foundry_token(preview=True) + assert result == "test-token-12345" + finally: + TOKEN_VAR.reset(token) + + def test_raises_runtime_error_when_not_in_context(self): + with pytest.raises(RuntimeError, match="not available"): + get_foundry_token(preview=True) + + +class TestGetOpenaiBaseUrl: + """Test get_openai_base_url function.""" + + def test_returns_correct_url(self): + token = HOSTNAME_VAR.set("test.palantirfoundry.com") + try: + result = get_openai_base_url(preview=True) + assert result == "https://test.palantirfoundry.com/api/v1/models/openai" + finally: + HOSTNAME_VAR.reset(token) + + def test_raises_runtime_error_when_not_in_context(self): + with pytest.raises(RuntimeError, match="not available"): + get_openai_base_url(preview=True) + + +class TestGetAnthropicBaseUrl: + """Test get_anthropic_base_url function.""" + + def test_returns_correct_url(self): + token = HOSTNAME_VAR.set("test.palantirfoundry.com") + try: + result = get_anthropic_base_url(preview=True) + assert result == "https://test.palantirfoundry.com/api/v1/models/anthropic" + finally: + HOSTNAME_VAR.reset(token) + + def test_raises_runtime_error_when_not_in_context(self): + with pytest.raises(RuntimeError, match="not available"): + get_anthropic_base_url(preview=True) + + +class TestGetHttpClient: + """Test get_http_client function.""" + + def test_returns_http_client(self): + token = HOSTNAME_VAR.set("test.palantirfoundry.com") + try: + result = get_http_client(preview=True) + assert isinstance(result, HttpClient) + finally: + HOSTNAME_VAR.reset(token) + + def test_raises_runtime_error_when_not_in_context(self): + with pytest.raises(RuntimeError, match="not available"): + get_http_client(preview=True) From a8a4386fbf7defd642ca478c0d4a1f8e3d162aac Mon Sep 17 00:00:00 2001 From: overtonch Date: Tue, 10 Feb 2026 16:30:36 -0500 Subject: [PATCH 14/16] fixes --- .bulldozer.yml | 17 + .changelog.yml | 3 + .circleci/config.yml | 189 + .gitignore | 5 + LICENSE | 202 + README.md | 3396 +++++ docs-snippets-npm/.gitignore | 20 + docs-snippets-npm/package.json | 33 + docs-snippets-npm/src/index.ts | 1739 +++ docs-snippets-npm/tsconfig.json | 16 + docs/v1/Core/models/AnyType.md | 11 + docs/v1/Core/models/AttachmentType.md | 11 + docs/v1/Core/models/Attribution.md | 11 + docs/v1/Core/models/BinaryType.md | 11 + docs/v1/Core/models/BooleanType.md | 11 + docs/v1/Core/models/ByteType.md | 11 + docs/v1/Core/models/CipherTextType.md | 12 + docs/v1/Core/models/ContentLength.md | 11 + docs/v1/Core/models/ContentType.md | 11 + docs/v1/Core/models/DateType.md | 11 + docs/v1/Core/models/DecimalType.md | 13 + docs/v1/Core/models/DisplayName.md | 11 + docs/v1/Core/models/DistanceUnit.md | 18 + docs/v1/Core/models/DoubleType.md | 11 + docs/v1/Core/models/FilePath.md | 12 + docs/v1/Core/models/Filename.md | 12 + docs/v1/Core/models/FloatType.md | 11 + docs/v1/Core/models/FolderRid.md | 11 + docs/v1/Core/models/FoundryBranch.md | 11 + docs/v1/Core/models/IntegerType.md | 11 + docs/v1/Core/models/LongType.md | 11 + docs/v1/Core/models/MarkingType.md | 11 + docs/v1/Core/models/MediaType.md | 13 + docs/v1/Core/models/NullType.md | 11 + docs/v1/Core/models/OperationScope.md | 11 + docs/v1/Core/models/PageSize.md | 11 + docs/v1/Core/models/PageToken.md | 14 + docs/v1/Core/models/PreviewMode.md | 11 + docs/v1/Core/models/ReleaseStatus.md | 13 + docs/v1/Core/models/ShortType.md | 11 + docs/v1/Core/models/SizeBytes.md | 11 + docs/v1/Core/models/StringType.md | 11 + docs/v1/Core/models/StructFieldName.md | 12 + docs/v1/Core/models/TimestampType.md | 11 + docs/v1/Core/models/TotalCount.md | 12 + docs/v1/Core/models/TraceParent.md | 11 + docs/v1/Core/models/TraceState.md | 11 + docs/v1/Core/models/UnsupportedType.md | 12 + docs/v1/Datasets/Branch.md | 222 + docs/v1/Datasets/Dataset.md | 420 + docs/v1/Datasets/File.md | 460 + docs/v1/Datasets/Transaction.md | 242 + docs/v1/Datasets/models/Branch.md | 13 + docs/v1/Datasets/models/BranchId.md | 12 + .../v1/Datasets/models/CreateBranchRequest.md | 12 + .../Datasets/models/CreateDatasetRequest.md | 12 + .../models/CreateTransactionRequest.md | 11 + docs/v1/Datasets/models/Dataset.md | 13 + docs/v1/Datasets/models/DatasetName.md | 11 + docs/v1/Datasets/models/DatasetRid.md | 12 + docs/v1/Datasets/models/File.md | 14 + .../Datasets/models/ListBranchesResponse.md | 12 + docs/v1/Datasets/models/ListFilesResponse.md | 12 + docs/v1/Datasets/models/TableExportFormat.md | 12 + docs/v1/Datasets/models/Transaction.md | 16 + docs/v1/Datasets/models/TransactionRid.md | 12 + docs/v1/Datasets/models/TransactionStatus.md | 13 + docs/v1/Datasets/models/TransactionType.md | 14 + docs/v1/Ontologies/Action.md | 209 + docs/v1/Ontologies/ActionType.md | 116 + docs/v1/Ontologies/Attachment.md | 167 + docs/v1/Ontologies/ObjectType.md | 233 + docs/v1/Ontologies/Ontology.md | 99 + docs/v1/Ontologies/OntologyObject.md | 484 + docs/v1/Ontologies/Query.md | 76 + docs/v1/Ontologies/QueryType.md | 116 + docs/v1/Ontologies/models/ActionRid.md | 11 + docs/v1/Ontologies/models/ActionType.md | 17 + .../v1/Ontologies/models/ActionTypeApiName.md | 13 + docs/v1/Ontologies/models/ActionTypeRid.md | 12 + .../models/AggregateObjectsRequest.md | 13 + .../models/AggregateObjectsResponse.md | 13 + .../models/AggregateObjectsResponseItem.md | 12 + docs/v1/Ontologies/models/Aggregation.md | 20 + .../models/AggregationDurationGrouping.md | 15 + .../models/AggregationExactGrouping.md | 13 + .../models/AggregationFixedWidthGrouping.md | 13 + .../Ontologies/models/AggregationGroupBy.md | 18 + .../Ontologies/models/AggregationGroupKey.md | 11 + .../models/AggregationGroupValue.md | 11 + .../models/AggregationMetricName.md | 11 + .../models/AggregationMetricResult.md | 12 + docs/v1/Ontologies/models/AggregationRange.md | 14 + .../models/AggregationRangesGrouping.md | 13 + docs/v1/Ontologies/models/AllTermsQuery.md | 16 + docs/v1/Ontologies/models/AndQuery.md | 12 + docs/v1/Ontologies/models/AnyTermQuery.md | 16 + docs/v1/Ontologies/models/ApplyActionMode.md | 11 + .../Ontologies/models/ApplyActionRequest.md | 11 + .../models/ApplyActionRequestOptions.md | 12 + .../Ontologies/models/ApplyActionResponse.md | 10 + .../models/ApproximateDistinctAggregation.md | 13 + .../models/ArrayEntryEvaluatedConstraint.md | 11 + .../models/ArrayEvaluatedConstraint.md | 12 + .../Ontologies/models/ArraySizeConstraint.md | 16 + .../models/ArtifactRepositoryRid.md | 11 + docs/v1/Ontologies/models/Attachment.md | 14 + docs/v1/Ontologies/models/AttachmentRid.md | 11 + docs/v1/Ontologies/models/AvgAggregation.md | 13 + .../models/BatchApplyActionRequest.md | 11 + .../models/BatchApplyActionResponse.md | 10 + docs/v1/Ontologies/models/ContainsQuery.md | 13 + docs/v1/Ontologies/models/CountAggregation.md | 12 + .../models/CreateInterfaceObjectRule.md | 12 + docs/v1/Ontologies/models/CreateLinkRule.md | 15 + docs/v1/Ontologies/models/CreateObjectRule.md | 12 + docs/v1/Ontologies/models/DataValue.md | 39 + .../models/DeleteInterfaceObjectRule.md | 12 + docs/v1/Ontologies/models/DeleteLinkRule.md | 15 + docs/v1/Ontologies/models/DeleteObjectRule.md | 12 + .../models/DerivedPropertyApiName.md | 12 + docs/v1/Ontologies/models/Duration.md | 11 + docs/v1/Ontologies/models/EntrySetType.md | 13 + docs/v1/Ontologies/models/EqualsQuery.md | 13 + .../Ontologies/models/ExecuteQueryRequest.md | 11 + .../Ontologies/models/ExecuteQueryResponse.md | 11 + docs/v1/Ontologies/models/FieldNameV1.md | 11 + docs/v1/Ontologies/models/FilterValue.md | 13 + docs/v1/Ontologies/models/FunctionRid.md | 12 + docs/v1/Ontologies/models/FunctionVersion.md | 13 + docs/v1/Ontologies/models/Fuzzy.md | 11 + .../models/GroupMemberConstraint.md | 12 + docs/v1/Ontologies/models/GtQuery.md | 13 + docs/v1/Ontologies/models/GteQuery.md | 13 + .../models/InterfaceLinkTypeApiName.md | 13 + .../Ontologies/models/InterfaceLinkTypeRid.md | 12 + .../models/InterfacePropertyApiName.md | 14 + .../Ontologies/models/InterfaceTypeApiName.md | 13 + docs/v1/Ontologies/models/InterfaceTypeRid.md | 11 + docs/v1/Ontologies/models/IsNullQuery.md | 13 + .../Ontologies/models/LegacyObjectTypeId.md | 13 + docs/v1/Ontologies/models/LegacyPropertyId.md | 13 + docs/v1/Ontologies/models/LinkTypeApiName.md | 13 + docs/v1/Ontologies/models/LinkTypeId.md | 12 + docs/v1/Ontologies/models/LinkTypeSide.md | 16 + .../models/LinkTypeSideCardinality.md | 11 + .../models/ListActionTypesResponse.md | 12 + .../models/ListLinkedObjectsResponse.md | 12 + .../models/ListObjectTypesResponse.md | 12 + .../Ontologies/models/ListObjectsResponse.md | 13 + .../models/ListOntologiesResponse.md | 11 + .../models/ListOutgoingLinkTypesResponse.md | 12 + .../models/ListQueryTypesResponse.md | 12 + docs/v1/Ontologies/models/LogicRule.md | 22 + docs/v1/Ontologies/models/LtQuery.md | 13 + docs/v1/Ontologies/models/LteQuery.md | 13 + docs/v1/Ontologies/models/MaxAggregation.md | 13 + docs/v1/Ontologies/models/MinAggregation.md | 13 + .../models/ModifyInterfaceObjectRule.md | 12 + docs/v1/Ontologies/models/ModifyObjectRule.md | 12 + docs/v1/Ontologies/models/NotQuery.md | 12 + .../models/ObjectPropertyValueConstraint.md | 12 + .../models/ObjectQueryResultConstraint.md | 12 + docs/v1/Ontologies/models/ObjectRid.md | 12 + docs/v1/Ontologies/models/ObjectSetRid.md | 11 + docs/v1/Ontologies/models/ObjectType.md | 19 + .../v1/Ontologies/models/ObjectTypeApiName.md | 13 + docs/v1/Ontologies/models/ObjectTypeRid.md | 11 + .../Ontologies/models/ObjectTypeVisibility.md | 12 + docs/v1/Ontologies/models/OneOfConstraint.md | 14 + docs/v1/Ontologies/models/Ontology.md | 14 + docs/v1/Ontologies/models/OntologyApiName.md | 11 + .../v1/Ontologies/models/OntologyArrayType.md | 12 + docs/v1/Ontologies/models/OntologyDataType.md | 37 + .../models/OntologyInterfaceObjectSetType.md | 12 + .../models/OntologyInterfaceObjectType.md | 12 + docs/v1/Ontologies/models/OntologyMapType.md | 13 + docs/v1/Ontologies/models/OntologyObject.md | 12 + .../models/OntologyObjectSetType.md | 13 + .../Ontologies/models/OntologyObjectType.md | 13 + docs/v1/Ontologies/models/OntologyRid.md | 13 + docs/v1/Ontologies/models/OntologySetType.md | 12 + .../Ontologies/models/OntologyStructField.md | 13 + .../Ontologies/models/OntologyStructType.md | 12 + docs/v1/Ontologies/models/OrQuery.md | 12 + docs/v1/Ontologies/models/OrderBy.md | 21 + docs/v1/Ontologies/models/Parameter.md | 14 + .../models/ParameterEvaluatedConstraint.md | 42 + .../models/ParameterEvaluationResult.md | 13 + docs/v1/Ontologies/models/ParameterId.md | 13 + docs/v1/Ontologies/models/ParameterOption.md | 13 + docs/v1/Ontologies/models/PhraseQuery.md | 13 + docs/v1/Ontologies/models/PrefixQuery.md | 13 + docs/v1/Ontologies/models/PrimaryKeyValue.md | 11 + docs/v1/Ontologies/models/Property.md | 14 + docs/v1/Ontologies/models/PropertyApiName.md | 13 + docs/v1/Ontologies/models/PropertyFilter.md | 36 + docs/v1/Ontologies/models/PropertyId.md | 13 + docs/v1/Ontologies/models/PropertyTypeRid.md | 11 + docs/v1/Ontologies/models/PropertyValue.md | 37 + .../models/PropertyValueEscapedString.md | 11 + .../models/QueryAggregationKeyType.md | 22 + .../models/QueryAggregationRangeSubType.md | 19 + .../models/QueryAggregationRangeType.md | 12 + .../models/QueryAggregationValueType.md | 18 + docs/v1/Ontologies/models/QueryApiName.md | 12 + docs/v1/Ontologies/models/QueryArrayType.md | 12 + docs/v1/Ontologies/models/QueryDataType.md | 37 + .../models/QueryRuntimeErrorParameter.md | 11 + docs/v1/Ontologies/models/QuerySetType.md | 12 + docs/v1/Ontologies/models/QueryStructField.md | 12 + docs/v1/Ontologies/models/QueryStructType.md | 12 + docs/v1/Ontologies/models/QueryType.md | 17 + docs/v1/Ontologies/models/QueryUnionType.md | 12 + docs/v1/Ontologies/models/RangeConstraint.md | 16 + docs/v1/Ontologies/models/ReturnEditsMode.md | 12 + docs/v1/Ontologies/models/SdkPackageName.md | 11 + docs/v1/Ontologies/models/SdkPackageRid.md | 11 + docs/v1/Ontologies/models/SdkVersion.md | 11 + docs/v1/Ontologies/models/SearchJsonQuery.md | 28 + .../Ontologies/models/SearchObjectsRequest.md | 15 + .../models/SearchObjectsResponse.md | 13 + docs/v1/Ontologies/models/SearchOrderBy.md | 11 + .../v1/Ontologies/models/SearchOrderByType.md | 11 + docs/v1/Ontologies/models/SearchOrdering.md | 12 + .../models/SelectedPropertyApiName.md | 30 + .../models/SharedPropertyTypeApiName.md | 13 + .../models/SharedPropertyTypeRid.md | 12 + .../models/StringLengthConstraint.md | 17 + .../models/StringRegexMatchConstraint.md | 14 + .../models/StructEvaluatedConstraint.md | 12 + .../models/StructFieldEvaluatedConstraint.md | 32 + .../models/StructFieldEvaluationResult.md | 13 + .../models/StructParameterFieldApiName.md | 12 + .../models/SubmissionCriteriaEvaluation.md | 15 + docs/v1/Ontologies/models/SumAggregation.md | 13 + .../models/ThreeDimensionalAggregation.md | 13 + .../models/TwoDimensionalAggregation.md | 13 + .../models/UnevaluableConstraint.md | 13 + .../models/UniqueIdentifierLinkId.md | 12 + .../models/ValidateActionRequest.md | 11 + .../models/ValidateActionResponse.md | 13 + docs/v1/Ontologies/models/ValidationResult.md | 12 + docs/v1/Ontologies/models/ValueType.md | 34 + docs/v1/Ontologies/models/ValueTypeApiName.md | 11 + docs/v1/Ontologies/models/ValueTypeRid.md | 11 + docs/v2/Admin/AuthenticationProvider.md | 278 + docs/v2/Admin/Enrollment.md | 105 + docs/v2/Admin/EnrollmentRoleAssignment.md | 183 + docs/v2/Admin/Group.md | 329 + docs/v2/Admin/GroupMember.md | 177 + docs/v2/Admin/GroupMembership.md | 70 + .../Admin/GroupMembershipExpirationPolicy.md | 115 + docs/v2/Admin/GroupProviderInfo.md | 112 + docs/v2/Admin/Host.md | 65 + docs/v2/Admin/Marking.md | 295 + docs/v2/Admin/MarkingCategory.md | 111 + docs/v2/Admin/MarkingMember.md | 169 + docs/v2/Admin/MarkingRoleAssignment.md | 167 + docs/v2/Admin/Organization.md | 240 + docs/v2/Admin/OrganizationRoleAssignment.md | 183 + docs/v2/Admin/Role.md | 109 + docs/v2/Admin/User.md | 462 + docs/v2/Admin/UserProviderInfo.md | 112 + .../AddEnrollmentRoleAssignmentsRequest.md | 11 + .../v2/Admin/models/AddGroupMembersRequest.md | 12 + .../Admin/models/AddMarkingMembersRequest.md | 11 + .../AddMarkingRoleAssignmentsRequest.md | 11 + .../AddOrganizationRoleAssignmentsRequest.md | 11 + docs/v2/Admin/models/AttributeName.md | 11 + docs/v2/Admin/models/AttributeValue.md | 11 + docs/v2/Admin/models/AttributeValues.md | 11 + .../v2/Admin/models/AuthenticationProtocol.md | 16 + .../v2/Admin/models/AuthenticationProvider.md | 17 + .../models/AuthenticationProviderEnabled.md | 11 + .../models/AuthenticationProviderName.md | 11 + .../Admin/models/AuthenticationProviderRid.md | 11 + docs/v2/Admin/models/CertificateInfo.md | 14 + docs/v2/Admin/models/CertificateUsageType.md | 12 + docs/v2/Admin/models/CreateGroupRequest.md | 14 + docs/v2/Admin/models/CreateMarkingRequest.md | 15 + .../Admin/models/CreateOrganizationRequest.md | 15 + docs/v2/Admin/models/Enrollment.md | 13 + docs/v2/Admin/models/EnrollmentName.md | 11 + .../Admin/models/EnrollmentRoleAssignment.md | 13 + .../models/GetGroupsBatchRequestElement.md | 11 + .../v2/Admin/models/GetGroupsBatchResponse.md | 11 + .../models/GetMarkingsBatchRequestElement.md | 11 + .../Admin/models/GetMarkingsBatchResponse.md | 11 + .../models/GetRolesBatchRequestElement.md | 11 + docs/v2/Admin/models/GetRolesBatchResponse.md | 11 + .../Admin/models/GetUserMarkingsResponse.md | 11 + .../models/GetUsersBatchRequestElement.md | 12 + docs/v2/Admin/models/GetUsersBatchResponse.md | 11 + docs/v2/Admin/models/Group.md | 16 + docs/v2/Admin/models/GroupMember.md | 12 + docs/v2/Admin/models/GroupMembership.md | 11 + .../Admin/models/GroupMembershipExpiration.md | 11 + .../models/GroupMembershipExpirationPolicy.md | 12 + docs/v2/Admin/models/GroupName.md | 11 + docs/v2/Admin/models/GroupProviderInfo.md | 11 + docs/v2/Admin/models/GroupSearchFilter.md | 12 + docs/v2/Admin/models/Host.md | 11 + docs/v2/Admin/models/HostName.md | 11 + .../ListAuthenticationProvidersResponse.md | 12 + .../ListAvailableOrganizationRolesResponse.md | 11 + .../ListEnrollmentRoleAssignmentsResponse.md | 12 + .../Admin/models/ListGroupMembersResponse.md | 12 + .../models/ListGroupMembershipsResponse.md | 12 + docs/v2/Admin/models/ListGroupsResponse.md | 12 + docs/v2/Admin/models/ListHostsResponse.md | 12 + .../models/ListMarkingCategoriesResponse.md | 12 + .../models/ListMarkingMembersResponse.md | 12 + .../ListMarkingRoleAssignmentsResponse.md | 12 + docs/v2/Admin/models/ListMarkingsResponse.md | 12 + ...ListOrganizationRoleAssignmentsResponse.md | 12 + docs/v2/Admin/models/ListUsersResponse.md | 12 + docs/v2/Admin/models/Marking.md | 17 + docs/v2/Admin/models/MarkingCategory.md | 18 + docs/v2/Admin/models/MarkingCategoryId.md | 13 + docs/v2/Admin/models/MarkingCategoryName.md | 11 + docs/v2/Admin/models/MarkingCategoryType.md | 11 + docs/v2/Admin/models/MarkingMember.md | 12 + docs/v2/Admin/models/MarkingName.md | 11 + docs/v2/Admin/models/MarkingRole.md | 16 + docs/v2/Admin/models/MarkingRoleAssignment.md | 13 + docs/v2/Admin/models/MarkingRoleUpdate.md | 12 + docs/v2/Admin/models/MarkingType.md | 11 + .../models/OidcAuthenticationProtocol.md | 11 + docs/v2/Admin/models/Organization.md | 15 + docs/v2/Admin/models/OrganizationName.md | 11 + .../models/OrganizationRoleAssignment.md | 13 + .../Admin/models/PreregisterGroupRequest.md | 12 + .../v2/Admin/models/PreregisterUserRequest.md | 16 + docs/v2/Admin/models/PrincipalFilterType.md | 10 + docs/v2/Admin/models/ProviderId.md | 12 + .../RemoveEnrollmentRoleAssignmentsRequest.md | 11 + .../Admin/models/RemoveGroupMembersRequest.md | 11 + .../models/RemoveMarkingMembersRequest.md | 11 + .../RemoveMarkingRoleAssignmentsRequest.md | 11 + ...emoveOrganizationRoleAssignmentsRequest.md | 11 + ...eGroupMembershipExpirationPolicyRequest.md | 12 + .../models/ReplaceGroupProviderInfoRequest.md | 11 + docs/v2/Admin/models/ReplaceMarkingRequest.md | 12 + .../models/ReplaceOrganizationRequest.md | 13 + .../models/ReplaceUserProviderInfoRequest.md | 11 + docs/v2/Admin/models/Role.md | 15 + docs/v2/Admin/models/RoleDescription.md | 11 + docs/v2/Admin/models/RoleDisplayName.md | 11 + .../models/SamlAuthenticationProtocol.md | 12 + .../models/SamlServiceProviderMetadata.md | 15 + docs/v2/Admin/models/SearchGroupsRequest.md | 13 + docs/v2/Admin/models/SearchGroupsResponse.md | 12 + docs/v2/Admin/models/SearchUsersRequest.md | 13 + docs/v2/Admin/models/SearchUsersResponse.md | 12 + docs/v2/Admin/models/User.md | 19 + docs/v2/Admin/models/UserProviderInfo.md | 11 + docs/v2/Admin/models/UserSearchFilter.md | 12 + docs/v2/Admin/models/UserUsername.md | 11 + docs/v2/AipAgents/Agent.md | 116 + docs/v2/AipAgents/AgentVersion.md | 121 + docs/v2/AipAgents/Content.md | 61 + docs/v2/AipAgents/Session.md | 614 + docs/v2/AipAgents/SessionTrace.md | 67 + docs/v2/AipAgents/models/Agent.md | 14 + .../AipAgents/models/AgentMarkdownResponse.md | 11 + docs/v2/AipAgents/models/AgentMetadata.md | 14 + docs/v2/AipAgents/models/AgentRid.md | 11 + .../models/AgentSessionRagContextResponse.md | 13 + docs/v2/AipAgents/models/AgentVersion.md | 12 + .../AipAgents/models/AgentVersionDetails.md | 12 + .../v2/AipAgents/models/AgentVersionString.md | 11 + .../v2/AipAgents/models/AgentsSessionsPage.md | 14 + .../models/BlockingContinueSessionRequest.md | 14 + .../AipAgents/models/CancelSessionRequest.md | 12 + .../AipAgents/models/CancelSessionResponse.md | 11 + docs/v2/AipAgents/models/Content.md | 11 + .../AipAgents/models/CreateSessionRequest.md | 11 + .../AipAgents/models/FailureToolCallOutput.md | 12 + .../models/FunctionRetrievedContext.md | 15 + .../models/GetRagContextForSessionRequest.md | 12 + docs/v2/AipAgents/models/InputContext.md | 17 + .../models/ListAgentVersionsResponse.md | 12 + .../AipAgents/models/ListSessionsResponse.md | 12 + docs/v2/AipAgents/models/MessageId.md | 13 + docs/v2/AipAgents/models/ObjectContext.md | 14 + .../v2/AipAgents/models/ObjectSetParameter.md | 12 + .../models/ObjectSetParameterValue.md | 13 + .../models/ObjectSetParameterValueUpdate.md | 12 + docs/v2/AipAgents/models/Parameter.md | 14 + .../AipAgents/models/ParameterAccessMode.md | 13 + docs/v2/AipAgents/models/ParameterId.md | 12 + docs/v2/AipAgents/models/ParameterType.md | 16 + docs/v2/AipAgents/models/ParameterValue.md | 17 + .../AipAgents/models/ParameterValueUpdate.md | 19 + docs/v2/AipAgents/models/RidToolInputValue.md | 12 + .../v2/AipAgents/models/RidToolOutputValue.md | 12 + docs/v2/AipAgents/models/Session.md | 14 + docs/v2/AipAgents/models/SessionExchange.md | 13 + .../models/SessionExchangeContexts.md | 13 + .../AipAgents/models/SessionExchangeResult.md | 15 + docs/v2/AipAgents/models/SessionMetadata.md | 15 + docs/v2/AipAgents/models/SessionRid.md | 11 + docs/v2/AipAgents/models/SessionTrace.md | 14 + docs/v2/AipAgents/models/SessionTraceId.md | 13 + .../v2/AipAgents/models/SessionTraceStatus.md | 11 + .../models/StreamingContinueSessionRequest.md | 15 + docs/v2/AipAgents/models/StringParameter.md | 12 + .../AipAgents/models/StringParameterValue.md | 12 + .../AipAgents/models/StringToolInputValue.md | 12 + .../AipAgents/models/StringToolOutputValue.md | 12 + .../AipAgents/models/SuccessToolCallOutput.md | 12 + docs/v2/AipAgents/models/ToolCall.md | 13 + docs/v2/AipAgents/models/ToolCallGroup.md | 12 + docs/v2/AipAgents/models/ToolCallInput.md | 12 + docs/v2/AipAgents/models/ToolCallOutput.md | 16 + docs/v2/AipAgents/models/ToolInputName.md | 11 + docs/v2/AipAgents/models/ToolInputValue.md | 16 + docs/v2/AipAgents/models/ToolMetadata.md | 12 + docs/v2/AipAgents/models/ToolOutputValue.md | 16 + docs/v2/AipAgents/models/ToolType.md | 17 + .../models/UpdateSessionTitleRequest.md | 11 + docs/v2/AipAgents/models/UserTextInput.md | 11 + docs/v2/Audit/LogFile.md | 123 + docs/v2/Audit/Organization.md | 5 + docs/v2/Audit/models/FileId.md | 11 + docs/v2/Audit/models/ListLogFilesResponse.md | 12 + docs/v2/Audit/models/LogFile.md | 11 + docs/v2/Connectivity/Connection.md | 424 + docs/v2/Connectivity/FileImport.md | 390 + docs/v2/Connectivity/TableImport.md | 390 + docs/v2/Connectivity/VirtualTable.md | 77 + .../models/ApiKeyAuthentication.md | 15 + .../Connectivity/models/AsPlaintextValue.md | 12 + docs/v2/Connectivity/models/AsSecretName.md | 12 + docs/v2/Connectivity/models/AwsAccessKey.md | 18 + .../models/AwsOidcAuthentication.md | 16 + .../Connectivity/models/BasicCredentials.md | 13 + docs/v2/Connectivity/models/BearerToken.md | 12 + .../models/BigQueryVirtualTableConfig.md | 14 + docs/v2/Connectivity/models/CloudIdentity.md | 14 + .../Connectivity/models/CloudIdentityRid.md | 12 + docs/v2/Connectivity/models/Connection.md | 16 + .../models/ConnectionConfiguration.md | 20 + .../models/ConnectionDisplayName.md | 11 + .../models/ConnectionExportSettings.md | 13 + docs/v2/Connectivity/models/ConnectionRid.md | 12 + .../Connectivity/models/ConnectionWorker.md | 18 + .../models/CreateConnectionRequest.md | 14 + ...CreateConnectionRequestAsPlaintextValue.md | 12 + .../CreateConnectionRequestAsSecretName.md | 12 + ...CreateConnectionRequestBasicCredentials.md | 13 + ...onnectionRequestConnectionConfiguration.md | 20 + ...CreateConnectionRequestConnectionWorker.md | 18 + ...tionRequestDatabricksAuthenticationMode.md | 18 + ...equestDatabricksConnectionConfiguration.md | 15 + ...reateConnectionRequestEncryptedProperty.md | 21 + .../CreateConnectionRequestFoundryWorker.md | 12 + ...ctionRequestJdbcConnectionConfiguration.md | 15 + ...nectionRequestOauthMachineToMachineAuth.md | 13 + ...ateConnectionRequestPersonalAccessToken.md | 12 + ...ctionRequestRestConnectionConfiguration.md | 14 + ...nectionRequestS3ConnectionConfiguration.md | 25 + .../models/CreateConnectionRequestSmbAuth.md | 11 + ...ectionRequestSmbConnectionConfiguration.md | 18 + ...onnectionRequestSmbUsernamePasswordAuth.md | 14 + ...ctionRequestSnowflakeAuthenticationMode.md | 17 + ...RequestSnowflakeConnectionConfiguration.md | 18 + ...ConnectionRequestSnowflakeExternalOauth.md | 11 + ...onRequestSnowflakeKeyPairAuthentication.md | 13 + .../CreateConnectionRequestUnknownWorker.md | 11 + ...ectionRequestWorkflowIdentityFederation.md | 13 + .../models/CreateFileImportRequest.md | 16 + .../models/CreateTableImportRequest.md | 16 + ...mportRequestDatabricksTableImportConfig.md | 13 + ...TableImportRequestJdbcTableImportConfig.md | 13 + ...RequestMicrosoftAccessTableImportConfig.md | 13 + ...uestMicrosoftSqlServerTableImportConfig.md | 13 + ...bleImportRequestOracleTableImportConfig.md | 13 + ...mportRequestPostgreSqlTableImportConfig.md | 13 + ...ImportRequestSnowflakeTableImportConfig.md | 13 + ...eateTableImportRequestTableImportConfig.md | 22 + .../models/CreateVirtualTableRequest.md | 14 + .../models/DatabricksAuthenticationMode.md | 18 + .../DatabricksConnectionConfiguration.md | 18 + .../models/DatabricksTableImportConfig.md | 14 + .../DateColumnInitialIncrementalState.md | 14 + .../DecimalColumnInitialIncrementalState.md | 14 + .../models/DeltaVirtualTableConfig.md | 12 + docs/v2/Connectivity/models/Domain.md | 14 + .../Connectivity/models/EncryptedProperty.md | 21 + .../models/FileAnyPathMatchesFilter.md | 13 + .../models/FileAtLeastCountFilter.md | 12 + .../FileChangedSinceLastUploadFilter.md | 14 + docs/v2/Connectivity/models/FileFormat.md | 13 + docs/v2/Connectivity/models/FileImport.md | 18 + .../models/FileImportCustomFilter.md | 14 + .../models/FileImportDisplayName.md | 11 + .../Connectivity/models/FileImportFilter.md | 25 + docs/v2/Connectivity/models/FileImportMode.md | 17 + docs/v2/Connectivity/models/FileImportRid.md | 12 + .../models/FileLastModifiedAfterFilter.md | 13 + .../models/FilePathMatchesFilter.md | 22 + .../models/FilePathNotMatchesFilter.md | 23 + docs/v2/Connectivity/models/FileProperty.md | 11 + docs/v2/Connectivity/models/FileSizeFilter.md | 16 + .../models/FilesCountLimitFilter.md | 15 + .../models/FilesVirtualTableConfig.md | 13 + docs/v2/Connectivity/models/FoundryWorker.md | 16 + ...igurationConnectionsBatchRequestElement.md | 11 + ...etConfigurationConnectionsBatchResponse.md | 11 + .../models/GlueVirtualTableConfig.md | 13 + docs/v2/Connectivity/models/HeaderApiKey.md | 12 + .../models/IcebergVirtualTableConfig.md | 13 + .../IntegerColumnInitialIncrementalState.md | 14 + .../models/InvalidConnectionReason.md | 71 + .../models/JdbcConnectionConfiguration.md | 17 + .../models/JdbcDriverArtifactName.md | 12 + docs/v2/Connectivity/models/JdbcProperties.md | 15 + .../models/JdbcTableImportConfig.md | 14 + .../models/ListFileImportsResponse.md | 12 + .../models/ListTableImportsResponse.md | 12 + .../LongColumnInitialIncrementalState.md | 14 + .../MicrosoftAccessTableImportConfig.md | 14 + .../MicrosoftSqlServerTableImportConfig.md | 14 + .../models/NetworkEgressPolicyRid.md | 12 + .../models/OauthMachineToMachineAuth.md | 16 + .../models/OracleTableImportConfig.md | 14 + .../models/PersonalAccessToken.md | 14 + docs/v2/Connectivity/models/PlaintextValue.md | 11 + .../models/PostgreSqlTableImportConfig.md | 14 + docs/v2/Connectivity/models/Protocol.md | 11 + .../models/QueryParameterApiKey.md | 12 + docs/v2/Connectivity/models/Region.md | 12 + .../models/ReplaceFileImportRequest.md | 14 + .../models/ReplaceTableImportRequest.md | 14 + ...mportRequestDatabricksTableImportConfig.md | 13 + ...TableImportRequestJdbcTableImportConfig.md | 13 + ...RequestMicrosoftAccessTableImportConfig.md | 13 + ...uestMicrosoftSqlServerTableImportConfig.md | 13 + ...bleImportRequestOracleTableImportConfig.md | 13 + ...mportRequestPostgreSqlTableImportConfig.md | 13 + ...ImportRequestSnowflakeTableImportConfig.md | 13 + ...laceTableImportRequestTableImportConfig.md | 22 + .../models/RestAuthenticationMode.md | 18 + .../models/RestConnectionAdditionalSecrets.md | 18 + .../models/RestConnectionConfiguration.md | 14 + .../models/RestConnectionOAuth2.md | 13 + .../models/RestRequestApiKeyLocation.md | 16 + .../models/S3AuthenticationMode.md | 17 + .../models/S3ConnectionConfiguration.md | 27 + .../Connectivity/models/S3KmsConfiguration.md | 12 + .../models/S3ProxyConfiguration.md | 15 + docs/v2/Connectivity/models/SecretName.md | 11 + docs/v2/Connectivity/models/SecretsNames.md | 14 + .../models/SecretsWithPlaintextValues.md | 14 + docs/v2/Connectivity/models/SmbAuth.md | 11 + .../models/SmbConnectionConfiguration.md | 18 + .../models/SmbProxyConfiguration.md | 13 + docs/v2/Connectivity/models/SmbProxyType.md | 11 + .../models/SmbUsernamePasswordAuth.md | 14 + .../models/SnowflakeAuthenticationMode.md | 17 + .../SnowflakeConnectionConfiguration.md | 19 + .../models/SnowflakeExternalOauth.md | 17 + .../models/SnowflakeKeyPairAuthentication.md | 16 + .../models/SnowflakeTableImportConfig.md | 14 + .../models/SnowflakeVirtualTableConfig.md | 14 + .../StringColumnInitialIncrementalState.md | 14 + .../models/StsRoleConfiguration.md | 15 + docs/v2/Connectivity/models/TableImport.md | 18 + .../models/TableImportAllowSchemaChanges.md | 11 + .../Connectivity/models/TableImportConfig.md | 22 + .../models/TableImportDisplayName.md | 11 + .../TableImportInitialIncrementalState.md | 27 + .../v2/Connectivity/models/TableImportMode.md | 15 + .../Connectivity/models/TableImportQuery.md | 14 + docs/v2/Connectivity/models/TableImportRid.md | 12 + docs/v2/Connectivity/models/TableName.md | 12 + docs/v2/Connectivity/models/TableRid.md | 12 + .../TimestampColumnInitialIncrementalState.md | 13 + .../models/UnityVirtualTableConfig.md | 14 + docs/v2/Connectivity/models/UnknownWorker.md | 15 + ...pdateExportSettingsForConnectionRequest.md | 11 + .../UpdateSecretsForConnectionRequest.md | 11 + docs/v2/Connectivity/models/UriScheme.md | 11 + docs/v2/Connectivity/models/VirtualTable.md | 15 + .../Connectivity/models/VirtualTableConfig.md | 21 + .../models/WorkflowIdentityFederation.md | 20 + docs/v2/Core/models/AnyType.md | 11 + docs/v2/Core/models/ArrayFieldType.md | 12 + docs/v2/Core/models/AttachmentType.md | 11 + docs/v2/Core/models/Attribution.md | 11 + docs/v2/Core/models/BinaryType.md | 11 + docs/v2/Core/models/BooleanType.md | 11 + docs/v2/Core/models/BranchMetadata.md | 11 + docs/v2/Core/models/BuildRid.md | 11 + docs/v2/Core/models/ByteType.md | 11 + .../models/ChangeDataCaptureConfiguration.md | 16 + docs/v2/Core/models/CheckReportRid.md | 11 + docs/v2/Core/models/CheckRid.md | 11 + docs/v2/Core/models/CipherTextType.md | 12 + docs/v2/Core/models/ComputeSeconds.md | 11 + docs/v2/Core/models/ContentLength.md | 11 + docs/v2/Core/models/ContentType.md | 11 + docs/v2/Core/models/CreatedBy.md | 11 + docs/v2/Core/models/CreatedTime.md | 12 + docs/v2/Core/models/CustomMetadata.md | 11 + docs/v2/Core/models/DatasetFieldSchema.md | 22 + docs/v2/Core/models/DatasetSchema.md | 12 + docs/v2/Core/models/DateType.md | 11 + docs/v2/Core/models/DecimalType.md | 13 + docs/v2/Core/models/DisplayName.md | 11 + docs/v2/Core/models/Distance.md | 12 + docs/v2/Core/models/DistanceUnit.md | 18 + docs/v2/Core/models/DoubleType.md | 11 + docs/v2/Core/models/Duration.md | 12 + docs/v2/Core/models/DurationSeconds.md | 11 + docs/v2/Core/models/EmbeddingModel.md | 16 + docs/v2/Core/models/EnrollmentRid.md | 11 + docs/v2/Core/models/Field.md | 14 + docs/v2/Core/models/FieldDataType.md | 29 + docs/v2/Core/models/FieldName.md | 11 + docs/v2/Core/models/FieldSchema.md | 14 + docs/v2/Core/models/FilePath.md | 12 + docs/v2/Core/models/Filename.md | 12 + docs/v2/Core/models/FilterBinaryType.md | 11 + docs/v2/Core/models/FilterBooleanType.md | 11 + docs/v2/Core/models/FilterDateTimeType.md | 11 + docs/v2/Core/models/FilterDateType.md | 11 + docs/v2/Core/models/FilterDoubleType.md | 11 + docs/v2/Core/models/FilterEnumType.md | 12 + docs/v2/Core/models/FilterFloatType.md | 11 + docs/v2/Core/models/FilterIntegerType.md | 11 + docs/v2/Core/models/FilterLongType.md | 11 + docs/v2/Core/models/FilterRidType.md | 11 + docs/v2/Core/models/FilterStringType.md | 11 + docs/v2/Core/models/FilterType.md | 26 + docs/v2/Core/models/FilterUuidType.md | 11 + docs/v2/Core/models/FloatType.md | 11 + docs/v2/Core/models/FolderRid.md | 11 + docs/v2/Core/models/FoundryBranch.md | 11 + docs/v2/Core/models/FoundryLiveDeployment.md | 14 + .../FullRowChangeDataCaptureConfiguration.md | 16 + docs/v2/Core/models/GeoPointType.md | 11 + docs/v2/Core/models/GeoShapeType.md | 11 + docs/v2/Core/models/GeohashType.md | 11 + .../Core/models/GeotimeSeriesReferenceType.md | 11 + docs/v2/Core/models/GroupId.md | 11 + docs/v2/Core/models/GroupName.md | 11 + docs/v2/Core/models/GroupRid.md | 11 + docs/v2/Core/models/IncludeComputeUsage.md | 14 + docs/v2/Core/models/IntegerType.md | 11 + docs/v2/Core/models/JobRid.md | 11 + docs/v2/Core/models/LmsEmbeddingModel.md | 12 + docs/v2/Core/models/LmsEmbeddingModelValue.md | 15 + docs/v2/Core/models/LongType.md | 11 + docs/v2/Core/models/MapFieldType.md | 13 + docs/v2/Core/models/MarkingId.md | 11 + docs/v2/Core/models/MarkingType.md | 11 + docs/v2/Core/models/MediaItemPath.md | 15 + docs/v2/Core/models/MediaItemReadToken.md | 11 + docs/v2/Core/models/MediaItemRid.md | 11 + docs/v2/Core/models/MediaReference.md | 12 + docs/v2/Core/models/MediaReferenceType.md | 11 + docs/v2/Core/models/MediaSetRid.md | 11 + docs/v2/Core/models/MediaSetViewItem.md | 14 + .../v2/Core/models/MediaSetViewItemWrapper.md | 12 + docs/v2/Core/models/MediaSetViewRid.md | 11 + docs/v2/Core/models/MediaType.md | 13 + docs/v2/Core/models/NullType.md | 11 + .../v2/Core/models/NumericOrNonNumericType.md | 16 + docs/v2/Core/models/Operation.md | 13 + docs/v2/Core/models/OperationScope.md | 11 + docs/v2/Core/models/OrderByDirection.md | 11 + docs/v2/Core/models/OrganizationRid.md | 11 + docs/v2/Core/models/PageSize.md | 11 + docs/v2/Core/models/PageToken.md | 14 + docs/v2/Core/models/PreviewMode.md | 11 + docs/v2/Core/models/PrincipalId.md | 11 + docs/v2/Core/models/PrincipalType.md | 11 + docs/v2/Core/models/Realm.md | 13 + docs/v2/Core/models/Reference.md | 12 + docs/v2/Core/models/ReleaseStatus.md | 13 + docs/v2/Core/models/Role.md | 18 + docs/v2/Core/models/RoleAssignmentUpdate.md | 12 + docs/v2/Core/models/RoleContext.md | 10 + docs/v2/Core/models/RoleId.md | 14 + docs/v2/Core/models/RoleSetId.md | 11 + docs/v2/Core/models/ScheduleRid.md | 11 + docs/v2/Core/models/SchemaFieldType.md | 24 + docs/v2/Core/models/ShortType.md | 11 + docs/v2/Core/models/SizeBytes.md | 11 + docs/v2/Core/models/StreamSchema.md | 14 + docs/v2/Core/models/StringType.md | 11 + docs/v2/Core/models/StructFieldName.md | 12 + docs/v2/Core/models/StructFieldType.md | 12 + docs/v2/Core/models/TableRid.md | 11 + docs/v2/Core/models/TimeSeriesItemType.md | 18 + docs/v2/Core/models/TimeUnit.md | 17 + docs/v2/Core/models/TimeseriesType.md | 12 + docs/v2/Core/models/TimestampType.md | 11 + docs/v2/Core/models/TotalCount.md | 12 + docs/v2/Core/models/TraceParent.md | 11 + docs/v2/Core/models/TraceState.md | 11 + docs/v2/Core/models/UnsupportedType.md | 12 + docs/v2/Core/models/UpdatedBy.md | 11 + docs/v2/Core/models/UpdatedTime.md | 12 + docs/v2/Core/models/UserId.md | 12 + docs/v2/Core/models/UserStatus.md | 11 + .../Core/models/VectorSimilarityFunction.md | 13 + .../models/VectorSimilarityFunctionValue.md | 12 + docs/v2/Core/models/VectorType.md | 14 + docs/v2/Core/models/VersionId.md | 12 + docs/v2/Core/models/ZoneId.md | 11 + docs/v2/DataHealth/Check.md | 220 + docs/v2/DataHealth/CheckReport.md | 56 + .../models/AllowedColumnValuesCheckConfig.md | 16 + .../ApproximateUniquePercentageCheckConfig.md | 13 + .../DataHealth/models/BooleanColumnValue.md | 12 + .../models/BuildDurationCheckConfig.md | 13 + .../models/BuildStatusCheckConfig.md | 13 + docs/v2/DataHealth/models/Check.md | 16 + docs/v2/DataHealth/models/CheckConfig.md | 30 + docs/v2/DataHealth/models/CheckGroupRid.md | 11 + docs/v2/DataHealth/models/CheckIntent.md | 12 + docs/v2/DataHealth/models/CheckReport.md | 14 + docs/v2/DataHealth/models/CheckResult.md | 12 + .../v2/DataHealth/models/CheckResultStatus.md | 15 + .../v2/DataHealth/models/ColumnCountConfig.md | 12 + docs/v2/DataHealth/models/ColumnInfo.md | 12 + docs/v2/DataHealth/models/ColumnName.md | 11 + .../models/ColumnTypeCheckConfig.md | 13 + docs/v2/DataHealth/models/ColumnTypeConfig.md | 13 + docs/v2/DataHealth/models/ColumnValue.md | 18 + .../DataHealth/models/CreateCheckRequest.md | 12 + docs/v2/DataHealth/models/DatasetSubject.md | 12 + docs/v2/DataHealth/models/DateBounds.md | 12 + docs/v2/DataHealth/models/DateBoundsConfig.md | 12 + .../models/DateColumnRangeCheckConfig.md | 14 + docs/v2/DataHealth/models/DateColumnValue.md | 12 + docs/v2/DataHealth/models/EscalationConfig.md | 12 + .../models/JobDurationCheckConfig.md | 13 + .../DataHealth/models/JobStatusCheckConfig.md | 13 + docs/v2/DataHealth/models/MedianDeviation.md | 13 + .../models/MedianDeviationBoundsType.md | 12 + .../models/MedianDeviationConfig.md | 12 + .../models/NullPercentageCheckConfig.md | 13 + docs/v2/DataHealth/models/NumericBounds.md | 12 + .../DataHealth/models/NumericBoundsConfig.md | 12 + .../models/NumericColumnCheckConfig.md | 13 + .../models/NumericColumnMeanCheckConfig.md | 13 + .../models/NumericColumnMedianCheckConfig.md | 13 + .../models/NumericColumnRangeCheckConfig.md | 14 + .../DataHealth/models/NumericColumnValue.md | 12 + docs/v2/DataHealth/models/PercentageBounds.md | 12 + .../models/PercentageBoundsConfig.md | 12 + .../models/PercentageCheckConfig.md | 13 + docs/v2/DataHealth/models/PercentageValue.md | 15 + .../models/PrimaryKeyCheckConfig.md | 13 + docs/v2/DataHealth/models/PrimaryKeyConfig.md | 12 + .../ReplaceAllowedColumnValuesCheckConfig.md | 14 + ...eApproximateUniquePercentageCheckConfig.md | 12 + .../models/ReplaceBuildDurationCheckConfig.md | 12 + .../models/ReplaceBuildStatusCheckConfig.md | 12 + .../DataHealth/models/ReplaceCheckConfig.md | 30 + .../DataHealth/models/ReplaceCheckRequest.md | 12 + .../models/ReplaceColumnTypeCheckConfig.md | 12 + .../models/ReplaceColumnTypeConfig.md | 12 + .../ReplaceDateColumnRangeCheckConfig.md | 12 + .../models/ReplaceJobDurationCheckConfig.md | 12 + .../models/ReplaceJobStatusCheckConfig.md | 12 + .../ReplaceNullPercentageCheckConfig.md | 12 + .../models/ReplaceNumericColumnCheckConfig.md | 12 + .../ReplaceNumericColumnMeanCheckConfig.md | 12 + .../ReplaceNumericColumnMedianCheckConfig.md | 12 + .../ReplaceNumericColumnRangeCheckConfig.md | 12 + .../models/ReplacePercentageCheckConfig.md | 12 + .../models/ReplacePrimaryKeyCheckConfig.md | 12 + .../models/ReplacePrimaryKeyConfig.md | 11 + .../ReplaceSchemaComparisonCheckConfig.md | 12 + .../ReplaceTotalColumnCountCheckConfig.md | 12 + .../models/SchemaComparisonCheckConfig.md | 13 + .../models/SchemaComparisonConfig.md | 13 + .../DataHealth/models/SchemaComparisonType.md | 19 + docs/v2/DataHealth/models/SchemaInfo.md | 11 + docs/v2/DataHealth/models/SeverityLevel.md | 11 + .../v2/DataHealth/models/StatusCheckConfig.md | 12 + .../v2/DataHealth/models/StringColumnValue.md | 12 + docs/v2/DataHealth/models/TimeBounds.md | 12 + docs/v2/DataHealth/models/TimeBoundsConfig.md | 12 + docs/v2/DataHealth/models/TimeCheckConfig.md | 12 + .../models/TotalColumnCountCheckConfig.md | 13 + docs/v2/DataHealth/models/TrendConfig.md | 13 + docs/v2/DataHealth/models/TrendType.md | 19 + docs/v2/Datasets/Branch.md | 284 + docs/v2/Datasets/Dataset.md | 691 + docs/v2/Datasets/File.md | 409 + docs/v2/Datasets/Transaction.md | 360 + docs/v2/Datasets/View.md | 401 + .../models/AddBackingDatasetsRequest.md | 12 + .../Datasets/models/AddPrimaryKeyRequest.md | 12 + docs/v2/Datasets/models/Branch.md | 12 + docs/v2/Datasets/models/BranchName.md | 12 + .../v2/Datasets/models/CreateBranchRequest.md | 12 + .../Datasets/models/CreateDatasetRequest.md | 12 + .../models/CreateTransactionRequest.md | 11 + docs/v2/Datasets/models/CreateViewRequest.md | 15 + docs/v2/Datasets/models/DataframeReader.md | 14 + docs/v2/Datasets/models/Dataset.md | 13 + docs/v2/Datasets/models/DatasetName.md | 11 + docs/v2/Datasets/models/DatasetRid.md | 12 + docs/v2/Datasets/models/File.md | 14 + docs/v2/Datasets/models/FileUpdatedTime.md | 11 + .../models/GetDatasetJobsAndFilter.md | 12 + .../models/GetDatasetJobsComparisonType.md | 11 + .../Datasets/models/GetDatasetJobsOrFilter.md | 12 + .../v2/Datasets/models/GetDatasetJobsQuery.md | 17 + .../Datasets/models/GetDatasetJobsRequest.md | 12 + docs/v2/Datasets/models/GetDatasetJobsSort.md | 12 + .../models/GetDatasetJobsSortDirection.md | 11 + .../Datasets/models/GetDatasetJobsSortType.md | 11 + .../models/GetDatasetJobsTimeFilter.md | 14 + .../models/GetDatasetJobsTimeFilterField.md | 11 + .../models/GetDatasetSchemaResponse.md | 14 + docs/v2/Datasets/models/GetJobResponse.md | 12 + .../GetSchemaDatasetsBatchRequestElement.md | 14 + .../models/GetSchemaDatasetsBatchResponse.md | 11 + docs/v2/Datasets/models/JobDetails.md | 11 + .../Datasets/models/ListBranchesResponse.md | 12 + docs/v2/Datasets/models/ListFilesResponse.md | 12 + .../models/ListHealthChecksResponse.md | 11 + .../Datasets/models/ListSchedulesResponse.md | 12 + .../ListTransactionsOfDatasetResponse.md | 12 + .../models/ListTransactionsResponse.md | 12 + .../PrimaryKeyLatestWinsResolutionStrategy.md | 12 + .../models/PrimaryKeyResolutionDuplicate.md | 13 + .../models/PrimaryKeyResolutionStrategy.md | 11 + .../models/PrimaryKeyResolutionUnique.md | 11 + .../models/PutDatasetSchemaRequest.md | 14 + .../models/RemoveBackingDatasetsRequest.md | 12 + .../models/ReplaceBackingDatasetsRequest.md | 12 + docs/v2/Datasets/models/TableExportFormat.md | 12 + docs/v2/Datasets/models/Transaction.md | 15 + .../Datasets/models/TransactionCreatedTime.md | 12 + docs/v2/Datasets/models/TransactionRid.md | 12 + docs/v2/Datasets/models/TransactionStatus.md | 13 + docs/v2/Datasets/models/TransactionType.md | 14 + docs/v2/Datasets/models/View.md | 16 + docs/v2/Datasets/models/ViewBackingDataset.md | 12 + docs/v2/Datasets/models/ViewPrimaryKey.md | 14 + .../models/ViewPrimaryKeyResolution.md | 16 + docs/v2/Filesystem/Folder.md | 228 + docs/v2/Filesystem/Project.md | 437 + docs/v2/Filesystem/Resource.md | 604 + docs/v2/Filesystem/ResourceRole.md | 185 + docs/v2/Filesystem/Space.md | 321 + .../Filesystem/models/AccessRequirements.md | 14 + .../Filesystem/models/AddMarkingsRequest.md | 11 + .../models/AddOrganizationsRequest.md | 11 + .../models/AddResourceRolesRequest.md | 11 + .../Filesystem/models/CreateFolderRequest.md | 12 + .../CreateProjectFromTemplateRequest.md | 15 + .../Filesystem/models/CreateProjectRequest.md | 16 + .../Filesystem/models/CreateSpaceRequest.md | 18 + docs/v2/Filesystem/models/Everyone.md | 11 + docs/v2/Filesystem/models/FileSystemId.md | 11 + docs/v2/Filesystem/models/Folder.md | 24 + docs/v2/Filesystem/models/FolderRid.md | 11 + docs/v2/Filesystem/models/FolderType.md | 15 + .../GetByPathResourcesBatchRequestElement.md | 11 + .../models/GetByPathResourcesBatchResponse.md | 11 + .../models/GetFoldersBatchRequestElement.md | 11 + .../models/GetFoldersBatchResponse.md | 11 + .../models/GetResourcesBatchRequestElement.md | 11 + .../models/GetResourcesBatchResponse.md | 11 + .../v2/Filesystem/models/IsDirectlyApplied.md | 13 + .../models/ListChildrenOfFolderResponse.md | 12 + .../models/ListMarkingsOfResourceResponse.md | 12 + .../ListOrganizationsOfProjectResponse.md | 12 + .../models/ListResourceRolesResponse.md | 12 + .../Filesystem/models/ListSpacesResponse.md | 12 + docs/v2/Filesystem/models/Marking.md | 16 + docs/v2/Filesystem/models/Organization.md | 18 + docs/v2/Filesystem/models/PrincipalIdOnly.md | 12 + docs/v2/Filesystem/models/PrincipalWithId.md | 13 + docs/v2/Filesystem/models/Project.md | 21 + docs/v2/Filesystem/models/ProjectRid.md | 11 + .../Filesystem/models/ProjectTemplateRid.md | 11 + .../models/ProjectTemplateVariableId.md | 11 + .../models/ProjectTemplateVariableValue.md | 11 + .../models/RemoveMarkingsRequest.md | 11 + .../models/RemoveOrganizationsRequest.md | 11 + .../models/RemoveResourceRolesRequest.md | 11 + .../models/ReplaceProjectRequest.md | 12 + .../Filesystem/models/ReplaceSpaceRequest.md | 14 + docs/v2/Filesystem/models/Resource.md | 24 + .../Filesystem/models/ResourceDisplayName.md | 11 + docs/v2/Filesystem/models/ResourcePath.md | 11 + docs/v2/Filesystem/models/ResourceRid.md | 11 + docs/v2/Filesystem/models/ResourceRole.md | 12 + .../models/ResourceRoleIdentifier.md | 12 + .../models/ResourceRolePrincipal.md | 16 + .../models/ResourceRolePrincipalIdentifier.md | 16 + docs/v2/Filesystem/models/ResourceType.md | 94 + docs/v2/Filesystem/models/Space.md | 20 + .../Filesystem/models/SpaceMavenIdentifier.md | 12 + docs/v2/Filesystem/models/SpaceRid.md | 11 + docs/v2/Filesystem/models/TrashStatus.md | 12 + docs/v2/Filesystem/models/UsageAccountRid.md | 12 + docs/v2/Functions/Query.md | 306 + docs/v2/Functions/ValueType.md | 57 + docs/v2/Functions/VersionId.md | 62 + docs/v2/Functions/models/ArrayConstraint.md | 15 + docs/v2/Functions/models/DataValue.md | 33 + docs/v2/Functions/models/EnumConstraint.md | 12 + .../Functions/models/ExecuteQueryRequest.md | 12 + .../Functions/models/ExecuteQueryResponse.md | 11 + docs/v2/Functions/models/FunctionRid.md | 12 + docs/v2/Functions/models/FunctionVersion.md | 13 + .../models/GetByRidQueriesRequest.md | 12 + docs/v2/Functions/models/LengthConstraint.md | 13 + docs/v2/Functions/models/MapConstraint.md | 14 + .../v2/Functions/models/NullableConstraint.md | 12 + .../models/NullableConstraintValue.md | 11 + docs/v2/Functions/models/Parameter.md | 12 + docs/v2/Functions/models/ParameterId.md | 13 + docs/v2/Functions/models/Query.md | 17 + .../models/QueryAggregationKeyType.md | 22 + .../models/QueryAggregationRangeSubType.md | 19 + .../models/QueryAggregationRangeType.md | 12 + .../models/QueryAggregationValueType.md | 18 + docs/v2/Functions/models/QueryApiName.md | 11 + docs/v2/Functions/models/QueryArrayType.md | 12 + docs/v2/Functions/models/QueryDataType.md | 33 + .../models/QueryRuntimeErrorParameter.md | 11 + docs/v2/Functions/models/QuerySetType.md | 12 + docs/v2/Functions/models/QueryStructField.md | 12 + docs/v2/Functions/models/QueryStructType.md | 12 + docs/v2/Functions/models/QueryUnionType.md | 12 + docs/v2/Functions/models/RangesConstraint.md | 13 + docs/v2/Functions/models/RegexConstraint.md | 13 + docs/v2/Functions/models/RidConstraint.md | 11 + .../models/StreamingExecuteQueryRequest.md | 13 + docs/v2/Functions/models/StructConstraint.md | 12 + .../v2/Functions/models/StructFieldApiName.md | 11 + docs/v2/Functions/models/StructFieldName.md | 12 + .../v2/Functions/models/StructV1Constraint.md | 12 + .../models/ThreeDimensionalAggregation.md | 13 + docs/v2/Functions/models/TransactionId.md | 11 + .../models/TwoDimensionalAggregation.md | 13 + docs/v2/Functions/models/UuidConstraint.md | 11 + docs/v2/Functions/models/ValueType.md | 18 + docs/v2/Functions/models/ValueTypeApiName.md | 11 + .../Functions/models/ValueTypeConstraint.md | 25 + docs/v2/Functions/models/ValueTypeDataType.md | 33 + .../models/ValueTypeDataTypeArrayType.md | 12 + .../models/ValueTypeDataTypeBinaryType.md | 11 + .../models/ValueTypeDataTypeBooleanType.md | 11 + .../models/ValueTypeDataTypeByteType.md | 11 + .../models/ValueTypeDataTypeDateType.md | 11 + .../models/ValueTypeDataTypeDecimalType.md | 11 + .../models/ValueTypeDataTypeDoubleType.md | 11 + .../models/ValueTypeDataTypeFloatType.md | 11 + .../models/ValueTypeDataTypeIntegerType.md | 11 + .../models/ValueTypeDataTypeLongType.md | 11 + .../models/ValueTypeDataTypeMapType.md | 13 + .../models/ValueTypeDataTypeOptionalType.md | 12 + .../models/ValueTypeDataTypeShortType.md | 11 + .../models/ValueTypeDataTypeStringType.md | 11 + .../models/ValueTypeDataTypeStructElement.md | 12 + .../ValueTypeDataTypeStructFieldIdentifier.md | 11 + .../models/ValueTypeDataTypeStructType.md | 12 + .../models/ValueTypeDataTypeTimestampType.md | 11 + .../models/ValueTypeDataTypeUnionType.md | 12 + .../ValueTypeDataTypeValueTypeReference.md | 13 + .../Functions/models/ValueTypeDescription.md | 12 + .../v2/Functions/models/ValueTypeReference.md | 14 + docs/v2/Functions/models/ValueTypeRid.md | 12 + docs/v2/Functions/models/ValueTypeVersion.md | 12 + .../v2/Functions/models/ValueTypeVersionId.md | 12 + docs/v2/Functions/models/VersionId.md | 18 + docs/v2/Geo/models/BBox.md | 18 + docs/v2/Geo/models/Coordinate.md | 11 + docs/v2/Geo/models/Feature.md | 15 + docs/v2/Geo/models/FeatureCollection.md | 13 + docs/v2/Geo/models/FeatureCollectionTypes.md | 11 + docs/v2/Geo/models/FeaturePropertyKey.md | 11 + docs/v2/Geo/models/GeoPoint.md | 13 + docs/v2/Geo/models/Geometry.md | 21 + docs/v2/Geo/models/GeometryCollection.md | 19 + docs/v2/Geo/models/LineString.md | 13 + docs/v2/Geo/models/LineStringCoordinates.md | 12 + docs/v2/Geo/models/LinearRing.md | 22 + docs/v2/Geo/models/MultiLineString.md | 13 + docs/v2/Geo/models/MultiPoint.md | 13 + docs/v2/Geo/models/MultiPolygon.md | 13 + docs/v2/Geo/models/Polygon.md | 13 + docs/v2/Geo/models/Position.md | 25 + docs/v2/LanguageModels/AnthropicModel.md | 103 + docs/v2/LanguageModels/OpenAiModel.md | 75 + .../models/AnthropicAnyToolChoice.md | 12 + .../models/AnthropicAutoToolChoice.md | 12 + .../AnthropicBase64PdfDocumentSource.md | 12 + .../models/AnthropicCacheControl.md | 11 + .../AnthropicCharacterLocationCitation.md | 16 + .../models/AnthropicCompletionCitation.md | 11 + .../models/AnthropicCompletionContent.md | 18 + .../AnthropicCompletionRedactedThinking.md | 12 + .../models/AnthropicCompletionText.md | 13 + .../models/AnthropicCompletionThinking.md | 13 + .../models/AnthropicCompletionToolUse.md | 14 + .../models/AnthropicCustomTool.md | 14 + .../models/AnthropicDisableParallelToolUse.md | 13 + .../models/AnthropicDisabledThinking.md | 11 + .../models/AnthropicDocument.md | 16 + .../models/AnthropicDocumentCitations.md | 11 + .../models/AnthropicDocumentSource.md | 16 + .../models/AnthropicEnabledThinking.md | 12 + .../models/AnthropicEphemeralCacheControl.md | 11 + .../LanguageModels/models/AnthropicImage.md | 13 + .../models/AnthropicImageBase64Source.md | 13 + .../models/AnthropicImageSource.md | 11 + .../models/AnthropicMediaType.md | 13 + .../LanguageModels/models/AnthropicMessage.md | 12 + .../models/AnthropicMessageContent.md | 21 + .../models/AnthropicMessageRole.md | 11 + .../models/AnthropicMessagesRequest.md | 20 + .../models/AnthropicMessagesResponse.md | 17 + .../models/AnthropicNoneToolChoice.md | 11 + .../models/AnthropicRedactedThinking.md | 12 + .../models/AnthropicSystemMessage.md | 11 + .../v2/LanguageModels/models/AnthropicText.md | 14 + .../models/AnthropicTextDocumentSource.md | 12 + .../models/AnthropicThinking.md | 13 + .../models/AnthropicThinkingConfig.md | 16 + .../models/AnthropicTokenUsage.md | 14 + .../v2/LanguageModels/models/AnthropicTool.md | 11 + .../models/AnthropicToolChoice.md | 18 + .../models/AnthropicToolResult.md | 15 + .../models/AnthropicToolResultContent.md | 11 + .../models/AnthropicToolToolChoice.md | 13 + .../LanguageModels/models/AnthropicToolUse.md | 15 + docs/v2/LanguageModels/models/JsonSchema.md | 11 + .../models/LanguageModelApiName.md | 11 + .../models/OpenAiEmbeddingInput.md | 11 + .../models/OpenAiEmbeddingTokenUsage.md | 11 + .../models/OpenAiEmbeddingsRequest.md | 13 + .../models/OpenAiEmbeddingsResponse.md | 13 + .../models/OpenAiEncodingFormat.md | 11 + docs/v2/MediaSets/MediaSet.md | 751 + docs/v2/MediaSets/models/BranchName.md | 13 + docs/v2/MediaSets/models/BranchRid.md | 12 + .../models/GetMediaItemInfoResponse.md | 14 + .../models/GetMediaItemRidByPathResponse.md | 11 + docs/v2/MediaSets/models/LogicalTimestamp.md | 16 + docs/v2/MediaSets/models/MediaAttribution.md | 12 + .../v2/MediaSets/models/MediaItemXmlFormat.md | 12 + .../MediaSets/models/PutMediaItemResponse.md | 11 + .../TrackedTransformationFailedResponse.md | 11 + .../TrackedTransformationPendingResponse.md | 11 + .../models/TrackedTransformationResponse.md | 17 + ...TrackedTransformationSuccessfulResponse.md | 11 + docs/v2/MediaSets/models/TransactionId.md | 12 + docs/v2/Models/Model.md | 112 + docs/v2/Models/ModelVersion.md | 212 + docs/v2/Models/models/CreateModelRequest.md | 12 + .../models/CreateModelVersionRequest.md | 14 + docs/v2/Models/models/DillModelFiles.md | 12 + .../models/ListModelVersionsResponse.md | 12 + docs/v2/Models/models/Model.md | 11 + docs/v2/Models/models/ModelApi.md | 13 + docs/v2/Models/models/ModelApiAnyType.md | 11 + docs/v2/Models/models/ModelApiArrayType.md | 12 + docs/v2/Models/models/ModelApiColumn.md | 13 + docs/v2/Models/models/ModelApiDataType.md | 26 + docs/v2/Models/models/ModelApiInput.md | 17 + docs/v2/Models/models/ModelApiMapType.md | 13 + docs/v2/Models/models/ModelApiOutput.md | 17 + .../v2/Models/models/ModelApiParameterType.md | 14 + .../v2/Models/models/ModelApiTabularFormat.md | 11 + docs/v2/Models/models/ModelApiTabularType.md | 15 + docs/v2/Models/models/ModelFiles.md | 13 + docs/v2/Models/models/ModelName.md | 11 + docs/v2/Models/models/ModelRid.md | 11 + docs/v2/Models/models/ModelVersion.md | 14 + docs/v2/Models/models/ModelVersionRid.md | 11 + docs/v2/Ontologies/Action.md | 256 + docs/v2/Ontologies/ActionType.md | 179 + docs/v2/Ontologies/ActionTypeFullMetadata.md | 124 + docs/v2/Ontologies/Attachment.md | 239 + docs/v2/Ontologies/AttachmentProperty.md | 299 + docs/v2/Ontologies/CipherTextProperty.md | 65 + docs/v2/Ontologies/LinkedObject.md | 204 + docs/v2/Ontologies/MediaReferenceProperty.md | 222 + docs/v2/Ontologies/ObjectType.md | 316 + docs/v2/Ontologies/Ontology.md | 232 + docs/v2/Ontologies/OntologyInterface.md | 693 + docs/v2/Ontologies/OntologyObject.md | 467 + docs/v2/Ontologies/OntologyObjectSet.md | 652 + docs/v2/Ontologies/OntologyTransaction.md | 65 + docs/v2/Ontologies/OntologyValueType.md | 112 + docs/v2/Ontologies/Query.md | 94 + docs/v2/Ontologies/QueryType.md | 131 + docs/v2/Ontologies/TimeSeriesPropertyV2.md | 234 + .../Ontologies/TimeSeriesValueBankProperty.md | 155 + .../v2/Ontologies/models/AbsoluteTimeRange.md | 13 + .../models/AbsoluteValuePropertyExpression.md | 13 + .../Ontologies/models/ActionExecutionTime.md | 12 + docs/v2/Ontologies/models/ActionLogicRule.md | 27 + .../models/ActionParameterArrayType.md | 12 + .../Ontologies/models/ActionParameterType.md | 34 + .../v2/Ontologies/models/ActionParameterV2.md | 14 + docs/v2/Ontologies/models/ActionResults.md | 16 + docs/v2/Ontologies/models/ActionRid.md | 11 + .../v2/Ontologies/models/ActionTypeApiName.md | 13 + .../models/ActionTypeFullMetadata.md | 12 + docs/v2/Ontologies/models/ActionTypeRid.md | 12 + docs/v2/Ontologies/models/ActionTypeV2.md | 18 + .../models/ActivePropertyTypeStatus.md | 13 + docs/v2/Ontologies/models/AddLink.md | 15 + docs/v2/Ontologies/models/AddLinkEdit.md | 15 + docs/v2/Ontologies/models/AddObject.md | 13 + docs/v2/Ontologies/models/AddObjectEdit.md | 13 + .../models/AddPropertyExpression.md | 13 + docs/v2/Ontologies/models/Affix.md | 12 + .../models/AggregateObjectSetRequestV2.md | 15 + .../models/AggregateObjectsRequestV2.md | 14 + .../models/AggregateObjectsResponseItemV2.md | 12 + .../models/AggregateObjectsResponseV2.md | 14 + .../Ontologies/models/AggregateTimeSeries.md | 12 + .../Ontologies/models/AggregationAccuracy.md | 11 + .../models/AggregationAccuracyRequest.md | 11 + .../models/AggregationDurationGroupingV2.md | 16 + .../models/AggregationExactGroupingV2.md | 15 + .../models/AggregationFixedWidthGroupingV2.md | 13 + .../Ontologies/models/AggregationGroupByV2.md | 18 + .../models/AggregationGroupKeyV2.md | 11 + .../models/AggregationGroupValueV2.md | 11 + .../models/AggregationMetricName.md | 11 + .../models/AggregationMetricResultV2.md | 12 + .../Ontologies/models/AggregationRangeV2.md | 12 + .../models/AggregationRangesGroupingV2.md | 13 + docs/v2/Ontologies/models/AggregationV2.md | 22 + docs/v2/Ontologies/models/AllOfRule.md | 15 + docs/v2/Ontologies/models/AndQueryV2.md | 12 + docs/v2/Ontologies/models/AnyOfRule.md | 13 + docs/v2/Ontologies/models/ApplyActionMode.md | 11 + .../Ontologies/models/ApplyActionOverrides.md | 12 + .../models/ApplyActionRequestOptions.md | 12 + .../Ontologies/models/ApplyActionRequestV2.md | 12 + .../models/ApplyActionWithOverridesRequest.md | 12 + ...plyReducersAndExtractMainValueLoadLevel.md | 11 + .../models/ApplyReducersLoadLevel.md | 11 + .../ApproximateDistinctAggregationV2.md | 14 + .../ApproximatePercentileAggregationV2.md | 15 + docs/v2/Ontologies/models/ArrayConstraint.md | 15 + .../models/ArrayEntryEvaluatedConstraint.md | 11 + .../models/ArrayEvaluatedConstraint.md | 12 + .../Ontologies/models/ArraySizeConstraint.md | 16 + .../models/ArtifactRepositoryRid.md | 11 + .../models/AttachmentMetadataResponse.md | 16 + docs/v2/Ontologies/models/AttachmentRid.md | 11 + docs/v2/Ontologies/models/AttachmentV2.md | 15 + docs/v2/Ontologies/models/AvgAggregationV2.md | 14 + .../models/BatchActionObjectEdit.md | 17 + .../models/BatchActionObjectEdits.md | 17 + .../Ontologies/models/BatchActionResults.md | 16 + .../models/BatchApplyActionRequestItem.md | 11 + .../models/BatchApplyActionRequestOptions.md | 11 + .../models/BatchApplyActionRequestV2.md | 12 + .../models/BatchApplyActionResponseV2.md | 11 + .../Ontologies/models/BatchReturnEditsMode.md | 11 + .../models/BatchedFunctionLogicRule.md | 13 + docs/v2/Ontologies/models/BlueprintIcon.md | 13 + docs/v2/Ontologies/models/BoundingBoxValue.md | 13 + docs/v2/Ontologies/models/CenterPoint.md | 13 + docs/v2/Ontologies/models/CenterPointTypes.md | 11 + .../ContainsAllTermsInOrderPrefixLastTerm.md | 18 + .../models/ContainsAllTermsInOrderQuery.md | 17 + .../models/ContainsAllTermsQuery.md | 18 + .../Ontologies/models/ContainsAnyTermQuery.md | 18 + docs/v2/Ontologies/models/ContainsQueryV2.md | 16 + .../Ontologies/models/CountAggregationV2.md | 13 + .../models/CountObjectsResponseV2.md | 11 + .../models/CreateInterfaceLinkLogicRule.md | 15 + .../models/CreateInterfaceLogicRule.md | 15 + .../models/CreateInterfaceObjectRule.md | 12 + .../Ontologies/models/CreateLinkLogicRule.md | 14 + docs/v2/Ontologies/models/CreateLinkRule.md | 15 + .../models/CreateObjectLogicRule.md | 14 + docs/v2/Ontologies/models/CreateObjectRule.md | 12 + .../models/CreateOrModifyObjectLogicRule.md | 14 + .../models/CreateOrModifyObjectLogicRuleV2.md | 14 + .../CreateTemporaryObjectSetRequestV2.md | 11 + .../CreateTemporaryObjectSetResponseV2.md | 11 + .../Ontologies/models/CurrentTimeArgument.md | 11 + .../Ontologies/models/CurrentUserArgument.md | 11 + docs/v2/Ontologies/models/DataValue.md | 39 + docs/v2/Ontologies/models/DatetimeFormat.md | 16 + .../models/DatetimeLocalizedFormat.md | 12 + .../models/DatetimeLocalizedFormatType.md | 16 + .../Ontologies/models/DatetimeStringFormat.md | 12 + docs/v2/Ontologies/models/DatetimeTimezone.md | 16 + .../models/DatetimeTimezoneStatic.md | 12 + .../Ontologies/models/DatetimeTimezoneUser.md | 11 + docs/v2/Ontologies/models/DecryptionResult.md | 12 + .../models/DeleteInterfaceLinkLogicRule.md | 15 + .../models/DeleteInterfaceObjectRule.md | 12 + docs/v2/Ontologies/models/DeleteLink.md | 15 + docs/v2/Ontologies/models/DeleteLinkEdit.md | 15 + .../Ontologies/models/DeleteLinkLogicRule.md | 14 + docs/v2/Ontologies/models/DeleteLinkRule.md | 15 + docs/v2/Ontologies/models/DeleteObject.md | 13 + docs/v2/Ontologies/models/DeleteObjectEdit.md | 13 + .../models/DeleteObjectLogicRule.md | 12 + docs/v2/Ontologies/models/DeleteObjectRule.md | 12 + .../models/DeprecatedPropertyTypeStatus.md | 16 + .../models/DerivedPropertyApiName.md | 12 + .../models/DerivedPropertyDefinition.md | 26 + .../models/DividePropertyExpression.md | 14 + .../DoesNotIntersectBoundingBoxQuery.md | 17 + .../models/DoesNotIntersectPolygonQuery.md | 17 + docs/v2/Ontologies/models/DoubleVector.md | 14 + .../v2/Ontologies/models/DurationBaseValue.md | 11 + .../Ontologies/models/DurationFormatStyle.md | 16 + .../v2/Ontologies/models/DurationPrecision.md | 14 + docs/v2/Ontologies/models/EntrySetType.md | 13 + docs/v2/Ontologies/models/EnumConstraint.md | 12 + docs/v2/Ontologies/models/EqualsQueryV2.md | 16 + .../models/ExactDistinctAggregationV2.md | 14 + .../models/ExamplePropertyTypeStatus.md | 13 + .../Ontologies/models/ExecuteQueryRequest.md | 11 + .../Ontologies/models/ExecuteQueryResponse.md | 11 + .../models/ExperimentalPropertyTypeStatus.md | 11 + docs/v2/Ontologies/models/ExtractDatePart.md | 13 + .../models/ExtractMainValueLoadLevel.md | 11 + .../models/ExtractPropertyExpression.md | 14 + docs/v2/Ontologies/models/FilterValue.md | 13 + .../v2/Ontologies/models/FixedValuesMapKey.md | 11 + .../v2/Ontologies/models/FunctionLogicRule.md | 14 + .../models/FunctionParameterName.md | 12 + docs/v2/Ontologies/models/FunctionRid.md | 12 + docs/v2/Ontologies/models/FunctionVersion.md | 13 + docs/v2/Ontologies/models/FuzzyV2.md | 11 + .../models/GetSelectedPropertyOperation.md | 16 + .../models/GreatestPropertyExpression.md | 13 + .../models/GroupMemberConstraint.md | 12 + docs/v2/Ontologies/models/GtQueryV2.md | 16 + docs/v2/Ontologies/models/GteQueryV2.md | 16 + .../Ontologies/models/HumanReadableFormat.md | 12 + docs/v2/Ontologies/models/Icon.md | 11 + docs/v2/Ontologies/models/InQuery.md | 17 + .../models/InterfaceDefinedPropertyType.md | 20 + .../v2/Ontologies/models/InterfaceLinkType.md | 19 + .../models/InterfaceLinkTypeApiName.md | 13 + .../models/InterfaceLinkTypeCardinality.md | 13 + .../InterfaceLinkTypeLinkedEntityApiName.md | 16 + .../Ontologies/models/InterfaceLinkTypeRid.md | 12 + .../InterfaceParameterPropertyArgument.md | 13 + .../models/InterfacePropertyApiName.md | 14 + ...facePropertyLocalPropertyImplementation.md | 12 + ...cePropertyReducedPropertyImplementation.md | 12 + ...erfacePropertyStructFieldImplementation.md | 12 + .../InterfacePropertyStructImplementation.md | 14 + ...facePropertyStructImplementationMapping.md | 13 + .../models/InterfacePropertyType.md | 18 + .../InterfacePropertyTypeImplementation.md | 19 + .../models/InterfacePropertyTypeRid.md | 12 + .../models/InterfaceSharedPropertyType.md | 21 + .../models/InterfaceToObjectTypeMapping.md | 11 + .../models/InterfaceToObjectTypeMappingV2.md | 12 + .../models/InterfaceToObjectTypeMappings.md | 11 + .../models/InterfaceToObjectTypeMappingsV2.md | 11 + docs/v2/Ontologies/models/InterfaceType.md | 23 + .../Ontologies/models/InterfaceTypeApiName.md | 13 + docs/v2/Ontologies/models/InterfaceTypeRid.md | 11 + .../models/IntersectsBoundingBoxQuery.md | 16 + .../models/IntersectsPolygonQuery.md | 16 + docs/v2/Ontologies/models/IntervalQuery.md | 16 + .../v2/Ontologies/models/IntervalQueryRule.md | 18 + docs/v2/Ontologies/models/IsNullQueryV2.md | 16 + docs/v2/Ontologies/models/KnownType.md | 16 + .../models/LeastPropertyExpression.md | 13 + docs/v2/Ontologies/models/LengthConstraint.md | 13 + docs/v2/Ontologies/models/LinkSideObject.md | 12 + docs/v2/Ontologies/models/LinkTypeApiName.md | 13 + docs/v2/Ontologies/models/LinkTypeId.md | 12 + docs/v2/Ontologies/models/LinkTypeRid.md | 11 + .../models/LinkTypeSideCardinality.md | 11 + docs/v2/Ontologies/models/LinkTypeSideV2.md | 19 + .../models/LinkedInterfaceTypeApiName.md | 12 + .../Ontologies/models/LinkedObjectLocator.md | 14 + .../models/LinkedObjectTypeApiName.md | 12 + docs/v2/Ontologies/models/LinksFromObject.md | 13 + .../ListActionTypesFullMetadataResponse.md | 12 + .../models/ListActionTypesResponseV2.md | 12 + .../models/ListAttachmentsResponseV2.md | 13 + .../ListInterfaceLinkedObjectsResponse.md | 12 + .../models/ListInterfaceTypesResponse.md | 12 + .../models/ListLinkedObjectsResponseV2.md | 12 + .../models/ListObjectTypesV2Response.md | 12 + .../models/ListObjectsForInterfaceResponse.md | 13 + .../models/ListObjectsResponseV2.md | 13 + .../models/ListOntologiesV2Response.md | 11 + .../models/ListOntologyValueTypesResponse.md | 11 + .../ListOutgoingInterfaceLinkTypesResponse.md | 12 + .../models/ListOutgoingLinkTypesResponseV2.md | 12 + .../models/ListQueryTypesResponseV2.md | 12 + .../models/LoadObjectSetLinksRequestV2.md | 14 + .../models/LoadObjectSetLinksResponseV2.md | 13 + .../models/LoadObjectSetRequestV2.md | 19 + .../models/LoadObjectSetResponseV2.md | 14 + ...adObjectSetV2MultipleObjectTypesRequest.md | 20 + ...dObjectSetV2MultipleObjectTypesResponse.md | 28 + ...adObjectSetV2ObjectsOrInterfacesRequest.md | 19 + ...dObjectSetV2ObjectsOrInterfacesResponse.md | 15 + .../models/LoadOntologyMetadataRequest.md | 15 + docs/v2/Ontologies/models/LogicRule.md | 22 + .../v2/Ontologies/models/LogicRuleArgument.md | 23 + docs/v2/Ontologies/models/LtQueryV2.md | 16 + docs/v2/Ontologies/models/LteQueryV2.md | 16 + docs/v2/Ontologies/models/MatchRule.md | 15 + docs/v2/Ontologies/models/MaxAggregationV2.md | 14 + docs/v2/Ontologies/models/MediaMetadata.md | 13 + docs/v2/Ontologies/models/MethodObjectSet.md | 11 + docs/v2/Ontologies/models/MinAggregationV2.md | 14 + .../models/ModifyInterfaceLogicRule.md | 14 + .../models/ModifyInterfaceObjectRule.md | 12 + docs/v2/Ontologies/models/ModifyObject.md | 13 + docs/v2/Ontologies/models/ModifyObjectEdit.md | 14 + .../models/ModifyObjectLogicRule.md | 14 + docs/v2/Ontologies/models/ModifyObjectRule.md | 12 + .../models/MultiplyPropertyExpression.md | 13 + .../models/NearestNeighborsQuery.md | 18 + .../models/NearestNeighborsQueryText.md | 13 + .../models/NegatePropertyExpression.md | 13 + ...stedInterfacePropertyTypeImplementation.md | 19 + .../models/NestedQueryAggregation.md | 12 + docs/v2/Ontologies/models/NotQueryV2.md | 12 + .../v2/Ontologies/models/NumberFormatAffix.md | 15 + .../Ontologies/models/NumberFormatCurrency.md | 16 + .../models/NumberFormatCurrencyStyle.md | 14 + .../models/NumberFormatCustomUnit.md | 16 + .../Ontologies/models/NumberFormatDuration.md | 17 + .../models/NumberFormatFixedValues.md | 14 + .../Ontologies/models/NumberFormatNotation.md | 18 + .../Ontologies/models/NumberFormatOptions.md | 26 + .../v2/Ontologies/models/NumberFormatRatio.md | 17 + .../v2/Ontologies/models/NumberFormatScale.md | 17 + .../Ontologies/models/NumberFormatStandard.md | 14 + .../models/NumberFormatStandardUnit.md | 16 + docs/v2/Ontologies/models/NumberRatioType.md | 16 + .../Ontologies/models/NumberRoundingMode.md | 16 + docs/v2/Ontologies/models/NumberScaleType.md | 16 + docs/v2/Ontologies/models/ObjectEdit.md | 19 + docs/v2/Ontologies/models/ObjectEdits.md | 17 + .../models/ObjectParameterPropertyArgument.md | 13 + .../Ontologies/models/ObjectPropertyType.md | 37 + .../models/ObjectPropertyValueConstraint.md | 12 + .../models/ObjectQueryResultConstraint.md | 12 + docs/v2/Ontologies/models/ObjectRid.md | 12 + docs/v2/Ontologies/models/ObjectSet.md | 29 + .../models/ObjectSetAsBaseObjectTypesType.md | 14 + .../Ontologies/models/ObjectSetAsTypeType.md | 16 + .../v2/Ontologies/models/ObjectSetBaseType.md | 12 + .../Ontologies/models/ObjectSetFilterType.md | 13 + .../models/ObjectSetInterfaceBaseType.md | 13 + .../ObjectSetInterfaceLinkSearchAroundType.md | 13 + .../models/ObjectSetIntersectionType.md | 12 + .../models/ObjectSetMethodInputType.md | 14 + .../models/ObjectSetNearestNeighborsType.md | 25 + .../models/ObjectSetReferenceType.md | 12 + docs/v2/Ontologies/models/ObjectSetRid.md | 11 + .../models/ObjectSetSearchAroundType.md | 13 + .../Ontologies/models/ObjectSetStaticType.md | 12 + .../models/ObjectSetSubtractType.md | 12 + .../Ontologies/models/ObjectSetUnionType.md | 12 + .../models/ObjectSetWithPropertiesType.md | 16 + .../v2/Ontologies/models/ObjectTypeApiName.md | 13 + docs/v2/Ontologies/models/ObjectTypeEdits.md | 12 + .../models/ObjectTypeFullMetadata.md | 15 + docs/v2/Ontologies/models/ObjectTypeId.md | 11 + .../ObjectTypeInterfaceImplementation.md | 13 + docs/v2/Ontologies/models/ObjectTypeRid.md | 11 + docs/v2/Ontologies/models/ObjectTypeV2.md | 21 + .../Ontologies/models/ObjectTypeVisibility.md | 12 + docs/v2/Ontologies/models/OneOfConstraint.md | 14 + docs/v2/Ontologies/models/OntologyApiName.md | 11 + .../v2/Ontologies/models/OntologyArrayType.md | 12 + docs/v2/Ontologies/models/OntologyDataType.md | 37 + .../Ontologies/models/OntologyFullMetadata.md | 18 + .../Ontologies/models/OntologyIdentifier.md | 13 + .../models/OntologyInterfaceObjectSetType.md | 12 + .../models/OntologyInterfaceObjectType.md | 12 + docs/v2/Ontologies/models/OntologyMapType.md | 13 + .../models/OntologyObjectArrayType.md | 13 + .../models/OntologyObjectArrayTypeReducer.md | 12 + ...logyObjectArrayTypeReducerSortDirection.md | 11 + .../models/OntologyObjectSetType.md | 13 + .../Ontologies/models/OntologyObjectType.md | 13 + .../models/OntologyObjectTypeReferenceType.md | 11 + docs/v2/Ontologies/models/OntologyObjectV2.md | 11 + docs/v2/Ontologies/models/OntologyRid.md | 13 + docs/v2/Ontologies/models/OntologySetType.md | 12 + .../Ontologies/models/OntologyStructField.md | 13 + .../Ontologies/models/OntologyStructType.md | 12 + .../models/OntologyTransactionId.md | 11 + docs/v2/Ontologies/models/OntologyV2.md | 14 + .../v2/Ontologies/models/OntologyValueType.md | 18 + docs/v2/Ontologies/models/OrQueryV2.md | 12 + docs/v2/Ontologies/models/OrderBy.md | 21 + docs/v2/Ontologies/models/OrderByDirection.md | 11 + .../models/ParameterEvaluatedConstraint.md | 42 + .../models/ParameterEvaluationResult.md | 13 + docs/v2/Ontologies/models/ParameterId.md | 13 + .../Ontologies/models/ParameterIdArgument.md | 12 + docs/v2/Ontologies/models/ParameterOption.md | 13 + docs/v2/Ontologies/models/Plaintext.md | 11 + docs/v2/Ontologies/models/PolygonValue.md | 11 + .../models/PostTransactionEditsRequest.md | 11 + .../models/PostTransactionEditsResponse.md | 10 + docs/v2/Ontologies/models/PreciseDuration.md | 13 + docs/v2/Ontologies/models/PreciseTimeUnit.md | 15 + .../models/PrefixOnLastTokenRule.md | 14 + docs/v2/Ontologies/models/PrimaryKeyValue.md | 11 + docs/v2/Ontologies/models/PropertyApiName.md | 13 + .../models/PropertyApiNameSelector.md | 12 + .../models/PropertyBooleanFormattingRule.md | 13 + .../models/PropertyDateFormattingRule.md | 12 + docs/v2/Ontologies/models/PropertyFilter.md | 36 + docs/v2/Ontologies/models/PropertyId.md | 13 + .../Ontologies/models/PropertyIdentifier.md | 17 + .../models/PropertyImplementation.md | 12 + .../models/PropertyKnownTypeFormattingRule.md | 12 + .../v2/Ontologies/models/PropertyLoadLevel.md | 21 + .../models/PropertyNumberFormattingRule.md | 12 + .../PropertyNumberFormattingRuleType.md | 23 + ...tyOrStructFieldOfPropertyImplementation.md | 16 + .../models/PropertyTimestampFormattingRule.md | 13 + .../Ontologies/models/PropertyTypeApiName.md | 11 + .../models/PropertyTypeReference.md | 12 + .../PropertyTypeReferenceOrStringConstant.md | 16 + docs/v2/Ontologies/models/PropertyTypeRid.md | 11 + .../Ontologies/models/PropertyTypeStatus.md | 19 + .../models/PropertyTypeVisibility.md | 12 + docs/v2/Ontologies/models/PropertyV2.md | 18 + docs/v2/Ontologies/models/PropertyValue.md | 37 + .../models/PropertyValueEscapedString.md | 11 + .../models/PropertyValueFormattingRule.md | 28 + .../models/PropertyWithLoadLevelSelector.md | 16 + docs/v2/Ontologies/models/QueryAggregation.md | 12 + .../models/QueryAggregationKeyType.md | 22 + .../models/QueryAggregationRangeSubType.md | 19 + .../models/QueryAggregationRangeType.md | 12 + .../models/QueryAggregationValueType.md | 18 + docs/v2/Ontologies/models/QueryApiName.md | 12 + docs/v2/Ontologies/models/QueryArrayType.md | 12 + docs/v2/Ontologies/models/QueryDataType.md | 37 + docs/v2/Ontologies/models/QueryParameterV2.md | 12 + .../models/QueryRuntimeErrorParameter.md | 11 + docs/v2/Ontologies/models/QuerySetType.md | 12 + docs/v2/Ontologies/models/QueryStructField.md | 12 + docs/v2/Ontologies/models/QueryStructType.md | 12 + .../QueryThreeDimensionalAggregation.md | 11 + .../models/QueryTwoDimensionalAggregation.md | 11 + docs/v2/Ontologies/models/QueryTypeV2.md | 17 + docs/v2/Ontologies/models/QueryUnionType.md | 12 + docs/v2/Ontologies/models/RangeConstraint.md | 16 + docs/v2/Ontologies/models/RangesConstraint.md | 13 + docs/v2/Ontologies/models/RegexConstraint.md | 13 + docs/v2/Ontologies/models/RegexQuery.md | 17 + .../models/RelativeDateRangeBound.md | 11 + .../models/RelativeDateRangeQuery.md | 18 + .../Ontologies/models/RelativePointInTime.md | 13 + docs/v2/Ontologies/models/RelativeTime.md | 14 + .../v2/Ontologies/models/RelativeTimeRange.md | 14 + .../Ontologies/models/RelativeTimeRelation.md | 11 + .../models/RelativeTimeSeriesTimeUnit.md | 17 + docs/v2/Ontologies/models/RelativeTimeUnit.md | 13 + .../models/ResolvedInterfacePropertyType.md | 20 + docs/v2/Ontologies/models/ReturnEditsMode.md | 12 + docs/v2/Ontologies/models/RidConstraint.md | 11 + .../models/RollingAggregateWindowPoints.md | 12 + docs/v2/Ontologies/models/SdkPackageName.md | 11 + docs/v2/Ontologies/models/SdkPackageRid.md | 11 + docs/v2/Ontologies/models/SdkVersion.md | 11 + .../v2/Ontologies/models/SearchJsonQueryV2.md | 41 + .../SearchObjectsForInterfaceRequest.md | 21 + .../models/SearchObjectsRequestV2.md | 18 + .../models/SearchObjectsResponseV2.md | 13 + .../v2/Ontologies/models/SearchOrderByType.md | 11 + docs/v2/Ontologies/models/SearchOrderByV2.md | 12 + docs/v2/Ontologies/models/SearchOrderingV2.md | 12 + .../models/SelectedPropertyApiName.md | 30 + ...dPropertyApproximateDistinctAggregation.md | 12 + ...ropertyApproximatePercentileAggregation.md | 13 + .../models/SelectedPropertyAvgAggregation.md | 12 + .../SelectedPropertyCollectListAggregation.md | 20 + .../SelectedPropertyCollectSetAggregation.md | 20 + .../SelectedPropertyCountAggregation.md | 11 + ...electedPropertyExactDistinctAggregation.md | 13 + .../models/SelectedPropertyExpression.md | 13 + .../models/SelectedPropertyMaxAggregation.md | 12 + .../models/SelectedPropertyMinAggregation.md | 12 + .../models/SelectedPropertyOperation.md | 26 + .../models/SelectedPropertySumAggregation.md | 12 + .../Ontologies/models/SharedPropertyType.md | 17 + .../models/SharedPropertyTypeApiName.md | 13 + .../models/SharedPropertyTypeRid.md | 12 + docs/v2/Ontologies/models/StartsWithQuery.md | 17 + docs/v2/Ontologies/models/StaticArgument.md | 12 + .../models/StreamTimeSeriesPointsRequest.md | 12 + .../models/StreamTimeSeriesValuesRequest.md | 11 + .../models/StreamingOutputFormat.md | 13 + docs/v2/Ontologies/models/StringConstant.md | 12 + .../models/StringLengthConstraint.md | 17 + .../models/StringRegexMatchConstraint.md | 14 + docs/v2/Ontologies/models/StructConstraint.md | 12 + .../models/StructEvaluatedConstraint.md | 12 + .../Ontologies/models/StructFieldApiName.md | 11 + .../Ontologies/models/StructFieldArgument.md | 17 + .../models/StructFieldEvaluatedConstraint.md | 32 + .../models/StructFieldEvaluationResult.md | 13 + .../StructFieldOfPropertyImplementation.md | 13 + .../Ontologies/models/StructFieldSelector.md | 16 + docs/v2/Ontologies/models/StructFieldType.md | 13 + .../Ontologies/models/StructFieldTypeRid.md | 11 + .../StructListParameterFieldArgument.md | 13 + .../models/StructParameterFieldApiName.md | 12 + .../models/StructParameterFieldArgument.md | 13 + docs/v2/Ontologies/models/StructType.md | 13 + .../Ontologies/models/StructTypeMainValue.md | 12 + .../models/SubmissionCriteriaEvaluation.md | 15 + .../models/SubtractPropertyExpression.md | 14 + docs/v2/Ontologies/models/SumAggregationV2.md | 14 + .../models/SyncApplyActionResponseV2.md | 12 + .../SynchronousWebhookOutputArgument.md | 12 + .../models/ThreeDimensionalAggregation.md | 13 + docs/v2/Ontologies/models/TimeCodeFormat.md | 11 + docs/v2/Ontologies/models/TimeRange.md | 16 + .../models/TimeSeriesAggregationMethod.md | 21 + .../models/TimeSeriesAggregationStrategy.md | 21 + .../models/TimeSeriesCumulativeAggregate.md | 13 + .../models/TimeSeriesPeriodicAggregate.md | 23 + docs/v2/Ontologies/models/TimeSeriesPoint.md | 13 + .../models/TimeSeriesRollingAggregate.md | 12 + .../TimeSeriesRollingAggregateWindow.md | 22 + .../Ontologies/models/TimeSeriesWindowType.md | 11 + docs/v2/Ontologies/models/TimeUnit.md | 18 + docs/v2/Ontologies/models/TimeseriesEntry.md | 13 + docs/v2/Ontologies/models/TransactionEdit.md | 19 + .../models/TwoDimensionalAggregation.md | 13 + .../models/UnevaluableConstraint.md | 13 + .../models/UniqueIdentifierArgument.md | 12 + .../models/UniqueIdentifierLinkId.md | 12 + .../models/UniqueIdentifierValue.md | 13 + docs/v2/Ontologies/models/UuidConstraint.md | 11 + .../models/ValidateActionResponseV2.md | 13 + docs/v2/Ontologies/models/ValidationResult.md | 12 + docs/v2/Ontologies/models/ValueType.md | 34 + docs/v2/Ontologies/models/ValueTypeApiName.md | 11 + .../Ontologies/models/ValueTypeArrayType.md | 12 + .../Ontologies/models/ValueTypeConstraint.md | 23 + .../Ontologies/models/ValueTypeDecimalType.md | 11 + .../Ontologies/models/ValueTypeFieldType.md | 32 + docs/v2/Ontologies/models/ValueTypeMapType.md | 13 + .../models/ValueTypeOptionalType.md | 12 + .../models/ValueTypeReferenceType.md | 11 + docs/v2/Ontologies/models/ValueTypeRid.md | 11 + docs/v2/Ontologies/models/ValueTypeStatus.md | 11 + .../Ontologies/models/ValueTypeStructField.md | 12 + .../Ontologies/models/ValueTypeStructType.md | 12 + .../Ontologies/models/ValueTypeUnionType.md | 12 + .../models/VersionedQueryTypeApiName.md | 17 + docs/v2/Ontologies/models/WildcardQuery.md | 16 + .../models/WithinBoundingBoxPoint.md | 11 + .../models/WithinBoundingBoxQuery.md | 17 + .../models/WithinDistanceOfQuery.md | 17 + .../Ontologies/models/WithinPolygonQuery.md | 17 + docs/v2/Orchestration/Build.md | 353 + docs/v2/Orchestration/Job.md | 109 + docs/v2/Orchestration/Schedule.md | 586 + docs/v2/Orchestration/ScheduleRun.md | 5 + docs/v2/Orchestration/ScheduleVersion.md | 109 + .../v2/Orchestration/models/AbortOnFailure.md | 13 + docs/v2/Orchestration/models/Action.md | 18 + .../models/AffectedResourcesResponse.md | 11 + docs/v2/Orchestration/models/AndTrigger.md | 12 + docs/v2/Orchestration/models/Build.md | 21 + docs/v2/Orchestration/models/BuildStatus.md | 13 + docs/v2/Orchestration/models/BuildTarget.md | 17 + docs/v2/Orchestration/models/BuildableRid.md | 13 + .../Orchestration/models/ConnectingTarget.md | 16 + .../models/CreateBuildRequest.md | 18 + .../models/CreateScheduleRequest.md | 15 + .../models/CreateScheduleRequestAction.md | 18 + .../CreateScheduleRequestBuildTarget.md | 17 + .../CreateScheduleRequestConnectingTarget.md | 14 + .../CreateScheduleRequestManualTarget.md | 12 + .../CreateScheduleRequestProjectScope.md | 12 + .../models/CreateScheduleRequestScopeMode.md | 16 + .../CreateScheduleRequestUpstreamTarget.md | 13 + .../models/CreateScheduleRequestUserScope.md | 11 + .../v2/Orchestration/models/CronExpression.md | 13 + .../Orchestration/models/DatasetJobOutput.md | 13 + .../models/DatasetUpdatedTrigger.md | 15 + .../Orchestration/models/FallbackBranches.md | 13 + docs/v2/Orchestration/models/ForceBuild.md | 11 + .../models/GetBuildsBatchRequestElement.md | 11 + .../models/GetBuildsBatchResponse.md | 11 + .../models/GetJobsBatchRequestElement.md | 11 + .../models/GetJobsBatchResponse.md | 11 + .../models/GetSchedulesBatchRequestElement.md | 11 + .../models/GetSchedulesBatchResponse.md | 11 + docs/v2/Orchestration/models/Job.md | 17 + docs/v2/Orchestration/models/JobOutput.md | 17 + .../v2/Orchestration/models/JobStartedTime.md | 11 + docs/v2/Orchestration/models/JobStatus.md | 15 + .../models/JobSucceededTrigger.md | 15 + .../models/ListJobsOfBuildResponse.md | 12 + .../models/ListRunsOfScheduleResponse.md | 12 + docs/v2/Orchestration/models/ManualTarget.md | 12 + docs/v2/Orchestration/models/ManualTrigger.md | 12 + .../models/MediaSetUpdatedTrigger.md | 17 + .../Orchestration/models/NewLogicTrigger.md | 15 + .../models/NotificationsEnabled.md | 13 + docs/v2/Orchestration/models/OrTrigger.md | 12 + docs/v2/Orchestration/models/ProjectScope.md | 13 + .../models/ReplaceScheduleRequest.md | 15 + .../models/ReplaceScheduleRequestAction.md | 18 + .../ReplaceScheduleRequestBuildTarget.md | 17 + .../ReplaceScheduleRequestConnectingTarget.md | 14 + .../ReplaceScheduleRequestManualTarget.md | 12 + .../ReplaceScheduleRequestProjectScope.md | 12 + .../models/ReplaceScheduleRequestScopeMode.md | 16 + .../ReplaceScheduleRequestUpstreamTarget.md | 13 + .../models/ReplaceScheduleRequestUserScope.md | 11 + .../models/RetryBackoffDuration.md | 12 + docs/v2/Orchestration/models/RetryCount.md | 14 + docs/v2/Orchestration/models/Schedule.md | 22 + .../v2/Orchestration/models/SchedulePaused.md | 11 + docs/v2/Orchestration/models/ScheduleRun.md | 16 + .../Orchestration/models/ScheduleRunError.md | 13 + .../models/ScheduleRunErrorName.md | 16 + .../models/ScheduleRunIgnored.md | 12 + .../Orchestration/models/ScheduleRunResult.md | 19 + .../v2/Orchestration/models/ScheduleRunRid.md | 11 + .../models/ScheduleRunSubmitted.md | 12 + .../models/ScheduleSucceededTrigger.md | 14 + .../Orchestration/models/ScheduleVersion.md | 17 + .../models/ScheduleVersionRid.md | 11 + docs/v2/Orchestration/models/ScopeMode.md | 16 + .../models/SearchBuildsAndFilter.md | 12 + .../models/SearchBuildsEqualsFilter.md | 13 + .../models/SearchBuildsEqualsFilterField.md | 13 + .../models/SearchBuildsFilter.md | 20 + .../models/SearchBuildsGteFilter.md | 13 + .../models/SearchBuildsGteFilterField.md | 11 + .../models/SearchBuildsLtFilter.md | 13 + .../models/SearchBuildsLtFilterField.md | 11 + .../models/SearchBuildsNotFilter.md | 12 + .../models/SearchBuildsOrFilter.md | 12 + .../models/SearchBuildsOrderBy.md | 11 + .../models/SearchBuildsOrderByField.md | 11 + .../models/SearchBuildsOrderByItem.md | 12 + .../models/SearchBuildsRequest.md | 14 + .../models/SearchBuildsResponse.md | 12 + .../models/TableUpdatedTrigger.md | 15 + docs/v2/Orchestration/models/TimeTrigger.md | 13 + .../models/TransactionalMediaSetJobOutput.md | 13 + docs/v2/Orchestration/models/Trigger.md | 24 + .../v2/Orchestration/models/UpstreamTarget.md | 13 + docs/v2/Orchestration/models/UserScope.md | 13 + docs/v2/SqlQueries/SqlQuery.md | 246 + .../SqlQueries/models/CanceledQueryStatus.md | 11 + .../models/ExecuteSqlQueryRequest.md | 12 + .../v2/SqlQueries/models/FailedQueryStatus.md | 12 + docs/v2/SqlQueries/models/QueryStatus.md | 18 + .../SqlQueries/models/RunningQueryStatus.md | 12 + docs/v2/SqlQueries/models/SqlQueryId.md | 11 + .../SqlQueries/models/SucceededQueryStatus.md | 12 + docs/v2/Streams/Dataset.md | 92 + docs/v2/Streams/Stream.md | 416 + docs/v2/Streams/models/Compressed.md | 15 + docs/v2/Streams/models/CreateStreamRequest.md | 15 + .../models/CreateStreamRequestStreamSchema.md | 13 + .../models/CreateStreamingDatasetRequest.md | 17 + docs/v2/Streams/models/Dataset.md | 13 + docs/v2/Streams/models/PartitionsCount.md | 12 + .../models/PublishRecordToStreamRequest.md | 12 + .../models/PublishRecordsToStreamRequest.md | 12 + docs/v2/Streams/models/Record.md | 12 + docs/v2/Streams/models/ResetStreamRequest.md | 14 + docs/v2/Streams/models/Stream.md | 16 + docs/v2/Streams/models/StreamType.md | 22 + docs/v2/Streams/models/ViewRid.md | 12 + .../ThirdPartyApplication.md | 60 + docs/v2/ThirdPartyApplications/Version.md | 305 + docs/v2/ThirdPartyApplications/Website.md | 164 + .../models/DeployWebsiteRequest.md | 11 + .../models/ListVersionsResponse.md | 12 + .../models/Subdomain.md | 11 + .../models/ThirdPartyApplication.md | 11 + .../models/ThirdPartyApplicationRid.md | 11 + .../ThirdPartyApplications/models/Version.md | 11 + .../models/VersionVersion.md | 11 + .../ThirdPartyApplications/models/Website.md | 12 + docs/v2/Widgets/DevModeSettings.md | 325 + docs/v2/Widgets/Release.md | 177 + docs/v2/Widgets/Repository.md | 115 + docs/v2/Widgets/WidgetSet.md | 56 + docs/v2/Widgets/models/DevModeSettings.md | 12 + docs/v2/Widgets/models/DevModeStatus.md | 12 + docs/v2/Widgets/models/FilePath.md | 11 + .../v2/Widgets/models/ListReleasesResponse.md | 12 + docs/v2/Widgets/models/Release.md | 14 + docs/v2/Widgets/models/ReleaseLocator.md | 12 + docs/v2/Widgets/models/ReleaseVersion.md | 11 + docs/v2/Widgets/models/Repository.md | 12 + docs/v2/Widgets/models/RepositoryRid.md | 11 + docs/v2/Widgets/models/RepositoryVersion.md | 11 + docs/v2/Widgets/models/ScriptEntrypoint.md | 12 + docs/v2/Widgets/models/ScriptType.md | 11 + .../SetWidgetSetDevModeSettingsByIdRequest.md | 12 + .../SetWidgetSetDevModeSettingsRequest.md | 12 + .../v2/Widgets/models/StylesheetEntrypoint.md | 11 + .../Widgets/models/WidgetDevModeSettings.md | 12 + docs/v2/Widgets/models/WidgetId.md | 18 + docs/v2/Widgets/models/WidgetRid.md | 11 + docs/v2/Widgets/models/WidgetSet.md | 12 + .../models/WidgetSetDevModeSettings.md | 12 + .../models/WidgetSetDevModeSettingsById.md | 12 + docs/v2/Widgets/models/WidgetSetRid.md | 11 + foundry_sdk/__init__.py | 115 + foundry_sdk/_core/__init__.py | 46 + foundry_sdk/_core/api_client.py | 836 ++ foundry_sdk/_core/auth_utils.py | 52 + foundry_sdk/_core/client_init_helpers.py | 54 + .../_core/compute_module_pipeline_auth.py | 76 + foundry_sdk/_core/confidential_client_auth.py | 96 + foundry_sdk/_core/config.py | 66 + .../_core/context_and_environment_vars.py | 65 + foundry_sdk/_core/http_client.py | 180 + foundry_sdk/_core/model_base.py | 98 + foundry_sdk/_core/oauth_utils.py | 408 + foundry_sdk/_core/page_iterator.py | 144 + foundry_sdk/_core/public_client_auth.py | 110 + foundry_sdk/_core/resource_iterator.py | 96 + foundry_sdk/_core/table.py | 82 + foundry_sdk/_core/user_token_auth_client.py | 55 + foundry_sdk/_core/utils.py | 123 + foundry_sdk/_errors/__init__.py | 41 + foundry_sdk/_errors/api_not_found.py | 23 + foundry_sdk/_errors/connection_error.py | 24 + .../_errors/environment_not_configured.py | 21 + foundry_sdk/_errors/not_authenticated.py | 20 + foundry_sdk/_errors/palantir_exception.py | 17 + foundry_sdk/_errors/palantir_qos_exception.py | 34 + foundry_sdk/_errors/palantir_rpc_exception.py | 79 + foundry_sdk/_errors/sdk_internal_error.py | 72 + foundry_sdk/_errors/stream_error.py | 20 + foundry_sdk/_errors/timeout_error.py | 33 + foundry_sdk/_errors/utils.py | 64 + foundry_sdk/_versions.py | 20 + foundry_sdk/py.typed | 0 foundry_sdk/v1/__init__.py | 22 + foundry_sdk/v1/cli.py | 1610 +++ foundry_sdk/v1/client.py | 84 + foundry_sdk/v1/core/errors.py | 204 + foundry_sdk/v1/core/models.py | 279 + foundry_sdk/v1/datasets/__init__.py | 22 + foundry_sdk/v1/datasets/_client.py | 69 + foundry_sdk/v1/datasets/branch.py | 559 + foundry_sdk/v1/datasets/dataset.py | 983 ++ foundry_sdk/v1/datasets/errors.py | 457 + foundry_sdk/v1/datasets/file.py | 1108 ++ foundry_sdk/v1/datasets/models.py | 143 + foundry_sdk/v1/datasets/transaction.py | 570 + foundry_sdk/v1/geo/errors.py | 16 + foundry_sdk/v1/geo/models.py | 22 + foundry_sdk/v1/ontologies/__init__.py | 22 + foundry_sdk/v1/ontologies/_client.py | 121 + foundry_sdk/v1/ontologies/action.py | 463 + foundry_sdk/v1/ontologies/action_type.py | 300 + foundry_sdk/v1/ontologies/attachment.py | 388 + foundry_sdk/v1/ontologies/errors.py | 2482 ++++ foundry_sdk/v1/ontologies/models.py | 1702 +++ foundry_sdk/v1/ontologies/object_type.py | 536 + foundry_sdk/v1/ontologies/ontology.py | 318 + foundry_sdk/v1/ontologies/ontology_object.py | 994 ++ foundry_sdk/v1/ontologies/query.py | 228 + foundry_sdk/v1/ontologies/query_type.py | 300 + foundry_sdk/v2/__init__.py | 22 + foundry_sdk/v2/admin/__init__.py | 22 + foundry_sdk/v2/admin/_client.py | 149 + .../v2/admin/authentication_provider.py | 641 + foundry_sdk/v2/admin/enrollment.py | 366 + .../v2/admin/enrollment_role_assignment.py | 451 + foundry_sdk/v2/admin/errors.py | 1101 ++ foundry_sdk/v2/admin/group.py | 794 ++ foundry_sdk/v2/admin/group_member.py | 460 + foundry_sdk/v2/admin/group_membership.py | 236 + .../group_membership_expiration_policy.py | 329 + foundry_sdk/v2/admin/group_provider_info.py | 337 + foundry_sdk/v2/admin/host.py | 226 + foundry_sdk/v2/admin/marking.py | 766 ++ foundry_sdk/v2/admin/marking_category.py | 312 + foundry_sdk/v2/admin/marking_member.py | 449 + .../v2/admin/marking_role_assignment.py | 447 + foundry_sdk/v2/admin/models.py | 884 ++ foundry_sdk/v2/admin/organization.py | 642 + .../v2/admin/organization_role_assignment.py | 443 + foundry_sdk/v2/admin/role.py | 302 + foundry_sdk/v2/admin/user.py | 1094 ++ foundry_sdk/v2/admin/user_provider_info.py | 345 + foundry_sdk/v2/aip_agents/__init__.py | 22 + foundry_sdk/v2/aip_agents/_client.py | 69 + foundry_sdk/v2/aip_agents/agent.py | 376 + foundry_sdk/v2/aip_agents/agent_version.py | 341 + foundry_sdk/v2/aip_agents/content.py | 213 + foundry_sdk/v2/aip_agents/errors.py | 647 + foundry_sdk/v2/aip_agents/models.py | 722 + foundry_sdk/v2/aip_agents/session.py | 1542 +++ foundry_sdk/v2/aip_agents/session_trace.py | 227 + foundry_sdk/v2/audit/__init__.py | 22 + foundry_sdk/v2/audit/_client.py | 69 + foundry_sdk/v2/audit/errors.py | 72 + foundry_sdk/v2/audit/log_file.py | 332 + foundry_sdk/v2/audit/models.py | 46 + foundry_sdk/v2/audit/organization.py | 111 + foundry_sdk/v2/cli.py | 11411 ++++++++++++++++ foundry_sdk/v2/client.py | 154 + foundry_sdk/v2/connectivity/__init__.py | 22 + foundry_sdk/v2/connectivity/_client.py | 69 + foundry_sdk/v2/connectivity/connection.py | 1075 ++ foundry_sdk/v2/connectivity/errors.py | 780 ++ foundry_sdk/v2/connectivity/file_import.py | 937 ++ foundry_sdk/v2/connectivity/models.py | 2268 +++ foundry_sdk/v2/connectivity/table_import.py | 921 ++ foundry_sdk/v2/connectivity/virtual_table.py | 254 + foundry_sdk/v2/core/errors.py | 387 + foundry_sdk/v2/core/models.py | 1037 ++ foundry_sdk/v2/data_health/__init__.py | 22 + foundry_sdk/v2/data_health/_client.py | 82 + foundry_sdk/v2/data_health/check.py | 591 + foundry_sdk/v2/data_health/check_report.py | 201 + foundry_sdk/v2/data_health/errors.py | 253 + foundry_sdk/v2/data_health/models.py | 732 + foundry_sdk/v2/datasets/__init__.py | 22 + foundry_sdk/v2/datasets/_client.py | 82 + foundry_sdk/v2/datasets/branch.py | 710 + foundry_sdk/v2/datasets/dataset.py | 1550 +++ foundry_sdk/v2/datasets/errors.py | 974 ++ foundry_sdk/v2/datasets/file.py | 1058 ++ foundry_sdk/v2/datasets/models.py | 466 + foundry_sdk/v2/datasets/transaction.py | 823 ++ foundry_sdk/v2/datasets/view.py | 1009 ++ foundry_sdk/v2/filesystem/__init__.py | 22 + foundry_sdk/v2/filesystem/_client.py | 108 + foundry_sdk/v2/filesystem/errors.py | 1139 ++ foundry_sdk/v2/filesystem/folder.py | 598 + foundry_sdk/v2/filesystem/models.py | 668 + foundry_sdk/v2/filesystem/project.py | 1121 ++ foundry_sdk/v2/filesystem/resource.py | 1417 ++ foundry_sdk/v2/filesystem/resource_role.py | 440 + foundry_sdk/v2/filesystem/space.py | 763 ++ foundry_sdk/v2/functions/__init__.py | 22 + foundry_sdk/v2/functions/_client.py | 82 + foundry_sdk/v2/functions/errors.py | 315 + foundry_sdk/v2/functions/models.py | 653 + foundry_sdk/v2/functions/query.py | 720 + foundry_sdk/v2/functions/value_type.py | 220 + foundry_sdk/v2/functions/version_id.py | 207 + foundry_sdk/v2/geo/errors.py | 16 + foundry_sdk/v2/geo/models.py | 226 + foundry_sdk/v2/language_models/__init__.py | 30 + foundry_sdk/v2/language_models/_client.py | 82 + .../v2/language_models/anthropic_model.py | 297 + foundry_sdk/v2/language_models/errors.py | 90 + foundry_sdk/v2/language_models/models.py | 496 + .../v2/language_models/open_ai_model.py | 233 + foundry_sdk/v2/media_sets/__init__.py | 22 + foundry_sdk/v2/media_sets/_client.py | 69 + foundry_sdk/v2/media_sets/errors.py | 274 + foundry_sdk/v2/media_sets/media_set.py | 1486 ++ foundry_sdk/v2/media_sets/models.py | 129 + foundry_sdk/v2/models/__init__.py | 22 + foundry_sdk/v2/models/_client.py | 69 + foundry_sdk/v2/models/errors.py | 123 + foundry_sdk/v2/models/model.py | 333 + foundry_sdk/v2/models/model_version.py | 457 + foundry_sdk/v2/models/models.py | 219 + foundry_sdk/v2/ontologies/__init__.py | 22 + foundry_sdk/v2/ontologies/_client.py | 312 + foundry_sdk/v2/ontologies/action.py | 566 + foundry_sdk/v2/ontologies/action_type.py | 424 + .../ontologies/action_type_full_metadata.py | 318 + foundry_sdk/v2/ontologies/attachment.py | 522 + .../v2/ontologies/attachment_property.py | 651 + .../v2/ontologies/cipher_text_property.py | 203 + foundry_sdk/v2/ontologies/errors.py | 2482 ++++ foundry_sdk/v2/ontologies/linked_object.py | 482 + .../v2/ontologies/media_reference_property.py | 514 + foundry_sdk/v2/ontologies/models.py | 5170 +++++++ foundry_sdk/v2/ontologies/object_type.py | 708 + foundry_sdk/v2/ontologies/ontology.py | 577 + .../v2/ontologies/ontology_interface.py | 1448 ++ foundry_sdk/v2/ontologies/ontology_object.py | 945 ++ .../v2/ontologies/ontology_object_set.py | 1353 ++ .../v2/ontologies/ontology_transaction.py | 210 + .../v2/ontologies/ontology_value_type.py | 296 + foundry_sdk/v2/ontologies/query.py | 266 + foundry_sdk/v2/ontologies/query_type.py | 326 + .../v2/ontologies/time_series_property_v2.py | 513 + .../time_series_value_bank_property.py | 369 + foundry_sdk/v2/orchestration/__init__.py | 22 + foundry_sdk/v2/orchestration/_client.py | 123 + foundry_sdk/v2/orchestration/build.py | 757 + foundry_sdk/v2/orchestration/errors.py | 574 + foundry_sdk/v2/orchestration/job.py | 302 + foundry_sdk/v2/orchestration/models.py | 963 ++ foundry_sdk/v2/orchestration/schedule.py | 1162 ++ foundry_sdk/v2/orchestration/schedule_run.py | 90 + .../v2/orchestration/schedule_version.py | 293 + foundry_sdk/v2/sql_queries/__init__.py | 22 + foundry_sdk/v2/sql_queries/_client.py | 69 + foundry_sdk/v2/sql_queries/errors.py | 190 + foundry_sdk/v2/sql_queries/models.py | 100 + foundry_sdk/v2/sql_queries/sql_query.py | 630 + foundry_sdk/v2/streams/__init__.py | 22 + foundry_sdk/v2/streams/_client.py | 69 + foundry_sdk/v2/streams/dataset.py | 298 + foundry_sdk/v2/streams/errors.py | 272 + foundry_sdk/v2/streams/models.py | 273 + foundry_sdk/v2/streams/stream.py | 960 ++ .../v2/third_party_applications/__init__.py | 24 + .../v2/third_party_applications/_client.py | 75 + .../v2/third_party_applications/errors.py | 275 + .../v2/third_party_applications/models.py | 84 + .../third_party_application.py | 222 + .../v2/third_party_applications/version.py | 645 + .../v2/third_party_applications/website.py | 411 + foundry_sdk/v2/widgets/__init__.py | 22 + foundry_sdk/v2/widgets/_client.py | 97 + foundry_sdk/v2/widgets/dev_mode_settings.py | 711 + foundry_sdk/v2/widgets/errors.py | 844 ++ foundry_sdk/v2/widgets/models.py | 235 + foundry_sdk/v2/widgets/release.py | 425 + foundry_sdk/v2/widgets/repository.py | 317 + foundry_sdk/v2/widgets/widget_set.py | 218 + pyproject.toml | 46 + tests/auth/__init__.py | 0 tests/auth/test_confidential_client.py | 163 + ...confidential_client_oauth_flow_provider.py | 106 + tests/auth/test_oauth_utils.py | 87 + tests/auth/test_public_client.py | 178 + .../test_public_client_oauth_flow_provider.py | 136 + tests/auth/test_user_auth_token_client.py | 25 + tests/conftest.py | 35 + tests/server.py | 82 + tests/test_api_client.py | 664 + tests/test_body_serialization.py | 513 + tests/test_client_init_helpers.py | 154 + tests/test_datetime.py | 27 + tests/test_discriminators.py | 102 + tests/test_errors.py | 50 + tests/test_exception.py | 108 + tests/test_http_client.py | 333 + tests/test_model_base.py | 288 + tests/test_page_iterator.py | 138 + tests/test_performance.py | 423 + tests/test_resorce_import.py | 582 + tests/test_resource_iterator.py | 215 + tests/test_response_types.py | 652 + tests/test_utils.py | 185 + 1975 files changed, 159903 insertions(+) create mode 100644 .bulldozer.yml create mode 100644 .changelog.yml create mode 100644 .circleci/config.yml create mode 100644 .gitignore create mode 100644 LICENSE create mode 100644 README.md create mode 100644 docs-snippets-npm/.gitignore create mode 100644 docs-snippets-npm/package.json create mode 100644 docs-snippets-npm/src/index.ts create mode 100644 docs-snippets-npm/tsconfig.json create mode 100644 docs/v1/Core/models/AnyType.md create mode 100644 docs/v1/Core/models/AttachmentType.md create mode 100644 docs/v1/Core/models/Attribution.md create mode 100644 docs/v1/Core/models/BinaryType.md create mode 100644 docs/v1/Core/models/BooleanType.md create mode 100644 docs/v1/Core/models/ByteType.md create mode 100644 docs/v1/Core/models/CipherTextType.md create mode 100644 docs/v1/Core/models/ContentLength.md create mode 100644 docs/v1/Core/models/ContentType.md create mode 100644 docs/v1/Core/models/DateType.md create mode 100644 docs/v1/Core/models/DecimalType.md create mode 100644 docs/v1/Core/models/DisplayName.md create mode 100644 docs/v1/Core/models/DistanceUnit.md create mode 100644 docs/v1/Core/models/DoubleType.md create mode 100644 docs/v1/Core/models/FilePath.md create mode 100644 docs/v1/Core/models/Filename.md create mode 100644 docs/v1/Core/models/FloatType.md create mode 100644 docs/v1/Core/models/FolderRid.md create mode 100644 docs/v1/Core/models/FoundryBranch.md create mode 100644 docs/v1/Core/models/IntegerType.md create mode 100644 docs/v1/Core/models/LongType.md create mode 100644 docs/v1/Core/models/MarkingType.md create mode 100644 docs/v1/Core/models/MediaType.md create mode 100644 docs/v1/Core/models/NullType.md create mode 100644 docs/v1/Core/models/OperationScope.md create mode 100644 docs/v1/Core/models/PageSize.md create mode 100644 docs/v1/Core/models/PageToken.md create mode 100644 docs/v1/Core/models/PreviewMode.md create mode 100644 docs/v1/Core/models/ReleaseStatus.md create mode 100644 docs/v1/Core/models/ShortType.md create mode 100644 docs/v1/Core/models/SizeBytes.md create mode 100644 docs/v1/Core/models/StringType.md create mode 100644 docs/v1/Core/models/StructFieldName.md create mode 100644 docs/v1/Core/models/TimestampType.md create mode 100644 docs/v1/Core/models/TotalCount.md create mode 100644 docs/v1/Core/models/TraceParent.md create mode 100644 docs/v1/Core/models/TraceState.md create mode 100644 docs/v1/Core/models/UnsupportedType.md create mode 100644 docs/v1/Datasets/Branch.md create mode 100644 docs/v1/Datasets/Dataset.md create mode 100644 docs/v1/Datasets/File.md create mode 100644 docs/v1/Datasets/Transaction.md create mode 100644 docs/v1/Datasets/models/Branch.md create mode 100644 docs/v1/Datasets/models/BranchId.md create mode 100644 docs/v1/Datasets/models/CreateBranchRequest.md create mode 100644 docs/v1/Datasets/models/CreateDatasetRequest.md create mode 100644 docs/v1/Datasets/models/CreateTransactionRequest.md create mode 100644 docs/v1/Datasets/models/Dataset.md create mode 100644 docs/v1/Datasets/models/DatasetName.md create mode 100644 docs/v1/Datasets/models/DatasetRid.md create mode 100644 docs/v1/Datasets/models/File.md create mode 100644 docs/v1/Datasets/models/ListBranchesResponse.md create mode 100644 docs/v1/Datasets/models/ListFilesResponse.md create mode 100644 docs/v1/Datasets/models/TableExportFormat.md create mode 100644 docs/v1/Datasets/models/Transaction.md create mode 100644 docs/v1/Datasets/models/TransactionRid.md create mode 100644 docs/v1/Datasets/models/TransactionStatus.md create mode 100644 docs/v1/Datasets/models/TransactionType.md create mode 100644 docs/v1/Ontologies/Action.md create mode 100644 docs/v1/Ontologies/ActionType.md create mode 100644 docs/v1/Ontologies/Attachment.md create mode 100644 docs/v1/Ontologies/ObjectType.md create mode 100644 docs/v1/Ontologies/Ontology.md create mode 100644 docs/v1/Ontologies/OntologyObject.md create mode 100644 docs/v1/Ontologies/Query.md create mode 100644 docs/v1/Ontologies/QueryType.md create mode 100644 docs/v1/Ontologies/models/ActionRid.md create mode 100644 docs/v1/Ontologies/models/ActionType.md create mode 100644 docs/v1/Ontologies/models/ActionTypeApiName.md create mode 100644 docs/v1/Ontologies/models/ActionTypeRid.md create mode 100644 docs/v1/Ontologies/models/AggregateObjectsRequest.md create mode 100644 docs/v1/Ontologies/models/AggregateObjectsResponse.md create mode 100644 docs/v1/Ontologies/models/AggregateObjectsResponseItem.md create mode 100644 docs/v1/Ontologies/models/Aggregation.md create mode 100644 docs/v1/Ontologies/models/AggregationDurationGrouping.md create mode 100644 docs/v1/Ontologies/models/AggregationExactGrouping.md create mode 100644 docs/v1/Ontologies/models/AggregationFixedWidthGrouping.md create mode 100644 docs/v1/Ontologies/models/AggregationGroupBy.md create mode 100644 docs/v1/Ontologies/models/AggregationGroupKey.md create mode 100644 docs/v1/Ontologies/models/AggregationGroupValue.md create mode 100644 docs/v1/Ontologies/models/AggregationMetricName.md create mode 100644 docs/v1/Ontologies/models/AggregationMetricResult.md create mode 100644 docs/v1/Ontologies/models/AggregationRange.md create mode 100644 docs/v1/Ontologies/models/AggregationRangesGrouping.md create mode 100644 docs/v1/Ontologies/models/AllTermsQuery.md create mode 100644 docs/v1/Ontologies/models/AndQuery.md create mode 100644 docs/v1/Ontologies/models/AnyTermQuery.md create mode 100644 docs/v1/Ontologies/models/ApplyActionMode.md create mode 100644 docs/v1/Ontologies/models/ApplyActionRequest.md create mode 100644 docs/v1/Ontologies/models/ApplyActionRequestOptions.md create mode 100644 docs/v1/Ontologies/models/ApplyActionResponse.md create mode 100644 docs/v1/Ontologies/models/ApproximateDistinctAggregation.md create mode 100644 docs/v1/Ontologies/models/ArrayEntryEvaluatedConstraint.md create mode 100644 docs/v1/Ontologies/models/ArrayEvaluatedConstraint.md create mode 100644 docs/v1/Ontologies/models/ArraySizeConstraint.md create mode 100644 docs/v1/Ontologies/models/ArtifactRepositoryRid.md create mode 100644 docs/v1/Ontologies/models/Attachment.md create mode 100644 docs/v1/Ontologies/models/AttachmentRid.md create mode 100644 docs/v1/Ontologies/models/AvgAggregation.md create mode 100644 docs/v1/Ontologies/models/BatchApplyActionRequest.md create mode 100644 docs/v1/Ontologies/models/BatchApplyActionResponse.md create mode 100644 docs/v1/Ontologies/models/ContainsQuery.md create mode 100644 docs/v1/Ontologies/models/CountAggregation.md create mode 100644 docs/v1/Ontologies/models/CreateInterfaceObjectRule.md create mode 100644 docs/v1/Ontologies/models/CreateLinkRule.md create mode 100644 docs/v1/Ontologies/models/CreateObjectRule.md create mode 100644 docs/v1/Ontologies/models/DataValue.md create mode 100644 docs/v1/Ontologies/models/DeleteInterfaceObjectRule.md create mode 100644 docs/v1/Ontologies/models/DeleteLinkRule.md create mode 100644 docs/v1/Ontologies/models/DeleteObjectRule.md create mode 100644 docs/v1/Ontologies/models/DerivedPropertyApiName.md create mode 100644 docs/v1/Ontologies/models/Duration.md create mode 100644 docs/v1/Ontologies/models/EntrySetType.md create mode 100644 docs/v1/Ontologies/models/EqualsQuery.md create mode 100644 docs/v1/Ontologies/models/ExecuteQueryRequest.md create mode 100644 docs/v1/Ontologies/models/ExecuteQueryResponse.md create mode 100644 docs/v1/Ontologies/models/FieldNameV1.md create mode 100644 docs/v1/Ontologies/models/FilterValue.md create mode 100644 docs/v1/Ontologies/models/FunctionRid.md create mode 100644 docs/v1/Ontologies/models/FunctionVersion.md create mode 100644 docs/v1/Ontologies/models/Fuzzy.md create mode 100644 docs/v1/Ontologies/models/GroupMemberConstraint.md create mode 100644 docs/v1/Ontologies/models/GtQuery.md create mode 100644 docs/v1/Ontologies/models/GteQuery.md create mode 100644 docs/v1/Ontologies/models/InterfaceLinkTypeApiName.md create mode 100644 docs/v1/Ontologies/models/InterfaceLinkTypeRid.md create mode 100644 docs/v1/Ontologies/models/InterfacePropertyApiName.md create mode 100644 docs/v1/Ontologies/models/InterfaceTypeApiName.md create mode 100644 docs/v1/Ontologies/models/InterfaceTypeRid.md create mode 100644 docs/v1/Ontologies/models/IsNullQuery.md create mode 100644 docs/v1/Ontologies/models/LegacyObjectTypeId.md create mode 100644 docs/v1/Ontologies/models/LegacyPropertyId.md create mode 100644 docs/v1/Ontologies/models/LinkTypeApiName.md create mode 100644 docs/v1/Ontologies/models/LinkTypeId.md create mode 100644 docs/v1/Ontologies/models/LinkTypeSide.md create mode 100644 docs/v1/Ontologies/models/LinkTypeSideCardinality.md create mode 100644 docs/v1/Ontologies/models/ListActionTypesResponse.md create mode 100644 docs/v1/Ontologies/models/ListLinkedObjectsResponse.md create mode 100644 docs/v1/Ontologies/models/ListObjectTypesResponse.md create mode 100644 docs/v1/Ontologies/models/ListObjectsResponse.md create mode 100644 docs/v1/Ontologies/models/ListOntologiesResponse.md create mode 100644 docs/v1/Ontologies/models/ListOutgoingLinkTypesResponse.md create mode 100644 docs/v1/Ontologies/models/ListQueryTypesResponse.md create mode 100644 docs/v1/Ontologies/models/LogicRule.md create mode 100644 docs/v1/Ontologies/models/LtQuery.md create mode 100644 docs/v1/Ontologies/models/LteQuery.md create mode 100644 docs/v1/Ontologies/models/MaxAggregation.md create mode 100644 docs/v1/Ontologies/models/MinAggregation.md create mode 100644 docs/v1/Ontologies/models/ModifyInterfaceObjectRule.md create mode 100644 docs/v1/Ontologies/models/ModifyObjectRule.md create mode 100644 docs/v1/Ontologies/models/NotQuery.md create mode 100644 docs/v1/Ontologies/models/ObjectPropertyValueConstraint.md create mode 100644 docs/v1/Ontologies/models/ObjectQueryResultConstraint.md create mode 100644 docs/v1/Ontologies/models/ObjectRid.md create mode 100644 docs/v1/Ontologies/models/ObjectSetRid.md create mode 100644 docs/v1/Ontologies/models/ObjectType.md create mode 100644 docs/v1/Ontologies/models/ObjectTypeApiName.md create mode 100644 docs/v1/Ontologies/models/ObjectTypeRid.md create mode 100644 docs/v1/Ontologies/models/ObjectTypeVisibility.md create mode 100644 docs/v1/Ontologies/models/OneOfConstraint.md create mode 100644 docs/v1/Ontologies/models/Ontology.md create mode 100644 docs/v1/Ontologies/models/OntologyApiName.md create mode 100644 docs/v1/Ontologies/models/OntologyArrayType.md create mode 100644 docs/v1/Ontologies/models/OntologyDataType.md create mode 100644 docs/v1/Ontologies/models/OntologyInterfaceObjectSetType.md create mode 100644 docs/v1/Ontologies/models/OntologyInterfaceObjectType.md create mode 100644 docs/v1/Ontologies/models/OntologyMapType.md create mode 100644 docs/v1/Ontologies/models/OntologyObject.md create mode 100644 docs/v1/Ontologies/models/OntologyObjectSetType.md create mode 100644 docs/v1/Ontologies/models/OntologyObjectType.md create mode 100644 docs/v1/Ontologies/models/OntologyRid.md create mode 100644 docs/v1/Ontologies/models/OntologySetType.md create mode 100644 docs/v1/Ontologies/models/OntologyStructField.md create mode 100644 docs/v1/Ontologies/models/OntologyStructType.md create mode 100644 docs/v1/Ontologies/models/OrQuery.md create mode 100644 docs/v1/Ontologies/models/OrderBy.md create mode 100644 docs/v1/Ontologies/models/Parameter.md create mode 100644 docs/v1/Ontologies/models/ParameterEvaluatedConstraint.md create mode 100644 docs/v1/Ontologies/models/ParameterEvaluationResult.md create mode 100644 docs/v1/Ontologies/models/ParameterId.md create mode 100644 docs/v1/Ontologies/models/ParameterOption.md create mode 100644 docs/v1/Ontologies/models/PhraseQuery.md create mode 100644 docs/v1/Ontologies/models/PrefixQuery.md create mode 100644 docs/v1/Ontologies/models/PrimaryKeyValue.md create mode 100644 docs/v1/Ontologies/models/Property.md create mode 100644 docs/v1/Ontologies/models/PropertyApiName.md create mode 100644 docs/v1/Ontologies/models/PropertyFilter.md create mode 100644 docs/v1/Ontologies/models/PropertyId.md create mode 100644 docs/v1/Ontologies/models/PropertyTypeRid.md create mode 100644 docs/v1/Ontologies/models/PropertyValue.md create mode 100644 docs/v1/Ontologies/models/PropertyValueEscapedString.md create mode 100644 docs/v1/Ontologies/models/QueryAggregationKeyType.md create mode 100644 docs/v1/Ontologies/models/QueryAggregationRangeSubType.md create mode 100644 docs/v1/Ontologies/models/QueryAggregationRangeType.md create mode 100644 docs/v1/Ontologies/models/QueryAggregationValueType.md create mode 100644 docs/v1/Ontologies/models/QueryApiName.md create mode 100644 docs/v1/Ontologies/models/QueryArrayType.md create mode 100644 docs/v1/Ontologies/models/QueryDataType.md create mode 100644 docs/v1/Ontologies/models/QueryRuntimeErrorParameter.md create mode 100644 docs/v1/Ontologies/models/QuerySetType.md create mode 100644 docs/v1/Ontologies/models/QueryStructField.md create mode 100644 docs/v1/Ontologies/models/QueryStructType.md create mode 100644 docs/v1/Ontologies/models/QueryType.md create mode 100644 docs/v1/Ontologies/models/QueryUnionType.md create mode 100644 docs/v1/Ontologies/models/RangeConstraint.md create mode 100644 docs/v1/Ontologies/models/ReturnEditsMode.md create mode 100644 docs/v1/Ontologies/models/SdkPackageName.md create mode 100644 docs/v1/Ontologies/models/SdkPackageRid.md create mode 100644 docs/v1/Ontologies/models/SdkVersion.md create mode 100644 docs/v1/Ontologies/models/SearchJsonQuery.md create mode 100644 docs/v1/Ontologies/models/SearchObjectsRequest.md create mode 100644 docs/v1/Ontologies/models/SearchObjectsResponse.md create mode 100644 docs/v1/Ontologies/models/SearchOrderBy.md create mode 100644 docs/v1/Ontologies/models/SearchOrderByType.md create mode 100644 docs/v1/Ontologies/models/SearchOrdering.md create mode 100644 docs/v1/Ontologies/models/SelectedPropertyApiName.md create mode 100644 docs/v1/Ontologies/models/SharedPropertyTypeApiName.md create mode 100644 docs/v1/Ontologies/models/SharedPropertyTypeRid.md create mode 100644 docs/v1/Ontologies/models/StringLengthConstraint.md create mode 100644 docs/v1/Ontologies/models/StringRegexMatchConstraint.md create mode 100644 docs/v1/Ontologies/models/StructEvaluatedConstraint.md create mode 100644 docs/v1/Ontologies/models/StructFieldEvaluatedConstraint.md create mode 100644 docs/v1/Ontologies/models/StructFieldEvaluationResult.md create mode 100644 docs/v1/Ontologies/models/StructParameterFieldApiName.md create mode 100644 docs/v1/Ontologies/models/SubmissionCriteriaEvaluation.md create mode 100644 docs/v1/Ontologies/models/SumAggregation.md create mode 100644 docs/v1/Ontologies/models/ThreeDimensionalAggregation.md create mode 100644 docs/v1/Ontologies/models/TwoDimensionalAggregation.md create mode 100644 docs/v1/Ontologies/models/UnevaluableConstraint.md create mode 100644 docs/v1/Ontologies/models/UniqueIdentifierLinkId.md create mode 100644 docs/v1/Ontologies/models/ValidateActionRequest.md create mode 100644 docs/v1/Ontologies/models/ValidateActionResponse.md create mode 100644 docs/v1/Ontologies/models/ValidationResult.md create mode 100644 docs/v1/Ontologies/models/ValueType.md create mode 100644 docs/v1/Ontologies/models/ValueTypeApiName.md create mode 100644 docs/v1/Ontologies/models/ValueTypeRid.md create mode 100644 docs/v2/Admin/AuthenticationProvider.md create mode 100644 docs/v2/Admin/Enrollment.md create mode 100644 docs/v2/Admin/EnrollmentRoleAssignment.md create mode 100644 docs/v2/Admin/Group.md create mode 100644 docs/v2/Admin/GroupMember.md create mode 100644 docs/v2/Admin/GroupMembership.md create mode 100644 docs/v2/Admin/GroupMembershipExpirationPolicy.md create mode 100644 docs/v2/Admin/GroupProviderInfo.md create mode 100644 docs/v2/Admin/Host.md create mode 100644 docs/v2/Admin/Marking.md create mode 100644 docs/v2/Admin/MarkingCategory.md create mode 100644 docs/v2/Admin/MarkingMember.md create mode 100644 docs/v2/Admin/MarkingRoleAssignment.md create mode 100644 docs/v2/Admin/Organization.md create mode 100644 docs/v2/Admin/OrganizationRoleAssignment.md create mode 100644 docs/v2/Admin/Role.md create mode 100644 docs/v2/Admin/User.md create mode 100644 docs/v2/Admin/UserProviderInfo.md create mode 100644 docs/v2/Admin/models/AddEnrollmentRoleAssignmentsRequest.md create mode 100644 docs/v2/Admin/models/AddGroupMembersRequest.md create mode 100644 docs/v2/Admin/models/AddMarkingMembersRequest.md create mode 100644 docs/v2/Admin/models/AddMarkingRoleAssignmentsRequest.md create mode 100644 docs/v2/Admin/models/AddOrganizationRoleAssignmentsRequest.md create mode 100644 docs/v2/Admin/models/AttributeName.md create mode 100644 docs/v2/Admin/models/AttributeValue.md create mode 100644 docs/v2/Admin/models/AttributeValues.md create mode 100644 docs/v2/Admin/models/AuthenticationProtocol.md create mode 100644 docs/v2/Admin/models/AuthenticationProvider.md create mode 100644 docs/v2/Admin/models/AuthenticationProviderEnabled.md create mode 100644 docs/v2/Admin/models/AuthenticationProviderName.md create mode 100644 docs/v2/Admin/models/AuthenticationProviderRid.md create mode 100644 docs/v2/Admin/models/CertificateInfo.md create mode 100644 docs/v2/Admin/models/CertificateUsageType.md create mode 100644 docs/v2/Admin/models/CreateGroupRequest.md create mode 100644 docs/v2/Admin/models/CreateMarkingRequest.md create mode 100644 docs/v2/Admin/models/CreateOrganizationRequest.md create mode 100644 docs/v2/Admin/models/Enrollment.md create mode 100644 docs/v2/Admin/models/EnrollmentName.md create mode 100644 docs/v2/Admin/models/EnrollmentRoleAssignment.md create mode 100644 docs/v2/Admin/models/GetGroupsBatchRequestElement.md create mode 100644 docs/v2/Admin/models/GetGroupsBatchResponse.md create mode 100644 docs/v2/Admin/models/GetMarkingsBatchRequestElement.md create mode 100644 docs/v2/Admin/models/GetMarkingsBatchResponse.md create mode 100644 docs/v2/Admin/models/GetRolesBatchRequestElement.md create mode 100644 docs/v2/Admin/models/GetRolesBatchResponse.md create mode 100644 docs/v2/Admin/models/GetUserMarkingsResponse.md create mode 100644 docs/v2/Admin/models/GetUsersBatchRequestElement.md create mode 100644 docs/v2/Admin/models/GetUsersBatchResponse.md create mode 100644 docs/v2/Admin/models/Group.md create mode 100644 docs/v2/Admin/models/GroupMember.md create mode 100644 docs/v2/Admin/models/GroupMembership.md create mode 100644 docs/v2/Admin/models/GroupMembershipExpiration.md create mode 100644 docs/v2/Admin/models/GroupMembershipExpirationPolicy.md create mode 100644 docs/v2/Admin/models/GroupName.md create mode 100644 docs/v2/Admin/models/GroupProviderInfo.md create mode 100644 docs/v2/Admin/models/GroupSearchFilter.md create mode 100644 docs/v2/Admin/models/Host.md create mode 100644 docs/v2/Admin/models/HostName.md create mode 100644 docs/v2/Admin/models/ListAuthenticationProvidersResponse.md create mode 100644 docs/v2/Admin/models/ListAvailableOrganizationRolesResponse.md create mode 100644 docs/v2/Admin/models/ListEnrollmentRoleAssignmentsResponse.md create mode 100644 docs/v2/Admin/models/ListGroupMembersResponse.md create mode 100644 docs/v2/Admin/models/ListGroupMembershipsResponse.md create mode 100644 docs/v2/Admin/models/ListGroupsResponse.md create mode 100644 docs/v2/Admin/models/ListHostsResponse.md create mode 100644 docs/v2/Admin/models/ListMarkingCategoriesResponse.md create mode 100644 docs/v2/Admin/models/ListMarkingMembersResponse.md create mode 100644 docs/v2/Admin/models/ListMarkingRoleAssignmentsResponse.md create mode 100644 docs/v2/Admin/models/ListMarkingsResponse.md create mode 100644 docs/v2/Admin/models/ListOrganizationRoleAssignmentsResponse.md create mode 100644 docs/v2/Admin/models/ListUsersResponse.md create mode 100644 docs/v2/Admin/models/Marking.md create mode 100644 docs/v2/Admin/models/MarkingCategory.md create mode 100644 docs/v2/Admin/models/MarkingCategoryId.md create mode 100644 docs/v2/Admin/models/MarkingCategoryName.md create mode 100644 docs/v2/Admin/models/MarkingCategoryType.md create mode 100644 docs/v2/Admin/models/MarkingMember.md create mode 100644 docs/v2/Admin/models/MarkingName.md create mode 100644 docs/v2/Admin/models/MarkingRole.md create mode 100644 docs/v2/Admin/models/MarkingRoleAssignment.md create mode 100644 docs/v2/Admin/models/MarkingRoleUpdate.md create mode 100644 docs/v2/Admin/models/MarkingType.md create mode 100644 docs/v2/Admin/models/OidcAuthenticationProtocol.md create mode 100644 docs/v2/Admin/models/Organization.md create mode 100644 docs/v2/Admin/models/OrganizationName.md create mode 100644 docs/v2/Admin/models/OrganizationRoleAssignment.md create mode 100644 docs/v2/Admin/models/PreregisterGroupRequest.md create mode 100644 docs/v2/Admin/models/PreregisterUserRequest.md create mode 100644 docs/v2/Admin/models/PrincipalFilterType.md create mode 100644 docs/v2/Admin/models/ProviderId.md create mode 100644 docs/v2/Admin/models/RemoveEnrollmentRoleAssignmentsRequest.md create mode 100644 docs/v2/Admin/models/RemoveGroupMembersRequest.md create mode 100644 docs/v2/Admin/models/RemoveMarkingMembersRequest.md create mode 100644 docs/v2/Admin/models/RemoveMarkingRoleAssignmentsRequest.md create mode 100644 docs/v2/Admin/models/RemoveOrganizationRoleAssignmentsRequest.md create mode 100644 docs/v2/Admin/models/ReplaceGroupMembershipExpirationPolicyRequest.md create mode 100644 docs/v2/Admin/models/ReplaceGroupProviderInfoRequest.md create mode 100644 docs/v2/Admin/models/ReplaceMarkingRequest.md create mode 100644 docs/v2/Admin/models/ReplaceOrganizationRequest.md create mode 100644 docs/v2/Admin/models/ReplaceUserProviderInfoRequest.md create mode 100644 docs/v2/Admin/models/Role.md create mode 100644 docs/v2/Admin/models/RoleDescription.md create mode 100644 docs/v2/Admin/models/RoleDisplayName.md create mode 100644 docs/v2/Admin/models/SamlAuthenticationProtocol.md create mode 100644 docs/v2/Admin/models/SamlServiceProviderMetadata.md create mode 100644 docs/v2/Admin/models/SearchGroupsRequest.md create mode 100644 docs/v2/Admin/models/SearchGroupsResponse.md create mode 100644 docs/v2/Admin/models/SearchUsersRequest.md create mode 100644 docs/v2/Admin/models/SearchUsersResponse.md create mode 100644 docs/v2/Admin/models/User.md create mode 100644 docs/v2/Admin/models/UserProviderInfo.md create mode 100644 docs/v2/Admin/models/UserSearchFilter.md create mode 100644 docs/v2/Admin/models/UserUsername.md create mode 100644 docs/v2/AipAgents/Agent.md create mode 100644 docs/v2/AipAgents/AgentVersion.md create mode 100644 docs/v2/AipAgents/Content.md create mode 100644 docs/v2/AipAgents/Session.md create mode 100644 docs/v2/AipAgents/SessionTrace.md create mode 100644 docs/v2/AipAgents/models/Agent.md create mode 100644 docs/v2/AipAgents/models/AgentMarkdownResponse.md create mode 100644 docs/v2/AipAgents/models/AgentMetadata.md create mode 100644 docs/v2/AipAgents/models/AgentRid.md create mode 100644 docs/v2/AipAgents/models/AgentSessionRagContextResponse.md create mode 100644 docs/v2/AipAgents/models/AgentVersion.md create mode 100644 docs/v2/AipAgents/models/AgentVersionDetails.md create mode 100644 docs/v2/AipAgents/models/AgentVersionString.md create mode 100644 docs/v2/AipAgents/models/AgentsSessionsPage.md create mode 100644 docs/v2/AipAgents/models/BlockingContinueSessionRequest.md create mode 100644 docs/v2/AipAgents/models/CancelSessionRequest.md create mode 100644 docs/v2/AipAgents/models/CancelSessionResponse.md create mode 100644 docs/v2/AipAgents/models/Content.md create mode 100644 docs/v2/AipAgents/models/CreateSessionRequest.md create mode 100644 docs/v2/AipAgents/models/FailureToolCallOutput.md create mode 100644 docs/v2/AipAgents/models/FunctionRetrievedContext.md create mode 100644 docs/v2/AipAgents/models/GetRagContextForSessionRequest.md create mode 100644 docs/v2/AipAgents/models/InputContext.md create mode 100644 docs/v2/AipAgents/models/ListAgentVersionsResponse.md create mode 100644 docs/v2/AipAgents/models/ListSessionsResponse.md create mode 100644 docs/v2/AipAgents/models/MessageId.md create mode 100644 docs/v2/AipAgents/models/ObjectContext.md create mode 100644 docs/v2/AipAgents/models/ObjectSetParameter.md create mode 100644 docs/v2/AipAgents/models/ObjectSetParameterValue.md create mode 100644 docs/v2/AipAgents/models/ObjectSetParameterValueUpdate.md create mode 100644 docs/v2/AipAgents/models/Parameter.md create mode 100644 docs/v2/AipAgents/models/ParameterAccessMode.md create mode 100644 docs/v2/AipAgents/models/ParameterId.md create mode 100644 docs/v2/AipAgents/models/ParameterType.md create mode 100644 docs/v2/AipAgents/models/ParameterValue.md create mode 100644 docs/v2/AipAgents/models/ParameterValueUpdate.md create mode 100644 docs/v2/AipAgents/models/RidToolInputValue.md create mode 100644 docs/v2/AipAgents/models/RidToolOutputValue.md create mode 100644 docs/v2/AipAgents/models/Session.md create mode 100644 docs/v2/AipAgents/models/SessionExchange.md create mode 100644 docs/v2/AipAgents/models/SessionExchangeContexts.md create mode 100644 docs/v2/AipAgents/models/SessionExchangeResult.md create mode 100644 docs/v2/AipAgents/models/SessionMetadata.md create mode 100644 docs/v2/AipAgents/models/SessionRid.md create mode 100644 docs/v2/AipAgents/models/SessionTrace.md create mode 100644 docs/v2/AipAgents/models/SessionTraceId.md create mode 100644 docs/v2/AipAgents/models/SessionTraceStatus.md create mode 100644 docs/v2/AipAgents/models/StreamingContinueSessionRequest.md create mode 100644 docs/v2/AipAgents/models/StringParameter.md create mode 100644 docs/v2/AipAgents/models/StringParameterValue.md create mode 100644 docs/v2/AipAgents/models/StringToolInputValue.md create mode 100644 docs/v2/AipAgents/models/StringToolOutputValue.md create mode 100644 docs/v2/AipAgents/models/SuccessToolCallOutput.md create mode 100644 docs/v2/AipAgents/models/ToolCall.md create mode 100644 docs/v2/AipAgents/models/ToolCallGroup.md create mode 100644 docs/v2/AipAgents/models/ToolCallInput.md create mode 100644 docs/v2/AipAgents/models/ToolCallOutput.md create mode 100644 docs/v2/AipAgents/models/ToolInputName.md create mode 100644 docs/v2/AipAgents/models/ToolInputValue.md create mode 100644 docs/v2/AipAgents/models/ToolMetadata.md create mode 100644 docs/v2/AipAgents/models/ToolOutputValue.md create mode 100644 docs/v2/AipAgents/models/ToolType.md create mode 100644 docs/v2/AipAgents/models/UpdateSessionTitleRequest.md create mode 100644 docs/v2/AipAgents/models/UserTextInput.md create mode 100644 docs/v2/Audit/LogFile.md create mode 100644 docs/v2/Audit/Organization.md create mode 100644 docs/v2/Audit/models/FileId.md create mode 100644 docs/v2/Audit/models/ListLogFilesResponse.md create mode 100644 docs/v2/Audit/models/LogFile.md create mode 100644 docs/v2/Connectivity/Connection.md create mode 100644 docs/v2/Connectivity/FileImport.md create mode 100644 docs/v2/Connectivity/TableImport.md create mode 100644 docs/v2/Connectivity/VirtualTable.md create mode 100644 docs/v2/Connectivity/models/ApiKeyAuthentication.md create mode 100644 docs/v2/Connectivity/models/AsPlaintextValue.md create mode 100644 docs/v2/Connectivity/models/AsSecretName.md create mode 100644 docs/v2/Connectivity/models/AwsAccessKey.md create mode 100644 docs/v2/Connectivity/models/AwsOidcAuthentication.md create mode 100644 docs/v2/Connectivity/models/BasicCredentials.md create mode 100644 docs/v2/Connectivity/models/BearerToken.md create mode 100644 docs/v2/Connectivity/models/BigQueryVirtualTableConfig.md create mode 100644 docs/v2/Connectivity/models/CloudIdentity.md create mode 100644 docs/v2/Connectivity/models/CloudIdentityRid.md create mode 100644 docs/v2/Connectivity/models/Connection.md create mode 100644 docs/v2/Connectivity/models/ConnectionConfiguration.md create mode 100644 docs/v2/Connectivity/models/ConnectionDisplayName.md create mode 100644 docs/v2/Connectivity/models/ConnectionExportSettings.md create mode 100644 docs/v2/Connectivity/models/ConnectionRid.md create mode 100644 docs/v2/Connectivity/models/ConnectionWorker.md create mode 100644 docs/v2/Connectivity/models/CreateConnectionRequest.md create mode 100644 docs/v2/Connectivity/models/CreateConnectionRequestAsPlaintextValue.md create mode 100644 docs/v2/Connectivity/models/CreateConnectionRequestAsSecretName.md create mode 100644 docs/v2/Connectivity/models/CreateConnectionRequestBasicCredentials.md create mode 100644 docs/v2/Connectivity/models/CreateConnectionRequestConnectionConfiguration.md create mode 100644 docs/v2/Connectivity/models/CreateConnectionRequestConnectionWorker.md create mode 100644 docs/v2/Connectivity/models/CreateConnectionRequestDatabricksAuthenticationMode.md create mode 100644 docs/v2/Connectivity/models/CreateConnectionRequestDatabricksConnectionConfiguration.md create mode 100644 docs/v2/Connectivity/models/CreateConnectionRequestEncryptedProperty.md create mode 100644 docs/v2/Connectivity/models/CreateConnectionRequestFoundryWorker.md create mode 100644 docs/v2/Connectivity/models/CreateConnectionRequestJdbcConnectionConfiguration.md create mode 100644 docs/v2/Connectivity/models/CreateConnectionRequestOauthMachineToMachineAuth.md create mode 100644 docs/v2/Connectivity/models/CreateConnectionRequestPersonalAccessToken.md create mode 100644 docs/v2/Connectivity/models/CreateConnectionRequestRestConnectionConfiguration.md create mode 100644 docs/v2/Connectivity/models/CreateConnectionRequestS3ConnectionConfiguration.md create mode 100644 docs/v2/Connectivity/models/CreateConnectionRequestSmbAuth.md create mode 100644 docs/v2/Connectivity/models/CreateConnectionRequestSmbConnectionConfiguration.md create mode 100644 docs/v2/Connectivity/models/CreateConnectionRequestSmbUsernamePasswordAuth.md create mode 100644 docs/v2/Connectivity/models/CreateConnectionRequestSnowflakeAuthenticationMode.md create mode 100644 docs/v2/Connectivity/models/CreateConnectionRequestSnowflakeConnectionConfiguration.md create mode 100644 docs/v2/Connectivity/models/CreateConnectionRequestSnowflakeExternalOauth.md create mode 100644 docs/v2/Connectivity/models/CreateConnectionRequestSnowflakeKeyPairAuthentication.md create mode 100644 docs/v2/Connectivity/models/CreateConnectionRequestUnknownWorker.md create mode 100644 docs/v2/Connectivity/models/CreateConnectionRequestWorkflowIdentityFederation.md create mode 100644 docs/v2/Connectivity/models/CreateFileImportRequest.md create mode 100644 docs/v2/Connectivity/models/CreateTableImportRequest.md create mode 100644 docs/v2/Connectivity/models/CreateTableImportRequestDatabricksTableImportConfig.md create mode 100644 docs/v2/Connectivity/models/CreateTableImportRequestJdbcTableImportConfig.md create mode 100644 docs/v2/Connectivity/models/CreateTableImportRequestMicrosoftAccessTableImportConfig.md create mode 100644 docs/v2/Connectivity/models/CreateTableImportRequestMicrosoftSqlServerTableImportConfig.md create mode 100644 docs/v2/Connectivity/models/CreateTableImportRequestOracleTableImportConfig.md create mode 100644 docs/v2/Connectivity/models/CreateTableImportRequestPostgreSqlTableImportConfig.md create mode 100644 docs/v2/Connectivity/models/CreateTableImportRequestSnowflakeTableImportConfig.md create mode 100644 docs/v2/Connectivity/models/CreateTableImportRequestTableImportConfig.md create mode 100644 docs/v2/Connectivity/models/CreateVirtualTableRequest.md create mode 100644 docs/v2/Connectivity/models/DatabricksAuthenticationMode.md create mode 100644 docs/v2/Connectivity/models/DatabricksConnectionConfiguration.md create mode 100644 docs/v2/Connectivity/models/DatabricksTableImportConfig.md create mode 100644 docs/v2/Connectivity/models/DateColumnInitialIncrementalState.md create mode 100644 docs/v2/Connectivity/models/DecimalColumnInitialIncrementalState.md create mode 100644 docs/v2/Connectivity/models/DeltaVirtualTableConfig.md create mode 100644 docs/v2/Connectivity/models/Domain.md create mode 100644 docs/v2/Connectivity/models/EncryptedProperty.md create mode 100644 docs/v2/Connectivity/models/FileAnyPathMatchesFilter.md create mode 100644 docs/v2/Connectivity/models/FileAtLeastCountFilter.md create mode 100644 docs/v2/Connectivity/models/FileChangedSinceLastUploadFilter.md create mode 100644 docs/v2/Connectivity/models/FileFormat.md create mode 100644 docs/v2/Connectivity/models/FileImport.md create mode 100644 docs/v2/Connectivity/models/FileImportCustomFilter.md create mode 100644 docs/v2/Connectivity/models/FileImportDisplayName.md create mode 100644 docs/v2/Connectivity/models/FileImportFilter.md create mode 100644 docs/v2/Connectivity/models/FileImportMode.md create mode 100644 docs/v2/Connectivity/models/FileImportRid.md create mode 100644 docs/v2/Connectivity/models/FileLastModifiedAfterFilter.md create mode 100644 docs/v2/Connectivity/models/FilePathMatchesFilter.md create mode 100644 docs/v2/Connectivity/models/FilePathNotMatchesFilter.md create mode 100644 docs/v2/Connectivity/models/FileProperty.md create mode 100644 docs/v2/Connectivity/models/FileSizeFilter.md create mode 100644 docs/v2/Connectivity/models/FilesCountLimitFilter.md create mode 100644 docs/v2/Connectivity/models/FilesVirtualTableConfig.md create mode 100644 docs/v2/Connectivity/models/FoundryWorker.md create mode 100644 docs/v2/Connectivity/models/GetConfigurationConnectionsBatchRequestElement.md create mode 100644 docs/v2/Connectivity/models/GetConfigurationConnectionsBatchResponse.md create mode 100644 docs/v2/Connectivity/models/GlueVirtualTableConfig.md create mode 100644 docs/v2/Connectivity/models/HeaderApiKey.md create mode 100644 docs/v2/Connectivity/models/IcebergVirtualTableConfig.md create mode 100644 docs/v2/Connectivity/models/IntegerColumnInitialIncrementalState.md create mode 100644 docs/v2/Connectivity/models/InvalidConnectionReason.md create mode 100644 docs/v2/Connectivity/models/JdbcConnectionConfiguration.md create mode 100644 docs/v2/Connectivity/models/JdbcDriverArtifactName.md create mode 100644 docs/v2/Connectivity/models/JdbcProperties.md create mode 100644 docs/v2/Connectivity/models/JdbcTableImportConfig.md create mode 100644 docs/v2/Connectivity/models/ListFileImportsResponse.md create mode 100644 docs/v2/Connectivity/models/ListTableImportsResponse.md create mode 100644 docs/v2/Connectivity/models/LongColumnInitialIncrementalState.md create mode 100644 docs/v2/Connectivity/models/MicrosoftAccessTableImportConfig.md create mode 100644 docs/v2/Connectivity/models/MicrosoftSqlServerTableImportConfig.md create mode 100644 docs/v2/Connectivity/models/NetworkEgressPolicyRid.md create mode 100644 docs/v2/Connectivity/models/OauthMachineToMachineAuth.md create mode 100644 docs/v2/Connectivity/models/OracleTableImportConfig.md create mode 100644 docs/v2/Connectivity/models/PersonalAccessToken.md create mode 100644 docs/v2/Connectivity/models/PlaintextValue.md create mode 100644 docs/v2/Connectivity/models/PostgreSqlTableImportConfig.md create mode 100644 docs/v2/Connectivity/models/Protocol.md create mode 100644 docs/v2/Connectivity/models/QueryParameterApiKey.md create mode 100644 docs/v2/Connectivity/models/Region.md create mode 100644 docs/v2/Connectivity/models/ReplaceFileImportRequest.md create mode 100644 docs/v2/Connectivity/models/ReplaceTableImportRequest.md create mode 100644 docs/v2/Connectivity/models/ReplaceTableImportRequestDatabricksTableImportConfig.md create mode 100644 docs/v2/Connectivity/models/ReplaceTableImportRequestJdbcTableImportConfig.md create mode 100644 docs/v2/Connectivity/models/ReplaceTableImportRequestMicrosoftAccessTableImportConfig.md create mode 100644 docs/v2/Connectivity/models/ReplaceTableImportRequestMicrosoftSqlServerTableImportConfig.md create mode 100644 docs/v2/Connectivity/models/ReplaceTableImportRequestOracleTableImportConfig.md create mode 100644 docs/v2/Connectivity/models/ReplaceTableImportRequestPostgreSqlTableImportConfig.md create mode 100644 docs/v2/Connectivity/models/ReplaceTableImportRequestSnowflakeTableImportConfig.md create mode 100644 docs/v2/Connectivity/models/ReplaceTableImportRequestTableImportConfig.md create mode 100644 docs/v2/Connectivity/models/RestAuthenticationMode.md create mode 100644 docs/v2/Connectivity/models/RestConnectionAdditionalSecrets.md create mode 100644 docs/v2/Connectivity/models/RestConnectionConfiguration.md create mode 100644 docs/v2/Connectivity/models/RestConnectionOAuth2.md create mode 100644 docs/v2/Connectivity/models/RestRequestApiKeyLocation.md create mode 100644 docs/v2/Connectivity/models/S3AuthenticationMode.md create mode 100644 docs/v2/Connectivity/models/S3ConnectionConfiguration.md create mode 100644 docs/v2/Connectivity/models/S3KmsConfiguration.md create mode 100644 docs/v2/Connectivity/models/S3ProxyConfiguration.md create mode 100644 docs/v2/Connectivity/models/SecretName.md create mode 100644 docs/v2/Connectivity/models/SecretsNames.md create mode 100644 docs/v2/Connectivity/models/SecretsWithPlaintextValues.md create mode 100644 docs/v2/Connectivity/models/SmbAuth.md create mode 100644 docs/v2/Connectivity/models/SmbConnectionConfiguration.md create mode 100644 docs/v2/Connectivity/models/SmbProxyConfiguration.md create mode 100644 docs/v2/Connectivity/models/SmbProxyType.md create mode 100644 docs/v2/Connectivity/models/SmbUsernamePasswordAuth.md create mode 100644 docs/v2/Connectivity/models/SnowflakeAuthenticationMode.md create mode 100644 docs/v2/Connectivity/models/SnowflakeConnectionConfiguration.md create mode 100644 docs/v2/Connectivity/models/SnowflakeExternalOauth.md create mode 100644 docs/v2/Connectivity/models/SnowflakeKeyPairAuthentication.md create mode 100644 docs/v2/Connectivity/models/SnowflakeTableImportConfig.md create mode 100644 docs/v2/Connectivity/models/SnowflakeVirtualTableConfig.md create mode 100644 docs/v2/Connectivity/models/StringColumnInitialIncrementalState.md create mode 100644 docs/v2/Connectivity/models/StsRoleConfiguration.md create mode 100644 docs/v2/Connectivity/models/TableImport.md create mode 100644 docs/v2/Connectivity/models/TableImportAllowSchemaChanges.md create mode 100644 docs/v2/Connectivity/models/TableImportConfig.md create mode 100644 docs/v2/Connectivity/models/TableImportDisplayName.md create mode 100644 docs/v2/Connectivity/models/TableImportInitialIncrementalState.md create mode 100644 docs/v2/Connectivity/models/TableImportMode.md create mode 100644 docs/v2/Connectivity/models/TableImportQuery.md create mode 100644 docs/v2/Connectivity/models/TableImportRid.md create mode 100644 docs/v2/Connectivity/models/TableName.md create mode 100644 docs/v2/Connectivity/models/TableRid.md create mode 100644 docs/v2/Connectivity/models/TimestampColumnInitialIncrementalState.md create mode 100644 docs/v2/Connectivity/models/UnityVirtualTableConfig.md create mode 100644 docs/v2/Connectivity/models/UnknownWorker.md create mode 100644 docs/v2/Connectivity/models/UpdateExportSettingsForConnectionRequest.md create mode 100644 docs/v2/Connectivity/models/UpdateSecretsForConnectionRequest.md create mode 100644 docs/v2/Connectivity/models/UriScheme.md create mode 100644 docs/v2/Connectivity/models/VirtualTable.md create mode 100644 docs/v2/Connectivity/models/VirtualTableConfig.md create mode 100644 docs/v2/Connectivity/models/WorkflowIdentityFederation.md create mode 100644 docs/v2/Core/models/AnyType.md create mode 100644 docs/v2/Core/models/ArrayFieldType.md create mode 100644 docs/v2/Core/models/AttachmentType.md create mode 100644 docs/v2/Core/models/Attribution.md create mode 100644 docs/v2/Core/models/BinaryType.md create mode 100644 docs/v2/Core/models/BooleanType.md create mode 100644 docs/v2/Core/models/BranchMetadata.md create mode 100644 docs/v2/Core/models/BuildRid.md create mode 100644 docs/v2/Core/models/ByteType.md create mode 100644 docs/v2/Core/models/ChangeDataCaptureConfiguration.md create mode 100644 docs/v2/Core/models/CheckReportRid.md create mode 100644 docs/v2/Core/models/CheckRid.md create mode 100644 docs/v2/Core/models/CipherTextType.md create mode 100644 docs/v2/Core/models/ComputeSeconds.md create mode 100644 docs/v2/Core/models/ContentLength.md create mode 100644 docs/v2/Core/models/ContentType.md create mode 100644 docs/v2/Core/models/CreatedBy.md create mode 100644 docs/v2/Core/models/CreatedTime.md create mode 100644 docs/v2/Core/models/CustomMetadata.md create mode 100644 docs/v2/Core/models/DatasetFieldSchema.md create mode 100644 docs/v2/Core/models/DatasetSchema.md create mode 100644 docs/v2/Core/models/DateType.md create mode 100644 docs/v2/Core/models/DecimalType.md create mode 100644 docs/v2/Core/models/DisplayName.md create mode 100644 docs/v2/Core/models/Distance.md create mode 100644 docs/v2/Core/models/DistanceUnit.md create mode 100644 docs/v2/Core/models/DoubleType.md create mode 100644 docs/v2/Core/models/Duration.md create mode 100644 docs/v2/Core/models/DurationSeconds.md create mode 100644 docs/v2/Core/models/EmbeddingModel.md create mode 100644 docs/v2/Core/models/EnrollmentRid.md create mode 100644 docs/v2/Core/models/Field.md create mode 100644 docs/v2/Core/models/FieldDataType.md create mode 100644 docs/v2/Core/models/FieldName.md create mode 100644 docs/v2/Core/models/FieldSchema.md create mode 100644 docs/v2/Core/models/FilePath.md create mode 100644 docs/v2/Core/models/Filename.md create mode 100644 docs/v2/Core/models/FilterBinaryType.md create mode 100644 docs/v2/Core/models/FilterBooleanType.md create mode 100644 docs/v2/Core/models/FilterDateTimeType.md create mode 100644 docs/v2/Core/models/FilterDateType.md create mode 100644 docs/v2/Core/models/FilterDoubleType.md create mode 100644 docs/v2/Core/models/FilterEnumType.md create mode 100644 docs/v2/Core/models/FilterFloatType.md create mode 100644 docs/v2/Core/models/FilterIntegerType.md create mode 100644 docs/v2/Core/models/FilterLongType.md create mode 100644 docs/v2/Core/models/FilterRidType.md create mode 100644 docs/v2/Core/models/FilterStringType.md create mode 100644 docs/v2/Core/models/FilterType.md create mode 100644 docs/v2/Core/models/FilterUuidType.md create mode 100644 docs/v2/Core/models/FloatType.md create mode 100644 docs/v2/Core/models/FolderRid.md create mode 100644 docs/v2/Core/models/FoundryBranch.md create mode 100644 docs/v2/Core/models/FoundryLiveDeployment.md create mode 100644 docs/v2/Core/models/FullRowChangeDataCaptureConfiguration.md create mode 100644 docs/v2/Core/models/GeoPointType.md create mode 100644 docs/v2/Core/models/GeoShapeType.md create mode 100644 docs/v2/Core/models/GeohashType.md create mode 100644 docs/v2/Core/models/GeotimeSeriesReferenceType.md create mode 100644 docs/v2/Core/models/GroupId.md create mode 100644 docs/v2/Core/models/GroupName.md create mode 100644 docs/v2/Core/models/GroupRid.md create mode 100644 docs/v2/Core/models/IncludeComputeUsage.md create mode 100644 docs/v2/Core/models/IntegerType.md create mode 100644 docs/v2/Core/models/JobRid.md create mode 100644 docs/v2/Core/models/LmsEmbeddingModel.md create mode 100644 docs/v2/Core/models/LmsEmbeddingModelValue.md create mode 100644 docs/v2/Core/models/LongType.md create mode 100644 docs/v2/Core/models/MapFieldType.md create mode 100644 docs/v2/Core/models/MarkingId.md create mode 100644 docs/v2/Core/models/MarkingType.md create mode 100644 docs/v2/Core/models/MediaItemPath.md create mode 100644 docs/v2/Core/models/MediaItemReadToken.md create mode 100644 docs/v2/Core/models/MediaItemRid.md create mode 100644 docs/v2/Core/models/MediaReference.md create mode 100644 docs/v2/Core/models/MediaReferenceType.md create mode 100644 docs/v2/Core/models/MediaSetRid.md create mode 100644 docs/v2/Core/models/MediaSetViewItem.md create mode 100644 docs/v2/Core/models/MediaSetViewItemWrapper.md create mode 100644 docs/v2/Core/models/MediaSetViewRid.md create mode 100644 docs/v2/Core/models/MediaType.md create mode 100644 docs/v2/Core/models/NullType.md create mode 100644 docs/v2/Core/models/NumericOrNonNumericType.md create mode 100644 docs/v2/Core/models/Operation.md create mode 100644 docs/v2/Core/models/OperationScope.md create mode 100644 docs/v2/Core/models/OrderByDirection.md create mode 100644 docs/v2/Core/models/OrganizationRid.md create mode 100644 docs/v2/Core/models/PageSize.md create mode 100644 docs/v2/Core/models/PageToken.md create mode 100644 docs/v2/Core/models/PreviewMode.md create mode 100644 docs/v2/Core/models/PrincipalId.md create mode 100644 docs/v2/Core/models/PrincipalType.md create mode 100644 docs/v2/Core/models/Realm.md create mode 100644 docs/v2/Core/models/Reference.md create mode 100644 docs/v2/Core/models/ReleaseStatus.md create mode 100644 docs/v2/Core/models/Role.md create mode 100644 docs/v2/Core/models/RoleAssignmentUpdate.md create mode 100644 docs/v2/Core/models/RoleContext.md create mode 100644 docs/v2/Core/models/RoleId.md create mode 100644 docs/v2/Core/models/RoleSetId.md create mode 100644 docs/v2/Core/models/ScheduleRid.md create mode 100644 docs/v2/Core/models/SchemaFieldType.md create mode 100644 docs/v2/Core/models/ShortType.md create mode 100644 docs/v2/Core/models/SizeBytes.md create mode 100644 docs/v2/Core/models/StreamSchema.md create mode 100644 docs/v2/Core/models/StringType.md create mode 100644 docs/v2/Core/models/StructFieldName.md create mode 100644 docs/v2/Core/models/StructFieldType.md create mode 100644 docs/v2/Core/models/TableRid.md create mode 100644 docs/v2/Core/models/TimeSeriesItemType.md create mode 100644 docs/v2/Core/models/TimeUnit.md create mode 100644 docs/v2/Core/models/TimeseriesType.md create mode 100644 docs/v2/Core/models/TimestampType.md create mode 100644 docs/v2/Core/models/TotalCount.md create mode 100644 docs/v2/Core/models/TraceParent.md create mode 100644 docs/v2/Core/models/TraceState.md create mode 100644 docs/v2/Core/models/UnsupportedType.md create mode 100644 docs/v2/Core/models/UpdatedBy.md create mode 100644 docs/v2/Core/models/UpdatedTime.md create mode 100644 docs/v2/Core/models/UserId.md create mode 100644 docs/v2/Core/models/UserStatus.md create mode 100644 docs/v2/Core/models/VectorSimilarityFunction.md create mode 100644 docs/v2/Core/models/VectorSimilarityFunctionValue.md create mode 100644 docs/v2/Core/models/VectorType.md create mode 100644 docs/v2/Core/models/VersionId.md create mode 100644 docs/v2/Core/models/ZoneId.md create mode 100644 docs/v2/DataHealth/Check.md create mode 100644 docs/v2/DataHealth/CheckReport.md create mode 100644 docs/v2/DataHealth/models/AllowedColumnValuesCheckConfig.md create mode 100644 docs/v2/DataHealth/models/ApproximateUniquePercentageCheckConfig.md create mode 100644 docs/v2/DataHealth/models/BooleanColumnValue.md create mode 100644 docs/v2/DataHealth/models/BuildDurationCheckConfig.md create mode 100644 docs/v2/DataHealth/models/BuildStatusCheckConfig.md create mode 100644 docs/v2/DataHealth/models/Check.md create mode 100644 docs/v2/DataHealth/models/CheckConfig.md create mode 100644 docs/v2/DataHealth/models/CheckGroupRid.md create mode 100644 docs/v2/DataHealth/models/CheckIntent.md create mode 100644 docs/v2/DataHealth/models/CheckReport.md create mode 100644 docs/v2/DataHealth/models/CheckResult.md create mode 100644 docs/v2/DataHealth/models/CheckResultStatus.md create mode 100644 docs/v2/DataHealth/models/ColumnCountConfig.md create mode 100644 docs/v2/DataHealth/models/ColumnInfo.md create mode 100644 docs/v2/DataHealth/models/ColumnName.md create mode 100644 docs/v2/DataHealth/models/ColumnTypeCheckConfig.md create mode 100644 docs/v2/DataHealth/models/ColumnTypeConfig.md create mode 100644 docs/v2/DataHealth/models/ColumnValue.md create mode 100644 docs/v2/DataHealth/models/CreateCheckRequest.md create mode 100644 docs/v2/DataHealth/models/DatasetSubject.md create mode 100644 docs/v2/DataHealth/models/DateBounds.md create mode 100644 docs/v2/DataHealth/models/DateBoundsConfig.md create mode 100644 docs/v2/DataHealth/models/DateColumnRangeCheckConfig.md create mode 100644 docs/v2/DataHealth/models/DateColumnValue.md create mode 100644 docs/v2/DataHealth/models/EscalationConfig.md create mode 100644 docs/v2/DataHealth/models/JobDurationCheckConfig.md create mode 100644 docs/v2/DataHealth/models/JobStatusCheckConfig.md create mode 100644 docs/v2/DataHealth/models/MedianDeviation.md create mode 100644 docs/v2/DataHealth/models/MedianDeviationBoundsType.md create mode 100644 docs/v2/DataHealth/models/MedianDeviationConfig.md create mode 100644 docs/v2/DataHealth/models/NullPercentageCheckConfig.md create mode 100644 docs/v2/DataHealth/models/NumericBounds.md create mode 100644 docs/v2/DataHealth/models/NumericBoundsConfig.md create mode 100644 docs/v2/DataHealth/models/NumericColumnCheckConfig.md create mode 100644 docs/v2/DataHealth/models/NumericColumnMeanCheckConfig.md create mode 100644 docs/v2/DataHealth/models/NumericColumnMedianCheckConfig.md create mode 100644 docs/v2/DataHealth/models/NumericColumnRangeCheckConfig.md create mode 100644 docs/v2/DataHealth/models/NumericColumnValue.md create mode 100644 docs/v2/DataHealth/models/PercentageBounds.md create mode 100644 docs/v2/DataHealth/models/PercentageBoundsConfig.md create mode 100644 docs/v2/DataHealth/models/PercentageCheckConfig.md create mode 100644 docs/v2/DataHealth/models/PercentageValue.md create mode 100644 docs/v2/DataHealth/models/PrimaryKeyCheckConfig.md create mode 100644 docs/v2/DataHealth/models/PrimaryKeyConfig.md create mode 100644 docs/v2/DataHealth/models/ReplaceAllowedColumnValuesCheckConfig.md create mode 100644 docs/v2/DataHealth/models/ReplaceApproximateUniquePercentageCheckConfig.md create mode 100644 docs/v2/DataHealth/models/ReplaceBuildDurationCheckConfig.md create mode 100644 docs/v2/DataHealth/models/ReplaceBuildStatusCheckConfig.md create mode 100644 docs/v2/DataHealth/models/ReplaceCheckConfig.md create mode 100644 docs/v2/DataHealth/models/ReplaceCheckRequest.md create mode 100644 docs/v2/DataHealth/models/ReplaceColumnTypeCheckConfig.md create mode 100644 docs/v2/DataHealth/models/ReplaceColumnTypeConfig.md create mode 100644 docs/v2/DataHealth/models/ReplaceDateColumnRangeCheckConfig.md create mode 100644 docs/v2/DataHealth/models/ReplaceJobDurationCheckConfig.md create mode 100644 docs/v2/DataHealth/models/ReplaceJobStatusCheckConfig.md create mode 100644 docs/v2/DataHealth/models/ReplaceNullPercentageCheckConfig.md create mode 100644 docs/v2/DataHealth/models/ReplaceNumericColumnCheckConfig.md create mode 100644 docs/v2/DataHealth/models/ReplaceNumericColumnMeanCheckConfig.md create mode 100644 docs/v2/DataHealth/models/ReplaceNumericColumnMedianCheckConfig.md create mode 100644 docs/v2/DataHealth/models/ReplaceNumericColumnRangeCheckConfig.md create mode 100644 docs/v2/DataHealth/models/ReplacePercentageCheckConfig.md create mode 100644 docs/v2/DataHealth/models/ReplacePrimaryKeyCheckConfig.md create mode 100644 docs/v2/DataHealth/models/ReplacePrimaryKeyConfig.md create mode 100644 docs/v2/DataHealth/models/ReplaceSchemaComparisonCheckConfig.md create mode 100644 docs/v2/DataHealth/models/ReplaceTotalColumnCountCheckConfig.md create mode 100644 docs/v2/DataHealth/models/SchemaComparisonCheckConfig.md create mode 100644 docs/v2/DataHealth/models/SchemaComparisonConfig.md create mode 100644 docs/v2/DataHealth/models/SchemaComparisonType.md create mode 100644 docs/v2/DataHealth/models/SchemaInfo.md create mode 100644 docs/v2/DataHealth/models/SeverityLevel.md create mode 100644 docs/v2/DataHealth/models/StatusCheckConfig.md create mode 100644 docs/v2/DataHealth/models/StringColumnValue.md create mode 100644 docs/v2/DataHealth/models/TimeBounds.md create mode 100644 docs/v2/DataHealth/models/TimeBoundsConfig.md create mode 100644 docs/v2/DataHealth/models/TimeCheckConfig.md create mode 100644 docs/v2/DataHealth/models/TotalColumnCountCheckConfig.md create mode 100644 docs/v2/DataHealth/models/TrendConfig.md create mode 100644 docs/v2/DataHealth/models/TrendType.md create mode 100644 docs/v2/Datasets/Branch.md create mode 100644 docs/v2/Datasets/Dataset.md create mode 100644 docs/v2/Datasets/File.md create mode 100644 docs/v2/Datasets/Transaction.md create mode 100644 docs/v2/Datasets/View.md create mode 100644 docs/v2/Datasets/models/AddBackingDatasetsRequest.md create mode 100644 docs/v2/Datasets/models/AddPrimaryKeyRequest.md create mode 100644 docs/v2/Datasets/models/Branch.md create mode 100644 docs/v2/Datasets/models/BranchName.md create mode 100644 docs/v2/Datasets/models/CreateBranchRequest.md create mode 100644 docs/v2/Datasets/models/CreateDatasetRequest.md create mode 100644 docs/v2/Datasets/models/CreateTransactionRequest.md create mode 100644 docs/v2/Datasets/models/CreateViewRequest.md create mode 100644 docs/v2/Datasets/models/DataframeReader.md create mode 100644 docs/v2/Datasets/models/Dataset.md create mode 100644 docs/v2/Datasets/models/DatasetName.md create mode 100644 docs/v2/Datasets/models/DatasetRid.md create mode 100644 docs/v2/Datasets/models/File.md create mode 100644 docs/v2/Datasets/models/FileUpdatedTime.md create mode 100644 docs/v2/Datasets/models/GetDatasetJobsAndFilter.md create mode 100644 docs/v2/Datasets/models/GetDatasetJobsComparisonType.md create mode 100644 docs/v2/Datasets/models/GetDatasetJobsOrFilter.md create mode 100644 docs/v2/Datasets/models/GetDatasetJobsQuery.md create mode 100644 docs/v2/Datasets/models/GetDatasetJobsRequest.md create mode 100644 docs/v2/Datasets/models/GetDatasetJobsSort.md create mode 100644 docs/v2/Datasets/models/GetDatasetJobsSortDirection.md create mode 100644 docs/v2/Datasets/models/GetDatasetJobsSortType.md create mode 100644 docs/v2/Datasets/models/GetDatasetJobsTimeFilter.md create mode 100644 docs/v2/Datasets/models/GetDatasetJobsTimeFilterField.md create mode 100644 docs/v2/Datasets/models/GetDatasetSchemaResponse.md create mode 100644 docs/v2/Datasets/models/GetJobResponse.md create mode 100644 docs/v2/Datasets/models/GetSchemaDatasetsBatchRequestElement.md create mode 100644 docs/v2/Datasets/models/GetSchemaDatasetsBatchResponse.md create mode 100644 docs/v2/Datasets/models/JobDetails.md create mode 100644 docs/v2/Datasets/models/ListBranchesResponse.md create mode 100644 docs/v2/Datasets/models/ListFilesResponse.md create mode 100644 docs/v2/Datasets/models/ListHealthChecksResponse.md create mode 100644 docs/v2/Datasets/models/ListSchedulesResponse.md create mode 100644 docs/v2/Datasets/models/ListTransactionsOfDatasetResponse.md create mode 100644 docs/v2/Datasets/models/ListTransactionsResponse.md create mode 100644 docs/v2/Datasets/models/PrimaryKeyLatestWinsResolutionStrategy.md create mode 100644 docs/v2/Datasets/models/PrimaryKeyResolutionDuplicate.md create mode 100644 docs/v2/Datasets/models/PrimaryKeyResolutionStrategy.md create mode 100644 docs/v2/Datasets/models/PrimaryKeyResolutionUnique.md create mode 100644 docs/v2/Datasets/models/PutDatasetSchemaRequest.md create mode 100644 docs/v2/Datasets/models/RemoveBackingDatasetsRequest.md create mode 100644 docs/v2/Datasets/models/ReplaceBackingDatasetsRequest.md create mode 100644 docs/v2/Datasets/models/TableExportFormat.md create mode 100644 docs/v2/Datasets/models/Transaction.md create mode 100644 docs/v2/Datasets/models/TransactionCreatedTime.md create mode 100644 docs/v2/Datasets/models/TransactionRid.md create mode 100644 docs/v2/Datasets/models/TransactionStatus.md create mode 100644 docs/v2/Datasets/models/TransactionType.md create mode 100644 docs/v2/Datasets/models/View.md create mode 100644 docs/v2/Datasets/models/ViewBackingDataset.md create mode 100644 docs/v2/Datasets/models/ViewPrimaryKey.md create mode 100644 docs/v2/Datasets/models/ViewPrimaryKeyResolution.md create mode 100644 docs/v2/Filesystem/Folder.md create mode 100644 docs/v2/Filesystem/Project.md create mode 100644 docs/v2/Filesystem/Resource.md create mode 100644 docs/v2/Filesystem/ResourceRole.md create mode 100644 docs/v2/Filesystem/Space.md create mode 100644 docs/v2/Filesystem/models/AccessRequirements.md create mode 100644 docs/v2/Filesystem/models/AddMarkingsRequest.md create mode 100644 docs/v2/Filesystem/models/AddOrganizationsRequest.md create mode 100644 docs/v2/Filesystem/models/AddResourceRolesRequest.md create mode 100644 docs/v2/Filesystem/models/CreateFolderRequest.md create mode 100644 docs/v2/Filesystem/models/CreateProjectFromTemplateRequest.md create mode 100644 docs/v2/Filesystem/models/CreateProjectRequest.md create mode 100644 docs/v2/Filesystem/models/CreateSpaceRequest.md create mode 100644 docs/v2/Filesystem/models/Everyone.md create mode 100644 docs/v2/Filesystem/models/FileSystemId.md create mode 100644 docs/v2/Filesystem/models/Folder.md create mode 100644 docs/v2/Filesystem/models/FolderRid.md create mode 100644 docs/v2/Filesystem/models/FolderType.md create mode 100644 docs/v2/Filesystem/models/GetByPathResourcesBatchRequestElement.md create mode 100644 docs/v2/Filesystem/models/GetByPathResourcesBatchResponse.md create mode 100644 docs/v2/Filesystem/models/GetFoldersBatchRequestElement.md create mode 100644 docs/v2/Filesystem/models/GetFoldersBatchResponse.md create mode 100644 docs/v2/Filesystem/models/GetResourcesBatchRequestElement.md create mode 100644 docs/v2/Filesystem/models/GetResourcesBatchResponse.md create mode 100644 docs/v2/Filesystem/models/IsDirectlyApplied.md create mode 100644 docs/v2/Filesystem/models/ListChildrenOfFolderResponse.md create mode 100644 docs/v2/Filesystem/models/ListMarkingsOfResourceResponse.md create mode 100644 docs/v2/Filesystem/models/ListOrganizationsOfProjectResponse.md create mode 100644 docs/v2/Filesystem/models/ListResourceRolesResponse.md create mode 100644 docs/v2/Filesystem/models/ListSpacesResponse.md create mode 100644 docs/v2/Filesystem/models/Marking.md create mode 100644 docs/v2/Filesystem/models/Organization.md create mode 100644 docs/v2/Filesystem/models/PrincipalIdOnly.md create mode 100644 docs/v2/Filesystem/models/PrincipalWithId.md create mode 100644 docs/v2/Filesystem/models/Project.md create mode 100644 docs/v2/Filesystem/models/ProjectRid.md create mode 100644 docs/v2/Filesystem/models/ProjectTemplateRid.md create mode 100644 docs/v2/Filesystem/models/ProjectTemplateVariableId.md create mode 100644 docs/v2/Filesystem/models/ProjectTemplateVariableValue.md create mode 100644 docs/v2/Filesystem/models/RemoveMarkingsRequest.md create mode 100644 docs/v2/Filesystem/models/RemoveOrganizationsRequest.md create mode 100644 docs/v2/Filesystem/models/RemoveResourceRolesRequest.md create mode 100644 docs/v2/Filesystem/models/ReplaceProjectRequest.md create mode 100644 docs/v2/Filesystem/models/ReplaceSpaceRequest.md create mode 100644 docs/v2/Filesystem/models/Resource.md create mode 100644 docs/v2/Filesystem/models/ResourceDisplayName.md create mode 100644 docs/v2/Filesystem/models/ResourcePath.md create mode 100644 docs/v2/Filesystem/models/ResourceRid.md create mode 100644 docs/v2/Filesystem/models/ResourceRole.md create mode 100644 docs/v2/Filesystem/models/ResourceRoleIdentifier.md create mode 100644 docs/v2/Filesystem/models/ResourceRolePrincipal.md create mode 100644 docs/v2/Filesystem/models/ResourceRolePrincipalIdentifier.md create mode 100644 docs/v2/Filesystem/models/ResourceType.md create mode 100644 docs/v2/Filesystem/models/Space.md create mode 100644 docs/v2/Filesystem/models/SpaceMavenIdentifier.md create mode 100644 docs/v2/Filesystem/models/SpaceRid.md create mode 100644 docs/v2/Filesystem/models/TrashStatus.md create mode 100644 docs/v2/Filesystem/models/UsageAccountRid.md create mode 100644 docs/v2/Functions/Query.md create mode 100644 docs/v2/Functions/ValueType.md create mode 100644 docs/v2/Functions/VersionId.md create mode 100644 docs/v2/Functions/models/ArrayConstraint.md create mode 100644 docs/v2/Functions/models/DataValue.md create mode 100644 docs/v2/Functions/models/EnumConstraint.md create mode 100644 docs/v2/Functions/models/ExecuteQueryRequest.md create mode 100644 docs/v2/Functions/models/ExecuteQueryResponse.md create mode 100644 docs/v2/Functions/models/FunctionRid.md create mode 100644 docs/v2/Functions/models/FunctionVersion.md create mode 100644 docs/v2/Functions/models/GetByRidQueriesRequest.md create mode 100644 docs/v2/Functions/models/LengthConstraint.md create mode 100644 docs/v2/Functions/models/MapConstraint.md create mode 100644 docs/v2/Functions/models/NullableConstraint.md create mode 100644 docs/v2/Functions/models/NullableConstraintValue.md create mode 100644 docs/v2/Functions/models/Parameter.md create mode 100644 docs/v2/Functions/models/ParameterId.md create mode 100644 docs/v2/Functions/models/Query.md create mode 100644 docs/v2/Functions/models/QueryAggregationKeyType.md create mode 100644 docs/v2/Functions/models/QueryAggregationRangeSubType.md create mode 100644 docs/v2/Functions/models/QueryAggregationRangeType.md create mode 100644 docs/v2/Functions/models/QueryAggregationValueType.md create mode 100644 docs/v2/Functions/models/QueryApiName.md create mode 100644 docs/v2/Functions/models/QueryArrayType.md create mode 100644 docs/v2/Functions/models/QueryDataType.md create mode 100644 docs/v2/Functions/models/QueryRuntimeErrorParameter.md create mode 100644 docs/v2/Functions/models/QuerySetType.md create mode 100644 docs/v2/Functions/models/QueryStructField.md create mode 100644 docs/v2/Functions/models/QueryStructType.md create mode 100644 docs/v2/Functions/models/QueryUnionType.md create mode 100644 docs/v2/Functions/models/RangesConstraint.md create mode 100644 docs/v2/Functions/models/RegexConstraint.md create mode 100644 docs/v2/Functions/models/RidConstraint.md create mode 100644 docs/v2/Functions/models/StreamingExecuteQueryRequest.md create mode 100644 docs/v2/Functions/models/StructConstraint.md create mode 100644 docs/v2/Functions/models/StructFieldApiName.md create mode 100644 docs/v2/Functions/models/StructFieldName.md create mode 100644 docs/v2/Functions/models/StructV1Constraint.md create mode 100644 docs/v2/Functions/models/ThreeDimensionalAggregation.md create mode 100644 docs/v2/Functions/models/TransactionId.md create mode 100644 docs/v2/Functions/models/TwoDimensionalAggregation.md create mode 100644 docs/v2/Functions/models/UuidConstraint.md create mode 100644 docs/v2/Functions/models/ValueType.md create mode 100644 docs/v2/Functions/models/ValueTypeApiName.md create mode 100644 docs/v2/Functions/models/ValueTypeConstraint.md create mode 100644 docs/v2/Functions/models/ValueTypeDataType.md create mode 100644 docs/v2/Functions/models/ValueTypeDataTypeArrayType.md create mode 100644 docs/v2/Functions/models/ValueTypeDataTypeBinaryType.md create mode 100644 docs/v2/Functions/models/ValueTypeDataTypeBooleanType.md create mode 100644 docs/v2/Functions/models/ValueTypeDataTypeByteType.md create mode 100644 docs/v2/Functions/models/ValueTypeDataTypeDateType.md create mode 100644 docs/v2/Functions/models/ValueTypeDataTypeDecimalType.md create mode 100644 docs/v2/Functions/models/ValueTypeDataTypeDoubleType.md create mode 100644 docs/v2/Functions/models/ValueTypeDataTypeFloatType.md create mode 100644 docs/v2/Functions/models/ValueTypeDataTypeIntegerType.md create mode 100644 docs/v2/Functions/models/ValueTypeDataTypeLongType.md create mode 100644 docs/v2/Functions/models/ValueTypeDataTypeMapType.md create mode 100644 docs/v2/Functions/models/ValueTypeDataTypeOptionalType.md create mode 100644 docs/v2/Functions/models/ValueTypeDataTypeShortType.md create mode 100644 docs/v2/Functions/models/ValueTypeDataTypeStringType.md create mode 100644 docs/v2/Functions/models/ValueTypeDataTypeStructElement.md create mode 100644 docs/v2/Functions/models/ValueTypeDataTypeStructFieldIdentifier.md create mode 100644 docs/v2/Functions/models/ValueTypeDataTypeStructType.md create mode 100644 docs/v2/Functions/models/ValueTypeDataTypeTimestampType.md create mode 100644 docs/v2/Functions/models/ValueTypeDataTypeUnionType.md create mode 100644 docs/v2/Functions/models/ValueTypeDataTypeValueTypeReference.md create mode 100644 docs/v2/Functions/models/ValueTypeDescription.md create mode 100644 docs/v2/Functions/models/ValueTypeReference.md create mode 100644 docs/v2/Functions/models/ValueTypeRid.md create mode 100644 docs/v2/Functions/models/ValueTypeVersion.md create mode 100644 docs/v2/Functions/models/ValueTypeVersionId.md create mode 100644 docs/v2/Functions/models/VersionId.md create mode 100644 docs/v2/Geo/models/BBox.md create mode 100644 docs/v2/Geo/models/Coordinate.md create mode 100644 docs/v2/Geo/models/Feature.md create mode 100644 docs/v2/Geo/models/FeatureCollection.md create mode 100644 docs/v2/Geo/models/FeatureCollectionTypes.md create mode 100644 docs/v2/Geo/models/FeaturePropertyKey.md create mode 100644 docs/v2/Geo/models/GeoPoint.md create mode 100644 docs/v2/Geo/models/Geometry.md create mode 100644 docs/v2/Geo/models/GeometryCollection.md create mode 100644 docs/v2/Geo/models/LineString.md create mode 100644 docs/v2/Geo/models/LineStringCoordinates.md create mode 100644 docs/v2/Geo/models/LinearRing.md create mode 100644 docs/v2/Geo/models/MultiLineString.md create mode 100644 docs/v2/Geo/models/MultiPoint.md create mode 100644 docs/v2/Geo/models/MultiPolygon.md create mode 100644 docs/v2/Geo/models/Polygon.md create mode 100644 docs/v2/Geo/models/Position.md create mode 100644 docs/v2/LanguageModels/AnthropicModel.md create mode 100644 docs/v2/LanguageModels/OpenAiModel.md create mode 100644 docs/v2/LanguageModels/models/AnthropicAnyToolChoice.md create mode 100644 docs/v2/LanguageModels/models/AnthropicAutoToolChoice.md create mode 100644 docs/v2/LanguageModels/models/AnthropicBase64PdfDocumentSource.md create mode 100644 docs/v2/LanguageModels/models/AnthropicCacheControl.md create mode 100644 docs/v2/LanguageModels/models/AnthropicCharacterLocationCitation.md create mode 100644 docs/v2/LanguageModels/models/AnthropicCompletionCitation.md create mode 100644 docs/v2/LanguageModels/models/AnthropicCompletionContent.md create mode 100644 docs/v2/LanguageModels/models/AnthropicCompletionRedactedThinking.md create mode 100644 docs/v2/LanguageModels/models/AnthropicCompletionText.md create mode 100644 docs/v2/LanguageModels/models/AnthropicCompletionThinking.md create mode 100644 docs/v2/LanguageModels/models/AnthropicCompletionToolUse.md create mode 100644 docs/v2/LanguageModels/models/AnthropicCustomTool.md create mode 100644 docs/v2/LanguageModels/models/AnthropicDisableParallelToolUse.md create mode 100644 docs/v2/LanguageModels/models/AnthropicDisabledThinking.md create mode 100644 docs/v2/LanguageModels/models/AnthropicDocument.md create mode 100644 docs/v2/LanguageModels/models/AnthropicDocumentCitations.md create mode 100644 docs/v2/LanguageModels/models/AnthropicDocumentSource.md create mode 100644 docs/v2/LanguageModels/models/AnthropicEnabledThinking.md create mode 100644 docs/v2/LanguageModels/models/AnthropicEphemeralCacheControl.md create mode 100644 docs/v2/LanguageModels/models/AnthropicImage.md create mode 100644 docs/v2/LanguageModels/models/AnthropicImageBase64Source.md create mode 100644 docs/v2/LanguageModels/models/AnthropicImageSource.md create mode 100644 docs/v2/LanguageModels/models/AnthropicMediaType.md create mode 100644 docs/v2/LanguageModels/models/AnthropicMessage.md create mode 100644 docs/v2/LanguageModels/models/AnthropicMessageContent.md create mode 100644 docs/v2/LanguageModels/models/AnthropicMessageRole.md create mode 100644 docs/v2/LanguageModels/models/AnthropicMessagesRequest.md create mode 100644 docs/v2/LanguageModels/models/AnthropicMessagesResponse.md create mode 100644 docs/v2/LanguageModels/models/AnthropicNoneToolChoice.md create mode 100644 docs/v2/LanguageModels/models/AnthropicRedactedThinking.md create mode 100644 docs/v2/LanguageModels/models/AnthropicSystemMessage.md create mode 100644 docs/v2/LanguageModels/models/AnthropicText.md create mode 100644 docs/v2/LanguageModels/models/AnthropicTextDocumentSource.md create mode 100644 docs/v2/LanguageModels/models/AnthropicThinking.md create mode 100644 docs/v2/LanguageModels/models/AnthropicThinkingConfig.md create mode 100644 docs/v2/LanguageModels/models/AnthropicTokenUsage.md create mode 100644 docs/v2/LanguageModels/models/AnthropicTool.md create mode 100644 docs/v2/LanguageModels/models/AnthropicToolChoice.md create mode 100644 docs/v2/LanguageModels/models/AnthropicToolResult.md create mode 100644 docs/v2/LanguageModels/models/AnthropicToolResultContent.md create mode 100644 docs/v2/LanguageModels/models/AnthropicToolToolChoice.md create mode 100644 docs/v2/LanguageModels/models/AnthropicToolUse.md create mode 100644 docs/v2/LanguageModels/models/JsonSchema.md create mode 100644 docs/v2/LanguageModels/models/LanguageModelApiName.md create mode 100644 docs/v2/LanguageModels/models/OpenAiEmbeddingInput.md create mode 100644 docs/v2/LanguageModels/models/OpenAiEmbeddingTokenUsage.md create mode 100644 docs/v2/LanguageModels/models/OpenAiEmbeddingsRequest.md create mode 100644 docs/v2/LanguageModels/models/OpenAiEmbeddingsResponse.md create mode 100644 docs/v2/LanguageModels/models/OpenAiEncodingFormat.md create mode 100644 docs/v2/MediaSets/MediaSet.md create mode 100644 docs/v2/MediaSets/models/BranchName.md create mode 100644 docs/v2/MediaSets/models/BranchRid.md create mode 100644 docs/v2/MediaSets/models/GetMediaItemInfoResponse.md create mode 100644 docs/v2/MediaSets/models/GetMediaItemRidByPathResponse.md create mode 100644 docs/v2/MediaSets/models/LogicalTimestamp.md create mode 100644 docs/v2/MediaSets/models/MediaAttribution.md create mode 100644 docs/v2/MediaSets/models/MediaItemXmlFormat.md create mode 100644 docs/v2/MediaSets/models/PutMediaItemResponse.md create mode 100644 docs/v2/MediaSets/models/TrackedTransformationFailedResponse.md create mode 100644 docs/v2/MediaSets/models/TrackedTransformationPendingResponse.md create mode 100644 docs/v2/MediaSets/models/TrackedTransformationResponse.md create mode 100644 docs/v2/MediaSets/models/TrackedTransformationSuccessfulResponse.md create mode 100644 docs/v2/MediaSets/models/TransactionId.md create mode 100644 docs/v2/Models/Model.md create mode 100644 docs/v2/Models/ModelVersion.md create mode 100644 docs/v2/Models/models/CreateModelRequest.md create mode 100644 docs/v2/Models/models/CreateModelVersionRequest.md create mode 100644 docs/v2/Models/models/DillModelFiles.md create mode 100644 docs/v2/Models/models/ListModelVersionsResponse.md create mode 100644 docs/v2/Models/models/Model.md create mode 100644 docs/v2/Models/models/ModelApi.md create mode 100644 docs/v2/Models/models/ModelApiAnyType.md create mode 100644 docs/v2/Models/models/ModelApiArrayType.md create mode 100644 docs/v2/Models/models/ModelApiColumn.md create mode 100644 docs/v2/Models/models/ModelApiDataType.md create mode 100644 docs/v2/Models/models/ModelApiInput.md create mode 100644 docs/v2/Models/models/ModelApiMapType.md create mode 100644 docs/v2/Models/models/ModelApiOutput.md create mode 100644 docs/v2/Models/models/ModelApiParameterType.md create mode 100644 docs/v2/Models/models/ModelApiTabularFormat.md create mode 100644 docs/v2/Models/models/ModelApiTabularType.md create mode 100644 docs/v2/Models/models/ModelFiles.md create mode 100644 docs/v2/Models/models/ModelName.md create mode 100644 docs/v2/Models/models/ModelRid.md create mode 100644 docs/v2/Models/models/ModelVersion.md create mode 100644 docs/v2/Models/models/ModelVersionRid.md create mode 100644 docs/v2/Ontologies/Action.md create mode 100644 docs/v2/Ontologies/ActionType.md create mode 100644 docs/v2/Ontologies/ActionTypeFullMetadata.md create mode 100644 docs/v2/Ontologies/Attachment.md create mode 100644 docs/v2/Ontologies/AttachmentProperty.md create mode 100644 docs/v2/Ontologies/CipherTextProperty.md create mode 100644 docs/v2/Ontologies/LinkedObject.md create mode 100644 docs/v2/Ontologies/MediaReferenceProperty.md create mode 100644 docs/v2/Ontologies/ObjectType.md create mode 100644 docs/v2/Ontologies/Ontology.md create mode 100644 docs/v2/Ontologies/OntologyInterface.md create mode 100644 docs/v2/Ontologies/OntologyObject.md create mode 100644 docs/v2/Ontologies/OntologyObjectSet.md create mode 100644 docs/v2/Ontologies/OntologyTransaction.md create mode 100644 docs/v2/Ontologies/OntologyValueType.md create mode 100644 docs/v2/Ontologies/Query.md create mode 100644 docs/v2/Ontologies/QueryType.md create mode 100644 docs/v2/Ontologies/TimeSeriesPropertyV2.md create mode 100644 docs/v2/Ontologies/TimeSeriesValueBankProperty.md create mode 100644 docs/v2/Ontologies/models/AbsoluteTimeRange.md create mode 100644 docs/v2/Ontologies/models/AbsoluteValuePropertyExpression.md create mode 100644 docs/v2/Ontologies/models/ActionExecutionTime.md create mode 100644 docs/v2/Ontologies/models/ActionLogicRule.md create mode 100644 docs/v2/Ontologies/models/ActionParameterArrayType.md create mode 100644 docs/v2/Ontologies/models/ActionParameterType.md create mode 100644 docs/v2/Ontologies/models/ActionParameterV2.md create mode 100644 docs/v2/Ontologies/models/ActionResults.md create mode 100644 docs/v2/Ontologies/models/ActionRid.md create mode 100644 docs/v2/Ontologies/models/ActionTypeApiName.md create mode 100644 docs/v2/Ontologies/models/ActionTypeFullMetadata.md create mode 100644 docs/v2/Ontologies/models/ActionTypeRid.md create mode 100644 docs/v2/Ontologies/models/ActionTypeV2.md create mode 100644 docs/v2/Ontologies/models/ActivePropertyTypeStatus.md create mode 100644 docs/v2/Ontologies/models/AddLink.md create mode 100644 docs/v2/Ontologies/models/AddLinkEdit.md create mode 100644 docs/v2/Ontologies/models/AddObject.md create mode 100644 docs/v2/Ontologies/models/AddObjectEdit.md create mode 100644 docs/v2/Ontologies/models/AddPropertyExpression.md create mode 100644 docs/v2/Ontologies/models/Affix.md create mode 100644 docs/v2/Ontologies/models/AggregateObjectSetRequestV2.md create mode 100644 docs/v2/Ontologies/models/AggregateObjectsRequestV2.md create mode 100644 docs/v2/Ontologies/models/AggregateObjectsResponseItemV2.md create mode 100644 docs/v2/Ontologies/models/AggregateObjectsResponseV2.md create mode 100644 docs/v2/Ontologies/models/AggregateTimeSeries.md create mode 100644 docs/v2/Ontologies/models/AggregationAccuracy.md create mode 100644 docs/v2/Ontologies/models/AggregationAccuracyRequest.md create mode 100644 docs/v2/Ontologies/models/AggregationDurationGroupingV2.md create mode 100644 docs/v2/Ontologies/models/AggregationExactGroupingV2.md create mode 100644 docs/v2/Ontologies/models/AggregationFixedWidthGroupingV2.md create mode 100644 docs/v2/Ontologies/models/AggregationGroupByV2.md create mode 100644 docs/v2/Ontologies/models/AggregationGroupKeyV2.md create mode 100644 docs/v2/Ontologies/models/AggregationGroupValueV2.md create mode 100644 docs/v2/Ontologies/models/AggregationMetricName.md create mode 100644 docs/v2/Ontologies/models/AggregationMetricResultV2.md create mode 100644 docs/v2/Ontologies/models/AggregationRangeV2.md create mode 100644 docs/v2/Ontologies/models/AggregationRangesGroupingV2.md create mode 100644 docs/v2/Ontologies/models/AggregationV2.md create mode 100644 docs/v2/Ontologies/models/AllOfRule.md create mode 100644 docs/v2/Ontologies/models/AndQueryV2.md create mode 100644 docs/v2/Ontologies/models/AnyOfRule.md create mode 100644 docs/v2/Ontologies/models/ApplyActionMode.md create mode 100644 docs/v2/Ontologies/models/ApplyActionOverrides.md create mode 100644 docs/v2/Ontologies/models/ApplyActionRequestOptions.md create mode 100644 docs/v2/Ontologies/models/ApplyActionRequestV2.md create mode 100644 docs/v2/Ontologies/models/ApplyActionWithOverridesRequest.md create mode 100644 docs/v2/Ontologies/models/ApplyReducersAndExtractMainValueLoadLevel.md create mode 100644 docs/v2/Ontologies/models/ApplyReducersLoadLevel.md create mode 100644 docs/v2/Ontologies/models/ApproximateDistinctAggregationV2.md create mode 100644 docs/v2/Ontologies/models/ApproximatePercentileAggregationV2.md create mode 100644 docs/v2/Ontologies/models/ArrayConstraint.md create mode 100644 docs/v2/Ontologies/models/ArrayEntryEvaluatedConstraint.md create mode 100644 docs/v2/Ontologies/models/ArrayEvaluatedConstraint.md create mode 100644 docs/v2/Ontologies/models/ArraySizeConstraint.md create mode 100644 docs/v2/Ontologies/models/ArtifactRepositoryRid.md create mode 100644 docs/v2/Ontologies/models/AttachmentMetadataResponse.md create mode 100644 docs/v2/Ontologies/models/AttachmentRid.md create mode 100644 docs/v2/Ontologies/models/AttachmentV2.md create mode 100644 docs/v2/Ontologies/models/AvgAggregationV2.md create mode 100644 docs/v2/Ontologies/models/BatchActionObjectEdit.md create mode 100644 docs/v2/Ontologies/models/BatchActionObjectEdits.md create mode 100644 docs/v2/Ontologies/models/BatchActionResults.md create mode 100644 docs/v2/Ontologies/models/BatchApplyActionRequestItem.md create mode 100644 docs/v2/Ontologies/models/BatchApplyActionRequestOptions.md create mode 100644 docs/v2/Ontologies/models/BatchApplyActionRequestV2.md create mode 100644 docs/v2/Ontologies/models/BatchApplyActionResponseV2.md create mode 100644 docs/v2/Ontologies/models/BatchReturnEditsMode.md create mode 100644 docs/v2/Ontologies/models/BatchedFunctionLogicRule.md create mode 100644 docs/v2/Ontologies/models/BlueprintIcon.md create mode 100644 docs/v2/Ontologies/models/BoundingBoxValue.md create mode 100644 docs/v2/Ontologies/models/CenterPoint.md create mode 100644 docs/v2/Ontologies/models/CenterPointTypes.md create mode 100644 docs/v2/Ontologies/models/ContainsAllTermsInOrderPrefixLastTerm.md create mode 100644 docs/v2/Ontologies/models/ContainsAllTermsInOrderQuery.md create mode 100644 docs/v2/Ontologies/models/ContainsAllTermsQuery.md create mode 100644 docs/v2/Ontologies/models/ContainsAnyTermQuery.md create mode 100644 docs/v2/Ontologies/models/ContainsQueryV2.md create mode 100644 docs/v2/Ontologies/models/CountAggregationV2.md create mode 100644 docs/v2/Ontologies/models/CountObjectsResponseV2.md create mode 100644 docs/v2/Ontologies/models/CreateInterfaceLinkLogicRule.md create mode 100644 docs/v2/Ontologies/models/CreateInterfaceLogicRule.md create mode 100644 docs/v2/Ontologies/models/CreateInterfaceObjectRule.md create mode 100644 docs/v2/Ontologies/models/CreateLinkLogicRule.md create mode 100644 docs/v2/Ontologies/models/CreateLinkRule.md create mode 100644 docs/v2/Ontologies/models/CreateObjectLogicRule.md create mode 100644 docs/v2/Ontologies/models/CreateObjectRule.md create mode 100644 docs/v2/Ontologies/models/CreateOrModifyObjectLogicRule.md create mode 100644 docs/v2/Ontologies/models/CreateOrModifyObjectLogicRuleV2.md create mode 100644 docs/v2/Ontologies/models/CreateTemporaryObjectSetRequestV2.md create mode 100644 docs/v2/Ontologies/models/CreateTemporaryObjectSetResponseV2.md create mode 100644 docs/v2/Ontologies/models/CurrentTimeArgument.md create mode 100644 docs/v2/Ontologies/models/CurrentUserArgument.md create mode 100644 docs/v2/Ontologies/models/DataValue.md create mode 100644 docs/v2/Ontologies/models/DatetimeFormat.md create mode 100644 docs/v2/Ontologies/models/DatetimeLocalizedFormat.md create mode 100644 docs/v2/Ontologies/models/DatetimeLocalizedFormatType.md create mode 100644 docs/v2/Ontologies/models/DatetimeStringFormat.md create mode 100644 docs/v2/Ontologies/models/DatetimeTimezone.md create mode 100644 docs/v2/Ontologies/models/DatetimeTimezoneStatic.md create mode 100644 docs/v2/Ontologies/models/DatetimeTimezoneUser.md create mode 100644 docs/v2/Ontologies/models/DecryptionResult.md create mode 100644 docs/v2/Ontologies/models/DeleteInterfaceLinkLogicRule.md create mode 100644 docs/v2/Ontologies/models/DeleteInterfaceObjectRule.md create mode 100644 docs/v2/Ontologies/models/DeleteLink.md create mode 100644 docs/v2/Ontologies/models/DeleteLinkEdit.md create mode 100644 docs/v2/Ontologies/models/DeleteLinkLogicRule.md create mode 100644 docs/v2/Ontologies/models/DeleteLinkRule.md create mode 100644 docs/v2/Ontologies/models/DeleteObject.md create mode 100644 docs/v2/Ontologies/models/DeleteObjectEdit.md create mode 100644 docs/v2/Ontologies/models/DeleteObjectLogicRule.md create mode 100644 docs/v2/Ontologies/models/DeleteObjectRule.md create mode 100644 docs/v2/Ontologies/models/DeprecatedPropertyTypeStatus.md create mode 100644 docs/v2/Ontologies/models/DerivedPropertyApiName.md create mode 100644 docs/v2/Ontologies/models/DerivedPropertyDefinition.md create mode 100644 docs/v2/Ontologies/models/DividePropertyExpression.md create mode 100644 docs/v2/Ontologies/models/DoesNotIntersectBoundingBoxQuery.md create mode 100644 docs/v2/Ontologies/models/DoesNotIntersectPolygonQuery.md create mode 100644 docs/v2/Ontologies/models/DoubleVector.md create mode 100644 docs/v2/Ontologies/models/DurationBaseValue.md create mode 100644 docs/v2/Ontologies/models/DurationFormatStyle.md create mode 100644 docs/v2/Ontologies/models/DurationPrecision.md create mode 100644 docs/v2/Ontologies/models/EntrySetType.md create mode 100644 docs/v2/Ontologies/models/EnumConstraint.md create mode 100644 docs/v2/Ontologies/models/EqualsQueryV2.md create mode 100644 docs/v2/Ontologies/models/ExactDistinctAggregationV2.md create mode 100644 docs/v2/Ontologies/models/ExamplePropertyTypeStatus.md create mode 100644 docs/v2/Ontologies/models/ExecuteQueryRequest.md create mode 100644 docs/v2/Ontologies/models/ExecuteQueryResponse.md create mode 100644 docs/v2/Ontologies/models/ExperimentalPropertyTypeStatus.md create mode 100644 docs/v2/Ontologies/models/ExtractDatePart.md create mode 100644 docs/v2/Ontologies/models/ExtractMainValueLoadLevel.md create mode 100644 docs/v2/Ontologies/models/ExtractPropertyExpression.md create mode 100644 docs/v2/Ontologies/models/FilterValue.md create mode 100644 docs/v2/Ontologies/models/FixedValuesMapKey.md create mode 100644 docs/v2/Ontologies/models/FunctionLogicRule.md create mode 100644 docs/v2/Ontologies/models/FunctionParameterName.md create mode 100644 docs/v2/Ontologies/models/FunctionRid.md create mode 100644 docs/v2/Ontologies/models/FunctionVersion.md create mode 100644 docs/v2/Ontologies/models/FuzzyV2.md create mode 100644 docs/v2/Ontologies/models/GetSelectedPropertyOperation.md create mode 100644 docs/v2/Ontologies/models/GreatestPropertyExpression.md create mode 100644 docs/v2/Ontologies/models/GroupMemberConstraint.md create mode 100644 docs/v2/Ontologies/models/GtQueryV2.md create mode 100644 docs/v2/Ontologies/models/GteQueryV2.md create mode 100644 docs/v2/Ontologies/models/HumanReadableFormat.md create mode 100644 docs/v2/Ontologies/models/Icon.md create mode 100644 docs/v2/Ontologies/models/InQuery.md create mode 100644 docs/v2/Ontologies/models/InterfaceDefinedPropertyType.md create mode 100644 docs/v2/Ontologies/models/InterfaceLinkType.md create mode 100644 docs/v2/Ontologies/models/InterfaceLinkTypeApiName.md create mode 100644 docs/v2/Ontologies/models/InterfaceLinkTypeCardinality.md create mode 100644 docs/v2/Ontologies/models/InterfaceLinkTypeLinkedEntityApiName.md create mode 100644 docs/v2/Ontologies/models/InterfaceLinkTypeRid.md create mode 100644 docs/v2/Ontologies/models/InterfaceParameterPropertyArgument.md create mode 100644 docs/v2/Ontologies/models/InterfacePropertyApiName.md create mode 100644 docs/v2/Ontologies/models/InterfacePropertyLocalPropertyImplementation.md create mode 100644 docs/v2/Ontologies/models/InterfacePropertyReducedPropertyImplementation.md create mode 100644 docs/v2/Ontologies/models/InterfacePropertyStructFieldImplementation.md create mode 100644 docs/v2/Ontologies/models/InterfacePropertyStructImplementation.md create mode 100644 docs/v2/Ontologies/models/InterfacePropertyStructImplementationMapping.md create mode 100644 docs/v2/Ontologies/models/InterfacePropertyType.md create mode 100644 docs/v2/Ontologies/models/InterfacePropertyTypeImplementation.md create mode 100644 docs/v2/Ontologies/models/InterfacePropertyTypeRid.md create mode 100644 docs/v2/Ontologies/models/InterfaceSharedPropertyType.md create mode 100644 docs/v2/Ontologies/models/InterfaceToObjectTypeMapping.md create mode 100644 docs/v2/Ontologies/models/InterfaceToObjectTypeMappingV2.md create mode 100644 docs/v2/Ontologies/models/InterfaceToObjectTypeMappings.md create mode 100644 docs/v2/Ontologies/models/InterfaceToObjectTypeMappingsV2.md create mode 100644 docs/v2/Ontologies/models/InterfaceType.md create mode 100644 docs/v2/Ontologies/models/InterfaceTypeApiName.md create mode 100644 docs/v2/Ontologies/models/InterfaceTypeRid.md create mode 100644 docs/v2/Ontologies/models/IntersectsBoundingBoxQuery.md create mode 100644 docs/v2/Ontologies/models/IntersectsPolygonQuery.md create mode 100644 docs/v2/Ontologies/models/IntervalQuery.md create mode 100644 docs/v2/Ontologies/models/IntervalQueryRule.md create mode 100644 docs/v2/Ontologies/models/IsNullQueryV2.md create mode 100644 docs/v2/Ontologies/models/KnownType.md create mode 100644 docs/v2/Ontologies/models/LeastPropertyExpression.md create mode 100644 docs/v2/Ontologies/models/LengthConstraint.md create mode 100644 docs/v2/Ontologies/models/LinkSideObject.md create mode 100644 docs/v2/Ontologies/models/LinkTypeApiName.md create mode 100644 docs/v2/Ontologies/models/LinkTypeId.md create mode 100644 docs/v2/Ontologies/models/LinkTypeRid.md create mode 100644 docs/v2/Ontologies/models/LinkTypeSideCardinality.md create mode 100644 docs/v2/Ontologies/models/LinkTypeSideV2.md create mode 100644 docs/v2/Ontologies/models/LinkedInterfaceTypeApiName.md create mode 100644 docs/v2/Ontologies/models/LinkedObjectLocator.md create mode 100644 docs/v2/Ontologies/models/LinkedObjectTypeApiName.md create mode 100644 docs/v2/Ontologies/models/LinksFromObject.md create mode 100644 docs/v2/Ontologies/models/ListActionTypesFullMetadataResponse.md create mode 100644 docs/v2/Ontologies/models/ListActionTypesResponseV2.md create mode 100644 docs/v2/Ontologies/models/ListAttachmentsResponseV2.md create mode 100644 docs/v2/Ontologies/models/ListInterfaceLinkedObjectsResponse.md create mode 100644 docs/v2/Ontologies/models/ListInterfaceTypesResponse.md create mode 100644 docs/v2/Ontologies/models/ListLinkedObjectsResponseV2.md create mode 100644 docs/v2/Ontologies/models/ListObjectTypesV2Response.md create mode 100644 docs/v2/Ontologies/models/ListObjectsForInterfaceResponse.md create mode 100644 docs/v2/Ontologies/models/ListObjectsResponseV2.md create mode 100644 docs/v2/Ontologies/models/ListOntologiesV2Response.md create mode 100644 docs/v2/Ontologies/models/ListOntologyValueTypesResponse.md create mode 100644 docs/v2/Ontologies/models/ListOutgoingInterfaceLinkTypesResponse.md create mode 100644 docs/v2/Ontologies/models/ListOutgoingLinkTypesResponseV2.md create mode 100644 docs/v2/Ontologies/models/ListQueryTypesResponseV2.md create mode 100644 docs/v2/Ontologies/models/LoadObjectSetLinksRequestV2.md create mode 100644 docs/v2/Ontologies/models/LoadObjectSetLinksResponseV2.md create mode 100644 docs/v2/Ontologies/models/LoadObjectSetRequestV2.md create mode 100644 docs/v2/Ontologies/models/LoadObjectSetResponseV2.md create mode 100644 docs/v2/Ontologies/models/LoadObjectSetV2MultipleObjectTypesRequest.md create mode 100644 docs/v2/Ontologies/models/LoadObjectSetV2MultipleObjectTypesResponse.md create mode 100644 docs/v2/Ontologies/models/LoadObjectSetV2ObjectsOrInterfacesRequest.md create mode 100644 docs/v2/Ontologies/models/LoadObjectSetV2ObjectsOrInterfacesResponse.md create mode 100644 docs/v2/Ontologies/models/LoadOntologyMetadataRequest.md create mode 100644 docs/v2/Ontologies/models/LogicRule.md create mode 100644 docs/v2/Ontologies/models/LogicRuleArgument.md create mode 100644 docs/v2/Ontologies/models/LtQueryV2.md create mode 100644 docs/v2/Ontologies/models/LteQueryV2.md create mode 100644 docs/v2/Ontologies/models/MatchRule.md create mode 100644 docs/v2/Ontologies/models/MaxAggregationV2.md create mode 100644 docs/v2/Ontologies/models/MediaMetadata.md create mode 100644 docs/v2/Ontologies/models/MethodObjectSet.md create mode 100644 docs/v2/Ontologies/models/MinAggregationV2.md create mode 100644 docs/v2/Ontologies/models/ModifyInterfaceLogicRule.md create mode 100644 docs/v2/Ontologies/models/ModifyInterfaceObjectRule.md create mode 100644 docs/v2/Ontologies/models/ModifyObject.md create mode 100644 docs/v2/Ontologies/models/ModifyObjectEdit.md create mode 100644 docs/v2/Ontologies/models/ModifyObjectLogicRule.md create mode 100644 docs/v2/Ontologies/models/ModifyObjectRule.md create mode 100644 docs/v2/Ontologies/models/MultiplyPropertyExpression.md create mode 100644 docs/v2/Ontologies/models/NearestNeighborsQuery.md create mode 100644 docs/v2/Ontologies/models/NearestNeighborsQueryText.md create mode 100644 docs/v2/Ontologies/models/NegatePropertyExpression.md create mode 100644 docs/v2/Ontologies/models/NestedInterfacePropertyTypeImplementation.md create mode 100644 docs/v2/Ontologies/models/NestedQueryAggregation.md create mode 100644 docs/v2/Ontologies/models/NotQueryV2.md create mode 100644 docs/v2/Ontologies/models/NumberFormatAffix.md create mode 100644 docs/v2/Ontologies/models/NumberFormatCurrency.md create mode 100644 docs/v2/Ontologies/models/NumberFormatCurrencyStyle.md create mode 100644 docs/v2/Ontologies/models/NumberFormatCustomUnit.md create mode 100644 docs/v2/Ontologies/models/NumberFormatDuration.md create mode 100644 docs/v2/Ontologies/models/NumberFormatFixedValues.md create mode 100644 docs/v2/Ontologies/models/NumberFormatNotation.md create mode 100644 docs/v2/Ontologies/models/NumberFormatOptions.md create mode 100644 docs/v2/Ontologies/models/NumberFormatRatio.md create mode 100644 docs/v2/Ontologies/models/NumberFormatScale.md create mode 100644 docs/v2/Ontologies/models/NumberFormatStandard.md create mode 100644 docs/v2/Ontologies/models/NumberFormatStandardUnit.md create mode 100644 docs/v2/Ontologies/models/NumberRatioType.md create mode 100644 docs/v2/Ontologies/models/NumberRoundingMode.md create mode 100644 docs/v2/Ontologies/models/NumberScaleType.md create mode 100644 docs/v2/Ontologies/models/ObjectEdit.md create mode 100644 docs/v2/Ontologies/models/ObjectEdits.md create mode 100644 docs/v2/Ontologies/models/ObjectParameterPropertyArgument.md create mode 100644 docs/v2/Ontologies/models/ObjectPropertyType.md create mode 100644 docs/v2/Ontologies/models/ObjectPropertyValueConstraint.md create mode 100644 docs/v2/Ontologies/models/ObjectQueryResultConstraint.md create mode 100644 docs/v2/Ontologies/models/ObjectRid.md create mode 100644 docs/v2/Ontologies/models/ObjectSet.md create mode 100644 docs/v2/Ontologies/models/ObjectSetAsBaseObjectTypesType.md create mode 100644 docs/v2/Ontologies/models/ObjectSetAsTypeType.md create mode 100644 docs/v2/Ontologies/models/ObjectSetBaseType.md create mode 100644 docs/v2/Ontologies/models/ObjectSetFilterType.md create mode 100644 docs/v2/Ontologies/models/ObjectSetInterfaceBaseType.md create mode 100644 docs/v2/Ontologies/models/ObjectSetInterfaceLinkSearchAroundType.md create mode 100644 docs/v2/Ontologies/models/ObjectSetIntersectionType.md create mode 100644 docs/v2/Ontologies/models/ObjectSetMethodInputType.md create mode 100644 docs/v2/Ontologies/models/ObjectSetNearestNeighborsType.md create mode 100644 docs/v2/Ontologies/models/ObjectSetReferenceType.md create mode 100644 docs/v2/Ontologies/models/ObjectSetRid.md create mode 100644 docs/v2/Ontologies/models/ObjectSetSearchAroundType.md create mode 100644 docs/v2/Ontologies/models/ObjectSetStaticType.md create mode 100644 docs/v2/Ontologies/models/ObjectSetSubtractType.md create mode 100644 docs/v2/Ontologies/models/ObjectSetUnionType.md create mode 100644 docs/v2/Ontologies/models/ObjectSetWithPropertiesType.md create mode 100644 docs/v2/Ontologies/models/ObjectTypeApiName.md create mode 100644 docs/v2/Ontologies/models/ObjectTypeEdits.md create mode 100644 docs/v2/Ontologies/models/ObjectTypeFullMetadata.md create mode 100644 docs/v2/Ontologies/models/ObjectTypeId.md create mode 100644 docs/v2/Ontologies/models/ObjectTypeInterfaceImplementation.md create mode 100644 docs/v2/Ontologies/models/ObjectTypeRid.md create mode 100644 docs/v2/Ontologies/models/ObjectTypeV2.md create mode 100644 docs/v2/Ontologies/models/ObjectTypeVisibility.md create mode 100644 docs/v2/Ontologies/models/OneOfConstraint.md create mode 100644 docs/v2/Ontologies/models/OntologyApiName.md create mode 100644 docs/v2/Ontologies/models/OntologyArrayType.md create mode 100644 docs/v2/Ontologies/models/OntologyDataType.md create mode 100644 docs/v2/Ontologies/models/OntologyFullMetadata.md create mode 100644 docs/v2/Ontologies/models/OntologyIdentifier.md create mode 100644 docs/v2/Ontologies/models/OntologyInterfaceObjectSetType.md create mode 100644 docs/v2/Ontologies/models/OntologyInterfaceObjectType.md create mode 100644 docs/v2/Ontologies/models/OntologyMapType.md create mode 100644 docs/v2/Ontologies/models/OntologyObjectArrayType.md create mode 100644 docs/v2/Ontologies/models/OntologyObjectArrayTypeReducer.md create mode 100644 docs/v2/Ontologies/models/OntologyObjectArrayTypeReducerSortDirection.md create mode 100644 docs/v2/Ontologies/models/OntologyObjectSetType.md create mode 100644 docs/v2/Ontologies/models/OntologyObjectType.md create mode 100644 docs/v2/Ontologies/models/OntologyObjectTypeReferenceType.md create mode 100644 docs/v2/Ontologies/models/OntologyObjectV2.md create mode 100644 docs/v2/Ontologies/models/OntologyRid.md create mode 100644 docs/v2/Ontologies/models/OntologySetType.md create mode 100644 docs/v2/Ontologies/models/OntologyStructField.md create mode 100644 docs/v2/Ontologies/models/OntologyStructType.md create mode 100644 docs/v2/Ontologies/models/OntologyTransactionId.md create mode 100644 docs/v2/Ontologies/models/OntologyV2.md create mode 100644 docs/v2/Ontologies/models/OntologyValueType.md create mode 100644 docs/v2/Ontologies/models/OrQueryV2.md create mode 100644 docs/v2/Ontologies/models/OrderBy.md create mode 100644 docs/v2/Ontologies/models/OrderByDirection.md create mode 100644 docs/v2/Ontologies/models/ParameterEvaluatedConstraint.md create mode 100644 docs/v2/Ontologies/models/ParameterEvaluationResult.md create mode 100644 docs/v2/Ontologies/models/ParameterId.md create mode 100644 docs/v2/Ontologies/models/ParameterIdArgument.md create mode 100644 docs/v2/Ontologies/models/ParameterOption.md create mode 100644 docs/v2/Ontologies/models/Plaintext.md create mode 100644 docs/v2/Ontologies/models/PolygonValue.md create mode 100644 docs/v2/Ontologies/models/PostTransactionEditsRequest.md create mode 100644 docs/v2/Ontologies/models/PostTransactionEditsResponse.md create mode 100644 docs/v2/Ontologies/models/PreciseDuration.md create mode 100644 docs/v2/Ontologies/models/PreciseTimeUnit.md create mode 100644 docs/v2/Ontologies/models/PrefixOnLastTokenRule.md create mode 100644 docs/v2/Ontologies/models/PrimaryKeyValue.md create mode 100644 docs/v2/Ontologies/models/PropertyApiName.md create mode 100644 docs/v2/Ontologies/models/PropertyApiNameSelector.md create mode 100644 docs/v2/Ontologies/models/PropertyBooleanFormattingRule.md create mode 100644 docs/v2/Ontologies/models/PropertyDateFormattingRule.md create mode 100644 docs/v2/Ontologies/models/PropertyFilter.md create mode 100644 docs/v2/Ontologies/models/PropertyId.md create mode 100644 docs/v2/Ontologies/models/PropertyIdentifier.md create mode 100644 docs/v2/Ontologies/models/PropertyImplementation.md create mode 100644 docs/v2/Ontologies/models/PropertyKnownTypeFormattingRule.md create mode 100644 docs/v2/Ontologies/models/PropertyLoadLevel.md create mode 100644 docs/v2/Ontologies/models/PropertyNumberFormattingRule.md create mode 100644 docs/v2/Ontologies/models/PropertyNumberFormattingRuleType.md create mode 100644 docs/v2/Ontologies/models/PropertyOrStructFieldOfPropertyImplementation.md create mode 100644 docs/v2/Ontologies/models/PropertyTimestampFormattingRule.md create mode 100644 docs/v2/Ontologies/models/PropertyTypeApiName.md create mode 100644 docs/v2/Ontologies/models/PropertyTypeReference.md create mode 100644 docs/v2/Ontologies/models/PropertyTypeReferenceOrStringConstant.md create mode 100644 docs/v2/Ontologies/models/PropertyTypeRid.md create mode 100644 docs/v2/Ontologies/models/PropertyTypeStatus.md create mode 100644 docs/v2/Ontologies/models/PropertyTypeVisibility.md create mode 100644 docs/v2/Ontologies/models/PropertyV2.md create mode 100644 docs/v2/Ontologies/models/PropertyValue.md create mode 100644 docs/v2/Ontologies/models/PropertyValueEscapedString.md create mode 100644 docs/v2/Ontologies/models/PropertyValueFormattingRule.md create mode 100644 docs/v2/Ontologies/models/PropertyWithLoadLevelSelector.md create mode 100644 docs/v2/Ontologies/models/QueryAggregation.md create mode 100644 docs/v2/Ontologies/models/QueryAggregationKeyType.md create mode 100644 docs/v2/Ontologies/models/QueryAggregationRangeSubType.md create mode 100644 docs/v2/Ontologies/models/QueryAggregationRangeType.md create mode 100644 docs/v2/Ontologies/models/QueryAggregationValueType.md create mode 100644 docs/v2/Ontologies/models/QueryApiName.md create mode 100644 docs/v2/Ontologies/models/QueryArrayType.md create mode 100644 docs/v2/Ontologies/models/QueryDataType.md create mode 100644 docs/v2/Ontologies/models/QueryParameterV2.md create mode 100644 docs/v2/Ontologies/models/QueryRuntimeErrorParameter.md create mode 100644 docs/v2/Ontologies/models/QuerySetType.md create mode 100644 docs/v2/Ontologies/models/QueryStructField.md create mode 100644 docs/v2/Ontologies/models/QueryStructType.md create mode 100644 docs/v2/Ontologies/models/QueryThreeDimensionalAggregation.md create mode 100644 docs/v2/Ontologies/models/QueryTwoDimensionalAggregation.md create mode 100644 docs/v2/Ontologies/models/QueryTypeV2.md create mode 100644 docs/v2/Ontologies/models/QueryUnionType.md create mode 100644 docs/v2/Ontologies/models/RangeConstraint.md create mode 100644 docs/v2/Ontologies/models/RangesConstraint.md create mode 100644 docs/v2/Ontologies/models/RegexConstraint.md create mode 100644 docs/v2/Ontologies/models/RegexQuery.md create mode 100644 docs/v2/Ontologies/models/RelativeDateRangeBound.md create mode 100644 docs/v2/Ontologies/models/RelativeDateRangeQuery.md create mode 100644 docs/v2/Ontologies/models/RelativePointInTime.md create mode 100644 docs/v2/Ontologies/models/RelativeTime.md create mode 100644 docs/v2/Ontologies/models/RelativeTimeRange.md create mode 100644 docs/v2/Ontologies/models/RelativeTimeRelation.md create mode 100644 docs/v2/Ontologies/models/RelativeTimeSeriesTimeUnit.md create mode 100644 docs/v2/Ontologies/models/RelativeTimeUnit.md create mode 100644 docs/v2/Ontologies/models/ResolvedInterfacePropertyType.md create mode 100644 docs/v2/Ontologies/models/ReturnEditsMode.md create mode 100644 docs/v2/Ontologies/models/RidConstraint.md create mode 100644 docs/v2/Ontologies/models/RollingAggregateWindowPoints.md create mode 100644 docs/v2/Ontologies/models/SdkPackageName.md create mode 100644 docs/v2/Ontologies/models/SdkPackageRid.md create mode 100644 docs/v2/Ontologies/models/SdkVersion.md create mode 100644 docs/v2/Ontologies/models/SearchJsonQueryV2.md create mode 100644 docs/v2/Ontologies/models/SearchObjectsForInterfaceRequest.md create mode 100644 docs/v2/Ontologies/models/SearchObjectsRequestV2.md create mode 100644 docs/v2/Ontologies/models/SearchObjectsResponseV2.md create mode 100644 docs/v2/Ontologies/models/SearchOrderByType.md create mode 100644 docs/v2/Ontologies/models/SearchOrderByV2.md create mode 100644 docs/v2/Ontologies/models/SearchOrderingV2.md create mode 100644 docs/v2/Ontologies/models/SelectedPropertyApiName.md create mode 100644 docs/v2/Ontologies/models/SelectedPropertyApproximateDistinctAggregation.md create mode 100644 docs/v2/Ontologies/models/SelectedPropertyApproximatePercentileAggregation.md create mode 100644 docs/v2/Ontologies/models/SelectedPropertyAvgAggregation.md create mode 100644 docs/v2/Ontologies/models/SelectedPropertyCollectListAggregation.md create mode 100644 docs/v2/Ontologies/models/SelectedPropertyCollectSetAggregation.md create mode 100644 docs/v2/Ontologies/models/SelectedPropertyCountAggregation.md create mode 100644 docs/v2/Ontologies/models/SelectedPropertyExactDistinctAggregation.md create mode 100644 docs/v2/Ontologies/models/SelectedPropertyExpression.md create mode 100644 docs/v2/Ontologies/models/SelectedPropertyMaxAggregation.md create mode 100644 docs/v2/Ontologies/models/SelectedPropertyMinAggregation.md create mode 100644 docs/v2/Ontologies/models/SelectedPropertyOperation.md create mode 100644 docs/v2/Ontologies/models/SelectedPropertySumAggregation.md create mode 100644 docs/v2/Ontologies/models/SharedPropertyType.md create mode 100644 docs/v2/Ontologies/models/SharedPropertyTypeApiName.md create mode 100644 docs/v2/Ontologies/models/SharedPropertyTypeRid.md create mode 100644 docs/v2/Ontologies/models/StartsWithQuery.md create mode 100644 docs/v2/Ontologies/models/StaticArgument.md create mode 100644 docs/v2/Ontologies/models/StreamTimeSeriesPointsRequest.md create mode 100644 docs/v2/Ontologies/models/StreamTimeSeriesValuesRequest.md create mode 100644 docs/v2/Ontologies/models/StreamingOutputFormat.md create mode 100644 docs/v2/Ontologies/models/StringConstant.md create mode 100644 docs/v2/Ontologies/models/StringLengthConstraint.md create mode 100644 docs/v2/Ontologies/models/StringRegexMatchConstraint.md create mode 100644 docs/v2/Ontologies/models/StructConstraint.md create mode 100644 docs/v2/Ontologies/models/StructEvaluatedConstraint.md create mode 100644 docs/v2/Ontologies/models/StructFieldApiName.md create mode 100644 docs/v2/Ontologies/models/StructFieldArgument.md create mode 100644 docs/v2/Ontologies/models/StructFieldEvaluatedConstraint.md create mode 100644 docs/v2/Ontologies/models/StructFieldEvaluationResult.md create mode 100644 docs/v2/Ontologies/models/StructFieldOfPropertyImplementation.md create mode 100644 docs/v2/Ontologies/models/StructFieldSelector.md create mode 100644 docs/v2/Ontologies/models/StructFieldType.md create mode 100644 docs/v2/Ontologies/models/StructFieldTypeRid.md create mode 100644 docs/v2/Ontologies/models/StructListParameterFieldArgument.md create mode 100644 docs/v2/Ontologies/models/StructParameterFieldApiName.md create mode 100644 docs/v2/Ontologies/models/StructParameterFieldArgument.md create mode 100644 docs/v2/Ontologies/models/StructType.md create mode 100644 docs/v2/Ontologies/models/StructTypeMainValue.md create mode 100644 docs/v2/Ontologies/models/SubmissionCriteriaEvaluation.md create mode 100644 docs/v2/Ontologies/models/SubtractPropertyExpression.md create mode 100644 docs/v2/Ontologies/models/SumAggregationV2.md create mode 100644 docs/v2/Ontologies/models/SyncApplyActionResponseV2.md create mode 100644 docs/v2/Ontologies/models/SynchronousWebhookOutputArgument.md create mode 100644 docs/v2/Ontologies/models/ThreeDimensionalAggregation.md create mode 100644 docs/v2/Ontologies/models/TimeCodeFormat.md create mode 100644 docs/v2/Ontologies/models/TimeRange.md create mode 100644 docs/v2/Ontologies/models/TimeSeriesAggregationMethod.md create mode 100644 docs/v2/Ontologies/models/TimeSeriesAggregationStrategy.md create mode 100644 docs/v2/Ontologies/models/TimeSeriesCumulativeAggregate.md create mode 100644 docs/v2/Ontologies/models/TimeSeriesPeriodicAggregate.md create mode 100644 docs/v2/Ontologies/models/TimeSeriesPoint.md create mode 100644 docs/v2/Ontologies/models/TimeSeriesRollingAggregate.md create mode 100644 docs/v2/Ontologies/models/TimeSeriesRollingAggregateWindow.md create mode 100644 docs/v2/Ontologies/models/TimeSeriesWindowType.md create mode 100644 docs/v2/Ontologies/models/TimeUnit.md create mode 100644 docs/v2/Ontologies/models/TimeseriesEntry.md create mode 100644 docs/v2/Ontologies/models/TransactionEdit.md create mode 100644 docs/v2/Ontologies/models/TwoDimensionalAggregation.md create mode 100644 docs/v2/Ontologies/models/UnevaluableConstraint.md create mode 100644 docs/v2/Ontologies/models/UniqueIdentifierArgument.md create mode 100644 docs/v2/Ontologies/models/UniqueIdentifierLinkId.md create mode 100644 docs/v2/Ontologies/models/UniqueIdentifierValue.md create mode 100644 docs/v2/Ontologies/models/UuidConstraint.md create mode 100644 docs/v2/Ontologies/models/ValidateActionResponseV2.md create mode 100644 docs/v2/Ontologies/models/ValidationResult.md create mode 100644 docs/v2/Ontologies/models/ValueType.md create mode 100644 docs/v2/Ontologies/models/ValueTypeApiName.md create mode 100644 docs/v2/Ontologies/models/ValueTypeArrayType.md create mode 100644 docs/v2/Ontologies/models/ValueTypeConstraint.md create mode 100644 docs/v2/Ontologies/models/ValueTypeDecimalType.md create mode 100644 docs/v2/Ontologies/models/ValueTypeFieldType.md create mode 100644 docs/v2/Ontologies/models/ValueTypeMapType.md create mode 100644 docs/v2/Ontologies/models/ValueTypeOptionalType.md create mode 100644 docs/v2/Ontologies/models/ValueTypeReferenceType.md create mode 100644 docs/v2/Ontologies/models/ValueTypeRid.md create mode 100644 docs/v2/Ontologies/models/ValueTypeStatus.md create mode 100644 docs/v2/Ontologies/models/ValueTypeStructField.md create mode 100644 docs/v2/Ontologies/models/ValueTypeStructType.md create mode 100644 docs/v2/Ontologies/models/ValueTypeUnionType.md create mode 100644 docs/v2/Ontologies/models/VersionedQueryTypeApiName.md create mode 100644 docs/v2/Ontologies/models/WildcardQuery.md create mode 100644 docs/v2/Ontologies/models/WithinBoundingBoxPoint.md create mode 100644 docs/v2/Ontologies/models/WithinBoundingBoxQuery.md create mode 100644 docs/v2/Ontologies/models/WithinDistanceOfQuery.md create mode 100644 docs/v2/Ontologies/models/WithinPolygonQuery.md create mode 100644 docs/v2/Orchestration/Build.md create mode 100644 docs/v2/Orchestration/Job.md create mode 100644 docs/v2/Orchestration/Schedule.md create mode 100644 docs/v2/Orchestration/ScheduleRun.md create mode 100644 docs/v2/Orchestration/ScheduleVersion.md create mode 100644 docs/v2/Orchestration/models/AbortOnFailure.md create mode 100644 docs/v2/Orchestration/models/Action.md create mode 100644 docs/v2/Orchestration/models/AffectedResourcesResponse.md create mode 100644 docs/v2/Orchestration/models/AndTrigger.md create mode 100644 docs/v2/Orchestration/models/Build.md create mode 100644 docs/v2/Orchestration/models/BuildStatus.md create mode 100644 docs/v2/Orchestration/models/BuildTarget.md create mode 100644 docs/v2/Orchestration/models/BuildableRid.md create mode 100644 docs/v2/Orchestration/models/ConnectingTarget.md create mode 100644 docs/v2/Orchestration/models/CreateBuildRequest.md create mode 100644 docs/v2/Orchestration/models/CreateScheduleRequest.md create mode 100644 docs/v2/Orchestration/models/CreateScheduleRequestAction.md create mode 100644 docs/v2/Orchestration/models/CreateScheduleRequestBuildTarget.md create mode 100644 docs/v2/Orchestration/models/CreateScheduleRequestConnectingTarget.md create mode 100644 docs/v2/Orchestration/models/CreateScheduleRequestManualTarget.md create mode 100644 docs/v2/Orchestration/models/CreateScheduleRequestProjectScope.md create mode 100644 docs/v2/Orchestration/models/CreateScheduleRequestScopeMode.md create mode 100644 docs/v2/Orchestration/models/CreateScheduleRequestUpstreamTarget.md create mode 100644 docs/v2/Orchestration/models/CreateScheduleRequestUserScope.md create mode 100644 docs/v2/Orchestration/models/CronExpression.md create mode 100644 docs/v2/Orchestration/models/DatasetJobOutput.md create mode 100644 docs/v2/Orchestration/models/DatasetUpdatedTrigger.md create mode 100644 docs/v2/Orchestration/models/FallbackBranches.md create mode 100644 docs/v2/Orchestration/models/ForceBuild.md create mode 100644 docs/v2/Orchestration/models/GetBuildsBatchRequestElement.md create mode 100644 docs/v2/Orchestration/models/GetBuildsBatchResponse.md create mode 100644 docs/v2/Orchestration/models/GetJobsBatchRequestElement.md create mode 100644 docs/v2/Orchestration/models/GetJobsBatchResponse.md create mode 100644 docs/v2/Orchestration/models/GetSchedulesBatchRequestElement.md create mode 100644 docs/v2/Orchestration/models/GetSchedulesBatchResponse.md create mode 100644 docs/v2/Orchestration/models/Job.md create mode 100644 docs/v2/Orchestration/models/JobOutput.md create mode 100644 docs/v2/Orchestration/models/JobStartedTime.md create mode 100644 docs/v2/Orchestration/models/JobStatus.md create mode 100644 docs/v2/Orchestration/models/JobSucceededTrigger.md create mode 100644 docs/v2/Orchestration/models/ListJobsOfBuildResponse.md create mode 100644 docs/v2/Orchestration/models/ListRunsOfScheduleResponse.md create mode 100644 docs/v2/Orchestration/models/ManualTarget.md create mode 100644 docs/v2/Orchestration/models/ManualTrigger.md create mode 100644 docs/v2/Orchestration/models/MediaSetUpdatedTrigger.md create mode 100644 docs/v2/Orchestration/models/NewLogicTrigger.md create mode 100644 docs/v2/Orchestration/models/NotificationsEnabled.md create mode 100644 docs/v2/Orchestration/models/OrTrigger.md create mode 100644 docs/v2/Orchestration/models/ProjectScope.md create mode 100644 docs/v2/Orchestration/models/ReplaceScheduleRequest.md create mode 100644 docs/v2/Orchestration/models/ReplaceScheduleRequestAction.md create mode 100644 docs/v2/Orchestration/models/ReplaceScheduleRequestBuildTarget.md create mode 100644 docs/v2/Orchestration/models/ReplaceScheduleRequestConnectingTarget.md create mode 100644 docs/v2/Orchestration/models/ReplaceScheduleRequestManualTarget.md create mode 100644 docs/v2/Orchestration/models/ReplaceScheduleRequestProjectScope.md create mode 100644 docs/v2/Orchestration/models/ReplaceScheduleRequestScopeMode.md create mode 100644 docs/v2/Orchestration/models/ReplaceScheduleRequestUpstreamTarget.md create mode 100644 docs/v2/Orchestration/models/ReplaceScheduleRequestUserScope.md create mode 100644 docs/v2/Orchestration/models/RetryBackoffDuration.md create mode 100644 docs/v2/Orchestration/models/RetryCount.md create mode 100644 docs/v2/Orchestration/models/Schedule.md create mode 100644 docs/v2/Orchestration/models/SchedulePaused.md create mode 100644 docs/v2/Orchestration/models/ScheduleRun.md create mode 100644 docs/v2/Orchestration/models/ScheduleRunError.md create mode 100644 docs/v2/Orchestration/models/ScheduleRunErrorName.md create mode 100644 docs/v2/Orchestration/models/ScheduleRunIgnored.md create mode 100644 docs/v2/Orchestration/models/ScheduleRunResult.md create mode 100644 docs/v2/Orchestration/models/ScheduleRunRid.md create mode 100644 docs/v2/Orchestration/models/ScheduleRunSubmitted.md create mode 100644 docs/v2/Orchestration/models/ScheduleSucceededTrigger.md create mode 100644 docs/v2/Orchestration/models/ScheduleVersion.md create mode 100644 docs/v2/Orchestration/models/ScheduleVersionRid.md create mode 100644 docs/v2/Orchestration/models/ScopeMode.md create mode 100644 docs/v2/Orchestration/models/SearchBuildsAndFilter.md create mode 100644 docs/v2/Orchestration/models/SearchBuildsEqualsFilter.md create mode 100644 docs/v2/Orchestration/models/SearchBuildsEqualsFilterField.md create mode 100644 docs/v2/Orchestration/models/SearchBuildsFilter.md create mode 100644 docs/v2/Orchestration/models/SearchBuildsGteFilter.md create mode 100644 docs/v2/Orchestration/models/SearchBuildsGteFilterField.md create mode 100644 docs/v2/Orchestration/models/SearchBuildsLtFilter.md create mode 100644 docs/v2/Orchestration/models/SearchBuildsLtFilterField.md create mode 100644 docs/v2/Orchestration/models/SearchBuildsNotFilter.md create mode 100644 docs/v2/Orchestration/models/SearchBuildsOrFilter.md create mode 100644 docs/v2/Orchestration/models/SearchBuildsOrderBy.md create mode 100644 docs/v2/Orchestration/models/SearchBuildsOrderByField.md create mode 100644 docs/v2/Orchestration/models/SearchBuildsOrderByItem.md create mode 100644 docs/v2/Orchestration/models/SearchBuildsRequest.md create mode 100644 docs/v2/Orchestration/models/SearchBuildsResponse.md create mode 100644 docs/v2/Orchestration/models/TableUpdatedTrigger.md create mode 100644 docs/v2/Orchestration/models/TimeTrigger.md create mode 100644 docs/v2/Orchestration/models/TransactionalMediaSetJobOutput.md create mode 100644 docs/v2/Orchestration/models/Trigger.md create mode 100644 docs/v2/Orchestration/models/UpstreamTarget.md create mode 100644 docs/v2/Orchestration/models/UserScope.md create mode 100644 docs/v2/SqlQueries/SqlQuery.md create mode 100644 docs/v2/SqlQueries/models/CanceledQueryStatus.md create mode 100644 docs/v2/SqlQueries/models/ExecuteSqlQueryRequest.md create mode 100644 docs/v2/SqlQueries/models/FailedQueryStatus.md create mode 100644 docs/v2/SqlQueries/models/QueryStatus.md create mode 100644 docs/v2/SqlQueries/models/RunningQueryStatus.md create mode 100644 docs/v2/SqlQueries/models/SqlQueryId.md create mode 100644 docs/v2/SqlQueries/models/SucceededQueryStatus.md create mode 100644 docs/v2/Streams/Dataset.md create mode 100644 docs/v2/Streams/Stream.md create mode 100644 docs/v2/Streams/models/Compressed.md create mode 100644 docs/v2/Streams/models/CreateStreamRequest.md create mode 100644 docs/v2/Streams/models/CreateStreamRequestStreamSchema.md create mode 100644 docs/v2/Streams/models/CreateStreamingDatasetRequest.md create mode 100644 docs/v2/Streams/models/Dataset.md create mode 100644 docs/v2/Streams/models/PartitionsCount.md create mode 100644 docs/v2/Streams/models/PublishRecordToStreamRequest.md create mode 100644 docs/v2/Streams/models/PublishRecordsToStreamRequest.md create mode 100644 docs/v2/Streams/models/Record.md create mode 100644 docs/v2/Streams/models/ResetStreamRequest.md create mode 100644 docs/v2/Streams/models/Stream.md create mode 100644 docs/v2/Streams/models/StreamType.md create mode 100644 docs/v2/Streams/models/ViewRid.md create mode 100644 docs/v2/ThirdPartyApplications/ThirdPartyApplication.md create mode 100644 docs/v2/ThirdPartyApplications/Version.md create mode 100644 docs/v2/ThirdPartyApplications/Website.md create mode 100644 docs/v2/ThirdPartyApplications/models/DeployWebsiteRequest.md create mode 100644 docs/v2/ThirdPartyApplications/models/ListVersionsResponse.md create mode 100644 docs/v2/ThirdPartyApplications/models/Subdomain.md create mode 100644 docs/v2/ThirdPartyApplications/models/ThirdPartyApplication.md create mode 100644 docs/v2/ThirdPartyApplications/models/ThirdPartyApplicationRid.md create mode 100644 docs/v2/ThirdPartyApplications/models/Version.md create mode 100644 docs/v2/ThirdPartyApplications/models/VersionVersion.md create mode 100644 docs/v2/ThirdPartyApplications/models/Website.md create mode 100644 docs/v2/Widgets/DevModeSettings.md create mode 100644 docs/v2/Widgets/Release.md create mode 100644 docs/v2/Widgets/Repository.md create mode 100644 docs/v2/Widgets/WidgetSet.md create mode 100644 docs/v2/Widgets/models/DevModeSettings.md create mode 100644 docs/v2/Widgets/models/DevModeStatus.md create mode 100644 docs/v2/Widgets/models/FilePath.md create mode 100644 docs/v2/Widgets/models/ListReleasesResponse.md create mode 100644 docs/v2/Widgets/models/Release.md create mode 100644 docs/v2/Widgets/models/ReleaseLocator.md create mode 100644 docs/v2/Widgets/models/ReleaseVersion.md create mode 100644 docs/v2/Widgets/models/Repository.md create mode 100644 docs/v2/Widgets/models/RepositoryRid.md create mode 100644 docs/v2/Widgets/models/RepositoryVersion.md create mode 100644 docs/v2/Widgets/models/ScriptEntrypoint.md create mode 100644 docs/v2/Widgets/models/ScriptType.md create mode 100644 docs/v2/Widgets/models/SetWidgetSetDevModeSettingsByIdRequest.md create mode 100644 docs/v2/Widgets/models/SetWidgetSetDevModeSettingsRequest.md create mode 100644 docs/v2/Widgets/models/StylesheetEntrypoint.md create mode 100644 docs/v2/Widgets/models/WidgetDevModeSettings.md create mode 100644 docs/v2/Widgets/models/WidgetId.md create mode 100644 docs/v2/Widgets/models/WidgetRid.md create mode 100644 docs/v2/Widgets/models/WidgetSet.md create mode 100644 docs/v2/Widgets/models/WidgetSetDevModeSettings.md create mode 100644 docs/v2/Widgets/models/WidgetSetDevModeSettingsById.md create mode 100644 docs/v2/Widgets/models/WidgetSetRid.md create mode 100644 foundry_sdk/__init__.py create mode 100644 foundry_sdk/_core/__init__.py create mode 100644 foundry_sdk/_core/api_client.py create mode 100644 foundry_sdk/_core/auth_utils.py create mode 100644 foundry_sdk/_core/client_init_helpers.py create mode 100644 foundry_sdk/_core/compute_module_pipeline_auth.py create mode 100644 foundry_sdk/_core/confidential_client_auth.py create mode 100644 foundry_sdk/_core/config.py create mode 100644 foundry_sdk/_core/context_and_environment_vars.py create mode 100644 foundry_sdk/_core/http_client.py create mode 100644 foundry_sdk/_core/model_base.py create mode 100644 foundry_sdk/_core/oauth_utils.py create mode 100644 foundry_sdk/_core/page_iterator.py create mode 100644 foundry_sdk/_core/public_client_auth.py create mode 100644 foundry_sdk/_core/resource_iterator.py create mode 100644 foundry_sdk/_core/table.py create mode 100644 foundry_sdk/_core/user_token_auth_client.py create mode 100644 foundry_sdk/_core/utils.py create mode 100644 foundry_sdk/_errors/__init__.py create mode 100644 foundry_sdk/_errors/api_not_found.py create mode 100644 foundry_sdk/_errors/connection_error.py create mode 100644 foundry_sdk/_errors/environment_not_configured.py create mode 100644 foundry_sdk/_errors/not_authenticated.py create mode 100644 foundry_sdk/_errors/palantir_exception.py create mode 100644 foundry_sdk/_errors/palantir_qos_exception.py create mode 100644 foundry_sdk/_errors/palantir_rpc_exception.py create mode 100644 foundry_sdk/_errors/sdk_internal_error.py create mode 100644 foundry_sdk/_errors/stream_error.py create mode 100644 foundry_sdk/_errors/timeout_error.py create mode 100644 foundry_sdk/_errors/utils.py create mode 100644 foundry_sdk/_versions.py create mode 100644 foundry_sdk/py.typed create mode 100644 foundry_sdk/v1/__init__.py create mode 100644 foundry_sdk/v1/cli.py create mode 100644 foundry_sdk/v1/client.py create mode 100644 foundry_sdk/v1/core/errors.py create mode 100644 foundry_sdk/v1/core/models.py create mode 100644 foundry_sdk/v1/datasets/__init__.py create mode 100644 foundry_sdk/v1/datasets/_client.py create mode 100644 foundry_sdk/v1/datasets/branch.py create mode 100644 foundry_sdk/v1/datasets/dataset.py create mode 100644 foundry_sdk/v1/datasets/errors.py create mode 100644 foundry_sdk/v1/datasets/file.py create mode 100644 foundry_sdk/v1/datasets/models.py create mode 100644 foundry_sdk/v1/datasets/transaction.py create mode 100644 foundry_sdk/v1/geo/errors.py create mode 100644 foundry_sdk/v1/geo/models.py create mode 100644 foundry_sdk/v1/ontologies/__init__.py create mode 100644 foundry_sdk/v1/ontologies/_client.py create mode 100644 foundry_sdk/v1/ontologies/action.py create mode 100644 foundry_sdk/v1/ontologies/action_type.py create mode 100644 foundry_sdk/v1/ontologies/attachment.py create mode 100644 foundry_sdk/v1/ontologies/errors.py create mode 100644 foundry_sdk/v1/ontologies/models.py create mode 100644 foundry_sdk/v1/ontologies/object_type.py create mode 100644 foundry_sdk/v1/ontologies/ontology.py create mode 100644 foundry_sdk/v1/ontologies/ontology_object.py create mode 100644 foundry_sdk/v1/ontologies/query.py create mode 100644 foundry_sdk/v1/ontologies/query_type.py create mode 100644 foundry_sdk/v2/__init__.py create mode 100644 foundry_sdk/v2/admin/__init__.py create mode 100644 foundry_sdk/v2/admin/_client.py create mode 100644 foundry_sdk/v2/admin/authentication_provider.py create mode 100644 foundry_sdk/v2/admin/enrollment.py create mode 100644 foundry_sdk/v2/admin/enrollment_role_assignment.py create mode 100644 foundry_sdk/v2/admin/errors.py create mode 100644 foundry_sdk/v2/admin/group.py create mode 100644 foundry_sdk/v2/admin/group_member.py create mode 100644 foundry_sdk/v2/admin/group_membership.py create mode 100644 foundry_sdk/v2/admin/group_membership_expiration_policy.py create mode 100644 foundry_sdk/v2/admin/group_provider_info.py create mode 100644 foundry_sdk/v2/admin/host.py create mode 100644 foundry_sdk/v2/admin/marking.py create mode 100644 foundry_sdk/v2/admin/marking_category.py create mode 100644 foundry_sdk/v2/admin/marking_member.py create mode 100644 foundry_sdk/v2/admin/marking_role_assignment.py create mode 100644 foundry_sdk/v2/admin/models.py create mode 100644 foundry_sdk/v2/admin/organization.py create mode 100644 foundry_sdk/v2/admin/organization_role_assignment.py create mode 100644 foundry_sdk/v2/admin/role.py create mode 100644 foundry_sdk/v2/admin/user.py create mode 100644 foundry_sdk/v2/admin/user_provider_info.py create mode 100644 foundry_sdk/v2/aip_agents/__init__.py create mode 100644 foundry_sdk/v2/aip_agents/_client.py create mode 100644 foundry_sdk/v2/aip_agents/agent.py create mode 100644 foundry_sdk/v2/aip_agents/agent_version.py create mode 100644 foundry_sdk/v2/aip_agents/content.py create mode 100644 foundry_sdk/v2/aip_agents/errors.py create mode 100644 foundry_sdk/v2/aip_agents/models.py create mode 100644 foundry_sdk/v2/aip_agents/session.py create mode 100644 foundry_sdk/v2/aip_agents/session_trace.py create mode 100644 foundry_sdk/v2/audit/__init__.py create mode 100644 foundry_sdk/v2/audit/_client.py create mode 100644 foundry_sdk/v2/audit/errors.py create mode 100644 foundry_sdk/v2/audit/log_file.py create mode 100644 foundry_sdk/v2/audit/models.py create mode 100644 foundry_sdk/v2/audit/organization.py create mode 100644 foundry_sdk/v2/cli.py create mode 100644 foundry_sdk/v2/client.py create mode 100644 foundry_sdk/v2/connectivity/__init__.py create mode 100644 foundry_sdk/v2/connectivity/_client.py create mode 100644 foundry_sdk/v2/connectivity/connection.py create mode 100644 foundry_sdk/v2/connectivity/errors.py create mode 100644 foundry_sdk/v2/connectivity/file_import.py create mode 100644 foundry_sdk/v2/connectivity/models.py create mode 100644 foundry_sdk/v2/connectivity/table_import.py create mode 100644 foundry_sdk/v2/connectivity/virtual_table.py create mode 100644 foundry_sdk/v2/core/errors.py create mode 100644 foundry_sdk/v2/core/models.py create mode 100644 foundry_sdk/v2/data_health/__init__.py create mode 100644 foundry_sdk/v2/data_health/_client.py create mode 100644 foundry_sdk/v2/data_health/check.py create mode 100644 foundry_sdk/v2/data_health/check_report.py create mode 100644 foundry_sdk/v2/data_health/errors.py create mode 100644 foundry_sdk/v2/data_health/models.py create mode 100644 foundry_sdk/v2/datasets/__init__.py create mode 100644 foundry_sdk/v2/datasets/_client.py create mode 100644 foundry_sdk/v2/datasets/branch.py create mode 100644 foundry_sdk/v2/datasets/dataset.py create mode 100644 foundry_sdk/v2/datasets/errors.py create mode 100644 foundry_sdk/v2/datasets/file.py create mode 100644 foundry_sdk/v2/datasets/models.py create mode 100644 foundry_sdk/v2/datasets/transaction.py create mode 100644 foundry_sdk/v2/datasets/view.py create mode 100644 foundry_sdk/v2/filesystem/__init__.py create mode 100644 foundry_sdk/v2/filesystem/_client.py create mode 100644 foundry_sdk/v2/filesystem/errors.py create mode 100644 foundry_sdk/v2/filesystem/folder.py create mode 100644 foundry_sdk/v2/filesystem/models.py create mode 100644 foundry_sdk/v2/filesystem/project.py create mode 100644 foundry_sdk/v2/filesystem/resource.py create mode 100644 foundry_sdk/v2/filesystem/resource_role.py create mode 100644 foundry_sdk/v2/filesystem/space.py create mode 100644 foundry_sdk/v2/functions/__init__.py create mode 100644 foundry_sdk/v2/functions/_client.py create mode 100644 foundry_sdk/v2/functions/errors.py create mode 100644 foundry_sdk/v2/functions/models.py create mode 100644 foundry_sdk/v2/functions/query.py create mode 100644 foundry_sdk/v2/functions/value_type.py create mode 100644 foundry_sdk/v2/functions/version_id.py create mode 100644 foundry_sdk/v2/geo/errors.py create mode 100644 foundry_sdk/v2/geo/models.py create mode 100644 foundry_sdk/v2/language_models/__init__.py create mode 100644 foundry_sdk/v2/language_models/_client.py create mode 100644 foundry_sdk/v2/language_models/anthropic_model.py create mode 100644 foundry_sdk/v2/language_models/errors.py create mode 100644 foundry_sdk/v2/language_models/models.py create mode 100644 foundry_sdk/v2/language_models/open_ai_model.py create mode 100644 foundry_sdk/v2/media_sets/__init__.py create mode 100644 foundry_sdk/v2/media_sets/_client.py create mode 100644 foundry_sdk/v2/media_sets/errors.py create mode 100644 foundry_sdk/v2/media_sets/media_set.py create mode 100644 foundry_sdk/v2/media_sets/models.py create mode 100644 foundry_sdk/v2/models/__init__.py create mode 100644 foundry_sdk/v2/models/_client.py create mode 100644 foundry_sdk/v2/models/errors.py create mode 100644 foundry_sdk/v2/models/model.py create mode 100644 foundry_sdk/v2/models/model_version.py create mode 100644 foundry_sdk/v2/models/models.py create mode 100644 foundry_sdk/v2/ontologies/__init__.py create mode 100644 foundry_sdk/v2/ontologies/_client.py create mode 100644 foundry_sdk/v2/ontologies/action.py create mode 100644 foundry_sdk/v2/ontologies/action_type.py create mode 100644 foundry_sdk/v2/ontologies/action_type_full_metadata.py create mode 100644 foundry_sdk/v2/ontologies/attachment.py create mode 100644 foundry_sdk/v2/ontologies/attachment_property.py create mode 100644 foundry_sdk/v2/ontologies/cipher_text_property.py create mode 100644 foundry_sdk/v2/ontologies/errors.py create mode 100644 foundry_sdk/v2/ontologies/linked_object.py create mode 100644 foundry_sdk/v2/ontologies/media_reference_property.py create mode 100644 foundry_sdk/v2/ontologies/models.py create mode 100644 foundry_sdk/v2/ontologies/object_type.py create mode 100644 foundry_sdk/v2/ontologies/ontology.py create mode 100644 foundry_sdk/v2/ontologies/ontology_interface.py create mode 100644 foundry_sdk/v2/ontologies/ontology_object.py create mode 100644 foundry_sdk/v2/ontologies/ontology_object_set.py create mode 100644 foundry_sdk/v2/ontologies/ontology_transaction.py create mode 100644 foundry_sdk/v2/ontologies/ontology_value_type.py create mode 100644 foundry_sdk/v2/ontologies/query.py create mode 100644 foundry_sdk/v2/ontologies/query_type.py create mode 100644 foundry_sdk/v2/ontologies/time_series_property_v2.py create mode 100644 foundry_sdk/v2/ontologies/time_series_value_bank_property.py create mode 100644 foundry_sdk/v2/orchestration/__init__.py create mode 100644 foundry_sdk/v2/orchestration/_client.py create mode 100644 foundry_sdk/v2/orchestration/build.py create mode 100644 foundry_sdk/v2/orchestration/errors.py create mode 100644 foundry_sdk/v2/orchestration/job.py create mode 100644 foundry_sdk/v2/orchestration/models.py create mode 100644 foundry_sdk/v2/orchestration/schedule.py create mode 100644 foundry_sdk/v2/orchestration/schedule_run.py create mode 100644 foundry_sdk/v2/orchestration/schedule_version.py create mode 100644 foundry_sdk/v2/sql_queries/__init__.py create mode 100644 foundry_sdk/v2/sql_queries/_client.py create mode 100644 foundry_sdk/v2/sql_queries/errors.py create mode 100644 foundry_sdk/v2/sql_queries/models.py create mode 100644 foundry_sdk/v2/sql_queries/sql_query.py create mode 100644 foundry_sdk/v2/streams/__init__.py create mode 100644 foundry_sdk/v2/streams/_client.py create mode 100644 foundry_sdk/v2/streams/dataset.py create mode 100644 foundry_sdk/v2/streams/errors.py create mode 100644 foundry_sdk/v2/streams/models.py create mode 100644 foundry_sdk/v2/streams/stream.py create mode 100644 foundry_sdk/v2/third_party_applications/__init__.py create mode 100644 foundry_sdk/v2/third_party_applications/_client.py create mode 100644 foundry_sdk/v2/third_party_applications/errors.py create mode 100644 foundry_sdk/v2/third_party_applications/models.py create mode 100644 foundry_sdk/v2/third_party_applications/third_party_application.py create mode 100644 foundry_sdk/v2/third_party_applications/version.py create mode 100644 foundry_sdk/v2/third_party_applications/website.py create mode 100644 foundry_sdk/v2/widgets/__init__.py create mode 100644 foundry_sdk/v2/widgets/_client.py create mode 100644 foundry_sdk/v2/widgets/dev_mode_settings.py create mode 100644 foundry_sdk/v2/widgets/errors.py create mode 100644 foundry_sdk/v2/widgets/models.py create mode 100644 foundry_sdk/v2/widgets/release.py create mode 100644 foundry_sdk/v2/widgets/repository.py create mode 100644 foundry_sdk/v2/widgets/widget_set.py create mode 100644 pyproject.toml create mode 100644 tests/auth/__init__.py create mode 100644 tests/auth/test_confidential_client.py create mode 100644 tests/auth/test_confidential_client_oauth_flow_provider.py create mode 100644 tests/auth/test_oauth_utils.py create mode 100644 tests/auth/test_public_client.py create mode 100644 tests/auth/test_public_client_oauth_flow_provider.py create mode 100644 tests/auth/test_user_auth_token_client.py create mode 100644 tests/conftest.py create mode 100644 tests/server.py create mode 100644 tests/test_api_client.py create mode 100644 tests/test_body_serialization.py create mode 100644 tests/test_client_init_helpers.py create mode 100644 tests/test_datetime.py create mode 100644 tests/test_discriminators.py create mode 100644 tests/test_errors.py create mode 100644 tests/test_exception.py create mode 100644 tests/test_http_client.py create mode 100644 tests/test_model_base.py create mode 100644 tests/test_page_iterator.py create mode 100644 tests/test_performance.py create mode 100644 tests/test_resorce_import.py create mode 100644 tests/test_resource_iterator.py create mode 100644 tests/test_response_types.py create mode 100644 tests/test_utils.py diff --git a/.bulldozer.yml b/.bulldozer.yml new file mode 100644 index 000000000..b62e82baa --- /dev/null +++ b/.bulldozer.yml @@ -0,0 +1,17 @@ +# Excavator auto-updates this file. Please contribute improvements to the central template. + +version: 1 +merge: + trigger: + labels: ["merge when ready"] + ignore: + labels: ["do not merge"] + method: squash + options: + squash: + body: pull_request_body + message_delimiter: ==COMMIT_MSG== + delete_after_merge: true +update: + trigger: + labels: ["update me"] diff --git a/.changelog.yml b/.changelog.yml new file mode 100644 index 000000000..a30143b32 --- /dev/null +++ b/.changelog.yml @@ -0,0 +1,3 @@ +# Excavator auto-updates this file. Please contribute improvements to the central template. + +# This file is intentionally empty. The file's existence enables changelog-app and is empty to use the default configuration. diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 000000000..7dfde03d4 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,189 @@ +palantir_aliases: + - &always-run + filters: + branches: + only: /.*/ + tags: + only: /.*/ + +version: 2.1 + +commands: + setup-npm-project: + description: "Setup npm project - checkout code, set version, install dependencies and build" + steps: + - checkout + - run: node scripts/set_npm_version.js + - run: + name: Install npm dependencies and build + command: | + echo "Node version: $(node -v)" + echo "NPM version: $(npm -v)" + cd docs-snippets-npm + npm install + npm run build + +jobs: + test: + parameters: + python_version: + type: string + pydantic_version: + type: string + httpx_version: + type: string + docker: + - image: cimg/python:<< parameters.python_version >> + steps: + - checkout + - run: pip install --user tox + - run: poetry --no-ansi install --no-root --sync + - run: | + PYDANTIC_VERSION=<< parameters.pydantic_version >>.* \ + HTTPX_VERSION=<< parameters.httpx_version >>.* \ + poetry --no-ansi run tox -v -e py<< parameters.python_version >> --recreate + + black: + docker: + - image: cimg/python:3.12 + steps: + - checkout + - run: pip install --user tox + - run: python -m tox -e black + + npm-build: + parameters: + node_version: + type: string + docker: + - image: cimg/node:<< parameters.node_version >> + steps: + - setup-npm-project + - run: + name: Echo build completion + command: echo "Completed building docs-snippets-npm on Node.js << parameters.node_version >>" + + npm-pack-dry-run: + parameters: + node_version: + type: string + docker: + - image: cimg/node:<< parameters.node_version >> + steps: + - setup-npm-project + - run: + name: Run npm pack dry-run + command: | + cd docs-snippets-npm + npm pack --dry-run + + npm-publish: + docker: + - image: cimg/node:22.14 + steps: + - setup-npm-project + - run: + name: Publish npm package + command: | + cd docs-snippets-npm + npm set //registry.npmjs.org/:_authToken=$NPM_TOKEN + npm publish --access=public + + circle-all: + docker: + - image: node:lts + steps: + - run: echo "Done!" + + publish: + docker: + - image: cimg/python:3.12 + steps: + - checkout + - run: python scripts/set_python_version.py + - run: poetry version $(git describe --tags --abbrev=0) + - run: poetry publish -v -u $PYPI_USERNAME -p $PYPI_PASSWORD --build + +workflows: + version: 2 + build: + jobs: + - test: + <<: *always-run + name: python-<< matrix.python_version>> + matrix: + parameters: + python_version: ["3.9", "3.10", "3.11", "3.12"] + pydantic_version: ["2.10"] + httpx_version: ["0.28"] + - test: + <<: *always-run + name: pydantic-<< matrix.pydantic_version >> + matrix: + parameters: + python_version: ["3.12"] + pydantic_version: ["2.6", "2.7", "2.8", "2.9", "2.10"] + httpx_version: ["0.28"] + - test: + <<: *always-run + name: httpx-<< matrix.httpx_version >> + matrix: + parameters: + python_version: ["3.12"] + pydantic_version: ["2.10"] + httpx_version: ["0.25", "0.26", "0.27", "0.28"] + - black: + <<: *always-run + - circle-all: + <<: *always-run + requires: + - python-3.9 + - python-3.10 + - python-3.11 + - python-3.12 + + - pydantic-2.6 + - pydantic-2.7 + - pydantic-2.8 + - pydantic-2.9 + - pydantic-2.10 + + - httpx-0.25 + - httpx-0.26 + - httpx-0.27 + - httpx-0.28 + + - black + - npm-build-18.20 + - npm-build-20.19 + - npm-build-22.14 + - npm-pack-dry-run-18.20 + - npm-pack-dry-run-20.19 + - npm-pack-dry-run-22.14 + - publish: + requires: + - circle-all + filters: + tags: { only: '/^[0-9]+(\.[0-9]+)+(-[a-zA-Z]+[0-9]*)*$/' } + branches: { ignore: /.*/ } + - npm-publish: + requires: + - publish + - npm-build-22.14 + filters: + tags: { only: '/^[0-9]+(\.[0-9]+)+(-[a-zA-Z]+[0-9]*)*$/' } + branches: { ignore: /.*/ } + - npm-build: + <<: *always-run + name: npm-build-<< matrix.node_version >> + matrix: + parameters: + node_version: ["18.20", "20.19", "22.14"] + - npm-pack-dry-run: + <<: *always-run + name: npm-pack-dry-run-<< matrix.node_version >> + matrix: + parameters: + node_version: ["18.20", "20.19", "22.14"] + requires: + - npm-build-<< matrix.node_version >> diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..4702d1299 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +**/__pycache__ +*.pyc +tmp +test.py +venv diff --git a/LICENSE b/LICENSE new file mode 100644 index 000000000..d64569567 --- /dev/null +++ b/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/README.md b/README.md new file mode 100644 index 000000000..16ecad230 --- /dev/null +++ b/README.md @@ -0,0 +1,3396 @@ +

+Autorelease +

+ +# Foundry Platform SDK + +![Supported Python Versions](https://img.shields.io/pypi/pyversions/foundry-platform-sdk) +[![PyPI Version](https://img.shields.io/pypi/v/foundry-platform-sdk)](https://pypi.org/project/foundry-platform-sdk/) +[![License](https://img.shields.io/badge/License-Apache%202.0-lightgrey.svg)](https://opensource.org/licenses/Apache-2.0) + +The Foundry Platform SDK is a Python SDK built on top of the Foundry API. +Review [Foundry API documentation](https://www.palantir.com/docs/foundry/api/) for more details. + +> [!NOTE] +> This Python package is automatically generated based on the Foundry API specification. + + + +## Gotham Platform SDK vs. Foundry Platform SDK vs. Ontology SDK +Palantir provides two platform APIs for interacting with the Gotham and Foundry platforms. Each has a corresponding Software Development Kit (SDK). There is also the OSDK for interacting with Foundry ontologies. Make sure to choose the correct SDK for your use case. As a general rule of thumb, any applications which leverage the Ontology should use the Ontology SDK over the Foundry platform SDK for a superior development experience. + +> [!IMPORTANT] +> Make sure to understand the difference between the Foundry, Gotham, and Ontology SDKs. Review this section before continuing with the installation of this library. + +### Ontology SDK +The Ontology SDK allows you to access the full power of the Ontology directly from your development environment. You can generate the Ontology SDK using the Developer Console, a portal for creating and managing applications using Palantir APIs. Review the [Ontology SDK documentation](https://www.palantir.com/docs/foundry/ontology-sdk) for more information. + +### Foundry Platform SDK +The Foundry Platform Software Development Kit (SDK) is generated from the Foundry API specification +file. The intention of this SDK is to encompass endpoints related to interacting +with the Foundry platform itself. Although there are Ontology services included by this SDK, this SDK surfaces endpoints +for interacting with Ontological resources such as object types, link types, and action types. In contrast, the OSDK allows you to interact with objects, links and Actions (for example, querying your objects, applying an action). + +### Gotham Platform SDK +The Gotham Platform Software Development Kit (SDK) is generated from the Gotham API specification +file. The intention of this SDK is to encompass endpoints related to interacting +with the Gotham platform itself. This includes Gotham apps and data, such as Gaia, Target Workbench, and geotemporal data. + + +## Installation +You can install the Python package using `pip`: + +```sh +pip install foundry-platform-sdk +``` + + +## API Versioning +Every endpoint of the Foundry API is versioned using a version number that appears in the URL. For example, +v1 endpoints look like this: + +``` +https:///api/v1/... +``` + +This SDK exposes several clients, one for each major version of the API. The latest major version of the +SDK is **v2** and is exposed using the `FoundryClient` located in the +`foundry_sdk` package. + +```python +from foundry_sdk import FoundryClient +``` + +For other major versions, you must import that specific client from a submodule. For example, to +import the **v2** client from a sub-module you would import it like this: + +```python +from foundry_sdk.v2 import FoundryClient +``` + +More information about how the API is versioned can be found [here](https://www.palantir.com/docs/foundry/api/general/overview/versioning/). + + +## Authorization and client initalization +There are two options for authorizing the SDK. + +### User token +> [!WARNING] +> User tokens are associated with your personal user account and must not be used in +> production applications or committed to shared or public code repositories. We recommend +> you store test API tokens as environment variables during development. For authorizing +> production applications, you should register an OAuth2 application (see +> [OAuth2 Client](#oauth2-client) below for more details). + +You can pass in a user token as an arguments when initializing the `UserTokenAuth`: + +```python +import foundry_sdk + +client = foundry_sdk.FoundryClient( + auth=foundry_sdk.UserTokenAuth(os.environ["BEARER_TOKEN"]), + hostname="example.palantirfoundry.com", +) + +``` + +For convenience, the auth and hostname can also be set using environmental or context variables. +The `auth` and `hostname` parameters are set (in order of precedence) by: + +- The parameters passed to the `FoundryClient` constructor +- Context variables `FOUNDRY_TOKEN` and `FOUNDRY_HOSTNAME` +- Environment variables `FOUNDRY_TOKEN` and `FOUNDRY_HOSTNAME` + +The `FOUNDRY_TOKEN` is a string of an users Bearer token, which will create a `UserTokenAuth` for the `auth` parameter. + +```python +import foundry_sdk + +# The SDK will initialize the following context or environment variables when auth and hostname are not provided: +# FOUNDRY_TOKEN +# FOUNDRY_HOSTNAME +client = foundry_sdk.FoundryClient() +` +``` + + +### OAuth2 Client +OAuth2 clients are the recommended way to connect to Foundry in production applications. Currently, this SDK +natively supports the [client credentials grant flow](https://www.palantir.com/docs/foundry/platform-security-third-party/writing-oauth2-clients/#client-credentials-grant). +The token obtained by this grant can be used to access resources on behalf of the created service user. To use this +authentication method, you will first need to register a third-party application in Foundry by following [the guide on third-party application registration](https://www.palantir.com/docs/foundry/platform-security-third-party/register-3pa). + +To use the confidential client functionality, you first need to construct a +`ConfidentialClientAuth` object. As these service user tokens have a short +lifespan (one hour), we automatically retry all operations one time if a `401` +(Unauthorized) error is thrown after refreshing the token. + +```python +import foundry_sdk + +auth = foundry_sdk.ConfidentialClientAuth( + client_id=os.environ["CLIENT_ID"], + client_secret=os.environ["CLIENT_SECRET"], + scopes=[...], # optional list of scopes +) + +``` + +> [!IMPORTANT] +> Make sure to select the appropriate scopes when initializating the `ConfidentialClientAuth`. You can find the relevant scopes +> in the [endpoint documentation](#apis-link). + +After creating the `ConfidentialClientAuth` object, pass it in to the `FoundryClient`, + +```python +import foundry_sdk + +client = foundry_sdk.FoundryClient(auth=auth, hostname="example.palantirfoundry.com") + +``` + +> [!TIP] +> If you want to use the `ConfidentialClientAuth` class independently of the `FoundryClient`, you can +> use the `get_token()` method to get the token. You will have to provide a `hostname` when +> instantiating the `ConfidentialClientAuth` object, for example +> `ConfidentialClientAuth(..., hostname="example.palantirfoundry.com")`. + +## Quickstart + +Follow the [installation procedure](#installation) and determine which [authentication method](#authorization) is +best suited for your instance before following this example. For simplicity, the `UserTokenAuth` class will be used for demonstration +purposes. + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# DatasetRid +dataset_rid = None +# BranchName +name = "master" +# Optional[TransactionRid] | The most recent OPEN or COMMITTED transaction on the branch. This will never be an ABORTED transaction. +transaction_rid = "ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4" + + +try: + api_response = client.datasets.Dataset.Branch.create( + dataset_rid, name=name, transaction_rid=transaction_rid + ) + print("The create response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Branch.create: %s\n" % e) + +``` + +Want to learn more about this Foundry SDK library? Review the following sections. + +↳ [Error handling](#errors): Learn more about HTTP & data validation error handling +↳ [Pagination](#pagination): Learn how to work with paginated endpoints in the SDK +↳ [Streaming](#binary-streaming): Learn how to stream binary data from Foundry +↳ [Data Frames](#data-frames): Learn how to work with tabular data using data frame libraries +↳ [Static type analysis](#static-types): Learn about the static type analysis capabilities of this library +↳ [HTTP Session Configuration](#session-config): Learn how to configure the HTTP session. + + +## Error handling +### Data validation +The SDK employs [Pydantic](https://docs.pydantic.dev/latest/) for runtime validation +of arguments. In the example below, we are passing in a number to `transaction_rid` +which should actually be a string type: + +```python +client.datasets.Dataset.Branch.create( + dataset_rid, + name=name, + transaction_rid=123) +``` + +If you did this, you would receive an error that looks something like: + +```python +pydantic_core._pydantic_core.ValidationError: 1 validation error for create +transaction_rid + Input should be a valid string [type=string_type, input_value=123, input_type=int] + For further information visit https://errors.pydantic.dev/2.5/v/string_type + +``` + +To handle these errors, you can catch `pydantic.ValidationError`. To learn more, see +the [Pydantic error documentation](https://docs.pydantic.dev/latest/errors/errors/). + +> [!TIP] +> Pydantic works with static type checkers such as +[pyright](https://github.com/microsoft/pyright) for an improved developer +experience. See [Static Type Analysis](#static-types) below for more information. + +### HTTP exceptions +Each operation includes a list of possible exceptions that can be thrown which can be thrown by the server, all of which inherit from `PalantirRPCException`. For example, an operation that interacts with dataset branches might throw a `BranchNotFound` error, which is defined as follows: + +```python +class BranchNotFoundParameters(typing_extensions.TypedDict): + """The requested branch could not be found, or the client token does not have access to it.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + datasetRid: datasets_models.DatasetRid + branchName: datasets_models.BranchName + + +@dataclass +class BranchNotFound(errors.NotFoundError): + name: typing.Literal["BranchNotFound"] + parameters: BranchNotFoundParameters + error_instance_id: str + +``` + +As a user, you can catch this exception and handle it accordingly. + +```python +from foundry_sdk.v1.datasets.errors import BranchNotFound + +try: + response = client.datasets.Dataset.get(dataset_rid) + ... +except BranchNotFound as e: + print("Resource not found", e.parameters[...]) + +``` + +You can refer to the method documentation to see which exceptions can be thrown. It is also possible to +catch a generic subclass of `PalantirRPCException` such as `BadRequestError` or `NotFoundError`. + + +| Status Code | Error Class | +| ----------- | ---------------------------- | +| 400 | `BadRequestError` | +| 401 | `UnauthorizedError` | +| 403 | `PermissionDeniedError` | +| 404 | `NotFoundError` | +| 413 | `RequestEntityTooLargeError` | +| 422 | `UnprocessableEntityError` | +| >=500,<600 | `InternalServerError` | +| Other | `PalantirRPCException` | + +```python +from foundry_sdk import PalantirRPCException +from foundry_sdk import NotFoundError + +try: + api_response = client.datasets.Dataset.get(dataset_rid) + ... +except NotFoundError as e: + print("Resource not found", e) +except PalantirRPCException as e: + print("Another HTTP exception occurred", e) + +``` + +All RPC exceptions will have the following properties. See the [Foundry API docs](https://www.palantir.com/docs/foundry/api/general/overview/errors) for details about the Foundry error information. + +| Property | Type | Description | +| ----------------- | -----------------------| ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| name | str | The Palantir error name. See the [Foundry API docs](https://www.palantir.com/docs/foundry/api/general/overview/errors). | +| error_instance_id | str | The Palantir error instance ID. See the [Foundry API docs](https://www.palantir.com/docs/foundry/api/general/overview/errors). | +| parameters | Dict[str, Any] | The Palantir error parameters. See the [Foundry API docs](https://www.palantir.com/docs/foundry/api/general/overview/errors). | +| error_code | str | The Palantir error code. See the [Foundry API docs](https://www.palantir.com/docs/foundry/api/general/overview/errors). | +| error_description | str | The Palantir error description. See the [Foundry API docs](https://www.palantir.com/docs/foundry/api/general/overview/errors). | + +### Other exceptions +There are a handful of other exception classes that could be thrown when instantiating or using a client. + +| ErrorClass | Thrown Directly | Description | +| -------------------------- | --------------- | --------------------------------------------------------------------------------------------------------------------------------- | +| NotAuthenticated | Yes | You used either `ConfidentialClientAuth` or `PublicClientAuth` to make an API call without going through the OAuth process first. | +| ConnectionError | Yes | An issue occurred when connecting to the server. This also catches `ProxyError`. | +| ProxyError | Yes | An issue occurred when connecting to or authenticating with a proxy server. | +| TimeoutError | No | The request timed out. This catches both `ConnectTimeout`, `ReadTimeout` and `WriteTimeout`. | +| ConnectTimeout | Yes | The request timed out when attempting to connect to the server. | +| ReadTimeout | Yes | The server did not send any data in the allotted amount of time. | +| WriteTimeout | Yes | There was a timeout when writing data to the server. | +| StreamConsumedError | Yes | The content of the given stream has already been consumed. | +| RequestEntityTooLargeError | Yes | The request entity is too large. | +| ConflictError | Yes | There was a conflict with another request. | +| RateLimitError | Yes | The request was rate limited. Reduce your request rate and retry your request shortly. | +| ServiceUnavailable | Yes | The service is temporarily unavailable. Retry your request shortly. | +| SDKInternalError | Yes | An unexpected issue occurred and should be reported. | + + +## Pagination +When calling any iterator endpoints, we return a `ResourceIterator` class designed to simplify the process of working +with paginated API endpoints. This class provides a convenient way to fetch, iterate over, and manage pages +of data, while handling the underlying pagination logic. + +To iterate over all items, you can simply create a `ResourceIterator` instance and use it in a for loop, like this: + +```python +for item in client.datasets.Dataset.Branch.list(dataset_rid): + print(item) + +# Or, you can collect all the items in a list +results = list(client.datasets.Dataset.Branch.list(dataset_rid)) + +``` + +This will automatically fetch and iterate through all the pages of data from the specified API endpoint. For more granular control, you can manually fetch each page using the `next_page_token`. + +```python +next_page_token: Optional[str] = None +while True: + page = client.datasets.Dataset.Branch.list( + dataset_rid, page_size=page_size, page_token=next_page_token + ) + for branch in page.data: + print(branch) + + if page.next_page_token is None: + break + + next_page_token = page.next_page_token + +``` + +### Asynchronous Pagination (Beta) + +> [!WARNING] +> The asynchronous client is in beta and may change in future releases. + +When using the `AsyncFoundryClient` client, pagination works similar to the synchronous client +but you need to use `async for` to iterate over the results. Here's an example: + + +```python +async for item in client.datasets.Dataset.Branch.list(dataset_rid): + print(item) + +# Or, you can collect all the items in a list +results = [item async for item in client.datasets.Dataset.Branch.list(dataset_rid)] + +``` + +For more control over asynchronous pagination, you can manually handle the pagination +tokens and use the `with_raw_response` utility to fetch each page. + + +```python +next_page_token: Optional[str] = None +while True: + response = await client.client.datasets.Dataset.Branch.with_raw_response.list( + dataset_rid, page_token=next_page_token + ) + + page = response.decode() + for item in page.data: + print(item) + + if page.next_page_token is None: + break + + next_page_token = page.next_page_token + +``` + + +### Asynchronous Client (Beta) + +> [!WARNING] +> The asynchronous client is in beta and may change in future releases. + +This SDK supports creating an asynchronous client, just import and instantiate the +`AsyncFoundryClient` instead of the `FoundryClient`. + +```python +from foundry import AsyncFoundryClient +import foundry +import asyncio +from pprint import pprint + +async def main(): + client = AsyncFoundryClient(...) + response = await client.datasets.Dataset.Branch.create(dataset_rid, name=name, transaction_rid=transaction_rid) + pprint(response) + +if __name__ == "__main__": + asyncio.run(main()) +``` + +When using asynchronous clients, you'll just need to use the `await` keyword when calling APIs. Otherwise, the behaviour +between the `FoundryClient` and `AsyncFoundryClient` is nearly identical. + + +## Streaming +This SDK supports streaming binary data using a separate streaming client accessible under +`with_streaming_response` on each Resource. To ensure the stream is closed, you need to use a context +manager when making a request with this client. + +```python +# Non-streaming response +with open("result.png", "wb") as f: + f.write(client.admin.User.profile_picture(user_id)) + +# Streaming response +with open("result.png", "wb") as f: + with client.admin.User.with_streaming_response.profile_picture(user_id) as response: + for chunk in response.iter_bytes(): + f.write(chunk) + +``` + + +## Data Frames + +This SDK supports working with tabular data using popular Python data frame libraries. When an API endpoint returns data in Arrow IPC format, the response is wrapped in an `TableResponse` class that provides methods to convert to various data frame formats: + +- `to_pyarrow()`: Converts to a PyArrow Table +- `to_pandas()`: Converts to a Pandas DataFrame +- `to_polars()`: Converts to a Polars DataFrame +- `to_duckdb()`: Converts to a DuckDB relation + +This allows you to seamlessly work with Foundry tabular data using your preferred data analysis library. + +### Example: Working with Data Frames + +```python +# Read tabular data in Arrow format +table_data = client.datasets.Dataset.read_table(dataset_rid, format=format, branch_name=branch_name, columns=columns, end_transaction_rid=end_transaction_rid, row_limit=row_limit, start_transaction_rid=start_transaction_rid) + +# Convert to pandas DataFrame for data analysis +pandas_df = table_data.to_pandas() + +# Perform data analysis operations +summary = pandas_df.describe() +filtered_data = pandas_df[pandas_df["value"] > 100] + +# Or use Polars for high-performance data operations +import polars as pl +polars_df = table_data.to_polars() +result = polars_df.filter(pl.col("value") > 100).group_by("category").agg(pl.sum("amount")) + +# Or use DuckDB for SQL-based analysis +import duckdb +duckdb_relation = table_data.to_duckdb() +result = duckdb_relation.query("SELECT category, SUM(amount) FROM duckdb_relation WHERE value > 100 GROUP BY category") +``` + +You can inclue the extra dependencies using: + +```bash +# For pyarrow support +pip install foundry-platform-sdk[pyarrow] + +# For pandas support +pip install foundry-platform-sdk[pandas] + +# For polars support +pip install foundry-platform-sdk[polars] + +# For duckdb support +pip install foundry-platform-sdk[duckdb] +``` + +If you attempt to use a conversion method without the required dependency installed, the SDK will provide a helpful error message with installation instructions. + + +## Static type analysis + +### Hashable Models + +All model objects in the SDK can be used as dictionary keys or set members. This provides several benefits: + +```python +# Example: Using models as dictionary keys +from foundry_sdk import FoundryClient + +client = FoundryClient(...) +file1 = client.datasets.Dataset.File.get(dataset_rid="ri.foundry.main.dataset.123", file_path="/data.csv") +file2 = client.datasets.Dataset.File.get(dataset_rid="ri.foundry.main.dataset.123", file_path="/data.csv") + +# Models with the same content are equal and have the same hash +assert file1 == file2 +assert hash(file1) == hash(file2) + +# Use models as dictionary keys +file_metadata = {} +file_metadata[file1] = {"last_modified": "2024-08-09"} + +# Can look up using any equivalent object +assert file_metadata[file2] == {"last_modified": "2024-08-09"} +``` + +**Note:** Models remain mutable for backward compatibility. If you modify a model after using it as a dictionary key, +the system will issue a warning and the model's hash value will be reset. Although allowed, mutating models and using +their hash values is not recommended as it can lead to unexpected behavior when using them in dictionaries or sets. + +This library uses [Pydantic](https://docs.pydantic.dev) for creating and validating data models which you will see in the +method definitions (see [Documentation for Models](#models-link) below for a full list of models). +All request parameters and responses with nested fields are typed using a Pydantic +[`BaseModel`](https://docs.pydantic.dev/latest/api/base_model/) class. For example, here is how +`Group.search` method is defined in the `Admin` namespace: + +```python + @pydantic.validate_call + @handle_unexpected + def search( + self, + *, + where: GroupSearchFilter, + page_size: Optional[PageSize] = None, + page_token: Optional[PageToken] = None, + preview: Optional[PreviewMode] = None, + request_timeout: Optional[Annotated[int, pydantic.Field(gt=0)]] = None, + ) -> SearchGroupsResponse: + ... + +``` + +```python +import foundry_sdk +from foundry_sdk.v2.admin.models import GroupSearchFilter + +client = foundry_sdk.FoundryClient(...) + +result = client.admin.Group.search(where=GroupSearchFilter(type="queryString", value="John Doe")) +print(result.data) + +``` + +If you are using a static type checker (for example, [mypy](https://mypy-lang.org), [pyright](https://github.com/microsoft/pyright)), you +get static type analysis for the arguments you provide to the function and with the response. For example, if you pass an `int` +to `name` but `name` expects a string or if you try to access `branchName` on the returned [`Branch`](docs/Branch.md) object (the +property is actually called `name`), you will get the following errors: + + +```python +branch = client.datasets.Dataset.Branch.create( + "ri.foundry.main.dataset.abc", + # ERROR: "Literal[123]" is incompatible with "BranchName" + name=123, +) +# ERROR: Cannot access member "branchName" for type "Branch" +print(branch.branchName) + +``` + + +## HTTP Session Configuration +You can configure various parts of the HTTP session using the `Config` class. + +```python +from foundry_sdk import Config +from foundry_sdk import UserTokenAuth +from foundry_sdk import FoundryClient + +client = FoundryClient( + auth=UserTokenAuth(...), + hostname="example.palantirfoundry.com", + config=Config( + # Set the default headers for every request + default_headers={"Foo": "Bar"}, + # Default to a 60 second timeout + timeout=60, + # Create a proxy for the https protocol + proxies={"https": "https://10.10.1.10:1080"}, + ), +) + +``` + +The full list of options can be found below. + +- `default_headers` (dict[str, str]): HTTP headers to include with all requests. +- `proxies` (dict["http" | "https", str]): Proxies to use for HTTP and HTTPS requests. +- `timeout` (int | float): The default timeout for all requests in seconds. +- `verify` (bool | str): SSL verification, can be a boolean or a path to a CA bundle. Defaults to `True`. +- `default_params` (dict[str, Any]): URL query parameters to include with all requests. +- `scheme` ("http" | "https"): URL scheme to use ('http' or 'https'). Defaults to 'https'. + +### SSL Certificate Verification + +In addition to the `Config` class, the SSL certificate file used for verification can be set using +the following environment variables (in order of precedence): +- **`REQUESTS_CA_BUNDLE`** +- **`SSL_CERT_FILE`** + +The SDK will only check for the presence of these environment variables if the `verify` option is set to +`True` (the default value). If `verify` is set to False, the environment variables will be ignored. + +> [!IMPORTANT] +> If you are using an HTTPS proxy server, the `verify` value will be passed to the proxy's +> SSL context as well. + +## Common errors +This section will document any user-related errors with information on how you may be able to resolve them. + +### ApiFeaturePreviewUsageOnly +This error indicates you are trying to use an endpoint in public preview and have not set `preview=True` when +calling the endpoint. Before doing so, note that this endpoint is +in preview state and breaking changes may occur at any time. + +During the first phase of an endpoint's lifecycle, it may be in `Public Preview` +state. This indicates that the endpoint is in development and is not intended for +production use. + +## Input should have timezone info + +```python +# Example error +pydantic_core._pydantic_core.ValidationError: 1 validation error for Model +datetype + Input should have timezone info [type=timezone_aware, input_value=datetime.datetime(2025, 2, 5, 20, 57, 57, 511182), input_type=datetime] +``` + +This error indicates that you are passing a `datetime` object without timezone information to an +endpoint that requires it. To resolve this error, you should pass in a `datetime` object with timezone +information. For example, you can use the `timezone` class in the `datetime` package: + +```python +from datetime import datetime +from datetime import timezone + +datetime_with_tz = datetime(2025, 2, 5, 20, 57, 57, 511182, tzinfo=timezone.utc) +``` + + + +## Documentation for V2 API endpoints + +Namespace | Resource | Operation | HTTP request | +------------ | ------------- | ------------- | ------------- | +**Admin** | AuthenticationProvider | [**get**](docs/v2/Admin/AuthenticationProvider.md#get) | **GET** /v2/admin/enrollments/{enrollmentRid}/authenticationProviders/{authenticationProviderRid} | +**Admin** | AuthenticationProvider | [**list**](docs/v2/Admin/AuthenticationProvider.md#list) | **GET** /v2/admin/enrollments/{enrollmentRid}/authenticationProviders | +**Admin** | AuthenticationProvider | [**preregister_group**](docs/v2/Admin/AuthenticationProvider.md#preregister_group) | **POST** /v2/admin/enrollments/{enrollmentRid}/authenticationProviders/{authenticationProviderRid}/preregisterGroup | +**Admin** | AuthenticationProvider | [**preregister_user**](docs/v2/Admin/AuthenticationProvider.md#preregister_user) | **POST** /v2/admin/enrollments/{enrollmentRid}/authenticationProviders/{authenticationProviderRid}/preregisterUser | +**Admin** | Group | [**create**](docs/v2/Admin/Group.md#create) | **POST** /v2/admin/groups | +**Admin** | Group | [**delete**](docs/v2/Admin/Group.md#delete) | **DELETE** /v2/admin/groups/{groupId} | +**Admin** | Group | [**get**](docs/v2/Admin/Group.md#get) | **GET** /v2/admin/groups/{groupId} | +**Admin** | Group | [**get_batch**](docs/v2/Admin/Group.md#get_batch) | **POST** /v2/admin/groups/getBatch | +**Admin** | Group | [**list**](docs/v2/Admin/Group.md#list) | **GET** /v2/admin/groups | +**Admin** | Group | [**search**](docs/v2/Admin/Group.md#search) | **POST** /v2/admin/groups/search | +**Admin** | GroupMember | [**add**](docs/v2/Admin/GroupMember.md#add) | **POST** /v2/admin/groups/{groupId}/groupMembers/add | +**Admin** | GroupMember | [**list**](docs/v2/Admin/GroupMember.md#list) | **GET** /v2/admin/groups/{groupId}/groupMembers | +**Admin** | GroupMember | [**remove**](docs/v2/Admin/GroupMember.md#remove) | **POST** /v2/admin/groups/{groupId}/groupMembers/remove | +**Admin** | GroupMembership | [**list**](docs/v2/Admin/GroupMembership.md#list) | **GET** /v2/admin/users/{userId}/groupMemberships | +**Admin** | GroupMembershipExpirationPolicy | [**get**](docs/v2/Admin/GroupMembershipExpirationPolicy.md#get) | **GET** /v2/admin/groups/{groupId}/membershipExpirationPolicy | +**Admin** | GroupMembershipExpirationPolicy | [**replace**](docs/v2/Admin/GroupMembershipExpirationPolicy.md#replace) | **PUT** /v2/admin/groups/{groupId}/membershipExpirationPolicy | +**Admin** | GroupProviderInfo | [**get**](docs/v2/Admin/GroupProviderInfo.md#get) | **GET** /v2/admin/groups/{groupId}/providerInfo | +**Admin** | GroupProviderInfo | [**replace**](docs/v2/Admin/GroupProviderInfo.md#replace) | **PUT** /v2/admin/groups/{groupId}/providerInfo | +**Admin** | Marking | [**create**](docs/v2/Admin/Marking.md#create) | **POST** /v2/admin/markings | +**Admin** | Marking | [**get**](docs/v2/Admin/Marking.md#get) | **GET** /v2/admin/markings/{markingId} | +**Admin** | Marking | [**get_batch**](docs/v2/Admin/Marking.md#get_batch) | **POST** /v2/admin/markings/getBatch | +**Admin** | Marking | [**list**](docs/v2/Admin/Marking.md#list) | **GET** /v2/admin/markings | +**Admin** | Marking | [**replace**](docs/v2/Admin/Marking.md#replace) | **PUT** /v2/admin/markings/{markingId} | +**Admin** | MarkingCategory | [**get**](docs/v2/Admin/MarkingCategory.md#get) | **GET** /v2/admin/markingCategories/{markingCategoryId} | +**Admin** | MarkingCategory | [**list**](docs/v2/Admin/MarkingCategory.md#list) | **GET** /v2/admin/markingCategories | +**Admin** | MarkingMember | [**add**](docs/v2/Admin/MarkingMember.md#add) | **POST** /v2/admin/markings/{markingId}/markingMembers/add | +**Admin** | MarkingMember | [**list**](docs/v2/Admin/MarkingMember.md#list) | **GET** /v2/admin/markings/{markingId}/markingMembers | +**Admin** | MarkingMember | [**remove**](docs/v2/Admin/MarkingMember.md#remove) | **POST** /v2/admin/markings/{markingId}/markingMembers/remove | +**Admin** | MarkingRoleAssignment | [**add**](docs/v2/Admin/MarkingRoleAssignment.md#add) | **POST** /v2/admin/markings/{markingId}/roleAssignments/add | +**Admin** | MarkingRoleAssignment | [**list**](docs/v2/Admin/MarkingRoleAssignment.md#list) | **GET** /v2/admin/markings/{markingId}/roleAssignments | +**Admin** | MarkingRoleAssignment | [**remove**](docs/v2/Admin/MarkingRoleAssignment.md#remove) | **POST** /v2/admin/markings/{markingId}/roleAssignments/remove | +**Admin** | Organization | [**get**](docs/v2/Admin/Organization.md#get) | **GET** /v2/admin/organizations/{organizationRid} | +**Admin** | Organization | [**list_available_roles**](docs/v2/Admin/Organization.md#list_available_roles) | **GET** /v2/admin/organizations/{organizationRid}/listAvailableRoles | +**Admin** | Organization | [**replace**](docs/v2/Admin/Organization.md#replace) | **PUT** /v2/admin/organizations/{organizationRid} | +**Admin** | OrganizationRoleAssignment | [**add**](docs/v2/Admin/OrganizationRoleAssignment.md#add) | **POST** /v2/admin/organizations/{organizationRid}/roleAssignments/add | +**Admin** | OrganizationRoleAssignment | [**list**](docs/v2/Admin/OrganizationRoleAssignment.md#list) | **GET** /v2/admin/organizations/{organizationRid}/roleAssignments | +**Admin** | OrganizationRoleAssignment | [**remove**](docs/v2/Admin/OrganizationRoleAssignment.md#remove) | **POST** /v2/admin/organizations/{organizationRid}/roleAssignments/remove | +**Admin** | User | [**delete**](docs/v2/Admin/User.md#delete) | **DELETE** /v2/admin/users/{userId} | +**Admin** | User | [**get**](docs/v2/Admin/User.md#get) | **GET** /v2/admin/users/{userId} | +**Admin** | User | [**get_batch**](docs/v2/Admin/User.md#get_batch) | **POST** /v2/admin/users/getBatch | +**Admin** | User | [**get_current**](docs/v2/Admin/User.md#get_current) | **GET** /v2/admin/users/getCurrent | +**Admin** | User | [**get_markings**](docs/v2/Admin/User.md#get_markings) | **GET** /v2/admin/users/{userId}/getMarkings | +**Admin** | User | [**list**](docs/v2/Admin/User.md#list) | **GET** /v2/admin/users | +**Admin** | User | [**profile_picture**](docs/v2/Admin/User.md#profile_picture) | **GET** /v2/admin/users/{userId}/profilePicture | +**Admin** | User | [**revoke_all_tokens**](docs/v2/Admin/User.md#revoke_all_tokens) | **POST** /v2/admin/users/{userId}/revokeAllTokens | +**Admin** | User | [**search**](docs/v2/Admin/User.md#search) | **POST** /v2/admin/users/search | +**Admin** | UserProviderInfo | [**get**](docs/v2/Admin/UserProviderInfo.md#get) | **GET** /v2/admin/users/{userId}/providerInfo | +**Admin** | UserProviderInfo | [**replace**](docs/v2/Admin/UserProviderInfo.md#replace) | **PUT** /v2/admin/users/{userId}/providerInfo | +**AipAgents** | Agent | [**all_sessions**](docs/v2/AipAgents/Agent.md#all_sessions) | **GET** /v2/aipAgents/agents/allSessions | +**AipAgents** | Agent | [**get**](docs/v2/AipAgents/Agent.md#get) | **GET** /v2/aipAgents/agents/{agentRid} | +**AipAgents** | AgentVersion | [**get**](docs/v2/AipAgents/AgentVersion.md#get) | **GET** /v2/aipAgents/agents/{agentRid}/agentVersions/{agentVersionString} | +**AipAgents** | AgentVersion | [**list**](docs/v2/AipAgents/AgentVersion.md#list) | **GET** /v2/aipAgents/agents/{agentRid}/agentVersions | +**AipAgents** | Content | [**get**](docs/v2/AipAgents/Content.md#get) | **GET** /v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}/content | +**AipAgents** | Session | [**blocking_continue**](docs/v2/AipAgents/Session.md#blocking_continue) | **POST** /v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}/blockingContinue | +**AipAgents** | Session | [**cancel**](docs/v2/AipAgents/Session.md#cancel) | **POST** /v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}/cancel | +**AipAgents** | Session | [**create**](docs/v2/AipAgents/Session.md#create) | **POST** /v2/aipAgents/agents/{agentRid}/sessions | +**AipAgents** | Session | [**delete**](docs/v2/AipAgents/Session.md#delete) | **DELETE** /v2/aipAgents/agents/{agentRid}/sessions/{sessionRid} | +**AipAgents** | Session | [**get**](docs/v2/AipAgents/Session.md#get) | **GET** /v2/aipAgents/agents/{agentRid}/sessions/{sessionRid} | +**AipAgents** | Session | [**list**](docs/v2/AipAgents/Session.md#list) | **GET** /v2/aipAgents/agents/{agentRid}/sessions | +**AipAgents** | Session | [**rag_context**](docs/v2/AipAgents/Session.md#rag_context) | **PUT** /v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}/ragContext | +**AipAgents** | Session | [**streaming_continue**](docs/v2/AipAgents/Session.md#streaming_continue) | **POST** /v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}/streamingContinue | +**AipAgents** | Session | [**update_title**](docs/v2/AipAgents/Session.md#update_title) | **PUT** /v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}/updateTitle | +**AipAgents** | SessionTrace | [**get**](docs/v2/AipAgents/SessionTrace.md#get) | **GET** /v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}/sessionTraces/{sessionTraceId} | +**Audit** | LogFile | [**content**](docs/v2/Audit/LogFile.md#content) | **GET** /v2/audit/organizations/{organizationRid}/logFiles/{logFileId}/content | +**Audit** | LogFile | [**list**](docs/v2/Audit/LogFile.md#list) | **GET** /v2/audit/organizations/{organizationRid}/logFiles | +**Connectivity** | Connection | [**create**](docs/v2/Connectivity/Connection.md#create) | **POST** /v2/connectivity/connections | +**Connectivity** | Connection | [**get**](docs/v2/Connectivity/Connection.md#get) | **GET** /v2/connectivity/connections/{connectionRid} | +**Connectivity** | Connection | [**get_configuration**](docs/v2/Connectivity/Connection.md#get_configuration) | **GET** /v2/connectivity/connections/{connectionRid}/getConfiguration | +**Connectivity** | Connection | [**get_configuration_batch**](docs/v2/Connectivity/Connection.md#get_configuration_batch) | **POST** /v2/connectivity/connections/getConfigurationBatch | +**Connectivity** | Connection | [**update_export_settings**](docs/v2/Connectivity/Connection.md#update_export_settings) | **POST** /v2/connectivity/connections/{connectionRid}/updateExportSettings | +**Connectivity** | Connection | [**update_secrets**](docs/v2/Connectivity/Connection.md#update_secrets) | **POST** /v2/connectivity/connections/{connectionRid}/updateSecrets | +**Connectivity** | Connection | [**upload_custom_jdbc_drivers**](docs/v2/Connectivity/Connection.md#upload_custom_jdbc_drivers) | **POST** /v2/connectivity/connections/{connectionRid}/uploadCustomJdbcDrivers | +**Connectivity** | FileImport | [**create**](docs/v2/Connectivity/FileImport.md#create) | **POST** /v2/connectivity/connections/{connectionRid}/fileImports | +**Connectivity** | FileImport | [**delete**](docs/v2/Connectivity/FileImport.md#delete) | **DELETE** /v2/connectivity/connections/{connectionRid}/fileImports/{fileImportRid} | +**Connectivity** | FileImport | [**execute**](docs/v2/Connectivity/FileImport.md#execute) | **POST** /v2/connectivity/connections/{connectionRid}/fileImports/{fileImportRid}/execute | +**Connectivity** | FileImport | [**get**](docs/v2/Connectivity/FileImport.md#get) | **GET** /v2/connectivity/connections/{connectionRid}/fileImports/{fileImportRid} | +**Connectivity** | FileImport | [**list**](docs/v2/Connectivity/FileImport.md#list) | **GET** /v2/connectivity/connections/{connectionRid}/fileImports | +**Connectivity** | FileImport | [**replace**](docs/v2/Connectivity/FileImport.md#replace) | **PUT** /v2/connectivity/connections/{connectionRid}/fileImports/{fileImportRid} | +**Connectivity** | TableImport | [**create**](docs/v2/Connectivity/TableImport.md#create) | **POST** /v2/connectivity/connections/{connectionRid}/tableImports | +**Connectivity** | TableImport | [**delete**](docs/v2/Connectivity/TableImport.md#delete) | **DELETE** /v2/connectivity/connections/{connectionRid}/tableImports/{tableImportRid} | +**Connectivity** | TableImport | [**execute**](docs/v2/Connectivity/TableImport.md#execute) | **POST** /v2/connectivity/connections/{connectionRid}/tableImports/{tableImportRid}/execute | +**Connectivity** | TableImport | [**get**](docs/v2/Connectivity/TableImport.md#get) | **GET** /v2/connectivity/connections/{connectionRid}/tableImports/{tableImportRid} | +**Connectivity** | TableImport | [**list**](docs/v2/Connectivity/TableImport.md#list) | **GET** /v2/connectivity/connections/{connectionRid}/tableImports | +**Connectivity** | TableImport | [**replace**](docs/v2/Connectivity/TableImport.md#replace) | **PUT** /v2/connectivity/connections/{connectionRid}/tableImports/{tableImportRid} | +**Connectivity** | VirtualTable | [**create**](docs/v2/Connectivity/VirtualTable.md#create) | **POST** /v2/connectivity/connections/{connectionRid}/virtualTables | +**DataHealth** | Check | [**create**](docs/v2/DataHealth/Check.md#create) | **POST** /v2/dataHealth/checks | +**DataHealth** | Check | [**delete**](docs/v2/DataHealth/Check.md#delete) | **DELETE** /v2/dataHealth/checks/{checkRid} | +**DataHealth** | Check | [**get**](docs/v2/DataHealth/Check.md#get) | **GET** /v2/dataHealth/checks/{checkRid} | +**DataHealth** | Check | [**replace**](docs/v2/DataHealth/Check.md#replace) | **PUT** /v2/dataHealth/checks/{checkRid} | +**DataHealth** | CheckReport | [**get**](docs/v2/DataHealth/CheckReport.md#get) | **GET** /v2/dataHealth/checkReports/{checkReportRid} | +**Datasets** | Branch | [**create**](docs/v2/Datasets/Branch.md#create) | **POST** /v2/datasets/{datasetRid}/branches | +**Datasets** | Branch | [**delete**](docs/v2/Datasets/Branch.md#delete) | **DELETE** /v2/datasets/{datasetRid}/branches/{branchName} | +**Datasets** | Branch | [**get**](docs/v2/Datasets/Branch.md#get) | **GET** /v2/datasets/{datasetRid}/branches/{branchName} | +**Datasets** | Branch | [**list**](docs/v2/Datasets/Branch.md#list) | **GET** /v2/datasets/{datasetRid}/branches | +**Datasets** | Branch | [**transactions**](docs/v2/Datasets/Branch.md#transactions) | **GET** /v2/datasets/{datasetRid}/branches/{branchName}/transactions | +**Datasets** | Dataset | [**create**](docs/v2/Datasets/Dataset.md#create) | **POST** /v2/datasets | +**Datasets** | Dataset | [**get**](docs/v2/Datasets/Dataset.md#get) | **GET** /v2/datasets/{datasetRid} | +**Datasets** | Dataset | [**get_health_checks**](docs/v2/Datasets/Dataset.md#get_health_checks) | **GET** /v2/datasets/{datasetRid}/getHealthChecks | +**Datasets** | Dataset | [**get_schedules**](docs/v2/Datasets/Dataset.md#get_schedules) | **GET** /v2/datasets/{datasetRid}/getSchedules | +**Datasets** | Dataset | [**get_schema**](docs/v2/Datasets/Dataset.md#get_schema) | **GET** /v2/datasets/{datasetRid}/getSchema | +**Datasets** | Dataset | [**get_schema_batch**](docs/v2/Datasets/Dataset.md#get_schema_batch) | **POST** /v2/datasets/getSchemaBatch | +**Datasets** | Dataset | [**jobs**](docs/v2/Datasets/Dataset.md#jobs) | **POST** /v2/datasets/{datasetRid}/jobs | +**Datasets** | Dataset | [**put_schema**](docs/v2/Datasets/Dataset.md#put_schema) | **PUT** /v2/datasets/{datasetRid}/putSchema | +**Datasets** | Dataset | [**read_table**](docs/v2/Datasets/Dataset.md#read_table) | **GET** /v2/datasets/{datasetRid}/readTable | +**Datasets** | Dataset | [**transactions**](docs/v2/Datasets/Dataset.md#transactions) | **GET** /v2/datasets/{datasetRid}/transactions | +**Datasets** | File | [**content**](docs/v2/Datasets/File.md#content) | **GET** /v2/datasets/{datasetRid}/files/{filePath}/content | +**Datasets** | File | [**delete**](docs/v2/Datasets/File.md#delete) | **DELETE** /v2/datasets/{datasetRid}/files/{filePath} | +**Datasets** | File | [**get**](docs/v2/Datasets/File.md#get) | **GET** /v2/datasets/{datasetRid}/files/{filePath} | +**Datasets** | File | [**list**](docs/v2/Datasets/File.md#list) | **GET** /v2/datasets/{datasetRid}/files | +**Datasets** | File | [**upload**](docs/v2/Datasets/File.md#upload) | **POST** /v2/datasets/{datasetRid}/files/{filePath}/upload | +**Datasets** | Transaction | [**abort**](docs/v2/Datasets/Transaction.md#abort) | **POST** /v2/datasets/{datasetRid}/transactions/{transactionRid}/abort | +**Datasets** | Transaction | [**commit**](docs/v2/Datasets/Transaction.md#commit) | **POST** /v2/datasets/{datasetRid}/transactions/{transactionRid}/commit | +**Datasets** | Transaction | [**create**](docs/v2/Datasets/Transaction.md#create) | **POST** /v2/datasets/{datasetRid}/transactions | +**Datasets** | Transaction | [**get**](docs/v2/Datasets/Transaction.md#get) | **GET** /v2/datasets/{datasetRid}/transactions/{transactionRid} | +**Datasets** | View | [**add_backing_datasets**](docs/v2/Datasets/View.md#add_backing_datasets) | **POST** /v2/datasets/views/{viewDatasetRid}/addBackingDatasets | +**Datasets** | View | [**add_primary_key**](docs/v2/Datasets/View.md#add_primary_key) | **POST** /v2/datasets/views/{viewDatasetRid}/addPrimaryKey | +**Datasets** | View | [**create**](docs/v2/Datasets/View.md#create) | **POST** /v2/datasets/views | +**Datasets** | View | [**get**](docs/v2/Datasets/View.md#get) | **GET** /v2/datasets/views/{viewDatasetRid} | +**Datasets** | View | [**remove_backing_datasets**](docs/v2/Datasets/View.md#remove_backing_datasets) | **POST** /v2/datasets/views/{viewDatasetRid}/removeBackingDatasets | +**Datasets** | View | [**replace_backing_datasets**](docs/v2/Datasets/View.md#replace_backing_datasets) | **PUT** /v2/datasets/views/{viewDatasetRid}/replaceBackingDatasets | +**Filesystem** | Folder | [**children**](docs/v2/Filesystem/Folder.md#children) | **GET** /v2/filesystem/folders/{folderRid}/children | +**Filesystem** | Folder | [**create**](docs/v2/Filesystem/Folder.md#create) | **POST** /v2/filesystem/folders | +**Filesystem** | Folder | [**get**](docs/v2/Filesystem/Folder.md#get) | **GET** /v2/filesystem/folders/{folderRid} | +**Filesystem** | Folder | [**get_batch**](docs/v2/Filesystem/Folder.md#get_batch) | **POST** /v2/filesystem/folders/getBatch | +**Filesystem** | Project | [**add_organizations**](docs/v2/Filesystem/Project.md#add_organizations) | **POST** /v2/filesystem/projects/{projectRid}/addOrganizations | +**Filesystem** | Project | [**create**](docs/v2/Filesystem/Project.md#create) | **POST** /v2/filesystem/projects/create | +**Filesystem** | Project | [**create_from_template**](docs/v2/Filesystem/Project.md#create_from_template) | **POST** /v2/filesystem/projects/createFromTemplate | +**Filesystem** | Project | [**get**](docs/v2/Filesystem/Project.md#get) | **GET** /v2/filesystem/projects/{projectRid} | +**Filesystem** | Project | [**organizations**](docs/v2/Filesystem/Project.md#organizations) | **GET** /v2/filesystem/projects/{projectRid}/organizations | +**Filesystem** | Project | [**remove_organizations**](docs/v2/Filesystem/Project.md#remove_organizations) | **POST** /v2/filesystem/projects/{projectRid}/removeOrganizations | +**Filesystem** | Resource | [**add_markings**](docs/v2/Filesystem/Resource.md#add_markings) | **POST** /v2/filesystem/resources/{resourceRid}/addMarkings | +**Filesystem** | Resource | [**delete**](docs/v2/Filesystem/Resource.md#delete) | **DELETE** /v2/filesystem/resources/{resourceRid} | +**Filesystem** | Resource | [**get**](docs/v2/Filesystem/Resource.md#get) | **GET** /v2/filesystem/resources/{resourceRid} | +**Filesystem** | Resource | [**get_access_requirements**](docs/v2/Filesystem/Resource.md#get_access_requirements) | **GET** /v2/filesystem/resources/{resourceRid}/getAccessRequirements | +**Filesystem** | Resource | [**get_batch**](docs/v2/Filesystem/Resource.md#get_batch) | **POST** /v2/filesystem/resources/getBatch | +**Filesystem** | Resource | [**get_by_path**](docs/v2/Filesystem/Resource.md#get_by_path) | **GET** /v2/filesystem/resources/getByPath | +**Filesystem** | Resource | [**get_by_path_batch**](docs/v2/Filesystem/Resource.md#get_by_path_batch) | **POST** /v2/filesystem/resources/getByPathBatch | +**Filesystem** | Resource | [**markings**](docs/v2/Filesystem/Resource.md#markings) | **GET** /v2/filesystem/resources/{resourceRid}/markings | +**Filesystem** | Resource | [**permanently_delete**](docs/v2/Filesystem/Resource.md#permanently_delete) | **POST** /v2/filesystem/resources/{resourceRid}/permanentlyDelete | +**Filesystem** | Resource | [**remove_markings**](docs/v2/Filesystem/Resource.md#remove_markings) | **POST** /v2/filesystem/resources/{resourceRid}/removeMarkings | +**Filesystem** | Resource | [**restore**](docs/v2/Filesystem/Resource.md#restore) | **POST** /v2/filesystem/resources/{resourceRid}/restore | +**Filesystem** | ResourceRole | [**add**](docs/v2/Filesystem/ResourceRole.md#add) | **POST** /v2/filesystem/resources/{resourceRid}/roles/add | +**Filesystem** | ResourceRole | [**list**](docs/v2/Filesystem/ResourceRole.md#list) | **GET** /v2/filesystem/resources/{resourceRid}/roles | +**Filesystem** | ResourceRole | [**remove**](docs/v2/Filesystem/ResourceRole.md#remove) | **POST** /v2/filesystem/resources/{resourceRid}/roles/remove | +**Filesystem** | Space | [**list**](docs/v2/Filesystem/Space.md#list) | **GET** /v2/filesystem/spaces | +**MediaSets** | MediaSet | [**abort**](docs/v2/MediaSets/MediaSet.md#abort) | **POST** /v2/mediasets/{mediaSetRid}/transactions/{transactionId}/abort | +**MediaSets** | MediaSet | [**commit**](docs/v2/MediaSets/MediaSet.md#commit) | **POST** /v2/mediasets/{mediaSetRid}/transactions/{transactionId}/commit | +**MediaSets** | MediaSet | [**create**](docs/v2/MediaSets/MediaSet.md#create) | **POST** /v2/mediasets/{mediaSetRid}/transactions | +**MediaSets** | MediaSet | [**get_rid_by_path**](docs/v2/MediaSets/MediaSet.md#get_rid_by_path) | **GET** /v2/mediasets/{mediaSetRid}/items/getRidByPath | +**MediaSets** | MediaSet | [**info**](docs/v2/MediaSets/MediaSet.md#info) | **GET** /v2/mediasets/{mediaSetRid}/items/{mediaItemRid} | +**MediaSets** | MediaSet | [**read**](docs/v2/MediaSets/MediaSet.md#read) | **GET** /v2/mediasets/{mediaSetRid}/items/{mediaItemRid}/content | +**MediaSets** | MediaSet | [**read_original**](docs/v2/MediaSets/MediaSet.md#read_original) | **GET** /v2/mediasets/{mediaSetRid}/items/{mediaItemRid}/original | +**MediaSets** | MediaSet | [**reference**](docs/v2/MediaSets/MediaSet.md#reference) | **GET** /v2/mediasets/{mediaSetRid}/items/{mediaItemRid}/reference | +**MediaSets** | MediaSet | [**upload**](docs/v2/MediaSets/MediaSet.md#upload) | **POST** /v2/mediasets/{mediaSetRid}/items | +**MediaSets** | MediaSet | [**upload_media**](docs/v2/MediaSets/MediaSet.md#upload_media) | **PUT** /v2/mediasets/media/upload | +**Ontologies** | Action | [**apply**](docs/v2/Ontologies/Action.md#apply) | **POST** /v2/ontologies/{ontology}/actions/{action}/apply | +**Ontologies** | Action | [**apply_batch**](docs/v2/Ontologies/Action.md#apply_batch) | **POST** /v2/ontologies/{ontology}/actions/{action}/applyBatch | +**Ontologies** | ActionType | [**get**](docs/v2/Ontologies/ActionType.md#get) | **GET** /v2/ontologies/{ontology}/actionTypes/{actionType} | +**Ontologies** | ActionType | [**get_by_rid**](docs/v2/Ontologies/ActionType.md#get_by_rid) | **GET** /v2/ontologies/{ontology}/actionTypes/byRid/{actionTypeRid} | +**Ontologies** | ActionType | [**list**](docs/v2/Ontologies/ActionType.md#list) | **GET** /v2/ontologies/{ontology}/actionTypes | +**Ontologies** | Attachment | [**get**](docs/v2/Ontologies/Attachment.md#get) | **GET** /v2/ontologies/attachments/{attachmentRid} | +**Ontologies** | Attachment | [**read**](docs/v2/Ontologies/Attachment.md#read) | **GET** /v2/ontologies/attachments/{attachmentRid}/content | +**Ontologies** | Attachment | [**upload**](docs/v2/Ontologies/Attachment.md#upload) | **POST** /v2/ontologies/attachments/upload | +**Ontologies** | AttachmentProperty | [**get_attachment**](docs/v2/Ontologies/AttachmentProperty.md#get_attachment) | **GET** /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/attachments/{property} | +**Ontologies** | AttachmentProperty | [**get_attachment_by_rid**](docs/v2/Ontologies/AttachmentProperty.md#get_attachment_by_rid) | **GET** /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/attachments/{property}/{attachmentRid} | +**Ontologies** | AttachmentProperty | [**read_attachment**](docs/v2/Ontologies/AttachmentProperty.md#read_attachment) | **GET** /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/attachments/{property}/content | +**Ontologies** | AttachmentProperty | [**read_attachment_by_rid**](docs/v2/Ontologies/AttachmentProperty.md#read_attachment_by_rid) | **GET** /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/attachments/{property}/{attachmentRid}/content | +**Ontologies** | CipherTextProperty | [**decrypt**](docs/v2/Ontologies/CipherTextProperty.md#decrypt) | **GET** /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/ciphertexts/{property}/decrypt | +**Ontologies** | LinkedObject | [**get_linked_object**](docs/v2/Ontologies/LinkedObject.md#get_linked_object) | **GET** /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/links/{linkType}/{linkedObjectPrimaryKey} | +**Ontologies** | LinkedObject | [**list_linked_objects**](docs/v2/Ontologies/LinkedObject.md#list_linked_objects) | **GET** /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/links/{linkType} | +**Ontologies** | MediaReferenceProperty | [**get_media_content**](docs/v2/Ontologies/MediaReferenceProperty.md#get_media_content) | **GET** /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/media/{property}/content | +**Ontologies** | MediaReferenceProperty | [**upload**](docs/v2/Ontologies/MediaReferenceProperty.md#upload) | **POST** /v2/ontologies/{ontology}/objectTypes/{objectType}/media/{property}/upload | +**Ontologies** | ObjectType | [**get**](docs/v2/Ontologies/ObjectType.md#get) | **GET** /v2/ontologies/{ontology}/objectTypes/{objectType} | +**Ontologies** | ObjectType | [**get_outgoing_link_type**](docs/v2/Ontologies/ObjectType.md#get_outgoing_link_type) | **GET** /v2/ontologies/{ontology}/objectTypes/{objectType}/outgoingLinkTypes/{linkType} | +**Ontologies** | ObjectType | [**list**](docs/v2/Ontologies/ObjectType.md#list) | **GET** /v2/ontologies/{ontology}/objectTypes | +**Ontologies** | ObjectType | [**list_outgoing_link_types**](docs/v2/Ontologies/ObjectType.md#list_outgoing_link_types) | **GET** /v2/ontologies/{ontology}/objectTypes/{objectType}/outgoingLinkTypes | +**Ontologies** | Ontology | [**get**](docs/v2/Ontologies/Ontology.md#get) | **GET** /v2/ontologies/{ontology} | +**Ontologies** | Ontology | [**get_full_metadata**](docs/v2/Ontologies/Ontology.md#get_full_metadata) | **GET** /v2/ontologies/{ontology}/fullMetadata | +**Ontologies** | Ontology | [**list**](docs/v2/Ontologies/Ontology.md#list) | **GET** /v2/ontologies | +**Ontologies** | OntologyInterface | [**get**](docs/v2/Ontologies/OntologyInterface.md#get) | **GET** /v2/ontologies/{ontology}/interfaceTypes/{interfaceType} | +**Ontologies** | OntologyInterface | [**list**](docs/v2/Ontologies/OntologyInterface.md#list) | **GET** /v2/ontologies/{ontology}/interfaceTypes | +**Ontologies** | OntologyObject | [**aggregate**](docs/v2/Ontologies/OntologyObject.md#aggregate) | **POST** /v2/ontologies/{ontology}/objects/{objectType}/aggregate | +**Ontologies** | OntologyObject | [**get**](docs/v2/Ontologies/OntologyObject.md#get) | **GET** /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey} | +**Ontologies** | OntologyObject | [**list**](docs/v2/Ontologies/OntologyObject.md#list) | **GET** /v2/ontologies/{ontology}/objects/{objectType} | +**Ontologies** | OntologyObject | [**search**](docs/v2/Ontologies/OntologyObject.md#search) | **POST** /v2/ontologies/{ontology}/objects/{objectType}/search | +**Ontologies** | OntologyObjectSet | [**aggregate**](docs/v2/Ontologies/OntologyObjectSet.md#aggregate) | **POST** /v2/ontologies/{ontology}/objectSets/aggregate | +**Ontologies** | OntologyObjectSet | [**create_temporary**](docs/v2/Ontologies/OntologyObjectSet.md#create_temporary) | **POST** /v2/ontologies/{ontology}/objectSets/createTemporary | +**Ontologies** | OntologyObjectSet | [**load**](docs/v2/Ontologies/OntologyObjectSet.md#load) | **POST** /v2/ontologies/{ontology}/objectSets/loadObjects | +**Ontologies** | OntologyObjectSet | [**load_multiple_object_types**](docs/v2/Ontologies/OntologyObjectSet.md#load_multiple_object_types) | **POST** /v2/ontologies/{ontology}/objectSets/loadObjectsMultipleObjectTypes | +**Ontologies** | OntologyObjectSet | [**load_objects_or_interfaces**](docs/v2/Ontologies/OntologyObjectSet.md#load_objects_or_interfaces) | **POST** /v2/ontologies/{ontology}/objectSets/loadObjectsOrInterfaces | +**Ontologies** | OntologyValueType | [**get**](docs/v2/Ontologies/OntologyValueType.md#get) | **GET** /v2/ontologies/{ontology}/valueTypes/{valueType} | +**Ontologies** | OntologyValueType | [**list**](docs/v2/Ontologies/OntologyValueType.md#list) | **GET** /v2/ontologies/{ontology}/valueTypes | +**Ontologies** | Query | [**execute**](docs/v2/Ontologies/Query.md#execute) | **POST** /v2/ontologies/{ontology}/queries/{queryApiName}/execute | +**Ontologies** | QueryType | [**get**](docs/v2/Ontologies/QueryType.md#get) | **GET** /v2/ontologies/{ontology}/queryTypes/{queryApiName} | +**Ontologies** | QueryType | [**list**](docs/v2/Ontologies/QueryType.md#list) | **GET** /v2/ontologies/{ontology}/queryTypes | +**Ontologies** | TimeSeriesPropertyV2 | [**get_first_point**](docs/v2/Ontologies/TimeSeriesPropertyV2.md#get_first_point) | **GET** /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/timeseries/{property}/firstPoint | +**Ontologies** | TimeSeriesPropertyV2 | [**get_last_point**](docs/v2/Ontologies/TimeSeriesPropertyV2.md#get_last_point) | **GET** /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/timeseries/{property}/lastPoint | +**Ontologies** | TimeSeriesPropertyV2 | [**stream_points**](docs/v2/Ontologies/TimeSeriesPropertyV2.md#stream_points) | **POST** /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/timeseries/{property}/streamPoints | +**Ontologies** | TimeSeriesValueBankProperty | [**get_latest_value**](docs/v2/Ontologies/TimeSeriesValueBankProperty.md#get_latest_value) | **GET** /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/timeseries/{propertyName}/latestValue | +**Ontologies** | TimeSeriesValueBankProperty | [**stream_values**](docs/v2/Ontologies/TimeSeriesValueBankProperty.md#stream_values) | **POST** /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/timeseries/{property}/streamValues | +**Orchestration** | Build | [**cancel**](docs/v2/Orchestration/Build.md#cancel) | **POST** /v2/orchestration/builds/{buildRid}/cancel | +**Orchestration** | Build | [**create**](docs/v2/Orchestration/Build.md#create) | **POST** /v2/orchestration/builds/create | +**Orchestration** | Build | [**get**](docs/v2/Orchestration/Build.md#get) | **GET** /v2/orchestration/builds/{buildRid} | +**Orchestration** | Build | [**get_batch**](docs/v2/Orchestration/Build.md#get_batch) | **POST** /v2/orchestration/builds/getBatch | +**Orchestration** | Build | [**jobs**](docs/v2/Orchestration/Build.md#jobs) | **GET** /v2/orchestration/builds/{buildRid}/jobs | +**Orchestration** | Job | [**get**](docs/v2/Orchestration/Job.md#get) | **GET** /v2/orchestration/jobs/{jobRid} | +**Orchestration** | Job | [**get_batch**](docs/v2/Orchestration/Job.md#get_batch) | **POST** /v2/orchestration/jobs/getBatch | +**Orchestration** | Schedule | [**create**](docs/v2/Orchestration/Schedule.md#create) | **POST** /v2/orchestration/schedules | +**Orchestration** | Schedule | [**delete**](docs/v2/Orchestration/Schedule.md#delete) | **DELETE** /v2/orchestration/schedules/{scheduleRid} | +**Orchestration** | Schedule | [**get**](docs/v2/Orchestration/Schedule.md#get) | **GET** /v2/orchestration/schedules/{scheduleRid} | +**Orchestration** | Schedule | [**get_affected_resources**](docs/v2/Orchestration/Schedule.md#get_affected_resources) | **POST** /v2/orchestration/schedules/{scheduleRid}/getAffectedResources | +**Orchestration** | Schedule | [**get_batch**](docs/v2/Orchestration/Schedule.md#get_batch) | **POST** /v2/orchestration/schedules/getBatch | +**Orchestration** | Schedule | [**pause**](docs/v2/Orchestration/Schedule.md#pause) | **POST** /v2/orchestration/schedules/{scheduleRid}/pause | +**Orchestration** | Schedule | [**replace**](docs/v2/Orchestration/Schedule.md#replace) | **PUT** /v2/orchestration/schedules/{scheduleRid} | +**Orchestration** | Schedule | [**run**](docs/v2/Orchestration/Schedule.md#run) | **POST** /v2/orchestration/schedules/{scheduleRid}/run | +**Orchestration** | Schedule | [**runs**](docs/v2/Orchestration/Schedule.md#runs) | **GET** /v2/orchestration/schedules/{scheduleRid}/runs | +**Orchestration** | Schedule | [**unpause**](docs/v2/Orchestration/Schedule.md#unpause) | **POST** /v2/orchestration/schedules/{scheduleRid}/unpause | +**Orchestration** | ScheduleVersion | [**get**](docs/v2/Orchestration/ScheduleVersion.md#get) | **GET** /v2/orchestration/scheduleVersions/{scheduleVersionRid} | +**Orchestration** | ScheduleVersion | [**schedule**](docs/v2/Orchestration/ScheduleVersion.md#schedule) | **GET** /v2/orchestration/scheduleVersions/{scheduleVersionRid}/schedule | +**SqlQueries** | SqlQuery | [**cancel**](docs/v2/SqlQueries/SqlQuery.md#cancel) | **POST** /v2/sqlQueries/{sqlQueryId}/cancel | +**SqlQueries** | SqlQuery | [**execute**](docs/v2/SqlQueries/SqlQuery.md#execute) | **POST** /v2/sqlQueries/execute | +**SqlQueries** | SqlQuery | [**get_results**](docs/v2/SqlQueries/SqlQuery.md#get_results) | **GET** /v2/sqlQueries/{sqlQueryId}/getResults | +**SqlQueries** | SqlQuery | [**get_status**](docs/v2/SqlQueries/SqlQuery.md#get_status) | **GET** /v2/sqlQueries/{sqlQueryId}/getStatus | +**Streams** | Dataset | [**create**](docs/v2/Streams/Dataset.md#create) | **POST** /v2/streams/datasets/create | +**Streams** | Stream | [**create**](docs/v2/Streams/Stream.md#create) | **POST** /v2/streams/datasets/{datasetRid}/streams | +**Streams** | Stream | [**get**](docs/v2/Streams/Stream.md#get) | **GET** /v2/streams/datasets/{datasetRid}/streams/{streamBranchName} | +**Streams** | Stream | [**publish_binary_record**](docs/v2/Streams/Stream.md#publish_binary_record) | **POST** /v2/highScale/streams/datasets/{datasetRid}/streams/{streamBranchName}/publishBinaryRecord | +**Streams** | Stream | [**publish_record**](docs/v2/Streams/Stream.md#publish_record) | **POST** /v2/highScale/streams/datasets/{datasetRid}/streams/{streamBranchName}/publishRecord | +**Streams** | Stream | [**publish_records**](docs/v2/Streams/Stream.md#publish_records) | **POST** /v2/highScale/streams/datasets/{datasetRid}/streams/{streamBranchName}/publishRecords | +**Streams** | Stream | [**reset**](docs/v2/Streams/Stream.md#reset) | **POST** /v2/streams/datasets/{datasetRid}/streams/{streamBranchName}/reset | +**ThirdPartyApplications** | Version | [**delete**](docs/v2/ThirdPartyApplications/Version.md#delete) | **DELETE** /v2/thirdPartyApplications/{thirdPartyApplicationRid}/website/versions/{versionVersion} | +**ThirdPartyApplications** | Version | [**get**](docs/v2/ThirdPartyApplications/Version.md#get) | **GET** /v2/thirdPartyApplications/{thirdPartyApplicationRid}/website/versions/{versionVersion} | +**ThirdPartyApplications** | Version | [**list**](docs/v2/ThirdPartyApplications/Version.md#list) | **GET** /v2/thirdPartyApplications/{thirdPartyApplicationRid}/website/versions | +**ThirdPartyApplications** | Version | [**upload**](docs/v2/ThirdPartyApplications/Version.md#upload) | **POST** /v2/thirdPartyApplications/{thirdPartyApplicationRid}/website/versions/upload | +**ThirdPartyApplications** | Website | [**deploy**](docs/v2/ThirdPartyApplications/Website.md#deploy) | **POST** /v2/thirdPartyApplications/{thirdPartyApplicationRid}/website/deploy | +**ThirdPartyApplications** | Website | [**get**](docs/v2/ThirdPartyApplications/Website.md#get) | **GET** /v2/thirdPartyApplications/{thirdPartyApplicationRid}/website | +**ThirdPartyApplications** | Website | [**undeploy**](docs/v2/ThirdPartyApplications/Website.md#undeploy) | **POST** /v2/thirdPartyApplications/{thirdPartyApplicationRid}/website/undeploy | + +## Documentation for V1 API endpoints + +Namespace | Resource | Operation | HTTP request | +------------ | ------------- | ------------- | ------------- | +**Datasets** | Branch | [**create**](docs/v1/Datasets/Branch.md#create) | **POST** /v1/datasets/{datasetRid}/branches | +**Datasets** | Branch | [**delete**](docs/v1/Datasets/Branch.md#delete) | **DELETE** /v1/datasets/{datasetRid}/branches/{branchId} | +**Datasets** | Branch | [**get**](docs/v1/Datasets/Branch.md#get) | **GET** /v1/datasets/{datasetRid}/branches/{branchId} | +**Datasets** | Branch | [**list**](docs/v1/Datasets/Branch.md#list) | **GET** /v1/datasets/{datasetRid}/branches | +**Datasets** | Dataset | [**create**](docs/v1/Datasets/Dataset.md#create) | **POST** /v1/datasets | +**Datasets** | Dataset | [**get**](docs/v1/Datasets/Dataset.md#get) | **GET** /v1/datasets/{datasetRid} | +**Datasets** | Dataset | [**read**](docs/v1/Datasets/Dataset.md#read) | **GET** /v1/datasets/{datasetRid}/readTable | +**Datasets** | File | [**delete**](docs/v1/Datasets/File.md#delete) | **DELETE** /v1/datasets/{datasetRid}/files/{filePath} | +**Datasets** | File | [**get**](docs/v1/Datasets/File.md#get) | **GET** /v1/datasets/{datasetRid}/files/{filePath} | +**Datasets** | File | [**list**](docs/v1/Datasets/File.md#list) | **GET** /v1/datasets/{datasetRid}/files | +**Datasets** | File | [**read**](docs/v1/Datasets/File.md#read) | **GET** /v1/datasets/{datasetRid}/files/{filePath}/content | +**Datasets** | File | [**upload**](docs/v1/Datasets/File.md#upload) | **POST** /v1/datasets/{datasetRid}/files:upload | +**Datasets** | Transaction | [**abort**](docs/v1/Datasets/Transaction.md#abort) | **POST** /v1/datasets/{datasetRid}/transactions/{transactionRid}/abort | +**Datasets** | Transaction | [**commit**](docs/v1/Datasets/Transaction.md#commit) | **POST** /v1/datasets/{datasetRid}/transactions/{transactionRid}/commit | +**Datasets** | Transaction | [**create**](docs/v1/Datasets/Transaction.md#create) | **POST** /v1/datasets/{datasetRid}/transactions | +**Datasets** | Transaction | [**get**](docs/v1/Datasets/Transaction.md#get) | **GET** /v1/datasets/{datasetRid}/transactions/{transactionRid} | +**Ontologies** | Action | [**apply**](docs/v1/Ontologies/Action.md#apply) | **POST** /v1/ontologies/{ontologyRid}/actions/{actionType}/apply | +**Ontologies** | Action | [**apply_batch**](docs/v1/Ontologies/Action.md#apply_batch) | **POST** /v1/ontologies/{ontologyRid}/actions/{actionType}/applyBatch | +**Ontologies** | Action | [**validate**](docs/v1/Ontologies/Action.md#validate) | **POST** /v1/ontologies/{ontologyRid}/actions/{actionType}/validate | +**Ontologies** | ActionType | [**get**](docs/v1/Ontologies/ActionType.md#get) | **GET** /v1/ontologies/{ontologyRid}/actionTypes/{actionTypeApiName} | +**Ontologies** | ActionType | [**list**](docs/v1/Ontologies/ActionType.md#list) | **GET** /v1/ontologies/{ontologyRid}/actionTypes | +**Ontologies** | Attachment | [**get**](docs/v1/Ontologies/Attachment.md#get) | **GET** /v1/attachments/{attachmentRid} | +**Ontologies** | Attachment | [**read**](docs/v1/Ontologies/Attachment.md#read) | **GET** /v1/attachments/{attachmentRid}/content | +**Ontologies** | Attachment | [**upload**](docs/v1/Ontologies/Attachment.md#upload) | **POST** /v1/attachments/upload | +**Ontologies** | ObjectType | [**get**](docs/v1/Ontologies/ObjectType.md#get) | **GET** /v1/ontologies/{ontologyRid}/objectTypes/{objectType} | +**Ontologies** | ObjectType | [**get_outgoing_link_type**](docs/v1/Ontologies/ObjectType.md#get_outgoing_link_type) | **GET** /v1/ontologies/{ontologyRid}/objectTypes/{objectType}/outgoingLinkTypes/{linkType} | +**Ontologies** | ObjectType | [**list**](docs/v1/Ontologies/ObjectType.md#list) | **GET** /v1/ontologies/{ontologyRid}/objectTypes | +**Ontologies** | ObjectType | [**list_outgoing_link_types**](docs/v1/Ontologies/ObjectType.md#list_outgoing_link_types) | **GET** /v1/ontologies/{ontologyRid}/objectTypes/{objectType}/outgoingLinkTypes | +**Ontologies** | Ontology | [**get**](docs/v1/Ontologies/Ontology.md#get) | **GET** /v1/ontologies/{ontologyRid} | +**Ontologies** | Ontology | [**list**](docs/v1/Ontologies/Ontology.md#list) | **GET** /v1/ontologies | +**Ontologies** | OntologyObject | [**aggregate**](docs/v1/Ontologies/OntologyObject.md#aggregate) | **POST** /v1/ontologies/{ontologyRid}/objects/{objectType}/aggregate | +**Ontologies** | OntologyObject | [**get**](docs/v1/Ontologies/OntologyObject.md#get) | **GET** /v1/ontologies/{ontologyRid}/objects/{objectType}/{primaryKey} | +**Ontologies** | OntologyObject | [**get_linked_object**](docs/v1/Ontologies/OntologyObject.md#get_linked_object) | **GET** /v1/ontologies/{ontologyRid}/objects/{objectType}/{primaryKey}/links/{linkType}/{linkedObjectPrimaryKey} | +**Ontologies** | OntologyObject | [**list**](docs/v1/Ontologies/OntologyObject.md#list) | **GET** /v1/ontologies/{ontologyRid}/objects/{objectType} | +**Ontologies** | OntologyObject | [**list_linked_objects**](docs/v1/Ontologies/OntologyObject.md#list_linked_objects) | **GET** /v1/ontologies/{ontologyRid}/objects/{objectType}/{primaryKey}/links/{linkType} | +**Ontologies** | OntologyObject | [**search**](docs/v1/Ontologies/OntologyObject.md#search) | **POST** /v1/ontologies/{ontologyRid}/objects/{objectType}/search | +**Ontologies** | Query | [**execute**](docs/v1/Ontologies/Query.md#execute) | **POST** /v1/ontologies/{ontologyRid}/queries/{queryApiName}/execute | +**Ontologies** | QueryType | [**get**](docs/v1/Ontologies/QueryType.md#get) | **GET** /v1/ontologies/{ontologyRid}/queryTypes/{queryApiName} | +**Ontologies** | QueryType | [**list**](docs/v1/Ontologies/QueryType.md#list) | **GET** /v1/ontologies/{ontologyRid}/queryTypes | + + + + +## Documentation for V2 models + +Namespace | Name | Import | +--------- | ---- | ------ | +**Admin** | [AddEnrollmentRoleAssignmentsRequest](docs/v2/Admin/models/AddEnrollmentRoleAssignmentsRequest.md) | `from foundry_sdk.v2.admin.models import AddEnrollmentRoleAssignmentsRequest` | +**Admin** | [AddGroupMembersRequest](docs/v2/Admin/models/AddGroupMembersRequest.md) | `from foundry_sdk.v2.admin.models import AddGroupMembersRequest` | +**Admin** | [AddMarkingMembersRequest](docs/v2/Admin/models/AddMarkingMembersRequest.md) | `from foundry_sdk.v2.admin.models import AddMarkingMembersRequest` | +**Admin** | [AddMarkingRoleAssignmentsRequest](docs/v2/Admin/models/AddMarkingRoleAssignmentsRequest.md) | `from foundry_sdk.v2.admin.models import AddMarkingRoleAssignmentsRequest` | +**Admin** | [AddOrganizationRoleAssignmentsRequest](docs/v2/Admin/models/AddOrganizationRoleAssignmentsRequest.md) | `from foundry_sdk.v2.admin.models import AddOrganizationRoleAssignmentsRequest` | +**Admin** | [AttributeName](docs/v2/Admin/models/AttributeName.md) | `from foundry_sdk.v2.admin.models import AttributeName` | +**Admin** | [AttributeValue](docs/v2/Admin/models/AttributeValue.md) | `from foundry_sdk.v2.admin.models import AttributeValue` | +**Admin** | [AttributeValues](docs/v2/Admin/models/AttributeValues.md) | `from foundry_sdk.v2.admin.models import AttributeValues` | +**Admin** | [AuthenticationProtocol](docs/v2/Admin/models/AuthenticationProtocol.md) | `from foundry_sdk.v2.admin.models import AuthenticationProtocol` | +**Admin** | [AuthenticationProvider](docs/v2/Admin/models/AuthenticationProvider.md) | `from foundry_sdk.v2.admin.models import AuthenticationProvider` | +**Admin** | [AuthenticationProviderEnabled](docs/v2/Admin/models/AuthenticationProviderEnabled.md) | `from foundry_sdk.v2.admin.models import AuthenticationProviderEnabled` | +**Admin** | [AuthenticationProviderName](docs/v2/Admin/models/AuthenticationProviderName.md) | `from foundry_sdk.v2.admin.models import AuthenticationProviderName` | +**Admin** | [AuthenticationProviderRid](docs/v2/Admin/models/AuthenticationProviderRid.md) | `from foundry_sdk.v2.admin.models import AuthenticationProviderRid` | +**Admin** | [CertificateInfo](docs/v2/Admin/models/CertificateInfo.md) | `from foundry_sdk.v2.admin.models import CertificateInfo` | +**Admin** | [CertificateUsageType](docs/v2/Admin/models/CertificateUsageType.md) | `from foundry_sdk.v2.admin.models import CertificateUsageType` | +**Admin** | [CreateGroupRequest](docs/v2/Admin/models/CreateGroupRequest.md) | `from foundry_sdk.v2.admin.models import CreateGroupRequest` | +**Admin** | [CreateMarkingRequest](docs/v2/Admin/models/CreateMarkingRequest.md) | `from foundry_sdk.v2.admin.models import CreateMarkingRequest` | +**Admin** | [CreateOrganizationRequest](docs/v2/Admin/models/CreateOrganizationRequest.md) | `from foundry_sdk.v2.admin.models import CreateOrganizationRequest` | +**Admin** | [Enrollment](docs/v2/Admin/models/Enrollment.md) | `from foundry_sdk.v2.admin.models import Enrollment` | +**Admin** | [EnrollmentName](docs/v2/Admin/models/EnrollmentName.md) | `from foundry_sdk.v2.admin.models import EnrollmentName` | +**Admin** | [EnrollmentRoleAssignment](docs/v2/Admin/models/EnrollmentRoleAssignment.md) | `from foundry_sdk.v2.admin.models import EnrollmentRoleAssignment` | +**Admin** | [GetGroupsBatchRequestElement](docs/v2/Admin/models/GetGroupsBatchRequestElement.md) | `from foundry_sdk.v2.admin.models import GetGroupsBatchRequestElement` | +**Admin** | [GetGroupsBatchResponse](docs/v2/Admin/models/GetGroupsBatchResponse.md) | `from foundry_sdk.v2.admin.models import GetGroupsBatchResponse` | +**Admin** | [GetMarkingsBatchRequestElement](docs/v2/Admin/models/GetMarkingsBatchRequestElement.md) | `from foundry_sdk.v2.admin.models import GetMarkingsBatchRequestElement` | +**Admin** | [GetMarkingsBatchResponse](docs/v2/Admin/models/GetMarkingsBatchResponse.md) | `from foundry_sdk.v2.admin.models import GetMarkingsBatchResponse` | +**Admin** | [GetRolesBatchRequestElement](docs/v2/Admin/models/GetRolesBatchRequestElement.md) | `from foundry_sdk.v2.admin.models import GetRolesBatchRequestElement` | +**Admin** | [GetRolesBatchResponse](docs/v2/Admin/models/GetRolesBatchResponse.md) | `from foundry_sdk.v2.admin.models import GetRolesBatchResponse` | +**Admin** | [GetUserMarkingsResponse](docs/v2/Admin/models/GetUserMarkingsResponse.md) | `from foundry_sdk.v2.admin.models import GetUserMarkingsResponse` | +**Admin** | [GetUsersBatchRequestElement](docs/v2/Admin/models/GetUsersBatchRequestElement.md) | `from foundry_sdk.v2.admin.models import GetUsersBatchRequestElement` | +**Admin** | [GetUsersBatchResponse](docs/v2/Admin/models/GetUsersBatchResponse.md) | `from foundry_sdk.v2.admin.models import GetUsersBatchResponse` | +**Admin** | [Group](docs/v2/Admin/models/Group.md) | `from foundry_sdk.v2.admin.models import Group` | +**Admin** | [GroupMember](docs/v2/Admin/models/GroupMember.md) | `from foundry_sdk.v2.admin.models import GroupMember` | +**Admin** | [GroupMembership](docs/v2/Admin/models/GroupMembership.md) | `from foundry_sdk.v2.admin.models import GroupMembership` | +**Admin** | [GroupMembershipExpiration](docs/v2/Admin/models/GroupMembershipExpiration.md) | `from foundry_sdk.v2.admin.models import GroupMembershipExpiration` | +**Admin** | [GroupMembershipExpirationPolicy](docs/v2/Admin/models/GroupMembershipExpirationPolicy.md) | `from foundry_sdk.v2.admin.models import GroupMembershipExpirationPolicy` | +**Admin** | [GroupName](docs/v2/Admin/models/GroupName.md) | `from foundry_sdk.v2.admin.models import GroupName` | +**Admin** | [GroupProviderInfo](docs/v2/Admin/models/GroupProviderInfo.md) | `from foundry_sdk.v2.admin.models import GroupProviderInfo` | +**Admin** | [GroupSearchFilter](docs/v2/Admin/models/GroupSearchFilter.md) | `from foundry_sdk.v2.admin.models import GroupSearchFilter` | +**Admin** | [Host](docs/v2/Admin/models/Host.md) | `from foundry_sdk.v2.admin.models import Host` | +**Admin** | [HostName](docs/v2/Admin/models/HostName.md) | `from foundry_sdk.v2.admin.models import HostName` | +**Admin** | [ListAuthenticationProvidersResponse](docs/v2/Admin/models/ListAuthenticationProvidersResponse.md) | `from foundry_sdk.v2.admin.models import ListAuthenticationProvidersResponse` | +**Admin** | [ListAvailableOrganizationRolesResponse](docs/v2/Admin/models/ListAvailableOrganizationRolesResponse.md) | `from foundry_sdk.v2.admin.models import ListAvailableOrganizationRolesResponse` | +**Admin** | [ListEnrollmentRoleAssignmentsResponse](docs/v2/Admin/models/ListEnrollmentRoleAssignmentsResponse.md) | `from foundry_sdk.v2.admin.models import ListEnrollmentRoleAssignmentsResponse` | +**Admin** | [ListGroupMembershipsResponse](docs/v2/Admin/models/ListGroupMembershipsResponse.md) | `from foundry_sdk.v2.admin.models import ListGroupMembershipsResponse` | +**Admin** | [ListGroupMembersResponse](docs/v2/Admin/models/ListGroupMembersResponse.md) | `from foundry_sdk.v2.admin.models import ListGroupMembersResponse` | +**Admin** | [ListGroupsResponse](docs/v2/Admin/models/ListGroupsResponse.md) | `from foundry_sdk.v2.admin.models import ListGroupsResponse` | +**Admin** | [ListHostsResponse](docs/v2/Admin/models/ListHostsResponse.md) | `from foundry_sdk.v2.admin.models import ListHostsResponse` | +**Admin** | [ListMarkingCategoriesResponse](docs/v2/Admin/models/ListMarkingCategoriesResponse.md) | `from foundry_sdk.v2.admin.models import ListMarkingCategoriesResponse` | +**Admin** | [ListMarkingMembersResponse](docs/v2/Admin/models/ListMarkingMembersResponse.md) | `from foundry_sdk.v2.admin.models import ListMarkingMembersResponse` | +**Admin** | [ListMarkingRoleAssignmentsResponse](docs/v2/Admin/models/ListMarkingRoleAssignmentsResponse.md) | `from foundry_sdk.v2.admin.models import ListMarkingRoleAssignmentsResponse` | +**Admin** | [ListMarkingsResponse](docs/v2/Admin/models/ListMarkingsResponse.md) | `from foundry_sdk.v2.admin.models import ListMarkingsResponse` | +**Admin** | [ListOrganizationRoleAssignmentsResponse](docs/v2/Admin/models/ListOrganizationRoleAssignmentsResponse.md) | `from foundry_sdk.v2.admin.models import ListOrganizationRoleAssignmentsResponse` | +**Admin** | [ListUsersResponse](docs/v2/Admin/models/ListUsersResponse.md) | `from foundry_sdk.v2.admin.models import ListUsersResponse` | +**Admin** | [Marking](docs/v2/Admin/models/Marking.md) | `from foundry_sdk.v2.admin.models import Marking` | +**Admin** | [MarkingCategory](docs/v2/Admin/models/MarkingCategory.md) | `from foundry_sdk.v2.admin.models import MarkingCategory` | +**Admin** | [MarkingCategoryId](docs/v2/Admin/models/MarkingCategoryId.md) | `from foundry_sdk.v2.admin.models import MarkingCategoryId` | +**Admin** | [MarkingCategoryName](docs/v2/Admin/models/MarkingCategoryName.md) | `from foundry_sdk.v2.admin.models import MarkingCategoryName` | +**Admin** | [MarkingCategoryType](docs/v2/Admin/models/MarkingCategoryType.md) | `from foundry_sdk.v2.admin.models import MarkingCategoryType` | +**Admin** | [MarkingMember](docs/v2/Admin/models/MarkingMember.md) | `from foundry_sdk.v2.admin.models import MarkingMember` | +**Admin** | [MarkingName](docs/v2/Admin/models/MarkingName.md) | `from foundry_sdk.v2.admin.models import MarkingName` | +**Admin** | [MarkingRole](docs/v2/Admin/models/MarkingRole.md) | `from foundry_sdk.v2.admin.models import MarkingRole` | +**Admin** | [MarkingRoleAssignment](docs/v2/Admin/models/MarkingRoleAssignment.md) | `from foundry_sdk.v2.admin.models import MarkingRoleAssignment` | +**Admin** | [MarkingRoleUpdate](docs/v2/Admin/models/MarkingRoleUpdate.md) | `from foundry_sdk.v2.admin.models import MarkingRoleUpdate` | +**Admin** | [MarkingType](docs/v2/Admin/models/MarkingType.md) | `from foundry_sdk.v2.admin.models import MarkingType` | +**Admin** | [OidcAuthenticationProtocol](docs/v2/Admin/models/OidcAuthenticationProtocol.md) | `from foundry_sdk.v2.admin.models import OidcAuthenticationProtocol` | +**Admin** | [Organization](docs/v2/Admin/models/Organization.md) | `from foundry_sdk.v2.admin.models import Organization` | +**Admin** | [OrganizationName](docs/v2/Admin/models/OrganizationName.md) | `from foundry_sdk.v2.admin.models import OrganizationName` | +**Admin** | [OrganizationRoleAssignment](docs/v2/Admin/models/OrganizationRoleAssignment.md) | `from foundry_sdk.v2.admin.models import OrganizationRoleAssignment` | +**Admin** | [PreregisterGroupRequest](docs/v2/Admin/models/PreregisterGroupRequest.md) | `from foundry_sdk.v2.admin.models import PreregisterGroupRequest` | +**Admin** | [PreregisterUserRequest](docs/v2/Admin/models/PreregisterUserRequest.md) | `from foundry_sdk.v2.admin.models import PreregisterUserRequest` | +**Admin** | [PrincipalFilterType](docs/v2/Admin/models/PrincipalFilterType.md) | `from foundry_sdk.v2.admin.models import PrincipalFilterType` | +**Admin** | [ProviderId](docs/v2/Admin/models/ProviderId.md) | `from foundry_sdk.v2.admin.models import ProviderId` | +**Admin** | [RemoveEnrollmentRoleAssignmentsRequest](docs/v2/Admin/models/RemoveEnrollmentRoleAssignmentsRequest.md) | `from foundry_sdk.v2.admin.models import RemoveEnrollmentRoleAssignmentsRequest` | +**Admin** | [RemoveGroupMembersRequest](docs/v2/Admin/models/RemoveGroupMembersRequest.md) | `from foundry_sdk.v2.admin.models import RemoveGroupMembersRequest` | +**Admin** | [RemoveMarkingMembersRequest](docs/v2/Admin/models/RemoveMarkingMembersRequest.md) | `from foundry_sdk.v2.admin.models import RemoveMarkingMembersRequest` | +**Admin** | [RemoveMarkingRoleAssignmentsRequest](docs/v2/Admin/models/RemoveMarkingRoleAssignmentsRequest.md) | `from foundry_sdk.v2.admin.models import RemoveMarkingRoleAssignmentsRequest` | +**Admin** | [RemoveOrganizationRoleAssignmentsRequest](docs/v2/Admin/models/RemoveOrganizationRoleAssignmentsRequest.md) | `from foundry_sdk.v2.admin.models import RemoveOrganizationRoleAssignmentsRequest` | +**Admin** | [ReplaceGroupMembershipExpirationPolicyRequest](docs/v2/Admin/models/ReplaceGroupMembershipExpirationPolicyRequest.md) | `from foundry_sdk.v2.admin.models import ReplaceGroupMembershipExpirationPolicyRequest` | +**Admin** | [ReplaceGroupProviderInfoRequest](docs/v2/Admin/models/ReplaceGroupProviderInfoRequest.md) | `from foundry_sdk.v2.admin.models import ReplaceGroupProviderInfoRequest` | +**Admin** | [ReplaceMarkingRequest](docs/v2/Admin/models/ReplaceMarkingRequest.md) | `from foundry_sdk.v2.admin.models import ReplaceMarkingRequest` | +**Admin** | [ReplaceOrganizationRequest](docs/v2/Admin/models/ReplaceOrganizationRequest.md) | `from foundry_sdk.v2.admin.models import ReplaceOrganizationRequest` | +**Admin** | [ReplaceUserProviderInfoRequest](docs/v2/Admin/models/ReplaceUserProviderInfoRequest.md) | `from foundry_sdk.v2.admin.models import ReplaceUserProviderInfoRequest` | +**Admin** | [Role](docs/v2/Admin/models/Role.md) | `from foundry_sdk.v2.admin.models import Role` | +**Admin** | [RoleDescription](docs/v2/Admin/models/RoleDescription.md) | `from foundry_sdk.v2.admin.models import RoleDescription` | +**Admin** | [RoleDisplayName](docs/v2/Admin/models/RoleDisplayName.md) | `from foundry_sdk.v2.admin.models import RoleDisplayName` | +**Admin** | [SamlAuthenticationProtocol](docs/v2/Admin/models/SamlAuthenticationProtocol.md) | `from foundry_sdk.v2.admin.models import SamlAuthenticationProtocol` | +**Admin** | [SamlServiceProviderMetadata](docs/v2/Admin/models/SamlServiceProviderMetadata.md) | `from foundry_sdk.v2.admin.models import SamlServiceProviderMetadata` | +**Admin** | [SearchGroupsRequest](docs/v2/Admin/models/SearchGroupsRequest.md) | `from foundry_sdk.v2.admin.models import SearchGroupsRequest` | +**Admin** | [SearchGroupsResponse](docs/v2/Admin/models/SearchGroupsResponse.md) | `from foundry_sdk.v2.admin.models import SearchGroupsResponse` | +**Admin** | [SearchUsersRequest](docs/v2/Admin/models/SearchUsersRequest.md) | `from foundry_sdk.v2.admin.models import SearchUsersRequest` | +**Admin** | [SearchUsersResponse](docs/v2/Admin/models/SearchUsersResponse.md) | `from foundry_sdk.v2.admin.models import SearchUsersResponse` | +**Admin** | [User](docs/v2/Admin/models/User.md) | `from foundry_sdk.v2.admin.models import User` | +**Admin** | [UserProviderInfo](docs/v2/Admin/models/UserProviderInfo.md) | `from foundry_sdk.v2.admin.models import UserProviderInfo` | +**Admin** | [UserSearchFilter](docs/v2/Admin/models/UserSearchFilter.md) | `from foundry_sdk.v2.admin.models import UserSearchFilter` | +**Admin** | [UserUsername](docs/v2/Admin/models/UserUsername.md) | `from foundry_sdk.v2.admin.models import UserUsername` | +**AipAgents** | [Agent](docs/v2/AipAgents/models/Agent.md) | `from foundry_sdk.v2.aip_agents.models import Agent` | +**AipAgents** | [AgentMarkdownResponse](docs/v2/AipAgents/models/AgentMarkdownResponse.md) | `from foundry_sdk.v2.aip_agents.models import AgentMarkdownResponse` | +**AipAgents** | [AgentMetadata](docs/v2/AipAgents/models/AgentMetadata.md) | `from foundry_sdk.v2.aip_agents.models import AgentMetadata` | +**AipAgents** | [AgentRid](docs/v2/AipAgents/models/AgentRid.md) | `from foundry_sdk.v2.aip_agents.models import AgentRid` | +**AipAgents** | [AgentSessionRagContextResponse](docs/v2/AipAgents/models/AgentSessionRagContextResponse.md) | `from foundry_sdk.v2.aip_agents.models import AgentSessionRagContextResponse` | +**AipAgents** | [AgentsSessionsPage](docs/v2/AipAgents/models/AgentsSessionsPage.md) | `from foundry_sdk.v2.aip_agents.models import AgentsSessionsPage` | +**AipAgents** | [AgentVersion](docs/v2/AipAgents/models/AgentVersion.md) | `from foundry_sdk.v2.aip_agents.models import AgentVersion` | +**AipAgents** | [AgentVersionDetails](docs/v2/AipAgents/models/AgentVersionDetails.md) | `from foundry_sdk.v2.aip_agents.models import AgentVersionDetails` | +**AipAgents** | [AgentVersionString](docs/v2/AipAgents/models/AgentVersionString.md) | `from foundry_sdk.v2.aip_agents.models import AgentVersionString` | +**AipAgents** | [BlockingContinueSessionRequest](docs/v2/AipAgents/models/BlockingContinueSessionRequest.md) | `from foundry_sdk.v2.aip_agents.models import BlockingContinueSessionRequest` | +**AipAgents** | [CancelSessionRequest](docs/v2/AipAgents/models/CancelSessionRequest.md) | `from foundry_sdk.v2.aip_agents.models import CancelSessionRequest` | +**AipAgents** | [CancelSessionResponse](docs/v2/AipAgents/models/CancelSessionResponse.md) | `from foundry_sdk.v2.aip_agents.models import CancelSessionResponse` | +**AipAgents** | [Content](docs/v2/AipAgents/models/Content.md) | `from foundry_sdk.v2.aip_agents.models import Content` | +**AipAgents** | [CreateSessionRequest](docs/v2/AipAgents/models/CreateSessionRequest.md) | `from foundry_sdk.v2.aip_agents.models import CreateSessionRequest` | +**AipAgents** | [FailureToolCallOutput](docs/v2/AipAgents/models/FailureToolCallOutput.md) | `from foundry_sdk.v2.aip_agents.models import FailureToolCallOutput` | +**AipAgents** | [FunctionRetrievedContext](docs/v2/AipAgents/models/FunctionRetrievedContext.md) | `from foundry_sdk.v2.aip_agents.models import FunctionRetrievedContext` | +**AipAgents** | [GetRagContextForSessionRequest](docs/v2/AipAgents/models/GetRagContextForSessionRequest.md) | `from foundry_sdk.v2.aip_agents.models import GetRagContextForSessionRequest` | +**AipAgents** | [InputContext](docs/v2/AipAgents/models/InputContext.md) | `from foundry_sdk.v2.aip_agents.models import InputContext` | +**AipAgents** | [ListAgentVersionsResponse](docs/v2/AipAgents/models/ListAgentVersionsResponse.md) | `from foundry_sdk.v2.aip_agents.models import ListAgentVersionsResponse` | +**AipAgents** | [ListSessionsResponse](docs/v2/AipAgents/models/ListSessionsResponse.md) | `from foundry_sdk.v2.aip_agents.models import ListSessionsResponse` | +**AipAgents** | [MessageId](docs/v2/AipAgents/models/MessageId.md) | `from foundry_sdk.v2.aip_agents.models import MessageId` | +**AipAgents** | [ObjectContext](docs/v2/AipAgents/models/ObjectContext.md) | `from foundry_sdk.v2.aip_agents.models import ObjectContext` | +**AipAgents** | [ObjectSetParameter](docs/v2/AipAgents/models/ObjectSetParameter.md) | `from foundry_sdk.v2.aip_agents.models import ObjectSetParameter` | +**AipAgents** | [ObjectSetParameterValue](docs/v2/AipAgents/models/ObjectSetParameterValue.md) | `from foundry_sdk.v2.aip_agents.models import ObjectSetParameterValue` | +**AipAgents** | [ObjectSetParameterValueUpdate](docs/v2/AipAgents/models/ObjectSetParameterValueUpdate.md) | `from foundry_sdk.v2.aip_agents.models import ObjectSetParameterValueUpdate` | +**AipAgents** | [Parameter](docs/v2/AipAgents/models/Parameter.md) | `from foundry_sdk.v2.aip_agents.models import Parameter` | +**AipAgents** | [ParameterAccessMode](docs/v2/AipAgents/models/ParameterAccessMode.md) | `from foundry_sdk.v2.aip_agents.models import ParameterAccessMode` | +**AipAgents** | [ParameterId](docs/v2/AipAgents/models/ParameterId.md) | `from foundry_sdk.v2.aip_agents.models import ParameterId` | +**AipAgents** | [ParameterType](docs/v2/AipAgents/models/ParameterType.md) | `from foundry_sdk.v2.aip_agents.models import ParameterType` | +**AipAgents** | [ParameterValue](docs/v2/AipAgents/models/ParameterValue.md) | `from foundry_sdk.v2.aip_agents.models import ParameterValue` | +**AipAgents** | [ParameterValueUpdate](docs/v2/AipAgents/models/ParameterValueUpdate.md) | `from foundry_sdk.v2.aip_agents.models import ParameterValueUpdate` | +**AipAgents** | [RidToolInputValue](docs/v2/AipAgents/models/RidToolInputValue.md) | `from foundry_sdk.v2.aip_agents.models import RidToolInputValue` | +**AipAgents** | [RidToolOutputValue](docs/v2/AipAgents/models/RidToolOutputValue.md) | `from foundry_sdk.v2.aip_agents.models import RidToolOutputValue` | +**AipAgents** | [Session](docs/v2/AipAgents/models/Session.md) | `from foundry_sdk.v2.aip_agents.models import Session` | +**AipAgents** | [SessionExchange](docs/v2/AipAgents/models/SessionExchange.md) | `from foundry_sdk.v2.aip_agents.models import SessionExchange` | +**AipAgents** | [SessionExchangeContexts](docs/v2/AipAgents/models/SessionExchangeContexts.md) | `from foundry_sdk.v2.aip_agents.models import SessionExchangeContexts` | +**AipAgents** | [SessionExchangeResult](docs/v2/AipAgents/models/SessionExchangeResult.md) | `from foundry_sdk.v2.aip_agents.models import SessionExchangeResult` | +**AipAgents** | [SessionMetadata](docs/v2/AipAgents/models/SessionMetadata.md) | `from foundry_sdk.v2.aip_agents.models import SessionMetadata` | +**AipAgents** | [SessionRid](docs/v2/AipAgents/models/SessionRid.md) | `from foundry_sdk.v2.aip_agents.models import SessionRid` | +**AipAgents** | [SessionTrace](docs/v2/AipAgents/models/SessionTrace.md) | `from foundry_sdk.v2.aip_agents.models import SessionTrace` | +**AipAgents** | [SessionTraceId](docs/v2/AipAgents/models/SessionTraceId.md) | `from foundry_sdk.v2.aip_agents.models import SessionTraceId` | +**AipAgents** | [SessionTraceStatus](docs/v2/AipAgents/models/SessionTraceStatus.md) | `from foundry_sdk.v2.aip_agents.models import SessionTraceStatus` | +**AipAgents** | [StreamingContinueSessionRequest](docs/v2/AipAgents/models/StreamingContinueSessionRequest.md) | `from foundry_sdk.v2.aip_agents.models import StreamingContinueSessionRequest` | +**AipAgents** | [StringParameter](docs/v2/AipAgents/models/StringParameter.md) | `from foundry_sdk.v2.aip_agents.models import StringParameter` | +**AipAgents** | [StringParameterValue](docs/v2/AipAgents/models/StringParameterValue.md) | `from foundry_sdk.v2.aip_agents.models import StringParameterValue` | +**AipAgents** | [StringToolInputValue](docs/v2/AipAgents/models/StringToolInputValue.md) | `from foundry_sdk.v2.aip_agents.models import StringToolInputValue` | +**AipAgents** | [StringToolOutputValue](docs/v2/AipAgents/models/StringToolOutputValue.md) | `from foundry_sdk.v2.aip_agents.models import StringToolOutputValue` | +**AipAgents** | [SuccessToolCallOutput](docs/v2/AipAgents/models/SuccessToolCallOutput.md) | `from foundry_sdk.v2.aip_agents.models import SuccessToolCallOutput` | +**AipAgents** | [ToolCall](docs/v2/AipAgents/models/ToolCall.md) | `from foundry_sdk.v2.aip_agents.models import ToolCall` | +**AipAgents** | [ToolCallGroup](docs/v2/AipAgents/models/ToolCallGroup.md) | `from foundry_sdk.v2.aip_agents.models import ToolCallGroup` | +**AipAgents** | [ToolCallInput](docs/v2/AipAgents/models/ToolCallInput.md) | `from foundry_sdk.v2.aip_agents.models import ToolCallInput` | +**AipAgents** | [ToolCallOutput](docs/v2/AipAgents/models/ToolCallOutput.md) | `from foundry_sdk.v2.aip_agents.models import ToolCallOutput` | +**AipAgents** | [ToolInputName](docs/v2/AipAgents/models/ToolInputName.md) | `from foundry_sdk.v2.aip_agents.models import ToolInputName` | +**AipAgents** | [ToolInputValue](docs/v2/AipAgents/models/ToolInputValue.md) | `from foundry_sdk.v2.aip_agents.models import ToolInputValue` | +**AipAgents** | [ToolMetadata](docs/v2/AipAgents/models/ToolMetadata.md) | `from foundry_sdk.v2.aip_agents.models import ToolMetadata` | +**AipAgents** | [ToolOutputValue](docs/v2/AipAgents/models/ToolOutputValue.md) | `from foundry_sdk.v2.aip_agents.models import ToolOutputValue` | +**AipAgents** | [ToolType](docs/v2/AipAgents/models/ToolType.md) | `from foundry_sdk.v2.aip_agents.models import ToolType` | +**AipAgents** | [UpdateSessionTitleRequest](docs/v2/AipAgents/models/UpdateSessionTitleRequest.md) | `from foundry_sdk.v2.aip_agents.models import UpdateSessionTitleRequest` | +**AipAgents** | [UserTextInput](docs/v2/AipAgents/models/UserTextInput.md) | `from foundry_sdk.v2.aip_agents.models import UserTextInput` | +**Audit** | [FileId](docs/v2/Audit/models/FileId.md) | `from foundry_sdk.v2.audit.models import FileId` | +**Audit** | [ListLogFilesResponse](docs/v2/Audit/models/ListLogFilesResponse.md) | `from foundry_sdk.v2.audit.models import ListLogFilesResponse` | +**Audit** | [LogFile](docs/v2/Audit/models/LogFile.md) | `from foundry_sdk.v2.audit.models import LogFile` | +**Connectivity** | [ApiKeyAuthentication](docs/v2/Connectivity/models/ApiKeyAuthentication.md) | `from foundry_sdk.v2.connectivity.models import ApiKeyAuthentication` | +**Connectivity** | [AsPlaintextValue](docs/v2/Connectivity/models/AsPlaintextValue.md) | `from foundry_sdk.v2.connectivity.models import AsPlaintextValue` | +**Connectivity** | [AsSecretName](docs/v2/Connectivity/models/AsSecretName.md) | `from foundry_sdk.v2.connectivity.models import AsSecretName` | +**Connectivity** | [AwsAccessKey](docs/v2/Connectivity/models/AwsAccessKey.md) | `from foundry_sdk.v2.connectivity.models import AwsAccessKey` | +**Connectivity** | [AwsOidcAuthentication](docs/v2/Connectivity/models/AwsOidcAuthentication.md) | `from foundry_sdk.v2.connectivity.models import AwsOidcAuthentication` | +**Connectivity** | [BasicCredentials](docs/v2/Connectivity/models/BasicCredentials.md) | `from foundry_sdk.v2.connectivity.models import BasicCredentials` | +**Connectivity** | [BearerToken](docs/v2/Connectivity/models/BearerToken.md) | `from foundry_sdk.v2.connectivity.models import BearerToken` | +**Connectivity** | [BigQueryVirtualTableConfig](docs/v2/Connectivity/models/BigQueryVirtualTableConfig.md) | `from foundry_sdk.v2.connectivity.models import BigQueryVirtualTableConfig` | +**Connectivity** | [CloudIdentity](docs/v2/Connectivity/models/CloudIdentity.md) | `from foundry_sdk.v2.connectivity.models import CloudIdentity` | +**Connectivity** | [CloudIdentityRid](docs/v2/Connectivity/models/CloudIdentityRid.md) | `from foundry_sdk.v2.connectivity.models import CloudIdentityRid` | +**Connectivity** | [Connection](docs/v2/Connectivity/models/Connection.md) | `from foundry_sdk.v2.connectivity.models import Connection` | +**Connectivity** | [ConnectionConfiguration](docs/v2/Connectivity/models/ConnectionConfiguration.md) | `from foundry_sdk.v2.connectivity.models import ConnectionConfiguration` | +**Connectivity** | [ConnectionDisplayName](docs/v2/Connectivity/models/ConnectionDisplayName.md) | `from foundry_sdk.v2.connectivity.models import ConnectionDisplayName` | +**Connectivity** | [ConnectionExportSettings](docs/v2/Connectivity/models/ConnectionExportSettings.md) | `from foundry_sdk.v2.connectivity.models import ConnectionExportSettings` | +**Connectivity** | [ConnectionRid](docs/v2/Connectivity/models/ConnectionRid.md) | `from foundry_sdk.v2.connectivity.models import ConnectionRid` | +**Connectivity** | [ConnectionWorker](docs/v2/Connectivity/models/ConnectionWorker.md) | `from foundry_sdk.v2.connectivity.models import ConnectionWorker` | +**Connectivity** | [CreateConnectionRequest](docs/v2/Connectivity/models/CreateConnectionRequest.md) | `from foundry_sdk.v2.connectivity.models import CreateConnectionRequest` | +**Connectivity** | [CreateConnectionRequestAsPlaintextValue](docs/v2/Connectivity/models/CreateConnectionRequestAsPlaintextValue.md) | `from foundry_sdk.v2.connectivity.models import CreateConnectionRequestAsPlaintextValue` | +**Connectivity** | [CreateConnectionRequestAsSecretName](docs/v2/Connectivity/models/CreateConnectionRequestAsSecretName.md) | `from foundry_sdk.v2.connectivity.models import CreateConnectionRequestAsSecretName` | +**Connectivity** | [CreateConnectionRequestBasicCredentials](docs/v2/Connectivity/models/CreateConnectionRequestBasicCredentials.md) | `from foundry_sdk.v2.connectivity.models import CreateConnectionRequestBasicCredentials` | +**Connectivity** | [CreateConnectionRequestConnectionConfiguration](docs/v2/Connectivity/models/CreateConnectionRequestConnectionConfiguration.md) | `from foundry_sdk.v2.connectivity.models import CreateConnectionRequestConnectionConfiguration` | +**Connectivity** | [CreateConnectionRequestConnectionWorker](docs/v2/Connectivity/models/CreateConnectionRequestConnectionWorker.md) | `from foundry_sdk.v2.connectivity.models import CreateConnectionRequestConnectionWorker` | +**Connectivity** | [CreateConnectionRequestDatabricksAuthenticationMode](docs/v2/Connectivity/models/CreateConnectionRequestDatabricksAuthenticationMode.md) | `from foundry_sdk.v2.connectivity.models import CreateConnectionRequestDatabricksAuthenticationMode` | +**Connectivity** | [CreateConnectionRequestDatabricksConnectionConfiguration](docs/v2/Connectivity/models/CreateConnectionRequestDatabricksConnectionConfiguration.md) | `from foundry_sdk.v2.connectivity.models import CreateConnectionRequestDatabricksConnectionConfiguration` | +**Connectivity** | [CreateConnectionRequestEncryptedProperty](docs/v2/Connectivity/models/CreateConnectionRequestEncryptedProperty.md) | `from foundry_sdk.v2.connectivity.models import CreateConnectionRequestEncryptedProperty` | +**Connectivity** | [CreateConnectionRequestFoundryWorker](docs/v2/Connectivity/models/CreateConnectionRequestFoundryWorker.md) | `from foundry_sdk.v2.connectivity.models import CreateConnectionRequestFoundryWorker` | +**Connectivity** | [CreateConnectionRequestJdbcConnectionConfiguration](docs/v2/Connectivity/models/CreateConnectionRequestJdbcConnectionConfiguration.md) | `from foundry_sdk.v2.connectivity.models import CreateConnectionRequestJdbcConnectionConfiguration` | +**Connectivity** | [CreateConnectionRequestOauthMachineToMachineAuth](docs/v2/Connectivity/models/CreateConnectionRequestOauthMachineToMachineAuth.md) | `from foundry_sdk.v2.connectivity.models import CreateConnectionRequestOauthMachineToMachineAuth` | +**Connectivity** | [CreateConnectionRequestPersonalAccessToken](docs/v2/Connectivity/models/CreateConnectionRequestPersonalAccessToken.md) | `from foundry_sdk.v2.connectivity.models import CreateConnectionRequestPersonalAccessToken` | +**Connectivity** | [CreateConnectionRequestRestConnectionConfiguration](docs/v2/Connectivity/models/CreateConnectionRequestRestConnectionConfiguration.md) | `from foundry_sdk.v2.connectivity.models import CreateConnectionRequestRestConnectionConfiguration` | +**Connectivity** | [CreateConnectionRequestS3ConnectionConfiguration](docs/v2/Connectivity/models/CreateConnectionRequestS3ConnectionConfiguration.md) | `from foundry_sdk.v2.connectivity.models import CreateConnectionRequestS3ConnectionConfiguration` | +**Connectivity** | [CreateConnectionRequestSmbAuth](docs/v2/Connectivity/models/CreateConnectionRequestSmbAuth.md) | `from foundry_sdk.v2.connectivity.models import CreateConnectionRequestSmbAuth` | +**Connectivity** | [CreateConnectionRequestSmbConnectionConfiguration](docs/v2/Connectivity/models/CreateConnectionRequestSmbConnectionConfiguration.md) | `from foundry_sdk.v2.connectivity.models import CreateConnectionRequestSmbConnectionConfiguration` | +**Connectivity** | [CreateConnectionRequestSmbUsernamePasswordAuth](docs/v2/Connectivity/models/CreateConnectionRequestSmbUsernamePasswordAuth.md) | `from foundry_sdk.v2.connectivity.models import CreateConnectionRequestSmbUsernamePasswordAuth` | +**Connectivity** | [CreateConnectionRequestSnowflakeAuthenticationMode](docs/v2/Connectivity/models/CreateConnectionRequestSnowflakeAuthenticationMode.md) | `from foundry_sdk.v2.connectivity.models import CreateConnectionRequestSnowflakeAuthenticationMode` | +**Connectivity** | [CreateConnectionRequestSnowflakeConnectionConfiguration](docs/v2/Connectivity/models/CreateConnectionRequestSnowflakeConnectionConfiguration.md) | `from foundry_sdk.v2.connectivity.models import CreateConnectionRequestSnowflakeConnectionConfiguration` | +**Connectivity** | [CreateConnectionRequestSnowflakeExternalOauth](docs/v2/Connectivity/models/CreateConnectionRequestSnowflakeExternalOauth.md) | `from foundry_sdk.v2.connectivity.models import CreateConnectionRequestSnowflakeExternalOauth` | +**Connectivity** | [CreateConnectionRequestSnowflakeKeyPairAuthentication](docs/v2/Connectivity/models/CreateConnectionRequestSnowflakeKeyPairAuthentication.md) | `from foundry_sdk.v2.connectivity.models import CreateConnectionRequestSnowflakeKeyPairAuthentication` | +**Connectivity** | [CreateConnectionRequestUnknownWorker](docs/v2/Connectivity/models/CreateConnectionRequestUnknownWorker.md) | `from foundry_sdk.v2.connectivity.models import CreateConnectionRequestUnknownWorker` | +**Connectivity** | [CreateConnectionRequestWorkflowIdentityFederation](docs/v2/Connectivity/models/CreateConnectionRequestWorkflowIdentityFederation.md) | `from foundry_sdk.v2.connectivity.models import CreateConnectionRequestWorkflowIdentityFederation` | +**Connectivity** | [CreateFileImportRequest](docs/v2/Connectivity/models/CreateFileImportRequest.md) | `from foundry_sdk.v2.connectivity.models import CreateFileImportRequest` | +**Connectivity** | [CreateTableImportRequest](docs/v2/Connectivity/models/CreateTableImportRequest.md) | `from foundry_sdk.v2.connectivity.models import CreateTableImportRequest` | +**Connectivity** | [CreateTableImportRequestDatabricksTableImportConfig](docs/v2/Connectivity/models/CreateTableImportRequestDatabricksTableImportConfig.md) | `from foundry_sdk.v2.connectivity.models import CreateTableImportRequestDatabricksTableImportConfig` | +**Connectivity** | [CreateTableImportRequestJdbcTableImportConfig](docs/v2/Connectivity/models/CreateTableImportRequestJdbcTableImportConfig.md) | `from foundry_sdk.v2.connectivity.models import CreateTableImportRequestJdbcTableImportConfig` | +**Connectivity** | [CreateTableImportRequestMicrosoftAccessTableImportConfig](docs/v2/Connectivity/models/CreateTableImportRequestMicrosoftAccessTableImportConfig.md) | `from foundry_sdk.v2.connectivity.models import CreateTableImportRequestMicrosoftAccessTableImportConfig` | +**Connectivity** | [CreateTableImportRequestMicrosoftSqlServerTableImportConfig](docs/v2/Connectivity/models/CreateTableImportRequestMicrosoftSqlServerTableImportConfig.md) | `from foundry_sdk.v2.connectivity.models import CreateTableImportRequestMicrosoftSqlServerTableImportConfig` | +**Connectivity** | [CreateTableImportRequestOracleTableImportConfig](docs/v2/Connectivity/models/CreateTableImportRequestOracleTableImportConfig.md) | `from foundry_sdk.v2.connectivity.models import CreateTableImportRequestOracleTableImportConfig` | +**Connectivity** | [CreateTableImportRequestPostgreSqlTableImportConfig](docs/v2/Connectivity/models/CreateTableImportRequestPostgreSqlTableImportConfig.md) | `from foundry_sdk.v2.connectivity.models import CreateTableImportRequestPostgreSqlTableImportConfig` | +**Connectivity** | [CreateTableImportRequestSnowflakeTableImportConfig](docs/v2/Connectivity/models/CreateTableImportRequestSnowflakeTableImportConfig.md) | `from foundry_sdk.v2.connectivity.models import CreateTableImportRequestSnowflakeTableImportConfig` | +**Connectivity** | [CreateTableImportRequestTableImportConfig](docs/v2/Connectivity/models/CreateTableImportRequestTableImportConfig.md) | `from foundry_sdk.v2.connectivity.models import CreateTableImportRequestTableImportConfig` | +**Connectivity** | [CreateVirtualTableRequest](docs/v2/Connectivity/models/CreateVirtualTableRequest.md) | `from foundry_sdk.v2.connectivity.models import CreateVirtualTableRequest` | +**Connectivity** | [DatabricksAuthenticationMode](docs/v2/Connectivity/models/DatabricksAuthenticationMode.md) | `from foundry_sdk.v2.connectivity.models import DatabricksAuthenticationMode` | +**Connectivity** | [DatabricksConnectionConfiguration](docs/v2/Connectivity/models/DatabricksConnectionConfiguration.md) | `from foundry_sdk.v2.connectivity.models import DatabricksConnectionConfiguration` | +**Connectivity** | [DatabricksTableImportConfig](docs/v2/Connectivity/models/DatabricksTableImportConfig.md) | `from foundry_sdk.v2.connectivity.models import DatabricksTableImportConfig` | +**Connectivity** | [DateColumnInitialIncrementalState](docs/v2/Connectivity/models/DateColumnInitialIncrementalState.md) | `from foundry_sdk.v2.connectivity.models import DateColumnInitialIncrementalState` | +**Connectivity** | [DecimalColumnInitialIncrementalState](docs/v2/Connectivity/models/DecimalColumnInitialIncrementalState.md) | `from foundry_sdk.v2.connectivity.models import DecimalColumnInitialIncrementalState` | +**Connectivity** | [DeltaVirtualTableConfig](docs/v2/Connectivity/models/DeltaVirtualTableConfig.md) | `from foundry_sdk.v2.connectivity.models import DeltaVirtualTableConfig` | +**Connectivity** | [Domain](docs/v2/Connectivity/models/Domain.md) | `from foundry_sdk.v2.connectivity.models import Domain` | +**Connectivity** | [EncryptedProperty](docs/v2/Connectivity/models/EncryptedProperty.md) | `from foundry_sdk.v2.connectivity.models import EncryptedProperty` | +**Connectivity** | [FileAnyPathMatchesFilter](docs/v2/Connectivity/models/FileAnyPathMatchesFilter.md) | `from foundry_sdk.v2.connectivity.models import FileAnyPathMatchesFilter` | +**Connectivity** | [FileAtLeastCountFilter](docs/v2/Connectivity/models/FileAtLeastCountFilter.md) | `from foundry_sdk.v2.connectivity.models import FileAtLeastCountFilter` | +**Connectivity** | [FileChangedSinceLastUploadFilter](docs/v2/Connectivity/models/FileChangedSinceLastUploadFilter.md) | `from foundry_sdk.v2.connectivity.models import FileChangedSinceLastUploadFilter` | +**Connectivity** | [FileFormat](docs/v2/Connectivity/models/FileFormat.md) | `from foundry_sdk.v2.connectivity.models import FileFormat` | +**Connectivity** | [FileImport](docs/v2/Connectivity/models/FileImport.md) | `from foundry_sdk.v2.connectivity.models import FileImport` | +**Connectivity** | [FileImportCustomFilter](docs/v2/Connectivity/models/FileImportCustomFilter.md) | `from foundry_sdk.v2.connectivity.models import FileImportCustomFilter` | +**Connectivity** | [FileImportDisplayName](docs/v2/Connectivity/models/FileImportDisplayName.md) | `from foundry_sdk.v2.connectivity.models import FileImportDisplayName` | +**Connectivity** | [FileImportFilter](docs/v2/Connectivity/models/FileImportFilter.md) | `from foundry_sdk.v2.connectivity.models import FileImportFilter` | +**Connectivity** | [FileImportMode](docs/v2/Connectivity/models/FileImportMode.md) | `from foundry_sdk.v2.connectivity.models import FileImportMode` | +**Connectivity** | [FileImportRid](docs/v2/Connectivity/models/FileImportRid.md) | `from foundry_sdk.v2.connectivity.models import FileImportRid` | +**Connectivity** | [FileLastModifiedAfterFilter](docs/v2/Connectivity/models/FileLastModifiedAfterFilter.md) | `from foundry_sdk.v2.connectivity.models import FileLastModifiedAfterFilter` | +**Connectivity** | [FilePathMatchesFilter](docs/v2/Connectivity/models/FilePathMatchesFilter.md) | `from foundry_sdk.v2.connectivity.models import FilePathMatchesFilter` | +**Connectivity** | [FilePathNotMatchesFilter](docs/v2/Connectivity/models/FilePathNotMatchesFilter.md) | `from foundry_sdk.v2.connectivity.models import FilePathNotMatchesFilter` | +**Connectivity** | [FileProperty](docs/v2/Connectivity/models/FileProperty.md) | `from foundry_sdk.v2.connectivity.models import FileProperty` | +**Connectivity** | [FilesCountLimitFilter](docs/v2/Connectivity/models/FilesCountLimitFilter.md) | `from foundry_sdk.v2.connectivity.models import FilesCountLimitFilter` | +**Connectivity** | [FileSizeFilter](docs/v2/Connectivity/models/FileSizeFilter.md) | `from foundry_sdk.v2.connectivity.models import FileSizeFilter` | +**Connectivity** | [FilesVirtualTableConfig](docs/v2/Connectivity/models/FilesVirtualTableConfig.md) | `from foundry_sdk.v2.connectivity.models import FilesVirtualTableConfig` | +**Connectivity** | [FoundryWorker](docs/v2/Connectivity/models/FoundryWorker.md) | `from foundry_sdk.v2.connectivity.models import FoundryWorker` | +**Connectivity** | [GetConfigurationConnectionsBatchRequestElement](docs/v2/Connectivity/models/GetConfigurationConnectionsBatchRequestElement.md) | `from foundry_sdk.v2.connectivity.models import GetConfigurationConnectionsBatchRequestElement` | +**Connectivity** | [GetConfigurationConnectionsBatchResponse](docs/v2/Connectivity/models/GetConfigurationConnectionsBatchResponse.md) | `from foundry_sdk.v2.connectivity.models import GetConfigurationConnectionsBatchResponse` | +**Connectivity** | [GlueVirtualTableConfig](docs/v2/Connectivity/models/GlueVirtualTableConfig.md) | `from foundry_sdk.v2.connectivity.models import GlueVirtualTableConfig` | +**Connectivity** | [HeaderApiKey](docs/v2/Connectivity/models/HeaderApiKey.md) | `from foundry_sdk.v2.connectivity.models import HeaderApiKey` | +**Connectivity** | [IcebergVirtualTableConfig](docs/v2/Connectivity/models/IcebergVirtualTableConfig.md) | `from foundry_sdk.v2.connectivity.models import IcebergVirtualTableConfig` | +**Connectivity** | [IntegerColumnInitialIncrementalState](docs/v2/Connectivity/models/IntegerColumnInitialIncrementalState.md) | `from foundry_sdk.v2.connectivity.models import IntegerColumnInitialIncrementalState` | +**Connectivity** | [InvalidConnectionReason](docs/v2/Connectivity/models/InvalidConnectionReason.md) | `from foundry_sdk.v2.connectivity.models import InvalidConnectionReason` | +**Connectivity** | [JdbcConnectionConfiguration](docs/v2/Connectivity/models/JdbcConnectionConfiguration.md) | `from foundry_sdk.v2.connectivity.models import JdbcConnectionConfiguration` | +**Connectivity** | [JdbcDriverArtifactName](docs/v2/Connectivity/models/JdbcDriverArtifactName.md) | `from foundry_sdk.v2.connectivity.models import JdbcDriverArtifactName` | +**Connectivity** | [JdbcProperties](docs/v2/Connectivity/models/JdbcProperties.md) | `from foundry_sdk.v2.connectivity.models import JdbcProperties` | +**Connectivity** | [JdbcTableImportConfig](docs/v2/Connectivity/models/JdbcTableImportConfig.md) | `from foundry_sdk.v2.connectivity.models import JdbcTableImportConfig` | +**Connectivity** | [ListFileImportsResponse](docs/v2/Connectivity/models/ListFileImportsResponse.md) | `from foundry_sdk.v2.connectivity.models import ListFileImportsResponse` | +**Connectivity** | [ListTableImportsResponse](docs/v2/Connectivity/models/ListTableImportsResponse.md) | `from foundry_sdk.v2.connectivity.models import ListTableImportsResponse` | +**Connectivity** | [LongColumnInitialIncrementalState](docs/v2/Connectivity/models/LongColumnInitialIncrementalState.md) | `from foundry_sdk.v2.connectivity.models import LongColumnInitialIncrementalState` | +**Connectivity** | [MicrosoftAccessTableImportConfig](docs/v2/Connectivity/models/MicrosoftAccessTableImportConfig.md) | `from foundry_sdk.v2.connectivity.models import MicrosoftAccessTableImportConfig` | +**Connectivity** | [MicrosoftSqlServerTableImportConfig](docs/v2/Connectivity/models/MicrosoftSqlServerTableImportConfig.md) | `from foundry_sdk.v2.connectivity.models import MicrosoftSqlServerTableImportConfig` | +**Connectivity** | [NetworkEgressPolicyRid](docs/v2/Connectivity/models/NetworkEgressPolicyRid.md) | `from foundry_sdk.v2.connectivity.models import NetworkEgressPolicyRid` | +**Connectivity** | [OauthMachineToMachineAuth](docs/v2/Connectivity/models/OauthMachineToMachineAuth.md) | `from foundry_sdk.v2.connectivity.models import OauthMachineToMachineAuth` | +**Connectivity** | [OracleTableImportConfig](docs/v2/Connectivity/models/OracleTableImportConfig.md) | `from foundry_sdk.v2.connectivity.models import OracleTableImportConfig` | +**Connectivity** | [PersonalAccessToken](docs/v2/Connectivity/models/PersonalAccessToken.md) | `from foundry_sdk.v2.connectivity.models import PersonalAccessToken` | +**Connectivity** | [PlaintextValue](docs/v2/Connectivity/models/PlaintextValue.md) | `from foundry_sdk.v2.connectivity.models import PlaintextValue` | +**Connectivity** | [PostgreSqlTableImportConfig](docs/v2/Connectivity/models/PostgreSqlTableImportConfig.md) | `from foundry_sdk.v2.connectivity.models import PostgreSqlTableImportConfig` | +**Connectivity** | [Protocol](docs/v2/Connectivity/models/Protocol.md) | `from foundry_sdk.v2.connectivity.models import Protocol` | +**Connectivity** | [QueryParameterApiKey](docs/v2/Connectivity/models/QueryParameterApiKey.md) | `from foundry_sdk.v2.connectivity.models import QueryParameterApiKey` | +**Connectivity** | [Region](docs/v2/Connectivity/models/Region.md) | `from foundry_sdk.v2.connectivity.models import Region` | +**Connectivity** | [ReplaceFileImportRequest](docs/v2/Connectivity/models/ReplaceFileImportRequest.md) | `from foundry_sdk.v2.connectivity.models import ReplaceFileImportRequest` | +**Connectivity** | [ReplaceTableImportRequest](docs/v2/Connectivity/models/ReplaceTableImportRequest.md) | `from foundry_sdk.v2.connectivity.models import ReplaceTableImportRequest` | +**Connectivity** | [ReplaceTableImportRequestDatabricksTableImportConfig](docs/v2/Connectivity/models/ReplaceTableImportRequestDatabricksTableImportConfig.md) | `from foundry_sdk.v2.connectivity.models import ReplaceTableImportRequestDatabricksTableImportConfig` | +**Connectivity** | [ReplaceTableImportRequestJdbcTableImportConfig](docs/v2/Connectivity/models/ReplaceTableImportRequestJdbcTableImportConfig.md) | `from foundry_sdk.v2.connectivity.models import ReplaceTableImportRequestJdbcTableImportConfig` | +**Connectivity** | [ReplaceTableImportRequestMicrosoftAccessTableImportConfig](docs/v2/Connectivity/models/ReplaceTableImportRequestMicrosoftAccessTableImportConfig.md) | `from foundry_sdk.v2.connectivity.models import ReplaceTableImportRequestMicrosoftAccessTableImportConfig` | +**Connectivity** | [ReplaceTableImportRequestMicrosoftSqlServerTableImportConfig](docs/v2/Connectivity/models/ReplaceTableImportRequestMicrosoftSqlServerTableImportConfig.md) | `from foundry_sdk.v2.connectivity.models import ReplaceTableImportRequestMicrosoftSqlServerTableImportConfig` | +**Connectivity** | [ReplaceTableImportRequestOracleTableImportConfig](docs/v2/Connectivity/models/ReplaceTableImportRequestOracleTableImportConfig.md) | `from foundry_sdk.v2.connectivity.models import ReplaceTableImportRequestOracleTableImportConfig` | +**Connectivity** | [ReplaceTableImportRequestPostgreSqlTableImportConfig](docs/v2/Connectivity/models/ReplaceTableImportRequestPostgreSqlTableImportConfig.md) | `from foundry_sdk.v2.connectivity.models import ReplaceTableImportRequestPostgreSqlTableImportConfig` | +**Connectivity** | [ReplaceTableImportRequestSnowflakeTableImportConfig](docs/v2/Connectivity/models/ReplaceTableImportRequestSnowflakeTableImportConfig.md) | `from foundry_sdk.v2.connectivity.models import ReplaceTableImportRequestSnowflakeTableImportConfig` | +**Connectivity** | [ReplaceTableImportRequestTableImportConfig](docs/v2/Connectivity/models/ReplaceTableImportRequestTableImportConfig.md) | `from foundry_sdk.v2.connectivity.models import ReplaceTableImportRequestTableImportConfig` | +**Connectivity** | [RestAuthenticationMode](docs/v2/Connectivity/models/RestAuthenticationMode.md) | `from foundry_sdk.v2.connectivity.models import RestAuthenticationMode` | +**Connectivity** | [RestConnectionAdditionalSecrets](docs/v2/Connectivity/models/RestConnectionAdditionalSecrets.md) | `from foundry_sdk.v2.connectivity.models import RestConnectionAdditionalSecrets` | +**Connectivity** | [RestConnectionConfiguration](docs/v2/Connectivity/models/RestConnectionConfiguration.md) | `from foundry_sdk.v2.connectivity.models import RestConnectionConfiguration` | +**Connectivity** | [RestConnectionOAuth2](docs/v2/Connectivity/models/RestConnectionOAuth2.md) | `from foundry_sdk.v2.connectivity.models import RestConnectionOAuth2` | +**Connectivity** | [RestRequestApiKeyLocation](docs/v2/Connectivity/models/RestRequestApiKeyLocation.md) | `from foundry_sdk.v2.connectivity.models import RestRequestApiKeyLocation` | +**Connectivity** | [S3AuthenticationMode](docs/v2/Connectivity/models/S3AuthenticationMode.md) | `from foundry_sdk.v2.connectivity.models import S3AuthenticationMode` | +**Connectivity** | [S3ConnectionConfiguration](docs/v2/Connectivity/models/S3ConnectionConfiguration.md) | `from foundry_sdk.v2.connectivity.models import S3ConnectionConfiguration` | +**Connectivity** | [S3KmsConfiguration](docs/v2/Connectivity/models/S3KmsConfiguration.md) | `from foundry_sdk.v2.connectivity.models import S3KmsConfiguration` | +**Connectivity** | [S3ProxyConfiguration](docs/v2/Connectivity/models/S3ProxyConfiguration.md) | `from foundry_sdk.v2.connectivity.models import S3ProxyConfiguration` | +**Connectivity** | [SecretName](docs/v2/Connectivity/models/SecretName.md) | `from foundry_sdk.v2.connectivity.models import SecretName` | +**Connectivity** | [SecretsNames](docs/v2/Connectivity/models/SecretsNames.md) | `from foundry_sdk.v2.connectivity.models import SecretsNames` | +**Connectivity** | [SecretsWithPlaintextValues](docs/v2/Connectivity/models/SecretsWithPlaintextValues.md) | `from foundry_sdk.v2.connectivity.models import SecretsWithPlaintextValues` | +**Connectivity** | [SmbAuth](docs/v2/Connectivity/models/SmbAuth.md) | `from foundry_sdk.v2.connectivity.models import SmbAuth` | +**Connectivity** | [SmbConnectionConfiguration](docs/v2/Connectivity/models/SmbConnectionConfiguration.md) | `from foundry_sdk.v2.connectivity.models import SmbConnectionConfiguration` | +**Connectivity** | [SmbProxyConfiguration](docs/v2/Connectivity/models/SmbProxyConfiguration.md) | `from foundry_sdk.v2.connectivity.models import SmbProxyConfiguration` | +**Connectivity** | [SmbProxyType](docs/v2/Connectivity/models/SmbProxyType.md) | `from foundry_sdk.v2.connectivity.models import SmbProxyType` | +**Connectivity** | [SmbUsernamePasswordAuth](docs/v2/Connectivity/models/SmbUsernamePasswordAuth.md) | `from foundry_sdk.v2.connectivity.models import SmbUsernamePasswordAuth` | +**Connectivity** | [SnowflakeAuthenticationMode](docs/v2/Connectivity/models/SnowflakeAuthenticationMode.md) | `from foundry_sdk.v2.connectivity.models import SnowflakeAuthenticationMode` | +**Connectivity** | [SnowflakeConnectionConfiguration](docs/v2/Connectivity/models/SnowflakeConnectionConfiguration.md) | `from foundry_sdk.v2.connectivity.models import SnowflakeConnectionConfiguration` | +**Connectivity** | [SnowflakeExternalOauth](docs/v2/Connectivity/models/SnowflakeExternalOauth.md) | `from foundry_sdk.v2.connectivity.models import SnowflakeExternalOauth` | +**Connectivity** | [SnowflakeKeyPairAuthentication](docs/v2/Connectivity/models/SnowflakeKeyPairAuthentication.md) | `from foundry_sdk.v2.connectivity.models import SnowflakeKeyPairAuthentication` | +**Connectivity** | [SnowflakeTableImportConfig](docs/v2/Connectivity/models/SnowflakeTableImportConfig.md) | `from foundry_sdk.v2.connectivity.models import SnowflakeTableImportConfig` | +**Connectivity** | [SnowflakeVirtualTableConfig](docs/v2/Connectivity/models/SnowflakeVirtualTableConfig.md) | `from foundry_sdk.v2.connectivity.models import SnowflakeVirtualTableConfig` | +**Connectivity** | [StringColumnInitialIncrementalState](docs/v2/Connectivity/models/StringColumnInitialIncrementalState.md) | `from foundry_sdk.v2.connectivity.models import StringColumnInitialIncrementalState` | +**Connectivity** | [StsRoleConfiguration](docs/v2/Connectivity/models/StsRoleConfiguration.md) | `from foundry_sdk.v2.connectivity.models import StsRoleConfiguration` | +**Connectivity** | [TableImport](docs/v2/Connectivity/models/TableImport.md) | `from foundry_sdk.v2.connectivity.models import TableImport` | +**Connectivity** | [TableImportAllowSchemaChanges](docs/v2/Connectivity/models/TableImportAllowSchemaChanges.md) | `from foundry_sdk.v2.connectivity.models import TableImportAllowSchemaChanges` | +**Connectivity** | [TableImportConfig](docs/v2/Connectivity/models/TableImportConfig.md) | `from foundry_sdk.v2.connectivity.models import TableImportConfig` | +**Connectivity** | [TableImportDisplayName](docs/v2/Connectivity/models/TableImportDisplayName.md) | `from foundry_sdk.v2.connectivity.models import TableImportDisplayName` | +**Connectivity** | [TableImportInitialIncrementalState](docs/v2/Connectivity/models/TableImportInitialIncrementalState.md) | `from foundry_sdk.v2.connectivity.models import TableImportInitialIncrementalState` | +**Connectivity** | [TableImportMode](docs/v2/Connectivity/models/TableImportMode.md) | `from foundry_sdk.v2.connectivity.models import TableImportMode` | +**Connectivity** | [TableImportQuery](docs/v2/Connectivity/models/TableImportQuery.md) | `from foundry_sdk.v2.connectivity.models import TableImportQuery` | +**Connectivity** | [TableImportRid](docs/v2/Connectivity/models/TableImportRid.md) | `from foundry_sdk.v2.connectivity.models import TableImportRid` | +**Connectivity** | [TableName](docs/v2/Connectivity/models/TableName.md) | `from foundry_sdk.v2.connectivity.models import TableName` | +**Connectivity** | [TableRid](docs/v2/Connectivity/models/TableRid.md) | `from foundry_sdk.v2.connectivity.models import TableRid` | +**Connectivity** | [TimestampColumnInitialIncrementalState](docs/v2/Connectivity/models/TimestampColumnInitialIncrementalState.md) | `from foundry_sdk.v2.connectivity.models import TimestampColumnInitialIncrementalState` | +**Connectivity** | [UnityVirtualTableConfig](docs/v2/Connectivity/models/UnityVirtualTableConfig.md) | `from foundry_sdk.v2.connectivity.models import UnityVirtualTableConfig` | +**Connectivity** | [UnknownWorker](docs/v2/Connectivity/models/UnknownWorker.md) | `from foundry_sdk.v2.connectivity.models import UnknownWorker` | +**Connectivity** | [UpdateExportSettingsForConnectionRequest](docs/v2/Connectivity/models/UpdateExportSettingsForConnectionRequest.md) | `from foundry_sdk.v2.connectivity.models import UpdateExportSettingsForConnectionRequest` | +**Connectivity** | [UpdateSecretsForConnectionRequest](docs/v2/Connectivity/models/UpdateSecretsForConnectionRequest.md) | `from foundry_sdk.v2.connectivity.models import UpdateSecretsForConnectionRequest` | +**Connectivity** | [UriScheme](docs/v2/Connectivity/models/UriScheme.md) | `from foundry_sdk.v2.connectivity.models import UriScheme` | +**Connectivity** | [VirtualTable](docs/v2/Connectivity/models/VirtualTable.md) | `from foundry_sdk.v2.connectivity.models import VirtualTable` | +**Connectivity** | [VirtualTableConfig](docs/v2/Connectivity/models/VirtualTableConfig.md) | `from foundry_sdk.v2.connectivity.models import VirtualTableConfig` | +**Connectivity** | [WorkflowIdentityFederation](docs/v2/Connectivity/models/WorkflowIdentityFederation.md) | `from foundry_sdk.v2.connectivity.models import WorkflowIdentityFederation` | +**Core** | [AnyType](docs/v2/Core/models/AnyType.md) | `from foundry_sdk.v2.core.models import AnyType` | +**Core** | [ArrayFieldType](docs/v2/Core/models/ArrayFieldType.md) | `from foundry_sdk.v2.core.models import ArrayFieldType` | +**Core** | [AttachmentType](docs/v2/Core/models/AttachmentType.md) | `from foundry_sdk.v2.core.models import AttachmentType` | +**Core** | [Attribution](docs/v2/Core/models/Attribution.md) | `from foundry_sdk.v2.core.models import Attribution` | +**Core** | [BinaryType](docs/v2/Core/models/BinaryType.md) | `from foundry_sdk.v2.core.models import BinaryType` | +**Core** | [BooleanType](docs/v2/Core/models/BooleanType.md) | `from foundry_sdk.v2.core.models import BooleanType` | +**Core** | [BranchMetadata](docs/v2/Core/models/BranchMetadata.md) | `from foundry_sdk.v2.core.models import BranchMetadata` | +**Core** | [BuildRid](docs/v2/Core/models/BuildRid.md) | `from foundry_sdk.v2.core.models import BuildRid` | +**Core** | [ByteType](docs/v2/Core/models/ByteType.md) | `from foundry_sdk.v2.core.models import ByteType` | +**Core** | [ChangeDataCaptureConfiguration](docs/v2/Core/models/ChangeDataCaptureConfiguration.md) | `from foundry_sdk.v2.core.models import ChangeDataCaptureConfiguration` | +**Core** | [CheckReportRid](docs/v2/Core/models/CheckReportRid.md) | `from foundry_sdk.v2.core.models import CheckReportRid` | +**Core** | [CheckRid](docs/v2/Core/models/CheckRid.md) | `from foundry_sdk.v2.core.models import CheckRid` | +**Core** | [CipherTextType](docs/v2/Core/models/CipherTextType.md) | `from foundry_sdk.v2.core.models import CipherTextType` | +**Core** | [ComputeSeconds](docs/v2/Core/models/ComputeSeconds.md) | `from foundry_sdk.v2.core.models import ComputeSeconds` | +**Core** | [ContentLength](docs/v2/Core/models/ContentLength.md) | `from foundry_sdk.v2.core.models import ContentLength` | +**Core** | [ContentType](docs/v2/Core/models/ContentType.md) | `from foundry_sdk.v2.core.models import ContentType` | +**Core** | [CreatedBy](docs/v2/Core/models/CreatedBy.md) | `from foundry_sdk.v2.core.models import CreatedBy` | +**Core** | [CreatedTime](docs/v2/Core/models/CreatedTime.md) | `from foundry_sdk.v2.core.models import CreatedTime` | +**Core** | [CustomMetadata](docs/v2/Core/models/CustomMetadata.md) | `from foundry_sdk.v2.core.models import CustomMetadata` | +**Core** | [DatasetFieldSchema](docs/v2/Core/models/DatasetFieldSchema.md) | `from foundry_sdk.v2.core.models import DatasetFieldSchema` | +**Core** | [DatasetSchema](docs/v2/Core/models/DatasetSchema.md) | `from foundry_sdk.v2.core.models import DatasetSchema` | +**Core** | [DateType](docs/v2/Core/models/DateType.md) | `from foundry_sdk.v2.core.models import DateType` | +**Core** | [DecimalType](docs/v2/Core/models/DecimalType.md) | `from foundry_sdk.v2.core.models import DecimalType` | +**Core** | [DisplayName](docs/v2/Core/models/DisplayName.md) | `from foundry_sdk.v2.core.models import DisplayName` | +**Core** | [Distance](docs/v2/Core/models/Distance.md) | `from foundry_sdk.v2.core.models import Distance` | +**Core** | [DistanceUnit](docs/v2/Core/models/DistanceUnit.md) | `from foundry_sdk.v2.core.models import DistanceUnit` | +**Core** | [DoubleType](docs/v2/Core/models/DoubleType.md) | `from foundry_sdk.v2.core.models import DoubleType` | +**Core** | [Duration](docs/v2/Core/models/Duration.md) | `from foundry_sdk.v2.core.models import Duration` | +**Core** | [DurationSeconds](docs/v2/Core/models/DurationSeconds.md) | `from foundry_sdk.v2.core.models import DurationSeconds` | +**Core** | [EmbeddingModel](docs/v2/Core/models/EmbeddingModel.md) | `from foundry_sdk.v2.core.models import EmbeddingModel` | +**Core** | [EnrollmentRid](docs/v2/Core/models/EnrollmentRid.md) | `from foundry_sdk.v2.core.models import EnrollmentRid` | +**Core** | [Field](docs/v2/Core/models/Field.md) | `from foundry_sdk.v2.core.models import Field` | +**Core** | [FieldDataType](docs/v2/Core/models/FieldDataType.md) | `from foundry_sdk.v2.core.models import FieldDataType` | +**Core** | [FieldName](docs/v2/Core/models/FieldName.md) | `from foundry_sdk.v2.core.models import FieldName` | +**Core** | [FieldSchema](docs/v2/Core/models/FieldSchema.md) | `from foundry_sdk.v2.core.models import FieldSchema` | +**Core** | [Filename](docs/v2/Core/models/Filename.md) | `from foundry_sdk.v2.core.models import Filename` | +**Core** | [FilePath](docs/v2/Core/models/FilePath.md) | `from foundry_sdk.v2.core.models import FilePath` | +**Core** | [FilterBinaryType](docs/v2/Core/models/FilterBinaryType.md) | `from foundry_sdk.v2.core.models import FilterBinaryType` | +**Core** | [FilterBooleanType](docs/v2/Core/models/FilterBooleanType.md) | `from foundry_sdk.v2.core.models import FilterBooleanType` | +**Core** | [FilterDateTimeType](docs/v2/Core/models/FilterDateTimeType.md) | `from foundry_sdk.v2.core.models import FilterDateTimeType` | +**Core** | [FilterDateType](docs/v2/Core/models/FilterDateType.md) | `from foundry_sdk.v2.core.models import FilterDateType` | +**Core** | [FilterDoubleType](docs/v2/Core/models/FilterDoubleType.md) | `from foundry_sdk.v2.core.models import FilterDoubleType` | +**Core** | [FilterEnumType](docs/v2/Core/models/FilterEnumType.md) | `from foundry_sdk.v2.core.models import FilterEnumType` | +**Core** | [FilterFloatType](docs/v2/Core/models/FilterFloatType.md) | `from foundry_sdk.v2.core.models import FilterFloatType` | +**Core** | [FilterIntegerType](docs/v2/Core/models/FilterIntegerType.md) | `from foundry_sdk.v2.core.models import FilterIntegerType` | +**Core** | [FilterLongType](docs/v2/Core/models/FilterLongType.md) | `from foundry_sdk.v2.core.models import FilterLongType` | +**Core** | [FilterRidType](docs/v2/Core/models/FilterRidType.md) | `from foundry_sdk.v2.core.models import FilterRidType` | +**Core** | [FilterStringType](docs/v2/Core/models/FilterStringType.md) | `from foundry_sdk.v2.core.models import FilterStringType` | +**Core** | [FilterType](docs/v2/Core/models/FilterType.md) | `from foundry_sdk.v2.core.models import FilterType` | +**Core** | [FilterUuidType](docs/v2/Core/models/FilterUuidType.md) | `from foundry_sdk.v2.core.models import FilterUuidType` | +**Core** | [FloatType](docs/v2/Core/models/FloatType.md) | `from foundry_sdk.v2.core.models import FloatType` | +**Core** | [FolderRid](docs/v2/Core/models/FolderRid.md) | `from foundry_sdk.v2.core.models import FolderRid` | +**Core** | [FoundryBranch](docs/v2/Core/models/FoundryBranch.md) | `from foundry_sdk.v2.core.models import FoundryBranch` | +**Core** | [FoundryLiveDeployment](docs/v2/Core/models/FoundryLiveDeployment.md) | `from foundry_sdk.v2.core.models import FoundryLiveDeployment` | +**Core** | [FullRowChangeDataCaptureConfiguration](docs/v2/Core/models/FullRowChangeDataCaptureConfiguration.md) | `from foundry_sdk.v2.core.models import FullRowChangeDataCaptureConfiguration` | +**Core** | [GeohashType](docs/v2/Core/models/GeohashType.md) | `from foundry_sdk.v2.core.models import GeohashType` | +**Core** | [GeoPointType](docs/v2/Core/models/GeoPointType.md) | `from foundry_sdk.v2.core.models import GeoPointType` | +**Core** | [GeoShapeType](docs/v2/Core/models/GeoShapeType.md) | `from foundry_sdk.v2.core.models import GeoShapeType` | +**Core** | [GeotimeSeriesReferenceType](docs/v2/Core/models/GeotimeSeriesReferenceType.md) | `from foundry_sdk.v2.core.models import GeotimeSeriesReferenceType` | +**Core** | [GroupId](docs/v2/Core/models/GroupId.md) | `from foundry_sdk.v2.core.models import GroupId` | +**Core** | [GroupName](docs/v2/Core/models/GroupName.md) | `from foundry_sdk.v2.core.models import GroupName` | +**Core** | [GroupRid](docs/v2/Core/models/GroupRid.md) | `from foundry_sdk.v2.core.models import GroupRid` | +**Core** | [IncludeComputeUsage](docs/v2/Core/models/IncludeComputeUsage.md) | `from foundry_sdk.v2.core.models import IncludeComputeUsage` | +**Core** | [IntegerType](docs/v2/Core/models/IntegerType.md) | `from foundry_sdk.v2.core.models import IntegerType` | +**Core** | [JobRid](docs/v2/Core/models/JobRid.md) | `from foundry_sdk.v2.core.models import JobRid` | +**Core** | [LmsEmbeddingModel](docs/v2/Core/models/LmsEmbeddingModel.md) | `from foundry_sdk.v2.core.models import LmsEmbeddingModel` | +**Core** | [LmsEmbeddingModelValue](docs/v2/Core/models/LmsEmbeddingModelValue.md) | `from foundry_sdk.v2.core.models import LmsEmbeddingModelValue` | +**Core** | [LongType](docs/v2/Core/models/LongType.md) | `from foundry_sdk.v2.core.models import LongType` | +**Core** | [MapFieldType](docs/v2/Core/models/MapFieldType.md) | `from foundry_sdk.v2.core.models import MapFieldType` | +**Core** | [MarkingId](docs/v2/Core/models/MarkingId.md) | `from foundry_sdk.v2.core.models import MarkingId` | +**Core** | [MarkingType](docs/v2/Core/models/MarkingType.md) | `from foundry_sdk.v2.core.models import MarkingType` | +**Core** | [MediaItemPath](docs/v2/Core/models/MediaItemPath.md) | `from foundry_sdk.v2.core.models import MediaItemPath` | +**Core** | [MediaItemReadToken](docs/v2/Core/models/MediaItemReadToken.md) | `from foundry_sdk.v2.core.models import MediaItemReadToken` | +**Core** | [MediaItemRid](docs/v2/Core/models/MediaItemRid.md) | `from foundry_sdk.v2.core.models import MediaItemRid` | +**Core** | [MediaReference](docs/v2/Core/models/MediaReference.md) | `from foundry_sdk.v2.core.models import MediaReference` | +**Core** | [MediaReferenceType](docs/v2/Core/models/MediaReferenceType.md) | `from foundry_sdk.v2.core.models import MediaReferenceType` | +**Core** | [MediaSetRid](docs/v2/Core/models/MediaSetRid.md) | `from foundry_sdk.v2.core.models import MediaSetRid` | +**Core** | [MediaSetViewItem](docs/v2/Core/models/MediaSetViewItem.md) | `from foundry_sdk.v2.core.models import MediaSetViewItem` | +**Core** | [MediaSetViewItemWrapper](docs/v2/Core/models/MediaSetViewItemWrapper.md) | `from foundry_sdk.v2.core.models import MediaSetViewItemWrapper` | +**Core** | [MediaSetViewRid](docs/v2/Core/models/MediaSetViewRid.md) | `from foundry_sdk.v2.core.models import MediaSetViewRid` | +**Core** | [MediaType](docs/v2/Core/models/MediaType.md) | `from foundry_sdk.v2.core.models import MediaType` | +**Core** | [NullType](docs/v2/Core/models/NullType.md) | `from foundry_sdk.v2.core.models import NullType` | +**Core** | [NumericOrNonNumericType](docs/v2/Core/models/NumericOrNonNumericType.md) | `from foundry_sdk.v2.core.models import NumericOrNonNumericType` | +**Core** | [Operation](docs/v2/Core/models/Operation.md) | `from foundry_sdk.v2.core.models import Operation` | +**Core** | [OperationScope](docs/v2/Core/models/OperationScope.md) | `from foundry_sdk.v2.core.models import OperationScope` | +**Core** | [OrderByDirection](docs/v2/Core/models/OrderByDirection.md) | `from foundry_sdk.v2.core.models import OrderByDirection` | +**Core** | [OrganizationRid](docs/v2/Core/models/OrganizationRid.md) | `from foundry_sdk.v2.core.models import OrganizationRid` | +**Core** | [PageSize](docs/v2/Core/models/PageSize.md) | `from foundry_sdk.v2.core.models import PageSize` | +**Core** | [PageToken](docs/v2/Core/models/PageToken.md) | `from foundry_sdk.v2.core.models import PageToken` | +**Core** | [PreviewMode](docs/v2/Core/models/PreviewMode.md) | `from foundry_sdk.v2.core.models import PreviewMode` | +**Core** | [PrincipalId](docs/v2/Core/models/PrincipalId.md) | `from foundry_sdk.v2.core.models import PrincipalId` | +**Core** | [PrincipalType](docs/v2/Core/models/PrincipalType.md) | `from foundry_sdk.v2.core.models import PrincipalType` | +**Core** | [Realm](docs/v2/Core/models/Realm.md) | `from foundry_sdk.v2.core.models import Realm` | +**Core** | [Reference](docs/v2/Core/models/Reference.md) | `from foundry_sdk.v2.core.models import Reference` | +**Core** | [ReleaseStatus](docs/v2/Core/models/ReleaseStatus.md) | `from foundry_sdk.v2.core.models import ReleaseStatus` | +**Core** | [Role](docs/v2/Core/models/Role.md) | `from foundry_sdk.v2.core.models import Role` | +**Core** | [RoleAssignmentUpdate](docs/v2/Core/models/RoleAssignmentUpdate.md) | `from foundry_sdk.v2.core.models import RoleAssignmentUpdate` | +**Core** | [RoleContext](docs/v2/Core/models/RoleContext.md) | `from foundry_sdk.v2.core.models import RoleContext` | +**Core** | [RoleId](docs/v2/Core/models/RoleId.md) | `from foundry_sdk.v2.core.models import RoleId` | +**Core** | [RoleSetId](docs/v2/Core/models/RoleSetId.md) | `from foundry_sdk.v2.core.models import RoleSetId` | +**Core** | [ScheduleRid](docs/v2/Core/models/ScheduleRid.md) | `from foundry_sdk.v2.core.models import ScheduleRid` | +**Core** | [SchemaFieldType](docs/v2/Core/models/SchemaFieldType.md) | `from foundry_sdk.v2.core.models import SchemaFieldType` | +**Core** | [ShortType](docs/v2/Core/models/ShortType.md) | `from foundry_sdk.v2.core.models import ShortType` | +**Core** | [SizeBytes](docs/v2/Core/models/SizeBytes.md) | `from foundry_sdk.v2.core.models import SizeBytes` | +**Core** | [StreamSchema](docs/v2/Core/models/StreamSchema.md) | `from foundry_sdk.v2.core.models import StreamSchema` | +**Core** | [StringType](docs/v2/Core/models/StringType.md) | `from foundry_sdk.v2.core.models import StringType` | +**Core** | [StructFieldName](docs/v2/Core/models/StructFieldName.md) | `from foundry_sdk.v2.core.models import StructFieldName` | +**Core** | [StructFieldType](docs/v2/Core/models/StructFieldType.md) | `from foundry_sdk.v2.core.models import StructFieldType` | +**Core** | [TableRid](docs/v2/Core/models/TableRid.md) | `from foundry_sdk.v2.core.models import TableRid` | +**Core** | [TimeSeriesItemType](docs/v2/Core/models/TimeSeriesItemType.md) | `from foundry_sdk.v2.core.models import TimeSeriesItemType` | +**Core** | [TimeseriesType](docs/v2/Core/models/TimeseriesType.md) | `from foundry_sdk.v2.core.models import TimeseriesType` | +**Core** | [TimestampType](docs/v2/Core/models/TimestampType.md) | `from foundry_sdk.v2.core.models import TimestampType` | +**Core** | [TimeUnit](docs/v2/Core/models/TimeUnit.md) | `from foundry_sdk.v2.core.models import TimeUnit` | +**Core** | [TotalCount](docs/v2/Core/models/TotalCount.md) | `from foundry_sdk.v2.core.models import TotalCount` | +**Core** | [TraceParent](docs/v2/Core/models/TraceParent.md) | `from foundry_sdk.v2.core.models import TraceParent` | +**Core** | [TraceState](docs/v2/Core/models/TraceState.md) | `from foundry_sdk.v2.core.models import TraceState` | +**Core** | [UnsupportedType](docs/v2/Core/models/UnsupportedType.md) | `from foundry_sdk.v2.core.models import UnsupportedType` | +**Core** | [UpdatedBy](docs/v2/Core/models/UpdatedBy.md) | `from foundry_sdk.v2.core.models import UpdatedBy` | +**Core** | [UpdatedTime](docs/v2/Core/models/UpdatedTime.md) | `from foundry_sdk.v2.core.models import UpdatedTime` | +**Core** | [UserId](docs/v2/Core/models/UserId.md) | `from foundry_sdk.v2.core.models import UserId` | +**Core** | [UserStatus](docs/v2/Core/models/UserStatus.md) | `from foundry_sdk.v2.core.models import UserStatus` | +**Core** | [VectorSimilarityFunction](docs/v2/Core/models/VectorSimilarityFunction.md) | `from foundry_sdk.v2.core.models import VectorSimilarityFunction` | +**Core** | [VectorSimilarityFunctionValue](docs/v2/Core/models/VectorSimilarityFunctionValue.md) | `from foundry_sdk.v2.core.models import VectorSimilarityFunctionValue` | +**Core** | [VectorType](docs/v2/Core/models/VectorType.md) | `from foundry_sdk.v2.core.models import VectorType` | +**Core** | [VersionId](docs/v2/Core/models/VersionId.md) | `from foundry_sdk.v2.core.models import VersionId` | +**Core** | [ZoneId](docs/v2/Core/models/ZoneId.md) | `from foundry_sdk.v2.core.models import ZoneId` | +**DataHealth** | [AllowedColumnValuesCheckConfig](docs/v2/DataHealth/models/AllowedColumnValuesCheckConfig.md) | `from foundry_sdk.v2.data_health.models import AllowedColumnValuesCheckConfig` | +**DataHealth** | [ApproximateUniquePercentageCheckConfig](docs/v2/DataHealth/models/ApproximateUniquePercentageCheckConfig.md) | `from foundry_sdk.v2.data_health.models import ApproximateUniquePercentageCheckConfig` | +**DataHealth** | [BooleanColumnValue](docs/v2/DataHealth/models/BooleanColumnValue.md) | `from foundry_sdk.v2.data_health.models import BooleanColumnValue` | +**DataHealth** | [BuildDurationCheckConfig](docs/v2/DataHealth/models/BuildDurationCheckConfig.md) | `from foundry_sdk.v2.data_health.models import BuildDurationCheckConfig` | +**DataHealth** | [BuildStatusCheckConfig](docs/v2/DataHealth/models/BuildStatusCheckConfig.md) | `from foundry_sdk.v2.data_health.models import BuildStatusCheckConfig` | +**DataHealth** | [Check](docs/v2/DataHealth/models/Check.md) | `from foundry_sdk.v2.data_health.models import Check` | +**DataHealth** | [CheckConfig](docs/v2/DataHealth/models/CheckConfig.md) | `from foundry_sdk.v2.data_health.models import CheckConfig` | +**DataHealth** | [CheckGroupRid](docs/v2/DataHealth/models/CheckGroupRid.md) | `from foundry_sdk.v2.data_health.models import CheckGroupRid` | +**DataHealth** | [CheckIntent](docs/v2/DataHealth/models/CheckIntent.md) | `from foundry_sdk.v2.data_health.models import CheckIntent` | +**DataHealth** | [CheckReport](docs/v2/DataHealth/models/CheckReport.md) | `from foundry_sdk.v2.data_health.models import CheckReport` | +**DataHealth** | [CheckResult](docs/v2/DataHealth/models/CheckResult.md) | `from foundry_sdk.v2.data_health.models import CheckResult` | +**DataHealth** | [CheckResultStatus](docs/v2/DataHealth/models/CheckResultStatus.md) | `from foundry_sdk.v2.data_health.models import CheckResultStatus` | +**DataHealth** | [ColumnCountConfig](docs/v2/DataHealth/models/ColumnCountConfig.md) | `from foundry_sdk.v2.data_health.models import ColumnCountConfig` | +**DataHealth** | [ColumnInfo](docs/v2/DataHealth/models/ColumnInfo.md) | `from foundry_sdk.v2.data_health.models import ColumnInfo` | +**DataHealth** | [ColumnName](docs/v2/DataHealth/models/ColumnName.md) | `from foundry_sdk.v2.data_health.models import ColumnName` | +**DataHealth** | [ColumnTypeCheckConfig](docs/v2/DataHealth/models/ColumnTypeCheckConfig.md) | `from foundry_sdk.v2.data_health.models import ColumnTypeCheckConfig` | +**DataHealth** | [ColumnTypeConfig](docs/v2/DataHealth/models/ColumnTypeConfig.md) | `from foundry_sdk.v2.data_health.models import ColumnTypeConfig` | +**DataHealth** | [ColumnValue](docs/v2/DataHealth/models/ColumnValue.md) | `from foundry_sdk.v2.data_health.models import ColumnValue` | +**DataHealth** | [CreateCheckRequest](docs/v2/DataHealth/models/CreateCheckRequest.md) | `from foundry_sdk.v2.data_health.models import CreateCheckRequest` | +**DataHealth** | [DatasetSubject](docs/v2/DataHealth/models/DatasetSubject.md) | `from foundry_sdk.v2.data_health.models import DatasetSubject` | +**DataHealth** | [DateBounds](docs/v2/DataHealth/models/DateBounds.md) | `from foundry_sdk.v2.data_health.models import DateBounds` | +**DataHealth** | [DateBoundsConfig](docs/v2/DataHealth/models/DateBoundsConfig.md) | `from foundry_sdk.v2.data_health.models import DateBoundsConfig` | +**DataHealth** | [DateColumnRangeCheckConfig](docs/v2/DataHealth/models/DateColumnRangeCheckConfig.md) | `from foundry_sdk.v2.data_health.models import DateColumnRangeCheckConfig` | +**DataHealth** | [DateColumnValue](docs/v2/DataHealth/models/DateColumnValue.md) | `from foundry_sdk.v2.data_health.models import DateColumnValue` | +**DataHealth** | [EscalationConfig](docs/v2/DataHealth/models/EscalationConfig.md) | `from foundry_sdk.v2.data_health.models import EscalationConfig` | +**DataHealth** | [JobDurationCheckConfig](docs/v2/DataHealth/models/JobDurationCheckConfig.md) | `from foundry_sdk.v2.data_health.models import JobDurationCheckConfig` | +**DataHealth** | [JobStatusCheckConfig](docs/v2/DataHealth/models/JobStatusCheckConfig.md) | `from foundry_sdk.v2.data_health.models import JobStatusCheckConfig` | +**DataHealth** | [MedianDeviation](docs/v2/DataHealth/models/MedianDeviation.md) | `from foundry_sdk.v2.data_health.models import MedianDeviation` | +**DataHealth** | [MedianDeviationBoundsType](docs/v2/DataHealth/models/MedianDeviationBoundsType.md) | `from foundry_sdk.v2.data_health.models import MedianDeviationBoundsType` | +**DataHealth** | [MedianDeviationConfig](docs/v2/DataHealth/models/MedianDeviationConfig.md) | `from foundry_sdk.v2.data_health.models import MedianDeviationConfig` | +**DataHealth** | [NullPercentageCheckConfig](docs/v2/DataHealth/models/NullPercentageCheckConfig.md) | `from foundry_sdk.v2.data_health.models import NullPercentageCheckConfig` | +**DataHealth** | [NumericBounds](docs/v2/DataHealth/models/NumericBounds.md) | `from foundry_sdk.v2.data_health.models import NumericBounds` | +**DataHealth** | [NumericBoundsConfig](docs/v2/DataHealth/models/NumericBoundsConfig.md) | `from foundry_sdk.v2.data_health.models import NumericBoundsConfig` | +**DataHealth** | [NumericColumnCheckConfig](docs/v2/DataHealth/models/NumericColumnCheckConfig.md) | `from foundry_sdk.v2.data_health.models import NumericColumnCheckConfig` | +**DataHealth** | [NumericColumnMeanCheckConfig](docs/v2/DataHealth/models/NumericColumnMeanCheckConfig.md) | `from foundry_sdk.v2.data_health.models import NumericColumnMeanCheckConfig` | +**DataHealth** | [NumericColumnMedianCheckConfig](docs/v2/DataHealth/models/NumericColumnMedianCheckConfig.md) | `from foundry_sdk.v2.data_health.models import NumericColumnMedianCheckConfig` | +**DataHealth** | [NumericColumnRangeCheckConfig](docs/v2/DataHealth/models/NumericColumnRangeCheckConfig.md) | `from foundry_sdk.v2.data_health.models import NumericColumnRangeCheckConfig` | +**DataHealth** | [NumericColumnValue](docs/v2/DataHealth/models/NumericColumnValue.md) | `from foundry_sdk.v2.data_health.models import NumericColumnValue` | +**DataHealth** | [PercentageBounds](docs/v2/DataHealth/models/PercentageBounds.md) | `from foundry_sdk.v2.data_health.models import PercentageBounds` | +**DataHealth** | [PercentageBoundsConfig](docs/v2/DataHealth/models/PercentageBoundsConfig.md) | `from foundry_sdk.v2.data_health.models import PercentageBoundsConfig` | +**DataHealth** | [PercentageCheckConfig](docs/v2/DataHealth/models/PercentageCheckConfig.md) | `from foundry_sdk.v2.data_health.models import PercentageCheckConfig` | +**DataHealth** | [PercentageValue](docs/v2/DataHealth/models/PercentageValue.md) | `from foundry_sdk.v2.data_health.models import PercentageValue` | +**DataHealth** | [PrimaryKeyCheckConfig](docs/v2/DataHealth/models/PrimaryKeyCheckConfig.md) | `from foundry_sdk.v2.data_health.models import PrimaryKeyCheckConfig` | +**DataHealth** | [PrimaryKeyConfig](docs/v2/DataHealth/models/PrimaryKeyConfig.md) | `from foundry_sdk.v2.data_health.models import PrimaryKeyConfig` | +**DataHealth** | [ReplaceAllowedColumnValuesCheckConfig](docs/v2/DataHealth/models/ReplaceAllowedColumnValuesCheckConfig.md) | `from foundry_sdk.v2.data_health.models import ReplaceAllowedColumnValuesCheckConfig` | +**DataHealth** | [ReplaceApproximateUniquePercentageCheckConfig](docs/v2/DataHealth/models/ReplaceApproximateUniquePercentageCheckConfig.md) | `from foundry_sdk.v2.data_health.models import ReplaceApproximateUniquePercentageCheckConfig` | +**DataHealth** | [ReplaceBuildDurationCheckConfig](docs/v2/DataHealth/models/ReplaceBuildDurationCheckConfig.md) | `from foundry_sdk.v2.data_health.models import ReplaceBuildDurationCheckConfig` | +**DataHealth** | [ReplaceBuildStatusCheckConfig](docs/v2/DataHealth/models/ReplaceBuildStatusCheckConfig.md) | `from foundry_sdk.v2.data_health.models import ReplaceBuildStatusCheckConfig` | +**DataHealth** | [ReplaceCheckConfig](docs/v2/DataHealth/models/ReplaceCheckConfig.md) | `from foundry_sdk.v2.data_health.models import ReplaceCheckConfig` | +**DataHealth** | [ReplaceCheckRequest](docs/v2/DataHealth/models/ReplaceCheckRequest.md) | `from foundry_sdk.v2.data_health.models import ReplaceCheckRequest` | +**DataHealth** | [ReplaceColumnTypeCheckConfig](docs/v2/DataHealth/models/ReplaceColumnTypeCheckConfig.md) | `from foundry_sdk.v2.data_health.models import ReplaceColumnTypeCheckConfig` | +**DataHealth** | [ReplaceColumnTypeConfig](docs/v2/DataHealth/models/ReplaceColumnTypeConfig.md) | `from foundry_sdk.v2.data_health.models import ReplaceColumnTypeConfig` | +**DataHealth** | [ReplaceDateColumnRangeCheckConfig](docs/v2/DataHealth/models/ReplaceDateColumnRangeCheckConfig.md) | `from foundry_sdk.v2.data_health.models import ReplaceDateColumnRangeCheckConfig` | +**DataHealth** | [ReplaceJobDurationCheckConfig](docs/v2/DataHealth/models/ReplaceJobDurationCheckConfig.md) | `from foundry_sdk.v2.data_health.models import ReplaceJobDurationCheckConfig` | +**DataHealth** | [ReplaceJobStatusCheckConfig](docs/v2/DataHealth/models/ReplaceJobStatusCheckConfig.md) | `from foundry_sdk.v2.data_health.models import ReplaceJobStatusCheckConfig` | +**DataHealth** | [ReplaceNullPercentageCheckConfig](docs/v2/DataHealth/models/ReplaceNullPercentageCheckConfig.md) | `from foundry_sdk.v2.data_health.models import ReplaceNullPercentageCheckConfig` | +**DataHealth** | [ReplaceNumericColumnCheckConfig](docs/v2/DataHealth/models/ReplaceNumericColumnCheckConfig.md) | `from foundry_sdk.v2.data_health.models import ReplaceNumericColumnCheckConfig` | +**DataHealth** | [ReplaceNumericColumnMeanCheckConfig](docs/v2/DataHealth/models/ReplaceNumericColumnMeanCheckConfig.md) | `from foundry_sdk.v2.data_health.models import ReplaceNumericColumnMeanCheckConfig` | +**DataHealth** | [ReplaceNumericColumnMedianCheckConfig](docs/v2/DataHealth/models/ReplaceNumericColumnMedianCheckConfig.md) | `from foundry_sdk.v2.data_health.models import ReplaceNumericColumnMedianCheckConfig` | +**DataHealth** | [ReplaceNumericColumnRangeCheckConfig](docs/v2/DataHealth/models/ReplaceNumericColumnRangeCheckConfig.md) | `from foundry_sdk.v2.data_health.models import ReplaceNumericColumnRangeCheckConfig` | +**DataHealth** | [ReplacePercentageCheckConfig](docs/v2/DataHealth/models/ReplacePercentageCheckConfig.md) | `from foundry_sdk.v2.data_health.models import ReplacePercentageCheckConfig` | +**DataHealth** | [ReplacePrimaryKeyCheckConfig](docs/v2/DataHealth/models/ReplacePrimaryKeyCheckConfig.md) | `from foundry_sdk.v2.data_health.models import ReplacePrimaryKeyCheckConfig` | +**DataHealth** | [ReplacePrimaryKeyConfig](docs/v2/DataHealth/models/ReplacePrimaryKeyConfig.md) | `from foundry_sdk.v2.data_health.models import ReplacePrimaryKeyConfig` | +**DataHealth** | [ReplaceSchemaComparisonCheckConfig](docs/v2/DataHealth/models/ReplaceSchemaComparisonCheckConfig.md) | `from foundry_sdk.v2.data_health.models import ReplaceSchemaComparisonCheckConfig` | +**DataHealth** | [ReplaceTotalColumnCountCheckConfig](docs/v2/DataHealth/models/ReplaceTotalColumnCountCheckConfig.md) | `from foundry_sdk.v2.data_health.models import ReplaceTotalColumnCountCheckConfig` | +**DataHealth** | [SchemaComparisonCheckConfig](docs/v2/DataHealth/models/SchemaComparisonCheckConfig.md) | `from foundry_sdk.v2.data_health.models import SchemaComparisonCheckConfig` | +**DataHealth** | [SchemaComparisonConfig](docs/v2/DataHealth/models/SchemaComparisonConfig.md) | `from foundry_sdk.v2.data_health.models import SchemaComparisonConfig` | +**DataHealth** | [SchemaComparisonType](docs/v2/DataHealth/models/SchemaComparisonType.md) | `from foundry_sdk.v2.data_health.models import SchemaComparisonType` | +**DataHealth** | [SchemaInfo](docs/v2/DataHealth/models/SchemaInfo.md) | `from foundry_sdk.v2.data_health.models import SchemaInfo` | +**DataHealth** | [SeverityLevel](docs/v2/DataHealth/models/SeverityLevel.md) | `from foundry_sdk.v2.data_health.models import SeverityLevel` | +**DataHealth** | [StatusCheckConfig](docs/v2/DataHealth/models/StatusCheckConfig.md) | `from foundry_sdk.v2.data_health.models import StatusCheckConfig` | +**DataHealth** | [StringColumnValue](docs/v2/DataHealth/models/StringColumnValue.md) | `from foundry_sdk.v2.data_health.models import StringColumnValue` | +**DataHealth** | [TimeBounds](docs/v2/DataHealth/models/TimeBounds.md) | `from foundry_sdk.v2.data_health.models import TimeBounds` | +**DataHealth** | [TimeBoundsConfig](docs/v2/DataHealth/models/TimeBoundsConfig.md) | `from foundry_sdk.v2.data_health.models import TimeBoundsConfig` | +**DataHealth** | [TimeCheckConfig](docs/v2/DataHealth/models/TimeCheckConfig.md) | `from foundry_sdk.v2.data_health.models import TimeCheckConfig` | +**DataHealth** | [TotalColumnCountCheckConfig](docs/v2/DataHealth/models/TotalColumnCountCheckConfig.md) | `from foundry_sdk.v2.data_health.models import TotalColumnCountCheckConfig` | +**DataHealth** | [TrendConfig](docs/v2/DataHealth/models/TrendConfig.md) | `from foundry_sdk.v2.data_health.models import TrendConfig` | +**DataHealth** | [TrendType](docs/v2/DataHealth/models/TrendType.md) | `from foundry_sdk.v2.data_health.models import TrendType` | +**Datasets** | [AddBackingDatasetsRequest](docs/v2/Datasets/models/AddBackingDatasetsRequest.md) | `from foundry_sdk.v2.datasets.models import AddBackingDatasetsRequest` | +**Datasets** | [AddPrimaryKeyRequest](docs/v2/Datasets/models/AddPrimaryKeyRequest.md) | `from foundry_sdk.v2.datasets.models import AddPrimaryKeyRequest` | +**Datasets** | [Branch](docs/v2/Datasets/models/Branch.md) | `from foundry_sdk.v2.datasets.models import Branch` | +**Datasets** | [BranchName](docs/v2/Datasets/models/BranchName.md) | `from foundry_sdk.v2.datasets.models import BranchName` | +**Datasets** | [CreateBranchRequest](docs/v2/Datasets/models/CreateBranchRequest.md) | `from foundry_sdk.v2.datasets.models import CreateBranchRequest` | +**Datasets** | [CreateDatasetRequest](docs/v2/Datasets/models/CreateDatasetRequest.md) | `from foundry_sdk.v2.datasets.models import CreateDatasetRequest` | +**Datasets** | [CreateTransactionRequest](docs/v2/Datasets/models/CreateTransactionRequest.md) | `from foundry_sdk.v2.datasets.models import CreateTransactionRequest` | +**Datasets** | [CreateViewRequest](docs/v2/Datasets/models/CreateViewRequest.md) | `from foundry_sdk.v2.datasets.models import CreateViewRequest` | +**Datasets** | [DataframeReader](docs/v2/Datasets/models/DataframeReader.md) | `from foundry_sdk.v2.datasets.models import DataframeReader` | +**Datasets** | [Dataset](docs/v2/Datasets/models/Dataset.md) | `from foundry_sdk.v2.datasets.models import Dataset` | +**Datasets** | [DatasetName](docs/v2/Datasets/models/DatasetName.md) | `from foundry_sdk.v2.datasets.models import DatasetName` | +**Datasets** | [DatasetRid](docs/v2/Datasets/models/DatasetRid.md) | `from foundry_sdk.v2.datasets.models import DatasetRid` | +**Datasets** | [File](docs/v2/Datasets/models/File.md) | `from foundry_sdk.v2.datasets.models import File` | +**Datasets** | [FileUpdatedTime](docs/v2/Datasets/models/FileUpdatedTime.md) | `from foundry_sdk.v2.datasets.models import FileUpdatedTime` | +**Datasets** | [GetDatasetJobsAndFilter](docs/v2/Datasets/models/GetDatasetJobsAndFilter.md) | `from foundry_sdk.v2.datasets.models import GetDatasetJobsAndFilter` | +**Datasets** | [GetDatasetJobsComparisonType](docs/v2/Datasets/models/GetDatasetJobsComparisonType.md) | `from foundry_sdk.v2.datasets.models import GetDatasetJobsComparisonType` | +**Datasets** | [GetDatasetJobsOrFilter](docs/v2/Datasets/models/GetDatasetJobsOrFilter.md) | `from foundry_sdk.v2.datasets.models import GetDatasetJobsOrFilter` | +**Datasets** | [GetDatasetJobsQuery](docs/v2/Datasets/models/GetDatasetJobsQuery.md) | `from foundry_sdk.v2.datasets.models import GetDatasetJobsQuery` | +**Datasets** | [GetDatasetJobsRequest](docs/v2/Datasets/models/GetDatasetJobsRequest.md) | `from foundry_sdk.v2.datasets.models import GetDatasetJobsRequest` | +**Datasets** | [GetDatasetJobsSort](docs/v2/Datasets/models/GetDatasetJobsSort.md) | `from foundry_sdk.v2.datasets.models import GetDatasetJobsSort` | +**Datasets** | [GetDatasetJobsSortDirection](docs/v2/Datasets/models/GetDatasetJobsSortDirection.md) | `from foundry_sdk.v2.datasets.models import GetDatasetJobsSortDirection` | +**Datasets** | [GetDatasetJobsSortType](docs/v2/Datasets/models/GetDatasetJobsSortType.md) | `from foundry_sdk.v2.datasets.models import GetDatasetJobsSortType` | +**Datasets** | [GetDatasetJobsTimeFilter](docs/v2/Datasets/models/GetDatasetJobsTimeFilter.md) | `from foundry_sdk.v2.datasets.models import GetDatasetJobsTimeFilter` | +**Datasets** | [GetDatasetJobsTimeFilterField](docs/v2/Datasets/models/GetDatasetJobsTimeFilterField.md) | `from foundry_sdk.v2.datasets.models import GetDatasetJobsTimeFilterField` | +**Datasets** | [GetDatasetSchemaResponse](docs/v2/Datasets/models/GetDatasetSchemaResponse.md) | `from foundry_sdk.v2.datasets.models import GetDatasetSchemaResponse` | +**Datasets** | [GetJobResponse](docs/v2/Datasets/models/GetJobResponse.md) | `from foundry_sdk.v2.datasets.models import GetJobResponse` | +**Datasets** | [GetSchemaDatasetsBatchRequestElement](docs/v2/Datasets/models/GetSchemaDatasetsBatchRequestElement.md) | `from foundry_sdk.v2.datasets.models import GetSchemaDatasetsBatchRequestElement` | +**Datasets** | [GetSchemaDatasetsBatchResponse](docs/v2/Datasets/models/GetSchemaDatasetsBatchResponse.md) | `from foundry_sdk.v2.datasets.models import GetSchemaDatasetsBatchResponse` | +**Datasets** | [JobDetails](docs/v2/Datasets/models/JobDetails.md) | `from foundry_sdk.v2.datasets.models import JobDetails` | +**Datasets** | [ListBranchesResponse](docs/v2/Datasets/models/ListBranchesResponse.md) | `from foundry_sdk.v2.datasets.models import ListBranchesResponse` | +**Datasets** | [ListFilesResponse](docs/v2/Datasets/models/ListFilesResponse.md) | `from foundry_sdk.v2.datasets.models import ListFilesResponse` | +**Datasets** | [ListHealthChecksResponse](docs/v2/Datasets/models/ListHealthChecksResponse.md) | `from foundry_sdk.v2.datasets.models import ListHealthChecksResponse` | +**Datasets** | [ListSchedulesResponse](docs/v2/Datasets/models/ListSchedulesResponse.md) | `from foundry_sdk.v2.datasets.models import ListSchedulesResponse` | +**Datasets** | [ListTransactionsOfDatasetResponse](docs/v2/Datasets/models/ListTransactionsOfDatasetResponse.md) | `from foundry_sdk.v2.datasets.models import ListTransactionsOfDatasetResponse` | +**Datasets** | [ListTransactionsResponse](docs/v2/Datasets/models/ListTransactionsResponse.md) | `from foundry_sdk.v2.datasets.models import ListTransactionsResponse` | +**Datasets** | [PrimaryKeyLatestWinsResolutionStrategy](docs/v2/Datasets/models/PrimaryKeyLatestWinsResolutionStrategy.md) | `from foundry_sdk.v2.datasets.models import PrimaryKeyLatestWinsResolutionStrategy` | +**Datasets** | [PrimaryKeyResolutionDuplicate](docs/v2/Datasets/models/PrimaryKeyResolutionDuplicate.md) | `from foundry_sdk.v2.datasets.models import PrimaryKeyResolutionDuplicate` | +**Datasets** | [PrimaryKeyResolutionStrategy](docs/v2/Datasets/models/PrimaryKeyResolutionStrategy.md) | `from foundry_sdk.v2.datasets.models import PrimaryKeyResolutionStrategy` | +**Datasets** | [PrimaryKeyResolutionUnique](docs/v2/Datasets/models/PrimaryKeyResolutionUnique.md) | `from foundry_sdk.v2.datasets.models import PrimaryKeyResolutionUnique` | +**Datasets** | [PutDatasetSchemaRequest](docs/v2/Datasets/models/PutDatasetSchemaRequest.md) | `from foundry_sdk.v2.datasets.models import PutDatasetSchemaRequest` | +**Datasets** | [RemoveBackingDatasetsRequest](docs/v2/Datasets/models/RemoveBackingDatasetsRequest.md) | `from foundry_sdk.v2.datasets.models import RemoveBackingDatasetsRequest` | +**Datasets** | [ReplaceBackingDatasetsRequest](docs/v2/Datasets/models/ReplaceBackingDatasetsRequest.md) | `from foundry_sdk.v2.datasets.models import ReplaceBackingDatasetsRequest` | +**Datasets** | [TableExportFormat](docs/v2/Datasets/models/TableExportFormat.md) | `from foundry_sdk.v2.datasets.models import TableExportFormat` | +**Datasets** | [Transaction](docs/v2/Datasets/models/Transaction.md) | `from foundry_sdk.v2.datasets.models import Transaction` | +**Datasets** | [TransactionCreatedTime](docs/v2/Datasets/models/TransactionCreatedTime.md) | `from foundry_sdk.v2.datasets.models import TransactionCreatedTime` | +**Datasets** | [TransactionRid](docs/v2/Datasets/models/TransactionRid.md) | `from foundry_sdk.v2.datasets.models import TransactionRid` | +**Datasets** | [TransactionStatus](docs/v2/Datasets/models/TransactionStatus.md) | `from foundry_sdk.v2.datasets.models import TransactionStatus` | +**Datasets** | [TransactionType](docs/v2/Datasets/models/TransactionType.md) | `from foundry_sdk.v2.datasets.models import TransactionType` | +**Datasets** | [View](docs/v2/Datasets/models/View.md) | `from foundry_sdk.v2.datasets.models import View` | +**Datasets** | [ViewBackingDataset](docs/v2/Datasets/models/ViewBackingDataset.md) | `from foundry_sdk.v2.datasets.models import ViewBackingDataset` | +**Datasets** | [ViewPrimaryKey](docs/v2/Datasets/models/ViewPrimaryKey.md) | `from foundry_sdk.v2.datasets.models import ViewPrimaryKey` | +**Datasets** | [ViewPrimaryKeyResolution](docs/v2/Datasets/models/ViewPrimaryKeyResolution.md) | `from foundry_sdk.v2.datasets.models import ViewPrimaryKeyResolution` | +**Filesystem** | [AccessRequirements](docs/v2/Filesystem/models/AccessRequirements.md) | `from foundry_sdk.v2.filesystem.models import AccessRequirements` | +**Filesystem** | [AddMarkingsRequest](docs/v2/Filesystem/models/AddMarkingsRequest.md) | `from foundry_sdk.v2.filesystem.models import AddMarkingsRequest` | +**Filesystem** | [AddOrganizationsRequest](docs/v2/Filesystem/models/AddOrganizationsRequest.md) | `from foundry_sdk.v2.filesystem.models import AddOrganizationsRequest` | +**Filesystem** | [AddResourceRolesRequest](docs/v2/Filesystem/models/AddResourceRolesRequest.md) | `from foundry_sdk.v2.filesystem.models import AddResourceRolesRequest` | +**Filesystem** | [CreateFolderRequest](docs/v2/Filesystem/models/CreateFolderRequest.md) | `from foundry_sdk.v2.filesystem.models import CreateFolderRequest` | +**Filesystem** | [CreateProjectFromTemplateRequest](docs/v2/Filesystem/models/CreateProjectFromTemplateRequest.md) | `from foundry_sdk.v2.filesystem.models import CreateProjectFromTemplateRequest` | +**Filesystem** | [CreateProjectRequest](docs/v2/Filesystem/models/CreateProjectRequest.md) | `from foundry_sdk.v2.filesystem.models import CreateProjectRequest` | +**Filesystem** | [CreateSpaceRequest](docs/v2/Filesystem/models/CreateSpaceRequest.md) | `from foundry_sdk.v2.filesystem.models import CreateSpaceRequest` | +**Filesystem** | [Everyone](docs/v2/Filesystem/models/Everyone.md) | `from foundry_sdk.v2.filesystem.models import Everyone` | +**Filesystem** | [FileSystemId](docs/v2/Filesystem/models/FileSystemId.md) | `from foundry_sdk.v2.filesystem.models import FileSystemId` | +**Filesystem** | [Folder](docs/v2/Filesystem/models/Folder.md) | `from foundry_sdk.v2.filesystem.models import Folder` | +**Filesystem** | [FolderRid](docs/v2/Filesystem/models/FolderRid.md) | `from foundry_sdk.v2.filesystem.models import FolderRid` | +**Filesystem** | [FolderType](docs/v2/Filesystem/models/FolderType.md) | `from foundry_sdk.v2.filesystem.models import FolderType` | +**Filesystem** | [GetByPathResourcesBatchRequestElement](docs/v2/Filesystem/models/GetByPathResourcesBatchRequestElement.md) | `from foundry_sdk.v2.filesystem.models import GetByPathResourcesBatchRequestElement` | +**Filesystem** | [GetByPathResourcesBatchResponse](docs/v2/Filesystem/models/GetByPathResourcesBatchResponse.md) | `from foundry_sdk.v2.filesystem.models import GetByPathResourcesBatchResponse` | +**Filesystem** | [GetFoldersBatchRequestElement](docs/v2/Filesystem/models/GetFoldersBatchRequestElement.md) | `from foundry_sdk.v2.filesystem.models import GetFoldersBatchRequestElement` | +**Filesystem** | [GetFoldersBatchResponse](docs/v2/Filesystem/models/GetFoldersBatchResponse.md) | `from foundry_sdk.v2.filesystem.models import GetFoldersBatchResponse` | +**Filesystem** | [GetResourcesBatchRequestElement](docs/v2/Filesystem/models/GetResourcesBatchRequestElement.md) | `from foundry_sdk.v2.filesystem.models import GetResourcesBatchRequestElement` | +**Filesystem** | [GetResourcesBatchResponse](docs/v2/Filesystem/models/GetResourcesBatchResponse.md) | `from foundry_sdk.v2.filesystem.models import GetResourcesBatchResponse` | +**Filesystem** | [IsDirectlyApplied](docs/v2/Filesystem/models/IsDirectlyApplied.md) | `from foundry_sdk.v2.filesystem.models import IsDirectlyApplied` | +**Filesystem** | [ListChildrenOfFolderResponse](docs/v2/Filesystem/models/ListChildrenOfFolderResponse.md) | `from foundry_sdk.v2.filesystem.models import ListChildrenOfFolderResponse` | +**Filesystem** | [ListMarkingsOfResourceResponse](docs/v2/Filesystem/models/ListMarkingsOfResourceResponse.md) | `from foundry_sdk.v2.filesystem.models import ListMarkingsOfResourceResponse` | +**Filesystem** | [ListOrganizationsOfProjectResponse](docs/v2/Filesystem/models/ListOrganizationsOfProjectResponse.md) | `from foundry_sdk.v2.filesystem.models import ListOrganizationsOfProjectResponse` | +**Filesystem** | [ListResourceRolesResponse](docs/v2/Filesystem/models/ListResourceRolesResponse.md) | `from foundry_sdk.v2.filesystem.models import ListResourceRolesResponse` | +**Filesystem** | [ListSpacesResponse](docs/v2/Filesystem/models/ListSpacesResponse.md) | `from foundry_sdk.v2.filesystem.models import ListSpacesResponse` | +**Filesystem** | [Marking](docs/v2/Filesystem/models/Marking.md) | `from foundry_sdk.v2.filesystem.models import Marking` | +**Filesystem** | [Organization](docs/v2/Filesystem/models/Organization.md) | `from foundry_sdk.v2.filesystem.models import Organization` | +**Filesystem** | [PrincipalIdOnly](docs/v2/Filesystem/models/PrincipalIdOnly.md) | `from foundry_sdk.v2.filesystem.models import PrincipalIdOnly` | +**Filesystem** | [PrincipalWithId](docs/v2/Filesystem/models/PrincipalWithId.md) | `from foundry_sdk.v2.filesystem.models import PrincipalWithId` | +**Filesystem** | [Project](docs/v2/Filesystem/models/Project.md) | `from foundry_sdk.v2.filesystem.models import Project` | +**Filesystem** | [ProjectRid](docs/v2/Filesystem/models/ProjectRid.md) | `from foundry_sdk.v2.filesystem.models import ProjectRid` | +**Filesystem** | [ProjectTemplateRid](docs/v2/Filesystem/models/ProjectTemplateRid.md) | `from foundry_sdk.v2.filesystem.models import ProjectTemplateRid` | +**Filesystem** | [ProjectTemplateVariableId](docs/v2/Filesystem/models/ProjectTemplateVariableId.md) | `from foundry_sdk.v2.filesystem.models import ProjectTemplateVariableId` | +**Filesystem** | [ProjectTemplateVariableValue](docs/v2/Filesystem/models/ProjectTemplateVariableValue.md) | `from foundry_sdk.v2.filesystem.models import ProjectTemplateVariableValue` | +**Filesystem** | [RemoveMarkingsRequest](docs/v2/Filesystem/models/RemoveMarkingsRequest.md) | `from foundry_sdk.v2.filesystem.models import RemoveMarkingsRequest` | +**Filesystem** | [RemoveOrganizationsRequest](docs/v2/Filesystem/models/RemoveOrganizationsRequest.md) | `from foundry_sdk.v2.filesystem.models import RemoveOrganizationsRequest` | +**Filesystem** | [RemoveResourceRolesRequest](docs/v2/Filesystem/models/RemoveResourceRolesRequest.md) | `from foundry_sdk.v2.filesystem.models import RemoveResourceRolesRequest` | +**Filesystem** | [ReplaceProjectRequest](docs/v2/Filesystem/models/ReplaceProjectRequest.md) | `from foundry_sdk.v2.filesystem.models import ReplaceProjectRequest` | +**Filesystem** | [ReplaceSpaceRequest](docs/v2/Filesystem/models/ReplaceSpaceRequest.md) | `from foundry_sdk.v2.filesystem.models import ReplaceSpaceRequest` | +**Filesystem** | [Resource](docs/v2/Filesystem/models/Resource.md) | `from foundry_sdk.v2.filesystem.models import Resource` | +**Filesystem** | [ResourceDisplayName](docs/v2/Filesystem/models/ResourceDisplayName.md) | `from foundry_sdk.v2.filesystem.models import ResourceDisplayName` | +**Filesystem** | [ResourcePath](docs/v2/Filesystem/models/ResourcePath.md) | `from foundry_sdk.v2.filesystem.models import ResourcePath` | +**Filesystem** | [ResourceRid](docs/v2/Filesystem/models/ResourceRid.md) | `from foundry_sdk.v2.filesystem.models import ResourceRid` | +**Filesystem** | [ResourceRole](docs/v2/Filesystem/models/ResourceRole.md) | `from foundry_sdk.v2.filesystem.models import ResourceRole` | +**Filesystem** | [ResourceRoleIdentifier](docs/v2/Filesystem/models/ResourceRoleIdentifier.md) | `from foundry_sdk.v2.filesystem.models import ResourceRoleIdentifier` | +**Filesystem** | [ResourceRolePrincipal](docs/v2/Filesystem/models/ResourceRolePrincipal.md) | `from foundry_sdk.v2.filesystem.models import ResourceRolePrincipal` | +**Filesystem** | [ResourceRolePrincipalIdentifier](docs/v2/Filesystem/models/ResourceRolePrincipalIdentifier.md) | `from foundry_sdk.v2.filesystem.models import ResourceRolePrincipalIdentifier` | +**Filesystem** | [ResourceType](docs/v2/Filesystem/models/ResourceType.md) | `from foundry_sdk.v2.filesystem.models import ResourceType` | +**Filesystem** | [Space](docs/v2/Filesystem/models/Space.md) | `from foundry_sdk.v2.filesystem.models import Space` | +**Filesystem** | [SpaceMavenIdentifier](docs/v2/Filesystem/models/SpaceMavenIdentifier.md) | `from foundry_sdk.v2.filesystem.models import SpaceMavenIdentifier` | +**Filesystem** | [SpaceRid](docs/v2/Filesystem/models/SpaceRid.md) | `from foundry_sdk.v2.filesystem.models import SpaceRid` | +**Filesystem** | [TrashStatus](docs/v2/Filesystem/models/TrashStatus.md) | `from foundry_sdk.v2.filesystem.models import TrashStatus` | +**Filesystem** | [UsageAccountRid](docs/v2/Filesystem/models/UsageAccountRid.md) | `from foundry_sdk.v2.filesystem.models import UsageAccountRid` | +**Functions** | [ArrayConstraint](docs/v2/Functions/models/ArrayConstraint.md) | `from foundry_sdk.v2.functions.models import ArrayConstraint` | +**Functions** | [DataValue](docs/v2/Functions/models/DataValue.md) | `from foundry_sdk.v2.functions.models import DataValue` | +**Functions** | [EnumConstraint](docs/v2/Functions/models/EnumConstraint.md) | `from foundry_sdk.v2.functions.models import EnumConstraint` | +**Functions** | [ExecuteQueryRequest](docs/v2/Functions/models/ExecuteQueryRequest.md) | `from foundry_sdk.v2.functions.models import ExecuteQueryRequest` | +**Functions** | [ExecuteQueryResponse](docs/v2/Functions/models/ExecuteQueryResponse.md) | `from foundry_sdk.v2.functions.models import ExecuteQueryResponse` | +**Functions** | [FunctionRid](docs/v2/Functions/models/FunctionRid.md) | `from foundry_sdk.v2.functions.models import FunctionRid` | +**Functions** | [FunctionVersion](docs/v2/Functions/models/FunctionVersion.md) | `from foundry_sdk.v2.functions.models import FunctionVersion` | +**Functions** | [GetByRidQueriesRequest](docs/v2/Functions/models/GetByRidQueriesRequest.md) | `from foundry_sdk.v2.functions.models import GetByRidQueriesRequest` | +**Functions** | [LengthConstraint](docs/v2/Functions/models/LengthConstraint.md) | `from foundry_sdk.v2.functions.models import LengthConstraint` | +**Functions** | [MapConstraint](docs/v2/Functions/models/MapConstraint.md) | `from foundry_sdk.v2.functions.models import MapConstraint` | +**Functions** | [NullableConstraint](docs/v2/Functions/models/NullableConstraint.md) | `from foundry_sdk.v2.functions.models import NullableConstraint` | +**Functions** | [NullableConstraintValue](docs/v2/Functions/models/NullableConstraintValue.md) | `from foundry_sdk.v2.functions.models import NullableConstraintValue` | +**Functions** | [Parameter](docs/v2/Functions/models/Parameter.md) | `from foundry_sdk.v2.functions.models import Parameter` | +**Functions** | [ParameterId](docs/v2/Functions/models/ParameterId.md) | `from foundry_sdk.v2.functions.models import ParameterId` | +**Functions** | [Query](docs/v2/Functions/models/Query.md) | `from foundry_sdk.v2.functions.models import Query` | +**Functions** | [QueryAggregationKeyType](docs/v2/Functions/models/QueryAggregationKeyType.md) | `from foundry_sdk.v2.functions.models import QueryAggregationKeyType` | +**Functions** | [QueryAggregationRangeSubType](docs/v2/Functions/models/QueryAggregationRangeSubType.md) | `from foundry_sdk.v2.functions.models import QueryAggregationRangeSubType` | +**Functions** | [QueryAggregationRangeType](docs/v2/Functions/models/QueryAggregationRangeType.md) | `from foundry_sdk.v2.functions.models import QueryAggregationRangeType` | +**Functions** | [QueryAggregationValueType](docs/v2/Functions/models/QueryAggregationValueType.md) | `from foundry_sdk.v2.functions.models import QueryAggregationValueType` | +**Functions** | [QueryApiName](docs/v2/Functions/models/QueryApiName.md) | `from foundry_sdk.v2.functions.models import QueryApiName` | +**Functions** | [QueryArrayType](docs/v2/Functions/models/QueryArrayType.md) | `from foundry_sdk.v2.functions.models import QueryArrayType` | +**Functions** | [QueryDataType](docs/v2/Functions/models/QueryDataType.md) | `from foundry_sdk.v2.functions.models import QueryDataType` | +**Functions** | [QueryRuntimeErrorParameter](docs/v2/Functions/models/QueryRuntimeErrorParameter.md) | `from foundry_sdk.v2.functions.models import QueryRuntimeErrorParameter` | +**Functions** | [QuerySetType](docs/v2/Functions/models/QuerySetType.md) | `from foundry_sdk.v2.functions.models import QuerySetType` | +**Functions** | [QueryStructField](docs/v2/Functions/models/QueryStructField.md) | `from foundry_sdk.v2.functions.models import QueryStructField` | +**Functions** | [QueryStructType](docs/v2/Functions/models/QueryStructType.md) | `from foundry_sdk.v2.functions.models import QueryStructType` | +**Functions** | [QueryUnionType](docs/v2/Functions/models/QueryUnionType.md) | `from foundry_sdk.v2.functions.models import QueryUnionType` | +**Functions** | [RangesConstraint](docs/v2/Functions/models/RangesConstraint.md) | `from foundry_sdk.v2.functions.models import RangesConstraint` | +**Functions** | [RegexConstraint](docs/v2/Functions/models/RegexConstraint.md) | `from foundry_sdk.v2.functions.models import RegexConstraint` | +**Functions** | [RidConstraint](docs/v2/Functions/models/RidConstraint.md) | `from foundry_sdk.v2.functions.models import RidConstraint` | +**Functions** | [StreamingExecuteQueryRequest](docs/v2/Functions/models/StreamingExecuteQueryRequest.md) | `from foundry_sdk.v2.functions.models import StreamingExecuteQueryRequest` | +**Functions** | [StructConstraint](docs/v2/Functions/models/StructConstraint.md) | `from foundry_sdk.v2.functions.models import StructConstraint` | +**Functions** | [StructFieldApiName](docs/v2/Functions/models/StructFieldApiName.md) | `from foundry_sdk.v2.functions.models import StructFieldApiName` | +**Functions** | [StructFieldName](docs/v2/Functions/models/StructFieldName.md) | `from foundry_sdk.v2.functions.models import StructFieldName` | +**Functions** | [StructV1Constraint](docs/v2/Functions/models/StructV1Constraint.md) | `from foundry_sdk.v2.functions.models import StructV1Constraint` | +**Functions** | [ThreeDimensionalAggregation](docs/v2/Functions/models/ThreeDimensionalAggregation.md) | `from foundry_sdk.v2.functions.models import ThreeDimensionalAggregation` | +**Functions** | [TransactionId](docs/v2/Functions/models/TransactionId.md) | `from foundry_sdk.v2.functions.models import TransactionId` | +**Functions** | [TwoDimensionalAggregation](docs/v2/Functions/models/TwoDimensionalAggregation.md) | `from foundry_sdk.v2.functions.models import TwoDimensionalAggregation` | +**Functions** | [UuidConstraint](docs/v2/Functions/models/UuidConstraint.md) | `from foundry_sdk.v2.functions.models import UuidConstraint` | +**Functions** | [ValueType](docs/v2/Functions/models/ValueType.md) | `from foundry_sdk.v2.functions.models import ValueType` | +**Functions** | [ValueTypeApiName](docs/v2/Functions/models/ValueTypeApiName.md) | `from foundry_sdk.v2.functions.models import ValueTypeApiName` | +**Functions** | [ValueTypeConstraint](docs/v2/Functions/models/ValueTypeConstraint.md) | `from foundry_sdk.v2.functions.models import ValueTypeConstraint` | +**Functions** | [ValueTypeDataType](docs/v2/Functions/models/ValueTypeDataType.md) | `from foundry_sdk.v2.functions.models import ValueTypeDataType` | +**Functions** | [ValueTypeDataTypeArrayType](docs/v2/Functions/models/ValueTypeDataTypeArrayType.md) | `from foundry_sdk.v2.functions.models import ValueTypeDataTypeArrayType` | +**Functions** | [ValueTypeDataTypeBinaryType](docs/v2/Functions/models/ValueTypeDataTypeBinaryType.md) | `from foundry_sdk.v2.functions.models import ValueTypeDataTypeBinaryType` | +**Functions** | [ValueTypeDataTypeBooleanType](docs/v2/Functions/models/ValueTypeDataTypeBooleanType.md) | `from foundry_sdk.v2.functions.models import ValueTypeDataTypeBooleanType` | +**Functions** | [ValueTypeDataTypeByteType](docs/v2/Functions/models/ValueTypeDataTypeByteType.md) | `from foundry_sdk.v2.functions.models import ValueTypeDataTypeByteType` | +**Functions** | [ValueTypeDataTypeDateType](docs/v2/Functions/models/ValueTypeDataTypeDateType.md) | `from foundry_sdk.v2.functions.models import ValueTypeDataTypeDateType` | +**Functions** | [ValueTypeDataTypeDecimalType](docs/v2/Functions/models/ValueTypeDataTypeDecimalType.md) | `from foundry_sdk.v2.functions.models import ValueTypeDataTypeDecimalType` | +**Functions** | [ValueTypeDataTypeDoubleType](docs/v2/Functions/models/ValueTypeDataTypeDoubleType.md) | `from foundry_sdk.v2.functions.models import ValueTypeDataTypeDoubleType` | +**Functions** | [ValueTypeDataTypeFloatType](docs/v2/Functions/models/ValueTypeDataTypeFloatType.md) | `from foundry_sdk.v2.functions.models import ValueTypeDataTypeFloatType` | +**Functions** | [ValueTypeDataTypeIntegerType](docs/v2/Functions/models/ValueTypeDataTypeIntegerType.md) | `from foundry_sdk.v2.functions.models import ValueTypeDataTypeIntegerType` | +**Functions** | [ValueTypeDataTypeLongType](docs/v2/Functions/models/ValueTypeDataTypeLongType.md) | `from foundry_sdk.v2.functions.models import ValueTypeDataTypeLongType` | +**Functions** | [ValueTypeDataTypeMapType](docs/v2/Functions/models/ValueTypeDataTypeMapType.md) | `from foundry_sdk.v2.functions.models import ValueTypeDataTypeMapType` | +**Functions** | [ValueTypeDataTypeOptionalType](docs/v2/Functions/models/ValueTypeDataTypeOptionalType.md) | `from foundry_sdk.v2.functions.models import ValueTypeDataTypeOptionalType` | +**Functions** | [ValueTypeDataTypeShortType](docs/v2/Functions/models/ValueTypeDataTypeShortType.md) | `from foundry_sdk.v2.functions.models import ValueTypeDataTypeShortType` | +**Functions** | [ValueTypeDataTypeStringType](docs/v2/Functions/models/ValueTypeDataTypeStringType.md) | `from foundry_sdk.v2.functions.models import ValueTypeDataTypeStringType` | +**Functions** | [ValueTypeDataTypeStructElement](docs/v2/Functions/models/ValueTypeDataTypeStructElement.md) | `from foundry_sdk.v2.functions.models import ValueTypeDataTypeStructElement` | +**Functions** | [ValueTypeDataTypeStructFieldIdentifier](docs/v2/Functions/models/ValueTypeDataTypeStructFieldIdentifier.md) | `from foundry_sdk.v2.functions.models import ValueTypeDataTypeStructFieldIdentifier` | +**Functions** | [ValueTypeDataTypeStructType](docs/v2/Functions/models/ValueTypeDataTypeStructType.md) | `from foundry_sdk.v2.functions.models import ValueTypeDataTypeStructType` | +**Functions** | [ValueTypeDataTypeTimestampType](docs/v2/Functions/models/ValueTypeDataTypeTimestampType.md) | `from foundry_sdk.v2.functions.models import ValueTypeDataTypeTimestampType` | +**Functions** | [ValueTypeDataTypeUnionType](docs/v2/Functions/models/ValueTypeDataTypeUnionType.md) | `from foundry_sdk.v2.functions.models import ValueTypeDataTypeUnionType` | +**Functions** | [ValueTypeDataTypeValueTypeReference](docs/v2/Functions/models/ValueTypeDataTypeValueTypeReference.md) | `from foundry_sdk.v2.functions.models import ValueTypeDataTypeValueTypeReference` | +**Functions** | [ValueTypeDescription](docs/v2/Functions/models/ValueTypeDescription.md) | `from foundry_sdk.v2.functions.models import ValueTypeDescription` | +**Functions** | [ValueTypeReference](docs/v2/Functions/models/ValueTypeReference.md) | `from foundry_sdk.v2.functions.models import ValueTypeReference` | +**Functions** | [ValueTypeRid](docs/v2/Functions/models/ValueTypeRid.md) | `from foundry_sdk.v2.functions.models import ValueTypeRid` | +**Functions** | [ValueTypeVersion](docs/v2/Functions/models/ValueTypeVersion.md) | `from foundry_sdk.v2.functions.models import ValueTypeVersion` | +**Functions** | [ValueTypeVersionId](docs/v2/Functions/models/ValueTypeVersionId.md) | `from foundry_sdk.v2.functions.models import ValueTypeVersionId` | +**Functions** | [VersionId](docs/v2/Functions/models/VersionId.md) | `from foundry_sdk.v2.functions.models import VersionId` | +**Geo** | [BBox](docs/v2/Geo/models/BBox.md) | `from foundry_sdk.v2.geo.models import BBox` | +**Geo** | [Coordinate](docs/v2/Geo/models/Coordinate.md) | `from foundry_sdk.v2.geo.models import Coordinate` | +**Geo** | [Feature](docs/v2/Geo/models/Feature.md) | `from foundry_sdk.v2.geo.models import Feature` | +**Geo** | [FeatureCollection](docs/v2/Geo/models/FeatureCollection.md) | `from foundry_sdk.v2.geo.models import FeatureCollection` | +**Geo** | [FeatureCollectionTypes](docs/v2/Geo/models/FeatureCollectionTypes.md) | `from foundry_sdk.v2.geo.models import FeatureCollectionTypes` | +**Geo** | [FeaturePropertyKey](docs/v2/Geo/models/FeaturePropertyKey.md) | `from foundry_sdk.v2.geo.models import FeaturePropertyKey` | +**Geo** | [Geometry](docs/v2/Geo/models/Geometry.md) | `from foundry_sdk.v2.geo.models import Geometry` | +**Geo** | [GeometryCollection](docs/v2/Geo/models/GeometryCollection.md) | `from foundry_sdk.v2.geo.models import GeometryCollection` | +**Geo** | [GeoPoint](docs/v2/Geo/models/GeoPoint.md) | `from foundry_sdk.v2.geo.models import GeoPoint` | +**Geo** | [LinearRing](docs/v2/Geo/models/LinearRing.md) | `from foundry_sdk.v2.geo.models import LinearRing` | +**Geo** | [LineString](docs/v2/Geo/models/LineString.md) | `from foundry_sdk.v2.geo.models import LineString` | +**Geo** | [LineStringCoordinates](docs/v2/Geo/models/LineStringCoordinates.md) | `from foundry_sdk.v2.geo.models import LineStringCoordinates` | +**Geo** | [MultiLineString](docs/v2/Geo/models/MultiLineString.md) | `from foundry_sdk.v2.geo.models import MultiLineString` | +**Geo** | [MultiPoint](docs/v2/Geo/models/MultiPoint.md) | `from foundry_sdk.v2.geo.models import MultiPoint` | +**Geo** | [MultiPolygon](docs/v2/Geo/models/MultiPolygon.md) | `from foundry_sdk.v2.geo.models import MultiPolygon` | +**Geo** | [Polygon](docs/v2/Geo/models/Polygon.md) | `from foundry_sdk.v2.geo.models import Polygon` | +**Geo** | [Position](docs/v2/Geo/models/Position.md) | `from foundry_sdk.v2.geo.models import Position` | +**LanguageModels** | [AnthropicAnyToolChoice](docs/v2/LanguageModels/models/AnthropicAnyToolChoice.md) | `from foundry_sdk.v2.language_models.models import AnthropicAnyToolChoice` | +**LanguageModels** | [AnthropicAutoToolChoice](docs/v2/LanguageModels/models/AnthropicAutoToolChoice.md) | `from foundry_sdk.v2.language_models.models import AnthropicAutoToolChoice` | +**LanguageModels** | [AnthropicBase64PdfDocumentSource](docs/v2/LanguageModels/models/AnthropicBase64PdfDocumentSource.md) | `from foundry_sdk.v2.language_models.models import AnthropicBase64PdfDocumentSource` | +**LanguageModels** | [AnthropicCacheControl](docs/v2/LanguageModels/models/AnthropicCacheControl.md) | `from foundry_sdk.v2.language_models.models import AnthropicCacheControl` | +**LanguageModels** | [AnthropicCharacterLocationCitation](docs/v2/LanguageModels/models/AnthropicCharacterLocationCitation.md) | `from foundry_sdk.v2.language_models.models import AnthropicCharacterLocationCitation` | +**LanguageModels** | [AnthropicCompletionCitation](docs/v2/LanguageModels/models/AnthropicCompletionCitation.md) | `from foundry_sdk.v2.language_models.models import AnthropicCompletionCitation` | +**LanguageModels** | [AnthropicCompletionContent](docs/v2/LanguageModels/models/AnthropicCompletionContent.md) | `from foundry_sdk.v2.language_models.models import AnthropicCompletionContent` | +**LanguageModels** | [AnthropicCompletionRedactedThinking](docs/v2/LanguageModels/models/AnthropicCompletionRedactedThinking.md) | `from foundry_sdk.v2.language_models.models import AnthropicCompletionRedactedThinking` | +**LanguageModels** | [AnthropicCompletionText](docs/v2/LanguageModels/models/AnthropicCompletionText.md) | `from foundry_sdk.v2.language_models.models import AnthropicCompletionText` | +**LanguageModels** | [AnthropicCompletionThinking](docs/v2/LanguageModels/models/AnthropicCompletionThinking.md) | `from foundry_sdk.v2.language_models.models import AnthropicCompletionThinking` | +**LanguageModels** | [AnthropicCompletionToolUse](docs/v2/LanguageModels/models/AnthropicCompletionToolUse.md) | `from foundry_sdk.v2.language_models.models import AnthropicCompletionToolUse` | +**LanguageModels** | [AnthropicCustomTool](docs/v2/LanguageModels/models/AnthropicCustomTool.md) | `from foundry_sdk.v2.language_models.models import AnthropicCustomTool` | +**LanguageModels** | [AnthropicDisabledThinking](docs/v2/LanguageModels/models/AnthropicDisabledThinking.md) | `from foundry_sdk.v2.language_models.models import AnthropicDisabledThinking` | +**LanguageModels** | [AnthropicDisableParallelToolUse](docs/v2/LanguageModels/models/AnthropicDisableParallelToolUse.md) | `from foundry_sdk.v2.language_models.models import AnthropicDisableParallelToolUse` | +**LanguageModels** | [AnthropicDocument](docs/v2/LanguageModels/models/AnthropicDocument.md) | `from foundry_sdk.v2.language_models.models import AnthropicDocument` | +**LanguageModels** | [AnthropicDocumentCitations](docs/v2/LanguageModels/models/AnthropicDocumentCitations.md) | `from foundry_sdk.v2.language_models.models import AnthropicDocumentCitations` | +**LanguageModels** | [AnthropicDocumentSource](docs/v2/LanguageModels/models/AnthropicDocumentSource.md) | `from foundry_sdk.v2.language_models.models import AnthropicDocumentSource` | +**LanguageModels** | [AnthropicEnabledThinking](docs/v2/LanguageModels/models/AnthropicEnabledThinking.md) | `from foundry_sdk.v2.language_models.models import AnthropicEnabledThinking` | +**LanguageModels** | [AnthropicEphemeralCacheControl](docs/v2/LanguageModels/models/AnthropicEphemeralCacheControl.md) | `from foundry_sdk.v2.language_models.models import AnthropicEphemeralCacheControl` | +**LanguageModels** | [AnthropicImage](docs/v2/LanguageModels/models/AnthropicImage.md) | `from foundry_sdk.v2.language_models.models import AnthropicImage` | +**LanguageModels** | [AnthropicImageBase64Source](docs/v2/LanguageModels/models/AnthropicImageBase64Source.md) | `from foundry_sdk.v2.language_models.models import AnthropicImageBase64Source` | +**LanguageModels** | [AnthropicImageSource](docs/v2/LanguageModels/models/AnthropicImageSource.md) | `from foundry_sdk.v2.language_models.models import AnthropicImageSource` | +**LanguageModels** | [AnthropicMediaType](docs/v2/LanguageModels/models/AnthropicMediaType.md) | `from foundry_sdk.v2.language_models.models import AnthropicMediaType` | +**LanguageModels** | [AnthropicMessage](docs/v2/LanguageModels/models/AnthropicMessage.md) | `from foundry_sdk.v2.language_models.models import AnthropicMessage` | +**LanguageModels** | [AnthropicMessageContent](docs/v2/LanguageModels/models/AnthropicMessageContent.md) | `from foundry_sdk.v2.language_models.models import AnthropicMessageContent` | +**LanguageModels** | [AnthropicMessageRole](docs/v2/LanguageModels/models/AnthropicMessageRole.md) | `from foundry_sdk.v2.language_models.models import AnthropicMessageRole` | +**LanguageModels** | [AnthropicMessagesRequest](docs/v2/LanguageModels/models/AnthropicMessagesRequest.md) | `from foundry_sdk.v2.language_models.models import AnthropicMessagesRequest` | +**LanguageModels** | [AnthropicMessagesResponse](docs/v2/LanguageModels/models/AnthropicMessagesResponse.md) | `from foundry_sdk.v2.language_models.models import AnthropicMessagesResponse` | +**LanguageModels** | [AnthropicNoneToolChoice](docs/v2/LanguageModels/models/AnthropicNoneToolChoice.md) | `from foundry_sdk.v2.language_models.models import AnthropicNoneToolChoice` | +**LanguageModels** | [AnthropicRedactedThinking](docs/v2/LanguageModels/models/AnthropicRedactedThinking.md) | `from foundry_sdk.v2.language_models.models import AnthropicRedactedThinking` | +**LanguageModels** | [AnthropicSystemMessage](docs/v2/LanguageModels/models/AnthropicSystemMessage.md) | `from foundry_sdk.v2.language_models.models import AnthropicSystemMessage` | +**LanguageModels** | [AnthropicText](docs/v2/LanguageModels/models/AnthropicText.md) | `from foundry_sdk.v2.language_models.models import AnthropicText` | +**LanguageModels** | [AnthropicTextDocumentSource](docs/v2/LanguageModels/models/AnthropicTextDocumentSource.md) | `from foundry_sdk.v2.language_models.models import AnthropicTextDocumentSource` | +**LanguageModels** | [AnthropicThinking](docs/v2/LanguageModels/models/AnthropicThinking.md) | `from foundry_sdk.v2.language_models.models import AnthropicThinking` | +**LanguageModels** | [AnthropicThinkingConfig](docs/v2/LanguageModels/models/AnthropicThinkingConfig.md) | `from foundry_sdk.v2.language_models.models import AnthropicThinkingConfig` | +**LanguageModels** | [AnthropicTokenUsage](docs/v2/LanguageModels/models/AnthropicTokenUsage.md) | `from foundry_sdk.v2.language_models.models import AnthropicTokenUsage` | +**LanguageModels** | [AnthropicTool](docs/v2/LanguageModels/models/AnthropicTool.md) | `from foundry_sdk.v2.language_models.models import AnthropicTool` | +**LanguageModels** | [AnthropicToolChoice](docs/v2/LanguageModels/models/AnthropicToolChoice.md) | `from foundry_sdk.v2.language_models.models import AnthropicToolChoice` | +**LanguageModels** | [AnthropicToolResult](docs/v2/LanguageModels/models/AnthropicToolResult.md) | `from foundry_sdk.v2.language_models.models import AnthropicToolResult` | +**LanguageModels** | [AnthropicToolResultContent](docs/v2/LanguageModels/models/AnthropicToolResultContent.md) | `from foundry_sdk.v2.language_models.models import AnthropicToolResultContent` | +**LanguageModels** | [AnthropicToolToolChoice](docs/v2/LanguageModels/models/AnthropicToolToolChoice.md) | `from foundry_sdk.v2.language_models.models import AnthropicToolToolChoice` | +**LanguageModels** | [AnthropicToolUse](docs/v2/LanguageModels/models/AnthropicToolUse.md) | `from foundry_sdk.v2.language_models.models import AnthropicToolUse` | +**LanguageModels** | [JsonSchema](docs/v2/LanguageModels/models/JsonSchema.md) | `from foundry_sdk.v2.language_models.models import JsonSchema` | +**LanguageModels** | [LanguageModelApiName](docs/v2/LanguageModels/models/LanguageModelApiName.md) | `from foundry_sdk.v2.language_models.models import LanguageModelApiName` | +**LanguageModels** | [OpenAiEmbeddingInput](docs/v2/LanguageModels/models/OpenAiEmbeddingInput.md) | `from foundry_sdk.v2.language_models.models import OpenAiEmbeddingInput` | +**LanguageModels** | [OpenAiEmbeddingsRequest](docs/v2/LanguageModels/models/OpenAiEmbeddingsRequest.md) | `from foundry_sdk.v2.language_models.models import OpenAiEmbeddingsRequest` | +**LanguageModels** | [OpenAiEmbeddingsResponse](docs/v2/LanguageModels/models/OpenAiEmbeddingsResponse.md) | `from foundry_sdk.v2.language_models.models import OpenAiEmbeddingsResponse` | +**LanguageModels** | [OpenAiEmbeddingTokenUsage](docs/v2/LanguageModels/models/OpenAiEmbeddingTokenUsage.md) | `from foundry_sdk.v2.language_models.models import OpenAiEmbeddingTokenUsage` | +**LanguageModels** | [OpenAiEncodingFormat](docs/v2/LanguageModels/models/OpenAiEncodingFormat.md) | `from foundry_sdk.v2.language_models.models import OpenAiEncodingFormat` | +**MediaSets** | [BranchName](docs/v2/MediaSets/models/BranchName.md) | `from foundry_sdk.v2.media_sets.models import BranchName` | +**MediaSets** | [BranchRid](docs/v2/MediaSets/models/BranchRid.md) | `from foundry_sdk.v2.media_sets.models import BranchRid` | +**MediaSets** | [GetMediaItemInfoResponse](docs/v2/MediaSets/models/GetMediaItemInfoResponse.md) | `from foundry_sdk.v2.media_sets.models import GetMediaItemInfoResponse` | +**MediaSets** | [GetMediaItemRidByPathResponse](docs/v2/MediaSets/models/GetMediaItemRidByPathResponse.md) | `from foundry_sdk.v2.media_sets.models import GetMediaItemRidByPathResponse` | +**MediaSets** | [LogicalTimestamp](docs/v2/MediaSets/models/LogicalTimestamp.md) | `from foundry_sdk.v2.media_sets.models import LogicalTimestamp` | +**MediaSets** | [MediaAttribution](docs/v2/MediaSets/models/MediaAttribution.md) | `from foundry_sdk.v2.media_sets.models import MediaAttribution` | +**MediaSets** | [MediaItemXmlFormat](docs/v2/MediaSets/models/MediaItemXmlFormat.md) | `from foundry_sdk.v2.media_sets.models import MediaItemXmlFormat` | +**MediaSets** | [PutMediaItemResponse](docs/v2/MediaSets/models/PutMediaItemResponse.md) | `from foundry_sdk.v2.media_sets.models import PutMediaItemResponse` | +**MediaSets** | [TrackedTransformationFailedResponse](docs/v2/MediaSets/models/TrackedTransformationFailedResponse.md) | `from foundry_sdk.v2.media_sets.models import TrackedTransformationFailedResponse` | +**MediaSets** | [TrackedTransformationPendingResponse](docs/v2/MediaSets/models/TrackedTransformationPendingResponse.md) | `from foundry_sdk.v2.media_sets.models import TrackedTransformationPendingResponse` | +**MediaSets** | [TrackedTransformationResponse](docs/v2/MediaSets/models/TrackedTransformationResponse.md) | `from foundry_sdk.v2.media_sets.models import TrackedTransformationResponse` | +**MediaSets** | [TrackedTransformationSuccessfulResponse](docs/v2/MediaSets/models/TrackedTransformationSuccessfulResponse.md) | `from foundry_sdk.v2.media_sets.models import TrackedTransformationSuccessfulResponse` | +**MediaSets** | [TransactionId](docs/v2/MediaSets/models/TransactionId.md) | `from foundry_sdk.v2.media_sets.models import TransactionId` | +**Models** | [CreateModelRequest](docs/v2/Models/models/CreateModelRequest.md) | `from foundry_sdk.v2.models.models import CreateModelRequest` | +**Models** | [CreateModelVersionRequest](docs/v2/Models/models/CreateModelVersionRequest.md) | `from foundry_sdk.v2.models.models import CreateModelVersionRequest` | +**Models** | [DillModelFiles](docs/v2/Models/models/DillModelFiles.md) | `from foundry_sdk.v2.models.models import DillModelFiles` | +**Models** | [ListModelVersionsResponse](docs/v2/Models/models/ListModelVersionsResponse.md) | `from foundry_sdk.v2.models.models import ListModelVersionsResponse` | +**Models** | [Model](docs/v2/Models/models/Model.md) | `from foundry_sdk.v2.models.models import Model` | +**Models** | [ModelApi](docs/v2/Models/models/ModelApi.md) | `from foundry_sdk.v2.models.models import ModelApi` | +**Models** | [ModelApiAnyType](docs/v2/Models/models/ModelApiAnyType.md) | `from foundry_sdk.v2.models.models import ModelApiAnyType` | +**Models** | [ModelApiArrayType](docs/v2/Models/models/ModelApiArrayType.md) | `from foundry_sdk.v2.models.models import ModelApiArrayType` | +**Models** | [ModelApiColumn](docs/v2/Models/models/ModelApiColumn.md) | `from foundry_sdk.v2.models.models import ModelApiColumn` | +**Models** | [ModelApiDataType](docs/v2/Models/models/ModelApiDataType.md) | `from foundry_sdk.v2.models.models import ModelApiDataType` | +**Models** | [ModelApiInput](docs/v2/Models/models/ModelApiInput.md) | `from foundry_sdk.v2.models.models import ModelApiInput` | +**Models** | [ModelApiMapType](docs/v2/Models/models/ModelApiMapType.md) | `from foundry_sdk.v2.models.models import ModelApiMapType` | +**Models** | [ModelApiOutput](docs/v2/Models/models/ModelApiOutput.md) | `from foundry_sdk.v2.models.models import ModelApiOutput` | +**Models** | [ModelApiParameterType](docs/v2/Models/models/ModelApiParameterType.md) | `from foundry_sdk.v2.models.models import ModelApiParameterType` | +**Models** | [ModelApiTabularFormat](docs/v2/Models/models/ModelApiTabularFormat.md) | `from foundry_sdk.v2.models.models import ModelApiTabularFormat` | +**Models** | [ModelApiTabularType](docs/v2/Models/models/ModelApiTabularType.md) | `from foundry_sdk.v2.models.models import ModelApiTabularType` | +**Models** | [ModelFiles](docs/v2/Models/models/ModelFiles.md) | `from foundry_sdk.v2.models.models import ModelFiles` | +**Models** | [ModelName](docs/v2/Models/models/ModelName.md) | `from foundry_sdk.v2.models.models import ModelName` | +**Models** | [ModelRid](docs/v2/Models/models/ModelRid.md) | `from foundry_sdk.v2.models.models import ModelRid` | +**Models** | [ModelVersion](docs/v2/Models/models/ModelVersion.md) | `from foundry_sdk.v2.models.models import ModelVersion` | +**Models** | [ModelVersionRid](docs/v2/Models/models/ModelVersionRid.md) | `from foundry_sdk.v2.models.models import ModelVersionRid` | +**Ontologies** | [AbsoluteTimeRange](docs/v2/Ontologies/models/AbsoluteTimeRange.md) | `from foundry_sdk.v2.ontologies.models import AbsoluteTimeRange` | +**Ontologies** | [AbsoluteValuePropertyExpression](docs/v2/Ontologies/models/AbsoluteValuePropertyExpression.md) | `from foundry_sdk.v2.ontologies.models import AbsoluteValuePropertyExpression` | +**Ontologies** | [ActionExecutionTime](docs/v2/Ontologies/models/ActionExecutionTime.md) | `from foundry_sdk.v2.ontologies.models import ActionExecutionTime` | +**Ontologies** | [ActionLogicRule](docs/v2/Ontologies/models/ActionLogicRule.md) | `from foundry_sdk.v2.ontologies.models import ActionLogicRule` | +**Ontologies** | [ActionParameterArrayType](docs/v2/Ontologies/models/ActionParameterArrayType.md) | `from foundry_sdk.v2.ontologies.models import ActionParameterArrayType` | +**Ontologies** | [ActionParameterType](docs/v2/Ontologies/models/ActionParameterType.md) | `from foundry_sdk.v2.ontologies.models import ActionParameterType` | +**Ontologies** | [ActionParameterV2](docs/v2/Ontologies/models/ActionParameterV2.md) | `from foundry_sdk.v2.ontologies.models import ActionParameterV2` | +**Ontologies** | [ActionResults](docs/v2/Ontologies/models/ActionResults.md) | `from foundry_sdk.v2.ontologies.models import ActionResults` | +**Ontologies** | [ActionRid](docs/v2/Ontologies/models/ActionRid.md) | `from foundry_sdk.v2.ontologies.models import ActionRid` | +**Ontologies** | [ActionTypeApiName](docs/v2/Ontologies/models/ActionTypeApiName.md) | `from foundry_sdk.v2.ontologies.models import ActionTypeApiName` | +**Ontologies** | [ActionTypeFullMetadata](docs/v2/Ontologies/models/ActionTypeFullMetadata.md) | `from foundry_sdk.v2.ontologies.models import ActionTypeFullMetadata` | +**Ontologies** | [ActionTypeRid](docs/v2/Ontologies/models/ActionTypeRid.md) | `from foundry_sdk.v2.ontologies.models import ActionTypeRid` | +**Ontologies** | [ActionTypeV2](docs/v2/Ontologies/models/ActionTypeV2.md) | `from foundry_sdk.v2.ontologies.models import ActionTypeV2` | +**Ontologies** | [ActivePropertyTypeStatus](docs/v2/Ontologies/models/ActivePropertyTypeStatus.md) | `from foundry_sdk.v2.ontologies.models import ActivePropertyTypeStatus` | +**Ontologies** | [AddLink](docs/v2/Ontologies/models/AddLink.md) | `from foundry_sdk.v2.ontologies.models import AddLink` | +**Ontologies** | [AddLinkEdit](docs/v2/Ontologies/models/AddLinkEdit.md) | `from foundry_sdk.v2.ontologies.models import AddLinkEdit` | +**Ontologies** | [AddObject](docs/v2/Ontologies/models/AddObject.md) | `from foundry_sdk.v2.ontologies.models import AddObject` | +**Ontologies** | [AddObjectEdit](docs/v2/Ontologies/models/AddObjectEdit.md) | `from foundry_sdk.v2.ontologies.models import AddObjectEdit` | +**Ontologies** | [AddPropertyExpression](docs/v2/Ontologies/models/AddPropertyExpression.md) | `from foundry_sdk.v2.ontologies.models import AddPropertyExpression` | +**Ontologies** | [Affix](docs/v2/Ontologies/models/Affix.md) | `from foundry_sdk.v2.ontologies.models import Affix` | +**Ontologies** | [AggregateObjectSetRequestV2](docs/v2/Ontologies/models/AggregateObjectSetRequestV2.md) | `from foundry_sdk.v2.ontologies.models import AggregateObjectSetRequestV2` | +**Ontologies** | [AggregateObjectsRequestV2](docs/v2/Ontologies/models/AggregateObjectsRequestV2.md) | `from foundry_sdk.v2.ontologies.models import AggregateObjectsRequestV2` | +**Ontologies** | [AggregateObjectsResponseItemV2](docs/v2/Ontologies/models/AggregateObjectsResponseItemV2.md) | `from foundry_sdk.v2.ontologies.models import AggregateObjectsResponseItemV2` | +**Ontologies** | [AggregateObjectsResponseV2](docs/v2/Ontologies/models/AggregateObjectsResponseV2.md) | `from foundry_sdk.v2.ontologies.models import AggregateObjectsResponseV2` | +**Ontologies** | [AggregateTimeSeries](docs/v2/Ontologies/models/AggregateTimeSeries.md) | `from foundry_sdk.v2.ontologies.models import AggregateTimeSeries` | +**Ontologies** | [AggregationAccuracy](docs/v2/Ontologies/models/AggregationAccuracy.md) | `from foundry_sdk.v2.ontologies.models import AggregationAccuracy` | +**Ontologies** | [AggregationAccuracyRequest](docs/v2/Ontologies/models/AggregationAccuracyRequest.md) | `from foundry_sdk.v2.ontologies.models import AggregationAccuracyRequest` | +**Ontologies** | [AggregationDurationGroupingV2](docs/v2/Ontologies/models/AggregationDurationGroupingV2.md) | `from foundry_sdk.v2.ontologies.models import AggregationDurationGroupingV2` | +**Ontologies** | [AggregationExactGroupingV2](docs/v2/Ontologies/models/AggregationExactGroupingV2.md) | `from foundry_sdk.v2.ontologies.models import AggregationExactGroupingV2` | +**Ontologies** | [AggregationFixedWidthGroupingV2](docs/v2/Ontologies/models/AggregationFixedWidthGroupingV2.md) | `from foundry_sdk.v2.ontologies.models import AggregationFixedWidthGroupingV2` | +**Ontologies** | [AggregationGroupByV2](docs/v2/Ontologies/models/AggregationGroupByV2.md) | `from foundry_sdk.v2.ontologies.models import AggregationGroupByV2` | +**Ontologies** | [AggregationGroupKeyV2](docs/v2/Ontologies/models/AggregationGroupKeyV2.md) | `from foundry_sdk.v2.ontologies.models import AggregationGroupKeyV2` | +**Ontologies** | [AggregationGroupValueV2](docs/v2/Ontologies/models/AggregationGroupValueV2.md) | `from foundry_sdk.v2.ontologies.models import AggregationGroupValueV2` | +**Ontologies** | [AggregationMetricName](docs/v2/Ontologies/models/AggregationMetricName.md) | `from foundry_sdk.v2.ontologies.models import AggregationMetricName` | +**Ontologies** | [AggregationMetricResultV2](docs/v2/Ontologies/models/AggregationMetricResultV2.md) | `from foundry_sdk.v2.ontologies.models import AggregationMetricResultV2` | +**Ontologies** | [AggregationRangesGroupingV2](docs/v2/Ontologies/models/AggregationRangesGroupingV2.md) | `from foundry_sdk.v2.ontologies.models import AggregationRangesGroupingV2` | +**Ontologies** | [AggregationRangeV2](docs/v2/Ontologies/models/AggregationRangeV2.md) | `from foundry_sdk.v2.ontologies.models import AggregationRangeV2` | +**Ontologies** | [AggregationV2](docs/v2/Ontologies/models/AggregationV2.md) | `from foundry_sdk.v2.ontologies.models import AggregationV2` | +**Ontologies** | [AllOfRule](docs/v2/Ontologies/models/AllOfRule.md) | `from foundry_sdk.v2.ontologies.models import AllOfRule` | +**Ontologies** | [AndQueryV2](docs/v2/Ontologies/models/AndQueryV2.md) | `from foundry_sdk.v2.ontologies.models import AndQueryV2` | +**Ontologies** | [AnyOfRule](docs/v2/Ontologies/models/AnyOfRule.md) | `from foundry_sdk.v2.ontologies.models import AnyOfRule` | +**Ontologies** | [ApplyActionMode](docs/v2/Ontologies/models/ApplyActionMode.md) | `from foundry_sdk.v2.ontologies.models import ApplyActionMode` | +**Ontologies** | [ApplyActionOverrides](docs/v2/Ontologies/models/ApplyActionOverrides.md) | `from foundry_sdk.v2.ontologies.models import ApplyActionOverrides` | +**Ontologies** | [ApplyActionRequestOptions](docs/v2/Ontologies/models/ApplyActionRequestOptions.md) | `from foundry_sdk.v2.ontologies.models import ApplyActionRequestOptions` | +**Ontologies** | [ApplyActionRequestV2](docs/v2/Ontologies/models/ApplyActionRequestV2.md) | `from foundry_sdk.v2.ontologies.models import ApplyActionRequestV2` | +**Ontologies** | [ApplyActionWithOverridesRequest](docs/v2/Ontologies/models/ApplyActionWithOverridesRequest.md) | `from foundry_sdk.v2.ontologies.models import ApplyActionWithOverridesRequest` | +**Ontologies** | [ApplyReducersAndExtractMainValueLoadLevel](docs/v2/Ontologies/models/ApplyReducersAndExtractMainValueLoadLevel.md) | `from foundry_sdk.v2.ontologies.models import ApplyReducersAndExtractMainValueLoadLevel` | +**Ontologies** | [ApplyReducersLoadLevel](docs/v2/Ontologies/models/ApplyReducersLoadLevel.md) | `from foundry_sdk.v2.ontologies.models import ApplyReducersLoadLevel` | +**Ontologies** | [ApproximateDistinctAggregationV2](docs/v2/Ontologies/models/ApproximateDistinctAggregationV2.md) | `from foundry_sdk.v2.ontologies.models import ApproximateDistinctAggregationV2` | +**Ontologies** | [ApproximatePercentileAggregationV2](docs/v2/Ontologies/models/ApproximatePercentileAggregationV2.md) | `from foundry_sdk.v2.ontologies.models import ApproximatePercentileAggregationV2` | +**Ontologies** | [ArrayConstraint](docs/v2/Ontologies/models/ArrayConstraint.md) | `from foundry_sdk.v2.ontologies.models import ArrayConstraint` | +**Ontologies** | [ArrayEntryEvaluatedConstraint](docs/v2/Ontologies/models/ArrayEntryEvaluatedConstraint.md) | `from foundry_sdk.v2.ontologies.models import ArrayEntryEvaluatedConstraint` | +**Ontologies** | [ArrayEvaluatedConstraint](docs/v2/Ontologies/models/ArrayEvaluatedConstraint.md) | `from foundry_sdk.v2.ontologies.models import ArrayEvaluatedConstraint` | +**Ontologies** | [ArraySizeConstraint](docs/v2/Ontologies/models/ArraySizeConstraint.md) | `from foundry_sdk.v2.ontologies.models import ArraySizeConstraint` | +**Ontologies** | [ArtifactRepositoryRid](docs/v2/Ontologies/models/ArtifactRepositoryRid.md) | `from foundry_sdk.v2.ontologies.models import ArtifactRepositoryRid` | +**Ontologies** | [AttachmentMetadataResponse](docs/v2/Ontologies/models/AttachmentMetadataResponse.md) | `from foundry_sdk.v2.ontologies.models import AttachmentMetadataResponse` | +**Ontologies** | [AttachmentRid](docs/v2/Ontologies/models/AttachmentRid.md) | `from foundry_sdk.v2.ontologies.models import AttachmentRid` | +**Ontologies** | [AttachmentV2](docs/v2/Ontologies/models/AttachmentV2.md) | `from foundry_sdk.v2.ontologies.models import AttachmentV2` | +**Ontologies** | [AvgAggregationV2](docs/v2/Ontologies/models/AvgAggregationV2.md) | `from foundry_sdk.v2.ontologies.models import AvgAggregationV2` | +**Ontologies** | [BatchActionObjectEdit](docs/v2/Ontologies/models/BatchActionObjectEdit.md) | `from foundry_sdk.v2.ontologies.models import BatchActionObjectEdit` | +**Ontologies** | [BatchActionObjectEdits](docs/v2/Ontologies/models/BatchActionObjectEdits.md) | `from foundry_sdk.v2.ontologies.models import BatchActionObjectEdits` | +**Ontologies** | [BatchActionResults](docs/v2/Ontologies/models/BatchActionResults.md) | `from foundry_sdk.v2.ontologies.models import BatchActionResults` | +**Ontologies** | [BatchApplyActionRequestItem](docs/v2/Ontologies/models/BatchApplyActionRequestItem.md) | `from foundry_sdk.v2.ontologies.models import BatchApplyActionRequestItem` | +**Ontologies** | [BatchApplyActionRequestOptions](docs/v2/Ontologies/models/BatchApplyActionRequestOptions.md) | `from foundry_sdk.v2.ontologies.models import BatchApplyActionRequestOptions` | +**Ontologies** | [BatchApplyActionRequestV2](docs/v2/Ontologies/models/BatchApplyActionRequestV2.md) | `from foundry_sdk.v2.ontologies.models import BatchApplyActionRequestV2` | +**Ontologies** | [BatchApplyActionResponseV2](docs/v2/Ontologies/models/BatchApplyActionResponseV2.md) | `from foundry_sdk.v2.ontologies.models import BatchApplyActionResponseV2` | +**Ontologies** | [BatchedFunctionLogicRule](docs/v2/Ontologies/models/BatchedFunctionLogicRule.md) | `from foundry_sdk.v2.ontologies.models import BatchedFunctionLogicRule` | +**Ontologies** | [BatchReturnEditsMode](docs/v2/Ontologies/models/BatchReturnEditsMode.md) | `from foundry_sdk.v2.ontologies.models import BatchReturnEditsMode` | +**Ontologies** | [BlueprintIcon](docs/v2/Ontologies/models/BlueprintIcon.md) | `from foundry_sdk.v2.ontologies.models import BlueprintIcon` | +**Ontologies** | [BoundingBoxValue](docs/v2/Ontologies/models/BoundingBoxValue.md) | `from foundry_sdk.v2.ontologies.models import BoundingBoxValue` | +**Ontologies** | [CenterPoint](docs/v2/Ontologies/models/CenterPoint.md) | `from foundry_sdk.v2.ontologies.models import CenterPoint` | +**Ontologies** | [CenterPointTypes](docs/v2/Ontologies/models/CenterPointTypes.md) | `from foundry_sdk.v2.ontologies.models import CenterPointTypes` | +**Ontologies** | [ContainsAllTermsInOrderPrefixLastTerm](docs/v2/Ontologies/models/ContainsAllTermsInOrderPrefixLastTerm.md) | `from foundry_sdk.v2.ontologies.models import ContainsAllTermsInOrderPrefixLastTerm` | +**Ontologies** | [ContainsAllTermsInOrderQuery](docs/v2/Ontologies/models/ContainsAllTermsInOrderQuery.md) | `from foundry_sdk.v2.ontologies.models import ContainsAllTermsInOrderQuery` | +**Ontologies** | [ContainsAllTermsQuery](docs/v2/Ontologies/models/ContainsAllTermsQuery.md) | `from foundry_sdk.v2.ontologies.models import ContainsAllTermsQuery` | +**Ontologies** | [ContainsAnyTermQuery](docs/v2/Ontologies/models/ContainsAnyTermQuery.md) | `from foundry_sdk.v2.ontologies.models import ContainsAnyTermQuery` | +**Ontologies** | [ContainsQueryV2](docs/v2/Ontologies/models/ContainsQueryV2.md) | `from foundry_sdk.v2.ontologies.models import ContainsQueryV2` | +**Ontologies** | [CountAggregationV2](docs/v2/Ontologies/models/CountAggregationV2.md) | `from foundry_sdk.v2.ontologies.models import CountAggregationV2` | +**Ontologies** | [CountObjectsResponseV2](docs/v2/Ontologies/models/CountObjectsResponseV2.md) | `from foundry_sdk.v2.ontologies.models import CountObjectsResponseV2` | +**Ontologies** | [CreateInterfaceLinkLogicRule](docs/v2/Ontologies/models/CreateInterfaceLinkLogicRule.md) | `from foundry_sdk.v2.ontologies.models import CreateInterfaceLinkLogicRule` | +**Ontologies** | [CreateInterfaceLogicRule](docs/v2/Ontologies/models/CreateInterfaceLogicRule.md) | `from foundry_sdk.v2.ontologies.models import CreateInterfaceLogicRule` | +**Ontologies** | [CreateInterfaceObjectRule](docs/v2/Ontologies/models/CreateInterfaceObjectRule.md) | `from foundry_sdk.v2.ontologies.models import CreateInterfaceObjectRule` | +**Ontologies** | [CreateLinkLogicRule](docs/v2/Ontologies/models/CreateLinkLogicRule.md) | `from foundry_sdk.v2.ontologies.models import CreateLinkLogicRule` | +**Ontologies** | [CreateLinkRule](docs/v2/Ontologies/models/CreateLinkRule.md) | `from foundry_sdk.v2.ontologies.models import CreateLinkRule` | +**Ontologies** | [CreateObjectLogicRule](docs/v2/Ontologies/models/CreateObjectLogicRule.md) | `from foundry_sdk.v2.ontologies.models import CreateObjectLogicRule` | +**Ontologies** | [CreateObjectRule](docs/v2/Ontologies/models/CreateObjectRule.md) | `from foundry_sdk.v2.ontologies.models import CreateObjectRule` | +**Ontologies** | [CreateOrModifyObjectLogicRule](docs/v2/Ontologies/models/CreateOrModifyObjectLogicRule.md) | `from foundry_sdk.v2.ontologies.models import CreateOrModifyObjectLogicRule` | +**Ontologies** | [CreateOrModifyObjectLogicRuleV2](docs/v2/Ontologies/models/CreateOrModifyObjectLogicRuleV2.md) | `from foundry_sdk.v2.ontologies.models import CreateOrModifyObjectLogicRuleV2` | +**Ontologies** | [CreateTemporaryObjectSetRequestV2](docs/v2/Ontologies/models/CreateTemporaryObjectSetRequestV2.md) | `from foundry_sdk.v2.ontologies.models import CreateTemporaryObjectSetRequestV2` | +**Ontologies** | [CreateTemporaryObjectSetResponseV2](docs/v2/Ontologies/models/CreateTemporaryObjectSetResponseV2.md) | `from foundry_sdk.v2.ontologies.models import CreateTemporaryObjectSetResponseV2` | +**Ontologies** | [CurrentTimeArgument](docs/v2/Ontologies/models/CurrentTimeArgument.md) | `from foundry_sdk.v2.ontologies.models import CurrentTimeArgument` | +**Ontologies** | [CurrentUserArgument](docs/v2/Ontologies/models/CurrentUserArgument.md) | `from foundry_sdk.v2.ontologies.models import CurrentUserArgument` | +**Ontologies** | [DataValue](docs/v2/Ontologies/models/DataValue.md) | `from foundry_sdk.v2.ontologies.models import DataValue` | +**Ontologies** | [DatetimeFormat](docs/v2/Ontologies/models/DatetimeFormat.md) | `from foundry_sdk.v2.ontologies.models import DatetimeFormat` | +**Ontologies** | [DatetimeLocalizedFormat](docs/v2/Ontologies/models/DatetimeLocalizedFormat.md) | `from foundry_sdk.v2.ontologies.models import DatetimeLocalizedFormat` | +**Ontologies** | [DatetimeLocalizedFormatType](docs/v2/Ontologies/models/DatetimeLocalizedFormatType.md) | `from foundry_sdk.v2.ontologies.models import DatetimeLocalizedFormatType` | +**Ontologies** | [DatetimeStringFormat](docs/v2/Ontologies/models/DatetimeStringFormat.md) | `from foundry_sdk.v2.ontologies.models import DatetimeStringFormat` | +**Ontologies** | [DatetimeTimezone](docs/v2/Ontologies/models/DatetimeTimezone.md) | `from foundry_sdk.v2.ontologies.models import DatetimeTimezone` | +**Ontologies** | [DatetimeTimezoneStatic](docs/v2/Ontologies/models/DatetimeTimezoneStatic.md) | `from foundry_sdk.v2.ontologies.models import DatetimeTimezoneStatic` | +**Ontologies** | [DatetimeTimezoneUser](docs/v2/Ontologies/models/DatetimeTimezoneUser.md) | `from foundry_sdk.v2.ontologies.models import DatetimeTimezoneUser` | +**Ontologies** | [DecryptionResult](docs/v2/Ontologies/models/DecryptionResult.md) | `from foundry_sdk.v2.ontologies.models import DecryptionResult` | +**Ontologies** | [DeleteInterfaceLinkLogicRule](docs/v2/Ontologies/models/DeleteInterfaceLinkLogicRule.md) | `from foundry_sdk.v2.ontologies.models import DeleteInterfaceLinkLogicRule` | +**Ontologies** | [DeleteInterfaceObjectRule](docs/v2/Ontologies/models/DeleteInterfaceObjectRule.md) | `from foundry_sdk.v2.ontologies.models import DeleteInterfaceObjectRule` | +**Ontologies** | [DeleteLink](docs/v2/Ontologies/models/DeleteLink.md) | `from foundry_sdk.v2.ontologies.models import DeleteLink` | +**Ontologies** | [DeleteLinkEdit](docs/v2/Ontologies/models/DeleteLinkEdit.md) | `from foundry_sdk.v2.ontologies.models import DeleteLinkEdit` | +**Ontologies** | [DeleteLinkLogicRule](docs/v2/Ontologies/models/DeleteLinkLogicRule.md) | `from foundry_sdk.v2.ontologies.models import DeleteLinkLogicRule` | +**Ontologies** | [DeleteLinkRule](docs/v2/Ontologies/models/DeleteLinkRule.md) | `from foundry_sdk.v2.ontologies.models import DeleteLinkRule` | +**Ontologies** | [DeleteObject](docs/v2/Ontologies/models/DeleteObject.md) | `from foundry_sdk.v2.ontologies.models import DeleteObject` | +**Ontologies** | [DeleteObjectEdit](docs/v2/Ontologies/models/DeleteObjectEdit.md) | `from foundry_sdk.v2.ontologies.models import DeleteObjectEdit` | +**Ontologies** | [DeleteObjectLogicRule](docs/v2/Ontologies/models/DeleteObjectLogicRule.md) | `from foundry_sdk.v2.ontologies.models import DeleteObjectLogicRule` | +**Ontologies** | [DeleteObjectRule](docs/v2/Ontologies/models/DeleteObjectRule.md) | `from foundry_sdk.v2.ontologies.models import DeleteObjectRule` | +**Ontologies** | [DeprecatedPropertyTypeStatus](docs/v2/Ontologies/models/DeprecatedPropertyTypeStatus.md) | `from foundry_sdk.v2.ontologies.models import DeprecatedPropertyTypeStatus` | +**Ontologies** | [DerivedPropertyApiName](docs/v2/Ontologies/models/DerivedPropertyApiName.md) | `from foundry_sdk.v2.ontologies.models import DerivedPropertyApiName` | +**Ontologies** | [DerivedPropertyDefinition](docs/v2/Ontologies/models/DerivedPropertyDefinition.md) | `from foundry_sdk.v2.ontologies.models import DerivedPropertyDefinition` | +**Ontologies** | [DividePropertyExpression](docs/v2/Ontologies/models/DividePropertyExpression.md) | `from foundry_sdk.v2.ontologies.models import DividePropertyExpression` | +**Ontologies** | [DoesNotIntersectBoundingBoxQuery](docs/v2/Ontologies/models/DoesNotIntersectBoundingBoxQuery.md) | `from foundry_sdk.v2.ontologies.models import DoesNotIntersectBoundingBoxQuery` | +**Ontologies** | [DoesNotIntersectPolygonQuery](docs/v2/Ontologies/models/DoesNotIntersectPolygonQuery.md) | `from foundry_sdk.v2.ontologies.models import DoesNotIntersectPolygonQuery` | +**Ontologies** | [DoubleVector](docs/v2/Ontologies/models/DoubleVector.md) | `from foundry_sdk.v2.ontologies.models import DoubleVector` | +**Ontologies** | [DurationBaseValue](docs/v2/Ontologies/models/DurationBaseValue.md) | `from foundry_sdk.v2.ontologies.models import DurationBaseValue` | +**Ontologies** | [DurationFormatStyle](docs/v2/Ontologies/models/DurationFormatStyle.md) | `from foundry_sdk.v2.ontologies.models import DurationFormatStyle` | +**Ontologies** | [DurationPrecision](docs/v2/Ontologies/models/DurationPrecision.md) | `from foundry_sdk.v2.ontologies.models import DurationPrecision` | +**Ontologies** | [EntrySetType](docs/v2/Ontologies/models/EntrySetType.md) | `from foundry_sdk.v2.ontologies.models import EntrySetType` | +**Ontologies** | [EnumConstraint](docs/v2/Ontologies/models/EnumConstraint.md) | `from foundry_sdk.v2.ontologies.models import EnumConstraint` | +**Ontologies** | [EqualsQueryV2](docs/v2/Ontologies/models/EqualsQueryV2.md) | `from foundry_sdk.v2.ontologies.models import EqualsQueryV2` | +**Ontologies** | [ExactDistinctAggregationV2](docs/v2/Ontologies/models/ExactDistinctAggregationV2.md) | `from foundry_sdk.v2.ontologies.models import ExactDistinctAggregationV2` | +**Ontologies** | [ExamplePropertyTypeStatus](docs/v2/Ontologies/models/ExamplePropertyTypeStatus.md) | `from foundry_sdk.v2.ontologies.models import ExamplePropertyTypeStatus` | +**Ontologies** | [ExecuteQueryRequest](docs/v2/Ontologies/models/ExecuteQueryRequest.md) | `from foundry_sdk.v2.ontologies.models import ExecuteQueryRequest` | +**Ontologies** | [ExecuteQueryResponse](docs/v2/Ontologies/models/ExecuteQueryResponse.md) | `from foundry_sdk.v2.ontologies.models import ExecuteQueryResponse` | +**Ontologies** | [ExperimentalPropertyTypeStatus](docs/v2/Ontologies/models/ExperimentalPropertyTypeStatus.md) | `from foundry_sdk.v2.ontologies.models import ExperimentalPropertyTypeStatus` | +**Ontologies** | [ExtractDatePart](docs/v2/Ontologies/models/ExtractDatePart.md) | `from foundry_sdk.v2.ontologies.models import ExtractDatePart` | +**Ontologies** | [ExtractMainValueLoadLevel](docs/v2/Ontologies/models/ExtractMainValueLoadLevel.md) | `from foundry_sdk.v2.ontologies.models import ExtractMainValueLoadLevel` | +**Ontologies** | [ExtractPropertyExpression](docs/v2/Ontologies/models/ExtractPropertyExpression.md) | `from foundry_sdk.v2.ontologies.models import ExtractPropertyExpression` | +**Ontologies** | [FilterValue](docs/v2/Ontologies/models/FilterValue.md) | `from foundry_sdk.v2.ontologies.models import FilterValue` | +**Ontologies** | [FixedValuesMapKey](docs/v2/Ontologies/models/FixedValuesMapKey.md) | `from foundry_sdk.v2.ontologies.models import FixedValuesMapKey` | +**Ontologies** | [FunctionLogicRule](docs/v2/Ontologies/models/FunctionLogicRule.md) | `from foundry_sdk.v2.ontologies.models import FunctionLogicRule` | +**Ontologies** | [FunctionParameterName](docs/v2/Ontologies/models/FunctionParameterName.md) | `from foundry_sdk.v2.ontologies.models import FunctionParameterName` | +**Ontologies** | [FunctionRid](docs/v2/Ontologies/models/FunctionRid.md) | `from foundry_sdk.v2.ontologies.models import FunctionRid` | +**Ontologies** | [FunctionVersion](docs/v2/Ontologies/models/FunctionVersion.md) | `from foundry_sdk.v2.ontologies.models import FunctionVersion` | +**Ontologies** | [FuzzyV2](docs/v2/Ontologies/models/FuzzyV2.md) | `from foundry_sdk.v2.ontologies.models import FuzzyV2` | +**Ontologies** | [GetSelectedPropertyOperation](docs/v2/Ontologies/models/GetSelectedPropertyOperation.md) | `from foundry_sdk.v2.ontologies.models import GetSelectedPropertyOperation` | +**Ontologies** | [GreatestPropertyExpression](docs/v2/Ontologies/models/GreatestPropertyExpression.md) | `from foundry_sdk.v2.ontologies.models import GreatestPropertyExpression` | +**Ontologies** | [GroupMemberConstraint](docs/v2/Ontologies/models/GroupMemberConstraint.md) | `from foundry_sdk.v2.ontologies.models import GroupMemberConstraint` | +**Ontologies** | [GteQueryV2](docs/v2/Ontologies/models/GteQueryV2.md) | `from foundry_sdk.v2.ontologies.models import GteQueryV2` | +**Ontologies** | [GtQueryV2](docs/v2/Ontologies/models/GtQueryV2.md) | `from foundry_sdk.v2.ontologies.models import GtQueryV2` | +**Ontologies** | [HumanReadableFormat](docs/v2/Ontologies/models/HumanReadableFormat.md) | `from foundry_sdk.v2.ontologies.models import HumanReadableFormat` | +**Ontologies** | [Icon](docs/v2/Ontologies/models/Icon.md) | `from foundry_sdk.v2.ontologies.models import Icon` | +**Ontologies** | [InQuery](docs/v2/Ontologies/models/InQuery.md) | `from foundry_sdk.v2.ontologies.models import InQuery` | +**Ontologies** | [InterfaceDefinedPropertyType](docs/v2/Ontologies/models/InterfaceDefinedPropertyType.md) | `from foundry_sdk.v2.ontologies.models import InterfaceDefinedPropertyType` | +**Ontologies** | [InterfaceLinkType](docs/v2/Ontologies/models/InterfaceLinkType.md) | `from foundry_sdk.v2.ontologies.models import InterfaceLinkType` | +**Ontologies** | [InterfaceLinkTypeApiName](docs/v2/Ontologies/models/InterfaceLinkTypeApiName.md) | `from foundry_sdk.v2.ontologies.models import InterfaceLinkTypeApiName` | +**Ontologies** | [InterfaceLinkTypeCardinality](docs/v2/Ontologies/models/InterfaceLinkTypeCardinality.md) | `from foundry_sdk.v2.ontologies.models import InterfaceLinkTypeCardinality` | +**Ontologies** | [InterfaceLinkTypeLinkedEntityApiName](docs/v2/Ontologies/models/InterfaceLinkTypeLinkedEntityApiName.md) | `from foundry_sdk.v2.ontologies.models import InterfaceLinkTypeLinkedEntityApiName` | +**Ontologies** | [InterfaceLinkTypeRid](docs/v2/Ontologies/models/InterfaceLinkTypeRid.md) | `from foundry_sdk.v2.ontologies.models import InterfaceLinkTypeRid` | +**Ontologies** | [InterfaceParameterPropertyArgument](docs/v2/Ontologies/models/InterfaceParameterPropertyArgument.md) | `from foundry_sdk.v2.ontologies.models import InterfaceParameterPropertyArgument` | +**Ontologies** | [InterfacePropertyApiName](docs/v2/Ontologies/models/InterfacePropertyApiName.md) | `from foundry_sdk.v2.ontologies.models import InterfacePropertyApiName` | +**Ontologies** | [InterfacePropertyLocalPropertyImplementation](docs/v2/Ontologies/models/InterfacePropertyLocalPropertyImplementation.md) | `from foundry_sdk.v2.ontologies.models import InterfacePropertyLocalPropertyImplementation` | +**Ontologies** | [InterfacePropertyReducedPropertyImplementation](docs/v2/Ontologies/models/InterfacePropertyReducedPropertyImplementation.md) | `from foundry_sdk.v2.ontologies.models import InterfacePropertyReducedPropertyImplementation` | +**Ontologies** | [InterfacePropertyStructFieldImplementation](docs/v2/Ontologies/models/InterfacePropertyStructFieldImplementation.md) | `from foundry_sdk.v2.ontologies.models import InterfacePropertyStructFieldImplementation` | +**Ontologies** | [InterfacePropertyStructImplementation](docs/v2/Ontologies/models/InterfacePropertyStructImplementation.md) | `from foundry_sdk.v2.ontologies.models import InterfacePropertyStructImplementation` | +**Ontologies** | [InterfacePropertyStructImplementationMapping](docs/v2/Ontologies/models/InterfacePropertyStructImplementationMapping.md) | `from foundry_sdk.v2.ontologies.models import InterfacePropertyStructImplementationMapping` | +**Ontologies** | [InterfacePropertyType](docs/v2/Ontologies/models/InterfacePropertyType.md) | `from foundry_sdk.v2.ontologies.models import InterfacePropertyType` | +**Ontologies** | [InterfacePropertyTypeImplementation](docs/v2/Ontologies/models/InterfacePropertyTypeImplementation.md) | `from foundry_sdk.v2.ontologies.models import InterfacePropertyTypeImplementation` | +**Ontologies** | [InterfacePropertyTypeRid](docs/v2/Ontologies/models/InterfacePropertyTypeRid.md) | `from foundry_sdk.v2.ontologies.models import InterfacePropertyTypeRid` | +**Ontologies** | [InterfaceSharedPropertyType](docs/v2/Ontologies/models/InterfaceSharedPropertyType.md) | `from foundry_sdk.v2.ontologies.models import InterfaceSharedPropertyType` | +**Ontologies** | [InterfaceToObjectTypeMapping](docs/v2/Ontologies/models/InterfaceToObjectTypeMapping.md) | `from foundry_sdk.v2.ontologies.models import InterfaceToObjectTypeMapping` | +**Ontologies** | [InterfaceToObjectTypeMappings](docs/v2/Ontologies/models/InterfaceToObjectTypeMappings.md) | `from foundry_sdk.v2.ontologies.models import InterfaceToObjectTypeMappings` | +**Ontologies** | [InterfaceToObjectTypeMappingsV2](docs/v2/Ontologies/models/InterfaceToObjectTypeMappingsV2.md) | `from foundry_sdk.v2.ontologies.models import InterfaceToObjectTypeMappingsV2` | +**Ontologies** | [InterfaceToObjectTypeMappingV2](docs/v2/Ontologies/models/InterfaceToObjectTypeMappingV2.md) | `from foundry_sdk.v2.ontologies.models import InterfaceToObjectTypeMappingV2` | +**Ontologies** | [InterfaceType](docs/v2/Ontologies/models/InterfaceType.md) | `from foundry_sdk.v2.ontologies.models import InterfaceType` | +**Ontologies** | [InterfaceTypeApiName](docs/v2/Ontologies/models/InterfaceTypeApiName.md) | `from foundry_sdk.v2.ontologies.models import InterfaceTypeApiName` | +**Ontologies** | [InterfaceTypeRid](docs/v2/Ontologies/models/InterfaceTypeRid.md) | `from foundry_sdk.v2.ontologies.models import InterfaceTypeRid` | +**Ontologies** | [IntersectsBoundingBoxQuery](docs/v2/Ontologies/models/IntersectsBoundingBoxQuery.md) | `from foundry_sdk.v2.ontologies.models import IntersectsBoundingBoxQuery` | +**Ontologies** | [IntersectsPolygonQuery](docs/v2/Ontologies/models/IntersectsPolygonQuery.md) | `from foundry_sdk.v2.ontologies.models import IntersectsPolygonQuery` | +**Ontologies** | [IntervalQuery](docs/v2/Ontologies/models/IntervalQuery.md) | `from foundry_sdk.v2.ontologies.models import IntervalQuery` | +**Ontologies** | [IntervalQueryRule](docs/v2/Ontologies/models/IntervalQueryRule.md) | `from foundry_sdk.v2.ontologies.models import IntervalQueryRule` | +**Ontologies** | [IsNullQueryV2](docs/v2/Ontologies/models/IsNullQueryV2.md) | `from foundry_sdk.v2.ontologies.models import IsNullQueryV2` | +**Ontologies** | [KnownType](docs/v2/Ontologies/models/KnownType.md) | `from foundry_sdk.v2.ontologies.models import KnownType` | +**Ontologies** | [LeastPropertyExpression](docs/v2/Ontologies/models/LeastPropertyExpression.md) | `from foundry_sdk.v2.ontologies.models import LeastPropertyExpression` | +**Ontologies** | [LengthConstraint](docs/v2/Ontologies/models/LengthConstraint.md) | `from foundry_sdk.v2.ontologies.models import LengthConstraint` | +**Ontologies** | [LinkedInterfaceTypeApiName](docs/v2/Ontologies/models/LinkedInterfaceTypeApiName.md) | `from foundry_sdk.v2.ontologies.models import LinkedInterfaceTypeApiName` | +**Ontologies** | [LinkedObjectLocator](docs/v2/Ontologies/models/LinkedObjectLocator.md) | `from foundry_sdk.v2.ontologies.models import LinkedObjectLocator` | +**Ontologies** | [LinkedObjectTypeApiName](docs/v2/Ontologies/models/LinkedObjectTypeApiName.md) | `from foundry_sdk.v2.ontologies.models import LinkedObjectTypeApiName` | +**Ontologies** | [LinksFromObject](docs/v2/Ontologies/models/LinksFromObject.md) | `from foundry_sdk.v2.ontologies.models import LinksFromObject` | +**Ontologies** | [LinkSideObject](docs/v2/Ontologies/models/LinkSideObject.md) | `from foundry_sdk.v2.ontologies.models import LinkSideObject` | +**Ontologies** | [LinkTypeApiName](docs/v2/Ontologies/models/LinkTypeApiName.md) | `from foundry_sdk.v2.ontologies.models import LinkTypeApiName` | +**Ontologies** | [LinkTypeId](docs/v2/Ontologies/models/LinkTypeId.md) | `from foundry_sdk.v2.ontologies.models import LinkTypeId` | +**Ontologies** | [LinkTypeRid](docs/v2/Ontologies/models/LinkTypeRid.md) | `from foundry_sdk.v2.ontologies.models import LinkTypeRid` | +**Ontologies** | [LinkTypeSideCardinality](docs/v2/Ontologies/models/LinkTypeSideCardinality.md) | `from foundry_sdk.v2.ontologies.models import LinkTypeSideCardinality` | +**Ontologies** | [LinkTypeSideV2](docs/v2/Ontologies/models/LinkTypeSideV2.md) | `from foundry_sdk.v2.ontologies.models import LinkTypeSideV2` | +**Ontologies** | [ListActionTypesFullMetadataResponse](docs/v2/Ontologies/models/ListActionTypesFullMetadataResponse.md) | `from foundry_sdk.v2.ontologies.models import ListActionTypesFullMetadataResponse` | +**Ontologies** | [ListActionTypesResponseV2](docs/v2/Ontologies/models/ListActionTypesResponseV2.md) | `from foundry_sdk.v2.ontologies.models import ListActionTypesResponseV2` | +**Ontologies** | [ListAttachmentsResponseV2](docs/v2/Ontologies/models/ListAttachmentsResponseV2.md) | `from foundry_sdk.v2.ontologies.models import ListAttachmentsResponseV2` | +**Ontologies** | [ListInterfaceLinkedObjectsResponse](docs/v2/Ontologies/models/ListInterfaceLinkedObjectsResponse.md) | `from foundry_sdk.v2.ontologies.models import ListInterfaceLinkedObjectsResponse` | +**Ontologies** | [ListInterfaceTypesResponse](docs/v2/Ontologies/models/ListInterfaceTypesResponse.md) | `from foundry_sdk.v2.ontologies.models import ListInterfaceTypesResponse` | +**Ontologies** | [ListLinkedObjectsResponseV2](docs/v2/Ontologies/models/ListLinkedObjectsResponseV2.md) | `from foundry_sdk.v2.ontologies.models import ListLinkedObjectsResponseV2` | +**Ontologies** | [ListObjectsForInterfaceResponse](docs/v2/Ontologies/models/ListObjectsForInterfaceResponse.md) | `from foundry_sdk.v2.ontologies.models import ListObjectsForInterfaceResponse` | +**Ontologies** | [ListObjectsResponseV2](docs/v2/Ontologies/models/ListObjectsResponseV2.md) | `from foundry_sdk.v2.ontologies.models import ListObjectsResponseV2` | +**Ontologies** | [ListObjectTypesV2Response](docs/v2/Ontologies/models/ListObjectTypesV2Response.md) | `from foundry_sdk.v2.ontologies.models import ListObjectTypesV2Response` | +**Ontologies** | [ListOntologiesV2Response](docs/v2/Ontologies/models/ListOntologiesV2Response.md) | `from foundry_sdk.v2.ontologies.models import ListOntologiesV2Response` | +**Ontologies** | [ListOntologyValueTypesResponse](docs/v2/Ontologies/models/ListOntologyValueTypesResponse.md) | `from foundry_sdk.v2.ontologies.models import ListOntologyValueTypesResponse` | +**Ontologies** | [ListOutgoingInterfaceLinkTypesResponse](docs/v2/Ontologies/models/ListOutgoingInterfaceLinkTypesResponse.md) | `from foundry_sdk.v2.ontologies.models import ListOutgoingInterfaceLinkTypesResponse` | +**Ontologies** | [ListOutgoingLinkTypesResponseV2](docs/v2/Ontologies/models/ListOutgoingLinkTypesResponseV2.md) | `from foundry_sdk.v2.ontologies.models import ListOutgoingLinkTypesResponseV2` | +**Ontologies** | [ListQueryTypesResponseV2](docs/v2/Ontologies/models/ListQueryTypesResponseV2.md) | `from foundry_sdk.v2.ontologies.models import ListQueryTypesResponseV2` | +**Ontologies** | [LoadObjectSetLinksRequestV2](docs/v2/Ontologies/models/LoadObjectSetLinksRequestV2.md) | `from foundry_sdk.v2.ontologies.models import LoadObjectSetLinksRequestV2` | +**Ontologies** | [LoadObjectSetLinksResponseV2](docs/v2/Ontologies/models/LoadObjectSetLinksResponseV2.md) | `from foundry_sdk.v2.ontologies.models import LoadObjectSetLinksResponseV2` | +**Ontologies** | [LoadObjectSetRequestV2](docs/v2/Ontologies/models/LoadObjectSetRequestV2.md) | `from foundry_sdk.v2.ontologies.models import LoadObjectSetRequestV2` | +**Ontologies** | [LoadObjectSetResponseV2](docs/v2/Ontologies/models/LoadObjectSetResponseV2.md) | `from foundry_sdk.v2.ontologies.models import LoadObjectSetResponseV2` | +**Ontologies** | [LoadObjectSetV2MultipleObjectTypesRequest](docs/v2/Ontologies/models/LoadObjectSetV2MultipleObjectTypesRequest.md) | `from foundry_sdk.v2.ontologies.models import LoadObjectSetV2MultipleObjectTypesRequest` | +**Ontologies** | [LoadObjectSetV2MultipleObjectTypesResponse](docs/v2/Ontologies/models/LoadObjectSetV2MultipleObjectTypesResponse.md) | `from foundry_sdk.v2.ontologies.models import LoadObjectSetV2MultipleObjectTypesResponse` | +**Ontologies** | [LoadObjectSetV2ObjectsOrInterfacesRequest](docs/v2/Ontologies/models/LoadObjectSetV2ObjectsOrInterfacesRequest.md) | `from foundry_sdk.v2.ontologies.models import LoadObjectSetV2ObjectsOrInterfacesRequest` | +**Ontologies** | [LoadObjectSetV2ObjectsOrInterfacesResponse](docs/v2/Ontologies/models/LoadObjectSetV2ObjectsOrInterfacesResponse.md) | `from foundry_sdk.v2.ontologies.models import LoadObjectSetV2ObjectsOrInterfacesResponse` | +**Ontologies** | [LoadOntologyMetadataRequest](docs/v2/Ontologies/models/LoadOntologyMetadataRequest.md) | `from foundry_sdk.v2.ontologies.models import LoadOntologyMetadataRequest` | +**Ontologies** | [LogicRule](docs/v2/Ontologies/models/LogicRule.md) | `from foundry_sdk.v2.ontologies.models import LogicRule` | +**Ontologies** | [LogicRuleArgument](docs/v2/Ontologies/models/LogicRuleArgument.md) | `from foundry_sdk.v2.ontologies.models import LogicRuleArgument` | +**Ontologies** | [LteQueryV2](docs/v2/Ontologies/models/LteQueryV2.md) | `from foundry_sdk.v2.ontologies.models import LteQueryV2` | +**Ontologies** | [LtQueryV2](docs/v2/Ontologies/models/LtQueryV2.md) | `from foundry_sdk.v2.ontologies.models import LtQueryV2` | +**Ontologies** | [MatchRule](docs/v2/Ontologies/models/MatchRule.md) | `from foundry_sdk.v2.ontologies.models import MatchRule` | +**Ontologies** | [MaxAggregationV2](docs/v2/Ontologies/models/MaxAggregationV2.md) | `from foundry_sdk.v2.ontologies.models import MaxAggregationV2` | +**Ontologies** | [MediaMetadata](docs/v2/Ontologies/models/MediaMetadata.md) | `from foundry_sdk.v2.ontologies.models import MediaMetadata` | +**Ontologies** | [MethodObjectSet](docs/v2/Ontologies/models/MethodObjectSet.md) | `from foundry_sdk.v2.ontologies.models import MethodObjectSet` | +**Ontologies** | [MinAggregationV2](docs/v2/Ontologies/models/MinAggregationV2.md) | `from foundry_sdk.v2.ontologies.models import MinAggregationV2` | +**Ontologies** | [ModifyInterfaceLogicRule](docs/v2/Ontologies/models/ModifyInterfaceLogicRule.md) | `from foundry_sdk.v2.ontologies.models import ModifyInterfaceLogicRule` | +**Ontologies** | [ModifyInterfaceObjectRule](docs/v2/Ontologies/models/ModifyInterfaceObjectRule.md) | `from foundry_sdk.v2.ontologies.models import ModifyInterfaceObjectRule` | +**Ontologies** | [ModifyObject](docs/v2/Ontologies/models/ModifyObject.md) | `from foundry_sdk.v2.ontologies.models import ModifyObject` | +**Ontologies** | [ModifyObjectEdit](docs/v2/Ontologies/models/ModifyObjectEdit.md) | `from foundry_sdk.v2.ontologies.models import ModifyObjectEdit` | +**Ontologies** | [ModifyObjectLogicRule](docs/v2/Ontologies/models/ModifyObjectLogicRule.md) | `from foundry_sdk.v2.ontologies.models import ModifyObjectLogicRule` | +**Ontologies** | [ModifyObjectRule](docs/v2/Ontologies/models/ModifyObjectRule.md) | `from foundry_sdk.v2.ontologies.models import ModifyObjectRule` | +**Ontologies** | [MultiplyPropertyExpression](docs/v2/Ontologies/models/MultiplyPropertyExpression.md) | `from foundry_sdk.v2.ontologies.models import MultiplyPropertyExpression` | +**Ontologies** | [NearestNeighborsQuery](docs/v2/Ontologies/models/NearestNeighborsQuery.md) | `from foundry_sdk.v2.ontologies.models import NearestNeighborsQuery` | +**Ontologies** | [NearestNeighborsQueryText](docs/v2/Ontologies/models/NearestNeighborsQueryText.md) | `from foundry_sdk.v2.ontologies.models import NearestNeighborsQueryText` | +**Ontologies** | [NegatePropertyExpression](docs/v2/Ontologies/models/NegatePropertyExpression.md) | `from foundry_sdk.v2.ontologies.models import NegatePropertyExpression` | +**Ontologies** | [NestedInterfacePropertyTypeImplementation](docs/v2/Ontologies/models/NestedInterfacePropertyTypeImplementation.md) | `from foundry_sdk.v2.ontologies.models import NestedInterfacePropertyTypeImplementation` | +**Ontologies** | [NestedQueryAggregation](docs/v2/Ontologies/models/NestedQueryAggregation.md) | `from foundry_sdk.v2.ontologies.models import NestedQueryAggregation` | +**Ontologies** | [NotQueryV2](docs/v2/Ontologies/models/NotQueryV2.md) | `from foundry_sdk.v2.ontologies.models import NotQueryV2` | +**Ontologies** | [NumberFormatAffix](docs/v2/Ontologies/models/NumberFormatAffix.md) | `from foundry_sdk.v2.ontologies.models import NumberFormatAffix` | +**Ontologies** | [NumberFormatCurrency](docs/v2/Ontologies/models/NumberFormatCurrency.md) | `from foundry_sdk.v2.ontologies.models import NumberFormatCurrency` | +**Ontologies** | [NumberFormatCurrencyStyle](docs/v2/Ontologies/models/NumberFormatCurrencyStyle.md) | `from foundry_sdk.v2.ontologies.models import NumberFormatCurrencyStyle` | +**Ontologies** | [NumberFormatCustomUnit](docs/v2/Ontologies/models/NumberFormatCustomUnit.md) | `from foundry_sdk.v2.ontologies.models import NumberFormatCustomUnit` | +**Ontologies** | [NumberFormatDuration](docs/v2/Ontologies/models/NumberFormatDuration.md) | `from foundry_sdk.v2.ontologies.models import NumberFormatDuration` | +**Ontologies** | [NumberFormatFixedValues](docs/v2/Ontologies/models/NumberFormatFixedValues.md) | `from foundry_sdk.v2.ontologies.models import NumberFormatFixedValues` | +**Ontologies** | [NumberFormatNotation](docs/v2/Ontologies/models/NumberFormatNotation.md) | `from foundry_sdk.v2.ontologies.models import NumberFormatNotation` | +**Ontologies** | [NumberFormatOptions](docs/v2/Ontologies/models/NumberFormatOptions.md) | `from foundry_sdk.v2.ontologies.models import NumberFormatOptions` | +**Ontologies** | [NumberFormatRatio](docs/v2/Ontologies/models/NumberFormatRatio.md) | `from foundry_sdk.v2.ontologies.models import NumberFormatRatio` | +**Ontologies** | [NumberFormatScale](docs/v2/Ontologies/models/NumberFormatScale.md) | `from foundry_sdk.v2.ontologies.models import NumberFormatScale` | +**Ontologies** | [NumberFormatStandard](docs/v2/Ontologies/models/NumberFormatStandard.md) | `from foundry_sdk.v2.ontologies.models import NumberFormatStandard` | +**Ontologies** | [NumberFormatStandardUnit](docs/v2/Ontologies/models/NumberFormatStandardUnit.md) | `from foundry_sdk.v2.ontologies.models import NumberFormatStandardUnit` | +**Ontologies** | [NumberRatioType](docs/v2/Ontologies/models/NumberRatioType.md) | `from foundry_sdk.v2.ontologies.models import NumberRatioType` | +**Ontologies** | [NumberRoundingMode](docs/v2/Ontologies/models/NumberRoundingMode.md) | `from foundry_sdk.v2.ontologies.models import NumberRoundingMode` | +**Ontologies** | [NumberScaleType](docs/v2/Ontologies/models/NumberScaleType.md) | `from foundry_sdk.v2.ontologies.models import NumberScaleType` | +**Ontologies** | [ObjectEdit](docs/v2/Ontologies/models/ObjectEdit.md) | `from foundry_sdk.v2.ontologies.models import ObjectEdit` | +**Ontologies** | [ObjectEdits](docs/v2/Ontologies/models/ObjectEdits.md) | `from foundry_sdk.v2.ontologies.models import ObjectEdits` | +**Ontologies** | [ObjectParameterPropertyArgument](docs/v2/Ontologies/models/ObjectParameterPropertyArgument.md) | `from foundry_sdk.v2.ontologies.models import ObjectParameterPropertyArgument` | +**Ontologies** | [ObjectPropertyType](docs/v2/Ontologies/models/ObjectPropertyType.md) | `from foundry_sdk.v2.ontologies.models import ObjectPropertyType` | +**Ontologies** | [ObjectPropertyValueConstraint](docs/v2/Ontologies/models/ObjectPropertyValueConstraint.md) | `from foundry_sdk.v2.ontologies.models import ObjectPropertyValueConstraint` | +**Ontologies** | [ObjectQueryResultConstraint](docs/v2/Ontologies/models/ObjectQueryResultConstraint.md) | `from foundry_sdk.v2.ontologies.models import ObjectQueryResultConstraint` | +**Ontologies** | [ObjectRid](docs/v2/Ontologies/models/ObjectRid.md) | `from foundry_sdk.v2.ontologies.models import ObjectRid` | +**Ontologies** | [ObjectSet](docs/v2/Ontologies/models/ObjectSet.md) | `from foundry_sdk.v2.ontologies.models import ObjectSet` | +**Ontologies** | [ObjectSetAsBaseObjectTypesType](docs/v2/Ontologies/models/ObjectSetAsBaseObjectTypesType.md) | `from foundry_sdk.v2.ontologies.models import ObjectSetAsBaseObjectTypesType` | +**Ontologies** | [ObjectSetAsTypeType](docs/v2/Ontologies/models/ObjectSetAsTypeType.md) | `from foundry_sdk.v2.ontologies.models import ObjectSetAsTypeType` | +**Ontologies** | [ObjectSetBaseType](docs/v2/Ontologies/models/ObjectSetBaseType.md) | `from foundry_sdk.v2.ontologies.models import ObjectSetBaseType` | +**Ontologies** | [ObjectSetFilterType](docs/v2/Ontologies/models/ObjectSetFilterType.md) | `from foundry_sdk.v2.ontologies.models import ObjectSetFilterType` | +**Ontologies** | [ObjectSetInterfaceBaseType](docs/v2/Ontologies/models/ObjectSetInterfaceBaseType.md) | `from foundry_sdk.v2.ontologies.models import ObjectSetInterfaceBaseType` | +**Ontologies** | [ObjectSetInterfaceLinkSearchAroundType](docs/v2/Ontologies/models/ObjectSetInterfaceLinkSearchAroundType.md) | `from foundry_sdk.v2.ontologies.models import ObjectSetInterfaceLinkSearchAroundType` | +**Ontologies** | [ObjectSetIntersectionType](docs/v2/Ontologies/models/ObjectSetIntersectionType.md) | `from foundry_sdk.v2.ontologies.models import ObjectSetIntersectionType` | +**Ontologies** | [ObjectSetMethodInputType](docs/v2/Ontologies/models/ObjectSetMethodInputType.md) | `from foundry_sdk.v2.ontologies.models import ObjectSetMethodInputType` | +**Ontologies** | [ObjectSetNearestNeighborsType](docs/v2/Ontologies/models/ObjectSetNearestNeighborsType.md) | `from foundry_sdk.v2.ontologies.models import ObjectSetNearestNeighborsType` | +**Ontologies** | [ObjectSetReferenceType](docs/v2/Ontologies/models/ObjectSetReferenceType.md) | `from foundry_sdk.v2.ontologies.models import ObjectSetReferenceType` | +**Ontologies** | [ObjectSetRid](docs/v2/Ontologies/models/ObjectSetRid.md) | `from foundry_sdk.v2.ontologies.models import ObjectSetRid` | +**Ontologies** | [ObjectSetSearchAroundType](docs/v2/Ontologies/models/ObjectSetSearchAroundType.md) | `from foundry_sdk.v2.ontologies.models import ObjectSetSearchAroundType` | +**Ontologies** | [ObjectSetStaticType](docs/v2/Ontologies/models/ObjectSetStaticType.md) | `from foundry_sdk.v2.ontologies.models import ObjectSetStaticType` | +**Ontologies** | [ObjectSetSubtractType](docs/v2/Ontologies/models/ObjectSetSubtractType.md) | `from foundry_sdk.v2.ontologies.models import ObjectSetSubtractType` | +**Ontologies** | [ObjectSetUnionType](docs/v2/Ontologies/models/ObjectSetUnionType.md) | `from foundry_sdk.v2.ontologies.models import ObjectSetUnionType` | +**Ontologies** | [ObjectSetWithPropertiesType](docs/v2/Ontologies/models/ObjectSetWithPropertiesType.md) | `from foundry_sdk.v2.ontologies.models import ObjectSetWithPropertiesType` | +**Ontologies** | [ObjectTypeApiName](docs/v2/Ontologies/models/ObjectTypeApiName.md) | `from foundry_sdk.v2.ontologies.models import ObjectTypeApiName` | +**Ontologies** | [ObjectTypeEdits](docs/v2/Ontologies/models/ObjectTypeEdits.md) | `from foundry_sdk.v2.ontologies.models import ObjectTypeEdits` | +**Ontologies** | [ObjectTypeFullMetadata](docs/v2/Ontologies/models/ObjectTypeFullMetadata.md) | `from foundry_sdk.v2.ontologies.models import ObjectTypeFullMetadata` | +**Ontologies** | [ObjectTypeId](docs/v2/Ontologies/models/ObjectTypeId.md) | `from foundry_sdk.v2.ontologies.models import ObjectTypeId` | +**Ontologies** | [ObjectTypeInterfaceImplementation](docs/v2/Ontologies/models/ObjectTypeInterfaceImplementation.md) | `from foundry_sdk.v2.ontologies.models import ObjectTypeInterfaceImplementation` | +**Ontologies** | [ObjectTypeRid](docs/v2/Ontologies/models/ObjectTypeRid.md) | `from foundry_sdk.v2.ontologies.models import ObjectTypeRid` | +**Ontologies** | [ObjectTypeV2](docs/v2/Ontologies/models/ObjectTypeV2.md) | `from foundry_sdk.v2.ontologies.models import ObjectTypeV2` | +**Ontologies** | [ObjectTypeVisibility](docs/v2/Ontologies/models/ObjectTypeVisibility.md) | `from foundry_sdk.v2.ontologies.models import ObjectTypeVisibility` | +**Ontologies** | [OneOfConstraint](docs/v2/Ontologies/models/OneOfConstraint.md) | `from foundry_sdk.v2.ontologies.models import OneOfConstraint` | +**Ontologies** | [OntologyApiName](docs/v2/Ontologies/models/OntologyApiName.md) | `from foundry_sdk.v2.ontologies.models import OntologyApiName` | +**Ontologies** | [OntologyArrayType](docs/v2/Ontologies/models/OntologyArrayType.md) | `from foundry_sdk.v2.ontologies.models import OntologyArrayType` | +**Ontologies** | [OntologyDataType](docs/v2/Ontologies/models/OntologyDataType.md) | `from foundry_sdk.v2.ontologies.models import OntologyDataType` | +**Ontologies** | [OntologyFullMetadata](docs/v2/Ontologies/models/OntologyFullMetadata.md) | `from foundry_sdk.v2.ontologies.models import OntologyFullMetadata` | +**Ontologies** | [OntologyIdentifier](docs/v2/Ontologies/models/OntologyIdentifier.md) | `from foundry_sdk.v2.ontologies.models import OntologyIdentifier` | +**Ontologies** | [OntologyInterfaceObjectSetType](docs/v2/Ontologies/models/OntologyInterfaceObjectSetType.md) | `from foundry_sdk.v2.ontologies.models import OntologyInterfaceObjectSetType` | +**Ontologies** | [OntologyInterfaceObjectType](docs/v2/Ontologies/models/OntologyInterfaceObjectType.md) | `from foundry_sdk.v2.ontologies.models import OntologyInterfaceObjectType` | +**Ontologies** | [OntologyMapType](docs/v2/Ontologies/models/OntologyMapType.md) | `from foundry_sdk.v2.ontologies.models import OntologyMapType` | +**Ontologies** | [OntologyObjectArrayType](docs/v2/Ontologies/models/OntologyObjectArrayType.md) | `from foundry_sdk.v2.ontologies.models import OntologyObjectArrayType` | +**Ontologies** | [OntologyObjectArrayTypeReducer](docs/v2/Ontologies/models/OntologyObjectArrayTypeReducer.md) | `from foundry_sdk.v2.ontologies.models import OntologyObjectArrayTypeReducer` | +**Ontologies** | [OntologyObjectArrayTypeReducerSortDirection](docs/v2/Ontologies/models/OntologyObjectArrayTypeReducerSortDirection.md) | `from foundry_sdk.v2.ontologies.models import OntologyObjectArrayTypeReducerSortDirection` | +**Ontologies** | [OntologyObjectSetType](docs/v2/Ontologies/models/OntologyObjectSetType.md) | `from foundry_sdk.v2.ontologies.models import OntologyObjectSetType` | +**Ontologies** | [OntologyObjectType](docs/v2/Ontologies/models/OntologyObjectType.md) | `from foundry_sdk.v2.ontologies.models import OntologyObjectType` | +**Ontologies** | [OntologyObjectTypeReferenceType](docs/v2/Ontologies/models/OntologyObjectTypeReferenceType.md) | `from foundry_sdk.v2.ontologies.models import OntologyObjectTypeReferenceType` | +**Ontologies** | [OntologyObjectV2](docs/v2/Ontologies/models/OntologyObjectV2.md) | `from foundry_sdk.v2.ontologies.models import OntologyObjectV2` | +**Ontologies** | [OntologyRid](docs/v2/Ontologies/models/OntologyRid.md) | `from foundry_sdk.v2.ontologies.models import OntologyRid` | +**Ontologies** | [OntologySetType](docs/v2/Ontologies/models/OntologySetType.md) | `from foundry_sdk.v2.ontologies.models import OntologySetType` | +**Ontologies** | [OntologyStructField](docs/v2/Ontologies/models/OntologyStructField.md) | `from foundry_sdk.v2.ontologies.models import OntologyStructField` | +**Ontologies** | [OntologyStructType](docs/v2/Ontologies/models/OntologyStructType.md) | `from foundry_sdk.v2.ontologies.models import OntologyStructType` | +**Ontologies** | [OntologyTransactionId](docs/v2/Ontologies/models/OntologyTransactionId.md) | `from foundry_sdk.v2.ontologies.models import OntologyTransactionId` | +**Ontologies** | [OntologyV2](docs/v2/Ontologies/models/OntologyV2.md) | `from foundry_sdk.v2.ontologies.models import OntologyV2` | +**Ontologies** | [OntologyValueType](docs/v2/Ontologies/models/OntologyValueType.md) | `from foundry_sdk.v2.ontologies.models import OntologyValueType` | +**Ontologies** | [OrderBy](docs/v2/Ontologies/models/OrderBy.md) | `from foundry_sdk.v2.ontologies.models import OrderBy` | +**Ontologies** | [OrderByDirection](docs/v2/Ontologies/models/OrderByDirection.md) | `from foundry_sdk.v2.ontologies.models import OrderByDirection` | +**Ontologies** | [OrQueryV2](docs/v2/Ontologies/models/OrQueryV2.md) | `from foundry_sdk.v2.ontologies.models import OrQueryV2` | +**Ontologies** | [ParameterEvaluatedConstraint](docs/v2/Ontologies/models/ParameterEvaluatedConstraint.md) | `from foundry_sdk.v2.ontologies.models import ParameterEvaluatedConstraint` | +**Ontologies** | [ParameterEvaluationResult](docs/v2/Ontologies/models/ParameterEvaluationResult.md) | `from foundry_sdk.v2.ontologies.models import ParameterEvaluationResult` | +**Ontologies** | [ParameterId](docs/v2/Ontologies/models/ParameterId.md) | `from foundry_sdk.v2.ontologies.models import ParameterId` | +**Ontologies** | [ParameterIdArgument](docs/v2/Ontologies/models/ParameterIdArgument.md) | `from foundry_sdk.v2.ontologies.models import ParameterIdArgument` | +**Ontologies** | [ParameterOption](docs/v2/Ontologies/models/ParameterOption.md) | `from foundry_sdk.v2.ontologies.models import ParameterOption` | +**Ontologies** | [Plaintext](docs/v2/Ontologies/models/Plaintext.md) | `from foundry_sdk.v2.ontologies.models import Plaintext` | +**Ontologies** | [PolygonValue](docs/v2/Ontologies/models/PolygonValue.md) | `from foundry_sdk.v2.ontologies.models import PolygonValue` | +**Ontologies** | [PostTransactionEditsRequest](docs/v2/Ontologies/models/PostTransactionEditsRequest.md) | `from foundry_sdk.v2.ontologies.models import PostTransactionEditsRequest` | +**Ontologies** | [PostTransactionEditsResponse](docs/v2/Ontologies/models/PostTransactionEditsResponse.md) | `from foundry_sdk.v2.ontologies.models import PostTransactionEditsResponse` | +**Ontologies** | [PreciseDuration](docs/v2/Ontologies/models/PreciseDuration.md) | `from foundry_sdk.v2.ontologies.models import PreciseDuration` | +**Ontologies** | [PreciseTimeUnit](docs/v2/Ontologies/models/PreciseTimeUnit.md) | `from foundry_sdk.v2.ontologies.models import PreciseTimeUnit` | +**Ontologies** | [PrefixOnLastTokenRule](docs/v2/Ontologies/models/PrefixOnLastTokenRule.md) | `from foundry_sdk.v2.ontologies.models import PrefixOnLastTokenRule` | +**Ontologies** | [PrimaryKeyValue](docs/v2/Ontologies/models/PrimaryKeyValue.md) | `from foundry_sdk.v2.ontologies.models import PrimaryKeyValue` | +**Ontologies** | [PropertyApiName](docs/v2/Ontologies/models/PropertyApiName.md) | `from foundry_sdk.v2.ontologies.models import PropertyApiName` | +**Ontologies** | [PropertyApiNameSelector](docs/v2/Ontologies/models/PropertyApiNameSelector.md) | `from foundry_sdk.v2.ontologies.models import PropertyApiNameSelector` | +**Ontologies** | [PropertyBooleanFormattingRule](docs/v2/Ontologies/models/PropertyBooleanFormattingRule.md) | `from foundry_sdk.v2.ontologies.models import PropertyBooleanFormattingRule` | +**Ontologies** | [PropertyDateFormattingRule](docs/v2/Ontologies/models/PropertyDateFormattingRule.md) | `from foundry_sdk.v2.ontologies.models import PropertyDateFormattingRule` | +**Ontologies** | [PropertyFilter](docs/v2/Ontologies/models/PropertyFilter.md) | `from foundry_sdk.v2.ontologies.models import PropertyFilter` | +**Ontologies** | [PropertyId](docs/v2/Ontologies/models/PropertyId.md) | `from foundry_sdk.v2.ontologies.models import PropertyId` | +**Ontologies** | [PropertyIdentifier](docs/v2/Ontologies/models/PropertyIdentifier.md) | `from foundry_sdk.v2.ontologies.models import PropertyIdentifier` | +**Ontologies** | [PropertyImplementation](docs/v2/Ontologies/models/PropertyImplementation.md) | `from foundry_sdk.v2.ontologies.models import PropertyImplementation` | +**Ontologies** | [PropertyKnownTypeFormattingRule](docs/v2/Ontologies/models/PropertyKnownTypeFormattingRule.md) | `from foundry_sdk.v2.ontologies.models import PropertyKnownTypeFormattingRule` | +**Ontologies** | [PropertyLoadLevel](docs/v2/Ontologies/models/PropertyLoadLevel.md) | `from foundry_sdk.v2.ontologies.models import PropertyLoadLevel` | +**Ontologies** | [PropertyNumberFormattingRule](docs/v2/Ontologies/models/PropertyNumberFormattingRule.md) | `from foundry_sdk.v2.ontologies.models import PropertyNumberFormattingRule` | +**Ontologies** | [PropertyNumberFormattingRuleType](docs/v2/Ontologies/models/PropertyNumberFormattingRuleType.md) | `from foundry_sdk.v2.ontologies.models import PropertyNumberFormattingRuleType` | +**Ontologies** | [PropertyOrStructFieldOfPropertyImplementation](docs/v2/Ontologies/models/PropertyOrStructFieldOfPropertyImplementation.md) | `from foundry_sdk.v2.ontologies.models import PropertyOrStructFieldOfPropertyImplementation` | +**Ontologies** | [PropertyTimestampFormattingRule](docs/v2/Ontologies/models/PropertyTimestampFormattingRule.md) | `from foundry_sdk.v2.ontologies.models import PropertyTimestampFormattingRule` | +**Ontologies** | [PropertyTypeApiName](docs/v2/Ontologies/models/PropertyTypeApiName.md) | `from foundry_sdk.v2.ontologies.models import PropertyTypeApiName` | +**Ontologies** | [PropertyTypeReference](docs/v2/Ontologies/models/PropertyTypeReference.md) | `from foundry_sdk.v2.ontologies.models import PropertyTypeReference` | +**Ontologies** | [PropertyTypeReferenceOrStringConstant](docs/v2/Ontologies/models/PropertyTypeReferenceOrStringConstant.md) | `from foundry_sdk.v2.ontologies.models import PropertyTypeReferenceOrStringConstant` | +**Ontologies** | [PropertyTypeRid](docs/v2/Ontologies/models/PropertyTypeRid.md) | `from foundry_sdk.v2.ontologies.models import PropertyTypeRid` | +**Ontologies** | [PropertyTypeStatus](docs/v2/Ontologies/models/PropertyTypeStatus.md) | `from foundry_sdk.v2.ontologies.models import PropertyTypeStatus` | +**Ontologies** | [PropertyTypeVisibility](docs/v2/Ontologies/models/PropertyTypeVisibility.md) | `from foundry_sdk.v2.ontologies.models import PropertyTypeVisibility` | +**Ontologies** | [PropertyV2](docs/v2/Ontologies/models/PropertyV2.md) | `from foundry_sdk.v2.ontologies.models import PropertyV2` | +**Ontologies** | [PropertyValue](docs/v2/Ontologies/models/PropertyValue.md) | `from foundry_sdk.v2.ontologies.models import PropertyValue` | +**Ontologies** | [PropertyValueEscapedString](docs/v2/Ontologies/models/PropertyValueEscapedString.md) | `from foundry_sdk.v2.ontologies.models import PropertyValueEscapedString` | +**Ontologies** | [PropertyValueFormattingRule](docs/v2/Ontologies/models/PropertyValueFormattingRule.md) | `from foundry_sdk.v2.ontologies.models import PropertyValueFormattingRule` | +**Ontologies** | [PropertyWithLoadLevelSelector](docs/v2/Ontologies/models/PropertyWithLoadLevelSelector.md) | `from foundry_sdk.v2.ontologies.models import PropertyWithLoadLevelSelector` | +**Ontologies** | [QueryAggregation](docs/v2/Ontologies/models/QueryAggregation.md) | `from foundry_sdk.v2.ontologies.models import QueryAggregation` | +**Ontologies** | [QueryAggregationKeyType](docs/v2/Ontologies/models/QueryAggregationKeyType.md) | `from foundry_sdk.v2.ontologies.models import QueryAggregationKeyType` | +**Ontologies** | [QueryAggregationRangeSubType](docs/v2/Ontologies/models/QueryAggregationRangeSubType.md) | `from foundry_sdk.v2.ontologies.models import QueryAggregationRangeSubType` | +**Ontologies** | [QueryAggregationRangeType](docs/v2/Ontologies/models/QueryAggregationRangeType.md) | `from foundry_sdk.v2.ontologies.models import QueryAggregationRangeType` | +**Ontologies** | [QueryAggregationValueType](docs/v2/Ontologies/models/QueryAggregationValueType.md) | `from foundry_sdk.v2.ontologies.models import QueryAggregationValueType` | +**Ontologies** | [QueryApiName](docs/v2/Ontologies/models/QueryApiName.md) | `from foundry_sdk.v2.ontologies.models import QueryApiName` | +**Ontologies** | [QueryArrayType](docs/v2/Ontologies/models/QueryArrayType.md) | `from foundry_sdk.v2.ontologies.models import QueryArrayType` | +**Ontologies** | [QueryDataType](docs/v2/Ontologies/models/QueryDataType.md) | `from foundry_sdk.v2.ontologies.models import QueryDataType` | +**Ontologies** | [QueryParameterV2](docs/v2/Ontologies/models/QueryParameterV2.md) | `from foundry_sdk.v2.ontologies.models import QueryParameterV2` | +**Ontologies** | [QueryRuntimeErrorParameter](docs/v2/Ontologies/models/QueryRuntimeErrorParameter.md) | `from foundry_sdk.v2.ontologies.models import QueryRuntimeErrorParameter` | +**Ontologies** | [QuerySetType](docs/v2/Ontologies/models/QuerySetType.md) | `from foundry_sdk.v2.ontologies.models import QuerySetType` | +**Ontologies** | [QueryStructField](docs/v2/Ontologies/models/QueryStructField.md) | `from foundry_sdk.v2.ontologies.models import QueryStructField` | +**Ontologies** | [QueryStructType](docs/v2/Ontologies/models/QueryStructType.md) | `from foundry_sdk.v2.ontologies.models import QueryStructType` | +**Ontologies** | [QueryThreeDimensionalAggregation](docs/v2/Ontologies/models/QueryThreeDimensionalAggregation.md) | `from foundry_sdk.v2.ontologies.models import QueryThreeDimensionalAggregation` | +**Ontologies** | [QueryTwoDimensionalAggregation](docs/v2/Ontologies/models/QueryTwoDimensionalAggregation.md) | `from foundry_sdk.v2.ontologies.models import QueryTwoDimensionalAggregation` | +**Ontologies** | [QueryTypeV2](docs/v2/Ontologies/models/QueryTypeV2.md) | `from foundry_sdk.v2.ontologies.models import QueryTypeV2` | +**Ontologies** | [QueryUnionType](docs/v2/Ontologies/models/QueryUnionType.md) | `from foundry_sdk.v2.ontologies.models import QueryUnionType` | +**Ontologies** | [RangeConstraint](docs/v2/Ontologies/models/RangeConstraint.md) | `from foundry_sdk.v2.ontologies.models import RangeConstraint` | +**Ontologies** | [RangesConstraint](docs/v2/Ontologies/models/RangesConstraint.md) | `from foundry_sdk.v2.ontologies.models import RangesConstraint` | +**Ontologies** | [RegexConstraint](docs/v2/Ontologies/models/RegexConstraint.md) | `from foundry_sdk.v2.ontologies.models import RegexConstraint` | +**Ontologies** | [RegexQuery](docs/v2/Ontologies/models/RegexQuery.md) | `from foundry_sdk.v2.ontologies.models import RegexQuery` | +**Ontologies** | [RelativeDateRangeBound](docs/v2/Ontologies/models/RelativeDateRangeBound.md) | `from foundry_sdk.v2.ontologies.models import RelativeDateRangeBound` | +**Ontologies** | [RelativeDateRangeQuery](docs/v2/Ontologies/models/RelativeDateRangeQuery.md) | `from foundry_sdk.v2.ontologies.models import RelativeDateRangeQuery` | +**Ontologies** | [RelativePointInTime](docs/v2/Ontologies/models/RelativePointInTime.md) | `from foundry_sdk.v2.ontologies.models import RelativePointInTime` | +**Ontologies** | [RelativeTime](docs/v2/Ontologies/models/RelativeTime.md) | `from foundry_sdk.v2.ontologies.models import RelativeTime` | +**Ontologies** | [RelativeTimeRange](docs/v2/Ontologies/models/RelativeTimeRange.md) | `from foundry_sdk.v2.ontologies.models import RelativeTimeRange` | +**Ontologies** | [RelativeTimeRelation](docs/v2/Ontologies/models/RelativeTimeRelation.md) | `from foundry_sdk.v2.ontologies.models import RelativeTimeRelation` | +**Ontologies** | [RelativeTimeSeriesTimeUnit](docs/v2/Ontologies/models/RelativeTimeSeriesTimeUnit.md) | `from foundry_sdk.v2.ontologies.models import RelativeTimeSeriesTimeUnit` | +**Ontologies** | [RelativeTimeUnit](docs/v2/Ontologies/models/RelativeTimeUnit.md) | `from foundry_sdk.v2.ontologies.models import RelativeTimeUnit` | +**Ontologies** | [ResolvedInterfacePropertyType](docs/v2/Ontologies/models/ResolvedInterfacePropertyType.md) | `from foundry_sdk.v2.ontologies.models import ResolvedInterfacePropertyType` | +**Ontologies** | [ReturnEditsMode](docs/v2/Ontologies/models/ReturnEditsMode.md) | `from foundry_sdk.v2.ontologies.models import ReturnEditsMode` | +**Ontologies** | [RidConstraint](docs/v2/Ontologies/models/RidConstraint.md) | `from foundry_sdk.v2.ontologies.models import RidConstraint` | +**Ontologies** | [RollingAggregateWindowPoints](docs/v2/Ontologies/models/RollingAggregateWindowPoints.md) | `from foundry_sdk.v2.ontologies.models import RollingAggregateWindowPoints` | +**Ontologies** | [SdkPackageName](docs/v2/Ontologies/models/SdkPackageName.md) | `from foundry_sdk.v2.ontologies.models import SdkPackageName` | +**Ontologies** | [SdkPackageRid](docs/v2/Ontologies/models/SdkPackageRid.md) | `from foundry_sdk.v2.ontologies.models import SdkPackageRid` | +**Ontologies** | [SdkVersion](docs/v2/Ontologies/models/SdkVersion.md) | `from foundry_sdk.v2.ontologies.models import SdkVersion` | +**Ontologies** | [SearchJsonQueryV2](docs/v2/Ontologies/models/SearchJsonQueryV2.md) | `from foundry_sdk.v2.ontologies.models import SearchJsonQueryV2` | +**Ontologies** | [SearchObjectsForInterfaceRequest](docs/v2/Ontologies/models/SearchObjectsForInterfaceRequest.md) | `from foundry_sdk.v2.ontologies.models import SearchObjectsForInterfaceRequest` | +**Ontologies** | [SearchObjectsRequestV2](docs/v2/Ontologies/models/SearchObjectsRequestV2.md) | `from foundry_sdk.v2.ontologies.models import SearchObjectsRequestV2` | +**Ontologies** | [SearchObjectsResponseV2](docs/v2/Ontologies/models/SearchObjectsResponseV2.md) | `from foundry_sdk.v2.ontologies.models import SearchObjectsResponseV2` | +**Ontologies** | [SearchOrderByType](docs/v2/Ontologies/models/SearchOrderByType.md) | `from foundry_sdk.v2.ontologies.models import SearchOrderByType` | +**Ontologies** | [SearchOrderByV2](docs/v2/Ontologies/models/SearchOrderByV2.md) | `from foundry_sdk.v2.ontologies.models import SearchOrderByV2` | +**Ontologies** | [SearchOrderingV2](docs/v2/Ontologies/models/SearchOrderingV2.md) | `from foundry_sdk.v2.ontologies.models import SearchOrderingV2` | +**Ontologies** | [SelectedPropertyApiName](docs/v2/Ontologies/models/SelectedPropertyApiName.md) | `from foundry_sdk.v2.ontologies.models import SelectedPropertyApiName` | +**Ontologies** | [SelectedPropertyApproximateDistinctAggregation](docs/v2/Ontologies/models/SelectedPropertyApproximateDistinctAggregation.md) | `from foundry_sdk.v2.ontologies.models import SelectedPropertyApproximateDistinctAggregation` | +**Ontologies** | [SelectedPropertyApproximatePercentileAggregation](docs/v2/Ontologies/models/SelectedPropertyApproximatePercentileAggregation.md) | `from foundry_sdk.v2.ontologies.models import SelectedPropertyApproximatePercentileAggregation` | +**Ontologies** | [SelectedPropertyAvgAggregation](docs/v2/Ontologies/models/SelectedPropertyAvgAggregation.md) | `from foundry_sdk.v2.ontologies.models import SelectedPropertyAvgAggregation` | +**Ontologies** | [SelectedPropertyCollectListAggregation](docs/v2/Ontologies/models/SelectedPropertyCollectListAggregation.md) | `from foundry_sdk.v2.ontologies.models import SelectedPropertyCollectListAggregation` | +**Ontologies** | [SelectedPropertyCollectSetAggregation](docs/v2/Ontologies/models/SelectedPropertyCollectSetAggregation.md) | `from foundry_sdk.v2.ontologies.models import SelectedPropertyCollectSetAggregation` | +**Ontologies** | [SelectedPropertyCountAggregation](docs/v2/Ontologies/models/SelectedPropertyCountAggregation.md) | `from foundry_sdk.v2.ontologies.models import SelectedPropertyCountAggregation` | +**Ontologies** | [SelectedPropertyExactDistinctAggregation](docs/v2/Ontologies/models/SelectedPropertyExactDistinctAggregation.md) | `from foundry_sdk.v2.ontologies.models import SelectedPropertyExactDistinctAggregation` | +**Ontologies** | [SelectedPropertyExpression](docs/v2/Ontologies/models/SelectedPropertyExpression.md) | `from foundry_sdk.v2.ontologies.models import SelectedPropertyExpression` | +**Ontologies** | [SelectedPropertyMaxAggregation](docs/v2/Ontologies/models/SelectedPropertyMaxAggregation.md) | `from foundry_sdk.v2.ontologies.models import SelectedPropertyMaxAggregation` | +**Ontologies** | [SelectedPropertyMinAggregation](docs/v2/Ontologies/models/SelectedPropertyMinAggregation.md) | `from foundry_sdk.v2.ontologies.models import SelectedPropertyMinAggregation` | +**Ontologies** | [SelectedPropertyOperation](docs/v2/Ontologies/models/SelectedPropertyOperation.md) | `from foundry_sdk.v2.ontologies.models import SelectedPropertyOperation` | +**Ontologies** | [SelectedPropertySumAggregation](docs/v2/Ontologies/models/SelectedPropertySumAggregation.md) | `from foundry_sdk.v2.ontologies.models import SelectedPropertySumAggregation` | +**Ontologies** | [SharedPropertyType](docs/v2/Ontologies/models/SharedPropertyType.md) | `from foundry_sdk.v2.ontologies.models import SharedPropertyType` | +**Ontologies** | [SharedPropertyTypeApiName](docs/v2/Ontologies/models/SharedPropertyTypeApiName.md) | `from foundry_sdk.v2.ontologies.models import SharedPropertyTypeApiName` | +**Ontologies** | [SharedPropertyTypeRid](docs/v2/Ontologies/models/SharedPropertyTypeRid.md) | `from foundry_sdk.v2.ontologies.models import SharedPropertyTypeRid` | +**Ontologies** | [StartsWithQuery](docs/v2/Ontologies/models/StartsWithQuery.md) | `from foundry_sdk.v2.ontologies.models import StartsWithQuery` | +**Ontologies** | [StaticArgument](docs/v2/Ontologies/models/StaticArgument.md) | `from foundry_sdk.v2.ontologies.models import StaticArgument` | +**Ontologies** | [StreamingOutputFormat](docs/v2/Ontologies/models/StreamingOutputFormat.md) | `from foundry_sdk.v2.ontologies.models import StreamingOutputFormat` | +**Ontologies** | [StreamTimeSeriesPointsRequest](docs/v2/Ontologies/models/StreamTimeSeriesPointsRequest.md) | `from foundry_sdk.v2.ontologies.models import StreamTimeSeriesPointsRequest` | +**Ontologies** | [StreamTimeSeriesValuesRequest](docs/v2/Ontologies/models/StreamTimeSeriesValuesRequest.md) | `from foundry_sdk.v2.ontologies.models import StreamTimeSeriesValuesRequest` | +**Ontologies** | [StringConstant](docs/v2/Ontologies/models/StringConstant.md) | `from foundry_sdk.v2.ontologies.models import StringConstant` | +**Ontologies** | [StringLengthConstraint](docs/v2/Ontologies/models/StringLengthConstraint.md) | `from foundry_sdk.v2.ontologies.models import StringLengthConstraint` | +**Ontologies** | [StringRegexMatchConstraint](docs/v2/Ontologies/models/StringRegexMatchConstraint.md) | `from foundry_sdk.v2.ontologies.models import StringRegexMatchConstraint` | +**Ontologies** | [StructConstraint](docs/v2/Ontologies/models/StructConstraint.md) | `from foundry_sdk.v2.ontologies.models import StructConstraint` | +**Ontologies** | [StructEvaluatedConstraint](docs/v2/Ontologies/models/StructEvaluatedConstraint.md) | `from foundry_sdk.v2.ontologies.models import StructEvaluatedConstraint` | +**Ontologies** | [StructFieldApiName](docs/v2/Ontologies/models/StructFieldApiName.md) | `from foundry_sdk.v2.ontologies.models import StructFieldApiName` | +**Ontologies** | [StructFieldArgument](docs/v2/Ontologies/models/StructFieldArgument.md) | `from foundry_sdk.v2.ontologies.models import StructFieldArgument` | +**Ontologies** | [StructFieldEvaluatedConstraint](docs/v2/Ontologies/models/StructFieldEvaluatedConstraint.md) | `from foundry_sdk.v2.ontologies.models import StructFieldEvaluatedConstraint` | +**Ontologies** | [StructFieldEvaluationResult](docs/v2/Ontologies/models/StructFieldEvaluationResult.md) | `from foundry_sdk.v2.ontologies.models import StructFieldEvaluationResult` | +**Ontologies** | [StructFieldOfPropertyImplementation](docs/v2/Ontologies/models/StructFieldOfPropertyImplementation.md) | `from foundry_sdk.v2.ontologies.models import StructFieldOfPropertyImplementation` | +**Ontologies** | [StructFieldSelector](docs/v2/Ontologies/models/StructFieldSelector.md) | `from foundry_sdk.v2.ontologies.models import StructFieldSelector` | +**Ontologies** | [StructFieldType](docs/v2/Ontologies/models/StructFieldType.md) | `from foundry_sdk.v2.ontologies.models import StructFieldType` | +**Ontologies** | [StructFieldTypeRid](docs/v2/Ontologies/models/StructFieldTypeRid.md) | `from foundry_sdk.v2.ontologies.models import StructFieldTypeRid` | +**Ontologies** | [StructListParameterFieldArgument](docs/v2/Ontologies/models/StructListParameterFieldArgument.md) | `from foundry_sdk.v2.ontologies.models import StructListParameterFieldArgument` | +**Ontologies** | [StructParameterFieldApiName](docs/v2/Ontologies/models/StructParameterFieldApiName.md) | `from foundry_sdk.v2.ontologies.models import StructParameterFieldApiName` | +**Ontologies** | [StructParameterFieldArgument](docs/v2/Ontologies/models/StructParameterFieldArgument.md) | `from foundry_sdk.v2.ontologies.models import StructParameterFieldArgument` | +**Ontologies** | [StructType](docs/v2/Ontologies/models/StructType.md) | `from foundry_sdk.v2.ontologies.models import StructType` | +**Ontologies** | [StructTypeMainValue](docs/v2/Ontologies/models/StructTypeMainValue.md) | `from foundry_sdk.v2.ontologies.models import StructTypeMainValue` | +**Ontologies** | [SubmissionCriteriaEvaluation](docs/v2/Ontologies/models/SubmissionCriteriaEvaluation.md) | `from foundry_sdk.v2.ontologies.models import SubmissionCriteriaEvaluation` | +**Ontologies** | [SubtractPropertyExpression](docs/v2/Ontologies/models/SubtractPropertyExpression.md) | `from foundry_sdk.v2.ontologies.models import SubtractPropertyExpression` | +**Ontologies** | [SumAggregationV2](docs/v2/Ontologies/models/SumAggregationV2.md) | `from foundry_sdk.v2.ontologies.models import SumAggregationV2` | +**Ontologies** | [SyncApplyActionResponseV2](docs/v2/Ontologies/models/SyncApplyActionResponseV2.md) | `from foundry_sdk.v2.ontologies.models import SyncApplyActionResponseV2` | +**Ontologies** | [SynchronousWebhookOutputArgument](docs/v2/Ontologies/models/SynchronousWebhookOutputArgument.md) | `from foundry_sdk.v2.ontologies.models import SynchronousWebhookOutputArgument` | +**Ontologies** | [ThreeDimensionalAggregation](docs/v2/Ontologies/models/ThreeDimensionalAggregation.md) | `from foundry_sdk.v2.ontologies.models import ThreeDimensionalAggregation` | +**Ontologies** | [TimeCodeFormat](docs/v2/Ontologies/models/TimeCodeFormat.md) | `from foundry_sdk.v2.ontologies.models import TimeCodeFormat` | +**Ontologies** | [TimeRange](docs/v2/Ontologies/models/TimeRange.md) | `from foundry_sdk.v2.ontologies.models import TimeRange` | +**Ontologies** | [TimeSeriesAggregationMethod](docs/v2/Ontologies/models/TimeSeriesAggregationMethod.md) | `from foundry_sdk.v2.ontologies.models import TimeSeriesAggregationMethod` | +**Ontologies** | [TimeSeriesAggregationStrategy](docs/v2/Ontologies/models/TimeSeriesAggregationStrategy.md) | `from foundry_sdk.v2.ontologies.models import TimeSeriesAggregationStrategy` | +**Ontologies** | [TimeSeriesCumulativeAggregate](docs/v2/Ontologies/models/TimeSeriesCumulativeAggregate.md) | `from foundry_sdk.v2.ontologies.models import TimeSeriesCumulativeAggregate` | +**Ontologies** | [TimeseriesEntry](docs/v2/Ontologies/models/TimeseriesEntry.md) | `from foundry_sdk.v2.ontologies.models import TimeseriesEntry` | +**Ontologies** | [TimeSeriesPeriodicAggregate](docs/v2/Ontologies/models/TimeSeriesPeriodicAggregate.md) | `from foundry_sdk.v2.ontologies.models import TimeSeriesPeriodicAggregate` | +**Ontologies** | [TimeSeriesPoint](docs/v2/Ontologies/models/TimeSeriesPoint.md) | `from foundry_sdk.v2.ontologies.models import TimeSeriesPoint` | +**Ontologies** | [TimeSeriesRollingAggregate](docs/v2/Ontologies/models/TimeSeriesRollingAggregate.md) | `from foundry_sdk.v2.ontologies.models import TimeSeriesRollingAggregate` | +**Ontologies** | [TimeSeriesRollingAggregateWindow](docs/v2/Ontologies/models/TimeSeriesRollingAggregateWindow.md) | `from foundry_sdk.v2.ontologies.models import TimeSeriesRollingAggregateWindow` | +**Ontologies** | [TimeSeriesWindowType](docs/v2/Ontologies/models/TimeSeriesWindowType.md) | `from foundry_sdk.v2.ontologies.models import TimeSeriesWindowType` | +**Ontologies** | [TimeUnit](docs/v2/Ontologies/models/TimeUnit.md) | `from foundry_sdk.v2.ontologies.models import TimeUnit` | +**Ontologies** | [TransactionEdit](docs/v2/Ontologies/models/TransactionEdit.md) | `from foundry_sdk.v2.ontologies.models import TransactionEdit` | +**Ontologies** | [TwoDimensionalAggregation](docs/v2/Ontologies/models/TwoDimensionalAggregation.md) | `from foundry_sdk.v2.ontologies.models import TwoDimensionalAggregation` | +**Ontologies** | [UnevaluableConstraint](docs/v2/Ontologies/models/UnevaluableConstraint.md) | `from foundry_sdk.v2.ontologies.models import UnevaluableConstraint` | +**Ontologies** | [UniqueIdentifierArgument](docs/v2/Ontologies/models/UniqueIdentifierArgument.md) | `from foundry_sdk.v2.ontologies.models import UniqueIdentifierArgument` | +**Ontologies** | [UniqueIdentifierLinkId](docs/v2/Ontologies/models/UniqueIdentifierLinkId.md) | `from foundry_sdk.v2.ontologies.models import UniqueIdentifierLinkId` | +**Ontologies** | [UniqueIdentifierValue](docs/v2/Ontologies/models/UniqueIdentifierValue.md) | `from foundry_sdk.v2.ontologies.models import UniqueIdentifierValue` | +**Ontologies** | [UuidConstraint](docs/v2/Ontologies/models/UuidConstraint.md) | `from foundry_sdk.v2.ontologies.models import UuidConstraint` | +**Ontologies** | [ValidateActionResponseV2](docs/v2/Ontologies/models/ValidateActionResponseV2.md) | `from foundry_sdk.v2.ontologies.models import ValidateActionResponseV2` | +**Ontologies** | [ValidationResult](docs/v2/Ontologies/models/ValidationResult.md) | `from foundry_sdk.v2.ontologies.models import ValidationResult` | +**Ontologies** | [ValueType](docs/v2/Ontologies/models/ValueType.md) | `from foundry_sdk.v2.ontologies.models import ValueType` | +**Ontologies** | [ValueTypeApiName](docs/v2/Ontologies/models/ValueTypeApiName.md) | `from foundry_sdk.v2.ontologies.models import ValueTypeApiName` | +**Ontologies** | [ValueTypeArrayType](docs/v2/Ontologies/models/ValueTypeArrayType.md) | `from foundry_sdk.v2.ontologies.models import ValueTypeArrayType` | +**Ontologies** | [ValueTypeConstraint](docs/v2/Ontologies/models/ValueTypeConstraint.md) | `from foundry_sdk.v2.ontologies.models import ValueTypeConstraint` | +**Ontologies** | [ValueTypeDecimalType](docs/v2/Ontologies/models/ValueTypeDecimalType.md) | `from foundry_sdk.v2.ontologies.models import ValueTypeDecimalType` | +**Ontologies** | [ValueTypeFieldType](docs/v2/Ontologies/models/ValueTypeFieldType.md) | `from foundry_sdk.v2.ontologies.models import ValueTypeFieldType` | +**Ontologies** | [ValueTypeMapType](docs/v2/Ontologies/models/ValueTypeMapType.md) | `from foundry_sdk.v2.ontologies.models import ValueTypeMapType` | +**Ontologies** | [ValueTypeOptionalType](docs/v2/Ontologies/models/ValueTypeOptionalType.md) | `from foundry_sdk.v2.ontologies.models import ValueTypeOptionalType` | +**Ontologies** | [ValueTypeReferenceType](docs/v2/Ontologies/models/ValueTypeReferenceType.md) | `from foundry_sdk.v2.ontologies.models import ValueTypeReferenceType` | +**Ontologies** | [ValueTypeRid](docs/v2/Ontologies/models/ValueTypeRid.md) | `from foundry_sdk.v2.ontologies.models import ValueTypeRid` | +**Ontologies** | [ValueTypeStatus](docs/v2/Ontologies/models/ValueTypeStatus.md) | `from foundry_sdk.v2.ontologies.models import ValueTypeStatus` | +**Ontologies** | [ValueTypeStructField](docs/v2/Ontologies/models/ValueTypeStructField.md) | `from foundry_sdk.v2.ontologies.models import ValueTypeStructField` | +**Ontologies** | [ValueTypeStructType](docs/v2/Ontologies/models/ValueTypeStructType.md) | `from foundry_sdk.v2.ontologies.models import ValueTypeStructType` | +**Ontologies** | [ValueTypeUnionType](docs/v2/Ontologies/models/ValueTypeUnionType.md) | `from foundry_sdk.v2.ontologies.models import ValueTypeUnionType` | +**Ontologies** | [VersionedQueryTypeApiName](docs/v2/Ontologies/models/VersionedQueryTypeApiName.md) | `from foundry_sdk.v2.ontologies.models import VersionedQueryTypeApiName` | +**Ontologies** | [WildcardQuery](docs/v2/Ontologies/models/WildcardQuery.md) | `from foundry_sdk.v2.ontologies.models import WildcardQuery` | +**Ontologies** | [WithinBoundingBoxPoint](docs/v2/Ontologies/models/WithinBoundingBoxPoint.md) | `from foundry_sdk.v2.ontologies.models import WithinBoundingBoxPoint` | +**Ontologies** | [WithinBoundingBoxQuery](docs/v2/Ontologies/models/WithinBoundingBoxQuery.md) | `from foundry_sdk.v2.ontologies.models import WithinBoundingBoxQuery` | +**Ontologies** | [WithinDistanceOfQuery](docs/v2/Ontologies/models/WithinDistanceOfQuery.md) | `from foundry_sdk.v2.ontologies.models import WithinDistanceOfQuery` | +**Ontologies** | [WithinPolygonQuery](docs/v2/Ontologies/models/WithinPolygonQuery.md) | `from foundry_sdk.v2.ontologies.models import WithinPolygonQuery` | +**Orchestration** | [AbortOnFailure](docs/v2/Orchestration/models/AbortOnFailure.md) | `from foundry_sdk.v2.orchestration.models import AbortOnFailure` | +**Orchestration** | [Action](docs/v2/Orchestration/models/Action.md) | `from foundry_sdk.v2.orchestration.models import Action` | +**Orchestration** | [AffectedResourcesResponse](docs/v2/Orchestration/models/AffectedResourcesResponse.md) | `from foundry_sdk.v2.orchestration.models import AffectedResourcesResponse` | +**Orchestration** | [AndTrigger](docs/v2/Orchestration/models/AndTrigger.md) | `from foundry_sdk.v2.orchestration.models import AndTrigger` | +**Orchestration** | [Build](docs/v2/Orchestration/models/Build.md) | `from foundry_sdk.v2.orchestration.models import Build` | +**Orchestration** | [BuildableRid](docs/v2/Orchestration/models/BuildableRid.md) | `from foundry_sdk.v2.orchestration.models import BuildableRid` | +**Orchestration** | [BuildStatus](docs/v2/Orchestration/models/BuildStatus.md) | `from foundry_sdk.v2.orchestration.models import BuildStatus` | +**Orchestration** | [BuildTarget](docs/v2/Orchestration/models/BuildTarget.md) | `from foundry_sdk.v2.orchestration.models import BuildTarget` | +**Orchestration** | [ConnectingTarget](docs/v2/Orchestration/models/ConnectingTarget.md) | `from foundry_sdk.v2.orchestration.models import ConnectingTarget` | +**Orchestration** | [CreateBuildRequest](docs/v2/Orchestration/models/CreateBuildRequest.md) | `from foundry_sdk.v2.orchestration.models import CreateBuildRequest` | +**Orchestration** | [CreateScheduleRequest](docs/v2/Orchestration/models/CreateScheduleRequest.md) | `from foundry_sdk.v2.orchestration.models import CreateScheduleRequest` | +**Orchestration** | [CreateScheduleRequestAction](docs/v2/Orchestration/models/CreateScheduleRequestAction.md) | `from foundry_sdk.v2.orchestration.models import CreateScheduleRequestAction` | +**Orchestration** | [CreateScheduleRequestBuildTarget](docs/v2/Orchestration/models/CreateScheduleRequestBuildTarget.md) | `from foundry_sdk.v2.orchestration.models import CreateScheduleRequestBuildTarget` | +**Orchestration** | [CreateScheduleRequestConnectingTarget](docs/v2/Orchestration/models/CreateScheduleRequestConnectingTarget.md) | `from foundry_sdk.v2.orchestration.models import CreateScheduleRequestConnectingTarget` | +**Orchestration** | [CreateScheduleRequestManualTarget](docs/v2/Orchestration/models/CreateScheduleRequestManualTarget.md) | `from foundry_sdk.v2.orchestration.models import CreateScheduleRequestManualTarget` | +**Orchestration** | [CreateScheduleRequestProjectScope](docs/v2/Orchestration/models/CreateScheduleRequestProjectScope.md) | `from foundry_sdk.v2.orchestration.models import CreateScheduleRequestProjectScope` | +**Orchestration** | [CreateScheduleRequestScopeMode](docs/v2/Orchestration/models/CreateScheduleRequestScopeMode.md) | `from foundry_sdk.v2.orchestration.models import CreateScheduleRequestScopeMode` | +**Orchestration** | [CreateScheduleRequestUpstreamTarget](docs/v2/Orchestration/models/CreateScheduleRequestUpstreamTarget.md) | `from foundry_sdk.v2.orchestration.models import CreateScheduleRequestUpstreamTarget` | +**Orchestration** | [CreateScheduleRequestUserScope](docs/v2/Orchestration/models/CreateScheduleRequestUserScope.md) | `from foundry_sdk.v2.orchestration.models import CreateScheduleRequestUserScope` | +**Orchestration** | [CronExpression](docs/v2/Orchestration/models/CronExpression.md) | `from foundry_sdk.v2.orchestration.models import CronExpression` | +**Orchestration** | [DatasetJobOutput](docs/v2/Orchestration/models/DatasetJobOutput.md) | `from foundry_sdk.v2.orchestration.models import DatasetJobOutput` | +**Orchestration** | [DatasetUpdatedTrigger](docs/v2/Orchestration/models/DatasetUpdatedTrigger.md) | `from foundry_sdk.v2.orchestration.models import DatasetUpdatedTrigger` | +**Orchestration** | [FallbackBranches](docs/v2/Orchestration/models/FallbackBranches.md) | `from foundry_sdk.v2.orchestration.models import FallbackBranches` | +**Orchestration** | [ForceBuild](docs/v2/Orchestration/models/ForceBuild.md) | `from foundry_sdk.v2.orchestration.models import ForceBuild` | +**Orchestration** | [GetBuildsBatchRequestElement](docs/v2/Orchestration/models/GetBuildsBatchRequestElement.md) | `from foundry_sdk.v2.orchestration.models import GetBuildsBatchRequestElement` | +**Orchestration** | [GetBuildsBatchResponse](docs/v2/Orchestration/models/GetBuildsBatchResponse.md) | `from foundry_sdk.v2.orchestration.models import GetBuildsBatchResponse` | +**Orchestration** | [GetJobsBatchRequestElement](docs/v2/Orchestration/models/GetJobsBatchRequestElement.md) | `from foundry_sdk.v2.orchestration.models import GetJobsBatchRequestElement` | +**Orchestration** | [GetJobsBatchResponse](docs/v2/Orchestration/models/GetJobsBatchResponse.md) | `from foundry_sdk.v2.orchestration.models import GetJobsBatchResponse` | +**Orchestration** | [GetSchedulesBatchRequestElement](docs/v2/Orchestration/models/GetSchedulesBatchRequestElement.md) | `from foundry_sdk.v2.orchestration.models import GetSchedulesBatchRequestElement` | +**Orchestration** | [GetSchedulesBatchResponse](docs/v2/Orchestration/models/GetSchedulesBatchResponse.md) | `from foundry_sdk.v2.orchestration.models import GetSchedulesBatchResponse` | +**Orchestration** | [Job](docs/v2/Orchestration/models/Job.md) | `from foundry_sdk.v2.orchestration.models import Job` | +**Orchestration** | [JobOutput](docs/v2/Orchestration/models/JobOutput.md) | `from foundry_sdk.v2.orchestration.models import JobOutput` | +**Orchestration** | [JobStartedTime](docs/v2/Orchestration/models/JobStartedTime.md) | `from foundry_sdk.v2.orchestration.models import JobStartedTime` | +**Orchestration** | [JobStatus](docs/v2/Orchestration/models/JobStatus.md) | `from foundry_sdk.v2.orchestration.models import JobStatus` | +**Orchestration** | [JobSucceededTrigger](docs/v2/Orchestration/models/JobSucceededTrigger.md) | `from foundry_sdk.v2.orchestration.models import JobSucceededTrigger` | +**Orchestration** | [ListJobsOfBuildResponse](docs/v2/Orchestration/models/ListJobsOfBuildResponse.md) | `from foundry_sdk.v2.orchestration.models import ListJobsOfBuildResponse` | +**Orchestration** | [ListRunsOfScheduleResponse](docs/v2/Orchestration/models/ListRunsOfScheduleResponse.md) | `from foundry_sdk.v2.orchestration.models import ListRunsOfScheduleResponse` | +**Orchestration** | [ManualTarget](docs/v2/Orchestration/models/ManualTarget.md) | `from foundry_sdk.v2.orchestration.models import ManualTarget` | +**Orchestration** | [ManualTrigger](docs/v2/Orchestration/models/ManualTrigger.md) | `from foundry_sdk.v2.orchestration.models import ManualTrigger` | +**Orchestration** | [MediaSetUpdatedTrigger](docs/v2/Orchestration/models/MediaSetUpdatedTrigger.md) | `from foundry_sdk.v2.orchestration.models import MediaSetUpdatedTrigger` | +**Orchestration** | [NewLogicTrigger](docs/v2/Orchestration/models/NewLogicTrigger.md) | `from foundry_sdk.v2.orchestration.models import NewLogicTrigger` | +**Orchestration** | [NotificationsEnabled](docs/v2/Orchestration/models/NotificationsEnabled.md) | `from foundry_sdk.v2.orchestration.models import NotificationsEnabled` | +**Orchestration** | [OrTrigger](docs/v2/Orchestration/models/OrTrigger.md) | `from foundry_sdk.v2.orchestration.models import OrTrigger` | +**Orchestration** | [ProjectScope](docs/v2/Orchestration/models/ProjectScope.md) | `from foundry_sdk.v2.orchestration.models import ProjectScope` | +**Orchestration** | [ReplaceScheduleRequest](docs/v2/Orchestration/models/ReplaceScheduleRequest.md) | `from foundry_sdk.v2.orchestration.models import ReplaceScheduleRequest` | +**Orchestration** | [ReplaceScheduleRequestAction](docs/v2/Orchestration/models/ReplaceScheduleRequestAction.md) | `from foundry_sdk.v2.orchestration.models import ReplaceScheduleRequestAction` | +**Orchestration** | [ReplaceScheduleRequestBuildTarget](docs/v2/Orchestration/models/ReplaceScheduleRequestBuildTarget.md) | `from foundry_sdk.v2.orchestration.models import ReplaceScheduleRequestBuildTarget` | +**Orchestration** | [ReplaceScheduleRequestConnectingTarget](docs/v2/Orchestration/models/ReplaceScheduleRequestConnectingTarget.md) | `from foundry_sdk.v2.orchestration.models import ReplaceScheduleRequestConnectingTarget` | +**Orchestration** | [ReplaceScheduleRequestManualTarget](docs/v2/Orchestration/models/ReplaceScheduleRequestManualTarget.md) | `from foundry_sdk.v2.orchestration.models import ReplaceScheduleRequestManualTarget` | +**Orchestration** | [ReplaceScheduleRequestProjectScope](docs/v2/Orchestration/models/ReplaceScheduleRequestProjectScope.md) | `from foundry_sdk.v2.orchestration.models import ReplaceScheduleRequestProjectScope` | +**Orchestration** | [ReplaceScheduleRequestScopeMode](docs/v2/Orchestration/models/ReplaceScheduleRequestScopeMode.md) | `from foundry_sdk.v2.orchestration.models import ReplaceScheduleRequestScopeMode` | +**Orchestration** | [ReplaceScheduleRequestUpstreamTarget](docs/v2/Orchestration/models/ReplaceScheduleRequestUpstreamTarget.md) | `from foundry_sdk.v2.orchestration.models import ReplaceScheduleRequestUpstreamTarget` | +**Orchestration** | [ReplaceScheduleRequestUserScope](docs/v2/Orchestration/models/ReplaceScheduleRequestUserScope.md) | `from foundry_sdk.v2.orchestration.models import ReplaceScheduleRequestUserScope` | +**Orchestration** | [RetryBackoffDuration](docs/v2/Orchestration/models/RetryBackoffDuration.md) | `from foundry_sdk.v2.orchestration.models import RetryBackoffDuration` | +**Orchestration** | [RetryCount](docs/v2/Orchestration/models/RetryCount.md) | `from foundry_sdk.v2.orchestration.models import RetryCount` | +**Orchestration** | [Schedule](docs/v2/Orchestration/models/Schedule.md) | `from foundry_sdk.v2.orchestration.models import Schedule` | +**Orchestration** | [SchedulePaused](docs/v2/Orchestration/models/SchedulePaused.md) | `from foundry_sdk.v2.orchestration.models import SchedulePaused` | +**Orchestration** | [ScheduleRun](docs/v2/Orchestration/models/ScheduleRun.md) | `from foundry_sdk.v2.orchestration.models import ScheduleRun` | +**Orchestration** | [ScheduleRunError](docs/v2/Orchestration/models/ScheduleRunError.md) | `from foundry_sdk.v2.orchestration.models import ScheduleRunError` | +**Orchestration** | [ScheduleRunErrorName](docs/v2/Orchestration/models/ScheduleRunErrorName.md) | `from foundry_sdk.v2.orchestration.models import ScheduleRunErrorName` | +**Orchestration** | [ScheduleRunIgnored](docs/v2/Orchestration/models/ScheduleRunIgnored.md) | `from foundry_sdk.v2.orchestration.models import ScheduleRunIgnored` | +**Orchestration** | [ScheduleRunResult](docs/v2/Orchestration/models/ScheduleRunResult.md) | `from foundry_sdk.v2.orchestration.models import ScheduleRunResult` | +**Orchestration** | [ScheduleRunRid](docs/v2/Orchestration/models/ScheduleRunRid.md) | `from foundry_sdk.v2.orchestration.models import ScheduleRunRid` | +**Orchestration** | [ScheduleRunSubmitted](docs/v2/Orchestration/models/ScheduleRunSubmitted.md) | `from foundry_sdk.v2.orchestration.models import ScheduleRunSubmitted` | +**Orchestration** | [ScheduleSucceededTrigger](docs/v2/Orchestration/models/ScheduleSucceededTrigger.md) | `from foundry_sdk.v2.orchestration.models import ScheduleSucceededTrigger` | +**Orchestration** | [ScheduleVersion](docs/v2/Orchestration/models/ScheduleVersion.md) | `from foundry_sdk.v2.orchestration.models import ScheduleVersion` | +**Orchestration** | [ScheduleVersionRid](docs/v2/Orchestration/models/ScheduleVersionRid.md) | `from foundry_sdk.v2.orchestration.models import ScheduleVersionRid` | +**Orchestration** | [ScopeMode](docs/v2/Orchestration/models/ScopeMode.md) | `from foundry_sdk.v2.orchestration.models import ScopeMode` | +**Orchestration** | [SearchBuildsAndFilter](docs/v2/Orchestration/models/SearchBuildsAndFilter.md) | `from foundry_sdk.v2.orchestration.models import SearchBuildsAndFilter` | +**Orchestration** | [SearchBuildsEqualsFilter](docs/v2/Orchestration/models/SearchBuildsEqualsFilter.md) | `from foundry_sdk.v2.orchestration.models import SearchBuildsEqualsFilter` | +**Orchestration** | [SearchBuildsEqualsFilterField](docs/v2/Orchestration/models/SearchBuildsEqualsFilterField.md) | `from foundry_sdk.v2.orchestration.models import SearchBuildsEqualsFilterField` | +**Orchestration** | [SearchBuildsFilter](docs/v2/Orchestration/models/SearchBuildsFilter.md) | `from foundry_sdk.v2.orchestration.models import SearchBuildsFilter` | +**Orchestration** | [SearchBuildsGteFilter](docs/v2/Orchestration/models/SearchBuildsGteFilter.md) | `from foundry_sdk.v2.orchestration.models import SearchBuildsGteFilter` | +**Orchestration** | [SearchBuildsGteFilterField](docs/v2/Orchestration/models/SearchBuildsGteFilterField.md) | `from foundry_sdk.v2.orchestration.models import SearchBuildsGteFilterField` | +**Orchestration** | [SearchBuildsLtFilter](docs/v2/Orchestration/models/SearchBuildsLtFilter.md) | `from foundry_sdk.v2.orchestration.models import SearchBuildsLtFilter` | +**Orchestration** | [SearchBuildsLtFilterField](docs/v2/Orchestration/models/SearchBuildsLtFilterField.md) | `from foundry_sdk.v2.orchestration.models import SearchBuildsLtFilterField` | +**Orchestration** | [SearchBuildsNotFilter](docs/v2/Orchestration/models/SearchBuildsNotFilter.md) | `from foundry_sdk.v2.orchestration.models import SearchBuildsNotFilter` | +**Orchestration** | [SearchBuildsOrderBy](docs/v2/Orchestration/models/SearchBuildsOrderBy.md) | `from foundry_sdk.v2.orchestration.models import SearchBuildsOrderBy` | +**Orchestration** | [SearchBuildsOrderByField](docs/v2/Orchestration/models/SearchBuildsOrderByField.md) | `from foundry_sdk.v2.orchestration.models import SearchBuildsOrderByField` | +**Orchestration** | [SearchBuildsOrderByItem](docs/v2/Orchestration/models/SearchBuildsOrderByItem.md) | `from foundry_sdk.v2.orchestration.models import SearchBuildsOrderByItem` | +**Orchestration** | [SearchBuildsOrFilter](docs/v2/Orchestration/models/SearchBuildsOrFilter.md) | `from foundry_sdk.v2.orchestration.models import SearchBuildsOrFilter` | +**Orchestration** | [SearchBuildsRequest](docs/v2/Orchestration/models/SearchBuildsRequest.md) | `from foundry_sdk.v2.orchestration.models import SearchBuildsRequest` | +**Orchestration** | [SearchBuildsResponse](docs/v2/Orchestration/models/SearchBuildsResponse.md) | `from foundry_sdk.v2.orchestration.models import SearchBuildsResponse` | +**Orchestration** | [TableUpdatedTrigger](docs/v2/Orchestration/models/TableUpdatedTrigger.md) | `from foundry_sdk.v2.orchestration.models import TableUpdatedTrigger` | +**Orchestration** | [TimeTrigger](docs/v2/Orchestration/models/TimeTrigger.md) | `from foundry_sdk.v2.orchestration.models import TimeTrigger` | +**Orchestration** | [TransactionalMediaSetJobOutput](docs/v2/Orchestration/models/TransactionalMediaSetJobOutput.md) | `from foundry_sdk.v2.orchestration.models import TransactionalMediaSetJobOutput` | +**Orchestration** | [Trigger](docs/v2/Orchestration/models/Trigger.md) | `from foundry_sdk.v2.orchestration.models import Trigger` | +**Orchestration** | [UpstreamTarget](docs/v2/Orchestration/models/UpstreamTarget.md) | `from foundry_sdk.v2.orchestration.models import UpstreamTarget` | +**Orchestration** | [UserScope](docs/v2/Orchestration/models/UserScope.md) | `from foundry_sdk.v2.orchestration.models import UserScope` | +**SqlQueries** | [CanceledQueryStatus](docs/v2/SqlQueries/models/CanceledQueryStatus.md) | `from foundry_sdk.v2.sql_queries.models import CanceledQueryStatus` | +**SqlQueries** | [ExecuteSqlQueryRequest](docs/v2/SqlQueries/models/ExecuteSqlQueryRequest.md) | `from foundry_sdk.v2.sql_queries.models import ExecuteSqlQueryRequest` | +**SqlQueries** | [FailedQueryStatus](docs/v2/SqlQueries/models/FailedQueryStatus.md) | `from foundry_sdk.v2.sql_queries.models import FailedQueryStatus` | +**SqlQueries** | [QueryStatus](docs/v2/SqlQueries/models/QueryStatus.md) | `from foundry_sdk.v2.sql_queries.models import QueryStatus` | +**SqlQueries** | [RunningQueryStatus](docs/v2/SqlQueries/models/RunningQueryStatus.md) | `from foundry_sdk.v2.sql_queries.models import RunningQueryStatus` | +**SqlQueries** | [SqlQueryId](docs/v2/SqlQueries/models/SqlQueryId.md) | `from foundry_sdk.v2.sql_queries.models import SqlQueryId` | +**SqlQueries** | [SucceededQueryStatus](docs/v2/SqlQueries/models/SucceededQueryStatus.md) | `from foundry_sdk.v2.sql_queries.models import SucceededQueryStatus` | +**Streams** | [Compressed](docs/v2/Streams/models/Compressed.md) | `from foundry_sdk.v2.streams.models import Compressed` | +**Streams** | [CreateStreamingDatasetRequest](docs/v2/Streams/models/CreateStreamingDatasetRequest.md) | `from foundry_sdk.v2.streams.models import CreateStreamingDatasetRequest` | +**Streams** | [CreateStreamRequest](docs/v2/Streams/models/CreateStreamRequest.md) | `from foundry_sdk.v2.streams.models import CreateStreamRequest` | +**Streams** | [CreateStreamRequestStreamSchema](docs/v2/Streams/models/CreateStreamRequestStreamSchema.md) | `from foundry_sdk.v2.streams.models import CreateStreamRequestStreamSchema` | +**Streams** | [Dataset](docs/v2/Streams/models/Dataset.md) | `from foundry_sdk.v2.streams.models import Dataset` | +**Streams** | [PartitionsCount](docs/v2/Streams/models/PartitionsCount.md) | `from foundry_sdk.v2.streams.models import PartitionsCount` | +**Streams** | [PublishRecordsToStreamRequest](docs/v2/Streams/models/PublishRecordsToStreamRequest.md) | `from foundry_sdk.v2.streams.models import PublishRecordsToStreamRequest` | +**Streams** | [PublishRecordToStreamRequest](docs/v2/Streams/models/PublishRecordToStreamRequest.md) | `from foundry_sdk.v2.streams.models import PublishRecordToStreamRequest` | +**Streams** | [Record](docs/v2/Streams/models/Record.md) | `from foundry_sdk.v2.streams.models import Record` | +**Streams** | [ResetStreamRequest](docs/v2/Streams/models/ResetStreamRequest.md) | `from foundry_sdk.v2.streams.models import ResetStreamRequest` | +**Streams** | [Stream](docs/v2/Streams/models/Stream.md) | `from foundry_sdk.v2.streams.models import Stream` | +**Streams** | [StreamType](docs/v2/Streams/models/StreamType.md) | `from foundry_sdk.v2.streams.models import StreamType` | +**Streams** | [ViewRid](docs/v2/Streams/models/ViewRid.md) | `from foundry_sdk.v2.streams.models import ViewRid` | +**ThirdPartyApplications** | [DeployWebsiteRequest](docs/v2/ThirdPartyApplications/models/DeployWebsiteRequest.md) | `from foundry_sdk.v2.third_party_applications.models import DeployWebsiteRequest` | +**ThirdPartyApplications** | [ListVersionsResponse](docs/v2/ThirdPartyApplications/models/ListVersionsResponse.md) | `from foundry_sdk.v2.third_party_applications.models import ListVersionsResponse` | +**ThirdPartyApplications** | [Subdomain](docs/v2/ThirdPartyApplications/models/Subdomain.md) | `from foundry_sdk.v2.third_party_applications.models import Subdomain` | +**ThirdPartyApplications** | [ThirdPartyApplication](docs/v2/ThirdPartyApplications/models/ThirdPartyApplication.md) | `from foundry_sdk.v2.third_party_applications.models import ThirdPartyApplication` | +**ThirdPartyApplications** | [ThirdPartyApplicationRid](docs/v2/ThirdPartyApplications/models/ThirdPartyApplicationRid.md) | `from foundry_sdk.v2.third_party_applications.models import ThirdPartyApplicationRid` | +**ThirdPartyApplications** | [Version](docs/v2/ThirdPartyApplications/models/Version.md) | `from foundry_sdk.v2.third_party_applications.models import Version` | +**ThirdPartyApplications** | [VersionVersion](docs/v2/ThirdPartyApplications/models/VersionVersion.md) | `from foundry_sdk.v2.third_party_applications.models import VersionVersion` | +**ThirdPartyApplications** | [Website](docs/v2/ThirdPartyApplications/models/Website.md) | `from foundry_sdk.v2.third_party_applications.models import Website` | +**Widgets** | [DevModeSettings](docs/v2/Widgets/models/DevModeSettings.md) | `from foundry_sdk.v2.widgets.models import DevModeSettings` | +**Widgets** | [DevModeStatus](docs/v2/Widgets/models/DevModeStatus.md) | `from foundry_sdk.v2.widgets.models import DevModeStatus` | +**Widgets** | [FilePath](docs/v2/Widgets/models/FilePath.md) | `from foundry_sdk.v2.widgets.models import FilePath` | +**Widgets** | [ListReleasesResponse](docs/v2/Widgets/models/ListReleasesResponse.md) | `from foundry_sdk.v2.widgets.models import ListReleasesResponse` | +**Widgets** | [Release](docs/v2/Widgets/models/Release.md) | `from foundry_sdk.v2.widgets.models import Release` | +**Widgets** | [ReleaseLocator](docs/v2/Widgets/models/ReleaseLocator.md) | `from foundry_sdk.v2.widgets.models import ReleaseLocator` | +**Widgets** | [ReleaseVersion](docs/v2/Widgets/models/ReleaseVersion.md) | `from foundry_sdk.v2.widgets.models import ReleaseVersion` | +**Widgets** | [Repository](docs/v2/Widgets/models/Repository.md) | `from foundry_sdk.v2.widgets.models import Repository` | +**Widgets** | [RepositoryRid](docs/v2/Widgets/models/RepositoryRid.md) | `from foundry_sdk.v2.widgets.models import RepositoryRid` | +**Widgets** | [RepositoryVersion](docs/v2/Widgets/models/RepositoryVersion.md) | `from foundry_sdk.v2.widgets.models import RepositoryVersion` | +**Widgets** | [ScriptEntrypoint](docs/v2/Widgets/models/ScriptEntrypoint.md) | `from foundry_sdk.v2.widgets.models import ScriptEntrypoint` | +**Widgets** | [ScriptType](docs/v2/Widgets/models/ScriptType.md) | `from foundry_sdk.v2.widgets.models import ScriptType` | +**Widgets** | [SetWidgetSetDevModeSettingsByIdRequest](docs/v2/Widgets/models/SetWidgetSetDevModeSettingsByIdRequest.md) | `from foundry_sdk.v2.widgets.models import SetWidgetSetDevModeSettingsByIdRequest` | +**Widgets** | [SetWidgetSetDevModeSettingsRequest](docs/v2/Widgets/models/SetWidgetSetDevModeSettingsRequest.md) | `from foundry_sdk.v2.widgets.models import SetWidgetSetDevModeSettingsRequest` | +**Widgets** | [StylesheetEntrypoint](docs/v2/Widgets/models/StylesheetEntrypoint.md) | `from foundry_sdk.v2.widgets.models import StylesheetEntrypoint` | +**Widgets** | [WidgetDevModeSettings](docs/v2/Widgets/models/WidgetDevModeSettings.md) | `from foundry_sdk.v2.widgets.models import WidgetDevModeSettings` | +**Widgets** | [WidgetId](docs/v2/Widgets/models/WidgetId.md) | `from foundry_sdk.v2.widgets.models import WidgetId` | +**Widgets** | [WidgetRid](docs/v2/Widgets/models/WidgetRid.md) | `from foundry_sdk.v2.widgets.models import WidgetRid` | +**Widgets** | [WidgetSet](docs/v2/Widgets/models/WidgetSet.md) | `from foundry_sdk.v2.widgets.models import WidgetSet` | +**Widgets** | [WidgetSetDevModeSettings](docs/v2/Widgets/models/WidgetSetDevModeSettings.md) | `from foundry_sdk.v2.widgets.models import WidgetSetDevModeSettings` | +**Widgets** | [WidgetSetDevModeSettingsById](docs/v2/Widgets/models/WidgetSetDevModeSettingsById.md) | `from foundry_sdk.v2.widgets.models import WidgetSetDevModeSettingsById` | +**Widgets** | [WidgetSetRid](docs/v2/Widgets/models/WidgetSetRid.md) | `from foundry_sdk.v2.widgets.models import WidgetSetRid` | + + +## Documentation for V1 models + +Namespace | Name | Import | +--------- | ---- | ------ | +**Core** | [AnyType](docs/v1/Core/models/AnyType.md) | `from foundry_sdk.v1.core.models import AnyType` | +**Core** | [AttachmentType](docs/v1/Core/models/AttachmentType.md) | `from foundry_sdk.v1.core.models import AttachmentType` | +**Core** | [Attribution](docs/v1/Core/models/Attribution.md) | `from foundry_sdk.v1.core.models import Attribution` | +**Core** | [BinaryType](docs/v1/Core/models/BinaryType.md) | `from foundry_sdk.v1.core.models import BinaryType` | +**Core** | [BooleanType](docs/v1/Core/models/BooleanType.md) | `from foundry_sdk.v1.core.models import BooleanType` | +**Core** | [ByteType](docs/v1/Core/models/ByteType.md) | `from foundry_sdk.v1.core.models import ByteType` | +**Core** | [CipherTextType](docs/v1/Core/models/CipherTextType.md) | `from foundry_sdk.v1.core.models import CipherTextType` | +**Core** | [ContentLength](docs/v1/Core/models/ContentLength.md) | `from foundry_sdk.v1.core.models import ContentLength` | +**Core** | [ContentType](docs/v1/Core/models/ContentType.md) | `from foundry_sdk.v1.core.models import ContentType` | +**Core** | [DateType](docs/v1/Core/models/DateType.md) | `from foundry_sdk.v1.core.models import DateType` | +**Core** | [DecimalType](docs/v1/Core/models/DecimalType.md) | `from foundry_sdk.v1.core.models import DecimalType` | +**Core** | [DisplayName](docs/v1/Core/models/DisplayName.md) | `from foundry_sdk.v1.core.models import DisplayName` | +**Core** | [DistanceUnit](docs/v1/Core/models/DistanceUnit.md) | `from foundry_sdk.v1.core.models import DistanceUnit` | +**Core** | [DoubleType](docs/v1/Core/models/DoubleType.md) | `from foundry_sdk.v1.core.models import DoubleType` | +**Core** | [Filename](docs/v1/Core/models/Filename.md) | `from foundry_sdk.v1.core.models import Filename` | +**Core** | [FilePath](docs/v1/Core/models/FilePath.md) | `from foundry_sdk.v1.core.models import FilePath` | +**Core** | [FloatType](docs/v1/Core/models/FloatType.md) | `from foundry_sdk.v1.core.models import FloatType` | +**Core** | [FolderRid](docs/v1/Core/models/FolderRid.md) | `from foundry_sdk.v1.core.models import FolderRid` | +**Core** | [FoundryBranch](docs/v1/Core/models/FoundryBranch.md) | `from foundry_sdk.v1.core.models import FoundryBranch` | +**Core** | [IntegerType](docs/v1/Core/models/IntegerType.md) | `from foundry_sdk.v1.core.models import IntegerType` | +**Core** | [LongType](docs/v1/Core/models/LongType.md) | `from foundry_sdk.v1.core.models import LongType` | +**Core** | [MarkingType](docs/v1/Core/models/MarkingType.md) | `from foundry_sdk.v1.core.models import MarkingType` | +**Core** | [MediaType](docs/v1/Core/models/MediaType.md) | `from foundry_sdk.v1.core.models import MediaType` | +**Core** | [NullType](docs/v1/Core/models/NullType.md) | `from foundry_sdk.v1.core.models import NullType` | +**Core** | [OperationScope](docs/v1/Core/models/OperationScope.md) | `from foundry_sdk.v1.core.models import OperationScope` | +**Core** | [PageSize](docs/v1/Core/models/PageSize.md) | `from foundry_sdk.v1.core.models import PageSize` | +**Core** | [PageToken](docs/v1/Core/models/PageToken.md) | `from foundry_sdk.v1.core.models import PageToken` | +**Core** | [PreviewMode](docs/v1/Core/models/PreviewMode.md) | `from foundry_sdk.v1.core.models import PreviewMode` | +**Core** | [ReleaseStatus](docs/v1/Core/models/ReleaseStatus.md) | `from foundry_sdk.v1.core.models import ReleaseStatus` | +**Core** | [ShortType](docs/v1/Core/models/ShortType.md) | `from foundry_sdk.v1.core.models import ShortType` | +**Core** | [SizeBytes](docs/v1/Core/models/SizeBytes.md) | `from foundry_sdk.v1.core.models import SizeBytes` | +**Core** | [StringType](docs/v1/Core/models/StringType.md) | `from foundry_sdk.v1.core.models import StringType` | +**Core** | [StructFieldName](docs/v1/Core/models/StructFieldName.md) | `from foundry_sdk.v1.core.models import StructFieldName` | +**Core** | [TimestampType](docs/v1/Core/models/TimestampType.md) | `from foundry_sdk.v1.core.models import TimestampType` | +**Core** | [TotalCount](docs/v1/Core/models/TotalCount.md) | `from foundry_sdk.v1.core.models import TotalCount` | +**Core** | [TraceParent](docs/v1/Core/models/TraceParent.md) | `from foundry_sdk.v1.core.models import TraceParent` | +**Core** | [TraceState](docs/v1/Core/models/TraceState.md) | `from foundry_sdk.v1.core.models import TraceState` | +**Core** | [UnsupportedType](docs/v1/Core/models/UnsupportedType.md) | `from foundry_sdk.v1.core.models import UnsupportedType` | +**Datasets** | [Branch](docs/v1/Datasets/models/Branch.md) | `from foundry_sdk.v1.datasets.models import Branch` | +**Datasets** | [BranchId](docs/v1/Datasets/models/BranchId.md) | `from foundry_sdk.v1.datasets.models import BranchId` | +**Datasets** | [CreateBranchRequest](docs/v1/Datasets/models/CreateBranchRequest.md) | `from foundry_sdk.v1.datasets.models import CreateBranchRequest` | +**Datasets** | [CreateDatasetRequest](docs/v1/Datasets/models/CreateDatasetRequest.md) | `from foundry_sdk.v1.datasets.models import CreateDatasetRequest` | +**Datasets** | [CreateTransactionRequest](docs/v1/Datasets/models/CreateTransactionRequest.md) | `from foundry_sdk.v1.datasets.models import CreateTransactionRequest` | +**Datasets** | [Dataset](docs/v1/Datasets/models/Dataset.md) | `from foundry_sdk.v1.datasets.models import Dataset` | +**Datasets** | [DatasetName](docs/v1/Datasets/models/DatasetName.md) | `from foundry_sdk.v1.datasets.models import DatasetName` | +**Datasets** | [DatasetRid](docs/v1/Datasets/models/DatasetRid.md) | `from foundry_sdk.v1.datasets.models import DatasetRid` | +**Datasets** | [File](docs/v1/Datasets/models/File.md) | `from foundry_sdk.v1.datasets.models import File` | +**Datasets** | [ListBranchesResponse](docs/v1/Datasets/models/ListBranchesResponse.md) | `from foundry_sdk.v1.datasets.models import ListBranchesResponse` | +**Datasets** | [ListFilesResponse](docs/v1/Datasets/models/ListFilesResponse.md) | `from foundry_sdk.v1.datasets.models import ListFilesResponse` | +**Datasets** | [TableExportFormat](docs/v1/Datasets/models/TableExportFormat.md) | `from foundry_sdk.v1.datasets.models import TableExportFormat` | +**Datasets** | [Transaction](docs/v1/Datasets/models/Transaction.md) | `from foundry_sdk.v1.datasets.models import Transaction` | +**Datasets** | [TransactionRid](docs/v1/Datasets/models/TransactionRid.md) | `from foundry_sdk.v1.datasets.models import TransactionRid` | +**Datasets** | [TransactionStatus](docs/v1/Datasets/models/TransactionStatus.md) | `from foundry_sdk.v1.datasets.models import TransactionStatus` | +**Datasets** | [TransactionType](docs/v1/Datasets/models/TransactionType.md) | `from foundry_sdk.v1.datasets.models import TransactionType` | +**Ontologies** | [ActionRid](docs/v1/Ontologies/models/ActionRid.md) | `from foundry_sdk.v1.ontologies.models import ActionRid` | +**Ontologies** | [ActionType](docs/v1/Ontologies/models/ActionType.md) | `from foundry_sdk.v1.ontologies.models import ActionType` | +**Ontologies** | [ActionTypeApiName](docs/v1/Ontologies/models/ActionTypeApiName.md) | `from foundry_sdk.v1.ontologies.models import ActionTypeApiName` | +**Ontologies** | [ActionTypeRid](docs/v1/Ontologies/models/ActionTypeRid.md) | `from foundry_sdk.v1.ontologies.models import ActionTypeRid` | +**Ontologies** | [AggregateObjectsRequest](docs/v1/Ontologies/models/AggregateObjectsRequest.md) | `from foundry_sdk.v1.ontologies.models import AggregateObjectsRequest` | +**Ontologies** | [AggregateObjectsResponse](docs/v1/Ontologies/models/AggregateObjectsResponse.md) | `from foundry_sdk.v1.ontologies.models import AggregateObjectsResponse` | +**Ontologies** | [AggregateObjectsResponseItem](docs/v1/Ontologies/models/AggregateObjectsResponseItem.md) | `from foundry_sdk.v1.ontologies.models import AggregateObjectsResponseItem` | +**Ontologies** | [Aggregation](docs/v1/Ontologies/models/Aggregation.md) | `from foundry_sdk.v1.ontologies.models import Aggregation` | +**Ontologies** | [AggregationDurationGrouping](docs/v1/Ontologies/models/AggregationDurationGrouping.md) | `from foundry_sdk.v1.ontologies.models import AggregationDurationGrouping` | +**Ontologies** | [AggregationExactGrouping](docs/v1/Ontologies/models/AggregationExactGrouping.md) | `from foundry_sdk.v1.ontologies.models import AggregationExactGrouping` | +**Ontologies** | [AggregationFixedWidthGrouping](docs/v1/Ontologies/models/AggregationFixedWidthGrouping.md) | `from foundry_sdk.v1.ontologies.models import AggregationFixedWidthGrouping` | +**Ontologies** | [AggregationGroupBy](docs/v1/Ontologies/models/AggregationGroupBy.md) | `from foundry_sdk.v1.ontologies.models import AggregationGroupBy` | +**Ontologies** | [AggregationGroupKey](docs/v1/Ontologies/models/AggregationGroupKey.md) | `from foundry_sdk.v1.ontologies.models import AggregationGroupKey` | +**Ontologies** | [AggregationGroupValue](docs/v1/Ontologies/models/AggregationGroupValue.md) | `from foundry_sdk.v1.ontologies.models import AggregationGroupValue` | +**Ontologies** | [AggregationMetricName](docs/v1/Ontologies/models/AggregationMetricName.md) | `from foundry_sdk.v1.ontologies.models import AggregationMetricName` | +**Ontologies** | [AggregationMetricResult](docs/v1/Ontologies/models/AggregationMetricResult.md) | `from foundry_sdk.v1.ontologies.models import AggregationMetricResult` | +**Ontologies** | [AggregationRange](docs/v1/Ontologies/models/AggregationRange.md) | `from foundry_sdk.v1.ontologies.models import AggregationRange` | +**Ontologies** | [AggregationRangesGrouping](docs/v1/Ontologies/models/AggregationRangesGrouping.md) | `from foundry_sdk.v1.ontologies.models import AggregationRangesGrouping` | +**Ontologies** | [AllTermsQuery](docs/v1/Ontologies/models/AllTermsQuery.md) | `from foundry_sdk.v1.ontologies.models import AllTermsQuery` | +**Ontologies** | [AndQuery](docs/v1/Ontologies/models/AndQuery.md) | `from foundry_sdk.v1.ontologies.models import AndQuery` | +**Ontologies** | [AnyTermQuery](docs/v1/Ontologies/models/AnyTermQuery.md) | `from foundry_sdk.v1.ontologies.models import AnyTermQuery` | +**Ontologies** | [ApplyActionMode](docs/v1/Ontologies/models/ApplyActionMode.md) | `from foundry_sdk.v1.ontologies.models import ApplyActionMode` | +**Ontologies** | [ApplyActionRequest](docs/v1/Ontologies/models/ApplyActionRequest.md) | `from foundry_sdk.v1.ontologies.models import ApplyActionRequest` | +**Ontologies** | [ApplyActionRequestOptions](docs/v1/Ontologies/models/ApplyActionRequestOptions.md) | `from foundry_sdk.v1.ontologies.models import ApplyActionRequestOptions` | +**Ontologies** | [ApplyActionResponse](docs/v1/Ontologies/models/ApplyActionResponse.md) | `from foundry_sdk.v1.ontologies.models import ApplyActionResponse` | +**Ontologies** | [ApproximateDistinctAggregation](docs/v1/Ontologies/models/ApproximateDistinctAggregation.md) | `from foundry_sdk.v1.ontologies.models import ApproximateDistinctAggregation` | +**Ontologies** | [ArrayEntryEvaluatedConstraint](docs/v1/Ontologies/models/ArrayEntryEvaluatedConstraint.md) | `from foundry_sdk.v1.ontologies.models import ArrayEntryEvaluatedConstraint` | +**Ontologies** | [ArrayEvaluatedConstraint](docs/v1/Ontologies/models/ArrayEvaluatedConstraint.md) | `from foundry_sdk.v1.ontologies.models import ArrayEvaluatedConstraint` | +**Ontologies** | [ArraySizeConstraint](docs/v1/Ontologies/models/ArraySizeConstraint.md) | `from foundry_sdk.v1.ontologies.models import ArraySizeConstraint` | +**Ontologies** | [ArtifactRepositoryRid](docs/v1/Ontologies/models/ArtifactRepositoryRid.md) | `from foundry_sdk.v1.ontologies.models import ArtifactRepositoryRid` | +**Ontologies** | [Attachment](docs/v1/Ontologies/models/Attachment.md) | `from foundry_sdk.v1.ontologies.models import Attachment` | +**Ontologies** | [AttachmentRid](docs/v1/Ontologies/models/AttachmentRid.md) | `from foundry_sdk.v1.ontologies.models import AttachmentRid` | +**Ontologies** | [AvgAggregation](docs/v1/Ontologies/models/AvgAggregation.md) | `from foundry_sdk.v1.ontologies.models import AvgAggregation` | +**Ontologies** | [BatchApplyActionRequest](docs/v1/Ontologies/models/BatchApplyActionRequest.md) | `from foundry_sdk.v1.ontologies.models import BatchApplyActionRequest` | +**Ontologies** | [BatchApplyActionResponse](docs/v1/Ontologies/models/BatchApplyActionResponse.md) | `from foundry_sdk.v1.ontologies.models import BatchApplyActionResponse` | +**Ontologies** | [ContainsQuery](docs/v1/Ontologies/models/ContainsQuery.md) | `from foundry_sdk.v1.ontologies.models import ContainsQuery` | +**Ontologies** | [CountAggregation](docs/v1/Ontologies/models/CountAggregation.md) | `from foundry_sdk.v1.ontologies.models import CountAggregation` | +**Ontologies** | [CreateInterfaceObjectRule](docs/v1/Ontologies/models/CreateInterfaceObjectRule.md) | `from foundry_sdk.v1.ontologies.models import CreateInterfaceObjectRule` | +**Ontologies** | [CreateLinkRule](docs/v1/Ontologies/models/CreateLinkRule.md) | `from foundry_sdk.v1.ontologies.models import CreateLinkRule` | +**Ontologies** | [CreateObjectRule](docs/v1/Ontologies/models/CreateObjectRule.md) | `from foundry_sdk.v1.ontologies.models import CreateObjectRule` | +**Ontologies** | [DataValue](docs/v1/Ontologies/models/DataValue.md) | `from foundry_sdk.v1.ontologies.models import DataValue` | +**Ontologies** | [DeleteInterfaceObjectRule](docs/v1/Ontologies/models/DeleteInterfaceObjectRule.md) | `from foundry_sdk.v1.ontologies.models import DeleteInterfaceObjectRule` | +**Ontologies** | [DeleteLinkRule](docs/v1/Ontologies/models/DeleteLinkRule.md) | `from foundry_sdk.v1.ontologies.models import DeleteLinkRule` | +**Ontologies** | [DeleteObjectRule](docs/v1/Ontologies/models/DeleteObjectRule.md) | `from foundry_sdk.v1.ontologies.models import DeleteObjectRule` | +**Ontologies** | [DerivedPropertyApiName](docs/v1/Ontologies/models/DerivedPropertyApiName.md) | `from foundry_sdk.v1.ontologies.models import DerivedPropertyApiName` | +**Ontologies** | [Duration](docs/v1/Ontologies/models/Duration.md) | `from foundry_sdk.v1.ontologies.models import Duration` | +**Ontologies** | [EntrySetType](docs/v1/Ontologies/models/EntrySetType.md) | `from foundry_sdk.v1.ontologies.models import EntrySetType` | +**Ontologies** | [EqualsQuery](docs/v1/Ontologies/models/EqualsQuery.md) | `from foundry_sdk.v1.ontologies.models import EqualsQuery` | +**Ontologies** | [ExecuteQueryRequest](docs/v1/Ontologies/models/ExecuteQueryRequest.md) | `from foundry_sdk.v1.ontologies.models import ExecuteQueryRequest` | +**Ontologies** | [ExecuteQueryResponse](docs/v1/Ontologies/models/ExecuteQueryResponse.md) | `from foundry_sdk.v1.ontologies.models import ExecuteQueryResponse` | +**Ontologies** | [FieldNameV1](docs/v1/Ontologies/models/FieldNameV1.md) | `from foundry_sdk.v1.ontologies.models import FieldNameV1` | +**Ontologies** | [FilterValue](docs/v1/Ontologies/models/FilterValue.md) | `from foundry_sdk.v1.ontologies.models import FilterValue` | +**Ontologies** | [FunctionRid](docs/v1/Ontologies/models/FunctionRid.md) | `from foundry_sdk.v1.ontologies.models import FunctionRid` | +**Ontologies** | [FunctionVersion](docs/v1/Ontologies/models/FunctionVersion.md) | `from foundry_sdk.v1.ontologies.models import FunctionVersion` | +**Ontologies** | [Fuzzy](docs/v1/Ontologies/models/Fuzzy.md) | `from foundry_sdk.v1.ontologies.models import Fuzzy` | +**Ontologies** | [GroupMemberConstraint](docs/v1/Ontologies/models/GroupMemberConstraint.md) | `from foundry_sdk.v1.ontologies.models import GroupMemberConstraint` | +**Ontologies** | [GteQuery](docs/v1/Ontologies/models/GteQuery.md) | `from foundry_sdk.v1.ontologies.models import GteQuery` | +**Ontologies** | [GtQuery](docs/v1/Ontologies/models/GtQuery.md) | `from foundry_sdk.v1.ontologies.models import GtQuery` | +**Ontologies** | [InterfaceLinkTypeApiName](docs/v1/Ontologies/models/InterfaceLinkTypeApiName.md) | `from foundry_sdk.v1.ontologies.models import InterfaceLinkTypeApiName` | +**Ontologies** | [InterfaceLinkTypeRid](docs/v1/Ontologies/models/InterfaceLinkTypeRid.md) | `from foundry_sdk.v1.ontologies.models import InterfaceLinkTypeRid` | +**Ontologies** | [InterfacePropertyApiName](docs/v1/Ontologies/models/InterfacePropertyApiName.md) | `from foundry_sdk.v1.ontologies.models import InterfacePropertyApiName` | +**Ontologies** | [InterfaceTypeApiName](docs/v1/Ontologies/models/InterfaceTypeApiName.md) | `from foundry_sdk.v1.ontologies.models import InterfaceTypeApiName` | +**Ontologies** | [InterfaceTypeRid](docs/v1/Ontologies/models/InterfaceTypeRid.md) | `from foundry_sdk.v1.ontologies.models import InterfaceTypeRid` | +**Ontologies** | [IsNullQuery](docs/v1/Ontologies/models/IsNullQuery.md) | `from foundry_sdk.v1.ontologies.models import IsNullQuery` | +**Ontologies** | [LegacyObjectTypeId](docs/v1/Ontologies/models/LegacyObjectTypeId.md) | `from foundry_sdk.v1.ontologies.models import LegacyObjectTypeId` | +**Ontologies** | [LegacyPropertyId](docs/v1/Ontologies/models/LegacyPropertyId.md) | `from foundry_sdk.v1.ontologies.models import LegacyPropertyId` | +**Ontologies** | [LinkTypeApiName](docs/v1/Ontologies/models/LinkTypeApiName.md) | `from foundry_sdk.v1.ontologies.models import LinkTypeApiName` | +**Ontologies** | [LinkTypeId](docs/v1/Ontologies/models/LinkTypeId.md) | `from foundry_sdk.v1.ontologies.models import LinkTypeId` | +**Ontologies** | [LinkTypeSide](docs/v1/Ontologies/models/LinkTypeSide.md) | `from foundry_sdk.v1.ontologies.models import LinkTypeSide` | +**Ontologies** | [LinkTypeSideCardinality](docs/v1/Ontologies/models/LinkTypeSideCardinality.md) | `from foundry_sdk.v1.ontologies.models import LinkTypeSideCardinality` | +**Ontologies** | [ListActionTypesResponse](docs/v1/Ontologies/models/ListActionTypesResponse.md) | `from foundry_sdk.v1.ontologies.models import ListActionTypesResponse` | +**Ontologies** | [ListLinkedObjectsResponse](docs/v1/Ontologies/models/ListLinkedObjectsResponse.md) | `from foundry_sdk.v1.ontologies.models import ListLinkedObjectsResponse` | +**Ontologies** | [ListObjectsResponse](docs/v1/Ontologies/models/ListObjectsResponse.md) | `from foundry_sdk.v1.ontologies.models import ListObjectsResponse` | +**Ontologies** | [ListObjectTypesResponse](docs/v1/Ontologies/models/ListObjectTypesResponse.md) | `from foundry_sdk.v1.ontologies.models import ListObjectTypesResponse` | +**Ontologies** | [ListOntologiesResponse](docs/v1/Ontologies/models/ListOntologiesResponse.md) | `from foundry_sdk.v1.ontologies.models import ListOntologiesResponse` | +**Ontologies** | [ListOutgoingLinkTypesResponse](docs/v1/Ontologies/models/ListOutgoingLinkTypesResponse.md) | `from foundry_sdk.v1.ontologies.models import ListOutgoingLinkTypesResponse` | +**Ontologies** | [ListQueryTypesResponse](docs/v1/Ontologies/models/ListQueryTypesResponse.md) | `from foundry_sdk.v1.ontologies.models import ListQueryTypesResponse` | +**Ontologies** | [LogicRule](docs/v1/Ontologies/models/LogicRule.md) | `from foundry_sdk.v1.ontologies.models import LogicRule` | +**Ontologies** | [LteQuery](docs/v1/Ontologies/models/LteQuery.md) | `from foundry_sdk.v1.ontologies.models import LteQuery` | +**Ontologies** | [LtQuery](docs/v1/Ontologies/models/LtQuery.md) | `from foundry_sdk.v1.ontologies.models import LtQuery` | +**Ontologies** | [MaxAggregation](docs/v1/Ontologies/models/MaxAggregation.md) | `from foundry_sdk.v1.ontologies.models import MaxAggregation` | +**Ontologies** | [MinAggregation](docs/v1/Ontologies/models/MinAggregation.md) | `from foundry_sdk.v1.ontologies.models import MinAggregation` | +**Ontologies** | [ModifyInterfaceObjectRule](docs/v1/Ontologies/models/ModifyInterfaceObjectRule.md) | `from foundry_sdk.v1.ontologies.models import ModifyInterfaceObjectRule` | +**Ontologies** | [ModifyObjectRule](docs/v1/Ontologies/models/ModifyObjectRule.md) | `from foundry_sdk.v1.ontologies.models import ModifyObjectRule` | +**Ontologies** | [NotQuery](docs/v1/Ontologies/models/NotQuery.md) | `from foundry_sdk.v1.ontologies.models import NotQuery` | +**Ontologies** | [ObjectPropertyValueConstraint](docs/v1/Ontologies/models/ObjectPropertyValueConstraint.md) | `from foundry_sdk.v1.ontologies.models import ObjectPropertyValueConstraint` | +**Ontologies** | [ObjectQueryResultConstraint](docs/v1/Ontologies/models/ObjectQueryResultConstraint.md) | `from foundry_sdk.v1.ontologies.models import ObjectQueryResultConstraint` | +**Ontologies** | [ObjectRid](docs/v1/Ontologies/models/ObjectRid.md) | `from foundry_sdk.v1.ontologies.models import ObjectRid` | +**Ontologies** | [ObjectSetRid](docs/v1/Ontologies/models/ObjectSetRid.md) | `from foundry_sdk.v1.ontologies.models import ObjectSetRid` | +**Ontologies** | [ObjectType](docs/v1/Ontologies/models/ObjectType.md) | `from foundry_sdk.v1.ontologies.models import ObjectType` | +**Ontologies** | [ObjectTypeApiName](docs/v1/Ontologies/models/ObjectTypeApiName.md) | `from foundry_sdk.v1.ontologies.models import ObjectTypeApiName` | +**Ontologies** | [ObjectTypeRid](docs/v1/Ontologies/models/ObjectTypeRid.md) | `from foundry_sdk.v1.ontologies.models import ObjectTypeRid` | +**Ontologies** | [ObjectTypeVisibility](docs/v1/Ontologies/models/ObjectTypeVisibility.md) | `from foundry_sdk.v1.ontologies.models import ObjectTypeVisibility` | +**Ontologies** | [OneOfConstraint](docs/v1/Ontologies/models/OneOfConstraint.md) | `from foundry_sdk.v1.ontologies.models import OneOfConstraint` | +**Ontologies** | [Ontology](docs/v1/Ontologies/models/Ontology.md) | `from foundry_sdk.v1.ontologies.models import Ontology` | +**Ontologies** | [OntologyApiName](docs/v1/Ontologies/models/OntologyApiName.md) | `from foundry_sdk.v1.ontologies.models import OntologyApiName` | +**Ontologies** | [OntologyArrayType](docs/v1/Ontologies/models/OntologyArrayType.md) | `from foundry_sdk.v1.ontologies.models import OntologyArrayType` | +**Ontologies** | [OntologyDataType](docs/v1/Ontologies/models/OntologyDataType.md) | `from foundry_sdk.v1.ontologies.models import OntologyDataType` | +**Ontologies** | [OntologyInterfaceObjectSetType](docs/v1/Ontologies/models/OntologyInterfaceObjectSetType.md) | `from foundry_sdk.v1.ontologies.models import OntologyInterfaceObjectSetType` | +**Ontologies** | [OntologyInterfaceObjectType](docs/v1/Ontologies/models/OntologyInterfaceObjectType.md) | `from foundry_sdk.v1.ontologies.models import OntologyInterfaceObjectType` | +**Ontologies** | [OntologyMapType](docs/v1/Ontologies/models/OntologyMapType.md) | `from foundry_sdk.v1.ontologies.models import OntologyMapType` | +**Ontologies** | [OntologyObject](docs/v1/Ontologies/models/OntologyObject.md) | `from foundry_sdk.v1.ontologies.models import OntologyObject` | +**Ontologies** | [OntologyObjectSetType](docs/v1/Ontologies/models/OntologyObjectSetType.md) | `from foundry_sdk.v1.ontologies.models import OntologyObjectSetType` | +**Ontologies** | [OntologyObjectType](docs/v1/Ontologies/models/OntologyObjectType.md) | `from foundry_sdk.v1.ontologies.models import OntologyObjectType` | +**Ontologies** | [OntologyRid](docs/v1/Ontologies/models/OntologyRid.md) | `from foundry_sdk.v1.ontologies.models import OntologyRid` | +**Ontologies** | [OntologySetType](docs/v1/Ontologies/models/OntologySetType.md) | `from foundry_sdk.v1.ontologies.models import OntologySetType` | +**Ontologies** | [OntologyStructField](docs/v1/Ontologies/models/OntologyStructField.md) | `from foundry_sdk.v1.ontologies.models import OntologyStructField` | +**Ontologies** | [OntologyStructType](docs/v1/Ontologies/models/OntologyStructType.md) | `from foundry_sdk.v1.ontologies.models import OntologyStructType` | +**Ontologies** | [OrderBy](docs/v1/Ontologies/models/OrderBy.md) | `from foundry_sdk.v1.ontologies.models import OrderBy` | +**Ontologies** | [OrQuery](docs/v1/Ontologies/models/OrQuery.md) | `from foundry_sdk.v1.ontologies.models import OrQuery` | +**Ontologies** | [Parameter](docs/v1/Ontologies/models/Parameter.md) | `from foundry_sdk.v1.ontologies.models import Parameter` | +**Ontologies** | [ParameterEvaluatedConstraint](docs/v1/Ontologies/models/ParameterEvaluatedConstraint.md) | `from foundry_sdk.v1.ontologies.models import ParameterEvaluatedConstraint` | +**Ontologies** | [ParameterEvaluationResult](docs/v1/Ontologies/models/ParameterEvaluationResult.md) | `from foundry_sdk.v1.ontologies.models import ParameterEvaluationResult` | +**Ontologies** | [ParameterId](docs/v1/Ontologies/models/ParameterId.md) | `from foundry_sdk.v1.ontologies.models import ParameterId` | +**Ontologies** | [ParameterOption](docs/v1/Ontologies/models/ParameterOption.md) | `from foundry_sdk.v1.ontologies.models import ParameterOption` | +**Ontologies** | [PhraseQuery](docs/v1/Ontologies/models/PhraseQuery.md) | `from foundry_sdk.v1.ontologies.models import PhraseQuery` | +**Ontologies** | [PrefixQuery](docs/v1/Ontologies/models/PrefixQuery.md) | `from foundry_sdk.v1.ontologies.models import PrefixQuery` | +**Ontologies** | [PrimaryKeyValue](docs/v1/Ontologies/models/PrimaryKeyValue.md) | `from foundry_sdk.v1.ontologies.models import PrimaryKeyValue` | +**Ontologies** | [Property](docs/v1/Ontologies/models/Property.md) | `from foundry_sdk.v1.ontologies.models import Property` | +**Ontologies** | [PropertyApiName](docs/v1/Ontologies/models/PropertyApiName.md) | `from foundry_sdk.v1.ontologies.models import PropertyApiName` | +**Ontologies** | [PropertyFilter](docs/v1/Ontologies/models/PropertyFilter.md) | `from foundry_sdk.v1.ontologies.models import PropertyFilter` | +**Ontologies** | [PropertyId](docs/v1/Ontologies/models/PropertyId.md) | `from foundry_sdk.v1.ontologies.models import PropertyId` | +**Ontologies** | [PropertyTypeRid](docs/v1/Ontologies/models/PropertyTypeRid.md) | `from foundry_sdk.v1.ontologies.models import PropertyTypeRid` | +**Ontologies** | [PropertyValue](docs/v1/Ontologies/models/PropertyValue.md) | `from foundry_sdk.v1.ontologies.models import PropertyValue` | +**Ontologies** | [PropertyValueEscapedString](docs/v1/Ontologies/models/PropertyValueEscapedString.md) | `from foundry_sdk.v1.ontologies.models import PropertyValueEscapedString` | +**Ontologies** | [QueryAggregationKeyType](docs/v1/Ontologies/models/QueryAggregationKeyType.md) | `from foundry_sdk.v1.ontologies.models import QueryAggregationKeyType` | +**Ontologies** | [QueryAggregationRangeSubType](docs/v1/Ontologies/models/QueryAggregationRangeSubType.md) | `from foundry_sdk.v1.ontologies.models import QueryAggregationRangeSubType` | +**Ontologies** | [QueryAggregationRangeType](docs/v1/Ontologies/models/QueryAggregationRangeType.md) | `from foundry_sdk.v1.ontologies.models import QueryAggregationRangeType` | +**Ontologies** | [QueryAggregationValueType](docs/v1/Ontologies/models/QueryAggregationValueType.md) | `from foundry_sdk.v1.ontologies.models import QueryAggregationValueType` | +**Ontologies** | [QueryApiName](docs/v1/Ontologies/models/QueryApiName.md) | `from foundry_sdk.v1.ontologies.models import QueryApiName` | +**Ontologies** | [QueryArrayType](docs/v1/Ontologies/models/QueryArrayType.md) | `from foundry_sdk.v1.ontologies.models import QueryArrayType` | +**Ontologies** | [QueryDataType](docs/v1/Ontologies/models/QueryDataType.md) | `from foundry_sdk.v1.ontologies.models import QueryDataType` | +**Ontologies** | [QueryRuntimeErrorParameter](docs/v1/Ontologies/models/QueryRuntimeErrorParameter.md) | `from foundry_sdk.v1.ontologies.models import QueryRuntimeErrorParameter` | +**Ontologies** | [QuerySetType](docs/v1/Ontologies/models/QuerySetType.md) | `from foundry_sdk.v1.ontologies.models import QuerySetType` | +**Ontologies** | [QueryStructField](docs/v1/Ontologies/models/QueryStructField.md) | `from foundry_sdk.v1.ontologies.models import QueryStructField` | +**Ontologies** | [QueryStructType](docs/v1/Ontologies/models/QueryStructType.md) | `from foundry_sdk.v1.ontologies.models import QueryStructType` | +**Ontologies** | [QueryType](docs/v1/Ontologies/models/QueryType.md) | `from foundry_sdk.v1.ontologies.models import QueryType` | +**Ontologies** | [QueryUnionType](docs/v1/Ontologies/models/QueryUnionType.md) | `from foundry_sdk.v1.ontologies.models import QueryUnionType` | +**Ontologies** | [RangeConstraint](docs/v1/Ontologies/models/RangeConstraint.md) | `from foundry_sdk.v1.ontologies.models import RangeConstraint` | +**Ontologies** | [ReturnEditsMode](docs/v1/Ontologies/models/ReturnEditsMode.md) | `from foundry_sdk.v1.ontologies.models import ReturnEditsMode` | +**Ontologies** | [SdkPackageName](docs/v1/Ontologies/models/SdkPackageName.md) | `from foundry_sdk.v1.ontologies.models import SdkPackageName` | +**Ontologies** | [SdkPackageRid](docs/v1/Ontologies/models/SdkPackageRid.md) | `from foundry_sdk.v1.ontologies.models import SdkPackageRid` | +**Ontologies** | [SdkVersion](docs/v1/Ontologies/models/SdkVersion.md) | `from foundry_sdk.v1.ontologies.models import SdkVersion` | +**Ontologies** | [SearchJsonQuery](docs/v1/Ontologies/models/SearchJsonQuery.md) | `from foundry_sdk.v1.ontologies.models import SearchJsonQuery` | +**Ontologies** | [SearchObjectsRequest](docs/v1/Ontologies/models/SearchObjectsRequest.md) | `from foundry_sdk.v1.ontologies.models import SearchObjectsRequest` | +**Ontologies** | [SearchObjectsResponse](docs/v1/Ontologies/models/SearchObjectsResponse.md) | `from foundry_sdk.v1.ontologies.models import SearchObjectsResponse` | +**Ontologies** | [SearchOrderBy](docs/v1/Ontologies/models/SearchOrderBy.md) | `from foundry_sdk.v1.ontologies.models import SearchOrderBy` | +**Ontologies** | [SearchOrderByType](docs/v1/Ontologies/models/SearchOrderByType.md) | `from foundry_sdk.v1.ontologies.models import SearchOrderByType` | +**Ontologies** | [SearchOrdering](docs/v1/Ontologies/models/SearchOrdering.md) | `from foundry_sdk.v1.ontologies.models import SearchOrdering` | +**Ontologies** | [SelectedPropertyApiName](docs/v1/Ontologies/models/SelectedPropertyApiName.md) | `from foundry_sdk.v1.ontologies.models import SelectedPropertyApiName` | +**Ontologies** | [SharedPropertyTypeApiName](docs/v1/Ontologies/models/SharedPropertyTypeApiName.md) | `from foundry_sdk.v1.ontologies.models import SharedPropertyTypeApiName` | +**Ontologies** | [SharedPropertyTypeRid](docs/v1/Ontologies/models/SharedPropertyTypeRid.md) | `from foundry_sdk.v1.ontologies.models import SharedPropertyTypeRid` | +**Ontologies** | [StringLengthConstraint](docs/v1/Ontologies/models/StringLengthConstraint.md) | `from foundry_sdk.v1.ontologies.models import StringLengthConstraint` | +**Ontologies** | [StringRegexMatchConstraint](docs/v1/Ontologies/models/StringRegexMatchConstraint.md) | `from foundry_sdk.v1.ontologies.models import StringRegexMatchConstraint` | +**Ontologies** | [StructEvaluatedConstraint](docs/v1/Ontologies/models/StructEvaluatedConstraint.md) | `from foundry_sdk.v1.ontologies.models import StructEvaluatedConstraint` | +**Ontologies** | [StructFieldEvaluatedConstraint](docs/v1/Ontologies/models/StructFieldEvaluatedConstraint.md) | `from foundry_sdk.v1.ontologies.models import StructFieldEvaluatedConstraint` | +**Ontologies** | [StructFieldEvaluationResult](docs/v1/Ontologies/models/StructFieldEvaluationResult.md) | `from foundry_sdk.v1.ontologies.models import StructFieldEvaluationResult` | +**Ontologies** | [StructParameterFieldApiName](docs/v1/Ontologies/models/StructParameterFieldApiName.md) | `from foundry_sdk.v1.ontologies.models import StructParameterFieldApiName` | +**Ontologies** | [SubmissionCriteriaEvaluation](docs/v1/Ontologies/models/SubmissionCriteriaEvaluation.md) | `from foundry_sdk.v1.ontologies.models import SubmissionCriteriaEvaluation` | +**Ontologies** | [SumAggregation](docs/v1/Ontologies/models/SumAggregation.md) | `from foundry_sdk.v1.ontologies.models import SumAggregation` | +**Ontologies** | [ThreeDimensionalAggregation](docs/v1/Ontologies/models/ThreeDimensionalAggregation.md) | `from foundry_sdk.v1.ontologies.models import ThreeDimensionalAggregation` | +**Ontologies** | [TwoDimensionalAggregation](docs/v1/Ontologies/models/TwoDimensionalAggregation.md) | `from foundry_sdk.v1.ontologies.models import TwoDimensionalAggregation` | +**Ontologies** | [UnevaluableConstraint](docs/v1/Ontologies/models/UnevaluableConstraint.md) | `from foundry_sdk.v1.ontologies.models import UnevaluableConstraint` | +**Ontologies** | [UniqueIdentifierLinkId](docs/v1/Ontologies/models/UniqueIdentifierLinkId.md) | `from foundry_sdk.v1.ontologies.models import UniqueIdentifierLinkId` | +**Ontologies** | [ValidateActionRequest](docs/v1/Ontologies/models/ValidateActionRequest.md) | `from foundry_sdk.v1.ontologies.models import ValidateActionRequest` | +**Ontologies** | [ValidateActionResponse](docs/v1/Ontologies/models/ValidateActionResponse.md) | `from foundry_sdk.v1.ontologies.models import ValidateActionResponse` | +**Ontologies** | [ValidationResult](docs/v1/Ontologies/models/ValidationResult.md) | `from foundry_sdk.v1.ontologies.models import ValidationResult` | +**Ontologies** | [ValueType](docs/v1/Ontologies/models/ValueType.md) | `from foundry_sdk.v1.ontologies.models import ValueType` | +**Ontologies** | [ValueTypeApiName](docs/v1/Ontologies/models/ValueTypeApiName.md) | `from foundry_sdk.v1.ontologies.models import ValueTypeApiName` | +**Ontologies** | [ValueTypeRid](docs/v1/Ontologies/models/ValueTypeRid.md) | `from foundry_sdk.v1.ontologies.models import ValueTypeRid` | + + + +## Documentation for errors + +## Documentation for V2 errors + +Namespace | Name | Import | +--------- | ---- | ------ | +**Admin** | AddEnrollmentRoleAssignmentsPermissionDenied | `from foundry_sdk.v2.admin.errors import AddEnrollmentRoleAssignmentsPermissionDenied` | +**Admin** | AddGroupMembersPermissionDenied | `from foundry_sdk.v2.admin.errors import AddGroupMembersPermissionDenied` | +**Admin** | AddMarkingMembersPermissionDenied | `from foundry_sdk.v2.admin.errors import AddMarkingMembersPermissionDenied` | +**Admin** | AddMarkingRoleAssignmentsPermissionDenied | `from foundry_sdk.v2.admin.errors import AddMarkingRoleAssignmentsPermissionDenied` | +**Admin** | AddOrganizationRoleAssignmentsPermissionDenied | `from foundry_sdk.v2.admin.errors import AddOrganizationRoleAssignmentsPermissionDenied` | +**Admin** | AuthenticationProviderNotFound | `from foundry_sdk.v2.admin.errors import AuthenticationProviderNotFound` | +**Admin** | CannotReplaceProviderInfoForPrincipalInProtectedRealm | `from foundry_sdk.v2.admin.errors import CannotReplaceProviderInfoForPrincipalInProtectedRealm` | +**Admin** | CreateGroupPermissionDenied | `from foundry_sdk.v2.admin.errors import CreateGroupPermissionDenied` | +**Admin** | CreateMarkingMissingInitialAdminRole | `from foundry_sdk.v2.admin.errors import CreateMarkingMissingInitialAdminRole` | +**Admin** | CreateMarkingPermissionDenied | `from foundry_sdk.v2.admin.errors import CreateMarkingPermissionDenied` | +**Admin** | CreateOrganizationMissingInitialAdminRole | `from foundry_sdk.v2.admin.errors import CreateOrganizationMissingInitialAdminRole` | +**Admin** | CreateOrganizationPermissionDenied | `from foundry_sdk.v2.admin.errors import CreateOrganizationPermissionDenied` | +**Admin** | DeleteGroupPermissionDenied | `from foundry_sdk.v2.admin.errors import DeleteGroupPermissionDenied` | +**Admin** | DeleteUserPermissionDenied | `from foundry_sdk.v2.admin.errors import DeleteUserPermissionDenied` | +**Admin** | EnrollmentNotFound | `from foundry_sdk.v2.admin.errors import EnrollmentNotFound` | +**Admin** | EnrollmentRoleNotFound | `from foundry_sdk.v2.admin.errors import EnrollmentRoleNotFound` | +**Admin** | GetCurrentEnrollmentPermissionDenied | `from foundry_sdk.v2.admin.errors import GetCurrentEnrollmentPermissionDenied` | +**Admin** | GetCurrentUserPermissionDenied | `from foundry_sdk.v2.admin.errors import GetCurrentUserPermissionDenied` | +**Admin** | GetGroupProviderInfoPermissionDenied | `from foundry_sdk.v2.admin.errors import GetGroupProviderInfoPermissionDenied` | +**Admin** | GetMarkingCategoryPermissionDenied | `from foundry_sdk.v2.admin.errors import GetMarkingCategoryPermissionDenied` | +**Admin** | GetMarkingPermissionDenied | `from foundry_sdk.v2.admin.errors import GetMarkingPermissionDenied` | +**Admin** | GetMarkingsUserPermissionDenied | `from foundry_sdk.v2.admin.errors import GetMarkingsUserPermissionDenied` | +**Admin** | GetProfilePictureOfUserPermissionDenied | `from foundry_sdk.v2.admin.errors import GetProfilePictureOfUserPermissionDenied` | +**Admin** | GetUserProviderInfoPermissionDenied | `from foundry_sdk.v2.admin.errors import GetUserProviderInfoPermissionDenied` | +**Admin** | GroupMembershipExpirationPolicyNotFound | `from foundry_sdk.v2.admin.errors import GroupMembershipExpirationPolicyNotFound` | +**Admin** | GroupNameAlreadyExists | `from foundry_sdk.v2.admin.errors import GroupNameAlreadyExists` | +**Admin** | GroupNotFound | `from foundry_sdk.v2.admin.errors import GroupNotFound` | +**Admin** | GroupProviderInfoNotFound | `from foundry_sdk.v2.admin.errors import GroupProviderInfoNotFound` | +**Admin** | InvalidGroupMembershipExpiration | `from foundry_sdk.v2.admin.errors import InvalidGroupMembershipExpiration` | +**Admin** | InvalidGroupOrganizations | `from foundry_sdk.v2.admin.errors import InvalidGroupOrganizations` | +**Admin** | InvalidHostName | `from foundry_sdk.v2.admin.errors import InvalidHostName` | +**Admin** | InvalidProfilePicture | `from foundry_sdk.v2.admin.errors import InvalidProfilePicture` | +**Admin** | ListAvailableRolesOrganizationPermissionDenied | `from foundry_sdk.v2.admin.errors import ListAvailableRolesOrganizationPermissionDenied` | +**Admin** | ListEnrollmentRoleAssignmentsPermissionDenied | `from foundry_sdk.v2.admin.errors import ListEnrollmentRoleAssignmentsPermissionDenied` | +**Admin** | ListHostsPermissionDenied | `from foundry_sdk.v2.admin.errors import ListHostsPermissionDenied` | +**Admin** | ListMarkingMembersPermissionDenied | `from foundry_sdk.v2.admin.errors import ListMarkingMembersPermissionDenied` | +**Admin** | ListMarkingRoleAssignmentsPermissionDenied | `from foundry_sdk.v2.admin.errors import ListMarkingRoleAssignmentsPermissionDenied` | +**Admin** | ListOrganizationRoleAssignmentsPermissionDenied | `from foundry_sdk.v2.admin.errors import ListOrganizationRoleAssignmentsPermissionDenied` | +**Admin** | MarkingCategoryNotFound | `from foundry_sdk.v2.admin.errors import MarkingCategoryNotFound` | +**Admin** | MarkingNameInCategoryAlreadyExists | `from foundry_sdk.v2.admin.errors import MarkingNameInCategoryAlreadyExists` | +**Admin** | MarkingNameIsEmpty | `from foundry_sdk.v2.admin.errors import MarkingNameIsEmpty` | +**Admin** | MarkingNotFound | `from foundry_sdk.v2.admin.errors import MarkingNotFound` | +**Admin** | OrganizationNameAlreadyExists | `from foundry_sdk.v2.admin.errors import OrganizationNameAlreadyExists` | +**Admin** | OrganizationNotFound | `from foundry_sdk.v2.admin.errors import OrganizationNotFound` | +**Admin** | PreregisterGroupPermissionDenied | `from foundry_sdk.v2.admin.errors import PreregisterGroupPermissionDenied` | +**Admin** | PreregisterUserPermissionDenied | `from foundry_sdk.v2.admin.errors import PreregisterUserPermissionDenied` | +**Admin** | PrincipalNotFound | `from foundry_sdk.v2.admin.errors import PrincipalNotFound` | +**Admin** | ProfilePictureNotFound | `from foundry_sdk.v2.admin.errors import ProfilePictureNotFound` | +**Admin** | ProfileServiceNotPresent | `from foundry_sdk.v2.admin.errors import ProfileServiceNotPresent` | +**Admin** | RemoveEnrollmentRoleAssignmentsPermissionDenied | `from foundry_sdk.v2.admin.errors import RemoveEnrollmentRoleAssignmentsPermissionDenied` | +**Admin** | RemoveGroupMembersPermissionDenied | `from foundry_sdk.v2.admin.errors import RemoveGroupMembersPermissionDenied` | +**Admin** | RemoveMarkingMembersPermissionDenied | `from foundry_sdk.v2.admin.errors import RemoveMarkingMembersPermissionDenied` | +**Admin** | RemoveMarkingRoleAssignmentsPermissionDenied | `from foundry_sdk.v2.admin.errors import RemoveMarkingRoleAssignmentsPermissionDenied` | +**Admin** | RemoveMarkingRoleAssignmentsRemoveAllAdministratorsNotAllowed | `from foundry_sdk.v2.admin.errors import RemoveMarkingRoleAssignmentsRemoveAllAdministratorsNotAllowed` | +**Admin** | RemoveOrganizationRoleAssignmentsPermissionDenied | `from foundry_sdk.v2.admin.errors import RemoveOrganizationRoleAssignmentsPermissionDenied` | +**Admin** | ReplaceGroupMembershipExpirationPolicyPermissionDenied | `from foundry_sdk.v2.admin.errors import ReplaceGroupMembershipExpirationPolicyPermissionDenied` | +**Admin** | ReplaceGroupProviderInfoPermissionDenied | `from foundry_sdk.v2.admin.errors import ReplaceGroupProviderInfoPermissionDenied` | +**Admin** | ReplaceMarkingPermissionDenied | `from foundry_sdk.v2.admin.errors import ReplaceMarkingPermissionDenied` | +**Admin** | ReplaceOrganizationPermissionDenied | `from foundry_sdk.v2.admin.errors import ReplaceOrganizationPermissionDenied` | +**Admin** | ReplaceUserProviderInfoPermissionDenied | `from foundry_sdk.v2.admin.errors import ReplaceUserProviderInfoPermissionDenied` | +**Admin** | RevokeAllTokensUserPermissionDenied | `from foundry_sdk.v2.admin.errors import RevokeAllTokensUserPermissionDenied` | +**Admin** | RoleNotFound | `from foundry_sdk.v2.admin.errors import RoleNotFound` | +**Admin** | SearchGroupsPermissionDenied | `from foundry_sdk.v2.admin.errors import SearchGroupsPermissionDenied` | +**Admin** | SearchUsersPermissionDenied | `from foundry_sdk.v2.admin.errors import SearchUsersPermissionDenied` | +**Admin** | UserDeleted | `from foundry_sdk.v2.admin.errors import UserDeleted` | +**Admin** | UserIsActive | `from foundry_sdk.v2.admin.errors import UserIsActive` | +**Admin** | UserNotFound | `from foundry_sdk.v2.admin.errors import UserNotFound` | +**Admin** | UserProviderInfoNotFound | `from foundry_sdk.v2.admin.errors import UserProviderInfoNotFound` | +**AipAgents** | AgentIterationsExceededLimit | `from foundry_sdk.v2.aip_agents.errors import AgentIterationsExceededLimit` | +**AipAgents** | AgentNotFound | `from foundry_sdk.v2.aip_agents.errors import AgentNotFound` | +**AipAgents** | AgentVersionNotFound | `from foundry_sdk.v2.aip_agents.errors import AgentVersionNotFound` | +**AipAgents** | BlockingContinueSessionPermissionDenied | `from foundry_sdk.v2.aip_agents.errors import BlockingContinueSessionPermissionDenied` | +**AipAgents** | CancelSessionFailedMessageNotInProgress | `from foundry_sdk.v2.aip_agents.errors import CancelSessionFailedMessageNotInProgress` | +**AipAgents** | CancelSessionPermissionDenied | `from foundry_sdk.v2.aip_agents.errors import CancelSessionPermissionDenied` | +**AipAgents** | ContentNotFound | `from foundry_sdk.v2.aip_agents.errors import ContentNotFound` | +**AipAgents** | ContextSizeExceededLimit | `from foundry_sdk.v2.aip_agents.errors import ContextSizeExceededLimit` | +**AipAgents** | CreateSessionPermissionDenied | `from foundry_sdk.v2.aip_agents.errors import CreateSessionPermissionDenied` | +**AipAgents** | DeleteSessionPermissionDenied | `from foundry_sdk.v2.aip_agents.errors import DeleteSessionPermissionDenied` | +**AipAgents** | FunctionLocatorNotFound | `from foundry_sdk.v2.aip_agents.errors import FunctionLocatorNotFound` | +**AipAgents** | GetAllSessionsAgentsPermissionDenied | `from foundry_sdk.v2.aip_agents.errors import GetAllSessionsAgentsPermissionDenied` | +**AipAgents** | GetRagContextForSessionPermissionDenied | `from foundry_sdk.v2.aip_agents.errors import GetRagContextForSessionPermissionDenied` | +**AipAgents** | InvalidAgentVersion | `from foundry_sdk.v2.aip_agents.errors import InvalidAgentVersion` | +**AipAgents** | InvalidParameter | `from foundry_sdk.v2.aip_agents.errors import InvalidParameter` | +**AipAgents** | InvalidParameterType | `from foundry_sdk.v2.aip_agents.errors import InvalidParameterType` | +**AipAgents** | ListSessionsForAgentsPermissionDenied | `from foundry_sdk.v2.aip_agents.errors import ListSessionsForAgentsPermissionDenied` | +**AipAgents** | NoPublishedAgentVersion | `from foundry_sdk.v2.aip_agents.errors import NoPublishedAgentVersion` | +**AipAgents** | ObjectTypeIdsNotFound | `from foundry_sdk.v2.aip_agents.errors import ObjectTypeIdsNotFound` | +**AipAgents** | ObjectTypeRidsNotFound | `from foundry_sdk.v2.aip_agents.errors import ObjectTypeRidsNotFound` | +**AipAgents** | OntologyEntitiesNotFound | `from foundry_sdk.v2.aip_agents.errors import OntologyEntitiesNotFound` | +**AipAgents** | RateLimitExceeded | `from foundry_sdk.v2.aip_agents.errors import RateLimitExceeded` | +**AipAgents** | RetryAttemptsExceeded | `from foundry_sdk.v2.aip_agents.errors import RetryAttemptsExceeded` | +**AipAgents** | RetryDeadlineExceeded | `from foundry_sdk.v2.aip_agents.errors import RetryDeadlineExceeded` | +**AipAgents** | SessionExecutionFailed | `from foundry_sdk.v2.aip_agents.errors import SessionExecutionFailed` | +**AipAgents** | SessionNotFound | `from foundry_sdk.v2.aip_agents.errors import SessionNotFound` | +**AipAgents** | SessionTraceIdAlreadyExists | `from foundry_sdk.v2.aip_agents.errors import SessionTraceIdAlreadyExists` | +**AipAgents** | SessionTraceNotFound | `from foundry_sdk.v2.aip_agents.errors import SessionTraceNotFound` | +**AipAgents** | StreamingContinueSessionPermissionDenied | `from foundry_sdk.v2.aip_agents.errors import StreamingContinueSessionPermissionDenied` | +**AipAgents** | UpdateSessionTitlePermissionDenied | `from foundry_sdk.v2.aip_agents.errors import UpdateSessionTitlePermissionDenied` | +**Audit** | GetLogFileContentPermissionDenied | `from foundry_sdk.v2.audit.errors import GetLogFileContentPermissionDenied` | +**Audit** | ListLogFilesPermissionDenied | `from foundry_sdk.v2.audit.errors import ListLogFilesPermissionDenied` | +**Audit** | MissingStartDate | `from foundry_sdk.v2.audit.errors import MissingStartDate` | +**Connectivity** | AdditionalSecretsMustBeSpecifiedAsPlaintextValueMap | `from foundry_sdk.v2.connectivity.errors import AdditionalSecretsMustBeSpecifiedAsPlaintextValueMap` | +**Connectivity** | ConnectionDetailsNotDetermined | `from foundry_sdk.v2.connectivity.errors import ConnectionDetailsNotDetermined` | +**Connectivity** | ConnectionNotFound | `from foundry_sdk.v2.connectivity.errors import ConnectionNotFound` | +**Connectivity** | ConnectionTypeNotSupported | `from foundry_sdk.v2.connectivity.errors import ConnectionTypeNotSupported` | +**Connectivity** | CreateConnectionPermissionDenied | `from foundry_sdk.v2.connectivity.errors import CreateConnectionPermissionDenied` | +**Connectivity** | CreateFileImportPermissionDenied | `from foundry_sdk.v2.connectivity.errors import CreateFileImportPermissionDenied` | +**Connectivity** | CreateTableImportPermissionDenied | `from foundry_sdk.v2.connectivity.errors import CreateTableImportPermissionDenied` | +**Connectivity** | CreateVirtualTablePermissionDenied | `from foundry_sdk.v2.connectivity.errors import CreateVirtualTablePermissionDenied` | +**Connectivity** | DeleteFileImportPermissionDenied | `from foundry_sdk.v2.connectivity.errors import DeleteFileImportPermissionDenied` | +**Connectivity** | DeleteTableImportPermissionDenied | `from foundry_sdk.v2.connectivity.errors import DeleteTableImportPermissionDenied` | +**Connectivity** | DomainMustUseHttpsWithAuthentication | `from foundry_sdk.v2.connectivity.errors import DomainMustUseHttpsWithAuthentication` | +**Connectivity** | DriverContentMustBeUploadedAsJar | `from foundry_sdk.v2.connectivity.errors import DriverContentMustBeUploadedAsJar` | +**Connectivity** | DriverJarAlreadyExists | `from foundry_sdk.v2.connectivity.errors import DriverJarAlreadyExists` | +**Connectivity** | EncryptedPropertyMustBeSpecifiedAsPlaintextValue | `from foundry_sdk.v2.connectivity.errors import EncryptedPropertyMustBeSpecifiedAsPlaintextValue` | +**Connectivity** | ExecuteFileImportPermissionDenied | `from foundry_sdk.v2.connectivity.errors import ExecuteFileImportPermissionDenied` | +**Connectivity** | ExecuteTableImportPermissionDenied | `from foundry_sdk.v2.connectivity.errors import ExecuteTableImportPermissionDenied` | +**Connectivity** | FileAtLeastCountFilterInvalidMinCount | `from foundry_sdk.v2.connectivity.errors import FileAtLeastCountFilterInvalidMinCount` | +**Connectivity** | FileImportCustomFilterCannotBeUsedToCreateOrUpdateFileImports | `from foundry_sdk.v2.connectivity.errors import FileImportCustomFilterCannotBeUsedToCreateOrUpdateFileImports` | +**Connectivity** | FileImportNotFound | `from foundry_sdk.v2.connectivity.errors import FileImportNotFound` | +**Connectivity** | FileImportNotSupportedForConnection | `from foundry_sdk.v2.connectivity.errors import FileImportNotSupportedForConnection` | +**Connectivity** | FilesCountLimitFilterInvalidLimit | `from foundry_sdk.v2.connectivity.errors import FilesCountLimitFilterInvalidLimit` | +**Connectivity** | FileSizeFilterGreaterThanCannotBeNegative | `from foundry_sdk.v2.connectivity.errors import FileSizeFilterGreaterThanCannotBeNegative` | +**Connectivity** | FileSizeFilterInvalidGreaterThanAndLessThanRange | `from foundry_sdk.v2.connectivity.errors import FileSizeFilterInvalidGreaterThanAndLessThanRange` | +**Connectivity** | FileSizeFilterLessThanMustBeOneByteOrLarger | `from foundry_sdk.v2.connectivity.errors import FileSizeFilterLessThanMustBeOneByteOrLarger` | +**Connectivity** | FileSizeFilterMissingGreaterThanAndLessThan | `from foundry_sdk.v2.connectivity.errors import FileSizeFilterMissingGreaterThanAndLessThan` | +**Connectivity** | GetConfigurationPermissionDenied | `from foundry_sdk.v2.connectivity.errors import GetConfigurationPermissionDenied` | +**Connectivity** | HostNameCannotHaveProtocolOrPort | `from foundry_sdk.v2.connectivity.errors import HostNameCannotHaveProtocolOrPort` | +**Connectivity** | InvalidShareName | `from foundry_sdk.v2.connectivity.errors import InvalidShareName` | +**Connectivity** | InvalidVirtualTableConnection | `from foundry_sdk.v2.connectivity.errors import InvalidVirtualTableConnection` | +**Connectivity** | ParentFolderNotFoundForConnection | `from foundry_sdk.v2.connectivity.errors import ParentFolderNotFoundForConnection` | +**Connectivity** | PortNotInRange | `from foundry_sdk.v2.connectivity.errors import PortNotInRange` | +**Connectivity** | PropertyCannotBeBlank | `from foundry_sdk.v2.connectivity.errors import PropertyCannotBeBlank` | +**Connectivity** | PropertyCannotBeEmpty | `from foundry_sdk.v2.connectivity.errors import PropertyCannotBeEmpty` | +**Connectivity** | ReplaceFileImportPermissionDenied | `from foundry_sdk.v2.connectivity.errors import ReplaceFileImportPermissionDenied` | +**Connectivity** | ReplaceTableImportPermissionDenied | `from foundry_sdk.v2.connectivity.errors import ReplaceTableImportPermissionDenied` | +**Connectivity** | SecretNamesDoNotExist | `from foundry_sdk.v2.connectivity.errors import SecretNamesDoNotExist` | +**Connectivity** | TableImportNotFound | `from foundry_sdk.v2.connectivity.errors import TableImportNotFound` | +**Connectivity** | TableImportNotSupportedForConnection | `from foundry_sdk.v2.connectivity.errors import TableImportNotSupportedForConnection` | +**Connectivity** | TableImportTypeNotSupported | `from foundry_sdk.v2.connectivity.errors import TableImportTypeNotSupported` | +**Connectivity** | UnknownWorkerCannotBeUsedForCreatingOrUpdatingConnections | `from foundry_sdk.v2.connectivity.errors import UnknownWorkerCannotBeUsedForCreatingOrUpdatingConnections` | +**Connectivity** | UpdateExportSettingsForConnectionPermissionDenied | `from foundry_sdk.v2.connectivity.errors import UpdateExportSettingsForConnectionPermissionDenied` | +**Connectivity** | UpdateSecretsForConnectionPermissionDenied | `from foundry_sdk.v2.connectivity.errors import UpdateSecretsForConnectionPermissionDenied` | +**Connectivity** | UploadCustomJdbcDriverNotSupportForConnection | `from foundry_sdk.v2.connectivity.errors import UploadCustomJdbcDriverNotSupportForConnection` | +**Connectivity** | UploadCustomJdbcDriversConnectionPermissionDenied | `from foundry_sdk.v2.connectivity.errors import UploadCustomJdbcDriversConnectionPermissionDenied` | +**Connectivity** | VirtualTableAlreadyExists | `from foundry_sdk.v2.connectivity.errors import VirtualTableAlreadyExists` | +**Connectivity** | VirtualTableRegisterFromSourcePermissionDenied | `from foundry_sdk.v2.connectivity.errors import VirtualTableRegisterFromSourcePermissionDenied` | +**Core** | ApiFeaturePreviewUsageOnly | `from foundry_sdk.v2.core.errors import ApiFeaturePreviewUsageOnly` | +**Core** | ApiUsageDenied | `from foundry_sdk.v2.core.errors import ApiUsageDenied` | +**Core** | BatchRequestSizeExceededLimit | `from foundry_sdk.v2.core.errors import BatchRequestSizeExceededLimit` | +**Core** | FolderNotFound | `from foundry_sdk.v2.core.errors import FolderNotFound` | +**Core** | FoundryBranchNotFound | `from foundry_sdk.v2.core.errors import FoundryBranchNotFound` | +**Core** | InvalidAndFilter | `from foundry_sdk.v2.core.errors import InvalidAndFilter` | +**Core** | InvalidAttributionHeader | `from foundry_sdk.v2.core.errors import InvalidAttributionHeader` | +**Core** | InvalidChangeDataCaptureConfiguration | `from foundry_sdk.v2.core.errors import InvalidChangeDataCaptureConfiguration` | +**Core** | InvalidFieldSchema | `from foundry_sdk.v2.core.errors import InvalidFieldSchema` | +**Core** | InvalidFilePath | `from foundry_sdk.v2.core.errors import InvalidFilePath` | +**Core** | InvalidFilterValue | `from foundry_sdk.v2.core.errors import InvalidFilterValue` | +**Core** | InvalidOrFilter | `from foundry_sdk.v2.core.errors import InvalidOrFilter` | +**Core** | InvalidPageSize | `from foundry_sdk.v2.core.errors import InvalidPageSize` | +**Core** | InvalidPageToken | `from foundry_sdk.v2.core.errors import InvalidPageToken` | +**Core** | InvalidParameterCombination | `from foundry_sdk.v2.core.errors import InvalidParameterCombination` | +**Core** | InvalidSchema | `from foundry_sdk.v2.core.errors import InvalidSchema` | +**Core** | InvalidTimeZone | `from foundry_sdk.v2.core.errors import InvalidTimeZone` | +**Core** | MissingBatchRequest | `from foundry_sdk.v2.core.errors import MissingBatchRequest` | +**Core** | MissingPostBody | `from foundry_sdk.v2.core.errors import MissingPostBody` | +**Core** | ResourceNameAlreadyExists | `from foundry_sdk.v2.core.errors import ResourceNameAlreadyExists` | +**Core** | SchemaIsNotStreamSchema | `from foundry_sdk.v2.core.errors import SchemaIsNotStreamSchema` | +**Core** | UnknownDistanceUnit | `from foundry_sdk.v2.core.errors import UnknownDistanceUnit` | +**DataHealth** | CheckAlreadyExists | `from foundry_sdk.v2.data_health.errors import CheckAlreadyExists` | +**DataHealth** | CheckNotFound | `from foundry_sdk.v2.data_health.errors import CheckNotFound` | +**DataHealth** | CheckReportNotFound | `from foundry_sdk.v2.data_health.errors import CheckReportNotFound` | +**DataHealth** | CheckTypeNotSupported | `from foundry_sdk.v2.data_health.errors import CheckTypeNotSupported` | +**DataHealth** | CreateCheckPermissionDenied | `from foundry_sdk.v2.data_health.errors import CreateCheckPermissionDenied` | +**DataHealth** | DeleteCheckPermissionDenied | `from foundry_sdk.v2.data_health.errors import DeleteCheckPermissionDenied` | +**DataHealth** | InvalidNumericColumnCheckConfig | `from foundry_sdk.v2.data_health.errors import InvalidNumericColumnCheckConfig` | +**DataHealth** | InvalidPercentageCheckConfig | `from foundry_sdk.v2.data_health.errors import InvalidPercentageCheckConfig` | +**DataHealth** | InvalidTimeCheckConfig | `from foundry_sdk.v2.data_health.errors import InvalidTimeCheckConfig` | +**DataHealth** | InvalidTrendConfig | `from foundry_sdk.v2.data_health.errors import InvalidTrendConfig` | +**DataHealth** | ModifyingCheckTypeNotSupported | `from foundry_sdk.v2.data_health.errors import ModifyingCheckTypeNotSupported` | +**DataHealth** | PercentageValueAboveMaximum | `from foundry_sdk.v2.data_health.errors import PercentageValueAboveMaximum` | +**DataHealth** | PercentageValueBelowMinimum | `from foundry_sdk.v2.data_health.errors import PercentageValueBelowMinimum` | +**DataHealth** | ReplaceCheckPermissionDenied | `from foundry_sdk.v2.data_health.errors import ReplaceCheckPermissionDenied` | +**Datasets** | AbortTransactionPermissionDenied | `from foundry_sdk.v2.datasets.errors import AbortTransactionPermissionDenied` | +**Datasets** | AddBackingDatasetsPermissionDenied | `from foundry_sdk.v2.datasets.errors import AddBackingDatasetsPermissionDenied` | +**Datasets** | AddPrimaryKeyPermissionDenied | `from foundry_sdk.v2.datasets.errors import AddPrimaryKeyPermissionDenied` | +**Datasets** | BranchAlreadyExists | `from foundry_sdk.v2.datasets.errors import BranchAlreadyExists` | +**Datasets** | BranchNotFound | `from foundry_sdk.v2.datasets.errors import BranchNotFound` | +**Datasets** | BuildTransactionPermissionDenied | `from foundry_sdk.v2.datasets.errors import BuildTransactionPermissionDenied` | +**Datasets** | ColumnTypesNotSupported | `from foundry_sdk.v2.datasets.errors import ColumnTypesNotSupported` | +**Datasets** | CommitTransactionPermissionDenied | `from foundry_sdk.v2.datasets.errors import CommitTransactionPermissionDenied` | +**Datasets** | CreateBranchPermissionDenied | `from foundry_sdk.v2.datasets.errors import CreateBranchPermissionDenied` | +**Datasets** | CreateDatasetPermissionDenied | `from foundry_sdk.v2.datasets.errors import CreateDatasetPermissionDenied` | +**Datasets** | CreateTransactionPermissionDenied | `from foundry_sdk.v2.datasets.errors import CreateTransactionPermissionDenied` | +**Datasets** | CreateViewPermissionDenied | `from foundry_sdk.v2.datasets.errors import CreateViewPermissionDenied` | +**Datasets** | DatasetNotFound | `from foundry_sdk.v2.datasets.errors import DatasetNotFound` | +**Datasets** | DatasetReadNotSupported | `from foundry_sdk.v2.datasets.errors import DatasetReadNotSupported` | +**Datasets** | DatasetViewNotFound | `from foundry_sdk.v2.datasets.errors import DatasetViewNotFound` | +**Datasets** | DeleteBranchPermissionDenied | `from foundry_sdk.v2.datasets.errors import DeleteBranchPermissionDenied` | +**Datasets** | DeleteFilePermissionDenied | `from foundry_sdk.v2.datasets.errors import DeleteFilePermissionDenied` | +**Datasets** | DeleteSchemaPermissionDenied | `from foundry_sdk.v2.datasets.errors import DeleteSchemaPermissionDenied` | +**Datasets** | FileAlreadyExists | `from foundry_sdk.v2.datasets.errors import FileAlreadyExists` | +**Datasets** | FileNotFound | `from foundry_sdk.v2.datasets.errors import FileNotFound` | +**Datasets** | FileNotFoundOnBranch | `from foundry_sdk.v2.datasets.errors import FileNotFoundOnBranch` | +**Datasets** | FileNotFoundOnTransactionRange | `from foundry_sdk.v2.datasets.errors import FileNotFoundOnTransactionRange` | +**Datasets** | GetBranchTransactionHistoryPermissionDenied | `from foundry_sdk.v2.datasets.errors import GetBranchTransactionHistoryPermissionDenied` | +**Datasets** | GetDatasetHealthChecksPermissionDenied | `from foundry_sdk.v2.datasets.errors import GetDatasetHealthChecksPermissionDenied` | +**Datasets** | GetDatasetJobsPermissionDenied | `from foundry_sdk.v2.datasets.errors import GetDatasetJobsPermissionDenied` | +**Datasets** | GetDatasetSchedulesPermissionDenied | `from foundry_sdk.v2.datasets.errors import GetDatasetSchedulesPermissionDenied` | +**Datasets** | GetDatasetSchemaPermissionDenied | `from foundry_sdk.v2.datasets.errors import GetDatasetSchemaPermissionDenied` | +**Datasets** | GetFileContentPermissionDenied | `from foundry_sdk.v2.datasets.errors import GetFileContentPermissionDenied` | +**Datasets** | InputBackingDatasetNotInOutputViewProject | `from foundry_sdk.v2.datasets.errors import InputBackingDatasetNotInOutputViewProject` | +**Datasets** | InvalidBranchName | `from foundry_sdk.v2.datasets.errors import InvalidBranchName` | +**Datasets** | InvalidTransactionType | `from foundry_sdk.v2.datasets.errors import InvalidTransactionType` | +**Datasets** | InvalidViewBackingDataset | `from foundry_sdk.v2.datasets.errors import InvalidViewBackingDataset` | +**Datasets** | InvalidViewPrimaryKeyColumnType | `from foundry_sdk.v2.datasets.errors import InvalidViewPrimaryKeyColumnType` | +**Datasets** | InvalidViewPrimaryKeyDeletionColumn | `from foundry_sdk.v2.datasets.errors import InvalidViewPrimaryKeyDeletionColumn` | +**Datasets** | JobTransactionPermissionDenied | `from foundry_sdk.v2.datasets.errors import JobTransactionPermissionDenied` | +**Datasets** | NotAllColumnsInPrimaryKeyArePresent | `from foundry_sdk.v2.datasets.errors import NotAllColumnsInPrimaryKeyArePresent` | +**Datasets** | OpenTransactionAlreadyExists | `from foundry_sdk.v2.datasets.errors import OpenTransactionAlreadyExists` | +**Datasets** | PutDatasetSchemaPermissionDenied | `from foundry_sdk.v2.datasets.errors import PutDatasetSchemaPermissionDenied` | +**Datasets** | PutSchemaPermissionDenied | `from foundry_sdk.v2.datasets.errors import PutSchemaPermissionDenied` | +**Datasets** | ReadTableDatasetPermissionDenied | `from foundry_sdk.v2.datasets.errors import ReadTableDatasetPermissionDenied` | +**Datasets** | ReadTableError | `from foundry_sdk.v2.datasets.errors import ReadTableError` | +**Datasets** | ReadTableRowLimitExceeded | `from foundry_sdk.v2.datasets.errors import ReadTableRowLimitExceeded` | +**Datasets** | ReadTableTimeout | `from foundry_sdk.v2.datasets.errors import ReadTableTimeout` | +**Datasets** | RemoveBackingDatasetsPermissionDenied | `from foundry_sdk.v2.datasets.errors import RemoveBackingDatasetsPermissionDenied` | +**Datasets** | ReplaceBackingDatasetsPermissionDenied | `from foundry_sdk.v2.datasets.errors import ReplaceBackingDatasetsPermissionDenied` | +**Datasets** | SchemaNotFound | `from foundry_sdk.v2.datasets.errors import SchemaNotFound` | +**Datasets** | TransactionNotCommitted | `from foundry_sdk.v2.datasets.errors import TransactionNotCommitted` | +**Datasets** | TransactionNotFound | `from foundry_sdk.v2.datasets.errors import TransactionNotFound` | +**Datasets** | TransactionNotOpen | `from foundry_sdk.v2.datasets.errors import TransactionNotOpen` | +**Datasets** | UploadFilePermissionDenied | `from foundry_sdk.v2.datasets.errors import UploadFilePermissionDenied` | +**Datasets** | ViewDatasetCleanupFailed | `from foundry_sdk.v2.datasets.errors import ViewDatasetCleanupFailed` | +**Datasets** | ViewNotFound | `from foundry_sdk.v2.datasets.errors import ViewNotFound` | +**Datasets** | ViewPrimaryKeyCannotBeModified | `from foundry_sdk.v2.datasets.errors import ViewPrimaryKeyCannotBeModified` | +**Datasets** | ViewPrimaryKeyDeletionColumnNotInDatasetSchema | `from foundry_sdk.v2.datasets.errors import ViewPrimaryKeyDeletionColumnNotInDatasetSchema` | +**Datasets** | ViewPrimaryKeyMustContainAtLeastOneColumn | `from foundry_sdk.v2.datasets.errors import ViewPrimaryKeyMustContainAtLeastOneColumn` | +**Datasets** | ViewPrimaryKeyRequiresBackingDatasets | `from foundry_sdk.v2.datasets.errors import ViewPrimaryKeyRequiresBackingDatasets` | +**Filesystem** | AddGroupToParentGroupPermissionDenied | `from foundry_sdk.v2.filesystem.errors import AddGroupToParentGroupPermissionDenied` | +**Filesystem** | AddMarkingsPermissionDenied | `from foundry_sdk.v2.filesystem.errors import AddMarkingsPermissionDenied` | +**Filesystem** | AddOrganizationsPermissionDenied | `from foundry_sdk.v2.filesystem.errors import AddOrganizationsPermissionDenied` | +**Filesystem** | AddResourceRolesPermissionDenied | `from foundry_sdk.v2.filesystem.errors import AddResourceRolesPermissionDenied` | +**Filesystem** | CreateFolderOutsideProjectNotSupported | `from foundry_sdk.v2.filesystem.errors import CreateFolderOutsideProjectNotSupported` | +**Filesystem** | CreateFolderPermissionDenied | `from foundry_sdk.v2.filesystem.errors import CreateFolderPermissionDenied` | +**Filesystem** | CreateGroupPermissionDenied | `from foundry_sdk.v2.filesystem.errors import CreateGroupPermissionDenied` | +**Filesystem** | CreateProjectFromTemplatePermissionDenied | `from foundry_sdk.v2.filesystem.errors import CreateProjectFromTemplatePermissionDenied` | +**Filesystem** | CreateProjectNoOwnerLikeRoleGrant | `from foundry_sdk.v2.filesystem.errors import CreateProjectNoOwnerLikeRoleGrant` | +**Filesystem** | CreateProjectPermissionDenied | `from foundry_sdk.v2.filesystem.errors import CreateProjectPermissionDenied` | +**Filesystem** | CreateSpacePermissionDenied | `from foundry_sdk.v2.filesystem.errors import CreateSpacePermissionDenied` | +**Filesystem** | DefaultRolesNotInSpaceRoleSet | `from foundry_sdk.v2.filesystem.errors import DefaultRolesNotInSpaceRoleSet` | +**Filesystem** | DeleteResourcePermissionDenied | `from foundry_sdk.v2.filesystem.errors import DeleteResourcePermissionDenied` | +**Filesystem** | DeleteSpacePermissionDenied | `from foundry_sdk.v2.filesystem.errors import DeleteSpacePermissionDenied` | +**Filesystem** | EnrollmentNotFound | `from foundry_sdk.v2.filesystem.errors import EnrollmentNotFound` | +**Filesystem** | FolderNotFound | `from foundry_sdk.v2.filesystem.errors import FolderNotFound` | +**Filesystem** | ForbiddenOperationOnAutosavedResource | `from foundry_sdk.v2.filesystem.errors import ForbiddenOperationOnAutosavedResource` | +**Filesystem** | ForbiddenOperationOnHiddenResource | `from foundry_sdk.v2.filesystem.errors import ForbiddenOperationOnHiddenResource` | +**Filesystem** | GetAccessRequirementsPermissionDenied | `from foundry_sdk.v2.filesystem.errors import GetAccessRequirementsPermissionDenied` | +**Filesystem** | GetByPathPermissionDenied | `from foundry_sdk.v2.filesystem.errors import GetByPathPermissionDenied` | +**Filesystem** | GetRootFolderNotSupported | `from foundry_sdk.v2.filesystem.errors import GetRootFolderNotSupported` | +**Filesystem** | GetSpaceResourceNotSupported | `from foundry_sdk.v2.filesystem.errors import GetSpaceResourceNotSupported` | +**Filesystem** | InvalidDefaultRoles | `from foundry_sdk.v2.filesystem.errors import InvalidDefaultRoles` | +**Filesystem** | InvalidDescription | `from foundry_sdk.v2.filesystem.errors import InvalidDescription` | +**Filesystem** | InvalidDisplayName | `from foundry_sdk.v2.filesystem.errors import InvalidDisplayName` | +**Filesystem** | InvalidFolder | `from foundry_sdk.v2.filesystem.errors import InvalidFolder` | +**Filesystem** | InvalidOrganizationHierarchy | `from foundry_sdk.v2.filesystem.errors import InvalidOrganizationHierarchy` | +**Filesystem** | InvalidOrganizations | `from foundry_sdk.v2.filesystem.errors import InvalidOrganizations` | +**Filesystem** | InvalidPath | `from foundry_sdk.v2.filesystem.errors import InvalidPath` | +**Filesystem** | InvalidPrincipalIdsForGroupTemplate | `from foundry_sdk.v2.filesystem.errors import InvalidPrincipalIdsForGroupTemplate` | +**Filesystem** | InvalidRoleIds | `from foundry_sdk.v2.filesystem.errors import InvalidRoleIds` | +**Filesystem** | InvalidVariable | `from foundry_sdk.v2.filesystem.errors import InvalidVariable` | +**Filesystem** | InvalidVariableEnumOption | `from foundry_sdk.v2.filesystem.errors import InvalidVariableEnumOption` | +**Filesystem** | MarkingNotFound | `from foundry_sdk.v2.filesystem.errors import MarkingNotFound` | +**Filesystem** | MissingDisplayName | `from foundry_sdk.v2.filesystem.errors import MissingDisplayName` | +**Filesystem** | MissingVariableValue | `from foundry_sdk.v2.filesystem.errors import MissingVariableValue` | +**Filesystem** | NotAuthorizedToApplyOrganization | `from foundry_sdk.v2.filesystem.errors import NotAuthorizedToApplyOrganization` | +**Filesystem** | OrganizationCannotBeRemoved | `from foundry_sdk.v2.filesystem.errors import OrganizationCannotBeRemoved` | +**Filesystem** | OrganizationMarkingNotOnSpace | `from foundry_sdk.v2.filesystem.errors import OrganizationMarkingNotOnSpace` | +**Filesystem** | OrganizationMarkingNotSupported | `from foundry_sdk.v2.filesystem.errors import OrganizationMarkingNotSupported` | +**Filesystem** | OrganizationsNotFound | `from foundry_sdk.v2.filesystem.errors import OrganizationsNotFound` | +**Filesystem** | PathNotFound | `from foundry_sdk.v2.filesystem.errors import PathNotFound` | +**Filesystem** | PermanentlyDeleteResourcePermissionDenied | `from foundry_sdk.v2.filesystem.errors import PermanentlyDeleteResourcePermissionDenied` | +**Filesystem** | ProjectCreationNotSupported | `from foundry_sdk.v2.filesystem.errors import ProjectCreationNotSupported` | +**Filesystem** | ProjectNameAlreadyExists | `from foundry_sdk.v2.filesystem.errors import ProjectNameAlreadyExists` | +**Filesystem** | ProjectNotFound | `from foundry_sdk.v2.filesystem.errors import ProjectNotFound` | +**Filesystem** | ProjectTemplateNotFound | `from foundry_sdk.v2.filesystem.errors import ProjectTemplateNotFound` | +**Filesystem** | RemoveMarkingsPermissionDenied | `from foundry_sdk.v2.filesystem.errors import RemoveMarkingsPermissionDenied` | +**Filesystem** | RemoveOrganizationsPermissionDenied | `from foundry_sdk.v2.filesystem.errors import RemoveOrganizationsPermissionDenied` | +**Filesystem** | RemoveResourceRolesPermissionDenied | `from foundry_sdk.v2.filesystem.errors import RemoveResourceRolesPermissionDenied` | +**Filesystem** | ReplaceProjectPermissionDenied | `from foundry_sdk.v2.filesystem.errors import ReplaceProjectPermissionDenied` | +**Filesystem** | ReplaceSpacePermissionDenied | `from foundry_sdk.v2.filesystem.errors import ReplaceSpacePermissionDenied` | +**Filesystem** | ReservedSpaceCannotBeReplaced | `from foundry_sdk.v2.filesystem.errors import ReservedSpaceCannotBeReplaced` | +**Filesystem** | ResourceNameAlreadyExists | `from foundry_sdk.v2.filesystem.errors import ResourceNameAlreadyExists` | +**Filesystem** | ResourceNotDirectlyTrashed | `from foundry_sdk.v2.filesystem.errors import ResourceNotDirectlyTrashed` | +**Filesystem** | ResourceNotFound | `from foundry_sdk.v2.filesystem.errors import ResourceNotFound` | +**Filesystem** | ResourceNotTrashed | `from foundry_sdk.v2.filesystem.errors import ResourceNotTrashed` | +**Filesystem** | RestoreResourcePermissionDenied | `from foundry_sdk.v2.filesystem.errors import RestoreResourcePermissionDenied` | +**Filesystem** | RoleSetNotFound | `from foundry_sdk.v2.filesystem.errors import RoleSetNotFound` | +**Filesystem** | SpaceInternalError | `from foundry_sdk.v2.filesystem.errors import SpaceInternalError` | +**Filesystem** | SpaceInvalidArgument | `from foundry_sdk.v2.filesystem.errors import SpaceInvalidArgument` | +**Filesystem** | SpaceNameInvalid | `from foundry_sdk.v2.filesystem.errors import SpaceNameInvalid` | +**Filesystem** | SpaceNotEmpty | `from foundry_sdk.v2.filesystem.errors import SpaceNotEmpty` | +**Filesystem** | SpaceNotFound | `from foundry_sdk.v2.filesystem.errors import SpaceNotFound` | +**Filesystem** | TemplateGroupNameConflict | `from foundry_sdk.v2.filesystem.errors import TemplateGroupNameConflict` | +**Filesystem** | TemplateMarkingNameConflict | `from foundry_sdk.v2.filesystem.errors import TemplateMarkingNameConflict` | +**Filesystem** | TrashingAutosavedResourcesNotSupported | `from foundry_sdk.v2.filesystem.errors import TrashingAutosavedResourcesNotSupported` | +**Filesystem** | TrashingHiddenResourcesNotSupported | `from foundry_sdk.v2.filesystem.errors import TrashingHiddenResourcesNotSupported` | +**Filesystem** | TrashingSpaceNotSupported | `from foundry_sdk.v2.filesystem.errors import TrashingSpaceNotSupported` | +**Filesystem** | UsageAccountServiceIsNotPresent | `from foundry_sdk.v2.filesystem.errors import UsageAccountServiceIsNotPresent` | +**Functions** | ConsistentSnapshotError | `from foundry_sdk.v2.functions.errors import ConsistentSnapshotError` | +**Functions** | ExecuteQueryPermissionDenied | `from foundry_sdk.v2.functions.errors import ExecuteQueryPermissionDenied` | +**Functions** | GetByRidQueriesPermissionDenied | `from foundry_sdk.v2.functions.errors import GetByRidQueriesPermissionDenied` | +**Functions** | InvalidQueryOutputValue | `from foundry_sdk.v2.functions.errors import InvalidQueryOutputValue` | +**Functions** | InvalidQueryParameterValue | `from foundry_sdk.v2.functions.errors import InvalidQueryParameterValue` | +**Functions** | MissingParameter | `from foundry_sdk.v2.functions.errors import MissingParameter` | +**Functions** | QueryEncounteredUserFacingError | `from foundry_sdk.v2.functions.errors import QueryEncounteredUserFacingError` | +**Functions** | QueryMemoryExceededLimit | `from foundry_sdk.v2.functions.errors import QueryMemoryExceededLimit` | +**Functions** | QueryNotFound | `from foundry_sdk.v2.functions.errors import QueryNotFound` | +**Functions** | QueryRuntimeError | `from foundry_sdk.v2.functions.errors import QueryRuntimeError` | +**Functions** | QueryTimeExceededLimit | `from foundry_sdk.v2.functions.errors import QueryTimeExceededLimit` | +**Functions** | QueryVersionNotFound | `from foundry_sdk.v2.functions.errors import QueryVersionNotFound` | +**Functions** | StreamingExecuteQueryPermissionDenied | `from foundry_sdk.v2.functions.errors import StreamingExecuteQueryPermissionDenied` | +**Functions** | UnknownParameter | `from foundry_sdk.v2.functions.errors import UnknownParameter` | +**Functions** | ValueTypeNotFound | `from foundry_sdk.v2.functions.errors import ValueTypeNotFound` | +**Functions** | VersionIdNotFound | `from foundry_sdk.v2.functions.errors import VersionIdNotFound` | +**LanguageModels** | AnthropicMessagesPermissionDenied | `from foundry_sdk.v2.language_models.errors import AnthropicMessagesPermissionDenied` | +**LanguageModels** | MultipleSystemPromptsNotSupported | `from foundry_sdk.v2.language_models.errors import MultipleSystemPromptsNotSupported` | +**LanguageModels** | MultipleToolResultContentsNotSupported | `from foundry_sdk.v2.language_models.errors import MultipleToolResultContentsNotSupported` | +**LanguageModels** | OpenAiEmbeddingsPermissionDenied | `from foundry_sdk.v2.language_models.errors import OpenAiEmbeddingsPermissionDenied` | +**MediaSets** | ConflictingMediaSetIdentifiers | `from foundry_sdk.v2.media_sets.errors import ConflictingMediaSetIdentifiers` | +**MediaSets** | GetMediaItemRidByPathPermissionDenied | `from foundry_sdk.v2.media_sets.errors import GetMediaItemRidByPathPermissionDenied` | +**MediaSets** | InvalidMediaItemSchema | `from foundry_sdk.v2.media_sets.errors import InvalidMediaItemSchema` | +**MediaSets** | MediaItemHasUnsupportedSecuritySettings | `from foundry_sdk.v2.media_sets.errors import MediaItemHasUnsupportedSecuritySettings` | +**MediaSets** | MediaItemImageUnparsable | `from foundry_sdk.v2.media_sets.errors import MediaItemImageUnparsable` | +**MediaSets** | MediaItemIsPasswordProtected | `from foundry_sdk.v2.media_sets.errors import MediaItemIsPasswordProtected` | +**MediaSets** | MediaItemNotFound | `from foundry_sdk.v2.media_sets.errors import MediaItemNotFound` | +**MediaSets** | MediaItemXmlUnparsable | `from foundry_sdk.v2.media_sets.errors import MediaItemXmlUnparsable` | +**MediaSets** | MediaSetNotFound | `from foundry_sdk.v2.media_sets.errors import MediaSetNotFound` | +**MediaSets** | MediaSetOpenTransactionAlreadyExists | `from foundry_sdk.v2.media_sets.errors import MediaSetOpenTransactionAlreadyExists` | +**MediaSets** | MissingMediaItemContent | `from foundry_sdk.v2.media_sets.errors import MissingMediaItemContent` | +**MediaSets** | MissingMediaItemPath | `from foundry_sdk.v2.media_sets.errors import MissingMediaItemPath` | +**MediaSets** | TemporaryMediaUploadInsufficientPermissions | `from foundry_sdk.v2.media_sets.errors import TemporaryMediaUploadInsufficientPermissions` | +**MediaSets** | TemporaryMediaUploadUnknownFailure | `from foundry_sdk.v2.media_sets.errors import TemporaryMediaUploadUnknownFailure` | +**MediaSets** | TransformedMediaItemNotFound | `from foundry_sdk.v2.media_sets.errors import TransformedMediaItemNotFound` | +**Models** | CondaSolveFailureForProvidedPackages | `from foundry_sdk.v2.models.errors import CondaSolveFailureForProvidedPackages` | +**Models** | CreateModelPermissionDenied | `from foundry_sdk.v2.models.errors import CreateModelPermissionDenied` | +**Models** | CreateModelVersionPermissionDenied | `from foundry_sdk.v2.models.errors import CreateModelVersionPermissionDenied` | +**Models** | InvalidModelApi | `from foundry_sdk.v2.models.errors import InvalidModelApi` | +**Models** | ModelNotFound | `from foundry_sdk.v2.models.errors import ModelNotFound` | +**Models** | ModelVersionNotFound | `from foundry_sdk.v2.models.errors import ModelVersionNotFound` | +**Ontologies** | ActionContainsDuplicateEdits | `from foundry_sdk.v2.ontologies.errors import ActionContainsDuplicateEdits` | +**Ontologies** | ActionEditedPropertiesNotFound | `from foundry_sdk.v2.ontologies.errors import ActionEditedPropertiesNotFound` | +**Ontologies** | ActionEditsReadOnlyEntity | `from foundry_sdk.v2.ontologies.errors import ActionEditsReadOnlyEntity` | +**Ontologies** | ActionNotFound | `from foundry_sdk.v2.ontologies.errors import ActionNotFound` | +**Ontologies** | ActionParameterInterfaceTypeNotFound | `from foundry_sdk.v2.ontologies.errors import ActionParameterInterfaceTypeNotFound` | +**Ontologies** | ActionParameterObjectNotFound | `from foundry_sdk.v2.ontologies.errors import ActionParameterObjectNotFound` | +**Ontologies** | ActionParameterObjectTypeNotFound | `from foundry_sdk.v2.ontologies.errors import ActionParameterObjectTypeNotFound` | +**Ontologies** | ActionTypeNotFound | `from foundry_sdk.v2.ontologies.errors import ActionTypeNotFound` | +**Ontologies** | ActionValidationFailed | `from foundry_sdk.v2.ontologies.errors import ActionValidationFailed` | +**Ontologies** | AggregationAccuracyNotSupported | `from foundry_sdk.v2.ontologies.errors import AggregationAccuracyNotSupported` | +**Ontologies** | AggregationGroupCountExceededLimit | `from foundry_sdk.v2.ontologies.errors import AggregationGroupCountExceededLimit` | +**Ontologies** | AggregationMemoryExceededLimit | `from foundry_sdk.v2.ontologies.errors import AggregationMemoryExceededLimit` | +**Ontologies** | AggregationNestedObjectSetSizeExceededLimit | `from foundry_sdk.v2.ontologies.errors import AggregationNestedObjectSetSizeExceededLimit` | +**Ontologies** | ApplyActionFailed | `from foundry_sdk.v2.ontologies.errors import ApplyActionFailed` | +**Ontologies** | AttachmentNotFound | `from foundry_sdk.v2.ontologies.errors import AttachmentNotFound` | +**Ontologies** | AttachmentRidAlreadyExists | `from foundry_sdk.v2.ontologies.errors import AttachmentRidAlreadyExists` | +**Ontologies** | AttachmentSizeExceededLimit | `from foundry_sdk.v2.ontologies.errors import AttachmentSizeExceededLimit` | +**Ontologies** | CipherChannelNotFound | `from foundry_sdk.v2.ontologies.errors import CipherChannelNotFound` | +**Ontologies** | CompositePrimaryKeyNotSupported | `from foundry_sdk.v2.ontologies.errors import CompositePrimaryKeyNotSupported` | +**Ontologies** | ConsistentSnapshotError | `from foundry_sdk.v2.ontologies.errors import ConsistentSnapshotError` | +**Ontologies** | DefaultAndNullGroupsNotSupported | `from foundry_sdk.v2.ontologies.errors import DefaultAndNullGroupsNotSupported` | +**Ontologies** | DerivedPropertyApiNamesNotUnique | `from foundry_sdk.v2.ontologies.errors import DerivedPropertyApiNamesNotUnique` | +**Ontologies** | DuplicateOrderBy | `from foundry_sdk.v2.ontologies.errors import DuplicateOrderBy` | +**Ontologies** | EditObjectPermissionDenied | `from foundry_sdk.v2.ontologies.errors import EditObjectPermissionDenied` | +**Ontologies** | FunctionEncounteredUserFacingError | `from foundry_sdk.v2.ontologies.errors import FunctionEncounteredUserFacingError` | +**Ontologies** | FunctionExecutionFailed | `from foundry_sdk.v2.ontologies.errors import FunctionExecutionFailed` | +**Ontologies** | FunctionExecutionTimedOut | `from foundry_sdk.v2.ontologies.errors import FunctionExecutionTimedOut` | +**Ontologies** | FunctionInvalidInput | `from foundry_sdk.v2.ontologies.errors import FunctionInvalidInput` | +**Ontologies** | HighScaleComputationNotEnabled | `from foundry_sdk.v2.ontologies.errors import HighScaleComputationNotEnabled` | +**Ontologies** | InterfaceBasedObjectSetNotSupported | `from foundry_sdk.v2.ontologies.errors import InterfaceBasedObjectSetNotSupported` | +**Ontologies** | InterfaceLinkTypeNotFound | `from foundry_sdk.v2.ontologies.errors import InterfaceLinkTypeNotFound` | +**Ontologies** | InterfacePropertiesHaveDifferentIds | `from foundry_sdk.v2.ontologies.errors import InterfacePropertiesHaveDifferentIds` | +**Ontologies** | InterfacePropertiesNotFound | `from foundry_sdk.v2.ontologies.errors import InterfacePropertiesNotFound` | +**Ontologies** | InterfacePropertyNotFound | `from foundry_sdk.v2.ontologies.errors import InterfacePropertyNotFound` | +**Ontologies** | InterfaceTypeNotFound | `from foundry_sdk.v2.ontologies.errors import InterfaceTypeNotFound` | +**Ontologies** | InterfaceTypesNotFound | `from foundry_sdk.v2.ontologies.errors import InterfaceTypesNotFound` | +**Ontologies** | InvalidAggregationOrdering | `from foundry_sdk.v2.ontologies.errors import InvalidAggregationOrdering` | +**Ontologies** | InvalidAggregationOrderingWithNullValues | `from foundry_sdk.v2.ontologies.errors import InvalidAggregationOrderingWithNullValues` | +**Ontologies** | InvalidAggregationRange | `from foundry_sdk.v2.ontologies.errors import InvalidAggregationRange` | +**Ontologies** | InvalidAggregationRangePropertyType | `from foundry_sdk.v2.ontologies.errors import InvalidAggregationRangePropertyType` | +**Ontologies** | InvalidAggregationRangePropertyTypeForInterface | `from foundry_sdk.v2.ontologies.errors import InvalidAggregationRangePropertyTypeForInterface` | +**Ontologies** | InvalidAggregationRangeValue | `from foundry_sdk.v2.ontologies.errors import InvalidAggregationRangeValue` | +**Ontologies** | InvalidAggregationRangeValueForInterface | `from foundry_sdk.v2.ontologies.errors import InvalidAggregationRangeValueForInterface` | +**Ontologies** | InvalidApplyActionOptionCombination | `from foundry_sdk.v2.ontologies.errors import InvalidApplyActionOptionCombination` | +**Ontologies** | InvalidContentLength | `from foundry_sdk.v2.ontologies.errors import InvalidContentLength` | +**Ontologies** | InvalidContentType | `from foundry_sdk.v2.ontologies.errors import InvalidContentType` | +**Ontologies** | InvalidDerivedPropertyDefinition | `from foundry_sdk.v2.ontologies.errors import InvalidDerivedPropertyDefinition` | +**Ontologies** | InvalidDurationGroupByPropertyType | `from foundry_sdk.v2.ontologies.errors import InvalidDurationGroupByPropertyType` | +**Ontologies** | InvalidDurationGroupByPropertyTypeForInterface | `from foundry_sdk.v2.ontologies.errors import InvalidDurationGroupByPropertyTypeForInterface` | +**Ontologies** | InvalidDurationGroupByValue | `from foundry_sdk.v2.ontologies.errors import InvalidDurationGroupByValue` | +**Ontologies** | InvalidFields | `from foundry_sdk.v2.ontologies.errors import InvalidFields` | +**Ontologies** | InvalidGroupId | `from foundry_sdk.v2.ontologies.errors import InvalidGroupId` | +**Ontologies** | InvalidOrderType | `from foundry_sdk.v2.ontologies.errors import InvalidOrderType` | +**Ontologies** | InvalidParameterValue | `from foundry_sdk.v2.ontologies.errors import InvalidParameterValue` | +**Ontologies** | InvalidPropertyFiltersCombination | `from foundry_sdk.v2.ontologies.errors import InvalidPropertyFiltersCombination` | +**Ontologies** | InvalidPropertyFilterValue | `from foundry_sdk.v2.ontologies.errors import InvalidPropertyFilterValue` | +**Ontologies** | InvalidPropertyType | `from foundry_sdk.v2.ontologies.errors import InvalidPropertyType` | +**Ontologies** | InvalidPropertyValue | `from foundry_sdk.v2.ontologies.errors import InvalidPropertyValue` | +**Ontologies** | InvalidQueryOutputValue | `from foundry_sdk.v2.ontologies.errors import InvalidQueryOutputValue` | +**Ontologies** | InvalidQueryParameterValue | `from foundry_sdk.v2.ontologies.errors import InvalidQueryParameterValue` | +**Ontologies** | InvalidRangeQuery | `from foundry_sdk.v2.ontologies.errors import InvalidRangeQuery` | +**Ontologies** | InvalidSortOrder | `from foundry_sdk.v2.ontologies.errors import InvalidSortOrder` | +**Ontologies** | InvalidSortType | `from foundry_sdk.v2.ontologies.errors import InvalidSortType` | +**Ontologies** | InvalidTransactionEditPropertyValue | `from foundry_sdk.v2.ontologies.errors import InvalidTransactionEditPropertyValue` | +**Ontologies** | InvalidUserId | `from foundry_sdk.v2.ontologies.errors import InvalidUserId` | +**Ontologies** | InvalidVectorDimension | `from foundry_sdk.v2.ontologies.errors import InvalidVectorDimension` | +**Ontologies** | LinkAlreadyExists | `from foundry_sdk.v2.ontologies.errors import LinkAlreadyExists` | +**Ontologies** | LinkedObjectNotFound | `from foundry_sdk.v2.ontologies.errors import LinkedObjectNotFound` | +**Ontologies** | LinkTypeNotFound | `from foundry_sdk.v2.ontologies.errors import LinkTypeNotFound` | +**Ontologies** | LoadObjectSetLinksNotSupported | `from foundry_sdk.v2.ontologies.errors import LoadObjectSetLinksNotSupported` | +**Ontologies** | MalformedPropertyFilters | `from foundry_sdk.v2.ontologies.errors import MalformedPropertyFilters` | +**Ontologies** | MarketplaceActionMappingNotFound | `from foundry_sdk.v2.ontologies.errors import MarketplaceActionMappingNotFound` | +**Ontologies** | MarketplaceInstallationNotFound | `from foundry_sdk.v2.ontologies.errors import MarketplaceInstallationNotFound` | +**Ontologies** | MarketplaceLinkMappingNotFound | `from foundry_sdk.v2.ontologies.errors import MarketplaceLinkMappingNotFound` | +**Ontologies** | MarketplaceObjectMappingNotFound | `from foundry_sdk.v2.ontologies.errors import MarketplaceObjectMappingNotFound` | +**Ontologies** | MarketplaceQueryMappingNotFound | `from foundry_sdk.v2.ontologies.errors import MarketplaceQueryMappingNotFound` | +**Ontologies** | MarketplaceSdkActionMappingNotFound | `from foundry_sdk.v2.ontologies.errors import MarketplaceSdkActionMappingNotFound` | +**Ontologies** | MarketplaceSdkInstallationNotFound | `from foundry_sdk.v2.ontologies.errors import MarketplaceSdkInstallationNotFound` | +**Ontologies** | MarketplaceSdkLinkMappingNotFound | `from foundry_sdk.v2.ontologies.errors import MarketplaceSdkLinkMappingNotFound` | +**Ontologies** | MarketplaceSdkObjectMappingNotFound | `from foundry_sdk.v2.ontologies.errors import MarketplaceSdkObjectMappingNotFound` | +**Ontologies** | MarketplaceSdkPropertyMappingNotFound | `from foundry_sdk.v2.ontologies.errors import MarketplaceSdkPropertyMappingNotFound` | +**Ontologies** | MarketplaceSdkQueryMappingNotFound | `from foundry_sdk.v2.ontologies.errors import MarketplaceSdkQueryMappingNotFound` | +**Ontologies** | MissingParameter | `from foundry_sdk.v2.ontologies.errors import MissingParameter` | +**Ontologies** | MultipleGroupByOnFieldNotSupported | `from foundry_sdk.v2.ontologies.errors import MultipleGroupByOnFieldNotSupported` | +**Ontologies** | MultiplePropertyValuesNotSupported | `from foundry_sdk.v2.ontologies.errors import MultiplePropertyValuesNotSupported` | +**Ontologies** | NotCipherFormatted | `from foundry_sdk.v2.ontologies.errors import NotCipherFormatted` | +**Ontologies** | ObjectAlreadyExists | `from foundry_sdk.v2.ontologies.errors import ObjectAlreadyExists` | +**Ontologies** | ObjectChanged | `from foundry_sdk.v2.ontologies.errors import ObjectChanged` | +**Ontologies** | ObjectNotFound | `from foundry_sdk.v2.ontologies.errors import ObjectNotFound` | +**Ontologies** | ObjectSetNotFound | `from foundry_sdk.v2.ontologies.errors import ObjectSetNotFound` | +**Ontologies** | ObjectsExceededLimit | `from foundry_sdk.v2.ontologies.errors import ObjectsExceededLimit` | +**Ontologies** | ObjectsModifiedConcurrently | `from foundry_sdk.v2.ontologies.errors import ObjectsModifiedConcurrently` | +**Ontologies** | ObjectTypeNotFound | `from foundry_sdk.v2.ontologies.errors import ObjectTypeNotFound` | +**Ontologies** | ObjectTypeNotSynced | `from foundry_sdk.v2.ontologies.errors import ObjectTypeNotSynced` | +**Ontologies** | ObjectTypesNotSynced | `from foundry_sdk.v2.ontologies.errors import ObjectTypesNotSynced` | +**Ontologies** | OntologyApiNameNotUnique | `from foundry_sdk.v2.ontologies.errors import OntologyApiNameNotUnique` | +**Ontologies** | OntologyEditsExceededLimit | `from foundry_sdk.v2.ontologies.errors import OntologyEditsExceededLimit` | +**Ontologies** | OntologyNotFound | `from foundry_sdk.v2.ontologies.errors import OntologyNotFound` | +**Ontologies** | OntologySyncing | `from foundry_sdk.v2.ontologies.errors import OntologySyncing` | +**Ontologies** | OntologySyncingObjectTypes | `from foundry_sdk.v2.ontologies.errors import OntologySyncingObjectTypes` | +**Ontologies** | ParameterObjectNotFound | `from foundry_sdk.v2.ontologies.errors import ParameterObjectNotFound` | +**Ontologies** | ParameterObjectSetRidNotFound | `from foundry_sdk.v2.ontologies.errors import ParameterObjectSetRidNotFound` | +**Ontologies** | ParametersNotFound | `from foundry_sdk.v2.ontologies.errors import ParametersNotFound` | +**Ontologies** | ParameterTypeNotSupported | `from foundry_sdk.v2.ontologies.errors import ParameterTypeNotSupported` | +**Ontologies** | ParentAttachmentPermissionDenied | `from foundry_sdk.v2.ontologies.errors import ParentAttachmentPermissionDenied` | +**Ontologies** | PropertiesHaveDifferentIds | `from foundry_sdk.v2.ontologies.errors import PropertiesHaveDifferentIds` | +**Ontologies** | PropertiesNotFilterable | `from foundry_sdk.v2.ontologies.errors import PropertiesNotFilterable` | +**Ontologies** | PropertiesNotFound | `from foundry_sdk.v2.ontologies.errors import PropertiesNotFound` | +**Ontologies** | PropertiesNotSearchable | `from foundry_sdk.v2.ontologies.errors import PropertiesNotSearchable` | +**Ontologies** | PropertiesNotSortable | `from foundry_sdk.v2.ontologies.errors import PropertiesNotSortable` | +**Ontologies** | PropertyApiNameNotFound | `from foundry_sdk.v2.ontologies.errors import PropertyApiNameNotFound` | +**Ontologies** | PropertyBaseTypeNotSupported | `from foundry_sdk.v2.ontologies.errors import PropertyBaseTypeNotSupported` | +**Ontologies** | PropertyExactMatchingNotSupported | `from foundry_sdk.v2.ontologies.errors import PropertyExactMatchingNotSupported` | +**Ontologies** | PropertyFiltersNotSupported | `from foundry_sdk.v2.ontologies.errors import PropertyFiltersNotSupported` | +**Ontologies** | PropertyNotFound | `from foundry_sdk.v2.ontologies.errors import PropertyNotFound` | +**Ontologies** | PropertyNotFoundOnObject | `from foundry_sdk.v2.ontologies.errors import PropertyNotFoundOnObject` | +**Ontologies** | PropertyTypeDoesNotSupportNearestNeighbors | `from foundry_sdk.v2.ontologies.errors import PropertyTypeDoesNotSupportNearestNeighbors` | +**Ontologies** | PropertyTypeNotFound | `from foundry_sdk.v2.ontologies.errors import PropertyTypeNotFound` | +**Ontologies** | PropertyTypeRidNotFound | `from foundry_sdk.v2.ontologies.errors import PropertyTypeRidNotFound` | +**Ontologies** | PropertyTypesSearchNotSupported | `from foundry_sdk.v2.ontologies.errors import PropertyTypesSearchNotSupported` | +**Ontologies** | QueryEncounteredUserFacingError | `from foundry_sdk.v2.ontologies.errors import QueryEncounteredUserFacingError` | +**Ontologies** | QueryMemoryExceededLimit | `from foundry_sdk.v2.ontologies.errors import QueryMemoryExceededLimit` | +**Ontologies** | QueryNotFound | `from foundry_sdk.v2.ontologies.errors import QueryNotFound` | +**Ontologies** | QueryRuntimeError | `from foundry_sdk.v2.ontologies.errors import QueryRuntimeError` | +**Ontologies** | QueryTimeExceededLimit | `from foundry_sdk.v2.ontologies.errors import QueryTimeExceededLimit` | +**Ontologies** | QueryVersionNotFound | `from foundry_sdk.v2.ontologies.errors import QueryVersionNotFound` | +**Ontologies** | RateLimitReached | `from foundry_sdk.v2.ontologies.errors import RateLimitReached` | +**Ontologies** | SharedPropertiesNotFound | `from foundry_sdk.v2.ontologies.errors import SharedPropertiesNotFound` | +**Ontologies** | SharedPropertyTypeNotFound | `from foundry_sdk.v2.ontologies.errors import SharedPropertyTypeNotFound` | +**Ontologies** | SimilarityThresholdOutOfRange | `from foundry_sdk.v2.ontologies.errors import SimilarityThresholdOutOfRange` | +**Ontologies** | TooManyNearestNeighborsRequested | `from foundry_sdk.v2.ontologies.errors import TooManyNearestNeighborsRequested` | +**Ontologies** | UnauthorizedCipherOperation | `from foundry_sdk.v2.ontologies.errors import UnauthorizedCipherOperation` | +**Ontologies** | UndecryptableValue | `from foundry_sdk.v2.ontologies.errors import UndecryptableValue` | +**Ontologies** | UniqueIdentifierLinkIdsDoNotExistInActionType | `from foundry_sdk.v2.ontologies.errors import UniqueIdentifierLinkIdsDoNotExistInActionType` | +**Ontologies** | UnknownParameter | `from foundry_sdk.v2.ontologies.errors import UnknownParameter` | +**Ontologies** | UnsupportedInterfaceBasedObjectSet | `from foundry_sdk.v2.ontologies.errors import UnsupportedInterfaceBasedObjectSet` | +**Ontologies** | UnsupportedObjectSet | `from foundry_sdk.v2.ontologies.errors import UnsupportedObjectSet` | +**Ontologies** | ValueTypeNotFound | `from foundry_sdk.v2.ontologies.errors import ValueTypeNotFound` | +**Ontologies** | ViewObjectPermissionDenied | `from foundry_sdk.v2.ontologies.errors import ViewObjectPermissionDenied` | +**Orchestration** | BuildInputsNotFound | `from foundry_sdk.v2.orchestration.errors import BuildInputsNotFound` | +**Orchestration** | BuildInputsPermissionDenied | `from foundry_sdk.v2.orchestration.errors import BuildInputsPermissionDenied` | +**Orchestration** | BuildNotFound | `from foundry_sdk.v2.orchestration.errors import BuildNotFound` | +**Orchestration** | BuildNotRunning | `from foundry_sdk.v2.orchestration.errors import BuildNotRunning` | +**Orchestration** | BuildTargetsMissingJobSpecs | `from foundry_sdk.v2.orchestration.errors import BuildTargetsMissingJobSpecs` | +**Orchestration** | BuildTargetsNotFound | `from foundry_sdk.v2.orchestration.errors import BuildTargetsNotFound` | +**Orchestration** | BuildTargetsPermissionDenied | `from foundry_sdk.v2.orchestration.errors import BuildTargetsPermissionDenied` | +**Orchestration** | BuildTargetsResolutionError | `from foundry_sdk.v2.orchestration.errors import BuildTargetsResolutionError` | +**Orchestration** | BuildTargetsUpToDate | `from foundry_sdk.v2.orchestration.errors import BuildTargetsUpToDate` | +**Orchestration** | CancelBuildPermissionDenied | `from foundry_sdk.v2.orchestration.errors import CancelBuildPermissionDenied` | +**Orchestration** | CreateBuildPermissionDenied | `from foundry_sdk.v2.orchestration.errors import CreateBuildPermissionDenied` | +**Orchestration** | CreateSchedulePermissionDenied | `from foundry_sdk.v2.orchestration.errors import CreateSchedulePermissionDenied` | +**Orchestration** | DeleteSchedulePermissionDenied | `from foundry_sdk.v2.orchestration.errors import DeleteSchedulePermissionDenied` | +**Orchestration** | GetAffectedResourcesSchedulePermissionDenied | `from foundry_sdk.v2.orchestration.errors import GetAffectedResourcesSchedulePermissionDenied` | +**Orchestration** | InvalidAndTrigger | `from foundry_sdk.v2.orchestration.errors import InvalidAndTrigger` | +**Orchestration** | InvalidMediaSetTrigger | `from foundry_sdk.v2.orchestration.errors import InvalidMediaSetTrigger` | +**Orchestration** | InvalidOrTrigger | `from foundry_sdk.v2.orchestration.errors import InvalidOrTrigger` | +**Orchestration** | InvalidScheduleDescription | `from foundry_sdk.v2.orchestration.errors import InvalidScheduleDescription` | +**Orchestration** | InvalidScheduleName | `from foundry_sdk.v2.orchestration.errors import InvalidScheduleName` | +**Orchestration** | InvalidTimeTrigger | `from foundry_sdk.v2.orchestration.errors import InvalidTimeTrigger` | +**Orchestration** | JobNotFound | `from foundry_sdk.v2.orchestration.errors import JobNotFound` | +**Orchestration** | MissingBuildTargets | `from foundry_sdk.v2.orchestration.errors import MissingBuildTargets` | +**Orchestration** | MissingConnectingBuildInputs | `from foundry_sdk.v2.orchestration.errors import MissingConnectingBuildInputs` | +**Orchestration** | MissingTrigger | `from foundry_sdk.v2.orchestration.errors import MissingTrigger` | +**Orchestration** | PauseSchedulePermissionDenied | `from foundry_sdk.v2.orchestration.errors import PauseSchedulePermissionDenied` | +**Orchestration** | ReplaceSchedulePermissionDenied | `from foundry_sdk.v2.orchestration.errors import ReplaceSchedulePermissionDenied` | +**Orchestration** | RunSchedulePermissionDenied | `from foundry_sdk.v2.orchestration.errors import RunSchedulePermissionDenied` | +**Orchestration** | ScheduleAlreadyRunning | `from foundry_sdk.v2.orchestration.errors import ScheduleAlreadyRunning` | +**Orchestration** | ScheduleNotFound | `from foundry_sdk.v2.orchestration.errors import ScheduleNotFound` | +**Orchestration** | ScheduleTriggerResourcesNotFound | `from foundry_sdk.v2.orchestration.errors import ScheduleTriggerResourcesNotFound` | +**Orchestration** | ScheduleTriggerResourcesPermissionDenied | `from foundry_sdk.v2.orchestration.errors import ScheduleTriggerResourcesPermissionDenied` | +**Orchestration** | ScheduleVersionNotFound | `from foundry_sdk.v2.orchestration.errors import ScheduleVersionNotFound` | +**Orchestration** | SearchBuildsPermissionDenied | `from foundry_sdk.v2.orchestration.errors import SearchBuildsPermissionDenied` | +**Orchestration** | TargetNotSupported | `from foundry_sdk.v2.orchestration.errors import TargetNotSupported` | +**Orchestration** | UnpauseSchedulePermissionDenied | `from foundry_sdk.v2.orchestration.errors import UnpauseSchedulePermissionDenied` | +**SqlQueries** | CancelSqlQueryPermissionDenied | `from foundry_sdk.v2.sql_queries.errors import CancelSqlQueryPermissionDenied` | +**SqlQueries** | ExecuteSqlQueryPermissionDenied | `from foundry_sdk.v2.sql_queries.errors import ExecuteSqlQueryPermissionDenied` | +**SqlQueries** | GetResultsSqlQueryPermissionDenied | `from foundry_sdk.v2.sql_queries.errors import GetResultsSqlQueryPermissionDenied` | +**SqlQueries** | GetStatusSqlQueryPermissionDenied | `from foundry_sdk.v2.sql_queries.errors import GetStatusSqlQueryPermissionDenied` | +**SqlQueries** | QueryCanceled | `from foundry_sdk.v2.sql_queries.errors import QueryCanceled` | +**SqlQueries** | QueryFailed | `from foundry_sdk.v2.sql_queries.errors import QueryFailed` | +**SqlQueries** | QueryParseError | `from foundry_sdk.v2.sql_queries.errors import QueryParseError` | +**SqlQueries** | QueryPermissionDenied | `from foundry_sdk.v2.sql_queries.errors import QueryPermissionDenied` | +**SqlQueries** | QueryRunning | `from foundry_sdk.v2.sql_queries.errors import QueryRunning` | +**SqlQueries** | ReadQueryInputsPermissionDenied | `from foundry_sdk.v2.sql_queries.errors import ReadQueryInputsPermissionDenied` | +**Streams** | CannotCreateStreamingDatasetInUserFolder | `from foundry_sdk.v2.streams.errors import CannotCreateStreamingDatasetInUserFolder` | +**Streams** | CannotWriteToTrashedStream | `from foundry_sdk.v2.streams.errors import CannotWriteToTrashedStream` | +**Streams** | CreateStreamingDatasetPermissionDenied | `from foundry_sdk.v2.streams.errors import CreateStreamingDatasetPermissionDenied` | +**Streams** | CreateStreamPermissionDenied | `from foundry_sdk.v2.streams.errors import CreateStreamPermissionDenied` | +**Streams** | FailedToProcessBinaryRecord | `from foundry_sdk.v2.streams.errors import FailedToProcessBinaryRecord` | +**Streams** | InvalidStreamNoSchema | `from foundry_sdk.v2.streams.errors import InvalidStreamNoSchema` | +**Streams** | InvalidStreamType | `from foundry_sdk.v2.streams.errors import InvalidStreamType` | +**Streams** | PublishBinaryRecordToStreamPermissionDenied | `from foundry_sdk.v2.streams.errors import PublishBinaryRecordToStreamPermissionDenied` | +**Streams** | PublishRecordsToStreamPermissionDenied | `from foundry_sdk.v2.streams.errors import PublishRecordsToStreamPermissionDenied` | +**Streams** | PublishRecordToStreamPermissionDenied | `from foundry_sdk.v2.streams.errors import PublishRecordToStreamPermissionDenied` | +**Streams** | RecordDoesNotMatchStreamSchema | `from foundry_sdk.v2.streams.errors import RecordDoesNotMatchStreamSchema` | +**Streams** | RecordTooLarge | `from foundry_sdk.v2.streams.errors import RecordTooLarge` | +**Streams** | ResetStreamPermissionDenied | `from foundry_sdk.v2.streams.errors import ResetStreamPermissionDenied` | +**Streams** | StreamNotFound | `from foundry_sdk.v2.streams.errors import StreamNotFound` | +**Streams** | ViewNotFound | `from foundry_sdk.v2.streams.errors import ViewNotFound` | +**ThirdPartyApplications** | CannotDeleteDeployedVersion | `from foundry_sdk.v2.third_party_applications.errors import CannotDeleteDeployedVersion` | +**ThirdPartyApplications** | DeleteVersionPermissionDenied | `from foundry_sdk.v2.third_party_applications.errors import DeleteVersionPermissionDenied` | +**ThirdPartyApplications** | DeployWebsitePermissionDenied | `from foundry_sdk.v2.third_party_applications.errors import DeployWebsitePermissionDenied` | +**ThirdPartyApplications** | FileCountLimitExceeded | `from foundry_sdk.v2.third_party_applications.errors import FileCountLimitExceeded` | +**ThirdPartyApplications** | FileSizeLimitExceeded | `from foundry_sdk.v2.third_party_applications.errors import FileSizeLimitExceeded` | +**ThirdPartyApplications** | InvalidVersion | `from foundry_sdk.v2.third_party_applications.errors import InvalidVersion` | +**ThirdPartyApplications** | ThirdPartyApplicationNotFound | `from foundry_sdk.v2.third_party_applications.errors import ThirdPartyApplicationNotFound` | +**ThirdPartyApplications** | UndeployWebsitePermissionDenied | `from foundry_sdk.v2.third_party_applications.errors import UndeployWebsitePermissionDenied` | +**ThirdPartyApplications** | UploadSnapshotVersionPermissionDenied | `from foundry_sdk.v2.third_party_applications.errors import UploadSnapshotVersionPermissionDenied` | +**ThirdPartyApplications** | UploadVersionPermissionDenied | `from foundry_sdk.v2.third_party_applications.errors import UploadVersionPermissionDenied` | +**ThirdPartyApplications** | VersionAlreadyExists | `from foundry_sdk.v2.third_party_applications.errors import VersionAlreadyExists` | +**ThirdPartyApplications** | VersionLimitExceeded | `from foundry_sdk.v2.third_party_applications.errors import VersionLimitExceeded` | +**ThirdPartyApplications** | VersionNotFound | `from foundry_sdk.v2.third_party_applications.errors import VersionNotFound` | +**ThirdPartyApplications** | WebsiteNotFound | `from foundry_sdk.v2.third_party_applications.errors import WebsiteNotFound` | +**Widgets** | DeleteReleasePermissionDenied | `from foundry_sdk.v2.widgets.errors import DeleteReleasePermissionDenied` | +**Widgets** | DevModeSettingsNotFound | `from foundry_sdk.v2.widgets.errors import DevModeSettingsNotFound` | +**Widgets** | DisableDevModeSettingsPermissionDenied | `from foundry_sdk.v2.widgets.errors import DisableDevModeSettingsPermissionDenied` | +**Widgets** | EnableDevModeSettingsPermissionDenied | `from foundry_sdk.v2.widgets.errors import EnableDevModeSettingsPermissionDenied` | +**Widgets** | FileCountLimitExceeded | `from foundry_sdk.v2.widgets.errors import FileCountLimitExceeded` | +**Widgets** | FileSizeLimitExceeded | `from foundry_sdk.v2.widgets.errors import FileSizeLimitExceeded` | +**Widgets** | GetDevModeSettingsPermissionDenied | `from foundry_sdk.v2.widgets.errors import GetDevModeSettingsPermissionDenied` | +**Widgets** | InvalidDevModeBaseHref | `from foundry_sdk.v2.widgets.errors import InvalidDevModeBaseHref` | +**Widgets** | InvalidDevModeEntrypointCssCount | `from foundry_sdk.v2.widgets.errors import InvalidDevModeEntrypointCssCount` | +**Widgets** | InvalidDevModeEntrypointJsCount | `from foundry_sdk.v2.widgets.errors import InvalidDevModeEntrypointJsCount` | +**Widgets** | InvalidDevModeFilePath | `from foundry_sdk.v2.widgets.errors import InvalidDevModeFilePath` | +**Widgets** | InvalidDevModeWidgetSettingsCount | `from foundry_sdk.v2.widgets.errors import InvalidDevModeWidgetSettingsCount` | +**Widgets** | InvalidEntrypointCssCount | `from foundry_sdk.v2.widgets.errors import InvalidEntrypointCssCount` | +**Widgets** | InvalidEntrypointJsCount | `from foundry_sdk.v2.widgets.errors import InvalidEntrypointJsCount` | +**Widgets** | InvalidEventCount | `from foundry_sdk.v2.widgets.errors import InvalidEventCount` | +**Widgets** | InvalidEventDisplayName | `from foundry_sdk.v2.widgets.errors import InvalidEventDisplayName` | +**Widgets** | InvalidEventId | `from foundry_sdk.v2.widgets.errors import InvalidEventId` | +**Widgets** | InvalidEventParameter | `from foundry_sdk.v2.widgets.errors import InvalidEventParameter` | +**Widgets** | InvalidEventParameterCount | `from foundry_sdk.v2.widgets.errors import InvalidEventParameterCount` | +**Widgets** | InvalidEventParameterId | `from foundry_sdk.v2.widgets.errors import InvalidEventParameterId` | +**Widgets** | InvalidEventParameterUpdateId | `from foundry_sdk.v2.widgets.errors import InvalidEventParameterUpdateId` | +**Widgets** | InvalidFilePath | `from foundry_sdk.v2.widgets.errors import InvalidFilePath` | +**Widgets** | InvalidManifest | `from foundry_sdk.v2.widgets.errors import InvalidManifest` | +**Widgets** | InvalidObjectSetEventParameterType | `from foundry_sdk.v2.widgets.errors import InvalidObjectSetEventParameterType` | +**Widgets** | InvalidObjectSetParameterType | `from foundry_sdk.v2.widgets.errors import InvalidObjectSetParameterType` | +**Widgets** | InvalidParameterCount | `from foundry_sdk.v2.widgets.errors import InvalidParameterCount` | +**Widgets** | InvalidParameterDisplayName | `from foundry_sdk.v2.widgets.errors import InvalidParameterDisplayName` | +**Widgets** | InvalidParameterId | `from foundry_sdk.v2.widgets.errors import InvalidParameterId` | +**Widgets** | InvalidPublishRepository | `from foundry_sdk.v2.widgets.errors import InvalidPublishRepository` | +**Widgets** | InvalidReleaseDescription | `from foundry_sdk.v2.widgets.errors import InvalidReleaseDescription` | +**Widgets** | InvalidReleaseWidgetsCount | `from foundry_sdk.v2.widgets.errors import InvalidReleaseWidgetsCount` | +**Widgets** | InvalidVersion | `from foundry_sdk.v2.widgets.errors import InvalidVersion` | +**Widgets** | InvalidWidgetDescription | `from foundry_sdk.v2.widgets.errors import InvalidWidgetDescription` | +**Widgets** | InvalidWidgetId | `from foundry_sdk.v2.widgets.errors import InvalidWidgetId` | +**Widgets** | InvalidWidgetName | `from foundry_sdk.v2.widgets.errors import InvalidWidgetName` | +**Widgets** | OntologySdkNotFound | `from foundry_sdk.v2.widgets.errors import OntologySdkNotFound` | +**Widgets** | PauseDevModeSettingsPermissionDenied | `from foundry_sdk.v2.widgets.errors import PauseDevModeSettingsPermissionDenied` | +**Widgets** | PublishReleasePermissionDenied | `from foundry_sdk.v2.widgets.errors import PublishReleasePermissionDenied` | +**Widgets** | ReleaseNotFound | `from foundry_sdk.v2.widgets.errors import ReleaseNotFound` | +**Widgets** | RepositoryNotFound | `from foundry_sdk.v2.widgets.errors import RepositoryNotFound` | +**Widgets** | SetWidgetSetDevModeSettingsByIdPermissionDenied | `from foundry_sdk.v2.widgets.errors import SetWidgetSetDevModeSettingsByIdPermissionDenied` | +**Widgets** | SetWidgetSetDevModeSettingsPermissionDenied | `from foundry_sdk.v2.widgets.errors import SetWidgetSetDevModeSettingsPermissionDenied` | +**Widgets** | VersionAlreadyExists | `from foundry_sdk.v2.widgets.errors import VersionAlreadyExists` | +**Widgets** | VersionLimitExceeded | `from foundry_sdk.v2.widgets.errors import VersionLimitExceeded` | +**Widgets** | WidgetIdNotFound | `from foundry_sdk.v2.widgets.errors import WidgetIdNotFound` | +**Widgets** | WidgetLimitExceeded | `from foundry_sdk.v2.widgets.errors import WidgetLimitExceeded` | +**Widgets** | WidgetSetNotFound | `from foundry_sdk.v2.widgets.errors import WidgetSetNotFound` | + +## Documentation for V1 errors + +Namespace | Name | Import | +--------- | ---- | ------ | +**Core** | ApiFeaturePreviewUsageOnly | `from foundry_sdk.v1.core.errors import ApiFeaturePreviewUsageOnly` | +**Core** | ApiUsageDenied | `from foundry_sdk.v1.core.errors import ApiUsageDenied` | +**Core** | FolderNotFound | `from foundry_sdk.v1.core.errors import FolderNotFound` | +**Core** | FoundryBranchNotFound | `from foundry_sdk.v1.core.errors import FoundryBranchNotFound` | +**Core** | InvalidFilePath | `from foundry_sdk.v1.core.errors import InvalidFilePath` | +**Core** | InvalidPageSize | `from foundry_sdk.v1.core.errors import InvalidPageSize` | +**Core** | InvalidPageToken | `from foundry_sdk.v1.core.errors import InvalidPageToken` | +**Core** | InvalidParameterCombination | `from foundry_sdk.v1.core.errors import InvalidParameterCombination` | +**Core** | MissingPostBody | `from foundry_sdk.v1.core.errors import MissingPostBody` | +**Core** | ResourceNameAlreadyExists | `from foundry_sdk.v1.core.errors import ResourceNameAlreadyExists` | +**Core** | UnknownDistanceUnit | `from foundry_sdk.v1.core.errors import UnknownDistanceUnit` | +**Datasets** | AbortTransactionPermissionDenied | `from foundry_sdk.v1.datasets.errors import AbortTransactionPermissionDenied` | +**Datasets** | BranchAlreadyExists | `from foundry_sdk.v1.datasets.errors import BranchAlreadyExists` | +**Datasets** | BranchNotFound | `from foundry_sdk.v1.datasets.errors import BranchNotFound` | +**Datasets** | ColumnTypesNotSupported | `from foundry_sdk.v1.datasets.errors import ColumnTypesNotSupported` | +**Datasets** | CommitTransactionPermissionDenied | `from foundry_sdk.v1.datasets.errors import CommitTransactionPermissionDenied` | +**Datasets** | CreateBranchPermissionDenied | `from foundry_sdk.v1.datasets.errors import CreateBranchPermissionDenied` | +**Datasets** | CreateDatasetPermissionDenied | `from foundry_sdk.v1.datasets.errors import CreateDatasetPermissionDenied` | +**Datasets** | CreateTransactionPermissionDenied | `from foundry_sdk.v1.datasets.errors import CreateTransactionPermissionDenied` | +**Datasets** | DatasetNotFound | `from foundry_sdk.v1.datasets.errors import DatasetNotFound` | +**Datasets** | DatasetReadNotSupported | `from foundry_sdk.v1.datasets.errors import DatasetReadNotSupported` | +**Datasets** | DeleteBranchPermissionDenied | `from foundry_sdk.v1.datasets.errors import DeleteBranchPermissionDenied` | +**Datasets** | DeleteSchemaPermissionDenied | `from foundry_sdk.v1.datasets.errors import DeleteSchemaPermissionDenied` | +**Datasets** | FileAlreadyExists | `from foundry_sdk.v1.datasets.errors import FileAlreadyExists` | +**Datasets** | FileNotFoundOnBranch | `from foundry_sdk.v1.datasets.errors import FileNotFoundOnBranch` | +**Datasets** | FileNotFoundOnTransactionRange | `from foundry_sdk.v1.datasets.errors import FileNotFoundOnTransactionRange` | +**Datasets** | InvalidBranchId | `from foundry_sdk.v1.datasets.errors import InvalidBranchId` | +**Datasets** | InvalidTransactionType | `from foundry_sdk.v1.datasets.errors import InvalidTransactionType` | +**Datasets** | OpenTransactionAlreadyExists | `from foundry_sdk.v1.datasets.errors import OpenTransactionAlreadyExists` | +**Datasets** | PutSchemaPermissionDenied | `from foundry_sdk.v1.datasets.errors import PutSchemaPermissionDenied` | +**Datasets** | ReadTablePermissionDenied | `from foundry_sdk.v1.datasets.errors import ReadTablePermissionDenied` | +**Datasets** | SchemaNotFound | `from foundry_sdk.v1.datasets.errors import SchemaNotFound` | +**Datasets** | TransactionNotCommitted | `from foundry_sdk.v1.datasets.errors import TransactionNotCommitted` | +**Datasets** | TransactionNotFound | `from foundry_sdk.v1.datasets.errors import TransactionNotFound` | +**Datasets** | TransactionNotOpen | `from foundry_sdk.v1.datasets.errors import TransactionNotOpen` | +**Datasets** | UploadFilePermissionDenied | `from foundry_sdk.v1.datasets.errors import UploadFilePermissionDenied` | +**Ontologies** | ActionContainsDuplicateEdits | `from foundry_sdk.v1.ontologies.errors import ActionContainsDuplicateEdits` | +**Ontologies** | ActionEditedPropertiesNotFound | `from foundry_sdk.v1.ontologies.errors import ActionEditedPropertiesNotFound` | +**Ontologies** | ActionEditsReadOnlyEntity | `from foundry_sdk.v1.ontologies.errors import ActionEditsReadOnlyEntity` | +**Ontologies** | ActionNotFound | `from foundry_sdk.v1.ontologies.errors import ActionNotFound` | +**Ontologies** | ActionParameterInterfaceTypeNotFound | `from foundry_sdk.v1.ontologies.errors import ActionParameterInterfaceTypeNotFound` | +**Ontologies** | ActionParameterObjectNotFound | `from foundry_sdk.v1.ontologies.errors import ActionParameterObjectNotFound` | +**Ontologies** | ActionParameterObjectTypeNotFound | `from foundry_sdk.v1.ontologies.errors import ActionParameterObjectTypeNotFound` | +**Ontologies** | ActionTypeNotFound | `from foundry_sdk.v1.ontologies.errors import ActionTypeNotFound` | +**Ontologies** | ActionValidationFailed | `from foundry_sdk.v1.ontologies.errors import ActionValidationFailed` | +**Ontologies** | AggregationAccuracyNotSupported | `from foundry_sdk.v1.ontologies.errors import AggregationAccuracyNotSupported` | +**Ontologies** | AggregationGroupCountExceededLimit | `from foundry_sdk.v1.ontologies.errors import AggregationGroupCountExceededLimit` | +**Ontologies** | AggregationMemoryExceededLimit | `from foundry_sdk.v1.ontologies.errors import AggregationMemoryExceededLimit` | +**Ontologies** | AggregationNestedObjectSetSizeExceededLimit | `from foundry_sdk.v1.ontologies.errors import AggregationNestedObjectSetSizeExceededLimit` | +**Ontologies** | ApplyActionFailed | `from foundry_sdk.v1.ontologies.errors import ApplyActionFailed` | +**Ontologies** | AttachmentNotFound | `from foundry_sdk.v1.ontologies.errors import AttachmentNotFound` | +**Ontologies** | AttachmentRidAlreadyExists | `from foundry_sdk.v1.ontologies.errors import AttachmentRidAlreadyExists` | +**Ontologies** | AttachmentSizeExceededLimit | `from foundry_sdk.v1.ontologies.errors import AttachmentSizeExceededLimit` | +**Ontologies** | CipherChannelNotFound | `from foundry_sdk.v1.ontologies.errors import CipherChannelNotFound` | +**Ontologies** | CompositePrimaryKeyNotSupported | `from foundry_sdk.v1.ontologies.errors import CompositePrimaryKeyNotSupported` | +**Ontologies** | ConsistentSnapshotError | `from foundry_sdk.v1.ontologies.errors import ConsistentSnapshotError` | +**Ontologies** | DefaultAndNullGroupsNotSupported | `from foundry_sdk.v1.ontologies.errors import DefaultAndNullGroupsNotSupported` | +**Ontologies** | DerivedPropertyApiNamesNotUnique | `from foundry_sdk.v1.ontologies.errors import DerivedPropertyApiNamesNotUnique` | +**Ontologies** | DuplicateOrderBy | `from foundry_sdk.v1.ontologies.errors import DuplicateOrderBy` | +**Ontologies** | EditObjectPermissionDenied | `from foundry_sdk.v1.ontologies.errors import EditObjectPermissionDenied` | +**Ontologies** | FunctionEncounteredUserFacingError | `from foundry_sdk.v1.ontologies.errors import FunctionEncounteredUserFacingError` | +**Ontologies** | FunctionExecutionFailed | `from foundry_sdk.v1.ontologies.errors import FunctionExecutionFailed` | +**Ontologies** | FunctionExecutionTimedOut | `from foundry_sdk.v1.ontologies.errors import FunctionExecutionTimedOut` | +**Ontologies** | FunctionInvalidInput | `from foundry_sdk.v1.ontologies.errors import FunctionInvalidInput` | +**Ontologies** | HighScaleComputationNotEnabled | `from foundry_sdk.v1.ontologies.errors import HighScaleComputationNotEnabled` | +**Ontologies** | InterfaceBasedObjectSetNotSupported | `from foundry_sdk.v1.ontologies.errors import InterfaceBasedObjectSetNotSupported` | +**Ontologies** | InterfaceLinkTypeNotFound | `from foundry_sdk.v1.ontologies.errors import InterfaceLinkTypeNotFound` | +**Ontologies** | InterfacePropertiesHaveDifferentIds | `from foundry_sdk.v1.ontologies.errors import InterfacePropertiesHaveDifferentIds` | +**Ontologies** | InterfacePropertiesNotFound | `from foundry_sdk.v1.ontologies.errors import InterfacePropertiesNotFound` | +**Ontologies** | InterfacePropertyNotFound | `from foundry_sdk.v1.ontologies.errors import InterfacePropertyNotFound` | +**Ontologies** | InterfaceTypeNotFound | `from foundry_sdk.v1.ontologies.errors import InterfaceTypeNotFound` | +**Ontologies** | InterfaceTypesNotFound | `from foundry_sdk.v1.ontologies.errors import InterfaceTypesNotFound` | +**Ontologies** | InvalidAggregationOrdering | `from foundry_sdk.v1.ontologies.errors import InvalidAggregationOrdering` | +**Ontologies** | InvalidAggregationOrderingWithNullValues | `from foundry_sdk.v1.ontologies.errors import InvalidAggregationOrderingWithNullValues` | +**Ontologies** | InvalidAggregationRange | `from foundry_sdk.v1.ontologies.errors import InvalidAggregationRange` | +**Ontologies** | InvalidAggregationRangePropertyType | `from foundry_sdk.v1.ontologies.errors import InvalidAggregationRangePropertyType` | +**Ontologies** | InvalidAggregationRangePropertyTypeForInterface | `from foundry_sdk.v1.ontologies.errors import InvalidAggregationRangePropertyTypeForInterface` | +**Ontologies** | InvalidAggregationRangeValue | `from foundry_sdk.v1.ontologies.errors import InvalidAggregationRangeValue` | +**Ontologies** | InvalidAggregationRangeValueForInterface | `from foundry_sdk.v1.ontologies.errors import InvalidAggregationRangeValueForInterface` | +**Ontologies** | InvalidApplyActionOptionCombination | `from foundry_sdk.v1.ontologies.errors import InvalidApplyActionOptionCombination` | +**Ontologies** | InvalidContentLength | `from foundry_sdk.v1.ontologies.errors import InvalidContentLength` | +**Ontologies** | InvalidContentType | `from foundry_sdk.v1.ontologies.errors import InvalidContentType` | +**Ontologies** | InvalidDerivedPropertyDefinition | `from foundry_sdk.v1.ontologies.errors import InvalidDerivedPropertyDefinition` | +**Ontologies** | InvalidDurationGroupByPropertyType | `from foundry_sdk.v1.ontologies.errors import InvalidDurationGroupByPropertyType` | +**Ontologies** | InvalidDurationGroupByPropertyTypeForInterface | `from foundry_sdk.v1.ontologies.errors import InvalidDurationGroupByPropertyTypeForInterface` | +**Ontologies** | InvalidDurationGroupByValue | `from foundry_sdk.v1.ontologies.errors import InvalidDurationGroupByValue` | +**Ontologies** | InvalidFields | `from foundry_sdk.v1.ontologies.errors import InvalidFields` | +**Ontologies** | InvalidGroupId | `from foundry_sdk.v1.ontologies.errors import InvalidGroupId` | +**Ontologies** | InvalidOrderType | `from foundry_sdk.v1.ontologies.errors import InvalidOrderType` | +**Ontologies** | InvalidParameterValue | `from foundry_sdk.v1.ontologies.errors import InvalidParameterValue` | +**Ontologies** | InvalidPropertyFiltersCombination | `from foundry_sdk.v1.ontologies.errors import InvalidPropertyFiltersCombination` | +**Ontologies** | InvalidPropertyFilterValue | `from foundry_sdk.v1.ontologies.errors import InvalidPropertyFilterValue` | +**Ontologies** | InvalidPropertyType | `from foundry_sdk.v1.ontologies.errors import InvalidPropertyType` | +**Ontologies** | InvalidPropertyValue | `from foundry_sdk.v1.ontologies.errors import InvalidPropertyValue` | +**Ontologies** | InvalidQueryOutputValue | `from foundry_sdk.v1.ontologies.errors import InvalidQueryOutputValue` | +**Ontologies** | InvalidQueryParameterValue | `from foundry_sdk.v1.ontologies.errors import InvalidQueryParameterValue` | +**Ontologies** | InvalidRangeQuery | `from foundry_sdk.v1.ontologies.errors import InvalidRangeQuery` | +**Ontologies** | InvalidSortOrder | `from foundry_sdk.v1.ontologies.errors import InvalidSortOrder` | +**Ontologies** | InvalidSortType | `from foundry_sdk.v1.ontologies.errors import InvalidSortType` | +**Ontologies** | InvalidTransactionEditPropertyValue | `from foundry_sdk.v1.ontologies.errors import InvalidTransactionEditPropertyValue` | +**Ontologies** | InvalidUserId | `from foundry_sdk.v1.ontologies.errors import InvalidUserId` | +**Ontologies** | InvalidVectorDimension | `from foundry_sdk.v1.ontologies.errors import InvalidVectorDimension` | +**Ontologies** | LinkAlreadyExists | `from foundry_sdk.v1.ontologies.errors import LinkAlreadyExists` | +**Ontologies** | LinkedObjectNotFound | `from foundry_sdk.v1.ontologies.errors import LinkedObjectNotFound` | +**Ontologies** | LinkTypeNotFound | `from foundry_sdk.v1.ontologies.errors import LinkTypeNotFound` | +**Ontologies** | LoadObjectSetLinksNotSupported | `from foundry_sdk.v1.ontologies.errors import LoadObjectSetLinksNotSupported` | +**Ontologies** | MalformedPropertyFilters | `from foundry_sdk.v1.ontologies.errors import MalformedPropertyFilters` | +**Ontologies** | MarketplaceActionMappingNotFound | `from foundry_sdk.v1.ontologies.errors import MarketplaceActionMappingNotFound` | +**Ontologies** | MarketplaceInstallationNotFound | `from foundry_sdk.v1.ontologies.errors import MarketplaceInstallationNotFound` | +**Ontologies** | MarketplaceLinkMappingNotFound | `from foundry_sdk.v1.ontologies.errors import MarketplaceLinkMappingNotFound` | +**Ontologies** | MarketplaceObjectMappingNotFound | `from foundry_sdk.v1.ontologies.errors import MarketplaceObjectMappingNotFound` | +**Ontologies** | MarketplaceQueryMappingNotFound | `from foundry_sdk.v1.ontologies.errors import MarketplaceQueryMappingNotFound` | +**Ontologies** | MarketplaceSdkActionMappingNotFound | `from foundry_sdk.v1.ontologies.errors import MarketplaceSdkActionMappingNotFound` | +**Ontologies** | MarketplaceSdkInstallationNotFound | `from foundry_sdk.v1.ontologies.errors import MarketplaceSdkInstallationNotFound` | +**Ontologies** | MarketplaceSdkLinkMappingNotFound | `from foundry_sdk.v1.ontologies.errors import MarketplaceSdkLinkMappingNotFound` | +**Ontologies** | MarketplaceSdkObjectMappingNotFound | `from foundry_sdk.v1.ontologies.errors import MarketplaceSdkObjectMappingNotFound` | +**Ontologies** | MarketplaceSdkPropertyMappingNotFound | `from foundry_sdk.v1.ontologies.errors import MarketplaceSdkPropertyMappingNotFound` | +**Ontologies** | MarketplaceSdkQueryMappingNotFound | `from foundry_sdk.v1.ontologies.errors import MarketplaceSdkQueryMappingNotFound` | +**Ontologies** | MissingParameter | `from foundry_sdk.v1.ontologies.errors import MissingParameter` | +**Ontologies** | MultipleGroupByOnFieldNotSupported | `from foundry_sdk.v1.ontologies.errors import MultipleGroupByOnFieldNotSupported` | +**Ontologies** | MultiplePropertyValuesNotSupported | `from foundry_sdk.v1.ontologies.errors import MultiplePropertyValuesNotSupported` | +**Ontologies** | NotCipherFormatted | `from foundry_sdk.v1.ontologies.errors import NotCipherFormatted` | +**Ontologies** | ObjectAlreadyExists | `from foundry_sdk.v1.ontologies.errors import ObjectAlreadyExists` | +**Ontologies** | ObjectChanged | `from foundry_sdk.v1.ontologies.errors import ObjectChanged` | +**Ontologies** | ObjectNotFound | `from foundry_sdk.v1.ontologies.errors import ObjectNotFound` | +**Ontologies** | ObjectSetNotFound | `from foundry_sdk.v1.ontologies.errors import ObjectSetNotFound` | +**Ontologies** | ObjectsExceededLimit | `from foundry_sdk.v1.ontologies.errors import ObjectsExceededLimit` | +**Ontologies** | ObjectsModifiedConcurrently | `from foundry_sdk.v1.ontologies.errors import ObjectsModifiedConcurrently` | +**Ontologies** | ObjectTypeNotFound | `from foundry_sdk.v1.ontologies.errors import ObjectTypeNotFound` | +**Ontologies** | ObjectTypeNotSynced | `from foundry_sdk.v1.ontologies.errors import ObjectTypeNotSynced` | +**Ontologies** | ObjectTypesNotSynced | `from foundry_sdk.v1.ontologies.errors import ObjectTypesNotSynced` | +**Ontologies** | OntologyApiNameNotUnique | `from foundry_sdk.v1.ontologies.errors import OntologyApiNameNotUnique` | +**Ontologies** | OntologyEditsExceededLimit | `from foundry_sdk.v1.ontologies.errors import OntologyEditsExceededLimit` | +**Ontologies** | OntologyNotFound | `from foundry_sdk.v1.ontologies.errors import OntologyNotFound` | +**Ontologies** | OntologySyncing | `from foundry_sdk.v1.ontologies.errors import OntologySyncing` | +**Ontologies** | OntologySyncingObjectTypes | `from foundry_sdk.v1.ontologies.errors import OntologySyncingObjectTypes` | +**Ontologies** | ParameterObjectNotFound | `from foundry_sdk.v1.ontologies.errors import ParameterObjectNotFound` | +**Ontologies** | ParameterObjectSetRidNotFound | `from foundry_sdk.v1.ontologies.errors import ParameterObjectSetRidNotFound` | +**Ontologies** | ParametersNotFound | `from foundry_sdk.v1.ontologies.errors import ParametersNotFound` | +**Ontologies** | ParameterTypeNotSupported | `from foundry_sdk.v1.ontologies.errors import ParameterTypeNotSupported` | +**Ontologies** | ParentAttachmentPermissionDenied | `from foundry_sdk.v1.ontologies.errors import ParentAttachmentPermissionDenied` | +**Ontologies** | PropertiesHaveDifferentIds | `from foundry_sdk.v1.ontologies.errors import PropertiesHaveDifferentIds` | +**Ontologies** | PropertiesNotFilterable | `from foundry_sdk.v1.ontologies.errors import PropertiesNotFilterable` | +**Ontologies** | PropertiesNotFound | `from foundry_sdk.v1.ontologies.errors import PropertiesNotFound` | +**Ontologies** | PropertiesNotSearchable | `from foundry_sdk.v1.ontologies.errors import PropertiesNotSearchable` | +**Ontologies** | PropertiesNotSortable | `from foundry_sdk.v1.ontologies.errors import PropertiesNotSortable` | +**Ontologies** | PropertyApiNameNotFound | `from foundry_sdk.v1.ontologies.errors import PropertyApiNameNotFound` | +**Ontologies** | PropertyBaseTypeNotSupported | `from foundry_sdk.v1.ontologies.errors import PropertyBaseTypeNotSupported` | +**Ontologies** | PropertyExactMatchingNotSupported | `from foundry_sdk.v1.ontologies.errors import PropertyExactMatchingNotSupported` | +**Ontologies** | PropertyFiltersNotSupported | `from foundry_sdk.v1.ontologies.errors import PropertyFiltersNotSupported` | +**Ontologies** | PropertyNotFound | `from foundry_sdk.v1.ontologies.errors import PropertyNotFound` | +**Ontologies** | PropertyNotFoundOnObject | `from foundry_sdk.v1.ontologies.errors import PropertyNotFoundOnObject` | +**Ontologies** | PropertyTypeDoesNotSupportNearestNeighbors | `from foundry_sdk.v1.ontologies.errors import PropertyTypeDoesNotSupportNearestNeighbors` | +**Ontologies** | PropertyTypeNotFound | `from foundry_sdk.v1.ontologies.errors import PropertyTypeNotFound` | +**Ontologies** | PropertyTypeRidNotFound | `from foundry_sdk.v1.ontologies.errors import PropertyTypeRidNotFound` | +**Ontologies** | PropertyTypesSearchNotSupported | `from foundry_sdk.v1.ontologies.errors import PropertyTypesSearchNotSupported` | +**Ontologies** | QueryEncounteredUserFacingError | `from foundry_sdk.v1.ontologies.errors import QueryEncounteredUserFacingError` | +**Ontologies** | QueryMemoryExceededLimit | `from foundry_sdk.v1.ontologies.errors import QueryMemoryExceededLimit` | +**Ontologies** | QueryNotFound | `from foundry_sdk.v1.ontologies.errors import QueryNotFound` | +**Ontologies** | QueryRuntimeError | `from foundry_sdk.v1.ontologies.errors import QueryRuntimeError` | +**Ontologies** | QueryTimeExceededLimit | `from foundry_sdk.v1.ontologies.errors import QueryTimeExceededLimit` | +**Ontologies** | QueryVersionNotFound | `from foundry_sdk.v1.ontologies.errors import QueryVersionNotFound` | +**Ontologies** | RateLimitReached | `from foundry_sdk.v1.ontologies.errors import RateLimitReached` | +**Ontologies** | SharedPropertiesNotFound | `from foundry_sdk.v1.ontologies.errors import SharedPropertiesNotFound` | +**Ontologies** | SharedPropertyTypeNotFound | `from foundry_sdk.v1.ontologies.errors import SharedPropertyTypeNotFound` | +**Ontologies** | SimilarityThresholdOutOfRange | `from foundry_sdk.v1.ontologies.errors import SimilarityThresholdOutOfRange` | +**Ontologies** | TooManyNearestNeighborsRequested | `from foundry_sdk.v1.ontologies.errors import TooManyNearestNeighborsRequested` | +**Ontologies** | UnauthorizedCipherOperation | `from foundry_sdk.v1.ontologies.errors import UnauthorizedCipherOperation` | +**Ontologies** | UndecryptableValue | `from foundry_sdk.v1.ontologies.errors import UndecryptableValue` | +**Ontologies** | UniqueIdentifierLinkIdsDoNotExistInActionType | `from foundry_sdk.v1.ontologies.errors import UniqueIdentifierLinkIdsDoNotExistInActionType` | +**Ontologies** | UnknownParameter | `from foundry_sdk.v1.ontologies.errors import UnknownParameter` | +**Ontologies** | UnsupportedInterfaceBasedObjectSet | `from foundry_sdk.v1.ontologies.errors import UnsupportedInterfaceBasedObjectSet` | +**Ontologies** | UnsupportedObjectSet | `from foundry_sdk.v1.ontologies.errors import UnsupportedObjectSet` | +**Ontologies** | ValueTypeNotFound | `from foundry_sdk.v1.ontologies.errors import ValueTypeNotFound` | +**Ontologies** | ViewObjectPermissionDenied | `from foundry_sdk.v1.ontologies.errors import ViewObjectPermissionDenied` | + + +## Contributions + +This repository does not accept code contributions. + +If you have any questions, concerns, or ideas for improvements, create an +issue with Palantir Support. + +## License +This project is made available under the [Apache 2.0 License](/LICENSE). diff --git a/docs-snippets-npm/.gitignore b/docs-snippets-npm/.gitignore new file mode 100644 index 000000000..8da1fcd74 --- /dev/null +++ b/docs-snippets-npm/.gitignore @@ -0,0 +1,20 @@ +node_modules +dist + +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +lerna-debug.log* +.pnpm-debug.log* + +# Diagnostic reports (https://nodejs.org/api/report.html) +report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json + +# Runtime data +pids +*.pid +*.seed +*.pid.lock diff --git a/docs-snippets-npm/package.json b/docs-snippets-npm/package.json new file mode 100644 index 000000000..16cac5570 --- /dev/null +++ b/docs-snippets-npm/package.json @@ -0,0 +1,33 @@ +{ + "name": "@osdk/python-platform-docs", + "version": "0.0.0", + "main": "dist/index.js", + "scripts": { + "build": "tsc --build" + }, + "files": [ + "dist" + ], + "repository": { + "type": "git", + "url": "git+https://github.com/palantir/foundry-platform-python.git" + }, + "bugs": { + "url": "https://github.com/palantir/foundry-platform-python/issues" + }, + "homepage": "https://github.com/palantir/foundry-platform-python#readme", + "devDependencies": { + "@osdk/docs-spec-core": "^0.5.0", + "@osdk/docs-spec-platform": "^0.8.0", + "typescript": "^5.8.3" + }, + "sls": { + "dependencies": { + "com.palantir.foundry.api:api-gateway": { + "minVersion": "1.1416.1", + "maxVersion": "1.x.x", + "optional": false + } + } + } +} diff --git a/docs-snippets-npm/src/index.ts b/docs-snippets-npm/src/index.ts new file mode 100644 index 000000000..8ef7ac4c3 --- /dev/null +++ b/docs-snippets-npm/src/index.ts @@ -0,0 +1,1739 @@ +/** + * Copyright 2024 Palantir Technologies, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +import type { SdkSnippets } from "@osdk/docs-spec-core"; +import type { PLATFORM_API_DOCS_SPEC } from "@osdk/docs-spec-platform"; + +export const PYTHON_PLATFORM_SNIPPETS: SdkSnippets = { + "kind": "sdk", + "versions": { + "1.0.0": { + "snippets": { + "v1.createBranch": [ + { + "template": "from foundry_sdk.v1 import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid | The Resource Identifier (RID) of the Dataset on which to create the Branch.\ndataset_rid = \"ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da\"\n# BranchId\nbranch_id = \"my-branch\"\n# Optional[TransactionRid]\ntransaction_rid = None\n\n\ntry:\n api_response = client.datasets.Dataset.Branch.create(\n dataset_rid, branch_id=branch_id, transaction_rid=transaction_rid\n )\n print(\"The create response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Branch.create: %s\\n\" % e)" + } + ], + "v1.deleteBranch": [ + { + "template": "from foundry_sdk.v1 import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid | The Resource Identifier (RID) of the Dataset that contains the Branch.\ndataset_rid = \"ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da\"\n# BranchId | The identifier (name) of the Branch.\nbranch_id = \"my-branch\"\n\n\ntry:\n api_response = client.datasets.Dataset.Branch.delete(dataset_rid, branch_id)\n print(\"The delete response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Branch.delete: %s\\n\" % e)" + } + ], + "v1.getBranch": [ + { + "template": "from foundry_sdk.v1 import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid | The Resource Identifier (RID) of the Dataset that contains the Branch.\ndataset_rid = \"ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da\"\n# BranchId | The identifier (name) of the Branch.\nbranch_id = \"master\"\n\n\ntry:\n api_response = client.datasets.Dataset.Branch.get(dataset_rid, branch_id)\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Branch.get: %s\\n\" % e)" + } + ], + "v1.listBranches": [ + { + "template": "from foundry_sdk.v1 import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid | The Resource Identifier (RID) of the Dataset on which to list Branches.\ndataset_rid = \"ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da\"\n# Optional[PageSize] | The desired size of the page to be returned. Defaults to 1,000. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details.\npage_size = None\n# Optional[PageToken]\npage_token = None\n\n\ntry:\n for branch in client.datasets.Dataset.Branch.list(\n dataset_rid, page_size=page_size, page_token=page_token\n ):\n pprint(branch)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Branch.list: %s\\n\" % e)" + } + ], + "v1.createDataset": [ + { + "template": "from foundry_sdk.v1 import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetName\nname = \"My Dataset\"\n# FolderRid\nparent_folder_rid = \"ri.foundry.main.folder.bfe58487-4c56-4c58-aba7-25defd6163c4\"\n\n\ntry:\n api_response = client.datasets.Dataset.create(name=name, parent_folder_rid=parent_folder_rid)\n print(\"The create response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Dataset.create: %s\\n\" % e)" + } + ], + "v1.deleteSchema": [ + { + "template": "from foundry_sdk.v1 import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid | The RID of the Dataset on which to delete the schema.\ndataset_rid = None\n# Optional[BranchId] | The ID of the Branch on which to delete the schema.\nbranch_id = None\n# Optional[PreviewMode]\npreview = True\n# Optional[TransactionRid] | The RID of the Transaction on which to delete the schema.\ntransaction_rid = None\n\n\ntry:\n api_response = client.datasets.Dataset.delete_schema(\n dataset_rid, branch_id=branch_id, preview=preview, transaction_rid=transaction_rid\n )\n print(\"The delete_schema response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Dataset.delete_schema: %s\\n\" % e)" + } + ], + "v1.getDataset": [ + { + "template": "from foundry_sdk.v1 import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid\ndataset_rid = \"ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da\"\n\n\ntry:\n api_response = client.datasets.Dataset.get(dataset_rid)\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Dataset.get: %s\\n\" % e)" + } + ], + "v1.getSchema": [ + { + "template": "from foundry_sdk.v1 import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid | The RID of the Dataset.\ndataset_rid = None\n# Optional[BranchId] | The ID of the Branch.\nbranch_id = None\n# Optional[PreviewMode]\npreview = True\n# Optional[TransactionRid] | The TransactionRid that contains the Schema.\ntransaction_rid = None\n\n\ntry:\n api_response = client.datasets.Dataset.get_schema(\n dataset_rid, branch_id=branch_id, preview=preview, transaction_rid=transaction_rid\n )\n print(\"The get_schema response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Dataset.get_schema: %s\\n\" % e)" + } + ], + "v1.readTable": [ + { + "template": "from foundry_sdk.v1 import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid | The RID of the Dataset.\ndataset_rid = None\n# TableExportFormat | The export format. Must be `ARROW` or `CSV`.\nformat = \"CSV\"\n# Optional[BranchId] | The identifier (name) of the Branch.\nbranch_id = None\n# Optional[List[str]] | A subset of the dataset columns to include in the result. Defaults to all columns.\ncolumns = None\n# Optional[TransactionRid] | The Resource Identifier (RID) of the end Transaction.\nend_transaction_rid = None\n# Optional[int] | A limit on the number of rows to return. Note that row ordering is non-deterministic.\nrow_limit = None\n# Optional[TransactionRid] | The Resource Identifier (RID) of the start Transaction.\nstart_transaction_rid = None\n\n\ntry:\n api_response = client.datasets.Dataset.read(\n dataset_rid,\n format=format,\n branch_id=branch_id,\n columns=columns,\n end_transaction_rid=end_transaction_rid,\n row_limit=row_limit,\n start_transaction_rid=start_transaction_rid,\n )\n print(\"The read response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Dataset.read: %s\\n\" % e)" + } + ], + "v1.putSchema": [ + { + "template": "from foundry_sdk.v1 import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid | The RID of the Dataset on which to put the Schema.\ndataset_rid = None\n# Any | Body of the request\nbody = None\n# Optional[BranchId] | The ID of the Branch on which to put the Schema.\nbranch_id = None\n# Optional[PreviewMode]\npreview = True\n\n\ntry:\n api_response = client.datasets.Dataset.replace_schema(\n dataset_rid, body, branch_id=branch_id, preview=preview\n )\n print(\"The replace_schema response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Dataset.replace_schema: %s\\n\" % e)" + } + ], + "v1.deleteFile": [ + { + "template": "from foundry_sdk.v1 import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid | The Resource Identifier (RID) of the Dataset on which to delete the File.\ndataset_rid = \"ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da\"\n# FilePath | The File path within the Dataset.\nfile_path = \"q3-data%2fmy-file.csv\"\n# Optional[BranchId] | The identifier (name) of the Branch on which to delete the File. Defaults to `master` for most enrollments.\nbranch_id = None\n# Optional[TransactionRid] | The Resource Identifier (RID) of the open delete Transaction on which to delete the File.\ntransaction_rid = None\n\n\ntry:\n api_response = client.datasets.Dataset.File.delete(\n dataset_rid, file_path, branch_id=branch_id, transaction_rid=transaction_rid\n )\n print(\"The delete response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling File.delete: %s\\n\" % e)" + } + ], + "v1.getFileMetadata": [ + { + "template": "from foundry_sdk.v1 import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid | The Resource Identifier (RID) of the Dataset that contains the File.\ndataset_rid = \"ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da\"\n# FilePath | The File's path within the Dataset.\nfile_path = \"q3-data%2fmy-file.csv\"\n# Optional[BranchId] | The identifier (name) of the Branch that contains the File. Defaults to `master` for most enrollments.\nbranch_id = None\n# Optional[TransactionRid] | The Resource Identifier (RID) of the end Transaction.\nend_transaction_rid = None\n# Optional[TransactionRid] | The Resource Identifier (RID) of the start Transaction.\nstart_transaction_rid = None\n\n\ntry:\n api_response = client.datasets.Dataset.File.get(\n dataset_rid,\n file_path,\n branch_id=branch_id,\n end_transaction_rid=end_transaction_rid,\n start_transaction_rid=start_transaction_rid,\n )\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling File.get: %s\\n\" % e)" + } + ], + "v1.listFiles": [ + { + "template": "from foundry_sdk.v1 import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid | The Resource Identifier (RID) of the Dataset on which to list Files.\ndataset_rid = None\n# Optional[BranchId] | The identifier (name) of the Branch on which to list Files. Defaults to `master` for most enrollments.\nbranch_id = None\n# Optional[TransactionRid] | The Resource Identifier (RID) of the end Transaction.\nend_transaction_rid = None\n# Optional[PageSize] | The desired size of the page to be returned. Defaults to 1,000. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details.\npage_size = None\n# Optional[PageToken]\npage_token = None\n# Optional[TransactionRid] | The Resource Identifier (RID) of the start Transaction.\nstart_transaction_rid = None\n\n\ntry:\n for file in client.datasets.Dataset.File.list(\n dataset_rid,\n branch_id=branch_id,\n end_transaction_rid=end_transaction_rid,\n page_size=page_size,\n page_token=page_token,\n start_transaction_rid=start_transaction_rid,\n ):\n pprint(file)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling File.list: %s\\n\" % e)" + } + ], + "v1.getFileContent": [ + { + "template": "from foundry_sdk.v1 import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid | The Resource Identifier (RID) of the Dataset that contains the File.\ndataset_rid = None\n# FilePath | The File's path within the Dataset.\nfile_path = \"q3-data%2fmy-file.csv\"\n# Optional[BranchId] | The identifier (name) of the Branch that contains the File. Defaults to `master` for most enrollments.\nbranch_id = None\n# Optional[TransactionRid] | The Resource Identifier (RID) of the end Transaction.\nend_transaction_rid = None\n# Optional[TransactionRid] | The Resource Identifier (RID) of the start Transaction.\nstart_transaction_rid = None\n\n\ntry:\n api_response = client.datasets.Dataset.File.read(\n dataset_rid,\n file_path,\n branch_id=branch_id,\n end_transaction_rid=end_transaction_rid,\n start_transaction_rid=start_transaction_rid,\n )\n print(\"The read response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling File.read: %s\\n\" % e)" + } + ], + "v1.uploadFile": [ + { + "template": "from foundry_sdk.v1 import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid | The Resource Identifier (RID) of the Dataset on which to upload the File.\ndataset_rid = None\n# bytes | Body of the request\nbody = None\n# FilePath | The File's path within the Dataset.\nfile_path = \"q3-data%2fmy-file.csv\"\n# Optional[BranchId] | The identifier (name) of the Branch on which to upload the File. Defaults to `master` for most enrollments.\nbranch_id = None\n# Optional[TransactionRid] | The Resource Identifier (RID) of the open Transaction on which to upload the File.\ntransaction_rid = None\n# Optional[TransactionType] | The type of the Transaction to create when using branchId. Defaults to `UPDATE`.\ntransaction_type = None\n\n\ntry:\n api_response = client.datasets.Dataset.File.upload(\n dataset_rid,\n body,\n file_path=file_path,\n branch_id=branch_id,\n transaction_rid=transaction_rid,\n transaction_type=transaction_type,\n )\n print(\"The upload response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling File.upload: %s\\n\" % e)" + } + ], + "v1.abortTransaction": [ + { + "template": "from foundry_sdk.v1 import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid | The Resource Identifier (RID) of the Dataset that contains the Transaction.\ndataset_rid = \"ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da\"\n# TransactionRid | The Resource Identifier (RID) of the Transaction.\ntransaction_rid = \"ri.foundry.main.transaction.abffc380-ea68-4843-9be1-9f44d2565496\"\n\n\ntry:\n api_response = client.datasets.Dataset.Transaction.abort(dataset_rid, transaction_rid)\n print(\"The abort response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Transaction.abort: %s\\n\" % e)" + } + ], + "v1.commitTransaction": [ + { + "template": "from foundry_sdk.v1 import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid | The Resource Identifier (RID) of the Dataset that contains the Transaction.\ndataset_rid = \"ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da\"\n# TransactionRid | The Resource Identifier (RID) of the Transaction.\ntransaction_rid = \"ri.foundry.main.transaction.abffc380-ea68-4843-9be1-9f44d2565496\"\n\n\ntry:\n api_response = client.datasets.Dataset.Transaction.commit(dataset_rid, transaction_rid)\n print(\"The commit response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Transaction.commit: %s\\n\" % e)" + } + ], + "v1.createTransaction": [ + { + "template": "from foundry_sdk.v1 import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid | The Resource Identifier (RID) of the Dataset on which to create the Transaction.\ndataset_rid = \"ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da\"\n# Optional[BranchId] | The identifier (name) of the Branch on which to create the Transaction. Defaults to `master` for most enrollments.\nbranch_id = None\n# Optional[TransactionType]\ntransaction_type = \"SNAPSHOT\"\n\n\ntry:\n api_response = client.datasets.Dataset.Transaction.create(\n dataset_rid, branch_id=branch_id, transaction_type=transaction_type\n )\n print(\"The create response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Transaction.create: %s\\n\" % e)" + } + ], + "v1.getTransaction": [ + { + "template": "from foundry_sdk.v1 import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid | The Resource Identifier (RID) of the Dataset that contains the Transaction.\ndataset_rid = \"ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da\"\n# TransactionRid | The Resource Identifier (RID) of the Transaction.\ntransaction_rid = \"ri.foundry.main.transaction.abffc380-ea68-4843-9be1-9f44d2565496\"\n\n\ntry:\n api_response = client.datasets.Dataset.Transaction.get(dataset_rid, transaction_rid)\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Transaction.get: %s\\n\" % e)" + } + ], + "v1.applyAction": [ + { + "template": "from foundry_sdk.v1 import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the action. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**.\nontology_rid = \"ri.ontology.main.ontology.c61d9ab5-2919-4127-a0a1-ac64c0ce6367\"\n# ActionTypeApiName | The API name of the action to apply. To find the API name for your action, use the **List action types** endpoint or check the **Ontology Manager**.\naction_type = \"rename-employee\"\n# Dict[ParameterId, Optional[DataValue]]\nparameters = {\"id\": 80060, \"newName\": \"Anna Smith-Doe\"}\n\n\ntry:\n api_response = client.ontologies.Action.apply(ontology_rid, action_type, parameters=parameters)\n print(\"The apply response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Action.apply: %s\\n\" % e)" + } + ], + "v1.applyActionBatch": [ + { + "template": "from foundry_sdk.v1 import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the action. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**.\nontology_rid = \"ri.ontology.main.ontology.c61d9ab5-2919-4127-a0a1-ac64c0ce6367\"\n# ActionTypeApiName | The API name of the action to apply. To find the API name for your action, use the **List action types** endpoint or check the **Ontology Manager**.\naction_type = \"rename-employee\"\n# List[ApplyActionRequest]\nrequests = [\n {\"parameters\": {\"id\": 80060, \"newName\": \"Anna Smith-Doe\"}},\n {\"parameters\": {\"id\": 80061, \"newName\": \"Joe Bloggs\"}},\n]\n\n\ntry:\n api_response = client.ontologies.Action.apply_batch(\n ontology_rid, action_type, requests=requests\n )\n print(\"The apply_batch response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Action.apply_batch: %s\\n\" % e)" + } + ], + "v1.validateAction": [ + { + "template": "from foundry_sdk.v1 import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the action. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**.\nontology_rid = \"ri.ontology.main.ontology.c61d9ab5-2919-4127-a0a1-ac64c0ce6367\"\n# ActionTypeApiName | The API name of the action to validate. To find the API name for your action, use the **List action types** endpoint or check the **Ontology Manager**.\naction_type = \"rename-employee\"\n# Dict[ParameterId, Optional[DataValue]]\nparameters = {\n \"id\": \"2\",\n \"firstName\": \"Chuck\",\n \"lastName\": \"Jones\",\n \"age\": 17,\n \"date\": \"2021-05-01\",\n \"numbers\": [1, 2, 3],\n \"hasObjectSet\": True,\n \"objectSet\": \"ri.object-set.main.object-set.39a9f4bd-f77e-45ce-9772-70f25852f623\",\n \"reference\": \"Chuck\",\n \"percentage\": 41.3,\n \"differentObjectId\": \"2\",\n}\n\n\ntry:\n api_response = client.ontologies.Action.validate(\n ontology_rid, action_type, parameters=parameters\n )\n print(\"The validate response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Action.validate: %s\\n\" % e)" + } + ], + "v1.getActionType": [ + { + "template": "from foundry_sdk.v1 import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the action type.\nontology_rid = \"ri.ontology.main.ontology.c61d9ab5-2919-4127-a0a1-ac64c0ce6367\"\n# ActionTypeApiName | The name of the action type in the API.\naction_type_api_name = \"promote-employee\"\n\n\ntry:\n api_response = client.ontologies.Ontology.ActionType.get(ontology_rid, action_type_api_name)\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling ActionType.get: %s\\n\" % e)" + } + ], + "v1.listActionTypes": [ + { + "template": "from foundry_sdk.v1 import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the action types. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**.\nontology_rid = \"ri.ontology.main.ontology.c61d9ab5-2919-4127-a0a1-ac64c0ce6367\"\n# Optional[PageSize] | The desired size of the page to be returned. Defaults to 500. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details.\npage_size = None\n# Optional[PageToken]\npage_token = None\n\n\ntry:\n for action_type in client.ontologies.Ontology.ActionType.list(\n ontology_rid, page_size=page_size, page_token=page_token\n ):\n pprint(action_type)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling ActionType.list: %s\\n\" % e)" + } + ], + "v1.getAttachment": [ + { + "template": "from foundry_sdk.v1 import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# AttachmentRid | The RID of the attachment.\nattachment_rid = \"ri.attachments.main.attachment.bb32154e-e043-4b00-9461-93136ca96b6f\"\n\n\ntry:\n api_response = client.ontologies.Attachment.get(attachment_rid)\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Attachment.get: %s\\n\" % e)" + } + ], + "v1.getAttachmentContent": [ + { + "template": "from foundry_sdk.v1 import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# AttachmentRid | The RID of the attachment.\nattachment_rid = \"ri.attachments.main.attachment.bb32154e-e043-4b00-9461-93136ca96b6f\"\n\n\ntry:\n api_response = client.ontologies.Attachment.read(attachment_rid)\n print(\"The read response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Attachment.read: %s\\n\" % e)" + } + ], + "v1.uploadAttachment": [ + { + "template": "from foundry_sdk.v1 import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# bytes | Body of the request\nbody = None\n# ContentLength | The size in bytes of the file content being uploaded.\ncontent_length = None\n# ContentType | The media type of the file being uploaded.\ncontent_type = None\n# Filename | The name of the file being uploaded.\nfilename = \"My Image.jpeg\"\n\n\ntry:\n api_response = client.ontologies.Attachment.upload(\n body, content_length=content_length, content_type=content_type, filename=filename\n )\n print(\"The upload response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Attachment.upload: %s\\n\" % e)" + } + ], + "v1.getObjectType": [ + { + "template": "from foundry_sdk.v1 import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the object type. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**.\nontology_rid = \"ri.ontology.main.ontology.c61d9ab5-2919-4127-a0a1-ac64c0ce6367\"\n# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**.\nobject_type = \"employee\"\n\n\ntry:\n api_response = client.ontologies.Ontology.ObjectType.get(ontology_rid, object_type)\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling ObjectType.get: %s\\n\" % e)" + } + ], + "v1.getOutgoingLinkType": [ + { + "template": "from foundry_sdk.v1 import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the object type. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager** application.\nontology_rid = \"ri.ontology.main.ontology.c61d9ab5-2919-4127-a0a1-ac64c0ce6367\"\n# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager** application.\nobject_type = \"Employee\"\n# LinkTypeApiName | The API name of the outgoing link. To find the API name for your link type, check the **Ontology Manager**.\nlink_type = \"directReport\"\n\n\ntry:\n api_response = client.ontologies.Ontology.ObjectType.get_outgoing_link_type(\n ontology_rid, object_type, link_type\n )\n print(\"The get_outgoing_link_type response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling ObjectType.get_outgoing_link_type: %s\\n\" % e)" + } + ], + "v1.listObjectTypes": [ + { + "template": "from foundry_sdk.v1 import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the object types. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**.\nontology_rid = \"ri.ontology.main.ontology.c61d9ab5-2919-4127-a0a1-ac64c0ce6367\"\n# Optional[PageSize] | The desired size of the page to be returned. Defaults to 500. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details.\npage_size = None\n# Optional[PageToken]\npage_token = None\n\n\ntry:\n for object_type in client.ontologies.Ontology.ObjectType.list(\n ontology_rid, page_size=page_size, page_token=page_token\n ):\n pprint(object_type)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling ObjectType.list: %s\\n\" % e)" + } + ], + "v1.listOutgoingLinkTypes": [ + { + "template": "from foundry_sdk.v1 import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the object type. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager** application.\nontology_rid = \"ri.ontology.main.ontology.c61d9ab5-2919-4127-a0a1-ac64c0ce6367\"\n# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager** application.\nobject_type = \"Flight\"\n# Optional[PageSize] | The desired size of the page to be returned.\npage_size = None\n# Optional[PageToken]\npage_token = None\n\n\ntry:\n for object_type in client.ontologies.Ontology.ObjectType.list_outgoing_link_types(\n ontology_rid, object_type, page_size=page_size, page_token=page_token\n ):\n pprint(object_type)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling ObjectType.list_outgoing_link_types: %s\\n\" % e)" + } + ], + "v1.getOntology": [ + { + "template": "from foundry_sdk.v1 import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyRid | The unique Resource Identifier (RID) of the Ontology. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**.\nontology_rid = \"ri.ontology.main.ontology.c61d9ab5-2919-4127-a0a1-ac64c0ce6367\"\n\n\ntry:\n api_response = client.ontologies.Ontology.get(ontology_rid)\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Ontology.get: %s\\n\" % e)" + } + ], + "v1.listOntologies": [ + { + "template": "from foundry_sdk.v1 import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n\ntry:\n api_response = client.ontologies.Ontology.list()\n print(\"The list response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Ontology.list: %s\\n\" % e)" + } + ], + "v1.aggregateObjects": [ + { + "template": "from foundry_sdk.v1 import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the objects.\nontology_rid = \"ri.ontology.main.ontology.c61d9ab5-2919-4127-a0a1-ac64c0ce6367\"\n# ObjectTypeApiName | The type of the object to aggregate on.\nobject_type = \"employee\"\n# List[Aggregation]\naggregation = [\n {\"type\": \"min\", \"field\": \"properties.tenure\", \"name\": \"min_tenure\"},\n {\"type\": \"avg\", \"field\": \"properties.tenure\", \"name\": \"avg_tenure\"},\n]\n# List[AggregationGroupBy]\ngroup_by = [\n {\n \"field\": \"properties.startDate\",\n \"type\": \"range\",\n \"ranges\": [{\"gte\": \"2020-01-01\", \"lt\": \"2020-06-01\"}],\n },\n {\"field\": \"properties.city\", \"type\": \"exact\"},\n]\n# Optional[SearchJsonQuery]\nquery = {\"not\": {\"field\": \"properties.name\", \"eq\": \"john\"}}\n\n\ntry:\n api_response = client.ontologies.OntologyObject.aggregate(\n ontology_rid, object_type, aggregation=aggregation, group_by=group_by, query=query\n )\n print(\"The aggregate response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling OntologyObject.aggregate: %s\\n\" % e)" + } + ], + "v1.getObject": [ + { + "template": "from foundry_sdk.v1 import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the object. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**.\nontology_rid = \"ri.ontology.main.ontology.c61d9ab5-2919-4127-a0a1-ac64c0ce6367\"\n# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**.\nobject_type = \"employee\"\n# PropertyValueEscapedString | The primary key of the requested object. To look up the expected primary key for your object type, use the `Get object type` endpoint or the **Ontology Manager**.\nprimary_key = 50030\n# Optional[List[SelectedPropertyApiName]] | The properties of the object type that should be included in the response. Omit this parameter to get all the properties.\nproperties = None\n\n\ntry:\n api_response = client.ontologies.OntologyObject.get(\n ontology_rid, object_type, primary_key, properties=properties\n )\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling OntologyObject.get: %s\\n\" % e)" + } + ], + "v1.getLinkedObject": [ + { + "template": "from foundry_sdk.v1 import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the object. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**.\nontology_rid = \"ri.ontology.main.ontology.c61d9ab5-2919-4127-a0a1-ac64c0ce6367\"\n# ObjectTypeApiName | The API name of the object from which the links originate. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**.\nobject_type = \"employee\"\n# PropertyValueEscapedString | The primary key of the object from which the link originates. To look up the expected primary key for your object type, use the `Get object type` endpoint or the **Ontology Manager**.\nprimary_key = 50030\n# LinkTypeApiName | The API name of the link that exists between the object and the requested objects. To find the API name for your link type, check the **Ontology Manager**.\nlink_type = \"directReport\"\n# PropertyValueEscapedString | The primary key of the requested linked object. To look up the expected primary key for your object type, use the `Get object type` endpoint (passing the linked object type) or the **Ontology Manager**.\nlinked_object_primary_key = 80060\n# Optional[List[SelectedPropertyApiName]] | The properties of the object type that should be included in the response. Omit this parameter to get all the properties.\nproperties = None\n\n\ntry:\n api_response = client.ontologies.OntologyObject.get_linked_object(\n ontology_rid,\n object_type,\n primary_key,\n link_type,\n linked_object_primary_key,\n properties=properties,\n )\n print(\"The get_linked_object response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling OntologyObject.get_linked_object: %s\\n\" % e)" + } + ], + "v1.listObjects": [ + { + "template": "from foundry_sdk.v1 import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the objects. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**.\nontology_rid = \"ri.ontology.main.ontology.c61d9ab5-2919-4127-a0a1-ac64c0ce6367\"\n# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**.\nobject_type = \"employee\"\n# Optional[OrderBy]\norder_by = None\n# Optional[PageSize] | The desired size of the page to be returned. Defaults to 1,000. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details.\npage_size = None\n# Optional[PageToken]\npage_token = None\n# Optional[List[SelectedPropertyApiName]] | The properties of the object type that should be included in the response. Omit this parameter to get all the properties.\nproperties = None\n\n\ntry:\n for ontology_object in client.ontologies.OntologyObject.list(\n ontology_rid,\n object_type,\n order_by=order_by,\n page_size=page_size,\n page_token=page_token,\n properties=properties,\n ):\n pprint(ontology_object)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling OntologyObject.list: %s\\n\" % e)" + } + ], + "v1.listLinkedObjects": [ + { + "template": "from foundry_sdk.v1 import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the objects. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**.\nontology_rid = \"ri.ontology.main.ontology.c61d9ab5-2919-4127-a0a1-ac64c0ce6367\"\n# ObjectTypeApiName | The API name of the object from which the links originate. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**.\nobject_type = \"employee\"\n# PropertyValueEscapedString | The primary key of the object from which the links originate. To look up the expected primary key for your object type, use the `Get object type` endpoint or the **Ontology Manager**.\nprimary_key = 50030\n# LinkTypeApiName | The API name of the link that exists between the object and the requested objects. To find the API name for your link type, check the **Ontology Manager**.\nlink_type = \"directReport\"\n# Optional[OrderBy]\norder_by = None\n# Optional[PageSize] | The desired size of the page to be returned. Defaults to 1,000. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details.\npage_size = None\n# Optional[PageToken]\npage_token = None\n# Optional[List[SelectedPropertyApiName]] | The properties of the object type that should be included in the response. Omit this parameter to get all the properties.\nproperties = None\n\n\ntry:\n for ontology_object in client.ontologies.OntologyObject.list_linked_objects(\n ontology_rid,\n object_type,\n primary_key,\n link_type,\n order_by=order_by,\n page_size=page_size,\n page_token=page_token,\n properties=properties,\n ):\n pprint(ontology_object)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling OntologyObject.list_linked_objects: %s\\n\" % e)" + } + ], + "v1.searchObjects": [ + { + "template": "from foundry_sdk.v1 import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the objects.\nontology_rid = \"ri.ontology.main.ontology.c61d9ab5-2919-4127-a0a1-ac64c0ce6367\"\n# ObjectTypeApiName | The type of the requested objects.\nobject_type = \"employee\"\n# List[PropertyApiName] | The API names of the object type properties to include in the response.\nfields = None\n# SearchJsonQuery\nquery = {\"not\": {\"field\": \"properties.age\", \"eq\": 21}}\n# Optional[SearchOrderBy]\norder_by = None\n# Optional[PageSize]\npage_size = None\n# Optional[PageToken]\npage_token = None\n\n\ntry:\n api_response = client.ontologies.OntologyObject.search(\n ontology_rid,\n object_type,\n fields=fields,\n query=query,\n order_by=order_by,\n page_size=page_size,\n page_token=page_token,\n )\n print(\"The search response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling OntologyObject.search: %s\\n\" % e)" + } + ], + "v1.executeQuery": [ + { + "template": "from foundry_sdk.v1 import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the Query. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**.\nontology_rid = \"ri.ontology.main.ontology.c61d9ab5-2919-4127-a0a1-ac64c0ce6367\"\n# QueryApiName | The API name of the Query to execute.\nquery_api_name = \"getEmployeesInCity\"\n# Dict[ParameterId, Optional[DataValue]]\nparameters = {\"city\": \"New York\"}\n# Optional[Attribution] | The Attribution to be used when executing this request.\nattribution = None\n# Optional[TraceParent] | The W3C trace parent header included in the request.\ntrace_parent = None\n# Optional[TraceState] | The W3C trace state header included in the request.\ntrace_state = None\n\n\ntry:\n api_response = client.ontologies.Query.execute(\n ontology_rid,\n query_api_name,\n parameters=parameters,\n attribution=attribution,\n trace_parent=trace_parent,\n trace_state=trace_state,\n )\n print(\"The execute response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Query.execute: %s\\n\" % e)" + } + ], + "v1.getQueryType": [ + { + "template": "from foundry_sdk.v1 import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the query type. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**.\nontology_rid = \"ri.ontology.main.ontology.c61d9ab5-2919-4127-a0a1-ac64c0ce6367\"\n# QueryApiName | The API name of the query type. To find the API name, use the **List query types** endpoint or check the **Ontology Manager**.\nquery_api_name = \"getEmployeesInCity\"\n\n\ntry:\n api_response = client.ontologies.Ontology.QueryType.get(ontology_rid, query_api_name)\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling QueryType.get: %s\\n\" % e)" + } + ], + "v1.listQueryTypes": [ + { + "template": "from foundry_sdk.v1 import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the query types. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**.\nontology_rid = \"ri.ontology.main.ontology.c61d9ab5-2919-4127-a0a1-ac64c0ce6367\"\n# Optional[PageSize] | The desired size of the page to be returned. Defaults to 100. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details.\npage_size = None\n# Optional[PageToken]\npage_token = None\n\n\ntry:\n for query_type in client.ontologies.Ontology.QueryType.list(\n ontology_rid, page_size=page_size, page_token=page_token\n ):\n pprint(query_type)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling QueryType.list: %s\\n\" % e)" + } + ], + "v2.getAuthenticationProvider": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# EnrollmentRid\nenrollment_rid = None\n# AuthenticationProviderRid\nauthentication_provider_rid = \"ri.control-panel.main.saml.3faf689c-eaa1-4137-851f-81d58afe4c86\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.admin.Enrollment.AuthenticationProvider.get(\n enrollment_rid, authentication_provider_rid, preview=preview\n )\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling AuthenticationProvider.get: %s\\n\" % e)" + } + ], + "v2.listAuthenticationProviders": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# EnrollmentRid\nenrollment_rid = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.admin.Enrollment.AuthenticationProvider.list(\n enrollment_rid, preview=preview\n )\n print(\"The list response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling AuthenticationProvider.list: %s\\n\" % e)" + } + ], + "v2.preregisterGroup": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# EnrollmentRid\nenrollment_rid = None\n# AuthenticationProviderRid\nauthentication_provider_rid = \"ri.control-panel.main.saml.3faf689c-eaa1-4137-851f-81d58afe4c86\"\n# GroupName\nname = \"Data Source Admins\"\n# List[OrganizationRid] | The RIDs of the Organizations that can view this group.\norganizations = [\"ri.multipass..organization.c30ee6ad-b5e4-4afe-a74f-fe4a289f2faa\"]\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.admin.Enrollment.AuthenticationProvider.preregister_group(\n enrollment_rid,\n authentication_provider_rid,\n name=name,\n organizations=organizations,\n preview=preview,\n )\n print(\"The preregister_group response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling AuthenticationProvider.preregister_group: %s\\n\" % e)" + } + ], + "v2.preregisterUser": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# EnrollmentRid\nenrollment_rid = None\n# AuthenticationProviderRid\nauthentication_provider_rid = \"ri.control-panel.main.saml.3faf689c-eaa1-4137-851f-81d58afe4c86\"\n# OrganizationRid | The RID of the user's primary Organization. This may be changed when the user logs in for the first time depending on any configured Organization assignment rules.\norganization = \"ri.multipass..organization.c30ee6ad-b5e4-4afe-a74f-fe4a289f2faa\"\n# UserUsername | The new user's username. This must match one of the provider's supported username patterns.\nusername = \"jsmith\"\n# Optional[Dict[AttributeName, AttributeValues]]\nattributes = {\n \"multipass:givenName\": [\"John\"],\n \"multipass:familyName\": [\"Smith\"],\n \"multipass:email:primary\": [\"jsmith@example.com\"],\n \"multipass:realm\": [\"eab0a251-ca1a-4a84-a482-200edfb8026f\"],\n \"multipass:organization-rid\": [\n \"ri.multipass..organization.c30ee6ad-b5e4-4afe-a74f-fe4a289f2faa\"\n ],\n \"department\": [\"Finance\"],\n \"jobTitle\": [\"Accountant\"],\n}\n# Optional[str]\nemail = \"jsmith@example.com\"\n# Optional[str]\nfamily_name = \"Smith\"\n# Optional[str]\ngiven_name = \"John\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.admin.Enrollment.AuthenticationProvider.preregister_user(\n enrollment_rid,\n authentication_provider_rid,\n organization=organization,\n username=username,\n attributes=attributes,\n email=email,\n family_name=family_name,\n given_name=given_name,\n preview=preview,\n )\n print(\"The preregister_user response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling AuthenticationProvider.preregister_user: %s\\n\" % e)" + } + ], + "v2.getEnrollment": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# EnrollmentRid\nenrollment_rid = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.admin.Enrollment.get(enrollment_rid, preview=preview)\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Enrollment.get: %s\\n\" % e)" + } + ], + "v2.getCurrentEnrollment": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.admin.Enrollment.get_current(preview=preview)\n print(\"The get_current response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Enrollment.get_current: %s\\n\" % e)" + } + ], + "v2.addEnrollmentRoleAssignments": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# EnrollmentRid\nenrollment_rid = None\n# List[RoleAssignmentUpdate]\nrole_assignments = [\n {\n \"roleId\": \"8bf49052-dc37-4528-8bf0-b551cfb71268\",\n \"principalId\": \"f05f8da4-b84c-4fca-9c77-8af0b13d11de\",\n }\n]\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.admin.Enrollment.EnrollmentRoleAssignment.add(\n enrollment_rid, role_assignments=role_assignments, preview=preview\n )\n print(\"The add response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling EnrollmentRoleAssignment.add: %s\\n\" % e)" + } + ], + "v2.listEnrollmentRoleAssignments": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# EnrollmentRid\nenrollment_rid = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.admin.Enrollment.EnrollmentRoleAssignment.list(\n enrollment_rid, preview=preview\n )\n print(\"The list response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling EnrollmentRoleAssignment.list: %s\\n\" % e)" + } + ], + "v2.removeEnrollmentRoleAssignments": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# EnrollmentRid\nenrollment_rid = None\n# List[RoleAssignmentUpdate]\nrole_assignments = [\n {\n \"roleId\": \"8bf49052-dc37-4528-8bf0-b551cfb71268\",\n \"principalId\": \"f05f8da4-b84c-4fca-9c77-8af0b13d11de\",\n }\n]\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.admin.Enrollment.EnrollmentRoleAssignment.remove(\n enrollment_rid, role_assignments=role_assignments, preview=preview\n )\n print(\"The remove response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling EnrollmentRoleAssignment.remove: %s\\n\" % e)" + } + ], + "v2.createGroup": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# Dict[AttributeName, AttributeValues] | A map of the Group's attributes. Attributes prefixed with \"multipass:\" are reserved for internal use by Foundry and are subject to change.\nattributes = {\n \"multipass:givenName\": [\"John\"],\n \"multipass:familyName\": [\"Smith\"],\n \"multipass:email:primary\": [\"jsmith@example.com\"],\n \"multipass:realm\": [\"eab0a251-ca1a-4a84-a482-200edfb8026f\"],\n \"multipass:organization-rid\": [\n \"ri.multipass..organization.c30ee6ad-b5e4-4afe-a74f-fe4a289f2faa\"\n ],\n \"department\": [\"Finance\"],\n \"jobTitle\": [\"Accountant\"],\n}\n# GroupName | The name of the Group.\nname = \"Data Source Admins\"\n# List[OrganizationRid] | The RIDs of the Organizations whose members can see this group. At least one Organization RID must be listed.\norganizations = [\"ri.multipass..organization.c30ee6ad-b5e4-4afe-a74f-fe4a289f2faa\"]\n# Optional[str] | A description of the Group.\ndescription = \"Create and modify data sources in the platform\"\n\n\ntry:\n api_response = client.admin.Group.create(\n attributes=attributes, name=name, organizations=organizations, description=description\n )\n print(\"The create response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Group.create: %s\\n\" % e)" + } + ], + "v2.deleteGroup": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# GroupId\ngroup_id = None\n\n\ntry:\n api_response = client.admin.Group.delete(group_id)\n print(\"The delete response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Group.delete: %s\\n\" % e)" + } + ], + "v2.getGroup": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# GroupId\ngroup_id = None\n\n\ntry:\n api_response = client.admin.Group.get(group_id)\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Group.get: %s\\n\" % e)" + } + ], + "v2.getGroupsBatch": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# List[GetGroupsBatchRequestElement] | Body of the request\nbody = [{\"groupId\": \"0d1fe74e-2b70-4a93-9b1a-80070637788b\"}]\n\n\ntry:\n api_response = client.admin.Group.get_batch(body)\n print(\"The get_batch response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Group.get_batch: %s\\n\" % e)" + } + ], + "v2.listGroups": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# Optional[PageSize] | The page size to use for the endpoint.\npage_size = None\n# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request.\npage_token = None\n\n\ntry:\n for group in client.admin.Group.list(page_size=page_size, page_token=page_token):\n pprint(group)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Group.list: %s\\n\" % e)" + } + ], + "v2.searchGroups": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# GroupSearchFilter\nwhere = {\"type\": \"queryString\", \"value\": \"jsmith\"}\n# Optional[PageSize]\npage_size = 100\n# Optional[PageToken]\npage_token = \"v1.QnVpbGQgdGhlIEZ1dHVyZTogaHR0cHM6Ly93d3cucGFsYW50aXIuY29tL2NhcmVlcnMvP2xldmVyLXNvdXJjZSU1YiU1ZD1BUElEb2NzI29wZW4tcG9zaXRpb25z\"\n\n\ntry:\n api_response = client.admin.Group.search(\n where=where, page_size=page_size, page_token=page_token\n )\n print(\"The search response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Group.search: %s\\n\" % e)" + } + ], + "v2.addGroupMembers": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# GroupId\ngroup_id = None\n# List[PrincipalId]\nprincipal_ids = [\"f05f8da4-b84c-4fca-9c77-8af0b13d11de\"]\n# Optional[GroupMembershipExpiration]\nexpiration = \"2026-01-31T00:00:00.000Z\"\n\n\ntry:\n api_response = client.admin.Group.GroupMember.add(\n group_id, principal_ids=principal_ids, expiration=expiration\n )\n print(\"The add response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling GroupMember.add: %s\\n\" % e)" + } + ], + "v2.listGroupMembers": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# GroupId\ngroup_id = None\n# Optional[PageSize] | The page size to use for the endpoint.\npage_size = None\n# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request.\npage_token = None\n# Optional[bool] | When true, includes the transitive members of groups contained within this group. For example, say the Group has member Group A, and Group A has member User B. If `transitive=false` only Group A will be returned, but if `transitive=true` then Group A and User B will be returned. This will recursively resolve Groups through all layers of nesting. Defaults to false.\ntransitive = None\n\n\ntry:\n for group_member in client.admin.Group.GroupMember.list(\n group_id, page_size=page_size, page_token=page_token, transitive=transitive\n ):\n pprint(group_member)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling GroupMember.list: %s\\n\" % e)" + } + ], + "v2.removeGroupMembers": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# GroupId\ngroup_id = None\n# List[PrincipalId]\nprincipal_ids = [\"f05f8da4-b84c-4fca-9c77-8af0b13d11de\"]\n\n\ntry:\n api_response = client.admin.Group.GroupMember.remove(group_id, principal_ids=principal_ids)\n print(\"The remove response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling GroupMember.remove: %s\\n\" % e)" + } + ], + "v2.listGroupMemberships": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# UserId\nuser_id = None\n# Optional[PageSize] | The page size to use for the endpoint.\npage_size = None\n# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request.\npage_token = None\n# Optional[bool] | When true, includes the transitive memberships of the Groups the User is a member of. For example, say the User is a member of Group A, and Group A is a member of Group B. If `transitive=false` only Group A will be returned, but if `transitive=true` then Groups A and B will be returned. This will recursively resolve Groups through all layers of nesting. Defaults to false.\ntransitive = None\n\n\ntry:\n for group_membership in client.admin.User.GroupMembership.list(\n user_id, page_size=page_size, page_token=page_token, transitive=transitive\n ):\n pprint(group_membership)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling GroupMembership.list: %s\\n\" % e)" + } + ], + "v2.getGroupMembershipExpirationPolicy": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# GroupId\ngroup_id = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.admin.Group.MembershipExpirationPolicy.get(group_id, preview=preview)\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling MembershipExpirationPolicy.get: %s\\n\" % e)" + } + ], + "v2.replaceGroupMembershipExpirationPolicy": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# GroupId\ngroup_id = None\n# Optional[DurationSeconds] | Members in this group must be added with expirations that are less than this duration in seconds into the future from the time they are added.\nmaximum_duration = 30\n# Optional[GroupMembershipExpiration] | Members in this group must be added with expiration times that occur before this value.\nmaximum_value = \"2026-01-31T00:00:00.000Z\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.admin.Group.MembershipExpirationPolicy.replace(\n group_id, maximum_duration=maximum_duration, maximum_value=maximum_value, preview=preview\n )\n print(\"The replace response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling MembershipExpirationPolicy.replace: %s\\n\" % e)" + } + ], + "v2.getGroupProviderInfo": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# GroupId\ngroup_id = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.admin.Group.ProviderInfo.get(group_id, preview=preview)\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling ProviderInfo.get: %s\\n\" % e)" + } + ], + "v2.replaceGroupProviderInfo": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# GroupId\ngroup_id = None\n# ProviderId | The ID of the Group in the external authentication provider. This value is determined by the authentication provider. At most one Group can have a given provider ID in a given Realm.\nprovider_id = \"2838c8f3-d76a-4e99-acf1-1dee537e4c48\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.admin.Group.ProviderInfo.replace(\n group_id, provider_id=provider_id, preview=preview\n )\n print(\"The replace response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling ProviderInfo.replace: %s\\n\" % e)" + } + ], + "v2.listHosts": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# EnrollmentRid\nenrollment_rid = None\n# Optional[PageSize] | The page size to use for the endpoint.\npage_size = None\n# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request.\npage_token = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n for host in client.admin.Enrollment.Host.list(\n enrollment_rid, page_size=page_size, page_token=page_token, preview=preview\n ):\n pprint(host)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Host.list: %s\\n\" % e)" + } + ], + "v2.createMarking": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# MarkingCategoryId\ncategory_id = \"0950264e-01c8-4e83-81a9-1a6b7f77621a\"\n# List[PrincipalId] | Users and Groups that will be able to view resources protected by this Marking. This can be changed later through the MarkingMember operations.\ninitial_members = [\"f05f8da4-b84c-4fca-9c77-8af0b13d11de\"]\n# List[MarkingRoleUpdate] | The initial roles that will be assigned when the Marking is created. At least one ADMIN role must be provided. This can be changed later through the MarkingRoleAssignment operations. WARNING: If you do not include your own principal ID or the ID of a Group that you are a member of, you will create a Marking that you cannot administer.\ninitial_role_assignments = [\n {\"role\": \"ADMINISTER\", \"principalId\": \"f05f8da4-b84c-4fca-9c77-8af0b13d11de\"}\n]\n# MarkingName\nname = \"PII\"\n# Optional[str]\ndescription = \"Contains personally identifiable information about our customers\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.admin.Marking.create(\n category_id=category_id,\n initial_members=initial_members,\n initial_role_assignments=initial_role_assignments,\n name=name,\n description=description,\n preview=preview,\n )\n print(\"The create response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Marking.create: %s\\n\" % e)" + } + ], + "v2.getMarking": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# MarkingId\nmarking_id = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.admin.Marking.get(marking_id, preview=preview)\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Marking.get: %s\\n\" % e)" + } + ], + "v2.getMarkingsBatch": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# List[GetMarkingsBatchRequestElement] | Body of the request\nbody = [{\"markingId\": \"18212f9a-0e63-4b79-96a0-aae04df23336\"}]\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.admin.Marking.get_batch(body, preview=preview)\n print(\"The get_batch response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Marking.get_batch: %s\\n\" % e)" + } + ], + "v2.listMarkings": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# Optional[PageSize] | The page size to use for the endpoint.\npage_size = None\n# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request.\npage_token = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n for marking in client.admin.Marking.list(\n page_size=page_size, page_token=page_token, preview=preview\n ):\n pprint(marking)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Marking.list: %s\\n\" % e)" + } + ], + "v2.replaceMarking": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# MarkingId\nmarking_id = None\n# MarkingName\nname = \"PII\"\n# Optional[str]\ndescription = \"Contains personally identifiable information about our customers\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.admin.Marking.replace(\n marking_id, name=name, description=description, preview=preview\n )\n print(\"The replace response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Marking.replace: %s\\n\" % e)" + } + ], + "v2.getMarkingCategory": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# MarkingCategoryId\nmarking_category_id = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.admin.MarkingCategory.get(marking_category_id, preview=preview)\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling MarkingCategory.get: %s\\n\" % e)" + } + ], + "v2.listMarkingCategories": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# Optional[PageSize] | The page size to use for the endpoint.\npage_size = None\n# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request.\npage_token = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n for marking_category in client.admin.MarkingCategory.list(\n page_size=page_size, page_token=page_token, preview=preview\n ):\n pprint(marking_category)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling MarkingCategory.list: %s\\n\" % e)" + } + ], + "v2.addMarkingMembers": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# MarkingId\nmarking_id = None\n# List[PrincipalId]\nprincipal_ids = [\"f05f8da4-b84c-4fca-9c77-8af0b13d11de\"]\n\n\ntry:\n api_response = client.admin.Marking.MarkingMember.add(marking_id, principal_ids=principal_ids)\n print(\"The add response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling MarkingMember.add: %s\\n\" % e)" + } + ], + "v2.listMarkingMembers": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# MarkingId\nmarking_id = None\n# Optional[PageSize] | The page size to use for the endpoint.\npage_size = None\n# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request.\npage_token = None\n# Optional[bool] | When true, includes the transitive members of groups contained within groups that are members of this Marking. For example, say the Marking has member Group A, and Group A has member User B. If `transitive=false` only Group A will be returned, but if `transitive=true` then Group A and User B will be returned. This will recursively resolve Groups through all layers of nesting. Defaults to false.\ntransitive = None\n\n\ntry:\n for marking_member in client.admin.Marking.MarkingMember.list(\n marking_id, page_size=page_size, page_token=page_token, transitive=transitive\n ):\n pprint(marking_member)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling MarkingMember.list: %s\\n\" % e)" + } + ], + "v2.removeMarkingMembers": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# MarkingId\nmarking_id = None\n# List[PrincipalId]\nprincipal_ids = [\"f05f8da4-b84c-4fca-9c77-8af0b13d11de\"]\n\n\ntry:\n api_response = client.admin.Marking.MarkingMember.remove(\n marking_id, principal_ids=principal_ids\n )\n print(\"The remove response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling MarkingMember.remove: %s\\n\" % e)" + } + ], + "v2.addMarkingRoleAssignments": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# MarkingId\nmarking_id = None\n# List[MarkingRoleUpdate]\nrole_assignments = [{\"role\": \"ADMINISTER\", \"principalId\": \"f05f8da4-b84c-4fca-9c77-8af0b13d11de\"}]\n\n\ntry:\n api_response = client.admin.Marking.MarkingRoleAssignment.add(\n marking_id, role_assignments=role_assignments\n )\n print(\"The add response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling MarkingRoleAssignment.add: %s\\n\" % e)" + } + ], + "v2.listMarkingRoleAssignments": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# MarkingId\nmarking_id = None\n# Optional[PageSize] | The page size to use for the endpoint.\npage_size = None\n# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request.\npage_token = None\n\n\ntry:\n for marking_role_assignment in client.admin.Marking.MarkingRoleAssignment.list(\n marking_id, page_size=page_size, page_token=page_token\n ):\n pprint(marking_role_assignment)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling MarkingRoleAssignment.list: %s\\n\" % e)" + } + ], + "v2.removeMarkingRoleAssignments": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# MarkingId\nmarking_id = None\n# List[MarkingRoleUpdate]\nrole_assignments = [{\"role\": \"ADMINISTER\", \"principalId\": \"f05f8da4-b84c-4fca-9c77-8af0b13d11de\"}]\n\n\ntry:\n api_response = client.admin.Marking.MarkingRoleAssignment.remove(\n marking_id, role_assignments=role_assignments\n )\n print(\"The remove response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling MarkingRoleAssignment.remove: %s\\n\" % e)" + } + ], + "v2.createOrganization": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# List[PrincipalId] | The initial administrators of the Organization. At least one principal must be provided.\nadministrators = [\"f05f8da4-b84c-4fca-9c77-8af0b13d11de\"]\n# EnrollmentRid | The RID of the Enrollment that this Organization belongs to. This must be provided.\nenrollment_rid = \"ri.control-panel.main.customer.466f812b-f974-4478-9d4f-90402cd3def6\"\n# OrganizationName\nname = \"Example Organization\"\n# Optional[str]\ndescription = None\n# Optional[HostName] | The primary host name of the Organization. This should be used when constructing URLs for users of this Organization.\nhost = \"example.palantirfoundry.com\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.admin.Organization.create(\n administrators=administrators,\n enrollment_rid=enrollment_rid,\n name=name,\n description=description,\n host=host,\n preview=preview,\n )\n print(\"The create response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Organization.create: %s\\n\" % e)" + } + ], + "v2.getOrganization": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OrganizationRid\norganization_rid = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.admin.Organization.get(organization_rid, preview=preview)\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Organization.get: %s\\n\" % e)" + } + ], + "v2.listAvailableRolesOrganization": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OrganizationRid\norganization_rid = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.admin.Organization.list_available_roles(organization_rid, preview=preview)\n print(\"The list_available_roles response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Organization.list_available_roles: %s\\n\" % e)" + } + ], + "v2.replaceOrganization": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OrganizationRid\norganization_rid = None\n# OrganizationName\nname = \"Example Organization\"\n# Optional[str]\ndescription = None\n# Optional[HostName] | The primary host name of the Organization. This should be used when constructing URLs for users of this Organization.\nhost = \"example.palantirfoundry.com\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.admin.Organization.replace(\n organization_rid, name=name, description=description, host=host, preview=preview\n )\n print(\"The replace response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Organization.replace: %s\\n\" % e)" + } + ], + "v2.addOrganizationRoleAssignments": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OrganizationRid\norganization_rid = None\n# List[RoleAssignmentUpdate]\nrole_assignments = [\n {\n \"roleId\": \"8bf49052-dc37-4528-8bf0-b551cfb71268\",\n \"principalId\": \"f05f8da4-b84c-4fca-9c77-8af0b13d11de\",\n }\n]\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.admin.Organization.OrganizationRoleAssignment.add(\n organization_rid, role_assignments=role_assignments, preview=preview\n )\n print(\"The add response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling OrganizationRoleAssignment.add: %s\\n\" % e)" + } + ], + "v2.listOrganizationRoleAssignments": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OrganizationRid\norganization_rid = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.admin.Organization.OrganizationRoleAssignment.list(\n organization_rid, preview=preview\n )\n print(\"The list response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling OrganizationRoleAssignment.list: %s\\n\" % e)" + } + ], + "v2.removeOrganizationRoleAssignments": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OrganizationRid\norganization_rid = None\n# List[RoleAssignmentUpdate]\nrole_assignments = [\n {\n \"roleId\": \"8bf49052-dc37-4528-8bf0-b551cfb71268\",\n \"principalId\": \"f05f8da4-b84c-4fca-9c77-8af0b13d11de\",\n }\n]\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.admin.Organization.OrganizationRoleAssignment.remove(\n organization_rid, role_assignments=role_assignments, preview=preview\n )\n print(\"The remove response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling OrganizationRoleAssignment.remove: %s\\n\" % e)" + } + ], + "v2.getRole": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# RoleId\nrole_id = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.admin.Role.get(role_id, preview=preview)\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Role.get: %s\\n\" % e)" + } + ], + "v2.getRolesBatch": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# List[GetRolesBatchRequestElement] | Body of the request\nbody = [{\"roleId\": \"8bf49052-dc37-4528-8bf0-b551cfb71268\"}]\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.admin.Role.get_batch(body, preview=preview)\n print(\"The get_batch response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Role.get_batch: %s\\n\" % e)" + } + ], + "v2.deleteUser": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# UserId\nuser_id = None\n\n\ntry:\n api_response = client.admin.User.delete(user_id)\n print(\"The delete response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling User.delete: %s\\n\" % e)" + } + ], + "v2.getUser": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# UserId\nuser_id = None\n# Optional[UserStatus]\nstatus = None\n\n\ntry:\n api_response = client.admin.User.get(user_id, status=status)\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling User.get: %s\\n\" % e)" + } + ], + "v2.getUsersBatch": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# List[GetUsersBatchRequestElement] | Body of the request\nbody = [{\"userId\": \"0d1fe74e-2b70-4a93-9b1a-80070637788b\", \"status\": \"ACTIVE\"}]\n\n\ntry:\n api_response = client.admin.User.get_batch(body)\n print(\"The get_batch response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling User.get_batch: %s\\n\" % e)" + } + ], + "v2.getCurrentUser": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n\ntry:\n api_response = client.admin.User.get_current()\n print(\"The get_current response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling User.get_current: %s\\n\" % e)" + } + ], + "v2.getMarkingsUser": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# UserId\nuser_id = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.admin.User.get_markings(user_id, preview=preview)\n print(\"The get_markings response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling User.get_markings: %s\\n\" % e)" + } + ], + "v2.listUsers": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# Optional[UserStatus]\ninclude = None\n# Optional[PageSize] | The page size to use for the endpoint.\npage_size = None\n# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request.\npage_token = None\n\n\ntry:\n for user in client.admin.User.list(include=include, page_size=page_size, page_token=page_token):\n pprint(user)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling User.list: %s\\n\" % e)" + } + ], + "v2.getProfilePictureOfUser": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# UserId\nuser_id = None\n\n\ntry:\n api_response = client.admin.User.profile_picture(user_id)\n print(\"The profile_picture response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling User.profile_picture: %s\\n\" % e)" + } + ], + "v2.revokeAllTokensUser": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# UserId\nuser_id = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.admin.User.revoke_all_tokens(user_id, preview=preview)\n print(\"The revoke_all_tokens response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling User.revoke_all_tokens: %s\\n\" % e)" + } + ], + "v2.searchUsers": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# UserSearchFilter\nwhere = {\"type\": \"queryString\", \"value\": \"jsmith\"}\n# Optional[PageSize]\npage_size = 100\n# Optional[PageToken]\npage_token = \"v1.QnVpbGQgdGhlIEZ1dHVyZTogaHR0cHM6Ly93d3cucGFsYW50aXIuY29tL2NhcmVlcnMvP2xldmVyLXNvdXJjZSU1YiU1ZD1BUElEb2NzI29wZW4tcG9zaXRpb25z\"\n\n\ntry:\n api_response = client.admin.User.search(where=where, page_size=page_size, page_token=page_token)\n print(\"The search response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling User.search: %s\\n\" % e)" + } + ], + "v2.getUserProviderInfo": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# UserId\nuser_id = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.admin.User.ProviderInfo.get(user_id, preview=preview)\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling ProviderInfo.get: %s\\n\" % e)" + } + ], + "v2.replaceUserProviderInfo": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# UserId\nuser_id = None\n# ProviderId | The ID of the User in the external authentication provider. This value is determined by the authentication provider. At most one User can have a given provider ID in a given Realm.\nprovider_id = \"2838c8f3-d76a-4e99-acf1-1dee537e4c48\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.admin.User.ProviderInfo.replace(\n user_id, provider_id=provider_id, preview=preview\n )\n print(\"The replace response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling ProviderInfo.replace: %s\\n\" % e)" + } + ], + "v2.listSessionsForAgents": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# Optional[PageSize] | The maximum number of sessions to return in a single page. The maximum allowed value is 100. Defaults to 100 if not specified.\npage_size = None\n# Optional[PageToken]\npage_token = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n for agent in client.aip_agents.Agent.all_sessions(\n page_size=page_size, page_token=page_token, preview=preview\n ):\n pprint(agent)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Agent.all_sessions: %s\\n\" % e)" + } + ], + "v2.getAgent": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# AgentRid | An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/).\nagent_rid = \"ri.aip-agents..agent.732cd5b4-7ca7-4219-aabb-6e976faf63b1\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n# Optional[AgentVersionString] | The version of the Agent to retrieve. If not specified, the latest published version will be returned.\nversion = None\n\n\ntry:\n api_response = client.aip_agents.Agent.get(agent_rid, preview=preview, version=version)\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Agent.get: %s\\n\" % e)" + } + ], + "v2.getAgentVersion": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# AgentRid | An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/).\nagent_rid = \"ri.aip-agents..agent.732cd5b4-7ca7-4219-aabb-6e976faf63b1\"\n# AgentVersionString | The semantic version of the Agent, formatted as \"majorVersion.minorVersion\".\nagent_version_string = \"1.0\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.aip_agents.Agent.AgentVersion.get(\n agent_rid, agent_version_string, preview=preview\n )\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling AgentVersion.get: %s\\n\" % e)" + } + ], + "v2.listAgentVersions": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# AgentRid | An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/).\nagent_rid = \"ri.aip-agents..agent.732cd5b4-7ca7-4219-aabb-6e976faf63b1\"\n# Optional[PageSize] | The page size to use for the endpoint.\npage_size = None\n# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request.\npage_token = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n for agent_version in client.aip_agents.Agent.AgentVersion.list(\n agent_rid, page_size=page_size, page_token=page_token, preview=preview\n ):\n pprint(agent_version)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling AgentVersion.list: %s\\n\" % e)" + } + ], + "v2.getContent": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# AgentRid | An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/).\nagent_rid = \"ri.aip-agents..agent.732cd5b4-7ca7-4219-aabb-6e976faf63b1\"\n# SessionRid | The Resource Identifier (RID) of the conversation session.\nsession_rid = \"ri.aip-agents..session.292db3b2-b653-4de6-971c-7e97a7b881d6\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.aip_agents.Agent.Session.Content.get(\n agent_rid, session_rid, preview=preview\n )\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Content.get: %s\\n\" % e)" + } + ], + "v2.blockingContinueSession": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# AgentRid | An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/).\nagent_rid = \"ri.aip-agents..agent.732cd5b4-7ca7-4219-aabb-6e976faf63b1\"\n# SessionRid | The Resource Identifier (RID) of the conversation session.\nsession_rid = \"ri.aip-agents..session.292db3b2-b653-4de6-971c-7e97a7b881d6\"\n# Dict[ParameterId, ParameterValue] | Any supplied values for [application variables](https://palantir.com/docs/foundry/agent-studio/application-state/) to pass to the Agent for the exchange.\nparameter_inputs = {\n \"currentCustomerOrders\": {\n \"type\": \"objectSet\",\n \"ontology\": \"example-ontology\",\n \"objectSet\": {\n \"type\": \"filter\",\n \"objectSet\": {\"type\": \"base\", \"objectType\": \"customerOrder\"},\n \"where\": {\"type\": \"eq\", \"field\": \"customerId\", \"value\": \"123abc\"},\n },\n }\n}\n# UserTextInput | The user message for the Agent to respond to.\nuser_input = {\"text\": \"What is the status of my order?\"}\n# Optional[List[InputContext]] | If set, automatic [context retrieval](https://palantir.com/docs/foundry/agent-studio/retrieval-context/) is skipped and the list of specified context is provided to the Agent instead. If omitted, relevant context for the user message is automatically retrieved and included in the prompt, based on data sources configured on the Agent for the session.\ncontexts_override = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n# Optional[SessionTraceId] | The unique identifier to use for this continue session trace. By generating and passing this ID to the `blockingContinue` endpoint, clients can use this trace ID to separately load details of the trace used to generate a result, while the result is in progress. If omitted, it will be generated automatically. Clients can check the generated ID by inspecting the `sessionTraceId` in the `SessionExchangeResult`.\nsession_trace_id = \"12345678-1234-5678-1234-123456789abc\"\n\n\ntry:\n api_response = client.aip_agents.Agent.Session.blocking_continue(\n agent_rid,\n session_rid,\n parameter_inputs=parameter_inputs,\n user_input=user_input,\n contexts_override=contexts_override,\n preview=preview,\n session_trace_id=session_trace_id,\n )\n print(\"The blocking_continue response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Session.blocking_continue: %s\\n\" % e)" + } + ], + "v2.cancelSession": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# AgentRid | An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/).\nagent_rid = \"ri.aip-agents..agent.732cd5b4-7ca7-4219-aabb-6e976faf63b1\"\n# SessionRid | The Resource Identifier (RID) of the conversation session.\nsession_rid = \"ri.aip-agents..session.292db3b2-b653-4de6-971c-7e97a7b881d6\"\n# MessageId | The identifier for the in-progress exchange to cancel. This should match the `messageId` which was provided when initiating the exchange with `streamingContinue`.\nmessage_id = \"00f8412a-c29d-4063-a417-8052825285a5\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n# Optional[AgentMarkdownResponse] | When specified, the exchange is added to the session with the client-provided response as the result. When omitted, the exchange is not added to the session.\nresponse = \"The status of your order is **In Transit**.\"\n\n\ntry:\n api_response = client.aip_agents.Agent.Session.cancel(\n agent_rid, session_rid, message_id=message_id, preview=preview, response=response\n )\n print(\"The cancel response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Session.cancel: %s\\n\" % e)" + } + ], + "v2.createSession": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# AgentRid | An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/).\nagent_rid = \"ri.aip-agents..agent.732cd5b4-7ca7-4219-aabb-6e976faf63b1\"\n# Optional[AgentVersionString] | The version of the Agent associated with the session. This can be set by clients on session creation. If not specified, defaults to use the latest published version of the Agent at session creation time.\nagent_version = \"1.0\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.aip_agents.Agent.Session.create(\n agent_rid, agent_version=agent_version, preview=preview\n )\n print(\"The create response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Session.create: %s\\n\" % e)" + } + ], + "v2.deleteSession": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# AgentRid | An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/).\nagent_rid = \"ri.aip-agents..agent.732cd5b4-7ca7-4219-aabb-6e976faf63b1\"\n# SessionRid | The Resource Identifier (RID) of the conversation session.\nsession_rid = \"ri.aip-agents..session.292db3b2-b653-4de6-971c-7e97a7b881d6\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.aip_agents.Agent.Session.delete(agent_rid, session_rid, preview=preview)\n print(\"The delete response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Session.delete: %s\\n\" % e)" + } + ], + "v2.getSession": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# AgentRid | An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/).\nagent_rid = \"ri.aip-agents..agent.732cd5b4-7ca7-4219-aabb-6e976faf63b1\"\n# SessionRid | The Resource Identifier (RID) of the conversation session.\nsession_rid = \"ri.aip-agents..session.292db3b2-b653-4de6-971c-7e97a7b881d6\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.aip_agents.Agent.Session.get(agent_rid, session_rid, preview=preview)\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Session.get: %s\\n\" % e)" + } + ], + "v2.listSessions": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# AgentRid | An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/).\nagent_rid = \"ri.aip-agents..agent.732cd5b4-7ca7-4219-aabb-6e976faf63b1\"\n# Optional[PageSize] | The page size to use for the endpoint.\npage_size = None\n# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request.\npage_token = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n for session in client.aip_agents.Agent.Session.list(\n agent_rid, page_size=page_size, page_token=page_token, preview=preview\n ):\n pprint(session)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Session.list: %s\\n\" % e)" + } + ], + "v2.getRagContextForSession": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# AgentRid | An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/).\nagent_rid = \"ri.aip-agents..agent.732cd5b4-7ca7-4219-aabb-6e976faf63b1\"\n# SessionRid | The Resource Identifier (RID) of the conversation session.\nsession_rid = \"ri.aip-agents..session.292db3b2-b653-4de6-971c-7e97a7b881d6\"\n# Dict[ParameterId, ParameterValue] | Any values for [application variables](https://palantir.com/docs/foundry/agent-studio/application-state/) to use for the context retrieval.\nparameter_inputs = {\"customerName\": {\"type\": \"string\", \"value\": \"Titan Technologies\"}}\n# UserTextInput | The user message to retrieve relevant context for from the configured Agent data sources.\nuser_input = {\"text\": \"What is the status of my order?\"}\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.aip_agents.Agent.Session.rag_context(\n agent_rid,\n session_rid,\n parameter_inputs=parameter_inputs,\n user_input=user_input,\n preview=preview,\n )\n print(\"The rag_context response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Session.rag_context: %s\\n\" % e)" + } + ], + "v2.streamingContinueSession": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# AgentRid | An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/).\nagent_rid = \"ri.aip-agents..agent.732cd5b4-7ca7-4219-aabb-6e976faf63b1\"\n# SessionRid | The Resource Identifier (RID) of the conversation session.\nsession_rid = \"ri.aip-agents..session.292db3b2-b653-4de6-971c-7e97a7b881d6\"\n# Dict[ParameterId, ParameterValue] | Any supplied values for [application variables](https://palantir.com/docs/foundry/agent-studio/application-state/) to pass to the Agent for the exchange.\nparameter_inputs = {\n \"currentCustomerOrders\": {\n \"type\": \"objectSet\",\n \"ontology\": \"example-ontology\",\n \"objectSet\": {\n \"type\": \"filter\",\n \"objectSet\": {\"type\": \"base\", \"objectType\": \"customerOrder\"},\n \"where\": {\"type\": \"eq\", \"field\": \"customerId\", \"value\": \"123abc\"},\n },\n }\n}\n# UserTextInput | The user message for the Agent to respond to.\nuser_input = {\"text\": \"What is the status of my order?\"}\n# Optional[List[InputContext]] | If set, automatic [context](https://palantir.com/docs/foundry/agent-studio/retrieval-context/) retrieval is skipped and the list of specified context is provided to the Agent instead. If omitted, relevant context for the user message is automatically retrieved and included in the prompt, based on data sources configured on the Agent for the session.\ncontexts_override = None\n# Optional[MessageId] | A client-generated Universally Unique Identifier (UUID) to identify the message, which the client can use to cancel the exchange before the streaming response is complete.\nmessage_id = \"00f8412a-c29d-4063-a417-8052825285a5\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n# Optional[SessionTraceId] | The unique identifier to use for this continue session trace. By generating and passing this ID to the `streamingContinue` endpoint, clients can use this trace ID to separately load details of the trace used to generate a result, while the result is in progress. If omitted, it will be generated automatically. Clients can check the generated ID by inspecting the `sessionTraceId` in the `SessionExchangeResult`, which can be loaded via the `getContent` endpoint.\nsession_trace_id = \"12345678-1234-5678-1234-123456789abc\"\n\n\ntry:\n api_response = client.aip_agents.Agent.Session.streaming_continue(\n agent_rid,\n session_rid,\n parameter_inputs=parameter_inputs,\n user_input=user_input,\n contexts_override=contexts_override,\n message_id=message_id,\n preview=preview,\n session_trace_id=session_trace_id,\n )\n print(\"The streaming_continue response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Session.streaming_continue: %s\\n\" % e)" + } + ], + "v2.updateSessionTitle": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# AgentRid | An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/).\nagent_rid = \"ri.aip-agents..agent.732cd5b4-7ca7-4219-aabb-6e976faf63b1\"\n# SessionRid | The Resource Identifier (RID) of the conversation session.\nsession_rid = \"ri.aip-agents..session.292db3b2-b653-4de6-971c-7e97a7b881d6\"\n# str | The new title for the session. The maximum title length is 200 characters. Titles are truncated if they exceed this length.\ntitle = \"Order status 02/01\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.aip_agents.Agent.Session.update_title(\n agent_rid, session_rid, title=title, preview=preview\n )\n print(\"The update_title response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Session.update_title: %s\\n\" % e)" + } + ], + "v2.getSessionTrace": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# AgentRid | An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/).\nagent_rid = \"ri.aip-agents..agent.732cd5b4-7ca7-4219-aabb-6e976faf63b1\"\n# SessionRid | The Resource Identifier (RID) of the conversation session.\nsession_rid = \"ri.aip-agents..session.292db3b2-b653-4de6-971c-7e97a7b881d6\"\n# SessionTraceId | The unique identifier for the trace.\nsession_trace_id = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.aip_agents.Agent.Session.SessionTrace.get(\n agent_rid, session_rid, session_trace_id, preview=preview\n )\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling SessionTrace.get: %s\\n\" % e)" + } + ], + "v2.getLogFileContent": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OrganizationRid\norganization_rid = None\n# FileId\nlog_file_id = None\n\n\ntry:\n api_response = client.audit.Organization.LogFile.content(organization_rid, log_file_id)\n print(\"The content response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling LogFile.content: %s\\n\" % e)" + } + ], + "v2.listLogFiles": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OrganizationRid\norganization_rid = None\n# Optional[date] | List log files for audit events up until this date (inclusive). If absent, defaults to no end date. Use the returned `nextPageToken` to continually poll the `listLogFiles` endpoint to list the latest available logs.\nend_date = \"2025-01-01\"\n# Optional[PageSize] | The page size to use for the endpoint.\npage_size = None\n# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request.\npage_token = None\n# Optional[date] | List log files for audit events starting from this date. This parameter is required for the initial request (when `pageToken` is not provided).\nstart_date = \"2024-01-01\"\n\n\ntry:\n for log_file in client.audit.Organization.LogFile.list(\n organization_rid,\n end_date=end_date,\n page_size=page_size,\n page_token=page_token,\n start_date=start_date,\n ):\n pprint(log_file)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling LogFile.list: %s\\n\" % e)" + } + ], + "v2.createConnection": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# CreateConnectionRequestConnectionConfiguration\nconfiguration = {\n \"type\": \"jdbc\",\n \"url\": \"jdbc:postgresql://localhost:5432/test\",\n \"driverClass\": \"org.postgresql.Driver\",\n}\n# ConnectionDisplayName | The display name of the Connection. The display name must not be blank.\ndisplay_name = \"Connection to my external system\"\n# FolderRid\nparent_folder_rid = \"ri.compass.main.folder.c410f510-2937-420e-8ea3-8c9bcb3c1791\"\n# CreateConnectionRequestConnectionWorker\nworker = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.connectivity.Connection.create(\n configuration=configuration,\n display_name=display_name,\n parent_folder_rid=parent_folder_rid,\n worker=worker,\n preview=preview,\n )\n print(\"The create response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Connection.create: %s\\n\" % e)" + } + ], + "v2.getConnection": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ConnectionRid\nconnection_rid = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.connectivity.Connection.get(connection_rid, preview=preview)\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Connection.get: %s\\n\" % e)" + } + ], + "v2.getConfiguration": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ConnectionRid\nconnection_rid = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.connectivity.Connection.get_configuration(connection_rid, preview=preview)\n print(\"The get_configuration response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Connection.get_configuration: %s\\n\" % e)" + } + ], + "v2.getConfigurationConnectionsBatch": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# List[GetConfigurationConnectionsBatchRequestElement] | Body of the request\nbody = [{\"connectionRid\": \"ri.magritte..source.c078b71b-92f9-41b6-b0df-3760f411120b\"}]\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.connectivity.Connection.get_configuration_batch(body, preview=preview)\n print(\"The get_configuration_batch response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Connection.get_configuration_batch: %s\\n\" % e)" + } + ], + "v2.updateExportSettingsForConnection": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ConnectionRid\nconnection_rid = None\n# ConnectionExportSettings\nexport_settings = {\"exportsEnabled\": True, \"exportEnabledWithoutMarkingsValidation\": False}\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.connectivity.Connection.update_export_settings(\n connection_rid, export_settings=export_settings, preview=preview\n )\n print(\"The update_export_settings response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Connection.update_export_settings: %s\\n\" % e)" + } + ], + "v2.updateSecretsForConnection": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ConnectionRid\nconnection_rid = None\n# Dict[SecretName, PlaintextValue] | The secrets to be updated. The specified secret names must already be configured on the connection.\nsecrets = {\"Password\": \"MySecretPassword\"}\n\n\ntry:\n api_response = client.connectivity.Connection.update_secrets(connection_rid, secrets=secrets)\n print(\"The update_secrets response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Connection.update_secrets: %s\\n\" % e)" + } + ], + "v2.uploadCustomJdbcDriversConnection": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ConnectionRid\nconnection_rid = None\n# bytes | Body of the request\nbody = None\n# str | The file name of the uploaded JDBC driver. Must end with .jar\nfile_name = \"cdata.jdbc.oracle.jar\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.connectivity.Connection.upload_custom_jdbc_drivers(\n connection_rid, body, file_name=file_name, preview=preview\n )\n print(\"The upload_custom_jdbc_drivers response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Connection.upload_custom_jdbc_drivers: %s\\n\" % e)" + } + ], + "v2.createFileImport": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ConnectionRid\nconnection_rid = None\n# DatasetRid | The RID of the output dataset. Can not be modified after the file import is created.\ndataset_rid = \"ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da\"\n# FileImportDisplayName\ndisplay_name = \"My file import\"\n# List[FileImportFilter] | Use filters to limit which files should be imported. Filters are applied in the order they are defined. A different ordering of filters may lead to a more optimized import. [Learn more about optimizing file imports.](https://palantir.com/docs/foundry/data-connection/file-based-syncs/#optimize-file-based-syncs)\nfile_import_filters = [{\"type\": \"pathMatchesFilter\", \"regex\": \"my-subfolder\"}]\n# FileImportMode\nimport_mode = \"SNAPSHOT\"\n# Optional[BranchName] | The branch name in the output dataset that will contain the imported data. Defaults to `master` for most enrollments. Can not be modified after the file import is created.\nbranch_name = \"master\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n# Optional[str] | A subfolder in the external system that will be imported. If not specified, defaults to the root folder of the external system.\nsubfolder = \"subfolder1/subfolder2\"\n\n\ntry:\n api_response = client.connectivity.Connection.FileImport.create(\n connection_rid,\n dataset_rid=dataset_rid,\n display_name=display_name,\n file_import_filters=file_import_filters,\n import_mode=import_mode,\n branch_name=branch_name,\n preview=preview,\n subfolder=subfolder,\n )\n print(\"The create response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling FileImport.create: %s\\n\" % e)" + } + ], + "v2.deleteFileImport": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ConnectionRid\nconnection_rid = None\n# FileImportRid\nfile_import_rid = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.connectivity.Connection.FileImport.delete(\n connection_rid, file_import_rid, preview=preview\n )\n print(\"The delete response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling FileImport.delete: %s\\n\" % e)" + } + ], + "v2.executeFileImport": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ConnectionRid\nconnection_rid = None\n# FileImportRid\nfile_import_rid = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.connectivity.Connection.FileImport.execute(\n connection_rid, file_import_rid, preview=preview\n )\n print(\"The execute response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling FileImport.execute: %s\\n\" % e)" + } + ], + "v2.getFileImport": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ConnectionRid\nconnection_rid = None\n# FileImportRid\nfile_import_rid = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.connectivity.Connection.FileImport.get(\n connection_rid, file_import_rid, preview=preview\n )\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling FileImport.get: %s\\n\" % e)" + } + ], + "v2.listFileImports": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ConnectionRid\nconnection_rid = None\n# Optional[PageSize] | The page size to use for the endpoint.\npage_size = None\n# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request.\npage_token = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n for file_import in client.connectivity.Connection.FileImport.list(\n connection_rid, page_size=page_size, page_token=page_token, preview=preview\n ):\n pprint(file_import)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling FileImport.list: %s\\n\" % e)" + } + ], + "v2.replaceFileImport": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ConnectionRid\nconnection_rid = None\n# FileImportRid\nfile_import_rid = None\n# FileImportDisplayName\ndisplay_name = \"My file import\"\n# List[FileImportFilter] | Use filters to limit which files should be imported. Filters are applied in the order they are defined. A different ordering of filters may lead to a more optimized import. [Learn more about optimizing file imports.](https://palantir.com/docs/foundry/data-connection/file-based-syncs/#optimize-file-based-syncs)\nfile_import_filters = [{\"type\": \"pathMatchesFilter\", \"regex\": \"my-subfolder\"}]\n# FileImportMode\nimport_mode = \"SNAPSHOT\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n# Optional[str] | A subfolder in the external system that will be imported. If not specified, defaults to the root folder of the external system.\nsubfolder = \"subfolder1/subfolder2\"\n\n\ntry:\n api_response = client.connectivity.Connection.FileImport.replace(\n connection_rid,\n file_import_rid,\n display_name=display_name,\n file_import_filters=file_import_filters,\n import_mode=import_mode,\n preview=preview,\n subfolder=subfolder,\n )\n print(\"The replace response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling FileImport.replace: %s\\n\" % e)" + } + ], + "v2.createTableImport": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ConnectionRid\nconnection_rid = None\n# CreateTableImportRequestTableImportConfig\nconfig = {\"type\": \"jdbcImportConfig\", \"query\": \"SELECT * FROM table\"}\n# DatasetRid | The RID of the output dataset. Can not be modified after the table import is created.\ndataset_rid = \"ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da\"\n# TableImportDisplayName\ndisplay_name = \"My table import\"\n# TableImportMode\nimport_mode = \"SNAPSHOT\"\n# Optional[TableImportAllowSchemaChanges] | Allow the TableImport to succeed if the schema of imported rows does not match the existing dataset's schema. Defaults to false for new table imports.\nallow_schema_changes = True\n# Optional[BranchName] | The branch name in the output dataset that will contain the imported data. Defaults to `master` for most enrollments. Can not be modified after the table import is created.\nbranch_name = \"master\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.connectivity.Connection.TableImport.create(\n connection_rid,\n config=config,\n dataset_rid=dataset_rid,\n display_name=display_name,\n import_mode=import_mode,\n allow_schema_changes=allow_schema_changes,\n branch_name=branch_name,\n preview=preview,\n )\n print(\"The create response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling TableImport.create: %s\\n\" % e)" + } + ], + "v2.deleteTableImport": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ConnectionRid\nconnection_rid = None\n# TableImportRid\ntable_import_rid = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.connectivity.Connection.TableImport.delete(\n connection_rid, table_import_rid, preview=preview\n )\n print(\"The delete response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling TableImport.delete: %s\\n\" % e)" + } + ], + "v2.executeTableImport": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ConnectionRid\nconnection_rid = None\n# TableImportRid\ntable_import_rid = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.connectivity.Connection.TableImport.execute(\n connection_rid, table_import_rid, preview=preview\n )\n print(\"The execute response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling TableImport.execute: %s\\n\" % e)" + } + ], + "v2.getTableImport": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ConnectionRid\nconnection_rid = None\n# TableImportRid\ntable_import_rid = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.connectivity.Connection.TableImport.get(\n connection_rid, table_import_rid, preview=preview\n )\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling TableImport.get: %s\\n\" % e)" + } + ], + "v2.listTableImports": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ConnectionRid\nconnection_rid = None\n# Optional[PageSize] | The page size to use for the endpoint.\npage_size = None\n# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request.\npage_token = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n for table_import in client.connectivity.Connection.TableImport.list(\n connection_rid, page_size=page_size, page_token=page_token, preview=preview\n ):\n pprint(table_import)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling TableImport.list: %s\\n\" % e)" + } + ], + "v2.replaceTableImport": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ConnectionRid\nconnection_rid = None\n# TableImportRid\ntable_import_rid = None\n# ReplaceTableImportRequestTableImportConfig\nconfig = {\"type\": \"jdbcImportConfig\", \"query\": \"SELECT * FROM table\"}\n# TableImportDisplayName\ndisplay_name = \"My table import\"\n# TableImportMode\nimport_mode = \"SNAPSHOT\"\n# Optional[TableImportAllowSchemaChanges] | Allow the TableImport to succeed if the schema of imported rows does not match the existing dataset's schema. Defaults to false for new table imports.\nallow_schema_changes = True\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.connectivity.Connection.TableImport.replace(\n connection_rid,\n table_import_rid,\n config=config,\n display_name=display_name,\n import_mode=import_mode,\n allow_schema_changes=allow_schema_changes,\n preview=preview,\n )\n print(\"The replace response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling TableImport.replace: %s\\n\" % e)" + } + ], + "v2.createVirtualTable": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ConnectionRid\nconnection_rid = None\n# VirtualTableConfig\nconfig = None\n# TableName\nname = \"my_table\"\n# FolderRid\nparent_rid = \"ri.compass.main.folder.c410f510-2937-420e-8ea3-8c9bcb3c1791\"\n# Optional[List[MarkingId]]\nmarkings = [\"18212f9a-0e63-4b79-96a0-aae04df23336\"]\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.connectivity.Connection.VirtualTable.create(\n connection_rid,\n config=config,\n name=name,\n parent_rid=parent_rid,\n markings=markings,\n preview=preview,\n )\n print(\"The create response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling VirtualTable.create: %s\\n\" % e)" + } + ], + "v2.createCheck": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# CheckConfig\nconfig = None\n# Optional[CheckIntent]\nintent = \"Check to ensure builds are passing.\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.data_health.Check.create(config=config, intent=intent, preview=preview)\n print(\"The create response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Check.create: %s\\n\" % e)" + } + ], + "v2.deleteCheck": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# CheckRid\ncheck_rid = \"ri.data-health.main.check.8e27b13a-e21b-4232-ae1b-76ccf5ff42b3\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.data_health.Check.delete(check_rid, preview=preview)\n print(\"The delete response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Check.delete: %s\\n\" % e)" + } + ], + "v2.getCheck": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# CheckRid\ncheck_rid = \"ri.data-health.main.check.8e27b13a-e21b-4232-ae1b-76ccf5ff42b3\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.data_health.Check.get(check_rid, preview=preview)\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Check.get: %s\\n\" % e)" + } + ], + "v2.replaceCheck": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# CheckRid\ncheck_rid = \"ri.data-health.main.check.8e27b13a-e21b-4232-ae1b-76ccf5ff42b3\"\n# ReplaceCheckConfig\nconfig = None\n# Optional[CheckIntent]\nintent = \"Check to ensure builds are passing.\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.data_health.Check.replace(\n check_rid, config=config, intent=intent, preview=preview\n )\n print(\"The replace response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Check.replace: %s\\n\" % e)" + } + ], + "v2.getCheckReport": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# CheckReportRid\ncheck_report_rid = \"ri.data-health.main.check-report.a1b2c3d4-e5f6-7890-abcd-ef1234567890\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.data_health.CheckReport.get(check_report_rid, preview=preview)\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling CheckReport.get: %s\\n\" % e)" + } + ], + "v2.createBranch": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid\ndataset_rid = None\n# BranchName\nname = \"master\"\n# Optional[TransactionRid] | The most recent OPEN or COMMITTED transaction on the branch. This will never be an ABORTED transaction.\ntransaction_rid = \"ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4\"\n\n\ntry:\n api_response = client.datasets.Dataset.Branch.create(\n dataset_rid, name=name, transaction_rid=transaction_rid\n )\n print(\"The create response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Branch.create: %s\\n\" % e)" + } + ], + "v2.deleteBranch": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid\ndataset_rid = None\n# BranchName\nbranch_name = None\n\n\ntry:\n api_response = client.datasets.Dataset.Branch.delete(dataset_rid, branch_name)\n print(\"The delete response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Branch.delete: %s\\n\" % e)" + } + ], + "v2.getBranch": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid\ndataset_rid = None\n# BranchName\nbranch_name = None\n\n\ntry:\n api_response = client.datasets.Dataset.Branch.get(dataset_rid, branch_name)\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Branch.get: %s\\n\" % e)" + } + ], + "v2.listBranches": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid\ndataset_rid = None\n# Optional[PageSize] | The page size to use for the endpoint.\npage_size = None\n# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request.\npage_token = None\n\n\ntry:\n for branch in client.datasets.Dataset.Branch.list(\n dataset_rid, page_size=page_size, page_token=page_token\n ):\n pprint(branch)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Branch.list: %s\\n\" % e)" + } + ], + "v2.getBranchTransactionHistory": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid\ndataset_rid = None\n# BranchName\nbranch_name = None\n# Optional[PageSize] | The default pageSize is 20 transactions and the maximum allowed pageSize is 50 transactions\npage_size = None\n# Optional[PageToken]\npage_token = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n for branch in client.datasets.Dataset.Branch.transactions(\n dataset_rid, branch_name, page_size=page_size, page_token=page_token, preview=preview\n ):\n pprint(branch)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Branch.transactions: %s\\n\" % e)" + } + ], + "v2.createDataset": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetName\nname = \"My Dataset\"\n# FolderRid\nparent_folder_rid = \"ri.compass.main.folder.c410f510-2937-420e-8ea3-8c9bcb3c1791\"\n\n\ntry:\n api_response = client.datasets.Dataset.create(name=name, parent_folder_rid=parent_folder_rid)\n print(\"The create response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Dataset.create: %s\\n\" % e)" + } + ], + "v2.getDataset": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid\ndataset_rid = None\n\n\ntry:\n api_response = client.datasets.Dataset.get(dataset_rid)\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Dataset.get: %s\\n\" % e)" + } + ], + "v2.getDatasetHealthChecks": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid\ndataset_rid = None\n# Optional[BranchName] | The name of the Branch. If none is provided, the default Branch name - `master` for most enrollments - will be used.\nbranch_name = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.datasets.Dataset.get_health_checks(\n dataset_rid, branch_name=branch_name, preview=preview\n )\n print(\"The get_health_checks response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Dataset.get_health_checks: %s\\n\" % e)" + } + ], + "v2.getDatasetSchedules": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid\ndataset_rid = None\n# Optional[BranchName] | The name of the Branch. If none is provided, the default Branch name - `master` for most enrollments - will be used.\nbranch_name = None\n# Optional[PageSize]\npage_size = None\n# Optional[PageToken]\npage_token = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n for dataset in client.datasets.Dataset.get_schedules(\n dataset_rid,\n branch_name=branch_name,\n page_size=page_size,\n page_token=page_token,\n preview=preview,\n ):\n pprint(dataset)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Dataset.get_schedules: %s\\n\" % e)" + } + ], + "v2.getDatasetSchema": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid\ndataset_rid = None\n# Optional[BranchName]\nbranch_name = None\n# Optional[TransactionRid] | The Resource Identifier (RID) of the end Transaction. If a user does not provide a value, the RID of the latest committed transaction will be used.\nend_transaction_rid = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n# Optional[VersionId] | The schema version that should be used. If none is provided, the latest version will be used.\nversion_id = None\n\n\ntry:\n api_response = client.datasets.Dataset.get_schema(\n dataset_rid,\n branch_name=branch_name,\n end_transaction_rid=end_transaction_rid,\n preview=preview,\n version_id=version_id,\n )\n print(\"The get_schema response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Dataset.get_schema: %s\\n\" % e)" + } + ], + "v2.getSchemaDatasetsBatch": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# List[GetSchemaDatasetsBatchRequestElement] | Body of the request\nbody = [\n {\n \"endTransactionRid\": \"ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4\",\n \"datasetRid\": \"ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da\",\n \"versionId\": \"0000000d-2acf-537c-a228-3a9fe3cdc523\",\n \"branchName\": \"master\",\n }\n]\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.datasets.Dataset.get_schema_batch(body, preview=preview)\n print(\"The get_schema_batch response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Dataset.get_schema_batch: %s\\n\" % e)" + } + ], + "v2.getDatasetJobs": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid\ndataset_rid = None\n# List[GetDatasetJobsSort]\norder_by = [{\"sortType\": \"BY_STARTED_TIME\", \"sortDirection\": \"DESCENDING\"}]\n# Optional[BranchName] | The name of the Branch. If none is provided, the default Branch name - `master` for most enrollments - will be used.\nbranch_name = None\n# Optional[PageSize] | Max number of results to return. A limit of 1000 on if no limit is supplied in the search request\npage_size = None\n# Optional[PageToken]\npage_token = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n# Optional[GetDatasetJobsQuery]\nwhere = {\n \"type\": \"timeFilter\",\n \"field\": \"SUBMITTED_TIME\",\n \"comparisonType\": \"GTE\",\n \"value\": \"2020-09-30T14:30:00Z\",\n}\n\n\ntry:\n for dataset in client.datasets.Dataset.jobs(\n dataset_rid,\n order_by=order_by,\n branch_name=branch_name,\n page_size=page_size,\n page_token=page_token,\n preview=preview,\n where=where,\n ):\n pprint(dataset)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Dataset.jobs: %s\\n\" % e)" + } + ], + "v2.putDatasetSchema": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid\ndataset_rid = None\n# DatasetSchema | The schema that will be added.\nschema = {\n \"fieldSchemaList\": [\n {\n \"name\": \"id\",\n \"type\": \"LONG\",\n \"nullable\": False,\n \"customMetadata\": {\"description\": \"Primary key\"},\n },\n {\"name\": \"event_time\", \"type\": \"TIMESTAMP\", \"nullable\": False},\n {\"name\": \"price\", \"type\": \"DECIMAL\", \"precision\": 10, \"scale\": 2, \"nullable\": True},\n {\n \"name\": \"tags\",\n \"type\": \"ARRAY\",\n \"nullable\": True,\n \"arraySubtype\": {\"type\": \"STRING\", \"nullable\": False},\n },\n {\n \"name\": \"metrics\",\n \"type\": \"STRUCT\",\n \"nullable\": True,\n \"subSchemas\": [\n {\"name\": \"temperature\", \"type\": \"DOUBLE\", \"nullable\": True},\n {\"name\": \"humidity\", \"type\": \"DOUBLE\", \"nullable\": True},\n ],\n },\n ]\n}\n# Optional[BranchName]\nbranch_name = \"master\"\n# Optional[DataframeReader] | The dataframe reader used for reading the dataset schema. Defaults to PARQUET.\ndataframe_reader = \"PARQUET\"\n# Optional[TransactionRid] | The Resource Identifier (RID) of the end Transaction.\nend_transaction_rid = \"ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.datasets.Dataset.put_schema(\n dataset_rid,\n schema=schema,\n branch_name=branch_name,\n dataframe_reader=dataframe_reader,\n end_transaction_rid=end_transaction_rid,\n preview=preview,\n )\n print(\"The put_schema response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Dataset.put_schema: %s\\n\" % e)" + } + ], + "v2.readTableDataset": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid\ndataset_rid = None\n# TableExportFormat | The export format. Must be `ARROW` or `CSV`.\nformat = None\n# Optional[BranchName] | The name of the Branch.\nbranch_name = None\n# Optional[List[str]] | A subset of the dataset columns to include in the result. Defaults to all columns.\ncolumns = [\"id\", \"firstName\", \"lastName\"]\n# Optional[TransactionRid] | The Resource Identifier (RID) of the end Transaction.\nend_transaction_rid = None\n# Optional[int] | A limit on the number of rows to return. Note that row ordering is non-deterministic.\nrow_limit = None\n# Optional[TransactionRid] | The Resource Identifier (RID) of the start Transaction.\nstart_transaction_rid = None\n\n\ntry:\n api_response = client.datasets.Dataset.read_table(\n dataset_rid,\n format=format,\n branch_name=branch_name,\n columns=columns,\n end_transaction_rid=end_transaction_rid,\n row_limit=row_limit,\n start_transaction_rid=start_transaction_rid,\n )\n print(\"The read_table response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Dataset.read_table: %s\\n\" % e)" + } + ], + "v2.listTransactionsOfDataset": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid\ndataset_rid = None\n# Optional[PageSize] | The page size to use for the endpoint.\npage_size = None\n# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request.\npage_token = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n for dataset in client.datasets.Dataset.transactions(\n dataset_rid, page_size=page_size, page_token=page_token, preview=preview\n ):\n pprint(dataset)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Dataset.transactions: %s\\n\" % e)" + } + ], + "v2.getFileContent": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid\ndataset_rid = None\n# FilePath\nfile_path = None\n# Optional[BranchName] | The name of the Branch that contains the File. Defaults to `master` for most enrollments.\nbranch_name = None\n# Optional[TransactionRid] | The Resource Identifier (RID) of the end Transaction.\nend_transaction_rid = None\n# Optional[TransactionRid] | The Resource Identifier (RID) of the start Transaction.\nstart_transaction_rid = None\n\n\ntry:\n api_response = client.datasets.Dataset.File.content(\n dataset_rid,\n file_path,\n branch_name=branch_name,\n end_transaction_rid=end_transaction_rid,\n start_transaction_rid=start_transaction_rid,\n )\n print(\"The content response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling File.content: %s\\n\" % e)" + } + ], + "v2.deleteFile": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid\ndataset_rid = None\n# FilePath\nfile_path = None\n# Optional[BranchName] | The name of the Branch on which to delete the File. Defaults to `master` for most enrollments.\nbranch_name = None\n# Optional[TransactionRid] | The Resource Identifier (RID) of the open delete Transaction on which to delete the File.\ntransaction_rid = None\n\n\ntry:\n api_response = client.datasets.Dataset.File.delete(\n dataset_rid, file_path, branch_name=branch_name, transaction_rid=transaction_rid\n )\n print(\"The delete response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling File.delete: %s\\n\" % e)" + } + ], + "v2.getFile": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid\ndataset_rid = None\n# FilePath\nfile_path = None\n# Optional[BranchName] | The name of the Branch that contains the File. Defaults to `master` for most enrollments.\nbranch_name = None\n# Optional[TransactionRid] | The Resource Identifier (RID) of the end Transaction.\nend_transaction_rid = None\n# Optional[TransactionRid] | The Resource Identifier (RID) of the start Transaction.\nstart_transaction_rid = None\n\n\ntry:\n api_response = client.datasets.Dataset.File.get(\n dataset_rid,\n file_path,\n branch_name=branch_name,\n end_transaction_rid=end_transaction_rid,\n start_transaction_rid=start_transaction_rid,\n )\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling File.get: %s\\n\" % e)" + } + ], + "v2.listFiles": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid\ndataset_rid = None\n# Optional[BranchName] | The name of the Branch on which to list Files. Defaults to `master` for most enrollments.\nbranch_name = None\n# Optional[TransactionRid] | The Resource Identifier (RID) of the end Transaction.\nend_transaction_rid = None\n# Optional[PageSize] | The page size to use for the endpoint.\npage_size = None\n# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request.\npage_token = None\n# Optional[TransactionRid] | The Resource Identifier (RID) of the start Transaction.\nstart_transaction_rid = None\n\n\ntry:\n for file in client.datasets.Dataset.File.list(\n dataset_rid,\n branch_name=branch_name,\n end_transaction_rid=end_transaction_rid,\n page_size=page_size,\n page_token=page_token,\n start_transaction_rid=start_transaction_rid,\n ):\n pprint(file)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling File.list: %s\\n\" % e)" + } + ], + "v2.uploadFile": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid\ndataset_rid = None\n# FilePath\nfile_path = None\n# bytes | Body of the request\nbody = None\n# Optional[BranchName] | The name of the Branch on which to upload the File. Defaults to `master` for most enrollments.\nbranch_name = None\n# Optional[TransactionRid] | The Resource Identifier (RID) of the open Transaction on which to upload the File.\ntransaction_rid = None\n# Optional[TransactionType] | The type of the Transaction to create when using branchName. Defaults to `UPDATE`.\ntransaction_type = None\n\n\ntry:\n api_response = client.datasets.Dataset.File.upload(\n dataset_rid,\n file_path,\n body,\n branch_name=branch_name,\n transaction_rid=transaction_rid,\n transaction_type=transaction_type,\n )\n print(\"The upload response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling File.upload: %s\\n\" % e)" + } + ], + "v2.abortTransaction": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid\ndataset_rid = None\n# TransactionRid\ntransaction_rid = None\n\n\ntry:\n api_response = client.datasets.Dataset.Transaction.abort(dataset_rid, transaction_rid)\n print(\"The abort response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Transaction.abort: %s\\n\" % e)" + } + ], + "v2.buildTransaction": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid\ndataset_rid = None\n# TransactionRid\ntransaction_rid = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.datasets.Dataset.Transaction.build(\n dataset_rid, transaction_rid, preview=preview\n )\n print(\"The build response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Transaction.build: %s\\n\" % e)" + } + ], + "v2.commitTransaction": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid\ndataset_rid = None\n# TransactionRid\ntransaction_rid = None\n\n\ntry:\n api_response = client.datasets.Dataset.Transaction.commit(dataset_rid, transaction_rid)\n print(\"The commit response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Transaction.commit: %s\\n\" % e)" + } + ], + "v2.createTransaction": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid\ndataset_rid = None\n# TransactionType\ntransaction_type = \"APPEND\"\n# Optional[BranchName] | The name of the Branch on which to create the Transaction. Defaults to `master` for most enrollments.\nbranch_name = None\n\n\ntry:\n api_response = client.datasets.Dataset.Transaction.create(\n dataset_rid, transaction_type=transaction_type, branch_name=branch_name\n )\n print(\"The create response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Transaction.create: %s\\n\" % e)" + } + ], + "v2.getTransaction": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid\ndataset_rid = None\n# TransactionRid\ntransaction_rid = None\n\n\ntry:\n api_response = client.datasets.Dataset.Transaction.get(dataset_rid, transaction_rid)\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Transaction.get: %s\\n\" % e)" + } + ], + "v2.jobTransaction": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid\ndataset_rid = None\n# TransactionRid\ntransaction_rid = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.datasets.Dataset.Transaction.job(\n dataset_rid, transaction_rid, preview=preview\n )\n print(\"The job response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Transaction.job: %s\\n\" % e)" + } + ], + "v2.addBackingDatasets": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid | The rid of the View.\nview_dataset_rid = None\n# List[ViewBackingDataset]\nbacking_datasets = [\n {\n \"datasetRid\": \"ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da\",\n \"branch\": \"master\",\n }\n]\n# Optional[BranchName]\nbranch = \"master\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.datasets.View.add_backing_datasets(\n view_dataset_rid, backing_datasets=backing_datasets, branch=branch, preview=preview\n )\n print(\"The add_backing_datasets response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling View.add_backing_datasets: %s\\n\" % e)" + } + ], + "v2.addPrimaryKey": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid | The rid of the View.\nview_dataset_rid = None\n# ViewPrimaryKey\nprimary_key = {\n \"columns\": [\"colA\"],\n \"resolution\": {\n \"type\": \"duplicate\",\n \"deletionColumn\": \"deletionCol\",\n \"resolutionStrategy\": {\"type\": \"latestWins\", \"columns\": [\"colB\", \"colC\"]},\n },\n}\n# Optional[BranchName]\nbranch = \"master\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.datasets.View.add_primary_key(\n view_dataset_rid, primary_key=primary_key, branch=branch, preview=preview\n )\n print(\"The add_primary_key response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling View.add_primary_key: %s\\n\" % e)" + } + ], + "v2.createView": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# List[ViewBackingDataset]\nbacking_datasets = [\n {\n \"datasetRid\": \"ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da\",\n \"branch\": \"master\",\n }\n]\n# FolderRid\nparent_folder_rid = \"ri.compass.main.folder.c410f510-2937-420e-8ea3-8c9bcb3c1791\"\n# DatasetName\nview_name = \"My Dataset\"\n# Optional[BranchName] | The branch name of the View. If not specified, defaults to `master` for most enrollments.\nbranch = \"master\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n# Optional[ViewPrimaryKey]\nprimary_key = {\"columns\": [\"order_id\"]}\n\n\ntry:\n api_response = client.datasets.View.create(\n backing_datasets=backing_datasets,\n parent_folder_rid=parent_folder_rid,\n view_name=view_name,\n branch=branch,\n preview=preview,\n primary_key=primary_key,\n )\n print(\"The create response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling View.create: %s\\n\" % e)" + } + ], + "v2.getView": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid | The rid of the View.\nview_dataset_rid = None\n# Optional[BranchName]\nbranch = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.datasets.View.get(view_dataset_rid, branch=branch, preview=preview)\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling View.get: %s\\n\" % e)" + } + ], + "v2.removeBackingDatasets": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid | The rid of the View.\nview_dataset_rid = None\n# List[ViewBackingDataset]\nbacking_datasets = [\n {\n \"datasetRid\": \"ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da\",\n \"branch\": \"master\",\n }\n]\n# Optional[BranchName]\nbranch = \"master\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.datasets.View.remove_backing_datasets(\n view_dataset_rid, backing_datasets=backing_datasets, branch=branch, preview=preview\n )\n print(\"The remove_backing_datasets response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling View.remove_backing_datasets: %s\\n\" % e)" + } + ], + "v2.replaceBackingDatasets": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid | The rid of the View.\nview_dataset_rid = None\n# List[ViewBackingDataset]\nbacking_datasets = [\n {\n \"datasetRid\": \"ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da\",\n \"branch\": \"master\",\n }\n]\n# Optional[BranchName]\nbranch = \"master\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.datasets.View.replace_backing_datasets(\n view_dataset_rid, backing_datasets=backing_datasets, branch=branch, preview=preview\n )\n print(\"The replace_backing_datasets response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling View.replace_backing_datasets: %s\\n\" % e)" + } + ], + "v2.listChildrenOfFolder": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# FolderRid\nfolder_rid = \"ri.compass.main.folder.01a79a9d-e293-48db-a585-9ffe221536e8\"\n# Optional[PageSize] | The page size to use for the endpoint.\npage_size = None\n# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request.\npage_token = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n for folder in client.filesystem.Folder.children(\n folder_rid, page_size=page_size, page_token=page_token, preview=preview\n ):\n pprint(folder)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Folder.children: %s\\n\" % e)" + } + ], + "v2.createFolder": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ResourceDisplayName\ndisplay_name = \"My Folder\"\n# FolderRid | The parent folder Resource Identifier (RID). For Projects, this will be the Space RID and for Spaces, this value will be the root folder (`ri.compass.main.folder.0`).\nparent_folder_rid = \"ri.compass.main.folder.4cae7c13-b59f-48f6-9ef2-dbde603e4e33\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.filesystem.Folder.create(\n display_name=display_name, parent_folder_rid=parent_folder_rid, preview=preview\n )\n print(\"The create response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Folder.create: %s\\n\" % e)" + } + ], + "v2.getFolder": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# FolderRid\nfolder_rid = \"ri.compass.main.folder.01a79a9d-e293-48db-a585-9ffe221536e8\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.filesystem.Folder.get(folder_rid, preview=preview)\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Folder.get: %s\\n\" % e)" + } + ], + "v2.getFoldersBatch": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# List[GetFoldersBatchRequestElement] | Body of the request\nbody = [{\"folderRid\": \"ri.compass.main.folder.01a79a9d-e293-48db-a585-9ffe221536e8\"}]\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.filesystem.Folder.get_batch(body, preview=preview)\n print(\"The get_batch response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Folder.get_batch: %s\\n\" % e)" + } + ], + "v2.addOrganizations": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ProjectRid\nproject_rid = \"ri.compass.main.folder.01a79a9d-e293-48db-a585-9ffe221536e8\"\n# List[OrganizationRid]\norganization_rids = [\"ri.multipass..organization.c30ee6ad-b5e4-4afe-a74f-fe4a289f2faa\"]\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.filesystem.Project.add_organizations(\n project_rid, organization_rids=organization_rids, preview=preview\n )\n print(\"The add_organizations response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Project.add_organizations: %s\\n\" % e)" + } + ], + "v2.createProject": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# List[RoleId]\ndefault_roles = [\"8bf49052-dc37-4528-8bf0-b551cfb71268\"]\n# ResourceDisplayName\ndisplay_name = \"My Important Project\"\n# List[OrganizationRid]\norganization_rids = [\"ri.multipass..organization.c30ee6ad-b5e4-4afe-a74f-fe4a289f2faa\"]\n# Dict[RoleId, List[PrincipalWithId]]\nrole_grants = {\n \"8bf49052-dc37-4528-8bf0-b551cfb71268\": [\n {\"principalId\": \"f05f8da4-b84c-4fca-9c77-8af0b13d11de\", \"principalType\": \"GROUP\"}\n ]\n}\n# SpaceRid\nspace_rid = \"ri.compass.main.folder.a86ad5f5-3db5-48e4-9fdd-00aa3e5731ca\"\n# Optional[str]\ndescription = \"project description\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.filesystem.Project.create(\n default_roles=default_roles,\n display_name=display_name,\n organization_rids=organization_rids,\n role_grants=role_grants,\n space_rid=space_rid,\n description=description,\n preview=preview,\n )\n print(\"The create response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Project.create: %s\\n\" % e)" + } + ], + "v2.createProjectFromTemplate": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ProjectTemplateRid\ntemplate_rid = \"ri.compass.main.template.c410f510-2937-420e-8ea3-8c9bcb3c1791\"\n# Dict[ProjectTemplateVariableId, ProjectTemplateVariableValue]\nvariable_values = {\"name\": \"my project name\"}\n# Optional[List[RoleId]]\ndefault_roles = [\"8bf49052-dc37-4528-8bf0-b551cfb71268\"]\n# Optional[List[OrganizationRid]]\norganization_rids = [\"ri.multipass..organization.c30ee6ad-b5e4-4afe-a74f-fe4a289f2faa\"]\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n# Optional[str]\nproject_description = None\n\n\ntry:\n api_response = client.filesystem.Project.create_from_template(\n template_rid=template_rid,\n variable_values=variable_values,\n default_roles=default_roles,\n organization_rids=organization_rids,\n preview=preview,\n project_description=project_description,\n )\n print(\"The create_from_template response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Project.create_from_template: %s\\n\" % e)" + } + ], + "v2.getProject": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ProjectRid\nproject_rid = \"ri.compass.main.folder.01a79a9d-e293-48db-a585-9ffe221536e8\"\n\n\ntry:\n api_response = client.filesystem.Project.get(project_rid)\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Project.get: %s\\n\" % e)" + } + ], + "v2.listOrganizationsOfProject": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ProjectRid\nproject_rid = \"ri.compass.main.folder.01a79a9d-e293-48db-a585-9ffe221536e8\"\n# Optional[PageSize] | The page size to use for the endpoint.\npage_size = None\n# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request.\npage_token = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n for project in client.filesystem.Project.organizations(\n project_rid, page_size=page_size, page_token=page_token, preview=preview\n ):\n pprint(project)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Project.organizations: %s\\n\" % e)" + } + ], + "v2.removeOrganizations": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ProjectRid\nproject_rid = \"ri.compass.main.folder.01a79a9d-e293-48db-a585-9ffe221536e8\"\n# List[OrganizationRid]\norganization_rids = [\"ri.multipass..organization.c30ee6ad-b5e4-4afe-a74f-fe4a289f2faa\"]\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.filesystem.Project.remove_organizations(\n project_rid, organization_rids=organization_rids, preview=preview\n )\n print(\"The remove_organizations response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Project.remove_organizations: %s\\n\" % e)" + } + ], + "v2.replaceProject": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ProjectRid\nproject_rid = \"ri.compass.main.folder.01a79a9d-e293-48db-a585-9ffe221536e8\"\n# ResourceDisplayName | The display name of the Project. Must be unique and cannot contain a /\ndisplay_name = \"My Important Project\"\n# Optional[str] | The description associated with the Project.\ndescription = \"project description\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.filesystem.Project.replace(\n project_rid, display_name=display_name, description=description, preview=preview\n )\n print(\"The replace response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Project.replace: %s\\n\" % e)" + } + ], + "v2.addMarkings": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ResourceRid\nresource_rid = \"ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da\"\n# List[MarkingId]\nmarking_ids = [\"18212f9a-0e63-4b79-96a0-aae04df23336\"]\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.filesystem.Resource.add_markings(\n resource_rid, marking_ids=marking_ids, preview=preview\n )\n print(\"The add_markings response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Resource.add_markings: %s\\n\" % e)" + } + ], + "v2.deleteResource": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ResourceRid\nresource_rid = \"ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.filesystem.Resource.delete(resource_rid, preview=preview)\n print(\"The delete response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Resource.delete: %s\\n\" % e)" + } + ], + "v2.getResource": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ResourceRid\nresource_rid = \"ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.filesystem.Resource.get(resource_rid, preview=preview)\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Resource.get: %s\\n\" % e)" + } + ], + "v2.getAccessRequirements": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ResourceRid\nresource_rid = \"ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.filesystem.Resource.get_access_requirements(resource_rid, preview=preview)\n print(\"The get_access_requirements response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Resource.get_access_requirements: %s\\n\" % e)" + } + ], + "v2.getResourcesBatch": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# List[GetResourcesBatchRequestElement] | Body of the request\nbody = [{\"resourceRid\": \"ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da\"}]\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.filesystem.Resource.get_batch(body, preview=preview)\n print(\"The get_batch response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Resource.get_batch: %s\\n\" % e)" + } + ], + "v2.getByPath": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ResourcePath | The path to the Resource. The leading slash is optional.\npath = \"/My Organization-abcd/My Important Project/My Dataset\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.filesystem.Resource.get_by_path(path=path, preview=preview)\n print(\"The get_by_path response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Resource.get_by_path: %s\\n\" % e)" + } + ], + "v2.getByPathResourcesBatch": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# List[GetByPathResourcesBatchRequestElement] | Body of the request\nbody = [{\"path\": \"/My Organization-abcd/My Important Project/My Dataset\"}]\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.filesystem.Resource.get_by_path_batch(body, preview=preview)\n print(\"The get_by_path_batch response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Resource.get_by_path_batch: %s\\n\" % e)" + } + ], + "v2.listMarkingsOfResource": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ResourceRid\nresource_rid = \"ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da\"\n# Optional[PageSize] | The page size to use for the endpoint.\npage_size = None\n# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request.\npage_token = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n for resource in client.filesystem.Resource.markings(\n resource_rid, page_size=page_size, page_token=page_token, preview=preview\n ):\n pprint(resource)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Resource.markings: %s\\n\" % e)" + } + ], + "v2.permanentlyDeleteResource": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ResourceRid\nresource_rid = \"ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.filesystem.Resource.permanently_delete(resource_rid, preview=preview)\n print(\"The permanently_delete response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Resource.permanently_delete: %s\\n\" % e)" + } + ], + "v2.removeMarkings": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ResourceRid\nresource_rid = \"ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da\"\n# List[MarkingId]\nmarking_ids = [\"18212f9a-0e63-4b79-96a0-aae04df23336\"]\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.filesystem.Resource.remove_markings(\n resource_rid, marking_ids=marking_ids, preview=preview\n )\n print(\"The remove_markings response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Resource.remove_markings: %s\\n\" % e)" + } + ], + "v2.restoreResource": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ResourceRid\nresource_rid = \"ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.filesystem.Resource.restore(resource_rid, preview=preview)\n print(\"The restore response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Resource.restore: %s\\n\" % e)" + } + ], + "v2.addResourceRoles": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ResourceRid\nresource_rid = \"ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da\"\n# List[ResourceRoleIdentifier]\nroles = [\n {\n \"resourceRolePrincipal\": {\n \"type\": \"principalIdOnly\",\n \"principalId\": \"f05f8da4-b84c-4fca-9c77-8af0b13d11de\",\n },\n \"roleId\": \"8bf49052-dc37-4528-8bf0-b551cfb71268\",\n }\n]\n\n\ntry:\n api_response = client.filesystem.Resource.Role.add(resource_rid, roles=roles)\n print(\"The add response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Role.add: %s\\n\" % e)" + } + ], + "v2.listResourceRoles": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ResourceRid\nresource_rid = \"ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da\"\n# Optional[bool] | Whether to include inherited roles on the resource.\ninclude_inherited = None\n# Optional[PageSize] | The page size to use for the endpoint.\npage_size = None\n# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request.\npage_token = None\n\n\ntry:\n for resource_role in client.filesystem.Resource.Role.list(\n resource_rid,\n include_inherited=include_inherited,\n page_size=page_size,\n page_token=page_token,\n ):\n pprint(resource_role)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Role.list: %s\\n\" % e)" + } + ], + "v2.removeResourceRoles": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ResourceRid\nresource_rid = \"ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da\"\n# List[ResourceRoleIdentifier]\nroles = [\n {\n \"resourceRolePrincipal\": {\n \"type\": \"principalIdOnly\",\n \"principalId\": \"f05f8da4-b84c-4fca-9c77-8af0b13d11de\",\n },\n \"roleId\": \"8bf49052-dc37-4528-8bf0-b551cfb71268\",\n }\n]\n\n\ntry:\n api_response = client.filesystem.Resource.Role.remove(resource_rid, roles=roles)\n print(\"The remove response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Role.remove: %s\\n\" % e)" + } + ], + "v2.createSpace": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# List[OrganizationRid] | By default, this Space will use a Last Out deletion policy, meaning that this Space and its projects will be deleted when the last Organization listed here is deleted. Only Organizations in the Space's Enrollment can be included here.\ndeletion_policy_organizations = [\"ri.multipass..organization.c30ee6ad-b5e4-4afe-a74f-fe4a289f2faa\"]\n# ResourceDisplayName\ndisplay_name = \"My Space\"\n# EnrollmentRid | The RID of the Enrollment that this Space belongs to.\nenrollment_rid = \"ri.control-panel.main.customer.466f812b-f974-4478-9d4f-90402cd3def6\"\n# List[OrganizationRid] | The list of Organizations that are provisioned access to this Space. In order to access this Space, a user must be a member of at least one of these Organizations.\norganizations = [\"ri.multipass..organization.c30ee6ad-b5e4-4afe-a74f-fe4a289f2faa\"]\n# Optional[RoleSetId] | The ID of the default Role Set for this Space, which defines the set of roles that Projects in this Space must use. If not provided, the default Role Set for Projects will be used.\ndefault_role_set_id = \"3181190f-f6b8-4649-90ec-64fa2d847204\"\n# Optional[str] | The description of the Space.\ndescription = \"This space is for xyz\"\n# Optional[FileSystemId] | The ID of the Filesystem for this Space, which is where the contents of the Space are stored. If not provided, the default Filesystem for this Enrollment will be used.\nfile_system_id = \"hdfs\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n# Optional[UsageAccountRid] | The RID of the Usage Account for this Space. Resource usage for projects in this space will accrue to this Usage Account by default. If not provided, the default Usage Account for this Enrollment will be used.\nusage_account_rid = (\n \"ri.resource-policy-manager.global.usage-account.0c91194d-b5e3-4c4f-b96f-7a7f3f50e95c\"\n)\n\n\ntry:\n api_response = client.filesystem.Space.create(\n deletion_policy_organizations=deletion_policy_organizations,\n display_name=display_name,\n enrollment_rid=enrollment_rid,\n organizations=organizations,\n default_role_set_id=default_role_set_id,\n description=description,\n file_system_id=file_system_id,\n preview=preview,\n usage_account_rid=usage_account_rid,\n )\n print(\"The create response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Space.create: %s\\n\" % e)" + } + ], + "v2.deleteSpace": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# SpaceRid\nspace_rid = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.filesystem.Space.delete(space_rid, preview=preview)\n print(\"The delete response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Space.delete: %s\\n\" % e)" + } + ], + "v2.getSpace": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# SpaceRid\nspace_rid = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.filesystem.Space.get(space_rid, preview=preview)\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Space.get: %s\\n\" % e)" + } + ], + "v2.listSpaces": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# Optional[PageSize] | The page size to use for the endpoint.\npage_size = None\n# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request.\npage_token = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n for space in client.filesystem.Space.list(\n page_size=page_size, page_token=page_token, preview=preview\n ):\n pprint(space)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Space.list: %s\\n\" % e)" + } + ], + "v2.replaceSpace": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# SpaceRid\nspace_rid = None\n# ResourceDisplayName\ndisplay_name = \"My Space\"\n# Optional[RoleSetId] | The ID of the default Role Set for this Space, which defines the set of roles that Projects in this Space must use. If not provided, the default Role Set for Projects will be used.\ndefault_role_set_id = \"3181190f-f6b8-4649-90ec-64fa2d847204\"\n# Optional[str] | The description of the Space.\ndescription = \"This space is for xyz\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n# Optional[UsageAccountRid] | The RID of the Usage Account for this Space. Resource usage for projects in this space will accrue to this Usage Account by default. If not provided, the default Usage Account for this Enrollment will be used.\nusage_account_rid = (\n \"ri.resource-policy-manager.global.usage-account.0c91194d-b5e3-4c4f-b96f-7a7f3f50e95c\"\n)\n\n\ntry:\n api_response = client.filesystem.Space.replace(\n space_rid,\n display_name=display_name,\n default_role_set_id=default_role_set_id,\n description=description,\n preview=preview,\n usage_account_rid=usage_account_rid,\n )\n print(\"The replace response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Space.replace: %s\\n\" % e)" + } + ], + "v2.executeQuery": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# QueryApiName\nquery_api_name = None\n# Dict[ParameterId, Optional[DataValue]]\nparameters = None\n# Optional[Attribution]\nattribution = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n# Optional[TraceParent]\ntrace_parent = None\n# Optional[TraceState]\ntrace_state = None\n# Optional[TransactionId] | The ID of a transaction to read from. Transactions are an experimental feature and all workflows may not be supported.\ntransaction_id = None\n# Optional[FunctionVersion]\nversion = None\n\n\ntry:\n api_response = client.functions.Query.execute(\n query_api_name,\n parameters=parameters,\n attribution=attribution,\n preview=preview,\n trace_parent=trace_parent,\n trace_state=trace_state,\n transaction_id=transaction_id,\n version=version,\n )\n print(\"The execute response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Query.execute: %s\\n\" % e)" + } + ], + "v2.getQuery": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# QueryApiName\nquery_api_name = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n# Optional[FunctionVersion]\nversion = None\n\n\ntry:\n api_response = client.functions.Query.get(query_api_name, preview=preview, version=version)\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Query.get: %s\\n\" % e)" + } + ], + "v2.getByRidQueries": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# FunctionRid\nrid = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n# Optional[FunctionVersion]\nversion = None\n\n\ntry:\n api_response = client.functions.Query.get_by_rid(rid=rid, preview=preview, version=version)\n print(\"The get_by_rid response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Query.get_by_rid: %s\\n\" % e)" + } + ], + "v2.streamingExecuteQuery": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# QueryApiName\nquery_api_name = None\n# Dict[ParameterId, Optional[DataValue]]\nparameters = None\n# Optional[Attribution]\nattribution = None\n# Optional[OntologyIdentifier] | Optional ontology identifier (RID or API name). When provided, executes an ontology-scoped function. When omitted, executes a global function.\nontology = \"example-ontology\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n# Optional[TraceParent]\ntrace_parent = None\n# Optional[TraceState]\ntrace_state = None\n# Optional[TransactionId] | The ID of a transaction to read from. Transactions are an experimental feature and all workflows may not be supported.\ntransaction_id = None\n# Optional[FunctionVersion]\nversion = None\n\n\ntry:\n api_response = client.functions.Query.streaming_execute(\n query_api_name,\n parameters=parameters,\n attribution=attribution,\n ontology=ontology,\n preview=preview,\n trace_parent=trace_parent,\n trace_state=trace_state,\n transaction_id=transaction_id,\n version=version,\n )\n print(\"The streaming_execute response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Query.streaming_execute: %s\\n\" % e)" + } + ], + "v2.getValueType": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ValueTypeRid\nvalue_type_rid = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.functions.ValueType.get(value_type_rid, preview=preview)\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling ValueType.get: %s\\n\" % e)" + } + ], + "v2.getVersionId": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ValueTypeRid\nvalue_type_rid = None\n# ValueTypeVersionId\nversion_id_version_id = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.functions.ValueType.VersionId.get(\n value_type_rid, version_id_version_id, preview=preview\n )\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling VersionId.get: %s\\n\" % e)" + } + ], + "v2.anthropicMessages": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# LanguageModelApiName\nanthropic_model_model_id = None\n# int | The maximum number of tokens to generate before stopping.\nmax_tokens = None\n# List[AnthropicMessage] | Input messages to the model. This can include a single user-role message or multiple messages with alternating user and assistant roles.\nmessages = [{\"role\": \"USER\"}]\n# Optional[Attribution]\nattribution = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n# Optional[List[str]] | Custom text sequences that will cause the model to stop generating.\nstop_sequences = None\n# Optional[List[AnthropicSystemMessage]] | A system prompt is a way of providing context and instructions to Claude, such as specifying a particular goal or role. As of now, sending multiple system prompts is not supported.\nsystem = None\n# Optional[float] | Amount of randomness injected into the response. Ranges from 0.0 to 1.0. Note that even with temperature of 0.0, the results will not be fully deterministic. Defaults to 1.0\ntemperature = None\n# Optional[AnthropicThinkingConfig] | Configuration for enabling Claude's extended thinking.\nthinking = None\n# Optional[AnthropicToolChoice] | How the model should use the provided tools.\ntool_choice = None\n# Optional[List[AnthropicTool]] | Definitions of tools that the model may use.\ntools = None\n# Optional[int] | Only sample from the top K options for each subsequent token.\ntop_k = None\n# Optional[float] | Use nucleus sampling. You should either alter temperature or top_p, but not both\ntop_p = None\n\n\ntry:\n api_response = client.language_models.AnthropicModel.messages(\n anthropic_model_model_id,\n max_tokens=max_tokens,\n messages=messages,\n attribution=attribution,\n preview=preview,\n stop_sequences=stop_sequences,\n system=system,\n temperature=temperature,\n thinking=thinking,\n tool_choice=tool_choice,\n tools=tools,\n top_k=top_k,\n top_p=top_p,\n )\n print(\"The messages response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling AnthropicModel.messages: %s\\n\" % e)" + } + ], + "v2.openAiEmbeddings": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# LanguageModelApiName\nopen_ai_model_model_id = None\n# OpenAiEmbeddingInput | Input text to embed, encoded as an array of strings. Each input must not exceed the max input tokens for the model (8192 tokens for all embedding models).\ninput = None\n# Optional[Attribution]\nattribution = None\n# Optional[int] | The number of dimensions the resulting output embeddings should have. Only supported in text-embedding-3 and later models.\ndimensions = None\n# Optional[OpenAiEncodingFormat] | The format to return the embeddings in. Can be either float or base64.\nencoding_format = \"FLOAT\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.language_models.OpenAiModel.embeddings(\n open_ai_model_model_id,\n input=input,\n attribution=attribution,\n dimensions=dimensions,\n encoding_format=encoding_format,\n preview=preview,\n )\n print(\"The embeddings response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling OpenAiModel.embeddings: %s\\n\" % e)" + } + ], + "v2.abortMediaTransaction": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# MediaSetRid\nmedia_set_rid = None\n# TransactionId\ntransaction_id = None\n# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode.\npreview = None\n\n\ntry:\n api_response = client.media_sets.MediaSet.abort(media_set_rid, transaction_id, preview=preview)\n print(\"The abort response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling MediaSet.abort: %s\\n\" % e)" + } + ], + "v2.calculateImageMediaItemThumbnail": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# MediaSetRid | The RID of the media set.\nmedia_set_rid = None\n# MediaItemRid | The RID of the media item.\nmedia_item_rid = None\n# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode.\npreview = None\n# Optional[MediaItemReadToken]\nread_token = None\n\n\ntry:\n api_response = client.media_sets.MediaSet.calculate(\n media_set_rid, media_item_rid, preview=preview, read_token=read_token\n )\n print(\"The calculate response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling MediaSet.calculate: %s\\n\" % e)" + } + ], + "v2.commitMediaTransaction": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# MediaSetRid\nmedia_set_rid = None\n# TransactionId\ntransaction_id = None\n# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode.\npreview = None\n\n\ntry:\n api_response = client.media_sets.MediaSet.commit(media_set_rid, transaction_id, preview=preview)\n print(\"The commit response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling MediaSet.commit: %s\\n\" % e)" + } + ], + "v2.createMediaTransaction": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# MediaSetRid\nmedia_set_rid = None\n# Optional[BranchName] | The branch on which to open the transaction. Defaults to `master` for most enrollments.\nbranch_name = None\n# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode.\npreview = None\n\n\ntry:\n api_response = client.media_sets.MediaSet.create(\n media_set_rid, branch_name=branch_name, preview=preview\n )\n print(\"The create response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling MediaSet.create: %s\\n\" % e)" + } + ], + "v2.getMediaItemRidByPath": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# MediaSetRid | The RID of the media set.\nmedia_set_rid = None\n# MediaItemPath | The path of the media item.\nmedia_item_path = None\n# Optional[BranchName] | Specifies the specific branch by name in which to search for this media item. May not be provided if branch rid or view rid are provided.\nbranch_name = None\n# Optional[BranchRid] | Specifies the specific branch by rid in which to search for this media item. May not be provided if branch name or view rid are provided.\nbranch_rid = None\n# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode.\npreview = None\n# Optional[MediaSetViewRid] | Specifies the specific view by rid in which to search for this media item. May not be provided if branch name or branch rid are provided.\nview_rid = None\n\n\ntry:\n api_response = client.media_sets.MediaSet.get_rid_by_path(\n media_set_rid,\n media_item_path=media_item_path,\n branch_name=branch_name,\n branch_rid=branch_rid,\n preview=preview,\n view_rid=view_rid,\n )\n print(\"The get_rid_by_path response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling MediaSet.get_rid_by_path: %s\\n\" % e)" + } + ], + "v2.getMediaItemInfo": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# MediaSetRid | The RID of the media set.\nmedia_set_rid = None\n# MediaItemRid | The RID of the media item.\nmedia_item_rid = None\n# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode.\npreview = None\n# Optional[MediaItemReadToken]\nread_token = None\n\n\ntry:\n api_response = client.media_sets.MediaSet.info(\n media_set_rid, media_item_rid, preview=preview, read_token=read_token\n )\n print(\"The info response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling MediaSet.info: %s\\n\" % e)" + } + ], + "v2.readMediaItem": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# MediaSetRid\nmedia_set_rid = None\n# MediaItemRid\nmedia_item_rid = None\n# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode.\npreview = None\n# Optional[MediaItemReadToken]\nread_token = None\n\n\ntry:\n api_response = client.media_sets.MediaSet.read(\n media_set_rid, media_item_rid, preview=preview, read_token=read_token\n )\n print(\"The read response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling MediaSet.read: %s\\n\" % e)" + } + ], + "v2.readOriginalMediaItem": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# MediaSetRid\nmedia_set_rid = None\n# MediaItemRid\nmedia_item_rid = None\n# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode.\npreview = None\n# Optional[MediaItemReadToken]\nread_token = None\n\n\ntry:\n api_response = client.media_sets.MediaSet.read_original(\n media_set_rid, media_item_rid, preview=preview, read_token=read_token\n )\n print(\"The read_original response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling MediaSet.read_original: %s\\n\" % e)" + } + ], + "v2.getMediaItemReference": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# MediaSetRid | The RID of the media set.\nmedia_set_rid = None\n# MediaItemRid | The RID of the media item.\nmedia_item_rid = None\n# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode.\npreview = None\n# Optional[MediaItemReadToken]\nread_token = None\n\n\ntry:\n api_response = client.media_sets.MediaSet.reference(\n media_set_rid, media_item_rid, preview=preview, read_token=read_token\n )\n print(\"The reference response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling MediaSet.reference: %s\\n\" % e)" + } + ], + "v2.retrieveImageMediaItemThumbnail": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# MediaSetRid | The RID of the media set.\nmedia_set_rid = None\n# MediaItemRid | The RID of the media item.\nmedia_item_rid = None\n# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode.\npreview = None\n# Optional[MediaItemReadToken]\nread_token = None\n\n\ntry:\n api_response = client.media_sets.MediaSet.retrieve(\n media_set_rid, media_item_rid, preview=preview, read_token=read_token\n )\n print(\"The retrieve response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling MediaSet.retrieve: %s\\n\" % e)" + } + ], + "v2.putMediaItem": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# MediaSetRid\nmedia_set_rid = None\n# bytes | Body of the request\nbody = None\n# Optional[BranchName] | Specifies the specific branch by name to which this media item will be uploaded. May not be provided if branch rid or view rid are provided.\nbranch_name = None\n# Optional[BranchRid] | Specifies the specific branch by rid to which this media item will be uploaded. May not be provided if branch name or view rid are provided.\nbranch_rid = None\n# Optional[MediaItemPath] | An identifier for a media item within a media set. Necessary if the backing media set requires paths.\nmedia_item_path = \"q3-data%2fmy-file.png\"\n# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode.\npreview = None\n# Optional[TransactionId] | The id of the transaction associated with this request. Required if this is a transactional media set.\ntransaction_id = None\n# Optional[MediaSetViewRid] | Specifies the specific view by rid to which this media item will be uploaded. May not be provided if branch name or branch rid are provided.\nview_rid = None\n\n\ntry:\n api_response = client.media_sets.MediaSet.upload(\n media_set_rid,\n body,\n branch_name=branch_name,\n branch_rid=branch_rid,\n media_item_path=media_item_path,\n preview=preview,\n transaction_id=transaction_id,\n view_rid=view_rid,\n )\n print(\"The upload response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling MediaSet.upload: %s\\n\" % e)" + } + ], + "v2.uploadMedia": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# bytes | Body of the request\nbody = None\n# MediaItemPath | The path to write the media item to. Required if the backing media set requires paths.\nfilename = \"my-file.png\"\n# Optional[Attribution] | used for passing through usage attribution\nattribution = None\n# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode.\npreview = None\n\n\ntry:\n api_response = client.media_sets.MediaSet.upload_media(\n body, filename=filename, attribution=attribution, preview=preview\n )\n print(\"The upload_media response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling MediaSet.upload_media: %s\\n\" % e)" + } + ], + "v2.createModel": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ModelName\nname = \"House Pricing Model\"\n# FolderRid\nparent_folder_rid = \"ri.compass.main.folder.c410f510-2937-420e-8ea3-8c9bcb3c1791\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.models.Model.create(\n name=name, parent_folder_rid=parent_folder_rid, preview=preview\n )\n print(\"The create response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Model.create: %s\\n\" % e)" + } + ], + "v2.getModel": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ModelRid\nmodel_rid = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.models.Model.get(model_rid, preview=preview)\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Model.get: %s\\n\" % e)" + } + ], + "v2.createModelVersion": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ModelRid\nmodel_rid = None\n# List[RID]\nbacking_repositories = None\n# List[str]\nconda_requirements = None\n# ModelApi\nmodel_api = {\n \"inputs\": [\n {\n \"name\": \"input_df\",\n \"required\": True,\n \"type\": \"tabular\",\n \"columns\": [\n {\"name\": \"feature_1\", \"required\": True, \"dataType\": {\"type\": \"double\"}},\n {\"name\": \"feature_2\", \"required\": True, \"dataType\": {\"type\": \"integer\"}},\n ],\n \"format\": \"PANDAS\",\n }\n ],\n \"outputs\": [\n {\n \"name\": \"output_df\",\n \"required\": True,\n \"type\": \"tabular\",\n \"columns\": [{\"name\": \"prediction\", \"required\": True, \"dataType\": {\"type\": \"double\"}}],\n \"format\": \"SPARK\",\n }\n ],\n}\n# ModelFiles\nmodel_files = {\n \"type\": \"dill\",\n \"serializedModelFunction\": \"base64-encoded string for a dill-serialize model function\",\n}\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.models.Model.Version.create(\n model_rid,\n backing_repositories=backing_repositories,\n conda_requirements=conda_requirements,\n model_api=model_api,\n model_files=model_files,\n preview=preview,\n )\n print(\"The create response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Version.create: %s\\n\" % e)" + } + ], + "v2.getModelVersion": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ModelRid\nmodel_rid = None\n# ModelVersionRid\nmodel_version_rid = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.models.Model.Version.get(model_rid, model_version_rid, preview=preview)\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Version.get: %s\\n\" % e)" + } + ], + "v2.listModelVersions": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ModelRid\nmodel_rid = None\n# Optional[PageSize] | The page size to use for the endpoint.\npage_size = None\n# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request.\npage_token = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n for model_version in client.models.Model.Version.list(\n model_rid, page_size=page_size, page_token=page_token, preview=preview\n ):\n pprint(model_version)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Version.list: %s\\n\" % e)" + } + ], + "v2.applyActionV2": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# ActionTypeApiName | The API name of the action to apply. To find the API name for your action, use the **List action types** endpoint or check the **Ontology Manager**.\naction = \"rename-employee\"\n# Dict[ParameterId, Optional[DataValue]]\nparameters = {\"id\": 80060, \"newName\": \"Anna Smith-Doe\"}\n# Optional[FoundryBranch] | The Foundry branch to apply the action against. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported.\nbranch = None\n# Optional[ApplyActionRequestOptions]\noptions = None\n# Optional[SdkPackageRid] | The package rid of the generated SDK.\nsdk_package_rid = None\n# Optional[SdkVersion] | The version of the generated SDK.\nsdk_version = None\n\n\ntry:\n api_response = client.ontologies.Action.apply(\n ontology,\n action,\n parameters=parameters,\n branch=branch,\n options=options,\n sdk_package_rid=sdk_package_rid,\n sdk_version=sdk_version,\n )\n print(\"The apply response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Action.apply: %s\\n\" % e)" + } + ], + "v2.applyActionBatchV2": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# ActionTypeApiName | The API name of the action to apply. To find the API name for your action, use the **List action types** endpoint or check the **Ontology Manager**.\naction = \"rename-employee\"\n# List[BatchApplyActionRequestItem]\nrequests = [\n {\"parameters\": {\"id\": 80060, \"newName\": \"Anna Smith-Doe\"}},\n {\"parameters\": {\"id\": 80061, \"newName\": \"Joe Bloggs\"}},\n]\n# Optional[FoundryBranch] | The Foundry branch to apply the action against. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported.\nbranch = None\n# Optional[BatchApplyActionRequestOptions]\noptions = None\n# Optional[SdkPackageRid] | The package rid of the generated SDK.\nsdk_package_rid = None\n# Optional[SdkVersion] | The version of the generated SDK.\nsdk_version = None\n\n\ntry:\n api_response = client.ontologies.Action.apply_batch(\n ontology,\n action,\n requests=requests,\n branch=branch,\n options=options,\n sdk_package_rid=sdk_package_rid,\n sdk_version=sdk_version,\n )\n print(\"The apply_batch response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Action.apply_batch: %s\\n\" % e)" + } + ], + "v2.applyActionWithOverrides": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# ActionTypeApiName | The API name of the action to apply. To find the API name for your action, use the **List action types** endpoint or check the **Ontology Manager**.\naction = \"rename-employee\"\n# ApplyActionOverrides\noverrides = {\n \"uniqueIdentifierLinkIdValues\": {\n \"fd28fa5c-3028-4eca-bdc8-3be2c7949cd9\": \"4efdb11f-c1e3-417c-89fb-2225118b65e3\"\n },\n \"actionExecutionTime\": \"2025-10-25T13:00:00Z\",\n}\n# ApplyActionRequestV2\nrequest = {\"parameters\": {\"id\": 80060, \"newName\": \"Anna Smith-Doe\"}}\n# Optional[FoundryBranch] | The Foundry branch to apply the action against. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported.\nbranch = None\n# Optional[SdkPackageRid] | The package rid of the generated SDK.\nsdk_package_rid = None\n# Optional[SdkVersion] | The version of the generated SDK.\nsdk_version = None\n\n\ntry:\n api_response = client.ontologies.Action.apply_with_overrides(\n ontology,\n action,\n overrides=overrides,\n request=request,\n branch=branch,\n sdk_package_rid=sdk_package_rid,\n sdk_version=sdk_version,\n )\n print(\"The apply_with_overrides response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Action.apply_with_overrides: %s\\n\" % e)" + } + ], + "v2.getActionTypeV2": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# ActionTypeApiName | The name of the action type in the API.\naction_type = \"promote-employee\"\n# Optional[FoundryBranch] | The Foundry branch to load the action type definition from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported.\nbranch = None\n\n\ntry:\n api_response = client.ontologies.Ontology.ActionType.get(ontology, action_type, branch=branch)\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling ActionType.get: %s\\n\" % e)" + } + ], + "v2.getActionTypeByRid": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# ActionTypeRid | The RID of the action type.\naction_type_rid = \"ri.ontology.main.action-type.7ed72754-7491-428a-bb18-4d7296eb2167\"\n# Optional[FoundryBranch] | The Foundry branch to load the action type definition from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported.\nbranch = None\n\n\ntry:\n api_response = client.ontologies.Ontology.ActionType.get_by_rid(\n ontology, action_type_rid, branch=branch\n )\n print(\"The get_by_rid response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling ActionType.get_by_rid: %s\\n\" % e)" + } + ], + "v2.listActionTypesV2": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# Optional[FoundryBranch] | The Foundry branch to list the action types from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported.\nbranch = None\n# Optional[PageSize] | The desired size of the page to be returned. Defaults to 500. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details.\npage_size = None\n# Optional[PageToken]\npage_token = None\n\n\ntry:\n for action_type in client.ontologies.Ontology.ActionType.list(\n ontology, branch=branch, page_size=page_size, page_token=page_token\n ):\n pprint(action_type)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling ActionType.list: %s\\n\" % e)" + } + ], + "v2.getActionTypeFullMetadata": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier | The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**.\nontology = \"palantir\"\n# ActionTypeApiName | The name of the action type in the API.\naction_type = \"promote-employee\"\n# Optional[FoundryBranch] | The Foundry branch to load the action type definition from. If not specified, the default branch will be used.\nbranch = None\n\n\ntry:\n api_response = client.ontologies.ActionTypeFullMetadata.get(\n ontology, action_type, branch=branch\n )\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling ActionTypeFullMetadata.get: %s\\n\" % e)" + } + ], + "v2.listActionTypesFullMetadata": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# Optional[FoundryBranch] | The Foundry branch to list the action types from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported.\nbranch = None\n# Optional[PageSize] | The desired size of the page to be returned. Defaults to 500. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details.\npage_size = None\n# Optional[PageToken]\npage_token = None\n\n\ntry:\n for action_type_full_metadata in client.ontologies.ActionTypeFullMetadata.list(\n ontology, branch=branch, page_size=page_size, page_token=page_token\n ):\n pprint(action_type_full_metadata)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling ActionTypeFullMetadata.list: %s\\n\" % e)" + } + ], + "v2.getAttachmentV2": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# AttachmentRid | The RID of the attachment.\nattachment_rid = \"ri.attachments.main.attachment.bb32154e-e043-4b00-9461-93136ca96b6f\"\n\n\ntry:\n api_response = client.ontologies.Attachment.get(attachment_rid)\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Attachment.get: %s\\n\" % e)" + } + ], + "v2.getAttachmentContentV2": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# AttachmentRid | The RID of the attachment.\nattachment_rid = \"ri.attachments.main.attachment.bb32154e-e043-4b00-9461-93136ca96b6f\"\n\n\ntry:\n api_response = client.ontologies.Attachment.read(attachment_rid)\n print(\"The read response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Attachment.read: %s\\n\" % e)" + } + ], + "v2.uploadAttachmentV2": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# bytes | Body of the request\nbody = None\n# ContentLength | The size in bytes of the file content being uploaded.\ncontent_length = None\n# ContentType | The media type of the file being uploaded.\ncontent_type = None\n# Filename | The name of the file being uploaded.\nfilename = \"My Image.jpeg\"\n\n\ntry:\n api_response = client.ontologies.Attachment.upload(\n body, content_length=content_length, content_type=content_type, filename=filename\n )\n print(\"The upload response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Attachment.upload: %s\\n\" % e)" + } + ], + "v2.uploadAttachmentWithRid": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# AttachmentRid | The `AttachmentRid` of the attachment being uploaded.\nattachment_rid = \"ri.attachments.main.attachment.bb32154e-e043-4b00-9461-93136ca96b6f\"\n# bytes | Body of the request\nbody = None\n# ContentLength | The size in bytes of the file content being uploaded.\ncontent_length = None\n# ContentType | The media type of the file being uploaded.\ncontent_type = None\n# Filename | The name of the file being uploaded.\nfilename = \"My Image.jpeg\"\n# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode.\npreview = None\n\n\ntry:\n api_response = client.ontologies.Attachment.upload_with_rid(\n attachment_rid,\n body,\n content_length=content_length,\n content_type=content_type,\n filename=filename,\n preview=preview,\n )\n print(\"The upload_with_rid response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Attachment.upload_with_rid: %s\\n\" % e)" + } + ], + "v2.listPropertyAttachments": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**.\nobject_type = \"employee\"\n# PropertyValueEscapedString | The primary key of the object containing the attachment.\nprimary_key = 50030\n# PropertyApiName | The API name of the attachment property. To find the API name for your attachment, check the **Ontology Manager** or use the **Get object type** endpoint.\nproperty = \"performance\"\n# Optional[SdkPackageRid] | The package rid of the generated SDK.\nsdk_package_rid = None\n# Optional[SdkVersion] | The version of the generated SDK.\nsdk_version = None\n\n\ntry:\n api_response = client.ontologies.AttachmentProperty.get_attachment(\n ontology,\n object_type,\n primary_key,\n property,\n sdk_package_rid=sdk_package_rid,\n sdk_version=sdk_version,\n )\n print(\"The get_attachment response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling AttachmentProperty.get_attachment: %s\\n\" % e)" + } + ], + "v2.getAttachmentPropertyByRidV2": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**.\nobject_type = \"employee\"\n# PropertyValueEscapedString | The primary key of the object containing the attachment.\nprimary_key = 50030\n# PropertyApiName | The API name of the attachment property. To find the API name for your attachment, check the **Ontology Manager** or use the **Get object type** endpoint.\nproperty = \"performance\"\n# AttachmentRid | The RID of the attachment.\nattachment_rid = \"ri.attachments.main.attachment.bb32154e-e043-4b00-9461-93136ca96b6f\"\n# Optional[SdkPackageRid] | The package rid of the generated SDK.\nsdk_package_rid = None\n# Optional[SdkVersion] | The version of the generated SDK.\nsdk_version = None\n\n\ntry:\n api_response = client.ontologies.AttachmentProperty.get_attachment_by_rid(\n ontology,\n object_type,\n primary_key,\n property,\n attachment_rid,\n sdk_package_rid=sdk_package_rid,\n sdk_version=sdk_version,\n )\n print(\"The get_attachment_by_rid response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling AttachmentProperty.get_attachment_by_rid: %s\\n\" % e)" + } + ], + "v2.getAttachmentPropertyContentV2": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**.\nobject_type = \"employee\"\n# PropertyValueEscapedString | The primary key of the object containing the attachment.\nprimary_key = 50030\n# PropertyApiName | The API name of the attachment property. To find the API name for your attachment, check the **Ontology Manager** or use the **Get object type** endpoint.\nproperty = \"performance\"\n# Optional[SdkPackageRid] | The package rid of the generated SDK.\nsdk_package_rid = None\n# Optional[SdkVersion] | The version of the generated SDK.\nsdk_version = None\n\n\ntry:\n api_response = client.ontologies.AttachmentProperty.read_attachment(\n ontology,\n object_type,\n primary_key,\n property,\n sdk_package_rid=sdk_package_rid,\n sdk_version=sdk_version,\n )\n print(\"The read_attachment response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling AttachmentProperty.read_attachment: %s\\n\" % e)" + } + ], + "v2.getAttachmentPropertyContentByRidV2": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**.\nobject_type = \"employee\"\n# PropertyValueEscapedString | The primary key of the object containing the attachment.\nprimary_key = 50030\n# PropertyApiName | The API name of the attachment property. To find the API name for your attachment, check the **Ontology Manager** or use the **Get object type** endpoint.\nproperty = \"performance\"\n# AttachmentRid | The RID of the attachment.\nattachment_rid = \"ri.attachments.main.attachment.bb32154e-e043-4b00-9461-93136ca96b6f\"\n# Optional[SdkPackageRid] | The package rid of the generated SDK.\nsdk_package_rid = None\n# Optional[SdkVersion] | The version of the generated SDK.\nsdk_version = None\n\n\ntry:\n api_response = client.ontologies.AttachmentProperty.read_attachment_by_rid(\n ontology,\n object_type,\n primary_key,\n property,\n attachment_rid,\n sdk_package_rid=sdk_package_rid,\n sdk_version=sdk_version,\n )\n print(\"The read_attachment_by_rid response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling AttachmentProperty.read_attachment_by_rid: %s\\n\" % e)" + } + ], + "v2.decrypt": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**.\nobject_type = \"employee\"\n# PropertyValueEscapedString | The primary key of the object with the CipherText property.\nprimary_key = 50030\n# PropertyApiName | The API name of the CipherText property. To find the API name for your CipherText property, check the **Ontology Manager** or use the **Get object type** endpoint.\nproperty = \"performance\"\n\n\ntry:\n api_response = client.ontologies.CipherTextProperty.decrypt(\n ontology, object_type, primary_key, property\n )\n print(\"The decrypt response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling CipherTextProperty.decrypt: %s\\n\" % e)" + } + ], + "v2.getLinkedObjectV2": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**.\nobject_type = \"employee\"\n# PropertyValueEscapedString | The primary key of the object from which the links originate. To look up the expected primary key for your object type, use the `Get object type` endpoint or the **Ontology Manager**.\nprimary_key = 50030\n# LinkTypeApiName | The API name of the link that exists between the object and the requested objects. To find the API name for your link type, check the **Ontology Manager**.\nlink_type = \"directReport\"\n# PropertyValueEscapedString | The primary key of the requested linked object. To look up the expected primary key for your object type, use the `Get object type` endpoint (passing the linked object type) or the **Ontology Manager**.\nlinked_object_primary_key = 80060\n# Optional[FoundryBranch] | The Foundry branch to load the object set for multiple object types. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported.\nbranch = None\n# Optional[bool] | A flag to exclude the retrieval of the `__rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2.\nexclude_rid = None\n# Optional[SdkPackageRid] | The package rid of the generated SDK.\nsdk_package_rid = None\n# Optional[SdkVersion] | The version of the generated SDK.\nsdk_version = None\n# Optional[List[SelectedPropertyApiName]] | The properties of the object type that should be included in the response. Omit this parameter to get all the properties.\nselect = None\n\n\ntry:\n api_response = client.ontologies.LinkedObject.get_linked_object(\n ontology,\n object_type,\n primary_key,\n link_type,\n linked_object_primary_key,\n branch=branch,\n exclude_rid=exclude_rid,\n sdk_package_rid=sdk_package_rid,\n sdk_version=sdk_version,\n select=select,\n )\n print(\"The get_linked_object response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling LinkedObject.get_linked_object: %s\\n\" % e)" + } + ], + "v2.listLinkedObjectsV2": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**.\nobject_type = \"employee\"\n# PropertyValueEscapedString | The primary key of the object from which the links originate. To look up the expected primary key for your object type, use the `Get object type` endpoint or the **Ontology Manager**.\nprimary_key = 50030\n# LinkTypeApiName | The API name of the link that exists between the object and the requested objects. To find the API name for your link type, check the **Ontology Manager**.\nlink_type = \"directReport\"\n# Optional[FoundryBranch] | The Foundry branch to list linked objects from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported.\nbranch = None\n# Optional[bool] | A flag to exclude the retrieval of the `__rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2.\nexclude_rid = None\n# Optional[OrderBy]\norder_by = None\n# Optional[PageSize] | The desired size of the page to be returned. Defaults to 1,000. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details.\npage_size = None\n# Optional[PageToken]\npage_token = None\n# Optional[SdkPackageRid] | The package rid of the generated SDK.\nsdk_package_rid = None\n# Optional[SdkVersion] | The version of the generated SDK.\nsdk_version = None\n# Optional[List[SelectedPropertyApiName]] | The properties of the object type that should be included in the response. Omit this parameter to get all the properties.\nselect = None\n# Optional[bool] | A flag to use snapshot consistency when paging. Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. This defaults to false if not specified, which means you will always get the latest results.\nsnapshot = None\n\n\ntry:\n for linked_object in client.ontologies.LinkedObject.list_linked_objects(\n ontology,\n object_type,\n primary_key,\n link_type,\n branch=branch,\n exclude_rid=exclude_rid,\n order_by=order_by,\n page_size=page_size,\n page_token=page_token,\n sdk_package_rid=sdk_package_rid,\n sdk_version=sdk_version,\n select=select,\n snapshot=snapshot,\n ):\n pprint(linked_object)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling LinkedObject.list_linked_objects: %s\\n\" % e)" + } + ], + "v2.readMediaContent": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**.\nobject_type = \"employee\"\n# PropertyValueEscapedString | The primary key of the object with the media reference property.\nprimary_key = 50030\n# PropertyApiName | The API name of the media reference property. To find the API name, check the **Ontology Manager** or use the **Get object type** endpoint.\nproperty = \"profile_picture\"\n# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode.\npreview = None\n# Optional[SdkPackageRid] | The package rid of the generated SDK.\nsdk_package_rid = None\n# Optional[SdkVersion] | The version of the generated SDK.\nsdk_version = None\n\n\ntry:\n api_response = client.ontologies.MediaReferenceProperty.get_media_content(\n ontology,\n object_type,\n primary_key,\n property,\n preview=preview,\n sdk_package_rid=sdk_package_rid,\n sdk_version=sdk_version,\n )\n print(\"The get_media_content response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling MediaReferenceProperty.get_media_content: %s\\n\" % e)" + } + ], + "v2.getMediaMetadata": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**.\nobject_type = \"employee\"\n# PropertyValueEscapedString | The primary key of the object with the media reference property.\nprimary_key = 50030\n# PropertyApiName | The API name of the media reference backed property. To find the API name, check the **Ontology Manager** or use the **Get object type** endpoint.\nproperty = None\n# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode.\npreview = None\n# Optional[SdkPackageRid] | The package rid of the generated SDK.\nsdk_package_rid = None\n# Optional[SdkVersion] | The version of the generated SDK.\nsdk_version = None\n\n\ntry:\n api_response = client.ontologies.MediaReferenceProperty.get_media_metadata(\n ontology,\n object_type,\n primary_key,\n property,\n preview=preview,\n sdk_package_rid=sdk_package_rid,\n sdk_version=sdk_version,\n )\n print(\"The get_media_metadata response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling MediaReferenceProperty.get_media_metadata: %s\\n\" % e)" + } + ], + "v2.uploadMediaContent": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**.\nobject_type = \"employee\"\n# PropertyApiName | The API name of the media reference property. To find the API name, check the **Ontology Manager** or use the **Get object type** endpoint.\nproperty = \"profile_picture\"\n# bytes | Body of the request\nbody = None\n# Optional[MediaItemPath] | A path for the media item within its backing media set. Required if the backing media set requires paths.\nmedia_item_path = \"my-file.png\"\n# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode.\npreview = None\n\n\ntry:\n api_response = client.ontologies.MediaReferenceProperty.upload(\n ontology, object_type, property, body, media_item_path=media_item_path, preview=preview\n )\n print(\"The upload response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling MediaReferenceProperty.upload: %s\\n\" % e)" + } + ], + "v2.getObjectTypeV2": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**.\nobject_type = \"employee\"\n# Optional[FoundryBranch] | The Foundry branch to load the object type definition from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported.\nbranch = None\n\n\ntry:\n api_response = client.ontologies.Ontology.ObjectType.get(ontology, object_type, branch=branch)\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling ObjectType.get: %s\\n\" % e)" + } + ], + "v2.getObjectTypeFullMetadata": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**.\nobject_type = \"employee\"\n# Optional[FoundryBranch] | The Foundry branch to load the action type definition from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported.\nbranch = None\n# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode.\npreview = None\n# Optional[SdkPackageRid] | The package rid of the generated SDK.\nsdk_package_rid = None\n# Optional[SdkVersion] | The version of the generated SDK.\nsdk_version = None\n\n\ntry:\n api_response = client.ontologies.Ontology.ObjectType.get_full_metadata(\n ontology,\n object_type,\n branch=branch,\n preview=preview,\n sdk_package_rid=sdk_package_rid,\n sdk_version=sdk_version,\n )\n print(\"The get_full_metadata response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling ObjectType.get_full_metadata: %s\\n\" % e)" + } + ], + "v2.getOutgoingLinkTypeV2": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager** application.\nobject_type = \"Employee\"\n# LinkTypeApiName | The API name of the outgoing link. To find the API name for your link type, check the **Ontology Manager**.\nlink_type = \"directReport\"\n# Optional[FoundryBranch] | The Foundry branch to get the outgoing link types for an object type from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported.\nbranch = None\n\n\ntry:\n api_response = client.ontologies.Ontology.ObjectType.get_outgoing_link_type(\n ontology, object_type, link_type, branch=branch\n )\n print(\"The get_outgoing_link_type response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling ObjectType.get_outgoing_link_type: %s\\n\" % e)" + } + ], + "v2.listObjectTypesV2": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# Optional[FoundryBranch] | The Foundry branch to list the object types from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported.\nbranch = None\n# Optional[PageSize] | The desired size of the page to be returned. Defaults to 500. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details.\npage_size = None\n# Optional[PageToken]\npage_token = None\n\n\ntry:\n for object_type in client.ontologies.Ontology.ObjectType.list(\n ontology, branch=branch, page_size=page_size, page_token=page_token\n ):\n pprint(object_type)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling ObjectType.list: %s\\n\" % e)" + } + ], + "v2.listOutgoingLinkTypesV2": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager** application.\nobject_type = \"Flight\"\n# Optional[FoundryBranch] | The Foundry branch to load the outgoing link types from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported.\nbranch = None\n# Optional[PageSize] | The desired size of the page to be returned.\npage_size = None\n# Optional[PageToken]\npage_token = None\n\n\ntry:\n for object_type in client.ontologies.Ontology.ObjectType.list_outgoing_link_types(\n ontology, object_type, branch=branch, page_size=page_size, page_token=page_token\n ):\n pprint(object_type)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling ObjectType.list_outgoing_link_types: %s\\n\" % e)" + } + ], + "v2.getOntologyV2": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n\n\ntry:\n api_response = client.ontologies.Ontology.get(ontology)\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Ontology.get: %s\\n\" % e)" + } + ], + "v2.getOntologyFullMetadata": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# Optional[FoundryBranch] | The Foundry branch to load metadata from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported.\nbranch = None\n\n\ntry:\n api_response = client.ontologies.Ontology.get_full_metadata(ontology, branch=branch)\n print(\"The get_full_metadata response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Ontology.get_full_metadata: %s\\n\" % e)" + } + ], + "v2.listOntologiesV2": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n\ntry:\n api_response = client.ontologies.Ontology.list()\n print(\"The list response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Ontology.list: %s\\n\" % e)" + } + ], + "v2.loadOntologyMetadata": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# List[ActionTypeApiName]\naction_types = None\n# List[InterfaceTypeApiName]\ninterface_types = None\n# List[LinkTypeApiName]\nlink_types = None\n# List[ObjectTypeApiName]\nobject_types = None\n# List[VersionedQueryTypeApiName]\nquery_types = None\n# Optional[FoundryBranch] | The Foundry branch to load metadata from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported.\nbranch = None\n# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode.\npreview = None\n\n\ntry:\n api_response = client.ontologies.Ontology.load_metadata(\n ontology,\n action_types=action_types,\n interface_types=interface_types,\n link_types=link_types,\n object_types=object_types,\n query_types=query_types,\n branch=branch,\n preview=preview,\n )\n print(\"The load_metadata response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Ontology.load_metadata: %s\\n\" % e)" + } + ], + "v2.aggregateObjectsForInterface": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# InterfaceTypeApiName | The API name of the interface type. To find the API name, use the **List interface types** endpoint or check the **Ontology Manager**.\ninterface_type = \"Employee\"\n# List[AggregationV2]\naggregation = [\n {\"type\": \"min\", \"field\": \"tenure\", \"name\": \"min_tenure\"},\n {\"type\": \"avg\", \"field\": \"tenure\", \"name\": \"avg_tenure\"},\n]\n# List[AggregationGroupByV2]\ngroup_by = [\n {\n \"field\": \"startDate\",\n \"type\": \"range\",\n \"ranges\": [{\"startValue\": \"2020-01-01\", \"endValue\": \"2020-06-01\"}],\n },\n {\"field\": \"city\", \"type\": \"exact\"},\n]\n# Optional[AggregationAccuracyRequest]\naccuracy = None\n# Optional[FoundryBranch] | The Foundry branch to aggregate objects from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported.\nbranch = None\n# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode.\npreview = None\n# Optional[SearchJsonQueryV2]\nwhere = {\"type\": \"eq\", \"field\": \"name\", \"value\": \"john\"}\n\n\ntry:\n api_response = client.ontologies.OntologyInterface.aggregate(\n ontology,\n interface_type,\n aggregation=aggregation,\n group_by=group_by,\n accuracy=accuracy,\n branch=branch,\n preview=preview,\n where=where,\n )\n print(\"The aggregate response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling OntologyInterface.aggregate: %s\\n\" % e)" + } + ], + "v2.getInterfaceType": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# InterfaceTypeApiName | The API name of the interface type. To find the API name, use the **List interface types** endpoint or check the **Ontology Manager**.\ninterface_type = \"Employee\"\n# Optional[FoundryBranch] | The Foundry branch to load the interface type definition from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported.\nbranch = None\n# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode.\npreview = None\n# Optional[SdkPackageRid] | The package rid of the generated SDK.\nsdk_package_rid = None\n# Optional[SdkVersion] | The version of the generated SDK.\nsdk_version = None\n\n\ntry:\n api_response = client.ontologies.OntologyInterface.get(\n ontology,\n interface_type,\n branch=branch,\n preview=preview,\n sdk_package_rid=sdk_package_rid,\n sdk_version=sdk_version,\n )\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling OntologyInterface.get: %s\\n\" % e)" + } + ], + "v2.getOutgoingInterfaceLinkType": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# InterfaceTypeApiName | The API name of the interface type. To find the API name, use the **List interface types** endpoint or check the **Ontology Manager** application.\ninterface_type = \"Employee\"\n# InterfaceLinkTypeApiName | The API name of the outgoing interface link. To find the API name for your interface link type, check the **Ontology Manager** page for the parent interface.\ninterface_link_type = \"worksAt\"\n# Optional[FoundryBranch] | The Foundry branch to get the outgoing link types for an object type from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported.\nbranch = None\n\n\ntry:\n api_response = client.ontologies.OntologyInterface.get_outgoing_interface_link_type(\n ontology, interface_type, interface_link_type, branch=branch\n )\n print(\"The get_outgoing_interface_link_type response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling OntologyInterface.get_outgoing_interface_link_type: %s\\n\" % e)" + } + ], + "v2.listInterfaceTypes": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# Optional[FoundryBranch] | The Foundry branch to list the interface types from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported.\nbranch = None\n# Optional[PageSize] | The desired size of the page to be returned. Defaults to 500. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details.\npage_size = None\n# Optional[PageToken]\npage_token = None\n# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode.\npreview = None\n\n\ntry:\n for ontology_interface in client.ontologies.OntologyInterface.list(\n ontology, branch=branch, page_size=page_size, page_token=page_token, preview=preview\n ):\n pprint(ontology_interface)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling OntologyInterface.list: %s\\n\" % e)" + } + ], + "v2.listInterfaceLinkedObjects": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier | The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**.\nontology = \"palantir\"\n# InterfaceTypeApiName | The API name of the interface type. To find the API name, use the **List interface types** endpoint or check the **Ontology Manager** application.\ninterface_type = \"Employee\"\n# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**.\nobject_type = \"employee\"\n# PropertyValueEscapedString | The primary key of the object from which to **start** the interface link traversal. To look up the expected primary key for your object type, use the `Get object type` endpoint or the **Ontology Manager**.\nprimary_key = None\n# InterfaceLinkTypeApiName | The API name of the outgoing interface link. To find the API name for your interface link type, check the **Ontology Manager** page for the parent interface.\ninterface_link_type = \"worksAt\"\n# Optional[FoundryBranch] | The Foundry branch to get the outgoing link types for an object type from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported.\nbranch = None\n# Optional[bool] | A flag to exclude the retrieval of the `__rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2.\nexclude_rid = None\n# Optional[OrderBy]\norder_by = None\n# Optional[PageSize] | The desired size of the page to be returned. Defaults to 1,000. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details.\npage_size = None\n# Optional[PageToken]\npage_token = None\n# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode.\npreview = None\n# Optional[List[SelectedPropertyApiName]] | The properties of the object type that should be included in the response. Omit this parameter to get all the properties.\nselect = None\n# Optional[bool] | A flag to use snapshot consistency when paging. Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. This defaults to false if not specified, which means you will always get the latest results.\nsnapshot = None\n\n\ntry:\n for ontology_interface in client.ontologies.OntologyInterface.list_interface_linked_objects(\n ontology,\n interface_type,\n object_type,\n primary_key,\n interface_link_type,\n branch=branch,\n exclude_rid=exclude_rid,\n order_by=order_by,\n page_size=page_size,\n page_token=page_token,\n preview=preview,\n select=select,\n snapshot=snapshot,\n ):\n pprint(ontology_interface)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling OntologyInterface.list_interface_linked_objects: %s\\n\" % e)" + } + ], + "v2.listObjectsForInterface": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier | The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**.\nontology = \"palantir\"\n# InterfaceTypeApiName | The API name of the interface type. To find the API name, use the **List interface types** endpoint or check the **Ontology Manager**.\ninterface_type = \"employee\"\n# Optional[FoundryBranch] | The Foundry branch to list objects from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported.\nbranch = None\n# Optional[bool] | A flag to exclude the retrieval of the `__rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2.\nexclude_rid = None\n# Optional[OrderBy]\norder_by = None\n# Optional[PageSize] | The desired size of the page to be returned. Defaults to 1,000. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details.\npage_size = None\n# Optional[PageToken]\npage_token = None\n# Optional[List[SelectedPropertyApiName]] | The properties of the interface type that should be included in the response. Omit this parameter to get all the properties.\nselect = None\n# Optional[bool] | A flag to use snapshot consistency when paging. Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. This defaults to false if not specified, which means you will always get the latest results.\nsnapshot = None\n\n\ntry:\n for ontology_interface in client.ontologies.OntologyInterface.list_objects_for_interface(\n ontology,\n interface_type,\n branch=branch,\n exclude_rid=exclude_rid,\n order_by=order_by,\n page_size=page_size,\n page_token=page_token,\n select=select,\n snapshot=snapshot,\n ):\n pprint(ontology_interface)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling OntologyInterface.list_objects_for_interface: %s\\n\" % e)" + } + ], + "v2.listOutgoingInterfaceLinkTypes": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# InterfaceTypeApiName | The API name of the interface type. To find the API name, use the **List interface types** endpoint or check the **Ontology Manager** application.\ninterface_type = \"Employee\"\n# Optional[FoundryBranch] | The Foundry branch to get the outgoing link type from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported.\nbranch = None\n\n\ntry:\n api_response = client.ontologies.OntologyInterface.list_outgoing_interface_link_types(\n ontology, interface_type, branch=branch\n )\n print(\"The list_outgoing_interface_link_types response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling OntologyInterface.list_outgoing_interface_link_types: %s\\n\" % e)" + } + ], + "v2.searchObjectsForInterface": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# InterfaceTypeApiName | The API name of the interface type. To find the API name, use the **List interface types** endpoint or check the **Ontology Manager**.\ninterface_type = \"Employee\"\n# Dict[InterfaceTypeApiName, List[InterfacePropertyApiName]] | A map from interface type API name to a list of interface property type API names. For each returned object, if the object implements an interface that is a key in the map, then we augment the response for that object type with the list of properties specified in the value.\naugmented_interface_property_types = None\n# Dict[ObjectTypeApiName, List[PropertyApiName]] | A map from object type API name to a list of property type API names. For each returned object, if the object\u2019s object type is a key in the map, then we augment the response for that object type with the list of properties specified in the value.\naugmented_properties = None\n# Dict[InterfaceTypeApiName, List[SharedPropertyTypeApiName]] | A map from interface type API name to a list of shared property type API names. For each returned object, if the object implements an interface that is a key in the map, then we augment the response for that object type with the list of properties specified in the value.\naugmented_shared_property_types = None\n# List[InterfaceTypeApiName] | A list of interface type API names. Object types must implement all the mentioned interfaces in order to be included in the response.\nother_interface_types = None\n# List[InterfacePropertyApiName] | A list of interface property type API names of the interface type that should be included in the response. Omit this parameter to include all properties of the interface type in the response.\nselected_interface_property_types = None\n# List[ObjectTypeApiName] | A list of object type API names that should be included in the response. If non-empty, object types that are not mentioned will not be included in the response even if they implement the specified interface. Omit the parameter to include all object types.\nselected_object_types = None\n# List[SharedPropertyTypeApiName] | A list of shared property type API names of the interface type that should be included in the response. Omit this parameter to include all properties of the interface type in the response.\nselected_shared_property_types = None\n# Optional[FoundryBranch] | The Foundry branch to search objects from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported.\nbranch = None\n# Optional[SearchOrderByV2]\norder_by = None\n# Optional[PageSize]\npage_size = None\n# Optional[PageToken]\npage_token = None\n# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode.\npreview = None\n# Optional[SearchJsonQueryV2]\nwhere = None\n\n\ntry:\n api_response = client.ontologies.OntologyInterface.search(\n ontology,\n interface_type,\n augmented_interface_property_types=augmented_interface_property_types,\n augmented_properties=augmented_properties,\n augmented_shared_property_types=augmented_shared_property_types,\n other_interface_types=other_interface_types,\n selected_interface_property_types=selected_interface_property_types,\n selected_object_types=selected_object_types,\n selected_shared_property_types=selected_shared_property_types,\n branch=branch,\n order_by=order_by,\n page_size=page_size,\n page_token=page_token,\n preview=preview,\n where=where,\n )\n print(\"The search response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling OntologyInterface.search: %s\\n\" % e)" + } + ], + "v2.aggregateObjectsV2": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# ObjectTypeApiName | The type of the object to aggregate on.\nobject_type = \"employee\"\n# List[AggregationV2]\naggregation = [\n {\"type\": \"min\", \"field\": \"tenure\", \"name\": \"min_tenure\"},\n {\"type\": \"avg\", \"field\": \"tenure\", \"name\": \"avg_tenure\"},\n]\n# List[AggregationGroupByV2]\ngroup_by = [\n {\n \"field\": \"startDate\",\n \"type\": \"range\",\n \"ranges\": [{\"startValue\": \"2020-01-01\", \"endValue\": \"2020-06-01\"}],\n },\n {\"field\": \"city\", \"type\": \"exact\"},\n]\n# Optional[AggregationAccuracyRequest]\naccuracy = None\n# Optional[FoundryBranch] | The Foundry branch to aggregate objects from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported.\nbranch = None\n# Optional[SdkPackageRid] | The package rid of the generated SDK.\nsdk_package_rid = None\n# Optional[SdkVersion] | The version of the generated SDK.\nsdk_version = None\n# Optional[SearchJsonQueryV2]\nwhere = {\"type\": \"eq\", \"field\": \"name\", \"value\": \"john\"}\n\n\ntry:\n api_response = client.ontologies.OntologyObject.aggregate(\n ontology,\n object_type,\n aggregation=aggregation,\n group_by=group_by,\n accuracy=accuracy,\n branch=branch,\n sdk_package_rid=sdk_package_rid,\n sdk_version=sdk_version,\n where=where,\n )\n print(\"The aggregate response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling OntologyObject.aggregate: %s\\n\" % e)" + } + ], + "v2.countObjects": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**.\nobject_type = \"employee\"\n# Optional[FoundryBranch] | The Foundry branch to count the objects from. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported.\nbranch = None\n# Optional[SdkPackageRid] | The package rid of the generated SDK.\nsdk_package_rid = None\n# Optional[SdkVersion] | The package version of the generated SDK.\nsdk_version = None\n\n\ntry:\n api_response = client.ontologies.OntologyObject.count(\n ontology,\n object_type,\n branch=branch,\n sdk_package_rid=sdk_package_rid,\n sdk_version=sdk_version,\n )\n print(\"The count response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling OntologyObject.count: %s\\n\" % e)" + } + ], + "v2.getObjectV2": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**.\nobject_type = \"employee\"\n# PropertyValueEscapedString | The primary key of the requested object. To look up the expected primary key for your object type, use the `Get object type` endpoint or the **Ontology Manager**.\nprimary_key = 50030\n# Optional[FoundryBranch] | The Foundry branch to get the object from. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported.\nbranch = None\n# Optional[bool] | A flag to exclude the retrieval of the `__rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2.\nexclude_rid = None\n# Optional[SdkPackageRid] | The package rid of the generated SDK.\nsdk_package_rid = None\n# Optional[SdkVersion] | The version of the generated SDK.\nsdk_version = None\n# Optional[List[SelectedPropertyApiName]] | The properties of the object type that should be included in the response. Omit this parameter to get all the properties.\nselect = None\n\n\ntry:\n api_response = client.ontologies.OntologyObject.get(\n ontology,\n object_type,\n primary_key,\n branch=branch,\n exclude_rid=exclude_rid,\n sdk_package_rid=sdk_package_rid,\n sdk_version=sdk_version,\n select=select,\n )\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling OntologyObject.get: %s\\n\" % e)" + } + ], + "v2.listObjectsV2": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**.\nobject_type = \"employee\"\n# Optional[FoundryBranch] | The Foundry branch to list objects from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported.\nbranch = None\n# Optional[bool] | A flag to exclude the retrieval of the `__rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2.\nexclude_rid = None\n# Optional[OrderBy]\norder_by = None\n# Optional[PageSize] | The desired size of the page to be returned. Defaults to 1,000. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details.\npage_size = None\n# Optional[PageToken]\npage_token = None\n# Optional[SdkPackageRid] | The package rid of the generated SDK.\nsdk_package_rid = None\n# Optional[SdkVersion] | The version of the generated SDK.\nsdk_version = None\n# Optional[List[SelectedPropertyApiName]] | The properties of the object type that should be included in the response. Omit this parameter to get all the properties.\nselect = None\n# Optional[bool] | A flag to use snapshot consistency when paging. Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. This defaults to false if not specified, which means you will always get the latest results.\nsnapshot = None\n\n\ntry:\n for ontology_object in client.ontologies.OntologyObject.list(\n ontology,\n object_type,\n branch=branch,\n exclude_rid=exclude_rid,\n order_by=order_by,\n page_size=page_size,\n page_token=page_token,\n sdk_package_rid=sdk_package_rid,\n sdk_version=sdk_version,\n select=select,\n snapshot=snapshot,\n ):\n pprint(ontology_object)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling OntologyObject.list: %s\\n\" % e)" + } + ], + "v2.searchObjectsV2": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**.\nobject_type = \"employee\"\n# List[PropertyApiName] | The API names of the object type properties to include in the response.\nselect = None\n# List[PropertyIdentifier] | The identifiers of the properties to include in the response. Only selectV2 or select should be populated, but not both.\nselect_v2 = None\n# Optional[FoundryBranch] | The Foundry branch to search objects from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported.\nbranch = None\n# Optional[bool] | A flag to exclude the retrieval of the `__rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2.\nexclude_rid = None\n# Optional[SearchOrderByV2]\norder_by = None\n# Optional[PageSize]\npage_size = None\n# Optional[PageToken]\npage_token = None\n# Optional[SdkPackageRid] | The package rid of the generated SDK.\nsdk_package_rid = None\n# Optional[SdkVersion] | The version of the generated SDK.\nsdk_version = None\n# Optional[bool] | A flag to use snapshot consistency when paging. Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. This defaults to false if not specified, which means you will always get the latest results.\nsnapshot = None\n# Optional[SearchJsonQueryV2]\nwhere = {\"type\": \"eq\", \"field\": \"age\", \"value\": 21}\n\n\ntry:\n api_response = client.ontologies.OntologyObject.search(\n ontology,\n object_type,\n select=select,\n select_v2=select_v2,\n branch=branch,\n exclude_rid=exclude_rid,\n order_by=order_by,\n page_size=page_size,\n page_token=page_token,\n sdk_package_rid=sdk_package_rid,\n sdk_version=sdk_version,\n snapshot=snapshot,\n where=where,\n )\n print(\"The search response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling OntologyObject.search: %s\\n\" % e)" + } + ], + "v2.aggregateObjectSetV2": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# List[AggregationV2]\naggregation = [\n {\"field\": \"tenure\", \"name\": \"min_tenure\", \"type\": \"min\"},\n {\"field\": \"tenure\", \"name\": \"avg_tenure\", \"type\": \"avg\"},\n]\n# List[AggregationGroupByV2]\ngroup_by = [\n {\n \"field\": \"startDate\",\n \"ranges\": [{\"endValue\": \"2020-06-01\", \"startValue\": \"2020-01-01\"}],\n \"type\": \"range\",\n },\n {\"field\": \"city\", \"type\": \"exact\"},\n]\n# ObjectSet\nobject_set = {\"objectType\": \"Employee\", \"type\": \"base\"}\n# Optional[AggregationAccuracyRequest]\naccuracy = None\n# Optional[FoundryBranch] | The Foundry branch to aggregate the objects from. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported.\nbranch = None\n# Optional[IncludeComputeUsage]\ninclude_compute_usage = None\n# Optional[SdkPackageRid] | The package rid of the generated SDK.\nsdk_package_rid = None\n# Optional[SdkVersion] | The package version of the generated SDK.\nsdk_version = None\n# Optional[OntologyTransactionId] | The ID of an Ontology transaction to read from. Transactions are an experimental feature and all workflows may not be supported.\ntransaction_id = None\n\n\ntry:\n api_response = client.ontologies.OntologyObjectSet.aggregate(\n ontology,\n aggregation=aggregation,\n group_by=group_by,\n object_set=object_set,\n accuracy=accuracy,\n branch=branch,\n include_compute_usage=include_compute_usage,\n sdk_package_rid=sdk_package_rid,\n sdk_version=sdk_version,\n transaction_id=transaction_id,\n )\n print(\"The aggregate response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling OntologyObjectSet.aggregate: %s\\n\" % e)" + } + ], + "v2.createTemporaryObjectSetV2": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# ObjectSet\nobject_set = {\"type\": \"base\", \"objectType\": \"Employee\"}\n# Optional[SdkPackageRid] | The package rid of the generated SDK.\nsdk_package_rid = None\n# Optional[SdkVersion] | The package version of the generated SDK.\nsdk_version = None\n\n\ntry:\n api_response = client.ontologies.OntologyObjectSet.create_temporary(\n ontology, object_set=object_set, sdk_package_rid=sdk_package_rid, sdk_version=sdk_version\n )\n print(\"The create_temporary response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling OntologyObjectSet.create_temporary: %s\\n\" % e)" + } + ], + "v2.getObjectSetV2": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# ObjectSetRid | The RID of the object set.\nobject_set_rid = \"ri.object-set.main.object-set.c32ccba5-1a55-4cfe-ad71-160c4c77a053\"\n\n\ntry:\n api_response = client.ontologies.OntologyObjectSet.get(ontology, object_set_rid)\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling OntologyObjectSet.get: %s\\n\" % e)" + } + ], + "v2.loadObjectSetV2": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# ObjectSet\nobject_set = {\"type\": \"base\", \"objectType\": \"Employee\"}\n# List[SelectedPropertyApiName]\nselect = None\n# List[PropertyIdentifier] | The identifiers of the properties to include in the response. Only selectV2 or select should be populated, but not both.\nselect_v2 = None\n# Optional[FoundryBranch] | The Foundry branch to load the object set from. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported.\nbranch = None\n# Optional[bool] | A flag to exclude the retrieval of the `__rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2.\nexclude_rid = None\n# Optional[IncludeComputeUsage]\ninclude_compute_usage = None\n# Optional[SearchOrderByV2]\norder_by = None\n# Optional[PageSize]\npage_size = 10000\n# Optional[PageToken]\npage_token = \"v1.QnVpbGQgdGhlIEZ1dHVyZTogaHR0cHM6Ly93d3cucGFsYW50aXIuY29tL2NhcmVlcnMvP2xldmVyLXNvdXJjZSU1YiU1ZD1BUElEb2NzI29wZW4tcG9zaXRpb25z\"\n# Optional[SdkPackageRid] | The package rid of the generated SDK.\nsdk_package_rid = None\n# Optional[SdkVersion] | The package version of the generated SDK.\nsdk_version = None\n# Optional[bool] | A flag to use snapshot consistency when paging. Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. This defaults to false if not specified, which means you will always get the latest results.\nsnapshot = None\n# Optional[OntologyTransactionId] | The ID of an Ontology transaction to read from. Transactions are an experimental feature and all workflows may not be supported.\ntransaction_id = None\n\n\ntry:\n api_response = client.ontologies.OntologyObjectSet.load(\n ontology,\n object_set=object_set,\n select=select,\n select_v2=select_v2,\n branch=branch,\n exclude_rid=exclude_rid,\n include_compute_usage=include_compute_usage,\n order_by=order_by,\n page_size=page_size,\n page_token=page_token,\n sdk_package_rid=sdk_package_rid,\n sdk_version=sdk_version,\n snapshot=snapshot,\n transaction_id=transaction_id,\n )\n print(\"The load response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling OntologyObjectSet.load: %s\\n\" % e)" + } + ], + "v2.loadObjectSetLinksV2": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# List[LinkTypeApiName]\nlinks = None\n# ObjectSet\nobject_set = {\"objectType\": \"Employee\", \"type\": \"base\"}\n# Optional[FoundryBranch] | The Foundry branch to aggregate the objects from. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported.\nbranch = None\n# Optional[IncludeComputeUsage]\ninclude_compute_usage = None\n# Optional[PageToken]\npage_token = None\n# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode.\npreview = None\n# Optional[SdkPackageRid] | The package rid of the generated SDK.\nsdk_package_rid = None\n# Optional[SdkVersion] | The package version of the generated SDK.\nsdk_version = None\n\n\ntry:\n api_response = client.ontologies.OntologyObjectSet.load_links(\n ontology,\n links=links,\n object_set=object_set,\n branch=branch,\n include_compute_usage=include_compute_usage,\n page_token=page_token,\n preview=preview,\n sdk_package_rid=sdk_package_rid,\n sdk_version=sdk_version,\n )\n print(\"The load_links response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling OntologyObjectSet.load_links: %s\\n\" % e)" + } + ], + "v2.loadObjectSetV2MultipleObjectTypes": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# ObjectSet\nobject_set = {\"type\": \"base\", \"objectType\": \"Employee\"}\n# List[SelectedPropertyApiName]\nselect = None\n# List[PropertyIdentifier] | The identifiers of the properties to include in the response. Only selectV2 or select should be populated, but not both.\nselect_v2 = None\n# Optional[FoundryBranch] | The Foundry branch to load the object set for multiple object types. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported.\nbranch = None\n# Optional[bool] | A flag to exclude the retrieval of the `$rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2.\nexclude_rid = None\n# Optional[IncludeComputeUsage]\ninclude_compute_usage = None\n# Optional[SearchOrderByV2]\norder_by = None\n# Optional[PageSize]\npage_size = 10000\n# Optional[PageToken]\npage_token = \"v1.QnVpbGQgdGhlIEZ1dHVyZTogaHR0cHM6Ly93d3cucGFsYW50aXIuY29tL2NhcmVlcnMvP2xldmVyLXNvdXJjZSU1YiU1ZD1BUElEb2NzI29wZW4tcG9zaXRpb25z\"\n# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode.\npreview = None\n# Optional[SdkPackageRid] | The package rid of the generated SDK.\nsdk_package_rid = None\n# Optional[SdkVersion] | The package version of the generated SDK.\nsdk_version = None\n# Optional[bool] | A flag to use snapshot consistency when paging. Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. This defaults to false if not specified, which means you will always get the latest results.\nsnapshot = None\n# Optional[OntologyTransactionId] | The ID of an Ontology transaction to read from. Transactions are an experimental feature and all workflows may not be supported.\ntransaction_id = None\n\n\ntry:\n api_response = client.ontologies.OntologyObjectSet.load_multiple_object_types(\n ontology,\n object_set=object_set,\n select=select,\n select_v2=select_v2,\n branch=branch,\n exclude_rid=exclude_rid,\n include_compute_usage=include_compute_usage,\n order_by=order_by,\n page_size=page_size,\n page_token=page_token,\n preview=preview,\n sdk_package_rid=sdk_package_rid,\n sdk_version=sdk_version,\n snapshot=snapshot,\n transaction_id=transaction_id,\n )\n print(\"The load_multiple_object_types response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling OntologyObjectSet.load_multiple_object_types: %s\\n\" % e)" + } + ], + "v2.loadObjectSetV2ObjectsOrInterfaces": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# ObjectSet\nobject_set = {\"type\": \"base\", \"interfaceBase\": \"Person\"}\n# List[SelectedPropertyApiName]\nselect = None\n# List[PropertyIdentifier] | The identifiers of the properties to include in the response. Only selectV2 or select should be populated, but not both.\nselect_v2 = None\n# Optional[FoundryBranch] | The Foundry branch to load the objects or interfaces from. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported.\nbranch = None\n# Optional[bool] | A flag to exclude the retrieval of the `$rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2.\nexclude_rid = None\n# Optional[SearchOrderByV2]\norder_by = None\n# Optional[PageSize]\npage_size = 10000\n# Optional[PageToken]\npage_token = \"v1.VGhlcmUgaXMgc28gbXVjaCBsZWZ0IHRvIGJ1aWxkIC0gcGFsYW50aXIuY29tL2NhcmVlcnMv\"\n# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode.\npreview = None\n# Optional[SdkPackageRid] | The package rid of the generated SDK.\nsdk_package_rid = None\n# Optional[SdkVersion] | The package version of the generated SDK.\nsdk_version = None\n# Optional[bool] | A flag to use snapshot consistency when paging. Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. This defaults to false if not specified, which means you will always get the latest results.\nsnapshot = None\n\n\ntry:\n api_response = client.ontologies.OntologyObjectSet.load_objects_or_interfaces(\n ontology,\n object_set=object_set,\n select=select,\n select_v2=select_v2,\n branch=branch,\n exclude_rid=exclude_rid,\n order_by=order_by,\n page_size=page_size,\n page_token=page_token,\n preview=preview,\n sdk_package_rid=sdk_package_rid,\n sdk_version=sdk_version,\n snapshot=snapshot,\n )\n print(\"The load_objects_or_interfaces response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling OntologyObjectSet.load_objects_or_interfaces: %s\\n\" % e)" + } + ], + "v2.ontologyTransactionPostEdits": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# OntologyTransactionId | The ID of the transaction to apply edits to. Transactions are an experimental feature and all workflows may not be supported.\ntransaction_id = None\n# List[TransactionEdit]\nedits = None\n# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode.\npreview = None\n\n\ntry:\n api_response = client.ontologies.OntologyTransaction.post_edits(\n ontology, transaction_id, edits=edits, preview=preview\n )\n print(\"The post_edits response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling OntologyTransaction.post_edits: %s\\n\" % e)" + } + ], + "v2.getOntologyValueType": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# ValueTypeApiName | The API name of the value type. To find the API name, use the **List value types** endpoint or check the **Ontology Manager**.\nvalue_type = \"countryCode\"\n# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode.\npreview = None\n\n\ntry:\n api_response = client.ontologies.OntologyValueType.get(ontology, value_type, preview=preview)\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling OntologyValueType.get: %s\\n\" % e)" + } + ], + "v2.listOntologyValueTypes": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode.\npreview = None\n\n\ntry:\n api_response = client.ontologies.OntologyValueType.list(ontology, preview=preview)\n print(\"The list response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling OntologyValueType.list: %s\\n\" % e)" + } + ], + "v2.executeQueryV2": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# QueryApiName | The API name of the Query to execute.\nquery_api_name = \"getEmployeesInCity\"\n# Dict[ParameterId, Optional[DataValue]]\nparameters = {\"city\": \"New York\"}\n# Optional[Attribution] | The Attribution to be used when executing this request.\nattribution = None\n# Optional[SdkPackageRid] | The package rid of the generated SDK.\nsdk_package_rid = None\n# Optional[SdkVersion] | The version of the generated SDK.\nsdk_version = None\n# Optional[TraceParent] | The W3C trace parent header included in the request.\ntrace_parent = None\n# Optional[TraceState] | The W3C trace state header included in the request.\ntrace_state = None\n# Optional[OntologyTransactionId] | The ID of an Ontology transaction to read from. Transactions are an experimental feature and all workflows may not be supported.\ntransaction_id = None\n# Optional[FunctionVersion] | The version of the Query to execute.\nversion = None\n\n\ntry:\n api_response = client.ontologies.Query.execute(\n ontology,\n query_api_name,\n parameters=parameters,\n attribution=attribution,\n sdk_package_rid=sdk_package_rid,\n sdk_version=sdk_version,\n trace_parent=trace_parent,\n trace_state=trace_state,\n transaction_id=transaction_id,\n version=version,\n )\n print(\"The execute response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Query.execute: %s\\n\" % e)" + } + ], + "v2.getQueryTypeV2": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# QueryApiName | The API name of the query type. To find the API name, use the **List query types** endpoint or check the **Ontology Manager**.\nquery_api_name = \"getEmployeesInCity\"\n# Optional[SdkPackageRid] | The package rid of the generated SDK.\nsdk_package_rid = None\n# Optional[SdkVersion] | The version of the generated SDK.\nsdk_version = None\n# Optional[FunctionVersion] | The version of the Query to get.\nversion = None\n\n\ntry:\n api_response = client.ontologies.Ontology.QueryType.get(\n ontology,\n query_api_name,\n sdk_package_rid=sdk_package_rid,\n sdk_version=sdk_version,\n version=version,\n )\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling QueryType.get: %s\\n\" % e)" + } + ], + "v2.listQueryTypesV2": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# Optional[PageSize] | The desired size of the page to be returned. Defaults to 100. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details.\npage_size = None\n# Optional[PageToken]\npage_token = None\n\n\ntry:\n for query_type in client.ontologies.Ontology.QueryType.list(\n ontology, page_size=page_size, page_token=page_token\n ):\n pprint(query_type)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling QueryType.list: %s\\n\" % e)" + } + ], + "v2.getFirstPoint": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**.\nobject_type = \"employee\"\n# PropertyValueEscapedString | The primary key of the object with the time series property.\nprimary_key = 50030\n# PropertyApiName | The API name of the time series property. To find the API name for your time series property, check the **Ontology Manager** or use the **Get object type** endpoint.\nproperty = \"performance\"\n# Optional[SdkPackageRid] | The package rid of the generated SDK.\nsdk_package_rid = None\n# Optional[SdkVersion] | The version of the generated SDK.\nsdk_version = None\n\n\ntry:\n api_response = client.ontologies.TimeSeriesPropertyV2.get_first_point(\n ontology,\n object_type,\n primary_key,\n property,\n sdk_package_rid=sdk_package_rid,\n sdk_version=sdk_version,\n )\n print(\"The get_first_point response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling TimeSeriesPropertyV2.get_first_point: %s\\n\" % e)" + } + ], + "v2.getLastPoint": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**.\nobject_type = \"employee\"\n# PropertyValueEscapedString | The primary key of the object with the time series property.\nprimary_key = 50030\n# PropertyApiName | The API name of the time series property. To find the API name for your time series property, check the **Ontology Manager** or use the **Get object type** endpoint.\nproperty = \"performance\"\n# Optional[SdkPackageRid] | The package rid of the generated SDK.\nsdk_package_rid = None\n# Optional[SdkVersion] | The version of the generated SDK.\nsdk_version = None\n\n\ntry:\n api_response = client.ontologies.TimeSeriesPropertyV2.get_last_point(\n ontology,\n object_type,\n primary_key,\n property,\n sdk_package_rid=sdk_package_rid,\n sdk_version=sdk_version,\n )\n print(\"The get_last_point response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling TimeSeriesPropertyV2.get_last_point: %s\\n\" % e)" + } + ], + "v2.streamPoints": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**.\nobject_type = \"employee\"\n# PropertyValueEscapedString | The primary key of the object with the time series property.\nprimary_key = 50030\n# PropertyApiName | The API name of the time series property. To find the API name for your time series property, check the **Ontology Manager** or use the **Get object type** endpoint.\nproperty = None\n# Optional[AggregateTimeSeries]\naggregate = None\n# Optional[StreamingOutputFormat] | The output format to serialize the output binary stream in. Default is JSON. ARROW is more efficient than JSON at streaming a large sized response.\nformat = None\n# Optional[TimeRange]\nrange = {\n \"type\": \"relative\",\n \"startTime\": {\"when\": \"BEFORE\", \"value\": 5, \"unit\": \"MONTHS\"},\n \"endTime\": {\"when\": \"BEFORE\", \"value\": 1, \"unit\": \"MONTHS\"},\n}\n# Optional[SdkPackageRid] | The package rid of the generated SDK.\nsdk_package_rid = None\n# Optional[SdkVersion] | The version of the generated SDK.\nsdk_version = None\n\n\ntry:\n api_response = client.ontologies.TimeSeriesPropertyV2.stream_points(\n ontology,\n object_type,\n primary_key,\n property,\n aggregate=aggregate,\n format=format,\n range=range,\n sdk_package_rid=sdk_package_rid,\n sdk_version=sdk_version,\n )\n print(\"The stream_points response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling TimeSeriesPropertyV2.stream_points: %s\\n\" % e)" + } + ], + "v2.getLatestValue": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**.\nobject_type = \"employee\"\n# PropertyValueEscapedString | The primary key of the object with the timeseries property.\nprimary_key = 50030\n# PropertyApiName | The API name of the timeseries property. To find the API name for your property value bank property, check the **Ontology Manager** or use the **Get object type** endpoint.\nproperty_name = \"performance\"\n# Optional[SdkPackageRid] | The package rid of the generated SDK.\nsdk_package_rid = None\n# Optional[SdkVersion] | The version of the generated SDK.\nsdk_version = None\n\n\ntry:\n api_response = client.ontologies.TimeSeriesValueBankProperty.get_latest_value(\n ontology,\n object_type,\n primary_key,\n property_name,\n sdk_package_rid=sdk_package_rid,\n sdk_version=sdk_version,\n )\n print(\"The get_latest_value response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling TimeSeriesValueBankProperty.get_latest_value: %s\\n\" % e)" + } + ], + "v2.streamValues": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**.\nobject_type = \"employee\"\n# PropertyValueEscapedString | The primary key of the object with the time series property.\nprimary_key = 50030\n# PropertyApiName | The API name of the time series backed property. To find the API name, check the **Ontology Manager** or use the **Get object type** endpoint.\nproperty = None\n# Optional[TimeRange]\nrange = {\n \"type\": \"relative\",\n \"startTime\": {\"when\": \"BEFORE\", \"value\": 5, \"unit\": \"MONTHS\"},\n \"endTime\": {\"when\": \"BEFORE\", \"value\": 1, \"unit\": \"MONTHS\"},\n}\n# Optional[SdkPackageRid] | The package rid of the generated SDK.\nsdk_package_rid = None\n# Optional[SdkVersion] | The version of the generated SDK.\nsdk_version = None\n\n\ntry:\n api_response = client.ontologies.TimeSeriesValueBankProperty.stream_values(\n ontology,\n object_type,\n primary_key,\n property,\n range=range,\n sdk_package_rid=sdk_package_rid,\n sdk_version=sdk_version,\n )\n print(\"The stream_values response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling TimeSeriesValueBankProperty.stream_values: %s\\n\" % e)" + } + ], + "v2.cancelBuild": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# BuildRid | The RID of a Build.\nbuild_rid = \"ri.foundry.main.build.a4386b7e-d546-49be-8a36-eefc355f5c58\"\n\n\ntry:\n api_response = client.orchestration.Build.cancel(build_rid)\n print(\"The cancel response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Build.cancel: %s\\n\" % e)" + } + ], + "v2.createBuild": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# FallbackBranches\nfallback_branches = []\n# BuildTarget | The targets of the schedule.\ntarget = {\n \"type\": \"manual\",\n \"targetRids\": [\n \"ri.foundry.main.dataset.4263bdd9-d6bc-4244-9cca-893c1a2aef62\",\n \"ri.foundry.main.dataset.86939c1e-4256-41db-9fe7-e7ee9e0f752a\",\n ],\n}\n# Optional[AbortOnFailure]\nabort_on_failure = False\n# Optional[BranchName] | The target branch the build should run on.\nbranch_name = \"master\"\n# Optional[ForceBuild]\nforce_build = None\n# Optional[NotificationsEnabled]\nnotifications_enabled = None\n# Optional[RetryBackoffDuration]\nretry_backoff_duration = {\"unit\": \"SECONDS\", \"value\": 30}\n# Optional[RetryCount] | The number of retry attempts for failed jobs.\nretry_count = 1\n\n\ntry:\n api_response = client.orchestration.Build.create(\n fallback_branches=fallback_branches,\n target=target,\n abort_on_failure=abort_on_failure,\n branch_name=branch_name,\n force_build=force_build,\n notifications_enabled=notifications_enabled,\n retry_backoff_duration=retry_backoff_duration,\n retry_count=retry_count,\n )\n print(\"The create response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Build.create: %s\\n\" % e)" + } + ], + "v2.getBuild": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# BuildRid | The RID of a Build.\nbuild_rid = \"ri.foundry.main.build.a4386b7e-d546-49be-8a36-eefc355f5c58\"\n\n\ntry:\n api_response = client.orchestration.Build.get(build_rid)\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Build.get: %s\\n\" % e)" + } + ], + "v2.getBuildsBatch": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# List[GetBuildsBatchRequestElement] | Body of the request\nbody = [{\"buildRid\": \"ri.foundry.main.build.a4386b7e-d546-49be-8a36-eefc355f5c58\"}]\n\n\ntry:\n api_response = client.orchestration.Build.get_batch(body)\n print(\"The get_batch response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Build.get_batch: %s\\n\" % e)" + } + ], + "v2.listJobsOfBuild": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# BuildRid | The RID of a Build.\nbuild_rid = \"ri.foundry.main.build.a4386b7e-d546-49be-8a36-eefc355f5c58\"\n# Optional[PageSize] | The page size to use for the endpoint.\npage_size = None\n# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request.\npage_token = None\n\n\ntry:\n for build in client.orchestration.Build.jobs(\n build_rid, page_size=page_size, page_token=page_token\n ):\n pprint(build)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Build.jobs: %s\\n\" % e)" + } + ], + "v2.searchBuilds": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# SearchBuildsFilter\nwhere = None\n# Optional[SearchBuildsOrderBy]\norder_by = {\"fields\": [{\"field\": \"STARTED_TIME\", \"direction\": \"ASC\"}]}\n# Optional[PageSize] | The page size for the search request. If no value is provided, a default of `100` will be used.\npage_size = 100\n# Optional[PageToken]\npage_token = \"v1.QnVpbGQgdGhlIEZ1dHVyZTogaHR0cHM6Ly93d3cucGFsYW50aXIuY29tL2NhcmVlcnMvP2xldmVyLXNvdXJjZSU1YiU1ZD1BUElEb2NzI29wZW4tcG9zaXRpb25z\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.orchestration.Build.search(\n where=where, order_by=order_by, page_size=page_size, page_token=page_token, preview=preview\n )\n print(\"The search response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Build.search: %s\\n\" % e)" + } + ], + "v2.getJob": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# JobRid | The RID of a Job.\njob_rid = \"ri.foundry.main.job.aaf94076-d773-4732-a1df-3b638eb50448\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.orchestration.Job.get(job_rid, preview=preview)\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Job.get: %s\\n\" % e)" + } + ], + "v2.getJobsBatch": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# List[GetJobsBatchRequestElement] | Body of the request\nbody = [{\"jobRid\": \"ri.foundry.main.job.aaf94076-d773-4732-a1df-3b638eb50448\"}]\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.orchestration.Job.get_batch(body, preview=preview)\n print(\"The get_batch response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Job.get_batch: %s\\n\" % e)" + } + ], + "v2.createSchedule": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# CreateScheduleRequestAction\naction = {\n \"abortOnFailure\": False,\n \"forceBuild\": False,\n \"retryBackoffDuration\": {\"unit\": \"SECONDS\", \"value\": 30},\n \"retryCount\": 1,\n \"fallbackBranches\": [],\n \"branchName\": \"master\",\n \"notificationsEnabled\": False,\n \"target\": {\n \"type\": \"manual\",\n \"targetRids\": [\n \"ri.foundry.main.dataset.b737e24d-6b19-43aa-93d5-da9fc4073f6e\",\n \"ri.foundry.main.dataset.d2452a94-a755-4778-8bfc-a315ab52fc43\",\n ],\n },\n}\n# Optional[str]\ndescription = \"Run all the transforms at midnight\"\n# Optional[str]\ndisplay_name = \"My Daily Schedule\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n# Optional[CreateScheduleRequestScopeMode]\nscope_mode = {\"type\": \"user\"}\n# Optional[Trigger] | The schedule trigger. If the requesting user does not have permission to see the trigger, this will be empty.\ntrigger = {\"type\": \"time\", \"cronExpression\": \"0 0 * * *\", \"timeZone\": \"UTC\"}\n\n\ntry:\n api_response = client.orchestration.Schedule.create(\n action=action,\n description=description,\n display_name=display_name,\n preview=preview,\n scope_mode=scope_mode,\n trigger=trigger,\n )\n print(\"The create response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Schedule.create: %s\\n\" % e)" + } + ], + "v2.deleteSchedule": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ScheduleRid\nschedule_rid = None\n\n\ntry:\n api_response = client.orchestration.Schedule.delete(schedule_rid)\n print(\"The delete response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Schedule.delete: %s\\n\" % e)" + } + ], + "v2.getSchedule": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ScheduleRid\nschedule_rid = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.orchestration.Schedule.get(schedule_rid, preview=preview)\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Schedule.get: %s\\n\" % e)" + } + ], + "v2.getAffectedResourcesSchedule": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ScheduleRid\nschedule_rid = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.orchestration.Schedule.get_affected_resources(\n schedule_rid, preview=preview\n )\n print(\"The get_affected_resources response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Schedule.get_affected_resources: %s\\n\" % e)" + } + ], + "v2.getSchedulesBatch": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# List[GetSchedulesBatchRequestElement] | Body of the request\nbody = [{\"scheduleRid\": \"ri.scheduler.main.schedule.5ad5c340-59f3-4a60-9fc6-161bb984f871\"}]\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.orchestration.Schedule.get_batch(body, preview=preview)\n print(\"The get_batch response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Schedule.get_batch: %s\\n\" % e)" + } + ], + "v2.pauseSchedule": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ScheduleRid\nschedule_rid = None\n\n\ntry:\n api_response = client.orchestration.Schedule.pause(schedule_rid)\n print(\"The pause response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Schedule.pause: %s\\n\" % e)" + } + ], + "v2.replaceSchedule": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ScheduleRid\nschedule_rid = None\n# ReplaceScheduleRequestAction\naction = {\n \"abortOnFailure\": False,\n \"forceBuild\": False,\n \"retryBackoffDuration\": {\"unit\": \"SECONDS\", \"value\": 30},\n \"retryCount\": 1,\n \"fallbackBranches\": [],\n \"branchName\": \"master\",\n \"notificationsEnabled\": False,\n \"target\": {\n \"type\": \"manual\",\n \"targetRids\": [\n \"ri.foundry.main.dataset.b737e24d-6b19-43aa-93d5-da9fc4073f6e\",\n \"ri.foundry.main.dataset.d2452a94-a755-4778-8bfc-a315ab52fc43\",\n ],\n },\n}\n# Optional[str]\ndescription = \"Run all the transforms at midnight\"\n# Optional[str]\ndisplay_name = \"My Daily Schedule\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n# Optional[ReplaceScheduleRequestScopeMode]\nscope_mode = {\"type\": \"user\"}\n# Optional[Trigger] | The schedule trigger. If the requesting user does not have permission to see the trigger, this will be empty.\ntrigger = {\"type\": \"time\", \"cronExpression\": \"0 0 * * *\", \"timeZone\": \"UTC\"}\n\n\ntry:\n api_response = client.orchestration.Schedule.replace(\n schedule_rid,\n action=action,\n description=description,\n display_name=display_name,\n preview=preview,\n scope_mode=scope_mode,\n trigger=trigger,\n )\n print(\"The replace response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Schedule.replace: %s\\n\" % e)" + } + ], + "v2.runSchedule": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ScheduleRid\nschedule_rid = None\n\n\ntry:\n api_response = client.orchestration.Schedule.run(schedule_rid)\n print(\"The run response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Schedule.run: %s\\n\" % e)" + } + ], + "v2.listRunsOfSchedule": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ScheduleRid\nschedule_rid = None\n# Optional[PageSize] | The page size to use for the endpoint.\npage_size = None\n# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request.\npage_token = None\n\n\ntry:\n for schedule in client.orchestration.Schedule.runs(\n schedule_rid, page_size=page_size, page_token=page_token\n ):\n pprint(schedule)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Schedule.runs: %s\\n\" % e)" + } + ], + "v2.unpauseSchedule": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ScheduleRid\nschedule_rid = None\n\n\ntry:\n api_response = client.orchestration.Schedule.unpause(schedule_rid)\n print(\"The unpause response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Schedule.unpause: %s\\n\" % e)" + } + ], + "v2.getScheduleVersion": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ScheduleVersionRid | The RID of a schedule version\nschedule_version_rid = \"ri.scheduler.main.schedule-version.4d1eb55f-6c13-411c-a911-5d84e08d8017\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.orchestration.ScheduleVersion.get(schedule_version_rid, preview=preview)\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling ScheduleVersion.get: %s\\n\" % e)" + } + ], + "v2.getScheduleOfScheduleVersion": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ScheduleVersionRid | The RID of a schedule version\nschedule_version_rid = \"ri.scheduler.main.schedule-version.4d1eb55f-6c13-411c-a911-5d84e08d8017\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.orchestration.ScheduleVersion.schedule(\n schedule_version_rid, preview=preview\n )\n print(\"The schedule response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling ScheduleVersion.schedule: %s\\n\" % e)" + } + ], + "v2.cancelSqlQuery": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# SqlQueryId | The id of a query.\nsql_query_id = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.sql_queries.SqlQuery.cancel(sql_query_id, preview=preview)\n print(\"The cancel response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling SqlQuery.cancel: %s\\n\" % e)" + } + ], + "v2.executeSqlQuery": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# str | The SQL query to execute. Queries should conform to the [Spark SQL dialect](https://spark.apache.org/docs/latest/sql-ref.html). This supports SELECT queries only. Datasets can be referenced in SQL queries by path or by RID. See the [documentation](https://www.palantir.com/docs/foundry/analytics-connectivity/odbc-jdbc-drivers/#use-sql-to-query-foundry-datasets) for more details.\nquery = \"SELECT * FROM `/Path/To/Dataset`\"\n# Optional[List[BranchName]] | The list of branch ids to use as fallbacks if the query fails to execute on the primary branch. If a is not explicitly provided in the SQL query, the resource will be queried on the first fallback branch provided that exists. If no fallback branches are provided the default branch is used. This is `master` for most enrollments.\nfallback_branch_ids = [\"master\"]\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.sql_queries.SqlQuery.execute(\n query=query, fallback_branch_ids=fallback_branch_ids, preview=preview\n )\n print(\"The execute response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling SqlQuery.execute: %s\\n\" % e)" + } + ], + "v2.getResultsSqlQuery": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# SqlQueryId | The id of a query.\nsql_query_id = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.sql_queries.SqlQuery.get_results(sql_query_id, preview=preview)\n print(\"The get_results response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling SqlQuery.get_results: %s\\n\" % e)" + } + ], + "v2.getStatusSqlQuery": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# SqlQueryId | The id of a query.\nsql_query_id = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.sql_queries.SqlQuery.get_status(sql_query_id, preview=preview)\n print(\"The get_status response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling SqlQuery.get_status: %s\\n\" % e)" + } + ], + "v2.createStreamingDataset": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetName\nname = \"My Dataset\"\n# FolderRid\nparent_folder_rid = \"ri.compass.main.folder.c410f510-2937-420e-8ea3-8c9bcb3c1791\"\n# StreamSchema | The Foundry schema to apply to the new stream.\nschema = {\n \"fields\": [\n {\"name\": \"timestamp\", \"schema\": {\"nullable\": False, \"dataType\": {\"type\": \"timestamp\"}}},\n {\"name\": \"value\", \"schema\": {\"nullable\": False, \"dataType\": {\"type\": \"string\"}}},\n ],\n \"keyFieldNames\": [\"timestamp\"],\n}\n# Optional[BranchName] | The branch to create the initial stream on. If not specified, the default branch will be used ('master' for most enrollments).\nbranch_name = \"master\"\n# Optional[Compressed] | Whether or not compression is enabled for the stream. Defaults to false.\ncompressed = False\n# Optional[PartitionsCount] | The number of partitions for the Foundry stream. Generally, each partition can handle about 5 mb/s of data, so for higher volume streams, more partitions are recommended. If not specified, 1 partition is used. This value cannot be changed later.\npartitions_count = 1\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n# Optional[StreamType] | A conceptual representation of the expected shape of the data for a stream. HIGH_THROUGHPUT and LOW_LATENCY are not compatible with each other. Defaults to LOW_LATENCY.\nstream_type = \"LOW_LATENCY\"\n\n\ntry:\n api_response = client.streams.Dataset.create(\n name=name,\n parent_folder_rid=parent_folder_rid,\n schema=schema,\n branch_name=branch_name,\n compressed=compressed,\n partitions_count=partitions_count,\n preview=preview,\n stream_type=stream_type,\n )\n print(\"The create response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Dataset.create: %s\\n\" % e)" + } + ], + "v2.createStream": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid\ndataset_rid = None\n# BranchName\nbranch_name = \"master\"\n# CreateStreamRequestStreamSchema | The Foundry schema for this stream.\nschema = None\n# Optional[Compressed] | Whether or not compression is enabled for the stream. Defaults to false.\ncompressed = False\n# Optional[PartitionsCount] | The number of partitions for the Foundry stream. Defaults to 1. Generally, each partition can handle about 5 mb/s of data, so for higher volume streams, more partitions are recommended.\npartitions_count = 1\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n# Optional[StreamType] | A conceptual representation of the expected shape of the data for a stream. HIGH_THROUGHPUT and LOW_LATENCY are not compatible with each other. Defaults to LOW_LATENCY.\nstream_type = \"LOW_LATENCY\"\n\n\ntry:\n api_response = client.streams.Dataset.Stream.create(\n dataset_rid,\n branch_name=branch_name,\n schema=schema,\n compressed=compressed,\n partitions_count=partitions_count,\n preview=preview,\n stream_type=stream_type,\n )\n print(\"The create response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Stream.create: %s\\n\" % e)" + } + ], + "v2.getStream": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid\ndataset_rid = None\n# BranchName\nstream_branch_name = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.streams.Dataset.Stream.get(\n dataset_rid, stream_branch_name, preview=preview\n )\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Stream.get: %s\\n\" % e)" + } + ], + "v2.publishBinaryRecordToStream": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid\ndataset_rid = None\n# BranchName\nstream_branch_name = None\n# bytes | The binary record to publish to the stream\nbody = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n# Optional[ViewRid] | If provided, this operation will only write to the stream corresponding to the specified view rid. If not provided, this operation will write to the latest stream on the branch. Providing this value is an advanced configuration, to be used when additional control over the underlying streaming data structures is needed.\nview_rid = None\n\n\ntry:\n api_response = client.streams.Dataset.Stream.publish_binary_record(\n dataset_rid, stream_branch_name, body, preview=preview, view_rid=view_rid\n )\n print(\"The publish_binary_record response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Stream.publish_binary_record: %s\\n\" % e)" + } + ], + "v2.publishRecordToStream": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid\ndataset_rid = None\n# BranchName\nstream_branch_name = None\n# Record | The record to publish to the stream\nrecord = {\"timestamp\": 1731426022784, \"value\": \"Hello, World!\"}\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n# Optional[ViewRid] | If provided, this endpoint will only write to the stream corresponding to the specified view rid. If not provided, this endpoint will write the latest stream on the branch. Providing this value is an advanced configuration, to be used when additional control over the underlying streaming data structures is needed.\nview_rid = \"ri.foundry-streaming.main.view.ecd4f0f6-8526-4468-9eda-14939449ad79\"\n\n\ntry:\n api_response = client.streams.Dataset.Stream.publish_record(\n dataset_rid, stream_branch_name, record=record, preview=preview, view_rid=view_rid\n )\n print(\"The publish_record response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Stream.publish_record: %s\\n\" % e)" + } + ], + "v2.publishRecordsToStream": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid\ndataset_rid = None\n# BranchName\nstream_branch_name = None\n# List[Record] | The records to publish to the stream\nrecords = [{\"timestamp\": 1731426022784, \"value\": \"Hello, World!\"}]\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n# Optional[ViewRid] | If provided, this endpoint will only write to the stream corresponding to the specified view rid. If not provided, this endpoint will write to the latest stream on the branch. Providing this value is an advanced configuration, to be used when additional control over the underlying streaming data structures is needed.\nview_rid = \"ri.foundry-streaming.main.view.ecd4f0f6-8526-4468-9eda-14939449ad79\"\n\n\ntry:\n api_response = client.streams.Dataset.Stream.publish_records(\n dataset_rid, stream_branch_name, records=records, preview=preview, view_rid=view_rid\n )\n print(\"The publish_records response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Stream.publish_records: %s\\n\" % e)" + } + ], + "v2.resetStream": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid\ndataset_rid = None\n# BranchName\nstream_branch_name = None\n# Optional[Compressed] | Whether or not compression is enabled for the stream. If omitted, the compression setting of the existing stream on the branch will be used.\ncompressed = False\n# Optional[PartitionsCount] | The number of partitions for the Foundry stream. Generally, each partition can handle about 5 mb/s of data, so for higher volume streams, more partitions are recommended. If omitted, the partitions count of the existing stream on the branch will be used.\npartitions_count = 1\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n# Optional[StreamSchema] | The Foundry schema to apply to the new stream. If omitted, the schema of the existing stream on the branch will be used.\nschema = {\n \"fields\": [\n {\"name\": \"timestamp\", \"schema\": {\"nullable\": False, \"dataType\": {\"type\": \"timestamp\"}}},\n {\"name\": \"value\", \"schema\": {\"nullable\": False, \"dataType\": {\"type\": \"string\"}}},\n ],\n \"keyFieldNames\": [\"timestamp\"],\n}\n# Optional[StreamType] | A conceptual representation of the expected shape of the data for a stream. HIGH_THROUGHPUT and LOW_LATENCY are not compatible with each other. Defaults to LOW_LATENCY. If omitted, the stream type of the existing stream on the branch will be used.\nstream_type = \"LOW_LATENCY\"\n\n\ntry:\n api_response = client.streams.Dataset.Stream.reset(\n dataset_rid,\n stream_branch_name,\n compressed=compressed,\n partitions_count=partitions_count,\n preview=preview,\n schema=schema,\n stream_type=stream_type,\n )\n print(\"The reset response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Stream.reset: %s\\n\" % e)" + } + ], + "v2.getThirdPartyApplication": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ThirdPartyApplicationRid | An RID identifying a third-party application created in Developer Console.\nthird_party_application_rid = (\n \"ri.third-party-applications.main.application.292db3b2-b653-4de6-971c-7e97a7b881d6\"\n)\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.third_party_applications.ThirdPartyApplication.get(\n third_party_application_rid, preview=preview\n )\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling ThirdPartyApplication.get: %s\\n\" % e)" + } + ], + "v2.deleteVersion": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ThirdPartyApplicationRid | An RID identifying a third-party application created in Developer Console.\nthird_party_application_rid = (\n \"ri.third-party-applications.main.application.292db3b2-b653-4de6-971c-7e97a7b881d6\"\n)\n# VersionVersion | The semantic version of the Website.\nversion_version = \"1.2.0\"\n\n\ntry:\n api_response = client.third_party_applications.ThirdPartyApplication.Website.Version.delete(\n third_party_application_rid, version_version\n )\n print(\"The delete response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Version.delete: %s\\n\" % e)" + } + ], + "v2.getVersion": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ThirdPartyApplicationRid | An RID identifying a third-party application created in Developer Console.\nthird_party_application_rid = (\n \"ri.third-party-applications.main.application.292db3b2-b653-4de6-971c-7e97a7b881d6\"\n)\n# VersionVersion | The semantic version of the Website.\nversion_version = \"1.2.0\"\n\n\ntry:\n api_response = client.third_party_applications.ThirdPartyApplication.Website.Version.get(\n third_party_application_rid, version_version\n )\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Version.get: %s\\n\" % e)" + } + ], + "v2.listVersions": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ThirdPartyApplicationRid | An RID identifying a third-party application created in Developer Console.\nthird_party_application_rid = (\n \"ri.third-party-applications.main.application.292db3b2-b653-4de6-971c-7e97a7b881d6\"\n)\n# Optional[PageSize] | The page size to use for the endpoint.\npage_size = None\n# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request.\npage_token = None\n\n\ntry:\n for version in client.third_party_applications.ThirdPartyApplication.Website.Version.list(\n third_party_application_rid, page_size=page_size, page_token=page_token\n ):\n pprint(version)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Version.list: %s\\n\" % e)" + } + ], + "v2.uploadVersion": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ThirdPartyApplicationRid | An RID identifying a third-party application created in Developer Console.\nthird_party_application_rid = (\n \"ri.third-party-applications.main.application.292db3b2-b653-4de6-971c-7e97a7b881d6\"\n)\n# bytes | The zip file that contains the contents of your application. For more information, refer to the [documentation](https://palantir.com/docs/foundry/ontology-sdk/deploy-osdk-application-on-foundry/) user documentation.\nbody = None\n# VersionVersion\nversion = None\n\n\ntry:\n api_response = client.third_party_applications.ThirdPartyApplication.Website.Version.upload(\n third_party_application_rid, body, version=version\n )\n print(\"The upload response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Version.upload: %s\\n\" % e)" + } + ], + "v2.uploadSnapshotVersion": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ThirdPartyApplicationRid | An RID identifying a third-party application created in Developer Console.\nthird_party_application_rid = (\n \"ri.third-party-applications.main.application.292db3b2-b653-4de6-971c-7e97a7b881d6\"\n)\n# bytes | The zip file that contains the contents of your application. For more information, refer to the [documentation](https://palantir.com/docs/foundry/ontology-sdk/deploy-osdk-application-on-foundry/) user documentation.\nbody = None\n# VersionVersion\nversion = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n# Optional[str] | The identifier of the snapshot. If the identifier follows the format `foundry.v1@@@`, PR preview for such identifier will be accessible from foundry code repositories.\nsnapshot_identifier = (\n \"foundry.v1@ri.stemma.main.repository.a@ri.pull-request.main.pull-request.a@hash\"\n)\n\n\ntry:\n api_response = (\n client.third_party_applications.ThirdPartyApplication.Website.Version.upload_snapshot(\n third_party_application_rid,\n body,\n version=version,\n preview=preview,\n snapshot_identifier=snapshot_identifier,\n )\n )\n print(\"The upload_snapshot response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Version.upload_snapshot: %s\\n\" % e)" + } + ], + "v2.deployWebsite": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ThirdPartyApplicationRid | An RID identifying a third-party application created in Developer Console.\nthird_party_application_rid = (\n \"ri.third-party-applications.main.application.292db3b2-b653-4de6-971c-7e97a7b881d6\"\n)\n# VersionVersion\nversion = \"1.2.0\"\n\n\ntry:\n api_response = client.third_party_applications.ThirdPartyApplication.Website.deploy(\n third_party_application_rid, version=version\n )\n print(\"The deploy response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Website.deploy: %s\\n\" % e)" + } + ], + "v2.getWebsite": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ThirdPartyApplicationRid | An RID identifying a third-party application created in Developer Console.\nthird_party_application_rid = (\n \"ri.third-party-applications.main.application.292db3b2-b653-4de6-971c-7e97a7b881d6\"\n)\n\n\ntry:\n api_response = client.third_party_applications.ThirdPartyApplication.Website.get(\n third_party_application_rid\n )\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Website.get: %s\\n\" % e)" + } + ], + "v2.undeployWebsite": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# ThirdPartyApplicationRid | An RID identifying a third-party application created in Developer Console.\nthird_party_application_rid = (\n \"ri.third-party-applications.main.application.292db3b2-b653-4de6-971c-7e97a7b881d6\"\n)\n\n\ntry:\n api_response = client.third_party_applications.ThirdPartyApplication.Website.undeploy(\n third_party_application_rid\n )\n print(\"The undeploy response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Website.undeploy: %s\\n\" % e)" + } + ], + "v2.disableDevModeSettings": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.widgets.DevModeSettings.disable(preview=preview)\n print(\"The disable response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling DevModeSettings.disable: %s\\n\" % e)" + } + ], + "v2.enableDevModeSettings": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.widgets.DevModeSettings.enable(preview=preview)\n print(\"The enable response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling DevModeSettings.enable: %s\\n\" % e)" + } + ], + "v2.getDevModeSettings": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.widgets.DevModeSettings.get(preview=preview)\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling DevModeSettings.get: %s\\n\" % e)" + } + ], + "v2.pauseDevModeSettings": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.widgets.DevModeSettings.pause(preview=preview)\n print(\"The pause response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling DevModeSettings.pause: %s\\n\" % e)" + } + ], + "v2.setWidgetSetDevModeSettings": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# WidgetSetDevModeSettings\nsettings = {\n \"widgetSettings\": {\n \"ri.widgetregistry..widget.21dt2c42-b7df-4b23-880b-1436a3dred2e\": {\n \"stylesheetEntrypoints\": [{\"filePath\": \"dist/app.js\"}],\n \"scriptEntrypoints\": [{\"filePath\": \"dist/app.js\", \"scriptType\": \"DEFAULT\"}],\n }\n }\n}\n# WidgetSetRid\nwidget_set_rid = \"ri.widgetregistry..widget-set.21dt2c42-b7df-4b23-880b-1436a3dred2e\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.widgets.DevModeSettings.set_widget_set(\n settings=settings, widget_set_rid=widget_set_rid, preview=preview\n )\n print(\"The set_widget_set response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling DevModeSettings.set_widget_set: %s\\n\" % e)" + } + ], + "v2.setWidgetSetDevModeSettingsById": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# WidgetSetDevModeSettingsById\nsettings = {\n \"widgetSettings\": {\n \"myCustomWidget\": {\n \"stylesheetEntrypoints\": [{\"filePath\": \"dist/app.js\"}],\n \"scriptEntrypoints\": [{\"filePath\": \"dist/app.js\", \"scriptType\": \"DEFAULT\"}],\n }\n }\n}\n# WidgetSetRid\nwidget_set_rid = \"ri.widgetregistry..widget-set.21dt2c42-b7df-4b23-880b-1436a3dred2e\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.widgets.DevModeSettings.set_widget_set_by_id(\n settings=settings, widget_set_rid=widget_set_rid, preview=preview\n )\n print(\"The set_widget_set_by_id response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling DevModeSettings.set_widget_set_by_id: %s\\n\" % e)" + } + ], + "v2.deleteRelease": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# WidgetSetRid | A Resource Identifier (RID) identifying a widget set.\nwidget_set_rid = \"ri.widgetregistry..widget-set.21dt2c42-b7df-4b23-880b-1436a3dred2e\"\n# ReleaseVersion | The semantic version of the widget set.\nrelease_version = \"1.2.0\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.widgets.WidgetSet.Release.delete(\n widget_set_rid, release_version, preview=preview\n )\n print(\"The delete response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Release.delete: %s\\n\" % e)" + } + ], + "v2.getRelease": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# WidgetSetRid | A Resource Identifier (RID) identifying a widget set.\nwidget_set_rid = \"ri.widgetregistry..widget-set.21dt2c42-b7df-4b23-880b-1436a3dred2e\"\n# ReleaseVersion | The semantic version of the widget set.\nrelease_version = \"1.2.0\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.widgets.WidgetSet.Release.get(\n widget_set_rid, release_version, preview=preview\n )\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Release.get: %s\\n\" % e)" + } + ], + "v2.listReleases": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# WidgetSetRid | A Resource Identifier (RID) identifying a widget set.\nwidget_set_rid = \"ri.widgetregistry..widget-set.21dt2c42-b7df-4b23-880b-1436a3dred2e\"\n# Optional[PageSize] | The page size to use for the endpoint.\npage_size = None\n# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request.\npage_token = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n for release in client.widgets.WidgetSet.Release.list(\n widget_set_rid, page_size=page_size, page_token=page_token, preview=preview\n ):\n pprint(release)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Release.list: %s\\n\" % e)" + } + ], + "v2.getRepository": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# RepositoryRid | A Resource Identifier (RID) identifying a repository.\nrepository_rid = \"ri.stemma.main.repository.e1r31370-3cf3-4ac4-9269-h1432d7fb0b4\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.widgets.Repository.get(repository_rid, preview=preview)\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Repository.get: %s\\n\" % e)" + } + ], + "v2.publishRelease": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# RepositoryRid | A Resource Identifier (RID) identifying a repository.\nrepository_rid = \"ri.stemma.main.repository.e1r31370-3cf3-4ac4-9269-h1432d7fb0b4\"\n# bytes | The zip file that contains the contents of your widget set. It must include a valid manifest file at the path `.palantir/widgets.config.json`.\nbody = None\n# RepositoryVersion\nrepository_version = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.widgets.Repository.publish(\n repository_rid, body, repository_version=repository_version, preview=preview\n )\n print(\"The publish response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Repository.publish: %s\\n\" % e)" + } + ], + "v2.getWidgetSet": [ + { + "template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# WidgetSetRid | A Resource Identifier (RID) identifying a widget set.\nwidget_set_rid = \"ri.widgetregistry..widget-set.21dt2c42-b7df-4b23-880b-1436a3dred2e\"\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.widgets.WidgetSet.get(widget_set_rid, preview=preview)\n print(\"The get response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling WidgetSet.get: %s\\n\" % e)" + } + ] + } + } + } +}; diff --git a/docs-snippets-npm/tsconfig.json b/docs-snippets-npm/tsconfig.json new file mode 100644 index 000000000..17361924c --- /dev/null +++ b/docs-snippets-npm/tsconfig.json @@ -0,0 +1,16 @@ +{ + "$schema": "https://json.schemastore.org/tsconfig", + "compilerOptions": { + "target": "ES2022", + "module": "NodeNext", + "moduleResolution": "nodenext", + "declaration": true, + "isolatedModules": true, + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "strict": true, + "skipLibCheck": true, + "resolveJsonModule": true, + "outDir": "dist", + } +} diff --git a/docs/v1/Core/models/AnyType.md b/docs/v1/Core/models/AnyType.md new file mode 100644 index 000000000..c21dbd0ac --- /dev/null +++ b/docs/v1/Core/models/AnyType.md @@ -0,0 +1,11 @@ +# AnyType + +AnyType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["any"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Core/models/AttachmentType.md b/docs/v1/Core/models/AttachmentType.md new file mode 100644 index 000000000..e477e43da --- /dev/null +++ b/docs/v1/Core/models/AttachmentType.md @@ -0,0 +1,11 @@ +# AttachmentType + +AttachmentType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["attachment"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Core/models/Attribution.md b/docs/v1/Core/models/Attribution.md new file mode 100644 index 000000000..315597a06 --- /dev/null +++ b/docs/v1/Core/models/Attribution.md @@ -0,0 +1,11 @@ +# Attribution + +Attribution for a request + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Core/models/BinaryType.md b/docs/v1/Core/models/BinaryType.md new file mode 100644 index 000000000..3f2eeb8e5 --- /dev/null +++ b/docs/v1/Core/models/BinaryType.md @@ -0,0 +1,11 @@ +# BinaryType + +BinaryType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["binary"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Core/models/BooleanType.md b/docs/v1/Core/models/BooleanType.md new file mode 100644 index 000000000..9f7b2a5ce --- /dev/null +++ b/docs/v1/Core/models/BooleanType.md @@ -0,0 +1,11 @@ +# BooleanType + +BooleanType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["boolean"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Core/models/ByteType.md b/docs/v1/Core/models/ByteType.md new file mode 100644 index 000000000..73fd151b5 --- /dev/null +++ b/docs/v1/Core/models/ByteType.md @@ -0,0 +1,11 @@ +# ByteType + +ByteType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["byte"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Core/models/CipherTextType.md b/docs/v1/Core/models/CipherTextType.md new file mode 100644 index 000000000..68c347ebb --- /dev/null +++ b/docs/v1/Core/models/CipherTextType.md @@ -0,0 +1,12 @@ +# CipherTextType + +CipherTextType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**default_cipher_channel** | Optional[str] | No | An optional Cipher Channel RID which can be used for encryption updates to empty values. | +**type** | Literal["cipherText"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Core/models/ContentLength.md b/docs/v1/Core/models/ContentLength.md new file mode 100644 index 000000000..ed0978250 --- /dev/null +++ b/docs/v1/Core/models/ContentLength.md @@ -0,0 +1,11 @@ +# ContentLength + +ContentLength + +## Type +```python +Long +``` + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Core/models/ContentType.md b/docs/v1/Core/models/ContentType.md new file mode 100644 index 000000000..5581ea1dc --- /dev/null +++ b/docs/v1/Core/models/ContentType.md @@ -0,0 +1,11 @@ +# ContentType + +ContentType + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Core/models/DateType.md b/docs/v1/Core/models/DateType.md new file mode 100644 index 000000000..8af99d8ec --- /dev/null +++ b/docs/v1/Core/models/DateType.md @@ -0,0 +1,11 @@ +# DateType + +DateType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["date"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Core/models/DecimalType.md b/docs/v1/Core/models/DecimalType.md new file mode 100644 index 000000000..56509a75f --- /dev/null +++ b/docs/v1/Core/models/DecimalType.md @@ -0,0 +1,13 @@ +# DecimalType + +DecimalType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**precision** | Optional[int] | No | The total number of digits of the Decimal type. The maximum value is 38. | +**scale** | Optional[int] | No | The number of digits to the right of the decimal point. The maximum value is 38. | +**type** | Literal["decimal"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Core/models/DisplayName.md b/docs/v1/Core/models/DisplayName.md new file mode 100644 index 000000000..c9557a979 --- /dev/null +++ b/docs/v1/Core/models/DisplayName.md @@ -0,0 +1,11 @@ +# DisplayName + +The display name of the entity. + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Core/models/DistanceUnit.md b/docs/v1/Core/models/DistanceUnit.md new file mode 100644 index 000000000..814647c07 --- /dev/null +++ b/docs/v1/Core/models/DistanceUnit.md @@ -0,0 +1,18 @@ +# DistanceUnit + +DistanceUnit + +| **Value** | +| --------- | +| `"MILLIMETERS"` | +| `"CENTIMETERS"` | +| `"METERS"` | +| `"KILOMETERS"` | +| `"INCHES"` | +| `"FEET"` | +| `"YARDS"` | +| `"MILES"` | +| `"NAUTICAL_MILES"` | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Core/models/DoubleType.md b/docs/v1/Core/models/DoubleType.md new file mode 100644 index 000000000..4988a3bfc --- /dev/null +++ b/docs/v1/Core/models/DoubleType.md @@ -0,0 +1,11 @@ +# DoubleType + +DoubleType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["double"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Core/models/FilePath.md b/docs/v1/Core/models/FilePath.md new file mode 100644 index 000000000..141c8ea8a --- /dev/null +++ b/docs/v1/Core/models/FilePath.md @@ -0,0 +1,12 @@ +# FilePath + +The path to a File within Foundry. Examples: `my-file.txt`, `path/to/my-file.jpg`, `dataframe.snappy.parquet`. + + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Core/models/Filename.md b/docs/v1/Core/models/Filename.md new file mode 100644 index 000000000..bee714945 --- /dev/null +++ b/docs/v1/Core/models/Filename.md @@ -0,0 +1,12 @@ +# Filename + +The name of a File within Foundry. Examples: `my-file.txt`, `my-file.jpg`, `dataframe.snappy.parquet`. + + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Core/models/FloatType.md b/docs/v1/Core/models/FloatType.md new file mode 100644 index 000000000..c17f112fc --- /dev/null +++ b/docs/v1/Core/models/FloatType.md @@ -0,0 +1,11 @@ +# FloatType + +FloatType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["float"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Core/models/FolderRid.md b/docs/v1/Core/models/FolderRid.md new file mode 100644 index 000000000..2246753a9 --- /dev/null +++ b/docs/v1/Core/models/FolderRid.md @@ -0,0 +1,11 @@ +# FolderRid + +FolderRid + +## Type +```python +RID +``` + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Core/models/FoundryBranch.md b/docs/v1/Core/models/FoundryBranch.md new file mode 100644 index 000000000..b94b25cd2 --- /dev/null +++ b/docs/v1/Core/models/FoundryBranch.md @@ -0,0 +1,11 @@ +# FoundryBranch + +The Foundry branch identifier, specifically its rid. Different identifier types may be used in the future as values. + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Core/models/IntegerType.md b/docs/v1/Core/models/IntegerType.md new file mode 100644 index 000000000..4da6e7810 --- /dev/null +++ b/docs/v1/Core/models/IntegerType.md @@ -0,0 +1,11 @@ +# IntegerType + +IntegerType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["integer"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Core/models/LongType.md b/docs/v1/Core/models/LongType.md new file mode 100644 index 000000000..073c3c0c1 --- /dev/null +++ b/docs/v1/Core/models/LongType.md @@ -0,0 +1,11 @@ +# LongType + +LongType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["long"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Core/models/MarkingType.md b/docs/v1/Core/models/MarkingType.md new file mode 100644 index 000000000..8d803aec4 --- /dev/null +++ b/docs/v1/Core/models/MarkingType.md @@ -0,0 +1,11 @@ +# MarkingType + +MarkingType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["marking"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Core/models/MediaType.md b/docs/v1/Core/models/MediaType.md new file mode 100644 index 000000000..f84bf2422 --- /dev/null +++ b/docs/v1/Core/models/MediaType.md @@ -0,0 +1,13 @@ +# MediaType + +The [media type](https://www.iana.org/assignments/media-types/media-types.xhtml) of the file or attachment. +Examples: `application/json`, `application/pdf`, `application/octet-stream`, `image/jpeg` + + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Core/models/NullType.md b/docs/v1/Core/models/NullType.md new file mode 100644 index 000000000..fc2eba1f5 --- /dev/null +++ b/docs/v1/Core/models/NullType.md @@ -0,0 +1,11 @@ +# NullType + +NullType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["null"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Core/models/OperationScope.md b/docs/v1/Core/models/OperationScope.md new file mode 100644 index 000000000..bc6fddc32 --- /dev/null +++ b/docs/v1/Core/models/OperationScope.md @@ -0,0 +1,11 @@ +# OperationScope + +OperationScope + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Core/models/PageSize.md b/docs/v1/Core/models/PageSize.md new file mode 100644 index 000000000..f443d776f --- /dev/null +++ b/docs/v1/Core/models/PageSize.md @@ -0,0 +1,11 @@ +# PageSize + +The page size to use for the endpoint. + +## Type +```python +int +``` + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Core/models/PageToken.md b/docs/v1/Core/models/PageToken.md new file mode 100644 index 000000000..9e1f10590 --- /dev/null +++ b/docs/v1/Core/models/PageToken.md @@ -0,0 +1,14 @@ +# PageToken + +The page token indicates where to start paging. This should be omitted from the first page's request. +To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response +and use it to populate the `pageToken` field of the next request. + + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Core/models/PreviewMode.md b/docs/v1/Core/models/PreviewMode.md new file mode 100644 index 000000000..9b3dcfca3 --- /dev/null +++ b/docs/v1/Core/models/PreviewMode.md @@ -0,0 +1,11 @@ +# PreviewMode + +Enables the use of preview functionality. + +## Type +```python +bool +``` + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Core/models/ReleaseStatus.md b/docs/v1/Core/models/ReleaseStatus.md new file mode 100644 index 000000000..969fe8d5f --- /dev/null +++ b/docs/v1/Core/models/ReleaseStatus.md @@ -0,0 +1,13 @@ +# ReleaseStatus + +The release status of the entity. + +| **Value** | +| --------- | +| `"ACTIVE"` | +| `"ENDORSED"` | +| `"EXPERIMENTAL"` | +| `"DEPRECATED"` | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Core/models/ShortType.md b/docs/v1/Core/models/ShortType.md new file mode 100644 index 000000000..5279f3e3c --- /dev/null +++ b/docs/v1/Core/models/ShortType.md @@ -0,0 +1,11 @@ +# ShortType + +ShortType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["short"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Core/models/SizeBytes.md b/docs/v1/Core/models/SizeBytes.md new file mode 100644 index 000000000..c6f4bd564 --- /dev/null +++ b/docs/v1/Core/models/SizeBytes.md @@ -0,0 +1,11 @@ +# SizeBytes + +The size of the file or attachment in bytes. + +## Type +```python +Long +``` + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Core/models/StringType.md b/docs/v1/Core/models/StringType.md new file mode 100644 index 000000000..8ace3c89c --- /dev/null +++ b/docs/v1/Core/models/StringType.md @@ -0,0 +1,11 @@ +# StringType + +StringType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["string"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Core/models/StructFieldName.md b/docs/v1/Core/models/StructFieldName.md new file mode 100644 index 000000000..7d3ea5b62 --- /dev/null +++ b/docs/v1/Core/models/StructFieldName.md @@ -0,0 +1,12 @@ +# StructFieldName + +The name of a field in a `Struct`. + + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Core/models/TimestampType.md b/docs/v1/Core/models/TimestampType.md new file mode 100644 index 000000000..df7a5d846 --- /dev/null +++ b/docs/v1/Core/models/TimestampType.md @@ -0,0 +1,11 @@ +# TimestampType + +TimestampType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["timestamp"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Core/models/TotalCount.md b/docs/v1/Core/models/TotalCount.md new file mode 100644 index 000000000..f0ce4a9e5 --- /dev/null +++ b/docs/v1/Core/models/TotalCount.md @@ -0,0 +1,12 @@ +# TotalCount + +The total number of items across all pages. + + +## Type +```python +Long +``` + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Core/models/TraceParent.md b/docs/v1/Core/models/TraceParent.md new file mode 100644 index 000000000..d9ee40cc5 --- /dev/null +++ b/docs/v1/Core/models/TraceParent.md @@ -0,0 +1,11 @@ +# TraceParent + +The W3C Trace Context `traceparent` header value used to propagate distributed tracing information for Foundry telemetry. See https://www.w3.org/TR/trace-context/#traceparent-header for more details. Note the 16 byte trace ID encoded in the header must be derived from a time based uuid to be used within Foundry. + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Core/models/TraceState.md b/docs/v1/Core/models/TraceState.md new file mode 100644 index 000000000..a0f8f31f7 --- /dev/null +++ b/docs/v1/Core/models/TraceState.md @@ -0,0 +1,11 @@ +# TraceState + +The W3C Trace Context `tracestate` header value, which is used to propagate vendor specific distributed tracing information for Foundry telemetry. See https://www.w3.org/TR/trace-context/#tracestate-header for more details. + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Core/models/UnsupportedType.md b/docs/v1/Core/models/UnsupportedType.md new file mode 100644 index 000000000..4bcb6a9c9 --- /dev/null +++ b/docs/v1/Core/models/UnsupportedType.md @@ -0,0 +1,12 @@ +# UnsupportedType + +UnsupportedType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**unsupported_type** | str | Yes | | +**type** | Literal["unsupported"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Datasets/Branch.md b/docs/v1/Datasets/Branch.md new file mode 100644 index 000000000..6d2ef42ea --- /dev/null +++ b/docs/v1/Datasets/Branch.md @@ -0,0 +1,222 @@ +# Branch + +Method | HTTP request | Release Stage | +------------- | ------------- | ----- | +[**create**](#create) | **POST** /v1/datasets/{datasetRid}/branches | Stable | +[**delete**](#delete) | **DELETE** /v1/datasets/{datasetRid}/branches/{branchId} | Stable | +[**get**](#get) | **GET** /v1/datasets/{datasetRid}/branches/{branchId} | Stable | +[**list**](#list) | **GET** /v1/datasets/{datasetRid}/branches | Stable | + +# **create** +Creates a branch on an existing dataset. A branch may optionally point to a (committed) transaction. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**dataset_rid** | DatasetRid | The Resource Identifier (RID) of the Dataset on which to create the Branch. | | +**branch_id** | BranchId | | | +**transaction_rid** | Optional[TransactionRid] | | [optional] | + +### Return type +**Branch** + +### Example + +```python +from foundry_sdk.v1 import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# DatasetRid | The Resource Identifier (RID) of the Dataset on which to create the Branch. +dataset_rid = "ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da" +# BranchId +branch_id = "my-branch" +# Optional[TransactionRid] +transaction_rid = None + + +try: + api_response = client.datasets.Dataset.Branch.create( + dataset_rid, branch_id=branch_id, transaction_rid=transaction_rid + ) + print("The create response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Branch.create: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | Branch | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v1-link) [[Back to Model list]](../../../README.md#models-v1-link) [[Back to README]](../../../README.md) + +# **delete** +Deletes the Branch with the given BranchId. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**dataset_rid** | DatasetRid | The Resource Identifier (RID) of the Dataset that contains the Branch. | | +**branch_id** | BranchId | The identifier (name) of the Branch. | | + +### Return type +**None** + +### Example + +```python +from foundry_sdk.v1 import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# DatasetRid | The Resource Identifier (RID) of the Dataset that contains the Branch. +dataset_rid = "ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da" +# BranchId | The identifier (name) of the Branch. +branch_id = "my-branch" + + +try: + api_response = client.datasets.Dataset.Branch.delete(dataset_rid, branch_id) + print("The delete response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Branch.delete: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**204** | None | Branch deleted. | None | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v1-link) [[Back to Model list]](../../../README.md#models-v1-link) [[Back to README]](../../../README.md) + +# **get** +Get a Branch of a Dataset. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**dataset_rid** | DatasetRid | The Resource Identifier (RID) of the Dataset that contains the Branch. | | +**branch_id** | BranchId | The identifier (name) of the Branch. | | + +### Return type +**Branch** + +### Example + +```python +from foundry_sdk.v1 import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# DatasetRid | The Resource Identifier (RID) of the Dataset that contains the Branch. +dataset_rid = "ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da" +# BranchId | The identifier (name) of the Branch. +branch_id = "master" + + +try: + api_response = client.datasets.Dataset.Branch.get(dataset_rid, branch_id) + print("The get response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Branch.get: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | Branch | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v1-link) [[Back to Model list]](../../../README.md#models-v1-link) [[Back to README]](../../../README.md) + +# **list** +Lists the Branches of a Dataset. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**dataset_rid** | DatasetRid | The Resource Identifier (RID) of the Dataset on which to list Branches. | | +**page_size** | Optional[PageSize] | The desired size of the page to be returned. Defaults to 1,000. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. | [optional] | +**page_token** | Optional[PageToken] | | [optional] | + +### Return type +**ListBranchesResponse** + +### Example + +```python +from foundry_sdk.v1 import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# DatasetRid | The Resource Identifier (RID) of the Dataset on which to list Branches. +dataset_rid = "ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da" +# Optional[PageSize] | The desired size of the page to be returned. Defaults to 1,000. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. +page_size = None +# Optional[PageToken] +page_token = None + + +try: + for branch in client.datasets.Dataset.Branch.list( + dataset_rid, page_size=page_size, page_token=page_token + ): + pprint(branch) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Branch.list: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | ListBranchesResponse | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v1-link) [[Back to Model list]](../../../README.md#models-v1-link) [[Back to README]](../../../README.md) + diff --git a/docs/v1/Datasets/Dataset.md b/docs/v1/Datasets/Dataset.md new file mode 100644 index 000000000..bac40a9f8 --- /dev/null +++ b/docs/v1/Datasets/Dataset.md @@ -0,0 +1,420 @@ +# Dataset + +Method | HTTP request | Release Stage | +------------- | ------------- | ----- | +[**create**](#create) | **POST** /v1/datasets | Stable | +[**delete_schema**](#delete_schema) | **DELETE** /v1/datasets/{datasetRid}/schema | Private Beta | +[**get**](#get) | **GET** /v1/datasets/{datasetRid} | Stable | +[**get_schema**](#get_schema) | **GET** /v1/datasets/{datasetRid}/schema | Private Beta | +[**read**](#read) | **GET** /v1/datasets/{datasetRid}/readTable | Stable | +[**replace_schema**](#replace_schema) | **PUT** /v1/datasets/{datasetRid}/schema | Private Beta | + +# **create** +Creates a new Dataset. A default branch - `master` for most enrollments - will be created on the Dataset. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**name** | DatasetName | | | +**parent_folder_rid** | FolderRid | | | + +### Return type +**Dataset** + +### Example + +```python +from foundry_sdk.v1 import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# DatasetName +name = "My Dataset" +# FolderRid +parent_folder_rid = "ri.foundry.main.folder.bfe58487-4c56-4c58-aba7-25defd6163c4" + + +try: + api_response = client.datasets.Dataset.create(name=name, parent_folder_rid=parent_folder_rid) + print("The create response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Dataset.create: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | Dataset | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v1-link) [[Back to Model list]](../../../README.md#models-v1-link) [[Back to README]](../../../README.md) + +# **delete_schema** +Deletes the Schema from a Dataset and Branch. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**dataset_rid** | DatasetRid | The RID of the Dataset on which to delete the schema. | | +**branch_id** | Optional[BranchId] | The ID of the Branch on which to delete the schema. | [optional] | +**preview** | Optional[PreviewMode] | | [optional] | +**transaction_rid** | Optional[TransactionRid] | The RID of the Transaction on which to delete the schema. | [optional] | + +### Return type +**None** + +### Example + +```python +from foundry_sdk.v1 import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# DatasetRid | The RID of the Dataset on which to delete the schema. +dataset_rid = None +# Optional[BranchId] | The ID of the Branch on which to delete the schema. +branch_id = None +# Optional[PreviewMode] +preview = True +# Optional[TransactionRid] | The RID of the Transaction on which to delete the schema. +transaction_rid = None + + +try: + api_response = client.datasets.Dataset.delete_schema( + dataset_rid, branch_id=branch_id, preview=preview, transaction_rid=transaction_rid + ) + print("The delete_schema response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Dataset.delete_schema: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**204** | None | Schema deleted. | None | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v1-link) [[Back to Model list]](../../../README.md#models-v1-link) [[Back to README]](../../../README.md) + +# **get** +Gets the Dataset with the given DatasetRid. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**dataset_rid** | DatasetRid | | | + +### Return type +**Dataset** + +### Example + +```python +from foundry_sdk.v1 import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# DatasetRid +dataset_rid = "ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da" + + +try: + api_response = client.datasets.Dataset.get(dataset_rid) + print("The get response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Dataset.get: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | Dataset | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v1-link) [[Back to Model list]](../../../README.md#models-v1-link) [[Back to README]](../../../README.md) + +# **get_schema** +Retrieves the Schema for a Dataset and Branch, if it exists. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**dataset_rid** | DatasetRid | The RID of the Dataset. | | +**branch_id** | Optional[BranchId] | The ID of the Branch. | [optional] | +**preview** | Optional[PreviewMode] | | [optional] | +**transaction_rid** | Optional[TransactionRid] | The TransactionRid that contains the Schema. | [optional] | + +### Return type +**Optional[Any]** + +### Example + +```python +from foundry_sdk.v1 import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# DatasetRid | The RID of the Dataset. +dataset_rid = None +# Optional[BranchId] | The ID of the Branch. +branch_id = None +# Optional[PreviewMode] +preview = True +# Optional[TransactionRid] | The TransactionRid that contains the Schema. +transaction_rid = None + + +try: + api_response = client.datasets.Dataset.get_schema( + dataset_rid, branch_id=branch_id, preview=preview, transaction_rid=transaction_rid + ) + print("The get_schema response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Dataset.get_schema: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | Optional[Any] | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v1-link) [[Back to Model list]](../../../README.md#models-v1-link) [[Back to README]](../../../README.md) + +# **read** +Gets the content of a dataset as a table in the specified format. + +This endpoint currently does not support views (virtual datasets composed of other datasets). For more information, refer to the [views documentation](https://palantir.com/docs/foundry/data-integration/views). + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**dataset_rid** | DatasetRid | The RID of the Dataset. | | +**format** | TableExportFormat | The export format. Must be `ARROW` or `CSV`. | | +**branch_id** | Optional[BranchId] | The identifier (name) of the Branch. | [optional] | +**columns** | Optional[List[str]] | A subset of the dataset columns to include in the result. Defaults to all columns. | [optional] | +**end_transaction_rid** | Optional[TransactionRid] | The Resource Identifier (RID) of the end Transaction. | [optional] | +**row_limit** | Optional[int] | A limit on the number of rows to return. Note that row ordering is non-deterministic. | [optional] | +**start_transaction_rid** | Optional[TransactionRid] | The Resource Identifier (RID) of the start Transaction. | [optional] | + +### Return type +**bytes** + +### Example + +```python +from foundry_sdk.v1 import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# DatasetRid | The RID of the Dataset. +dataset_rid = None +# TableExportFormat | The export format. Must be `ARROW` or `CSV`. +format = "CSV" +# Optional[BranchId] | The identifier (name) of the Branch. +branch_id = None +# Optional[List[str]] | A subset of the dataset columns to include in the result. Defaults to all columns. +columns = None +# Optional[TransactionRid] | The Resource Identifier (RID) of the end Transaction. +end_transaction_rid = None +# Optional[int] | A limit on the number of rows to return. Note that row ordering is non-deterministic. +row_limit = None +# Optional[TransactionRid] | The Resource Identifier (RID) of the start Transaction. +start_transaction_rid = None + + +try: + api_response = client.datasets.Dataset.read( + dataset_rid, + format=format, + branch_id=branch_id, + columns=columns, + end_transaction_rid=end_transaction_rid, + row_limit=row_limit, + start_transaction_rid=start_transaction_rid, + ) + print("The read response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Dataset.read: %s\n" % e) + +``` + +### Read a Foundry Dataset as a CSV + +```python +import foundry +from foundry.models import TableExportFormat +from foundry import PalantirRPCException + +foundry_client = foundry.FoundryV1Client(auth=foundry.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +try: + api_response = foundry_client.datasets.Dataset.read( + dataset_rid="...", format="CSV", columns=[...] + ) + + with open("my_table.csv", "wb") as f: + f.write(api_response) +except PalantirRPCException as e: + print("PalantirRPCException when calling DatasetsApiServiceApi -> read: %s\n" % e) +``` + +### Read a Foundry Dataset into a Pandas DataFrame + +> [!IMPORTANT] +> For this example to work, you will need to have `pyarrow` installed in your Python environment. + +```python +import foundry +from foundry.models import TableExportFormat +from foundry import PalantirRPCException +import pyarrow as pa + +foundry_client = foundry.FoundryV1Client(auth=foundry.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +try: + api_response = foundry_client.datasets.Dataset.read(dataset_rid="...", format="ARROW", columns=[...]) + df = pa.ipc.open_stream(api_response).read_all().to_pandas() + print(df) +except Exception as e: + print("Exception when calling DatasetsApiServiceApi -> read: %s\n" % e) +``` + +``` + id word length double boolean +0 0 A 1.0 11.878200 1 +1 1 a 1.0 11.578800 0 +2 2 aa 2.0 15.738500 1 +3 3 aal 3.0 6.643900 0 +4 4 aalii 5.0 2.017730 1 +... ... ... ... ... ... +235881 235881 zythem 6.0 19.427400 1 +235882 235882 Zythia 6.0 14.397100 1 +235883 235883 zythum 6.0 3.385820 0 +235884 235884 Zyzomys 7.0 6.208830 1 +235885 235885 Zyzzogeton 10.0 0.947821 0 + +[235886 rows x 5 columns] +``` + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | bytes | The content stream. | */* | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v1-link) [[Back to Model list]](../../../README.md#models-v1-link) [[Back to README]](../../../README.md) + +# **replace_schema** +Puts a Schema on an existing Dataset and Branch. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**dataset_rid** | DatasetRid | The RID of the Dataset on which to put the Schema. | | +**body** | Any | Body of the request | | +**branch_id** | Optional[BranchId] | The ID of the Branch on which to put the Schema. | [optional] | +**preview** | Optional[PreviewMode] | | [optional] | + +### Return type +**None** + +### Example + +```python +from foundry_sdk.v1 import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# DatasetRid | The RID of the Dataset on which to put the Schema. +dataset_rid = None +# Any | Body of the request +body = None +# Optional[BranchId] | The ID of the Branch on which to put the Schema. +branch_id = None +# Optional[PreviewMode] +preview = True + + +try: + api_response = client.datasets.Dataset.replace_schema( + dataset_rid, body, branch_id=branch_id, preview=preview + ) + print("The replace_schema response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Dataset.replace_schema: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**204** | None | | None | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v1-link) [[Back to Model list]](../../../README.md#models-v1-link) [[Back to README]](../../../README.md) + diff --git a/docs/v1/Datasets/File.md b/docs/v1/Datasets/File.md new file mode 100644 index 000000000..d8a2971af --- /dev/null +++ b/docs/v1/Datasets/File.md @@ -0,0 +1,460 @@ +# File + +Method | HTTP request | Release Stage | +------------- | ------------- | ----- | +[**delete**](#delete) | **DELETE** /v1/datasets/{datasetRid}/files/{filePath} | Stable | +[**get**](#get) | **GET** /v1/datasets/{datasetRid}/files/{filePath} | Stable | +[**list**](#list) | **GET** /v1/datasets/{datasetRid}/files | Stable | +[**read**](#read) | **GET** /v1/datasets/{datasetRid}/files/{filePath}/content | Stable | +[**upload**](#upload) | **POST** /v1/datasets/{datasetRid}/files:upload | Stable | + +# **delete** +Deletes a File from a Dataset. By default the file is deleted in a new transaction on the default +branch - `master` for most enrollments. The file will still be visible on historical views. + +#### Advanced Usage + +See [Datasets Core Concepts](https://palantir.com/docs/foundry/data-integration/datasets/) for details on using branches and transactions. + +To **delete a File from a specific Branch** specify the Branch's identifier as `branchId`. A new delete Transaction +will be created and committed on this branch. + +To **delete a File using a manually opened Transaction**, specify the Transaction's resource identifier +as `transactionRid`. The transaction must be of type `DELETE`. This is useful for deleting multiple files in a +single transaction. See [createTransaction](https://palantir.com/docs/foundry/api/datasets-resources/transactions/create-transaction/) to +open a transaction. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**dataset_rid** | DatasetRid | The Resource Identifier (RID) of the Dataset on which to delete the File. | | +**file_path** | FilePath | The File path within the Dataset. | | +**branch_id** | Optional[BranchId] | The identifier (name) of the Branch on which to delete the File. Defaults to `master` for most enrollments. | [optional] | +**transaction_rid** | Optional[TransactionRid] | The Resource Identifier (RID) of the open delete Transaction on which to delete the File. | [optional] | + +### Return type +**None** + +### Example + +```python +from foundry_sdk.v1 import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# DatasetRid | The Resource Identifier (RID) of the Dataset on which to delete the File. +dataset_rid = "ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da" +# FilePath | The File path within the Dataset. +file_path = "q3-data%2fmy-file.csv" +# Optional[BranchId] | The identifier (name) of the Branch on which to delete the File. Defaults to `master` for most enrollments. +branch_id = None +# Optional[TransactionRid] | The Resource Identifier (RID) of the open delete Transaction on which to delete the File. +transaction_rid = None + + +try: + api_response = client.datasets.Dataset.File.delete( + dataset_rid, file_path, branch_id=branch_id, transaction_rid=transaction_rid + ) + print("The delete response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling File.delete: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**204** | None | File deleted. | None | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v1-link) [[Back to Model list]](../../../README.md#models-v1-link) [[Back to README]](../../../README.md) + +# **get** +Gets metadata about a File contained in a Dataset. By default this retrieves the file's metadata from the latest +view of the default branch - `master` for most enrollments. + +#### Advanced Usage + +See [Datasets Core Concepts](https://palantir.com/docs/foundry/data-integration/datasets/) for details on using branches and transactions. + +To **get a file's metadata from a specific Branch** specify the Branch's identifier as `branchId`. This will +retrieve metadata for the most recent version of the file since the latest snapshot transaction, or the earliest +ancestor transaction of the branch if there are no snapshot transactions. + +To **get a file's metadata from the resolved view of a transaction** specify the Transaction's resource identifier +as `endTransactionRid`. This will retrieve metadata for the most recent version of the file since the latest snapshot +transaction, or the earliest ancestor transaction if there are no snapshot transactions. + +To **get a file's metadata from the resolved view of a range of transactions** specify the the start transaction's +resource identifier as `startTransactionRid` and the end transaction's resource identifier as `endTransactionRid`. +This will retrieve metadata for the most recent version of the file since the `startTransactionRid` up to the +`endTransactionRid`. Behavior is undefined when the start and end transactions do not belong to the same root-to-leaf path. + +To **get a file's metadata from a specific transaction** specify the Transaction's resource identifier as both the +`startTransactionRid` and `endTransactionRid`. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**dataset_rid** | DatasetRid | The Resource Identifier (RID) of the Dataset that contains the File. | | +**file_path** | FilePath | The File's path within the Dataset. | | +**branch_id** | Optional[BranchId] | The identifier (name) of the Branch that contains the File. Defaults to `master` for most enrollments. | [optional] | +**end_transaction_rid** | Optional[TransactionRid] | The Resource Identifier (RID) of the end Transaction. | [optional] | +**start_transaction_rid** | Optional[TransactionRid] | The Resource Identifier (RID) of the start Transaction. | [optional] | + +### Return type +**File** + +### Example + +```python +from foundry_sdk.v1 import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# DatasetRid | The Resource Identifier (RID) of the Dataset that contains the File. +dataset_rid = "ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da" +# FilePath | The File's path within the Dataset. +file_path = "q3-data%2fmy-file.csv" +# Optional[BranchId] | The identifier (name) of the Branch that contains the File. Defaults to `master` for most enrollments. +branch_id = None +# Optional[TransactionRid] | The Resource Identifier (RID) of the end Transaction. +end_transaction_rid = None +# Optional[TransactionRid] | The Resource Identifier (RID) of the start Transaction. +start_transaction_rid = None + + +try: + api_response = client.datasets.Dataset.File.get( + dataset_rid, + file_path, + branch_id=branch_id, + end_transaction_rid=end_transaction_rid, + start_transaction_rid=start_transaction_rid, + ) + print("The get response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling File.get: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | File | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v1-link) [[Back to Model list]](../../../README.md#models-v1-link) [[Back to README]](../../../README.md) + +# **list** +Lists Files contained in a Dataset. By default files are listed on the latest view of the default +branch - `master` for most enrollments. + +This endpoint currently does not support views (virtual datasets composed of other datasets). For more information, refer to the [views documentation](https://palantir.com/docs/foundry/data-integration/views). + +#### Advanced Usage + +See [Datasets Core Concepts](https://palantir.com/docs/foundry/data-integration/datasets/) for details on using branches and transactions. + +To **list files on a specific Branch** specify the Branch's identifier as `branchId`. This will include the most +recent version of all files since the latest snapshot transaction, or the earliest ancestor transaction of the +branch if there are no snapshot transactions. + +To **list files on the resolved view of a transaction** specify the Transaction's resource identifier +as `endTransactionRid`. This will include the most recent version of all files since the latest snapshot +transaction, or the earliest ancestor transaction if there are no snapshot transactions. + +To **list files on the resolved view of a range of transactions** specify the the start transaction's resource +identifier as `startTransactionRid` and the end transaction's resource identifier as `endTransactionRid`. This +will include the most recent version of all files since the `startTransactionRid` up to the `endTransactionRid`. +Note that an intermediate snapshot transaction will remove all files from the view. Behavior is undefined when +the start and end transactions do not belong to the same root-to-leaf path. + +To **list files on a specific transaction** specify the Transaction's resource identifier as both the +`startTransactionRid` and `endTransactionRid`. This will include only files that were modified as part of that +Transaction. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**dataset_rid** | DatasetRid | The Resource Identifier (RID) of the Dataset on which to list Files. | | +**branch_id** | Optional[BranchId] | The identifier (name) of the Branch on which to list Files. Defaults to `master` for most enrollments. | [optional] | +**end_transaction_rid** | Optional[TransactionRid] | The Resource Identifier (RID) of the end Transaction. | [optional] | +**page_size** | Optional[PageSize] | The desired size of the page to be returned. Defaults to 1,000. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. | [optional] | +**page_token** | Optional[PageToken] | | [optional] | +**start_transaction_rid** | Optional[TransactionRid] | The Resource Identifier (RID) of the start Transaction. | [optional] | + +### Return type +**ListFilesResponse** + +### Example + +```python +from foundry_sdk.v1 import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# DatasetRid | The Resource Identifier (RID) of the Dataset on which to list Files. +dataset_rid = None +# Optional[BranchId] | The identifier (name) of the Branch on which to list Files. Defaults to `master` for most enrollments. +branch_id = None +# Optional[TransactionRid] | The Resource Identifier (RID) of the end Transaction. +end_transaction_rid = None +# Optional[PageSize] | The desired size of the page to be returned. Defaults to 1,000. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. +page_size = None +# Optional[PageToken] +page_token = None +# Optional[TransactionRid] | The Resource Identifier (RID) of the start Transaction. +start_transaction_rid = None + + +try: + for file in client.datasets.Dataset.File.list( + dataset_rid, + branch_id=branch_id, + end_transaction_rid=end_transaction_rid, + page_size=page_size, + page_token=page_token, + start_transaction_rid=start_transaction_rid, + ): + pprint(file) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling File.list: %s\n" % e) + +``` + +### Read the contents of a file from a dataset (by exploration / listing) + +```python +import foundry + +foundry_client = foundry.FoundryV1Client(auth=foundry.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +result = foundry_client.datasets.Dataset.File.list(dataset_rid="...") + +if result.data: + file_path = result.data[0].path + + print(foundry_client.datasets.Dataset.File.read( + dataset_rid="...", file_path=file_path + )) +``` + +``` +b'Hello!' +``` + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | ListFilesResponse | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v1-link) [[Back to Model list]](../../../README.md#models-v1-link) [[Back to README]](../../../README.md) + +# **read** +Gets the content of a File contained in a Dataset. By default this retrieves the file's content from the latest +view of the default branch - `master` for most enrollments. + +This endpoint currently does not support views (virtual datasets composed of other datasets). For more information, refer to the [views documentation](https://palantir.com/docs/foundry/data-integration/views). + +#### Advanced Usage + +See [Datasets Core Concepts](https://palantir.com/docs/foundry/data-integration/datasets/) for details on using branches and transactions. + +To **get a file's content from a specific Branch** specify the Branch's identifier as `branchId`. This will +retrieve the content for the most recent version of the file since the latest snapshot transaction, or the +earliest ancestor transaction of the branch if there are no snapshot transactions. + +To **get a file's content from the resolved view of a transaction** specify the Transaction's resource identifier +as `endTransactionRid`. This will retrieve the content for the most recent version of the file since the latest +snapshot transaction, or the earliest ancestor transaction if there are no snapshot transactions. + +To **get a file's content from the resolved view of a range of transactions** specify the the start transaction's +resource identifier as `startTransactionRid` and the end transaction's resource identifier as `endTransactionRid`. +This will retrieve the content for the most recent version of the file since the `startTransactionRid` up to the +`endTransactionRid`. Note that an intermediate snapshot transaction will remove all files from the view. Behavior +is undefined when the start and end transactions do not belong to the same root-to-leaf path. + +To **get a file's content from a specific transaction** specify the Transaction's resource identifier as both the +`startTransactionRid` and `endTransactionRid`. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**dataset_rid** | DatasetRid | The Resource Identifier (RID) of the Dataset that contains the File. | | +**file_path** | FilePath | The File's path within the Dataset. | | +**branch_id** | Optional[BranchId] | The identifier (name) of the Branch that contains the File. Defaults to `master` for most enrollments. | [optional] | +**end_transaction_rid** | Optional[TransactionRid] | The Resource Identifier (RID) of the end Transaction. | [optional] | +**start_transaction_rid** | Optional[TransactionRid] | The Resource Identifier (RID) of the start Transaction. | [optional] | + +### Return type +**bytes** + +### Example + +```python +from foundry_sdk.v1 import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# DatasetRid | The Resource Identifier (RID) of the Dataset that contains the File. +dataset_rid = None +# FilePath | The File's path within the Dataset. +file_path = "q3-data%2fmy-file.csv" +# Optional[BranchId] | The identifier (name) of the Branch that contains the File. Defaults to `master` for most enrollments. +branch_id = None +# Optional[TransactionRid] | The Resource Identifier (RID) of the end Transaction. +end_transaction_rid = None +# Optional[TransactionRid] | The Resource Identifier (RID) of the start Transaction. +start_transaction_rid = None + + +try: + api_response = client.datasets.Dataset.File.read( + dataset_rid, + file_path, + branch_id=branch_id, + end_transaction_rid=end_transaction_rid, + start_transaction_rid=start_transaction_rid, + ) + print("The read response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling File.read: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | bytes | | */* | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v1-link) [[Back to Model list]](../../../README.md#models-v1-link) [[Back to README]](../../../README.md) + +# **upload** +Uploads a File to an existing Dataset. +The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`. + +By default the file is uploaded to a new transaction on the default branch - `master` for most enrollments. +If the file already exists only the most recent version will be visible in the updated view. + +#### Advanced Usage + +See [Datasets Core Concepts](https://palantir.com/docs/foundry/data-integration/datasets/) for details on using branches and transactions. + +To **upload a file to a specific Branch** specify the Branch's identifier as `branchId`. A new transaction will +be created and committed on this branch. By default the TransactionType will be `UPDATE`, to override this +default specify `transactionType` in addition to `branchId`. +See [createBranch](https://palantir.com/docs/foundry/api/datasets-resources/branches/create-branch/) to create a custom branch. + +To **upload a file on a manually opened transaction** specify the Transaction's resource identifier as +`transactionRid`. This is useful for uploading multiple files in a single transaction. +See [createTransaction](https://palantir.com/docs/foundry/api/datasets-resources/transactions/create-transaction/) to open a transaction. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**dataset_rid** | DatasetRid | The Resource Identifier (RID) of the Dataset on which to upload the File. | | +**body** | bytes | Body of the request | | +**file_path** | FilePath | The File's path within the Dataset. | | +**branch_id** | Optional[BranchId] | The identifier (name) of the Branch on which to upload the File. Defaults to `master` for most enrollments. | [optional] | +**transaction_rid** | Optional[TransactionRid] | The Resource Identifier (RID) of the open Transaction on which to upload the File. | [optional] | +**transaction_type** | Optional[TransactionType] | The type of the Transaction to create when using branchId. Defaults to `UPDATE`. | [optional] | + +### Return type +**File** + +### Example + +```python +from foundry_sdk.v1 import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# DatasetRid | The Resource Identifier (RID) of the Dataset on which to upload the File. +dataset_rid = None +# bytes | Body of the request +body = None +# FilePath | The File's path within the Dataset. +file_path = "q3-data%2fmy-file.csv" +# Optional[BranchId] | The identifier (name) of the Branch on which to upload the File. Defaults to `master` for most enrollments. +branch_id = None +# Optional[TransactionRid] | The Resource Identifier (RID) of the open Transaction on which to upload the File. +transaction_rid = None +# Optional[TransactionType] | The type of the Transaction to create when using branchId. Defaults to `UPDATE`. +transaction_type = None + + +try: + api_response = client.datasets.Dataset.File.upload( + dataset_rid, + body, + file_path=file_path, + branch_id=branch_id, + transaction_rid=transaction_rid, + transaction_type=transaction_type, + ) + print("The upload response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling File.upload: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | File | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v1-link) [[Back to Model list]](../../../README.md#models-v1-link) [[Back to README]](../../../README.md) + diff --git a/docs/v1/Datasets/Transaction.md b/docs/v1/Datasets/Transaction.md new file mode 100644 index 000000000..9dc4863d8 --- /dev/null +++ b/docs/v1/Datasets/Transaction.md @@ -0,0 +1,242 @@ +# Transaction + +Method | HTTP request | Release Stage | +------------- | ------------- | ----- | +[**abort**](#abort) | **POST** /v1/datasets/{datasetRid}/transactions/{transactionRid}/abort | Stable | +[**commit**](#commit) | **POST** /v1/datasets/{datasetRid}/transactions/{transactionRid}/commit | Stable | +[**create**](#create) | **POST** /v1/datasets/{datasetRid}/transactions | Stable | +[**get**](#get) | **GET** /v1/datasets/{datasetRid}/transactions/{transactionRid} | Stable | + +# **abort** +Aborts an open Transaction. File modifications made on this Transaction are not preserved and the Branch is +not updated. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**dataset_rid** | DatasetRid | The Resource Identifier (RID) of the Dataset that contains the Transaction. | | +**transaction_rid** | TransactionRid | The Resource Identifier (RID) of the Transaction. | | + +### Return type +**Transaction** + +### Example + +```python +from foundry_sdk.v1 import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# DatasetRid | The Resource Identifier (RID) of the Dataset that contains the Transaction. +dataset_rid = "ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da" +# TransactionRid | The Resource Identifier (RID) of the Transaction. +transaction_rid = "ri.foundry.main.transaction.abffc380-ea68-4843-9be1-9f44d2565496" + + +try: + api_response = client.datasets.Dataset.Transaction.abort(dataset_rid, transaction_rid) + print("The abort response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Transaction.abort: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | Transaction | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v1-link) [[Back to Model list]](../../../README.md#models-v1-link) [[Back to README]](../../../README.md) + +# **commit** +Commits an open Transaction. File modifications made on this Transaction are preserved and the Branch is +updated to point to the Transaction. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**dataset_rid** | DatasetRid | The Resource Identifier (RID) of the Dataset that contains the Transaction. | | +**transaction_rid** | TransactionRid | The Resource Identifier (RID) of the Transaction. | | + +### Return type +**Transaction** + +### Example + +```python +from foundry_sdk.v1 import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# DatasetRid | The Resource Identifier (RID) of the Dataset that contains the Transaction. +dataset_rid = "ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da" +# TransactionRid | The Resource Identifier (RID) of the Transaction. +transaction_rid = "ri.foundry.main.transaction.abffc380-ea68-4843-9be1-9f44d2565496" + + +try: + api_response = client.datasets.Dataset.Transaction.commit(dataset_rid, transaction_rid) + print("The commit response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Transaction.commit: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | Transaction | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v1-link) [[Back to Model list]](../../../README.md#models-v1-link) [[Back to README]](../../../README.md) + +# **create** +Creates a Transaction on a Branch of a Dataset. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**dataset_rid** | DatasetRid | The Resource Identifier (RID) of the Dataset on which to create the Transaction. | | +**branch_id** | Optional[BranchId] | The identifier (name) of the Branch on which to create the Transaction. Defaults to `master` for most enrollments. | [optional] | +**transaction_type** | Optional[TransactionType] | | [optional] | + +### Return type +**Transaction** + +### Example + +```python +from foundry_sdk.v1 import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# DatasetRid | The Resource Identifier (RID) of the Dataset on which to create the Transaction. +dataset_rid = "ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da" +# Optional[BranchId] | The identifier (name) of the Branch on which to create the Transaction. Defaults to `master` for most enrollments. +branch_id = None +# Optional[TransactionType] +transaction_type = "SNAPSHOT" + + +try: + api_response = client.datasets.Dataset.Transaction.create( + dataset_rid, branch_id=branch_id, transaction_type=transaction_type + ) + print("The create response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Transaction.create: %s\n" % e) + +``` + +### Manipulate a Dataset within a Transaction + +```python +import foundry + +foundry_client = foundry.FoundryV1Client(auth=foundry.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +transaction = foundry_client.datasets.Dataset.Transaction.create( + dataset_rid="...", + create_transaction_request={}, +) + +with open("my/path/to/file.txt", 'rb') as f: + foundry_client.datasets.Dataset.File.upload( + body=f.read(), + dataset_rid="....", + file_path="...", + transaction_rid=transaction.rid, + ) + +foundry_client.datasets.Dataset.Transaction.commit(dataset_rid="...", transaction_rid=transaction.rid) +``` + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | Transaction | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v1-link) [[Back to Model list]](../../../README.md#models-v1-link) [[Back to README]](../../../README.md) + +# **get** +Gets a Transaction of a Dataset. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**dataset_rid** | DatasetRid | The Resource Identifier (RID) of the Dataset that contains the Transaction. | | +**transaction_rid** | TransactionRid | The Resource Identifier (RID) of the Transaction. | | + +### Return type +**Transaction** + +### Example + +```python +from foundry_sdk.v1 import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# DatasetRid | The Resource Identifier (RID) of the Dataset that contains the Transaction. +dataset_rid = "ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da" +# TransactionRid | The Resource Identifier (RID) of the Transaction. +transaction_rid = "ri.foundry.main.transaction.abffc380-ea68-4843-9be1-9f44d2565496" + + +try: + api_response = client.datasets.Dataset.Transaction.get(dataset_rid, transaction_rid) + print("The get response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Transaction.get: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | Transaction | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v1-link) [[Back to Model list]](../../../README.md#models-v1-link) [[Back to README]](../../../README.md) + diff --git a/docs/v1/Datasets/models/Branch.md b/docs/v1/Datasets/models/Branch.md new file mode 100644 index 000000000..f8ee0ecba --- /dev/null +++ b/docs/v1/Datasets/models/Branch.md @@ -0,0 +1,13 @@ +# Branch + +A Branch of a Dataset. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**branch_id** | BranchId | Yes | | +**transaction_rid** | Optional[TransactionRid] | No | | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Datasets/models/BranchId.md b/docs/v1/Datasets/models/BranchId.md new file mode 100644 index 000000000..597cea5a0 --- /dev/null +++ b/docs/v1/Datasets/models/BranchId.md @@ -0,0 +1,12 @@ +# BranchId + +The identifier (name) of a Branch. + + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Datasets/models/CreateBranchRequest.md b/docs/v1/Datasets/models/CreateBranchRequest.md new file mode 100644 index 000000000..70815967f --- /dev/null +++ b/docs/v1/Datasets/models/CreateBranchRequest.md @@ -0,0 +1,12 @@ +# CreateBranchRequest + +CreateBranchRequest + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**branch_id** | BranchId | Yes | | +**transaction_rid** | Optional[TransactionRid] | No | | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Datasets/models/CreateDatasetRequest.md b/docs/v1/Datasets/models/CreateDatasetRequest.md new file mode 100644 index 000000000..ac70282a8 --- /dev/null +++ b/docs/v1/Datasets/models/CreateDatasetRequest.md @@ -0,0 +1,12 @@ +# CreateDatasetRequest + +CreateDatasetRequest + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**name** | DatasetName | Yes | | +**parent_folder_rid** | FolderRid | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Datasets/models/CreateTransactionRequest.md b/docs/v1/Datasets/models/CreateTransactionRequest.md new file mode 100644 index 000000000..bf0774b2a --- /dev/null +++ b/docs/v1/Datasets/models/CreateTransactionRequest.md @@ -0,0 +1,11 @@ +# CreateTransactionRequest + +CreateTransactionRequest + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**transaction_type** | Optional[TransactionType] | No | | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Datasets/models/Dataset.md b/docs/v1/Datasets/models/Dataset.md new file mode 100644 index 000000000..25ac27288 --- /dev/null +++ b/docs/v1/Datasets/models/Dataset.md @@ -0,0 +1,13 @@ +# Dataset + +Dataset + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**rid** | DatasetRid | Yes | | +**name** | DatasetName | Yes | | +**parent_folder_rid** | FolderRid | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Datasets/models/DatasetName.md b/docs/v1/Datasets/models/DatasetName.md new file mode 100644 index 000000000..02c383c90 --- /dev/null +++ b/docs/v1/Datasets/models/DatasetName.md @@ -0,0 +1,11 @@ +# DatasetName + +DatasetName + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Datasets/models/DatasetRid.md b/docs/v1/Datasets/models/DatasetRid.md new file mode 100644 index 000000000..0511bdf9c --- /dev/null +++ b/docs/v1/Datasets/models/DatasetRid.md @@ -0,0 +1,12 @@ +# DatasetRid + +The Resource Identifier (RID) of a Dataset. + + +## Type +```python +RID +``` + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Datasets/models/File.md b/docs/v1/Datasets/models/File.md new file mode 100644 index 000000000..85ebf4edd --- /dev/null +++ b/docs/v1/Datasets/models/File.md @@ -0,0 +1,14 @@ +# File + +File + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**path** | FilePath | Yes | | +**transaction_rid** | TransactionRid | Yes | | +**size_bytes** | Optional[Long] | No | | +**updated_time** | datetime | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Datasets/models/ListBranchesResponse.md b/docs/v1/Datasets/models/ListBranchesResponse.md new file mode 100644 index 000000000..d22e27800 --- /dev/null +++ b/docs/v1/Datasets/models/ListBranchesResponse.md @@ -0,0 +1,12 @@ +# ListBranchesResponse + +ListBranchesResponse + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**next_page_token** | Optional[PageToken] | No | | +**data** | List[Branch] | Yes | The list of branches in the current page. | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Datasets/models/ListFilesResponse.md b/docs/v1/Datasets/models/ListFilesResponse.md new file mode 100644 index 000000000..587bb0ed1 --- /dev/null +++ b/docs/v1/Datasets/models/ListFilesResponse.md @@ -0,0 +1,12 @@ +# ListFilesResponse + +A page of Files and an optional page token that can be used to retrieve the next page. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**next_page_token** | Optional[PageToken] | No | | +**data** | List[File] | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Datasets/models/TableExportFormat.md b/docs/v1/Datasets/models/TableExportFormat.md new file mode 100644 index 000000000..233740a32 --- /dev/null +++ b/docs/v1/Datasets/models/TableExportFormat.md @@ -0,0 +1,12 @@ +# TableExportFormat + +Format for tabular dataset export. + + +| **Value** | +| --------- | +| `"ARROW"` | +| `"CSV"` | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Datasets/models/Transaction.md b/docs/v1/Datasets/models/Transaction.md new file mode 100644 index 000000000..3f5568ae3 --- /dev/null +++ b/docs/v1/Datasets/models/Transaction.md @@ -0,0 +1,16 @@ +# Transaction + +An operation that modifies the files within a dataset. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**rid** | TransactionRid | Yes | | +**transaction_type** | TransactionType | Yes | | +**status** | TransactionStatus | Yes | | +**created_time** | datetime | Yes | The timestamp when the transaction was created, in ISO 8601 timestamp format. | +**closed_time** | Optional[datetime] | No | The timestamp when the transaction was closed, in ISO 8601 timestamp format. | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Datasets/models/TransactionRid.md b/docs/v1/Datasets/models/TransactionRid.md new file mode 100644 index 000000000..206a20fe5 --- /dev/null +++ b/docs/v1/Datasets/models/TransactionRid.md @@ -0,0 +1,12 @@ +# TransactionRid + +The Resource Identifier (RID) of a Transaction. + + +## Type +```python +RID +``` + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Datasets/models/TransactionStatus.md b/docs/v1/Datasets/models/TransactionStatus.md new file mode 100644 index 000000000..46171254a --- /dev/null +++ b/docs/v1/Datasets/models/TransactionStatus.md @@ -0,0 +1,13 @@ +# TransactionStatus + +The status of a Transaction. + + +| **Value** | +| --------- | +| `"ABORTED"` | +| `"COMMITTED"` | +| `"OPEN"` | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Datasets/models/TransactionType.md b/docs/v1/Datasets/models/TransactionType.md new file mode 100644 index 000000000..d3484948e --- /dev/null +++ b/docs/v1/Datasets/models/TransactionType.md @@ -0,0 +1,14 @@ +# TransactionType + +The type of a Transaction. + + +| **Value** | +| --------- | +| `"APPEND"` | +| `"UPDATE"` | +| `"SNAPSHOT"` | +| `"DELETE"` | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/Action.md b/docs/v1/Ontologies/Action.md new file mode 100644 index 000000000..ee5c39e97 --- /dev/null +++ b/docs/v1/Ontologies/Action.md @@ -0,0 +1,209 @@ +# Action + +Method | HTTP request | Release Stage | +------------- | ------------- | ----- | +[**apply**](#apply) | **POST** /v1/ontologies/{ontologyRid}/actions/{actionType}/apply | Stable | +[**apply_batch**](#apply_batch) | **POST** /v1/ontologies/{ontologyRid}/actions/{actionType}/applyBatch | Stable | +[**validate**](#validate) | **POST** /v1/ontologies/{ontologyRid}/actions/{actionType}/validate | Stable | + +# **apply** +Applies an action using the given parameters. + +Changes to objects or links stored in Object Storage V1 are eventually consistent and may take some time to be visible. +Edits to objects or links in Object Storage V2 will be visible immediately after the action completes. + +Note that [parameter default values](https://palantir.com/docs/foundry/action-types/parameters-default-value/) are not currently supported by +this endpoint. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**ontology_rid** | OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the action. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. | | +**action_type** | ActionTypeApiName | The API name of the action to apply. To find the API name for your action, use the **List action types** endpoint or check the **Ontology Manager**. | | +**parameters** | Dict[ParameterId, Optional[DataValue]] | | | + +### Return type +**ApplyActionResponse** + +### Example + +```python +from foundry_sdk.v1 import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the action. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. +ontology_rid = "ri.ontology.main.ontology.c61d9ab5-2919-4127-a0a1-ac64c0ce6367" +# ActionTypeApiName | The API name of the action to apply. To find the API name for your action, use the **List action types** endpoint or check the **Ontology Manager**. +action_type = "rename-employee" +# Dict[ParameterId, Optional[DataValue]] +parameters = {"id": 80060, "newName": "Anna Smith-Doe"} + + +try: + api_response = client.ontologies.Action.apply(ontology_rid, action_type, parameters=parameters) + print("The apply response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Action.apply: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | ApplyActionResponse | Success response. | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v1-link) [[Back to Model list]](../../../README.md#models-v1-link) [[Back to README]](../../../README.md) + +# **apply_batch** +Applies multiple actions (of the same Action Type) using the given parameters. +Changes to objects or links stored in Object Storage V1 are eventually consistent and may take some time to be visible. +Edits to objects or links in Object Storage V2 will be visible immediately after the action completes. + +Up to 20 actions may be applied in one call. Actions that only modify objects in Object Storage v2 and do not +call Functions may receive a higher limit. + +Note that [parameter default values](https://palantir.com/docs/foundry/action-types/parameters-default-value/) and +[notifications](https://palantir.com/docs/foundry/action-types/notifications/) are not currently supported by this endpoint. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**ontology_rid** | OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the action. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. | | +**action_type** | ActionTypeApiName | The API name of the action to apply. To find the API name for your action, use the **List action types** endpoint or check the **Ontology Manager**. | | +**requests** | List[ApplyActionRequest] | | | + +### Return type +**BatchApplyActionResponse** + +### Example + +```python +from foundry_sdk.v1 import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the action. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. +ontology_rid = "ri.ontology.main.ontology.c61d9ab5-2919-4127-a0a1-ac64c0ce6367" +# ActionTypeApiName | The API name of the action to apply. To find the API name for your action, use the **List action types** endpoint or check the **Ontology Manager**. +action_type = "rename-employee" +# List[ApplyActionRequest] +requests = [ + {"parameters": {"id": 80060, "newName": "Anna Smith-Doe"}}, + {"parameters": {"id": 80061, "newName": "Joe Bloggs"}}, +] + + +try: + api_response = client.ontologies.Action.apply_batch( + ontology_rid, action_type, requests=requests + ) + print("The apply_batch response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Action.apply_batch: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | BatchApplyActionResponse | Success response. | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v1-link) [[Back to Model list]](../../../README.md#models-v1-link) [[Back to README]](../../../README.md) + +# **validate** +Validates if an action can be run with the given set of parameters. +The response contains the evaluation of parameters and **submission criteria** +that determine if the request is `VALID` or `INVALID`. +For performance reasons, validations will not consider existing objects or other data in Foundry. +For example, the uniqueness of a primary key or the existence of a user ID will not be checked. +Note that [parameter default values](https://palantir.com/docs/foundry/action-types/parameters-default-value/) are not currently supported by +this endpoint. Unspecified parameters will be given a default value of `null`. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**ontology_rid** | OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the action. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. | | +**action_type** | ActionTypeApiName | The API name of the action to validate. To find the API name for your action, use the **List action types** endpoint or check the **Ontology Manager**. | | +**parameters** | Dict[ParameterId, Optional[DataValue]] | | | + +### Return type +**ValidateActionResponse** + +### Example + +```python +from foundry_sdk.v1 import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the action. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. +ontology_rid = "ri.ontology.main.ontology.c61d9ab5-2919-4127-a0a1-ac64c0ce6367" +# ActionTypeApiName | The API name of the action to validate. To find the API name for your action, use the **List action types** endpoint or check the **Ontology Manager**. +action_type = "rename-employee" +# Dict[ParameterId, Optional[DataValue]] +parameters = { + "id": "2", + "firstName": "Chuck", + "lastName": "Jones", + "age": 17, + "date": "2021-05-01", + "numbers": [1, 2, 3], + "hasObjectSet": True, + "objectSet": "ri.object-set.main.object-set.39a9f4bd-f77e-45ce-9772-70f25852f623", + "reference": "Chuck", + "percentage": 41.3, + "differentObjectId": "2", +} + + +try: + api_response = client.ontologies.Action.validate( + ontology_rid, action_type, parameters=parameters + ) + print("The validate response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Action.validate: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | ValidateActionResponse | Success response. | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v1-link) [[Back to Model list]](../../../README.md#models-v1-link) [[Back to README]](../../../README.md) + diff --git a/docs/v1/Ontologies/ActionType.md b/docs/v1/Ontologies/ActionType.md new file mode 100644 index 000000000..ecf276a54 --- /dev/null +++ b/docs/v1/Ontologies/ActionType.md @@ -0,0 +1,116 @@ +# ActionType + +Method | HTTP request | Release Stage | +------------- | ------------- | ----- | +[**get**](#get) | **GET** /v1/ontologies/{ontologyRid}/actionTypes/{actionTypeApiName} | Stable | +[**list**](#list) | **GET** /v1/ontologies/{ontologyRid}/actionTypes | Stable | + +# **get** +Gets a specific action type with the given API name. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**ontology_rid** | OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the action type. | | +**action_type_api_name** | ActionTypeApiName | The name of the action type in the API. | | + +### Return type +**ActionType** + +### Example + +```python +from foundry_sdk.v1 import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the action type. +ontology_rid = "ri.ontology.main.ontology.c61d9ab5-2919-4127-a0a1-ac64c0ce6367" +# ActionTypeApiName | The name of the action type in the API. +action_type_api_name = "promote-employee" + + +try: + api_response = client.ontologies.Ontology.ActionType.get(ontology_rid, action_type_api_name) + print("The get response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling ActionType.get: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | ActionType | Success response. | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v1-link) [[Back to Model list]](../../../README.md#models-v1-link) [[Back to README]](../../../README.md) + +# **list** +Lists the action types for the given Ontology. + +Each page may be smaller than the requested page size. However, it is guaranteed that if there are more +results available, at least one result will be present in the response. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**ontology_rid** | OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the action types. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. | | +**page_size** | Optional[PageSize] | The desired size of the page to be returned. Defaults to 500. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. | [optional] | +**page_token** | Optional[PageToken] | | [optional] | + +### Return type +**ListActionTypesResponse** + +### Example + +```python +from foundry_sdk.v1 import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the action types. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. +ontology_rid = "ri.ontology.main.ontology.c61d9ab5-2919-4127-a0a1-ac64c0ce6367" +# Optional[PageSize] | The desired size of the page to be returned. Defaults to 500. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. +page_size = None +# Optional[PageToken] +page_token = None + + +try: + for action_type in client.ontologies.Ontology.ActionType.list( + ontology_rid, page_size=page_size, page_token=page_token + ): + pprint(action_type) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling ActionType.list: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | ListActionTypesResponse | Success response. | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v1-link) [[Back to Model list]](../../../README.md#models-v1-link) [[Back to README]](../../../README.md) + diff --git a/docs/v1/Ontologies/Attachment.md b/docs/v1/Ontologies/Attachment.md new file mode 100644 index 000000000..03a0c76b7 --- /dev/null +++ b/docs/v1/Ontologies/Attachment.md @@ -0,0 +1,167 @@ +# Attachment + +Method | HTTP request | Release Stage | +------------- | ------------- | ----- | +[**get**](#get) | **GET** /v1/attachments/{attachmentRid} | Stable | +[**read**](#read) | **GET** /v1/attachments/{attachmentRid}/content | Stable | +[**upload**](#upload) | **POST** /v1/attachments/upload | Stable | + +# **get** +Get the metadata of an attachment. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**attachment_rid** | AttachmentRid | The RID of the attachment. | | + +### Return type +**Attachment** + +### Example + +```python +from foundry_sdk.v1 import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# AttachmentRid | The RID of the attachment. +attachment_rid = "ri.attachments.main.attachment.bb32154e-e043-4b00-9461-93136ca96b6f" + + +try: + api_response = client.ontologies.Attachment.get(attachment_rid) + print("The get response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Attachment.get: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | Attachment | Success response. | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v1-link) [[Back to Model list]](../../../README.md#models-v1-link) [[Back to README]](../../../README.md) + +# **read** +Get the content of an attachment. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**attachment_rid** | AttachmentRid | The RID of the attachment. | | + +### Return type +**bytes** + +### Example + +```python +from foundry_sdk.v1 import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# AttachmentRid | The RID of the attachment. +attachment_rid = "ri.attachments.main.attachment.bb32154e-e043-4b00-9461-93136ca96b6f" + + +try: + api_response = client.ontologies.Attachment.read(attachment_rid) + print("The read response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Attachment.read: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | bytes | Success response. | */* | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v1-link) [[Back to Model list]](../../../README.md#models-v1-link) [[Back to README]](../../../README.md) + +# **upload** +Upload an attachment to use in an action. Any attachment which has not been linked to an object via +an action within one hour after upload will be removed. +Previously mapped attachments which are not connected to any object anymore are also removed on +a biweekly basis. +The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**body** | bytes | Body of the request | | +**content_length** | ContentLength | The size in bytes of the file content being uploaded. | | +**content_type** | ContentType | The media type of the file being uploaded. | | +**filename** | Filename | The name of the file being uploaded. | | + +### Return type +**Attachment** + +### Example + +```python +from foundry_sdk.v1 import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# bytes | Body of the request +body = None +# ContentLength | The size in bytes of the file content being uploaded. +content_length = None +# ContentType | The media type of the file being uploaded. +content_type = None +# Filename | The name of the file being uploaded. +filename = "My Image.jpeg" + + +try: + api_response = client.ontologies.Attachment.upload( + body, content_length=content_length, content_type=content_type, filename=filename + ) + print("The upload response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Attachment.upload: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | Attachment | Success response. | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v1-link) [[Back to Model list]](../../../README.md#models-v1-link) [[Back to README]](../../../README.md) + diff --git a/docs/v1/Ontologies/ObjectType.md b/docs/v1/Ontologies/ObjectType.md new file mode 100644 index 000000000..f2657ccc3 --- /dev/null +++ b/docs/v1/Ontologies/ObjectType.md @@ -0,0 +1,233 @@ +# ObjectType + +Method | HTTP request | Release Stage | +------------- | ------------- | ----- | +[**get**](#get) | **GET** /v1/ontologies/{ontologyRid}/objectTypes/{objectType} | Stable | +[**get_outgoing_link_type**](#get_outgoing_link_type) | **GET** /v1/ontologies/{ontologyRid}/objectTypes/{objectType}/outgoingLinkTypes/{linkType} | Stable | +[**list**](#list) | **GET** /v1/ontologies/{ontologyRid}/objectTypes | Stable | +[**list_outgoing_link_types**](#list_outgoing_link_types) | **GET** /v1/ontologies/{ontologyRid}/objectTypes/{objectType}/outgoingLinkTypes | Stable | + +# **get** +Gets a specific object type with the given API name. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**ontology_rid** | OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the object type. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. | | +**object_type** | ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. | | + +### Return type +**ObjectType** + +### Example + +```python +from foundry_sdk.v1 import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the object type. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. +ontology_rid = "ri.ontology.main.ontology.c61d9ab5-2919-4127-a0a1-ac64c0ce6367" +# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. +object_type = "employee" + + +try: + api_response = client.ontologies.Ontology.ObjectType.get(ontology_rid, object_type) + print("The get response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling ObjectType.get: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | ObjectType | Success response. | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v1-link) [[Back to Model list]](../../../README.md#models-v1-link) [[Back to README]](../../../README.md) + +# **get_outgoing_link_type** +Get an outgoing link for an object type. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**ontology_rid** | OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the object type. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager** application. | | +**object_type** | ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager** application. | | +**link_type** | LinkTypeApiName | The API name of the outgoing link. To find the API name for your link type, check the **Ontology Manager**. | | + +### Return type +**LinkTypeSide** + +### Example + +```python +from foundry_sdk.v1 import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the object type. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager** application. +ontology_rid = "ri.ontology.main.ontology.c61d9ab5-2919-4127-a0a1-ac64c0ce6367" +# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager** application. +object_type = "Employee" +# LinkTypeApiName | The API name of the outgoing link. To find the API name for your link type, check the **Ontology Manager**. +link_type = "directReport" + + +try: + api_response = client.ontologies.Ontology.ObjectType.get_outgoing_link_type( + ontology_rid, object_type, link_type + ) + print("The get_outgoing_link_type response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling ObjectType.get_outgoing_link_type: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | LinkTypeSide | Success response. | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v1-link) [[Back to Model list]](../../../README.md#models-v1-link) [[Back to README]](../../../README.md) + +# **list** +Lists the object types for the given Ontology. + +Each page may be smaller or larger than the requested page size. However, it is guaranteed that if there are +more results available, at least one result will be present in the +response. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**ontology_rid** | OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the object types. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. | | +**page_size** | Optional[PageSize] | The desired size of the page to be returned. Defaults to 500. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. | [optional] | +**page_token** | Optional[PageToken] | | [optional] | + +### Return type +**ListObjectTypesResponse** + +### Example + +```python +from foundry_sdk.v1 import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the object types. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. +ontology_rid = "ri.ontology.main.ontology.c61d9ab5-2919-4127-a0a1-ac64c0ce6367" +# Optional[PageSize] | The desired size of the page to be returned. Defaults to 500. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. +page_size = None +# Optional[PageToken] +page_token = None + + +try: + for object_type in client.ontologies.Ontology.ObjectType.list( + ontology_rid, page_size=page_size, page_token=page_token + ): + pprint(object_type) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling ObjectType.list: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | ListObjectTypesResponse | Success response. | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v1-link) [[Back to Model list]](../../../README.md#models-v1-link) [[Back to README]](../../../README.md) + +# **list_outgoing_link_types** +List the outgoing links for an object type. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**ontology_rid** | OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the object type. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager** application. | | +**object_type** | ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager** application. | | +**page_size** | Optional[PageSize] | The desired size of the page to be returned. | [optional] | +**page_token** | Optional[PageToken] | | [optional] | + +### Return type +**ListOutgoingLinkTypesResponse** + +### Example + +```python +from foundry_sdk.v1 import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the object type. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager** application. +ontology_rid = "ri.ontology.main.ontology.c61d9ab5-2919-4127-a0a1-ac64c0ce6367" +# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager** application. +object_type = "Flight" +# Optional[PageSize] | The desired size of the page to be returned. +page_size = None +# Optional[PageToken] +page_token = None + + +try: + for object_type in client.ontologies.Ontology.ObjectType.list_outgoing_link_types( + ontology_rid, object_type, page_size=page_size, page_token=page_token + ): + pprint(object_type) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling ObjectType.list_outgoing_link_types: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | ListOutgoingLinkTypesResponse | Success response. | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v1-link) [[Back to Model list]](../../../README.md#models-v1-link) [[Back to README]](../../../README.md) + diff --git a/docs/v1/Ontologies/Ontology.md b/docs/v1/Ontologies/Ontology.md new file mode 100644 index 000000000..c7330d317 --- /dev/null +++ b/docs/v1/Ontologies/Ontology.md @@ -0,0 +1,99 @@ +# Ontology + +Method | HTTP request | Release Stage | +------------- | ------------- | ----- | +[**get**](#get) | **GET** /v1/ontologies/{ontologyRid} | Stable | +[**list**](#list) | **GET** /v1/ontologies | Stable | + +# **get** +Gets a specific ontology with the given Ontology RID. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**ontology_rid** | OntologyRid | The unique Resource Identifier (RID) of the Ontology. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. | | + +### Return type +**Ontology** + +### Example + +```python +from foundry_sdk.v1 import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# OntologyRid | The unique Resource Identifier (RID) of the Ontology. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. +ontology_rid = "ri.ontology.main.ontology.c61d9ab5-2919-4127-a0a1-ac64c0ce6367" + + +try: + api_response = client.ontologies.Ontology.get(ontology_rid) + print("The get response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Ontology.get: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | Ontology | Success response. | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v1-link) [[Back to Model list]](../../../README.md#models-v1-link) [[Back to README]](../../../README.md) + +# **list** +Lists the Ontologies visible to the current user. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | + +### Return type +**ListOntologiesResponse** + +### Example + +```python +from foundry_sdk.v1 import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + + +try: + api_response = client.ontologies.Ontology.list() + print("The list response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Ontology.list: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | ListOntologiesResponse | Success response. | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v1-link) [[Back to Model list]](../../../README.md#models-v1-link) [[Back to README]](../../../README.md) + diff --git a/docs/v1/Ontologies/OntologyObject.md b/docs/v1/Ontologies/OntologyObject.md new file mode 100644 index 000000000..a243a6e93 --- /dev/null +++ b/docs/v1/Ontologies/OntologyObject.md @@ -0,0 +1,484 @@ +# OntologyObject + +Method | HTTP request | Release Stage | +------------- | ------------- | ----- | +[**aggregate**](#aggregate) | **POST** /v1/ontologies/{ontologyRid}/objects/{objectType}/aggregate | Stable | +[**get**](#get) | **GET** /v1/ontologies/{ontologyRid}/objects/{objectType}/{primaryKey} | Stable | +[**get_linked_object**](#get_linked_object) | **GET** /v1/ontologies/{ontologyRid}/objects/{objectType}/{primaryKey}/links/{linkType}/{linkedObjectPrimaryKey} | Stable | +[**list**](#list) | **GET** /v1/ontologies/{ontologyRid}/objects/{objectType} | Stable | +[**list_linked_objects**](#list_linked_objects) | **GET** /v1/ontologies/{ontologyRid}/objects/{objectType}/{primaryKey}/links/{linkType} | Stable | +[**search**](#search) | **POST** /v1/ontologies/{ontologyRid}/objects/{objectType}/search | Stable | + +# **aggregate** +Perform functions on object fields in the specified ontology and object type. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**ontology_rid** | OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the objects. | | +**object_type** | ObjectTypeApiName | The type of the object to aggregate on. | | +**aggregation** | List[Aggregation] | | | +**group_by** | List[AggregationGroupBy] | | | +**query** | Optional[SearchJsonQuery] | | [optional] | + +### Return type +**AggregateObjectsResponse** + +### Example + +```python +from foundry_sdk.v1 import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the objects. +ontology_rid = "ri.ontology.main.ontology.c61d9ab5-2919-4127-a0a1-ac64c0ce6367" +# ObjectTypeApiName | The type of the object to aggregate on. +object_type = "employee" +# List[Aggregation] +aggregation = [ + {"type": "min", "field": "properties.tenure", "name": "min_tenure"}, + {"type": "avg", "field": "properties.tenure", "name": "avg_tenure"}, +] +# List[AggregationGroupBy] +group_by = [ + { + "field": "properties.startDate", + "type": "range", + "ranges": [{"gte": "2020-01-01", "lt": "2020-06-01"}], + }, + {"field": "properties.city", "type": "exact"}, +] +# Optional[SearchJsonQuery] +query = {"not": {"field": "properties.name", "eq": "john"}} + + +try: + api_response = client.ontologies.OntologyObject.aggregate( + ontology_rid, object_type, aggregation=aggregation, group_by=group_by, query=query + ) + print("The aggregate response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling OntologyObject.aggregate: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | AggregateObjectsResponse | Success response. | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v1-link) [[Back to Model list]](../../../README.md#models-v1-link) [[Back to README]](../../../README.md) + +# **get** +Gets a specific object with the given primary key. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**ontology_rid** | OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the object. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. | | +**object_type** | ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. | | +**primary_key** | PropertyValueEscapedString | The primary key of the requested object. To look up the expected primary key for your object type, use the `Get object type` endpoint or the **Ontology Manager**. | | +**properties** | Optional[List[SelectedPropertyApiName]] | The properties of the object type that should be included in the response. Omit this parameter to get all the properties. | [optional] | + +### Return type +**OntologyObject** + +### Example + +```python +from foundry_sdk.v1 import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the object. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. +ontology_rid = "ri.ontology.main.ontology.c61d9ab5-2919-4127-a0a1-ac64c0ce6367" +# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. +object_type = "employee" +# PropertyValueEscapedString | The primary key of the requested object. To look up the expected primary key for your object type, use the `Get object type` endpoint or the **Ontology Manager**. +primary_key = 50030 +# Optional[List[SelectedPropertyApiName]] | The properties of the object type that should be included in the response. Omit this parameter to get all the properties. +properties = None + + +try: + api_response = client.ontologies.OntologyObject.get( + ontology_rid, object_type, primary_key, properties=properties + ) + print("The get response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling OntologyObject.get: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | OntologyObject | Success response. | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v1-link) [[Back to Model list]](../../../README.md#models-v1-link) [[Back to README]](../../../README.md) + +# **get_linked_object** +Get a specific linked object that originates from another object. If there is no link between the two objects, +LinkedObjectNotFound is thrown. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**ontology_rid** | OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the object. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. | | +**object_type** | ObjectTypeApiName | The API name of the object from which the links originate. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. | | +**primary_key** | PropertyValueEscapedString | The primary key of the object from which the link originates. To look up the expected primary key for your object type, use the `Get object type` endpoint or the **Ontology Manager**. | | +**link_type** | LinkTypeApiName | The API name of the link that exists between the object and the requested objects. To find the API name for your link type, check the **Ontology Manager**. | | +**linked_object_primary_key** | PropertyValueEscapedString | The primary key of the requested linked object. To look up the expected primary key for your object type, use the `Get object type` endpoint (passing the linked object type) or the **Ontology Manager**. | | +**properties** | Optional[List[SelectedPropertyApiName]] | The properties of the object type that should be included in the response. Omit this parameter to get all the properties. | [optional] | + +### Return type +**OntologyObject** + +### Example + +```python +from foundry_sdk.v1 import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the object. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. +ontology_rid = "ri.ontology.main.ontology.c61d9ab5-2919-4127-a0a1-ac64c0ce6367" +# ObjectTypeApiName | The API name of the object from which the links originate. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. +object_type = "employee" +# PropertyValueEscapedString | The primary key of the object from which the link originates. To look up the expected primary key for your object type, use the `Get object type` endpoint or the **Ontology Manager**. +primary_key = 50030 +# LinkTypeApiName | The API name of the link that exists between the object and the requested objects. To find the API name for your link type, check the **Ontology Manager**. +link_type = "directReport" +# PropertyValueEscapedString | The primary key of the requested linked object. To look up the expected primary key for your object type, use the `Get object type` endpoint (passing the linked object type) or the **Ontology Manager**. +linked_object_primary_key = 80060 +# Optional[List[SelectedPropertyApiName]] | The properties of the object type that should be included in the response. Omit this parameter to get all the properties. +properties = None + + +try: + api_response = client.ontologies.OntologyObject.get_linked_object( + ontology_rid, + object_type, + primary_key, + link_type, + linked_object_primary_key, + properties=properties, + ) + print("The get_linked_object response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling OntologyObject.get_linked_object: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | OntologyObject | Success response. | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v1-link) [[Back to Model list]](../../../README.md#models-v1-link) [[Back to README]](../../../README.md) + +# **list** +Lists the objects for the given Ontology and object type. + +This endpoint supports filtering objects. +See the [Filtering Objects documentation](https://palantir.com/docs/foundry/api/ontology-resources/objects/ontology-object-basics#filter-objects) for details. + +Note that this endpoint does not guarantee consistency. Changes to the data could result in missing or +repeated objects in the response pages. + +For Object Storage V1 backed objects, this endpoint returns a maximum of 10,000 objects. After 10,000 objects have been returned and if more objects +are available, attempting to load another page will result in an `ObjectsExceededLimit` error being returned. There is no limit on Object Storage V2 backed objects. + +Each page may be smaller or larger than the requested page size. However, it +is guaranteed that if there are more results available, at least one result will be present +in the response. + +Note that null value properties will not be returned. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**ontology_rid** | OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the objects. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. | | +**object_type** | ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. | | +**order_by** | Optional[OrderBy] | | [optional] | +**page_size** | Optional[PageSize] | The desired size of the page to be returned. Defaults to 1,000. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. | [optional] | +**page_token** | Optional[PageToken] | | [optional] | +**properties** | Optional[List[SelectedPropertyApiName]] | The properties of the object type that should be included in the response. Omit this parameter to get all the properties. | [optional] | + +### Return type +**ListObjectsResponse** + +### Example + +```python +from foundry_sdk.v1 import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the objects. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. +ontology_rid = "ri.ontology.main.ontology.c61d9ab5-2919-4127-a0a1-ac64c0ce6367" +# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. +object_type = "employee" +# Optional[OrderBy] +order_by = None +# Optional[PageSize] | The desired size of the page to be returned. Defaults to 1,000. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. +page_size = None +# Optional[PageToken] +page_token = None +# Optional[List[SelectedPropertyApiName]] | The properties of the object type that should be included in the response. Omit this parameter to get all the properties. +properties = None + + +try: + for ontology_object in client.ontologies.OntologyObject.list( + ontology_rid, + object_type, + order_by=order_by, + page_size=page_size, + page_token=page_token, + properties=properties, + ): + pprint(ontology_object) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling OntologyObject.list: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | ListObjectsResponse | Success response. | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v1-link) [[Back to Model list]](../../../README.md#models-v1-link) [[Back to README]](../../../README.md) + +# **list_linked_objects** +Lists the linked objects for a specific object and the given link type. + +This endpoint supports filtering objects. +See the [Filtering Objects documentation](https://palantir.com/docs/foundry/api/ontology-resources/objects/ontology-object-basics#filter-objects) for details. + +Note that this endpoint does not guarantee consistency. Changes to the data could result in missing or +repeated objects in the response pages. + +For Object Storage V1 backed objects, this endpoint returns a maximum of 10,000 objects. After 10,000 objects have been returned and if more objects +are available, attempting to load another page will result in an `ObjectsExceededLimit` error being returned. There is no limit on Object Storage V2 backed objects. + +Each page may be smaller or larger than the requested page size. However, it +is guaranteed that if there are more results available, at least one result will be present +in the response. + +Note that null value properties will not be returned. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**ontology_rid** | OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the objects. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. | | +**object_type** | ObjectTypeApiName | The API name of the object from which the links originate. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. | | +**primary_key** | PropertyValueEscapedString | The primary key of the object from which the links originate. To look up the expected primary key for your object type, use the `Get object type` endpoint or the **Ontology Manager**. | | +**link_type** | LinkTypeApiName | The API name of the link that exists between the object and the requested objects. To find the API name for your link type, check the **Ontology Manager**. | | +**order_by** | Optional[OrderBy] | | [optional] | +**page_size** | Optional[PageSize] | The desired size of the page to be returned. Defaults to 1,000. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. | [optional] | +**page_token** | Optional[PageToken] | | [optional] | +**properties** | Optional[List[SelectedPropertyApiName]] | The properties of the object type that should be included in the response. Omit this parameter to get all the properties. | [optional] | + +### Return type +**ListLinkedObjectsResponse** + +### Example + +```python +from foundry_sdk.v1 import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the objects. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. +ontology_rid = "ri.ontology.main.ontology.c61d9ab5-2919-4127-a0a1-ac64c0ce6367" +# ObjectTypeApiName | The API name of the object from which the links originate. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. +object_type = "employee" +# PropertyValueEscapedString | The primary key of the object from which the links originate. To look up the expected primary key for your object type, use the `Get object type` endpoint or the **Ontology Manager**. +primary_key = 50030 +# LinkTypeApiName | The API name of the link that exists between the object and the requested objects. To find the API name for your link type, check the **Ontology Manager**. +link_type = "directReport" +# Optional[OrderBy] +order_by = None +# Optional[PageSize] | The desired size of the page to be returned. Defaults to 1,000. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. +page_size = None +# Optional[PageToken] +page_token = None +# Optional[List[SelectedPropertyApiName]] | The properties of the object type that should be included in the response. Omit this parameter to get all the properties. +properties = None + + +try: + for ontology_object in client.ontologies.OntologyObject.list_linked_objects( + ontology_rid, + object_type, + primary_key, + link_type, + order_by=order_by, + page_size=page_size, + page_token=page_token, + properties=properties, + ): + pprint(ontology_object) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling OntologyObject.list_linked_objects: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | ListLinkedObjectsResponse | Success response. | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v1-link) [[Back to Model list]](../../../README.md#models-v1-link) [[Back to README]](../../../README.md) + +# **search** +Search for objects in the specified ontology and object type. The request body is used +to filter objects based on the specified query. The supported queries are: + +| Query type | Description | Supported Types | +|----------|-----------------------------------------------------------------------------------|---------------------------------| +| lt | The provided property is less than the provided value. | number, string, date, timestamp | +| gt | The provided property is greater than the provided value. | number, string, date, timestamp | +| lte | The provided property is less than or equal to the provided value. | number, string, date, timestamp | +| gte | The provided property is greater than or equal to the provided value. | number, string, date, timestamp | +| eq | The provided property is exactly equal to the provided value. | number, string, date, timestamp | +| isNull | The provided property is (or is not) null. | all | +| contains | The provided property contains the provided value. | array | +| not | The sub-query does not match. | N/A (applied on a query) | +| and | All the sub-queries match. | N/A (applied on queries) | +| or | At least one of the sub-queries match. | N/A (applied on queries) | +| prefix | The provided property starts with the provided term. | string | +| phrase | The provided property contains the provided term as a substring. | string | +| anyTerm | The provided property contains at least one of the terms separated by whitespace. | string | +| allTerms | The provided property contains all the terms separated by whitespace. | string | + +Queries can be at most three levels deep. By default, terms are separated by whitespace or punctuation (`?!,:;-[](){}'"~`). Periods (`.`) on their own are ignored. +Partial terms are not matched by terms filters except where explicitly noted. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**ontology_rid** | OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the objects. | | +**object_type** | ObjectTypeApiName | The type of the requested objects. | | +**fields** | List[PropertyApiName] | The API names of the object type properties to include in the response. | | +**query** | SearchJsonQuery | | | +**order_by** | Optional[SearchOrderBy] | | [optional] | +**page_size** | Optional[PageSize] | | [optional] | +**page_token** | Optional[PageToken] | | [optional] | + +### Return type +**SearchObjectsResponse** + +### Example + +```python +from foundry_sdk.v1 import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the objects. +ontology_rid = "ri.ontology.main.ontology.c61d9ab5-2919-4127-a0a1-ac64c0ce6367" +# ObjectTypeApiName | The type of the requested objects. +object_type = "employee" +# List[PropertyApiName] | The API names of the object type properties to include in the response. +fields = None +# SearchJsonQuery +query = {"not": {"field": "properties.age", "eq": 21}} +# Optional[SearchOrderBy] +order_by = None +# Optional[PageSize] +page_size = None +# Optional[PageToken] +page_token = None + + +try: + api_response = client.ontologies.OntologyObject.search( + ontology_rid, + object_type, + fields=fields, + query=query, + order_by=order_by, + page_size=page_size, + page_token=page_token, + ) + print("The search response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling OntologyObject.search: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | SearchObjectsResponse | Success response. | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v1-link) [[Back to Model list]](../../../README.md#models-v1-link) [[Back to README]](../../../README.md) + diff --git a/docs/v1/Ontologies/Query.md b/docs/v1/Ontologies/Query.md new file mode 100644 index 000000000..14c140c15 --- /dev/null +++ b/docs/v1/Ontologies/Query.md @@ -0,0 +1,76 @@ +# Query + +Method | HTTP request | Release Stage | +------------- | ------------- | ----- | +[**execute**](#execute) | **POST** /v1/ontologies/{ontologyRid}/queries/{queryApiName}/execute | Stable | + +# **execute** +Executes a Query using the given parameters. Optional parameters do not need to be supplied. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**ontology_rid** | OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the Query. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. | | +**query_api_name** | QueryApiName | The API name of the Query to execute. | | +**parameters** | Dict[ParameterId, Optional[DataValue]] | | | +**attribution** | Optional[Attribution] | The Attribution to be used when executing this request. | [optional] | +**trace_parent** | Optional[TraceParent] | The W3C trace parent header included in the request. | [optional] | +**trace_state** | Optional[TraceState] | The W3C trace state header included in the request. | [optional] | + +### Return type +**ExecuteQueryResponse** + +### Example + +```python +from foundry_sdk.v1 import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the Query. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. +ontology_rid = "ri.ontology.main.ontology.c61d9ab5-2919-4127-a0a1-ac64c0ce6367" +# QueryApiName | The API name of the Query to execute. +query_api_name = "getEmployeesInCity" +# Dict[ParameterId, Optional[DataValue]] +parameters = {"city": "New York"} +# Optional[Attribution] | The Attribution to be used when executing this request. +attribution = None +# Optional[TraceParent] | The W3C trace parent header included in the request. +trace_parent = None +# Optional[TraceState] | The W3C trace state header included in the request. +trace_state = None + + +try: + api_response = client.ontologies.Query.execute( + ontology_rid, + query_api_name, + parameters=parameters, + attribution=attribution, + trace_parent=trace_parent, + trace_state=trace_state, + ) + print("The execute response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Query.execute: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | ExecuteQueryResponse | Success response. | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v1-link) [[Back to Model list]](../../../README.md#models-v1-link) [[Back to README]](../../../README.md) + diff --git a/docs/v1/Ontologies/QueryType.md b/docs/v1/Ontologies/QueryType.md new file mode 100644 index 000000000..6eb0e4b37 --- /dev/null +++ b/docs/v1/Ontologies/QueryType.md @@ -0,0 +1,116 @@ +# QueryType + +Method | HTTP request | Release Stage | +------------- | ------------- | ----- | +[**get**](#get) | **GET** /v1/ontologies/{ontologyRid}/queryTypes/{queryApiName} | Stable | +[**list**](#list) | **GET** /v1/ontologies/{ontologyRid}/queryTypes | Stable | + +# **get** +Gets a specific query type with the given API name. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**ontology_rid** | OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the query type. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. | | +**query_api_name** | QueryApiName | The API name of the query type. To find the API name, use the **List query types** endpoint or check the **Ontology Manager**. | | + +### Return type +**QueryType** + +### Example + +```python +from foundry_sdk.v1 import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the query type. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. +ontology_rid = "ri.ontology.main.ontology.c61d9ab5-2919-4127-a0a1-ac64c0ce6367" +# QueryApiName | The API name of the query type. To find the API name, use the **List query types** endpoint or check the **Ontology Manager**. +query_api_name = "getEmployeesInCity" + + +try: + api_response = client.ontologies.Ontology.QueryType.get(ontology_rid, query_api_name) + print("The get response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling QueryType.get: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | QueryType | Success response. | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v1-link) [[Back to Model list]](../../../README.md#models-v1-link) [[Back to README]](../../../README.md) + +# **list** +Lists the query types for the given Ontology. + +Each page may be smaller than the requested page size. However, it is guaranteed that if there are more +results available, at least one result will be present in the response. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**ontology_rid** | OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the query types. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. | | +**page_size** | Optional[PageSize] | The desired size of the page to be returned. Defaults to 100. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. | [optional] | +**page_token** | Optional[PageToken] | | [optional] | + +### Return type +**ListQueryTypesResponse** + +### Example + +```python +from foundry_sdk.v1 import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# OntologyRid | The unique Resource Identifier (RID) of the Ontology that contains the query types. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. +ontology_rid = "ri.ontology.main.ontology.c61d9ab5-2919-4127-a0a1-ac64c0ce6367" +# Optional[PageSize] | The desired size of the page to be returned. Defaults to 100. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. +page_size = None +# Optional[PageToken] +page_token = None + + +try: + for query_type in client.ontologies.Ontology.QueryType.list( + ontology_rid, page_size=page_size, page_token=page_token + ): + pprint(query_type) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling QueryType.list: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | ListQueryTypesResponse | Success response. | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v1-link) [[Back to Model list]](../../../README.md#models-v1-link) [[Back to README]](../../../README.md) + diff --git a/docs/v1/Ontologies/models/ActionRid.md b/docs/v1/Ontologies/models/ActionRid.md new file mode 100644 index 000000000..f532a8351 --- /dev/null +++ b/docs/v1/Ontologies/models/ActionRid.md @@ -0,0 +1,11 @@ +# ActionRid + +The unique resource identifier for an action. + +## Type +```python +RID +``` + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/ActionType.md b/docs/v1/Ontologies/models/ActionType.md new file mode 100644 index 000000000..3e6cc78bf --- /dev/null +++ b/docs/v1/Ontologies/models/ActionType.md @@ -0,0 +1,17 @@ +# ActionType + +Represents an action type in the Ontology. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**api_name** | ActionTypeApiName | Yes | | +**description** | Optional[str] | No | | +**display_name** | Optional[DisplayName] | No | | +**status** | ReleaseStatus | Yes | | +**parameters** | Dict[ParameterId, Parameter] | Yes | | +**rid** | ActionTypeRid | Yes | | +**operations** | List[LogicRule] | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/ActionTypeApiName.md b/docs/v1/Ontologies/models/ActionTypeApiName.md new file mode 100644 index 000000000..8812f5c4b --- /dev/null +++ b/docs/v1/Ontologies/models/ActionTypeApiName.md @@ -0,0 +1,13 @@ +# ActionTypeApiName + +The name of the action type in the API. To find the API name for your Action Type, use the `List action types` +endpoint or check the **Ontology Manager**. + + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/ActionTypeRid.md b/docs/v1/Ontologies/models/ActionTypeRid.md new file mode 100644 index 000000000..b91f5fcbc --- /dev/null +++ b/docs/v1/Ontologies/models/ActionTypeRid.md @@ -0,0 +1,12 @@ +# ActionTypeRid + +The unique resource identifier of an action type, useful for interacting with other Foundry APIs. + + +## Type +```python +RID +``` + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/AggregateObjectsRequest.md b/docs/v1/Ontologies/models/AggregateObjectsRequest.md new file mode 100644 index 000000000..d95c1410b --- /dev/null +++ b/docs/v1/Ontologies/models/AggregateObjectsRequest.md @@ -0,0 +1,13 @@ +# AggregateObjectsRequest + +AggregateObjectsRequest + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**aggregation** | List[Aggregation] | Yes | | +**query** | Optional[SearchJsonQuery] | No | | +**group_by** | List[AggregationGroupBy] | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/AggregateObjectsResponse.md b/docs/v1/Ontologies/models/AggregateObjectsResponse.md new file mode 100644 index 000000000..307ab6863 --- /dev/null +++ b/docs/v1/Ontologies/models/AggregateObjectsResponse.md @@ -0,0 +1,13 @@ +# AggregateObjectsResponse + +AggregateObjectsResponse + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**excluded_items** | Optional[int] | No | | +**next_page_token** | Optional[PageToken] | No | | +**data** | List[AggregateObjectsResponseItem] | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/AggregateObjectsResponseItem.md b/docs/v1/Ontologies/models/AggregateObjectsResponseItem.md new file mode 100644 index 000000000..939396dc1 --- /dev/null +++ b/docs/v1/Ontologies/models/AggregateObjectsResponseItem.md @@ -0,0 +1,12 @@ +# AggregateObjectsResponseItem + +AggregateObjectsResponseItem + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**group** | Dict[AggregationGroupKey, AggregationGroupValue] | Yes | | +**metrics** | List[AggregationMetricResult] | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/Aggregation.md b/docs/v1/Ontologies/models/Aggregation.md new file mode 100644 index 000000000..22cf9e1f6 --- /dev/null +++ b/docs/v1/Ontologies/models/Aggregation.md @@ -0,0 +1,20 @@ +# Aggregation + +Specifies an aggregation function. + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +ApproximateDistinctAggregation | approximateDistinct +MinAggregation | min +AvgAggregation | avg +MaxAggregation | max +CountAggregation | count +SumAggregation | sum + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/AggregationDurationGrouping.md b/docs/v1/Ontologies/models/AggregationDurationGrouping.md new file mode 100644 index 000000000..a439427ad --- /dev/null +++ b/docs/v1/Ontologies/models/AggregationDurationGrouping.md @@ -0,0 +1,15 @@ +# AggregationDurationGrouping + +Divides objects into groups according to an interval. Note that this grouping applies only on date types. +The interval uses the ISO 8601 notation. For example, "PT1H2M34S" represents a duration of 3754 seconds. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**field** | FieldNameV1 | Yes | | +**duration** | Duration | Yes | | +**type** | Literal["duration"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/AggregationExactGrouping.md b/docs/v1/Ontologies/models/AggregationExactGrouping.md new file mode 100644 index 000000000..f66bb28f1 --- /dev/null +++ b/docs/v1/Ontologies/models/AggregationExactGrouping.md @@ -0,0 +1,13 @@ +# AggregationExactGrouping + +Divides objects into groups according to an exact value. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**field** | FieldNameV1 | Yes | | +**max_group_count** | Optional[int] | No | | +**type** | Literal["exact"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/AggregationFixedWidthGrouping.md b/docs/v1/Ontologies/models/AggregationFixedWidthGrouping.md new file mode 100644 index 000000000..a37120287 --- /dev/null +++ b/docs/v1/Ontologies/models/AggregationFixedWidthGrouping.md @@ -0,0 +1,13 @@ +# AggregationFixedWidthGrouping + +Divides objects into groups with the specified width. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**field** | FieldNameV1 | Yes | | +**fixed_width** | int | Yes | | +**type** | Literal["fixedWidth"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/AggregationGroupBy.md b/docs/v1/Ontologies/models/AggregationGroupBy.md new file mode 100644 index 000000000..9de55a4b4 --- /dev/null +++ b/docs/v1/Ontologies/models/AggregationGroupBy.md @@ -0,0 +1,18 @@ +# AggregationGroupBy + +Specifies a grouping for aggregation results. + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +AggregationDurationGrouping | duration +AggregationFixedWidthGrouping | fixedWidth +AggregationRangesGrouping | ranges +AggregationExactGrouping | exact + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/AggregationGroupKey.md b/docs/v1/Ontologies/models/AggregationGroupKey.md new file mode 100644 index 000000000..691aa1764 --- /dev/null +++ b/docs/v1/Ontologies/models/AggregationGroupKey.md @@ -0,0 +1,11 @@ +# AggregationGroupKey + +AggregationGroupKey + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/AggregationGroupValue.md b/docs/v1/Ontologies/models/AggregationGroupValue.md new file mode 100644 index 000000000..193574c50 --- /dev/null +++ b/docs/v1/Ontologies/models/AggregationGroupValue.md @@ -0,0 +1,11 @@ +# AggregationGroupValue + +AggregationGroupValue + +## Type +```python +Any +``` + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/AggregationMetricName.md b/docs/v1/Ontologies/models/AggregationMetricName.md new file mode 100644 index 000000000..2d50d56dc --- /dev/null +++ b/docs/v1/Ontologies/models/AggregationMetricName.md @@ -0,0 +1,11 @@ +# AggregationMetricName + +A user-specified alias for an aggregation metric name. + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/AggregationMetricResult.md b/docs/v1/Ontologies/models/AggregationMetricResult.md new file mode 100644 index 000000000..796c0cccb --- /dev/null +++ b/docs/v1/Ontologies/models/AggregationMetricResult.md @@ -0,0 +1,12 @@ +# AggregationMetricResult + +AggregationMetricResult + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**name** | str | Yes | | +**value** | Optional[float] | No | TBD | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/AggregationRange.md b/docs/v1/Ontologies/models/AggregationRange.md new file mode 100644 index 000000000..0e6822636 --- /dev/null +++ b/docs/v1/Ontologies/models/AggregationRange.md @@ -0,0 +1,14 @@ +# AggregationRange + +Specifies a date range from an inclusive start date to an exclusive end date. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**lt** | Optional[Any] | No | Exclusive end date. | +**lte** | Optional[Any] | No | Inclusive end date. | +**gt** | Optional[Any] | No | Exclusive start date. | +**gte** | Optional[Any] | No | Inclusive start date. | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/AggregationRangesGrouping.md b/docs/v1/Ontologies/models/AggregationRangesGrouping.md new file mode 100644 index 000000000..5334312c1 --- /dev/null +++ b/docs/v1/Ontologies/models/AggregationRangesGrouping.md @@ -0,0 +1,13 @@ +# AggregationRangesGrouping + +Divides objects into groups according to specified ranges. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**field** | FieldNameV1 | Yes | | +**ranges** | List[AggregationRange] | Yes | | +**type** | Literal["ranges"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/AllTermsQuery.md b/docs/v1/Ontologies/models/AllTermsQuery.md new file mode 100644 index 000000000..8e6d6d942 --- /dev/null +++ b/docs/v1/Ontologies/models/AllTermsQuery.md @@ -0,0 +1,16 @@ +# AllTermsQuery + +Returns objects where the specified field contains all of the whitespace separated words in any +order in the provided value. This query supports fuzzy matching. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**field** | FieldNameV1 | Yes | | +**value** | str | Yes | | +**fuzzy** | Optional[Fuzzy] | No | | +**type** | Literal["allTerms"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/AndQuery.md b/docs/v1/Ontologies/models/AndQuery.md new file mode 100644 index 000000000..eaf94c057 --- /dev/null +++ b/docs/v1/Ontologies/models/AndQuery.md @@ -0,0 +1,12 @@ +# AndQuery + +Returns objects where every query is satisfied. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**value** | List[SearchJsonQuery] | Yes | | +**type** | Literal["and"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/AnyTermQuery.md b/docs/v1/Ontologies/models/AnyTermQuery.md new file mode 100644 index 000000000..ab899facc --- /dev/null +++ b/docs/v1/Ontologies/models/AnyTermQuery.md @@ -0,0 +1,16 @@ +# AnyTermQuery + +Returns objects where the specified field contains any of the whitespace separated words in any +order in the provided value. This query supports fuzzy matching. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**field** | FieldNameV1 | Yes | | +**value** | str | Yes | | +**fuzzy** | Optional[Fuzzy] | No | | +**type** | Literal["anyTerm"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/ApplyActionMode.md b/docs/v1/Ontologies/models/ApplyActionMode.md new file mode 100644 index 000000000..773e7c520 --- /dev/null +++ b/docs/v1/Ontologies/models/ApplyActionMode.md @@ -0,0 +1,11 @@ +# ApplyActionMode + +ApplyActionMode + +| **Value** | +| --------- | +| `"VALIDATE_ONLY"` | +| `"VALIDATE_AND_EXECUTE"` | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/ApplyActionRequest.md b/docs/v1/Ontologies/models/ApplyActionRequest.md new file mode 100644 index 000000000..74b19a4c1 --- /dev/null +++ b/docs/v1/Ontologies/models/ApplyActionRequest.md @@ -0,0 +1,11 @@ +# ApplyActionRequest + +ApplyActionRequest + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**parameters** | Dict[ParameterId, Optional[DataValue]] | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/ApplyActionRequestOptions.md b/docs/v1/Ontologies/models/ApplyActionRequestOptions.md new file mode 100644 index 000000000..5418b41c0 --- /dev/null +++ b/docs/v1/Ontologies/models/ApplyActionRequestOptions.md @@ -0,0 +1,12 @@ +# ApplyActionRequestOptions + +ApplyActionRequestOptions + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**mode** | Optional[ApplyActionMode] | No | | +**return_edits** | Optional[ReturnEditsMode] | No | | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/ApplyActionResponse.md b/docs/v1/Ontologies/models/ApplyActionResponse.md new file mode 100644 index 000000000..b46432b1a --- /dev/null +++ b/docs/v1/Ontologies/models/ApplyActionResponse.md @@ -0,0 +1,10 @@ +# ApplyActionResponse + +ApplyActionResponse + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/ApproximateDistinctAggregation.md b/docs/v1/Ontologies/models/ApproximateDistinctAggregation.md new file mode 100644 index 000000000..95f1226f1 --- /dev/null +++ b/docs/v1/Ontologies/models/ApproximateDistinctAggregation.md @@ -0,0 +1,13 @@ +# ApproximateDistinctAggregation + +Computes an approximate number of distinct values for the provided field. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**field** | FieldNameV1 | Yes | | +**name** | Optional[AggregationMetricName] | No | | +**type** | Literal["approximateDistinct"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/ArrayEntryEvaluatedConstraint.md b/docs/v1/Ontologies/models/ArrayEntryEvaluatedConstraint.md new file mode 100644 index 000000000..51856f717 --- /dev/null +++ b/docs/v1/Ontologies/models/ArrayEntryEvaluatedConstraint.md @@ -0,0 +1,11 @@ +# ArrayEntryEvaluatedConstraint + +Evaluated constraints for entries of array parameters for which per-entry evaluation is supported. + +## Type +```python +StructEvaluatedConstraint +``` + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/ArrayEvaluatedConstraint.md b/docs/v1/Ontologies/models/ArrayEvaluatedConstraint.md new file mode 100644 index 000000000..47bad29e6 --- /dev/null +++ b/docs/v1/Ontologies/models/ArrayEvaluatedConstraint.md @@ -0,0 +1,12 @@ +# ArrayEvaluatedConstraint + +Evaluated constraints of array parameters that support per-entry constraint evaluations. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**entries** | List[ArrayEntryEvaluatedConstraint] | Yes | | +**type** | Literal["array"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/ArraySizeConstraint.md b/docs/v1/Ontologies/models/ArraySizeConstraint.md new file mode 100644 index 000000000..d3b8d5879 --- /dev/null +++ b/docs/v1/Ontologies/models/ArraySizeConstraint.md @@ -0,0 +1,16 @@ +# ArraySizeConstraint + +The parameter expects an array of values and the size of the array must fall within the defined range. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**lt** | Optional[Any] | No | Less than | +**lte** | Optional[Any] | No | Less than or equal | +**gt** | Optional[Any] | No | Greater than | +**gte** | Optional[Any] | No | Greater than or equal | +**type** | Literal["arraySize"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/ArtifactRepositoryRid.md b/docs/v1/Ontologies/models/ArtifactRepositoryRid.md new file mode 100644 index 000000000..302ef431b --- /dev/null +++ b/docs/v1/Ontologies/models/ArtifactRepositoryRid.md @@ -0,0 +1,11 @@ +# ArtifactRepositoryRid + +ArtifactRepositoryRid + +## Type +```python +RID +``` + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/Attachment.md b/docs/v1/Ontologies/models/Attachment.md new file mode 100644 index 000000000..4311eb0b6 --- /dev/null +++ b/docs/v1/Ontologies/models/Attachment.md @@ -0,0 +1,14 @@ +# Attachment + +The representation of an attachment. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**rid** | AttachmentRid | Yes | | +**filename** | Filename | Yes | | +**size_bytes** | SizeBytes | Yes | | +**media_type** | MediaType | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/AttachmentRid.md b/docs/v1/Ontologies/models/AttachmentRid.md new file mode 100644 index 000000000..dbaf13158 --- /dev/null +++ b/docs/v1/Ontologies/models/AttachmentRid.md @@ -0,0 +1,11 @@ +# AttachmentRid + +The unique resource identifier of an attachment. + +## Type +```python +RID +``` + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/AvgAggregation.md b/docs/v1/Ontologies/models/AvgAggregation.md new file mode 100644 index 000000000..70c480e61 --- /dev/null +++ b/docs/v1/Ontologies/models/AvgAggregation.md @@ -0,0 +1,13 @@ +# AvgAggregation + +Computes the average value for the provided field. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**field** | FieldNameV1 | Yes | | +**name** | Optional[AggregationMetricName] | No | | +**type** | Literal["avg"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/BatchApplyActionRequest.md b/docs/v1/Ontologies/models/BatchApplyActionRequest.md new file mode 100644 index 000000000..fbea9545b --- /dev/null +++ b/docs/v1/Ontologies/models/BatchApplyActionRequest.md @@ -0,0 +1,11 @@ +# BatchApplyActionRequest + +BatchApplyActionRequest + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**requests** | List[ApplyActionRequest] | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/BatchApplyActionResponse.md b/docs/v1/Ontologies/models/BatchApplyActionResponse.md new file mode 100644 index 000000000..674ddf7b4 --- /dev/null +++ b/docs/v1/Ontologies/models/BatchApplyActionResponse.md @@ -0,0 +1,10 @@ +# BatchApplyActionResponse + +BatchApplyActionResponse + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/ContainsQuery.md b/docs/v1/Ontologies/models/ContainsQuery.md new file mode 100644 index 000000000..27e55ec79 --- /dev/null +++ b/docs/v1/Ontologies/models/ContainsQuery.md @@ -0,0 +1,13 @@ +# ContainsQuery + +Returns objects where the specified array contains a value. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**field** | FieldNameV1 | Yes | | +**value** | PropertyValue | Yes | | +**type** | Literal["contains"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/CountAggregation.md b/docs/v1/Ontologies/models/CountAggregation.md new file mode 100644 index 000000000..04d31ad28 --- /dev/null +++ b/docs/v1/Ontologies/models/CountAggregation.md @@ -0,0 +1,12 @@ +# CountAggregation + +Computes the total count of objects. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**name** | Optional[AggregationMetricName] | No | | +**type** | Literal["count"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/CreateInterfaceObjectRule.md b/docs/v1/Ontologies/models/CreateInterfaceObjectRule.md new file mode 100644 index 000000000..e5b47b17c --- /dev/null +++ b/docs/v1/Ontologies/models/CreateInterfaceObjectRule.md @@ -0,0 +1,12 @@ +# CreateInterfaceObjectRule + +CreateInterfaceObjectRule + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**interface_type_api_name** | InterfaceTypeApiName | Yes | | +**type** | Literal["createInterfaceObject"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/CreateLinkRule.md b/docs/v1/Ontologies/models/CreateLinkRule.md new file mode 100644 index 000000000..aabcaee42 --- /dev/null +++ b/docs/v1/Ontologies/models/CreateLinkRule.md @@ -0,0 +1,15 @@ +# CreateLinkRule + +CreateLinkRule + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**link_type_api_name_ato_b** | LinkTypeApiName | Yes | | +**link_type_api_name_bto_a** | LinkTypeApiName | Yes | | +**a_side_object_type_api_name** | ObjectTypeApiName | Yes | | +**b_side_object_type_api_name** | ObjectTypeApiName | Yes | | +**type** | Literal["createLink"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/CreateObjectRule.md b/docs/v1/Ontologies/models/CreateObjectRule.md new file mode 100644 index 000000000..f1d3cd270 --- /dev/null +++ b/docs/v1/Ontologies/models/CreateObjectRule.md @@ -0,0 +1,12 @@ +# CreateObjectRule + +CreateObjectRule + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**object_type_api_name** | ObjectTypeApiName | Yes | | +**type** | Literal["createObject"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/DataValue.md b/docs/v1/Ontologies/models/DataValue.md new file mode 100644 index 000000000..5eb655149 --- /dev/null +++ b/docs/v1/Ontologies/models/DataValue.md @@ -0,0 +1,39 @@ +# DataValue + +Represents the value of data in the following format. Note that these values can be nested, for example an array of structs. +| Type | JSON encoding | Example | +|-------------------------------------|-------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Array | array | `["alpha", "bravo", "charlie"]` | +| Attachment | string | `"ri.attachments.main.attachment.2f944bae-5851-4204-8615-920c969a9f2e"` | +| Boolean | boolean | `true` | +| Byte | number | `31` | +| CipherText | string | `"CIPHER::ri.bellaso.main.cipher-channel.e414ab9e-b606-499a-a0e1-844fa296ba7e::unzjs3VifsTxuIpf1fH1CJ7OaPBr2bzMMdozPaZJtCii8vVG60yXIEmzoOJaEl9mfFFe::CIPHER"` | +| Date | ISO 8601 extended local date string | `"2021-05-01"` | +| Decimal | string | `"2.718281828"` | +| Double | number | `3.14159265` | +| EntrySet | array of JSON objects | `[{"key": "EMP1234", "value": "true"}, {"key": "EMP4444", "value": "false"}]` | +| Float | number | `3.14159265` | +| Integer | number | `238940` | +| Long | string | `"58319870951433"` | +| Marking | string | `"MU"` | +| Null | null | `null` | +| Object Set | string OR the object set definition | `ri.object-set.main.versioned-object-set.h13274m8-23f5-431c-8aee-a4554157c57z` | +| Ontology Object Reference | JSON encoding of the object's primary key | `10033123` or `"EMP1234"` | +| Ontology Interface Object Reference | JSON encoding of the object's API name and primary key| `{"objectTypeApiName":"Employee", "primaryKeyValue":"EMP1234"}` | +| Ontology Object Type Reference | string of the object type's api name | `"Employee"` | +| Set | array | `["alpha", "bravo", "charlie"]` | +| Short | number | `8739` | +| String | string | `"Call me Ishmael"` | +| Struct | JSON object | `{"name": "John Doe", "age": 42}` | +| TwoDimensionalAggregation | JSON object | `{"groups": [{"key": "alpha", "value": 100}, {"key": "beta", "value": 101}]}` | +| ThreeDimensionalAggregation | JSON object | `{"groups": [{"key": "NYC", "groups": [{"key": "Engineer", "value" : 100}]}]}` | +| Timestamp | ISO 8601 extended offset date-time string in UTC zone | `"2021-01-04T05:00:00Z"` | + + +## Type +```python +Any +``` + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/DeleteInterfaceObjectRule.md b/docs/v1/Ontologies/models/DeleteInterfaceObjectRule.md new file mode 100644 index 000000000..5e0ef0ecf --- /dev/null +++ b/docs/v1/Ontologies/models/DeleteInterfaceObjectRule.md @@ -0,0 +1,12 @@ +# DeleteInterfaceObjectRule + +DeleteInterfaceObjectRule + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**interface_type_api_name** | InterfaceTypeApiName | Yes | | +**type** | Literal["deleteInterfaceObject"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/DeleteLinkRule.md b/docs/v1/Ontologies/models/DeleteLinkRule.md new file mode 100644 index 000000000..ff18c2b1e --- /dev/null +++ b/docs/v1/Ontologies/models/DeleteLinkRule.md @@ -0,0 +1,15 @@ +# DeleteLinkRule + +DeleteLinkRule + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**link_type_api_name_ato_b** | LinkTypeApiName | Yes | | +**link_type_api_name_bto_a** | LinkTypeApiName | Yes | | +**a_side_object_type_api_name** | ObjectTypeApiName | Yes | | +**b_side_object_type_api_name** | ObjectTypeApiName | Yes | | +**type** | Literal["deleteLink"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/DeleteObjectRule.md b/docs/v1/Ontologies/models/DeleteObjectRule.md new file mode 100644 index 000000000..a220f7509 --- /dev/null +++ b/docs/v1/Ontologies/models/DeleteObjectRule.md @@ -0,0 +1,12 @@ +# DeleteObjectRule + +DeleteObjectRule + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**object_type_api_name** | ObjectTypeApiName | Yes | | +**type** | Literal["deleteObject"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/DerivedPropertyApiName.md b/docs/v1/Ontologies/models/DerivedPropertyApiName.md new file mode 100644 index 000000000..ca774ce41 --- /dev/null +++ b/docs/v1/Ontologies/models/DerivedPropertyApiName.md @@ -0,0 +1,12 @@ +# DerivedPropertyApiName + +The name of the derived property that will be returned. + + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/Duration.md b/docs/v1/Ontologies/models/Duration.md new file mode 100644 index 000000000..9a3708333 --- /dev/null +++ b/docs/v1/Ontologies/models/Duration.md @@ -0,0 +1,11 @@ +# Duration + +An ISO 8601 formatted duration. + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/EntrySetType.md b/docs/v1/Ontologies/models/EntrySetType.md new file mode 100644 index 000000000..5a8563bd5 --- /dev/null +++ b/docs/v1/Ontologies/models/EntrySetType.md @@ -0,0 +1,13 @@ +# EntrySetType + +EntrySetType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**key_type** | QueryDataType | Yes | | +**value_type** | QueryDataType | Yes | | +**type** | Literal["entrySet"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/EqualsQuery.md b/docs/v1/Ontologies/models/EqualsQuery.md new file mode 100644 index 000000000..1cce0243c --- /dev/null +++ b/docs/v1/Ontologies/models/EqualsQuery.md @@ -0,0 +1,13 @@ +# EqualsQuery + +Returns objects where the specified field is equal to a value. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**field** | FieldNameV1 | Yes | | +**value** | PropertyValue | Yes | | +**type** | Literal["eq"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/ExecuteQueryRequest.md b/docs/v1/Ontologies/models/ExecuteQueryRequest.md new file mode 100644 index 000000000..e4f882a7d --- /dev/null +++ b/docs/v1/Ontologies/models/ExecuteQueryRequest.md @@ -0,0 +1,11 @@ +# ExecuteQueryRequest + +ExecuteQueryRequest + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**parameters** | Dict[ParameterId, Optional[DataValue]] | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/ExecuteQueryResponse.md b/docs/v1/Ontologies/models/ExecuteQueryResponse.md new file mode 100644 index 000000000..8238931f8 --- /dev/null +++ b/docs/v1/Ontologies/models/ExecuteQueryResponse.md @@ -0,0 +1,11 @@ +# ExecuteQueryResponse + +ExecuteQueryResponse + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**value** | DataValue | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/FieldNameV1.md b/docs/v1/Ontologies/models/FieldNameV1.md new file mode 100644 index 000000000..7170b48bc --- /dev/null +++ b/docs/v1/Ontologies/models/FieldNameV1.md @@ -0,0 +1,11 @@ +# FieldNameV1 + +A reference to an Ontology object property with the form `properties.{propertyApiName}`. + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/FilterValue.md b/docs/v1/Ontologies/models/FilterValue.md new file mode 100644 index 000000000..6a3d84484 --- /dev/null +++ b/docs/v1/Ontologies/models/FilterValue.md @@ -0,0 +1,13 @@ +# FilterValue + +Represents the value of a property filter. For instance, false is the FilterValue in +`properties.{propertyApiName}.isNull=false`. + + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/FunctionRid.md b/docs/v1/Ontologies/models/FunctionRid.md new file mode 100644 index 000000000..204e7e77c --- /dev/null +++ b/docs/v1/Ontologies/models/FunctionRid.md @@ -0,0 +1,12 @@ +# FunctionRid + +The unique resource identifier of a Function, useful for interacting with other Foundry APIs. + + +## Type +```python +RID +``` + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/FunctionVersion.md b/docs/v1/Ontologies/models/FunctionVersion.md new file mode 100644 index 000000000..92a755938 --- /dev/null +++ b/docs/v1/Ontologies/models/FunctionVersion.md @@ -0,0 +1,13 @@ +# FunctionVersion + +The version of the given Function, written `..-`, where `-` is optional. +Examples: `1.2.3`, `1.2.3-rc1`. + + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/Fuzzy.md b/docs/v1/Ontologies/models/Fuzzy.md new file mode 100644 index 000000000..9421fb223 --- /dev/null +++ b/docs/v1/Ontologies/models/Fuzzy.md @@ -0,0 +1,11 @@ +# Fuzzy + +Setting fuzzy to `true` allows approximate matching in search queries that support it. + +## Type +```python +bool +``` + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/GroupMemberConstraint.md b/docs/v1/Ontologies/models/GroupMemberConstraint.md new file mode 100644 index 000000000..73d2ebca9 --- /dev/null +++ b/docs/v1/Ontologies/models/GroupMemberConstraint.md @@ -0,0 +1,12 @@ +# GroupMemberConstraint + +The parameter value must be the user id of a member belonging to at least one of the groups defined by the constraint. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["groupMember"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/GtQuery.md b/docs/v1/Ontologies/models/GtQuery.md new file mode 100644 index 000000000..8c340cacc --- /dev/null +++ b/docs/v1/Ontologies/models/GtQuery.md @@ -0,0 +1,13 @@ +# GtQuery + +Returns objects where the specified field is greater than a value. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**field** | FieldNameV1 | Yes | | +**value** | PropertyValue | Yes | | +**type** | Literal["gt"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/GteQuery.md b/docs/v1/Ontologies/models/GteQuery.md new file mode 100644 index 000000000..4eecf35b1 --- /dev/null +++ b/docs/v1/Ontologies/models/GteQuery.md @@ -0,0 +1,13 @@ +# GteQuery + +Returns objects where the specified field is greater than or equal to a value. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**field** | FieldNameV1 | Yes | | +**value** | PropertyValue | Yes | | +**type** | Literal["gte"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/InterfaceLinkTypeApiName.md b/docs/v1/Ontologies/models/InterfaceLinkTypeApiName.md new file mode 100644 index 000000000..b3e0aa090 --- /dev/null +++ b/docs/v1/Ontologies/models/InterfaceLinkTypeApiName.md @@ -0,0 +1,13 @@ +# InterfaceLinkTypeApiName + +The name of the interface link type in the API. To find the API name for your Interface Link Type, check the +[Ontology Manager](https://palantir.com/docs/foundry/ontology-manager/overview/). + + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/InterfaceLinkTypeRid.md b/docs/v1/Ontologies/models/InterfaceLinkTypeRid.md new file mode 100644 index 000000000..ca0e21207 --- /dev/null +++ b/docs/v1/Ontologies/models/InterfaceLinkTypeRid.md @@ -0,0 +1,12 @@ +# InterfaceLinkTypeRid + +The unique resource identifier of an interface link type, useful for interacting with other Foundry APIs. + + +## Type +```python +RID +``` + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/InterfacePropertyApiName.md b/docs/v1/Ontologies/models/InterfacePropertyApiName.md new file mode 100644 index 000000000..181956234 --- /dev/null +++ b/docs/v1/Ontologies/models/InterfacePropertyApiName.md @@ -0,0 +1,14 @@ +# InterfacePropertyApiName + +The name of the interface property type in the API in lowerCamelCase format. To find the API name for your +interface property type, use the `List interface types` endpoint and check the `allPropertiesV2` field or check +the **Ontology Manager**. + + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/InterfaceTypeApiName.md b/docs/v1/Ontologies/models/InterfaceTypeApiName.md new file mode 100644 index 000000000..38f96bb9c --- /dev/null +++ b/docs/v1/Ontologies/models/InterfaceTypeApiName.md @@ -0,0 +1,13 @@ +# InterfaceTypeApiName + +The name of the interface type in the API in UpperCamelCase format. To find the API name for your interface +type, use the `List interface types` endpoint or check the **Ontology Manager**. + + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/InterfaceTypeRid.md b/docs/v1/Ontologies/models/InterfaceTypeRid.md new file mode 100644 index 000000000..bdd9d3a97 --- /dev/null +++ b/docs/v1/Ontologies/models/InterfaceTypeRid.md @@ -0,0 +1,11 @@ +# InterfaceTypeRid + +The unique resource identifier of an interface, useful for interacting with other Foundry APIs. + +## Type +```python +RID +``` + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/IsNullQuery.md b/docs/v1/Ontologies/models/IsNullQuery.md new file mode 100644 index 000000000..896fdb93e --- /dev/null +++ b/docs/v1/Ontologies/models/IsNullQuery.md @@ -0,0 +1,13 @@ +# IsNullQuery + +Returns objects based on the existence of the specified field. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**field** | FieldNameV1 | Yes | | +**value** | bool | Yes | | +**type** | Literal["isNull"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/LegacyObjectTypeId.md b/docs/v1/Ontologies/models/LegacyObjectTypeId.md new file mode 100644 index 000000000..a085165b4 --- /dev/null +++ b/docs/v1/Ontologies/models/LegacyObjectTypeId.md @@ -0,0 +1,13 @@ +# LegacyObjectTypeId + +The unique ID of an object type. This is a legacy identifier and is not recommended for use in new applications. +To find the ID for your Object Type, check the **Ontology Manager**. + + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/LegacyPropertyId.md b/docs/v1/Ontologies/models/LegacyPropertyId.md new file mode 100644 index 000000000..f1a95f585 --- /dev/null +++ b/docs/v1/Ontologies/models/LegacyPropertyId.md @@ -0,0 +1,13 @@ +# LegacyPropertyId + +The unique ID of a property. This is a legacy identifier and is not recommended for use in new applications. +To find the ID for your property, check the **Ontology Manager**. + + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/LinkTypeApiName.md b/docs/v1/Ontologies/models/LinkTypeApiName.md new file mode 100644 index 000000000..f16e4a2c5 --- /dev/null +++ b/docs/v1/Ontologies/models/LinkTypeApiName.md @@ -0,0 +1,13 @@ +# LinkTypeApiName + +The name of the link type in the API. To find the API name for your Link Type, check the **Ontology Manager** +application. + + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/LinkTypeId.md b/docs/v1/Ontologies/models/LinkTypeId.md new file mode 100644 index 000000000..9144901c0 --- /dev/null +++ b/docs/v1/Ontologies/models/LinkTypeId.md @@ -0,0 +1,12 @@ +# LinkTypeId + +The unique ID of a link type. To find the ID for your link type, check the **Ontology Manager** application. + + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/LinkTypeSide.md b/docs/v1/Ontologies/models/LinkTypeSide.md new file mode 100644 index 000000000..20bc7d109 --- /dev/null +++ b/docs/v1/Ontologies/models/LinkTypeSide.md @@ -0,0 +1,16 @@ +# LinkTypeSide + +LinkTypeSide + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**api_name** | LinkTypeApiName | Yes | | +**display_name** | DisplayName | Yes | | +**status** | ReleaseStatus | Yes | | +**object_type_api_name** | ObjectTypeApiName | Yes | | +**cardinality** | LinkTypeSideCardinality | Yes | | +**foreign_key_property_api_name** | Optional[PropertyApiName] | No | | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/LinkTypeSideCardinality.md b/docs/v1/Ontologies/models/LinkTypeSideCardinality.md new file mode 100644 index 000000000..5287f18e9 --- /dev/null +++ b/docs/v1/Ontologies/models/LinkTypeSideCardinality.md @@ -0,0 +1,11 @@ +# LinkTypeSideCardinality + +LinkTypeSideCardinality + +| **Value** | +| --------- | +| `"ONE"` | +| `"MANY"` | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/ListActionTypesResponse.md b/docs/v1/Ontologies/models/ListActionTypesResponse.md new file mode 100644 index 000000000..902d173fa --- /dev/null +++ b/docs/v1/Ontologies/models/ListActionTypesResponse.md @@ -0,0 +1,12 @@ +# ListActionTypesResponse + +ListActionTypesResponse + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**next_page_token** | Optional[PageToken] | No | | +**data** | List[ActionType] | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/ListLinkedObjectsResponse.md b/docs/v1/Ontologies/models/ListLinkedObjectsResponse.md new file mode 100644 index 000000000..873c95d9d --- /dev/null +++ b/docs/v1/Ontologies/models/ListLinkedObjectsResponse.md @@ -0,0 +1,12 @@ +# ListLinkedObjectsResponse + +ListLinkedObjectsResponse + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**next_page_token** | Optional[PageToken] | No | | +**data** | List[OntologyObject] | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/ListObjectTypesResponse.md b/docs/v1/Ontologies/models/ListObjectTypesResponse.md new file mode 100644 index 000000000..013faf7c5 --- /dev/null +++ b/docs/v1/Ontologies/models/ListObjectTypesResponse.md @@ -0,0 +1,12 @@ +# ListObjectTypesResponse + +ListObjectTypesResponse + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**next_page_token** | Optional[PageToken] | No | | +**data** | List[ObjectType] | Yes | The list of object types in the current page. | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/ListObjectsResponse.md b/docs/v1/Ontologies/models/ListObjectsResponse.md new file mode 100644 index 000000000..be2e92a00 --- /dev/null +++ b/docs/v1/Ontologies/models/ListObjectsResponse.md @@ -0,0 +1,13 @@ +# ListObjectsResponse + +ListObjectsResponse + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**next_page_token** | Optional[PageToken] | No | | +**data** | List[OntologyObject] | Yes | The list of objects in the current page. | +**total_count** | TotalCount | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/ListOntologiesResponse.md b/docs/v1/Ontologies/models/ListOntologiesResponse.md new file mode 100644 index 000000000..35cd401fc --- /dev/null +++ b/docs/v1/Ontologies/models/ListOntologiesResponse.md @@ -0,0 +1,11 @@ +# ListOntologiesResponse + +ListOntologiesResponse + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**data** | List[Ontology] | Yes | The list of Ontologies the user has access to. | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/ListOutgoingLinkTypesResponse.md b/docs/v1/Ontologies/models/ListOutgoingLinkTypesResponse.md new file mode 100644 index 000000000..57ebcedc2 --- /dev/null +++ b/docs/v1/Ontologies/models/ListOutgoingLinkTypesResponse.md @@ -0,0 +1,12 @@ +# ListOutgoingLinkTypesResponse + +ListOutgoingLinkTypesResponse + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**next_page_token** | Optional[PageToken] | No | | +**data** | List[LinkTypeSide] | Yes | The list of link type sides in the current page. | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/ListQueryTypesResponse.md b/docs/v1/Ontologies/models/ListQueryTypesResponse.md new file mode 100644 index 000000000..550837346 --- /dev/null +++ b/docs/v1/Ontologies/models/ListQueryTypesResponse.md @@ -0,0 +1,12 @@ +# ListQueryTypesResponse + +ListQueryTypesResponse + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**next_page_token** | Optional[PageToken] | No | | +**data** | List[QueryType] | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/LogicRule.md b/docs/v1/Ontologies/models/LogicRule.md new file mode 100644 index 000000000..48d5f29a8 --- /dev/null +++ b/docs/v1/Ontologies/models/LogicRule.md @@ -0,0 +1,22 @@ +# LogicRule + +LogicRule + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +DeleteInterfaceObjectRule | deleteInterfaceObject +ModifyInterfaceObjectRule | modifyInterfaceObject +ModifyObjectRule | modifyObject +DeleteObjectRule | deleteObject +CreateInterfaceObjectRule | createInterfaceObject +DeleteLinkRule | deleteLink +CreateObjectRule | createObject +CreateLinkRule | createLink + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/LtQuery.md b/docs/v1/Ontologies/models/LtQuery.md new file mode 100644 index 000000000..4b77f733e --- /dev/null +++ b/docs/v1/Ontologies/models/LtQuery.md @@ -0,0 +1,13 @@ +# LtQuery + +Returns objects where the specified field is less than a value. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**field** | FieldNameV1 | Yes | | +**value** | PropertyValue | Yes | | +**type** | Literal["lt"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/LteQuery.md b/docs/v1/Ontologies/models/LteQuery.md new file mode 100644 index 000000000..a89a42b6a --- /dev/null +++ b/docs/v1/Ontologies/models/LteQuery.md @@ -0,0 +1,13 @@ +# LteQuery + +Returns objects where the specified field is less than or equal to a value. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**field** | FieldNameV1 | Yes | | +**value** | PropertyValue | Yes | | +**type** | Literal["lte"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/MaxAggregation.md b/docs/v1/Ontologies/models/MaxAggregation.md new file mode 100644 index 000000000..9399189f8 --- /dev/null +++ b/docs/v1/Ontologies/models/MaxAggregation.md @@ -0,0 +1,13 @@ +# MaxAggregation + +Computes the maximum value for the provided field. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**field** | FieldNameV1 | Yes | | +**name** | Optional[AggregationMetricName] | No | | +**type** | Literal["max"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/MinAggregation.md b/docs/v1/Ontologies/models/MinAggregation.md new file mode 100644 index 000000000..327dbaed9 --- /dev/null +++ b/docs/v1/Ontologies/models/MinAggregation.md @@ -0,0 +1,13 @@ +# MinAggregation + +Computes the minimum value for the provided field. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**field** | FieldNameV1 | Yes | | +**name** | Optional[AggregationMetricName] | No | | +**type** | Literal["min"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/ModifyInterfaceObjectRule.md b/docs/v1/Ontologies/models/ModifyInterfaceObjectRule.md new file mode 100644 index 000000000..53e9ee847 --- /dev/null +++ b/docs/v1/Ontologies/models/ModifyInterfaceObjectRule.md @@ -0,0 +1,12 @@ +# ModifyInterfaceObjectRule + +ModifyInterfaceObjectRule + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**interface_type_api_name** | InterfaceTypeApiName | Yes | | +**type** | Literal["modifyInterfaceObject"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/ModifyObjectRule.md b/docs/v1/Ontologies/models/ModifyObjectRule.md new file mode 100644 index 000000000..d6bd9d0c5 --- /dev/null +++ b/docs/v1/Ontologies/models/ModifyObjectRule.md @@ -0,0 +1,12 @@ +# ModifyObjectRule + +ModifyObjectRule + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**object_type_api_name** | ObjectTypeApiName | Yes | | +**type** | Literal["modifyObject"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/NotQuery.md b/docs/v1/Ontologies/models/NotQuery.md new file mode 100644 index 000000000..e35f265fe --- /dev/null +++ b/docs/v1/Ontologies/models/NotQuery.md @@ -0,0 +1,12 @@ +# NotQuery + +Returns objects where the query is not satisfied. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**value** | SearchJsonQuery | Yes | | +**type** | Literal["not"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/ObjectPropertyValueConstraint.md b/docs/v1/Ontologies/models/ObjectPropertyValueConstraint.md new file mode 100644 index 000000000..18624923d --- /dev/null +++ b/docs/v1/Ontologies/models/ObjectPropertyValueConstraint.md @@ -0,0 +1,12 @@ +# ObjectPropertyValueConstraint + +The parameter value must be a property value of an object found within an object set. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["objectPropertyValue"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/ObjectQueryResultConstraint.md b/docs/v1/Ontologies/models/ObjectQueryResultConstraint.md new file mode 100644 index 000000000..cea087ffe --- /dev/null +++ b/docs/v1/Ontologies/models/ObjectQueryResultConstraint.md @@ -0,0 +1,12 @@ +# ObjectQueryResultConstraint + +The parameter value must be the primary key of an object found within an object set. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["objectQueryResult"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/ObjectRid.md b/docs/v1/Ontologies/models/ObjectRid.md new file mode 100644 index 000000000..ab4049c8e --- /dev/null +++ b/docs/v1/Ontologies/models/ObjectRid.md @@ -0,0 +1,12 @@ +# ObjectRid + +The unique resource identifier of an object, useful for interacting with other Foundry APIs. + + +## Type +```python +RID +``` + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/ObjectSetRid.md b/docs/v1/Ontologies/models/ObjectSetRid.md new file mode 100644 index 000000000..10eaa1bfc --- /dev/null +++ b/docs/v1/Ontologies/models/ObjectSetRid.md @@ -0,0 +1,11 @@ +# ObjectSetRid + +ObjectSetRid + +## Type +```python +RID +``` + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/ObjectType.md b/docs/v1/Ontologies/models/ObjectType.md new file mode 100644 index 000000000..09d25e913 --- /dev/null +++ b/docs/v1/Ontologies/models/ObjectType.md @@ -0,0 +1,19 @@ +# ObjectType + +Represents an object type in the Ontology. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**api_name** | ObjectTypeApiName | Yes | | +**legacy_object_type_id** | Optional[LegacyObjectTypeId] | No | | +**display_name** | Optional[DisplayName] | No | | +**status** | ReleaseStatus | Yes | | +**description** | Optional[str] | No | The description of the object type. | +**visibility** | Optional[ObjectTypeVisibility] | No | | +**primary_key** | List[PropertyApiName] | Yes | The primary key of the object. This is a list of properties that can be used to uniquely identify the object. | +**properties** | Dict[PropertyApiName, Property] | Yes | A map of the properties of the object type. | +**rid** | ObjectTypeRid | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/ObjectTypeApiName.md b/docs/v1/Ontologies/models/ObjectTypeApiName.md new file mode 100644 index 000000000..6d540a792 --- /dev/null +++ b/docs/v1/Ontologies/models/ObjectTypeApiName.md @@ -0,0 +1,13 @@ +# ObjectTypeApiName + +The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the +`List object types` endpoint or check the **Ontology Manager**. + + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/ObjectTypeRid.md b/docs/v1/Ontologies/models/ObjectTypeRid.md new file mode 100644 index 000000000..856cc8039 --- /dev/null +++ b/docs/v1/Ontologies/models/ObjectTypeRid.md @@ -0,0 +1,11 @@ +# ObjectTypeRid + +The unique resource identifier of an object type, useful for interacting with other Foundry APIs. + +## Type +```python +RID +``` + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/ObjectTypeVisibility.md b/docs/v1/Ontologies/models/ObjectTypeVisibility.md new file mode 100644 index 000000000..3d6da6b18 --- /dev/null +++ b/docs/v1/Ontologies/models/ObjectTypeVisibility.md @@ -0,0 +1,12 @@ +# ObjectTypeVisibility + +The suggested visibility of the object type. + +| **Value** | +| --------- | +| `"NORMAL"` | +| `"PROMINENT"` | +| `"HIDDEN"` | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/OneOfConstraint.md b/docs/v1/Ontologies/models/OneOfConstraint.md new file mode 100644 index 000000000..fd59530f9 --- /dev/null +++ b/docs/v1/Ontologies/models/OneOfConstraint.md @@ -0,0 +1,14 @@ +# OneOfConstraint + +The parameter has a manually predefined set of options. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**options** | List[ParameterOption] | Yes | | +**other_values_allowed** | bool | Yes | A flag denoting whether custom, user provided values will be considered valid. This is configured via the **Allowed "Other" value** toggle in the **Ontology Manager**. | +**type** | Literal["oneOf"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/Ontology.md b/docs/v1/Ontologies/models/Ontology.md new file mode 100644 index 000000000..ce97e4c6b --- /dev/null +++ b/docs/v1/Ontologies/models/Ontology.md @@ -0,0 +1,14 @@ +# Ontology + +Metadata about an Ontology. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**api_name** | OntologyApiName | Yes | | +**display_name** | DisplayName | Yes | | +**description** | str | Yes | | +**rid** | OntologyRid | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/OntologyApiName.md b/docs/v1/Ontologies/models/OntologyApiName.md new file mode 100644 index 000000000..e65cb1244 --- /dev/null +++ b/docs/v1/Ontologies/models/OntologyApiName.md @@ -0,0 +1,11 @@ +# OntologyApiName + +OntologyApiName + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/OntologyArrayType.md b/docs/v1/Ontologies/models/OntologyArrayType.md new file mode 100644 index 000000000..fc8597890 --- /dev/null +++ b/docs/v1/Ontologies/models/OntologyArrayType.md @@ -0,0 +1,12 @@ +# OntologyArrayType + +OntologyArrayType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**item_type** | OntologyDataType | Yes | | +**type** | Literal["array"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/OntologyDataType.md b/docs/v1/Ontologies/models/OntologyDataType.md new file mode 100644 index 000000000..edb96521f --- /dev/null +++ b/docs/v1/Ontologies/models/OntologyDataType.md @@ -0,0 +1,37 @@ +# OntologyDataType + +A union of all the primitive types used by Palantir's Ontology-based products. + + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +DateType | date +OntologyStructType | struct +OntologySetType | set +StringType | string +ByteType | byte +DoubleType | double +IntegerType | integer +FloatType | float +AnyType | any +LongType | long +BooleanType | boolean +CipherTextType | cipherText +MarkingType | marking +UnsupportedType | unsupported +OntologyArrayType | array +OntologyObjectSetType | objectSet +BinaryType | binary +ShortType | short +DecimalType | decimal +OntologyMapType | map +TimestampType | timestamp +OntologyObjectType | object + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/OntologyInterfaceObjectSetType.md b/docs/v1/Ontologies/models/OntologyInterfaceObjectSetType.md new file mode 100644 index 000000000..dab0b7c78 --- /dev/null +++ b/docs/v1/Ontologies/models/OntologyInterfaceObjectSetType.md @@ -0,0 +1,12 @@ +# OntologyInterfaceObjectSetType + +OntologyInterfaceObjectSetType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**interface_type_api_name** | InterfaceTypeApiName | Yes | | +**type** | Literal["interfaceObjectSet"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/OntologyInterfaceObjectType.md b/docs/v1/Ontologies/models/OntologyInterfaceObjectType.md new file mode 100644 index 000000000..ebfac3ec0 --- /dev/null +++ b/docs/v1/Ontologies/models/OntologyInterfaceObjectType.md @@ -0,0 +1,12 @@ +# OntologyInterfaceObjectType + +OntologyInterfaceObjectType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**interface_type_api_name** | Optional[InterfaceTypeApiName] | No | | +**type** | Literal["interfaceObject"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/OntologyMapType.md b/docs/v1/Ontologies/models/OntologyMapType.md new file mode 100644 index 000000000..e407de463 --- /dev/null +++ b/docs/v1/Ontologies/models/OntologyMapType.md @@ -0,0 +1,13 @@ +# OntologyMapType + +OntologyMapType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**key_type** | OntologyDataType | Yes | | +**value_type** | OntologyDataType | Yes | | +**type** | Literal["map"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/OntologyObject.md b/docs/v1/Ontologies/models/OntologyObject.md new file mode 100644 index 000000000..441362cfb --- /dev/null +++ b/docs/v1/Ontologies/models/OntologyObject.md @@ -0,0 +1,12 @@ +# OntologyObject + +Represents an object in the Ontology. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**properties** | Dict[PropertyApiName, Optional[PropertyValue]] | Yes | A map of the property values of the object. | +**rid** | ObjectRid | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/OntologyObjectSetType.md b/docs/v1/Ontologies/models/OntologyObjectSetType.md new file mode 100644 index 000000000..df56f6e64 --- /dev/null +++ b/docs/v1/Ontologies/models/OntologyObjectSetType.md @@ -0,0 +1,13 @@ +# OntologyObjectSetType + +OntologyObjectSetType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**object_api_name** | Optional[ObjectTypeApiName] | No | | +**object_type_api_name** | Optional[ObjectTypeApiName] | No | | +**type** | Literal["objectSet"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/OntologyObjectType.md b/docs/v1/Ontologies/models/OntologyObjectType.md new file mode 100644 index 000000000..c2c89353c --- /dev/null +++ b/docs/v1/Ontologies/models/OntologyObjectType.md @@ -0,0 +1,13 @@ +# OntologyObjectType + +OntologyObjectType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**object_api_name** | ObjectTypeApiName | Yes | | +**object_type_api_name** | ObjectTypeApiName | Yes | | +**type** | Literal["object"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/OntologyRid.md b/docs/v1/Ontologies/models/OntologyRid.md new file mode 100644 index 000000000..d8e557dfa --- /dev/null +++ b/docs/v1/Ontologies/models/OntologyRid.md @@ -0,0 +1,13 @@ +# OntologyRid + +The unique Resource Identifier (RID) of the Ontology. To look up your Ontology RID, please use the +`List ontologies` endpoint or check the **Ontology Manager**. + + +## Type +```python +RID +``` + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/OntologySetType.md b/docs/v1/Ontologies/models/OntologySetType.md new file mode 100644 index 000000000..f5f9a7015 --- /dev/null +++ b/docs/v1/Ontologies/models/OntologySetType.md @@ -0,0 +1,12 @@ +# OntologySetType + +OntologySetType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**item_type** | OntologyDataType | Yes | | +**type** | Literal["set"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/OntologyStructField.md b/docs/v1/Ontologies/models/OntologyStructField.md new file mode 100644 index 000000000..5abdb4d94 --- /dev/null +++ b/docs/v1/Ontologies/models/OntologyStructField.md @@ -0,0 +1,13 @@ +# OntologyStructField + +OntologyStructField + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**name** | StructFieldName | Yes | | +**field_type** | OntologyDataType | Yes | | +**required** | bool | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/OntologyStructType.md b/docs/v1/Ontologies/models/OntologyStructType.md new file mode 100644 index 000000000..7e9675ddb --- /dev/null +++ b/docs/v1/Ontologies/models/OntologyStructType.md @@ -0,0 +1,12 @@ +# OntologyStructType + +OntologyStructType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**fields** | List[OntologyStructField] | Yes | | +**type** | Literal["struct"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/OrQuery.md b/docs/v1/Ontologies/models/OrQuery.md new file mode 100644 index 000000000..596566b59 --- /dev/null +++ b/docs/v1/Ontologies/models/OrQuery.md @@ -0,0 +1,12 @@ +# OrQuery + +Returns objects where at least 1 query is satisfied. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**value** | List[SearchJsonQuery] | Yes | | +**type** | Literal["or"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/OrderBy.md b/docs/v1/Ontologies/models/OrderBy.md new file mode 100644 index 000000000..6be4a4a55 --- /dev/null +++ b/docs/v1/Ontologies/models/OrderBy.md @@ -0,0 +1,21 @@ +# OrderBy + +A command representing the list of properties to order by. Properties should be delimited by commas and +prefixed by `p` or `properties`. The format expected format is +`orderBy=properties.{property}:{sortDirection},properties.{property}:{sortDirection}...` + +By default, the ordering for a property is ascending, and this can be explicitly specified by appending +`:asc` (for ascending) or `:desc` (for descending). + +Example: use `orderBy=properties.lastName:asc` to order by a single property, +`orderBy=properties.lastName,properties.firstName,properties.age:desc` to order by multiple properties. +You may also use the shorthand `p` instead of `properties` such as `orderBy=p.lastName:asc`. + + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/Parameter.md b/docs/v1/Ontologies/models/Parameter.md new file mode 100644 index 000000000..e973d0131 --- /dev/null +++ b/docs/v1/Ontologies/models/Parameter.md @@ -0,0 +1,14 @@ +# Parameter + +Details about a parameter of an action or query. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**description** | Optional[str] | No | | +**base_type** | ValueType | Yes | | +**data_type** | Optional[OntologyDataType] | No | | +**required** | bool | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/ParameterEvaluatedConstraint.md b/docs/v1/Ontologies/models/ParameterEvaluatedConstraint.md new file mode 100644 index 000000000..62ee8e963 --- /dev/null +++ b/docs/v1/Ontologies/models/ParameterEvaluatedConstraint.md @@ -0,0 +1,42 @@ +# ParameterEvaluatedConstraint + +A constraint that an action parameter value must satisfy in order to be considered valid. +Constraints can be configured on action parameters in the **Ontology Manager**. +Applicable constraints are determined dynamically based on parameter inputs. +Parameter values are evaluated against the final set of constraints. + +The type of the constraint. +| Type | Description | +|-----------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| `arraySize` | The parameter expects an array of values and the size of the array must fall within the defined range. | +| `groupMember` | The parameter value must be the user id of a member belonging to at least one of the groups defined by the constraint. | +| `objectPropertyValue` | The parameter value must be a property value of an object found within an object set. | +| `objectQueryResult` | The parameter value must be the primary key of an object found within an object set. | +| `oneOf` | The parameter has a manually predefined set of options. | +| `range` | The parameter value must be within the defined range. | +| `stringLength` | The parameter value must have a length within the defined range. | +| `stringRegexMatch` | The parameter value must match a predefined regular expression. | +| `unevaluable` | The parameter cannot be evaluated because it depends on another parameter or object set that can't be evaluated. This can happen when a parameter's allowed values are defined by another parameter that is missing or invalid. | + + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +StructEvaluatedConstraint | struct +OneOfConstraint | oneOf +ArrayEvaluatedConstraint | array +GroupMemberConstraint | groupMember +ObjectPropertyValueConstraint | objectPropertyValue +RangeConstraint | range +ArraySizeConstraint | arraySize +ObjectQueryResultConstraint | objectQueryResult +StringLengthConstraint | stringLength +StringRegexMatchConstraint | stringRegexMatch +UnevaluableConstraint | unevaluable + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/ParameterEvaluationResult.md b/docs/v1/Ontologies/models/ParameterEvaluationResult.md new file mode 100644 index 000000000..2dc2f3579 --- /dev/null +++ b/docs/v1/Ontologies/models/ParameterEvaluationResult.md @@ -0,0 +1,13 @@ +# ParameterEvaluationResult + +Represents the validity of a parameter against the configured constraints. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**result** | ValidationResult | Yes | | +**evaluated_constraints** | List[ParameterEvaluatedConstraint] | Yes | | +**required** | bool | Yes | Represents whether the parameter is a required input to the action. | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/ParameterId.md b/docs/v1/Ontologies/models/ParameterId.md new file mode 100644 index 000000000..cb0f483b6 --- /dev/null +++ b/docs/v1/Ontologies/models/ParameterId.md @@ -0,0 +1,13 @@ +# ParameterId + +The unique identifier of the parameter. Parameters are used as inputs when an action or query is applied. +Parameters can be viewed and managed in the **Ontology Manager**. + + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/ParameterOption.md b/docs/v1/Ontologies/models/ParameterOption.md new file mode 100644 index 000000000..f7abdd481 --- /dev/null +++ b/docs/v1/Ontologies/models/ParameterOption.md @@ -0,0 +1,13 @@ +# ParameterOption + +A possible value for the parameter. This is defined in the **Ontology Manager** by Actions admins. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**display_name** | Optional[DisplayName] | No | | +**value** | Optional[Any] | No | An allowed configured value for a parameter within an action. | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/PhraseQuery.md b/docs/v1/Ontologies/models/PhraseQuery.md new file mode 100644 index 000000000..5bf4e66ee --- /dev/null +++ b/docs/v1/Ontologies/models/PhraseQuery.md @@ -0,0 +1,13 @@ +# PhraseQuery + +Returns objects where the specified field contains the provided value as a substring. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**field** | FieldNameV1 | Yes | | +**value** | str | Yes | | +**type** | Literal["phrase"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/PrefixQuery.md b/docs/v1/Ontologies/models/PrefixQuery.md new file mode 100644 index 000000000..0d01c4ef1 --- /dev/null +++ b/docs/v1/Ontologies/models/PrefixQuery.md @@ -0,0 +1,13 @@ +# PrefixQuery + +Returns objects where the specified field starts with the provided value. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**field** | FieldNameV1 | Yes | | +**value** | str | Yes | | +**type** | Literal["prefix"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/PrimaryKeyValue.md b/docs/v1/Ontologies/models/PrimaryKeyValue.md new file mode 100644 index 000000000..f3d549034 --- /dev/null +++ b/docs/v1/Ontologies/models/PrimaryKeyValue.md @@ -0,0 +1,11 @@ +# PrimaryKeyValue + +Represents the primary key value that is used as a unique identifier for an object. + +## Type +```python +Any +``` + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/Property.md b/docs/v1/Ontologies/models/Property.md new file mode 100644 index 000000000..9f878754c --- /dev/null +++ b/docs/v1/Ontologies/models/Property.md @@ -0,0 +1,14 @@ +# Property + +Details about some property of an object. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**description** | Optional[str] | No | | +**display_name** | Optional[DisplayName] | No | | +**base_type** | ValueType | Yes | | +**legacy_property_id** | Optional[LegacyPropertyId] | No | | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/PropertyApiName.md b/docs/v1/Ontologies/models/PropertyApiName.md new file mode 100644 index 000000000..2558e8a7a --- /dev/null +++ b/docs/v1/Ontologies/models/PropertyApiName.md @@ -0,0 +1,13 @@ +# PropertyApiName + +The name of the property in the API. To find the API name for your property, use the `Get object type` +endpoint or check the **Ontology Manager**. + + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/PropertyFilter.md b/docs/v1/Ontologies/models/PropertyFilter.md new file mode 100644 index 000000000..45b0f0482 --- /dev/null +++ b/docs/v1/Ontologies/models/PropertyFilter.md @@ -0,0 +1,36 @@ +# PropertyFilter + +Represents a filter used on properties. + +Endpoints that accept this supports optional parameters that have the form: +`properties.{propertyApiName}.{propertyFilter}={propertyValueEscapedString}` to filter the returned objects. +For instance, you may use `properties.firstName.eq=John` to find objects that contain a property called +"firstName" that has the exact value of "John". + +The following are a list of supported property filters: + +- `properties.{propertyApiName}.contains` - supported on arrays and can be used to filter array properties + that have at least one of the provided values. If multiple query parameters are provided, then objects + that have any of the given values for the specified property will be matched. +- `properties.{propertyApiName}.eq` - used to filter objects that have the exact value for the provided + property. If multiple query parameters are provided, then objects that have any of the given values + will be matched. For instance, if the user provides a request by doing + `?properties.firstName.eq=John&properties.firstName.eq=Anna`, then objects that have a firstName property + of either John or Anna will be matched. This filter is supported on all property types except Arrays. +- `properties.{propertyApiName}.neq` - used to filter objects that do not have the provided property values. + Similar to the `eq` filter, if multiple values are provided, then objects that have any of the given values + will be excluded from the result. +- `properties.{propertyApiName}.lt`, `properties.{propertyApiName}.lte`, `properties.{propertyApiName}.gt` + `properties.{propertyApiName}.gte` - represent less than, less than or equal to, greater than, and greater + than or equal to respectively. These are supported on date, timestamp, byte, integer, long, double, decimal. +- `properties.{propertyApiName}.isNull` - used to filter objects where the provided property is (or is not) null. + This filter is supported on all property types. + + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/PropertyId.md b/docs/v1/Ontologies/models/PropertyId.md new file mode 100644 index 000000000..582509617 --- /dev/null +++ b/docs/v1/Ontologies/models/PropertyId.md @@ -0,0 +1,13 @@ +# PropertyId + +The immutable ID of a property. Property IDs are only used to identify properties in the **Ontology Manager** +application and assign them API names. In every other case, API names should be used instead of property IDs. + + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/PropertyTypeRid.md b/docs/v1/Ontologies/models/PropertyTypeRid.md new file mode 100644 index 000000000..423380f08 --- /dev/null +++ b/docs/v1/Ontologies/models/PropertyTypeRid.md @@ -0,0 +1,11 @@ +# PropertyTypeRid + +PropertyTypeRid + +## Type +```python +RID +``` + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/PropertyValue.md b/docs/v1/Ontologies/models/PropertyValue.md new file mode 100644 index 000000000..d33e68550 --- /dev/null +++ b/docs/v1/Ontologies/models/PropertyValue.md @@ -0,0 +1,37 @@ +# PropertyValue + +Represents the value of a property in the following format. + +| Type | JSON encoding | Example | +|---------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------|----------------------------------------------------------------------------------------------------| +| Array | array | `["alpha", "bravo", "charlie"]` | +| [Attachment](https://palantir.com/docs/foundry/api/v2/ontologies-v2-resources/attachment-properties/attachment-property-basics/) | JSON encoded `AttachmentProperty` object | `{"rid":"ri.blobster.main.attachment.2f944bae-5851-4204-8615-920c969a9f2e"}` | +| Boolean | boolean | `true` | +| Byte | number | `31` | +| CipherText | string | `"CIPHER::ri.bellaso.main.cipher-channel.e414ab9e-b606-499a-a0e1-844fa296ba7e::unzjs3VifsTxuIpf1fH1CJ7OaPBr2bzMMdozPaZJtCii8vVG60yXIEmzoOJaEl9mfFFe::CIPHER"` | +| Date | ISO 8601 extended local date string | `"2021-05-01"` | +| Decimal | string | `"2.718281828"` | +| Double | number | `3.14159265` | +| Float | number | `3.14159265` | +| GeoPoint | geojson | `{"type":"Point","coordinates":[102.0,0.5]}` | +| GeoShape | geojson | `{"type":"LineString","coordinates":[[102.0,0.0],[103.0,1.0],[104.0,0.0],[105.0,1.0]]}` | +| Integer | number | `238940` | +| Long | string | `"58319870951433"` | +| [MediaReference](https://palantir.com/docs/foundry/api/v2/ontologies-v2-resources/media-reference-properties/media-reference-property-basics/)| JSON encoded `MediaReference` object | `{"mimeType":"application/pdf","reference":{"type":"mediaSetViewItem","mediaSetViewItem":{"mediaSetRid":"ri.mio.main.media-set.4153d42f-ca4b-4e42-8ca5-8e6aa7edb642","mediaSetViewRid":"ri.mio.main.view.82a798ad-d637-4595-acc6-987bcf16629b","mediaItemRid":"ri.mio.main.media-item.001ec98b-1620-4814-9e17-8e9c4e536225"}}}` | +| Short | number | `8739` | +| String | string | `"Call me Ishmael"` | +| Struct | JSON object of struct field API name -> value | {"firstName": "Alex", "lastName": "Karp"} | +| Timestamp | ISO 8601 extended offset date-time string in UTC zone | `"2021-01-04T05:00:00Z"` | +| [Timeseries](https://palantir.com/docs/foundry/api/v2/ontologies-v2-resources/time-series-properties/time-series-property-basics/) | JSON encoded `TimeseriesProperty` object or seriesId string | `{"seriesId": "wellPressureSeriesId", "syncRid": ri.time-series-catalog.main.sync.04f5ac1f-91bf-44f9-a51f-4f34e06e42df"}` or `{"templateRid": "ri.codex-emu.main.template.367cac64-e53b-4653-b111-f61856a63df9", "templateVersion": "0.0.0"}` or `"wellPressureSeriesId"`| | +| Vector | array | `[0.1, 0.3, 0.02, 0.05 , 0.8, 0.4]` | + +Note that for backwards compatibility, the Boolean, Byte, Double, Float, Integer, and Short types can also be encoded as JSON strings. + + +## Type +```python +Any +``` + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/PropertyValueEscapedString.md b/docs/v1/Ontologies/models/PropertyValueEscapedString.md new file mode 100644 index 000000000..ce51cd89a --- /dev/null +++ b/docs/v1/Ontologies/models/PropertyValueEscapedString.md @@ -0,0 +1,11 @@ +# PropertyValueEscapedString + +Represents the value of a property in string format. This is used in URL parameters. + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/QueryAggregationKeyType.md b/docs/v1/Ontologies/models/QueryAggregationKeyType.md new file mode 100644 index 000000000..d2d0b1649 --- /dev/null +++ b/docs/v1/Ontologies/models/QueryAggregationKeyType.md @@ -0,0 +1,22 @@ +# QueryAggregationKeyType + +A union of all the types supported by query aggregation keys. + + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +DateType | date +BooleanType | boolean +StringType | string +DoubleType | double +QueryAggregationRangeType | range +IntegerType | integer +TimestampType | timestamp + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/QueryAggregationRangeSubType.md b/docs/v1/Ontologies/models/QueryAggregationRangeSubType.md new file mode 100644 index 000000000..11aac0482 --- /dev/null +++ b/docs/v1/Ontologies/models/QueryAggregationRangeSubType.md @@ -0,0 +1,19 @@ +# QueryAggregationRangeSubType + +A union of all the types supported by query aggregation ranges. + + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +DateType | date +DoubleType | double +IntegerType | integer +TimestampType | timestamp + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/QueryAggregationRangeType.md b/docs/v1/Ontologies/models/QueryAggregationRangeType.md new file mode 100644 index 000000000..0fc4058bb --- /dev/null +++ b/docs/v1/Ontologies/models/QueryAggregationRangeType.md @@ -0,0 +1,12 @@ +# QueryAggregationRangeType + +QueryAggregationRangeType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**sub_type** | QueryAggregationRangeSubType | Yes | | +**type** | Literal["range"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/QueryAggregationValueType.md b/docs/v1/Ontologies/models/QueryAggregationValueType.md new file mode 100644 index 000000000..b98c83a60 --- /dev/null +++ b/docs/v1/Ontologies/models/QueryAggregationValueType.md @@ -0,0 +1,18 @@ +# QueryAggregationValueType + +A union of all the types supported by query aggregation keys. + + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +DateType | date +DoubleType | double +TimestampType | timestamp + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/QueryApiName.md b/docs/v1/Ontologies/models/QueryApiName.md new file mode 100644 index 000000000..c6578ab7c --- /dev/null +++ b/docs/v1/Ontologies/models/QueryApiName.md @@ -0,0 +1,12 @@ +# QueryApiName + +The name of the Query in the API. + + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/QueryArrayType.md b/docs/v1/Ontologies/models/QueryArrayType.md new file mode 100644 index 000000000..7c018e8a0 --- /dev/null +++ b/docs/v1/Ontologies/models/QueryArrayType.md @@ -0,0 +1,12 @@ +# QueryArrayType + +QueryArrayType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**sub_type** | QueryDataType | Yes | | +**type** | Literal["array"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/QueryDataType.md b/docs/v1/Ontologies/models/QueryDataType.md new file mode 100644 index 000000000..ad1712bba --- /dev/null +++ b/docs/v1/Ontologies/models/QueryDataType.md @@ -0,0 +1,37 @@ +# QueryDataType + +A union of all the types supported by Ontology Query parameters or outputs. + + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +DateType | date +OntologyInterfaceObjectType | interfaceObject +QueryStructType | struct +QuerySetType | set +StringType | string +EntrySetType | entrySet +DoubleType | double +IntegerType | integer +ThreeDimensionalAggregation | threeDimensionalAggregation +QueryUnionType | union +FloatType | float +LongType | long +BooleanType | boolean +UnsupportedType | unsupported +AttachmentType | attachment +NullType | null +QueryArrayType | array +OntologyObjectSetType | objectSet +TwoDimensionalAggregation | twoDimensionalAggregation +OntologyInterfaceObjectSetType | interfaceObjectSet +OntologyObjectType | object +TimestampType | timestamp + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/QueryRuntimeErrorParameter.md b/docs/v1/Ontologies/models/QueryRuntimeErrorParameter.md new file mode 100644 index 000000000..0cb6c16ce --- /dev/null +++ b/docs/v1/Ontologies/models/QueryRuntimeErrorParameter.md @@ -0,0 +1,11 @@ +# QueryRuntimeErrorParameter + +QueryRuntimeErrorParameter + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/QuerySetType.md b/docs/v1/Ontologies/models/QuerySetType.md new file mode 100644 index 000000000..378700e5c --- /dev/null +++ b/docs/v1/Ontologies/models/QuerySetType.md @@ -0,0 +1,12 @@ +# QuerySetType + +QuerySetType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**sub_type** | QueryDataType | Yes | | +**type** | Literal["set"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/QueryStructField.md b/docs/v1/Ontologies/models/QueryStructField.md new file mode 100644 index 000000000..765701f28 --- /dev/null +++ b/docs/v1/Ontologies/models/QueryStructField.md @@ -0,0 +1,12 @@ +# QueryStructField + +QueryStructField + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**name** | StructFieldName | Yes | | +**field_type** | QueryDataType | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/QueryStructType.md b/docs/v1/Ontologies/models/QueryStructType.md new file mode 100644 index 000000000..aea2be272 --- /dev/null +++ b/docs/v1/Ontologies/models/QueryStructType.md @@ -0,0 +1,12 @@ +# QueryStructType + +QueryStructType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**fields** | List[QueryStructField] | Yes | | +**type** | Literal["struct"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/QueryType.md b/docs/v1/Ontologies/models/QueryType.md new file mode 100644 index 000000000..ffd09a146 --- /dev/null +++ b/docs/v1/Ontologies/models/QueryType.md @@ -0,0 +1,17 @@ +# QueryType + +Represents a query type in the Ontology. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**api_name** | QueryApiName | Yes | | +**description** | Optional[str] | No | | +**display_name** | Optional[DisplayName] | No | | +**parameters** | Dict[ParameterId, Parameter] | Yes | | +**output** | Optional[OntologyDataType] | No | | +**rid** | FunctionRid | Yes | | +**version** | FunctionVersion | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/QueryUnionType.md b/docs/v1/Ontologies/models/QueryUnionType.md new file mode 100644 index 000000000..d0dc84a41 --- /dev/null +++ b/docs/v1/Ontologies/models/QueryUnionType.md @@ -0,0 +1,12 @@ +# QueryUnionType + +QueryUnionType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**union_types** | List[QueryDataType] | Yes | | +**type** | Literal["union"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/RangeConstraint.md b/docs/v1/Ontologies/models/RangeConstraint.md new file mode 100644 index 000000000..650260175 --- /dev/null +++ b/docs/v1/Ontologies/models/RangeConstraint.md @@ -0,0 +1,16 @@ +# RangeConstraint + +The parameter value must be within the defined range. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**lt** | Optional[Any] | No | Less than | +**lte** | Optional[Any] | No | Less than or equal | +**gt** | Optional[Any] | No | Greater than | +**gte** | Optional[Any] | No | Greater than or equal | +**type** | Literal["range"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/ReturnEditsMode.md b/docs/v1/Ontologies/models/ReturnEditsMode.md new file mode 100644 index 000000000..800a01212 --- /dev/null +++ b/docs/v1/Ontologies/models/ReturnEditsMode.md @@ -0,0 +1,12 @@ +# ReturnEditsMode + +ReturnEditsMode + +| **Value** | +| --------- | +| `"ALL"` | +| `"ALL_V2_WITH_DELETIONS"` | +| `"NONE"` | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/SdkPackageName.md b/docs/v1/Ontologies/models/SdkPackageName.md new file mode 100644 index 000000000..8d32c603f --- /dev/null +++ b/docs/v1/Ontologies/models/SdkPackageName.md @@ -0,0 +1,11 @@ +# SdkPackageName + +SdkPackageName + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/SdkPackageRid.md b/docs/v1/Ontologies/models/SdkPackageRid.md new file mode 100644 index 000000000..6f3a795df --- /dev/null +++ b/docs/v1/Ontologies/models/SdkPackageRid.md @@ -0,0 +1,11 @@ +# SdkPackageRid + +SdkPackageRid + +## Type +```python +RID +``` + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/SdkVersion.md b/docs/v1/Ontologies/models/SdkVersion.md new file mode 100644 index 000000000..c3025f864 --- /dev/null +++ b/docs/v1/Ontologies/models/SdkVersion.md @@ -0,0 +1,11 @@ +# SdkVersion + +SdkVersion + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/SearchJsonQuery.md b/docs/v1/Ontologies/models/SearchJsonQuery.md new file mode 100644 index 000000000..b7cf7d4ba --- /dev/null +++ b/docs/v1/Ontologies/models/SearchJsonQuery.md @@ -0,0 +1,28 @@ +# SearchJsonQuery + +SearchJsonQuery + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +OrQuery | or +PrefixQuery | prefix +LtQuery | lt +AllTermsQuery | allTerms +EqualsQuery | eq +GtQuery | gt +ContainsQuery | contains +NotQuery | not +PhraseQuery | phrase +AndQuery | and +IsNullQuery | isNull +GteQuery | gte +AnyTermQuery | anyTerm +LteQuery | lte + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/SearchObjectsRequest.md b/docs/v1/Ontologies/models/SearchObjectsRequest.md new file mode 100644 index 000000000..6361fa0e0 --- /dev/null +++ b/docs/v1/Ontologies/models/SearchObjectsRequest.md @@ -0,0 +1,15 @@ +# SearchObjectsRequest + +SearchObjectsRequest + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**query** | SearchJsonQuery | Yes | | +**order_by** | Optional[SearchOrderBy] | No | | +**page_size** | Optional[PageSize] | No | | +**page_token** | Optional[PageToken] | No | | +**fields** | List[PropertyApiName] | Yes | The API names of the object type properties to include in the response. | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/SearchObjectsResponse.md b/docs/v1/Ontologies/models/SearchObjectsResponse.md new file mode 100644 index 000000000..58c2996ef --- /dev/null +++ b/docs/v1/Ontologies/models/SearchObjectsResponse.md @@ -0,0 +1,13 @@ +# SearchObjectsResponse + +SearchObjectsResponse + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**data** | List[OntologyObject] | Yes | | +**next_page_token** | Optional[PageToken] | No | | +**total_count** | TotalCount | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/SearchOrderBy.md b/docs/v1/Ontologies/models/SearchOrderBy.md new file mode 100644 index 000000000..ea5f58c79 --- /dev/null +++ b/docs/v1/Ontologies/models/SearchOrderBy.md @@ -0,0 +1,11 @@ +# SearchOrderBy + +Specifies the ordering of search results by a field and an ordering direction. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**fields** | List[SearchOrdering] | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/SearchOrderByType.md b/docs/v1/Ontologies/models/SearchOrderByType.md new file mode 100644 index 000000000..1facca804 --- /dev/null +++ b/docs/v1/Ontologies/models/SearchOrderByType.md @@ -0,0 +1,11 @@ +# SearchOrderByType + +SearchOrderByType + +| **Value** | +| --------- | +| `"fields"` | +| `"relevance"` | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/SearchOrdering.md b/docs/v1/Ontologies/models/SearchOrdering.md new file mode 100644 index 000000000..ceb99e9e7 --- /dev/null +++ b/docs/v1/Ontologies/models/SearchOrdering.md @@ -0,0 +1,12 @@ +# SearchOrdering + +SearchOrdering + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**field** | FieldNameV1 | Yes | | +**direction** | Optional[str] | No | Specifies the ordering direction (can be either `asc` or `desc`) | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/SelectedPropertyApiName.md b/docs/v1/Ontologies/models/SelectedPropertyApiName.md new file mode 100644 index 000000000..a26d54593 --- /dev/null +++ b/docs/v1/Ontologies/models/SelectedPropertyApiName.md @@ -0,0 +1,30 @@ +# SelectedPropertyApiName + +By default, whenever an object is requested, all of its properties are returned, except for properties of the +following types: +- Vector + +The response can be filtered to only include certain properties using the `properties` query parameter. Note +that ontology object set endpoints refer to this parameter as `select`. + +Properties to include can be specified in one of two ways. + +- A comma delimited list as the value for the `properties` query parameter + `properties={property1ApiName},{property2ApiName}` +- Multiple `properties` query parameters. + `properties={property1ApiName}&properties={property2ApiName}` + +The primary key of the object will always be returned even if it wasn't specified in the `properties` values. + +Unknown properties specified in the `properties` list will result in a `PropertiesNotFound` error. + +To find the API name for your property, use the `Get object type` endpoint or check the **Ontology Manager**. + + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/SharedPropertyTypeApiName.md b/docs/v1/Ontologies/models/SharedPropertyTypeApiName.md new file mode 100644 index 000000000..b783312c3 --- /dev/null +++ b/docs/v1/Ontologies/models/SharedPropertyTypeApiName.md @@ -0,0 +1,13 @@ +# SharedPropertyTypeApiName + +The name of the shared property type in the API in lowerCamelCase format. To find the API name for your +shared property type, use the `List shared property types` endpoint or check the **Ontology Manager**. + + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/SharedPropertyTypeRid.md b/docs/v1/Ontologies/models/SharedPropertyTypeRid.md new file mode 100644 index 000000000..317ec6af6 --- /dev/null +++ b/docs/v1/Ontologies/models/SharedPropertyTypeRid.md @@ -0,0 +1,12 @@ +# SharedPropertyTypeRid + +The unique resource identifier of an shared property type, useful for interacting with other Foundry APIs. + + +## Type +```python +RID +``` + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/StringLengthConstraint.md b/docs/v1/Ontologies/models/StringLengthConstraint.md new file mode 100644 index 000000000..89081a91d --- /dev/null +++ b/docs/v1/Ontologies/models/StringLengthConstraint.md @@ -0,0 +1,17 @@ +# StringLengthConstraint + +The parameter value must have a length within the defined range. +*This range is always inclusive.* + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**lt** | Optional[Any] | No | Less than | +**lte** | Optional[Any] | No | Less than or equal | +**gt** | Optional[Any] | No | Greater than | +**gte** | Optional[Any] | No | Greater than or equal | +**type** | Literal["stringLength"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/StringRegexMatchConstraint.md b/docs/v1/Ontologies/models/StringRegexMatchConstraint.md new file mode 100644 index 000000000..ca80aaa31 --- /dev/null +++ b/docs/v1/Ontologies/models/StringRegexMatchConstraint.md @@ -0,0 +1,14 @@ +# StringRegexMatchConstraint + +The parameter value must match a predefined regular expression. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**regex** | str | Yes | The regular expression configured in the **Ontology Manager**. | +**configured_failure_message** | Optional[str] | No | The message indicating that the regular expression was not matched. This is configured per parameter in the **Ontology Manager**. | +**type** | Literal["stringRegexMatch"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/StructEvaluatedConstraint.md b/docs/v1/Ontologies/models/StructEvaluatedConstraint.md new file mode 100644 index 000000000..6976840e9 --- /dev/null +++ b/docs/v1/Ontologies/models/StructEvaluatedConstraint.md @@ -0,0 +1,12 @@ +# StructEvaluatedConstraint + +Represents the validity of a singleton struct parameter. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**struct_fields** | Dict[StructParameterFieldApiName, StructFieldEvaluationResult] | Yes | | +**type** | Literal["struct"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/StructFieldEvaluatedConstraint.md b/docs/v1/Ontologies/models/StructFieldEvaluatedConstraint.md new file mode 100644 index 000000000..e27d1c509 --- /dev/null +++ b/docs/v1/Ontologies/models/StructFieldEvaluatedConstraint.md @@ -0,0 +1,32 @@ +# StructFieldEvaluatedConstraint + +A constraint that an action struct parameter field value must satisfy in order to be considered valid. +Constraints can be configured on fields of struct parameters in the **Ontology Manager**. +Applicable constraints are determined dynamically based on parameter inputs. +Parameter values are evaluated against the final set of constraints. + +The type of the constraint. +| Type | Description | +|-----------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| `oneOf` | The struct parameter field has a manually predefined set of options. | +| `range` | The struct parameter field value must be within the defined range. | +| `stringLength` | The struct parameter field value must have a length within the defined range. | +| `stringRegexMatch` | The struct parameter field value must match a predefined regular expression. | +| `objectQueryResult` | The struct parameter field value must be the primary key of an object found within an object set. | + + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +OneOfConstraint | oneOf +RangeConstraint | range +ObjectQueryResultConstraint | objectQueryResult +StringLengthConstraint | stringLength +StringRegexMatchConstraint | stringRegexMatch + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/StructFieldEvaluationResult.md b/docs/v1/Ontologies/models/StructFieldEvaluationResult.md new file mode 100644 index 000000000..a07ccc14e --- /dev/null +++ b/docs/v1/Ontologies/models/StructFieldEvaluationResult.md @@ -0,0 +1,13 @@ +# StructFieldEvaluationResult + +Represents the validity of a struct parameter's fields against the configured constraints. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**result** | ValidationResult | Yes | | +**evaluated_constraints** | List[StructFieldEvaluatedConstraint] | Yes | | +**required** | bool | Yes | Represents whether the parameter is a required input to the action. | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/StructParameterFieldApiName.md b/docs/v1/Ontologies/models/StructParameterFieldApiName.md new file mode 100644 index 000000000..06c232d1c --- /dev/null +++ b/docs/v1/Ontologies/models/StructParameterFieldApiName.md @@ -0,0 +1,12 @@ +# StructParameterFieldApiName + +The unique identifier of the struct parameter field. + + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/SubmissionCriteriaEvaluation.md b/docs/v1/Ontologies/models/SubmissionCriteriaEvaluation.md new file mode 100644 index 000000000..b3b47b61f --- /dev/null +++ b/docs/v1/Ontologies/models/SubmissionCriteriaEvaluation.md @@ -0,0 +1,15 @@ +# SubmissionCriteriaEvaluation + +Contains the status of the **submission criteria**. +**Submission criteria** are the prerequisites that need to be satisfied before an Action can be applied. +These are configured in the **Ontology Manager**. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**configured_failure_message** | Optional[str] | No | The message indicating one of the **submission criteria** was not satisfied. This is configured per **submission criteria** in the **Ontology Manager**. | +**result** | ValidationResult | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/SumAggregation.md b/docs/v1/Ontologies/models/SumAggregation.md new file mode 100644 index 000000000..39b9466a5 --- /dev/null +++ b/docs/v1/Ontologies/models/SumAggregation.md @@ -0,0 +1,13 @@ +# SumAggregation + +Computes the sum of values for the provided field. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**field** | FieldNameV1 | Yes | | +**name** | Optional[AggregationMetricName] | No | | +**type** | Literal["sum"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/ThreeDimensionalAggregation.md b/docs/v1/Ontologies/models/ThreeDimensionalAggregation.md new file mode 100644 index 000000000..e82f23994 --- /dev/null +++ b/docs/v1/Ontologies/models/ThreeDimensionalAggregation.md @@ -0,0 +1,13 @@ +# ThreeDimensionalAggregation + +ThreeDimensionalAggregation + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**key_type** | QueryAggregationKeyType | Yes | | +**value_type** | TwoDimensionalAggregation | Yes | | +**type** | Literal["threeDimensionalAggregation"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/TwoDimensionalAggregation.md b/docs/v1/Ontologies/models/TwoDimensionalAggregation.md new file mode 100644 index 000000000..f5cb32b2e --- /dev/null +++ b/docs/v1/Ontologies/models/TwoDimensionalAggregation.md @@ -0,0 +1,13 @@ +# TwoDimensionalAggregation + +TwoDimensionalAggregation + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**key_type** | QueryAggregationKeyType | Yes | | +**value_type** | QueryAggregationValueType | Yes | | +**type** | Literal["twoDimensionalAggregation"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/UnevaluableConstraint.md b/docs/v1/Ontologies/models/UnevaluableConstraint.md new file mode 100644 index 000000000..d155f31fa --- /dev/null +++ b/docs/v1/Ontologies/models/UnevaluableConstraint.md @@ -0,0 +1,13 @@ +# UnevaluableConstraint + +The parameter cannot be evaluated because it depends on another parameter or object set that can't be evaluated. +This can happen when a parameter's allowed values are defined by another parameter that is missing or invalid. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["unevaluable"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/UniqueIdentifierLinkId.md b/docs/v1/Ontologies/models/UniqueIdentifierLinkId.md new file mode 100644 index 000000000..37788e43d --- /dev/null +++ b/docs/v1/Ontologies/models/UniqueIdentifierLinkId.md @@ -0,0 +1,12 @@ +# UniqueIdentifierLinkId + +A reference to a UniqueIdentifierArgument linkId defined for this action type. + + +## Type +```python +UUID +``` + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/ValidateActionRequest.md b/docs/v1/Ontologies/models/ValidateActionRequest.md new file mode 100644 index 000000000..f568a5e0b --- /dev/null +++ b/docs/v1/Ontologies/models/ValidateActionRequest.md @@ -0,0 +1,11 @@ +# ValidateActionRequest + +ValidateActionRequest + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**parameters** | Dict[ParameterId, Optional[DataValue]] | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/ValidateActionResponse.md b/docs/v1/Ontologies/models/ValidateActionResponse.md new file mode 100644 index 000000000..fbb0e9111 --- /dev/null +++ b/docs/v1/Ontologies/models/ValidateActionResponse.md @@ -0,0 +1,13 @@ +# ValidateActionResponse + +ValidateActionResponse + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**result** | ValidationResult | Yes | | +**submission_criteria** | List[SubmissionCriteriaEvaluation] | Yes | | +**parameters** | Dict[ParameterId, ParameterEvaluationResult] | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/ValidationResult.md b/docs/v1/Ontologies/models/ValidationResult.md new file mode 100644 index 000000000..bf5f86d0d --- /dev/null +++ b/docs/v1/Ontologies/models/ValidationResult.md @@ -0,0 +1,12 @@ +# ValidationResult + +Represents the state of a validation. + + +| **Value** | +| --------- | +| `"VALID"` | +| `"INVALID"` | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/ValueType.md b/docs/v1/Ontologies/models/ValueType.md new file mode 100644 index 000000000..76a754593 --- /dev/null +++ b/docs/v1/Ontologies/models/ValueType.md @@ -0,0 +1,34 @@ +# ValueType + +A string indicating the type of each data value. Note that these types can be nested, for example an array of +structs. + +| Type | JSON value | +|---------------------|-------------------------------------------------------------------------------------------------------------------| +| Array | `Array`, where `T` is the type of the array elements, e.g. `Array`. | +| Attachment | `Attachment` | +| Boolean | `Boolean` | +| Byte | `Byte` | +| CipherText | `CipherText` | +| Date | `LocalDate` | +| Decimal | `Decimal` | +| Double | `Double` | +| Float | `Float` | +| Integer | `Integer` | +| Long | `Long` | +| Marking | `Marking` | +| OntologyObject | `OntologyObject` where `T` is the API name of the referenced object type. | +| Short | `Short` | +| String | `String` | +| Struct | `Struct` where `T` contains field name and type pairs, e.g. `Struct<{ firstName: String, lastName: string }>` | +| Timeseries | `TimeSeries` where `T` is either `String` for an enum series or `Double` for a numeric series. | +| Timestamp | `Timestamp` | + + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/ValueTypeApiName.md b/docs/v1/Ontologies/models/ValueTypeApiName.md new file mode 100644 index 000000000..12121f2b9 --- /dev/null +++ b/docs/v1/Ontologies/models/ValueTypeApiName.md @@ -0,0 +1,11 @@ +# ValueTypeApiName + +The name of the value type in the API in camelCase format. + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/ValueTypeRid.md b/docs/v1/Ontologies/models/ValueTypeRid.md new file mode 100644 index 000000000..56461f4a4 --- /dev/null +++ b/docs/v1/Ontologies/models/ValueTypeRid.md @@ -0,0 +1,11 @@ +# ValueTypeRid + +ValueTypeRid + +## Type +```python +RID +``` + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/AuthenticationProvider.md b/docs/v2/Admin/AuthenticationProvider.md new file mode 100644 index 000000000..0abd28c8e --- /dev/null +++ b/docs/v2/Admin/AuthenticationProvider.md @@ -0,0 +1,278 @@ +# AuthenticationProvider + +Method | HTTP request | Release Stage | +------------- | ------------- | ----- | +[**get**](#get) | **GET** /v2/admin/enrollments/{enrollmentRid}/authenticationProviders/{authenticationProviderRid} | Public Beta | +[**list**](#list) | **GET** /v2/admin/enrollments/{enrollmentRid}/authenticationProviders | Public Beta | +[**preregister_group**](#preregister_group) | **POST** /v2/admin/enrollments/{enrollmentRid}/authenticationProviders/{authenticationProviderRid}/preregisterGroup | Public Beta | +[**preregister_user**](#preregister_user) | **POST** /v2/admin/enrollments/{enrollmentRid}/authenticationProviders/{authenticationProviderRid}/preregisterUser | Public Beta | + +# **get** +Get the AuthenticationProvider with the specified rid. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**enrollment_rid** | EnrollmentRid | | | +**authentication_provider_rid** | AuthenticationProviderRid | | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**AuthenticationProvider** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# EnrollmentRid +enrollment_rid = None +# AuthenticationProviderRid +authentication_provider_rid = "ri.control-panel.main.saml.3faf689c-eaa1-4137-851f-81d58afe4c86" +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.admin.Enrollment.AuthenticationProvider.get( + enrollment_rid, authentication_provider_rid, preview=preview + ) + print("The get response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling AuthenticationProvider.get: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | AuthenticationProvider | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **list** +Lists all AuthenticationProviders. + + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**enrollment_rid** | EnrollmentRid | | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**ListAuthenticationProvidersResponse** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# EnrollmentRid +enrollment_rid = None +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.admin.Enrollment.AuthenticationProvider.list( + enrollment_rid, preview=preview + ) + print("The list response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling AuthenticationProvider.list: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | ListAuthenticationProvidersResponse | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **preregister_group** +Register a Group with a given name before any users with this group log in through this Authentication Provider. +Preregistered groups can be used anywhere other groups are used in the platform. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**enrollment_rid** | EnrollmentRid | | | +**authentication_provider_rid** | AuthenticationProviderRid | | | +**name** | GroupName | | | +**organizations** | List[OrganizationRid] | The RIDs of the Organizations that can view this group. | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**PrincipalId** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# EnrollmentRid +enrollment_rid = None +# AuthenticationProviderRid +authentication_provider_rid = "ri.control-panel.main.saml.3faf689c-eaa1-4137-851f-81d58afe4c86" +# GroupName +name = "Data Source Admins" +# List[OrganizationRid] | The RIDs of the Organizations that can view this group. +organizations = ["ri.multipass..organization.c30ee6ad-b5e4-4afe-a74f-fe4a289f2faa"] +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.admin.Enrollment.AuthenticationProvider.preregister_group( + enrollment_rid, + authentication_provider_rid, + name=name, + organizations=organizations, + preview=preview, + ) + print("The preregister_group response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling AuthenticationProvider.preregister_group: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | PrincipalId | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **preregister_user** +Register a User with a given username before they log in to the platform for the first time through this +Authentication Provider. Preregistered users can be assigned to groups and roles prior to first login. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**enrollment_rid** | EnrollmentRid | | | +**authentication_provider_rid** | AuthenticationProviderRid | | | +**organization** | OrganizationRid | The RID of the user's primary Organization. This may be changed when the user logs in for the first time depending on any configured Organization assignment rules. | | +**username** | UserUsername | The new user's username. This must match one of the provider's supported username patterns. | | +**attributes** | Optional[Dict[AttributeName, AttributeValues]] | | [optional] | +**email** | Optional[str] | | [optional] | +**family_name** | Optional[str] | | [optional] | +**given_name** | Optional[str] | | [optional] | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**PrincipalId** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# EnrollmentRid +enrollment_rid = None +# AuthenticationProviderRid +authentication_provider_rid = "ri.control-panel.main.saml.3faf689c-eaa1-4137-851f-81d58afe4c86" +# OrganizationRid | The RID of the user's primary Organization. This may be changed when the user logs in for the first time depending on any configured Organization assignment rules. +organization = "ri.multipass..organization.c30ee6ad-b5e4-4afe-a74f-fe4a289f2faa" +# UserUsername | The new user's username. This must match one of the provider's supported username patterns. +username = "jsmith" +# Optional[Dict[AttributeName, AttributeValues]] +attributes = { + "multipass:givenName": ["John"], + "multipass:familyName": ["Smith"], + "multipass:email:primary": ["jsmith@example.com"], + "multipass:realm": ["eab0a251-ca1a-4a84-a482-200edfb8026f"], + "multipass:organization-rid": [ + "ri.multipass..organization.c30ee6ad-b5e4-4afe-a74f-fe4a289f2faa" + ], + "department": ["Finance"], + "jobTitle": ["Accountant"], +} +# Optional[str] +email = "jsmith@example.com" +# Optional[str] +family_name = "Smith" +# Optional[str] +given_name = "John" +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.admin.Enrollment.AuthenticationProvider.preregister_user( + enrollment_rid, + authentication_provider_rid, + organization=organization, + username=username, + attributes=attributes, + email=email, + family_name=family_name, + given_name=given_name, + preview=preview, + ) + print("The preregister_user response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling AuthenticationProvider.preregister_user: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | PrincipalId | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + diff --git a/docs/v2/Admin/Enrollment.md b/docs/v2/Admin/Enrollment.md new file mode 100644 index 000000000..729dc0743 --- /dev/null +++ b/docs/v2/Admin/Enrollment.md @@ -0,0 +1,105 @@ +# Enrollment + +Method | HTTP request | Release Stage | +------------- | ------------- | ----- | +[**get**](#get) | **GET** /v2/admin/enrollments/{enrollmentRid} | Private Beta | +[**get_current**](#get_current) | **GET** /v2/admin/enrollments/getCurrent | Private Beta | + +# **get** +Get the Enrollment with the specified rid. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**enrollment_rid** | EnrollmentRid | | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**Enrollment** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# EnrollmentRid +enrollment_rid = None +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.admin.Enrollment.get(enrollment_rid, preview=preview) + print("The get response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Enrollment.get: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | Enrollment | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **get_current** +Returns the Enrollment associated with the current User's primary organization. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**Enrollment** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.admin.Enrollment.get_current(preview=preview) + print("The get_current response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Enrollment.get_current: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | Enrollment | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + diff --git a/docs/v2/Admin/EnrollmentRoleAssignment.md b/docs/v2/Admin/EnrollmentRoleAssignment.md new file mode 100644 index 000000000..47b979289 --- /dev/null +++ b/docs/v2/Admin/EnrollmentRoleAssignment.md @@ -0,0 +1,183 @@ +# EnrollmentRoleAssignment + +Method | HTTP request | Release Stage | +------------- | ------------- | ----- | +[**add**](#add) | **POST** /v2/admin/enrollments/{enrollmentRid}/roleAssignments/add | Private Beta | +[**list**](#list) | **GET** /v2/admin/enrollments/{enrollmentRid}/roleAssignments | Private Beta | +[**remove**](#remove) | **POST** /v2/admin/enrollments/{enrollmentRid}/roleAssignments/remove | Private Beta | + +# **add** +Assign roles to principals for the given Enrollment. At most 100 role assignments can be added in a single request. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**enrollment_rid** | EnrollmentRid | | | +**role_assignments** | List[RoleAssignmentUpdate] | | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**None** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# EnrollmentRid +enrollment_rid = None +# List[RoleAssignmentUpdate] +role_assignments = [ + { + "roleId": "8bf49052-dc37-4528-8bf0-b551cfb71268", + "principalId": "f05f8da4-b84c-4fca-9c77-8af0b13d11de", + } +] +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.admin.Enrollment.EnrollmentRoleAssignment.add( + enrollment_rid, role_assignments=role_assignments, preview=preview + ) + print("The add response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling EnrollmentRoleAssignment.add: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**204** | None | | None | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **list** +List all principals who are assigned a role for the given Enrollment. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**enrollment_rid** | EnrollmentRid | | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**ListEnrollmentRoleAssignmentsResponse** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# EnrollmentRid +enrollment_rid = None +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.admin.Enrollment.EnrollmentRoleAssignment.list( + enrollment_rid, preview=preview + ) + print("The list response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling EnrollmentRoleAssignment.list: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | ListEnrollmentRoleAssignmentsResponse | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **remove** +Remove roles from principals for the given Enrollment. At most 100 role assignments can be removed in a single request. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**enrollment_rid** | EnrollmentRid | | | +**role_assignments** | List[RoleAssignmentUpdate] | | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**None** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# EnrollmentRid +enrollment_rid = None +# List[RoleAssignmentUpdate] +role_assignments = [ + { + "roleId": "8bf49052-dc37-4528-8bf0-b551cfb71268", + "principalId": "f05f8da4-b84c-4fca-9c77-8af0b13d11de", + } +] +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.admin.Enrollment.EnrollmentRoleAssignment.remove( + enrollment_rid, role_assignments=role_assignments, preview=preview + ) + print("The remove response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling EnrollmentRoleAssignment.remove: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**204** | None | | None | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + diff --git a/docs/v2/Admin/Group.md b/docs/v2/Admin/Group.md new file mode 100644 index 000000000..a20feba39 --- /dev/null +++ b/docs/v2/Admin/Group.md @@ -0,0 +1,329 @@ +# Group + +Method | HTTP request | Release Stage | +------------- | ------------- | ----- | +[**create**](#create) | **POST** /v2/admin/groups | Stable | +[**delete**](#delete) | **DELETE** /v2/admin/groups/{groupId} | Stable | +[**get**](#get) | **GET** /v2/admin/groups/{groupId} | Stable | +[**get_batch**](#get_batch) | **POST** /v2/admin/groups/getBatch | Stable | +[**list**](#list) | **GET** /v2/admin/groups | Stable | +[**search**](#search) | **POST** /v2/admin/groups/search | Stable | + +# **create** +Creates a new Group. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**attributes** | Dict[AttributeName, AttributeValues] | A map of the Group's attributes. Attributes prefixed with "multipass:" are reserved for internal use by Foundry and are subject to change. | | +**name** | GroupName | The name of the Group. | | +**organizations** | List[OrganizationRid] | The RIDs of the Organizations whose members can see this group. At least one Organization RID must be listed. | | +**description** | Optional[str] | A description of the Group. | [optional] | + +### Return type +**Group** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# Dict[AttributeName, AttributeValues] | A map of the Group's attributes. Attributes prefixed with "multipass:" are reserved for internal use by Foundry and are subject to change. +attributes = { + "multipass:givenName": ["John"], + "multipass:familyName": ["Smith"], + "multipass:email:primary": ["jsmith@example.com"], + "multipass:realm": ["eab0a251-ca1a-4a84-a482-200edfb8026f"], + "multipass:organization-rid": [ + "ri.multipass..organization.c30ee6ad-b5e4-4afe-a74f-fe4a289f2faa" + ], + "department": ["Finance"], + "jobTitle": ["Accountant"], +} +# GroupName | The name of the Group. +name = "Data Source Admins" +# List[OrganizationRid] | The RIDs of the Organizations whose members can see this group. At least one Organization RID must be listed. +organizations = ["ri.multipass..organization.c30ee6ad-b5e4-4afe-a74f-fe4a289f2faa"] +# Optional[str] | A description of the Group. +description = "Create and modify data sources in the platform" + + +try: + api_response = client.admin.Group.create( + attributes=attributes, name=name, organizations=organizations, description=description + ) + print("The create response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Group.create: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | Group | The created Group | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **delete** +Delete the Group with the specified id. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**group_id** | GroupId | | | + +### Return type +**None** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# GroupId +group_id = None + + +try: + api_response = client.admin.Group.delete(group_id) + print("The delete response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Group.delete: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**204** | None | | None | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **get** +Get the Group with the specified id. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**group_id** | GroupId | | | + +### Return type +**Group** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# GroupId +group_id = None + + +try: + api_response = client.admin.Group.get(group_id) + print("The get response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Group.get: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | Group | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **get_batch** +Execute multiple get requests on Group. + +The maximum batch size for this endpoint is 500. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**body** | List[GetGroupsBatchRequestElement] | Body of the request | | + +### Return type +**GetGroupsBatchResponse** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# List[GetGroupsBatchRequestElement] | Body of the request +body = [{"groupId": "0d1fe74e-2b70-4a93-9b1a-80070637788b"}] + + +try: + api_response = client.admin.Group.get_batch(body) + print("The get_batch response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Group.get_batch: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | GetGroupsBatchResponse | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **list** +Lists all Groups. + +This is a paged endpoint. Each page may be smaller or larger than the requested page size. However, it is guaranteed that if there are more results available, the `nextPageToken` field will be populated. To get the next page, make the same request again, but set the value of the `pageToken` query parameter to be value of the `nextPageToken` value of the previous response. If there is no `nextPageToken` field in the response, you are on the last page. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**page_size** | Optional[PageSize] | The page size to use for the endpoint. | [optional] | +**page_token** | Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. | [optional] | + +### Return type +**ListGroupsResponse** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# Optional[PageSize] | The page size to use for the endpoint. +page_size = None +# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. +page_token = None + + +try: + for group in client.admin.Group.list(page_size=page_size, page_token=page_token): + pprint(group) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Group.list: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | ListGroupsResponse | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **search** +Perform a case-insensitive prefix search for groups based on group name. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**where** | GroupSearchFilter | | | +**page_size** | Optional[PageSize] | | [optional] | +**page_token** | Optional[PageToken] | | [optional] | + +### Return type +**SearchGroupsResponse** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# GroupSearchFilter +where = {"type": "queryString", "value": "jsmith"} +# Optional[PageSize] +page_size = 100 +# Optional[PageToken] +page_token = "v1.QnVpbGQgdGhlIEZ1dHVyZTogaHR0cHM6Ly93d3cucGFsYW50aXIuY29tL2NhcmVlcnMvP2xldmVyLXNvdXJjZSU1YiU1ZD1BUElEb2NzI29wZW4tcG9zaXRpb25z" + + +try: + api_response = client.admin.Group.search( + where=where, page_size=page_size, page_token=page_token + ) + print("The search response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Group.search: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | SearchGroupsResponse | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + diff --git a/docs/v2/Admin/GroupMember.md b/docs/v2/Admin/GroupMember.md new file mode 100644 index 000000000..37e9566f7 --- /dev/null +++ b/docs/v2/Admin/GroupMember.md @@ -0,0 +1,177 @@ +# GroupMember + +Method | HTTP request | Release Stage | +------------- | ------------- | ----- | +[**add**](#add) | **POST** /v2/admin/groups/{groupId}/groupMembers/add | Stable | +[**list**](#list) | **GET** /v2/admin/groups/{groupId}/groupMembers | Stable | +[**remove**](#remove) | **POST** /v2/admin/groups/{groupId}/groupMembers/remove | Stable | + +# **add** + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**group_id** | GroupId | | | +**principal_ids** | List[PrincipalId] | | | +**expiration** | Optional[GroupMembershipExpiration] | | [optional] | + +### Return type +**None** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# GroupId +group_id = None +# List[PrincipalId] +principal_ids = ["f05f8da4-b84c-4fca-9c77-8af0b13d11de"] +# Optional[GroupMembershipExpiration] +expiration = "2026-01-31T00:00:00.000Z" + + +try: + api_response = client.admin.Group.GroupMember.add( + group_id, principal_ids=principal_ids, expiration=expiration + ) + print("The add response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling GroupMember.add: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**204** | None | | None | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **list** +Lists all members (which can be a User or a Group) of a given Group. + +This is a paged endpoint. Each page may be smaller or larger than the requested page size. However, +it is guaranteed that if there are more results available, the `nextPageToken` field will be populated. +To get the next page, make the same request again, but set the value of the `pageToken` query parameter +to be value of the `nextPageToken` value of the previous response. If there is no `nextPageToken` field +in the response, you are on the last page. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**group_id** | GroupId | | | +**page_size** | Optional[PageSize] | The page size to use for the endpoint. | [optional] | +**page_token** | Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. | [optional] | +**transitive** | Optional[bool] | When true, includes the transitive members of groups contained within this group. For example, say the Group has member Group A, and Group A has member User B. If `transitive=false` only Group A will be returned, but if `transitive=true` then Group A and User B will be returned. This will recursively resolve Groups through all layers of nesting. Defaults to false. | [optional] | + +### Return type +**ListGroupMembersResponse** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# GroupId +group_id = None +# Optional[PageSize] | The page size to use for the endpoint. +page_size = None +# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. +page_token = None +# Optional[bool] | When true, includes the transitive members of groups contained within this group. For example, say the Group has member Group A, and Group A has member User B. If `transitive=false` only Group A will be returned, but if `transitive=true` then Group A and User B will be returned. This will recursively resolve Groups through all layers of nesting. Defaults to false. +transitive = None + + +try: + for group_member in client.admin.Group.GroupMember.list( + group_id, page_size=page_size, page_token=page_token, transitive=transitive + ): + pprint(group_member) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling GroupMember.list: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | ListGroupMembersResponse | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **remove** + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**group_id** | GroupId | | | +**principal_ids** | List[PrincipalId] | | | + +### Return type +**None** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# GroupId +group_id = None +# List[PrincipalId] +principal_ids = ["f05f8da4-b84c-4fca-9c77-8af0b13d11de"] + + +try: + api_response = client.admin.Group.GroupMember.remove(group_id, principal_ids=principal_ids) + print("The remove response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling GroupMember.remove: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**204** | None | | None | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + diff --git a/docs/v2/Admin/GroupMembership.md b/docs/v2/Admin/GroupMembership.md new file mode 100644 index 000000000..46d477806 --- /dev/null +++ b/docs/v2/Admin/GroupMembership.md @@ -0,0 +1,70 @@ +# GroupMembership + +Method | HTTP request | Release Stage | +------------- | ------------- | ----- | +[**list**](#list) | **GET** /v2/admin/users/{userId}/groupMemberships | Stable | + +# **list** +Lists all Groups a given User is a member of. + +This is a paged endpoint. Each page may be smaller or larger than the requested page size. However, +it is guaranteed that if there are more results available, the `nextPageToken` field will be populated. +To get the next page, make the same request again, but set the value of the `pageToken` query parameter +to be value of the `nextPageToken` value of the previous response. If there is no `nextPageToken` field +in the response, you are on the last page. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**user_id** | UserId | | | +**page_size** | Optional[PageSize] | The page size to use for the endpoint. | [optional] | +**page_token** | Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. | [optional] | +**transitive** | Optional[bool] | When true, includes the transitive memberships of the Groups the User is a member of. For example, say the User is a member of Group A, and Group A is a member of Group B. If `transitive=false` only Group A will be returned, but if `transitive=true` then Groups A and B will be returned. This will recursively resolve Groups through all layers of nesting. Defaults to false. | [optional] | + +### Return type +**ListGroupMembershipsResponse** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# UserId +user_id = None +# Optional[PageSize] | The page size to use for the endpoint. +page_size = None +# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. +page_token = None +# Optional[bool] | When true, includes the transitive memberships of the Groups the User is a member of. For example, say the User is a member of Group A, and Group A is a member of Group B. If `transitive=false` only Group A will be returned, but if `transitive=true` then Groups A and B will be returned. This will recursively resolve Groups through all layers of nesting. Defaults to false. +transitive = None + + +try: + for group_membership in client.admin.User.GroupMembership.list( + user_id, page_size=page_size, page_token=page_token, transitive=transitive + ): + pprint(group_membership) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling GroupMembership.list: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | ListGroupMembershipsResponse | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + diff --git a/docs/v2/Admin/GroupMembershipExpirationPolicy.md b/docs/v2/Admin/GroupMembershipExpirationPolicy.md new file mode 100644 index 000000000..af151a256 --- /dev/null +++ b/docs/v2/Admin/GroupMembershipExpirationPolicy.md @@ -0,0 +1,115 @@ +# GroupMembershipExpirationPolicy + +Method | HTTP request | Release Stage | +------------- | ------------- | ----- | +[**get**](#get) | **GET** /v2/admin/groups/{groupId}/membershipExpirationPolicy | Public Beta | +[**replace**](#replace) | **PUT** /v2/admin/groups/{groupId}/membershipExpirationPolicy | Public Beta | + +# **get** +Get the GroupMembershipExpirationPolicy. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**group_id** | GroupId | | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**GroupMembershipExpirationPolicy** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# GroupId +group_id = None +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.admin.Group.MembershipExpirationPolicy.get(group_id, preview=preview) + print("The get response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling MembershipExpirationPolicy.get: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | GroupMembershipExpirationPolicy | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **replace** +Replace the GroupMembershipExpirationPolicy. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**group_id** | GroupId | | | +**maximum_duration** | Optional[DurationSeconds] | Members in this group must be added with expirations that are less than this duration in seconds into the future from the time they are added. | [optional] | +**maximum_value** | Optional[GroupMembershipExpiration] | Members in this group must be added with expiration times that occur before this value. | [optional] | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**GroupMembershipExpirationPolicy** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# GroupId +group_id = None +# Optional[DurationSeconds] | Members in this group must be added with expirations that are less than this duration in seconds into the future from the time they are added. +maximum_duration = 30 +# Optional[GroupMembershipExpiration] | Members in this group must be added with expiration times that occur before this value. +maximum_value = "2026-01-31T00:00:00.000Z" +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.admin.Group.MembershipExpirationPolicy.replace( + group_id, maximum_duration=maximum_duration, maximum_value=maximum_value, preview=preview + ) + print("The replace response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling MembershipExpirationPolicy.replace: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | GroupMembershipExpirationPolicy | The replaced GroupMembershipExpirationPolicy | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + diff --git a/docs/v2/Admin/GroupProviderInfo.md b/docs/v2/Admin/GroupProviderInfo.md new file mode 100644 index 000000000..bce925d09 --- /dev/null +++ b/docs/v2/Admin/GroupProviderInfo.md @@ -0,0 +1,112 @@ +# GroupProviderInfo + +Method | HTTP request | Release Stage | +------------- | ------------- | ----- | +[**get**](#get) | **GET** /v2/admin/groups/{groupId}/providerInfo | Public Beta | +[**replace**](#replace) | **PUT** /v2/admin/groups/{groupId}/providerInfo | Public Beta | + +# **get** +Get the GroupProviderInfo. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**group_id** | GroupId | | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**GroupProviderInfo** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# GroupId +group_id = None +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.admin.Group.ProviderInfo.get(group_id, preview=preview) + print("The get response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling ProviderInfo.get: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | GroupProviderInfo | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **replace** +Replace the GroupProviderInfo. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**group_id** | GroupId | | | +**provider_id** | ProviderId | The ID of the Group in the external authentication provider. This value is determined by the authentication provider. At most one Group can have a given provider ID in a given Realm. | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**GroupProviderInfo** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# GroupId +group_id = None +# ProviderId | The ID of the Group in the external authentication provider. This value is determined by the authentication provider. At most one Group can have a given provider ID in a given Realm. +provider_id = "2838c8f3-d76a-4e99-acf1-1dee537e4c48" +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.admin.Group.ProviderInfo.replace( + group_id, provider_id=provider_id, preview=preview + ) + print("The replace response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling ProviderInfo.replace: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | GroupProviderInfo | The replaced GroupProviderInfo | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + diff --git a/docs/v2/Admin/Host.md b/docs/v2/Admin/Host.md new file mode 100644 index 000000000..051da92c4 --- /dev/null +++ b/docs/v2/Admin/Host.md @@ -0,0 +1,65 @@ +# Host + +Method | HTTP request | Release Stage | +------------- | ------------- | ----- | +[**list**](#list) | **GET** /v2/admin/enrollments/{enrollmentRid}/hosts | Private Beta | + +# **list** +Lists all Hosts. + +This is a paged endpoint. Each page may be smaller or larger than the requested page size. However, it is guaranteed that if there are more results available, the `nextPageToken` field will be populated. To get the next page, make the same request again, but set the value of the `pageToken` query parameter to be value of the `nextPageToken` value of the previous response. If there is no `nextPageToken` field in the response, you are on the last page. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**enrollment_rid** | EnrollmentRid | | | +**page_size** | Optional[PageSize] | The page size to use for the endpoint. | [optional] | +**page_token** | Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. | [optional] | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**ListHostsResponse** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# EnrollmentRid +enrollment_rid = None +# Optional[PageSize] | The page size to use for the endpoint. +page_size = None +# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. +page_token = None +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + for host in client.admin.Enrollment.Host.list( + enrollment_rid, page_size=page_size, page_token=page_token, preview=preview + ): + pprint(host) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Host.list: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | ListHostsResponse | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + diff --git a/docs/v2/Admin/Marking.md b/docs/v2/Admin/Marking.md new file mode 100644 index 000000000..f9d0fd30d --- /dev/null +++ b/docs/v2/Admin/Marking.md @@ -0,0 +1,295 @@ +# Marking + +Method | HTTP request | Release Stage | +------------- | ------------- | ----- | +[**create**](#create) | **POST** /v2/admin/markings | Public Beta | +[**get**](#get) | **GET** /v2/admin/markings/{markingId} | Public Beta | +[**get_batch**](#get_batch) | **POST** /v2/admin/markings/getBatch | Public Beta | +[**list**](#list) | **GET** /v2/admin/markings | Public Beta | +[**replace**](#replace) | **PUT** /v2/admin/markings/{markingId} | Public Beta | + +# **create** +Creates a new Marking. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**category_id** | MarkingCategoryId | | | +**initial_members** | List[PrincipalId] | Users and Groups that will be able to view resources protected by this Marking. This can be changed later through the MarkingMember operations. | | +**initial_role_assignments** | List[MarkingRoleUpdate] | The initial roles that will be assigned when the Marking is created. At least one ADMIN role must be provided. This can be changed later through the MarkingRoleAssignment operations. WARNING: If you do not include your own principal ID or the ID of a Group that you are a member of, you will create a Marking that you cannot administer. | | +**name** | MarkingName | | | +**description** | Optional[str] | | [optional] | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**Marking** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# MarkingCategoryId +category_id = "0950264e-01c8-4e83-81a9-1a6b7f77621a" +# List[PrincipalId] | Users and Groups that will be able to view resources protected by this Marking. This can be changed later through the MarkingMember operations. +initial_members = ["f05f8da4-b84c-4fca-9c77-8af0b13d11de"] +# List[MarkingRoleUpdate] | The initial roles that will be assigned when the Marking is created. At least one ADMIN role must be provided. This can be changed later through the MarkingRoleAssignment operations. WARNING: If you do not include your own principal ID or the ID of a Group that you are a member of, you will create a Marking that you cannot administer. +initial_role_assignments = [ + {"role": "ADMINISTER", "principalId": "f05f8da4-b84c-4fca-9c77-8af0b13d11de"} +] +# MarkingName +name = "PII" +# Optional[str] +description = "Contains personally identifiable information about our customers" +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.admin.Marking.create( + category_id=category_id, + initial_members=initial_members, + initial_role_assignments=initial_role_assignments, + name=name, + description=description, + preview=preview, + ) + print("The create response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Marking.create: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | Marking | The created Marking | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **get** +Get the Marking with the specified id. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**marking_id** | MarkingId | | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**Marking** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# MarkingId +marking_id = None +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.admin.Marking.get(marking_id, preview=preview) + print("The get response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Marking.get: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | Marking | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **get_batch** +Execute multiple get requests on Marking. + +The maximum batch size for this endpoint is 500. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**body** | List[GetMarkingsBatchRequestElement] | Body of the request | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**GetMarkingsBatchResponse** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# List[GetMarkingsBatchRequestElement] | Body of the request +body = [{"markingId": "18212f9a-0e63-4b79-96a0-aae04df23336"}] +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.admin.Marking.get_batch(body, preview=preview) + print("The get_batch response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Marking.get_batch: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | GetMarkingsBatchResponse | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **list** +Maximum page size 100. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**page_size** | Optional[PageSize] | The page size to use for the endpoint. | [optional] | +**page_token** | Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. | [optional] | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**ListMarkingsResponse** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# Optional[PageSize] | The page size to use for the endpoint. +page_size = None +# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. +page_token = None +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + for marking in client.admin.Marking.list( + page_size=page_size, page_token=page_token, preview=preview + ): + pprint(marking) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Marking.list: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | ListMarkingsResponse | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **replace** +Replace the Marking with the specified id. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**marking_id** | MarkingId | | | +**name** | MarkingName | | | +**description** | Optional[str] | | [optional] | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**Marking** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# MarkingId +marking_id = None +# MarkingName +name = "PII" +# Optional[str] +description = "Contains personally identifiable information about our customers" +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.admin.Marking.replace( + marking_id, name=name, description=description, preview=preview + ) + print("The replace response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Marking.replace: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | Marking | The replaced Marking | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + diff --git a/docs/v2/Admin/MarkingCategory.md b/docs/v2/Admin/MarkingCategory.md new file mode 100644 index 000000000..86669436a --- /dev/null +++ b/docs/v2/Admin/MarkingCategory.md @@ -0,0 +1,111 @@ +# MarkingCategory + +Method | HTTP request | Release Stage | +------------- | ------------- | ----- | +[**get**](#get) | **GET** /v2/admin/markingCategories/{markingCategoryId} | Public Beta | +[**list**](#list) | **GET** /v2/admin/markingCategories | Public Beta | + +# **get** +Get the MarkingCategory with the specified id. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**marking_category_id** | MarkingCategoryId | | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**MarkingCategory** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# MarkingCategoryId +marking_category_id = None +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.admin.MarkingCategory.get(marking_category_id, preview=preview) + print("The get response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling MarkingCategory.get: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | MarkingCategory | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **list** +Maximum page size 100. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**page_size** | Optional[PageSize] | The page size to use for the endpoint. | [optional] | +**page_token** | Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. | [optional] | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**ListMarkingCategoriesResponse** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# Optional[PageSize] | The page size to use for the endpoint. +page_size = None +# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. +page_token = None +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + for marking_category in client.admin.MarkingCategory.list( + page_size=page_size, page_token=page_token, preview=preview + ): + pprint(marking_category) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling MarkingCategory.list: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | ListMarkingCategoriesResponse | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + diff --git a/docs/v2/Admin/MarkingMember.md b/docs/v2/Admin/MarkingMember.md new file mode 100644 index 000000000..1fd35fec4 --- /dev/null +++ b/docs/v2/Admin/MarkingMember.md @@ -0,0 +1,169 @@ +# MarkingMember + +Method | HTTP request | Release Stage | +------------- | ------------- | ----- | +[**add**](#add) | **POST** /v2/admin/markings/{markingId}/markingMembers/add | Stable | +[**list**](#list) | **GET** /v2/admin/markings/{markingId}/markingMembers | Stable | +[**remove**](#remove) | **POST** /v2/admin/markings/{markingId}/markingMembers/remove | Stable | + +# **add** + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**marking_id** | MarkingId | | | +**principal_ids** | List[PrincipalId] | | | + +### Return type +**None** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# MarkingId +marking_id = None +# List[PrincipalId] +principal_ids = ["f05f8da4-b84c-4fca-9c77-8af0b13d11de"] + + +try: + api_response = client.admin.Marking.MarkingMember.add(marking_id, principal_ids=principal_ids) + print("The add response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling MarkingMember.add: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**204** | None | | None | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **list** +Lists all principals who can view resources protected by the given Marking. Ignores the `pageSize` parameter. +Requires `api:admin-write` because only marking administrators can view marking members. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**marking_id** | MarkingId | | | +**page_size** | Optional[PageSize] | The page size to use for the endpoint. | [optional] | +**page_token** | Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. | [optional] | +**transitive** | Optional[bool] | When true, includes the transitive members of groups contained within groups that are members of this Marking. For example, say the Marking has member Group A, and Group A has member User B. If `transitive=false` only Group A will be returned, but if `transitive=true` then Group A and User B will be returned. This will recursively resolve Groups through all layers of nesting. Defaults to false. | [optional] | + +### Return type +**ListMarkingMembersResponse** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# MarkingId +marking_id = None +# Optional[PageSize] | The page size to use for the endpoint. +page_size = None +# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. +page_token = None +# Optional[bool] | When true, includes the transitive members of groups contained within groups that are members of this Marking. For example, say the Marking has member Group A, and Group A has member User B. If `transitive=false` only Group A will be returned, but if `transitive=true` then Group A and User B will be returned. This will recursively resolve Groups through all layers of nesting. Defaults to false. +transitive = None + + +try: + for marking_member in client.admin.Marking.MarkingMember.list( + marking_id, page_size=page_size, page_token=page_token, transitive=transitive + ): + pprint(marking_member) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling MarkingMember.list: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | ListMarkingMembersResponse | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **remove** + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**marking_id** | MarkingId | | | +**principal_ids** | List[PrincipalId] | | | + +### Return type +**None** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# MarkingId +marking_id = None +# List[PrincipalId] +principal_ids = ["f05f8da4-b84c-4fca-9c77-8af0b13d11de"] + + +try: + api_response = client.admin.Marking.MarkingMember.remove( + marking_id, principal_ids=principal_ids + ) + print("The remove response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling MarkingMember.remove: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**204** | None | | None | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + diff --git a/docs/v2/Admin/MarkingRoleAssignment.md b/docs/v2/Admin/MarkingRoleAssignment.md new file mode 100644 index 000000000..4319fe914 --- /dev/null +++ b/docs/v2/Admin/MarkingRoleAssignment.md @@ -0,0 +1,167 @@ +# MarkingRoleAssignment + +Method | HTTP request | Release Stage | +------------- | ------------- | ----- | +[**add**](#add) | **POST** /v2/admin/markings/{markingId}/roleAssignments/add | Stable | +[**list**](#list) | **GET** /v2/admin/markings/{markingId}/roleAssignments | Stable | +[**remove**](#remove) | **POST** /v2/admin/markings/{markingId}/roleAssignments/remove | Stable | + +# **add** + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**marking_id** | MarkingId | | | +**role_assignments** | List[MarkingRoleUpdate] | | | + +### Return type +**None** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# MarkingId +marking_id = None +# List[MarkingRoleUpdate] +role_assignments = [{"role": "ADMINISTER", "principalId": "f05f8da4-b84c-4fca-9c77-8af0b13d11de"}] + + +try: + api_response = client.admin.Marking.MarkingRoleAssignment.add( + marking_id, role_assignments=role_assignments + ) + print("The add response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling MarkingRoleAssignment.add: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**204** | None | | None | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **list** +List all principals who are assigned a role for the given Marking. Ignores the `pageSize` parameter. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**marking_id** | MarkingId | | | +**page_size** | Optional[PageSize] | The page size to use for the endpoint. | [optional] | +**page_token** | Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. | [optional] | + +### Return type +**ListMarkingRoleAssignmentsResponse** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# MarkingId +marking_id = None +# Optional[PageSize] | The page size to use for the endpoint. +page_size = None +# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. +page_token = None + + +try: + for marking_role_assignment in client.admin.Marking.MarkingRoleAssignment.list( + marking_id, page_size=page_size, page_token=page_token + ): + pprint(marking_role_assignment) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling MarkingRoleAssignment.list: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | ListMarkingRoleAssignmentsResponse | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **remove** + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**marking_id** | MarkingId | | | +**role_assignments** | List[MarkingRoleUpdate] | | | + +### Return type +**None** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# MarkingId +marking_id = None +# List[MarkingRoleUpdate] +role_assignments = [{"role": "ADMINISTER", "principalId": "f05f8da4-b84c-4fca-9c77-8af0b13d11de"}] + + +try: + api_response = client.admin.Marking.MarkingRoleAssignment.remove( + marking_id, role_assignments=role_assignments + ) + print("The remove response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling MarkingRoleAssignment.remove: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**204** | None | | None | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + diff --git a/docs/v2/Admin/Organization.md b/docs/v2/Admin/Organization.md new file mode 100644 index 000000000..5de2dbb37 --- /dev/null +++ b/docs/v2/Admin/Organization.md @@ -0,0 +1,240 @@ +# Organization + +Method | HTTP request | Release Stage | +------------- | ------------- | ----- | +[**create**](#create) | **POST** /v2/admin/organizations | Private Beta | +[**get**](#get) | **GET** /v2/admin/organizations/{organizationRid} | Public Beta | +[**list_available_roles**](#list_available_roles) | **GET** /v2/admin/organizations/{organizationRid}/listAvailableRoles | Public Beta | +[**replace**](#replace) | **PUT** /v2/admin/organizations/{organizationRid} | Public Beta | + +# **create** +Creates a new Organization. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**administrators** | List[PrincipalId] | The initial administrators of the Organization. At least one principal must be provided. | | +**enrollment_rid** | EnrollmentRid | The RID of the Enrollment that this Organization belongs to. This must be provided. | | +**name** | OrganizationName | | | +**description** | Optional[str] | | [optional] | +**host** | Optional[HostName] | The primary host name of the Organization. This should be used when constructing URLs for users of this Organization. | [optional] | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**Organization** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# List[PrincipalId] | The initial administrators of the Organization. At least one principal must be provided. +administrators = ["f05f8da4-b84c-4fca-9c77-8af0b13d11de"] +# EnrollmentRid | The RID of the Enrollment that this Organization belongs to. This must be provided. +enrollment_rid = "ri.control-panel.main.customer.466f812b-f974-4478-9d4f-90402cd3def6" +# OrganizationName +name = "Example Organization" +# Optional[str] +description = None +# Optional[HostName] | The primary host name of the Organization. This should be used when constructing URLs for users of this Organization. +host = "example.palantirfoundry.com" +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.admin.Organization.create( + administrators=administrators, + enrollment_rid=enrollment_rid, + name=name, + description=description, + host=host, + preview=preview, + ) + print("The create response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Organization.create: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | Organization | The created Organization | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **get** +Get the Organization with the specified rid. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**organization_rid** | OrganizationRid | | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**Organization** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# OrganizationRid +organization_rid = None +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.admin.Organization.get(organization_rid, preview=preview) + print("The get response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Organization.get: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | Organization | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **list_available_roles** +List all roles that can be assigned to a principal for the given Organization. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**organization_rid** | OrganizationRid | | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**ListAvailableOrganizationRolesResponse** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# OrganizationRid +organization_rid = None +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.admin.Organization.list_available_roles(organization_rid, preview=preview) + print("The list_available_roles response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Organization.list_available_roles: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | ListAvailableOrganizationRolesResponse | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **replace** +Replace the Organization with the specified rid. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**organization_rid** | OrganizationRid | | | +**name** | OrganizationName | | | +**description** | Optional[str] | | [optional] | +**host** | Optional[HostName] | The primary host name of the Organization. This should be used when constructing URLs for users of this Organization. | [optional] | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**Organization** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# OrganizationRid +organization_rid = None +# OrganizationName +name = "Example Organization" +# Optional[str] +description = None +# Optional[HostName] | The primary host name of the Organization. This should be used when constructing URLs for users of this Organization. +host = "example.palantirfoundry.com" +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.admin.Organization.replace( + organization_rid, name=name, description=description, host=host, preview=preview + ) + print("The replace response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Organization.replace: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | Organization | The replaced Organization | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + diff --git a/docs/v2/Admin/OrganizationRoleAssignment.md b/docs/v2/Admin/OrganizationRoleAssignment.md new file mode 100644 index 000000000..530c1d538 --- /dev/null +++ b/docs/v2/Admin/OrganizationRoleAssignment.md @@ -0,0 +1,183 @@ +# OrganizationRoleAssignment + +Method | HTTP request | Release Stage | +------------- | ------------- | ----- | +[**add**](#add) | **POST** /v2/admin/organizations/{organizationRid}/roleAssignments/add | Public Beta | +[**list**](#list) | **GET** /v2/admin/organizations/{organizationRid}/roleAssignments | Public Beta | +[**remove**](#remove) | **POST** /v2/admin/organizations/{organizationRid}/roleAssignments/remove | Public Beta | + +# **add** +Assign roles to principals for the given Organization. At most 100 role assignments can be added in a single request. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**organization_rid** | OrganizationRid | | | +**role_assignments** | List[RoleAssignmentUpdate] | | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**None** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# OrganizationRid +organization_rid = None +# List[RoleAssignmentUpdate] +role_assignments = [ + { + "roleId": "8bf49052-dc37-4528-8bf0-b551cfb71268", + "principalId": "f05f8da4-b84c-4fca-9c77-8af0b13d11de", + } +] +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.admin.Organization.OrganizationRoleAssignment.add( + organization_rid, role_assignments=role_assignments, preview=preview + ) + print("The add response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling OrganizationRoleAssignment.add: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**204** | None | | None | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **list** +List all principals who are assigned a role for the given Organization. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**organization_rid** | OrganizationRid | | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**ListOrganizationRoleAssignmentsResponse** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# OrganizationRid +organization_rid = None +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.admin.Organization.OrganizationRoleAssignment.list( + organization_rid, preview=preview + ) + print("The list response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling OrganizationRoleAssignment.list: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | ListOrganizationRoleAssignmentsResponse | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **remove** +Remove roles from principals for the given Organization. At most 100 role assignments can be removed in a single request. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**organization_rid** | OrganizationRid | | | +**role_assignments** | List[RoleAssignmentUpdate] | | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**None** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# OrganizationRid +organization_rid = None +# List[RoleAssignmentUpdate] +role_assignments = [ + { + "roleId": "8bf49052-dc37-4528-8bf0-b551cfb71268", + "principalId": "f05f8da4-b84c-4fca-9c77-8af0b13d11de", + } +] +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.admin.Organization.OrganizationRoleAssignment.remove( + organization_rid, role_assignments=role_assignments, preview=preview + ) + print("The remove response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling OrganizationRoleAssignment.remove: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**204** | None | | None | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + diff --git a/docs/v2/Admin/Role.md b/docs/v2/Admin/Role.md new file mode 100644 index 000000000..7ab3bf9b7 --- /dev/null +++ b/docs/v2/Admin/Role.md @@ -0,0 +1,109 @@ +# Role + +Method | HTTP request | Release Stage | +------------- | ------------- | ----- | +[**get**](#get) | **GET** /v2/admin/roles/{roleId} | Private Beta | +[**get_batch**](#get_batch) | **POST** /v2/admin/roles/getBatch | Private Beta | + +# **get** +Get the Role with the specified id. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**role_id** | RoleId | | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**Role** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# RoleId +role_id = None +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.admin.Role.get(role_id, preview=preview) + print("The get response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Role.get: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | Role | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **get_batch** +Execute multiple get requests on Role. + +The maximum batch size for this endpoint is 500. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**body** | List[GetRolesBatchRequestElement] | Body of the request | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**GetRolesBatchResponse** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# List[GetRolesBatchRequestElement] | Body of the request +body = [{"roleId": "8bf49052-dc37-4528-8bf0-b551cfb71268"}] +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.admin.Role.get_batch(body, preview=preview) + print("The get_batch response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Role.get_batch: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | GetRolesBatchResponse | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + diff --git a/docs/v2/Admin/User.md b/docs/v2/Admin/User.md new file mode 100644 index 000000000..3df5593b0 --- /dev/null +++ b/docs/v2/Admin/User.md @@ -0,0 +1,462 @@ +# User + +Method | HTTP request | Release Stage | +------------- | ------------- | ----- | +[**delete**](#delete) | **DELETE** /v2/admin/users/{userId} | Stable | +[**get**](#get) | **GET** /v2/admin/users/{userId} | Stable | +[**get_batch**](#get_batch) | **POST** /v2/admin/users/getBatch | Stable | +[**get_current**](#get_current) | **GET** /v2/admin/users/getCurrent | Stable | +[**get_markings**](#get_markings) | **GET** /v2/admin/users/{userId}/getMarkings | Public Beta | +[**list**](#list) | **GET** /v2/admin/users | Stable | +[**profile_picture**](#profile_picture) | **GET** /v2/admin/users/{userId}/profilePicture | Stable | +[**revoke_all_tokens**](#revoke_all_tokens) | **POST** /v2/admin/users/{userId}/revokeAllTokens | Public Beta | +[**search**](#search) | **POST** /v2/admin/users/search | Stable | + +# **delete** +Delete the User with the specified id. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**user_id** | UserId | | | + +### Return type +**None** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# UserId +user_id = None + + +try: + api_response = client.admin.User.delete(user_id) + print("The delete response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling User.delete: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**204** | None | | None | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **get** +Get the User with the specified id. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**user_id** | UserId | | | +**status** | Optional[UserStatus] | | [optional] | + +### Return type +**User** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# UserId +user_id = None +# Optional[UserStatus] +status = None + + +try: + api_response = client.admin.User.get(user_id, status=status) + print("The get response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling User.get: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | User | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **get_batch** +Execute multiple get requests on User. + +The maximum batch size for this endpoint is 500. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**body** | List[GetUsersBatchRequestElement] | Body of the request | | + +### Return type +**GetUsersBatchResponse** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# List[GetUsersBatchRequestElement] | Body of the request +body = [{"userId": "0d1fe74e-2b70-4a93-9b1a-80070637788b", "status": "ACTIVE"}] + + +try: + api_response = client.admin.User.get_batch(body) + print("The get_batch response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling User.get_batch: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | GetUsersBatchResponse | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **get_current** + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | + +### Return type +**User** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + + +try: + api_response = client.admin.User.get_current() + print("The get_current response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling User.get_current: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | User | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **get_markings** +Retrieve Markings that the user is currently a member of. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**user_id** | UserId | | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**GetUserMarkingsResponse** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# UserId +user_id = None +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.admin.User.get_markings(user_id, preview=preview) + print("The get_markings response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling User.get_markings: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | GetUserMarkingsResponse | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **list** +Lists all Users. + +This is a paged endpoint. Each page may be smaller or larger than the requested page size. However, it is guaranteed that if there are more results available, the `nextPageToken` field will be populated. To get the next page, make the same request again, but set the value of the `pageToken` query parameter to be value of the `nextPageToken` value of the previous response. If there is no `nextPageToken` field in the response, you are on the last page. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**include** | Optional[UserStatus] | | [optional] | +**page_size** | Optional[PageSize] | The page size to use for the endpoint. | [optional] | +**page_token** | Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. | [optional] | + +### Return type +**ListUsersResponse** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# Optional[UserStatus] +include = None +# Optional[PageSize] | The page size to use for the endpoint. +page_size = None +# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. +page_token = None + + +try: + for user in client.admin.User.list(include=include, page_size=page_size, page_token=page_token): + pprint(user) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling User.list: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | ListUsersResponse | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **profile_picture** + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**user_id** | UserId | | | + +### Return type +**Optional[bytes]** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# UserId +user_id = None + + +try: + api_response = client.admin.User.profile_picture(user_id) + print("The profile_picture response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling User.profile_picture: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | Optional[bytes] | The user's profile picture in binary format. The format is the original format uploaded by the user. The response will contain a `Content-Type` header that can be used to identify the media type. | application/octet-stream | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **revoke_all_tokens** +Revoke all active authentication tokens for the user including active browser sessions and long-lived +development tokens. If the user has active sessions in a browser, this will force re-authentication. + +The caller must have permission to manage users for the target user's organization. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**user_id** | UserId | | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**None** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# UserId +user_id = None +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.admin.User.revoke_all_tokens(user_id, preview=preview) + print("The revoke_all_tokens response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling User.revoke_all_tokens: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**204** | None | | None | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **search** +Perform a case-insensitive prefix search for users based on username, given name and family name. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**where** | UserSearchFilter | | | +**page_size** | Optional[PageSize] | | [optional] | +**page_token** | Optional[PageToken] | | [optional] | + +### Return type +**SearchUsersResponse** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# UserSearchFilter +where = {"type": "queryString", "value": "jsmith"} +# Optional[PageSize] +page_size = 100 +# Optional[PageToken] +page_token = "v1.QnVpbGQgdGhlIEZ1dHVyZTogaHR0cHM6Ly93d3cucGFsYW50aXIuY29tL2NhcmVlcnMvP2xldmVyLXNvdXJjZSU1YiU1ZD1BUElEb2NzI29wZW4tcG9zaXRpb25z" + + +try: + api_response = client.admin.User.search(where=where, page_size=page_size, page_token=page_token) + print("The search response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling User.search: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | SearchUsersResponse | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + diff --git a/docs/v2/Admin/UserProviderInfo.md b/docs/v2/Admin/UserProviderInfo.md new file mode 100644 index 000000000..f0a57fc09 --- /dev/null +++ b/docs/v2/Admin/UserProviderInfo.md @@ -0,0 +1,112 @@ +# UserProviderInfo + +Method | HTTP request | Release Stage | +------------- | ------------- | ----- | +[**get**](#get) | **GET** /v2/admin/users/{userId}/providerInfo | Public Beta | +[**replace**](#replace) | **PUT** /v2/admin/users/{userId}/providerInfo | Public Beta | + +# **get** +Get the UserProviderInfo. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**user_id** | UserId | | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**UserProviderInfo** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# UserId +user_id = None +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.admin.User.ProviderInfo.get(user_id, preview=preview) + print("The get response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling ProviderInfo.get: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | UserProviderInfo | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **replace** +Replace the UserProviderInfo. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**user_id** | UserId | | | +**provider_id** | ProviderId | The ID of the User in the external authentication provider. This value is determined by the authentication provider. At most one User can have a given provider ID in a given Realm. | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**UserProviderInfo** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# UserId +user_id = None +# ProviderId | The ID of the User in the external authentication provider. This value is determined by the authentication provider. At most one User can have a given provider ID in a given Realm. +provider_id = "2838c8f3-d76a-4e99-acf1-1dee537e4c48" +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.admin.User.ProviderInfo.replace( + user_id, provider_id=provider_id, preview=preview + ) + print("The replace response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling ProviderInfo.replace: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | UserProviderInfo | The replaced UserProviderInfo | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + diff --git a/docs/v2/Admin/models/AddEnrollmentRoleAssignmentsRequest.md b/docs/v2/Admin/models/AddEnrollmentRoleAssignmentsRequest.md new file mode 100644 index 000000000..c04156409 --- /dev/null +++ b/docs/v2/Admin/models/AddEnrollmentRoleAssignmentsRequest.md @@ -0,0 +1,11 @@ +# AddEnrollmentRoleAssignmentsRequest + +AddEnrollmentRoleAssignmentsRequest + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**role_assignments** | List[RoleAssignmentUpdate] | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/AddGroupMembersRequest.md b/docs/v2/Admin/models/AddGroupMembersRequest.md new file mode 100644 index 000000000..4eea28350 --- /dev/null +++ b/docs/v2/Admin/models/AddGroupMembersRequest.md @@ -0,0 +1,12 @@ +# AddGroupMembersRequest + +AddGroupMembersRequest + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**principal_ids** | List[PrincipalId] | Yes | | +**expiration** | Optional[GroupMembershipExpiration] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/AddMarkingMembersRequest.md b/docs/v2/Admin/models/AddMarkingMembersRequest.md new file mode 100644 index 000000000..4b0caa68a --- /dev/null +++ b/docs/v2/Admin/models/AddMarkingMembersRequest.md @@ -0,0 +1,11 @@ +# AddMarkingMembersRequest + +AddMarkingMembersRequest + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**principal_ids** | List[PrincipalId] | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/AddMarkingRoleAssignmentsRequest.md b/docs/v2/Admin/models/AddMarkingRoleAssignmentsRequest.md new file mode 100644 index 000000000..4182cebb4 --- /dev/null +++ b/docs/v2/Admin/models/AddMarkingRoleAssignmentsRequest.md @@ -0,0 +1,11 @@ +# AddMarkingRoleAssignmentsRequest + +AddMarkingRoleAssignmentsRequest + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**role_assignments** | List[MarkingRoleUpdate] | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/AddOrganizationRoleAssignmentsRequest.md b/docs/v2/Admin/models/AddOrganizationRoleAssignmentsRequest.md new file mode 100644 index 000000000..3b5d5e7d1 --- /dev/null +++ b/docs/v2/Admin/models/AddOrganizationRoleAssignmentsRequest.md @@ -0,0 +1,11 @@ +# AddOrganizationRoleAssignmentsRequest + +AddOrganizationRoleAssignmentsRequest + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**role_assignments** | List[RoleAssignmentUpdate] | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/AttributeName.md b/docs/v2/Admin/models/AttributeName.md new file mode 100644 index 000000000..e7f098330 --- /dev/null +++ b/docs/v2/Admin/models/AttributeName.md @@ -0,0 +1,11 @@ +# AttributeName + +AttributeName + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/AttributeValue.md b/docs/v2/Admin/models/AttributeValue.md new file mode 100644 index 000000000..cdd793463 --- /dev/null +++ b/docs/v2/Admin/models/AttributeValue.md @@ -0,0 +1,11 @@ +# AttributeValue + +AttributeValue + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/AttributeValues.md b/docs/v2/Admin/models/AttributeValues.md new file mode 100644 index 000000000..8bd2ad76e --- /dev/null +++ b/docs/v2/Admin/models/AttributeValues.md @@ -0,0 +1,11 @@ +# AttributeValues + +AttributeValues + +## Type +```python +List[AttributeValue] +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/AuthenticationProtocol.md b/docs/v2/Admin/models/AuthenticationProtocol.md new file mode 100644 index 000000000..016859b16 --- /dev/null +++ b/docs/v2/Admin/models/AuthenticationProtocol.md @@ -0,0 +1,16 @@ +# AuthenticationProtocol + +AuthenticationProtocol + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +SamlAuthenticationProtocol | saml +OidcAuthenticationProtocol | oidc + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/AuthenticationProvider.md b/docs/v2/Admin/models/AuthenticationProvider.md new file mode 100644 index 000000000..a750e827c --- /dev/null +++ b/docs/v2/Admin/models/AuthenticationProvider.md @@ -0,0 +1,17 @@ +# AuthenticationProvider + +AuthenticationProvider + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**rid** | AuthenticationProviderRid | Yes | | +**name** | AuthenticationProviderName | Yes | | +**realm** | Realm | Yes | | +**enabled** | AuthenticationProviderEnabled | Yes | Whether users can log in using this provider. | +**supported_hosts** | List[HostName] | Yes | This provider can only be utilized from these hosts. | +**supported_username_patterns** | List[str] | Yes | Users who enter usernames that match these patterns will be redirected to this authentication provider. | +**protocol** | AuthenticationProtocol | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/AuthenticationProviderEnabled.md b/docs/v2/Admin/models/AuthenticationProviderEnabled.md new file mode 100644 index 000000000..a2b6b6386 --- /dev/null +++ b/docs/v2/Admin/models/AuthenticationProviderEnabled.md @@ -0,0 +1,11 @@ +# AuthenticationProviderEnabled + +Whether users can log in using this provider. + +## Type +```python +bool +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/AuthenticationProviderName.md b/docs/v2/Admin/models/AuthenticationProviderName.md new file mode 100644 index 000000000..71ca1d118 --- /dev/null +++ b/docs/v2/Admin/models/AuthenticationProviderName.md @@ -0,0 +1,11 @@ +# AuthenticationProviderName + +AuthenticationProviderName + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/AuthenticationProviderRid.md b/docs/v2/Admin/models/AuthenticationProviderRid.md new file mode 100644 index 000000000..743ea3ab0 --- /dev/null +++ b/docs/v2/Admin/models/AuthenticationProviderRid.md @@ -0,0 +1,11 @@ +# AuthenticationProviderRid + +AuthenticationProviderRid + +## Type +```python +RID +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/CertificateInfo.md b/docs/v2/Admin/models/CertificateInfo.md new file mode 100644 index 000000000..539ee069d --- /dev/null +++ b/docs/v2/Admin/models/CertificateInfo.md @@ -0,0 +1,14 @@ +# CertificateInfo + +CertificateInfo + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**pem_certificate** | str | Yes | The certificate, in PEM format. | +**common_name** | Optional[str] | No | | +**expiry_date** | datetime | Yes | | +**usage_type** | CertificateUsageType | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/CertificateUsageType.md b/docs/v2/Admin/models/CertificateUsageType.md new file mode 100644 index 000000000..f46ee7b6a --- /dev/null +++ b/docs/v2/Admin/models/CertificateUsageType.md @@ -0,0 +1,12 @@ +# CertificateUsageType + +CertificateUsageType + +| **Value** | +| --------- | +| `"ENCRYPTION"` | +| `"SIGNING"` | +| `"UNSPECIFIED"` | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/CreateGroupRequest.md b/docs/v2/Admin/models/CreateGroupRequest.md new file mode 100644 index 000000000..3df810b24 --- /dev/null +++ b/docs/v2/Admin/models/CreateGroupRequest.md @@ -0,0 +1,14 @@ +# CreateGroupRequest + +CreateGroupRequest + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**name** | GroupName | Yes | The name of the Group. | +**organizations** | List[OrganizationRid] | Yes | The RIDs of the Organizations whose members can see this group. At least one Organization RID must be listed. | +**description** | Optional[str] | No | A description of the Group. | +**attributes** | Dict[AttributeName, AttributeValues] | Yes | A map of the Group's attributes. Attributes prefixed with "multipass:" are reserved for internal use by Foundry and are subject to change. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/CreateMarkingRequest.md b/docs/v2/Admin/models/CreateMarkingRequest.md new file mode 100644 index 000000000..2690fb3e0 --- /dev/null +++ b/docs/v2/Admin/models/CreateMarkingRequest.md @@ -0,0 +1,15 @@ +# CreateMarkingRequest + +CreateMarkingRequest + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**initial_role_assignments** | List[MarkingRoleUpdate] | Yes | The initial roles that will be assigned when the Marking is created. At least one ADMIN role must be provided. This can be changed later through the MarkingRoleAssignment operations. WARNING: If you do not include your own principal ID or the ID of a Group that you are a member of, you will create a Marking that you cannot administer. | +**initial_members** | List[PrincipalId] | Yes | Users and Groups that will be able to view resources protected by this Marking. This can be changed later through the MarkingMember operations. | +**name** | MarkingName | Yes | | +**description** | Optional[str] | No | | +**category_id** | MarkingCategoryId | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/CreateOrganizationRequest.md b/docs/v2/Admin/models/CreateOrganizationRequest.md new file mode 100644 index 000000000..c804d8f4a --- /dev/null +++ b/docs/v2/Admin/models/CreateOrganizationRequest.md @@ -0,0 +1,15 @@ +# CreateOrganizationRequest + +CreateOrganizationRequest + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**administrators** | List[PrincipalId] | Yes | The initial administrators of the Organization. At least one principal must be provided. | +**enrollment_rid** | EnrollmentRid | Yes | The RID of the Enrollment that this Organization belongs to. This must be provided. | +**name** | OrganizationName | Yes | | +**host** | Optional[HostName] | No | The primary host name of the Organization. This should be used when constructing URLs for users of this Organization. | +**description** | Optional[str] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/Enrollment.md b/docs/v2/Admin/models/Enrollment.md new file mode 100644 index 000000000..30061d8ef --- /dev/null +++ b/docs/v2/Admin/models/Enrollment.md @@ -0,0 +1,13 @@ +# Enrollment + +Enrollment + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**rid** | EnrollmentRid | Yes | | +**name** | EnrollmentName | Yes | | +**created_time** | Optional[CreatedTime] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/EnrollmentName.md b/docs/v2/Admin/models/EnrollmentName.md new file mode 100644 index 000000000..037384fd9 --- /dev/null +++ b/docs/v2/Admin/models/EnrollmentName.md @@ -0,0 +1,11 @@ +# EnrollmentName + +EnrollmentName + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/EnrollmentRoleAssignment.md b/docs/v2/Admin/models/EnrollmentRoleAssignment.md new file mode 100644 index 000000000..e5a1f1146 --- /dev/null +++ b/docs/v2/Admin/models/EnrollmentRoleAssignment.md @@ -0,0 +1,13 @@ +# EnrollmentRoleAssignment + +EnrollmentRoleAssignment + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**principal_type** | PrincipalType | Yes | | +**principal_id** | PrincipalId | Yes | | +**role_id** | RoleId | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/GetGroupsBatchRequestElement.md b/docs/v2/Admin/models/GetGroupsBatchRequestElement.md new file mode 100644 index 000000000..3d4089808 --- /dev/null +++ b/docs/v2/Admin/models/GetGroupsBatchRequestElement.md @@ -0,0 +1,11 @@ +# GetGroupsBatchRequestElement + +GetGroupsBatchRequestElement + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**group_id** | GroupId | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/GetGroupsBatchResponse.md b/docs/v2/Admin/models/GetGroupsBatchResponse.md new file mode 100644 index 000000000..fba1160c1 --- /dev/null +++ b/docs/v2/Admin/models/GetGroupsBatchResponse.md @@ -0,0 +1,11 @@ +# GetGroupsBatchResponse + +GetGroupsBatchResponse + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**data** | Dict[GroupId, Group] | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/GetMarkingsBatchRequestElement.md b/docs/v2/Admin/models/GetMarkingsBatchRequestElement.md new file mode 100644 index 000000000..93887c045 --- /dev/null +++ b/docs/v2/Admin/models/GetMarkingsBatchRequestElement.md @@ -0,0 +1,11 @@ +# GetMarkingsBatchRequestElement + +GetMarkingsBatchRequestElement + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**marking_id** | MarkingId | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/GetMarkingsBatchResponse.md b/docs/v2/Admin/models/GetMarkingsBatchResponse.md new file mode 100644 index 000000000..57b2724f8 --- /dev/null +++ b/docs/v2/Admin/models/GetMarkingsBatchResponse.md @@ -0,0 +1,11 @@ +# GetMarkingsBatchResponse + +GetMarkingsBatchResponse + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**data** | Dict[MarkingId, Marking] | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/GetRolesBatchRequestElement.md b/docs/v2/Admin/models/GetRolesBatchRequestElement.md new file mode 100644 index 000000000..a7221779a --- /dev/null +++ b/docs/v2/Admin/models/GetRolesBatchRequestElement.md @@ -0,0 +1,11 @@ +# GetRolesBatchRequestElement + +GetRolesBatchRequestElement + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**role_id** | RoleId | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/GetRolesBatchResponse.md b/docs/v2/Admin/models/GetRolesBatchResponse.md new file mode 100644 index 000000000..84595f941 --- /dev/null +++ b/docs/v2/Admin/models/GetRolesBatchResponse.md @@ -0,0 +1,11 @@ +# GetRolesBatchResponse + +GetRolesBatchResponse + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**data** | Dict[RoleId, Role] | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/GetUserMarkingsResponse.md b/docs/v2/Admin/models/GetUserMarkingsResponse.md new file mode 100644 index 000000000..49b9c53fc --- /dev/null +++ b/docs/v2/Admin/models/GetUserMarkingsResponse.md @@ -0,0 +1,11 @@ +# GetUserMarkingsResponse + +GetUserMarkingsResponse + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**view** | List[MarkingId] | Yes | The markings that the user has access to. The user will be able to access resources protected with these markings. This includes organization markings for organizations in which the user is a guest member. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/GetUsersBatchRequestElement.md b/docs/v2/Admin/models/GetUsersBatchRequestElement.md new file mode 100644 index 000000000..06844b6c7 --- /dev/null +++ b/docs/v2/Admin/models/GetUsersBatchRequestElement.md @@ -0,0 +1,12 @@ +# GetUsersBatchRequestElement + +GetUsersBatchRequestElement + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**user_id** | UserId | Yes | | +**status** | Optional[UserStatus] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/GetUsersBatchResponse.md b/docs/v2/Admin/models/GetUsersBatchResponse.md new file mode 100644 index 000000000..00c0682da --- /dev/null +++ b/docs/v2/Admin/models/GetUsersBatchResponse.md @@ -0,0 +1,11 @@ +# GetUsersBatchResponse + +GetUsersBatchResponse + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**data** | Dict[UserId, User] | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/Group.md b/docs/v2/Admin/models/Group.md new file mode 100644 index 000000000..6ef9a8a5d --- /dev/null +++ b/docs/v2/Admin/models/Group.md @@ -0,0 +1,16 @@ +# Group + +Group + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**id** | GroupId | Yes | | +**name** | GroupName | Yes | The name of the Group. | +**description** | Optional[str] | No | A description of the Group. | +**realm** | Realm | Yes | | +**organizations** | List[OrganizationRid] | Yes | The RIDs of the Organizations whose members can see this group. At least one Organization RID must be listed. | +**attributes** | Dict[AttributeName, AttributeValues] | Yes | A map of the Group's attributes. Attributes prefixed with "multipass:" are reserved for internal use by Foundry and are subject to change. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/GroupMember.md b/docs/v2/Admin/models/GroupMember.md new file mode 100644 index 000000000..f178d41b6 --- /dev/null +++ b/docs/v2/Admin/models/GroupMember.md @@ -0,0 +1,12 @@ +# GroupMember + +GroupMember + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**principal_type** | PrincipalType | Yes | | +**principal_id** | PrincipalId | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/GroupMembership.md b/docs/v2/Admin/models/GroupMembership.md new file mode 100644 index 000000000..8ef16dd03 --- /dev/null +++ b/docs/v2/Admin/models/GroupMembership.md @@ -0,0 +1,11 @@ +# GroupMembership + +GroupMembership + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**group_id** | GroupId | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/GroupMembershipExpiration.md b/docs/v2/Admin/models/GroupMembershipExpiration.md new file mode 100644 index 000000000..b5c1f1a6b --- /dev/null +++ b/docs/v2/Admin/models/GroupMembershipExpiration.md @@ -0,0 +1,11 @@ +# GroupMembershipExpiration + +GroupMembershipExpiration + +## Type +```python +datetime +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/GroupMembershipExpirationPolicy.md b/docs/v2/Admin/models/GroupMembershipExpirationPolicy.md new file mode 100644 index 000000000..24702eb6a --- /dev/null +++ b/docs/v2/Admin/models/GroupMembershipExpirationPolicy.md @@ -0,0 +1,12 @@ +# GroupMembershipExpirationPolicy + +GroupMembershipExpirationPolicy + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**maximum_value** | Optional[GroupMembershipExpiration] | No | Members in this group must be added with expiration times that occur before this value. | +**maximum_duration** | Optional[DurationSeconds] | No | Members in this group must be added with expirations that are less than this duration in seconds into the future from the time they are added. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/GroupName.md b/docs/v2/Admin/models/GroupName.md new file mode 100644 index 000000000..0167f7c6d --- /dev/null +++ b/docs/v2/Admin/models/GroupName.md @@ -0,0 +1,11 @@ +# GroupName + +The name of the Group. + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/GroupProviderInfo.md b/docs/v2/Admin/models/GroupProviderInfo.md new file mode 100644 index 000000000..28756f43f --- /dev/null +++ b/docs/v2/Admin/models/GroupProviderInfo.md @@ -0,0 +1,11 @@ +# GroupProviderInfo + +GroupProviderInfo + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**provider_id** | ProviderId | Yes | The ID of the Group in the external authentication provider. This value is determined by the authentication provider. At most one Group can have a given provider ID in a given Realm. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/GroupSearchFilter.md b/docs/v2/Admin/models/GroupSearchFilter.md new file mode 100644 index 000000000..4bef9fe14 --- /dev/null +++ b/docs/v2/Admin/models/GroupSearchFilter.md @@ -0,0 +1,12 @@ +# GroupSearchFilter + +GroupSearchFilter + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | PrincipalFilterType | Yes | | +**value** | str | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/Host.md b/docs/v2/Admin/models/Host.md new file mode 100644 index 000000000..1a42b9fa2 --- /dev/null +++ b/docs/v2/Admin/models/Host.md @@ -0,0 +1,11 @@ +# Host + +Host + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**host_name** | HostName | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/HostName.md b/docs/v2/Admin/models/HostName.md new file mode 100644 index 000000000..23ec4ae22 --- /dev/null +++ b/docs/v2/Admin/models/HostName.md @@ -0,0 +1,11 @@ +# HostName + +HostName + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/ListAuthenticationProvidersResponse.md b/docs/v2/Admin/models/ListAuthenticationProvidersResponse.md new file mode 100644 index 000000000..f62dbd5fc --- /dev/null +++ b/docs/v2/Admin/models/ListAuthenticationProvidersResponse.md @@ -0,0 +1,12 @@ +# ListAuthenticationProvidersResponse + +ListAuthenticationProvidersResponse + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**data** | List[AuthenticationProvider] | Yes | | +**next_page_token** | Optional[PageToken] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/ListAvailableOrganizationRolesResponse.md b/docs/v2/Admin/models/ListAvailableOrganizationRolesResponse.md new file mode 100644 index 000000000..73dfa458a --- /dev/null +++ b/docs/v2/Admin/models/ListAvailableOrganizationRolesResponse.md @@ -0,0 +1,11 @@ +# ListAvailableOrganizationRolesResponse + +ListAvailableOrganizationRolesResponse + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**data** | List[Role] | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/ListEnrollmentRoleAssignmentsResponse.md b/docs/v2/Admin/models/ListEnrollmentRoleAssignmentsResponse.md new file mode 100644 index 000000000..c12a1c428 --- /dev/null +++ b/docs/v2/Admin/models/ListEnrollmentRoleAssignmentsResponse.md @@ -0,0 +1,12 @@ +# ListEnrollmentRoleAssignmentsResponse + +ListEnrollmentRoleAssignmentsResponse + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**data** | List[EnrollmentRoleAssignment] | Yes | | +**next_page_token** | Optional[PageToken] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/ListGroupMembersResponse.md b/docs/v2/Admin/models/ListGroupMembersResponse.md new file mode 100644 index 000000000..9502f7208 --- /dev/null +++ b/docs/v2/Admin/models/ListGroupMembersResponse.md @@ -0,0 +1,12 @@ +# ListGroupMembersResponse + +ListGroupMembersResponse + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**data** | List[GroupMember] | Yes | | +**next_page_token** | Optional[PageToken] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/ListGroupMembershipsResponse.md b/docs/v2/Admin/models/ListGroupMembershipsResponse.md new file mode 100644 index 000000000..660da6b35 --- /dev/null +++ b/docs/v2/Admin/models/ListGroupMembershipsResponse.md @@ -0,0 +1,12 @@ +# ListGroupMembershipsResponse + +ListGroupMembershipsResponse + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**data** | List[GroupMembership] | Yes | | +**next_page_token** | Optional[PageToken] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/ListGroupsResponse.md b/docs/v2/Admin/models/ListGroupsResponse.md new file mode 100644 index 000000000..508149498 --- /dev/null +++ b/docs/v2/Admin/models/ListGroupsResponse.md @@ -0,0 +1,12 @@ +# ListGroupsResponse + +ListGroupsResponse + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**data** | List[Group] | Yes | | +**next_page_token** | Optional[PageToken] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/ListHostsResponse.md b/docs/v2/Admin/models/ListHostsResponse.md new file mode 100644 index 000000000..0521ae485 --- /dev/null +++ b/docs/v2/Admin/models/ListHostsResponse.md @@ -0,0 +1,12 @@ +# ListHostsResponse + +ListHostsResponse + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**data** | List[Host] | Yes | | +**next_page_token** | Optional[PageToken] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/ListMarkingCategoriesResponse.md b/docs/v2/Admin/models/ListMarkingCategoriesResponse.md new file mode 100644 index 000000000..7b9cae1ab --- /dev/null +++ b/docs/v2/Admin/models/ListMarkingCategoriesResponse.md @@ -0,0 +1,12 @@ +# ListMarkingCategoriesResponse + +ListMarkingCategoriesResponse + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**data** | List[MarkingCategory] | Yes | | +**next_page_token** | Optional[PageToken] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/ListMarkingMembersResponse.md b/docs/v2/Admin/models/ListMarkingMembersResponse.md new file mode 100644 index 000000000..7404258de --- /dev/null +++ b/docs/v2/Admin/models/ListMarkingMembersResponse.md @@ -0,0 +1,12 @@ +# ListMarkingMembersResponse + +ListMarkingMembersResponse + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**data** | List[MarkingMember] | Yes | | +**next_page_token** | Optional[PageToken] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/ListMarkingRoleAssignmentsResponse.md b/docs/v2/Admin/models/ListMarkingRoleAssignmentsResponse.md new file mode 100644 index 000000000..f31e2fba5 --- /dev/null +++ b/docs/v2/Admin/models/ListMarkingRoleAssignmentsResponse.md @@ -0,0 +1,12 @@ +# ListMarkingRoleAssignmentsResponse + +ListMarkingRoleAssignmentsResponse + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**data** | List[MarkingRoleAssignment] | Yes | | +**next_page_token** | Optional[PageToken] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/ListMarkingsResponse.md b/docs/v2/Admin/models/ListMarkingsResponse.md new file mode 100644 index 000000000..504ba42c1 --- /dev/null +++ b/docs/v2/Admin/models/ListMarkingsResponse.md @@ -0,0 +1,12 @@ +# ListMarkingsResponse + +ListMarkingsResponse + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**data** | List[Marking] | Yes | | +**next_page_token** | Optional[PageToken] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/ListOrganizationRoleAssignmentsResponse.md b/docs/v2/Admin/models/ListOrganizationRoleAssignmentsResponse.md new file mode 100644 index 000000000..45df3068f --- /dev/null +++ b/docs/v2/Admin/models/ListOrganizationRoleAssignmentsResponse.md @@ -0,0 +1,12 @@ +# ListOrganizationRoleAssignmentsResponse + +ListOrganizationRoleAssignmentsResponse + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**data** | List[OrganizationRoleAssignment] | Yes | | +**next_page_token** | Optional[PageToken] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/ListUsersResponse.md b/docs/v2/Admin/models/ListUsersResponse.md new file mode 100644 index 000000000..30992198d --- /dev/null +++ b/docs/v2/Admin/models/ListUsersResponse.md @@ -0,0 +1,12 @@ +# ListUsersResponse + +ListUsersResponse + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**data** | List[User] | Yes | | +**next_page_token** | Optional[PageToken] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/Marking.md b/docs/v2/Admin/models/Marking.md new file mode 100644 index 000000000..86e86b09f --- /dev/null +++ b/docs/v2/Admin/models/Marking.md @@ -0,0 +1,17 @@ +# Marking + +Marking + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**id** | MarkingId | Yes | | +**category_id** | MarkingCategoryId | Yes | | +**name** | MarkingName | Yes | | +**description** | Optional[str] | No | | +**organization** | Optional[OrganizationRid] | No | If this marking is associated with an Organization, its RID will be populated here. | +**created_time** | CreatedTime | Yes | | +**created_by** | Optional[CreatedBy] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/MarkingCategory.md b/docs/v2/Admin/models/MarkingCategory.md new file mode 100644 index 000000000..5a2283c87 --- /dev/null +++ b/docs/v2/Admin/models/MarkingCategory.md @@ -0,0 +1,18 @@ +# MarkingCategory + +MarkingCategory + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**id** | MarkingCategoryId | Yes | | +**name** | MarkingCategoryName | Yes | | +**description** | Optional[str] | No | | +**category_type** | MarkingCategoryType | Yes | | +**marking_type** | MarkingType | Yes | | +**markings** | List[MarkingId] | Yes | | +**created_time** | CreatedTime | Yes | | +**created_by** | Optional[CreatedBy] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/MarkingCategoryId.md b/docs/v2/Admin/models/MarkingCategoryId.md new file mode 100644 index 000000000..9fc55a961 --- /dev/null +++ b/docs/v2/Admin/models/MarkingCategoryId.md @@ -0,0 +1,13 @@ +# MarkingCategoryId + +The ID of a marking category. For user-created categories, this will be a UUID. Markings associated with +Organizations are placed in a category with ID "Organization". + + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/MarkingCategoryName.md b/docs/v2/Admin/models/MarkingCategoryName.md new file mode 100644 index 000000000..d2f1a0eef --- /dev/null +++ b/docs/v2/Admin/models/MarkingCategoryName.md @@ -0,0 +1,11 @@ +# MarkingCategoryName + +MarkingCategoryName + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/MarkingCategoryType.md b/docs/v2/Admin/models/MarkingCategoryType.md new file mode 100644 index 000000000..1b4490cb9 --- /dev/null +++ b/docs/v2/Admin/models/MarkingCategoryType.md @@ -0,0 +1,11 @@ +# MarkingCategoryType + +MarkingCategoryType + +| **Value** | +| --------- | +| `"CONJUNCTIVE"` | +| `"DISJUNCTIVE"` | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/MarkingMember.md b/docs/v2/Admin/models/MarkingMember.md new file mode 100644 index 000000000..69e5d4d67 --- /dev/null +++ b/docs/v2/Admin/models/MarkingMember.md @@ -0,0 +1,12 @@ +# MarkingMember + +MarkingMember + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**principal_type** | PrincipalType | Yes | | +**principal_id** | PrincipalId | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/MarkingName.md b/docs/v2/Admin/models/MarkingName.md new file mode 100644 index 000000000..a9a6a5087 --- /dev/null +++ b/docs/v2/Admin/models/MarkingName.md @@ -0,0 +1,11 @@ +# MarkingName + +MarkingName + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/MarkingRole.md b/docs/v2/Admin/models/MarkingRole.md new file mode 100644 index 000000000..5f6f4a2eb --- /dev/null +++ b/docs/v2/Admin/models/MarkingRole.md @@ -0,0 +1,16 @@ +# MarkingRole + +Represents the operations that a user can perform with regards to a Marking. + * ADMINISTER: The user can add and remove members from the Marking, update Marking Role Assignments, and change Marking metadata. + * DECLASSIFY: The user can remove the Marking from resources in the platform and stop the propagation of the Marking during a transform. + * USE: The user can apply the marking to resources in the platform. + + +| **Value** | +| --------- | +| `"ADMINISTER"` | +| `"DECLASSIFY"` | +| `"USE"` | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/MarkingRoleAssignment.md b/docs/v2/Admin/models/MarkingRoleAssignment.md new file mode 100644 index 000000000..1bced5193 --- /dev/null +++ b/docs/v2/Admin/models/MarkingRoleAssignment.md @@ -0,0 +1,13 @@ +# MarkingRoleAssignment + +MarkingRoleAssignment + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**principal_type** | PrincipalType | Yes | | +**principal_id** | PrincipalId | Yes | | +**role** | MarkingRole | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/MarkingRoleUpdate.md b/docs/v2/Admin/models/MarkingRoleUpdate.md new file mode 100644 index 000000000..2650f785a --- /dev/null +++ b/docs/v2/Admin/models/MarkingRoleUpdate.md @@ -0,0 +1,12 @@ +# MarkingRoleUpdate + +MarkingRoleUpdate + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**role** | MarkingRole | Yes | | +**principal_id** | PrincipalId | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/MarkingType.md b/docs/v2/Admin/models/MarkingType.md new file mode 100644 index 000000000..6b9f7f9c4 --- /dev/null +++ b/docs/v2/Admin/models/MarkingType.md @@ -0,0 +1,11 @@ +# MarkingType + +MarkingType + +| **Value** | +| --------- | +| `"MANDATORY"` | +| `"CBAC"` | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/OidcAuthenticationProtocol.md b/docs/v2/Admin/models/OidcAuthenticationProtocol.md new file mode 100644 index 000000000..94480a8c2 --- /dev/null +++ b/docs/v2/Admin/models/OidcAuthenticationProtocol.md @@ -0,0 +1,11 @@ +# OidcAuthenticationProtocol + +OidcAuthenticationProtocol + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["oidc"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/Organization.md b/docs/v2/Admin/models/Organization.md new file mode 100644 index 000000000..a6759e6f4 --- /dev/null +++ b/docs/v2/Admin/models/Organization.md @@ -0,0 +1,15 @@ +# Organization + +Organization + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**rid** | OrganizationRid | Yes | | +**name** | OrganizationName | Yes | | +**description** | Optional[str] | No | | +**marking_id** | MarkingId | Yes | The ID of this Organization's underlying marking. Organization guest access can be managed by updating the membership of this Marking. | +**host** | Optional[HostName] | No | The primary host name of the Organization. This should be used when constructing URLs for users of this Organization. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/OrganizationName.md b/docs/v2/Admin/models/OrganizationName.md new file mode 100644 index 000000000..e572e4b79 --- /dev/null +++ b/docs/v2/Admin/models/OrganizationName.md @@ -0,0 +1,11 @@ +# OrganizationName + +OrganizationName + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/OrganizationRoleAssignment.md b/docs/v2/Admin/models/OrganizationRoleAssignment.md new file mode 100644 index 000000000..fba1ce9a0 --- /dev/null +++ b/docs/v2/Admin/models/OrganizationRoleAssignment.md @@ -0,0 +1,13 @@ +# OrganizationRoleAssignment + +OrganizationRoleAssignment + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**principal_type** | PrincipalType | Yes | | +**principal_id** | PrincipalId | Yes | | +**role_id** | RoleId | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/PreregisterGroupRequest.md b/docs/v2/Admin/models/PreregisterGroupRequest.md new file mode 100644 index 000000000..b90d81fa2 --- /dev/null +++ b/docs/v2/Admin/models/PreregisterGroupRequest.md @@ -0,0 +1,12 @@ +# PreregisterGroupRequest + +PreregisterGroupRequest + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**name** | GroupName | Yes | | +**organizations** | List[OrganizationRid] | Yes | The RIDs of the Organizations that can view this group. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/PreregisterUserRequest.md b/docs/v2/Admin/models/PreregisterUserRequest.md new file mode 100644 index 000000000..d69204a93 --- /dev/null +++ b/docs/v2/Admin/models/PreregisterUserRequest.md @@ -0,0 +1,16 @@ +# PreregisterUserRequest + +PreregisterUserRequest + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**username** | UserUsername | Yes | The new user's username. This must match one of the provider's supported username patterns. | +**organization** | OrganizationRid | Yes | The RID of the user's primary Organization. This may be changed when the user logs in for the first time depending on any configured Organization assignment rules. | +**given_name** | Optional[str] | No | | +**family_name** | Optional[str] | No | | +**email** | Optional[str] | No | | +**attributes** | Optional[Dict[AttributeName, AttributeValues]] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/PrincipalFilterType.md b/docs/v2/Admin/models/PrincipalFilterType.md new file mode 100644 index 000000000..024e83fa5 --- /dev/null +++ b/docs/v2/Admin/models/PrincipalFilterType.md @@ -0,0 +1,10 @@ +# PrincipalFilterType + +PrincipalFilterType + +| **Value** | +| --------- | +| `"queryString"` | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/ProviderId.md b/docs/v2/Admin/models/ProviderId.md new file mode 100644 index 000000000..ec948147c --- /dev/null +++ b/docs/v2/Admin/models/ProviderId.md @@ -0,0 +1,12 @@ +# ProviderId + +A value that uniquely identifies a User or Group in an external authentication provider. This value is determined by the external authentication provider and must be unique per Realm. + + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/RemoveEnrollmentRoleAssignmentsRequest.md b/docs/v2/Admin/models/RemoveEnrollmentRoleAssignmentsRequest.md new file mode 100644 index 000000000..293d23af0 --- /dev/null +++ b/docs/v2/Admin/models/RemoveEnrollmentRoleAssignmentsRequest.md @@ -0,0 +1,11 @@ +# RemoveEnrollmentRoleAssignmentsRequest + +RemoveEnrollmentRoleAssignmentsRequest + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**role_assignments** | List[RoleAssignmentUpdate] | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/RemoveGroupMembersRequest.md b/docs/v2/Admin/models/RemoveGroupMembersRequest.md new file mode 100644 index 000000000..b50064d92 --- /dev/null +++ b/docs/v2/Admin/models/RemoveGroupMembersRequest.md @@ -0,0 +1,11 @@ +# RemoveGroupMembersRequest + +RemoveGroupMembersRequest + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**principal_ids** | List[PrincipalId] | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/RemoveMarkingMembersRequest.md b/docs/v2/Admin/models/RemoveMarkingMembersRequest.md new file mode 100644 index 000000000..ad4200244 --- /dev/null +++ b/docs/v2/Admin/models/RemoveMarkingMembersRequest.md @@ -0,0 +1,11 @@ +# RemoveMarkingMembersRequest + +RemoveMarkingMembersRequest + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**principal_ids** | List[PrincipalId] | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/RemoveMarkingRoleAssignmentsRequest.md b/docs/v2/Admin/models/RemoveMarkingRoleAssignmentsRequest.md new file mode 100644 index 000000000..58b991041 --- /dev/null +++ b/docs/v2/Admin/models/RemoveMarkingRoleAssignmentsRequest.md @@ -0,0 +1,11 @@ +# RemoveMarkingRoleAssignmentsRequest + +RemoveMarkingRoleAssignmentsRequest + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**role_assignments** | List[MarkingRoleUpdate] | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/RemoveOrganizationRoleAssignmentsRequest.md b/docs/v2/Admin/models/RemoveOrganizationRoleAssignmentsRequest.md new file mode 100644 index 000000000..6998ba3a6 --- /dev/null +++ b/docs/v2/Admin/models/RemoveOrganizationRoleAssignmentsRequest.md @@ -0,0 +1,11 @@ +# RemoveOrganizationRoleAssignmentsRequest + +RemoveOrganizationRoleAssignmentsRequest + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**role_assignments** | List[RoleAssignmentUpdate] | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/ReplaceGroupMembershipExpirationPolicyRequest.md b/docs/v2/Admin/models/ReplaceGroupMembershipExpirationPolicyRequest.md new file mode 100644 index 000000000..dc92ee76b --- /dev/null +++ b/docs/v2/Admin/models/ReplaceGroupMembershipExpirationPolicyRequest.md @@ -0,0 +1,12 @@ +# ReplaceGroupMembershipExpirationPolicyRequest + +ReplaceGroupMembershipExpirationPolicyRequest + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**maximum_duration** | Optional[DurationSeconds] | No | Members in this group must be added with expirations that are less than this duration in seconds into the future from the time they are added. | +**maximum_value** | Optional[GroupMembershipExpiration] | No | Members in this group must be added with expiration times that occur before this value. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/ReplaceGroupProviderInfoRequest.md b/docs/v2/Admin/models/ReplaceGroupProviderInfoRequest.md new file mode 100644 index 000000000..0f6fefc9d --- /dev/null +++ b/docs/v2/Admin/models/ReplaceGroupProviderInfoRequest.md @@ -0,0 +1,11 @@ +# ReplaceGroupProviderInfoRequest + +ReplaceGroupProviderInfoRequest + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**provider_id** | ProviderId | Yes | The ID of the Group in the external authentication provider. This value is determined by the authentication provider. At most one Group can have a given provider ID in a given Realm. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/ReplaceMarkingRequest.md b/docs/v2/Admin/models/ReplaceMarkingRequest.md new file mode 100644 index 000000000..f2a9850b4 --- /dev/null +++ b/docs/v2/Admin/models/ReplaceMarkingRequest.md @@ -0,0 +1,12 @@ +# ReplaceMarkingRequest + +ReplaceMarkingRequest + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**name** | MarkingName | Yes | | +**description** | Optional[str] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/ReplaceOrganizationRequest.md b/docs/v2/Admin/models/ReplaceOrganizationRequest.md new file mode 100644 index 000000000..24173d9b9 --- /dev/null +++ b/docs/v2/Admin/models/ReplaceOrganizationRequest.md @@ -0,0 +1,13 @@ +# ReplaceOrganizationRequest + +ReplaceOrganizationRequest + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**name** | OrganizationName | Yes | | +**host** | Optional[HostName] | No | The primary host name of the Organization. This should be used when constructing URLs for users of this Organization. | +**description** | Optional[str] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/ReplaceUserProviderInfoRequest.md b/docs/v2/Admin/models/ReplaceUserProviderInfoRequest.md new file mode 100644 index 000000000..fdd79560b --- /dev/null +++ b/docs/v2/Admin/models/ReplaceUserProviderInfoRequest.md @@ -0,0 +1,11 @@ +# ReplaceUserProviderInfoRequest + +ReplaceUserProviderInfoRequest + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**provider_id** | ProviderId | Yes | The ID of the User in the external authentication provider. This value is determined by the authentication provider. At most one User can have a given provider ID in a given Realm. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/Role.md b/docs/v2/Admin/models/Role.md new file mode 100644 index 000000000..d1798e363 --- /dev/null +++ b/docs/v2/Admin/models/Role.md @@ -0,0 +1,15 @@ +# Role + +Role + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**id** | RoleId | Yes | | +**display_name** | RoleDisplayName | Yes | | +**description** | RoleDescription | Yes | | +**operations** | List[str] | Yes | A list of permissions that this role has. | +**can_assigns** | List[RoleId] | Yes | A list of roles that this role inherits. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/RoleDescription.md b/docs/v2/Admin/models/RoleDescription.md new file mode 100644 index 000000000..5b2cf1f1b --- /dev/null +++ b/docs/v2/Admin/models/RoleDescription.md @@ -0,0 +1,11 @@ +# RoleDescription + +RoleDescription + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/RoleDisplayName.md b/docs/v2/Admin/models/RoleDisplayName.md new file mode 100644 index 000000000..690b017a2 --- /dev/null +++ b/docs/v2/Admin/models/RoleDisplayName.md @@ -0,0 +1,11 @@ +# RoleDisplayName + +RoleDisplayName + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/SamlAuthenticationProtocol.md b/docs/v2/Admin/models/SamlAuthenticationProtocol.md new file mode 100644 index 000000000..4ece669e1 --- /dev/null +++ b/docs/v2/Admin/models/SamlAuthenticationProtocol.md @@ -0,0 +1,12 @@ +# SamlAuthenticationProtocol + +SamlAuthenticationProtocol + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**service_provider_metadata** | SamlServiceProviderMetadata | Yes | | +**type** | Literal["saml"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/SamlServiceProviderMetadata.md b/docs/v2/Admin/models/SamlServiceProviderMetadata.md new file mode 100644 index 000000000..3e55de1f9 --- /dev/null +++ b/docs/v2/Admin/models/SamlServiceProviderMetadata.md @@ -0,0 +1,15 @@ +# SamlServiceProviderMetadata + +Information that describes a Foundry Authentication Provider as a SAML service provider. All information listed here is generated by Foundry. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**entity_id** | str | Yes | The static SAML entity ID that represents this service provider. | +**metadata_url** | str | Yes | A public URL from which this service provider metadata can be downloaded as XML. | +**acs_urls** | List[str] | Yes | The Assertion Consumer Service (ACS) URLs for this service provider, to which the SAML identity provider redirects authentication responses. | +**logout_urls** | List[str] | Yes | The URLs for this service provider to which the SAML identity provider sends logout requests. | +**certificates** | List[CertificateInfo] | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/SearchGroupsRequest.md b/docs/v2/Admin/models/SearchGroupsRequest.md new file mode 100644 index 000000000..520a98639 --- /dev/null +++ b/docs/v2/Admin/models/SearchGroupsRequest.md @@ -0,0 +1,13 @@ +# SearchGroupsRequest + +SearchGroupsRequest + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**where** | GroupSearchFilter | Yes | | +**page_size** | Optional[PageSize] | No | | +**page_token** | Optional[PageToken] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/SearchGroupsResponse.md b/docs/v2/Admin/models/SearchGroupsResponse.md new file mode 100644 index 000000000..513f8c3cb --- /dev/null +++ b/docs/v2/Admin/models/SearchGroupsResponse.md @@ -0,0 +1,12 @@ +# SearchGroupsResponse + +SearchGroupsResponse + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**data** | List[Group] | Yes | | +**next_page_token** | Optional[PageToken] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/SearchUsersRequest.md b/docs/v2/Admin/models/SearchUsersRequest.md new file mode 100644 index 000000000..713a61bb2 --- /dev/null +++ b/docs/v2/Admin/models/SearchUsersRequest.md @@ -0,0 +1,13 @@ +# SearchUsersRequest + +SearchUsersRequest + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**where** | UserSearchFilter | Yes | | +**page_size** | Optional[PageSize] | No | | +**page_token** | Optional[PageToken] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/SearchUsersResponse.md b/docs/v2/Admin/models/SearchUsersResponse.md new file mode 100644 index 000000000..c4f559207 --- /dev/null +++ b/docs/v2/Admin/models/SearchUsersResponse.md @@ -0,0 +1,12 @@ +# SearchUsersResponse + +SearchUsersResponse + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**data** | List[User] | Yes | | +**next_page_token** | Optional[PageToken] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/User.md b/docs/v2/Admin/models/User.md new file mode 100644 index 000000000..3e363233f --- /dev/null +++ b/docs/v2/Admin/models/User.md @@ -0,0 +1,19 @@ +# User + +User + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**id** | UserId | Yes | | +**username** | UserUsername | Yes | The Foundry username of the User. This is unique within the realm. | +**given_name** | Optional[str] | No | The given name of the User. | +**family_name** | Optional[str] | No | The family name (last name) of the User. | +**email** | Optional[str] | No | The email at which to contact a User. Multiple users may have the same email address. | +**realm** | Realm | Yes | | +**organization** | Optional[OrganizationRid] | No | The RID of the user's primary Organization. This will be blank for third-party application service users. | +**status** | UserStatus | Yes | The current status of the user. | +**attributes** | Dict[AttributeName, AttributeValues] | Yes | A map of the User's attributes. Attributes prefixed with "multipass:" are reserved for internal use by Foundry and are subject to change. Additional attributes may be configured by Foundry administrators in Control Panel and populated by the User's SSO provider upon login. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/UserProviderInfo.md b/docs/v2/Admin/models/UserProviderInfo.md new file mode 100644 index 000000000..617ec2b8c --- /dev/null +++ b/docs/v2/Admin/models/UserProviderInfo.md @@ -0,0 +1,11 @@ +# UserProviderInfo + +UserProviderInfo + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**provider_id** | ProviderId | Yes | The ID of the User in the external authentication provider. This value is determined by the authentication provider. At most one User can have a given provider ID in a given Realm. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/UserSearchFilter.md b/docs/v2/Admin/models/UserSearchFilter.md new file mode 100644 index 000000000..1e60cca22 --- /dev/null +++ b/docs/v2/Admin/models/UserSearchFilter.md @@ -0,0 +1,12 @@ +# UserSearchFilter + +UserSearchFilter + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | PrincipalFilterType | Yes | | +**value** | str | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Admin/models/UserUsername.md b/docs/v2/Admin/models/UserUsername.md new file mode 100644 index 000000000..ace9359f3 --- /dev/null +++ b/docs/v2/Admin/models/UserUsername.md @@ -0,0 +1,11 @@ +# UserUsername + +The Foundry username of the User. This is unique within the realm. + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/Agent.md b/docs/v2/AipAgents/Agent.md new file mode 100644 index 000000000..eba7c93dd --- /dev/null +++ b/docs/v2/AipAgents/Agent.md @@ -0,0 +1,116 @@ +# Agent + +Method | HTTP request | Release Stage | +------------- | ------------- | ----- | +[**all_sessions**](#all_sessions) | **GET** /v2/aipAgents/agents/allSessions | Public Beta | +[**get**](#get) | **GET** /v2/aipAgents/agents/{agentRid} | Public Beta | + +# **all_sessions** +List all conversation sessions between the calling user and all accessible Agents that were created by this client. +Sessions are returned in order of most recently updated first. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**page_size** | Optional[PageSize] | The maximum number of sessions to return in a single page. The maximum allowed value is 100. Defaults to 100 if not specified. | [optional] | +**page_token** | Optional[PageToken] | | [optional] | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**AgentsSessionsPage** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# Optional[PageSize] | The maximum number of sessions to return in a single page. The maximum allowed value is 100. Defaults to 100 if not specified. +page_size = None +# Optional[PageToken] +page_token = None +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + for agent in client.aip_agents.Agent.all_sessions( + page_size=page_size, page_token=page_token, preview=preview + ): + pprint(agent) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Agent.all_sessions: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | AgentsSessionsPage | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **get** +Get details for an AIP Agent. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**agent_rid** | AgentRid | An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | +**version** | Optional[AgentVersionString] | The version of the Agent to retrieve. If not specified, the latest published version will be returned. | [optional] | + +### Return type +**Agent** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# AgentRid | An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). +agent_rid = "ri.aip-agents..agent.732cd5b4-7ca7-4219-aabb-6e976faf63b1" +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None +# Optional[AgentVersionString] | The version of the Agent to retrieve. If not specified, the latest published version will be returned. +version = None + + +try: + api_response = client.aip_agents.Agent.get(agent_rid, preview=preview, version=version) + print("The get response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Agent.get: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | Agent | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + diff --git a/docs/v2/AipAgents/AgentVersion.md b/docs/v2/AipAgents/AgentVersion.md new file mode 100644 index 000000000..49d74fae6 --- /dev/null +++ b/docs/v2/AipAgents/AgentVersion.md @@ -0,0 +1,121 @@ +# AgentVersion + +Method | HTTP request | Release Stage | +------------- | ------------- | ----- | +[**get**](#get) | **GET** /v2/aipAgents/agents/{agentRid}/agentVersions/{agentVersionString} | Public Beta | +[**list**](#list) | **GET** /v2/aipAgents/agents/{agentRid}/agentVersions | Public Beta | + +# **get** +Get version details for an AIP Agent. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**agent_rid** | AgentRid | An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). | | +**agent_version_string** | AgentVersionString | The semantic version of the Agent, formatted as "majorVersion.minorVersion". | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**AgentVersion** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# AgentRid | An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). +agent_rid = "ri.aip-agents..agent.732cd5b4-7ca7-4219-aabb-6e976faf63b1" +# AgentVersionString | The semantic version of the Agent, formatted as "majorVersion.minorVersion". +agent_version_string = "1.0" +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.aip_agents.Agent.AgentVersion.get( + agent_rid, agent_version_string, preview=preview + ) + print("The get response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling AgentVersion.get: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | AgentVersion | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **list** +List all versions for an AIP Agent. +Versions are returned in descending order, by most recent versions first. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**agent_rid** | AgentRid | An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). | | +**page_size** | Optional[PageSize] | The page size to use for the endpoint. | [optional] | +**page_token** | Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. | [optional] | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**ListAgentVersionsResponse** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# AgentRid | An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). +agent_rid = "ri.aip-agents..agent.732cd5b4-7ca7-4219-aabb-6e976faf63b1" +# Optional[PageSize] | The page size to use for the endpoint. +page_size = None +# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. +page_token = None +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + for agent_version in client.aip_agents.Agent.AgentVersion.list( + agent_rid, page_size=page_size, page_token=page_token, preview=preview + ): + pprint(agent_version) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling AgentVersion.list: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | ListAgentVersionsResponse | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + diff --git a/docs/v2/AipAgents/Content.md b/docs/v2/AipAgents/Content.md new file mode 100644 index 000000000..edb727185 --- /dev/null +++ b/docs/v2/AipAgents/Content.md @@ -0,0 +1,61 @@ +# Content + +Method | HTTP request | Release Stage | +------------- | ------------- | ----- | +[**get**](#get) | **GET** /v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}/content | Public Beta | + +# **get** +Get the conversation content for a session between the calling user and an Agent. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**agent_rid** | AgentRid | An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). | | +**session_rid** | SessionRid | The Resource Identifier (RID) of the conversation session. | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**Content** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# AgentRid | An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). +agent_rid = "ri.aip-agents..agent.732cd5b4-7ca7-4219-aabb-6e976faf63b1" +# SessionRid | The Resource Identifier (RID) of the conversation session. +session_rid = "ri.aip-agents..session.292db3b2-b653-4de6-971c-7e97a7b881d6" +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.aip_agents.Agent.Session.Content.get( + agent_rid, session_rid, preview=preview + ) + print("The get response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Content.get: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | Content | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + diff --git a/docs/v2/AipAgents/Session.md b/docs/v2/AipAgents/Session.md new file mode 100644 index 000000000..cf51b712d --- /dev/null +++ b/docs/v2/AipAgents/Session.md @@ -0,0 +1,614 @@ +# Session + +Method | HTTP request | Release Stage | +------------- | ------------- | ----- | +[**blocking_continue**](#blocking_continue) | **POST** /v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}/blockingContinue | Public Beta | +[**cancel**](#cancel) | **POST** /v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}/cancel | Public Beta | +[**create**](#create) | **POST** /v2/aipAgents/agents/{agentRid}/sessions | Public Beta | +[**delete**](#delete) | **DELETE** /v2/aipAgents/agents/{agentRid}/sessions/{sessionRid} | Public Beta | +[**get**](#get) | **GET** /v2/aipAgents/agents/{agentRid}/sessions/{sessionRid} | Public Beta | +[**list**](#list) | **GET** /v2/aipAgents/agents/{agentRid}/sessions | Public Beta | +[**rag_context**](#rag_context) | **PUT** /v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}/ragContext | Public Beta | +[**streaming_continue**](#streaming_continue) | **POST** /v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}/streamingContinue | Public Beta | +[**update_title**](#update_title) | **PUT** /v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}/updateTitle | Public Beta | + +# **blocking_continue** +Continue a conversation session with an Agent, or add the first exchange to a session after creation. +Adds a new exchange to the session with the provided inputs, and generates a response from the Agent. +Blocks on returning the result of the added exchange until the response is fully generated. +Streamed responses are also supported; see `streamingContinue` for details. +Concurrent requests to continue the same session are not supported. +Clients should wait to receive a response before sending the next message. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**agent_rid** | AgentRid | An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). | | +**session_rid** | SessionRid | The Resource Identifier (RID) of the conversation session. | | +**parameter_inputs** | Dict[ParameterId, ParameterValue] | Any supplied values for [application variables](https://palantir.com/docs/foundry/agent-studio/application-state/) to pass to the Agent for the exchange. | | +**user_input** | UserTextInput | The user message for the Agent to respond to. | | +**contexts_override** | Optional[List[InputContext]] | If set, automatic [context retrieval](https://palantir.com/docs/foundry/agent-studio/retrieval-context/) is skipped and the list of specified context is provided to the Agent instead. If omitted, relevant context for the user message is automatically retrieved and included in the prompt, based on data sources configured on the Agent for the session. | [optional] | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | +**session_trace_id** | Optional[SessionTraceId] | The unique identifier to use for this continue session trace. By generating and passing this ID to the `blockingContinue` endpoint, clients can use this trace ID to separately load details of the trace used to generate a result, while the result is in progress. If omitted, it will be generated automatically. Clients can check the generated ID by inspecting the `sessionTraceId` in the `SessionExchangeResult`. | [optional] | + +### Return type +**SessionExchangeResult** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# AgentRid | An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). +agent_rid = "ri.aip-agents..agent.732cd5b4-7ca7-4219-aabb-6e976faf63b1" +# SessionRid | The Resource Identifier (RID) of the conversation session. +session_rid = "ri.aip-agents..session.292db3b2-b653-4de6-971c-7e97a7b881d6" +# Dict[ParameterId, ParameterValue] | Any supplied values for [application variables](https://palantir.com/docs/foundry/agent-studio/application-state/) to pass to the Agent for the exchange. +parameter_inputs = { + "currentCustomerOrders": { + "type": "objectSet", + "ontology": "example-ontology", + "objectSet": { + "type": "filter", + "objectSet": {"type": "base", "objectType": "customerOrder"}, + "where": {"type": "eq", "field": "customerId", "value": "123abc"}, + }, + } +} +# UserTextInput | The user message for the Agent to respond to. +user_input = {"text": "What is the status of my order?"} +# Optional[List[InputContext]] | If set, automatic [context retrieval](https://palantir.com/docs/foundry/agent-studio/retrieval-context/) is skipped and the list of specified context is provided to the Agent instead. If omitted, relevant context for the user message is automatically retrieved and included in the prompt, based on data sources configured on the Agent for the session. +contexts_override = None +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None +# Optional[SessionTraceId] | The unique identifier to use for this continue session trace. By generating and passing this ID to the `blockingContinue` endpoint, clients can use this trace ID to separately load details of the trace used to generate a result, while the result is in progress. If omitted, it will be generated automatically. Clients can check the generated ID by inspecting the `sessionTraceId` in the `SessionExchangeResult`. +session_trace_id = "12345678-1234-5678-1234-123456789abc" + + +try: + api_response = client.aip_agents.Agent.Session.blocking_continue( + agent_rid, + session_rid, + parameter_inputs=parameter_inputs, + user_input=user_input, + contexts_override=contexts_override, + preview=preview, + session_trace_id=session_trace_id, + ) + print("The blocking_continue response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Session.blocking_continue: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | SessionExchangeResult | The result of the added exchange for the session. | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **cancel** +Cancel an in-progress streamed exchange with an Agent which was initiated with `streamingContinue`. +Canceling an exchange allows clients to prevent the exchange from being added to the session, or to provide a response to replace the Agent-generated response. +Note that canceling an exchange does not terminate the stream returned by `streamingContinue`; clients should close the stream on triggering the cancellation request to stop reading from the stream. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**agent_rid** | AgentRid | An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). | | +**session_rid** | SessionRid | The Resource Identifier (RID) of the conversation session. | | +**message_id** | MessageId | The identifier for the in-progress exchange to cancel. This should match the `messageId` which was provided when initiating the exchange with `streamingContinue`. | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | +**response** | Optional[AgentMarkdownResponse] | When specified, the exchange is added to the session with the client-provided response as the result. When omitted, the exchange is not added to the session. | [optional] | + +### Return type +**CancelSessionResponse** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# AgentRid | An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). +agent_rid = "ri.aip-agents..agent.732cd5b4-7ca7-4219-aabb-6e976faf63b1" +# SessionRid | The Resource Identifier (RID) of the conversation session. +session_rid = "ri.aip-agents..session.292db3b2-b653-4de6-971c-7e97a7b881d6" +# MessageId | The identifier for the in-progress exchange to cancel. This should match the `messageId` which was provided when initiating the exchange with `streamingContinue`. +message_id = "00f8412a-c29d-4063-a417-8052825285a5" +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None +# Optional[AgentMarkdownResponse] | When specified, the exchange is added to the session with the client-provided response as the result. When omitted, the exchange is not added to the session. +response = "The status of your order is **In Transit**." + + +try: + api_response = client.aip_agents.Agent.Session.cancel( + agent_rid, session_rid, message_id=message_id, preview=preview, response=response + ) + print("The cancel response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Session.cancel: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | CancelSessionResponse | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **create** +Create a new conversation session between the calling user and an Agent. +Use `blockingContinue` or `streamingContinue` to start adding exchanges to the session. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**agent_rid** | AgentRid | An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). | | +**agent_version** | Optional[AgentVersionString] | The version of the Agent associated with the session. This can be set by clients on session creation. If not specified, defaults to use the latest published version of the Agent at session creation time. | [optional] | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**Session** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# AgentRid | An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). +agent_rid = "ri.aip-agents..agent.732cd5b4-7ca7-4219-aabb-6e976faf63b1" +# Optional[AgentVersionString] | The version of the Agent associated with the session. This can be set by clients on session creation. If not specified, defaults to use the latest published version of the Agent at session creation time. +agent_version = "1.0" +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.aip_agents.Agent.Session.create( + agent_rid, agent_version=agent_version, preview=preview + ) + print("The create response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Session.create: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | Session | The created Session | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **delete** +Delete a conversation session between the calling user and an Agent. +Once deleted, the session can no longer be accessed and will not appear in session lists. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**agent_rid** | AgentRid | An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). | | +**session_rid** | SessionRid | The Resource Identifier (RID) of the conversation session. | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**None** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# AgentRid | An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). +agent_rid = "ri.aip-agents..agent.732cd5b4-7ca7-4219-aabb-6e976faf63b1" +# SessionRid | The Resource Identifier (RID) of the conversation session. +session_rid = "ri.aip-agents..session.292db3b2-b653-4de6-971c-7e97a7b881d6" +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.aip_agents.Agent.Session.delete(agent_rid, session_rid, preview=preview) + print("The delete response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Session.delete: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**204** | None | | None | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **get** +Get the details of a conversation session between the calling user and an Agent. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**agent_rid** | AgentRid | An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). | | +**session_rid** | SessionRid | The Resource Identifier (RID) of the conversation session. | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**Session** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# AgentRid | An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). +agent_rid = "ri.aip-agents..agent.732cd5b4-7ca7-4219-aabb-6e976faf63b1" +# SessionRid | The Resource Identifier (RID) of the conversation session. +session_rid = "ri.aip-agents..session.292db3b2-b653-4de6-971c-7e97a7b881d6" +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.aip_agents.Agent.Session.get(agent_rid, session_rid, preview=preview) + print("The get response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Session.get: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | Session | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **list** +List all conversation sessions between the calling user and an Agent that was created by this client. +This does not list sessions for the user created by other clients. +For example, any sessions created by the user in AIP Agent Studio will not be listed here. +Sessions are returned in order of most recently updated first. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**agent_rid** | AgentRid | An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). | | +**page_size** | Optional[PageSize] | The page size to use for the endpoint. | [optional] | +**page_token** | Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. | [optional] | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**ListSessionsResponse** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# AgentRid | An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). +agent_rid = "ri.aip-agents..agent.732cd5b4-7ca7-4219-aabb-6e976faf63b1" +# Optional[PageSize] | The page size to use for the endpoint. +page_size = None +# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. +page_token = None +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + for session in client.aip_agents.Agent.Session.list( + agent_rid, page_size=page_size, page_token=page_token, preview=preview + ): + pprint(session) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Session.list: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | ListSessionsResponse | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **rag_context** +Retrieve relevant [context](https://palantir.com/docs/foundry/agent-studio/core-concepts/#retrieval-context) for a user message from the data sources configured for the session. +This allows clients to pre-retrieve context for a user message before sending it to the Agent with the `contextsOverride` option when continuing a session, to allow any pre-processing of the context before sending it to the Agent. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**agent_rid** | AgentRid | An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). | | +**session_rid** | SessionRid | The Resource Identifier (RID) of the conversation session. | | +**parameter_inputs** | Dict[ParameterId, ParameterValue] | Any values for [application variables](https://palantir.com/docs/foundry/agent-studio/application-state/) to use for the context retrieval. | | +**user_input** | UserTextInput | The user message to retrieve relevant context for from the configured Agent data sources. | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**AgentSessionRagContextResponse** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# AgentRid | An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). +agent_rid = "ri.aip-agents..agent.732cd5b4-7ca7-4219-aabb-6e976faf63b1" +# SessionRid | The Resource Identifier (RID) of the conversation session. +session_rid = "ri.aip-agents..session.292db3b2-b653-4de6-971c-7e97a7b881d6" +# Dict[ParameterId, ParameterValue] | Any values for [application variables](https://palantir.com/docs/foundry/agent-studio/application-state/) to use for the context retrieval. +parameter_inputs = {"customerName": {"type": "string", "value": "Titan Technologies"}} +# UserTextInput | The user message to retrieve relevant context for from the configured Agent data sources. +user_input = {"text": "What is the status of my order?"} +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.aip_agents.Agent.Session.rag_context( + agent_rid, + session_rid, + parameter_inputs=parameter_inputs, + user_input=user_input, + preview=preview, + ) + print("The rag_context response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Session.rag_context: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | AgentSessionRagContextResponse | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **streaming_continue** +Continue a conversation session with an Agent, or add the first exchange to a session after creation. +Adds a new exchange to the session with the provided inputs, and generates a response from the Agent. +Returns a stream of the Agent response text (formatted using markdown) for clients to consume as the response is generated. +On completion of the streamed response, clients can load the full details of the exchange that was added to the session by reloading the session content. +Streamed exchanges also support cancellation; see `cancel` for details. +Concurrent requests to continue the same session are not supported. +Clients should wait to receive a response, or cancel the in-progress exchange, before sending the next message. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**agent_rid** | AgentRid | An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). | | +**session_rid** | SessionRid | The Resource Identifier (RID) of the conversation session. | | +**parameter_inputs** | Dict[ParameterId, ParameterValue] | Any supplied values for [application variables](https://palantir.com/docs/foundry/agent-studio/application-state/) to pass to the Agent for the exchange. | | +**user_input** | UserTextInput | The user message for the Agent to respond to. | | +**contexts_override** | Optional[List[InputContext]] | If set, automatic [context](https://palantir.com/docs/foundry/agent-studio/retrieval-context/) retrieval is skipped and the list of specified context is provided to the Agent instead. If omitted, relevant context for the user message is automatically retrieved and included in the prompt, based on data sources configured on the Agent for the session. | [optional] | +**message_id** | Optional[MessageId] | A client-generated Universally Unique Identifier (UUID) to identify the message, which the client can use to cancel the exchange before the streaming response is complete. | [optional] | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | +**session_trace_id** | Optional[SessionTraceId] | The unique identifier to use for this continue session trace. By generating and passing this ID to the `streamingContinue` endpoint, clients can use this trace ID to separately load details of the trace used to generate a result, while the result is in progress. If omitted, it will be generated automatically. Clients can check the generated ID by inspecting the `sessionTraceId` in the `SessionExchangeResult`, which can be loaded via the `getContent` endpoint. | [optional] | + +### Return type +**bytes** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# AgentRid | An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). +agent_rid = "ri.aip-agents..agent.732cd5b4-7ca7-4219-aabb-6e976faf63b1" +# SessionRid | The Resource Identifier (RID) of the conversation session. +session_rid = "ri.aip-agents..session.292db3b2-b653-4de6-971c-7e97a7b881d6" +# Dict[ParameterId, ParameterValue] | Any supplied values for [application variables](https://palantir.com/docs/foundry/agent-studio/application-state/) to pass to the Agent for the exchange. +parameter_inputs = { + "currentCustomerOrders": { + "type": "objectSet", + "ontology": "example-ontology", + "objectSet": { + "type": "filter", + "objectSet": {"type": "base", "objectType": "customerOrder"}, + "where": {"type": "eq", "field": "customerId", "value": "123abc"}, + }, + } +} +# UserTextInput | The user message for the Agent to respond to. +user_input = {"text": "What is the status of my order?"} +# Optional[List[InputContext]] | If set, automatic [context](https://palantir.com/docs/foundry/agent-studio/retrieval-context/) retrieval is skipped and the list of specified context is provided to the Agent instead. If omitted, relevant context for the user message is automatically retrieved and included in the prompt, based on data sources configured on the Agent for the session. +contexts_override = None +# Optional[MessageId] | A client-generated Universally Unique Identifier (UUID) to identify the message, which the client can use to cancel the exchange before the streaming response is complete. +message_id = "00f8412a-c29d-4063-a417-8052825285a5" +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None +# Optional[SessionTraceId] | The unique identifier to use for this continue session trace. By generating and passing this ID to the `streamingContinue` endpoint, clients can use this trace ID to separately load details of the trace used to generate a result, while the result is in progress. If omitted, it will be generated automatically. Clients can check the generated ID by inspecting the `sessionTraceId` in the `SessionExchangeResult`, which can be loaded via the `getContent` endpoint. +session_trace_id = "12345678-1234-5678-1234-123456789abc" + + +try: + api_response = client.aip_agents.Agent.Session.streaming_continue( + agent_rid, + session_rid, + parameter_inputs=parameter_inputs, + user_input=user_input, + contexts_override=contexts_override, + message_id=message_id, + preview=preview, + session_trace_id=session_trace_id, + ) + print("The streaming_continue response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Session.streaming_continue: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | bytes | | application/octet-stream | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **update_title** +Update the title for a session. +Use this to set a custom title for a session to help identify it in the list of sessions with an Agent. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**agent_rid** | AgentRid | An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). | | +**session_rid** | SessionRid | The Resource Identifier (RID) of the conversation session. | | +**title** | str | The new title for the session. The maximum title length is 200 characters. Titles are truncated if they exceed this length. | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**None** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# AgentRid | An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). +agent_rid = "ri.aip-agents..agent.732cd5b4-7ca7-4219-aabb-6e976faf63b1" +# SessionRid | The Resource Identifier (RID) of the conversation session. +session_rid = "ri.aip-agents..session.292db3b2-b653-4de6-971c-7e97a7b881d6" +# str | The new title for the session. The maximum title length is 200 characters. Titles are truncated if they exceed this length. +title = "Order status 02/01" +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.aip_agents.Agent.Session.update_title( + agent_rid, session_rid, title=title, preview=preview + ) + print("The update_title response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Session.update_title: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**204** | None | | None | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + diff --git a/docs/v2/AipAgents/SessionTrace.md b/docs/v2/AipAgents/SessionTrace.md new file mode 100644 index 000000000..7524a666f --- /dev/null +++ b/docs/v2/AipAgents/SessionTrace.md @@ -0,0 +1,67 @@ +# SessionTrace + +Method | HTTP request | Release Stage | +------------- | ------------- | ----- | +[**get**](#get) | **GET** /v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}/sessionTraces/{sessionTraceId} | Public Beta | + +# **get** +Get the trace of an Agent response. The trace lists the sequence of steps that an Agent took to arrive at +an answer. For example, a trace may include steps such as context retrieval and tool calls. Clients should +poll this endpoint to check the realtime progress of a response until the trace is completed. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**agent_rid** | AgentRid | An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). | | +**session_rid** | SessionRid | The Resource Identifier (RID) of the conversation session. | | +**session_trace_id** | SessionTraceId | The unique identifier for the trace. | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**SessionTrace** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# AgentRid | An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). +agent_rid = "ri.aip-agents..agent.732cd5b4-7ca7-4219-aabb-6e976faf63b1" +# SessionRid | The Resource Identifier (RID) of the conversation session. +session_rid = "ri.aip-agents..session.292db3b2-b653-4de6-971c-7e97a7b881d6" +# SessionTraceId | The unique identifier for the trace. +session_trace_id = None +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.aip_agents.Agent.Session.SessionTrace.get( + agent_rid, session_rid, session_trace_id, preview=preview + ) + print("The get response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling SessionTrace.get: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | SessionTrace | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + diff --git a/docs/v2/AipAgents/models/Agent.md b/docs/v2/AipAgents/models/Agent.md new file mode 100644 index 000000000..d60afff26 --- /dev/null +++ b/docs/v2/AipAgents/models/Agent.md @@ -0,0 +1,14 @@ +# Agent + +Agent + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**rid** | AgentRid | Yes | An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). | +**version** | AgentVersionString | Yes | The version of this instance of the Agent. | +**metadata** | AgentMetadata | Yes | | +**parameters** | Dict[ParameterId, Parameter] | Yes | The types and names of variables configured for the Agent in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/) in the [application state](https://palantir.com/docs/foundry/agent-studio/application-state/). These variables can be used to send custom values in prompts sent to an Agent to customize and control the Agent's behavior. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/AgentMarkdownResponse.md b/docs/v2/AipAgents/models/AgentMarkdownResponse.md new file mode 100644 index 000000000..6d78d1b42 --- /dev/null +++ b/docs/v2/AipAgents/models/AgentMarkdownResponse.md @@ -0,0 +1,11 @@ +# AgentMarkdownResponse + +The final answer for an exchange. Responses are formatted using markdown. + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/AgentMetadata.md b/docs/v2/AipAgents/models/AgentMetadata.md new file mode 100644 index 000000000..818873d61 --- /dev/null +++ b/docs/v2/AipAgents/models/AgentMetadata.md @@ -0,0 +1,14 @@ +# AgentMetadata + +Metadata for an Agent. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**display_name** | str | Yes | The name of the Agent. | +**description** | Optional[str] | No | The description for the Agent. | +**input_placeholder** | Optional[str] | No | The default text to show as the placeholder input for chats with the Agent. | +**suggested_prompts** | List[str] | Yes | Prompts to show to the user as example messages to start a conversation with the Agent. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/AgentRid.md b/docs/v2/AipAgents/models/AgentRid.md new file mode 100644 index 000000000..19b731c8a --- /dev/null +++ b/docs/v2/AipAgents/models/AgentRid.md @@ -0,0 +1,11 @@ +# AgentRid + +An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). + +## Type +```python +RID +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/AgentSessionRagContextResponse.md b/docs/v2/AipAgents/models/AgentSessionRagContextResponse.md new file mode 100644 index 000000000..62c016c42 --- /dev/null +++ b/docs/v2/AipAgents/models/AgentSessionRagContextResponse.md @@ -0,0 +1,13 @@ +# AgentSessionRagContextResponse + +Context retrieved from an Agent's configured context data sources which was relevant to the supplied user message. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**object_contexts** | List[ObjectContext] | Yes | | +**function_retrieved_contexts** | List[FunctionRetrievedContext] | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/AgentVersion.md b/docs/v2/AipAgents/models/AgentVersion.md new file mode 100644 index 000000000..224c463c4 --- /dev/null +++ b/docs/v2/AipAgents/models/AgentVersion.md @@ -0,0 +1,12 @@ +# AgentVersion + +AgentVersion + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**string** | AgentVersionString | Yes | The semantic version of the Agent, formatted as "majorVersion.minorVersion". | +**version** | AgentVersionDetails | Yes | Semantic version details of the Agent. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/AgentVersionDetails.md b/docs/v2/AipAgents/models/AgentVersionDetails.md new file mode 100644 index 000000000..b1bfe03db --- /dev/null +++ b/docs/v2/AipAgents/models/AgentVersionDetails.md @@ -0,0 +1,12 @@ +# AgentVersionDetails + +Semantic version details for an Agent. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**major** | int | Yes | The major version of the Agent. Incremented every time the Agent is published. | +**minor** | int | Yes | The minor version of the Agent. Incremented every time the Agent is saved. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/AgentVersionString.md b/docs/v2/AipAgents/models/AgentVersionString.md new file mode 100644 index 000000000..c33ef915e --- /dev/null +++ b/docs/v2/AipAgents/models/AgentVersionString.md @@ -0,0 +1,11 @@ +# AgentVersionString + +The semantic version of the Agent, formatted as "majorVersion.minorVersion". + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/AgentsSessionsPage.md b/docs/v2/AipAgents/models/AgentsSessionsPage.md new file mode 100644 index 000000000..7f51b9a76 --- /dev/null +++ b/docs/v2/AipAgents/models/AgentsSessionsPage.md @@ -0,0 +1,14 @@ +# AgentsSessionsPage + +A page of results for sessions across all accessible Agents for the calling user. +Sessions are returned in order of most recently updated first. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**next_page_token** | Optional[PageToken] | No | The page token that should be used when requesting the next page of results. Empty if there are no more results to retrieve. | +**data** | List[Session] | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/BlockingContinueSessionRequest.md b/docs/v2/AipAgents/models/BlockingContinueSessionRequest.md new file mode 100644 index 000000000..5922eeb98 --- /dev/null +++ b/docs/v2/AipAgents/models/BlockingContinueSessionRequest.md @@ -0,0 +1,14 @@ +# BlockingContinueSessionRequest + +BlockingContinueSessionRequest + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**user_input** | UserTextInput | Yes | The user message for the Agent to respond to. | +**parameter_inputs** | Dict[ParameterId, ParameterValue] | Yes | Any supplied values for [application variables](https://palantir.com/docs/foundry/agent-studio/application-state/) to pass to the Agent for the exchange. | +**contexts_override** | Optional[List[InputContext]] | No | If set, automatic [context retrieval](https://palantir.com/docs/foundry/agent-studio/retrieval-context/) is skipped and the list of specified context is provided to the Agent instead. If omitted, relevant context for the user message is automatically retrieved and included in the prompt, based on data sources configured on the Agent for the session. | +**session_trace_id** | Optional[SessionTraceId] | No | The unique identifier to use for this continue session trace. By generating and passing this ID to the `blockingContinue` endpoint, clients can use this trace ID to separately load details of the trace used to generate a result, while the result is in progress. If omitted, it will be generated automatically. Clients can check the generated ID by inspecting the `sessionTraceId` in the `SessionExchangeResult`. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/CancelSessionRequest.md b/docs/v2/AipAgents/models/CancelSessionRequest.md new file mode 100644 index 000000000..a36a94eed --- /dev/null +++ b/docs/v2/AipAgents/models/CancelSessionRequest.md @@ -0,0 +1,12 @@ +# CancelSessionRequest + +CancelSessionRequest + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**message_id** | MessageId | Yes | The identifier for the in-progress exchange to cancel. This should match the `messageId` which was provided when initiating the exchange with `streamingContinue`. | +**response** | Optional[AgentMarkdownResponse] | No | When specified, the exchange is added to the session with the client-provided response as the result. When omitted, the exchange is not added to the session. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/CancelSessionResponse.md b/docs/v2/AipAgents/models/CancelSessionResponse.md new file mode 100644 index 000000000..9b3359fb1 --- /dev/null +++ b/docs/v2/AipAgents/models/CancelSessionResponse.md @@ -0,0 +1,11 @@ +# CancelSessionResponse + +CancelSessionResponse + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**result** | Optional[SessionExchangeResult] | No | If the `response` field was specified, this returns the result that was added to the session for the canceled exchange, with the client-provided response. If no `response` was specified in the request, this returns an empty response, as no exchange was added to the session. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/Content.md b/docs/v2/AipAgents/models/Content.md new file mode 100644 index 000000000..186faeef7 --- /dev/null +++ b/docs/v2/AipAgents/models/Content.md @@ -0,0 +1,11 @@ +# Content + +Content + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**exchanges** | List[SessionExchange] | Yes | The conversation history for the session, represented as a list of exchanges. Each exchange represents an initiating message from the user and the Agent's response. Exchanges are returned in chronological order, starting with the first exchange. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/CreateSessionRequest.md b/docs/v2/AipAgents/models/CreateSessionRequest.md new file mode 100644 index 000000000..cb1f98f47 --- /dev/null +++ b/docs/v2/AipAgents/models/CreateSessionRequest.md @@ -0,0 +1,11 @@ +# CreateSessionRequest + +CreateSessionRequest + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**agent_version** | Optional[AgentVersionString] | No | The version of the Agent associated with the session. This can be set by clients on session creation. If not specified, defaults to use the latest published version of the Agent at session creation time. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/FailureToolCallOutput.md b/docs/v2/AipAgents/models/FailureToolCallOutput.md new file mode 100644 index 000000000..bd8dc2771 --- /dev/null +++ b/docs/v2/AipAgents/models/FailureToolCallOutput.md @@ -0,0 +1,12 @@ +# FailureToolCallOutput + +The failed output of a tool call. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**correction_message** | str | Yes | The correction message returned by the tool if the tool call was not successful. This is a message that the tool returned to the Agent, which may be used to correct the Agent's input to the tool. | +**type** | Literal["failure"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/FunctionRetrievedContext.md b/docs/v2/AipAgents/models/FunctionRetrievedContext.md new file mode 100644 index 000000000..752bc0bcb --- /dev/null +++ b/docs/v2/AipAgents/models/FunctionRetrievedContext.md @@ -0,0 +1,15 @@ +# FunctionRetrievedContext + +Context retrieved from running a function to include as additional context in the prompt to the Agent. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**function_rid** | FunctionRid | Yes | | +**function_version** | FunctionVersion | Yes | | +**retrieved_prompt** | str | Yes | String content returned from a context retrieval function. | +**type** | Literal["functionRetrievedContext"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/GetRagContextForSessionRequest.md b/docs/v2/AipAgents/models/GetRagContextForSessionRequest.md new file mode 100644 index 000000000..91fbb6e83 --- /dev/null +++ b/docs/v2/AipAgents/models/GetRagContextForSessionRequest.md @@ -0,0 +1,12 @@ +# GetRagContextForSessionRequest + +GetRagContextForSessionRequest + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**user_input** | UserTextInput | Yes | The user message to retrieve relevant context for from the configured Agent data sources. | +**parameter_inputs** | Dict[ParameterId, ParameterValue] | Yes | Any values for [application variables](https://palantir.com/docs/foundry/agent-studio/application-state/) to use for the context retrieval. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/InputContext.md b/docs/v2/AipAgents/models/InputContext.md new file mode 100644 index 000000000..91fbb82ec --- /dev/null +++ b/docs/v2/AipAgents/models/InputContext.md @@ -0,0 +1,17 @@ +# InputContext + +Custom retrieved [context](https://palantir.com/docs/foundry/agent-studio/retrieval-context/) to provide to an Agent for continuing a session. + + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +FunctionRetrievedContext | functionRetrievedContext +ObjectContext | objectContext + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/ListAgentVersionsResponse.md b/docs/v2/AipAgents/models/ListAgentVersionsResponse.md new file mode 100644 index 000000000..db4f81c55 --- /dev/null +++ b/docs/v2/AipAgents/models/ListAgentVersionsResponse.md @@ -0,0 +1,12 @@ +# ListAgentVersionsResponse + +ListAgentVersionsResponse + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**data** | List[AgentVersion] | Yes | | +**next_page_token** | Optional[PageToken] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/ListSessionsResponse.md b/docs/v2/AipAgents/models/ListSessionsResponse.md new file mode 100644 index 000000000..9583b80de --- /dev/null +++ b/docs/v2/AipAgents/models/ListSessionsResponse.md @@ -0,0 +1,12 @@ +# ListSessionsResponse + +ListSessionsResponse + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**data** | List[Session] | Yes | | +**next_page_token** | Optional[PageToken] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/MessageId.md b/docs/v2/AipAgents/models/MessageId.md new file mode 100644 index 000000000..87a49aeec --- /dev/null +++ b/docs/v2/AipAgents/models/MessageId.md @@ -0,0 +1,13 @@ +# MessageId + +An ephemeral client-generated Universally Unique Identifier (UUID) to identify a message for streamed session responses. +This can be used by clients to cancel a streamed exchange. + + +## Type +```python +UUID +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/ObjectContext.md b/docs/v2/AipAgents/models/ObjectContext.md new file mode 100644 index 000000000..0ae7fb800 --- /dev/null +++ b/docs/v2/AipAgents/models/ObjectContext.md @@ -0,0 +1,14 @@ +# ObjectContext + +Details of relevant retrieved object instances for a user's message to include as additional context in the prompt to the Agent. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**object_rids** | List[ObjectRid] | Yes | The RIDs of the relevant object instances to include in the prompt. | +**property_type_rids** | List[PropertyTypeRid] | Yes | The RIDs of the property types for the given objects to include in the prompt. | +**type** | Literal["objectContext"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/ObjectSetParameter.md b/docs/v2/AipAgents/models/ObjectSetParameter.md new file mode 100644 index 000000000..5493b8106 --- /dev/null +++ b/docs/v2/AipAgents/models/ObjectSetParameter.md @@ -0,0 +1,12 @@ +# ObjectSetParameter + +ObjectSetParameter + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**expected_object_types** | List[ObjectTypeId] | Yes | The types of objects that are expected in ObjectSet values passed for this variable. | +**type** | Literal["objectSet"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/ObjectSetParameterValue.md b/docs/v2/AipAgents/models/ObjectSetParameterValue.md new file mode 100644 index 000000000..86641488e --- /dev/null +++ b/docs/v2/AipAgents/models/ObjectSetParameterValue.md @@ -0,0 +1,13 @@ +# ObjectSetParameterValue + +A value passed for `ObjectSetParameter` application variable types. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**object_set** | ObjectSet | Yes | | +**ontology** | OntologyIdentifier | Yes | The API name of the Ontology for the provided `ObjectSet`. To find the API name, use the `List ontologies` endpoint or check the [Ontology Manager](https://palantir.com/docs/foundry/ontology-manager/overview/). | +**type** | Literal["objectSet"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/ObjectSetParameterValueUpdate.md b/docs/v2/AipAgents/models/ObjectSetParameterValueUpdate.md new file mode 100644 index 000000000..afdf031e4 --- /dev/null +++ b/docs/v2/AipAgents/models/ObjectSetParameterValueUpdate.md @@ -0,0 +1,12 @@ +# ObjectSetParameterValueUpdate + +ObjectSetParameterValueUpdate + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**value** | ObjectSetRid | Yes | | +**type** | Literal["objectSet"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/Parameter.md b/docs/v2/AipAgents/models/Parameter.md new file mode 100644 index 000000000..c96c207a5 --- /dev/null +++ b/docs/v2/AipAgents/models/Parameter.md @@ -0,0 +1,14 @@ +# Parameter + +A variable configured in the application state of an Agent in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**parameter_type** | ParameterType | Yes | Details of the types of values accepted and defaults for this variable. | +**access** | ParameterAccessMode | Yes | The access mode controls how the Agent is able to interact with the variable. | +**description** | Optional[str] | No | A description to explain the use of this variable. This description is injected into the Agent's prompt to provide context for when to use the variable. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/ParameterAccessMode.md b/docs/v2/AipAgents/models/ParameterAccessMode.md new file mode 100644 index 000000000..63046c878 --- /dev/null +++ b/docs/v2/AipAgents/models/ParameterAccessMode.md @@ -0,0 +1,13 @@ +# ParameterAccessMode + +READ_ONLY: Allows the variable to be read by the Agent, but the Agent cannot generate updates for it. +READ_WRITE: Allows the variable to be read and updated by the Agent. + + +| **Value** | +| --------- | +| `"READ_ONLY"` | +| `"READ_WRITE"` | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/ParameterId.md b/docs/v2/AipAgents/models/ParameterId.md new file mode 100644 index 000000000..4ed80ecb6 --- /dev/null +++ b/docs/v2/AipAgents/models/ParameterId.md @@ -0,0 +1,12 @@ +# ParameterId + +The unique identifier for a variable configured in the application state of an Agent in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). + + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/ParameterType.md b/docs/v2/AipAgents/models/ParameterType.md new file mode 100644 index 000000000..9717cbde1 --- /dev/null +++ b/docs/v2/AipAgents/models/ParameterType.md @@ -0,0 +1,16 @@ +# ParameterType + +ParameterType + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +StringParameter | string +ObjectSetParameter | objectSet + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/ParameterValue.md b/docs/v2/AipAgents/models/ParameterValue.md new file mode 100644 index 000000000..8c112b420 --- /dev/null +++ b/docs/v2/AipAgents/models/ParameterValue.md @@ -0,0 +1,17 @@ +# ParameterValue + +The value provided for a variable configured in the [application state](https://palantir.com/docs/foundry/agent-studio/application-state/) of an Agent. + + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +StringParameterValue | string +ObjectSetParameterValue | objectSet + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/ParameterValueUpdate.md b/docs/v2/AipAgents/models/ParameterValueUpdate.md new file mode 100644 index 000000000..a6a7f750a --- /dev/null +++ b/docs/v2/AipAgents/models/ParameterValueUpdate.md @@ -0,0 +1,19 @@ +# ParameterValueUpdate + +A value update for an [application variable](https://palantir.com/docs/foundry/agent-studio/application-state/) generated by the Agent. +For `StringParameter` types, this will be the updated string value. +For `ObjectSetParameter` types, this will be a Resource Identifier (RID) for the updated object set. + + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +StringParameterValue | string +ObjectSetParameterValueUpdate | objectSet + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/RidToolInputValue.md b/docs/v2/AipAgents/models/RidToolInputValue.md new file mode 100644 index 000000000..088562731 --- /dev/null +++ b/docs/v2/AipAgents/models/RidToolInputValue.md @@ -0,0 +1,12 @@ +# RidToolInputValue + +A Resource Identifier (RID) that was passed as input to a tool. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**rid** | RID | Yes | | +**type** | Literal["rid"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/RidToolOutputValue.md b/docs/v2/AipAgents/models/RidToolOutputValue.md new file mode 100644 index 000000000..b61c3e74d --- /dev/null +++ b/docs/v2/AipAgents/models/RidToolOutputValue.md @@ -0,0 +1,12 @@ +# RidToolOutputValue + +A Resource Identifier (RID) value that was returned from a tool. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**rid** | RID | Yes | | +**type** | Literal["rid"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/Session.md b/docs/v2/AipAgents/models/Session.md new file mode 100644 index 000000000..04a7fbc57 --- /dev/null +++ b/docs/v2/AipAgents/models/Session.md @@ -0,0 +1,14 @@ +# Session + +Session + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**rid** | SessionRid | Yes | The Resource Identifier (RID) of the conversation session. | +**metadata** | SessionMetadata | Yes | Metadata about the session. | +**agent_rid** | AgentRid | Yes | The Resource Identifier (RID) of the Agent associated with the session. | +**agent_version** | AgentVersionString | Yes | The version of the Agent associated with the session. This can be set by clients on session creation. If not specified, defaults to use the latest published version of the Agent at session creation time. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/SessionExchange.md b/docs/v2/AipAgents/models/SessionExchange.md new file mode 100644 index 000000000..ab5b2cf3e --- /dev/null +++ b/docs/v2/AipAgents/models/SessionExchange.md @@ -0,0 +1,13 @@ +# SessionExchange + +Represents an individual exchange between a user and an Agent in a conversation session. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**user_input** | UserTextInput | Yes | The user message that initiated the exchange. | +**contexts** | Optional[SessionExchangeContexts] | No | Additional retrieved context that was included in the prompt to the Agent. This may include context that was passed by the client with the user input, or relevant context that was automatically retrieved and added based on available data sources configured on the Agent. Empty if no additional context was included in the prompt. | +**result** | SessionExchangeResult | Yes | The final result for the exchange. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/SessionExchangeContexts.md b/docs/v2/AipAgents/models/SessionExchangeContexts.md new file mode 100644 index 000000000..c0ec63041 --- /dev/null +++ b/docs/v2/AipAgents/models/SessionExchangeContexts.md @@ -0,0 +1,13 @@ +# SessionExchangeContexts + +Retrieved context which was passed to the Agent as input for the exchange. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**object_contexts** | List[ObjectContext] | Yes | Relevant object context for the user's message that was included in the prompt to the Agent. | +**function_retrieved_contexts** | List[FunctionRetrievedContext] | Yes | Context retrieved from running a function that was included as additional context in the prompt to the Agent. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/SessionExchangeResult.md b/docs/v2/AipAgents/models/SessionExchangeResult.md new file mode 100644 index 000000000..27ff2ee2a --- /dev/null +++ b/docs/v2/AipAgents/models/SessionExchangeResult.md @@ -0,0 +1,15 @@ +# SessionExchangeResult + +The returned result from the Agent for a session exchange. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**agent_markdown_response** | AgentMarkdownResponse | Yes | The final text response generated by the Agent. Responses are formatted using markdown. | +**parameter_updates** | Dict[ParameterId, ParameterValueUpdate] | Yes | Any updates to application variable values which were generated by the Agent for this exchange. Updates can only be generated for application variables configured with `READ_WRITE` access on the Agent in AIP Agent Studio. | +**total_tokens_used** | Optional[int] | No | Total tokens used to compute the result. Omitted if token usage information is not supported by the model used for the session. | +**interrupted_output** | bool | Yes | True if the exchange was canceled. In that case, the response (if any) was provided by the client as part of the cancellation request rather than by the Agent. | +**session_trace_id** | SessionTraceId | Yes | The unique identifier for the session trace. The session trace lists the sequence of steps that an Agent takes to arrive at an answer. For example, a trace may include steps such as context retrieval and tool calls. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/SessionMetadata.md b/docs/v2/AipAgents/models/SessionMetadata.md new file mode 100644 index 000000000..44f6a257f --- /dev/null +++ b/docs/v2/AipAgents/models/SessionMetadata.md @@ -0,0 +1,15 @@ +# SessionMetadata + +Metadata for a conversation session with an Agent. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**title** | str | Yes | The title of the session. | +**created_time** | datetime | Yes | The time the session was created. | +**updated_time** | datetime | Yes | The time the session was last updated. | +**message_count** | int | Yes | The count of messages in the session. Includes both user messages and Agent replies, so each complete exchange counts as two messages. | +**estimated_expires_time** | datetime | Yes | The estimated time at which the session is due to expire. Once a session has expired, it can no longer be accessed and a new session must be created. The expiry time is automatically extended when new exchanges are added to the session. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/SessionRid.md b/docs/v2/AipAgents/models/SessionRid.md new file mode 100644 index 000000000..c62976ae9 --- /dev/null +++ b/docs/v2/AipAgents/models/SessionRid.md @@ -0,0 +1,11 @@ +# SessionRid + +The Resource Identifier (RID) of the conversation session. + +## Type +```python +RID +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/SessionTrace.md b/docs/v2/AipAgents/models/SessionTrace.md new file mode 100644 index 000000000..b47fdc8a7 --- /dev/null +++ b/docs/v2/AipAgents/models/SessionTrace.md @@ -0,0 +1,14 @@ +# SessionTrace + +SessionTrace + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**id** | SessionTraceId | Yes | The unique identifier for the trace. | +**status** | SessionTraceStatus | Yes | This indicates whether the Agent has finished generating the final response. Clients should keep polling the `getSessionTrace` endpoint until the status is `COMPLETE`. | +**contexts** | Optional[SessionExchangeContexts] | No | Any additional context which was provided by the client or retrieved automatically by the agent, grouped by context type. Empty if no additional context was provided or configured to be automatically retrieved. A present SessionExchangeContexts object with empty lists indicates that context retrieval was attempted but no context was found. Note that this field will only be populated once the response generation has completed. | +**tool_call_groups** | List[ToolCallGroup] | Yes | List of tool call groups that were triggered at the same point in the trace for the agent response generation. The groups are returned in the same order as they were triggered by the agent. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/SessionTraceId.md b/docs/v2/AipAgents/models/SessionTraceId.md new file mode 100644 index 000000000..7d0e721b2 --- /dev/null +++ b/docs/v2/AipAgents/models/SessionTraceId.md @@ -0,0 +1,13 @@ +# SessionTraceId + +The unique identifier for a trace. The trace lists the sequence of steps that an Agent took to arrive at an +answer. For example, a trace may include steps such as context retrieval and tool calls. + + +## Type +```python +UUID +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/SessionTraceStatus.md b/docs/v2/AipAgents/models/SessionTraceStatus.md new file mode 100644 index 000000000..4b3d25e7a --- /dev/null +++ b/docs/v2/AipAgents/models/SessionTraceStatus.md @@ -0,0 +1,11 @@ +# SessionTraceStatus + +SessionTraceStatus + +| **Value** | +| --------- | +| `"IN_PROGRESS"` | +| `"COMPLETE"` | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/StreamingContinueSessionRequest.md b/docs/v2/AipAgents/models/StreamingContinueSessionRequest.md new file mode 100644 index 000000000..80f034f0a --- /dev/null +++ b/docs/v2/AipAgents/models/StreamingContinueSessionRequest.md @@ -0,0 +1,15 @@ +# StreamingContinueSessionRequest + +StreamingContinueSessionRequest + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**user_input** | UserTextInput | Yes | The user message for the Agent to respond to. | +**parameter_inputs** | Dict[ParameterId, ParameterValue] | Yes | Any supplied values for [application variables](https://palantir.com/docs/foundry/agent-studio/application-state/) to pass to the Agent for the exchange. | +**contexts_override** | Optional[List[InputContext]] | No | If set, automatic [context](https://palantir.com/docs/foundry/agent-studio/retrieval-context/) retrieval is skipped and the list of specified context is provided to the Agent instead. If omitted, relevant context for the user message is automatically retrieved and included in the prompt, based on data sources configured on the Agent for the session. | +**message_id** | Optional[MessageId] | No | A client-generated Universally Unique Identifier (UUID) to identify the message, which the client can use to cancel the exchange before the streaming response is complete. | +**session_trace_id** | Optional[SessionTraceId] | No | The unique identifier to use for this continue session trace. By generating and passing this ID to the `streamingContinue` endpoint, clients can use this trace ID to separately load details of the trace used to generate a result, while the result is in progress. If omitted, it will be generated automatically. Clients can check the generated ID by inspecting the `sessionTraceId` in the `SessionExchangeResult`, which can be loaded via the `getContent` endpoint. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/StringParameter.md b/docs/v2/AipAgents/models/StringParameter.md new file mode 100644 index 000000000..630be3fa9 --- /dev/null +++ b/docs/v2/AipAgents/models/StringParameter.md @@ -0,0 +1,12 @@ +# StringParameter + +StringParameter + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**default_value** | Optional[str] | No | The default value to use for this variable. | +**type** | Literal["string"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/StringParameterValue.md b/docs/v2/AipAgents/models/StringParameterValue.md new file mode 100644 index 000000000..262c49a1a --- /dev/null +++ b/docs/v2/AipAgents/models/StringParameterValue.md @@ -0,0 +1,12 @@ +# StringParameterValue + +A value passed for `StringParameter` application variable types. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**value** | str | Yes | | +**type** | Literal["string"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/StringToolInputValue.md b/docs/v2/AipAgents/models/StringToolInputValue.md new file mode 100644 index 000000000..c11d84319 --- /dev/null +++ b/docs/v2/AipAgents/models/StringToolInputValue.md @@ -0,0 +1,12 @@ +# StringToolInputValue + +A string value that was passed as input to a tool. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**value** | str | Yes | | +**type** | Literal["string"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/StringToolOutputValue.md b/docs/v2/AipAgents/models/StringToolOutputValue.md new file mode 100644 index 000000000..db35822c3 --- /dev/null +++ b/docs/v2/AipAgents/models/StringToolOutputValue.md @@ -0,0 +1,12 @@ +# StringToolOutputValue + +A string value that was returned from a tool. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**value** | str | Yes | | +**type** | Literal["string"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/SuccessToolCallOutput.md b/docs/v2/AipAgents/models/SuccessToolCallOutput.md new file mode 100644 index 000000000..7ad0bfa9c --- /dev/null +++ b/docs/v2/AipAgents/models/SuccessToolCallOutput.md @@ -0,0 +1,12 @@ +# SuccessToolCallOutput + +The successful output of a tool call. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**output** | ToolOutputValue | Yes | | +**type** | Literal["success"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/ToolCall.md b/docs/v2/AipAgents/models/ToolCall.md new file mode 100644 index 000000000..d55c44d25 --- /dev/null +++ b/docs/v2/AipAgents/models/ToolCall.md @@ -0,0 +1,13 @@ +# ToolCall + +A tool call with its input and output. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**tool_metadata** | ToolMetadata | Yes | Details about the tool that was called, including the name and type of the tool. | +**input** | ToolCallInput | Yes | | +**output** | Optional[ToolCallOutput] | No | Empty if the tool call is in progress. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/ToolCallGroup.md b/docs/v2/AipAgents/models/ToolCallGroup.md new file mode 100644 index 000000000..0cf42d440 --- /dev/null +++ b/docs/v2/AipAgents/models/ToolCallGroup.md @@ -0,0 +1,12 @@ +# ToolCallGroup + +List of tool calls that were triggered at the same point in the trace for the agent response generation. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**tool_calls** | List[ToolCall] | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/ToolCallInput.md b/docs/v2/AipAgents/models/ToolCallInput.md new file mode 100644 index 000000000..fbb79864b --- /dev/null +++ b/docs/v2/AipAgents/models/ToolCallInput.md @@ -0,0 +1,12 @@ +# ToolCallInput + +Input parameters for a tool call. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**thought** | Optional[str] | No | Any additional message content that the Agent provided for why it chose to call the tool. | +**inputs** | Dict[ToolInputName, ToolInputValue] | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/ToolCallOutput.md b/docs/v2/AipAgents/models/ToolCallOutput.md new file mode 100644 index 000000000..6161cd1db --- /dev/null +++ b/docs/v2/AipAgents/models/ToolCallOutput.md @@ -0,0 +1,16 @@ +# ToolCallOutput + +The output of a tool call. + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +SuccessToolCallOutput | success +FailureToolCallOutput | failure + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/ToolInputName.md b/docs/v2/AipAgents/models/ToolInputName.md new file mode 100644 index 000000000..e9be5ad52 --- /dev/null +++ b/docs/v2/AipAgents/models/ToolInputName.md @@ -0,0 +1,11 @@ +# ToolInputName + +The name of a tool input parameter. + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/ToolInputValue.md b/docs/v2/AipAgents/models/ToolInputValue.md new file mode 100644 index 000000000..b00ac02ce --- /dev/null +++ b/docs/v2/AipAgents/models/ToolInputValue.md @@ -0,0 +1,16 @@ +# ToolInputValue + +A tool input value, which can be either a string or a Resource Identifier (RID). + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +StringToolInputValue | string +RidToolInputValue | rid + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/ToolMetadata.md b/docs/v2/AipAgents/models/ToolMetadata.md new file mode 100644 index 000000000..b3a53a501 --- /dev/null +++ b/docs/v2/AipAgents/models/ToolMetadata.md @@ -0,0 +1,12 @@ +# ToolMetadata + +Details about the used tool. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**name** | str | Yes | The name of the tool that was called, as configured on the Agent. | +**type** | ToolType | Yes | The type of the tool that was called. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/ToolOutputValue.md b/docs/v2/AipAgents/models/ToolOutputValue.md new file mode 100644 index 000000000..5b4ce71d3 --- /dev/null +++ b/docs/v2/AipAgents/models/ToolOutputValue.md @@ -0,0 +1,16 @@ +# ToolOutputValue + +A tool output value, which can be either a string or a Resource Identifier (RID). + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +StringToolOutputValue | string +RidToolOutputValue | rid + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/ToolType.md b/docs/v2/AipAgents/models/ToolType.md new file mode 100644 index 000000000..34935fe1d --- /dev/null +++ b/docs/v2/AipAgents/models/ToolType.md @@ -0,0 +1,17 @@ +# ToolType + +ToolType + +| **Value** | +| --------- | +| `"FUNCTION"` | +| `"ACTION"` | +| `"ONTOLOGY_SEMANTIC_SEARCH"` | +| `"OBJECT_QUERY"` | +| `"UPDATE_APPLICATION_VARIABLE"` | +| `"REQUEST_CLARIFICATION"` | +| `"OBJECT_QUERY_WITH_SQL"` | +| `"CODE_EXECUTION"` | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/UpdateSessionTitleRequest.md b/docs/v2/AipAgents/models/UpdateSessionTitleRequest.md new file mode 100644 index 000000000..97653ecb4 --- /dev/null +++ b/docs/v2/AipAgents/models/UpdateSessionTitleRequest.md @@ -0,0 +1,11 @@ +# UpdateSessionTitleRequest + +UpdateSessionTitleRequest + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**title** | str | Yes | The new title for the session. The maximum title length is 200 characters. Titles are truncated if they exceed this length. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/AipAgents/models/UserTextInput.md b/docs/v2/AipAgents/models/UserTextInput.md new file mode 100644 index 000000000..5c8d6c55b --- /dev/null +++ b/docs/v2/AipAgents/models/UserTextInput.md @@ -0,0 +1,11 @@ +# UserTextInput + +UserTextInput + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**text** | str | Yes | The user message text. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Audit/LogFile.md b/docs/v2/Audit/LogFile.md new file mode 100644 index 000000000..a02e2af59 --- /dev/null +++ b/docs/v2/Audit/LogFile.md @@ -0,0 +1,123 @@ +# LogFile + +Method | HTTP request | Release Stage | +------------- | ------------- | ----- | +[**content**](#content) | **GET** /v2/audit/organizations/{organizationRid}/logFiles/{logFileId}/content | Stable | +[**list**](#list) | **GET** /v2/audit/organizations/{organizationRid}/logFiles | Stable | + +# **content** + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**organization_rid** | OrganizationRid | | | +**log_file_id** | FileId | | | + +### Return type +**bytes** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# OrganizationRid +organization_rid = None +# FileId +log_file_id = None + + +try: + api_response = client.audit.Organization.LogFile.content(organization_rid, log_file_id) + print("The content response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling LogFile.content: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | bytes | | application/octet-stream | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **list** +Lists all LogFiles. + +This is a paged endpoint. Each page may be smaller or larger than the requested page size. However, it is guaranteed that if there are more results available, the `nextPageToken` field will be populated. To get the next page, make the same request again, but set the value of the `pageToken` query parameter to be value of the `nextPageToken` value of the previous response. If there is no `nextPageToken` field in the response, you are on the last page. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**organization_rid** | OrganizationRid | | | +**end_date** | Optional[date] | List log files for audit events up until this date (inclusive). If absent, defaults to no end date. Use the returned `nextPageToken` to continually poll the `listLogFiles` endpoint to list the latest available logs. | [optional] | +**page_size** | Optional[PageSize] | The page size to use for the endpoint. | [optional] | +**page_token** | Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. | [optional] | +**start_date** | Optional[date] | List log files for audit events starting from this date. This parameter is required for the initial request (when `pageToken` is not provided). | [optional] | + +### Return type +**ListLogFilesResponse** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# OrganizationRid +organization_rid = None +# Optional[date] | List log files for audit events up until this date (inclusive). If absent, defaults to no end date. Use the returned `nextPageToken` to continually poll the `listLogFiles` endpoint to list the latest available logs. +end_date = "2025-01-01" +# Optional[PageSize] | The page size to use for the endpoint. +page_size = None +# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. +page_token = None +# Optional[date] | List log files for audit events starting from this date. This parameter is required for the initial request (when `pageToken` is not provided). +start_date = "2024-01-01" + + +try: + for log_file in client.audit.Organization.LogFile.list( + organization_rid, + end_date=end_date, + page_size=page_size, + page_token=page_token, + start_date=start_date, + ): + pprint(log_file) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling LogFile.list: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | ListLogFilesResponse | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + diff --git a/docs/v2/Audit/Organization.md b/docs/v2/Audit/Organization.md new file mode 100644 index 000000000..4cdf4e059 --- /dev/null +++ b/docs/v2/Audit/Organization.md @@ -0,0 +1,5 @@ +# Organization + +Method | HTTP request | Release Stage | +------------- | ------------- | ----- | + diff --git a/docs/v2/Audit/models/FileId.md b/docs/v2/Audit/models/FileId.md new file mode 100644 index 000000000..bd43c49af --- /dev/null +++ b/docs/v2/Audit/models/FileId.md @@ -0,0 +1,11 @@ +# FileId + +The ID of an audit log file + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Audit/models/ListLogFilesResponse.md b/docs/v2/Audit/models/ListLogFilesResponse.md new file mode 100644 index 000000000..26174db5d --- /dev/null +++ b/docs/v2/Audit/models/ListLogFilesResponse.md @@ -0,0 +1,12 @@ +# ListLogFilesResponse + +ListLogFilesResponse + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**data** | List[LogFile] | Yes | | +**next_page_token** | Optional[PageToken] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Audit/models/LogFile.md b/docs/v2/Audit/models/LogFile.md new file mode 100644 index 000000000..efcc81901 --- /dev/null +++ b/docs/v2/Audit/models/LogFile.md @@ -0,0 +1,11 @@ +# LogFile + +LogFile + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**id** | FileId | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/Connection.md b/docs/v2/Connectivity/Connection.md new file mode 100644 index 000000000..01086edaa --- /dev/null +++ b/docs/v2/Connectivity/Connection.md @@ -0,0 +1,424 @@ +# Connection + +Method | HTTP request | Release Stage | +------------- | ------------- | ----- | +[**create**](#create) | **POST** /v2/connectivity/connections | Public Beta | +[**get**](#get) | **GET** /v2/connectivity/connections/{connectionRid} | Public Beta | +[**get_configuration**](#get_configuration) | **GET** /v2/connectivity/connections/{connectionRid}/getConfiguration | Public Beta | +[**get_configuration_batch**](#get_configuration_batch) | **POST** /v2/connectivity/connections/getConfigurationBatch | Public Beta | +[**update_export_settings**](#update_export_settings) | **POST** /v2/connectivity/connections/{connectionRid}/updateExportSettings | Public Beta | +[**update_secrets**](#update_secrets) | **POST** /v2/connectivity/connections/{connectionRid}/updateSecrets | Stable | +[**upload_custom_jdbc_drivers**](#upload_custom_jdbc_drivers) | **POST** /v2/connectivity/connections/{connectionRid}/uploadCustomJdbcDrivers | Public Beta | + +# **create** +Creates a new Connection with a [direct connection](https://palantir.com/docs/foundry/data-connection/core-concepts/#direct-connection) runtime. + +Any secrets specified in the request body are transmitted over the network encrypted using TLS. Once the +secrets reach Foundry's servers, they will be temporarily decrypted and remain in plaintext in memory to +be processed as needed. They will stay in plaintext in memory until the garbage collection process cleans +up the memory. The secrets are always stored encrypted on our servers. +By using this endpoint, you acknowledge and accept any potential risks associated with the temporary +in-memory handling of secrets. If you do not want your secrets to be temporarily decrypted, you should +use the Foundry UI instead. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**configuration** | CreateConnectionRequestConnectionConfiguration | | | +**display_name** | ConnectionDisplayName | The display name of the Connection. The display name must not be blank. | | +**parent_folder_rid** | FolderRid | | | +**worker** | CreateConnectionRequestConnectionWorker | | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**Connection** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# CreateConnectionRequestConnectionConfiguration +configuration = { + "type": "jdbc", + "url": "jdbc:postgresql://localhost:5432/test", + "driverClass": "org.postgresql.Driver", +} +# ConnectionDisplayName | The display name of the Connection. The display name must not be blank. +display_name = "Connection to my external system" +# FolderRid +parent_folder_rid = "ri.compass.main.folder.c410f510-2937-420e-8ea3-8c9bcb3c1791" +# CreateConnectionRequestConnectionWorker +worker = None +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.connectivity.Connection.create( + configuration=configuration, + display_name=display_name, + parent_folder_rid=parent_folder_rid, + worker=worker, + preview=preview, + ) + print("The create response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Connection.create: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | Connection | The created Connection | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **get** +Get the Connection with the specified rid. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**connection_rid** | ConnectionRid | | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**Connection** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# ConnectionRid +connection_rid = None +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.connectivity.Connection.get(connection_rid, preview=preview) + print("The get response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Connection.get: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | Connection | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **get_configuration** +Retrieves the ConnectionConfiguration of the [Connection](https://palantir.com/docs/foundry/data-connection/set-up-source/) itself. +This operation is intended for use when other Connection data is not required, providing a lighter-weight alternative to `getConnection` operation. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**connection_rid** | ConnectionRid | | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**ConnectionConfiguration** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# ConnectionRid +connection_rid = None +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.connectivity.Connection.get_configuration(connection_rid, preview=preview) + print("The get_configuration response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Connection.get_configuration: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | ConnectionConfiguration | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **get_configuration_batch** +Returns a map of Connection RIDs to their corresponding configurations. +Connections are filtered from the response if they don't exist or the requesting token lacks the required permissions. + + +The maximum batch size for this endpoint is 200. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**body** | List[GetConfigurationConnectionsBatchRequestElement] | Body of the request | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**GetConfigurationConnectionsBatchResponse** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# List[GetConfigurationConnectionsBatchRequestElement] | Body of the request +body = [{"connectionRid": "ri.magritte..source.c078b71b-92f9-41b6-b0df-3760f411120b"}] +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.connectivity.Connection.get_configuration_batch(body, preview=preview) + print("The get_configuration_batch response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Connection.get_configuration_batch: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | GetConfigurationConnectionsBatchResponse | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **update_export_settings** +Updates the [export settings on the Connection.](https://palantir.com/docs/foundry/data-connection/export-overview/#enable-exports-for-source) +Only users with Information Security Officer role can modify the export settings. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**connection_rid** | ConnectionRid | | | +**export_settings** | ConnectionExportSettings | | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**None** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# ConnectionRid +connection_rid = None +# ConnectionExportSettings +export_settings = {"exportsEnabled": True, "exportEnabledWithoutMarkingsValidation": False} +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.connectivity.Connection.update_export_settings( + connection_rid, export_settings=export_settings, preview=preview + ) + print("The update_export_settings response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Connection.update_export_settings: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**204** | None | | None | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **update_secrets** +Updates the secrets on the connection to the specified secret values. +Secrets that are currently configured on the connection but are omitted in the request will remain unchanged. + +Secrets are transmitted over the network encrypted using TLS. Once the secrets reach Foundry's servers, +they will be temporarily decrypted and remain in plaintext in memory to be processed as needed. +They will stay in plaintext in memory until the garbage collection process cleans up the memory. +The secrets are always stored encrypted on our servers. + +By using this endpoint, you acknowledge and accept any potential risks associated with the temporary +in-memory handling of secrets. If you do not want your secrets to be temporarily decrypted, you should +use the Foundry UI instead. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**connection_rid** | ConnectionRid | | | +**secrets** | Dict[SecretName, PlaintextValue] | The secrets to be updated. The specified secret names must already be configured on the connection. | | + +### Return type +**None** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# ConnectionRid +connection_rid = None +# Dict[SecretName, PlaintextValue] | The secrets to be updated. The specified secret names must already be configured on the connection. +secrets = {"Password": "MySecretPassword"} + + +try: + api_response = client.connectivity.Connection.update_secrets(connection_rid, secrets=secrets) + print("The update_secrets response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Connection.update_secrets: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**204** | None | | None | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **upload_custom_jdbc_drivers** +Upload custom jdbc drivers to an existing JDBC connection. +The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**connection_rid** | ConnectionRid | | | +**body** | bytes | Body of the request | | +**file_name** | str | The file name of the uploaded JDBC driver. Must end with .jar | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**Connection** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# ConnectionRid +connection_rid = None +# bytes | Body of the request +body = None +# str | The file name of the uploaded JDBC driver. Must end with .jar +file_name = "cdata.jdbc.oracle.jar" +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.connectivity.Connection.upload_custom_jdbc_drivers( + connection_rid, body, file_name=file_name, preview=preview + ) + print("The upload_custom_jdbc_drivers response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Connection.upload_custom_jdbc_drivers: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | Connection | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + diff --git a/docs/v2/Connectivity/FileImport.md b/docs/v2/Connectivity/FileImport.md new file mode 100644 index 000000000..d1c7412cb --- /dev/null +++ b/docs/v2/Connectivity/FileImport.md @@ -0,0 +1,390 @@ +# FileImport + +Method | HTTP request | Release Stage | +------------- | ------------- | ----- | +[**create**](#create) | **POST** /v2/connectivity/connections/{connectionRid}/fileImports | Public Beta | +[**delete**](#delete) | **DELETE** /v2/connectivity/connections/{connectionRid}/fileImports/{fileImportRid} | Public Beta | +[**execute**](#execute) | **POST** /v2/connectivity/connections/{connectionRid}/fileImports/{fileImportRid}/execute | Public Beta | +[**get**](#get) | **GET** /v2/connectivity/connections/{connectionRid}/fileImports/{fileImportRid} | Public Beta | +[**list**](#list) | **GET** /v2/connectivity/connections/{connectionRid}/fileImports | Public Beta | +[**replace**](#replace) | **PUT** /v2/connectivity/connections/{connectionRid}/fileImports/{fileImportRid} | Public Beta | + +# **create** +Creates a new FileImport. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**connection_rid** | ConnectionRid | | | +**dataset_rid** | DatasetRid | The RID of the output dataset. Can not be modified after the file import is created. | | +**display_name** | FileImportDisplayName | | | +**file_import_filters** | List[FileImportFilter] | Use filters to limit which files should be imported. Filters are applied in the order they are defined. A different ordering of filters may lead to a more optimized import. [Learn more about optimizing file imports.](https://palantir.com/docs/foundry/data-connection/file-based-syncs/#optimize-file-based-syncs) | | +**import_mode** | FileImportMode | | | +**branch_name** | Optional[BranchName] | The branch name in the output dataset that will contain the imported data. Defaults to `master` for most enrollments. Can not be modified after the file import is created. | [optional] | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | +**subfolder** | Optional[str] | A subfolder in the external system that will be imported. If not specified, defaults to the root folder of the external system. | [optional] | + +### Return type +**FileImport** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# ConnectionRid +connection_rid = None +# DatasetRid | The RID of the output dataset. Can not be modified after the file import is created. +dataset_rid = "ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da" +# FileImportDisplayName +display_name = "My file import" +# List[FileImportFilter] | Use filters to limit which files should be imported. Filters are applied in the order they are defined. A different ordering of filters may lead to a more optimized import. [Learn more about optimizing file imports.](https://palantir.com/docs/foundry/data-connection/file-based-syncs/#optimize-file-based-syncs) +file_import_filters = [{"type": "pathMatchesFilter", "regex": "my-subfolder"}] +# FileImportMode +import_mode = "SNAPSHOT" +# Optional[BranchName] | The branch name in the output dataset that will contain the imported data. Defaults to `master` for most enrollments. Can not be modified after the file import is created. +branch_name = "master" +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None +# Optional[str] | A subfolder in the external system that will be imported. If not specified, defaults to the root folder of the external system. +subfolder = "subfolder1/subfolder2" + + +try: + api_response = client.connectivity.Connection.FileImport.create( + connection_rid, + dataset_rid=dataset_rid, + display_name=display_name, + file_import_filters=file_import_filters, + import_mode=import_mode, + branch_name=branch_name, + preview=preview, + subfolder=subfolder, + ) + print("The create response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling FileImport.create: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | FileImport | The created FileImport | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **delete** +Delete the FileImport with the specified RID. +Deleting the file import does not delete the destination dataset but the dataset will no longer +be updated by this import. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**connection_rid** | ConnectionRid | | | +**file_import_rid** | FileImportRid | | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**None** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# ConnectionRid +connection_rid = None +# FileImportRid +file_import_rid = None +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.connectivity.Connection.FileImport.delete( + connection_rid, file_import_rid, preview=preview + ) + print("The delete response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling FileImport.delete: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**204** | None | | None | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **execute** +Executes the FileImport, which runs asynchronously as a [Foundry Build](https://palantir.com/docs/foundry/data-integration/builds/). +The returned BuildRid can be used to check the status via the Orchestration API. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**connection_rid** | ConnectionRid | | | +**file_import_rid** | FileImportRid | | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**BuildRid** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# ConnectionRid +connection_rid = None +# FileImportRid +file_import_rid = None +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.connectivity.Connection.FileImport.execute( + connection_rid, file_import_rid, preview=preview + ) + print("The execute response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling FileImport.execute: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | BuildRid | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **get** +Get the FileImport with the specified rid. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**connection_rid** | ConnectionRid | | | +**file_import_rid** | FileImportRid | | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**FileImport** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# ConnectionRid +connection_rid = None +# FileImportRid +file_import_rid = None +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.connectivity.Connection.FileImport.get( + connection_rid, file_import_rid, preview=preview + ) + print("The get response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling FileImport.get: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | FileImport | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **list** +Lists all file imports defined for this connection. +Only file imports that the user has permissions to view will be returned. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**connection_rid** | ConnectionRid | | | +**page_size** | Optional[PageSize] | The page size to use for the endpoint. | [optional] | +**page_token** | Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. | [optional] | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**ListFileImportsResponse** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# ConnectionRid +connection_rid = None +# Optional[PageSize] | The page size to use for the endpoint. +page_size = None +# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. +page_token = None +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + for file_import in client.connectivity.Connection.FileImport.list( + connection_rid, page_size=page_size, page_token=page_token, preview=preview + ): + pprint(file_import) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling FileImport.list: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | ListFileImportsResponse | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **replace** +Replace the FileImport with the specified rid. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**connection_rid** | ConnectionRid | | | +**file_import_rid** | FileImportRid | | | +**display_name** | FileImportDisplayName | | | +**file_import_filters** | List[FileImportFilter] | Use filters to limit which files should be imported. Filters are applied in the order they are defined. A different ordering of filters may lead to a more optimized import. [Learn more about optimizing file imports.](https://palantir.com/docs/foundry/data-connection/file-based-syncs/#optimize-file-based-syncs) | | +**import_mode** | FileImportMode | | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | +**subfolder** | Optional[str] | A subfolder in the external system that will be imported. If not specified, defaults to the root folder of the external system. | [optional] | + +### Return type +**FileImport** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# ConnectionRid +connection_rid = None +# FileImportRid +file_import_rid = None +# FileImportDisplayName +display_name = "My file import" +# List[FileImportFilter] | Use filters to limit which files should be imported. Filters are applied in the order they are defined. A different ordering of filters may lead to a more optimized import. [Learn more about optimizing file imports.](https://palantir.com/docs/foundry/data-connection/file-based-syncs/#optimize-file-based-syncs) +file_import_filters = [{"type": "pathMatchesFilter", "regex": "my-subfolder"}] +# FileImportMode +import_mode = "SNAPSHOT" +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None +# Optional[str] | A subfolder in the external system that will be imported. If not specified, defaults to the root folder of the external system. +subfolder = "subfolder1/subfolder2" + + +try: + api_response = client.connectivity.Connection.FileImport.replace( + connection_rid, + file_import_rid, + display_name=display_name, + file_import_filters=file_import_filters, + import_mode=import_mode, + preview=preview, + subfolder=subfolder, + ) + print("The replace response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling FileImport.replace: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | FileImport | The replaced FileImport | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + diff --git a/docs/v2/Connectivity/TableImport.md b/docs/v2/Connectivity/TableImport.md new file mode 100644 index 000000000..ef6edbe5b --- /dev/null +++ b/docs/v2/Connectivity/TableImport.md @@ -0,0 +1,390 @@ +# TableImport + +Method | HTTP request | Release Stage | +------------- | ------------- | ----- | +[**create**](#create) | **POST** /v2/connectivity/connections/{connectionRid}/tableImports | Public Beta | +[**delete**](#delete) | **DELETE** /v2/connectivity/connections/{connectionRid}/tableImports/{tableImportRid} | Public Beta | +[**execute**](#execute) | **POST** /v2/connectivity/connections/{connectionRid}/tableImports/{tableImportRid}/execute | Public Beta | +[**get**](#get) | **GET** /v2/connectivity/connections/{connectionRid}/tableImports/{tableImportRid} | Public Beta | +[**list**](#list) | **GET** /v2/connectivity/connections/{connectionRid}/tableImports | Public Beta | +[**replace**](#replace) | **PUT** /v2/connectivity/connections/{connectionRid}/tableImports/{tableImportRid} | Public Beta | + +# **create** +Creates a new TableImport. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**connection_rid** | ConnectionRid | | | +**config** | CreateTableImportRequestTableImportConfig | | | +**dataset_rid** | DatasetRid | The RID of the output dataset. Can not be modified after the table import is created. | | +**display_name** | TableImportDisplayName | | | +**import_mode** | TableImportMode | | | +**allow_schema_changes** | Optional[TableImportAllowSchemaChanges] | Allow the TableImport to succeed if the schema of imported rows does not match the existing dataset's schema. Defaults to false for new table imports. | [optional] | +**branch_name** | Optional[BranchName] | The branch name in the output dataset that will contain the imported data. Defaults to `master` for most enrollments. Can not be modified after the table import is created. | [optional] | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**TableImport** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# ConnectionRid +connection_rid = None +# CreateTableImportRequestTableImportConfig +config = {"type": "jdbcImportConfig", "query": "SELECT * FROM table"} +# DatasetRid | The RID of the output dataset. Can not be modified after the table import is created. +dataset_rid = "ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da" +# TableImportDisplayName +display_name = "My table import" +# TableImportMode +import_mode = "SNAPSHOT" +# Optional[TableImportAllowSchemaChanges] | Allow the TableImport to succeed if the schema of imported rows does not match the existing dataset's schema. Defaults to false for new table imports. +allow_schema_changes = True +# Optional[BranchName] | The branch name in the output dataset that will contain the imported data. Defaults to `master` for most enrollments. Can not be modified after the table import is created. +branch_name = "master" +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.connectivity.Connection.TableImport.create( + connection_rid, + config=config, + dataset_rid=dataset_rid, + display_name=display_name, + import_mode=import_mode, + allow_schema_changes=allow_schema_changes, + branch_name=branch_name, + preview=preview, + ) + print("The create response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling TableImport.create: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | TableImport | The created TableImport | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **delete** +Delete the TableImport with the specified RID. +Deleting the table import does not delete the destination dataset but the dataset will no longer +be updated by this import. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**connection_rid** | ConnectionRid | | | +**table_import_rid** | TableImportRid | | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**None** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# ConnectionRid +connection_rid = None +# TableImportRid +table_import_rid = None +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.connectivity.Connection.TableImport.delete( + connection_rid, table_import_rid, preview=preview + ) + print("The delete response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling TableImport.delete: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**204** | None | | None | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **execute** +Executes the TableImport, which runs asynchronously as a [Foundry Build](https://palantir.com/docs/foundry/data-integration/builds/). +The returned BuildRid can be used to check the status via the Orchestration API. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**connection_rid** | ConnectionRid | | | +**table_import_rid** | TableImportRid | | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**BuildRid** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# ConnectionRid +connection_rid = None +# TableImportRid +table_import_rid = None +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.connectivity.Connection.TableImport.execute( + connection_rid, table_import_rid, preview=preview + ) + print("The execute response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling TableImport.execute: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | BuildRid | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **get** +Get the TableImport with the specified rid. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**connection_rid** | ConnectionRid | | | +**table_import_rid** | TableImportRid | | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**TableImport** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# ConnectionRid +connection_rid = None +# TableImportRid +table_import_rid = None +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.connectivity.Connection.TableImport.get( + connection_rid, table_import_rid, preview=preview + ) + print("The get response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling TableImport.get: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | TableImport | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **list** +Lists all table imports defined for this connection. +Only table imports that the user has permissions to view will be returned. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**connection_rid** | ConnectionRid | | | +**page_size** | Optional[PageSize] | The page size to use for the endpoint. | [optional] | +**page_token** | Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. | [optional] | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**ListTableImportsResponse** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# ConnectionRid +connection_rid = None +# Optional[PageSize] | The page size to use for the endpoint. +page_size = None +# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. +page_token = None +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + for table_import in client.connectivity.Connection.TableImport.list( + connection_rid, page_size=page_size, page_token=page_token, preview=preview + ): + pprint(table_import) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling TableImport.list: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | ListTableImportsResponse | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **replace** +Replace the TableImport with the specified rid. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**connection_rid** | ConnectionRid | | | +**table_import_rid** | TableImportRid | | | +**config** | ReplaceTableImportRequestTableImportConfig | | | +**display_name** | TableImportDisplayName | | | +**import_mode** | TableImportMode | | | +**allow_schema_changes** | Optional[TableImportAllowSchemaChanges] | Allow the TableImport to succeed if the schema of imported rows does not match the existing dataset's schema. Defaults to false for new table imports. | [optional] | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**TableImport** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# ConnectionRid +connection_rid = None +# TableImportRid +table_import_rid = None +# ReplaceTableImportRequestTableImportConfig +config = {"type": "jdbcImportConfig", "query": "SELECT * FROM table"} +# TableImportDisplayName +display_name = "My table import" +# TableImportMode +import_mode = "SNAPSHOT" +# Optional[TableImportAllowSchemaChanges] | Allow the TableImport to succeed if the schema of imported rows does not match the existing dataset's schema. Defaults to false for new table imports. +allow_schema_changes = True +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.connectivity.Connection.TableImport.replace( + connection_rid, + table_import_rid, + config=config, + display_name=display_name, + import_mode=import_mode, + allow_schema_changes=allow_schema_changes, + preview=preview, + ) + print("The replace response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling TableImport.replace: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | TableImport | The replaced TableImport | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + diff --git a/docs/v2/Connectivity/VirtualTable.md b/docs/v2/Connectivity/VirtualTable.md new file mode 100644 index 000000000..702752898 --- /dev/null +++ b/docs/v2/Connectivity/VirtualTable.md @@ -0,0 +1,77 @@ +# VirtualTable + +Method | HTTP request | Release Stage | +------------- | ------------- | ----- | +[**create**](#create) | **POST** /v2/connectivity/connections/{connectionRid}/virtualTables | Public Beta | + +# **create** +Creates a new [Virtual Table](https://palantir.com/docs/foundry/data-integration/virtual-tables/) from an upstream table. The VirtualTable will be created +in the specified parent folder and can be queried through Foundry's data access APIs. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**connection_rid** | ConnectionRid | | | +**config** | VirtualTableConfig | | | +**name** | TableName | | | +**parent_rid** | FolderRid | | | +**markings** | Optional[List[MarkingId]] | | [optional] | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**VirtualTable** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# ConnectionRid +connection_rid = None +# VirtualTableConfig +config = None +# TableName +name = "my_table" +# FolderRid +parent_rid = "ri.compass.main.folder.c410f510-2937-420e-8ea3-8c9bcb3c1791" +# Optional[List[MarkingId]] +markings = ["18212f9a-0e63-4b79-96a0-aae04df23336"] +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.connectivity.Connection.VirtualTable.create( + connection_rid, + config=config, + name=name, + parent_rid=parent_rid, + markings=markings, + preview=preview, + ) + print("The create response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling VirtualTable.create: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | VirtualTable | The created VirtualTable | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + diff --git a/docs/v2/Connectivity/models/ApiKeyAuthentication.md b/docs/v2/Connectivity/models/ApiKeyAuthentication.md new file mode 100644 index 000000000..96aa6d1a5 --- /dev/null +++ b/docs/v2/Connectivity/models/ApiKeyAuthentication.md @@ -0,0 +1,15 @@ +# ApiKeyAuthentication + +The API key used to authenticate to the external system. +This can be configured as a header or query parameter. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**location** | RestRequestApiKeyLocation | Yes | The location of the API key in the request. | +**api_key** | EncryptedProperty | Yes | The value of the API key. | +**type** | Literal["apiKey"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/AsPlaintextValue.md b/docs/v2/Connectivity/models/AsPlaintextValue.md new file mode 100644 index 000000000..e66ef9380 --- /dev/null +++ b/docs/v2/Connectivity/models/AsPlaintextValue.md @@ -0,0 +1,12 @@ +# AsPlaintextValue + +AsPlaintextValue + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**value** | PlaintextValue | Yes | | +**type** | Literal["asPlaintextValue"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/AsSecretName.md b/docs/v2/Connectivity/models/AsSecretName.md new file mode 100644 index 000000000..727658c68 --- /dev/null +++ b/docs/v2/Connectivity/models/AsSecretName.md @@ -0,0 +1,12 @@ +# AsSecretName + +AsSecretName + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**value** | SecretName | Yes | | +**type** | Literal["asSecretName"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/AwsAccessKey.md b/docs/v2/Connectivity/models/AwsAccessKey.md new file mode 100644 index 000000000..72999bc72 --- /dev/null +++ b/docs/v2/Connectivity/models/AwsAccessKey.md @@ -0,0 +1,18 @@ +# AwsAccessKey + +[Access keys](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html) are long-term +credentials for an IAM user or the AWS account root user. +Access keys consist of two parts: an access key ID (for example, AKIAIOSFODNN7EXAMPLE) and a secret access +key (for example, wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY). You must use both the access key ID and +secret access key together to authenticate your requests. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**access_key_id** | str | Yes | | +**secret_access_key** | EncryptedProperty | Yes | | +**type** | Literal["awsAccessKey"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/AwsOidcAuthentication.md b/docs/v2/Connectivity/models/AwsOidcAuthentication.md new file mode 100644 index 000000000..f1a1b65b9 --- /dev/null +++ b/docs/v2/Connectivity/models/AwsOidcAuthentication.md @@ -0,0 +1,16 @@ +# AwsOidcAuthentication + +[OpenID Connect (OIDC)](https://palantir.com/docs/foundry/data-connection/oidc/) is an open authentication protocol that allows +you to authenticate to external system resources without the use of static credentials. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**audience** | str | Yes | The configured audience that identifies the external system. | +**issuer_url** | str | Yes | The URL that identifies Foundry as an OIDC identity provider. | +**subject** | ConnectionRid | Yes | The RID of the Connection that is connecting to the external system. | +**type** | Literal["oidc"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/BasicCredentials.md b/docs/v2/Connectivity/models/BasicCredentials.md new file mode 100644 index 000000000..673718486 --- /dev/null +++ b/docs/v2/Connectivity/models/BasicCredentials.md @@ -0,0 +1,13 @@ +# BasicCredentials + +BasicCredentials + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**username** | str | Yes | | +**password** | EncryptedProperty | Yes | | +**type** | Literal["basic"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/BearerToken.md b/docs/v2/Connectivity/models/BearerToken.md new file mode 100644 index 000000000..74786cb14 --- /dev/null +++ b/docs/v2/Connectivity/models/BearerToken.md @@ -0,0 +1,12 @@ +# BearerToken + +The bearer token used to authenticate to the external system. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**bearer_token** | EncryptedProperty | Yes | | +**type** | Literal["bearerToken"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/BigQueryVirtualTableConfig.md b/docs/v2/Connectivity/models/BigQueryVirtualTableConfig.md new file mode 100644 index 000000000..5f1d86298 --- /dev/null +++ b/docs/v2/Connectivity/models/BigQueryVirtualTableConfig.md @@ -0,0 +1,14 @@ +# BigQueryVirtualTableConfig + +Pointer to the table in BigQuery. Uses the BigQuery table identifier of project, dataset and table. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**project** | str | Yes | The BigQuery project name. | +**dataset** | str | Yes | The BigQuery dataset name. | +**table** | str | Yes | The BigQuery table name. | +**type** | Literal["bigquery"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/CloudIdentity.md b/docs/v2/Connectivity/models/CloudIdentity.md new file mode 100644 index 000000000..ad79daa69 --- /dev/null +++ b/docs/v2/Connectivity/models/CloudIdentity.md @@ -0,0 +1,14 @@ +# CloudIdentity + +[Cloud identities](https://palantir.com/docs/foundry/administration/configure-cloud-identities/) allow you to authenticate to +cloud provider resources without the use of static credentials. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**cloud_identity_rid** | CloudIdentityRid | Yes | | +**type** | Literal["cloudIdentity"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/CloudIdentityRid.md b/docs/v2/Connectivity/models/CloudIdentityRid.md new file mode 100644 index 000000000..f79772852 --- /dev/null +++ b/docs/v2/Connectivity/models/CloudIdentityRid.md @@ -0,0 +1,12 @@ +# CloudIdentityRid + +The Resource Identifier (RID) of a Cloud Identity. + + +## Type +```python +RID +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/Connection.md b/docs/v2/Connectivity/models/Connection.md new file mode 100644 index 000000000..a5defae3b --- /dev/null +++ b/docs/v2/Connectivity/models/Connection.md @@ -0,0 +1,16 @@ +# Connection + +Connection + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**rid** | ConnectionRid | Yes | | +**parent_folder_rid** | FolderRid | Yes | | +**display_name** | ConnectionDisplayName | Yes | The display name of the Connection. The display name must not be blank. | +**export_settings** | ConnectionExportSettings | Yes | | +**worker** | ConnectionWorker | Yes | | +**configuration** | ConnectionConfiguration | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/ConnectionConfiguration.md b/docs/v2/Connectivity/models/ConnectionConfiguration.md new file mode 100644 index 000000000..623d9f095 --- /dev/null +++ b/docs/v2/Connectivity/models/ConnectionConfiguration.md @@ -0,0 +1,20 @@ +# ConnectionConfiguration + +ConnectionConfiguration + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +S3ConnectionConfiguration | s3 +RestConnectionConfiguration | rest +SnowflakeConnectionConfiguration | snowflake +DatabricksConnectionConfiguration | databricks +SmbConnectionConfiguration | smb +JdbcConnectionConfiguration | jdbc + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/ConnectionDisplayName.md b/docs/v2/Connectivity/models/ConnectionDisplayName.md new file mode 100644 index 000000000..4eb7400e4 --- /dev/null +++ b/docs/v2/Connectivity/models/ConnectionDisplayName.md @@ -0,0 +1,11 @@ +# ConnectionDisplayName + +The display name of the Connection. The display name must not be blank. + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/ConnectionExportSettings.md b/docs/v2/Connectivity/models/ConnectionExportSettings.md new file mode 100644 index 000000000..dccb94bf0 --- /dev/null +++ b/docs/v2/Connectivity/models/ConnectionExportSettings.md @@ -0,0 +1,13 @@ +# ConnectionExportSettings + +The [export settings of a Connection](https://palantir.com/docs/foundry/data-connection/export-overview/#enable-exports-for-source). + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**exports_enabled** | bool | Yes | Allow exporting datasets from Foundry to this Connection. | +**export_enabled_without_markings_validation** | bool | Yes | In certain interactive workflows the Connection can be used in, it is not currently possible to validate the security markings of the data being exported. By enabling exports without markings validation, you acknowledge that you are responsible for ensuring that the data being exported is compliant with your organization's policies. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/ConnectionRid.md b/docs/v2/Connectivity/models/ConnectionRid.md new file mode 100644 index 000000000..d1c5ca4be --- /dev/null +++ b/docs/v2/Connectivity/models/ConnectionRid.md @@ -0,0 +1,12 @@ +# ConnectionRid + +The Resource Identifier (RID) of a Connection (also known as a source). + + +## Type +```python +RID +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/ConnectionWorker.md b/docs/v2/Connectivity/models/ConnectionWorker.md new file mode 100644 index 000000000..c26cd310f --- /dev/null +++ b/docs/v2/Connectivity/models/ConnectionWorker.md @@ -0,0 +1,18 @@ +# ConnectionWorker + +[The worker of a Connection](https://palantir.com/docs/foundry/data-connection/core-concepts/#workers), which defines where +compute for capabilities are run. + + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +UnknownWorker | unknownWorker +FoundryWorker | foundryWorker + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/CreateConnectionRequest.md b/docs/v2/Connectivity/models/CreateConnectionRequest.md new file mode 100644 index 000000000..75e69a65a --- /dev/null +++ b/docs/v2/Connectivity/models/CreateConnectionRequest.md @@ -0,0 +1,14 @@ +# CreateConnectionRequest + +CreateConnectionRequest + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**parent_folder_rid** | FolderRid | Yes | | +**configuration** | CreateConnectionRequestConnectionConfiguration | Yes | | +**display_name** | ConnectionDisplayName | Yes | The display name of the Connection. The display name must not be blank. | +**worker** | CreateConnectionRequestConnectionWorker | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/CreateConnectionRequestAsPlaintextValue.md b/docs/v2/Connectivity/models/CreateConnectionRequestAsPlaintextValue.md new file mode 100644 index 000000000..5531cf785 --- /dev/null +++ b/docs/v2/Connectivity/models/CreateConnectionRequestAsPlaintextValue.md @@ -0,0 +1,12 @@ +# CreateConnectionRequestAsPlaintextValue + +CreateConnectionRequestAsPlaintextValue + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**value** | PlaintextValue | Yes | | +**type** | Literal["asPlaintextValue"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/CreateConnectionRequestAsSecretName.md b/docs/v2/Connectivity/models/CreateConnectionRequestAsSecretName.md new file mode 100644 index 000000000..e1ffb6efb --- /dev/null +++ b/docs/v2/Connectivity/models/CreateConnectionRequestAsSecretName.md @@ -0,0 +1,12 @@ +# CreateConnectionRequestAsSecretName + +CreateConnectionRequestAsSecretName + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**value** | SecretName | Yes | | +**type** | Literal["asSecretName"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/CreateConnectionRequestBasicCredentials.md b/docs/v2/Connectivity/models/CreateConnectionRequestBasicCredentials.md new file mode 100644 index 000000000..1f7285d6f --- /dev/null +++ b/docs/v2/Connectivity/models/CreateConnectionRequestBasicCredentials.md @@ -0,0 +1,13 @@ +# CreateConnectionRequestBasicCredentials + +CreateConnectionRequestBasicCredentials + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**password** | CreateConnectionRequestEncryptedProperty | Yes | | +**username** | str | Yes | | +**type** | Literal["basic"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/CreateConnectionRequestConnectionConfiguration.md b/docs/v2/Connectivity/models/CreateConnectionRequestConnectionConfiguration.md new file mode 100644 index 000000000..7b5e01354 --- /dev/null +++ b/docs/v2/Connectivity/models/CreateConnectionRequestConnectionConfiguration.md @@ -0,0 +1,20 @@ +# CreateConnectionRequestConnectionConfiguration + +CreateConnectionRequestConnectionConfiguration + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +CreateConnectionRequestS3ConnectionConfiguration | s3 +CreateConnectionRequestRestConnectionConfiguration | rest +CreateConnectionRequestSnowflakeConnectionConfiguration | snowflake +CreateConnectionRequestDatabricksConnectionConfiguration | databricks +CreateConnectionRequestSmbConnectionConfiguration | smb +CreateConnectionRequestJdbcConnectionConfiguration | jdbc + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/CreateConnectionRequestConnectionWorker.md b/docs/v2/Connectivity/models/CreateConnectionRequestConnectionWorker.md new file mode 100644 index 000000000..accfbb35b --- /dev/null +++ b/docs/v2/Connectivity/models/CreateConnectionRequestConnectionWorker.md @@ -0,0 +1,18 @@ +# CreateConnectionRequestConnectionWorker + +[The worker of a Connection](https://palantir.com/docs/foundry/data-connection/core-concepts/#workers), which defines where +compute for capabilities are run. + + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +CreateConnectionRequestUnknownWorker | unknownWorker +CreateConnectionRequestFoundryWorker | foundryWorker + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/CreateConnectionRequestDatabricksAuthenticationMode.md b/docs/v2/Connectivity/models/CreateConnectionRequestDatabricksAuthenticationMode.md new file mode 100644 index 000000000..eb1ad5085 --- /dev/null +++ b/docs/v2/Connectivity/models/CreateConnectionRequestDatabricksAuthenticationMode.md @@ -0,0 +1,18 @@ +# CreateConnectionRequestDatabricksAuthenticationMode + +The method of authentication for connecting to an external Databricks system. + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +CreateConnectionRequestWorkflowIdentityFederation | workflowIdentityFederation +CreateConnectionRequestOauthMachineToMachineAuth | oauthM2M +CreateConnectionRequestPersonalAccessToken | personalAccessToken +CreateConnectionRequestBasicCredentials | basic + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/CreateConnectionRequestDatabricksConnectionConfiguration.md b/docs/v2/Connectivity/models/CreateConnectionRequestDatabricksConnectionConfiguration.md new file mode 100644 index 000000000..2554b50e4 --- /dev/null +++ b/docs/v2/Connectivity/models/CreateConnectionRequestDatabricksConnectionConfiguration.md @@ -0,0 +1,15 @@ +# CreateConnectionRequestDatabricksConnectionConfiguration + +CreateConnectionRequestDatabricksConnectionConfiguration + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**host_name** | str | Yes | The hostname of the Databricks workspace. | +**http_path** | str | Yes | The Databricks compute resource’s HTTP Path value. | +**jdbc_properties** | JdbcProperties | Yes | | +**authentication** | CreateConnectionRequestDatabricksAuthenticationMode | Yes | The method of authentication to use. | +**type** | Literal["databricks"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/CreateConnectionRequestEncryptedProperty.md b/docs/v2/Connectivity/models/CreateConnectionRequestEncryptedProperty.md new file mode 100644 index 000000000..3ccaa14ba --- /dev/null +++ b/docs/v2/Connectivity/models/CreateConnectionRequestEncryptedProperty.md @@ -0,0 +1,21 @@ +# CreateConnectionRequestEncryptedProperty + +When reading an encrypted property, the secret name representing the encrypted value will be returned. +When writing to an encrypted property: +- If a plaintext value is passed as an input, the plaintext value will be encrypted and saved to the property. +- If a secret name is passed as an input, the secret name must match the existing secret name of the property + and the property will retain its previously encrypted value. + + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +CreateConnectionRequestAsSecretName | asSecretName +CreateConnectionRequestAsPlaintextValue | asPlaintextValue + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/CreateConnectionRequestFoundryWorker.md b/docs/v2/Connectivity/models/CreateConnectionRequestFoundryWorker.md new file mode 100644 index 000000000..e1eb25467 --- /dev/null +++ b/docs/v2/Connectivity/models/CreateConnectionRequestFoundryWorker.md @@ -0,0 +1,12 @@ +# CreateConnectionRequestFoundryWorker + +CreateConnectionRequestFoundryWorker + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**network_egress_policy_rids** | List[NetworkEgressPolicyRid] | Yes | | +**type** | Literal["foundryWorker"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/CreateConnectionRequestJdbcConnectionConfiguration.md b/docs/v2/Connectivity/models/CreateConnectionRequestJdbcConnectionConfiguration.md new file mode 100644 index 000000000..3c30dc25d --- /dev/null +++ b/docs/v2/Connectivity/models/CreateConnectionRequestJdbcConnectionConfiguration.md @@ -0,0 +1,15 @@ +# CreateConnectionRequestJdbcConnectionConfiguration + +CreateConnectionRequestJdbcConnectionConfiguration + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**credentials** | Optional[BasicCredentials] | No | | +**driver_class** | str | Yes | The fully-qualified driver class name that is used to connect to the database. | +**jdbc_properties** | JdbcProperties | Yes | | +**url** | str | Yes | The URL that the JDBC driver uses to connect to a database. | +**type** | Literal["jdbc"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/CreateConnectionRequestOauthMachineToMachineAuth.md b/docs/v2/Connectivity/models/CreateConnectionRequestOauthMachineToMachineAuth.md new file mode 100644 index 000000000..e2adde387 --- /dev/null +++ b/docs/v2/Connectivity/models/CreateConnectionRequestOauthMachineToMachineAuth.md @@ -0,0 +1,13 @@ +# CreateConnectionRequestOauthMachineToMachineAuth + +CreateConnectionRequestOauthMachineToMachineAuth + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**client_id** | str | Yes | The client ID for the service principal. | +**client_secret** | CreateConnectionRequestEncryptedProperty | Yes | The value of the client secret. | +**type** | Literal["oauthM2M"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/CreateConnectionRequestPersonalAccessToken.md b/docs/v2/Connectivity/models/CreateConnectionRequestPersonalAccessToken.md new file mode 100644 index 000000000..b6c8b7fab --- /dev/null +++ b/docs/v2/Connectivity/models/CreateConnectionRequestPersonalAccessToken.md @@ -0,0 +1,12 @@ +# CreateConnectionRequestPersonalAccessToken + +CreateConnectionRequestPersonalAccessToken + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**personal_access_token** | CreateConnectionRequestEncryptedProperty | Yes | | +**type** | Literal["personalAccessToken"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/CreateConnectionRequestRestConnectionConfiguration.md b/docs/v2/Connectivity/models/CreateConnectionRequestRestConnectionConfiguration.md new file mode 100644 index 000000000..d362d778b --- /dev/null +++ b/docs/v2/Connectivity/models/CreateConnectionRequestRestConnectionConfiguration.md @@ -0,0 +1,14 @@ +# CreateConnectionRequestRestConnectionConfiguration + +CreateConnectionRequestRestConnectionConfiguration + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**additional_secrets** | Optional[RestConnectionAdditionalSecrets] | No | Additional secrets that can be referenced in code and webhook configurations. If not provided, no additional secrets will be created. | +**oauth2_client_rid** | Optional[RID] | No | The RID of the [Outbound application](https://palantir.com/docs/foundry/administration/configure-outbound-applications) that is used to authenticate to the external system via OAuth2. Currently, a connection may use only one outbound application for OAuth 2.0 authentication. Selecting a different outbound application will update the configuration for all domains with OAuth 2.0 as the selected authorization. | +**domains** | List[Domain] | Yes | The domains that the connection is allowed to access. At least one domain must be specified. | +**type** | Literal["rest"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/CreateConnectionRequestS3ConnectionConfiguration.md b/docs/v2/Connectivity/models/CreateConnectionRequestS3ConnectionConfiguration.md new file mode 100644 index 000000000..748c75272 --- /dev/null +++ b/docs/v2/Connectivity/models/CreateConnectionRequestS3ConnectionConfiguration.md @@ -0,0 +1,25 @@ +# CreateConnectionRequestS3ConnectionConfiguration + +CreateConnectionRequestS3ConnectionConfiguration + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**connection_timeout_millis** | Optional[Long] | No | The amount of time (in milliseconds) to wait when initially establishing a connection before giving up and timing out. If not specified, defaults to 10000 as defined by the [AWS SDK default](https://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/ClientConfiguration.html#DEFAULT_CONNECTION_TIMEOUT). | +**max_error_retry** | Optional[int] | No | The maximum number of retry attempts for failed requests to the S3 service. If not specified, defaults to 3 as defined by the [AWS SDK default](https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/retry-strategy.html#retry-strategies). | +**bucket_url** | str | Yes | The URL of the S3 bucket. The URL should contain a trailing slash. | +**client_kms_configuration** | Optional[S3KmsConfiguration] | No | The client-side KMS key to use for encryption and decryption of data in the S3 bucket. If not specified, the default KMS key for the bucket is used. | +**match_subfolder_exactly** | Optional[bool] | No | If true, only files in the subfolder specified in the bucket URL will be synced. If false, all files in the bucket will be synced. If not specified, defaults to false. | +**sts_role_configuration** | Optional[StsRoleConfiguration] | No | The configuration needed to assume a role to connect to the S3 external system. | +**s3_endpoint** | Optional[str] | No | The endpoint of the S3 service. This is used to connect to a custom S3 service that is not AWS S3. If not specified, defaults to the [AWS S3 endpoint](https://docs.aws.amazon.com/general/latest/gr/s3.html). Warning: Specifying a region and a custom endpoint containing a region can lead to unexpected behavior. | +**socket_timeout_millis** | Optional[Long] | No | The amount of time (in milliseconds) to wait for data to be transferred over an established, open connection. If not specified, defaults to 50000 as defined by the [AWS SDK default](https://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/ClientConfiguration.html#DEFAULT_SOCKET_TIMEOUT). | +**enable_requester_pays** | Optional[bool] | No | Defaults to false, unless set and overwritten. If true, includes the [requester pays header](https://docs.aws.amazon.com/AmazonS3/latest/userguide/RequesterPaysBuckets.html) in requests, allowing reads from requester pays buckets. | +**s3_endpoint_signing_region** | Optional[Region] | No | The region used when constructing the S3 client using a custom endpoint. This is often not required and would only be needed if you are using the S3 connector with an S3-compliant third-party API, and are also setting a custom endpoint that requires a non-default region. | +**region** | Optional[Region] | No | The region representing the location of the S3 bucket. Warning: Specifying a region and a custom endpoint containing a region can lead to unexpected behavior. | +**authentication_mode** | Optional[S3AuthenticationMode] | No | The authentication mode to use to connect to the S3 external system. No authentication mode is required to connect to publicly accessible AWS S3 buckets. | +**proxy_configuration** | Optional[S3ProxyConfiguration] | No | The configuration needed to connect to the S3 external system through a proxy. | +**max_connections** | Optional[int] | No | The maximum number of HTTP connections to the S3 service per sync. If not specified, defaults to 50 as defined by the [AWS SDK default](https://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/ClientConfiguration.html#DEFAULT_MAX_CONNECTIONS). | +**type** | Literal["s3"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/CreateConnectionRequestSmbAuth.md b/docs/v2/Connectivity/models/CreateConnectionRequestSmbAuth.md new file mode 100644 index 000000000..99606a5b7 --- /dev/null +++ b/docs/v2/Connectivity/models/CreateConnectionRequestSmbAuth.md @@ -0,0 +1,11 @@ +# CreateConnectionRequestSmbAuth + +CreateConnectionRequestSmbAuth + +## Type +```python +CreateConnectionRequestSmbUsernamePasswordAuth +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/CreateConnectionRequestSmbConnectionConfiguration.md b/docs/v2/Connectivity/models/CreateConnectionRequestSmbConnectionConfiguration.md new file mode 100644 index 000000000..cd77d46ec --- /dev/null +++ b/docs/v2/Connectivity/models/CreateConnectionRequestSmbConnectionConfiguration.md @@ -0,0 +1,18 @@ +# CreateConnectionRequestSmbConnectionConfiguration + +CreateConnectionRequestSmbConnectionConfiguration + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**proxy** | Optional[SmbProxyConfiguration] | No | | +**hostname** | str | Yes | Any identifier that can resolve to a server hosting an SMB share. This includes IP addresses, local network names (e.g. FS-SERVER-01) or FQDNs. Should not include any protocol information like https://, smb://, etc | +**port** | Optional[int] | No | 445 by default | +**auth** | CreateConnectionRequestSmbAuth | Yes | | +**share** | str | Yes | Must be a valid SMB share name. https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-fscc/dc9978d7-6299-4c5a-a22d-a039cdc716ea | +**base_directory** | Optional[str] | No | All reads and writes in this source will happen in this subdirectory | +**require_message_signing** | Optional[bool] | No | If true, the client will request that the server sign all messages. If the server does not support message signing, the connection will fail. Defaults to true. | +**type** | Literal["smb"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/CreateConnectionRequestSmbUsernamePasswordAuth.md b/docs/v2/Connectivity/models/CreateConnectionRequestSmbUsernamePasswordAuth.md new file mode 100644 index 000000000..0f6a3b20f --- /dev/null +++ b/docs/v2/Connectivity/models/CreateConnectionRequestSmbUsernamePasswordAuth.md @@ -0,0 +1,14 @@ +# CreateConnectionRequestSmbUsernamePasswordAuth + +CreateConnectionRequestSmbUsernamePasswordAuth + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**password** | CreateConnectionRequestEncryptedProperty | Yes | | +**domain** | Optional[str] | No | Optionally specify a Windows domain to use when authenticating. Normal DNS domain restrictions apply but the top-level domain might be something non-standard like .local. Defaults to WORKGROUP | +**username** | str | Yes | | +**type** | Literal["usernamePassword"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/CreateConnectionRequestSnowflakeAuthenticationMode.md b/docs/v2/Connectivity/models/CreateConnectionRequestSnowflakeAuthenticationMode.md new file mode 100644 index 000000000..77e53f401 --- /dev/null +++ b/docs/v2/Connectivity/models/CreateConnectionRequestSnowflakeAuthenticationMode.md @@ -0,0 +1,17 @@ +# CreateConnectionRequestSnowflakeAuthenticationMode + +CreateConnectionRequestSnowflakeAuthenticationMode + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +CreateConnectionRequestSnowflakeExternalOauth | externalOauth +CreateConnectionRequestSnowflakeKeyPairAuthentication | keyPair +CreateConnectionRequestBasicCredentials | basic + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/CreateConnectionRequestSnowflakeConnectionConfiguration.md b/docs/v2/Connectivity/models/CreateConnectionRequestSnowflakeConnectionConfiguration.md new file mode 100644 index 000000000..5d6cfceb7 --- /dev/null +++ b/docs/v2/Connectivity/models/CreateConnectionRequestSnowflakeConnectionConfiguration.md @@ -0,0 +1,18 @@ +# CreateConnectionRequestSnowflakeConnectionConfiguration + +CreateConnectionRequestSnowflakeConnectionConfiguration + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**schema_** | Optional[str] | No | Specifies the default schema to use for the specified database once connected. If unspecified, defaults to the empty string. The specified schema should be an existing schema for which the specified default role has privileges. See https://docs.snowflake.com/developer-guide/jdbc/jdbc-parameters#schema | +**database** | Optional[str] | No | Specifies the default database to use once connected. If unspecified, defaults to the empty string. The specified database should be an existing database for which the specified default role has privileges. See https://docs.snowflake.com/developer-guide/jdbc/jdbc-parameters#db | +**role** | Optional[str] | No | Specifies the default access control role to use in the Snowflake session initiated by the driver. If unspecified, no role will be used when the session is initiated by the driver. The specified role should be an existing role that has already been assigned to the specified user for the driver. If the specified role has not already been assigned to the user, the role is not used when the session is initiated by the driver. See https://docs.snowflake.com/developer-guide/jdbc/jdbc-parameters#role | +**account_identifier** | str | Yes | An [account identifier](https://docs.snowflake.com/en/user-guide/admin-account-identifier) uniquely identifies a Snowflake account within your organization, as well as throughout the global network of Snowflake-supported cloud platforms and cloud regions. The URL for an account uses the following format: .snowflakecomputing.com. An example URL is https://acme-test_aws_us_east_2.snowflakecomputing.com. | +**jdbc_properties** | JdbcProperties | Yes | | +**warehouse** | Optional[str] | No | Specifies the virtual warehouse to use once connected. If unspecified, defaults to the empty string. The specified warehouse should be an existing warehouse for which the specified default role has privileges. See https://docs.snowflake.com/developer-guide/jdbc/jdbc-parameters#warehouse | +**authentication_mode** | CreateConnectionRequestSnowflakeAuthenticationMode | Yes | The authentication mode to use to connect to the Snowflake database. | +**type** | Literal["snowflake"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/CreateConnectionRequestSnowflakeExternalOauth.md b/docs/v2/Connectivity/models/CreateConnectionRequestSnowflakeExternalOauth.md new file mode 100644 index 000000000..d3296205b --- /dev/null +++ b/docs/v2/Connectivity/models/CreateConnectionRequestSnowflakeExternalOauth.md @@ -0,0 +1,11 @@ +# CreateConnectionRequestSnowflakeExternalOauth + +CreateConnectionRequestSnowflakeExternalOauth + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["externalOauth"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/CreateConnectionRequestSnowflakeKeyPairAuthentication.md b/docs/v2/Connectivity/models/CreateConnectionRequestSnowflakeKeyPairAuthentication.md new file mode 100644 index 000000000..50b7ef5a9 --- /dev/null +++ b/docs/v2/Connectivity/models/CreateConnectionRequestSnowflakeKeyPairAuthentication.md @@ -0,0 +1,13 @@ +# CreateConnectionRequestSnowflakeKeyPairAuthentication + +CreateConnectionRequestSnowflakeKeyPairAuthentication + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**private_key** | CreateConnectionRequestEncryptedProperty | Yes | | +**user** | str | Yes | | +**type** | Literal["keyPair"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/CreateConnectionRequestUnknownWorker.md b/docs/v2/Connectivity/models/CreateConnectionRequestUnknownWorker.md new file mode 100644 index 000000000..6396d62a4 --- /dev/null +++ b/docs/v2/Connectivity/models/CreateConnectionRequestUnknownWorker.md @@ -0,0 +1,11 @@ +# CreateConnectionRequestUnknownWorker + +CreateConnectionRequestUnknownWorker + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["unknownWorker"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/CreateConnectionRequestWorkflowIdentityFederation.md b/docs/v2/Connectivity/models/CreateConnectionRequestWorkflowIdentityFederation.md new file mode 100644 index 000000000..e8b43e823 --- /dev/null +++ b/docs/v2/Connectivity/models/CreateConnectionRequestWorkflowIdentityFederation.md @@ -0,0 +1,13 @@ +# CreateConnectionRequestWorkflowIdentityFederation + +CreateConnectionRequestWorkflowIdentityFederation + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**audience** | str | Yes | Identifies the recipients that the access token is intended for as a string URI. This should be the primary host name where the Connection lives. | +**service_principal_application_id** | Optional[str] | No | The ID of the Databricks [service principal](https://docs.databricks.com/aws/en/admin/users-groups/service-principals). If provided, a federated JWT token is exchanged using a service principal federation policy. If not provided, a federated JWT token is exchanged using an account federation policy. | +**type** | Literal["workflowIdentityFederation"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/CreateFileImportRequest.md b/docs/v2/Connectivity/models/CreateFileImportRequest.md new file mode 100644 index 000000000..0118608e1 --- /dev/null +++ b/docs/v2/Connectivity/models/CreateFileImportRequest.md @@ -0,0 +1,16 @@ +# CreateFileImportRequest + +CreateFileImportRequest + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**dataset_rid** | DatasetRid | Yes | The RID of the output dataset. Can not be modified after the file import is created. | +**import_mode** | FileImportMode | Yes | | +**display_name** | FileImportDisplayName | Yes | | +**branch_name** | Optional[BranchName] | No | The branch name in the output dataset that will contain the imported data. Defaults to `master` for most enrollments. Can not be modified after the file import is created. | +**subfolder** | Optional[str] | No | A subfolder in the external system that will be imported. If not specified, defaults to the root folder of the external system. | +**file_import_filters** | List[FileImportFilter] | Yes | Use filters to limit which files should be imported. Filters are applied in the order they are defined. A different ordering of filters may lead to a more optimized import. [Learn more about optimizing file imports.](https://palantir.com/docs/foundry/data-connection/file-based-syncs/#optimize-file-based-syncs) | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/CreateTableImportRequest.md b/docs/v2/Connectivity/models/CreateTableImportRequest.md new file mode 100644 index 000000000..60569fae0 --- /dev/null +++ b/docs/v2/Connectivity/models/CreateTableImportRequest.md @@ -0,0 +1,16 @@ +# CreateTableImportRequest + +CreateTableImportRequest + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**dataset_rid** | DatasetRid | Yes | The RID of the output dataset. Can not be modified after the table import is created. | +**import_mode** | TableImportMode | Yes | | +**display_name** | TableImportDisplayName | Yes | | +**allow_schema_changes** | Optional[TableImportAllowSchemaChanges] | No | Allow the TableImport to succeed if the schema of imported rows does not match the existing dataset's schema. Defaults to false for new table imports. | +**branch_name** | Optional[BranchName] | No | The branch name in the output dataset that will contain the imported data. Defaults to `master` for most enrollments. Can not be modified after the table import is created. | +**config** | CreateTableImportRequestTableImportConfig | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/CreateTableImportRequestDatabricksTableImportConfig.md b/docs/v2/Connectivity/models/CreateTableImportRequestDatabricksTableImportConfig.md new file mode 100644 index 000000000..4295a8e96 --- /dev/null +++ b/docs/v2/Connectivity/models/CreateTableImportRequestDatabricksTableImportConfig.md @@ -0,0 +1,13 @@ +# CreateTableImportRequestDatabricksTableImportConfig + +CreateTableImportRequestDatabricksTableImportConfig + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**initial_incremental_state** | Optional[TableImportInitialIncrementalState] | No | | +**query** | TableImportQuery | Yes | | +**type** | Literal["databricksImportConfig"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/CreateTableImportRequestJdbcTableImportConfig.md b/docs/v2/Connectivity/models/CreateTableImportRequestJdbcTableImportConfig.md new file mode 100644 index 000000000..c3d270fe9 --- /dev/null +++ b/docs/v2/Connectivity/models/CreateTableImportRequestJdbcTableImportConfig.md @@ -0,0 +1,13 @@ +# CreateTableImportRequestJdbcTableImportConfig + +CreateTableImportRequestJdbcTableImportConfig + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**initial_incremental_state** | Optional[TableImportInitialIncrementalState] | No | | +**query** | TableImportQuery | Yes | | +**type** | Literal["jdbcImportConfig"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/CreateTableImportRequestMicrosoftAccessTableImportConfig.md b/docs/v2/Connectivity/models/CreateTableImportRequestMicrosoftAccessTableImportConfig.md new file mode 100644 index 000000000..8afb551b9 --- /dev/null +++ b/docs/v2/Connectivity/models/CreateTableImportRequestMicrosoftAccessTableImportConfig.md @@ -0,0 +1,13 @@ +# CreateTableImportRequestMicrosoftAccessTableImportConfig + +CreateTableImportRequestMicrosoftAccessTableImportConfig + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**initial_incremental_state** | Optional[TableImportInitialIncrementalState] | No | | +**query** | TableImportQuery | Yes | | +**type** | Literal["microsoftAccessImportConfig"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/CreateTableImportRequestMicrosoftSqlServerTableImportConfig.md b/docs/v2/Connectivity/models/CreateTableImportRequestMicrosoftSqlServerTableImportConfig.md new file mode 100644 index 000000000..7c2fc7344 --- /dev/null +++ b/docs/v2/Connectivity/models/CreateTableImportRequestMicrosoftSqlServerTableImportConfig.md @@ -0,0 +1,13 @@ +# CreateTableImportRequestMicrosoftSqlServerTableImportConfig + +CreateTableImportRequestMicrosoftSqlServerTableImportConfig + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**initial_incremental_state** | Optional[TableImportInitialIncrementalState] | No | | +**query** | TableImportQuery | Yes | | +**type** | Literal["microsoftSqlServerImportConfig"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/CreateTableImportRequestOracleTableImportConfig.md b/docs/v2/Connectivity/models/CreateTableImportRequestOracleTableImportConfig.md new file mode 100644 index 000000000..1859da369 --- /dev/null +++ b/docs/v2/Connectivity/models/CreateTableImportRequestOracleTableImportConfig.md @@ -0,0 +1,13 @@ +# CreateTableImportRequestOracleTableImportConfig + +CreateTableImportRequestOracleTableImportConfig + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**initial_incremental_state** | Optional[TableImportInitialIncrementalState] | No | | +**query** | TableImportQuery | Yes | | +**type** | Literal["oracleImportConfig"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/CreateTableImportRequestPostgreSqlTableImportConfig.md b/docs/v2/Connectivity/models/CreateTableImportRequestPostgreSqlTableImportConfig.md new file mode 100644 index 000000000..140697f0a --- /dev/null +++ b/docs/v2/Connectivity/models/CreateTableImportRequestPostgreSqlTableImportConfig.md @@ -0,0 +1,13 @@ +# CreateTableImportRequestPostgreSqlTableImportConfig + +CreateTableImportRequestPostgreSqlTableImportConfig + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**initial_incremental_state** | Optional[TableImportInitialIncrementalState] | No | | +**query** | TableImportQuery | Yes | | +**type** | Literal["postgreSqlImportConfig"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/CreateTableImportRequestSnowflakeTableImportConfig.md b/docs/v2/Connectivity/models/CreateTableImportRequestSnowflakeTableImportConfig.md new file mode 100644 index 000000000..9dfe05ae0 --- /dev/null +++ b/docs/v2/Connectivity/models/CreateTableImportRequestSnowflakeTableImportConfig.md @@ -0,0 +1,13 @@ +# CreateTableImportRequestSnowflakeTableImportConfig + +CreateTableImportRequestSnowflakeTableImportConfig + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**initial_incremental_state** | Optional[TableImportInitialIncrementalState] | No | | +**query** | TableImportQuery | Yes | | +**type** | Literal["snowflakeImportConfig"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/CreateTableImportRequestTableImportConfig.md b/docs/v2/Connectivity/models/CreateTableImportRequestTableImportConfig.md new file mode 100644 index 000000000..0922f3d95 --- /dev/null +++ b/docs/v2/Connectivity/models/CreateTableImportRequestTableImportConfig.md @@ -0,0 +1,22 @@ +# CreateTableImportRequestTableImportConfig + +The import configuration for a specific [connector type](https://palantir.com/docs/foundry/data-integration/source-type-overview). + + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +CreateTableImportRequestDatabricksTableImportConfig | databricksImportConfig +CreateTableImportRequestJdbcTableImportConfig | jdbcImportConfig +CreateTableImportRequestMicrosoftSqlServerTableImportConfig | microsoftSqlServerImportConfig +CreateTableImportRequestPostgreSqlTableImportConfig | postgreSqlImportConfig +CreateTableImportRequestMicrosoftAccessTableImportConfig | microsoftAccessImportConfig +CreateTableImportRequestSnowflakeTableImportConfig | snowflakeImportConfig +CreateTableImportRequestOracleTableImportConfig | oracleImportConfig + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/CreateVirtualTableRequest.md b/docs/v2/Connectivity/models/CreateVirtualTableRequest.md new file mode 100644 index 000000000..fc18de6c4 --- /dev/null +++ b/docs/v2/Connectivity/models/CreateVirtualTableRequest.md @@ -0,0 +1,14 @@ +# CreateVirtualTableRequest + +CreateVirtualTableRequest + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**markings** | Optional[List[MarkingId]] | No | | +**parent_rid** | FolderRid | Yes | | +**name** | TableName | Yes | | +**config** | VirtualTableConfig | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/DatabricksAuthenticationMode.md b/docs/v2/Connectivity/models/DatabricksAuthenticationMode.md new file mode 100644 index 000000000..0df868a0a --- /dev/null +++ b/docs/v2/Connectivity/models/DatabricksAuthenticationMode.md @@ -0,0 +1,18 @@ +# DatabricksAuthenticationMode + +The method of authentication for connecting to an external Databricks system. + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +WorkflowIdentityFederation | workflowIdentityFederation +OauthMachineToMachineAuth | oauthM2M +PersonalAccessToken | personalAccessToken +BasicCredentials | basic + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/DatabricksConnectionConfiguration.md b/docs/v2/Connectivity/models/DatabricksConnectionConfiguration.md new file mode 100644 index 000000000..3626ff967 --- /dev/null +++ b/docs/v2/Connectivity/models/DatabricksConnectionConfiguration.md @@ -0,0 +1,18 @@ +# DatabricksConnectionConfiguration + +The configuration needed to connect to a [Databricks external system](https://palantir.com/docs/foundry/available-connectors/databricks). +Refer to the [official Databricks documentation](https://docs.databricks.com/aws/en/integrations/compute-details) +for more information on how to obtain connection details for your system. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**host_name** | str | Yes | The hostname of the Databricks workspace. | +**http_path** | str | Yes | The Databricks compute resource’s HTTP Path value. | +**authentication** | DatabricksAuthenticationMode | Yes | The method of authentication to use. | +**jdbc_properties** | JdbcProperties | Yes | | +**type** | Literal["databricks"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/DatabricksTableImportConfig.md b/docs/v2/Connectivity/models/DatabricksTableImportConfig.md new file mode 100644 index 000000000..032d744df --- /dev/null +++ b/docs/v2/Connectivity/models/DatabricksTableImportConfig.md @@ -0,0 +1,14 @@ +# DatabricksTableImportConfig + +The table import configuration for a [Databricks connection](https://palantir.com/docs/foundry/available-connectors/databricks). + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**query** | TableImportQuery | Yes | | +**initial_incremental_state** | Optional[TableImportInitialIncrementalState] | No | | +**type** | Literal["databricksImportConfig"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/DateColumnInitialIncrementalState.md b/docs/v2/Connectivity/models/DateColumnInitialIncrementalState.md new file mode 100644 index 000000000..47aa9604c --- /dev/null +++ b/docs/v2/Connectivity/models/DateColumnInitialIncrementalState.md @@ -0,0 +1,14 @@ +# DateColumnInitialIncrementalState + +The state for an incremental table import using a column with a date type. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**column_name** | str | Yes | | +**current_value** | date | Yes | The initial incremental state value for the date column to reference in the query. | +**type** | Literal["dateColumnInitialIncrementalState"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/DecimalColumnInitialIncrementalState.md b/docs/v2/Connectivity/models/DecimalColumnInitialIncrementalState.md new file mode 100644 index 000000000..e71cd4d31 --- /dev/null +++ b/docs/v2/Connectivity/models/DecimalColumnInitialIncrementalState.md @@ -0,0 +1,14 @@ +# DecimalColumnInitialIncrementalState + +The state for an incremental table import using a column with a decimal data type. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**column_name** | str | Yes | | +**current_value** | decimal.Decimal | Yes | The initial incremental state value for the decimal column to reference in the query. | +**type** | Literal["decimalColumnInitialIncrementalState"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/DeltaVirtualTableConfig.md b/docs/v2/Connectivity/models/DeltaVirtualTableConfig.md new file mode 100644 index 000000000..195c34aa9 --- /dev/null +++ b/docs/v2/Connectivity/models/DeltaVirtualTableConfig.md @@ -0,0 +1,12 @@ +# DeltaVirtualTableConfig + +Pointer to the Delta table in cloud object storage (e.g., Azure Data Lake Storage, Google Cloud Storage, S3). + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**path** | str | Yes | The path of the Delta table in object storage. | +**type** | Literal["delta"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/Domain.md b/docs/v2/Connectivity/models/Domain.md new file mode 100644 index 000000000..3151c8bcd --- /dev/null +++ b/docs/v2/Connectivity/models/Domain.md @@ -0,0 +1,14 @@ +# Domain + +The domain that the connection is allowed to access. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**scheme** | Optional[UriScheme] | No | The scheme of the domain that the connection is allowed to access. If not specified, defaults to HTTPS. | +**host** | str | Yes | The domain name, IPv4, or IPv6 address. | +**port** | Optional[int] | No | The port number of the domain that the connection is allowed to access. | +**auth** | Optional[RestAuthenticationMode] | No | The URI scheme must be HTTPS if using any authentication. If not specified, no authentication is required. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/EncryptedProperty.md b/docs/v2/Connectivity/models/EncryptedProperty.md new file mode 100644 index 000000000..2f165a3b4 --- /dev/null +++ b/docs/v2/Connectivity/models/EncryptedProperty.md @@ -0,0 +1,21 @@ +# EncryptedProperty + +When reading an encrypted property, the secret name representing the encrypted value will be returned. +When writing to an encrypted property: +- If a plaintext value is passed as an input, the plaintext value will be encrypted and saved to the property. +- If a secret name is passed as an input, the secret name must match the existing secret name of the property + and the property will retain its previously encrypted value. + + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +AsSecretName | asSecretName +AsPlaintextValue | asPlaintextValue + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/FileAnyPathMatchesFilter.md b/docs/v2/Connectivity/models/FileAnyPathMatchesFilter.md new file mode 100644 index 000000000..487adcd56 --- /dev/null +++ b/docs/v2/Connectivity/models/FileAnyPathMatchesFilter.md @@ -0,0 +1,13 @@ +# FileAnyPathMatchesFilter + +If any file has a relative path matching the regular expression, sync all files in the subfolder that are not otherwise filtered. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**regex** | str | Yes | The regular expression for the relative path to match against. | +**type** | Literal["anyPathMatchesFilter"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/FileAtLeastCountFilter.md b/docs/v2/Connectivity/models/FileAtLeastCountFilter.md new file mode 100644 index 000000000..4fd429de3 --- /dev/null +++ b/docs/v2/Connectivity/models/FileAtLeastCountFilter.md @@ -0,0 +1,12 @@ +# FileAtLeastCountFilter + +Import all filtered files only if there are at least the specified number of files remaining. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**min_files_count** | int | Yes | The minimum number of files remaining expected. The value specified must be greater than 0. | +**type** | Literal["atLeastCountFilter"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/FileChangedSinceLastUploadFilter.md b/docs/v2/Connectivity/models/FileChangedSinceLastUploadFilter.md new file mode 100644 index 000000000..e95d0dccd --- /dev/null +++ b/docs/v2/Connectivity/models/FileChangedSinceLastUploadFilter.md @@ -0,0 +1,14 @@ +# FileChangedSinceLastUploadFilter + +Only import files that have changed or been added since the last import run. Whether or not a file is considered to be changed is determined by the specified file properties. +This will exclude files uploaded in any previous imports, regardless of the file import mode used. A SNAPSHOT file import mode does not reset the filter. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**file_properties** | List[FileProperty] | Yes | The criteria on which to determine whether a file has been changed or not since the last import. If any of the specified criteria have changed, the file is consider changed. The criteria include: LAST_MODIFIED: The file's last modified timestamp has changed since the last import. SIZE: The file's size has changed since the last import. If no criteria are specified, only newly added files will be imported. | +**type** | Literal["changedSinceLastUploadFilter"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/FileFormat.md b/docs/v2/Connectivity/models/FileFormat.md new file mode 100644 index 000000000..e24dc4825 --- /dev/null +++ b/docs/v2/Connectivity/models/FileFormat.md @@ -0,0 +1,13 @@ +# FileFormat + +The format of files in the upstream source. + + +| **Value** | +| --------- | +| `"AVRO"` | +| `"CSV"` | +| `"PARQUET"` | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/FileImport.md b/docs/v2/Connectivity/models/FileImport.md new file mode 100644 index 000000000..67a3345d1 --- /dev/null +++ b/docs/v2/Connectivity/models/FileImport.md @@ -0,0 +1,18 @@ +# FileImport + +FileImport + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**rid** | FileImportRid | Yes | | +**connection_rid** | ConnectionRid | Yes | The RID of the Connection (also known as a source) that the File Import uses to import data. | +**dataset_rid** | DatasetRid | Yes | The RID of the output dataset. Can not be modified after the file import is created. | +**branch_name** | Optional[BranchName] | No | The branch name in the output dataset that will contain the imported data. Defaults to `master` for most enrollments. Can not be modified after the file import is created. | +**display_name** | FileImportDisplayName | Yes | | +**file_import_filters** | List[FileImportFilter] | Yes | Use filters to limit which files should be imported. Filters are applied in the order they are defined. A different ordering of filters may lead to a more optimized import. [Learn more about optimizing file imports.](https://palantir.com/docs/foundry/data-connection/file-based-syncs/#optimize-file-based-syncs) | +**import_mode** | FileImportMode | Yes | | +**subfolder** | Optional[str] | No | A subfolder in the external system that will be imported. If not specified, defaults to the root folder of the external system. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/FileImportCustomFilter.md b/docs/v2/Connectivity/models/FileImportCustomFilter.md new file mode 100644 index 000000000..f3eeea218 --- /dev/null +++ b/docs/v2/Connectivity/models/FileImportCustomFilter.md @@ -0,0 +1,14 @@ +# FileImportCustomFilter + +A custom file import filter. Custom file import filters can be fetched but cannot currently be used +when creating or updating file imports. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**config** | Any | Yes | | +**type** | Literal["customFilter"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/FileImportDisplayName.md b/docs/v2/Connectivity/models/FileImportDisplayName.md new file mode 100644 index 000000000..04b25f9f9 --- /dev/null +++ b/docs/v2/Connectivity/models/FileImportDisplayName.md @@ -0,0 +1,11 @@ +# FileImportDisplayName + +FileImportDisplayName + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/FileImportFilter.md b/docs/v2/Connectivity/models/FileImportFilter.md new file mode 100644 index 000000000..e72d6f0f1 --- /dev/null +++ b/docs/v2/Connectivity/models/FileImportFilter.md @@ -0,0 +1,25 @@ +# FileImportFilter + +[Filters](https://palantir.com/docs/foundry/data-connection/file-based-syncs/#filters) allow you to filter source files +before they are imported into Foundry. + + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +FilePathNotMatchesFilter | pathNotMatchesFilter +FileAnyPathMatchesFilter | anyPathMatchesFilter +FilesCountLimitFilter | filesCountLimitFilter +FileChangedSinceLastUploadFilter | changedSinceLastUploadFilter +FileImportCustomFilter | customFilter +FileLastModifiedAfterFilter | lastModifiedAfterFilter +FilePathMatchesFilter | pathMatchesFilter +FileAtLeastCountFilter | atLeastCountFilter +FileSizeFilter | fileSizeFilter + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/FileImportMode.md b/docs/v2/Connectivity/models/FileImportMode.md new file mode 100644 index 000000000..56cc20d66 --- /dev/null +++ b/docs/v2/Connectivity/models/FileImportMode.md @@ -0,0 +1,17 @@ +# FileImportMode + +Import mode governs how raw files are read from an external system, and written into a Foundry dataset. + +SNAPSHOT: Defines a new dataset state consisting only of files from a particular import execution. +APPEND: Purely additive and yields data from previous import executions in addition to newly added files. +UPDATE: Replaces existing files from previous import executions based on file names. + + +| **Value** | +| --------- | +| `"SNAPSHOT"` | +| `"APPEND"` | +| `"UPDATE"` | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/FileImportRid.md b/docs/v2/Connectivity/models/FileImportRid.md new file mode 100644 index 000000000..18e555783 --- /dev/null +++ b/docs/v2/Connectivity/models/FileImportRid.md @@ -0,0 +1,12 @@ +# FileImportRid + +The Resource Identifier (RID) of a FileImport (also known as a batch sync). + + +## Type +```python +RID +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/FileLastModifiedAfterFilter.md b/docs/v2/Connectivity/models/FileLastModifiedAfterFilter.md new file mode 100644 index 000000000..3ec699585 --- /dev/null +++ b/docs/v2/Connectivity/models/FileLastModifiedAfterFilter.md @@ -0,0 +1,13 @@ +# FileLastModifiedAfterFilter + +Only import files that have been modified after a specified timestamp + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**after_timestamp** | Optional[datetime] | No | Timestamp threshold, specified in ISO-8601 format. If not specified, defaults to the timestamp the filter is added to the file import. | +**type** | Literal["lastModifiedAfterFilter"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/FilePathMatchesFilter.md b/docs/v2/Connectivity/models/FilePathMatchesFilter.md new file mode 100644 index 000000000..1731d2a7d --- /dev/null +++ b/docs/v2/Connectivity/models/FilePathMatchesFilter.md @@ -0,0 +1,22 @@ +# FilePathMatchesFilter + +Only import files whose path (relative to the root of the source) matches the regular expression. + +**Example** +Suppose we are importing files from `relative/subfolder`. +`relative/subfolder` contains: +- `relative/subfolder/include-file.txt` +- `relative/subfolder/exclude-file.txt` +- `relative/subfolder/other-file.txt` + +With the `relative/subfolder/include-.*.txt` regex, only `relative/subfolder/include-file.txt` will be imported. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**regex** | str | Yes | Must be written to match the paths relative to the root of the source, even if a subfolder is specified. | +**type** | Literal["pathMatchesFilter"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/FilePathNotMatchesFilter.md b/docs/v2/Connectivity/models/FilePathNotMatchesFilter.md new file mode 100644 index 000000000..4ae3f0d91 --- /dev/null +++ b/docs/v2/Connectivity/models/FilePathNotMatchesFilter.md @@ -0,0 +1,23 @@ +# FilePathNotMatchesFilter + +Only import files whose path (relative to the root of the source) does not match the regular expression. + +**Example** +Suppose we are importing files from `relative/subfolder`. +`relative/subfolder` contains: +- `relative/subfolder/include-file.txt` +- `relative/subfolder/exclude-file.txt` +- `relative/subfolder/other-file.txt` + +With the `relative/subfolder/exclude-.*.txt` regex, both `relative/subfolder/include-file.txt` and `relative/subfolder/other-file.txt` will be imported, +and `relative/subfolder/exclude-file.txt` will be excluded from the import. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**regex** | str | Yes | Must be written to match the paths relative to the root of the source, even if a subfolder is specified. | +**type** | Literal["pathNotMatchesFilter"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/FileProperty.md b/docs/v2/Connectivity/models/FileProperty.md new file mode 100644 index 000000000..3f8916b15 --- /dev/null +++ b/docs/v2/Connectivity/models/FileProperty.md @@ -0,0 +1,11 @@ +# FileProperty + +FileProperty + +| **Value** | +| --------- | +| `"LAST_MODIFIED"` | +| `"SIZE"` | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/FileSizeFilter.md b/docs/v2/Connectivity/models/FileSizeFilter.md new file mode 100644 index 000000000..12d299ee7 --- /dev/null +++ b/docs/v2/Connectivity/models/FileSizeFilter.md @@ -0,0 +1,16 @@ +# FileSizeFilter + +Only import files whose size is between the specified minimum and maximum values. +At least one of `gt` or `lt` should be present. +If both are present, the value specified for `gt` must be strictly less than `lt - 1`. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**gt** | Optional[SizeBytes] | No | File size must be greater than this number for it to be imported. The value specified cannot be a negative number. | +**lt** | Optional[SizeBytes] | No | File size must be less than this number for it to be imported. The value specified must be at least 1 byte. | +**type** | Literal["fileSizeFilter"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/FilesCountLimitFilter.md b/docs/v2/Connectivity/models/FilesCountLimitFilter.md new file mode 100644 index 000000000..f546359e4 --- /dev/null +++ b/docs/v2/Connectivity/models/FilesCountLimitFilter.md @@ -0,0 +1,15 @@ +# FilesCountLimitFilter + +Only retain `filesCount` number of files in each transaction. +The choice of files to retain is made without any guarantee of order. +This option can increase the reliability of incremental syncs. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**files_count** | int | Yes | The number of files to import in the transaction. The value specified must be positive. | +**type** | Literal["filesCountLimitFilter"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/FilesVirtualTableConfig.md b/docs/v2/Connectivity/models/FilesVirtualTableConfig.md new file mode 100644 index 000000000..f5668e7c3 --- /dev/null +++ b/docs/v2/Connectivity/models/FilesVirtualTableConfig.md @@ -0,0 +1,13 @@ +# FilesVirtualTableConfig + +Pointer to the table in cloud object storage (e.g., Azure Data Lake Storage, Google Cloud Storage, S3). + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**format** | FileFormat | Yes | | +**path** | str | Yes | Storage path for the data in the underlying file system, i.e. paths like `/foo/bar`. The scheme is not included. May be either a folder or file. A non-partitioned table will have a single location. A partitioned table can have multiple locations, one for each partition. | +**type** | Literal["files"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/FoundryWorker.md b/docs/v2/Connectivity/models/FoundryWorker.md new file mode 100644 index 000000000..f80aa291a --- /dev/null +++ b/docs/v2/Connectivity/models/FoundryWorker.md @@ -0,0 +1,16 @@ +# FoundryWorker + +The [Foundry worker](https://palantir.com/docs/foundry/data-connection/core-concepts/#foundry-worker) is used to run capabilities +in Foundry. +This is the preferred method for connections, as these connections benefit from Foundry's containerized +and scalable job execution, improved stability and do not incur the maintenance overhead associated with agents. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**network_egress_policy_rids** | List[NetworkEgressPolicyRid] | Yes | | +**type** | Literal["foundryWorker"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/GetConfigurationConnectionsBatchRequestElement.md b/docs/v2/Connectivity/models/GetConfigurationConnectionsBatchRequestElement.md new file mode 100644 index 000000000..b5c5857fb --- /dev/null +++ b/docs/v2/Connectivity/models/GetConfigurationConnectionsBatchRequestElement.md @@ -0,0 +1,11 @@ +# GetConfigurationConnectionsBatchRequestElement + +GetConfigurationConnectionsBatchRequestElement + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**connection_rid** | ConnectionRid | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/GetConfigurationConnectionsBatchResponse.md b/docs/v2/Connectivity/models/GetConfigurationConnectionsBatchResponse.md new file mode 100644 index 000000000..d4eb90d74 --- /dev/null +++ b/docs/v2/Connectivity/models/GetConfigurationConnectionsBatchResponse.md @@ -0,0 +1,11 @@ +# GetConfigurationConnectionsBatchResponse + +GetConfigurationConnectionsBatchResponse + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**data** | Dict[ConnectionRid, ConnectionConfiguration] | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/GlueVirtualTableConfig.md b/docs/v2/Connectivity/models/GlueVirtualTableConfig.md new file mode 100644 index 000000000..f7a690c9a --- /dev/null +++ b/docs/v2/Connectivity/models/GlueVirtualTableConfig.md @@ -0,0 +1,13 @@ +# GlueVirtualTableConfig + +Pointer to the table in AWS Glue. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**database** | str | Yes | The database name. | +**table** | str | Yes | The table name. | +**type** | Literal["glue"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/HeaderApiKey.md b/docs/v2/Connectivity/models/HeaderApiKey.md new file mode 100644 index 000000000..af8b74bf2 --- /dev/null +++ b/docs/v2/Connectivity/models/HeaderApiKey.md @@ -0,0 +1,12 @@ +# HeaderApiKey + +HeaderApiKey + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**header_name** | str | Yes | The name of the header that the API key is passed in. | +**type** | Literal["header"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/IcebergVirtualTableConfig.md b/docs/v2/Connectivity/models/IcebergVirtualTableConfig.md new file mode 100644 index 000000000..d02dc2e18 --- /dev/null +++ b/docs/v2/Connectivity/models/IcebergVirtualTableConfig.md @@ -0,0 +1,13 @@ +# IcebergVirtualTableConfig + +Pointer to the Iceberg table. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**table_identifier** | str | Yes | The identifier of the Iceberg table. | +**warehouse_path** | Optional[str] | No | The path to the folder in the file system containing the Iceberg table. Can be omitted when the connection is configured with a catalog that does not rely on warehouse path. | +**type** | Literal["iceberg"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/IntegerColumnInitialIncrementalState.md b/docs/v2/Connectivity/models/IntegerColumnInitialIncrementalState.md new file mode 100644 index 000000000..d2511f2fe --- /dev/null +++ b/docs/v2/Connectivity/models/IntegerColumnInitialIncrementalState.md @@ -0,0 +1,14 @@ +# IntegerColumnInitialIncrementalState + +The state for an incremental table import using a numeric integer datatype. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**column_name** | str | Yes | | +**current_value** | int | Yes | The initial incremental state value for the integer column to reference in the query. | +**type** | Literal["integerColumnInitialIncrementalState"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/InvalidConnectionReason.md b/docs/v2/Connectivity/models/InvalidConnectionReason.md new file mode 100644 index 000000000..8e05e8e04 --- /dev/null +++ b/docs/v2/Connectivity/models/InvalidConnectionReason.md @@ -0,0 +1,71 @@ +# InvalidConnectionReason + +Reasons why a connection configuration is invalid. + + +| **Value** | +| --------- | +| `"CONNECTION_NOT_FOUND"` | +| `"INVALID_CREDENTIALS"` | +| `"NETWORK_POLICY_VIOLATION"` | +| `"CONNECTION_UNAVAILABLE"` | +| `"CANNOT_DESERIALIZE"` | +| `"CANNOT_SUBSTITUTE_SECRETS"` | +| `"CANNOT_USE_USER_HOME_FOLDER"` | +| `"INVALID_SOURCE_RUNTIME"` | +| `"INVALID_SOURCE_TYPE"` | +| `"MISSING_CREDENTIALS"` | +| `"MISSING_PROXY_SETTINGS"` | +| `"NOT_CLOUD_RUNTIME"` | +| `"NO_AGENTS_ASSIGNED"` | +| `"SERVICE_UNAVAILABLE"` | +| `"TOO_MANY_REQUESTS"` | +| `"AZURE_CONTAINER_DOES_NOT_EXIST"` | +| `"AZURE_MANAGED_IDENTITY_AUTH_NOT_SUPPORTED"` | +| `"AZURE_REFRESH_TOKEN_AUTH_NOT_SUPPORTED"` | +| `"AZURE_SHARED_ACCESS_SIGNATURE_AUTH_NOT_SUPPORTED"` | +| `"AZURE_SHARED_KEY_AUTH_NOT_SUPPORTED"` | +| `"AZURE_TENANT_NOT_FOUND"` | +| `"INVALID_ABFS_ROOT_DIRECTORY"` | +| `"INVALID_CLIENT_ENDPOINT"` | +| `"DATABRICKS_AUTH_UNSUPPORTED"` | +| `"DATABRICKS_BASIC_AUTH_NOT_SUPPORTED"` | +| `"DATABRICKS_INVALID_CLIENT_CREDENTIALS"` | +| `"DATABRICKS_INVALID_HOST"` | +| `"DATABRICKS_INVALID_HTTP_PATH"` | +| `"DATABRICKS_INVALID_OIDC_CREDENTIALS"` | +| `"DATABRICKS_INVALID_TOKEN_URL"` | +| `"GCP_INSTANCE_AUTH_NOT_SUPPORTED"` | +| `"GCP_INVALID_OIDC_CREDENTIALS"` | +| `"INVALID_GCS_CONFIG"` | +| `"INVALID_GCS_URL"` | +| `"GCS_INVALID_PREFIX_PATH"` | +| `"MISSING_GLUE_CATALOG"` | +| `"INVALID_HIVE_URL"` | +| `"INVALID_KERBEROS_URL"` | +| `"MISSING_HIVE_CONFIGURATION"` | +| `"ICEBERG_CATALOG_UNSUPPORTED"` | +| `"INVALID_ICEBERG_CATALOG_URL"` | +| `"INVALID_ICEBERG_TOKEN_URL"` | +| `"CONNECTION_FAILED"` | +| `"INVALID_JDBC_DRIVER"` | +| `"INVALID_JDBC_URL"` | +| `"AWS_BUCKET_DOES_NOT_EXIST"` | +| `"AWS_SESSION_TOKEN_NOT_SUPPORTED"` | +| `"INVALID_S3_ENDPOINT"` | +| `"INVALID_S3_URL"` | +| `"INVALID_STS_ENDPOINT"` | +| `"MISSING_STS_ROLE"` | +| `"STS_ASSUME_ROLE_DENIED"` | +| `"INVALID_SNOWFLAKE_URL"` | +| `"SNOWFLAKE_IAM_AUTH_NOT_SUPPORTED"` | +| `"SNOWFLAKE_RSA_AUTH_NOT_SUPPORTED"` | +| `"INVALID_UNITY_CATALOG_TOKEN_URL"` | +| `"INVALID_UNITY_CATALOG_URL"` | +| `"MISSING_UNITY_CATALOG"` | +| `"UNITY_CATALOG_EXTERNAL_ACCESS_NOT_ENABLED"` | +| `"UNITY_CATALOG_INSUFFICIENT_PERMISSIONS"` | +| `"UNITY_CATALOG_TEMPORARY_CREDENTIALS_FAILED"` | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/JdbcConnectionConfiguration.md b/docs/v2/Connectivity/models/JdbcConnectionConfiguration.md new file mode 100644 index 000000000..e77ff8b27 --- /dev/null +++ b/docs/v2/Connectivity/models/JdbcConnectionConfiguration.md @@ -0,0 +1,17 @@ +# JdbcConnectionConfiguration + +The configuration needed to connect to an external system using the JDBC protocol. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**url** | str | Yes | The URL that the JDBC driver uses to connect to a database. | +**driver_class** | str | Yes | The fully-qualified driver class name that is used to connect to the database. | +**uploaded_jdbc_drivers** | List[JdbcDriverArtifactName] | Yes | The list of uploaded JDBC driver names. To upload drivers to a JDBC connection, use the uploadCustomJdbcDrivers endpoint | +**jdbc_properties** | JdbcProperties | Yes | | +**credentials** | Optional[BasicCredentials] | No | | +**type** | Literal["jdbc"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/JdbcDriverArtifactName.md b/docs/v2/Connectivity/models/JdbcDriverArtifactName.md new file mode 100644 index 000000000..c44a228aa --- /dev/null +++ b/docs/v2/Connectivity/models/JdbcDriverArtifactName.md @@ -0,0 +1,12 @@ +# JdbcDriverArtifactName + +The name of the uploaded JDBC artifact. + + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/JdbcProperties.md b/docs/v2/Connectivity/models/JdbcProperties.md new file mode 100644 index 000000000..a459d14ca --- /dev/null +++ b/docs/v2/Connectivity/models/JdbcProperties.md @@ -0,0 +1,15 @@ +# JdbcProperties + +A map of [properties](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Properties.html) passed +to the JDBC driver to configure behavior. Refer to the documentation of your specific connection type for additional +available JDBC properties to add to your connection configuration. +This should only contain unencrypted properties, all values specified here are sent unencrypted to Foundry. + + +## Type +```python +Dict[str, str] +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/JdbcTableImportConfig.md b/docs/v2/Connectivity/models/JdbcTableImportConfig.md new file mode 100644 index 000000000..7823c0868 --- /dev/null +++ b/docs/v2/Connectivity/models/JdbcTableImportConfig.md @@ -0,0 +1,14 @@ +# JdbcTableImportConfig + +The import configuration for a [custom JDBC connection](https://palantir.com/docs/foundry/available-connectors/custom-jdbc-sources). + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**query** | TableImportQuery | Yes | | +**initial_incremental_state** | Optional[TableImportInitialIncrementalState] | No | | +**type** | Literal["jdbcImportConfig"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/ListFileImportsResponse.md b/docs/v2/Connectivity/models/ListFileImportsResponse.md new file mode 100644 index 000000000..37cf6abb2 --- /dev/null +++ b/docs/v2/Connectivity/models/ListFileImportsResponse.md @@ -0,0 +1,12 @@ +# ListFileImportsResponse + +ListFileImportsResponse + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**data** | List[FileImport] | Yes | | +**next_page_token** | Optional[PageToken] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/ListTableImportsResponse.md b/docs/v2/Connectivity/models/ListTableImportsResponse.md new file mode 100644 index 000000000..d9f099017 --- /dev/null +++ b/docs/v2/Connectivity/models/ListTableImportsResponse.md @@ -0,0 +1,12 @@ +# ListTableImportsResponse + +ListTableImportsResponse + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**data** | List[TableImport] | Yes | | +**next_page_token** | Optional[PageToken] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/LongColumnInitialIncrementalState.md b/docs/v2/Connectivity/models/LongColumnInitialIncrementalState.md new file mode 100644 index 000000000..8ba71010e --- /dev/null +++ b/docs/v2/Connectivity/models/LongColumnInitialIncrementalState.md @@ -0,0 +1,14 @@ +# LongColumnInitialIncrementalState + +The state for an incremental table import using a column with a numeric long datatype. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**column_name** | str | Yes | | +**current_value** | Long | Yes | The initial incremental state value for the long column to reference in the query. | +**type** | Literal["longColumnInitialIncrementalState"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/MicrosoftAccessTableImportConfig.md b/docs/v2/Connectivity/models/MicrosoftAccessTableImportConfig.md new file mode 100644 index 000000000..c60f96d3a --- /dev/null +++ b/docs/v2/Connectivity/models/MicrosoftAccessTableImportConfig.md @@ -0,0 +1,14 @@ +# MicrosoftAccessTableImportConfig + +The import configuration for a [Microsoft Access connection](https://palantir.com/docs/foundry/available-connectors/microsoft-access). + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**query** | TableImportQuery | Yes | | +**initial_incremental_state** | Optional[TableImportInitialIncrementalState] | No | | +**type** | Literal["microsoftAccessImportConfig"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/MicrosoftSqlServerTableImportConfig.md b/docs/v2/Connectivity/models/MicrosoftSqlServerTableImportConfig.md new file mode 100644 index 000000000..c8ccd655f --- /dev/null +++ b/docs/v2/Connectivity/models/MicrosoftSqlServerTableImportConfig.md @@ -0,0 +1,14 @@ +# MicrosoftSqlServerTableImportConfig + +The import configuration for a [Microsoft SQL Server connection](https://palantir.com/docs/foundry/available-connectors/microsoft-sql-server). + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**query** | TableImportQuery | Yes | | +**initial_incremental_state** | Optional[TableImportInitialIncrementalState] | No | | +**type** | Literal["microsoftSqlServerImportConfig"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/NetworkEgressPolicyRid.md b/docs/v2/Connectivity/models/NetworkEgressPolicyRid.md new file mode 100644 index 000000000..1e08df26c --- /dev/null +++ b/docs/v2/Connectivity/models/NetworkEgressPolicyRid.md @@ -0,0 +1,12 @@ +# NetworkEgressPolicyRid + +The Resource Identifier (RID) of a Network Egress Policy. + + +## Type +```python +RID +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/OauthMachineToMachineAuth.md b/docs/v2/Connectivity/models/OauthMachineToMachineAuth.md new file mode 100644 index 000000000..2cfdf85dd --- /dev/null +++ b/docs/v2/Connectivity/models/OauthMachineToMachineAuth.md @@ -0,0 +1,16 @@ +# OauthMachineToMachineAuth + +Authenticate as a service principal using OAuth. Create a service principal in Databricks and generate an OAuth secret to obtain a client ID and secret. +Read the [official Databricks documentation](https://docs.databricks.com/aws/en/dev-tools/auth/oauth-m2m) for more information about OAuth machine-to-machine +authentication. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**client_id** | str | Yes | The client ID for the service principal. | +**client_secret** | EncryptedProperty | Yes | The value of the client secret. | +**type** | Literal["oauthM2M"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/OracleTableImportConfig.md b/docs/v2/Connectivity/models/OracleTableImportConfig.md new file mode 100644 index 000000000..3eb49b36d --- /dev/null +++ b/docs/v2/Connectivity/models/OracleTableImportConfig.md @@ -0,0 +1,14 @@ +# OracleTableImportConfig + +The import configuration for an Oracle Database 21 connection. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**query** | TableImportQuery | Yes | | +**initial_incremental_state** | Optional[TableImportInitialIncrementalState] | No | | +**type** | Literal["oracleImportConfig"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/PersonalAccessToken.md b/docs/v2/Connectivity/models/PersonalAccessToken.md new file mode 100644 index 000000000..ce88eba08 --- /dev/null +++ b/docs/v2/Connectivity/models/PersonalAccessToken.md @@ -0,0 +1,14 @@ +# PersonalAccessToken + +Authenticate as a user or service principal using a personal access token. +Read the [official Databricks documentation](https://docs.databricks.com/aws/en/dev-tools/auth/pat) for information on generating a personal access token. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**personal_access_token** | EncryptedProperty | Yes | | +**type** | Literal["personalAccessToken"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/PlaintextValue.md b/docs/v2/Connectivity/models/PlaintextValue.md new file mode 100644 index 000000000..078e402f1 --- /dev/null +++ b/docs/v2/Connectivity/models/PlaintextValue.md @@ -0,0 +1,11 @@ +# PlaintextValue + +PlaintextValue + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/PostgreSqlTableImportConfig.md b/docs/v2/Connectivity/models/PostgreSqlTableImportConfig.md new file mode 100644 index 000000000..e5ef737a2 --- /dev/null +++ b/docs/v2/Connectivity/models/PostgreSqlTableImportConfig.md @@ -0,0 +1,14 @@ +# PostgreSqlTableImportConfig + +The import configuration for a [PostgreSQL connection](https://palantir.com/docs/foundry/available-connectors/postgresql). + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**query** | TableImportQuery | Yes | | +**initial_incremental_state** | Optional[TableImportInitialIncrementalState] | No | | +**type** | Literal["postgreSqlImportConfig"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/Protocol.md b/docs/v2/Connectivity/models/Protocol.md new file mode 100644 index 000000000..9f6b81d3e --- /dev/null +++ b/docs/v2/Connectivity/models/Protocol.md @@ -0,0 +1,11 @@ +# Protocol + +Protocol to establish a connection with another system. + +| **Value** | +| --------- | +| `"HTTP"` | +| `"HTTPS"` | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/QueryParameterApiKey.md b/docs/v2/Connectivity/models/QueryParameterApiKey.md new file mode 100644 index 000000000..bf55370c1 --- /dev/null +++ b/docs/v2/Connectivity/models/QueryParameterApiKey.md @@ -0,0 +1,12 @@ +# QueryParameterApiKey + +QueryParameterApiKey + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**query_parameter_name** | str | Yes | The name of the query parameter that the API key is passed in. | +**type** | Literal["queryParameter"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/Region.md b/docs/v2/Connectivity/models/Region.md new file mode 100644 index 000000000..0fcd0c1c0 --- /dev/null +++ b/docs/v2/Connectivity/models/Region.md @@ -0,0 +1,12 @@ +# Region + +The region of the external system. + + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/ReplaceFileImportRequest.md b/docs/v2/Connectivity/models/ReplaceFileImportRequest.md new file mode 100644 index 000000000..9dabeed48 --- /dev/null +++ b/docs/v2/Connectivity/models/ReplaceFileImportRequest.md @@ -0,0 +1,14 @@ +# ReplaceFileImportRequest + +ReplaceFileImportRequest + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**import_mode** | FileImportMode | Yes | | +**display_name** | FileImportDisplayName | Yes | | +**subfolder** | Optional[str] | No | A subfolder in the external system that will be imported. If not specified, defaults to the root folder of the external system. | +**file_import_filters** | List[FileImportFilter] | Yes | Use filters to limit which files should be imported. Filters are applied in the order they are defined. A different ordering of filters may lead to a more optimized import. [Learn more about optimizing file imports.](https://palantir.com/docs/foundry/data-connection/file-based-syncs/#optimize-file-based-syncs) | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/ReplaceTableImportRequest.md b/docs/v2/Connectivity/models/ReplaceTableImportRequest.md new file mode 100644 index 000000000..d1505085a --- /dev/null +++ b/docs/v2/Connectivity/models/ReplaceTableImportRequest.md @@ -0,0 +1,14 @@ +# ReplaceTableImportRequest + +ReplaceTableImportRequest + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**import_mode** | TableImportMode | Yes | | +**display_name** | TableImportDisplayName | Yes | | +**allow_schema_changes** | Optional[TableImportAllowSchemaChanges] | No | Allow the TableImport to succeed if the schema of imported rows does not match the existing dataset's schema. Defaults to false for new table imports. | +**config** | ReplaceTableImportRequestTableImportConfig | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/ReplaceTableImportRequestDatabricksTableImportConfig.md b/docs/v2/Connectivity/models/ReplaceTableImportRequestDatabricksTableImportConfig.md new file mode 100644 index 000000000..9fb2ca12b --- /dev/null +++ b/docs/v2/Connectivity/models/ReplaceTableImportRequestDatabricksTableImportConfig.md @@ -0,0 +1,13 @@ +# ReplaceTableImportRequestDatabricksTableImportConfig + +ReplaceTableImportRequestDatabricksTableImportConfig + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**initial_incremental_state** | Optional[TableImportInitialIncrementalState] | No | | +**query** | TableImportQuery | Yes | | +**type** | Literal["databricksImportConfig"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/ReplaceTableImportRequestJdbcTableImportConfig.md b/docs/v2/Connectivity/models/ReplaceTableImportRequestJdbcTableImportConfig.md new file mode 100644 index 000000000..9265c4051 --- /dev/null +++ b/docs/v2/Connectivity/models/ReplaceTableImportRequestJdbcTableImportConfig.md @@ -0,0 +1,13 @@ +# ReplaceTableImportRequestJdbcTableImportConfig + +ReplaceTableImportRequestJdbcTableImportConfig + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**initial_incremental_state** | Optional[TableImportInitialIncrementalState] | No | | +**query** | TableImportQuery | Yes | | +**type** | Literal["jdbcImportConfig"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/ReplaceTableImportRequestMicrosoftAccessTableImportConfig.md b/docs/v2/Connectivity/models/ReplaceTableImportRequestMicrosoftAccessTableImportConfig.md new file mode 100644 index 000000000..6a12122e4 --- /dev/null +++ b/docs/v2/Connectivity/models/ReplaceTableImportRequestMicrosoftAccessTableImportConfig.md @@ -0,0 +1,13 @@ +# ReplaceTableImportRequestMicrosoftAccessTableImportConfig + +ReplaceTableImportRequestMicrosoftAccessTableImportConfig + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**initial_incremental_state** | Optional[TableImportInitialIncrementalState] | No | | +**query** | TableImportQuery | Yes | | +**type** | Literal["microsoftAccessImportConfig"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/ReplaceTableImportRequestMicrosoftSqlServerTableImportConfig.md b/docs/v2/Connectivity/models/ReplaceTableImportRequestMicrosoftSqlServerTableImportConfig.md new file mode 100644 index 000000000..c0d2e83b7 --- /dev/null +++ b/docs/v2/Connectivity/models/ReplaceTableImportRequestMicrosoftSqlServerTableImportConfig.md @@ -0,0 +1,13 @@ +# ReplaceTableImportRequestMicrosoftSqlServerTableImportConfig + +ReplaceTableImportRequestMicrosoftSqlServerTableImportConfig + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**initial_incremental_state** | Optional[TableImportInitialIncrementalState] | No | | +**query** | TableImportQuery | Yes | | +**type** | Literal["microsoftSqlServerImportConfig"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/ReplaceTableImportRequestOracleTableImportConfig.md b/docs/v2/Connectivity/models/ReplaceTableImportRequestOracleTableImportConfig.md new file mode 100644 index 000000000..11cd74b0b --- /dev/null +++ b/docs/v2/Connectivity/models/ReplaceTableImportRequestOracleTableImportConfig.md @@ -0,0 +1,13 @@ +# ReplaceTableImportRequestOracleTableImportConfig + +ReplaceTableImportRequestOracleTableImportConfig + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**initial_incremental_state** | Optional[TableImportInitialIncrementalState] | No | | +**query** | TableImportQuery | Yes | | +**type** | Literal["oracleImportConfig"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/ReplaceTableImportRequestPostgreSqlTableImportConfig.md b/docs/v2/Connectivity/models/ReplaceTableImportRequestPostgreSqlTableImportConfig.md new file mode 100644 index 000000000..10507c95f --- /dev/null +++ b/docs/v2/Connectivity/models/ReplaceTableImportRequestPostgreSqlTableImportConfig.md @@ -0,0 +1,13 @@ +# ReplaceTableImportRequestPostgreSqlTableImportConfig + +ReplaceTableImportRequestPostgreSqlTableImportConfig + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**initial_incremental_state** | Optional[TableImportInitialIncrementalState] | No | | +**query** | TableImportQuery | Yes | | +**type** | Literal["postgreSqlImportConfig"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/ReplaceTableImportRequestSnowflakeTableImportConfig.md b/docs/v2/Connectivity/models/ReplaceTableImportRequestSnowflakeTableImportConfig.md new file mode 100644 index 000000000..1a9f700df --- /dev/null +++ b/docs/v2/Connectivity/models/ReplaceTableImportRequestSnowflakeTableImportConfig.md @@ -0,0 +1,13 @@ +# ReplaceTableImportRequestSnowflakeTableImportConfig + +ReplaceTableImportRequestSnowflakeTableImportConfig + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**initial_incremental_state** | Optional[TableImportInitialIncrementalState] | No | | +**query** | TableImportQuery | Yes | | +**type** | Literal["snowflakeImportConfig"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/ReplaceTableImportRequestTableImportConfig.md b/docs/v2/Connectivity/models/ReplaceTableImportRequestTableImportConfig.md new file mode 100644 index 000000000..b18a0e838 --- /dev/null +++ b/docs/v2/Connectivity/models/ReplaceTableImportRequestTableImportConfig.md @@ -0,0 +1,22 @@ +# ReplaceTableImportRequestTableImportConfig + +The import configuration for a specific [connector type](https://palantir.com/docs/foundry/data-integration/source-type-overview). + + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +ReplaceTableImportRequestDatabricksTableImportConfig | databricksImportConfig +ReplaceTableImportRequestJdbcTableImportConfig | jdbcImportConfig +ReplaceTableImportRequestMicrosoftSqlServerTableImportConfig | microsoftSqlServerImportConfig +ReplaceTableImportRequestPostgreSqlTableImportConfig | postgreSqlImportConfig +ReplaceTableImportRequestMicrosoftAccessTableImportConfig | microsoftAccessImportConfig +ReplaceTableImportRequestSnowflakeTableImportConfig | snowflakeImportConfig +ReplaceTableImportRequestOracleTableImportConfig | oracleImportConfig + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/RestAuthenticationMode.md b/docs/v2/Connectivity/models/RestAuthenticationMode.md new file mode 100644 index 000000000..18fe6a135 --- /dev/null +++ b/docs/v2/Connectivity/models/RestAuthenticationMode.md @@ -0,0 +1,18 @@ +# RestAuthenticationMode + +The method of authentication for connecting to an external REST system. + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +BearerToken | bearerToken +ApiKeyAuthentication | apiKey +BasicCredentials | basic +RestConnectionOAuth2 | oauth2 + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/RestConnectionAdditionalSecrets.md b/docs/v2/Connectivity/models/RestConnectionAdditionalSecrets.md new file mode 100644 index 000000000..b8be6343c --- /dev/null +++ b/docs/v2/Connectivity/models/RestConnectionAdditionalSecrets.md @@ -0,0 +1,18 @@ +# RestConnectionAdditionalSecrets + +When creating or updating additional secrets, use SecretsWithPlaintextValues. +When fetching the RestConnectionConfiguration, SecretsNames will be provided. + + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +SecretsWithPlaintextValues | asSecretsWithPlaintextValues +SecretsNames | asSecretsNames + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/RestConnectionConfiguration.md b/docs/v2/Connectivity/models/RestConnectionConfiguration.md new file mode 100644 index 000000000..69b1377d6 --- /dev/null +++ b/docs/v2/Connectivity/models/RestConnectionConfiguration.md @@ -0,0 +1,14 @@ +# RestConnectionConfiguration + +The configuration needed to connect to a [REST external system](https://palantir.com/docs/foundry/available-connectors/rest-apis). + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**domains** | List[Domain] | Yes | The domains that the connection is allowed to access. At least one domain must be specified. | +**additional_secrets** | Optional[RestConnectionAdditionalSecrets] | No | Additional secrets that can be referenced in code and webhook configurations. If not provided, no additional secrets will be created. | +**oauth2_client_rid** | Optional[RID] | No | The RID of the [Outbound application](https://palantir.com/docs/foundry/administration/configure-outbound-applications) that is used to authenticate to the external system via OAuth2. Currently, a connection may use only one outbound application for OAuth 2.0 authentication. Selecting a different outbound application will update the configuration for all domains with OAuth 2.0 as the selected authorization. | +**type** | Literal["rest"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/RestConnectionOAuth2.md b/docs/v2/Connectivity/models/RestConnectionOAuth2.md new file mode 100644 index 000000000..ad7200da1 --- /dev/null +++ b/docs/v2/Connectivity/models/RestConnectionOAuth2.md @@ -0,0 +1,13 @@ +# RestConnectionOAuth2 + +In order to use OAuth2 you must have an Outbound application configured in the [Foundry Control Panel Organization settings](https://palantir.com/docs/foundry/administration/configure-outbound-applications#create-an-outbound-application). +The RID of the Outbound application must be configured in the RestConnectionConfiguration in the `oauth2ClientRid` field. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["oauth2"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/RestRequestApiKeyLocation.md b/docs/v2/Connectivity/models/RestRequestApiKeyLocation.md new file mode 100644 index 000000000..1cb73ba71 --- /dev/null +++ b/docs/v2/Connectivity/models/RestRequestApiKeyLocation.md @@ -0,0 +1,16 @@ +# RestRequestApiKeyLocation + +The location of the API key in the request. + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +HeaderApiKey | header +QueryParameterApiKey | queryParameter + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/S3AuthenticationMode.md b/docs/v2/Connectivity/models/S3AuthenticationMode.md new file mode 100644 index 000000000..266f29991 --- /dev/null +++ b/docs/v2/Connectivity/models/S3AuthenticationMode.md @@ -0,0 +1,17 @@ +# S3AuthenticationMode + +S3AuthenticationMode + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +AwsAccessKey | awsAccessKey +CloudIdentity | cloudIdentity +AwsOidcAuthentication | oidc + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/S3ConnectionConfiguration.md b/docs/v2/Connectivity/models/S3ConnectionConfiguration.md new file mode 100644 index 000000000..47b9e3330 --- /dev/null +++ b/docs/v2/Connectivity/models/S3ConnectionConfiguration.md @@ -0,0 +1,27 @@ +# S3ConnectionConfiguration + +The configuration needed to connect to an [AWS S3 external system (or any other S3-like external systems that +implement the s3a protocol)](https://palantir.com/docs/foundry/available-connectors/amazon-s3/#amazon-s3). + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**bucket_url** | str | Yes | The URL of the S3 bucket. The URL should contain a trailing slash. | +**s3_endpoint** | Optional[str] | No | The endpoint of the S3 service. This is used to connect to a custom S3 service that is not AWS S3. If not specified, defaults to the [AWS S3 endpoint](https://docs.aws.amazon.com/general/latest/gr/s3.html). Warning: Specifying a region and a custom endpoint containing a region can lead to unexpected behavior. | +**region** | Optional[Region] | No | The region representing the location of the S3 bucket. Warning: Specifying a region and a custom endpoint containing a region can lead to unexpected behavior. | +**authentication_mode** | Optional[S3AuthenticationMode] | No | The authentication mode to use to connect to the S3 external system. No authentication mode is required to connect to publicly accessible AWS S3 buckets. | +**s3_endpoint_signing_region** | Optional[Region] | No | The region used when constructing the S3 client using a custom endpoint. This is often not required and would only be needed if you are using the S3 connector with an S3-compliant third-party API, and are also setting a custom endpoint that requires a non-default region. | +**client_kms_configuration** | Optional[S3KmsConfiguration] | No | The client-side KMS key to use for encryption and decryption of data in the S3 bucket. If not specified, the default KMS key for the bucket is used. | +**sts_role_configuration** | Optional[StsRoleConfiguration] | No | The configuration needed to assume a role to connect to the S3 external system. | +**proxy_configuration** | Optional[S3ProxyConfiguration] | No | The configuration needed to connect to the S3 external system through a proxy. | +**max_connections** | Optional[int] | No | The maximum number of HTTP connections to the S3 service per sync. If not specified, defaults to 50 as defined by the [AWS SDK default](https://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/ClientConfiguration.html#DEFAULT_MAX_CONNECTIONS). | +**connection_timeout_millis** | Optional[Long] | No | The amount of time (in milliseconds) to wait when initially establishing a connection before giving up and timing out. If not specified, defaults to 10000 as defined by the [AWS SDK default](https://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/ClientConfiguration.html#DEFAULT_CONNECTION_TIMEOUT). | +**socket_timeout_millis** | Optional[Long] | No | The amount of time (in milliseconds) to wait for data to be transferred over an established, open connection. If not specified, defaults to 50000 as defined by the [AWS SDK default](https://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/ClientConfiguration.html#DEFAULT_SOCKET_TIMEOUT). | +**max_error_retry** | Optional[int] | No | The maximum number of retry attempts for failed requests to the S3 service. If not specified, defaults to 3 as defined by the [AWS SDK default](https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/retry-strategy.html#retry-strategies). | +**match_subfolder_exactly** | Optional[bool] | No | If true, only files in the subfolder specified in the bucket URL will be synced. If false, all files in the bucket will be synced. If not specified, defaults to false. | +**enable_requester_pays** | Optional[bool] | No | Defaults to false, unless set and overwritten. If true, includes the [requester pays header](https://docs.aws.amazon.com/AmazonS3/latest/userguide/RequesterPaysBuckets.html) in requests, allowing reads from requester pays buckets. | +**type** | Literal["s3"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/S3KmsConfiguration.md b/docs/v2/Connectivity/models/S3KmsConfiguration.md new file mode 100644 index 000000000..f89adb472 --- /dev/null +++ b/docs/v2/Connectivity/models/S3KmsConfiguration.md @@ -0,0 +1,12 @@ +# S3KmsConfiguration + +S3KmsConfiguration + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**kms_key** | str | Yes | The client-side KMS key to use for encryption and decryption of data in the S3 bucket. If not specified, the default KMS key for the bucket is used. | +**kms_region** | Optional[Region] | No | The region of the client-side KMS key to use for encryption and decryption of data in the S3 bucket. If not specified, the default KMS key region for the bucket is used. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/S3ProxyConfiguration.md b/docs/v2/Connectivity/models/S3ProxyConfiguration.md new file mode 100644 index 000000000..fddc7fb86 --- /dev/null +++ b/docs/v2/Connectivity/models/S3ProxyConfiguration.md @@ -0,0 +1,15 @@ +# S3ProxyConfiguration + +S3ProxyConfiguration + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**host** | str | Yes | Domain name, IPv4, or IPv6 address. `protocol` and `port` must be specified separately. | +**port** | int | Yes | | +**non_proxy_hosts** | Optional[List[str]] | No | A list of hosts that can bypass the proxy, such as those used for STS Role. You can also use "*" wildcards. | +**protocol** | Optional[Protocol] | No | If defined, must be "HTTP" or "HTTPS". Defaults to "HTTPS". | +**credentials** | Optional[BasicCredentials] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/SecretName.md b/docs/v2/Connectivity/models/SecretName.md new file mode 100644 index 000000000..2f75c8f9c --- /dev/null +++ b/docs/v2/Connectivity/models/SecretName.md @@ -0,0 +1,11 @@ +# SecretName + +SecretName + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/SecretsNames.md b/docs/v2/Connectivity/models/SecretsNames.md new file mode 100644 index 000000000..c85de0248 --- /dev/null +++ b/docs/v2/Connectivity/models/SecretsNames.md @@ -0,0 +1,14 @@ +# SecretsNames + +A list of secret names that can be referenced in code and webhook configurations. +This will be provided to the client when fetching the RestConnectionConfiguration. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**secret_names** | List[SecretName] | Yes | The names of the additional secrets that can be referenced in code and webhook configurations. | +**type** | Literal["asSecretsNames"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/SecretsWithPlaintextValues.md b/docs/v2/Connectivity/models/SecretsWithPlaintextValues.md new file mode 100644 index 000000000..94b3b9daf --- /dev/null +++ b/docs/v2/Connectivity/models/SecretsWithPlaintextValues.md @@ -0,0 +1,14 @@ +# SecretsWithPlaintextValues + +A map representing secret name to plaintext secret value pairs. +This should be used when creating or updating additional secrets for a REST connection. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**secrets** | Dict[SecretName, PlaintextValue] | Yes | The additional secrets that can be referenced in code and webhook configurations. | +**type** | Literal["asSecretsWithPlaintextValues"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/SmbAuth.md b/docs/v2/Connectivity/models/SmbAuth.md new file mode 100644 index 000000000..22fedc8cf --- /dev/null +++ b/docs/v2/Connectivity/models/SmbAuth.md @@ -0,0 +1,11 @@ +# SmbAuth + +SmbAuth + +## Type +```python +SmbUsernamePasswordAuth +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/SmbConnectionConfiguration.md b/docs/v2/Connectivity/models/SmbConnectionConfiguration.md new file mode 100644 index 000000000..616f41e9d --- /dev/null +++ b/docs/v2/Connectivity/models/SmbConnectionConfiguration.md @@ -0,0 +1,18 @@ +# SmbConnectionConfiguration + +SmbConnectionConfiguration + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**hostname** | str | Yes | Any identifier that can resolve to a server hosting an SMB share. This includes IP addresses, local network names (e.g. FS-SERVER-01) or FQDNs. Should not include any protocol information like https://, smb://, etc | +**port** | Optional[int] | No | 445 by default | +**proxy** | Optional[SmbProxyConfiguration] | No | | +**share** | str | Yes | Must be a valid SMB share name. https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-fscc/dc9978d7-6299-4c5a-a22d-a039cdc716ea | +**base_directory** | Optional[str] | No | All reads and writes in this source will happen in this subdirectory | +**auth** | SmbAuth | Yes | | +**require_message_signing** | Optional[bool] | No | If true, the client will request that the server sign all messages. If the server does not support message signing, the connection will fail. Defaults to true. | +**type** | Literal["smb"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/SmbProxyConfiguration.md b/docs/v2/Connectivity/models/SmbProxyConfiguration.md new file mode 100644 index 000000000..0441387f5 --- /dev/null +++ b/docs/v2/Connectivity/models/SmbProxyConfiguration.md @@ -0,0 +1,13 @@ +# SmbProxyConfiguration + +Egress proxy to pass all traffic through. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**hostname** | str | Yes | | +**port** | int | Yes | | +**protocol** | SmbProxyType | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/SmbProxyType.md b/docs/v2/Connectivity/models/SmbProxyType.md new file mode 100644 index 000000000..e379aef47 --- /dev/null +++ b/docs/v2/Connectivity/models/SmbProxyType.md @@ -0,0 +1,11 @@ +# SmbProxyType + +SmbProxyType + +| **Value** | +| --------- | +| `"HTTP"` | +| `"SOCKS"` | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/SmbUsernamePasswordAuth.md b/docs/v2/Connectivity/models/SmbUsernamePasswordAuth.md new file mode 100644 index 000000000..39c520ecf --- /dev/null +++ b/docs/v2/Connectivity/models/SmbUsernamePasswordAuth.md @@ -0,0 +1,14 @@ +# SmbUsernamePasswordAuth + +SmbUsernamePasswordAuth + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**username** | str | Yes | | +**password** | EncryptedProperty | Yes | | +**domain** | Optional[str] | No | Optionally specify a Windows domain to use when authenticating. Normal DNS domain restrictions apply but the top-level domain might be something non-standard like .local. Defaults to WORKGROUP | +**type** | Literal["usernamePassword"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/SnowflakeAuthenticationMode.md b/docs/v2/Connectivity/models/SnowflakeAuthenticationMode.md new file mode 100644 index 000000000..249017248 --- /dev/null +++ b/docs/v2/Connectivity/models/SnowflakeAuthenticationMode.md @@ -0,0 +1,17 @@ +# SnowflakeAuthenticationMode + +SnowflakeAuthenticationMode + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +SnowflakeExternalOauth | externalOauth +SnowflakeKeyPairAuthentication | keyPair +BasicCredentials | basic + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/SnowflakeConnectionConfiguration.md b/docs/v2/Connectivity/models/SnowflakeConnectionConfiguration.md new file mode 100644 index 000000000..d0770b8f9 --- /dev/null +++ b/docs/v2/Connectivity/models/SnowflakeConnectionConfiguration.md @@ -0,0 +1,19 @@ +# SnowflakeConnectionConfiguration + +The configuration needed to connect to a Snowflake database. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**account_identifier** | str | Yes | An [account identifier](https://docs.snowflake.com/en/user-guide/admin-account-identifier) uniquely identifies a Snowflake account within your organization, as well as throughout the global network of Snowflake-supported cloud platforms and cloud regions. The URL for an account uses the following format: .snowflakecomputing.com. An example URL is https://acme-test_aws_us_east_2.snowflakecomputing.com. | +**database** | Optional[str] | No | Specifies the default database to use once connected. If unspecified, defaults to the empty string. The specified database should be an existing database for which the specified default role has privileges. See https://docs.snowflake.com/developer-guide/jdbc/jdbc-parameters#db | +**role** | Optional[str] | No | Specifies the default access control role to use in the Snowflake session initiated by the driver. If unspecified, no role will be used when the session is initiated by the driver. The specified role should be an existing role that has already been assigned to the specified user for the driver. If the specified role has not already been assigned to the user, the role is not used when the session is initiated by the driver. See https://docs.snowflake.com/developer-guide/jdbc/jdbc-parameters#role | +**schema_** | Optional[str] | No | Specifies the default schema to use for the specified database once connected. If unspecified, defaults to the empty string. The specified schema should be an existing schema for which the specified default role has privileges. See https://docs.snowflake.com/developer-guide/jdbc/jdbc-parameters#schema | +**warehouse** | Optional[str] | No | Specifies the virtual warehouse to use once connected. If unspecified, defaults to the empty string. The specified warehouse should be an existing warehouse for which the specified default role has privileges. See https://docs.snowflake.com/developer-guide/jdbc/jdbc-parameters#warehouse | +**authentication_mode** | SnowflakeAuthenticationMode | Yes | The authentication mode to use to connect to the Snowflake database. | +**jdbc_properties** | JdbcProperties | Yes | | +**type** | Literal["snowflake"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/SnowflakeExternalOauth.md b/docs/v2/Connectivity/models/SnowflakeExternalOauth.md new file mode 100644 index 000000000..a0b1e5a5d --- /dev/null +++ b/docs/v2/Connectivity/models/SnowflakeExternalOauth.md @@ -0,0 +1,17 @@ +# SnowflakeExternalOauth + +Use an External OAuth security integration to connect and authenticate to Snowflake. + +See https://docs.snowflake.com/en/user-guide/oauth-ext-custom + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**audience** | str | Yes | Identifies the recipients that the access token is intended for as a string URI. | +**issuer_url** | str | Yes | Identifies the principal that issued the access token as a string URI. | +**subject** | ConnectionRid | Yes | The RID of the Connection that is connecting to the external system. | +**type** | Literal["externalOauth"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/SnowflakeKeyPairAuthentication.md b/docs/v2/Connectivity/models/SnowflakeKeyPairAuthentication.md new file mode 100644 index 000000000..59a76dae0 --- /dev/null +++ b/docs/v2/Connectivity/models/SnowflakeKeyPairAuthentication.md @@ -0,0 +1,16 @@ +# SnowflakeKeyPairAuthentication + +Use a key-pair to connect and authenticate to Snowflake. + +See https://docs.snowflake.com/en/user-guide/key-pair-auth + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**user** | str | Yes | | +**private_key** | EncryptedProperty | Yes | | +**type** | Literal["keyPair"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/SnowflakeTableImportConfig.md b/docs/v2/Connectivity/models/SnowflakeTableImportConfig.md new file mode 100644 index 000000000..621a7cedd --- /dev/null +++ b/docs/v2/Connectivity/models/SnowflakeTableImportConfig.md @@ -0,0 +1,14 @@ +# SnowflakeTableImportConfig + +The table import configuration for a [Snowflake connection](https://palantir.com/docs/foundry/available-connectors/snowflake). + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**query** | TableImportQuery | Yes | | +**initial_incremental_state** | Optional[TableImportInitialIncrementalState] | No | | +**type** | Literal["snowflakeImportConfig"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/SnowflakeVirtualTableConfig.md b/docs/v2/Connectivity/models/SnowflakeVirtualTableConfig.md new file mode 100644 index 000000000..319a137eb --- /dev/null +++ b/docs/v2/Connectivity/models/SnowflakeVirtualTableConfig.md @@ -0,0 +1,14 @@ +# SnowflakeVirtualTableConfig + +Pointer to the table in Snowflake. Uses the Snowflake table identifier of database, schema and table. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**database** | str | Yes | The database name. | +**schema_** | str | Yes | The schema name. | +**table** | str | Yes | The table name. | +**type** | Literal["snowflake"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/StringColumnInitialIncrementalState.md b/docs/v2/Connectivity/models/StringColumnInitialIncrementalState.md new file mode 100644 index 000000000..9dc81155f --- /dev/null +++ b/docs/v2/Connectivity/models/StringColumnInitialIncrementalState.md @@ -0,0 +1,14 @@ +# StringColumnInitialIncrementalState + +The state for an incremental table import using a column with a string data type. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**column_name** | str | Yes | | +**current_value** | str | Yes | The initial incremental state value for the string column to reference in the query. | +**type** | Literal["stringColumnInitialIncrementalState"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/StsRoleConfiguration.md b/docs/v2/Connectivity/models/StsRoleConfiguration.md new file mode 100644 index 000000000..bdbaabaaf --- /dev/null +++ b/docs/v2/Connectivity/models/StsRoleConfiguration.md @@ -0,0 +1,15 @@ +# StsRoleConfiguration + +StsRoleConfiguration + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**role_arn** | str | Yes | The Amazon Resource Name (ARN) of the role to assume. For more information, see the official [AWS documentation](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html#principal-arn-format). | +**role_session_name** | str | Yes | An identifier for the assumed role session. The value can be any string that you assume will be unique within the AWS account. For more information, see the official [AWS documentation](https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRole.html#API_AssumeRole_RequestParameters). | +**role_session_duration** | Optional[Duration] | No | The duration of the role session. The value specified can range from 900 seconds (15 minutes) up to the maximum session duration set for the role. The maximum session duration setting can have a value from 1 hour to 12 hours. For more details see the official [AWS documentation](https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRole.html#API_AssumeRole_RequestParameters). | +**external_id** | Optional[str] | No | A unique identifier that is used by third parties when assuming roles in their customers' accounts. For more information, see the official [AWS documentation](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_externalid.html). | +**sts_endpoint** | Optional[str] | No | By default, the AWS Security Token Service (AWS STS) is available as a global service, and all AWS STS requests go to a single endpoint at https://sts.amazonaws.com. AWS recommends using Regional AWS STS endpoints instead of the global endpoint to reduce latency, build in redundancy, and increase session token validity. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/TableImport.md b/docs/v2/Connectivity/models/TableImport.md new file mode 100644 index 000000000..7f6fdbcfa --- /dev/null +++ b/docs/v2/Connectivity/models/TableImport.md @@ -0,0 +1,18 @@ +# TableImport + +TableImport + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**rid** | TableImportRid | Yes | | +**connection_rid** | ConnectionRid | Yes | The RID of the Connection (also known as a source) that the Table Import uses to import data. | +**dataset_rid** | DatasetRid | Yes | The RID of the output dataset. Can not be modified after the table import is created. | +**branch_name** | Optional[BranchName] | No | The branch name in the output dataset that will contain the imported data. Defaults to `master` for most enrollments. Can not be modified after the table import is created. | +**display_name** | TableImportDisplayName | Yes | | +**import_mode** | TableImportMode | Yes | | +**allow_schema_changes** | TableImportAllowSchemaChanges | Yes | Allow the TableImport to succeed if the schema of imported rows does not match the existing dataset's schema. Defaults to false for new table imports. | +**config** | TableImportConfig | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/TableImportAllowSchemaChanges.md b/docs/v2/Connectivity/models/TableImportAllowSchemaChanges.md new file mode 100644 index 000000000..5f668cdef --- /dev/null +++ b/docs/v2/Connectivity/models/TableImportAllowSchemaChanges.md @@ -0,0 +1,11 @@ +# TableImportAllowSchemaChanges + +Allow the TableImport to succeed if the schema of imported rows does not match the existing dataset's schema. Defaults to false for new table imports. + +## Type +```python +bool +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/TableImportConfig.md b/docs/v2/Connectivity/models/TableImportConfig.md new file mode 100644 index 000000000..19740ac17 --- /dev/null +++ b/docs/v2/Connectivity/models/TableImportConfig.md @@ -0,0 +1,22 @@ +# TableImportConfig + +The import configuration for a specific [connector type](https://palantir.com/docs/foundry/data-integration/source-type-overview). + + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +DatabricksTableImportConfig | databricksImportConfig +JdbcTableImportConfig | jdbcImportConfig +MicrosoftSqlServerTableImportConfig | microsoftSqlServerImportConfig +PostgreSqlTableImportConfig | postgreSqlImportConfig +MicrosoftAccessTableImportConfig | microsoftAccessImportConfig +SnowflakeTableImportConfig | snowflakeImportConfig +OracleTableImportConfig | oracleImportConfig + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/TableImportDisplayName.md b/docs/v2/Connectivity/models/TableImportDisplayName.md new file mode 100644 index 000000000..9de1dcaad --- /dev/null +++ b/docs/v2/Connectivity/models/TableImportDisplayName.md @@ -0,0 +1,11 @@ +# TableImportDisplayName + +TableImportDisplayName + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/TableImportInitialIncrementalState.md b/docs/v2/Connectivity/models/TableImportInitialIncrementalState.md new file mode 100644 index 000000000..bd5ec44b3 --- /dev/null +++ b/docs/v2/Connectivity/models/TableImportInitialIncrementalState.md @@ -0,0 +1,27 @@ +# TableImportInitialIncrementalState + +The incremental configuration for a table import enables append-style transactions from the same table without duplication of data. +You must provide a monotonically increasing column such as a timestamp or id and an initial value for this column. +An incremental table import will import rows where the value is greater than the largest already imported. + +You can use the '?' character to reference the incremental state value when constructing your query. +Normally this would be used in a WHERE clause or similar filter applied in order to only sync data with an incremental column value +larger than the previously observed maximum value stored in the incremental state. + + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +StringColumnInitialIncrementalState | stringColumnInitialIncrementalState +DateColumnInitialIncrementalState | dateColumnInitialIncrementalState +IntegerColumnInitialIncrementalState | integerColumnInitialIncrementalState +TimestampColumnInitialIncrementalState | timestampColumnInitialIncrementalState +LongColumnInitialIncrementalState | longColumnInitialIncrementalState +DecimalColumnInitialIncrementalState | decimalColumnInitialIncrementalState + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/TableImportMode.md b/docs/v2/Connectivity/models/TableImportMode.md new file mode 100644 index 000000000..fa022c112 --- /dev/null +++ b/docs/v2/Connectivity/models/TableImportMode.md @@ -0,0 +1,15 @@ +# TableImportMode + +Import mode governs how data is read from an external system, and written into a Foundry dataset. + +SNAPSHOT: Defines a new dataset state consisting only of data from a particular import execution. +APPEND: Purely additive and yields data from previous import executions in addition to newly added data. + + +| **Value** | +| --------- | +| `"SNAPSHOT"` | +| `"APPEND"` | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/TableImportQuery.md b/docs/v2/Connectivity/models/TableImportQuery.md new file mode 100644 index 000000000..848f29708 --- /dev/null +++ b/docs/v2/Connectivity/models/TableImportQuery.md @@ -0,0 +1,14 @@ +# TableImportQuery + +A single SQL query can be executed per sync, which should output a data table +and avoid operations like invoking stored procedures. +The query results are saved to the output dataset in Foundry. + + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/TableImportRid.md b/docs/v2/Connectivity/models/TableImportRid.md new file mode 100644 index 000000000..1d3f190a0 --- /dev/null +++ b/docs/v2/Connectivity/models/TableImportRid.md @@ -0,0 +1,12 @@ +# TableImportRid + +The Resource Identifier (RID) of a TableImport (also known as a batch sync). + + +## Type +```python +RID +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/TableName.md b/docs/v2/Connectivity/models/TableName.md new file mode 100644 index 000000000..0a7f5aa82 --- /dev/null +++ b/docs/v2/Connectivity/models/TableName.md @@ -0,0 +1,12 @@ +# TableName + +The name of a VirtualTable. + + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/TableRid.md b/docs/v2/Connectivity/models/TableRid.md new file mode 100644 index 000000000..64bc2b355 --- /dev/null +++ b/docs/v2/Connectivity/models/TableRid.md @@ -0,0 +1,12 @@ +# TableRid + +The Resource Identifier (RID) of a registered VirtualTable. + + +## Type +```python +RID +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/TimestampColumnInitialIncrementalState.md b/docs/v2/Connectivity/models/TimestampColumnInitialIncrementalState.md new file mode 100644 index 000000000..af7bbba39 --- /dev/null +++ b/docs/v2/Connectivity/models/TimestampColumnInitialIncrementalState.md @@ -0,0 +1,13 @@ +# TimestampColumnInitialIncrementalState + +TimestampColumnInitialIncrementalState + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**column_name** | str | Yes | | +**current_value** | datetime | Yes | The initial incremental state value for the timestamp column in UTC to reference in the query. | +**type** | Literal["timestampColumnInitialIncrementalState"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/UnityVirtualTableConfig.md b/docs/v2/Connectivity/models/UnityVirtualTableConfig.md new file mode 100644 index 000000000..f9d5e0fe6 --- /dev/null +++ b/docs/v2/Connectivity/models/UnityVirtualTableConfig.md @@ -0,0 +1,14 @@ +# UnityVirtualTableConfig + +Pointer to the table in Unity Catalog. Uses the Databricks table identifier of catalog, schema and table. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**catalog** | str | Yes | The catalog name. | +**schema_** | str | Yes | The schema name. | +**table** | str | Yes | The table name. | +**type** | Literal["unity"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/UnknownWorker.md b/docs/v2/Connectivity/models/UnknownWorker.md new file mode 100644 index 000000000..d4940d42c --- /dev/null +++ b/docs/v2/Connectivity/models/UnknownWorker.md @@ -0,0 +1,15 @@ +# UnknownWorker + +A ConnectionWorker that is not supported in the Platform APIs. This can happen because either the +ConnectionWorker configuration is malformed, or because the ConnectionWorker is a legacy one. +The ConnectionWorker should be updated to use the [Foundry worker](https://palantir.com/docs/foundry/data-connection/core-concepts/#foundry-worker) +with either direct egress policies or agent proxy egress policies. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["unknownWorker"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/UpdateExportSettingsForConnectionRequest.md b/docs/v2/Connectivity/models/UpdateExportSettingsForConnectionRequest.md new file mode 100644 index 000000000..2f98271fe --- /dev/null +++ b/docs/v2/Connectivity/models/UpdateExportSettingsForConnectionRequest.md @@ -0,0 +1,11 @@ +# UpdateExportSettingsForConnectionRequest + +UpdateExportSettingsForConnectionRequest + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**export_settings** | ConnectionExportSettings | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/UpdateSecretsForConnectionRequest.md b/docs/v2/Connectivity/models/UpdateSecretsForConnectionRequest.md new file mode 100644 index 000000000..5c6197dd2 --- /dev/null +++ b/docs/v2/Connectivity/models/UpdateSecretsForConnectionRequest.md @@ -0,0 +1,11 @@ +# UpdateSecretsForConnectionRequest + +UpdateSecretsForConnectionRequest + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**secrets** | Dict[SecretName, PlaintextValue] | Yes | The secrets to be updated. The specified secret names must already be configured on the connection. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/UriScheme.md b/docs/v2/Connectivity/models/UriScheme.md new file mode 100644 index 000000000..864053250 --- /dev/null +++ b/docs/v2/Connectivity/models/UriScheme.md @@ -0,0 +1,11 @@ +# UriScheme + +Defines supported URI schemes to be used for external connections. + +| **Value** | +| --------- | +| `"HTTP"` | +| `"HTTPS"` | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/VirtualTable.md b/docs/v2/Connectivity/models/VirtualTable.md new file mode 100644 index 000000000..bcd133761 --- /dev/null +++ b/docs/v2/Connectivity/models/VirtualTable.md @@ -0,0 +1,15 @@ +# VirtualTable + +VirtualTable + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**rid** | TableRid | Yes | | +**name** | TableName | Yes | | +**parent_rid** | FolderRid | Yes | | +**config** | VirtualTableConfig | Yes | | +**markings** | Optional[List[MarkingId]] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/VirtualTableConfig.md b/docs/v2/Connectivity/models/VirtualTableConfig.md new file mode 100644 index 000000000..fdaf666a7 --- /dev/null +++ b/docs/v2/Connectivity/models/VirtualTableConfig.md @@ -0,0 +1,21 @@ +# VirtualTableConfig + +VirtualTableConfig + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +SnowflakeVirtualTableConfig | snowflake +UnityVirtualTableConfig | unity +GlueVirtualTableConfig | glue +DeltaVirtualTableConfig | delta +IcebergVirtualTableConfig | iceberg +FilesVirtualTableConfig | files +BigQueryVirtualTableConfig | bigquery + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Connectivity/models/WorkflowIdentityFederation.md b/docs/v2/Connectivity/models/WorkflowIdentityFederation.md new file mode 100644 index 000000000..e59abe280 --- /dev/null +++ b/docs/v2/Connectivity/models/WorkflowIdentityFederation.md @@ -0,0 +1,20 @@ +# WorkflowIdentityFederation + +Authenticate as a service principal using workload identity federation. This is the recommended way to connect to Databricks. +Workload identity federation allows workloads running in Foundry to access Databricks APIs without the need for Databricks secrets. +Refer to our [OIDC documentation](https://palantir.com/docs/foundry/data-connection/oidc) for an overview of how OpenID Connect is supported in Foundry. +A service principal federation policy must exist in Databricks to allow Foundry to act as an identity provider. +Refer to the [official documentation](https://docs.databricks.com/aws/en/dev-tools/auth/oauth-federation) for guidance. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**service_principal_application_id** | Optional[str] | No | The ID of the Databricks [service principal](https://docs.databricks.com/aws/en/admin/users-groups/service-principals). If provided, a federated JWT token is exchanged using a service principal federation policy. If not provided, a federated JWT token is exchanged using an account federation policy. | +**issuer_url** | str | Yes | Identifies the principal that issued the access token as a string URI. | +**audience** | str | Yes | Identifies the recipients that the access token is intended for as a string URI. This should be the primary host name where the Connection lives. | +**subject** | ConnectionRid | Yes | The RID of the Connection that is connecting to the external system. | +**type** | Literal["workflowIdentityFederation"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/AnyType.md b/docs/v2/Core/models/AnyType.md new file mode 100644 index 000000000..fafc822a1 --- /dev/null +++ b/docs/v2/Core/models/AnyType.md @@ -0,0 +1,11 @@ +# AnyType + +AnyType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["any"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/ArrayFieldType.md b/docs/v2/Core/models/ArrayFieldType.md new file mode 100644 index 000000000..1d7be70e0 --- /dev/null +++ b/docs/v2/Core/models/ArrayFieldType.md @@ -0,0 +1,12 @@ +# ArrayFieldType + +ArrayFieldType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**items_schema** | FieldSchema | Yes | | +**type** | Literal["array"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/AttachmentType.md b/docs/v2/Core/models/AttachmentType.md new file mode 100644 index 000000000..9d0587820 --- /dev/null +++ b/docs/v2/Core/models/AttachmentType.md @@ -0,0 +1,11 @@ +# AttachmentType + +AttachmentType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["attachment"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/Attribution.md b/docs/v2/Core/models/Attribution.md new file mode 100644 index 000000000..9cf57cfbc --- /dev/null +++ b/docs/v2/Core/models/Attribution.md @@ -0,0 +1,11 @@ +# Attribution + +Attribution for a request + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/BinaryType.md b/docs/v2/Core/models/BinaryType.md new file mode 100644 index 000000000..231b7bdd4 --- /dev/null +++ b/docs/v2/Core/models/BinaryType.md @@ -0,0 +1,11 @@ +# BinaryType + +BinaryType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["binary"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/BooleanType.md b/docs/v2/Core/models/BooleanType.md new file mode 100644 index 000000000..0c8a4323b --- /dev/null +++ b/docs/v2/Core/models/BooleanType.md @@ -0,0 +1,11 @@ +# BooleanType + +BooleanType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["boolean"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/BranchMetadata.md b/docs/v2/Core/models/BranchMetadata.md new file mode 100644 index 000000000..868ec3ee2 --- /dev/null +++ b/docs/v2/Core/models/BranchMetadata.md @@ -0,0 +1,11 @@ +# BranchMetadata + +Metadata about a Foundry branch. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**rid** | FoundryBranch | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/BuildRid.md b/docs/v2/Core/models/BuildRid.md new file mode 100644 index 000000000..2aa231654 --- /dev/null +++ b/docs/v2/Core/models/BuildRid.md @@ -0,0 +1,11 @@ +# BuildRid + +The RID of a Build. + +## Type +```python +RID +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/ByteType.md b/docs/v2/Core/models/ByteType.md new file mode 100644 index 000000000..5a69a03dc --- /dev/null +++ b/docs/v2/Core/models/ByteType.md @@ -0,0 +1,11 @@ +# ByteType + +ByteType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["byte"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/ChangeDataCaptureConfiguration.md b/docs/v2/Core/models/ChangeDataCaptureConfiguration.md new file mode 100644 index 000000000..8fa28594d --- /dev/null +++ b/docs/v2/Core/models/ChangeDataCaptureConfiguration.md @@ -0,0 +1,16 @@ +# ChangeDataCaptureConfiguration + +Configuration for utilizing the stream as a change data capture (CDC) dataset. To configure CDC on a stream, at +least one key needs to be provided. + +For more information on CDC in +Foundry, see the [Change Data Capture](https://palantir.com/docs/foundry/data-integration/change-data-capture/) user documentation. + + +## Type +```python +FullRowChangeDataCaptureConfiguration +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/CheckReportRid.md b/docs/v2/Core/models/CheckReportRid.md new file mode 100644 index 000000000..4eb43ded0 --- /dev/null +++ b/docs/v2/Core/models/CheckReportRid.md @@ -0,0 +1,11 @@ +# CheckReportRid + +The unique resource identifier (RID) of a Data Health Check Report. + +## Type +```python +RID +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/CheckRid.md b/docs/v2/Core/models/CheckRid.md new file mode 100644 index 000000000..6146c5d68 --- /dev/null +++ b/docs/v2/Core/models/CheckRid.md @@ -0,0 +1,11 @@ +# CheckRid + +The unique resource identifier (RID) of a Data Health Check. + +## Type +```python +RID +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/CipherTextType.md b/docs/v2/Core/models/CipherTextType.md new file mode 100644 index 000000000..f04baf4e3 --- /dev/null +++ b/docs/v2/Core/models/CipherTextType.md @@ -0,0 +1,12 @@ +# CipherTextType + +CipherTextType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**default_cipher_channel** | Optional[RID] | No | An optional Cipher Channel RID which can be used for encryption updates to empty values. | +**type** | Literal["cipherText"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/ComputeSeconds.md b/docs/v2/Core/models/ComputeSeconds.md new file mode 100644 index 000000000..7213e9612 --- /dev/null +++ b/docs/v2/Core/models/ComputeSeconds.md @@ -0,0 +1,11 @@ +# ComputeSeconds + +A measurement of compute usage expressed in [compute-seconds](https://palantir.com/docs/foundry/resource-management/usage-types#compute-second). For more information, please refer to the [Usage types](https://palantir.com/docs/foundry/resource-management/usage-types) documentation. + +## Type +```python +float +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/ContentLength.md b/docs/v2/Core/models/ContentLength.md new file mode 100644 index 000000000..c3b7808e6 --- /dev/null +++ b/docs/v2/Core/models/ContentLength.md @@ -0,0 +1,11 @@ +# ContentLength + +ContentLength + +## Type +```python +Long +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/ContentType.md b/docs/v2/Core/models/ContentType.md new file mode 100644 index 000000000..fe28ca7f0 --- /dev/null +++ b/docs/v2/Core/models/ContentType.md @@ -0,0 +1,11 @@ +# ContentType + +ContentType + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/CreatedBy.md b/docs/v2/Core/models/CreatedBy.md new file mode 100644 index 000000000..ce3c4a306 --- /dev/null +++ b/docs/v2/Core/models/CreatedBy.md @@ -0,0 +1,11 @@ +# CreatedBy + +The Foundry user who created this resource + +## Type +```python +PrincipalId +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/CreatedTime.md b/docs/v2/Core/models/CreatedTime.md new file mode 100644 index 000000000..f450d5535 --- /dev/null +++ b/docs/v2/Core/models/CreatedTime.md @@ -0,0 +1,12 @@ +# CreatedTime + +The time at which the resource was created. + + +## Type +```python +datetime +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/CustomMetadata.md b/docs/v2/Core/models/CustomMetadata.md new file mode 100644 index 000000000..d99760693 --- /dev/null +++ b/docs/v2/Core/models/CustomMetadata.md @@ -0,0 +1,11 @@ +# CustomMetadata + +CustomMetadata + +## Type +```python +Dict[str, Any] +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/DatasetFieldSchema.md b/docs/v2/Core/models/DatasetFieldSchema.md new file mode 100644 index 000000000..6995c8df2 --- /dev/null +++ b/docs/v2/Core/models/DatasetFieldSchema.md @@ -0,0 +1,22 @@ +# DatasetFieldSchema + +A field in a Foundry dataset. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | SchemaFieldType | Yes | | +**name** | Optional[FieldName] | No | The name of a column. May be absent in nested schema objects. | +**nullable** | bool | Yes | Indicates whether values of this field may be null. | +**user_defined_type_class** | Optional[str] | No | Canonical classname of the user-defined type for this field. This should be a subclass of Spark's `UserDefinedType`. | +**custom_metadata** | Optional[CustomMetadata] | No | User-supplied custom metadata about the column, such as Foundry web archetypes, descriptions, etc. | +**array_subtype** | Optional[DatasetFieldSchema] | No | Only used when field type is array. | +**precision** | Optional[int] | No | Only used when field type is decimal. | +**scale** | Optional[int] | No | Only used when field type is decimal. | +**map_key_type** | Optional[DatasetFieldSchema] | No | Only used when field type is map. | +**map_value_type** | Optional[DatasetFieldSchema] | No | Only used when field type is map. | +**sub_schemas** | Optional[List[DatasetFieldSchema]] | No | Only used when field type is struct. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/DatasetSchema.md b/docs/v2/Core/models/DatasetSchema.md new file mode 100644 index 000000000..e7e189a14 --- /dev/null +++ b/docs/v2/Core/models/DatasetSchema.md @@ -0,0 +1,12 @@ +# DatasetSchema + +The schema for a Foundry dataset. Files uploaded to this dataset must match this schema. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**field_schema_list** | List[DatasetFieldSchema] | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/DateType.md b/docs/v2/Core/models/DateType.md new file mode 100644 index 000000000..dd820f1b5 --- /dev/null +++ b/docs/v2/Core/models/DateType.md @@ -0,0 +1,11 @@ +# DateType + +DateType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["date"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/DecimalType.md b/docs/v2/Core/models/DecimalType.md new file mode 100644 index 000000000..dec41b4d5 --- /dev/null +++ b/docs/v2/Core/models/DecimalType.md @@ -0,0 +1,13 @@ +# DecimalType + +DecimalType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**precision** | Optional[int] | No | The total number of digits of the Decimal type. The maximum value is 38. | +**scale** | Optional[int] | No | The number of digits to the right of the decimal point. The maximum value is 38. | +**type** | Literal["decimal"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/DisplayName.md b/docs/v2/Core/models/DisplayName.md new file mode 100644 index 000000000..f326538c5 --- /dev/null +++ b/docs/v2/Core/models/DisplayName.md @@ -0,0 +1,11 @@ +# DisplayName + +The display name of the entity. + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/Distance.md b/docs/v2/Core/models/Distance.md new file mode 100644 index 000000000..03fc63450 --- /dev/null +++ b/docs/v2/Core/models/Distance.md @@ -0,0 +1,12 @@ +# Distance + +A measurement of distance. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**value** | float | Yes | | +**unit** | DistanceUnit | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/DistanceUnit.md b/docs/v2/Core/models/DistanceUnit.md new file mode 100644 index 000000000..8c307f2bf --- /dev/null +++ b/docs/v2/Core/models/DistanceUnit.md @@ -0,0 +1,18 @@ +# DistanceUnit + +DistanceUnit + +| **Value** | +| --------- | +| `"MILLIMETERS"` | +| `"CENTIMETERS"` | +| `"METERS"` | +| `"KILOMETERS"` | +| `"INCHES"` | +| `"FEET"` | +| `"YARDS"` | +| `"MILES"` | +| `"NAUTICAL_MILES"` | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/DoubleType.md b/docs/v2/Core/models/DoubleType.md new file mode 100644 index 000000000..55f1765c5 --- /dev/null +++ b/docs/v2/Core/models/DoubleType.md @@ -0,0 +1,11 @@ +# DoubleType + +DoubleType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["double"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/Duration.md b/docs/v2/Core/models/Duration.md new file mode 100644 index 000000000..10d85e9e7 --- /dev/null +++ b/docs/v2/Core/models/Duration.md @@ -0,0 +1,12 @@ +# Duration + +A measurement of duration. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**value** | int | Yes | The duration value. | +**unit** | TimeUnit | Yes | The unit of duration. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/DurationSeconds.md b/docs/v2/Core/models/DurationSeconds.md new file mode 100644 index 000000000..94d0f07dd --- /dev/null +++ b/docs/v2/Core/models/DurationSeconds.md @@ -0,0 +1,11 @@ +# DurationSeconds + +A duration of time measured in seconds. + +## Type +```python +Long +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/EmbeddingModel.md b/docs/v2/Core/models/EmbeddingModel.md new file mode 100644 index 000000000..dbb6e9114 --- /dev/null +++ b/docs/v2/Core/models/EmbeddingModel.md @@ -0,0 +1,16 @@ +# EmbeddingModel + +EmbeddingModel + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +LmsEmbeddingModel | lms +FoundryLiveDeployment | foundryLiveDeployment + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/EnrollmentRid.md b/docs/v2/Core/models/EnrollmentRid.md new file mode 100644 index 000000000..48e17e43f --- /dev/null +++ b/docs/v2/Core/models/EnrollmentRid.md @@ -0,0 +1,11 @@ +# EnrollmentRid + +EnrollmentRid + +## Type +```python +RID +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/Field.md b/docs/v2/Core/models/Field.md new file mode 100644 index 000000000..6ff96c1ec --- /dev/null +++ b/docs/v2/Core/models/Field.md @@ -0,0 +1,14 @@ +# Field + +A field in a Foundry schema. For more information on supported data types, see the +[supported field types](https://palantir.com/docs/foundry/data-integration/datasets/#supported-field-types) user documentation. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**name** | FieldName | Yes | | +**schema_** | FieldSchema | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/FieldDataType.md b/docs/v2/Core/models/FieldDataType.md new file mode 100644 index 000000000..9c6d1892c --- /dev/null +++ b/docs/v2/Core/models/FieldDataType.md @@ -0,0 +1,29 @@ +# FieldDataType + +FieldDataType + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +StructFieldType | struct +DateType | date +StringType | string +ByteType | byte +DoubleType | double +IntegerType | integer +FloatType | float +LongType | long +BooleanType | boolean +ArrayFieldType | array +BinaryType | binary +ShortType | short +DecimalType | decimal +MapFieldType | map +TimestampType | timestamp + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/FieldName.md b/docs/v2/Core/models/FieldName.md new file mode 100644 index 000000000..cd5f36757 --- /dev/null +++ b/docs/v2/Core/models/FieldName.md @@ -0,0 +1,11 @@ +# FieldName + +FieldName + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/FieldSchema.md b/docs/v2/Core/models/FieldSchema.md new file mode 100644 index 000000000..0d24dc203 --- /dev/null +++ b/docs/v2/Core/models/FieldSchema.md @@ -0,0 +1,14 @@ +# FieldSchema + +The specification of the type of a Foundry schema field. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**nullable** | bool | Yes | | +**custom_metadata** | Optional[CustomMetadata] | No | | +**data_type** | FieldDataType | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/FilePath.md b/docs/v2/Core/models/FilePath.md new file mode 100644 index 000000000..de0dd68c2 --- /dev/null +++ b/docs/v2/Core/models/FilePath.md @@ -0,0 +1,12 @@ +# FilePath + +The path to a File within Foundry. Examples: `my-file.txt`, `path/to/my-file.jpg`, `dataframe.snappy.parquet`. + + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/Filename.md b/docs/v2/Core/models/Filename.md new file mode 100644 index 000000000..065baa2d9 --- /dev/null +++ b/docs/v2/Core/models/Filename.md @@ -0,0 +1,12 @@ +# Filename + +The name of a File within Foundry. Examples: `my-file.txt`, `my-file.jpg`, `dataframe.snappy.parquet`. + + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/FilterBinaryType.md b/docs/v2/Core/models/FilterBinaryType.md new file mode 100644 index 000000000..907bc4de1 --- /dev/null +++ b/docs/v2/Core/models/FilterBinaryType.md @@ -0,0 +1,11 @@ +# FilterBinaryType + +FilterBinaryType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["binary"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/FilterBooleanType.md b/docs/v2/Core/models/FilterBooleanType.md new file mode 100644 index 000000000..85bc53e12 --- /dev/null +++ b/docs/v2/Core/models/FilterBooleanType.md @@ -0,0 +1,11 @@ +# FilterBooleanType + +FilterBooleanType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["boolean"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/FilterDateTimeType.md b/docs/v2/Core/models/FilterDateTimeType.md new file mode 100644 index 000000000..243bc555b --- /dev/null +++ b/docs/v2/Core/models/FilterDateTimeType.md @@ -0,0 +1,11 @@ +# FilterDateTimeType + +FilterDateTimeType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["dateTime"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/FilterDateType.md b/docs/v2/Core/models/FilterDateType.md new file mode 100644 index 000000000..2f70f11ec --- /dev/null +++ b/docs/v2/Core/models/FilterDateType.md @@ -0,0 +1,11 @@ +# FilterDateType + +FilterDateType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["date"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/FilterDoubleType.md b/docs/v2/Core/models/FilterDoubleType.md new file mode 100644 index 000000000..b9a5e1430 --- /dev/null +++ b/docs/v2/Core/models/FilterDoubleType.md @@ -0,0 +1,11 @@ +# FilterDoubleType + +FilterDoubleType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["double"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/FilterEnumType.md b/docs/v2/Core/models/FilterEnumType.md new file mode 100644 index 000000000..e6632b883 --- /dev/null +++ b/docs/v2/Core/models/FilterEnumType.md @@ -0,0 +1,12 @@ +# FilterEnumType + +FilterEnumType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**values** | List[str] | Yes | The values allowed by the enum type. | +**type** | Literal["enum"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/FilterFloatType.md b/docs/v2/Core/models/FilterFloatType.md new file mode 100644 index 000000000..3bd1b4198 --- /dev/null +++ b/docs/v2/Core/models/FilterFloatType.md @@ -0,0 +1,11 @@ +# FilterFloatType + +FilterFloatType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["float"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/FilterIntegerType.md b/docs/v2/Core/models/FilterIntegerType.md new file mode 100644 index 000000000..78d003958 --- /dev/null +++ b/docs/v2/Core/models/FilterIntegerType.md @@ -0,0 +1,11 @@ +# FilterIntegerType + +FilterIntegerType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["integer"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/FilterLongType.md b/docs/v2/Core/models/FilterLongType.md new file mode 100644 index 000000000..f53e31dc3 --- /dev/null +++ b/docs/v2/Core/models/FilterLongType.md @@ -0,0 +1,11 @@ +# FilterLongType + +FilterLongType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["long"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/FilterRidType.md b/docs/v2/Core/models/FilterRidType.md new file mode 100644 index 000000000..c78967097 --- /dev/null +++ b/docs/v2/Core/models/FilterRidType.md @@ -0,0 +1,11 @@ +# FilterRidType + +FilterRidType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["rid"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/FilterStringType.md b/docs/v2/Core/models/FilterStringType.md new file mode 100644 index 000000000..a99935b81 --- /dev/null +++ b/docs/v2/Core/models/FilterStringType.md @@ -0,0 +1,11 @@ +# FilterStringType + +FilterStringType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["string"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/FilterType.md b/docs/v2/Core/models/FilterType.md new file mode 100644 index 000000000..821a2208d --- /dev/null +++ b/docs/v2/Core/models/FilterType.md @@ -0,0 +1,26 @@ +# FilterType + +FilterType + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +FilterDateTimeType | dateTime +FilterDateType | date +FilterBooleanType | boolean +FilterStringType | string +FilterDoubleType | double +FilterBinaryType | binary +FilterIntegerType | integer +FilterFloatType | float +FilterRidType | rid +FilterUuidType | uuid +FilterEnumType | enum +FilterLongType | long + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/FilterUuidType.md b/docs/v2/Core/models/FilterUuidType.md new file mode 100644 index 000000000..02570c40a --- /dev/null +++ b/docs/v2/Core/models/FilterUuidType.md @@ -0,0 +1,11 @@ +# FilterUuidType + +FilterUuidType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["uuid"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/FloatType.md b/docs/v2/Core/models/FloatType.md new file mode 100644 index 000000000..3890980bb --- /dev/null +++ b/docs/v2/Core/models/FloatType.md @@ -0,0 +1,11 @@ +# FloatType + +FloatType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["float"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/FolderRid.md b/docs/v2/Core/models/FolderRid.md new file mode 100644 index 000000000..79a333e78 --- /dev/null +++ b/docs/v2/Core/models/FolderRid.md @@ -0,0 +1,11 @@ +# FolderRid + +FolderRid + +## Type +```python +RID +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/FoundryBranch.md b/docs/v2/Core/models/FoundryBranch.md new file mode 100644 index 000000000..1866423d2 --- /dev/null +++ b/docs/v2/Core/models/FoundryBranch.md @@ -0,0 +1,11 @@ +# FoundryBranch + +The Foundry branch identifier, specifically its rid. Different identifier types may be used in the future as values. + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/FoundryLiveDeployment.md b/docs/v2/Core/models/FoundryLiveDeployment.md new file mode 100644 index 000000000..abdc6de44 --- /dev/null +++ b/docs/v2/Core/models/FoundryLiveDeployment.md @@ -0,0 +1,14 @@ +# FoundryLiveDeployment + +FoundryLiveDeployment + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**rid** | Optional[RID] | No | The live deployment identifier. This rid is of the format 'ri.foundry-ml-live.main.live-deployment.'. | +**input_param_name** | Optional[str] | No | The name of the input parameter to the model which should contain the query string. | +**output_param_name** | Optional[str] | No | The name of the output parameter to the model which should contain the computed embedding. | +**type** | Literal["foundryLiveDeployment"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/FullRowChangeDataCaptureConfiguration.md b/docs/v2/Core/models/FullRowChangeDataCaptureConfiguration.md new file mode 100644 index 000000000..d18585c97 --- /dev/null +++ b/docs/v2/Core/models/FullRowChangeDataCaptureConfiguration.md @@ -0,0 +1,16 @@ +# FullRowChangeDataCaptureConfiguration + +Configuration for change data capture which resolves the latest state of the dataset based on new full rows +being pushed to the stream. For example, if a value for a row is updated, it is only sufficient to publish +the entire new state of that row to the stream. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**deletion_field_name** | FieldName | Yes | The name of a boolean field in the schema that indicates whether or not a row has been deleted. | +**ordering_field_name** | FieldName | Yes | The name of an ordering field that determines the newest state for a row in the dataset. The ordering field can only be of the following types: - Byte - Date - Decimal - Integer - Long - Short - String - Timestamp | +**type** | Literal["fullRow"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/GeoPointType.md b/docs/v2/Core/models/GeoPointType.md new file mode 100644 index 000000000..9118eea0a --- /dev/null +++ b/docs/v2/Core/models/GeoPointType.md @@ -0,0 +1,11 @@ +# GeoPointType + +GeoPointType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["geopoint"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/GeoShapeType.md b/docs/v2/Core/models/GeoShapeType.md new file mode 100644 index 000000000..acaef278c --- /dev/null +++ b/docs/v2/Core/models/GeoShapeType.md @@ -0,0 +1,11 @@ +# GeoShapeType + +GeoShapeType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["geoshape"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/GeohashType.md b/docs/v2/Core/models/GeohashType.md new file mode 100644 index 000000000..c2f116092 --- /dev/null +++ b/docs/v2/Core/models/GeohashType.md @@ -0,0 +1,11 @@ +# GeohashType + +GeohashType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["geohash"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/GeotimeSeriesReferenceType.md b/docs/v2/Core/models/GeotimeSeriesReferenceType.md new file mode 100644 index 000000000..631db4e87 --- /dev/null +++ b/docs/v2/Core/models/GeotimeSeriesReferenceType.md @@ -0,0 +1,11 @@ +# GeotimeSeriesReferenceType + +GeotimeSeriesReferenceType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["geotimeSeriesReference"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/GroupId.md b/docs/v2/Core/models/GroupId.md new file mode 100644 index 000000000..38f8098c5 --- /dev/null +++ b/docs/v2/Core/models/GroupId.md @@ -0,0 +1,11 @@ +# GroupId + +A Foundry Group ID. + +## Type +```python +UUID +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/GroupName.md b/docs/v2/Core/models/GroupName.md new file mode 100644 index 000000000..3b6830e5d --- /dev/null +++ b/docs/v2/Core/models/GroupName.md @@ -0,0 +1,11 @@ +# GroupName + +The display name of a multipass group. + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/GroupRid.md b/docs/v2/Core/models/GroupRid.md new file mode 100644 index 000000000..8b3eba006 --- /dev/null +++ b/docs/v2/Core/models/GroupRid.md @@ -0,0 +1,11 @@ +# GroupRid + +The unique resource identifier (RID) of a multipass group. + +## Type +```python +RID +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/IncludeComputeUsage.md b/docs/v2/Core/models/IncludeComputeUsage.md new file mode 100644 index 000000000..69584f629 --- /dev/null +++ b/docs/v2/Core/models/IncludeComputeUsage.md @@ -0,0 +1,14 @@ +# IncludeComputeUsage + +Indicates whether the response should include compute usage details for the request. This feature is currently +only available for OSDK applications. +Note: Enabling this flag may slow down query performance and is not recommended for use in production. + + +## Type +```python +bool +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/IntegerType.md b/docs/v2/Core/models/IntegerType.md new file mode 100644 index 000000000..fa78c00cd --- /dev/null +++ b/docs/v2/Core/models/IntegerType.md @@ -0,0 +1,11 @@ +# IntegerType + +IntegerType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["integer"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/JobRid.md b/docs/v2/Core/models/JobRid.md new file mode 100644 index 000000000..d06ef34de --- /dev/null +++ b/docs/v2/Core/models/JobRid.md @@ -0,0 +1,11 @@ +# JobRid + +The RID of a Job. + +## Type +```python +RID +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/LmsEmbeddingModel.md b/docs/v2/Core/models/LmsEmbeddingModel.md new file mode 100644 index 000000000..b0fd47be0 --- /dev/null +++ b/docs/v2/Core/models/LmsEmbeddingModel.md @@ -0,0 +1,12 @@ +# LmsEmbeddingModel + +A model provided by Language Model Service. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**value** | LmsEmbeddingModelValue | Yes | | +**type** | Literal["lms"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/LmsEmbeddingModelValue.md b/docs/v2/Core/models/LmsEmbeddingModelValue.md new file mode 100644 index 000000000..b620f97fc --- /dev/null +++ b/docs/v2/Core/models/LmsEmbeddingModelValue.md @@ -0,0 +1,15 @@ +# LmsEmbeddingModelValue + +LmsEmbeddingModelValue + +| **Value** | +| --------- | +| `"OPENAI_TEXT_EMBEDDING_ADA_002"` | +| `"TEXT_EMBEDDING_3_LARGE"` | +| `"TEXT_EMBEDDING_3_SMALL"` | +| `"SNOWFLAKE_ARCTIC_EMBED_M"` | +| `"INSTRUCTOR_LARGE"` | +| `"BGE_BASE_EN_V1_5"` | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/LongType.md b/docs/v2/Core/models/LongType.md new file mode 100644 index 000000000..5419e4420 --- /dev/null +++ b/docs/v2/Core/models/LongType.md @@ -0,0 +1,11 @@ +# LongType + +LongType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["long"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/MapFieldType.md b/docs/v2/Core/models/MapFieldType.md new file mode 100644 index 000000000..f2370d9f3 --- /dev/null +++ b/docs/v2/Core/models/MapFieldType.md @@ -0,0 +1,13 @@ +# MapFieldType + +MapFieldType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**key_schema** | FieldSchema | Yes | | +**value_schema** | FieldSchema | Yes | | +**type** | Literal["map"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/MarkingId.md b/docs/v2/Core/models/MarkingId.md new file mode 100644 index 000000000..63dcb5217 --- /dev/null +++ b/docs/v2/Core/models/MarkingId.md @@ -0,0 +1,11 @@ +# MarkingId + +The ID of a security marking. + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/MarkingType.md b/docs/v2/Core/models/MarkingType.md new file mode 100644 index 000000000..ddc4a13f0 --- /dev/null +++ b/docs/v2/Core/models/MarkingType.md @@ -0,0 +1,11 @@ +# MarkingType + +MarkingType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["marking"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/MediaItemPath.md b/docs/v2/Core/models/MediaItemPath.md new file mode 100644 index 000000000..2902a2dfb --- /dev/null +++ b/docs/v2/Core/models/MediaItemPath.md @@ -0,0 +1,15 @@ +# MediaItemPath + +A user-specified identifier for a media item within a media set. +Paths must be less than 256 characters long. +If multiple items are written to the same media set at the same path, then when retrieving by path the media +item which was written last is returned. + + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/MediaItemReadToken.md b/docs/v2/Core/models/MediaItemReadToken.md new file mode 100644 index 000000000..c55f1e225 --- /dev/null +++ b/docs/v2/Core/models/MediaItemReadToken.md @@ -0,0 +1,11 @@ +# MediaItemReadToken + +A token that grants access to read specific media items. + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/MediaItemRid.md b/docs/v2/Core/models/MediaItemRid.md new file mode 100644 index 000000000..f66c9e6c7 --- /dev/null +++ b/docs/v2/Core/models/MediaItemRid.md @@ -0,0 +1,11 @@ +# MediaItemRid + +The Resource Identifier (RID) of an individual Media Item within a Media Set in Foundry. + +## Type +```python +RID +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/MediaReference.md b/docs/v2/Core/models/MediaReference.md new file mode 100644 index 000000000..10e1d3829 --- /dev/null +++ b/docs/v2/Core/models/MediaReference.md @@ -0,0 +1,12 @@ +# MediaReference + +The representation of a media reference. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**mime_type** | MediaType | Yes | | +**reference** | Reference | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/MediaReferenceType.md b/docs/v2/Core/models/MediaReferenceType.md new file mode 100644 index 000000000..43052bf24 --- /dev/null +++ b/docs/v2/Core/models/MediaReferenceType.md @@ -0,0 +1,11 @@ +# MediaReferenceType + +MediaReferenceType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["mediaReference"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/MediaSetRid.md b/docs/v2/Core/models/MediaSetRid.md new file mode 100644 index 000000000..317066feb --- /dev/null +++ b/docs/v2/Core/models/MediaSetRid.md @@ -0,0 +1,11 @@ +# MediaSetRid + +The Resource Identifier (RID) of a Media Set in Foundry. + +## Type +```python +RID +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/MediaSetViewItem.md b/docs/v2/Core/models/MediaSetViewItem.md new file mode 100644 index 000000000..cf6fc6ed9 --- /dev/null +++ b/docs/v2/Core/models/MediaSetViewItem.md @@ -0,0 +1,14 @@ +# MediaSetViewItem + +MediaSetViewItem + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**media_set_rid** | MediaSetRid | Yes | | +**media_set_view_rid** | MediaSetViewRid | Yes | | +**media_item_rid** | MediaItemRid | Yes | | +**token** | Optional[MediaItemReadToken] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/MediaSetViewItemWrapper.md b/docs/v2/Core/models/MediaSetViewItemWrapper.md new file mode 100644 index 000000000..851b82323 --- /dev/null +++ b/docs/v2/Core/models/MediaSetViewItemWrapper.md @@ -0,0 +1,12 @@ +# MediaSetViewItemWrapper + +MediaSetViewItemWrapper + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**media_set_view_item** | MediaSetViewItem | Yes | | +**type** | Literal["mediaSetViewItem"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/MediaSetViewRid.md b/docs/v2/Core/models/MediaSetViewRid.md new file mode 100644 index 000000000..62e6bdaf4 --- /dev/null +++ b/docs/v2/Core/models/MediaSetViewRid.md @@ -0,0 +1,11 @@ +# MediaSetViewRid + +The Resource Identifier (RID) of a single View of a Media Set. A Media Set View is an independent collection of Media Items. + +## Type +```python +RID +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/MediaType.md b/docs/v2/Core/models/MediaType.md new file mode 100644 index 000000000..38ceb68c0 --- /dev/null +++ b/docs/v2/Core/models/MediaType.md @@ -0,0 +1,13 @@ +# MediaType + +The [media type](https://www.iana.org/assignments/media-types/media-types.xhtml) of the file or attachment. +Examples: `application/json`, `application/pdf`, `application/octet-stream`, `image/jpeg` + + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/NullType.md b/docs/v2/Core/models/NullType.md new file mode 100644 index 000000000..eb3fcd49e --- /dev/null +++ b/docs/v2/Core/models/NullType.md @@ -0,0 +1,11 @@ +# NullType + +NullType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["null"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/NumericOrNonNumericType.md b/docs/v2/Core/models/NumericOrNonNumericType.md new file mode 100644 index 000000000..fc773ce15 --- /dev/null +++ b/docs/v2/Core/models/NumericOrNonNumericType.md @@ -0,0 +1,16 @@ +# NumericOrNonNumericType + +The time series property can either contain either numeric or non-numeric data. This enables mixed sensor types +where some sensor time series are numeric and others are categorical. A boolean property reference can be used +to determine if the series is numeric or non-numeric. Without this property, the series type can be either +numeric or non-numeric and must be inferred from the result of a time series query. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**is_non_numeric_property_type_id** | Optional[str] | No | The boolean property type ID specifying whether the series is numeric or non-numeric. If the value is true, the series is non-numeric. | +**type** | Literal["numericOrNonNumeric"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/Operation.md b/docs/v2/Core/models/Operation.md new file mode 100644 index 000000000..19370e487 --- /dev/null +++ b/docs/v2/Core/models/Operation.md @@ -0,0 +1,13 @@ +# Operation + +An operation that can be performed on a resource. Operations are used to define the permissions that a Role has. +Operations are typically in the format `service:action`, where `service` is related to the type of resource and `action` is the action being performed. + + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/OperationScope.md b/docs/v2/Core/models/OperationScope.md new file mode 100644 index 000000000..409d1630b --- /dev/null +++ b/docs/v2/Core/models/OperationScope.md @@ -0,0 +1,11 @@ +# OperationScope + +OperationScope + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/OrderByDirection.md b/docs/v2/Core/models/OrderByDirection.md new file mode 100644 index 000000000..bb9a60708 --- /dev/null +++ b/docs/v2/Core/models/OrderByDirection.md @@ -0,0 +1,11 @@ +# OrderByDirection + +Specifies the ordering direction (can be either `ASC` or `DESC`) + +| **Value** | +| --------- | +| `"ASC"` | +| `"DESC"` | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/OrganizationRid.md b/docs/v2/Core/models/OrganizationRid.md new file mode 100644 index 000000000..ee7721df3 --- /dev/null +++ b/docs/v2/Core/models/OrganizationRid.md @@ -0,0 +1,11 @@ +# OrganizationRid + +OrganizationRid + +## Type +```python +RID +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/PageSize.md b/docs/v2/Core/models/PageSize.md new file mode 100644 index 000000000..545f11f4c --- /dev/null +++ b/docs/v2/Core/models/PageSize.md @@ -0,0 +1,11 @@ +# PageSize + +The page size to use for the endpoint. + +## Type +```python +int +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/PageToken.md b/docs/v2/Core/models/PageToken.md new file mode 100644 index 000000000..a3835a71a --- /dev/null +++ b/docs/v2/Core/models/PageToken.md @@ -0,0 +1,14 @@ +# PageToken + +The page token indicates where to start paging. This should be omitted from the first page's request. +To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response +and use it to populate the `pageToken` field of the next request. + + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/PreviewMode.md b/docs/v2/Core/models/PreviewMode.md new file mode 100644 index 000000000..b1468126b --- /dev/null +++ b/docs/v2/Core/models/PreviewMode.md @@ -0,0 +1,11 @@ +# PreviewMode + +Enables the use of preview functionality. + +## Type +```python +bool +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/PrincipalId.md b/docs/v2/Core/models/PrincipalId.md new file mode 100644 index 000000000..0a4cd0a6a --- /dev/null +++ b/docs/v2/Core/models/PrincipalId.md @@ -0,0 +1,11 @@ +# PrincipalId + +The ID of a Foundry Group or User. + +## Type +```python +UUID +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/PrincipalType.md b/docs/v2/Core/models/PrincipalType.md new file mode 100644 index 000000000..5b00c218d --- /dev/null +++ b/docs/v2/Core/models/PrincipalType.md @@ -0,0 +1,11 @@ +# PrincipalType + +PrincipalType + +| **Value** | +| --------- | +| `"USER"` | +| `"GROUP"` | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/Realm.md b/docs/v2/Core/models/Realm.md new file mode 100644 index 000000000..2f4f68106 --- /dev/null +++ b/docs/v2/Core/models/Realm.md @@ -0,0 +1,13 @@ +# Realm + +Identifies which Realm a User or Group is a member of. +The `palantir-internal-realm` is used for Users or Groups that are created in Foundry by administrators and not associated with any SSO provider. + + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/Reference.md b/docs/v2/Core/models/Reference.md new file mode 100644 index 000000000..b7dabe846 --- /dev/null +++ b/docs/v2/Core/models/Reference.md @@ -0,0 +1,12 @@ +# Reference + +A union of the types supported by media reference properties. + + +## Type +```python +MediaSetViewItemWrapper +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/ReleaseStatus.md b/docs/v2/Core/models/ReleaseStatus.md new file mode 100644 index 000000000..09876173b --- /dev/null +++ b/docs/v2/Core/models/ReleaseStatus.md @@ -0,0 +1,13 @@ +# ReleaseStatus + +The release status of the entity. + +| **Value** | +| --------- | +| `"ACTIVE"` | +| `"ENDORSED"` | +| `"EXPERIMENTAL"` | +| `"DEPRECATED"` | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/Role.md b/docs/v2/Core/models/Role.md new file mode 100644 index 000000000..3394a4460 --- /dev/null +++ b/docs/v2/Core/models/Role.md @@ -0,0 +1,18 @@ +# Role + +A set of permissions that can be assigned to a principal for a specific resource type. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**id** | RoleId | Yes | | +**role_set_id** | RoleSetId | Yes | | +**name** | str | Yes | | +**description** | str | Yes | | +**is_default** | bool | Yes | Default roles are provided by Palantir and cannot be edited or modified by administrators. | +**type** | RoleContext | Yes | The type of resource that is valid for this role. | +**operations** | List[Operation] | Yes | The operations that a principal can perform with this role on the assigned resource. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/RoleAssignmentUpdate.md b/docs/v2/Core/models/RoleAssignmentUpdate.md new file mode 100644 index 000000000..6359d0756 --- /dev/null +++ b/docs/v2/Core/models/RoleAssignmentUpdate.md @@ -0,0 +1,12 @@ +# RoleAssignmentUpdate + +RoleAssignmentUpdate + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**role_id** | RoleId | Yes | | +**principal_id** | PrincipalId | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/RoleContext.md b/docs/v2/Core/models/RoleContext.md new file mode 100644 index 000000000..796419d09 --- /dev/null +++ b/docs/v2/Core/models/RoleContext.md @@ -0,0 +1,10 @@ +# RoleContext + +RoleContext + +| **Value** | +| --------- | +| `"ORGANIZATION"` | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/RoleId.md b/docs/v2/Core/models/RoleId.md new file mode 100644 index 000000000..16cbf09eb --- /dev/null +++ b/docs/v2/Core/models/RoleId.md @@ -0,0 +1,14 @@ +# RoleId + +The unique ID for a Role. Roles are sets of permissions that grant different levels of access to resources. +The default roles in Foundry are: Owner, Editor, Viewer, and Discoverer. See more about +[roles](https://palantir.com/docs/foundry/security/projects-and-roles#roles) in the user documentation. + + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/RoleSetId.md b/docs/v2/Core/models/RoleSetId.md new file mode 100644 index 000000000..53440205a --- /dev/null +++ b/docs/v2/Core/models/RoleSetId.md @@ -0,0 +1,11 @@ +# RoleSetId + +RoleSetId + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/ScheduleRid.md b/docs/v2/Core/models/ScheduleRid.md new file mode 100644 index 000000000..05410a5c2 --- /dev/null +++ b/docs/v2/Core/models/ScheduleRid.md @@ -0,0 +1,11 @@ +# ScheduleRid + +The RID of a Schedule. + +## Type +```python +RID +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/SchemaFieldType.md b/docs/v2/Core/models/SchemaFieldType.md new file mode 100644 index 000000000..9df729727 --- /dev/null +++ b/docs/v2/Core/models/SchemaFieldType.md @@ -0,0 +1,24 @@ +# SchemaFieldType + +The data type of a column in a dataset schema. + +| **Value** | +| --------- | +| `"ARRAY"` | +| `"BINARY"` | +| `"BOOLEAN"` | +| `"BYTE"` | +| `"DATE"` | +| `"DECIMAL"` | +| `"DOUBLE"` | +| `"FLOAT"` | +| `"INTEGER"` | +| `"LONG"` | +| `"MAP"` | +| `"SHORT"` | +| `"STRING"` | +| `"STRUCT"` | +| `"TIMESTAMP"` | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/ShortType.md b/docs/v2/Core/models/ShortType.md new file mode 100644 index 000000000..f19736905 --- /dev/null +++ b/docs/v2/Core/models/ShortType.md @@ -0,0 +1,11 @@ +# ShortType + +ShortType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["short"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/SizeBytes.md b/docs/v2/Core/models/SizeBytes.md new file mode 100644 index 000000000..9fadba909 --- /dev/null +++ b/docs/v2/Core/models/SizeBytes.md @@ -0,0 +1,11 @@ +# SizeBytes + +The size of the file or attachment in bytes. + +## Type +```python +Long +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/StreamSchema.md b/docs/v2/Core/models/StreamSchema.md new file mode 100644 index 000000000..dd60f7481 --- /dev/null +++ b/docs/v2/Core/models/StreamSchema.md @@ -0,0 +1,14 @@ +# StreamSchema + +The schema for a Foundry stream. Records pushed to this stream must match this schema. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**fields** | List[Field] | Yes | | +**key_field_names** | Optional[List[FieldName]] | No | The names of the fields to be used as keys for partitioning records. These key fields are used to group all records with the same key into the same partition, to guarantee processing order of grouped records. These keys are not meant to uniquely identify records, and do not by themselves deduplicate records. To deduplicate records, provide a change data capture configuration for the schema. Key fields can only be of the following types: - Boolean - Byte - Date - Decimal - Integer - Long - Short - String - Timestamp For additional information on keys for Foundry streams, see the [streaming keys](https://palantir.com/docs/foundry/building-pipelines/streaming-keys/) user documentation. | +**change_data_capture** | Optional[ChangeDataCaptureConfiguration] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/StringType.md b/docs/v2/Core/models/StringType.md new file mode 100644 index 000000000..a82271b7b --- /dev/null +++ b/docs/v2/Core/models/StringType.md @@ -0,0 +1,11 @@ +# StringType + +StringType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["string"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/StructFieldName.md b/docs/v2/Core/models/StructFieldName.md new file mode 100644 index 000000000..eb543b79e --- /dev/null +++ b/docs/v2/Core/models/StructFieldName.md @@ -0,0 +1,12 @@ +# StructFieldName + +The name of a field in a `Struct`. + + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/StructFieldType.md b/docs/v2/Core/models/StructFieldType.md new file mode 100644 index 000000000..001bb350b --- /dev/null +++ b/docs/v2/Core/models/StructFieldType.md @@ -0,0 +1,12 @@ +# StructFieldType + +StructFieldType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**sub_fields** | List[Field] | Yes | | +**type** | Literal["struct"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/TableRid.md b/docs/v2/Core/models/TableRid.md new file mode 100644 index 000000000..d493b967f --- /dev/null +++ b/docs/v2/Core/models/TableRid.md @@ -0,0 +1,11 @@ +# TableRid + +The Resource Identifier (RID) of a Table. + +## Type +```python +RID +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/TimeSeriesItemType.md b/docs/v2/Core/models/TimeSeriesItemType.md new file mode 100644 index 000000000..414a96e8d --- /dev/null +++ b/docs/v2/Core/models/TimeSeriesItemType.md @@ -0,0 +1,18 @@ +# TimeSeriesItemType + +A union of the types supported by time series properties. + + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +StringType | string +DoubleType | double +NumericOrNonNumericType | numericOrNonNumeric + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/TimeUnit.md b/docs/v2/Core/models/TimeUnit.md new file mode 100644 index 000000000..f814f5ad9 --- /dev/null +++ b/docs/v2/Core/models/TimeUnit.md @@ -0,0 +1,17 @@ +# TimeUnit + +TimeUnit + +| **Value** | +| --------- | +| `"MILLISECONDS"` | +| `"SECONDS"` | +| `"MINUTES"` | +| `"HOURS"` | +| `"DAYS"` | +| `"WEEKS"` | +| `"MONTHS"` | +| `"YEARS"` | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/TimeseriesType.md b/docs/v2/Core/models/TimeseriesType.md new file mode 100644 index 000000000..e662b0206 --- /dev/null +++ b/docs/v2/Core/models/TimeseriesType.md @@ -0,0 +1,12 @@ +# TimeseriesType + +TimeseriesType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**item_type** | TimeSeriesItemType | Yes | | +**type** | Literal["timeseries"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/TimestampType.md b/docs/v2/Core/models/TimestampType.md new file mode 100644 index 000000000..914eec11e --- /dev/null +++ b/docs/v2/Core/models/TimestampType.md @@ -0,0 +1,11 @@ +# TimestampType + +TimestampType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["timestamp"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/TotalCount.md b/docs/v2/Core/models/TotalCount.md new file mode 100644 index 000000000..d428130ed --- /dev/null +++ b/docs/v2/Core/models/TotalCount.md @@ -0,0 +1,12 @@ +# TotalCount + +The total number of items across all pages. + + +## Type +```python +Long +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/TraceParent.md b/docs/v2/Core/models/TraceParent.md new file mode 100644 index 000000000..2f8029e0d --- /dev/null +++ b/docs/v2/Core/models/TraceParent.md @@ -0,0 +1,11 @@ +# TraceParent + +The W3C Trace Context `traceparent` header value used to propagate distributed tracing information for Foundry telemetry. See https://www.w3.org/TR/trace-context/#traceparent-header for more details. Note the 16 byte trace ID encoded in the header must be derived from a time based uuid to be used within Foundry. + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/TraceState.md b/docs/v2/Core/models/TraceState.md new file mode 100644 index 000000000..4c897fb1b --- /dev/null +++ b/docs/v2/Core/models/TraceState.md @@ -0,0 +1,11 @@ +# TraceState + +The W3C Trace Context `tracestate` header value, which is used to propagate vendor specific distributed tracing information for Foundry telemetry. See https://www.w3.org/TR/trace-context/#tracestate-header for more details. + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/UnsupportedType.md b/docs/v2/Core/models/UnsupportedType.md new file mode 100644 index 000000000..271fa007b --- /dev/null +++ b/docs/v2/Core/models/UnsupportedType.md @@ -0,0 +1,12 @@ +# UnsupportedType + +UnsupportedType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**unsupported_type** | str | Yes | | +**type** | Literal["unsupported"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/UpdatedBy.md b/docs/v2/Core/models/UpdatedBy.md new file mode 100644 index 000000000..b860b731c --- /dev/null +++ b/docs/v2/Core/models/UpdatedBy.md @@ -0,0 +1,11 @@ +# UpdatedBy + +The Foundry user who last updated this resource + +## Type +```python +UserId +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/UpdatedTime.md b/docs/v2/Core/models/UpdatedTime.md new file mode 100644 index 000000000..e46019f77 --- /dev/null +++ b/docs/v2/Core/models/UpdatedTime.md @@ -0,0 +1,12 @@ +# UpdatedTime + +The time at which the resource was most recently updated. + + +## Type +```python +datetime +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/UserId.md b/docs/v2/Core/models/UserId.md new file mode 100644 index 000000000..f861a7a61 --- /dev/null +++ b/docs/v2/Core/models/UserId.md @@ -0,0 +1,12 @@ +# UserId + +A Foundry User ID. + + +## Type +```python +UUID +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/UserStatus.md b/docs/v2/Core/models/UserStatus.md new file mode 100644 index 000000000..7bbf7e98a --- /dev/null +++ b/docs/v2/Core/models/UserStatus.md @@ -0,0 +1,11 @@ +# UserStatus + +Present status of user. + +| **Value** | +| --------- | +| `"ACTIVE"` | +| `"DELETED"` | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/VectorSimilarityFunction.md b/docs/v2/Core/models/VectorSimilarityFunction.md new file mode 100644 index 000000000..4bb432908 --- /dev/null +++ b/docs/v2/Core/models/VectorSimilarityFunction.md @@ -0,0 +1,13 @@ +# VectorSimilarityFunction + +The vector similarity function to support approximate nearest neighbors search. Will result in an index +specific for the function. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**value** | Optional[VectorSimilarityFunctionValue] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/VectorSimilarityFunctionValue.md b/docs/v2/Core/models/VectorSimilarityFunctionValue.md new file mode 100644 index 000000000..fdc9e559d --- /dev/null +++ b/docs/v2/Core/models/VectorSimilarityFunctionValue.md @@ -0,0 +1,12 @@ +# VectorSimilarityFunctionValue + +VectorSimilarityFunctionValue + +| **Value** | +| --------- | +| `"COSINE_SIMILARITY"` | +| `"DOT_PRODUCT"` | +| `"EUCLIDEAN_DISTANCE"` | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/VectorType.md b/docs/v2/Core/models/VectorType.md new file mode 100644 index 000000000..57bfe9b98 --- /dev/null +++ b/docs/v2/Core/models/VectorType.md @@ -0,0 +1,14 @@ +# VectorType + +Represents a fixed size vector of floats. These can be used for vector similarity searches. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**dimension** | int | Yes | The dimension of the vector. | +**supports_search_with** | List[VectorSimilarityFunction] | Yes | | +**embedding_model** | Optional[EmbeddingModel] | No | | +**type** | Literal["vector"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/VersionId.md b/docs/v2/Core/models/VersionId.md new file mode 100644 index 000000000..df1f3827f --- /dev/null +++ b/docs/v2/Core/models/VersionId.md @@ -0,0 +1,12 @@ +# VersionId + +The version identifier of a dataset schema. + + +## Type +```python +UUID +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Core/models/ZoneId.md b/docs/v2/Core/models/ZoneId.md new file mode 100644 index 000000000..ed9e4c946 --- /dev/null +++ b/docs/v2/Core/models/ZoneId.md @@ -0,0 +1,11 @@ +# ZoneId + +A string representation of a java.time.ZoneId + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/Check.md b/docs/v2/DataHealth/Check.md new file mode 100644 index 000000000..4c5ace04e --- /dev/null +++ b/docs/v2/DataHealth/Check.md @@ -0,0 +1,220 @@ +# Check + +Method | HTTP request | Release Stage | +------------- | ------------- | ----- | +[**create**](#create) | **POST** /v2/dataHealth/checks | Public Beta | +[**delete**](#delete) | **DELETE** /v2/dataHealth/checks/{checkRid} | Public Beta | +[**get**](#get) | **GET** /v2/dataHealth/checks/{checkRid} | Public Beta | +[**replace**](#replace) | **PUT** /v2/dataHealth/checks/{checkRid} | Public Beta | + +# **create** +Creates a new Check. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**config** | CheckConfig | | | +**intent** | Optional[CheckIntent] | | [optional] | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**Check** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# CheckConfig +config = None +# Optional[CheckIntent] +intent = "Check to ensure builds are passing." +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.data_health.Check.create(config=config, intent=intent, preview=preview) + print("The create response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Check.create: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | Check | The created Check | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **delete** +Delete the Check with the specified rid. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**check_rid** | CheckRid | | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**None** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# CheckRid +check_rid = "ri.data-health.main.check.8e27b13a-e21b-4232-ae1b-76ccf5ff42b3" +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.data_health.Check.delete(check_rid, preview=preview) + print("The delete response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Check.delete: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**204** | None | | None | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **get** +Get the Check with the specified rid. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**check_rid** | CheckRid | | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**Check** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# CheckRid +check_rid = "ri.data-health.main.check.8e27b13a-e21b-4232-ae1b-76ccf5ff42b3" +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.data_health.Check.get(check_rid, preview=preview) + print("The get response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Check.get: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | Check | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **replace** +Replace the Check with the specified rid. Changing the type of a check after it has been created is not supported. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**check_rid** | CheckRid | | | +**config** | ReplaceCheckConfig | | | +**intent** | Optional[CheckIntent] | | [optional] | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**Check** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# CheckRid +check_rid = "ri.data-health.main.check.8e27b13a-e21b-4232-ae1b-76ccf5ff42b3" +# ReplaceCheckConfig +config = None +# Optional[CheckIntent] +intent = "Check to ensure builds are passing." +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.data_health.Check.replace( + check_rid, config=config, intent=intent, preview=preview + ) + print("The replace response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Check.replace: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | Check | The replaced Check | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + diff --git a/docs/v2/DataHealth/CheckReport.md b/docs/v2/DataHealth/CheckReport.md new file mode 100644 index 000000000..3e5c3dadd --- /dev/null +++ b/docs/v2/DataHealth/CheckReport.md @@ -0,0 +1,56 @@ +# CheckReport + +Method | HTTP request | Release Stage | +------------- | ------------- | ----- | +[**get**](#get) | **GET** /v2/dataHealth/checkReports/{checkReportRid} | Public Beta | + +# **get** +Get the CheckReport with the specified rid. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**check_report_rid** | CheckReportRid | | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**CheckReport** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# CheckReportRid +check_report_rid = "ri.data-health.main.check-report.a1b2c3d4-e5f6-7890-abcd-ef1234567890" +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.data_health.CheckReport.get(check_report_rid, preview=preview) + print("The get response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling CheckReport.get: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | CheckReport | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + diff --git a/docs/v2/DataHealth/models/AllowedColumnValuesCheckConfig.md b/docs/v2/DataHealth/models/AllowedColumnValuesCheckConfig.md new file mode 100644 index 000000000..0d9e364ea --- /dev/null +++ b/docs/v2/DataHealth/models/AllowedColumnValuesCheckConfig.md @@ -0,0 +1,16 @@ +# AllowedColumnValuesCheckConfig + +Checks that values in a column are within an allowed set of values. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**subject** | DatasetSubject | Yes | | +**column_name** | ColumnName | Yes | | +**allowed_values** | List[ColumnValue] | Yes | | +**allow_null** | Optional[bool] | No | | +**severity** | SeverityLevel | Yes | | +**type** | Literal["allowedColumnValues"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/ApproximateUniquePercentageCheckConfig.md b/docs/v2/DataHealth/models/ApproximateUniquePercentageCheckConfig.md new file mode 100644 index 000000000..84822309b --- /dev/null +++ b/docs/v2/DataHealth/models/ApproximateUniquePercentageCheckConfig.md @@ -0,0 +1,13 @@ +# ApproximateUniquePercentageCheckConfig + +Checks the approximate percentage of unique values in a specific column. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**subject** | DatasetSubject | Yes | | +**percentage_check_config** | PercentageCheckConfig | Yes | | +**type** | Literal["approximateUniquePercentage"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/BooleanColumnValue.md b/docs/v2/DataHealth/models/BooleanColumnValue.md new file mode 100644 index 000000000..0cdedf572 --- /dev/null +++ b/docs/v2/DataHealth/models/BooleanColumnValue.md @@ -0,0 +1,12 @@ +# BooleanColumnValue + +A boolean column value. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**value** | bool | Yes | | +**type** | Literal["boolean"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/BuildDurationCheckConfig.md b/docs/v2/DataHealth/models/BuildDurationCheckConfig.md new file mode 100644 index 000000000..1c4227c0d --- /dev/null +++ b/docs/v2/DataHealth/models/BuildDurationCheckConfig.md @@ -0,0 +1,13 @@ +# BuildDurationCheckConfig + +Checks the total time a build takes to complete. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**subject** | DatasetSubject | Yes | | +**time_check_config** | TimeCheckConfig | Yes | | +**type** | Literal["buildDuration"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/BuildStatusCheckConfig.md b/docs/v2/DataHealth/models/BuildStatusCheckConfig.md new file mode 100644 index 000000000..4b3d2847d --- /dev/null +++ b/docs/v2/DataHealth/models/BuildStatusCheckConfig.md @@ -0,0 +1,13 @@ +# BuildStatusCheckConfig + +Checks the status of the most recent build of the dataset. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**subject** | DatasetSubject | Yes | | +**status_check_config** | StatusCheckConfig | Yes | | +**type** | Literal["buildStatus"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/Check.md b/docs/v2/DataHealth/models/Check.md new file mode 100644 index 000000000..974647082 --- /dev/null +++ b/docs/v2/DataHealth/models/Check.md @@ -0,0 +1,16 @@ +# Check + +Check + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**rid** | CheckRid | Yes | | +**groups** | List[CheckGroupRid] | Yes | | +**config** | CheckConfig | Yes | | +**intent** | Optional[CheckIntent] | No | | +**created_by** | Optional[CreatedBy] | No | The user that created the Check. | +**updated_time** | Optional[UpdatedTime] | No | The timestamp when the Check was last updated. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/CheckConfig.md b/docs/v2/DataHealth/models/CheckConfig.md new file mode 100644 index 000000000..3fbaaa661 --- /dev/null +++ b/docs/v2/DataHealth/models/CheckConfig.md @@ -0,0 +1,30 @@ +# CheckConfig + +Configuration of a check. + + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +NumericColumnRangeCheckConfig | numericColumnRange +JobStatusCheckConfig | jobStatus +NumericColumnMeanCheckConfig | numericColumnMean +DateColumnRangeCheckConfig | dateColumnRange +JobDurationCheckConfig | jobDuration +ApproximateUniquePercentageCheckConfig | approximateUniquePercentage +BuildStatusCheckConfig | buildStatus +ColumnTypeCheckConfig | columnType +AllowedColumnValuesCheckConfig | allowedColumnValues +NullPercentageCheckConfig | nullPercentage +TotalColumnCountCheckConfig | totalColumnCount +NumericColumnMedianCheckConfig | numericColumnMedian +BuildDurationCheckConfig | buildDuration +SchemaComparisonCheckConfig | schemaComparison +PrimaryKeyCheckConfig | primaryKey + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/CheckGroupRid.md b/docs/v2/DataHealth/models/CheckGroupRid.md new file mode 100644 index 000000000..d4887b9d8 --- /dev/null +++ b/docs/v2/DataHealth/models/CheckGroupRid.md @@ -0,0 +1,11 @@ +# CheckGroupRid + +The unique resource identifier (RID) of a CheckGroup. + +## Type +```python +RID +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/CheckIntent.md b/docs/v2/DataHealth/models/CheckIntent.md new file mode 100644 index 000000000..2b470db4b --- /dev/null +++ b/docs/v2/DataHealth/models/CheckIntent.md @@ -0,0 +1,12 @@ +# CheckIntent + +A note about why the Check was set up. + + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/CheckReport.md b/docs/v2/DataHealth/models/CheckReport.md new file mode 100644 index 000000000..bf2bd2ebf --- /dev/null +++ b/docs/v2/DataHealth/models/CheckReport.md @@ -0,0 +1,14 @@ +# CheckReport + +CheckReport + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**rid** | CheckReportRid | Yes | | +**check** | Check | Yes | Snapshot of the check configuration when this report was created. This will not change if the check is later modified. | +**result** | CheckResult | Yes | | +**created_time** | CreatedTime | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/CheckResult.md b/docs/v2/DataHealth/models/CheckResult.md new file mode 100644 index 000000000..45e6dfd13 --- /dev/null +++ b/docs/v2/DataHealth/models/CheckResult.md @@ -0,0 +1,12 @@ +# CheckResult + +The result of running a check. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**status** | CheckResultStatus | Yes | | +**message** | Optional[str] | No | Further details about the result of the check. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/CheckResultStatus.md b/docs/v2/DataHealth/models/CheckResultStatus.md new file mode 100644 index 000000000..433af850e --- /dev/null +++ b/docs/v2/DataHealth/models/CheckResultStatus.md @@ -0,0 +1,15 @@ +# CheckResultStatus + +The status of a check report execution. + +| **Value** | +| --------- | +| `"PASSED"` | +| `"FAILED"` | +| `"WARNING"` | +| `"ERROR"` | +| `"NOT_APPLICABLE"` | +| `"NOT_COMPUTABLE"` | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/ColumnCountConfig.md b/docs/v2/DataHealth/models/ColumnCountConfig.md new file mode 100644 index 000000000..286f8632a --- /dev/null +++ b/docs/v2/DataHealth/models/ColumnCountConfig.md @@ -0,0 +1,12 @@ +# ColumnCountConfig + +Configuration for column count validation with severity settings. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**expected_value** | Long | Yes | | +**severity** | SeverityLevel | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/ColumnInfo.md b/docs/v2/DataHealth/models/ColumnInfo.md new file mode 100644 index 000000000..62b17970d --- /dev/null +++ b/docs/v2/DataHealth/models/ColumnInfo.md @@ -0,0 +1,12 @@ +# ColumnInfo + +Information about a column including its name and type. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**name** | ColumnName | Yes | | +**column_type** | Optional[SchemaFieldType] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/ColumnName.md b/docs/v2/DataHealth/models/ColumnName.md new file mode 100644 index 000000000..2b5c28dcb --- /dev/null +++ b/docs/v2/DataHealth/models/ColumnName.md @@ -0,0 +1,11 @@ +# ColumnName + +ColumnName + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/ColumnTypeCheckConfig.md b/docs/v2/DataHealth/models/ColumnTypeCheckConfig.md new file mode 100644 index 000000000..29e177129 --- /dev/null +++ b/docs/v2/DataHealth/models/ColumnTypeCheckConfig.md @@ -0,0 +1,13 @@ +# ColumnTypeCheckConfig + +Checks the existence and optionally the type of a specific column. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**subject** | DatasetSubject | Yes | | +**column_type_config** | ColumnTypeConfig | Yes | | +**type** | Literal["columnType"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/ColumnTypeConfig.md b/docs/v2/DataHealth/models/ColumnTypeConfig.md new file mode 100644 index 000000000..0709ec9d2 --- /dev/null +++ b/docs/v2/DataHealth/models/ColumnTypeConfig.md @@ -0,0 +1,13 @@ +# ColumnTypeConfig + +Configuration for column type validation with severity settings. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**column_name** | ColumnName | Yes | | +**expected_type** | Optional[SchemaFieldType] | No | | +**severity** | SeverityLevel | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/ColumnValue.md b/docs/v2/DataHealth/models/ColumnValue.md new file mode 100644 index 000000000..d71ae1ad1 --- /dev/null +++ b/docs/v2/DataHealth/models/ColumnValue.md @@ -0,0 +1,18 @@ +# ColumnValue + +A column value that can be of different types. + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +DateColumnValue | date +BooleanColumnValue | boolean +StringColumnValue | string +NumericColumnValue | numeric + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/CreateCheckRequest.md b/docs/v2/DataHealth/models/CreateCheckRequest.md new file mode 100644 index 000000000..243b3c866 --- /dev/null +++ b/docs/v2/DataHealth/models/CreateCheckRequest.md @@ -0,0 +1,12 @@ +# CreateCheckRequest + +CreateCheckRequest + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**config** | CheckConfig | Yes | | +**intent** | Optional[CheckIntent] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/DatasetSubject.md b/docs/v2/DataHealth/models/DatasetSubject.md new file mode 100644 index 000000000..76754ffa5 --- /dev/null +++ b/docs/v2/DataHealth/models/DatasetSubject.md @@ -0,0 +1,12 @@ +# DatasetSubject + +A dataset resource type. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**dataset_rid** | DatasetRid | Yes | | +**branch_id** | BranchName | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/DateBounds.md b/docs/v2/DataHealth/models/DateBounds.md new file mode 100644 index 000000000..7b1572854 --- /dev/null +++ b/docs/v2/DataHealth/models/DateBounds.md @@ -0,0 +1,12 @@ +# DateBounds + +The range of date values a check is expected to be within. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**lower_bound** | Optional[datetime] | No | | +**upper_bound** | Optional[datetime] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/DateBoundsConfig.md b/docs/v2/DataHealth/models/DateBoundsConfig.md new file mode 100644 index 000000000..1b6b3857b --- /dev/null +++ b/docs/v2/DataHealth/models/DateBoundsConfig.md @@ -0,0 +1,12 @@ +# DateBoundsConfig + +Configuration for date bounds check with severity settings. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**date_bounds** | DateBounds | Yes | | +**severity** | SeverityLevel | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/DateColumnRangeCheckConfig.md b/docs/v2/DataHealth/models/DateColumnRangeCheckConfig.md new file mode 100644 index 000000000..a524d64e3 --- /dev/null +++ b/docs/v2/DataHealth/models/DateColumnRangeCheckConfig.md @@ -0,0 +1,14 @@ +# DateColumnRangeCheckConfig + +Checks that values in a date column fall within a specified range. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**subject** | DatasetSubject | Yes | | +**column_name** | ColumnName | Yes | | +**date_bounds_config** | DateBoundsConfig | Yes | | +**type** | Literal["dateColumnRange"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/DateColumnValue.md b/docs/v2/DataHealth/models/DateColumnValue.md new file mode 100644 index 000000000..25b7e8341 --- /dev/null +++ b/docs/v2/DataHealth/models/DateColumnValue.md @@ -0,0 +1,12 @@ +# DateColumnValue + +A date column value. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**value** | datetime | Yes | | +**type** | Literal["date"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/EscalationConfig.md b/docs/v2/DataHealth/models/EscalationConfig.md new file mode 100644 index 000000000..2b25f2f3f --- /dev/null +++ b/docs/v2/DataHealth/models/EscalationConfig.md @@ -0,0 +1,12 @@ +# EscalationConfig + +The configuration for when the severity of the failing health check should be escalated to CRITICAL – after a given number of failures, possibly within a time interval. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**failures_to_critical** | int | Yes | | +**time_interval_in_seconds** | Optional[Long] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/JobDurationCheckConfig.md b/docs/v2/DataHealth/models/JobDurationCheckConfig.md new file mode 100644 index 000000000..91ae1e81c --- /dev/null +++ b/docs/v2/DataHealth/models/JobDurationCheckConfig.md @@ -0,0 +1,13 @@ +# JobDurationCheckConfig + +Checks the total time a job takes to complete. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**subject** | DatasetSubject | Yes | | +**time_check_config** | TimeCheckConfig | Yes | | +**type** | Literal["jobDuration"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/JobStatusCheckConfig.md b/docs/v2/DataHealth/models/JobStatusCheckConfig.md new file mode 100644 index 000000000..44c4f271f --- /dev/null +++ b/docs/v2/DataHealth/models/JobStatusCheckConfig.md @@ -0,0 +1,13 @@ +# JobStatusCheckConfig + +Checks the status of the most recent job run on the dataset. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**subject** | DatasetSubject | Yes | | +**status_check_config** | StatusCheckConfig | Yes | | +**type** | Literal["jobStatus"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/MedianDeviation.md b/docs/v2/DataHealth/models/MedianDeviation.md new file mode 100644 index 000000000..56f62444e --- /dev/null +++ b/docs/v2/DataHealth/models/MedianDeviation.md @@ -0,0 +1,13 @@ +# MedianDeviation + +The number of thresholds the build's duration differs from the median. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**bounds_type** | Optional[MedianDeviationBoundsType] | No | | +**data_points** | int | Yes | | +**deviation_threshold** | float | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/MedianDeviationBoundsType.md b/docs/v2/DataHealth/models/MedianDeviationBoundsType.md new file mode 100644 index 000000000..7e8e88c52 --- /dev/null +++ b/docs/v2/DataHealth/models/MedianDeviationBoundsType.md @@ -0,0 +1,12 @@ +# MedianDeviationBoundsType + +The three types of median deviations a bounds type can have: - LOWER_BOUND – Tests for significant deviations below the median value, - UPPER_BOUND – Tests for significant deviations above the median value, - TWO_TAILED – Tests for significant deviations in either direction from the median value. + +| **Value** | +| --------- | +| `"LOWER_BOUND"` | +| `"UPPER_BOUND"` | +| `"TWO_TAILED"` | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/MedianDeviationConfig.md b/docs/v2/DataHealth/models/MedianDeviationConfig.md new file mode 100644 index 000000000..efb2ad6c2 --- /dev/null +++ b/docs/v2/DataHealth/models/MedianDeviationConfig.md @@ -0,0 +1,12 @@ +# MedianDeviationConfig + +Configuration for median deviation check with severity settings. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**median_deviation** | MedianDeviation | Yes | | +**severity** | SeverityLevel | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/NullPercentageCheckConfig.md b/docs/v2/DataHealth/models/NullPercentageCheckConfig.md new file mode 100644 index 000000000..610d1c651 --- /dev/null +++ b/docs/v2/DataHealth/models/NullPercentageCheckConfig.md @@ -0,0 +1,13 @@ +# NullPercentageCheckConfig + +Checks the percentage of null values in a specific column. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**subject** | DatasetSubject | Yes | | +**percentage_check_config** | PercentageCheckConfig | Yes | | +**type** | Literal["nullPercentage"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/NumericBounds.md b/docs/v2/DataHealth/models/NumericBounds.md new file mode 100644 index 000000000..3e55e447b --- /dev/null +++ b/docs/v2/DataHealth/models/NumericBounds.md @@ -0,0 +1,12 @@ +# NumericBounds + +The range of numeric values a check is expected to be within. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**lower_bound** | Optional[float] | No | | +**upper_bound** | Optional[float] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/NumericBoundsConfig.md b/docs/v2/DataHealth/models/NumericBoundsConfig.md new file mode 100644 index 000000000..baa0b7056 --- /dev/null +++ b/docs/v2/DataHealth/models/NumericBoundsConfig.md @@ -0,0 +1,12 @@ +# NumericBoundsConfig + +Configuration for numeric bounds check with severity settings. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**numeric_bounds** | NumericBounds | Yes | | +**severity** | SeverityLevel | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/NumericColumnCheckConfig.md b/docs/v2/DataHealth/models/NumericColumnCheckConfig.md new file mode 100644 index 000000000..b839e6792 --- /dev/null +++ b/docs/v2/DataHealth/models/NumericColumnCheckConfig.md @@ -0,0 +1,13 @@ +# NumericColumnCheckConfig + +Configuration for numeric column-based checks (such as mean or median). At least one of numericBounds or trend must be specified. Both may be provided to validate both the absolute value range and the trend behavior over time. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**column_name** | ColumnName | Yes | | +**numeric_bounds** | Optional[NumericBoundsConfig] | No | | +**trend** | Optional[TrendConfig] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/NumericColumnMeanCheckConfig.md b/docs/v2/DataHealth/models/NumericColumnMeanCheckConfig.md new file mode 100644 index 000000000..863c2da09 --- /dev/null +++ b/docs/v2/DataHealth/models/NumericColumnMeanCheckConfig.md @@ -0,0 +1,13 @@ +# NumericColumnMeanCheckConfig + +Checks the mean value of a numeric column. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**subject** | DatasetSubject | Yes | | +**numeric_column_check_config** | NumericColumnCheckConfig | Yes | | +**type** | Literal["numericColumnMean"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/NumericColumnMedianCheckConfig.md b/docs/v2/DataHealth/models/NumericColumnMedianCheckConfig.md new file mode 100644 index 000000000..6dfbd8315 --- /dev/null +++ b/docs/v2/DataHealth/models/NumericColumnMedianCheckConfig.md @@ -0,0 +1,13 @@ +# NumericColumnMedianCheckConfig + +Checks the median value of a numeric column. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**subject** | DatasetSubject | Yes | | +**numeric_column_check_config** | NumericColumnCheckConfig | Yes | | +**type** | Literal["numericColumnMedian"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/NumericColumnRangeCheckConfig.md b/docs/v2/DataHealth/models/NumericColumnRangeCheckConfig.md new file mode 100644 index 000000000..5dfc837d3 --- /dev/null +++ b/docs/v2/DataHealth/models/NumericColumnRangeCheckConfig.md @@ -0,0 +1,14 @@ +# NumericColumnRangeCheckConfig + +Checks that values in a numeric column fall within a specified range. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**subject** | DatasetSubject | Yes | | +**column_name** | ColumnName | Yes | | +**numeric_bounds_config** | NumericBoundsConfig | Yes | | +**type** | Literal["numericColumnRange"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/NumericColumnValue.md b/docs/v2/DataHealth/models/NumericColumnValue.md new file mode 100644 index 000000000..8251c9f78 --- /dev/null +++ b/docs/v2/DataHealth/models/NumericColumnValue.md @@ -0,0 +1,12 @@ +# NumericColumnValue + +A numeric column value. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**value** | float | Yes | | +**type** | Literal["numeric"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/PercentageBounds.md b/docs/v2/DataHealth/models/PercentageBounds.md new file mode 100644 index 000000000..89b90277b --- /dev/null +++ b/docs/v2/DataHealth/models/PercentageBounds.md @@ -0,0 +1,12 @@ +# PercentageBounds + +The configuration for the range of percentage values between which the health check is expected to succeed. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**lower_bound_percentage** | Optional[PercentageValue] | No | | +**upper_bound_percentage** | Optional[PercentageValue] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/PercentageBoundsConfig.md b/docs/v2/DataHealth/models/PercentageBoundsConfig.md new file mode 100644 index 000000000..6742ecc0b --- /dev/null +++ b/docs/v2/DataHealth/models/PercentageBoundsConfig.md @@ -0,0 +1,12 @@ +# PercentageBoundsConfig + +Configuration for percentage bounds check with severity settings. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**percentage_bounds** | PercentageBounds | Yes | | +**severity** | SeverityLevel | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/PercentageCheckConfig.md b/docs/v2/DataHealth/models/PercentageCheckConfig.md new file mode 100644 index 000000000..6a9e9f2be --- /dev/null +++ b/docs/v2/DataHealth/models/PercentageCheckConfig.md @@ -0,0 +1,13 @@ +# PercentageCheckConfig + +Configuration for percentage-based checks (such as null percentage). + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**column_name** | ColumnName | Yes | | +**percentage_bounds** | Optional[PercentageBoundsConfig] | No | | +**median_deviation** | Optional[MedianDeviationConfig] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/PercentageValue.md b/docs/v2/DataHealth/models/PercentageValue.md new file mode 100644 index 000000000..aef2e8faf --- /dev/null +++ b/docs/v2/DataHealth/models/PercentageValue.md @@ -0,0 +1,15 @@ +# PercentageValue + +A percentage value in the range 0.0 to 100.0. + +Validation rules: + * must be greater than or equal to 0.0 + * must be less than or equal to 100.0 + +## Type +```python +float +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/PrimaryKeyCheckConfig.md b/docs/v2/DataHealth/models/PrimaryKeyCheckConfig.md new file mode 100644 index 000000000..0d9107b25 --- /dev/null +++ b/docs/v2/DataHealth/models/PrimaryKeyCheckConfig.md @@ -0,0 +1,13 @@ +# PrimaryKeyCheckConfig + +Checks the uniqueness and non-null values of one or more columns (primary key constraint). + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**subject** | DatasetSubject | Yes | | +**primary_key_config** | PrimaryKeyConfig | Yes | | +**type** | Literal["primaryKey"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/PrimaryKeyConfig.md b/docs/v2/DataHealth/models/PrimaryKeyConfig.md new file mode 100644 index 000000000..29b2b20e5 --- /dev/null +++ b/docs/v2/DataHealth/models/PrimaryKeyConfig.md @@ -0,0 +1,12 @@ +# PrimaryKeyConfig + +Configuration for primary key validation with severity settings. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**column_names** | List[ColumnName] | Yes | | +**severity** | SeverityLevel | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/ReplaceAllowedColumnValuesCheckConfig.md b/docs/v2/DataHealth/models/ReplaceAllowedColumnValuesCheckConfig.md new file mode 100644 index 000000000..6a4aabf79 --- /dev/null +++ b/docs/v2/DataHealth/models/ReplaceAllowedColumnValuesCheckConfig.md @@ -0,0 +1,14 @@ +# ReplaceAllowedColumnValuesCheckConfig + +ReplaceAllowedColumnValuesCheckConfig + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**allowed_values** | List[ColumnValue] | Yes | | +**severity** | SeverityLevel | Yes | | +**allow_null** | Optional[bool] | No | | +**type** | Literal["allowedColumnValues"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/ReplaceApproximateUniquePercentageCheckConfig.md b/docs/v2/DataHealth/models/ReplaceApproximateUniquePercentageCheckConfig.md new file mode 100644 index 000000000..8ad887f2c --- /dev/null +++ b/docs/v2/DataHealth/models/ReplaceApproximateUniquePercentageCheckConfig.md @@ -0,0 +1,12 @@ +# ReplaceApproximateUniquePercentageCheckConfig + +ReplaceApproximateUniquePercentageCheckConfig + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**percentage_check_config** | ReplacePercentageCheckConfig | Yes | | +**type** | Literal["approximateUniquePercentage"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/ReplaceBuildDurationCheckConfig.md b/docs/v2/DataHealth/models/ReplaceBuildDurationCheckConfig.md new file mode 100644 index 000000000..3e805faf9 --- /dev/null +++ b/docs/v2/DataHealth/models/ReplaceBuildDurationCheckConfig.md @@ -0,0 +1,12 @@ +# ReplaceBuildDurationCheckConfig + +ReplaceBuildDurationCheckConfig + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**time_check_config** | TimeCheckConfig | Yes | | +**type** | Literal["buildDuration"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/ReplaceBuildStatusCheckConfig.md b/docs/v2/DataHealth/models/ReplaceBuildStatusCheckConfig.md new file mode 100644 index 000000000..8c8537356 --- /dev/null +++ b/docs/v2/DataHealth/models/ReplaceBuildStatusCheckConfig.md @@ -0,0 +1,12 @@ +# ReplaceBuildStatusCheckConfig + +ReplaceBuildStatusCheckConfig + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**status_check_config** | StatusCheckConfig | Yes | | +**type** | Literal["buildStatus"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/ReplaceCheckConfig.md b/docs/v2/DataHealth/models/ReplaceCheckConfig.md new file mode 100644 index 000000000..0538eca1b --- /dev/null +++ b/docs/v2/DataHealth/models/ReplaceCheckConfig.md @@ -0,0 +1,30 @@ +# ReplaceCheckConfig + +Configuration of a check. + + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +ReplaceNumericColumnRangeCheckConfig | numericColumnRange +ReplaceJobStatusCheckConfig | jobStatus +ReplaceNumericColumnMeanCheckConfig | numericColumnMean +ReplaceDateColumnRangeCheckConfig | dateColumnRange +ReplaceJobDurationCheckConfig | jobDuration +ReplaceApproximateUniquePercentageCheckConfig | approximateUniquePercentage +ReplaceBuildStatusCheckConfig | buildStatus +ReplaceColumnTypeCheckConfig | columnType +ReplaceAllowedColumnValuesCheckConfig | allowedColumnValues +ReplaceNullPercentageCheckConfig | nullPercentage +ReplaceTotalColumnCountCheckConfig | totalColumnCount +ReplaceNumericColumnMedianCheckConfig | numericColumnMedian +ReplaceBuildDurationCheckConfig | buildDuration +ReplaceSchemaComparisonCheckConfig | schemaComparison +ReplacePrimaryKeyCheckConfig | primaryKey + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/ReplaceCheckRequest.md b/docs/v2/DataHealth/models/ReplaceCheckRequest.md new file mode 100644 index 000000000..b97b4dfcb --- /dev/null +++ b/docs/v2/DataHealth/models/ReplaceCheckRequest.md @@ -0,0 +1,12 @@ +# ReplaceCheckRequest + +ReplaceCheckRequest + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**config** | ReplaceCheckConfig | Yes | | +**intent** | Optional[CheckIntent] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/ReplaceColumnTypeCheckConfig.md b/docs/v2/DataHealth/models/ReplaceColumnTypeCheckConfig.md new file mode 100644 index 000000000..82c40c54b --- /dev/null +++ b/docs/v2/DataHealth/models/ReplaceColumnTypeCheckConfig.md @@ -0,0 +1,12 @@ +# ReplaceColumnTypeCheckConfig + +ReplaceColumnTypeCheckConfig + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**column_type_config** | ReplaceColumnTypeConfig | Yes | | +**type** | Literal["columnType"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/ReplaceColumnTypeConfig.md b/docs/v2/DataHealth/models/ReplaceColumnTypeConfig.md new file mode 100644 index 000000000..a0a44b78e --- /dev/null +++ b/docs/v2/DataHealth/models/ReplaceColumnTypeConfig.md @@ -0,0 +1,12 @@ +# ReplaceColumnTypeConfig + +ReplaceColumnTypeConfig + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**severity** | SeverityLevel | Yes | | +**expected_type** | Optional[SchemaFieldType] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/ReplaceDateColumnRangeCheckConfig.md b/docs/v2/DataHealth/models/ReplaceDateColumnRangeCheckConfig.md new file mode 100644 index 000000000..b8cc31fb7 --- /dev/null +++ b/docs/v2/DataHealth/models/ReplaceDateColumnRangeCheckConfig.md @@ -0,0 +1,12 @@ +# ReplaceDateColumnRangeCheckConfig + +ReplaceDateColumnRangeCheckConfig + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**date_bounds_config** | DateBoundsConfig | Yes | | +**type** | Literal["dateColumnRange"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/ReplaceJobDurationCheckConfig.md b/docs/v2/DataHealth/models/ReplaceJobDurationCheckConfig.md new file mode 100644 index 000000000..5d44c03a5 --- /dev/null +++ b/docs/v2/DataHealth/models/ReplaceJobDurationCheckConfig.md @@ -0,0 +1,12 @@ +# ReplaceJobDurationCheckConfig + +ReplaceJobDurationCheckConfig + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**time_check_config** | TimeCheckConfig | Yes | | +**type** | Literal["jobDuration"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/ReplaceJobStatusCheckConfig.md b/docs/v2/DataHealth/models/ReplaceJobStatusCheckConfig.md new file mode 100644 index 000000000..1ac4c1343 --- /dev/null +++ b/docs/v2/DataHealth/models/ReplaceJobStatusCheckConfig.md @@ -0,0 +1,12 @@ +# ReplaceJobStatusCheckConfig + +ReplaceJobStatusCheckConfig + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**status_check_config** | StatusCheckConfig | Yes | | +**type** | Literal["jobStatus"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/ReplaceNullPercentageCheckConfig.md b/docs/v2/DataHealth/models/ReplaceNullPercentageCheckConfig.md new file mode 100644 index 000000000..f9b9d803b --- /dev/null +++ b/docs/v2/DataHealth/models/ReplaceNullPercentageCheckConfig.md @@ -0,0 +1,12 @@ +# ReplaceNullPercentageCheckConfig + +ReplaceNullPercentageCheckConfig + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**percentage_check_config** | ReplacePercentageCheckConfig | Yes | | +**type** | Literal["nullPercentage"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/ReplaceNumericColumnCheckConfig.md b/docs/v2/DataHealth/models/ReplaceNumericColumnCheckConfig.md new file mode 100644 index 000000000..d1f4a7fbe --- /dev/null +++ b/docs/v2/DataHealth/models/ReplaceNumericColumnCheckConfig.md @@ -0,0 +1,12 @@ +# ReplaceNumericColumnCheckConfig + +ReplaceNumericColumnCheckConfig + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**numeric_bounds** | Optional[NumericBoundsConfig] | No | | +**trend** | Optional[TrendConfig] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/ReplaceNumericColumnMeanCheckConfig.md b/docs/v2/DataHealth/models/ReplaceNumericColumnMeanCheckConfig.md new file mode 100644 index 000000000..eaac999a8 --- /dev/null +++ b/docs/v2/DataHealth/models/ReplaceNumericColumnMeanCheckConfig.md @@ -0,0 +1,12 @@ +# ReplaceNumericColumnMeanCheckConfig + +ReplaceNumericColumnMeanCheckConfig + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**numeric_column_check_config** | ReplaceNumericColumnCheckConfig | Yes | | +**type** | Literal["numericColumnMean"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/ReplaceNumericColumnMedianCheckConfig.md b/docs/v2/DataHealth/models/ReplaceNumericColumnMedianCheckConfig.md new file mode 100644 index 000000000..c6900f432 --- /dev/null +++ b/docs/v2/DataHealth/models/ReplaceNumericColumnMedianCheckConfig.md @@ -0,0 +1,12 @@ +# ReplaceNumericColumnMedianCheckConfig + +ReplaceNumericColumnMedianCheckConfig + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**numeric_column_check_config** | ReplaceNumericColumnCheckConfig | Yes | | +**type** | Literal["numericColumnMedian"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/ReplaceNumericColumnRangeCheckConfig.md b/docs/v2/DataHealth/models/ReplaceNumericColumnRangeCheckConfig.md new file mode 100644 index 000000000..060dc97c9 --- /dev/null +++ b/docs/v2/DataHealth/models/ReplaceNumericColumnRangeCheckConfig.md @@ -0,0 +1,12 @@ +# ReplaceNumericColumnRangeCheckConfig + +ReplaceNumericColumnRangeCheckConfig + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**numeric_bounds_config** | NumericBoundsConfig | Yes | | +**type** | Literal["numericColumnRange"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/ReplacePercentageCheckConfig.md b/docs/v2/DataHealth/models/ReplacePercentageCheckConfig.md new file mode 100644 index 000000000..0a11a89c8 --- /dev/null +++ b/docs/v2/DataHealth/models/ReplacePercentageCheckConfig.md @@ -0,0 +1,12 @@ +# ReplacePercentageCheckConfig + +ReplacePercentageCheckConfig + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**median_deviation** | Optional[MedianDeviationConfig] | No | | +**percentage_bounds** | Optional[PercentageBoundsConfig] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/ReplacePrimaryKeyCheckConfig.md b/docs/v2/DataHealth/models/ReplacePrimaryKeyCheckConfig.md new file mode 100644 index 000000000..056f3918a --- /dev/null +++ b/docs/v2/DataHealth/models/ReplacePrimaryKeyCheckConfig.md @@ -0,0 +1,12 @@ +# ReplacePrimaryKeyCheckConfig + +ReplacePrimaryKeyCheckConfig + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**primary_key_config** | ReplacePrimaryKeyConfig | Yes | | +**type** | Literal["primaryKey"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/ReplacePrimaryKeyConfig.md b/docs/v2/DataHealth/models/ReplacePrimaryKeyConfig.md new file mode 100644 index 000000000..f1e986efe --- /dev/null +++ b/docs/v2/DataHealth/models/ReplacePrimaryKeyConfig.md @@ -0,0 +1,11 @@ +# ReplacePrimaryKeyConfig + +ReplacePrimaryKeyConfig + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**severity** | SeverityLevel | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/ReplaceSchemaComparisonCheckConfig.md b/docs/v2/DataHealth/models/ReplaceSchemaComparisonCheckConfig.md new file mode 100644 index 000000000..6abbaa23a --- /dev/null +++ b/docs/v2/DataHealth/models/ReplaceSchemaComparisonCheckConfig.md @@ -0,0 +1,12 @@ +# ReplaceSchemaComparisonCheckConfig + +ReplaceSchemaComparisonCheckConfig + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**schema_comparison_config** | SchemaComparisonConfig | Yes | | +**type** | Literal["schemaComparison"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/ReplaceTotalColumnCountCheckConfig.md b/docs/v2/DataHealth/models/ReplaceTotalColumnCountCheckConfig.md new file mode 100644 index 000000000..8d3894220 --- /dev/null +++ b/docs/v2/DataHealth/models/ReplaceTotalColumnCountCheckConfig.md @@ -0,0 +1,12 @@ +# ReplaceTotalColumnCountCheckConfig + +ReplaceTotalColumnCountCheckConfig + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**column_count_config** | ColumnCountConfig | Yes | | +**type** | Literal["totalColumnCount"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/SchemaComparisonCheckConfig.md b/docs/v2/DataHealth/models/SchemaComparisonCheckConfig.md new file mode 100644 index 000000000..7a3a649f4 --- /dev/null +++ b/docs/v2/DataHealth/models/SchemaComparisonCheckConfig.md @@ -0,0 +1,13 @@ +# SchemaComparisonCheckConfig + +Checks the dataset schema against an expected schema. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**subject** | DatasetSubject | Yes | | +**schema_comparison_config** | SchemaComparisonConfig | Yes | | +**type** | Literal["schemaComparison"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/SchemaComparisonConfig.md b/docs/v2/DataHealth/models/SchemaComparisonConfig.md new file mode 100644 index 000000000..c0da8e056 --- /dev/null +++ b/docs/v2/DataHealth/models/SchemaComparisonConfig.md @@ -0,0 +1,13 @@ +# SchemaComparisonConfig + +Configuration for schema comparison validation with severity settings. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**expected_schema** | SchemaInfo | Yes | | +**schema_comparison_type** | SchemaComparisonType | Yes | | +**severity** | SeverityLevel | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/SchemaComparisonType.md b/docs/v2/DataHealth/models/SchemaComparisonType.md new file mode 100644 index 000000000..a16eae4f2 --- /dev/null +++ b/docs/v2/DataHealth/models/SchemaComparisonType.md @@ -0,0 +1,19 @@ +# SchemaComparisonType + +The type of schema comparison to perform: +- EXACT_MATCH_ORDERED_COLUMNS: Schemas must have identical columns in the same order. +- EXACT_MATCH_UNORDERED_COLUMNS: Schemas must have identical columns but order doesn't matter. +- COLUMN_ADDITIONS_ALLOWED: Expected schema columns must be present, additional columns are allowed and + missing column types are ignored. +- COLUMN_ADDITIONS_ALLOWED_STRICT: Expected schema columns must be present, additional columns are allowed. + Both expected and actual columns must specify types and they must match exactly. + +| **Value** | +| --------- | +| `"EXACT_MATCH_ORDERED_COLUMNS"` | +| `"EXACT_MATCH_UNORDERED_COLUMNS"` | +| `"COLUMN_ADDITIONS_ALLOWED"` | +| `"COLUMN_ADDITIONS_ALLOWED_STRICT"` | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/SchemaInfo.md b/docs/v2/DataHealth/models/SchemaInfo.md new file mode 100644 index 000000000..2fd6f7381 --- /dev/null +++ b/docs/v2/DataHealth/models/SchemaInfo.md @@ -0,0 +1,11 @@ +# SchemaInfo + +Information about a dataset schema including all columns. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**columns** | List[ColumnInfo] | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/SeverityLevel.md b/docs/v2/DataHealth/models/SeverityLevel.md new file mode 100644 index 000000000..19f6f6e2c --- /dev/null +++ b/docs/v2/DataHealth/models/SeverityLevel.md @@ -0,0 +1,11 @@ +# SeverityLevel + +The severity level of the check. Possible values are MODERATE or CRITICAL. + +| **Value** | +| --------- | +| `"MODERATE"` | +| `"CRITICAL"` | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/StatusCheckConfig.md b/docs/v2/DataHealth/models/StatusCheckConfig.md new file mode 100644 index 000000000..735916505 --- /dev/null +++ b/docs/v2/DataHealth/models/StatusCheckConfig.md @@ -0,0 +1,12 @@ +# StatusCheckConfig + +StatusCheckConfig + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**severity** | SeverityLevel | Yes | | +**escalation_config** | Optional[EscalationConfig] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/StringColumnValue.md b/docs/v2/DataHealth/models/StringColumnValue.md new file mode 100644 index 000000000..ff0099be4 --- /dev/null +++ b/docs/v2/DataHealth/models/StringColumnValue.md @@ -0,0 +1,12 @@ +# StringColumnValue + +A string column value. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**value** | str | Yes | | +**type** | Literal["string"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/TimeBounds.md b/docs/v2/DataHealth/models/TimeBounds.md new file mode 100644 index 000000000..b499a5f6d --- /dev/null +++ b/docs/v2/DataHealth/models/TimeBounds.md @@ -0,0 +1,12 @@ +# TimeBounds + +The configuration for the range of time between which the health check is expected to succeed. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**lower_bound_in_seconds** | Optional[Long] | No | | +**upper_bound_in_seconds** | Optional[Long] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/TimeBoundsConfig.md b/docs/v2/DataHealth/models/TimeBoundsConfig.md new file mode 100644 index 000000000..25a8a4882 --- /dev/null +++ b/docs/v2/DataHealth/models/TimeBoundsConfig.md @@ -0,0 +1,12 @@ +# TimeBoundsConfig + +Configuration for time bounds check with severity settings. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**time_bounds** | TimeBounds | Yes | | +**severity** | SeverityLevel | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/TimeCheckConfig.md b/docs/v2/DataHealth/models/TimeCheckConfig.md new file mode 100644 index 000000000..17f8c096a --- /dev/null +++ b/docs/v2/DataHealth/models/TimeCheckConfig.md @@ -0,0 +1,12 @@ +# TimeCheckConfig + +TimeCheckConfig + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**time_bounds** | Optional[TimeBoundsConfig] | No | | +**median_deviation** | Optional[MedianDeviationConfig] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/TotalColumnCountCheckConfig.md b/docs/v2/DataHealth/models/TotalColumnCountCheckConfig.md new file mode 100644 index 000000000..92c358b66 --- /dev/null +++ b/docs/v2/DataHealth/models/TotalColumnCountCheckConfig.md @@ -0,0 +1,13 @@ +# TotalColumnCountCheckConfig + +Checks the total number of columns in the dataset. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**subject** | DatasetSubject | Yes | | +**column_count_config** | ColumnCountConfig | Yes | | +**type** | Literal["totalColumnCount"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/TrendConfig.md b/docs/v2/DataHealth/models/TrendConfig.md new file mode 100644 index 000000000..0c9bc6f0e --- /dev/null +++ b/docs/v2/DataHealth/models/TrendConfig.md @@ -0,0 +1,13 @@ +# TrendConfig + +Configuration for trend-based validation with severity settings. At least one of trendType or differenceBounds must be specified. Both may be provided to validate both the trend pattern and the magnitude of change. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**trend_type** | Optional[TrendType] | No | | +**difference_bounds** | Optional[NumericBounds] | No | | +**severity** | SeverityLevel | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/DataHealth/models/TrendType.md b/docs/v2/DataHealth/models/TrendType.md new file mode 100644 index 000000000..b085064b9 --- /dev/null +++ b/docs/v2/DataHealth/models/TrendType.md @@ -0,0 +1,19 @@ +# TrendType + +The type of trend to validate: +- NON_INCREASING: Values should not increase over time +- NON_DECREASING: Values should not decrease over time +- STRICTLY_INCREASING: Values should strictly increase over time +- STRICTLY_DECREASING: Values should strictly decrease over time +- CONSTANT: Values should remain constant over time + +| **Value** | +| --------- | +| `"NON_INCREASING"` | +| `"NON_DECREASING"` | +| `"STRICTLY_INCREASING"` | +| `"STRICTLY_DECREASING"` | +| `"CONSTANT"` | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/Branch.md b/docs/v2/Datasets/Branch.md new file mode 100644 index 000000000..5c15801d6 --- /dev/null +++ b/docs/v2/Datasets/Branch.md @@ -0,0 +1,284 @@ +# Branch + +Method | HTTP request | Release Stage | +------------- | ------------- | ----- | +[**create**](#create) | **POST** /v2/datasets/{datasetRid}/branches | Stable | +[**delete**](#delete) | **DELETE** /v2/datasets/{datasetRid}/branches/{branchName} | Stable | +[**get**](#get) | **GET** /v2/datasets/{datasetRid}/branches/{branchName} | Stable | +[**list**](#list) | **GET** /v2/datasets/{datasetRid}/branches | Stable | +[**transactions**](#transactions) | **GET** /v2/datasets/{datasetRid}/branches/{branchName}/transactions | Public Beta | + +# **create** +Creates a branch on an existing dataset. A branch may optionally point to a (committed) transaction. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**dataset_rid** | DatasetRid | | | +**name** | BranchName | | | +**transaction_rid** | Optional[TransactionRid] | The most recent OPEN or COMMITTED transaction on the branch. This will never be an ABORTED transaction. | [optional] | + +### Return type +**Branch** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# DatasetRid +dataset_rid = None +# BranchName +name = "master" +# Optional[TransactionRid] | The most recent OPEN or COMMITTED transaction on the branch. This will never be an ABORTED transaction. +transaction_rid = "ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4" + + +try: + api_response = client.datasets.Dataset.Branch.create( + dataset_rid, name=name, transaction_rid=transaction_rid + ) + print("The create response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Branch.create: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | Branch | The created Branch | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **delete** +Deletes the Branch with the given BranchName. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**dataset_rid** | DatasetRid | | | +**branch_name** | BranchName | | | + +### Return type +**None** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# DatasetRid +dataset_rid = None +# BranchName +branch_name = None + + +try: + api_response = client.datasets.Dataset.Branch.delete(dataset_rid, branch_name) + print("The delete response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Branch.delete: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**204** | None | | None | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **get** +Get a Branch of a Dataset. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**dataset_rid** | DatasetRid | | | +**branch_name** | BranchName | | | + +### Return type +**Branch** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# DatasetRid +dataset_rid = None +# BranchName +branch_name = None + + +try: + api_response = client.datasets.Dataset.Branch.get(dataset_rid, branch_name) + print("The get response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Branch.get: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | Branch | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **list** +Lists the Branches of a Dataset. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**dataset_rid** | DatasetRid | | | +**page_size** | Optional[PageSize] | The page size to use for the endpoint. | [optional] | +**page_token** | Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. | [optional] | + +### Return type +**ListBranchesResponse** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# DatasetRid +dataset_rid = None +# Optional[PageSize] | The page size to use for the endpoint. +page_size = None +# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. +page_token = None + + +try: + for branch in client.datasets.Dataset.Branch.list( + dataset_rid, page_size=page_size, page_token=page_token + ): + pprint(branch) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Branch.list: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | ListBranchesResponse | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **transactions** +Get the Transaction history for the given Dataset. When requesting all transactions, the endpoint returns them in reverse chronological order. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**dataset_rid** | DatasetRid | | | +**branch_name** | BranchName | | | +**page_size** | Optional[PageSize] | The default pageSize is 20 transactions and the maximum allowed pageSize is 50 transactions | [optional] | +**page_token** | Optional[PageToken] | | [optional] | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**ListTransactionsResponse** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# DatasetRid +dataset_rid = None +# BranchName +branch_name = None +# Optional[PageSize] | The default pageSize is 20 transactions and the maximum allowed pageSize is 50 transactions +page_size = None +# Optional[PageToken] +page_token = None +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + for branch in client.datasets.Dataset.Branch.transactions( + dataset_rid, branch_name, page_size=page_size, page_token=page_token, preview=preview + ): + pprint(branch) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Branch.transactions: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | ListTransactionsResponse | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + diff --git a/docs/v2/Datasets/Dataset.md b/docs/v2/Datasets/Dataset.md new file mode 100644 index 000000000..e85e9ef9b --- /dev/null +++ b/docs/v2/Datasets/Dataset.md @@ -0,0 +1,691 @@ +# Dataset + +Method | HTTP request | Release Stage | +------------- | ------------- | ----- | +[**create**](#create) | **POST** /v2/datasets | Stable | +[**get**](#get) | **GET** /v2/datasets/{datasetRid} | Stable | +[**get_health_checks**](#get_health_checks) | **GET** /v2/datasets/{datasetRid}/getHealthChecks | Public Beta | +[**get_schedules**](#get_schedules) | **GET** /v2/datasets/{datasetRid}/getSchedules | Public Beta | +[**get_schema**](#get_schema) | **GET** /v2/datasets/{datasetRid}/getSchema | Public Beta | +[**get_schema_batch**](#get_schema_batch) | **POST** /v2/datasets/getSchemaBatch | Public Beta | +[**jobs**](#jobs) | **POST** /v2/datasets/{datasetRid}/jobs | Public Beta | +[**put_schema**](#put_schema) | **PUT** /v2/datasets/{datasetRid}/putSchema | Public Beta | +[**read_table**](#read_table) | **GET** /v2/datasets/{datasetRid}/readTable | Stable | +[**transactions**](#transactions) | **GET** /v2/datasets/{datasetRid}/transactions | Public Beta | + +# **create** +Creates a new Dataset. A default branch - `master` for most enrollments - will be created on the Dataset. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**name** | DatasetName | | | +**parent_folder_rid** | FolderRid | | | + +### Return type +**Dataset** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# DatasetName +name = "My Dataset" +# FolderRid +parent_folder_rid = "ri.compass.main.folder.c410f510-2937-420e-8ea3-8c9bcb3c1791" + + +try: + api_response = client.datasets.Dataset.create(name=name, parent_folder_rid=parent_folder_rid) + print("The create response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Dataset.create: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | Dataset | The created Dataset | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **get** +Get the Dataset with the specified rid. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**dataset_rid** | DatasetRid | | | + +### Return type +**Dataset** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# DatasetRid +dataset_rid = None + + +try: + api_response = client.datasets.Dataset.get(dataset_rid) + print("The get response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Dataset.get: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | Dataset | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **get_health_checks** +Get the RIDs of the Data Health Checks that are configured for the given Dataset. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**dataset_rid** | DatasetRid | | | +**branch_name** | Optional[BranchName] | The name of the Branch. If none is provided, the default Branch name - `master` for most enrollments - will be used. | [optional] | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**ListHealthChecksResponse** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# DatasetRid +dataset_rid = None +# Optional[BranchName] | The name of the Branch. If none is provided, the default Branch name - `master` for most enrollments - will be used. +branch_name = None +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.datasets.Dataset.get_health_checks( + dataset_rid, branch_name=branch_name, preview=preview + ) + print("The get_health_checks response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Dataset.get_health_checks: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | ListHealthChecksResponse | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **get_schedules** +Get the RIDs of the Schedules that target the given Dataset + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**dataset_rid** | DatasetRid | | | +**branch_name** | Optional[BranchName] | The name of the Branch. If none is provided, the default Branch name - `master` for most enrollments - will be used. | [optional] | +**page_size** | Optional[PageSize] | | [optional] | +**page_token** | Optional[PageToken] | | [optional] | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**ListSchedulesResponse** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# DatasetRid +dataset_rid = None +# Optional[BranchName] | The name of the Branch. If none is provided, the default Branch name - `master` for most enrollments - will be used. +branch_name = None +# Optional[PageSize] +page_size = None +# Optional[PageToken] +page_token = None +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + for dataset in client.datasets.Dataset.get_schedules( + dataset_rid, + branch_name=branch_name, + page_size=page_size, + page_token=page_token, + preview=preview, + ): + pprint(dataset) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Dataset.get_schedules: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | ListSchedulesResponse | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **get_schema** +Gets a dataset's schema. If no `endTransactionRid` is provided, the latest committed version will be used. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**dataset_rid** | DatasetRid | | | +**branch_name** | Optional[BranchName] | | [optional] | +**end_transaction_rid** | Optional[TransactionRid] | The Resource Identifier (RID) of the end Transaction. If a user does not provide a value, the RID of the latest committed transaction will be used. | [optional] | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | +**version_id** | Optional[VersionId] | The schema version that should be used. If none is provided, the latest version will be used. | [optional] | + +### Return type +**GetDatasetSchemaResponse** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# DatasetRid +dataset_rid = None +# Optional[BranchName] +branch_name = None +# Optional[TransactionRid] | The Resource Identifier (RID) of the end Transaction. If a user does not provide a value, the RID of the latest committed transaction will be used. +end_transaction_rid = None +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None +# Optional[VersionId] | The schema version that should be used. If none is provided, the latest version will be used. +version_id = None + + +try: + api_response = client.datasets.Dataset.get_schema( + dataset_rid, + branch_name=branch_name, + end_transaction_rid=end_transaction_rid, + preview=preview, + version_id=version_id, + ) + print("The get_schema response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Dataset.get_schema: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | GetDatasetSchemaResponse | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **get_schema_batch** +Fetch schemas for multiple datasets in a single request. Datasets not found +or inaccessible to the user will be omitted from the response. + + +The maximum batch size for this endpoint is 1000. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**body** | List[GetSchemaDatasetsBatchRequestElement] | Body of the request | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**GetSchemaDatasetsBatchResponse** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# List[GetSchemaDatasetsBatchRequestElement] | Body of the request +body = [ + { + "endTransactionRid": "ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4", + "datasetRid": "ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da", + "versionId": "0000000d-2acf-537c-a228-3a9fe3cdc523", + "branchName": "master", + } +] +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.datasets.Dataset.get_schema_batch(body, preview=preview) + print("The get_schema_batch response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Dataset.get_schema_batch: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | GetSchemaDatasetsBatchResponse | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **jobs** +Get the RIDs of the Jobs for the given dataset. By default, returned Jobs are sorted in descending order by the Job start time. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**dataset_rid** | DatasetRid | | | +**order_by** | List[GetDatasetJobsSort] | | | +**branch_name** | Optional[BranchName] | The name of the Branch. If none is provided, the default Branch name - `master` for most enrollments - will be used. | [optional] | +**page_size** | Optional[PageSize] | Max number of results to return. A limit of 1000 on if no limit is supplied in the search request | [optional] | +**page_token** | Optional[PageToken] | | [optional] | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | +**where** | Optional[GetDatasetJobsQuery] | | [optional] | + +### Return type +**GetJobResponse** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# DatasetRid +dataset_rid = None +# List[GetDatasetJobsSort] +order_by = [{"sortType": "BY_STARTED_TIME", "sortDirection": "DESCENDING"}] +# Optional[BranchName] | The name of the Branch. If none is provided, the default Branch name - `master` for most enrollments - will be used. +branch_name = None +# Optional[PageSize] | Max number of results to return. A limit of 1000 on if no limit is supplied in the search request +page_size = None +# Optional[PageToken] +page_token = None +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None +# Optional[GetDatasetJobsQuery] +where = { + "type": "timeFilter", + "field": "SUBMITTED_TIME", + "comparisonType": "GTE", + "value": "2020-09-30T14:30:00Z", +} + + +try: + for dataset in client.datasets.Dataset.jobs( + dataset_rid, + order_by=order_by, + branch_name=branch_name, + page_size=page_size, + page_token=page_token, + preview=preview, + where=where, + ): + pprint(dataset) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Dataset.jobs: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | GetJobResponse | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **put_schema** +Adds a schema on an existing dataset using a PUT request. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**dataset_rid** | DatasetRid | | | +**schema** | DatasetSchema | The schema that will be added. | | +**branch_name** | Optional[BranchName] | | [optional] | +**dataframe_reader** | Optional[DataframeReader] | The dataframe reader used for reading the dataset schema. Defaults to PARQUET. | [optional] | +**end_transaction_rid** | Optional[TransactionRid] | The Resource Identifier (RID) of the end Transaction. | [optional] | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**GetDatasetSchemaResponse** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# DatasetRid +dataset_rid = None +# DatasetSchema | The schema that will be added. +schema = { + "fieldSchemaList": [ + { + "name": "id", + "type": "LONG", + "nullable": False, + "customMetadata": {"description": "Primary key"}, + }, + {"name": "event_time", "type": "TIMESTAMP", "nullable": False}, + {"name": "price", "type": "DECIMAL", "precision": 10, "scale": 2, "nullable": True}, + { + "name": "tags", + "type": "ARRAY", + "nullable": True, + "arraySubtype": {"type": "STRING", "nullable": False}, + }, + { + "name": "metrics", + "type": "STRUCT", + "nullable": True, + "subSchemas": [ + {"name": "temperature", "type": "DOUBLE", "nullable": True}, + {"name": "humidity", "type": "DOUBLE", "nullable": True}, + ], + }, + ] +} +# Optional[BranchName] +branch_name = "master" +# Optional[DataframeReader] | The dataframe reader used for reading the dataset schema. Defaults to PARQUET. +dataframe_reader = "PARQUET" +# Optional[TransactionRid] | The Resource Identifier (RID) of the end Transaction. +end_transaction_rid = "ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4" +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.datasets.Dataset.put_schema( + dataset_rid, + schema=schema, + branch_name=branch_name, + dataframe_reader=dataframe_reader, + end_transaction_rid=end_transaction_rid, + preview=preview, + ) + print("The put_schema response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Dataset.put_schema: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | GetDatasetSchemaResponse | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **read_table** +Gets the content of a dataset as a table in the specified format. + +This endpoint currently does not support views (virtual datasets composed of other datasets). + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**dataset_rid** | DatasetRid | | | +**format** | TableExportFormat | The export format. Must be `ARROW` or `CSV`. | | +**branch_name** | Optional[BranchName] | The name of the Branch. | [optional] | +**columns** | Optional[List[str]] | A subset of the dataset columns to include in the result. Defaults to all columns. | [optional] | +**end_transaction_rid** | Optional[TransactionRid] | The Resource Identifier (RID) of the end Transaction. | [optional] | +**row_limit** | Optional[int] | A limit on the number of rows to return. Note that row ordering is non-deterministic. | [optional] | +**start_transaction_rid** | Optional[TransactionRid] | The Resource Identifier (RID) of the start Transaction. | [optional] | + +### Return type +**bytes** + +> [!TIP] +> This operation returns tabular data that can be converted to data frame formats: +> +> ```python +> # Get data in Arrow format +> table_data = client.datasets.Dataset.read_table(dataset_rid, format=format, branch_name=branch_name, columns=columns, end_transaction_rid=end_transaction_rid, row_limit=row_limit, start_transaction_rid=start_transaction_rid) +> +> # Convert to a PyArrow Table +> arrow_table = table_data.to_pyarrow() +> +> # Convert to a Pandas DataFrame +> pandas_df = table_data.to_pandas() +> +> # Convert to a Polars DataFrame +> polars_df = table_data.to_polars() +> +> # Convert to a DuckDB relation +> duckdb_relation = table_data.to_duckdb() +> ``` +> +> For more details, see the [Data Frames section](../../../README.md#data-frames) in the README. + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# DatasetRid +dataset_rid = None +# TableExportFormat | The export format. Must be `ARROW` or `CSV`. +format = None +# Optional[BranchName] | The name of the Branch. +branch_name = None +# Optional[List[str]] | A subset of the dataset columns to include in the result. Defaults to all columns. +columns = ["id", "firstName", "lastName"] +# Optional[TransactionRid] | The Resource Identifier (RID) of the end Transaction. +end_transaction_rid = None +# Optional[int] | A limit on the number of rows to return. Note that row ordering is non-deterministic. +row_limit = None +# Optional[TransactionRid] | The Resource Identifier (RID) of the start Transaction. +start_transaction_rid = None + + +try: + api_response = client.datasets.Dataset.read_table( + dataset_rid, + format=format, + branch_name=branch_name, + columns=columns, + end_transaction_rid=end_transaction_rid, + row_limit=row_limit, + start_transaction_rid=start_transaction_rid, + ) + print("The read_table response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Dataset.read_table: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | bytes | | application/octet-stream | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **transactions** +Get the Transaction history for the given Dataset. When requesting all transactions, the endpoint returns them in reverse chronological order. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**dataset_rid** | DatasetRid | | | +**page_size** | Optional[PageSize] | The page size to use for the endpoint. | [optional] | +**page_token** | Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. | [optional] | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**ListTransactionsOfDatasetResponse** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# DatasetRid +dataset_rid = None +# Optional[PageSize] | The page size to use for the endpoint. +page_size = None +# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. +page_token = None +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + for dataset in client.datasets.Dataset.transactions( + dataset_rid, page_size=page_size, page_token=page_token, preview=preview + ): + pprint(dataset) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Dataset.transactions: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | ListTransactionsOfDatasetResponse | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + diff --git a/docs/v2/Datasets/File.md b/docs/v2/Datasets/File.md new file mode 100644 index 000000000..c564ce329 --- /dev/null +++ b/docs/v2/Datasets/File.md @@ -0,0 +1,409 @@ +# File + +Method | HTTP request | Release Stage | +------------- | ------------- | ----- | +[**content**](#content) | **GET** /v2/datasets/{datasetRid}/files/{filePath}/content | Stable | +[**delete**](#delete) | **DELETE** /v2/datasets/{datasetRid}/files/{filePath} | Stable | +[**get**](#get) | **GET** /v2/datasets/{datasetRid}/files/{filePath} | Stable | +[**list**](#list) | **GET** /v2/datasets/{datasetRid}/files | Stable | +[**upload**](#upload) | **POST** /v2/datasets/{datasetRid}/files/{filePath}/upload | Stable | + +# **content** +Gets the content of a File contained in a Dataset. By default this retrieves the file's content from the latest +view of the default branch - `master` for most enrollments. +#### Advanced Usage +See [Datasets Core Concepts](https://palantir.com/docs/foundry/data-integration/datasets/) for details on using branches and transactions. +To **get a file's content from a specific Branch** specify the Branch's name as `branchName`. This will +retrieve the content for the most recent version of the file since the latest snapshot transaction, or the +earliest ancestor transaction of the branch if there are no snapshot transactions. +To **get a file's content from the resolved view of a transaction** specify the Transaction's resource identifier +as `endTransactionRid`. This will retrieve the content for the most recent version of the file since the latest +snapshot transaction, or the earliest ancestor transaction if there are no snapshot transactions. +To **get a file's content from the resolved view of a range of transactions** specify the the start transaction's +resource identifier as `startTransactionRid` and the end transaction's resource identifier as `endTransactionRid`. +This will retrieve the content for the most recent version of the file since the `startTransactionRid` up to the +`endTransactionRid`. Note that an intermediate snapshot transaction will remove all files from the view. Behavior +is undefined when the start and end transactions do not belong to the same root-to-leaf path. +To **get a file's content from a specific transaction** specify the Transaction's resource identifier as both the +`startTransactionRid` and `endTransactionRid`. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**dataset_rid** | DatasetRid | | | +**file_path** | FilePath | | | +**branch_name** | Optional[BranchName] | The name of the Branch that contains the File. Defaults to `master` for most enrollments. | [optional] | +**end_transaction_rid** | Optional[TransactionRid] | The Resource Identifier (RID) of the end Transaction. | [optional] | +**start_transaction_rid** | Optional[TransactionRid] | The Resource Identifier (RID) of the start Transaction. | [optional] | + +### Return type +**bytes** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# DatasetRid +dataset_rid = None +# FilePath +file_path = None +# Optional[BranchName] | The name of the Branch that contains the File. Defaults to `master` for most enrollments. +branch_name = None +# Optional[TransactionRid] | The Resource Identifier (RID) of the end Transaction. +end_transaction_rid = None +# Optional[TransactionRid] | The Resource Identifier (RID) of the start Transaction. +start_transaction_rid = None + + +try: + api_response = client.datasets.Dataset.File.content( + dataset_rid, + file_path, + branch_name=branch_name, + end_transaction_rid=end_transaction_rid, + start_transaction_rid=start_transaction_rid, + ) + print("The content response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling File.content: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | bytes | | application/octet-stream | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **delete** +Deletes a File from a Dataset. By default the file is deleted in a new transaction on the default +branch - `master` for most enrollments. The file will still be visible on historical views. +#### Advanced Usage +See [Datasets Core Concepts](https://palantir.com/docs/foundry/data-integration/datasets/) for details on using branches and transactions. +To **delete a File from a specific Branch** specify the Branch's name as `branchName`. A new delete Transaction +will be created and committed on this branch. +To **delete a File using a manually opened Transaction**, specify the Transaction's resource identifier +as `transactionRid`. The transaction must be of type `DELETE`. This is useful for deleting multiple files in a +single transaction. See [createTransaction](https://palantir.com/docs/foundry/api/datasets-resources/transactions/create-transaction/) to +open a transaction. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**dataset_rid** | DatasetRid | | | +**file_path** | FilePath | | | +**branch_name** | Optional[BranchName] | The name of the Branch on which to delete the File. Defaults to `master` for most enrollments. | [optional] | +**transaction_rid** | Optional[TransactionRid] | The Resource Identifier (RID) of the open delete Transaction on which to delete the File. | [optional] | + +### Return type +**None** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# DatasetRid +dataset_rid = None +# FilePath +file_path = None +# Optional[BranchName] | The name of the Branch on which to delete the File. Defaults to `master` for most enrollments. +branch_name = None +# Optional[TransactionRid] | The Resource Identifier (RID) of the open delete Transaction on which to delete the File. +transaction_rid = None + + +try: + api_response = client.datasets.Dataset.File.delete( + dataset_rid, file_path, branch_name=branch_name, transaction_rid=transaction_rid + ) + print("The delete response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling File.delete: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**204** | None | | None | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **get** +Gets metadata about a File contained in a Dataset. By default this retrieves the file's metadata from the latest +view of the default branch - `master` for most enrollments. +#### Advanced Usage +See [Datasets Core Concepts](https://palantir.com/docs/foundry/data-integration/datasets/) for details on using branches and transactions. +To **get a file's metadata from a specific Branch** specify the Branch's name as `branchName`. This will +retrieve metadata for the most recent version of the file since the latest snapshot transaction, or the earliest +ancestor transaction of the branch if there are no snapshot transactions. +To **get a file's metadata from the resolved view of a transaction** specify the Transaction's resource identifier +as `endTransactionRid`. This will retrieve metadata for the most recent version of the file since the latest snapshot +transaction, or the earliest ancestor transaction if there are no snapshot transactions. +To **get a file's metadata from the resolved view of a range of transactions** specify the the start transaction's +resource identifier as `startTransactionRid` and the end transaction's resource identifier as `endTransactionRid`. +This will retrieve metadata for the most recent version of the file since the `startTransactionRid` up to the +`endTransactionRid`. Behavior is undefined when the start and end transactions do not belong to the same root-to-leaf path. +To **get a file's metadata from a specific transaction** specify the Transaction's resource identifier as both the +`startTransactionRid` and `endTransactionRid`. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**dataset_rid** | DatasetRid | | | +**file_path** | FilePath | | | +**branch_name** | Optional[BranchName] | The name of the Branch that contains the File. Defaults to `master` for most enrollments. | [optional] | +**end_transaction_rid** | Optional[TransactionRid] | The Resource Identifier (RID) of the end Transaction. | [optional] | +**start_transaction_rid** | Optional[TransactionRid] | The Resource Identifier (RID) of the start Transaction. | [optional] | + +### Return type +**File** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# DatasetRid +dataset_rid = None +# FilePath +file_path = None +# Optional[BranchName] | The name of the Branch that contains the File. Defaults to `master` for most enrollments. +branch_name = None +# Optional[TransactionRid] | The Resource Identifier (RID) of the end Transaction. +end_transaction_rid = None +# Optional[TransactionRid] | The Resource Identifier (RID) of the start Transaction. +start_transaction_rid = None + + +try: + api_response = client.datasets.Dataset.File.get( + dataset_rid, + file_path, + branch_name=branch_name, + end_transaction_rid=end_transaction_rid, + start_transaction_rid=start_transaction_rid, + ) + print("The get response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling File.get: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | File | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **list** +Lists Files contained in a Dataset. By default files are listed on the latest view of the default +branch - `master` for most enrollments. +#### Advanced Usage +See [Datasets Core Concepts](https://palantir.com/docs/foundry/data-integration/datasets/) for details on using branches and transactions. +To **list files on a specific Branch** specify the Branch's name as `branchName`. This will include the most +recent version of all files since the latest snapshot transaction, or the earliest ancestor transaction of the +branch if there are no snapshot transactions. +To **list files on the resolved view of a transaction** specify the Transaction's resource identifier +as `endTransactionRid`. This will include the most recent version of all files since the latest snapshot +transaction, or the earliest ancestor transaction if there are no snapshot transactions. +To **list files on the resolved view of a range of transactions** specify the the start transaction's resource +identifier as `startTransactionRid` and the end transaction's resource identifier as `endTransactionRid`. This +will include the most recent version of all files since the `startTransactionRid` up to the `endTransactionRid`. +Note that an intermediate snapshot transaction will remove all files from the view. Behavior is undefined when +the start and end transactions do not belong to the same root-to-leaf path. +To **list files on a specific transaction** specify the Transaction's resource identifier as both the +`startTransactionRid` and `endTransactionRid`. This will include only files that were modified as part of that +Transaction. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**dataset_rid** | DatasetRid | | | +**branch_name** | Optional[BranchName] | The name of the Branch on which to list Files. Defaults to `master` for most enrollments. | [optional] | +**end_transaction_rid** | Optional[TransactionRid] | The Resource Identifier (RID) of the end Transaction. | [optional] | +**page_size** | Optional[PageSize] | The page size to use for the endpoint. | [optional] | +**page_token** | Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. | [optional] | +**start_transaction_rid** | Optional[TransactionRid] | The Resource Identifier (RID) of the start Transaction. | [optional] | + +### Return type +**ListFilesResponse** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# DatasetRid +dataset_rid = None +# Optional[BranchName] | The name of the Branch on which to list Files. Defaults to `master` for most enrollments. +branch_name = None +# Optional[TransactionRid] | The Resource Identifier (RID) of the end Transaction. +end_transaction_rid = None +# Optional[PageSize] | The page size to use for the endpoint. +page_size = None +# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. +page_token = None +# Optional[TransactionRid] | The Resource Identifier (RID) of the start Transaction. +start_transaction_rid = None + + +try: + for file in client.datasets.Dataset.File.list( + dataset_rid, + branch_name=branch_name, + end_transaction_rid=end_transaction_rid, + page_size=page_size, + page_token=page_token, + start_transaction_rid=start_transaction_rid, + ): + pprint(file) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling File.list: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | ListFilesResponse | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **upload** +Uploads a File to an existing Dataset. +The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`. +By default the file is uploaded to a new transaction on the default branch - `master` for most enrollments. +If the file already exists only the most recent version will be visible in the updated view. +#### Advanced Usage +See [Datasets Core Concepts](https://palantir.com/docs/foundry/data-integration/datasets/) for details on using branches and transactions. +To **upload a file to a specific Branch** specify the Branch's name as `branchName`. A new transaction will +be created and committed on this branch. By default the TransactionType will be `UPDATE`, to override this +default specify `transactionType` in addition to `branchName`. +See [createBranch](https://palantir.com/docs/foundry/api/datasets-resources/branches/create-branch/) to create a custom branch. +To **upload a file on a manually opened transaction** specify the Transaction's resource identifier as +`transactionRid`. This is useful for uploading multiple files in a single transaction. +See [createTransaction](https://palantir.com/docs/foundry/api/datasets-resources/transactions/create-transaction/) to open a transaction. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**dataset_rid** | DatasetRid | | | +**file_path** | FilePath | | | +**body** | bytes | Body of the request | | +**branch_name** | Optional[BranchName] | The name of the Branch on which to upload the File. Defaults to `master` for most enrollments. | [optional] | +**transaction_rid** | Optional[TransactionRid] | The Resource Identifier (RID) of the open Transaction on which to upload the File. | [optional] | +**transaction_type** | Optional[TransactionType] | The type of the Transaction to create when using branchName. Defaults to `UPDATE`. | [optional] | + +### Return type +**File** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# DatasetRid +dataset_rid = None +# FilePath +file_path = None +# bytes | Body of the request +body = None +# Optional[BranchName] | The name of the Branch on which to upload the File. Defaults to `master` for most enrollments. +branch_name = None +# Optional[TransactionRid] | The Resource Identifier (RID) of the open Transaction on which to upload the File. +transaction_rid = None +# Optional[TransactionType] | The type of the Transaction to create when using branchName. Defaults to `UPDATE`. +transaction_type = None + + +try: + api_response = client.datasets.Dataset.File.upload( + dataset_rid, + file_path, + body, + branch_name=branch_name, + transaction_rid=transaction_rid, + transaction_type=transaction_type, + ) + print("The upload response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling File.upload: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | File | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + diff --git a/docs/v2/Datasets/Transaction.md b/docs/v2/Datasets/Transaction.md new file mode 100644 index 000000000..1f521f898 --- /dev/null +++ b/docs/v2/Datasets/Transaction.md @@ -0,0 +1,360 @@ +# Transaction + +Method | HTTP request | Release Stage | +------------- | ------------- | ----- | +[**abort**](#abort) | **POST** /v2/datasets/{datasetRid}/transactions/{transactionRid}/abort | Stable | +[**build**](#build) | **GET** /v2/datasets/{datasetRid}/transactions/{transactionRid}/build | Private Beta | +[**commit**](#commit) | **POST** /v2/datasets/{datasetRid}/transactions/{transactionRid}/commit | Stable | +[**create**](#create) | **POST** /v2/datasets/{datasetRid}/transactions | Stable | +[**get**](#get) | **GET** /v2/datasets/{datasetRid}/transactions/{transactionRid} | Stable | +[**job**](#job) | **GET** /v2/datasets/{datasetRid}/transactions/{transactionRid}/job | Private Beta | + +# **abort** +Aborts an open Transaction. File modifications made on this Transaction are not preserved and the Branch is +not updated. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**dataset_rid** | DatasetRid | | | +**transaction_rid** | TransactionRid | | | + +### Return type +**Transaction** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# DatasetRid +dataset_rid = None +# TransactionRid +transaction_rid = None + + +try: + api_response = client.datasets.Dataset.Transaction.abort(dataset_rid, transaction_rid) + print("The abort response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Transaction.abort: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | Transaction | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **build** +Get the [Build](https://palantir.com/docs/foundry/data-integration/builds#builds) that computed the +given Transaction. Not all Transactions have an associated Build. For example, if a Dataset +is updated by a User uploading a CSV file into the browser, no Build will be tied to the Transaction. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**dataset_rid** | DatasetRid | | | +**transaction_rid** | TransactionRid | | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**Optional[BuildRid]** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# DatasetRid +dataset_rid = None +# TransactionRid +transaction_rid = None +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.datasets.Dataset.Transaction.build( + dataset_rid, transaction_rid, preview=preview + ) + print("The build response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Transaction.build: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | Optional[BuildRid] | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **commit** +Commits an open Transaction. File modifications made on this Transaction are preserved and the Branch is +updated to point to the Transaction. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**dataset_rid** | DatasetRid | | | +**transaction_rid** | TransactionRid | | | + +### Return type +**Transaction** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# DatasetRid +dataset_rid = None +# TransactionRid +transaction_rid = None + + +try: + api_response = client.datasets.Dataset.Transaction.commit(dataset_rid, transaction_rid) + print("The commit response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Transaction.commit: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | Transaction | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **create** +Creates a Transaction on a Branch of a Dataset. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**dataset_rid** | DatasetRid | | | +**transaction_type** | TransactionType | | | +**branch_name** | Optional[BranchName] | The name of the Branch on which to create the Transaction. Defaults to `master` for most enrollments. | [optional] | + +### Return type +**Transaction** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# DatasetRid +dataset_rid = None +# TransactionType +transaction_type = "APPEND" +# Optional[BranchName] | The name of the Branch on which to create the Transaction. Defaults to `master` for most enrollments. +branch_name = None + + +try: + api_response = client.datasets.Dataset.Transaction.create( + dataset_rid, transaction_type=transaction_type, branch_name=branch_name + ) + print("The create response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Transaction.create: %s\n" % e) + +``` + +### Manipulate a Dataset within a Transaction + +```python +import foundry + +foundry_client = foundry.FoundryV2Client(auth=foundry.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +transaction = foundry_client.datasets.Dataset.Transaction.create( + dataset_rid="...", + create_transaction_request={}, +) + +with open("my/path/to/file.txt", 'rb') as f: + foundry_client.datasets.Dataset.File.upload( + body=f.read(), + dataset_rid="....", + file_path="...", + transaction_rid=transaction.rid, + ) + +foundry_client.datasets.Dataset.Transaction.commit(dataset_rid="...", transaction_rid=transaction.rid) +``` + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | Transaction | The created Transaction | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **get** +Gets a Transaction of a Dataset. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**dataset_rid** | DatasetRid | | | +**transaction_rid** | TransactionRid | | | + +### Return type +**Transaction** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# DatasetRid +dataset_rid = None +# TransactionRid +transaction_rid = None + + +try: + api_response = client.datasets.Dataset.Transaction.get(dataset_rid, transaction_rid) + print("The get response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Transaction.get: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | Transaction | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **job** +Get the [Job](https://palantir.com/docs/foundry/data-integration/builds#jobs-and-jobspecs) that computed the +given Transaction. Not all Transactions have an associated Job. For example, if a Dataset +is updated by a User uploading a CSV file into the browser, no Job will be tied to the Transaction. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**dataset_rid** | DatasetRid | | | +**transaction_rid** | TransactionRid | | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**Optional[JobRid]** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# DatasetRid +dataset_rid = None +# TransactionRid +transaction_rid = None +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.datasets.Dataset.Transaction.job( + dataset_rid, transaction_rid, preview=preview + ) + print("The job response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Transaction.job: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | Optional[JobRid] | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + diff --git a/docs/v2/Datasets/View.md b/docs/v2/Datasets/View.md new file mode 100644 index 000000000..0b8cb0854 --- /dev/null +++ b/docs/v2/Datasets/View.md @@ -0,0 +1,401 @@ +# View + +Method | HTTP request | Release Stage | +------------- | ------------- | ----- | +[**add_backing_datasets**](#add_backing_datasets) | **POST** /v2/datasets/views/{viewDatasetRid}/addBackingDatasets | Public Beta | +[**add_primary_key**](#add_primary_key) | **POST** /v2/datasets/views/{viewDatasetRid}/addPrimaryKey | Public Beta | +[**create**](#create) | **POST** /v2/datasets/views | Public Beta | +[**get**](#get) | **GET** /v2/datasets/views/{viewDatasetRid} | Public Beta | +[**remove_backing_datasets**](#remove_backing_datasets) | **POST** /v2/datasets/views/{viewDatasetRid}/removeBackingDatasets | Public Beta | +[**replace_backing_datasets**](#replace_backing_datasets) | **PUT** /v2/datasets/views/{viewDatasetRid}/replaceBackingDatasets | Public Beta | + +# **add_backing_datasets** +Adds one or more backing datasets to a View. Any duplicates with the same dataset RID and branch name are +ignored. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**view_dataset_rid** | DatasetRid | The rid of the View. | | +**backing_datasets** | List[ViewBackingDataset] | | | +**branch** | Optional[BranchName] | | [optional] | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**View** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# DatasetRid | The rid of the View. +view_dataset_rid = None +# List[ViewBackingDataset] +backing_datasets = [ + { + "datasetRid": "ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da", + "branch": "master", + } +] +# Optional[BranchName] +branch = "master" +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.datasets.View.add_backing_datasets( + view_dataset_rid, backing_datasets=backing_datasets, branch=branch, preview=preview + ) + print("The add_backing_datasets response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling View.add_backing_datasets: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | View | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **add_primary_key** +Adds a primary key to a View that does not already have one. Primary keys are treated as +guarantees provided by the creator of the dataset. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**view_dataset_rid** | DatasetRid | The rid of the View. | | +**primary_key** | ViewPrimaryKey | | | +**branch** | Optional[BranchName] | | [optional] | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**View** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# DatasetRid | The rid of the View. +view_dataset_rid = None +# ViewPrimaryKey +primary_key = { + "columns": ["colA"], + "resolution": { + "type": "duplicate", + "deletionColumn": "deletionCol", + "resolutionStrategy": {"type": "latestWins", "columns": ["colB", "colC"]}, + }, +} +# Optional[BranchName] +branch = "master" +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.datasets.View.add_primary_key( + view_dataset_rid, primary_key=primary_key, branch=branch, preview=preview + ) + print("The add_primary_key response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling View.add_primary_key: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | View | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **create** +Create a new View. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**backing_datasets** | List[ViewBackingDataset] | | | +**parent_folder_rid** | FolderRid | | | +**view_name** | DatasetName | | | +**branch** | Optional[BranchName] | The branch name of the View. If not specified, defaults to `master` for most enrollments. | [optional] | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | +**primary_key** | Optional[ViewPrimaryKey] | | [optional] | + +### Return type +**View** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# List[ViewBackingDataset] +backing_datasets = [ + { + "datasetRid": "ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da", + "branch": "master", + } +] +# FolderRid +parent_folder_rid = "ri.compass.main.folder.c410f510-2937-420e-8ea3-8c9bcb3c1791" +# DatasetName +view_name = "My Dataset" +# Optional[BranchName] | The branch name of the View. If not specified, defaults to `master` for most enrollments. +branch = "master" +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None +# Optional[ViewPrimaryKey] +primary_key = {"columns": ["order_id"]} + + +try: + api_response = client.datasets.View.create( + backing_datasets=backing_datasets, + parent_folder_rid=parent_folder_rid, + view_name=view_name, + branch=branch, + preview=preview, + primary_key=primary_key, + ) + print("The create response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling View.create: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | View | The created View | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **get** +Get metadata for a View. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**view_dataset_rid** | DatasetRid | The rid of the View. | | +**branch** | Optional[BranchName] | | [optional] | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**View** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# DatasetRid | The rid of the View. +view_dataset_rid = None +# Optional[BranchName] +branch = None +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.datasets.View.get(view_dataset_rid, branch=branch, preview=preview) + print("The get response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling View.get: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | View | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **remove_backing_datasets** +Removes specified backing datasets from a View. Removing a dataset triggers a +[SNAPSHOT](https://palantir.com/docs/foundry/data-integration/datasets#snapshot) transaction on the next update. If a +specified dataset does not exist, no error is thrown. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**view_dataset_rid** | DatasetRid | The rid of the View. | | +**backing_datasets** | List[ViewBackingDataset] | | | +**branch** | Optional[BranchName] | | [optional] | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**View** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# DatasetRid | The rid of the View. +view_dataset_rid = None +# List[ViewBackingDataset] +backing_datasets = [ + { + "datasetRid": "ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da", + "branch": "master", + } +] +# Optional[BranchName] +branch = "master" +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.datasets.View.remove_backing_datasets( + view_dataset_rid, backing_datasets=backing_datasets, branch=branch, preview=preview + ) + print("The remove_backing_datasets response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling View.remove_backing_datasets: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | View | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **replace_backing_datasets** +Replaces the backing datasets for a View. Removing any backing dataset triggers a +[SNAPSHOT](https://palantir.com/docs/foundry/data-integration/datasets#snapshot) transaction the next time the View is updated. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**view_dataset_rid** | DatasetRid | The rid of the View. | | +**backing_datasets** | List[ViewBackingDataset] | | | +**branch** | Optional[BranchName] | | [optional] | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**View** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# DatasetRid | The rid of the View. +view_dataset_rid = None +# List[ViewBackingDataset] +backing_datasets = [ + { + "datasetRid": "ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da", + "branch": "master", + } +] +# Optional[BranchName] +branch = "master" +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.datasets.View.replace_backing_datasets( + view_dataset_rid, backing_datasets=backing_datasets, branch=branch, preview=preview + ) + print("The replace_backing_datasets response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling View.replace_backing_datasets: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | View | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + diff --git a/docs/v2/Datasets/models/AddBackingDatasetsRequest.md b/docs/v2/Datasets/models/AddBackingDatasetsRequest.md new file mode 100644 index 000000000..0f672d4bc --- /dev/null +++ b/docs/v2/Datasets/models/AddBackingDatasetsRequest.md @@ -0,0 +1,12 @@ +# AddBackingDatasetsRequest + +AddBackingDatasetsRequest + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**branch** | Optional[BranchName] | No | | +**backing_datasets** | List[ViewBackingDataset] | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/AddPrimaryKeyRequest.md b/docs/v2/Datasets/models/AddPrimaryKeyRequest.md new file mode 100644 index 000000000..4a8832058 --- /dev/null +++ b/docs/v2/Datasets/models/AddPrimaryKeyRequest.md @@ -0,0 +1,12 @@ +# AddPrimaryKeyRequest + +AddPrimaryKeyRequest + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**branch** | Optional[BranchName] | No | | +**primary_key** | ViewPrimaryKey | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/Branch.md b/docs/v2/Datasets/models/Branch.md new file mode 100644 index 000000000..7726b3e57 --- /dev/null +++ b/docs/v2/Datasets/models/Branch.md @@ -0,0 +1,12 @@ +# Branch + +Branch + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**name** | BranchName | Yes | | +**transaction_rid** | Optional[TransactionRid] | No | The most recent OPEN or COMMITTED transaction on the branch. This will never be an ABORTED transaction. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/BranchName.md b/docs/v2/Datasets/models/BranchName.md new file mode 100644 index 000000000..54e30ef56 --- /dev/null +++ b/docs/v2/Datasets/models/BranchName.md @@ -0,0 +1,12 @@ +# BranchName + +The name of a Branch. + + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/CreateBranchRequest.md b/docs/v2/Datasets/models/CreateBranchRequest.md new file mode 100644 index 000000000..c2019ceab --- /dev/null +++ b/docs/v2/Datasets/models/CreateBranchRequest.md @@ -0,0 +1,12 @@ +# CreateBranchRequest + +CreateBranchRequest + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**transaction_rid** | Optional[TransactionRid] | No | The most recent OPEN or COMMITTED transaction on the branch. This will never be an ABORTED transaction. | +**name** | BranchName | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/CreateDatasetRequest.md b/docs/v2/Datasets/models/CreateDatasetRequest.md new file mode 100644 index 000000000..a8a74051d --- /dev/null +++ b/docs/v2/Datasets/models/CreateDatasetRequest.md @@ -0,0 +1,12 @@ +# CreateDatasetRequest + +CreateDatasetRequest + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**parent_folder_rid** | FolderRid | Yes | | +**name** | DatasetName | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/CreateTransactionRequest.md b/docs/v2/Datasets/models/CreateTransactionRequest.md new file mode 100644 index 000000000..5ee9b07ef --- /dev/null +++ b/docs/v2/Datasets/models/CreateTransactionRequest.md @@ -0,0 +1,11 @@ +# CreateTransactionRequest + +CreateTransactionRequest + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**transaction_type** | TransactionType | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/CreateViewRequest.md b/docs/v2/Datasets/models/CreateViewRequest.md new file mode 100644 index 000000000..0d7c57894 --- /dev/null +++ b/docs/v2/Datasets/models/CreateViewRequest.md @@ -0,0 +1,15 @@ +# CreateViewRequest + +CreateViewRequest + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**parent_folder_rid** | FolderRid | Yes | | +**view_name** | DatasetName | Yes | | +**backing_datasets** | List[ViewBackingDataset] | Yes | | +**branch** | Optional[BranchName] | No | The branch name of the View. If not specified, defaults to `master` for most enrollments. | +**primary_key** | Optional[ViewPrimaryKey] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/DataframeReader.md b/docs/v2/Datasets/models/DataframeReader.md new file mode 100644 index 000000000..3ed660058 --- /dev/null +++ b/docs/v2/Datasets/models/DataframeReader.md @@ -0,0 +1,14 @@ +# DataframeReader + +The dataframe reader used for reading the dataset schema. + + +| **Value** | +| --------- | +| `"AVRO"` | +| `"CSV"` | +| `"PARQUET"` | +| `"DATASOURCE"` | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/Dataset.md b/docs/v2/Datasets/models/Dataset.md new file mode 100644 index 000000000..ab30e61ee --- /dev/null +++ b/docs/v2/Datasets/models/Dataset.md @@ -0,0 +1,13 @@ +# Dataset + +Dataset + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**rid** | DatasetRid | Yes | | +**name** | DatasetName | Yes | | +**parent_folder_rid** | FolderRid | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/DatasetName.md b/docs/v2/Datasets/models/DatasetName.md new file mode 100644 index 000000000..e9a38a11b --- /dev/null +++ b/docs/v2/Datasets/models/DatasetName.md @@ -0,0 +1,11 @@ +# DatasetName + +DatasetName + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/DatasetRid.md b/docs/v2/Datasets/models/DatasetRid.md new file mode 100644 index 000000000..86d5f357c --- /dev/null +++ b/docs/v2/Datasets/models/DatasetRid.md @@ -0,0 +1,12 @@ +# DatasetRid + +The Resource Identifier (RID) of a Dataset. + + +## Type +```python +RID +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/File.md b/docs/v2/Datasets/models/File.md new file mode 100644 index 000000000..d8cd9ea3b --- /dev/null +++ b/docs/v2/Datasets/models/File.md @@ -0,0 +1,14 @@ +# File + +File + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**path** | FilePath | Yes | | +**transaction_rid** | TransactionRid | Yes | | +**size_bytes** | Optional[Long] | No | | +**updated_time** | FileUpdatedTime | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/FileUpdatedTime.md b/docs/v2/Datasets/models/FileUpdatedTime.md new file mode 100644 index 000000000..6562c485f --- /dev/null +++ b/docs/v2/Datasets/models/FileUpdatedTime.md @@ -0,0 +1,11 @@ +# FileUpdatedTime + +FileUpdatedTime + +## Type +```python +datetime +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/GetDatasetJobsAndFilter.md b/docs/v2/Datasets/models/GetDatasetJobsAndFilter.md new file mode 100644 index 000000000..309d59769 --- /dev/null +++ b/docs/v2/Datasets/models/GetDatasetJobsAndFilter.md @@ -0,0 +1,12 @@ +# GetDatasetJobsAndFilter + +GetDatasetJobsAndFilter + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**items** | List[GetDatasetJobsQuery] | Yes | | +**type** | Literal["and"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/GetDatasetJobsComparisonType.md b/docs/v2/Datasets/models/GetDatasetJobsComparisonType.md new file mode 100644 index 000000000..17a610f8f --- /dev/null +++ b/docs/v2/Datasets/models/GetDatasetJobsComparisonType.md @@ -0,0 +1,11 @@ +# GetDatasetJobsComparisonType + +GetDatasetJobsComparisonType + +| **Value** | +| --------- | +| `"GTE"` | +| `"LT"` | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/GetDatasetJobsOrFilter.md b/docs/v2/Datasets/models/GetDatasetJobsOrFilter.md new file mode 100644 index 000000000..6b0f6f101 --- /dev/null +++ b/docs/v2/Datasets/models/GetDatasetJobsOrFilter.md @@ -0,0 +1,12 @@ +# GetDatasetJobsOrFilter + +GetDatasetJobsOrFilter + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**items** | List[GetDatasetJobsQuery] | Yes | | +**type** | Literal["or"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/GetDatasetJobsQuery.md b/docs/v2/Datasets/models/GetDatasetJobsQuery.md new file mode 100644 index 000000000..2e14a57a5 --- /dev/null +++ b/docs/v2/Datasets/models/GetDatasetJobsQuery.md @@ -0,0 +1,17 @@ +# GetDatasetJobsQuery + +Query for getting jobs on given dataset. + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +GetDatasetJobsOrFilter | or +GetDatasetJobsAndFilter | and +GetDatasetJobsTimeFilter | timeFilter + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/GetDatasetJobsRequest.md b/docs/v2/Datasets/models/GetDatasetJobsRequest.md new file mode 100644 index 000000000..2649ce874 --- /dev/null +++ b/docs/v2/Datasets/models/GetDatasetJobsRequest.md @@ -0,0 +1,12 @@ +# GetDatasetJobsRequest + +GetDatasetJobsRequest + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**where** | Optional[GetDatasetJobsQuery] | No | | +**order_by** | List[GetDatasetJobsSort] | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/GetDatasetJobsSort.md b/docs/v2/Datasets/models/GetDatasetJobsSort.md new file mode 100644 index 000000000..7c833c434 --- /dev/null +++ b/docs/v2/Datasets/models/GetDatasetJobsSort.md @@ -0,0 +1,12 @@ +# GetDatasetJobsSort + +GetDatasetJobsSort + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**sort_type** | GetDatasetJobsSortType | Yes | | +**sort_direction** | GetDatasetJobsSortDirection | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/GetDatasetJobsSortDirection.md b/docs/v2/Datasets/models/GetDatasetJobsSortDirection.md new file mode 100644 index 000000000..1470ad3d6 --- /dev/null +++ b/docs/v2/Datasets/models/GetDatasetJobsSortDirection.md @@ -0,0 +1,11 @@ +# GetDatasetJobsSortDirection + +GetDatasetJobsSortDirection + +| **Value** | +| --------- | +| `"ASCENDING"` | +| `"DESCENDING"` | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/GetDatasetJobsSortType.md b/docs/v2/Datasets/models/GetDatasetJobsSortType.md new file mode 100644 index 000000000..96b7c17d5 --- /dev/null +++ b/docs/v2/Datasets/models/GetDatasetJobsSortType.md @@ -0,0 +1,11 @@ +# GetDatasetJobsSortType + +GetDatasetJobsSortType + +| **Value** | +| --------- | +| `"BY_STARTED_TIME"` | +| `"BY_FINISHED_TIME"` | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/GetDatasetJobsTimeFilter.md b/docs/v2/Datasets/models/GetDatasetJobsTimeFilter.md new file mode 100644 index 000000000..fc07b8aa8 --- /dev/null +++ b/docs/v2/Datasets/models/GetDatasetJobsTimeFilter.md @@ -0,0 +1,14 @@ +# GetDatasetJobsTimeFilter + +GetDatasetJobsTimeFilter + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**field** | GetDatasetJobsTimeFilterField | Yes | | +**comparison_type** | GetDatasetJobsComparisonType | Yes | | +**value** | datetime | Yes | | +**type** | Literal["timeFilter"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/GetDatasetJobsTimeFilterField.md b/docs/v2/Datasets/models/GetDatasetJobsTimeFilterField.md new file mode 100644 index 000000000..6e20924d3 --- /dev/null +++ b/docs/v2/Datasets/models/GetDatasetJobsTimeFilterField.md @@ -0,0 +1,11 @@ +# GetDatasetJobsTimeFilterField + +GetDatasetJobsTimeFilterField + +| **Value** | +| --------- | +| `"SUBMITTED_TIME"` | +| `"FINISHED_TIME"` | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/GetDatasetSchemaResponse.md b/docs/v2/Datasets/models/GetDatasetSchemaResponse.md new file mode 100644 index 000000000..3c37f93d0 --- /dev/null +++ b/docs/v2/Datasets/models/GetDatasetSchemaResponse.md @@ -0,0 +1,14 @@ +# GetDatasetSchemaResponse + +GetDatasetSchemaResponse + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**branch_name** | BranchName | Yes | | +**end_transaction_rid** | TransactionRid | Yes | | +**schema_** | DatasetSchema | Yes | | +**version_id** | VersionId | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/GetJobResponse.md b/docs/v2/Datasets/models/GetJobResponse.md new file mode 100644 index 000000000..c92a3c455 --- /dev/null +++ b/docs/v2/Datasets/models/GetJobResponse.md @@ -0,0 +1,12 @@ +# GetJobResponse + +GetJobResponse + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**data** | List[JobDetails] | Yes | | +**next_page_token** | Optional[PageToken] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/GetSchemaDatasetsBatchRequestElement.md b/docs/v2/Datasets/models/GetSchemaDatasetsBatchRequestElement.md new file mode 100644 index 000000000..75fb94378 --- /dev/null +++ b/docs/v2/Datasets/models/GetSchemaDatasetsBatchRequestElement.md @@ -0,0 +1,14 @@ +# GetSchemaDatasetsBatchRequestElement + +GetSchemaDatasetsBatchRequestElement + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**end_transaction_rid** | Optional[TransactionRid] | No | The Resource Identifier (RID) of the end Transaction. If a user does not provide a value, the RID of the latest committed transaction will be used. | +**dataset_rid** | DatasetRid | Yes | | +**version_id** | Optional[VersionId] | No | The schema version that should be used. If none is provided, the latest version will be used. | +**branch_name** | Optional[BranchName] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/GetSchemaDatasetsBatchResponse.md b/docs/v2/Datasets/models/GetSchemaDatasetsBatchResponse.md new file mode 100644 index 000000000..80064d830 --- /dev/null +++ b/docs/v2/Datasets/models/GetSchemaDatasetsBatchResponse.md @@ -0,0 +1,11 @@ +# GetSchemaDatasetsBatchResponse + +GetSchemaDatasetsBatchResponse + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**data** | Dict[DatasetRid, GetDatasetSchemaResponse] | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/JobDetails.md b/docs/v2/Datasets/models/JobDetails.md new file mode 100644 index 000000000..5e10879a1 --- /dev/null +++ b/docs/v2/Datasets/models/JobDetails.md @@ -0,0 +1,11 @@ +# JobDetails + +JobDetails + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**job_rid** | JobRid | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/ListBranchesResponse.md b/docs/v2/Datasets/models/ListBranchesResponse.md new file mode 100644 index 000000000..ba485a9ce --- /dev/null +++ b/docs/v2/Datasets/models/ListBranchesResponse.md @@ -0,0 +1,12 @@ +# ListBranchesResponse + +ListBranchesResponse + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**data** | List[Branch] | Yes | | +**next_page_token** | Optional[PageToken] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/ListFilesResponse.md b/docs/v2/Datasets/models/ListFilesResponse.md new file mode 100644 index 000000000..e3e2ba815 --- /dev/null +++ b/docs/v2/Datasets/models/ListFilesResponse.md @@ -0,0 +1,12 @@ +# ListFilesResponse + +ListFilesResponse + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**data** | List[File] | Yes | | +**next_page_token** | Optional[PageToken] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/ListHealthChecksResponse.md b/docs/v2/Datasets/models/ListHealthChecksResponse.md new file mode 100644 index 000000000..0f64fd220 --- /dev/null +++ b/docs/v2/Datasets/models/ListHealthChecksResponse.md @@ -0,0 +1,11 @@ +# ListHealthChecksResponse + +ListHealthChecksResponse + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**data** | List[CheckRid] | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/ListSchedulesResponse.md b/docs/v2/Datasets/models/ListSchedulesResponse.md new file mode 100644 index 000000000..abd5dfd03 --- /dev/null +++ b/docs/v2/Datasets/models/ListSchedulesResponse.md @@ -0,0 +1,12 @@ +# ListSchedulesResponse + +ListSchedulesResponse + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**data** | List[ScheduleRid] | Yes | | +**next_page_token** | Optional[PageToken] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/ListTransactionsOfDatasetResponse.md b/docs/v2/Datasets/models/ListTransactionsOfDatasetResponse.md new file mode 100644 index 000000000..689082310 --- /dev/null +++ b/docs/v2/Datasets/models/ListTransactionsOfDatasetResponse.md @@ -0,0 +1,12 @@ +# ListTransactionsOfDatasetResponse + +ListTransactionsOfDatasetResponse + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**data** | List[Transaction] | Yes | | +**next_page_token** | Optional[PageToken] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/ListTransactionsResponse.md b/docs/v2/Datasets/models/ListTransactionsResponse.md new file mode 100644 index 000000000..0bd594d14 --- /dev/null +++ b/docs/v2/Datasets/models/ListTransactionsResponse.md @@ -0,0 +1,12 @@ +# ListTransactionsResponse + +ListTransactionsResponse + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**data** | List[Transaction] | Yes | | +**next_page_token** | Optional[PageToken] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/PrimaryKeyLatestWinsResolutionStrategy.md b/docs/v2/Datasets/models/PrimaryKeyLatestWinsResolutionStrategy.md new file mode 100644 index 000000000..c6a618f67 --- /dev/null +++ b/docs/v2/Datasets/models/PrimaryKeyLatestWinsResolutionStrategy.md @@ -0,0 +1,12 @@ +# PrimaryKeyLatestWinsResolutionStrategy + +Picks the row with the highest value of a list of columns, compared in order. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**columns** | List[str] | Yes | | +**type** | Literal["latestWins"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/PrimaryKeyResolutionDuplicate.md b/docs/v2/Datasets/models/PrimaryKeyResolutionDuplicate.md new file mode 100644 index 000000000..be39c5c31 --- /dev/null +++ b/docs/v2/Datasets/models/PrimaryKeyResolutionDuplicate.md @@ -0,0 +1,13 @@ +# PrimaryKeyResolutionDuplicate + +Duplicate primary key values may exist within the dataset – resolution required. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**deletion_column** | Optional[str] | No | The name of the boolean column that indicates whether a row should be considered deleted. Based on the `resolutionStrategy`, if the final row selected for a given primary key has `true` in this column, that row will be excluded from the results. Otherwise, it will be included. | +**resolution_strategy** | PrimaryKeyResolutionStrategy | Yes | | +**type** | Literal["duplicate"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/PrimaryKeyResolutionStrategy.md b/docs/v2/Datasets/models/PrimaryKeyResolutionStrategy.md new file mode 100644 index 000000000..c6385a501 --- /dev/null +++ b/docs/v2/Datasets/models/PrimaryKeyResolutionStrategy.md @@ -0,0 +1,11 @@ +# PrimaryKeyResolutionStrategy + +PrimaryKeyResolutionStrategy + +## Type +```python +PrimaryKeyLatestWinsResolutionStrategy +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/PrimaryKeyResolutionUnique.md b/docs/v2/Datasets/models/PrimaryKeyResolutionUnique.md new file mode 100644 index 000000000..8e9af0146 --- /dev/null +++ b/docs/v2/Datasets/models/PrimaryKeyResolutionUnique.md @@ -0,0 +1,11 @@ +# PrimaryKeyResolutionUnique + +Primary key values are unique within the dataset – no conflicts. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["unique"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/PutDatasetSchemaRequest.md b/docs/v2/Datasets/models/PutDatasetSchemaRequest.md new file mode 100644 index 000000000..0492fcf46 --- /dev/null +++ b/docs/v2/Datasets/models/PutDatasetSchemaRequest.md @@ -0,0 +1,14 @@ +# PutDatasetSchemaRequest + +PutDatasetSchemaRequest + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**branch_name** | Optional[BranchName] | No | | +**dataframe_reader** | Optional[DataframeReader] | No | The dataframe reader used for reading the dataset schema. Defaults to PARQUET. | +**end_transaction_rid** | Optional[TransactionRid] | No | The Resource Identifier (RID) of the end Transaction. | +**schema_** | DatasetSchema | Yes | The schema that will be added. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/RemoveBackingDatasetsRequest.md b/docs/v2/Datasets/models/RemoveBackingDatasetsRequest.md new file mode 100644 index 000000000..e126f6967 --- /dev/null +++ b/docs/v2/Datasets/models/RemoveBackingDatasetsRequest.md @@ -0,0 +1,12 @@ +# RemoveBackingDatasetsRequest + +RemoveBackingDatasetsRequest + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**branch** | Optional[BranchName] | No | | +**backing_datasets** | List[ViewBackingDataset] | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/ReplaceBackingDatasetsRequest.md b/docs/v2/Datasets/models/ReplaceBackingDatasetsRequest.md new file mode 100644 index 000000000..768368325 --- /dev/null +++ b/docs/v2/Datasets/models/ReplaceBackingDatasetsRequest.md @@ -0,0 +1,12 @@ +# ReplaceBackingDatasetsRequest + +ReplaceBackingDatasetsRequest + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**branch** | Optional[BranchName] | No | | +**backing_datasets** | List[ViewBackingDataset] | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/TableExportFormat.md b/docs/v2/Datasets/models/TableExportFormat.md new file mode 100644 index 000000000..d108384a4 --- /dev/null +++ b/docs/v2/Datasets/models/TableExportFormat.md @@ -0,0 +1,12 @@ +# TableExportFormat + +Format for tabular dataset export. + + +| **Value** | +| --------- | +| `"ARROW"` | +| `"CSV"` | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/Transaction.md b/docs/v2/Datasets/models/Transaction.md new file mode 100644 index 000000000..ab9990d46 --- /dev/null +++ b/docs/v2/Datasets/models/Transaction.md @@ -0,0 +1,15 @@ +# Transaction + +Transaction + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**rid** | TransactionRid | Yes | | +**transaction_type** | TransactionType | Yes | | +**status** | TransactionStatus | Yes | | +**created_time** | TransactionCreatedTime | Yes | The timestamp when the transaction was created, in ISO 8601 timestamp format. | +**closed_time** | Optional[datetime] | No | The timestamp when the transaction was closed, in ISO 8601 timestamp format. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/TransactionCreatedTime.md b/docs/v2/Datasets/models/TransactionCreatedTime.md new file mode 100644 index 000000000..94fc46eed --- /dev/null +++ b/docs/v2/Datasets/models/TransactionCreatedTime.md @@ -0,0 +1,12 @@ +# TransactionCreatedTime + +The timestamp when the transaction was created, in ISO 8601 timestamp format. + + +## Type +```python +datetime +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/TransactionRid.md b/docs/v2/Datasets/models/TransactionRid.md new file mode 100644 index 000000000..4d33f703f --- /dev/null +++ b/docs/v2/Datasets/models/TransactionRid.md @@ -0,0 +1,12 @@ +# TransactionRid + +The Resource Identifier (RID) of a Transaction. + + +## Type +```python +RID +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/TransactionStatus.md b/docs/v2/Datasets/models/TransactionStatus.md new file mode 100644 index 000000000..fd6f677d3 --- /dev/null +++ b/docs/v2/Datasets/models/TransactionStatus.md @@ -0,0 +1,13 @@ +# TransactionStatus + +The status of a Transaction. + + +| **Value** | +| --------- | +| `"ABORTED"` | +| `"COMMITTED"` | +| `"OPEN"` | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/TransactionType.md b/docs/v2/Datasets/models/TransactionType.md new file mode 100644 index 000000000..ab12c2fa4 --- /dev/null +++ b/docs/v2/Datasets/models/TransactionType.md @@ -0,0 +1,14 @@ +# TransactionType + +The type of a Transaction. + + +| **Value** | +| --------- | +| `"APPEND"` | +| `"UPDATE"` | +| `"SNAPSHOT"` | +| `"DELETE"` | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/View.md b/docs/v2/Datasets/models/View.md new file mode 100644 index 000000000..2aa73d3e8 --- /dev/null +++ b/docs/v2/Datasets/models/View.md @@ -0,0 +1,16 @@ +# View + +View + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**view_name** | DatasetName | Yes | | +**dataset_rid** | DatasetRid | Yes | The rid of the View. | +**parent_folder_rid** | FolderRid | Yes | | +**branch** | Optional[BranchName] | No | The branch name of the View. If not specified, defaults to `master` for most enrollments. | +**backing_datasets** | List[ViewBackingDataset] | Yes | | +**primary_key** | Optional[ViewPrimaryKey] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/ViewBackingDataset.md b/docs/v2/Datasets/models/ViewBackingDataset.md new file mode 100644 index 000000000..5ce3b00c0 --- /dev/null +++ b/docs/v2/Datasets/models/ViewBackingDataset.md @@ -0,0 +1,12 @@ +# ViewBackingDataset + +One of the Datasets backing a View. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**branch** | BranchName | Yes | | +**dataset_rid** | DatasetRid | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/ViewPrimaryKey.md b/docs/v2/Datasets/models/ViewPrimaryKey.md new file mode 100644 index 000000000..4224e5e0f --- /dev/null +++ b/docs/v2/Datasets/models/ViewPrimaryKey.md @@ -0,0 +1,14 @@ +# ViewPrimaryKey + +The primary key of the dataset. Primary keys are treated as guarantees provided by the creator of the +dataset. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**columns** | List[str] | Yes | The columns that constitute the primary key. These columns must satisfy the following constraints: - The list of columns must be non-empty. - The list must not contain duplicate columns after applying column normalization. - Each referenced column must exist in the schema. - The type of each referenced column must be one of the following: `BYTE`, `SHORT`, `DECIMAL`, `INTEGER`, `LONG`, `STRING`, `BOOLEAN`, `TIMESTAMP` or `DATE`. | +**resolution** | ViewPrimaryKeyResolution | Yes | The semantics of the primary key within the dataset. For example, the unique resolution means that every row in the dataset has a distinct primary key. The value of this field represents a contract for writers of the dataset. Writers are responsible for maintaining any related invariants, and readers may make optimizations based on this. Violating the assumptions of the resolution can cause undefined behavior, for example, having duplicate primary keys with the unique resolution. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Datasets/models/ViewPrimaryKeyResolution.md b/docs/v2/Datasets/models/ViewPrimaryKeyResolution.md new file mode 100644 index 000000000..132558c22 --- /dev/null +++ b/docs/v2/Datasets/models/ViewPrimaryKeyResolution.md @@ -0,0 +1,16 @@ +# ViewPrimaryKeyResolution + +Specifies how primary key conflicts are resolved within the view. + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +PrimaryKeyResolutionUnique | unique +PrimaryKeyResolutionDuplicate | duplicate + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/Folder.md b/docs/v2/Filesystem/Folder.md new file mode 100644 index 000000000..b034124aa --- /dev/null +++ b/docs/v2/Filesystem/Folder.md @@ -0,0 +1,228 @@ +# Folder + +Method | HTTP request | Release Stage | +------------- | ------------- | ----- | +[**children**](#children) | **GET** /v2/filesystem/folders/{folderRid}/children | Public Beta | +[**create**](#create) | **POST** /v2/filesystem/folders | Public Beta | +[**get**](#get) | **GET** /v2/filesystem/folders/{folderRid} | Public Beta | +[**get_batch**](#get_batch) | **POST** /v2/filesystem/folders/getBatch | Public Beta | + +# **children** +List all child Resources of the Folder. + +This is a paged endpoint. The page size will be limited to 2,000 results per page. If no page size is +provided, this page size will also be used as the default. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**folder_rid** | FolderRid | | | +**page_size** | Optional[PageSize] | The page size to use for the endpoint. | [optional] | +**page_token** | Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. | [optional] | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**ListChildrenOfFolderResponse** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# FolderRid +folder_rid = "ri.compass.main.folder.01a79a9d-e293-48db-a585-9ffe221536e8" +# Optional[PageSize] | The page size to use for the endpoint. +page_size = None +# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. +page_token = None +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + for folder in client.filesystem.Folder.children( + folder_rid, page_size=page_size, page_token=page_token, preview=preview + ): + pprint(folder) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Folder.children: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | ListChildrenOfFolderResponse | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **create** +Creates a new Folder. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**display_name** | ResourceDisplayName | | | +**parent_folder_rid** | FolderRid | The parent folder Resource Identifier (RID). For Projects, this will be the Space RID and for Spaces, this value will be the root folder (`ri.compass.main.folder.0`). | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**Folder** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# ResourceDisplayName +display_name = "My Folder" +# FolderRid | The parent folder Resource Identifier (RID). For Projects, this will be the Space RID and for Spaces, this value will be the root folder (`ri.compass.main.folder.0`). +parent_folder_rid = "ri.compass.main.folder.4cae7c13-b59f-48f6-9ef2-dbde603e4e33" +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.filesystem.Folder.create( + display_name=display_name, parent_folder_rid=parent_folder_rid, preview=preview + ) + print("The create response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Folder.create: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | Folder | The created Folder | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **get** +Get the Folder with the specified rid. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**folder_rid** | FolderRid | | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**Folder** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# FolderRid +folder_rid = "ri.compass.main.folder.01a79a9d-e293-48db-a585-9ffe221536e8" +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.filesystem.Folder.get(folder_rid, preview=preview) + print("The get response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Folder.get: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | Folder | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **get_batch** +Fetches multiple folders in a single request. + + +The maximum batch size for this endpoint is 1000. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**body** | List[GetFoldersBatchRequestElement] | Body of the request | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**GetFoldersBatchResponse** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# List[GetFoldersBatchRequestElement] | Body of the request +body = [{"folderRid": "ri.compass.main.folder.01a79a9d-e293-48db-a585-9ffe221536e8"}] +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.filesystem.Folder.get_batch(body, preview=preview) + print("The get_batch response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Folder.get_batch: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | GetFoldersBatchResponse | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + diff --git a/docs/v2/Filesystem/Project.md b/docs/v2/Filesystem/Project.md new file mode 100644 index 000000000..158b91b9a --- /dev/null +++ b/docs/v2/Filesystem/Project.md @@ -0,0 +1,437 @@ +# Project + +Method | HTTP request | Release Stage | +------------- | ------------- | ----- | +[**add_organizations**](#add_organizations) | **POST** /v2/filesystem/projects/{projectRid}/addOrganizations | Public Beta | +[**create**](#create) | **POST** /v2/filesystem/projects/create | Public Beta | +[**create_from_template**](#create_from_template) | **POST** /v2/filesystem/projects/createFromTemplate | Public Beta | +[**get**](#get) | **GET** /v2/filesystem/projects/{projectRid} | Stable | +[**organizations**](#organizations) | **GET** /v2/filesystem/projects/{projectRid}/organizations | Public Beta | +[**remove_organizations**](#remove_organizations) | **POST** /v2/filesystem/projects/{projectRid}/removeOrganizations | Public Beta | +[**replace**](#replace) | **PUT** /v2/filesystem/projects/{projectRid} | Private Beta | + +# **add_organizations** +Adds a list of Organizations to a Project. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**project_rid** | ProjectRid | | | +**organization_rids** | List[OrganizationRid] | | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**None** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# ProjectRid +project_rid = "ri.compass.main.folder.01a79a9d-e293-48db-a585-9ffe221536e8" +# List[OrganizationRid] +organization_rids = ["ri.multipass..organization.c30ee6ad-b5e4-4afe-a74f-fe4a289f2faa"] +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.filesystem.Project.add_organizations( + project_rid, organization_rids=organization_rids, preview=preview + ) + print("The add_organizations response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Project.add_organizations: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**204** | None | | None | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **create** +Creates a new Project. + +Note that third-party applications using this endpoint via OAuth2 cannot be associated with an +Ontology SDK as this will reduce the scope of operations to only those within specified projects. +When creating the application, select "No, I won't use an Ontology SDK" on the Resources page. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**default_roles** | List[RoleId] | | | +**display_name** | ResourceDisplayName | | | +**organization_rids** | List[OrganizationRid] | | | +**role_grants** | Dict[RoleId, List[PrincipalWithId]] | | | +**space_rid** | SpaceRid | | | +**description** | Optional[str] | | [optional] | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**Project** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# List[RoleId] +default_roles = ["8bf49052-dc37-4528-8bf0-b551cfb71268"] +# ResourceDisplayName +display_name = "My Important Project" +# List[OrganizationRid] +organization_rids = ["ri.multipass..organization.c30ee6ad-b5e4-4afe-a74f-fe4a289f2faa"] +# Dict[RoleId, List[PrincipalWithId]] +role_grants = { + "8bf49052-dc37-4528-8bf0-b551cfb71268": [ + {"principalId": "f05f8da4-b84c-4fca-9c77-8af0b13d11de", "principalType": "GROUP"} + ] +} +# SpaceRid +space_rid = "ri.compass.main.folder.a86ad5f5-3db5-48e4-9fdd-00aa3e5731ca" +# Optional[str] +description = "project description" +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.filesystem.Project.create( + default_roles=default_roles, + display_name=display_name, + organization_rids=organization_rids, + role_grants=role_grants, + space_rid=space_rid, + description=description, + preview=preview, + ) + print("The create response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Project.create: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | Project | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **create_from_template** +Creates a project from a project template. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**template_rid** | ProjectTemplateRid | | | +**variable_values** | Dict[ProjectTemplateVariableId, ProjectTemplateVariableValue] | | | +**default_roles** | Optional[List[RoleId]] | | [optional] | +**organization_rids** | Optional[List[OrganizationRid]] | | [optional] | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | +**project_description** | Optional[str] | | [optional] | + +### Return type +**Project** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# ProjectTemplateRid +template_rid = "ri.compass.main.template.c410f510-2937-420e-8ea3-8c9bcb3c1791" +# Dict[ProjectTemplateVariableId, ProjectTemplateVariableValue] +variable_values = {"name": "my project name"} +# Optional[List[RoleId]] +default_roles = ["8bf49052-dc37-4528-8bf0-b551cfb71268"] +# Optional[List[OrganizationRid]] +organization_rids = ["ri.multipass..organization.c30ee6ad-b5e4-4afe-a74f-fe4a289f2faa"] +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None +# Optional[str] +project_description = None + + +try: + api_response = client.filesystem.Project.create_from_template( + template_rid=template_rid, + variable_values=variable_values, + default_roles=default_roles, + organization_rids=organization_rids, + preview=preview, + project_description=project_description, + ) + print("The create_from_template response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Project.create_from_template: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | Project | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **get** +Get the Project with the specified rid. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**project_rid** | ProjectRid | | | + +### Return type +**Project** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# ProjectRid +project_rid = "ri.compass.main.folder.01a79a9d-e293-48db-a585-9ffe221536e8" + + +try: + api_response = client.filesystem.Project.get(project_rid) + print("The get response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Project.get: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | Project | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **organizations** +List of Organizations directly applied to a Project. The number of Organizations on a Project is +typically small so the `pageSize` and `pageToken` parameters are not required. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**project_rid** | ProjectRid | | | +**page_size** | Optional[PageSize] | The page size to use for the endpoint. | [optional] | +**page_token** | Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. | [optional] | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**ListOrganizationsOfProjectResponse** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# ProjectRid +project_rid = "ri.compass.main.folder.01a79a9d-e293-48db-a585-9ffe221536e8" +# Optional[PageSize] | The page size to use for the endpoint. +page_size = None +# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. +page_token = None +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + for project in client.filesystem.Project.organizations( + project_rid, page_size=page_size, page_token=page_token, preview=preview + ): + pprint(project) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Project.organizations: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | ListOrganizationsOfProjectResponse | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **remove_organizations** +Removes Organizations from a Project. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**project_rid** | ProjectRid | | | +**organization_rids** | List[OrganizationRid] | | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**None** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# ProjectRid +project_rid = "ri.compass.main.folder.01a79a9d-e293-48db-a585-9ffe221536e8" +# List[OrganizationRid] +organization_rids = ["ri.multipass..organization.c30ee6ad-b5e4-4afe-a74f-fe4a289f2faa"] +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.filesystem.Project.remove_organizations( + project_rid, organization_rids=organization_rids, preview=preview + ) + print("The remove_organizations response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Project.remove_organizations: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**204** | None | | None | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **replace** +Replace the Project with the specified rid. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**project_rid** | ProjectRid | | | +**display_name** | ResourceDisplayName | The display name of the Project. Must be unique and cannot contain a / | | +**description** | Optional[str] | The description associated with the Project. | [optional] | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**Project** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# ProjectRid +project_rid = "ri.compass.main.folder.01a79a9d-e293-48db-a585-9ffe221536e8" +# ResourceDisplayName | The display name of the Project. Must be unique and cannot contain a / +display_name = "My Important Project" +# Optional[str] | The description associated with the Project. +description = "project description" +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.filesystem.Project.replace( + project_rid, display_name=display_name, description=description, preview=preview + ) + print("The replace response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Project.replace: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | Project | The replaced Project | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + diff --git a/docs/v2/Filesystem/Resource.md b/docs/v2/Filesystem/Resource.md new file mode 100644 index 000000000..a59fc9843 --- /dev/null +++ b/docs/v2/Filesystem/Resource.md @@ -0,0 +1,604 @@ +# Resource + +Method | HTTP request | Release Stage | +------------- | ------------- | ----- | +[**add_markings**](#add_markings) | **POST** /v2/filesystem/resources/{resourceRid}/addMarkings | Public Beta | +[**delete**](#delete) | **DELETE** /v2/filesystem/resources/{resourceRid} | Public Beta | +[**get**](#get) | **GET** /v2/filesystem/resources/{resourceRid} | Public Beta | +[**get_access_requirements**](#get_access_requirements) | **GET** /v2/filesystem/resources/{resourceRid}/getAccessRequirements | Public Beta | +[**get_batch**](#get_batch) | **POST** /v2/filesystem/resources/getBatch | Public Beta | +[**get_by_path**](#get_by_path) | **GET** /v2/filesystem/resources/getByPath | Public Beta | +[**get_by_path_batch**](#get_by_path_batch) | **POST** /v2/filesystem/resources/getByPathBatch | Public Beta | +[**markings**](#markings) | **GET** /v2/filesystem/resources/{resourceRid}/markings | Public Beta | +[**permanently_delete**](#permanently_delete) | **POST** /v2/filesystem/resources/{resourceRid}/permanentlyDelete | Public Beta | +[**remove_markings**](#remove_markings) | **POST** /v2/filesystem/resources/{resourceRid}/removeMarkings | Public Beta | +[**restore**](#restore) | **POST** /v2/filesystem/resources/{resourceRid}/restore | Public Beta | + +# **add_markings** +Adds a list of Markings to a resource. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**resource_rid** | ResourceRid | | | +**marking_ids** | List[MarkingId] | | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**None** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# ResourceRid +resource_rid = "ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da" +# List[MarkingId] +marking_ids = ["18212f9a-0e63-4b79-96a0-aae04df23336"] +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.filesystem.Resource.add_markings( + resource_rid, marking_ids=marking_ids, preview=preview + ) + print("The add_markings response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Resource.add_markings: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**204** | None | | None | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **delete** +Move the given resource to the trash. Following this operation, the resource can be restored, using the +`restore` operation, or permanently deleted using the `permanentlyDelete` operation. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**resource_rid** | ResourceRid | | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**None** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# ResourceRid +resource_rid = "ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da" +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.filesystem.Resource.delete(resource_rid, preview=preview) + print("The delete response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Resource.delete: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**204** | None | | None | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **get** +Get the Resource with the specified rid. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**resource_rid** | ResourceRid | | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**Resource** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# ResourceRid +resource_rid = "ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da" +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.filesystem.Resource.get(resource_rid, preview=preview) + print("The get response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Resource.get: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | Resource | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **get_access_requirements** +Returns a list of access requirements a user needs in order to view a resource. Access requirements are +composed of Organizations and Markings, and can either be applied directly to the resource or inherited. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**resource_rid** | ResourceRid | | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**AccessRequirements** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# ResourceRid +resource_rid = "ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da" +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.filesystem.Resource.get_access_requirements(resource_rid, preview=preview) + print("The get_access_requirements response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Resource.get_access_requirements: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | AccessRequirements | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **get_batch** +Fetches multiple resources in a single request. +Returns a map from RID to the corresponding resource. If a resource does not exist, or if it is a root folder or space, its RID will not be included in the map. +At most 1,000 resources should be requested at once. + + +The maximum batch size for this endpoint is 1000. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**body** | List[GetResourcesBatchRequestElement] | Body of the request | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**GetResourcesBatchResponse** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# List[GetResourcesBatchRequestElement] | Body of the request +body = [{"resourceRid": "ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da"}] +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.filesystem.Resource.get_batch(body, preview=preview) + print("The get_batch response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Resource.get_batch: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | GetResourcesBatchResponse | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **get_by_path** +Get a Resource by its absolute path. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**path** | ResourcePath | The path to the Resource. The leading slash is optional. | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**Resource** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# ResourcePath | The path to the Resource. The leading slash is optional. +path = "/My Organization-abcd/My Important Project/My Dataset" +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.filesystem.Resource.get_by_path(path=path, preview=preview) + print("The get_by_path response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Resource.get_by_path: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | Resource | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **get_by_path_batch** +Gets multiple Resources by their absolute paths. +Returns a list of resources. If a path does not exist, is inaccessible, or refers to +a root folder or space, it will not be included in the response. +At most 1,000 paths should be requested at once. + + +The maximum batch size for this endpoint is 1000. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**body** | List[GetByPathResourcesBatchRequestElement] | Body of the request | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**GetByPathResourcesBatchResponse** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# List[GetByPathResourcesBatchRequestElement] | Body of the request +body = [{"path": "/My Organization-abcd/My Important Project/My Dataset"}] +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.filesystem.Resource.get_by_path_batch(body, preview=preview) + print("The get_by_path_batch response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Resource.get_by_path_batch: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | GetByPathResourcesBatchResponse | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **markings** +List of Markings directly applied to a resource. The number of Markings on a resource is typically small +so the `pageSize` and `pageToken` parameters are not required. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**resource_rid** | ResourceRid | | | +**page_size** | Optional[PageSize] | The page size to use for the endpoint. | [optional] | +**page_token** | Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. | [optional] | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**ListMarkingsOfResourceResponse** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# ResourceRid +resource_rid = "ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da" +# Optional[PageSize] | The page size to use for the endpoint. +page_size = None +# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. +page_token = None +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + for resource in client.filesystem.Resource.markings( + resource_rid, page_size=page_size, page_token=page_token, preview=preview + ): + pprint(resource) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Resource.markings: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | ListMarkingsOfResourceResponse | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **permanently_delete** +Permanently delete the given resource from the trash. If the Resource is not directly trashed, a +`ResourceNotTrashed` error will be thrown. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**resource_rid** | ResourceRid | | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**None** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# ResourceRid +resource_rid = "ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da" +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.filesystem.Resource.permanently_delete(resource_rid, preview=preview) + print("The permanently_delete response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Resource.permanently_delete: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**204** | None | | None | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **remove_markings** +Removes Markings from a resource. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**resource_rid** | ResourceRid | | | +**marking_ids** | List[MarkingId] | | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**None** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# ResourceRid +resource_rid = "ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da" +# List[MarkingId] +marking_ids = ["18212f9a-0e63-4b79-96a0-aae04df23336"] +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.filesystem.Resource.remove_markings( + resource_rid, marking_ids=marking_ids, preview=preview + ) + print("The remove_markings response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Resource.remove_markings: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**204** | None | | None | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **restore** +Restore the given resource and any directly trashed ancestors from the trash. If the resource is not +trashed, this operation will be ignored. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**resource_rid** | ResourceRid | | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**None** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# ResourceRid +resource_rid = "ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da" +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.filesystem.Resource.restore(resource_rid, preview=preview) + print("The restore response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Resource.restore: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**204** | None | | None | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + diff --git a/docs/v2/Filesystem/ResourceRole.md b/docs/v2/Filesystem/ResourceRole.md new file mode 100644 index 000000000..bdba7ff09 --- /dev/null +++ b/docs/v2/Filesystem/ResourceRole.md @@ -0,0 +1,185 @@ +# ResourceRole + +Method | HTTP request | Release Stage | +------------- | ------------- | ----- | +[**add**](#add) | **POST** /v2/filesystem/resources/{resourceRid}/roles/add | Stable | +[**list**](#list) | **GET** /v2/filesystem/resources/{resourceRid}/roles | Stable | +[**remove**](#remove) | **POST** /v2/filesystem/resources/{resourceRid}/roles/remove | Stable | + +# **add** + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**resource_rid** | ResourceRid | | | +**roles** | List[ResourceRoleIdentifier] | | | + +### Return type +**None** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# ResourceRid +resource_rid = "ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da" +# List[ResourceRoleIdentifier] +roles = [ + { + "resourceRolePrincipal": { + "type": "principalIdOnly", + "principalId": "f05f8da4-b84c-4fca-9c77-8af0b13d11de", + }, + "roleId": "8bf49052-dc37-4528-8bf0-b551cfb71268", + } +] + + +try: + api_response = client.filesystem.Resource.Role.add(resource_rid, roles=roles) + print("The add response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Role.add: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**204** | None | | None | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **list** +List the roles on a resource. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**resource_rid** | ResourceRid | | | +**include_inherited** | Optional[bool] | Whether to include inherited roles on the resource. | [optional] | +**page_size** | Optional[PageSize] | The page size to use for the endpoint. | [optional] | +**page_token** | Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. | [optional] | + +### Return type +**ListResourceRolesResponse** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# ResourceRid +resource_rid = "ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da" +# Optional[bool] | Whether to include inherited roles on the resource. +include_inherited = None +# Optional[PageSize] | The page size to use for the endpoint. +page_size = None +# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. +page_token = None + + +try: + for resource_role in client.filesystem.Resource.Role.list( + resource_rid, + include_inherited=include_inherited, + page_size=page_size, + page_token=page_token, + ): + pprint(resource_role) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Role.list: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | ListResourceRolesResponse | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **remove** + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**resource_rid** | ResourceRid | | | +**roles** | List[ResourceRoleIdentifier] | | | + +### Return type +**None** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# ResourceRid +resource_rid = "ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da" +# List[ResourceRoleIdentifier] +roles = [ + { + "resourceRolePrincipal": { + "type": "principalIdOnly", + "principalId": "f05f8da4-b84c-4fca-9c77-8af0b13d11de", + }, + "roleId": "8bf49052-dc37-4528-8bf0-b551cfb71268", + } +] + + +try: + api_response = client.filesystem.Resource.Role.remove(resource_rid, roles=roles) + print("The remove response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Role.remove: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**204** | None | | None | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + diff --git a/docs/v2/Filesystem/Space.md b/docs/v2/Filesystem/Space.md new file mode 100644 index 000000000..7db24496b --- /dev/null +++ b/docs/v2/Filesystem/Space.md @@ -0,0 +1,321 @@ +# Space + +Method | HTTP request | Release Stage | +------------- | ------------- | ----- | +[**create**](#create) | **POST** /v2/filesystem/spaces | Private Beta | +[**delete**](#delete) | **DELETE** /v2/filesystem/spaces/{spaceRid} | Private Beta | +[**get**](#get) | **GET** /v2/filesystem/spaces/{spaceRid} | Private Beta | +[**list**](#list) | **GET** /v2/filesystem/spaces | Public Beta | +[**replace**](#replace) | **PUT** /v2/filesystem/spaces/{spaceRid} | Private Beta | + +# **create** +Creates a new Space. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**deletion_policy_organizations** | List[OrganizationRid] | By default, this Space will use a Last Out deletion policy, meaning that this Space and its projects will be deleted when the last Organization listed here is deleted. Only Organizations in the Space's Enrollment can be included here. | | +**display_name** | ResourceDisplayName | | | +**enrollment_rid** | EnrollmentRid | The RID of the Enrollment that this Space belongs to. | | +**organizations** | List[OrganizationRid] | The list of Organizations that are provisioned access to this Space. In order to access this Space, a user must be a member of at least one of these Organizations. | | +**default_role_set_id** | Optional[RoleSetId] | The ID of the default Role Set for this Space, which defines the set of roles that Projects in this Space must use. If not provided, the default Role Set for Projects will be used. | [optional] | +**description** | Optional[str] | The description of the Space. | [optional] | +**file_system_id** | Optional[FileSystemId] | The ID of the Filesystem for this Space, which is where the contents of the Space are stored. If not provided, the default Filesystem for this Enrollment will be used. | [optional] | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | +**usage_account_rid** | Optional[UsageAccountRid] | The RID of the Usage Account for this Space. Resource usage for projects in this space will accrue to this Usage Account by default. If not provided, the default Usage Account for this Enrollment will be used. | [optional] | + +### Return type +**Space** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# List[OrganizationRid] | By default, this Space will use a Last Out deletion policy, meaning that this Space and its projects will be deleted when the last Organization listed here is deleted. Only Organizations in the Space's Enrollment can be included here. +deletion_policy_organizations = ["ri.multipass..organization.c30ee6ad-b5e4-4afe-a74f-fe4a289f2faa"] +# ResourceDisplayName +display_name = "My Space" +# EnrollmentRid | The RID of the Enrollment that this Space belongs to. +enrollment_rid = "ri.control-panel.main.customer.466f812b-f974-4478-9d4f-90402cd3def6" +# List[OrganizationRid] | The list of Organizations that are provisioned access to this Space. In order to access this Space, a user must be a member of at least one of these Organizations. +organizations = ["ri.multipass..organization.c30ee6ad-b5e4-4afe-a74f-fe4a289f2faa"] +# Optional[RoleSetId] | The ID of the default Role Set for this Space, which defines the set of roles that Projects in this Space must use. If not provided, the default Role Set for Projects will be used. +default_role_set_id = "3181190f-f6b8-4649-90ec-64fa2d847204" +# Optional[str] | The description of the Space. +description = "This space is for xyz" +# Optional[FileSystemId] | The ID of the Filesystem for this Space, which is where the contents of the Space are stored. If not provided, the default Filesystem for this Enrollment will be used. +file_system_id = "hdfs" +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None +# Optional[UsageAccountRid] | The RID of the Usage Account for this Space. Resource usage for projects in this space will accrue to this Usage Account by default. If not provided, the default Usage Account for this Enrollment will be used. +usage_account_rid = ( + "ri.resource-policy-manager.global.usage-account.0c91194d-b5e3-4c4f-b96f-7a7f3f50e95c" +) + + +try: + api_response = client.filesystem.Space.create( + deletion_policy_organizations=deletion_policy_organizations, + display_name=display_name, + enrollment_rid=enrollment_rid, + organizations=organizations, + default_role_set_id=default_role_set_id, + description=description, + file_system_id=file_system_id, + preview=preview, + usage_account_rid=usage_account_rid, + ) + print("The create response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Space.create: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | Space | The created Space | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **delete** +Delete the space. This will only work if the Space is empty, meaning any Projects or Resources have been deleted first. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**space_rid** | SpaceRid | | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**None** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# SpaceRid +space_rid = None +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.filesystem.Space.delete(space_rid, preview=preview) + print("The delete response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Space.delete: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**204** | None | | None | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **get** +Get the Space with the specified rid. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**space_rid** | SpaceRid | | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**Space** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# SpaceRid +space_rid = None +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.filesystem.Space.get(space_rid, preview=preview) + print("The get response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Space.get: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | Space | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **list** +Lists all Spaces. + +This is a paged endpoint. Each page may be smaller or larger than the requested page size. However, it is guaranteed that if there are more results available, the `nextPageToken` field will be populated. To get the next page, make the same request again, but set the value of the `pageToken` query parameter to be value of the `nextPageToken` value of the previous response. If there is no `nextPageToken` field in the response, you are on the last page. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**page_size** | Optional[PageSize] | The page size to use for the endpoint. | [optional] | +**page_token** | Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. | [optional] | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**ListSpacesResponse** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# Optional[PageSize] | The page size to use for the endpoint. +page_size = None +# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. +page_token = None +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + for space in client.filesystem.Space.list( + page_size=page_size, page_token=page_token, preview=preview + ): + pprint(space) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Space.list: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | ListSpacesResponse | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **replace** +Replace the Space with the specified rid. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**space_rid** | SpaceRid | | | +**display_name** | ResourceDisplayName | | | +**default_role_set_id** | Optional[RoleSetId] | The ID of the default Role Set for this Space, which defines the set of roles that Projects in this Space must use. If not provided, the default Role Set for Projects will be used. | [optional] | +**description** | Optional[str] | The description of the Space. | [optional] | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | +**usage_account_rid** | Optional[UsageAccountRid] | The RID of the Usage Account for this Space. Resource usage for projects in this space will accrue to this Usage Account by default. If not provided, the default Usage Account for this Enrollment will be used. | [optional] | + +### Return type +**Space** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# SpaceRid +space_rid = None +# ResourceDisplayName +display_name = "My Space" +# Optional[RoleSetId] | The ID of the default Role Set for this Space, which defines the set of roles that Projects in this Space must use. If not provided, the default Role Set for Projects will be used. +default_role_set_id = "3181190f-f6b8-4649-90ec-64fa2d847204" +# Optional[str] | The description of the Space. +description = "This space is for xyz" +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None +# Optional[UsageAccountRid] | The RID of the Usage Account for this Space. Resource usage for projects in this space will accrue to this Usage Account by default. If not provided, the default Usage Account for this Enrollment will be used. +usage_account_rid = ( + "ri.resource-policy-manager.global.usage-account.0c91194d-b5e3-4c4f-b96f-7a7f3f50e95c" +) + + +try: + api_response = client.filesystem.Space.replace( + space_rid, + display_name=display_name, + default_role_set_id=default_role_set_id, + description=description, + preview=preview, + usage_account_rid=usage_account_rid, + ) + print("The replace response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Space.replace: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | Space | The replaced Space | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + diff --git a/docs/v2/Filesystem/models/AccessRequirements.md b/docs/v2/Filesystem/models/AccessRequirements.md new file mode 100644 index 000000000..3eaeee501 --- /dev/null +++ b/docs/v2/Filesystem/models/AccessRequirements.md @@ -0,0 +1,14 @@ +# AccessRequirements + +Access requirements for a resource are composed of Markings and Organizations. Organizations are disjunctive, +while Markings are conjunctive. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**organizations** | List[Organization] | Yes | | +**markings** | List[Marking] | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/AddMarkingsRequest.md b/docs/v2/Filesystem/models/AddMarkingsRequest.md new file mode 100644 index 000000000..5497c21bb --- /dev/null +++ b/docs/v2/Filesystem/models/AddMarkingsRequest.md @@ -0,0 +1,11 @@ +# AddMarkingsRequest + +AddMarkingsRequest + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**marking_ids** | List[MarkingId] | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/AddOrganizationsRequest.md b/docs/v2/Filesystem/models/AddOrganizationsRequest.md new file mode 100644 index 000000000..6ed4d5d72 --- /dev/null +++ b/docs/v2/Filesystem/models/AddOrganizationsRequest.md @@ -0,0 +1,11 @@ +# AddOrganizationsRequest + +AddOrganizationsRequest + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**organization_rids** | List[OrganizationRid] | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/AddResourceRolesRequest.md b/docs/v2/Filesystem/models/AddResourceRolesRequest.md new file mode 100644 index 000000000..68cfe70ed --- /dev/null +++ b/docs/v2/Filesystem/models/AddResourceRolesRequest.md @@ -0,0 +1,11 @@ +# AddResourceRolesRequest + +AddResourceRolesRequest + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**roles** | List[ResourceRoleIdentifier] | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/CreateFolderRequest.md b/docs/v2/Filesystem/models/CreateFolderRequest.md new file mode 100644 index 000000000..15958e104 --- /dev/null +++ b/docs/v2/Filesystem/models/CreateFolderRequest.md @@ -0,0 +1,12 @@ +# CreateFolderRequest + +CreateFolderRequest + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**parent_folder_rid** | FolderRid | Yes | The parent folder Resource Identifier (RID). For Projects, this will be the Space RID and for Spaces, this value will be the root folder (`ri.compass.main.folder.0`). | +**display_name** | ResourceDisplayName | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/CreateProjectFromTemplateRequest.md b/docs/v2/Filesystem/models/CreateProjectFromTemplateRequest.md new file mode 100644 index 000000000..78bfa8ea4 --- /dev/null +++ b/docs/v2/Filesystem/models/CreateProjectFromTemplateRequest.md @@ -0,0 +1,15 @@ +# CreateProjectFromTemplateRequest + +CreateProjectFromTemplateRequest + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**template_rid** | ProjectTemplateRid | Yes | | +**variable_values** | Dict[ProjectTemplateVariableId, ProjectTemplateVariableValue] | Yes | | +**default_roles** | Optional[List[RoleId]] | No | | +**organization_rids** | Optional[List[OrganizationRid]] | No | | +**project_description** | Optional[str] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/CreateProjectRequest.md b/docs/v2/Filesystem/models/CreateProjectRequest.md new file mode 100644 index 000000000..f110bf5ef --- /dev/null +++ b/docs/v2/Filesystem/models/CreateProjectRequest.md @@ -0,0 +1,16 @@ +# CreateProjectRequest + +CreateProjectRequest + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**display_name** | ResourceDisplayName | Yes | | +**description** | Optional[str] | No | | +**space_rid** | SpaceRid | Yes | | +**role_grants** | Dict[RoleId, List[PrincipalWithId]] | Yes | | +**default_roles** | List[RoleId] | Yes | | +**organization_rids** | List[OrganizationRid] | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/CreateSpaceRequest.md b/docs/v2/Filesystem/models/CreateSpaceRequest.md new file mode 100644 index 000000000..518a75789 --- /dev/null +++ b/docs/v2/Filesystem/models/CreateSpaceRequest.md @@ -0,0 +1,18 @@ +# CreateSpaceRequest + +CreateSpaceRequest + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**enrollment_rid** | EnrollmentRid | Yes | The RID of the Enrollment that this Space belongs to. | +**usage_account_rid** | Optional[UsageAccountRid] | No | The RID of the Usage Account for this Space. Resource usage for projects in this space will accrue to this Usage Account by default. If not provided, the default Usage Account for this Enrollment will be used. | +**file_system_id** | Optional[FileSystemId] | No | The ID of the Filesystem for this Space, which is where the contents of the Space are stored. If not provided, the default Filesystem for this Enrollment will be used. | +**display_name** | ResourceDisplayName | Yes | | +**organizations** | List[OrganizationRid] | Yes | The list of Organizations that are provisioned access to this Space. In order to access this Space, a user must be a member of at least one of these Organizations. | +**description** | Optional[str] | No | The description of the Space. | +**deletion_policy_organizations** | List[OrganizationRid] | Yes | By default, this Space will use a Last Out deletion policy, meaning that this Space and its projects will be deleted when the last Organization listed here is deleted. Only Organizations in the Space's Enrollment can be included here. | +**default_role_set_id** | Optional[RoleSetId] | No | The ID of the default Role Set for this Space, which defines the set of roles that Projects in this Space must use. If not provided, the default Role Set for Projects will be used. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/Everyone.md b/docs/v2/Filesystem/models/Everyone.md new file mode 100644 index 000000000..1ffd40c8f --- /dev/null +++ b/docs/v2/Filesystem/models/Everyone.md @@ -0,0 +1,11 @@ +# Everyone + +A principal representing all users of the platform. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["everyone"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/FileSystemId.md b/docs/v2/Filesystem/models/FileSystemId.md new file mode 100644 index 000000000..943d93907 --- /dev/null +++ b/docs/v2/Filesystem/models/FileSystemId.md @@ -0,0 +1,11 @@ +# FileSystemId + +The ID of the filesystem that will be used for all projects in the Space. + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/Folder.md b/docs/v2/Filesystem/models/Folder.md new file mode 100644 index 000000000..976f9da3f --- /dev/null +++ b/docs/v2/Filesystem/models/Folder.md @@ -0,0 +1,24 @@ +# Folder + +Folder + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**rid** | FolderRid | Yes | | +**display_name** | ResourceDisplayName | Yes | | +**description** | Optional[str] | No | The description associated with the Folder. | +**documentation** | Optional[str] | No | The documentation associated with the Folder. | +**path** | ResourcePath | Yes | | +**type** | FolderType | Yes | | +**created_by** | CreatedBy | Yes | | +**updated_by** | UpdatedBy | Yes | | +**created_time** | CreatedTime | Yes | | +**updated_time** | UpdatedTime | Yes | | +**trash_status** | TrashStatus | Yes | The trash status of the Folder. If trashed, this could either be because the Folder itself has been trashed or because one of its ancestors has been trashed. | +**parent_folder_rid** | FolderRid | Yes | The parent folder Resource Identifier (RID). For Projects, this will be the Space RID and for Spaces, this value will be the root folder (`ri.compass.main.folder.0`). | +**project_rid** | Optional[ProjectRid] | No | The Project Resource Identifier (RID) that the Folder lives in. If the Folder is a Space, this value will not be defined. | +**space_rid** | SpaceRid | Yes | The Space Resource Identifier (RID) that the Folder lives in. If the Folder is a Space, this value will be the same as the Folder RID. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/FolderRid.md b/docs/v2/Filesystem/models/FolderRid.md new file mode 100644 index 000000000..028ea08d9 --- /dev/null +++ b/docs/v2/Filesystem/models/FolderRid.md @@ -0,0 +1,11 @@ +# FolderRid + +The unique resource identifier (RID) of a Folder. + +## Type +```python +RID +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/FolderType.md b/docs/v2/Filesystem/models/FolderType.md new file mode 100644 index 000000000..2cfe4eef9 --- /dev/null +++ b/docs/v2/Filesystem/models/FolderType.md @@ -0,0 +1,15 @@ +# FolderType + +A folder can be a regular Folder, a +[Project](https://palantir.com/docs/foundry/getting-started/projects-and-resources/#projects) or a +[Space](https://palantir.com/docs/foundry/security/orgs-and-spaces/#spaces). + + +| **Value** | +| --------- | +| `"FOLDER"` | +| `"SPACE"` | +| `"PROJECT"` | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/GetByPathResourcesBatchRequestElement.md b/docs/v2/Filesystem/models/GetByPathResourcesBatchRequestElement.md new file mode 100644 index 000000000..fefb54929 --- /dev/null +++ b/docs/v2/Filesystem/models/GetByPathResourcesBatchRequestElement.md @@ -0,0 +1,11 @@ +# GetByPathResourcesBatchRequestElement + +GetByPathResourcesBatchRequestElement + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**path** | ResourcePath | Yes | The path to the Resource. The leading slash is optional. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/GetByPathResourcesBatchResponse.md b/docs/v2/Filesystem/models/GetByPathResourcesBatchResponse.md new file mode 100644 index 000000000..f1b2bf807 --- /dev/null +++ b/docs/v2/Filesystem/models/GetByPathResourcesBatchResponse.md @@ -0,0 +1,11 @@ +# GetByPathResourcesBatchResponse + +GetByPathResourcesBatchResponse + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**data** | List[Resource] | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/GetFoldersBatchRequestElement.md b/docs/v2/Filesystem/models/GetFoldersBatchRequestElement.md new file mode 100644 index 000000000..2c8d1125c --- /dev/null +++ b/docs/v2/Filesystem/models/GetFoldersBatchRequestElement.md @@ -0,0 +1,11 @@ +# GetFoldersBatchRequestElement + +GetFoldersBatchRequestElement + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**folder_rid** | FolderRid | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/GetFoldersBatchResponse.md b/docs/v2/Filesystem/models/GetFoldersBatchResponse.md new file mode 100644 index 000000000..daa100bb3 --- /dev/null +++ b/docs/v2/Filesystem/models/GetFoldersBatchResponse.md @@ -0,0 +1,11 @@ +# GetFoldersBatchResponse + +GetFoldersBatchResponse + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**data** | Dict[FolderRid, Folder] | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/GetResourcesBatchRequestElement.md b/docs/v2/Filesystem/models/GetResourcesBatchRequestElement.md new file mode 100644 index 000000000..60696998b --- /dev/null +++ b/docs/v2/Filesystem/models/GetResourcesBatchRequestElement.md @@ -0,0 +1,11 @@ +# GetResourcesBatchRequestElement + +GetResourcesBatchRequestElement + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**resource_rid** | ResourceRid | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/GetResourcesBatchResponse.md b/docs/v2/Filesystem/models/GetResourcesBatchResponse.md new file mode 100644 index 000000000..fe0bc8172 --- /dev/null +++ b/docs/v2/Filesystem/models/GetResourcesBatchResponse.md @@ -0,0 +1,11 @@ +# GetResourcesBatchResponse + +GetResourcesBatchResponse + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**data** | Dict[ResourceRid, Resource] | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/IsDirectlyApplied.md b/docs/v2/Filesystem/models/IsDirectlyApplied.md new file mode 100644 index 000000000..5f2e66b66 --- /dev/null +++ b/docs/v2/Filesystem/models/IsDirectlyApplied.md @@ -0,0 +1,13 @@ +# IsDirectlyApplied + +Boolean flag to indicate if the marking is directly applied to the resource, or if it's applied +to a parent resource and inherited by the current resource. + + +## Type +```python +bool +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/ListChildrenOfFolderResponse.md b/docs/v2/Filesystem/models/ListChildrenOfFolderResponse.md new file mode 100644 index 000000000..ac37ac6df --- /dev/null +++ b/docs/v2/Filesystem/models/ListChildrenOfFolderResponse.md @@ -0,0 +1,12 @@ +# ListChildrenOfFolderResponse + +ListChildrenOfFolderResponse + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**data** | List[Resource] | Yes | | +**next_page_token** | Optional[PageToken] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/ListMarkingsOfResourceResponse.md b/docs/v2/Filesystem/models/ListMarkingsOfResourceResponse.md new file mode 100644 index 000000000..31cf01be8 --- /dev/null +++ b/docs/v2/Filesystem/models/ListMarkingsOfResourceResponse.md @@ -0,0 +1,12 @@ +# ListMarkingsOfResourceResponse + +ListMarkingsOfResourceResponse + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**data** | List[MarkingId] | Yes | | +**next_page_token** | Optional[PageToken] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/ListOrganizationsOfProjectResponse.md b/docs/v2/Filesystem/models/ListOrganizationsOfProjectResponse.md new file mode 100644 index 000000000..d79de029e --- /dev/null +++ b/docs/v2/Filesystem/models/ListOrganizationsOfProjectResponse.md @@ -0,0 +1,12 @@ +# ListOrganizationsOfProjectResponse + +ListOrganizationsOfProjectResponse + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**data** | List[OrganizationRid] | Yes | | +**next_page_token** | Optional[PageToken] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/ListResourceRolesResponse.md b/docs/v2/Filesystem/models/ListResourceRolesResponse.md new file mode 100644 index 000000000..d7191253f --- /dev/null +++ b/docs/v2/Filesystem/models/ListResourceRolesResponse.md @@ -0,0 +1,12 @@ +# ListResourceRolesResponse + +ListResourceRolesResponse + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**data** | List[ResourceRole] | Yes | | +**next_page_token** | Optional[PageToken] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/ListSpacesResponse.md b/docs/v2/Filesystem/models/ListSpacesResponse.md new file mode 100644 index 000000000..949359bde --- /dev/null +++ b/docs/v2/Filesystem/models/ListSpacesResponse.md @@ -0,0 +1,12 @@ +# ListSpacesResponse + +ListSpacesResponse + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**data** | List[Space] | Yes | | +**next_page_token** | Optional[PageToken] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/Marking.md b/docs/v2/Filesystem/models/Marking.md new file mode 100644 index 000000000..3dafc3f10 --- /dev/null +++ b/docs/v2/Filesystem/models/Marking.md @@ -0,0 +1,16 @@ +# Marking + +[Markings](https://palantir.com/docs/foundry/security/markings/) provide an additional level of access control for files, +folders, and Projects within Foundry. Markings define eligibility criteria that restrict visibility +and actions to users who meet those criteria. To access a resource, a user must be a member of all +Markings applied to a resource to access it. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**marking_id** | MarkingId | Yes | | +**is_directly_applied** | IsDirectlyApplied | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/Organization.md b/docs/v2/Filesystem/models/Organization.md new file mode 100644 index 000000000..1d9bb7a03 --- /dev/null +++ b/docs/v2/Filesystem/models/Organization.md @@ -0,0 +1,18 @@ +# Organization + +[Organizations](https://palantir.com/docs/foundry/security/orgs-and-spaces/#organizations) are access requirements applied to +Projects that enforce strict silos between groups of users and resources. Every user is a member of only +one Organization, but can be a guest member of multiple Organizations. In order to meet access requirements, +users must be a member or guest member of at least one Organization applied to a Project. +Organizations are inherited via the file hierarchy and direct dependencies. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**marking_id** | MarkingId | Yes | | +**organization_rid** | OrganizationRid | Yes | | +**is_directly_applied** | IsDirectlyApplied | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/PrincipalIdOnly.md b/docs/v2/Filesystem/models/PrincipalIdOnly.md new file mode 100644 index 000000000..a04af1256 --- /dev/null +++ b/docs/v2/Filesystem/models/PrincipalIdOnly.md @@ -0,0 +1,12 @@ +# PrincipalIdOnly + +Represents a principal with just an ID, without the type. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**principal_id** | PrincipalId | Yes | | +**type** | Literal["principalIdOnly"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/PrincipalWithId.md b/docs/v2/Filesystem/models/PrincipalWithId.md new file mode 100644 index 000000000..b57f96713 --- /dev/null +++ b/docs/v2/Filesystem/models/PrincipalWithId.md @@ -0,0 +1,13 @@ +# PrincipalWithId + +Represents a user principal or group principal with an ID. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**principal_id** | PrincipalId | Yes | | +**principal_type** | PrincipalType | Yes | | +**type** | Literal["principalWithId"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/Project.md b/docs/v2/Filesystem/models/Project.md new file mode 100644 index 000000000..35108ad94 --- /dev/null +++ b/docs/v2/Filesystem/models/Project.md @@ -0,0 +1,21 @@ +# Project + +Project + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**rid** | ProjectRid | Yes | | +**display_name** | ResourceDisplayName | Yes | The display name of the Project. Must be unique and cannot contain a / | +**description** | Optional[str] | No | The description associated with the Project. | +**documentation** | Optional[str] | No | The documentation associated with the Project. | +**path** | ResourcePath | Yes | | +**created_by** | CreatedBy | Yes | | +**updated_by** | UpdatedBy | Yes | | +**created_time** | CreatedTime | Yes | | +**updated_time** | UpdatedTime | Yes | | +**trash_status** | TrashStatus | Yes | The trash status of the Project. | +**space_rid** | SpaceRid | Yes | The Space Resource Identifier (RID) that the Project lives in. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/ProjectRid.md b/docs/v2/Filesystem/models/ProjectRid.md new file mode 100644 index 000000000..aea3cfd6b --- /dev/null +++ b/docs/v2/Filesystem/models/ProjectRid.md @@ -0,0 +1,11 @@ +# ProjectRid + +The unique resource identifier (RID) of a Project. + +## Type +```python +RID +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/ProjectTemplateRid.md b/docs/v2/Filesystem/models/ProjectTemplateRid.md new file mode 100644 index 000000000..0fdad97ec --- /dev/null +++ b/docs/v2/Filesystem/models/ProjectTemplateRid.md @@ -0,0 +1,11 @@ +# ProjectTemplateRid + +The unique resource identifier (RID) of a project template. + +## Type +```python +RID +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/ProjectTemplateVariableId.md b/docs/v2/Filesystem/models/ProjectTemplateVariableId.md new file mode 100644 index 000000000..bf2634f36 --- /dev/null +++ b/docs/v2/Filesystem/models/ProjectTemplateVariableId.md @@ -0,0 +1,11 @@ +# ProjectTemplateVariableId + +An identifier for a variable used in a project template. + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/ProjectTemplateVariableValue.md b/docs/v2/Filesystem/models/ProjectTemplateVariableValue.md new file mode 100644 index 000000000..d9b6d172c --- /dev/null +++ b/docs/v2/Filesystem/models/ProjectTemplateVariableValue.md @@ -0,0 +1,11 @@ +# ProjectTemplateVariableValue + +The value assigned to a variable used in a project template. + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/RemoveMarkingsRequest.md b/docs/v2/Filesystem/models/RemoveMarkingsRequest.md new file mode 100644 index 000000000..0c442d255 --- /dev/null +++ b/docs/v2/Filesystem/models/RemoveMarkingsRequest.md @@ -0,0 +1,11 @@ +# RemoveMarkingsRequest + +RemoveMarkingsRequest + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**marking_ids** | List[MarkingId] | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/RemoveOrganizationsRequest.md b/docs/v2/Filesystem/models/RemoveOrganizationsRequest.md new file mode 100644 index 000000000..e4e88fbda --- /dev/null +++ b/docs/v2/Filesystem/models/RemoveOrganizationsRequest.md @@ -0,0 +1,11 @@ +# RemoveOrganizationsRequest + +RemoveOrganizationsRequest + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**organization_rids** | List[OrganizationRid] | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/RemoveResourceRolesRequest.md b/docs/v2/Filesystem/models/RemoveResourceRolesRequest.md new file mode 100644 index 000000000..bd8a23062 --- /dev/null +++ b/docs/v2/Filesystem/models/RemoveResourceRolesRequest.md @@ -0,0 +1,11 @@ +# RemoveResourceRolesRequest + +RemoveResourceRolesRequest + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**roles** | List[ResourceRoleIdentifier] | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/ReplaceProjectRequest.md b/docs/v2/Filesystem/models/ReplaceProjectRequest.md new file mode 100644 index 000000000..7527ff53f --- /dev/null +++ b/docs/v2/Filesystem/models/ReplaceProjectRequest.md @@ -0,0 +1,12 @@ +# ReplaceProjectRequest + +ReplaceProjectRequest + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**display_name** | ResourceDisplayName | Yes | The display name of the Project. Must be unique and cannot contain a / | +**description** | Optional[str] | No | The description associated with the Project. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/ReplaceSpaceRequest.md b/docs/v2/Filesystem/models/ReplaceSpaceRequest.md new file mode 100644 index 000000000..e93715625 --- /dev/null +++ b/docs/v2/Filesystem/models/ReplaceSpaceRequest.md @@ -0,0 +1,14 @@ +# ReplaceSpaceRequest + +ReplaceSpaceRequest + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**usage_account_rid** | Optional[UsageAccountRid] | No | The RID of the Usage Account for this Space. Resource usage for projects in this space will accrue to this Usage Account by default. If not provided, the default Usage Account for this Enrollment will be used. | +**display_name** | ResourceDisplayName | Yes | | +**description** | Optional[str] | No | The description of the Space. | +**default_role_set_id** | Optional[RoleSetId] | No | The ID of the default Role Set for this Space, which defines the set of roles that Projects in this Space must use. If not provided, the default Role Set for Projects will be used. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/Resource.md b/docs/v2/Filesystem/models/Resource.md new file mode 100644 index 000000000..2cf130f62 --- /dev/null +++ b/docs/v2/Filesystem/models/Resource.md @@ -0,0 +1,24 @@ +# Resource + +Resource + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**rid** | ResourceRid | Yes | | +**display_name** | ResourceDisplayName | Yes | The display name of the Resource | +**description** | Optional[str] | No | The description of the Resource | +**documentation** | Optional[str] | No | The documentation associated with the Resource | +**path** | ResourcePath | Yes | The full path to the resource, including the resource name itself | +**type** | ResourceType | Yes | The type of the Resource derived from the Resource Identifier (RID). | +**created_by** | CreatedBy | Yes | The user that created the Resource. | +**updated_by** | UpdatedBy | Yes | The user that last updated the Resource. | +**created_time** | CreatedTime | Yes | The timestamp that the Resource was last created. | +**updated_time** | UpdatedTime | Yes | The timestamp that the Resource was last modified. For folders, this includes any of its descendants. For top level folders (spaces and projects), this is not updated by child updates for performance reasons. | +**trash_status** | TrashStatus | Yes | The trash status of the Resource. If trashed, this could either be because the Resource itself has been trashed or because one of its ancestors has been trashed. | +**parent_folder_rid** | FolderRid | Yes | The parent folder Resource Identifier (RID). For projects, this will be the Space RID. | +**project_rid** | ProjectRid | Yes | The Project Resource Identifier (RID) that the Resource lives in. If the Resource itself is a Project, this value will still be populated with the Project RID. | +**space_rid** | SpaceRid | Yes | The Space Resource Identifier (RID) that the Resource lives in. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/ResourceDisplayName.md b/docs/v2/Filesystem/models/ResourceDisplayName.md new file mode 100644 index 000000000..08fec0025 --- /dev/null +++ b/docs/v2/Filesystem/models/ResourceDisplayName.md @@ -0,0 +1,11 @@ +# ResourceDisplayName + +The display name of the Resource + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/ResourcePath.md b/docs/v2/Filesystem/models/ResourcePath.md new file mode 100644 index 000000000..45b08d0c1 --- /dev/null +++ b/docs/v2/Filesystem/models/ResourcePath.md @@ -0,0 +1,11 @@ +# ResourcePath + +The full path to the resource, including the resource name itself + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/ResourceRid.md b/docs/v2/Filesystem/models/ResourceRid.md new file mode 100644 index 000000000..747b707fb --- /dev/null +++ b/docs/v2/Filesystem/models/ResourceRid.md @@ -0,0 +1,11 @@ +# ResourceRid + +The unique resource identifier (RID) of a Resource. + +## Type +```python +RID +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/ResourceRole.md b/docs/v2/Filesystem/models/ResourceRole.md new file mode 100644 index 000000000..74d1c340a --- /dev/null +++ b/docs/v2/Filesystem/models/ResourceRole.md @@ -0,0 +1,12 @@ +# ResourceRole + +ResourceRole + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**resource_role_principal** | ResourceRolePrincipal | Yes | | +**role_id** | RoleId | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/ResourceRoleIdentifier.md b/docs/v2/Filesystem/models/ResourceRoleIdentifier.md new file mode 100644 index 000000000..1ea1e7580 --- /dev/null +++ b/docs/v2/Filesystem/models/ResourceRoleIdentifier.md @@ -0,0 +1,12 @@ +# ResourceRoleIdentifier + +A role grant on a resource for add/remove operations that doesn't require specifying the principal type. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**resource_role_principal** | ResourceRolePrincipalIdentifier | Yes | | +**role_id** | RoleId | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/ResourceRolePrincipal.md b/docs/v2/Filesystem/models/ResourceRolePrincipal.md new file mode 100644 index 000000000..df24a7d4f --- /dev/null +++ b/docs/v2/Filesystem/models/ResourceRolePrincipal.md @@ -0,0 +1,16 @@ +# ResourceRolePrincipal + +ResourceRolePrincipal + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +PrincipalWithId | principalWithId +Everyone | everyone + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/ResourceRolePrincipalIdentifier.md b/docs/v2/Filesystem/models/ResourceRolePrincipalIdentifier.md new file mode 100644 index 000000000..d07f1bd43 --- /dev/null +++ b/docs/v2/Filesystem/models/ResourceRolePrincipalIdentifier.md @@ -0,0 +1,16 @@ +# ResourceRolePrincipalIdentifier + +A principal for resource role operations that doesn't require specifying the principal type. + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +PrincipalIdOnly | principalIdOnly +Everyone | everyone + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/ResourceType.md b/docs/v2/Filesystem/models/ResourceType.md new file mode 100644 index 000000000..806871155 --- /dev/null +++ b/docs/v2/Filesystem/models/ResourceType.md @@ -0,0 +1,94 @@ +# ResourceType + +The type of the Resource derived from the Resource Identifier (RID). + +| **Value** | +| --------- | +| `"AIP_PROFILE"` | +| `"AIP_AGENTS_AGENT"` | +| `"AIP_AGENTS_SESSION"` | +| `"AIP_ASSIST_FLOW_CAPTURE"` | +| `"AIP_ASSIST_WALKTHROUGH"` | +| `"ARTIFACTS_REPOSITORY"` | +| `"BELLASO_CIPHER_CHANNEL"` | +| `"BELLASO_CIPHER_LICENSE"` | +| `"BLACKSMITH_DOCUMENT"` | +| `"BLOBSTER_ARCHIVE"` | +| `"BLOBSTER_AUDIO"` | +| `"BLOBSTER_BLOB"` | +| `"BLOBSTER_CODE"` | +| `"BLOBSTER_CONFIGURATION"` | +| `"BLOBSTER_DOCUMENT"` | +| `"BLOBSTER_IMAGE"` | +| `"BLOBSTER_JUPYTERNOTEBOOK"` | +| `"BLOBSTER_PDF"` | +| `"BLOBSTER_PRESENTATION"` | +| `"BLOBSTER_SPREADSHEET"` | +| `"BLOBSTER_VIDEO"` | +| `"BLOBSTER_XML"` | +| `"CARBON_WORKSPACE"` | +| `"COMPASS_FOLDER"` | +| `"COMPASS_WEB_LINK"` | +| `"CONTOUR_ANALYSIS"` | +| `"DATA_HEALTH_MONITORING_VIEW"` | +| `"DECISIONS_EXPLORATION"` | +| `"DREDDIE_PIPELINE"` | +| `"EDDIE_LOGIC"` | +| `"EDDIE_PIPELINE"` | +| `"FFORMS_FORM"` | +| `"FLOW_WORKFLOW"` | +| `"FOUNDRY_DATASET"` | +| `"FOUNDRY_DEPLOYED_APP"` | +| `"FOUNDRY_ACADEMY_TUTORIAL"` | +| `"FOUNDRY_CONTAINER_SERVICE_CONTAINER"` | +| `"FOUNDRY_ML_OBJECTIVE"` | +| `"FOUNDRY_TEMPLATES_TEMPLATE"` | +| `"FUSION_DOCUMENT"` | +| `"GEOTIME_CATALOG_INTEGRATION"` | +| `"GPS_VIEW"` | +| `"HUBBLE_EXPLORATION_LAYOUT"` | +| `"HYPERAUTO_INTEGRATION"` | +| `"LOGIC_FLOWS_CONNECTED_FLOW"` | +| `"MACHINERY_DOCUMENT"` | +| `"MAGRITTE_AGENT"` | +| `"MAGRITTE_DRIVER"` | +| `"MAGRITTE_EXPORT"` | +| `"MAGRITTE_SOURCE"` | +| `"MARKETPLACE_BLOCK_SET_INSTALLATION"` | +| `"MARKETPLACE_BLOCK_SET_REPO"` | +| `"MARKETPLACE_LOCAL"` | +| `"MARKETPLACE_REMOTE_STORE"` | +| `"MIO_MEDIA_SET"` | +| `"MODELS_MODEL"` | +| `"MODELS_MODEL_VERSION"` | +| `"MONOCLE_GRAPH"` | +| `"NOTEPAD_NOTEPAD"` | +| `"NOTEPAD_NOTEPAD_TEMPLATE"` | +| `"OBJECT_SENTINEL_MONITOR"` | +| `"OBJECT_SET_VERSIONED_OBJECT_SET"` | +| `"OPUS_GRAPH"` | +| `"OPUS_GRAPH_TEMPLATE"` | +| `"OPUS_MAP"` | +| `"OPUS_MAP_LAYER"` | +| `"OPUS_MAP_TEMPLATE"` | +| `"OPUS_SEARCH_AROUND"` | +| `"QUIVER_ANALYSIS"` | +| `"QUIVER_ARTIFACT"` | +| `"QUIVER_DASHBOARD"` | +| `"QUIVER_FUNCTION"` | +| `"QUIVER_OBJECT_SET_PATH"` | +| `"REPORT_REPORT"` | +| `"SLATE_DOCUMENT"` | +| `"SOLUTION_DESIGN_DIAGRAM"` | +| `"STEMMA_REPOSITORY"` | +| `"TABLES_TABLE"` | +| `"TAURUS_WORKFLOW"` | +| `"THIRD_PARTY_APPLICATIONS_APPLICATION"` | +| `"TIME_SERIES_CATALOG_SYNC"` | +| `"VECTOR_TEMPLATE"` | +| `"VECTOR_WORKBOOK"` | +| `"WORKSHOP_MODULE"` | +| `"WORKSHOP_STATE"` | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/Space.md b/docs/v2/Filesystem/models/Space.md new file mode 100644 index 000000000..0ccdee34f --- /dev/null +++ b/docs/v2/Filesystem/models/Space.md @@ -0,0 +1,20 @@ +# Space + +Space + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**rid** | SpaceRid | Yes | | +**display_name** | ResourceDisplayName | Yes | | +**description** | Optional[str] | No | The description of the Space. | +**path** | ResourcePath | Yes | | +**file_system_id** | FileSystemId | Yes | The ID of the Filesystem for this Space, which is where the contents of the Space are stored. If not provided, the default Filesystem for this Enrollment will be used. | +**usage_account_rid** | UsageAccountRid | Yes | The RID of the Usage Account for this Space. Resource usage for projects in this space will accrue to this Usage Account by default. If not provided, the default Usage Account for this Enrollment will be used. | +**organizations** | List[OrganizationRid] | Yes | The list of Organizations that are provisioned access to this Space. In order to access this Space, a user must be a member of at least one of these Organizations. | +**deletion_policy_organizations** | List[OrganizationRid] | Yes | By default, this Space will use a Last Out deletion policy, meaning that this Space and its projects will be deleted when the last Organization listed here is deleted. Only Organizations in the Space's Enrollment can be included here. | +**default_role_set_id** | RoleSetId | Yes | The ID of the default Role Set for this Space, which defines the set of roles that Projects in this Space must use. If not provided, the default Role Set for Projects will be used. | +**space_maven_identifier** | Optional[SpaceMavenIdentifier] | No | The maven identifier used as the prefix to the maven coordinate that uniquely identifies resources published from this space. This is only present if configured in control panel in the space settings. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/SpaceMavenIdentifier.md b/docs/v2/Filesystem/models/SpaceMavenIdentifier.md new file mode 100644 index 000000000..00f1a5f3a --- /dev/null +++ b/docs/v2/Filesystem/models/SpaceMavenIdentifier.md @@ -0,0 +1,12 @@ +# SpaceMavenIdentifier + +The maven identifier used as the prefix to the maven coordinate that uniquely identifies resources published from this space. + + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/SpaceRid.md b/docs/v2/Filesystem/models/SpaceRid.md new file mode 100644 index 000000000..ab1669a51 --- /dev/null +++ b/docs/v2/Filesystem/models/SpaceRid.md @@ -0,0 +1,11 @@ +# SpaceRid + +The unique resource identifier (RID) of a Space. + +## Type +```python +RID +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/TrashStatus.md b/docs/v2/Filesystem/models/TrashStatus.md new file mode 100644 index 000000000..2a81d0fa5 --- /dev/null +++ b/docs/v2/Filesystem/models/TrashStatus.md @@ -0,0 +1,12 @@ +# TrashStatus + +TrashStatus + +| **Value** | +| --------- | +| `"DIRECTLY_TRASHED"` | +| `"ANCESTOR_TRASHED"` | +| `"NOT_TRASHED"` | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Filesystem/models/UsageAccountRid.md b/docs/v2/Filesystem/models/UsageAccountRid.md new file mode 100644 index 000000000..8aab252ac --- /dev/null +++ b/docs/v2/Filesystem/models/UsageAccountRid.md @@ -0,0 +1,12 @@ +# UsageAccountRid + +The unique resource identifier (RID) of the usage account that will be used as a default on project creation. + + +## Type +```python +RID +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/Query.md b/docs/v2/Functions/Query.md new file mode 100644 index 000000000..6143356fd --- /dev/null +++ b/docs/v2/Functions/Query.md @@ -0,0 +1,306 @@ +# Query + +Method | HTTP request | Release Stage | +------------- | ------------- | ----- | +[**execute**](#execute) | **POST** /v2/functions/queries/{queryApiName}/execute | Private Beta | +[**get**](#get) | **GET** /v2/functions/queries/{queryApiName} | Private Beta | +[**get_by_rid**](#get_by_rid) | **POST** /v2/functions/queries/getByRid | Private Beta | +[**streaming_execute**](#streaming_execute) | **POST** /v2/functions/queries/{queryApiName}/streamingExecute | Private Beta | + +# **execute** +Executes a Query using the given parameters. By default, this executes the latest version of the query. + +This endpoint is maintained for backward compatibility only. + +For all new implementations, use the `streamingExecute` endpoint, which supports all function types +and provides enhanced functionality. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**query_api_name** | QueryApiName | | | +**parameters** | Dict[ParameterId, Optional[DataValue]] | | | +**attribution** | Optional[Attribution] | | [optional] | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | +**trace_parent** | Optional[TraceParent] | | [optional] | +**trace_state** | Optional[TraceState] | | [optional] | +**transaction_id** | Optional[TransactionId] | The ID of a transaction to read from. Transactions are an experimental feature and all workflows may not be supported. | [optional] | +**version** | Optional[FunctionVersion] | | [optional] | + +### Return type +**ExecuteQueryResponse** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# QueryApiName +query_api_name = None +# Dict[ParameterId, Optional[DataValue]] +parameters = None +# Optional[Attribution] +attribution = None +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None +# Optional[TraceParent] +trace_parent = None +# Optional[TraceState] +trace_state = None +# Optional[TransactionId] | The ID of a transaction to read from. Transactions are an experimental feature and all workflows may not be supported. +transaction_id = None +# Optional[FunctionVersion] +version = None + + +try: + api_response = client.functions.Query.execute( + query_api_name, + parameters=parameters, + attribution=attribution, + preview=preview, + trace_parent=trace_parent, + trace_state=trace_state, + transaction_id=transaction_id, + version=version, + ) + print("The execute response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Query.execute: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | ExecuteQueryResponse | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **get** +Gets a specific query type with the given API name. By default, this gets the latest version of the query. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**query_api_name** | QueryApiName | | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | +**version** | Optional[FunctionVersion] | | [optional] | + +### Return type +**Query** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# QueryApiName +query_api_name = None +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None +# Optional[FunctionVersion] +version = None + + +try: + api_response = client.functions.Query.get(query_api_name, preview=preview, version=version) + print("The get response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Query.get: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | Query | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **get_by_rid** +Gets a specific query type with the given RID.By default, this gets the latest version of the query. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**rid** | FunctionRid | | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | +**version** | Optional[FunctionVersion] | | [optional] | + +### Return type +**Query** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# FunctionRid +rid = None +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None +# Optional[FunctionVersion] +version = None + + +try: + api_response = client.functions.Query.get_by_rid(rid=rid, preview=preview, version=version) + print("The get_by_rid response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Query.get_by_rid: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | Query | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **streaming_execute** +Executes a Query using the given parameters, returning results as an NDJSON stream. By default, this executes the latest version of the query. + +This endpoint supports all Query functions. The endpoint name 'streamingExecute' refers to the NDJSON +streaming response format. Both streaming and non-streaming functions can use this endpoint. +Non-streaming functions return a single-line NDJSON response, while streaming functions return multi-line NDJSON responses. +This is the recommended endpoint for all query execution. + +The response is returned as a binary stream in NDJSON (Newline Delimited JSON) format, where each line +is a StreamingExecuteQueryResponse containing either a data batch or an error. + +For a function returning a list of 5 records with a batch size of 3, the response stream would contain +two lines. The first line contains the first 3 items, and the second line contains the remaining 2 items: + +``` +{"type":"data","value":[{"productId":"SKU-001","price":29.99},{"productId":"SKU-002","price":49.99},{"productId":"SKU-003","price":19.99}]} +{"type":"data","value":[{"productId":"SKU-004","price":39.99},{"productId":"SKU-005","price":59.99}]} +``` + +Each line is a separate JSON object followed by a newline character. Clients should parse the stream +line-by-line to process results as they arrive. If an error occurs during execution, the stream will +contain an error line: + +``` +{"type":"error","errorCode":"INVALID_ARGUMENT","errorName":"QueryRuntimeError","errorInstanceId":"3f8a9c7b-2e4d-4a1f-9b8c-7d6e5f4a3b2c","errorDescription":"Division by zero","parameters":{}} +``` + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**query_api_name** | QueryApiName | | | +**parameters** | Dict[ParameterId, Optional[DataValue]] | | | +**attribution** | Optional[Attribution] | | [optional] | +**ontology** | Optional[OntologyIdentifier] | Optional ontology identifier (RID or API name). When provided, executes an ontology-scoped function. When omitted, executes a global function. | [optional] | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | +**trace_parent** | Optional[TraceParent] | | [optional] | +**trace_state** | Optional[TraceState] | | [optional] | +**transaction_id** | Optional[TransactionId] | The ID of a transaction to read from. Transactions are an experimental feature and all workflows may not be supported. | [optional] | +**version** | Optional[FunctionVersion] | | [optional] | + +### Return type +**bytes** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# QueryApiName +query_api_name = None +# Dict[ParameterId, Optional[DataValue]] +parameters = None +# Optional[Attribution] +attribution = None +# Optional[OntologyIdentifier] | Optional ontology identifier (RID or API name). When provided, executes an ontology-scoped function. When omitted, executes a global function. +ontology = "example-ontology" +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None +# Optional[TraceParent] +trace_parent = None +# Optional[TraceState] +trace_state = None +# Optional[TransactionId] | The ID of a transaction to read from. Transactions are an experimental feature and all workflows may not be supported. +transaction_id = None +# Optional[FunctionVersion] +version = None + + +try: + api_response = client.functions.Query.streaming_execute( + query_api_name, + parameters=parameters, + attribution=attribution, + ontology=ontology, + preview=preview, + trace_parent=trace_parent, + trace_state=trace_state, + transaction_id=transaction_id, + version=version, + ) + print("The streaming_execute response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Query.streaming_execute: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | bytes | | application/octet-stream | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + diff --git a/docs/v2/Functions/ValueType.md b/docs/v2/Functions/ValueType.md new file mode 100644 index 000000000..690f3d313 --- /dev/null +++ b/docs/v2/Functions/ValueType.md @@ -0,0 +1,57 @@ +# ValueType + +Method | HTTP request | Release Stage | +------------- | ------------- | ----- | +[**get**](#get) | **GET** /v2/functions/valueTypes/{valueTypeRid} | Private Beta | + +# **get** +Gets a specific value type with the given RID. The latest version is returned. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**value_type_rid** | ValueTypeRid | | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**ValueType** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# ValueTypeRid +value_type_rid = None +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.functions.ValueType.get(value_type_rid, preview=preview) + print("The get response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling ValueType.get: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | ValueType | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + diff --git a/docs/v2/Functions/VersionId.md b/docs/v2/Functions/VersionId.md new file mode 100644 index 000000000..63712bc86 --- /dev/null +++ b/docs/v2/Functions/VersionId.md @@ -0,0 +1,62 @@ +# VersionId + +Method | HTTP request | Release Stage | +------------- | ------------- | ----- | +[**get**](#get) | **GET** /v2/functions/valueTypes/{valueTypeRid}/versionIds/{versionIdVersionId} | Private Beta | + +# **get** +Gets a specific value type with the given RID. The specified version is returned. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**value_type_rid** | ValueTypeRid | | | +**version_id_version_id** | ValueTypeVersionId | | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**VersionId** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# ValueTypeRid +value_type_rid = None +# ValueTypeVersionId +version_id_version_id = None +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.functions.ValueType.VersionId.get( + value_type_rid, version_id_version_id, preview=preview + ) + print("The get response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling VersionId.get: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | VersionId | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + diff --git a/docs/v2/Functions/models/ArrayConstraint.md b/docs/v2/Functions/models/ArrayConstraint.md new file mode 100644 index 000000000..3097e6e5a --- /dev/null +++ b/docs/v2/Functions/models/ArrayConstraint.md @@ -0,0 +1,15 @@ +# ArrayConstraint + +ArrayConstraint + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**minimum_size** | Optional[int] | No | | +**maximum_size** | Optional[int] | No | | +**unique_values** | bool | Yes | | +**value_constraint** | Optional[ValueTypeConstraint] | No | | +**type** | Literal["array"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/DataValue.md b/docs/v2/Functions/models/DataValue.md new file mode 100644 index 000000000..090ea1b58 --- /dev/null +++ b/docs/v2/Functions/models/DataValue.md @@ -0,0 +1,33 @@ +# DataValue + +Represents the value of data in the following format. Note that these values can be nested, for example an array of structs. +| Type | JSON encoding | Example | +|-----------------------------|-------------------------------------------------------|-------------------------------------------------------------------------------| +| Array | array | `["alpha", "bravo", "charlie"]` | +| Attachment | string | `"ri.attachments.main.attachment.2f944bae-5851-4204-8615-920c969a9f2e"` | +| Boolean | boolean | `true` | +| Byte | number | `31` | +| Date | ISO 8601 extended local date string | `"2021-05-01"` | +| Decimal | string | `"2.718281828"` | +| Float | number | `3.14159265` | +| Double | number | `3.14159265` | +| Integer | number | `238940` | +| Long | string | `"58319870951433"` | +| Marking | string | `"MU"` | +| Null | null | `null` | +| Set | array | `["alpha", "bravo", "charlie"]` | +| Short | number | `8739` | +| String | string | `"Call me Ishmael"` | +| Struct | JSON object | `{"name": "John Doe", "age": 42}` | +| TwoDimensionalAggregation | JSON object | `{"groups": [{"key": "alpha", "value": 100}, {"key": "beta", "value": 101}]}` | +| ThreeDimensionalAggregation | JSON object | `{"groups": [{"key": "NYC", "groups": [{"key": "Engineer", "value" : 100}]}]}`| +| Timestamp | ISO 8601 extended offset date-time string in UTC zone | `"2021-01-04T05:00:00Z"` | + + +## Type +```python +Any +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/EnumConstraint.md b/docs/v2/Functions/models/EnumConstraint.md new file mode 100644 index 000000000..51e637f21 --- /dev/null +++ b/docs/v2/Functions/models/EnumConstraint.md @@ -0,0 +1,12 @@ +# EnumConstraint + +EnumConstraint + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**options** | List[Any] | Yes | | +**type** | Literal["enum"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/ExecuteQueryRequest.md b/docs/v2/Functions/models/ExecuteQueryRequest.md new file mode 100644 index 000000000..ea991ef7b --- /dev/null +++ b/docs/v2/Functions/models/ExecuteQueryRequest.md @@ -0,0 +1,12 @@ +# ExecuteQueryRequest + +ExecuteQueryRequest + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**parameters** | Dict[ParameterId, Optional[DataValue]] | Yes | | +**version** | Optional[FunctionVersion] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/ExecuteQueryResponse.md b/docs/v2/Functions/models/ExecuteQueryResponse.md new file mode 100644 index 000000000..7fb620232 --- /dev/null +++ b/docs/v2/Functions/models/ExecuteQueryResponse.md @@ -0,0 +1,11 @@ +# ExecuteQueryResponse + +ExecuteQueryResponse + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**value** | DataValue | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/FunctionRid.md b/docs/v2/Functions/models/FunctionRid.md new file mode 100644 index 000000000..2ea837619 --- /dev/null +++ b/docs/v2/Functions/models/FunctionRid.md @@ -0,0 +1,12 @@ +# FunctionRid + +The unique resource identifier of a Function, useful for interacting with other Foundry APIs. + + +## Type +```python +RID +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/FunctionVersion.md b/docs/v2/Functions/models/FunctionVersion.md new file mode 100644 index 000000000..7a8f4565f --- /dev/null +++ b/docs/v2/Functions/models/FunctionVersion.md @@ -0,0 +1,13 @@ +# FunctionVersion + +The version of the given Function, written `..-`, where `-` is optional. +Examples: `1.2.3`, `1.2.3-rc1`. + + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/GetByRidQueriesRequest.md b/docs/v2/Functions/models/GetByRidQueriesRequest.md new file mode 100644 index 000000000..cfdcd34a7 --- /dev/null +++ b/docs/v2/Functions/models/GetByRidQueriesRequest.md @@ -0,0 +1,12 @@ +# GetByRidQueriesRequest + +GetByRidQueriesRequest + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**rid** | FunctionRid | Yes | | +**version** | Optional[FunctionVersion] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/LengthConstraint.md b/docs/v2/Functions/models/LengthConstraint.md new file mode 100644 index 000000000..16b94131d --- /dev/null +++ b/docs/v2/Functions/models/LengthConstraint.md @@ -0,0 +1,13 @@ +# LengthConstraint + +LengthConstraint + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**minimum_length** | Optional[int] | No | | +**maximum_length** | Optional[int] | No | | +**type** | Literal["length"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/MapConstraint.md b/docs/v2/Functions/models/MapConstraint.md new file mode 100644 index 000000000..140ea9286 --- /dev/null +++ b/docs/v2/Functions/models/MapConstraint.md @@ -0,0 +1,14 @@ +# MapConstraint + +MapConstraint + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**key_constraints** | List[ValueTypeConstraint] | Yes | | +**value_constraints** | List[ValueTypeConstraint] | Yes | | +**unique_values** | bool | Yes | | +**type** | Literal["map"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/NullableConstraint.md b/docs/v2/Functions/models/NullableConstraint.md new file mode 100644 index 000000000..bb3416520 --- /dev/null +++ b/docs/v2/Functions/models/NullableConstraint.md @@ -0,0 +1,12 @@ +# NullableConstraint + +NullableConstraint + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**value** | NullableConstraintValue | Yes | | +**type** | Literal["nullable"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/NullableConstraintValue.md b/docs/v2/Functions/models/NullableConstraintValue.md new file mode 100644 index 000000000..a417b031d --- /dev/null +++ b/docs/v2/Functions/models/NullableConstraintValue.md @@ -0,0 +1,11 @@ +# NullableConstraintValue + +NullableConstraintValue + +| **Value** | +| --------- | +| `"NULLABLE"` | +| `"NOT_NULLABLE"` | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/Parameter.md b/docs/v2/Functions/models/Parameter.md new file mode 100644 index 000000000..d90aaa77c --- /dev/null +++ b/docs/v2/Functions/models/Parameter.md @@ -0,0 +1,12 @@ +# Parameter + +Details about a parameter of a query. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**description** | Optional[str] | No | | +**data_type** | QueryDataType | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/ParameterId.md b/docs/v2/Functions/models/ParameterId.md new file mode 100644 index 000000000..b6c2637d9 --- /dev/null +++ b/docs/v2/Functions/models/ParameterId.md @@ -0,0 +1,13 @@ +# ParameterId + +The unique identifier of the parameter. Parameters are used as inputs when an action or query is applied. +Parameters can be viewed and managed in the **Ontology Manager**. + + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/Query.md b/docs/v2/Functions/models/Query.md new file mode 100644 index 000000000..09a2f24e9 --- /dev/null +++ b/docs/v2/Functions/models/Query.md @@ -0,0 +1,17 @@ +# Query + +Query + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**api_name** | QueryApiName | Yes | | +**description** | Optional[str] | No | | +**display_name** | Optional[DisplayName] | No | | +**parameters** | Dict[ParameterId, Parameter] | Yes | | +**output** | QueryDataType | Yes | | +**rid** | FunctionRid | Yes | | +**version** | FunctionVersion | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/QueryAggregationKeyType.md b/docs/v2/Functions/models/QueryAggregationKeyType.md new file mode 100644 index 000000000..af8af64a8 --- /dev/null +++ b/docs/v2/Functions/models/QueryAggregationKeyType.md @@ -0,0 +1,22 @@ +# QueryAggregationKeyType + +A union of all the types supported by query aggregation keys. + + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +DateType | date +BooleanType | boolean +StringType | string +DoubleType | double +QueryAggregationRangeType | range +IntegerType | integer +TimestampType | timestamp + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/QueryAggregationRangeSubType.md b/docs/v2/Functions/models/QueryAggregationRangeSubType.md new file mode 100644 index 000000000..b2b007348 --- /dev/null +++ b/docs/v2/Functions/models/QueryAggregationRangeSubType.md @@ -0,0 +1,19 @@ +# QueryAggregationRangeSubType + +A union of all the types supported by query aggregation ranges. + + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +DateType | date +DoubleType | double +IntegerType | integer +TimestampType | timestamp + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/QueryAggregationRangeType.md b/docs/v2/Functions/models/QueryAggregationRangeType.md new file mode 100644 index 000000000..8f7de1558 --- /dev/null +++ b/docs/v2/Functions/models/QueryAggregationRangeType.md @@ -0,0 +1,12 @@ +# QueryAggregationRangeType + +QueryAggregationRangeType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**sub_type** | QueryAggregationRangeSubType | Yes | | +**type** | Literal["range"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/QueryAggregationValueType.md b/docs/v2/Functions/models/QueryAggregationValueType.md new file mode 100644 index 000000000..7802d4da2 --- /dev/null +++ b/docs/v2/Functions/models/QueryAggregationValueType.md @@ -0,0 +1,18 @@ +# QueryAggregationValueType + +A union of all the types supported by query aggregation keys. + + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +DateType | date +DoubleType | double +TimestampType | timestamp + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/QueryApiName.md b/docs/v2/Functions/models/QueryApiName.md new file mode 100644 index 000000000..49568ce9c --- /dev/null +++ b/docs/v2/Functions/models/QueryApiName.md @@ -0,0 +1,11 @@ +# QueryApiName + +The name of the Query in the API. + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/QueryArrayType.md b/docs/v2/Functions/models/QueryArrayType.md new file mode 100644 index 000000000..ef02cc331 --- /dev/null +++ b/docs/v2/Functions/models/QueryArrayType.md @@ -0,0 +1,12 @@ +# QueryArrayType + +QueryArrayType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**sub_type** | QueryDataType | Yes | | +**type** | Literal["array"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/QueryDataType.md b/docs/v2/Functions/models/QueryDataType.md new file mode 100644 index 000000000..64d25e6c7 --- /dev/null +++ b/docs/v2/Functions/models/QueryDataType.md @@ -0,0 +1,33 @@ +# QueryDataType + +A union of all the types supported by Query parameters or outputs. + + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +DateType | date +QueryStructType | struct +QuerySetType | set +StringType | string +DoubleType | double +IntegerType | integer +ThreeDimensionalAggregation | threeDimensionalAggregation +QueryUnionType | union +FloatType | float +LongType | long +BooleanType | boolean +UnsupportedType | unsupported +AttachmentType | attachment +NullType | null +QueryArrayType | array +TwoDimensionalAggregation | twoDimensionalAggregation +ValueTypeReference | valueTypeReference +TimestampType | timestamp + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/QueryRuntimeErrorParameter.md b/docs/v2/Functions/models/QueryRuntimeErrorParameter.md new file mode 100644 index 000000000..09eb0af3d --- /dev/null +++ b/docs/v2/Functions/models/QueryRuntimeErrorParameter.md @@ -0,0 +1,11 @@ +# QueryRuntimeErrorParameter + +QueryRuntimeErrorParameter + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/QuerySetType.md b/docs/v2/Functions/models/QuerySetType.md new file mode 100644 index 000000000..786ad8345 --- /dev/null +++ b/docs/v2/Functions/models/QuerySetType.md @@ -0,0 +1,12 @@ +# QuerySetType + +QuerySetType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**sub_type** | QueryDataType | Yes | | +**type** | Literal["set"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/QueryStructField.md b/docs/v2/Functions/models/QueryStructField.md new file mode 100644 index 000000000..0e7bc858d --- /dev/null +++ b/docs/v2/Functions/models/QueryStructField.md @@ -0,0 +1,12 @@ +# QueryStructField + +QueryStructField + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**name** | StructFieldName | Yes | | +**field_type** | QueryDataType | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/QueryStructType.md b/docs/v2/Functions/models/QueryStructType.md new file mode 100644 index 000000000..9ccbb0860 --- /dev/null +++ b/docs/v2/Functions/models/QueryStructType.md @@ -0,0 +1,12 @@ +# QueryStructType + +QueryStructType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**fields** | List[QueryStructField] | Yes | | +**type** | Literal["struct"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/QueryUnionType.md b/docs/v2/Functions/models/QueryUnionType.md new file mode 100644 index 000000000..a1b15ebbf --- /dev/null +++ b/docs/v2/Functions/models/QueryUnionType.md @@ -0,0 +1,12 @@ +# QueryUnionType + +QueryUnionType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**union_types** | List[QueryDataType] | Yes | | +**type** | Literal["union"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/RangesConstraint.md b/docs/v2/Functions/models/RangesConstraint.md new file mode 100644 index 000000000..581ec838d --- /dev/null +++ b/docs/v2/Functions/models/RangesConstraint.md @@ -0,0 +1,13 @@ +# RangesConstraint + +RangesConstraint + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**minimum_value** | Optional[Any] | No | | +**maximum_value** | Optional[Any] | No | | +**type** | Literal["range"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/RegexConstraint.md b/docs/v2/Functions/models/RegexConstraint.md new file mode 100644 index 000000000..e7b88446b --- /dev/null +++ b/docs/v2/Functions/models/RegexConstraint.md @@ -0,0 +1,13 @@ +# RegexConstraint + +RegexConstraint + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**pattern** | str | Yes | | +**partial_match** | bool | Yes | | +**type** | Literal["regex"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/RidConstraint.md b/docs/v2/Functions/models/RidConstraint.md new file mode 100644 index 000000000..468b55174 --- /dev/null +++ b/docs/v2/Functions/models/RidConstraint.md @@ -0,0 +1,11 @@ +# RidConstraint + +RidConstraint + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["rid"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/StreamingExecuteQueryRequest.md b/docs/v2/Functions/models/StreamingExecuteQueryRequest.md new file mode 100644 index 000000000..ba799beb5 --- /dev/null +++ b/docs/v2/Functions/models/StreamingExecuteQueryRequest.md @@ -0,0 +1,13 @@ +# StreamingExecuteQueryRequest + +StreamingExecuteQueryRequest + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**ontology** | Optional[OntologyIdentifier] | No | Optional ontology identifier (RID or API name). When provided, executes an ontology-scoped function. When omitted, executes a global function. | +**parameters** | Dict[ParameterId, Optional[DataValue]] | Yes | | +**version** | Optional[FunctionVersion] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/StructConstraint.md b/docs/v2/Functions/models/StructConstraint.md new file mode 100644 index 000000000..4f3c6542a --- /dev/null +++ b/docs/v2/Functions/models/StructConstraint.md @@ -0,0 +1,12 @@ +# StructConstraint + +StructConstraint + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**fields** | Dict[StructFieldApiName, ValueTypeApiName] | Yes | | +**type** | Literal["struct"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/StructFieldApiName.md b/docs/v2/Functions/models/StructFieldApiName.md new file mode 100644 index 000000000..621630006 --- /dev/null +++ b/docs/v2/Functions/models/StructFieldApiName.md @@ -0,0 +1,11 @@ +# StructFieldApiName + +StructFieldApiName + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/StructFieldName.md b/docs/v2/Functions/models/StructFieldName.md new file mode 100644 index 000000000..eb543b79e --- /dev/null +++ b/docs/v2/Functions/models/StructFieldName.md @@ -0,0 +1,12 @@ +# StructFieldName + +The name of a field in a `Struct`. + + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/StructV1Constraint.md b/docs/v2/Functions/models/StructV1Constraint.md new file mode 100644 index 000000000..ebd39d1c5 --- /dev/null +++ b/docs/v2/Functions/models/StructV1Constraint.md @@ -0,0 +1,12 @@ +# StructV1Constraint + +StructV1Constraint + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**fields** | Dict[StructFieldApiName, ValueTypeConstraint] | Yes | | +**type** | Literal["structV1"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/ThreeDimensionalAggregation.md b/docs/v2/Functions/models/ThreeDimensionalAggregation.md new file mode 100644 index 000000000..9fb4c0c8a --- /dev/null +++ b/docs/v2/Functions/models/ThreeDimensionalAggregation.md @@ -0,0 +1,13 @@ +# ThreeDimensionalAggregation + +ThreeDimensionalAggregation + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**key_type** | QueryAggregationKeyType | Yes | | +**value_type** | TwoDimensionalAggregation | Yes | | +**type** | Literal["threeDimensionalAggregation"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/TransactionId.md b/docs/v2/Functions/models/TransactionId.md new file mode 100644 index 000000000..85d0fe5f9 --- /dev/null +++ b/docs/v2/Functions/models/TransactionId.md @@ -0,0 +1,11 @@ +# TransactionId + +The ID identifying a transaction. + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/TwoDimensionalAggregation.md b/docs/v2/Functions/models/TwoDimensionalAggregation.md new file mode 100644 index 000000000..b6f42990d --- /dev/null +++ b/docs/v2/Functions/models/TwoDimensionalAggregation.md @@ -0,0 +1,13 @@ +# TwoDimensionalAggregation + +TwoDimensionalAggregation + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**key_type** | QueryAggregationKeyType | Yes | | +**value_type** | QueryAggregationValueType | Yes | | +**type** | Literal["twoDimensionalAggregation"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/UuidConstraint.md b/docs/v2/Functions/models/UuidConstraint.md new file mode 100644 index 000000000..7007ce41c --- /dev/null +++ b/docs/v2/Functions/models/UuidConstraint.md @@ -0,0 +1,11 @@ +# UuidConstraint + +UuidConstraint + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["uuid"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/ValueType.md b/docs/v2/Functions/models/ValueType.md new file mode 100644 index 000000000..08d1a497c --- /dev/null +++ b/docs/v2/Functions/models/ValueType.md @@ -0,0 +1,18 @@ +# ValueType + +ValueType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**rid** | ValueTypeRid | Yes | | +**version** | ValueTypeVersion | Yes | | +**version_id** | ValueTypeVersionId | Yes | | +**api_name** | ValueTypeApiName | Yes | | +**display_name** | DisplayName | Yes | | +**description** | Optional[ValueTypeDescription] | No | | +**base_type** | Optional[ValueTypeDataType] | No | | +**constraints** | List[ValueTypeConstraint] | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/ValueTypeApiName.md b/docs/v2/Functions/models/ValueTypeApiName.md new file mode 100644 index 000000000..29f46d948 --- /dev/null +++ b/docs/v2/Functions/models/ValueTypeApiName.md @@ -0,0 +1,11 @@ +# ValueTypeApiName + +The registered API name for the value type. + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/ValueTypeConstraint.md b/docs/v2/Functions/models/ValueTypeConstraint.md new file mode 100644 index 000000000..71d42a4b8 --- /dev/null +++ b/docs/v2/Functions/models/ValueTypeConstraint.md @@ -0,0 +1,25 @@ +# ValueTypeConstraint + +ValueTypeConstraint + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +StructConstraint | struct +StructV1Constraint | structV1 +RegexConstraint | regex +NullableConstraint | nullable +ArrayConstraint | array +LengthConstraint | length +RangesConstraint | range +RidConstraint | rid +MapConstraint | map +UuidConstraint | uuid +EnumConstraint | enum + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/ValueTypeDataType.md b/docs/v2/Functions/models/ValueTypeDataType.md new file mode 100644 index 000000000..28e33dee9 --- /dev/null +++ b/docs/v2/Functions/models/ValueTypeDataType.md @@ -0,0 +1,33 @@ +# ValueTypeDataType + +The underlying base type of a value type. + + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +ValueTypeDataTypeDateType | date +ValueTypeDataTypeStructType | struct +ValueTypeDataTypeStringType | string +ValueTypeDataTypeByteType | byte +ValueTypeDataTypeDoubleType | double +ValueTypeDataTypeOptionalType | optional +ValueTypeDataTypeIntegerType | integer +ValueTypeDataTypeUnionType | union +ValueTypeDataTypeFloatType | float +ValueTypeDataTypeLongType | long +ValueTypeDataTypeBooleanType | boolean +ValueTypeDataTypeArrayType | array +ValueTypeDataTypeBinaryType | binary +ValueTypeDataTypeValueTypeReference | valueTypeReference +ValueTypeDataTypeShortType | short +ValueTypeDataTypeDecimalType | decimal +ValueTypeDataTypeMapType | map +ValueTypeDataTypeTimestampType | timestamp + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/ValueTypeDataTypeArrayType.md b/docs/v2/Functions/models/ValueTypeDataTypeArrayType.md new file mode 100644 index 000000000..61446dbc6 --- /dev/null +++ b/docs/v2/Functions/models/ValueTypeDataTypeArrayType.md @@ -0,0 +1,12 @@ +# ValueTypeDataTypeArrayType + +ValueTypeDataTypeArrayType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**sub_type** | ValueTypeDataType | Yes | | +**type** | Literal["array"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/ValueTypeDataTypeBinaryType.md b/docs/v2/Functions/models/ValueTypeDataTypeBinaryType.md new file mode 100644 index 000000000..81078f78b --- /dev/null +++ b/docs/v2/Functions/models/ValueTypeDataTypeBinaryType.md @@ -0,0 +1,11 @@ +# ValueTypeDataTypeBinaryType + +ValueTypeDataTypeBinaryType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["binary"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/ValueTypeDataTypeBooleanType.md b/docs/v2/Functions/models/ValueTypeDataTypeBooleanType.md new file mode 100644 index 000000000..27547f840 --- /dev/null +++ b/docs/v2/Functions/models/ValueTypeDataTypeBooleanType.md @@ -0,0 +1,11 @@ +# ValueTypeDataTypeBooleanType + +ValueTypeDataTypeBooleanType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["boolean"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/ValueTypeDataTypeByteType.md b/docs/v2/Functions/models/ValueTypeDataTypeByteType.md new file mode 100644 index 000000000..4931e3fbd --- /dev/null +++ b/docs/v2/Functions/models/ValueTypeDataTypeByteType.md @@ -0,0 +1,11 @@ +# ValueTypeDataTypeByteType + +ValueTypeDataTypeByteType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["byte"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/ValueTypeDataTypeDateType.md b/docs/v2/Functions/models/ValueTypeDataTypeDateType.md new file mode 100644 index 000000000..f3f0f4ca3 --- /dev/null +++ b/docs/v2/Functions/models/ValueTypeDataTypeDateType.md @@ -0,0 +1,11 @@ +# ValueTypeDataTypeDateType + +ValueTypeDataTypeDateType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["date"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/ValueTypeDataTypeDecimalType.md b/docs/v2/Functions/models/ValueTypeDataTypeDecimalType.md new file mode 100644 index 000000000..d7a750a37 --- /dev/null +++ b/docs/v2/Functions/models/ValueTypeDataTypeDecimalType.md @@ -0,0 +1,11 @@ +# ValueTypeDataTypeDecimalType + +ValueTypeDataTypeDecimalType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["decimal"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/ValueTypeDataTypeDoubleType.md b/docs/v2/Functions/models/ValueTypeDataTypeDoubleType.md new file mode 100644 index 000000000..70ca5ac08 --- /dev/null +++ b/docs/v2/Functions/models/ValueTypeDataTypeDoubleType.md @@ -0,0 +1,11 @@ +# ValueTypeDataTypeDoubleType + +ValueTypeDataTypeDoubleType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["double"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/ValueTypeDataTypeFloatType.md b/docs/v2/Functions/models/ValueTypeDataTypeFloatType.md new file mode 100644 index 000000000..21c984d4c --- /dev/null +++ b/docs/v2/Functions/models/ValueTypeDataTypeFloatType.md @@ -0,0 +1,11 @@ +# ValueTypeDataTypeFloatType + +ValueTypeDataTypeFloatType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["float"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/ValueTypeDataTypeIntegerType.md b/docs/v2/Functions/models/ValueTypeDataTypeIntegerType.md new file mode 100644 index 000000000..e9263c83a --- /dev/null +++ b/docs/v2/Functions/models/ValueTypeDataTypeIntegerType.md @@ -0,0 +1,11 @@ +# ValueTypeDataTypeIntegerType + +ValueTypeDataTypeIntegerType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["integer"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/ValueTypeDataTypeLongType.md b/docs/v2/Functions/models/ValueTypeDataTypeLongType.md new file mode 100644 index 000000000..5c97c7461 --- /dev/null +++ b/docs/v2/Functions/models/ValueTypeDataTypeLongType.md @@ -0,0 +1,11 @@ +# ValueTypeDataTypeLongType + +ValueTypeDataTypeLongType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["long"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/ValueTypeDataTypeMapType.md b/docs/v2/Functions/models/ValueTypeDataTypeMapType.md new file mode 100644 index 000000000..41402b655 --- /dev/null +++ b/docs/v2/Functions/models/ValueTypeDataTypeMapType.md @@ -0,0 +1,13 @@ +# ValueTypeDataTypeMapType + +ValueTypeDataTypeMapType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**key_type** | ValueTypeDataType | Yes | | +**value_type** | ValueTypeDataType | Yes | | +**type** | Literal["map"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/ValueTypeDataTypeOptionalType.md b/docs/v2/Functions/models/ValueTypeDataTypeOptionalType.md new file mode 100644 index 000000000..9c8acc618 --- /dev/null +++ b/docs/v2/Functions/models/ValueTypeDataTypeOptionalType.md @@ -0,0 +1,12 @@ +# ValueTypeDataTypeOptionalType + +ValueTypeDataTypeOptionalType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**wrapped_type** | ValueTypeDataType | Yes | | +**type** | Literal["optional"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/ValueTypeDataTypeShortType.md b/docs/v2/Functions/models/ValueTypeDataTypeShortType.md new file mode 100644 index 000000000..1c5a2bd4f --- /dev/null +++ b/docs/v2/Functions/models/ValueTypeDataTypeShortType.md @@ -0,0 +1,11 @@ +# ValueTypeDataTypeShortType + +ValueTypeDataTypeShortType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["short"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/ValueTypeDataTypeStringType.md b/docs/v2/Functions/models/ValueTypeDataTypeStringType.md new file mode 100644 index 000000000..278d1c47a --- /dev/null +++ b/docs/v2/Functions/models/ValueTypeDataTypeStringType.md @@ -0,0 +1,11 @@ +# ValueTypeDataTypeStringType + +ValueTypeDataTypeStringType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["string"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/ValueTypeDataTypeStructElement.md b/docs/v2/Functions/models/ValueTypeDataTypeStructElement.md new file mode 100644 index 000000000..92c1868a0 --- /dev/null +++ b/docs/v2/Functions/models/ValueTypeDataTypeStructElement.md @@ -0,0 +1,12 @@ +# ValueTypeDataTypeStructElement + +ValueTypeDataTypeStructElement + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**name** | ValueTypeDataTypeStructFieldIdentifier | Yes | | +**field_type** | ValueTypeDataType | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/ValueTypeDataTypeStructFieldIdentifier.md b/docs/v2/Functions/models/ValueTypeDataTypeStructFieldIdentifier.md new file mode 100644 index 000000000..3119cbb0e --- /dev/null +++ b/docs/v2/Functions/models/ValueTypeDataTypeStructFieldIdentifier.md @@ -0,0 +1,11 @@ +# ValueTypeDataTypeStructFieldIdentifier + +ValueTypeDataTypeStructFieldIdentifier + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/ValueTypeDataTypeStructType.md b/docs/v2/Functions/models/ValueTypeDataTypeStructType.md new file mode 100644 index 000000000..68b6dc656 --- /dev/null +++ b/docs/v2/Functions/models/ValueTypeDataTypeStructType.md @@ -0,0 +1,12 @@ +# ValueTypeDataTypeStructType + +ValueTypeDataTypeStructType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**fields** | List[ValueTypeDataTypeStructElement] | Yes | | +**type** | Literal["struct"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/ValueTypeDataTypeTimestampType.md b/docs/v2/Functions/models/ValueTypeDataTypeTimestampType.md new file mode 100644 index 000000000..0063f3bc0 --- /dev/null +++ b/docs/v2/Functions/models/ValueTypeDataTypeTimestampType.md @@ -0,0 +1,11 @@ +# ValueTypeDataTypeTimestampType + +ValueTypeDataTypeTimestampType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["timestamp"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/ValueTypeDataTypeUnionType.md b/docs/v2/Functions/models/ValueTypeDataTypeUnionType.md new file mode 100644 index 000000000..00ea08797 --- /dev/null +++ b/docs/v2/Functions/models/ValueTypeDataTypeUnionType.md @@ -0,0 +1,12 @@ +# ValueTypeDataTypeUnionType + +ValueTypeDataTypeUnionType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**member_types** | List[ValueTypeDataType] | Yes | | +**type** | Literal["union"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/ValueTypeDataTypeValueTypeReference.md b/docs/v2/Functions/models/ValueTypeDataTypeValueTypeReference.md new file mode 100644 index 000000000..050f004ad --- /dev/null +++ b/docs/v2/Functions/models/ValueTypeDataTypeValueTypeReference.md @@ -0,0 +1,13 @@ +# ValueTypeDataTypeValueTypeReference + +ValueTypeDataTypeValueTypeReference + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**rid** | ValueTypeRid | Yes | | +**version_id** | ValueTypeVersionId | Yes | | +**type** | Literal["valueTypeReference"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/ValueTypeDescription.md b/docs/v2/Functions/models/ValueTypeDescription.md new file mode 100644 index 000000000..f89c54856 --- /dev/null +++ b/docs/v2/Functions/models/ValueTypeDescription.md @@ -0,0 +1,12 @@ +# ValueTypeDescription + +A description of the value type. + + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/ValueTypeReference.md b/docs/v2/Functions/models/ValueTypeReference.md new file mode 100644 index 000000000..e6cdfe144 --- /dev/null +++ b/docs/v2/Functions/models/ValueTypeReference.md @@ -0,0 +1,14 @@ +# ValueTypeReference + +A reference to a value type that has been registered in the Ontology. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**rid** | ValueTypeRid | Yes | | +**version_id** | ValueTypeVersionId | Yes | | +**type** | Literal["valueTypeReference"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/ValueTypeRid.md b/docs/v2/Functions/models/ValueTypeRid.md new file mode 100644 index 000000000..08c167c48 --- /dev/null +++ b/docs/v2/Functions/models/ValueTypeRid.md @@ -0,0 +1,12 @@ +# ValueTypeRid + +The RID of a value type that has been registered in the Ontology. + + +## Type +```python +RID +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/ValueTypeVersion.md b/docs/v2/Functions/models/ValueTypeVersion.md new file mode 100644 index 000000000..ba690a2fb --- /dev/null +++ b/docs/v2/Functions/models/ValueTypeVersion.md @@ -0,0 +1,12 @@ +# ValueTypeVersion + +The version of a value type that has been registered in the Ontology. + + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/ValueTypeVersionId.md b/docs/v2/Functions/models/ValueTypeVersionId.md new file mode 100644 index 000000000..d3aa13f86 --- /dev/null +++ b/docs/v2/Functions/models/ValueTypeVersionId.md @@ -0,0 +1,12 @@ +# ValueTypeVersionId + +The version ID of a value type that has been registered in the Ontology. + + +## Type +```python +UUID +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Functions/models/VersionId.md b/docs/v2/Functions/models/VersionId.md new file mode 100644 index 000000000..34017e41b --- /dev/null +++ b/docs/v2/Functions/models/VersionId.md @@ -0,0 +1,18 @@ +# VersionId + +VersionId + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**rid** | ValueTypeRid | Yes | | +**version** | ValueTypeVersion | Yes | | +**version_id** | ValueTypeVersionId | Yes | | +**api_name** | ValueTypeApiName | Yes | | +**display_name** | DisplayName | Yes | | +**description** | Optional[ValueTypeDescription] | No | | +**base_type** | Optional[ValueTypeDataType] | No | | +**constraints** | List[ValueTypeConstraint] | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Geo/models/BBox.md b/docs/v2/Geo/models/BBox.md new file mode 100644 index 000000000..b21a5fece --- /dev/null +++ b/docs/v2/Geo/models/BBox.md @@ -0,0 +1,18 @@ +# BBox + +A GeoJSON object MAY have a member named "bbox" to include +information on the coordinate range for its Geometries, Features, or +FeatureCollections. The value of the bbox member MUST be an array of +length 2*n where n is the number of dimensions represented in the +contained geometries, with all axes of the most southwesterly point +followed by all axes of the more northeasterly point. The axes order +of a bbox follows the axes order of geometries. + + +## Type +```python +List[Coordinate] +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Geo/models/Coordinate.md b/docs/v2/Geo/models/Coordinate.md new file mode 100644 index 000000000..9d199b901 --- /dev/null +++ b/docs/v2/Geo/models/Coordinate.md @@ -0,0 +1,11 @@ +# Coordinate + +Coordinate + +## Type +```python +float +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Geo/models/Feature.md b/docs/v2/Geo/models/Feature.md new file mode 100644 index 000000000..69200f1db --- /dev/null +++ b/docs/v2/Geo/models/Feature.md @@ -0,0 +1,15 @@ +# Feature + +GeoJSon 'Feature' object + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**geometry** | Optional[Geometry] | No | | +**properties** | Dict[FeaturePropertyKey, Any] | Yes | A `Feature` object has a member with the name "properties". The value of the properties member is an object (any JSON object or a JSON null value). | +**id** | Optional[Any] | No | If a `Feature` has a commonly used identifier, that identifier SHOULD be included as a member of the Feature object with the name "id", and the value of this member is either a JSON string or number. | +**bbox** | Optional[BBox] | No | | +**type** | Literal["Feature"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Geo/models/FeatureCollection.md b/docs/v2/Geo/models/FeatureCollection.md new file mode 100644 index 000000000..32c1cbfd6 --- /dev/null +++ b/docs/v2/Geo/models/FeatureCollection.md @@ -0,0 +1,13 @@ +# FeatureCollection + +GeoJSon 'FeatureCollection' object + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**features** | List[FeatureCollectionTypes] | Yes | | +**bbox** | Optional[BBox] | No | | +**type** | Literal["FeatureCollection"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Geo/models/FeatureCollectionTypes.md b/docs/v2/Geo/models/FeatureCollectionTypes.md new file mode 100644 index 000000000..ec5044cfd --- /dev/null +++ b/docs/v2/Geo/models/FeatureCollectionTypes.md @@ -0,0 +1,11 @@ +# FeatureCollectionTypes + +FeatureCollectionTypes + +## Type +```python +Feature +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Geo/models/FeaturePropertyKey.md b/docs/v2/Geo/models/FeaturePropertyKey.md new file mode 100644 index 000000000..540fb31cb --- /dev/null +++ b/docs/v2/Geo/models/FeaturePropertyKey.md @@ -0,0 +1,11 @@ +# FeaturePropertyKey + +FeaturePropertyKey + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Geo/models/GeoPoint.md b/docs/v2/Geo/models/GeoPoint.md new file mode 100644 index 000000000..5f99fa3a2 --- /dev/null +++ b/docs/v2/Geo/models/GeoPoint.md @@ -0,0 +1,13 @@ +# GeoPoint + +GeoPoint + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**coordinates** | Position | Yes | | +**bbox** | Optional[BBox] | No | | +**type** | Literal["Point"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Geo/models/Geometry.md b/docs/v2/Geo/models/Geometry.md new file mode 100644 index 000000000..93604237f --- /dev/null +++ b/docs/v2/Geo/models/Geometry.md @@ -0,0 +1,21 @@ +# Geometry + +Abstract type for all GeoJSon object except Feature and FeatureCollection + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +MultiPoint | MultiPoint +GeometryCollection | GeometryCollection +MultiLineString | MultiLineString +LineString | LineString +MultiPolygon | MultiPolygon +GeoPoint | Point +Polygon | Polygon + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Geo/models/GeometryCollection.md b/docs/v2/Geo/models/GeometryCollection.md new file mode 100644 index 000000000..e1c5bd7f2 --- /dev/null +++ b/docs/v2/Geo/models/GeometryCollection.md @@ -0,0 +1,19 @@ +# GeometryCollection + +GeoJSon geometry collection + +GeometryCollections composed of a single part or a number of parts of a +single type SHOULD be avoided when that single part or a single object +of multipart type (MultiPoint, MultiLineString, or MultiPolygon) could +be used instead. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**geometries** | List[Geometry] | Yes | | +**bbox** | Optional[BBox] | No | | +**type** | Literal["GeometryCollection"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Geo/models/LineString.md b/docs/v2/Geo/models/LineString.md new file mode 100644 index 000000000..d3da889a5 --- /dev/null +++ b/docs/v2/Geo/models/LineString.md @@ -0,0 +1,13 @@ +# LineString + +LineString + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**coordinates** | Optional[LineStringCoordinates] | No | | +**bbox** | Optional[BBox] | No | | +**type** | Literal["LineString"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Geo/models/LineStringCoordinates.md b/docs/v2/Geo/models/LineStringCoordinates.md new file mode 100644 index 000000000..cd467cedc --- /dev/null +++ b/docs/v2/Geo/models/LineStringCoordinates.md @@ -0,0 +1,12 @@ +# LineStringCoordinates + +GeoJSon fundamental geometry construct, array of two or more positions. + + +## Type +```python +List[Position] +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Geo/models/LinearRing.md b/docs/v2/Geo/models/LinearRing.md new file mode 100644 index 000000000..e03df8635 --- /dev/null +++ b/docs/v2/Geo/models/LinearRing.md @@ -0,0 +1,22 @@ +# LinearRing + +A linear ring is a closed LineString with four or more positions. + +The first and last positions are equivalent, and they MUST contain +identical values; their representation SHOULD also be identical. + +A linear ring is the boundary of a surface or the boundary of a hole in +a surface. + +A linear ring MUST follow the right-hand rule with respect to the area +it bounds, i.e., exterior rings are counterclockwise, and holes are +clockwise. + + +## Type +```python +List[Position] +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Geo/models/MultiLineString.md b/docs/v2/Geo/models/MultiLineString.md new file mode 100644 index 000000000..8cd380083 --- /dev/null +++ b/docs/v2/Geo/models/MultiLineString.md @@ -0,0 +1,13 @@ +# MultiLineString + +MultiLineString + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**coordinates** | List[LineStringCoordinates] | Yes | | +**bbox** | Optional[BBox] | No | | +**type** | Literal["MultiLineString"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Geo/models/MultiPoint.md b/docs/v2/Geo/models/MultiPoint.md new file mode 100644 index 000000000..20c67ad6b --- /dev/null +++ b/docs/v2/Geo/models/MultiPoint.md @@ -0,0 +1,13 @@ +# MultiPoint + +MultiPoint + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**coordinates** | List[Position] | Yes | | +**bbox** | Optional[BBox] | No | | +**type** | Literal["MultiPoint"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Geo/models/MultiPolygon.md b/docs/v2/Geo/models/MultiPolygon.md new file mode 100644 index 000000000..b1920b1aa --- /dev/null +++ b/docs/v2/Geo/models/MultiPolygon.md @@ -0,0 +1,13 @@ +# MultiPolygon + +MultiPolygon + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**coordinates** | List[List[LinearRing]] | Yes | | +**bbox** | Optional[BBox] | No | | +**type** | Literal["MultiPolygon"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Geo/models/Polygon.md b/docs/v2/Geo/models/Polygon.md new file mode 100644 index 000000000..01331aef5 --- /dev/null +++ b/docs/v2/Geo/models/Polygon.md @@ -0,0 +1,13 @@ +# Polygon + +Polygon + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**coordinates** | List[LinearRing] | Yes | | +**bbox** | Optional[BBox] | No | | +**type** | Literal["Polygon"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Geo/models/Position.md b/docs/v2/Geo/models/Position.md new file mode 100644 index 000000000..3c7820381 --- /dev/null +++ b/docs/v2/Geo/models/Position.md @@ -0,0 +1,25 @@ +# Position + +GeoJSon fundamental geometry construct. + +A position is an array of numbers. There MUST be two or more elements. +The first two elements are longitude and latitude, precisely in that order and using decimal numbers. +Altitude or elevation MAY be included as an optional third element. + +Implementations SHOULD NOT extend positions beyond three elements +because the semantics of extra elements are unspecified and ambiguous. +Historically, some implementations have used a fourth element to carry +a linear referencing measure (sometimes denoted as "M") or a numerical +timestamp, but in most situations a parser will not be able to properly +interpret these values. The interpretation and meaning of additional +elements is beyond the scope of this specification, and additional +elements MAY be ignored by parsers. + + +## Type +```python +List[Coordinate] +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/AnthropicModel.md b/docs/v2/LanguageModels/AnthropicModel.md new file mode 100644 index 000000000..224ff5b73 --- /dev/null +++ b/docs/v2/LanguageModels/AnthropicModel.md @@ -0,0 +1,103 @@ +# AnthropicModel + +Method | HTTP request | Release Stage | +------------- | ------------- | ----- | +[**messages**](#messages) | **POST** /v2/languageModels/anthropic/{anthropicModelModelId}/messages | Private Beta | + +# **messages** + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**anthropic_model_model_id** | LanguageModelApiName | | | +**max_tokens** | int | The maximum number of tokens to generate before stopping. | | +**messages** | List[AnthropicMessage] | Input messages to the model. This can include a single user-role message or multiple messages with alternating user and assistant roles. | | +**attribution** | Optional[Attribution] | | [optional] | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | +**stop_sequences** | Optional[List[str]] | Custom text sequences that will cause the model to stop generating. | [optional] | +**system** | Optional[List[AnthropicSystemMessage]] | A system prompt is a way of providing context and instructions to Claude, such as specifying a particular goal or role. As of now, sending multiple system prompts is not supported. | [optional] | +**temperature** | Optional[float] | Amount of randomness injected into the response. Ranges from 0.0 to 1.0. Note that even with temperature of 0.0, the results will not be fully deterministic. Defaults to 1.0 | [optional] | +**thinking** | Optional[AnthropicThinkingConfig] | Configuration for enabling Claude's extended thinking. | [optional] | +**tool_choice** | Optional[AnthropicToolChoice] | How the model should use the provided tools. | [optional] | +**tools** | Optional[List[AnthropicTool]] | Definitions of tools that the model may use. | [optional] | +**top_k** | Optional[int] | Only sample from the top K options for each subsequent token. | [optional] | +**top_p** | Optional[float] | Use nucleus sampling. You should either alter temperature or top_p, but not both | [optional] | + +### Return type +**AnthropicMessagesResponse** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# LanguageModelApiName +anthropic_model_model_id = None +# int | The maximum number of tokens to generate before stopping. +max_tokens = None +# List[AnthropicMessage] | Input messages to the model. This can include a single user-role message or multiple messages with alternating user and assistant roles. +messages = [{"role": "USER"}] +# Optional[Attribution] +attribution = None +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None +# Optional[List[str]] | Custom text sequences that will cause the model to stop generating. +stop_sequences = None +# Optional[List[AnthropicSystemMessage]] | A system prompt is a way of providing context and instructions to Claude, such as specifying a particular goal or role. As of now, sending multiple system prompts is not supported. +system = None +# Optional[float] | Amount of randomness injected into the response. Ranges from 0.0 to 1.0. Note that even with temperature of 0.0, the results will not be fully deterministic. Defaults to 1.0 +temperature = None +# Optional[AnthropicThinkingConfig] | Configuration for enabling Claude's extended thinking. +thinking = None +# Optional[AnthropicToolChoice] | How the model should use the provided tools. +tool_choice = None +# Optional[List[AnthropicTool]] | Definitions of tools that the model may use. +tools = None +# Optional[int] | Only sample from the top K options for each subsequent token. +top_k = None +# Optional[float] | Use nucleus sampling. You should either alter temperature or top_p, but not both +top_p = None + + +try: + api_response = client.language_models.AnthropicModel.messages( + anthropic_model_model_id, + max_tokens=max_tokens, + messages=messages, + attribution=attribution, + preview=preview, + stop_sequences=stop_sequences, + system=system, + temperature=temperature, + thinking=thinking, + tool_choice=tool_choice, + tools=tools, + top_k=top_k, + top_p=top_p, + ) + print("The messages response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling AnthropicModel.messages: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | AnthropicMessagesResponse | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + diff --git a/docs/v2/LanguageModels/OpenAiModel.md b/docs/v2/LanguageModels/OpenAiModel.md new file mode 100644 index 000000000..c56e387c2 --- /dev/null +++ b/docs/v2/LanguageModels/OpenAiModel.md @@ -0,0 +1,75 @@ +# OpenAiModel + +Method | HTTP request | Release Stage | +------------- | ------------- | ----- | +[**embeddings**](#embeddings) | **POST** /v2/languageModels/openAi/{openAiModelModelId}/embeddings | Private Beta | + +# **embeddings** + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**open_ai_model_model_id** | LanguageModelApiName | | | +**input** | OpenAiEmbeddingInput | Input text to embed, encoded as an array of strings. Each input must not exceed the max input tokens for the model (8192 tokens for all embedding models). | | +**attribution** | Optional[Attribution] | | [optional] | +**dimensions** | Optional[int] | The number of dimensions the resulting output embeddings should have. Only supported in text-embedding-3 and later models. | [optional] | +**encoding_format** | Optional[OpenAiEncodingFormat] | The format to return the embeddings in. Can be either float or base64. | [optional] | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**OpenAiEmbeddingsResponse** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# LanguageModelApiName +open_ai_model_model_id = None +# OpenAiEmbeddingInput | Input text to embed, encoded as an array of strings. Each input must not exceed the max input tokens for the model (8192 tokens for all embedding models). +input = None +# Optional[Attribution] +attribution = None +# Optional[int] | The number of dimensions the resulting output embeddings should have. Only supported in text-embedding-3 and later models. +dimensions = None +# Optional[OpenAiEncodingFormat] | The format to return the embeddings in. Can be either float or base64. +encoding_format = "FLOAT" +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.language_models.OpenAiModel.embeddings( + open_ai_model_model_id, + input=input, + attribution=attribution, + dimensions=dimensions, + encoding_format=encoding_format, + preview=preview, + ) + print("The embeddings response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling OpenAiModel.embeddings: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | OpenAiEmbeddingsResponse | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + diff --git a/docs/v2/LanguageModels/models/AnthropicAnyToolChoice.md b/docs/v2/LanguageModels/models/AnthropicAnyToolChoice.md new file mode 100644 index 000000000..208eb823f --- /dev/null +++ b/docs/v2/LanguageModels/models/AnthropicAnyToolChoice.md @@ -0,0 +1,12 @@ +# AnthropicAnyToolChoice + +AnthropicAnyToolChoice + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**disable_parallel_tool_use** | Optional[AnthropicDisableParallelToolUse] | No | | +**type** | Literal["any"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/models/AnthropicAutoToolChoice.md b/docs/v2/LanguageModels/models/AnthropicAutoToolChoice.md new file mode 100644 index 000000000..0ea3ce335 --- /dev/null +++ b/docs/v2/LanguageModels/models/AnthropicAutoToolChoice.md @@ -0,0 +1,12 @@ +# AnthropicAutoToolChoice + +AnthropicAutoToolChoice + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**disable_parallel_tool_use** | Optional[AnthropicDisableParallelToolUse] | No | | +**type** | Literal["auto"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/models/AnthropicBase64PdfDocumentSource.md b/docs/v2/LanguageModels/models/AnthropicBase64PdfDocumentSource.md new file mode 100644 index 000000000..f01f42a9e --- /dev/null +++ b/docs/v2/LanguageModels/models/AnthropicBase64PdfDocumentSource.md @@ -0,0 +1,12 @@ +# AnthropicBase64PdfDocumentSource + +AnthropicBase64PdfDocumentSource + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**data** | str | Yes | | +**type** | Literal["pdf"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/models/AnthropicCacheControl.md b/docs/v2/LanguageModels/models/AnthropicCacheControl.md new file mode 100644 index 000000000..de7d64800 --- /dev/null +++ b/docs/v2/LanguageModels/models/AnthropicCacheControl.md @@ -0,0 +1,11 @@ +# AnthropicCacheControl + +AnthropicCacheControl + +## Type +```python +AnthropicEphemeralCacheControl +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/models/AnthropicCharacterLocationCitation.md b/docs/v2/LanguageModels/models/AnthropicCharacterLocationCitation.md new file mode 100644 index 000000000..06cd0c048 --- /dev/null +++ b/docs/v2/LanguageModels/models/AnthropicCharacterLocationCitation.md @@ -0,0 +1,16 @@ +# AnthropicCharacterLocationCitation + +AnthropicCharacterLocationCitation + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**cited_text** | str | Yes | | +**document_index** | int | Yes | | +**document_title** | Optional[str] | No | | +**start_char_index** | int | Yes | | +**end_char_index** | int | Yes | | +**type** | Literal["charLocation"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/models/AnthropicCompletionCitation.md b/docs/v2/LanguageModels/models/AnthropicCompletionCitation.md new file mode 100644 index 000000000..7f8f55e6e --- /dev/null +++ b/docs/v2/LanguageModels/models/AnthropicCompletionCitation.md @@ -0,0 +1,11 @@ +# AnthropicCompletionCitation + +AnthropicCompletionCitation + +## Type +```python +AnthropicCharacterLocationCitation +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/models/AnthropicCompletionContent.md b/docs/v2/LanguageModels/models/AnthropicCompletionContent.md new file mode 100644 index 000000000..ca9c4b7a0 --- /dev/null +++ b/docs/v2/LanguageModels/models/AnthropicCompletionContent.md @@ -0,0 +1,18 @@ +# AnthropicCompletionContent + +AnthropicCompletionContent + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +AnthropicCompletionToolUse | toolUse +AnthropicCompletionText | text +AnthropicCompletionThinking | thinking +AnthropicCompletionRedactedThinking | redactedThinking + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/models/AnthropicCompletionRedactedThinking.md b/docs/v2/LanguageModels/models/AnthropicCompletionRedactedThinking.md new file mode 100644 index 000000000..c753eea7c --- /dev/null +++ b/docs/v2/LanguageModels/models/AnthropicCompletionRedactedThinking.md @@ -0,0 +1,12 @@ +# AnthropicCompletionRedactedThinking + +AnthropicCompletionRedactedThinking + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**data** | str | Yes | | +**type** | Literal["redactedThinking"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/models/AnthropicCompletionText.md b/docs/v2/LanguageModels/models/AnthropicCompletionText.md new file mode 100644 index 000000000..4c5fc3b9f --- /dev/null +++ b/docs/v2/LanguageModels/models/AnthropicCompletionText.md @@ -0,0 +1,13 @@ +# AnthropicCompletionText + +AnthropicCompletionText + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**text** | str | Yes | | +**citations** | Optional[List[AnthropicCompletionCitation]] | No | | +**type** | Literal["text"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/models/AnthropicCompletionThinking.md b/docs/v2/LanguageModels/models/AnthropicCompletionThinking.md new file mode 100644 index 000000000..ecd151735 --- /dev/null +++ b/docs/v2/LanguageModels/models/AnthropicCompletionThinking.md @@ -0,0 +1,13 @@ +# AnthropicCompletionThinking + +AnthropicCompletionThinking + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**signature** | str | Yes | | +**thinking** | str | Yes | | +**type** | Literal["thinking"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/models/AnthropicCompletionToolUse.md b/docs/v2/LanguageModels/models/AnthropicCompletionToolUse.md new file mode 100644 index 000000000..667cd8c8a --- /dev/null +++ b/docs/v2/LanguageModels/models/AnthropicCompletionToolUse.md @@ -0,0 +1,14 @@ +# AnthropicCompletionToolUse + +AnthropicCompletionToolUse + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**id** | str | Yes | | +**input** | Any | Yes | | +**name** | str | Yes | | +**type** | Literal["toolUse"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/models/AnthropicCustomTool.md b/docs/v2/LanguageModels/models/AnthropicCustomTool.md new file mode 100644 index 000000000..3860df897 --- /dev/null +++ b/docs/v2/LanguageModels/models/AnthropicCustomTool.md @@ -0,0 +1,14 @@ +# AnthropicCustomTool + +AnthropicCustomTool + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**name** | str | Yes | | +**description** | Optional[str] | No | | +**input_schema** | JsonSchema | Yes | | +**type** | Literal["custom"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/models/AnthropicDisableParallelToolUse.md b/docs/v2/LanguageModels/models/AnthropicDisableParallelToolUse.md new file mode 100644 index 000000000..9ed323a7b --- /dev/null +++ b/docs/v2/LanguageModels/models/AnthropicDisableParallelToolUse.md @@ -0,0 +1,13 @@ +# AnthropicDisableParallelToolUse + +Whether to disable parallel tool use. Defaults to false. If set to true, the model will output +exactly one tool use. + + +## Type +```python +bool +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/models/AnthropicDisabledThinking.md b/docs/v2/LanguageModels/models/AnthropicDisabledThinking.md new file mode 100644 index 000000000..241fa83a2 --- /dev/null +++ b/docs/v2/LanguageModels/models/AnthropicDisabledThinking.md @@ -0,0 +1,11 @@ +# AnthropicDisabledThinking + +AnthropicDisabledThinking + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["disabled"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/models/AnthropicDocument.md b/docs/v2/LanguageModels/models/AnthropicDocument.md new file mode 100644 index 000000000..c7e6e4be8 --- /dev/null +++ b/docs/v2/LanguageModels/models/AnthropicDocument.md @@ -0,0 +1,16 @@ +# AnthropicDocument + +AnthropicDocument + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**source** | AnthropicDocumentSource | Yes | | +**cache_control** | Optional[AnthropicCacheControl] | No | | +**citations** | Optional[AnthropicDocumentCitations] | No | | +**context** | Optional[str] | No | | +**title** | Optional[str] | No | | +**type** | Literal["document"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/models/AnthropicDocumentCitations.md b/docs/v2/LanguageModels/models/AnthropicDocumentCitations.md new file mode 100644 index 000000000..a55f2feb3 --- /dev/null +++ b/docs/v2/LanguageModels/models/AnthropicDocumentCitations.md @@ -0,0 +1,11 @@ +# AnthropicDocumentCitations + +AnthropicDocumentCitations + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**enabled** | bool | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/models/AnthropicDocumentSource.md b/docs/v2/LanguageModels/models/AnthropicDocumentSource.md new file mode 100644 index 000000000..d93c3c5e5 --- /dev/null +++ b/docs/v2/LanguageModels/models/AnthropicDocumentSource.md @@ -0,0 +1,16 @@ +# AnthropicDocumentSource + +AnthropicDocumentSource + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +AnthropicBase64PdfDocumentSource | pdf +AnthropicTextDocumentSource | text + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/models/AnthropicEnabledThinking.md b/docs/v2/LanguageModels/models/AnthropicEnabledThinking.md new file mode 100644 index 000000000..b0e6f7466 --- /dev/null +++ b/docs/v2/LanguageModels/models/AnthropicEnabledThinking.md @@ -0,0 +1,12 @@ +# AnthropicEnabledThinking + +AnthropicEnabledThinking + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**budget_tokens** | int | Yes | Must be greater than 1024. | +**type** | Literal["enabled"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/models/AnthropicEphemeralCacheControl.md b/docs/v2/LanguageModels/models/AnthropicEphemeralCacheControl.md new file mode 100644 index 000000000..59c91bf87 --- /dev/null +++ b/docs/v2/LanguageModels/models/AnthropicEphemeralCacheControl.md @@ -0,0 +1,11 @@ +# AnthropicEphemeralCacheControl + +This currently does not support the ttl field, but will in the future. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["ephemeral"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/models/AnthropicImage.md b/docs/v2/LanguageModels/models/AnthropicImage.md new file mode 100644 index 000000000..bf5cf6536 --- /dev/null +++ b/docs/v2/LanguageModels/models/AnthropicImage.md @@ -0,0 +1,13 @@ +# AnthropicImage + +AnthropicImage + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**source** | AnthropicImageSource | Yes | | +**cache_control** | Optional[AnthropicCacheControl] | No | | +**type** | Literal["image"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/models/AnthropicImageBase64Source.md b/docs/v2/LanguageModels/models/AnthropicImageBase64Source.md new file mode 100644 index 000000000..d986361a7 --- /dev/null +++ b/docs/v2/LanguageModels/models/AnthropicImageBase64Source.md @@ -0,0 +1,13 @@ +# AnthropicImageBase64Source + +AnthropicImageBase64Source + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**data** | str | Yes | | +**media_type** | AnthropicMediaType | Yes | This can include image/jpeg, image/png, image/gif or image/webp. | +**type** | Literal["base64"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/models/AnthropicImageSource.md b/docs/v2/LanguageModels/models/AnthropicImageSource.md new file mode 100644 index 000000000..f7323d76c --- /dev/null +++ b/docs/v2/LanguageModels/models/AnthropicImageSource.md @@ -0,0 +1,11 @@ +# AnthropicImageSource + +AnthropicImageSource + +## Type +```python +AnthropicImageBase64Source +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/models/AnthropicMediaType.md b/docs/v2/LanguageModels/models/AnthropicMediaType.md new file mode 100644 index 000000000..965b6ca66 --- /dev/null +++ b/docs/v2/LanguageModels/models/AnthropicMediaType.md @@ -0,0 +1,13 @@ +# AnthropicMediaType + +AnthropicMediaType + +| **Value** | +| --------- | +| `"IMAGE_JPEG"` | +| `"IMAGE_PNG"` | +| `"IMAGE_GIF"` | +| `"IMAGE_WEBP"` | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/models/AnthropicMessage.md b/docs/v2/LanguageModels/models/AnthropicMessage.md new file mode 100644 index 000000000..76d956adc --- /dev/null +++ b/docs/v2/LanguageModels/models/AnthropicMessage.md @@ -0,0 +1,12 @@ +# AnthropicMessage + +AnthropicMessage + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**content** | List[AnthropicMessageContent] | Yes | | +**role** | AnthropicMessageRole | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/models/AnthropicMessageContent.md b/docs/v2/LanguageModels/models/AnthropicMessageContent.md new file mode 100644 index 000000000..35d2fc50d --- /dev/null +++ b/docs/v2/LanguageModels/models/AnthropicMessageContent.md @@ -0,0 +1,21 @@ +# AnthropicMessageContent + +AnthropicMessageContent + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +AnthropicImage | image +AnthropicToolUse | toolUse +AnthropicDocument | document +AnthropicText | text +AnthropicToolResult | toolResult +AnthropicThinking | thinking +AnthropicRedactedThinking | redactedThinking + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/models/AnthropicMessageRole.md b/docs/v2/LanguageModels/models/AnthropicMessageRole.md new file mode 100644 index 000000000..8be7cd75f --- /dev/null +++ b/docs/v2/LanguageModels/models/AnthropicMessageRole.md @@ -0,0 +1,11 @@ +# AnthropicMessageRole + +AnthropicMessageRole + +| **Value** | +| --------- | +| `"USER"` | +| `"ASSISTANT"` | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/models/AnthropicMessagesRequest.md b/docs/v2/LanguageModels/models/AnthropicMessagesRequest.md new file mode 100644 index 000000000..9f0f11c23 --- /dev/null +++ b/docs/v2/LanguageModels/models/AnthropicMessagesRequest.md @@ -0,0 +1,20 @@ +# AnthropicMessagesRequest + +AnthropicMessagesRequest + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**messages** | List[AnthropicMessage] | Yes | Input messages to the model. This can include a single user-role message or multiple messages with alternating user and assistant roles. | +**max_tokens** | int | Yes | The maximum number of tokens to generate before stopping. | +**stop_sequences** | Optional[List[str]] | No | Custom text sequences that will cause the model to stop generating. | +**system** | Optional[List[AnthropicSystemMessage]] | No | A system prompt is a way of providing context and instructions to Claude, such as specifying a particular goal or role. As of now, sending multiple system prompts is not supported. | +**temperature** | Optional[float] | No | Amount of randomness injected into the response. Ranges from 0.0 to 1.0. Note that even with temperature of 0.0, the results will not be fully deterministic. Defaults to 1.0 | +**thinking** | Optional[AnthropicThinkingConfig] | No | Configuration for enabling Claude's extended thinking. | +**tool_choice** | Optional[AnthropicToolChoice] | No | How the model should use the provided tools. | +**tools** | Optional[List[AnthropicTool]] | No | Definitions of tools that the model may use. | +**top_k** | Optional[int] | No | Only sample from the top K options for each subsequent token. | +**top_p** | Optional[float] | No | Use nucleus sampling. You should either alter temperature or top_p, but not both | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/models/AnthropicMessagesResponse.md b/docs/v2/LanguageModels/models/AnthropicMessagesResponse.md new file mode 100644 index 000000000..b34ce66b6 --- /dev/null +++ b/docs/v2/LanguageModels/models/AnthropicMessagesResponse.md @@ -0,0 +1,17 @@ +# AnthropicMessagesResponse + +AnthropicMessagesResponse + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**content** | List[AnthropicCompletionContent] | Yes | | +**id** | str | Yes | | +**model** | str | Yes | | +**role** | AnthropicMessageRole | Yes | | +**stop_reason** | Optional[str] | No | | +**stop_sequence** | Optional[str] | No | | +**usage** | AnthropicTokenUsage | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/models/AnthropicNoneToolChoice.md b/docs/v2/LanguageModels/models/AnthropicNoneToolChoice.md new file mode 100644 index 000000000..8faf33edd --- /dev/null +++ b/docs/v2/LanguageModels/models/AnthropicNoneToolChoice.md @@ -0,0 +1,11 @@ +# AnthropicNoneToolChoice + +AnthropicNoneToolChoice + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["none"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/models/AnthropicRedactedThinking.md b/docs/v2/LanguageModels/models/AnthropicRedactedThinking.md new file mode 100644 index 000000000..f7a73b280 --- /dev/null +++ b/docs/v2/LanguageModels/models/AnthropicRedactedThinking.md @@ -0,0 +1,12 @@ +# AnthropicRedactedThinking + +AnthropicRedactedThinking + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**data** | str | Yes | | +**type** | Literal["redactedThinking"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/models/AnthropicSystemMessage.md b/docs/v2/LanguageModels/models/AnthropicSystemMessage.md new file mode 100644 index 000000000..696a662f7 --- /dev/null +++ b/docs/v2/LanguageModels/models/AnthropicSystemMessage.md @@ -0,0 +1,11 @@ +# AnthropicSystemMessage + +AnthropicSystemMessage + +## Type +```python +AnthropicText +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/models/AnthropicText.md b/docs/v2/LanguageModels/models/AnthropicText.md new file mode 100644 index 000000000..4a805b313 --- /dev/null +++ b/docs/v2/LanguageModels/models/AnthropicText.md @@ -0,0 +1,14 @@ +# AnthropicText + +AnthropicText + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**text** | str | Yes | | +**citations** | Optional[List[AnthropicCompletionCitation]] | No | | +**cache_control** | Optional[AnthropicCacheControl] | No | | +**type** | Literal["text"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/models/AnthropicTextDocumentSource.md b/docs/v2/LanguageModels/models/AnthropicTextDocumentSource.md new file mode 100644 index 000000000..c9209a343 --- /dev/null +++ b/docs/v2/LanguageModels/models/AnthropicTextDocumentSource.md @@ -0,0 +1,12 @@ +# AnthropicTextDocumentSource + +AnthropicTextDocumentSource + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**data** | str | Yes | | +**type** | Literal["text"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/models/AnthropicThinking.md b/docs/v2/LanguageModels/models/AnthropicThinking.md new file mode 100644 index 000000000..7b9ac39b3 --- /dev/null +++ b/docs/v2/LanguageModels/models/AnthropicThinking.md @@ -0,0 +1,13 @@ +# AnthropicThinking + +AnthropicThinking + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**signature** | str | Yes | | +**thinking** | str | Yes | | +**type** | Literal["thinking"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/models/AnthropicThinkingConfig.md b/docs/v2/LanguageModels/models/AnthropicThinkingConfig.md new file mode 100644 index 000000000..c21f97b71 --- /dev/null +++ b/docs/v2/LanguageModels/models/AnthropicThinkingConfig.md @@ -0,0 +1,16 @@ +# AnthropicThinkingConfig + +AnthropicThinkingConfig + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +AnthropicDisabledThinking | disabled +AnthropicEnabledThinking | enabled + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/models/AnthropicTokenUsage.md b/docs/v2/LanguageModels/models/AnthropicTokenUsage.md new file mode 100644 index 000000000..7a23b09c1 --- /dev/null +++ b/docs/v2/LanguageModels/models/AnthropicTokenUsage.md @@ -0,0 +1,14 @@ +# AnthropicTokenUsage + +AnthropicTokenUsage + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**cache_creation_input_tokens** | Optional[int] | No | | +**cache_read_input_tokens** | Optional[int] | No | | +**input_tokens** | int | Yes | | +**output_tokens** | int | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/models/AnthropicTool.md b/docs/v2/LanguageModels/models/AnthropicTool.md new file mode 100644 index 000000000..0f305ea1e --- /dev/null +++ b/docs/v2/LanguageModels/models/AnthropicTool.md @@ -0,0 +1,11 @@ +# AnthropicTool + +AnthropicTool + +## Type +```python +AnthropicCustomTool +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/models/AnthropicToolChoice.md b/docs/v2/LanguageModels/models/AnthropicToolChoice.md new file mode 100644 index 000000000..7cc6f8700 --- /dev/null +++ b/docs/v2/LanguageModels/models/AnthropicToolChoice.md @@ -0,0 +1,18 @@ +# AnthropicToolChoice + +AnthropicToolChoice + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +AnthropicAutoToolChoice | auto +AnthropicNoneToolChoice | none +AnthropicAnyToolChoice | any +AnthropicToolToolChoice | tool + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/models/AnthropicToolResult.md b/docs/v2/LanguageModels/models/AnthropicToolResult.md new file mode 100644 index 000000000..b3e536df9 --- /dev/null +++ b/docs/v2/LanguageModels/models/AnthropicToolResult.md @@ -0,0 +1,15 @@ +# AnthropicToolResult + +AnthropicToolResult + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**tool_use_id** | str | Yes | | +**content** | Optional[List[AnthropicToolResultContent]] | No | | +**is_error** | Optional[bool] | No | | +**cache_control** | Optional[AnthropicCacheControl] | No | | +**type** | Literal["toolResult"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/models/AnthropicToolResultContent.md b/docs/v2/LanguageModels/models/AnthropicToolResultContent.md new file mode 100644 index 000000000..46df5f9ff --- /dev/null +++ b/docs/v2/LanguageModels/models/AnthropicToolResultContent.md @@ -0,0 +1,11 @@ +# AnthropicToolResultContent + +AnthropicToolResultContent + +## Type +```python +AnthropicText +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/models/AnthropicToolToolChoice.md b/docs/v2/LanguageModels/models/AnthropicToolToolChoice.md new file mode 100644 index 000000000..f5d08e54b --- /dev/null +++ b/docs/v2/LanguageModels/models/AnthropicToolToolChoice.md @@ -0,0 +1,13 @@ +# AnthropicToolToolChoice + +AnthropicToolToolChoice + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**name** | str | Yes | | +**disable_parallel_tool_use** | Optional[AnthropicDisableParallelToolUse] | No | | +**type** | Literal["tool"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/models/AnthropicToolUse.md b/docs/v2/LanguageModels/models/AnthropicToolUse.md new file mode 100644 index 000000000..2f14ce5cd --- /dev/null +++ b/docs/v2/LanguageModels/models/AnthropicToolUse.md @@ -0,0 +1,15 @@ +# AnthropicToolUse + +AnthropicToolUse + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**id** | str | Yes | | +**input** | Any | Yes | | +**name** | str | Yes | | +**cache_control** | Optional[AnthropicCacheControl] | No | | +**type** | Literal["toolUse"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/models/JsonSchema.md b/docs/v2/LanguageModels/models/JsonSchema.md new file mode 100644 index 000000000..8861af966 --- /dev/null +++ b/docs/v2/LanguageModels/models/JsonSchema.md @@ -0,0 +1,11 @@ +# JsonSchema + +JsonSchema + +## Type +```python +Dict[str, Any] +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/models/LanguageModelApiName.md b/docs/v2/LanguageModels/models/LanguageModelApiName.md new file mode 100644 index 000000000..3d645ac01 --- /dev/null +++ b/docs/v2/LanguageModels/models/LanguageModelApiName.md @@ -0,0 +1,11 @@ +# LanguageModelApiName + +The name of the LanguageModel in the API. + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/models/OpenAiEmbeddingInput.md b/docs/v2/LanguageModels/models/OpenAiEmbeddingInput.md new file mode 100644 index 000000000..e8448a3a4 --- /dev/null +++ b/docs/v2/LanguageModels/models/OpenAiEmbeddingInput.md @@ -0,0 +1,11 @@ +# OpenAiEmbeddingInput + +OpenAiEmbeddingInput + +## Type +```python +List[str] +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/models/OpenAiEmbeddingTokenUsage.md b/docs/v2/LanguageModels/models/OpenAiEmbeddingTokenUsage.md new file mode 100644 index 000000000..ca838d9e2 --- /dev/null +++ b/docs/v2/LanguageModels/models/OpenAiEmbeddingTokenUsage.md @@ -0,0 +1,11 @@ +# OpenAiEmbeddingTokenUsage + +OpenAiEmbeddingTokenUsage + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**prompt_tokens** | int | Yes | Number of tokens in the prompt | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/models/OpenAiEmbeddingsRequest.md b/docs/v2/LanguageModels/models/OpenAiEmbeddingsRequest.md new file mode 100644 index 000000000..eb55eb7b4 --- /dev/null +++ b/docs/v2/LanguageModels/models/OpenAiEmbeddingsRequest.md @@ -0,0 +1,13 @@ +# OpenAiEmbeddingsRequest + +OpenAiEmbeddingsRequest + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**input** | OpenAiEmbeddingInput | Yes | Input text to embed, encoded as an array of strings. Each input must not exceed the max input tokens for the model (8192 tokens for all embedding models). | +**dimensions** | Optional[int] | No | The number of dimensions the resulting output embeddings should have. Only supported in text-embedding-3 and later models. | +**encoding_format** | Optional[OpenAiEncodingFormat] | No | The format to return the embeddings in. Can be either float or base64. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/models/OpenAiEmbeddingsResponse.md b/docs/v2/LanguageModels/models/OpenAiEmbeddingsResponse.md new file mode 100644 index 000000000..00d4c65a3 --- /dev/null +++ b/docs/v2/LanguageModels/models/OpenAiEmbeddingsResponse.md @@ -0,0 +1,13 @@ +# OpenAiEmbeddingsResponse + +OpenAiEmbeddingsResponse + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**data** | List[List[float]] | Yes | List of embedding vectors | +**model** | str | Yes | The ID of the model used | +**usage** | OpenAiEmbeddingTokenUsage | Yes | Usage statistics for the request | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/LanguageModels/models/OpenAiEncodingFormat.md b/docs/v2/LanguageModels/models/OpenAiEncodingFormat.md new file mode 100644 index 000000000..9a4f1118e --- /dev/null +++ b/docs/v2/LanguageModels/models/OpenAiEncodingFormat.md @@ -0,0 +1,11 @@ +# OpenAiEncodingFormat + +OpenAiEncodingFormat + +| **Value** | +| --------- | +| `"FLOAT"` | +| `"BASE64"` | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/MediaSets/MediaSet.md b/docs/v2/MediaSets/MediaSet.md new file mode 100644 index 000000000..218237f88 --- /dev/null +++ b/docs/v2/MediaSets/MediaSet.md @@ -0,0 +1,751 @@ +# MediaSet + +Method | HTTP request | Release Stage | +------------- | ------------- | ----- | +[**abort**](#abort) | **POST** /v2/mediasets/{mediaSetRid}/transactions/{transactionId}/abort | Public Beta | +[**calculate**](#calculate) | **GET** /v2/mediasets/{mediaSetRid}/items/{mediaItemRid}/transform/imagery/thumbnail/calculate | Private Beta | +[**commit**](#commit) | **POST** /v2/mediasets/{mediaSetRid}/transactions/{transactionId}/commit | Public Beta | +[**create**](#create) | **POST** /v2/mediasets/{mediaSetRid}/transactions | Public Beta | +[**get_rid_by_path**](#get_rid_by_path) | **GET** /v2/mediasets/{mediaSetRid}/items/getRidByPath | Public Beta | +[**info**](#info) | **GET** /v2/mediasets/{mediaSetRid}/items/{mediaItemRid} | Public Beta | +[**read**](#read) | **GET** /v2/mediasets/{mediaSetRid}/items/{mediaItemRid}/content | Public Beta | +[**read_original**](#read_original) | **GET** /v2/mediasets/{mediaSetRid}/items/{mediaItemRid}/original | Public Beta | +[**reference**](#reference) | **GET** /v2/mediasets/{mediaSetRid}/items/{mediaItemRid}/reference | Public Beta | +[**retrieve**](#retrieve) | **GET** /v2/mediasets/{mediaSetRid}/items/{mediaItemRid}/transform/imagery/thumbnail/retrieve | Private Beta | +[**upload**](#upload) | **POST** /v2/mediasets/{mediaSetRid}/items | Public Beta | +[**upload_media**](#upload_media) | **PUT** /v2/mediasets/media/upload | Public Beta | + +# **abort** +Aborts an open transaction. Items uploaded to the media set during this transaction will be deleted. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**media_set_rid** | MediaSetRid | | | +**transaction_id** | TransactionId | | | +**preview** | Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. | [optional] | + +### Return type +**None** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# MediaSetRid +media_set_rid = None +# TransactionId +transaction_id = None +# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. +preview = None + + +try: + api_response = client.media_sets.MediaSet.abort(media_set_rid, transaction_id, preview=preview) + print("The abort response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling MediaSet.abort: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**204** | None | | None | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **calculate** +Starts calculation of a thumbnail for a given image. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**media_set_rid** | MediaSetRid | The RID of the media set. | | +**media_item_rid** | MediaItemRid | The RID of the media item. | | +**preview** | Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. | [optional] | +**read_token** | Optional[MediaItemReadToken] | | [optional] | + +### Return type +**TrackedTransformationResponse** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# MediaSetRid | The RID of the media set. +media_set_rid = None +# MediaItemRid | The RID of the media item. +media_item_rid = None +# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. +preview = None +# Optional[MediaItemReadToken] +read_token = None + + +try: + api_response = client.media_sets.MediaSet.calculate( + media_set_rid, media_item_rid, preview=preview, read_token=read_token + ) + print("The calculate response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling MediaSet.calculate: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | TrackedTransformationResponse | Status of the thumbnail calculation. Type will be 'successful' if the thumbnail is available, 'pending' if the thumbnail is being calculated, and 'failed' if there was an error. | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **commit** +Commits an open transaction. On success, items uploaded to the media set during this transaction will become available. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**media_set_rid** | MediaSetRid | | | +**transaction_id** | TransactionId | | | +**preview** | Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. | [optional] | + +### Return type +**None** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# MediaSetRid +media_set_rid = None +# TransactionId +transaction_id = None +# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. +preview = None + + +try: + api_response = client.media_sets.MediaSet.commit(media_set_rid, transaction_id, preview=preview) + print("The commit response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling MediaSet.commit: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**204** | None | | None | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **create** +Creates a new transaction. Items uploaded to the media set while this transaction is open will not be reflected until the transaction is committed. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**media_set_rid** | MediaSetRid | | | +**branch_name** | Optional[BranchName] | The branch on which to open the transaction. Defaults to `master` for most enrollments. | [optional] | +**preview** | Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. | [optional] | + +### Return type +**TransactionId** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# MediaSetRid +media_set_rid = None +# Optional[BranchName] | The branch on which to open the transaction. Defaults to `master` for most enrollments. +branch_name = None +# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. +preview = None + + +try: + api_response = client.media_sets.MediaSet.create( + media_set_rid, branch_name=branch_name, preview=preview + ) + print("The create response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling MediaSet.create: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | TransactionId | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **get_rid_by_path** +Returns the media item RID for the media item with the specified path. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**media_set_rid** | MediaSetRid | The RID of the media set. | | +**media_item_path** | MediaItemPath | The path of the media item. | | +**branch_name** | Optional[BranchName] | Specifies the specific branch by name in which to search for this media item. May not be provided if branch rid or view rid are provided. | [optional] | +**branch_rid** | Optional[BranchRid] | Specifies the specific branch by rid in which to search for this media item. May not be provided if branch name or view rid are provided. | [optional] | +**preview** | Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. | [optional] | +**view_rid** | Optional[MediaSetViewRid] | Specifies the specific view by rid in which to search for this media item. May not be provided if branch name or branch rid are provided. | [optional] | + +### Return type +**GetMediaItemRidByPathResponse** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# MediaSetRid | The RID of the media set. +media_set_rid = None +# MediaItemPath | The path of the media item. +media_item_path = None +# Optional[BranchName] | Specifies the specific branch by name in which to search for this media item. May not be provided if branch rid or view rid are provided. +branch_name = None +# Optional[BranchRid] | Specifies the specific branch by rid in which to search for this media item. May not be provided if branch name or view rid are provided. +branch_rid = None +# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. +preview = None +# Optional[MediaSetViewRid] | Specifies the specific view by rid in which to search for this media item. May not be provided if branch name or branch rid are provided. +view_rid = None + + +try: + api_response = client.media_sets.MediaSet.get_rid_by_path( + media_set_rid, + media_item_path=media_item_path, + branch_name=branch_name, + branch_rid=branch_rid, + preview=preview, + view_rid=view_rid, + ) + print("The get_rid_by_path response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling MediaSet.get_rid_by_path: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | GetMediaItemRidByPathResponse | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **info** +Gets information about the media item. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**media_set_rid** | MediaSetRid | The RID of the media set. | | +**media_item_rid** | MediaItemRid | The RID of the media item. | | +**preview** | Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. | [optional] | +**read_token** | Optional[MediaItemReadToken] | | [optional] | + +### Return type +**GetMediaItemInfoResponse** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# MediaSetRid | The RID of the media set. +media_set_rid = None +# MediaItemRid | The RID of the media item. +media_item_rid = None +# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. +preview = None +# Optional[MediaItemReadToken] +read_token = None + + +try: + api_response = client.media_sets.MediaSet.info( + media_set_rid, media_item_rid, preview=preview, read_token=read_token + ) + print("The info response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling MediaSet.info: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | GetMediaItemInfoResponse | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **read** +Gets the content of a media item. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**media_set_rid** | MediaSetRid | | | +**media_item_rid** | MediaItemRid | | | +**preview** | Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. | [optional] | +**read_token** | Optional[MediaItemReadToken] | | [optional] | + +### Return type +**bytes** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# MediaSetRid +media_set_rid = None +# MediaItemRid +media_item_rid = None +# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. +preview = None +# Optional[MediaItemReadToken] +read_token = None + + +try: + api_response = client.media_sets.MediaSet.read( + media_set_rid, media_item_rid, preview=preview, read_token=read_token + ) + print("The read response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling MediaSet.read: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | bytes | The content stream. | */* | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **read_original** +Gets the content of an original file uploaded to the media item, even if it was transformed on upload due to being an additional input format. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**media_set_rid** | MediaSetRid | | | +**media_item_rid** | MediaItemRid | | | +**preview** | Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. | [optional] | +**read_token** | Optional[MediaItemReadToken] | | [optional] | + +### Return type +**bytes** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# MediaSetRid +media_set_rid = None +# MediaItemRid +media_item_rid = None +# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. +preview = None +# Optional[MediaItemReadToken] +read_token = None + + +try: + api_response = client.media_sets.MediaSet.read_original( + media_set_rid, media_item_rid, preview=preview, read_token=read_token + ) + print("The read_original response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling MediaSet.read_original: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | bytes | The content stream. | */* | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **reference** +Gets the [media reference](https://palantir.com/docs/foundry/data-integration/media-sets/#media-references) for this media item. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**media_set_rid** | MediaSetRid | The RID of the media set. | | +**media_item_rid** | MediaItemRid | The RID of the media item. | | +**preview** | Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. | [optional] | +**read_token** | Optional[MediaItemReadToken] | | [optional] | + +### Return type +**MediaReference** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# MediaSetRid | The RID of the media set. +media_set_rid = None +# MediaItemRid | The RID of the media item. +media_item_rid = None +# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. +preview = None +# Optional[MediaItemReadToken] +read_token = None + + +try: + api_response = client.media_sets.MediaSet.reference( + media_set_rid, media_item_rid, preview=preview, read_token=read_token + ) + print("The reference response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling MediaSet.reference: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | MediaReference | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **retrieve** +Retrieves a successfully calculated thumbnail for a given image. + +Thumbnails are 200px wide in the format of `image/webp` + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**media_set_rid** | MediaSetRid | The RID of the media set. | | +**media_item_rid** | MediaItemRid | The RID of the media item. | | +**preview** | Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. | [optional] | +**read_token** | Optional[MediaItemReadToken] | | [optional] | + +### Return type +**bytes** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# MediaSetRid | The RID of the media set. +media_set_rid = None +# MediaItemRid | The RID of the media item. +media_item_rid = None +# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. +preview = None +# Optional[MediaItemReadToken] +read_token = None + + +try: + api_response = client.media_sets.MediaSet.retrieve( + media_set_rid, media_item_rid, preview=preview, read_token=read_token + ) + print("The retrieve response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling MediaSet.retrieve: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | bytes | Retrieves the thumbnail of an image (if available). | */* | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **upload** +Uploads a media item to an existing media set. +The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`. +A branch name, or branch rid, or view rid may optionally be specified. If none is specified, the item will be uploaded to the default branch. If more than one is specified, an error is thrown. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**media_set_rid** | MediaSetRid | | | +**body** | bytes | Body of the request | | +**branch_name** | Optional[BranchName] | Specifies the specific branch by name to which this media item will be uploaded. May not be provided if branch rid or view rid are provided. | [optional] | +**branch_rid** | Optional[BranchRid] | Specifies the specific branch by rid to which this media item will be uploaded. May not be provided if branch name or view rid are provided. | [optional] | +**media_item_path** | Optional[MediaItemPath] | An identifier for a media item within a media set. Necessary if the backing media set requires paths. | [optional] | +**preview** | Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. | [optional] | +**transaction_id** | Optional[TransactionId] | The id of the transaction associated with this request. Required if this is a transactional media set. | [optional] | +**view_rid** | Optional[MediaSetViewRid] | Specifies the specific view by rid to which this media item will be uploaded. May not be provided if branch name or branch rid are provided. | [optional] | + +### Return type +**PutMediaItemResponse** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# MediaSetRid +media_set_rid = None +# bytes | Body of the request +body = None +# Optional[BranchName] | Specifies the specific branch by name to which this media item will be uploaded. May not be provided if branch rid or view rid are provided. +branch_name = None +# Optional[BranchRid] | Specifies the specific branch by rid to which this media item will be uploaded. May not be provided if branch name or view rid are provided. +branch_rid = None +# Optional[MediaItemPath] | An identifier for a media item within a media set. Necessary if the backing media set requires paths. +media_item_path = "q3-data%2fmy-file.png" +# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. +preview = None +# Optional[TransactionId] | The id of the transaction associated with this request. Required if this is a transactional media set. +transaction_id = None +# Optional[MediaSetViewRid] | Specifies the specific view by rid to which this media item will be uploaded. May not be provided if branch name or branch rid are provided. +view_rid = None + + +try: + api_response = client.media_sets.MediaSet.upload( + media_set_rid, + body, + branch_name=branch_name, + branch_rid=branch_rid, + media_item_path=media_item_path, + preview=preview, + transaction_id=transaction_id, + view_rid=view_rid, + ) + print("The upload response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling MediaSet.upload: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | PutMediaItemResponse | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **upload_media** +Uploads a temporary media item. If the media item isn't persisted within 1 hour, the item will be deleted. + +If multiple resources are attributed to, usage will be attributed to the first one in the list. + +The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`. +Third-party applications using this endpoint via OAuth2 must request the following operation scopes: `api:ontologies-read api:ontologies-write`. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**body** | bytes | Body of the request | | +**filename** | MediaItemPath | The path to write the media item to. Required if the backing media set requires paths. | | +**attribution** | Optional[Attribution] | used for passing through usage attribution | [optional] | +**preview** | Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. | [optional] | + +### Return type +**MediaReference** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# bytes | Body of the request +body = None +# MediaItemPath | The path to write the media item to. Required if the backing media set requires paths. +filename = "my-file.png" +# Optional[Attribution] | used for passing through usage attribution +attribution = None +# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. +preview = None + + +try: + api_response = client.media_sets.MediaSet.upload_media( + body, filename=filename, attribution=attribution, preview=preview + ) + print("The upload_media response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling MediaSet.upload_media: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | MediaReference | The media reference for the uploaded media. | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + diff --git a/docs/v2/MediaSets/models/BranchName.md b/docs/v2/MediaSets/models/BranchName.md new file mode 100644 index 000000000..5c55ddb99 --- /dev/null +++ b/docs/v2/MediaSets/models/BranchName.md @@ -0,0 +1,13 @@ +# BranchName + +A name for a media set branch. Valid branch names must be (a) non-empty, (b) less than 256 characters, and +(c) not a valid ResourceIdentifier. + + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/MediaSets/models/BranchRid.md b/docs/v2/MediaSets/models/BranchRid.md new file mode 100644 index 000000000..777c15e0b --- /dev/null +++ b/docs/v2/MediaSets/models/BranchRid.md @@ -0,0 +1,12 @@ +# BranchRid + +A resource identifier that identifies a branch of a media set. + + +## Type +```python +RID +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/MediaSets/models/GetMediaItemInfoResponse.md b/docs/v2/MediaSets/models/GetMediaItemInfoResponse.md new file mode 100644 index 000000000..8be4abc2c --- /dev/null +++ b/docs/v2/MediaSets/models/GetMediaItemInfoResponse.md @@ -0,0 +1,14 @@ +# GetMediaItemInfoResponse + +GetMediaItemInfoResponse + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**view_rid** | MediaSetViewRid | Yes | | +**path** | Optional[MediaItemPath] | No | | +**logical_timestamp** | LogicalTimestamp | Yes | | +**attribution** | Optional[MediaAttribution] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/MediaSets/models/GetMediaItemRidByPathResponse.md b/docs/v2/MediaSets/models/GetMediaItemRidByPathResponse.md new file mode 100644 index 000000000..ca2f0a314 --- /dev/null +++ b/docs/v2/MediaSets/models/GetMediaItemRidByPathResponse.md @@ -0,0 +1,11 @@ +# GetMediaItemRidByPathResponse + +GetMediaItemRidByPathResponse + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**media_item_rid** | Optional[MediaItemRid] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/MediaSets/models/LogicalTimestamp.md b/docs/v2/MediaSets/models/LogicalTimestamp.md new file mode 100644 index 000000000..e6aa98992 --- /dev/null +++ b/docs/v2/MediaSets/models/LogicalTimestamp.md @@ -0,0 +1,16 @@ +# LogicalTimestamp + +A number representing a logical ordering to be used for transactions, etc. +This can be interpreted as a timestamp in microseconds, but may differ slightly from system clock time due +to clock drift and slight adjustments for the sake of ordering. + +Only positive timestamps (representing times after epoch) are supported. + + +## Type +```python +Long +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/MediaSets/models/MediaAttribution.md b/docs/v2/MediaSets/models/MediaAttribution.md new file mode 100644 index 000000000..46ab5291a --- /dev/null +++ b/docs/v2/MediaSets/models/MediaAttribution.md @@ -0,0 +1,12 @@ +# MediaAttribution + +MediaAttribution + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**creator_id** | UserId | Yes | | +**creation_timestamp** | datetime | Yes | The timestamp when the media item was created, in ISO 8601 timestamp format. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/MediaSets/models/MediaItemXmlFormat.md b/docs/v2/MediaSets/models/MediaItemXmlFormat.md new file mode 100644 index 000000000..3bffaab93 --- /dev/null +++ b/docs/v2/MediaSets/models/MediaItemXmlFormat.md @@ -0,0 +1,12 @@ +# MediaItemXmlFormat + +Format of the media item attempted to be decoded based on the XML structure. + +| **Value** | +| --------- | +| `"DOCX"` | +| `"XLSX"` | +| `"PPTX"` | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/MediaSets/models/PutMediaItemResponse.md b/docs/v2/MediaSets/models/PutMediaItemResponse.md new file mode 100644 index 000000000..7effefec8 --- /dev/null +++ b/docs/v2/MediaSets/models/PutMediaItemResponse.md @@ -0,0 +1,11 @@ +# PutMediaItemResponse + +PutMediaItemResponse + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**media_item_rid** | MediaItemRid | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/MediaSets/models/TrackedTransformationFailedResponse.md b/docs/v2/MediaSets/models/TrackedTransformationFailedResponse.md new file mode 100644 index 000000000..69757680e --- /dev/null +++ b/docs/v2/MediaSets/models/TrackedTransformationFailedResponse.md @@ -0,0 +1,11 @@ +# TrackedTransformationFailedResponse + +TrackedTransformationFailedResponse + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["failed"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/MediaSets/models/TrackedTransformationPendingResponse.md b/docs/v2/MediaSets/models/TrackedTransformationPendingResponse.md new file mode 100644 index 000000000..f6c278d16 --- /dev/null +++ b/docs/v2/MediaSets/models/TrackedTransformationPendingResponse.md @@ -0,0 +1,11 @@ +# TrackedTransformationPendingResponse + +TrackedTransformationPendingResponse + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["pending"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/MediaSets/models/TrackedTransformationResponse.md b/docs/v2/MediaSets/models/TrackedTransformationResponse.md new file mode 100644 index 000000000..0ff4f7f98 --- /dev/null +++ b/docs/v2/MediaSets/models/TrackedTransformationResponse.md @@ -0,0 +1,17 @@ +# TrackedTransformationResponse + +TrackedTransformationResponse + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +TrackedTransformationPendingResponse | pending +TrackedTransformationFailedResponse | failed +TrackedTransformationSuccessfulResponse | successful + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/MediaSets/models/TrackedTransformationSuccessfulResponse.md b/docs/v2/MediaSets/models/TrackedTransformationSuccessfulResponse.md new file mode 100644 index 000000000..f8387b022 --- /dev/null +++ b/docs/v2/MediaSets/models/TrackedTransformationSuccessfulResponse.md @@ -0,0 +1,11 @@ +# TrackedTransformationSuccessfulResponse + +TrackedTransformationSuccessfulResponse + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["successful"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/MediaSets/models/TransactionId.md b/docs/v2/MediaSets/models/TransactionId.md new file mode 100644 index 000000000..6780dfb8a --- /dev/null +++ b/docs/v2/MediaSets/models/TransactionId.md @@ -0,0 +1,12 @@ +# TransactionId + +An identifier which represents a transaction on a media set. + + +## Type +```python +UUID +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Models/Model.md b/docs/v2/Models/Model.md new file mode 100644 index 000000000..520562b89 --- /dev/null +++ b/docs/v2/Models/Model.md @@ -0,0 +1,112 @@ +# Model + +Method | HTTP request | Release Stage | +------------- | ------------- | ----- | +[**create**](#create) | **POST** /v2/models | Private Beta | +[**get**](#get) | **GET** /v2/models/{modelRid} | Private Beta | + +# **create** +Creates a new Model with no versions. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**name** | ModelName | | | +**parent_folder_rid** | FolderRid | | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**Model** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# ModelName +name = "House Pricing Model" +# FolderRid +parent_folder_rid = "ri.compass.main.folder.c410f510-2937-420e-8ea3-8c9bcb3c1791" +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.models.Model.create( + name=name, parent_folder_rid=parent_folder_rid, preview=preview + ) + print("The create response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Model.create: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | Model | The created Model | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **get** +Retrieves a Model by its Resource Identifier (RID). + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**model_rid** | ModelRid | | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**Model** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# ModelRid +model_rid = None +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.models.Model.get(model_rid, preview=preview) + print("The get response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Model.get: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | Model | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + diff --git a/docs/v2/Models/ModelVersion.md b/docs/v2/Models/ModelVersion.md new file mode 100644 index 000000000..143426931 --- /dev/null +++ b/docs/v2/Models/ModelVersion.md @@ -0,0 +1,212 @@ +# ModelVersion + +Method | HTTP request | Release Stage | +------------- | ------------- | ----- | +[**create**](#create) | **POST** /v2/models/{modelRid}/versions | Private Beta | +[**get**](#get) | **GET** /v2/models/{modelRid}/versions/{modelVersionRid} | Private Beta | +[**list**](#list) | **GET** /v2/models/{modelRid}/versions | Private Beta | + +# **create** +Creates a new Model Version on an existing model. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**model_rid** | ModelRid | | | +**backing_repositories** | List[RID] | | | +**conda_requirements** | List[str] | | | +**model_api** | ModelApi | | | +**model_files** | ModelFiles | | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**ModelVersion** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# ModelRid +model_rid = None +# List[RID] +backing_repositories = None +# List[str] +conda_requirements = None +# ModelApi +model_api = { + "inputs": [ + { + "name": "input_df", + "required": True, + "type": "tabular", + "columns": [ + {"name": "feature_1", "required": True, "dataType": {"type": "double"}}, + {"name": "feature_2", "required": True, "dataType": {"type": "integer"}}, + ], + "format": "PANDAS", + } + ], + "outputs": [ + { + "name": "output_df", + "required": True, + "type": "tabular", + "columns": [{"name": "prediction", "required": True, "dataType": {"type": "double"}}], + "format": "SPARK", + } + ], +} +# ModelFiles +model_files = { + "type": "dill", + "serializedModelFunction": "base64-encoded string for a dill-serialize model function", +} +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.models.Model.Version.create( + model_rid, + backing_repositories=backing_repositories, + conda_requirements=conda_requirements, + model_api=model_api, + model_files=model_files, + preview=preview, + ) + print("The create response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Version.create: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | ModelVersion | The created ModelVersion | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **get** +Retrieves a Model Version by its Resource Identifier (RID). + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**model_rid** | ModelRid | | | +**model_version_rid** | ModelVersionRid | | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**ModelVersion** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# ModelRid +model_rid = None +# ModelVersionRid +model_version_rid = None +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.models.Model.Version.get(model_rid, model_version_rid, preview=preview) + print("The get response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Version.get: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | ModelVersion | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **list** +Lists all Model Versions for a given Model. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**model_rid** | ModelRid | | | +**page_size** | Optional[PageSize] | The page size to use for the endpoint. | [optional] | +**page_token** | Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. | [optional] | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**ListModelVersionsResponse** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# ModelRid +model_rid = None +# Optional[PageSize] | The page size to use for the endpoint. +page_size = None +# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. +page_token = None +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + for model_version in client.models.Model.Version.list( + model_rid, page_size=page_size, page_token=page_token, preview=preview + ): + pprint(model_version) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Version.list: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | ListModelVersionsResponse | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + diff --git a/docs/v2/Models/models/CreateModelRequest.md b/docs/v2/Models/models/CreateModelRequest.md new file mode 100644 index 000000000..0488fd878 --- /dev/null +++ b/docs/v2/Models/models/CreateModelRequest.md @@ -0,0 +1,12 @@ +# CreateModelRequest + +CreateModelRequest + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**name** | ModelName | Yes | | +**parent_folder_rid** | FolderRid | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Models/models/CreateModelVersionRequest.md b/docs/v2/Models/models/CreateModelVersionRequest.md new file mode 100644 index 000000000..3fad5a59f --- /dev/null +++ b/docs/v2/Models/models/CreateModelVersionRequest.md @@ -0,0 +1,14 @@ +# CreateModelVersionRequest + +CreateModelVersionRequest + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**model_files** | ModelFiles | Yes | | +**backing_repositories** | List[RID] | Yes | | +**conda_requirements** | List[str] | Yes | | +**model_api** | ModelApi | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Models/models/DillModelFiles.md b/docs/v2/Models/models/DillModelFiles.md new file mode 100644 index 000000000..7a5ced371 --- /dev/null +++ b/docs/v2/Models/models/DillModelFiles.md @@ -0,0 +1,12 @@ +# DillModelFiles + +DillModelFiles + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**serialized_model_function** | str | Yes | | +**type** | Literal["dill"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Models/models/ListModelVersionsResponse.md b/docs/v2/Models/models/ListModelVersionsResponse.md new file mode 100644 index 000000000..c5a795cfd --- /dev/null +++ b/docs/v2/Models/models/ListModelVersionsResponse.md @@ -0,0 +1,12 @@ +# ListModelVersionsResponse + +ListModelVersionsResponse + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**data** | List[ModelVersion] | Yes | | +**next_page_token** | Optional[PageToken] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Models/models/Model.md b/docs/v2/Models/models/Model.md new file mode 100644 index 000000000..1848ea54f --- /dev/null +++ b/docs/v2/Models/models/Model.md @@ -0,0 +1,11 @@ +# Model + +Model + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**rid** | ModelRid | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Models/models/ModelApi.md b/docs/v2/Models/models/ModelApi.md new file mode 100644 index 000000000..35eb23d05 --- /dev/null +++ b/docs/v2/Models/models/ModelApi.md @@ -0,0 +1,13 @@ +# ModelApi + +The Model API is a specification that describes the inputs and outputs of a machine learning model. It is used to define the interface for the model, including the types of data that can be passed to it and the types of data that it will return. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**inputs** | List[ModelApiInput] | Yes | | +**outputs** | List[ModelApiOutput] | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Models/models/ModelApiAnyType.md b/docs/v2/Models/models/ModelApiAnyType.md new file mode 100644 index 000000000..d3a1d71f9 --- /dev/null +++ b/docs/v2/Models/models/ModelApiAnyType.md @@ -0,0 +1,11 @@ +# ModelApiAnyType + +ModelApiAnyType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["any"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Models/models/ModelApiArrayType.md b/docs/v2/Models/models/ModelApiArrayType.md new file mode 100644 index 000000000..4c09ac530 --- /dev/null +++ b/docs/v2/Models/models/ModelApiArrayType.md @@ -0,0 +1,12 @@ +# ModelApiArrayType + +ModelApiArrayType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**item_type** | ModelApiDataType | Yes | | +**type** | Literal["array"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Models/models/ModelApiColumn.md b/docs/v2/Models/models/ModelApiColumn.md new file mode 100644 index 000000000..74e4f3485 --- /dev/null +++ b/docs/v2/Models/models/ModelApiColumn.md @@ -0,0 +1,13 @@ +# ModelApiColumn + +ModelApiColumn + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**name** | str | Yes | | +**required** | Optional[bool] | No | true by default; false if the column can be null or omitted | +**data_type** | ModelApiDataType | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Models/models/ModelApiDataType.md b/docs/v2/Models/models/ModelApiDataType.md new file mode 100644 index 000000000..879c1746b --- /dev/null +++ b/docs/v2/Models/models/ModelApiDataType.md @@ -0,0 +1,26 @@ +# ModelApiDataType + +ModelApiDataType + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +DateType | date +BooleanType | boolean +UnsupportedType | unsupported +StringType | string +ModelApiArrayType | array +DoubleType | double +IntegerType | integer +FloatType | float +ModelApiAnyType | any +ModelApiMapType | map +LongType | long +TimestampType | timestamp + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Models/models/ModelApiInput.md b/docs/v2/Models/models/ModelApiInput.md new file mode 100644 index 000000000..904873cd3 --- /dev/null +++ b/docs/v2/Models/models/ModelApiInput.md @@ -0,0 +1,17 @@ +# ModelApiInput + +ModelApiInput + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +UnsupportedType | unsupported +ModelApiParameterType | parameter +ModelApiTabularType | tabular + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Models/models/ModelApiMapType.md b/docs/v2/Models/models/ModelApiMapType.md new file mode 100644 index 000000000..3ea5c512f --- /dev/null +++ b/docs/v2/Models/models/ModelApiMapType.md @@ -0,0 +1,13 @@ +# ModelApiMapType + +ModelApiMapType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**key_type** | ModelApiDataType | Yes | | +**value_type** | ModelApiDataType | Yes | | +**type** | Literal["map"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Models/models/ModelApiOutput.md b/docs/v2/Models/models/ModelApiOutput.md new file mode 100644 index 000000000..d13948016 --- /dev/null +++ b/docs/v2/Models/models/ModelApiOutput.md @@ -0,0 +1,17 @@ +# ModelApiOutput + +ModelApiOutput + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +UnsupportedType | unsupported +ModelApiParameterType | parameter +ModelApiTabularType | tabular + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Models/models/ModelApiParameterType.md b/docs/v2/Models/models/ModelApiParameterType.md new file mode 100644 index 000000000..749200725 --- /dev/null +++ b/docs/v2/Models/models/ModelApiParameterType.md @@ -0,0 +1,14 @@ +# ModelApiParameterType + +ModelApiParameterType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**name** | str | Yes | | +**required** | Optional[bool] | No | true by default; false if the input or output can be null or omitted | +**data_type** | ModelApiDataType | Yes | | +**type** | Literal["parameter"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Models/models/ModelApiTabularFormat.md b/docs/v2/Models/models/ModelApiTabularFormat.md new file mode 100644 index 000000000..28c0c403c --- /dev/null +++ b/docs/v2/Models/models/ModelApiTabularFormat.md @@ -0,0 +1,11 @@ +# ModelApiTabularFormat + +ModelApiTabularFormat + +| **Value** | +| --------- | +| `"PANDAS"` | +| `"SPARK"` | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Models/models/ModelApiTabularType.md b/docs/v2/Models/models/ModelApiTabularType.md new file mode 100644 index 000000000..fce549c09 --- /dev/null +++ b/docs/v2/Models/models/ModelApiTabularType.md @@ -0,0 +1,15 @@ +# ModelApiTabularType + +ModelApiTabularType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**name** | str | Yes | | +**required** | Optional[bool] | No | true by default; false if the input or output can be null or omitted | +**columns** | List[ModelApiColumn] | Yes | | +**format** | Optional[ModelApiTabularFormat] | No | Dataframe format the model will receive or is expected to return for this input or output. PANDAS is the default. | +**type** | Literal["tabular"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Models/models/ModelFiles.md b/docs/v2/Models/models/ModelFiles.md new file mode 100644 index 000000000..6ab0393df --- /dev/null +++ b/docs/v2/Models/models/ModelFiles.md @@ -0,0 +1,13 @@ +# ModelFiles + +The serialized data of a machine learning model. This can include the model's parameters, architecture, and any other relevant information needed to reconstruct the model. +Must be a base64-encoded string of a dill-serialized model function. + + +## Type +```python +DillModelFiles +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Models/models/ModelName.md b/docs/v2/Models/models/ModelName.md new file mode 100644 index 000000000..628cf4dc2 --- /dev/null +++ b/docs/v2/Models/models/ModelName.md @@ -0,0 +1,11 @@ +# ModelName + +ModelName + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Models/models/ModelRid.md b/docs/v2/Models/models/ModelRid.md new file mode 100644 index 000000000..131295b9f --- /dev/null +++ b/docs/v2/Models/models/ModelRid.md @@ -0,0 +1,11 @@ +# ModelRid + +The Resource Identifier (RID) of a Model. + +## Type +```python +RID +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Models/models/ModelVersion.md b/docs/v2/Models/models/ModelVersion.md new file mode 100644 index 000000000..098f3e447 --- /dev/null +++ b/docs/v2/Models/models/ModelVersion.md @@ -0,0 +1,14 @@ +# ModelVersion + +ModelVersion + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**rid** | ModelVersionRid | Yes | | +**model_api** | ModelApi | Yes | | +**conda_requirements** | List[str] | Yes | | +**backing_repositories** | List[RID] | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Models/models/ModelVersionRid.md b/docs/v2/Models/models/ModelVersionRid.md new file mode 100644 index 000000000..b38a6aa62 --- /dev/null +++ b/docs/v2/Models/models/ModelVersionRid.md @@ -0,0 +1,11 @@ +# ModelVersionRid + +The Resource Identifier (RID) of a Model Version. + +## Type +```python +RID +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/Action.md b/docs/v2/Ontologies/Action.md new file mode 100644 index 000000000..d6c08fafc --- /dev/null +++ b/docs/v2/Ontologies/Action.md @@ -0,0 +1,256 @@ +# Action + +Method | HTTP request | Release Stage | +------------- | ------------- | ----- | +[**apply**](#apply) | **POST** /v2/ontologies/{ontology}/actions/{action}/apply | Stable | +[**apply_batch**](#apply_batch) | **POST** /v2/ontologies/{ontology}/actions/{action}/applyBatch | Stable | +[**apply_with_overrides**](#apply_with_overrides) | **POST** /v2/ontologies/{ontology}/actions/{action}/applyWithOverrides | Private Beta | + +# **apply** +Applies an action using the given parameters. + +Changes to objects or links stored in Object Storage V1 are eventually consistent and may take some time to be visible. +Edits to objects or links in Object Storage V2 will be visible immediately after the action completes. + +Note that a 200 HTTP status code only indicates that the request was received and processed by the server. +See the validation result in the response body to determine if the action was applied successfully. + +Note that [parameter default values](https://palantir.com/docs/foundry/action-types/parameters-default-value/) are not currently supported by +this endpoint. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**ontology** | OntologyIdentifier | | | +**action** | ActionTypeApiName | The API name of the action to apply. To find the API name for your action, use the **List action types** endpoint or check the **Ontology Manager**. | | +**parameters** | Dict[ParameterId, Optional[DataValue]] | | | +**branch** | Optional[FoundryBranch] | The Foundry branch to apply the action against. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported. | [optional] | +**options** | Optional[ApplyActionRequestOptions] | | [optional] | +**sdk_package_rid** | Optional[SdkPackageRid] | The package rid of the generated SDK. | [optional] | +**sdk_version** | Optional[SdkVersion] | The version of the generated SDK. | [optional] | + +### Return type +**SyncApplyActionResponseV2** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# OntologyIdentifier +ontology = "palantir" +# ActionTypeApiName | The API name of the action to apply. To find the API name for your action, use the **List action types** endpoint or check the **Ontology Manager**. +action = "rename-employee" +# Dict[ParameterId, Optional[DataValue]] +parameters = {"id": 80060, "newName": "Anna Smith-Doe"} +# Optional[FoundryBranch] | The Foundry branch to apply the action against. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported. +branch = None +# Optional[ApplyActionRequestOptions] +options = None +# Optional[SdkPackageRid] | The package rid of the generated SDK. +sdk_package_rid = None +# Optional[SdkVersion] | The version of the generated SDK. +sdk_version = None + + +try: + api_response = client.ontologies.Action.apply( + ontology, + action, + parameters=parameters, + branch=branch, + options=options, + sdk_package_rid=sdk_package_rid, + sdk_version=sdk_version, + ) + print("The apply response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Action.apply: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | SyncApplyActionResponseV2 | Success response. | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **apply_batch** +Applies multiple actions (of the same Action Type) using the given parameters. + +Changes to objects or links stored in Object Storage V1 are eventually consistent and may take some time to be visible. +Edits to objects or links in Object Storage V2 will be visible immediately after the action completes. + +Up to 20 actions may be applied in one call. Actions that only modify objects in Object Storage v2 and do not +call Functions may receive a higher limit. + +Note that [notifications](https://palantir.com/docs/foundry/action-types/notifications/) are not currently supported by this endpoint. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**ontology** | OntologyIdentifier | | | +**action** | ActionTypeApiName | The API name of the action to apply. To find the API name for your action, use the **List action types** endpoint or check the **Ontology Manager**. | | +**requests** | List[BatchApplyActionRequestItem] | | | +**branch** | Optional[FoundryBranch] | The Foundry branch to apply the action against. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported. | [optional] | +**options** | Optional[BatchApplyActionRequestOptions] | | [optional] | +**sdk_package_rid** | Optional[SdkPackageRid] | The package rid of the generated SDK. | [optional] | +**sdk_version** | Optional[SdkVersion] | The version of the generated SDK. | [optional] | + +### Return type +**BatchApplyActionResponseV2** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# OntologyIdentifier +ontology = "palantir" +# ActionTypeApiName | The API name of the action to apply. To find the API name for your action, use the **List action types** endpoint or check the **Ontology Manager**. +action = "rename-employee" +# List[BatchApplyActionRequestItem] +requests = [ + {"parameters": {"id": 80060, "newName": "Anna Smith-Doe"}}, + {"parameters": {"id": 80061, "newName": "Joe Bloggs"}}, +] +# Optional[FoundryBranch] | The Foundry branch to apply the action against. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported. +branch = None +# Optional[BatchApplyActionRequestOptions] +options = None +# Optional[SdkPackageRid] | The package rid of the generated SDK. +sdk_package_rid = None +# Optional[SdkVersion] | The version of the generated SDK. +sdk_version = None + + +try: + api_response = client.ontologies.Action.apply_batch( + ontology, + action, + requests=requests, + branch=branch, + options=options, + sdk_package_rid=sdk_package_rid, + sdk_version=sdk_version, + ) + print("The apply_batch response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Action.apply_batch: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | BatchApplyActionResponseV2 | Success response. | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **apply_with_overrides** +Same as regular apply action operation, but allows specifying overrides for UniqueIdentifier and +CurrentTime generated action parameters. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**ontology** | OntologyIdentifier | | | +**action** | ActionTypeApiName | The API name of the action to apply. To find the API name for your action, use the **List action types** endpoint or check the **Ontology Manager**. | | +**overrides** | ApplyActionOverrides | | | +**request** | ApplyActionRequestV2 | | | +**branch** | Optional[FoundryBranch] | The Foundry branch to apply the action against. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported. | [optional] | +**sdk_package_rid** | Optional[SdkPackageRid] | The package rid of the generated SDK. | [optional] | +**sdk_version** | Optional[SdkVersion] | The version of the generated SDK. | [optional] | + +### Return type +**SyncApplyActionResponseV2** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# OntologyIdentifier +ontology = "palantir" +# ActionTypeApiName | The API name of the action to apply. To find the API name for your action, use the **List action types** endpoint or check the **Ontology Manager**. +action = "rename-employee" +# ApplyActionOverrides +overrides = { + "uniqueIdentifierLinkIdValues": { + "fd28fa5c-3028-4eca-bdc8-3be2c7949cd9": "4efdb11f-c1e3-417c-89fb-2225118b65e3" + }, + "actionExecutionTime": "2025-10-25T13:00:00Z", +} +# ApplyActionRequestV2 +request = {"parameters": {"id": 80060, "newName": "Anna Smith-Doe"}} +# Optional[FoundryBranch] | The Foundry branch to apply the action against. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported. +branch = None +# Optional[SdkPackageRid] | The package rid of the generated SDK. +sdk_package_rid = None +# Optional[SdkVersion] | The version of the generated SDK. +sdk_version = None + + +try: + api_response = client.ontologies.Action.apply_with_overrides( + ontology, + action, + overrides=overrides, + request=request, + branch=branch, + sdk_package_rid=sdk_package_rid, + sdk_version=sdk_version, + ) + print("The apply_with_overrides response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Action.apply_with_overrides: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | SyncApplyActionResponseV2 | Success response. | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + diff --git a/docs/v2/Ontologies/ActionType.md b/docs/v2/Ontologies/ActionType.md new file mode 100644 index 000000000..630b1f48d --- /dev/null +++ b/docs/v2/Ontologies/ActionType.md @@ -0,0 +1,179 @@ +# ActionType + +Method | HTTP request | Release Stage | +------------- | ------------- | ----- | +[**get**](#get) | **GET** /v2/ontologies/{ontology}/actionTypes/{actionType} | Stable | +[**get_by_rid**](#get_by_rid) | **GET** /v2/ontologies/{ontology}/actionTypes/byRid/{actionTypeRid} | Stable | +[**list**](#list) | **GET** /v2/ontologies/{ontology}/actionTypes | Stable | + +# **get** +Gets a specific action type with the given API name. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**ontology** | OntologyIdentifier | | | +**action_type** | ActionTypeApiName | The name of the action type in the API. | | +**branch** | Optional[FoundryBranch] | The Foundry branch to load the action type definition from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. | [optional] | + +### Return type +**ActionTypeV2** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# OntologyIdentifier +ontology = "palantir" +# ActionTypeApiName | The name of the action type in the API. +action_type = "promote-employee" +# Optional[FoundryBranch] | The Foundry branch to load the action type definition from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. +branch = None + + +try: + api_response = client.ontologies.Ontology.ActionType.get(ontology, action_type, branch=branch) + print("The get response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling ActionType.get: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | ActionTypeV2 | Success response. | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **get_by_rid** +Gets a specific action type with the given RID. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**ontology** | OntologyIdentifier | | | +**action_type_rid** | ActionTypeRid | The RID of the action type. | | +**branch** | Optional[FoundryBranch] | The Foundry branch to load the action type definition from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. | [optional] | + +### Return type +**ActionTypeV2** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# OntologyIdentifier +ontology = "palantir" +# ActionTypeRid | The RID of the action type. +action_type_rid = "ri.ontology.main.action-type.7ed72754-7491-428a-bb18-4d7296eb2167" +# Optional[FoundryBranch] | The Foundry branch to load the action type definition from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. +branch = None + + +try: + api_response = client.ontologies.Ontology.ActionType.get_by_rid( + ontology, action_type_rid, branch=branch + ) + print("The get_by_rid response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling ActionType.get_by_rid: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | ActionTypeV2 | Success response. | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **list** +Lists the action types for the given Ontology. + +Each page may be smaller than the requested page size. However, it is guaranteed that if there are more +results available, at least one result will be present in the response. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**ontology** | OntologyIdentifier | | | +**branch** | Optional[FoundryBranch] | The Foundry branch to list the action types from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. | [optional] | +**page_size** | Optional[PageSize] | The desired size of the page to be returned. Defaults to 500. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. | [optional] | +**page_token** | Optional[PageToken] | | [optional] | + +### Return type +**ListActionTypesResponseV2** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# OntologyIdentifier +ontology = "palantir" +# Optional[FoundryBranch] | The Foundry branch to list the action types from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. +branch = None +# Optional[PageSize] | The desired size of the page to be returned. Defaults to 500. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. +page_size = None +# Optional[PageToken] +page_token = None + + +try: + for action_type in client.ontologies.Ontology.ActionType.list( + ontology, branch=branch, page_size=page_size, page_token=page_token + ): + pprint(action_type) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling ActionType.list: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | ListActionTypesResponseV2 | Success response. | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + diff --git a/docs/v2/Ontologies/ActionTypeFullMetadata.md b/docs/v2/Ontologies/ActionTypeFullMetadata.md new file mode 100644 index 000000000..c6eb8d443 --- /dev/null +++ b/docs/v2/Ontologies/ActionTypeFullMetadata.md @@ -0,0 +1,124 @@ +# ActionTypeFullMetadata + +Method | HTTP request | Release Stage | +------------- | ------------- | ----- | +[**get**](#get) | **GET** /v2/ontologies/{ontology}/actionTypes/{actionType}/fullMetadata | Private Beta | +[**list**](#list) | **GET** /v2/ontologies/{ontology}/actionTypesFullMetadata | Private Beta | + +# **get** +Gets the full metadata associated with an action type. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**ontology** | OntologyIdentifier | The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. | | +**action_type** | ActionTypeApiName | The name of the action type in the API. | | +**branch** | Optional[FoundryBranch] | The Foundry branch to load the action type definition from. If not specified, the default branch will be used. | [optional] | + +### Return type +**ActionTypeFullMetadata** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# OntologyIdentifier | The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. +ontology = "palantir" +# ActionTypeApiName | The name of the action type in the API. +action_type = "promote-employee" +# Optional[FoundryBranch] | The Foundry branch to load the action type definition from. If not specified, the default branch will be used. +branch = None + + +try: + api_response = client.ontologies.ActionTypeFullMetadata.get( + ontology, action_type, branch=branch + ) + print("The get response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling ActionTypeFullMetadata.get: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | ActionTypeFullMetadata | Success response. | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **list** +Lists the action types (with full metadata) for the given Ontology. + +Each page may be smaller than the requested page size. However, it is guaranteed that if there are more +results available, at least one result will be present in the response. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**ontology** | OntologyIdentifier | | | +**branch** | Optional[FoundryBranch] | The Foundry branch to list the action types from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. | [optional] | +**page_size** | Optional[PageSize] | The desired size of the page to be returned. Defaults to 500. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. | [optional] | +**page_token** | Optional[PageToken] | | [optional] | + +### Return type +**ListActionTypesFullMetadataResponse** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# OntologyIdentifier +ontology = "palantir" +# Optional[FoundryBranch] | The Foundry branch to list the action types from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. +branch = None +# Optional[PageSize] | The desired size of the page to be returned. Defaults to 500. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. +page_size = None +# Optional[PageToken] +page_token = None + + +try: + for action_type_full_metadata in client.ontologies.ActionTypeFullMetadata.list( + ontology, branch=branch, page_size=page_size, page_token=page_token + ): + pprint(action_type_full_metadata) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling ActionTypeFullMetadata.list: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | ListActionTypesFullMetadataResponse | Success response. | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + diff --git a/docs/v2/Ontologies/Attachment.md b/docs/v2/Ontologies/Attachment.md new file mode 100644 index 000000000..38c2e59a2 --- /dev/null +++ b/docs/v2/Ontologies/Attachment.md @@ -0,0 +1,239 @@ +# Attachment + +Method | HTTP request | Release Stage | +------------- | ------------- | ----- | +[**get**](#get) | **GET** /v2/ontologies/attachments/{attachmentRid} | Stable | +[**read**](#read) | **GET** /v2/ontologies/attachments/{attachmentRid}/content | Stable | +[**upload**](#upload) | **POST** /v2/ontologies/attachments/upload | Stable | +[**upload_with_rid**](#upload_with_rid) | **POST** /v2/ontologies/attachments/upload/{attachmentRid} | Private Beta | + +# **get** +Get the metadata of an attachment. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**attachment_rid** | AttachmentRid | The RID of the attachment. | | + +### Return type +**AttachmentV2** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# AttachmentRid | The RID of the attachment. +attachment_rid = "ri.attachments.main.attachment.bb32154e-e043-4b00-9461-93136ca96b6f" + + +try: + api_response = client.ontologies.Attachment.get(attachment_rid) + print("The get response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Attachment.get: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | AttachmentV2 | Success response. | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **read** +Get the content of an attachment. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**attachment_rid** | AttachmentRid | The RID of the attachment. | | + +### Return type +**bytes** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# AttachmentRid | The RID of the attachment. +attachment_rid = "ri.attachments.main.attachment.bb32154e-e043-4b00-9461-93136ca96b6f" + + +try: + api_response = client.ontologies.Attachment.read(attachment_rid) + print("The read response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Attachment.read: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | bytes | Success response. | */* | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **upload** +Upload an attachment to use in an action. Any attachment which has not been linked to an object via +an action within one hour after upload will be removed. +Previously mapped attachments which are not connected to any object anymore are also removed on +a biweekly basis. +The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**body** | bytes | Body of the request | | +**content_length** | ContentLength | The size in bytes of the file content being uploaded. | | +**content_type** | ContentType | The media type of the file being uploaded. | | +**filename** | Filename | The name of the file being uploaded. | | + +### Return type +**AttachmentV2** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# bytes | Body of the request +body = None +# ContentLength | The size in bytes of the file content being uploaded. +content_length = None +# ContentType | The media type of the file being uploaded. +content_type = None +# Filename | The name of the file being uploaded. +filename = "My Image.jpeg" + + +try: + api_response = client.ontologies.Attachment.upload( + body, content_length=content_length, content_type=content_type, filename=filename + ) + print("The upload response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Attachment.upload: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | AttachmentV2 | Success response. | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **upload_with_rid** +This endpoint is identical to `/v2/ontologies/attachments/upload` but additionally accepts a previously +generated `AttachmentRid`. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**attachment_rid** | AttachmentRid | The `AttachmentRid` of the attachment being uploaded. | | +**body** | bytes | Body of the request | | +**content_length** | ContentLength | The size in bytes of the file content being uploaded. | | +**content_type** | ContentType | The media type of the file being uploaded. | | +**filename** | Filename | The name of the file being uploaded. | | +**preview** | Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. | [optional] | + +### Return type +**AttachmentV2** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# AttachmentRid | The `AttachmentRid` of the attachment being uploaded. +attachment_rid = "ri.attachments.main.attachment.bb32154e-e043-4b00-9461-93136ca96b6f" +# bytes | Body of the request +body = None +# ContentLength | The size in bytes of the file content being uploaded. +content_length = None +# ContentType | The media type of the file being uploaded. +content_type = None +# Filename | The name of the file being uploaded. +filename = "My Image.jpeg" +# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. +preview = None + + +try: + api_response = client.ontologies.Attachment.upload_with_rid( + attachment_rid, + body, + content_length=content_length, + content_type=content_type, + filename=filename, + preview=preview, + ) + print("The upload_with_rid response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Attachment.upload_with_rid: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | AttachmentV2 | Success response. | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + diff --git a/docs/v2/Ontologies/AttachmentProperty.md b/docs/v2/Ontologies/AttachmentProperty.md new file mode 100644 index 000000000..83e4e0421 --- /dev/null +++ b/docs/v2/Ontologies/AttachmentProperty.md @@ -0,0 +1,299 @@ +# AttachmentProperty + +Method | HTTP request | Release Stage | +------------- | ------------- | ----- | +[**get_attachment**](#get_attachment) | **GET** /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/attachments/{property} | Stable | +[**get_attachment_by_rid**](#get_attachment_by_rid) | **GET** /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/attachments/{property}/{attachmentRid} | Stable | +[**read_attachment**](#read_attachment) | **GET** /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/attachments/{property}/content | Stable | +[**read_attachment_by_rid**](#read_attachment_by_rid) | **GET** /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/attachments/{property}/{attachmentRid}/content | Stable | + +# **get_attachment** +Get the metadata of attachments parented to the given object. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**ontology** | OntologyIdentifier | | | +**object_type** | ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. | | +**primary_key** | PropertyValueEscapedString | The primary key of the object containing the attachment. | | +**property** | PropertyApiName | The API name of the attachment property. To find the API name for your attachment, check the **Ontology Manager** or use the **Get object type** endpoint. | | +**sdk_package_rid** | Optional[SdkPackageRid] | The package rid of the generated SDK. | [optional] | +**sdk_version** | Optional[SdkVersion] | The version of the generated SDK. | [optional] | + +### Return type +**AttachmentMetadataResponse** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# OntologyIdentifier +ontology = "palantir" +# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. +object_type = "employee" +# PropertyValueEscapedString | The primary key of the object containing the attachment. +primary_key = 50030 +# PropertyApiName | The API name of the attachment property. To find the API name for your attachment, check the **Ontology Manager** or use the **Get object type** endpoint. +property = "performance" +# Optional[SdkPackageRid] | The package rid of the generated SDK. +sdk_package_rid = None +# Optional[SdkVersion] | The version of the generated SDK. +sdk_version = None + + +try: + api_response = client.ontologies.AttachmentProperty.get_attachment( + ontology, + object_type, + primary_key, + property, + sdk_package_rid=sdk_package_rid, + sdk_version=sdk_version, + ) + print("The get_attachment response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling AttachmentProperty.get_attachment: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | AttachmentMetadataResponse | Success response. | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **get_attachment_by_rid** +Get the metadata of a particular attachment in an attachment list. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**ontology** | OntologyIdentifier | | | +**object_type** | ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. | | +**primary_key** | PropertyValueEscapedString | The primary key of the object containing the attachment. | | +**property** | PropertyApiName | The API name of the attachment property. To find the API name for your attachment, check the **Ontology Manager** or use the **Get object type** endpoint. | | +**attachment_rid** | AttachmentRid | The RID of the attachment. | | +**sdk_package_rid** | Optional[SdkPackageRid] | The package rid of the generated SDK. | [optional] | +**sdk_version** | Optional[SdkVersion] | The version of the generated SDK. | [optional] | + +### Return type +**AttachmentV2** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# OntologyIdentifier +ontology = "palantir" +# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. +object_type = "employee" +# PropertyValueEscapedString | The primary key of the object containing the attachment. +primary_key = 50030 +# PropertyApiName | The API name of the attachment property. To find the API name for your attachment, check the **Ontology Manager** or use the **Get object type** endpoint. +property = "performance" +# AttachmentRid | The RID of the attachment. +attachment_rid = "ri.attachments.main.attachment.bb32154e-e043-4b00-9461-93136ca96b6f" +# Optional[SdkPackageRid] | The package rid of the generated SDK. +sdk_package_rid = None +# Optional[SdkVersion] | The version of the generated SDK. +sdk_version = None + + +try: + api_response = client.ontologies.AttachmentProperty.get_attachment_by_rid( + ontology, + object_type, + primary_key, + property, + attachment_rid, + sdk_package_rid=sdk_package_rid, + sdk_version=sdk_version, + ) + print("The get_attachment_by_rid response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling AttachmentProperty.get_attachment_by_rid: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | AttachmentV2 | Success response. | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **read_attachment** +Get the content of an attachment. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**ontology** | OntologyIdentifier | | | +**object_type** | ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. | | +**primary_key** | PropertyValueEscapedString | The primary key of the object containing the attachment. | | +**property** | PropertyApiName | The API name of the attachment property. To find the API name for your attachment, check the **Ontology Manager** or use the **Get object type** endpoint. | | +**sdk_package_rid** | Optional[SdkPackageRid] | The package rid of the generated SDK. | [optional] | +**sdk_version** | Optional[SdkVersion] | The version of the generated SDK. | [optional] | + +### Return type +**bytes** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# OntologyIdentifier +ontology = "palantir" +# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. +object_type = "employee" +# PropertyValueEscapedString | The primary key of the object containing the attachment. +primary_key = 50030 +# PropertyApiName | The API name of the attachment property. To find the API name for your attachment, check the **Ontology Manager** or use the **Get object type** endpoint. +property = "performance" +# Optional[SdkPackageRid] | The package rid of the generated SDK. +sdk_package_rid = None +# Optional[SdkVersion] | The version of the generated SDK. +sdk_version = None + + +try: + api_response = client.ontologies.AttachmentProperty.read_attachment( + ontology, + object_type, + primary_key, + property, + sdk_package_rid=sdk_package_rid, + sdk_version=sdk_version, + ) + print("The read_attachment response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling AttachmentProperty.read_attachment: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | bytes | Success response. | */* | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **read_attachment_by_rid** +Get the content of an attachment by its RID. + +The RID must exist in the attachment array of the property. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**ontology** | OntologyIdentifier | | | +**object_type** | ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. | | +**primary_key** | PropertyValueEscapedString | The primary key of the object containing the attachment. | | +**property** | PropertyApiName | The API name of the attachment property. To find the API name for your attachment, check the **Ontology Manager** or use the **Get object type** endpoint. | | +**attachment_rid** | AttachmentRid | The RID of the attachment. | | +**sdk_package_rid** | Optional[SdkPackageRid] | The package rid of the generated SDK. | [optional] | +**sdk_version** | Optional[SdkVersion] | The version of the generated SDK. | [optional] | + +### Return type +**bytes** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# OntologyIdentifier +ontology = "palantir" +# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. +object_type = "employee" +# PropertyValueEscapedString | The primary key of the object containing the attachment. +primary_key = 50030 +# PropertyApiName | The API name of the attachment property. To find the API name for your attachment, check the **Ontology Manager** or use the **Get object type** endpoint. +property = "performance" +# AttachmentRid | The RID of the attachment. +attachment_rid = "ri.attachments.main.attachment.bb32154e-e043-4b00-9461-93136ca96b6f" +# Optional[SdkPackageRid] | The package rid of the generated SDK. +sdk_package_rid = None +# Optional[SdkVersion] | The version of the generated SDK. +sdk_version = None + + +try: + api_response = client.ontologies.AttachmentProperty.read_attachment_by_rid( + ontology, + object_type, + primary_key, + property, + attachment_rid, + sdk_package_rid=sdk_package_rid, + sdk_version=sdk_version, + ) + print("The read_attachment_by_rid response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling AttachmentProperty.read_attachment_by_rid: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | bytes | Success response. | */* | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + diff --git a/docs/v2/Ontologies/CipherTextProperty.md b/docs/v2/Ontologies/CipherTextProperty.md new file mode 100644 index 000000000..48f43bf9f --- /dev/null +++ b/docs/v2/Ontologies/CipherTextProperty.md @@ -0,0 +1,65 @@ +# CipherTextProperty + +Method | HTTP request | Release Stage | +------------- | ------------- | ----- | +[**decrypt**](#decrypt) | **GET** /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/ciphertexts/{property}/decrypt | Public Beta | + +# **decrypt** +Decrypt the value of a ciphertext property. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**ontology** | OntologyIdentifier | | | +**object_type** | ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. | | +**primary_key** | PropertyValueEscapedString | The primary key of the object with the CipherText property. | | +**property** | PropertyApiName | The API name of the CipherText property. To find the API name for your CipherText property, check the **Ontology Manager** or use the **Get object type** endpoint. | | + +### Return type +**DecryptionResult** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# OntologyIdentifier +ontology = "palantir" +# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. +object_type = "employee" +# PropertyValueEscapedString | The primary key of the object with the CipherText property. +primary_key = 50030 +# PropertyApiName | The API name of the CipherText property. To find the API name for your CipherText property, check the **Ontology Manager** or use the **Get object type** endpoint. +property = "performance" + + +try: + api_response = client.ontologies.CipherTextProperty.decrypt( + ontology, object_type, primary_key, property + ) + print("The decrypt response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling CipherTextProperty.decrypt: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | DecryptionResult | Success response. | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + diff --git a/docs/v2/Ontologies/LinkedObject.md b/docs/v2/Ontologies/LinkedObject.md new file mode 100644 index 000000000..c60ec0cc7 --- /dev/null +++ b/docs/v2/Ontologies/LinkedObject.md @@ -0,0 +1,204 @@ +# LinkedObject + +Method | HTTP request | Release Stage | +------------- | ------------- | ----- | +[**get_linked_object**](#get_linked_object) | **GET** /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/links/{linkType}/{linkedObjectPrimaryKey} | Stable | +[**list_linked_objects**](#list_linked_objects) | **GET** /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/links/{linkType} | Stable | + +# **get_linked_object** +Get a specific linked object that originates from another object. + +If there is no link between the two objects, `LinkedObjectNotFound` is thrown. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**ontology** | OntologyIdentifier | | | +**object_type** | ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. | | +**primary_key** | PropertyValueEscapedString | The primary key of the object from which the links originate. To look up the expected primary key for your object type, use the `Get object type` endpoint or the **Ontology Manager**. | | +**link_type** | LinkTypeApiName | The API name of the link that exists between the object and the requested objects. To find the API name for your link type, check the **Ontology Manager**. | | +**linked_object_primary_key** | PropertyValueEscapedString | The primary key of the requested linked object. To look up the expected primary key for your object type, use the `Get object type` endpoint (passing the linked object type) or the **Ontology Manager**. | | +**branch** | Optional[FoundryBranch] | The Foundry branch to load the object set for multiple object types. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported. | [optional] | +**exclude_rid** | Optional[bool] | A flag to exclude the retrieval of the `__rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2. | [optional] | +**sdk_package_rid** | Optional[SdkPackageRid] | The package rid of the generated SDK. | [optional] | +**sdk_version** | Optional[SdkVersion] | The version of the generated SDK. | [optional] | +**select** | Optional[List[SelectedPropertyApiName]] | The properties of the object type that should be included in the response. Omit this parameter to get all the properties. | [optional] | + +### Return type +**OntologyObjectV2** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# OntologyIdentifier +ontology = "palantir" +# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. +object_type = "employee" +# PropertyValueEscapedString | The primary key of the object from which the links originate. To look up the expected primary key for your object type, use the `Get object type` endpoint or the **Ontology Manager**. +primary_key = 50030 +# LinkTypeApiName | The API name of the link that exists between the object and the requested objects. To find the API name for your link type, check the **Ontology Manager**. +link_type = "directReport" +# PropertyValueEscapedString | The primary key of the requested linked object. To look up the expected primary key for your object type, use the `Get object type` endpoint (passing the linked object type) or the **Ontology Manager**. +linked_object_primary_key = 80060 +# Optional[FoundryBranch] | The Foundry branch to load the object set for multiple object types. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported. +branch = None +# Optional[bool] | A flag to exclude the retrieval of the `__rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2. +exclude_rid = None +# Optional[SdkPackageRid] | The package rid of the generated SDK. +sdk_package_rid = None +# Optional[SdkVersion] | The version of the generated SDK. +sdk_version = None +# Optional[List[SelectedPropertyApiName]] | The properties of the object type that should be included in the response. Omit this parameter to get all the properties. +select = None + + +try: + api_response = client.ontologies.LinkedObject.get_linked_object( + ontology, + object_type, + primary_key, + link_type, + linked_object_primary_key, + branch=branch, + exclude_rid=exclude_rid, + sdk_package_rid=sdk_package_rid, + sdk_version=sdk_version, + select=select, + ) + print("The get_linked_object response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling LinkedObject.get_linked_object: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | OntologyObjectV2 | Success response. | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **list_linked_objects** +Lists the linked objects for a specific object and the given link type. + +Note that this endpoint does not guarantee consistency. Changes to the data could result in missing or +repeated objects in the response pages. + +For Object Storage V1 backed objects, this endpoint returns a maximum of 10,000 objects. After 10,000 objects have been returned and if more objects +are available, attempting to load another page will result in an `ObjectsExceededLimit` error being returned. There is no limit on Object Storage V2 backed objects. + +Each page may be smaller or larger than the requested page size. However, it +is guaranteed that if there are more results available, at least one result will be present +in the response. + +Note that null value properties will not be returned. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**ontology** | OntologyIdentifier | | | +**object_type** | ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. | | +**primary_key** | PropertyValueEscapedString | The primary key of the object from which the links originate. To look up the expected primary key for your object type, use the `Get object type` endpoint or the **Ontology Manager**. | | +**link_type** | LinkTypeApiName | The API name of the link that exists between the object and the requested objects. To find the API name for your link type, check the **Ontology Manager**. | | +**branch** | Optional[FoundryBranch] | The Foundry branch to list linked objects from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. | [optional] | +**exclude_rid** | Optional[bool] | A flag to exclude the retrieval of the `__rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2. | [optional] | +**order_by** | Optional[OrderBy] | | [optional] | +**page_size** | Optional[PageSize] | The desired size of the page to be returned. Defaults to 1,000. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. | [optional] | +**page_token** | Optional[PageToken] | | [optional] | +**sdk_package_rid** | Optional[SdkPackageRid] | The package rid of the generated SDK. | [optional] | +**sdk_version** | Optional[SdkVersion] | The version of the generated SDK. | [optional] | +**select** | Optional[List[SelectedPropertyApiName]] | The properties of the object type that should be included in the response. Omit this parameter to get all the properties. | [optional] | +**snapshot** | Optional[bool] | A flag to use snapshot consistency when paging. Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. This defaults to false if not specified, which means you will always get the latest results. | [optional] | + +### Return type +**ListLinkedObjectsResponseV2** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# OntologyIdentifier +ontology = "palantir" +# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. +object_type = "employee" +# PropertyValueEscapedString | The primary key of the object from which the links originate. To look up the expected primary key for your object type, use the `Get object type` endpoint or the **Ontology Manager**. +primary_key = 50030 +# LinkTypeApiName | The API name of the link that exists between the object and the requested objects. To find the API name for your link type, check the **Ontology Manager**. +link_type = "directReport" +# Optional[FoundryBranch] | The Foundry branch to list linked objects from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. +branch = None +# Optional[bool] | A flag to exclude the retrieval of the `__rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2. +exclude_rid = None +# Optional[OrderBy] +order_by = None +# Optional[PageSize] | The desired size of the page to be returned. Defaults to 1,000. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. +page_size = None +# Optional[PageToken] +page_token = None +# Optional[SdkPackageRid] | The package rid of the generated SDK. +sdk_package_rid = None +# Optional[SdkVersion] | The version of the generated SDK. +sdk_version = None +# Optional[List[SelectedPropertyApiName]] | The properties of the object type that should be included in the response. Omit this parameter to get all the properties. +select = None +# Optional[bool] | A flag to use snapshot consistency when paging. Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. This defaults to false if not specified, which means you will always get the latest results. +snapshot = None + + +try: + for linked_object in client.ontologies.LinkedObject.list_linked_objects( + ontology, + object_type, + primary_key, + link_type, + branch=branch, + exclude_rid=exclude_rid, + order_by=order_by, + page_size=page_size, + page_token=page_token, + sdk_package_rid=sdk_package_rid, + sdk_version=sdk_version, + select=select, + snapshot=snapshot, + ): + pprint(linked_object) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling LinkedObject.list_linked_objects: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | ListLinkedObjectsResponseV2 | Success response. | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + diff --git a/docs/v2/Ontologies/MediaReferenceProperty.md b/docs/v2/Ontologies/MediaReferenceProperty.md new file mode 100644 index 000000000..53eeb17ff --- /dev/null +++ b/docs/v2/Ontologies/MediaReferenceProperty.md @@ -0,0 +1,222 @@ +# MediaReferenceProperty + +Method | HTTP request | Release Stage | +------------- | ------------- | ----- | +[**get_media_content**](#get_media_content) | **GET** /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/media/{property}/content | Public Beta | +[**get_media_metadata**](#get_media_metadata) | **GET** /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/media/{property}/metadata | Private Beta | +[**upload**](#upload) | **POST** /v2/ontologies/{ontology}/objectTypes/{objectType}/media/{property}/upload | Public Beta | + +# **get_media_content** +Gets the content of a media item referenced by this property. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**ontology** | OntologyIdentifier | | | +**object_type** | ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. | | +**primary_key** | PropertyValueEscapedString | The primary key of the object with the media reference property. | | +**property** | PropertyApiName | The API name of the media reference property. To find the API name, check the **Ontology Manager** or use the **Get object type** endpoint. | | +**preview** | Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. | [optional] | +**sdk_package_rid** | Optional[SdkPackageRid] | The package rid of the generated SDK. | [optional] | +**sdk_version** | Optional[SdkVersion] | The version of the generated SDK. | [optional] | + +### Return type +**bytes** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# OntologyIdentifier +ontology = "palantir" +# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. +object_type = "employee" +# PropertyValueEscapedString | The primary key of the object with the media reference property. +primary_key = 50030 +# PropertyApiName | The API name of the media reference property. To find the API name, check the **Ontology Manager** or use the **Get object type** endpoint. +property = "profile_picture" +# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. +preview = None +# Optional[SdkPackageRid] | The package rid of the generated SDK. +sdk_package_rid = None +# Optional[SdkVersion] | The version of the generated SDK. +sdk_version = None + + +try: + api_response = client.ontologies.MediaReferenceProperty.get_media_content( + ontology, + object_type, + primary_key, + property, + preview=preview, + sdk_package_rid=sdk_package_rid, + sdk_version=sdk_version, + ) + print("The get_media_content response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling MediaReferenceProperty.get_media_content: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | bytes | The content stream. | */* | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **get_media_metadata** +Gets metadata about the media item referenced by this property. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**ontology** | OntologyIdentifier | | | +**object_type** | ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. | | +**primary_key** | PropertyValueEscapedString | The primary key of the object with the media reference property. | | +**property** | PropertyApiName | The API name of the media reference backed property. To find the API name, check the **Ontology Manager** or use the **Get object type** endpoint. | | +**preview** | Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. | [optional] | +**sdk_package_rid** | Optional[SdkPackageRid] | The package rid of the generated SDK. | [optional] | +**sdk_version** | Optional[SdkVersion] | The version of the generated SDK. | [optional] | + +### Return type +**MediaMetadata** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# OntologyIdentifier +ontology = "palantir" +# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. +object_type = "employee" +# PropertyValueEscapedString | The primary key of the object with the media reference property. +primary_key = 50030 +# PropertyApiName | The API name of the media reference backed property. To find the API name, check the **Ontology Manager** or use the **Get object type** endpoint. +property = None +# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. +preview = None +# Optional[SdkPackageRid] | The package rid of the generated SDK. +sdk_package_rid = None +# Optional[SdkVersion] | The version of the generated SDK. +sdk_version = None + + +try: + api_response = client.ontologies.MediaReferenceProperty.get_media_metadata( + ontology, + object_type, + primary_key, + property, + preview=preview, + sdk_package_rid=sdk_package_rid, + sdk_version=sdk_version, + ) + print("The get_media_metadata response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling MediaReferenceProperty.get_media_metadata: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | MediaMetadata | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **upload** +Uploads a media item to the media set which backs the specified property. The property must be backed by a single media set and branch, otherwise an error will be thrown. +The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**ontology** | OntologyIdentifier | | | +**object_type** | ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. | | +**property** | PropertyApiName | The API name of the media reference property. To find the API name, check the **Ontology Manager** or use the **Get object type** endpoint. | | +**body** | bytes | Body of the request | | +**media_item_path** | Optional[MediaItemPath] | A path for the media item within its backing media set. Required if the backing media set requires paths. | [optional] | +**preview** | Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. | [optional] | + +### Return type +**MediaReference** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# OntologyIdentifier +ontology = "palantir" +# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. +object_type = "employee" +# PropertyApiName | The API name of the media reference property. To find the API name, check the **Ontology Manager** or use the **Get object type** endpoint. +property = "profile_picture" +# bytes | Body of the request +body = None +# Optional[MediaItemPath] | A path for the media item within its backing media set. Required if the backing media set requires paths. +media_item_path = "my-file.png" +# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. +preview = None + + +try: + api_response = client.ontologies.MediaReferenceProperty.upload( + ontology, object_type, property, body, media_item_path=media_item_path, preview=preview + ) + print("The upload response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling MediaReferenceProperty.upload: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | MediaReference | The media reference for the uploaded media. | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + diff --git a/docs/v2/Ontologies/ObjectType.md b/docs/v2/Ontologies/ObjectType.md new file mode 100644 index 000000000..08288bce5 --- /dev/null +++ b/docs/v2/Ontologies/ObjectType.md @@ -0,0 +1,316 @@ +# ObjectType + +Method | HTTP request | Release Stage | +------------- | ------------- | ----- | +[**get**](#get) | **GET** /v2/ontologies/{ontology}/objectTypes/{objectType} | Stable | +[**get_full_metadata**](#get_full_metadata) | **GET** /v2/ontologies/{ontology}/objectTypes/{objectType}/fullMetadata | Private Beta | +[**get_outgoing_link_type**](#get_outgoing_link_type) | **GET** /v2/ontologies/{ontology}/objectTypes/{objectType}/outgoingLinkTypes/{linkType} | Stable | +[**list**](#list) | **GET** /v2/ontologies/{ontology}/objectTypes | Stable | +[**list_outgoing_link_types**](#list_outgoing_link_types) | **GET** /v2/ontologies/{ontology}/objectTypes/{objectType}/outgoingLinkTypes | Stable | + +# **get** +Gets a specific object type with the given API name. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**ontology** | OntologyIdentifier | | | +**object_type** | ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. | | +**branch** | Optional[FoundryBranch] | The Foundry branch to load the object type definition from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. | [optional] | + +### Return type +**ObjectTypeV2** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# OntologyIdentifier +ontology = "palantir" +# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. +object_type = "employee" +# Optional[FoundryBranch] | The Foundry branch to load the object type definition from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. +branch = None + + +try: + api_response = client.ontologies.Ontology.ObjectType.get(ontology, object_type, branch=branch) + print("The get response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling ObjectType.get: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | ObjectTypeV2 | Success response. | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **get_full_metadata** +Gets the full metadata for a specific object type with the given API name. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**ontology** | OntologyIdentifier | | | +**object_type** | ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. | | +**branch** | Optional[FoundryBranch] | The Foundry branch to load the action type definition from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. | [optional] | +**preview** | Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. | [optional] | +**sdk_package_rid** | Optional[SdkPackageRid] | The package rid of the generated SDK. | [optional] | +**sdk_version** | Optional[SdkVersion] | The version of the generated SDK. | [optional] | + +### Return type +**ObjectTypeFullMetadata** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# OntologyIdentifier +ontology = "palantir" +# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. +object_type = "employee" +# Optional[FoundryBranch] | The Foundry branch to load the action type definition from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. +branch = None +# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. +preview = None +# Optional[SdkPackageRid] | The package rid of the generated SDK. +sdk_package_rid = None +# Optional[SdkVersion] | The version of the generated SDK. +sdk_version = None + + +try: + api_response = client.ontologies.Ontology.ObjectType.get_full_metadata( + ontology, + object_type, + branch=branch, + preview=preview, + sdk_package_rid=sdk_package_rid, + sdk_version=sdk_version, + ) + print("The get_full_metadata response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling ObjectType.get_full_metadata: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | ObjectTypeFullMetadata | Success response. | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **get_outgoing_link_type** +Get an outgoing link for an object type. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**ontology** | OntologyIdentifier | | | +**object_type** | ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager** application. | | +**link_type** | LinkTypeApiName | The API name of the outgoing link. To find the API name for your link type, check the **Ontology Manager**. | | +**branch** | Optional[FoundryBranch] | The Foundry branch to get the outgoing link types for an object type from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. | [optional] | + +### Return type +**LinkTypeSideV2** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# OntologyIdentifier +ontology = "palantir" +# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager** application. +object_type = "Employee" +# LinkTypeApiName | The API name of the outgoing link. To find the API name for your link type, check the **Ontology Manager**. +link_type = "directReport" +# Optional[FoundryBranch] | The Foundry branch to get the outgoing link types for an object type from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. +branch = None + + +try: + api_response = client.ontologies.Ontology.ObjectType.get_outgoing_link_type( + ontology, object_type, link_type, branch=branch + ) + print("The get_outgoing_link_type response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling ObjectType.get_outgoing_link_type: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | LinkTypeSideV2 | Success response. | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **list** +Lists the object types for the given Ontology. + +Each page may be smaller or larger than the requested page size. However, it is guaranteed that if there are +more results available, at least one result will be present in the +response. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**ontology** | OntologyIdentifier | | | +**branch** | Optional[FoundryBranch] | The Foundry branch to list the object types from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. | [optional] | +**page_size** | Optional[PageSize] | The desired size of the page to be returned. Defaults to 500. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. | [optional] | +**page_token** | Optional[PageToken] | | [optional] | + +### Return type +**ListObjectTypesV2Response** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# OntologyIdentifier +ontology = "palantir" +# Optional[FoundryBranch] | The Foundry branch to list the object types from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. +branch = None +# Optional[PageSize] | The desired size of the page to be returned. Defaults to 500. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. +page_size = None +# Optional[PageToken] +page_token = None + + +try: + for object_type in client.ontologies.Ontology.ObjectType.list( + ontology, branch=branch, page_size=page_size, page_token=page_token + ): + pprint(object_type) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling ObjectType.list: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | ListObjectTypesV2Response | Success response. | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **list_outgoing_link_types** +List the outgoing links for an object type. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**ontology** | OntologyIdentifier | | | +**object_type** | ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager** application. | | +**branch** | Optional[FoundryBranch] | The Foundry branch to load the outgoing link types from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. | [optional] | +**page_size** | Optional[PageSize] | The desired size of the page to be returned. | [optional] | +**page_token** | Optional[PageToken] | | [optional] | + +### Return type +**ListOutgoingLinkTypesResponseV2** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# OntologyIdentifier +ontology = "palantir" +# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager** application. +object_type = "Flight" +# Optional[FoundryBranch] | The Foundry branch to load the outgoing link types from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. +branch = None +# Optional[PageSize] | The desired size of the page to be returned. +page_size = None +# Optional[PageToken] +page_token = None + + +try: + for object_type in client.ontologies.Ontology.ObjectType.list_outgoing_link_types( + ontology, object_type, branch=branch, page_size=page_size, page_token=page_token + ): + pprint(object_type) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling ObjectType.list_outgoing_link_types: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | ListOutgoingLinkTypesResponseV2 | Success response. | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + diff --git a/docs/v2/Ontologies/Ontology.md b/docs/v2/Ontologies/Ontology.md new file mode 100644 index 000000000..0db73a676 --- /dev/null +++ b/docs/v2/Ontologies/Ontology.md @@ -0,0 +1,232 @@ +# Ontology + +Method | HTTP request | Release Stage | +------------- | ------------- | ----- | +[**get**](#get) | **GET** /v2/ontologies/{ontology} | Stable | +[**get_full_metadata**](#get_full_metadata) | **GET** /v2/ontologies/{ontology}/fullMetadata | Public Beta | +[**list**](#list) | **GET** /v2/ontologies | Stable | +[**load_metadata**](#load_metadata) | **POST** /v2/ontologies/{ontology}/metadata | Private Beta | + +# **get** +Gets a specific ontology for a given Ontology API name or RID. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**ontology** | OntologyIdentifier | | | + +### Return type +**OntologyV2** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# OntologyIdentifier +ontology = "palantir" + + +try: + api_response = client.ontologies.Ontology.get(ontology) + print("The get response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Ontology.get: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | OntologyV2 | Success response. | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **get_full_metadata** +Get the full Ontology metadata. This includes the objects, links, actions, queries, and interfaces. +This endpoint is designed to return as much metadata as possible in a single request to support OSDK workflows. +It may omit certain entities rather than fail the request. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**ontology** | OntologyIdentifier | | | +**branch** | Optional[FoundryBranch] | The Foundry branch to load metadata from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. | [optional] | + +### Return type +**OntologyFullMetadata** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# OntologyIdentifier +ontology = "palantir" +# Optional[FoundryBranch] | The Foundry branch to load metadata from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. +branch = None + + +try: + api_response = client.ontologies.Ontology.get_full_metadata(ontology, branch=branch) + print("The get_full_metadata response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Ontology.get_full_metadata: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | OntologyFullMetadata | Success response. | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **list** +Lists the Ontologies visible to the current user. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | + +### Return type +**ListOntologiesV2Response** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + + +try: + api_response = client.ontologies.Ontology.list() + print("The list response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Ontology.list: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | ListOntologiesV2Response | Success response. | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **load_metadata** +Load Ontology metadata for the requested object, link, action, query, and interface types. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**ontology** | OntologyIdentifier | | | +**action_types** | List[ActionTypeApiName] | | | +**interface_types** | List[InterfaceTypeApiName] | | | +**link_types** | List[LinkTypeApiName] | | | +**object_types** | List[ObjectTypeApiName] | | | +**query_types** | List[VersionedQueryTypeApiName] | | | +**branch** | Optional[FoundryBranch] | The Foundry branch to load metadata from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. | [optional] | +**preview** | Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. | [optional] | + +### Return type +**OntologyFullMetadata** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# OntologyIdentifier +ontology = "palantir" +# List[ActionTypeApiName] +action_types = None +# List[InterfaceTypeApiName] +interface_types = None +# List[LinkTypeApiName] +link_types = None +# List[ObjectTypeApiName] +object_types = None +# List[VersionedQueryTypeApiName] +query_types = None +# Optional[FoundryBranch] | The Foundry branch to load metadata from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. +branch = None +# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. +preview = None + + +try: + api_response = client.ontologies.Ontology.load_metadata( + ontology, + action_types=action_types, + interface_types=interface_types, + link_types=link_types, + object_types=object_types, + query_types=query_types, + branch=branch, + preview=preview, + ) + print("The load_metadata response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Ontology.load_metadata: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | OntologyFullMetadata | Success response. | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + diff --git a/docs/v2/Ontologies/OntologyInterface.md b/docs/v2/Ontologies/OntologyInterface.md new file mode 100644 index 000000000..50d95a2b4 --- /dev/null +++ b/docs/v2/Ontologies/OntologyInterface.md @@ -0,0 +1,693 @@ +# OntologyInterface + +Method | HTTP request | Release Stage | +------------- | ------------- | ----- | +[**aggregate**](#aggregate) | **POST** /v2/ontologies/{ontology}/interfaces/{interfaceType}/aggregate | Private Beta | +[**get**](#get) | **GET** /v2/ontologies/{ontology}/interfaceTypes/{interfaceType} | Public Beta | +[**get_outgoing_interface_link_type**](#get_outgoing_interface_link_type) | **GET** /v2/ontologies/{ontology}/interfaceTypes/{interfaceType}/outgoingLinkTypes/{interfaceLinkType} | Private Beta | +[**list**](#list) | **GET** /v2/ontologies/{ontology}/interfaceTypes | Public Beta | +[**list_interface_linked_objects**](#list_interface_linked_objects) | **GET** /v2/ontologies/{ontology}/interfaces/{interfaceType}/{objectType}/{primaryKey}/links/{interfaceLinkType} | Private Beta | +[**list_objects_for_interface**](#list_objects_for_interface) | **GET** /v2/ontologies/{ontology}/interfaces/{interfaceType} | Private Beta | +[**list_outgoing_interface_link_types**](#list_outgoing_interface_link_types) | **GET** /v2/ontologies/{ontology}/interfaceTypes/{interfaceType}/outgoingLinkTypes | Private Beta | +[**search**](#search) | **POST** /v2/ontologies/{ontology}/interfaces/{interfaceType}/search | Private Beta | + +# **aggregate** +:::callout{theme=warning title=Warning} +This endpoint will be removed once TS OSDK is updated to use `objectSets/aggregate` with interface object +sets. +::: +Perform functions on object fields in the specified ontology and of the specified interface type. Any +properties specified in the query must be shared property type API names defined on the interface. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**ontology** | OntologyIdentifier | | | +**interface_type** | InterfaceTypeApiName | The API name of the interface type. To find the API name, use the **List interface types** endpoint or check the **Ontology Manager**. | | +**aggregation** | List[AggregationV2] | | | +**group_by** | List[AggregationGroupByV2] | | | +**accuracy** | Optional[AggregationAccuracyRequest] | | [optional] | +**branch** | Optional[FoundryBranch] | The Foundry branch to aggregate objects from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. | [optional] | +**preview** | Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. | [optional] | +**where** | Optional[SearchJsonQueryV2] | | [optional] | + +### Return type +**AggregateObjectsResponseV2** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# OntologyIdentifier +ontology = "palantir" +# InterfaceTypeApiName | The API name of the interface type. To find the API name, use the **List interface types** endpoint or check the **Ontology Manager**. +interface_type = "Employee" +# List[AggregationV2] +aggregation = [ + {"type": "min", "field": "tenure", "name": "min_tenure"}, + {"type": "avg", "field": "tenure", "name": "avg_tenure"}, +] +# List[AggregationGroupByV2] +group_by = [ + { + "field": "startDate", + "type": "range", + "ranges": [{"startValue": "2020-01-01", "endValue": "2020-06-01"}], + }, + {"field": "city", "type": "exact"}, +] +# Optional[AggregationAccuracyRequest] +accuracy = None +# Optional[FoundryBranch] | The Foundry branch to aggregate objects from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. +branch = None +# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. +preview = None +# Optional[SearchJsonQueryV2] +where = {"type": "eq", "field": "name", "value": "john"} + + +try: + api_response = client.ontologies.OntologyInterface.aggregate( + ontology, + interface_type, + aggregation=aggregation, + group_by=group_by, + accuracy=accuracy, + branch=branch, + preview=preview, + where=where, + ) + print("The aggregate response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling OntologyInterface.aggregate: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | AggregateObjectsResponseV2 | Success response. | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **get** +Gets a specific interface type with the given API name. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**ontology** | OntologyIdentifier | | | +**interface_type** | InterfaceTypeApiName | The API name of the interface type. To find the API name, use the **List interface types** endpoint or check the **Ontology Manager**. | | +**branch** | Optional[FoundryBranch] | The Foundry branch to load the interface type definition from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. | [optional] | +**preview** | Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. | [optional] | +**sdk_package_rid** | Optional[SdkPackageRid] | The package rid of the generated SDK. | [optional] | +**sdk_version** | Optional[SdkVersion] | The version of the generated SDK. | [optional] | + +### Return type +**InterfaceType** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# OntologyIdentifier +ontology = "palantir" +# InterfaceTypeApiName | The API name of the interface type. To find the API name, use the **List interface types** endpoint or check the **Ontology Manager**. +interface_type = "Employee" +# Optional[FoundryBranch] | The Foundry branch to load the interface type definition from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. +branch = None +# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. +preview = None +# Optional[SdkPackageRid] | The package rid of the generated SDK. +sdk_package_rid = None +# Optional[SdkVersion] | The version of the generated SDK. +sdk_version = None + + +try: + api_response = client.ontologies.OntologyInterface.get( + ontology, + interface_type, + branch=branch, + preview=preview, + sdk_package_rid=sdk_package_rid, + sdk_version=sdk_version, + ) + print("The get response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling OntologyInterface.get: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | InterfaceType | Success response. | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **get_outgoing_interface_link_type** +Get an outgoing interface link type for an interface type. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**ontology** | OntologyIdentifier | | | +**interface_type** | InterfaceTypeApiName | The API name of the interface type. To find the API name, use the **List interface types** endpoint or check the **Ontology Manager** application. | | +**interface_link_type** | InterfaceLinkTypeApiName | The API name of the outgoing interface link. To find the API name for your interface link type, check the **Ontology Manager** page for the parent interface. | | +**branch** | Optional[FoundryBranch] | The Foundry branch to get the outgoing link types for an object type from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. | [optional] | + +### Return type +**InterfaceLinkType** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# OntologyIdentifier +ontology = "palantir" +# InterfaceTypeApiName | The API name of the interface type. To find the API name, use the **List interface types** endpoint or check the **Ontology Manager** application. +interface_type = "Employee" +# InterfaceLinkTypeApiName | The API name of the outgoing interface link. To find the API name for your interface link type, check the **Ontology Manager** page for the parent interface. +interface_link_type = "worksAt" +# Optional[FoundryBranch] | The Foundry branch to get the outgoing link types for an object type from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. +branch = None + + +try: + api_response = client.ontologies.OntologyInterface.get_outgoing_interface_link_type( + ontology, interface_type, interface_link_type, branch=branch + ) + print("The get_outgoing_interface_link_type response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling OntologyInterface.get_outgoing_interface_link_type: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | InterfaceLinkType | Success response. | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **list** +Lists the interface types for the given Ontology. + +Each page may be smaller than the requested page size. However, it is guaranteed that if there are more +results available, at least one result will be present in the response. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**ontology** | OntologyIdentifier | | | +**branch** | Optional[FoundryBranch] | The Foundry branch to list the interface types from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. | [optional] | +**page_size** | Optional[PageSize] | The desired size of the page to be returned. Defaults to 500. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. | [optional] | +**page_token** | Optional[PageToken] | | [optional] | +**preview** | Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. | [optional] | + +### Return type +**ListInterfaceTypesResponse** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# OntologyIdentifier +ontology = "palantir" +# Optional[FoundryBranch] | The Foundry branch to list the interface types from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. +branch = None +# Optional[PageSize] | The desired size of the page to be returned. Defaults to 500. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. +page_size = None +# Optional[PageToken] +page_token = None +# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. +preview = None + + +try: + for ontology_interface in client.ontologies.OntologyInterface.list( + ontology, branch=branch, page_size=page_size, page_token=page_token, preview=preview + ): + pprint(ontology_interface) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling OntologyInterface.list: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | ListInterfaceTypesResponse | Success response. | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **list_interface_linked_objects** +Lists the linked objects for a specific object and the given interface link type. + +Note that this endpoint does not guarantee consistency. Changes to the data could result in missing or +repeated objects in the response pages. + +For Object Storage V1 backed objects, this endpoint returns a maximum of 10,000 objects. After 10,000 objects have been returned and if more objects +are available, attempting to load another page will result in an `ObjectsExceededLimit` error being returned. There is no limit on Object Storage V2 backed objects. + +Each page may be smaller or larger than the requested page size. However, it +is guaranteed that if there are more results available, at least one result will be present +in the response. + +Note that null value properties will not be returned. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**ontology** | OntologyIdentifier | The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. | | +**interface_type** | InterfaceTypeApiName | The API name of the interface type. To find the API name, use the **List interface types** endpoint or check the **Ontology Manager** application. | | +**object_type** | ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. | | +**primary_key** | PropertyValueEscapedString | The primary key of the object from which to **start** the interface link traversal. To look up the expected primary key for your object type, use the `Get object type` endpoint or the **Ontology Manager**. | | +**interface_link_type** | InterfaceLinkTypeApiName | The API name of the outgoing interface link. To find the API name for your interface link type, check the **Ontology Manager** page for the parent interface. | | +**branch** | Optional[FoundryBranch] | The Foundry branch to get the outgoing link types for an object type from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. | [optional] | +**exclude_rid** | Optional[bool] | A flag to exclude the retrieval of the `__rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2. | [optional] | +**order_by** | Optional[OrderBy] | | [optional] | +**page_size** | Optional[PageSize] | The desired size of the page to be returned. Defaults to 1,000. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. | [optional] | +**page_token** | Optional[PageToken] | | [optional] | +**preview** | Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. | [optional] | +**select** | Optional[List[SelectedPropertyApiName]] | The properties of the object type that should be included in the response. Omit this parameter to get all the properties. | [optional] | +**snapshot** | Optional[bool] | A flag to use snapshot consistency when paging. Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. This defaults to false if not specified, which means you will always get the latest results. | [optional] | + +### Return type +**ListInterfaceLinkedObjectsResponse** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# OntologyIdentifier | The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. +ontology = "palantir" +# InterfaceTypeApiName | The API name of the interface type. To find the API name, use the **List interface types** endpoint or check the **Ontology Manager** application. +interface_type = "Employee" +# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. +object_type = "employee" +# PropertyValueEscapedString | The primary key of the object from which to **start** the interface link traversal. To look up the expected primary key for your object type, use the `Get object type` endpoint or the **Ontology Manager**. +primary_key = None +# InterfaceLinkTypeApiName | The API name of the outgoing interface link. To find the API name for your interface link type, check the **Ontology Manager** page for the parent interface. +interface_link_type = "worksAt" +# Optional[FoundryBranch] | The Foundry branch to get the outgoing link types for an object type from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. +branch = None +# Optional[bool] | A flag to exclude the retrieval of the `__rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2. +exclude_rid = None +# Optional[OrderBy] +order_by = None +# Optional[PageSize] | The desired size of the page to be returned. Defaults to 1,000. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. +page_size = None +# Optional[PageToken] +page_token = None +# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. +preview = None +# Optional[List[SelectedPropertyApiName]] | The properties of the object type that should be included in the response. Omit this parameter to get all the properties. +select = None +# Optional[bool] | A flag to use snapshot consistency when paging. Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. This defaults to false if not specified, which means you will always get the latest results. +snapshot = None + + +try: + for ontology_interface in client.ontologies.OntologyInterface.list_interface_linked_objects( + ontology, + interface_type, + object_type, + primary_key, + interface_link_type, + branch=branch, + exclude_rid=exclude_rid, + order_by=order_by, + page_size=page_size, + page_token=page_token, + preview=preview, + select=select, + snapshot=snapshot, + ): + pprint(ontology_interface) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling OntologyInterface.list_interface_linked_objects: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | ListInterfaceLinkedObjectsResponse | Success response. | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **list_objects_for_interface** +Lists the objects for the given Ontology and interface type. + +Note that this endpoint does not guarantee consistency, unless you use the snapshot flag specified below. Changes to the data could result in missing or +repeated objects in the response pages. + +For Object Storage V1 backed objects, this endpoint returns a maximum of 10,000 objects. After 10,000 objects have been returned and if more objects +are available, attempting to load another page will result in an `ObjectsExceededLimit` error being returned. There is no limit on Object Storage V2 backed objects. + +Each page may be smaller or larger than the requested page size. However, it +is guaranteed that if there are more results available, at least one result will be present +in the response. + +Note that null value properties will not be returned. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**ontology** | OntologyIdentifier | The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. | | +**interface_type** | InterfaceTypeApiName | The API name of the interface type. To find the API name, use the **List interface types** endpoint or check the **Ontology Manager**. | | +**branch** | Optional[FoundryBranch] | The Foundry branch to list objects from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. | [optional] | +**exclude_rid** | Optional[bool] | A flag to exclude the retrieval of the `__rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2. | [optional] | +**order_by** | Optional[OrderBy] | | [optional] | +**page_size** | Optional[PageSize] | The desired size of the page to be returned. Defaults to 1,000. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. | [optional] | +**page_token** | Optional[PageToken] | | [optional] | +**select** | Optional[List[SelectedPropertyApiName]] | The properties of the interface type that should be included in the response. Omit this parameter to get all the properties. | [optional] | +**snapshot** | Optional[bool] | A flag to use snapshot consistency when paging. Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. This defaults to false if not specified, which means you will always get the latest results. | [optional] | + +### Return type +**ListObjectsForInterfaceResponse** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# OntologyIdentifier | The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. +ontology = "palantir" +# InterfaceTypeApiName | The API name of the interface type. To find the API name, use the **List interface types** endpoint or check the **Ontology Manager**. +interface_type = "employee" +# Optional[FoundryBranch] | The Foundry branch to list objects from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. +branch = None +# Optional[bool] | A flag to exclude the retrieval of the `__rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2. +exclude_rid = None +# Optional[OrderBy] +order_by = None +# Optional[PageSize] | The desired size of the page to be returned. Defaults to 1,000. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. +page_size = None +# Optional[PageToken] +page_token = None +# Optional[List[SelectedPropertyApiName]] | The properties of the interface type that should be included in the response. Omit this parameter to get all the properties. +select = None +# Optional[bool] | A flag to use snapshot consistency when paging. Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. This defaults to false if not specified, which means you will always get the latest results. +snapshot = None + + +try: + for ontology_interface in client.ontologies.OntologyInterface.list_objects_for_interface( + ontology, + interface_type, + branch=branch, + exclude_rid=exclude_rid, + order_by=order_by, + page_size=page_size, + page_token=page_token, + select=select, + snapshot=snapshot, + ): + pprint(ontology_interface) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling OntologyInterface.list_objects_for_interface: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | ListObjectsForInterfaceResponse | Success response. | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **list_outgoing_interface_link_types** +List the outgoing interface link types for an interface type. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**ontology** | OntologyIdentifier | | | +**interface_type** | InterfaceTypeApiName | The API name of the interface type. To find the API name, use the **List interface types** endpoint or check the **Ontology Manager** application. | | +**branch** | Optional[FoundryBranch] | The Foundry branch to get the outgoing link type from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. | [optional] | + +### Return type +**ListOutgoingInterfaceLinkTypesResponse** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# OntologyIdentifier +ontology = "palantir" +# InterfaceTypeApiName | The API name of the interface type. To find the API name, use the **List interface types** endpoint or check the **Ontology Manager** application. +interface_type = "Employee" +# Optional[FoundryBranch] | The Foundry branch to get the outgoing link type from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. +branch = None + + +try: + api_response = client.ontologies.OntologyInterface.list_outgoing_interface_link_types( + ontology, interface_type, branch=branch + ) + print("The list_outgoing_interface_link_types response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling OntologyInterface.list_outgoing_interface_link_types: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | ListOutgoingInterfaceLinkTypesResponse | Success response. | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **search** +:::callout{theme=warning title=Warning} + This endpoint will be removed once TS OSDK is updated to use `objectSets/loadObjects` with interface object + sets. +::: +Search for objects in the specified ontology and interface type. Any properties specified in the "where" or +"orderBy" parameters must be shared property type API names defined on the interface. The following search +queries are supported: + +| Query type | Description | Supported Types | +|-----------------------------------------|-------------------------------------------------------------------------------------------------------------------|---------------------------------| +| lt | The provided property is less than the provided value. | number, string, date, timestamp | +| gt | The provided property is greater than the provided value. | number, string, date, timestamp | +| lte | The provided property is less than or equal to the provided value. | number, string, date, timestamp | +| gte | The provided property is greater than or equal to the provided value. | number, string, date, timestamp | +| eq | The provided property is exactly equal to the provided value. | number, string, date, timestamp | +| isNull | The provided property is (or is not) null. | all | +| contains | The provided property contains the provided value. | array | +| not | The sub-query does not match. | N/A (applied on a query) | +| and | All the sub-queries match. | N/A (applied on queries) | +| or | At least one of the sub-queries match. | N/A (applied on queries) | +| startsWith | The provided property starts with the provided term. | string | +| containsAllTermsInOrderPrefixLastTerm | The provided property contains all the terms provided in order. The last term can be a partial prefix match. | string | +| containsAllTermsInOrder | The provided property contains the provided terms as a substring. | string | +| containsAnyTerm | The provided property contains at least one of the terms separated by whitespace. | string | +| containsAllTerms | The provided property contains all the terms separated by whitespace. | string | + +Queries can be at most three levels deep. By default, terms are separated by whitespace or punctuation (`?!,:;-[](){}'"~`). Periods (`.`) on their own are ignored. +Partial terms are not matched by terms filters except where explicitly noted. + +Attempting to use an unsupported query will result in a validation error. Third-party applications using this +endpoint via OAuth2 must request the following operation scope: `api:ontologies-read`. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**ontology** | OntologyIdentifier | | | +**interface_type** | InterfaceTypeApiName | The API name of the interface type. To find the API name, use the **List interface types** endpoint or check the **Ontology Manager**. | | +**augmented_interface_property_types** | Dict[InterfaceTypeApiName, List[InterfacePropertyApiName]] | A map from interface type API name to a list of interface property type API names. For each returned object, if the object implements an interface that is a key in the map, then we augment the response for that object type with the list of properties specified in the value. | | +**augmented_properties** | Dict[ObjectTypeApiName, List[PropertyApiName]] | A map from object type API name to a list of property type API names. For each returned object, if the object’s object type is a key in the map, then we augment the response for that object type with the list of properties specified in the value. | | +**augmented_shared_property_types** | Dict[InterfaceTypeApiName, List[SharedPropertyTypeApiName]] | A map from interface type API name to a list of shared property type API names. For each returned object, if the object implements an interface that is a key in the map, then we augment the response for that object type with the list of properties specified in the value. | | +**other_interface_types** | List[InterfaceTypeApiName] | A list of interface type API names. Object types must implement all the mentioned interfaces in order to be included in the response. | | +**selected_interface_property_types** | List[InterfacePropertyApiName] | A list of interface property type API names of the interface type that should be included in the response. Omit this parameter to include all properties of the interface type in the response. | | +**selected_object_types** | List[ObjectTypeApiName] | A list of object type API names that should be included in the response. If non-empty, object types that are not mentioned will not be included in the response even if they implement the specified interface. Omit the parameter to include all object types. | | +**selected_shared_property_types** | List[SharedPropertyTypeApiName] | A list of shared property type API names of the interface type that should be included in the response. Omit this parameter to include all properties of the interface type in the response. | | +**branch** | Optional[FoundryBranch] | The Foundry branch to search objects from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. | [optional] | +**order_by** | Optional[SearchOrderByV2] | | [optional] | +**page_size** | Optional[PageSize] | | [optional] | +**page_token** | Optional[PageToken] | | [optional] | +**preview** | Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. | [optional] | +**where** | Optional[SearchJsonQueryV2] | | [optional] | + +### Return type +**SearchObjectsResponseV2** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# OntologyIdentifier +ontology = "palantir" +# InterfaceTypeApiName | The API name of the interface type. To find the API name, use the **List interface types** endpoint or check the **Ontology Manager**. +interface_type = "Employee" +# Dict[InterfaceTypeApiName, List[InterfacePropertyApiName]] | A map from interface type API name to a list of interface property type API names. For each returned object, if the object implements an interface that is a key in the map, then we augment the response for that object type with the list of properties specified in the value. +augmented_interface_property_types = None +# Dict[ObjectTypeApiName, List[PropertyApiName]] | A map from object type API name to a list of property type API names. For each returned object, if the object’s object type is a key in the map, then we augment the response for that object type with the list of properties specified in the value. +augmented_properties = None +# Dict[InterfaceTypeApiName, List[SharedPropertyTypeApiName]] | A map from interface type API name to a list of shared property type API names. For each returned object, if the object implements an interface that is a key in the map, then we augment the response for that object type with the list of properties specified in the value. +augmented_shared_property_types = None +# List[InterfaceTypeApiName] | A list of interface type API names. Object types must implement all the mentioned interfaces in order to be included in the response. +other_interface_types = None +# List[InterfacePropertyApiName] | A list of interface property type API names of the interface type that should be included in the response. Omit this parameter to include all properties of the interface type in the response. +selected_interface_property_types = None +# List[ObjectTypeApiName] | A list of object type API names that should be included in the response. If non-empty, object types that are not mentioned will not be included in the response even if they implement the specified interface. Omit the parameter to include all object types. +selected_object_types = None +# List[SharedPropertyTypeApiName] | A list of shared property type API names of the interface type that should be included in the response. Omit this parameter to include all properties of the interface type in the response. +selected_shared_property_types = None +# Optional[FoundryBranch] | The Foundry branch to search objects from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. +branch = None +# Optional[SearchOrderByV2] +order_by = None +# Optional[PageSize] +page_size = None +# Optional[PageToken] +page_token = None +# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. +preview = None +# Optional[SearchJsonQueryV2] +where = None + + +try: + api_response = client.ontologies.OntologyInterface.search( + ontology, + interface_type, + augmented_interface_property_types=augmented_interface_property_types, + augmented_properties=augmented_properties, + augmented_shared_property_types=augmented_shared_property_types, + other_interface_types=other_interface_types, + selected_interface_property_types=selected_interface_property_types, + selected_object_types=selected_object_types, + selected_shared_property_types=selected_shared_property_types, + branch=branch, + order_by=order_by, + page_size=page_size, + page_token=page_token, + preview=preview, + where=where, + ) + print("The search response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling OntologyInterface.search: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | SearchObjectsResponseV2 | Success response. | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + diff --git a/docs/v2/Ontologies/OntologyObject.md b/docs/v2/Ontologies/OntologyObject.md new file mode 100644 index 000000000..4af9f644d --- /dev/null +++ b/docs/v2/Ontologies/OntologyObject.md @@ -0,0 +1,467 @@ +# OntologyObject + +Method | HTTP request | Release Stage | +------------- | ------------- | ----- | +[**aggregate**](#aggregate) | **POST** /v2/ontologies/{ontology}/objects/{objectType}/aggregate | Stable | +[**count**](#count) | **POST** /v2/ontologies/{ontology}/objects/{objectType}/count | Private Beta | +[**get**](#get) | **GET** /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey} | Stable | +[**list**](#list) | **GET** /v2/ontologies/{ontology}/objects/{objectType} | Stable | +[**search**](#search) | **POST** /v2/ontologies/{ontology}/objects/{objectType}/search | Stable | + +# **aggregate** +Perform functions on object fields in the specified ontology and object type. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**ontology** | OntologyIdentifier | | | +**object_type** | ObjectTypeApiName | The type of the object to aggregate on. | | +**aggregation** | List[AggregationV2] | | | +**group_by** | List[AggregationGroupByV2] | | | +**accuracy** | Optional[AggregationAccuracyRequest] | | [optional] | +**branch** | Optional[FoundryBranch] | The Foundry branch to aggregate objects from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. | [optional] | +**sdk_package_rid** | Optional[SdkPackageRid] | The package rid of the generated SDK. | [optional] | +**sdk_version** | Optional[SdkVersion] | The version of the generated SDK. | [optional] | +**where** | Optional[SearchJsonQueryV2] | | [optional] | + +### Return type +**AggregateObjectsResponseV2** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# OntologyIdentifier +ontology = "palantir" +# ObjectTypeApiName | The type of the object to aggregate on. +object_type = "employee" +# List[AggregationV2] +aggregation = [ + {"type": "min", "field": "tenure", "name": "min_tenure"}, + {"type": "avg", "field": "tenure", "name": "avg_tenure"}, +] +# List[AggregationGroupByV2] +group_by = [ + { + "field": "startDate", + "type": "range", + "ranges": [{"startValue": "2020-01-01", "endValue": "2020-06-01"}], + }, + {"field": "city", "type": "exact"}, +] +# Optional[AggregationAccuracyRequest] +accuracy = None +# Optional[FoundryBranch] | The Foundry branch to aggregate objects from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. +branch = None +# Optional[SdkPackageRid] | The package rid of the generated SDK. +sdk_package_rid = None +# Optional[SdkVersion] | The version of the generated SDK. +sdk_version = None +# Optional[SearchJsonQueryV2] +where = {"type": "eq", "field": "name", "value": "john"} + + +try: + api_response = client.ontologies.OntologyObject.aggregate( + ontology, + object_type, + aggregation=aggregation, + group_by=group_by, + accuracy=accuracy, + branch=branch, + sdk_package_rid=sdk_package_rid, + sdk_version=sdk_version, + where=where, + ) + print("The aggregate response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling OntologyObject.aggregate: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | AggregateObjectsResponseV2 | Success response. | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **count** +Returns a count of the objects of the given object type. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**ontology** | OntologyIdentifier | | | +**object_type** | ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. | | +**branch** | Optional[FoundryBranch] | The Foundry branch to count the objects from. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported. | [optional] | +**sdk_package_rid** | Optional[SdkPackageRid] | The package rid of the generated SDK. | [optional] | +**sdk_version** | Optional[SdkVersion] | The package version of the generated SDK. | [optional] | + +### Return type +**CountObjectsResponseV2** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# OntologyIdentifier +ontology = "palantir" +# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. +object_type = "employee" +# Optional[FoundryBranch] | The Foundry branch to count the objects from. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported. +branch = None +# Optional[SdkPackageRid] | The package rid of the generated SDK. +sdk_package_rid = None +# Optional[SdkVersion] | The package version of the generated SDK. +sdk_version = None + + +try: + api_response = client.ontologies.OntologyObject.count( + ontology, + object_type, + branch=branch, + sdk_package_rid=sdk_package_rid, + sdk_version=sdk_version, + ) + print("The count response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling OntologyObject.count: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | CountObjectsResponseV2 | Success response. | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **get** +Gets a specific object with the given primary key. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**ontology** | OntologyIdentifier | | | +**object_type** | ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. | | +**primary_key** | PropertyValueEscapedString | The primary key of the requested object. To look up the expected primary key for your object type, use the `Get object type` endpoint or the **Ontology Manager**. | | +**branch** | Optional[FoundryBranch] | The Foundry branch to get the object from. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported. | [optional] | +**exclude_rid** | Optional[bool] | A flag to exclude the retrieval of the `__rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2. | [optional] | +**sdk_package_rid** | Optional[SdkPackageRid] | The package rid of the generated SDK. | [optional] | +**sdk_version** | Optional[SdkVersion] | The version of the generated SDK. | [optional] | +**select** | Optional[List[SelectedPropertyApiName]] | The properties of the object type that should be included in the response. Omit this parameter to get all the properties. | [optional] | + +### Return type +**OntologyObjectV2** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# OntologyIdentifier +ontology = "palantir" +# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. +object_type = "employee" +# PropertyValueEscapedString | The primary key of the requested object. To look up the expected primary key for your object type, use the `Get object type` endpoint or the **Ontology Manager**. +primary_key = 50030 +# Optional[FoundryBranch] | The Foundry branch to get the object from. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported. +branch = None +# Optional[bool] | A flag to exclude the retrieval of the `__rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2. +exclude_rid = None +# Optional[SdkPackageRid] | The package rid of the generated SDK. +sdk_package_rid = None +# Optional[SdkVersion] | The version of the generated SDK. +sdk_version = None +# Optional[List[SelectedPropertyApiName]] | The properties of the object type that should be included in the response. Omit this parameter to get all the properties. +select = None + + +try: + api_response = client.ontologies.OntologyObject.get( + ontology, + object_type, + primary_key, + branch=branch, + exclude_rid=exclude_rid, + sdk_package_rid=sdk_package_rid, + sdk_version=sdk_version, + select=select, + ) + print("The get response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling OntologyObject.get: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | OntologyObjectV2 | Success response. | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **list** +Lists the objects for the given Ontology and object type. + +Note that this endpoint does not guarantee consistency. Changes to the data could result in missing or +repeated objects in the response pages. + +For Object Storage V1 backed objects, this endpoint returns a maximum of 10,000 objects. After 10,000 objects have been returned and if more objects +are available, attempting to load another page will result in an `ObjectsExceededLimit` error being returned. There is no limit on Object Storage V2 backed objects. + +Each page may be smaller or larger than the requested page size. However, it +is guaranteed that if there are more results available, at least one result will be present +in the response. + +Note that null value properties will not be returned. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**ontology** | OntologyIdentifier | | | +**object_type** | ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. | | +**branch** | Optional[FoundryBranch] | The Foundry branch to list objects from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. | [optional] | +**exclude_rid** | Optional[bool] | A flag to exclude the retrieval of the `__rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2. | [optional] | +**order_by** | Optional[OrderBy] | | [optional] | +**page_size** | Optional[PageSize] | The desired size of the page to be returned. Defaults to 1,000. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. | [optional] | +**page_token** | Optional[PageToken] | | [optional] | +**sdk_package_rid** | Optional[SdkPackageRid] | The package rid of the generated SDK. | [optional] | +**sdk_version** | Optional[SdkVersion] | The version of the generated SDK. | [optional] | +**select** | Optional[List[SelectedPropertyApiName]] | The properties of the object type that should be included in the response. Omit this parameter to get all the properties. | [optional] | +**snapshot** | Optional[bool] | A flag to use snapshot consistency when paging. Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. This defaults to false if not specified, which means you will always get the latest results. | [optional] | + +### Return type +**ListObjectsResponseV2** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# OntologyIdentifier +ontology = "palantir" +# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. +object_type = "employee" +# Optional[FoundryBranch] | The Foundry branch to list objects from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. +branch = None +# Optional[bool] | A flag to exclude the retrieval of the `__rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2. +exclude_rid = None +# Optional[OrderBy] +order_by = None +# Optional[PageSize] | The desired size of the page to be returned. Defaults to 1,000. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. +page_size = None +# Optional[PageToken] +page_token = None +# Optional[SdkPackageRid] | The package rid of the generated SDK. +sdk_package_rid = None +# Optional[SdkVersion] | The version of the generated SDK. +sdk_version = None +# Optional[List[SelectedPropertyApiName]] | The properties of the object type that should be included in the response. Omit this parameter to get all the properties. +select = None +# Optional[bool] | A flag to use snapshot consistency when paging. Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. This defaults to false if not specified, which means you will always get the latest results. +snapshot = None + + +try: + for ontology_object in client.ontologies.OntologyObject.list( + ontology, + object_type, + branch=branch, + exclude_rid=exclude_rid, + order_by=order_by, + page_size=page_size, + page_token=page_token, + sdk_package_rid=sdk_package_rid, + sdk_version=sdk_version, + select=select, + snapshot=snapshot, + ): + pprint(ontology_object) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling OntologyObject.list: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | ListObjectsResponseV2 | Success response. | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **search** +Search for objects in the specified ontology and object type. The request body is used +to filter objects based on the specified query. The supported queries are: + +| Query type | Description | Supported Types | +|-----------------------------------------|-------------------------------------------------------------------------------------------------------------------|---------------------------------| +| lt | The provided property is less than the provided value. | number, string, date, timestamp | +| gt | The provided property is greater than the provided value. | number, string, date, timestamp | +| lte | The provided property is less than or equal to the provided value. | number, string, date, timestamp | +| gte | The provided property is greater than or equal to the provided value. | number, string, date, timestamp | +| eq | The provided property is exactly equal to the provided value. | number, string, date, timestamp | +| isNull | The provided property is (or is not) null. | all | +| contains | The provided property contains the provided value. | array | +| not | The sub-query does not match. | N/A (applied on a query) | +| and | All the sub-queries match. | N/A (applied on queries) | +| or | At least one of the sub-queries match. | N/A (applied on queries) | +| containsAllTermsInOrderPrefixLastTerm | The provided property contains all the terms provided in order. The last term can be a partial prefix match. | string | +| containsAllTermsInOrder | The provided property contains the provided term as a substring. | string | +| containsAnyTerm | The provided property contains at least one of the terms separated by whitespace. | string | +| containsAllTerms | The provided property contains all the terms separated by whitespace. | string | +| startsWith | Deprecated alias for containsAllTermsInOrderPrefixLastTerm. | string | + +Queries can be at most three levels deep. By default, terms are separated by whitespace or punctuation (`?!,:;-[](){}'"~`). Periods (`.`) on their own are ignored. +Partial terms are not matched by terms filters except where explicitly noted. + + +### Parameters + +Name | Type | Description | Notes | +------------- |------------------------------------| ------------- | ------------- | +**ontology** | OntologyIdentifier | | | +**object_type** | ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. | | +**select** | List[PropertyApiName] | The API names of the object type properties to include in the response. | | +**select_v2** | Optional[List[PropertyIdentifier]] | The identifiers of the properties to include in the response. Only selectV2 or select should be populated, but not both. | | +**branch** | Optional[FoundryBranch] | The Foundry branch to search objects from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. | [optional] | +**exclude_rid** | Optional[bool] | A flag to exclude the retrieval of the `__rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2. | [optional] | +**order_by** | Optional[SearchOrderByV2] | | [optional] | +**page_size** | Optional[PageSize] | | [optional] | +**page_token** | Optional[PageToken] | | [optional] | +**sdk_package_rid** | Optional[SdkPackageRid] | The package rid of the generated SDK. | [optional] | +**sdk_version** | Optional[SdkVersion] | The version of the generated SDK. | [optional] | +**snapshot** | Optional[bool] | A flag to use snapshot consistency when paging. Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. This defaults to false if not specified, which means you will always get the latest results. | [optional] | +**where** | Optional[SearchJsonQueryV2] | | [optional] | + +### Return type +**SearchObjectsResponseV2** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# OntologyIdentifier +ontology = "palantir" +# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. +object_type = "employee" +# List[PropertyApiName] | The API names of the object type properties to include in the response. +select = None +# List[PropertyIdentifier] | The identifiers of the properties to include in the response. Only selectV2 or select should be populated, but not both. +select_v2 = None +# Optional[FoundryBranch] | The Foundry branch to search objects from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. +branch = None +# Optional[bool] | A flag to exclude the retrieval of the `__rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2. +exclude_rid = None +# Optional[SearchOrderByV2] +order_by = None +# Optional[PageSize] +page_size = None +# Optional[PageToken] +page_token = None +# Optional[SdkPackageRid] | The package rid of the generated SDK. +sdk_package_rid = None +# Optional[SdkVersion] | The version of the generated SDK. +sdk_version = None +# Optional[bool] | A flag to use snapshot consistency when paging. Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. This defaults to false if not specified, which means you will always get the latest results. +snapshot = None +# Optional[SearchJsonQueryV2] +where = {"type": "eq", "field": "age", "value": 21} + + +try: + api_response = client.ontologies.OntologyObject.search( + ontology, + object_type, + select=select, + select_v2=select_v2, + branch=branch, + exclude_rid=exclude_rid, + order_by=order_by, + page_size=page_size, + page_token=page_token, + sdk_package_rid=sdk_package_rid, + sdk_version=sdk_version, + snapshot=snapshot, + where=where, + ) + print("The search response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling OntologyObject.search: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | SearchObjectsResponseV2 | Success response. | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + diff --git a/docs/v2/Ontologies/OntologyObjectSet.md b/docs/v2/Ontologies/OntologyObjectSet.md new file mode 100644 index 000000000..848a09a1e --- /dev/null +++ b/docs/v2/Ontologies/OntologyObjectSet.md @@ -0,0 +1,652 @@ +# OntologyObjectSet + +Method | HTTP request | Release Stage | +------------- | ------------- | ----- | +[**aggregate**](#aggregate) | **POST** /v2/ontologies/{ontology}/objectSets/aggregate | Stable | +[**create_temporary**](#create_temporary) | **POST** /v2/ontologies/{ontology}/objectSets/createTemporary | Public Beta | +[**get**](#get) | **GET** /v2/ontologies/{ontology}/objectSets/{objectSetRid} | Private Beta | +[**load**](#load) | **POST** /v2/ontologies/{ontology}/objectSets/loadObjects | Stable | +[**load_links**](#load_links) | **POST** /v2/ontologies/{ontology}/objectSets/loadLinks | Private Beta | +[**load_multiple_object_types**](#load_multiple_object_types) | **POST** /v2/ontologies/{ontology}/objectSets/loadObjectsMultipleObjectTypes | Public Beta | +[**load_objects_or_interfaces**](#load_objects_or_interfaces) | **POST** /v2/ontologies/{ontology}/objectSets/loadObjectsOrInterfaces | Public Beta | + +# **aggregate** +Aggregates the ontology objects present in the `ObjectSet` from the provided object set definition. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**ontology** | OntologyIdentifier | | | +**aggregation** | List[AggregationV2] | | | +**group_by** | List[AggregationGroupByV2] | | | +**object_set** | ObjectSet | | | +**accuracy** | Optional[AggregationAccuracyRequest] | | [optional] | +**branch** | Optional[FoundryBranch] | The Foundry branch to aggregate the objects from. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported. | [optional] | +**include_compute_usage** | Optional[IncludeComputeUsage] | | [optional] | +**sdk_package_rid** | Optional[SdkPackageRid] | The package rid of the generated SDK. | [optional] | +**sdk_version** | Optional[SdkVersion] | The package version of the generated SDK. | [optional] | +**transaction_id** | Optional[OntologyTransactionId] | The ID of an Ontology transaction to read from. Transactions are an experimental feature and all workflows may not be supported. | [optional] | + +### Return type +**AggregateObjectsResponseV2** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# OntologyIdentifier +ontology = "palantir" +# List[AggregationV2] +aggregation = [ + {"field": "tenure", "name": "min_tenure", "type": "min"}, + {"field": "tenure", "name": "avg_tenure", "type": "avg"}, +] +# List[AggregationGroupByV2] +group_by = [ + { + "field": "startDate", + "ranges": [{"endValue": "2020-06-01", "startValue": "2020-01-01"}], + "type": "range", + }, + {"field": "city", "type": "exact"}, +] +# ObjectSet +object_set = {"objectType": "Employee", "type": "base"} +# Optional[AggregationAccuracyRequest] +accuracy = None +# Optional[FoundryBranch] | The Foundry branch to aggregate the objects from. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported. +branch = None +# Optional[IncludeComputeUsage] +include_compute_usage = None +# Optional[SdkPackageRid] | The package rid of the generated SDK. +sdk_package_rid = None +# Optional[SdkVersion] | The package version of the generated SDK. +sdk_version = None +# Optional[OntologyTransactionId] | The ID of an Ontology transaction to read from. Transactions are an experimental feature and all workflows may not be supported. +transaction_id = None + + +try: + api_response = client.ontologies.OntologyObjectSet.aggregate( + ontology, + aggregation=aggregation, + group_by=group_by, + object_set=object_set, + accuracy=accuracy, + branch=branch, + include_compute_usage=include_compute_usage, + sdk_package_rid=sdk_package_rid, + sdk_version=sdk_version, + transaction_id=transaction_id, + ) + print("The aggregate response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling OntologyObjectSet.aggregate: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | AggregateObjectsResponseV2 | Success response. | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **create_temporary** +Creates a temporary `ObjectSet` from the given definition. This `ObjectSet` expires after one hour. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**ontology** | OntologyIdentifier | | | +**object_set** | ObjectSet | | | +**sdk_package_rid** | Optional[SdkPackageRid] | The package rid of the generated SDK. | [optional] | +**sdk_version** | Optional[SdkVersion] | The package version of the generated SDK. | [optional] | + +### Return type +**CreateTemporaryObjectSetResponseV2** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# OntologyIdentifier +ontology = "palantir" +# ObjectSet +object_set = {"type": "base", "objectType": "Employee"} +# Optional[SdkPackageRid] | The package rid of the generated SDK. +sdk_package_rid = None +# Optional[SdkVersion] | The package version of the generated SDK. +sdk_version = None + + +try: + api_response = client.ontologies.OntologyObjectSet.create_temporary( + ontology, object_set=object_set, sdk_package_rid=sdk_package_rid, sdk_version=sdk_version + ) + print("The create_temporary response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling OntologyObjectSet.create_temporary: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | CreateTemporaryObjectSetResponseV2 | Success response. | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **get** +Gets the definition of the `ObjectSet` with the given RID. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**ontology** | OntologyIdentifier | | | +**object_set_rid** | ObjectSetRid | The RID of the object set. | | + +### Return type +**ObjectSet** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# OntologyIdentifier +ontology = "palantir" +# ObjectSetRid | The RID of the object set. +object_set_rid = "ri.object-set.main.object-set.c32ccba5-1a55-4cfe-ad71-160c4c77a053" + + +try: + api_response = client.ontologies.OntologyObjectSet.get(ontology, object_set_rid) + print("The get response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling OntologyObjectSet.get: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | ObjectSet | Success response. | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **load** +Load the ontology objects present in the `ObjectSet` from the provided object set definition. + +For Object Storage V1 backed objects, this endpoint returns a maximum of 10,000 objects. After 10,000 objects have been returned and if more objects +are available, attempting to load another page will result in an `ObjectsExceededLimit` error being returned. There is no limit on Object Storage V2 backed objects. + +Note that null value properties will not be returned. + +Vector properties will not be returned unless included in the `select` parameter. + + +### Parameters + +Name | Type | Description | Notes | +------------- |------------------------------------| ------------- | ------------- | +**ontology** | OntologyIdentifier | | | +**object_set** | ObjectSet | | | +**select** | List[SelectedPropertyApiName] | | | +**select_v2** | Optional[List[PropertyIdentifier]] | The identifiers of the properties to include in the response. Only selectV2 or select should be populated, but not both. | | +**branch** | Optional[FoundryBranch] | The Foundry branch to load the object set from. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported. | [optional] | +**exclude_rid** | Optional[bool] | A flag to exclude the retrieval of the `__rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2. | [optional] | +**include_compute_usage** | Optional[IncludeComputeUsage] | | [optional] | +**order_by** | Optional[SearchOrderByV2] | | [optional] | +**page_size** | Optional[PageSize] | | [optional] | +**page_token** | Optional[PageToken] | | [optional] | +**sdk_package_rid** | Optional[SdkPackageRid] | The package rid of the generated SDK. | [optional] | +**sdk_version** | Optional[SdkVersion] | The package version of the generated SDK. | [optional] | +**snapshot** | Optional[bool] | A flag to use snapshot consistency when paging. Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. This defaults to false if not specified, which means you will always get the latest results. | [optional] | +**transaction_id** | Optional[OntologyTransactionId] | The ID of an Ontology transaction to read from. | [optional] | + +### Return type +**LoadObjectSetResponseV2** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# OntologyIdentifier +ontology = "palantir" +# ObjectSet +object_set = {"type": "base", "objectType": "Employee"} +# List[SelectedPropertyApiName] +select = None +# List[PropertyIdentifier] | The identifiers of the properties to include in the response. Only selectV2 or select should be populated, but not both. +select_v2 = None +# Optional[FoundryBranch] | The Foundry branch to load the object set from. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported. +branch = None +# Optional[bool] | A flag to exclude the retrieval of the `__rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2. +exclude_rid = None +# Optional[IncludeComputeUsage] +include_compute_usage = None +# Optional[SearchOrderByV2] +order_by = None +# Optional[PageSize] +page_size = 10000 +# Optional[PageToken] +page_token = "v1.QnVpbGQgdGhlIEZ1dHVyZTogaHR0cHM6Ly93d3cucGFsYW50aXIuY29tL2NhcmVlcnMvP2xldmVyLXNvdXJjZSU1YiU1ZD1BUElEb2NzI29wZW4tcG9zaXRpb25z" +# Optional[SdkPackageRid] | The package rid of the generated SDK. +sdk_package_rid = None +# Optional[SdkVersion] | The package version of the generated SDK. +sdk_version = None +# Optional[bool] | A flag to use snapshot consistency when paging. Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. This defaults to false if not specified, which means you will always get the latest results. +snapshot = None +# Optional[OntologyTransactionId] | The ID of an Ontology transaction to read from. Transactions are an experimental feature and all workflows may not be supported. +transaction_id = None + + +try: + api_response = client.ontologies.OntologyObjectSet.load( + ontology, + object_set=object_set, + select=select, + select_v2=select_v2, + branch=branch, + exclude_rid=exclude_rid, + include_compute_usage=include_compute_usage, + order_by=order_by, + page_size=page_size, + page_token=page_token, + sdk_package_rid=sdk_package_rid, + sdk_version=sdk_version, + snapshot=snapshot, + transaction_id=transaction_id, + ) + print("The load response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling OntologyObjectSet.load: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | LoadObjectSetResponseV2 | Success response. | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **load_links** +Loads the specified links from the defined object set. + +Links are defined as a link type API name and object locators for the source and target objects +where only the `__primaryKey` and `__apiName` properties are loaded. + +Links are grouped by source object locator; however, the links for a given source object may be +split over multiple entries with the same source object locator. + +Please keep these limitations in mind: +- Links returned may be stale. For example, primary keys returned by this endpoint may not exist anymore. +- This endpoint requests links for 1,000 objects at a time. If, for any page of 1,000 objects, there are more + than 100,000 links present, results are limited to 100,000 links and should be considered partial. +- This endpoint does not support OSv1 links and will return an error if links provided are backed by OSv1. +- This endpoint currently does not support interface object sets or interface links, but support will be added in the near future. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**ontology** | OntologyIdentifier | | | +**links** | List[LinkTypeApiName] | | | +**object_set** | ObjectSet | | | +**branch** | Optional[FoundryBranch] | The Foundry branch to aggregate the objects from. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported. | [optional] | +**include_compute_usage** | Optional[IncludeComputeUsage] | | [optional] | +**page_token** | Optional[PageToken] | | [optional] | +**preview** | Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. | [optional] | +**sdk_package_rid** | Optional[SdkPackageRid] | The package rid of the generated SDK. | [optional] | +**sdk_version** | Optional[SdkVersion] | The package version of the generated SDK. | [optional] | + +### Return type +**LoadObjectSetLinksResponseV2** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# OntologyIdentifier +ontology = "palantir" +# List[LinkTypeApiName] +links = None +# ObjectSet +object_set = {"objectType": "Employee", "type": "base"} +# Optional[FoundryBranch] | The Foundry branch to aggregate the objects from. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported. +branch = None +# Optional[IncludeComputeUsage] +include_compute_usage = None +# Optional[PageToken] +page_token = None +# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. +preview = None +# Optional[SdkPackageRid] | The package rid of the generated SDK. +sdk_package_rid = None +# Optional[SdkVersion] | The package version of the generated SDK. +sdk_version = None + + +try: + api_response = client.ontologies.OntologyObjectSet.load_links( + ontology, + links=links, + object_set=object_set, + branch=branch, + include_compute_usage=include_compute_usage, + page_token=page_token, + preview=preview, + sdk_package_rid=sdk_package_rid, + sdk_version=sdk_version, + ) + print("The load_links response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling OntologyObjectSet.load_links: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | LoadObjectSetLinksResponseV2 | Success response. | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **load_multiple_object_types** +Load the ontology objects present in the `ObjectSet` from the provided object set definition. The resulting +objects may be scoped to an object type, in which all the selected properties on the object type are returned, or scoped +to an interface, in which only the object type properties that implement the properties of any interfaces in its +scope are returned. For objects that are scoped to an interface in the result, a mapping from interface to +object implementation is returned in order to interpret the objects as the interfaces that they implement. + +For Object Storage V1 backed objects, this endpoint returns a maximum of 10,000 objects. After 10,000 objects have been returned and if more objects +are available, attempting to load another page will result in an `ObjectsExceededLimit` error being returned. There is no limit on Object Storage V2 backed objects. + +Note that null value properties will not be returned. In addition, property metadata (rid, apiName, and primaryKey) +will be prefixed with '$' instead of '__' as is the case in `loadObjects`. + +Vector properties will not be returned unless included in the `select` parameter. + + +### Parameters + +Name | Type | Description | Notes | +------------- |------------------------------------| ------------- | ------------- | +**ontology** | OntologyIdentifier | | | +**object_set** | ObjectSet | | | +**select** | List[SelectedPropertyApiName] | | | +**select_v2** | Optional[List[PropertyIdentifier]] | The identifiers of the properties to include in the response. Only selectV2 or select should be populated, but not both. | | +**branch** | Optional[FoundryBranch] | The Foundry branch to load the object set for multiple object types. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported. | [optional] | +**exclude_rid** | Optional[bool] | A flag to exclude the retrieval of the `$rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2. | [optional] | +**include_compute_usage** | Optional[IncludeComputeUsage] | | [optional] | +**order_by** | Optional[SearchOrderByV2] | | [optional] | +**page_size** | Optional[PageSize] | | [optional] | +**page_token** | Optional[PageToken] | | [optional] | +**preview** | Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. | [optional] | +**sdk_package_rid** | Optional[SdkPackageRid] | The package rid of the generated SDK. | [optional] | +**sdk_version** | Optional[SdkVersion] | The package version of the generated SDK. | [optional] | +**snapshot** | Optional[bool] | A flag to use snapshot consistency when paging. Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. This defaults to false if not specified, which means you will always get the latest results. | [optional] | +**transaction_id** | Optional[OntologyTransactionId] | The ID of an Ontology transaction to read from. | [optional] | + +### Return type +**LoadObjectSetV2MultipleObjectTypesResponse** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# OntologyIdentifier +ontology = "palantir" +# ObjectSet +object_set = {"type": "base", "objectType": "Employee"} +# List[SelectedPropertyApiName] +select = None +# List[PropertyIdentifier] | The identifiers of the properties to include in the response. Only selectV2 or select should be populated, but not both. +select_v2 = None +# Optional[FoundryBranch] | The Foundry branch to load the object set for multiple object types. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported. +branch = None +# Optional[bool] | A flag to exclude the retrieval of the `$rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2. +exclude_rid = None +# Optional[IncludeComputeUsage] +include_compute_usage = None +# Optional[SearchOrderByV2] +order_by = None +# Optional[PageSize] +page_size = 10000 +# Optional[PageToken] +page_token = "v1.QnVpbGQgdGhlIEZ1dHVyZTogaHR0cHM6Ly93d3cucGFsYW50aXIuY29tL2NhcmVlcnMvP2xldmVyLXNvdXJjZSU1YiU1ZD1BUElEb2NzI29wZW4tcG9zaXRpb25z" +# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. +preview = None +# Optional[SdkPackageRid] | The package rid of the generated SDK. +sdk_package_rid = None +# Optional[SdkVersion] | The package version of the generated SDK. +sdk_version = None +# Optional[bool] | A flag to use snapshot consistency when paging. Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. This defaults to false if not specified, which means you will always get the latest results. +snapshot = None +# Optional[OntologyTransactionId] | The ID of an Ontology transaction to read from. Transactions are an experimental feature and all workflows may not be supported. +transaction_id = None + + +try: + api_response = client.ontologies.OntologyObjectSet.load_multiple_object_types( + ontology, + object_set=object_set, + select=select, + select_v2=select_v2, + branch=branch, + exclude_rid=exclude_rid, + include_compute_usage=include_compute_usage, + order_by=order_by, + page_size=page_size, + page_token=page_token, + preview=preview, + sdk_package_rid=sdk_package_rid, + sdk_version=sdk_version, + snapshot=snapshot, + transaction_id=transaction_id, + ) + print("The load_multiple_object_types response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling OntologyObjectSet.load_multiple_object_types: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | LoadObjectSetV2MultipleObjectTypesResponse | Success response. | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **load_objects_or_interfaces** +Load the ontology objects present in the `ObjectSet` from the provided object set definition. If the requested +object set contains interfaces and the object can be viewed as an interface, it will contain the properties +defined by the interface. If not, it will contain the properties defined by its object type. This allows directly +loading all objects of an interface where all objects are viewed as the interface, for example. + +Note that the result object set cannot contain a mix of objects with "interface" properties and "object type" +properties. Attempting to load an object set like this will result in an error. + +For Object Storage V1 backed objects, this endpoint returns a maximum of 10,000 objects. After 10,000 objects have been returned and if more objects +are available, attempting to load another page will result in an `ObjectsExceededLimit` error being returned. There is no limit on Object Storage V2 backed objects. + +Note that null value properties will not be returned. In addition, property metadata (rid, apiName, and primaryKey) +will be prefixed with '$' instead of '__' as is the case in `/loadObjects`. + +Vector properties will not be returned unless included in the `select` parameter. + + +### Parameters + +Name | Type | Description | Notes | +------------- |------------------------------------| ------------- | ------------- | +**ontology** | OntologyIdentifier | | | +**object_set** | ObjectSet | | | +**select** | List[SelectedPropertyApiName] | | | +**select_v2** | Optional[List[PropertyIdentifier]] | The identifiers of the properties to include in the response. Only selectV2 or select should be populated, but not both. | | +**branch** | Optional[FoundryBranch] | The Foundry branch to load the objects or interfaces from. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported. | [optional] | +**exclude_rid** | Optional[bool] | A flag to exclude the retrieval of the `$rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2. | [optional] | +**order_by** | Optional[SearchOrderByV2] | | [optional] | +**page_size** | Optional[PageSize] | | [optional] | +**page_token** | Optional[PageToken] | | [optional] | +**preview** | Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. | [optional] | +**sdk_package_rid** | Optional[SdkPackageRid] | The package rid of the generated SDK. | [optional] | +**sdk_version** | Optional[SdkVersion] | The package version of the generated SDK. | [optional] | +**snapshot** | Optional[bool] | A flag to use snapshot consistency when paging. Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. This defaults to false if not specified, which means you will always get the latest results. | [optional] | + +### Return type +**LoadObjectSetV2ObjectsOrInterfacesResponse** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# OntologyIdentifier +ontology = "palantir" +# ObjectSet +object_set = {"type": "base", "interfaceBase": "Person"} +# List[SelectedPropertyApiName] +select = None +# List[PropertyIdentifier] | The identifiers of the properties to include in the response. Only selectV2 or select should be populated, but not both. +select_v2 = None +# Optional[FoundryBranch] | The Foundry branch to load the objects or interfaces from. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported. +branch = None +# Optional[bool] | A flag to exclude the retrieval of the `$rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2. +exclude_rid = None +# Optional[SearchOrderByV2] +order_by = None +# Optional[PageSize] +page_size = 10000 +# Optional[PageToken] +page_token = "v1.VGhlcmUgaXMgc28gbXVjaCBsZWZ0IHRvIGJ1aWxkIC0gcGFsYW50aXIuY29tL2NhcmVlcnMv" +# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. +preview = None +# Optional[SdkPackageRid] | The package rid of the generated SDK. +sdk_package_rid = None +# Optional[SdkVersion] | The package version of the generated SDK. +sdk_version = None +# Optional[bool] | A flag to use snapshot consistency when paging. Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. This defaults to false if not specified, which means you will always get the latest results. +snapshot = None + + +try: + api_response = client.ontologies.OntologyObjectSet.load_objects_or_interfaces( + ontology, + object_set=object_set, + select=select, + select_v2=select_v2, + branch=branch, + exclude_rid=exclude_rid, + order_by=order_by, + page_size=page_size, + page_token=page_token, + preview=preview, + sdk_package_rid=sdk_package_rid, + sdk_version=sdk_version, + snapshot=snapshot, + ) + print("The load_objects_or_interfaces response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling OntologyObjectSet.load_objects_or_interfaces: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | LoadObjectSetV2ObjectsOrInterfacesResponse | Success response. | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + diff --git a/docs/v2/Ontologies/OntologyTransaction.md b/docs/v2/Ontologies/OntologyTransaction.md new file mode 100644 index 000000000..d858abf44 --- /dev/null +++ b/docs/v2/Ontologies/OntologyTransaction.md @@ -0,0 +1,65 @@ +# OntologyTransaction + +Method | HTTP request | Release Stage | +------------- | ------------- | ----- | +[**post_edits**](#post_edits) | **POST** /v2/ontologies/{ontology}/transactions/{transactionId}/edits | Private Beta | + +# **post_edits** +Applies a set of edits to a transaction in order. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**ontology** | OntologyIdentifier | | | +**transaction_id** | OntologyTransactionId | The ID of the transaction to apply edits to. Transactions are an experimental feature and all workflows may not be supported. | | +**edits** | List[TransactionEdit] | | | +**preview** | Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. | [optional] | + +### Return type +**PostTransactionEditsResponse** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# OntologyIdentifier +ontology = "palantir" +# OntologyTransactionId | The ID of the transaction to apply edits to. Transactions are an experimental feature and all workflows may not be supported. +transaction_id = None +# List[TransactionEdit] +edits = None +# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. +preview = None + + +try: + api_response = client.ontologies.OntologyTransaction.post_edits( + ontology, transaction_id, edits=edits, preview=preview + ) + print("The post_edits response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling OntologyTransaction.post_edits: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | PostTransactionEditsResponse | Transaction edits were applied successfully. | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + diff --git a/docs/v2/Ontologies/OntologyValueType.md b/docs/v2/Ontologies/OntologyValueType.md new file mode 100644 index 000000000..aa14fd9f8 --- /dev/null +++ b/docs/v2/Ontologies/OntologyValueType.md @@ -0,0 +1,112 @@ +# OntologyValueType + +Method | HTTP request | Release Stage | +------------- | ------------- | ----- | +[**get**](#get) | **GET** /v2/ontologies/{ontology}/valueTypes/{valueType} | Public Beta | +[**list**](#list) | **GET** /v2/ontologies/{ontology}/valueTypes | Public Beta | + +# **get** +Gets a specific value type with the given API name. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**ontology** | OntologyIdentifier | | | +**value_type** | ValueTypeApiName | The API name of the value type. To find the API name, use the **List value types** endpoint or check the **Ontology Manager**. | | +**preview** | Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. | [optional] | + +### Return type +**OntologyValueType** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# OntologyIdentifier +ontology = "palantir" +# ValueTypeApiName | The API name of the value type. To find the API name, use the **List value types** endpoint or check the **Ontology Manager**. +value_type = "countryCode" +# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. +preview = None + + +try: + api_response = client.ontologies.OntologyValueType.get(ontology, value_type, preview=preview) + print("The get response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling OntologyValueType.get: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | OntologyValueType | Success response. | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **list** +Lists the latest versions of the value types for the given Ontology. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**ontology** | OntologyIdentifier | | | +**preview** | Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. | [optional] | + +### Return type +**ListOntologyValueTypesResponse** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# OntologyIdentifier +ontology = "palantir" +# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode. +preview = None + + +try: + api_response = client.ontologies.OntologyValueType.list(ontology, preview=preview) + print("The list response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling OntologyValueType.list: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | ListOntologyValueTypesResponse | Success response. | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + diff --git a/docs/v2/Ontologies/Query.md b/docs/v2/Ontologies/Query.md new file mode 100644 index 000000000..3e69b45f0 --- /dev/null +++ b/docs/v2/Ontologies/Query.md @@ -0,0 +1,94 @@ +# Query + +Method | HTTP request | Release Stage | +------------- | ------------- | ----- | +[**execute**](#execute) | **POST** /v2/ontologies/{ontology}/queries/{queryApiName}/execute | Stable | + +# **execute** +Executes a Query using the given parameters. By default, the latest version of the Query is executed. + +Optional parameters do not need to be supplied. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**ontology** | OntologyIdentifier | | | +**query_api_name** | QueryApiName | The API name of the Query to execute. | | +**parameters** | Dict[ParameterId, Optional[DataValue]] | | | +**attribution** | Optional[Attribution] | The Attribution to be used when executing this request. | [optional] | +**sdk_package_rid** | Optional[SdkPackageRid] | The package rid of the generated SDK. | [optional] | +**sdk_version** | Optional[SdkVersion] | The version of the generated SDK. | [optional] | +**trace_parent** | Optional[TraceParent] | The W3C trace parent header included in the request. | [optional] | +**trace_state** | Optional[TraceState] | The W3C trace state header included in the request. | [optional] | +**transaction_id** | Optional[OntologyTransactionId] | The ID of an Ontology transaction to read from. Transactions are an experimental feature and all workflows may not be supported. | [optional] | +**version** | Optional[FunctionVersion] | The version of the Query to execute. | [optional] | + +### Return type +**ExecuteQueryResponse** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# OntologyIdentifier +ontology = "palantir" +# QueryApiName | The API name of the Query to execute. +query_api_name = "getEmployeesInCity" +# Dict[ParameterId, Optional[DataValue]] +parameters = {"city": "New York"} +# Optional[Attribution] | The Attribution to be used when executing this request. +attribution = None +# Optional[SdkPackageRid] | The package rid of the generated SDK. +sdk_package_rid = None +# Optional[SdkVersion] | The version of the generated SDK. +sdk_version = None +# Optional[TraceParent] | The W3C trace parent header included in the request. +trace_parent = None +# Optional[TraceState] | The W3C trace state header included in the request. +trace_state = None +# Optional[OntologyTransactionId] | The ID of an Ontology transaction to read from. Transactions are an experimental feature and all workflows may not be supported. +transaction_id = None +# Optional[FunctionVersion] | The version of the Query to execute. +version = None + + +try: + api_response = client.ontologies.Query.execute( + ontology, + query_api_name, + parameters=parameters, + attribution=attribution, + sdk_package_rid=sdk_package_rid, + sdk_version=sdk_version, + trace_parent=trace_parent, + trace_state=trace_state, + transaction_id=transaction_id, + version=version, + ) + print("The execute response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Query.execute: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | ExecuteQueryResponse | Success response. | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + diff --git a/docs/v2/Ontologies/QueryType.md b/docs/v2/Ontologies/QueryType.md new file mode 100644 index 000000000..620d1210d --- /dev/null +++ b/docs/v2/Ontologies/QueryType.md @@ -0,0 +1,131 @@ +# QueryType + +Method | HTTP request | Release Stage | +------------- | ------------- | ----- | +[**get**](#get) | **GET** /v2/ontologies/{ontology}/queryTypes/{queryApiName} | Stable | +[**list**](#list) | **GET** /v2/ontologies/{ontology}/queryTypes | Stable | + +# **get** +Gets a specific query type with the given API name. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**ontology** | OntologyIdentifier | | | +**query_api_name** | QueryApiName | The API name of the query type. To find the API name, use the **List query types** endpoint or check the **Ontology Manager**. | | +**sdk_package_rid** | Optional[SdkPackageRid] | The package rid of the generated SDK. | [optional] | +**sdk_version** | Optional[SdkVersion] | The version of the generated SDK. | [optional] | +**version** | Optional[FunctionVersion] | The version of the Query to get. | [optional] | + +### Return type +**QueryTypeV2** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# OntologyIdentifier +ontology = "palantir" +# QueryApiName | The API name of the query type. To find the API name, use the **List query types** endpoint or check the **Ontology Manager**. +query_api_name = "getEmployeesInCity" +# Optional[SdkPackageRid] | The package rid of the generated SDK. +sdk_package_rid = None +# Optional[SdkVersion] | The version of the generated SDK. +sdk_version = None +# Optional[FunctionVersion] | The version of the Query to get. +version = None + + +try: + api_response = client.ontologies.Ontology.QueryType.get( + ontology, + query_api_name, + sdk_package_rid=sdk_package_rid, + sdk_version=sdk_version, + version=version, + ) + print("The get response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling QueryType.get: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | QueryTypeV2 | Success response. | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **list** +Lists the query types for the given Ontology. + +Each page may be smaller than the requested page size. However, it is guaranteed that if there are more +results available, at least one result will be present in the response. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**ontology** | OntologyIdentifier | | | +**page_size** | Optional[PageSize] | The desired size of the page to be returned. Defaults to 100. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. | [optional] | +**page_token** | Optional[PageToken] | | [optional] | + +### Return type +**ListQueryTypesResponseV2** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# OntologyIdentifier +ontology = "palantir" +# Optional[PageSize] | The desired size of the page to be returned. Defaults to 100. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. +page_size = None +# Optional[PageToken] +page_token = None + + +try: + for query_type in client.ontologies.Ontology.QueryType.list( + ontology, page_size=page_size, page_token=page_token + ): + pprint(query_type) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling QueryType.list: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | ListQueryTypesResponseV2 | Success response. | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + diff --git a/docs/v2/Ontologies/TimeSeriesPropertyV2.md b/docs/v2/Ontologies/TimeSeriesPropertyV2.md new file mode 100644 index 000000000..99eab96ea --- /dev/null +++ b/docs/v2/Ontologies/TimeSeriesPropertyV2.md @@ -0,0 +1,234 @@ +# TimeSeriesPropertyV2 + +Method | HTTP request | Release Stage | +------------- | ------------- | ----- | +[**get_first_point**](#get_first_point) | **GET** /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/timeseries/{property}/firstPoint | Stable | +[**get_last_point**](#get_last_point) | **GET** /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/timeseries/{property}/lastPoint | Stable | +[**stream_points**](#stream_points) | **POST** /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/timeseries/{property}/streamPoints | Stable | + +# **get_first_point** +Get the first point of a time series property. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**ontology** | OntologyIdentifier | | | +**object_type** | ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. | | +**primary_key** | PropertyValueEscapedString | The primary key of the object with the time series property. | | +**property** | PropertyApiName | The API name of the time series property. To find the API name for your time series property, check the **Ontology Manager** or use the **Get object type** endpoint. | | +**sdk_package_rid** | Optional[SdkPackageRid] | The package rid of the generated SDK. | [optional] | +**sdk_version** | Optional[SdkVersion] | The version of the generated SDK. | [optional] | + +### Return type +**Optional[TimeSeriesPoint]** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# OntologyIdentifier +ontology = "palantir" +# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. +object_type = "employee" +# PropertyValueEscapedString | The primary key of the object with the time series property. +primary_key = 50030 +# PropertyApiName | The API name of the time series property. To find the API name for your time series property, check the **Ontology Manager** or use the **Get object type** endpoint. +property = "performance" +# Optional[SdkPackageRid] | The package rid of the generated SDK. +sdk_package_rid = None +# Optional[SdkVersion] | The version of the generated SDK. +sdk_version = None + + +try: + api_response = client.ontologies.TimeSeriesPropertyV2.get_first_point( + ontology, + object_type, + primary_key, + property, + sdk_package_rid=sdk_package_rid, + sdk_version=sdk_version, + ) + print("The get_first_point response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling TimeSeriesPropertyV2.get_first_point: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | Optional[TimeSeriesPoint] | Success response. | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **get_last_point** +Get the last point of a time series property. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**ontology** | OntologyIdentifier | | | +**object_type** | ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. | | +**primary_key** | PropertyValueEscapedString | The primary key of the object with the time series property. | | +**property** | PropertyApiName | The API name of the time series property. To find the API name for your time series property, check the **Ontology Manager** or use the **Get object type** endpoint. | | +**sdk_package_rid** | Optional[SdkPackageRid] | The package rid of the generated SDK. | [optional] | +**sdk_version** | Optional[SdkVersion] | The version of the generated SDK. | [optional] | + +### Return type +**Optional[TimeSeriesPoint]** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# OntologyIdentifier +ontology = "palantir" +# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. +object_type = "employee" +# PropertyValueEscapedString | The primary key of the object with the time series property. +primary_key = 50030 +# PropertyApiName | The API name of the time series property. To find the API name for your time series property, check the **Ontology Manager** or use the **Get object type** endpoint. +property = "performance" +# Optional[SdkPackageRid] | The package rid of the generated SDK. +sdk_package_rid = None +# Optional[SdkVersion] | The version of the generated SDK. +sdk_version = None + + +try: + api_response = client.ontologies.TimeSeriesPropertyV2.get_last_point( + ontology, + object_type, + primary_key, + property, + sdk_package_rid=sdk_package_rid, + sdk_version=sdk_version, + ) + print("The get_last_point response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling TimeSeriesPropertyV2.get_last_point: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | Optional[TimeSeriesPoint] | Success response. | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **stream_points** +Stream all of the points of a time series property. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**ontology** | OntologyIdentifier | | | +**object_type** | ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. | | +**primary_key** | PropertyValueEscapedString | The primary key of the object with the time series property. | | +**property** | PropertyApiName | The API name of the time series property. To find the API name for your time series property, check the **Ontology Manager** or use the **Get object type** endpoint. | | +**aggregate** | Optional[AggregateTimeSeries] | | [optional] | +**format** | Optional[StreamingOutputFormat] | The output format to serialize the output binary stream in. Default is JSON. ARROW is more efficient than JSON at streaming a large sized response. | [optional] | +**range** | Optional[TimeRange] | | [optional] | +**sdk_package_rid** | Optional[SdkPackageRid] | The package rid of the generated SDK. | [optional] | +**sdk_version** | Optional[SdkVersion] | The version of the generated SDK. | [optional] | + +### Return type +**bytes** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# OntologyIdentifier +ontology = "palantir" +# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. +object_type = "employee" +# PropertyValueEscapedString | The primary key of the object with the time series property. +primary_key = 50030 +# PropertyApiName | The API name of the time series property. To find the API name for your time series property, check the **Ontology Manager** or use the **Get object type** endpoint. +property = None +# Optional[AggregateTimeSeries] +aggregate = None +# Optional[StreamingOutputFormat] | The output format to serialize the output binary stream in. Default is JSON. ARROW is more efficient than JSON at streaming a large sized response. +format = None +# Optional[TimeRange] +range = { + "type": "relative", + "startTime": {"when": "BEFORE", "value": 5, "unit": "MONTHS"}, + "endTime": {"when": "BEFORE", "value": 1, "unit": "MONTHS"}, +} +# Optional[SdkPackageRid] | The package rid of the generated SDK. +sdk_package_rid = None +# Optional[SdkVersion] | The version of the generated SDK. +sdk_version = None + + +try: + api_response = client.ontologies.TimeSeriesPropertyV2.stream_points( + ontology, + object_type, + primary_key, + property, + aggregate=aggregate, + format=format, + range=range, + sdk_package_rid=sdk_package_rid, + sdk_version=sdk_version, + ) + print("The stream_points response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling TimeSeriesPropertyV2.stream_points: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | bytes | Success response. | */* | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + diff --git a/docs/v2/Ontologies/TimeSeriesValueBankProperty.md b/docs/v2/Ontologies/TimeSeriesValueBankProperty.md new file mode 100644 index 000000000..33fb120d1 --- /dev/null +++ b/docs/v2/Ontologies/TimeSeriesValueBankProperty.md @@ -0,0 +1,155 @@ +# TimeSeriesValueBankProperty + +Method | HTTP request | Release Stage | +------------- | ------------- | ----- | +[**get_latest_value**](#get_latest_value) | **GET** /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/timeseries/{propertyName}/latestValue | Stable | +[**stream_values**](#stream_values) | **POST** /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/timeseries/{property}/streamValues | Stable | + +# **get_latest_value** +Get the latest value of a property backed by a timeseries. If a specific geotime series integration has both a history and a live integration, we will give precedence to the live integration. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**ontology** | OntologyIdentifier | | | +**object_type** | ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. | | +**primary_key** | PropertyValueEscapedString | The primary key of the object with the timeseries property. | | +**property_name** | PropertyApiName | The API name of the timeseries property. To find the API name for your property value bank property, check the **Ontology Manager** or use the **Get object type** endpoint. | | +**sdk_package_rid** | Optional[SdkPackageRid] | The package rid of the generated SDK. | [optional] | +**sdk_version** | Optional[SdkVersion] | The version of the generated SDK. | [optional] | + +### Return type +**Optional[TimeseriesEntry]** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# OntologyIdentifier +ontology = "palantir" +# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. +object_type = "employee" +# PropertyValueEscapedString | The primary key of the object with the timeseries property. +primary_key = 50030 +# PropertyApiName | The API name of the timeseries property. To find the API name for your property value bank property, check the **Ontology Manager** or use the **Get object type** endpoint. +property_name = "performance" +# Optional[SdkPackageRid] | The package rid of the generated SDK. +sdk_package_rid = None +# Optional[SdkVersion] | The version of the generated SDK. +sdk_version = None + + +try: + api_response = client.ontologies.TimeSeriesValueBankProperty.get_latest_value( + ontology, + object_type, + primary_key, + property_name, + sdk_package_rid=sdk_package_rid, + sdk_version=sdk_version, + ) + print("The get_latest_value response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling TimeSeriesValueBankProperty.get_latest_value: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | Optional[TimeseriesEntry] | Success response. | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **stream_values** +Stream all of the points of a time series property (this includes geotime series references). + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**ontology** | OntologyIdentifier | | | +**object_type** | ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. | | +**primary_key** | PropertyValueEscapedString | The primary key of the object with the time series property. | | +**property** | PropertyApiName | The API name of the time series backed property. To find the API name, check the **Ontology Manager** or use the **Get object type** endpoint. | | +**range** | Optional[TimeRange] | | [optional] | +**sdk_package_rid** | Optional[SdkPackageRid] | The package rid of the generated SDK. | [optional] | +**sdk_version** | Optional[SdkVersion] | The version of the generated SDK. | [optional] | + +### Return type +**bytes** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# OntologyIdentifier +ontology = "palantir" +# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. +object_type = "employee" +# PropertyValueEscapedString | The primary key of the object with the time series property. +primary_key = 50030 +# PropertyApiName | The API name of the time series backed property. To find the API name, check the **Ontology Manager** or use the **Get object type** endpoint. +property = None +# Optional[TimeRange] +range = { + "type": "relative", + "startTime": {"when": "BEFORE", "value": 5, "unit": "MONTHS"}, + "endTime": {"when": "BEFORE", "value": 1, "unit": "MONTHS"}, +} +# Optional[SdkPackageRid] | The package rid of the generated SDK. +sdk_package_rid = None +# Optional[SdkVersion] | The version of the generated SDK. +sdk_version = None + + +try: + api_response = client.ontologies.TimeSeriesValueBankProperty.stream_values( + ontology, + object_type, + primary_key, + property, + range=range, + sdk_package_rid=sdk_package_rid, + sdk_version=sdk_version, + ) + print("The stream_values response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling TimeSeriesValueBankProperty.stream_values: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | bytes | Success response. | */* | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + diff --git a/docs/v2/Ontologies/models/AbsoluteTimeRange.md b/docs/v2/Ontologies/models/AbsoluteTimeRange.md new file mode 100644 index 000000000..2512eca79 --- /dev/null +++ b/docs/v2/Ontologies/models/AbsoluteTimeRange.md @@ -0,0 +1,13 @@ +# AbsoluteTimeRange + +ISO 8601 timestamps forming a range for a time series query. Start is inclusive and end is exclusive. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**start_time** | Optional[datetime] | No | | +**end_time** | Optional[datetime] | No | | +**type** | Literal["absolute"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/AbsoluteValuePropertyExpression.md b/docs/v2/Ontologies/models/AbsoluteValuePropertyExpression.md new file mode 100644 index 000000000..25ea23a93 --- /dev/null +++ b/docs/v2/Ontologies/models/AbsoluteValuePropertyExpression.md @@ -0,0 +1,13 @@ +# AbsoluteValuePropertyExpression + +Calculates absolute value of a numeric value. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**property** | DerivedPropertyDefinition | Yes | | +**type** | Literal["absoluteValue"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ActionExecutionTime.md b/docs/v2/Ontologies/models/ActionExecutionTime.md new file mode 100644 index 000000000..c14bad571 --- /dev/null +++ b/docs/v2/Ontologies/models/ActionExecutionTime.md @@ -0,0 +1,12 @@ +# ActionExecutionTime + +An ISO 8601 timestamp. + + +## Type +```python +datetime +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ActionLogicRule.md b/docs/v2/Ontologies/models/ActionLogicRule.md new file mode 100644 index 000000000..04559c3fb --- /dev/null +++ b/docs/v2/Ontologies/models/ActionLogicRule.md @@ -0,0 +1,27 @@ +# ActionLogicRule + +A detailed operation for an Action + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +ModifyInterfaceLogicRule | modifyInterface +CreateOrModifyObjectLogicRule | createOrModifyObject +ModifyObjectLogicRule | modifyObject +DeleteLinkLogicRule | deleteLink +CreateObjectLogicRule | createObject +CreateLinkLogicRule | createLink +BatchedFunctionLogicRule | batchedFunction +CreateOrModifyObjectLogicRuleV2 | createOrModifyObjectV2 +DeleteInterfaceLinkLogicRule | deleteInterfaceLink +DeleteObjectLogicRule | deleteObject +FunctionLogicRule | function +CreateInterfaceLinkLogicRule | createInterfaceLink +CreateInterfaceLogicRule | createInterface + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ActionParameterArrayType.md b/docs/v2/Ontologies/models/ActionParameterArrayType.md new file mode 100644 index 000000000..8a73b0b93 --- /dev/null +++ b/docs/v2/Ontologies/models/ActionParameterArrayType.md @@ -0,0 +1,12 @@ +# ActionParameterArrayType + +ActionParameterArrayType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**sub_type** | ActionParameterType | Yes | | +**type** | Literal["array"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ActionParameterType.md b/docs/v2/Ontologies/models/ActionParameterType.md new file mode 100644 index 000000000..e7c5bad70 --- /dev/null +++ b/docs/v2/Ontologies/models/ActionParameterType.md @@ -0,0 +1,34 @@ +# ActionParameterType + +A union of all the types supported by Ontology Action parameters. + + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +DateType | date +OntologyInterfaceObjectType | interfaceObject +OntologyStructType | struct +StringType | string +DoubleType | double +IntegerType | integer +GeoShapeType | geoshape +LongType | long +OntologyObjectTypeReferenceType | objectType +BooleanType | boolean +MarkingType | marking +AttachmentType | attachment +MediaReferenceType | mediaReference +ActionParameterArrayType | array +OntologyObjectSetType | objectSet +GeohashType | geohash +VectorType | vector +OntologyObjectType | object +TimestampType | timestamp + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ActionParameterV2.md b/docs/v2/Ontologies/models/ActionParameterV2.md new file mode 100644 index 000000000..b7a55acc5 --- /dev/null +++ b/docs/v2/Ontologies/models/ActionParameterV2.md @@ -0,0 +1,14 @@ +# ActionParameterV2 + +Details about a parameter of an action. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**display_name** | DisplayName | Yes | | +**description** | Optional[str] | No | | +**data_type** | ActionParameterType | Yes | | +**required** | bool | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ActionResults.md b/docs/v2/Ontologies/models/ActionResults.md new file mode 100644 index 000000000..22d63f679 --- /dev/null +++ b/docs/v2/Ontologies/models/ActionResults.md @@ -0,0 +1,16 @@ +# ActionResults + +ActionResults + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +ObjectEdits | edits +ObjectTypeEdits | largeScaleEdits + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ActionRid.md b/docs/v2/Ontologies/models/ActionRid.md new file mode 100644 index 000000000..554afee6d --- /dev/null +++ b/docs/v2/Ontologies/models/ActionRid.md @@ -0,0 +1,11 @@ +# ActionRid + +The unique resource identifier for an action. + +## Type +```python +RID +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ActionTypeApiName.md b/docs/v2/Ontologies/models/ActionTypeApiName.md new file mode 100644 index 000000000..34de0f17e --- /dev/null +++ b/docs/v2/Ontologies/models/ActionTypeApiName.md @@ -0,0 +1,13 @@ +# ActionTypeApiName + +The name of the action type in the API. To find the API name for your Action Type, use the `List action types` +endpoint or check the **Ontology Manager**. + + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ActionTypeFullMetadata.md b/docs/v2/Ontologies/models/ActionTypeFullMetadata.md new file mode 100644 index 000000000..e557ed294 --- /dev/null +++ b/docs/v2/Ontologies/models/ActionTypeFullMetadata.md @@ -0,0 +1,12 @@ +# ActionTypeFullMetadata + +Returns the full metadata for an Action type in the Ontology. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**action_type** | ActionTypeV2 | Yes | | +**full_logic_rules** | List[ActionLogicRule] | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ActionTypeRid.md b/docs/v2/Ontologies/models/ActionTypeRid.md new file mode 100644 index 000000000..41d4e6f9e --- /dev/null +++ b/docs/v2/Ontologies/models/ActionTypeRid.md @@ -0,0 +1,12 @@ +# ActionTypeRid + +The unique resource identifier of an action type, useful for interacting with other Foundry APIs. + + +## Type +```python +RID +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ActionTypeV2.md b/docs/v2/Ontologies/models/ActionTypeV2.md new file mode 100644 index 000000000..5de7b5c4e --- /dev/null +++ b/docs/v2/Ontologies/models/ActionTypeV2.md @@ -0,0 +1,18 @@ +# ActionTypeV2 + +Represents an action type in the Ontology. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**api_name** | ActionTypeApiName | Yes | | +**description** | Optional[str] | No | | +**display_name** | Optional[DisplayName] | No | | +**status** | ReleaseStatus | Yes | | +**parameters** | Dict[ParameterId, ActionParameterV2] | Yes | | +**rid** | ActionTypeRid | Yes | | +**operations** | List[LogicRule] | Yes | | +**tool_description** | Optional[str] | No | Optional description intended for tool use contexts, such as AI agents. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ActivePropertyTypeStatus.md b/docs/v2/Ontologies/models/ActivePropertyTypeStatus.md new file mode 100644 index 000000000..c7c6c20d8 --- /dev/null +++ b/docs/v2/Ontologies/models/ActivePropertyTypeStatus.md @@ -0,0 +1,13 @@ +# ActivePropertyTypeStatus + +This status indicates that the PropertyType will not change on short notice and should thus be safe to use in +user facing workflows. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["active"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/AddLink.md b/docs/v2/Ontologies/models/AddLink.md new file mode 100644 index 000000000..00715a92d --- /dev/null +++ b/docs/v2/Ontologies/models/AddLink.md @@ -0,0 +1,15 @@ +# AddLink + +AddLink + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**link_type_api_name_ato_b** | LinkTypeApiName | Yes | | +**link_type_api_name_bto_a** | LinkTypeApiName | Yes | | +**a_side_object** | LinkSideObject | Yes | | +**b_side_object** | LinkSideObject | Yes | | +**type** | Literal["addLink"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/AddLinkEdit.md b/docs/v2/Ontologies/models/AddLinkEdit.md new file mode 100644 index 000000000..aacc5fd98 --- /dev/null +++ b/docs/v2/Ontologies/models/AddLinkEdit.md @@ -0,0 +1,15 @@ +# AddLinkEdit + +AddLinkEdit + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**object_type** | ObjectTypeApiName | Yes | | +**primary_key** | PrimaryKeyValue | Yes | | +**link_type** | LinkTypeApiName | Yes | | +**linked_object_primary_key** | PrimaryKeyValue | Yes | | +**type** | Literal["addLink"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/AddObject.md b/docs/v2/Ontologies/models/AddObject.md new file mode 100644 index 000000000..7dc7c86b2 --- /dev/null +++ b/docs/v2/Ontologies/models/AddObject.md @@ -0,0 +1,13 @@ +# AddObject + +AddObject + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**primary_key** | PropertyValue | Yes | | +**object_type** | ObjectTypeApiName | Yes | | +**type** | Literal["addObject"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/AddObjectEdit.md b/docs/v2/Ontologies/models/AddObjectEdit.md new file mode 100644 index 000000000..75a92c4c9 --- /dev/null +++ b/docs/v2/Ontologies/models/AddObjectEdit.md @@ -0,0 +1,13 @@ +# AddObjectEdit + +AddObjectEdit + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**object_type** | ObjectTypeApiName | Yes | | +**properties** | Dict[PropertyApiName, DataValue] | Yes | | +**type** | Literal["addObject"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/AddPropertyExpression.md b/docs/v2/Ontologies/models/AddPropertyExpression.md new file mode 100644 index 000000000..2a5afbd1b --- /dev/null +++ b/docs/v2/Ontologies/models/AddPropertyExpression.md @@ -0,0 +1,13 @@ +# AddPropertyExpression + +Adds two or more numeric values. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**properties** | List[DerivedPropertyDefinition] | Yes | | +**type** | Literal["add"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/Affix.md b/docs/v2/Ontologies/models/Affix.md new file mode 100644 index 000000000..6a7fcbfa1 --- /dev/null +++ b/docs/v2/Ontologies/models/Affix.md @@ -0,0 +1,12 @@ +# Affix + +Affix + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**prefix** | Optional[PropertyTypeReferenceOrStringConstant] | No | | +**postfix** | Optional[PropertyTypeReferenceOrStringConstant] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/AggregateObjectSetRequestV2.md b/docs/v2/Ontologies/models/AggregateObjectSetRequestV2.md new file mode 100644 index 000000000..4f6384b15 --- /dev/null +++ b/docs/v2/Ontologies/models/AggregateObjectSetRequestV2.md @@ -0,0 +1,15 @@ +# AggregateObjectSetRequestV2 + +AggregateObjectSetRequestV2 + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**aggregation** | List[AggregationV2] | Yes | | +**object_set** | ObjectSet | Yes | | +**group_by** | List[AggregationGroupByV2] | Yes | | +**accuracy** | Optional[AggregationAccuracyRequest] | No | | +**include_compute_usage** | Optional[IncludeComputeUsage] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/AggregateObjectsRequestV2.md b/docs/v2/Ontologies/models/AggregateObjectsRequestV2.md new file mode 100644 index 000000000..666013db6 --- /dev/null +++ b/docs/v2/Ontologies/models/AggregateObjectsRequestV2.md @@ -0,0 +1,14 @@ +# AggregateObjectsRequestV2 + +AggregateObjectsRequestV2 + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**aggregation** | List[AggregationV2] | Yes | | +**where** | Optional[SearchJsonQueryV2] | No | | +**group_by** | List[AggregationGroupByV2] | Yes | | +**accuracy** | Optional[AggregationAccuracyRequest] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/AggregateObjectsResponseItemV2.md b/docs/v2/Ontologies/models/AggregateObjectsResponseItemV2.md new file mode 100644 index 000000000..190eb41e8 --- /dev/null +++ b/docs/v2/Ontologies/models/AggregateObjectsResponseItemV2.md @@ -0,0 +1,12 @@ +# AggregateObjectsResponseItemV2 + +AggregateObjectsResponseItemV2 + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**group** | Dict[AggregationGroupKeyV2, Optional[AggregationGroupValueV2]] | Yes | | +**metrics** | List[AggregationMetricResultV2] | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/AggregateObjectsResponseV2.md b/docs/v2/Ontologies/models/AggregateObjectsResponseV2.md new file mode 100644 index 000000000..2ae6d45dd --- /dev/null +++ b/docs/v2/Ontologies/models/AggregateObjectsResponseV2.md @@ -0,0 +1,14 @@ +# AggregateObjectsResponseV2 + +AggregateObjectsResponseV2 + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**excluded_items** | Optional[int] | No | | +**accuracy** | AggregationAccuracy | Yes | | +**data** | List[AggregateObjectsResponseItemV2] | Yes | | +**compute_usage** | Optional[ComputeSeconds] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/AggregateTimeSeries.md b/docs/v2/Ontologies/models/AggregateTimeSeries.md new file mode 100644 index 000000000..197e6ef49 --- /dev/null +++ b/docs/v2/Ontologies/models/AggregateTimeSeries.md @@ -0,0 +1,12 @@ +# AggregateTimeSeries + +AggregateTimeSeries + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**method** | TimeSeriesAggregationMethod | Yes | | +**strategy** | TimeSeriesAggregationStrategy | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/AggregationAccuracy.md b/docs/v2/Ontologies/models/AggregationAccuracy.md new file mode 100644 index 000000000..c26cc37e5 --- /dev/null +++ b/docs/v2/Ontologies/models/AggregationAccuracy.md @@ -0,0 +1,11 @@ +# AggregationAccuracy + +AggregationAccuracy + +| **Value** | +| --------- | +| `"ACCURATE"` | +| `"APPROXIMATE"` | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/AggregationAccuracyRequest.md b/docs/v2/Ontologies/models/AggregationAccuracyRequest.md new file mode 100644 index 000000000..b17209cc7 --- /dev/null +++ b/docs/v2/Ontologies/models/AggregationAccuracyRequest.md @@ -0,0 +1,11 @@ +# AggregationAccuracyRequest + +AggregationAccuracyRequest + +| **Value** | +| --------- | +| `"REQUIRE_ACCURATE"` | +| `"ALLOW_APPROXIMATE"` | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/AggregationDurationGroupingV2.md b/docs/v2/Ontologies/models/AggregationDurationGroupingV2.md new file mode 100644 index 000000000..1508300e7 --- /dev/null +++ b/docs/v2/Ontologies/models/AggregationDurationGroupingV2.md @@ -0,0 +1,16 @@ +# AggregationDurationGroupingV2 + +Divides objects into groups according to an interval. Note that this grouping applies only on date and timestamp types. +When grouping by `YEARS`, `QUARTERS`, `MONTHS`, or `WEEKS`, the `value` must be set to `1`. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**field** | PropertyApiName | Yes | | +**value** | int | Yes | | +**unit** | TimeUnit | Yes | | +**type** | Literal["duration"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/AggregationExactGroupingV2.md b/docs/v2/Ontologies/models/AggregationExactGroupingV2.md new file mode 100644 index 000000000..e91971809 --- /dev/null +++ b/docs/v2/Ontologies/models/AggregationExactGroupingV2.md @@ -0,0 +1,15 @@ +# AggregationExactGroupingV2 + +Divides objects into groups according to an exact value. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**field** | PropertyApiName | Yes | | +**max_group_count** | Optional[int] | No | | +**default_value** | Optional[str] | No | Includes a group with the specified default value that includes all objects where the specified field's value is null. Cannot be used with includeNullValues. | +**include_null_values** | Optional[bool] | No | Includes a group with a null value that includes all objects where the specified field's value is null. Cannot be used with defaultValue or orderBy clauses on the aggregation. | +**type** | Literal["exact"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/AggregationFixedWidthGroupingV2.md b/docs/v2/Ontologies/models/AggregationFixedWidthGroupingV2.md new file mode 100644 index 000000000..1e8cf52f0 --- /dev/null +++ b/docs/v2/Ontologies/models/AggregationFixedWidthGroupingV2.md @@ -0,0 +1,13 @@ +# AggregationFixedWidthGroupingV2 + +Divides objects into groups with the specified width. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**field** | PropertyApiName | Yes | | +**fixed_width** | int | Yes | | +**type** | Literal["fixedWidth"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/AggregationGroupByV2.md b/docs/v2/Ontologies/models/AggregationGroupByV2.md new file mode 100644 index 000000000..0660e8c47 --- /dev/null +++ b/docs/v2/Ontologies/models/AggregationGroupByV2.md @@ -0,0 +1,18 @@ +# AggregationGroupByV2 + +Specifies a grouping for aggregation results. + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +AggregationDurationGroupingV2 | duration +AggregationFixedWidthGroupingV2 | fixedWidth +AggregationRangesGroupingV2 | ranges +AggregationExactGroupingV2 | exact + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/AggregationGroupKeyV2.md b/docs/v2/Ontologies/models/AggregationGroupKeyV2.md new file mode 100644 index 000000000..9a8dd4040 --- /dev/null +++ b/docs/v2/Ontologies/models/AggregationGroupKeyV2.md @@ -0,0 +1,11 @@ +# AggregationGroupKeyV2 + +AggregationGroupKeyV2 + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/AggregationGroupValueV2.md b/docs/v2/Ontologies/models/AggregationGroupValueV2.md new file mode 100644 index 000000000..e6373e622 --- /dev/null +++ b/docs/v2/Ontologies/models/AggregationGroupValueV2.md @@ -0,0 +1,11 @@ +# AggregationGroupValueV2 + +AggregationGroupValueV2 + +## Type +```python +Any +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/AggregationMetricName.md b/docs/v2/Ontologies/models/AggregationMetricName.md new file mode 100644 index 000000000..8968dabea --- /dev/null +++ b/docs/v2/Ontologies/models/AggregationMetricName.md @@ -0,0 +1,11 @@ +# AggregationMetricName + +A user-specified alias for an aggregation metric name. + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/AggregationMetricResultV2.md b/docs/v2/Ontologies/models/AggregationMetricResultV2.md new file mode 100644 index 000000000..367bc2ff0 --- /dev/null +++ b/docs/v2/Ontologies/models/AggregationMetricResultV2.md @@ -0,0 +1,12 @@ +# AggregationMetricResultV2 + +AggregationMetricResultV2 + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**name** | str | Yes | | +**value** | Optional[Any] | No | The value of the metric. This will be a double in the case of a numeric metric, or a date string in the case of a date metric. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/AggregationRangeV2.md b/docs/v2/Ontologies/models/AggregationRangeV2.md new file mode 100644 index 000000000..b1d376bd7 --- /dev/null +++ b/docs/v2/Ontologies/models/AggregationRangeV2.md @@ -0,0 +1,12 @@ +# AggregationRangeV2 + +Specifies a range from an inclusive start value to an exclusive end value. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**start_value** | Any | Yes | Inclusive start. | +**end_value** | Any | Yes | Exclusive end. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/AggregationRangesGroupingV2.md b/docs/v2/Ontologies/models/AggregationRangesGroupingV2.md new file mode 100644 index 000000000..98e64396a --- /dev/null +++ b/docs/v2/Ontologies/models/AggregationRangesGroupingV2.md @@ -0,0 +1,13 @@ +# AggregationRangesGroupingV2 + +Divides objects into groups according to specified ranges. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**field** | PropertyApiName | Yes | | +**ranges** | List[AggregationRangeV2] | Yes | | +**type** | Literal["ranges"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/AggregationV2.md b/docs/v2/Ontologies/models/AggregationV2.md new file mode 100644 index 000000000..55490a582 --- /dev/null +++ b/docs/v2/Ontologies/models/AggregationV2.md @@ -0,0 +1,22 @@ +# AggregationV2 + +Specifies an aggregation function. + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +ApproximateDistinctAggregationV2 | approximateDistinct +MinAggregationV2 | min +AvgAggregationV2 | avg +MaxAggregationV2 | max +ApproximatePercentileAggregationV2 | approximatePercentile +CountAggregationV2 | count +SumAggregationV2 | sum +ExactDistinctAggregationV2 | exactDistinct + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/AllOfRule.md b/docs/v2/Ontologies/models/AllOfRule.md new file mode 100644 index 000000000..fa9d4a055 --- /dev/null +++ b/docs/v2/Ontologies/models/AllOfRule.md @@ -0,0 +1,15 @@ +# AllOfRule + +Matches intervals satisfying all the rules in the query + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**rules** | List[IntervalQueryRule] | Yes | | +**max_gaps** | Optional[int] | No | The maximum gaps between the intervals produced by the sub-rules. If not set, then gaps are not considered. | +**ordered** | bool | Yes | If true, the matched intervals must occur in order. | +**type** | Literal["allOf"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/AndQueryV2.md b/docs/v2/Ontologies/models/AndQueryV2.md new file mode 100644 index 000000000..3e45089c7 --- /dev/null +++ b/docs/v2/Ontologies/models/AndQueryV2.md @@ -0,0 +1,12 @@ +# AndQueryV2 + +Returns objects where every query is satisfied. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**value** | List[SearchJsonQueryV2] | Yes | | +**type** | Literal["and"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/AnyOfRule.md b/docs/v2/Ontologies/models/AnyOfRule.md new file mode 100644 index 000000000..5a6ef729a --- /dev/null +++ b/docs/v2/Ontologies/models/AnyOfRule.md @@ -0,0 +1,13 @@ +# AnyOfRule + +Matches intervals satisfying any of the rules in the query + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**rules** | List[IntervalQueryRule] | Yes | | +**type** | Literal["anyOf"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ApplyActionMode.md b/docs/v2/Ontologies/models/ApplyActionMode.md new file mode 100644 index 000000000..255c32e80 --- /dev/null +++ b/docs/v2/Ontologies/models/ApplyActionMode.md @@ -0,0 +1,11 @@ +# ApplyActionMode + +ApplyActionMode + +| **Value** | +| --------- | +| `"VALIDATE_ONLY"` | +| `"VALIDATE_AND_EXECUTE"` | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ApplyActionOverrides.md b/docs/v2/Ontologies/models/ApplyActionOverrides.md new file mode 100644 index 000000000..3c5e56ab4 --- /dev/null +++ b/docs/v2/Ontologies/models/ApplyActionOverrides.md @@ -0,0 +1,12 @@ +# ApplyActionOverrides + +ApplyActionOverrides + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**unique_identifier_link_id_values** | Dict[UniqueIdentifierLinkId, UniqueIdentifierValue] | Yes | | +**action_execution_time** | Optional[ActionExecutionTime] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ApplyActionRequestOptions.md b/docs/v2/Ontologies/models/ApplyActionRequestOptions.md new file mode 100644 index 000000000..27eee597b --- /dev/null +++ b/docs/v2/Ontologies/models/ApplyActionRequestOptions.md @@ -0,0 +1,12 @@ +# ApplyActionRequestOptions + +ApplyActionRequestOptions + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**mode** | Optional[ApplyActionMode] | No | | +**return_edits** | Optional[ReturnEditsMode] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ApplyActionRequestV2.md b/docs/v2/Ontologies/models/ApplyActionRequestV2.md new file mode 100644 index 000000000..92b8faf3e --- /dev/null +++ b/docs/v2/Ontologies/models/ApplyActionRequestV2.md @@ -0,0 +1,12 @@ +# ApplyActionRequestV2 + +ApplyActionRequestV2 + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**options** | Optional[ApplyActionRequestOptions] | No | | +**parameters** | Dict[ParameterId, Optional[DataValue]] | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ApplyActionWithOverridesRequest.md b/docs/v2/Ontologies/models/ApplyActionWithOverridesRequest.md new file mode 100644 index 000000000..3728ac9f6 --- /dev/null +++ b/docs/v2/Ontologies/models/ApplyActionWithOverridesRequest.md @@ -0,0 +1,12 @@ +# ApplyActionWithOverridesRequest + +ApplyActionWithOverridesRequest + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**request** | ApplyActionRequestV2 | Yes | | +**overrides** | ApplyActionOverrides | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ApplyReducersAndExtractMainValueLoadLevel.md b/docs/v2/Ontologies/models/ApplyReducersAndExtractMainValueLoadLevel.md new file mode 100644 index 000000000..fe3aaf5ce --- /dev/null +++ b/docs/v2/Ontologies/models/ApplyReducersAndExtractMainValueLoadLevel.md @@ -0,0 +1,11 @@ +# ApplyReducersAndExtractMainValueLoadLevel + +Performs both apply reducers and extract main value to return the reduced main value. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["applyReducersAndExtractMainValue"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ApplyReducersLoadLevel.md b/docs/v2/Ontologies/models/ApplyReducersLoadLevel.md new file mode 100644 index 000000000..ec032c40d --- /dev/null +++ b/docs/v2/Ontologies/models/ApplyReducersLoadLevel.md @@ -0,0 +1,11 @@ +# ApplyReducersLoadLevel + +Returns a single value of an array as configured in the ontology. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["applyReducers"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ApproximateDistinctAggregationV2.md b/docs/v2/Ontologies/models/ApproximateDistinctAggregationV2.md new file mode 100644 index 000000000..01a24f7fe --- /dev/null +++ b/docs/v2/Ontologies/models/ApproximateDistinctAggregationV2.md @@ -0,0 +1,14 @@ +# ApproximateDistinctAggregationV2 + +Computes an approximate number of distinct values for the provided field. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**field** | PropertyApiName | Yes | | +**name** | Optional[AggregationMetricName] | No | | +**direction** | Optional[OrderByDirection] | No | | +**type** | Literal["approximateDistinct"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ApproximatePercentileAggregationV2.md b/docs/v2/Ontologies/models/ApproximatePercentileAggregationV2.md new file mode 100644 index 000000000..0889af51d --- /dev/null +++ b/docs/v2/Ontologies/models/ApproximatePercentileAggregationV2.md @@ -0,0 +1,15 @@ +# ApproximatePercentileAggregationV2 + +Computes the approximate percentile value for the provided field. Requires Object Storage V2. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**field** | PropertyApiName | Yes | | +**name** | Optional[AggregationMetricName] | No | | +**approximate_percentile** | float | Yes | | +**direction** | Optional[OrderByDirection] | No | | +**type** | Literal["approximatePercentile"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ArrayConstraint.md b/docs/v2/Ontologies/models/ArrayConstraint.md new file mode 100644 index 000000000..3097e6e5a --- /dev/null +++ b/docs/v2/Ontologies/models/ArrayConstraint.md @@ -0,0 +1,15 @@ +# ArrayConstraint + +ArrayConstraint + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**minimum_size** | Optional[int] | No | | +**maximum_size** | Optional[int] | No | | +**unique_values** | bool | Yes | | +**value_constraint** | Optional[ValueTypeConstraint] | No | | +**type** | Literal["array"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ArrayEntryEvaluatedConstraint.md b/docs/v2/Ontologies/models/ArrayEntryEvaluatedConstraint.md new file mode 100644 index 000000000..5a5891ed2 --- /dev/null +++ b/docs/v2/Ontologies/models/ArrayEntryEvaluatedConstraint.md @@ -0,0 +1,11 @@ +# ArrayEntryEvaluatedConstraint + +Evaluated constraints for entries of array parameters for which per-entry evaluation is supported. + +## Type +```python +StructEvaluatedConstraint +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ArrayEvaluatedConstraint.md b/docs/v2/Ontologies/models/ArrayEvaluatedConstraint.md new file mode 100644 index 000000000..bc8999849 --- /dev/null +++ b/docs/v2/Ontologies/models/ArrayEvaluatedConstraint.md @@ -0,0 +1,12 @@ +# ArrayEvaluatedConstraint + +Evaluated constraints of array parameters that support per-entry constraint evaluations. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**entries** | List[ArrayEntryEvaluatedConstraint] | Yes | | +**type** | Literal["array"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ArraySizeConstraint.md b/docs/v2/Ontologies/models/ArraySizeConstraint.md new file mode 100644 index 000000000..bc873022e --- /dev/null +++ b/docs/v2/Ontologies/models/ArraySizeConstraint.md @@ -0,0 +1,16 @@ +# ArraySizeConstraint + +The parameter expects an array of values and the size of the array must fall within the defined range. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**lt** | Optional[Any] | No | Less than | +**lte** | Optional[Any] | No | Less than or equal | +**gt** | Optional[Any] | No | Greater than | +**gte** | Optional[Any] | No | Greater than or equal | +**type** | Literal["arraySize"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ArtifactRepositoryRid.md b/docs/v2/Ontologies/models/ArtifactRepositoryRid.md new file mode 100644 index 000000000..e2c47b290 --- /dev/null +++ b/docs/v2/Ontologies/models/ArtifactRepositoryRid.md @@ -0,0 +1,11 @@ +# ArtifactRepositoryRid + +ArtifactRepositoryRid + +## Type +```python +RID +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/AttachmentMetadataResponse.md b/docs/v2/Ontologies/models/AttachmentMetadataResponse.md new file mode 100644 index 000000000..2b5d1ca82 --- /dev/null +++ b/docs/v2/Ontologies/models/AttachmentMetadataResponse.md @@ -0,0 +1,16 @@ +# AttachmentMetadataResponse + +The attachment metadata response + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +AttachmentV2 | single +ListAttachmentsResponseV2 | multiple + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/AttachmentRid.md b/docs/v2/Ontologies/models/AttachmentRid.md new file mode 100644 index 000000000..cb496fe7b --- /dev/null +++ b/docs/v2/Ontologies/models/AttachmentRid.md @@ -0,0 +1,11 @@ +# AttachmentRid + +The unique resource identifier of an attachment. + +## Type +```python +RID +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/AttachmentV2.md b/docs/v2/Ontologies/models/AttachmentV2.md new file mode 100644 index 000000000..88d604e46 --- /dev/null +++ b/docs/v2/Ontologies/models/AttachmentV2.md @@ -0,0 +1,15 @@ +# AttachmentV2 + +The representation of an attachment. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**rid** | AttachmentRid | Yes | | +**filename** | Filename | Yes | | +**size_bytes** | SizeBytes | Yes | | +**media_type** | MediaType | Yes | | +**type** | Literal["single"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/AvgAggregationV2.md b/docs/v2/Ontologies/models/AvgAggregationV2.md new file mode 100644 index 000000000..08aac5cf8 --- /dev/null +++ b/docs/v2/Ontologies/models/AvgAggregationV2.md @@ -0,0 +1,14 @@ +# AvgAggregationV2 + +Computes the average value for the provided field. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**field** | PropertyApiName | Yes | | +**name** | Optional[AggregationMetricName] | No | | +**direction** | Optional[OrderByDirection] | No | | +**type** | Literal["avg"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/BatchActionObjectEdit.md b/docs/v2/Ontologies/models/BatchActionObjectEdit.md new file mode 100644 index 000000000..e3fbe175e --- /dev/null +++ b/docs/v2/Ontologies/models/BatchActionObjectEdit.md @@ -0,0 +1,17 @@ +# BatchActionObjectEdit + +BatchActionObjectEdit + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +ModifyObject | modifyObject +AddObject | addObject +AddLink | addLink + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/BatchActionObjectEdits.md b/docs/v2/Ontologies/models/BatchActionObjectEdits.md new file mode 100644 index 000000000..a20bf8a38 --- /dev/null +++ b/docs/v2/Ontologies/models/BatchActionObjectEdits.md @@ -0,0 +1,17 @@ +# BatchActionObjectEdits + +BatchActionObjectEdits + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**edits** | List[BatchActionObjectEdit] | Yes | | +**added_object_count** | int | Yes | | +**modified_objects_count** | int | Yes | | +**deleted_objects_count** | int | Yes | | +**added_links_count** | int | Yes | | +**deleted_links_count** | int | Yes | | +**type** | Literal["edits"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/BatchActionResults.md b/docs/v2/Ontologies/models/BatchActionResults.md new file mode 100644 index 000000000..9fb10b66f --- /dev/null +++ b/docs/v2/Ontologies/models/BatchActionResults.md @@ -0,0 +1,16 @@ +# BatchActionResults + +BatchActionResults + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +BatchActionObjectEdits | edits +ObjectTypeEdits | largeScaleEdits + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/BatchApplyActionRequestItem.md b/docs/v2/Ontologies/models/BatchApplyActionRequestItem.md new file mode 100644 index 000000000..f7d8123f2 --- /dev/null +++ b/docs/v2/Ontologies/models/BatchApplyActionRequestItem.md @@ -0,0 +1,11 @@ +# BatchApplyActionRequestItem + +BatchApplyActionRequestItem + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**parameters** | Dict[ParameterId, Optional[DataValue]] | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/BatchApplyActionRequestOptions.md b/docs/v2/Ontologies/models/BatchApplyActionRequestOptions.md new file mode 100644 index 000000000..97426e068 --- /dev/null +++ b/docs/v2/Ontologies/models/BatchApplyActionRequestOptions.md @@ -0,0 +1,11 @@ +# BatchApplyActionRequestOptions + +BatchApplyActionRequestOptions + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**return_edits** | Optional[BatchReturnEditsMode] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/BatchApplyActionRequestV2.md b/docs/v2/Ontologies/models/BatchApplyActionRequestV2.md new file mode 100644 index 000000000..ee4a6b287 --- /dev/null +++ b/docs/v2/Ontologies/models/BatchApplyActionRequestV2.md @@ -0,0 +1,12 @@ +# BatchApplyActionRequestV2 + +BatchApplyActionRequestV2 + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**options** | Optional[BatchApplyActionRequestOptions] | No | | +**requests** | List[BatchApplyActionRequestItem] | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/BatchApplyActionResponseV2.md b/docs/v2/Ontologies/models/BatchApplyActionResponseV2.md new file mode 100644 index 000000000..8c038a4d5 --- /dev/null +++ b/docs/v2/Ontologies/models/BatchApplyActionResponseV2.md @@ -0,0 +1,11 @@ +# BatchApplyActionResponseV2 + +BatchApplyActionResponseV2 + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**edits** | Optional[BatchActionResults] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/BatchReturnEditsMode.md b/docs/v2/Ontologies/models/BatchReturnEditsMode.md new file mode 100644 index 000000000..ca91277c6 --- /dev/null +++ b/docs/v2/Ontologies/models/BatchReturnEditsMode.md @@ -0,0 +1,11 @@ +# BatchReturnEditsMode + +BatchReturnEditsMode + +| **Value** | +| --------- | +| `"ALL"` | +| `"NONE"` | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/BatchedFunctionLogicRule.md b/docs/v2/Ontologies/models/BatchedFunctionLogicRule.md new file mode 100644 index 000000000..7c6ce444d --- /dev/null +++ b/docs/v2/Ontologies/models/BatchedFunctionLogicRule.md @@ -0,0 +1,13 @@ +# BatchedFunctionLogicRule + +BatchedFunctionLogicRule + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**object_set_rid_input_name** | FunctionParameterName | Yes | | +**function_rule** | FunctionLogicRule | Yes | | +**type** | Literal["batchedFunction"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/BlueprintIcon.md b/docs/v2/Ontologies/models/BlueprintIcon.md new file mode 100644 index 000000000..78ad9d72e --- /dev/null +++ b/docs/v2/Ontologies/models/BlueprintIcon.md @@ -0,0 +1,13 @@ +# BlueprintIcon + +BlueprintIcon + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**color** | str | Yes | A hexadecimal color code. | +**name** | str | Yes | The [name](https://blueprintjs.com/docs/#icons/icons-list) of the Blueprint icon. Used to specify the Blueprint icon to represent the object type in a React app. | +**type** | Literal["blueprint"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/BoundingBoxValue.md b/docs/v2/Ontologies/models/BoundingBoxValue.md new file mode 100644 index 000000000..4aaf5ddb3 --- /dev/null +++ b/docs/v2/Ontologies/models/BoundingBoxValue.md @@ -0,0 +1,13 @@ +# BoundingBoxValue + +The top left and bottom right coordinate points that make up the bounding box. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**top_left** | WithinBoundingBoxPoint | Yes | | +**bottom_right** | WithinBoundingBoxPoint | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/CenterPoint.md b/docs/v2/Ontologies/models/CenterPoint.md new file mode 100644 index 000000000..83354b50d --- /dev/null +++ b/docs/v2/Ontologies/models/CenterPoint.md @@ -0,0 +1,13 @@ +# CenterPoint + +The coordinate point to use as the center of the distance query. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**center** | CenterPointTypes | Yes | | +**distance** | Distance | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/CenterPointTypes.md b/docs/v2/Ontologies/models/CenterPointTypes.md new file mode 100644 index 000000000..b9f26bfb4 --- /dev/null +++ b/docs/v2/Ontologies/models/CenterPointTypes.md @@ -0,0 +1,11 @@ +# CenterPointTypes + +CenterPointTypes + +## Type +```python +GeoPoint +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ContainsAllTermsInOrderPrefixLastTerm.md b/docs/v2/Ontologies/models/ContainsAllTermsInOrderPrefixLastTerm.md new file mode 100644 index 000000000..e458fb62e --- /dev/null +++ b/docs/v2/Ontologies/models/ContainsAllTermsInOrderPrefixLastTerm.md @@ -0,0 +1,18 @@ +# ContainsAllTermsInOrderPrefixLastTerm + +Returns objects where the specified field contains all of the terms in the order provided, +but they do have to be adjacent to each other. +The last term can be a partial prefix match. Allows you to specify a property to query on +by a variety of means. Either `field` or `propertyIdentifier` can be supplied, but not both. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**field** | Optional[PropertyApiName] | No | | +**property_identifier** | Optional[PropertyIdentifier] | No | | +**value** | str | Yes | | +**type** | Literal["containsAllTermsInOrderPrefixLastTerm"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ContainsAllTermsInOrderQuery.md b/docs/v2/Ontologies/models/ContainsAllTermsInOrderQuery.md new file mode 100644 index 000000000..36862d777 --- /dev/null +++ b/docs/v2/Ontologies/models/ContainsAllTermsInOrderQuery.md @@ -0,0 +1,17 @@ +# ContainsAllTermsInOrderQuery + +Returns objects where the specified field contains all of the terms in the order provided, +but they do have to be adjacent to each other. Allows you to specify a property to query on +by a variety of means. Either `field` or `propertyIdentifier` must be supplied, but not both. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**field** | Optional[PropertyApiName] | No | | +**property_identifier** | Optional[PropertyIdentifier] | No | | +**value** | str | Yes | | +**type** | Literal["containsAllTermsInOrder"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ContainsAllTermsQuery.md b/docs/v2/Ontologies/models/ContainsAllTermsQuery.md new file mode 100644 index 000000000..4e43def72 --- /dev/null +++ b/docs/v2/Ontologies/models/ContainsAllTermsQuery.md @@ -0,0 +1,18 @@ +# ContainsAllTermsQuery + +Returns objects where the specified field contains all of the whitespace separated words in any +order in the provided value. This query supports fuzzy matching. Allows you to specify a property to query on +by a variety of means. Either `field` or `propertyIdentifier` must be supplied, but not both. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**field** | Optional[PropertyApiName] | No | | +**property_identifier** | Optional[PropertyIdentifier] | No | | +**value** | str | Yes | | +**fuzzy** | Optional[FuzzyV2] | No | | +**type** | Literal["containsAllTerms"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ContainsAnyTermQuery.md b/docs/v2/Ontologies/models/ContainsAnyTermQuery.md new file mode 100644 index 000000000..6384fc4de --- /dev/null +++ b/docs/v2/Ontologies/models/ContainsAnyTermQuery.md @@ -0,0 +1,18 @@ +# ContainsAnyTermQuery + +Returns objects where the specified field contains any of the whitespace separated words in any +order in the provided value. This query supports fuzzy matching. Allows you to specify a property to query on +by a variety of means. Either `field` or `propertyIdentifier` must be supplied, but not both. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**field** | Optional[PropertyApiName] | No | | +**property_identifier** | Optional[PropertyIdentifier] | No | | +**value** | str | Yes | | +**fuzzy** | Optional[FuzzyV2] | No | | +**type** | Literal["containsAnyTerm"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ContainsQueryV2.md b/docs/v2/Ontologies/models/ContainsQueryV2.md new file mode 100644 index 000000000..1a05187f8 --- /dev/null +++ b/docs/v2/Ontologies/models/ContainsQueryV2.md @@ -0,0 +1,16 @@ +# ContainsQueryV2 + +Returns objects where the specified array contains a value. Allows you to specify a property to query on by a +variety of means. Either `field` or `propertyIdentifier` must be supplied, but not both. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**field** | Optional[PropertyApiName] | No | | +**property_identifier** | Optional[PropertyIdentifier] | No | | +**value** | PropertyValue | Yes | | +**type** | Literal["contains"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/CountAggregationV2.md b/docs/v2/Ontologies/models/CountAggregationV2.md new file mode 100644 index 000000000..6734b02e3 --- /dev/null +++ b/docs/v2/Ontologies/models/CountAggregationV2.md @@ -0,0 +1,13 @@ +# CountAggregationV2 + +Computes the total count of objects. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**name** | Optional[AggregationMetricName] | No | | +**direction** | Optional[OrderByDirection] | No | | +**type** | Literal["count"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/CountObjectsResponseV2.md b/docs/v2/Ontologies/models/CountObjectsResponseV2.md new file mode 100644 index 000000000..57ad70563 --- /dev/null +++ b/docs/v2/Ontologies/models/CountObjectsResponseV2.md @@ -0,0 +1,11 @@ +# CountObjectsResponseV2 + +CountObjectsResponseV2 + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**count** | Optional[int] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/CreateInterfaceLinkLogicRule.md b/docs/v2/Ontologies/models/CreateInterfaceLinkLogicRule.md new file mode 100644 index 000000000..ee12a86d7 --- /dev/null +++ b/docs/v2/Ontologies/models/CreateInterfaceLinkLogicRule.md @@ -0,0 +1,15 @@ +# CreateInterfaceLinkLogicRule + +CreateInterfaceLinkLogicRule + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**interface_type_api_name** | InterfaceTypeApiName | Yes | | +**interface_link_type_api_name** | InterfaceLinkTypeApiName | Yes | | +**source_object** | ParameterId | Yes | | +**target_object** | ParameterId | Yes | | +**type** | Literal["createInterfaceLink"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/CreateInterfaceLogicRule.md b/docs/v2/Ontologies/models/CreateInterfaceLogicRule.md new file mode 100644 index 000000000..ba584a5cd --- /dev/null +++ b/docs/v2/Ontologies/models/CreateInterfaceLogicRule.md @@ -0,0 +1,15 @@ +# CreateInterfaceLogicRule + +CreateInterfaceLogicRule + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**interface_type_api_name** | InterfaceTypeApiName | Yes | | +**object_type** | ParameterId | Yes | | +**shared_property_arguments** | Dict[SharedPropertyTypeApiName, LogicRuleArgument] | Yes | | +**struct_property_arguments** | Dict[SharedPropertyTypeApiName, Dict[StructFieldApiName, StructFieldArgument]] | Yes | | +**type** | Literal["createInterface"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/CreateInterfaceObjectRule.md b/docs/v2/Ontologies/models/CreateInterfaceObjectRule.md new file mode 100644 index 000000000..711eb22d7 --- /dev/null +++ b/docs/v2/Ontologies/models/CreateInterfaceObjectRule.md @@ -0,0 +1,12 @@ +# CreateInterfaceObjectRule + +CreateInterfaceObjectRule + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**interface_type_api_name** | InterfaceTypeApiName | Yes | | +**type** | Literal["createInterfaceObject"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/CreateLinkLogicRule.md b/docs/v2/Ontologies/models/CreateLinkLogicRule.md new file mode 100644 index 000000000..8fb5f06ea --- /dev/null +++ b/docs/v2/Ontologies/models/CreateLinkLogicRule.md @@ -0,0 +1,14 @@ +# CreateLinkLogicRule + +CreateLinkLogicRule + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**link_type_api_name** | LinkTypeApiName | Yes | | +**source_object** | ParameterId | Yes | | +**target_object** | ParameterId | Yes | | +**type** | Literal["createLink"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/CreateLinkRule.md b/docs/v2/Ontologies/models/CreateLinkRule.md new file mode 100644 index 000000000..20b3fb0e3 --- /dev/null +++ b/docs/v2/Ontologies/models/CreateLinkRule.md @@ -0,0 +1,15 @@ +# CreateLinkRule + +CreateLinkRule + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**link_type_api_name_ato_b** | LinkTypeApiName | Yes | | +**link_type_api_name_bto_a** | LinkTypeApiName | Yes | | +**a_side_object_type_api_name** | ObjectTypeApiName | Yes | | +**b_side_object_type_api_name** | ObjectTypeApiName | Yes | | +**type** | Literal["createLink"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/CreateObjectLogicRule.md b/docs/v2/Ontologies/models/CreateObjectLogicRule.md new file mode 100644 index 000000000..d0b53d072 --- /dev/null +++ b/docs/v2/Ontologies/models/CreateObjectLogicRule.md @@ -0,0 +1,14 @@ +# CreateObjectLogicRule + +CreateObjectLogicRule + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**object_type_api_name** | ObjectTypeApiName | Yes | | +**property_arguments** | Dict[PropertyApiName, LogicRuleArgument] | Yes | | +**struct_property_arguments** | Dict[PropertyApiName, Dict[StructFieldApiName, StructFieldArgument]] | Yes | | +**type** | Literal["createObject"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/CreateObjectRule.md b/docs/v2/Ontologies/models/CreateObjectRule.md new file mode 100644 index 000000000..b8740ae41 --- /dev/null +++ b/docs/v2/Ontologies/models/CreateObjectRule.md @@ -0,0 +1,12 @@ +# CreateObjectRule + +CreateObjectRule + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**object_type_api_name** | ObjectTypeApiName | Yes | | +**type** | Literal["createObject"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/CreateOrModifyObjectLogicRule.md b/docs/v2/Ontologies/models/CreateOrModifyObjectLogicRule.md new file mode 100644 index 000000000..4ff2b3bb3 --- /dev/null +++ b/docs/v2/Ontologies/models/CreateOrModifyObjectLogicRule.md @@ -0,0 +1,14 @@ +# CreateOrModifyObjectLogicRule + +CreateOrModifyObjectLogicRule + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**object_type_api_name** | ObjectTypeApiName | Yes | | +**property_arguments** | Dict[PropertyApiName, LogicRuleArgument] | Yes | | +**struct_property_arguments** | Dict[PropertyApiName, Dict[StructFieldApiName, StructFieldArgument]] | Yes | | +**type** | Literal["createOrModifyObject"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/CreateOrModifyObjectLogicRuleV2.md b/docs/v2/Ontologies/models/CreateOrModifyObjectLogicRuleV2.md new file mode 100644 index 000000000..10f4cb0a8 --- /dev/null +++ b/docs/v2/Ontologies/models/CreateOrModifyObjectLogicRuleV2.md @@ -0,0 +1,14 @@ +# CreateOrModifyObjectLogicRuleV2 + +CreateOrModifyObjectLogicRuleV2 + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**object_to_modify** | ParameterId | Yes | | +**property_arguments** | Dict[PropertyApiName, LogicRuleArgument] | Yes | | +**struct_property_arguments** | Dict[PropertyApiName, Dict[StructFieldApiName, StructFieldArgument]] | Yes | | +**type** | Literal["createOrModifyObjectV2"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/CreateTemporaryObjectSetRequestV2.md b/docs/v2/Ontologies/models/CreateTemporaryObjectSetRequestV2.md new file mode 100644 index 000000000..0ac0afcd1 --- /dev/null +++ b/docs/v2/Ontologies/models/CreateTemporaryObjectSetRequestV2.md @@ -0,0 +1,11 @@ +# CreateTemporaryObjectSetRequestV2 + +CreateTemporaryObjectSetRequestV2 + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**object_set** | ObjectSet | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/CreateTemporaryObjectSetResponseV2.md b/docs/v2/Ontologies/models/CreateTemporaryObjectSetResponseV2.md new file mode 100644 index 000000000..e1260c7e0 --- /dev/null +++ b/docs/v2/Ontologies/models/CreateTemporaryObjectSetResponseV2.md @@ -0,0 +1,11 @@ +# CreateTemporaryObjectSetResponseV2 + +CreateTemporaryObjectSetResponseV2 + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**object_set_rid** | ObjectSetRid | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/CurrentTimeArgument.md b/docs/v2/Ontologies/models/CurrentTimeArgument.md new file mode 100644 index 000000000..559639065 --- /dev/null +++ b/docs/v2/Ontologies/models/CurrentTimeArgument.md @@ -0,0 +1,11 @@ +# CurrentTimeArgument + +Represents the current time argument in a logic rule. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["currentTime"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/CurrentUserArgument.md b/docs/v2/Ontologies/models/CurrentUserArgument.md new file mode 100644 index 000000000..4a863ffde --- /dev/null +++ b/docs/v2/Ontologies/models/CurrentUserArgument.md @@ -0,0 +1,11 @@ +# CurrentUserArgument + +Represents the current user argument in a logic rule. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["currentUser"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/DataValue.md b/docs/v2/Ontologies/models/DataValue.md new file mode 100644 index 000000000..0780209fc --- /dev/null +++ b/docs/v2/Ontologies/models/DataValue.md @@ -0,0 +1,39 @@ +# DataValue + +Represents the value of data in the following format. Note that these values can be nested, for example an array of structs. +| Type | JSON encoding | Example | +|-------------------------------------|-------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Array | array | `["alpha", "bravo", "charlie"]` | +| Attachment | string | `"ri.attachments.main.attachment.2f944bae-5851-4204-8615-920c969a9f2e"` | +| Boolean | boolean | `true` | +| Byte | number | `31` | +| CipherText | string | `"CIPHER::ri.bellaso.main.cipher-channel.e414ab9e-b606-499a-a0e1-844fa296ba7e::unzjs3VifsTxuIpf1fH1CJ7OaPBr2bzMMdozPaZJtCii8vVG60yXIEmzoOJaEl9mfFFe::CIPHER"` | +| Date | ISO 8601 extended local date string | `"2021-05-01"` | +| Decimal | string | `"2.718281828"` | +| Double | number | `3.14159265` | +| EntrySet | array of JSON objects | `[{"key": "EMP1234", "value": "true"}, {"key": "EMP4444", "value": "false"}]` | +| Float | number | `3.14159265` | +| Integer | number | `238940` | +| Long | string | `"58319870951433"` | +| Marking | string | `"MU"` | +| Null | null | `null` | +| Object Set | string OR the object set definition | `ri.object-set.main.versioned-object-set.h13274m8-23f5-431c-8aee-a4554157c57z` | +| Ontology Object Reference | JSON encoding of the object's primary key | `10033123` or `"EMP1234"` | +| Ontology Interface Object Reference | JSON encoding of the object's API name and primary key| `{"objectTypeApiName":"Employee", "primaryKeyValue":"EMP1234"}` | +| Ontology Object Type Reference | string of the object type's api name | `"Employee"` | +| Set | array | `["alpha", "bravo", "charlie"]` | +| Short | number | `8739` | +| String | string | `"Call me Ishmael"` | +| Struct | JSON object | `{"name": "John Doe", "age": 42}` | +| TwoDimensionalAggregation | JSON object | `{"groups": [{"key": "alpha", "value": 100}, {"key": "beta", "value": 101}]}` | +| ThreeDimensionalAggregation | JSON object | `{"groups": [{"key": "NYC", "groups": [{"key": "Engineer", "value" : 100}]}]}` | +| Timestamp | ISO 8601 extended offset date-time string in UTC zone | `"2021-01-04T05:00:00Z"` | + + +## Type +```python +Any +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/DatetimeFormat.md b/docs/v2/Ontologies/models/DatetimeFormat.md new file mode 100644 index 000000000..9687b41b2 --- /dev/null +++ b/docs/v2/Ontologies/models/DatetimeFormat.md @@ -0,0 +1,16 @@ +# DatetimeFormat + +DatetimeFormat + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +DatetimeStringFormat | stringFormat +DatetimeLocalizedFormat | localizedFormat + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/DatetimeLocalizedFormat.md b/docs/v2/Ontologies/models/DatetimeLocalizedFormat.md new file mode 100644 index 000000000..f22ced509 --- /dev/null +++ b/docs/v2/Ontologies/models/DatetimeLocalizedFormat.md @@ -0,0 +1,12 @@ +# DatetimeLocalizedFormat + +Predefined localized formatting options. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**format** | DatetimeLocalizedFormatType | Yes | | +**type** | Literal["localizedFormat"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/DatetimeLocalizedFormatType.md b/docs/v2/Ontologies/models/DatetimeLocalizedFormatType.md new file mode 100644 index 000000000..96a9f5dc7 --- /dev/null +++ b/docs/v2/Ontologies/models/DatetimeLocalizedFormatType.md @@ -0,0 +1,16 @@ +# DatetimeLocalizedFormatType + +Localized date/time format types. + +| **Value** | +| --------- | +| `"DATE_FORMAT_RELATIVE_TO_NOW"` | +| `"DATE_FORMAT_DATE"` | +| `"DATE_FORMAT_YEAR_AND_MONTH"` | +| `"DATE_FORMAT_DATE_TIME"` | +| `"DATE_FORMAT_DATE_TIME_SHORT"` | +| `"DATE_FORMAT_TIME"` | +| `"DATE_FORMAT_ISO_INSTANT"` | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/DatetimeStringFormat.md b/docs/v2/Ontologies/models/DatetimeStringFormat.md new file mode 100644 index 000000000..5114aef6d --- /dev/null +++ b/docs/v2/Ontologies/models/DatetimeStringFormat.md @@ -0,0 +1,12 @@ +# DatetimeStringFormat + +A strictly specified date format pattern. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**pattern** | str | Yes | A valid format string composed of date/time patterns. | +**type** | Literal["stringFormat"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/DatetimeTimezone.md b/docs/v2/Ontologies/models/DatetimeTimezone.md new file mode 100644 index 000000000..84e7bf347 --- /dev/null +++ b/docs/v2/Ontologies/models/DatetimeTimezone.md @@ -0,0 +1,16 @@ +# DatetimeTimezone + +DatetimeTimezone + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +DatetimeTimezoneStatic | static +DatetimeTimezoneUser | user + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/DatetimeTimezoneStatic.md b/docs/v2/Ontologies/models/DatetimeTimezoneStatic.md new file mode 100644 index 000000000..39bbe742d --- /dev/null +++ b/docs/v2/Ontologies/models/DatetimeTimezoneStatic.md @@ -0,0 +1,12 @@ +# DatetimeTimezoneStatic + +DatetimeTimezoneStatic + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**zone_id** | PropertyTypeReferenceOrStringConstant | Yes | | +**type** | Literal["static"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/DatetimeTimezoneUser.md b/docs/v2/Ontologies/models/DatetimeTimezoneUser.md new file mode 100644 index 000000000..6e97f1407 --- /dev/null +++ b/docs/v2/Ontologies/models/DatetimeTimezoneUser.md @@ -0,0 +1,11 @@ +# DatetimeTimezoneUser + +The user's local timezone. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["user"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/DecryptionResult.md b/docs/v2/Ontologies/models/DecryptionResult.md new file mode 100644 index 000000000..365b0cd0b --- /dev/null +++ b/docs/v2/Ontologies/models/DecryptionResult.md @@ -0,0 +1,12 @@ +# DecryptionResult + +The result of a CipherText decryption. If successful, the plaintext decrypted value will be returned. Otherwise, an error will be thrown. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**plaintext** | Optional[Plaintext] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/DeleteInterfaceLinkLogicRule.md b/docs/v2/Ontologies/models/DeleteInterfaceLinkLogicRule.md new file mode 100644 index 000000000..4b8864df9 --- /dev/null +++ b/docs/v2/Ontologies/models/DeleteInterfaceLinkLogicRule.md @@ -0,0 +1,15 @@ +# DeleteInterfaceLinkLogicRule + +DeleteInterfaceLinkLogicRule + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**interface_type_api_name** | InterfaceTypeApiName | Yes | | +**interface_link_type_api_name** | InterfaceLinkTypeApiName | Yes | | +**source_object** | ParameterId | Yes | | +**target_object** | ParameterId | Yes | | +**type** | Literal["deleteInterfaceLink"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/DeleteInterfaceObjectRule.md b/docs/v2/Ontologies/models/DeleteInterfaceObjectRule.md new file mode 100644 index 000000000..0da183a2d --- /dev/null +++ b/docs/v2/Ontologies/models/DeleteInterfaceObjectRule.md @@ -0,0 +1,12 @@ +# DeleteInterfaceObjectRule + +DeleteInterfaceObjectRule + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**interface_type_api_name** | InterfaceTypeApiName | Yes | | +**type** | Literal["deleteInterfaceObject"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/DeleteLink.md b/docs/v2/Ontologies/models/DeleteLink.md new file mode 100644 index 000000000..9aeb6d693 --- /dev/null +++ b/docs/v2/Ontologies/models/DeleteLink.md @@ -0,0 +1,15 @@ +# DeleteLink + +DeleteLink + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**link_type_api_name_ato_b** | LinkTypeApiName | Yes | | +**link_type_api_name_bto_a** | LinkTypeApiName | Yes | | +**a_side_object** | LinkSideObject | Yes | | +**b_side_object** | LinkSideObject | Yes | | +**type** | Literal["deleteLink"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/DeleteLinkEdit.md b/docs/v2/Ontologies/models/DeleteLinkEdit.md new file mode 100644 index 000000000..b41387b6e --- /dev/null +++ b/docs/v2/Ontologies/models/DeleteLinkEdit.md @@ -0,0 +1,15 @@ +# DeleteLinkEdit + +DeleteLinkEdit + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**object_type** | ObjectTypeApiName | Yes | | +**primary_key** | PrimaryKeyValue | Yes | | +**link_type** | LinkTypeApiName | Yes | | +**linked_object_primary_key** | PrimaryKeyValue | Yes | | +**type** | Literal["removeLink"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/DeleteLinkLogicRule.md b/docs/v2/Ontologies/models/DeleteLinkLogicRule.md new file mode 100644 index 000000000..5ab0ef957 --- /dev/null +++ b/docs/v2/Ontologies/models/DeleteLinkLogicRule.md @@ -0,0 +1,14 @@ +# DeleteLinkLogicRule + +DeleteLinkLogicRule + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**link_type_api_name** | LinkTypeApiName | Yes | | +**source_object** | ParameterId | Yes | | +**target_object** | ParameterId | Yes | | +**type** | Literal["deleteLink"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/DeleteLinkRule.md b/docs/v2/Ontologies/models/DeleteLinkRule.md new file mode 100644 index 000000000..8dc15d73c --- /dev/null +++ b/docs/v2/Ontologies/models/DeleteLinkRule.md @@ -0,0 +1,15 @@ +# DeleteLinkRule + +DeleteLinkRule + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**link_type_api_name_ato_b** | LinkTypeApiName | Yes | | +**link_type_api_name_bto_a** | LinkTypeApiName | Yes | | +**a_side_object_type_api_name** | ObjectTypeApiName | Yes | | +**b_side_object_type_api_name** | ObjectTypeApiName | Yes | | +**type** | Literal["deleteLink"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/DeleteObject.md b/docs/v2/Ontologies/models/DeleteObject.md new file mode 100644 index 000000000..505bec345 --- /dev/null +++ b/docs/v2/Ontologies/models/DeleteObject.md @@ -0,0 +1,13 @@ +# DeleteObject + +DeleteObject + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**primary_key** | PropertyValue | Yes | | +**object_type** | ObjectTypeApiName | Yes | | +**type** | Literal["deleteObject"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/DeleteObjectEdit.md b/docs/v2/Ontologies/models/DeleteObjectEdit.md new file mode 100644 index 000000000..20c48d9db --- /dev/null +++ b/docs/v2/Ontologies/models/DeleteObjectEdit.md @@ -0,0 +1,13 @@ +# DeleteObjectEdit + +DeleteObjectEdit + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**object_type** | ObjectTypeApiName | Yes | | +**primary_key** | PropertyValue | Yes | | +**type** | Literal["deleteObject"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/DeleteObjectLogicRule.md b/docs/v2/Ontologies/models/DeleteObjectLogicRule.md new file mode 100644 index 000000000..e980e5612 --- /dev/null +++ b/docs/v2/Ontologies/models/DeleteObjectLogicRule.md @@ -0,0 +1,12 @@ +# DeleteObjectLogicRule + +DeleteObjectLogicRule + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**object_to_delete** | ParameterId | Yes | | +**type** | Literal["deleteObject"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/DeleteObjectRule.md b/docs/v2/Ontologies/models/DeleteObjectRule.md new file mode 100644 index 000000000..153e4777f --- /dev/null +++ b/docs/v2/Ontologies/models/DeleteObjectRule.md @@ -0,0 +1,12 @@ +# DeleteObjectRule + +DeleteObjectRule + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**object_type_api_name** | ObjectTypeApiName | Yes | | +**type** | Literal["deleteObject"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/DeprecatedPropertyTypeStatus.md b/docs/v2/Ontologies/models/DeprecatedPropertyTypeStatus.md new file mode 100644 index 000000000..d6cc38190 --- /dev/null +++ b/docs/v2/Ontologies/models/DeprecatedPropertyTypeStatus.md @@ -0,0 +1,16 @@ +# DeprecatedPropertyTypeStatus + +This status indicates that the PropertyType is reaching the end of its life and will be removed as per the +deadline specified. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**message** | str | Yes | | +**deadline** | datetime | Yes | | +**replaced_by** | Optional[PropertyTypeRid] | No | | +**type** | Literal["deprecated"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/DerivedPropertyApiName.md b/docs/v2/Ontologies/models/DerivedPropertyApiName.md new file mode 100644 index 000000000..83713105b --- /dev/null +++ b/docs/v2/Ontologies/models/DerivedPropertyApiName.md @@ -0,0 +1,12 @@ +# DerivedPropertyApiName + +The name of the derived property that will be returned. + + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/DerivedPropertyDefinition.md b/docs/v2/Ontologies/models/DerivedPropertyDefinition.md new file mode 100644 index 000000000..f82fedf5d --- /dev/null +++ b/docs/v2/Ontologies/models/DerivedPropertyDefinition.md @@ -0,0 +1,26 @@ +# DerivedPropertyDefinition + +Definition of a derived property. + + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +AddPropertyExpression | add +AbsoluteValuePropertyExpression | absoluteValue +ExtractPropertyExpression | extract +SelectedPropertyExpression | selection +NegatePropertyExpression | negate +SubtractPropertyExpression | subtract +PropertyApiNameSelector | property +LeastPropertyExpression | least +DividePropertyExpression | divide +MultiplyPropertyExpression | multiply +GreatestPropertyExpression | greatest + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/DividePropertyExpression.md b/docs/v2/Ontologies/models/DividePropertyExpression.md new file mode 100644 index 000000000..9f9df6b05 --- /dev/null +++ b/docs/v2/Ontologies/models/DividePropertyExpression.md @@ -0,0 +1,14 @@ +# DividePropertyExpression + +Divides the left numeric value by the right numeric value. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**left** | DerivedPropertyDefinition | Yes | | +**right** | DerivedPropertyDefinition | Yes | | +**type** | Literal["divide"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/DoesNotIntersectBoundingBoxQuery.md b/docs/v2/Ontologies/models/DoesNotIntersectBoundingBoxQuery.md new file mode 100644 index 000000000..ddbc5e49a --- /dev/null +++ b/docs/v2/Ontologies/models/DoesNotIntersectBoundingBoxQuery.md @@ -0,0 +1,17 @@ +# DoesNotIntersectBoundingBoxQuery + +Returns objects where the specified field does not intersect the bounding box provided. Allows you to specify a +property to query on by a variety of means. Either `field` or `propertyIdentifier` must be supplied, but not +both. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**field** | Optional[PropertyApiName] | No | | +**property_identifier** | Optional[PropertyIdentifier] | No | | +**value** | BoundingBoxValue | Yes | | +**type** | Literal["doesNotIntersectBoundingBox"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/DoesNotIntersectPolygonQuery.md b/docs/v2/Ontologies/models/DoesNotIntersectPolygonQuery.md new file mode 100644 index 000000000..46196bfa6 --- /dev/null +++ b/docs/v2/Ontologies/models/DoesNotIntersectPolygonQuery.md @@ -0,0 +1,17 @@ +# DoesNotIntersectPolygonQuery + +Returns objects where the specified field does not intersect the polygon provided. Allows you to specify a +property to query on by a variety of means. Either `field` or `propertyIdentifier` must be supplied, but not +both. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**field** | Optional[PropertyApiName] | No | | +**property_identifier** | Optional[PropertyIdentifier] | No | | +**value** | PolygonValue | Yes | | +**type** | Literal["doesNotIntersectPolygon"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/DoubleVector.md b/docs/v2/Ontologies/models/DoubleVector.md new file mode 100644 index 000000000..68198ce63 --- /dev/null +++ b/docs/v2/Ontologies/models/DoubleVector.md @@ -0,0 +1,14 @@ +# DoubleVector + +The vector to search with. The vector must be of the same dimension as the vectors stored in the provided +propertyIdentifier. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**value** | List[float] | Yes | | +**type** | Literal["vector"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/DurationBaseValue.md b/docs/v2/Ontologies/models/DurationBaseValue.md new file mode 100644 index 000000000..63dd57644 --- /dev/null +++ b/docs/v2/Ontologies/models/DurationBaseValue.md @@ -0,0 +1,11 @@ +# DurationBaseValue + +Specifies the unit of the input duration value. + +| **Value** | +| --------- | +| `"SECONDS"` | +| `"MILLISECONDS"` | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/DurationFormatStyle.md b/docs/v2/Ontologies/models/DurationFormatStyle.md new file mode 100644 index 000000000..b4266d9e7 --- /dev/null +++ b/docs/v2/Ontologies/models/DurationFormatStyle.md @@ -0,0 +1,16 @@ +# DurationFormatStyle + +DurationFormatStyle + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +HumanReadableFormat | humanReadable +TimeCodeFormat | timecode + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/DurationPrecision.md b/docs/v2/Ontologies/models/DurationPrecision.md new file mode 100644 index 000000000..c317ae60e --- /dev/null +++ b/docs/v2/Ontologies/models/DurationPrecision.md @@ -0,0 +1,14 @@ +# DurationPrecision + +Specifies the maximum precision to apply when formatting a duration. + +| **Value** | +| --------- | +| `"DAYS"` | +| `"HOURS"` | +| `"MINUTES"` | +| `"SECONDS"` | +| `"AUTO"` | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/EntrySetType.md b/docs/v2/Ontologies/models/EntrySetType.md new file mode 100644 index 000000000..b472eed4e --- /dev/null +++ b/docs/v2/Ontologies/models/EntrySetType.md @@ -0,0 +1,13 @@ +# EntrySetType + +EntrySetType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**key_type** | QueryDataType | Yes | | +**value_type** | QueryDataType | Yes | | +**type** | Literal["entrySet"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/EnumConstraint.md b/docs/v2/Ontologies/models/EnumConstraint.md new file mode 100644 index 000000000..9a7c0b92a --- /dev/null +++ b/docs/v2/Ontologies/models/EnumConstraint.md @@ -0,0 +1,12 @@ +# EnumConstraint + +EnumConstraint + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**options** | List[Optional[PropertyValue]] | Yes | | +**type** | Literal["enum"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/EqualsQueryV2.md b/docs/v2/Ontologies/models/EqualsQueryV2.md new file mode 100644 index 000000000..d960e118b --- /dev/null +++ b/docs/v2/Ontologies/models/EqualsQueryV2.md @@ -0,0 +1,16 @@ +# EqualsQueryV2 + +Returns objects where the specified field is equal to a value. Allows you to specify a property to query on +by a variety of means. Either `field` or `propertyIdentifier` must be supplied, but not both. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**field** | Optional[PropertyApiName] | No | | +**property_identifier** | Optional[PropertyIdentifier] | No | | +**value** | PropertyValue | Yes | | +**type** | Literal["eq"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ExactDistinctAggregationV2.md b/docs/v2/Ontologies/models/ExactDistinctAggregationV2.md new file mode 100644 index 000000000..715689e67 --- /dev/null +++ b/docs/v2/Ontologies/models/ExactDistinctAggregationV2.md @@ -0,0 +1,14 @@ +# ExactDistinctAggregationV2 + +Computes an exact number of distinct values for the provided field. May be slower than an approximate distinct aggregation. Requires Object Storage V2. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**field** | PropertyApiName | Yes | | +**name** | Optional[AggregationMetricName] | No | | +**direction** | Optional[OrderByDirection] | No | | +**type** | Literal["exactDistinct"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ExamplePropertyTypeStatus.md b/docs/v2/Ontologies/models/ExamplePropertyTypeStatus.md new file mode 100644 index 000000000..5abd55e9b --- /dev/null +++ b/docs/v2/Ontologies/models/ExamplePropertyTypeStatus.md @@ -0,0 +1,13 @@ +# ExamplePropertyTypeStatus + +This status indicates that the PropertyType is an example. It is backed by notional data that should not be +used for actual workflows, but can be used to test those workflows. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["example"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ExecuteQueryRequest.md b/docs/v2/Ontologies/models/ExecuteQueryRequest.md new file mode 100644 index 000000000..076153082 --- /dev/null +++ b/docs/v2/Ontologies/models/ExecuteQueryRequest.md @@ -0,0 +1,11 @@ +# ExecuteQueryRequest + +ExecuteQueryRequest + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**parameters** | Dict[ParameterId, Optional[DataValue]] | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ExecuteQueryResponse.md b/docs/v2/Ontologies/models/ExecuteQueryResponse.md new file mode 100644 index 000000000..7fb620232 --- /dev/null +++ b/docs/v2/Ontologies/models/ExecuteQueryResponse.md @@ -0,0 +1,11 @@ +# ExecuteQueryResponse + +ExecuteQueryResponse + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**value** | DataValue | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ExperimentalPropertyTypeStatus.md b/docs/v2/Ontologies/models/ExperimentalPropertyTypeStatus.md new file mode 100644 index 000000000..ac241a19c --- /dev/null +++ b/docs/v2/Ontologies/models/ExperimentalPropertyTypeStatus.md @@ -0,0 +1,11 @@ +# ExperimentalPropertyTypeStatus + +This status indicates that the PropertyType is in development. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["experimental"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ExtractDatePart.md b/docs/v2/Ontologies/models/ExtractDatePart.md new file mode 100644 index 000000000..679393b7b --- /dev/null +++ b/docs/v2/Ontologies/models/ExtractDatePart.md @@ -0,0 +1,13 @@ +# ExtractDatePart + +ExtractDatePart + +| **Value** | +| --------- | +| `"DAYS"` | +| `"MONTHS"` | +| `"QUARTERS"` | +| `"YEARS"` | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ExtractMainValueLoadLevel.md b/docs/v2/Ontologies/models/ExtractMainValueLoadLevel.md new file mode 100644 index 000000000..695c7d251 --- /dev/null +++ b/docs/v2/Ontologies/models/ExtractMainValueLoadLevel.md @@ -0,0 +1,11 @@ +# ExtractMainValueLoadLevel + +Returns the main value of a struct as configured in the ontology. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["extractMainValue"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ExtractPropertyExpression.md b/docs/v2/Ontologies/models/ExtractPropertyExpression.md new file mode 100644 index 000000000..dadca9fe9 --- /dev/null +++ b/docs/v2/Ontologies/models/ExtractPropertyExpression.md @@ -0,0 +1,14 @@ +# ExtractPropertyExpression + +Extracts the specified date part from a date or timestamp. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**property** | DerivedPropertyDefinition | Yes | | +**part** | ExtractDatePart | Yes | | +**type** | Literal["extract"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/FilterValue.md b/docs/v2/Ontologies/models/FilterValue.md new file mode 100644 index 000000000..de805979f --- /dev/null +++ b/docs/v2/Ontologies/models/FilterValue.md @@ -0,0 +1,13 @@ +# FilterValue + +Represents the value of a property filter. For instance, false is the FilterValue in +`properties.{propertyApiName}.isNull=false`. + + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/FixedValuesMapKey.md b/docs/v2/Ontologies/models/FixedValuesMapKey.md new file mode 100644 index 000000000..81e43d366 --- /dev/null +++ b/docs/v2/Ontologies/models/FixedValuesMapKey.md @@ -0,0 +1,11 @@ +# FixedValuesMapKey + +Integer key for fixed value mapping. + +## Type +```python +int +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/FunctionLogicRule.md b/docs/v2/Ontologies/models/FunctionLogicRule.md new file mode 100644 index 000000000..868c5d192 --- /dev/null +++ b/docs/v2/Ontologies/models/FunctionLogicRule.md @@ -0,0 +1,14 @@ +# FunctionLogicRule + +FunctionLogicRule + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**function_rid** | FunctionRid | Yes | | +**function_version** | FunctionVersion | Yes | | +**function_input_values** | Dict[FunctionParameterName, LogicRuleArgument] | Yes | | +**type** | Literal["function"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/FunctionParameterName.md b/docs/v2/Ontologies/models/FunctionParameterName.md new file mode 100644 index 000000000..19e0b58c8 --- /dev/null +++ b/docs/v2/Ontologies/models/FunctionParameterName.md @@ -0,0 +1,12 @@ +# FunctionParameterName + +The name of an input to a function. + + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/FunctionRid.md b/docs/v2/Ontologies/models/FunctionRid.md new file mode 100644 index 000000000..2ea837619 --- /dev/null +++ b/docs/v2/Ontologies/models/FunctionRid.md @@ -0,0 +1,12 @@ +# FunctionRid + +The unique resource identifier of a Function, useful for interacting with other Foundry APIs. + + +## Type +```python +RID +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/FunctionVersion.md b/docs/v2/Ontologies/models/FunctionVersion.md new file mode 100644 index 000000000..7a8f4565f --- /dev/null +++ b/docs/v2/Ontologies/models/FunctionVersion.md @@ -0,0 +1,13 @@ +# FunctionVersion + +The version of the given Function, written `..-`, where `-` is optional. +Examples: `1.2.3`, `1.2.3-rc1`. + + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/FuzzyV2.md b/docs/v2/Ontologies/models/FuzzyV2.md new file mode 100644 index 000000000..f5dc4f75e --- /dev/null +++ b/docs/v2/Ontologies/models/FuzzyV2.md @@ -0,0 +1,11 @@ +# FuzzyV2 + +Setting fuzzy to `true` allows approximate matching in search queries that support it. + +## Type +```python +bool +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/GetSelectedPropertyOperation.md b/docs/v2/Ontologies/models/GetSelectedPropertyOperation.md new file mode 100644 index 000000000..f8a3349ef --- /dev/null +++ b/docs/v2/Ontologies/models/GetSelectedPropertyOperation.md @@ -0,0 +1,16 @@ +# GetSelectedPropertyOperation + +Gets a single value of a property. Throws if the target object set is on the MANY side of the link and could +explode the cardinality. + +Use collectList or collectSet which will return a list of values in that case. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**selected_property_api_name** | PropertyApiName | Yes | | +**type** | Literal["get"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/GreatestPropertyExpression.md b/docs/v2/Ontologies/models/GreatestPropertyExpression.md new file mode 100644 index 000000000..949eceac4 --- /dev/null +++ b/docs/v2/Ontologies/models/GreatestPropertyExpression.md @@ -0,0 +1,13 @@ +# GreatestPropertyExpression + +Finds greatest of two or more numeric, date or timestamp values. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**properties** | List[DerivedPropertyDefinition] | Yes | | +**type** | Literal["greatest"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/GroupMemberConstraint.md b/docs/v2/Ontologies/models/GroupMemberConstraint.md new file mode 100644 index 000000000..7560da962 --- /dev/null +++ b/docs/v2/Ontologies/models/GroupMemberConstraint.md @@ -0,0 +1,12 @@ +# GroupMemberConstraint + +The parameter value must be the user id of a member belonging to at least one of the groups defined by the constraint. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["groupMember"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/GtQueryV2.md b/docs/v2/Ontologies/models/GtQueryV2.md new file mode 100644 index 000000000..437c532f4 --- /dev/null +++ b/docs/v2/Ontologies/models/GtQueryV2.md @@ -0,0 +1,16 @@ +# GtQueryV2 + +Returns objects where the specified field is greater than a value. Allows you to specify a property to query on +by a variety of means. Either `field` or `propertyIdentifier` must be supplied, but not both. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**field** | Optional[PropertyApiName] | No | | +**property_identifier** | Optional[PropertyIdentifier] | No | | +**value** | PropertyValue | Yes | | +**type** | Literal["gt"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/GteQueryV2.md b/docs/v2/Ontologies/models/GteQueryV2.md new file mode 100644 index 000000000..2e05a3a91 --- /dev/null +++ b/docs/v2/Ontologies/models/GteQueryV2.md @@ -0,0 +1,16 @@ +# GteQueryV2 + +Returns objects where the specified field is greater than or equal to a value. Allows you to specify a property +to query on by a variety of means. Either `field` or `propertyIdentifier` must be supplied, but not both. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**field** | Optional[PropertyApiName] | No | | +**property_identifier** | Optional[PropertyIdentifier] | No | | +**value** | PropertyValue | Yes | | +**type** | Literal["gte"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/HumanReadableFormat.md b/docs/v2/Ontologies/models/HumanReadableFormat.md new file mode 100644 index 000000000..e7dfdab7a --- /dev/null +++ b/docs/v2/Ontologies/models/HumanReadableFormat.md @@ -0,0 +1,12 @@ +# HumanReadableFormat + +Formats the duration as a human-readable written string. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**show_full_units** | Optional[bool] | No | Whether to show full or abbreviated time units. | +**type** | Literal["humanReadable"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/Icon.md b/docs/v2/Ontologies/models/Icon.md new file mode 100644 index 000000000..c8a0720c7 --- /dev/null +++ b/docs/v2/Ontologies/models/Icon.md @@ -0,0 +1,11 @@ +# Icon + +A union currently only consisting of the BlueprintIcon (more icon types may be added in the future). + +## Type +```python +BlueprintIcon +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/InQuery.md b/docs/v2/Ontologies/models/InQuery.md new file mode 100644 index 000000000..aaa3afc50 --- /dev/null +++ b/docs/v2/Ontologies/models/InQuery.md @@ -0,0 +1,17 @@ +# InQuery + +Returns objects where the specified field equals any of the provided values. Allows you to +specify a property to query on by a variety of means. Either `field` or `propertyIdentifier` must be supplied, +but not both. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**field** | Optional[PropertyApiName] | No | | +**property_identifier** | Optional[PropertyIdentifier] | No | | +**value** | List[PropertyValue] | Yes | | +**type** | Literal["in"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/InterfaceDefinedPropertyType.md b/docs/v2/Ontologies/models/InterfaceDefinedPropertyType.md new file mode 100644 index 000000000..ee30f90c6 --- /dev/null +++ b/docs/v2/Ontologies/models/InterfaceDefinedPropertyType.md @@ -0,0 +1,20 @@ +# InterfaceDefinedPropertyType + +An interface property type with an additional field to indicate constraints that need to be satisfied by +implementing object property types. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**rid** | InterfacePropertyTypeRid | Yes | | +**api_name** | InterfacePropertyApiName | Yes | | +**display_name** | DisplayName | Yes | | +**description** | Optional[str] | No | The description of the interface property type. | +**data_type** | ObjectPropertyType | Yes | | +**value_type_api_name** | Optional[ValueTypeApiName] | No | | +**require_implementation** | bool | Yes | Whether each implementing object type must declare an implementation for this property. | +**type** | Literal["interfaceDefinedPropertyType"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/InterfaceLinkType.md b/docs/v2/Ontologies/models/InterfaceLinkType.md new file mode 100644 index 000000000..249da234f --- /dev/null +++ b/docs/v2/Ontologies/models/InterfaceLinkType.md @@ -0,0 +1,19 @@ +# InterfaceLinkType + +A link type constraint defined at the interface level where the implementation of the links is provided +by the implementing object types. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**rid** | InterfaceLinkTypeRid | Yes | | +**api_name** | InterfaceLinkTypeApiName | Yes | | +**display_name** | DisplayName | Yes | | +**description** | Optional[str] | No | The description of the interface link type. | +**linked_entity_api_name** | InterfaceLinkTypeLinkedEntityApiName | Yes | | +**cardinality** | InterfaceLinkTypeCardinality | Yes | | +**required** | bool | Yes | Whether each implementing object type must declare at least one implementation of this link. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/InterfaceLinkTypeApiName.md b/docs/v2/Ontologies/models/InterfaceLinkTypeApiName.md new file mode 100644 index 000000000..8e2269bc7 --- /dev/null +++ b/docs/v2/Ontologies/models/InterfaceLinkTypeApiName.md @@ -0,0 +1,13 @@ +# InterfaceLinkTypeApiName + +The name of the interface link type in the API. To find the API name for your Interface Link Type, check the +[Ontology Manager](https://palantir.com/docs/foundry/ontology-manager/overview/). + + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/InterfaceLinkTypeCardinality.md b/docs/v2/Ontologies/models/InterfaceLinkTypeCardinality.md new file mode 100644 index 000000000..7ab218f74 --- /dev/null +++ b/docs/v2/Ontologies/models/InterfaceLinkTypeCardinality.md @@ -0,0 +1,13 @@ +# InterfaceLinkTypeCardinality + +The cardinality of the link in the given direction. Cardinality can be "ONE", meaning an object can +link to zero or one other objects, or "MANY", meaning an object can link to any number of other objects. + + +| **Value** | +| --------- | +| `"ONE"` | +| `"MANY"` | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/InterfaceLinkTypeLinkedEntityApiName.md b/docs/v2/Ontologies/models/InterfaceLinkTypeLinkedEntityApiName.md new file mode 100644 index 000000000..2ac8b7fef --- /dev/null +++ b/docs/v2/Ontologies/models/InterfaceLinkTypeLinkedEntityApiName.md @@ -0,0 +1,16 @@ +# InterfaceLinkTypeLinkedEntityApiName + +A reference to the linked entity. This can either be an object or an interface type. + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +LinkedObjectTypeApiName | objectTypeApiName +LinkedInterfaceTypeApiName | interfaceTypeApiName + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/InterfaceLinkTypeRid.md b/docs/v2/Ontologies/models/InterfaceLinkTypeRid.md new file mode 100644 index 000000000..c44e33024 --- /dev/null +++ b/docs/v2/Ontologies/models/InterfaceLinkTypeRid.md @@ -0,0 +1,12 @@ +# InterfaceLinkTypeRid + +The unique resource identifier of an interface link type, useful for interacting with other Foundry APIs. + + +## Type +```python +RID +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/InterfaceParameterPropertyArgument.md b/docs/v2/Ontologies/models/InterfaceParameterPropertyArgument.md new file mode 100644 index 000000000..add1e114f --- /dev/null +++ b/docs/v2/Ontologies/models/InterfaceParameterPropertyArgument.md @@ -0,0 +1,13 @@ +# InterfaceParameterPropertyArgument + +Represents an interface parameter property argument in a logic rule. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**parameter_id** | ParameterId | Yes | | +**shared_property_type_rid** | RID | Yes | | +**type** | Literal["interfaceParameterPropertyValue"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/InterfacePropertyApiName.md b/docs/v2/Ontologies/models/InterfacePropertyApiName.md new file mode 100644 index 000000000..eed501a75 --- /dev/null +++ b/docs/v2/Ontologies/models/InterfacePropertyApiName.md @@ -0,0 +1,14 @@ +# InterfacePropertyApiName + +The name of the interface property type in the API in lowerCamelCase format. To find the API name for your +interface property type, use the `List interface types` endpoint and check the `allPropertiesV2` field or check +the **Ontology Manager**. + + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/InterfacePropertyLocalPropertyImplementation.md b/docs/v2/Ontologies/models/InterfacePropertyLocalPropertyImplementation.md new file mode 100644 index 000000000..5f6d45cfa --- /dev/null +++ b/docs/v2/Ontologies/models/InterfacePropertyLocalPropertyImplementation.md @@ -0,0 +1,12 @@ +# InterfacePropertyLocalPropertyImplementation + +An implementation of an interface property via a local property. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**property_api_name** | PropertyApiName | Yes | | +**type** | Literal["localPropertyImplementation"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/InterfacePropertyReducedPropertyImplementation.md b/docs/v2/Ontologies/models/InterfacePropertyReducedPropertyImplementation.md new file mode 100644 index 000000000..05d8bb3a5 --- /dev/null +++ b/docs/v2/Ontologies/models/InterfacePropertyReducedPropertyImplementation.md @@ -0,0 +1,12 @@ +# InterfacePropertyReducedPropertyImplementation + +An implementation of an interface property via applying reducers on the nested implementation. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**implementation** | NestedInterfacePropertyTypeImplementation | Yes | | +**type** | Literal["reducedPropertyImplementation"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/InterfacePropertyStructFieldImplementation.md b/docs/v2/Ontologies/models/InterfacePropertyStructFieldImplementation.md new file mode 100644 index 000000000..618698453 --- /dev/null +++ b/docs/v2/Ontologies/models/InterfacePropertyStructFieldImplementation.md @@ -0,0 +1,12 @@ +# InterfacePropertyStructFieldImplementation + +An implementation of an interface property via the field of a local struct property. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**struct_field_of_property** | StructFieldOfPropertyImplementation | Yes | | +**type** | Literal["structFieldImplementation"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/InterfacePropertyStructImplementation.md b/docs/v2/Ontologies/models/InterfacePropertyStructImplementation.md new file mode 100644 index 000000000..0ea45407c --- /dev/null +++ b/docs/v2/Ontologies/models/InterfacePropertyStructImplementation.md @@ -0,0 +1,14 @@ +# InterfacePropertyStructImplementation + +An implementation of a struct interface property via a local struct property. Specifies a mapping of interface +struct fields to local struct fields or properties. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**mapping** | InterfacePropertyStructImplementationMapping | Yes | | +**type** | Literal["structImplementation"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/InterfacePropertyStructImplementationMapping.md b/docs/v2/Ontologies/models/InterfacePropertyStructImplementationMapping.md new file mode 100644 index 000000000..0e254f668 --- /dev/null +++ b/docs/v2/Ontologies/models/InterfacePropertyStructImplementationMapping.md @@ -0,0 +1,13 @@ +# InterfacePropertyStructImplementationMapping + +An implementation of a struct interface property via a local struct property. Specifies a mapping of interface +struct fields to local struct fields or properties. + + +## Type +```python +Dict[StructFieldApiName, PropertyOrStructFieldOfPropertyImplementation] +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/InterfacePropertyType.md b/docs/v2/Ontologies/models/InterfacePropertyType.md new file mode 100644 index 000000000..ef76dbc9b --- /dev/null +++ b/docs/v2/Ontologies/models/InterfacePropertyType.md @@ -0,0 +1,18 @@ +# InterfacePropertyType + +The definition of an interface property type on an interface. An interface property can either be backed by a +shared property type or defined on the interface directly. + + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +InterfaceDefinedPropertyType | interfaceDefinedPropertyType +InterfaceSharedPropertyType | interfaceSharedPropertyType + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/InterfacePropertyTypeImplementation.md b/docs/v2/Ontologies/models/InterfacePropertyTypeImplementation.md new file mode 100644 index 000000000..9f0971b4b --- /dev/null +++ b/docs/v2/Ontologies/models/InterfacePropertyTypeImplementation.md @@ -0,0 +1,19 @@ +# InterfacePropertyTypeImplementation + +Describes how an object type implements an interface property. + + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +InterfacePropertyStructFieldImplementation | structFieldImplementation +InterfacePropertyStructImplementation | structImplementation +InterfacePropertyLocalPropertyImplementation | localPropertyImplementation +InterfacePropertyReducedPropertyImplementation | reducedPropertyImplementation + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/InterfacePropertyTypeRid.md b/docs/v2/Ontologies/models/InterfacePropertyTypeRid.md new file mode 100644 index 000000000..941a9e1ef --- /dev/null +++ b/docs/v2/Ontologies/models/InterfacePropertyTypeRid.md @@ -0,0 +1,12 @@ +# InterfacePropertyTypeRid + +The unique resource identifier of an interface property type, useful for interacting with other Foundry APIs. + + +## Type +```python +RID +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/InterfaceSharedPropertyType.md b/docs/v2/Ontologies/models/InterfaceSharedPropertyType.md new file mode 100644 index 000000000..c8c66b034 --- /dev/null +++ b/docs/v2/Ontologies/models/InterfaceSharedPropertyType.md @@ -0,0 +1,21 @@ +# InterfaceSharedPropertyType + +A shared property type with an additional field to indicate whether the property must be included on every +object type that implements the interface, or whether it is optional. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**rid** | SharedPropertyTypeRid | Yes | | +**api_name** | SharedPropertyTypeApiName | Yes | | +**display_name** | DisplayName | Yes | | +**description** | Optional[str] | No | A short text that describes the SharedPropertyType. | +**data_type** | ObjectPropertyType | Yes | | +**value_type_api_name** | Optional[ValueTypeApiName] | No | | +**value_formatting** | Optional[PropertyValueFormattingRule] | No | | +**required** | bool | Yes | Whether each implementing object type must declare an implementation for this property. | +**type** | Literal["interfaceSharedPropertyType"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/InterfaceToObjectTypeMapping.md b/docs/v2/Ontologies/models/InterfaceToObjectTypeMapping.md new file mode 100644 index 000000000..a0cf66847 --- /dev/null +++ b/docs/v2/Ontologies/models/InterfaceToObjectTypeMapping.md @@ -0,0 +1,11 @@ +# InterfaceToObjectTypeMapping + +Represents an implementation of an interface (the mapping of interface property to local property). + +## Type +```python +Dict[SharedPropertyTypeApiName, PropertyApiName] +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/InterfaceToObjectTypeMappingV2.md b/docs/v2/Ontologies/models/InterfaceToObjectTypeMappingV2.md new file mode 100644 index 000000000..cc7fde7d4 --- /dev/null +++ b/docs/v2/Ontologies/models/InterfaceToObjectTypeMappingV2.md @@ -0,0 +1,12 @@ +# InterfaceToObjectTypeMappingV2 + +Represents an implementation of an interface (the mapping of interface property to how it is implemented. + + +## Type +```python +Dict[InterfacePropertyApiName, InterfacePropertyTypeImplementation] +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/InterfaceToObjectTypeMappings.md b/docs/v2/Ontologies/models/InterfaceToObjectTypeMappings.md new file mode 100644 index 000000000..6d1233950 --- /dev/null +++ b/docs/v2/Ontologies/models/InterfaceToObjectTypeMappings.md @@ -0,0 +1,11 @@ +# InterfaceToObjectTypeMappings + +Map from object type to the interface-to-object-type mapping for that object type. + +## Type +```python +Dict[ObjectTypeApiName, InterfaceToObjectTypeMapping] +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/InterfaceToObjectTypeMappingsV2.md b/docs/v2/Ontologies/models/InterfaceToObjectTypeMappingsV2.md new file mode 100644 index 000000000..0e9027c7a --- /dev/null +++ b/docs/v2/Ontologies/models/InterfaceToObjectTypeMappingsV2.md @@ -0,0 +1,11 @@ +# InterfaceToObjectTypeMappingsV2 + +Map from object type to the interface property implementations of that object type. + +## Type +```python +Dict[ObjectTypeApiName, InterfaceToObjectTypeMappingV2] +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/InterfaceType.md b/docs/v2/Ontologies/models/InterfaceType.md new file mode 100644 index 000000000..2b9e20d1f --- /dev/null +++ b/docs/v2/Ontologies/models/InterfaceType.md @@ -0,0 +1,23 @@ +# InterfaceType + +Represents an interface type in the Ontology. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**rid** | InterfaceTypeRid | Yes | | +**api_name** | InterfaceTypeApiName | Yes | | +**display_name** | DisplayName | Yes | | +**description** | Optional[str] | No | The description of the interface. | +**properties** | Dict[SharedPropertyTypeApiName, InterfaceSharedPropertyType] | Yes | A map from a shared property type API name to the corresponding shared property type. The map describes the set of properties the interface has. A shared property type must be unique across all of the properties. This field only includes properties on the interface that are backed by shared property types. | +**all_properties** | Dict[SharedPropertyTypeApiName, InterfaceSharedPropertyType] | Yes | A map from a shared property type API name to the corresponding shared property type. The map describes the set of properties the interface has, including properties from all directly and indirectly extended interfaces. This field only includes properties on the interface that are backed by shared property types. | +**properties_v2** | Dict[InterfacePropertyApiName, InterfacePropertyType] | Yes | A map from a interface property type API name to the corresponding interface property type. The map describes the set of properties the interface has. An interface property can either be backed by a shared property or it can be defined directly on the interface. | +**all_properties_v2** | Dict[InterfacePropertyApiName, ResolvedInterfacePropertyType] | Yes | A map from a interface property type API name to the corresponding interface property type. The map describes the set of properties the interface has, including properties from all directly and indirectly extended interfaces. | +**extends_interfaces** | List[InterfaceTypeApiName] | Yes | A list of interface API names that this interface extends. An interface can extend other interfaces to inherit their properties. | +**all_extends_interfaces** | List[InterfaceTypeApiName] | Yes | A list of interface API names that this interface extends, both directly and indirectly. | +**implemented_by_object_types** | List[ObjectTypeApiName] | Yes | A list of object API names that implement this interface. | +**links** | Dict[InterfaceLinkTypeApiName, InterfaceLinkType] | Yes | A map from an interface link type API name to the corresponding interface link type. The map describes the set of link types the interface has. | +**all_links** | Dict[InterfaceLinkTypeApiName, InterfaceLinkType] | Yes | A map from an interface link type API name to the corresponding interface link type. The map describes the set of link types the interface has, including links from all directly and indirectly extended interfaces. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/InterfaceTypeApiName.md b/docs/v2/Ontologies/models/InterfaceTypeApiName.md new file mode 100644 index 000000000..392e38da8 --- /dev/null +++ b/docs/v2/Ontologies/models/InterfaceTypeApiName.md @@ -0,0 +1,13 @@ +# InterfaceTypeApiName + +The name of the interface type in the API in UpperCamelCase format. To find the API name for your interface +type, use the `List interface types` endpoint or check the **Ontology Manager**. + + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/InterfaceTypeRid.md b/docs/v2/Ontologies/models/InterfaceTypeRid.md new file mode 100644 index 000000000..bee01df18 --- /dev/null +++ b/docs/v2/Ontologies/models/InterfaceTypeRid.md @@ -0,0 +1,11 @@ +# InterfaceTypeRid + +The unique resource identifier of an interface, useful for interacting with other Foundry APIs. + +## Type +```python +RID +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/IntersectsBoundingBoxQuery.md b/docs/v2/Ontologies/models/IntersectsBoundingBoxQuery.md new file mode 100644 index 000000000..0e0a9de13 --- /dev/null +++ b/docs/v2/Ontologies/models/IntersectsBoundingBoxQuery.md @@ -0,0 +1,16 @@ +# IntersectsBoundingBoxQuery + +Returns objects where the specified field intersects the bounding box provided. Allows you to specify a property +to query on by a variety of means. Either `field` or `propertyIdentifier` must be supplied, but not both. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**field** | Optional[PropertyApiName] | No | | +**property_identifier** | Optional[PropertyIdentifier] | No | | +**value** | BoundingBoxValue | Yes | | +**type** | Literal["intersectsBoundingBox"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/IntersectsPolygonQuery.md b/docs/v2/Ontologies/models/IntersectsPolygonQuery.md new file mode 100644 index 000000000..cb35fa9f5 --- /dev/null +++ b/docs/v2/Ontologies/models/IntersectsPolygonQuery.md @@ -0,0 +1,16 @@ +# IntersectsPolygonQuery + +Returns objects where the specified field intersects the polygon provided. Allows you to specify a property to +query on by a variety of means. Either `field` or `propertyIdentifier` must be supplied, but not both. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**field** | Optional[PropertyApiName] | No | | +**property_identifier** | Optional[PropertyIdentifier] | No | | +**value** | PolygonValue | Yes | | +**type** | Literal["intersectsPolygon"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/IntervalQuery.md b/docs/v2/Ontologies/models/IntervalQuery.md new file mode 100644 index 000000000..dc8087b5b --- /dev/null +++ b/docs/v2/Ontologies/models/IntervalQuery.md @@ -0,0 +1,16 @@ +# IntervalQuery + +Returns objects where the specified field matches the sub-rule provided. This applies to the analyzed form of +text fields. Either `field` or `propertyIdentifier` can be supplied, but not both. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**field** | Optional[PropertyApiName] | No | | +**property_identifier** | Optional[PropertyIdentifier] | No | | +**rule** | IntervalQueryRule | Yes | | +**type** | Literal["interval"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/IntervalQueryRule.md b/docs/v2/Ontologies/models/IntervalQueryRule.md new file mode 100644 index 000000000..e1499af69 --- /dev/null +++ b/docs/v2/Ontologies/models/IntervalQueryRule.md @@ -0,0 +1,18 @@ +# IntervalQueryRule + +Sub-rule used for evaluating an IntervalQuery + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +AllOfRule | allOf +MatchRule | match +AnyOfRule | anyOf +PrefixOnLastTokenRule | prefixOnLastToken + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/IsNullQueryV2.md b/docs/v2/Ontologies/models/IsNullQueryV2.md new file mode 100644 index 000000000..909173173 --- /dev/null +++ b/docs/v2/Ontologies/models/IsNullQueryV2.md @@ -0,0 +1,16 @@ +# IsNullQueryV2 + +Returns objects based on the existence of the specified field. Allows you to specify a property to query on +by a variety of means. Either `field` or `propertyIdentifier` must be supplied, but not both. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**field** | Optional[PropertyApiName] | No | | +**property_identifier** | Optional[PropertyIdentifier] | No | | +**value** | bool | Yes | | +**type** | Literal["isNull"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/KnownType.md b/docs/v2/Ontologies/models/KnownType.md new file mode 100644 index 000000000..e6596fcb3 --- /dev/null +++ b/docs/v2/Ontologies/models/KnownType.md @@ -0,0 +1,16 @@ +# KnownType + +Known Foundry types for specialized formatting: +- userOrGroupRid: Format as user or group +- resourceRid: Format as resource +- artifactGid: Format as artifact + + +| **Value** | +| --------- | +| `"USER_OR_GROUP_ID"` | +| `"RESOURCE_RID"` | +| `"ARTIFACT_GID"` | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/LeastPropertyExpression.md b/docs/v2/Ontologies/models/LeastPropertyExpression.md new file mode 100644 index 000000000..fbb789a3f --- /dev/null +++ b/docs/v2/Ontologies/models/LeastPropertyExpression.md @@ -0,0 +1,13 @@ +# LeastPropertyExpression + +Finds least of two or more numeric, date or timestamp values. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**properties** | List[DerivedPropertyDefinition] | Yes | | +**type** | Literal["least"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/LengthConstraint.md b/docs/v2/Ontologies/models/LengthConstraint.md new file mode 100644 index 000000000..889a7b089 --- /dev/null +++ b/docs/v2/Ontologies/models/LengthConstraint.md @@ -0,0 +1,13 @@ +# LengthConstraint + +LengthConstraint + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**minimum_length** | Optional[float] | No | | +**maximum_length** | Optional[float] | No | | +**type** | Literal["length"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/LinkSideObject.md b/docs/v2/Ontologies/models/LinkSideObject.md new file mode 100644 index 000000000..8d1513598 --- /dev/null +++ b/docs/v2/Ontologies/models/LinkSideObject.md @@ -0,0 +1,12 @@ +# LinkSideObject + +LinkSideObject + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**primary_key** | PropertyValue | Yes | | +**object_type** | ObjectTypeApiName | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/LinkTypeApiName.md b/docs/v2/Ontologies/models/LinkTypeApiName.md new file mode 100644 index 000000000..827cc1a8a --- /dev/null +++ b/docs/v2/Ontologies/models/LinkTypeApiName.md @@ -0,0 +1,13 @@ +# LinkTypeApiName + +The name of the link type in the API. To find the API name for your Link Type, check the **Ontology Manager** +application. + + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/LinkTypeId.md b/docs/v2/Ontologies/models/LinkTypeId.md new file mode 100644 index 000000000..84df58bcc --- /dev/null +++ b/docs/v2/Ontologies/models/LinkTypeId.md @@ -0,0 +1,12 @@ +# LinkTypeId + +The unique ID of a link type. To find the ID for your link type, check the **Ontology Manager** application. + + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/LinkTypeRid.md b/docs/v2/Ontologies/models/LinkTypeRid.md new file mode 100644 index 000000000..4b22d8bcb --- /dev/null +++ b/docs/v2/Ontologies/models/LinkTypeRid.md @@ -0,0 +1,11 @@ +# LinkTypeRid + +LinkTypeRid + +## Type +```python +RID +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/LinkTypeSideCardinality.md b/docs/v2/Ontologies/models/LinkTypeSideCardinality.md new file mode 100644 index 000000000..ccc7b693d --- /dev/null +++ b/docs/v2/Ontologies/models/LinkTypeSideCardinality.md @@ -0,0 +1,11 @@ +# LinkTypeSideCardinality + +LinkTypeSideCardinality + +| **Value** | +| --------- | +| `"ONE"` | +| `"MANY"` | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/LinkTypeSideV2.md b/docs/v2/Ontologies/models/LinkTypeSideV2.md new file mode 100644 index 000000000..12e8b9e8c --- /dev/null +++ b/docs/v2/Ontologies/models/LinkTypeSideV2.md @@ -0,0 +1,19 @@ +# LinkTypeSideV2 + +`foreignKeyPropertyApiName` is the API name of the foreign key on this object type. If absent, the link is +either a m2m link or the linked object has the foreign key and this object type has the primary key. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**api_name** | LinkTypeApiName | Yes | | +**display_name** | DisplayName | Yes | | +**status** | ReleaseStatus | Yes | | +**object_type_api_name** | ObjectTypeApiName | Yes | | +**cardinality** | LinkTypeSideCardinality | Yes | | +**foreign_key_property_api_name** | Optional[PropertyApiName] | No | | +**link_type_rid** | LinkTypeRid | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/LinkedInterfaceTypeApiName.md b/docs/v2/Ontologies/models/LinkedInterfaceTypeApiName.md new file mode 100644 index 000000000..7c9663142 --- /dev/null +++ b/docs/v2/Ontologies/models/LinkedInterfaceTypeApiName.md @@ -0,0 +1,12 @@ +# LinkedInterfaceTypeApiName + +A reference to the linked interface type. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**api_name** | InterfaceTypeApiName | Yes | | +**type** | Literal["interfaceTypeApiName"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/LinkedObjectLocator.md b/docs/v2/Ontologies/models/LinkedObjectLocator.md new file mode 100644 index 000000000..9f70b2b71 --- /dev/null +++ b/docs/v2/Ontologies/models/LinkedObjectLocator.md @@ -0,0 +1,14 @@ +# LinkedObjectLocator + +Does not contain information about the source object. Should be used in a nested type that provides information about source objects. +The `targetObject` Ontology Object in this response will only ever have the `__primaryKey` and `__apiName` +fields present, thus functioning as object locators rather than full objects. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**target_object** | Optional[OntologyObjectV2] | No | | +**link_type** | Optional[LinkTypeApiName] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/LinkedObjectTypeApiName.md b/docs/v2/Ontologies/models/LinkedObjectTypeApiName.md new file mode 100644 index 000000000..cf22bd9e8 --- /dev/null +++ b/docs/v2/Ontologies/models/LinkedObjectTypeApiName.md @@ -0,0 +1,12 @@ +# LinkedObjectTypeApiName + +A reference to the linked object type. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**api_name** | ObjectTypeApiName | Yes | | +**type** | Literal["objectTypeApiName"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/LinksFromObject.md b/docs/v2/Ontologies/models/LinksFromObject.md new file mode 100644 index 000000000..61d419421 --- /dev/null +++ b/docs/v2/Ontologies/models/LinksFromObject.md @@ -0,0 +1,13 @@ +# LinksFromObject + +The Ontology Objects in this response will only ever have the `__primaryKey` and `__apiName` +fields present, thus functioning as object locators rather than full objects. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**source_object** | Optional[OntologyObjectV2] | No | | +**linked_objects** | List[LinkedObjectLocator] | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ListActionTypesFullMetadataResponse.md b/docs/v2/Ontologies/models/ListActionTypesFullMetadataResponse.md new file mode 100644 index 000000000..290e3c0f0 --- /dev/null +++ b/docs/v2/Ontologies/models/ListActionTypesFullMetadataResponse.md @@ -0,0 +1,12 @@ +# ListActionTypesFullMetadataResponse + +ListActionTypesFullMetadataResponse + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**next_page_token** | Optional[PageToken] | No | | +**data** | List[ActionTypeFullMetadata] | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ListActionTypesResponseV2.md b/docs/v2/Ontologies/models/ListActionTypesResponseV2.md new file mode 100644 index 000000000..c9094113a --- /dev/null +++ b/docs/v2/Ontologies/models/ListActionTypesResponseV2.md @@ -0,0 +1,12 @@ +# ListActionTypesResponseV2 + +ListActionTypesResponseV2 + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**next_page_token** | Optional[PageToken] | No | | +**data** | List[ActionTypeV2] | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ListAttachmentsResponseV2.md b/docs/v2/Ontologies/models/ListAttachmentsResponseV2.md new file mode 100644 index 000000000..16a61bc6b --- /dev/null +++ b/docs/v2/Ontologies/models/ListAttachmentsResponseV2.md @@ -0,0 +1,13 @@ +# ListAttachmentsResponseV2 + +ListAttachmentsResponseV2 + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**data** | List[AttachmentV2] | Yes | | +**next_page_token** | Optional[PageToken] | No | | +**type** | Literal["multiple"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ListInterfaceLinkedObjectsResponse.md b/docs/v2/Ontologies/models/ListInterfaceLinkedObjectsResponse.md new file mode 100644 index 000000000..57994d1d9 --- /dev/null +++ b/docs/v2/Ontologies/models/ListInterfaceLinkedObjectsResponse.md @@ -0,0 +1,12 @@ +# ListInterfaceLinkedObjectsResponse + +ListInterfaceLinkedObjectsResponse + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**data** | List[OntologyObjectV2] | Yes | | +**next_page_token** | Optional[PageToken] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ListInterfaceTypesResponse.md b/docs/v2/Ontologies/models/ListInterfaceTypesResponse.md new file mode 100644 index 000000000..b81a59618 --- /dev/null +++ b/docs/v2/Ontologies/models/ListInterfaceTypesResponse.md @@ -0,0 +1,12 @@ +# ListInterfaceTypesResponse + +ListInterfaceTypesResponse + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**next_page_token** | Optional[PageToken] | No | | +**data** | List[InterfaceType] | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ListLinkedObjectsResponseV2.md b/docs/v2/Ontologies/models/ListLinkedObjectsResponseV2.md new file mode 100644 index 000000000..e9419b77b --- /dev/null +++ b/docs/v2/Ontologies/models/ListLinkedObjectsResponseV2.md @@ -0,0 +1,12 @@ +# ListLinkedObjectsResponseV2 + +ListLinkedObjectsResponseV2 + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**data** | List[OntologyObjectV2] | Yes | | +**next_page_token** | Optional[PageToken] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ListObjectTypesV2Response.md b/docs/v2/Ontologies/models/ListObjectTypesV2Response.md new file mode 100644 index 000000000..12c63d642 --- /dev/null +++ b/docs/v2/Ontologies/models/ListObjectTypesV2Response.md @@ -0,0 +1,12 @@ +# ListObjectTypesV2Response + +ListObjectTypesV2Response + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**next_page_token** | Optional[PageToken] | No | | +**data** | List[ObjectTypeV2] | Yes | The list of object types in the current page. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ListObjectsForInterfaceResponse.md b/docs/v2/Ontologies/models/ListObjectsForInterfaceResponse.md new file mode 100644 index 000000000..dfc85600b --- /dev/null +++ b/docs/v2/Ontologies/models/ListObjectsForInterfaceResponse.md @@ -0,0 +1,13 @@ +# ListObjectsForInterfaceResponse + +ListObjectsForInterfaceResponse + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**next_page_token** | Optional[PageToken] | No | | +**data** | List[OntologyObjectV2] | Yes | The list of interface instances in the current page. | +**total_count** | TotalCount | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ListObjectsResponseV2.md b/docs/v2/Ontologies/models/ListObjectsResponseV2.md new file mode 100644 index 000000000..78d07aa0a --- /dev/null +++ b/docs/v2/Ontologies/models/ListObjectsResponseV2.md @@ -0,0 +1,13 @@ +# ListObjectsResponseV2 + +ListObjectsResponseV2 + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**next_page_token** | Optional[PageToken] | No | | +**data** | List[OntologyObjectV2] | Yes | The list of objects in the current page. | +**total_count** | TotalCount | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ListOntologiesV2Response.md b/docs/v2/Ontologies/models/ListOntologiesV2Response.md new file mode 100644 index 000000000..47062c973 --- /dev/null +++ b/docs/v2/Ontologies/models/ListOntologiesV2Response.md @@ -0,0 +1,11 @@ +# ListOntologiesV2Response + +ListOntologiesV2Response + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**data** | List[OntologyV2] | Yes | The list of Ontologies the user has access to. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ListOntologyValueTypesResponse.md b/docs/v2/Ontologies/models/ListOntologyValueTypesResponse.md new file mode 100644 index 000000000..d9fa7b725 --- /dev/null +++ b/docs/v2/Ontologies/models/ListOntologyValueTypesResponse.md @@ -0,0 +1,11 @@ +# ListOntologyValueTypesResponse + +ListOntologyValueTypesResponse + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**data** | List[OntologyValueType] | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ListOutgoingInterfaceLinkTypesResponse.md b/docs/v2/Ontologies/models/ListOutgoingInterfaceLinkTypesResponse.md new file mode 100644 index 000000000..f982fefc6 --- /dev/null +++ b/docs/v2/Ontologies/models/ListOutgoingInterfaceLinkTypesResponse.md @@ -0,0 +1,12 @@ +# ListOutgoingInterfaceLinkTypesResponse + +ListOutgoingInterfaceLinkTypesResponse + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**next_page_token** | Optional[PageToken] | No | | +**data** | List[InterfaceLinkType] | Yes | The list of interface link types in the current page. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ListOutgoingLinkTypesResponseV2.md b/docs/v2/Ontologies/models/ListOutgoingLinkTypesResponseV2.md new file mode 100644 index 000000000..39fdb50fb --- /dev/null +++ b/docs/v2/Ontologies/models/ListOutgoingLinkTypesResponseV2.md @@ -0,0 +1,12 @@ +# ListOutgoingLinkTypesResponseV2 + +ListOutgoingLinkTypesResponseV2 + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**next_page_token** | Optional[PageToken] | No | | +**data** | List[LinkTypeSideV2] | Yes | The list of link type sides in the current page. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ListQueryTypesResponseV2.md b/docs/v2/Ontologies/models/ListQueryTypesResponseV2.md new file mode 100644 index 000000000..375343eb9 --- /dev/null +++ b/docs/v2/Ontologies/models/ListQueryTypesResponseV2.md @@ -0,0 +1,12 @@ +# ListQueryTypesResponseV2 + +ListQueryTypesResponseV2 + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**next_page_token** | Optional[PageToken] | No | | +**data** | List[QueryTypeV2] | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/LoadObjectSetLinksRequestV2.md b/docs/v2/Ontologies/models/LoadObjectSetLinksRequestV2.md new file mode 100644 index 000000000..1d842eda4 --- /dev/null +++ b/docs/v2/Ontologies/models/LoadObjectSetLinksRequestV2.md @@ -0,0 +1,14 @@ +# LoadObjectSetLinksRequestV2 + +LoadObjectSetLinksRequestV2 + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**object_set** | ObjectSet | Yes | | +**links** | List[LinkTypeApiName] | Yes | | +**page_token** | Optional[PageToken] | No | | +**include_compute_usage** | Optional[IncludeComputeUsage] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/LoadObjectSetLinksResponseV2.md b/docs/v2/Ontologies/models/LoadObjectSetLinksResponseV2.md new file mode 100644 index 000000000..d03b9bc40 --- /dev/null +++ b/docs/v2/Ontologies/models/LoadObjectSetLinksResponseV2.md @@ -0,0 +1,13 @@ +# LoadObjectSetLinksResponseV2 + +LoadObjectSetLinksResponseV2 + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**data** | List[LinksFromObject] | Yes | | +**next_page_token** | Optional[PageToken] | No | | +**compute_usage** | Optional[ComputeSeconds] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/LoadObjectSetRequestV2.md b/docs/v2/Ontologies/models/LoadObjectSetRequestV2.md new file mode 100644 index 000000000..d891f763d --- /dev/null +++ b/docs/v2/Ontologies/models/LoadObjectSetRequestV2.md @@ -0,0 +1,19 @@ +# LoadObjectSetRequestV2 + +Represents the API POST body when loading an `ObjectSet`. + +## Properties +| Name | Type | Required | Description | +| ------------ |------------------------------------|----------| ------------- | +**object_set** | ObjectSet | Yes | | +**order_by** | Optional[SearchOrderByV2] | No | | +**select** | List[SelectedPropertyApiName] | Yes | | +**select_v2** | Optional[List[PropertyIdentifier]] | No | The identifiers of the properties to include in the response. Only selectV2 or select should be populated, but not both. | +**page_token** | Optional[PageToken] | No | | +**page_size** | Optional[PageSize] | No | | +**exclude_rid** | Optional[bool] | No | A flag to exclude the retrieval of the `__rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2. | +**snapshot** | Optional[bool] | No | A flag to use snapshot consistency when paging. Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. This defaults to false if not specified, which means you will always get the latest results. | +**include_compute_usage** | Optional[IncludeComputeUsage] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/LoadObjectSetResponseV2.md b/docs/v2/Ontologies/models/LoadObjectSetResponseV2.md new file mode 100644 index 000000000..8934b4abe --- /dev/null +++ b/docs/v2/Ontologies/models/LoadObjectSetResponseV2.md @@ -0,0 +1,14 @@ +# LoadObjectSetResponseV2 + +Represents the API response when loading an `ObjectSet`. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**data** | List[OntologyObjectV2] | Yes | The list of objects in the current Page. | +**next_page_token** | Optional[PageToken] | No | | +**total_count** | TotalCount | Yes | | +**compute_usage** | Optional[ComputeSeconds] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/LoadObjectSetV2MultipleObjectTypesRequest.md b/docs/v2/Ontologies/models/LoadObjectSetV2MultipleObjectTypesRequest.md new file mode 100644 index 000000000..af45d3ffa --- /dev/null +++ b/docs/v2/Ontologies/models/LoadObjectSetV2MultipleObjectTypesRequest.md @@ -0,0 +1,20 @@ +# LoadObjectSetV2MultipleObjectTypesRequest + +Represents the API POST body when loading an `ObjectSet`. Used on the `/loadObjectsMultipleObjectTypes` endpoint only. + + +## Properties +| Name | Type | Required | Description | +| ------------ |------------------------------------|----------| ------------- | +**object_set** | ObjectSet | Yes | | +**order_by** | Optional[SearchOrderByV2] | No | | +**select** | List[SelectedPropertyApiName] | Yes | | +**select_v2** | Optional[List[PropertyIdentifier]] | No | The identifiers of the properties to include in the response. Only selectV2 or select should be populated, but not both. | +**page_token** | Optional[PageToken] | No | | +**page_size** | Optional[PageSize] | No | | +**exclude_rid** | Optional[bool] | No | A flag to exclude the retrieval of the `$rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2. | +**snapshot** | Optional[bool] | No | A flag to use snapshot consistency when paging. Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. This defaults to false if not specified, which means you will always get the latest results. | +**include_compute_usage** | Optional[IncludeComputeUsage] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/LoadObjectSetV2MultipleObjectTypesResponse.md b/docs/v2/Ontologies/models/LoadObjectSetV2MultipleObjectTypesResponse.md new file mode 100644 index 000000000..074814580 --- /dev/null +++ b/docs/v2/Ontologies/models/LoadObjectSetV2MultipleObjectTypesResponse.md @@ -0,0 +1,28 @@ +# LoadObjectSetV2MultipleObjectTypesResponse + +Represents the API response when loading an `ObjectSet`. An `interfaceToObjectTypeMappings` field is +optionally returned if the type scope of the returned object set includes any interfaces. The "type scope" +of an object set refers to whether objects contain all their properties (object-type type scope) or just the +properties that implement interface properties (interface type scope). There can be multiple type scopes in a +single object set- some objects may have all their properties and some may only have interface properties. + +The `interfaceToObjectTypeMappings` field contains mappings from `SharedPropertyTypeApiName`s on the interface(s) to +`PropertyApiName` for properties on the object(s). + +The `interfaceToObjectTypeMappingsV2` field contains mappings from `InterfacePropertyApiName`s on the +interface(s) to `InterfacePropertyTypeImplementation` for properties on the object(s). This therefore includes +implementations of both properties backed by SharedPropertyTypes as well as properties defined on the interface. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**data** | List[OntologyObjectV2] | Yes | The list of objects in the current page. | +**next_page_token** | Optional[PageToken] | No | | +**total_count** | TotalCount | Yes | | +**interface_to_object_type_mappings** | Dict[InterfaceTypeApiName, InterfaceToObjectTypeMappings] | Yes | | +**interface_to_object_type_mappings_v2** | Dict[InterfaceTypeApiName, InterfaceToObjectTypeMappingsV2] | Yes | | +**compute_usage** | Optional[ComputeSeconds] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/LoadObjectSetV2ObjectsOrInterfacesRequest.md b/docs/v2/Ontologies/models/LoadObjectSetV2ObjectsOrInterfacesRequest.md new file mode 100644 index 000000000..580ea9a87 --- /dev/null +++ b/docs/v2/Ontologies/models/LoadObjectSetV2ObjectsOrInterfacesRequest.md @@ -0,0 +1,19 @@ +# LoadObjectSetV2ObjectsOrInterfacesRequest + +Represents the API POST body when loading an `ObjectSet`. Used on the `/loadObjectsOrInterfaces` endpoint only. + + +## Properties +| Name | Type | Required | Description | +| ------------ |------------------------------------|----------| ------------- | +**object_set** | ObjectSet | Yes | | +**order_by** | Optional[SearchOrderByV2] | No | | +**select** | List[SelectedPropertyApiName] | Yes | | +**select_v2** | Optional[List[PropertyIdentifier]] | No | The identifiers of the properties to include in the response. Only selectV2 or select should be populated, but not both. | +**page_token** | Optional[PageToken] | No | | +**page_size** | Optional[PageSize] | No | | +**exclude_rid** | Optional[bool] | No | A flag to exclude the retrieval of the `$rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2. | +**snapshot** | Optional[bool] | No | A flag to use snapshot consistency when paging. Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. This defaults to false if not specified, which means you will always get the latest results. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/LoadObjectSetV2ObjectsOrInterfacesResponse.md b/docs/v2/Ontologies/models/LoadObjectSetV2ObjectsOrInterfacesResponse.md new file mode 100644 index 000000000..6043a267f --- /dev/null +++ b/docs/v2/Ontologies/models/LoadObjectSetV2ObjectsOrInterfacesResponse.md @@ -0,0 +1,15 @@ +# LoadObjectSetV2ObjectsOrInterfacesResponse + +Represents the API response when loading an `ObjectSet`. Objects in the returned set can either have properties +defined by an interface that the objects belong to or properties defined by the object type of the object. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**data** | List[OntologyObjectV2] | Yes | The list of objects in the current page. | +**next_page_token** | Optional[PageToken] | No | | +**total_count** | TotalCount | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/LoadOntologyMetadataRequest.md b/docs/v2/Ontologies/models/LoadOntologyMetadataRequest.md new file mode 100644 index 000000000..ef25b30ce --- /dev/null +++ b/docs/v2/Ontologies/models/LoadOntologyMetadataRequest.md @@ -0,0 +1,15 @@ +# LoadOntologyMetadataRequest + +The Ontology metadata (i.e., object, link, action, query, and interface types) to load. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**object_types** | List[ObjectTypeApiName] | Yes | | +**link_types** | List[LinkTypeApiName] | Yes | | +**action_types** | List[ActionTypeApiName] | Yes | | +**query_types** | List[VersionedQueryTypeApiName] | Yes | | +**interface_types** | List[InterfaceTypeApiName] | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/LogicRule.md b/docs/v2/Ontologies/models/LogicRule.md new file mode 100644 index 000000000..cb9faa929 --- /dev/null +++ b/docs/v2/Ontologies/models/LogicRule.md @@ -0,0 +1,22 @@ +# LogicRule + +LogicRule + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +DeleteInterfaceObjectRule | deleteInterfaceObject +ModifyInterfaceObjectRule | modifyInterfaceObject +ModifyObjectRule | modifyObject +DeleteObjectRule | deleteObject +CreateInterfaceObjectRule | createInterfaceObject +DeleteLinkRule | deleteLink +CreateObjectRule | createObject +CreateLinkRule | createLink + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/LogicRuleArgument.md b/docs/v2/Ontologies/models/LogicRuleArgument.md new file mode 100644 index 000000000..e6b85d320 --- /dev/null +++ b/docs/v2/Ontologies/models/LogicRuleArgument.md @@ -0,0 +1,23 @@ +# LogicRuleArgument + +Represents an argument for a logic rule operation. An argument can be passed in via the action parameters, as a static value, or as some other value. + + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +CurrentTimeArgument | currentTime +StaticArgument | staticValue +CurrentUserArgument | currentUser +ParameterIdArgument | parameterId +InterfaceParameterPropertyArgument | interfaceParameterPropertyValue +SynchronousWebhookOutputArgument | synchronousWebhookOutput +ObjectParameterPropertyArgument | objectParameterPropertyValue +UniqueIdentifierArgument | uniqueIdentifier + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/LtQueryV2.md b/docs/v2/Ontologies/models/LtQueryV2.md new file mode 100644 index 000000000..e2c5e7b80 --- /dev/null +++ b/docs/v2/Ontologies/models/LtQueryV2.md @@ -0,0 +1,16 @@ +# LtQueryV2 + +Returns objects where the specified field is less than a value. Allows you to specify a property to query on +by a variety of means. Either `field` or `propertyIdentifier` must be supplied, but not both. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**field** | Optional[PropertyApiName] | No | | +**property_identifier** | Optional[PropertyIdentifier] | No | | +**value** | PropertyValue | Yes | | +**type** | Literal["lt"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/LteQueryV2.md b/docs/v2/Ontologies/models/LteQueryV2.md new file mode 100644 index 000000000..854c7ee7b --- /dev/null +++ b/docs/v2/Ontologies/models/LteQueryV2.md @@ -0,0 +1,16 @@ +# LteQueryV2 + +Returns objects where the specified field is less than or equal to a value. Allows you to specify a property to +query on by a variety of means. Either `field` or `propertyIdentifier` must be supplied, but not both. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**field** | Optional[PropertyApiName] | No | | +**property_identifier** | Optional[PropertyIdentifier] | No | | +**value** | PropertyValue | Yes | | +**type** | Literal["lte"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/MatchRule.md b/docs/v2/Ontologies/models/MatchRule.md new file mode 100644 index 000000000..85ccc2a97 --- /dev/null +++ b/docs/v2/Ontologies/models/MatchRule.md @@ -0,0 +1,15 @@ +# MatchRule + +Matches intervals containing the terms in the query + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**query** | str | Yes | | +**max_gaps** | Optional[int] | No | The maximum gaps between matched terms in the interval. For example, in the text "quick brown fox", the terms "quick" and "fox" have a gap of one. If not set, then gaps are not considered. | +**ordered** | bool | Yes | If true, the matched terms must occur in order. | +**type** | Literal["match"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/MaxAggregationV2.md b/docs/v2/Ontologies/models/MaxAggregationV2.md new file mode 100644 index 000000000..3738287bc --- /dev/null +++ b/docs/v2/Ontologies/models/MaxAggregationV2.md @@ -0,0 +1,14 @@ +# MaxAggregationV2 + +Computes the maximum value for the provided field. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**field** | PropertyApiName | Yes | | +**name** | Optional[AggregationMetricName] | No | | +**direction** | Optional[OrderByDirection] | No | | +**type** | Literal["max"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/MediaMetadata.md b/docs/v2/Ontologies/models/MediaMetadata.md new file mode 100644 index 000000000..ff28e73d5 --- /dev/null +++ b/docs/v2/Ontologies/models/MediaMetadata.md @@ -0,0 +1,13 @@ +# MediaMetadata + +MediaMetadata + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**path** | Optional[MediaItemPath] | No | | +**size_bytes** | SizeBytes | Yes | | +**media_type** | MediaType | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/MethodObjectSet.md b/docs/v2/Ontologies/models/MethodObjectSet.md new file mode 100644 index 000000000..558df40a5 --- /dev/null +++ b/docs/v2/Ontologies/models/MethodObjectSet.md @@ -0,0 +1,11 @@ +# MethodObjectSet + +MethodObjectSet + +## Type +```python +ObjectSet +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/MinAggregationV2.md b/docs/v2/Ontologies/models/MinAggregationV2.md new file mode 100644 index 000000000..2ddef7c51 --- /dev/null +++ b/docs/v2/Ontologies/models/MinAggregationV2.md @@ -0,0 +1,14 @@ +# MinAggregationV2 + +Computes the minimum value for the provided field. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**field** | PropertyApiName | Yes | | +**name** | Optional[AggregationMetricName] | No | | +**direction** | Optional[OrderByDirection] | No | | +**type** | Literal["min"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ModifyInterfaceLogicRule.md b/docs/v2/Ontologies/models/ModifyInterfaceLogicRule.md new file mode 100644 index 000000000..bee771e50 --- /dev/null +++ b/docs/v2/Ontologies/models/ModifyInterfaceLogicRule.md @@ -0,0 +1,14 @@ +# ModifyInterfaceLogicRule + +ModifyInterfaceLogicRule + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**interface_object_to_modify** | ParameterId | Yes | | +**shared_property_arguments** | Dict[SharedPropertyTypeApiName, LogicRuleArgument] | Yes | | +**struct_property_arguments** | Dict[SharedPropertyTypeApiName, Dict[StructFieldApiName, StructFieldArgument]] | Yes | | +**type** | Literal["modifyInterface"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ModifyInterfaceObjectRule.md b/docs/v2/Ontologies/models/ModifyInterfaceObjectRule.md new file mode 100644 index 000000000..76e77213f --- /dev/null +++ b/docs/v2/Ontologies/models/ModifyInterfaceObjectRule.md @@ -0,0 +1,12 @@ +# ModifyInterfaceObjectRule + +ModifyInterfaceObjectRule + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**interface_type_api_name** | InterfaceTypeApiName | Yes | | +**type** | Literal["modifyInterfaceObject"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ModifyObject.md b/docs/v2/Ontologies/models/ModifyObject.md new file mode 100644 index 000000000..d33745b99 --- /dev/null +++ b/docs/v2/Ontologies/models/ModifyObject.md @@ -0,0 +1,13 @@ +# ModifyObject + +ModifyObject + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**primary_key** | PropertyValue | Yes | | +**object_type** | ObjectTypeApiName | Yes | | +**type** | Literal["modifyObject"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ModifyObjectEdit.md b/docs/v2/Ontologies/models/ModifyObjectEdit.md new file mode 100644 index 000000000..3c0573788 --- /dev/null +++ b/docs/v2/Ontologies/models/ModifyObjectEdit.md @@ -0,0 +1,14 @@ +# ModifyObjectEdit + +ModifyObjectEdit + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**object_type** | ObjectTypeApiName | Yes | | +**primary_key** | PropertyValue | Yes | | +**properties** | Dict[PropertyApiName, DataValue] | Yes | | +**type** | Literal["modifyObject"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ModifyObjectLogicRule.md b/docs/v2/Ontologies/models/ModifyObjectLogicRule.md new file mode 100644 index 000000000..42f052657 --- /dev/null +++ b/docs/v2/Ontologies/models/ModifyObjectLogicRule.md @@ -0,0 +1,14 @@ +# ModifyObjectLogicRule + +ModifyObjectLogicRule + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**object_to_modify** | ParameterId | Yes | | +**property_arguments** | Dict[PropertyApiName, LogicRuleArgument] | Yes | | +**struct_property_arguments** | Dict[PropertyApiName, Dict[StructFieldApiName, StructFieldArgument]] | Yes | | +**type** | Literal["modifyObject"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ModifyObjectRule.md b/docs/v2/Ontologies/models/ModifyObjectRule.md new file mode 100644 index 000000000..ca690877b --- /dev/null +++ b/docs/v2/Ontologies/models/ModifyObjectRule.md @@ -0,0 +1,12 @@ +# ModifyObjectRule + +ModifyObjectRule + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**object_type_api_name** | ObjectTypeApiName | Yes | | +**type** | Literal["modifyObject"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/MultiplyPropertyExpression.md b/docs/v2/Ontologies/models/MultiplyPropertyExpression.md new file mode 100644 index 000000000..992ba2d07 --- /dev/null +++ b/docs/v2/Ontologies/models/MultiplyPropertyExpression.md @@ -0,0 +1,13 @@ +# MultiplyPropertyExpression + +Multiplies two or more numeric values. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**properties** | List[DerivedPropertyDefinition] | Yes | | +**type** | Literal["multiply"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/NearestNeighborsQuery.md b/docs/v2/Ontologies/models/NearestNeighborsQuery.md new file mode 100644 index 000000000..38546420d --- /dev/null +++ b/docs/v2/Ontologies/models/NearestNeighborsQuery.md @@ -0,0 +1,18 @@ +# NearestNeighborsQuery + +Queries support either a vector matching the embedding model defined on the property, or text that is +automatically embedded. + + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +DoubleVector | vector +NearestNeighborsQueryText | text + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/NearestNeighborsQueryText.md b/docs/v2/Ontologies/models/NearestNeighborsQueryText.md new file mode 100644 index 000000000..fb9ca4d73 --- /dev/null +++ b/docs/v2/Ontologies/models/NearestNeighborsQueryText.md @@ -0,0 +1,13 @@ +# NearestNeighborsQueryText + +Automatically embed the text in a vector using the embedding model configured for the given propertyIdentifier. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**value** | str | Yes | | +**type** | Literal["text"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/NegatePropertyExpression.md b/docs/v2/Ontologies/models/NegatePropertyExpression.md new file mode 100644 index 000000000..ff192156f --- /dev/null +++ b/docs/v2/Ontologies/models/NegatePropertyExpression.md @@ -0,0 +1,13 @@ +# NegatePropertyExpression + +Negates a numeric value. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**property** | DerivedPropertyDefinition | Yes | | +**type** | Literal["negate"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/NestedInterfacePropertyTypeImplementation.md b/docs/v2/Ontologies/models/NestedInterfacePropertyTypeImplementation.md new file mode 100644 index 000000000..68ea676b4 --- /dev/null +++ b/docs/v2/Ontologies/models/NestedInterfacePropertyTypeImplementation.md @@ -0,0 +1,19 @@ +# NestedInterfacePropertyTypeImplementation + +Describes how an object type implements an interface property when a reducer is applied to it. Is missing a +reduced property implementation to prevent arbitrarily nested implementations. + + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +InterfacePropertyStructFieldImplementation | structFieldImplementation +InterfacePropertyStructImplementation | structImplementation +InterfacePropertyLocalPropertyImplementation | localPropertyImplementation + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/NestedQueryAggregation.md b/docs/v2/Ontologies/models/NestedQueryAggregation.md new file mode 100644 index 000000000..767d3842a --- /dev/null +++ b/docs/v2/Ontologies/models/NestedQueryAggregation.md @@ -0,0 +1,12 @@ +# NestedQueryAggregation + +NestedQueryAggregation + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**key** | Any | Yes | | +**groups** | List[QueryAggregation] | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/NotQueryV2.md b/docs/v2/Ontologies/models/NotQueryV2.md new file mode 100644 index 000000000..12573d6b9 --- /dev/null +++ b/docs/v2/Ontologies/models/NotQueryV2.md @@ -0,0 +1,12 @@ +# NotQueryV2 + +Returns objects where the query is not satisfied. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**value** | SearchJsonQueryV2 | Yes | | +**type** | Literal["not"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/NumberFormatAffix.md b/docs/v2/Ontologies/models/NumberFormatAffix.md new file mode 100644 index 000000000..7514748a4 --- /dev/null +++ b/docs/v2/Ontologies/models/NumberFormatAffix.md @@ -0,0 +1,15 @@ +# NumberFormatAffix + +Attach arbitrary text before and/or after the formatted number. +Example: prefix "USD " and postfix " total" displays as "USD 1,234.56 total" + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**base_format_options** | NumberFormatOptions | Yes | | +**affix** | Affix | Yes | | +**type** | Literal["affix"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/NumberFormatCurrency.md b/docs/v2/Ontologies/models/NumberFormatCurrency.md new file mode 100644 index 000000000..74a71e93b --- /dev/null +++ b/docs/v2/Ontologies/models/NumberFormatCurrency.md @@ -0,0 +1,16 @@ +# NumberFormatCurrency + +Format numbers as currency values with proper symbols and styling. +Example: 1234.56 with currency "USD" displays as "USD 1,234.56" (standard) or "USD 1.2K" (compact) + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**base_format_options** | NumberFormatOptions | Yes | | +**style** | NumberFormatCurrencyStyle | Yes | | +**currency_code** | PropertyTypeReferenceOrStringConstant | Yes | | +**type** | Literal["currency"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/NumberFormatCurrencyStyle.md b/docs/v2/Ontologies/models/NumberFormatCurrencyStyle.md new file mode 100644 index 000000000..158a5d1ea --- /dev/null +++ b/docs/v2/Ontologies/models/NumberFormatCurrencyStyle.md @@ -0,0 +1,14 @@ +# NumberFormatCurrencyStyle + +Currency rendering style options: +- STANDARD: Full currency formatting (e.g., "USD 1,234.56") +- COMPACT: Abbreviated currency formatting (e.g., "USD 1.2K") + + +| **Value** | +| --------- | +| `"STANDARD"` | +| `"COMPACT"` | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/NumberFormatCustomUnit.md b/docs/v2/Ontologies/models/NumberFormatCustomUnit.md new file mode 100644 index 000000000..72b85f5d7 --- /dev/null +++ b/docs/v2/Ontologies/models/NumberFormatCustomUnit.md @@ -0,0 +1,16 @@ +# NumberFormatCustomUnit + +Format numbers with custom units not supported by standard formatting. +Use this for domain-specific units like "requests/sec", "widgets", etc. +Example: 1500 with unit "widgets" displays as "1,500 widgets" + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**base_format_options** | NumberFormatOptions | Yes | | +**unit** | PropertyTypeReferenceOrStringConstant | Yes | | +**type** | Literal["customUnit"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/NumberFormatDuration.md b/docs/v2/Ontologies/models/NumberFormatDuration.md new file mode 100644 index 000000000..529b2fcd7 --- /dev/null +++ b/docs/v2/Ontologies/models/NumberFormatDuration.md @@ -0,0 +1,17 @@ +# NumberFormatDuration + +Format numeric values representing time durations. +- Human readable: 3661 seconds displays as "1h 1m 1s" +- Timecode: 3661 seconds displays as "01:01:01" + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**format_style** | DurationFormatStyle | Yes | | +**precision** | Optional[DurationPrecision] | No | | +**base_value** | DurationBaseValue | Yes | | +**type** | Literal["duration"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/NumberFormatFixedValues.md b/docs/v2/Ontologies/models/NumberFormatFixedValues.md new file mode 100644 index 000000000..405f531f6 --- /dev/null +++ b/docs/v2/Ontologies/models/NumberFormatFixedValues.md @@ -0,0 +1,14 @@ +# NumberFormatFixedValues + +Map integer values to custom human-readable strings. +Example: {1: "First", 2: "Second", 3: "Third"} would display 2 as "Second". + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**values** | Dict[FixedValuesMapKey, str] | Yes | | +**type** | Literal["fixedValues"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/NumberFormatNotation.md b/docs/v2/Ontologies/models/NumberFormatNotation.md new file mode 100644 index 000000000..e958ca443 --- /dev/null +++ b/docs/v2/Ontologies/models/NumberFormatNotation.md @@ -0,0 +1,18 @@ +# NumberFormatNotation + +Number notation style options: +- STANDARD: Regular number display ("1,234") +- SCIENTIFIC: Scientific notation ("1.234E3") +- ENGINEERING: Engineering notation ("1.234E3") +- COMPACT: Compact notation ("1.2K") + + +| **Value** | +| --------- | +| `"STANDARD"` | +| `"SCIENTIFIC"` | +| `"ENGINEERING"` | +| `"COMPACT"` | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/NumberFormatOptions.md b/docs/v2/Ontologies/models/NumberFormatOptions.md new file mode 100644 index 000000000..5f8f74d87 --- /dev/null +++ b/docs/v2/Ontologies/models/NumberFormatOptions.md @@ -0,0 +1,26 @@ +# NumberFormatOptions + +Base number formatting options that can be applied to all number formatters. +Controls precision, grouping, rounding, and notation. Consistent with JavaScript's Intl.NumberFormat. + +Examples: +- useGrouping: true makes 1234567 display as "1,234,567" +- maximumFractionDigits: 2 makes 3.14159 display as "3.14" +- notation: SCIENTIFIC makes 1234 display as "1.234E3" + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**use_grouping** | Optional[bool] | No | If true, show a locale-appropriate number grouping (e.g. thousands for en). | +**convert_negative_to_parenthesis** | Optional[bool] | No | If true, wrap negative numbers in parentheses instead of a minus sign. | +**minimum_integer_digits** | Optional[int] | No | | +**minimum_fraction_digits** | Optional[int] | No | | +**maximum_fraction_digits** | Optional[int] | No | | +**minimum_significant_digits** | Optional[int] | No | | +**maximum_significant_digits** | Optional[int] | No | | +**notation** | Optional[NumberFormatNotation] | No | | +**rounding_mode** | Optional[NumberRoundingMode] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/NumberFormatRatio.md b/docs/v2/Ontologies/models/NumberFormatRatio.md new file mode 100644 index 000000000..1e4dd1146 --- /dev/null +++ b/docs/v2/Ontologies/models/NumberFormatRatio.md @@ -0,0 +1,17 @@ +# NumberFormatRatio + +Display the value as a ratio with different scaling factors and suffixes: +- PERCENTAGE: Multiply by 100 and add "%" suffix (0.15 → "15%") +- PER_MILLE: Multiply by 1000 and add "‰" suffix (0.015 → "15‰") +- BASIS_POINTS: Multiply by 10000 and add "bps" suffix (0.0015 → "15bps") + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**ratio_type** | NumberRatioType | Yes | | +**base_format_options** | NumberFormatOptions | Yes | | +**type** | Literal["ratio"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/NumberFormatScale.md b/docs/v2/Ontologies/models/NumberFormatScale.md new file mode 100644 index 000000000..2bc22b641 --- /dev/null +++ b/docs/v2/Ontologies/models/NumberFormatScale.md @@ -0,0 +1,17 @@ +# NumberFormatScale + +Scale the numeric value by dividing by the specified factor and append an appropriate suffix. +- THOUSANDS: 1500 displays as "1.5K" +- MILLIONS: 2500000 displays as "2.5M" +- BILLIONS: 3200000000 displays as "3.2B" + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**scale_type** | NumberScaleType | Yes | | +**base_format_options** | NumberFormatOptions | Yes | | +**type** | Literal["scale"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/NumberFormatStandard.md b/docs/v2/Ontologies/models/NumberFormatStandard.md new file mode 100644 index 000000000..abf20270e --- /dev/null +++ b/docs/v2/Ontologies/models/NumberFormatStandard.md @@ -0,0 +1,14 @@ +# NumberFormatStandard + +Standard number formatting with configurable options. +This provides basic number formatting without any special units, scaling, or transformations. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**base_format_options** | NumberFormatOptions | Yes | | +**type** | Literal["standard"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/NumberFormatStandardUnit.md b/docs/v2/Ontologies/models/NumberFormatStandardUnit.md new file mode 100644 index 000000000..cbdb2d02d --- /dev/null +++ b/docs/v2/Ontologies/models/NumberFormatStandardUnit.md @@ -0,0 +1,16 @@ +# NumberFormatStandardUnit + +Format numbers with standard units supported by Intl.NumberFormat. +Examples: "meter", "kilogram", "celsius", "percent" +Input: 25 with unit "celsius" displays as "25 degrees C" + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**base_format_options** | NumberFormatOptions | Yes | | +**unit** | PropertyTypeReferenceOrStringConstant | Yes | | +**type** | Literal["standardUnit"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/NumberRatioType.md b/docs/v2/Ontologies/models/NumberRatioType.md new file mode 100644 index 000000000..fd6759e9a --- /dev/null +++ b/docs/v2/Ontologies/models/NumberRatioType.md @@ -0,0 +1,16 @@ +# NumberRatioType + +Ratio format options for displaying proportional values: +- PERCENTAGE: Multiply by 100 and add "%" suffix +- PER_MILLE: Multiply by 1000 and add "‰" suffix +- BASIS_POINTS: Multiply by 10000 and add "bps" suffix + + +| **Value** | +| --------- | +| `"PERCENTAGE"` | +| `"PER_MILLE"` | +| `"BASIS_POINTS"` | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/NumberRoundingMode.md b/docs/v2/Ontologies/models/NumberRoundingMode.md new file mode 100644 index 000000000..2771bea02 --- /dev/null +++ b/docs/v2/Ontologies/models/NumberRoundingMode.md @@ -0,0 +1,16 @@ +# NumberRoundingMode + +Number rounding behavior: +- CEIL: Always round up (3.1 becomes 4) +- FLOOR: Always round down (3.9 becomes 3) +- ROUND_CLOSEST: Round to nearest (3.4 becomes 3, 3.6 becomes 4) + + +| **Value** | +| --------- | +| `"CEIL"` | +| `"FLOOR"` | +| `"ROUND_CLOSEST"` | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/NumberScaleType.md b/docs/v2/Ontologies/models/NumberScaleType.md new file mode 100644 index 000000000..0f4450ab6 --- /dev/null +++ b/docs/v2/Ontologies/models/NumberScaleType.md @@ -0,0 +1,16 @@ +# NumberScaleType + +Scale factor options for large numbers: +- THOUSANDS: Divide by 1,000 and add "K" suffix +- MILLIONS: Divide by 1,000,000 and add "M" suffix +- BILLIONS: Divide by 1,000,000,000 and add "B" suffix + + +| **Value** | +| --------- | +| `"THOUSANDS"` | +| `"MILLIONS"` | +| `"BILLIONS"` | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ObjectEdit.md b/docs/v2/Ontologies/models/ObjectEdit.md new file mode 100644 index 000000000..1866ae75c --- /dev/null +++ b/docs/v2/Ontologies/models/ObjectEdit.md @@ -0,0 +1,19 @@ +# ObjectEdit + +ObjectEdit + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +ModifyObject | modifyObject +DeleteObject | deleteObject +AddObject | addObject +DeleteLink | deleteLink +AddLink | addLink + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ObjectEdits.md b/docs/v2/Ontologies/models/ObjectEdits.md new file mode 100644 index 000000000..c5f29542b --- /dev/null +++ b/docs/v2/Ontologies/models/ObjectEdits.md @@ -0,0 +1,17 @@ +# ObjectEdits + +ObjectEdits + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**edits** | List[ObjectEdit] | Yes | | +**added_object_count** | int | Yes | | +**modified_objects_count** | int | Yes | | +**deleted_objects_count** | int | Yes | | +**added_links_count** | int | Yes | | +**deleted_links_count** | int | Yes | | +**type** | Literal["edits"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ObjectParameterPropertyArgument.md b/docs/v2/Ontologies/models/ObjectParameterPropertyArgument.md new file mode 100644 index 000000000..9a77eb274 --- /dev/null +++ b/docs/v2/Ontologies/models/ObjectParameterPropertyArgument.md @@ -0,0 +1,13 @@ +# ObjectParameterPropertyArgument + +Represents an object parameter property argument in a logic rule. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**parameter_id** | ParameterId | Yes | | +**property_type_api_name** | PropertyTypeApiName | Yes | | +**type** | Literal["objectParameterPropertyValue"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ObjectPropertyType.md b/docs/v2/Ontologies/models/ObjectPropertyType.md new file mode 100644 index 000000000..fa68a296f --- /dev/null +++ b/docs/v2/Ontologies/models/ObjectPropertyType.md @@ -0,0 +1,37 @@ +# ObjectPropertyType + +A union of all the types supported by Ontology Object properties. + + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +DateType | date +StructType | struct +StringType | string +ByteType | byte +DoubleType | double +GeoPointType | geopoint +GeotimeSeriesReferenceType | geotimeSeriesReference +IntegerType | integer +FloatType | float +GeoShapeType | geoshape +LongType | long +BooleanType | boolean +CipherTextType | cipherText +MarkingType | marking +AttachmentType | attachment +MediaReferenceType | mediaReference +TimeseriesType | timeseries +OntologyObjectArrayType | array +ShortType | short +VectorType | vector +DecimalType | decimal +TimestampType | timestamp + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ObjectPropertyValueConstraint.md b/docs/v2/Ontologies/models/ObjectPropertyValueConstraint.md new file mode 100644 index 000000000..f272270ab --- /dev/null +++ b/docs/v2/Ontologies/models/ObjectPropertyValueConstraint.md @@ -0,0 +1,12 @@ +# ObjectPropertyValueConstraint + +The parameter value must be a property value of an object found within an object set. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["objectPropertyValue"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ObjectQueryResultConstraint.md b/docs/v2/Ontologies/models/ObjectQueryResultConstraint.md new file mode 100644 index 000000000..e29b0a5e6 --- /dev/null +++ b/docs/v2/Ontologies/models/ObjectQueryResultConstraint.md @@ -0,0 +1,12 @@ +# ObjectQueryResultConstraint + +The parameter value must be the primary key of an object found within an object set. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["objectQueryResult"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ObjectRid.md b/docs/v2/Ontologies/models/ObjectRid.md new file mode 100644 index 000000000..288a09b22 --- /dev/null +++ b/docs/v2/Ontologies/models/ObjectRid.md @@ -0,0 +1,12 @@ +# ObjectRid + +The unique resource identifier of an object, useful for interacting with other Foundry APIs. + + +## Type +```python +RID +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ObjectSet.md b/docs/v2/Ontologies/models/ObjectSet.md new file mode 100644 index 000000000..c7e7de285 --- /dev/null +++ b/docs/v2/Ontologies/models/ObjectSet.md @@ -0,0 +1,29 @@ +# ObjectSet + +Represents the definition of an `ObjectSet` in the `Ontology`. + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +ObjectSetSearchAroundType | searchAround +ObjectSetStaticType | static +ObjectSetIntersectionType | intersect +ObjectSetWithPropertiesType | withProperties +ObjectSetInterfaceLinkSearchAroundType | interfaceLinkSearchAround +ObjectSetSubtractType | subtract +ObjectSetNearestNeighborsType | nearestNeighbors +ObjectSetUnionType | union +ObjectSetAsTypeType | asType +ObjectSetMethodInputType | methodInput +ObjectSetReferenceType | reference +ObjectSetFilterType | filter +ObjectSetInterfaceBaseType | interfaceBase +ObjectSetAsBaseObjectTypesType | asBaseObjectTypes +ObjectSetBaseType | base + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ObjectSetAsBaseObjectTypesType.md b/docs/v2/Ontologies/models/ObjectSetAsBaseObjectTypesType.md new file mode 100644 index 000000000..a9fa8a191 --- /dev/null +++ b/docs/v2/Ontologies/models/ObjectSetAsBaseObjectTypesType.md @@ -0,0 +1,14 @@ +# ObjectSetAsBaseObjectTypesType + +Casts the objects in the object set to their base type and thus ensures objects are returned with all of their +properties in the resulting object set, not just the properties that implement interface properties. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**object_set** | ObjectSet | Yes | | +**type** | Literal["asBaseObjectTypes"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ObjectSetAsTypeType.md b/docs/v2/Ontologies/models/ObjectSetAsTypeType.md new file mode 100644 index 000000000..1f4b98712 --- /dev/null +++ b/docs/v2/Ontologies/models/ObjectSetAsTypeType.md @@ -0,0 +1,16 @@ +# ObjectSetAsTypeType + +Casts an object set to a specified object type or interface type API name. Any object whose object type does +not match the object type provided or implement the interface type provided will be dropped from the resulting +object set. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**entity_type** | str | Yes | An object type or interface type API name. | +**object_set** | ObjectSet | Yes | | +**type** | Literal["asType"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ObjectSetBaseType.md b/docs/v2/Ontologies/models/ObjectSetBaseType.md new file mode 100644 index 000000000..eaa56abbc --- /dev/null +++ b/docs/v2/Ontologies/models/ObjectSetBaseType.md @@ -0,0 +1,12 @@ +# ObjectSetBaseType + +ObjectSetBaseType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**object_type** | str | Yes | The API name of the object type. | +**type** | Literal["base"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ObjectSetFilterType.md b/docs/v2/Ontologies/models/ObjectSetFilterType.md new file mode 100644 index 000000000..f0e022da4 --- /dev/null +++ b/docs/v2/Ontologies/models/ObjectSetFilterType.md @@ -0,0 +1,13 @@ +# ObjectSetFilterType + +ObjectSetFilterType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**object_set** | ObjectSet | Yes | | +**where** | SearchJsonQueryV2 | Yes | | +**type** | Literal["filter"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ObjectSetInterfaceBaseType.md b/docs/v2/Ontologies/models/ObjectSetInterfaceBaseType.md new file mode 100644 index 000000000..8adb60bc2 --- /dev/null +++ b/docs/v2/Ontologies/models/ObjectSetInterfaceBaseType.md @@ -0,0 +1,13 @@ +# ObjectSetInterfaceBaseType + +ObjectSetInterfaceBaseType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**interface_type** | str | Yes | An object set with objects that implement the interface with the given interface API name. The objects in the object set will only have properties that implement properties of the given interface, unless you set the includeAllBaseObjectProperties flag. | +**include_all_base_object_properties** | Optional[bool] | No | A flag that will return all of the underlying object properties for the objects that implement the interface. This includes properties that don't explicitly implement an SPT on the interface. | +**type** | Literal["interfaceBase"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ObjectSetInterfaceLinkSearchAroundType.md b/docs/v2/Ontologies/models/ObjectSetInterfaceLinkSearchAroundType.md new file mode 100644 index 000000000..1e7ddd8bd --- /dev/null +++ b/docs/v2/Ontologies/models/ObjectSetInterfaceLinkSearchAroundType.md @@ -0,0 +1,13 @@ +# ObjectSetInterfaceLinkSearchAroundType + +ObjectSetInterfaceLinkSearchAroundType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**object_set** | ObjectSet | Yes | | +**interface_link** | InterfaceLinkTypeApiName | Yes | | +**type** | Literal["interfaceLinkSearchAround"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ObjectSetIntersectionType.md b/docs/v2/Ontologies/models/ObjectSetIntersectionType.md new file mode 100644 index 000000000..2c2caf091 --- /dev/null +++ b/docs/v2/Ontologies/models/ObjectSetIntersectionType.md @@ -0,0 +1,12 @@ +# ObjectSetIntersectionType + +ObjectSetIntersectionType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**object_sets** | List[ObjectSet] | Yes | | +**type** | Literal["intersect"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ObjectSetMethodInputType.md b/docs/v2/Ontologies/models/ObjectSetMethodInputType.md new file mode 100644 index 000000000..75a26dc73 --- /dev/null +++ b/docs/v2/Ontologies/models/ObjectSetMethodInputType.md @@ -0,0 +1,14 @@ +# ObjectSetMethodInputType + +ObjectSet which is the root of a MethodObjectSet definition. + +This feature is experimental and not yet generally available. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["methodInput"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ObjectSetNearestNeighborsType.md b/docs/v2/Ontologies/models/ObjectSetNearestNeighborsType.md new file mode 100644 index 000000000..73baedea5 --- /dev/null +++ b/docs/v2/Ontologies/models/ObjectSetNearestNeighborsType.md @@ -0,0 +1,25 @@ +# ObjectSetNearestNeighborsType + +ObjectSet containing the top `numNeighbors` objects with `propertyIdentifier` nearest to the input vector or +text. This can only be performed on a property with type vector that has been configured to be searched with +approximate nearest neighbors using a similarity function configured in the Ontology. + +A non-zero score for each resulting object is returned when the `orderType` in the `orderBy` field is set to +`relevance`. Note that: + - Scores will not be returned if a nearestNeighbors object set is composed through union, subtraction + or intersection with non-nearestNeighbors object sets. + - If results have scores, the order of the scores will be decreasing (duplicate scores are possible). + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**object_set** | ObjectSet | Yes | | +**property_identifier** | PropertyIdentifier | Yes | | +**num_neighbors** | int | Yes | The number of objects to return. If the number of documents in the objectType is less than the provided value, all objects will be returned. This value is limited to 1 <= numNeighbors <= 500. | +**similarity_threshold** | Optional[float] | No | The similarity threshold results must be above to be included in the returned in the object set. 0 <= Threshold <= 1. Where 1 is identical and 0 is least similar. | +**query** | NearestNeighborsQuery | Yes | | +**type** | Literal["nearestNeighbors"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ObjectSetReferenceType.md b/docs/v2/Ontologies/models/ObjectSetReferenceType.md new file mode 100644 index 000000000..7322db394 --- /dev/null +++ b/docs/v2/Ontologies/models/ObjectSetReferenceType.md @@ -0,0 +1,12 @@ +# ObjectSetReferenceType + +ObjectSetReferenceType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**reference** | ObjectSetRid | Yes | | +**type** | Literal["reference"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ObjectSetRid.md b/docs/v2/Ontologies/models/ObjectSetRid.md new file mode 100644 index 000000000..aa910c888 --- /dev/null +++ b/docs/v2/Ontologies/models/ObjectSetRid.md @@ -0,0 +1,11 @@ +# ObjectSetRid + +ObjectSetRid + +## Type +```python +RID +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ObjectSetSearchAroundType.md b/docs/v2/Ontologies/models/ObjectSetSearchAroundType.md new file mode 100644 index 000000000..50a37503e --- /dev/null +++ b/docs/v2/Ontologies/models/ObjectSetSearchAroundType.md @@ -0,0 +1,13 @@ +# ObjectSetSearchAroundType + +ObjectSetSearchAroundType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**object_set** | ObjectSet | Yes | | +**link** | LinkTypeApiName | Yes | | +**type** | Literal["searchAround"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ObjectSetStaticType.md b/docs/v2/Ontologies/models/ObjectSetStaticType.md new file mode 100644 index 000000000..c520f9b27 --- /dev/null +++ b/docs/v2/Ontologies/models/ObjectSetStaticType.md @@ -0,0 +1,12 @@ +# ObjectSetStaticType + +ObjectSetStaticType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**objects** | List[ObjectRid] | Yes | | +**type** | Literal["static"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ObjectSetSubtractType.md b/docs/v2/Ontologies/models/ObjectSetSubtractType.md new file mode 100644 index 000000000..690e7ec54 --- /dev/null +++ b/docs/v2/Ontologies/models/ObjectSetSubtractType.md @@ -0,0 +1,12 @@ +# ObjectSetSubtractType + +ObjectSetSubtractType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**object_sets** | List[ObjectSet] | Yes | | +**type** | Literal["subtract"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ObjectSetUnionType.md b/docs/v2/Ontologies/models/ObjectSetUnionType.md new file mode 100644 index 000000000..bac2f4f7c --- /dev/null +++ b/docs/v2/Ontologies/models/ObjectSetUnionType.md @@ -0,0 +1,12 @@ +# ObjectSetUnionType + +ObjectSetUnionType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**object_sets** | List[ObjectSet] | Yes | | +**type** | Literal["union"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ObjectSetWithPropertiesType.md b/docs/v2/Ontologies/models/ObjectSetWithPropertiesType.md new file mode 100644 index 000000000..569a50a75 --- /dev/null +++ b/docs/v2/Ontologies/models/ObjectSetWithPropertiesType.md @@ -0,0 +1,16 @@ +# ObjectSetWithPropertiesType + +ObjectSet which returns objects with additional derived properties. + +This feature is experimental and not yet generally available. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**object_set** | ObjectSet | Yes | | +**derived_properties** | Dict[DerivedPropertyApiName, DerivedPropertyDefinition] | Yes | Map of the name of the derived property to return and its definition | +**type** | Literal["withProperties"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ObjectTypeApiName.md b/docs/v2/Ontologies/models/ObjectTypeApiName.md new file mode 100644 index 000000000..e5f32f969 --- /dev/null +++ b/docs/v2/Ontologies/models/ObjectTypeApiName.md @@ -0,0 +1,13 @@ +# ObjectTypeApiName + +The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the +`List object types` endpoint or check the **Ontology Manager**. + + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ObjectTypeEdits.md b/docs/v2/Ontologies/models/ObjectTypeEdits.md new file mode 100644 index 000000000..5ea25c991 --- /dev/null +++ b/docs/v2/Ontologies/models/ObjectTypeEdits.md @@ -0,0 +1,12 @@ +# ObjectTypeEdits + +ObjectTypeEdits + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**edited_object_types** | List[ObjectTypeApiName] | Yes | | +**type** | Literal["largeScaleEdits"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ObjectTypeFullMetadata.md b/docs/v2/Ontologies/models/ObjectTypeFullMetadata.md new file mode 100644 index 000000000..f59dd987c --- /dev/null +++ b/docs/v2/Ontologies/models/ObjectTypeFullMetadata.md @@ -0,0 +1,15 @@ +# ObjectTypeFullMetadata + +ObjectTypeFullMetadata + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**object_type** | ObjectTypeV2 | Yes | | +**link_types** | List[LinkTypeSideV2] | Yes | | +**implements_interfaces** | List[InterfaceTypeApiName] | Yes | A list of interfaces that this object type implements. | +**implements_interfaces2** | Dict[InterfaceTypeApiName, ObjectTypeInterfaceImplementation] | Yes | A list of interfaces that this object type implements and how it implements them. | +**shared_property_type_mapping** | Dict[SharedPropertyTypeApiName, PropertyApiName] | Yes | A map from shared property type API name to backing local property API name for the shared property types present on this object type. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ObjectTypeId.md b/docs/v2/Ontologies/models/ObjectTypeId.md new file mode 100644 index 000000000..2544a3cb8 --- /dev/null +++ b/docs/v2/Ontologies/models/ObjectTypeId.md @@ -0,0 +1,11 @@ +# ObjectTypeId + +The unique identifier (ID) for an object type. This can be viewed in [Ontology Manager](https://palantir.com/docs/foundry/ontology-manager/overview/). + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ObjectTypeInterfaceImplementation.md b/docs/v2/Ontologies/models/ObjectTypeInterfaceImplementation.md new file mode 100644 index 000000000..ccce344df --- /dev/null +++ b/docs/v2/Ontologies/models/ObjectTypeInterfaceImplementation.md @@ -0,0 +1,13 @@ +# ObjectTypeInterfaceImplementation + +ObjectTypeInterfaceImplementation + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**properties** | Dict[SharedPropertyTypeApiName, PropertyApiName] | Yes | | +**properties_v2** | Dict[InterfacePropertyApiName, InterfacePropertyTypeImplementation] | Yes | | +**links** | Dict[InterfaceLinkTypeApiName, List[LinkTypeApiName]] | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ObjectTypeRid.md b/docs/v2/Ontologies/models/ObjectTypeRid.md new file mode 100644 index 000000000..c4904e5fc --- /dev/null +++ b/docs/v2/Ontologies/models/ObjectTypeRid.md @@ -0,0 +1,11 @@ +# ObjectTypeRid + +The unique resource identifier of an object type, useful for interacting with other Foundry APIs. + +## Type +```python +RID +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ObjectTypeV2.md b/docs/v2/Ontologies/models/ObjectTypeV2.md new file mode 100644 index 000000000..b5a9d9417 --- /dev/null +++ b/docs/v2/Ontologies/models/ObjectTypeV2.md @@ -0,0 +1,21 @@ +# ObjectTypeV2 + +Represents an object type in the Ontology. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**api_name** | ObjectTypeApiName | Yes | | +**display_name** | DisplayName | Yes | | +**status** | ReleaseStatus | Yes | | +**description** | Optional[str] | No | The description of the object type. | +**plural_display_name** | str | Yes | The plural display name of the object type. | +**icon** | Icon | Yes | | +**primary_key** | PropertyApiName | Yes | | +**properties** | Dict[PropertyApiName, PropertyV2] | Yes | A map of the properties of the object type. | +**rid** | ObjectTypeRid | Yes | | +**title_property** | PropertyApiName | Yes | | +**visibility** | Optional[ObjectTypeVisibility] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ObjectTypeVisibility.md b/docs/v2/Ontologies/models/ObjectTypeVisibility.md new file mode 100644 index 000000000..883926665 --- /dev/null +++ b/docs/v2/Ontologies/models/ObjectTypeVisibility.md @@ -0,0 +1,12 @@ +# ObjectTypeVisibility + +The suggested visibility of the object type. + +| **Value** | +| --------- | +| `"NORMAL"` | +| `"PROMINENT"` | +| `"HIDDEN"` | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/OneOfConstraint.md b/docs/v2/Ontologies/models/OneOfConstraint.md new file mode 100644 index 000000000..2b875e155 --- /dev/null +++ b/docs/v2/Ontologies/models/OneOfConstraint.md @@ -0,0 +1,14 @@ +# OneOfConstraint + +The parameter has a manually predefined set of options. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**options** | List[ParameterOption] | Yes | | +**other_values_allowed** | bool | Yes | A flag denoting whether custom, user provided values will be considered valid. This is configured via the **Allowed "Other" value** toggle in the **Ontology Manager**. | +**type** | Literal["oneOf"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/OntologyApiName.md b/docs/v2/Ontologies/models/OntologyApiName.md new file mode 100644 index 000000000..d33c88b22 --- /dev/null +++ b/docs/v2/Ontologies/models/OntologyApiName.md @@ -0,0 +1,11 @@ +# OntologyApiName + +OntologyApiName + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/OntologyArrayType.md b/docs/v2/Ontologies/models/OntologyArrayType.md new file mode 100644 index 000000000..e3a3db842 --- /dev/null +++ b/docs/v2/Ontologies/models/OntologyArrayType.md @@ -0,0 +1,12 @@ +# OntologyArrayType + +OntologyArrayType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**item_type** | OntologyDataType | Yes | | +**type** | Literal["array"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/OntologyDataType.md b/docs/v2/Ontologies/models/OntologyDataType.md new file mode 100644 index 000000000..fa382d602 --- /dev/null +++ b/docs/v2/Ontologies/models/OntologyDataType.md @@ -0,0 +1,37 @@ +# OntologyDataType + +A union of all the primitive types used by Palantir's Ontology-based products. + + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +DateType | date +OntologyStructType | struct +OntologySetType | set +StringType | string +ByteType | byte +DoubleType | double +IntegerType | integer +FloatType | float +AnyType | any +LongType | long +BooleanType | boolean +CipherTextType | cipherText +MarkingType | marking +UnsupportedType | unsupported +OntologyArrayType | array +OntologyObjectSetType | objectSet +BinaryType | binary +ShortType | short +DecimalType | decimal +OntologyMapType | map +TimestampType | timestamp +OntologyObjectType | object + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/OntologyFullMetadata.md b/docs/v2/Ontologies/models/OntologyFullMetadata.md new file mode 100644 index 000000000..2aa505d54 --- /dev/null +++ b/docs/v2/Ontologies/models/OntologyFullMetadata.md @@ -0,0 +1,18 @@ +# OntologyFullMetadata + +OntologyFullMetadata + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**ontology** | OntologyV2 | Yes | | +**object_types** | Dict[ObjectTypeApiName, ObjectTypeFullMetadata] | Yes | | +**action_types** | Dict[ActionTypeApiName, ActionTypeV2] | Yes | | +**query_types** | Dict[VersionedQueryTypeApiName, QueryTypeV2] | Yes | | +**interface_types** | Dict[InterfaceTypeApiName, InterfaceType] | Yes | | +**shared_property_types** | Dict[SharedPropertyTypeApiName, SharedPropertyType] | Yes | | +**branch** | Optional[BranchMetadata] | No | | +**value_types** | Dict[ValueTypeApiName, OntologyValueType] | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/OntologyIdentifier.md b/docs/v2/Ontologies/models/OntologyIdentifier.md new file mode 100644 index 000000000..bfcb75c25 --- /dev/null +++ b/docs/v2/Ontologies/models/OntologyIdentifier.md @@ -0,0 +1,13 @@ +# OntologyIdentifier + +The API name or RID of the Ontology. To find the API name or RID, use the **List Ontologies** endpoint or +check the **Ontology Manager**. + + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/OntologyInterfaceObjectSetType.md b/docs/v2/Ontologies/models/OntologyInterfaceObjectSetType.md new file mode 100644 index 000000000..9cf5bc543 --- /dev/null +++ b/docs/v2/Ontologies/models/OntologyInterfaceObjectSetType.md @@ -0,0 +1,12 @@ +# OntologyInterfaceObjectSetType + +OntologyInterfaceObjectSetType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**interface_type_api_name** | InterfaceTypeApiName | Yes | | +**type** | Literal["interfaceObjectSet"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/OntologyInterfaceObjectType.md b/docs/v2/Ontologies/models/OntologyInterfaceObjectType.md new file mode 100644 index 000000000..5c79450bf --- /dev/null +++ b/docs/v2/Ontologies/models/OntologyInterfaceObjectType.md @@ -0,0 +1,12 @@ +# OntologyInterfaceObjectType + +OntologyInterfaceObjectType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**interface_type_api_name** | Optional[InterfaceTypeApiName] | No | | +**type** | Literal["interfaceObject"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/OntologyMapType.md b/docs/v2/Ontologies/models/OntologyMapType.md new file mode 100644 index 000000000..dbf9ef431 --- /dev/null +++ b/docs/v2/Ontologies/models/OntologyMapType.md @@ -0,0 +1,13 @@ +# OntologyMapType + +OntologyMapType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**key_type** | OntologyDataType | Yes | | +**value_type** | OntologyDataType | Yes | | +**type** | Literal["map"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/OntologyObjectArrayType.md b/docs/v2/Ontologies/models/OntologyObjectArrayType.md new file mode 100644 index 000000000..34084f222 --- /dev/null +++ b/docs/v2/Ontologies/models/OntologyObjectArrayType.md @@ -0,0 +1,13 @@ +# OntologyObjectArrayType + +OntologyObjectArrayType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**sub_type** | ObjectPropertyType | Yes | | +**reducers** | List[OntologyObjectArrayTypeReducer] | Yes | If non-empty, this property can be reduced to a single value of the subtype. The reducers are applied in order to determine a winning value. The array can be loaded as a reduced value or as the full array in an object set. | +**type** | Literal["array"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/OntologyObjectArrayTypeReducer.md b/docs/v2/Ontologies/models/OntologyObjectArrayTypeReducer.md new file mode 100644 index 000000000..82db9e2b6 --- /dev/null +++ b/docs/v2/Ontologies/models/OntologyObjectArrayTypeReducer.md @@ -0,0 +1,12 @@ +# OntologyObjectArrayTypeReducer + +OntologyObjectArrayTypeReducer + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**direction** | OntologyObjectArrayTypeReducerSortDirection | Yes | | +**field** | Optional[StructFieldApiName] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/OntologyObjectArrayTypeReducerSortDirection.md b/docs/v2/Ontologies/models/OntologyObjectArrayTypeReducerSortDirection.md new file mode 100644 index 000000000..50cba0489 --- /dev/null +++ b/docs/v2/Ontologies/models/OntologyObjectArrayTypeReducerSortDirection.md @@ -0,0 +1,11 @@ +# OntologyObjectArrayTypeReducerSortDirection + +OntologyObjectArrayTypeReducerSortDirection + +| **Value** | +| --------- | +| `"ASCENDING_NULLS_LAST"` | +| `"DESCENDING_NULLS_LAST"` | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/OntologyObjectSetType.md b/docs/v2/Ontologies/models/OntologyObjectSetType.md new file mode 100644 index 000000000..080f1a5b1 --- /dev/null +++ b/docs/v2/Ontologies/models/OntologyObjectSetType.md @@ -0,0 +1,13 @@ +# OntologyObjectSetType + +OntologyObjectSetType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**object_api_name** | Optional[ObjectTypeApiName] | No | | +**object_type_api_name** | Optional[ObjectTypeApiName] | No | | +**type** | Literal["objectSet"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/OntologyObjectType.md b/docs/v2/Ontologies/models/OntologyObjectType.md new file mode 100644 index 000000000..bf276e6fd --- /dev/null +++ b/docs/v2/Ontologies/models/OntologyObjectType.md @@ -0,0 +1,13 @@ +# OntologyObjectType + +OntologyObjectType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**object_api_name** | ObjectTypeApiName | Yes | | +**object_type_api_name** | ObjectTypeApiName | Yes | | +**type** | Literal["object"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/OntologyObjectTypeReferenceType.md b/docs/v2/Ontologies/models/OntologyObjectTypeReferenceType.md new file mode 100644 index 000000000..9fdc02c46 --- /dev/null +++ b/docs/v2/Ontologies/models/OntologyObjectTypeReferenceType.md @@ -0,0 +1,11 @@ +# OntologyObjectTypeReferenceType + +OntologyObjectTypeReferenceType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["objectType"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/OntologyObjectV2.md b/docs/v2/Ontologies/models/OntologyObjectV2.md new file mode 100644 index 000000000..faa66a968 --- /dev/null +++ b/docs/v2/Ontologies/models/OntologyObjectV2.md @@ -0,0 +1,11 @@ +# OntologyObjectV2 + +Represents an object in the Ontology. + +## Type +```python +Dict[PropertyApiName, PropertyValue] +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/OntologyRid.md b/docs/v2/Ontologies/models/OntologyRid.md new file mode 100644 index 000000000..c38f5a6c9 --- /dev/null +++ b/docs/v2/Ontologies/models/OntologyRid.md @@ -0,0 +1,13 @@ +# OntologyRid + +The unique Resource Identifier (RID) of the Ontology. To look up your Ontology RID, please use the +`List ontologies` endpoint or check the **Ontology Manager**. + + +## Type +```python +RID +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/OntologySetType.md b/docs/v2/Ontologies/models/OntologySetType.md new file mode 100644 index 000000000..8954a00e1 --- /dev/null +++ b/docs/v2/Ontologies/models/OntologySetType.md @@ -0,0 +1,12 @@ +# OntologySetType + +OntologySetType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**item_type** | OntologyDataType | Yes | | +**type** | Literal["set"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/OntologyStructField.md b/docs/v2/Ontologies/models/OntologyStructField.md new file mode 100644 index 000000000..8796f1b06 --- /dev/null +++ b/docs/v2/Ontologies/models/OntologyStructField.md @@ -0,0 +1,13 @@ +# OntologyStructField + +OntologyStructField + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**name** | StructFieldName | Yes | | +**field_type** | OntologyDataType | Yes | | +**required** | bool | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/OntologyStructType.md b/docs/v2/Ontologies/models/OntologyStructType.md new file mode 100644 index 000000000..15031de7b --- /dev/null +++ b/docs/v2/Ontologies/models/OntologyStructType.md @@ -0,0 +1,12 @@ +# OntologyStructType + +OntologyStructType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**fields** | List[OntologyStructField] | Yes | | +**type** | Literal["struct"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/OntologyTransactionId.md b/docs/v2/Ontologies/models/OntologyTransactionId.md new file mode 100644 index 000000000..7d38d534c --- /dev/null +++ b/docs/v2/Ontologies/models/OntologyTransactionId.md @@ -0,0 +1,11 @@ +# OntologyTransactionId + +The ID identifying a transaction. + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/OntologyV2.md b/docs/v2/Ontologies/models/OntologyV2.md new file mode 100644 index 000000000..d4add6fa2 --- /dev/null +++ b/docs/v2/Ontologies/models/OntologyV2.md @@ -0,0 +1,14 @@ +# OntologyV2 + +Metadata about an Ontology. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**api_name** | OntologyApiName | Yes | | +**display_name** | DisplayName | Yes | | +**description** | str | Yes | | +**rid** | OntologyRid | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/OntologyValueType.md b/docs/v2/Ontologies/models/OntologyValueType.md new file mode 100644 index 000000000..fc5fedf20 --- /dev/null +++ b/docs/v2/Ontologies/models/OntologyValueType.md @@ -0,0 +1,18 @@ +# OntologyValueType + +OntologyValueType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**api_name** | ValueTypeApiName | Yes | | +**display_name** | DisplayName | Yes | | +**description** | Optional[str] | No | | +**rid** | ValueTypeRid | Yes | | +**status** | Optional[ValueTypeStatus] | No | | +**field_type** | ValueTypeFieldType | Yes | | +**version** | str | Yes | | +**constraints** | List[ValueTypeConstraint] | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/OrQueryV2.md b/docs/v2/Ontologies/models/OrQueryV2.md new file mode 100644 index 000000000..86536bb32 --- /dev/null +++ b/docs/v2/Ontologies/models/OrQueryV2.md @@ -0,0 +1,12 @@ +# OrQueryV2 + +Returns objects where at least 1 query is satisfied. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**value** | List[SearchJsonQueryV2] | Yes | | +**type** | Literal["or"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/OrderBy.md b/docs/v2/Ontologies/models/OrderBy.md new file mode 100644 index 000000000..451c80e89 --- /dev/null +++ b/docs/v2/Ontologies/models/OrderBy.md @@ -0,0 +1,21 @@ +# OrderBy + +A command representing the list of properties to order by. Properties should be delimited by commas and +prefixed by `p` or `properties`. The format expected format is +`orderBy=properties.{property}:{sortDirection},properties.{property}:{sortDirection}...` + +By default, the ordering for a property is ascending, and this can be explicitly specified by appending +`:asc` (for ascending) or `:desc` (for descending). + +Example: use `orderBy=properties.lastName:asc` to order by a single property, +`orderBy=properties.lastName,properties.firstName,properties.age:desc` to order by multiple properties. +You may also use the shorthand `p` instead of `properties` such as `orderBy=p.lastName:asc`. + + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/OrderByDirection.md b/docs/v2/Ontologies/models/OrderByDirection.md new file mode 100644 index 000000000..f7f92da9e --- /dev/null +++ b/docs/v2/Ontologies/models/OrderByDirection.md @@ -0,0 +1,11 @@ +# OrderByDirection + +OrderByDirection + +| **Value** | +| --------- | +| `"ASC"` | +| `"DESC"` | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ParameterEvaluatedConstraint.md b/docs/v2/Ontologies/models/ParameterEvaluatedConstraint.md new file mode 100644 index 000000000..839d0a0c4 --- /dev/null +++ b/docs/v2/Ontologies/models/ParameterEvaluatedConstraint.md @@ -0,0 +1,42 @@ +# ParameterEvaluatedConstraint + +A constraint that an action parameter value must satisfy in order to be considered valid. +Constraints can be configured on action parameters in the **Ontology Manager**. +Applicable constraints are determined dynamically based on parameter inputs. +Parameter values are evaluated against the final set of constraints. + +The type of the constraint. +| Type | Description | +|-----------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| `arraySize` | The parameter expects an array of values and the size of the array must fall within the defined range. | +| `groupMember` | The parameter value must be the user id of a member belonging to at least one of the groups defined by the constraint. | +| `objectPropertyValue` | The parameter value must be a property value of an object found within an object set. | +| `objectQueryResult` | The parameter value must be the primary key of an object found within an object set. | +| `oneOf` | The parameter has a manually predefined set of options. | +| `range` | The parameter value must be within the defined range. | +| `stringLength` | The parameter value must have a length within the defined range. | +| `stringRegexMatch` | The parameter value must match a predefined regular expression. | +| `unevaluable` | The parameter cannot be evaluated because it depends on another parameter or object set that can't be evaluated. This can happen when a parameter's allowed values are defined by another parameter that is missing or invalid. | + + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +StructEvaluatedConstraint | struct +OneOfConstraint | oneOf +ArrayEvaluatedConstraint | array +GroupMemberConstraint | groupMember +ObjectPropertyValueConstraint | objectPropertyValue +RangeConstraint | range +ArraySizeConstraint | arraySize +ObjectQueryResultConstraint | objectQueryResult +StringLengthConstraint | stringLength +StringRegexMatchConstraint | stringRegexMatch +UnevaluableConstraint | unevaluable + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ParameterEvaluationResult.md b/docs/v2/Ontologies/models/ParameterEvaluationResult.md new file mode 100644 index 000000000..0881520b3 --- /dev/null +++ b/docs/v2/Ontologies/models/ParameterEvaluationResult.md @@ -0,0 +1,13 @@ +# ParameterEvaluationResult + +Represents the validity of a parameter against the configured constraints. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**result** | ValidationResult | Yes | | +**evaluated_constraints** | List[ParameterEvaluatedConstraint] | Yes | | +**required** | bool | Yes | Represents whether the parameter is a required input to the action. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ParameterId.md b/docs/v2/Ontologies/models/ParameterId.md new file mode 100644 index 000000000..b6c2637d9 --- /dev/null +++ b/docs/v2/Ontologies/models/ParameterId.md @@ -0,0 +1,13 @@ +# ParameterId + +The unique identifier of the parameter. Parameters are used as inputs when an action or query is applied. +Parameters can be viewed and managed in the **Ontology Manager**. + + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ParameterIdArgument.md b/docs/v2/Ontologies/models/ParameterIdArgument.md new file mode 100644 index 000000000..0acf2246f --- /dev/null +++ b/docs/v2/Ontologies/models/ParameterIdArgument.md @@ -0,0 +1,12 @@ +# ParameterIdArgument + +Represents a parameter ID argument in a logic rule. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**parameter_id** | ParameterId | Yes | | +**type** | Literal["parameterId"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ParameterOption.md b/docs/v2/Ontologies/models/ParameterOption.md new file mode 100644 index 000000000..f81f9cdb1 --- /dev/null +++ b/docs/v2/Ontologies/models/ParameterOption.md @@ -0,0 +1,13 @@ +# ParameterOption + +A possible value for the parameter. This is defined in the **Ontology Manager** by Actions admins. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**display_name** | Optional[DisplayName] | No | | +**value** | Optional[Any] | No | An allowed configured value for a parameter within an action. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/Plaintext.md b/docs/v2/Ontologies/models/Plaintext.md new file mode 100644 index 000000000..2172fbe85 --- /dev/null +++ b/docs/v2/Ontologies/models/Plaintext.md @@ -0,0 +1,11 @@ +# Plaintext + +Plaintext + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/PolygonValue.md b/docs/v2/Ontologies/models/PolygonValue.md new file mode 100644 index 000000000..b61e30b96 --- /dev/null +++ b/docs/v2/Ontologies/models/PolygonValue.md @@ -0,0 +1,11 @@ +# PolygonValue + +PolygonValue + +## Type +```python +Polygon +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/PostTransactionEditsRequest.md b/docs/v2/Ontologies/models/PostTransactionEditsRequest.md new file mode 100644 index 000000000..7a4b2fb16 --- /dev/null +++ b/docs/v2/Ontologies/models/PostTransactionEditsRequest.md @@ -0,0 +1,11 @@ +# PostTransactionEditsRequest + +The request payload for staging edits to a transaction. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**edits** | List[TransactionEdit] | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/PostTransactionEditsResponse.md b/docs/v2/Ontologies/models/PostTransactionEditsResponse.md new file mode 100644 index 000000000..d58c3f2ed --- /dev/null +++ b/docs/v2/Ontologies/models/PostTransactionEditsResponse.md @@ -0,0 +1,10 @@ +# PostTransactionEditsResponse + +PostTransactionEditsResponse + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/PreciseDuration.md b/docs/v2/Ontologies/models/PreciseDuration.md new file mode 100644 index 000000000..d40375297 --- /dev/null +++ b/docs/v2/Ontologies/models/PreciseDuration.md @@ -0,0 +1,13 @@ +# PreciseDuration + +A measurement of duration. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**value** | int | Yes | The duration value. | +**unit** | PreciseTimeUnit | Yes | | +**type** | Literal["duration"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/PreciseTimeUnit.md b/docs/v2/Ontologies/models/PreciseTimeUnit.md new file mode 100644 index 000000000..eb4437a11 --- /dev/null +++ b/docs/v2/Ontologies/models/PreciseTimeUnit.md @@ -0,0 +1,15 @@ +# PreciseTimeUnit + +The unit of a fixed-width duration. Each day is 24 hours and each week is 7 days. + +| **Value** | +| --------- | +| `"NANOSECONDS"` | +| `"SECONDS"` | +| `"MINUTES"` | +| `"HOURS"` | +| `"DAYS"` | +| `"WEEKS"` | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/PrefixOnLastTokenRule.md b/docs/v2/Ontologies/models/PrefixOnLastTokenRule.md new file mode 100644 index 000000000..aaad267ba --- /dev/null +++ b/docs/v2/Ontologies/models/PrefixOnLastTokenRule.md @@ -0,0 +1,14 @@ +# PrefixOnLastTokenRule + +Matches intervals containing all the terms, using exact match for all but the last term, and prefix match for +the last term. Ordering of the terms in the query is preserved. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**query** | str | Yes | | +**type** | Literal["prefixOnLastToken"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/PrimaryKeyValue.md b/docs/v2/Ontologies/models/PrimaryKeyValue.md new file mode 100644 index 000000000..2d13d3567 --- /dev/null +++ b/docs/v2/Ontologies/models/PrimaryKeyValue.md @@ -0,0 +1,11 @@ +# PrimaryKeyValue + +Represents the primary key value that is used as a unique identifier for an object. + +## Type +```python +Any +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/PropertyApiName.md b/docs/v2/Ontologies/models/PropertyApiName.md new file mode 100644 index 000000000..ee7e5611d --- /dev/null +++ b/docs/v2/Ontologies/models/PropertyApiName.md @@ -0,0 +1,13 @@ +# PropertyApiName + +The name of the property in the API. To find the API name for your property, use the `Get object type` +endpoint or check the **Ontology Manager**. + + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/PropertyApiNameSelector.md b/docs/v2/Ontologies/models/PropertyApiNameSelector.md new file mode 100644 index 000000000..dd0ae8ad4 --- /dev/null +++ b/docs/v2/Ontologies/models/PropertyApiNameSelector.md @@ -0,0 +1,12 @@ +# PropertyApiNameSelector + +A property api name that references properties to query on. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**api_name** | PropertyApiName | Yes | | +**type** | Literal["property"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/PropertyBooleanFormattingRule.md b/docs/v2/Ontologies/models/PropertyBooleanFormattingRule.md new file mode 100644 index 000000000..964533a4e --- /dev/null +++ b/docs/v2/Ontologies/models/PropertyBooleanFormattingRule.md @@ -0,0 +1,13 @@ +# PropertyBooleanFormattingRule + +Formatting configuration for boolean property values. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**value_if_true** | str | Yes | Value to display if this boolean is true | +**value_if_false** | str | Yes | Value to display if this boolean is false | +**type** | Literal["boolean"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/PropertyDateFormattingRule.md b/docs/v2/Ontologies/models/PropertyDateFormattingRule.md new file mode 100644 index 000000000..c37f44ff0 --- /dev/null +++ b/docs/v2/Ontologies/models/PropertyDateFormattingRule.md @@ -0,0 +1,12 @@ +# PropertyDateFormattingRule + +Formatting configuration for date property values. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**format** | DatetimeFormat | Yes | | +**type** | Literal["date"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/PropertyFilter.md b/docs/v2/Ontologies/models/PropertyFilter.md new file mode 100644 index 000000000..f2c612bd1 --- /dev/null +++ b/docs/v2/Ontologies/models/PropertyFilter.md @@ -0,0 +1,36 @@ +# PropertyFilter + +Represents a filter used on properties. + +Endpoints that accept this supports optional parameters that have the form: +`properties.{propertyApiName}.{propertyFilter}={propertyValueEscapedString}` to filter the returned objects. +For instance, you may use `properties.firstName.eq=John` to find objects that contain a property called +"firstName" that has the exact value of "John". + +The following are a list of supported property filters: + +- `properties.{propertyApiName}.contains` - supported on arrays and can be used to filter array properties + that have at least one of the provided values. If multiple query parameters are provided, then objects + that have any of the given values for the specified property will be matched. +- `properties.{propertyApiName}.eq` - used to filter objects that have the exact value for the provided + property. If multiple query parameters are provided, then objects that have any of the given values + will be matched. For instance, if the user provides a request by doing + `?properties.firstName.eq=John&properties.firstName.eq=Anna`, then objects that have a firstName property + of either John or Anna will be matched. This filter is supported on all property types except Arrays. +- `properties.{propertyApiName}.neq` - used to filter objects that do not have the provided property values. + Similar to the `eq` filter, if multiple values are provided, then objects that have any of the given values + will be excluded from the result. +- `properties.{propertyApiName}.lt`, `properties.{propertyApiName}.lte`, `properties.{propertyApiName}.gt` + `properties.{propertyApiName}.gte` - represent less than, less than or equal to, greater than, and greater + than or equal to respectively. These are supported on date, timestamp, byte, integer, long, double, decimal. +- `properties.{propertyApiName}.isNull` - used to filter objects where the provided property is (or is not) null. + This filter is supported on all property types. + + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/PropertyId.md b/docs/v2/Ontologies/models/PropertyId.md new file mode 100644 index 000000000..c3fa1f7ab --- /dev/null +++ b/docs/v2/Ontologies/models/PropertyId.md @@ -0,0 +1,13 @@ +# PropertyId + +The immutable ID of a property. Property IDs are only used to identify properties in the **Ontology Manager** +application and assign them API names. In every other case, API names should be used instead of property IDs. + + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/PropertyIdentifier.md b/docs/v2/Ontologies/models/PropertyIdentifier.md new file mode 100644 index 000000000..ed2eba702 --- /dev/null +++ b/docs/v2/Ontologies/models/PropertyIdentifier.md @@ -0,0 +1,17 @@ +# PropertyIdentifier + +An identifier used to select properties or struct fields. + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +PropertyApiNameSelector | property +StructFieldSelector | structField +PropertyWithLoadLevelSelector | propertyWithLoadLevel + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/PropertyImplementation.md b/docs/v2/Ontologies/models/PropertyImplementation.md new file mode 100644 index 000000000..faf381f87 --- /dev/null +++ b/docs/v2/Ontologies/models/PropertyImplementation.md @@ -0,0 +1,12 @@ +# PropertyImplementation + +PropertyImplementation + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**property_api_name** | PropertyApiName | Yes | | +**type** | Literal["property"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/PropertyKnownTypeFormattingRule.md b/docs/v2/Ontologies/models/PropertyKnownTypeFormattingRule.md new file mode 100644 index 000000000..6ddc0c87e --- /dev/null +++ b/docs/v2/Ontologies/models/PropertyKnownTypeFormattingRule.md @@ -0,0 +1,12 @@ +# PropertyKnownTypeFormattingRule + +Formatting configuration for known Foundry types. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**known_type** | KnownType | Yes | | +**type** | Literal["knownType"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/PropertyLoadLevel.md b/docs/v2/Ontologies/models/PropertyLoadLevel.md new file mode 100644 index 000000000..ae8ce4d3c --- /dev/null +++ b/docs/v2/Ontologies/models/PropertyLoadLevel.md @@ -0,0 +1,21 @@ +# PropertyLoadLevel + +The load level of the property: +- APPLY_REDUCERS: Returns a single value of an array as configured in the ontology. +- EXTRACT_MAIN_VALUE: Returns the main value of a struct as configured in the ontology. +- APPLY_REDUCERS_AND_EXTRACT_MAIN_VALUE: Performs both to return the reduced main value. + + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +ApplyReducersAndExtractMainValueLoadLevel | applyReducersAndExtractMainValue +ApplyReducersLoadLevel | applyReducers +ExtractMainValueLoadLevel | extractMainValue + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/PropertyNumberFormattingRule.md b/docs/v2/Ontologies/models/PropertyNumberFormattingRule.md new file mode 100644 index 000000000..20b28019c --- /dev/null +++ b/docs/v2/Ontologies/models/PropertyNumberFormattingRule.md @@ -0,0 +1,12 @@ +# PropertyNumberFormattingRule + +Wrapper for numeric formatting options. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**number_type** | PropertyNumberFormattingRuleType | Yes | | +**type** | Literal["number"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/PropertyNumberFormattingRuleType.md b/docs/v2/Ontologies/models/PropertyNumberFormattingRuleType.md new file mode 100644 index 000000000..16bac7c1e --- /dev/null +++ b/docs/v2/Ontologies/models/PropertyNumberFormattingRuleType.md @@ -0,0 +1,23 @@ +# PropertyNumberFormattingRuleType + +PropertyNumberFormattingRuleType + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +NumberFormatStandard | standard +NumberFormatDuration | duration +NumberFormatFixedValues | fixedValues +NumberFormatAffix | affix +NumberFormatScale | scale +NumberFormatCurrency | currency +NumberFormatStandardUnit | standardUnit +NumberFormatCustomUnit | customUnit +NumberFormatRatio | ratio + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/PropertyOrStructFieldOfPropertyImplementation.md b/docs/v2/Ontologies/models/PropertyOrStructFieldOfPropertyImplementation.md new file mode 100644 index 000000000..fbd0a22f2 --- /dev/null +++ b/docs/v2/Ontologies/models/PropertyOrStructFieldOfPropertyImplementation.md @@ -0,0 +1,16 @@ +# PropertyOrStructFieldOfPropertyImplementation + +PropertyOrStructFieldOfPropertyImplementation + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +StructFieldOfPropertyImplementation | structFieldOfProperty +PropertyImplementation | property + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/PropertyTimestampFormattingRule.md b/docs/v2/Ontologies/models/PropertyTimestampFormattingRule.md new file mode 100644 index 000000000..6b26f25dc --- /dev/null +++ b/docs/v2/Ontologies/models/PropertyTimestampFormattingRule.md @@ -0,0 +1,13 @@ +# PropertyTimestampFormattingRule + +Formatting configuration for timestamp property values. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**format** | DatetimeFormat | Yes | | +**display_timezone** | DatetimeTimezone | Yes | | +**type** | Literal["timestamp"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/PropertyTypeApiName.md b/docs/v2/Ontologies/models/PropertyTypeApiName.md new file mode 100644 index 000000000..bd17bb1ad --- /dev/null +++ b/docs/v2/Ontologies/models/PropertyTypeApiName.md @@ -0,0 +1,11 @@ +# PropertyTypeApiName + +PropertyTypeApiName + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/PropertyTypeReference.md b/docs/v2/Ontologies/models/PropertyTypeReference.md new file mode 100644 index 000000000..c3f9a6be8 --- /dev/null +++ b/docs/v2/Ontologies/models/PropertyTypeReference.md @@ -0,0 +1,12 @@ +# PropertyTypeReference + +PropertyTypeReference + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**property_api_name** | str | Yes | The API name of the PropertyType | +**type** | Literal["propertyType"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/PropertyTypeReferenceOrStringConstant.md b/docs/v2/Ontologies/models/PropertyTypeReferenceOrStringConstant.md new file mode 100644 index 000000000..5b813c01b --- /dev/null +++ b/docs/v2/Ontologies/models/PropertyTypeReferenceOrStringConstant.md @@ -0,0 +1,16 @@ +# PropertyTypeReferenceOrStringConstant + +PropertyTypeReferenceOrStringConstant + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +StringConstant | constant +PropertyTypeReference | propertyType + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/PropertyTypeRid.md b/docs/v2/Ontologies/models/PropertyTypeRid.md new file mode 100644 index 000000000..116c24440 --- /dev/null +++ b/docs/v2/Ontologies/models/PropertyTypeRid.md @@ -0,0 +1,11 @@ +# PropertyTypeRid + +PropertyTypeRid + +## Type +```python +RID +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/PropertyTypeStatus.md b/docs/v2/Ontologies/models/PropertyTypeStatus.md new file mode 100644 index 000000000..19ea29506 --- /dev/null +++ b/docs/v2/Ontologies/models/PropertyTypeStatus.md @@ -0,0 +1,19 @@ +# PropertyTypeStatus + +The status to indicate whether the PropertyType is either Experimental, Active, Deprecated, or Example. + + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +DeprecatedPropertyTypeStatus | deprecated +ActivePropertyTypeStatus | active +ExperimentalPropertyTypeStatus | experimental +ExamplePropertyTypeStatus | example + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/PropertyTypeVisibility.md b/docs/v2/Ontologies/models/PropertyTypeVisibility.md new file mode 100644 index 000000000..8d931f612 --- /dev/null +++ b/docs/v2/Ontologies/models/PropertyTypeVisibility.md @@ -0,0 +1,12 @@ +# PropertyTypeVisibility + +PropertyTypeVisibility + +| **Value** | +| --------- | +| `"NORMAL"` | +| `"PROMINENT"` | +| `"HIDDEN"` | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/PropertyV2.md b/docs/v2/Ontologies/models/PropertyV2.md new file mode 100644 index 000000000..5bbb4c3ac --- /dev/null +++ b/docs/v2/Ontologies/models/PropertyV2.md @@ -0,0 +1,18 @@ +# PropertyV2 + +Details about some property of an object. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**description** | Optional[str] | No | | +**display_name** | Optional[DisplayName] | No | | +**data_type** | ObjectPropertyType | Yes | | +**rid** | PropertyTypeRid | Yes | | +**status** | Optional[PropertyTypeStatus] | No | | +**visibility** | Optional[PropertyTypeVisibility] | No | | +**value_type_api_name** | Optional[ValueTypeApiName] | No | | +**value_formatting** | Optional[PropertyValueFormattingRule] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/PropertyValue.md b/docs/v2/Ontologies/models/PropertyValue.md new file mode 100644 index 000000000..cb86253ee --- /dev/null +++ b/docs/v2/Ontologies/models/PropertyValue.md @@ -0,0 +1,37 @@ +# PropertyValue + +Represents the value of a property in the following format. + +| Type | JSON encoding | Example | +|---------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------|----------------------------------------------------------------------------------------------------| +| Array | array | `["alpha", "bravo", "charlie"]` | +| [Attachment](https://palantir.com/docs/foundry/api/v2/ontologies-v2-resources/attachment-properties/attachment-property-basics/) | JSON encoded `AttachmentProperty` object | `{"rid":"ri.blobster.main.attachment.2f944bae-5851-4204-8615-920c969a9f2e"}` | +| Boolean | boolean | `true` | +| Byte | number | `31` | +| CipherText | string | `"CIPHER::ri.bellaso.main.cipher-channel.e414ab9e-b606-499a-a0e1-844fa296ba7e::unzjs3VifsTxuIpf1fH1CJ7OaPBr2bzMMdozPaZJtCii8vVG60yXIEmzoOJaEl9mfFFe::CIPHER"` | +| Date | ISO 8601 extended local date string | `"2021-05-01"` | +| Decimal | string | `"2.718281828"` | +| Double | number | `3.14159265` | +| Float | number | `3.14159265` | +| GeoPoint | geojson | `{"type":"Point","coordinates":[102.0,0.5]}` | +| GeoShape | geojson | `{"type":"LineString","coordinates":[[102.0,0.0],[103.0,1.0],[104.0,0.0],[105.0,1.0]]}` | +| Integer | number | `238940` | +| Long | string | `"58319870951433"` | +| [MediaReference](https://palantir.com/docs/foundry/api/v2/ontologies-v2-resources/media-reference-properties/media-reference-property-basics/)| JSON encoded `MediaReference` object | `{"mimeType":"application/pdf","reference":{"type":"mediaSetViewItem","mediaSetViewItem":{"mediaSetRid":"ri.mio.main.media-set.4153d42f-ca4b-4e42-8ca5-8e6aa7edb642","mediaSetViewRid":"ri.mio.main.view.82a798ad-d637-4595-acc6-987bcf16629b","mediaItemRid":"ri.mio.main.media-item.001ec98b-1620-4814-9e17-8e9c4e536225"}}}` | +| Short | number | `8739` | +| String | string | `"Call me Ishmael"` | +| Struct | JSON object of struct field API name -> value | {"firstName": "Alex", "lastName": "Karp"} | +| Timestamp | ISO 8601 extended offset date-time string in UTC zone | `"2021-01-04T05:00:00Z"` | +| [Timeseries](https://palantir.com/docs/foundry/api/v2/ontologies-v2-resources/time-series-properties/time-series-property-basics/) | JSON encoded `TimeseriesProperty` object or seriesId string | `{"seriesId": "wellPressureSeriesId", "syncRid": ri.time-series-catalog.main.sync.04f5ac1f-91bf-44f9-a51f-4f34e06e42df"}` or `{"templateRid": "ri.codex-emu.main.template.367cac64-e53b-4653-b111-f61856a63df9", "templateVersion": "0.0.0"}` or `"wellPressureSeriesId"`| | +| Vector | array | `[0.1, 0.3, 0.02, 0.05 , 0.8, 0.4]` | + +Note that for backwards compatibility, the Boolean, Byte, Double, Float, Integer, and Short types can also be encoded as JSON strings. + + +## Type +```python +Any +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/PropertyValueEscapedString.md b/docs/v2/Ontologies/models/PropertyValueEscapedString.md new file mode 100644 index 000000000..db793a387 --- /dev/null +++ b/docs/v2/Ontologies/models/PropertyValueEscapedString.md @@ -0,0 +1,11 @@ +# PropertyValueEscapedString + +Represents the value of a property in string format. This is used in URL parameters. + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/PropertyValueFormattingRule.md b/docs/v2/Ontologies/models/PropertyValueFormattingRule.md new file mode 100644 index 000000000..f3a2837db --- /dev/null +++ b/docs/v2/Ontologies/models/PropertyValueFormattingRule.md @@ -0,0 +1,28 @@ +# PropertyValueFormattingRule + +This feature is experimental and may change in a future release. +Comprehensive formatting configuration for displaying property values in user interfaces. +Supports different value types including numbers, dates, timestamps, booleans, and known Foundry types. + +Each formatter type provides specific options tailored to that data type: +- Numbers: Support for percentages, currencies, units, scaling, and custom formatting +- Dates/Timestamps: Localized and custom formatting patterns +- Booleans: Custom true/false display text +- Known types: Special formatting for Foundry-specific identifiers + + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +PropertyDateFormattingRule | date +PropertyNumberFormattingRule | number +PropertyBooleanFormattingRule | boolean +PropertyKnownTypeFormattingRule | knownType +PropertyTimestampFormattingRule | timestamp + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/PropertyWithLoadLevelSelector.md b/docs/v2/Ontologies/models/PropertyWithLoadLevelSelector.md new file mode 100644 index 000000000..bfd6cf506 --- /dev/null +++ b/docs/v2/Ontologies/models/PropertyWithLoadLevelSelector.md @@ -0,0 +1,16 @@ +# PropertyWithLoadLevelSelector + +A combination of a property identifier and the load level to apply to the property. You can select a reduced +value for arrays and the main value for structs. If the provided load level cannot be applied to the property +type, then it will be ignored. This selector is experimental and may not work in filters or sorts. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**property_identifier** | PropertyIdentifier | Yes | | +**load_level** | PropertyLoadLevel | Yes | | +**type** | Literal["propertyWithLoadLevel"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/QueryAggregation.md b/docs/v2/Ontologies/models/QueryAggregation.md new file mode 100644 index 000000000..903b9dd76 --- /dev/null +++ b/docs/v2/Ontologies/models/QueryAggregation.md @@ -0,0 +1,12 @@ +# QueryAggregation + +QueryAggregation + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**key** | Any | Yes | | +**value** | Any | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/QueryAggregationKeyType.md b/docs/v2/Ontologies/models/QueryAggregationKeyType.md new file mode 100644 index 000000000..af8af64a8 --- /dev/null +++ b/docs/v2/Ontologies/models/QueryAggregationKeyType.md @@ -0,0 +1,22 @@ +# QueryAggregationKeyType + +A union of all the types supported by query aggregation keys. + + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +DateType | date +BooleanType | boolean +StringType | string +DoubleType | double +QueryAggregationRangeType | range +IntegerType | integer +TimestampType | timestamp + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/QueryAggregationRangeSubType.md b/docs/v2/Ontologies/models/QueryAggregationRangeSubType.md new file mode 100644 index 000000000..b2b007348 --- /dev/null +++ b/docs/v2/Ontologies/models/QueryAggregationRangeSubType.md @@ -0,0 +1,19 @@ +# QueryAggregationRangeSubType + +A union of all the types supported by query aggregation ranges. + + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +DateType | date +DoubleType | double +IntegerType | integer +TimestampType | timestamp + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/QueryAggregationRangeType.md b/docs/v2/Ontologies/models/QueryAggregationRangeType.md new file mode 100644 index 000000000..8f7de1558 --- /dev/null +++ b/docs/v2/Ontologies/models/QueryAggregationRangeType.md @@ -0,0 +1,12 @@ +# QueryAggregationRangeType + +QueryAggregationRangeType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**sub_type** | QueryAggregationRangeSubType | Yes | | +**type** | Literal["range"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/QueryAggregationValueType.md b/docs/v2/Ontologies/models/QueryAggregationValueType.md new file mode 100644 index 000000000..7802d4da2 --- /dev/null +++ b/docs/v2/Ontologies/models/QueryAggregationValueType.md @@ -0,0 +1,18 @@ +# QueryAggregationValueType + +A union of all the types supported by query aggregation keys. + + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +DateType | date +DoubleType | double +TimestampType | timestamp + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/QueryApiName.md b/docs/v2/Ontologies/models/QueryApiName.md new file mode 100644 index 000000000..f071cbf16 --- /dev/null +++ b/docs/v2/Ontologies/models/QueryApiName.md @@ -0,0 +1,12 @@ +# QueryApiName + +The name of the Query in the API. + + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/QueryArrayType.md b/docs/v2/Ontologies/models/QueryArrayType.md new file mode 100644 index 000000000..ef02cc331 --- /dev/null +++ b/docs/v2/Ontologies/models/QueryArrayType.md @@ -0,0 +1,12 @@ +# QueryArrayType + +QueryArrayType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**sub_type** | QueryDataType | Yes | | +**type** | Literal["array"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/QueryDataType.md b/docs/v2/Ontologies/models/QueryDataType.md new file mode 100644 index 000000000..3877d5830 --- /dev/null +++ b/docs/v2/Ontologies/models/QueryDataType.md @@ -0,0 +1,37 @@ +# QueryDataType + +A union of all the types supported by Ontology Query parameters or outputs. + + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +DateType | date +OntologyInterfaceObjectType | interfaceObject +QueryStructType | struct +QuerySetType | set +StringType | string +EntrySetType | entrySet +DoubleType | double +IntegerType | integer +ThreeDimensionalAggregation | threeDimensionalAggregation +QueryUnionType | union +FloatType | float +LongType | long +BooleanType | boolean +UnsupportedType | unsupported +AttachmentType | attachment +NullType | null +QueryArrayType | array +OntologyObjectSetType | objectSet +TwoDimensionalAggregation | twoDimensionalAggregation +OntologyInterfaceObjectSetType | interfaceObjectSet +OntologyObjectType | object +TimestampType | timestamp + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/QueryParameterV2.md b/docs/v2/Ontologies/models/QueryParameterV2.md new file mode 100644 index 000000000..9b1abb881 --- /dev/null +++ b/docs/v2/Ontologies/models/QueryParameterV2.md @@ -0,0 +1,12 @@ +# QueryParameterV2 + +Details about a parameter of a query. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**description** | Optional[str] | No | | +**data_type** | QueryDataType | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/QueryRuntimeErrorParameter.md b/docs/v2/Ontologies/models/QueryRuntimeErrorParameter.md new file mode 100644 index 000000000..09eb0af3d --- /dev/null +++ b/docs/v2/Ontologies/models/QueryRuntimeErrorParameter.md @@ -0,0 +1,11 @@ +# QueryRuntimeErrorParameter + +QueryRuntimeErrorParameter + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/QuerySetType.md b/docs/v2/Ontologies/models/QuerySetType.md new file mode 100644 index 000000000..786ad8345 --- /dev/null +++ b/docs/v2/Ontologies/models/QuerySetType.md @@ -0,0 +1,12 @@ +# QuerySetType + +QuerySetType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**sub_type** | QueryDataType | Yes | | +**type** | Literal["set"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/QueryStructField.md b/docs/v2/Ontologies/models/QueryStructField.md new file mode 100644 index 000000000..0e7bc858d --- /dev/null +++ b/docs/v2/Ontologies/models/QueryStructField.md @@ -0,0 +1,12 @@ +# QueryStructField + +QueryStructField + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**name** | StructFieldName | Yes | | +**field_type** | QueryDataType | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/QueryStructType.md b/docs/v2/Ontologies/models/QueryStructType.md new file mode 100644 index 000000000..9ccbb0860 --- /dev/null +++ b/docs/v2/Ontologies/models/QueryStructType.md @@ -0,0 +1,12 @@ +# QueryStructType + +QueryStructType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**fields** | List[QueryStructField] | Yes | | +**type** | Literal["struct"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/QueryThreeDimensionalAggregation.md b/docs/v2/Ontologies/models/QueryThreeDimensionalAggregation.md new file mode 100644 index 000000000..2b1387a64 --- /dev/null +++ b/docs/v2/Ontologies/models/QueryThreeDimensionalAggregation.md @@ -0,0 +1,11 @@ +# QueryThreeDimensionalAggregation + +QueryThreeDimensionalAggregation + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**groups** | List[NestedQueryAggregation] | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/QueryTwoDimensionalAggregation.md b/docs/v2/Ontologies/models/QueryTwoDimensionalAggregation.md new file mode 100644 index 000000000..7023537bc --- /dev/null +++ b/docs/v2/Ontologies/models/QueryTwoDimensionalAggregation.md @@ -0,0 +1,11 @@ +# QueryTwoDimensionalAggregation + +QueryTwoDimensionalAggregation + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**groups** | List[QueryAggregation] | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/QueryTypeV2.md b/docs/v2/Ontologies/models/QueryTypeV2.md new file mode 100644 index 000000000..8ee80ba6b --- /dev/null +++ b/docs/v2/Ontologies/models/QueryTypeV2.md @@ -0,0 +1,17 @@ +# QueryTypeV2 + +Represents a query type in the Ontology. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**api_name** | QueryApiName | Yes | | +**description** | Optional[str] | No | | +**display_name** | Optional[DisplayName] | No | | +**parameters** | Dict[ParameterId, QueryParameterV2] | Yes | | +**output** | QueryDataType | Yes | | +**rid** | FunctionRid | Yes | | +**version** | FunctionVersion | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/QueryUnionType.md b/docs/v2/Ontologies/models/QueryUnionType.md new file mode 100644 index 000000000..a1b15ebbf --- /dev/null +++ b/docs/v2/Ontologies/models/QueryUnionType.md @@ -0,0 +1,12 @@ +# QueryUnionType + +QueryUnionType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**union_types** | List[QueryDataType] | Yes | | +**type** | Literal["union"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/RangeConstraint.md b/docs/v2/Ontologies/models/RangeConstraint.md new file mode 100644 index 000000000..85b59fe75 --- /dev/null +++ b/docs/v2/Ontologies/models/RangeConstraint.md @@ -0,0 +1,16 @@ +# RangeConstraint + +The parameter value must be within the defined range. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**lt** | Optional[Any] | No | Less than | +**lte** | Optional[Any] | No | Less than or equal | +**gt** | Optional[Any] | No | Greater than | +**gte** | Optional[Any] | No | Greater than or equal | +**type** | Literal["range"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/RangesConstraint.md b/docs/v2/Ontologies/models/RangesConstraint.md new file mode 100644 index 000000000..a0809a9aa --- /dev/null +++ b/docs/v2/Ontologies/models/RangesConstraint.md @@ -0,0 +1,13 @@ +# RangesConstraint + +RangesConstraint + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**minimum_value** | Optional[PropertyValue] | No | | +**maximum_value** | Optional[PropertyValue] | No | | +**type** | Literal["range"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/RegexConstraint.md b/docs/v2/Ontologies/models/RegexConstraint.md new file mode 100644 index 000000000..e7b88446b --- /dev/null +++ b/docs/v2/Ontologies/models/RegexConstraint.md @@ -0,0 +1,13 @@ +# RegexConstraint + +RegexConstraint + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**pattern** | str | Yes | | +**partial_match** | bool | Yes | | +**type** | Literal["regex"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/RegexQuery.md b/docs/v2/Ontologies/models/RegexQuery.md new file mode 100644 index 000000000..e84a21d89 --- /dev/null +++ b/docs/v2/Ontologies/models/RegexQuery.md @@ -0,0 +1,17 @@ +# RegexQuery + +Returns objects where the specified field matches the regex pattern provided. This applies to the non-analyzed +form of text fields and supports standard regex syntax of dot (.), star(*) and question mark(?). +Either `field` or `propertyIdentifier` can be supplied, but not both. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**field** | Optional[PropertyApiName] | No | | +**property_identifier** | Optional[PropertyIdentifier] | No | | +**value** | str | Yes | | +**type** | Literal["regex"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/RelativeDateRangeBound.md b/docs/v2/Ontologies/models/RelativeDateRangeBound.md new file mode 100644 index 000000000..2c1a11873 --- /dev/null +++ b/docs/v2/Ontologies/models/RelativeDateRangeBound.md @@ -0,0 +1,11 @@ +# RelativeDateRangeBound + +Specifies a bound for a relative date range query. + +## Type +```python +RelativePointInTime +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/RelativeDateRangeQuery.md b/docs/v2/Ontologies/models/RelativeDateRangeQuery.md new file mode 100644 index 000000000..d773f6a28 --- /dev/null +++ b/docs/v2/Ontologies/models/RelativeDateRangeQuery.md @@ -0,0 +1,18 @@ +# RelativeDateRangeQuery + +Returns objects where the specified date or timestamp property falls within a relative date range. +The bounds are calculated relative to query execution time and rounded to midnight in the specified timezone. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**field** | Optional[PropertyApiName] | No | The property API name to filter on (either field or propertyIdentifier must be provided). | +**property_identifier** | Optional[PropertyIdentifier] | No | The property identifier to filter on (either field or propertyIdentifier must be provided). | +**relative_start_time** | Optional[RelativeDateRangeBound] | No | The lower bound relative to query time (inclusive). Negative values go into the past. For example, { value: -7, timeUnit: DAY } means 7 days ago. | +**relative_end_time** | Optional[RelativeDateRangeBound] | No | The upper bound relative to query time (exclusive). Negative values go into the past. For example, { value: 1, timeUnit: MONTH } means the start of next month. | +**time_zone_id** | str | Yes | Time zone ID for midnight calculation (e.g., "America/New_York", "Europe/London", "Etc/UTC"). See https://en.wikipedia.org/wiki/List_of_tz_database_time_zones for valid values. | +**type** | Literal["relativeDateRange"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/RelativePointInTime.md b/docs/v2/Ontologies/models/RelativePointInTime.md new file mode 100644 index 000000000..c81f00b53 --- /dev/null +++ b/docs/v2/Ontologies/models/RelativePointInTime.md @@ -0,0 +1,13 @@ +# RelativePointInTime + +A point in time specified relative to query execution time. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**value** | int | Yes | The numeric value of the time offset. Negative values indicate the past, positive values the future. | +**time_unit** | RelativeTimeUnit | Yes | The unit of time for the value. | +**type** | Literal["relativePoint"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/RelativeTime.md b/docs/v2/Ontologies/models/RelativeTime.md new file mode 100644 index 000000000..0cec25feb --- /dev/null +++ b/docs/v2/Ontologies/models/RelativeTime.md @@ -0,0 +1,14 @@ +# RelativeTime + +A relative time, such as "3 days before" or "2 hours after" the current moment. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**when** | RelativeTimeRelation | Yes | | +**value** | int | Yes | | +**unit** | RelativeTimeSeriesTimeUnit | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/RelativeTimeRange.md b/docs/v2/Ontologies/models/RelativeTimeRange.md new file mode 100644 index 000000000..89bafc494 --- /dev/null +++ b/docs/v2/Ontologies/models/RelativeTimeRange.md @@ -0,0 +1,14 @@ +# RelativeTimeRange + +A relative time range for a time series query. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**start_time** | Optional[RelativeTime] | No | | +**end_time** | Optional[RelativeTime] | No | | +**type** | Literal["relative"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/RelativeTimeRelation.md b/docs/v2/Ontologies/models/RelativeTimeRelation.md new file mode 100644 index 000000000..d73c91c5f --- /dev/null +++ b/docs/v2/Ontologies/models/RelativeTimeRelation.md @@ -0,0 +1,11 @@ +# RelativeTimeRelation + +RelativeTimeRelation + +| **Value** | +| --------- | +| `"BEFORE"` | +| `"AFTER"` | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/RelativeTimeSeriesTimeUnit.md b/docs/v2/Ontologies/models/RelativeTimeSeriesTimeUnit.md new file mode 100644 index 000000000..668205359 --- /dev/null +++ b/docs/v2/Ontologies/models/RelativeTimeSeriesTimeUnit.md @@ -0,0 +1,17 @@ +# RelativeTimeSeriesTimeUnit + +RelativeTimeSeriesTimeUnit + +| **Value** | +| --------- | +| `"MILLISECONDS"` | +| `"SECONDS"` | +| `"MINUTES"` | +| `"HOURS"` | +| `"DAYS"` | +| `"WEEKS"` | +| `"MONTHS"` | +| `"YEARS"` | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/RelativeTimeUnit.md b/docs/v2/Ontologies/models/RelativeTimeUnit.md new file mode 100644 index 000000000..5be5750f9 --- /dev/null +++ b/docs/v2/Ontologies/models/RelativeTimeUnit.md @@ -0,0 +1,13 @@ +# RelativeTimeUnit + +Units for relative time calculations. + +| **Value** | +| --------- | +| `"DAY"` | +| `"WEEK"` | +| `"MONTH"` | +| `"YEAR"` | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ResolvedInterfacePropertyType.md b/docs/v2/Ontologies/models/ResolvedInterfacePropertyType.md new file mode 100644 index 000000000..deb1eb30c --- /dev/null +++ b/docs/v2/Ontologies/models/ResolvedInterfacePropertyType.md @@ -0,0 +1,20 @@ +# ResolvedInterfacePropertyType + +An interface property type with additional fields to indicate constraints that need to be satisfied by +implementing object property types. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**rid** | InterfacePropertyTypeRid | Yes | | +**api_name** | InterfacePropertyApiName | Yes | | +**display_name** | DisplayName | Yes | | +**description** | Optional[str] | No | A short text that describes the InterfacePropertyType. | +**data_type** | ObjectPropertyType | Yes | | +**value_type_api_name** | Optional[ValueTypeApiName] | No | | +**value_formatting** | Optional[PropertyValueFormattingRule] | No | | +**require_implementation** | bool | Yes | Whether each implementing object type must declare an implementation for this property. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ReturnEditsMode.md b/docs/v2/Ontologies/models/ReturnEditsMode.md new file mode 100644 index 000000000..9034e6c39 --- /dev/null +++ b/docs/v2/Ontologies/models/ReturnEditsMode.md @@ -0,0 +1,12 @@ +# ReturnEditsMode + +ReturnEditsMode + +| **Value** | +| --------- | +| `"ALL"` | +| `"ALL_V2_WITH_DELETIONS"` | +| `"NONE"` | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/RidConstraint.md b/docs/v2/Ontologies/models/RidConstraint.md new file mode 100644 index 000000000..a23657651 --- /dev/null +++ b/docs/v2/Ontologies/models/RidConstraint.md @@ -0,0 +1,11 @@ +# RidConstraint + +The string must be a valid RID (Resource Identifier). + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["rid"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/RollingAggregateWindowPoints.md b/docs/v2/Ontologies/models/RollingAggregateWindowPoints.md new file mode 100644 index 000000000..9b89efbf1 --- /dev/null +++ b/docs/v2/Ontologies/models/RollingAggregateWindowPoints.md @@ -0,0 +1,12 @@ +# RollingAggregateWindowPoints + +Number of points in each window. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**count** | int | Yes | | +**type** | Literal["pointsCount"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/SdkPackageName.md b/docs/v2/Ontologies/models/SdkPackageName.md new file mode 100644 index 000000000..9f5d5f9c4 --- /dev/null +++ b/docs/v2/Ontologies/models/SdkPackageName.md @@ -0,0 +1,11 @@ +# SdkPackageName + +SdkPackageName + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/SdkPackageRid.md b/docs/v2/Ontologies/models/SdkPackageRid.md new file mode 100644 index 000000000..c6c54858d --- /dev/null +++ b/docs/v2/Ontologies/models/SdkPackageRid.md @@ -0,0 +1,11 @@ +# SdkPackageRid + +SdkPackageRid + +## Type +```python +RID +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/SdkVersion.md b/docs/v2/Ontologies/models/SdkVersion.md new file mode 100644 index 000000000..a86eede8f --- /dev/null +++ b/docs/v2/Ontologies/models/SdkVersion.md @@ -0,0 +1,11 @@ +# SdkVersion + +SdkVersion + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/SearchJsonQueryV2.md b/docs/v2/Ontologies/models/SearchJsonQueryV2.md new file mode 100644 index 000000000..40876afb4 --- /dev/null +++ b/docs/v2/Ontologies/models/SearchJsonQueryV2.md @@ -0,0 +1,41 @@ +# SearchJsonQueryV2 + +SearchJsonQueryV2 + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +LtQueryV2 | lt +DoesNotIntersectBoundingBoxQuery | doesNotIntersectBoundingBox +RelativeDateRangeQuery | relativeDateRange +WildcardQuery | wildcard +WithinDistanceOfQuery | withinDistanceOf +WithinBoundingBoxQuery | withinBoundingBox +NotQueryV2 | not +IntersectsBoundingBoxQuery | intersectsBoundingBox +AndQueryV2 | and +ContainsAllTermsInOrderPrefixLastTerm | containsAllTermsInOrderPrefixLastTerm +GteQueryV2 | gte +ContainsAllTermsInOrderQuery | containsAllTermsInOrder +WithinPolygonQuery | withinPolygon +IntersectsPolygonQuery | intersectsPolygon +LteQueryV2 | lte +OrQueryV2 | or +InQuery | in +DoesNotIntersectPolygonQuery | doesNotIntersectPolygon +EqualsQueryV2 | eq +ContainsAllTermsQuery | containsAllTerms +GtQueryV2 | gt +ContainsQueryV2 | contains +RegexQuery | regex +IsNullQueryV2 | isNull +ContainsAnyTermQuery | containsAnyTerm +IntervalQuery | interval +StartsWithQuery | startsWith + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/SearchObjectsForInterfaceRequest.md b/docs/v2/Ontologies/models/SearchObjectsForInterfaceRequest.md new file mode 100644 index 000000000..4bd84aa3e --- /dev/null +++ b/docs/v2/Ontologies/models/SearchObjectsForInterfaceRequest.md @@ -0,0 +1,21 @@ +# SearchObjectsForInterfaceRequest + +SearchObjectsForInterfaceRequest + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**where** | Optional[SearchJsonQueryV2] | No | | +**order_by** | Optional[SearchOrderByV2] | No | | +**augmented_properties** | Dict[ObjectTypeApiName, List[PropertyApiName]] | Yes | A map from object type API name to a list of property type API names. For each returned object, if the object’s object type is a key in the map, then we augment the response for that object type with the list of properties specified in the value. | +**augmented_shared_property_types** | Dict[InterfaceTypeApiName, List[SharedPropertyTypeApiName]] | Yes | A map from interface type API name to a list of shared property type API names. For each returned object, if the object implements an interface that is a key in the map, then we augment the response for that object type with the list of properties specified in the value. | +**augmented_interface_property_types** | Dict[InterfaceTypeApiName, List[InterfacePropertyApiName]] | Yes | A map from interface type API name to a list of interface property type API names. For each returned object, if the object implements an interface that is a key in the map, then we augment the response for that object type with the list of properties specified in the value. | +**selected_shared_property_types** | List[SharedPropertyTypeApiName] | Yes | A list of shared property type API names of the interface type that should be included in the response. Omit this parameter to include all properties of the interface type in the response. | +**selected_interface_property_types** | List[InterfacePropertyApiName] | Yes | A list of interface property type API names of the interface type that should be included in the response. Omit this parameter to include all properties of the interface type in the response. | +**selected_object_types** | List[ObjectTypeApiName] | Yes | A list of object type API names that should be included in the response. If non-empty, object types that are not mentioned will not be included in the response even if they implement the specified interface. Omit the parameter to include all object types. | +**other_interface_types** | List[InterfaceTypeApiName] | Yes | A list of interface type API names. Object types must implement all the mentioned interfaces in order to be included in the response. | +**page_size** | Optional[PageSize] | No | | +**page_token** | Optional[PageToken] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/SearchObjectsRequestV2.md b/docs/v2/Ontologies/models/SearchObjectsRequestV2.md new file mode 100644 index 000000000..17bdf31f8 --- /dev/null +++ b/docs/v2/Ontologies/models/SearchObjectsRequestV2.md @@ -0,0 +1,18 @@ +# SearchObjectsRequestV2 + +SearchObjectsRequestV2 + +## Properties +| Name | Type | Required | Description | +| ------------ |------------------------------------|----------| ------------- | +**where** | Optional[SearchJsonQueryV2] | No | | +**order_by** | Optional[SearchOrderByV2] | No | | +**page_size** | Optional[PageSize] | No | | +**page_token** | Optional[PageToken] | No | | +**select** | List[PropertyApiName] | Yes | The API names of the object type properties to include in the response. | +**select_v2** | Optional[List[PropertyIdentifier]] | No | The identifiers of the properties to include in the response. Only selectV2 or select should be populated, but not both. | +**exclude_rid** | Optional[bool] | No | A flag to exclude the retrieval of the `__rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2. | +**snapshot** | Optional[bool] | No | A flag to use snapshot consistency when paging. Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. This defaults to false if not specified, which means you will always get the latest results. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/SearchObjectsResponseV2.md b/docs/v2/Ontologies/models/SearchObjectsResponseV2.md new file mode 100644 index 000000000..864e39be7 --- /dev/null +++ b/docs/v2/Ontologies/models/SearchObjectsResponseV2.md @@ -0,0 +1,13 @@ +# SearchObjectsResponseV2 + +SearchObjectsResponseV2 + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**data** | List[OntologyObjectV2] | Yes | | +**next_page_token** | Optional[PageToken] | No | | +**total_count** | TotalCount | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/SearchOrderByType.md b/docs/v2/Ontologies/models/SearchOrderByType.md new file mode 100644 index 000000000..1fd953efb --- /dev/null +++ b/docs/v2/Ontologies/models/SearchOrderByType.md @@ -0,0 +1,11 @@ +# SearchOrderByType + +SearchOrderByType + +| **Value** | +| --------- | +| `"fields"` | +| `"relevance"` | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/SearchOrderByV2.md b/docs/v2/Ontologies/models/SearchOrderByV2.md new file mode 100644 index 000000000..8e88e9aa9 --- /dev/null +++ b/docs/v2/Ontologies/models/SearchOrderByV2.md @@ -0,0 +1,12 @@ +# SearchOrderByV2 + +Specifies the ordering of search results by a field and an ordering direction or by relevance if scores are required in a nearestNeighbors query. By default `orderType` is set to `fields`. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**order_type** | Optional[SearchOrderByType] | No | | +**fields** | List[SearchOrderingV2] | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/SearchOrderingV2.md b/docs/v2/Ontologies/models/SearchOrderingV2.md new file mode 100644 index 000000000..443c56a2b --- /dev/null +++ b/docs/v2/Ontologies/models/SearchOrderingV2.md @@ -0,0 +1,12 @@ +# SearchOrderingV2 + +SearchOrderingV2 + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**field** | PropertyApiName | Yes | | +**direction** | Optional[str] | No | Specifies the ordering direction (can be either `asc` or `desc`) | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/SelectedPropertyApiName.md b/docs/v2/Ontologies/models/SelectedPropertyApiName.md new file mode 100644 index 000000000..d3481ef73 --- /dev/null +++ b/docs/v2/Ontologies/models/SelectedPropertyApiName.md @@ -0,0 +1,30 @@ +# SelectedPropertyApiName + +By default, whenever an object is requested, all of its properties are returned, except for properties of the +following types: +- Vector + +The response can be filtered to only include certain properties using the `properties` query parameter. Note +that ontology object set endpoints refer to this parameter as `select`. + +Properties to include can be specified in one of two ways. + +- A comma delimited list as the value for the `properties` query parameter + `properties={property1ApiName},{property2ApiName}` +- Multiple `properties` query parameters. + `properties={property1ApiName}&properties={property2ApiName}` + +The primary key of the object will always be returned even if it wasn't specified in the `properties` values. + +Unknown properties specified in the `properties` list will result in a `PropertiesNotFound` error. + +To find the API name for your property, use the `Get object type` endpoint or check the **Ontology Manager**. + + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/SelectedPropertyApproximateDistinctAggregation.md b/docs/v2/Ontologies/models/SelectedPropertyApproximateDistinctAggregation.md new file mode 100644 index 000000000..23abba5fe --- /dev/null +++ b/docs/v2/Ontologies/models/SelectedPropertyApproximateDistinctAggregation.md @@ -0,0 +1,12 @@ +# SelectedPropertyApproximateDistinctAggregation + +Computes an approximate number of distinct values for the provided field. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**selected_property_api_name** | PropertyApiName | Yes | | +**type** | Literal["approximateDistinct"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/SelectedPropertyApproximatePercentileAggregation.md b/docs/v2/Ontologies/models/SelectedPropertyApproximatePercentileAggregation.md new file mode 100644 index 000000000..9758e5696 --- /dev/null +++ b/docs/v2/Ontologies/models/SelectedPropertyApproximatePercentileAggregation.md @@ -0,0 +1,13 @@ +# SelectedPropertyApproximatePercentileAggregation + +Computes the approximate percentile value for the provided field. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**selected_property_api_name** | PropertyApiName | Yes | | +**approximate_percentile** | float | Yes | | +**type** | Literal["approximatePercentile"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/SelectedPropertyAvgAggregation.md b/docs/v2/Ontologies/models/SelectedPropertyAvgAggregation.md new file mode 100644 index 000000000..7f1ef726b --- /dev/null +++ b/docs/v2/Ontologies/models/SelectedPropertyAvgAggregation.md @@ -0,0 +1,12 @@ +# SelectedPropertyAvgAggregation + +Computes the average value for the provided field. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**selected_property_api_name** | PropertyApiName | Yes | | +**type** | Literal["avg"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/SelectedPropertyCollectListAggregation.md b/docs/v2/Ontologies/models/SelectedPropertyCollectListAggregation.md new file mode 100644 index 000000000..381a5cf9b --- /dev/null +++ b/docs/v2/Ontologies/models/SelectedPropertyCollectListAggregation.md @@ -0,0 +1,20 @@ +# SelectedPropertyCollectListAggregation + +Lists all values of a property up to the specified limit. The maximum supported limit is 100, by default. + +NOTE: A separate count aggregation should be used to determine the total count of values, to account for +a possible truncation of the returned list. + +Ignores objects for which a property is absent, so the returned list will contain non-null values only. +Returns an empty list when none of the objects have values for a provided property. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**selected_property_api_name** | PropertyApiName | Yes | | +**limit** | int | Yes | Maximum number of values to collect. The maximum supported limit is 100. | +**type** | Literal["collectList"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/SelectedPropertyCollectSetAggregation.md b/docs/v2/Ontologies/models/SelectedPropertyCollectSetAggregation.md new file mode 100644 index 000000000..f5702fa7e --- /dev/null +++ b/docs/v2/Ontologies/models/SelectedPropertyCollectSetAggregation.md @@ -0,0 +1,20 @@ +# SelectedPropertyCollectSetAggregation + +Lists all distinct values of a property up to the specified limit. The maximum supported limit is 100. + +NOTE: A separate cardinality / exactCardinality aggregation should be used to determine the total count of +values, to account for a possible truncation of the returned set. + +Ignores objects for which a property is absent, so the returned list will contain non-null values only. +Returns an empty list when none of the objects have values for a provided property. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**selected_property_api_name** | PropertyApiName | Yes | | +**limit** | int | Yes | Maximum number of values to collect. The maximum supported limit is 100. | +**type** | Literal["collectSet"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/SelectedPropertyCountAggregation.md b/docs/v2/Ontologies/models/SelectedPropertyCountAggregation.md new file mode 100644 index 000000000..0eb3c6c29 --- /dev/null +++ b/docs/v2/Ontologies/models/SelectedPropertyCountAggregation.md @@ -0,0 +1,11 @@ +# SelectedPropertyCountAggregation + +Computes the total count of objects. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["count"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/SelectedPropertyExactDistinctAggregation.md b/docs/v2/Ontologies/models/SelectedPropertyExactDistinctAggregation.md new file mode 100644 index 000000000..b9d29ff3a --- /dev/null +++ b/docs/v2/Ontologies/models/SelectedPropertyExactDistinctAggregation.md @@ -0,0 +1,13 @@ +# SelectedPropertyExactDistinctAggregation + +Computes an exact number of distinct values for the provided field. May be slower than an approximate distinct aggregation. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**selected_property_api_name** | PropertyApiName | Yes | | +**type** | Literal["exactDistinct"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/SelectedPropertyExpression.md b/docs/v2/Ontologies/models/SelectedPropertyExpression.md new file mode 100644 index 000000000..b18782364 --- /dev/null +++ b/docs/v2/Ontologies/models/SelectedPropertyExpression.md @@ -0,0 +1,13 @@ +# SelectedPropertyExpression + +Definition for a selected property over a MethodObjectSet. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**object_set** | MethodObjectSet | Yes | | +**operation** | SelectedPropertyOperation | Yes | | +**type** | Literal["selection"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/SelectedPropertyMaxAggregation.md b/docs/v2/Ontologies/models/SelectedPropertyMaxAggregation.md new file mode 100644 index 000000000..51c2e35b6 --- /dev/null +++ b/docs/v2/Ontologies/models/SelectedPropertyMaxAggregation.md @@ -0,0 +1,12 @@ +# SelectedPropertyMaxAggregation + +Computes the maximum value for the provided field. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**selected_property_api_name** | PropertyApiName | Yes | | +**type** | Literal["max"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/SelectedPropertyMinAggregation.md b/docs/v2/Ontologies/models/SelectedPropertyMinAggregation.md new file mode 100644 index 000000000..cca853876 --- /dev/null +++ b/docs/v2/Ontologies/models/SelectedPropertyMinAggregation.md @@ -0,0 +1,12 @@ +# SelectedPropertyMinAggregation + +Computes the minimum value for the provided field. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**selected_property_api_name** | PropertyApiName | Yes | | +**type** | Literal["min"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/SelectedPropertyOperation.md b/docs/v2/Ontologies/models/SelectedPropertyOperation.md new file mode 100644 index 000000000..9c84fbc16 --- /dev/null +++ b/docs/v2/Ontologies/models/SelectedPropertyOperation.md @@ -0,0 +1,26 @@ +# SelectedPropertyOperation + +Operation on a selected property, can be an aggregation function or retrieval of a single selected property + + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +SelectedPropertyApproximateDistinctAggregation | approximateDistinct +SelectedPropertyMinAggregation | min +SelectedPropertyAvgAggregation | avg +SelectedPropertyMaxAggregation | max +SelectedPropertyApproximatePercentileAggregation | approximatePercentile +GetSelectedPropertyOperation | get +SelectedPropertyCountAggregation | count +SelectedPropertySumAggregation | sum +SelectedPropertyCollectListAggregation | collectList +SelectedPropertyExactDistinctAggregation | exactDistinct +SelectedPropertyCollectSetAggregation | collectSet + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/SelectedPropertySumAggregation.md b/docs/v2/Ontologies/models/SelectedPropertySumAggregation.md new file mode 100644 index 000000000..97a0552bb --- /dev/null +++ b/docs/v2/Ontologies/models/SelectedPropertySumAggregation.md @@ -0,0 +1,12 @@ +# SelectedPropertySumAggregation + +Computes the sum of values for the provided field. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**selected_property_api_name** | PropertyApiName | Yes | | +**type** | Literal["sum"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/SharedPropertyType.md b/docs/v2/Ontologies/models/SharedPropertyType.md new file mode 100644 index 000000000..270d9b058 --- /dev/null +++ b/docs/v2/Ontologies/models/SharedPropertyType.md @@ -0,0 +1,17 @@ +# SharedPropertyType + +A property type that can be shared across object types. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**rid** | SharedPropertyTypeRid | Yes | | +**api_name** | SharedPropertyTypeApiName | Yes | | +**display_name** | DisplayName | Yes | | +**description** | Optional[str] | No | A short text that describes the SharedPropertyType. | +**data_type** | ObjectPropertyType | Yes | | +**value_type_api_name** | Optional[ValueTypeApiName] | No | | +**value_formatting** | Optional[PropertyValueFormattingRule] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/SharedPropertyTypeApiName.md b/docs/v2/Ontologies/models/SharedPropertyTypeApiName.md new file mode 100644 index 000000000..58b36f523 --- /dev/null +++ b/docs/v2/Ontologies/models/SharedPropertyTypeApiName.md @@ -0,0 +1,13 @@ +# SharedPropertyTypeApiName + +The name of the shared property type in the API in lowerCamelCase format. To find the API name for your +shared property type, use the `List shared property types` endpoint or check the **Ontology Manager**. + + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/SharedPropertyTypeRid.md b/docs/v2/Ontologies/models/SharedPropertyTypeRid.md new file mode 100644 index 000000000..ea853f6e3 --- /dev/null +++ b/docs/v2/Ontologies/models/SharedPropertyTypeRid.md @@ -0,0 +1,12 @@ +# SharedPropertyTypeRid + +The unique resource identifier of an shared property type, useful for interacting with other Foundry APIs. + + +## Type +```python +RID +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/StartsWithQuery.md b/docs/v2/Ontologies/models/StartsWithQuery.md new file mode 100644 index 000000000..d88eba1f1 --- /dev/null +++ b/docs/v2/Ontologies/models/StartsWithQuery.md @@ -0,0 +1,17 @@ +# StartsWithQuery + +Deprecated alias for `containsAllTermsInOrderPrefixLastTerm`, which is preferred because the name `startsWith` is misleading. +Returns objects where the specified field starts with the provided value. Allows you to specify a property to +query on by a variety of means. Either `field` or `propertyIdentifier` must be supplied, but not both. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**field** | Optional[PropertyApiName] | No | | +**property_identifier** | Optional[PropertyIdentifier] | No | | +**value** | str | Yes | | +**type** | Literal["startsWith"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/StaticArgument.md b/docs/v2/Ontologies/models/StaticArgument.md new file mode 100644 index 000000000..d90637147 --- /dev/null +++ b/docs/v2/Ontologies/models/StaticArgument.md @@ -0,0 +1,12 @@ +# StaticArgument + +Represents a static argument in a logic rule. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**value** | DataValue | Yes | | +**type** | Literal["staticValue"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/StreamTimeSeriesPointsRequest.md b/docs/v2/Ontologies/models/StreamTimeSeriesPointsRequest.md new file mode 100644 index 000000000..6d7b86f47 --- /dev/null +++ b/docs/v2/Ontologies/models/StreamTimeSeriesPointsRequest.md @@ -0,0 +1,12 @@ +# StreamTimeSeriesPointsRequest + +StreamTimeSeriesPointsRequest + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**range** | Optional[TimeRange] | No | | +**aggregate** | Optional[AggregateTimeSeries] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/StreamTimeSeriesValuesRequest.md b/docs/v2/Ontologies/models/StreamTimeSeriesValuesRequest.md new file mode 100644 index 000000000..61e3a69f8 --- /dev/null +++ b/docs/v2/Ontologies/models/StreamTimeSeriesValuesRequest.md @@ -0,0 +1,11 @@ +# StreamTimeSeriesValuesRequest + +StreamTimeSeriesValuesRequest + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**range** | Optional[TimeRange] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/StreamingOutputFormat.md b/docs/v2/Ontologies/models/StreamingOutputFormat.md new file mode 100644 index 000000000..f2cd8b958 --- /dev/null +++ b/docs/v2/Ontologies/models/StreamingOutputFormat.md @@ -0,0 +1,13 @@ +# StreamingOutputFormat + +Which format to serialize the binary stream in. +ARROW is more efficient for streaming a large sized response. + + +| **Value** | +| --------- | +| `"JSON"` | +| `"ARROW"` | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/StringConstant.md b/docs/v2/Ontologies/models/StringConstant.md new file mode 100644 index 000000000..b6e2b7bb3 --- /dev/null +++ b/docs/v2/Ontologies/models/StringConstant.md @@ -0,0 +1,12 @@ +# StringConstant + +StringConstant + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**value** | str | Yes | | +**type** | Literal["constant"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/StringLengthConstraint.md b/docs/v2/Ontologies/models/StringLengthConstraint.md new file mode 100644 index 000000000..f35990c67 --- /dev/null +++ b/docs/v2/Ontologies/models/StringLengthConstraint.md @@ -0,0 +1,17 @@ +# StringLengthConstraint + +The parameter value must have a length within the defined range. +*This range is always inclusive.* + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**lt** | Optional[Any] | No | Less than | +**lte** | Optional[Any] | No | Less than or equal | +**gt** | Optional[Any] | No | Greater than | +**gte** | Optional[Any] | No | Greater than or equal | +**type** | Literal["stringLength"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/StringRegexMatchConstraint.md b/docs/v2/Ontologies/models/StringRegexMatchConstraint.md new file mode 100644 index 000000000..efe8a0cfa --- /dev/null +++ b/docs/v2/Ontologies/models/StringRegexMatchConstraint.md @@ -0,0 +1,14 @@ +# StringRegexMatchConstraint + +The parameter value must match a predefined regular expression. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**regex** | str | Yes | The regular expression configured in the **Ontology Manager**. | +**configured_failure_message** | Optional[str] | No | The message indicating that the regular expression was not matched. This is configured per parameter in the **Ontology Manager**. | +**type** | Literal["stringRegexMatch"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/StructConstraint.md b/docs/v2/Ontologies/models/StructConstraint.md new file mode 100644 index 000000000..045d16513 --- /dev/null +++ b/docs/v2/Ontologies/models/StructConstraint.md @@ -0,0 +1,12 @@ +# StructConstraint + +StructConstraint + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**properties** | Dict[PropertyApiName, ValueTypeApiName] | Yes | A map of the properties of the struct type to the value type applied to that property. | +**type** | Literal["struct"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/StructEvaluatedConstraint.md b/docs/v2/Ontologies/models/StructEvaluatedConstraint.md new file mode 100644 index 000000000..c59bfe9e5 --- /dev/null +++ b/docs/v2/Ontologies/models/StructEvaluatedConstraint.md @@ -0,0 +1,12 @@ +# StructEvaluatedConstraint + +Represents the validity of a singleton struct parameter. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**struct_fields** | Dict[StructParameterFieldApiName, StructFieldEvaluationResult] | Yes | | +**type** | Literal["struct"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/StructFieldApiName.md b/docs/v2/Ontologies/models/StructFieldApiName.md new file mode 100644 index 000000000..3d5dfa135 --- /dev/null +++ b/docs/v2/Ontologies/models/StructFieldApiName.md @@ -0,0 +1,11 @@ +# StructFieldApiName + +The name of a struct field in the Ontology. + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/StructFieldArgument.md b/docs/v2/Ontologies/models/StructFieldArgument.md new file mode 100644 index 000000000..4d0d1d2b1 --- /dev/null +++ b/docs/v2/Ontologies/models/StructFieldArgument.md @@ -0,0 +1,17 @@ +# StructFieldArgument + +Represents an argument used for an individual struct field. + + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +StructListParameterFieldArgument | structListParameterFieldValue +StructParameterFieldArgument | structParameterFieldValue + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/StructFieldEvaluatedConstraint.md b/docs/v2/Ontologies/models/StructFieldEvaluatedConstraint.md new file mode 100644 index 000000000..28bfae3c0 --- /dev/null +++ b/docs/v2/Ontologies/models/StructFieldEvaluatedConstraint.md @@ -0,0 +1,32 @@ +# StructFieldEvaluatedConstraint + +A constraint that an action struct parameter field value must satisfy in order to be considered valid. +Constraints can be configured on fields of struct parameters in the **Ontology Manager**. +Applicable constraints are determined dynamically based on parameter inputs. +Parameter values are evaluated against the final set of constraints. + +The type of the constraint. +| Type | Description | +|-----------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| `oneOf` | The struct parameter field has a manually predefined set of options. | +| `range` | The struct parameter field value must be within the defined range. | +| `stringLength` | The struct parameter field value must have a length within the defined range. | +| `stringRegexMatch` | The struct parameter field value must match a predefined regular expression. | +| `objectQueryResult` | The struct parameter field value must be the primary key of an object found within an object set. | + + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +OneOfConstraint | oneOf +RangeConstraint | range +ObjectQueryResultConstraint | objectQueryResult +StringLengthConstraint | stringLength +StringRegexMatchConstraint | stringRegexMatch + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/StructFieldEvaluationResult.md b/docs/v2/Ontologies/models/StructFieldEvaluationResult.md new file mode 100644 index 000000000..184f41960 --- /dev/null +++ b/docs/v2/Ontologies/models/StructFieldEvaluationResult.md @@ -0,0 +1,13 @@ +# StructFieldEvaluationResult + +Represents the validity of a struct parameter's fields against the configured constraints. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**result** | ValidationResult | Yes | | +**evaluated_constraints** | List[StructFieldEvaluatedConstraint] | Yes | | +**required** | bool | Yes | Represents whether the parameter is a required input to the action. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/StructFieldOfPropertyImplementation.md b/docs/v2/Ontologies/models/StructFieldOfPropertyImplementation.md new file mode 100644 index 000000000..95c951400 --- /dev/null +++ b/docs/v2/Ontologies/models/StructFieldOfPropertyImplementation.md @@ -0,0 +1,13 @@ +# StructFieldOfPropertyImplementation + +StructFieldOfPropertyImplementation + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**property_api_name** | PropertyApiName | Yes | | +**struct_field_api_name** | StructFieldApiName | Yes | | +**type** | Literal["structFieldOfProperty"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/StructFieldSelector.md b/docs/v2/Ontologies/models/StructFieldSelector.md new file mode 100644 index 000000000..8a5b46b51 --- /dev/null +++ b/docs/v2/Ontologies/models/StructFieldSelector.md @@ -0,0 +1,16 @@ +# StructFieldSelector + +A combination of a property identifier and the load level to apply to the property. You can select a reduced +value for arrays and the main value for structs. If the provided load level cannot be applied to the property +type, then it will be ignored. This selector is experimental and may not work in filters or sorts. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**property_api_name** | PropertyApiName | Yes | | +**struct_field_api_name** | StructFieldApiName | Yes | | +**type** | Literal["structField"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/StructFieldType.md b/docs/v2/Ontologies/models/StructFieldType.md new file mode 100644 index 000000000..b017293ee --- /dev/null +++ b/docs/v2/Ontologies/models/StructFieldType.md @@ -0,0 +1,13 @@ +# StructFieldType + +StructFieldType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**api_name** | StructFieldApiName | Yes | | +**rid** | StructFieldTypeRid | Yes | | +**data_type** | ObjectPropertyType | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/StructFieldTypeRid.md b/docs/v2/Ontologies/models/StructFieldTypeRid.md new file mode 100644 index 000000000..fd888d31f --- /dev/null +++ b/docs/v2/Ontologies/models/StructFieldTypeRid.md @@ -0,0 +1,11 @@ +# StructFieldTypeRid + +The unique resource identifier of a struct field, useful for interacting with other Foundry APIs. + +## Type +```python +RID +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/StructListParameterFieldArgument.md b/docs/v2/Ontologies/models/StructListParameterFieldArgument.md new file mode 100644 index 000000000..26d93a037 --- /dev/null +++ b/docs/v2/Ontologies/models/StructListParameterFieldArgument.md @@ -0,0 +1,13 @@ +# StructListParameterFieldArgument + +Represents a struct list parameter field argument in a logic rule. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**parameter_id** | ParameterId | Yes | | +**struct_parameter_field_api_name** | StructParameterFieldApiName | Yes | | +**type** | Literal["structListParameterFieldValue"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/StructParameterFieldApiName.md b/docs/v2/Ontologies/models/StructParameterFieldApiName.md new file mode 100644 index 000000000..dfd7d293a --- /dev/null +++ b/docs/v2/Ontologies/models/StructParameterFieldApiName.md @@ -0,0 +1,12 @@ +# StructParameterFieldApiName + +The unique identifier of the struct parameter field. + + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/StructParameterFieldArgument.md b/docs/v2/Ontologies/models/StructParameterFieldArgument.md new file mode 100644 index 000000000..7d1c17364 --- /dev/null +++ b/docs/v2/Ontologies/models/StructParameterFieldArgument.md @@ -0,0 +1,13 @@ +# StructParameterFieldArgument + +Represents a struct parameter field argument in a logic rule. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**parameter_id** | ParameterId | Yes | | +**struct_parameter_field_api_name** | StructParameterFieldApiName | Yes | | +**type** | Literal["structParameterFieldValue"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/StructType.md b/docs/v2/Ontologies/models/StructType.md new file mode 100644 index 000000000..ab75e8fe2 --- /dev/null +++ b/docs/v2/Ontologies/models/StructType.md @@ -0,0 +1,13 @@ +# StructType + +StructType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**struct_field_types** | List[StructFieldType] | Yes | | +**main_value** | Optional[StructTypeMainValue] | No | | +**type** | Literal["struct"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/StructTypeMainValue.md b/docs/v2/Ontologies/models/StructTypeMainValue.md new file mode 100644 index 000000000..f18746b04 --- /dev/null +++ b/docs/v2/Ontologies/models/StructTypeMainValue.md @@ -0,0 +1,12 @@ +# StructTypeMainValue + +StructTypeMainValue + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**main_value_type** | ObjectPropertyType | Yes | | +**fields** | List[StructFieldApiName] | Yes | The fields which comprise the main value of the struct. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/SubmissionCriteriaEvaluation.md b/docs/v2/Ontologies/models/SubmissionCriteriaEvaluation.md new file mode 100644 index 000000000..66c833432 --- /dev/null +++ b/docs/v2/Ontologies/models/SubmissionCriteriaEvaluation.md @@ -0,0 +1,15 @@ +# SubmissionCriteriaEvaluation + +Contains the status of the **submission criteria**. +**Submission criteria** are the prerequisites that need to be satisfied before an Action can be applied. +These are configured in the **Ontology Manager**. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**configured_failure_message** | Optional[str] | No | The message indicating one of the **submission criteria** was not satisfied. This is configured per **submission criteria** in the **Ontology Manager**. | +**result** | ValidationResult | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/SubtractPropertyExpression.md b/docs/v2/Ontologies/models/SubtractPropertyExpression.md new file mode 100644 index 000000000..4f0754e43 --- /dev/null +++ b/docs/v2/Ontologies/models/SubtractPropertyExpression.md @@ -0,0 +1,14 @@ +# SubtractPropertyExpression + +Subtracts the right numeric value from the left numeric value. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**left** | DerivedPropertyDefinition | Yes | | +**right** | DerivedPropertyDefinition | Yes | | +**type** | Literal["subtract"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/SumAggregationV2.md b/docs/v2/Ontologies/models/SumAggregationV2.md new file mode 100644 index 000000000..99fa61936 --- /dev/null +++ b/docs/v2/Ontologies/models/SumAggregationV2.md @@ -0,0 +1,14 @@ +# SumAggregationV2 + +Computes the sum of values for the provided field. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**field** | PropertyApiName | Yes | | +**name** | Optional[AggregationMetricName] | No | | +**direction** | Optional[OrderByDirection] | No | | +**type** | Literal["sum"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/SyncApplyActionResponseV2.md b/docs/v2/Ontologies/models/SyncApplyActionResponseV2.md new file mode 100644 index 000000000..58e5884e7 --- /dev/null +++ b/docs/v2/Ontologies/models/SyncApplyActionResponseV2.md @@ -0,0 +1,12 @@ +# SyncApplyActionResponseV2 + +SyncApplyActionResponseV2 + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**validation** | Optional[ValidateActionResponseV2] | No | | +**edits** | Optional[ActionResults] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/SynchronousWebhookOutputArgument.md b/docs/v2/Ontologies/models/SynchronousWebhookOutputArgument.md new file mode 100644 index 000000000..bc4d3f6be --- /dev/null +++ b/docs/v2/Ontologies/models/SynchronousWebhookOutputArgument.md @@ -0,0 +1,12 @@ +# SynchronousWebhookOutputArgument + +Represents a synchronous webhook output argument in a logic rule. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**webhook_output_param_name** | str | Yes | The name of the webhook output parameter. | +**type** | Literal["synchronousWebhookOutput"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ThreeDimensionalAggregation.md b/docs/v2/Ontologies/models/ThreeDimensionalAggregation.md new file mode 100644 index 000000000..9fb4c0c8a --- /dev/null +++ b/docs/v2/Ontologies/models/ThreeDimensionalAggregation.md @@ -0,0 +1,13 @@ +# ThreeDimensionalAggregation + +ThreeDimensionalAggregation + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**key_type** | QueryAggregationKeyType | Yes | | +**value_type** | TwoDimensionalAggregation | Yes | | +**type** | Literal["threeDimensionalAggregation"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/TimeCodeFormat.md b/docs/v2/Ontologies/models/TimeCodeFormat.md new file mode 100644 index 000000000..3b9e4bcd2 --- /dev/null +++ b/docs/v2/Ontologies/models/TimeCodeFormat.md @@ -0,0 +1,11 @@ +# TimeCodeFormat + +Formats the duration in a timecode format. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["timecode"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/TimeRange.md b/docs/v2/Ontologies/models/TimeRange.md new file mode 100644 index 000000000..33f5b1e01 --- /dev/null +++ b/docs/v2/Ontologies/models/TimeRange.md @@ -0,0 +1,16 @@ +# TimeRange + +An absolute or relative range for a time series query. + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +AbsoluteTimeRange | absolute +RelativeTimeRange | relative + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/TimeSeriesAggregationMethod.md b/docs/v2/Ontologies/models/TimeSeriesAggregationMethod.md new file mode 100644 index 000000000..6e8f1d455 --- /dev/null +++ b/docs/v2/Ontologies/models/TimeSeriesAggregationMethod.md @@ -0,0 +1,21 @@ +# TimeSeriesAggregationMethod + +The aggregation function to use for aggregating time series data. + + +| **Value** | +| --------- | +| `"SUM"` | +| `"MEAN"` | +| `"STANDARD_DEVIATION"` | +| `"MAX"` | +| `"MIN"` | +| `"PERCENT_CHANGE"` | +| `"DIFFERENCE"` | +| `"PRODUCT"` | +| `"COUNT"` | +| `"FIRST"` | +| `"LAST"` | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/TimeSeriesAggregationStrategy.md b/docs/v2/Ontologies/models/TimeSeriesAggregationStrategy.md new file mode 100644 index 000000000..df29a155d --- /dev/null +++ b/docs/v2/Ontologies/models/TimeSeriesAggregationStrategy.md @@ -0,0 +1,21 @@ +# TimeSeriesAggregationStrategy + +CUMULATIVE aggregates all points up to the current point. +ROLLING aggregates all points in a rolling window whose size is either the specified number of points or +time duration. +PERIODIC aggregates all points in specified time windows. + + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +TimeSeriesRollingAggregate | rolling +TimeSeriesPeriodicAggregate | periodic +TimeSeriesCumulativeAggregate | cumulative + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/TimeSeriesCumulativeAggregate.md b/docs/v2/Ontologies/models/TimeSeriesCumulativeAggregate.md new file mode 100644 index 000000000..5078f8e9d --- /dev/null +++ b/docs/v2/Ontologies/models/TimeSeriesCumulativeAggregate.md @@ -0,0 +1,13 @@ +# TimeSeriesCumulativeAggregate + +The cumulative aggregate is calculated progressively for each point in the input time series, +considering all preceding points up to and including the current point. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["cumulative"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/TimeSeriesPeriodicAggregate.md b/docs/v2/Ontologies/models/TimeSeriesPeriodicAggregate.md new file mode 100644 index 000000000..1ac1e4a81 --- /dev/null +++ b/docs/v2/Ontologies/models/TimeSeriesPeriodicAggregate.md @@ -0,0 +1,23 @@ +# TimeSeriesPeriodicAggregate + +Aggregates values over discrete, periodic windows for a given time series. + +A periodic window divides the time series into windows of fixed durations. +For each window, an aggregate function is applied to the points within that window. The result is a time series +with values representing the aggregate for each window. Windows with no data points are not included +in the output. + +Periodic aggregation is useful for downsampling a continuous stream of data to larger granularities such as +hourly, daily, monthly. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**window_size** | PreciseDuration | Yes | | +**alignment_timestamp** | Optional[datetime] | No | The timestamp used to align the result, such that ticks in the result time series will lie at integer multiples of the window duration from the alignment timestamp. Default is the first epoch timestamp (January 1, 1970, 00:00:00 UTC) so that all aggregated points have timestamps at midnight UTC at the start of each window duration. For example, for a weekly aggregate with alignment timestamp 5 January, 8:33PM, each aggregated timestamp will lie on the 7 day intervals at 8:33PM starting at 5 January. | +**window_type** | TimeSeriesWindowType | Yes | | +**type** | Literal["periodic"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/TimeSeriesPoint.md b/docs/v2/Ontologies/models/TimeSeriesPoint.md new file mode 100644 index 000000000..23fa01c0d --- /dev/null +++ b/docs/v2/Ontologies/models/TimeSeriesPoint.md @@ -0,0 +1,13 @@ +# TimeSeriesPoint + +A time and value pair. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**time** | datetime | Yes | An ISO 8601 timestamp | +**value** | Any | Yes | An object which is either an enum String or a double number. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/TimeSeriesRollingAggregate.md b/docs/v2/Ontologies/models/TimeSeriesRollingAggregate.md new file mode 100644 index 000000000..0b006453a --- /dev/null +++ b/docs/v2/Ontologies/models/TimeSeriesRollingAggregate.md @@ -0,0 +1,12 @@ +# TimeSeriesRollingAggregate + +TimeSeriesRollingAggregate + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**window_size** | TimeSeriesRollingAggregateWindow | Yes | | +**type** | Literal["rolling"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/TimeSeriesRollingAggregateWindow.md b/docs/v2/Ontologies/models/TimeSeriesRollingAggregateWindow.md new file mode 100644 index 000000000..d928e24eb --- /dev/null +++ b/docs/v2/Ontologies/models/TimeSeriesRollingAggregateWindow.md @@ -0,0 +1,22 @@ +# TimeSeriesRollingAggregateWindow + +A rolling window is a moving subset of data points that ends at the current timestamp (inclusive) +and spans a specified duration (window size). As new data points are added, old points fall out of the +window if they are outside the specified duration. + +Rolling windows are commonly used for smoothing data, detecting trends, and reducing noise +in time series analysis. + + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +PreciseDuration | duration +RollingAggregateWindowPoints | pointsCount + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/TimeSeriesWindowType.md b/docs/v2/Ontologies/models/TimeSeriesWindowType.md new file mode 100644 index 000000000..4de9970df --- /dev/null +++ b/docs/v2/Ontologies/models/TimeSeriesWindowType.md @@ -0,0 +1,11 @@ +# TimeSeriesWindowType + +TimeSeriesWindowType + +| **Value** | +| --------- | +| `"START"` | +| `"END"` | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/TimeUnit.md b/docs/v2/Ontologies/models/TimeUnit.md new file mode 100644 index 000000000..573ec5d0b --- /dev/null +++ b/docs/v2/Ontologies/models/TimeUnit.md @@ -0,0 +1,18 @@ +# TimeUnit + +TimeUnit + +| **Value** | +| --------- | +| `"MILLISECONDS"` | +| `"SECONDS"` | +| `"MINUTES"` | +| `"HOURS"` | +| `"DAYS"` | +| `"WEEKS"` | +| `"MONTHS"` | +| `"YEARS"` | +| `"QUARTERS"` | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/TimeseriesEntry.md b/docs/v2/Ontologies/models/TimeseriesEntry.md new file mode 100644 index 000000000..2c7247f0d --- /dev/null +++ b/docs/v2/Ontologies/models/TimeseriesEntry.md @@ -0,0 +1,13 @@ +# TimeseriesEntry + +A time and value pair. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**time** | datetime | Yes | An ISO 8601 timestamp | +**value** | Any | Yes | An object which is either an enum String, double number, or a geopoint. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/TransactionEdit.md b/docs/v2/Ontologies/models/TransactionEdit.md new file mode 100644 index 000000000..62cd5ca5e --- /dev/null +++ b/docs/v2/Ontologies/models/TransactionEdit.md @@ -0,0 +1,19 @@ +# TransactionEdit + +TransactionEdit + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +ModifyObjectEdit | modifyObject +DeleteObjectEdit | deleteObject +AddObjectEdit | addObject +DeleteLinkEdit | removeLink +AddLinkEdit | addLink + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/TwoDimensionalAggregation.md b/docs/v2/Ontologies/models/TwoDimensionalAggregation.md new file mode 100644 index 000000000..b6f42990d --- /dev/null +++ b/docs/v2/Ontologies/models/TwoDimensionalAggregation.md @@ -0,0 +1,13 @@ +# TwoDimensionalAggregation + +TwoDimensionalAggregation + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**key_type** | QueryAggregationKeyType | Yes | | +**value_type** | QueryAggregationValueType | Yes | | +**type** | Literal["twoDimensionalAggregation"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/UnevaluableConstraint.md b/docs/v2/Ontologies/models/UnevaluableConstraint.md new file mode 100644 index 000000000..14eb00cb3 --- /dev/null +++ b/docs/v2/Ontologies/models/UnevaluableConstraint.md @@ -0,0 +1,13 @@ +# UnevaluableConstraint + +The parameter cannot be evaluated because it depends on another parameter or object set that can't be evaluated. +This can happen when a parameter's allowed values are defined by another parameter that is missing or invalid. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["unevaluable"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/UniqueIdentifierArgument.md b/docs/v2/Ontologies/models/UniqueIdentifierArgument.md new file mode 100644 index 000000000..5484e5636 --- /dev/null +++ b/docs/v2/Ontologies/models/UniqueIdentifierArgument.md @@ -0,0 +1,12 @@ +# UniqueIdentifierArgument + +Represents a unique identifier argument in a logic rule. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**link_id** | Optional[UUID] | No | By default all UniqueIdentifier Logic Rule arguments will generate different UUID. If the linkId is present all Logic Rules with the same linkId will all have the same uuid generated as the value. | +**type** | Literal["uniqueIdentifier"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/UniqueIdentifierLinkId.md b/docs/v2/Ontologies/models/UniqueIdentifierLinkId.md new file mode 100644 index 000000000..a3f77d313 --- /dev/null +++ b/docs/v2/Ontologies/models/UniqueIdentifierLinkId.md @@ -0,0 +1,12 @@ +# UniqueIdentifierLinkId + +A reference to a UniqueIdentifierArgument linkId defined for this action type. + + +## Type +```python +UUID +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/UniqueIdentifierValue.md b/docs/v2/Ontologies/models/UniqueIdentifierValue.md new file mode 100644 index 000000000..3dd696aab --- /dev/null +++ b/docs/v2/Ontologies/models/UniqueIdentifierValue.md @@ -0,0 +1,13 @@ +# UniqueIdentifierValue + +An override value to be used for a UniqueIdentifier action parameter, instead of +the value being automatically generated. + + +## Type +```python +UUID +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/UuidConstraint.md b/docs/v2/Ontologies/models/UuidConstraint.md new file mode 100644 index 000000000..87168c215 --- /dev/null +++ b/docs/v2/Ontologies/models/UuidConstraint.md @@ -0,0 +1,11 @@ +# UuidConstraint + +The string must be a valid UUID (Universally Unique Identifier). + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["uuid"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ValidateActionResponseV2.md b/docs/v2/Ontologies/models/ValidateActionResponseV2.md new file mode 100644 index 000000000..f3a2a2c40 --- /dev/null +++ b/docs/v2/Ontologies/models/ValidateActionResponseV2.md @@ -0,0 +1,13 @@ +# ValidateActionResponseV2 + +ValidateActionResponseV2 + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**result** | ValidationResult | Yes | | +**submission_criteria** | List[SubmissionCriteriaEvaluation] | Yes | | +**parameters** | Dict[ParameterId, ParameterEvaluationResult] | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ValidationResult.md b/docs/v2/Ontologies/models/ValidationResult.md new file mode 100644 index 000000000..6b6498fb0 --- /dev/null +++ b/docs/v2/Ontologies/models/ValidationResult.md @@ -0,0 +1,12 @@ +# ValidationResult + +Represents the state of a validation. + + +| **Value** | +| --------- | +| `"VALID"` | +| `"INVALID"` | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ValueType.md b/docs/v2/Ontologies/models/ValueType.md new file mode 100644 index 000000000..66896eba1 --- /dev/null +++ b/docs/v2/Ontologies/models/ValueType.md @@ -0,0 +1,34 @@ +# ValueType + +A string indicating the type of each data value. Note that these types can be nested, for example an array of +structs. + +| Type | JSON value | +|---------------------|-------------------------------------------------------------------------------------------------------------------| +| Array | `Array`, where `T` is the type of the array elements, e.g. `Array`. | +| Attachment | `Attachment` | +| Boolean | `Boolean` | +| Byte | `Byte` | +| CipherText | `CipherText` | +| Date | `LocalDate` | +| Decimal | `Decimal` | +| Double | `Double` | +| Float | `Float` | +| Integer | `Integer` | +| Long | `Long` | +| Marking | `Marking` | +| OntologyObject | `OntologyObject` where `T` is the API name of the referenced object type. | +| Short | `Short` | +| String | `String` | +| Struct | `Struct` where `T` contains field name and type pairs, e.g. `Struct<{ firstName: String, lastName: string }>` | +| Timeseries | `TimeSeries` where `T` is either `String` for an enum series or `Double` for a numeric series. | +| Timestamp | `Timestamp` | + + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ValueTypeApiName.md b/docs/v2/Ontologies/models/ValueTypeApiName.md new file mode 100644 index 000000000..cf8087b95 --- /dev/null +++ b/docs/v2/Ontologies/models/ValueTypeApiName.md @@ -0,0 +1,11 @@ +# ValueTypeApiName + +The name of the value type in the API in camelCase format. + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ValueTypeArrayType.md b/docs/v2/Ontologies/models/ValueTypeArrayType.md new file mode 100644 index 000000000..b3da6441a --- /dev/null +++ b/docs/v2/Ontologies/models/ValueTypeArrayType.md @@ -0,0 +1,12 @@ +# ValueTypeArrayType + +ValueTypeArrayType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**sub_type** | Optional[ValueTypeFieldType] | No | | +**type** | Literal["array"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ValueTypeConstraint.md b/docs/v2/Ontologies/models/ValueTypeConstraint.md new file mode 100644 index 000000000..123210bb4 --- /dev/null +++ b/docs/v2/Ontologies/models/ValueTypeConstraint.md @@ -0,0 +1,23 @@ +# ValueTypeConstraint + +ValueTypeConstraint + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +StructConstraint | struct +RegexConstraint | regex +UnsupportedType | unsupported +ArrayConstraint | array +LengthConstraint | length +RangesConstraint | range +RidConstraint | rid +UuidConstraint | uuid +EnumConstraint | enum + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ValueTypeDecimalType.md b/docs/v2/Ontologies/models/ValueTypeDecimalType.md new file mode 100644 index 000000000..e86a4ccb8 --- /dev/null +++ b/docs/v2/Ontologies/models/ValueTypeDecimalType.md @@ -0,0 +1,11 @@ +# ValueTypeDecimalType + +ValueTypeDecimalType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["decimal"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ValueTypeFieldType.md b/docs/v2/Ontologies/models/ValueTypeFieldType.md new file mode 100644 index 000000000..7d7a032a2 --- /dev/null +++ b/docs/v2/Ontologies/models/ValueTypeFieldType.md @@ -0,0 +1,32 @@ +# ValueTypeFieldType + +ValueTypeFieldType + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +DateType | date +ValueTypeStructType | struct +StringType | string +ByteType | byte +DoubleType | double +ValueTypeOptionalType | optional +IntegerType | integer +ValueTypeUnionType | union +FloatType | float +LongType | long +ValueTypeReferenceType | reference +BooleanType | boolean +ValueTypeArrayType | array +BinaryType | binary +ShortType | short +ValueTypeDecimalType | decimal +ValueTypeMapType | map +TimestampType | timestamp + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ValueTypeMapType.md b/docs/v2/Ontologies/models/ValueTypeMapType.md new file mode 100644 index 000000000..0a168c02a --- /dev/null +++ b/docs/v2/Ontologies/models/ValueTypeMapType.md @@ -0,0 +1,13 @@ +# ValueTypeMapType + +ValueTypeMapType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**key_type** | Optional[ValueTypeFieldType] | No | | +**value_type** | Optional[ValueTypeFieldType] | No | | +**type** | Literal["map"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ValueTypeOptionalType.md b/docs/v2/Ontologies/models/ValueTypeOptionalType.md new file mode 100644 index 000000000..59f471e5c --- /dev/null +++ b/docs/v2/Ontologies/models/ValueTypeOptionalType.md @@ -0,0 +1,12 @@ +# ValueTypeOptionalType + +ValueTypeOptionalType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**wrapped_type** | Optional[ValueTypeFieldType] | No | | +**type** | Literal["optional"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ValueTypeReferenceType.md b/docs/v2/Ontologies/models/ValueTypeReferenceType.md new file mode 100644 index 000000000..ccedb4f7f --- /dev/null +++ b/docs/v2/Ontologies/models/ValueTypeReferenceType.md @@ -0,0 +1,11 @@ +# ValueTypeReferenceType + +ValueTypeReferenceType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["reference"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ValueTypeRid.md b/docs/v2/Ontologies/models/ValueTypeRid.md new file mode 100644 index 000000000..6b3cd4dcd --- /dev/null +++ b/docs/v2/Ontologies/models/ValueTypeRid.md @@ -0,0 +1,11 @@ +# ValueTypeRid + +ValueTypeRid + +## Type +```python +RID +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ValueTypeStatus.md b/docs/v2/Ontologies/models/ValueTypeStatus.md new file mode 100644 index 000000000..1d179225e --- /dev/null +++ b/docs/v2/Ontologies/models/ValueTypeStatus.md @@ -0,0 +1,11 @@ +# ValueTypeStatus + +ValueTypeStatus + +| **Value** | +| --------- | +| `"ACTIVE"` | +| `"DEPRECATED"` | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ValueTypeStructField.md b/docs/v2/Ontologies/models/ValueTypeStructField.md new file mode 100644 index 000000000..9f82479bb --- /dev/null +++ b/docs/v2/Ontologies/models/ValueTypeStructField.md @@ -0,0 +1,12 @@ +# ValueTypeStructField + +ValueTypeStructField + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**name** | Optional[StructFieldName] | No | | +**field_type** | Optional[ValueTypeFieldType] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ValueTypeStructType.md b/docs/v2/Ontologies/models/ValueTypeStructType.md new file mode 100644 index 000000000..b1ef456b5 --- /dev/null +++ b/docs/v2/Ontologies/models/ValueTypeStructType.md @@ -0,0 +1,12 @@ +# ValueTypeStructType + +ValueTypeStructType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**fields** | List[ValueTypeStructField] | Yes | | +**type** | Literal["struct"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/ValueTypeUnionType.md b/docs/v2/Ontologies/models/ValueTypeUnionType.md new file mode 100644 index 000000000..7ab541ad2 --- /dev/null +++ b/docs/v2/Ontologies/models/ValueTypeUnionType.md @@ -0,0 +1,12 @@ +# ValueTypeUnionType + +ValueTypeUnionType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**member_types** | List[ValueTypeFieldType] | Yes | | +**type** | Literal["union"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/VersionedQueryTypeApiName.md b/docs/v2/Ontologies/models/VersionedQueryTypeApiName.md new file mode 100644 index 000000000..72c2b9bfb --- /dev/null +++ b/docs/v2/Ontologies/models/VersionedQueryTypeApiName.md @@ -0,0 +1,17 @@ +# VersionedQueryTypeApiName + +The name of the Query in the API and an optional version identifier separated by a colon. +If the API name contains a colon, then a version identifier of either "latest" or a semantic version must +be included. +If the API does not contain a colon, then either the version identifier must be excluded or a version +identifier of a semantic version must be included. +Examples: 'myGroup:myFunction:latest', 'myGroup:myFunction:1.0.0', 'myFunction', 'myFunction:2.0.0' + + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/WildcardQuery.md b/docs/v2/Ontologies/models/WildcardQuery.md new file mode 100644 index 000000000..bb971a677 --- /dev/null +++ b/docs/v2/Ontologies/models/WildcardQuery.md @@ -0,0 +1,16 @@ +# WildcardQuery + +Returns objects where the specified field matches the wildcard pattern provided. +Either `field` or `propertyIdentifier` can be supplied, but not both. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**field** | Optional[PropertyApiName] | No | | +**property_identifier** | Optional[PropertyIdentifier] | No | | +**value** | str | Yes | | +**type** | Literal["wildcard"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/WithinBoundingBoxPoint.md b/docs/v2/Ontologies/models/WithinBoundingBoxPoint.md new file mode 100644 index 000000000..e476994d3 --- /dev/null +++ b/docs/v2/Ontologies/models/WithinBoundingBoxPoint.md @@ -0,0 +1,11 @@ +# WithinBoundingBoxPoint + +WithinBoundingBoxPoint + +## Type +```python +GeoPoint +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/WithinBoundingBoxQuery.md b/docs/v2/Ontologies/models/WithinBoundingBoxQuery.md new file mode 100644 index 000000000..687f93d51 --- /dev/null +++ b/docs/v2/Ontologies/models/WithinBoundingBoxQuery.md @@ -0,0 +1,17 @@ +# WithinBoundingBoxQuery + +Returns objects where the specified field contains a point within the bounding box provided. Allows you to +specify a property to query on by a variety of means. Either `field` or `propertyIdentifier` must be supplied, +but not both. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**field** | Optional[PropertyApiName] | No | | +**property_identifier** | Optional[PropertyIdentifier] | No | | +**value** | BoundingBoxValue | Yes | | +**type** | Literal["withinBoundingBox"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/WithinDistanceOfQuery.md b/docs/v2/Ontologies/models/WithinDistanceOfQuery.md new file mode 100644 index 000000000..21c2d4c55 --- /dev/null +++ b/docs/v2/Ontologies/models/WithinDistanceOfQuery.md @@ -0,0 +1,17 @@ +# WithinDistanceOfQuery + +Returns objects where the specified field contains a point within the distance provided of the center point. +Allows you to specify a property to query on by a variety of means. Either `field` or `propertyIdentifier` +must be supplied, but not both. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**field** | Optional[PropertyApiName] | No | | +**property_identifier** | Optional[PropertyIdentifier] | No | | +**value** | CenterPoint | Yes | | +**type** | Literal["withinDistanceOf"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/WithinPolygonQuery.md b/docs/v2/Ontologies/models/WithinPolygonQuery.md new file mode 100644 index 000000000..ea87ac920 --- /dev/null +++ b/docs/v2/Ontologies/models/WithinPolygonQuery.md @@ -0,0 +1,17 @@ +# WithinPolygonQuery + +Returns objects where the specified field contains a point within the polygon provided. Allows you to specify a +property to query on by a variety of means. Either `field` or `propertyIdentifier` must be supplied, but not +both. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**field** | Optional[PropertyApiName] | No | | +**property_identifier** | Optional[PropertyIdentifier] | No | | +**value** | PolygonValue | Yes | | +**type** | Literal["withinPolygon"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/Build.md b/docs/v2/Orchestration/Build.md new file mode 100644 index 000000000..0cab4956b --- /dev/null +++ b/docs/v2/Orchestration/Build.md @@ -0,0 +1,353 @@ +# Build + +Method | HTTP request | Release Stage | +------------- | ------------- | ----- | +[**cancel**](#cancel) | **POST** /v2/orchestration/builds/{buildRid}/cancel | Stable | +[**create**](#create) | **POST** /v2/orchestration/builds/create | Stable | +[**get**](#get) | **GET** /v2/orchestration/builds/{buildRid} | Stable | +[**get_batch**](#get_batch) | **POST** /v2/orchestration/builds/getBatch | Stable | +[**jobs**](#jobs) | **GET** /v2/orchestration/builds/{buildRid}/jobs | Stable | +[**search**](#search) | **POST** /v2/orchestration/builds/search | Private Beta | + +# **cancel** +Request a cancellation for all unfinished jobs in a build. The build's status will not update immediately. This endpoint is asynchronous and a success response indicates that the cancellation request has been acknowledged and the build is expected to be canceled soon. If the build has already finished or finishes shortly after the request and before the cancellation, the build will not change. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**build_rid** | BuildRid | The RID of a Build. | | + +### Return type +**None** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# BuildRid | The RID of a Build. +build_rid = "ri.foundry.main.build.a4386b7e-d546-49be-8a36-eefc355f5c58" + + +try: + api_response = client.orchestration.Build.cancel(build_rid) + print("The cancel response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Build.cancel: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**204** | None | | None | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **create** + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**fallback_branches** | FallbackBranches | | | +**target** | BuildTarget | The targets of the schedule. | | +**abort_on_failure** | Optional[AbortOnFailure] | | [optional] | +**branch_name** | Optional[BranchName] | The target branch the build should run on. | [optional] | +**force_build** | Optional[ForceBuild] | | [optional] | +**notifications_enabled** | Optional[NotificationsEnabled] | | [optional] | +**retry_backoff_duration** | Optional[RetryBackoffDuration] | | [optional] | +**retry_count** | Optional[RetryCount] | The number of retry attempts for failed jobs. | [optional] | + +### Return type +**Build** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# FallbackBranches +fallback_branches = [] +# BuildTarget | The targets of the schedule. +target = { + "type": "manual", + "targetRids": [ + "ri.foundry.main.dataset.4263bdd9-d6bc-4244-9cca-893c1a2aef62", + "ri.foundry.main.dataset.86939c1e-4256-41db-9fe7-e7ee9e0f752a", + ], +} +# Optional[AbortOnFailure] +abort_on_failure = False +# Optional[BranchName] | The target branch the build should run on. +branch_name = "master" +# Optional[ForceBuild] +force_build = None +# Optional[NotificationsEnabled] +notifications_enabled = None +# Optional[RetryBackoffDuration] +retry_backoff_duration = {"unit": "SECONDS", "value": 30} +# Optional[RetryCount] | The number of retry attempts for failed jobs. +retry_count = 1 + + +try: + api_response = client.orchestration.Build.create( + fallback_branches=fallback_branches, + target=target, + abort_on_failure=abort_on_failure, + branch_name=branch_name, + force_build=force_build, + notifications_enabled=notifications_enabled, + retry_backoff_duration=retry_backoff_duration, + retry_count=retry_count, + ) + print("The create response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Build.create: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | Build | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **get** +Get the Build with the specified rid. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**build_rid** | BuildRid | The RID of a Build. | | + +### Return type +**Build** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# BuildRid | The RID of a Build. +build_rid = "ri.foundry.main.build.a4386b7e-d546-49be-8a36-eefc355f5c58" + + +try: + api_response = client.orchestration.Build.get(build_rid) + print("The get response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Build.get: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | Build | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **get_batch** +Execute multiple get requests on Build. + +The maximum batch size for this endpoint is 100. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**body** | List[GetBuildsBatchRequestElement] | Body of the request | | + +### Return type +**GetBuildsBatchResponse** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# List[GetBuildsBatchRequestElement] | Body of the request +body = [{"buildRid": "ri.foundry.main.build.a4386b7e-d546-49be-8a36-eefc355f5c58"}] + + +try: + api_response = client.orchestration.Build.get_batch(body) + print("The get_batch response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Build.get_batch: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | GetBuildsBatchResponse | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **jobs** +Get the Jobs in the Build. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**build_rid** | BuildRid | The RID of a Build. | | +**page_size** | Optional[PageSize] | The page size to use for the endpoint. | [optional] | +**page_token** | Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. | [optional] | + +### Return type +**ListJobsOfBuildResponse** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# BuildRid | The RID of a Build. +build_rid = "ri.foundry.main.build.a4386b7e-d546-49be-8a36-eefc355f5c58" +# Optional[PageSize] | The page size to use for the endpoint. +page_size = None +# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. +page_token = None + + +try: + for build in client.orchestration.Build.jobs( + build_rid, page_size=page_size, page_token=page_token + ): + pprint(build) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Build.jobs: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | ListJobsOfBuildResponse | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **search** +Search for Builds. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**where** | SearchBuildsFilter | | | +**order_by** | Optional[SearchBuildsOrderBy] | | [optional] | +**page_size** | Optional[PageSize] | The page size for the search request. If no value is provided, a default of `100` will be used. | [optional] | +**page_token** | Optional[PageToken] | | [optional] | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**SearchBuildsResponse** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# SearchBuildsFilter +where = None +# Optional[SearchBuildsOrderBy] +order_by = {"fields": [{"field": "STARTED_TIME", "direction": "ASC"}]} +# Optional[PageSize] | The page size for the search request. If no value is provided, a default of `100` will be used. +page_size = 100 +# Optional[PageToken] +page_token = "v1.QnVpbGQgdGhlIEZ1dHVyZTogaHR0cHM6Ly93d3cucGFsYW50aXIuY29tL2NhcmVlcnMvP2xldmVyLXNvdXJjZSU1YiU1ZD1BUElEb2NzI29wZW4tcG9zaXRpb25z" +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.orchestration.Build.search( + where=where, order_by=order_by, page_size=page_size, page_token=page_token, preview=preview + ) + print("The search response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Build.search: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | SearchBuildsResponse | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + diff --git a/docs/v2/Orchestration/Job.md b/docs/v2/Orchestration/Job.md new file mode 100644 index 000000000..b565fc71b --- /dev/null +++ b/docs/v2/Orchestration/Job.md @@ -0,0 +1,109 @@ +# Job + +Method | HTTP request | Release Stage | +------------- | ------------- | ----- | +[**get**](#get) | **GET** /v2/orchestration/jobs/{jobRid} | Public Beta | +[**get_batch**](#get_batch) | **POST** /v2/orchestration/jobs/getBatch | Public Beta | + +# **get** +Get the Job with the specified rid. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**job_rid** | JobRid | The RID of a Job. | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**Job** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# JobRid | The RID of a Job. +job_rid = "ri.foundry.main.job.aaf94076-d773-4732-a1df-3b638eb50448" +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.orchestration.Job.get(job_rid, preview=preview) + print("The get response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Job.get: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | Job | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **get_batch** +Execute multiple get requests on Job. + +The maximum batch size for this endpoint is 500. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**body** | List[GetJobsBatchRequestElement] | Body of the request | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**GetJobsBatchResponse** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# List[GetJobsBatchRequestElement] | Body of the request +body = [{"jobRid": "ri.foundry.main.job.aaf94076-d773-4732-a1df-3b638eb50448"}] +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.orchestration.Job.get_batch(body, preview=preview) + print("The get_batch response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Job.get_batch: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | GetJobsBatchResponse | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + diff --git a/docs/v2/Orchestration/Schedule.md b/docs/v2/Orchestration/Schedule.md new file mode 100644 index 000000000..8a1e38b08 --- /dev/null +++ b/docs/v2/Orchestration/Schedule.md @@ -0,0 +1,586 @@ +# Schedule + +Method | HTTP request | Release Stage | +------------- | ------------- | ----- | +[**create**](#create) | **POST** /v2/orchestration/schedules | Public Beta | +[**delete**](#delete) | **DELETE** /v2/orchestration/schedules/{scheduleRid} | Stable | +[**get**](#get) | **GET** /v2/orchestration/schedules/{scheduleRid} | Public Beta | +[**get_affected_resources**](#get_affected_resources) | **POST** /v2/orchestration/schedules/{scheduleRid}/getAffectedResources | Public Beta | +[**get_batch**](#get_batch) | **POST** /v2/orchestration/schedules/getBatch | Public Beta | +[**pause**](#pause) | **POST** /v2/orchestration/schedules/{scheduleRid}/pause | Stable | +[**replace**](#replace) | **PUT** /v2/orchestration/schedules/{scheduleRid} | Public Beta | +[**run**](#run) | **POST** /v2/orchestration/schedules/{scheduleRid}/run | Stable | +[**runs**](#runs) | **GET** /v2/orchestration/schedules/{scheduleRid}/runs | Stable | +[**unpause**](#unpause) | **POST** /v2/orchestration/schedules/{scheduleRid}/unpause | Stable | + +# **create** +Creates a new Schedule. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**action** | CreateScheduleRequestAction | | | +**description** | Optional[str] | | [optional] | +**display_name** | Optional[str] | | [optional] | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | +**scope_mode** | Optional[CreateScheduleRequestScopeMode] | | [optional] | +**trigger** | Optional[Trigger] | The schedule trigger. If the requesting user does not have permission to see the trigger, this will be empty. | [optional] | + +### Return type +**Schedule** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# CreateScheduleRequestAction +action = { + "abortOnFailure": False, + "forceBuild": False, + "retryBackoffDuration": {"unit": "SECONDS", "value": 30}, + "retryCount": 1, + "fallbackBranches": [], + "branchName": "master", + "notificationsEnabled": False, + "target": { + "type": "manual", + "targetRids": [ + "ri.foundry.main.dataset.b737e24d-6b19-43aa-93d5-da9fc4073f6e", + "ri.foundry.main.dataset.d2452a94-a755-4778-8bfc-a315ab52fc43", + ], + }, +} +# Optional[str] +description = "Run all the transforms at midnight" +# Optional[str] +display_name = "My Daily Schedule" +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None +# Optional[CreateScheduleRequestScopeMode] +scope_mode = {"type": "user"} +# Optional[Trigger] | The schedule trigger. If the requesting user does not have permission to see the trigger, this will be empty. +trigger = {"type": "time", "cronExpression": "0 0 * * *", "timeZone": "UTC"} + + +try: + api_response = client.orchestration.Schedule.create( + action=action, + description=description, + display_name=display_name, + preview=preview, + scope_mode=scope_mode, + trigger=trigger, + ) + print("The create response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Schedule.create: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | Schedule | The created Schedule | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **delete** +Delete the Schedule with the specified rid. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**schedule_rid** | ScheduleRid | | | + +### Return type +**None** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# ScheduleRid +schedule_rid = None + + +try: + api_response = client.orchestration.Schedule.delete(schedule_rid) + print("The delete response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Schedule.delete: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**204** | None | | None | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **get** +Get the Schedule with the specified rid. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**schedule_rid** | ScheduleRid | | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**Schedule** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# ScheduleRid +schedule_rid = None +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.orchestration.Schedule.get(schedule_rid, preview=preview) + print("The get response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Schedule.get: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | Schedule | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **get_affected_resources** + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**schedule_rid** | ScheduleRid | | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**AffectedResourcesResponse** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# ScheduleRid +schedule_rid = None +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.orchestration.Schedule.get_affected_resources( + schedule_rid, preview=preview + ) + print("The get_affected_resources response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Schedule.get_affected_resources: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | AffectedResourcesResponse | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **get_batch** +Fetch multiple schedules in a single request. Schedules not found or inaccessible to the user will be +omitted from the response. + + +The maximum batch size for this endpoint is 1000. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**body** | List[GetSchedulesBatchRequestElement] | Body of the request | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**GetSchedulesBatchResponse** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# List[GetSchedulesBatchRequestElement] | Body of the request +body = [{"scheduleRid": "ri.scheduler.main.schedule.5ad5c340-59f3-4a60-9fc6-161bb984f871"}] +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.orchestration.Schedule.get_batch(body, preview=preview) + print("The get_batch response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Schedule.get_batch: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | GetSchedulesBatchResponse | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **pause** + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**schedule_rid** | ScheduleRid | | | + +### Return type +**None** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# ScheduleRid +schedule_rid = None + + +try: + api_response = client.orchestration.Schedule.pause(schedule_rid) + print("The pause response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Schedule.pause: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**204** | None | | None | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **replace** +Replace the Schedule with the specified rid. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**schedule_rid** | ScheduleRid | | | +**action** | ReplaceScheduleRequestAction | | | +**description** | Optional[str] | | [optional] | +**display_name** | Optional[str] | | [optional] | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | +**scope_mode** | Optional[ReplaceScheduleRequestScopeMode] | | [optional] | +**trigger** | Optional[Trigger] | The schedule trigger. If the requesting user does not have permission to see the trigger, this will be empty. | [optional] | + +### Return type +**Schedule** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# ScheduleRid +schedule_rid = None +# ReplaceScheduleRequestAction +action = { + "abortOnFailure": False, + "forceBuild": False, + "retryBackoffDuration": {"unit": "SECONDS", "value": 30}, + "retryCount": 1, + "fallbackBranches": [], + "branchName": "master", + "notificationsEnabled": False, + "target": { + "type": "manual", + "targetRids": [ + "ri.foundry.main.dataset.b737e24d-6b19-43aa-93d5-da9fc4073f6e", + "ri.foundry.main.dataset.d2452a94-a755-4778-8bfc-a315ab52fc43", + ], + }, +} +# Optional[str] +description = "Run all the transforms at midnight" +# Optional[str] +display_name = "My Daily Schedule" +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None +# Optional[ReplaceScheduleRequestScopeMode] +scope_mode = {"type": "user"} +# Optional[Trigger] | The schedule trigger. If the requesting user does not have permission to see the trigger, this will be empty. +trigger = {"type": "time", "cronExpression": "0 0 * * *", "timeZone": "UTC"} + + +try: + api_response = client.orchestration.Schedule.replace( + schedule_rid, + action=action, + description=description, + display_name=display_name, + preview=preview, + scope_mode=scope_mode, + trigger=trigger, + ) + print("The replace response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Schedule.replace: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | Schedule | The replaced Schedule | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **run** + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**schedule_rid** | ScheduleRid | | | + +### Return type +**ScheduleRun** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# ScheduleRid +schedule_rid = None + + +try: + api_response = client.orchestration.Schedule.run(schedule_rid) + print("The run response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Schedule.run: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | ScheduleRun | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **runs** +Get the most recent runs of a Schedule. If no page size is provided, a page size of 100 will be used. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**schedule_rid** | ScheduleRid | | | +**page_size** | Optional[PageSize] | The page size to use for the endpoint. | [optional] | +**page_token** | Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. | [optional] | + +### Return type +**ListRunsOfScheduleResponse** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# ScheduleRid +schedule_rid = None +# Optional[PageSize] | The page size to use for the endpoint. +page_size = None +# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. +page_token = None + + +try: + for schedule in client.orchestration.Schedule.runs( + schedule_rid, page_size=page_size, page_token=page_token + ): + pprint(schedule) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Schedule.runs: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | ListRunsOfScheduleResponse | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **unpause** + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**schedule_rid** | ScheduleRid | | | + +### Return type +**None** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# ScheduleRid +schedule_rid = None + + +try: + api_response = client.orchestration.Schedule.unpause(schedule_rid) + print("The unpause response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Schedule.unpause: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**204** | None | | None | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + diff --git a/docs/v2/Orchestration/ScheduleRun.md b/docs/v2/Orchestration/ScheduleRun.md new file mode 100644 index 000000000..aa0391e24 --- /dev/null +++ b/docs/v2/Orchestration/ScheduleRun.md @@ -0,0 +1,5 @@ +# ScheduleRun + +Method | HTTP request | Release Stage | +------------- | ------------- | ----- | + diff --git a/docs/v2/Orchestration/ScheduleVersion.md b/docs/v2/Orchestration/ScheduleVersion.md new file mode 100644 index 000000000..6475dfa08 --- /dev/null +++ b/docs/v2/Orchestration/ScheduleVersion.md @@ -0,0 +1,109 @@ +# ScheduleVersion + +Method | HTTP request | Release Stage | +------------- | ------------- | ----- | +[**get**](#get) | **GET** /v2/orchestration/scheduleVersions/{scheduleVersionRid} | Public Beta | +[**schedule**](#schedule) | **GET** /v2/orchestration/scheduleVersions/{scheduleVersionRid}/schedule | Public Beta | + +# **get** +Get the ScheduleVersion with the specified rid. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**schedule_version_rid** | ScheduleVersionRid | The RID of a schedule version | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**ScheduleVersion** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# ScheduleVersionRid | The RID of a schedule version +schedule_version_rid = "ri.scheduler.main.schedule-version.4d1eb55f-6c13-411c-a911-5d84e08d8017" +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.orchestration.ScheduleVersion.get(schedule_version_rid, preview=preview) + print("The get response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling ScheduleVersion.get: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | ScheduleVersion | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **schedule** + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**schedule_version_rid** | ScheduleVersionRid | The RID of a schedule version | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**Optional[Schedule]** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# ScheduleVersionRid | The RID of a schedule version +schedule_version_rid = "ri.scheduler.main.schedule-version.4d1eb55f-6c13-411c-a911-5d84e08d8017" +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.orchestration.ScheduleVersion.schedule( + schedule_version_rid, preview=preview + ) + print("The schedule response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling ScheduleVersion.schedule: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | Optional[Schedule] | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + diff --git a/docs/v2/Orchestration/models/AbortOnFailure.md b/docs/v2/Orchestration/models/AbortOnFailure.md new file mode 100644 index 000000000..dfc79d585 --- /dev/null +++ b/docs/v2/Orchestration/models/AbortOnFailure.md @@ -0,0 +1,13 @@ +# AbortOnFailure + +If any job in the build is unsuccessful, immediately finish the +build by cancelling all other jobs. + + +## Type +```python +bool +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/Action.md b/docs/v2/Orchestration/models/Action.md new file mode 100644 index 000000000..c2e145a78 --- /dev/null +++ b/docs/v2/Orchestration/models/Action.md @@ -0,0 +1,18 @@ +# Action + +Action + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**target** | BuildTarget | Yes | | +**branch_name** | BranchName | Yes | The target branch the schedule should run on. | +**fallback_branches** | FallbackBranches | Yes | | +**force_build** | ForceBuild | Yes | | +**retry_count** | Optional[RetryCount] | No | | +**retry_backoff_duration** | Optional[RetryBackoffDuration] | No | | +**abort_on_failure** | AbortOnFailure | Yes | | +**notifications_enabled** | NotificationsEnabled | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/AffectedResourcesResponse.md b/docs/v2/Orchestration/models/AffectedResourcesResponse.md new file mode 100644 index 000000000..d323f4fb5 --- /dev/null +++ b/docs/v2/Orchestration/models/AffectedResourcesResponse.md @@ -0,0 +1,11 @@ +# AffectedResourcesResponse + +AffectedResourcesResponse + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**datasets** | List[BuildableRid] | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/AndTrigger.md b/docs/v2/Orchestration/models/AndTrigger.md new file mode 100644 index 000000000..5de996e05 --- /dev/null +++ b/docs/v2/Orchestration/models/AndTrigger.md @@ -0,0 +1,12 @@ +# AndTrigger + +Trigger after all of the given triggers emit an event. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**triggers** | List[Trigger] | Yes | | +**type** | Literal["and"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/Build.md b/docs/v2/Orchestration/models/Build.md new file mode 100644 index 000000000..30b71af62 --- /dev/null +++ b/docs/v2/Orchestration/models/Build.md @@ -0,0 +1,21 @@ +# Build + +Build + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**rid** | BuildRid | Yes | The RID of a Build. | +**branch_name** | BranchName | Yes | The branch that the build is running on. | +**created_time** | CreatedTime | Yes | The timestamp that the build was created. | +**created_by** | CreatedBy | Yes | The user who created the build. | +**fallback_branches** | FallbackBranches | Yes | | +**job_rids** | List[JobRid] | Yes | | +**retry_count** | RetryCount | Yes | | +**retry_backoff_duration** | RetryBackoffDuration | Yes | | +**abort_on_failure** | AbortOnFailure | Yes | | +**status** | BuildStatus | Yes | | +**schedule_rid** | Optional[ScheduleRid] | No | Schedule RID of the Schedule that triggered this build. If a user triggered the build, Schedule RID will be empty. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/BuildStatus.md b/docs/v2/Orchestration/models/BuildStatus.md new file mode 100644 index 000000000..2bbb5d4fb --- /dev/null +++ b/docs/v2/Orchestration/models/BuildStatus.md @@ -0,0 +1,13 @@ +# BuildStatus + +The status of the build. + +| **Value** | +| --------- | +| `"RUNNING"` | +| `"SUCCEEDED"` | +| `"FAILED"` | +| `"CANCELED"` | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/BuildTarget.md b/docs/v2/Orchestration/models/BuildTarget.md new file mode 100644 index 000000000..ff25a8f35 --- /dev/null +++ b/docs/v2/Orchestration/models/BuildTarget.md @@ -0,0 +1,17 @@ +# BuildTarget + +The targets of the build. + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +UpstreamTarget | upstream +ManualTarget | manual +ConnectingTarget | connecting + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/BuildableRid.md b/docs/v2/Orchestration/models/BuildableRid.md new file mode 100644 index 000000000..42a348e57 --- /dev/null +++ b/docs/v2/Orchestration/models/BuildableRid.md @@ -0,0 +1,13 @@ +# BuildableRid + +The Resource Identifier (RID) of a Resource that can be built. For example, this is a Dataset RID, Media Set +RID or Restricted View RID. + + +## Type +```python +RID +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/ConnectingTarget.md b/docs/v2/Orchestration/models/ConnectingTarget.md new file mode 100644 index 000000000..1a665f42b --- /dev/null +++ b/docs/v2/Orchestration/models/ConnectingTarget.md @@ -0,0 +1,16 @@ +# ConnectingTarget + +All datasets between the input datasets (exclusive) and the +target datasets (inclusive) except for the datasets to ignore. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**input_rids** | List[BuildableRid] | Yes | The upstream input datasets (exclusive). | +**target_rids** | List[BuildableRid] | Yes | The downstream target datasets (inclusive). | +**ignored_rids** | List[BuildableRid] | Yes | The datasets between the input datasets and target datasets to exclude. | +**type** | Literal["connecting"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/CreateBuildRequest.md b/docs/v2/Orchestration/models/CreateBuildRequest.md new file mode 100644 index 000000000..f86e22889 --- /dev/null +++ b/docs/v2/Orchestration/models/CreateBuildRequest.md @@ -0,0 +1,18 @@ +# CreateBuildRequest + +CreateBuildRequest + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**target** | BuildTarget | Yes | The targets of the schedule. | +**branch_name** | Optional[BranchName] | No | The target branch the build should run on. | +**fallback_branches** | FallbackBranches | Yes | | +**force_build** | Optional[ForceBuild] | No | | +**retry_count** | Optional[RetryCount] | No | The number of retry attempts for failed jobs. | +**retry_backoff_duration** | Optional[RetryBackoffDuration] | No | | +**abort_on_failure** | Optional[AbortOnFailure] | No | | +**notifications_enabled** | Optional[NotificationsEnabled] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/CreateScheduleRequest.md b/docs/v2/Orchestration/models/CreateScheduleRequest.md new file mode 100644 index 000000000..4b07a6db8 --- /dev/null +++ b/docs/v2/Orchestration/models/CreateScheduleRequest.md @@ -0,0 +1,15 @@ +# CreateScheduleRequest + +CreateScheduleRequest + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**display_name** | Optional[str] | No | | +**description** | Optional[str] | No | | +**action** | CreateScheduleRequestAction | Yes | | +**trigger** | Optional[Trigger] | No | The schedule trigger. If the requesting user does not have permission to see the trigger, this will be empty. | +**scope_mode** | Optional[CreateScheduleRequestScopeMode] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/CreateScheduleRequestAction.md b/docs/v2/Orchestration/models/CreateScheduleRequestAction.md new file mode 100644 index 000000000..4066d01b4 --- /dev/null +++ b/docs/v2/Orchestration/models/CreateScheduleRequestAction.md @@ -0,0 +1,18 @@ +# CreateScheduleRequestAction + +CreateScheduleRequestAction + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**abort_on_failure** | Optional[AbortOnFailure] | No | | +**force_build** | Optional[ForceBuild] | No | | +**retry_backoff_duration** | Optional[RetryBackoffDuration] | No | | +**retry_count** | Optional[RetryCount] | No | | +**fallback_branches** | Optional[FallbackBranches] | No | | +**branch_name** | Optional[BranchName] | No | The target branch the schedule should run on. | +**notifications_enabled** | Optional[NotificationsEnabled] | No | | +**target** | CreateScheduleRequestBuildTarget | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/CreateScheduleRequestBuildTarget.md b/docs/v2/Orchestration/models/CreateScheduleRequestBuildTarget.md new file mode 100644 index 000000000..8eb59f1cd --- /dev/null +++ b/docs/v2/Orchestration/models/CreateScheduleRequestBuildTarget.md @@ -0,0 +1,17 @@ +# CreateScheduleRequestBuildTarget + +The targets of the build. + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +CreateScheduleRequestUpstreamTarget | upstream +CreateScheduleRequestManualTarget | manual +CreateScheduleRequestConnectingTarget | connecting + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/CreateScheduleRequestConnectingTarget.md b/docs/v2/Orchestration/models/CreateScheduleRequestConnectingTarget.md new file mode 100644 index 000000000..7d0a3c68f --- /dev/null +++ b/docs/v2/Orchestration/models/CreateScheduleRequestConnectingTarget.md @@ -0,0 +1,14 @@ +# CreateScheduleRequestConnectingTarget + +CreateScheduleRequestConnectingTarget + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**ignored_rids** | Optional[List[BuildableRid]] | No | The datasets between the input datasets and target datasets to exclude. | +**target_rids** | List[BuildableRid] | Yes | The downstream target datasets (inclusive). | +**input_rids** | List[BuildableRid] | Yes | The upstream input datasets (exclusive). | +**type** | Literal["connecting"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/CreateScheduleRequestManualTarget.md b/docs/v2/Orchestration/models/CreateScheduleRequestManualTarget.md new file mode 100644 index 000000000..d3d495e7a --- /dev/null +++ b/docs/v2/Orchestration/models/CreateScheduleRequestManualTarget.md @@ -0,0 +1,12 @@ +# CreateScheduleRequestManualTarget + +CreateScheduleRequestManualTarget + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**target_rids** | List[BuildableRid] | Yes | | +**type** | Literal["manual"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/CreateScheduleRequestProjectScope.md b/docs/v2/Orchestration/models/CreateScheduleRequestProjectScope.md new file mode 100644 index 000000000..3db389df3 --- /dev/null +++ b/docs/v2/Orchestration/models/CreateScheduleRequestProjectScope.md @@ -0,0 +1,12 @@ +# CreateScheduleRequestProjectScope + +CreateScheduleRequestProjectScope + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**project_rids** | List[ProjectRid] | Yes | | +**type** | Literal["project"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/CreateScheduleRequestScopeMode.md b/docs/v2/Orchestration/models/CreateScheduleRequestScopeMode.md new file mode 100644 index 000000000..53f187277 --- /dev/null +++ b/docs/v2/Orchestration/models/CreateScheduleRequestScopeMode.md @@ -0,0 +1,16 @@ +# CreateScheduleRequestScopeMode + +The boundaries for the schedule build. + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +CreateScheduleRequestProjectScope | project +CreateScheduleRequestUserScope | user + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/CreateScheduleRequestUpstreamTarget.md b/docs/v2/Orchestration/models/CreateScheduleRequestUpstreamTarget.md new file mode 100644 index 000000000..c8feeb3b6 --- /dev/null +++ b/docs/v2/Orchestration/models/CreateScheduleRequestUpstreamTarget.md @@ -0,0 +1,13 @@ +# CreateScheduleRequestUpstreamTarget + +CreateScheduleRequestUpstreamTarget + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**ignored_rids** | Optional[List[BuildableRid]] | No | The datasets to ignore when calculating the final set of dataset to build. | +**target_rids** | List[BuildableRid] | Yes | The target datasets. | +**type** | Literal["upstream"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/CreateScheduleRequestUserScope.md b/docs/v2/Orchestration/models/CreateScheduleRequestUserScope.md new file mode 100644 index 000000000..f6c12fb0c --- /dev/null +++ b/docs/v2/Orchestration/models/CreateScheduleRequestUserScope.md @@ -0,0 +1,11 @@ +# CreateScheduleRequestUserScope + +CreateScheduleRequestUserScope + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["user"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/CronExpression.md b/docs/v2/Orchestration/models/CronExpression.md new file mode 100644 index 000000000..164a16512 --- /dev/null +++ b/docs/v2/Orchestration/models/CronExpression.md @@ -0,0 +1,13 @@ +# CronExpression + +A standard CRON expression with minute, hour, day, month +and day of week. + + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/DatasetJobOutput.md b/docs/v2/Orchestration/models/DatasetJobOutput.md new file mode 100644 index 000000000..cd668685c --- /dev/null +++ b/docs/v2/Orchestration/models/DatasetJobOutput.md @@ -0,0 +1,13 @@ +# DatasetJobOutput + +DatasetJobOutput + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**dataset_rid** | DatasetRid | Yes | | +**output_transaction_rid** | Optional[TransactionRid] | No | | +**type** | Literal["datasetJobOutput"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/DatasetUpdatedTrigger.md b/docs/v2/Orchestration/models/DatasetUpdatedTrigger.md new file mode 100644 index 000000000..21f4b16b8 --- /dev/null +++ b/docs/v2/Orchestration/models/DatasetUpdatedTrigger.md @@ -0,0 +1,15 @@ +# DatasetUpdatedTrigger + +Trigger whenever a new transaction is committed to the +dataset on the target branch. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**dataset_rid** | DatasetRid | Yes | | +**branch_name** | BranchName | Yes | | +**type** | Literal["datasetUpdated"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/FallbackBranches.md b/docs/v2/Orchestration/models/FallbackBranches.md new file mode 100644 index 000000000..4858227e3 --- /dev/null +++ b/docs/v2/Orchestration/models/FallbackBranches.md @@ -0,0 +1,13 @@ +# FallbackBranches + +The branches to retrieve JobSpecs from if no JobSpec is found on the +target branch. + + +## Type +```python +List[BranchName] +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/ForceBuild.md b/docs/v2/Orchestration/models/ForceBuild.md new file mode 100644 index 000000000..ab828bf31 --- /dev/null +++ b/docs/v2/Orchestration/models/ForceBuild.md @@ -0,0 +1,11 @@ +# ForceBuild + +Whether to ignore staleness information when running the build. + +## Type +```python +bool +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/GetBuildsBatchRequestElement.md b/docs/v2/Orchestration/models/GetBuildsBatchRequestElement.md new file mode 100644 index 000000000..f2135a549 --- /dev/null +++ b/docs/v2/Orchestration/models/GetBuildsBatchRequestElement.md @@ -0,0 +1,11 @@ +# GetBuildsBatchRequestElement + +GetBuildsBatchRequestElement + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**build_rid** | BuildRid | Yes | The RID of a Build. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/GetBuildsBatchResponse.md b/docs/v2/Orchestration/models/GetBuildsBatchResponse.md new file mode 100644 index 000000000..622eda446 --- /dev/null +++ b/docs/v2/Orchestration/models/GetBuildsBatchResponse.md @@ -0,0 +1,11 @@ +# GetBuildsBatchResponse + +GetBuildsBatchResponse + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**data** | Dict[BuildRid, Build] | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/GetJobsBatchRequestElement.md b/docs/v2/Orchestration/models/GetJobsBatchRequestElement.md new file mode 100644 index 000000000..aab56314e --- /dev/null +++ b/docs/v2/Orchestration/models/GetJobsBatchRequestElement.md @@ -0,0 +1,11 @@ +# GetJobsBatchRequestElement + +GetJobsBatchRequestElement + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**job_rid** | JobRid | Yes | The RID of a Job. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/GetJobsBatchResponse.md b/docs/v2/Orchestration/models/GetJobsBatchResponse.md new file mode 100644 index 000000000..f58d3e391 --- /dev/null +++ b/docs/v2/Orchestration/models/GetJobsBatchResponse.md @@ -0,0 +1,11 @@ +# GetJobsBatchResponse + +GetJobsBatchResponse + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**data** | Dict[JobRid, Job] | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/GetSchedulesBatchRequestElement.md b/docs/v2/Orchestration/models/GetSchedulesBatchRequestElement.md new file mode 100644 index 000000000..2f5cc0f9f --- /dev/null +++ b/docs/v2/Orchestration/models/GetSchedulesBatchRequestElement.md @@ -0,0 +1,11 @@ +# GetSchedulesBatchRequestElement + +GetSchedulesBatchRequestElement + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**schedule_rid** | ScheduleRid | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/GetSchedulesBatchResponse.md b/docs/v2/Orchestration/models/GetSchedulesBatchResponse.md new file mode 100644 index 000000000..fda1505cf --- /dev/null +++ b/docs/v2/Orchestration/models/GetSchedulesBatchResponse.md @@ -0,0 +1,11 @@ +# GetSchedulesBatchResponse + +GetSchedulesBatchResponse + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**data** | Dict[ScheduleRid, Schedule] | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/Job.md b/docs/v2/Orchestration/models/Job.md new file mode 100644 index 000000000..037797ecd --- /dev/null +++ b/docs/v2/Orchestration/models/Job.md @@ -0,0 +1,17 @@ +# Job + +Job + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**rid** | JobRid | Yes | The RID of a Job. | +**build_rid** | BuildRid | Yes | The RID of the Build that the Job belongs to. | +**started_time** | JobStartedTime | Yes | The time this job started waiting for the dependencies to be resolved. | +**latest_attempt_start_time** | Optional[datetime] | No | The time this job's latest attempt started running. This field may be empty or outdated if the job failed to start. | +**finished_time** | Optional[datetime] | No | The time this job was finished. | +**job_status** | JobStatus | Yes | | +**outputs** | List[JobOutput] | Yes | Outputs of the Job. Only outputs with supported types are listed here; unsupported types are omitted. Currently supported types are Dataset and Media Set outputs. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/JobOutput.md b/docs/v2/Orchestration/models/JobOutput.md new file mode 100644 index 000000000..003b418e9 --- /dev/null +++ b/docs/v2/Orchestration/models/JobOutput.md @@ -0,0 +1,17 @@ +# JobOutput + +Other types of Job Outputs exist in Foundry. Currently, only Dataset and Media Set are supported by the API. + + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +DatasetJobOutput | datasetJobOutput +TransactionalMediaSetJobOutput | transactionalMediaSetJobOutput + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/JobStartedTime.md b/docs/v2/Orchestration/models/JobStartedTime.md new file mode 100644 index 000000000..313b08227 --- /dev/null +++ b/docs/v2/Orchestration/models/JobStartedTime.md @@ -0,0 +1,11 @@ +# JobStartedTime + +The time this job started waiting for the dependencies to be resolved. + +## Type +```python +datetime +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/JobStatus.md b/docs/v2/Orchestration/models/JobStatus.md new file mode 100644 index 000000000..47dc3a60a --- /dev/null +++ b/docs/v2/Orchestration/models/JobStatus.md @@ -0,0 +1,15 @@ +# JobStatus + +The status of the job. + +| **Value** | +| --------- | +| `"WAITING"` | +| `"RUNNING"` | +| `"SUCCEEDED"` | +| `"FAILED"` | +| `"CANCELED"` | +| `"DID_NOT_RUN"` | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/JobSucceededTrigger.md b/docs/v2/Orchestration/models/JobSucceededTrigger.md new file mode 100644 index 000000000..3eeb12589 --- /dev/null +++ b/docs/v2/Orchestration/models/JobSucceededTrigger.md @@ -0,0 +1,15 @@ +# JobSucceededTrigger + +Trigger whenever a job succeeds on the dataset and on the target +branch. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**dataset_rid** | DatasetRid | Yes | | +**branch_name** | BranchName | Yes | | +**type** | Literal["jobSucceeded"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/ListJobsOfBuildResponse.md b/docs/v2/Orchestration/models/ListJobsOfBuildResponse.md new file mode 100644 index 000000000..89fd3bea8 --- /dev/null +++ b/docs/v2/Orchestration/models/ListJobsOfBuildResponse.md @@ -0,0 +1,12 @@ +# ListJobsOfBuildResponse + +ListJobsOfBuildResponse + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**data** | List[Job] | Yes | | +**next_page_token** | Optional[PageToken] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/ListRunsOfScheduleResponse.md b/docs/v2/Orchestration/models/ListRunsOfScheduleResponse.md new file mode 100644 index 000000000..c0e591241 --- /dev/null +++ b/docs/v2/Orchestration/models/ListRunsOfScheduleResponse.md @@ -0,0 +1,12 @@ +# ListRunsOfScheduleResponse + +ListRunsOfScheduleResponse + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**data** | List[ScheduleRun] | Yes | | +**next_page_token** | Optional[PageToken] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/ManualTarget.md b/docs/v2/Orchestration/models/ManualTarget.md new file mode 100644 index 000000000..4e45c5eca --- /dev/null +++ b/docs/v2/Orchestration/models/ManualTarget.md @@ -0,0 +1,12 @@ +# ManualTarget + +Manually specify all datasets to build. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**target_rids** | List[BuildableRid] | Yes | | +**type** | Literal["manual"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/ManualTrigger.md b/docs/v2/Orchestration/models/ManualTrigger.md new file mode 100644 index 000000000..c6fb3e4ef --- /dev/null +++ b/docs/v2/Orchestration/models/ManualTrigger.md @@ -0,0 +1,12 @@ +# ManualTrigger + +Only trigger the Schedule manually. If placed in an AND or OR condition, this Trigger will be ignored. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["manual"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/MediaSetUpdatedTrigger.md b/docs/v2/Orchestration/models/MediaSetUpdatedTrigger.md new file mode 100644 index 000000000..678388226 --- /dev/null +++ b/docs/v2/Orchestration/models/MediaSetUpdatedTrigger.md @@ -0,0 +1,17 @@ +# MediaSetUpdatedTrigger + +Trigger whenever an update is made to a media set on the target +branch. For transactional media sets, this happens when a transaction +is committed. For non-transactional media sets, this event happens +eventually (but not necessary immediately) after an update. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**media_set_rid** | MediaSetRid | Yes | | +**branch_name** | BranchName | Yes | | +**type** | Literal["mediaSetUpdated"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/NewLogicTrigger.md b/docs/v2/Orchestration/models/NewLogicTrigger.md new file mode 100644 index 000000000..a33538145 --- /dev/null +++ b/docs/v2/Orchestration/models/NewLogicTrigger.md @@ -0,0 +1,15 @@ +# NewLogicTrigger + +Trigger whenever a new JobSpec is put on the dataset and on +that branch. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**branch_name** | BranchName | Yes | | +**dataset_rid** | DatasetRid | Yes | | +**type** | Literal["newLogic"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/NotificationsEnabled.md b/docs/v2/Orchestration/models/NotificationsEnabled.md new file mode 100644 index 000000000..ae1feaa4a --- /dev/null +++ b/docs/v2/Orchestration/models/NotificationsEnabled.md @@ -0,0 +1,13 @@ +# NotificationsEnabled + +Whether to receive a notification at the end of the build. +The notification will be sent to the user that has most recently edited the schedule. +No notification will be sent if the schedule has `scopeMode` set to `ProjectScope`. + +## Type +```python +bool +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/OrTrigger.md b/docs/v2/Orchestration/models/OrTrigger.md new file mode 100644 index 000000000..b67f04482 --- /dev/null +++ b/docs/v2/Orchestration/models/OrTrigger.md @@ -0,0 +1,12 @@ +# OrTrigger + +Trigger whenever any of the given triggers emit an event. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**triggers** | List[Trigger] | Yes | | +**type** | Literal["or"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/ProjectScope.md b/docs/v2/Orchestration/models/ProjectScope.md new file mode 100644 index 000000000..3721a9e1a --- /dev/null +++ b/docs/v2/Orchestration/models/ProjectScope.md @@ -0,0 +1,13 @@ +# ProjectScope + +The schedule will only build resources in the following projects. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**project_rids** | List[ProjectRid] | Yes | | +**type** | Literal["project"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/ReplaceScheduleRequest.md b/docs/v2/Orchestration/models/ReplaceScheduleRequest.md new file mode 100644 index 000000000..94364cb1a --- /dev/null +++ b/docs/v2/Orchestration/models/ReplaceScheduleRequest.md @@ -0,0 +1,15 @@ +# ReplaceScheduleRequest + +ReplaceScheduleRequest + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**display_name** | Optional[str] | No | | +**description** | Optional[str] | No | | +**action** | ReplaceScheduleRequestAction | Yes | | +**trigger** | Optional[Trigger] | No | The schedule trigger. If the requesting user does not have permission to see the trigger, this will be empty. | +**scope_mode** | Optional[ReplaceScheduleRequestScopeMode] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/ReplaceScheduleRequestAction.md b/docs/v2/Orchestration/models/ReplaceScheduleRequestAction.md new file mode 100644 index 000000000..243de8c83 --- /dev/null +++ b/docs/v2/Orchestration/models/ReplaceScheduleRequestAction.md @@ -0,0 +1,18 @@ +# ReplaceScheduleRequestAction + +ReplaceScheduleRequestAction + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**abort_on_failure** | Optional[AbortOnFailure] | No | | +**force_build** | Optional[ForceBuild] | No | | +**retry_backoff_duration** | Optional[RetryBackoffDuration] | No | | +**retry_count** | Optional[RetryCount] | No | | +**fallback_branches** | Optional[FallbackBranches] | No | | +**branch_name** | Optional[BranchName] | No | The target branch the schedule should run on. | +**notifications_enabled** | Optional[NotificationsEnabled] | No | | +**target** | ReplaceScheduleRequestBuildTarget | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/ReplaceScheduleRequestBuildTarget.md b/docs/v2/Orchestration/models/ReplaceScheduleRequestBuildTarget.md new file mode 100644 index 000000000..6634fd50f --- /dev/null +++ b/docs/v2/Orchestration/models/ReplaceScheduleRequestBuildTarget.md @@ -0,0 +1,17 @@ +# ReplaceScheduleRequestBuildTarget + +The targets of the build. + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +ReplaceScheduleRequestUpstreamTarget | upstream +ReplaceScheduleRequestManualTarget | manual +ReplaceScheduleRequestConnectingTarget | connecting + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/ReplaceScheduleRequestConnectingTarget.md b/docs/v2/Orchestration/models/ReplaceScheduleRequestConnectingTarget.md new file mode 100644 index 000000000..3e72f7263 --- /dev/null +++ b/docs/v2/Orchestration/models/ReplaceScheduleRequestConnectingTarget.md @@ -0,0 +1,14 @@ +# ReplaceScheduleRequestConnectingTarget + +ReplaceScheduleRequestConnectingTarget + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**ignored_rids** | Optional[List[BuildableRid]] | No | The datasets between the input datasets and target datasets to exclude. | +**target_rids** | List[BuildableRid] | Yes | The downstream target datasets (inclusive). | +**input_rids** | List[BuildableRid] | Yes | The upstream input datasets (exclusive). | +**type** | Literal["connecting"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/ReplaceScheduleRequestManualTarget.md b/docs/v2/Orchestration/models/ReplaceScheduleRequestManualTarget.md new file mode 100644 index 000000000..b412c39bc --- /dev/null +++ b/docs/v2/Orchestration/models/ReplaceScheduleRequestManualTarget.md @@ -0,0 +1,12 @@ +# ReplaceScheduleRequestManualTarget + +ReplaceScheduleRequestManualTarget + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**target_rids** | List[BuildableRid] | Yes | | +**type** | Literal["manual"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/ReplaceScheduleRequestProjectScope.md b/docs/v2/Orchestration/models/ReplaceScheduleRequestProjectScope.md new file mode 100644 index 000000000..9cf97df4f --- /dev/null +++ b/docs/v2/Orchestration/models/ReplaceScheduleRequestProjectScope.md @@ -0,0 +1,12 @@ +# ReplaceScheduleRequestProjectScope + +ReplaceScheduleRequestProjectScope + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**project_rids** | List[ProjectRid] | Yes | | +**type** | Literal["project"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/ReplaceScheduleRequestScopeMode.md b/docs/v2/Orchestration/models/ReplaceScheduleRequestScopeMode.md new file mode 100644 index 000000000..8a297da53 --- /dev/null +++ b/docs/v2/Orchestration/models/ReplaceScheduleRequestScopeMode.md @@ -0,0 +1,16 @@ +# ReplaceScheduleRequestScopeMode + +The boundaries for the schedule build. + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +ReplaceScheduleRequestProjectScope | project +ReplaceScheduleRequestUserScope | user + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/ReplaceScheduleRequestUpstreamTarget.md b/docs/v2/Orchestration/models/ReplaceScheduleRequestUpstreamTarget.md new file mode 100644 index 000000000..5acbfb825 --- /dev/null +++ b/docs/v2/Orchestration/models/ReplaceScheduleRequestUpstreamTarget.md @@ -0,0 +1,13 @@ +# ReplaceScheduleRequestUpstreamTarget + +ReplaceScheduleRequestUpstreamTarget + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**ignored_rids** | Optional[List[BuildableRid]] | No | The datasets to ignore when calculating the final set of dataset to build. | +**target_rids** | List[BuildableRid] | Yes | The target datasets. | +**type** | Literal["upstream"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/ReplaceScheduleRequestUserScope.md b/docs/v2/Orchestration/models/ReplaceScheduleRequestUserScope.md new file mode 100644 index 000000000..83f60d4c4 --- /dev/null +++ b/docs/v2/Orchestration/models/ReplaceScheduleRequestUserScope.md @@ -0,0 +1,11 @@ +# ReplaceScheduleRequestUserScope + +ReplaceScheduleRequestUserScope + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["user"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/RetryBackoffDuration.md b/docs/v2/Orchestration/models/RetryBackoffDuration.md new file mode 100644 index 000000000..f743e6e5a --- /dev/null +++ b/docs/v2/Orchestration/models/RetryBackoffDuration.md @@ -0,0 +1,12 @@ +# RetryBackoffDuration + +The duration to wait before retrying after a Job fails. + + +## Type +```python +Duration +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/RetryCount.md b/docs/v2/Orchestration/models/RetryCount.md new file mode 100644 index 000000000..58f0456d4 --- /dev/null +++ b/docs/v2/Orchestration/models/RetryCount.md @@ -0,0 +1,14 @@ +# RetryCount + +The number of retry attempts for failed Jobs within the Build. A Job's failure is not considered final until +all retries have been attempted or an error occurs indicating that retries cannot be performed. Be aware, +not all types of failures can be retried. + + +## Type +```python +int +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/Schedule.md b/docs/v2/Orchestration/models/Schedule.md new file mode 100644 index 000000000..bf0a06fa0 --- /dev/null +++ b/docs/v2/Orchestration/models/Schedule.md @@ -0,0 +1,22 @@ +# Schedule + +Schedule + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**rid** | ScheduleRid | Yes | | +**display_name** | Optional[str] | No | | +**description** | Optional[str] | No | | +**current_version_rid** | ScheduleVersionRid | Yes | The RID of the current schedule version | +**created_time** | CreatedTime | Yes | | +**created_by** | CreatedBy | Yes | | +**updated_time** | UpdatedTime | Yes | | +**updated_by** | UpdatedBy | Yes | | +**paused** | SchedulePaused | Yes | | +**trigger** | Optional[Trigger] | No | The schedule trigger. If the requesting user does not have permission to see the trigger, this will be empty. | +**action** | Action | Yes | | +**scope_mode** | ScopeMode | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/SchedulePaused.md b/docs/v2/Orchestration/models/SchedulePaused.md new file mode 100644 index 000000000..252856589 --- /dev/null +++ b/docs/v2/Orchestration/models/SchedulePaused.md @@ -0,0 +1,11 @@ +# SchedulePaused + +SchedulePaused + +## Type +```python +bool +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/ScheduleRun.md b/docs/v2/Orchestration/models/ScheduleRun.md new file mode 100644 index 000000000..b128d6841 --- /dev/null +++ b/docs/v2/Orchestration/models/ScheduleRun.md @@ -0,0 +1,16 @@ +# ScheduleRun + +ScheduleRun + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**rid** | ScheduleRunRid | Yes | The RID of a schedule run | +**schedule_rid** | ScheduleRid | Yes | | +**schedule_version_rid** | ScheduleVersionRid | Yes | | +**created_time** | CreatedTime | Yes | The time at which the schedule run was created. | +**created_by** | Optional[CreatedBy] | No | The Foundry user who manually invoked this schedule run. Automatic trigger runs have this field set to empty. | +**result** | Optional[ScheduleRunResult] | No | The result of triggering the schedule. If empty, it means the service is still working on triggering the schedule. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/ScheduleRunError.md b/docs/v2/Orchestration/models/ScheduleRunError.md new file mode 100644 index 000000000..b4a7e4d5a --- /dev/null +++ b/docs/v2/Orchestration/models/ScheduleRunError.md @@ -0,0 +1,13 @@ +# ScheduleRunError + +An error occurred attempting to run the schedule. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**error_name** | ScheduleRunErrorName | Yes | | +**description** | str | Yes | | +**type** | Literal["error"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/ScheduleRunErrorName.md b/docs/v2/Orchestration/models/ScheduleRunErrorName.md new file mode 100644 index 000000000..e8c14463f --- /dev/null +++ b/docs/v2/Orchestration/models/ScheduleRunErrorName.md @@ -0,0 +1,16 @@ +# ScheduleRunErrorName + +ScheduleRunErrorName + +| **Value** | +| --------- | +| `"TargetResolutionFailure"` | +| `"CyclicDependency"` | +| `"IncompatibleTargets"` | +| `"PermissionDenied"` | +| `"JobSpecNotFound"` | +| `"ScheduleOwnerNotFound"` | +| `"Internal"` | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/ScheduleRunIgnored.md b/docs/v2/Orchestration/models/ScheduleRunIgnored.md new file mode 100644 index 000000000..7a347caf4 --- /dev/null +++ b/docs/v2/Orchestration/models/ScheduleRunIgnored.md @@ -0,0 +1,12 @@ +# ScheduleRunIgnored + +The schedule is not running as all targets are up-to-date. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["ignored"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/ScheduleRunResult.md b/docs/v2/Orchestration/models/ScheduleRunResult.md new file mode 100644 index 000000000..f780f213c --- /dev/null +++ b/docs/v2/Orchestration/models/ScheduleRunResult.md @@ -0,0 +1,19 @@ +# ScheduleRunResult + +The result of attempting to trigger the schedule. The schedule run will either be submitted as a build, +ignored if all targets are up-to-date or error. + + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +ScheduleRunIgnored | ignored +ScheduleRunSubmitted | submitted +ScheduleRunError | error + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/ScheduleRunRid.md b/docs/v2/Orchestration/models/ScheduleRunRid.md new file mode 100644 index 000000000..051088822 --- /dev/null +++ b/docs/v2/Orchestration/models/ScheduleRunRid.md @@ -0,0 +1,11 @@ +# ScheduleRunRid + +The RID of a schedule run + +## Type +```python +RID +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/ScheduleRunSubmitted.md b/docs/v2/Orchestration/models/ScheduleRunSubmitted.md new file mode 100644 index 000000000..fe43a08ba --- /dev/null +++ b/docs/v2/Orchestration/models/ScheduleRunSubmitted.md @@ -0,0 +1,12 @@ +# ScheduleRunSubmitted + +The schedule has been successfully triggered. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**build_rid** | BuildRid | Yes | | +**type** | Literal["submitted"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/ScheduleSucceededTrigger.md b/docs/v2/Orchestration/models/ScheduleSucceededTrigger.md new file mode 100644 index 000000000..9bee67238 --- /dev/null +++ b/docs/v2/Orchestration/models/ScheduleSucceededTrigger.md @@ -0,0 +1,14 @@ +# ScheduleSucceededTrigger + +Trigger whenever the specified schedule completes its action +successfully. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**schedule_rid** | ScheduleRid | Yes | | +**type** | Literal["scheduleSucceeded"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/ScheduleVersion.md b/docs/v2/Orchestration/models/ScheduleVersion.md new file mode 100644 index 000000000..f9a8ed921 --- /dev/null +++ b/docs/v2/Orchestration/models/ScheduleVersion.md @@ -0,0 +1,17 @@ +# ScheduleVersion + +ScheduleVersion + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**rid** | ScheduleVersionRid | Yes | The RID of a schedule version | +**schedule_rid** | ScheduleRid | Yes | | +**created_time** | CreatedTime | Yes | The time the schedule version was created | +**created_by** | CreatedBy | Yes | The Foundry user who created the schedule version | +**trigger** | Optional[Trigger] | No | | +**action** | Action | Yes | | +**scope_mode** | ScopeMode | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/ScheduleVersionRid.md b/docs/v2/Orchestration/models/ScheduleVersionRid.md new file mode 100644 index 000000000..d10d65f18 --- /dev/null +++ b/docs/v2/Orchestration/models/ScheduleVersionRid.md @@ -0,0 +1,11 @@ +# ScheduleVersionRid + +The RID of a schedule version + +## Type +```python +RID +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/ScopeMode.md b/docs/v2/Orchestration/models/ScopeMode.md new file mode 100644 index 000000000..4e1118293 --- /dev/null +++ b/docs/v2/Orchestration/models/ScopeMode.md @@ -0,0 +1,16 @@ +# ScopeMode + +The boundaries for the schedule build. + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +ProjectScope | project +UserScope | user + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/SearchBuildsAndFilter.md b/docs/v2/Orchestration/models/SearchBuildsAndFilter.md new file mode 100644 index 000000000..2b690b40e --- /dev/null +++ b/docs/v2/Orchestration/models/SearchBuildsAndFilter.md @@ -0,0 +1,12 @@ +# SearchBuildsAndFilter + +Returns the Builds where every filter is satisfied. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**items** | List[SearchBuildsFilter] | Yes | | +**type** | Literal["and"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/SearchBuildsEqualsFilter.md b/docs/v2/Orchestration/models/SearchBuildsEqualsFilter.md new file mode 100644 index 000000000..fb66bb57a --- /dev/null +++ b/docs/v2/Orchestration/models/SearchBuildsEqualsFilter.md @@ -0,0 +1,13 @@ +# SearchBuildsEqualsFilter + +SearchBuildsEqualsFilter + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**field** | SearchBuildsEqualsFilterField | Yes | | +**value** | Any | Yes | | +**type** | Literal["eq"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/SearchBuildsEqualsFilterField.md b/docs/v2/Orchestration/models/SearchBuildsEqualsFilterField.md new file mode 100644 index 000000000..8f3001df5 --- /dev/null +++ b/docs/v2/Orchestration/models/SearchBuildsEqualsFilterField.md @@ -0,0 +1,13 @@ +# SearchBuildsEqualsFilterField + +SearchBuildsEqualsFilterField + +| **Value** | +| --------- | +| `"CREATED_BY"` | +| `"BRANCH_NAME"` | +| `"STATUS"` | +| `"RID"` | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/SearchBuildsFilter.md b/docs/v2/Orchestration/models/SearchBuildsFilter.md new file mode 100644 index 000000000..0ac26e51c --- /dev/null +++ b/docs/v2/Orchestration/models/SearchBuildsFilter.md @@ -0,0 +1,20 @@ +# SearchBuildsFilter + +SearchBuildsFilter + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +SearchBuildsNotFilter | not +SearchBuildsOrFilter | or +SearchBuildsAndFilter | and +SearchBuildsLtFilter | lt +SearchBuildsGteFilter | gte +SearchBuildsEqualsFilter | eq + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/SearchBuildsGteFilter.md b/docs/v2/Orchestration/models/SearchBuildsGteFilter.md new file mode 100644 index 000000000..83fe40eb6 --- /dev/null +++ b/docs/v2/Orchestration/models/SearchBuildsGteFilter.md @@ -0,0 +1,13 @@ +# SearchBuildsGteFilter + +SearchBuildsGteFilter + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**field** | SearchBuildsGteFilterField | Yes | | +**value** | Any | Yes | | +**type** | Literal["gte"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/SearchBuildsGteFilterField.md b/docs/v2/Orchestration/models/SearchBuildsGteFilterField.md new file mode 100644 index 000000000..f9d3d2e80 --- /dev/null +++ b/docs/v2/Orchestration/models/SearchBuildsGteFilterField.md @@ -0,0 +1,11 @@ +# SearchBuildsGteFilterField + +SearchBuildsGteFilterField + +| **Value** | +| --------- | +| `"STARTED_TIME"` | +| `"FINISHED_TIME"` | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/SearchBuildsLtFilter.md b/docs/v2/Orchestration/models/SearchBuildsLtFilter.md new file mode 100644 index 000000000..039f8beb8 --- /dev/null +++ b/docs/v2/Orchestration/models/SearchBuildsLtFilter.md @@ -0,0 +1,13 @@ +# SearchBuildsLtFilter + +SearchBuildsLtFilter + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**field** | SearchBuildsLtFilterField | Yes | | +**value** | Any | Yes | | +**type** | Literal["lt"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/SearchBuildsLtFilterField.md b/docs/v2/Orchestration/models/SearchBuildsLtFilterField.md new file mode 100644 index 000000000..82c81b0cb --- /dev/null +++ b/docs/v2/Orchestration/models/SearchBuildsLtFilterField.md @@ -0,0 +1,11 @@ +# SearchBuildsLtFilterField + +SearchBuildsLtFilterField + +| **Value** | +| --------- | +| `"STARTED_TIME"` | +| `"FINISHED_TIME"` | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/SearchBuildsNotFilter.md b/docs/v2/Orchestration/models/SearchBuildsNotFilter.md new file mode 100644 index 000000000..ccde7822f --- /dev/null +++ b/docs/v2/Orchestration/models/SearchBuildsNotFilter.md @@ -0,0 +1,12 @@ +# SearchBuildsNotFilter + +Returns the Builds where the filter is not satisfied. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**value** | SearchBuildsFilter | Yes | | +**type** | Literal["not"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/SearchBuildsOrFilter.md b/docs/v2/Orchestration/models/SearchBuildsOrFilter.md new file mode 100644 index 000000000..651901116 --- /dev/null +++ b/docs/v2/Orchestration/models/SearchBuildsOrFilter.md @@ -0,0 +1,12 @@ +# SearchBuildsOrFilter + +Returns the Builds where at least one filter is satisfied. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**items** | List[SearchBuildsFilter] | Yes | | +**type** | Literal["or"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/SearchBuildsOrderBy.md b/docs/v2/Orchestration/models/SearchBuildsOrderBy.md new file mode 100644 index 000000000..630ac5154 --- /dev/null +++ b/docs/v2/Orchestration/models/SearchBuildsOrderBy.md @@ -0,0 +1,11 @@ +# SearchBuildsOrderBy + +SearchBuildsOrderBy + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**fields** | List[SearchBuildsOrderByItem] | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/SearchBuildsOrderByField.md b/docs/v2/Orchestration/models/SearchBuildsOrderByField.md new file mode 100644 index 000000000..e7792d6ae --- /dev/null +++ b/docs/v2/Orchestration/models/SearchBuildsOrderByField.md @@ -0,0 +1,11 @@ +# SearchBuildsOrderByField + +SearchBuildsOrderByField + +| **Value** | +| --------- | +| `"STARTED_TIME"` | +| `"FINISHED_TIME"` | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/SearchBuildsOrderByItem.md b/docs/v2/Orchestration/models/SearchBuildsOrderByItem.md new file mode 100644 index 000000000..cc6eda23e --- /dev/null +++ b/docs/v2/Orchestration/models/SearchBuildsOrderByItem.md @@ -0,0 +1,12 @@ +# SearchBuildsOrderByItem + +SearchBuildsOrderByItem + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**field** | SearchBuildsOrderByField | Yes | | +**direction** | OrderByDirection | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/SearchBuildsRequest.md b/docs/v2/Orchestration/models/SearchBuildsRequest.md new file mode 100644 index 000000000..871292c25 --- /dev/null +++ b/docs/v2/Orchestration/models/SearchBuildsRequest.md @@ -0,0 +1,14 @@ +# SearchBuildsRequest + +SearchBuildsRequest + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**where** | SearchBuildsFilter | Yes | | +**order_by** | Optional[SearchBuildsOrderBy] | No | | +**page_token** | Optional[PageToken] | No | | +**page_size** | Optional[PageSize] | No | The page size for the search request. If no value is provided, a default of `100` will be used. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/SearchBuildsResponse.md b/docs/v2/Orchestration/models/SearchBuildsResponse.md new file mode 100644 index 000000000..d559cf46a --- /dev/null +++ b/docs/v2/Orchestration/models/SearchBuildsResponse.md @@ -0,0 +1,12 @@ +# SearchBuildsResponse + +SearchBuildsResponse + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**data** | List[Build] | Yes | | +**next_page_token** | Optional[PageToken] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/TableUpdatedTrigger.md b/docs/v2/Orchestration/models/TableUpdatedTrigger.md new file mode 100644 index 000000000..2971c0c2f --- /dev/null +++ b/docs/v2/Orchestration/models/TableUpdatedTrigger.md @@ -0,0 +1,15 @@ +# TableUpdatedTrigger + +Trigger whenever a new transaction is committed to the +table on the target branch. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**table_rid** | TableRid | Yes | | +**branch_name** | BranchName | Yes | | +**type** | Literal["tableUpdated"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/TimeTrigger.md b/docs/v2/Orchestration/models/TimeTrigger.md new file mode 100644 index 000000000..da2f5814c --- /dev/null +++ b/docs/v2/Orchestration/models/TimeTrigger.md @@ -0,0 +1,13 @@ +# TimeTrigger + +Trigger on a time based schedule. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**cron_expression** | CronExpression | Yes | | +**time_zone** | ZoneId | Yes | | +**type** | Literal["time"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/TransactionalMediaSetJobOutput.md b/docs/v2/Orchestration/models/TransactionalMediaSetJobOutput.md new file mode 100644 index 000000000..a2ade8a84 --- /dev/null +++ b/docs/v2/Orchestration/models/TransactionalMediaSetJobOutput.md @@ -0,0 +1,13 @@ +# TransactionalMediaSetJobOutput + +TransactionalMediaSetJobOutput + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**media_set_rid** | MediaSetRid | Yes | | +**transaction_id** | Optional[str] | No | | +**type** | Literal["transactionalMediaSetJobOutput"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/Trigger.md b/docs/v2/Orchestration/models/Trigger.md new file mode 100644 index 000000000..f88911450 --- /dev/null +++ b/docs/v2/Orchestration/models/Trigger.md @@ -0,0 +1,24 @@ +# Trigger + +Trigger + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +JobSucceededTrigger | jobSucceeded +OrTrigger | or +NewLogicTrigger | newLogic +TableUpdatedTrigger | tableUpdated +AndTrigger | and +DatasetUpdatedTrigger | datasetUpdated +ScheduleSucceededTrigger | scheduleSucceeded +MediaSetUpdatedTrigger | mediaSetUpdated +TimeTrigger | time +ManualTrigger | manual + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/UpstreamTarget.md b/docs/v2/Orchestration/models/UpstreamTarget.md new file mode 100644 index 000000000..0af7fbc98 --- /dev/null +++ b/docs/v2/Orchestration/models/UpstreamTarget.md @@ -0,0 +1,13 @@ +# UpstreamTarget + +Target the specified datasets along with all upstream datasets except the ignored datasets. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**target_rids** | List[BuildableRid] | Yes | The target datasets. | +**ignored_rids** | List[BuildableRid] | Yes | The datasets to ignore when calculating the final set of dataset to build. | +**type** | Literal["upstream"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Orchestration/models/UserScope.md b/docs/v2/Orchestration/models/UserScope.md new file mode 100644 index 000000000..d4eca1555 --- /dev/null +++ b/docs/v2/Orchestration/models/UserScope.md @@ -0,0 +1,13 @@ +# UserScope + +When triggered, the schedule will build all resources that the +associated user is permitted to build. + + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["user"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/SqlQueries/SqlQuery.md b/docs/v2/SqlQueries/SqlQuery.md new file mode 100644 index 000000000..a91a4bdbb --- /dev/null +++ b/docs/v2/SqlQueries/SqlQuery.md @@ -0,0 +1,246 @@ +# SqlQuery + +Method | HTTP request | Release Stage | +------------- | ------------- | ----- | +[**cancel**](#cancel) | **POST** /v2/sqlQueries/{sqlQueryId}/cancel | Public Beta | +[**execute**](#execute) | **POST** /v2/sqlQueries/execute | Public Beta | +[**get_results**](#get_results) | **GET** /v2/sqlQueries/{sqlQueryId}/getResults | Public Beta | +[**get_status**](#get_status) | **GET** /v2/sqlQueries/{sqlQueryId}/getStatus | Public Beta | + +# **cancel** +Cancels a query. If the query is no longer running this is effectively a no-op. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**sql_query_id** | SqlQueryId | The id of a query. | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**None** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# SqlQueryId | The id of a query. +sql_query_id = None +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.sql_queries.SqlQuery.cancel(sql_query_id, preview=preview) + print("The cancel response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling SqlQuery.cancel: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**204** | None | | None | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **execute** +Executes a new query. Only the user that invoked the query can operate on the query. The size of query +results are limited by default to 1 million rows. Contact your Palantir representative to discuss limit +increases. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**query** | str | The SQL query to execute. Queries should conform to the [Spark SQL dialect](https://spark.apache.org/docs/latest/sql-ref.html). This supports SELECT queries only. Datasets can be referenced in SQL queries by path or by RID. See the [documentation](https://www.palantir.com/docs/foundry/analytics-connectivity/odbc-jdbc-drivers/#use-sql-to-query-foundry-datasets) for more details. | | +**fallback_branch_ids** | Optional[List[BranchName]] | The list of branch ids to use as fallbacks if the query fails to execute on the primary branch. If a is not explicitly provided in the SQL query, the resource will be queried on the first fallback branch provided that exists. If no fallback branches are provided the default branch is used. This is `master` for most enrollments. | [optional] | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**QueryStatus** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# str | The SQL query to execute. Queries should conform to the [Spark SQL dialect](https://spark.apache.org/docs/latest/sql-ref.html). This supports SELECT queries only. Datasets can be referenced in SQL queries by path or by RID. See the [documentation](https://www.palantir.com/docs/foundry/analytics-connectivity/odbc-jdbc-drivers/#use-sql-to-query-foundry-datasets) for more details. +query = "SELECT * FROM `/Path/To/Dataset`" +# Optional[List[BranchName]] | The list of branch ids to use as fallbacks if the query fails to execute on the primary branch. If a is not explicitly provided in the SQL query, the resource will be queried on the first fallback branch provided that exists. If no fallback branches are provided the default branch is used. This is `master` for most enrollments. +fallback_branch_ids = ["master"] +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.sql_queries.SqlQuery.execute( + query=query, fallback_branch_ids=fallback_branch_ids, preview=preview + ) + print("The execute response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling SqlQuery.execute: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | QueryStatus | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **get_results** +Gets the results of a query. The results of the query are returned in the +[Apache Arrow](https://arrow.apache.org/) format. + +This endpoint implements long polling and requests will time out after one minute. They can be safely +retried while the query is still running. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**sql_query_id** | SqlQueryId | The id of a query. | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**bytes** + +> [!TIP] +> This operation returns tabular data that can be converted to data frame formats: +> +> ```python +> # Get data in Arrow format +> table_data = client.sql_queries.SqlQuery.get_results(sql_query_id, preview=preview) +> +> # Convert to a PyArrow Table +> arrow_table = table_data.to_pyarrow() +> +> # Convert to a Pandas DataFrame +> pandas_df = table_data.to_pandas() +> +> # Convert to a Polars DataFrame +> polars_df = table_data.to_polars() +> +> # Convert to a DuckDB relation +> duckdb_relation = table_data.to_duckdb() +> ``` +> +> For more details, see the [Data Frames section](../../../README.md#data-frames) in the README. + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# SqlQueryId | The id of a query. +sql_query_id = None +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.sql_queries.SqlQuery.get_results(sql_query_id, preview=preview) + print("The get_results response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling SqlQuery.get_results: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | bytes | | application/octet-stream | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **get_status** +Gets the status of a query. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**sql_query_id** | SqlQueryId | The id of a query. | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**QueryStatus** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# SqlQueryId | The id of a query. +sql_query_id = None +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.sql_queries.SqlQuery.get_status(sql_query_id, preview=preview) + print("The get_status response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling SqlQuery.get_status: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | QueryStatus | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + diff --git a/docs/v2/SqlQueries/models/CanceledQueryStatus.md b/docs/v2/SqlQueries/models/CanceledQueryStatus.md new file mode 100644 index 000000000..cbaece177 --- /dev/null +++ b/docs/v2/SqlQueries/models/CanceledQueryStatus.md @@ -0,0 +1,11 @@ +# CanceledQueryStatus + +CanceledQueryStatus + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**type** | Literal["canceled"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/SqlQueries/models/ExecuteSqlQueryRequest.md b/docs/v2/SqlQueries/models/ExecuteSqlQueryRequest.md new file mode 100644 index 000000000..58bb613dd --- /dev/null +++ b/docs/v2/SqlQueries/models/ExecuteSqlQueryRequest.md @@ -0,0 +1,12 @@ +# ExecuteSqlQueryRequest + +ExecuteSqlQueryRequest + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**query** | str | Yes | The SQL query to execute. Queries should conform to the [Spark SQL dialect](https://spark.apache.org/docs/latest/sql-ref.html). This supports SELECT queries only. Datasets can be referenced in SQL queries by path or by RID. See the [documentation](https://www.palantir.com/docs/foundry/analytics-connectivity/odbc-jdbc-drivers/#use-sql-to-query-foundry-datasets) for more details. | +**fallback_branch_ids** | Optional[List[BranchName]] | No | The list of branch ids to use as fallbacks if the query fails to execute on the primary branch. If a is not explicitly provided in the SQL query, the resource will be queried on the first fallback branch provided that exists. If no fallback branches are provided the default branch is used. This is `master` for most enrollments. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/SqlQueries/models/FailedQueryStatus.md b/docs/v2/SqlQueries/models/FailedQueryStatus.md new file mode 100644 index 000000000..bc1436784 --- /dev/null +++ b/docs/v2/SqlQueries/models/FailedQueryStatus.md @@ -0,0 +1,12 @@ +# FailedQueryStatus + +FailedQueryStatus + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**error_message** | str | Yes | An error message describing why the query failed. | +**type** | Literal["failed"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/SqlQueries/models/QueryStatus.md b/docs/v2/SqlQueries/models/QueryStatus.md new file mode 100644 index 000000000..63dc2000c --- /dev/null +++ b/docs/v2/SqlQueries/models/QueryStatus.md @@ -0,0 +1,18 @@ +# QueryStatus + +QueryStatus + +This is a discriminator type and does not contain any fields. Instead, it is a union +of of the models listed below. + +This discriminator class uses the `type` field to differentiate between classes. + +| Class | Value +| ------------ | ------------- +RunningQueryStatus | running +CanceledQueryStatus | canceled +FailedQueryStatus | failed +SucceededQueryStatus | succeeded + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/SqlQueries/models/RunningQueryStatus.md b/docs/v2/SqlQueries/models/RunningQueryStatus.md new file mode 100644 index 000000000..8953d9b68 --- /dev/null +++ b/docs/v2/SqlQueries/models/RunningQueryStatus.md @@ -0,0 +1,12 @@ +# RunningQueryStatus + +RunningQueryStatus + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**query_id** | SqlQueryId | Yes | | +**type** | Literal["running"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/SqlQueries/models/SqlQueryId.md b/docs/v2/SqlQueries/models/SqlQueryId.md new file mode 100644 index 000000000..d0e8c3808 --- /dev/null +++ b/docs/v2/SqlQueries/models/SqlQueryId.md @@ -0,0 +1,11 @@ +# SqlQueryId + +The identifier of a SQL Query. + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/SqlQueries/models/SucceededQueryStatus.md b/docs/v2/SqlQueries/models/SucceededQueryStatus.md new file mode 100644 index 000000000..422a40fdf --- /dev/null +++ b/docs/v2/SqlQueries/models/SucceededQueryStatus.md @@ -0,0 +1,12 @@ +# SucceededQueryStatus + +SucceededQueryStatus + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**query_id** | SqlQueryId | Yes | | +**type** | Literal["succeeded"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Streams/Dataset.md b/docs/v2/Streams/Dataset.md new file mode 100644 index 000000000..c9c4fca62 --- /dev/null +++ b/docs/v2/Streams/Dataset.md @@ -0,0 +1,92 @@ +# Dataset + +Method | HTTP request | Release Stage | +------------- | ------------- | ----- | +[**create**](#create) | **POST** /v2/streams/datasets/create | Public Beta | + +# **create** +Creates a streaming dataset with a stream on the specified branch, or if no branch is specified, on the +default branch ('master' for most enrollments). For more information on streaming datasets, refer to the +[streams](https://palantir.com/docs/foundry/data-integration/streams/) user documentation. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**name** | DatasetName | | | +**parent_folder_rid** | FolderRid | | | +**schema** | StreamSchema | The Foundry schema to apply to the new stream. | | +**branch_name** | Optional[BranchName] | The branch to create the initial stream on. If not specified, the default branch will be used ('master' for most enrollments). | [optional] | +**compressed** | Optional[Compressed] | Whether or not compression is enabled for the stream. Defaults to false. | [optional] | +**partitions_count** | Optional[PartitionsCount] | The number of partitions for the Foundry stream. Generally, each partition can handle about 5 mb/s of data, so for higher volume streams, more partitions are recommended. If not specified, 1 partition is used. This value cannot be changed later. | [optional] | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | +**stream_type** | Optional[StreamType] | A conceptual representation of the expected shape of the data for a stream. HIGH_THROUGHPUT and LOW_LATENCY are not compatible with each other. Defaults to LOW_LATENCY. | [optional] | + +### Return type +**Dataset** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# DatasetName +name = "My Dataset" +# FolderRid +parent_folder_rid = "ri.compass.main.folder.c410f510-2937-420e-8ea3-8c9bcb3c1791" +# StreamSchema | The Foundry schema to apply to the new stream. +schema = { + "fields": [ + {"name": "timestamp", "schema": {"nullable": False, "dataType": {"type": "timestamp"}}}, + {"name": "value", "schema": {"nullable": False, "dataType": {"type": "string"}}}, + ], + "keyFieldNames": ["timestamp"], +} +# Optional[BranchName] | The branch to create the initial stream on. If not specified, the default branch will be used ('master' for most enrollments). +branch_name = "master" +# Optional[Compressed] | Whether or not compression is enabled for the stream. Defaults to false. +compressed = False +# Optional[PartitionsCount] | The number of partitions for the Foundry stream. Generally, each partition can handle about 5 mb/s of data, so for higher volume streams, more partitions are recommended. If not specified, 1 partition is used. This value cannot be changed later. +partitions_count = 1 +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None +# Optional[StreamType] | A conceptual representation of the expected shape of the data for a stream. HIGH_THROUGHPUT and LOW_LATENCY are not compatible with each other. Defaults to LOW_LATENCY. +stream_type = "LOW_LATENCY" + + +try: + api_response = client.streams.Dataset.create( + name=name, + parent_folder_rid=parent_folder_rid, + schema=schema, + branch_name=branch_name, + compressed=compressed, + partitions_count=partitions_count, + preview=preview, + stream_type=stream_type, + ) + print("The create response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Dataset.create: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | Dataset | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + diff --git a/docs/v2/Streams/Stream.md b/docs/v2/Streams/Stream.md new file mode 100644 index 000000000..6f1127d8a --- /dev/null +++ b/docs/v2/Streams/Stream.md @@ -0,0 +1,416 @@ +# Stream + +Method | HTTP request | Release Stage | +------------- | ------------- | ----- | +[**create**](#create) | **POST** /v2/streams/datasets/{datasetRid}/streams | Public Beta | +[**get**](#get) | **GET** /v2/streams/datasets/{datasetRid}/streams/{streamBranchName} | Public Beta | +[**publish_binary_record**](#publish_binary_record) | **POST** /v2/highScale/streams/datasets/{datasetRid}/streams/{streamBranchName}/publishBinaryRecord | Public Beta | +[**publish_record**](#publish_record) | **POST** /v2/highScale/streams/datasets/{datasetRid}/streams/{streamBranchName}/publishRecord | Public Beta | +[**publish_records**](#publish_records) | **POST** /v2/highScale/streams/datasets/{datasetRid}/streams/{streamBranchName}/publishRecords | Public Beta | +[**reset**](#reset) | **POST** /v2/streams/datasets/{datasetRid}/streams/{streamBranchName}/reset | Public Beta | + +# **create** +Creates a new branch on the backing streaming dataset, and creates a new stream on that branch. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**dataset_rid** | DatasetRid | | | +**branch_name** | BranchName | | | +**schema** | CreateStreamRequestStreamSchema | The Foundry schema for this stream. | | +**compressed** | Optional[Compressed] | Whether or not compression is enabled for the stream. Defaults to false. | [optional] | +**partitions_count** | Optional[PartitionsCount] | The number of partitions for the Foundry stream. Defaults to 1. Generally, each partition can handle about 5 mb/s of data, so for higher volume streams, more partitions are recommended. | [optional] | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | +**stream_type** | Optional[StreamType] | A conceptual representation of the expected shape of the data for a stream. HIGH_THROUGHPUT and LOW_LATENCY are not compatible with each other. Defaults to LOW_LATENCY. | [optional] | + +### Return type +**Stream** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# DatasetRid +dataset_rid = None +# BranchName +branch_name = "master" +# CreateStreamRequestStreamSchema | The Foundry schema for this stream. +schema = None +# Optional[Compressed] | Whether or not compression is enabled for the stream. Defaults to false. +compressed = False +# Optional[PartitionsCount] | The number of partitions for the Foundry stream. Defaults to 1. Generally, each partition can handle about 5 mb/s of data, so for higher volume streams, more partitions are recommended. +partitions_count = 1 +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None +# Optional[StreamType] | A conceptual representation of the expected shape of the data for a stream. HIGH_THROUGHPUT and LOW_LATENCY are not compatible with each other. Defaults to LOW_LATENCY. +stream_type = "LOW_LATENCY" + + +try: + api_response = client.streams.Dataset.Stream.create( + dataset_rid, + branch_name=branch_name, + schema=schema, + compressed=compressed, + partitions_count=partitions_count, + preview=preview, + stream_type=stream_type, + ) + print("The create response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Stream.create: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | Stream | The created Stream | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **get** +Get a stream by its branch name. If the branch does not exist, there is no stream on that branch, or the +user does not have permission to access the stream, a 404 error will be returned. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**dataset_rid** | DatasetRid | | | +**stream_branch_name** | BranchName | | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**Stream** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# DatasetRid +dataset_rid = None +# BranchName +stream_branch_name = None +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.streams.Dataset.Stream.get( + dataset_rid, stream_branch_name, preview=preview + ) + print("The get response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Stream.get: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | Stream | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **publish_binary_record** +Publish a single binary record to the stream. The stream's schema must be a single binary field. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**dataset_rid** | DatasetRid | | | +**stream_branch_name** | BranchName | | | +**body** | bytes | The binary record to publish to the stream | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | +**view_rid** | Optional[ViewRid] | If provided, this operation will only write to the stream corresponding to the specified view rid. If not provided, this operation will write to the latest stream on the branch. Providing this value is an advanced configuration, to be used when additional control over the underlying streaming data structures is needed. | [optional] | + +### Return type +**None** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# DatasetRid +dataset_rid = None +# BranchName +stream_branch_name = None +# bytes | The binary record to publish to the stream +body = None +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None +# Optional[ViewRid] | If provided, this operation will only write to the stream corresponding to the specified view rid. If not provided, this operation will write to the latest stream on the branch. Providing this value is an advanced configuration, to be used when additional control over the underlying streaming data structures is needed. +view_rid = None + + +try: + api_response = client.streams.Dataset.Stream.publish_binary_record( + dataset_rid, stream_branch_name, body, preview=preview, view_rid=view_rid + ) + print("The publish_binary_record response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Stream.publish_binary_record: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**204** | None | | None | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **publish_record** +Publish a single record to the stream. The record will be validated against the stream's schema, and +rejected if it is invalid. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**dataset_rid** | DatasetRid | | | +**stream_branch_name** | BranchName | | | +**record** | Record | The record to publish to the stream | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | +**view_rid** | Optional[ViewRid] | If provided, this endpoint will only write to the stream corresponding to the specified view rid. If not provided, this endpoint will write the latest stream on the branch. Providing this value is an advanced configuration, to be used when additional control over the underlying streaming data structures is needed. | [optional] | + +### Return type +**None** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# DatasetRid +dataset_rid = None +# BranchName +stream_branch_name = None +# Record | The record to publish to the stream +record = {"timestamp": 1731426022784, "value": "Hello, World!"} +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None +# Optional[ViewRid] | If provided, this endpoint will only write to the stream corresponding to the specified view rid. If not provided, this endpoint will write the latest stream on the branch. Providing this value is an advanced configuration, to be used when additional control over the underlying streaming data structures is needed. +view_rid = "ri.foundry-streaming.main.view.ecd4f0f6-8526-4468-9eda-14939449ad79" + + +try: + api_response = client.streams.Dataset.Stream.publish_record( + dataset_rid, stream_branch_name, record=record, preview=preview, view_rid=view_rid + ) + print("The publish_record response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Stream.publish_record: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**204** | None | | None | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **publish_records** +Publish a batch of records to the stream. The records will be validated against the stream's schema, and +the batch will be rejected if one or more of the records are invalid. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**dataset_rid** | DatasetRid | | | +**stream_branch_name** | BranchName | | | +**records** | List[Record] | The records to publish to the stream | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | +**view_rid** | Optional[ViewRid] | If provided, this endpoint will only write to the stream corresponding to the specified view rid. If not provided, this endpoint will write to the latest stream on the branch. Providing this value is an advanced configuration, to be used when additional control over the underlying streaming data structures is needed. | [optional] | + +### Return type +**None** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# DatasetRid +dataset_rid = None +# BranchName +stream_branch_name = None +# List[Record] | The records to publish to the stream +records = [{"timestamp": 1731426022784, "value": "Hello, World!"}] +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None +# Optional[ViewRid] | If provided, this endpoint will only write to the stream corresponding to the specified view rid. If not provided, this endpoint will write to the latest stream on the branch. Providing this value is an advanced configuration, to be used when additional control over the underlying streaming data structures is needed. +view_rid = "ri.foundry-streaming.main.view.ecd4f0f6-8526-4468-9eda-14939449ad79" + + +try: + api_response = client.streams.Dataset.Stream.publish_records( + dataset_rid, stream_branch_name, records=records, preview=preview, view_rid=view_rid + ) + print("The publish_records response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Stream.publish_records: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**204** | None | | None | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **reset** +Reset the stream on the given dataset branch, clearing the existing records and allowing new configurations +to be applied. + +To change the stream settings without clearing the records, update the stream settings in-platform. + +This will create a new stream view (as seen by the change of the `viewRid` on the branch), +which will be the new stream view that will be written to for the branch. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**dataset_rid** | DatasetRid | | | +**stream_branch_name** | BranchName | | | +**compressed** | Optional[Compressed] | Whether or not compression is enabled for the stream. If omitted, the compression setting of the existing stream on the branch will be used. | [optional] | +**partitions_count** | Optional[PartitionsCount] | The number of partitions for the Foundry stream. Generally, each partition can handle about 5 mb/s of data, so for higher volume streams, more partitions are recommended. If omitted, the partitions count of the existing stream on the branch will be used. | [optional] | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | +**schema** | Optional[StreamSchema] | The Foundry schema to apply to the new stream. If omitted, the schema of the existing stream on the branch will be used. | [optional] | +**stream_type** | Optional[StreamType] | A conceptual representation of the expected shape of the data for a stream. HIGH_THROUGHPUT and LOW_LATENCY are not compatible with each other. Defaults to LOW_LATENCY. If omitted, the stream type of the existing stream on the branch will be used. | [optional] | + +### Return type +**Stream** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# DatasetRid +dataset_rid = None +# BranchName +stream_branch_name = None +# Optional[Compressed] | Whether or not compression is enabled for the stream. If omitted, the compression setting of the existing stream on the branch will be used. +compressed = False +# Optional[PartitionsCount] | The number of partitions for the Foundry stream. Generally, each partition can handle about 5 mb/s of data, so for higher volume streams, more partitions are recommended. If omitted, the partitions count of the existing stream on the branch will be used. +partitions_count = 1 +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None +# Optional[StreamSchema] | The Foundry schema to apply to the new stream. If omitted, the schema of the existing stream on the branch will be used. +schema = { + "fields": [ + {"name": "timestamp", "schema": {"nullable": False, "dataType": {"type": "timestamp"}}}, + {"name": "value", "schema": {"nullable": False, "dataType": {"type": "string"}}}, + ], + "keyFieldNames": ["timestamp"], +} +# Optional[StreamType] | A conceptual representation of the expected shape of the data for a stream. HIGH_THROUGHPUT and LOW_LATENCY are not compatible with each other. Defaults to LOW_LATENCY. If omitted, the stream type of the existing stream on the branch will be used. +stream_type = "LOW_LATENCY" + + +try: + api_response = client.streams.Dataset.Stream.reset( + dataset_rid, + stream_branch_name, + compressed=compressed, + partitions_count=partitions_count, + preview=preview, + schema=schema, + stream_type=stream_type, + ) + print("The reset response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Stream.reset: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | Stream | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + diff --git a/docs/v2/Streams/models/Compressed.md b/docs/v2/Streams/models/Compressed.md new file mode 100644 index 000000000..1f383af02 --- /dev/null +++ b/docs/v2/Streams/models/Compressed.md @@ -0,0 +1,15 @@ +# Compressed + +Compression helps reduce the size of the data being sent, resulting in lower network usage and +storage, at the cost of some additional CPU usage for compression and decompression. This stream type +is only recommended if your stream contains a high volume of repetitive strings and is experiencing poor +network bandwidth symptoms like non-zero lag, lower than expected throughput, or dropped records. + + +## Type +```python +bool +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Streams/models/CreateStreamRequest.md b/docs/v2/Streams/models/CreateStreamRequest.md new file mode 100644 index 000000000..153c4cb55 --- /dev/null +++ b/docs/v2/Streams/models/CreateStreamRequest.md @@ -0,0 +1,15 @@ +# CreateStreamRequest + +CreateStreamRequest + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**schema_** | CreateStreamRequestStreamSchema | Yes | The Foundry schema for this stream. | +**partitions_count** | Optional[PartitionsCount] | No | The number of partitions for the Foundry stream. Defaults to 1. Generally, each partition can handle about 5 mb/s of data, so for higher volume streams, more partitions are recommended. | +**stream_type** | Optional[StreamType] | No | A conceptual representation of the expected shape of the data for a stream. HIGH_THROUGHPUT and LOW_LATENCY are not compatible with each other. Defaults to LOW_LATENCY. | +**branch_name** | BranchName | Yes | | +**compressed** | Optional[Compressed] | No | Whether or not compression is enabled for the stream. Defaults to false. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Streams/models/CreateStreamRequestStreamSchema.md b/docs/v2/Streams/models/CreateStreamRequestStreamSchema.md new file mode 100644 index 000000000..eb2b02be5 --- /dev/null +++ b/docs/v2/Streams/models/CreateStreamRequestStreamSchema.md @@ -0,0 +1,13 @@ +# CreateStreamRequestStreamSchema + +CreateStreamRequestStreamSchema + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**key_field_names** | Optional[List[FieldName]] | No | The names of the fields to be used as keys for partitioning records. These key fields are used to group all records with the same key into the same partition, to guarantee processing order of grouped records. These keys are not meant to uniquely identify records, and do not by themselves deduplicate records. To deduplicate records, provide a change data capture configuration for the schema. Key fields can only be of the following types: - Boolean - Byte - Date - Decimal - Integer - Long - Short - String - Timestamp For additional information on keys for Foundry streams, see the [streaming keys](https://palantir.com/docs/foundry/building-pipelines/streaming-keys/) user documentation. | +**fields** | List[Field] | Yes | | +**change_data_capture** | Optional[ChangeDataCaptureConfiguration] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Streams/models/CreateStreamingDatasetRequest.md b/docs/v2/Streams/models/CreateStreamingDatasetRequest.md new file mode 100644 index 000000000..74bf3cb5b --- /dev/null +++ b/docs/v2/Streams/models/CreateStreamingDatasetRequest.md @@ -0,0 +1,17 @@ +# CreateStreamingDatasetRequest + +CreateStreamingDatasetRequest + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**name** | DatasetName | Yes | | +**parent_folder_rid** | FolderRid | Yes | | +**schema_** | StreamSchema | Yes | The Foundry schema to apply to the new stream. | +**branch_name** | Optional[BranchName] | No | The branch to create the initial stream on. If not specified, the default branch will be used ('master' for most enrollments). | +**partitions_count** | Optional[PartitionsCount] | No | The number of partitions for the Foundry stream. Generally, each partition can handle about 5 mb/s of data, so for higher volume streams, more partitions are recommended. If not specified, 1 partition is used. This value cannot be changed later. | +**stream_type** | Optional[StreamType] | No | A conceptual representation of the expected shape of the data for a stream. HIGH_THROUGHPUT and LOW_LATENCY are not compatible with each other. Defaults to LOW_LATENCY. | +**compressed** | Optional[Compressed] | No | Whether or not compression is enabled for the stream. Defaults to false. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Streams/models/Dataset.md b/docs/v2/Streams/models/Dataset.md new file mode 100644 index 000000000..ab30e61ee --- /dev/null +++ b/docs/v2/Streams/models/Dataset.md @@ -0,0 +1,13 @@ +# Dataset + +Dataset + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**rid** | DatasetRid | Yes | | +**name** | DatasetName | Yes | | +**parent_folder_rid** | FolderRid | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Streams/models/PartitionsCount.md b/docs/v2/Streams/models/PartitionsCount.md new file mode 100644 index 000000000..de2394c96 --- /dev/null +++ b/docs/v2/Streams/models/PartitionsCount.md @@ -0,0 +1,12 @@ +# PartitionsCount + +The number of partitions for a Foundry stream. + + +## Type +```python +int +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Streams/models/PublishRecordToStreamRequest.md b/docs/v2/Streams/models/PublishRecordToStreamRequest.md new file mode 100644 index 000000000..4760b230d --- /dev/null +++ b/docs/v2/Streams/models/PublishRecordToStreamRequest.md @@ -0,0 +1,12 @@ +# PublishRecordToStreamRequest + +PublishRecordToStreamRequest + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**record** | Record | Yes | The record to publish to the stream | +**view_rid** | Optional[ViewRid] | No | If provided, this endpoint will only write to the stream corresponding to the specified view rid. If not provided, this endpoint will write the latest stream on the branch. Providing this value is an advanced configuration, to be used when additional control over the underlying streaming data structures is needed. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Streams/models/PublishRecordsToStreamRequest.md b/docs/v2/Streams/models/PublishRecordsToStreamRequest.md new file mode 100644 index 000000000..176128a77 --- /dev/null +++ b/docs/v2/Streams/models/PublishRecordsToStreamRequest.md @@ -0,0 +1,12 @@ +# PublishRecordsToStreamRequest + +PublishRecordsToStreamRequest + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**records** | List[Record] | Yes | The records to publish to the stream | +**view_rid** | Optional[ViewRid] | No | If provided, this endpoint will only write to the stream corresponding to the specified view rid. If not provided, this endpoint will write to the latest stream on the branch. Providing this value is an advanced configuration, to be used when additional control over the underlying streaming data structures is needed. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Streams/models/Record.md b/docs/v2/Streams/models/Record.md new file mode 100644 index 000000000..501f4133f --- /dev/null +++ b/docs/v2/Streams/models/Record.md @@ -0,0 +1,12 @@ +# Record + +A record to be published to a stream. + + +## Type +```python +Dict[str, Optional[Any]] +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Streams/models/ResetStreamRequest.md b/docs/v2/Streams/models/ResetStreamRequest.md new file mode 100644 index 000000000..db9d00cbb --- /dev/null +++ b/docs/v2/Streams/models/ResetStreamRequest.md @@ -0,0 +1,14 @@ +# ResetStreamRequest + +ResetStreamRequest + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**schema_** | Optional[StreamSchema] | No | The Foundry schema to apply to the new stream. If omitted, the schema of the existing stream on the branch will be used. | +**partitions_count** | Optional[PartitionsCount] | No | The number of partitions for the Foundry stream. Generally, each partition can handle about 5 mb/s of data, so for higher volume streams, more partitions are recommended. If omitted, the partitions count of the existing stream on the branch will be used. | +**stream_type** | Optional[StreamType] | No | A conceptual representation of the expected shape of the data for a stream. HIGH_THROUGHPUT and LOW_LATENCY are not compatible with each other. Defaults to LOW_LATENCY. If omitted, the stream type of the existing stream on the branch will be used. | +**compressed** | Optional[Compressed] | No | Whether or not compression is enabled for the stream. If omitted, the compression setting of the existing stream on the branch will be used. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Streams/models/Stream.md b/docs/v2/Streams/models/Stream.md new file mode 100644 index 000000000..8159b6b23 --- /dev/null +++ b/docs/v2/Streams/models/Stream.md @@ -0,0 +1,16 @@ +# Stream + +Stream + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**branch_name** | BranchName | Yes | | +**schema_** | StreamSchema | Yes | The Foundry schema for this stream. | +**view_rid** | ViewRid | Yes | The view that this stream corresponds to. | +**partitions_count** | PartitionsCount | Yes | The number of partitions for the Foundry stream. Defaults to 1. Generally, each partition can handle about 5 mb/s of data, so for higher volume streams, more partitions are recommended. | +**stream_type** | StreamType | Yes | A conceptual representation of the expected shape of the data for a stream. HIGH_THROUGHPUT and LOW_LATENCY are not compatible with each other. Defaults to LOW_LATENCY. | +**compressed** | Compressed | Yes | Whether or not compression is enabled for the stream. Defaults to false. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Streams/models/StreamType.md b/docs/v2/Streams/models/StreamType.md new file mode 100644 index 000000000..6c13b49db --- /dev/null +++ b/docs/v2/Streams/models/StreamType.md @@ -0,0 +1,22 @@ +# StreamType + +LOW_LATENCY: The default stream type. Recommended for most use cases. + +HIGH_THROUGHPUT: Best for streams that send large amounts of data every second. Using this stream type might +introduce some non-zero latency at the expense of a higher throughput. This stream type is only +recommended if you inspect your stream metrics in-platform and observe that the average batch size is equal +to the max match size, or if jobs using the stream are failing due to Kafka producer batches expiring. For +additional information on inspecting stream metrics, refer to the +(stream monitoring)[/docs/foundry/data-integration/stream-monitoring/#viewing-metrics] documentation. + +For more information, refer to the [stream types](https://palantir.com/docs/foundry/data-integration/streams/#stream-types) +documentation. + + +| **Value** | +| --------- | +| `"LOW_LATENCY"` | +| `"HIGH_THROUGHPUT"` | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Streams/models/ViewRid.md b/docs/v2/Streams/models/ViewRid.md new file mode 100644 index 000000000..ada8e0b88 --- /dev/null +++ b/docs/v2/Streams/models/ViewRid.md @@ -0,0 +1,12 @@ +# ViewRid + +The resource identifier (RID) of the view that represents a stream. + + +## Type +```python +RID +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/ThirdPartyApplications/ThirdPartyApplication.md b/docs/v2/ThirdPartyApplications/ThirdPartyApplication.md new file mode 100644 index 000000000..c0a298832 --- /dev/null +++ b/docs/v2/ThirdPartyApplications/ThirdPartyApplication.md @@ -0,0 +1,60 @@ +# ThirdPartyApplication + +Method | HTTP request | Release Stage | +------------- | ------------- | ----- | +[**get**](#get) | **GET** /v2/thirdPartyApplications/{thirdPartyApplicationRid} | Private Beta | + +# **get** +Get the ThirdPartyApplication with the specified rid. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**third_party_application_rid** | ThirdPartyApplicationRid | An RID identifying a third-party application created in Developer Console. | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**ThirdPartyApplication** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# ThirdPartyApplicationRid | An RID identifying a third-party application created in Developer Console. +third_party_application_rid = ( + "ri.third-party-applications.main.application.292db3b2-b653-4de6-971c-7e97a7b881d6" +) +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.third_party_applications.ThirdPartyApplication.get( + third_party_application_rid, preview=preview + ) + print("The get response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling ThirdPartyApplication.get: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | ThirdPartyApplication | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + diff --git a/docs/v2/ThirdPartyApplications/Version.md b/docs/v2/ThirdPartyApplications/Version.md new file mode 100644 index 000000000..d31e98723 --- /dev/null +++ b/docs/v2/ThirdPartyApplications/Version.md @@ -0,0 +1,305 @@ +# Version + +Method | HTTP request | Release Stage | +------------- | ------------- | ----- | +[**delete**](#delete) | **DELETE** /v2/thirdPartyApplications/{thirdPartyApplicationRid}/website/versions/{versionVersion} | Stable | +[**get**](#get) | **GET** /v2/thirdPartyApplications/{thirdPartyApplicationRid}/website/versions/{versionVersion} | Stable | +[**list**](#list) | **GET** /v2/thirdPartyApplications/{thirdPartyApplicationRid}/website/versions | Stable | +[**upload**](#upload) | **POST** /v2/thirdPartyApplications/{thirdPartyApplicationRid}/website/versions/upload | Stable | +[**upload_snapshot**](#upload_snapshot) | **POST** /v2/thirdPartyApplications/{thirdPartyApplicationRid}/website/versions/uploadSnapshot | Private Beta | + +# **delete** +Delete the Version with the specified version. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**third_party_application_rid** | ThirdPartyApplicationRid | An RID identifying a third-party application created in Developer Console. | | +**version_version** | VersionVersion | The semantic version of the Website. | | + +### Return type +**None** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# ThirdPartyApplicationRid | An RID identifying a third-party application created in Developer Console. +third_party_application_rid = ( + "ri.third-party-applications.main.application.292db3b2-b653-4de6-971c-7e97a7b881d6" +) +# VersionVersion | The semantic version of the Website. +version_version = "1.2.0" + + +try: + api_response = client.third_party_applications.ThirdPartyApplication.Website.Version.delete( + third_party_application_rid, version_version + ) + print("The delete response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Version.delete: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**204** | None | | None | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **get** +Get the Version with the specified version. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**third_party_application_rid** | ThirdPartyApplicationRid | An RID identifying a third-party application created in Developer Console. | | +**version_version** | VersionVersion | The semantic version of the Website. | | + +### Return type +**Version** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# ThirdPartyApplicationRid | An RID identifying a third-party application created in Developer Console. +third_party_application_rid = ( + "ri.third-party-applications.main.application.292db3b2-b653-4de6-971c-7e97a7b881d6" +) +# VersionVersion | The semantic version of the Website. +version_version = "1.2.0" + + +try: + api_response = client.third_party_applications.ThirdPartyApplication.Website.Version.get( + third_party_application_rid, version_version + ) + print("The get response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Version.get: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | Version | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **list** +Lists all Versions. + +This is a paged endpoint. Each page may be smaller or larger than the requested page size. However, it is guaranteed that if there are more results available, the `nextPageToken` field will be populated. To get the next page, make the same request again, but set the value of the `pageToken` query parameter to be value of the `nextPageToken` value of the previous response. If there is no `nextPageToken` field in the response, you are on the last page. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**third_party_application_rid** | ThirdPartyApplicationRid | An RID identifying a third-party application created in Developer Console. | | +**page_size** | Optional[PageSize] | The page size to use for the endpoint. | [optional] | +**page_token** | Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. | [optional] | + +### Return type +**ListVersionsResponse** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# ThirdPartyApplicationRid | An RID identifying a third-party application created in Developer Console. +third_party_application_rid = ( + "ri.third-party-applications.main.application.292db3b2-b653-4de6-971c-7e97a7b881d6" +) +# Optional[PageSize] | The page size to use for the endpoint. +page_size = None +# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. +page_token = None + + +try: + for version in client.third_party_applications.ThirdPartyApplication.Website.Version.list( + third_party_application_rid, page_size=page_size, page_token=page_token + ): + pprint(version) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Version.list: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | ListVersionsResponse | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **upload** +Upload a new version of the Website. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**third_party_application_rid** | ThirdPartyApplicationRid | An RID identifying a third-party application created in Developer Console. | | +**body** | bytes | The zip file that contains the contents of your application. For more information, refer to the [documentation](https://palantir.com/docs/foundry/ontology-sdk/deploy-osdk-application-on-foundry/) user documentation. | | +**version** | VersionVersion | | | + +### Return type +**Version** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# ThirdPartyApplicationRid | An RID identifying a third-party application created in Developer Console. +third_party_application_rid = ( + "ri.third-party-applications.main.application.292db3b2-b653-4de6-971c-7e97a7b881d6" +) +# bytes | The zip file that contains the contents of your application. For more information, refer to the [documentation](https://palantir.com/docs/foundry/ontology-sdk/deploy-osdk-application-on-foundry/) user documentation. +body = None +# VersionVersion +version = None + + +try: + api_response = client.third_party_applications.ThirdPartyApplication.Website.Version.upload( + third_party_application_rid, body, version=version + ) + print("The upload response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Version.upload: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | Version | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **upload_snapshot** +Upload a snapshot version of the Website. Snapshot versions are automatically deleted after two days. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**third_party_application_rid** | ThirdPartyApplicationRid | An RID identifying a third-party application created in Developer Console. | | +**body** | bytes | The zip file that contains the contents of your application. For more information, refer to the [documentation](https://palantir.com/docs/foundry/ontology-sdk/deploy-osdk-application-on-foundry/) user documentation. | | +**version** | VersionVersion | | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | +**snapshot_identifier** | Optional[str] | The identifier of the snapshot. If the identifier follows the format `foundry.v1@@@`, PR preview for such identifier will be accessible from foundry code repositories. | [optional] | + +### Return type +**Version** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# ThirdPartyApplicationRid | An RID identifying a third-party application created in Developer Console. +third_party_application_rid = ( + "ri.third-party-applications.main.application.292db3b2-b653-4de6-971c-7e97a7b881d6" +) +# bytes | The zip file that contains the contents of your application. For more information, refer to the [documentation](https://palantir.com/docs/foundry/ontology-sdk/deploy-osdk-application-on-foundry/) user documentation. +body = None +# VersionVersion +version = None +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None +# Optional[str] | The identifier of the snapshot. If the identifier follows the format `foundry.v1@@@`, PR preview for such identifier will be accessible from foundry code repositories. +snapshot_identifier = ( + "foundry.v1@ri.stemma.main.repository.a@ri.pull-request.main.pull-request.a@hash" +) + + +try: + api_response = ( + client.third_party_applications.ThirdPartyApplication.Website.Version.upload_snapshot( + third_party_application_rid, + body, + version=version, + preview=preview, + snapshot_identifier=snapshot_identifier, + ) + ) + print("The upload_snapshot response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Version.upload_snapshot: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | Version | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + diff --git a/docs/v2/ThirdPartyApplications/Website.md b/docs/v2/ThirdPartyApplications/Website.md new file mode 100644 index 000000000..e439145ac --- /dev/null +++ b/docs/v2/ThirdPartyApplications/Website.md @@ -0,0 +1,164 @@ +# Website + +Method | HTTP request | Release Stage | +------------- | ------------- | ----- | +[**deploy**](#deploy) | **POST** /v2/thirdPartyApplications/{thirdPartyApplicationRid}/website/deploy | Stable | +[**get**](#get) | **GET** /v2/thirdPartyApplications/{thirdPartyApplicationRid}/website | Stable | +[**undeploy**](#undeploy) | **POST** /v2/thirdPartyApplications/{thirdPartyApplicationRid}/website/undeploy | Stable | + +# **deploy** +Deploy a version of the Website. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**third_party_application_rid** | ThirdPartyApplicationRid | An RID identifying a third-party application created in Developer Console. | | +**version** | VersionVersion | | | + +### Return type +**Website** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# ThirdPartyApplicationRid | An RID identifying a third-party application created in Developer Console. +third_party_application_rid = ( + "ri.third-party-applications.main.application.292db3b2-b653-4de6-971c-7e97a7b881d6" +) +# VersionVersion +version = "1.2.0" + + +try: + api_response = client.third_party_applications.ThirdPartyApplication.Website.deploy( + third_party_application_rid, version=version + ) + print("The deploy response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Website.deploy: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | Website | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **get** +Get the Website. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**third_party_application_rid** | ThirdPartyApplicationRid | An RID identifying a third-party application created in Developer Console. | | + +### Return type +**Website** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# ThirdPartyApplicationRid | An RID identifying a third-party application created in Developer Console. +third_party_application_rid = ( + "ri.third-party-applications.main.application.292db3b2-b653-4de6-971c-7e97a7b881d6" +) + + +try: + api_response = client.third_party_applications.ThirdPartyApplication.Website.get( + third_party_application_rid + ) + print("The get response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Website.get: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | Website | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **undeploy** +Remove the currently deployed version of the Website. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**third_party_application_rid** | ThirdPartyApplicationRid | An RID identifying a third-party application created in Developer Console. | | + +### Return type +**Website** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# ThirdPartyApplicationRid | An RID identifying a third-party application created in Developer Console. +third_party_application_rid = ( + "ri.third-party-applications.main.application.292db3b2-b653-4de6-971c-7e97a7b881d6" +) + + +try: + api_response = client.third_party_applications.ThirdPartyApplication.Website.undeploy( + third_party_application_rid + ) + print("The undeploy response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Website.undeploy: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | Website | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + diff --git a/docs/v2/ThirdPartyApplications/models/DeployWebsiteRequest.md b/docs/v2/ThirdPartyApplications/models/DeployWebsiteRequest.md new file mode 100644 index 000000000..aa158050b --- /dev/null +++ b/docs/v2/ThirdPartyApplications/models/DeployWebsiteRequest.md @@ -0,0 +1,11 @@ +# DeployWebsiteRequest + +DeployWebsiteRequest + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**version** | VersionVersion | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/ThirdPartyApplications/models/ListVersionsResponse.md b/docs/v2/ThirdPartyApplications/models/ListVersionsResponse.md new file mode 100644 index 000000000..48e6eefeb --- /dev/null +++ b/docs/v2/ThirdPartyApplications/models/ListVersionsResponse.md @@ -0,0 +1,12 @@ +# ListVersionsResponse + +ListVersionsResponse + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**data** | List[Version] | Yes | | +**next_page_token** | Optional[PageToken] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/ThirdPartyApplications/models/Subdomain.md b/docs/v2/ThirdPartyApplications/models/Subdomain.md new file mode 100644 index 000000000..1800c3c5e --- /dev/null +++ b/docs/v2/ThirdPartyApplications/models/Subdomain.md @@ -0,0 +1,11 @@ +# Subdomain + +A subdomain from which a website is served. + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/ThirdPartyApplications/models/ThirdPartyApplication.md b/docs/v2/ThirdPartyApplications/models/ThirdPartyApplication.md new file mode 100644 index 000000000..9e347d0a6 --- /dev/null +++ b/docs/v2/ThirdPartyApplications/models/ThirdPartyApplication.md @@ -0,0 +1,11 @@ +# ThirdPartyApplication + +ThirdPartyApplication + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**rid** | ThirdPartyApplicationRid | Yes | An RID identifying a third-party application created in Developer Console. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/ThirdPartyApplications/models/ThirdPartyApplicationRid.md b/docs/v2/ThirdPartyApplications/models/ThirdPartyApplicationRid.md new file mode 100644 index 000000000..a8e9754f1 --- /dev/null +++ b/docs/v2/ThirdPartyApplications/models/ThirdPartyApplicationRid.md @@ -0,0 +1,11 @@ +# ThirdPartyApplicationRid + +An RID identifying a third-party application created in Developer Console. + +## Type +```python +RID +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/ThirdPartyApplications/models/Version.md b/docs/v2/ThirdPartyApplications/models/Version.md new file mode 100644 index 000000000..6048048bf --- /dev/null +++ b/docs/v2/ThirdPartyApplications/models/Version.md @@ -0,0 +1,11 @@ +# Version + +Version + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**version** | VersionVersion | Yes | The semantic version of the Website. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/ThirdPartyApplications/models/VersionVersion.md b/docs/v2/ThirdPartyApplications/models/VersionVersion.md new file mode 100644 index 000000000..d261949d6 --- /dev/null +++ b/docs/v2/ThirdPartyApplications/models/VersionVersion.md @@ -0,0 +1,11 @@ +# VersionVersion + +The semantic version of the Website. + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/ThirdPartyApplications/models/Website.md b/docs/v2/ThirdPartyApplications/models/Website.md new file mode 100644 index 000000000..d247582a5 --- /dev/null +++ b/docs/v2/ThirdPartyApplications/models/Website.md @@ -0,0 +1,12 @@ +# Website + +Website + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**deployed_version** | Optional[VersionVersion] | No | The version of the Website that is currently deployed. | +**subdomains** | List[Subdomain] | Yes | The subdomains from which the Website is currently served. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Widgets/DevModeSettings.md b/docs/v2/Widgets/DevModeSettings.md new file mode 100644 index 000000000..7838b903a --- /dev/null +++ b/docs/v2/Widgets/DevModeSettings.md @@ -0,0 +1,325 @@ +# DevModeSettings + +Method | HTTP request | Release Stage | +------------- | ------------- | ----- | +[**disable**](#disable) | **POST** /v2/widgets/devModeSettings/disable | Private Beta | +[**enable**](#enable) | **POST** /v2/widgets/devModeSettings/enable | Private Beta | +[**get**](#get) | **GET** /v2/widgets/devModeSettings | Private Beta | +[**pause**](#pause) | **POST** /v2/widgets/devModeSettings/pause | Private Beta | +[**set_widget_set**](#set_widget_set) | **POST** /v2/widgets/devModeSettings/setWidgetSet | Private Beta | +[**set_widget_set_by_id**](#set_widget_set_by_id) | **POST** /v2/widgets/devModeSettings/setWidgetSetById | Private Beta | + +# **disable** +Disable dev mode for the user associated with the provided token. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**DevModeSettings** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.widgets.DevModeSettings.disable(preview=preview) + print("The disable response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling DevModeSettings.disable: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | DevModeSettings | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **enable** +Enable dev mode for the user associated with the provided token. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**DevModeSettings** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.widgets.DevModeSettings.enable(preview=preview) + print("The enable response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling DevModeSettings.enable: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | DevModeSettings | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **get** +Get the dev mode settings for the user associated with the provided token. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**DevModeSettings** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.widgets.DevModeSettings.get(preview=preview) + print("The get response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling DevModeSettings.get: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | DevModeSettings | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **pause** +Pause dev mode for the user associated with the provided token. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**DevModeSettings** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.widgets.DevModeSettings.pause(preview=preview) + print("The pause response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling DevModeSettings.pause: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | DevModeSettings | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **set_widget_set** +Set the dev mode settings for the given widget set for the user associated with the provided token. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**settings** | WidgetSetDevModeSettings | | | +**widget_set_rid** | WidgetSetRid | | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**DevModeSettings** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# WidgetSetDevModeSettings +settings = { + "widgetSettings": { + "ri.widgetregistry..widget.21dt2c42-b7df-4b23-880b-1436a3dred2e": { + "stylesheetEntrypoints": [{"filePath": "dist/app.js"}], + "scriptEntrypoints": [{"filePath": "dist/app.js", "scriptType": "DEFAULT"}], + } + } +} +# WidgetSetRid +widget_set_rid = "ri.widgetregistry..widget-set.21dt2c42-b7df-4b23-880b-1436a3dred2e" +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.widgets.DevModeSettings.set_widget_set( + settings=settings, widget_set_rid=widget_set_rid, preview=preview + ) + print("The set_widget_set response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling DevModeSettings.set_widget_set: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | DevModeSettings | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **set_widget_set_by_id** +Set the dev mode settings for the given widget set for the user associated with the +provided token. Uses widget IDs to identify widgets within the set. + + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**settings** | WidgetSetDevModeSettingsById | | | +**widget_set_rid** | WidgetSetRid | | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**DevModeSettings** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# WidgetSetDevModeSettingsById +settings = { + "widgetSettings": { + "myCustomWidget": { + "stylesheetEntrypoints": [{"filePath": "dist/app.js"}], + "scriptEntrypoints": [{"filePath": "dist/app.js", "scriptType": "DEFAULT"}], + } + } +} +# WidgetSetRid +widget_set_rid = "ri.widgetregistry..widget-set.21dt2c42-b7df-4b23-880b-1436a3dred2e" +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.widgets.DevModeSettings.set_widget_set_by_id( + settings=settings, widget_set_rid=widget_set_rid, preview=preview + ) + print("The set_widget_set_by_id response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling DevModeSettings.set_widget_set_by_id: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | DevModeSettings | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + diff --git a/docs/v2/Widgets/Release.md b/docs/v2/Widgets/Release.md new file mode 100644 index 000000000..bbc6a5307 --- /dev/null +++ b/docs/v2/Widgets/Release.md @@ -0,0 +1,177 @@ +# Release + +Method | HTTP request | Release Stage | +------------- | ------------- | ----- | +[**delete**](#delete) | **DELETE** /v2/widgets/widgetSets/{widgetSetRid}/releases/{releaseVersion} | Private Beta | +[**get**](#get) | **GET** /v2/widgets/widgetSets/{widgetSetRid}/releases/{releaseVersion} | Private Beta | +[**list**](#list) | **GET** /v2/widgets/widgetSets/{widgetSetRid}/releases | Private Beta | + +# **delete** +Delete the Release with the specified version. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**widget_set_rid** | WidgetSetRid | A Resource Identifier (RID) identifying a widget set. | | +**release_version** | ReleaseVersion | The semantic version of the widget set. | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**None** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# WidgetSetRid | A Resource Identifier (RID) identifying a widget set. +widget_set_rid = "ri.widgetregistry..widget-set.21dt2c42-b7df-4b23-880b-1436a3dred2e" +# ReleaseVersion | The semantic version of the widget set. +release_version = "1.2.0" +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.widgets.WidgetSet.Release.delete( + widget_set_rid, release_version, preview=preview + ) + print("The delete response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Release.delete: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**204** | None | | None | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **get** +Get the Release with the specified version. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**widget_set_rid** | WidgetSetRid | A Resource Identifier (RID) identifying a widget set. | | +**release_version** | ReleaseVersion | The semantic version of the widget set. | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**Release** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# WidgetSetRid | A Resource Identifier (RID) identifying a widget set. +widget_set_rid = "ri.widgetregistry..widget-set.21dt2c42-b7df-4b23-880b-1436a3dred2e" +# ReleaseVersion | The semantic version of the widget set. +release_version = "1.2.0" +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.widgets.WidgetSet.Release.get( + widget_set_rid, release_version, preview=preview + ) + print("The get response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Release.get: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | Release | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **list** +Lists all Releases. + +This is a paged endpoint. Each page may be smaller or larger than the requested page size. However, it is guaranteed that if there are more results available, the `nextPageToken` field will be populated. To get the next page, make the same request again, but set the value of the `pageToken` query parameter to be value of the `nextPageToken` value of the previous response. If there is no `nextPageToken` field in the response, you are on the last page. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**widget_set_rid** | WidgetSetRid | A Resource Identifier (RID) identifying a widget set. | | +**page_size** | Optional[PageSize] | The page size to use for the endpoint. | [optional] | +**page_token** | Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. | [optional] | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**ListReleasesResponse** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# WidgetSetRid | A Resource Identifier (RID) identifying a widget set. +widget_set_rid = "ri.widgetregistry..widget-set.21dt2c42-b7df-4b23-880b-1436a3dred2e" +# Optional[PageSize] | The page size to use for the endpoint. +page_size = None +# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. +page_token = None +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + for release in client.widgets.WidgetSet.Release.list( + widget_set_rid, page_size=page_size, page_token=page_token, preview=preview + ): + pprint(release) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Release.list: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | ListReleasesResponse | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + diff --git a/docs/v2/Widgets/Repository.md b/docs/v2/Widgets/Repository.md new file mode 100644 index 000000000..de2ae68e4 --- /dev/null +++ b/docs/v2/Widgets/Repository.md @@ -0,0 +1,115 @@ +# Repository + +Method | HTTP request | Release Stage | +------------- | ------------- | ----- | +[**get**](#get) | **GET** /v2/widgets/repositories/{repositoryRid} | Private Beta | +[**publish**](#publish) | **POST** /v2/widgets/repositories/{repositoryRid}/publish | Private Beta | + +# **get** +Get the Repository with the specified rid. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**repository_rid** | RepositoryRid | A Resource Identifier (RID) identifying a repository. | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**Repository** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# RepositoryRid | A Resource Identifier (RID) identifying a repository. +repository_rid = "ri.stemma.main.repository.e1r31370-3cf3-4ac4-9269-h1432d7fb0b4" +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.widgets.Repository.get(repository_rid, preview=preview) + print("The get response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Repository.get: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | Repository | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + +# **publish** +Publish a new release of a widget set. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**repository_rid** | RepositoryRid | A Resource Identifier (RID) identifying a repository. | | +**body** | bytes | The zip file that contains the contents of your widget set. It must include a valid manifest file at the path `.palantir/widgets.config.json`. | | +**repository_version** | RepositoryVersion | | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**Release** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# RepositoryRid | A Resource Identifier (RID) identifying a repository. +repository_rid = "ri.stemma.main.repository.e1r31370-3cf3-4ac4-9269-h1432d7fb0b4" +# bytes | The zip file that contains the contents of your widget set. It must include a valid manifest file at the path `.palantir/widgets.config.json`. +body = None +# RepositoryVersion +repository_version = None +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.widgets.Repository.publish( + repository_rid, body, repository_version=repository_version, preview=preview + ) + print("The publish response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling Repository.publish: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | Release | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + diff --git a/docs/v2/Widgets/WidgetSet.md b/docs/v2/Widgets/WidgetSet.md new file mode 100644 index 000000000..aef32c88b --- /dev/null +++ b/docs/v2/Widgets/WidgetSet.md @@ -0,0 +1,56 @@ +# WidgetSet + +Method | HTTP request | Release Stage | +------------- | ------------- | ----- | +[**get**](#get) | **GET** /v2/widgets/widgetSets/{widgetSetRid} | Private Beta | + +# **get** +Get the WidgetSet with the specified rid. + +### Parameters + +Name | Type | Description | Notes | +------------- | ------------- | ------------- | ------------- | +**widget_set_rid** | WidgetSetRid | A Resource Identifier (RID) identifying a widget set. | | +**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] | + +### Return type +**WidgetSet** + +### Example + +```python +from foundry_sdk import FoundryClient +import foundry_sdk +from pprint import pprint + +client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com") + +# WidgetSetRid | A Resource Identifier (RID) identifying a widget set. +widget_set_rid = "ri.widgetregistry..widget-set.21dt2c42-b7df-4b23-880b-1436a3dred2e" +# Optional[PreviewMode] | Enables the use of preview functionality. +preview = None + + +try: + api_response = client.widgets.WidgetSet.get(widget_set_rid, preview=preview) + print("The get response:\n") + pprint(api_response) +except foundry_sdk.PalantirRPCException as e: + print("HTTP error when calling WidgetSet.get: %s\n" % e) + +``` + + + +### Authorization + +See [README](../../../README.md#authorization) + +### HTTP response details +| Status Code | Type | Description | Content Type | +|-------------|-------------|-------------|------------------| +**200** | WidgetSet | | application/json | + +[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md) + diff --git a/docs/v2/Widgets/models/DevModeSettings.md b/docs/v2/Widgets/models/DevModeSettings.md new file mode 100644 index 000000000..a0b4e1344 --- /dev/null +++ b/docs/v2/Widgets/models/DevModeSettings.md @@ -0,0 +1,12 @@ +# DevModeSettings + +DevModeSettings + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**status** | DevModeStatus | Yes | | +**widget_set_settings** | Dict[WidgetSetRid, WidgetSetDevModeSettings] | Yes | The dev mode settings for each widget set, keyed by widget set RID. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Widgets/models/DevModeStatus.md b/docs/v2/Widgets/models/DevModeStatus.md new file mode 100644 index 000000000..d7522420e --- /dev/null +++ b/docs/v2/Widgets/models/DevModeStatus.md @@ -0,0 +1,12 @@ +# DevModeStatus + +The user's global development mode status for widget sets. + +| **Value** | +| --------- | +| `"ENABLED"` | +| `"PAUSED"` | +| `"DISABLED"` | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Widgets/models/FilePath.md b/docs/v2/Widgets/models/FilePath.md new file mode 100644 index 000000000..7805fa7ad --- /dev/null +++ b/docs/v2/Widgets/models/FilePath.md @@ -0,0 +1,11 @@ +# FilePath + +A locator for a specific file in a widget set's release directory. + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Widgets/models/ListReleasesResponse.md b/docs/v2/Widgets/models/ListReleasesResponse.md new file mode 100644 index 000000000..a22c34f80 --- /dev/null +++ b/docs/v2/Widgets/models/ListReleasesResponse.md @@ -0,0 +1,12 @@ +# ListReleasesResponse + +ListReleasesResponse + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**data** | List[Release] | Yes | | +**next_page_token** | Optional[PageToken] | No | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Widgets/models/Release.md b/docs/v2/Widgets/models/Release.md new file mode 100644 index 000000000..278942183 --- /dev/null +++ b/docs/v2/Widgets/models/Release.md @@ -0,0 +1,14 @@ +# Release + +Release + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**widget_set_rid** | WidgetSetRid | Yes | The Resource Identifier (RID) of the widget set this release is for. | +**version** | ReleaseVersion | Yes | The semantic version of the widget set. | +**locator** | ReleaseLocator | Yes | | +**description** | Optional[str] | No | The description of this release. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Widgets/models/ReleaseLocator.md b/docs/v2/Widgets/models/ReleaseLocator.md new file mode 100644 index 000000000..4fa87bcb1 --- /dev/null +++ b/docs/v2/Widgets/models/ReleaseLocator.md @@ -0,0 +1,12 @@ +# ReleaseLocator + +A locator for where the backing files of a release are stored. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**repository_rid** | RepositoryRid | Yes | The Resource Identifier (RID) of the repository that contains the release. | +**repository_version** | RepositoryVersion | Yes | The version of the repository storing the backing files. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Widgets/models/ReleaseVersion.md b/docs/v2/Widgets/models/ReleaseVersion.md new file mode 100644 index 000000000..4e16cc586 --- /dev/null +++ b/docs/v2/Widgets/models/ReleaseVersion.md @@ -0,0 +1,11 @@ +# ReleaseVersion + +The semantic version of the widget set. + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Widgets/models/Repository.md b/docs/v2/Widgets/models/Repository.md new file mode 100644 index 000000000..c6fa79f7d --- /dev/null +++ b/docs/v2/Widgets/models/Repository.md @@ -0,0 +1,12 @@ +# Repository + +Repository + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**rid** | RepositoryRid | Yes | A Resource Identifier (RID) identifying a repository. | +**widget_set_rid** | Optional[WidgetSetRid] | No | The Resource Identifier (RID) of the widget set that has authorized this repository to publish new widget releases. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Widgets/models/RepositoryRid.md b/docs/v2/Widgets/models/RepositoryRid.md new file mode 100644 index 000000000..c16d2ba34 --- /dev/null +++ b/docs/v2/Widgets/models/RepositoryRid.md @@ -0,0 +1,11 @@ +# RepositoryRid + +A Resource Identifier (RID) identifying a repository. + +## Type +```python +RID +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Widgets/models/RepositoryVersion.md b/docs/v2/Widgets/models/RepositoryVersion.md new file mode 100644 index 000000000..c85535e3f --- /dev/null +++ b/docs/v2/Widgets/models/RepositoryVersion.md @@ -0,0 +1,11 @@ +# RepositoryVersion + +A semantic version of a repository storing backing files. + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Widgets/models/ScriptEntrypoint.md b/docs/v2/Widgets/models/ScriptEntrypoint.md new file mode 100644 index 000000000..986ac0e02 --- /dev/null +++ b/docs/v2/Widgets/models/ScriptEntrypoint.md @@ -0,0 +1,12 @@ +# ScriptEntrypoint + +A script entrypoint to be loaded into the runtime environment. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**file_path** | FilePath | Yes | A relative path from the root to a JavaScript entrypoint. It must satisfy: - Must contain one or more non-empty segments separated by `/`. - Each segment must only contain the following ASCII characters: a-z, A-Z, 0-9 and -_.. - Must have a maximum length of 100. | +**script_type** | ScriptType | Yes | Defines HTML "type" attribute to be used for the script entrypoint. The supported values are `DEFAULT` and `MODULE`, where `DEFAULT` maps to "text/javascript" and `MODULE` maps to "module". | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Widgets/models/ScriptType.md b/docs/v2/Widgets/models/ScriptType.md new file mode 100644 index 000000000..e278203f8 --- /dev/null +++ b/docs/v2/Widgets/models/ScriptType.md @@ -0,0 +1,11 @@ +# ScriptType + +ScriptType + +| **Value** | +| --------- | +| `"DEFAULT"` | +| `"MODULE"` | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Widgets/models/SetWidgetSetDevModeSettingsByIdRequest.md b/docs/v2/Widgets/models/SetWidgetSetDevModeSettingsByIdRequest.md new file mode 100644 index 000000000..540165f0d --- /dev/null +++ b/docs/v2/Widgets/models/SetWidgetSetDevModeSettingsByIdRequest.md @@ -0,0 +1,12 @@ +# SetWidgetSetDevModeSettingsByIdRequest + +SetWidgetSetDevModeSettingsByIdRequest + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**widget_set_rid** | WidgetSetRid | Yes | | +**settings** | WidgetSetDevModeSettingsById | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Widgets/models/SetWidgetSetDevModeSettingsRequest.md b/docs/v2/Widgets/models/SetWidgetSetDevModeSettingsRequest.md new file mode 100644 index 000000000..75639c980 --- /dev/null +++ b/docs/v2/Widgets/models/SetWidgetSetDevModeSettingsRequest.md @@ -0,0 +1,12 @@ +# SetWidgetSetDevModeSettingsRequest + +SetWidgetSetDevModeSettingsRequest + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**widget_set_rid** | WidgetSetRid | Yes | | +**settings** | WidgetSetDevModeSettings | Yes | | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Widgets/models/StylesheetEntrypoint.md b/docs/v2/Widgets/models/StylesheetEntrypoint.md new file mode 100644 index 000000000..e4b7c6d1e --- /dev/null +++ b/docs/v2/Widgets/models/StylesheetEntrypoint.md @@ -0,0 +1,11 @@ +# StylesheetEntrypoint + +A stylesheet entrypoint to be loaded into the runtime environment. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**file_path** | FilePath | Yes | A relative path from the root to a CSS entrypoint. It must satisfy: - Must contain one or more non-empty segments separated by `/`. - Each segment must only contain the following ASCII characters: a-z, A-Z, 0-9 and -_.. - Must have a maximum length of 100. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Widgets/models/WidgetDevModeSettings.md b/docs/v2/Widgets/models/WidgetDevModeSettings.md new file mode 100644 index 000000000..c406831b1 --- /dev/null +++ b/docs/v2/Widgets/models/WidgetDevModeSettings.md @@ -0,0 +1,12 @@ +# WidgetDevModeSettings + +The settings for a given widget in development mode. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**script_entrypoints** | List[ScriptEntrypoint] | Yes | The entrypoint JavaScript files for the widget. | +**stylesheet_entrypoints** | List[StylesheetEntrypoint] | Yes | The entrypoint CSS files for the widget. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Widgets/models/WidgetId.md b/docs/v2/Widgets/models/WidgetId.md new file mode 100644 index 000000000..6f1b24ce0 --- /dev/null +++ b/docs/v2/Widgets/models/WidgetId.md @@ -0,0 +1,18 @@ +# WidgetId + +Human readable ID for a widget. Must be unique within a widget set. +Considered unsafe as it may contain user defined data. + +- Must only contain the following ASCII characters: a-z, A-Z and 0-9. +- Must not start with a number. +- Must have a maximum length of 100. +- Must be camelCase. + + +## Type +```python +str +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Widgets/models/WidgetRid.md b/docs/v2/Widgets/models/WidgetRid.md new file mode 100644 index 000000000..a8f4374c2 --- /dev/null +++ b/docs/v2/Widgets/models/WidgetRid.md @@ -0,0 +1,11 @@ +# WidgetRid + +A Resource Identifier (RID) identifying a widget. + +## Type +```python +RID +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Widgets/models/WidgetSet.md b/docs/v2/Widgets/models/WidgetSet.md new file mode 100644 index 000000000..791930348 --- /dev/null +++ b/docs/v2/Widgets/models/WidgetSet.md @@ -0,0 +1,12 @@ +# WidgetSet + +WidgetSet + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**rid** | WidgetSetRid | Yes | A Resource Identifier (RID) identifying a widget set. | +**publish_repository_rid** | Optional[RepositoryRid] | No | The Resource Identifier (RID) of the repository that is authorized to publish new widget releases to this widget set through a manifest. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Widgets/models/WidgetSetDevModeSettings.md b/docs/v2/Widgets/models/WidgetSetDevModeSettings.md new file mode 100644 index 000000000..181d6c8da --- /dev/null +++ b/docs/v2/Widgets/models/WidgetSetDevModeSettings.md @@ -0,0 +1,12 @@ +# WidgetSetDevModeSettings + +The settings for a widget set in development mode, keyed by widget RID. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**base_href** | str | Yes | The base path for the HTML file used to render the widget in dev mode. | +**widget_settings** | Dict[WidgetRid, WidgetDevModeSettings] | Yes | The dev mode settings for each widget in the widget set, keyed by widget RIDs. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Widgets/models/WidgetSetDevModeSettingsById.md b/docs/v2/Widgets/models/WidgetSetDevModeSettingsById.md new file mode 100644 index 000000000..d163d788f --- /dev/null +++ b/docs/v2/Widgets/models/WidgetSetDevModeSettingsById.md @@ -0,0 +1,12 @@ +# WidgetSetDevModeSettingsById + +The settings for a widget set in development mode, keyed by widget ID. + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**base_href** | str | Yes | The base path for the HTML file used to render the widget in dev mode. | +**widget_settings** | Dict[WidgetId, WidgetDevModeSettings] | Yes | The dev mode settings for each widget in the widget set, keyed by widget IDs. | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Widgets/models/WidgetSetRid.md b/docs/v2/Widgets/models/WidgetSetRid.md new file mode 100644 index 000000000..5a2fb12c2 --- /dev/null +++ b/docs/v2/Widgets/models/WidgetSetRid.md @@ -0,0 +1,11 @@ +# WidgetSetRid + +A Resource Identifier (RID) identifying a widget set. + +## Type +```python +RID +``` + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/foundry_sdk/__init__.py b/foundry_sdk/__init__.py new file mode 100644 index 000000000..2e72b74f8 --- /dev/null +++ b/foundry_sdk/__init__.py @@ -0,0 +1,115 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +from foundry_sdk._core import ApiResponse +from foundry_sdk._core import AsyncApiResponse +from foundry_sdk._core import AsyncPageIterator +from foundry_sdk._core import AsyncResourceIterator +from foundry_sdk._core import Auth +from foundry_sdk._core import ConfidentialClientAuth +from foundry_sdk._core import Config +from foundry_sdk._core import PageIterator +from foundry_sdk._core import PublicClientAuth +from foundry_sdk._core import ResourceIterator +from foundry_sdk._core import StreamedApiResponse +from foundry_sdk._core import StreamingContextManager +from foundry_sdk._core import TableResponse +from foundry_sdk._core import UserTokenAuth + +# Context and environment variables +from foundry_sdk._core.context_and_environment_vars import ATTRIBUTION_VAR +from foundry_sdk._core.context_and_environment_vars import HOSTNAME_ENV_VAR +from foundry_sdk._core.context_and_environment_vars import HOSTNAME_VAR +from foundry_sdk._core.context_and_environment_vars import TOKEN_ENV_VAR +from foundry_sdk._core.context_and_environment_vars import TOKEN_VAR +from foundry_sdk._errors import ApiNotFoundError +from foundry_sdk._errors import BadRequestError +from foundry_sdk._errors import ConflictError +from foundry_sdk._errors import ConnectionError +from foundry_sdk._errors import ConnectTimeout +from foundry_sdk._errors import EnvironmentNotConfigured +from foundry_sdk._errors import InternalServerError +from foundry_sdk._errors import NotAuthenticated +from foundry_sdk._errors import NotFoundError +from foundry_sdk._errors import PalantirException +from foundry_sdk._errors import PalantirRPCException +from foundry_sdk._errors import PermissionDeniedError +from foundry_sdk._errors import ProxyError +from foundry_sdk._errors import RateLimitError +from foundry_sdk._errors import ReadTimeout +from foundry_sdk._errors import RequestEntityTooLargeError +from foundry_sdk._errors import SDKInternalError +from foundry_sdk._errors import ServiceUnavailable +from foundry_sdk._errors import StreamConsumedError +from foundry_sdk._errors import TimeoutError +from foundry_sdk._errors import UnauthorizedError +from foundry_sdk._errors import UnprocessableEntityError +from foundry_sdk._errors import WriteTimeout + +# The OpenAPI document version from the spec information +# See https://swagger.io/specification/#info-object +# The SDK version +from foundry_sdk._versions import __openapi_document_version__ +from foundry_sdk._versions import __version__ +from foundry_sdk.v2 import AsyncFoundryClient +from foundry_sdk.v2 import FoundryClient + +# The OpenAPI specification version +# See https://swagger.io/specification/#versions + + +__all__ = [ + "__version__", + "__openapi_document_version__", + "Auth", + "ConfidentialClientAuth", + "PublicClientAuth", + "UserTokenAuth", + "Config", + "ATTRIBUTION_VAR", + "HOSTNAME_VAR", + "HOSTNAME_ENV_VAR", + "TOKEN_VAR", + "TOKEN_ENV_VAR", + "PalantirException", + "EnvironmentNotConfigured", + "NotAuthenticated", + "ConnectionError", + "ProxyError", + "PalantirRPCException", + "BadRequestError", + "UnauthorizedError", + "PermissionDeniedError", + "NotFoundError", + "UnprocessableEntityError", + "RateLimitError", + "ServiceUnavailable", + "RequestEntityTooLargeError", + "ConflictError", + "InternalServerError", + "SDKInternalError", + "StreamConsumedError", + "ConnectTimeout", + "ReadTimeout", + "WriteTimeout", + "TimeoutError", + "ApiNotFoundError", + "FoundryClient", + "AsyncFoundryClient", + "ResourceIterator", + "AsyncResourceIterator", + "PageIterator", + "AsyncPageIterator", +] diff --git a/foundry_sdk/_core/__init__.py b/foundry_sdk/_core/__init__.py new file mode 100644 index 000000000..bdb78545a --- /dev/null +++ b/foundry_sdk/_core/__init__.py @@ -0,0 +1,46 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +from foundry_sdk._core.api_client import ApiClient +from foundry_sdk._core.api_client import ApiResponse +from foundry_sdk._core.api_client import AsyncApiClient +from foundry_sdk._core.api_client import AsyncApiResponse +from foundry_sdk._core.api_client import RequestInfo +from foundry_sdk._core.api_client import SdkInternal +from foundry_sdk._core.api_client import StreamedApiResponse +from foundry_sdk._core.api_client import StreamingContextManager +from foundry_sdk._core.api_client import async_with_raw_response +from foundry_sdk._core.api_client import async_with_streaming_response +from foundry_sdk._core.api_client import with_raw_response +from foundry_sdk._core.api_client import with_streaming_response +from foundry_sdk._core.auth_utils import Auth +from foundry_sdk._core.compute_module_pipeline_auth import ComputeModulePipelineAuth +from foundry_sdk._core.confidential_client_auth import ConfidentialClientAuth +from foundry_sdk._core.config import Config +from foundry_sdk._core.model_base import ModelBase +from foundry_sdk._core.public_client_auth import PublicClientAuth +from foundry_sdk._core.resource_iterator import AsyncPageIterator +from foundry_sdk._core.resource_iterator import AsyncResourceIterator +from foundry_sdk._core.resource_iterator import PageIterator +from foundry_sdk._core.resource_iterator import ResourceIterator +from foundry_sdk._core.table import TableResponse +from foundry_sdk._core.user_token_auth_client import UserTokenAuth +from foundry_sdk._core.utils import RID +from foundry_sdk._core.utils import UUID +from foundry_sdk._core.utils import AwareDatetime +from foundry_sdk._core.utils import Long +from foundry_sdk._core.utils import Timeout +from foundry_sdk._core.utils import maybe_ignore_preview +from foundry_sdk._core.utils import resolve_forward_references diff --git a/foundry_sdk/_core/api_client.py b/foundry_sdk/_core/api_client.py new file mode 100644 index 000000000..2cd44c823 --- /dev/null +++ b/foundry_sdk/_core/api_client.py @@ -0,0 +1,836 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +from __future__ import annotations + +import contextlib +import functools +import json +import re +from abc import ABC +from abc import abstractmethod +from dataclasses import dataclass +from datetime import datetime +from datetime import timezone +from inspect import isclass +from random import Random +from random import SystemRandom +from typing import Any +from typing import AsyncIterator +from typing import Awaitable +from typing import Callable +from typing import Dict +from typing import Generic +from typing import Iterator +from typing import List +from typing import Literal +from typing import Optional +from typing import Tuple +from typing import Type +from typing import TypeVar +from typing import Union +from typing import cast +from typing import get_args +from typing import get_origin +from urllib.parse import quote + +import httpx +import pydantic +from retrying import retry # type: ignore +from typing_extensions import Annotated +from typing_extensions import NotRequired +from typing_extensions import ParamSpec +from typing_extensions import TypedDict + +from foundry_sdk._core.auth_utils import Auth +from foundry_sdk._core.auth_utils import Token +from foundry_sdk._core.config import Config +from foundry_sdk._core.http_client import AsyncHttpClient +from foundry_sdk._core.http_client import HttpClient +from foundry_sdk._core.resource_iterator import AsyncResourceIterator +from foundry_sdk._core.resource_iterator import ResourceIterator +from foundry_sdk._core.table import TableResponse +from foundry_sdk._core.utils import assert_non_empty_string +from foundry_sdk._errors import ApiNotFoundError +from foundry_sdk._errors import BadRequestError +from foundry_sdk._errors import ConflictError +from foundry_sdk._errors import ConnectionError +from foundry_sdk._errors import ConnectTimeout +from foundry_sdk._errors import InternalServerError +from foundry_sdk._errors import NotFoundError +from foundry_sdk._errors import PalantirRPCException +from foundry_sdk._errors import PermissionDeniedError +from foundry_sdk._errors import ProxyError +from foundry_sdk._errors import RateLimitError +from foundry_sdk._errors import ReadTimeout +from foundry_sdk._errors import RequestEntityTooLargeError +from foundry_sdk._errors import SDKInternalError +from foundry_sdk._errors import ServiceUnavailable +from foundry_sdk._errors import StreamConsumedError +from foundry_sdk._errors import UnauthorizedError +from foundry_sdk._errors import UnprocessableEntityError +from foundry_sdk._errors import WriteTimeout +from foundry_sdk._errors import deserialize_error +from foundry_sdk._versions import __version__ + +QueryParameters = Dict[str, Union[Any, List[Any]]] + + +@contextlib.contextmanager +def error_handling(): + try: + yield + except httpx.ProxyError as e: + raise ProxyError(str(e)) from e + except httpx.ConnectTimeout as e: + raise ConnectTimeout(str(e)) from e + except httpx.ConnectError as e: + raise ConnectionError(str(e)) from e + except httpx.ReadTimeout as e: + raise ReadTimeout(str(e)) from e + except httpx.WriteTimeout as e: + raise WriteTimeout(str(e)) from e + + +AnyParameters = ParamSpec("AnyParameters") + + +R = TypeVar("R") + + +def with_raw_response( + # HACK: There is no generic way to accept a "type" + # See https://github.com/python/mypy/issues/9773 + # This is solved in py 3.14 but for now, this allows us to accept a type R + # The purpose of passing in the response type "R" is so that we can properly + # type the modified function so that mypy/pyright (and code assist tools) + # understand the return value + # For example, if the return type is "User" then the new return type would + # be "ApiResponse[User]" + # We can't reliably get it from "func" which doesn't always match the return + # type of the API (e.g. the iterator response types) + response_type: Callable[[R], None], + func: Callable[AnyParameters, Any], +) -> Callable[AnyParameters, ApiResponse[R]]: + return cast( + Callable[AnyParameters, ApiResponse[R]], + functools.partial(func, _sdk_internal={"response_mode": "RAW"}), # type: ignore + ) + + +def with_streaming_response( + # See explanation in "with_raw_response" for why we need to the "response_type" parameter + response_type: Callable[[R], None], + func: Callable[AnyParameters, Any], +) -> Callable[AnyParameters, StreamingContextManager[R]]: + return cast( + Callable[AnyParameters, StreamingContextManager[R]], + functools.partial(func, _sdk_internal={"response_mode": "STREAMING"}), # type: ignore + ) + + +def async_with_raw_response( + # See explanation in "with_raw_response" for why we need to the "response_type" parameter + response_type: Callable[[R], None], + func: Callable[AnyParameters, Any], +) -> Callable[AnyParameters, Awaitable[AsyncApiResponse[R]]]: + return cast( + Callable[AnyParameters, AsyncApiResponse[R]], + functools.partial(func, _sdk_internal={"response_mode": "RAW"}), # type: ignore + ) + + +def async_with_streaming_response( + # See explanation in "with_raw_response" for why we need to the "response_type" parameter + response_type: Callable[[R], None], + func: Callable[AnyParameters, Any], +) -> Callable[AnyParameters, AsyncStreamingContextManager[Awaitable[R]]]: + return cast( + Callable[AnyParameters, StreamingContextManager[R]], + functools.partial(func, _sdk_internal={"response_mode": "STREAMING"}), # type: ignore + ) + + +ResponseMode = Literal["DECODED", "ITERATOR", "RAW", "STREAMING", "TABLE"] + + +# The SdkInternal dictionary is a flexible way to pass additional information to the API client +# when calling a method. Currently the only use case is setting the response mode but it can easily +# be extended without having to add additional parameters to the method signature. +SdkInternal = TypedDict("SdkInternal", {"response_mode": NotRequired[ResponseMode]}) + + +BaseValueType = Union[Any, Type[bytes], Type[pydantic.BaseModel], None] +ValueType = Union[BaseValueType, Annotated[Any, Any]] + + +def _get_annotated_origin(_type: ValueType) -> ValueType: + """Get the underlying type from an Annotated type""" + if get_origin(_type) is Annotated: + args = get_args(_type) + if args: + return _get_annotated_origin(args[0]) + return _type + + +def _get_is_optional(_type: ValueType) -> Tuple[bool, ValueType]: + """Get the underlying type from an Annotated type""" + if get_origin(_type) is Union: + args = get_args(_type) + if len(args) == 2 and type(None) in args: + return True, _get_annotated_origin(args[0] if args[1] is type(None) else args[1]) + return False, _type + + +@functools.lru_cache(maxsize=64) +def _get_type_adapter(_type: ValueType) -> pydantic.TypeAdapter: + """Get a cached TypeAdapter for the given type""" + return pydantic.TypeAdapter(_type) + + +@dataclass(frozen=True) +class RequestInfo: + method: str + resource_path: str + response_type: ValueType + query_params: QueryParameters + path_params: Dict[str, Any] + header_params: Dict[str, Any] + body: Any + request_timeout: Optional[int] + throwable_errors: Dict[str, Type[PalantirRPCException]] + response_mode: Optional[ResponseMode] = None + + def update( + self, + query_params: Optional[Dict[str, Any]] = None, + header_params: Optional[Dict[str, Any]] = None, + response_mode: Optional[ResponseMode] = None, + ): + return RequestInfo( + method=self.method, + resource_path=self.resource_path, + response_type=self.response_type, + query_params={**self.query_params, **(query_params or {})}, + path_params=self.path_params, + header_params={**self.header_params, **(header_params or {})}, + body=self.body, + request_timeout=self.request_timeout, + throwable_errors=self.throwable_errors, + response_mode=response_mode if response_mode is not None else self.response_mode, + ) + + @classmethod + def with_defaults( + cls, + method: str, + resource_path: str, + response_type: ValueType = None, + query_params: QueryParameters = {}, + path_params: Dict[str, Any] = {}, + header_params: Dict[str, Any] = {}, + body: Any = None, + request_timeout: Optional[int] = None, + throwable_errors: Dict[str, Type[PalantirRPCException]] = {}, + response_mode: Optional[ResponseMode] = None, + ): + return cls( + method=method, + resource_path=resource_path, + response_type=response_type, + query_params=query_params, + path_params=path_params, + header_params=header_params, + body=body, + request_timeout=request_timeout, + throwable_errors=throwable_errors, + response_mode=response_mode, + ) + + +T = TypeVar("T") + + +class BaseApiResponse(Generic[T]): + def __init__(self, request_info: RequestInfo, response: httpx.Response): + self._response = response + self._request_info = request_info + + @property + def status_code(self) -> int: + return self._response.status_code + + @property + def text(self) -> str: + return self._response.text + + def json(self): + content_type = self._response.headers.get("content-type") + if content_type is not None: + match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) + else: + match = None + + encoding = match.group(1) if match else "utf-8" + response_text = self._response.content.decode(encoding) + return json.loads(response_text) + + def decode(self) -> T: + _type = self._request_info.response_type + is_optional, _type = _get_is_optional(_type) + origin_type = _get_annotated_origin(_type) + + if _type is None: + return cast(T, None) + + if is_optional and self._response.content == b"": + return cast(T, None) + + if origin_type is bytes: + return cast(T, self._response.content) + + data = self.json() + + if origin_type is Any: + return data + + # Check if the type is a BaseModel class + if isclass(origin_type) and issubclass(origin_type, pydantic.BaseModel): + return cast(T, origin_type.model_validate(data)) + + adapter = _get_type_adapter(_type) + return cast(T, adapter.validate_python(data)) + + +class ApiResponse(Generic[T], BaseApiResponse[T]): + def close(self): + """Close the response and release the connection. Automatically called if the response + body is read to completion. + """ + self._response.close() + + +class AsyncApiResponse(Generic[T], BaseApiResponse[T]): + async def aclose(self): + """Close the response and release the connection. Automatically called if the response + body is read to completion. + """ + await self._response.aclose() + + +class StreamedApiResponse(Generic[T], ApiResponse[T]): + def __init__(self, request_info: RequestInfo, response: httpx.Response): + super().__init__(request_info, response) + + def iter_bytes(self, chunk_size: Optional[int] = None) -> Iterator[bytes]: + """ + :param chunk_size: The number of bytes that should be read into memory for each chunk. If set to None, the data will become available as it arrives in whatever size is sent from the host. + :type chunk_size: Optional[int] + """ + try: + for raw_bytes in self._response.iter_bytes(chunk_size=chunk_size): + yield raw_bytes + except httpx.StreamConsumed as e: + raise StreamConsumedError(str(e)) from e + + +class AsyncStreamedApiResponse(Generic[T], AsyncApiResponse[T]): + def __init__(self, request_info: RequestInfo, response: httpx.Response): + super().__init__(request_info, response) + + async def aiter_bytes(self, chunk_size: Optional[int] = None) -> AsyncIterator[bytes]: + """ + :param chunk_size: The number of bytes that should be read into memory for each chunk. If set to None, the data will become available as it arrives in whatever size is sent from the host. + :type chunk_size: Optional[int] + """ + try: + async for raw_bytes in self._response.aiter_bytes(chunk_size=chunk_size): + yield raw_bytes + except httpx.StreamConsumed as e: + raise StreamConsumedError(str(e)) from e + + +class StreamingContextManager(Generic[T]): + def __init__(self, request_info: RequestInfo, response: ApiResponse): + self._request_info = request_info + self._response = response + + def __enter__(self) -> StreamedApiResponse[T]: + return StreamedApiResponse[T](self._request_info, self._response._response) + + def __exit__( + self, + exc_type: Optional[Type[BaseException]], + exc_value: Optional[BaseException], + traceback: Optional[Any], + ) -> None: + self._response.close() + + +class AsyncStreamingContextManager(Generic[T]): + def __init__(self, request_info: RequestInfo, response: Awaitable[AsyncApiResponse]): + self._request_info = request_info + self._awaitable_response = response + self._response: Optional[AsyncApiResponse] = None + + async def __aenter__(self) -> AsyncStreamedApiResponse[T]: + self._response = await self._awaitable_response + return AsyncStreamedApiResponse[T](self._request_info, self._response._response) + + async def __aexit__( + self, + exc_type: Optional[Type[BaseException]], + exc_value: Optional[BaseException], + traceback: Optional[Any], + ) -> None: + if self._response is not None: + await self._response.aclose() + + +class BaseApiClient: + """ + The API client. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: Auth, + hostname: str, + config: Optional[Config] = None, + ): + if isinstance(auth, str): + # This is a common error so we have a special error message + # for these situations + raise TypeError( + "auth must be an instance of UserTokenAuth, ConfidentialClientAuth or " + "PublicClientAuth, not a string. You likely want to use " + "UserTokenAuth(token=)." + ) + elif not isinstance(auth, Auth): + raise TypeError( + "auth must be an instance of UserTokenAuth, ConfidentialClientAuth or " + "PublicClientAuth, not an instance of {type(auth)}." + ) + + assert_non_empty_string(hostname, "hostname") + + if config is not None and not isinstance(config, Config): + raise TypeError(f"config must be an instance of Config, not {type(config)}.") + + self._auth = auth + self._auth._parameterize(hostname, config) + + def _get_timeout(self, request_info: RequestInfo): + return ( + httpx.USE_CLIENT_DEFAULT + if request_info.request_timeout is None + else request_info.request_timeout + ) + + def _process_query_parameters(self, query_params: QueryParameters): + result: List[Tuple[str, Any]] = [] + + for key, value in query_params.items(): + if value is None: + continue + + if not isinstance(value, list): + result.append((key, value)) + continue + + # Explode list query parameters + for inner_value in value: + result.append((key, inner_value)) + + return result + + def _create_url(self, request_info: RequestInfo) -> str: + resource_path = request_info.resource_path + path_params = request_info.path_params + + for k, v in path_params.items(): + # the "safe" option defaults to "/" + # this does not work with the backend which expects "/" characters to be encoded + resource_path = resource_path.replace(f"{{{k}}}", quote(v, safe="")) + + return f"/api{resource_path}" + + def _create_headers(self, request_info: RequestInfo, token: Token) -> Dict[str, Any]: + return { + "Authorization": "Bearer " + token.access_token, + # Passing in None leads to this + # Header value must be str or bytes, not + **{ + key: ( + value.astimezone(timezone.utc).isoformat() + if isinstance(value, datetime) + else value if isinstance(value, (bytes, str)) else json.dumps(value) + ) + for key, value in request_info.header_params.items() + if value is not None + }, + } + + def _handle_error(self, req: RequestInfo, res: httpx.Response): + """Call this method if there is an error in the response. At this point, the response + should have already been fully received. + """ + if res.status_code == 404 and not res.text: + raise ApiNotFoundError( + f'The request to "{req.resource_path}" returned a 404 status code ' + "with no response body. This likely indicates that the API is not yet " + "available on your Foundry instance." + ) + + if res.status_code == 429: + raise RateLimitError(res.text) + elif res.status_code == 503: + raise ServiceUnavailable(res.text) + + try: + error_json = res.json() + except json.JSONDecodeError: + raise SDKInternalError( + f"Unexpected error response with status code {res.status_code}: {res.text}" + ) + + if error_instance := deserialize_error(error_json, req.throwable_errors): + raise error_instance + elif res.status_code == 400: + raise BadRequestError(error_json) + elif res.status_code == 401: + raise UnauthorizedError(error_json) + elif res.status_code == 403: + raise PermissionDeniedError(error_json) + elif res.status_code == 404: + raise NotFoundError(error_json) + elif res.status_code == 409: + raise ConflictError(error_json) + elif res.status_code == 413: + raise RequestEntityTooLargeError(error_json) + elif res.status_code == 422: + raise UnprocessableEntityError(error_json) + elif 500 <= res.status_code <= 599: + raise InternalServerError(error_json) + else: + raise PalantirRPCException(error_json) + + class _BaseModelJSONEncoder(json.JSONEncoder): + """Custom JSON encoder for handling Pydantic BaseModel objects and collections.""" + + def default(self, o): + if isinstance(o, pydantic.BaseModel): + return o.model_dump(exclude_none=True, by_alias=True) + elif isinstance(o, datetime): + # Convert datetime to ISO 8601 format string with UTC timezone + if o.tzinfo is None: + o = o.replace(tzinfo=timezone.utc) + return o.astimezone(timezone.utc).isoformat() + return super().default(o) + + def _serialize(self, value: Any) -> Optional[bytes]: + """ + Serialize the data passed in to JSON bytes. + + This method properly handles: + - bytes (returned as-is) + - None (returned as None) + - Pydantic BaseModel objects (serialized with exclude_none and by_alias) + - Lists/dictionaries containing BaseModel objects at any nesting level + - datetime objects (serialized to ISO 8601 format strings) + - Any other JSON serializable value + """ + if isinstance(value, bytes): + return value + elif value is None: + return None + else: + # Use custom encoder to handle BaseModel objects at any level of nesting + return json.dumps(value, cls=self._BaseModelJSONEncoder).encode() + + def _get_response_mode(self, request_info: RequestInfo) -> ResponseMode: + return request_info.response_mode if request_info.response_mode is not None else "DECODED" + + +class ApiMiddleware(ABC): + @abstractmethod + def call_api( + self, + request_info: RequestInfo, + next_call: Callable[[RequestInfo], Any], + ) -> Any: ... + + +def apply_middleware( + middleware: List[ApiMiddleware], + next_call: Callable[[RequestInfo], Any], +) -> Callable[[RequestInfo], Any]: + return functools.reduce( + lambda next_fn, mw: lambda req: mw.call_api(req, next_fn), + reversed(middleware), + lambda req: next_call(req), + ) + + +class RetryingMiddleware(ApiMiddleware): + """Middleware that implements automatic retry logic with exponential backoff.""" + + def __init__( + self, + max_retries: Optional[int] = None, + propagate_qos: Optional[ + Literal["AUTOMATIC_RETRY", "PROPAGATE_429_AND_503_TO_CALLER"] + ] = None, + backoff_slot_size_ms: Optional[int] = None, + random: Optional[Random] = None, + ): + self._max_retries = max_retries or 4 + self._propagate_qos = propagate_qos or "AUTOMATIC_RETRY" + self._backoff_slot_size_ms = backoff_slot_size_ms or 250 + self._random = random or SystemRandom() + + def call_api( + self, + request_info: RequestInfo, + next_call: Callable[[RequestInfo], Any], + ) -> Any: + @retry( + stop_max_attempt_number=self._max_retries, + retry_on_exception=self._is_retryable, + wait_func=self._get_backoff_ms, + ) + def call_api_retrying() -> Any: + return next_call(request_info) + + return call_api_retrying() + + def _is_retryable(self, exception: Exception) -> bool: + """ + Determine if an exception should trigger a retry. + + Retry behavior matches dialogue client: + https://github.com/palantir/dialogue/blob/ae875833ad3b6e7a1d6786b77a853a114f73ffee/dialogue-core/src/main/java/com/palantir/dialogue/core/RetryingChannel.java#L383 + """ + if self._propagate_qos == "AUTOMATIC_RETRY": + return isinstance(exception, (RateLimitError, ServiceUnavailable)) + return False + + def _get_backoff_ms( + self, previous_attempt_number: int, _delay_since_first_attempt_ms: int + ) -> int: + """ + Calculate backoff delay in milliseconds using exponential backoff with jitter. + + Formula matches dialogue client behavior: + https://github.com/palantir/dialogue/blob/ae875833ad3b6e7a1d6786b77a853a114f73ffee/dialogue-core/src/main/java/com/palantir/dialogue/core/RetryingChannel.java#L380 + """ + return self._backoff_slot_size_ms * round( + (2**previous_attempt_number) * self._random.random() + ) + + +class ApiClient(BaseApiClient): + def __init__( + self, + auth: Auth, + hostname: str, + config: Optional[Config] = None, + ): + super().__init__(auth, hostname, config) + self._session = HttpClient(hostname, config) + self._middleware: List[ApiMiddleware] = [ + RetryingMiddleware( + max_retries=config.max_retries if config else None, + propagate_qos=config.propagate_qos if config else None, + backoff_slot_size_ms=config.backoff_slot_size_ms if config else None, + ), + ] + + def call_api(self, request_info: RequestInfo) -> Any: + """Makes the HTTP request (synchronous)""" + # Wrap the actual call in the middleware chain + return apply_middleware(self._middleware, self._call_api)(request_info) + + def _call_api(self, request_info: RequestInfo) -> Any: + response_mode = self._get_response_mode(request_info) + + if response_mode == "ITERATOR": + # Extract the initial page_token from query_params if provided by the user + initial_page_token = cast(Optional[str], request_info.query_params.get("pageToken")) + + def fetch_page( + page_size: Optional[int], + next_page_token: Optional[str], + ) -> Tuple[Optional[str], List[Any]]: + result = self.call_api( + request_info.update( + # pageSize will already be present in the query params dictionary + query_params={"pageToken": next_page_token}, + # We want the response to be decoded for us + # If we don't do this, it will cause an infinite loop + response_mode="DECODED", + ), + ) + + return result.next_page_token, result.data or [] + + return ResourceIterator(paged_func=fetch_page, page_token=initial_page_token) + + with error_handling(): + + def make_request(token: Token): + request = self._session.build_request( + method=request_info.method, + url=self._create_url(request_info), + params=self._process_query_parameters(request_info.query_params), + content=self._serialize(request_info.body), + headers=self._create_headers(request_info, token), + timeout=self._get_timeout(request_info), + ) + + return self._session.send( + request=request, + stream=response_mode == "STREAMING", + ) + + res = self._auth.execute_with_token(make_request) + + self._check_for_errors(request_info, res) + api_response: ApiResponse[Any] = ApiResponse(request_info, res) + + if response_mode == "STREAMING": + return StreamingContextManager(request_info, api_response) + elif response_mode == "TABLE": + if res.content == b"": + return None + else: + return TableResponse(res.content) + elif response_mode == "RAW": + return api_response + else: + return api_response.decode() + + def _check_for_errors(self, request_info: RequestInfo, res: httpx.Response): + if 200 <= res.status_code <= 299: + return + + # If the user is streaming back the response, we need to make sure we + # wait for the entire response to be streamed back before we can access + # the content. If we don't do this, accessing "text" or calling ".json()" + # will raise an exception. + if request_info.response_mode == "STREAMING": + res.read() + + self._handle_error(request_info, res) + + +class AsyncApiClient(BaseApiClient): + def __init__( + self, + auth: Auth, + hostname: str, + config: Optional[Config] = None, + ): + super().__init__(auth, hostname, config) + self._client = AsyncHttpClient(hostname, config) + self._middleware: List[ApiMiddleware] = [ + RetryingMiddleware( + max_retries=config.max_retries if config else None, + propagate_qos=config.propagate_qos if config else None, + backoff_slot_size_ms=config.backoff_slot_size_ms if config else None, + ), + ] + + def call_api(self, request_info: RequestInfo) -> Any: + """Makes the HTTP request (asynchronous)""" + # Wrap the actual call in the middleware chain + return apply_middleware(self._middleware, self._call_api)(request_info) + + def _call_api(self, request_info: RequestInfo) -> Any: + response_mode = self._get_response_mode(request_info) + + if response_mode == "ITERATOR": + # Extract the initial page_token from query_params if provided by the user + initial_page_token = cast(Optional[str], request_info.query_params.get("pageToken")) + + async def fetch_page( + page_size: Optional[int], + next_page_token: Optional[str], + ) -> Tuple[Optional[str], List[Any]]: + response = await self._async_call_api( + request_info.update( + # pageSize will already be present in the query params dictionary + query_params={"pageToken": next_page_token}, + ), + response_mode="RAW", + ) + result = response.decode() + return result.next_page_token, result.data or [] + + return AsyncResourceIterator(paged_func=fetch_page, page_token=initial_page_token) + + if response_mode == "STREAMING": + return AsyncStreamingContextManager( + request_info, self._async_call_api(request_info, response_mode="STREAMING") + ) + else: + return self._async_call_api(request_info, response_mode) + + async def _async_call_api(self, request_info: RequestInfo, response_mode: ResponseMode) -> Any: + with error_handling(): + + async def make_request(token: Token): + request = self._client.build_request( + method=request_info.method, + url=self._create_url(request_info), + params=self._process_query_parameters(request_info.query_params), + content=self._serialize(request_info.body), + headers=self._create_headers(request_info, token), + timeout=self._get_timeout(request_info), + ) + + return await self._client.send(request=request, stream=response_mode == "STREAMING") + + res = await self._auth.execute_with_token(make_request) + + await self._check_for_errors(request_info, res) + api_response: AsyncApiResponse[Any] = AsyncApiResponse(request_info, res) + + if response_mode == "RAW" or response_mode == "STREAMING": + return api_response + elif response_mode == "TABLE": + if res.content == b"": + return None + else: + return TableResponse(res.content) + else: + return api_response.decode() + + async def _check_for_errors(self, request_info: RequestInfo, res: httpx.Response): + if 200 <= res.status_code <= 299: + return + + # If the user is streaming back the response, we need to make sure we + # wait for the entire response to be streamed back before we can access + # the content. If we don't do this, accessing "text" or calling ".json()" + # will raise an exception. + if request_info.response_mode == "STREAMING": + await res.aread() + + self._handle_error(request_info, res) diff --git a/foundry_sdk/_core/auth_utils.py b/foundry_sdk/_core/auth_utils.py new file mode 100644 index 000000000..6d2ee2489 --- /dev/null +++ b/foundry_sdk/_core/auth_utils.py @@ -0,0 +1,52 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +from abc import ABC +from abc import abstractmethod +from typing import Callable +from typing import Optional +from typing import TypeVar + +import httpx + +from foundry_sdk._core.config import Config + + +class Token(ABC): + + @property + @abstractmethod + def access_token(self) -> str: + pass + + +T = TypeVar("T") + + +class Auth(ABC): + @abstractmethod + def get_token(self) -> "Token": + pass + + def _parameterize(self, hostname: str, config: Optional[Config]) -> None: + pass + + @abstractmethod + def execute_with_token(self, func: Callable[["Token"], T]) -> T: + pass + + @abstractmethod + def run_with_token(self, func: Callable[["Token"], T]) -> None: + pass diff --git a/foundry_sdk/_core/client_init_helpers.py b/foundry_sdk/_core/client_init_helpers.py new file mode 100644 index 000000000..b74e495fd --- /dev/null +++ b/foundry_sdk/_core/client_init_helpers.py @@ -0,0 +1,54 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +from contextvars import ContextVar +from typing import Optional + +from foundry_sdk._core.auth_utils import Auth +from foundry_sdk._core.context_and_environment_vars import HOSTNAME_CONTEXT_VARS +from foundry_sdk._core.context_and_environment_vars import HOSTNAME_ENV_VARS +from foundry_sdk._core.context_and_environment_vars import TOKEN_CONTEXT_VARS +from foundry_sdk._core.context_and_environment_vars import TOKEN_ENV_VARS +from foundry_sdk._core.context_and_environment_vars import ( + maybe_get_value_from_context_or_environment_vars, +) # NOQA +from foundry_sdk._core.user_token_auth_client import UserTokenAuth +from foundry_sdk._errors.environment_not_configured import EnvironmentNotConfigured + + +def get_hostname_from_context_or_environment_vars() -> str: + hostname = maybe_get_value_from_context_or_environment_vars( + context_vars=HOSTNAME_CONTEXT_VARS, + env_vars=HOSTNAME_ENV_VARS, + ) + if hostname is None: + raise EnvironmentNotConfigured( + "Unable to configure client hostname. Please pass in `hostname` to FoundryClient, " + "or set the context variable in foundry_sdk." + ) + return hostname + + +def get_user_token_auth_from_context_or_environment_vars() -> Auth: + token = maybe_get_value_from_context_or_environment_vars( + context_vars=TOKEN_CONTEXT_VARS, + env_vars=TOKEN_ENV_VARS, + ) + if token is None: + raise EnvironmentNotConfigured( + "Unable to configure client auth. Please pass in `auth` to FoundryClient, " + "or set the context variable in foundry_sdk." + ) + return UserTokenAuth(token=token) diff --git a/foundry_sdk/_core/compute_module_pipeline_auth.py b/foundry_sdk/_core/compute_module_pipeline_auth.py new file mode 100644 index 000000000..c1626bc69 --- /dev/null +++ b/foundry_sdk/_core/compute_module_pipeline_auth.py @@ -0,0 +1,76 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import os +from typing import Callable +from typing import TypeVar +from typing import Union + +import httpx + +from foundry_sdk._core.user_token_auth_client import Auth +from foundry_sdk._core.user_token_auth_client import Token +from foundry_sdk._errors.environment_not_configured import EnvironmentNotConfigured +from foundry_sdk._errors.not_authenticated import NotAuthenticated + +T = TypeVar("T") + + +class _PipelineToken(Token): + + def __init__(self, token: str) -> None: + self._token = token + + @property + def access_token(self) -> str: + return self._token + + +TOKEN_PATH_ENV_VAR = "BUILD2_TOKEN" + + +class ComputeModulePipelineAuth(Auth): + """Use the token provided by Foundry when running in a Compute Module in Pipeline execution mode.""" + + _token: Union[Token, None] + + def __init__(self) -> None: + self._token = None + super().__init__() + + def get_token(self) -> Token: + if self._token is not None: + return self._token + + build2_token_path = os.environ.get(TOKEN_PATH_ENV_VAR) + if build2_token_path is None: + raise EnvironmentNotConfigured( + f"Missing environment variable {TOKEN_PATH_ENV_VAR}. Please ensure this code is running inside a Compute Module in Pipeline execution mode." + ) + + if not os.path.isfile(build2_token_path): + raise EnvironmentNotConfigured( + f"{TOKEN_PATH_ENV_VAR} environment variable points to a non-existent file: '{build2_token_path}'" + ) + + with open(build2_token_path, "r") as f: + self._token = _PipelineToken(f.read().strip()) + return self._token + + def execute_with_token(self, func: Callable[[Token], T]) -> T: + return func(self.get_token()) + + def run_with_token(self, func: Callable[[Token], T]) -> None: + func(self.get_token()) diff --git a/foundry_sdk/_core/confidential_client_auth.py b/foundry_sdk/_core/confidential_client_auth.py new file mode 100644 index 000000000..b14430ac3 --- /dev/null +++ b/foundry_sdk/_core/confidential_client_auth.py @@ -0,0 +1,96 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import time +from typing import List +from typing import Optional + +from foundry_sdk._core.config import Config +from foundry_sdk._core.oauth_utils import ConfidentialClientOAuthFlowProvider +from foundry_sdk._core.oauth_utils import OAuth +from foundry_sdk._core.oauth_utils import OAuthToken +from foundry_sdk._core.oauth_utils import SignInResponse +from foundry_sdk._core.oauth_utils import SignOutResponse +from foundry_sdk._core.utils import assert_non_empty_string + + +class ConfidentialClientAuth(OAuth): + """ + Client for Confidential Client OAuth-authenticated Ontology applications. + Runs a background thread to periodically refresh access token. + + :param client_id: OAuth client id to be used by the application. + :param client_secret: OAuth client secret to be used by the application. + :param scopes: The list of scopes to request. By default, no specific scope is provided and a token will be returned with all scopes. + :param hostname: Hostname for authentication. This is only required if using ConfidentialClientAuth independently of the FoundryClient. + :param config: The HTTP config for authentication. This is only required if using ConfidentialClientAuth independently of the FoundryClient. + """ + + def __init__( + self, + client_id: str, + client_secret: str, + hostname: Optional[str] = None, + scopes: Optional[List[str]] = None, + should_refresh: bool = True, + *, + config: Optional[Config] = None, + ) -> None: + assert_non_empty_string(client_id, "client_id") + assert_non_empty_string(client_secret, "client_secret") + + if hostname is not None: + assert_non_empty_string(hostname, "hostname") + + if scopes is not None: + if not isinstance(scopes, list): + raise TypeError(f"The scopes must be a list, not {type(scopes)}.") + + self._client_id = client_id + self._client_secret = client_secret + self._server_oauth_flow_provider = ConfidentialClientOAuthFlowProvider( + client_id, + client_secret, + scopes=scopes, + ) + super().__init__(hostname=hostname, should_refresh=should_refresh, config=config) + + @property + def scopes(self) -> List[str]: + return self._server_oauth_flow_provider.scopes or [] + + def get_token(self) -> OAuthToken: + if self._token is None: + self._token = self._server_oauth_flow_provider.get_token(self._get_client()) + + if self._should_refresh: + self._start_auto_refresh() + + return self._token + + def _revoke_token(self) -> None: + if self._token: + self._server_oauth_flow_provider.revoke_token( + self._get_client(), + self._token.access_token, + ) + + @property + def url(self) -> str: + return self._get_client().base_url.host + + def _try_refresh_token(self) -> bool: + self._token = self._server_oauth_flow_provider.get_token(self._get_client()) + return True diff --git a/foundry_sdk/_core/config.py b/foundry_sdk/_core/config.py new file mode 100644 index 000000000..2c014fe68 --- /dev/null +++ b/foundry_sdk/_core/config.py @@ -0,0 +1,66 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +from dataclasses import dataclass +from typing import Any +from typing import Dict +from typing import Literal +from typing import Optional +from typing import Union + + +@dataclass +class Config: + """ + Configuration for the HTTP session. + """ + + default_headers: Optional[Dict[str, str]] = None + """HTTP headers to include with all requests.""" + + proxies: Optional[Dict[Literal["http", "https"], str]] = None + """Proxies to use for HTTP and HTTPS requests.""" + + timeout: Optional[Union[int, float]] = None + """The default timeout for all requests in seconds.""" + + verify: Union[bool, str] = True + """ + SSL verification, can be a boolean or a path to a CA bundle. When using an HTTPS proxy, + connection this value will be passed to the proxy's SSL context as well. + """ + + default_params: Optional[Dict[str, Any]] = None + """URL query parameters to include with all requests.""" + + scheme: Literal["http", "https"] = "https" + """URL scheme to use ('http' or 'https'). Defaults to 'https'.""" + + max_retries: Optional[int] = None + """ + The maximum number of times a failed request is retried. + If no value is provided, it defaults to 4. + """ + + propagate_qos: Optional[Literal["AUTOMATIC_RETRY", "PROPAGATE_429_AND_503_TO_CALLER"]] = None + """Indicates whether 429 and 503 status codes should be propagated as exceptions or retried.""" + + backoff_slot_size_ms: Optional[int] = None + """ + The size of one backoff time slot in milliseconds for call retries. For example, + an exponential backoff retry algorithm may choose a backoff time in [0, backoffSlotSize * 2^c] + for the c-th retry. + If no value is provided, it defaults to 250 milliseconds. + """ diff --git a/foundry_sdk/_core/context_and_environment_vars.py b/foundry_sdk/_core/context_and_environment_vars.py new file mode 100644 index 000000000..d59be45c0 --- /dev/null +++ b/foundry_sdk/_core/context_and_environment_vars.py @@ -0,0 +1,65 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +""" +Provides context and environment variables for the authentication user token and hostname. +They are used as an option to initialize the FoundryClient. +""" + +import os +from contextvars import ContextVar +from typing import Optional +from typing import TypeVar + +# Token and hostname variables +TOKEN_VAR: ContextVar[Optional[str]] = ContextVar("FOUNDRY_TOKEN", default=None) +HOSTNAME_VAR: ContextVar[Optional[str]] = ContextVar("FOUNDRY_HOSTNAME", default=None) +TOKEN_CONTEXT_VARS: list[ContextVar[Optional[str]]] = [TOKEN_VAR] +HOSTNAME_CONTEXT_VARS: list[ContextVar[Optional[str]]] = [HOSTNAME_VAR] + +TOKEN_ENV_VAR: str = "FOUNDRY_TOKEN" +HOSTNAME_ENV_VAR: str = "FOUNDRY_HOSTNAME" +TOKEN_ENV_VARS: list[str] = [TOKEN_ENV_VAR] +HOSTNAME_ENV_VARS: list[str] = [HOSTNAME_ENV_VAR] + +# Attribution variables +ATTRIBUTION_VAR: ContextVar[Optional[list[str]]] = ContextVar("ATTRIBUTION_RESOURCES", default=None) +ATTRIBUTION_CONTEXT_VARS: list[ContextVar[Optional[list[str]]]] = [ATTRIBUTION_VAR] + +T = TypeVar("T") + + +def _maybe_get_environment_var(env_vars: list[str]) -> Optional[str]: + for env_var in env_vars: + value = os.environ.get(env_var) + if value is not None: + return value + return None + + +def maybe_get_context_var( + context_vars: list[ContextVar[Optional[T]]], +) -> Optional[T]: + for context_var in context_vars: + value = context_var.get() + if value is not None: + return value + return None + + +def maybe_get_value_from_context_or_environment_vars( + context_vars: list[ContextVar[Optional[str]]], env_vars: list[str] +) -> Optional[str]: + return maybe_get_context_var(context_vars) or _maybe_get_environment_var(env_vars) diff --git a/foundry_sdk/_core/http_client.py b/foundry_sdk/_core/http_client.py new file mode 100644 index 000000000..f8034420f --- /dev/null +++ b/foundry_sdk/_core/http_client.py @@ -0,0 +1,180 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import functools +import os +import ssl +import sys +from typing import Optional +from typing import Tuple +from typing import Union + +import httpcore +import httpx + +from foundry_sdk._core.config import Config +from foundry_sdk._core.context_and_environment_vars import ATTRIBUTION_CONTEXT_VARS +from foundry_sdk._core.context_and_environment_vars import maybe_get_context_var +from foundry_sdk._core.utils import AnyCallableT +from foundry_sdk._core.utils import remove_prefixes +from foundry_sdk._versions import __version__ + + +def type_safe_cache(func: AnyCallableT) -> AnyCallableT: + """A type safe version of @functools.cache""" + return functools.cache(func) # type: ignore + + +def _prepare_transport_data(verify: Union[bool, str], proxy_url: Optional[str]): + # If verify is a string, we need to create an SSL context ourself + # since httpx has deprecated strings as inputs + # This logic to check whether the path is a file or directory is + # the same logic as both httpx (before they deprecated string paths) and requests + # Otherwise, we let httpx create the SSL context for us from a True/False value + if isinstance(verify, str): + if os.path.isdir(verify): + ssl_context = ssl.create_default_context(capath=verify) + else: + ssl_context = ssl.create_default_context(cafile=verify) + else: + ssl_context = httpx.create_ssl_context(verify=verify) + + proxy: Optional[httpx.Proxy] = None + if proxy_url is not None: + if not proxy_url.startswith(("http://", "https://")): + raise ValueError(f"Proxy URL must start with http:// or https://: {proxy_url}") + + # We shold only pass the SSL context to the proxy iff the proxy is HTTPS + # Otherwise, httpx will throw an error + if proxy_url.startswith("https://"): + proxy = httpx.Proxy(url=proxy_url, ssl_context=ssl_context) + else: + proxy = httpx.Proxy(url=proxy_url) + + return ssl_context, proxy + + +@type_safe_cache +def _get_transport(verify: Union[bool, str], proxy_url: Optional[str]) -> httpx.BaseTransport: + ssl_context, proxy = _prepare_transport_data(verify, proxy_url) + return httpx.HTTPTransport(verify=ssl_context, proxy=proxy) + + +@type_safe_cache +def _get_async_transport( + verify: Union[bool, str], proxy_url: Optional[str] +) -> httpx.AsyncBaseTransport: + ssl_context, proxy = _prepare_transport_data(verify, proxy_url) + transport = httpx.AsyncHTTPTransport(verify=ssl_context, proxy=proxy) + + # In httpx 0.25.0 and 0.26.0 the proxy SSL context was not set correctly + # This was fixed in 0.27.0, but we need to set it manually for older versions + # See https://github.com/encode/httpx/pull/3175 + if ( + isinstance(transport._pool, httpcore.AsyncHTTPProxy) + and proxy is not None + and transport._pool._proxy_ssl_context is None + ): + transport._pool._proxy_ssl_context = proxy.ssl_context + + return transport + + +def _prepare_client_data( + hostname: str, + config: Optional[Config], +) -> Tuple[Config, str, Union[bool, str], dict]: + """Prepare common data for HttpClient and AsyncHttpClient.""" + config = config or Config() + hostname = remove_prefixes(hostname.strip("/"), ["https://", "http://"]) + verify = config.verify + + # If verity is set to True, then merge with env vars + # This is the same behavior as requests (although + # requests does not check for SSL_CERT_FILE) + if verify is True: + verify = ( + # For historical reasons, we continue to support REQUESTS_CA_BUNDLE + os.environ.get("REQUESTS_CA_BUNDLE") + or os.environ.get("SSL_CERT_FILE") + or True + ) + + attribution = maybe_get_context_var( + context_vars=ATTRIBUTION_CONTEXT_VARS, + ) + # When sending multiple values in a header, should be sent as a comma separated list per + # https://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2 + attribution_header = ", ".join(attribution) if attribution is not None else None + + headers = { + "User-Agent": f"python-foundry-platform-sdk/{__version__} python/{sys.version_info.major}.{sys.version_info.minor}", + **(config.default_headers or {}), + } + + if attribution_header is not None: + headers["attribution"] = attribution_header + + return config, hostname, verify, headers + + +class HttpClient(httpx.Client): + def __init__(self, hostname: str, config: Optional[Config] = None): + config, hostname, verify, headers = _prepare_client_data(hostname, config) + + # Expose this for testing, otherwise it is hard to access + self._verify = verify + + super().__init__( + headers=headers, + params=config.default_params, + transport=_get_transport(verify=verify, proxy_url=None), + mounts={ + scheme + "://": _get_transport(verify=verify, proxy_url=proxy_url) + for scheme, proxy_url in (config.proxies or {}).items() + }, + # Unlike requests, HTTPX does not follow redirects by default + # If you access an endpoint with a missing trailing slash, the server could redirect + # the user to the URL with the trailing slash. For example, accessing `/example` might + # redirect to `/example/`. + follow_redirects=True, + base_url=f"{config.scheme}://{hostname}", + timeout=config.timeout, + ) + + +class AsyncHttpClient(httpx.AsyncClient): + def __init__(self, hostname: str, config: Optional[Config] = None): + config, hostname, verify, headers = _prepare_client_data(hostname, config) + + # Expose this for testing, otherwise it is hard to access + self._verify = verify + + super().__init__( + headers=headers, + params=config.default_params, + transport=_get_async_transport(verify=verify, proxy_url=None), + mounts={ + scheme + "://": _get_async_transport(verify=verify, proxy_url=proxy_url) + for scheme, proxy_url in (config.proxies or {}).items() + }, + # Unlike requests, HTTPX does not follow redirects by default + # If you access an endpoint with a missing trailing slash, the server could redirect + # the user to the URL with the trailing slash. For example, accessing `/example` might + # redirect to `/example/`. + follow_redirects=True, + base_url=f"{config.scheme}://{hostname}", + timeout=config.timeout, + ) diff --git a/foundry_sdk/_core/model_base.py b/foundry_sdk/_core/model_base.py new file mode 100644 index 000000000..2b87077a9 --- /dev/null +++ b/foundry_sdk/_core/model_base.py @@ -0,0 +1,98 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import json +import warnings +from typing import Any +from typing import Dict +from typing import Hashable +from typing import Optional +from typing import cast + +import pydantic + + +class ModelBase(pydantic.BaseModel): + """ + Base class for all model objects in the SDK. + + This base model supports being used as a dictionary key while preserving mutability. + It tracks if it has been used as a hash key and warns if mutation occurs after hashing. + """ + + model_config = {"extra": "allow", "populate_by_name": True} + + def __init__(self, **data): + super().__init__(**data) + self._hash_called = False + self._hash_value: Optional[int] = None + + def __hash__(self) -> int: + """ + Generate a hash based on class identity and attribute values. + """ + if self._hash_value is None: + self._hash_called = True + + def make_hashable(value: Any) -> Hashable: + if isinstance(value, dict): + return tuple((k, make_hashable(v)) for k, v in sorted(value.items())) + elif isinstance(value, (list, set)): + return tuple(make_hashable(v) for v in value) + else: + return value + + # Include class type in the hash + class_identifier = self.__class__.__name__ + + # Create hashable representations of all fields + hash_fields = tuple( + (field, make_hashable(getattr(self, field))) for field in self.model_fields + ) + + # Hash combination of class identifier and field values + self._hash_value = hash((class_identifier, hash_fields)) + + return self._hash_value + + def __setattr__(self, name: str, value: Any) -> None: + """ + Track attribute mutations and warn if the model has been hashed. + + Once a model has been used as a dictionary key, modifying it could cause + unexpected behavior, as the dictionary location is determined by the hash + value at insertion time. + """ + # Check if we're setting special attributes used by this class + if name in ("_hash_called", "_hash_value"): + super().__setattr__(name, value) + return + + # If hash has been called, warn about the mutation and reset the hash + if self._hash_called: + warnings.warn( + f"Modifying {self.__class__.__name__} after it has been used as a dictionary key " + "may lead to unexpected behavior.", + UserWarning, + stacklevel=2, + ) + # Reset the hash value since the object has changed + self._hash_value = None + + super().__setattr__(name, value) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using the field aliases.""" + return cast(Dict[str, Any], self.model_dump(by_alias=True, exclude_none=True)) diff --git a/foundry_sdk/_core/oauth_utils.py b/foundry_sdk/_core/oauth_utils.py new file mode 100644 index 000000000..f6e293bdd --- /dev/null +++ b/foundry_sdk/_core/oauth_utils.py @@ -0,0 +1,408 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import base64 +import hashlib +import secrets +import string +import threading +import time +import warnings +from abc import ABC +from abc import abstractmethod +from typing import Any +from typing import Callable +from typing import Dict +from typing import List +from typing import Optional +from typing import TypeVar +from urllib.parse import urlencode + +import httpx +import pydantic + +from foundry_sdk._core.auth_utils import Auth +from foundry_sdk._core.auth_utils import Token +from foundry_sdk._core.config import Config +from foundry_sdk._core.http_client import HttpClient + + +class OAuthUtils: + base_context_path = "/multipass" + authorize_request_path = "/api/oauth2/authorize" + token_request_path = "/api/oauth2/token" + revoke_request_path = "/api/oauth2/revoke_token" + + @staticmethod + def get_token_uri(context_path: Optional[str] = None) -> str: + return OAuthUtils.create_uri(context_path, OAuthUtils.token_request_path) + + @staticmethod + def get_authorize_uri(context_path: Optional[str] = None) -> str: + return OAuthUtils.create_uri(context_path, OAuthUtils.authorize_request_path) + + @staticmethod + def get_revoke_uri(context_path: Optional[str] = None) -> str: + return OAuthUtils.create_uri(context_path, OAuthUtils.revoke_request_path) + + @staticmethod + def create_uri(context_path: Optional[str], request_path: str) -> str: + return (context_path or OAuthUtils.base_context_path) + request_path + + +class SignInResponse(pydantic.BaseModel): + session: Dict[str, Any] + + +class SignOutResponse(pydantic.BaseModel): + pass + + +class OAuthTokenResponse(pydantic.BaseModel): + access_token: str + token_type: str + expires_in: int + refresh_token: Optional[str] = None + + def __init__(self, token_response: Dict[str, Any]) -> None: + super().__init__(**token_response) + + +class OAuthToken(Token): + def __init__(self, token: OAuthTokenResponse): + self._token = token + + @property + def access_token(self) -> str: + return self._token.access_token + + @property + def refresh_token(self) -> Optional[str]: + return self._token.refresh_token + + @property + def expires_in(self) -> int: + return self._token.expires_in + + @property + def token_type(self) -> str: + return self._token.token_type + + def _calculate_expiration(self) -> int: + return int(self._token.expires_in * 1000 + self.current_time()) + + @property + def expires_at(self) -> int: + return self._calculate_expiration() + + @staticmethod + def current_time() -> int: + return int(time.time() * 1000) + + +class AuthorizeRequest(pydantic.BaseModel): + url: str + state: str + code_verifier: str + + +T = TypeVar("T") + + +class OAuth(Auth, ABC): + def __init__( + self, + hostname: Optional[str] = None, + should_refresh: bool = True, + *, + config: Optional[Config] = None, + ) -> None: + self._config = config + self._hostname = hostname + self._client: Optional[HttpClient] = None + self._should_refresh = should_refresh + self._stop_refresh_event = threading.Event() + self._token: Optional[OAuthToken] = None + + def sign_out(self) -> SignOutResponse: + self._revoke_token() + self._token = None + # Signal the auto-refresh thread to stop + self._stop_refresh_event.set() + return SignOutResponse() + + def execute_with_token(self, func: Callable[[OAuthToken], T]) -> T: + try: + if self._should_refresh: + return self._run_with_attempted_refresh(func) + else: + return func(self.get_token()) + except httpx.HTTPStatusError as e: + if e.response.status_code == 401: + self.sign_out() + raise e + except Exception as e: + raise e + + def run_with_token(self, func: Callable[[OAuthToken], T]) -> None: + self.execute_with_token(func) + + @abstractmethod + def get_token(self) -> OAuthToken: + pass + + @abstractmethod + def _revoke_token(self) -> None: + pass + + @abstractmethod + def _try_refresh_token(self) -> bool: + pass + + def _start_auto_refresh(self) -> None: + def _auto_refresh_token() -> None: + while True: + timeout = self._token.expires_in - 60 if self._token else 10 + if self._stop_refresh_event.wait(timeout): + return + if self._token: + self._try_refresh_token() + + refresh_thread = threading.Thread(target=_auto_refresh_token, daemon=True) + refresh_thread.start() + + def _run_with_attempted_refresh(self, func: Callable[[OAuthToken], T]) -> T: + """ + Attempt to run func, and if it fails with a 401, refresh the token and try again. + If it fails with a 401 again, raise the exception. + """ + try: + return func(self.get_token()) + except httpx.HTTPStatusError as e: + if e.response.status_code == 401: + if not self._try_refresh_token(): + warnings.warn("OAuth token refresh failed", UserWarning, stacklevel=2) + raise e + return func(self.get_token()) + else: + raise e + + def _parameterize(self, hostname: str, config: Optional[Config]) -> None: + if self._client is not None: + return + + if self._config is None: + self._config = config + else: + if self._config == config: + warnings.warn( + f"When a {self.__class__.__name__} instance is given to a FoundryClient, if a config " + "is not set it will be provided by the FoundryClient. You are using the same config " + "here and in the FoundryClient. Please remove the config parameter from the " + f"{self.__class__.__name__} initialization.", + UserWarning, + stacklevel=2, + ) + + if self._hostname is None: + self._hostname = hostname + else: + if self._hostname == hostname: + warnings.warn( + f"When a {self.__class__.__name__} instance is given to a FoundryClient, if a hostname " + "is not set it will be provided by the FoundryClient. You are using the same hostname " + "here and in the FoundryClient. Please remove the hostname parameter from the " + f"{self.__class__.__name__} initialization.", + UserWarning, + stacklevel=2, + ) + + # Set here so that the next call to _parameterize() doesn't re-create another HttpClient + # This method may be called many times dependening on how many different ApiClients + # are created with the same Auth object + self._client = HttpClient(hostname, config) + + def _get_client(self) -> HttpClient: + if self._client is None: + if self._hostname is None: + raise ValueError( + f"The hostname must be provided to {self.__class__.__name__} when fetching a token." + ) + + self._client = HttpClient(hostname=self._hostname, config=self._config) + + return self._client + + +class ConfidentialClientOAuthFlowProvider: + def __init__( + self, + client_id: str, + client_secret: str, + multipass_context_path: Optional[str] = None, + scopes: Optional[List[str]] = None, + ): + self._client_id = client_id + self._client_secret = client_secret + self.multipass_context_path = multipass_context_path + self.scopes = scopes + + @property + def client_id(self) -> str: + return self._client_id + + @property + def client_secret(self) -> str: + return self._client_secret + + def get_token(self, client: HttpClient) -> OAuthToken: + params = { + "client_id": self._client_id, + "client_secret": self._client_secret, + "grant_type": "client_credentials", + } + scopes = self.get_scopes() + if len(scopes) > 0: + params["scope"] = " ".join(scopes) + + token_url = OAuthUtils.get_token_uri(self.multipass_context_path) + response = client.post(token_url, data=params) + response.raise_for_status() + return OAuthToken(token=OAuthTokenResponse(token_response=response.json())) + + def revoke_token(self, client: HttpClient, access_token: str) -> None: + body = { + "client_id": self._client_id, + "client_secret": self._client_secret, + "token": access_token, + } + + token_url = OAuthUtils.get_revoke_uri(self.multipass_context_path) + revoke_token_response = client.post(token_url, data=body) + revoke_token_response.raise_for_status() + + def get_scopes(self) -> List[str]: + if not self.scopes: + return [] + return [*self.scopes, "offline_access"] + + +def generate_random_string(min_length: int = 43, max_length: int = 128) -> str: + characters = string.ascii_letters + string.digits + "-._~" + length = secrets.randbelow(max_length - min_length + 1) + min_length + return "".join(secrets.choice(characters) for _ in range(length)) + + +def generate_code_challenge(input_string: str) -> str: + # Calculate the SHA256 hash + sha256_hash = hashlib.sha256(input_string.encode("utf-8")).digest() + + # Base64-URL encode the hash and remove padding + base64url_encoded = base64.urlsafe_b64encode(sha256_hash).rstrip(b"=") + + return base64url_encoded.decode("utf-8") + + +class PublicClientOAuthFlowProvider: + def __init__( + self, + client_id: str, + redirect_url: str, + multipass_context_path: Optional[str] = None, + scopes: Optional[List[str]] = None, + ): + self._client_id = client_id + self._redirect_url = redirect_url + self.multipass_context_path = multipass_context_path + self.scopes = scopes + + @property + def client_id(self) -> str: + return self._client_id + + @property + def redirect_url(self) -> str: + return self._redirect_url + + def generate_auth_request(self, client: HttpClient) -> AuthorizeRequest: + state = generate_random_string() + code_verifier = generate_random_string() + code_challenge = generate_code_challenge(code_verifier) + + params = { + "response_type": "code", + "client_id": self._client_id, + "redirect_uri": self._redirect_url, + "code_challenge": code_challenge, + "code_challenge_method": "S256", + "state": state, + } + scopes = self.get_scopes() + if len(scopes) > 0: + params["scope"] = " ".join(scopes) + + authorize_url = OAuthUtils.get_authorize_uri(self.multipass_context_path) + + return AuthorizeRequest( + url=f"{client.base_url}{authorize_url}?{urlencode(params, doseq=True)}", + state=state, + code_verifier=code_verifier, + ) + + def get_token(self, client: HttpClient, code: str, code_verifier: str) -> OAuthToken: + headers = {"Content-Type": "application/x-www-form-urlencoded"} + params = { + "grant_type": "authorization_code", + "code": code, + "redirect_uri": self._redirect_url, + "client_id": self._client_id, + "code_verifier": code_verifier, + } + scopes = self.get_scopes() + if len(scopes) > 0: + params["scope"] = " ".join(scopes) + + token_url = OAuthUtils.get_token_uri(self.multipass_context_path) + response = client.post(token_url, data=params, headers=headers) + response.raise_for_status() + return OAuthToken(token=OAuthTokenResponse(token_response=response.json())) + + def refresh_token(self, client: HttpClient, refresh_token: str) -> OAuthToken: + headers = {"Content-Type": "application/x-www-form-urlencoded"} + params = { + "grant_type": "refresh_token", + "client_id": self._client_id, + "refresh_token": refresh_token, + } + + token_url = OAuthUtils.get_token_uri(self.multipass_context_path) + response = client.post(token_url, data=params, headers=headers) + response.raise_for_status() + return OAuthToken(token=OAuthTokenResponse(token_response=response.json())) + + def revoke_token(self, client: HttpClient, access_token: str) -> None: + body = { + "client_id": self._client_id, + "token": access_token, + } + + token_url = OAuthUtils.get_revoke_uri(self.multipass_context_path) + revoke_token_response = client.post(token_url, data=body) + revoke_token_response.raise_for_status() + + def get_scopes(self) -> List[str]: + if not self.scopes: + return [] + return [*self.scopes, "offline_access"] diff --git a/foundry_sdk/_core/page_iterator.py b/foundry_sdk/_core/page_iterator.py new file mode 100644 index 000000000..ea3787256 --- /dev/null +++ b/foundry_sdk/_core/page_iterator.py @@ -0,0 +1,144 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +from typing import Awaitable +from typing import Generic +from typing import List +from typing import Optional +from typing import Protocol +from typing import Tuple +from typing import TypeVar + +T = TypeVar("T") + + +class PageFunction(Generic[T], Protocol): + def __call__( + self, page_size: Optional[int], next_page_token: Optional[str] + ) -> Tuple[Optional[str], List[T]]: ... + + +class AsyncPageFunction(Generic[T], Protocol): + def __call__( + self, page_size: Optional[int], next_page_token: Optional[str] + ) -> Awaitable[Tuple[Optional[str], List[T]]]: ... + + +class PageIterator(Generic[T]): + """A generic class for iterating over paged responses.""" + + def __init__( + self, + paged_func: PageFunction[T], + page_size: Optional[int] = None, + page_token: Optional[str] = None, + ) -> None: + self._page_size: Optional[int] = page_size + self._paged_func: PageFunction[T] = paged_func + self._next_page_token: Optional[str] = page_token + self._has_next = True + self._data: List[T] = [] + self._get_data() + + @property + def next_page_token(self): + return self._next_page_token + + @property + def data(self): + return self._data + + def __iter__(self): + return self + + def __next__(self): + if not self._has_next: + raise StopIteration("End of iteration reached") + + data = self._data + self._get_data() + return data + + def _get_data(self): + if self._has_next: + self._next_page_token, self._data = self._paged_func( + page_size=self._page_size, next_page_token=self._next_page_token + ) + self._has_next = self._next_page_token is not None + else: + self._data = [] + + +class AsyncPageIterator(Generic[T]): + """A generic class for iterating over paged responses.""" + + def __init__( + self, + paged_func: AsyncPageFunction[T], + page_size: Optional[int] = None, + page_token: Optional[str] = None, + ) -> None: + self._page_size: Optional[int] = page_size + self._paged_func: AsyncPageFunction[T] = paged_func + self._next_page_token: Optional[str] = page_token + self._yielded_first = False + self._data: Optional[List[T]] = None + + async def get_next_page_token(self): + """ + Get the next page token. If the first page has not been fetched, it will be + loaded first. + """ + await self.get_data() + return self._next_page_token + + async def get_data(self): + """ + Get the current page of data. If the first page has not been fetched, it will be + loaded first. + """ + if self._data is None: + await self._get_data() + + # This should never be None, but mypy doesn't know that + assert self._data is not None + return self._data + + def __aiter__(self): + return self + + async def __anext__(self): + if self._yielded_first and self._next_page_token is None: + raise StopAsyncIteration("End of iteration reached") + + if not self._yielded_first: + self._yielded_first = True + + # Unlike the PageIterator, the AsyncPageIterator cannot + # fetch data in the constructor because it is async + if self._data is None: + await self._get_data() + else: + await self._get_data() + + # This should never be None, but mypy doesn't know that + assert self._data is not None + return self._data + + async def _get_data(self): + self._next_page_token, self._data = await self._paged_func( + page_size=self._page_size, + next_page_token=self._next_page_token, + ) diff --git a/foundry_sdk/_core/public_client_auth.py b/foundry_sdk/_core/public_client_auth.py new file mode 100644 index 000000000..f7e957ff8 --- /dev/null +++ b/foundry_sdk/_core/public_client_auth.py @@ -0,0 +1,110 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import time +from typing import List +from typing import Optional + +from foundry_sdk._core.config import Config +from foundry_sdk._core.oauth_utils import AuthorizeRequest +from foundry_sdk._core.oauth_utils import OAuth +from foundry_sdk._core.oauth_utils import OAuthToken +from foundry_sdk._core.oauth_utils import PublicClientOAuthFlowProvider +from foundry_sdk._core.oauth_utils import SignOutResponse +from foundry_sdk._errors.not_authenticated import NotAuthenticated + + +class PublicClientAuth(OAuth): + """ + Client for Public Client OAuth-authenticated Ontology applications. + Runs a background thread to periodically refresh access token. + + :param client_id: OAuth client id to be used by the application. + :param redirect_url: The URL the authorization server should redirect the user to after the user approves the request. + :param scopes: The list of scopes to request. By default, no specific scope is provided and a token will be returned with all scopes. + :param hostname: Hostname for authentication. This is only required if using PublicClientAuth independently of the FoundryClient. + :param config: The HTTP config for authentication. This is only required if using ConfidentialClientAuth independently of the FoundryClient. + """ + + def __init__( + self, + client_id: str, + redirect_url: str, + hostname: Optional[str] = None, + scopes: Optional[List[str]] = None, + should_refresh: bool = True, + *, + config: Optional[Config] = None, + ) -> None: + self._client_id = client_id + self._redirect_url = redirect_url + self._auth_request: Optional[AuthorizeRequest] = None + self._server_oauth_flow_provider = PublicClientOAuthFlowProvider( + client_id=client_id, + redirect_url=redirect_url, + scopes=scopes, + ) + super().__init__(hostname=hostname, should_refresh=should_refresh, config=config) + + @property + def scopes(self) -> List[str]: + return self._server_oauth_flow_provider.scopes or [] + + def get_token(self) -> OAuthToken: + if self._token is None: + raise NotAuthenticated("Client has not been authenticated.") + return self._token + + def _revoke_token(self) -> None: + if self._token: + self._server_oauth_flow_provider.revoke_token( + self._get_client(), + self._token.access_token, + ) + + def _try_refresh_token(self) -> bool: + if self._token and self._token.refresh_token: + self._token = self._server_oauth_flow_provider.refresh_token( + self._get_client(), + refresh_token=self._token.refresh_token, + ) + return True + return False + + @property + def url(self) -> str: + return self._get_client().base_url.host + + def sign_in(self) -> str: + self._auth_request = self._server_oauth_flow_provider.generate_auth_request( + self._get_client() + ) + return self._auth_request.url + + def set_token(self, code: str, state: str) -> None: + if not self._auth_request: + raise RuntimeError("Must sign in prior to setting token") + + if state != self._auth_request.state: + raise RuntimeError("Unable to verify state") + + self._token = self._server_oauth_flow_provider.get_token( + self._get_client(), + code=code, + code_verifier=self._auth_request.code_verifier, + ) + + if self._should_refresh: + self._start_auto_refresh() diff --git a/foundry_sdk/_core/resource_iterator.py b/foundry_sdk/_core/resource_iterator.py new file mode 100644 index 000000000..c969cce86 --- /dev/null +++ b/foundry_sdk/_core/resource_iterator.py @@ -0,0 +1,96 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import warnings +from typing import Generic +from typing import List +from typing import Optional +from typing import TypeVar + +from foundry_sdk._core.page_iterator import AsyncPageFunction +from foundry_sdk._core.page_iterator import AsyncPageIterator +from foundry_sdk._core.page_iterator import PageFunction +from foundry_sdk._core.page_iterator import PageIterator + +T = TypeVar("T") + + +class ResourceIterator(Generic[T]): + """A generic class for iterating over paged responses.""" + + def __init__( + self, + paged_func: PageFunction[T], + page_size: Optional[int] = None, + page_token: Optional[str] = None, + ) -> None: + self._page_iterator = PageIterator(paged_func, page_size, page_token) + self._index = 0 + + @property + def data(self) -> List[T]: + return self._page_iterator.data + + @property + def next_page_token(self) -> Optional[str]: + return self._page_iterator.next_page_token + + def __iter__(self): + return self + + def __next__(self): + while self._index >= len(self._page_iterator.data): + self._get_data() + + obj = self._page_iterator.data[self._index] + self._index += 1 + return obj + + def _get_data(self): + try: + next(self._page_iterator) + self._index = 0 + except StopIteration: + raise StopIteration("End of iteration reached") + + +class AsyncResourceIterator(Generic[T]): + """A generic class for async iterating over paged responses.""" + + def __init__( + self, + paged_func: AsyncPageFunction[T], + page_size: Optional[int] = None, + page_token: Optional[str] = None, + ) -> None: + self._page_iterator = AsyncPageIterator(paged_func, page_size, page_token) + self._data: Optional[List[T]] = None + self._index = 0 + + def __aiter__(self): + return self + + async def __anext__(self): + if self._data is None: + self._data = await self._page_iterator.__anext__() + + if self._index >= len(self._data): + self._data = await self._page_iterator.__anext__() + self._index = 0 + return await self.__anext__() + + obj = self._data[self._index] + self._index += 1 + return obj diff --git a/foundry_sdk/_core/table.py b/foundry_sdk/_core/table.py new file mode 100644 index 000000000..a42d5ff27 --- /dev/null +++ b/foundry_sdk/_core/table.py @@ -0,0 +1,82 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +from typing import TYPE_CHECKING +from typing import Any +from typing import Optional + +if TYPE_CHECKING: + import duckdb # type: ignore + import pandas as pd # type: ignore + import polars as pl # type: ignore + import pyarrow as pa # type: ignore + + +def _error_msg(package_required: str, convert_to: str, extra_dependency: str): + return ( + f"{package_required} is required to convert to {convert_to}. If you are using pip, " + f"you can install it with 'pip install foundry_sdk[{extra_dependency}]'." + ) + + +class TableResponse(bytes): + """A generic class for deserializing an Arrow Table into various formats.""" + + _arrow_table: Optional["pa.Table"] + + def __new__(cls, arrow_bytes: bytes): + instance = super().__new__(cls, arrow_bytes) + instance._arrow_table = None + return instance + + def to_pandas(self) -> "pd.DataFrame": + """Convert the bytes into a Pandas DataFrame.""" + try: + return self._get_arrow_table("pandas").to_pandas() + except ImportError: + raise ImportError(_error_msg("pandas", "a Pandas DataFrame", "pandas")) + + def to_polars(self) -> "pl.DataFrame": + """Convert the bytes into a Polars DataFrame.""" + try: + import polars as pl + + return pl.DataFrame(self._get_arrow_table("polars")) + except ImportError: + raise ImportError(_error_msg("polars", "a Polars DataFrame", "polars")) + + def to_pyarrow(self) -> "pa.Table": + """Convert the bytes into an Arrow Table.""" + return self._get_arrow_table("pyarrow") + + def to_duckdb(self) -> "duckdb.DuckDBPyRelation": + """Convert the bytes into a DuckDB relation.""" + try: + import duckdb + + return duckdb.from_arrow(self._get_arrow_table("duckdb")) + except ImportError: + raise ImportError(_error_msg("duckdb", "a DuckDB relation", "duckdb")) + + def _get_arrow_table(self, extra_dependency: str) -> "pa.Table": + try: + import pyarrow as pa + except ImportError: + raise ImportError(_error_msg("pyarrow", "an Arrow Table", extra_dependency)) + + if self._arrow_table is None: + self._arrow_table = pa.ipc.open_stream(self).read_all() + + return self._arrow_table diff --git a/foundry_sdk/_core/user_token_auth_client.py b/foundry_sdk/_core/user_token_auth_client.py new file mode 100644 index 000000000..08d580da7 --- /dev/null +++ b/foundry_sdk/_core/user_token_auth_client.py @@ -0,0 +1,55 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import os +from typing import Callable +from typing import TypeVar + +import httpx + +from foundry_sdk._core.auth_utils import Auth +from foundry_sdk._core.auth_utils import Token +from foundry_sdk._core.utils import assert_non_empty_string +from foundry_sdk._errors.environment_not_configured import EnvironmentNotConfigured +from foundry_sdk._errors.not_authenticated import NotAuthenticated + +T = TypeVar("T") + + +class _UserToken(Token): + + def __init__(self, token: str) -> None: + self._token = token + + @property + def access_token(self) -> str: + return self._token + + +class UserTokenAuth(Auth): + def __init__(self, token: str) -> None: + assert_non_empty_string(token, "token") + self._token = _UserToken(token) + + def get_token(self) -> Token: + if self._token is None: + raise NotAuthenticated("Client has not been authenticated.") + return self._token + + def execute_with_token(self, func: Callable[[Token], T]) -> T: + return func(self.get_token()) + + def run_with_token(self, func: Callable[[Token], T]) -> None: + func(self.get_token()) diff --git a/foundry_sdk/_core/utils.py b/foundry_sdk/_core/utils.py new file mode 100644 index 000000000..d6dc62bfd --- /dev/null +++ b/foundry_sdk/_core/utils.py @@ -0,0 +1,123 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import inspect +import typing +import warnings +from datetime import timezone +from functools import wraps +from typing import Any +from typing import Callable +from typing import ForwardRef +from typing import List +from typing import TypeVar + +import pydantic +from typing_extensions import Annotated + +RID = Annotated[ + str, + pydantic.StringConstraints( + pattern=r"^ri\.[a-z][a-z0-9-]*\.([a-z0-9][a-z0-9\-]*)?\.[a-z][a-z0-9-]*\.[a-zA-Z0-9._-]+$", + ), +] + + +UUID = Annotated[ + str, + pydantic.StringConstraints( + pattern=r"^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$", + ), +] + + +Long = Annotated[ + int, + pydantic.PlainSerializer( + lambda value: str(value), + return_type=str, + # Important: This ensures the value is not serialized when using to_dict() + # We only want to serialize when dumping to a JSON string + when_used="json", + ), +] +"""A long integer that is serialized to a string in JSON.""" + + +AwareDatetime = Annotated[ + pydantic.AwareDatetime, + pydantic.PlainSerializer( + lambda value: value.astimezone(timezone.utc).isoformat(), + return_type=str, + # Important: This ensures the value is not serialized when using to_dict() + # We only want to serialize when dumping to a JSON string + when_used="json", + ), +] +"""A datetime object that enforces timezones and is always serialized to UTC.""" + + +Timeout = Annotated[int, pydantic.Field(gt=0)] + + +def remove_prefixes(text: str, prefixes: List[str]): + for prefix in prefixes: + if text.startswith(prefix): + text = text[len(prefix) :] + return text + + +AnyCallableT = TypeVar("AnyCallableT", bound=Callable[..., Any]) + + +def maybe_ignore_preview(func: AnyCallableT) -> AnyCallableT: + sig = inspect.signature(func) + + @wraps(func) + def wrapper(*args: Any, **kwargs: Any) -> Any: + if "preview" in kwargs and "preview" not in sig.parameters: + warnings.warn( + f'The "preview" argument is not required when calling {func.__name__}() since the endpoint is not in beta.', + UserWarning, + ) + kwargs.pop("preview") + return func(*args, **kwargs) + + return wrapper # type: ignore + + +def resolve_forward_references(type_obj: Any, globalns: dict, localns: dict) -> Any: + if typing.get_origin(type_obj) is None: + return type_obj + + args = tuple( + ( + typing._eval_type(arg, globalns, localns) # type: ignore + if isinstance(arg, ForwardRef) + else resolve_forward_references(arg, globalns, localns) + ) + for arg in typing.get_args(type_obj) # type: ignore + ) + + setattr(type_obj, "__args__", args) + return type_obj + + +def assert_non_empty_string(value: str, name: str) -> None: + if not isinstance(value, str): + raise TypeError(f"The {name} must be a string, not {type(value)}.") + + if not value: + raise ValueError(f"The {name} cannot be empty.") diff --git a/foundry_sdk/_errors/__init__.py b/foundry_sdk/_errors/__init__.py new file mode 100644 index 000000000..457674352 --- /dev/null +++ b/foundry_sdk/_errors/__init__.py @@ -0,0 +1,41 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +from foundry_sdk._errors.api_not_found import ApiNotFoundError +from foundry_sdk._errors.connection_error import ConnectionError +from foundry_sdk._errors.connection_error import ProxyError +from foundry_sdk._errors.environment_not_configured import EnvironmentNotConfigured +from foundry_sdk._errors.not_authenticated import NotAuthenticated +from foundry_sdk._errors.palantir_exception import PalantirException +from foundry_sdk._errors.palantir_qos_exception import PalantirQoSException +from foundry_sdk._errors.palantir_qos_exception import RateLimitError +from foundry_sdk._errors.palantir_qos_exception import ServiceUnavailable +from foundry_sdk._errors.palantir_rpc_exception import BadRequestError +from foundry_sdk._errors.palantir_rpc_exception import ConflictError +from foundry_sdk._errors.palantir_rpc_exception import InternalServerError +from foundry_sdk._errors.palantir_rpc_exception import NotFoundError +from foundry_sdk._errors.palantir_rpc_exception import PalantirRPCException +from foundry_sdk._errors.palantir_rpc_exception import PermissionDeniedError +from foundry_sdk._errors.palantir_rpc_exception import RequestEntityTooLargeError +from foundry_sdk._errors.palantir_rpc_exception import UnauthorizedError +from foundry_sdk._errors.palantir_rpc_exception import UnprocessableEntityError +from foundry_sdk._errors.sdk_internal_error import SDKInternalError +from foundry_sdk._errors.sdk_internal_error import handle_unexpected +from foundry_sdk._errors.stream_error import StreamConsumedError +from foundry_sdk._errors.timeout_error import ConnectTimeout +from foundry_sdk._errors.timeout_error import ReadTimeout +from foundry_sdk._errors.timeout_error import TimeoutError +from foundry_sdk._errors.timeout_error import WriteTimeout +from foundry_sdk._errors.utils import deserialize_error diff --git a/foundry_sdk/_errors/api_not_found.py b/foundry_sdk/_errors/api_not_found.py new file mode 100644 index 000000000..1ae322aa4 --- /dev/null +++ b/foundry_sdk/_errors/api_not_found.py @@ -0,0 +1,23 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +from foundry_sdk._errors.palantir_exception import PalantirException + + +class ApiNotFoundError(PalantirException): + """The requested API was not found.""" + + def __init__(self, message: str) -> None: + super().__init__(message) diff --git a/foundry_sdk/_errors/connection_error.py b/foundry_sdk/_errors/connection_error.py new file mode 100644 index 000000000..67e727188 --- /dev/null +++ b/foundry_sdk/_errors/connection_error.py @@ -0,0 +1,24 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +from foundry_sdk._errors.palantir_exception import PalantirException + + +class ConnectionError(PalantirException): + """An issue occurred when connecting to the server. This also catches both ProxyError.""" + + +class ProxyError(ConnectionError): + """An issue occurred when connecting to or authenticating with a proxy server.""" diff --git a/foundry_sdk/_errors/environment_not_configured.py b/foundry_sdk/_errors/environment_not_configured.py new file mode 100644 index 000000000..2bb700053 --- /dev/null +++ b/foundry_sdk/_errors/environment_not_configured.py @@ -0,0 +1,21 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +from foundry_sdk._errors.palantir_exception import PalantirException + + +class EnvironmentNotConfigured(PalantirException): + def __init__(self, message: str) -> None: + super().__init__(message) diff --git a/foundry_sdk/_errors/not_authenticated.py b/foundry_sdk/_errors/not_authenticated.py new file mode 100644 index 000000000..c3b3a6a67 --- /dev/null +++ b/foundry_sdk/_errors/not_authenticated.py @@ -0,0 +1,20 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +from foundry_sdk._errors.palantir_exception import PalantirException + + +class NotAuthenticated(PalantirException): + pass diff --git a/foundry_sdk/_errors/palantir_exception.py b/foundry_sdk/_errors/palantir_exception.py new file mode 100644 index 000000000..795fc101b --- /dev/null +++ b/foundry_sdk/_errors/palantir_exception.py @@ -0,0 +1,17 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +class PalantirException(Exception): + """The root exception class all others inherit from.""" diff --git a/foundry_sdk/_errors/palantir_qos_exception.py b/foundry_sdk/_errors/palantir_qos_exception.py new file mode 100644 index 000000000..a0a7ae3aa --- /dev/null +++ b/foundry_sdk/_errors/palantir_qos_exception.py @@ -0,0 +1,34 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +from foundry_sdk._errors.palantir_exception import PalantirException + + +class PalantirQoSException(PalantirException): + """The root exception class for all QoS related exceptions.""" + + +class RateLimitError(PalantirQoSException): + """ + The service is experiencing too many requests. Reduce your request rate and retry your + request shortly. This error is thrown if a 429 status code is returned. + """ + + +class ServiceUnavailable(PalantirQoSException): + """ + The service is currently unavailable. Retry your request shortly. This error is thrown if a + 503 status code is returned. + """ diff --git a/foundry_sdk/_errors/palantir_rpc_exception.py b/foundry_sdk/_errors/palantir_rpc_exception.py new file mode 100644 index 000000000..4c2385537 --- /dev/null +++ b/foundry_sdk/_errors/palantir_rpc_exception.py @@ -0,0 +1,79 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import json +from typing import Any +from typing import Dict + +from foundry_sdk._errors.palantir_exception import PalantirException + + +def format_error_message(fields: Dict[str, Any]) -> str: + return json.dumps(fields, sort_keys=True, indent=4, default=str) + + +class PalantirRPCException(PalantirException): + def __init__(self, error_metadata: Dict[str, Any]): + super().__init__(format_error_message(error_metadata)) + self.name = error_metadata.get("errorName") + self.parameters = error_metadata.get("parameters") + self.error_instance_id = error_metadata.get("errorInstanceId") + self.error_code = error_metadata.get("errorCode") + self.error_description = error_metadata.get("errorDescription") + + +class BadRequestError(PalantirRPCException): + """ + There was an issue with the request. This error is thrown if a 400 status code is returned. + """ + + +class UnauthorizedError(PalantirRPCException): + """ + The authorization header is missing or invalid. This error is thrown if a 401 status code is returned. + """ + + +class RequestEntityTooLargeError(PalantirRPCException): + """The request entity is too large. This error is thrown if a 413 status code is returned.""" + + +class PermissionDeniedError(PalantirRPCException): + """ + You are missing the necessary permissions to complete your request. This error is thrown if a + 403 status code is returned. + """ + + +class NotFoundError(PalantirRPCException): + """A Resource was not found. This error is thrown if a 404 status code is returned.""" + + +class UnprocessableEntityError(PalantirRPCException): + """ + One or more of the request's arguments are invalid. This error is thrown if a 422 status code + is returned. + """ + + +class ConflictError(PalantirRPCException): + """ + There was a conflict with another request. This error is thrown if a 409 status code is + returned. + """ + + +class InternalServerError(PalantirRPCException): + """An error occurred within the service. This error is thrown if a 5XX status code is returned.""" diff --git a/foundry_sdk/_errors/sdk_internal_error.py b/foundry_sdk/_errors/sdk_internal_error.py new file mode 100644 index 000000000..906c1d681 --- /dev/null +++ b/foundry_sdk/_errors/sdk_internal_error.py @@ -0,0 +1,72 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import functools +import sys +from typing import Any +from typing import Callable +from typing import TypeVar + +import pydantic +from httpx import __version__ as __httpx_version__ +from pydantic import __version__ as __pydantic__version__ +from pydantic_core import __version__ as __pydantic_core_version__ + +from foundry_sdk._errors.palantir_exception import PalantirException +from foundry_sdk._versions import __openapi_document_version__ +from foundry_sdk._versions import __version__ + +AnyCallableT = TypeVar("AnyCallableT", bound=Callable[..., Any]) + + +def handle_unexpected(__func: AnyCallableT) -> AnyCallableT: + @functools.wraps(__func) + def validate(*args, **kwargs): + try: + return __func(*args, **kwargs) + except ( + PalantirException, + pydantic.ValidationError, + ) as e: + # pass through these exceptions + raise e + except Exception as e: + raise SDKInternalError(str(e)) from e + + return validate # type: ignore + + +class SDKInternalError(PalantirException): + def __init__(self, msg: str) -> None: + self.msg = msg + + def __str__(self): + message = self.msg + + sys_version = sys.version.replace("\n", " ") + message += ( + "\n\nThis is an unexpected issue and should be reported. " + "When filing an issue, make sure to copy the package information " + "listed below.\n\n" + f"OS: {sys.platform}\n" + f"Python Version: {sys_version}\n" + f"SDK Version: {__version__}\n" + f"OpenAPI Document Version: {__openapi_document_version__}\n" + f"Pydantic Version: {__pydantic__version__}\n" + f"Pydantic Core Version: {__pydantic_core_version__}\n" + f"Httpx Version: {__httpx_version__}\n" + ) + + return message diff --git a/foundry_sdk/_errors/stream_error.py b/foundry_sdk/_errors/stream_error.py new file mode 100644 index 000000000..ab9effd73 --- /dev/null +++ b/foundry_sdk/_errors/stream_error.py @@ -0,0 +1,20 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +from foundry_sdk._errors.palantir_exception import PalantirException + + +class StreamConsumedError(PalantirException): + """The content of the given stream has already been consumed.""" diff --git a/foundry_sdk/_errors/timeout_error.py b/foundry_sdk/_errors/timeout_error.py new file mode 100644 index 000000000..8c9ce9be6 --- /dev/null +++ b/foundry_sdk/_errors/timeout_error.py @@ -0,0 +1,33 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +from foundry_sdk._errors.connection_error import ConnectionError +from foundry_sdk._errors.palantir_exception import PalantirException + + +class TimeoutError(PalantirException): + """The request timed out. This error will catch both ConnectTimeout, ReadTimeout and WriteTimeout.""" + + +class ConnectTimeout(ConnectionError, TimeoutError): + """The request timed out when attempting to connect to the server.""" + + +class ReadTimeout(TimeoutError): + """The server did not send any data in the allotted amount of time.""" + + +class WriteTimeout(TimeoutError): + """There was a timeout when writing data to the server.""" diff --git a/foundry_sdk/_errors/utils.py b/foundry_sdk/_errors/utils.py new file mode 100644 index 000000000..b025ca7b0 --- /dev/null +++ b/foundry_sdk/_errors/utils.py @@ -0,0 +1,64 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import warnings +from typing import Any +from typing import Dict +from typing import Optional +from typing import Type +from typing import cast +from typing import get_type_hints + +import pydantic + +from foundry_sdk._errors.palantir_rpc_exception import PalantirRPCException +from foundry_sdk._errors.sdk_internal_error import SDKInternalError + + +def deserialize_error( + error_metadata: Dict[str, Any], + exception_classes: Dict[str, type], +) -> Optional[PalantirRPCException]: + try: + name = error_metadata["errorName"] + parameters = error_metadata["parameters"] + error_instance_id = error_metadata["errorInstanceId"] + except KeyError as e: + warnings.warn(str(SDKInternalError(f"Failed to find required error attributes: {e}"))) + + return None + + exc_class = exception_classes.get(name) + if exc_class is None: + return None + + annotations = get_type_hints(exc_class) + parameters_type = cast(Type[Dict[str, Any]], annotations["parameters"]) + adapter = pydantic.TypeAdapter(parameters_type) + + try: + parameters_instance = adapter.validate_python(parameters) + return exc_class( + name=name, parameters=parameters_instance, error_instance_id=error_instance_id + ) + except pydantic.ValidationError as e: + # For whatever reason, if we can't properly deserialize the error parameters we will throw PalantirRPCException + # instead of failing + # To provide additional details to the user we will add a bunch of metadata to the warning + # using the "SDKInternalError" class but just emit a warning + warning_message = str(SDKInternalError(f'Deserialization failed for error "{name}": {e}')) + + warnings.warn(warning_message) + return None diff --git a/foundry_sdk/_versions.py b/foundry_sdk/_versions.py new file mode 100644 index 000000000..7c2768971 --- /dev/null +++ b/foundry_sdk/_versions.py @@ -0,0 +1,20 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +# The version is set during the publishing step (since we can't know the version in advance) +# using the autorelease bot +__version__ = "0.0.0" + +__openapi_document_version__ = "1.1416.1" diff --git a/foundry_sdk/py.typed b/foundry_sdk/py.typed new file mode 100644 index 000000000..e69de29bb diff --git a/foundry_sdk/v1/__init__.py b/foundry_sdk/v1/__init__.py new file mode 100644 index 000000000..5c00d5f9d --- /dev/null +++ b/foundry_sdk/v1/__init__.py @@ -0,0 +1,22 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +from foundry_sdk.v1.client import AsyncFoundryClient +from foundry_sdk.v1.client import FoundryClient + +__all__ = [ + "FoundryClient", + "AsyncFoundryClient", +] diff --git a/foundry_sdk/v1/cli.py b/foundry_sdk/v1/cli.py new file mode 100644 index 000000000..867cb2e5c --- /dev/null +++ b/foundry_sdk/v1/cli.py @@ -0,0 +1,1610 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +from __future__ import annotations + +import dataclasses +import io +import json +import os +import typing +from datetime import date as Date +from datetime import datetime + +import click + +from foundry_sdk import EnvironmentNotConfigured +from foundry_sdk import UserTokenAuth +from foundry_sdk.v1 import FoundryClient + + +@dataclasses.dataclass +class _Context: + obj: FoundryClient + + +def get_from_environ(key: str) -> str: + value = os.environ.get(key) + if value is None: + raise EnvironmentNotConfigured(f"Please set {key} using `export {key}=<{key}>`") + + return value + + +@click.group() # type: ignore +@click.pass_context # type: ignore +def cli(ctx: _Context): + """An experimental CLI for the Foundry API""" + ctx.obj = FoundryClient( + auth=UserTokenAuth(token=get_from_environ("FOUNDRY_TOKEN")), + hostname=get_from_environ("FOUNDRY_HOSTNAME"), + ) + + +@cli.group("core") +def core(): + pass + + +@cli.group("datasets") +def datasets(): + pass + + +@datasets.group("dataset") +def datasets_dataset(): + pass + + +@datasets_dataset.command("create") +@click.option("--name", type=str, required=True, help="""""") +@click.option("--parent_folder_rid", type=str, required=True, help="""""") +@click.pass_obj +def datasets_dataset_op_create( + client: FoundryClient, + name: str, + parent_folder_rid: str, +): + """ + Creates a new Dataset. A default branch - `master` for most enrollments - will be created on the Dataset. + + """ + result = client.datasets.Dataset.create( + name=name, + parent_folder_rid=parent_folder_rid, + ) + click.echo(repr(result)) + + +@datasets_dataset.command("delete_schema") +@click.argument("dataset_rid", type=str, required=True) +@click.option( + "--branch_id", + type=str, + required=False, + help="""The ID of the Branch on which to delete the schema. +""", +) +@click.option("--preview", type=bool, required=False, help="""""") +@click.option( + "--transaction_rid", + type=str, + required=False, + help="""The RID of the Transaction on which to delete the schema. +""", +) +@click.pass_obj +def datasets_dataset_op_delete_schema( + client: FoundryClient, + dataset_rid: str, + branch_id: typing.Optional[str], + preview: typing.Optional[bool], + transaction_rid: typing.Optional[str], +): + """ + Deletes the Schema from a Dataset and Branch. + + """ + result = client.datasets.Dataset.delete_schema( + dataset_rid=dataset_rid, + branch_id=branch_id, + preview=preview, + transaction_rid=transaction_rid, + ) + click.echo(repr(result)) + + +@datasets_dataset.command("get") +@click.argument("dataset_rid", type=str, required=True) +@click.pass_obj +def datasets_dataset_op_get( + client: FoundryClient, + dataset_rid: str, +): + """ + Gets the Dataset with the given DatasetRid. + + """ + result = client.datasets.Dataset.get( + dataset_rid=dataset_rid, + ) + click.echo(repr(result)) + + +@datasets_dataset.command("get_schema") +@click.argument("dataset_rid", type=str, required=True) +@click.option( + "--branch_id", + type=str, + required=False, + help="""The ID of the Branch. +""", +) +@click.option("--preview", type=bool, required=False, help="""""") +@click.option( + "--transaction_rid", + type=str, + required=False, + help="""The TransactionRid that contains the Schema. +""", +) +@click.pass_obj +def datasets_dataset_op_get_schema( + client: FoundryClient, + dataset_rid: str, + branch_id: typing.Optional[str], + preview: typing.Optional[bool], + transaction_rid: typing.Optional[str], +): + """ + Retrieves the Schema for a Dataset and Branch, if it exists. + + """ + result = client.datasets.Dataset.get_schema( + dataset_rid=dataset_rid, + branch_id=branch_id, + preview=preview, + transaction_rid=transaction_rid, + ) + click.echo(repr(result)) + + +@datasets_dataset.command("read") +@click.argument("dataset_rid", type=str, required=True) +@click.option( + "--format", + type=click.Choice(["ARROW", "CSV"]), + required=True, + help="""The export format. Must be `ARROW` or `CSV`. +""", +) +@click.option( + "--branch_id", type=str, required=False, help="""The identifier (name) of the Branch.""" +) +@click.option( + "--columns", + type=str, + required=False, + help="""A subset of the dataset columns to include in the result. Defaults to all columns. +""", +) +@click.option( + "--end_transaction_rid", + type=str, + required=False, + help="""The Resource Identifier (RID) of the end Transaction.""", +) +@click.option( + "--row_limit", + type=int, + required=False, + help="""A limit on the number of rows to return. Note that row ordering is non-deterministic. +""", +) +@click.option( + "--start_transaction_rid", + type=str, + required=False, + help="""The Resource Identifier (RID) of the start Transaction.""", +) +@click.pass_obj +def datasets_dataset_op_read( + client: FoundryClient, + dataset_rid: str, + format: typing.Literal["ARROW", "CSV"], + branch_id: typing.Optional[str], + columns: typing.Optional[str], + end_transaction_rid: typing.Optional[str], + row_limit: typing.Optional[int], + start_transaction_rid: typing.Optional[str], +): + """ + Gets the content of a dataset as a table in the specified format. + + This endpoint currently does not support views (virtual datasets composed of other datasets). For more information, refer to the [views documentation](https://palantir.com/docs/foundry/data-integration/views). + + """ + result = client.datasets.Dataset.read( + dataset_rid=dataset_rid, + format=format, + branch_id=branch_id, + columns=None if columns is None else json.loads(columns), + end_transaction_rid=end_transaction_rid, + row_limit=row_limit, + start_transaction_rid=start_transaction_rid, + ) + click.echo(result) + + +@datasets_dataset.command("replace_schema") +@click.argument("dataset_rid", type=str, required=True) +@click.argument("body", type=str, required=True) +@click.option( + "--branch_id", + type=str, + required=False, + help="""The ID of the Branch on which to put the Schema. +""", +) +@click.option("--preview", type=bool, required=False, help="""""") +@click.pass_obj +def datasets_dataset_op_replace_schema( + client: FoundryClient, + dataset_rid: str, + body: str, + branch_id: typing.Optional[str], + preview: typing.Optional[bool], +): + """ + Puts a Schema on an existing Dataset and Branch. + + """ + result = client.datasets.Dataset.replace_schema( + dataset_rid=dataset_rid, + body=json.loads(body), + branch_id=branch_id, + preview=preview, + ) + click.echo(repr(result)) + + +@datasets_dataset.group("transaction") +def datasets_dataset_transaction(): + pass + + +@datasets_dataset_transaction.command("abort") +@click.argument("dataset_rid", type=str, required=True) +@click.argument("transaction_rid", type=str, required=True) +@click.pass_obj +def datasets_dataset_transaction_op_abort( + client: FoundryClient, + dataset_rid: str, + transaction_rid: str, +): + """ + Aborts an open Transaction. File modifications made on this Transaction are not preserved and the Branch is + not updated. + + """ + result = client.datasets.Dataset.Transaction.abort( + dataset_rid=dataset_rid, + transaction_rid=transaction_rid, + ) + click.echo(repr(result)) + + +@datasets_dataset_transaction.command("commit") +@click.argument("dataset_rid", type=str, required=True) +@click.argument("transaction_rid", type=str, required=True) +@click.pass_obj +def datasets_dataset_transaction_op_commit( + client: FoundryClient, + dataset_rid: str, + transaction_rid: str, +): + """ + Commits an open Transaction. File modifications made on this Transaction are preserved and the Branch is + updated to point to the Transaction. + + """ + result = client.datasets.Dataset.Transaction.commit( + dataset_rid=dataset_rid, + transaction_rid=transaction_rid, + ) + click.echo(repr(result)) + + +@datasets_dataset_transaction.command("create") +@click.argument("dataset_rid", type=str, required=True) +@click.option( + "--branch_id", + type=str, + required=False, + help="""The identifier (name) of the Branch on which to create the Transaction. Defaults to `master` for most enrollments. +""", +) +@click.option( + "--transaction_type", + type=click.Choice(["APPEND", "UPDATE", "SNAPSHOT", "DELETE"]), + required=False, + help="""""", +) +@click.pass_obj +def datasets_dataset_transaction_op_create( + client: FoundryClient, + dataset_rid: str, + branch_id: typing.Optional[str], + transaction_type: typing.Optional[typing.Literal["APPEND", "UPDATE", "SNAPSHOT", "DELETE"]], +): + """ + Creates a Transaction on a Branch of a Dataset. + + """ + result = client.datasets.Dataset.Transaction.create( + dataset_rid=dataset_rid, + branch_id=branch_id, + transaction_type=transaction_type, + ) + click.echo(repr(result)) + + +@datasets_dataset_transaction.command("get") +@click.argument("dataset_rid", type=str, required=True) +@click.argument("transaction_rid", type=str, required=True) +@click.pass_obj +def datasets_dataset_transaction_op_get( + client: FoundryClient, + dataset_rid: str, + transaction_rid: str, +): + """ + Gets a Transaction of a Dataset. + + """ + result = client.datasets.Dataset.Transaction.get( + dataset_rid=dataset_rid, + transaction_rid=transaction_rid, + ) + click.echo(repr(result)) + + +@datasets_dataset.group("file") +def datasets_dataset_file(): + pass + + +@datasets_dataset_file.command("delete") +@click.argument("dataset_rid", type=str, required=True) +@click.argument("file_path", type=str, required=True) +@click.option( + "--branch_id", + type=str, + required=False, + help="""The identifier (name) of the Branch on which to delete the File. Defaults to `master` for most enrollments.""", +) +@click.option( + "--transaction_rid", + type=str, + required=False, + help="""The Resource Identifier (RID) of the open delete Transaction on which to delete the File.""", +) +@click.pass_obj +def datasets_dataset_file_op_delete( + client: FoundryClient, + dataset_rid: str, + file_path: str, + branch_id: typing.Optional[str], + transaction_rid: typing.Optional[str], +): + """ + Deletes a File from a Dataset. By default the file is deleted in a new transaction on the default + branch - `master` for most enrollments. The file will still be visible on historical views. + + #### Advanced Usage + + See [Datasets Core Concepts](https://palantir.com/docs/foundry/data-integration/datasets/) for details on using branches and transactions. + + To **delete a File from a specific Branch** specify the Branch's identifier as `branchId`. A new delete Transaction + will be created and committed on this branch. + + To **delete a File using a manually opened Transaction**, specify the Transaction's resource identifier + as `transactionRid`. The transaction must be of type `DELETE`. This is useful for deleting multiple files in a + single transaction. See [createTransaction](https://palantir.com/docs/foundry/api/datasets-resources/transactions/create-transaction/) to + open a transaction. + + """ + result = client.datasets.Dataset.File.delete( + dataset_rid=dataset_rid, + file_path=file_path, + branch_id=branch_id, + transaction_rid=transaction_rid, + ) + click.echo(repr(result)) + + +@datasets_dataset_file.command("get") +@click.argument("dataset_rid", type=str, required=True) +@click.argument("file_path", type=str, required=True) +@click.option( + "--branch_id", + type=str, + required=False, + help="""The identifier (name) of the Branch that contains the File. Defaults to `master` for most enrollments.""", +) +@click.option( + "--end_transaction_rid", + type=str, + required=False, + help="""The Resource Identifier (RID) of the end Transaction.""", +) +@click.option( + "--start_transaction_rid", + type=str, + required=False, + help="""The Resource Identifier (RID) of the start Transaction.""", +) +@click.pass_obj +def datasets_dataset_file_op_get( + client: FoundryClient, + dataset_rid: str, + file_path: str, + branch_id: typing.Optional[str], + end_transaction_rid: typing.Optional[str], + start_transaction_rid: typing.Optional[str], +): + """ + Gets metadata about a File contained in a Dataset. By default this retrieves the file's metadata from the latest + view of the default branch - `master` for most enrollments. + + #### Advanced Usage + + See [Datasets Core Concepts](https://palantir.com/docs/foundry/data-integration/datasets/) for details on using branches and transactions. + + To **get a file's metadata from a specific Branch** specify the Branch's identifier as `branchId`. This will + retrieve metadata for the most recent version of the file since the latest snapshot transaction, or the earliest + ancestor transaction of the branch if there are no snapshot transactions. + + To **get a file's metadata from the resolved view of a transaction** specify the Transaction's resource identifier + as `endTransactionRid`. This will retrieve metadata for the most recent version of the file since the latest snapshot + transaction, or the earliest ancestor transaction if there are no snapshot transactions. + + To **get a file's metadata from the resolved view of a range of transactions** specify the the start transaction's + resource identifier as `startTransactionRid` and the end transaction's resource identifier as `endTransactionRid`. + This will retrieve metadata for the most recent version of the file since the `startTransactionRid` up to the + `endTransactionRid`. Behavior is undefined when the start and end transactions do not belong to the same root-to-leaf path. + + To **get a file's metadata from a specific transaction** specify the Transaction's resource identifier as both the + `startTransactionRid` and `endTransactionRid`. + + """ + result = client.datasets.Dataset.File.get( + dataset_rid=dataset_rid, + file_path=file_path, + branch_id=branch_id, + end_transaction_rid=end_transaction_rid, + start_transaction_rid=start_transaction_rid, + ) + click.echo(repr(result)) + + +@datasets_dataset_file.command("list") +@click.argument("dataset_rid", type=str, required=True) +@click.option( + "--branch_id", + type=str, + required=False, + help="""The identifier (name) of the Branch on which to list Files. Defaults to `master` for most enrollments.""", +) +@click.option( + "--end_transaction_rid", + type=str, + required=False, + help="""The Resource Identifier (RID) of the end Transaction.""", +) +@click.option( + "--page_size", + type=int, + required=False, + help="""The desired size of the page to be returned. Defaults to 1,000. +See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. +""", +) +@click.option("--page_token", type=str, required=False, help="""""") +@click.option( + "--start_transaction_rid", + type=str, + required=False, + help="""The Resource Identifier (RID) of the start Transaction.""", +) +@click.pass_obj +def datasets_dataset_file_op_list( + client: FoundryClient, + dataset_rid: str, + branch_id: typing.Optional[str], + end_transaction_rid: typing.Optional[str], + page_size: typing.Optional[int], + page_token: typing.Optional[str], + start_transaction_rid: typing.Optional[str], +): + """ + Lists Files contained in a Dataset. By default files are listed on the latest view of the default + branch - `master` for most enrollments. + + This endpoint currently does not support views (virtual datasets composed of other datasets). For more information, refer to the [views documentation](https://palantir.com/docs/foundry/data-integration/views). + + #### Advanced Usage + + See [Datasets Core Concepts](https://palantir.com/docs/foundry/data-integration/datasets/) for details on using branches and transactions. + + To **list files on a specific Branch** specify the Branch's identifier as `branchId`. This will include the most + recent version of all files since the latest snapshot transaction, or the earliest ancestor transaction of the + branch if there are no snapshot transactions. + + To **list files on the resolved view of a transaction** specify the Transaction's resource identifier + as `endTransactionRid`. This will include the most recent version of all files since the latest snapshot + transaction, or the earliest ancestor transaction if there are no snapshot transactions. + + To **list files on the resolved view of a range of transactions** specify the the start transaction's resource + identifier as `startTransactionRid` and the end transaction's resource identifier as `endTransactionRid`. This + will include the most recent version of all files since the `startTransactionRid` up to the `endTransactionRid`. + Note that an intermediate snapshot transaction will remove all files from the view. Behavior is undefined when + the start and end transactions do not belong to the same root-to-leaf path. + + To **list files on a specific transaction** specify the Transaction's resource identifier as both the + `startTransactionRid` and `endTransactionRid`. This will include only files that were modified as part of that + Transaction. + + """ + result = client.datasets.Dataset.File.list( + dataset_rid=dataset_rid, + branch_id=branch_id, + end_transaction_rid=end_transaction_rid, + page_size=page_size, + page_token=page_token, + start_transaction_rid=start_transaction_rid, + ) + click.echo(repr(result)) + + +@datasets_dataset_file.command("read") +@click.argument("dataset_rid", type=str, required=True) +@click.argument("file_path", type=str, required=True) +@click.option( + "--branch_id", + type=str, + required=False, + help="""The identifier (name) of the Branch that contains the File. Defaults to `master` for most enrollments.""", +) +@click.option( + "--end_transaction_rid", + type=str, + required=False, + help="""The Resource Identifier (RID) of the end Transaction.""", +) +@click.option( + "--start_transaction_rid", + type=str, + required=False, + help="""The Resource Identifier (RID) of the start Transaction.""", +) +@click.pass_obj +def datasets_dataset_file_op_read( + client: FoundryClient, + dataset_rid: str, + file_path: str, + branch_id: typing.Optional[str], + end_transaction_rid: typing.Optional[str], + start_transaction_rid: typing.Optional[str], +): + """ + Gets the content of a File contained in a Dataset. By default this retrieves the file's content from the latest + view of the default branch - `master` for most enrollments. + + This endpoint currently does not support views (virtual datasets composed of other datasets). For more information, refer to the [views documentation](https://palantir.com/docs/foundry/data-integration/views). + + #### Advanced Usage + + See [Datasets Core Concepts](https://palantir.com/docs/foundry/data-integration/datasets/) for details on using branches and transactions. + + To **get a file's content from a specific Branch** specify the Branch's identifier as `branchId`. This will + retrieve the content for the most recent version of the file since the latest snapshot transaction, or the + earliest ancestor transaction of the branch if there are no snapshot transactions. + + To **get a file's content from the resolved view of a transaction** specify the Transaction's resource identifier + as `endTransactionRid`. This will retrieve the content for the most recent version of the file since the latest + snapshot transaction, or the earliest ancestor transaction if there are no snapshot transactions. + + To **get a file's content from the resolved view of a range of transactions** specify the the start transaction's + resource identifier as `startTransactionRid` and the end transaction's resource identifier as `endTransactionRid`. + This will retrieve the content for the most recent version of the file since the `startTransactionRid` up to the + `endTransactionRid`. Note that an intermediate snapshot transaction will remove all files from the view. Behavior + is undefined when the start and end transactions do not belong to the same root-to-leaf path. + + To **get a file's content from a specific transaction** specify the Transaction's resource identifier as both the + `startTransactionRid` and `endTransactionRid`. + + """ + result = client.datasets.Dataset.File.read( + dataset_rid=dataset_rid, + file_path=file_path, + branch_id=branch_id, + end_transaction_rid=end_transaction_rid, + start_transaction_rid=start_transaction_rid, + ) + click.echo(result) + + +@datasets_dataset_file.command("upload") +@click.argument("dataset_rid", type=str, required=True) +@click.argument("body", type=click.File("rb"), required=True) +@click.option( + "--file_path", type=str, required=True, help="""The File's path within the Dataset.""" +) +@click.option( + "--branch_id", + type=str, + required=False, + help="""The identifier (name) of the Branch on which to upload the File. Defaults to `master` for most enrollments.""", +) +@click.option( + "--transaction_rid", + type=str, + required=False, + help="""The Resource Identifier (RID) of the open Transaction on which to upload the File.""", +) +@click.option( + "--transaction_type", + type=click.Choice(["APPEND", "UPDATE", "SNAPSHOT", "DELETE"]), + required=False, + help="""The type of the Transaction to create when using branchId. Defaults to `UPDATE`.""", +) +@click.pass_obj +def datasets_dataset_file_op_upload( + client: FoundryClient, + dataset_rid: str, + body: io.BufferedReader, + file_path: str, + branch_id: typing.Optional[str], + transaction_rid: typing.Optional[str], + transaction_type: typing.Optional[typing.Literal["APPEND", "UPDATE", "SNAPSHOT", "DELETE"]], +): + """ + Uploads a File to an existing Dataset. + The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`. + + By default the file is uploaded to a new transaction on the default branch - `master` for most enrollments. + If the file already exists only the most recent version will be visible in the updated view. + + #### Advanced Usage + + See [Datasets Core Concepts](https://palantir.com/docs/foundry/data-integration/datasets/) for details on using branches and transactions. + + To **upload a file to a specific Branch** specify the Branch's identifier as `branchId`. A new transaction will + be created and committed on this branch. By default the TransactionType will be `UPDATE`, to override this + default specify `transactionType` in addition to `branchId`. + See [createBranch](https://palantir.com/docs/foundry/api/datasets-resources/branches/create-branch/) to create a custom branch. + + To **upload a file on a manually opened transaction** specify the Transaction's resource identifier as + `transactionRid`. This is useful for uploading multiple files in a single transaction. + See [createTransaction](https://palantir.com/docs/foundry/api/datasets-resources/transactions/create-transaction/) to open a transaction. + + """ + result = client.datasets.Dataset.File.upload( + dataset_rid=dataset_rid, + body=body.read(), + file_path=file_path, + branch_id=branch_id, + transaction_rid=transaction_rid, + transaction_type=transaction_type, + ) + click.echo(repr(result)) + + +@datasets_dataset.group("branch") +def datasets_dataset_branch(): + pass + + +@datasets_dataset_branch.command("create") +@click.argument("dataset_rid", type=str, required=True) +@click.option("--branch_id", type=str, required=True, help="""""") +@click.option("--transaction_rid", type=str, required=False, help="""""") +@click.pass_obj +def datasets_dataset_branch_op_create( + client: FoundryClient, + dataset_rid: str, + branch_id: str, + transaction_rid: typing.Optional[str], +): + """ + Creates a branch on an existing dataset. A branch may optionally point to a (committed) transaction. + + """ + result = client.datasets.Dataset.Branch.create( + dataset_rid=dataset_rid, + branch_id=branch_id, + transaction_rid=transaction_rid, + ) + click.echo(repr(result)) + + +@datasets_dataset_branch.command("delete") +@click.argument("dataset_rid", type=str, required=True) +@click.argument("branch_id", type=str, required=True) +@click.pass_obj +def datasets_dataset_branch_op_delete( + client: FoundryClient, + dataset_rid: str, + branch_id: str, +): + """ + Deletes the Branch with the given BranchId. + + """ + result = client.datasets.Dataset.Branch.delete( + dataset_rid=dataset_rid, + branch_id=branch_id, + ) + click.echo(repr(result)) + + +@datasets_dataset_branch.command("get") +@click.argument("dataset_rid", type=str, required=True) +@click.argument("branch_id", type=str, required=True) +@click.pass_obj +def datasets_dataset_branch_op_get( + client: FoundryClient, + dataset_rid: str, + branch_id: str, +): + """ + Get a Branch of a Dataset. + + """ + result = client.datasets.Dataset.Branch.get( + dataset_rid=dataset_rid, + branch_id=branch_id, + ) + click.echo(repr(result)) + + +@datasets_dataset_branch.command("list") +@click.argument("dataset_rid", type=str, required=True) +@click.option( + "--page_size", + type=int, + required=False, + help="""The desired size of the page to be returned. Defaults to 1,000. +See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. +""", +) +@click.option("--page_token", type=str, required=False, help="""""") +@click.pass_obj +def datasets_dataset_branch_op_list( + client: FoundryClient, + dataset_rid: str, + page_size: typing.Optional[int], + page_token: typing.Optional[str], +): + """ + Lists the Branches of a Dataset. + + """ + result = client.datasets.Dataset.Branch.list( + dataset_rid=dataset_rid, + page_size=page_size, + page_token=page_token, + ) + click.echo(repr(result)) + + +@cli.group("geo") +def geo(): + pass + + +@cli.group("ontologies") +def ontologies(): + pass + + +@ontologies.group("query") +def ontologies_query(): + pass + + +@ontologies_query.command("execute") +@click.argument("ontology_rid", type=str, required=True) +@click.argument("query_api_name", type=str, required=True) +@click.option("--parameters", type=str, required=True, help="""""") +@click.option( + "--attribution", + type=str, + required=False, + help="""The Attribution to be used when executing this request. +""", +) +@click.option( + "--trace_parent", + type=str, + required=False, + help="""The W3C trace parent header included in the request. +""", +) +@click.option( + "--trace_state", + type=str, + required=False, + help="""The W3C trace state header included in the request. +""", +) +@click.pass_obj +def ontologies_query_op_execute( + client: FoundryClient, + ontology_rid: str, + query_api_name: str, + parameters: str, + attribution: typing.Optional[str], + trace_parent: typing.Optional[str], + trace_state: typing.Optional[str], +): + """ + Executes a Query using the given parameters. Optional parameters do not need to be supplied. + + """ + result = client.ontologies.Query.execute( + ontology_rid=ontology_rid, + query_api_name=query_api_name, + parameters=json.loads(parameters), + attribution=attribution, + trace_parent=trace_parent, + trace_state=trace_state, + ) + click.echo(repr(result)) + + +@ontologies.group("ontology_object") +def ontologies_ontology_object(): + pass + + +@ontologies_ontology_object.command("aggregate") +@click.argument("ontology_rid", type=str, required=True) +@click.argument("object_type", type=str, required=True) +@click.option("--aggregation", type=str, required=True, help="""""") +@click.option("--group_by", type=str, required=True, help="""""") +@click.option("--query", type=str, required=False, help="""""") +@click.pass_obj +def ontologies_ontology_object_op_aggregate( + client: FoundryClient, + ontology_rid: str, + object_type: str, + aggregation: str, + group_by: str, + query: typing.Optional[str], +): + """ + Perform functions on object fields in the specified ontology and object type. + + """ + result = client.ontologies.OntologyObject.aggregate( + ontology_rid=ontology_rid, + object_type=object_type, + aggregation=json.loads(aggregation), + group_by=json.loads(group_by), + query=None if query is None else json.loads(query), + ) + click.echo(repr(result)) + + +@ontologies_ontology_object.command("get") +@click.argument("ontology_rid", type=str, required=True) +@click.argument("object_type", type=str, required=True) +@click.argument("primary_key", type=str, required=True) +@click.option( + "--properties", + type=str, + required=False, + help="""The properties of the object type that should be included in the response. Omit this parameter to get all +the properties. +""", +) +@click.pass_obj +def ontologies_ontology_object_op_get( + client: FoundryClient, + ontology_rid: str, + object_type: str, + primary_key: str, + properties: typing.Optional[str], +): + """ + Gets a specific object with the given primary key. + + """ + result = client.ontologies.OntologyObject.get( + ontology_rid=ontology_rid, + object_type=object_type, + primary_key=primary_key, + properties=None if properties is None else json.loads(properties), + ) + click.echo(repr(result)) + + +@ontologies_ontology_object.command("get_linked_object") +@click.argument("ontology_rid", type=str, required=True) +@click.argument("object_type", type=str, required=True) +@click.argument("primary_key", type=str, required=True) +@click.argument("link_type", type=str, required=True) +@click.argument("linked_object_primary_key", type=str, required=True) +@click.option( + "--properties", + type=str, + required=False, + help="""The properties of the object type that should be included in the response. Omit this parameter to get all +the properties. +""", +) +@click.pass_obj +def ontologies_ontology_object_op_get_linked_object( + client: FoundryClient, + ontology_rid: str, + object_type: str, + primary_key: str, + link_type: str, + linked_object_primary_key: str, + properties: typing.Optional[str], +): + """ + Get a specific linked object that originates from another object. If there is no link between the two objects, + LinkedObjectNotFound is thrown. + + """ + result = client.ontologies.OntologyObject.get_linked_object( + ontology_rid=ontology_rid, + object_type=object_type, + primary_key=primary_key, + link_type=link_type, + linked_object_primary_key=linked_object_primary_key, + properties=None if properties is None else json.loads(properties), + ) + click.echo(repr(result)) + + +@ontologies_ontology_object.command("list") +@click.argument("ontology_rid", type=str, required=True) +@click.argument("object_type", type=str, required=True) +@click.option("--order_by", type=str, required=False, help="""""") +@click.option( + "--page_size", + type=int, + required=False, + help="""The desired size of the page to be returned. Defaults to 1,000. +See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. +""", +) +@click.option("--page_token", type=str, required=False, help="""""") +@click.option( + "--properties", + type=str, + required=False, + help="""The properties of the object type that should be included in the response. Omit this parameter to get all +the properties. +""", +) +@click.pass_obj +def ontologies_ontology_object_op_list( + client: FoundryClient, + ontology_rid: str, + object_type: str, + order_by: typing.Optional[str], + page_size: typing.Optional[int], + page_token: typing.Optional[str], + properties: typing.Optional[str], +): + """ + Lists the objects for the given Ontology and object type. + + This endpoint supports filtering objects. + See the [Filtering Objects documentation](https://palantir.com/docs/foundry/api/ontology-resources/objects/ontology-object-basics#filter-objects) for details. + + Note that this endpoint does not guarantee consistency. Changes to the data could result in missing or + repeated objects in the response pages. + + For Object Storage V1 backed objects, this endpoint returns a maximum of 10,000 objects. After 10,000 objects have been returned and if more objects + are available, attempting to load another page will result in an `ObjectsExceededLimit` error being returned. There is no limit on Object Storage V2 backed objects. + + Each page may be smaller or larger than the requested page size. However, it + is guaranteed that if there are more results available, at least one result will be present + in the response. + + Note that null value properties will not be returned. + + """ + result = client.ontologies.OntologyObject.list( + ontology_rid=ontology_rid, + object_type=object_type, + order_by=order_by, + page_size=page_size, + page_token=page_token, + properties=None if properties is None else json.loads(properties), + ) + click.echo(repr(result)) + + +@ontologies_ontology_object.command("list_linked_objects") +@click.argument("ontology_rid", type=str, required=True) +@click.argument("object_type", type=str, required=True) +@click.argument("primary_key", type=str, required=True) +@click.argument("link_type", type=str, required=True) +@click.option("--order_by", type=str, required=False, help="""""") +@click.option( + "--page_size", + type=int, + required=False, + help="""The desired size of the page to be returned. Defaults to 1,000. +See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. +""", +) +@click.option("--page_token", type=str, required=False, help="""""") +@click.option( + "--properties", + type=str, + required=False, + help="""The properties of the object type that should be included in the response. Omit this parameter to get all +the properties. +""", +) +@click.pass_obj +def ontologies_ontology_object_op_list_linked_objects( + client: FoundryClient, + ontology_rid: str, + object_type: str, + primary_key: str, + link_type: str, + order_by: typing.Optional[str], + page_size: typing.Optional[int], + page_token: typing.Optional[str], + properties: typing.Optional[str], +): + """ + Lists the linked objects for a specific object and the given link type. + + This endpoint supports filtering objects. + See the [Filtering Objects documentation](https://palantir.com/docs/foundry/api/ontology-resources/objects/ontology-object-basics#filter-objects) for details. + + Note that this endpoint does not guarantee consistency. Changes to the data could result in missing or + repeated objects in the response pages. + + For Object Storage V1 backed objects, this endpoint returns a maximum of 10,000 objects. After 10,000 objects have been returned and if more objects + are available, attempting to load another page will result in an `ObjectsExceededLimit` error being returned. There is no limit on Object Storage V2 backed objects. + + Each page may be smaller or larger than the requested page size. However, it + is guaranteed that if there are more results available, at least one result will be present + in the response. + + Note that null value properties will not be returned. + + """ + result = client.ontologies.OntologyObject.list_linked_objects( + ontology_rid=ontology_rid, + object_type=object_type, + primary_key=primary_key, + link_type=link_type, + order_by=order_by, + page_size=page_size, + page_token=page_token, + properties=None if properties is None else json.loads(properties), + ) + click.echo(repr(result)) + + +@ontologies_ontology_object.command("search") +@click.argument("ontology_rid", type=str, required=True) +@click.argument("object_type", type=str, required=True) +@click.option( + "--fields", + type=str, + required=True, + help="""The API names of the object type properties to include in the response. +""", +) +@click.option("--query", type=str, required=True, help="""""") +@click.option("--order_by", type=str, required=False, help="""""") +@click.option("--page_size", type=int, required=False, help="""""") +@click.option("--page_token", type=str, required=False, help="""""") +@click.pass_obj +def ontologies_ontology_object_op_search( + client: FoundryClient, + ontology_rid: str, + object_type: str, + fields: str, + query: str, + order_by: typing.Optional[str], + page_size: typing.Optional[int], + page_token: typing.Optional[str], +): + """ + Search for objects in the specified ontology and object type. The request body is used + to filter objects based on the specified query. The supported queries are: + + | Query type | Description | Supported Types | + |----------|-----------------------------------------------------------------------------------|---------------------------------| + | lt | The provided property is less than the provided value. | number, string, date, timestamp | + | gt | The provided property is greater than the provided value. | number, string, date, timestamp | + | lte | The provided property is less than or equal to the provided value. | number, string, date, timestamp | + | gte | The provided property is greater than or equal to the provided value. | number, string, date, timestamp | + | eq | The provided property is exactly equal to the provided value. | number, string, date, timestamp | + | isNull | The provided property is (or is not) null. | all | + | contains | The provided property contains the provided value. | array | + | not | The sub-query does not match. | N/A (applied on a query) | + | and | All the sub-queries match. | N/A (applied on queries) | + | or | At least one of the sub-queries match. | N/A (applied on queries) | + | prefix | The provided property starts with the provided term. | string | + | phrase | The provided property contains the provided term as a substring. | string | + | anyTerm | The provided property contains at least one of the terms separated by whitespace. | string | + | allTerms | The provided property contains all the terms separated by whitespace. | string | + + Queries can be at most three levels deep. By default, terms are separated by whitespace or punctuation (`?!,:;-[](){}'"~`). Periods (`.`) on their own are ignored. + Partial terms are not matched by terms filters except where explicitly noted. + + """ + result = client.ontologies.OntologyObject.search( + ontology_rid=ontology_rid, + object_type=object_type, + fields=json.loads(fields), + query=json.loads(query), + order_by=None if order_by is None else json.loads(order_by), + page_size=page_size, + page_token=page_token, + ) + click.echo(repr(result)) + + +@ontologies.group("ontology") +def ontologies_ontology(): + pass + + +@ontologies_ontology.command("get") +@click.argument("ontology_rid", type=str, required=True) +@click.pass_obj +def ontologies_ontology_op_get( + client: FoundryClient, + ontology_rid: str, +): + """ + Gets a specific ontology with the given Ontology RID. + + """ + result = client.ontologies.Ontology.get( + ontology_rid=ontology_rid, + ) + click.echo(repr(result)) + + +@ontologies_ontology.command("list") +@click.pass_obj +def ontologies_ontology_op_list( + client: FoundryClient, +): + """ + Lists the Ontologies visible to the current user. + + """ + result = client.ontologies.Ontology.list() + click.echo(repr(result)) + + +@ontologies_ontology.group("query_type") +def ontologies_ontology_query_type(): + pass + + +@ontologies_ontology_query_type.command("get") +@click.argument("ontology_rid", type=str, required=True) +@click.argument("query_api_name", type=str, required=True) +@click.pass_obj +def ontologies_ontology_query_type_op_get( + client: FoundryClient, + ontology_rid: str, + query_api_name: str, +): + """ + Gets a specific query type with the given API name. + + """ + result = client.ontologies.Ontology.QueryType.get( + ontology_rid=ontology_rid, + query_api_name=query_api_name, + ) + click.echo(repr(result)) + + +@ontologies_ontology_query_type.command("list") +@click.argument("ontology_rid", type=str, required=True) +@click.option( + "--page_size", + type=int, + required=False, + help="""The desired size of the page to be returned. Defaults to 100. +See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. +""", +) +@click.option("--page_token", type=str, required=False, help="""""") +@click.pass_obj +def ontologies_ontology_query_type_op_list( + client: FoundryClient, + ontology_rid: str, + page_size: typing.Optional[int], + page_token: typing.Optional[str], +): + """ + Lists the query types for the given Ontology. + + Each page may be smaller than the requested page size. However, it is guaranteed that if there are more + results available, at least one result will be present in the response. + + """ + result = client.ontologies.Ontology.QueryType.list( + ontology_rid=ontology_rid, + page_size=page_size, + page_token=page_token, + ) + click.echo(repr(result)) + + +@ontologies_ontology.group("object_type") +def ontologies_ontology_object_type(): + pass + + +@ontologies_ontology_object_type.command("get") +@click.argument("ontology_rid", type=str, required=True) +@click.argument("object_type", type=str, required=True) +@click.pass_obj +def ontologies_ontology_object_type_op_get( + client: FoundryClient, + ontology_rid: str, + object_type: str, +): + """ + Gets a specific object type with the given API name. + + """ + result = client.ontologies.Ontology.ObjectType.get( + ontology_rid=ontology_rid, + object_type=object_type, + ) + click.echo(repr(result)) + + +@ontologies_ontology_object_type.command("get_outgoing_link_type") +@click.argument("ontology_rid", type=str, required=True) +@click.argument("object_type", type=str, required=True) +@click.argument("link_type", type=str, required=True) +@click.pass_obj +def ontologies_ontology_object_type_op_get_outgoing_link_type( + client: FoundryClient, + ontology_rid: str, + object_type: str, + link_type: str, +): + """ + Get an outgoing link for an object type. + + """ + result = client.ontologies.Ontology.ObjectType.get_outgoing_link_type( + ontology_rid=ontology_rid, + object_type=object_type, + link_type=link_type, + ) + click.echo(repr(result)) + + +@ontologies_ontology_object_type.command("list") +@click.argument("ontology_rid", type=str, required=True) +@click.option( + "--page_size", + type=int, + required=False, + help="""The desired size of the page to be returned. Defaults to 500. +See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. +""", +) +@click.option("--page_token", type=str, required=False, help="""""") +@click.pass_obj +def ontologies_ontology_object_type_op_list( + client: FoundryClient, + ontology_rid: str, + page_size: typing.Optional[int], + page_token: typing.Optional[str], +): + """ + Lists the object types for the given Ontology. + + Each page may be smaller or larger than the requested page size. However, it is guaranteed that if there are + more results available, at least one result will be present in the + response. + + """ + result = client.ontologies.Ontology.ObjectType.list( + ontology_rid=ontology_rid, + page_size=page_size, + page_token=page_token, + ) + click.echo(repr(result)) + + +@ontologies_ontology_object_type.command("list_outgoing_link_types") +@click.argument("ontology_rid", type=str, required=True) +@click.argument("object_type", type=str, required=True) +@click.option( + "--page_size", type=int, required=False, help="""The desired size of the page to be returned.""" +) +@click.option("--page_token", type=str, required=False, help="""""") +@click.pass_obj +def ontologies_ontology_object_type_op_list_outgoing_link_types( + client: FoundryClient, + ontology_rid: str, + object_type: str, + page_size: typing.Optional[int], + page_token: typing.Optional[str], +): + """ + List the outgoing links for an object type. + + """ + result = client.ontologies.Ontology.ObjectType.list_outgoing_link_types( + ontology_rid=ontology_rid, + object_type=object_type, + page_size=page_size, + page_token=page_token, + ) + click.echo(repr(result)) + + +@ontologies_ontology.group("action_type") +def ontologies_ontology_action_type(): + pass + + +@ontologies_ontology_action_type.command("get") +@click.argument("ontology_rid", type=str, required=True) +@click.argument("action_type_api_name", type=str, required=True) +@click.pass_obj +def ontologies_ontology_action_type_op_get( + client: FoundryClient, + ontology_rid: str, + action_type_api_name: str, +): + """ + Gets a specific action type with the given API name. + + """ + result = client.ontologies.Ontology.ActionType.get( + ontology_rid=ontology_rid, + action_type_api_name=action_type_api_name, + ) + click.echo(repr(result)) + + +@ontologies_ontology_action_type.command("list") +@click.argument("ontology_rid", type=str, required=True) +@click.option( + "--page_size", + type=int, + required=False, + help="""The desired size of the page to be returned. Defaults to 500. +See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. +""", +) +@click.option("--page_token", type=str, required=False, help="""""") +@click.pass_obj +def ontologies_ontology_action_type_op_list( + client: FoundryClient, + ontology_rid: str, + page_size: typing.Optional[int], + page_token: typing.Optional[str], +): + """ + Lists the action types for the given Ontology. + + Each page may be smaller than the requested page size. However, it is guaranteed that if there are more + results available, at least one result will be present in the response. + + """ + result = client.ontologies.Ontology.ActionType.list( + ontology_rid=ontology_rid, + page_size=page_size, + page_token=page_token, + ) + click.echo(repr(result)) + + +@ontologies.group("attachment") +def ontologies_attachment(): + pass + + +@ontologies_attachment.command("get") +@click.argument("attachment_rid", type=str, required=True) +@click.pass_obj +def ontologies_attachment_op_get( + client: FoundryClient, + attachment_rid: str, +): + """ + Get the metadata of an attachment. + + """ + result = client.ontologies.Attachment.get( + attachment_rid=attachment_rid, + ) + click.echo(repr(result)) + + +@ontologies_attachment.command("read") +@click.argument("attachment_rid", type=str, required=True) +@click.pass_obj +def ontologies_attachment_op_read( + client: FoundryClient, + attachment_rid: str, +): + """ + Get the content of an attachment. + + """ + result = client.ontologies.Attachment.read( + attachment_rid=attachment_rid, + ) + click.echo(result) + + +@ontologies_attachment.command("upload") +@click.argument("body", type=click.File("rb"), required=True) +@click.option( + "--content_length", + type=int, + required=True, + help="""The size in bytes of the file content being uploaded.""", +) +@click.option( + "--content_type", type=str, required=True, help="""The media type of the file being uploaded.""" +) +@click.option( + "--filename", type=str, required=True, help="""The name of the file being uploaded.""" +) +@click.pass_obj +def ontologies_attachment_op_upload( + client: FoundryClient, + body: io.BufferedReader, + content_length: int, + content_type: str, + filename: str, +): + """ + Upload an attachment to use in an action. Any attachment which has not been linked to an object via + an action within one hour after upload will be removed. + Previously mapped attachments which are not connected to any object anymore are also removed on + a biweekly basis. + The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`. + + """ + result = client.ontologies.Attachment.upload( + body=body.read(), + content_length=content_length, + content_type=content_type, + filename=filename, + ) + click.echo(repr(result)) + + +@ontologies.group("action") +def ontologies_action(): + pass + + +@ontologies_action.command("apply") +@click.argument("ontology_rid", type=str, required=True) +@click.argument("action_type", type=str, required=True) +@click.option("--parameters", type=str, required=True, help="""""") +@click.pass_obj +def ontologies_action_op_apply( + client: FoundryClient, + ontology_rid: str, + action_type: str, + parameters: str, +): + """ + Applies an action using the given parameters. + + Changes to objects or links stored in Object Storage V1 are eventually consistent and may take some time to be visible. + Edits to objects or links in Object Storage V2 will be visible immediately after the action completes. + + Note that [parameter default values](https://palantir.com/docs/foundry/action-types/parameters-default-value/) are not currently supported by + this endpoint. + + """ + result = client.ontologies.Action.apply( + ontology_rid=ontology_rid, + action_type=action_type, + parameters=json.loads(parameters), + ) + click.echo(repr(result)) + + +@ontologies_action.command("apply_batch") +@click.argument("ontology_rid", type=str, required=True) +@click.argument("action_type", type=str, required=True) +@click.option("--requests", type=str, required=True, help="""""") +@click.pass_obj +def ontologies_action_op_apply_batch( + client: FoundryClient, + ontology_rid: str, + action_type: str, + requests: str, +): + """ + Applies multiple actions (of the same Action Type) using the given parameters. + Changes to objects or links stored in Object Storage V1 are eventually consistent and may take some time to be visible. + Edits to objects or links in Object Storage V2 will be visible immediately after the action completes. + + Up to 20 actions may be applied in one call. Actions that only modify objects in Object Storage v2 and do not + call Functions may receive a higher limit. + + Note that [parameter default values](https://palantir.com/docs/foundry/action-types/parameters-default-value/) and + [notifications](https://palantir.com/docs/foundry/action-types/notifications/) are not currently supported by this endpoint. + + """ + result = client.ontologies.Action.apply_batch( + ontology_rid=ontology_rid, + action_type=action_type, + requests=json.loads(requests), + ) + click.echo(repr(result)) + + +@ontologies_action.command("validate") +@click.argument("ontology_rid", type=str, required=True) +@click.argument("action_type", type=str, required=True) +@click.option("--parameters", type=str, required=True, help="""""") +@click.pass_obj +def ontologies_action_op_validate( + client: FoundryClient, + ontology_rid: str, + action_type: str, + parameters: str, +): + """ + Validates if an action can be run with the given set of parameters. + The response contains the evaluation of parameters and **submission criteria** + that determine if the request is `VALID` or `INVALID`. + For performance reasons, validations will not consider existing objects or other data in Foundry. + For example, the uniqueness of a primary key or the existence of a user ID will not be checked. + Note that [parameter default values](https://palantir.com/docs/foundry/action-types/parameters-default-value/) are not currently supported by + this endpoint. Unspecified parameters will be given a default value of `null`. + + """ + result = client.ontologies.Action.validate( + ontology_rid=ontology_rid, + action_type=action_type, + parameters=json.loads(parameters), + ) + click.echo(repr(result)) + + +if __name__ == "__main__": + cli() diff --git a/foundry_sdk/v1/client.py b/foundry_sdk/v1/client.py new file mode 100644 index 000000000..19b046cfb --- /dev/null +++ b/foundry_sdk/v1/client.py @@ -0,0 +1,84 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing + +from foundry_sdk import _core as core +from foundry_sdk._core.client_init_helpers import ( + get_hostname_from_context_or_environment_vars, +) # NOQA +from foundry_sdk._core.client_init_helpers import ( + get_user_token_auth_from_context_or_environment_vars, +) # NOQA + + +class FoundryClient: + """ + The Foundry V1 API client. + + :param auth: Required. Your auth configuration. + :param hostname: Required. Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: typing.Optional[core.Auth] = None, + hostname: typing.Optional[str] = None, + config: typing.Optional[core.Config] = None, + ): + if auth is None: + auth = get_user_token_auth_from_context_or_environment_vars() + if hostname is None: + hostname = get_hostname_from_context_or_environment_vars() + + from foundry_sdk.v1.datasets._client import DatasetsClient + from foundry_sdk.v1.ontologies._client import OntologiesClient + + self.datasets = DatasetsClient(auth=auth, hostname=hostname, config=config) + self.ontologies = OntologiesClient(auth=auth, hostname=hostname, config=config) + + +class AsyncFoundryClient: + """ + The Async Foundry V1 API client. + + :param auth: Required. Your auth configuration. + :param hostname: Required. Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: typing.Optional[core.Auth] = None, + hostname: typing.Optional[str] = None, + config: typing.Optional[core.Config] = None, + preview: bool = False, + ): + if not preview: + raise ValueError( + "The AsyncFoundryClient client is in beta. " + "Please set the preview parameter to True to use it." + ) + if auth is None: + auth = get_user_token_auth_from_context_or_environment_vars() + if hostname is None: + hostname = get_hostname_from_context_or_environment_vars() + + from foundry_sdk.v1.datasets._client import AsyncDatasetsClient + from foundry_sdk.v1.ontologies._client import AsyncOntologiesClient + + self.datasets = AsyncDatasetsClient(auth=auth, hostname=hostname, config=config) + self.ontologies = AsyncOntologiesClient(auth=auth, hostname=hostname, config=config) diff --git a/foundry_sdk/v1/core/errors.py b/foundry_sdk/v1/core/errors.py new file mode 100644 index 000000000..9d69112e9 --- /dev/null +++ b/foundry_sdk/v1/core/errors.py @@ -0,0 +1,204 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing +from dataclasses import dataclass + +import typing_extensions + +from foundry_sdk import _errors as errors +from foundry_sdk.v1.core import models as core_models + + +class ApiFeaturePreviewUsageOnlyParameters(typing_extensions.TypedDict): + """ + This feature is only supported in preview mode. Please use `preview=true` in the query + parameters to call this endpoint. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class ApiFeaturePreviewUsageOnly(errors.BadRequestError): + name: typing.Literal["ApiFeaturePreviewUsageOnly"] + parameters: ApiFeaturePreviewUsageOnlyParameters + error_instance_id: str + + +class ApiUsageDeniedParameters(typing_extensions.TypedDict): + """You are not allowed to use Palantir APIs.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + missingScope: typing_extensions.NotRequired[core_models.OperationScope] + + +@dataclass +class ApiUsageDenied(errors.PermissionDeniedError): + name: typing.Literal["ApiUsageDenied"] + parameters: ApiUsageDeniedParameters + error_instance_id: str + + +class FolderNotFoundParameters(typing_extensions.TypedDict): + """The requested folder could not be found, or the client token does not have access to it.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + folderRid: core_models.FolderRid + + +@dataclass +class FolderNotFound(errors.NotFoundError): + name: typing.Literal["FolderNotFound"] + parameters: FolderNotFoundParameters + error_instance_id: str + + +class FoundryBranchNotFoundParameters(typing_extensions.TypedDict): + """The requested foundry branch could not be found, or the client token does not have access to it.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + branch: core_models.FoundryBranch + + +@dataclass +class FoundryBranchNotFound(errors.NotFoundError): + name: typing.Literal["FoundryBranchNotFound"] + parameters: FoundryBranchNotFoundParameters + error_instance_id: str + + +class InvalidFilePathParameters(typing_extensions.TypedDict): + """The provided file path is not valid.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + filePath: core_models.FilePath + + +@dataclass +class InvalidFilePath(errors.BadRequestError): + name: typing.Literal["InvalidFilePath"] + parameters: InvalidFilePathParameters + error_instance_id: str + + +class InvalidPageSizeParameters(typing_extensions.TypedDict): + """The provided page size was zero or negative. Page sizes must be greater than zero.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + pageSize: core_models.PageSize + + +@dataclass +class InvalidPageSize(errors.BadRequestError): + name: typing.Literal["InvalidPageSize"] + parameters: InvalidPageSizeParameters + error_instance_id: str + + +class InvalidPageTokenParameters(typing_extensions.TypedDict): + """The provided page token could not be used to retrieve the next page of results.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + pageToken: core_models.PageToken + + +@dataclass +class InvalidPageToken(errors.BadRequestError): + name: typing.Literal["InvalidPageToken"] + parameters: InvalidPageTokenParameters + error_instance_id: str + + +class InvalidParameterCombinationParameters(typing_extensions.TypedDict): + """The given parameters are individually valid but cannot be used in the given combination.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + validCombinations: typing.List[typing.List[str]] + providedParameters: typing.List[str] + + +@dataclass +class InvalidParameterCombination(errors.BadRequestError): + name: typing.Literal["InvalidParameterCombination"] + parameters: InvalidParameterCombinationParameters + error_instance_id: str + + +class MissingPostBodyParameters(typing_extensions.TypedDict): + """A post body is required for this endpoint, but was not found in the request.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class MissingPostBody(errors.BadRequestError): + name: typing.Literal["MissingPostBody"] + parameters: MissingPostBodyParameters + error_instance_id: str + + +class ResourceNameAlreadyExistsParameters(typing_extensions.TypedDict): + """The provided resource name is already in use by another resource in the same folder.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + parentFolderRid: core_models.FolderRid + resourceName: str + + +@dataclass +class ResourceNameAlreadyExists(errors.ConflictError): + name: typing.Literal["ResourceNameAlreadyExists"] + parameters: ResourceNameAlreadyExistsParameters + error_instance_id: str + + +class UnknownDistanceUnitParameters(typing_extensions.TypedDict): + """An unknown distance unit was provided.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + unknownUnit: str + knownUnits: typing.List[core_models.DistanceUnit] + + +@dataclass +class UnknownDistanceUnit(errors.BadRequestError): + name: typing.Literal["UnknownDistanceUnit"] + parameters: UnknownDistanceUnitParameters + error_instance_id: str + + +__all__ = [ + "ApiFeaturePreviewUsageOnly", + "ApiUsageDenied", + "FolderNotFound", + "FoundryBranchNotFound", + "InvalidFilePath", + "InvalidPageSize", + "InvalidPageToken", + "InvalidParameterCombination", + "MissingPostBody", + "ResourceNameAlreadyExists", + "UnknownDistanceUnit", +] diff --git a/foundry_sdk/v1/core/models.py b/foundry_sdk/v1/core/models.py new file mode 100644 index 000000000..8931ecd22 --- /dev/null +++ b/foundry_sdk/v1/core/models.py @@ -0,0 +1,279 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +from __future__ import annotations + +import typing + +import pydantic + +from foundry_sdk import _core as core + + +class AnyType(core.ModelBase): + """AnyType""" + + type: typing.Literal["any"] = "any" + + +class AttachmentType(core.ModelBase): + """AttachmentType""" + + type: typing.Literal["attachment"] = "attachment" + + +Attribution = str +"""Attribution for a request""" + + +class BinaryType(core.ModelBase): + """BinaryType""" + + type: typing.Literal["binary"] = "binary" + + +class BooleanType(core.ModelBase): + """BooleanType""" + + type: typing.Literal["boolean"] = "boolean" + + +class ByteType(core.ModelBase): + """ByteType""" + + type: typing.Literal["byte"] = "byte" + + +class CipherTextType(core.ModelBase): + """CipherTextType""" + + default_cipher_channel: typing.Optional[str] = pydantic.Field(alias=str("defaultCipherChannel"), default=None) # type: ignore[literal-required] + """An optional Cipher Channel RID which can be used for encryption updates to empty values.""" + + type: typing.Literal["cipherText"] = "cipherText" + + +ContentLength = core.Long +"""ContentLength""" + + +ContentType = str +"""ContentType""" + + +class DateType(core.ModelBase): + """DateType""" + + type: typing.Literal["date"] = "date" + + +class DecimalType(core.ModelBase): + """DecimalType""" + + precision: typing.Optional[int] = None + """The total number of digits of the Decimal type. The maximum value is 38.""" + + scale: typing.Optional[int] = None + """The number of digits to the right of the decimal point. The maximum value is 38.""" + + type: typing.Literal["decimal"] = "decimal" + + +DisplayName = str +"""The display name of the entity.""" + + +DistanceUnit = typing.Literal[ + "MILLIMETERS", + "CENTIMETERS", + "METERS", + "KILOMETERS", + "INCHES", + "FEET", + "YARDS", + "MILES", + "NAUTICAL_MILES", +] +"""DistanceUnit""" + + +class DoubleType(core.ModelBase): + """DoubleType""" + + type: typing.Literal["double"] = "double" + + +FilePath = str +"""The path to a File within Foundry. Examples: `my-file.txt`, `path/to/my-file.jpg`, `dataframe.snappy.parquet`.""" + + +Filename = str +"""The name of a File within Foundry. Examples: `my-file.txt`, `my-file.jpg`, `dataframe.snappy.parquet`.""" + + +class FloatType(core.ModelBase): + """FloatType""" + + type: typing.Literal["float"] = "float" + + +FolderRid = core.RID +"""FolderRid""" + + +FoundryBranch = str +"""The Foundry branch identifier, specifically its rid. Different identifier types may be used in the future as values.""" + + +class IntegerType(core.ModelBase): + """IntegerType""" + + type: typing.Literal["integer"] = "integer" + + +class LongType(core.ModelBase): + """LongType""" + + type: typing.Literal["long"] = "long" + + +class MarkingType(core.ModelBase): + """MarkingType""" + + type: typing.Literal["marking"] = "marking" + + +MediaType = str +""" +The [media type](https://www.iana.org/assignments/media-types/media-types.xhtml) of the file or attachment. +Examples: `application/json`, `application/pdf`, `application/octet-stream`, `image/jpeg` +""" + + +class NullType(core.ModelBase): + """NullType""" + + type: typing.Literal["null"] = "null" + + +OperationScope = str +"""OperationScope""" + + +PageSize = int +"""The page size to use for the endpoint.""" + + +PageToken = str +""" +The page token indicates where to start paging. This should be omitted from the first page's request. +To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response +and use it to populate the `pageToken` field of the next request. +""" + + +PreviewMode = bool +"""Enables the use of preview functionality.""" + + +ReleaseStatus = typing.Literal["ACTIVE", "ENDORSED", "EXPERIMENTAL", "DEPRECATED"] +"""The release status of the entity.""" + + +class ShortType(core.ModelBase): + """ShortType""" + + type: typing.Literal["short"] = "short" + + +SizeBytes = core.Long +"""The size of the file or attachment in bytes.""" + + +class StringType(core.ModelBase): + """StringType""" + + type: typing.Literal["string"] = "string" + + +StructFieldName = str +"""The name of a field in a `Struct`.""" + + +class TimestampType(core.ModelBase): + """TimestampType""" + + type: typing.Literal["timestamp"] = "timestamp" + + +TotalCount = core.Long +"""The total number of items across all pages.""" + + +TraceParent = str +"""The W3C Trace Context `traceparent` header value used to propagate distributed tracing information for Foundry telemetry. See https://www.w3.org/TR/trace-context/#traceparent-header for more details. Note the 16 byte trace ID encoded in the header must be derived from a time based uuid to be used within Foundry.""" + + +TraceState = str +"""The W3C Trace Context `tracestate` header value, which is used to propagate vendor specific distributed tracing information for Foundry telemetry. See https://www.w3.org/TR/trace-context/#tracestate-header for more details.""" + + +class UnsupportedType(core.ModelBase): + """UnsupportedType""" + + unsupported_type: str = pydantic.Field(alias=str("unsupportedType")) # type: ignore[literal-required] + type: typing.Literal["unsupported"] = "unsupported" + + +__all__ = [ + "AnyType", + "AttachmentType", + "Attribution", + "BinaryType", + "BooleanType", + "ByteType", + "CipherTextType", + "ContentLength", + "ContentType", + "DateType", + "DecimalType", + "DisplayName", + "DistanceUnit", + "DoubleType", + "FilePath", + "Filename", + "FloatType", + "FolderRid", + "FoundryBranch", + "IntegerType", + "LongType", + "MarkingType", + "MediaType", + "NullType", + "OperationScope", + "PageSize", + "PageToken", + "PreviewMode", + "ReleaseStatus", + "ShortType", + "SizeBytes", + "StringType", + "StructFieldName", + "TimestampType", + "TotalCount", + "TraceParent", + "TraceState", + "UnsupportedType", +] diff --git a/foundry_sdk/v1/datasets/__init__.py b/foundry_sdk/v1/datasets/__init__.py new file mode 100644 index 000000000..f1688463c --- /dev/null +++ b/foundry_sdk/v1/datasets/__init__.py @@ -0,0 +1,22 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +from foundry_sdk.v1.datasets._client import AsyncDatasetsClient +from foundry_sdk.v1.datasets._client import DatasetsClient + +__all__ = [ + "DatasetsClient", + "AsyncDatasetsClient", +] diff --git a/foundry_sdk/v1/datasets/_client.py b/foundry_sdk/v1/datasets/_client.py new file mode 100644 index 000000000..a17b284d5 --- /dev/null +++ b/foundry_sdk/v1/datasets/_client.py @@ -0,0 +1,69 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing +from functools import cached_property + +from foundry_sdk import _core as core + + +class DatasetsClient: + """ + The API client for the Datasets Namespace. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + + @cached_property + def Dataset(self): + from foundry_sdk.v1.datasets.dataset import DatasetClient + + return DatasetClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + +class AsyncDatasetsClient: + """ + The Async API client for the Datasets Namespace. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + from foundry_sdk.v1.datasets.dataset import AsyncDatasetClient + + self.Dataset = AsyncDatasetClient(auth=auth, hostname=hostname, config=config) diff --git a/foundry_sdk/v1/datasets/branch.py b/foundry_sdk/v1/datasets/branch.py new file mode 100644 index 000000000..3199247e8 --- /dev/null +++ b/foundry_sdk/v1/datasets/branch.py @@ -0,0 +1,559 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v1.core import models as core_models +from foundry_sdk.v1.datasets import errors as datasets_errors +from foundry_sdk.v1.datasets import models as datasets_models + + +class BranchClient: + """ + The API client for the Branch Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _BranchClientStreaming(self) + self.with_raw_response = _BranchClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def create( + self, + dataset_rid: datasets_models.DatasetRid, + *, + branch_id: datasets_models.BranchId, + transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> datasets_models.Branch: + """ + Creates a branch on an existing dataset. A branch may optionally point to a (committed) transaction. + + :param dataset_rid: The Resource Identifier (RID) of the Dataset on which to create the Branch. + :type dataset_rid: DatasetRid + :param branch_id: + :type branch_id: BranchId + :param transaction_rid: + :type transaction_rid: Optional[TransactionRid] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: datasets_models.Branch + + :raises BranchAlreadyExists: The branch cannot be created because a branch with that name already exists. + :raises CreateBranchPermissionDenied: The provided token does not have permission to create a branch of this dataset. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises InvalidBranchId: The requested branch name cannot be used. Branch names cannot be empty and must not look like RIDs or UUIDs. + :raises TransactionNotCommitted: The given transaction has not been committed. + :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v1/datasets/{datasetRid}/branches", + query_params={}, + path_params={ + "datasetRid": dataset_rid, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=datasets_models.CreateBranchRequest( + branch_id=branch_id, + transaction_rid=transaction_rid, + ), + response_type=datasets_models.Branch, + request_timeout=request_timeout, + throwable_errors={ + "BranchAlreadyExists": datasets_errors.BranchAlreadyExists, + "CreateBranchPermissionDenied": datasets_errors.CreateBranchPermissionDenied, + "DatasetNotFound": datasets_errors.DatasetNotFound, + "InvalidBranchId": datasets_errors.InvalidBranchId, + "TransactionNotCommitted": datasets_errors.TransactionNotCommitted, + "TransactionNotFound": datasets_errors.TransactionNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def delete( + self, + dataset_rid: datasets_models.DatasetRid, + branch_id: datasets_models.BranchId, + *, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> None: + """ + Deletes the Branch with the given BranchId. + + :param dataset_rid: The Resource Identifier (RID) of the Dataset that contains the Branch. + :type dataset_rid: DatasetRid + :param branch_id: The identifier (name) of the Branch. + :type branch_id: BranchId + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: None + + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises DeleteBranchPermissionDenied: The provided token does not have permission to delete the given branch from this dataset. + :raises InvalidBranchId: The requested branch name cannot be used. Branch names cannot be empty and must not look like RIDs or UUIDs. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="DELETE", + resource_path="/v1/datasets/{datasetRid}/branches/{branchId}", + query_params={}, + path_params={ + "datasetRid": dataset_rid, + "branchId": branch_id, + }, + header_params={}, + body=None, + response_type=None, + request_timeout=request_timeout, + throwable_errors={ + "BranchNotFound": datasets_errors.BranchNotFound, + "DatasetNotFound": datasets_errors.DatasetNotFound, + "DeleteBranchPermissionDenied": datasets_errors.DeleteBranchPermissionDenied, + "InvalidBranchId": datasets_errors.InvalidBranchId, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + dataset_rid: datasets_models.DatasetRid, + branch_id: datasets_models.BranchId, + *, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> datasets_models.Branch: + """ + Get a Branch of a Dataset. + + :param dataset_rid: The Resource Identifier (RID) of the Dataset that contains the Branch. + :type dataset_rid: DatasetRid + :param branch_id: The identifier (name) of the Branch. + :type branch_id: BranchId + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: datasets_models.Branch + + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v1/datasets/{datasetRid}/branches/{branchId}", + query_params={}, + path_params={ + "datasetRid": dataset_rid, + "branchId": branch_id, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=datasets_models.Branch, + request_timeout=request_timeout, + throwable_errors={ + "BranchNotFound": datasets_errors.BranchNotFound, + "DatasetNotFound": datasets_errors.DatasetNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def list( + self, + dataset_rid: datasets_models.DatasetRid, + *, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.ResourceIterator[datasets_models.Branch]: + """ + Lists the Branches of a Dataset. + + :param dataset_rid: The Resource Identifier (RID) of the Dataset on which to list Branches. + :type dataset_rid: DatasetRid + :param page_size: The desired size of the page to be returned. Defaults to 1,000. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. + :type page_size: Optional[PageSize] + :param page_token: + :type page_token: Optional[PageToken] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.ResourceIterator[datasets_models.Branch] + + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v1/datasets/{datasetRid}/branches", + query_params={ + "pageSize": page_size, + "pageToken": page_token, + }, + path_params={ + "datasetRid": dataset_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=datasets_models.ListBranchesResponse, + request_timeout=request_timeout, + throwable_errors={ + "DatasetNotFound": datasets_errors.DatasetNotFound, + }, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + +class _BranchClientRaw: + def __init__(self, client: BranchClient) -> None: + def create(_: datasets_models.Branch): ... + def delete(_: None): ... + def get(_: datasets_models.Branch): ... + def list(_: datasets_models.ListBranchesResponse): ... + + self.create = core.with_raw_response(create, client.create) + self.delete = core.with_raw_response(delete, client.delete) + self.get = core.with_raw_response(get, client.get) + self.list = core.with_raw_response(list, client.list) + + +class _BranchClientStreaming: + def __init__(self, client: BranchClient) -> None: + def create(_: datasets_models.Branch): ... + def get(_: datasets_models.Branch): ... + def list(_: datasets_models.ListBranchesResponse): ... + + self.create = core.with_streaming_response(create, client.create) + self.get = core.with_streaming_response(get, client.get) + self.list = core.with_streaming_response(list, client.list) + + +class AsyncBranchClient: + """ + The API client for the Branch Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncBranchClientStreaming(self) + self.with_raw_response = _AsyncBranchClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def create( + self, + dataset_rid: datasets_models.DatasetRid, + *, + branch_id: datasets_models.BranchId, + transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[datasets_models.Branch]: + """ + Creates a branch on an existing dataset. A branch may optionally point to a (committed) transaction. + + :param dataset_rid: The Resource Identifier (RID) of the Dataset on which to create the Branch. + :type dataset_rid: DatasetRid + :param branch_id: + :type branch_id: BranchId + :param transaction_rid: + :type transaction_rid: Optional[TransactionRid] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[datasets_models.Branch] + + :raises BranchAlreadyExists: The branch cannot be created because a branch with that name already exists. + :raises CreateBranchPermissionDenied: The provided token does not have permission to create a branch of this dataset. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises InvalidBranchId: The requested branch name cannot be used. Branch names cannot be empty and must not look like RIDs or UUIDs. + :raises TransactionNotCommitted: The given transaction has not been committed. + :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v1/datasets/{datasetRid}/branches", + query_params={}, + path_params={ + "datasetRid": dataset_rid, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=datasets_models.CreateBranchRequest( + branch_id=branch_id, + transaction_rid=transaction_rid, + ), + response_type=datasets_models.Branch, + request_timeout=request_timeout, + throwable_errors={ + "BranchAlreadyExists": datasets_errors.BranchAlreadyExists, + "CreateBranchPermissionDenied": datasets_errors.CreateBranchPermissionDenied, + "DatasetNotFound": datasets_errors.DatasetNotFound, + "InvalidBranchId": datasets_errors.InvalidBranchId, + "TransactionNotCommitted": datasets_errors.TransactionNotCommitted, + "TransactionNotFound": datasets_errors.TransactionNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def delete( + self, + dataset_rid: datasets_models.DatasetRid, + branch_id: datasets_models.BranchId, + *, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[None]: + """ + Deletes the Branch with the given BranchId. + + :param dataset_rid: The Resource Identifier (RID) of the Dataset that contains the Branch. + :type dataset_rid: DatasetRid + :param branch_id: The identifier (name) of the Branch. + :type branch_id: BranchId + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[None] + + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises DeleteBranchPermissionDenied: The provided token does not have permission to delete the given branch from this dataset. + :raises InvalidBranchId: The requested branch name cannot be used. Branch names cannot be empty and must not look like RIDs or UUIDs. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="DELETE", + resource_path="/v1/datasets/{datasetRid}/branches/{branchId}", + query_params={}, + path_params={ + "datasetRid": dataset_rid, + "branchId": branch_id, + }, + header_params={}, + body=None, + response_type=None, + request_timeout=request_timeout, + throwable_errors={ + "BranchNotFound": datasets_errors.BranchNotFound, + "DatasetNotFound": datasets_errors.DatasetNotFound, + "DeleteBranchPermissionDenied": datasets_errors.DeleteBranchPermissionDenied, + "InvalidBranchId": datasets_errors.InvalidBranchId, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + dataset_rid: datasets_models.DatasetRid, + branch_id: datasets_models.BranchId, + *, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[datasets_models.Branch]: + """ + Get a Branch of a Dataset. + + :param dataset_rid: The Resource Identifier (RID) of the Dataset that contains the Branch. + :type dataset_rid: DatasetRid + :param branch_id: The identifier (name) of the Branch. + :type branch_id: BranchId + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[datasets_models.Branch] + + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v1/datasets/{datasetRid}/branches/{branchId}", + query_params={}, + path_params={ + "datasetRid": dataset_rid, + "branchId": branch_id, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=datasets_models.Branch, + request_timeout=request_timeout, + throwable_errors={ + "BranchNotFound": datasets_errors.BranchNotFound, + "DatasetNotFound": datasets_errors.DatasetNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def list( + self, + dataset_rid: datasets_models.DatasetRid, + *, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.AsyncResourceIterator[datasets_models.Branch]: + """ + Lists the Branches of a Dataset. + + :param dataset_rid: The Resource Identifier (RID) of the Dataset on which to list Branches. + :type dataset_rid: DatasetRid + :param page_size: The desired size of the page to be returned. Defaults to 1,000. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. + :type page_size: Optional[PageSize] + :param page_token: + :type page_token: Optional[PageToken] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.AsyncResourceIterator[datasets_models.Branch] + + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v1/datasets/{datasetRid}/branches", + query_params={ + "pageSize": page_size, + "pageToken": page_token, + }, + path_params={ + "datasetRid": dataset_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=datasets_models.ListBranchesResponse, + request_timeout=request_timeout, + throwable_errors={ + "DatasetNotFound": datasets_errors.DatasetNotFound, + }, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + +class _AsyncBranchClientRaw: + def __init__(self, client: AsyncBranchClient) -> None: + def create(_: datasets_models.Branch): ... + def delete(_: None): ... + def get(_: datasets_models.Branch): ... + def list(_: datasets_models.ListBranchesResponse): ... + + self.create = core.async_with_raw_response(create, client.create) + self.delete = core.async_with_raw_response(delete, client.delete) + self.get = core.async_with_raw_response(get, client.get) + self.list = core.async_with_raw_response(list, client.list) + + +class _AsyncBranchClientStreaming: + def __init__(self, client: AsyncBranchClient) -> None: + def create(_: datasets_models.Branch): ... + def get(_: datasets_models.Branch): ... + def list(_: datasets_models.ListBranchesResponse): ... + + self.create = core.async_with_streaming_response(create, client.create) + self.get = core.async_with_streaming_response(get, client.get) + self.list = core.async_with_streaming_response(list, client.list) diff --git a/foundry_sdk/v1/datasets/dataset.py b/foundry_sdk/v1/datasets/dataset.py new file mode 100644 index 000000000..025487a4a --- /dev/null +++ b/foundry_sdk/v1/datasets/dataset.py @@ -0,0 +1,983 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing +from functools import cached_property + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v1.core import errors as core_errors +from foundry_sdk.v1.core import models as core_models +from foundry_sdk.v1.datasets import errors as datasets_errors +from foundry_sdk.v1.datasets import models as datasets_models + + +class DatasetClient: + """ + The API client for the Dataset Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _DatasetClientStreaming(self) + self.with_raw_response = _DatasetClientRaw(self) + + @cached_property + def Branch(self): + from foundry_sdk.v1.datasets.branch import BranchClient + + return BranchClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @cached_property + def File(self): + from foundry_sdk.v1.datasets.file import FileClient + + return FileClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @cached_property + def Transaction(self): + from foundry_sdk.v1.datasets.transaction import TransactionClient + + return TransactionClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def create( + self, + *, + name: datasets_models.DatasetName, + parent_folder_rid: core_models.FolderRid, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> datasets_models.Dataset: + """ + Creates a new Dataset. A default branch - `master` for most enrollments - will be created on the Dataset. + + :param name: + :type name: DatasetName + :param parent_folder_rid: + :type parent_folder_rid: FolderRid + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: datasets_models.Dataset + + :raises BranchAlreadyExists: The branch cannot be created because a branch with that name already exists. + :raises CreateBranchPermissionDenied: The provided token does not have permission to create a branch of this dataset. + :raises CreateDatasetPermissionDenied: The provided token does not have permission to create a dataset in this folder. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises FolderNotFound: The requested folder could not be found, or the client token does not have access to it. + :raises InvalidBranchId: The requested branch name cannot be used. Branch names cannot be empty and must not look like RIDs or UUIDs. + :raises ResourceNameAlreadyExists: The provided resource name is already in use by another resource in the same folder. + :raises TransactionNotCommitted: The given transaction has not been committed. + :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v1/datasets", + query_params={}, + path_params={}, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=datasets_models.CreateDatasetRequest( + name=name, + parent_folder_rid=parent_folder_rid, + ), + response_type=datasets_models.Dataset, + request_timeout=request_timeout, + throwable_errors={ + "BranchAlreadyExists": datasets_errors.BranchAlreadyExists, + "CreateBranchPermissionDenied": datasets_errors.CreateBranchPermissionDenied, + "CreateDatasetPermissionDenied": datasets_errors.CreateDatasetPermissionDenied, + "DatasetNotFound": datasets_errors.DatasetNotFound, + "FolderNotFound": core_errors.FolderNotFound, + "InvalidBranchId": datasets_errors.InvalidBranchId, + "ResourceNameAlreadyExists": core_errors.ResourceNameAlreadyExists, + "TransactionNotCommitted": datasets_errors.TransactionNotCommitted, + "TransactionNotFound": datasets_errors.TransactionNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def delete_schema( + self, + dataset_rid: datasets_models.DatasetRid, + *, + branch_id: typing.Optional[datasets_models.BranchId] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> None: + """ + Deletes the Schema from a Dataset and Branch. + + :param dataset_rid: The RID of the Dataset on which to delete the schema. + :type dataset_rid: DatasetRid + :param branch_id: The ID of the Branch on which to delete the schema. + :type branch_id: Optional[BranchId] + :param preview: + :type preview: Optional[PreviewMode] + :param transaction_rid: The RID of the Transaction on which to delete the schema. + :type transaction_rid: Optional[TransactionRid] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: None + + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises DeleteSchemaPermissionDenied: todo + :raises InvalidBranchId: The requested branch name cannot be used. Branch names cannot be empty and must not look like RIDs or UUIDs. + :raises SchemaNotFound: A schema could not be found for the given dataset and branch, or the client token does not have access to it. + :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="DELETE", + resource_path="/v1/datasets/{datasetRid}/schema", + query_params={ + "branchId": branch_id, + "preview": preview, + "transactionRid": transaction_rid, + }, + path_params={ + "datasetRid": dataset_rid, + }, + header_params={}, + body=None, + response_type=None, + request_timeout=request_timeout, + throwable_errors={ + "BranchNotFound": datasets_errors.BranchNotFound, + "DatasetNotFound": datasets_errors.DatasetNotFound, + "DeleteSchemaPermissionDenied": datasets_errors.DeleteSchemaPermissionDenied, + "InvalidBranchId": datasets_errors.InvalidBranchId, + "SchemaNotFound": datasets_errors.SchemaNotFound, + "TransactionNotFound": datasets_errors.TransactionNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + dataset_rid: datasets_models.DatasetRid, + *, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> datasets_models.Dataset: + """ + Gets the Dataset with the given DatasetRid. + + :param dataset_rid: + :type dataset_rid: DatasetRid + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: datasets_models.Dataset + + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v1/datasets/{datasetRid}", + query_params={}, + path_params={ + "datasetRid": dataset_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=datasets_models.Dataset, + request_timeout=request_timeout, + throwable_errors={ + "DatasetNotFound": datasets_errors.DatasetNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get_schema( + self, + dataset_rid: datasets_models.DatasetRid, + *, + branch_id: typing.Optional[datasets_models.BranchId] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Optional[typing.Any]: + """ + Retrieves the Schema for a Dataset and Branch, if it exists. + + :param dataset_rid: The RID of the Dataset. + :type dataset_rid: DatasetRid + :param branch_id: The ID of the Branch. + :type branch_id: Optional[BranchId] + :param preview: + :type preview: Optional[PreviewMode] + :param transaction_rid: The TransactionRid that contains the Schema. + :type transaction_rid: Optional[TransactionRid] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Optional[typing.Any] + + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises InvalidBranchId: The requested branch name cannot be used. Branch names cannot be empty and must not look like RIDs or UUIDs. + :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v1/datasets/{datasetRid}/schema", + query_params={ + "branchId": branch_id, + "preview": preview, + "transactionRid": transaction_rid, + }, + path_params={ + "datasetRid": dataset_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=typing.Optional[typing.Any], + request_timeout=request_timeout, + throwable_errors={ + "BranchNotFound": datasets_errors.BranchNotFound, + "DatasetNotFound": datasets_errors.DatasetNotFound, + "InvalidBranchId": datasets_errors.InvalidBranchId, + "TransactionNotFound": datasets_errors.TransactionNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def read( + self, + dataset_rid: datasets_models.DatasetRid, + *, + format: datasets_models.TableExportFormat, + branch_id: typing.Optional[datasets_models.BranchId] = None, + columns: typing.Optional[typing.List[str]] = None, + end_transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, + row_limit: typing.Optional[int] = None, + start_transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> bytes: + """ + Gets the content of a dataset as a table in the specified format. + + This endpoint currently does not support views (virtual datasets composed of other datasets). For more information, refer to the [views documentation](https://palantir.com/docs/foundry/data-integration/views). + + :param dataset_rid: The RID of the Dataset. + :type dataset_rid: DatasetRid + :param format: The export format. Must be `ARROW` or `CSV`. + :type format: TableExportFormat + :param branch_id: The identifier (name) of the Branch. + :type branch_id: Optional[BranchId] + :param columns: A subset of the dataset columns to include in the result. Defaults to all columns. + :type columns: Optional[List[str]] + :param end_transaction_rid: The Resource Identifier (RID) of the end Transaction. + :type end_transaction_rid: Optional[TransactionRid] + :param row_limit: A limit on the number of rows to return. Note that row ordering is non-deterministic. + :type row_limit: Optional[int] + :param start_transaction_rid: The Resource Identifier (RID) of the start Transaction. + :type start_transaction_rid: Optional[TransactionRid] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: bytes + + :raises ColumnTypesNotSupported: The dataset contains column types that are not supported. + :raises DatasetReadNotSupported: The dataset does not support being read. + :raises InvalidParameterCombination: The given parameters are individually valid but cannot be used in the given combination. + :raises ReadTablePermissionDenied: The provided token does not have permission to read the given dataset as a table. + :raises SchemaNotFound: A schema could not be found for the given dataset and branch, or the client token does not have access to it. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v1/datasets/{datasetRid}/readTable", + query_params={ + "format": format, + "branchId": branch_id, + "columns": columns, + "endTransactionRid": end_transaction_rid, + "rowLimit": row_limit, + "startTransactionRid": start_transaction_rid, + }, + path_params={ + "datasetRid": dataset_rid, + }, + header_params={ + "Accept": "*/*", + }, + body=None, + response_type=bytes, + request_timeout=request_timeout, + throwable_errors={ + "ColumnTypesNotSupported": datasets_errors.ColumnTypesNotSupported, + "DatasetReadNotSupported": datasets_errors.DatasetReadNotSupported, + "InvalidParameterCombination": core_errors.InvalidParameterCombination, + "ReadTablePermissionDenied": datasets_errors.ReadTablePermissionDenied, + "SchemaNotFound": datasets_errors.SchemaNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def replace_schema( + self, + dataset_rid: datasets_models.DatasetRid, + body: typing.Any, + *, + branch_id: typing.Optional[datasets_models.BranchId] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> None: + """ + Puts a Schema on an existing Dataset and Branch. + + :param dataset_rid: The RID of the Dataset on which to put the Schema. + :type dataset_rid: DatasetRid + :param body: Body of the request + :type body: Any + :param branch_id: The ID of the Branch on which to put the Schema. + :type branch_id: Optional[BranchId] + :param preview: + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: None + + :raises AbortTransactionPermissionDenied: The provided token does not have permission to abort the given transaction on the given dataset. + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises CommitTransactionPermissionDenied: The provided token does not have permission to commit the given transaction on the given dataset. + :raises CreateTransactionPermissionDenied: The provided token does not have permission to create a transaction on this dataset. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises FileNotFoundOnTransactionRange: The requested file could not be found on the given transaction range, or the client token does not have access to it. + :raises InvalidBranchId: The requested branch name cannot be used. Branch names cannot be empty and must not look like RIDs or UUIDs. + :raises InvalidTransactionType: The given transaction type is not valid. Valid transaction types are `SNAPSHOT`, `UPDATE`, `APPEND`, and `DELETE`. + :raises OpenTransactionAlreadyExists: A transaction is already open on this dataset and branch. A branch of a dataset can only have one open transaction at a time. + :raises PutSchemaPermissionDenied: todo + :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. + :raises TransactionNotOpen: The given transaction is not open. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="PUT", + resource_path="/v1/datasets/{datasetRid}/schema", + query_params={ + "branchId": branch_id, + "preview": preview, + }, + path_params={ + "datasetRid": dataset_rid, + }, + header_params={ + "Content-Type": "application/json", + }, + body=body, + response_type=None, + request_timeout=request_timeout, + throwable_errors={ + "AbortTransactionPermissionDenied": datasets_errors.AbortTransactionPermissionDenied, + "BranchNotFound": datasets_errors.BranchNotFound, + "CommitTransactionPermissionDenied": datasets_errors.CommitTransactionPermissionDenied, + "CreateTransactionPermissionDenied": datasets_errors.CreateTransactionPermissionDenied, + "DatasetNotFound": datasets_errors.DatasetNotFound, + "FileNotFoundOnTransactionRange": datasets_errors.FileNotFoundOnTransactionRange, + "InvalidBranchId": datasets_errors.InvalidBranchId, + "InvalidTransactionType": datasets_errors.InvalidTransactionType, + "OpenTransactionAlreadyExists": datasets_errors.OpenTransactionAlreadyExists, + "PutSchemaPermissionDenied": datasets_errors.PutSchemaPermissionDenied, + "TransactionNotFound": datasets_errors.TransactionNotFound, + "TransactionNotOpen": datasets_errors.TransactionNotOpen, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _DatasetClientRaw: + def __init__(self, client: DatasetClient) -> None: + def create(_: datasets_models.Dataset): ... + def delete_schema(_: None): ... + def get(_: datasets_models.Dataset): ... + def get_schema(_: typing.Optional[typing.Any]): ... + def read(_: bytes): ... + def replace_schema(_: None): ... + + self.create = core.with_raw_response(create, client.create) + self.delete_schema = core.with_raw_response(delete_schema, client.delete_schema) + self.get = core.with_raw_response(get, client.get) + self.get_schema = core.with_raw_response(get_schema, client.get_schema) + self.read = core.with_raw_response(read, client.read) + self.replace_schema = core.with_raw_response(replace_schema, client.replace_schema) + + +class _DatasetClientStreaming: + def __init__(self, client: DatasetClient) -> None: + def create(_: datasets_models.Dataset): ... + def get(_: datasets_models.Dataset): ... + def get_schema(_: typing.Optional[typing.Any]): ... + def read(_: bytes): ... + + self.create = core.with_streaming_response(create, client.create) + self.get = core.with_streaming_response(get, client.get) + self.get_schema = core.with_streaming_response(get_schema, client.get_schema) + self.read = core.with_streaming_response(read, client.read) + + +class AsyncDatasetClient: + """ + The API client for the Dataset Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncDatasetClientStreaming(self) + self.with_raw_response = _AsyncDatasetClientRaw(self) + + @cached_property + def Branch(self): + from foundry_sdk.v1.datasets.branch import AsyncBranchClient + + return AsyncBranchClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @cached_property + def File(self): + from foundry_sdk.v1.datasets.file import AsyncFileClient + + return AsyncFileClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @cached_property + def Transaction(self): + from foundry_sdk.v1.datasets.transaction import AsyncTransactionClient + + return AsyncTransactionClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def create( + self, + *, + name: datasets_models.DatasetName, + parent_folder_rid: core_models.FolderRid, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[datasets_models.Dataset]: + """ + Creates a new Dataset. A default branch - `master` for most enrollments - will be created on the Dataset. + + :param name: + :type name: DatasetName + :param parent_folder_rid: + :type parent_folder_rid: FolderRid + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[datasets_models.Dataset] + + :raises BranchAlreadyExists: The branch cannot be created because a branch with that name already exists. + :raises CreateBranchPermissionDenied: The provided token does not have permission to create a branch of this dataset. + :raises CreateDatasetPermissionDenied: The provided token does not have permission to create a dataset in this folder. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises FolderNotFound: The requested folder could not be found, or the client token does not have access to it. + :raises InvalidBranchId: The requested branch name cannot be used. Branch names cannot be empty and must not look like RIDs or UUIDs. + :raises ResourceNameAlreadyExists: The provided resource name is already in use by another resource in the same folder. + :raises TransactionNotCommitted: The given transaction has not been committed. + :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v1/datasets", + query_params={}, + path_params={}, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=datasets_models.CreateDatasetRequest( + name=name, + parent_folder_rid=parent_folder_rid, + ), + response_type=datasets_models.Dataset, + request_timeout=request_timeout, + throwable_errors={ + "BranchAlreadyExists": datasets_errors.BranchAlreadyExists, + "CreateBranchPermissionDenied": datasets_errors.CreateBranchPermissionDenied, + "CreateDatasetPermissionDenied": datasets_errors.CreateDatasetPermissionDenied, + "DatasetNotFound": datasets_errors.DatasetNotFound, + "FolderNotFound": core_errors.FolderNotFound, + "InvalidBranchId": datasets_errors.InvalidBranchId, + "ResourceNameAlreadyExists": core_errors.ResourceNameAlreadyExists, + "TransactionNotCommitted": datasets_errors.TransactionNotCommitted, + "TransactionNotFound": datasets_errors.TransactionNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def delete_schema( + self, + dataset_rid: datasets_models.DatasetRid, + *, + branch_id: typing.Optional[datasets_models.BranchId] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[None]: + """ + Deletes the Schema from a Dataset and Branch. + + :param dataset_rid: The RID of the Dataset on which to delete the schema. + :type dataset_rid: DatasetRid + :param branch_id: The ID of the Branch on which to delete the schema. + :type branch_id: Optional[BranchId] + :param preview: + :type preview: Optional[PreviewMode] + :param transaction_rid: The RID of the Transaction on which to delete the schema. + :type transaction_rid: Optional[TransactionRid] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[None] + + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises DeleteSchemaPermissionDenied: todo + :raises InvalidBranchId: The requested branch name cannot be used. Branch names cannot be empty and must not look like RIDs or UUIDs. + :raises SchemaNotFound: A schema could not be found for the given dataset and branch, or the client token does not have access to it. + :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="DELETE", + resource_path="/v1/datasets/{datasetRid}/schema", + query_params={ + "branchId": branch_id, + "preview": preview, + "transactionRid": transaction_rid, + }, + path_params={ + "datasetRid": dataset_rid, + }, + header_params={}, + body=None, + response_type=None, + request_timeout=request_timeout, + throwable_errors={ + "BranchNotFound": datasets_errors.BranchNotFound, + "DatasetNotFound": datasets_errors.DatasetNotFound, + "DeleteSchemaPermissionDenied": datasets_errors.DeleteSchemaPermissionDenied, + "InvalidBranchId": datasets_errors.InvalidBranchId, + "SchemaNotFound": datasets_errors.SchemaNotFound, + "TransactionNotFound": datasets_errors.TransactionNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + dataset_rid: datasets_models.DatasetRid, + *, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[datasets_models.Dataset]: + """ + Gets the Dataset with the given DatasetRid. + + :param dataset_rid: + :type dataset_rid: DatasetRid + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[datasets_models.Dataset] + + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v1/datasets/{datasetRid}", + query_params={}, + path_params={ + "datasetRid": dataset_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=datasets_models.Dataset, + request_timeout=request_timeout, + throwable_errors={ + "DatasetNotFound": datasets_errors.DatasetNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get_schema( + self, + dataset_rid: datasets_models.DatasetRid, + *, + branch_id: typing.Optional[datasets_models.BranchId] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[typing.Optional[typing.Any]]: + """ + Retrieves the Schema for a Dataset and Branch, if it exists. + + :param dataset_rid: The RID of the Dataset. + :type dataset_rid: DatasetRid + :param branch_id: The ID of the Branch. + :type branch_id: Optional[BranchId] + :param preview: + :type preview: Optional[PreviewMode] + :param transaction_rid: The TransactionRid that contains the Schema. + :type transaction_rid: Optional[TransactionRid] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[typing.Optional[typing.Any]] + + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises InvalidBranchId: The requested branch name cannot be used. Branch names cannot be empty and must not look like RIDs or UUIDs. + :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v1/datasets/{datasetRid}/schema", + query_params={ + "branchId": branch_id, + "preview": preview, + "transactionRid": transaction_rid, + }, + path_params={ + "datasetRid": dataset_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=typing.Optional[typing.Any], + request_timeout=request_timeout, + throwable_errors={ + "BranchNotFound": datasets_errors.BranchNotFound, + "DatasetNotFound": datasets_errors.DatasetNotFound, + "InvalidBranchId": datasets_errors.InvalidBranchId, + "TransactionNotFound": datasets_errors.TransactionNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def read( + self, + dataset_rid: datasets_models.DatasetRid, + *, + format: datasets_models.TableExportFormat, + branch_id: typing.Optional[datasets_models.BranchId] = None, + columns: typing.Optional[typing.List[str]] = None, + end_transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, + row_limit: typing.Optional[int] = None, + start_transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[bytes]: + """ + Gets the content of a dataset as a table in the specified format. + + This endpoint currently does not support views (virtual datasets composed of other datasets). For more information, refer to the [views documentation](https://palantir.com/docs/foundry/data-integration/views). + + :param dataset_rid: The RID of the Dataset. + :type dataset_rid: DatasetRid + :param format: The export format. Must be `ARROW` or `CSV`. + :type format: TableExportFormat + :param branch_id: The identifier (name) of the Branch. + :type branch_id: Optional[BranchId] + :param columns: A subset of the dataset columns to include in the result. Defaults to all columns. + :type columns: Optional[List[str]] + :param end_transaction_rid: The Resource Identifier (RID) of the end Transaction. + :type end_transaction_rid: Optional[TransactionRid] + :param row_limit: A limit on the number of rows to return. Note that row ordering is non-deterministic. + :type row_limit: Optional[int] + :param start_transaction_rid: The Resource Identifier (RID) of the start Transaction. + :type start_transaction_rid: Optional[TransactionRid] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[bytes] + + :raises ColumnTypesNotSupported: The dataset contains column types that are not supported. + :raises DatasetReadNotSupported: The dataset does not support being read. + :raises InvalidParameterCombination: The given parameters are individually valid but cannot be used in the given combination. + :raises ReadTablePermissionDenied: The provided token does not have permission to read the given dataset as a table. + :raises SchemaNotFound: A schema could not be found for the given dataset and branch, or the client token does not have access to it. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v1/datasets/{datasetRid}/readTable", + query_params={ + "format": format, + "branchId": branch_id, + "columns": columns, + "endTransactionRid": end_transaction_rid, + "rowLimit": row_limit, + "startTransactionRid": start_transaction_rid, + }, + path_params={ + "datasetRid": dataset_rid, + }, + header_params={ + "Accept": "*/*", + }, + body=None, + response_type=bytes, + request_timeout=request_timeout, + throwable_errors={ + "ColumnTypesNotSupported": datasets_errors.ColumnTypesNotSupported, + "DatasetReadNotSupported": datasets_errors.DatasetReadNotSupported, + "InvalidParameterCombination": core_errors.InvalidParameterCombination, + "ReadTablePermissionDenied": datasets_errors.ReadTablePermissionDenied, + "SchemaNotFound": datasets_errors.SchemaNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def replace_schema( + self, + dataset_rid: datasets_models.DatasetRid, + body: typing.Any, + *, + branch_id: typing.Optional[datasets_models.BranchId] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[None]: + """ + Puts a Schema on an existing Dataset and Branch. + + :param dataset_rid: The RID of the Dataset on which to put the Schema. + :type dataset_rid: DatasetRid + :param body: Body of the request + :type body: Any + :param branch_id: The ID of the Branch on which to put the Schema. + :type branch_id: Optional[BranchId] + :param preview: + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[None] + + :raises AbortTransactionPermissionDenied: The provided token does not have permission to abort the given transaction on the given dataset. + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises CommitTransactionPermissionDenied: The provided token does not have permission to commit the given transaction on the given dataset. + :raises CreateTransactionPermissionDenied: The provided token does not have permission to create a transaction on this dataset. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises FileNotFoundOnTransactionRange: The requested file could not be found on the given transaction range, or the client token does not have access to it. + :raises InvalidBranchId: The requested branch name cannot be used. Branch names cannot be empty and must not look like RIDs or UUIDs. + :raises InvalidTransactionType: The given transaction type is not valid. Valid transaction types are `SNAPSHOT`, `UPDATE`, `APPEND`, and `DELETE`. + :raises OpenTransactionAlreadyExists: A transaction is already open on this dataset and branch. A branch of a dataset can only have one open transaction at a time. + :raises PutSchemaPermissionDenied: todo + :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. + :raises TransactionNotOpen: The given transaction is not open. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="PUT", + resource_path="/v1/datasets/{datasetRid}/schema", + query_params={ + "branchId": branch_id, + "preview": preview, + }, + path_params={ + "datasetRid": dataset_rid, + }, + header_params={ + "Content-Type": "application/json", + }, + body=body, + response_type=None, + request_timeout=request_timeout, + throwable_errors={ + "AbortTransactionPermissionDenied": datasets_errors.AbortTransactionPermissionDenied, + "BranchNotFound": datasets_errors.BranchNotFound, + "CommitTransactionPermissionDenied": datasets_errors.CommitTransactionPermissionDenied, + "CreateTransactionPermissionDenied": datasets_errors.CreateTransactionPermissionDenied, + "DatasetNotFound": datasets_errors.DatasetNotFound, + "FileNotFoundOnTransactionRange": datasets_errors.FileNotFoundOnTransactionRange, + "InvalidBranchId": datasets_errors.InvalidBranchId, + "InvalidTransactionType": datasets_errors.InvalidTransactionType, + "OpenTransactionAlreadyExists": datasets_errors.OpenTransactionAlreadyExists, + "PutSchemaPermissionDenied": datasets_errors.PutSchemaPermissionDenied, + "TransactionNotFound": datasets_errors.TransactionNotFound, + "TransactionNotOpen": datasets_errors.TransactionNotOpen, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _AsyncDatasetClientRaw: + def __init__(self, client: AsyncDatasetClient) -> None: + def create(_: datasets_models.Dataset): ... + def delete_schema(_: None): ... + def get(_: datasets_models.Dataset): ... + def get_schema(_: typing.Optional[typing.Any]): ... + def read(_: bytes): ... + def replace_schema(_: None): ... + + self.create = core.async_with_raw_response(create, client.create) + self.delete_schema = core.async_with_raw_response(delete_schema, client.delete_schema) + self.get = core.async_with_raw_response(get, client.get) + self.get_schema = core.async_with_raw_response(get_schema, client.get_schema) + self.read = core.async_with_raw_response(read, client.read) + self.replace_schema = core.async_with_raw_response(replace_schema, client.replace_schema) + + +class _AsyncDatasetClientStreaming: + def __init__(self, client: AsyncDatasetClient) -> None: + def create(_: datasets_models.Dataset): ... + def get(_: datasets_models.Dataset): ... + def get_schema(_: typing.Optional[typing.Any]): ... + def read(_: bytes): ... + + self.create = core.async_with_streaming_response(create, client.create) + self.get = core.async_with_streaming_response(get, client.get) + self.get_schema = core.async_with_streaming_response(get_schema, client.get_schema) + self.read = core.async_with_streaming_response(read, client.read) diff --git a/foundry_sdk/v1/datasets/errors.py b/foundry_sdk/v1/datasets/errors.py new file mode 100644 index 000000000..cd749b82c --- /dev/null +++ b/foundry_sdk/v1/datasets/errors.py @@ -0,0 +1,457 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing +from dataclasses import dataclass + +import typing_extensions + +from foundry_sdk import _errors as errors +from foundry_sdk.v1.core import models as core_models +from foundry_sdk.v1.datasets import models as datasets_models + + +class AbortTransactionPermissionDeniedParameters(typing_extensions.TypedDict): + """The provided token does not have permission to abort the given transaction on the given dataset.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + datasetRid: datasets_models.DatasetRid + transactionRid: datasets_models.TransactionRid + + +@dataclass +class AbortTransactionPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["AbortTransactionPermissionDenied"] + parameters: AbortTransactionPermissionDeniedParameters + error_instance_id: str + + +class BranchAlreadyExistsParameters(typing_extensions.TypedDict): + """The branch cannot be created because a branch with that name already exists.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + datasetRid: datasets_models.DatasetRid + branchId: datasets_models.BranchId + + +@dataclass +class BranchAlreadyExists(errors.ConflictError): + name: typing.Literal["BranchAlreadyExists"] + parameters: BranchAlreadyExistsParameters + error_instance_id: str + + +class BranchNotFoundParameters(typing_extensions.TypedDict): + """The requested branch could not be found, or the client token does not have access to it.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + datasetRid: datasets_models.DatasetRid + branchId: datasets_models.BranchId + + +@dataclass +class BranchNotFound(errors.NotFoundError): + name: typing.Literal["BranchNotFound"] + parameters: BranchNotFoundParameters + error_instance_id: str + + +class ColumnTypesNotSupportedParameters(typing_extensions.TypedDict): + """The dataset contains column types that are not supported.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + datasetRid: datasets_models.DatasetRid + + +@dataclass +class ColumnTypesNotSupported(errors.BadRequestError): + name: typing.Literal["ColumnTypesNotSupported"] + parameters: ColumnTypesNotSupportedParameters + error_instance_id: str + + +class CommitTransactionPermissionDeniedParameters(typing_extensions.TypedDict): + """The provided token does not have permission to commit the given transaction on the given dataset.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + datasetRid: datasets_models.DatasetRid + transactionRid: datasets_models.TransactionRid + + +@dataclass +class CommitTransactionPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["CommitTransactionPermissionDenied"] + parameters: CommitTransactionPermissionDeniedParameters + error_instance_id: str + + +class CreateBranchPermissionDeniedParameters(typing_extensions.TypedDict): + """The provided token does not have permission to create a branch of this dataset.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + datasetRid: datasets_models.DatasetRid + branchId: datasets_models.BranchId + + +@dataclass +class CreateBranchPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["CreateBranchPermissionDenied"] + parameters: CreateBranchPermissionDeniedParameters + error_instance_id: str + + +class CreateDatasetPermissionDeniedParameters(typing_extensions.TypedDict): + """The provided token does not have permission to create a dataset in this folder.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + parentFolderRid: core_models.FolderRid + name: datasets_models.DatasetName + + +@dataclass +class CreateDatasetPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["CreateDatasetPermissionDenied"] + parameters: CreateDatasetPermissionDeniedParameters + error_instance_id: str + + +class CreateTransactionPermissionDeniedParameters(typing_extensions.TypedDict): + """The provided token does not have permission to create a transaction on this dataset.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + datasetRid: datasets_models.DatasetRid + branchId: datasets_models.BranchId + + +@dataclass +class CreateTransactionPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["CreateTransactionPermissionDenied"] + parameters: CreateTransactionPermissionDeniedParameters + error_instance_id: str + + +class DatasetNotFoundParameters(typing_extensions.TypedDict): + """The requested dataset could not be found, or the client token does not have access to it.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + datasetRid: datasets_models.DatasetRid + + +@dataclass +class DatasetNotFound(errors.NotFoundError): + name: typing.Literal["DatasetNotFound"] + parameters: DatasetNotFoundParameters + error_instance_id: str + + +class DatasetReadNotSupportedParameters(typing_extensions.TypedDict): + """The dataset does not support being read.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + datasetRid: datasets_models.DatasetRid + + +@dataclass +class DatasetReadNotSupported(errors.BadRequestError): + name: typing.Literal["DatasetReadNotSupported"] + parameters: DatasetReadNotSupportedParameters + error_instance_id: str + + +class DeleteBranchPermissionDeniedParameters(typing_extensions.TypedDict): + """The provided token does not have permission to delete the given branch from this dataset.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + datasetRid: datasets_models.DatasetRid + branchId: datasets_models.BranchId + + +@dataclass +class DeleteBranchPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["DeleteBranchPermissionDenied"] + parameters: DeleteBranchPermissionDeniedParameters + error_instance_id: str + + +class DeleteSchemaPermissionDeniedParameters(typing_extensions.TypedDict): + """todo""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + datasetRid: datasets_models.DatasetRid + branchId: datasets_models.BranchId + transactionRid: typing_extensions.NotRequired[datasets_models.TransactionRid] + + +@dataclass +class DeleteSchemaPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["DeleteSchemaPermissionDenied"] + parameters: DeleteSchemaPermissionDeniedParameters + error_instance_id: str + + +class FileAlreadyExistsParameters(typing_extensions.TypedDict): + """The given file path already exists in the dataset and transaction.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + datasetRid: datasets_models.DatasetRid + transactionRid: datasets_models.TransactionRid + path: core_models.FilePath + + +@dataclass +class FileAlreadyExists(errors.NotFoundError): + name: typing.Literal["FileAlreadyExists"] + parameters: FileAlreadyExistsParameters + error_instance_id: str + + +class FileNotFoundOnBranchParameters(typing_extensions.TypedDict): + """The requested file could not be found on the given branch, or the client token does not have access to it.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + datasetRid: datasets_models.DatasetRid + branchId: datasets_models.BranchId + path: core_models.FilePath + + +@dataclass +class FileNotFoundOnBranch(errors.NotFoundError): + name: typing.Literal["FileNotFoundOnBranch"] + parameters: FileNotFoundOnBranchParameters + error_instance_id: str + + +class FileNotFoundOnTransactionRangeParameters(typing_extensions.TypedDict): + """The requested file could not be found on the given transaction range, or the client token does not have access to it.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + datasetRid: datasets_models.DatasetRid + startTransactionRid: typing_extensions.NotRequired[datasets_models.TransactionRid] + endTransactionRid: datasets_models.TransactionRid + path: core_models.FilePath + + +@dataclass +class FileNotFoundOnTransactionRange(errors.NotFoundError): + name: typing.Literal["FileNotFoundOnTransactionRange"] + parameters: FileNotFoundOnTransactionRangeParameters + error_instance_id: str + + +class InvalidBranchIdParameters(typing_extensions.TypedDict): + """The requested branch name cannot be used. Branch names cannot be empty and must not look like RIDs or UUIDs.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + branchId: datasets_models.BranchId + + +@dataclass +class InvalidBranchId(errors.BadRequestError): + name: typing.Literal["InvalidBranchId"] + parameters: InvalidBranchIdParameters + error_instance_id: str + + +class InvalidTransactionTypeParameters(typing_extensions.TypedDict): + """The given transaction type is not valid. Valid transaction types are `SNAPSHOT`, `UPDATE`, `APPEND`, and `DELETE`.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + datasetRid: datasets_models.DatasetRid + transactionRid: datasets_models.TransactionRid + transactionType: datasets_models.TransactionType + + +@dataclass +class InvalidTransactionType(errors.BadRequestError): + name: typing.Literal["InvalidTransactionType"] + parameters: InvalidTransactionTypeParameters + error_instance_id: str + + +class OpenTransactionAlreadyExistsParameters(typing_extensions.TypedDict): + """A transaction is already open on this dataset and branch. A branch of a dataset can only have one open transaction at a time.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + datasetRid: datasets_models.DatasetRid + branchId: datasets_models.BranchId + + +@dataclass +class OpenTransactionAlreadyExists(errors.ConflictError): + name: typing.Literal["OpenTransactionAlreadyExists"] + parameters: OpenTransactionAlreadyExistsParameters + error_instance_id: str + + +class PutSchemaPermissionDeniedParameters(typing_extensions.TypedDict): + """todo""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + datasetRid: datasets_models.DatasetRid + branchId: datasets_models.BranchId + + +@dataclass +class PutSchemaPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["PutSchemaPermissionDenied"] + parameters: PutSchemaPermissionDeniedParameters + error_instance_id: str + + +class ReadTablePermissionDeniedParameters(typing_extensions.TypedDict): + """The provided token does not have permission to read the given dataset as a table.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + datasetRid: datasets_models.DatasetRid + + +@dataclass +class ReadTablePermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["ReadTablePermissionDenied"] + parameters: ReadTablePermissionDeniedParameters + error_instance_id: str + + +class SchemaNotFoundParameters(typing_extensions.TypedDict): + """A schema could not be found for the given dataset and branch, or the client token does not have access to it.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + datasetRid: datasets_models.DatasetRid + branchId: datasets_models.BranchId + transactionRid: typing_extensions.NotRequired[datasets_models.TransactionRid] + + +@dataclass +class SchemaNotFound(errors.NotFoundError): + name: typing.Literal["SchemaNotFound"] + parameters: SchemaNotFoundParameters + error_instance_id: str + + +class TransactionNotCommittedParameters(typing_extensions.TypedDict): + """The given transaction has not been committed.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + datasetRid: datasets_models.DatasetRid + transactionRid: datasets_models.TransactionRid + transactionStatus: datasets_models.TransactionStatus + + +@dataclass +class TransactionNotCommitted(errors.BadRequestError): + name: typing.Literal["TransactionNotCommitted"] + parameters: TransactionNotCommittedParameters + error_instance_id: str + + +class TransactionNotFoundParameters(typing_extensions.TypedDict): + """The requested transaction could not be found on the dataset, or the client token does not have access to it.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + datasetRid: datasets_models.DatasetRid + transactionRid: datasets_models.TransactionRid + + +@dataclass +class TransactionNotFound(errors.NotFoundError): + name: typing.Literal["TransactionNotFound"] + parameters: TransactionNotFoundParameters + error_instance_id: str + + +class TransactionNotOpenParameters(typing_extensions.TypedDict): + """The given transaction is not open.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + datasetRid: datasets_models.DatasetRid + transactionRid: datasets_models.TransactionRid + transactionStatus: datasets_models.TransactionStatus + + +@dataclass +class TransactionNotOpen(errors.BadRequestError): + name: typing.Literal["TransactionNotOpen"] + parameters: TransactionNotOpenParameters + error_instance_id: str + + +class UploadFilePermissionDeniedParameters(typing_extensions.TypedDict): + """The provided token does not have permission to upload the given file to the given dataset and transaction.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + datasetRid: datasets_models.DatasetRid + transactionRid: datasets_models.TransactionRid + path: core_models.FilePath + + +@dataclass +class UploadFilePermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["UploadFilePermissionDenied"] + parameters: UploadFilePermissionDeniedParameters + error_instance_id: str + + +__all__ = [ + "AbortTransactionPermissionDenied", + "BranchAlreadyExists", + "BranchNotFound", + "ColumnTypesNotSupported", + "CommitTransactionPermissionDenied", + "CreateBranchPermissionDenied", + "CreateDatasetPermissionDenied", + "CreateTransactionPermissionDenied", + "DatasetNotFound", + "DatasetReadNotSupported", + "DeleteBranchPermissionDenied", + "DeleteSchemaPermissionDenied", + "FileAlreadyExists", + "FileNotFoundOnBranch", + "FileNotFoundOnTransactionRange", + "InvalidBranchId", + "InvalidTransactionType", + "OpenTransactionAlreadyExists", + "PutSchemaPermissionDenied", + "ReadTablePermissionDenied", + "SchemaNotFound", + "TransactionNotCommitted", + "TransactionNotFound", + "TransactionNotOpen", + "UploadFilePermissionDenied", +] diff --git a/foundry_sdk/v1/datasets/file.py b/foundry_sdk/v1/datasets/file.py new file mode 100644 index 000000000..d3df70028 --- /dev/null +++ b/foundry_sdk/v1/datasets/file.py @@ -0,0 +1,1108 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v1.core import errors as core_errors +from foundry_sdk.v1.core import models as core_models +from foundry_sdk.v1.datasets import errors as datasets_errors +from foundry_sdk.v1.datasets import models as datasets_models + + +class FileClient: + """ + The API client for the File Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _FileClientStreaming(self) + self.with_raw_response = _FileClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def delete( + self, + dataset_rid: datasets_models.DatasetRid, + file_path: core_models.FilePath, + *, + branch_id: typing.Optional[datasets_models.BranchId] = None, + transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> None: + """ + Deletes a File from a Dataset. By default the file is deleted in a new transaction on the default + branch - `master` for most enrollments. The file will still be visible on historical views. + + #### Advanced Usage + + See [Datasets Core Concepts](https://palantir.com/docs/foundry/data-integration/datasets/) for details on using branches and transactions. + + To **delete a File from a specific Branch** specify the Branch's identifier as `branchId`. A new delete Transaction + will be created and committed on this branch. + + To **delete a File using a manually opened Transaction**, specify the Transaction's resource identifier + as `transactionRid`. The transaction must be of type `DELETE`. This is useful for deleting multiple files in a + single transaction. See [createTransaction](https://palantir.com/docs/foundry/api/datasets-resources/transactions/create-transaction/) to + open a transaction. + + :param dataset_rid: The Resource Identifier (RID) of the Dataset on which to delete the File. + :type dataset_rid: DatasetRid + :param file_path: The File path within the Dataset. + :type file_path: FilePath + :param branch_id: The identifier (name) of the Branch on which to delete the File. Defaults to `master` for most enrollments. + :type branch_id: Optional[BranchId] + :param transaction_rid: The Resource Identifier (RID) of the open delete Transaction on which to delete the File. + :type transaction_rid: Optional[TransactionRid] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: None + + :raises AbortTransactionPermissionDenied: The provided token does not have permission to abort the given transaction on the given dataset. + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises CommitTransactionPermissionDenied: The provided token does not have permission to commit the given transaction on the given dataset. + :raises CreateTransactionPermissionDenied: The provided token does not have permission to create a transaction on this dataset. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises FileNotFoundOnBranch: The requested file could not be found on the given branch, or the client token does not have access to it. + :raises FileNotFoundOnTransactionRange: The requested file could not be found on the given transaction range, or the client token does not have access to it. + :raises InvalidBranchId: The requested branch name cannot be used. Branch names cannot be empty and must not look like RIDs or UUIDs. + :raises InvalidParameterCombination: The given parameters are individually valid but cannot be used in the given combination. + :raises InvalidTransactionType: The given transaction type is not valid. Valid transaction types are `SNAPSHOT`, `UPDATE`, `APPEND`, and `DELETE`. + :raises OpenTransactionAlreadyExists: A transaction is already open on this dataset and branch. A branch of a dataset can only have one open transaction at a time. + :raises PutSchemaPermissionDenied: todo + :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. + :raises TransactionNotOpen: The given transaction is not open. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="DELETE", + resource_path="/v1/datasets/{datasetRid}/files/{filePath}", + query_params={ + "branchId": branch_id, + "transactionRid": transaction_rid, + }, + path_params={ + "datasetRid": dataset_rid, + "filePath": file_path, + }, + header_params={}, + body=None, + response_type=None, + request_timeout=request_timeout, + throwable_errors={ + "AbortTransactionPermissionDenied": datasets_errors.AbortTransactionPermissionDenied, + "BranchNotFound": datasets_errors.BranchNotFound, + "CommitTransactionPermissionDenied": datasets_errors.CommitTransactionPermissionDenied, + "CreateTransactionPermissionDenied": datasets_errors.CreateTransactionPermissionDenied, + "DatasetNotFound": datasets_errors.DatasetNotFound, + "FileNotFoundOnBranch": datasets_errors.FileNotFoundOnBranch, + "FileNotFoundOnTransactionRange": datasets_errors.FileNotFoundOnTransactionRange, + "InvalidBranchId": datasets_errors.InvalidBranchId, + "InvalidParameterCombination": core_errors.InvalidParameterCombination, + "InvalidTransactionType": datasets_errors.InvalidTransactionType, + "OpenTransactionAlreadyExists": datasets_errors.OpenTransactionAlreadyExists, + "PutSchemaPermissionDenied": datasets_errors.PutSchemaPermissionDenied, + "TransactionNotFound": datasets_errors.TransactionNotFound, + "TransactionNotOpen": datasets_errors.TransactionNotOpen, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + dataset_rid: datasets_models.DatasetRid, + file_path: core_models.FilePath, + *, + branch_id: typing.Optional[datasets_models.BranchId] = None, + end_transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, + start_transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> datasets_models.File: + """ + Gets metadata about a File contained in a Dataset. By default this retrieves the file's metadata from the latest + view of the default branch - `master` for most enrollments. + + #### Advanced Usage + + See [Datasets Core Concepts](https://palantir.com/docs/foundry/data-integration/datasets/) for details on using branches and transactions. + + To **get a file's metadata from a specific Branch** specify the Branch's identifier as `branchId`. This will + retrieve metadata for the most recent version of the file since the latest snapshot transaction, or the earliest + ancestor transaction of the branch if there are no snapshot transactions. + + To **get a file's metadata from the resolved view of a transaction** specify the Transaction's resource identifier + as `endTransactionRid`. This will retrieve metadata for the most recent version of the file since the latest snapshot + transaction, or the earliest ancestor transaction if there are no snapshot transactions. + + To **get a file's metadata from the resolved view of a range of transactions** specify the the start transaction's + resource identifier as `startTransactionRid` and the end transaction's resource identifier as `endTransactionRid`. + This will retrieve metadata for the most recent version of the file since the `startTransactionRid` up to the + `endTransactionRid`. Behavior is undefined when the start and end transactions do not belong to the same root-to-leaf path. + + To **get a file's metadata from a specific transaction** specify the Transaction's resource identifier as both the + `startTransactionRid` and `endTransactionRid`. + + :param dataset_rid: The Resource Identifier (RID) of the Dataset that contains the File. + :type dataset_rid: DatasetRid + :param file_path: The File's path within the Dataset. + :type file_path: FilePath + :param branch_id: The identifier (name) of the Branch that contains the File. Defaults to `master` for most enrollments. + :type branch_id: Optional[BranchId] + :param end_transaction_rid: The Resource Identifier (RID) of the end Transaction. + :type end_transaction_rid: Optional[TransactionRid] + :param start_transaction_rid: The Resource Identifier (RID) of the start Transaction. + :type start_transaction_rid: Optional[TransactionRid] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: datasets_models.File + + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises FileNotFoundOnBranch: The requested file could not be found on the given branch, or the client token does not have access to it. + :raises FileNotFoundOnTransactionRange: The requested file could not be found on the given transaction range, or the client token does not have access to it. + :raises InvalidBranchId: The requested branch name cannot be used. Branch names cannot be empty and must not look like RIDs or UUIDs. + :raises InvalidParameterCombination: The given parameters are individually valid but cannot be used in the given combination. + :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v1/datasets/{datasetRid}/files/{filePath}", + query_params={ + "branchId": branch_id, + "endTransactionRid": end_transaction_rid, + "startTransactionRid": start_transaction_rid, + }, + path_params={ + "datasetRid": dataset_rid, + "filePath": file_path, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=datasets_models.File, + request_timeout=request_timeout, + throwable_errors={ + "BranchNotFound": datasets_errors.BranchNotFound, + "DatasetNotFound": datasets_errors.DatasetNotFound, + "FileNotFoundOnBranch": datasets_errors.FileNotFoundOnBranch, + "FileNotFoundOnTransactionRange": datasets_errors.FileNotFoundOnTransactionRange, + "InvalidBranchId": datasets_errors.InvalidBranchId, + "InvalidParameterCombination": core_errors.InvalidParameterCombination, + "TransactionNotFound": datasets_errors.TransactionNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def list( + self, + dataset_rid: datasets_models.DatasetRid, + *, + branch_id: typing.Optional[datasets_models.BranchId] = None, + end_transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + start_transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.ResourceIterator[datasets_models.File]: + """ + Lists Files contained in a Dataset. By default files are listed on the latest view of the default + branch - `master` for most enrollments. + + This endpoint currently does not support views (virtual datasets composed of other datasets). For more information, refer to the [views documentation](https://palantir.com/docs/foundry/data-integration/views). + + #### Advanced Usage + + See [Datasets Core Concepts](https://palantir.com/docs/foundry/data-integration/datasets/) for details on using branches and transactions. + + To **list files on a specific Branch** specify the Branch's identifier as `branchId`. This will include the most + recent version of all files since the latest snapshot transaction, or the earliest ancestor transaction of the + branch if there are no snapshot transactions. + + To **list files on the resolved view of a transaction** specify the Transaction's resource identifier + as `endTransactionRid`. This will include the most recent version of all files since the latest snapshot + transaction, or the earliest ancestor transaction if there are no snapshot transactions. + + To **list files on the resolved view of a range of transactions** specify the the start transaction's resource + identifier as `startTransactionRid` and the end transaction's resource identifier as `endTransactionRid`. This + will include the most recent version of all files since the `startTransactionRid` up to the `endTransactionRid`. + Note that an intermediate snapshot transaction will remove all files from the view. Behavior is undefined when + the start and end transactions do not belong to the same root-to-leaf path. + + To **list files on a specific transaction** specify the Transaction's resource identifier as both the + `startTransactionRid` and `endTransactionRid`. This will include only files that were modified as part of that + Transaction. + + :param dataset_rid: The Resource Identifier (RID) of the Dataset on which to list Files. + :type dataset_rid: DatasetRid + :param branch_id: The identifier (name) of the Branch on which to list Files. Defaults to `master` for most enrollments. + :type branch_id: Optional[BranchId] + :param end_transaction_rid: The Resource Identifier (RID) of the end Transaction. + :type end_transaction_rid: Optional[TransactionRid] + :param page_size: The desired size of the page to be returned. Defaults to 1,000. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. + :type page_size: Optional[PageSize] + :param page_token: + :type page_token: Optional[PageToken] + :param start_transaction_rid: The Resource Identifier (RID) of the start Transaction. + :type start_transaction_rid: Optional[TransactionRid] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.ResourceIterator[datasets_models.File] + + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises InvalidBranchId: The requested branch name cannot be used. Branch names cannot be empty and must not look like RIDs or UUIDs. + :raises InvalidParameterCombination: The given parameters are individually valid but cannot be used in the given combination. + :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v1/datasets/{datasetRid}/files", + query_params={ + "branchId": branch_id, + "endTransactionRid": end_transaction_rid, + "pageSize": page_size, + "pageToken": page_token, + "startTransactionRid": start_transaction_rid, + }, + path_params={ + "datasetRid": dataset_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=datasets_models.ListFilesResponse, + request_timeout=request_timeout, + throwable_errors={ + "BranchNotFound": datasets_errors.BranchNotFound, + "DatasetNotFound": datasets_errors.DatasetNotFound, + "InvalidBranchId": datasets_errors.InvalidBranchId, + "InvalidParameterCombination": core_errors.InvalidParameterCombination, + "TransactionNotFound": datasets_errors.TransactionNotFound, + }, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def read( + self, + dataset_rid: datasets_models.DatasetRid, + file_path: core_models.FilePath, + *, + branch_id: typing.Optional[datasets_models.BranchId] = None, + end_transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, + start_transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> bytes: + """ + Gets the content of a File contained in a Dataset. By default this retrieves the file's content from the latest + view of the default branch - `master` for most enrollments. + + This endpoint currently does not support views (virtual datasets composed of other datasets). For more information, refer to the [views documentation](https://palantir.com/docs/foundry/data-integration/views). + + #### Advanced Usage + + See [Datasets Core Concepts](https://palantir.com/docs/foundry/data-integration/datasets/) for details on using branches and transactions. + + To **get a file's content from a specific Branch** specify the Branch's identifier as `branchId`. This will + retrieve the content for the most recent version of the file since the latest snapshot transaction, or the + earliest ancestor transaction of the branch if there are no snapshot transactions. + + To **get a file's content from the resolved view of a transaction** specify the Transaction's resource identifier + as `endTransactionRid`. This will retrieve the content for the most recent version of the file since the latest + snapshot transaction, or the earliest ancestor transaction if there are no snapshot transactions. + + To **get a file's content from the resolved view of a range of transactions** specify the the start transaction's + resource identifier as `startTransactionRid` and the end transaction's resource identifier as `endTransactionRid`. + This will retrieve the content for the most recent version of the file since the `startTransactionRid` up to the + `endTransactionRid`. Note that an intermediate snapshot transaction will remove all files from the view. Behavior + is undefined when the start and end transactions do not belong to the same root-to-leaf path. + + To **get a file's content from a specific transaction** specify the Transaction's resource identifier as both the + `startTransactionRid` and `endTransactionRid`. + + :param dataset_rid: The Resource Identifier (RID) of the Dataset that contains the File. + :type dataset_rid: DatasetRid + :param file_path: The File's path within the Dataset. + :type file_path: FilePath + :param branch_id: The identifier (name) of the Branch that contains the File. Defaults to `master` for most enrollments. + :type branch_id: Optional[BranchId] + :param end_transaction_rid: The Resource Identifier (RID) of the end Transaction. + :type end_transaction_rid: Optional[TransactionRid] + :param start_transaction_rid: The Resource Identifier (RID) of the start Transaction. + :type start_transaction_rid: Optional[TransactionRid] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: bytes + + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises FileNotFoundOnBranch: The requested file could not be found on the given branch, or the client token does not have access to it. + :raises FileNotFoundOnTransactionRange: The requested file could not be found on the given transaction range, or the client token does not have access to it. + :raises InvalidBranchId: The requested branch name cannot be used. Branch names cannot be empty and must not look like RIDs or UUIDs. + :raises InvalidParameterCombination: The given parameters are individually valid but cannot be used in the given combination. + :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v1/datasets/{datasetRid}/files/{filePath}/content", + query_params={ + "branchId": branch_id, + "endTransactionRid": end_transaction_rid, + "startTransactionRid": start_transaction_rid, + }, + path_params={ + "datasetRid": dataset_rid, + "filePath": file_path, + }, + header_params={ + "Accept": "*/*", + }, + body=None, + response_type=bytes, + request_timeout=request_timeout, + throwable_errors={ + "BranchNotFound": datasets_errors.BranchNotFound, + "DatasetNotFound": datasets_errors.DatasetNotFound, + "FileNotFoundOnBranch": datasets_errors.FileNotFoundOnBranch, + "FileNotFoundOnTransactionRange": datasets_errors.FileNotFoundOnTransactionRange, + "InvalidBranchId": datasets_errors.InvalidBranchId, + "InvalidParameterCombination": core_errors.InvalidParameterCombination, + "TransactionNotFound": datasets_errors.TransactionNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def upload( + self, + dataset_rid: datasets_models.DatasetRid, + body: bytes, + *, + file_path: core_models.FilePath, + branch_id: typing.Optional[datasets_models.BranchId] = None, + transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, + transaction_type: typing.Optional[datasets_models.TransactionType] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> datasets_models.File: + """ + Uploads a File to an existing Dataset. + The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`. + + By default the file is uploaded to a new transaction on the default branch - `master` for most enrollments. + If the file already exists only the most recent version will be visible in the updated view. + + #### Advanced Usage + + See [Datasets Core Concepts](https://palantir.com/docs/foundry/data-integration/datasets/) for details on using branches and transactions. + + To **upload a file to a specific Branch** specify the Branch's identifier as `branchId`. A new transaction will + be created and committed on this branch. By default the TransactionType will be `UPDATE`, to override this + default specify `transactionType` in addition to `branchId`. + See [createBranch](https://palantir.com/docs/foundry/api/datasets-resources/branches/create-branch/) to create a custom branch. + + To **upload a file on a manually opened transaction** specify the Transaction's resource identifier as + `transactionRid`. This is useful for uploading multiple files in a single transaction. + See [createTransaction](https://palantir.com/docs/foundry/api/datasets-resources/transactions/create-transaction/) to open a transaction. + + :param dataset_rid: The Resource Identifier (RID) of the Dataset on which to upload the File. + :type dataset_rid: DatasetRid + :param body: Body of the request + :type body: bytes + :param file_path: The File's path within the Dataset. + :type file_path: FilePath + :param branch_id: The identifier (name) of the Branch on which to upload the File. Defaults to `master` for most enrollments. + :type branch_id: Optional[BranchId] + :param transaction_rid: The Resource Identifier (RID) of the open Transaction on which to upload the File. + :type transaction_rid: Optional[TransactionRid] + :param transaction_type: The type of the Transaction to create when using branchId. Defaults to `UPDATE`. + :type transaction_type: Optional[TransactionType] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: datasets_models.File + + :raises AbortTransactionPermissionDenied: The provided token does not have permission to abort the given transaction on the given dataset. + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises CommitTransactionPermissionDenied: The provided token does not have permission to commit the given transaction on the given dataset. + :raises CreateTransactionPermissionDenied: The provided token does not have permission to create a transaction on this dataset. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises FileAlreadyExists: The given file path already exists in the dataset and transaction. + :raises InvalidBranchId: The requested branch name cannot be used. Branch names cannot be empty and must not look like RIDs or UUIDs. + :raises InvalidFilePath: The provided file path is not valid. + :raises InvalidParameterCombination: The given parameters are individually valid but cannot be used in the given combination. + :raises OpenTransactionAlreadyExists: A transaction is already open on this dataset and branch. A branch of a dataset can only have one open transaction at a time. + :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. + :raises TransactionNotOpen: The given transaction is not open. + :raises UploadFilePermissionDenied: The provided token does not have permission to upload the given file to the given dataset and transaction. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v1/datasets/{datasetRid}/files:upload", + query_params={ + "filePath": file_path, + "branchId": branch_id, + "transactionRid": transaction_rid, + "transactionType": transaction_type, + }, + path_params={ + "datasetRid": dataset_rid, + }, + header_params={ + "Content-Type": "*/*", + "Accept": "application/json", + }, + body=body, + response_type=datasets_models.File, + request_timeout=request_timeout, + throwable_errors={ + "AbortTransactionPermissionDenied": datasets_errors.AbortTransactionPermissionDenied, + "BranchNotFound": datasets_errors.BranchNotFound, + "CommitTransactionPermissionDenied": datasets_errors.CommitTransactionPermissionDenied, + "CreateTransactionPermissionDenied": datasets_errors.CreateTransactionPermissionDenied, + "DatasetNotFound": datasets_errors.DatasetNotFound, + "FileAlreadyExists": datasets_errors.FileAlreadyExists, + "InvalidBranchId": datasets_errors.InvalidBranchId, + "InvalidFilePath": core_errors.InvalidFilePath, + "InvalidParameterCombination": core_errors.InvalidParameterCombination, + "OpenTransactionAlreadyExists": datasets_errors.OpenTransactionAlreadyExists, + "TransactionNotFound": datasets_errors.TransactionNotFound, + "TransactionNotOpen": datasets_errors.TransactionNotOpen, + "UploadFilePermissionDenied": datasets_errors.UploadFilePermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _FileClientRaw: + def __init__(self, client: FileClient) -> None: + def delete(_: None): ... + def get(_: datasets_models.File): ... + def list(_: datasets_models.ListFilesResponse): ... + def read(_: bytes): ... + def upload(_: datasets_models.File): ... + + self.delete = core.with_raw_response(delete, client.delete) + self.get = core.with_raw_response(get, client.get) + self.list = core.with_raw_response(list, client.list) + self.read = core.with_raw_response(read, client.read) + self.upload = core.with_raw_response(upload, client.upload) + + +class _FileClientStreaming: + def __init__(self, client: FileClient) -> None: + def get(_: datasets_models.File): ... + def list(_: datasets_models.ListFilesResponse): ... + def read(_: bytes): ... + def upload(_: datasets_models.File): ... + + self.get = core.with_streaming_response(get, client.get) + self.list = core.with_streaming_response(list, client.list) + self.read = core.with_streaming_response(read, client.read) + self.upload = core.with_streaming_response(upload, client.upload) + + +class AsyncFileClient: + """ + The API client for the File Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncFileClientStreaming(self) + self.with_raw_response = _AsyncFileClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def delete( + self, + dataset_rid: datasets_models.DatasetRid, + file_path: core_models.FilePath, + *, + branch_id: typing.Optional[datasets_models.BranchId] = None, + transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[None]: + """ + Deletes a File from a Dataset. By default the file is deleted in a new transaction on the default + branch - `master` for most enrollments. The file will still be visible on historical views. + + #### Advanced Usage + + See [Datasets Core Concepts](https://palantir.com/docs/foundry/data-integration/datasets/) for details on using branches and transactions. + + To **delete a File from a specific Branch** specify the Branch's identifier as `branchId`. A new delete Transaction + will be created and committed on this branch. + + To **delete a File using a manually opened Transaction**, specify the Transaction's resource identifier + as `transactionRid`. The transaction must be of type `DELETE`. This is useful for deleting multiple files in a + single transaction. See [createTransaction](https://palantir.com/docs/foundry/api/datasets-resources/transactions/create-transaction/) to + open a transaction. + + :param dataset_rid: The Resource Identifier (RID) of the Dataset on which to delete the File. + :type dataset_rid: DatasetRid + :param file_path: The File path within the Dataset. + :type file_path: FilePath + :param branch_id: The identifier (name) of the Branch on which to delete the File. Defaults to `master` for most enrollments. + :type branch_id: Optional[BranchId] + :param transaction_rid: The Resource Identifier (RID) of the open delete Transaction on which to delete the File. + :type transaction_rid: Optional[TransactionRid] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[None] + + :raises AbortTransactionPermissionDenied: The provided token does not have permission to abort the given transaction on the given dataset. + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises CommitTransactionPermissionDenied: The provided token does not have permission to commit the given transaction on the given dataset. + :raises CreateTransactionPermissionDenied: The provided token does not have permission to create a transaction on this dataset. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises FileNotFoundOnBranch: The requested file could not be found on the given branch, or the client token does not have access to it. + :raises FileNotFoundOnTransactionRange: The requested file could not be found on the given transaction range, or the client token does not have access to it. + :raises InvalidBranchId: The requested branch name cannot be used. Branch names cannot be empty and must not look like RIDs or UUIDs. + :raises InvalidParameterCombination: The given parameters are individually valid but cannot be used in the given combination. + :raises InvalidTransactionType: The given transaction type is not valid. Valid transaction types are `SNAPSHOT`, `UPDATE`, `APPEND`, and `DELETE`. + :raises OpenTransactionAlreadyExists: A transaction is already open on this dataset and branch. A branch of a dataset can only have one open transaction at a time. + :raises PutSchemaPermissionDenied: todo + :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. + :raises TransactionNotOpen: The given transaction is not open. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="DELETE", + resource_path="/v1/datasets/{datasetRid}/files/{filePath}", + query_params={ + "branchId": branch_id, + "transactionRid": transaction_rid, + }, + path_params={ + "datasetRid": dataset_rid, + "filePath": file_path, + }, + header_params={}, + body=None, + response_type=None, + request_timeout=request_timeout, + throwable_errors={ + "AbortTransactionPermissionDenied": datasets_errors.AbortTransactionPermissionDenied, + "BranchNotFound": datasets_errors.BranchNotFound, + "CommitTransactionPermissionDenied": datasets_errors.CommitTransactionPermissionDenied, + "CreateTransactionPermissionDenied": datasets_errors.CreateTransactionPermissionDenied, + "DatasetNotFound": datasets_errors.DatasetNotFound, + "FileNotFoundOnBranch": datasets_errors.FileNotFoundOnBranch, + "FileNotFoundOnTransactionRange": datasets_errors.FileNotFoundOnTransactionRange, + "InvalidBranchId": datasets_errors.InvalidBranchId, + "InvalidParameterCombination": core_errors.InvalidParameterCombination, + "InvalidTransactionType": datasets_errors.InvalidTransactionType, + "OpenTransactionAlreadyExists": datasets_errors.OpenTransactionAlreadyExists, + "PutSchemaPermissionDenied": datasets_errors.PutSchemaPermissionDenied, + "TransactionNotFound": datasets_errors.TransactionNotFound, + "TransactionNotOpen": datasets_errors.TransactionNotOpen, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + dataset_rid: datasets_models.DatasetRid, + file_path: core_models.FilePath, + *, + branch_id: typing.Optional[datasets_models.BranchId] = None, + end_transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, + start_transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[datasets_models.File]: + """ + Gets metadata about a File contained in a Dataset. By default this retrieves the file's metadata from the latest + view of the default branch - `master` for most enrollments. + + #### Advanced Usage + + See [Datasets Core Concepts](https://palantir.com/docs/foundry/data-integration/datasets/) for details on using branches and transactions. + + To **get a file's metadata from a specific Branch** specify the Branch's identifier as `branchId`. This will + retrieve metadata for the most recent version of the file since the latest snapshot transaction, or the earliest + ancestor transaction of the branch if there are no snapshot transactions. + + To **get a file's metadata from the resolved view of a transaction** specify the Transaction's resource identifier + as `endTransactionRid`. This will retrieve metadata for the most recent version of the file since the latest snapshot + transaction, or the earliest ancestor transaction if there are no snapshot transactions. + + To **get a file's metadata from the resolved view of a range of transactions** specify the the start transaction's + resource identifier as `startTransactionRid` and the end transaction's resource identifier as `endTransactionRid`. + This will retrieve metadata for the most recent version of the file since the `startTransactionRid` up to the + `endTransactionRid`. Behavior is undefined when the start and end transactions do not belong to the same root-to-leaf path. + + To **get a file's metadata from a specific transaction** specify the Transaction's resource identifier as both the + `startTransactionRid` and `endTransactionRid`. + + :param dataset_rid: The Resource Identifier (RID) of the Dataset that contains the File. + :type dataset_rid: DatasetRid + :param file_path: The File's path within the Dataset. + :type file_path: FilePath + :param branch_id: The identifier (name) of the Branch that contains the File. Defaults to `master` for most enrollments. + :type branch_id: Optional[BranchId] + :param end_transaction_rid: The Resource Identifier (RID) of the end Transaction. + :type end_transaction_rid: Optional[TransactionRid] + :param start_transaction_rid: The Resource Identifier (RID) of the start Transaction. + :type start_transaction_rid: Optional[TransactionRid] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[datasets_models.File] + + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises FileNotFoundOnBranch: The requested file could not be found on the given branch, or the client token does not have access to it. + :raises FileNotFoundOnTransactionRange: The requested file could not be found on the given transaction range, or the client token does not have access to it. + :raises InvalidBranchId: The requested branch name cannot be used. Branch names cannot be empty and must not look like RIDs or UUIDs. + :raises InvalidParameterCombination: The given parameters are individually valid but cannot be used in the given combination. + :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v1/datasets/{datasetRid}/files/{filePath}", + query_params={ + "branchId": branch_id, + "endTransactionRid": end_transaction_rid, + "startTransactionRid": start_transaction_rid, + }, + path_params={ + "datasetRid": dataset_rid, + "filePath": file_path, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=datasets_models.File, + request_timeout=request_timeout, + throwable_errors={ + "BranchNotFound": datasets_errors.BranchNotFound, + "DatasetNotFound": datasets_errors.DatasetNotFound, + "FileNotFoundOnBranch": datasets_errors.FileNotFoundOnBranch, + "FileNotFoundOnTransactionRange": datasets_errors.FileNotFoundOnTransactionRange, + "InvalidBranchId": datasets_errors.InvalidBranchId, + "InvalidParameterCombination": core_errors.InvalidParameterCombination, + "TransactionNotFound": datasets_errors.TransactionNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def list( + self, + dataset_rid: datasets_models.DatasetRid, + *, + branch_id: typing.Optional[datasets_models.BranchId] = None, + end_transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + start_transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.AsyncResourceIterator[datasets_models.File]: + """ + Lists Files contained in a Dataset. By default files are listed on the latest view of the default + branch - `master` for most enrollments. + + This endpoint currently does not support views (virtual datasets composed of other datasets). For more information, refer to the [views documentation](https://palantir.com/docs/foundry/data-integration/views). + + #### Advanced Usage + + See [Datasets Core Concepts](https://palantir.com/docs/foundry/data-integration/datasets/) for details on using branches and transactions. + + To **list files on a specific Branch** specify the Branch's identifier as `branchId`. This will include the most + recent version of all files since the latest snapshot transaction, or the earliest ancestor transaction of the + branch if there are no snapshot transactions. + + To **list files on the resolved view of a transaction** specify the Transaction's resource identifier + as `endTransactionRid`. This will include the most recent version of all files since the latest snapshot + transaction, or the earliest ancestor transaction if there are no snapshot transactions. + + To **list files on the resolved view of a range of transactions** specify the the start transaction's resource + identifier as `startTransactionRid` and the end transaction's resource identifier as `endTransactionRid`. This + will include the most recent version of all files since the `startTransactionRid` up to the `endTransactionRid`. + Note that an intermediate snapshot transaction will remove all files from the view. Behavior is undefined when + the start and end transactions do not belong to the same root-to-leaf path. + + To **list files on a specific transaction** specify the Transaction's resource identifier as both the + `startTransactionRid` and `endTransactionRid`. This will include only files that were modified as part of that + Transaction. + + :param dataset_rid: The Resource Identifier (RID) of the Dataset on which to list Files. + :type dataset_rid: DatasetRid + :param branch_id: The identifier (name) of the Branch on which to list Files. Defaults to `master` for most enrollments. + :type branch_id: Optional[BranchId] + :param end_transaction_rid: The Resource Identifier (RID) of the end Transaction. + :type end_transaction_rid: Optional[TransactionRid] + :param page_size: The desired size of the page to be returned. Defaults to 1,000. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. + :type page_size: Optional[PageSize] + :param page_token: + :type page_token: Optional[PageToken] + :param start_transaction_rid: The Resource Identifier (RID) of the start Transaction. + :type start_transaction_rid: Optional[TransactionRid] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.AsyncResourceIterator[datasets_models.File] + + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises InvalidBranchId: The requested branch name cannot be used. Branch names cannot be empty and must not look like RIDs or UUIDs. + :raises InvalidParameterCombination: The given parameters are individually valid but cannot be used in the given combination. + :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v1/datasets/{datasetRid}/files", + query_params={ + "branchId": branch_id, + "endTransactionRid": end_transaction_rid, + "pageSize": page_size, + "pageToken": page_token, + "startTransactionRid": start_transaction_rid, + }, + path_params={ + "datasetRid": dataset_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=datasets_models.ListFilesResponse, + request_timeout=request_timeout, + throwable_errors={ + "BranchNotFound": datasets_errors.BranchNotFound, + "DatasetNotFound": datasets_errors.DatasetNotFound, + "InvalidBranchId": datasets_errors.InvalidBranchId, + "InvalidParameterCombination": core_errors.InvalidParameterCombination, + "TransactionNotFound": datasets_errors.TransactionNotFound, + }, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def read( + self, + dataset_rid: datasets_models.DatasetRid, + file_path: core_models.FilePath, + *, + branch_id: typing.Optional[datasets_models.BranchId] = None, + end_transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, + start_transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[bytes]: + """ + Gets the content of a File contained in a Dataset. By default this retrieves the file's content from the latest + view of the default branch - `master` for most enrollments. + + This endpoint currently does not support views (virtual datasets composed of other datasets). For more information, refer to the [views documentation](https://palantir.com/docs/foundry/data-integration/views). + + #### Advanced Usage + + See [Datasets Core Concepts](https://palantir.com/docs/foundry/data-integration/datasets/) for details on using branches and transactions. + + To **get a file's content from a specific Branch** specify the Branch's identifier as `branchId`. This will + retrieve the content for the most recent version of the file since the latest snapshot transaction, or the + earliest ancestor transaction of the branch if there are no snapshot transactions. + + To **get a file's content from the resolved view of a transaction** specify the Transaction's resource identifier + as `endTransactionRid`. This will retrieve the content for the most recent version of the file since the latest + snapshot transaction, or the earliest ancestor transaction if there are no snapshot transactions. + + To **get a file's content from the resolved view of a range of transactions** specify the the start transaction's + resource identifier as `startTransactionRid` and the end transaction's resource identifier as `endTransactionRid`. + This will retrieve the content for the most recent version of the file since the `startTransactionRid` up to the + `endTransactionRid`. Note that an intermediate snapshot transaction will remove all files from the view. Behavior + is undefined when the start and end transactions do not belong to the same root-to-leaf path. + + To **get a file's content from a specific transaction** specify the Transaction's resource identifier as both the + `startTransactionRid` and `endTransactionRid`. + + :param dataset_rid: The Resource Identifier (RID) of the Dataset that contains the File. + :type dataset_rid: DatasetRid + :param file_path: The File's path within the Dataset. + :type file_path: FilePath + :param branch_id: The identifier (name) of the Branch that contains the File. Defaults to `master` for most enrollments. + :type branch_id: Optional[BranchId] + :param end_transaction_rid: The Resource Identifier (RID) of the end Transaction. + :type end_transaction_rid: Optional[TransactionRid] + :param start_transaction_rid: The Resource Identifier (RID) of the start Transaction. + :type start_transaction_rid: Optional[TransactionRid] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[bytes] + + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises FileNotFoundOnBranch: The requested file could not be found on the given branch, or the client token does not have access to it. + :raises FileNotFoundOnTransactionRange: The requested file could not be found on the given transaction range, or the client token does not have access to it. + :raises InvalidBranchId: The requested branch name cannot be used. Branch names cannot be empty and must not look like RIDs or UUIDs. + :raises InvalidParameterCombination: The given parameters are individually valid but cannot be used in the given combination. + :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v1/datasets/{datasetRid}/files/{filePath}/content", + query_params={ + "branchId": branch_id, + "endTransactionRid": end_transaction_rid, + "startTransactionRid": start_transaction_rid, + }, + path_params={ + "datasetRid": dataset_rid, + "filePath": file_path, + }, + header_params={ + "Accept": "*/*", + }, + body=None, + response_type=bytes, + request_timeout=request_timeout, + throwable_errors={ + "BranchNotFound": datasets_errors.BranchNotFound, + "DatasetNotFound": datasets_errors.DatasetNotFound, + "FileNotFoundOnBranch": datasets_errors.FileNotFoundOnBranch, + "FileNotFoundOnTransactionRange": datasets_errors.FileNotFoundOnTransactionRange, + "InvalidBranchId": datasets_errors.InvalidBranchId, + "InvalidParameterCombination": core_errors.InvalidParameterCombination, + "TransactionNotFound": datasets_errors.TransactionNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def upload( + self, + dataset_rid: datasets_models.DatasetRid, + body: bytes, + *, + file_path: core_models.FilePath, + branch_id: typing.Optional[datasets_models.BranchId] = None, + transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, + transaction_type: typing.Optional[datasets_models.TransactionType] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[datasets_models.File]: + """ + Uploads a File to an existing Dataset. + The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`. + + By default the file is uploaded to a new transaction on the default branch - `master` for most enrollments. + If the file already exists only the most recent version will be visible in the updated view. + + #### Advanced Usage + + See [Datasets Core Concepts](https://palantir.com/docs/foundry/data-integration/datasets/) for details on using branches and transactions. + + To **upload a file to a specific Branch** specify the Branch's identifier as `branchId`. A new transaction will + be created and committed on this branch. By default the TransactionType will be `UPDATE`, to override this + default specify `transactionType` in addition to `branchId`. + See [createBranch](https://palantir.com/docs/foundry/api/datasets-resources/branches/create-branch/) to create a custom branch. + + To **upload a file on a manually opened transaction** specify the Transaction's resource identifier as + `transactionRid`. This is useful for uploading multiple files in a single transaction. + See [createTransaction](https://palantir.com/docs/foundry/api/datasets-resources/transactions/create-transaction/) to open a transaction. + + :param dataset_rid: The Resource Identifier (RID) of the Dataset on which to upload the File. + :type dataset_rid: DatasetRid + :param body: Body of the request + :type body: bytes + :param file_path: The File's path within the Dataset. + :type file_path: FilePath + :param branch_id: The identifier (name) of the Branch on which to upload the File. Defaults to `master` for most enrollments. + :type branch_id: Optional[BranchId] + :param transaction_rid: The Resource Identifier (RID) of the open Transaction on which to upload the File. + :type transaction_rid: Optional[TransactionRid] + :param transaction_type: The type of the Transaction to create when using branchId. Defaults to `UPDATE`. + :type transaction_type: Optional[TransactionType] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[datasets_models.File] + + :raises AbortTransactionPermissionDenied: The provided token does not have permission to abort the given transaction on the given dataset. + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises CommitTransactionPermissionDenied: The provided token does not have permission to commit the given transaction on the given dataset. + :raises CreateTransactionPermissionDenied: The provided token does not have permission to create a transaction on this dataset. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises FileAlreadyExists: The given file path already exists in the dataset and transaction. + :raises InvalidBranchId: The requested branch name cannot be used. Branch names cannot be empty and must not look like RIDs or UUIDs. + :raises InvalidFilePath: The provided file path is not valid. + :raises InvalidParameterCombination: The given parameters are individually valid but cannot be used in the given combination. + :raises OpenTransactionAlreadyExists: A transaction is already open on this dataset and branch. A branch of a dataset can only have one open transaction at a time. + :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. + :raises TransactionNotOpen: The given transaction is not open. + :raises UploadFilePermissionDenied: The provided token does not have permission to upload the given file to the given dataset and transaction. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v1/datasets/{datasetRid}/files:upload", + query_params={ + "filePath": file_path, + "branchId": branch_id, + "transactionRid": transaction_rid, + "transactionType": transaction_type, + }, + path_params={ + "datasetRid": dataset_rid, + }, + header_params={ + "Content-Type": "*/*", + "Accept": "application/json", + }, + body=body, + response_type=datasets_models.File, + request_timeout=request_timeout, + throwable_errors={ + "AbortTransactionPermissionDenied": datasets_errors.AbortTransactionPermissionDenied, + "BranchNotFound": datasets_errors.BranchNotFound, + "CommitTransactionPermissionDenied": datasets_errors.CommitTransactionPermissionDenied, + "CreateTransactionPermissionDenied": datasets_errors.CreateTransactionPermissionDenied, + "DatasetNotFound": datasets_errors.DatasetNotFound, + "FileAlreadyExists": datasets_errors.FileAlreadyExists, + "InvalidBranchId": datasets_errors.InvalidBranchId, + "InvalidFilePath": core_errors.InvalidFilePath, + "InvalidParameterCombination": core_errors.InvalidParameterCombination, + "OpenTransactionAlreadyExists": datasets_errors.OpenTransactionAlreadyExists, + "TransactionNotFound": datasets_errors.TransactionNotFound, + "TransactionNotOpen": datasets_errors.TransactionNotOpen, + "UploadFilePermissionDenied": datasets_errors.UploadFilePermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _AsyncFileClientRaw: + def __init__(self, client: AsyncFileClient) -> None: + def delete(_: None): ... + def get(_: datasets_models.File): ... + def list(_: datasets_models.ListFilesResponse): ... + def read(_: bytes): ... + def upload(_: datasets_models.File): ... + + self.delete = core.async_with_raw_response(delete, client.delete) + self.get = core.async_with_raw_response(get, client.get) + self.list = core.async_with_raw_response(list, client.list) + self.read = core.async_with_raw_response(read, client.read) + self.upload = core.async_with_raw_response(upload, client.upload) + + +class _AsyncFileClientStreaming: + def __init__(self, client: AsyncFileClient) -> None: + def get(_: datasets_models.File): ... + def list(_: datasets_models.ListFilesResponse): ... + def read(_: bytes): ... + def upload(_: datasets_models.File): ... + + self.get = core.async_with_streaming_response(get, client.get) + self.list = core.async_with_streaming_response(list, client.list) + self.read = core.async_with_streaming_response(read, client.read) + self.upload = core.async_with_streaming_response(upload, client.upload) diff --git a/foundry_sdk/v1/datasets/models.py b/foundry_sdk/v1/datasets/models.py new file mode 100644 index 000000000..f62556c9d --- /dev/null +++ b/foundry_sdk/v1/datasets/models.py @@ -0,0 +1,143 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +from __future__ import annotations + +import typing + +import pydantic + +from foundry_sdk import _core as core +from foundry_sdk.v1.core import models as core_models + + +class Branch(core.ModelBase): + """A Branch of a Dataset.""" + + branch_id: BranchId = pydantic.Field(alias=str("branchId")) # type: ignore[literal-required] + transaction_rid: typing.Optional[TransactionRid] = pydantic.Field(alias=str("transactionRid"), default=None) # type: ignore[literal-required] + + +BranchId = str +"""The identifier (name) of a Branch.""" + + +class CreateBranchRequest(core.ModelBase): + """CreateBranchRequest""" + + branch_id: BranchId = pydantic.Field(alias=str("branchId")) # type: ignore[literal-required] + transaction_rid: typing.Optional[TransactionRid] = pydantic.Field(alias=str("transactionRid"), default=None) # type: ignore[literal-required] + + +class CreateDatasetRequest(core.ModelBase): + """CreateDatasetRequest""" + + name: DatasetName + parent_folder_rid: core_models.FolderRid = pydantic.Field(alias=str("parentFolderRid")) # type: ignore[literal-required] + + +class CreateTransactionRequest(core.ModelBase): + """CreateTransactionRequest""" + + transaction_type: typing.Optional[TransactionType] = pydantic.Field(alias=str("transactionType"), default=None) # type: ignore[literal-required] + + +class Dataset(core.ModelBase): + """Dataset""" + + rid: DatasetRid + name: DatasetName + parent_folder_rid: core_models.FolderRid = pydantic.Field(alias=str("parentFolderRid")) # type: ignore[literal-required] + + +DatasetName = str +"""DatasetName""" + + +DatasetRid = core.RID +"""The Resource Identifier (RID) of a Dataset.""" + + +class File(core.ModelBase): + """File""" + + path: core_models.FilePath + transaction_rid: TransactionRid = pydantic.Field(alias=str("transactionRid")) # type: ignore[literal-required] + size_bytes: typing.Optional[core.Long] = pydantic.Field(alias=str("sizeBytes"), default=None) # type: ignore[literal-required] + updated_time: core.AwareDatetime = pydantic.Field(alias=str("updatedTime")) # type: ignore[literal-required] + + +class ListBranchesResponse(core.ModelBase): + """ListBranchesResponse""" + + next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] + data: typing.List[Branch] + """The list of branches in the current page.""" + + +class ListFilesResponse(core.ModelBase): + """A page of Files and an optional page token that can be used to retrieve the next page.""" + + next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] + data: typing.List[File] + + +TableExportFormat = typing.Literal["ARROW", "CSV"] +"""Format for tabular dataset export.""" + + +class Transaction(core.ModelBase): + """An operation that modifies the files within a dataset.""" + + rid: TransactionRid + transaction_type: TransactionType = pydantic.Field(alias=str("transactionType")) # type: ignore[literal-required] + status: TransactionStatus + created_time: core.AwareDatetime = pydantic.Field(alias=str("createdTime")) # type: ignore[literal-required] + """The timestamp when the transaction was created, in ISO 8601 timestamp format.""" + + closed_time: typing.Optional[core.AwareDatetime] = pydantic.Field(alias=str("closedTime"), default=None) # type: ignore[literal-required] + """The timestamp when the transaction was closed, in ISO 8601 timestamp format.""" + + +TransactionRid = core.RID +"""The Resource Identifier (RID) of a Transaction.""" + + +TransactionStatus = typing.Literal["ABORTED", "COMMITTED", "OPEN"] +"""The status of a Transaction.""" + + +TransactionType = typing.Literal["APPEND", "UPDATE", "SNAPSHOT", "DELETE"] +"""The type of a Transaction.""" + + +__all__ = [ + "Branch", + "BranchId", + "CreateBranchRequest", + "CreateDatasetRequest", + "CreateTransactionRequest", + "Dataset", + "DatasetName", + "DatasetRid", + "File", + "ListBranchesResponse", + "ListFilesResponse", + "TableExportFormat", + "Transaction", + "TransactionRid", + "TransactionStatus", + "TransactionType", +] diff --git a/foundry_sdk/v1/datasets/transaction.py b/foundry_sdk/v1/datasets/transaction.py new file mode 100644 index 000000000..1ebae8648 --- /dev/null +++ b/foundry_sdk/v1/datasets/transaction.py @@ -0,0 +1,570 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v1.datasets import errors as datasets_errors +from foundry_sdk.v1.datasets import models as datasets_models + + +class TransactionClient: + """ + The API client for the Transaction Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _TransactionClientStreaming(self) + self.with_raw_response = _TransactionClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def abort( + self, + dataset_rid: datasets_models.DatasetRid, + transaction_rid: datasets_models.TransactionRid, + *, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> datasets_models.Transaction: + """ + Aborts an open Transaction. File modifications made on this Transaction are not preserved and the Branch is + not updated. + + :param dataset_rid: The Resource Identifier (RID) of the Dataset that contains the Transaction. + :type dataset_rid: DatasetRid + :param transaction_rid: The Resource Identifier (RID) of the Transaction. + :type transaction_rid: TransactionRid + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: datasets_models.Transaction + + :raises AbortTransactionPermissionDenied: The provided token does not have permission to abort the given transaction on the given dataset. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. + :raises TransactionNotOpen: The given transaction is not open. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v1/datasets/{datasetRid}/transactions/{transactionRid}/abort", + query_params={}, + path_params={ + "datasetRid": dataset_rid, + "transactionRid": transaction_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=datasets_models.Transaction, + request_timeout=request_timeout, + throwable_errors={ + "AbortTransactionPermissionDenied": datasets_errors.AbortTransactionPermissionDenied, + "DatasetNotFound": datasets_errors.DatasetNotFound, + "TransactionNotFound": datasets_errors.TransactionNotFound, + "TransactionNotOpen": datasets_errors.TransactionNotOpen, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def commit( + self, + dataset_rid: datasets_models.DatasetRid, + transaction_rid: datasets_models.TransactionRid, + *, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> datasets_models.Transaction: + """ + Commits an open Transaction. File modifications made on this Transaction are preserved and the Branch is + updated to point to the Transaction. + + :param dataset_rid: The Resource Identifier (RID) of the Dataset that contains the Transaction. + :type dataset_rid: DatasetRid + :param transaction_rid: The Resource Identifier (RID) of the Transaction. + :type transaction_rid: TransactionRid + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: datasets_models.Transaction + + :raises CommitTransactionPermissionDenied: The provided token does not have permission to commit the given transaction on the given dataset. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. + :raises TransactionNotOpen: The given transaction is not open. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v1/datasets/{datasetRid}/transactions/{transactionRid}/commit", + query_params={}, + path_params={ + "datasetRid": dataset_rid, + "transactionRid": transaction_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=datasets_models.Transaction, + request_timeout=request_timeout, + throwable_errors={ + "CommitTransactionPermissionDenied": datasets_errors.CommitTransactionPermissionDenied, + "DatasetNotFound": datasets_errors.DatasetNotFound, + "TransactionNotFound": datasets_errors.TransactionNotFound, + "TransactionNotOpen": datasets_errors.TransactionNotOpen, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def create( + self, + dataset_rid: datasets_models.DatasetRid, + *, + branch_id: typing.Optional[datasets_models.BranchId] = None, + transaction_type: typing.Optional[datasets_models.TransactionType] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> datasets_models.Transaction: + """ + Creates a Transaction on a Branch of a Dataset. + + :param dataset_rid: The Resource Identifier (RID) of the Dataset on which to create the Transaction. + :type dataset_rid: DatasetRid + :param branch_id: The identifier (name) of the Branch on which to create the Transaction. Defaults to `master` for most enrollments. + :type branch_id: Optional[BranchId] + :param transaction_type: + :type transaction_type: Optional[TransactionType] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: datasets_models.Transaction + + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises CreateTransactionPermissionDenied: The provided token does not have permission to create a transaction on this dataset. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises InvalidBranchId: The requested branch name cannot be used. Branch names cannot be empty and must not look like RIDs or UUIDs. + :raises OpenTransactionAlreadyExists: A transaction is already open on this dataset and branch. A branch of a dataset can only have one open transaction at a time. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v1/datasets/{datasetRid}/transactions", + query_params={ + "branchId": branch_id, + }, + path_params={ + "datasetRid": dataset_rid, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=datasets_models.CreateTransactionRequest( + transaction_type=transaction_type, + ), + response_type=datasets_models.Transaction, + request_timeout=request_timeout, + throwable_errors={ + "BranchNotFound": datasets_errors.BranchNotFound, + "CreateTransactionPermissionDenied": datasets_errors.CreateTransactionPermissionDenied, + "DatasetNotFound": datasets_errors.DatasetNotFound, + "InvalidBranchId": datasets_errors.InvalidBranchId, + "OpenTransactionAlreadyExists": datasets_errors.OpenTransactionAlreadyExists, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + dataset_rid: datasets_models.DatasetRid, + transaction_rid: datasets_models.TransactionRid, + *, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> datasets_models.Transaction: + """ + Gets a Transaction of a Dataset. + + :param dataset_rid: The Resource Identifier (RID) of the Dataset that contains the Transaction. + :type dataset_rid: DatasetRid + :param transaction_rid: The Resource Identifier (RID) of the Transaction. + :type transaction_rid: TransactionRid + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: datasets_models.Transaction + + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v1/datasets/{datasetRid}/transactions/{transactionRid}", + query_params={}, + path_params={ + "datasetRid": dataset_rid, + "transactionRid": transaction_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=datasets_models.Transaction, + request_timeout=request_timeout, + throwable_errors={ + "DatasetNotFound": datasets_errors.DatasetNotFound, + "TransactionNotFound": datasets_errors.TransactionNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _TransactionClientRaw: + def __init__(self, client: TransactionClient) -> None: + def abort(_: datasets_models.Transaction): ... + def commit(_: datasets_models.Transaction): ... + def create(_: datasets_models.Transaction): ... + def get(_: datasets_models.Transaction): ... + + self.abort = core.with_raw_response(abort, client.abort) + self.commit = core.with_raw_response(commit, client.commit) + self.create = core.with_raw_response(create, client.create) + self.get = core.with_raw_response(get, client.get) + + +class _TransactionClientStreaming: + def __init__(self, client: TransactionClient) -> None: + def abort(_: datasets_models.Transaction): ... + def commit(_: datasets_models.Transaction): ... + def create(_: datasets_models.Transaction): ... + def get(_: datasets_models.Transaction): ... + + self.abort = core.with_streaming_response(abort, client.abort) + self.commit = core.with_streaming_response(commit, client.commit) + self.create = core.with_streaming_response(create, client.create) + self.get = core.with_streaming_response(get, client.get) + + +class AsyncTransactionClient: + """ + The API client for the Transaction Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncTransactionClientStreaming(self) + self.with_raw_response = _AsyncTransactionClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def abort( + self, + dataset_rid: datasets_models.DatasetRid, + transaction_rid: datasets_models.TransactionRid, + *, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[datasets_models.Transaction]: + """ + Aborts an open Transaction. File modifications made on this Transaction are not preserved and the Branch is + not updated. + + :param dataset_rid: The Resource Identifier (RID) of the Dataset that contains the Transaction. + :type dataset_rid: DatasetRid + :param transaction_rid: The Resource Identifier (RID) of the Transaction. + :type transaction_rid: TransactionRid + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[datasets_models.Transaction] + + :raises AbortTransactionPermissionDenied: The provided token does not have permission to abort the given transaction on the given dataset. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. + :raises TransactionNotOpen: The given transaction is not open. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v1/datasets/{datasetRid}/transactions/{transactionRid}/abort", + query_params={}, + path_params={ + "datasetRid": dataset_rid, + "transactionRid": transaction_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=datasets_models.Transaction, + request_timeout=request_timeout, + throwable_errors={ + "AbortTransactionPermissionDenied": datasets_errors.AbortTransactionPermissionDenied, + "DatasetNotFound": datasets_errors.DatasetNotFound, + "TransactionNotFound": datasets_errors.TransactionNotFound, + "TransactionNotOpen": datasets_errors.TransactionNotOpen, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def commit( + self, + dataset_rid: datasets_models.DatasetRid, + transaction_rid: datasets_models.TransactionRid, + *, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[datasets_models.Transaction]: + """ + Commits an open Transaction. File modifications made on this Transaction are preserved and the Branch is + updated to point to the Transaction. + + :param dataset_rid: The Resource Identifier (RID) of the Dataset that contains the Transaction. + :type dataset_rid: DatasetRid + :param transaction_rid: The Resource Identifier (RID) of the Transaction. + :type transaction_rid: TransactionRid + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[datasets_models.Transaction] + + :raises CommitTransactionPermissionDenied: The provided token does not have permission to commit the given transaction on the given dataset. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. + :raises TransactionNotOpen: The given transaction is not open. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v1/datasets/{datasetRid}/transactions/{transactionRid}/commit", + query_params={}, + path_params={ + "datasetRid": dataset_rid, + "transactionRid": transaction_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=datasets_models.Transaction, + request_timeout=request_timeout, + throwable_errors={ + "CommitTransactionPermissionDenied": datasets_errors.CommitTransactionPermissionDenied, + "DatasetNotFound": datasets_errors.DatasetNotFound, + "TransactionNotFound": datasets_errors.TransactionNotFound, + "TransactionNotOpen": datasets_errors.TransactionNotOpen, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def create( + self, + dataset_rid: datasets_models.DatasetRid, + *, + branch_id: typing.Optional[datasets_models.BranchId] = None, + transaction_type: typing.Optional[datasets_models.TransactionType] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[datasets_models.Transaction]: + """ + Creates a Transaction on a Branch of a Dataset. + + :param dataset_rid: The Resource Identifier (RID) of the Dataset on which to create the Transaction. + :type dataset_rid: DatasetRid + :param branch_id: The identifier (name) of the Branch on which to create the Transaction. Defaults to `master` for most enrollments. + :type branch_id: Optional[BranchId] + :param transaction_type: + :type transaction_type: Optional[TransactionType] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[datasets_models.Transaction] + + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises CreateTransactionPermissionDenied: The provided token does not have permission to create a transaction on this dataset. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises InvalidBranchId: The requested branch name cannot be used. Branch names cannot be empty and must not look like RIDs or UUIDs. + :raises OpenTransactionAlreadyExists: A transaction is already open on this dataset and branch. A branch of a dataset can only have one open transaction at a time. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v1/datasets/{datasetRid}/transactions", + query_params={ + "branchId": branch_id, + }, + path_params={ + "datasetRid": dataset_rid, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=datasets_models.CreateTransactionRequest( + transaction_type=transaction_type, + ), + response_type=datasets_models.Transaction, + request_timeout=request_timeout, + throwable_errors={ + "BranchNotFound": datasets_errors.BranchNotFound, + "CreateTransactionPermissionDenied": datasets_errors.CreateTransactionPermissionDenied, + "DatasetNotFound": datasets_errors.DatasetNotFound, + "InvalidBranchId": datasets_errors.InvalidBranchId, + "OpenTransactionAlreadyExists": datasets_errors.OpenTransactionAlreadyExists, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + dataset_rid: datasets_models.DatasetRid, + transaction_rid: datasets_models.TransactionRid, + *, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[datasets_models.Transaction]: + """ + Gets a Transaction of a Dataset. + + :param dataset_rid: The Resource Identifier (RID) of the Dataset that contains the Transaction. + :type dataset_rid: DatasetRid + :param transaction_rid: The Resource Identifier (RID) of the Transaction. + :type transaction_rid: TransactionRid + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[datasets_models.Transaction] + + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v1/datasets/{datasetRid}/transactions/{transactionRid}", + query_params={}, + path_params={ + "datasetRid": dataset_rid, + "transactionRid": transaction_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=datasets_models.Transaction, + request_timeout=request_timeout, + throwable_errors={ + "DatasetNotFound": datasets_errors.DatasetNotFound, + "TransactionNotFound": datasets_errors.TransactionNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _AsyncTransactionClientRaw: + def __init__(self, client: AsyncTransactionClient) -> None: + def abort(_: datasets_models.Transaction): ... + def commit(_: datasets_models.Transaction): ... + def create(_: datasets_models.Transaction): ... + def get(_: datasets_models.Transaction): ... + + self.abort = core.async_with_raw_response(abort, client.abort) + self.commit = core.async_with_raw_response(commit, client.commit) + self.create = core.async_with_raw_response(create, client.create) + self.get = core.async_with_raw_response(get, client.get) + + +class _AsyncTransactionClientStreaming: + def __init__(self, client: AsyncTransactionClient) -> None: + def abort(_: datasets_models.Transaction): ... + def commit(_: datasets_models.Transaction): ... + def create(_: datasets_models.Transaction): ... + def get(_: datasets_models.Transaction): ... + + self.abort = core.async_with_streaming_response(abort, client.abort) + self.commit = core.async_with_streaming_response(commit, client.commit) + self.create = core.async_with_streaming_response(create, client.create) + self.get = core.async_with_streaming_response(get, client.get) diff --git a/foundry_sdk/v1/geo/errors.py b/foundry_sdk/v1/geo/errors.py new file mode 100644 index 000000000..6dd5770ff --- /dev/null +++ b/foundry_sdk/v1/geo/errors.py @@ -0,0 +1,16 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +__all__ = [] diff --git a/foundry_sdk/v1/geo/models.py b/foundry_sdk/v1/geo/models.py new file mode 100644 index 000000000..0c61c653d --- /dev/null +++ b/foundry_sdk/v1/geo/models.py @@ -0,0 +1,22 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +from __future__ import annotations + +import pydantic + +from foundry_sdk import _core as core + +__all__ = [] diff --git a/foundry_sdk/v1/ontologies/__init__.py b/foundry_sdk/v1/ontologies/__init__.py new file mode 100644 index 000000000..ad35b87de --- /dev/null +++ b/foundry_sdk/v1/ontologies/__init__.py @@ -0,0 +1,22 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +from foundry_sdk.v1.ontologies._client import AsyncOntologiesClient +from foundry_sdk.v1.ontologies._client import OntologiesClient + +__all__ = [ + "OntologiesClient", + "AsyncOntologiesClient", +] diff --git a/foundry_sdk/v1/ontologies/_client.py b/foundry_sdk/v1/ontologies/_client.py new file mode 100644 index 000000000..6537b4998 --- /dev/null +++ b/foundry_sdk/v1/ontologies/_client.py @@ -0,0 +1,121 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing +from functools import cached_property + +from foundry_sdk import _core as core + + +class OntologiesClient: + """ + The API client for the Ontologies Namespace. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + + @cached_property + def Action(self): + from foundry_sdk.v1.ontologies.action import ActionClient + + return ActionClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @cached_property + def Attachment(self): + from foundry_sdk.v1.ontologies.attachment import AttachmentClient + + return AttachmentClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @cached_property + def Ontology(self): + from foundry_sdk.v1.ontologies.ontology import OntologyClient + + return OntologyClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @cached_property + def OntologyObject(self): + from foundry_sdk.v1.ontologies.ontology_object import OntologyObjectClient + + return OntologyObjectClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @cached_property + def Query(self): + from foundry_sdk.v1.ontologies.query import QueryClient + + return QueryClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + +class AsyncOntologiesClient: + """ + The Async API client for the Ontologies Namespace. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + from foundry_sdk.v1.ontologies.action import AsyncActionClient + from foundry_sdk.v1.ontologies.attachment import AsyncAttachmentClient + from foundry_sdk.v1.ontologies.ontology import AsyncOntologyClient + from foundry_sdk.v1.ontologies.ontology_object import AsyncOntologyObjectClient + from foundry_sdk.v1.ontologies.query import AsyncQueryClient + + self.Action = AsyncActionClient(auth=auth, hostname=hostname, config=config) + + self.Attachment = AsyncAttachmentClient(auth=auth, hostname=hostname, config=config) + + self.Ontology = AsyncOntologyClient(auth=auth, hostname=hostname, config=config) + + self.OntologyObject = AsyncOntologyObjectClient(auth=auth, hostname=hostname, config=config) + + self.Query = AsyncQueryClient(auth=auth, hostname=hostname, config=config) diff --git a/foundry_sdk/v1/ontologies/action.py b/foundry_sdk/v1/ontologies/action.py new file mode 100644 index 000000000..5ed74831f --- /dev/null +++ b/foundry_sdk/v1/ontologies/action.py @@ -0,0 +1,463 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v1.ontologies import models as ontologies_models + + +class ActionClient: + """ + The API client for the Action Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _ActionClientStreaming(self) + self.with_raw_response = _ActionClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def apply( + self, + ontology_rid: ontologies_models.OntologyRid, + action_type: ontologies_models.ActionTypeApiName, + *, + parameters: typing.Dict[ + ontologies_models.ParameterId, typing.Optional[ontologies_models.DataValue] + ], + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> ontologies_models.ApplyActionResponse: + """ + Applies an action using the given parameters. + + Changes to objects or links stored in Object Storage V1 are eventually consistent and may take some time to be visible. + Edits to objects or links in Object Storage V2 will be visible immediately after the action completes. + + Note that [parameter default values](https://palantir.com/docs/foundry/action-types/parameters-default-value/) are not currently supported by + this endpoint. + + :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the action. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. + :type ontology_rid: OntologyRid + :param action_type: The API name of the action to apply. To find the API name for your action, use the **List action types** endpoint or check the **Ontology Manager**. + :type action_type: ActionTypeApiName + :param parameters: + :type parameters: Dict[ParameterId, Optional[DataValue]] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: ontologies_models.ApplyActionResponse + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v1/ontologies/{ontologyRid}/actions/{actionType}/apply", + query_params={}, + path_params={ + "ontologyRid": ontology_rid, + "actionType": action_type, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=ontologies_models.ApplyActionRequest( + parameters=parameters, + ), + response_type=ontologies_models.ApplyActionResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def apply_batch( + self, + ontology_rid: ontologies_models.OntologyRid, + action_type: ontologies_models.ActionTypeApiName, + *, + requests: typing.List[ontologies_models.ApplyActionRequest], + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> ontologies_models.BatchApplyActionResponse: + """ + Applies multiple actions (of the same Action Type) using the given parameters. + Changes to objects or links stored in Object Storage V1 are eventually consistent and may take some time to be visible. + Edits to objects or links in Object Storage V2 will be visible immediately after the action completes. + + Up to 20 actions may be applied in one call. Actions that only modify objects in Object Storage v2 and do not + call Functions may receive a higher limit. + + Note that [parameter default values](https://palantir.com/docs/foundry/action-types/parameters-default-value/) and + [notifications](https://palantir.com/docs/foundry/action-types/notifications/) are not currently supported by this endpoint. + + :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the action. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. + :type ontology_rid: OntologyRid + :param action_type: The API name of the action to apply. To find the API name for your action, use the **List action types** endpoint or check the **Ontology Manager**. + :type action_type: ActionTypeApiName + :param requests: + :type requests: List[ApplyActionRequest] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: ontologies_models.BatchApplyActionResponse + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v1/ontologies/{ontologyRid}/actions/{actionType}/applyBatch", + query_params={}, + path_params={ + "ontologyRid": ontology_rid, + "actionType": action_type, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=ontologies_models.BatchApplyActionRequest( + requests=requests, + ), + response_type=ontologies_models.BatchApplyActionResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def validate( + self, + ontology_rid: ontologies_models.OntologyRid, + action_type: ontologies_models.ActionTypeApiName, + *, + parameters: typing.Dict[ + ontologies_models.ParameterId, typing.Optional[ontologies_models.DataValue] + ], + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> ontologies_models.ValidateActionResponse: + """ + Validates if an action can be run with the given set of parameters. + The response contains the evaluation of parameters and **submission criteria** + that determine if the request is `VALID` or `INVALID`. + For performance reasons, validations will not consider existing objects or other data in Foundry. + For example, the uniqueness of a primary key or the existence of a user ID will not be checked. + Note that [parameter default values](https://palantir.com/docs/foundry/action-types/parameters-default-value/) are not currently supported by + this endpoint. Unspecified parameters will be given a default value of `null`. + + :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the action. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. + :type ontology_rid: OntologyRid + :param action_type: The API name of the action to validate. To find the API name for your action, use the **List action types** endpoint or check the **Ontology Manager**. + :type action_type: ActionTypeApiName + :param parameters: + :type parameters: Dict[ParameterId, Optional[DataValue]] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: ontologies_models.ValidateActionResponse + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v1/ontologies/{ontologyRid}/actions/{actionType}/validate", + query_params={}, + path_params={ + "ontologyRid": ontology_rid, + "actionType": action_type, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=ontologies_models.ValidateActionRequest( + parameters=parameters, + ), + response_type=ontologies_models.ValidateActionResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _ActionClientRaw: + def __init__(self, client: ActionClient) -> None: + def apply(_: ontologies_models.ApplyActionResponse): ... + def apply_batch(_: ontologies_models.BatchApplyActionResponse): ... + def validate(_: ontologies_models.ValidateActionResponse): ... + + self.apply = core.with_raw_response(apply, client.apply) + self.apply_batch = core.with_raw_response(apply_batch, client.apply_batch) + self.validate = core.with_raw_response(validate, client.validate) + + +class _ActionClientStreaming: + def __init__(self, client: ActionClient) -> None: + def apply(_: ontologies_models.ApplyActionResponse): ... + def apply_batch(_: ontologies_models.BatchApplyActionResponse): ... + def validate(_: ontologies_models.ValidateActionResponse): ... + + self.apply = core.with_streaming_response(apply, client.apply) + self.apply_batch = core.with_streaming_response(apply_batch, client.apply_batch) + self.validate = core.with_streaming_response(validate, client.validate) + + +class AsyncActionClient: + """ + The API client for the Action Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncActionClientStreaming(self) + self.with_raw_response = _AsyncActionClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def apply( + self, + ontology_rid: ontologies_models.OntologyRid, + action_type: ontologies_models.ActionTypeApiName, + *, + parameters: typing.Dict[ + ontologies_models.ParameterId, typing.Optional[ontologies_models.DataValue] + ], + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[ontologies_models.ApplyActionResponse]: + """ + Applies an action using the given parameters. + + Changes to objects or links stored in Object Storage V1 are eventually consistent and may take some time to be visible. + Edits to objects or links in Object Storage V2 will be visible immediately after the action completes. + + Note that [parameter default values](https://palantir.com/docs/foundry/action-types/parameters-default-value/) are not currently supported by + this endpoint. + + :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the action. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. + :type ontology_rid: OntologyRid + :param action_type: The API name of the action to apply. To find the API name for your action, use the **List action types** endpoint or check the **Ontology Manager**. + :type action_type: ActionTypeApiName + :param parameters: + :type parameters: Dict[ParameterId, Optional[DataValue]] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[ontologies_models.ApplyActionResponse] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v1/ontologies/{ontologyRid}/actions/{actionType}/apply", + query_params={}, + path_params={ + "ontologyRid": ontology_rid, + "actionType": action_type, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=ontologies_models.ApplyActionRequest( + parameters=parameters, + ), + response_type=ontologies_models.ApplyActionResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def apply_batch( + self, + ontology_rid: ontologies_models.OntologyRid, + action_type: ontologies_models.ActionTypeApiName, + *, + requests: typing.List[ontologies_models.ApplyActionRequest], + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[ontologies_models.BatchApplyActionResponse]: + """ + Applies multiple actions (of the same Action Type) using the given parameters. + Changes to objects or links stored in Object Storage V1 are eventually consistent and may take some time to be visible. + Edits to objects or links in Object Storage V2 will be visible immediately after the action completes. + + Up to 20 actions may be applied in one call. Actions that only modify objects in Object Storage v2 and do not + call Functions may receive a higher limit. + + Note that [parameter default values](https://palantir.com/docs/foundry/action-types/parameters-default-value/) and + [notifications](https://palantir.com/docs/foundry/action-types/notifications/) are not currently supported by this endpoint. + + :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the action. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. + :type ontology_rid: OntologyRid + :param action_type: The API name of the action to apply. To find the API name for your action, use the **List action types** endpoint or check the **Ontology Manager**. + :type action_type: ActionTypeApiName + :param requests: + :type requests: List[ApplyActionRequest] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[ontologies_models.BatchApplyActionResponse] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v1/ontologies/{ontologyRid}/actions/{actionType}/applyBatch", + query_params={}, + path_params={ + "ontologyRid": ontology_rid, + "actionType": action_type, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=ontologies_models.BatchApplyActionRequest( + requests=requests, + ), + response_type=ontologies_models.BatchApplyActionResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def validate( + self, + ontology_rid: ontologies_models.OntologyRid, + action_type: ontologies_models.ActionTypeApiName, + *, + parameters: typing.Dict[ + ontologies_models.ParameterId, typing.Optional[ontologies_models.DataValue] + ], + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[ontologies_models.ValidateActionResponse]: + """ + Validates if an action can be run with the given set of parameters. + The response contains the evaluation of parameters and **submission criteria** + that determine if the request is `VALID` or `INVALID`. + For performance reasons, validations will not consider existing objects or other data in Foundry. + For example, the uniqueness of a primary key or the existence of a user ID will not be checked. + Note that [parameter default values](https://palantir.com/docs/foundry/action-types/parameters-default-value/) are not currently supported by + this endpoint. Unspecified parameters will be given a default value of `null`. + + :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the action. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. + :type ontology_rid: OntologyRid + :param action_type: The API name of the action to validate. To find the API name for your action, use the **List action types** endpoint or check the **Ontology Manager**. + :type action_type: ActionTypeApiName + :param parameters: + :type parameters: Dict[ParameterId, Optional[DataValue]] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[ontologies_models.ValidateActionResponse] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v1/ontologies/{ontologyRid}/actions/{actionType}/validate", + query_params={}, + path_params={ + "ontologyRid": ontology_rid, + "actionType": action_type, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=ontologies_models.ValidateActionRequest( + parameters=parameters, + ), + response_type=ontologies_models.ValidateActionResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _AsyncActionClientRaw: + def __init__(self, client: AsyncActionClient) -> None: + def apply(_: ontologies_models.ApplyActionResponse): ... + def apply_batch(_: ontologies_models.BatchApplyActionResponse): ... + def validate(_: ontologies_models.ValidateActionResponse): ... + + self.apply = core.async_with_raw_response(apply, client.apply) + self.apply_batch = core.async_with_raw_response(apply_batch, client.apply_batch) + self.validate = core.async_with_raw_response(validate, client.validate) + + +class _AsyncActionClientStreaming: + def __init__(self, client: AsyncActionClient) -> None: + def apply(_: ontologies_models.ApplyActionResponse): ... + def apply_batch(_: ontologies_models.BatchApplyActionResponse): ... + def validate(_: ontologies_models.ValidateActionResponse): ... + + self.apply = core.async_with_streaming_response(apply, client.apply) + self.apply_batch = core.async_with_streaming_response(apply_batch, client.apply_batch) + self.validate = core.async_with_streaming_response(validate, client.validate) diff --git a/foundry_sdk/v1/ontologies/action_type.py b/foundry_sdk/v1/ontologies/action_type.py new file mode 100644 index 000000000..4f7c12322 --- /dev/null +++ b/foundry_sdk/v1/ontologies/action_type.py @@ -0,0 +1,300 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v1.core import models as core_models +from foundry_sdk.v1.ontologies import models as ontologies_models + + +class ActionTypeClient: + """ + The API client for the ActionType Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _ActionTypeClientStreaming(self) + self.with_raw_response = _ActionTypeClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + ontology_rid: ontologies_models.OntologyRid, + action_type_api_name: ontologies_models.ActionTypeApiName, + *, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> ontologies_models.ActionType: + """ + Gets a specific action type with the given API name. + + :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the action type. + :type ontology_rid: OntologyRid + :param action_type_api_name: The name of the action type in the API. + :type action_type_api_name: ActionTypeApiName + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: ontologies_models.ActionType + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v1/ontologies/{ontologyRid}/actionTypes/{actionTypeApiName}", + query_params={}, + path_params={ + "ontologyRid": ontology_rid, + "actionTypeApiName": action_type_api_name, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.ActionType, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def list( + self, + ontology_rid: ontologies_models.OntologyRid, + *, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.ResourceIterator[ontologies_models.ActionType]: + """ + Lists the action types for the given Ontology. + + Each page may be smaller than the requested page size. However, it is guaranteed that if there are more + results available, at least one result will be present in the response. + + :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the action types. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. + :type ontology_rid: OntologyRid + :param page_size: The desired size of the page to be returned. Defaults to 500. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. + :type page_size: Optional[PageSize] + :param page_token: + :type page_token: Optional[PageToken] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.ResourceIterator[ontologies_models.ActionType] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v1/ontologies/{ontologyRid}/actionTypes", + query_params={ + "pageSize": page_size, + "pageToken": page_token, + }, + path_params={ + "ontologyRid": ontology_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.ListActionTypesResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + +class _ActionTypeClientRaw: + def __init__(self, client: ActionTypeClient) -> None: + def get(_: ontologies_models.ActionType): ... + def list(_: ontologies_models.ListActionTypesResponse): ... + + self.get = core.with_raw_response(get, client.get) + self.list = core.with_raw_response(list, client.list) + + +class _ActionTypeClientStreaming: + def __init__(self, client: ActionTypeClient) -> None: + def get(_: ontologies_models.ActionType): ... + def list(_: ontologies_models.ListActionTypesResponse): ... + + self.get = core.with_streaming_response(get, client.get) + self.list = core.with_streaming_response(list, client.list) + + +class AsyncActionTypeClient: + """ + The API client for the ActionType Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncActionTypeClientStreaming(self) + self.with_raw_response = _AsyncActionTypeClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + ontology_rid: ontologies_models.OntologyRid, + action_type_api_name: ontologies_models.ActionTypeApiName, + *, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[ontologies_models.ActionType]: + """ + Gets a specific action type with the given API name. + + :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the action type. + :type ontology_rid: OntologyRid + :param action_type_api_name: The name of the action type in the API. + :type action_type_api_name: ActionTypeApiName + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[ontologies_models.ActionType] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v1/ontologies/{ontologyRid}/actionTypes/{actionTypeApiName}", + query_params={}, + path_params={ + "ontologyRid": ontology_rid, + "actionTypeApiName": action_type_api_name, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.ActionType, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def list( + self, + ontology_rid: ontologies_models.OntologyRid, + *, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.AsyncResourceIterator[ontologies_models.ActionType]: + """ + Lists the action types for the given Ontology. + + Each page may be smaller than the requested page size. However, it is guaranteed that if there are more + results available, at least one result will be present in the response. + + :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the action types. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. + :type ontology_rid: OntologyRid + :param page_size: The desired size of the page to be returned. Defaults to 500. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. + :type page_size: Optional[PageSize] + :param page_token: + :type page_token: Optional[PageToken] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.AsyncResourceIterator[ontologies_models.ActionType] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v1/ontologies/{ontologyRid}/actionTypes", + query_params={ + "pageSize": page_size, + "pageToken": page_token, + }, + path_params={ + "ontologyRid": ontology_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.ListActionTypesResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + +class _AsyncActionTypeClientRaw: + def __init__(self, client: AsyncActionTypeClient) -> None: + def get(_: ontologies_models.ActionType): ... + def list(_: ontologies_models.ListActionTypesResponse): ... + + self.get = core.async_with_raw_response(get, client.get) + self.list = core.async_with_raw_response(list, client.list) + + +class _AsyncActionTypeClientStreaming: + def __init__(self, client: AsyncActionTypeClient) -> None: + def get(_: ontologies_models.ActionType): ... + def list(_: ontologies_models.ListActionTypesResponse): ... + + self.get = core.async_with_streaming_response(get, client.get) + self.list = core.async_with_streaming_response(list, client.list) diff --git a/foundry_sdk/v1/ontologies/attachment.py b/foundry_sdk/v1/ontologies/attachment.py new file mode 100644 index 000000000..f6f39f2c5 --- /dev/null +++ b/foundry_sdk/v1/ontologies/attachment.py @@ -0,0 +1,388 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v1.core import models as core_models +from foundry_sdk.v1.ontologies import models as ontologies_models + + +class AttachmentClient: + """ + The API client for the Attachment Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AttachmentClientStreaming(self) + self.with_raw_response = _AttachmentClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + attachment_rid: ontologies_models.AttachmentRid, + *, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> ontologies_models.Attachment: + """ + Get the metadata of an attachment. + + :param attachment_rid: The RID of the attachment. + :type attachment_rid: AttachmentRid + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: ontologies_models.Attachment + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v1/attachments/{attachmentRid}", + query_params={}, + path_params={ + "attachmentRid": attachment_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.Attachment, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def read( + self, + attachment_rid: ontologies_models.AttachmentRid, + *, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> bytes: + """ + Get the content of an attachment. + + :param attachment_rid: The RID of the attachment. + :type attachment_rid: AttachmentRid + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: bytes + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v1/attachments/{attachmentRid}/content", + query_params={}, + path_params={ + "attachmentRid": attachment_rid, + }, + header_params={ + "Accept": "*/*", + }, + body=None, + response_type=bytes, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def upload( + self, + body: bytes, + *, + content_length: core_models.ContentLength, + content_type: core_models.ContentType, + filename: core_models.Filename, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> ontologies_models.Attachment: + """ + Upload an attachment to use in an action. Any attachment which has not been linked to an object via + an action within one hour after upload will be removed. + Previously mapped attachments which are not connected to any object anymore are also removed on + a biweekly basis. + The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`. + + :param body: Body of the request + :type body: bytes + :param content_length: The size in bytes of the file content being uploaded. + :type content_length: ContentLength + :param content_type: The media type of the file being uploaded. + :type content_type: ContentType + :param filename: The name of the file being uploaded. + :type filename: Filename + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: ontologies_models.Attachment + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v1/attachments/upload", + query_params={ + "filename": filename, + }, + path_params={}, + header_params={ + "Content-Length": content_length, + "Content-Type": content_type, + "Content-Type": "*/*", + "Accept": "application/json", + }, + body=body, + response_type=ontologies_models.Attachment, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _AttachmentClientRaw: + def __init__(self, client: AttachmentClient) -> None: + def get(_: ontologies_models.Attachment): ... + def read(_: bytes): ... + def upload(_: ontologies_models.Attachment): ... + + self.get = core.with_raw_response(get, client.get) + self.read = core.with_raw_response(read, client.read) + self.upload = core.with_raw_response(upload, client.upload) + + +class _AttachmentClientStreaming: + def __init__(self, client: AttachmentClient) -> None: + def get(_: ontologies_models.Attachment): ... + def read(_: bytes): ... + def upload(_: ontologies_models.Attachment): ... + + self.get = core.with_streaming_response(get, client.get) + self.read = core.with_streaming_response(read, client.read) + self.upload = core.with_streaming_response(upload, client.upload) + + +class AsyncAttachmentClient: + """ + The API client for the Attachment Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncAttachmentClientStreaming(self) + self.with_raw_response = _AsyncAttachmentClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + attachment_rid: ontologies_models.AttachmentRid, + *, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[ontologies_models.Attachment]: + """ + Get the metadata of an attachment. + + :param attachment_rid: The RID of the attachment. + :type attachment_rid: AttachmentRid + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[ontologies_models.Attachment] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v1/attachments/{attachmentRid}", + query_params={}, + path_params={ + "attachmentRid": attachment_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.Attachment, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def read( + self, + attachment_rid: ontologies_models.AttachmentRid, + *, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[bytes]: + """ + Get the content of an attachment. + + :param attachment_rid: The RID of the attachment. + :type attachment_rid: AttachmentRid + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[bytes] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v1/attachments/{attachmentRid}/content", + query_params={}, + path_params={ + "attachmentRid": attachment_rid, + }, + header_params={ + "Accept": "*/*", + }, + body=None, + response_type=bytes, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def upload( + self, + body: bytes, + *, + content_length: core_models.ContentLength, + content_type: core_models.ContentType, + filename: core_models.Filename, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[ontologies_models.Attachment]: + """ + Upload an attachment to use in an action. Any attachment which has not been linked to an object via + an action within one hour after upload will be removed. + Previously mapped attachments which are not connected to any object anymore are also removed on + a biweekly basis. + The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`. + + :param body: Body of the request + :type body: bytes + :param content_length: The size in bytes of the file content being uploaded. + :type content_length: ContentLength + :param content_type: The media type of the file being uploaded. + :type content_type: ContentType + :param filename: The name of the file being uploaded. + :type filename: Filename + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[ontologies_models.Attachment] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v1/attachments/upload", + query_params={ + "filename": filename, + }, + path_params={}, + header_params={ + "Content-Length": content_length, + "Content-Type": content_type, + "Content-Type": "*/*", + "Accept": "application/json", + }, + body=body, + response_type=ontologies_models.Attachment, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _AsyncAttachmentClientRaw: + def __init__(self, client: AsyncAttachmentClient) -> None: + def get(_: ontologies_models.Attachment): ... + def read(_: bytes): ... + def upload(_: ontologies_models.Attachment): ... + + self.get = core.async_with_raw_response(get, client.get) + self.read = core.async_with_raw_response(read, client.read) + self.upload = core.async_with_raw_response(upload, client.upload) + + +class _AsyncAttachmentClientStreaming: + def __init__(self, client: AsyncAttachmentClient) -> None: + def get(_: ontologies_models.Attachment): ... + def read(_: bytes): ... + def upload(_: ontologies_models.Attachment): ... + + self.get = core.async_with_streaming_response(get, client.get) + self.read = core.async_with_streaming_response(read, client.read) + self.upload = core.async_with_streaming_response(upload, client.upload) diff --git a/foundry_sdk/v1/ontologies/errors.py b/foundry_sdk/v1/ontologies/errors.py new file mode 100644 index 000000000..e3afcd69d --- /dev/null +++ b/foundry_sdk/v1/ontologies/errors.py @@ -0,0 +1,2482 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing +from dataclasses import dataclass + +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v1.ontologies import models as ontologies_models + + +class ActionContainsDuplicateEditsParameters(typing_extensions.TypedDict): + """The given action request has multiple edits on the same object.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class ActionContainsDuplicateEdits(errors.ConflictError): + name: typing.Literal["ActionContainsDuplicateEdits"] + parameters: ActionContainsDuplicateEditsParameters + error_instance_id: str + + +class ActionEditedPropertiesNotFoundParameters(typing_extensions.TypedDict): + """ + Actions attempted to edit properties that could not be found on the object type. + Please contact the Ontology administrator to resolve this issue. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class ActionEditedPropertiesNotFound(errors.BadRequestError): + name: typing.Literal["ActionEditedPropertiesNotFound"] + parameters: ActionEditedPropertiesNotFoundParameters + error_instance_id: str + + +class ActionEditsReadOnlyEntityParameters(typing_extensions.TypedDict): + """The given action request performs edits on a type that is read-only or does not allow edits.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + entityTypeRid: typing_extensions.NotRequired[ontologies_models.ObjectTypeRid] + + +@dataclass +class ActionEditsReadOnlyEntity(errors.BadRequestError): + name: typing.Literal["ActionEditsReadOnlyEntity"] + parameters: ActionEditsReadOnlyEntityParameters + error_instance_id: str + + +class ActionNotFoundParameters(typing_extensions.TypedDict): + """The action is not found, or the user does not have access to it.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + actionRid: ontologies_models.ActionRid + + +@dataclass +class ActionNotFound(errors.NotFoundError): + name: typing.Literal["ActionNotFound"] + parameters: ActionNotFoundParameters + error_instance_id: str + + +class ActionParameterInterfaceTypeNotFoundParameters(typing_extensions.TypedDict): + """The parameter references an interface type that could not be found, or the client token does not have access to it.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + parameterId: ontologies_models.ParameterId + + +@dataclass +class ActionParameterInterfaceTypeNotFound(errors.NotFoundError): + name: typing.Literal["ActionParameterInterfaceTypeNotFound"] + parameters: ActionParameterInterfaceTypeNotFoundParameters + error_instance_id: str + + +class ActionParameterObjectNotFoundParameters(typing_extensions.TypedDict): + """The parameter object reference or parameter default value is not found, or the client token does not have access to it.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + parameterId: ontologies_models.ParameterId + + +@dataclass +class ActionParameterObjectNotFound(errors.NotFoundError): + name: typing.Literal["ActionParameterObjectNotFound"] + parameters: ActionParameterObjectNotFoundParameters + error_instance_id: str + + +class ActionParameterObjectTypeNotFoundParameters(typing_extensions.TypedDict): + """The parameter references an object type that could not be found, or the client token does not have access to it.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + parameterId: ontologies_models.ParameterId + + +@dataclass +class ActionParameterObjectTypeNotFound(errors.NotFoundError): + name: typing.Literal["ActionParameterObjectTypeNotFound"] + parameters: ActionParameterObjectTypeNotFoundParameters + error_instance_id: str + + +class ActionTypeNotFoundParameters(typing_extensions.TypedDict): + """The action type is not found, or the user does not have access to it.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + actionType: typing_extensions.NotRequired[ontologies_models.ActionTypeApiName] + rid: typing_extensions.NotRequired[ontologies_models.ActionTypeRid] + + +@dataclass +class ActionTypeNotFound(errors.NotFoundError): + name: typing.Literal["ActionTypeNotFound"] + parameters: ActionTypeNotFoundParameters + error_instance_id: str + + +class ActionValidationFailedParameters(typing_extensions.TypedDict): + """ + The validation failed for the given action parameters. Please use the `validateAction` endpoint for more + details. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + actionType: ontologies_models.ActionTypeApiName + + +@dataclass +class ActionValidationFailed(errors.BadRequestError): + name: typing.Literal["ActionValidationFailed"] + parameters: ActionValidationFailedParameters + error_instance_id: str + + +class AggregationAccuracyNotSupportedParameters(typing_extensions.TypedDict): + """ + The given aggregation cannot be performed with the requested accuracy. + Try allowing approximate results or adjust your aggregation request. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class AggregationAccuracyNotSupported(errors.BadRequestError): + name: typing.Literal["AggregationAccuracyNotSupported"] + parameters: AggregationAccuracyNotSupportedParameters + error_instance_id: str + + +class AggregationGroupCountExceededLimitParameters(typing_extensions.TypedDict): + """ + The number of groups in the aggregations grouping exceeded the allowed limit. This can typically be fixed by + adjusting your query to reduce the number of groups created by your aggregation. For instance: + - If you are using multiple `groupBy` clauses, try reducing the number of clauses. + - If you are using a `groupBy` clause with a high cardinality property, try filtering the data first + to reduce the number of groups. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + groupsCount: typing_extensions.NotRequired[int] + groupsLimit: typing_extensions.NotRequired[int] + + +@dataclass +class AggregationGroupCountExceededLimit(errors.BadRequestError): + name: typing.Literal["AggregationGroupCountExceededLimit"] + parameters: AggregationGroupCountExceededLimitParameters + error_instance_id: str + + +class AggregationMemoryExceededLimitParameters(typing_extensions.TypedDict): + """ + The amount of memory used in the request exceeded the limit. This can typically be fixed by + adjusting your query to reduce the number of groups created by your aggregation. For instance: + - If you are using multiple `groupBy` clauses, try reducing the number of clauses. + - If you are using a `groupBy` clause with a high cardinality property, try filtering the data first + to reduce the number of groups. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + memoryUsedBytes: typing_extensions.NotRequired[str] + memoryLimitBytes: str + + +@dataclass +class AggregationMemoryExceededLimit(errors.BadRequestError): + name: typing.Literal["AggregationMemoryExceededLimit"] + parameters: AggregationMemoryExceededLimitParameters + error_instance_id: str + + +class AggregationNestedObjectSetSizeExceededLimitParameters(typing_extensions.TypedDict): + """ + A nested object set within the aggregation exceeded the allowed limit. + This can be fixed by aggregating over fewer objects, such as by applying a filter. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + objectsCount: int + objectsLimit: int + + +@dataclass +class AggregationNestedObjectSetSizeExceededLimit(errors.BadRequestError): + name: typing.Literal["AggregationNestedObjectSetSizeExceededLimit"] + parameters: AggregationNestedObjectSetSizeExceededLimitParameters + error_instance_id: str + + +class ApplyActionFailedParameters(typing_extensions.TypedDict): + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class ApplyActionFailed(errors.BadRequestError): + name: typing.Literal["ApplyActionFailed"] + parameters: ApplyActionFailedParameters + error_instance_id: str + + +class AttachmentNotFoundParameters(typing_extensions.TypedDict): + """ + The requested attachment is not found, or the client token does not have access to it. + Attachments that are not attached to any objects are deleted after two weeks. + Attachments that have not been attached to an object can only be viewed by the user who uploaded them. + Attachments that have been attached to an object can be viewed by users who can view the object. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + attachmentRid: typing_extensions.NotRequired[ontologies_models.AttachmentRid] + + +@dataclass +class AttachmentNotFound(errors.NotFoundError): + name: typing.Literal["AttachmentNotFound"] + parameters: AttachmentNotFoundParameters + error_instance_id: str + + +class AttachmentRidAlreadyExistsParameters(typing_extensions.TypedDict): + """The provided attachment RID already exists and cannot be overwritten.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + attachmentRid: ontologies_models.AttachmentRid + + +@dataclass +class AttachmentRidAlreadyExists(errors.NotFoundError): + name: typing.Literal["AttachmentRidAlreadyExists"] + parameters: AttachmentRidAlreadyExistsParameters + error_instance_id: str + + +class AttachmentSizeExceededLimitParameters(typing_extensions.TypedDict): + """ + The file is too large to be uploaded as an attachment. + The maximum attachment size is 200MB. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + fileSizeBytes: str + fileLimitBytes: str + + +@dataclass +class AttachmentSizeExceededLimit(errors.BadRequestError): + name: typing.Literal["AttachmentSizeExceededLimit"] + parameters: AttachmentSizeExceededLimitParameters + error_instance_id: str + + +class CipherChannelNotFoundParameters(typing_extensions.TypedDict): + """ + The Cipher Channel was not found. + It either does not exist, or you do not have permission to see it. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + cipherChannel: core.RID + + +@dataclass +class CipherChannelNotFound(errors.NotFoundError): + name: typing.Literal["CipherChannelNotFound"] + parameters: CipherChannelNotFoundParameters + error_instance_id: str + + +class CompositePrimaryKeyNotSupportedParameters(typing_extensions.TypedDict): + """ + Primary keys consisting of multiple properties are not supported by this API. If you need support for this, + please reach out to Palantir Support. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + objectType: ontologies_models.ObjectTypeApiName + primaryKey: typing.List[ontologies_models.PropertyApiName] + + +@dataclass +class CompositePrimaryKeyNotSupported(errors.BadRequestError): + name: typing.Literal["CompositePrimaryKeyNotSupported"] + parameters: CompositePrimaryKeyNotSupportedParameters + error_instance_id: str + + +class ConsistentSnapshotErrorParameters(typing_extensions.TypedDict): + """ + An Ontology objects read failed because the Ontology snapshot snapshot used for consistent reads became + stale. Retrying the request typically resolves this. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class ConsistentSnapshotError(errors.ConflictError): + name: typing.Literal["ConsistentSnapshotError"] + parameters: ConsistentSnapshotErrorParameters + error_instance_id: str + + +class DefaultAndNullGroupsNotSupportedParameters(typing_extensions.TypedDict): + """Exact match groupBy clause cannot specify a default value and allow null values.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class DefaultAndNullGroupsNotSupported(errors.BadRequestError): + name: typing.Literal["DefaultAndNullGroupsNotSupported"] + parameters: DefaultAndNullGroupsNotSupportedParameters + error_instance_id: str + + +class DerivedPropertyApiNamesNotUniqueParameters(typing_extensions.TypedDict): + """At least one of the requested derived property API names already exist on the object set.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + derivedPropertyApiNames: typing.List[ontologies_models.DerivedPropertyApiName] + + +@dataclass +class DerivedPropertyApiNamesNotUnique(errors.BadRequestError): + name: typing.Literal["DerivedPropertyApiNamesNotUnique"] + parameters: DerivedPropertyApiNamesNotUniqueParameters + error_instance_id: str + + +class DuplicateOrderByParameters(typing_extensions.TypedDict): + """The requested sort order includes duplicate properties.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + properties: typing.List[ontologies_models.PropertyApiName] + + +@dataclass +class DuplicateOrderBy(errors.BadRequestError): + name: typing.Literal["DuplicateOrderBy"] + parameters: DuplicateOrderByParameters + error_instance_id: str + + +class EditObjectPermissionDeniedParameters(typing_extensions.TypedDict): + """The user does not have permission to edit this `ObjectType`.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class EditObjectPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["EditObjectPermissionDenied"] + parameters: EditObjectPermissionDeniedParameters + error_instance_id: str + + +class FunctionEncounteredUserFacingErrorParameters(typing_extensions.TypedDict): + """ + The authored function failed to execute because of a user induced error. The message argument + is meant to be displayed to the user. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + functionRid: ontologies_models.FunctionRid + functionVersion: ontologies_models.FunctionVersion + message: str + + +@dataclass +class FunctionEncounteredUserFacingError(errors.BadRequestError): + name: typing.Literal["FunctionEncounteredUserFacingError"] + parameters: FunctionEncounteredUserFacingErrorParameters + error_instance_id: str + + +class FunctionExecutionFailedParameters(typing_extensions.TypedDict): + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + functionRid: ontologies_models.FunctionRid + functionVersion: ontologies_models.FunctionVersion + message: typing_extensions.NotRequired[str] + stacktrace: typing_extensions.NotRequired[str] + + +@dataclass +class FunctionExecutionFailed(errors.BadRequestError): + name: typing.Literal["FunctionExecutionFailed"] + parameters: FunctionExecutionFailedParameters + error_instance_id: str + + +class FunctionExecutionTimedOutParameters(typing_extensions.TypedDict): + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + functionRid: ontologies_models.FunctionRid + functionVersion: ontologies_models.FunctionVersion + + +@dataclass +class FunctionExecutionTimedOut(errors.InternalServerError): + name: typing.Literal["FunctionExecutionTimedOut"] + parameters: FunctionExecutionTimedOutParameters + error_instance_id: str + + +class FunctionInvalidInputParameters(typing_extensions.TypedDict): + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + functionRid: ontologies_models.FunctionRid + functionVersion: ontologies_models.FunctionVersion + + +@dataclass +class FunctionInvalidInput(errors.BadRequestError): + name: typing.Literal["FunctionInvalidInput"] + parameters: FunctionInvalidInputParameters + error_instance_id: str + + +class HighScaleComputationNotEnabledParameters(typing_extensions.TypedDict): + """High-scale compute was required for this Ontology query but is not enabled on this enrollment.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class HighScaleComputationNotEnabled(errors.InternalServerError): + name: typing.Literal["HighScaleComputationNotEnabled"] + parameters: HighScaleComputationNotEnabledParameters + error_instance_id: str + + +class InterfaceBasedObjectSetNotSupportedParameters(typing_extensions.TypedDict): + """The requested object set type is not supported for interface-based object sets.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class InterfaceBasedObjectSetNotSupported(errors.BadRequestError): + name: typing.Literal["InterfaceBasedObjectSetNotSupported"] + parameters: InterfaceBasedObjectSetNotSupportedParameters + error_instance_id: str + + +class InterfaceLinkTypeNotFoundParameters(typing_extensions.TypedDict): + """The requested interface link type is not found, or the client token does not have access to it.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + interfaceTypeApiName: typing_extensions.NotRequired[ontologies_models.InterfaceTypeApiName] + interfaceTypeRid: typing_extensions.NotRequired[ontologies_models.InterfaceTypeRid] + interfaceLinkTypeApiName: typing_extensions.NotRequired[ + ontologies_models.InterfaceLinkTypeApiName + ] + interfaceLinkTypeRid: typing_extensions.NotRequired[ontologies_models.InterfaceLinkTypeRid] + + +@dataclass +class InterfaceLinkTypeNotFound(errors.NotFoundError): + name: typing.Literal["InterfaceLinkTypeNotFound"] + parameters: InterfaceLinkTypeNotFoundParameters + error_instance_id: str + + +class InterfacePropertiesHaveDifferentIdsParameters(typing_extensions.TypedDict): + """Properties used in ordering must have the same ids.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + properties: typing.List[ontologies_models.InterfacePropertyApiName] + + +@dataclass +class InterfacePropertiesHaveDifferentIds(errors.BadRequestError): + name: typing.Literal["InterfacePropertiesHaveDifferentIds"] + parameters: InterfacePropertiesHaveDifferentIdsParameters + error_instance_id: str + + +class InterfacePropertiesNotFoundParameters(typing_extensions.TypedDict): + """The requested interface property types are not present on every object type.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + objectType: typing.List[ontologies_models.ObjectTypeApiName] + missingInterfaceProperties: typing.List[ontologies_models.InterfacePropertyApiName] + + +@dataclass +class InterfacePropertiesNotFound(errors.NotFoundError): + name: typing.Literal["InterfacePropertiesNotFound"] + parameters: InterfacePropertiesNotFoundParameters + error_instance_id: str + + +class InterfacePropertyNotFoundParameters(typing_extensions.TypedDict): + """The requested interface property was not found on the interface type.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + interfaceType: ontologies_models.InterfaceTypeApiName + interfaceProperty: ontologies_models.InterfacePropertyApiName + + +@dataclass +class InterfacePropertyNotFound(errors.NotFoundError): + name: typing.Literal["InterfacePropertyNotFound"] + parameters: InterfacePropertyNotFoundParameters + error_instance_id: str + + +class InterfaceTypeNotFoundParameters(typing_extensions.TypedDict): + """The requested interface type is not found, or the client token does not have access to it.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + apiName: typing_extensions.NotRequired[ontologies_models.InterfaceTypeApiName] + rid: typing_extensions.NotRequired[ontologies_models.InterfaceTypeRid] + + +@dataclass +class InterfaceTypeNotFound(errors.NotFoundError): + name: typing.Literal["InterfaceTypeNotFound"] + parameters: InterfaceTypeNotFoundParameters + error_instance_id: str + + +class InterfaceTypesNotFoundParameters(typing_extensions.TypedDict): + """The requested interface types were not found, or the client token does not have access to it.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + apiName: typing.List[ontologies_models.InterfaceTypeApiName] + rid: typing.List[ontologies_models.InterfaceTypeRid] + + +@dataclass +class InterfaceTypesNotFound(errors.NotFoundError): + name: typing.Literal["InterfaceTypesNotFound"] + parameters: InterfaceTypesNotFoundParameters + error_instance_id: str + + +class InvalidAggregationOrderingParameters(typing_extensions.TypedDict): + """Aggregation ordering can only be applied to metrics with exactly one groupBy clause.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class InvalidAggregationOrdering(errors.BadRequestError): + name: typing.Literal["InvalidAggregationOrdering"] + parameters: InvalidAggregationOrderingParameters + error_instance_id: str + + +class InvalidAggregationOrderingWithNullValuesParameters(typing_extensions.TypedDict): + """Aggregation ordering cannot be applied for groupBy clauses that allow null values.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class InvalidAggregationOrderingWithNullValues(errors.BadRequestError): + name: typing.Literal["InvalidAggregationOrderingWithNullValues"] + parameters: InvalidAggregationOrderingWithNullValuesParameters + error_instance_id: str + + +class InvalidAggregationRangeParameters(typing_extensions.TypedDict): + """Aggregation range should include one lt or lte and one gt or gte.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class InvalidAggregationRange(errors.BadRequestError): + name: typing.Literal["InvalidAggregationRange"] + parameters: InvalidAggregationRangeParameters + error_instance_id: str + + +class InvalidAggregationRangePropertyTypeParameters(typing_extensions.TypedDict): + """Range group by is not supported by property type.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + property: ontologies_models.PropertyApiName + objectType: ontologies_models.ObjectTypeApiName + propertyBaseType: ontologies_models.ValueType + + +@dataclass +class InvalidAggregationRangePropertyType(errors.BadRequestError): + name: typing.Literal["InvalidAggregationRangePropertyType"] + parameters: InvalidAggregationRangePropertyTypeParameters + error_instance_id: str + + +class InvalidAggregationRangePropertyTypeForInterfaceParameters(typing_extensions.TypedDict): + """Range group by is not supported by interface property type.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + interfaceProperty: ontologies_models.InterfacePropertyApiName + interfaceType: ontologies_models.InterfaceTypeApiName + propertyBaseType: ontologies_models.ValueType + + +@dataclass +class InvalidAggregationRangePropertyTypeForInterface(errors.BadRequestError): + name: typing.Literal["InvalidAggregationRangePropertyTypeForInterface"] + parameters: InvalidAggregationRangePropertyTypeForInterfaceParameters + error_instance_id: str + + +class InvalidAggregationRangeValueParameters(typing_extensions.TypedDict): + """Aggregation value does not conform to the expected underlying type.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + property: ontologies_models.PropertyApiName + objectType: ontologies_models.ObjectTypeApiName + propertyBaseType: ontologies_models.ValueType + + +@dataclass +class InvalidAggregationRangeValue(errors.BadRequestError): + name: typing.Literal["InvalidAggregationRangeValue"] + parameters: InvalidAggregationRangeValueParameters + error_instance_id: str + + +class InvalidAggregationRangeValueForInterfaceParameters(typing_extensions.TypedDict): + """Aggregation value does not conform to the expected underlying type.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + interfaceProperty: ontologies_models.InterfacePropertyApiName + interfaceType: ontologies_models.InterfaceTypeApiName + propertyBaseType: ontologies_models.ValueType + + +@dataclass +class InvalidAggregationRangeValueForInterface(errors.BadRequestError): + name: typing.Literal["InvalidAggregationRangeValueForInterface"] + parameters: InvalidAggregationRangeValueForInterfaceParameters + error_instance_id: str + + +class InvalidApplyActionOptionCombinationParameters(typing_extensions.TypedDict): + """The given options are individually valid but cannot be used in the given combination.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + invalidCombination: typing_extensions.NotRequired[ontologies_models.ApplyActionRequestOptions] + + +@dataclass +class InvalidApplyActionOptionCombination(errors.BadRequestError): + name: typing.Literal["InvalidApplyActionOptionCombination"] + parameters: InvalidApplyActionOptionCombinationParameters + error_instance_id: str + + +class InvalidContentLengthParameters(typing_extensions.TypedDict): + """A `Content-Length` header is required for all uploads, but was missing or invalid.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class InvalidContentLength(errors.BadRequestError): + name: typing.Literal["InvalidContentLength"] + parameters: InvalidContentLengthParameters + error_instance_id: str + + +class InvalidContentTypeParameters(typing_extensions.TypedDict): + """ + The `Content-Type` cannot be inferred from the request content and filename. + Please check your request content and filename to ensure they are compatible. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class InvalidContentType(errors.BadRequestError): + name: typing.Literal["InvalidContentType"] + parameters: InvalidContentTypeParameters + error_instance_id: str + + +class InvalidDerivedPropertyDefinitionParameters(typing_extensions.TypedDict): + """Derived property definition was invalid due to shape of query or type checking.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + objectType: ontologies_models.ObjectTypeApiName + derivedProperty: ontologies_models.DerivedPropertyApiName + + +@dataclass +class InvalidDerivedPropertyDefinition(errors.BadRequestError): + name: typing.Literal["InvalidDerivedPropertyDefinition"] + parameters: InvalidDerivedPropertyDefinitionParameters + error_instance_id: str + + +class InvalidDurationGroupByPropertyTypeParameters(typing_extensions.TypedDict): + """Invalid property type for duration groupBy.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + property: ontologies_models.PropertyApiName + objectType: ontologies_models.ObjectTypeApiName + propertyBaseType: ontologies_models.ValueType + + +@dataclass +class InvalidDurationGroupByPropertyType(errors.BadRequestError): + name: typing.Literal["InvalidDurationGroupByPropertyType"] + parameters: InvalidDurationGroupByPropertyTypeParameters + error_instance_id: str + + +class InvalidDurationGroupByPropertyTypeForInterfaceParameters(typing_extensions.TypedDict): + """Invalid interface property type for duration groupBy.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + interfaceProperty: ontologies_models.InterfacePropertyApiName + interfaceType: ontologies_models.InterfaceTypeApiName + propertyBaseType: ontologies_models.ValueType + + +@dataclass +class InvalidDurationGroupByPropertyTypeForInterface(errors.BadRequestError): + name: typing.Literal["InvalidDurationGroupByPropertyTypeForInterface"] + parameters: InvalidDurationGroupByPropertyTypeForInterfaceParameters + error_instance_id: str + + +class InvalidDurationGroupByValueParameters(typing_extensions.TypedDict): + """ + Duration groupBy value is invalid. Units larger than day must have value `1` and date properties do not support + filtering on units smaller than day. As examples, neither bucketing by every two weeks nor bucketing a date by + every two hours are allowed. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class InvalidDurationGroupByValue(errors.BadRequestError): + name: typing.Literal["InvalidDurationGroupByValue"] + parameters: InvalidDurationGroupByValueParameters + error_instance_id: str + + +class InvalidFieldsParameters(typing_extensions.TypedDict): + """ + The value of the given field does not match the expected pattern. For example, an Ontology object property `id` + should be written `properties.id`. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + properties: typing.List[str] + + +@dataclass +class InvalidFields(errors.BadRequestError): + name: typing.Literal["InvalidFields"] + parameters: InvalidFieldsParameters + error_instance_id: str + + +class InvalidGroupIdParameters(typing_extensions.TypedDict): + """The provided value for a group id must be a UUID.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + groupId: str + + +@dataclass +class InvalidGroupId(errors.BadRequestError): + name: typing.Literal["InvalidGroupId"] + parameters: InvalidGroupIdParameters + error_instance_id: str + + +class InvalidOrderTypeParameters(typing_extensions.TypedDict): + """This query type does not support the provided order type""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + orderType: typing_extensions.NotRequired[ontologies_models.SearchOrderByType] + + +@dataclass +class InvalidOrderType(errors.BadRequestError): + name: typing.Literal["InvalidOrderType"] + parameters: InvalidOrderTypeParameters + error_instance_id: str + + +class InvalidParameterValueParameters(typing_extensions.TypedDict): + """ + The value of the given parameter is invalid. See the documentation of `DataValue` for details on + how parameters are represented. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + parameterBaseType: typing_extensions.NotRequired[ontologies_models.ValueType] + parameterDataType: typing_extensions.NotRequired[ontologies_models.OntologyDataType] + parameterId: ontologies_models.ParameterId + parameterValue: typing_extensions.NotRequired[ontologies_models.DataValue] + + +@dataclass +class InvalidParameterValue(errors.BadRequestError): + name: typing.Literal["InvalidParameterValue"] + parameters: InvalidParameterValueParameters + error_instance_id: str + + +class InvalidPropertyFilterValueParameters(typing_extensions.TypedDict): + """ + The value of the given property filter is invalid. For instance, 2 is an invalid value for + `isNull` in `properties.address.isNull=2` because the `isNull` filter expects a value of boolean type. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + expectedType: ontologies_models.ValueType + propertyFilter: ontologies_models.PropertyFilter + propertyFilterValue: ontologies_models.FilterValue + property: ontologies_models.PropertyApiName + + +@dataclass +class InvalidPropertyFilterValue(errors.BadRequestError): + name: typing.Literal["InvalidPropertyFilterValue"] + parameters: InvalidPropertyFilterValueParameters + error_instance_id: str + + +class InvalidPropertyFiltersCombinationParameters(typing_extensions.TypedDict): + """The provided filters cannot be used together.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + propertyFilters: typing.List[ontologies_models.PropertyFilter] + property: ontologies_models.PropertyApiName + + +@dataclass +class InvalidPropertyFiltersCombination(errors.BadRequestError): + name: typing.Literal["InvalidPropertyFiltersCombination"] + parameters: InvalidPropertyFiltersCombinationParameters + error_instance_id: str + + +class InvalidPropertyTypeParameters(typing_extensions.TypedDict): + """The given property type is not of the expected type.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + propertyBaseType: ontologies_models.ValueType + property: ontologies_models.PropertyApiName + + +@dataclass +class InvalidPropertyType(errors.BadRequestError): + name: typing.Literal["InvalidPropertyType"] + parameters: InvalidPropertyTypeParameters + error_instance_id: str + + +class InvalidPropertyValueParameters(typing_extensions.TypedDict): + """ + The value of the given property is invalid. See the documentation of `PropertyValue` for details on + how properties are represented. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + propertyBaseType: ontologies_models.ValueType + property: ontologies_models.PropertyApiName + propertyValue: ontologies_models.PropertyValue + + +@dataclass +class InvalidPropertyValue(errors.BadRequestError): + name: typing.Literal["InvalidPropertyValue"] + parameters: InvalidPropertyValueParameters + error_instance_id: str + + +class InvalidQueryOutputValueParameters(typing_extensions.TypedDict): + """ + The value of the query's output is invalid. This may be because the return value did not match the specified + output type or constraints. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + outputDataType: ontologies_models.QueryDataType + outputValue: typing_extensions.NotRequired[ontologies_models.DataValue] + functionRid: ontologies_models.FunctionRid + functionVersion: ontologies_models.FunctionVersion + + +@dataclass +class InvalidQueryOutputValue(errors.BadRequestError): + name: typing.Literal["InvalidQueryOutputValue"] + parameters: InvalidQueryOutputValueParameters + error_instance_id: str + + +class InvalidQueryParameterValueParameters(typing_extensions.TypedDict): + """ + The value of the given parameter is invalid. See the documentation of `DataValue` for details on + how parameters are represented. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + parameterDataType: ontologies_models.QueryDataType + parameterId: ontologies_models.ParameterId + parameterValue: typing_extensions.NotRequired[ontologies_models.DataValue] + + +@dataclass +class InvalidQueryParameterValue(errors.BadRequestError): + name: typing.Literal["InvalidQueryParameterValue"] + parameters: InvalidQueryParameterValueParameters + error_instance_id: str + + +class InvalidRangeQueryParameters(typing_extensions.TypedDict): + """The specified query range filter is invalid.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + lt: typing_extensions.NotRequired[typing.Any] + """Less than""" + + gt: typing_extensions.NotRequired[typing.Any] + """Greater than""" + + lte: typing_extensions.NotRequired[typing.Any] + """Less than or equal""" + + gte: typing_extensions.NotRequired[typing.Any] + """Greater than or equal""" + + field: str + + +@dataclass +class InvalidRangeQuery(errors.BadRequestError): + name: typing.Literal["InvalidRangeQuery"] + parameters: InvalidRangeQueryParameters + error_instance_id: str + + +class InvalidSortOrderParameters(typing_extensions.TypedDict): + """ + The requested sort order of one or more properties is invalid. Valid sort orders are 'asc' or 'desc'. Sort + order can also be omitted, and defaults to 'asc'. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + invalidSortOrder: str + + +@dataclass +class InvalidSortOrder(errors.BadRequestError): + name: typing.Literal["InvalidSortOrder"] + parameters: InvalidSortOrderParameters + error_instance_id: str + + +class InvalidSortTypeParameters(typing_extensions.TypedDict): + """The requested sort type of one or more clauses is invalid. Valid sort types are 'p' or 'properties'.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + invalidSortType: str + + +@dataclass +class InvalidSortType(errors.BadRequestError): + name: typing.Literal["InvalidSortType"] + parameters: InvalidSortTypeParameters + error_instance_id: str + + +class InvalidTransactionEditPropertyValueParameters(typing_extensions.TypedDict): + """ + The value of the given property is invalid. See the documentation of `DataValue` for details on + how properties are represented for transaction edits. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + propertyApiName: ontologies_models.PropertyApiName + propertyBaseType: ontologies_models.ValueType + propertyValue: ontologies_models.DataValue + + +@dataclass +class InvalidTransactionEditPropertyValue(errors.BadRequestError): + name: typing.Literal["InvalidTransactionEditPropertyValue"] + parameters: InvalidTransactionEditPropertyValueParameters + error_instance_id: str + + +class InvalidUserIdParameters(typing_extensions.TypedDict): + """The provided value for a user id must be a UUID.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + userId: str + + +@dataclass +class InvalidUserId(errors.BadRequestError): + name: typing.Literal["InvalidUserId"] + parameters: InvalidUserIdParameters + error_instance_id: str + + +class InvalidVectorDimensionParameters(typing_extensions.TypedDict): + """The dimensions of the provided vector don't match the dimensions of the embedding model being queried.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + expectedSize: int + providedSize: int + + +@dataclass +class InvalidVectorDimension(errors.BadRequestError): + name: typing.Literal["InvalidVectorDimension"] + parameters: InvalidVectorDimensionParameters + error_instance_id: str + + +class LinkAlreadyExistsParameters(typing_extensions.TypedDict): + """The link the user is attempting to create already exists.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class LinkAlreadyExists(errors.ConflictError): + name: typing.Literal["LinkAlreadyExists"] + parameters: LinkAlreadyExistsParameters + error_instance_id: str + + +class LinkTypeNotFoundParameters(typing_extensions.TypedDict): + """The link type is not found, or the user does not have access to it.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + objectType: typing_extensions.NotRequired[ontologies_models.ObjectTypeApiName] + linkType: typing_extensions.NotRequired[ontologies_models.LinkTypeApiName] + linkTypeId: typing_extensions.NotRequired[ontologies_models.LinkTypeId] + + +@dataclass +class LinkTypeNotFound(errors.NotFoundError): + name: typing.Literal["LinkTypeNotFound"] + parameters: LinkTypeNotFoundParameters + error_instance_id: str + + +class LinkedObjectNotFoundParameters(typing_extensions.TypedDict): + """The linked object with the given primary key is not found, or the user does not have access to it.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + linkType: ontologies_models.LinkTypeApiName + linkedObjectType: ontologies_models.ObjectTypeApiName + linkedObjectPrimaryKey: typing.Dict[ + ontologies_models.PropertyApiName, ontologies_models.PrimaryKeyValue + ] + + +@dataclass +class LinkedObjectNotFound(errors.NotFoundError): + name: typing.Literal["LinkedObjectNotFound"] + parameters: LinkedObjectNotFoundParameters + error_instance_id: str + + +class LoadObjectSetLinksNotSupportedParameters(typing_extensions.TypedDict): + """Bulk loading object set links is not supported by Object Storage v1.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class LoadObjectSetLinksNotSupported(errors.InternalServerError): + name: typing.Literal["LoadObjectSetLinksNotSupported"] + parameters: LoadObjectSetLinksNotSupportedParameters + error_instance_id: str + + +class MalformedPropertyFiltersParameters(typing_extensions.TypedDict): + """At least one of requested filters are malformed. Please look at the documentation of `PropertyFilter`.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + malformedPropertyFilter: str + + +@dataclass +class MalformedPropertyFilters(errors.BadRequestError): + name: typing.Literal["MalformedPropertyFilters"] + parameters: MalformedPropertyFiltersParameters + error_instance_id: str + + +class MarketplaceActionMappingNotFoundParameters(typing_extensions.TypedDict): + """The given action could not be mapped to a Marketplace installation.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + actionType: ontologies_models.ActionTypeApiName + artifactRepository: ontologies_models.ArtifactRepositoryRid + packageName: ontologies_models.SdkPackageName + + +@dataclass +class MarketplaceActionMappingNotFound(errors.NotFoundError): + name: typing.Literal["MarketplaceActionMappingNotFound"] + parameters: MarketplaceActionMappingNotFoundParameters + error_instance_id: str + + +class MarketplaceInstallationNotFoundParameters(typing_extensions.TypedDict): + """The given marketplace installation could not be found or the user does not have access to it.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + artifactRepository: ontologies_models.ArtifactRepositoryRid + packageName: ontologies_models.SdkPackageName + + +@dataclass +class MarketplaceInstallationNotFound(errors.NotFoundError): + name: typing.Literal["MarketplaceInstallationNotFound"] + parameters: MarketplaceInstallationNotFoundParameters + error_instance_id: str + + +class MarketplaceLinkMappingNotFoundParameters(typing_extensions.TypedDict): + """The given link could not be mapped to a Marketplace installation.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + linkType: ontologies_models.LinkTypeApiName + artifactRepository: ontologies_models.ArtifactRepositoryRid + packageName: ontologies_models.SdkPackageName + + +@dataclass +class MarketplaceLinkMappingNotFound(errors.NotFoundError): + name: typing.Literal["MarketplaceLinkMappingNotFound"] + parameters: MarketplaceLinkMappingNotFoundParameters + error_instance_id: str + + +class MarketplaceObjectMappingNotFoundParameters(typing_extensions.TypedDict): + """The given object could not be mapped to a Marketplace installation.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + objectType: ontologies_models.ObjectTypeApiName + artifactRepository: ontologies_models.ArtifactRepositoryRid + packageName: ontologies_models.SdkPackageName + + +@dataclass +class MarketplaceObjectMappingNotFound(errors.NotFoundError): + name: typing.Literal["MarketplaceObjectMappingNotFound"] + parameters: MarketplaceObjectMappingNotFoundParameters + error_instance_id: str + + +class MarketplaceQueryMappingNotFoundParameters(typing_extensions.TypedDict): + """The given query could not be mapped to a Marketplace installation.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + queryType: ontologies_models.QueryApiName + artifactRepository: ontologies_models.ArtifactRepositoryRid + packageName: ontologies_models.SdkPackageName + + +@dataclass +class MarketplaceQueryMappingNotFound(errors.NotFoundError): + name: typing.Literal["MarketplaceQueryMappingNotFound"] + parameters: MarketplaceQueryMappingNotFoundParameters + error_instance_id: str + + +class MarketplaceSdkActionMappingNotFoundParameters(typing_extensions.TypedDict): + """The given action could not be mapped to a Marketplace installation.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + actionType: ontologies_models.ActionTypeApiName + sdkPackageRid: ontologies_models.SdkPackageRid + sdkVersion: ontologies_models.SdkVersion + + +@dataclass +class MarketplaceSdkActionMappingNotFound(errors.NotFoundError): + name: typing.Literal["MarketplaceSdkActionMappingNotFound"] + parameters: MarketplaceSdkActionMappingNotFoundParameters + error_instance_id: str + + +class MarketplaceSdkInstallationNotFoundParameters(typing_extensions.TypedDict): + """The given marketplace installation could not be found or the user does not have access to it.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + sdkPackageRid: ontologies_models.SdkPackageRid + sdkVersion: ontologies_models.SdkVersion + + +@dataclass +class MarketplaceSdkInstallationNotFound(errors.NotFoundError): + name: typing.Literal["MarketplaceSdkInstallationNotFound"] + parameters: MarketplaceSdkInstallationNotFoundParameters + error_instance_id: str + + +class MarketplaceSdkLinkMappingNotFoundParameters(typing_extensions.TypedDict): + """The given link could not be mapped to a Marketplace installation.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + linkType: ontologies_models.LinkTypeApiName + sdkPackageRid: ontologies_models.SdkPackageRid + sdkVersion: ontologies_models.SdkVersion + + +@dataclass +class MarketplaceSdkLinkMappingNotFound(errors.NotFoundError): + name: typing.Literal["MarketplaceSdkLinkMappingNotFound"] + parameters: MarketplaceSdkLinkMappingNotFoundParameters + error_instance_id: str + + +class MarketplaceSdkObjectMappingNotFoundParameters(typing_extensions.TypedDict): + """The given object could not be mapped to a Marketplace installation.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + localObjectType: typing_extensions.NotRequired[ontologies_models.ObjectTypeApiName] + objectType: typing_extensions.NotRequired[ontologies_models.ObjectTypeRid] + sdkPackageRid: ontologies_models.SdkPackageRid + sdkVersion: ontologies_models.SdkVersion + + +@dataclass +class MarketplaceSdkObjectMappingNotFound(errors.NotFoundError): + name: typing.Literal["MarketplaceSdkObjectMappingNotFound"] + parameters: MarketplaceSdkObjectMappingNotFoundParameters + error_instance_id: str + + +class MarketplaceSdkPropertyMappingNotFoundParameters(typing_extensions.TypedDict): + """The given property could not be mapped to a Marketplace installation.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + propertyType: ontologies_models.PropertyApiName + objectType: ontologies_models.ObjectTypeApiName + sdkPackageRid: ontologies_models.SdkPackageRid + sdkVersion: ontologies_models.SdkVersion + + +@dataclass +class MarketplaceSdkPropertyMappingNotFound(errors.NotFoundError): + name: typing.Literal["MarketplaceSdkPropertyMappingNotFound"] + parameters: MarketplaceSdkPropertyMappingNotFoundParameters + error_instance_id: str + + +class MarketplaceSdkQueryMappingNotFoundParameters(typing_extensions.TypedDict): + """The given query could not be mapped to a Marketplace installation.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + queryType: ontologies_models.QueryApiName + sdkPackageRid: ontologies_models.SdkPackageRid + sdkVersion: ontologies_models.SdkVersion + + +@dataclass +class MarketplaceSdkQueryMappingNotFound(errors.NotFoundError): + name: typing.Literal["MarketplaceSdkQueryMappingNotFound"] + parameters: MarketplaceSdkQueryMappingNotFoundParameters + error_instance_id: str + + +class MissingParameterParameters(typing_extensions.TypedDict): + """ + Required parameters are missing. Please look at the `parameters` field to see which required parameters are + missing from the request. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + parameters: typing.List[ontologies_models.ParameterId] + + +@dataclass +class MissingParameter(errors.BadRequestError): + name: typing.Literal["MissingParameter"] + parameters: MissingParameterParameters + error_instance_id: str + + +class MultipleGroupByOnFieldNotSupportedParameters(typing_extensions.TypedDict): + """Aggregation cannot group by on the same field multiple times.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + duplicateFields: typing.List[str] + + +@dataclass +class MultipleGroupByOnFieldNotSupported(errors.BadRequestError): + name: typing.Literal["MultipleGroupByOnFieldNotSupported"] + parameters: MultipleGroupByOnFieldNotSupportedParameters + error_instance_id: str + + +class MultiplePropertyValuesNotSupportedParameters(typing_extensions.TypedDict): + """ + One of the requested property filters does not support multiple values. Please include only a single value for + it. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + propertyFilter: ontologies_models.PropertyFilter + property: ontologies_models.PropertyApiName + + +@dataclass +class MultiplePropertyValuesNotSupported(errors.BadRequestError): + name: typing.Literal["MultiplePropertyValuesNotSupported"] + parameters: MultiplePropertyValuesNotSupportedParameters + error_instance_id: str + + +class NotCipherFormattedParameters(typing_extensions.TypedDict): + """ + The value intended for decryption with Cipher is not formatted correctly. + It may already be a plaintext value and not require decryption. + Ensure it is correctly formatted (CIPHER::::::CIPHER). + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + value: str + + +@dataclass +class NotCipherFormatted(errors.BadRequestError): + name: typing.Literal["NotCipherFormatted"] + parameters: NotCipherFormattedParameters + error_instance_id: str + + +class ObjectAlreadyExistsParameters(typing_extensions.TypedDict): + """The object the user is attempting to create already exists.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class ObjectAlreadyExists(errors.ConflictError): + name: typing.Literal["ObjectAlreadyExists"] + parameters: ObjectAlreadyExistsParameters + error_instance_id: str + + +class ObjectChangedParameters(typing_extensions.TypedDict): + """An object used by this `Action` was changed by someone else while the `Action` was running.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + primaryKey: typing_extensions.NotRequired[ontologies_models.PropertyValue] + objectType: typing_extensions.NotRequired[ontologies_models.ObjectTypeApiName] + + +@dataclass +class ObjectChanged(errors.ConflictError): + name: typing.Literal["ObjectChanged"] + parameters: ObjectChangedParameters + error_instance_id: str + + +class ObjectNotFoundParameters(typing_extensions.TypedDict): + """The requested object is not found, or the client token does not have access to it.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + objectType: typing_extensions.NotRequired[ontologies_models.ObjectTypeApiName] + primaryKey: typing.Dict[ontologies_models.PropertyApiName, ontologies_models.PrimaryKeyValue] + + +@dataclass +class ObjectNotFound(errors.NotFoundError): + name: typing.Literal["ObjectNotFound"] + parameters: ObjectNotFoundParameters + error_instance_id: str + + +class ObjectSetNotFoundParameters(typing_extensions.TypedDict): + """The requested object set is not found, or the client token does not have access to it.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + objectSetRid: ontologies_models.ObjectSetRid + + +@dataclass +class ObjectSetNotFound(errors.NotFoundError): + name: typing.Literal["ObjectSetNotFound"] + parameters: ObjectSetNotFoundParameters + error_instance_id: str + + +class ObjectTypeNotFoundParameters(typing_extensions.TypedDict): + """The requested object type is not found, or the client token does not have access to it.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + objectType: typing_extensions.NotRequired[ontologies_models.ObjectTypeApiName] + objectTypeRid: typing_extensions.NotRequired[ontologies_models.ObjectTypeRid] + + +@dataclass +class ObjectTypeNotFound(errors.NotFoundError): + name: typing.Literal["ObjectTypeNotFound"] + parameters: ObjectTypeNotFoundParameters + error_instance_id: str + + +class ObjectTypeNotSyncedParameters(typing_extensions.TypedDict): + """ + The requested object type is not synced into the ontology. Please reach out to your Ontology + Administrator to re-index the object type in Ontology Management Application. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + objectType: ontologies_models.ObjectTypeApiName + + +@dataclass +class ObjectTypeNotSynced(errors.ConflictError): + name: typing.Literal["ObjectTypeNotSynced"] + parameters: ObjectTypeNotSyncedParameters + error_instance_id: str + + +class ObjectTypesNotSyncedParameters(typing_extensions.TypedDict): + """ + One or more of the requested object types are not synced into the ontology. Please reach out to your Ontology + Administrator to re-index the object type(s) in Ontology Management Application. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + objectTypes: typing.List[ontologies_models.ObjectTypeApiName] + + +@dataclass +class ObjectTypesNotSynced(errors.ConflictError): + name: typing.Literal["ObjectTypesNotSynced"] + parameters: ObjectTypesNotSyncedParameters + error_instance_id: str + + +class ObjectsExceededLimitParameters(typing_extensions.TypedDict): + """ + There are more objects, but they cannot be returned by this API. Only 10,000 objects are available through this + API for a given request. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class ObjectsExceededLimit(errors.BadRequestError): + name: typing.Literal["ObjectsExceededLimit"] + parameters: ObjectsExceededLimitParameters + error_instance_id: str + + +class ObjectsModifiedConcurrentlyParameters(typing_extensions.TypedDict): + """ + The provided objects are being modified concurrently and the operation would result in a conflict. + The client should retry the request later. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + functionRid: typing_extensions.NotRequired[ontologies_models.FunctionRid] + functionVersion: typing_extensions.NotRequired[ontologies_models.FunctionVersion] + + +@dataclass +class ObjectsModifiedConcurrently(errors.ConflictError): + name: typing.Literal["ObjectsModifiedConcurrently"] + parameters: ObjectsModifiedConcurrentlyParameters + error_instance_id: str + + +class OntologyApiNameNotUniqueParameters(typing_extensions.TypedDict): + """The given Ontology API name is not unique. Use the Ontology RID in place of the Ontology API name.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + ontologyApiName: ontologies_models.OntologyApiName + + +@dataclass +class OntologyApiNameNotUnique(errors.BadRequestError): + name: typing.Literal["OntologyApiNameNotUnique"] + parameters: OntologyApiNameNotUniqueParameters + error_instance_id: str + + +class OntologyEditsExceededLimitParameters(typing_extensions.TypedDict): + """ + The number of edits to the Ontology exceeded the allowed limit. + This may happen because of the request or because the Action is modifying too many objects. + Please change the size of your request or contact the Ontology administrator. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + editsCount: int + editsLimit: int + + +@dataclass +class OntologyEditsExceededLimit(errors.BadRequestError): + name: typing.Literal["OntologyEditsExceededLimit"] + parameters: OntologyEditsExceededLimitParameters + error_instance_id: str + + +class OntologyNotFoundParameters(typing_extensions.TypedDict): + """The requested Ontology is not found, or the client token does not have access to it.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + ontologyRid: typing_extensions.NotRequired[ontologies_models.OntologyRid] + apiName: typing_extensions.NotRequired[ontologies_models.OntologyApiName] + + +@dataclass +class OntologyNotFound(errors.NotFoundError): + name: typing.Literal["OntologyNotFound"] + parameters: OntologyNotFoundParameters + error_instance_id: str + + +class OntologySyncingParameters(typing_extensions.TypedDict): + """ + The requested object type has been changed in the **Ontology Manager** and changes are currently being applied. Wait a + few seconds and try again. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + objectType: ontologies_models.ObjectTypeApiName + + +@dataclass +class OntologySyncing(errors.ConflictError): + name: typing.Literal["OntologySyncing"] + parameters: OntologySyncingParameters + error_instance_id: str + + +class OntologySyncingObjectTypesParameters(typing_extensions.TypedDict): + """ + One or more requested object types have been changed in the **Ontology Manager** and changes are currently being + applied. Wait a few seconds and try again. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + objectTypes: typing.List[ontologies_models.ObjectTypeApiName] + + +@dataclass +class OntologySyncingObjectTypes(errors.ConflictError): + name: typing.Literal["OntologySyncingObjectTypes"] + parameters: OntologySyncingObjectTypesParameters + error_instance_id: str + + +class ParameterObjectNotFoundParameters(typing_extensions.TypedDict): + """The parameter object reference or parameter default value is not found, or the client token does not have access to it.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + objectType: ontologies_models.ObjectTypeApiName + primaryKey: typing.Dict[ontologies_models.PropertyApiName, ontologies_models.PrimaryKeyValue] + + +@dataclass +class ParameterObjectNotFound(errors.NotFoundError): + name: typing.Literal["ParameterObjectNotFound"] + parameters: ParameterObjectNotFoundParameters + error_instance_id: str + + +class ParameterObjectSetRidNotFoundParameters(typing_extensions.TypedDict): + """The parameter object set RID is not found, or the client token does not have access to it.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + objectSetRid: core.RID + + +@dataclass +class ParameterObjectSetRidNotFound(errors.NotFoundError): + name: typing.Literal["ParameterObjectSetRidNotFound"] + parameters: ParameterObjectSetRidNotFoundParameters + error_instance_id: str + + +class ParameterTypeNotSupportedParameters(typing_extensions.TypedDict): + """ + The type of the requested parameter is not currently supported by this API. If you need support for this, + please reach out to Palantir Support. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + parameterId: ontologies_models.ParameterId + parameterBaseType: ontologies_models.ValueType + + +@dataclass +class ParameterTypeNotSupported(errors.BadRequestError): + name: typing.Literal["ParameterTypeNotSupported"] + parameters: ParameterTypeNotSupportedParameters + error_instance_id: str + + +class ParametersNotFoundParameters(typing_extensions.TypedDict): + """ + The provided parameter ID was not found for the action. Please look at the `configuredParameterIds` field + to see which ones are available. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + actionType: ontologies_models.ActionTypeApiName + unknownParameterIds: typing.List[ontologies_models.ParameterId] + configuredParameterIds: typing.List[ontologies_models.ParameterId] + + +@dataclass +class ParametersNotFound(errors.BadRequestError): + name: typing.Literal["ParametersNotFound"] + parameters: ParametersNotFoundParameters + error_instance_id: str + + +class ParentAttachmentPermissionDeniedParameters(typing_extensions.TypedDict): + """The user does not have permission to parent attachments.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class ParentAttachmentPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["ParentAttachmentPermissionDenied"] + parameters: ParentAttachmentPermissionDeniedParameters + error_instance_id: str + + +class PropertiesHaveDifferentIdsParameters(typing_extensions.TypedDict): + """Properties used in ordering must have the same ids.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + properties: typing.List[ontologies_models.SharedPropertyTypeApiName] + + +@dataclass +class PropertiesHaveDifferentIds(errors.BadRequestError): + name: typing.Literal["PropertiesHaveDifferentIds"] + parameters: PropertiesHaveDifferentIdsParameters + error_instance_id: str + + +class PropertiesNotFilterableParameters(typing_extensions.TypedDict): + """ + Results could not be filtered by the requested properties. Please mark the properties as *Searchable* and + *Selectable* in the **Ontology Manager** to be able to filter on those properties. There may be a short delay + between the time a property is marked *Searchable* and *Selectable* and when it can be used. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + properties: typing.List[ontologies_models.PropertyApiName] + + +@dataclass +class PropertiesNotFilterable(errors.BadRequestError): + name: typing.Literal["PropertiesNotFilterable"] + parameters: PropertiesNotFilterableParameters + error_instance_id: str + + +class PropertiesNotFoundParameters(typing_extensions.TypedDict): + """The requested properties are not found on the object type.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + objectType: ontologies_models.ObjectTypeApiName + properties: typing.List[ontologies_models.PropertyApiName] + + +@dataclass +class PropertiesNotFound(errors.NotFoundError): + name: typing.Literal["PropertiesNotFound"] + parameters: PropertiesNotFoundParameters + error_instance_id: str + + +class PropertiesNotSearchableParameters(typing_extensions.TypedDict): + """ + Search is not enabled on the specified properties. Please mark the properties as *Searchable* + in the **Ontology Manager** to enable search on them. There may be a short delay + between the time a property is marked *Searchable* and when it can be used. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + propertyApiNames: typing.List[ontologies_models.PropertyApiName] + + +@dataclass +class PropertiesNotSearchable(errors.BadRequestError): + name: typing.Literal["PropertiesNotSearchable"] + parameters: PropertiesNotSearchableParameters + error_instance_id: str + + +class PropertiesNotSortableParameters(typing_extensions.TypedDict): + """ + Results could not be ordered by the requested properties. Please mark the properties as *Searchable* and + *Sortable* in the **Ontology Manager** to enable their use in `orderBy` parameters. There may be a short delay + between the time a property is set to *Searchable* and *Sortable* and when it can be used. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + properties: typing.List[ontologies_models.PropertyApiName] + + +@dataclass +class PropertiesNotSortable(errors.BadRequestError): + name: typing.Literal["PropertiesNotSortable"] + parameters: PropertiesNotSortableParameters + error_instance_id: str + + +class PropertyApiNameNotFoundParameters(typing_extensions.TypedDict): + """ + A property that was required to have an API name, such as a primary key, is missing one. You can set an API + name for it using the **Ontology Manager**. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + propertyId: ontologies_models.PropertyId + propertyBaseType: ontologies_models.ValueType + + +@dataclass +class PropertyApiNameNotFound(errors.BadRequestError): + name: typing.Literal["PropertyApiNameNotFound"] + parameters: PropertyApiNameNotFoundParameters + error_instance_id: str + + +class PropertyBaseTypeNotSupportedParameters(typing_extensions.TypedDict): + """ + The type of the requested property is not currently supported by this API. If you need support for this, + please reach out to Palantir Support. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + objectType: ontologies_models.ObjectTypeApiName + property: ontologies_models.PropertyApiName + propertyBaseType: ontologies_models.ValueType + + +@dataclass +class PropertyBaseTypeNotSupported(errors.BadRequestError): + name: typing.Literal["PropertyBaseTypeNotSupported"] + parameters: PropertyBaseTypeNotSupportedParameters + error_instance_id: str + + +class PropertyExactMatchingNotSupportedParameters(typing_extensions.TypedDict): + """A property that does not support exact matching is used in a setting that requires exact matching.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + propertyBaseType: ontologies_models.ValueType + propertyTypeRid: typing_extensions.NotRequired[ontologies_models.PropertyTypeRid] + + +@dataclass +class PropertyExactMatchingNotSupported(errors.BadRequestError): + name: typing.Literal["PropertyExactMatchingNotSupported"] + parameters: PropertyExactMatchingNotSupportedParameters + error_instance_id: str + + +class PropertyFiltersNotSupportedParameters(typing_extensions.TypedDict): + """ + At least one of the requested property filters are not supported. See the documentation of `PropertyFilter` for + a list of supported property filters. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + propertyFilters: typing.List[ontologies_models.PropertyFilter] + property: ontologies_models.PropertyApiName + + +@dataclass +class PropertyFiltersNotSupported(errors.BadRequestError): + name: typing.Literal["PropertyFiltersNotSupported"] + parameters: PropertyFiltersNotSupportedParameters + error_instance_id: str + + +class PropertyNotFoundParameters(typing_extensions.TypedDict): + """Failed to find a provided property for a given object.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class PropertyNotFound(errors.BadRequestError): + name: typing.Literal["PropertyNotFound"] + parameters: PropertyNotFoundParameters + error_instance_id: str + + +class PropertyNotFoundOnObjectParameters(typing_extensions.TypedDict): + """Could not find the given property on the object. The user may not have permissions to see this property or it may be configured incorrectly.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + objectTypeRid: ontologies_models.ObjectTypeRid + objectRid: ontologies_models.ObjectRid + objectPropertyRid: ontologies_models.PropertyTypeRid + + +@dataclass +class PropertyNotFoundOnObject(errors.BadRequestError): + name: typing.Literal["PropertyNotFoundOnObject"] + parameters: PropertyNotFoundOnObjectParameters + error_instance_id: str + + +class PropertyTypeDoesNotSupportNearestNeighborsParameters(typing_extensions.TypedDict): + """The provided propertyIdentifier is not configured with an embedding model in the ontology.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class PropertyTypeDoesNotSupportNearestNeighbors(errors.BadRequestError): + name: typing.Literal["PropertyTypeDoesNotSupportNearestNeighbors"] + parameters: PropertyTypeDoesNotSupportNearestNeighborsParameters + error_instance_id: str + + +class PropertyTypeNotFoundParameters(typing_extensions.TypedDict): + """The requested property type is not found, or the client token does not have access to it.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + objectTypeApiName: typing_extensions.NotRequired[ontologies_models.ObjectTypeApiName] + propertyApiName: typing_extensions.NotRequired[ontologies_models.PropertyApiName] + + +@dataclass +class PropertyTypeNotFound(errors.NotFoundError): + name: typing.Literal["PropertyTypeNotFound"] + parameters: PropertyTypeNotFoundParameters + error_instance_id: str + + +class PropertyTypeRidNotFoundParameters(typing_extensions.TypedDict): + """The requested property type RID is not found, or the client token does not have access to it.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + propertyTypeRid: typing_extensions.NotRequired[ontologies_models.PropertyTypeRid] + + +@dataclass +class PropertyTypeRidNotFound(errors.NotFoundError): + name: typing.Literal["PropertyTypeRidNotFound"] + parameters: PropertyTypeRidNotFoundParameters + error_instance_id: str + + +class PropertyTypesSearchNotSupportedParameters(typing_extensions.TypedDict): + """ + The search on the property types are not supported. See the `Search Objects` documentation for + a list of supported search queries on different property types. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + parameters: typing.Dict[ + ontologies_models.PropertyFilter, typing.List[ontologies_models.PropertyApiName] + ] + + +@dataclass +class PropertyTypesSearchNotSupported(errors.BadRequestError): + name: typing.Literal["PropertyTypesSearchNotSupported"] + parameters: PropertyTypesSearchNotSupportedParameters + error_instance_id: str + + +class QueryEncounteredUserFacingErrorParameters(typing_extensions.TypedDict): + """ + The authored `Query` failed to execute because of a user induced error. The message argument + is meant to be displayed to the user. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + functionRid: ontologies_models.FunctionRid + functionVersion: ontologies_models.FunctionVersion + message: str + + +@dataclass +class QueryEncounteredUserFacingError(errors.ConflictError): + name: typing.Literal["QueryEncounteredUserFacingError"] + parameters: QueryEncounteredUserFacingErrorParameters + error_instance_id: str + + +class QueryMemoryExceededLimitParameters(typing_extensions.TypedDict): + """Memory limits were exceeded for the `Query` execution.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + functionRid: ontologies_models.FunctionRid + functionVersion: ontologies_models.FunctionVersion + + +@dataclass +class QueryMemoryExceededLimit(errors.InternalServerError): + name: typing.Literal["QueryMemoryExceededLimit"] + parameters: QueryMemoryExceededLimitParameters + error_instance_id: str + + +class QueryNotFoundParameters(typing_extensions.TypedDict): + """The query is not found, or the user does not have access to it.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + query: ontologies_models.QueryApiName + + +@dataclass +class QueryNotFound(errors.NotFoundError): + name: typing.Literal["QueryNotFound"] + parameters: QueryNotFoundParameters + error_instance_id: str + + +class QueryRuntimeErrorParameters(typing_extensions.TypedDict): + """The authored `Query` failed to execute because of a runtime error.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + functionRid: ontologies_models.FunctionRid + functionVersion: ontologies_models.FunctionVersion + message: typing_extensions.NotRequired[str] + stacktrace: typing_extensions.NotRequired[str] + parameters: typing.Dict[ontologies_models.QueryRuntimeErrorParameter, str] + + +@dataclass +class QueryRuntimeError(errors.BadRequestError): + name: typing.Literal["QueryRuntimeError"] + parameters: QueryRuntimeErrorParameters + error_instance_id: str + + +class QueryTimeExceededLimitParameters(typing_extensions.TypedDict): + """Time limits were exceeded for the `Query` execution.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + functionRid: ontologies_models.FunctionRid + functionVersion: ontologies_models.FunctionVersion + + +@dataclass +class QueryTimeExceededLimit(errors.InternalServerError): + name: typing.Literal["QueryTimeExceededLimit"] + parameters: QueryTimeExceededLimitParameters + error_instance_id: str + + +class QueryVersionNotFoundParameters(typing_extensions.TypedDict): + """The query could not be found at the provided version.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + apiName: ontologies_models.QueryApiName + version: ontologies_models.FunctionVersion + + +@dataclass +class QueryVersionNotFound(errors.NotFoundError): + name: typing.Literal["QueryVersionNotFound"] + parameters: QueryVersionNotFoundParameters + error_instance_id: str + + +class RateLimitReachedParameters(typing_extensions.TypedDict): + """Unable to decrypt this CipherText because the available rate limits in Cipher licenses were reached.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + cipherChannel: core.RID + + +@dataclass +class RateLimitReached(errors.PermissionDeniedError): + name: typing.Literal["RateLimitReached"] + parameters: RateLimitReachedParameters + error_instance_id: str + + +class SharedPropertiesNotFoundParameters(typing_extensions.TypedDict): + """The requested shared property types are not present on every object type.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + objectType: typing.List[ontologies_models.ObjectTypeApiName] + missingSharedProperties: typing.List[ontologies_models.SharedPropertyTypeApiName] + + +@dataclass +class SharedPropertiesNotFound(errors.NotFoundError): + name: typing.Literal["SharedPropertiesNotFound"] + parameters: SharedPropertiesNotFoundParameters + error_instance_id: str + + +class SharedPropertyTypeNotFoundParameters(typing_extensions.TypedDict): + """The requested shared property type is not found, or the client token does not have access to it.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + apiName: typing_extensions.NotRequired[ontologies_models.SharedPropertyTypeApiName] + rid: typing_extensions.NotRequired[ontologies_models.SharedPropertyTypeRid] + + +@dataclass +class SharedPropertyTypeNotFound(errors.NotFoundError): + name: typing.Literal["SharedPropertyTypeNotFound"] + parameters: SharedPropertyTypeNotFoundParameters + error_instance_id: str + + +class SimilarityThresholdOutOfRangeParameters(typing_extensions.TypedDict): + """The value of the similarity threshold must be in the range 0 <= threshold <= 1.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + providedThreshold: float + + +@dataclass +class SimilarityThresholdOutOfRange(errors.BadRequestError): + name: typing.Literal["SimilarityThresholdOutOfRange"] + parameters: SimilarityThresholdOutOfRangeParameters + error_instance_id: str + + +class TooManyNearestNeighborsRequestedParameters(typing_extensions.TypedDict): + """The value of numNeighbors must be in the range 1 <= numNeighbors <= 500.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + requestedNumNeighbors: int + maxNumNeighbors: int + + +@dataclass +class TooManyNearestNeighborsRequested(errors.BadRequestError): + name: typing.Literal["TooManyNearestNeighborsRequested"] + parameters: TooManyNearestNeighborsRequestedParameters + error_instance_id: str + + +class UnauthorizedCipherOperationParameters(typing_extensions.TypedDict): + """The provided token does not have permission to take a specific Cipher operation.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + cipherChannel: core.RID + + +@dataclass +class UnauthorizedCipherOperation(errors.PermissionDeniedError): + name: typing.Literal["UnauthorizedCipherOperation"] + parameters: UnauthorizedCipherOperationParameters + error_instance_id: str + + +class UndecryptableValueParameters(typing_extensions.TypedDict): + """ + The value intended for decryption with Cipher cannot be decrypted. + Ensure it is correctly formatted (CIPHER:::::CIPHER). + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + value: str + + +@dataclass +class UndecryptableValue(errors.BadRequestError): + name: typing.Literal["UndecryptableValue"] + parameters: UndecryptableValueParameters + error_instance_id: str + + +class UniqueIdentifierLinkIdsDoNotExistInActionTypeParameters(typing_extensions.TypedDict): + """ + One or more unique identifier link IDs specified in apply action overrides could not be found + in the ActionType definition. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + unknownUniqueIdentifierLinkIds: typing.List[ontologies_models.UniqueIdentifierLinkId] + + +@dataclass +class UniqueIdentifierLinkIdsDoNotExistInActionType(errors.BadRequestError): + name: typing.Literal["UniqueIdentifierLinkIdsDoNotExistInActionType"] + parameters: UniqueIdentifierLinkIdsDoNotExistInActionTypeParameters + error_instance_id: str + + +class UnknownParameterParameters(typing_extensions.TypedDict): + """ + The provided parameters were not found. Please look at the `knownParameters` field + to see which ones are available. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + unknownParameters: typing.List[ontologies_models.ParameterId] + expectedParameters: typing.List[ontologies_models.ParameterId] + + +@dataclass +class UnknownParameter(errors.BadRequestError): + name: typing.Literal["UnknownParameter"] + parameters: UnknownParameterParameters + error_instance_id: str + + +class UnsupportedInterfaceBasedObjectSetParameters(typing_extensions.TypedDict): + """Aggregations on interface-based object sets are not supported for object sets with OSv1 objects.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + interfaceType: ontologies_models.InterfaceTypeApiName + + +@dataclass +class UnsupportedInterfaceBasedObjectSet(errors.BadRequestError): + name: typing.Literal["UnsupportedInterfaceBasedObjectSet"] + parameters: UnsupportedInterfaceBasedObjectSetParameters + error_instance_id: str + + +class UnsupportedObjectSetParameters(typing_extensions.TypedDict): + """The requested object set is not supported.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class UnsupportedObjectSet(errors.BadRequestError): + name: typing.Literal["UnsupportedObjectSet"] + parameters: UnsupportedObjectSetParameters + error_instance_id: str + + +class ValueTypeNotFoundParameters(typing_extensions.TypedDict): + """The value type is not found, or the user does not have access to it.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + valueType: typing_extensions.NotRequired[ontologies_models.ValueTypeApiName] + rid: typing_extensions.NotRequired[ontologies_models.ValueTypeRid] + + +@dataclass +class ValueTypeNotFound(errors.NotFoundError): + name: typing.Literal["ValueTypeNotFound"] + parameters: ValueTypeNotFoundParameters + error_instance_id: str + + +class ViewObjectPermissionDeniedParameters(typing_extensions.TypedDict): + """ + The provided token does not have permission to view any data sources backing this object type. Ensure the object + type has backing data sources configured and visible. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + objectType: ontologies_models.ObjectTypeApiName + + +@dataclass +class ViewObjectPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["ViewObjectPermissionDenied"] + parameters: ViewObjectPermissionDeniedParameters + error_instance_id: str + + +__all__ = [ + "ActionContainsDuplicateEdits", + "ActionEditedPropertiesNotFound", + "ActionEditsReadOnlyEntity", + "ActionNotFound", + "ActionParameterInterfaceTypeNotFound", + "ActionParameterObjectNotFound", + "ActionParameterObjectTypeNotFound", + "ActionTypeNotFound", + "ActionValidationFailed", + "AggregationAccuracyNotSupported", + "AggregationGroupCountExceededLimit", + "AggregationMemoryExceededLimit", + "AggregationNestedObjectSetSizeExceededLimit", + "ApplyActionFailed", + "AttachmentNotFound", + "AttachmentRidAlreadyExists", + "AttachmentSizeExceededLimit", + "CipherChannelNotFound", + "CompositePrimaryKeyNotSupported", + "ConsistentSnapshotError", + "DefaultAndNullGroupsNotSupported", + "DerivedPropertyApiNamesNotUnique", + "DuplicateOrderBy", + "EditObjectPermissionDenied", + "FunctionEncounteredUserFacingError", + "FunctionExecutionFailed", + "FunctionExecutionTimedOut", + "FunctionInvalidInput", + "HighScaleComputationNotEnabled", + "InterfaceBasedObjectSetNotSupported", + "InterfaceLinkTypeNotFound", + "InterfacePropertiesHaveDifferentIds", + "InterfacePropertiesNotFound", + "InterfacePropertyNotFound", + "InterfaceTypeNotFound", + "InterfaceTypesNotFound", + "InvalidAggregationOrdering", + "InvalidAggregationOrderingWithNullValues", + "InvalidAggregationRange", + "InvalidAggregationRangePropertyType", + "InvalidAggregationRangePropertyTypeForInterface", + "InvalidAggregationRangeValue", + "InvalidAggregationRangeValueForInterface", + "InvalidApplyActionOptionCombination", + "InvalidContentLength", + "InvalidContentType", + "InvalidDerivedPropertyDefinition", + "InvalidDurationGroupByPropertyType", + "InvalidDurationGroupByPropertyTypeForInterface", + "InvalidDurationGroupByValue", + "InvalidFields", + "InvalidGroupId", + "InvalidOrderType", + "InvalidParameterValue", + "InvalidPropertyFilterValue", + "InvalidPropertyFiltersCombination", + "InvalidPropertyType", + "InvalidPropertyValue", + "InvalidQueryOutputValue", + "InvalidQueryParameterValue", + "InvalidRangeQuery", + "InvalidSortOrder", + "InvalidSortType", + "InvalidTransactionEditPropertyValue", + "InvalidUserId", + "InvalidVectorDimension", + "LinkAlreadyExists", + "LinkTypeNotFound", + "LinkedObjectNotFound", + "LoadObjectSetLinksNotSupported", + "MalformedPropertyFilters", + "MarketplaceActionMappingNotFound", + "MarketplaceInstallationNotFound", + "MarketplaceLinkMappingNotFound", + "MarketplaceObjectMappingNotFound", + "MarketplaceQueryMappingNotFound", + "MarketplaceSdkActionMappingNotFound", + "MarketplaceSdkInstallationNotFound", + "MarketplaceSdkLinkMappingNotFound", + "MarketplaceSdkObjectMappingNotFound", + "MarketplaceSdkPropertyMappingNotFound", + "MarketplaceSdkQueryMappingNotFound", + "MissingParameter", + "MultipleGroupByOnFieldNotSupported", + "MultiplePropertyValuesNotSupported", + "NotCipherFormatted", + "ObjectAlreadyExists", + "ObjectChanged", + "ObjectNotFound", + "ObjectSetNotFound", + "ObjectTypeNotFound", + "ObjectTypeNotSynced", + "ObjectTypesNotSynced", + "ObjectsExceededLimit", + "ObjectsModifiedConcurrently", + "OntologyApiNameNotUnique", + "OntologyEditsExceededLimit", + "OntologyNotFound", + "OntologySyncing", + "OntologySyncingObjectTypes", + "ParameterObjectNotFound", + "ParameterObjectSetRidNotFound", + "ParameterTypeNotSupported", + "ParametersNotFound", + "ParentAttachmentPermissionDenied", + "PropertiesHaveDifferentIds", + "PropertiesNotFilterable", + "PropertiesNotFound", + "PropertiesNotSearchable", + "PropertiesNotSortable", + "PropertyApiNameNotFound", + "PropertyBaseTypeNotSupported", + "PropertyExactMatchingNotSupported", + "PropertyFiltersNotSupported", + "PropertyNotFound", + "PropertyNotFoundOnObject", + "PropertyTypeDoesNotSupportNearestNeighbors", + "PropertyTypeNotFound", + "PropertyTypeRidNotFound", + "PropertyTypesSearchNotSupported", + "QueryEncounteredUserFacingError", + "QueryMemoryExceededLimit", + "QueryNotFound", + "QueryRuntimeError", + "QueryTimeExceededLimit", + "QueryVersionNotFound", + "RateLimitReached", + "SharedPropertiesNotFound", + "SharedPropertyTypeNotFound", + "SimilarityThresholdOutOfRange", + "TooManyNearestNeighborsRequested", + "UnauthorizedCipherOperation", + "UndecryptableValue", + "UniqueIdentifierLinkIdsDoNotExistInActionType", + "UnknownParameter", + "UnsupportedInterfaceBasedObjectSet", + "UnsupportedObjectSet", + "ValueTypeNotFound", + "ViewObjectPermissionDenied", +] diff --git a/foundry_sdk/v1/ontologies/models.py b/foundry_sdk/v1/ontologies/models.py new file mode 100644 index 000000000..b5bc3f361 --- /dev/null +++ b/foundry_sdk/v1/ontologies/models.py @@ -0,0 +1,1702 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk.v1.core import models as core_models + +ActionRid = core.RID +"""The unique resource identifier for an action.""" + + +class ActionType(core.ModelBase): + """Represents an action type in the Ontology.""" + + api_name: ActionTypeApiName = pydantic.Field(alias=str("apiName")) # type: ignore[literal-required] + description: typing.Optional[str] = None + display_name: typing.Optional[core_models.DisplayName] = pydantic.Field(alias=str("displayName"), default=None) # type: ignore[literal-required] + status: core_models.ReleaseStatus + parameters: typing.Dict[ParameterId, Parameter] + rid: ActionTypeRid + operations: typing.List[LogicRule] + + +ActionTypeApiName = str +""" +The name of the action type in the API. To find the API name for your Action Type, use the `List action types` +endpoint or check the **Ontology Manager**. +""" + + +ActionTypeRid = core.RID +"""The unique resource identifier of an action type, useful for interacting with other Foundry APIs.""" + + +class AggregateObjectsRequest(core.ModelBase): + """AggregateObjectsRequest""" + + aggregation: typing.List[Aggregation] + query: typing.Optional[SearchJsonQuery] = None + group_by: typing.List[AggregationGroupBy] = pydantic.Field(alias=str("groupBy")) # type: ignore[literal-required] + + +class AggregateObjectsResponse(core.ModelBase): + """AggregateObjectsResponse""" + + excluded_items: typing.Optional[int] = pydantic.Field(alias=str("excludedItems"), default=None) # type: ignore[literal-required] + next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] + data: typing.List[AggregateObjectsResponseItem] + + +class AggregateObjectsResponseItem(core.ModelBase): + """AggregateObjectsResponseItem""" + + group: typing.Dict[AggregationGroupKey, AggregationGroupValue] + metrics: typing.List[AggregationMetricResult] + + +Aggregation = typing_extensions.Annotated[ + typing.Union[ + "ApproximateDistinctAggregation", + "MinAggregation", + "AvgAggregation", + "MaxAggregation", + "CountAggregation", + "SumAggregation", + ], + pydantic.Field(discriminator="type"), +] +"""Specifies an aggregation function.""" + + +class AggregationDurationGrouping(core.ModelBase): + """ + Divides objects into groups according to an interval. Note that this grouping applies only on date types. + The interval uses the ISO 8601 notation. For example, "PT1H2M34S" represents a duration of 3754 seconds. + """ + + field: FieldNameV1 + duration: Duration + type: typing.Literal["duration"] = "duration" + + +class AggregationExactGrouping(core.ModelBase): + """Divides objects into groups according to an exact value.""" + + field: FieldNameV1 + max_group_count: typing.Optional[int] = pydantic.Field(alias=str("maxGroupCount"), default=None) # type: ignore[literal-required] + type: typing.Literal["exact"] = "exact" + + +class AggregationFixedWidthGrouping(core.ModelBase): + """Divides objects into groups with the specified width.""" + + field: FieldNameV1 + fixed_width: int = pydantic.Field(alias=str("fixedWidth")) # type: ignore[literal-required] + type: typing.Literal["fixedWidth"] = "fixedWidth" + + +AggregationGroupBy = typing_extensions.Annotated[ + typing.Union[ + "AggregationDurationGrouping", + "AggregationFixedWidthGrouping", + "AggregationRangesGrouping", + "AggregationExactGrouping", + ], + pydantic.Field(discriminator="type"), +] +"""Specifies a grouping for aggregation results.""" + + +AggregationGroupKey = str +"""AggregationGroupKey""" + + +AggregationGroupValue = typing.Any +"""AggregationGroupValue""" + + +AggregationMetricName = str +"""A user-specified alias for an aggregation metric name.""" + + +class AggregationMetricResult(core.ModelBase): + """AggregationMetricResult""" + + name: str + value: typing.Optional[float] = None + """TBD""" + + +class AggregationRange(core.ModelBase): + """Specifies a date range from an inclusive start date to an exclusive end date.""" + + lt: typing.Optional[typing.Any] = None + """Exclusive end date.""" + + lte: typing.Optional[typing.Any] = None + """Inclusive end date.""" + + gt: typing.Optional[typing.Any] = None + """Exclusive start date.""" + + gte: typing.Optional[typing.Any] = None + """Inclusive start date.""" + + +class AggregationRangesGrouping(core.ModelBase): + """Divides objects into groups according to specified ranges.""" + + field: FieldNameV1 + ranges: typing.List[AggregationRange] + type: typing.Literal["ranges"] = "ranges" + + +class AllTermsQuery(core.ModelBase): + """ + Returns objects where the specified field contains all of the whitespace separated words in any + order in the provided value. This query supports fuzzy matching. + """ + + field: FieldNameV1 + value: str + fuzzy: typing.Optional[Fuzzy] = None + type: typing.Literal["allTerms"] = "allTerms" + + +class AndQuery(core.ModelBase): + """Returns objects where every query is satisfied.""" + + value: typing.List[SearchJsonQuery] + type: typing.Literal["and"] = "and" + + +class AnyTermQuery(core.ModelBase): + """ + Returns objects where the specified field contains any of the whitespace separated words in any + order in the provided value. This query supports fuzzy matching. + """ + + field: FieldNameV1 + value: str + fuzzy: typing.Optional[Fuzzy] = None + type: typing.Literal["anyTerm"] = "anyTerm" + + +ApplyActionMode = typing.Literal["VALIDATE_ONLY", "VALIDATE_AND_EXECUTE"] +"""ApplyActionMode""" + + +class ApplyActionRequest(core.ModelBase): + """ApplyActionRequest""" + + parameters: typing.Dict[ParameterId, typing.Optional[DataValue]] + + +class ApplyActionRequestOptions(core.ModelBase): + """ApplyActionRequestOptions""" + + mode: typing.Optional[ApplyActionMode] = None + return_edits: typing.Optional[ReturnEditsMode] = pydantic.Field(alias=str("returnEdits"), default=None) # type: ignore[literal-required] + + +class ApplyActionResponse(core.ModelBase): + """ApplyActionResponse""" + + +class ApproximateDistinctAggregation(core.ModelBase): + """Computes an approximate number of distinct values for the provided field.""" + + field: FieldNameV1 + name: typing.Optional[AggregationMetricName] = None + type: typing.Literal["approximateDistinct"] = "approximateDistinct" + + +class ArrayEvaluatedConstraint(core.ModelBase): + """Evaluated constraints of array parameters that support per-entry constraint evaluations.""" + + entries: typing.List[ArrayEntryEvaluatedConstraint] + type: typing.Literal["array"] = "array" + + +class ArraySizeConstraint(core.ModelBase): + """The parameter expects an array of values and the size of the array must fall within the defined range.""" + + lt: typing.Optional[typing.Any] = None + """Less than""" + + lte: typing.Optional[typing.Any] = None + """Less than or equal""" + + gt: typing.Optional[typing.Any] = None + """Greater than""" + + gte: typing.Optional[typing.Any] = None + """Greater than or equal""" + + type: typing.Literal["arraySize"] = "arraySize" + + +ArtifactRepositoryRid = core.RID +"""ArtifactRepositoryRid""" + + +class Attachment(core.ModelBase): + """The representation of an attachment.""" + + rid: AttachmentRid + filename: core_models.Filename + size_bytes: core_models.SizeBytes = pydantic.Field(alias=str("sizeBytes")) # type: ignore[literal-required] + media_type: core_models.MediaType = pydantic.Field(alias=str("mediaType")) # type: ignore[literal-required] + + +AttachmentRid = core.RID +"""The unique resource identifier of an attachment.""" + + +class AvgAggregation(core.ModelBase): + """Computes the average value for the provided field.""" + + field: FieldNameV1 + name: typing.Optional[AggregationMetricName] = None + type: typing.Literal["avg"] = "avg" + + +class BatchApplyActionRequest(core.ModelBase): + """BatchApplyActionRequest""" + + requests: typing.List[ApplyActionRequest] + + +class BatchApplyActionResponse(core.ModelBase): + """BatchApplyActionResponse""" + + +class ContainsQuery(core.ModelBase): + """Returns objects where the specified array contains a value.""" + + field: FieldNameV1 + value: PropertyValue + type: typing.Literal["contains"] = "contains" + + +class CountAggregation(core.ModelBase): + """Computes the total count of objects.""" + + name: typing.Optional[AggregationMetricName] = None + type: typing.Literal["count"] = "count" + + +class CreateInterfaceObjectRule(core.ModelBase): + """CreateInterfaceObjectRule""" + + interface_type_api_name: InterfaceTypeApiName = pydantic.Field(alias=str("interfaceTypeApiName")) # type: ignore[literal-required] + type: typing.Literal["createInterfaceObject"] = "createInterfaceObject" + + +class CreateLinkRule(core.ModelBase): + """CreateLinkRule""" + + link_type_api_name_ato_b: LinkTypeApiName = pydantic.Field(alias=str("linkTypeApiNameAtoB")) # type: ignore[literal-required] + link_type_api_name_bto_a: LinkTypeApiName = pydantic.Field(alias=str("linkTypeApiNameBtoA")) # type: ignore[literal-required] + a_side_object_type_api_name: ObjectTypeApiName = pydantic.Field(alias=str("aSideObjectTypeApiName")) # type: ignore[literal-required] + b_side_object_type_api_name: ObjectTypeApiName = pydantic.Field(alias=str("bSideObjectTypeApiName")) # type: ignore[literal-required] + type: typing.Literal["createLink"] = "createLink" + + +class CreateObjectRule(core.ModelBase): + """CreateObjectRule""" + + object_type_api_name: ObjectTypeApiName = pydantic.Field(alias=str("objectTypeApiName")) # type: ignore[literal-required] + type: typing.Literal["createObject"] = "createObject" + + +DataValue = typing.Any +""" +Represents the value of data in the following format. Note that these values can be nested, for example an array of structs. +| Type | JSON encoding | Example | +|-------------------------------------|-------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Array | array | `["alpha", "bravo", "charlie"]` | +| Attachment | string | `"ri.attachments.main.attachment.2f944bae-5851-4204-8615-920c969a9f2e"` | +| Boolean | boolean | `true` | +| Byte | number | `31` | +| CipherText | string | `"CIPHER::ri.bellaso.main.cipher-channel.e414ab9e-b606-499a-a0e1-844fa296ba7e::unzjs3VifsTxuIpf1fH1CJ7OaPBr2bzMMdozPaZJtCii8vVG60yXIEmzoOJaEl9mfFFe::CIPHER"` | +| Date | ISO 8601 extended local date string | `"2021-05-01"` | +| Decimal | string | `"2.718281828"` | +| Double | number | `3.14159265` | +| EntrySet | array of JSON objects | `[{"key": "EMP1234", "value": "true"}, {"key": "EMP4444", "value": "false"}]` | +| Float | number | `3.14159265` | +| Integer | number | `238940` | +| Long | string | `"58319870951433"` | +| Marking | string | `"MU"` | +| Null | null | `null` | +| Object Set | string OR the object set definition | `ri.object-set.main.versioned-object-set.h13274m8-23f5-431c-8aee-a4554157c57z` | +| Ontology Object Reference | JSON encoding of the object's primary key | `10033123` or `"EMP1234"` | +| Ontology Interface Object Reference | JSON encoding of the object's API name and primary key| `{"objectTypeApiName":"Employee", "primaryKeyValue":"EMP1234"}` | +| Ontology Object Type Reference | string of the object type's api name | `"Employee"` | +| Set | array | `["alpha", "bravo", "charlie"]` | +| Short | number | `8739` | +| String | string | `"Call me Ishmael"` | +| Struct | JSON object | `{"name": "John Doe", "age": 42}` | +| TwoDimensionalAggregation | JSON object | `{"groups": [{"key": "alpha", "value": 100}, {"key": "beta", "value": 101}]}` | +| ThreeDimensionalAggregation | JSON object | `{"groups": [{"key": "NYC", "groups": [{"key": "Engineer", "value" : 100}]}]}` | +| Timestamp | ISO 8601 extended offset date-time string in UTC zone | `"2021-01-04T05:00:00Z"` | +""" + + +class DeleteInterfaceObjectRule(core.ModelBase): + """DeleteInterfaceObjectRule""" + + interface_type_api_name: InterfaceTypeApiName = pydantic.Field(alias=str("interfaceTypeApiName")) # type: ignore[literal-required] + type: typing.Literal["deleteInterfaceObject"] = "deleteInterfaceObject" + + +class DeleteLinkRule(core.ModelBase): + """DeleteLinkRule""" + + link_type_api_name_ato_b: LinkTypeApiName = pydantic.Field(alias=str("linkTypeApiNameAtoB")) # type: ignore[literal-required] + link_type_api_name_bto_a: LinkTypeApiName = pydantic.Field(alias=str("linkTypeApiNameBtoA")) # type: ignore[literal-required] + a_side_object_type_api_name: ObjectTypeApiName = pydantic.Field(alias=str("aSideObjectTypeApiName")) # type: ignore[literal-required] + b_side_object_type_api_name: ObjectTypeApiName = pydantic.Field(alias=str("bSideObjectTypeApiName")) # type: ignore[literal-required] + type: typing.Literal["deleteLink"] = "deleteLink" + + +class DeleteObjectRule(core.ModelBase): + """DeleteObjectRule""" + + object_type_api_name: ObjectTypeApiName = pydantic.Field(alias=str("objectTypeApiName")) # type: ignore[literal-required] + type: typing.Literal["deleteObject"] = "deleteObject" + + +DerivedPropertyApiName = str +"""The name of the derived property that will be returned.""" + + +Duration = str +"""An ISO 8601 formatted duration.""" + + +class EntrySetType(core.ModelBase): + """EntrySetType""" + + key_type: QueryDataType = pydantic.Field(alias=str("keyType")) # type: ignore[literal-required] + value_type: QueryDataType = pydantic.Field(alias=str("valueType")) # type: ignore[literal-required] + type: typing.Literal["entrySet"] = "entrySet" + + +class EqualsQuery(core.ModelBase): + """Returns objects where the specified field is equal to a value.""" + + field: FieldNameV1 + value: PropertyValue + type: typing.Literal["eq"] = "eq" + + +class ExecuteQueryRequest(core.ModelBase): + """ExecuteQueryRequest""" + + parameters: typing.Dict[ParameterId, typing.Optional[DataValue]] + + +class ExecuteQueryResponse(core.ModelBase): + """ExecuteQueryResponse""" + + value: DataValue + + +FieldNameV1 = str +"""A reference to an Ontology object property with the form `properties.{propertyApiName}`.""" + + +FilterValue = str +""" +Represents the value of a property filter. For instance, false is the FilterValue in +`properties.{propertyApiName}.isNull=false`. +""" + + +FunctionRid = core.RID +"""The unique resource identifier of a Function, useful for interacting with other Foundry APIs.""" + + +FunctionVersion = str +""" +The version of the given Function, written `..-`, where `-` is optional. +Examples: `1.2.3`, `1.2.3-rc1`. +""" + + +Fuzzy = bool +"""Setting fuzzy to `true` allows approximate matching in search queries that support it.""" + + +class GroupMemberConstraint(core.ModelBase): + """The parameter value must be the user id of a member belonging to at least one of the groups defined by the constraint.""" + + type: typing.Literal["groupMember"] = "groupMember" + + +class GtQuery(core.ModelBase): + """Returns objects where the specified field is greater than a value.""" + + field: FieldNameV1 + value: PropertyValue + type: typing.Literal["gt"] = "gt" + + +class GteQuery(core.ModelBase): + """Returns objects where the specified field is greater than or equal to a value.""" + + field: FieldNameV1 + value: PropertyValue + type: typing.Literal["gte"] = "gte" + + +InterfaceLinkTypeApiName = str +""" +The name of the interface link type in the API. To find the API name for your Interface Link Type, check the +[Ontology Manager](https://palantir.com/docs/foundry/ontology-manager/overview/). +""" + + +InterfaceLinkTypeRid = core.RID +"""The unique resource identifier of an interface link type, useful for interacting with other Foundry APIs.""" + + +InterfacePropertyApiName = str +""" +The name of the interface property type in the API in lowerCamelCase format. To find the API name for your +interface property type, use the `List interface types` endpoint and check the `allPropertiesV2` field or check +the **Ontology Manager**. +""" + + +InterfaceTypeApiName = str +""" +The name of the interface type in the API in UpperCamelCase format. To find the API name for your interface +type, use the `List interface types` endpoint or check the **Ontology Manager**. +""" + + +InterfaceTypeRid = core.RID +"""The unique resource identifier of an interface, useful for interacting with other Foundry APIs.""" + + +class IsNullQuery(core.ModelBase): + """Returns objects based on the existence of the specified field.""" + + field: FieldNameV1 + value: bool + type: typing.Literal["isNull"] = "isNull" + + +LegacyObjectTypeId = str +""" +The unique ID of an object type. This is a legacy identifier and is not recommended for use in new applications. +To find the ID for your Object Type, check the **Ontology Manager**. +""" + + +LegacyPropertyId = str +""" +The unique ID of a property. This is a legacy identifier and is not recommended for use in new applications. +To find the ID for your property, check the **Ontology Manager**. +""" + + +LinkTypeApiName = str +""" +The name of the link type in the API. To find the API name for your Link Type, check the **Ontology Manager** +application. +""" + + +LinkTypeId = str +"""The unique ID of a link type. To find the ID for your link type, check the **Ontology Manager** application.""" + + +class LinkTypeSide(core.ModelBase): + """LinkTypeSide""" + + api_name: LinkTypeApiName = pydantic.Field(alias=str("apiName")) # type: ignore[literal-required] + display_name: core_models.DisplayName = pydantic.Field(alias=str("displayName")) # type: ignore[literal-required] + status: core_models.ReleaseStatus + object_type_api_name: ObjectTypeApiName = pydantic.Field(alias=str("objectTypeApiName")) # type: ignore[literal-required] + cardinality: LinkTypeSideCardinality + foreign_key_property_api_name: typing.Optional[PropertyApiName] = pydantic.Field(alias=str("foreignKeyPropertyApiName"), default=None) # type: ignore[literal-required] + + +LinkTypeSideCardinality = typing.Literal["ONE", "MANY"] +"""LinkTypeSideCardinality""" + + +class ListActionTypesResponse(core.ModelBase): + """ListActionTypesResponse""" + + next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] + data: typing.List[ActionType] + + +class ListLinkedObjectsResponse(core.ModelBase): + """ListLinkedObjectsResponse""" + + next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] + data: typing.List[OntologyObject] + + +class ListObjectTypesResponse(core.ModelBase): + """ListObjectTypesResponse""" + + next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] + data: typing.List[ObjectType] + """The list of object types in the current page.""" + + +class ListObjectsResponse(core.ModelBase): + """ListObjectsResponse""" + + next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] + data: typing.List[OntologyObject] + """The list of objects in the current page.""" + + total_count: core_models.TotalCount = pydantic.Field(alias=str("totalCount")) # type: ignore[literal-required] + + +class ListOntologiesResponse(core.ModelBase): + """ListOntologiesResponse""" + + data: typing.List[Ontology] + """The list of Ontologies the user has access to.""" + + +class ListOutgoingLinkTypesResponse(core.ModelBase): + """ListOutgoingLinkTypesResponse""" + + next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] + data: typing.List[LinkTypeSide] + """The list of link type sides in the current page.""" + + +class ListQueryTypesResponse(core.ModelBase): + """ListQueryTypesResponse""" + + next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] + data: typing.List[QueryType] + + +LogicRule = typing_extensions.Annotated[ + typing.Union[ + "DeleteInterfaceObjectRule", + "ModifyInterfaceObjectRule", + "ModifyObjectRule", + "DeleteObjectRule", + "CreateInterfaceObjectRule", + "DeleteLinkRule", + "CreateObjectRule", + "CreateLinkRule", + ], + pydantic.Field(discriminator="type"), +] +"""LogicRule""" + + +class LtQuery(core.ModelBase): + """Returns objects where the specified field is less than a value.""" + + field: FieldNameV1 + value: PropertyValue + type: typing.Literal["lt"] = "lt" + + +class LteQuery(core.ModelBase): + """Returns objects where the specified field is less than or equal to a value.""" + + field: FieldNameV1 + value: PropertyValue + type: typing.Literal["lte"] = "lte" + + +class MaxAggregation(core.ModelBase): + """Computes the maximum value for the provided field.""" + + field: FieldNameV1 + name: typing.Optional[AggregationMetricName] = None + type: typing.Literal["max"] = "max" + + +class MinAggregation(core.ModelBase): + """Computes the minimum value for the provided field.""" + + field: FieldNameV1 + name: typing.Optional[AggregationMetricName] = None + type: typing.Literal["min"] = "min" + + +class ModifyInterfaceObjectRule(core.ModelBase): + """ModifyInterfaceObjectRule""" + + interface_type_api_name: InterfaceTypeApiName = pydantic.Field(alias=str("interfaceTypeApiName")) # type: ignore[literal-required] + type: typing.Literal["modifyInterfaceObject"] = "modifyInterfaceObject" + + +class ModifyObjectRule(core.ModelBase): + """ModifyObjectRule""" + + object_type_api_name: ObjectTypeApiName = pydantic.Field(alias=str("objectTypeApiName")) # type: ignore[literal-required] + type: typing.Literal["modifyObject"] = "modifyObject" + + +class NotQuery(core.ModelBase): + """Returns objects where the query is not satisfied.""" + + value: SearchJsonQuery + type: typing.Literal["not"] = "not" + + +class ObjectPropertyValueConstraint(core.ModelBase): + """The parameter value must be a property value of an object found within an object set.""" + + type: typing.Literal["objectPropertyValue"] = "objectPropertyValue" + + +class ObjectQueryResultConstraint(core.ModelBase): + """The parameter value must be the primary key of an object found within an object set.""" + + type: typing.Literal["objectQueryResult"] = "objectQueryResult" + + +ObjectRid = core.RID +"""The unique resource identifier of an object, useful for interacting with other Foundry APIs.""" + + +ObjectSetRid = core.RID +"""ObjectSetRid""" + + +class ObjectType(core.ModelBase): + """Represents an object type in the Ontology.""" + + api_name: ObjectTypeApiName = pydantic.Field(alias=str("apiName")) # type: ignore[literal-required] + legacy_object_type_id: typing.Optional[LegacyObjectTypeId] = pydantic.Field(alias=str("legacyObjectTypeId"), default=None) # type: ignore[literal-required] + display_name: typing.Optional[core_models.DisplayName] = pydantic.Field(alias=str("displayName"), default=None) # type: ignore[literal-required] + status: core_models.ReleaseStatus + description: typing.Optional[str] = None + """The description of the object type.""" + + visibility: typing.Optional[ObjectTypeVisibility] = None + primary_key: typing.List[PropertyApiName] = pydantic.Field(alias=str("primaryKey")) # type: ignore[literal-required] + """The primary key of the object. This is a list of properties that can be used to uniquely identify the object.""" + + properties: typing.Dict[PropertyApiName, Property] + """A map of the properties of the object type.""" + + rid: ObjectTypeRid + + +ObjectTypeApiName = str +""" +The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the +`List object types` endpoint or check the **Ontology Manager**. +""" + + +ObjectTypeRid = core.RID +"""The unique resource identifier of an object type, useful for interacting with other Foundry APIs.""" + + +ObjectTypeVisibility = typing.Literal["NORMAL", "PROMINENT", "HIDDEN"] +"""The suggested visibility of the object type.""" + + +class OneOfConstraint(core.ModelBase): + """The parameter has a manually predefined set of options.""" + + options: typing.List[ParameterOption] + other_values_allowed: bool = pydantic.Field(alias=str("otherValuesAllowed")) # type: ignore[literal-required] + """A flag denoting whether custom, user provided values will be considered valid. This is configured via the **Allowed "Other" value** toggle in the **Ontology Manager**.""" + + type: typing.Literal["oneOf"] = "oneOf" + + +class Ontology(core.ModelBase): + """Metadata about an Ontology.""" + + api_name: OntologyApiName = pydantic.Field(alias=str("apiName")) # type: ignore[literal-required] + display_name: core_models.DisplayName = pydantic.Field(alias=str("displayName")) # type: ignore[literal-required] + description: str + rid: OntologyRid + + +OntologyApiName = str +"""OntologyApiName""" + + +class OntologyArrayType(core.ModelBase): + """OntologyArrayType""" + + item_type: OntologyDataType = pydantic.Field(alias=str("itemType")) # type: ignore[literal-required] + type: typing.Literal["array"] = "array" + + +OntologyDataType = typing_extensions.Annotated[ + typing.Union[ + core_models.DateType, + "OntologyStructType", + "OntologySetType", + core_models.StringType, + core_models.ByteType, + core_models.DoubleType, + core_models.IntegerType, + core_models.FloatType, + core_models.AnyType, + core_models.LongType, + core_models.BooleanType, + core_models.CipherTextType, + core_models.MarkingType, + core_models.UnsupportedType, + "OntologyArrayType", + "OntologyObjectSetType", + core_models.BinaryType, + core_models.ShortType, + core_models.DecimalType, + "OntologyMapType", + core_models.TimestampType, + "OntologyObjectType", + ], + pydantic.Field(discriminator="type"), +] +"""A union of all the primitive types used by Palantir's Ontology-based products.""" + + +class OntologyInterfaceObjectSetType(core.ModelBase): + """OntologyInterfaceObjectSetType""" + + interface_type_api_name: InterfaceTypeApiName = pydantic.Field(alias=str("interfaceTypeApiName")) # type: ignore[literal-required] + type: typing.Literal["interfaceObjectSet"] = "interfaceObjectSet" + + +class OntologyInterfaceObjectType(core.ModelBase): + """OntologyInterfaceObjectType""" + + interface_type_api_name: typing.Optional[InterfaceTypeApiName] = pydantic.Field(alias=str("interfaceTypeApiName"), default=None) # type: ignore[literal-required] + type: typing.Literal["interfaceObject"] = "interfaceObject" + + +class OntologyMapType(core.ModelBase): + """OntologyMapType""" + + key_type: OntologyDataType = pydantic.Field(alias=str("keyType")) # type: ignore[literal-required] + value_type: OntologyDataType = pydantic.Field(alias=str("valueType")) # type: ignore[literal-required] + type: typing.Literal["map"] = "map" + + +class OntologyObject(core.ModelBase): + """Represents an object in the Ontology.""" + + properties: typing.Dict[PropertyApiName, typing.Optional[PropertyValue]] + """A map of the property values of the object.""" + + rid: ObjectRid + + +class OntologyObjectSetType(core.ModelBase): + """OntologyObjectSetType""" + + object_api_name: typing.Optional[ObjectTypeApiName] = pydantic.Field(alias=str("objectApiName"), default=None) # type: ignore[literal-required] + object_type_api_name: typing.Optional[ObjectTypeApiName] = pydantic.Field(alias=str("objectTypeApiName"), default=None) # type: ignore[literal-required] + type: typing.Literal["objectSet"] = "objectSet" + + +class OntologyObjectType(core.ModelBase): + """OntologyObjectType""" + + object_api_name: ObjectTypeApiName = pydantic.Field(alias=str("objectApiName")) # type: ignore[literal-required] + object_type_api_name: ObjectTypeApiName = pydantic.Field(alias=str("objectTypeApiName")) # type: ignore[literal-required] + type: typing.Literal["object"] = "object" + + +OntologyRid = core.RID +""" +The unique Resource Identifier (RID) of the Ontology. To look up your Ontology RID, please use the +`List ontologies` endpoint or check the **Ontology Manager**. +""" + + +class OntologySetType(core.ModelBase): + """OntologySetType""" + + item_type: OntologyDataType = pydantic.Field(alias=str("itemType")) # type: ignore[literal-required] + type: typing.Literal["set"] = "set" + + +class OntologyStructField(core.ModelBase): + """OntologyStructField""" + + name: core_models.StructFieldName + field_type: OntologyDataType = pydantic.Field(alias=str("fieldType")) # type: ignore[literal-required] + required: bool + + +class OntologyStructType(core.ModelBase): + """OntologyStructType""" + + fields: typing.List[OntologyStructField] + type: typing.Literal["struct"] = "struct" + + +class OrQuery(core.ModelBase): + """Returns objects where at least 1 query is satisfied.""" + + value: typing.List[SearchJsonQuery] + type: typing.Literal["or"] = "or" + + +OrderBy = str +""" +A command representing the list of properties to order by. Properties should be delimited by commas and +prefixed by `p` or `properties`. The format expected format is +`orderBy=properties.{property}:{sortDirection},properties.{property}:{sortDirection}...` + +By default, the ordering for a property is ascending, and this can be explicitly specified by appending +`:asc` (for ascending) or `:desc` (for descending). + +Example: use `orderBy=properties.lastName:asc` to order by a single property, +`orderBy=properties.lastName,properties.firstName,properties.age:desc` to order by multiple properties. +You may also use the shorthand `p` instead of `properties` such as `orderBy=p.lastName:asc`. +""" + + +class Parameter(core.ModelBase): + """Details about a parameter of an action or query.""" + + description: typing.Optional[str] = None + base_type: ValueType = pydantic.Field(alias=str("baseType")) # type: ignore[literal-required] + data_type: typing.Optional[OntologyDataType] = pydantic.Field(alias=str("dataType"), default=None) # type: ignore[literal-required] + required: bool + + +ParameterEvaluatedConstraint = typing_extensions.Annotated[ + typing.Union[ + "StructEvaluatedConstraint", + "OneOfConstraint", + "ArrayEvaluatedConstraint", + "GroupMemberConstraint", + "ObjectPropertyValueConstraint", + "RangeConstraint", + "ArraySizeConstraint", + "ObjectQueryResultConstraint", + "StringLengthConstraint", + "StringRegexMatchConstraint", + "UnevaluableConstraint", + ], + pydantic.Field(discriminator="type"), +] +""" +A constraint that an action parameter value must satisfy in order to be considered valid. +Constraints can be configured on action parameters in the **Ontology Manager**. +Applicable constraints are determined dynamically based on parameter inputs. +Parameter values are evaluated against the final set of constraints. + +The type of the constraint. +| Type | Description | +|-----------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| `arraySize` | The parameter expects an array of values and the size of the array must fall within the defined range. | +| `groupMember` | The parameter value must be the user id of a member belonging to at least one of the groups defined by the constraint. | +| `objectPropertyValue` | The parameter value must be a property value of an object found within an object set. | +| `objectQueryResult` | The parameter value must be the primary key of an object found within an object set. | +| `oneOf` | The parameter has a manually predefined set of options. | +| `range` | The parameter value must be within the defined range. | +| `stringLength` | The parameter value must have a length within the defined range. | +| `stringRegexMatch` | The parameter value must match a predefined regular expression. | +| `unevaluable` | The parameter cannot be evaluated because it depends on another parameter or object set that can't be evaluated. This can happen when a parameter's allowed values are defined by another parameter that is missing or invalid. | +""" + + +class ParameterEvaluationResult(core.ModelBase): + """Represents the validity of a parameter against the configured constraints.""" + + result: ValidationResult + evaluated_constraints: typing.List[ParameterEvaluatedConstraint] = pydantic.Field(alias=str("evaluatedConstraints")) # type: ignore[literal-required] + required: bool + """Represents whether the parameter is a required input to the action.""" + + +ParameterId = str +""" +The unique identifier of the parameter. Parameters are used as inputs when an action or query is applied. +Parameters can be viewed and managed in the **Ontology Manager**. +""" + + +class ParameterOption(core.ModelBase): + """A possible value for the parameter. This is defined in the **Ontology Manager** by Actions admins.""" + + display_name: typing.Optional[core_models.DisplayName] = pydantic.Field(alias=str("displayName"), default=None) # type: ignore[literal-required] + value: typing.Optional[typing.Any] = None + """An allowed configured value for a parameter within an action.""" + + +class PhraseQuery(core.ModelBase): + """Returns objects where the specified field contains the provided value as a substring.""" + + field: FieldNameV1 + value: str + type: typing.Literal["phrase"] = "phrase" + + +class PrefixQuery(core.ModelBase): + """Returns objects where the specified field starts with the provided value.""" + + field: FieldNameV1 + value: str + type: typing.Literal["prefix"] = "prefix" + + +PrimaryKeyValue = typing.Any +"""Represents the primary key value that is used as a unique identifier for an object.""" + + +class Property(core.ModelBase): + """Details about some property of an object.""" + + description: typing.Optional[str] = None + display_name: typing.Optional[core_models.DisplayName] = pydantic.Field(alias=str("displayName"), default=None) # type: ignore[literal-required] + base_type: ValueType = pydantic.Field(alias=str("baseType")) # type: ignore[literal-required] + legacy_property_id: typing.Optional[LegacyPropertyId] = pydantic.Field(alias=str("legacyPropertyId"), default=None) # type: ignore[literal-required] + + +PropertyApiName = str +""" +The name of the property in the API. To find the API name for your property, use the `Get object type` +endpoint or check the **Ontology Manager**. +""" + + +PropertyFilter = str +""" +Represents a filter used on properties. + +Endpoints that accept this supports optional parameters that have the form: +`properties.{propertyApiName}.{propertyFilter}={propertyValueEscapedString}` to filter the returned objects. +For instance, you may use `properties.firstName.eq=John` to find objects that contain a property called +"firstName" that has the exact value of "John". + +The following are a list of supported property filters: + +- `properties.{propertyApiName}.contains` - supported on arrays and can be used to filter array properties + that have at least one of the provided values. If multiple query parameters are provided, then objects + that have any of the given values for the specified property will be matched. +- `properties.{propertyApiName}.eq` - used to filter objects that have the exact value for the provided + property. If multiple query parameters are provided, then objects that have any of the given values + will be matched. For instance, if the user provides a request by doing + `?properties.firstName.eq=John&properties.firstName.eq=Anna`, then objects that have a firstName property + of either John or Anna will be matched. This filter is supported on all property types except Arrays. +- `properties.{propertyApiName}.neq` - used to filter objects that do not have the provided property values. + Similar to the `eq` filter, if multiple values are provided, then objects that have any of the given values + will be excluded from the result. +- `properties.{propertyApiName}.lt`, `properties.{propertyApiName}.lte`, `properties.{propertyApiName}.gt` + `properties.{propertyApiName}.gte` - represent less than, less than or equal to, greater than, and greater + than or equal to respectively. These are supported on date, timestamp, byte, integer, long, double, decimal. +- `properties.{propertyApiName}.isNull` - used to filter objects where the provided property is (or is not) null. + This filter is supported on all property types. +""" + + +PropertyId = str +""" +The immutable ID of a property. Property IDs are only used to identify properties in the **Ontology Manager** +application and assign them API names. In every other case, API names should be used instead of property IDs. +""" + + +PropertyTypeRid = core.RID +"""PropertyTypeRid""" + + +PropertyValue = typing.Any +""" +Represents the value of a property in the following format. + +| Type | JSON encoding | Example | +|---------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------|----------------------------------------------------------------------------------------------------| +| Array | array | `["alpha", "bravo", "charlie"]` | +| [Attachment](https://palantir.com/docs/foundry/api/v2/ontologies-v2-resources/attachment-properties/attachment-property-basics/) | JSON encoded `AttachmentProperty` object | `{"rid":"ri.blobster.main.attachment.2f944bae-5851-4204-8615-920c969a9f2e"}` | +| Boolean | boolean | `true` | +| Byte | number | `31` | +| CipherText | string | `"CIPHER::ri.bellaso.main.cipher-channel.e414ab9e-b606-499a-a0e1-844fa296ba7e::unzjs3VifsTxuIpf1fH1CJ7OaPBr2bzMMdozPaZJtCii8vVG60yXIEmzoOJaEl9mfFFe::CIPHER"` | +| Date | ISO 8601 extended local date string | `"2021-05-01"` | +| Decimal | string | `"2.718281828"` | +| Double | number | `3.14159265` | +| Float | number | `3.14159265` | +| GeoPoint | geojson | `{"type":"Point","coordinates":[102.0,0.5]}` | +| GeoShape | geojson | `{"type":"LineString","coordinates":[[102.0,0.0],[103.0,1.0],[104.0,0.0],[105.0,1.0]]}` | +| Integer | number | `238940` | +| Long | string | `"58319870951433"` | +| [MediaReference](https://palantir.com/docs/foundry/api/v2/ontologies-v2-resources/media-reference-properties/media-reference-property-basics/)| JSON encoded `MediaReference` object | `{"mimeType":"application/pdf","reference":{"type":"mediaSetViewItem","mediaSetViewItem":{"mediaSetRid":"ri.mio.main.media-set.4153d42f-ca4b-4e42-8ca5-8e6aa7edb642","mediaSetViewRid":"ri.mio.main.view.82a798ad-d637-4595-acc6-987bcf16629b","mediaItemRid":"ri.mio.main.media-item.001ec98b-1620-4814-9e17-8e9c4e536225"}}}` | +| Short | number | `8739` | +| String | string | `"Call me Ishmael"` | +| Struct | JSON object of struct field API name -> value | {"firstName": "Alex", "lastName": "Karp"} | +| Timestamp | ISO 8601 extended offset date-time string in UTC zone | `"2021-01-04T05:00:00Z"` | +| [Timeseries](https://palantir.com/docs/foundry/api/v2/ontologies-v2-resources/time-series-properties/time-series-property-basics/) | JSON encoded `TimeseriesProperty` object or seriesId string | `{"seriesId": "wellPressureSeriesId", "syncRid": ri.time-series-catalog.main.sync.04f5ac1f-91bf-44f9-a51f-4f34e06e42df"}` or `{"templateRid": "ri.codex-emu.main.template.367cac64-e53b-4653-b111-f61856a63df9", "templateVersion": "0.0.0"}` or `"wellPressureSeriesId"`| | +| Vector | array | `[0.1, 0.3, 0.02, 0.05 , 0.8, 0.4]` | + +Note that for backwards compatibility, the Boolean, Byte, Double, Float, Integer, and Short types can also be encoded as JSON strings. +""" + + +PropertyValueEscapedString = str +"""Represents the value of a property in string format. This is used in URL parameters.""" + + +QueryAggregationKeyType = typing_extensions.Annotated[ + typing.Union[ + core_models.DateType, + core_models.BooleanType, + core_models.StringType, + core_models.DoubleType, + "QueryAggregationRangeType", + core_models.IntegerType, + core_models.TimestampType, + ], + pydantic.Field(discriminator="type"), +] +"""A union of all the types supported by query aggregation keys.""" + + +QueryAggregationRangeSubType = typing_extensions.Annotated[ + typing.Union[ + core_models.DateType, + core_models.DoubleType, + core_models.IntegerType, + core_models.TimestampType, + ], + pydantic.Field(discriminator="type"), +] +"""A union of all the types supported by query aggregation ranges.""" + + +class QueryAggregationRangeType(core.ModelBase): + """QueryAggregationRangeType""" + + sub_type: QueryAggregationRangeSubType = pydantic.Field(alias=str("subType")) # type: ignore[literal-required] + type: typing.Literal["range"] = "range" + + +QueryAggregationValueType = typing_extensions.Annotated[ + typing.Union[core_models.DateType, core_models.DoubleType, core_models.TimestampType], + pydantic.Field(discriminator="type"), +] +"""A union of all the types supported by query aggregation keys.""" + + +QueryApiName = str +"""The name of the Query in the API.""" + + +class QueryArrayType(core.ModelBase): + """QueryArrayType""" + + sub_type: QueryDataType = pydantic.Field(alias=str("subType")) # type: ignore[literal-required] + type: typing.Literal["array"] = "array" + + +QueryDataType = typing_extensions.Annotated[ + typing.Union[ + core_models.DateType, + "OntologyInterfaceObjectType", + "QueryStructType", + "QuerySetType", + core_models.StringType, + "EntrySetType", + core_models.DoubleType, + core_models.IntegerType, + "ThreeDimensionalAggregation", + "QueryUnionType", + core_models.FloatType, + core_models.LongType, + core_models.BooleanType, + core_models.UnsupportedType, + core_models.AttachmentType, + core_models.NullType, + "QueryArrayType", + "OntologyObjectSetType", + "TwoDimensionalAggregation", + "OntologyInterfaceObjectSetType", + "OntologyObjectType", + core_models.TimestampType, + ], + pydantic.Field(discriminator="type"), +] +"""A union of all the types supported by Ontology Query parameters or outputs.""" + + +QueryRuntimeErrorParameter = str +"""QueryRuntimeErrorParameter""" + + +class QuerySetType(core.ModelBase): + """QuerySetType""" + + sub_type: QueryDataType = pydantic.Field(alias=str("subType")) # type: ignore[literal-required] + type: typing.Literal["set"] = "set" + + +class QueryStructField(core.ModelBase): + """QueryStructField""" + + name: core_models.StructFieldName + field_type: QueryDataType = pydantic.Field(alias=str("fieldType")) # type: ignore[literal-required] + + +class QueryStructType(core.ModelBase): + """QueryStructType""" + + fields: typing.List[QueryStructField] + type: typing.Literal["struct"] = "struct" + + +class QueryType(core.ModelBase): + """Represents a query type in the Ontology.""" + + api_name: QueryApiName = pydantic.Field(alias=str("apiName")) # type: ignore[literal-required] + description: typing.Optional[str] = None + display_name: typing.Optional[core_models.DisplayName] = pydantic.Field(alias=str("displayName"), default=None) # type: ignore[literal-required] + parameters: typing.Dict[ParameterId, Parameter] + output: typing.Optional[OntologyDataType] = None + rid: FunctionRid + version: FunctionVersion + + +class QueryUnionType(core.ModelBase): + """QueryUnionType""" + + union_types: typing.List[QueryDataType] = pydantic.Field(alias=str("unionTypes")) # type: ignore[literal-required] + type: typing.Literal["union"] = "union" + + +class RangeConstraint(core.ModelBase): + """The parameter value must be within the defined range.""" + + lt: typing.Optional[typing.Any] = None + """Less than""" + + lte: typing.Optional[typing.Any] = None + """Less than or equal""" + + gt: typing.Optional[typing.Any] = None + """Greater than""" + + gte: typing.Optional[typing.Any] = None + """Greater than or equal""" + + type: typing.Literal["range"] = "range" + + +ReturnEditsMode = typing.Literal["ALL", "ALL_V2_WITH_DELETIONS", "NONE"] +"""ReturnEditsMode""" + + +SdkPackageName = str +"""SdkPackageName""" + + +SdkPackageRid = core.RID +"""SdkPackageRid""" + + +SdkVersion = str +"""SdkVersion""" + + +SearchJsonQuery = typing_extensions.Annotated[ + typing.Union[ + "OrQuery", + "PrefixQuery", + "LtQuery", + "AllTermsQuery", + "EqualsQuery", + "GtQuery", + "ContainsQuery", + "NotQuery", + "PhraseQuery", + "AndQuery", + "IsNullQuery", + "GteQuery", + "AnyTermQuery", + "LteQuery", + ], + pydantic.Field(discriminator="type"), +] +"""SearchJsonQuery""" + + +class SearchObjectsRequest(core.ModelBase): + """SearchObjectsRequest""" + + query: SearchJsonQuery + order_by: typing.Optional[SearchOrderBy] = pydantic.Field(alias=str("orderBy"), default=None) # type: ignore[literal-required] + page_size: typing.Optional[core_models.PageSize] = pydantic.Field(alias=str("pageSize"), default=None) # type: ignore[literal-required] + page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("pageToken"), default=None) # type: ignore[literal-required] + fields: typing.List[PropertyApiName] + """The API names of the object type properties to include in the response.""" + + +class SearchObjectsResponse(core.ModelBase): + """SearchObjectsResponse""" + + data: typing.List[OntologyObject] + next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] + total_count: core_models.TotalCount = pydantic.Field(alias=str("totalCount")) # type: ignore[literal-required] + + +class SearchOrderBy(core.ModelBase): + """Specifies the ordering of search results by a field and an ordering direction.""" + + fields: typing.List[SearchOrdering] + + +SearchOrderByType = typing.Literal["fields", "relevance"] +"""SearchOrderByType""" + + +class SearchOrdering(core.ModelBase): + """SearchOrdering""" + + field: FieldNameV1 + direction: typing.Optional[str] = None + """Specifies the ordering direction (can be either `asc` or `desc`)""" + + +SelectedPropertyApiName = str +""" +By default, whenever an object is requested, all of its properties are returned, except for properties of the +following types: +- Vector + +The response can be filtered to only include certain properties using the `properties` query parameter. Note +that ontology object set endpoints refer to this parameter as `select`. + +Properties to include can be specified in one of two ways. + +- A comma delimited list as the value for the `properties` query parameter + `properties={property1ApiName},{property2ApiName}` +- Multiple `properties` query parameters. + `properties={property1ApiName}&properties={property2ApiName}` + +The primary key of the object will always be returned even if it wasn't specified in the `properties` values. + +Unknown properties specified in the `properties` list will result in a `PropertiesNotFound` error. + +To find the API name for your property, use the `Get object type` endpoint or check the **Ontology Manager**. +""" + + +SharedPropertyTypeApiName = str +""" +The name of the shared property type in the API in lowerCamelCase format. To find the API name for your +shared property type, use the `List shared property types` endpoint or check the **Ontology Manager**. +""" + + +SharedPropertyTypeRid = core.RID +"""The unique resource identifier of an shared property type, useful for interacting with other Foundry APIs.""" + + +class StringLengthConstraint(core.ModelBase): + """ + The parameter value must have a length within the defined range. + *This range is always inclusive.* + """ + + lt: typing.Optional[typing.Any] = None + """Less than""" + + lte: typing.Optional[typing.Any] = None + """Less than or equal""" + + gt: typing.Optional[typing.Any] = None + """Greater than""" + + gte: typing.Optional[typing.Any] = None + """Greater than or equal""" + + type: typing.Literal["stringLength"] = "stringLength" + + +class StringRegexMatchConstraint(core.ModelBase): + """The parameter value must match a predefined regular expression.""" + + regex: str + """The regular expression configured in the **Ontology Manager**.""" + + configured_failure_message: typing.Optional[str] = pydantic.Field(alias=str("configuredFailureMessage"), default=None) # type: ignore[literal-required] + """ + The message indicating that the regular expression was not matched. + This is configured per parameter in the **Ontology Manager**. + """ + + type: typing.Literal["stringRegexMatch"] = "stringRegexMatch" + + +class StructEvaluatedConstraint(core.ModelBase): + """Represents the validity of a singleton struct parameter.""" + + struct_fields: typing.Dict[StructParameterFieldApiName, StructFieldEvaluationResult] = pydantic.Field(alias=str("structFields")) # type: ignore[literal-required] + type: typing.Literal["struct"] = "struct" + + +StructFieldEvaluatedConstraint = typing_extensions.Annotated[ + typing.Union[ + "OneOfConstraint", + "RangeConstraint", + "ObjectQueryResultConstraint", + "StringLengthConstraint", + "StringRegexMatchConstraint", + ], + pydantic.Field(discriminator="type"), +] +""" +A constraint that an action struct parameter field value must satisfy in order to be considered valid. +Constraints can be configured on fields of struct parameters in the **Ontology Manager**. +Applicable constraints are determined dynamically based on parameter inputs. +Parameter values are evaluated against the final set of constraints. + +The type of the constraint. +| Type | Description | +|-----------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| `oneOf` | The struct parameter field has a manually predefined set of options. | +| `range` | The struct parameter field value must be within the defined range. | +| `stringLength` | The struct parameter field value must have a length within the defined range. | +| `stringRegexMatch` | The struct parameter field value must match a predefined regular expression. | +| `objectQueryResult` | The struct parameter field value must be the primary key of an object found within an object set. | +""" + + +class StructFieldEvaluationResult(core.ModelBase): + """Represents the validity of a struct parameter's fields against the configured constraints.""" + + result: ValidationResult + evaluated_constraints: typing.List[StructFieldEvaluatedConstraint] = pydantic.Field(alias=str("evaluatedConstraints")) # type: ignore[literal-required] + required: bool + """Represents whether the parameter is a required input to the action.""" + + +StructParameterFieldApiName = str +"""The unique identifier of the struct parameter field.""" + + +class SubmissionCriteriaEvaluation(core.ModelBase): + """ + Contains the status of the **submission criteria**. + **Submission criteria** are the prerequisites that need to be satisfied before an Action can be applied. + These are configured in the **Ontology Manager**. + """ + + configured_failure_message: typing.Optional[str] = pydantic.Field(alias=str("configuredFailureMessage"), default=None) # type: ignore[literal-required] + """ + The message indicating one of the **submission criteria** was not satisfied. + This is configured per **submission criteria** in the **Ontology Manager**. + """ + + result: ValidationResult + + +class SumAggregation(core.ModelBase): + """Computes the sum of values for the provided field.""" + + field: FieldNameV1 + name: typing.Optional[AggregationMetricName] = None + type: typing.Literal["sum"] = "sum" + + +class ThreeDimensionalAggregation(core.ModelBase): + """ThreeDimensionalAggregation""" + + key_type: QueryAggregationKeyType = pydantic.Field(alias=str("keyType")) # type: ignore[literal-required] + value_type: TwoDimensionalAggregation = pydantic.Field(alias=str("valueType")) # type: ignore[literal-required] + type: typing.Literal["threeDimensionalAggregation"] = "threeDimensionalAggregation" + + +class TwoDimensionalAggregation(core.ModelBase): + """TwoDimensionalAggregation""" + + key_type: QueryAggregationKeyType = pydantic.Field(alias=str("keyType")) # type: ignore[literal-required] + value_type: QueryAggregationValueType = pydantic.Field(alias=str("valueType")) # type: ignore[literal-required] + type: typing.Literal["twoDimensionalAggregation"] = "twoDimensionalAggregation" + + +class UnevaluableConstraint(core.ModelBase): + """ + The parameter cannot be evaluated because it depends on another parameter or object set that can't be evaluated. + This can happen when a parameter's allowed values are defined by another parameter that is missing or invalid. + """ + + type: typing.Literal["unevaluable"] = "unevaluable" + + +UniqueIdentifierLinkId = core.UUID +"""A reference to a UniqueIdentifierArgument linkId defined for this action type.""" + + +class ValidateActionRequest(core.ModelBase): + """ValidateActionRequest""" + + parameters: typing.Dict[ParameterId, typing.Optional[DataValue]] + + +class ValidateActionResponse(core.ModelBase): + """ValidateActionResponse""" + + result: ValidationResult + submission_criteria: typing.List[SubmissionCriteriaEvaluation] = pydantic.Field(alias=str("submissionCriteria")) # type: ignore[literal-required] + parameters: typing.Dict[ParameterId, ParameterEvaluationResult] + + +ValidationResult = typing.Literal["VALID", "INVALID"] +"""Represents the state of a validation.""" + + +ValueType = str +""" +A string indicating the type of each data value. Note that these types can be nested, for example an array of +structs. + +| Type | JSON value | +|---------------------|-------------------------------------------------------------------------------------------------------------------| +| Array | `Array`, where `T` is the type of the array elements, e.g. `Array`. | +| Attachment | `Attachment` | +| Boolean | `Boolean` | +| Byte | `Byte` | +| CipherText | `CipherText` | +| Date | `LocalDate` | +| Decimal | `Decimal` | +| Double | `Double` | +| Float | `Float` | +| Integer | `Integer` | +| Long | `Long` | +| Marking | `Marking` | +| OntologyObject | `OntologyObject` where `T` is the API name of the referenced object type. | +| Short | `Short` | +| String | `String` | +| Struct | `Struct` where `T` contains field name and type pairs, e.g. `Struct<{ firstName: String, lastName: string }>` | +| Timeseries | `TimeSeries` where `T` is either `String` for an enum series or `Double` for a numeric series. | +| Timestamp | `Timestamp` | +""" + + +ValueTypeApiName = str +"""The name of the value type in the API in camelCase format.""" + + +ValueTypeRid = core.RID +"""ValueTypeRid""" + + +ArrayEntryEvaluatedConstraint = StructEvaluatedConstraint +"""Evaluated constraints for entries of array parameters for which per-entry evaluation is supported.""" + + +core.resolve_forward_references(Aggregation, globalns=globals(), localns=locals()) +core.resolve_forward_references(AggregationGroupBy, globalns=globals(), localns=locals()) +core.resolve_forward_references(LogicRule, globalns=globals(), localns=locals()) +core.resolve_forward_references(OntologyDataType, globalns=globals(), localns=locals()) +core.resolve_forward_references(ParameterEvaluatedConstraint, globalns=globals(), localns=locals()) +core.resolve_forward_references(QueryAggregationKeyType, globalns=globals(), localns=locals()) +core.resolve_forward_references(QueryAggregationRangeSubType, globalns=globals(), localns=locals()) +core.resolve_forward_references(QueryAggregationValueType, globalns=globals(), localns=locals()) +core.resolve_forward_references(QueryDataType, globalns=globals(), localns=locals()) +core.resolve_forward_references(SearchJsonQuery, globalns=globals(), localns=locals()) +core.resolve_forward_references( + StructFieldEvaluatedConstraint, globalns=globals(), localns=locals() +) + +__all__ = [ + "ActionRid", + "ActionType", + "ActionTypeApiName", + "ActionTypeRid", + "AggregateObjectsRequest", + "AggregateObjectsResponse", + "AggregateObjectsResponseItem", + "Aggregation", + "AggregationDurationGrouping", + "AggregationExactGrouping", + "AggregationFixedWidthGrouping", + "AggregationGroupBy", + "AggregationGroupKey", + "AggregationGroupValue", + "AggregationMetricName", + "AggregationMetricResult", + "AggregationRange", + "AggregationRangesGrouping", + "AllTermsQuery", + "AndQuery", + "AnyTermQuery", + "ApplyActionMode", + "ApplyActionRequest", + "ApplyActionRequestOptions", + "ApplyActionResponse", + "ApproximateDistinctAggregation", + "ArrayEntryEvaluatedConstraint", + "ArrayEvaluatedConstraint", + "ArraySizeConstraint", + "ArtifactRepositoryRid", + "Attachment", + "AttachmentRid", + "AvgAggregation", + "BatchApplyActionRequest", + "BatchApplyActionResponse", + "ContainsQuery", + "CountAggregation", + "CreateInterfaceObjectRule", + "CreateLinkRule", + "CreateObjectRule", + "DataValue", + "DeleteInterfaceObjectRule", + "DeleteLinkRule", + "DeleteObjectRule", + "DerivedPropertyApiName", + "Duration", + "EntrySetType", + "EqualsQuery", + "ExecuteQueryRequest", + "ExecuteQueryResponse", + "FieldNameV1", + "FilterValue", + "FunctionRid", + "FunctionVersion", + "Fuzzy", + "GroupMemberConstraint", + "GtQuery", + "GteQuery", + "InterfaceLinkTypeApiName", + "InterfaceLinkTypeRid", + "InterfacePropertyApiName", + "InterfaceTypeApiName", + "InterfaceTypeRid", + "IsNullQuery", + "LegacyObjectTypeId", + "LegacyPropertyId", + "LinkTypeApiName", + "LinkTypeId", + "LinkTypeSide", + "LinkTypeSideCardinality", + "ListActionTypesResponse", + "ListLinkedObjectsResponse", + "ListObjectTypesResponse", + "ListObjectsResponse", + "ListOntologiesResponse", + "ListOutgoingLinkTypesResponse", + "ListQueryTypesResponse", + "LogicRule", + "LtQuery", + "LteQuery", + "MaxAggregation", + "MinAggregation", + "ModifyInterfaceObjectRule", + "ModifyObjectRule", + "NotQuery", + "ObjectPropertyValueConstraint", + "ObjectQueryResultConstraint", + "ObjectRid", + "ObjectSetRid", + "ObjectType", + "ObjectTypeApiName", + "ObjectTypeRid", + "ObjectTypeVisibility", + "OneOfConstraint", + "Ontology", + "OntologyApiName", + "OntologyArrayType", + "OntologyDataType", + "OntologyInterfaceObjectSetType", + "OntologyInterfaceObjectType", + "OntologyMapType", + "OntologyObject", + "OntologyObjectSetType", + "OntologyObjectType", + "OntologyRid", + "OntologySetType", + "OntologyStructField", + "OntologyStructType", + "OrQuery", + "OrderBy", + "Parameter", + "ParameterEvaluatedConstraint", + "ParameterEvaluationResult", + "ParameterId", + "ParameterOption", + "PhraseQuery", + "PrefixQuery", + "PrimaryKeyValue", + "Property", + "PropertyApiName", + "PropertyFilter", + "PropertyId", + "PropertyTypeRid", + "PropertyValue", + "PropertyValueEscapedString", + "QueryAggregationKeyType", + "QueryAggregationRangeSubType", + "QueryAggregationRangeType", + "QueryAggregationValueType", + "QueryApiName", + "QueryArrayType", + "QueryDataType", + "QueryRuntimeErrorParameter", + "QuerySetType", + "QueryStructField", + "QueryStructType", + "QueryType", + "QueryUnionType", + "RangeConstraint", + "ReturnEditsMode", + "SdkPackageName", + "SdkPackageRid", + "SdkVersion", + "SearchJsonQuery", + "SearchObjectsRequest", + "SearchObjectsResponse", + "SearchOrderBy", + "SearchOrderByType", + "SearchOrdering", + "SelectedPropertyApiName", + "SharedPropertyTypeApiName", + "SharedPropertyTypeRid", + "StringLengthConstraint", + "StringRegexMatchConstraint", + "StructEvaluatedConstraint", + "StructFieldEvaluatedConstraint", + "StructFieldEvaluationResult", + "StructParameterFieldApiName", + "SubmissionCriteriaEvaluation", + "SumAggregation", + "ThreeDimensionalAggregation", + "TwoDimensionalAggregation", + "UnevaluableConstraint", + "UniqueIdentifierLinkId", + "ValidateActionRequest", + "ValidateActionResponse", + "ValidationResult", + "ValueType", + "ValueTypeApiName", + "ValueTypeRid", +] diff --git a/foundry_sdk/v1/ontologies/object_type.py b/foundry_sdk/v1/ontologies/object_type.py new file mode 100644 index 000000000..f87b32942 --- /dev/null +++ b/foundry_sdk/v1/ontologies/object_type.py @@ -0,0 +1,536 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v1.core import models as core_models +from foundry_sdk.v1.ontologies import models as ontologies_models + + +class ObjectTypeClient: + """ + The API client for the ObjectType Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _ObjectTypeClientStreaming(self) + self.with_raw_response = _ObjectTypeClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + ontology_rid: ontologies_models.OntologyRid, + object_type: ontologies_models.ObjectTypeApiName, + *, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> ontologies_models.ObjectType: + """ + Gets a specific object type with the given API name. + + :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the object type. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. + :type ontology_rid: OntologyRid + :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. + :type object_type: ObjectTypeApiName + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: ontologies_models.ObjectType + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v1/ontologies/{ontologyRid}/objectTypes/{objectType}", + query_params={}, + path_params={ + "ontologyRid": ontology_rid, + "objectType": object_type, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.ObjectType, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get_outgoing_link_type( + self, + ontology_rid: ontologies_models.OntologyRid, + object_type: ontologies_models.ObjectTypeApiName, + link_type: ontologies_models.LinkTypeApiName, + *, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> ontologies_models.LinkTypeSide: + """ + Get an outgoing link for an object type. + + :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the object type. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager** application. + :type ontology_rid: OntologyRid + :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager** application. + :type object_type: ObjectTypeApiName + :param link_type: The API name of the outgoing link. To find the API name for your link type, check the **Ontology Manager**. + :type link_type: LinkTypeApiName + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: ontologies_models.LinkTypeSide + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v1/ontologies/{ontologyRid}/objectTypes/{objectType}/outgoingLinkTypes/{linkType}", + query_params={}, + path_params={ + "ontologyRid": ontology_rid, + "objectType": object_type, + "linkType": link_type, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.LinkTypeSide, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def list( + self, + ontology_rid: ontologies_models.OntologyRid, + *, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.ResourceIterator[ontologies_models.ObjectType]: + """ + Lists the object types for the given Ontology. + + Each page may be smaller or larger than the requested page size. However, it is guaranteed that if there are + more results available, at least one result will be present in the + response. + + :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the object types. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. + :type ontology_rid: OntologyRid + :param page_size: The desired size of the page to be returned. Defaults to 500. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. + :type page_size: Optional[PageSize] + :param page_token: + :type page_token: Optional[PageToken] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.ResourceIterator[ontologies_models.ObjectType] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v1/ontologies/{ontologyRid}/objectTypes", + query_params={ + "pageSize": page_size, + "pageToken": page_token, + }, + path_params={ + "ontologyRid": ontology_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.ListObjectTypesResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def list_outgoing_link_types( + self, + ontology_rid: ontologies_models.OntologyRid, + object_type: ontologies_models.ObjectTypeApiName, + *, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.ResourceIterator[ontologies_models.LinkTypeSide]: + """ + List the outgoing links for an object type. + + :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the object type. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager** application. + :type ontology_rid: OntologyRid + :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager** application. + :type object_type: ObjectTypeApiName + :param page_size: The desired size of the page to be returned. + :type page_size: Optional[PageSize] + :param page_token: + :type page_token: Optional[PageToken] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.ResourceIterator[ontologies_models.LinkTypeSide] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v1/ontologies/{ontologyRid}/objectTypes/{objectType}/outgoingLinkTypes", + query_params={ + "pageSize": page_size, + "pageToken": page_token, + }, + path_params={ + "ontologyRid": ontology_rid, + "objectType": object_type, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.ListOutgoingLinkTypesResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + +class _ObjectTypeClientRaw: + def __init__(self, client: ObjectTypeClient) -> None: + def get(_: ontologies_models.ObjectType): ... + def get_outgoing_link_type(_: ontologies_models.LinkTypeSide): ... + def list(_: ontologies_models.ListObjectTypesResponse): ... + def list_outgoing_link_types(_: ontologies_models.ListOutgoingLinkTypesResponse): ... + + self.get = core.with_raw_response(get, client.get) + self.get_outgoing_link_type = core.with_raw_response( + get_outgoing_link_type, client.get_outgoing_link_type + ) + self.list = core.with_raw_response(list, client.list) + self.list_outgoing_link_types = core.with_raw_response( + list_outgoing_link_types, client.list_outgoing_link_types + ) + + +class _ObjectTypeClientStreaming: + def __init__(self, client: ObjectTypeClient) -> None: + def get(_: ontologies_models.ObjectType): ... + def get_outgoing_link_type(_: ontologies_models.LinkTypeSide): ... + def list(_: ontologies_models.ListObjectTypesResponse): ... + def list_outgoing_link_types(_: ontologies_models.ListOutgoingLinkTypesResponse): ... + + self.get = core.with_streaming_response(get, client.get) + self.get_outgoing_link_type = core.with_streaming_response( + get_outgoing_link_type, client.get_outgoing_link_type + ) + self.list = core.with_streaming_response(list, client.list) + self.list_outgoing_link_types = core.with_streaming_response( + list_outgoing_link_types, client.list_outgoing_link_types + ) + + +class AsyncObjectTypeClient: + """ + The API client for the ObjectType Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncObjectTypeClientStreaming(self) + self.with_raw_response = _AsyncObjectTypeClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + ontology_rid: ontologies_models.OntologyRid, + object_type: ontologies_models.ObjectTypeApiName, + *, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[ontologies_models.ObjectType]: + """ + Gets a specific object type with the given API name. + + :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the object type. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. + :type ontology_rid: OntologyRid + :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. + :type object_type: ObjectTypeApiName + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[ontologies_models.ObjectType] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v1/ontologies/{ontologyRid}/objectTypes/{objectType}", + query_params={}, + path_params={ + "ontologyRid": ontology_rid, + "objectType": object_type, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.ObjectType, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get_outgoing_link_type( + self, + ontology_rid: ontologies_models.OntologyRid, + object_type: ontologies_models.ObjectTypeApiName, + link_type: ontologies_models.LinkTypeApiName, + *, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[ontologies_models.LinkTypeSide]: + """ + Get an outgoing link for an object type. + + :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the object type. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager** application. + :type ontology_rid: OntologyRid + :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager** application. + :type object_type: ObjectTypeApiName + :param link_type: The API name of the outgoing link. To find the API name for your link type, check the **Ontology Manager**. + :type link_type: LinkTypeApiName + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[ontologies_models.LinkTypeSide] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v1/ontologies/{ontologyRid}/objectTypes/{objectType}/outgoingLinkTypes/{linkType}", + query_params={}, + path_params={ + "ontologyRid": ontology_rid, + "objectType": object_type, + "linkType": link_type, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.LinkTypeSide, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def list( + self, + ontology_rid: ontologies_models.OntologyRid, + *, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.AsyncResourceIterator[ontologies_models.ObjectType]: + """ + Lists the object types for the given Ontology. + + Each page may be smaller or larger than the requested page size. However, it is guaranteed that if there are + more results available, at least one result will be present in the + response. + + :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the object types. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. + :type ontology_rid: OntologyRid + :param page_size: The desired size of the page to be returned. Defaults to 500. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. + :type page_size: Optional[PageSize] + :param page_token: + :type page_token: Optional[PageToken] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.AsyncResourceIterator[ontologies_models.ObjectType] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v1/ontologies/{ontologyRid}/objectTypes", + query_params={ + "pageSize": page_size, + "pageToken": page_token, + }, + path_params={ + "ontologyRid": ontology_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.ListObjectTypesResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def list_outgoing_link_types( + self, + ontology_rid: ontologies_models.OntologyRid, + object_type: ontologies_models.ObjectTypeApiName, + *, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.AsyncResourceIterator[ontologies_models.LinkTypeSide]: + """ + List the outgoing links for an object type. + + :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the object type. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager** application. + :type ontology_rid: OntologyRid + :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager** application. + :type object_type: ObjectTypeApiName + :param page_size: The desired size of the page to be returned. + :type page_size: Optional[PageSize] + :param page_token: + :type page_token: Optional[PageToken] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.AsyncResourceIterator[ontologies_models.LinkTypeSide] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v1/ontologies/{ontologyRid}/objectTypes/{objectType}/outgoingLinkTypes", + query_params={ + "pageSize": page_size, + "pageToken": page_token, + }, + path_params={ + "ontologyRid": ontology_rid, + "objectType": object_type, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.ListOutgoingLinkTypesResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + +class _AsyncObjectTypeClientRaw: + def __init__(self, client: AsyncObjectTypeClient) -> None: + def get(_: ontologies_models.ObjectType): ... + def get_outgoing_link_type(_: ontologies_models.LinkTypeSide): ... + def list(_: ontologies_models.ListObjectTypesResponse): ... + def list_outgoing_link_types(_: ontologies_models.ListOutgoingLinkTypesResponse): ... + + self.get = core.async_with_raw_response(get, client.get) + self.get_outgoing_link_type = core.async_with_raw_response( + get_outgoing_link_type, client.get_outgoing_link_type + ) + self.list = core.async_with_raw_response(list, client.list) + self.list_outgoing_link_types = core.async_with_raw_response( + list_outgoing_link_types, client.list_outgoing_link_types + ) + + +class _AsyncObjectTypeClientStreaming: + def __init__(self, client: AsyncObjectTypeClient) -> None: + def get(_: ontologies_models.ObjectType): ... + def get_outgoing_link_type(_: ontologies_models.LinkTypeSide): ... + def list(_: ontologies_models.ListObjectTypesResponse): ... + def list_outgoing_link_types(_: ontologies_models.ListOutgoingLinkTypesResponse): ... + + self.get = core.async_with_streaming_response(get, client.get) + self.get_outgoing_link_type = core.async_with_streaming_response( + get_outgoing_link_type, client.get_outgoing_link_type + ) + self.list = core.async_with_streaming_response(list, client.list) + self.list_outgoing_link_types = core.async_with_streaming_response( + list_outgoing_link_types, client.list_outgoing_link_types + ) diff --git a/foundry_sdk/v1/ontologies/ontology.py b/foundry_sdk/v1/ontologies/ontology.py new file mode 100644 index 000000000..1a9726c9f --- /dev/null +++ b/foundry_sdk/v1/ontologies/ontology.py @@ -0,0 +1,318 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing +from functools import cached_property + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v1.ontologies import models as ontologies_models + + +class OntologyClient: + """ + The API client for the Ontology Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _OntologyClientStreaming(self) + self.with_raw_response = _OntologyClientRaw(self) + + @cached_property + def ActionType(self): + from foundry_sdk.v1.ontologies.action_type import ActionTypeClient + + return ActionTypeClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @cached_property + def ObjectType(self): + from foundry_sdk.v1.ontologies.object_type import ObjectTypeClient + + return ObjectTypeClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @cached_property + def QueryType(self): + from foundry_sdk.v1.ontologies.query_type import QueryTypeClient + + return QueryTypeClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + ontology_rid: ontologies_models.OntologyRid, + *, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> ontologies_models.Ontology: + """ + Gets a specific ontology with the given Ontology RID. + + :param ontology_rid: The unique Resource Identifier (RID) of the Ontology. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. + :type ontology_rid: OntologyRid + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: ontologies_models.Ontology + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v1/ontologies/{ontologyRid}", + query_params={}, + path_params={ + "ontologyRid": ontology_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.Ontology, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def list( + self, + *, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> ontologies_models.ListOntologiesResponse: + """ + Lists the Ontologies visible to the current user. + + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: ontologies_models.ListOntologiesResponse + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v1/ontologies", + query_params={}, + path_params={}, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.ListOntologiesResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _OntologyClientRaw: + def __init__(self, client: OntologyClient) -> None: + def get(_: ontologies_models.Ontology): ... + def list(_: ontologies_models.ListOntologiesResponse): ... + + self.get = core.with_raw_response(get, client.get) + self.list = core.with_raw_response(list, client.list) + + +class _OntologyClientStreaming: + def __init__(self, client: OntologyClient) -> None: + def get(_: ontologies_models.Ontology): ... + def list(_: ontologies_models.ListOntologiesResponse): ... + + self.get = core.with_streaming_response(get, client.get) + self.list = core.with_streaming_response(list, client.list) + + +class AsyncOntologyClient: + """ + The API client for the Ontology Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncOntologyClientStreaming(self) + self.with_raw_response = _AsyncOntologyClientRaw(self) + + @cached_property + def ActionType(self): + from foundry_sdk.v1.ontologies.action_type import AsyncActionTypeClient + + return AsyncActionTypeClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @cached_property + def ObjectType(self): + from foundry_sdk.v1.ontologies.object_type import AsyncObjectTypeClient + + return AsyncObjectTypeClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @cached_property + def QueryType(self): + from foundry_sdk.v1.ontologies.query_type import AsyncQueryTypeClient + + return AsyncQueryTypeClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + ontology_rid: ontologies_models.OntologyRid, + *, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[ontologies_models.Ontology]: + """ + Gets a specific ontology with the given Ontology RID. + + :param ontology_rid: The unique Resource Identifier (RID) of the Ontology. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. + :type ontology_rid: OntologyRid + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[ontologies_models.Ontology] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v1/ontologies/{ontologyRid}", + query_params={}, + path_params={ + "ontologyRid": ontology_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.Ontology, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def list( + self, + *, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[ontologies_models.ListOntologiesResponse]: + """ + Lists the Ontologies visible to the current user. + + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[ontologies_models.ListOntologiesResponse] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v1/ontologies", + query_params={}, + path_params={}, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.ListOntologiesResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _AsyncOntologyClientRaw: + def __init__(self, client: AsyncOntologyClient) -> None: + def get(_: ontologies_models.Ontology): ... + def list(_: ontologies_models.ListOntologiesResponse): ... + + self.get = core.async_with_raw_response(get, client.get) + self.list = core.async_with_raw_response(list, client.list) + + +class _AsyncOntologyClientStreaming: + def __init__(self, client: AsyncOntologyClient) -> None: + def get(_: ontologies_models.Ontology): ... + def list(_: ontologies_models.ListOntologiesResponse): ... + + self.get = core.async_with_streaming_response(get, client.get) + self.list = core.async_with_streaming_response(list, client.list) diff --git a/foundry_sdk/v1/ontologies/ontology_object.py b/foundry_sdk/v1/ontologies/ontology_object.py new file mode 100644 index 000000000..343b4fec3 --- /dev/null +++ b/foundry_sdk/v1/ontologies/ontology_object.py @@ -0,0 +1,994 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v1.core import models as core_models +from foundry_sdk.v1.ontologies import models as ontologies_models + + +class OntologyObjectClient: + """ + The API client for the OntologyObject Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _OntologyObjectClientStreaming(self) + self.with_raw_response = _OntologyObjectClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def aggregate( + self, + ontology_rid: ontologies_models.OntologyRid, + object_type: ontologies_models.ObjectTypeApiName, + *, + aggregation: typing.List[ontologies_models.Aggregation], + group_by: typing.List[ontologies_models.AggregationGroupBy], + query: typing.Optional[ontologies_models.SearchJsonQuery] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> ontologies_models.AggregateObjectsResponse: + """ + Perform functions on object fields in the specified ontology and object type. + + :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the objects. + :type ontology_rid: OntologyRid + :param object_type: The type of the object to aggregate on. + :type object_type: ObjectTypeApiName + :param aggregation: + :type aggregation: List[Aggregation] + :param group_by: + :type group_by: List[AggregationGroupBy] + :param query: + :type query: Optional[SearchJsonQuery] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: ontologies_models.AggregateObjectsResponse + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v1/ontologies/{ontologyRid}/objects/{objectType}/aggregate", + query_params={}, + path_params={ + "ontologyRid": ontology_rid, + "objectType": object_type, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=ontologies_models.AggregateObjectsRequest( + aggregation=aggregation, + query=query, + group_by=group_by, + ), + response_type=ontologies_models.AggregateObjectsResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + ontology_rid: ontologies_models.OntologyRid, + object_type: ontologies_models.ObjectTypeApiName, + primary_key: ontologies_models.PropertyValueEscapedString, + *, + properties: typing.Optional[typing.List[ontologies_models.SelectedPropertyApiName]] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> ontologies_models.OntologyObject: + """ + Gets a specific object with the given primary key. + + :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the object. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. + :type ontology_rid: OntologyRid + :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. + :type object_type: ObjectTypeApiName + :param primary_key: The primary key of the requested object. To look up the expected primary key for your object type, use the `Get object type` endpoint or the **Ontology Manager**. + :type primary_key: PropertyValueEscapedString + :param properties: The properties of the object type that should be included in the response. Omit this parameter to get all the properties. + :type properties: Optional[List[SelectedPropertyApiName]] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: ontologies_models.OntologyObject + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v1/ontologies/{ontologyRid}/objects/{objectType}/{primaryKey}", + query_params={ + "properties": properties, + }, + path_params={ + "ontologyRid": ontology_rid, + "objectType": object_type, + "primaryKey": primary_key, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.OntologyObject, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get_linked_object( + self, + ontology_rid: ontologies_models.OntologyRid, + object_type: ontologies_models.ObjectTypeApiName, + primary_key: ontologies_models.PropertyValueEscapedString, + link_type: ontologies_models.LinkTypeApiName, + linked_object_primary_key: ontologies_models.PropertyValueEscapedString, + *, + properties: typing.Optional[typing.List[ontologies_models.SelectedPropertyApiName]] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> ontologies_models.OntologyObject: + """ + Get a specific linked object that originates from another object. If there is no link between the two objects, + LinkedObjectNotFound is thrown. + + :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the object. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. + :type ontology_rid: OntologyRid + :param object_type: The API name of the object from which the links originate. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. + :type object_type: ObjectTypeApiName + :param primary_key: The primary key of the object from which the link originates. To look up the expected primary key for your object type, use the `Get object type` endpoint or the **Ontology Manager**. + :type primary_key: PropertyValueEscapedString + :param link_type: The API name of the link that exists between the object and the requested objects. To find the API name for your link type, check the **Ontology Manager**. + :type link_type: LinkTypeApiName + :param linked_object_primary_key: The primary key of the requested linked object. To look up the expected primary key for your object type, use the `Get object type` endpoint (passing the linked object type) or the **Ontology Manager**. + :type linked_object_primary_key: PropertyValueEscapedString + :param properties: The properties of the object type that should be included in the response. Omit this parameter to get all the properties. + :type properties: Optional[List[SelectedPropertyApiName]] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: ontologies_models.OntologyObject + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v1/ontologies/{ontologyRid}/objects/{objectType}/{primaryKey}/links/{linkType}/{linkedObjectPrimaryKey}", + query_params={ + "properties": properties, + }, + path_params={ + "ontologyRid": ontology_rid, + "objectType": object_type, + "primaryKey": primary_key, + "linkType": link_type, + "linkedObjectPrimaryKey": linked_object_primary_key, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.OntologyObject, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def list( + self, + ontology_rid: ontologies_models.OntologyRid, + object_type: ontologies_models.ObjectTypeApiName, + *, + order_by: typing.Optional[ontologies_models.OrderBy] = None, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + properties: typing.Optional[typing.List[ontologies_models.SelectedPropertyApiName]] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.ResourceIterator[ontologies_models.OntologyObject]: + """ + Lists the objects for the given Ontology and object type. + + This endpoint supports filtering objects. + See the [Filtering Objects documentation](https://palantir.com/docs/foundry/api/ontology-resources/objects/ontology-object-basics#filter-objects) for details. + + Note that this endpoint does not guarantee consistency. Changes to the data could result in missing or + repeated objects in the response pages. + + For Object Storage V1 backed objects, this endpoint returns a maximum of 10,000 objects. After 10,000 objects have been returned and if more objects + are available, attempting to load another page will result in an `ObjectsExceededLimit` error being returned. There is no limit on Object Storage V2 backed objects. + + Each page may be smaller or larger than the requested page size. However, it + is guaranteed that if there are more results available, at least one result will be present + in the response. + + Note that null value properties will not be returned. + + :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the objects. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. + :type ontology_rid: OntologyRid + :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. + :type object_type: ObjectTypeApiName + :param order_by: + :type order_by: Optional[OrderBy] + :param page_size: The desired size of the page to be returned. Defaults to 1,000. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. + :type page_size: Optional[PageSize] + :param page_token: + :type page_token: Optional[PageToken] + :param properties: The properties of the object type that should be included in the response. Omit this parameter to get all the properties. + :type properties: Optional[List[SelectedPropertyApiName]] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.ResourceIterator[ontologies_models.OntologyObject] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v1/ontologies/{ontologyRid}/objects/{objectType}", + query_params={ + "orderBy": order_by, + "pageSize": page_size, + "pageToken": page_token, + "properties": properties, + }, + path_params={ + "ontologyRid": ontology_rid, + "objectType": object_type, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.ListObjectsResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def list_linked_objects( + self, + ontology_rid: ontologies_models.OntologyRid, + object_type: ontologies_models.ObjectTypeApiName, + primary_key: ontologies_models.PropertyValueEscapedString, + link_type: ontologies_models.LinkTypeApiName, + *, + order_by: typing.Optional[ontologies_models.OrderBy] = None, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + properties: typing.Optional[typing.List[ontologies_models.SelectedPropertyApiName]] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.ResourceIterator[ontologies_models.OntologyObject]: + """ + Lists the linked objects for a specific object and the given link type. + + This endpoint supports filtering objects. + See the [Filtering Objects documentation](https://palantir.com/docs/foundry/api/ontology-resources/objects/ontology-object-basics#filter-objects) for details. + + Note that this endpoint does not guarantee consistency. Changes to the data could result in missing or + repeated objects in the response pages. + + For Object Storage V1 backed objects, this endpoint returns a maximum of 10,000 objects. After 10,000 objects have been returned and if more objects + are available, attempting to load another page will result in an `ObjectsExceededLimit` error being returned. There is no limit on Object Storage V2 backed objects. + + Each page may be smaller or larger than the requested page size. However, it + is guaranteed that if there are more results available, at least one result will be present + in the response. + + Note that null value properties will not be returned. + + :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the objects. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. + :type ontology_rid: OntologyRid + :param object_type: The API name of the object from which the links originate. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. + :type object_type: ObjectTypeApiName + :param primary_key: The primary key of the object from which the links originate. To look up the expected primary key for your object type, use the `Get object type` endpoint or the **Ontology Manager**. + :type primary_key: PropertyValueEscapedString + :param link_type: The API name of the link that exists between the object and the requested objects. To find the API name for your link type, check the **Ontology Manager**. + :type link_type: LinkTypeApiName + :param order_by: + :type order_by: Optional[OrderBy] + :param page_size: The desired size of the page to be returned. Defaults to 1,000. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. + :type page_size: Optional[PageSize] + :param page_token: + :type page_token: Optional[PageToken] + :param properties: The properties of the object type that should be included in the response. Omit this parameter to get all the properties. + :type properties: Optional[List[SelectedPropertyApiName]] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.ResourceIterator[ontologies_models.OntologyObject] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v1/ontologies/{ontologyRid}/objects/{objectType}/{primaryKey}/links/{linkType}", + query_params={ + "orderBy": order_by, + "pageSize": page_size, + "pageToken": page_token, + "properties": properties, + }, + path_params={ + "ontologyRid": ontology_rid, + "objectType": object_type, + "primaryKey": primary_key, + "linkType": link_type, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.ListLinkedObjectsResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def search( + self, + ontology_rid: ontologies_models.OntologyRid, + object_type: ontologies_models.ObjectTypeApiName, + *, + fields: typing.List[ontologies_models.PropertyApiName], + query: ontologies_models.SearchJsonQuery, + order_by: typing.Optional[ontologies_models.SearchOrderBy] = None, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> ontologies_models.SearchObjectsResponse: + """ + Search for objects in the specified ontology and object type. The request body is used + to filter objects based on the specified query. The supported queries are: + + | Query type | Description | Supported Types | + |----------|-----------------------------------------------------------------------------------|---------------------------------| + | lt | The provided property is less than the provided value. | number, string, date, timestamp | + | gt | The provided property is greater than the provided value. | number, string, date, timestamp | + | lte | The provided property is less than or equal to the provided value. | number, string, date, timestamp | + | gte | The provided property is greater than or equal to the provided value. | number, string, date, timestamp | + | eq | The provided property is exactly equal to the provided value. | number, string, date, timestamp | + | isNull | The provided property is (or is not) null. | all | + | contains | The provided property contains the provided value. | array | + | not | The sub-query does not match. | N/A (applied on a query) | + | and | All the sub-queries match. | N/A (applied on queries) | + | or | At least one of the sub-queries match. | N/A (applied on queries) | + | prefix | The provided property starts with the provided term. | string | + | phrase | The provided property contains the provided term as a substring. | string | + | anyTerm | The provided property contains at least one of the terms separated by whitespace. | string | + | allTerms | The provided property contains all the terms separated by whitespace. | string | + + Queries can be at most three levels deep. By default, terms are separated by whitespace or punctuation (`?!,:;-[](){}'"~`). Periods (`.`) on their own are ignored. + Partial terms are not matched by terms filters except where explicitly noted. + + :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the objects. + :type ontology_rid: OntologyRid + :param object_type: The type of the requested objects. + :type object_type: ObjectTypeApiName + :param fields: The API names of the object type properties to include in the response. + :type fields: List[PropertyApiName] + :param query: + :type query: SearchJsonQuery + :param order_by: + :type order_by: Optional[SearchOrderBy] + :param page_size: + :type page_size: Optional[PageSize] + :param page_token: + :type page_token: Optional[PageToken] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: ontologies_models.SearchObjectsResponse + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v1/ontologies/{ontologyRid}/objects/{objectType}/search", + query_params={}, + path_params={ + "ontologyRid": ontology_rid, + "objectType": object_type, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=ontologies_models.SearchObjectsRequest( + query=query, + order_by=order_by, + page_size=page_size, + page_token=page_token, + fields=fields, + ), + response_type=ontologies_models.SearchObjectsResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _OntologyObjectClientRaw: + def __init__(self, client: OntologyObjectClient) -> None: + def aggregate(_: ontologies_models.AggregateObjectsResponse): ... + def get(_: ontologies_models.OntologyObject): ... + def get_linked_object(_: ontologies_models.OntologyObject): ... + def list(_: ontologies_models.ListObjectsResponse): ... + def list_linked_objects(_: ontologies_models.ListLinkedObjectsResponse): ... + def search(_: ontologies_models.SearchObjectsResponse): ... + + self.aggregate = core.with_raw_response(aggregate, client.aggregate) + self.get = core.with_raw_response(get, client.get) + self.get_linked_object = core.with_raw_response(get_linked_object, client.get_linked_object) + self.list = core.with_raw_response(list, client.list) + self.list_linked_objects = core.with_raw_response( + list_linked_objects, client.list_linked_objects + ) + self.search = core.with_raw_response(search, client.search) + + +class _OntologyObjectClientStreaming: + def __init__(self, client: OntologyObjectClient) -> None: + def aggregate(_: ontologies_models.AggregateObjectsResponse): ... + def get(_: ontologies_models.OntologyObject): ... + def get_linked_object(_: ontologies_models.OntologyObject): ... + def list(_: ontologies_models.ListObjectsResponse): ... + def list_linked_objects(_: ontologies_models.ListLinkedObjectsResponse): ... + def search(_: ontologies_models.SearchObjectsResponse): ... + + self.aggregate = core.with_streaming_response(aggregate, client.aggregate) + self.get = core.with_streaming_response(get, client.get) + self.get_linked_object = core.with_streaming_response( + get_linked_object, client.get_linked_object + ) + self.list = core.with_streaming_response(list, client.list) + self.list_linked_objects = core.with_streaming_response( + list_linked_objects, client.list_linked_objects + ) + self.search = core.with_streaming_response(search, client.search) + + +class AsyncOntologyObjectClient: + """ + The API client for the OntologyObject Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncOntologyObjectClientStreaming(self) + self.with_raw_response = _AsyncOntologyObjectClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def aggregate( + self, + ontology_rid: ontologies_models.OntologyRid, + object_type: ontologies_models.ObjectTypeApiName, + *, + aggregation: typing.List[ontologies_models.Aggregation], + group_by: typing.List[ontologies_models.AggregationGroupBy], + query: typing.Optional[ontologies_models.SearchJsonQuery] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[ontologies_models.AggregateObjectsResponse]: + """ + Perform functions on object fields in the specified ontology and object type. + + :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the objects. + :type ontology_rid: OntologyRid + :param object_type: The type of the object to aggregate on. + :type object_type: ObjectTypeApiName + :param aggregation: + :type aggregation: List[Aggregation] + :param group_by: + :type group_by: List[AggregationGroupBy] + :param query: + :type query: Optional[SearchJsonQuery] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[ontologies_models.AggregateObjectsResponse] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v1/ontologies/{ontologyRid}/objects/{objectType}/aggregate", + query_params={}, + path_params={ + "ontologyRid": ontology_rid, + "objectType": object_type, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=ontologies_models.AggregateObjectsRequest( + aggregation=aggregation, + query=query, + group_by=group_by, + ), + response_type=ontologies_models.AggregateObjectsResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + ontology_rid: ontologies_models.OntologyRid, + object_type: ontologies_models.ObjectTypeApiName, + primary_key: ontologies_models.PropertyValueEscapedString, + *, + properties: typing.Optional[typing.List[ontologies_models.SelectedPropertyApiName]] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[ontologies_models.OntologyObject]: + """ + Gets a specific object with the given primary key. + + :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the object. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. + :type ontology_rid: OntologyRid + :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. + :type object_type: ObjectTypeApiName + :param primary_key: The primary key of the requested object. To look up the expected primary key for your object type, use the `Get object type` endpoint or the **Ontology Manager**. + :type primary_key: PropertyValueEscapedString + :param properties: The properties of the object type that should be included in the response. Omit this parameter to get all the properties. + :type properties: Optional[List[SelectedPropertyApiName]] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[ontologies_models.OntologyObject] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v1/ontologies/{ontologyRid}/objects/{objectType}/{primaryKey}", + query_params={ + "properties": properties, + }, + path_params={ + "ontologyRid": ontology_rid, + "objectType": object_type, + "primaryKey": primary_key, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.OntologyObject, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get_linked_object( + self, + ontology_rid: ontologies_models.OntologyRid, + object_type: ontologies_models.ObjectTypeApiName, + primary_key: ontologies_models.PropertyValueEscapedString, + link_type: ontologies_models.LinkTypeApiName, + linked_object_primary_key: ontologies_models.PropertyValueEscapedString, + *, + properties: typing.Optional[typing.List[ontologies_models.SelectedPropertyApiName]] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[ontologies_models.OntologyObject]: + """ + Get a specific linked object that originates from another object. If there is no link between the two objects, + LinkedObjectNotFound is thrown. + + :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the object. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. + :type ontology_rid: OntologyRid + :param object_type: The API name of the object from which the links originate. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. + :type object_type: ObjectTypeApiName + :param primary_key: The primary key of the object from which the link originates. To look up the expected primary key for your object type, use the `Get object type` endpoint or the **Ontology Manager**. + :type primary_key: PropertyValueEscapedString + :param link_type: The API name of the link that exists between the object and the requested objects. To find the API name for your link type, check the **Ontology Manager**. + :type link_type: LinkTypeApiName + :param linked_object_primary_key: The primary key of the requested linked object. To look up the expected primary key for your object type, use the `Get object type` endpoint (passing the linked object type) or the **Ontology Manager**. + :type linked_object_primary_key: PropertyValueEscapedString + :param properties: The properties of the object type that should be included in the response. Omit this parameter to get all the properties. + :type properties: Optional[List[SelectedPropertyApiName]] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[ontologies_models.OntologyObject] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v1/ontologies/{ontologyRid}/objects/{objectType}/{primaryKey}/links/{linkType}/{linkedObjectPrimaryKey}", + query_params={ + "properties": properties, + }, + path_params={ + "ontologyRid": ontology_rid, + "objectType": object_type, + "primaryKey": primary_key, + "linkType": link_type, + "linkedObjectPrimaryKey": linked_object_primary_key, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.OntologyObject, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def list( + self, + ontology_rid: ontologies_models.OntologyRid, + object_type: ontologies_models.ObjectTypeApiName, + *, + order_by: typing.Optional[ontologies_models.OrderBy] = None, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + properties: typing.Optional[typing.List[ontologies_models.SelectedPropertyApiName]] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.AsyncResourceIterator[ontologies_models.OntologyObject]: + """ + Lists the objects for the given Ontology and object type. + + This endpoint supports filtering objects. + See the [Filtering Objects documentation](https://palantir.com/docs/foundry/api/ontology-resources/objects/ontology-object-basics#filter-objects) for details. + + Note that this endpoint does not guarantee consistency. Changes to the data could result in missing or + repeated objects in the response pages. + + For Object Storage V1 backed objects, this endpoint returns a maximum of 10,000 objects. After 10,000 objects have been returned and if more objects + are available, attempting to load another page will result in an `ObjectsExceededLimit` error being returned. There is no limit on Object Storage V2 backed objects. + + Each page may be smaller or larger than the requested page size. However, it + is guaranteed that if there are more results available, at least one result will be present + in the response. + + Note that null value properties will not be returned. + + :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the objects. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. + :type ontology_rid: OntologyRid + :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. + :type object_type: ObjectTypeApiName + :param order_by: + :type order_by: Optional[OrderBy] + :param page_size: The desired size of the page to be returned. Defaults to 1,000. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. + :type page_size: Optional[PageSize] + :param page_token: + :type page_token: Optional[PageToken] + :param properties: The properties of the object type that should be included in the response. Omit this parameter to get all the properties. + :type properties: Optional[List[SelectedPropertyApiName]] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.AsyncResourceIterator[ontologies_models.OntologyObject] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v1/ontologies/{ontologyRid}/objects/{objectType}", + query_params={ + "orderBy": order_by, + "pageSize": page_size, + "pageToken": page_token, + "properties": properties, + }, + path_params={ + "ontologyRid": ontology_rid, + "objectType": object_type, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.ListObjectsResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def list_linked_objects( + self, + ontology_rid: ontologies_models.OntologyRid, + object_type: ontologies_models.ObjectTypeApiName, + primary_key: ontologies_models.PropertyValueEscapedString, + link_type: ontologies_models.LinkTypeApiName, + *, + order_by: typing.Optional[ontologies_models.OrderBy] = None, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + properties: typing.Optional[typing.List[ontologies_models.SelectedPropertyApiName]] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.AsyncResourceIterator[ontologies_models.OntologyObject]: + """ + Lists the linked objects for a specific object and the given link type. + + This endpoint supports filtering objects. + See the [Filtering Objects documentation](https://palantir.com/docs/foundry/api/ontology-resources/objects/ontology-object-basics#filter-objects) for details. + + Note that this endpoint does not guarantee consistency. Changes to the data could result in missing or + repeated objects in the response pages. + + For Object Storage V1 backed objects, this endpoint returns a maximum of 10,000 objects. After 10,000 objects have been returned and if more objects + are available, attempting to load another page will result in an `ObjectsExceededLimit` error being returned. There is no limit on Object Storage V2 backed objects. + + Each page may be smaller or larger than the requested page size. However, it + is guaranteed that if there are more results available, at least one result will be present + in the response. + + Note that null value properties will not be returned. + + :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the objects. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. + :type ontology_rid: OntologyRid + :param object_type: The API name of the object from which the links originate. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. + :type object_type: ObjectTypeApiName + :param primary_key: The primary key of the object from which the links originate. To look up the expected primary key for your object type, use the `Get object type` endpoint or the **Ontology Manager**. + :type primary_key: PropertyValueEscapedString + :param link_type: The API name of the link that exists between the object and the requested objects. To find the API name for your link type, check the **Ontology Manager**. + :type link_type: LinkTypeApiName + :param order_by: + :type order_by: Optional[OrderBy] + :param page_size: The desired size of the page to be returned. Defaults to 1,000. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. + :type page_size: Optional[PageSize] + :param page_token: + :type page_token: Optional[PageToken] + :param properties: The properties of the object type that should be included in the response. Omit this parameter to get all the properties. + :type properties: Optional[List[SelectedPropertyApiName]] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.AsyncResourceIterator[ontologies_models.OntologyObject] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v1/ontologies/{ontologyRid}/objects/{objectType}/{primaryKey}/links/{linkType}", + query_params={ + "orderBy": order_by, + "pageSize": page_size, + "pageToken": page_token, + "properties": properties, + }, + path_params={ + "ontologyRid": ontology_rid, + "objectType": object_type, + "primaryKey": primary_key, + "linkType": link_type, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.ListLinkedObjectsResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def search( + self, + ontology_rid: ontologies_models.OntologyRid, + object_type: ontologies_models.ObjectTypeApiName, + *, + fields: typing.List[ontologies_models.PropertyApiName], + query: ontologies_models.SearchJsonQuery, + order_by: typing.Optional[ontologies_models.SearchOrderBy] = None, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[ontologies_models.SearchObjectsResponse]: + """ + Search for objects in the specified ontology and object type. The request body is used + to filter objects based on the specified query. The supported queries are: + + | Query type | Description | Supported Types | + |----------|-----------------------------------------------------------------------------------|---------------------------------| + | lt | The provided property is less than the provided value. | number, string, date, timestamp | + | gt | The provided property is greater than the provided value. | number, string, date, timestamp | + | lte | The provided property is less than or equal to the provided value. | number, string, date, timestamp | + | gte | The provided property is greater than or equal to the provided value. | number, string, date, timestamp | + | eq | The provided property is exactly equal to the provided value. | number, string, date, timestamp | + | isNull | The provided property is (or is not) null. | all | + | contains | The provided property contains the provided value. | array | + | not | The sub-query does not match. | N/A (applied on a query) | + | and | All the sub-queries match. | N/A (applied on queries) | + | or | At least one of the sub-queries match. | N/A (applied on queries) | + | prefix | The provided property starts with the provided term. | string | + | phrase | The provided property contains the provided term as a substring. | string | + | anyTerm | The provided property contains at least one of the terms separated by whitespace. | string | + | allTerms | The provided property contains all the terms separated by whitespace. | string | + + Queries can be at most three levels deep. By default, terms are separated by whitespace or punctuation (`?!,:;-[](){}'"~`). Periods (`.`) on their own are ignored. + Partial terms are not matched by terms filters except where explicitly noted. + + :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the objects. + :type ontology_rid: OntologyRid + :param object_type: The type of the requested objects. + :type object_type: ObjectTypeApiName + :param fields: The API names of the object type properties to include in the response. + :type fields: List[PropertyApiName] + :param query: + :type query: SearchJsonQuery + :param order_by: + :type order_by: Optional[SearchOrderBy] + :param page_size: + :type page_size: Optional[PageSize] + :param page_token: + :type page_token: Optional[PageToken] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[ontologies_models.SearchObjectsResponse] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v1/ontologies/{ontologyRid}/objects/{objectType}/search", + query_params={}, + path_params={ + "ontologyRid": ontology_rid, + "objectType": object_type, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=ontologies_models.SearchObjectsRequest( + query=query, + order_by=order_by, + page_size=page_size, + page_token=page_token, + fields=fields, + ), + response_type=ontologies_models.SearchObjectsResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _AsyncOntologyObjectClientRaw: + def __init__(self, client: AsyncOntologyObjectClient) -> None: + def aggregate(_: ontologies_models.AggregateObjectsResponse): ... + def get(_: ontologies_models.OntologyObject): ... + def get_linked_object(_: ontologies_models.OntologyObject): ... + def list(_: ontologies_models.ListObjectsResponse): ... + def list_linked_objects(_: ontologies_models.ListLinkedObjectsResponse): ... + def search(_: ontologies_models.SearchObjectsResponse): ... + + self.aggregate = core.async_with_raw_response(aggregate, client.aggregate) + self.get = core.async_with_raw_response(get, client.get) + self.get_linked_object = core.async_with_raw_response( + get_linked_object, client.get_linked_object + ) + self.list = core.async_with_raw_response(list, client.list) + self.list_linked_objects = core.async_with_raw_response( + list_linked_objects, client.list_linked_objects + ) + self.search = core.async_with_raw_response(search, client.search) + + +class _AsyncOntologyObjectClientStreaming: + def __init__(self, client: AsyncOntologyObjectClient) -> None: + def aggregate(_: ontologies_models.AggregateObjectsResponse): ... + def get(_: ontologies_models.OntologyObject): ... + def get_linked_object(_: ontologies_models.OntologyObject): ... + def list(_: ontologies_models.ListObjectsResponse): ... + def list_linked_objects(_: ontologies_models.ListLinkedObjectsResponse): ... + def search(_: ontologies_models.SearchObjectsResponse): ... + + self.aggregate = core.async_with_streaming_response(aggregate, client.aggregate) + self.get = core.async_with_streaming_response(get, client.get) + self.get_linked_object = core.async_with_streaming_response( + get_linked_object, client.get_linked_object + ) + self.list = core.async_with_streaming_response(list, client.list) + self.list_linked_objects = core.async_with_streaming_response( + list_linked_objects, client.list_linked_objects + ) + self.search = core.async_with_streaming_response(search, client.search) diff --git a/foundry_sdk/v1/ontologies/query.py b/foundry_sdk/v1/ontologies/query.py new file mode 100644 index 000000000..46de9e53a --- /dev/null +++ b/foundry_sdk/v1/ontologies/query.py @@ -0,0 +1,228 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v1.core import models as core_models +from foundry_sdk.v1.ontologies import models as ontologies_models + + +class QueryClient: + """ + The API client for the Query Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _QueryClientStreaming(self) + self.with_raw_response = _QueryClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def execute( + self, + ontology_rid: ontologies_models.OntologyRid, + query_api_name: ontologies_models.QueryApiName, + *, + parameters: typing.Dict[ + ontologies_models.ParameterId, typing.Optional[ontologies_models.DataValue] + ], + attribution: typing.Optional[core_models.Attribution] = None, + trace_parent: typing.Optional[core_models.TraceParent] = None, + trace_state: typing.Optional[core_models.TraceState] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> ontologies_models.ExecuteQueryResponse: + """ + Executes a Query using the given parameters. Optional parameters do not need to be supplied. + + :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the Query. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. + :type ontology_rid: OntologyRid + :param query_api_name: The API name of the Query to execute. + :type query_api_name: QueryApiName + :param parameters: + :type parameters: Dict[ParameterId, Optional[DataValue]] + :param attribution: The Attribution to be used when executing this request. + :type attribution: Optional[Attribution] + :param trace_parent: The W3C trace parent header included in the request. + :type trace_parent: Optional[TraceParent] + :param trace_state: The W3C trace state header included in the request. + :type trace_state: Optional[TraceState] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: ontologies_models.ExecuteQueryResponse + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v1/ontologies/{ontologyRid}/queries/{queryApiName}/execute", + query_params={}, + path_params={ + "ontologyRid": ontology_rid, + "queryApiName": query_api_name, + }, + header_params={ + "attribution": attribution, + "traceParent": trace_parent, + "traceState": trace_state, + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=ontologies_models.ExecuteQueryRequest( + parameters=parameters, + ), + response_type=ontologies_models.ExecuteQueryResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _QueryClientRaw: + def __init__(self, client: QueryClient) -> None: + def execute(_: ontologies_models.ExecuteQueryResponse): ... + + self.execute = core.with_raw_response(execute, client.execute) + + +class _QueryClientStreaming: + def __init__(self, client: QueryClient) -> None: + def execute(_: ontologies_models.ExecuteQueryResponse): ... + + self.execute = core.with_streaming_response(execute, client.execute) + + +class AsyncQueryClient: + """ + The API client for the Query Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncQueryClientStreaming(self) + self.with_raw_response = _AsyncQueryClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def execute( + self, + ontology_rid: ontologies_models.OntologyRid, + query_api_name: ontologies_models.QueryApiName, + *, + parameters: typing.Dict[ + ontologies_models.ParameterId, typing.Optional[ontologies_models.DataValue] + ], + attribution: typing.Optional[core_models.Attribution] = None, + trace_parent: typing.Optional[core_models.TraceParent] = None, + trace_state: typing.Optional[core_models.TraceState] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[ontologies_models.ExecuteQueryResponse]: + """ + Executes a Query using the given parameters. Optional parameters do not need to be supplied. + + :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the Query. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. + :type ontology_rid: OntologyRid + :param query_api_name: The API name of the Query to execute. + :type query_api_name: QueryApiName + :param parameters: + :type parameters: Dict[ParameterId, Optional[DataValue]] + :param attribution: The Attribution to be used when executing this request. + :type attribution: Optional[Attribution] + :param trace_parent: The W3C trace parent header included in the request. + :type trace_parent: Optional[TraceParent] + :param trace_state: The W3C trace state header included in the request. + :type trace_state: Optional[TraceState] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[ontologies_models.ExecuteQueryResponse] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v1/ontologies/{ontologyRid}/queries/{queryApiName}/execute", + query_params={}, + path_params={ + "ontologyRid": ontology_rid, + "queryApiName": query_api_name, + }, + header_params={ + "attribution": attribution, + "traceParent": trace_parent, + "traceState": trace_state, + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=ontologies_models.ExecuteQueryRequest( + parameters=parameters, + ), + response_type=ontologies_models.ExecuteQueryResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _AsyncQueryClientRaw: + def __init__(self, client: AsyncQueryClient) -> None: + def execute(_: ontologies_models.ExecuteQueryResponse): ... + + self.execute = core.async_with_raw_response(execute, client.execute) + + +class _AsyncQueryClientStreaming: + def __init__(self, client: AsyncQueryClient) -> None: + def execute(_: ontologies_models.ExecuteQueryResponse): ... + + self.execute = core.async_with_streaming_response(execute, client.execute) diff --git a/foundry_sdk/v1/ontologies/query_type.py b/foundry_sdk/v1/ontologies/query_type.py new file mode 100644 index 000000000..c6ec515dc --- /dev/null +++ b/foundry_sdk/v1/ontologies/query_type.py @@ -0,0 +1,300 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v1.core import models as core_models +from foundry_sdk.v1.ontologies import models as ontologies_models + + +class QueryTypeClient: + """ + The API client for the QueryType Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _QueryTypeClientStreaming(self) + self.with_raw_response = _QueryTypeClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + ontology_rid: ontologies_models.OntologyRid, + query_api_name: ontologies_models.QueryApiName, + *, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> ontologies_models.QueryType: + """ + Gets a specific query type with the given API name. + + :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the query type. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. + :type ontology_rid: OntologyRid + :param query_api_name: The API name of the query type. To find the API name, use the **List query types** endpoint or check the **Ontology Manager**. + :type query_api_name: QueryApiName + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: ontologies_models.QueryType + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v1/ontologies/{ontologyRid}/queryTypes/{queryApiName}", + query_params={}, + path_params={ + "ontologyRid": ontology_rid, + "queryApiName": query_api_name, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.QueryType, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def list( + self, + ontology_rid: ontologies_models.OntologyRid, + *, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.ResourceIterator[ontologies_models.QueryType]: + """ + Lists the query types for the given Ontology. + + Each page may be smaller than the requested page size. However, it is guaranteed that if there are more + results available, at least one result will be present in the response. + + :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the query types. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. + :type ontology_rid: OntologyRid + :param page_size: The desired size of the page to be returned. Defaults to 100. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. + :type page_size: Optional[PageSize] + :param page_token: + :type page_token: Optional[PageToken] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.ResourceIterator[ontologies_models.QueryType] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v1/ontologies/{ontologyRid}/queryTypes", + query_params={ + "pageSize": page_size, + "pageToken": page_token, + }, + path_params={ + "ontologyRid": ontology_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.ListQueryTypesResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + +class _QueryTypeClientRaw: + def __init__(self, client: QueryTypeClient) -> None: + def get(_: ontologies_models.QueryType): ... + def list(_: ontologies_models.ListQueryTypesResponse): ... + + self.get = core.with_raw_response(get, client.get) + self.list = core.with_raw_response(list, client.list) + + +class _QueryTypeClientStreaming: + def __init__(self, client: QueryTypeClient) -> None: + def get(_: ontologies_models.QueryType): ... + def list(_: ontologies_models.ListQueryTypesResponse): ... + + self.get = core.with_streaming_response(get, client.get) + self.list = core.with_streaming_response(list, client.list) + + +class AsyncQueryTypeClient: + """ + The API client for the QueryType Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncQueryTypeClientStreaming(self) + self.with_raw_response = _AsyncQueryTypeClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + ontology_rid: ontologies_models.OntologyRid, + query_api_name: ontologies_models.QueryApiName, + *, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[ontologies_models.QueryType]: + """ + Gets a specific query type with the given API name. + + :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the query type. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. + :type ontology_rid: OntologyRid + :param query_api_name: The API name of the query type. To find the API name, use the **List query types** endpoint or check the **Ontology Manager**. + :type query_api_name: QueryApiName + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[ontologies_models.QueryType] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v1/ontologies/{ontologyRid}/queryTypes/{queryApiName}", + query_params={}, + path_params={ + "ontologyRid": ontology_rid, + "queryApiName": query_api_name, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.QueryType, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def list( + self, + ontology_rid: ontologies_models.OntologyRid, + *, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.AsyncResourceIterator[ontologies_models.QueryType]: + """ + Lists the query types for the given Ontology. + + Each page may be smaller than the requested page size. However, it is guaranteed that if there are more + results available, at least one result will be present in the response. + + :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the query types. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. + :type ontology_rid: OntologyRid + :param page_size: The desired size of the page to be returned. Defaults to 100. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. + :type page_size: Optional[PageSize] + :param page_token: + :type page_token: Optional[PageToken] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.AsyncResourceIterator[ontologies_models.QueryType] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v1/ontologies/{ontologyRid}/queryTypes", + query_params={ + "pageSize": page_size, + "pageToken": page_token, + }, + path_params={ + "ontologyRid": ontology_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.ListQueryTypesResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + +class _AsyncQueryTypeClientRaw: + def __init__(self, client: AsyncQueryTypeClient) -> None: + def get(_: ontologies_models.QueryType): ... + def list(_: ontologies_models.ListQueryTypesResponse): ... + + self.get = core.async_with_raw_response(get, client.get) + self.list = core.async_with_raw_response(list, client.list) + + +class _AsyncQueryTypeClientStreaming: + def __init__(self, client: AsyncQueryTypeClient) -> None: + def get(_: ontologies_models.QueryType): ... + def list(_: ontologies_models.ListQueryTypesResponse): ... + + self.get = core.async_with_streaming_response(get, client.get) + self.list = core.async_with_streaming_response(list, client.list) diff --git a/foundry_sdk/v2/__init__.py b/foundry_sdk/v2/__init__.py new file mode 100644 index 000000000..645f6b6cc --- /dev/null +++ b/foundry_sdk/v2/__init__.py @@ -0,0 +1,22 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +from foundry_sdk.v2.client import AsyncFoundryClient +from foundry_sdk.v2.client import FoundryClient + +__all__ = [ + "FoundryClient", + "AsyncFoundryClient", +] diff --git a/foundry_sdk/v2/admin/__init__.py b/foundry_sdk/v2/admin/__init__.py new file mode 100644 index 000000000..ddb02c365 --- /dev/null +++ b/foundry_sdk/v2/admin/__init__.py @@ -0,0 +1,22 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +from foundry_sdk.v2.admin._client import AdminClient +from foundry_sdk.v2.admin._client import AsyncAdminClient + +__all__ = [ + "AdminClient", + "AsyncAdminClient", +] diff --git a/foundry_sdk/v2/admin/_client.py b/foundry_sdk/v2/admin/_client.py new file mode 100644 index 000000000..a0cd99426 --- /dev/null +++ b/foundry_sdk/v2/admin/_client.py @@ -0,0 +1,149 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing +from functools import cached_property + +from foundry_sdk import _core as core + + +class AdminClient: + """ + The API client for the Admin Namespace. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + + @cached_property + def Enrollment(self): + from foundry_sdk.v2.admin.enrollment import EnrollmentClient + + return EnrollmentClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @cached_property + def Group(self): + from foundry_sdk.v2.admin.group import GroupClient + + return GroupClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @cached_property + def Marking(self): + from foundry_sdk.v2.admin.marking import MarkingClient + + return MarkingClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @cached_property + def MarkingCategory(self): + from foundry_sdk.v2.admin.marking_category import MarkingCategoryClient + + return MarkingCategoryClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @cached_property + def Organization(self): + from foundry_sdk.v2.admin.organization import OrganizationClient + + return OrganizationClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @cached_property + def Role(self): + from foundry_sdk.v2.admin.role import RoleClient + + return RoleClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @cached_property + def User(self): + from foundry_sdk.v2.admin.user import UserClient + + return UserClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + +class AsyncAdminClient: + """ + The Async API client for the Admin Namespace. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + from foundry_sdk.v2.admin.enrollment import AsyncEnrollmentClient + from foundry_sdk.v2.admin.group import AsyncGroupClient + from foundry_sdk.v2.admin.marking import AsyncMarkingClient + from foundry_sdk.v2.admin.marking_category import AsyncMarkingCategoryClient + from foundry_sdk.v2.admin.organization import AsyncOrganizationClient + from foundry_sdk.v2.admin.role import AsyncRoleClient + from foundry_sdk.v2.admin.user import AsyncUserClient + + self.Enrollment = AsyncEnrollmentClient(auth=auth, hostname=hostname, config=config) + + self.Group = AsyncGroupClient(auth=auth, hostname=hostname, config=config) + + self.Marking = AsyncMarkingClient(auth=auth, hostname=hostname, config=config) + + self.MarkingCategory = AsyncMarkingCategoryClient( + auth=auth, hostname=hostname, config=config + ) + + self.Organization = AsyncOrganizationClient(auth=auth, hostname=hostname, config=config) + + self.Role = AsyncRoleClient(auth=auth, hostname=hostname, config=config) + + self.User = AsyncUserClient(auth=auth, hostname=hostname, config=config) diff --git a/foundry_sdk/v2/admin/authentication_provider.py b/foundry_sdk/v2/admin/authentication_provider.py new file mode 100644 index 000000000..5054cf1e5 --- /dev/null +++ b/foundry_sdk/v2/admin/authentication_provider.py @@ -0,0 +1,641 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v2.admin import errors as admin_errors +from foundry_sdk.v2.admin import models as admin_models +from foundry_sdk.v2.core import models as core_models + + +class AuthenticationProviderClient: + """ + The API client for the AuthenticationProvider Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AuthenticationProviderClientStreaming(self) + self.with_raw_response = _AuthenticationProviderClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + enrollment_rid: core_models.EnrollmentRid, + authentication_provider_rid: admin_models.AuthenticationProviderRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> admin_models.AuthenticationProvider: + """ + Get the AuthenticationProvider with the specified rid. + :param enrollment_rid: + :type enrollment_rid: EnrollmentRid + :param authentication_provider_rid: + :type authentication_provider_rid: AuthenticationProviderRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: admin_models.AuthenticationProvider + + :raises AuthenticationProviderNotFound: The given AuthenticationProvider could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/admin/enrollments/{enrollmentRid}/authenticationProviders/{authenticationProviderRid}", + query_params={ + "preview": preview, + }, + path_params={ + "enrollmentRid": enrollment_rid, + "authenticationProviderRid": authentication_provider_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=admin_models.AuthenticationProvider, + request_timeout=request_timeout, + throwable_errors={ + "AuthenticationProviderNotFound": admin_errors.AuthenticationProviderNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def list( + self, + enrollment_rid: core_models.EnrollmentRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> admin_models.ListAuthenticationProvidersResponse: + """ + Lists all AuthenticationProviders. + + + :param enrollment_rid: + :type enrollment_rid: EnrollmentRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: admin_models.ListAuthenticationProvidersResponse + + :raises EnrollmentNotFound: The given Enrollment could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/admin/enrollments/{enrollmentRid}/authenticationProviders", + query_params={ + "preview": preview, + }, + path_params={ + "enrollmentRid": enrollment_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=admin_models.ListAuthenticationProvidersResponse, + request_timeout=request_timeout, + throwable_errors={ + "EnrollmentNotFound": admin_errors.EnrollmentNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def preregister_group( + self, + enrollment_rid: core_models.EnrollmentRid, + authentication_provider_rid: admin_models.AuthenticationProviderRid, + *, + name: admin_models.GroupName, + organizations: typing.List[core_models.OrganizationRid], + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core_models.PrincipalId: + """ + Register a Group with a given name before any users with this group log in through this Authentication Provider. + Preregistered groups can be used anywhere other groups are used in the platform. + + :param enrollment_rid: + :type enrollment_rid: EnrollmentRid + :param authentication_provider_rid: + :type authentication_provider_rid: AuthenticationProviderRid + :param name: + :type name: GroupName + :param organizations: The RIDs of the Organizations that can view this group. + :type organizations: List[OrganizationRid] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core_models.PrincipalId + + :raises AuthenticationProviderNotFound: The given AuthenticationProvider could not be found. + :raises PreregisterGroupPermissionDenied: Could not preregisterGroup the AuthenticationProvider. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/admin/enrollments/{enrollmentRid}/authenticationProviders/{authenticationProviderRid}/preregisterGroup", + query_params={ + "preview": preview, + }, + path_params={ + "enrollmentRid": enrollment_rid, + "authenticationProviderRid": authentication_provider_rid, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=admin_models.PreregisterGroupRequest( + name=name, + organizations=organizations, + ), + response_type=core_models.PrincipalId, + request_timeout=request_timeout, + throwable_errors={ + "AuthenticationProviderNotFound": admin_errors.AuthenticationProviderNotFound, + "PreregisterGroupPermissionDenied": admin_errors.PreregisterGroupPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def preregister_user( + self, + enrollment_rid: core_models.EnrollmentRid, + authentication_provider_rid: admin_models.AuthenticationProviderRid, + *, + organization: core_models.OrganizationRid, + username: admin_models.UserUsername, + attributes: typing.Optional[ + typing.Dict[admin_models.AttributeName, admin_models.AttributeValues] + ] = None, + email: typing.Optional[str] = None, + family_name: typing.Optional[str] = None, + given_name: typing.Optional[str] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core_models.PrincipalId: + """ + Register a User with a given username before they log in to the platform for the first time through this + Authentication Provider. Preregistered users can be assigned to groups and roles prior to first login. + + :param enrollment_rid: + :type enrollment_rid: EnrollmentRid + :param authentication_provider_rid: + :type authentication_provider_rid: AuthenticationProviderRid + :param organization: The RID of the user's primary Organization. This may be changed when the user logs in for the first time depending on any configured Organization assignment rules. + :type organization: OrganizationRid + :param username: The new user's username. This must match one of the provider's supported username patterns. + :type username: UserUsername + :param attributes: + :type attributes: Optional[Dict[AttributeName, AttributeValues]] + :param email: + :type email: Optional[str] + :param family_name: + :type family_name: Optional[str] + :param given_name: + :type given_name: Optional[str] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core_models.PrincipalId + + :raises AuthenticationProviderNotFound: The given AuthenticationProvider could not be found. + :raises PreregisterUserPermissionDenied: Could not preregisterUser the AuthenticationProvider. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/admin/enrollments/{enrollmentRid}/authenticationProviders/{authenticationProviderRid}/preregisterUser", + query_params={ + "preview": preview, + }, + path_params={ + "enrollmentRid": enrollment_rid, + "authenticationProviderRid": authentication_provider_rid, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=admin_models.PreregisterUserRequest( + username=username, + organization=organization, + given_name=given_name, + family_name=family_name, + email=email, + attributes=attributes, + ), + response_type=core_models.PrincipalId, + request_timeout=request_timeout, + throwable_errors={ + "AuthenticationProviderNotFound": admin_errors.AuthenticationProviderNotFound, + "PreregisterUserPermissionDenied": admin_errors.PreregisterUserPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _AuthenticationProviderClientRaw: + def __init__(self, client: AuthenticationProviderClient) -> None: + def get(_: admin_models.AuthenticationProvider): ... + def list(_: admin_models.ListAuthenticationProvidersResponse): ... + def preregister_group(_: core_models.PrincipalId): ... + def preregister_user(_: core_models.PrincipalId): ... + + self.get = core.with_raw_response(get, client.get) + self.list = core.with_raw_response(list, client.list) + self.preregister_group = core.with_raw_response(preregister_group, client.preregister_group) + self.preregister_user = core.with_raw_response(preregister_user, client.preregister_user) + + +class _AuthenticationProviderClientStreaming: + def __init__(self, client: AuthenticationProviderClient) -> None: + def get(_: admin_models.AuthenticationProvider): ... + def list(_: admin_models.ListAuthenticationProvidersResponse): ... + def preregister_group(_: core_models.PrincipalId): ... + def preregister_user(_: core_models.PrincipalId): ... + + self.get = core.with_streaming_response(get, client.get) + self.list = core.with_streaming_response(list, client.list) + self.preregister_group = core.with_streaming_response( + preregister_group, client.preregister_group + ) + self.preregister_user = core.with_streaming_response( + preregister_user, client.preregister_user + ) + + +class AsyncAuthenticationProviderClient: + """ + The API client for the AuthenticationProvider Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncAuthenticationProviderClientStreaming(self) + self.with_raw_response = _AsyncAuthenticationProviderClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + enrollment_rid: core_models.EnrollmentRid, + authentication_provider_rid: admin_models.AuthenticationProviderRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[admin_models.AuthenticationProvider]: + """ + Get the AuthenticationProvider with the specified rid. + :param enrollment_rid: + :type enrollment_rid: EnrollmentRid + :param authentication_provider_rid: + :type authentication_provider_rid: AuthenticationProviderRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[admin_models.AuthenticationProvider] + + :raises AuthenticationProviderNotFound: The given AuthenticationProvider could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/admin/enrollments/{enrollmentRid}/authenticationProviders/{authenticationProviderRid}", + query_params={ + "preview": preview, + }, + path_params={ + "enrollmentRid": enrollment_rid, + "authenticationProviderRid": authentication_provider_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=admin_models.AuthenticationProvider, + request_timeout=request_timeout, + throwable_errors={ + "AuthenticationProviderNotFound": admin_errors.AuthenticationProviderNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def list( + self, + enrollment_rid: core_models.EnrollmentRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[admin_models.ListAuthenticationProvidersResponse]: + """ + Lists all AuthenticationProviders. + + + :param enrollment_rid: + :type enrollment_rid: EnrollmentRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[admin_models.ListAuthenticationProvidersResponse] + + :raises EnrollmentNotFound: The given Enrollment could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/admin/enrollments/{enrollmentRid}/authenticationProviders", + query_params={ + "preview": preview, + }, + path_params={ + "enrollmentRid": enrollment_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=admin_models.ListAuthenticationProvidersResponse, + request_timeout=request_timeout, + throwable_errors={ + "EnrollmentNotFound": admin_errors.EnrollmentNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def preregister_group( + self, + enrollment_rid: core_models.EnrollmentRid, + authentication_provider_rid: admin_models.AuthenticationProviderRid, + *, + name: admin_models.GroupName, + organizations: typing.List[core_models.OrganizationRid], + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[core_models.PrincipalId]: + """ + Register a Group with a given name before any users with this group log in through this Authentication Provider. + Preregistered groups can be used anywhere other groups are used in the platform. + + :param enrollment_rid: + :type enrollment_rid: EnrollmentRid + :param authentication_provider_rid: + :type authentication_provider_rid: AuthenticationProviderRid + :param name: + :type name: GroupName + :param organizations: The RIDs of the Organizations that can view this group. + :type organizations: List[OrganizationRid] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[core_models.PrincipalId] + + :raises AuthenticationProviderNotFound: The given AuthenticationProvider could not be found. + :raises PreregisterGroupPermissionDenied: Could not preregisterGroup the AuthenticationProvider. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/admin/enrollments/{enrollmentRid}/authenticationProviders/{authenticationProviderRid}/preregisterGroup", + query_params={ + "preview": preview, + }, + path_params={ + "enrollmentRid": enrollment_rid, + "authenticationProviderRid": authentication_provider_rid, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=admin_models.PreregisterGroupRequest( + name=name, + organizations=organizations, + ), + response_type=core_models.PrincipalId, + request_timeout=request_timeout, + throwable_errors={ + "AuthenticationProviderNotFound": admin_errors.AuthenticationProviderNotFound, + "PreregisterGroupPermissionDenied": admin_errors.PreregisterGroupPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def preregister_user( + self, + enrollment_rid: core_models.EnrollmentRid, + authentication_provider_rid: admin_models.AuthenticationProviderRid, + *, + organization: core_models.OrganizationRid, + username: admin_models.UserUsername, + attributes: typing.Optional[ + typing.Dict[admin_models.AttributeName, admin_models.AttributeValues] + ] = None, + email: typing.Optional[str] = None, + family_name: typing.Optional[str] = None, + given_name: typing.Optional[str] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[core_models.PrincipalId]: + """ + Register a User with a given username before they log in to the platform for the first time through this + Authentication Provider. Preregistered users can be assigned to groups and roles prior to first login. + + :param enrollment_rid: + :type enrollment_rid: EnrollmentRid + :param authentication_provider_rid: + :type authentication_provider_rid: AuthenticationProviderRid + :param organization: The RID of the user's primary Organization. This may be changed when the user logs in for the first time depending on any configured Organization assignment rules. + :type organization: OrganizationRid + :param username: The new user's username. This must match one of the provider's supported username patterns. + :type username: UserUsername + :param attributes: + :type attributes: Optional[Dict[AttributeName, AttributeValues]] + :param email: + :type email: Optional[str] + :param family_name: + :type family_name: Optional[str] + :param given_name: + :type given_name: Optional[str] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[core_models.PrincipalId] + + :raises AuthenticationProviderNotFound: The given AuthenticationProvider could not be found. + :raises PreregisterUserPermissionDenied: Could not preregisterUser the AuthenticationProvider. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/admin/enrollments/{enrollmentRid}/authenticationProviders/{authenticationProviderRid}/preregisterUser", + query_params={ + "preview": preview, + }, + path_params={ + "enrollmentRid": enrollment_rid, + "authenticationProviderRid": authentication_provider_rid, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=admin_models.PreregisterUserRequest( + username=username, + organization=organization, + given_name=given_name, + family_name=family_name, + email=email, + attributes=attributes, + ), + response_type=core_models.PrincipalId, + request_timeout=request_timeout, + throwable_errors={ + "AuthenticationProviderNotFound": admin_errors.AuthenticationProviderNotFound, + "PreregisterUserPermissionDenied": admin_errors.PreregisterUserPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _AsyncAuthenticationProviderClientRaw: + def __init__(self, client: AsyncAuthenticationProviderClient) -> None: + def get(_: admin_models.AuthenticationProvider): ... + def list(_: admin_models.ListAuthenticationProvidersResponse): ... + def preregister_group(_: core_models.PrincipalId): ... + def preregister_user(_: core_models.PrincipalId): ... + + self.get = core.async_with_raw_response(get, client.get) + self.list = core.async_with_raw_response(list, client.list) + self.preregister_group = core.async_with_raw_response( + preregister_group, client.preregister_group + ) + self.preregister_user = core.async_with_raw_response( + preregister_user, client.preregister_user + ) + + +class _AsyncAuthenticationProviderClientStreaming: + def __init__(self, client: AsyncAuthenticationProviderClient) -> None: + def get(_: admin_models.AuthenticationProvider): ... + def list(_: admin_models.ListAuthenticationProvidersResponse): ... + def preregister_group(_: core_models.PrincipalId): ... + def preregister_user(_: core_models.PrincipalId): ... + + self.get = core.async_with_streaming_response(get, client.get) + self.list = core.async_with_streaming_response(list, client.list) + self.preregister_group = core.async_with_streaming_response( + preregister_group, client.preregister_group + ) + self.preregister_user = core.async_with_streaming_response( + preregister_user, client.preregister_user + ) diff --git a/foundry_sdk/v2/admin/enrollment.py b/foundry_sdk/v2/admin/enrollment.py new file mode 100644 index 000000000..e2acb16b7 --- /dev/null +++ b/foundry_sdk/v2/admin/enrollment.py @@ -0,0 +1,366 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing +from functools import cached_property + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v2.admin import errors as admin_errors +from foundry_sdk.v2.admin import models as admin_models +from foundry_sdk.v2.core import models as core_models + + +class EnrollmentClient: + """ + The API client for the Enrollment Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _EnrollmentClientStreaming(self) + self.with_raw_response = _EnrollmentClientRaw(self) + + @cached_property + def EnrollmentRoleAssignment(self): + from foundry_sdk.v2.admin.enrollment_role_assignment import ( + EnrollmentRoleAssignmentClient, + ) # NOQA + + return EnrollmentRoleAssignmentClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @cached_property + def Host(self): + from foundry_sdk.v2.admin.host import HostClient + + return HostClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @cached_property + def AuthenticationProvider(self): + from foundry_sdk.v2.admin.authentication_provider import ( + AuthenticationProviderClient, + ) # NOQA + + return AuthenticationProviderClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + enrollment_rid: core_models.EnrollmentRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> admin_models.Enrollment: + """ + Get the Enrollment with the specified rid. + :param enrollment_rid: + :type enrollment_rid: EnrollmentRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: admin_models.Enrollment + + :raises EnrollmentNotFound: The given Enrollment could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/admin/enrollments/{enrollmentRid}", + query_params={ + "preview": preview, + }, + path_params={ + "enrollmentRid": enrollment_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=admin_models.Enrollment, + request_timeout=request_timeout, + throwable_errors={ + "EnrollmentNotFound": admin_errors.EnrollmentNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get_current( + self, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> admin_models.Enrollment: + """ + Returns the Enrollment associated with the current User's primary organization. + + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: admin_models.Enrollment + + :raises EnrollmentNotFound: The given Enrollment could not be found. + :raises GetCurrentEnrollmentPermissionDenied: Could not getCurrent the Enrollment. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/admin/enrollments/getCurrent", + query_params={ + "preview": preview, + }, + path_params={}, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=admin_models.Enrollment, + request_timeout=request_timeout, + throwable_errors={ + "EnrollmentNotFound": admin_errors.EnrollmentNotFound, + "GetCurrentEnrollmentPermissionDenied": admin_errors.GetCurrentEnrollmentPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _EnrollmentClientRaw: + def __init__(self, client: EnrollmentClient) -> None: + def get(_: admin_models.Enrollment): ... + def get_current(_: admin_models.Enrollment): ... + + self.get = core.with_raw_response(get, client.get) + self.get_current = core.with_raw_response(get_current, client.get_current) + + +class _EnrollmentClientStreaming: + def __init__(self, client: EnrollmentClient) -> None: + def get(_: admin_models.Enrollment): ... + def get_current(_: admin_models.Enrollment): ... + + self.get = core.with_streaming_response(get, client.get) + self.get_current = core.with_streaming_response(get_current, client.get_current) + + +class AsyncEnrollmentClient: + """ + The API client for the Enrollment Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncEnrollmentClientStreaming(self) + self.with_raw_response = _AsyncEnrollmentClientRaw(self) + + @cached_property + def EnrollmentRoleAssignment(self): + from foundry_sdk.v2.admin.enrollment_role_assignment import ( + AsyncEnrollmentRoleAssignmentClient, + ) # NOQA + + return AsyncEnrollmentRoleAssignmentClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @cached_property + def Host(self): + from foundry_sdk.v2.admin.host import AsyncHostClient + + return AsyncHostClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @cached_property + def AuthenticationProvider(self): + from foundry_sdk.v2.admin.authentication_provider import ( + AsyncAuthenticationProviderClient, + ) # NOQA + + return AsyncAuthenticationProviderClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + enrollment_rid: core_models.EnrollmentRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[admin_models.Enrollment]: + """ + Get the Enrollment with the specified rid. + :param enrollment_rid: + :type enrollment_rid: EnrollmentRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[admin_models.Enrollment] + + :raises EnrollmentNotFound: The given Enrollment could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/admin/enrollments/{enrollmentRid}", + query_params={ + "preview": preview, + }, + path_params={ + "enrollmentRid": enrollment_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=admin_models.Enrollment, + request_timeout=request_timeout, + throwable_errors={ + "EnrollmentNotFound": admin_errors.EnrollmentNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get_current( + self, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[admin_models.Enrollment]: + """ + Returns the Enrollment associated with the current User's primary organization. + + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[admin_models.Enrollment] + + :raises EnrollmentNotFound: The given Enrollment could not be found. + :raises GetCurrentEnrollmentPermissionDenied: Could not getCurrent the Enrollment. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/admin/enrollments/getCurrent", + query_params={ + "preview": preview, + }, + path_params={}, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=admin_models.Enrollment, + request_timeout=request_timeout, + throwable_errors={ + "EnrollmentNotFound": admin_errors.EnrollmentNotFound, + "GetCurrentEnrollmentPermissionDenied": admin_errors.GetCurrentEnrollmentPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _AsyncEnrollmentClientRaw: + def __init__(self, client: AsyncEnrollmentClient) -> None: + def get(_: admin_models.Enrollment): ... + def get_current(_: admin_models.Enrollment): ... + + self.get = core.async_with_raw_response(get, client.get) + self.get_current = core.async_with_raw_response(get_current, client.get_current) + + +class _AsyncEnrollmentClientStreaming: + def __init__(self, client: AsyncEnrollmentClient) -> None: + def get(_: admin_models.Enrollment): ... + def get_current(_: admin_models.Enrollment): ... + + self.get = core.async_with_streaming_response(get, client.get) + self.get_current = core.async_with_streaming_response(get_current, client.get_current) diff --git a/foundry_sdk/v2/admin/enrollment_role_assignment.py b/foundry_sdk/v2/admin/enrollment_role_assignment.py new file mode 100644 index 000000000..483223e1c --- /dev/null +++ b/foundry_sdk/v2/admin/enrollment_role_assignment.py @@ -0,0 +1,451 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v2.admin import errors as admin_errors +from foundry_sdk.v2.admin import models as admin_models +from foundry_sdk.v2.core import models as core_models + + +class EnrollmentRoleAssignmentClient: + """ + The API client for the EnrollmentRoleAssignment Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _EnrollmentRoleAssignmentClientStreaming(self) + self.with_raw_response = _EnrollmentRoleAssignmentClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def add( + self, + enrollment_rid: core_models.EnrollmentRid, + *, + role_assignments: typing.List[core_models.RoleAssignmentUpdate], + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> None: + """ + Assign roles to principals for the given Enrollment. At most 100 role assignments can be added in a single request. + + :param enrollment_rid: + :type enrollment_rid: EnrollmentRid + :param role_assignments: + :type role_assignments: List[RoleAssignmentUpdate] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: None + + :raises AddEnrollmentRoleAssignmentsPermissionDenied: Could not add the EnrollmentRoleAssignment. + :raises EnrollmentNotFound: The given Enrollment could not be found. + :raises EnrollmentRoleNotFound: One of the provided role IDs was not found. + :raises PrincipalNotFound: A principal (User or Group) with the given PrincipalId could not be found + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/admin/enrollments/{enrollmentRid}/roleAssignments/add", + query_params={ + "preview": preview, + }, + path_params={ + "enrollmentRid": enrollment_rid, + }, + header_params={ + "Content-Type": "application/json", + }, + body=admin_models.AddEnrollmentRoleAssignmentsRequest( + role_assignments=role_assignments, + ), + response_type=None, + request_timeout=request_timeout, + throwable_errors={ + "AddEnrollmentRoleAssignmentsPermissionDenied": admin_errors.AddEnrollmentRoleAssignmentsPermissionDenied, + "EnrollmentNotFound": admin_errors.EnrollmentNotFound, + "EnrollmentRoleNotFound": admin_errors.EnrollmentRoleNotFound, + "PrincipalNotFound": admin_errors.PrincipalNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def list( + self, + enrollment_rid: core_models.EnrollmentRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> admin_models.ListEnrollmentRoleAssignmentsResponse: + """ + List all principals who are assigned a role for the given Enrollment. + + :param enrollment_rid: + :type enrollment_rid: EnrollmentRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: admin_models.ListEnrollmentRoleAssignmentsResponse + + :raises EnrollmentNotFound: The given Enrollment could not be found. + :raises ListEnrollmentRoleAssignmentsPermissionDenied: The provided token does not have permission to list assigned roles for this enrollment. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/admin/enrollments/{enrollmentRid}/roleAssignments", + query_params={ + "preview": preview, + }, + path_params={ + "enrollmentRid": enrollment_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=admin_models.ListEnrollmentRoleAssignmentsResponse, + request_timeout=request_timeout, + throwable_errors={ + "EnrollmentNotFound": admin_errors.EnrollmentNotFound, + "ListEnrollmentRoleAssignmentsPermissionDenied": admin_errors.ListEnrollmentRoleAssignmentsPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def remove( + self, + enrollment_rid: core_models.EnrollmentRid, + *, + role_assignments: typing.List[core_models.RoleAssignmentUpdate], + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> None: + """ + Remove roles from principals for the given Enrollment. At most 100 role assignments can be removed in a single request. + + :param enrollment_rid: + :type enrollment_rid: EnrollmentRid + :param role_assignments: + :type role_assignments: List[RoleAssignmentUpdate] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: None + + :raises EnrollmentNotFound: The given Enrollment could not be found. + :raises EnrollmentRoleNotFound: One of the provided role IDs was not found. + :raises PrincipalNotFound: A principal (User or Group) with the given PrincipalId could not be found + :raises RemoveEnrollmentRoleAssignmentsPermissionDenied: Could not remove the EnrollmentRoleAssignment. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/admin/enrollments/{enrollmentRid}/roleAssignments/remove", + query_params={ + "preview": preview, + }, + path_params={ + "enrollmentRid": enrollment_rid, + }, + header_params={ + "Content-Type": "application/json", + }, + body=admin_models.RemoveEnrollmentRoleAssignmentsRequest( + role_assignments=role_assignments, + ), + response_type=None, + request_timeout=request_timeout, + throwable_errors={ + "EnrollmentNotFound": admin_errors.EnrollmentNotFound, + "EnrollmentRoleNotFound": admin_errors.EnrollmentRoleNotFound, + "PrincipalNotFound": admin_errors.PrincipalNotFound, + "RemoveEnrollmentRoleAssignmentsPermissionDenied": admin_errors.RemoveEnrollmentRoleAssignmentsPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _EnrollmentRoleAssignmentClientRaw: + def __init__(self, client: EnrollmentRoleAssignmentClient) -> None: + def add(_: None): ... + def list(_: admin_models.ListEnrollmentRoleAssignmentsResponse): ... + def remove(_: None): ... + + self.add = core.with_raw_response(add, client.add) + self.list = core.with_raw_response(list, client.list) + self.remove = core.with_raw_response(remove, client.remove) + + +class _EnrollmentRoleAssignmentClientStreaming: + def __init__(self, client: EnrollmentRoleAssignmentClient) -> None: + def list(_: admin_models.ListEnrollmentRoleAssignmentsResponse): ... + + self.list = core.with_streaming_response(list, client.list) + + +class AsyncEnrollmentRoleAssignmentClient: + """ + The API client for the EnrollmentRoleAssignment Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncEnrollmentRoleAssignmentClientStreaming(self) + self.with_raw_response = _AsyncEnrollmentRoleAssignmentClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def add( + self, + enrollment_rid: core_models.EnrollmentRid, + *, + role_assignments: typing.List[core_models.RoleAssignmentUpdate], + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[None]: + """ + Assign roles to principals for the given Enrollment. At most 100 role assignments can be added in a single request. + + :param enrollment_rid: + :type enrollment_rid: EnrollmentRid + :param role_assignments: + :type role_assignments: List[RoleAssignmentUpdate] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[None] + + :raises AddEnrollmentRoleAssignmentsPermissionDenied: Could not add the EnrollmentRoleAssignment. + :raises EnrollmentNotFound: The given Enrollment could not be found. + :raises EnrollmentRoleNotFound: One of the provided role IDs was not found. + :raises PrincipalNotFound: A principal (User or Group) with the given PrincipalId could not be found + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/admin/enrollments/{enrollmentRid}/roleAssignments/add", + query_params={ + "preview": preview, + }, + path_params={ + "enrollmentRid": enrollment_rid, + }, + header_params={ + "Content-Type": "application/json", + }, + body=admin_models.AddEnrollmentRoleAssignmentsRequest( + role_assignments=role_assignments, + ), + response_type=None, + request_timeout=request_timeout, + throwable_errors={ + "AddEnrollmentRoleAssignmentsPermissionDenied": admin_errors.AddEnrollmentRoleAssignmentsPermissionDenied, + "EnrollmentNotFound": admin_errors.EnrollmentNotFound, + "EnrollmentRoleNotFound": admin_errors.EnrollmentRoleNotFound, + "PrincipalNotFound": admin_errors.PrincipalNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def list( + self, + enrollment_rid: core_models.EnrollmentRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[admin_models.ListEnrollmentRoleAssignmentsResponse]: + """ + List all principals who are assigned a role for the given Enrollment. + + :param enrollment_rid: + :type enrollment_rid: EnrollmentRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[admin_models.ListEnrollmentRoleAssignmentsResponse] + + :raises EnrollmentNotFound: The given Enrollment could not be found. + :raises ListEnrollmentRoleAssignmentsPermissionDenied: The provided token does not have permission to list assigned roles for this enrollment. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/admin/enrollments/{enrollmentRid}/roleAssignments", + query_params={ + "preview": preview, + }, + path_params={ + "enrollmentRid": enrollment_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=admin_models.ListEnrollmentRoleAssignmentsResponse, + request_timeout=request_timeout, + throwable_errors={ + "EnrollmentNotFound": admin_errors.EnrollmentNotFound, + "ListEnrollmentRoleAssignmentsPermissionDenied": admin_errors.ListEnrollmentRoleAssignmentsPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def remove( + self, + enrollment_rid: core_models.EnrollmentRid, + *, + role_assignments: typing.List[core_models.RoleAssignmentUpdate], + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[None]: + """ + Remove roles from principals for the given Enrollment. At most 100 role assignments can be removed in a single request. + + :param enrollment_rid: + :type enrollment_rid: EnrollmentRid + :param role_assignments: + :type role_assignments: List[RoleAssignmentUpdate] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[None] + + :raises EnrollmentNotFound: The given Enrollment could not be found. + :raises EnrollmentRoleNotFound: One of the provided role IDs was not found. + :raises PrincipalNotFound: A principal (User or Group) with the given PrincipalId could not be found + :raises RemoveEnrollmentRoleAssignmentsPermissionDenied: Could not remove the EnrollmentRoleAssignment. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/admin/enrollments/{enrollmentRid}/roleAssignments/remove", + query_params={ + "preview": preview, + }, + path_params={ + "enrollmentRid": enrollment_rid, + }, + header_params={ + "Content-Type": "application/json", + }, + body=admin_models.RemoveEnrollmentRoleAssignmentsRequest( + role_assignments=role_assignments, + ), + response_type=None, + request_timeout=request_timeout, + throwable_errors={ + "EnrollmentNotFound": admin_errors.EnrollmentNotFound, + "EnrollmentRoleNotFound": admin_errors.EnrollmentRoleNotFound, + "PrincipalNotFound": admin_errors.PrincipalNotFound, + "RemoveEnrollmentRoleAssignmentsPermissionDenied": admin_errors.RemoveEnrollmentRoleAssignmentsPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _AsyncEnrollmentRoleAssignmentClientRaw: + def __init__(self, client: AsyncEnrollmentRoleAssignmentClient) -> None: + def add(_: None): ... + def list(_: admin_models.ListEnrollmentRoleAssignmentsResponse): ... + def remove(_: None): ... + + self.add = core.async_with_raw_response(add, client.add) + self.list = core.async_with_raw_response(list, client.list) + self.remove = core.async_with_raw_response(remove, client.remove) + + +class _AsyncEnrollmentRoleAssignmentClientStreaming: + def __init__(self, client: AsyncEnrollmentRoleAssignmentClient) -> None: + def list(_: admin_models.ListEnrollmentRoleAssignmentsResponse): ... + + self.list = core.async_with_streaming_response(list, client.list) diff --git a/foundry_sdk/v2/admin/errors.py b/foundry_sdk/v2/admin/errors.py new file mode 100644 index 000000000..ff482838d --- /dev/null +++ b/foundry_sdk/v2/admin/errors.py @@ -0,0 +1,1101 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing +from dataclasses import dataclass + +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v2.admin import models as admin_models +from foundry_sdk.v2.core import models as core_models + + +class AddEnrollmentRoleAssignmentsPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not add the EnrollmentRoleAssignment.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + enrollmentRid: core_models.EnrollmentRid + + +@dataclass +class AddEnrollmentRoleAssignmentsPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["AddEnrollmentRoleAssignmentsPermissionDenied"] + parameters: AddEnrollmentRoleAssignmentsPermissionDeniedParameters + error_instance_id: str + + +class AddGroupMembersPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not add the GroupMember.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + groupId: core_models.GroupId + + +@dataclass +class AddGroupMembersPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["AddGroupMembersPermissionDenied"] + parameters: AddGroupMembersPermissionDeniedParameters + error_instance_id: str + + +class AddMarkingMembersPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not add the MarkingMember.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + markingId: core_models.MarkingId + + +@dataclass +class AddMarkingMembersPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["AddMarkingMembersPermissionDenied"] + parameters: AddMarkingMembersPermissionDeniedParameters + error_instance_id: str + + +class AddMarkingRoleAssignmentsPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not add the MarkingRoleAssignment.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + markingId: core_models.MarkingId + + +@dataclass +class AddMarkingRoleAssignmentsPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["AddMarkingRoleAssignmentsPermissionDenied"] + parameters: AddMarkingRoleAssignmentsPermissionDeniedParameters + error_instance_id: str + + +class AddOrganizationRoleAssignmentsPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not add the OrganizationRoleAssignment.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + organizationRid: core_models.OrganizationRid + + +@dataclass +class AddOrganizationRoleAssignmentsPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["AddOrganizationRoleAssignmentsPermissionDenied"] + parameters: AddOrganizationRoleAssignmentsPermissionDeniedParameters + error_instance_id: str + + +class AuthenticationProviderNotFoundParameters(typing_extensions.TypedDict): + """The given AuthenticationProvider could not be found.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + enrollmentRid: core_models.EnrollmentRid + authenticationProviderRid: admin_models.AuthenticationProviderRid + + +@dataclass +class AuthenticationProviderNotFound(errors.NotFoundError): + name: typing.Literal["AuthenticationProviderNotFound"] + parameters: AuthenticationProviderNotFoundParameters + error_instance_id: str + + +class CannotReplaceProviderInfoForPrincipalInProtectedRealmParameters(typing_extensions.TypedDict): + """Provider information for Principals in this Realm cannot be replaced.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + principalId: core_models.PrincipalId + realm: core_models.Realm + + +@dataclass +class CannotReplaceProviderInfoForPrincipalInProtectedRealm(errors.BadRequestError): + name: typing.Literal["CannotReplaceProviderInfoForPrincipalInProtectedRealm"] + parameters: CannotReplaceProviderInfoForPrincipalInProtectedRealmParameters + error_instance_id: str + + +class CreateGroupPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not create the Group.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class CreateGroupPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["CreateGroupPermissionDenied"] + parameters: CreateGroupPermissionDeniedParameters + error_instance_id: str + + +class CreateMarkingMissingInitialAdminRoleParameters(typing_extensions.TypedDict): + """At least one ADMIN role assignment must be provided when creating a marking.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class CreateMarkingMissingInitialAdminRole(errors.BadRequestError): + name: typing.Literal["CreateMarkingMissingInitialAdminRole"] + parameters: CreateMarkingMissingInitialAdminRoleParameters + error_instance_id: str + + +class CreateMarkingPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not create the Marking.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class CreateMarkingPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["CreateMarkingPermissionDenied"] + parameters: CreateMarkingPermissionDeniedParameters + error_instance_id: str + + +class CreateOrganizationMissingInitialAdminRoleParameters(typing_extensions.TypedDict): + """At least one organization:administrator role grant must be provided when creating a organization.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class CreateOrganizationMissingInitialAdminRole(errors.BadRequestError): + name: typing.Literal["CreateOrganizationMissingInitialAdminRole"] + parameters: CreateOrganizationMissingInitialAdminRoleParameters + error_instance_id: str + + +class CreateOrganizationPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not create the Organization.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class CreateOrganizationPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["CreateOrganizationPermissionDenied"] + parameters: CreateOrganizationPermissionDeniedParameters + error_instance_id: str + + +class DeleteGroupPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not delete the Group.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + groupId: core_models.GroupId + + +@dataclass +class DeleteGroupPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["DeleteGroupPermissionDenied"] + parameters: DeleteGroupPermissionDeniedParameters + error_instance_id: str + + +class DeleteUserPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not delete the User.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + userId: core_models.UserId + + +@dataclass +class DeleteUserPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["DeleteUserPermissionDenied"] + parameters: DeleteUserPermissionDeniedParameters + error_instance_id: str + + +class EnrollmentNotFoundParameters(typing_extensions.TypedDict): + """The given Enrollment could not be found.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + enrollmentRid: core_models.EnrollmentRid + + +@dataclass +class EnrollmentNotFound(errors.NotFoundError): + name: typing.Literal["EnrollmentNotFound"] + parameters: EnrollmentNotFoundParameters + error_instance_id: str + + +class EnrollmentRoleNotFoundParameters(typing_extensions.TypedDict): + """One of the provided role IDs was not found.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class EnrollmentRoleNotFound(errors.NotFoundError): + name: typing.Literal["EnrollmentRoleNotFound"] + parameters: EnrollmentRoleNotFoundParameters + error_instance_id: str + + +class GetCurrentEnrollmentPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not getCurrent the Enrollment.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class GetCurrentEnrollmentPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["GetCurrentEnrollmentPermissionDenied"] + parameters: GetCurrentEnrollmentPermissionDeniedParameters + error_instance_id: str + + +class GetCurrentUserPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not getCurrent the User.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class GetCurrentUserPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["GetCurrentUserPermissionDenied"] + parameters: GetCurrentUserPermissionDeniedParameters + error_instance_id: str + + +class GetGroupProviderInfoPermissionDeniedParameters(typing_extensions.TypedDict): + """The provided token does not have permission to view the provider information for the given group.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + groupId: core_models.GroupId + + +@dataclass +class GetGroupProviderInfoPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["GetGroupProviderInfoPermissionDenied"] + parameters: GetGroupProviderInfoPermissionDeniedParameters + error_instance_id: str + + +class GetMarkingCategoryPermissionDeniedParameters(typing_extensions.TypedDict): + """The provided token does not have permission to view the marking category.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + markingCategoryId: admin_models.MarkingCategoryId + + +@dataclass +class GetMarkingCategoryPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["GetMarkingCategoryPermissionDenied"] + parameters: GetMarkingCategoryPermissionDeniedParameters + error_instance_id: str + + +class GetMarkingPermissionDeniedParameters(typing_extensions.TypedDict): + """The provided token does not have permission to view the marking.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + markingId: core_models.MarkingId + + +@dataclass +class GetMarkingPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["GetMarkingPermissionDenied"] + parameters: GetMarkingPermissionDeniedParameters + error_instance_id: str + + +class GetMarkingsUserPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not getMarkings the User.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + userId: core_models.UserId + + +@dataclass +class GetMarkingsUserPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["GetMarkingsUserPermissionDenied"] + parameters: GetMarkingsUserPermissionDeniedParameters + error_instance_id: str + + +class GetProfilePictureOfUserPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not profilePicture the User.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + userId: core_models.UserId + + +@dataclass +class GetProfilePictureOfUserPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["GetProfilePictureOfUserPermissionDenied"] + parameters: GetProfilePictureOfUserPermissionDeniedParameters + error_instance_id: str + + +class GetUserProviderInfoPermissionDeniedParameters(typing_extensions.TypedDict): + """The provided token does not have permission to view the provider information for the given user.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + userId: core_models.UserId + + +@dataclass +class GetUserProviderInfoPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["GetUserProviderInfoPermissionDenied"] + parameters: GetUserProviderInfoPermissionDeniedParameters + error_instance_id: str + + +class GroupMembershipExpirationPolicyNotFoundParameters(typing_extensions.TypedDict): + """The given GroupMembershipExpirationPolicy could not be found.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + groupId: core_models.GroupId + + +@dataclass +class GroupMembershipExpirationPolicyNotFound(errors.NotFoundError): + name: typing.Literal["GroupMembershipExpirationPolicyNotFound"] + parameters: GroupMembershipExpirationPolicyNotFoundParameters + error_instance_id: str + + +class GroupNameAlreadyExistsParameters(typing_extensions.TypedDict): + """A group with this name already exists""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + groupName: str + + +@dataclass +class GroupNameAlreadyExists(errors.BadRequestError): + name: typing.Literal["GroupNameAlreadyExists"] + parameters: GroupNameAlreadyExistsParameters + error_instance_id: str + + +class GroupNotFoundParameters(typing_extensions.TypedDict): + """The given Group could not be found.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + groupId: core_models.GroupId + + +@dataclass +class GroupNotFound(errors.NotFoundError): + name: typing.Literal["GroupNotFound"] + parameters: GroupNotFoundParameters + error_instance_id: str + + +class GroupProviderInfoNotFoundParameters(typing_extensions.TypedDict): + """The given GroupProviderInfo could not be found.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + groupId: core_models.GroupId + + +@dataclass +class GroupProviderInfoNotFound(errors.NotFoundError): + name: typing.Literal["GroupProviderInfoNotFound"] + parameters: GroupProviderInfoNotFoundParameters + error_instance_id: str + + +class InvalidGroupMembershipExpirationParameters(typing_extensions.TypedDict): + """The member expiration you provided does not conform to the Group's requirements for member expirations.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + groupId: core_models.GroupId + earliestExpiration: core.AwareDatetime + maximumDuration: typing_extensions.NotRequired[core_models.DurationSeconds] + maximumValue: typing_extensions.NotRequired[admin_models.GroupMembershipExpiration] + + +@dataclass +class InvalidGroupMembershipExpiration(errors.BadRequestError): + name: typing.Literal["InvalidGroupMembershipExpiration"] + parameters: InvalidGroupMembershipExpirationParameters + error_instance_id: str + + +class InvalidGroupOrganizationsParameters(typing_extensions.TypedDict): + """At least one Organization RID must be provided for a group""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class InvalidGroupOrganizations(errors.BadRequestError): + name: typing.Literal["InvalidGroupOrganizations"] + parameters: InvalidGroupOrganizationsParameters + error_instance_id: str + + +class InvalidHostNameParameters(typing_extensions.TypedDict): + """The provided hostname must be a valid domain name. The only allowed characters are letters, numbers, periods, and hyphens.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + invalidHostName: str + + +@dataclass +class InvalidHostName(errors.BadRequestError): + name: typing.Literal["InvalidHostName"] + parameters: InvalidHostNameParameters + error_instance_id: str + + +class InvalidProfilePictureParameters(typing_extensions.TypedDict): + """The user's profile picture is not a valid image""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + userId: core_models.UserId + + +@dataclass +class InvalidProfilePicture(errors.BadRequestError): + name: typing.Literal["InvalidProfilePicture"] + parameters: InvalidProfilePictureParameters + error_instance_id: str + + +class ListAvailableRolesOrganizationPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not listAvailableRoles the Organization.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + organizationRid: core_models.OrganizationRid + + +@dataclass +class ListAvailableRolesOrganizationPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["ListAvailableRolesOrganizationPermissionDenied"] + parameters: ListAvailableRolesOrganizationPermissionDeniedParameters + error_instance_id: str + + +class ListEnrollmentRoleAssignmentsPermissionDeniedParameters(typing_extensions.TypedDict): + """The provided token does not have permission to list assigned roles for this enrollment.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + enrollmentRid: core_models.EnrollmentRid + + +@dataclass +class ListEnrollmentRoleAssignmentsPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["ListEnrollmentRoleAssignmentsPermissionDenied"] + parameters: ListEnrollmentRoleAssignmentsPermissionDeniedParameters + error_instance_id: str + + +class ListHostsPermissionDeniedParameters(typing_extensions.TypedDict): + """You do not have permission to list hosts for this enrollment""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + enrollmentRid: core_models.EnrollmentRid + + +@dataclass +class ListHostsPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["ListHostsPermissionDenied"] + parameters: ListHostsPermissionDeniedParameters + error_instance_id: str + + +class ListMarkingMembersPermissionDeniedParameters(typing_extensions.TypedDict): + """The provided token does not have permission to list the members of this marking.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + markingId: core_models.MarkingId + + +@dataclass +class ListMarkingMembersPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["ListMarkingMembersPermissionDenied"] + parameters: ListMarkingMembersPermissionDeniedParameters + error_instance_id: str + + +class ListMarkingRoleAssignmentsPermissionDeniedParameters(typing_extensions.TypedDict): + """The provided token does not have permission to list assigned roles for this marking.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + markingId: core_models.MarkingId + + +@dataclass +class ListMarkingRoleAssignmentsPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["ListMarkingRoleAssignmentsPermissionDenied"] + parameters: ListMarkingRoleAssignmentsPermissionDeniedParameters + error_instance_id: str + + +class ListOrganizationRoleAssignmentsPermissionDeniedParameters(typing_extensions.TypedDict): + """The provided token does not have permission to list assigned roles for this organization.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + organizationRid: core_models.OrganizationRid + + +@dataclass +class ListOrganizationRoleAssignmentsPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["ListOrganizationRoleAssignmentsPermissionDenied"] + parameters: ListOrganizationRoleAssignmentsPermissionDeniedParameters + error_instance_id: str + + +class MarkingCategoryNotFoundParameters(typing_extensions.TypedDict): + """The given MarkingCategory could not be found.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + markingCategoryId: admin_models.MarkingCategoryId + + +@dataclass +class MarkingCategoryNotFound(errors.NotFoundError): + name: typing.Literal["MarkingCategoryNotFound"] + parameters: MarkingCategoryNotFoundParameters + error_instance_id: str + + +class MarkingNameInCategoryAlreadyExistsParameters(typing_extensions.TypedDict): + """A marking with the same name already exists in the category.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + displayName: str + categoryId: admin_models.MarkingCategoryId + + +@dataclass +class MarkingNameInCategoryAlreadyExists(errors.BadRequestError): + name: typing.Literal["MarkingNameInCategoryAlreadyExists"] + parameters: MarkingNameInCategoryAlreadyExistsParameters + error_instance_id: str + + +class MarkingNameIsEmptyParameters(typing_extensions.TypedDict): + """The marking name is empty.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class MarkingNameIsEmpty(errors.BadRequestError): + name: typing.Literal["MarkingNameIsEmpty"] + parameters: MarkingNameIsEmptyParameters + error_instance_id: str + + +class MarkingNotFoundParameters(typing_extensions.TypedDict): + """The given Marking could not be found.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + markingId: core_models.MarkingId + + +@dataclass +class MarkingNotFound(errors.NotFoundError): + name: typing.Literal["MarkingNotFound"] + parameters: MarkingNotFoundParameters + error_instance_id: str + + +class OrganizationNameAlreadyExistsParameters(typing_extensions.TypedDict): + """An organization with the same name already exists.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + displayName: str + + +@dataclass +class OrganizationNameAlreadyExists(errors.BadRequestError): + name: typing.Literal["OrganizationNameAlreadyExists"] + parameters: OrganizationNameAlreadyExistsParameters + error_instance_id: str + + +class OrganizationNotFoundParameters(typing_extensions.TypedDict): + """The given Organization could not be found.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + organizationRid: core_models.OrganizationRid + + +@dataclass +class OrganizationNotFound(errors.NotFoundError): + name: typing.Literal["OrganizationNotFound"] + parameters: OrganizationNotFoundParameters + error_instance_id: str + + +class PreregisterGroupPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not preregisterGroup the AuthenticationProvider.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + enrollmentRid: core_models.EnrollmentRid + authenticationProviderRid: admin_models.AuthenticationProviderRid + + +@dataclass +class PreregisterGroupPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["PreregisterGroupPermissionDenied"] + parameters: PreregisterGroupPermissionDeniedParameters + error_instance_id: str + + +class PreregisterUserPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not preregisterUser the AuthenticationProvider.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + enrollmentRid: core_models.EnrollmentRid + authenticationProviderRid: admin_models.AuthenticationProviderRid + + +@dataclass +class PreregisterUserPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["PreregisterUserPermissionDenied"] + parameters: PreregisterUserPermissionDeniedParameters + error_instance_id: str + + +class PrincipalNotFoundParameters(typing_extensions.TypedDict): + """A principal (User or Group) with the given PrincipalId could not be found""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + principalId: core_models.PrincipalId + + +@dataclass +class PrincipalNotFound(errors.NotFoundError): + name: typing.Literal["PrincipalNotFound"] + parameters: PrincipalNotFoundParameters + error_instance_id: str + + +class ProfilePictureNotFoundParameters(typing_extensions.TypedDict): + """The user has not set a profile picture""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + userId: core_models.UserId + + +@dataclass +class ProfilePictureNotFound(errors.NotFoundError): + name: typing.Literal["ProfilePictureNotFound"] + parameters: ProfilePictureNotFoundParameters + error_instance_id: str + + +class ProfileServiceNotPresentParameters(typing_extensions.TypedDict): + """The Profile service is unexpectedly not present.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class ProfileServiceNotPresent(errors.InternalServerError): + name: typing.Literal["ProfileServiceNotPresent"] + parameters: ProfileServiceNotPresentParameters + error_instance_id: str + + +class RemoveEnrollmentRoleAssignmentsPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not remove the EnrollmentRoleAssignment.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + enrollmentRid: core_models.EnrollmentRid + + +@dataclass +class RemoveEnrollmentRoleAssignmentsPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["RemoveEnrollmentRoleAssignmentsPermissionDenied"] + parameters: RemoveEnrollmentRoleAssignmentsPermissionDeniedParameters + error_instance_id: str + + +class RemoveGroupMembersPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not remove the GroupMember.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + groupId: core_models.GroupId + + +@dataclass +class RemoveGroupMembersPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["RemoveGroupMembersPermissionDenied"] + parameters: RemoveGroupMembersPermissionDeniedParameters + error_instance_id: str + + +class RemoveMarkingMembersPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not remove the MarkingMember.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + markingId: core_models.MarkingId + + +@dataclass +class RemoveMarkingMembersPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["RemoveMarkingMembersPermissionDenied"] + parameters: RemoveMarkingMembersPermissionDeniedParameters + error_instance_id: str + + +class RemoveMarkingRoleAssignmentsPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not remove the MarkingRoleAssignment.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + markingId: core_models.MarkingId + + +@dataclass +class RemoveMarkingRoleAssignmentsPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["RemoveMarkingRoleAssignmentsPermissionDenied"] + parameters: RemoveMarkingRoleAssignmentsPermissionDeniedParameters + error_instance_id: str + + +class RemoveMarkingRoleAssignmentsRemoveAllAdministratorsNotAllowedParameters( + typing_extensions.TypedDict +): + """You cannot remove all administrators from a marking.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + markingId: core_models.MarkingId + currentAdministrators: typing.List[core_models.PrincipalId] + + +@dataclass +class RemoveMarkingRoleAssignmentsRemoveAllAdministratorsNotAllowed(errors.BadRequestError): + name: typing.Literal["RemoveMarkingRoleAssignmentsRemoveAllAdministratorsNotAllowed"] + parameters: RemoveMarkingRoleAssignmentsRemoveAllAdministratorsNotAllowedParameters + error_instance_id: str + + +class RemoveOrganizationRoleAssignmentsPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not remove the OrganizationRoleAssignment.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + organizationRid: core_models.OrganizationRid + + +@dataclass +class RemoveOrganizationRoleAssignmentsPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["RemoveOrganizationRoleAssignmentsPermissionDenied"] + parameters: RemoveOrganizationRoleAssignmentsPermissionDeniedParameters + error_instance_id: str + + +class ReplaceGroupMembershipExpirationPolicyPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not replace the GroupMembershipExpirationPolicy.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + groupId: core_models.GroupId + + +@dataclass +class ReplaceGroupMembershipExpirationPolicyPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["ReplaceGroupMembershipExpirationPolicyPermissionDenied"] + parameters: ReplaceGroupMembershipExpirationPolicyPermissionDeniedParameters + error_instance_id: str + + +class ReplaceGroupProviderInfoPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not replace the GroupProviderInfo.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + groupId: core_models.GroupId + + +@dataclass +class ReplaceGroupProviderInfoPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["ReplaceGroupProviderInfoPermissionDenied"] + parameters: ReplaceGroupProviderInfoPermissionDeniedParameters + error_instance_id: str + + +class ReplaceMarkingPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not replace the Marking.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + markingId: core_models.MarkingId + + +@dataclass +class ReplaceMarkingPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["ReplaceMarkingPermissionDenied"] + parameters: ReplaceMarkingPermissionDeniedParameters + error_instance_id: str + + +class ReplaceOrganizationPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not replace the Organization.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + organizationRid: core_models.OrganizationRid + + +@dataclass +class ReplaceOrganizationPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["ReplaceOrganizationPermissionDenied"] + parameters: ReplaceOrganizationPermissionDeniedParameters + error_instance_id: str + + +class ReplaceUserProviderInfoPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not replace the UserProviderInfo.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + userId: core_models.UserId + + +@dataclass +class ReplaceUserProviderInfoPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["ReplaceUserProviderInfoPermissionDenied"] + parameters: ReplaceUserProviderInfoPermissionDeniedParameters + error_instance_id: str + + +class RevokeAllTokensUserPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not revokeAllTokens the User.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + userId: core_models.UserId + + +@dataclass +class RevokeAllTokensUserPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["RevokeAllTokensUserPermissionDenied"] + parameters: RevokeAllTokensUserPermissionDeniedParameters + error_instance_id: str + + +class RoleNotFoundParameters(typing_extensions.TypedDict): + """The given Role could not be found.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + roleId: core_models.RoleId + + +@dataclass +class RoleNotFound(errors.NotFoundError): + name: typing.Literal["RoleNotFound"] + parameters: RoleNotFoundParameters + error_instance_id: str + + +class SearchGroupsPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not search the Group.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class SearchGroupsPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["SearchGroupsPermissionDenied"] + parameters: SearchGroupsPermissionDeniedParameters + error_instance_id: str + + +class SearchUsersPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not search the User.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class SearchUsersPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["SearchUsersPermissionDenied"] + parameters: SearchUsersPermissionDeniedParameters + error_instance_id: str + + +class UserDeletedParameters(typing_extensions.TypedDict): + """The user is deleted.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + principalId: core_models.UserId + + +@dataclass +class UserDeleted(errors.BadRequestError): + name: typing.Literal["UserDeleted"] + parameters: UserDeletedParameters + error_instance_id: str + + +class UserIsActiveParameters(typing_extensions.TypedDict): + """The user is an active user.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + principalId: core_models.UserId + + +@dataclass +class UserIsActive(errors.BadRequestError): + name: typing.Literal["UserIsActive"] + parameters: UserIsActiveParameters + error_instance_id: str + + +class UserNotFoundParameters(typing_extensions.TypedDict): + """The given User could not be found.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + userId: core_models.UserId + + +@dataclass +class UserNotFound(errors.NotFoundError): + name: typing.Literal["UserNotFound"] + parameters: UserNotFoundParameters + error_instance_id: str + + +class UserProviderInfoNotFoundParameters(typing_extensions.TypedDict): + """The given UserProviderInfo could not be found.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + userId: core_models.UserId + + +@dataclass +class UserProviderInfoNotFound(errors.NotFoundError): + name: typing.Literal["UserProviderInfoNotFound"] + parameters: UserProviderInfoNotFoundParameters + error_instance_id: str + + +__all__ = [ + "AddEnrollmentRoleAssignmentsPermissionDenied", + "AddGroupMembersPermissionDenied", + "AddMarkingMembersPermissionDenied", + "AddMarkingRoleAssignmentsPermissionDenied", + "AddOrganizationRoleAssignmentsPermissionDenied", + "AuthenticationProviderNotFound", + "CannotReplaceProviderInfoForPrincipalInProtectedRealm", + "CreateGroupPermissionDenied", + "CreateMarkingMissingInitialAdminRole", + "CreateMarkingPermissionDenied", + "CreateOrganizationMissingInitialAdminRole", + "CreateOrganizationPermissionDenied", + "DeleteGroupPermissionDenied", + "DeleteUserPermissionDenied", + "EnrollmentNotFound", + "EnrollmentRoleNotFound", + "GetCurrentEnrollmentPermissionDenied", + "GetCurrentUserPermissionDenied", + "GetGroupProviderInfoPermissionDenied", + "GetMarkingCategoryPermissionDenied", + "GetMarkingPermissionDenied", + "GetMarkingsUserPermissionDenied", + "GetProfilePictureOfUserPermissionDenied", + "GetUserProviderInfoPermissionDenied", + "GroupMembershipExpirationPolicyNotFound", + "GroupNameAlreadyExists", + "GroupNotFound", + "GroupProviderInfoNotFound", + "InvalidGroupMembershipExpiration", + "InvalidGroupOrganizations", + "InvalidHostName", + "InvalidProfilePicture", + "ListAvailableRolesOrganizationPermissionDenied", + "ListEnrollmentRoleAssignmentsPermissionDenied", + "ListHostsPermissionDenied", + "ListMarkingMembersPermissionDenied", + "ListMarkingRoleAssignmentsPermissionDenied", + "ListOrganizationRoleAssignmentsPermissionDenied", + "MarkingCategoryNotFound", + "MarkingNameInCategoryAlreadyExists", + "MarkingNameIsEmpty", + "MarkingNotFound", + "OrganizationNameAlreadyExists", + "OrganizationNotFound", + "PreregisterGroupPermissionDenied", + "PreregisterUserPermissionDenied", + "PrincipalNotFound", + "ProfilePictureNotFound", + "ProfileServiceNotPresent", + "RemoveEnrollmentRoleAssignmentsPermissionDenied", + "RemoveGroupMembersPermissionDenied", + "RemoveMarkingMembersPermissionDenied", + "RemoveMarkingRoleAssignmentsPermissionDenied", + "RemoveMarkingRoleAssignmentsRemoveAllAdministratorsNotAllowed", + "RemoveOrganizationRoleAssignmentsPermissionDenied", + "ReplaceGroupMembershipExpirationPolicyPermissionDenied", + "ReplaceGroupProviderInfoPermissionDenied", + "ReplaceMarkingPermissionDenied", + "ReplaceOrganizationPermissionDenied", + "ReplaceUserProviderInfoPermissionDenied", + "RevokeAllTokensUserPermissionDenied", + "RoleNotFound", + "SearchGroupsPermissionDenied", + "SearchUsersPermissionDenied", + "UserDeleted", + "UserIsActive", + "UserNotFound", + "UserProviderInfoNotFound", +] diff --git a/foundry_sdk/v2/admin/group.py b/foundry_sdk/v2/admin/group.py new file mode 100644 index 000000000..7ced8f588 --- /dev/null +++ b/foundry_sdk/v2/admin/group.py @@ -0,0 +1,794 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing +from functools import cached_property + +import annotated_types +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v2.admin import errors as admin_errors +from foundry_sdk.v2.admin import models as admin_models +from foundry_sdk.v2.core import errors as core_errors +from foundry_sdk.v2.core import models as core_models + + +class GroupClient: + """ + The API client for the Group Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _GroupClientStreaming(self) + self.with_raw_response = _GroupClientRaw(self) + + @cached_property + def ProviderInfo(self): + from foundry_sdk.v2.admin.group_provider_info import GroupProviderInfoClient + + return GroupProviderInfoClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @cached_property + def GroupMember(self): + from foundry_sdk.v2.admin.group_member import GroupMemberClient + + return GroupMemberClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @cached_property + def MembershipExpirationPolicy(self): + from foundry_sdk.v2.admin.group_membership_expiration_policy import ( + GroupMembershipExpirationPolicyClient, + ) # NOQA + + return GroupMembershipExpirationPolicyClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def create( + self, + *, + attributes: typing.Dict[admin_models.AttributeName, admin_models.AttributeValues], + name: admin_models.GroupName, + organizations: typing.List[core_models.OrganizationRid], + description: typing.Optional[str] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> admin_models.Group: + """ + Creates a new Group. + :param attributes: A map of the Group's attributes. Attributes prefixed with "multipass:" are reserved for internal use by Foundry and are subject to change. + :type attributes: Dict[AttributeName, AttributeValues] + :param name: The name of the Group. + :type name: GroupName + :param organizations: The RIDs of the Organizations whose members can see this group. At least one Organization RID must be listed. + :type organizations: List[OrganizationRid] + :param description: A description of the Group. + :type description: Optional[str] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: admin_models.Group + + :raises CreateGroupPermissionDenied: Could not create the Group. + :raises GroupNameAlreadyExists: A group with this name already exists + :raises InvalidGroupOrganizations: At least one Organization RID must be provided for a group + :raises OrganizationNotFound: The given Organization could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/admin/groups", + query_params={}, + path_params={}, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=admin_models.CreateGroupRequest( + name=name, + organizations=organizations, + description=description, + attributes=attributes, + ), + response_type=admin_models.Group, + request_timeout=request_timeout, + throwable_errors={ + "CreateGroupPermissionDenied": admin_errors.CreateGroupPermissionDenied, + "GroupNameAlreadyExists": admin_errors.GroupNameAlreadyExists, + "InvalidGroupOrganizations": admin_errors.InvalidGroupOrganizations, + "OrganizationNotFound": admin_errors.OrganizationNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def delete( + self, + group_id: core_models.GroupId, + *, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> None: + """ + Delete the Group with the specified id. + :param group_id: + :type group_id: GroupId + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: None + + :raises DeleteGroupPermissionDenied: Could not delete the Group. + :raises GroupNotFound: The given Group could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="DELETE", + resource_path="/v2/admin/groups/{groupId}", + query_params={}, + path_params={ + "groupId": group_id, + }, + header_params={}, + body=None, + response_type=None, + request_timeout=request_timeout, + throwable_errors={ + "DeleteGroupPermissionDenied": admin_errors.DeleteGroupPermissionDenied, + "GroupNotFound": admin_errors.GroupNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + group_id: core_models.GroupId, + *, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> admin_models.Group: + """ + Get the Group with the specified id. + :param group_id: + :type group_id: GroupId + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: admin_models.Group + + :raises GroupNotFound: The given Group could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/admin/groups/{groupId}", + query_params={}, + path_params={ + "groupId": group_id, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=admin_models.Group, + request_timeout=request_timeout, + throwable_errors={ + "GroupNotFound": admin_errors.GroupNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get_batch( + self, + body: typing_extensions.Annotated[ + typing.List[admin_models.GetGroupsBatchRequestElement], + annotated_types.Len(min_length=1, max_length=500), + ], + *, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> admin_models.GetGroupsBatchResponse: + """ + Execute multiple get requests on Group. + + The maximum batch size for this endpoint is 500. + :param body: Body of the request + :type body: List[GetGroupsBatchRequestElement] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: admin_models.GetGroupsBatchResponse + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/admin/groups/getBatch", + query_params={}, + path_params={}, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=body, + response_type=admin_models.GetGroupsBatchResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def list( + self, + *, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.ResourceIterator[admin_models.Group]: + """ + Lists all Groups. + + This is a paged endpoint. Each page may be smaller or larger than the requested page size. However, it is guaranteed that if there are more results available, the `nextPageToken` field will be populated. To get the next page, make the same request again, but set the value of the `pageToken` query parameter to be value of the `nextPageToken` value of the previous response. If there is no `nextPageToken` field in the response, you are on the last page. + :param page_size: The page size to use for the endpoint. + :type page_size: Optional[PageSize] + :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. + :type page_token: Optional[PageToken] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.ResourceIterator[admin_models.Group] + + :raises InvalidPageSize: The provided page size was zero or negative. Page sizes must be greater than zero. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/admin/groups", + query_params={ + "pageSize": page_size, + "pageToken": page_token, + }, + path_params={}, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=admin_models.ListGroupsResponse, + request_timeout=request_timeout, + throwable_errors={ + "InvalidPageSize": core_errors.InvalidPageSize, + }, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def search( + self, + *, + where: admin_models.GroupSearchFilter, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> admin_models.SearchGroupsResponse: + """ + Perform a case-insensitive prefix search for groups based on group name. + + :param where: + :type where: GroupSearchFilter + :param page_size: + :type page_size: Optional[PageSize] + :param page_token: + :type page_token: Optional[PageToken] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: admin_models.SearchGroupsResponse + + :raises InvalidPageSize: The provided page size was zero or negative. Page sizes must be greater than zero. + :raises SearchGroupsPermissionDenied: Could not search the Group. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/admin/groups/search", + query_params={}, + path_params={}, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=admin_models.SearchGroupsRequest( + where=where, + page_size=page_size, + page_token=page_token, + ), + response_type=admin_models.SearchGroupsResponse, + request_timeout=request_timeout, + throwable_errors={ + "InvalidPageSize": core_errors.InvalidPageSize, + "SearchGroupsPermissionDenied": admin_errors.SearchGroupsPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _GroupClientRaw: + def __init__(self, client: GroupClient) -> None: + def create(_: admin_models.Group): ... + def delete(_: None): ... + def get(_: admin_models.Group): ... + def get_batch(_: admin_models.GetGroupsBatchResponse): ... + def list(_: admin_models.ListGroupsResponse): ... + def search(_: admin_models.SearchGroupsResponse): ... + + self.create = core.with_raw_response(create, client.create) + self.delete = core.with_raw_response(delete, client.delete) + self.get = core.with_raw_response(get, client.get) + self.get_batch = core.with_raw_response(get_batch, client.get_batch) + self.list = core.with_raw_response(list, client.list) + self.search = core.with_raw_response(search, client.search) + + +class _GroupClientStreaming: + def __init__(self, client: GroupClient) -> None: + def create(_: admin_models.Group): ... + def get(_: admin_models.Group): ... + def get_batch(_: admin_models.GetGroupsBatchResponse): ... + def list(_: admin_models.ListGroupsResponse): ... + def search(_: admin_models.SearchGroupsResponse): ... + + self.create = core.with_streaming_response(create, client.create) + self.get = core.with_streaming_response(get, client.get) + self.get_batch = core.with_streaming_response(get_batch, client.get_batch) + self.list = core.with_streaming_response(list, client.list) + self.search = core.with_streaming_response(search, client.search) + + +class AsyncGroupClient: + """ + The API client for the Group Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncGroupClientStreaming(self) + self.with_raw_response = _AsyncGroupClientRaw(self) + + @cached_property + def ProviderInfo(self): + from foundry_sdk.v2.admin.group_provider_info import AsyncGroupProviderInfoClient # NOQA + + return AsyncGroupProviderInfoClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @cached_property + def GroupMember(self): + from foundry_sdk.v2.admin.group_member import AsyncGroupMemberClient + + return AsyncGroupMemberClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @cached_property + def MembershipExpirationPolicy(self): + from foundry_sdk.v2.admin.group_membership_expiration_policy import ( + AsyncGroupMembershipExpirationPolicyClient, + ) # NOQA + + return AsyncGroupMembershipExpirationPolicyClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def create( + self, + *, + attributes: typing.Dict[admin_models.AttributeName, admin_models.AttributeValues], + name: admin_models.GroupName, + organizations: typing.List[core_models.OrganizationRid], + description: typing.Optional[str] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[admin_models.Group]: + """ + Creates a new Group. + :param attributes: A map of the Group's attributes. Attributes prefixed with "multipass:" are reserved for internal use by Foundry and are subject to change. + :type attributes: Dict[AttributeName, AttributeValues] + :param name: The name of the Group. + :type name: GroupName + :param organizations: The RIDs of the Organizations whose members can see this group. At least one Organization RID must be listed. + :type organizations: List[OrganizationRid] + :param description: A description of the Group. + :type description: Optional[str] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[admin_models.Group] + + :raises CreateGroupPermissionDenied: Could not create the Group. + :raises GroupNameAlreadyExists: A group with this name already exists + :raises InvalidGroupOrganizations: At least one Organization RID must be provided for a group + :raises OrganizationNotFound: The given Organization could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/admin/groups", + query_params={}, + path_params={}, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=admin_models.CreateGroupRequest( + name=name, + organizations=organizations, + description=description, + attributes=attributes, + ), + response_type=admin_models.Group, + request_timeout=request_timeout, + throwable_errors={ + "CreateGroupPermissionDenied": admin_errors.CreateGroupPermissionDenied, + "GroupNameAlreadyExists": admin_errors.GroupNameAlreadyExists, + "InvalidGroupOrganizations": admin_errors.InvalidGroupOrganizations, + "OrganizationNotFound": admin_errors.OrganizationNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def delete( + self, + group_id: core_models.GroupId, + *, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[None]: + """ + Delete the Group with the specified id. + :param group_id: + :type group_id: GroupId + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[None] + + :raises DeleteGroupPermissionDenied: Could not delete the Group. + :raises GroupNotFound: The given Group could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="DELETE", + resource_path="/v2/admin/groups/{groupId}", + query_params={}, + path_params={ + "groupId": group_id, + }, + header_params={}, + body=None, + response_type=None, + request_timeout=request_timeout, + throwable_errors={ + "DeleteGroupPermissionDenied": admin_errors.DeleteGroupPermissionDenied, + "GroupNotFound": admin_errors.GroupNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + group_id: core_models.GroupId, + *, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[admin_models.Group]: + """ + Get the Group with the specified id. + :param group_id: + :type group_id: GroupId + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[admin_models.Group] + + :raises GroupNotFound: The given Group could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/admin/groups/{groupId}", + query_params={}, + path_params={ + "groupId": group_id, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=admin_models.Group, + request_timeout=request_timeout, + throwable_errors={ + "GroupNotFound": admin_errors.GroupNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get_batch( + self, + body: typing_extensions.Annotated[ + typing.List[admin_models.GetGroupsBatchRequestElement], + annotated_types.Len(min_length=1, max_length=500), + ], + *, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[admin_models.GetGroupsBatchResponse]: + """ + Execute multiple get requests on Group. + + The maximum batch size for this endpoint is 500. + :param body: Body of the request + :type body: List[GetGroupsBatchRequestElement] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[admin_models.GetGroupsBatchResponse] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/admin/groups/getBatch", + query_params={}, + path_params={}, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=body, + response_type=admin_models.GetGroupsBatchResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def list( + self, + *, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.AsyncResourceIterator[admin_models.Group]: + """ + Lists all Groups. + + This is a paged endpoint. Each page may be smaller or larger than the requested page size. However, it is guaranteed that if there are more results available, the `nextPageToken` field will be populated. To get the next page, make the same request again, but set the value of the `pageToken` query parameter to be value of the `nextPageToken` value of the previous response. If there is no `nextPageToken` field in the response, you are on the last page. + :param page_size: The page size to use for the endpoint. + :type page_size: Optional[PageSize] + :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. + :type page_token: Optional[PageToken] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.AsyncResourceIterator[admin_models.Group] + + :raises InvalidPageSize: The provided page size was zero or negative. Page sizes must be greater than zero. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/admin/groups", + query_params={ + "pageSize": page_size, + "pageToken": page_token, + }, + path_params={}, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=admin_models.ListGroupsResponse, + request_timeout=request_timeout, + throwable_errors={ + "InvalidPageSize": core_errors.InvalidPageSize, + }, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def search( + self, + *, + where: admin_models.GroupSearchFilter, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[admin_models.SearchGroupsResponse]: + """ + Perform a case-insensitive prefix search for groups based on group name. + + :param where: + :type where: GroupSearchFilter + :param page_size: + :type page_size: Optional[PageSize] + :param page_token: + :type page_token: Optional[PageToken] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[admin_models.SearchGroupsResponse] + + :raises InvalidPageSize: The provided page size was zero or negative. Page sizes must be greater than zero. + :raises SearchGroupsPermissionDenied: Could not search the Group. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/admin/groups/search", + query_params={}, + path_params={}, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=admin_models.SearchGroupsRequest( + where=where, + page_size=page_size, + page_token=page_token, + ), + response_type=admin_models.SearchGroupsResponse, + request_timeout=request_timeout, + throwable_errors={ + "InvalidPageSize": core_errors.InvalidPageSize, + "SearchGroupsPermissionDenied": admin_errors.SearchGroupsPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _AsyncGroupClientRaw: + def __init__(self, client: AsyncGroupClient) -> None: + def create(_: admin_models.Group): ... + def delete(_: None): ... + def get(_: admin_models.Group): ... + def get_batch(_: admin_models.GetGroupsBatchResponse): ... + def list(_: admin_models.ListGroupsResponse): ... + def search(_: admin_models.SearchGroupsResponse): ... + + self.create = core.async_with_raw_response(create, client.create) + self.delete = core.async_with_raw_response(delete, client.delete) + self.get = core.async_with_raw_response(get, client.get) + self.get_batch = core.async_with_raw_response(get_batch, client.get_batch) + self.list = core.async_with_raw_response(list, client.list) + self.search = core.async_with_raw_response(search, client.search) + + +class _AsyncGroupClientStreaming: + def __init__(self, client: AsyncGroupClient) -> None: + def create(_: admin_models.Group): ... + def get(_: admin_models.Group): ... + def get_batch(_: admin_models.GetGroupsBatchResponse): ... + def list(_: admin_models.ListGroupsResponse): ... + def search(_: admin_models.SearchGroupsResponse): ... + + self.create = core.async_with_streaming_response(create, client.create) + self.get = core.async_with_streaming_response(get, client.get) + self.get_batch = core.async_with_streaming_response(get_batch, client.get_batch) + self.list = core.async_with_streaming_response(list, client.list) + self.search = core.async_with_streaming_response(search, client.search) diff --git a/foundry_sdk/v2/admin/group_member.py b/foundry_sdk/v2/admin/group_member.py new file mode 100644 index 000000000..becbae24a --- /dev/null +++ b/foundry_sdk/v2/admin/group_member.py @@ -0,0 +1,460 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v2.admin import errors as admin_errors +from foundry_sdk.v2.admin import models as admin_models +from foundry_sdk.v2.core import errors as core_errors +from foundry_sdk.v2.core import models as core_models + + +class GroupMemberClient: + """ + The API client for the GroupMember Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _GroupMemberClientStreaming(self) + self.with_raw_response = _GroupMemberClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def add( + self, + group_id: core_models.GroupId, + *, + principal_ids: typing.List[core_models.PrincipalId], + expiration: typing.Optional[admin_models.GroupMembershipExpiration] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> None: + """ + + :param group_id: + :type group_id: GroupId + :param principal_ids: + :type principal_ids: List[PrincipalId] + :param expiration: + :type expiration: Optional[GroupMembershipExpiration] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: None + + :raises AddGroupMembersPermissionDenied: Could not add the GroupMember. + :raises GroupNotFound: The given Group could not be found. + :raises InvalidGroupMembershipExpiration: The member expiration you provided does not conform to the Group's requirements for member expirations. + :raises PrincipalNotFound: A principal (User or Group) with the given PrincipalId could not be found + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/admin/groups/{groupId}/groupMembers/add", + query_params={}, + path_params={ + "groupId": group_id, + }, + header_params={ + "Content-Type": "application/json", + }, + body=admin_models.AddGroupMembersRequest( + principal_ids=principal_ids, + expiration=expiration, + ), + response_type=None, + request_timeout=request_timeout, + throwable_errors={ + "AddGroupMembersPermissionDenied": admin_errors.AddGroupMembersPermissionDenied, + "GroupNotFound": admin_errors.GroupNotFound, + "InvalidGroupMembershipExpiration": admin_errors.InvalidGroupMembershipExpiration, + "PrincipalNotFound": admin_errors.PrincipalNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def list( + self, + group_id: core_models.GroupId, + *, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + transitive: typing.Optional[bool] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.ResourceIterator[admin_models.GroupMember]: + """ + Lists all members (which can be a User or a Group) of a given Group. + + This is a paged endpoint. Each page may be smaller or larger than the requested page size. However, + it is guaranteed that if there are more results available, the `nextPageToken` field will be populated. + To get the next page, make the same request again, but set the value of the `pageToken` query parameter + to be value of the `nextPageToken` value of the previous response. If there is no `nextPageToken` field + in the response, you are on the last page. + + :param group_id: + :type group_id: GroupId + :param page_size: The page size to use for the endpoint. + :type page_size: Optional[PageSize] + :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. + :type page_token: Optional[PageToken] + :param transitive: When true, includes the transitive members of groups contained within this group. For example, say the Group has member Group A, and Group A has member User B. If `transitive=false` only Group A will be returned, but if `transitive=true` then Group A and User B will be returned. This will recursively resolve Groups through all layers of nesting. Defaults to false. + :type transitive: Optional[bool] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.ResourceIterator[admin_models.GroupMember] + + :raises GroupNotFound: The given Group could not be found. + :raises InvalidPageSize: The provided page size was zero or negative. Page sizes must be greater than zero. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/admin/groups/{groupId}/groupMembers", + query_params={ + "pageSize": page_size, + "pageToken": page_token, + "transitive": transitive, + }, + path_params={ + "groupId": group_id, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=admin_models.ListGroupMembersResponse, + request_timeout=request_timeout, + throwable_errors={ + "GroupNotFound": admin_errors.GroupNotFound, + "InvalidPageSize": core_errors.InvalidPageSize, + }, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def remove( + self, + group_id: core_models.GroupId, + *, + principal_ids: typing.List[core_models.PrincipalId], + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> None: + """ + + :param group_id: + :type group_id: GroupId + :param principal_ids: + :type principal_ids: List[PrincipalId] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: None + + :raises GroupNotFound: The given Group could not be found. + :raises PrincipalNotFound: A principal (User or Group) with the given PrincipalId could not be found + :raises RemoveGroupMembersPermissionDenied: Could not remove the GroupMember. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/admin/groups/{groupId}/groupMembers/remove", + query_params={}, + path_params={ + "groupId": group_id, + }, + header_params={ + "Content-Type": "application/json", + }, + body=admin_models.RemoveGroupMembersRequest( + principal_ids=principal_ids, + ), + response_type=None, + request_timeout=request_timeout, + throwable_errors={ + "GroupNotFound": admin_errors.GroupNotFound, + "PrincipalNotFound": admin_errors.PrincipalNotFound, + "RemoveGroupMembersPermissionDenied": admin_errors.RemoveGroupMembersPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _GroupMemberClientRaw: + def __init__(self, client: GroupMemberClient) -> None: + def add(_: None): ... + def list(_: admin_models.ListGroupMembersResponse): ... + def remove(_: None): ... + + self.add = core.with_raw_response(add, client.add) + self.list = core.with_raw_response(list, client.list) + self.remove = core.with_raw_response(remove, client.remove) + + +class _GroupMemberClientStreaming: + def __init__(self, client: GroupMemberClient) -> None: + def list(_: admin_models.ListGroupMembersResponse): ... + + self.list = core.with_streaming_response(list, client.list) + + +class AsyncGroupMemberClient: + """ + The API client for the GroupMember Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncGroupMemberClientStreaming(self) + self.with_raw_response = _AsyncGroupMemberClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def add( + self, + group_id: core_models.GroupId, + *, + principal_ids: typing.List[core_models.PrincipalId], + expiration: typing.Optional[admin_models.GroupMembershipExpiration] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[None]: + """ + + :param group_id: + :type group_id: GroupId + :param principal_ids: + :type principal_ids: List[PrincipalId] + :param expiration: + :type expiration: Optional[GroupMembershipExpiration] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[None] + + :raises AddGroupMembersPermissionDenied: Could not add the GroupMember. + :raises GroupNotFound: The given Group could not be found. + :raises InvalidGroupMembershipExpiration: The member expiration you provided does not conform to the Group's requirements for member expirations. + :raises PrincipalNotFound: A principal (User or Group) with the given PrincipalId could not be found + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/admin/groups/{groupId}/groupMembers/add", + query_params={}, + path_params={ + "groupId": group_id, + }, + header_params={ + "Content-Type": "application/json", + }, + body=admin_models.AddGroupMembersRequest( + principal_ids=principal_ids, + expiration=expiration, + ), + response_type=None, + request_timeout=request_timeout, + throwable_errors={ + "AddGroupMembersPermissionDenied": admin_errors.AddGroupMembersPermissionDenied, + "GroupNotFound": admin_errors.GroupNotFound, + "InvalidGroupMembershipExpiration": admin_errors.InvalidGroupMembershipExpiration, + "PrincipalNotFound": admin_errors.PrincipalNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def list( + self, + group_id: core_models.GroupId, + *, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + transitive: typing.Optional[bool] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.AsyncResourceIterator[admin_models.GroupMember]: + """ + Lists all members (which can be a User or a Group) of a given Group. + + This is a paged endpoint. Each page may be smaller or larger than the requested page size. However, + it is guaranteed that if there are more results available, the `nextPageToken` field will be populated. + To get the next page, make the same request again, but set the value of the `pageToken` query parameter + to be value of the `nextPageToken` value of the previous response. If there is no `nextPageToken` field + in the response, you are on the last page. + + :param group_id: + :type group_id: GroupId + :param page_size: The page size to use for the endpoint. + :type page_size: Optional[PageSize] + :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. + :type page_token: Optional[PageToken] + :param transitive: When true, includes the transitive members of groups contained within this group. For example, say the Group has member Group A, and Group A has member User B. If `transitive=false` only Group A will be returned, but if `transitive=true` then Group A and User B will be returned. This will recursively resolve Groups through all layers of nesting. Defaults to false. + :type transitive: Optional[bool] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.AsyncResourceIterator[admin_models.GroupMember] + + :raises GroupNotFound: The given Group could not be found. + :raises InvalidPageSize: The provided page size was zero or negative. Page sizes must be greater than zero. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/admin/groups/{groupId}/groupMembers", + query_params={ + "pageSize": page_size, + "pageToken": page_token, + "transitive": transitive, + }, + path_params={ + "groupId": group_id, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=admin_models.ListGroupMembersResponse, + request_timeout=request_timeout, + throwable_errors={ + "GroupNotFound": admin_errors.GroupNotFound, + "InvalidPageSize": core_errors.InvalidPageSize, + }, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def remove( + self, + group_id: core_models.GroupId, + *, + principal_ids: typing.List[core_models.PrincipalId], + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[None]: + """ + + :param group_id: + :type group_id: GroupId + :param principal_ids: + :type principal_ids: List[PrincipalId] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[None] + + :raises GroupNotFound: The given Group could not be found. + :raises PrincipalNotFound: A principal (User or Group) with the given PrincipalId could not be found + :raises RemoveGroupMembersPermissionDenied: Could not remove the GroupMember. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/admin/groups/{groupId}/groupMembers/remove", + query_params={}, + path_params={ + "groupId": group_id, + }, + header_params={ + "Content-Type": "application/json", + }, + body=admin_models.RemoveGroupMembersRequest( + principal_ids=principal_ids, + ), + response_type=None, + request_timeout=request_timeout, + throwable_errors={ + "GroupNotFound": admin_errors.GroupNotFound, + "PrincipalNotFound": admin_errors.PrincipalNotFound, + "RemoveGroupMembersPermissionDenied": admin_errors.RemoveGroupMembersPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _AsyncGroupMemberClientRaw: + def __init__(self, client: AsyncGroupMemberClient) -> None: + def add(_: None): ... + def list(_: admin_models.ListGroupMembersResponse): ... + def remove(_: None): ... + + self.add = core.async_with_raw_response(add, client.add) + self.list = core.async_with_raw_response(list, client.list) + self.remove = core.async_with_raw_response(remove, client.remove) + + +class _AsyncGroupMemberClientStreaming: + def __init__(self, client: AsyncGroupMemberClient) -> None: + def list(_: admin_models.ListGroupMembersResponse): ... + + self.list = core.async_with_streaming_response(list, client.list) diff --git a/foundry_sdk/v2/admin/group_membership.py b/foundry_sdk/v2/admin/group_membership.py new file mode 100644 index 000000000..79262d494 --- /dev/null +++ b/foundry_sdk/v2/admin/group_membership.py @@ -0,0 +1,236 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v2.admin import errors as admin_errors +from foundry_sdk.v2.admin import models as admin_models +from foundry_sdk.v2.core import errors as core_errors +from foundry_sdk.v2.core import models as core_models + + +class GroupMembershipClient: + """ + The API client for the GroupMembership Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _GroupMembershipClientStreaming(self) + self.with_raw_response = _GroupMembershipClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def list( + self, + user_id: core_models.UserId, + *, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + transitive: typing.Optional[bool] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.ResourceIterator[admin_models.GroupMembership]: + """ + Lists all Groups a given User is a member of. + + This is a paged endpoint. Each page may be smaller or larger than the requested page size. However, + it is guaranteed that if there are more results available, the `nextPageToken` field will be populated. + To get the next page, make the same request again, but set the value of the `pageToken` query parameter + to be value of the `nextPageToken` value of the previous response. If there is no `nextPageToken` field + in the response, you are on the last page. + + :param user_id: + :type user_id: UserId + :param page_size: The page size to use for the endpoint. + :type page_size: Optional[PageSize] + :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. + :type page_token: Optional[PageToken] + :param transitive: When true, includes the transitive memberships of the Groups the User is a member of. For example, say the User is a member of Group A, and Group A is a member of Group B. If `transitive=false` only Group A will be returned, but if `transitive=true` then Groups A and B will be returned. This will recursively resolve Groups through all layers of nesting. Defaults to false. + :type transitive: Optional[bool] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.ResourceIterator[admin_models.GroupMembership] + + :raises InvalidPageSize: The provided page size was zero or negative. Page sizes must be greater than zero. + :raises UserDeleted: The user is deleted. + :raises UserNotFound: The given User could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/admin/users/{userId}/groupMemberships", + query_params={ + "pageSize": page_size, + "pageToken": page_token, + "transitive": transitive, + }, + path_params={ + "userId": user_id, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=admin_models.ListGroupMembershipsResponse, + request_timeout=request_timeout, + throwable_errors={ + "InvalidPageSize": core_errors.InvalidPageSize, + "UserDeleted": admin_errors.UserDeleted, + "UserNotFound": admin_errors.UserNotFound, + }, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + +class _GroupMembershipClientRaw: + def __init__(self, client: GroupMembershipClient) -> None: + def list(_: admin_models.ListGroupMembershipsResponse): ... + + self.list = core.with_raw_response(list, client.list) + + +class _GroupMembershipClientStreaming: + def __init__(self, client: GroupMembershipClient) -> None: + def list(_: admin_models.ListGroupMembershipsResponse): ... + + self.list = core.with_streaming_response(list, client.list) + + +class AsyncGroupMembershipClient: + """ + The API client for the GroupMembership Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncGroupMembershipClientStreaming(self) + self.with_raw_response = _AsyncGroupMembershipClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def list( + self, + user_id: core_models.UserId, + *, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + transitive: typing.Optional[bool] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.AsyncResourceIterator[admin_models.GroupMembership]: + """ + Lists all Groups a given User is a member of. + + This is a paged endpoint. Each page may be smaller or larger than the requested page size. However, + it is guaranteed that if there are more results available, the `nextPageToken` field will be populated. + To get the next page, make the same request again, but set the value of the `pageToken` query parameter + to be value of the `nextPageToken` value of the previous response. If there is no `nextPageToken` field + in the response, you are on the last page. + + :param user_id: + :type user_id: UserId + :param page_size: The page size to use for the endpoint. + :type page_size: Optional[PageSize] + :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. + :type page_token: Optional[PageToken] + :param transitive: When true, includes the transitive memberships of the Groups the User is a member of. For example, say the User is a member of Group A, and Group A is a member of Group B. If `transitive=false` only Group A will be returned, but if `transitive=true` then Groups A and B will be returned. This will recursively resolve Groups through all layers of nesting. Defaults to false. + :type transitive: Optional[bool] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.AsyncResourceIterator[admin_models.GroupMembership] + + :raises InvalidPageSize: The provided page size was zero or negative. Page sizes must be greater than zero. + :raises UserDeleted: The user is deleted. + :raises UserNotFound: The given User could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/admin/users/{userId}/groupMemberships", + query_params={ + "pageSize": page_size, + "pageToken": page_token, + "transitive": transitive, + }, + path_params={ + "userId": user_id, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=admin_models.ListGroupMembershipsResponse, + request_timeout=request_timeout, + throwable_errors={ + "InvalidPageSize": core_errors.InvalidPageSize, + "UserDeleted": admin_errors.UserDeleted, + "UserNotFound": admin_errors.UserNotFound, + }, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + +class _AsyncGroupMembershipClientRaw: + def __init__(self, client: AsyncGroupMembershipClient) -> None: + def list(_: admin_models.ListGroupMembershipsResponse): ... + + self.list = core.async_with_raw_response(list, client.list) + + +class _AsyncGroupMembershipClientStreaming: + def __init__(self, client: AsyncGroupMembershipClient) -> None: + def list(_: admin_models.ListGroupMembershipsResponse): ... + + self.list = core.async_with_streaming_response(list, client.list) diff --git a/foundry_sdk/v2/admin/group_membership_expiration_policy.py b/foundry_sdk/v2/admin/group_membership_expiration_policy.py new file mode 100644 index 000000000..b94236027 --- /dev/null +++ b/foundry_sdk/v2/admin/group_membership_expiration_policy.py @@ -0,0 +1,329 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v2.admin import errors as admin_errors +from foundry_sdk.v2.admin import models as admin_models +from foundry_sdk.v2.core import models as core_models + + +class GroupMembershipExpirationPolicyClient: + """ + The API client for the GroupMembershipExpirationPolicy Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _GroupMembershipExpirationPolicyClientStreaming(self) + self.with_raw_response = _GroupMembershipExpirationPolicyClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + group_id: core_models.GroupId, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> admin_models.GroupMembershipExpirationPolicy: + """ + Get the GroupMembershipExpirationPolicy. + :param group_id: + :type group_id: GroupId + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: admin_models.GroupMembershipExpirationPolicy + + :raises GroupMembershipExpirationPolicyNotFound: The given GroupMembershipExpirationPolicy could not be found. + :raises GroupNotFound: The given Group could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/admin/groups/{groupId}/membershipExpirationPolicy", + query_params={ + "preview": preview, + }, + path_params={ + "groupId": group_id, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=admin_models.GroupMembershipExpirationPolicy, + request_timeout=request_timeout, + throwable_errors={ + "GroupMembershipExpirationPolicyNotFound": admin_errors.GroupMembershipExpirationPolicyNotFound, + "GroupNotFound": admin_errors.GroupNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def replace( + self, + group_id: core_models.GroupId, + *, + maximum_duration: typing.Optional[core_models.DurationSeconds] = None, + maximum_value: typing.Optional[admin_models.GroupMembershipExpiration] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> admin_models.GroupMembershipExpirationPolicy: + """ + Replace the GroupMembershipExpirationPolicy. + :param group_id: + :type group_id: GroupId + :param maximum_duration: Members in this group must be added with expirations that are less than this duration in seconds into the future from the time they are added. + :type maximum_duration: Optional[DurationSeconds] + :param maximum_value: Members in this group must be added with expiration times that occur before this value. + :type maximum_value: Optional[GroupMembershipExpiration] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: admin_models.GroupMembershipExpirationPolicy + + :raises GroupNotFound: The given Group could not be found. + :raises ReplaceGroupMembershipExpirationPolicyPermissionDenied: Could not replace the GroupMembershipExpirationPolicy. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="PUT", + resource_path="/v2/admin/groups/{groupId}/membershipExpirationPolicy", + query_params={ + "preview": preview, + }, + path_params={ + "groupId": group_id, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=admin_models.ReplaceGroupMembershipExpirationPolicyRequest( + maximum_duration=maximum_duration, + maximum_value=maximum_value, + ), + response_type=admin_models.GroupMembershipExpirationPolicy, + request_timeout=request_timeout, + throwable_errors={ + "GroupNotFound": admin_errors.GroupNotFound, + "ReplaceGroupMembershipExpirationPolicyPermissionDenied": admin_errors.ReplaceGroupMembershipExpirationPolicyPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _GroupMembershipExpirationPolicyClientRaw: + def __init__(self, client: GroupMembershipExpirationPolicyClient) -> None: + def get(_: admin_models.GroupMembershipExpirationPolicy): ... + def replace(_: admin_models.GroupMembershipExpirationPolicy): ... + + self.get = core.with_raw_response(get, client.get) + self.replace = core.with_raw_response(replace, client.replace) + + +class _GroupMembershipExpirationPolicyClientStreaming: + def __init__(self, client: GroupMembershipExpirationPolicyClient) -> None: + def get(_: admin_models.GroupMembershipExpirationPolicy): ... + def replace(_: admin_models.GroupMembershipExpirationPolicy): ... + + self.get = core.with_streaming_response(get, client.get) + self.replace = core.with_streaming_response(replace, client.replace) + + +class AsyncGroupMembershipExpirationPolicyClient: + """ + The API client for the GroupMembershipExpirationPolicy Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncGroupMembershipExpirationPolicyClientStreaming(self) + self.with_raw_response = _AsyncGroupMembershipExpirationPolicyClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + group_id: core_models.GroupId, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[admin_models.GroupMembershipExpirationPolicy]: + """ + Get the GroupMembershipExpirationPolicy. + :param group_id: + :type group_id: GroupId + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[admin_models.GroupMembershipExpirationPolicy] + + :raises GroupMembershipExpirationPolicyNotFound: The given GroupMembershipExpirationPolicy could not be found. + :raises GroupNotFound: The given Group could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/admin/groups/{groupId}/membershipExpirationPolicy", + query_params={ + "preview": preview, + }, + path_params={ + "groupId": group_id, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=admin_models.GroupMembershipExpirationPolicy, + request_timeout=request_timeout, + throwable_errors={ + "GroupMembershipExpirationPolicyNotFound": admin_errors.GroupMembershipExpirationPolicyNotFound, + "GroupNotFound": admin_errors.GroupNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def replace( + self, + group_id: core_models.GroupId, + *, + maximum_duration: typing.Optional[core_models.DurationSeconds] = None, + maximum_value: typing.Optional[admin_models.GroupMembershipExpiration] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[admin_models.GroupMembershipExpirationPolicy]: + """ + Replace the GroupMembershipExpirationPolicy. + :param group_id: + :type group_id: GroupId + :param maximum_duration: Members in this group must be added with expirations that are less than this duration in seconds into the future from the time they are added. + :type maximum_duration: Optional[DurationSeconds] + :param maximum_value: Members in this group must be added with expiration times that occur before this value. + :type maximum_value: Optional[GroupMembershipExpiration] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[admin_models.GroupMembershipExpirationPolicy] + + :raises GroupNotFound: The given Group could not be found. + :raises ReplaceGroupMembershipExpirationPolicyPermissionDenied: Could not replace the GroupMembershipExpirationPolicy. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="PUT", + resource_path="/v2/admin/groups/{groupId}/membershipExpirationPolicy", + query_params={ + "preview": preview, + }, + path_params={ + "groupId": group_id, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=admin_models.ReplaceGroupMembershipExpirationPolicyRequest( + maximum_duration=maximum_duration, + maximum_value=maximum_value, + ), + response_type=admin_models.GroupMembershipExpirationPolicy, + request_timeout=request_timeout, + throwable_errors={ + "GroupNotFound": admin_errors.GroupNotFound, + "ReplaceGroupMembershipExpirationPolicyPermissionDenied": admin_errors.ReplaceGroupMembershipExpirationPolicyPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _AsyncGroupMembershipExpirationPolicyClientRaw: + def __init__(self, client: AsyncGroupMembershipExpirationPolicyClient) -> None: + def get(_: admin_models.GroupMembershipExpirationPolicy): ... + def replace(_: admin_models.GroupMembershipExpirationPolicy): ... + + self.get = core.async_with_raw_response(get, client.get) + self.replace = core.async_with_raw_response(replace, client.replace) + + +class _AsyncGroupMembershipExpirationPolicyClientStreaming: + def __init__(self, client: AsyncGroupMembershipExpirationPolicyClient) -> None: + def get(_: admin_models.GroupMembershipExpirationPolicy): ... + def replace(_: admin_models.GroupMembershipExpirationPolicy): ... + + self.get = core.async_with_streaming_response(get, client.get) + self.replace = core.async_with_streaming_response(replace, client.replace) diff --git a/foundry_sdk/v2/admin/group_provider_info.py b/foundry_sdk/v2/admin/group_provider_info.py new file mode 100644 index 000000000..a839476ae --- /dev/null +++ b/foundry_sdk/v2/admin/group_provider_info.py @@ -0,0 +1,337 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v2.admin import errors as admin_errors +from foundry_sdk.v2.admin import models as admin_models +from foundry_sdk.v2.core import models as core_models + + +class GroupProviderInfoClient: + """ + The API client for the GroupProviderInfo Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _GroupProviderInfoClientStreaming(self) + self.with_raw_response = _GroupProviderInfoClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + group_id: core_models.GroupId, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> admin_models.GroupProviderInfo: + """ + Get the GroupProviderInfo. + :param group_id: + :type group_id: GroupId + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: admin_models.GroupProviderInfo + + :raises GetGroupProviderInfoPermissionDenied: The provided token does not have permission to view the provider information for the given group. + :raises GroupNotFound: The given Group could not be found. + :raises GroupProviderInfoNotFound: The given GroupProviderInfo could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/admin/groups/{groupId}/providerInfo", + query_params={ + "preview": preview, + }, + path_params={ + "groupId": group_id, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=admin_models.GroupProviderInfo, + request_timeout=request_timeout, + throwable_errors={ + "GetGroupProviderInfoPermissionDenied": admin_errors.GetGroupProviderInfoPermissionDenied, + "GroupNotFound": admin_errors.GroupNotFound, + "GroupProviderInfoNotFound": admin_errors.GroupProviderInfoNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def replace( + self, + group_id: core_models.GroupId, + *, + provider_id: admin_models.ProviderId, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> admin_models.GroupProviderInfo: + """ + Replace the GroupProviderInfo. + :param group_id: + :type group_id: GroupId + :param provider_id: The ID of the Group in the external authentication provider. This value is determined by the authentication provider. At most one Group can have a given provider ID in a given Realm. + :type provider_id: ProviderId + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: admin_models.GroupProviderInfo + + :raises CannotReplaceProviderInfoForPrincipalInProtectedRealm: Provider information for Principals in this Realm cannot be replaced. + :raises GetGroupProviderInfoPermissionDenied: The provided token does not have permission to view the provider information for the given group. + :raises GroupNotFound: The given Group could not be found. + :raises GroupProviderInfoNotFound: The given GroupProviderInfo could not be found. + :raises ReplaceGroupProviderInfoPermissionDenied: Could not replace the GroupProviderInfo. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="PUT", + resource_path="/v2/admin/groups/{groupId}/providerInfo", + query_params={ + "preview": preview, + }, + path_params={ + "groupId": group_id, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=admin_models.ReplaceGroupProviderInfoRequest( + provider_id=provider_id, + ), + response_type=admin_models.GroupProviderInfo, + request_timeout=request_timeout, + throwable_errors={ + "CannotReplaceProviderInfoForPrincipalInProtectedRealm": admin_errors.CannotReplaceProviderInfoForPrincipalInProtectedRealm, + "GetGroupProviderInfoPermissionDenied": admin_errors.GetGroupProviderInfoPermissionDenied, + "GroupNotFound": admin_errors.GroupNotFound, + "GroupProviderInfoNotFound": admin_errors.GroupProviderInfoNotFound, + "ReplaceGroupProviderInfoPermissionDenied": admin_errors.ReplaceGroupProviderInfoPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _GroupProviderInfoClientRaw: + def __init__(self, client: GroupProviderInfoClient) -> None: + def get(_: admin_models.GroupProviderInfo): ... + def replace(_: admin_models.GroupProviderInfo): ... + + self.get = core.with_raw_response(get, client.get) + self.replace = core.with_raw_response(replace, client.replace) + + +class _GroupProviderInfoClientStreaming: + def __init__(self, client: GroupProviderInfoClient) -> None: + def get(_: admin_models.GroupProviderInfo): ... + def replace(_: admin_models.GroupProviderInfo): ... + + self.get = core.with_streaming_response(get, client.get) + self.replace = core.with_streaming_response(replace, client.replace) + + +class AsyncGroupProviderInfoClient: + """ + The API client for the GroupProviderInfo Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncGroupProviderInfoClientStreaming(self) + self.with_raw_response = _AsyncGroupProviderInfoClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + group_id: core_models.GroupId, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[admin_models.GroupProviderInfo]: + """ + Get the GroupProviderInfo. + :param group_id: + :type group_id: GroupId + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[admin_models.GroupProviderInfo] + + :raises GetGroupProviderInfoPermissionDenied: The provided token does not have permission to view the provider information for the given group. + :raises GroupNotFound: The given Group could not be found. + :raises GroupProviderInfoNotFound: The given GroupProviderInfo could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/admin/groups/{groupId}/providerInfo", + query_params={ + "preview": preview, + }, + path_params={ + "groupId": group_id, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=admin_models.GroupProviderInfo, + request_timeout=request_timeout, + throwable_errors={ + "GetGroupProviderInfoPermissionDenied": admin_errors.GetGroupProviderInfoPermissionDenied, + "GroupNotFound": admin_errors.GroupNotFound, + "GroupProviderInfoNotFound": admin_errors.GroupProviderInfoNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def replace( + self, + group_id: core_models.GroupId, + *, + provider_id: admin_models.ProviderId, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[admin_models.GroupProviderInfo]: + """ + Replace the GroupProviderInfo. + :param group_id: + :type group_id: GroupId + :param provider_id: The ID of the Group in the external authentication provider. This value is determined by the authentication provider. At most one Group can have a given provider ID in a given Realm. + :type provider_id: ProviderId + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[admin_models.GroupProviderInfo] + + :raises CannotReplaceProviderInfoForPrincipalInProtectedRealm: Provider information for Principals in this Realm cannot be replaced. + :raises GetGroupProviderInfoPermissionDenied: The provided token does not have permission to view the provider information for the given group. + :raises GroupNotFound: The given Group could not be found. + :raises GroupProviderInfoNotFound: The given GroupProviderInfo could not be found. + :raises ReplaceGroupProviderInfoPermissionDenied: Could not replace the GroupProviderInfo. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="PUT", + resource_path="/v2/admin/groups/{groupId}/providerInfo", + query_params={ + "preview": preview, + }, + path_params={ + "groupId": group_id, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=admin_models.ReplaceGroupProviderInfoRequest( + provider_id=provider_id, + ), + response_type=admin_models.GroupProviderInfo, + request_timeout=request_timeout, + throwable_errors={ + "CannotReplaceProviderInfoForPrincipalInProtectedRealm": admin_errors.CannotReplaceProviderInfoForPrincipalInProtectedRealm, + "GetGroupProviderInfoPermissionDenied": admin_errors.GetGroupProviderInfoPermissionDenied, + "GroupNotFound": admin_errors.GroupNotFound, + "GroupProviderInfoNotFound": admin_errors.GroupProviderInfoNotFound, + "ReplaceGroupProviderInfoPermissionDenied": admin_errors.ReplaceGroupProviderInfoPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _AsyncGroupProviderInfoClientRaw: + def __init__(self, client: AsyncGroupProviderInfoClient) -> None: + def get(_: admin_models.GroupProviderInfo): ... + def replace(_: admin_models.GroupProviderInfo): ... + + self.get = core.async_with_raw_response(get, client.get) + self.replace = core.async_with_raw_response(replace, client.replace) + + +class _AsyncGroupProviderInfoClientStreaming: + def __init__(self, client: AsyncGroupProviderInfoClient) -> None: + def get(_: admin_models.GroupProviderInfo): ... + def replace(_: admin_models.GroupProviderInfo): ... + + self.get = core.async_with_streaming_response(get, client.get) + self.replace = core.async_with_streaming_response(replace, client.replace) diff --git a/foundry_sdk/v2/admin/host.py b/foundry_sdk/v2/admin/host.py new file mode 100644 index 000000000..affd178cf --- /dev/null +++ b/foundry_sdk/v2/admin/host.py @@ -0,0 +1,226 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v2.admin import errors as admin_errors +from foundry_sdk.v2.admin import models as admin_models +from foundry_sdk.v2.core import errors as core_errors +from foundry_sdk.v2.core import models as core_models + + +class HostClient: + """ + The API client for the Host Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _HostClientStreaming(self) + self.with_raw_response = _HostClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def list( + self, + enrollment_rid: core_models.EnrollmentRid, + *, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.ResourceIterator[admin_models.Host]: + """ + Lists all Hosts. + + This is a paged endpoint. Each page may be smaller or larger than the requested page size. However, it is guaranteed that if there are more results available, the `nextPageToken` field will be populated. To get the next page, make the same request again, but set the value of the `pageToken` query parameter to be value of the `nextPageToken` value of the previous response. If there is no `nextPageToken` field in the response, you are on the last page. + :param enrollment_rid: + :type enrollment_rid: EnrollmentRid + :param page_size: The page size to use for the endpoint. + :type page_size: Optional[PageSize] + :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. + :type page_token: Optional[PageToken] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.ResourceIterator[admin_models.Host] + + :raises EnrollmentNotFound: The given Enrollment could not be found. + :raises InvalidPageSize: The provided page size was zero or negative. Page sizes must be greater than zero. + :raises ListHostsPermissionDenied: You do not have permission to list hosts for this enrollment + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/admin/enrollments/{enrollmentRid}/hosts", + query_params={ + "pageSize": page_size, + "pageToken": page_token, + "preview": preview, + }, + path_params={ + "enrollmentRid": enrollment_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=admin_models.ListHostsResponse, + request_timeout=request_timeout, + throwable_errors={ + "EnrollmentNotFound": admin_errors.EnrollmentNotFound, + "InvalidPageSize": core_errors.InvalidPageSize, + "ListHostsPermissionDenied": admin_errors.ListHostsPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + +class _HostClientRaw: + def __init__(self, client: HostClient) -> None: + def list(_: admin_models.ListHostsResponse): ... + + self.list = core.with_raw_response(list, client.list) + + +class _HostClientStreaming: + def __init__(self, client: HostClient) -> None: + def list(_: admin_models.ListHostsResponse): ... + + self.list = core.with_streaming_response(list, client.list) + + +class AsyncHostClient: + """ + The API client for the Host Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncHostClientStreaming(self) + self.with_raw_response = _AsyncHostClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def list( + self, + enrollment_rid: core_models.EnrollmentRid, + *, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.AsyncResourceIterator[admin_models.Host]: + """ + Lists all Hosts. + + This is a paged endpoint. Each page may be smaller or larger than the requested page size. However, it is guaranteed that if there are more results available, the `nextPageToken` field will be populated. To get the next page, make the same request again, but set the value of the `pageToken` query parameter to be value of the `nextPageToken` value of the previous response. If there is no `nextPageToken` field in the response, you are on the last page. + :param enrollment_rid: + :type enrollment_rid: EnrollmentRid + :param page_size: The page size to use for the endpoint. + :type page_size: Optional[PageSize] + :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. + :type page_token: Optional[PageToken] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.AsyncResourceIterator[admin_models.Host] + + :raises EnrollmentNotFound: The given Enrollment could not be found. + :raises InvalidPageSize: The provided page size was zero or negative. Page sizes must be greater than zero. + :raises ListHostsPermissionDenied: You do not have permission to list hosts for this enrollment + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/admin/enrollments/{enrollmentRid}/hosts", + query_params={ + "pageSize": page_size, + "pageToken": page_token, + "preview": preview, + }, + path_params={ + "enrollmentRid": enrollment_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=admin_models.ListHostsResponse, + request_timeout=request_timeout, + throwable_errors={ + "EnrollmentNotFound": admin_errors.EnrollmentNotFound, + "InvalidPageSize": core_errors.InvalidPageSize, + "ListHostsPermissionDenied": admin_errors.ListHostsPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + +class _AsyncHostClientRaw: + def __init__(self, client: AsyncHostClient) -> None: + def list(_: admin_models.ListHostsResponse): ... + + self.list = core.async_with_raw_response(list, client.list) + + +class _AsyncHostClientStreaming: + def __init__(self, client: AsyncHostClient) -> None: + def list(_: admin_models.ListHostsResponse): ... + + self.list = core.async_with_streaming_response(list, client.list) diff --git a/foundry_sdk/v2/admin/marking.py b/foundry_sdk/v2/admin/marking.py new file mode 100644 index 000000000..0ec0bdebb --- /dev/null +++ b/foundry_sdk/v2/admin/marking.py @@ -0,0 +1,766 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing +from functools import cached_property + +import annotated_types +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v2.admin import errors as admin_errors +from foundry_sdk.v2.admin import models as admin_models +from foundry_sdk.v2.core import errors as core_errors +from foundry_sdk.v2.core import models as core_models + + +class MarkingClient: + """ + The API client for the Marking Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _MarkingClientStreaming(self) + self.with_raw_response = _MarkingClientRaw(self) + + @cached_property + def MarkingMember(self): + from foundry_sdk.v2.admin.marking_member import MarkingMemberClient + + return MarkingMemberClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @cached_property + def MarkingRoleAssignment(self): + from foundry_sdk.v2.admin.marking_role_assignment import MarkingRoleAssignmentClient # NOQA + + return MarkingRoleAssignmentClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def create( + self, + *, + category_id: admin_models.MarkingCategoryId, + initial_members: typing.List[core_models.PrincipalId], + initial_role_assignments: typing.List[admin_models.MarkingRoleUpdate], + name: admin_models.MarkingName, + description: typing.Optional[str] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> admin_models.Marking: + """ + Creates a new Marking. + :param category_id: + :type category_id: MarkingCategoryId + :param initial_members: Users and Groups that will be able to view resources protected by this Marking. This can be changed later through the MarkingMember operations. + :type initial_members: List[PrincipalId] + :param initial_role_assignments: The initial roles that will be assigned when the Marking is created. At least one ADMIN role must be provided. This can be changed later through the MarkingRoleAssignment operations. WARNING: If you do not include your own principal ID or the ID of a Group that you are a member of, you will create a Marking that you cannot administer. + :type initial_role_assignments: List[MarkingRoleUpdate] + :param name: + :type name: MarkingName + :param description: + :type description: Optional[str] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: admin_models.Marking + + :raises CreateMarkingMissingInitialAdminRole: At least one ADMIN role assignment must be provided when creating a marking. + :raises CreateMarkingPermissionDenied: Could not create the Marking. + :raises GetMarkingCategoryPermissionDenied: The provided token does not have permission to view the marking category. + :raises MarkingCategoryNotFound: The given MarkingCategory could not be found. + :raises MarkingNameInCategoryAlreadyExists: A marking with the same name already exists in the category. + :raises MarkingNameIsEmpty: The marking name is empty. + :raises PrincipalNotFound: A principal (User or Group) with the given PrincipalId could not be found + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/admin/markings", + query_params={ + "preview": preview, + }, + path_params={}, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=admin_models.CreateMarkingRequest( + initial_role_assignments=initial_role_assignments, + initial_members=initial_members, + name=name, + description=description, + category_id=category_id, + ), + response_type=admin_models.Marking, + request_timeout=request_timeout, + throwable_errors={ + "CreateMarkingMissingInitialAdminRole": admin_errors.CreateMarkingMissingInitialAdminRole, + "CreateMarkingPermissionDenied": admin_errors.CreateMarkingPermissionDenied, + "GetMarkingCategoryPermissionDenied": admin_errors.GetMarkingCategoryPermissionDenied, + "MarkingCategoryNotFound": admin_errors.MarkingCategoryNotFound, + "MarkingNameInCategoryAlreadyExists": admin_errors.MarkingNameInCategoryAlreadyExists, + "MarkingNameIsEmpty": admin_errors.MarkingNameIsEmpty, + "PrincipalNotFound": admin_errors.PrincipalNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + marking_id: core_models.MarkingId, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> admin_models.Marking: + """ + Get the Marking with the specified id. + :param marking_id: + :type marking_id: MarkingId + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: admin_models.Marking + + :raises GetMarkingPermissionDenied: The provided token does not have permission to view the marking. + :raises MarkingNotFound: The given Marking could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/admin/markings/{markingId}", + query_params={ + "preview": preview, + }, + path_params={ + "markingId": marking_id, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=admin_models.Marking, + request_timeout=request_timeout, + throwable_errors={ + "GetMarkingPermissionDenied": admin_errors.GetMarkingPermissionDenied, + "MarkingNotFound": admin_errors.MarkingNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get_batch( + self, + body: typing_extensions.Annotated[ + typing.List[admin_models.GetMarkingsBatchRequestElement], + annotated_types.Len(min_length=1, max_length=500), + ], + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> admin_models.GetMarkingsBatchResponse: + """ + Execute multiple get requests on Marking. + + The maximum batch size for this endpoint is 500. + :param body: Body of the request + :type body: List[GetMarkingsBatchRequestElement] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: admin_models.GetMarkingsBatchResponse + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/admin/markings/getBatch", + query_params={ + "preview": preview, + }, + path_params={}, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=body, + response_type=admin_models.GetMarkingsBatchResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def list( + self, + *, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.ResourceIterator[admin_models.Marking]: + """ + Maximum page size 100. + :param page_size: The page size to use for the endpoint. + :type page_size: Optional[PageSize] + :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. + :type page_token: Optional[PageToken] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.ResourceIterator[admin_models.Marking] + + :raises InvalidPageSize: The provided page size was zero or negative. Page sizes must be greater than zero. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/admin/markings", + query_params={ + "pageSize": page_size, + "pageToken": page_token, + "preview": preview, + }, + path_params={}, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=admin_models.ListMarkingsResponse, + request_timeout=request_timeout, + throwable_errors={ + "InvalidPageSize": core_errors.InvalidPageSize, + }, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def replace( + self, + marking_id: core_models.MarkingId, + *, + name: admin_models.MarkingName, + description: typing.Optional[str] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> admin_models.Marking: + """ + Replace the Marking with the specified id. + :param marking_id: + :type marking_id: MarkingId + :param name: + :type name: MarkingName + :param description: + :type description: Optional[str] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: admin_models.Marking + + :raises GetMarkingCategoryPermissionDenied: The provided token does not have permission to view the marking category. + :raises GetMarkingPermissionDenied: The provided token does not have permission to view the marking. + :raises MarkingNameInCategoryAlreadyExists: A marking with the same name already exists in the category. + :raises MarkingNameIsEmpty: The marking name is empty. + :raises MarkingNotFound: The given Marking could not be found. + :raises ReplaceMarkingPermissionDenied: Could not replace the Marking. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="PUT", + resource_path="/v2/admin/markings/{markingId}", + query_params={ + "preview": preview, + }, + path_params={ + "markingId": marking_id, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=admin_models.ReplaceMarkingRequest( + name=name, + description=description, + ), + response_type=admin_models.Marking, + request_timeout=request_timeout, + throwable_errors={ + "GetMarkingCategoryPermissionDenied": admin_errors.GetMarkingCategoryPermissionDenied, + "GetMarkingPermissionDenied": admin_errors.GetMarkingPermissionDenied, + "MarkingNameInCategoryAlreadyExists": admin_errors.MarkingNameInCategoryAlreadyExists, + "MarkingNameIsEmpty": admin_errors.MarkingNameIsEmpty, + "MarkingNotFound": admin_errors.MarkingNotFound, + "ReplaceMarkingPermissionDenied": admin_errors.ReplaceMarkingPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _MarkingClientRaw: + def __init__(self, client: MarkingClient) -> None: + def create(_: admin_models.Marking): ... + def get(_: admin_models.Marking): ... + def get_batch(_: admin_models.GetMarkingsBatchResponse): ... + def list(_: admin_models.ListMarkingsResponse): ... + def replace(_: admin_models.Marking): ... + + self.create = core.with_raw_response(create, client.create) + self.get = core.with_raw_response(get, client.get) + self.get_batch = core.with_raw_response(get_batch, client.get_batch) + self.list = core.with_raw_response(list, client.list) + self.replace = core.with_raw_response(replace, client.replace) + + +class _MarkingClientStreaming: + def __init__(self, client: MarkingClient) -> None: + def create(_: admin_models.Marking): ... + def get(_: admin_models.Marking): ... + def get_batch(_: admin_models.GetMarkingsBatchResponse): ... + def list(_: admin_models.ListMarkingsResponse): ... + def replace(_: admin_models.Marking): ... + + self.create = core.with_streaming_response(create, client.create) + self.get = core.with_streaming_response(get, client.get) + self.get_batch = core.with_streaming_response(get_batch, client.get_batch) + self.list = core.with_streaming_response(list, client.list) + self.replace = core.with_streaming_response(replace, client.replace) + + +class AsyncMarkingClient: + """ + The API client for the Marking Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncMarkingClientStreaming(self) + self.with_raw_response = _AsyncMarkingClientRaw(self) + + @cached_property + def MarkingMember(self): + from foundry_sdk.v2.admin.marking_member import AsyncMarkingMemberClient + + return AsyncMarkingMemberClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @cached_property + def MarkingRoleAssignment(self): + from foundry_sdk.v2.admin.marking_role_assignment import ( + AsyncMarkingRoleAssignmentClient, + ) # NOQA + + return AsyncMarkingRoleAssignmentClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def create( + self, + *, + category_id: admin_models.MarkingCategoryId, + initial_members: typing.List[core_models.PrincipalId], + initial_role_assignments: typing.List[admin_models.MarkingRoleUpdate], + name: admin_models.MarkingName, + description: typing.Optional[str] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[admin_models.Marking]: + """ + Creates a new Marking. + :param category_id: + :type category_id: MarkingCategoryId + :param initial_members: Users and Groups that will be able to view resources protected by this Marking. This can be changed later through the MarkingMember operations. + :type initial_members: List[PrincipalId] + :param initial_role_assignments: The initial roles that will be assigned when the Marking is created. At least one ADMIN role must be provided. This can be changed later through the MarkingRoleAssignment operations. WARNING: If you do not include your own principal ID or the ID of a Group that you are a member of, you will create a Marking that you cannot administer. + :type initial_role_assignments: List[MarkingRoleUpdate] + :param name: + :type name: MarkingName + :param description: + :type description: Optional[str] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[admin_models.Marking] + + :raises CreateMarkingMissingInitialAdminRole: At least one ADMIN role assignment must be provided when creating a marking. + :raises CreateMarkingPermissionDenied: Could not create the Marking. + :raises GetMarkingCategoryPermissionDenied: The provided token does not have permission to view the marking category. + :raises MarkingCategoryNotFound: The given MarkingCategory could not be found. + :raises MarkingNameInCategoryAlreadyExists: A marking with the same name already exists in the category. + :raises MarkingNameIsEmpty: The marking name is empty. + :raises PrincipalNotFound: A principal (User or Group) with the given PrincipalId could not be found + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/admin/markings", + query_params={ + "preview": preview, + }, + path_params={}, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=admin_models.CreateMarkingRequest( + initial_role_assignments=initial_role_assignments, + initial_members=initial_members, + name=name, + description=description, + category_id=category_id, + ), + response_type=admin_models.Marking, + request_timeout=request_timeout, + throwable_errors={ + "CreateMarkingMissingInitialAdminRole": admin_errors.CreateMarkingMissingInitialAdminRole, + "CreateMarkingPermissionDenied": admin_errors.CreateMarkingPermissionDenied, + "GetMarkingCategoryPermissionDenied": admin_errors.GetMarkingCategoryPermissionDenied, + "MarkingCategoryNotFound": admin_errors.MarkingCategoryNotFound, + "MarkingNameInCategoryAlreadyExists": admin_errors.MarkingNameInCategoryAlreadyExists, + "MarkingNameIsEmpty": admin_errors.MarkingNameIsEmpty, + "PrincipalNotFound": admin_errors.PrincipalNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + marking_id: core_models.MarkingId, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[admin_models.Marking]: + """ + Get the Marking with the specified id. + :param marking_id: + :type marking_id: MarkingId + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[admin_models.Marking] + + :raises GetMarkingPermissionDenied: The provided token does not have permission to view the marking. + :raises MarkingNotFound: The given Marking could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/admin/markings/{markingId}", + query_params={ + "preview": preview, + }, + path_params={ + "markingId": marking_id, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=admin_models.Marking, + request_timeout=request_timeout, + throwable_errors={ + "GetMarkingPermissionDenied": admin_errors.GetMarkingPermissionDenied, + "MarkingNotFound": admin_errors.MarkingNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get_batch( + self, + body: typing_extensions.Annotated[ + typing.List[admin_models.GetMarkingsBatchRequestElement], + annotated_types.Len(min_length=1, max_length=500), + ], + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[admin_models.GetMarkingsBatchResponse]: + """ + Execute multiple get requests on Marking. + + The maximum batch size for this endpoint is 500. + :param body: Body of the request + :type body: List[GetMarkingsBatchRequestElement] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[admin_models.GetMarkingsBatchResponse] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/admin/markings/getBatch", + query_params={ + "preview": preview, + }, + path_params={}, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=body, + response_type=admin_models.GetMarkingsBatchResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def list( + self, + *, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.AsyncResourceIterator[admin_models.Marking]: + """ + Maximum page size 100. + :param page_size: The page size to use for the endpoint. + :type page_size: Optional[PageSize] + :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. + :type page_token: Optional[PageToken] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.AsyncResourceIterator[admin_models.Marking] + + :raises InvalidPageSize: The provided page size was zero or negative. Page sizes must be greater than zero. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/admin/markings", + query_params={ + "pageSize": page_size, + "pageToken": page_token, + "preview": preview, + }, + path_params={}, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=admin_models.ListMarkingsResponse, + request_timeout=request_timeout, + throwable_errors={ + "InvalidPageSize": core_errors.InvalidPageSize, + }, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def replace( + self, + marking_id: core_models.MarkingId, + *, + name: admin_models.MarkingName, + description: typing.Optional[str] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[admin_models.Marking]: + """ + Replace the Marking with the specified id. + :param marking_id: + :type marking_id: MarkingId + :param name: + :type name: MarkingName + :param description: + :type description: Optional[str] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[admin_models.Marking] + + :raises GetMarkingCategoryPermissionDenied: The provided token does not have permission to view the marking category. + :raises GetMarkingPermissionDenied: The provided token does not have permission to view the marking. + :raises MarkingNameInCategoryAlreadyExists: A marking with the same name already exists in the category. + :raises MarkingNameIsEmpty: The marking name is empty. + :raises MarkingNotFound: The given Marking could not be found. + :raises ReplaceMarkingPermissionDenied: Could not replace the Marking. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="PUT", + resource_path="/v2/admin/markings/{markingId}", + query_params={ + "preview": preview, + }, + path_params={ + "markingId": marking_id, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=admin_models.ReplaceMarkingRequest( + name=name, + description=description, + ), + response_type=admin_models.Marking, + request_timeout=request_timeout, + throwable_errors={ + "GetMarkingCategoryPermissionDenied": admin_errors.GetMarkingCategoryPermissionDenied, + "GetMarkingPermissionDenied": admin_errors.GetMarkingPermissionDenied, + "MarkingNameInCategoryAlreadyExists": admin_errors.MarkingNameInCategoryAlreadyExists, + "MarkingNameIsEmpty": admin_errors.MarkingNameIsEmpty, + "MarkingNotFound": admin_errors.MarkingNotFound, + "ReplaceMarkingPermissionDenied": admin_errors.ReplaceMarkingPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _AsyncMarkingClientRaw: + def __init__(self, client: AsyncMarkingClient) -> None: + def create(_: admin_models.Marking): ... + def get(_: admin_models.Marking): ... + def get_batch(_: admin_models.GetMarkingsBatchResponse): ... + def list(_: admin_models.ListMarkingsResponse): ... + def replace(_: admin_models.Marking): ... + + self.create = core.async_with_raw_response(create, client.create) + self.get = core.async_with_raw_response(get, client.get) + self.get_batch = core.async_with_raw_response(get_batch, client.get_batch) + self.list = core.async_with_raw_response(list, client.list) + self.replace = core.async_with_raw_response(replace, client.replace) + + +class _AsyncMarkingClientStreaming: + def __init__(self, client: AsyncMarkingClient) -> None: + def create(_: admin_models.Marking): ... + def get(_: admin_models.Marking): ... + def get_batch(_: admin_models.GetMarkingsBatchResponse): ... + def list(_: admin_models.ListMarkingsResponse): ... + def replace(_: admin_models.Marking): ... + + self.create = core.async_with_streaming_response(create, client.create) + self.get = core.async_with_streaming_response(get, client.get) + self.get_batch = core.async_with_streaming_response(get_batch, client.get_batch) + self.list = core.async_with_streaming_response(list, client.list) + self.replace = core.async_with_streaming_response(replace, client.replace) diff --git a/foundry_sdk/v2/admin/marking_category.py b/foundry_sdk/v2/admin/marking_category.py new file mode 100644 index 000000000..827357142 --- /dev/null +++ b/foundry_sdk/v2/admin/marking_category.py @@ -0,0 +1,312 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v2.admin import errors as admin_errors +from foundry_sdk.v2.admin import models as admin_models +from foundry_sdk.v2.core import errors as core_errors +from foundry_sdk.v2.core import models as core_models + + +class MarkingCategoryClient: + """ + The API client for the MarkingCategory Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _MarkingCategoryClientStreaming(self) + self.with_raw_response = _MarkingCategoryClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + marking_category_id: admin_models.MarkingCategoryId, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> admin_models.MarkingCategory: + """ + Get the MarkingCategory with the specified id. + :param marking_category_id: + :type marking_category_id: MarkingCategoryId + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: admin_models.MarkingCategory + + :raises GetMarkingCategoryPermissionDenied: The provided token does not have permission to view the marking category. + :raises MarkingCategoryNotFound: The given MarkingCategory could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/admin/markingCategories/{markingCategoryId}", + query_params={ + "preview": preview, + }, + path_params={ + "markingCategoryId": marking_category_id, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=admin_models.MarkingCategory, + request_timeout=request_timeout, + throwable_errors={ + "GetMarkingCategoryPermissionDenied": admin_errors.GetMarkingCategoryPermissionDenied, + "MarkingCategoryNotFound": admin_errors.MarkingCategoryNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def list( + self, + *, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.ResourceIterator[admin_models.MarkingCategory]: + """ + Maximum page size 100. + :param page_size: The page size to use for the endpoint. + :type page_size: Optional[PageSize] + :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. + :type page_token: Optional[PageToken] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.ResourceIterator[admin_models.MarkingCategory] + + :raises InvalidPageSize: The provided page size was zero or negative. Page sizes must be greater than zero. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/admin/markingCategories", + query_params={ + "pageSize": page_size, + "pageToken": page_token, + "preview": preview, + }, + path_params={}, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=admin_models.ListMarkingCategoriesResponse, + request_timeout=request_timeout, + throwable_errors={ + "InvalidPageSize": core_errors.InvalidPageSize, + }, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + +class _MarkingCategoryClientRaw: + def __init__(self, client: MarkingCategoryClient) -> None: + def get(_: admin_models.MarkingCategory): ... + def list(_: admin_models.ListMarkingCategoriesResponse): ... + + self.get = core.with_raw_response(get, client.get) + self.list = core.with_raw_response(list, client.list) + + +class _MarkingCategoryClientStreaming: + def __init__(self, client: MarkingCategoryClient) -> None: + def get(_: admin_models.MarkingCategory): ... + def list(_: admin_models.ListMarkingCategoriesResponse): ... + + self.get = core.with_streaming_response(get, client.get) + self.list = core.with_streaming_response(list, client.list) + + +class AsyncMarkingCategoryClient: + """ + The API client for the MarkingCategory Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncMarkingCategoryClientStreaming(self) + self.with_raw_response = _AsyncMarkingCategoryClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + marking_category_id: admin_models.MarkingCategoryId, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[admin_models.MarkingCategory]: + """ + Get the MarkingCategory with the specified id. + :param marking_category_id: + :type marking_category_id: MarkingCategoryId + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[admin_models.MarkingCategory] + + :raises GetMarkingCategoryPermissionDenied: The provided token does not have permission to view the marking category. + :raises MarkingCategoryNotFound: The given MarkingCategory could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/admin/markingCategories/{markingCategoryId}", + query_params={ + "preview": preview, + }, + path_params={ + "markingCategoryId": marking_category_id, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=admin_models.MarkingCategory, + request_timeout=request_timeout, + throwable_errors={ + "GetMarkingCategoryPermissionDenied": admin_errors.GetMarkingCategoryPermissionDenied, + "MarkingCategoryNotFound": admin_errors.MarkingCategoryNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def list( + self, + *, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.AsyncResourceIterator[admin_models.MarkingCategory]: + """ + Maximum page size 100. + :param page_size: The page size to use for the endpoint. + :type page_size: Optional[PageSize] + :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. + :type page_token: Optional[PageToken] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.AsyncResourceIterator[admin_models.MarkingCategory] + + :raises InvalidPageSize: The provided page size was zero or negative. Page sizes must be greater than zero. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/admin/markingCategories", + query_params={ + "pageSize": page_size, + "pageToken": page_token, + "preview": preview, + }, + path_params={}, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=admin_models.ListMarkingCategoriesResponse, + request_timeout=request_timeout, + throwable_errors={ + "InvalidPageSize": core_errors.InvalidPageSize, + }, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + +class _AsyncMarkingCategoryClientRaw: + def __init__(self, client: AsyncMarkingCategoryClient) -> None: + def get(_: admin_models.MarkingCategory): ... + def list(_: admin_models.ListMarkingCategoriesResponse): ... + + self.get = core.async_with_raw_response(get, client.get) + self.list = core.async_with_raw_response(list, client.list) + + +class _AsyncMarkingCategoryClientStreaming: + def __init__(self, client: AsyncMarkingCategoryClient) -> None: + def get(_: admin_models.MarkingCategory): ... + def list(_: admin_models.ListMarkingCategoriesResponse): ... + + self.get = core.async_with_streaming_response(get, client.get) + self.list = core.async_with_streaming_response(list, client.list) diff --git a/foundry_sdk/v2/admin/marking_member.py b/foundry_sdk/v2/admin/marking_member.py new file mode 100644 index 000000000..4b743cb2f --- /dev/null +++ b/foundry_sdk/v2/admin/marking_member.py @@ -0,0 +1,449 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v2.admin import errors as admin_errors +from foundry_sdk.v2.admin import models as admin_models +from foundry_sdk.v2.core import models as core_models + + +class MarkingMemberClient: + """ + The API client for the MarkingMember Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _MarkingMemberClientStreaming(self) + self.with_raw_response = _MarkingMemberClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def add( + self, + marking_id: core_models.MarkingId, + *, + principal_ids: typing.List[core_models.PrincipalId], + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> None: + """ + + :param marking_id: + :type marking_id: MarkingId + :param principal_ids: + :type principal_ids: List[PrincipalId] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: None + + :raises AddMarkingMembersPermissionDenied: Could not add the MarkingMember. + :raises GetMarkingPermissionDenied: The provided token does not have permission to view the marking. + :raises MarkingNotFound: The given Marking could not be found. + :raises PrincipalNotFound: A principal (User or Group) with the given PrincipalId could not be found + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/admin/markings/{markingId}/markingMembers/add", + query_params={}, + path_params={ + "markingId": marking_id, + }, + header_params={ + "Content-Type": "application/json", + }, + body=admin_models.AddMarkingMembersRequest( + principal_ids=principal_ids, + ), + response_type=None, + request_timeout=request_timeout, + throwable_errors={ + "AddMarkingMembersPermissionDenied": admin_errors.AddMarkingMembersPermissionDenied, + "GetMarkingPermissionDenied": admin_errors.GetMarkingPermissionDenied, + "MarkingNotFound": admin_errors.MarkingNotFound, + "PrincipalNotFound": admin_errors.PrincipalNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def list( + self, + marking_id: core_models.MarkingId, + *, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + transitive: typing.Optional[bool] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.ResourceIterator[admin_models.MarkingMember]: + """ + Lists all principals who can view resources protected by the given Marking. Ignores the `pageSize` parameter. + Requires `api:admin-write` because only marking administrators can view marking members. + + :param marking_id: + :type marking_id: MarkingId + :param page_size: The page size to use for the endpoint. + :type page_size: Optional[PageSize] + :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. + :type page_token: Optional[PageToken] + :param transitive: When true, includes the transitive members of groups contained within groups that are members of this Marking. For example, say the Marking has member Group A, and Group A has member User B. If `transitive=false` only Group A will be returned, but if `transitive=true` then Group A and User B will be returned. This will recursively resolve Groups through all layers of nesting. Defaults to false. + :type transitive: Optional[bool] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.ResourceIterator[admin_models.MarkingMember] + + :raises GetMarkingPermissionDenied: The provided token does not have permission to view the marking. + :raises ListMarkingMembersPermissionDenied: The provided token does not have permission to list the members of this marking. + :raises MarkingNotFound: The given Marking could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/admin/markings/{markingId}/markingMembers", + query_params={ + "pageSize": page_size, + "pageToken": page_token, + "transitive": transitive, + }, + path_params={ + "markingId": marking_id, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=admin_models.ListMarkingMembersResponse, + request_timeout=request_timeout, + throwable_errors={ + "GetMarkingPermissionDenied": admin_errors.GetMarkingPermissionDenied, + "ListMarkingMembersPermissionDenied": admin_errors.ListMarkingMembersPermissionDenied, + "MarkingNotFound": admin_errors.MarkingNotFound, + }, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def remove( + self, + marking_id: core_models.MarkingId, + *, + principal_ids: typing.List[core_models.PrincipalId], + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> None: + """ + + :param marking_id: + :type marking_id: MarkingId + :param principal_ids: + :type principal_ids: List[PrincipalId] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: None + + :raises GetMarkingPermissionDenied: The provided token does not have permission to view the marking. + :raises MarkingNotFound: The given Marking could not be found. + :raises PrincipalNotFound: A principal (User or Group) with the given PrincipalId could not be found + :raises RemoveMarkingMembersPermissionDenied: Could not remove the MarkingMember. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/admin/markings/{markingId}/markingMembers/remove", + query_params={}, + path_params={ + "markingId": marking_id, + }, + header_params={ + "Content-Type": "application/json", + }, + body=admin_models.RemoveMarkingMembersRequest( + principal_ids=principal_ids, + ), + response_type=None, + request_timeout=request_timeout, + throwable_errors={ + "GetMarkingPermissionDenied": admin_errors.GetMarkingPermissionDenied, + "MarkingNotFound": admin_errors.MarkingNotFound, + "PrincipalNotFound": admin_errors.PrincipalNotFound, + "RemoveMarkingMembersPermissionDenied": admin_errors.RemoveMarkingMembersPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _MarkingMemberClientRaw: + def __init__(self, client: MarkingMemberClient) -> None: + def add(_: None): ... + def list(_: admin_models.ListMarkingMembersResponse): ... + def remove(_: None): ... + + self.add = core.with_raw_response(add, client.add) + self.list = core.with_raw_response(list, client.list) + self.remove = core.with_raw_response(remove, client.remove) + + +class _MarkingMemberClientStreaming: + def __init__(self, client: MarkingMemberClient) -> None: + def list(_: admin_models.ListMarkingMembersResponse): ... + + self.list = core.with_streaming_response(list, client.list) + + +class AsyncMarkingMemberClient: + """ + The API client for the MarkingMember Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncMarkingMemberClientStreaming(self) + self.with_raw_response = _AsyncMarkingMemberClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def add( + self, + marking_id: core_models.MarkingId, + *, + principal_ids: typing.List[core_models.PrincipalId], + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[None]: + """ + + :param marking_id: + :type marking_id: MarkingId + :param principal_ids: + :type principal_ids: List[PrincipalId] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[None] + + :raises AddMarkingMembersPermissionDenied: Could not add the MarkingMember. + :raises GetMarkingPermissionDenied: The provided token does not have permission to view the marking. + :raises MarkingNotFound: The given Marking could not be found. + :raises PrincipalNotFound: A principal (User or Group) with the given PrincipalId could not be found + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/admin/markings/{markingId}/markingMembers/add", + query_params={}, + path_params={ + "markingId": marking_id, + }, + header_params={ + "Content-Type": "application/json", + }, + body=admin_models.AddMarkingMembersRequest( + principal_ids=principal_ids, + ), + response_type=None, + request_timeout=request_timeout, + throwable_errors={ + "AddMarkingMembersPermissionDenied": admin_errors.AddMarkingMembersPermissionDenied, + "GetMarkingPermissionDenied": admin_errors.GetMarkingPermissionDenied, + "MarkingNotFound": admin_errors.MarkingNotFound, + "PrincipalNotFound": admin_errors.PrincipalNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def list( + self, + marking_id: core_models.MarkingId, + *, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + transitive: typing.Optional[bool] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.AsyncResourceIterator[admin_models.MarkingMember]: + """ + Lists all principals who can view resources protected by the given Marking. Ignores the `pageSize` parameter. + Requires `api:admin-write` because only marking administrators can view marking members. + + :param marking_id: + :type marking_id: MarkingId + :param page_size: The page size to use for the endpoint. + :type page_size: Optional[PageSize] + :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. + :type page_token: Optional[PageToken] + :param transitive: When true, includes the transitive members of groups contained within groups that are members of this Marking. For example, say the Marking has member Group A, and Group A has member User B. If `transitive=false` only Group A will be returned, but if `transitive=true` then Group A and User B will be returned. This will recursively resolve Groups through all layers of nesting. Defaults to false. + :type transitive: Optional[bool] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.AsyncResourceIterator[admin_models.MarkingMember] + + :raises GetMarkingPermissionDenied: The provided token does not have permission to view the marking. + :raises ListMarkingMembersPermissionDenied: The provided token does not have permission to list the members of this marking. + :raises MarkingNotFound: The given Marking could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/admin/markings/{markingId}/markingMembers", + query_params={ + "pageSize": page_size, + "pageToken": page_token, + "transitive": transitive, + }, + path_params={ + "markingId": marking_id, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=admin_models.ListMarkingMembersResponse, + request_timeout=request_timeout, + throwable_errors={ + "GetMarkingPermissionDenied": admin_errors.GetMarkingPermissionDenied, + "ListMarkingMembersPermissionDenied": admin_errors.ListMarkingMembersPermissionDenied, + "MarkingNotFound": admin_errors.MarkingNotFound, + }, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def remove( + self, + marking_id: core_models.MarkingId, + *, + principal_ids: typing.List[core_models.PrincipalId], + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[None]: + """ + + :param marking_id: + :type marking_id: MarkingId + :param principal_ids: + :type principal_ids: List[PrincipalId] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[None] + + :raises GetMarkingPermissionDenied: The provided token does not have permission to view the marking. + :raises MarkingNotFound: The given Marking could not be found. + :raises PrincipalNotFound: A principal (User or Group) with the given PrincipalId could not be found + :raises RemoveMarkingMembersPermissionDenied: Could not remove the MarkingMember. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/admin/markings/{markingId}/markingMembers/remove", + query_params={}, + path_params={ + "markingId": marking_id, + }, + header_params={ + "Content-Type": "application/json", + }, + body=admin_models.RemoveMarkingMembersRequest( + principal_ids=principal_ids, + ), + response_type=None, + request_timeout=request_timeout, + throwable_errors={ + "GetMarkingPermissionDenied": admin_errors.GetMarkingPermissionDenied, + "MarkingNotFound": admin_errors.MarkingNotFound, + "PrincipalNotFound": admin_errors.PrincipalNotFound, + "RemoveMarkingMembersPermissionDenied": admin_errors.RemoveMarkingMembersPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _AsyncMarkingMemberClientRaw: + def __init__(self, client: AsyncMarkingMemberClient) -> None: + def add(_: None): ... + def list(_: admin_models.ListMarkingMembersResponse): ... + def remove(_: None): ... + + self.add = core.async_with_raw_response(add, client.add) + self.list = core.async_with_raw_response(list, client.list) + self.remove = core.async_with_raw_response(remove, client.remove) + + +class _AsyncMarkingMemberClientStreaming: + def __init__(self, client: AsyncMarkingMemberClient) -> None: + def list(_: admin_models.ListMarkingMembersResponse): ... + + self.list = core.async_with_streaming_response(list, client.list) diff --git a/foundry_sdk/v2/admin/marking_role_assignment.py b/foundry_sdk/v2/admin/marking_role_assignment.py new file mode 100644 index 000000000..f8a7ff4de --- /dev/null +++ b/foundry_sdk/v2/admin/marking_role_assignment.py @@ -0,0 +1,447 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v2.admin import errors as admin_errors +from foundry_sdk.v2.admin import models as admin_models +from foundry_sdk.v2.core import models as core_models + + +class MarkingRoleAssignmentClient: + """ + The API client for the MarkingRoleAssignment Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _MarkingRoleAssignmentClientStreaming(self) + self.with_raw_response = _MarkingRoleAssignmentClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def add( + self, + marking_id: core_models.MarkingId, + *, + role_assignments: typing.List[admin_models.MarkingRoleUpdate], + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> None: + """ + + :param marking_id: + :type marking_id: MarkingId + :param role_assignments: + :type role_assignments: List[MarkingRoleUpdate] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: None + + :raises AddMarkingRoleAssignmentsPermissionDenied: Could not add the MarkingRoleAssignment. + :raises GetMarkingPermissionDenied: The provided token does not have permission to view the marking. + :raises MarkingNotFound: The given Marking could not be found. + :raises PrincipalNotFound: A principal (User or Group) with the given PrincipalId could not be found + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/admin/markings/{markingId}/roleAssignments/add", + query_params={}, + path_params={ + "markingId": marking_id, + }, + header_params={ + "Content-Type": "application/json", + }, + body=admin_models.AddMarkingRoleAssignmentsRequest( + role_assignments=role_assignments, + ), + response_type=None, + request_timeout=request_timeout, + throwable_errors={ + "AddMarkingRoleAssignmentsPermissionDenied": admin_errors.AddMarkingRoleAssignmentsPermissionDenied, + "GetMarkingPermissionDenied": admin_errors.GetMarkingPermissionDenied, + "MarkingNotFound": admin_errors.MarkingNotFound, + "PrincipalNotFound": admin_errors.PrincipalNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def list( + self, + marking_id: core_models.MarkingId, + *, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.ResourceIterator[admin_models.MarkingRoleAssignment]: + """ + List all principals who are assigned a role for the given Marking. Ignores the `pageSize` parameter. + + :param marking_id: + :type marking_id: MarkingId + :param page_size: The page size to use for the endpoint. + :type page_size: Optional[PageSize] + :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. + :type page_token: Optional[PageToken] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.ResourceIterator[admin_models.MarkingRoleAssignment] + + :raises ListMarkingRoleAssignmentsPermissionDenied: The provided token does not have permission to list assigned roles for this marking. + :raises MarkingNotFound: The given Marking could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/admin/markings/{markingId}/roleAssignments", + query_params={ + "pageSize": page_size, + "pageToken": page_token, + }, + path_params={ + "markingId": marking_id, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=admin_models.ListMarkingRoleAssignmentsResponse, + request_timeout=request_timeout, + throwable_errors={ + "ListMarkingRoleAssignmentsPermissionDenied": admin_errors.ListMarkingRoleAssignmentsPermissionDenied, + "MarkingNotFound": admin_errors.MarkingNotFound, + }, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def remove( + self, + marking_id: core_models.MarkingId, + *, + role_assignments: typing.List[admin_models.MarkingRoleUpdate], + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> None: + """ + + :param marking_id: + :type marking_id: MarkingId + :param role_assignments: + :type role_assignments: List[MarkingRoleUpdate] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: None + + :raises GetMarkingPermissionDenied: The provided token does not have permission to view the marking. + :raises ListMarkingRoleAssignmentsPermissionDenied: The provided token does not have permission to list assigned roles for this marking. + :raises MarkingNotFound: The given Marking could not be found. + :raises PrincipalNotFound: A principal (User or Group) with the given PrincipalId could not be found + :raises RemoveMarkingMembersPermissionDenied: Could not remove the MarkingMember. + :raises RemoveMarkingRoleAssignmentsPermissionDenied: Could not remove the MarkingRoleAssignment. + :raises RemoveMarkingRoleAssignmentsRemoveAllAdministratorsNotAllowed: You cannot remove all administrators from a marking. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/admin/markings/{markingId}/roleAssignments/remove", + query_params={}, + path_params={ + "markingId": marking_id, + }, + header_params={ + "Content-Type": "application/json", + }, + body=admin_models.RemoveMarkingRoleAssignmentsRequest( + role_assignments=role_assignments, + ), + response_type=None, + request_timeout=request_timeout, + throwable_errors={ + "GetMarkingPermissionDenied": admin_errors.GetMarkingPermissionDenied, + "ListMarkingRoleAssignmentsPermissionDenied": admin_errors.ListMarkingRoleAssignmentsPermissionDenied, + "MarkingNotFound": admin_errors.MarkingNotFound, + "PrincipalNotFound": admin_errors.PrincipalNotFound, + "RemoveMarkingMembersPermissionDenied": admin_errors.RemoveMarkingMembersPermissionDenied, + "RemoveMarkingRoleAssignmentsPermissionDenied": admin_errors.RemoveMarkingRoleAssignmentsPermissionDenied, + "RemoveMarkingRoleAssignmentsRemoveAllAdministratorsNotAllowed": admin_errors.RemoveMarkingRoleAssignmentsRemoveAllAdministratorsNotAllowed, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _MarkingRoleAssignmentClientRaw: + def __init__(self, client: MarkingRoleAssignmentClient) -> None: + def add(_: None): ... + def list(_: admin_models.ListMarkingRoleAssignmentsResponse): ... + def remove(_: None): ... + + self.add = core.with_raw_response(add, client.add) + self.list = core.with_raw_response(list, client.list) + self.remove = core.with_raw_response(remove, client.remove) + + +class _MarkingRoleAssignmentClientStreaming: + def __init__(self, client: MarkingRoleAssignmentClient) -> None: + def list(_: admin_models.ListMarkingRoleAssignmentsResponse): ... + + self.list = core.with_streaming_response(list, client.list) + + +class AsyncMarkingRoleAssignmentClient: + """ + The API client for the MarkingRoleAssignment Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncMarkingRoleAssignmentClientStreaming(self) + self.with_raw_response = _AsyncMarkingRoleAssignmentClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def add( + self, + marking_id: core_models.MarkingId, + *, + role_assignments: typing.List[admin_models.MarkingRoleUpdate], + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[None]: + """ + + :param marking_id: + :type marking_id: MarkingId + :param role_assignments: + :type role_assignments: List[MarkingRoleUpdate] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[None] + + :raises AddMarkingRoleAssignmentsPermissionDenied: Could not add the MarkingRoleAssignment. + :raises GetMarkingPermissionDenied: The provided token does not have permission to view the marking. + :raises MarkingNotFound: The given Marking could not be found. + :raises PrincipalNotFound: A principal (User or Group) with the given PrincipalId could not be found + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/admin/markings/{markingId}/roleAssignments/add", + query_params={}, + path_params={ + "markingId": marking_id, + }, + header_params={ + "Content-Type": "application/json", + }, + body=admin_models.AddMarkingRoleAssignmentsRequest( + role_assignments=role_assignments, + ), + response_type=None, + request_timeout=request_timeout, + throwable_errors={ + "AddMarkingRoleAssignmentsPermissionDenied": admin_errors.AddMarkingRoleAssignmentsPermissionDenied, + "GetMarkingPermissionDenied": admin_errors.GetMarkingPermissionDenied, + "MarkingNotFound": admin_errors.MarkingNotFound, + "PrincipalNotFound": admin_errors.PrincipalNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def list( + self, + marking_id: core_models.MarkingId, + *, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.AsyncResourceIterator[admin_models.MarkingRoleAssignment]: + """ + List all principals who are assigned a role for the given Marking. Ignores the `pageSize` parameter. + + :param marking_id: + :type marking_id: MarkingId + :param page_size: The page size to use for the endpoint. + :type page_size: Optional[PageSize] + :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. + :type page_token: Optional[PageToken] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.AsyncResourceIterator[admin_models.MarkingRoleAssignment] + + :raises ListMarkingRoleAssignmentsPermissionDenied: The provided token does not have permission to list assigned roles for this marking. + :raises MarkingNotFound: The given Marking could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/admin/markings/{markingId}/roleAssignments", + query_params={ + "pageSize": page_size, + "pageToken": page_token, + }, + path_params={ + "markingId": marking_id, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=admin_models.ListMarkingRoleAssignmentsResponse, + request_timeout=request_timeout, + throwable_errors={ + "ListMarkingRoleAssignmentsPermissionDenied": admin_errors.ListMarkingRoleAssignmentsPermissionDenied, + "MarkingNotFound": admin_errors.MarkingNotFound, + }, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def remove( + self, + marking_id: core_models.MarkingId, + *, + role_assignments: typing.List[admin_models.MarkingRoleUpdate], + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[None]: + """ + + :param marking_id: + :type marking_id: MarkingId + :param role_assignments: + :type role_assignments: List[MarkingRoleUpdate] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[None] + + :raises GetMarkingPermissionDenied: The provided token does not have permission to view the marking. + :raises ListMarkingRoleAssignmentsPermissionDenied: The provided token does not have permission to list assigned roles for this marking. + :raises MarkingNotFound: The given Marking could not be found. + :raises PrincipalNotFound: A principal (User or Group) with the given PrincipalId could not be found + :raises RemoveMarkingMembersPermissionDenied: Could not remove the MarkingMember. + :raises RemoveMarkingRoleAssignmentsPermissionDenied: Could not remove the MarkingRoleAssignment. + :raises RemoveMarkingRoleAssignmentsRemoveAllAdministratorsNotAllowed: You cannot remove all administrators from a marking. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/admin/markings/{markingId}/roleAssignments/remove", + query_params={}, + path_params={ + "markingId": marking_id, + }, + header_params={ + "Content-Type": "application/json", + }, + body=admin_models.RemoveMarkingRoleAssignmentsRequest( + role_assignments=role_assignments, + ), + response_type=None, + request_timeout=request_timeout, + throwable_errors={ + "GetMarkingPermissionDenied": admin_errors.GetMarkingPermissionDenied, + "ListMarkingRoleAssignmentsPermissionDenied": admin_errors.ListMarkingRoleAssignmentsPermissionDenied, + "MarkingNotFound": admin_errors.MarkingNotFound, + "PrincipalNotFound": admin_errors.PrincipalNotFound, + "RemoveMarkingMembersPermissionDenied": admin_errors.RemoveMarkingMembersPermissionDenied, + "RemoveMarkingRoleAssignmentsPermissionDenied": admin_errors.RemoveMarkingRoleAssignmentsPermissionDenied, + "RemoveMarkingRoleAssignmentsRemoveAllAdministratorsNotAllowed": admin_errors.RemoveMarkingRoleAssignmentsRemoveAllAdministratorsNotAllowed, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _AsyncMarkingRoleAssignmentClientRaw: + def __init__(self, client: AsyncMarkingRoleAssignmentClient) -> None: + def add(_: None): ... + def list(_: admin_models.ListMarkingRoleAssignmentsResponse): ... + def remove(_: None): ... + + self.add = core.async_with_raw_response(add, client.add) + self.list = core.async_with_raw_response(list, client.list) + self.remove = core.async_with_raw_response(remove, client.remove) + + +class _AsyncMarkingRoleAssignmentClientStreaming: + def __init__(self, client: AsyncMarkingRoleAssignmentClient) -> None: + def list(_: admin_models.ListMarkingRoleAssignmentsResponse): ... + + self.list = core.async_with_streaming_response(list, client.list) diff --git a/foundry_sdk/v2/admin/models.py b/foundry_sdk/v2/admin/models.py new file mode 100644 index 000000000..5eb6ee1ab --- /dev/null +++ b/foundry_sdk/v2/admin/models.py @@ -0,0 +1,884 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk.v2.core import models as core_models + + +class AddEnrollmentRoleAssignmentsRequest(core.ModelBase): + """AddEnrollmentRoleAssignmentsRequest""" + + role_assignments: typing.List[core_models.RoleAssignmentUpdate] = pydantic.Field(alias=str("roleAssignments")) # type: ignore[literal-required] + + +class AddGroupMembersRequest(core.ModelBase): + """AddGroupMembersRequest""" + + principal_ids: typing.List[core_models.PrincipalId] = pydantic.Field(alias=str("principalIds")) # type: ignore[literal-required] + expiration: typing.Optional[GroupMembershipExpiration] = None + + +class AddMarkingMembersRequest(core.ModelBase): + """AddMarkingMembersRequest""" + + principal_ids: typing.List[core_models.PrincipalId] = pydantic.Field(alias=str("principalIds")) # type: ignore[literal-required] + + +class AddMarkingRoleAssignmentsRequest(core.ModelBase): + """AddMarkingRoleAssignmentsRequest""" + + role_assignments: typing.List[MarkingRoleUpdate] = pydantic.Field(alias=str("roleAssignments")) # type: ignore[literal-required] + + +class AddOrganizationRoleAssignmentsRequest(core.ModelBase): + """AddOrganizationRoleAssignmentsRequest""" + + role_assignments: typing.List[core_models.RoleAssignmentUpdate] = pydantic.Field(alias=str("roleAssignments")) # type: ignore[literal-required] + + +AttributeName = str +"""AttributeName""" + + +AttributeValue = str +"""AttributeValue""" + + +AttributeValues = typing.List["AttributeValue"] +"""AttributeValues""" + + +AuthenticationProtocol = typing_extensions.Annotated[ + typing.Union["SamlAuthenticationProtocol", "OidcAuthenticationProtocol"], + pydantic.Field(discriminator="type"), +] +"""AuthenticationProtocol""" + + +class AuthenticationProvider(core.ModelBase): + """AuthenticationProvider""" + + rid: AuthenticationProviderRid + name: AuthenticationProviderName + realm: core_models.Realm + enabled: AuthenticationProviderEnabled + """Whether users can log in using this provider.""" + + supported_hosts: typing.List[HostName] = pydantic.Field(alias=str("supportedHosts")) # type: ignore[literal-required] + """This provider can only be utilized from these hosts.""" + + supported_username_patterns: typing.List[str] = pydantic.Field(alias=str("supportedUsernamePatterns")) # type: ignore[literal-required] + """Users who enter usernames that match these patterns will be redirected to this authentication provider.""" + + protocol: AuthenticationProtocol + + +AuthenticationProviderEnabled = bool +"""Whether users can log in using this provider.""" + + +AuthenticationProviderName = str +"""AuthenticationProviderName""" + + +AuthenticationProviderRid = core.RID +"""AuthenticationProviderRid""" + + +class CertificateInfo(core.ModelBase): + """CertificateInfo""" + + pem_certificate: str = pydantic.Field(alias=str("pemCertificate")) # type: ignore[literal-required] + """The certificate, in PEM format.""" + + common_name: typing.Optional[str] = pydantic.Field(alias=str("commonName"), default=None) # type: ignore[literal-required] + expiry_date: core.AwareDatetime = pydantic.Field(alias=str("expiryDate")) # type: ignore[literal-required] + usage_type: CertificateUsageType = pydantic.Field(alias=str("usageType")) # type: ignore[literal-required] + + +CertificateUsageType = typing.Literal["ENCRYPTION", "SIGNING", "UNSPECIFIED"] +"""CertificateUsageType""" + + +class CreateGroupRequest(core.ModelBase): + """CreateGroupRequest""" + + name: GroupName + """The name of the Group.""" + + organizations: typing.List[core_models.OrganizationRid] + """The RIDs of the Organizations whose members can see this group. At least one Organization RID must be listed.""" + + description: typing.Optional[str] = None + """A description of the Group.""" + + attributes: typing.Dict[AttributeName, AttributeValues] + """A map of the Group's attributes. Attributes prefixed with "multipass:" are reserved for internal use by Foundry and are subject to change.""" + + +class CreateMarkingRequest(core.ModelBase): + """CreateMarkingRequest""" + + initial_role_assignments: typing.List[MarkingRoleUpdate] = pydantic.Field(alias=str("initialRoleAssignments")) # type: ignore[literal-required] + """ + The initial roles that will be assigned when the Marking is created. At least one ADMIN role must be + provided. This can be changed later through the MarkingRoleAssignment operations. + + WARNING: If you do not include your own principal ID or the ID of a Group that you are a member of, + you will create a Marking that you cannot administer. + """ + + initial_members: typing.List[core_models.PrincipalId] = pydantic.Field(alias=str("initialMembers")) # type: ignore[literal-required] + """Users and Groups that will be able to view resources protected by this Marking. This can be changed later through the MarkingMember operations.""" + + name: MarkingName + description: typing.Optional[str] = None + category_id: MarkingCategoryId = pydantic.Field(alias=str("categoryId")) # type: ignore[literal-required] + + +class CreateOrganizationRequest(core.ModelBase): + """CreateOrganizationRequest""" + + administrators: typing.List[core_models.PrincipalId] + """The initial administrators of the Organization. At least one principal must be provided.""" + + enrollment_rid: core_models.EnrollmentRid = pydantic.Field(alias=str("enrollmentRid")) # type: ignore[literal-required] + """The RID of the Enrollment that this Organization belongs to. This must be provided.""" + + name: OrganizationName + host: typing.Optional[HostName] = None + """ + The primary host name of the Organization. This should be used when constructing URLs for users of this + Organization. + """ + + description: typing.Optional[str] = None + + +class Enrollment(core.ModelBase): + """Enrollment""" + + rid: core_models.EnrollmentRid + name: EnrollmentName + created_time: typing.Optional[core_models.CreatedTime] = pydantic.Field(alias=str("createdTime"), default=None) # type: ignore[literal-required] + + +EnrollmentName = str +"""EnrollmentName""" + + +class EnrollmentRoleAssignment(core.ModelBase): + """EnrollmentRoleAssignment""" + + principal_type: core_models.PrincipalType = pydantic.Field(alias=str("principalType")) # type: ignore[literal-required] + principal_id: core_models.PrincipalId = pydantic.Field(alias=str("principalId")) # type: ignore[literal-required] + role_id: core_models.RoleId = pydantic.Field(alias=str("roleId")) # type: ignore[literal-required] + + +class GetGroupsBatchRequestElement(core.ModelBase): + """GetGroupsBatchRequestElement""" + + group_id: core_models.GroupId = pydantic.Field(alias=str("groupId")) # type: ignore[literal-required] + + +class GetGroupsBatchResponse(core.ModelBase): + """GetGroupsBatchResponse""" + + data: typing.Dict[core_models.GroupId, Group] + + +class GetMarkingsBatchRequestElement(core.ModelBase): + """GetMarkingsBatchRequestElement""" + + marking_id: core_models.MarkingId = pydantic.Field(alias=str("markingId")) # type: ignore[literal-required] + + +class GetMarkingsBatchResponse(core.ModelBase): + """GetMarkingsBatchResponse""" + + data: typing.Dict[core_models.MarkingId, Marking] + + +class GetRolesBatchRequestElement(core.ModelBase): + """GetRolesBatchRequestElement""" + + role_id: core_models.RoleId = pydantic.Field(alias=str("roleId")) # type: ignore[literal-required] + + +class GetRolesBatchResponse(core.ModelBase): + """GetRolesBatchResponse""" + + data: typing.Dict[core_models.RoleId, Role] + + +class GetUserMarkingsResponse(core.ModelBase): + """GetUserMarkingsResponse""" + + view: typing.List[core_models.MarkingId] + """ + The markings that the user has access to. The user will be able to access resources protected with these + markings. This includes organization markings for organizations in which the user is a guest member. + """ + + +class GetUsersBatchRequestElement(core.ModelBase): + """GetUsersBatchRequestElement""" + + user_id: core_models.UserId = pydantic.Field(alias=str("userId")) # type: ignore[literal-required] + status: typing.Optional[core_models.UserStatus] = None + + +class GetUsersBatchResponse(core.ModelBase): + """GetUsersBatchResponse""" + + data: typing.Dict[core_models.UserId, User] + + +class Group(core.ModelBase): + """Group""" + + id: core_models.GroupId + name: GroupName + """The name of the Group.""" + + description: typing.Optional[str] = None + """A description of the Group.""" + + realm: core_models.Realm + organizations: typing.List[core_models.OrganizationRid] + """The RIDs of the Organizations whose members can see this group. At least one Organization RID must be listed.""" + + attributes: typing.Dict[AttributeName, AttributeValues] + """A map of the Group's attributes. Attributes prefixed with "multipass:" are reserved for internal use by Foundry and are subject to change.""" + + +class GroupMember(core.ModelBase): + """GroupMember""" + + principal_type: core_models.PrincipalType = pydantic.Field(alias=str("principalType")) # type: ignore[literal-required] + principal_id: core_models.PrincipalId = pydantic.Field(alias=str("principalId")) # type: ignore[literal-required] + + +class GroupMembership(core.ModelBase): + """GroupMembership""" + + group_id: core_models.GroupId = pydantic.Field(alias=str("groupId")) # type: ignore[literal-required] + + +GroupMembershipExpiration = core.AwareDatetime +"""GroupMembershipExpiration""" + + +class GroupMembershipExpirationPolicy(core.ModelBase): + """GroupMembershipExpirationPolicy""" + + maximum_value: typing.Optional[GroupMembershipExpiration] = pydantic.Field(alias=str("maximumValue"), default=None) # type: ignore[literal-required] + """Members in this group must be added with expiration times that occur before this value.""" + + maximum_duration: typing.Optional[core_models.DurationSeconds] = pydantic.Field(alias=str("maximumDuration"), default=None) # type: ignore[literal-required] + """Members in this group must be added with expirations that are less than this duration in seconds into the future from the time they are added.""" + + +GroupName = str +"""The name of the Group.""" + + +class GroupProviderInfo(core.ModelBase): + """GroupProviderInfo""" + + provider_id: ProviderId = pydantic.Field(alias=str("providerId")) # type: ignore[literal-required] + """ + The ID of the Group in the external authentication provider. This value is determined by the authentication provider. + At most one Group can have a given provider ID in a given Realm. + """ + + +class GroupSearchFilter(core.ModelBase): + """GroupSearchFilter""" + + type: PrincipalFilterType + value: str + + +class Host(core.ModelBase): + """Host""" + + host_name: HostName = pydantic.Field(alias=str("hostName")) # type: ignore[literal-required] + + +HostName = str +"""HostName""" + + +class ListAuthenticationProvidersResponse(core.ModelBase): + """ListAuthenticationProvidersResponse""" + + data: typing.List[AuthenticationProvider] + next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] + + +class ListAvailableOrganizationRolesResponse(core.ModelBase): + """ListAvailableOrganizationRolesResponse""" + + data: typing.List[core_models.Role] + + +class ListEnrollmentRoleAssignmentsResponse(core.ModelBase): + """ListEnrollmentRoleAssignmentsResponse""" + + data: typing.List[EnrollmentRoleAssignment] + next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] + + +class ListGroupMembersResponse(core.ModelBase): + """ListGroupMembersResponse""" + + data: typing.List[GroupMember] + next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] + + +class ListGroupMembershipsResponse(core.ModelBase): + """ListGroupMembershipsResponse""" + + data: typing.List[GroupMembership] + next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] + + +class ListGroupsResponse(core.ModelBase): + """ListGroupsResponse""" + + data: typing.List[Group] + next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] + + +class ListHostsResponse(core.ModelBase): + """ListHostsResponse""" + + data: typing.List[Host] + next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] + + +class ListMarkingCategoriesResponse(core.ModelBase): + """ListMarkingCategoriesResponse""" + + data: typing.List[MarkingCategory] + next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] + + +class ListMarkingMembersResponse(core.ModelBase): + """ListMarkingMembersResponse""" + + data: typing.List[MarkingMember] + next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] + + +class ListMarkingRoleAssignmentsResponse(core.ModelBase): + """ListMarkingRoleAssignmentsResponse""" + + data: typing.List[MarkingRoleAssignment] + next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] + + +class ListMarkingsResponse(core.ModelBase): + """ListMarkingsResponse""" + + data: typing.List[Marking] + next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] + + +class ListOrganizationRoleAssignmentsResponse(core.ModelBase): + """ListOrganizationRoleAssignmentsResponse""" + + data: typing.List[OrganizationRoleAssignment] + next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] + + +class ListUsersResponse(core.ModelBase): + """ListUsersResponse""" + + data: typing.List[User] + next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] + + +class Marking(core.ModelBase): + """Marking""" + + id: core_models.MarkingId + category_id: MarkingCategoryId = pydantic.Field(alias=str("categoryId")) # type: ignore[literal-required] + name: MarkingName + description: typing.Optional[str] = None + organization: typing.Optional[core_models.OrganizationRid] = None + """If this marking is associated with an Organization, its RID will be populated here.""" + + created_time: core_models.CreatedTime = pydantic.Field(alias=str("createdTime")) # type: ignore[literal-required] + created_by: typing.Optional[core_models.CreatedBy] = pydantic.Field(alias=str("createdBy"), default=None) # type: ignore[literal-required] + + +class MarkingCategory(core.ModelBase): + """MarkingCategory""" + + id: MarkingCategoryId + name: MarkingCategoryName + description: typing.Optional[str] = None + category_type: MarkingCategoryType = pydantic.Field(alias=str("categoryType")) # type: ignore[literal-required] + marking_type: MarkingType = pydantic.Field(alias=str("markingType")) # type: ignore[literal-required] + markings: typing.List[core_models.MarkingId] + created_time: core_models.CreatedTime = pydantic.Field(alias=str("createdTime")) # type: ignore[literal-required] + created_by: typing.Optional[core_models.CreatedBy] = pydantic.Field(alias=str("createdBy"), default=None) # type: ignore[literal-required] + + +MarkingCategoryId = str +""" +The ID of a marking category. For user-created categories, this will be a UUID. Markings associated with +Organizations are placed in a category with ID "Organization". +""" + + +MarkingCategoryName = str +"""MarkingCategoryName""" + + +MarkingCategoryType = typing.Literal["CONJUNCTIVE", "DISJUNCTIVE"] +"""MarkingCategoryType""" + + +class MarkingMember(core.ModelBase): + """MarkingMember""" + + principal_type: core_models.PrincipalType = pydantic.Field(alias=str("principalType")) # type: ignore[literal-required] + principal_id: core_models.PrincipalId = pydantic.Field(alias=str("principalId")) # type: ignore[literal-required] + + +MarkingName = str +"""MarkingName""" + + +MarkingRole = typing.Literal["ADMINISTER", "DECLASSIFY", "USE"] +""" +Represents the operations that a user can perform with regards to a Marking. + * ADMINISTER: The user can add and remove members from the Marking, update Marking Role Assignments, and change Marking metadata. + * DECLASSIFY: The user can remove the Marking from resources in the platform and stop the propagation of the Marking during a transform. + * USE: The user can apply the marking to resources in the platform. +""" + + +class MarkingRoleAssignment(core.ModelBase): + """MarkingRoleAssignment""" + + principal_type: core_models.PrincipalType = pydantic.Field(alias=str("principalType")) # type: ignore[literal-required] + principal_id: core_models.PrincipalId = pydantic.Field(alias=str("principalId")) # type: ignore[literal-required] + role: MarkingRole + + +class MarkingRoleUpdate(core.ModelBase): + """MarkingRoleUpdate""" + + role: MarkingRole + principal_id: core_models.PrincipalId = pydantic.Field(alias=str("principalId")) # type: ignore[literal-required] + + +MarkingType = typing.Literal["MANDATORY", "CBAC"] +"""MarkingType""" + + +class OidcAuthenticationProtocol(core.ModelBase): + """OidcAuthenticationProtocol""" + + type: typing.Literal["oidc"] = "oidc" + + +class Organization(core.ModelBase): + """Organization""" + + rid: core_models.OrganizationRid + name: OrganizationName + description: typing.Optional[str] = None + marking_id: core_models.MarkingId = pydantic.Field(alias=str("markingId")) # type: ignore[literal-required] + """ + The ID of this Organization's underlying marking. Organization guest access can be managed + by updating the membership of this Marking. + """ + + host: typing.Optional[HostName] = None + """ + The primary host name of the Organization. This should be used when constructing URLs for users of this + Organization. + """ + + +OrganizationName = str +"""OrganizationName""" + + +class OrganizationRoleAssignment(core.ModelBase): + """OrganizationRoleAssignment""" + + principal_type: core_models.PrincipalType = pydantic.Field(alias=str("principalType")) # type: ignore[literal-required] + principal_id: core_models.PrincipalId = pydantic.Field(alias=str("principalId")) # type: ignore[literal-required] + role_id: core_models.RoleId = pydantic.Field(alias=str("roleId")) # type: ignore[literal-required] + + +class PreregisterGroupRequest(core.ModelBase): + """PreregisterGroupRequest""" + + name: GroupName + organizations: typing.List[core_models.OrganizationRid] + """The RIDs of the Organizations that can view this group.""" + + +class PreregisterUserRequest(core.ModelBase): + """PreregisterUserRequest""" + + username: UserUsername + """The new user's username. This must match one of the provider's supported username patterns.""" + + organization: core_models.OrganizationRid + """ + The RID of the user's primary Organization. This may be changed when the user logs in for the first + time depending on any configured Organization assignment rules. + """ + + given_name: typing.Optional[str] = pydantic.Field(alias=str("givenName"), default=None) # type: ignore[literal-required] + family_name: typing.Optional[str] = pydantic.Field(alias=str("familyName"), default=None) # type: ignore[literal-required] + email: typing.Optional[str] = None + attributes: typing.Optional[typing.Dict[AttributeName, AttributeValues]] = None + + +PrincipalFilterType = typing.Literal["queryString"] +"""PrincipalFilterType""" + + +ProviderId = str +"""A value that uniquely identifies a User or Group in an external authentication provider. This value is determined by the external authentication provider and must be unique per Realm.""" + + +class RemoveEnrollmentRoleAssignmentsRequest(core.ModelBase): + """RemoveEnrollmentRoleAssignmentsRequest""" + + role_assignments: typing.List[core_models.RoleAssignmentUpdate] = pydantic.Field(alias=str("roleAssignments")) # type: ignore[literal-required] + + +class RemoveGroupMembersRequest(core.ModelBase): + """RemoveGroupMembersRequest""" + + principal_ids: typing.List[core_models.PrincipalId] = pydantic.Field(alias=str("principalIds")) # type: ignore[literal-required] + + +class RemoveMarkingMembersRequest(core.ModelBase): + """RemoveMarkingMembersRequest""" + + principal_ids: typing.List[core_models.PrincipalId] = pydantic.Field(alias=str("principalIds")) # type: ignore[literal-required] + + +class RemoveMarkingRoleAssignmentsRequest(core.ModelBase): + """RemoveMarkingRoleAssignmentsRequest""" + + role_assignments: typing.List[MarkingRoleUpdate] = pydantic.Field(alias=str("roleAssignments")) # type: ignore[literal-required] + + +class RemoveOrganizationRoleAssignmentsRequest(core.ModelBase): + """RemoveOrganizationRoleAssignmentsRequest""" + + role_assignments: typing.List[core_models.RoleAssignmentUpdate] = pydantic.Field(alias=str("roleAssignments")) # type: ignore[literal-required] + + +class ReplaceGroupMembershipExpirationPolicyRequest(core.ModelBase): + """ReplaceGroupMembershipExpirationPolicyRequest""" + + maximum_duration: typing.Optional[core_models.DurationSeconds] = pydantic.Field(alias=str("maximumDuration"), default=None) # type: ignore[literal-required] + """Members in this group must be added with expirations that are less than this duration in seconds into the future from the time they are added.""" + + maximum_value: typing.Optional[GroupMembershipExpiration] = pydantic.Field(alias=str("maximumValue"), default=None) # type: ignore[literal-required] + """Members in this group must be added with expiration times that occur before this value.""" + + +class ReplaceGroupProviderInfoRequest(core.ModelBase): + """ReplaceGroupProviderInfoRequest""" + + provider_id: ProviderId = pydantic.Field(alias=str("providerId")) # type: ignore[literal-required] + """ + The ID of the Group in the external authentication provider. This value is determined by the authentication provider. + At most one Group can have a given provider ID in a given Realm. + """ + + +class ReplaceMarkingRequest(core.ModelBase): + """ReplaceMarkingRequest""" + + name: MarkingName + description: typing.Optional[str] = None + + +class ReplaceOrganizationRequest(core.ModelBase): + """ReplaceOrganizationRequest""" + + name: OrganizationName + host: typing.Optional[HostName] = None + """ + The primary host name of the Organization. This should be used when constructing URLs for users of this + Organization. + """ + + description: typing.Optional[str] = None + + +class ReplaceUserProviderInfoRequest(core.ModelBase): + """ReplaceUserProviderInfoRequest""" + + provider_id: ProviderId = pydantic.Field(alias=str("providerId")) # type: ignore[literal-required] + """ + The ID of the User in the external authentication provider. This value is determined by the authentication provider. + At most one User can have a given provider ID in a given Realm. + """ + + +class Role(core.ModelBase): + """Role""" + + id: core_models.RoleId + display_name: RoleDisplayName = pydantic.Field(alias=str("displayName")) # type: ignore[literal-required] + description: RoleDescription + operations: typing.List[str] + """A list of permissions that this role has.""" + + can_assigns: typing.List[core_models.RoleId] = pydantic.Field(alias=str("canAssigns")) # type: ignore[literal-required] + """A list of roles that this role inherits.""" + + +RoleDescription = str +"""RoleDescription""" + + +RoleDisplayName = str +"""RoleDisplayName""" + + +class SamlAuthenticationProtocol(core.ModelBase): + """SamlAuthenticationProtocol""" + + service_provider_metadata: SamlServiceProviderMetadata = pydantic.Field(alias=str("serviceProviderMetadata")) # type: ignore[literal-required] + type: typing.Literal["saml"] = "saml" + + +class SamlServiceProviderMetadata(core.ModelBase): + """Information that describes a Foundry Authentication Provider as a SAML service provider. All information listed here is generated by Foundry.""" + + entity_id: str = pydantic.Field(alias=str("entityId")) # type: ignore[literal-required] + """The static SAML entity ID that represents this service provider.""" + + metadata_url: str = pydantic.Field(alias=str("metadataUrl")) # type: ignore[literal-required] + """A public URL from which this service provider metadata can be downloaded as XML.""" + + acs_urls: typing.List[str] = pydantic.Field(alias=str("acsUrls")) # type: ignore[literal-required] + """ + The Assertion Consumer Service (ACS) URLs for this service provider, to which the SAML identity provider + redirects authentication responses. + """ + + logout_urls: typing.List[str] = pydantic.Field(alias=str("logoutUrls")) # type: ignore[literal-required] + """The URLs for this service provider to which the SAML identity provider sends logout requests.""" + + certificates: typing.List[CertificateInfo] + + +class SearchGroupsRequest(core.ModelBase): + """SearchGroupsRequest""" + + where: GroupSearchFilter + page_size: typing.Optional[core_models.PageSize] = pydantic.Field(alias=str("pageSize"), default=None) # type: ignore[literal-required] + page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("pageToken"), default=None) # type: ignore[literal-required] + + +class SearchGroupsResponse(core.ModelBase): + """SearchGroupsResponse""" + + data: typing.List[Group] + next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] + + +class SearchUsersRequest(core.ModelBase): + """SearchUsersRequest""" + + where: UserSearchFilter + page_size: typing.Optional[core_models.PageSize] = pydantic.Field(alias=str("pageSize"), default=None) # type: ignore[literal-required] + page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("pageToken"), default=None) # type: ignore[literal-required] + + +class SearchUsersResponse(core.ModelBase): + """SearchUsersResponse""" + + data: typing.List[User] + next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] + + +class User(core.ModelBase): + """User""" + + id: core_models.UserId + username: UserUsername + """The Foundry username of the User. This is unique within the realm.""" + + given_name: typing.Optional[str] = pydantic.Field(alias=str("givenName"), default=None) # type: ignore[literal-required] + """The given name of the User.""" + + family_name: typing.Optional[str] = pydantic.Field(alias=str("familyName"), default=None) # type: ignore[literal-required] + """The family name (last name) of the User.""" + + email: typing.Optional[str] = None + """The email at which to contact a User. Multiple users may have the same email address.""" + + realm: core_models.Realm + organization: typing.Optional[core_models.OrganizationRid] = None + """The RID of the user's primary Organization. This will be blank for third-party application service users.""" + + status: core_models.UserStatus + """The current status of the user.""" + + attributes: typing.Dict[AttributeName, AttributeValues] + """ + A map of the User's attributes. Attributes prefixed with "multipass:" are reserved for internal use by + Foundry and are subject to change. Additional attributes may be configured by Foundry administrators in + Control Panel and populated by the User's SSO provider upon login. + """ + + +class UserProviderInfo(core.ModelBase): + """UserProviderInfo""" + + provider_id: ProviderId = pydantic.Field(alias=str("providerId")) # type: ignore[literal-required] + """ + The ID of the User in the external authentication provider. This value is determined by the authentication provider. + At most one User can have a given provider ID in a given Realm. + """ + + +class UserSearchFilter(core.ModelBase): + """UserSearchFilter""" + + type: PrincipalFilterType + value: str + + +UserUsername = str +"""The Foundry username of the User. This is unique within the realm.""" + + +core.resolve_forward_references(AttributeValues, globalns=globals(), localns=locals()) +core.resolve_forward_references(AuthenticationProtocol, globalns=globals(), localns=locals()) + +__all__ = [ + "AddEnrollmentRoleAssignmentsRequest", + "AddGroupMembersRequest", + "AddMarkingMembersRequest", + "AddMarkingRoleAssignmentsRequest", + "AddOrganizationRoleAssignmentsRequest", + "AttributeName", + "AttributeValue", + "AttributeValues", + "AuthenticationProtocol", + "AuthenticationProvider", + "AuthenticationProviderEnabled", + "AuthenticationProviderName", + "AuthenticationProviderRid", + "CertificateInfo", + "CertificateUsageType", + "CreateGroupRequest", + "CreateMarkingRequest", + "CreateOrganizationRequest", + "Enrollment", + "EnrollmentName", + "EnrollmentRoleAssignment", + "GetGroupsBatchRequestElement", + "GetGroupsBatchResponse", + "GetMarkingsBatchRequestElement", + "GetMarkingsBatchResponse", + "GetRolesBatchRequestElement", + "GetRolesBatchResponse", + "GetUserMarkingsResponse", + "GetUsersBatchRequestElement", + "GetUsersBatchResponse", + "Group", + "GroupMember", + "GroupMembership", + "GroupMembershipExpiration", + "GroupMembershipExpirationPolicy", + "GroupName", + "GroupProviderInfo", + "GroupSearchFilter", + "Host", + "HostName", + "ListAuthenticationProvidersResponse", + "ListAvailableOrganizationRolesResponse", + "ListEnrollmentRoleAssignmentsResponse", + "ListGroupMembersResponse", + "ListGroupMembershipsResponse", + "ListGroupsResponse", + "ListHostsResponse", + "ListMarkingCategoriesResponse", + "ListMarkingMembersResponse", + "ListMarkingRoleAssignmentsResponse", + "ListMarkingsResponse", + "ListOrganizationRoleAssignmentsResponse", + "ListUsersResponse", + "Marking", + "MarkingCategory", + "MarkingCategoryId", + "MarkingCategoryName", + "MarkingCategoryType", + "MarkingMember", + "MarkingName", + "MarkingRole", + "MarkingRoleAssignment", + "MarkingRoleUpdate", + "MarkingType", + "OidcAuthenticationProtocol", + "Organization", + "OrganizationName", + "OrganizationRoleAssignment", + "PreregisterGroupRequest", + "PreregisterUserRequest", + "PrincipalFilterType", + "ProviderId", + "RemoveEnrollmentRoleAssignmentsRequest", + "RemoveGroupMembersRequest", + "RemoveMarkingMembersRequest", + "RemoveMarkingRoleAssignmentsRequest", + "RemoveOrganizationRoleAssignmentsRequest", + "ReplaceGroupMembershipExpirationPolicyRequest", + "ReplaceGroupProviderInfoRequest", + "ReplaceMarkingRequest", + "ReplaceOrganizationRequest", + "ReplaceUserProviderInfoRequest", + "Role", + "RoleDescription", + "RoleDisplayName", + "SamlAuthenticationProtocol", + "SamlServiceProviderMetadata", + "SearchGroupsRequest", + "SearchGroupsResponse", + "SearchUsersRequest", + "SearchUsersResponse", + "User", + "UserProviderInfo", + "UserSearchFilter", + "UserUsername", +] diff --git a/foundry_sdk/v2/admin/organization.py b/foundry_sdk/v2/admin/organization.py new file mode 100644 index 000000000..ba4e826d5 --- /dev/null +++ b/foundry_sdk/v2/admin/organization.py @@ -0,0 +1,642 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing +from functools import cached_property + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v2.admin import errors as admin_errors +from foundry_sdk.v2.admin import models as admin_models +from foundry_sdk.v2.core import models as core_models + + +class OrganizationClient: + """ + The API client for the Organization Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _OrganizationClientStreaming(self) + self.with_raw_response = _OrganizationClientRaw(self) + + @cached_property + def OrganizationRoleAssignment(self): + from foundry_sdk.v2.admin.organization_role_assignment import ( + OrganizationRoleAssignmentClient, + ) # NOQA + + return OrganizationRoleAssignmentClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def create( + self, + *, + administrators: typing.List[core_models.PrincipalId], + enrollment_rid: core_models.EnrollmentRid, + name: admin_models.OrganizationName, + description: typing.Optional[str] = None, + host: typing.Optional[admin_models.HostName] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> admin_models.Organization: + """ + Creates a new Organization. + :param administrators: The initial administrators of the Organization. At least one principal must be provided. + :type administrators: List[PrincipalId] + :param enrollment_rid: The RID of the Enrollment that this Organization belongs to. This must be provided. + :type enrollment_rid: EnrollmentRid + :param name: + :type name: OrganizationName + :param description: + :type description: Optional[str] + :param host: The primary host name of the Organization. This should be used when constructing URLs for users of this Organization. + :type host: Optional[HostName] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: admin_models.Organization + + :raises CreateOrganizationMissingInitialAdminRole: At least one organization:administrator role grant must be provided when creating a organization. + :raises CreateOrganizationPermissionDenied: Could not create the Organization. + :raises EnrollmentNotFound: The given Enrollment could not be found. + :raises OrganizationNameAlreadyExists: An organization with the same name already exists. + :raises OrganizationNotFound: The given Organization could not be found. + :raises PrincipalNotFound: A principal (User or Group) with the given PrincipalId could not be found + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/admin/organizations", + query_params={ + "preview": preview, + }, + path_params={}, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=admin_models.CreateOrganizationRequest( + administrators=administrators, + enrollment_rid=enrollment_rid, + name=name, + host=host, + description=description, + ), + response_type=admin_models.Organization, + request_timeout=request_timeout, + throwable_errors={ + "CreateOrganizationMissingInitialAdminRole": admin_errors.CreateOrganizationMissingInitialAdminRole, + "CreateOrganizationPermissionDenied": admin_errors.CreateOrganizationPermissionDenied, + "EnrollmentNotFound": admin_errors.EnrollmentNotFound, + "OrganizationNameAlreadyExists": admin_errors.OrganizationNameAlreadyExists, + "OrganizationNotFound": admin_errors.OrganizationNotFound, + "PrincipalNotFound": admin_errors.PrincipalNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + organization_rid: core_models.OrganizationRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> admin_models.Organization: + """ + Get the Organization with the specified rid. + :param organization_rid: + :type organization_rid: OrganizationRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: admin_models.Organization + + :raises OrganizationNotFound: The given Organization could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/admin/organizations/{organizationRid}", + query_params={ + "preview": preview, + }, + path_params={ + "organizationRid": organization_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=admin_models.Organization, + request_timeout=request_timeout, + throwable_errors={ + "OrganizationNotFound": admin_errors.OrganizationNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def list_available_roles( + self, + organization_rid: core_models.OrganizationRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> admin_models.ListAvailableOrganizationRolesResponse: + """ + List all roles that can be assigned to a principal for the given Organization. + + :param organization_rid: + :type organization_rid: OrganizationRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: admin_models.ListAvailableOrganizationRolesResponse + + :raises ListAvailableRolesOrganizationPermissionDenied: Could not listAvailableRoles the Organization. + :raises OrganizationNotFound: The given Organization could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/admin/organizations/{organizationRid}/listAvailableRoles", + query_params={ + "preview": preview, + }, + path_params={ + "organizationRid": organization_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=admin_models.ListAvailableOrganizationRolesResponse, + request_timeout=request_timeout, + throwable_errors={ + "ListAvailableRolesOrganizationPermissionDenied": admin_errors.ListAvailableRolesOrganizationPermissionDenied, + "OrganizationNotFound": admin_errors.OrganizationNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def replace( + self, + organization_rid: core_models.OrganizationRid, + *, + name: admin_models.OrganizationName, + description: typing.Optional[str] = None, + host: typing.Optional[admin_models.HostName] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> admin_models.Organization: + """ + Replace the Organization with the specified rid. + :param organization_rid: + :type organization_rid: OrganizationRid + :param name: + :type name: OrganizationName + :param description: + :type description: Optional[str] + :param host: The primary host name of the Organization. This should be used when constructing URLs for users of this Organization. + :type host: Optional[HostName] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: admin_models.Organization + + :raises InvalidHostName: The provided hostname must be a valid domain name. The only allowed characters are letters, numbers, periods, and hyphens. + :raises OrganizationNameAlreadyExists: An organization with the same name already exists. + :raises OrganizationNotFound: The given Organization could not be found. + :raises ReplaceOrganizationPermissionDenied: Could not replace the Organization. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="PUT", + resource_path="/v2/admin/organizations/{organizationRid}", + query_params={ + "preview": preview, + }, + path_params={ + "organizationRid": organization_rid, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=admin_models.ReplaceOrganizationRequest( + name=name, + host=host, + description=description, + ), + response_type=admin_models.Organization, + request_timeout=request_timeout, + throwable_errors={ + "InvalidHostName": admin_errors.InvalidHostName, + "OrganizationNameAlreadyExists": admin_errors.OrganizationNameAlreadyExists, + "OrganizationNotFound": admin_errors.OrganizationNotFound, + "ReplaceOrganizationPermissionDenied": admin_errors.ReplaceOrganizationPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _OrganizationClientRaw: + def __init__(self, client: OrganizationClient) -> None: + def create(_: admin_models.Organization): ... + def get(_: admin_models.Organization): ... + def list_available_roles(_: admin_models.ListAvailableOrganizationRolesResponse): ... + def replace(_: admin_models.Organization): ... + + self.create = core.with_raw_response(create, client.create) + self.get = core.with_raw_response(get, client.get) + self.list_available_roles = core.with_raw_response( + list_available_roles, client.list_available_roles + ) + self.replace = core.with_raw_response(replace, client.replace) + + +class _OrganizationClientStreaming: + def __init__(self, client: OrganizationClient) -> None: + def create(_: admin_models.Organization): ... + def get(_: admin_models.Organization): ... + def list_available_roles(_: admin_models.ListAvailableOrganizationRolesResponse): ... + def replace(_: admin_models.Organization): ... + + self.create = core.with_streaming_response(create, client.create) + self.get = core.with_streaming_response(get, client.get) + self.list_available_roles = core.with_streaming_response( + list_available_roles, client.list_available_roles + ) + self.replace = core.with_streaming_response(replace, client.replace) + + +class AsyncOrganizationClient: + """ + The API client for the Organization Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncOrganizationClientStreaming(self) + self.with_raw_response = _AsyncOrganizationClientRaw(self) + + @cached_property + def OrganizationRoleAssignment(self): + from foundry_sdk.v2.admin.organization_role_assignment import ( + AsyncOrganizationRoleAssignmentClient, + ) # NOQA + + return AsyncOrganizationRoleAssignmentClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def create( + self, + *, + administrators: typing.List[core_models.PrincipalId], + enrollment_rid: core_models.EnrollmentRid, + name: admin_models.OrganizationName, + description: typing.Optional[str] = None, + host: typing.Optional[admin_models.HostName] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[admin_models.Organization]: + """ + Creates a new Organization. + :param administrators: The initial administrators of the Organization. At least one principal must be provided. + :type administrators: List[PrincipalId] + :param enrollment_rid: The RID of the Enrollment that this Organization belongs to. This must be provided. + :type enrollment_rid: EnrollmentRid + :param name: + :type name: OrganizationName + :param description: + :type description: Optional[str] + :param host: The primary host name of the Organization. This should be used when constructing URLs for users of this Organization. + :type host: Optional[HostName] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[admin_models.Organization] + + :raises CreateOrganizationMissingInitialAdminRole: At least one organization:administrator role grant must be provided when creating a organization. + :raises CreateOrganizationPermissionDenied: Could not create the Organization. + :raises EnrollmentNotFound: The given Enrollment could not be found. + :raises OrganizationNameAlreadyExists: An organization with the same name already exists. + :raises OrganizationNotFound: The given Organization could not be found. + :raises PrincipalNotFound: A principal (User or Group) with the given PrincipalId could not be found + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/admin/organizations", + query_params={ + "preview": preview, + }, + path_params={}, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=admin_models.CreateOrganizationRequest( + administrators=administrators, + enrollment_rid=enrollment_rid, + name=name, + host=host, + description=description, + ), + response_type=admin_models.Organization, + request_timeout=request_timeout, + throwable_errors={ + "CreateOrganizationMissingInitialAdminRole": admin_errors.CreateOrganizationMissingInitialAdminRole, + "CreateOrganizationPermissionDenied": admin_errors.CreateOrganizationPermissionDenied, + "EnrollmentNotFound": admin_errors.EnrollmentNotFound, + "OrganizationNameAlreadyExists": admin_errors.OrganizationNameAlreadyExists, + "OrganizationNotFound": admin_errors.OrganizationNotFound, + "PrincipalNotFound": admin_errors.PrincipalNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + organization_rid: core_models.OrganizationRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[admin_models.Organization]: + """ + Get the Organization with the specified rid. + :param organization_rid: + :type organization_rid: OrganizationRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[admin_models.Organization] + + :raises OrganizationNotFound: The given Organization could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/admin/organizations/{organizationRid}", + query_params={ + "preview": preview, + }, + path_params={ + "organizationRid": organization_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=admin_models.Organization, + request_timeout=request_timeout, + throwable_errors={ + "OrganizationNotFound": admin_errors.OrganizationNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def list_available_roles( + self, + organization_rid: core_models.OrganizationRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[admin_models.ListAvailableOrganizationRolesResponse]: + """ + List all roles that can be assigned to a principal for the given Organization. + + :param organization_rid: + :type organization_rid: OrganizationRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[admin_models.ListAvailableOrganizationRolesResponse] + + :raises ListAvailableRolesOrganizationPermissionDenied: Could not listAvailableRoles the Organization. + :raises OrganizationNotFound: The given Organization could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/admin/organizations/{organizationRid}/listAvailableRoles", + query_params={ + "preview": preview, + }, + path_params={ + "organizationRid": organization_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=admin_models.ListAvailableOrganizationRolesResponse, + request_timeout=request_timeout, + throwable_errors={ + "ListAvailableRolesOrganizationPermissionDenied": admin_errors.ListAvailableRolesOrganizationPermissionDenied, + "OrganizationNotFound": admin_errors.OrganizationNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def replace( + self, + organization_rid: core_models.OrganizationRid, + *, + name: admin_models.OrganizationName, + description: typing.Optional[str] = None, + host: typing.Optional[admin_models.HostName] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[admin_models.Organization]: + """ + Replace the Organization with the specified rid. + :param organization_rid: + :type organization_rid: OrganizationRid + :param name: + :type name: OrganizationName + :param description: + :type description: Optional[str] + :param host: The primary host name of the Organization. This should be used when constructing URLs for users of this Organization. + :type host: Optional[HostName] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[admin_models.Organization] + + :raises InvalidHostName: The provided hostname must be a valid domain name. The only allowed characters are letters, numbers, periods, and hyphens. + :raises OrganizationNameAlreadyExists: An organization with the same name already exists. + :raises OrganizationNotFound: The given Organization could not be found. + :raises ReplaceOrganizationPermissionDenied: Could not replace the Organization. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="PUT", + resource_path="/v2/admin/organizations/{organizationRid}", + query_params={ + "preview": preview, + }, + path_params={ + "organizationRid": organization_rid, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=admin_models.ReplaceOrganizationRequest( + name=name, + host=host, + description=description, + ), + response_type=admin_models.Organization, + request_timeout=request_timeout, + throwable_errors={ + "InvalidHostName": admin_errors.InvalidHostName, + "OrganizationNameAlreadyExists": admin_errors.OrganizationNameAlreadyExists, + "OrganizationNotFound": admin_errors.OrganizationNotFound, + "ReplaceOrganizationPermissionDenied": admin_errors.ReplaceOrganizationPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _AsyncOrganizationClientRaw: + def __init__(self, client: AsyncOrganizationClient) -> None: + def create(_: admin_models.Organization): ... + def get(_: admin_models.Organization): ... + def list_available_roles(_: admin_models.ListAvailableOrganizationRolesResponse): ... + def replace(_: admin_models.Organization): ... + + self.create = core.async_with_raw_response(create, client.create) + self.get = core.async_with_raw_response(get, client.get) + self.list_available_roles = core.async_with_raw_response( + list_available_roles, client.list_available_roles + ) + self.replace = core.async_with_raw_response(replace, client.replace) + + +class _AsyncOrganizationClientStreaming: + def __init__(self, client: AsyncOrganizationClient) -> None: + def create(_: admin_models.Organization): ... + def get(_: admin_models.Organization): ... + def list_available_roles(_: admin_models.ListAvailableOrganizationRolesResponse): ... + def replace(_: admin_models.Organization): ... + + self.create = core.async_with_streaming_response(create, client.create) + self.get = core.async_with_streaming_response(get, client.get) + self.list_available_roles = core.async_with_streaming_response( + list_available_roles, client.list_available_roles + ) + self.replace = core.async_with_streaming_response(replace, client.replace) diff --git a/foundry_sdk/v2/admin/organization_role_assignment.py b/foundry_sdk/v2/admin/organization_role_assignment.py new file mode 100644 index 000000000..37f0cd0ec --- /dev/null +++ b/foundry_sdk/v2/admin/organization_role_assignment.py @@ -0,0 +1,443 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v2.admin import errors as admin_errors +from foundry_sdk.v2.admin import models as admin_models +from foundry_sdk.v2.core import models as core_models + + +class OrganizationRoleAssignmentClient: + """ + The API client for the OrganizationRoleAssignment Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _OrganizationRoleAssignmentClientStreaming(self) + self.with_raw_response = _OrganizationRoleAssignmentClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def add( + self, + organization_rid: core_models.OrganizationRid, + *, + role_assignments: typing.List[core_models.RoleAssignmentUpdate], + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> None: + """ + Assign roles to principals for the given Organization. At most 100 role assignments can be added in a single request. + + :param organization_rid: + :type organization_rid: OrganizationRid + :param role_assignments: + :type role_assignments: List[RoleAssignmentUpdate] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: None + + :raises AddOrganizationRoleAssignmentsPermissionDenied: Could not add the OrganizationRoleAssignment. + :raises OrganizationNotFound: The given Organization could not be found. + :raises PrincipalNotFound: A principal (User or Group) with the given PrincipalId could not be found + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/admin/organizations/{organizationRid}/roleAssignments/add", + query_params={ + "preview": preview, + }, + path_params={ + "organizationRid": organization_rid, + }, + header_params={ + "Content-Type": "application/json", + }, + body=admin_models.AddOrganizationRoleAssignmentsRequest( + role_assignments=role_assignments, + ), + response_type=None, + request_timeout=request_timeout, + throwable_errors={ + "AddOrganizationRoleAssignmentsPermissionDenied": admin_errors.AddOrganizationRoleAssignmentsPermissionDenied, + "OrganizationNotFound": admin_errors.OrganizationNotFound, + "PrincipalNotFound": admin_errors.PrincipalNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def list( + self, + organization_rid: core_models.OrganizationRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> admin_models.ListOrganizationRoleAssignmentsResponse: + """ + List all principals who are assigned a role for the given Organization. + + :param organization_rid: + :type organization_rid: OrganizationRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: admin_models.ListOrganizationRoleAssignmentsResponse + + :raises ListOrganizationRoleAssignmentsPermissionDenied: The provided token does not have permission to list assigned roles for this organization. + :raises OrganizationNotFound: The given Organization could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/admin/organizations/{organizationRid}/roleAssignments", + query_params={ + "preview": preview, + }, + path_params={ + "organizationRid": organization_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=admin_models.ListOrganizationRoleAssignmentsResponse, + request_timeout=request_timeout, + throwable_errors={ + "ListOrganizationRoleAssignmentsPermissionDenied": admin_errors.ListOrganizationRoleAssignmentsPermissionDenied, + "OrganizationNotFound": admin_errors.OrganizationNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def remove( + self, + organization_rid: core_models.OrganizationRid, + *, + role_assignments: typing.List[core_models.RoleAssignmentUpdate], + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> None: + """ + Remove roles from principals for the given Organization. At most 100 role assignments can be removed in a single request. + + :param organization_rid: + :type organization_rid: OrganizationRid + :param role_assignments: + :type role_assignments: List[RoleAssignmentUpdate] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: None + + :raises OrganizationNotFound: The given Organization could not be found. + :raises PrincipalNotFound: A principal (User or Group) with the given PrincipalId could not be found + :raises RemoveOrganizationRoleAssignmentsPermissionDenied: Could not remove the OrganizationRoleAssignment. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/admin/organizations/{organizationRid}/roleAssignments/remove", + query_params={ + "preview": preview, + }, + path_params={ + "organizationRid": organization_rid, + }, + header_params={ + "Content-Type": "application/json", + }, + body=admin_models.RemoveOrganizationRoleAssignmentsRequest( + role_assignments=role_assignments, + ), + response_type=None, + request_timeout=request_timeout, + throwable_errors={ + "OrganizationNotFound": admin_errors.OrganizationNotFound, + "PrincipalNotFound": admin_errors.PrincipalNotFound, + "RemoveOrganizationRoleAssignmentsPermissionDenied": admin_errors.RemoveOrganizationRoleAssignmentsPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _OrganizationRoleAssignmentClientRaw: + def __init__(self, client: OrganizationRoleAssignmentClient) -> None: + def add(_: None): ... + def list(_: admin_models.ListOrganizationRoleAssignmentsResponse): ... + def remove(_: None): ... + + self.add = core.with_raw_response(add, client.add) + self.list = core.with_raw_response(list, client.list) + self.remove = core.with_raw_response(remove, client.remove) + + +class _OrganizationRoleAssignmentClientStreaming: + def __init__(self, client: OrganizationRoleAssignmentClient) -> None: + def list(_: admin_models.ListOrganizationRoleAssignmentsResponse): ... + + self.list = core.with_streaming_response(list, client.list) + + +class AsyncOrganizationRoleAssignmentClient: + """ + The API client for the OrganizationRoleAssignment Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncOrganizationRoleAssignmentClientStreaming(self) + self.with_raw_response = _AsyncOrganizationRoleAssignmentClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def add( + self, + organization_rid: core_models.OrganizationRid, + *, + role_assignments: typing.List[core_models.RoleAssignmentUpdate], + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[None]: + """ + Assign roles to principals for the given Organization. At most 100 role assignments can be added in a single request. + + :param organization_rid: + :type organization_rid: OrganizationRid + :param role_assignments: + :type role_assignments: List[RoleAssignmentUpdate] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[None] + + :raises AddOrganizationRoleAssignmentsPermissionDenied: Could not add the OrganizationRoleAssignment. + :raises OrganizationNotFound: The given Organization could not be found. + :raises PrincipalNotFound: A principal (User or Group) with the given PrincipalId could not be found + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/admin/organizations/{organizationRid}/roleAssignments/add", + query_params={ + "preview": preview, + }, + path_params={ + "organizationRid": organization_rid, + }, + header_params={ + "Content-Type": "application/json", + }, + body=admin_models.AddOrganizationRoleAssignmentsRequest( + role_assignments=role_assignments, + ), + response_type=None, + request_timeout=request_timeout, + throwable_errors={ + "AddOrganizationRoleAssignmentsPermissionDenied": admin_errors.AddOrganizationRoleAssignmentsPermissionDenied, + "OrganizationNotFound": admin_errors.OrganizationNotFound, + "PrincipalNotFound": admin_errors.PrincipalNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def list( + self, + organization_rid: core_models.OrganizationRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[admin_models.ListOrganizationRoleAssignmentsResponse]: + """ + List all principals who are assigned a role for the given Organization. + + :param organization_rid: + :type organization_rid: OrganizationRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[admin_models.ListOrganizationRoleAssignmentsResponse] + + :raises ListOrganizationRoleAssignmentsPermissionDenied: The provided token does not have permission to list assigned roles for this organization. + :raises OrganizationNotFound: The given Organization could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/admin/organizations/{organizationRid}/roleAssignments", + query_params={ + "preview": preview, + }, + path_params={ + "organizationRid": organization_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=admin_models.ListOrganizationRoleAssignmentsResponse, + request_timeout=request_timeout, + throwable_errors={ + "ListOrganizationRoleAssignmentsPermissionDenied": admin_errors.ListOrganizationRoleAssignmentsPermissionDenied, + "OrganizationNotFound": admin_errors.OrganizationNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def remove( + self, + organization_rid: core_models.OrganizationRid, + *, + role_assignments: typing.List[core_models.RoleAssignmentUpdate], + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[None]: + """ + Remove roles from principals for the given Organization. At most 100 role assignments can be removed in a single request. + + :param organization_rid: + :type organization_rid: OrganizationRid + :param role_assignments: + :type role_assignments: List[RoleAssignmentUpdate] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[None] + + :raises OrganizationNotFound: The given Organization could not be found. + :raises PrincipalNotFound: A principal (User or Group) with the given PrincipalId could not be found + :raises RemoveOrganizationRoleAssignmentsPermissionDenied: Could not remove the OrganizationRoleAssignment. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/admin/organizations/{organizationRid}/roleAssignments/remove", + query_params={ + "preview": preview, + }, + path_params={ + "organizationRid": organization_rid, + }, + header_params={ + "Content-Type": "application/json", + }, + body=admin_models.RemoveOrganizationRoleAssignmentsRequest( + role_assignments=role_assignments, + ), + response_type=None, + request_timeout=request_timeout, + throwable_errors={ + "OrganizationNotFound": admin_errors.OrganizationNotFound, + "PrincipalNotFound": admin_errors.PrincipalNotFound, + "RemoveOrganizationRoleAssignmentsPermissionDenied": admin_errors.RemoveOrganizationRoleAssignmentsPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _AsyncOrganizationRoleAssignmentClientRaw: + def __init__(self, client: AsyncOrganizationRoleAssignmentClient) -> None: + def add(_: None): ... + def list(_: admin_models.ListOrganizationRoleAssignmentsResponse): ... + def remove(_: None): ... + + self.add = core.async_with_raw_response(add, client.add) + self.list = core.async_with_raw_response(list, client.list) + self.remove = core.async_with_raw_response(remove, client.remove) + + +class _AsyncOrganizationRoleAssignmentClientStreaming: + def __init__(self, client: AsyncOrganizationRoleAssignmentClient) -> None: + def list(_: admin_models.ListOrganizationRoleAssignmentsResponse): ... + + self.list = core.async_with_streaming_response(list, client.list) diff --git a/foundry_sdk/v2/admin/role.py b/foundry_sdk/v2/admin/role.py new file mode 100644 index 000000000..e2d940487 --- /dev/null +++ b/foundry_sdk/v2/admin/role.py @@ -0,0 +1,302 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing + +import annotated_types +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v2.admin import errors as admin_errors +from foundry_sdk.v2.admin import models as admin_models +from foundry_sdk.v2.core import models as core_models + + +class RoleClient: + """ + The API client for the Role Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _RoleClientStreaming(self) + self.with_raw_response = _RoleClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + role_id: core_models.RoleId, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> admin_models.Role: + """ + Get the Role with the specified id. + :param role_id: + :type role_id: RoleId + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: admin_models.Role + + :raises RoleNotFound: The given Role could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/admin/roles/{roleId}", + query_params={ + "preview": preview, + }, + path_params={ + "roleId": role_id, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=admin_models.Role, + request_timeout=request_timeout, + throwable_errors={ + "RoleNotFound": admin_errors.RoleNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get_batch( + self, + body: typing_extensions.Annotated[ + typing.List[admin_models.GetRolesBatchRequestElement], + annotated_types.Len(min_length=1, max_length=500), + ], + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> admin_models.GetRolesBatchResponse: + """ + Execute multiple get requests on Role. + + The maximum batch size for this endpoint is 500. + :param body: Body of the request + :type body: List[GetRolesBatchRequestElement] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: admin_models.GetRolesBatchResponse + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/admin/roles/getBatch", + query_params={ + "preview": preview, + }, + path_params={}, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=body, + response_type=admin_models.GetRolesBatchResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _RoleClientRaw: + def __init__(self, client: RoleClient) -> None: + def get(_: admin_models.Role): ... + def get_batch(_: admin_models.GetRolesBatchResponse): ... + + self.get = core.with_raw_response(get, client.get) + self.get_batch = core.with_raw_response(get_batch, client.get_batch) + + +class _RoleClientStreaming: + def __init__(self, client: RoleClient) -> None: + def get(_: admin_models.Role): ... + def get_batch(_: admin_models.GetRolesBatchResponse): ... + + self.get = core.with_streaming_response(get, client.get) + self.get_batch = core.with_streaming_response(get_batch, client.get_batch) + + +class AsyncRoleClient: + """ + The API client for the Role Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncRoleClientStreaming(self) + self.with_raw_response = _AsyncRoleClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + role_id: core_models.RoleId, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[admin_models.Role]: + """ + Get the Role with the specified id. + :param role_id: + :type role_id: RoleId + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[admin_models.Role] + + :raises RoleNotFound: The given Role could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/admin/roles/{roleId}", + query_params={ + "preview": preview, + }, + path_params={ + "roleId": role_id, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=admin_models.Role, + request_timeout=request_timeout, + throwable_errors={ + "RoleNotFound": admin_errors.RoleNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get_batch( + self, + body: typing_extensions.Annotated[ + typing.List[admin_models.GetRolesBatchRequestElement], + annotated_types.Len(min_length=1, max_length=500), + ], + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[admin_models.GetRolesBatchResponse]: + """ + Execute multiple get requests on Role. + + The maximum batch size for this endpoint is 500. + :param body: Body of the request + :type body: List[GetRolesBatchRequestElement] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[admin_models.GetRolesBatchResponse] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/admin/roles/getBatch", + query_params={ + "preview": preview, + }, + path_params={}, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=body, + response_type=admin_models.GetRolesBatchResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _AsyncRoleClientRaw: + def __init__(self, client: AsyncRoleClient) -> None: + def get(_: admin_models.Role): ... + def get_batch(_: admin_models.GetRolesBatchResponse): ... + + self.get = core.async_with_raw_response(get, client.get) + self.get_batch = core.async_with_raw_response(get_batch, client.get_batch) + + +class _AsyncRoleClientStreaming: + def __init__(self, client: AsyncRoleClient) -> None: + def get(_: admin_models.Role): ... + def get_batch(_: admin_models.GetRolesBatchResponse): ... + + self.get = core.async_with_streaming_response(get, client.get) + self.get_batch = core.async_with_streaming_response(get_batch, client.get_batch) diff --git a/foundry_sdk/v2/admin/user.py b/foundry_sdk/v2/admin/user.py new file mode 100644 index 000000000..5aa581548 --- /dev/null +++ b/foundry_sdk/v2/admin/user.py @@ -0,0 +1,1094 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing +from functools import cached_property + +import annotated_types +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v2.admin import errors as admin_errors +from foundry_sdk.v2.admin import models as admin_models +from foundry_sdk.v2.core import errors as core_errors +from foundry_sdk.v2.core import models as core_models + + +class UserClient: + """ + The API client for the User Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _UserClientStreaming(self) + self.with_raw_response = _UserClientRaw(self) + + @cached_property + def ProviderInfo(self): + from foundry_sdk.v2.admin.user_provider_info import UserProviderInfoClient + + return UserProviderInfoClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @cached_property + def GroupMembership(self): + from foundry_sdk.v2.admin.group_membership import GroupMembershipClient + + return GroupMembershipClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def delete( + self, + user_id: core_models.UserId, + *, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> None: + """ + Delete the User with the specified id. + :param user_id: + :type user_id: UserId + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: None + + :raises DeleteUserPermissionDenied: Could not delete the User. + :raises UserDeleted: The user is deleted. + :raises UserNotFound: The given User could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="DELETE", + resource_path="/v2/admin/users/{userId}", + query_params={}, + path_params={ + "userId": user_id, + }, + header_params={}, + body=None, + response_type=None, + request_timeout=request_timeout, + throwable_errors={ + "DeleteUserPermissionDenied": admin_errors.DeleteUserPermissionDenied, + "UserDeleted": admin_errors.UserDeleted, + "UserNotFound": admin_errors.UserNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + user_id: core_models.UserId, + *, + status: typing.Optional[core_models.UserStatus] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> admin_models.User: + """ + Get the User with the specified id. + :param user_id: + :type user_id: UserId + :param status: + :type status: Optional[UserStatus] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: admin_models.User + + :raises UserDeleted: The user is deleted. + :raises UserIsActive: The user is an active user. + :raises UserNotFound: The given User could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/admin/users/{userId}", + query_params={ + "status": status, + }, + path_params={ + "userId": user_id, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=admin_models.User, + request_timeout=request_timeout, + throwable_errors={ + "UserDeleted": admin_errors.UserDeleted, + "UserIsActive": admin_errors.UserIsActive, + "UserNotFound": admin_errors.UserNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get_batch( + self, + body: typing_extensions.Annotated[ + typing.List[admin_models.GetUsersBatchRequestElement], + annotated_types.Len(min_length=1, max_length=500), + ], + *, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> admin_models.GetUsersBatchResponse: + """ + Execute multiple get requests on User. + + The maximum batch size for this endpoint is 500. + :param body: Body of the request + :type body: List[GetUsersBatchRequestElement] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: admin_models.GetUsersBatchResponse + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/admin/users/getBatch", + query_params={}, + path_params={}, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=body, + response_type=admin_models.GetUsersBatchResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get_current( + self, + *, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> admin_models.User: + """ + + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: admin_models.User + + :raises GetCurrentUserPermissionDenied: Could not getCurrent the User. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/admin/users/getCurrent", + query_params={}, + path_params={}, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=admin_models.User, + request_timeout=request_timeout, + throwable_errors={ + "GetCurrentUserPermissionDenied": admin_errors.GetCurrentUserPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get_markings( + self, + user_id: core_models.UserId, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> admin_models.GetUserMarkingsResponse: + """ + Retrieve Markings that the user is currently a member of. + :param user_id: + :type user_id: UserId + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: admin_models.GetUserMarkingsResponse + + :raises GetMarkingsUserPermissionDenied: Could not getMarkings the User. + :raises UserDeleted: The user is deleted. + :raises UserNotFound: The given User could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/admin/users/{userId}/getMarkings", + query_params={ + "preview": preview, + }, + path_params={ + "userId": user_id, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=admin_models.GetUserMarkingsResponse, + request_timeout=request_timeout, + throwable_errors={ + "GetMarkingsUserPermissionDenied": admin_errors.GetMarkingsUserPermissionDenied, + "UserDeleted": admin_errors.UserDeleted, + "UserNotFound": admin_errors.UserNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def list( + self, + *, + include: typing.Optional[core_models.UserStatus] = None, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.ResourceIterator[admin_models.User]: + """ + Lists all Users. + + This is a paged endpoint. Each page may be smaller or larger than the requested page size. However, it is guaranteed that if there are more results available, the `nextPageToken` field will be populated. To get the next page, make the same request again, but set the value of the `pageToken` query parameter to be value of the `nextPageToken` value of the previous response. If there is no `nextPageToken` field in the response, you are on the last page. + :param include: + :type include: Optional[UserStatus] + :param page_size: The page size to use for the endpoint. + :type page_size: Optional[PageSize] + :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. + :type page_token: Optional[PageToken] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.ResourceIterator[admin_models.User] + + :raises InvalidPageSize: The provided page size was zero or negative. Page sizes must be greater than zero. + :raises UserDeleted: The user is deleted. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/admin/users", + query_params={ + "include": include, + "pageSize": page_size, + "pageToken": page_token, + }, + path_params={}, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=admin_models.ListUsersResponse, + request_timeout=request_timeout, + throwable_errors={ + "InvalidPageSize": core_errors.InvalidPageSize, + "UserDeleted": admin_errors.UserDeleted, + }, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def profile_picture( + self, + user_id: core_models.UserId, + *, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Optional[bytes]: + """ + + :param user_id: + :type user_id: UserId + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Optional[bytes] + + :raises GetProfilePictureOfUserPermissionDenied: Could not profilePicture the User. + :raises InvalidProfilePicture: The user's profile picture is not a valid image + :raises ProfileServiceNotPresent: The Profile service is unexpectedly not present. + :raises UserDeleted: The user is deleted. + :raises UserNotFound: The given User could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/admin/users/{userId}/profilePicture", + query_params={}, + path_params={ + "userId": user_id, + }, + header_params={ + "Accept": "application/octet-stream", + }, + body=None, + response_type=typing.Optional[bytes], + request_timeout=request_timeout, + throwable_errors={ + "GetProfilePictureOfUserPermissionDenied": admin_errors.GetProfilePictureOfUserPermissionDenied, + "InvalidProfilePicture": admin_errors.InvalidProfilePicture, + "ProfileServiceNotPresent": admin_errors.ProfileServiceNotPresent, + "UserDeleted": admin_errors.UserDeleted, + "UserNotFound": admin_errors.UserNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def revoke_all_tokens( + self, + user_id: core_models.UserId, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> None: + """ + Revoke all active authentication tokens for the user including active browser sessions and long-lived + development tokens. If the user has active sessions in a browser, this will force re-authentication. + + The caller must have permission to manage users for the target user's organization. + + :param user_id: + :type user_id: UserId + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: None + + :raises RevokeAllTokensUserPermissionDenied: Could not revokeAllTokens the User. + :raises UserDeleted: The user is deleted. + :raises UserNotFound: The given User could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/admin/users/{userId}/revokeAllTokens", + query_params={ + "preview": preview, + }, + path_params={ + "userId": user_id, + }, + header_params={}, + body=None, + response_type=None, + request_timeout=request_timeout, + throwable_errors={ + "RevokeAllTokensUserPermissionDenied": admin_errors.RevokeAllTokensUserPermissionDenied, + "UserDeleted": admin_errors.UserDeleted, + "UserNotFound": admin_errors.UserNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def search( + self, + *, + where: admin_models.UserSearchFilter, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> admin_models.SearchUsersResponse: + """ + Perform a case-insensitive prefix search for users based on username, given name and family name. + + :param where: + :type where: UserSearchFilter + :param page_size: + :type page_size: Optional[PageSize] + :param page_token: + :type page_token: Optional[PageToken] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: admin_models.SearchUsersResponse + + :raises InvalidPageSize: The provided page size was zero or negative. Page sizes must be greater than zero. + :raises SearchUsersPermissionDenied: Could not search the User. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/admin/users/search", + query_params={}, + path_params={}, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=admin_models.SearchUsersRequest( + where=where, + page_size=page_size, + page_token=page_token, + ), + response_type=admin_models.SearchUsersResponse, + request_timeout=request_timeout, + throwable_errors={ + "InvalidPageSize": core_errors.InvalidPageSize, + "SearchUsersPermissionDenied": admin_errors.SearchUsersPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _UserClientRaw: + def __init__(self, client: UserClient) -> None: + def delete(_: None): ... + def get(_: admin_models.User): ... + def get_batch(_: admin_models.GetUsersBatchResponse): ... + def get_current(_: admin_models.User): ... + def get_markings(_: admin_models.GetUserMarkingsResponse): ... + def list(_: admin_models.ListUsersResponse): ... + def profile_picture(_: typing.Optional[bytes]): ... + def revoke_all_tokens(_: None): ... + def search(_: admin_models.SearchUsersResponse): ... + + self.delete = core.with_raw_response(delete, client.delete) + self.get = core.with_raw_response(get, client.get) + self.get_batch = core.with_raw_response(get_batch, client.get_batch) + self.get_current = core.with_raw_response(get_current, client.get_current) + self.get_markings = core.with_raw_response(get_markings, client.get_markings) + self.list = core.with_raw_response(list, client.list) + self.profile_picture = core.with_raw_response(profile_picture, client.profile_picture) + self.revoke_all_tokens = core.with_raw_response(revoke_all_tokens, client.revoke_all_tokens) + self.search = core.with_raw_response(search, client.search) + + +class _UserClientStreaming: + def __init__(self, client: UserClient) -> None: + def get(_: admin_models.User): ... + def get_batch(_: admin_models.GetUsersBatchResponse): ... + def get_current(_: admin_models.User): ... + def get_markings(_: admin_models.GetUserMarkingsResponse): ... + def list(_: admin_models.ListUsersResponse): ... + def profile_picture(_: typing.Optional[bytes]): ... + def search(_: admin_models.SearchUsersResponse): ... + + self.get = core.with_streaming_response(get, client.get) + self.get_batch = core.with_streaming_response(get_batch, client.get_batch) + self.get_current = core.with_streaming_response(get_current, client.get_current) + self.get_markings = core.with_streaming_response(get_markings, client.get_markings) + self.list = core.with_streaming_response(list, client.list) + self.profile_picture = core.with_streaming_response(profile_picture, client.profile_picture) + self.search = core.with_streaming_response(search, client.search) + + +class AsyncUserClient: + """ + The API client for the User Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncUserClientStreaming(self) + self.with_raw_response = _AsyncUserClientRaw(self) + + @cached_property + def ProviderInfo(self): + from foundry_sdk.v2.admin.user_provider_info import AsyncUserProviderInfoClient + + return AsyncUserProviderInfoClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @cached_property + def GroupMembership(self): + from foundry_sdk.v2.admin.group_membership import AsyncGroupMembershipClient + + return AsyncGroupMembershipClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def delete( + self, + user_id: core_models.UserId, + *, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[None]: + """ + Delete the User with the specified id. + :param user_id: + :type user_id: UserId + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[None] + + :raises DeleteUserPermissionDenied: Could not delete the User. + :raises UserDeleted: The user is deleted. + :raises UserNotFound: The given User could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="DELETE", + resource_path="/v2/admin/users/{userId}", + query_params={}, + path_params={ + "userId": user_id, + }, + header_params={}, + body=None, + response_type=None, + request_timeout=request_timeout, + throwable_errors={ + "DeleteUserPermissionDenied": admin_errors.DeleteUserPermissionDenied, + "UserDeleted": admin_errors.UserDeleted, + "UserNotFound": admin_errors.UserNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + user_id: core_models.UserId, + *, + status: typing.Optional[core_models.UserStatus] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[admin_models.User]: + """ + Get the User with the specified id. + :param user_id: + :type user_id: UserId + :param status: + :type status: Optional[UserStatus] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[admin_models.User] + + :raises UserDeleted: The user is deleted. + :raises UserIsActive: The user is an active user. + :raises UserNotFound: The given User could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/admin/users/{userId}", + query_params={ + "status": status, + }, + path_params={ + "userId": user_id, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=admin_models.User, + request_timeout=request_timeout, + throwable_errors={ + "UserDeleted": admin_errors.UserDeleted, + "UserIsActive": admin_errors.UserIsActive, + "UserNotFound": admin_errors.UserNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get_batch( + self, + body: typing_extensions.Annotated[ + typing.List[admin_models.GetUsersBatchRequestElement], + annotated_types.Len(min_length=1, max_length=500), + ], + *, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[admin_models.GetUsersBatchResponse]: + """ + Execute multiple get requests on User. + + The maximum batch size for this endpoint is 500. + :param body: Body of the request + :type body: List[GetUsersBatchRequestElement] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[admin_models.GetUsersBatchResponse] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/admin/users/getBatch", + query_params={}, + path_params={}, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=body, + response_type=admin_models.GetUsersBatchResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get_current( + self, + *, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[admin_models.User]: + """ + + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[admin_models.User] + + :raises GetCurrentUserPermissionDenied: Could not getCurrent the User. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/admin/users/getCurrent", + query_params={}, + path_params={}, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=admin_models.User, + request_timeout=request_timeout, + throwable_errors={ + "GetCurrentUserPermissionDenied": admin_errors.GetCurrentUserPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get_markings( + self, + user_id: core_models.UserId, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[admin_models.GetUserMarkingsResponse]: + """ + Retrieve Markings that the user is currently a member of. + :param user_id: + :type user_id: UserId + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[admin_models.GetUserMarkingsResponse] + + :raises GetMarkingsUserPermissionDenied: Could not getMarkings the User. + :raises UserDeleted: The user is deleted. + :raises UserNotFound: The given User could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/admin/users/{userId}/getMarkings", + query_params={ + "preview": preview, + }, + path_params={ + "userId": user_id, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=admin_models.GetUserMarkingsResponse, + request_timeout=request_timeout, + throwable_errors={ + "GetMarkingsUserPermissionDenied": admin_errors.GetMarkingsUserPermissionDenied, + "UserDeleted": admin_errors.UserDeleted, + "UserNotFound": admin_errors.UserNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def list( + self, + *, + include: typing.Optional[core_models.UserStatus] = None, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.AsyncResourceIterator[admin_models.User]: + """ + Lists all Users. + + This is a paged endpoint. Each page may be smaller or larger than the requested page size. However, it is guaranteed that if there are more results available, the `nextPageToken` field will be populated. To get the next page, make the same request again, but set the value of the `pageToken` query parameter to be value of the `nextPageToken` value of the previous response. If there is no `nextPageToken` field in the response, you are on the last page. + :param include: + :type include: Optional[UserStatus] + :param page_size: The page size to use for the endpoint. + :type page_size: Optional[PageSize] + :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. + :type page_token: Optional[PageToken] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.AsyncResourceIterator[admin_models.User] + + :raises InvalidPageSize: The provided page size was zero or negative. Page sizes must be greater than zero. + :raises UserDeleted: The user is deleted. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/admin/users", + query_params={ + "include": include, + "pageSize": page_size, + "pageToken": page_token, + }, + path_params={}, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=admin_models.ListUsersResponse, + request_timeout=request_timeout, + throwable_errors={ + "InvalidPageSize": core_errors.InvalidPageSize, + "UserDeleted": admin_errors.UserDeleted, + }, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def profile_picture( + self, + user_id: core_models.UserId, + *, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[typing.Optional[bytes]]: + """ + + :param user_id: + :type user_id: UserId + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[typing.Optional[bytes]] + + :raises GetProfilePictureOfUserPermissionDenied: Could not profilePicture the User. + :raises InvalidProfilePicture: The user's profile picture is not a valid image + :raises ProfileServiceNotPresent: The Profile service is unexpectedly not present. + :raises UserDeleted: The user is deleted. + :raises UserNotFound: The given User could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/admin/users/{userId}/profilePicture", + query_params={}, + path_params={ + "userId": user_id, + }, + header_params={ + "Accept": "application/octet-stream", + }, + body=None, + response_type=typing.Optional[bytes], + request_timeout=request_timeout, + throwable_errors={ + "GetProfilePictureOfUserPermissionDenied": admin_errors.GetProfilePictureOfUserPermissionDenied, + "InvalidProfilePicture": admin_errors.InvalidProfilePicture, + "ProfileServiceNotPresent": admin_errors.ProfileServiceNotPresent, + "UserDeleted": admin_errors.UserDeleted, + "UserNotFound": admin_errors.UserNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def revoke_all_tokens( + self, + user_id: core_models.UserId, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[None]: + """ + Revoke all active authentication tokens for the user including active browser sessions and long-lived + development tokens. If the user has active sessions in a browser, this will force re-authentication. + + The caller must have permission to manage users for the target user's organization. + + :param user_id: + :type user_id: UserId + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[None] + + :raises RevokeAllTokensUserPermissionDenied: Could not revokeAllTokens the User. + :raises UserDeleted: The user is deleted. + :raises UserNotFound: The given User could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/admin/users/{userId}/revokeAllTokens", + query_params={ + "preview": preview, + }, + path_params={ + "userId": user_id, + }, + header_params={}, + body=None, + response_type=None, + request_timeout=request_timeout, + throwable_errors={ + "RevokeAllTokensUserPermissionDenied": admin_errors.RevokeAllTokensUserPermissionDenied, + "UserDeleted": admin_errors.UserDeleted, + "UserNotFound": admin_errors.UserNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def search( + self, + *, + where: admin_models.UserSearchFilter, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[admin_models.SearchUsersResponse]: + """ + Perform a case-insensitive prefix search for users based on username, given name and family name. + + :param where: + :type where: UserSearchFilter + :param page_size: + :type page_size: Optional[PageSize] + :param page_token: + :type page_token: Optional[PageToken] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[admin_models.SearchUsersResponse] + + :raises InvalidPageSize: The provided page size was zero or negative. Page sizes must be greater than zero. + :raises SearchUsersPermissionDenied: Could not search the User. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/admin/users/search", + query_params={}, + path_params={}, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=admin_models.SearchUsersRequest( + where=where, + page_size=page_size, + page_token=page_token, + ), + response_type=admin_models.SearchUsersResponse, + request_timeout=request_timeout, + throwable_errors={ + "InvalidPageSize": core_errors.InvalidPageSize, + "SearchUsersPermissionDenied": admin_errors.SearchUsersPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _AsyncUserClientRaw: + def __init__(self, client: AsyncUserClient) -> None: + def delete(_: None): ... + def get(_: admin_models.User): ... + def get_batch(_: admin_models.GetUsersBatchResponse): ... + def get_current(_: admin_models.User): ... + def get_markings(_: admin_models.GetUserMarkingsResponse): ... + def list(_: admin_models.ListUsersResponse): ... + def profile_picture(_: typing.Optional[bytes]): ... + def revoke_all_tokens(_: None): ... + def search(_: admin_models.SearchUsersResponse): ... + + self.delete = core.async_with_raw_response(delete, client.delete) + self.get = core.async_with_raw_response(get, client.get) + self.get_batch = core.async_with_raw_response(get_batch, client.get_batch) + self.get_current = core.async_with_raw_response(get_current, client.get_current) + self.get_markings = core.async_with_raw_response(get_markings, client.get_markings) + self.list = core.async_with_raw_response(list, client.list) + self.profile_picture = core.async_with_raw_response(profile_picture, client.profile_picture) + self.revoke_all_tokens = core.async_with_raw_response( + revoke_all_tokens, client.revoke_all_tokens + ) + self.search = core.async_with_raw_response(search, client.search) + + +class _AsyncUserClientStreaming: + def __init__(self, client: AsyncUserClient) -> None: + def get(_: admin_models.User): ... + def get_batch(_: admin_models.GetUsersBatchResponse): ... + def get_current(_: admin_models.User): ... + def get_markings(_: admin_models.GetUserMarkingsResponse): ... + def list(_: admin_models.ListUsersResponse): ... + def profile_picture(_: typing.Optional[bytes]): ... + def search(_: admin_models.SearchUsersResponse): ... + + self.get = core.async_with_streaming_response(get, client.get) + self.get_batch = core.async_with_streaming_response(get_batch, client.get_batch) + self.get_current = core.async_with_streaming_response(get_current, client.get_current) + self.get_markings = core.async_with_streaming_response(get_markings, client.get_markings) + self.list = core.async_with_streaming_response(list, client.list) + self.profile_picture = core.async_with_streaming_response( + profile_picture, client.profile_picture + ) + self.search = core.async_with_streaming_response(search, client.search) diff --git a/foundry_sdk/v2/admin/user_provider_info.py b/foundry_sdk/v2/admin/user_provider_info.py new file mode 100644 index 000000000..9deb2f0e5 --- /dev/null +++ b/foundry_sdk/v2/admin/user_provider_info.py @@ -0,0 +1,345 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v2.admin import errors as admin_errors +from foundry_sdk.v2.admin import models as admin_models +from foundry_sdk.v2.core import models as core_models + + +class UserProviderInfoClient: + """ + The API client for the UserProviderInfo Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _UserProviderInfoClientStreaming(self) + self.with_raw_response = _UserProviderInfoClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + user_id: core_models.UserId, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> admin_models.UserProviderInfo: + """ + Get the UserProviderInfo. + :param user_id: + :type user_id: UserId + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: admin_models.UserProviderInfo + + :raises GetUserProviderInfoPermissionDenied: The provided token does not have permission to view the provider information for the given user. + :raises UserDeleted: The user is deleted. + :raises UserNotFound: The given User could not be found. + :raises UserProviderInfoNotFound: The given UserProviderInfo could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/admin/users/{userId}/providerInfo", + query_params={ + "preview": preview, + }, + path_params={ + "userId": user_id, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=admin_models.UserProviderInfo, + request_timeout=request_timeout, + throwable_errors={ + "GetUserProviderInfoPermissionDenied": admin_errors.GetUserProviderInfoPermissionDenied, + "UserDeleted": admin_errors.UserDeleted, + "UserNotFound": admin_errors.UserNotFound, + "UserProviderInfoNotFound": admin_errors.UserProviderInfoNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def replace( + self, + user_id: core_models.UserId, + *, + provider_id: admin_models.ProviderId, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> admin_models.UserProviderInfo: + """ + Replace the UserProviderInfo. + :param user_id: + :type user_id: UserId + :param provider_id: The ID of the User in the external authentication provider. This value is determined by the authentication provider. At most one User can have a given provider ID in a given Realm. + :type provider_id: ProviderId + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: admin_models.UserProviderInfo + + :raises CannotReplaceProviderInfoForPrincipalInProtectedRealm: Provider information for Principals in this Realm cannot be replaced. + :raises GetUserProviderInfoPermissionDenied: The provided token does not have permission to view the provider information for the given user. + :raises ReplaceUserProviderInfoPermissionDenied: Could not replace the UserProviderInfo. + :raises UserDeleted: The user is deleted. + :raises UserNotFound: The given User could not be found. + :raises UserProviderInfoNotFound: The given UserProviderInfo could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="PUT", + resource_path="/v2/admin/users/{userId}/providerInfo", + query_params={ + "preview": preview, + }, + path_params={ + "userId": user_id, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=admin_models.ReplaceUserProviderInfoRequest( + provider_id=provider_id, + ), + response_type=admin_models.UserProviderInfo, + request_timeout=request_timeout, + throwable_errors={ + "CannotReplaceProviderInfoForPrincipalInProtectedRealm": admin_errors.CannotReplaceProviderInfoForPrincipalInProtectedRealm, + "GetUserProviderInfoPermissionDenied": admin_errors.GetUserProviderInfoPermissionDenied, + "ReplaceUserProviderInfoPermissionDenied": admin_errors.ReplaceUserProviderInfoPermissionDenied, + "UserDeleted": admin_errors.UserDeleted, + "UserNotFound": admin_errors.UserNotFound, + "UserProviderInfoNotFound": admin_errors.UserProviderInfoNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _UserProviderInfoClientRaw: + def __init__(self, client: UserProviderInfoClient) -> None: + def get(_: admin_models.UserProviderInfo): ... + def replace(_: admin_models.UserProviderInfo): ... + + self.get = core.with_raw_response(get, client.get) + self.replace = core.with_raw_response(replace, client.replace) + + +class _UserProviderInfoClientStreaming: + def __init__(self, client: UserProviderInfoClient) -> None: + def get(_: admin_models.UserProviderInfo): ... + def replace(_: admin_models.UserProviderInfo): ... + + self.get = core.with_streaming_response(get, client.get) + self.replace = core.with_streaming_response(replace, client.replace) + + +class AsyncUserProviderInfoClient: + """ + The API client for the UserProviderInfo Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncUserProviderInfoClientStreaming(self) + self.with_raw_response = _AsyncUserProviderInfoClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + user_id: core_models.UserId, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[admin_models.UserProviderInfo]: + """ + Get the UserProviderInfo. + :param user_id: + :type user_id: UserId + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[admin_models.UserProviderInfo] + + :raises GetUserProviderInfoPermissionDenied: The provided token does not have permission to view the provider information for the given user. + :raises UserDeleted: The user is deleted. + :raises UserNotFound: The given User could not be found. + :raises UserProviderInfoNotFound: The given UserProviderInfo could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/admin/users/{userId}/providerInfo", + query_params={ + "preview": preview, + }, + path_params={ + "userId": user_id, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=admin_models.UserProviderInfo, + request_timeout=request_timeout, + throwable_errors={ + "GetUserProviderInfoPermissionDenied": admin_errors.GetUserProviderInfoPermissionDenied, + "UserDeleted": admin_errors.UserDeleted, + "UserNotFound": admin_errors.UserNotFound, + "UserProviderInfoNotFound": admin_errors.UserProviderInfoNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def replace( + self, + user_id: core_models.UserId, + *, + provider_id: admin_models.ProviderId, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[admin_models.UserProviderInfo]: + """ + Replace the UserProviderInfo. + :param user_id: + :type user_id: UserId + :param provider_id: The ID of the User in the external authentication provider. This value is determined by the authentication provider. At most one User can have a given provider ID in a given Realm. + :type provider_id: ProviderId + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[admin_models.UserProviderInfo] + + :raises CannotReplaceProviderInfoForPrincipalInProtectedRealm: Provider information for Principals in this Realm cannot be replaced. + :raises GetUserProviderInfoPermissionDenied: The provided token does not have permission to view the provider information for the given user. + :raises ReplaceUserProviderInfoPermissionDenied: Could not replace the UserProviderInfo. + :raises UserDeleted: The user is deleted. + :raises UserNotFound: The given User could not be found. + :raises UserProviderInfoNotFound: The given UserProviderInfo could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="PUT", + resource_path="/v2/admin/users/{userId}/providerInfo", + query_params={ + "preview": preview, + }, + path_params={ + "userId": user_id, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=admin_models.ReplaceUserProviderInfoRequest( + provider_id=provider_id, + ), + response_type=admin_models.UserProviderInfo, + request_timeout=request_timeout, + throwable_errors={ + "CannotReplaceProviderInfoForPrincipalInProtectedRealm": admin_errors.CannotReplaceProviderInfoForPrincipalInProtectedRealm, + "GetUserProviderInfoPermissionDenied": admin_errors.GetUserProviderInfoPermissionDenied, + "ReplaceUserProviderInfoPermissionDenied": admin_errors.ReplaceUserProviderInfoPermissionDenied, + "UserDeleted": admin_errors.UserDeleted, + "UserNotFound": admin_errors.UserNotFound, + "UserProviderInfoNotFound": admin_errors.UserProviderInfoNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _AsyncUserProviderInfoClientRaw: + def __init__(self, client: AsyncUserProviderInfoClient) -> None: + def get(_: admin_models.UserProviderInfo): ... + def replace(_: admin_models.UserProviderInfo): ... + + self.get = core.async_with_raw_response(get, client.get) + self.replace = core.async_with_raw_response(replace, client.replace) + + +class _AsyncUserProviderInfoClientStreaming: + def __init__(self, client: AsyncUserProviderInfoClient) -> None: + def get(_: admin_models.UserProviderInfo): ... + def replace(_: admin_models.UserProviderInfo): ... + + self.get = core.async_with_streaming_response(get, client.get) + self.replace = core.async_with_streaming_response(replace, client.replace) diff --git a/foundry_sdk/v2/aip_agents/__init__.py b/foundry_sdk/v2/aip_agents/__init__.py new file mode 100644 index 000000000..41ff57803 --- /dev/null +++ b/foundry_sdk/v2/aip_agents/__init__.py @@ -0,0 +1,22 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +from foundry_sdk.v2.aip_agents._client import AipAgentsClient +from foundry_sdk.v2.aip_agents._client import AsyncAipAgentsClient + +__all__ = [ + "AipAgentsClient", + "AsyncAipAgentsClient", +] diff --git a/foundry_sdk/v2/aip_agents/_client.py b/foundry_sdk/v2/aip_agents/_client.py new file mode 100644 index 000000000..ba17f502a --- /dev/null +++ b/foundry_sdk/v2/aip_agents/_client.py @@ -0,0 +1,69 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing +from functools import cached_property + +from foundry_sdk import _core as core + + +class AipAgentsClient: + """ + The API client for the AipAgents Namespace. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + + @cached_property + def Agent(self): + from foundry_sdk.v2.aip_agents.agent import AgentClient + + return AgentClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + +class AsyncAipAgentsClient: + """ + The Async API client for the AipAgents Namespace. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + from foundry_sdk.v2.aip_agents.agent import AsyncAgentClient + + self.Agent = AsyncAgentClient(auth=auth, hostname=hostname, config=config) diff --git a/foundry_sdk/v2/aip_agents/agent.py b/foundry_sdk/v2/aip_agents/agent.py new file mode 100644 index 000000000..c5611457f --- /dev/null +++ b/foundry_sdk/v2/aip_agents/agent.py @@ -0,0 +1,376 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing +from functools import cached_property + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v2.aip_agents import errors as aip_agents_errors +from foundry_sdk.v2.aip_agents import models as aip_agents_models +from foundry_sdk.v2.core import models as core_models + + +class AgentClient: + """ + The API client for the Agent Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AgentClientStreaming(self) + self.with_raw_response = _AgentClientRaw(self) + + @cached_property + def AgentVersion(self): + from foundry_sdk.v2.aip_agents.agent_version import AgentVersionClient + + return AgentVersionClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @cached_property + def Session(self): + from foundry_sdk.v2.aip_agents.session import SessionClient + + return SessionClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def all_sessions( + self, + *, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.ResourceIterator[aip_agents_models.Session]: + """ + List all conversation sessions between the calling user and all accessible Agents that were created by this client. + Sessions are returned in order of most recently updated first. + + :param page_size: The maximum number of sessions to return in a single page. The maximum allowed value is 100. Defaults to 100 if not specified. + :type page_size: Optional[PageSize] + :param page_token: + :type page_token: Optional[PageToken] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.ResourceIterator[aip_agents_models.Session] + + :raises GetAllSessionsAgentsPermissionDenied: The calling user does not have permission to list all sessions across all Agents. Listing all sessions across all agents requires the `api:aip-agents-write` scope. + :raises ListSessionsForAgentsPermissionDenied: Could not allSessions the Agent. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/aipAgents/agents/allSessions", + query_params={ + "pageSize": page_size, + "pageToken": page_token, + "preview": preview, + }, + path_params={}, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=aip_agents_models.AgentsSessionsPage, + request_timeout=request_timeout, + throwable_errors={ + "GetAllSessionsAgentsPermissionDenied": aip_agents_errors.GetAllSessionsAgentsPermissionDenied, + "ListSessionsForAgentsPermissionDenied": aip_agents_errors.ListSessionsForAgentsPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + agent_rid: aip_agents_models.AgentRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + version: typing.Optional[aip_agents_models.AgentVersionString] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> aip_agents_models.Agent: + """ + Get details for an AIP Agent. + :param agent_rid: An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). + :type agent_rid: AgentRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param version: The version of the Agent to retrieve. If not specified, the latest published version will be returned. + :type version: Optional[AgentVersionString] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: aip_agents_models.Agent + + :raises AgentNotFound: The given Agent could not be found. + :raises AgentVersionNotFound: The given AgentVersion could not be found. + :raises InvalidAgentVersion: The provided version string is not a valid format for an Agent version. + :raises NoPublishedAgentVersion: Failed to retrieve the latest published version of the Agent because the Agent has no published versions. Try publishing the Agent in AIP Agent Studio to use the latest published version, or specify the version of the Agent to use. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/aipAgents/agents/{agentRid}", + query_params={ + "preview": preview, + "version": version, + }, + path_params={ + "agentRid": agent_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=aip_agents_models.Agent, + request_timeout=request_timeout, + throwable_errors={ + "AgentNotFound": aip_agents_errors.AgentNotFound, + "AgentVersionNotFound": aip_agents_errors.AgentVersionNotFound, + "InvalidAgentVersion": aip_agents_errors.InvalidAgentVersion, + "NoPublishedAgentVersion": aip_agents_errors.NoPublishedAgentVersion, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _AgentClientRaw: + def __init__(self, client: AgentClient) -> None: + def all_sessions(_: aip_agents_models.AgentsSessionsPage): ... + def get(_: aip_agents_models.Agent): ... + + self.all_sessions = core.with_raw_response(all_sessions, client.all_sessions) + self.get = core.with_raw_response(get, client.get) + + +class _AgentClientStreaming: + def __init__(self, client: AgentClient) -> None: + def all_sessions(_: aip_agents_models.AgentsSessionsPage): ... + def get(_: aip_agents_models.Agent): ... + + self.all_sessions = core.with_streaming_response(all_sessions, client.all_sessions) + self.get = core.with_streaming_response(get, client.get) + + +class AsyncAgentClient: + """ + The API client for the Agent Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncAgentClientStreaming(self) + self.with_raw_response = _AsyncAgentClientRaw(self) + + @cached_property + def AgentVersion(self): + from foundry_sdk.v2.aip_agents.agent_version import AsyncAgentVersionClient + + return AsyncAgentVersionClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @cached_property + def Session(self): + from foundry_sdk.v2.aip_agents.session import AsyncSessionClient + + return AsyncSessionClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def all_sessions( + self, + *, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.AsyncResourceIterator[aip_agents_models.Session]: + """ + List all conversation sessions between the calling user and all accessible Agents that were created by this client. + Sessions are returned in order of most recently updated first. + + :param page_size: The maximum number of sessions to return in a single page. The maximum allowed value is 100. Defaults to 100 if not specified. + :type page_size: Optional[PageSize] + :param page_token: + :type page_token: Optional[PageToken] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.AsyncResourceIterator[aip_agents_models.Session] + + :raises GetAllSessionsAgentsPermissionDenied: The calling user does not have permission to list all sessions across all Agents. Listing all sessions across all agents requires the `api:aip-agents-write` scope. + :raises ListSessionsForAgentsPermissionDenied: Could not allSessions the Agent. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/aipAgents/agents/allSessions", + query_params={ + "pageSize": page_size, + "pageToken": page_token, + "preview": preview, + }, + path_params={}, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=aip_agents_models.AgentsSessionsPage, + request_timeout=request_timeout, + throwable_errors={ + "GetAllSessionsAgentsPermissionDenied": aip_agents_errors.GetAllSessionsAgentsPermissionDenied, + "ListSessionsForAgentsPermissionDenied": aip_agents_errors.ListSessionsForAgentsPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + agent_rid: aip_agents_models.AgentRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + version: typing.Optional[aip_agents_models.AgentVersionString] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[aip_agents_models.Agent]: + """ + Get details for an AIP Agent. + :param agent_rid: An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). + :type agent_rid: AgentRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param version: The version of the Agent to retrieve. If not specified, the latest published version will be returned. + :type version: Optional[AgentVersionString] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[aip_agents_models.Agent] + + :raises AgentNotFound: The given Agent could not be found. + :raises AgentVersionNotFound: The given AgentVersion could not be found. + :raises InvalidAgentVersion: The provided version string is not a valid format for an Agent version. + :raises NoPublishedAgentVersion: Failed to retrieve the latest published version of the Agent because the Agent has no published versions. Try publishing the Agent in AIP Agent Studio to use the latest published version, or specify the version of the Agent to use. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/aipAgents/agents/{agentRid}", + query_params={ + "preview": preview, + "version": version, + }, + path_params={ + "agentRid": agent_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=aip_agents_models.Agent, + request_timeout=request_timeout, + throwable_errors={ + "AgentNotFound": aip_agents_errors.AgentNotFound, + "AgentVersionNotFound": aip_agents_errors.AgentVersionNotFound, + "InvalidAgentVersion": aip_agents_errors.InvalidAgentVersion, + "NoPublishedAgentVersion": aip_agents_errors.NoPublishedAgentVersion, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _AsyncAgentClientRaw: + def __init__(self, client: AsyncAgentClient) -> None: + def all_sessions(_: aip_agents_models.AgentsSessionsPage): ... + def get(_: aip_agents_models.Agent): ... + + self.all_sessions = core.async_with_raw_response(all_sessions, client.all_sessions) + self.get = core.async_with_raw_response(get, client.get) + + +class _AsyncAgentClientStreaming: + def __init__(self, client: AsyncAgentClient) -> None: + def all_sessions(_: aip_agents_models.AgentsSessionsPage): ... + def get(_: aip_agents_models.Agent): ... + + self.all_sessions = core.async_with_streaming_response(all_sessions, client.all_sessions) + self.get = core.async_with_streaming_response(get, client.get) diff --git a/foundry_sdk/v2/aip_agents/agent_version.py b/foundry_sdk/v2/aip_agents/agent_version.py new file mode 100644 index 000000000..878b88783 --- /dev/null +++ b/foundry_sdk/v2/aip_agents/agent_version.py @@ -0,0 +1,341 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v2.aip_agents import errors as aip_agents_errors +from foundry_sdk.v2.aip_agents import models as aip_agents_models +from foundry_sdk.v2.core import models as core_models + + +class AgentVersionClient: + """ + The API client for the AgentVersion Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AgentVersionClientStreaming(self) + self.with_raw_response = _AgentVersionClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + agent_rid: aip_agents_models.AgentRid, + agent_version_string: aip_agents_models.AgentVersionString, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> aip_agents_models.AgentVersion: + """ + Get version details for an AIP Agent. + :param agent_rid: An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). + :type agent_rid: AgentRid + :param agent_version_string: The semantic version of the Agent, formatted as "majorVersion.minorVersion". + :type agent_version_string: AgentVersionString + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: aip_agents_models.AgentVersion + + :raises AgentNotFound: The given Agent could not be found. + :raises AgentVersionNotFound: The given AgentVersion could not be found. + :raises InvalidAgentVersion: The provided version string is not a valid format for an Agent version. + :raises NoPublishedAgentVersion: Failed to retrieve the latest published version of the Agent because the Agent has no published versions. Try publishing the Agent in AIP Agent Studio to use the latest published version, or specify the version of the Agent to use. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/aipAgents/agents/{agentRid}/agentVersions/{agentVersionString}", + query_params={ + "preview": preview, + }, + path_params={ + "agentRid": agent_rid, + "agentVersionString": agent_version_string, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=aip_agents_models.AgentVersion, + request_timeout=request_timeout, + throwable_errors={ + "AgentNotFound": aip_agents_errors.AgentNotFound, + "AgentVersionNotFound": aip_agents_errors.AgentVersionNotFound, + "InvalidAgentVersion": aip_agents_errors.InvalidAgentVersion, + "NoPublishedAgentVersion": aip_agents_errors.NoPublishedAgentVersion, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def list( + self, + agent_rid: aip_agents_models.AgentRid, + *, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.ResourceIterator[aip_agents_models.AgentVersion]: + """ + List all versions for an AIP Agent. + Versions are returned in descending order, by most recent versions first. + + :param agent_rid: An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). + :type agent_rid: AgentRid + :param page_size: The page size to use for the endpoint. + :type page_size: Optional[PageSize] + :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. + :type page_token: Optional[PageToken] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.ResourceIterator[aip_agents_models.AgentVersion] + + :raises AgentNotFound: The given Agent could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/aipAgents/agents/{agentRid}/agentVersions", + query_params={ + "pageSize": page_size, + "pageToken": page_token, + "preview": preview, + }, + path_params={ + "agentRid": agent_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=aip_agents_models.ListAgentVersionsResponse, + request_timeout=request_timeout, + throwable_errors={ + "AgentNotFound": aip_agents_errors.AgentNotFound, + }, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + +class _AgentVersionClientRaw: + def __init__(self, client: AgentVersionClient) -> None: + def get(_: aip_agents_models.AgentVersion): ... + def list(_: aip_agents_models.ListAgentVersionsResponse): ... + + self.get = core.with_raw_response(get, client.get) + self.list = core.with_raw_response(list, client.list) + + +class _AgentVersionClientStreaming: + def __init__(self, client: AgentVersionClient) -> None: + def get(_: aip_agents_models.AgentVersion): ... + def list(_: aip_agents_models.ListAgentVersionsResponse): ... + + self.get = core.with_streaming_response(get, client.get) + self.list = core.with_streaming_response(list, client.list) + + +class AsyncAgentVersionClient: + """ + The API client for the AgentVersion Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncAgentVersionClientStreaming(self) + self.with_raw_response = _AsyncAgentVersionClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + agent_rid: aip_agents_models.AgentRid, + agent_version_string: aip_agents_models.AgentVersionString, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[aip_agents_models.AgentVersion]: + """ + Get version details for an AIP Agent. + :param agent_rid: An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). + :type agent_rid: AgentRid + :param agent_version_string: The semantic version of the Agent, formatted as "majorVersion.minorVersion". + :type agent_version_string: AgentVersionString + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[aip_agents_models.AgentVersion] + + :raises AgentNotFound: The given Agent could not be found. + :raises AgentVersionNotFound: The given AgentVersion could not be found. + :raises InvalidAgentVersion: The provided version string is not a valid format for an Agent version. + :raises NoPublishedAgentVersion: Failed to retrieve the latest published version of the Agent because the Agent has no published versions. Try publishing the Agent in AIP Agent Studio to use the latest published version, or specify the version of the Agent to use. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/aipAgents/agents/{agentRid}/agentVersions/{agentVersionString}", + query_params={ + "preview": preview, + }, + path_params={ + "agentRid": agent_rid, + "agentVersionString": agent_version_string, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=aip_agents_models.AgentVersion, + request_timeout=request_timeout, + throwable_errors={ + "AgentNotFound": aip_agents_errors.AgentNotFound, + "AgentVersionNotFound": aip_agents_errors.AgentVersionNotFound, + "InvalidAgentVersion": aip_agents_errors.InvalidAgentVersion, + "NoPublishedAgentVersion": aip_agents_errors.NoPublishedAgentVersion, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def list( + self, + agent_rid: aip_agents_models.AgentRid, + *, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.AsyncResourceIterator[aip_agents_models.AgentVersion]: + """ + List all versions for an AIP Agent. + Versions are returned in descending order, by most recent versions first. + + :param agent_rid: An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). + :type agent_rid: AgentRid + :param page_size: The page size to use for the endpoint. + :type page_size: Optional[PageSize] + :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. + :type page_token: Optional[PageToken] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.AsyncResourceIterator[aip_agents_models.AgentVersion] + + :raises AgentNotFound: The given Agent could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/aipAgents/agents/{agentRid}/agentVersions", + query_params={ + "pageSize": page_size, + "pageToken": page_token, + "preview": preview, + }, + path_params={ + "agentRid": agent_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=aip_agents_models.ListAgentVersionsResponse, + request_timeout=request_timeout, + throwable_errors={ + "AgentNotFound": aip_agents_errors.AgentNotFound, + }, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + +class _AsyncAgentVersionClientRaw: + def __init__(self, client: AsyncAgentVersionClient) -> None: + def get(_: aip_agents_models.AgentVersion): ... + def list(_: aip_agents_models.ListAgentVersionsResponse): ... + + self.get = core.async_with_raw_response(get, client.get) + self.list = core.async_with_raw_response(list, client.list) + + +class _AsyncAgentVersionClientStreaming: + def __init__(self, client: AsyncAgentVersionClient) -> None: + def get(_: aip_agents_models.AgentVersion): ... + def list(_: aip_agents_models.ListAgentVersionsResponse): ... + + self.get = core.async_with_streaming_response(get, client.get) + self.list = core.async_with_streaming_response(list, client.list) diff --git a/foundry_sdk/v2/aip_agents/content.py b/foundry_sdk/v2/aip_agents/content.py new file mode 100644 index 000000000..ffa53671d --- /dev/null +++ b/foundry_sdk/v2/aip_agents/content.py @@ -0,0 +1,213 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v2.aip_agents import errors as aip_agents_errors +from foundry_sdk.v2.aip_agents import models as aip_agents_models +from foundry_sdk.v2.core import models as core_models + + +class ContentClient: + """ + The API client for the Content Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _ContentClientStreaming(self) + self.with_raw_response = _ContentClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + agent_rid: aip_agents_models.AgentRid, + session_rid: aip_agents_models.SessionRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> aip_agents_models.Content: + """ + Get the conversation content for a session between the calling user and an Agent. + :param agent_rid: An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). + :type agent_rid: AgentRid + :param session_rid: The Resource Identifier (RID) of the conversation session. + :type session_rid: SessionRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: aip_agents_models.Content + + :raises AgentNotFound: The given Agent could not be found. + :raises ContentNotFound: The given Content could not be found. + :raises SessionNotFound: The given Session could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}/content", + query_params={ + "preview": preview, + }, + path_params={ + "agentRid": agent_rid, + "sessionRid": session_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=aip_agents_models.Content, + request_timeout=request_timeout, + throwable_errors={ + "AgentNotFound": aip_agents_errors.AgentNotFound, + "ContentNotFound": aip_agents_errors.ContentNotFound, + "SessionNotFound": aip_agents_errors.SessionNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _ContentClientRaw: + def __init__(self, client: ContentClient) -> None: + def get(_: aip_agents_models.Content): ... + + self.get = core.with_raw_response(get, client.get) + + +class _ContentClientStreaming: + def __init__(self, client: ContentClient) -> None: + def get(_: aip_agents_models.Content): ... + + self.get = core.with_streaming_response(get, client.get) + + +class AsyncContentClient: + """ + The API client for the Content Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncContentClientStreaming(self) + self.with_raw_response = _AsyncContentClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + agent_rid: aip_agents_models.AgentRid, + session_rid: aip_agents_models.SessionRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[aip_agents_models.Content]: + """ + Get the conversation content for a session between the calling user and an Agent. + :param agent_rid: An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). + :type agent_rid: AgentRid + :param session_rid: The Resource Identifier (RID) of the conversation session. + :type session_rid: SessionRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[aip_agents_models.Content] + + :raises AgentNotFound: The given Agent could not be found. + :raises ContentNotFound: The given Content could not be found. + :raises SessionNotFound: The given Session could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}/content", + query_params={ + "preview": preview, + }, + path_params={ + "agentRid": agent_rid, + "sessionRid": session_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=aip_agents_models.Content, + request_timeout=request_timeout, + throwable_errors={ + "AgentNotFound": aip_agents_errors.AgentNotFound, + "ContentNotFound": aip_agents_errors.ContentNotFound, + "SessionNotFound": aip_agents_errors.SessionNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _AsyncContentClientRaw: + def __init__(self, client: AsyncContentClient) -> None: + def get(_: aip_agents_models.Content): ... + + self.get = core.async_with_raw_response(get, client.get) + + +class _AsyncContentClientStreaming: + def __init__(self, client: AsyncContentClient) -> None: + def get(_: aip_agents_models.Content): ... + + self.get = core.async_with_streaming_response(get, client.get) diff --git a/foundry_sdk/v2/aip_agents/errors.py b/foundry_sdk/v2/aip_agents/errors.py new file mode 100644 index 000000000..8bc4fe3df --- /dev/null +++ b/foundry_sdk/v2/aip_agents/errors.py @@ -0,0 +1,647 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing +from dataclasses import dataclass + +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v2.aip_agents import models as aip_agents_models +from foundry_sdk.v2.ontologies import models as ontologies_models + + +class AgentIterationsExceededLimitParameters(typing_extensions.TypedDict): + """ + The Agent was unable to produce an answer in the set number of maximum iterations. + This can happen if the Agent gets confused or stuck in a loop, or if the query is too complex. + Try a different query or review the Agent configuration in AIP Agent Studio. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + agentRid: aip_agents_models.AgentRid + sessionRid: aip_agents_models.SessionRid + details: str + """Any additional details provided for the error.""" + + +@dataclass +class AgentIterationsExceededLimit(errors.BadRequestError): + name: typing.Literal["AgentIterationsExceededLimit"] + parameters: AgentIterationsExceededLimitParameters + error_instance_id: str + + +class AgentNotFoundParameters(typing_extensions.TypedDict): + """The given Agent could not be found.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + agentRid: aip_agents_models.AgentRid + """An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/).""" + + +@dataclass +class AgentNotFound(errors.NotFoundError): + name: typing.Literal["AgentNotFound"] + parameters: AgentNotFoundParameters + error_instance_id: str + + +class AgentVersionNotFoundParameters(typing_extensions.TypedDict): + """The given AgentVersion could not be found.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + agentRid: aip_agents_models.AgentRid + """An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/).""" + + agentVersionString: aip_agents_models.AgentVersionString + """The semantic version of the Agent, formatted as "majorVersion.minorVersion".""" + + +@dataclass +class AgentVersionNotFound(errors.NotFoundError): + name: typing.Literal["AgentVersionNotFound"] + parameters: AgentVersionNotFoundParameters + error_instance_id: str + + +class BlockingContinueSessionPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not blockingContinue the Session.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + agentRid: aip_agents_models.AgentRid + """An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/).""" + + sessionRid: aip_agents_models.SessionRid + """The Resource Identifier (RID) of the conversation session.""" + + +@dataclass +class BlockingContinueSessionPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["BlockingContinueSessionPermissionDenied"] + parameters: BlockingContinueSessionPermissionDeniedParameters + error_instance_id: str + + +class CancelSessionFailedMessageNotInProgressParameters(typing_extensions.TypedDict): + """ + Unable to cancel the requested session exchange as no in-progress exchange was found + for the provided message identifier. + This is expected if no exchange was initiated with the provided message identifier + through a `streamingContinue` request, or if the exchange for this identifier has already completed + and cannot be canceled, or if the exchange has already been canceled. + This error can also occur if the cancellation was requested immediately after requesting the exchange + through a `streamingContinue` request, and the exchange has not started yet. + Clients should handle these errors gracefully, and can reload the session content to get the latest + conversation state. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + messageId: aip_agents_models.MessageId + """The message identifier that was requested for cancellation.""" + + agentRid: aip_agents_models.AgentRid + sessionRid: aip_agents_models.SessionRid + + +@dataclass +class CancelSessionFailedMessageNotInProgress(errors.BadRequestError): + name: typing.Literal["CancelSessionFailedMessageNotInProgress"] + parameters: CancelSessionFailedMessageNotInProgressParameters + error_instance_id: str + + +class CancelSessionPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not cancel the Session.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + agentRid: aip_agents_models.AgentRid + """An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/).""" + + sessionRid: aip_agents_models.SessionRid + """The Resource Identifier (RID) of the conversation session.""" + + +@dataclass +class CancelSessionPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["CancelSessionPermissionDenied"] + parameters: CancelSessionPermissionDeniedParameters + error_instance_id: str + + +class ContentNotFoundParameters(typing_extensions.TypedDict): + """The given Content could not be found.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + agentRid: aip_agents_models.AgentRid + """An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/).""" + + sessionRid: aip_agents_models.SessionRid + """The Resource Identifier (RID) of the conversation session.""" + + +@dataclass +class ContentNotFound(errors.NotFoundError): + name: typing.Literal["ContentNotFound"] + parameters: ContentNotFoundParameters + error_instance_id: str + + +class ContextSizeExceededLimitParameters(typing_extensions.TypedDict): + """ + Failed to generate a response for a session because the context size of the LLM has been exceeded. + Clients should either retry with a shorter message or create a new session and try re-sending the message. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + agentRid: aip_agents_models.AgentRid + sessionRid: aip_agents_models.SessionRid + details: str + """Any additional details provided for the error.""" + + +@dataclass +class ContextSizeExceededLimit(errors.BadRequestError): + name: typing.Literal["ContextSizeExceededLimit"] + parameters: ContextSizeExceededLimitParameters + error_instance_id: str + + +class CreateSessionPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not create the Session.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + agentRid: aip_agents_models.AgentRid + """An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/).""" + + +@dataclass +class CreateSessionPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["CreateSessionPermissionDenied"] + parameters: CreateSessionPermissionDeniedParameters + error_instance_id: str + + +class DeleteSessionPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not delete the Session.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + agentRid: aip_agents_models.AgentRid + """An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/).""" + + sessionRid: aip_agents_models.SessionRid + """The Resource Identifier (RID) of the conversation session.""" + + +@dataclass +class DeleteSessionPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["DeleteSessionPermissionDenied"] + parameters: DeleteSessionPermissionDeniedParameters + error_instance_id: str + + +class FunctionLocatorNotFoundParameters(typing_extensions.TypedDict): + """ + The specified function locator is configured for use by the Agent but could not be found. + The function type or version may not exist or the client token does not have access. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + agentRid: aip_agents_models.AgentRid + sessionRid: typing_extensions.NotRequired[aip_agents_models.SessionRid] + """The session RID where the error occurred. This is omitted if the error occurred during session creation.""" + + functionRid: core.RID + functionVersion: str + + +@dataclass +class FunctionLocatorNotFound(errors.NotFoundError): + name: typing.Literal["FunctionLocatorNotFound"] + parameters: FunctionLocatorNotFoundParameters + error_instance_id: str + + +class GetAllSessionsAgentsPermissionDeniedParameters(typing_extensions.TypedDict): + """ + The calling user does not have permission to list all sessions across all Agents. + Listing all sessions across all agents requires the `api:aip-agents-write` scope. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class GetAllSessionsAgentsPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["GetAllSessionsAgentsPermissionDenied"] + parameters: GetAllSessionsAgentsPermissionDeniedParameters + error_instance_id: str + + +class GetRagContextForSessionPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not ragContext the Session.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + agentRid: aip_agents_models.AgentRid + """An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/).""" + + sessionRid: aip_agents_models.SessionRid + """The Resource Identifier (RID) of the conversation session.""" + + +@dataclass +class GetRagContextForSessionPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["GetRagContextForSessionPermissionDenied"] + parameters: GetRagContextForSessionPermissionDeniedParameters + error_instance_id: str + + +class InvalidAgentVersionParameters(typing_extensions.TypedDict): + """The provided version string is not a valid format for an Agent version.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + agentRid: aip_agents_models.AgentRid + version: aip_agents_models.AgentVersionString + + +@dataclass +class InvalidAgentVersion(errors.BadRequestError): + name: typing.Literal["InvalidAgentVersion"] + parameters: InvalidAgentVersionParameters + error_instance_id: str + + +class InvalidParameterParameters(typing_extensions.TypedDict): + """ + The provided application variable is not valid for the Agent for this session. + Check the available application variables for the Agent under the `parameters` property, and version through the API with `getAgent`, or in AIP Agent Studio. + The Agent version used for the session can be checked through the API with `getSession`. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + agentRid: aip_agents_models.AgentRid + sessionRid: aip_agents_models.SessionRid + parameter: aip_agents_models.ParameterId + + +@dataclass +class InvalidParameter(errors.BadRequestError): + name: typing.Literal["InvalidParameter"] + parameters: InvalidParameterParameters + error_instance_id: str + + +class InvalidParameterTypeParameters(typing_extensions.TypedDict): + """ + The provided value does not match the expected type for the application variable configured on the Agent for this session. + Check the available application variables for the Agent under the `parameters` property, and version through the API with `getAgent`, or in AIP Agent Studio. + The Agent version used for the session can be checked through the API with `getSession`. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + agentRid: aip_agents_models.AgentRid + sessionRid: aip_agents_models.SessionRid + parameter: aip_agents_models.ParameterId + expectedType: str + receivedType: str + + +@dataclass +class InvalidParameterType(errors.BadRequestError): + name: typing.Literal["InvalidParameterType"] + parameters: InvalidParameterTypeParameters + error_instance_id: str + + +class ListSessionsForAgentsPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not allSessions the Agent.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class ListSessionsForAgentsPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["ListSessionsForAgentsPermissionDenied"] + parameters: ListSessionsForAgentsPermissionDeniedParameters + error_instance_id: str + + +class NoPublishedAgentVersionParameters(typing_extensions.TypedDict): + """ + Failed to retrieve the latest published version of the Agent because the Agent has no published versions. + Try publishing the Agent in AIP Agent Studio to use the latest published version, or specify the version of the Agent to use. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + agentRid: aip_agents_models.AgentRid + + +@dataclass +class NoPublishedAgentVersion(errors.BadRequestError): + name: typing.Literal["NoPublishedAgentVersion"] + parameters: NoPublishedAgentVersionParameters + error_instance_id: str + + +class ObjectTypeIdsNotFoundParameters(typing_extensions.TypedDict): + """ + Some object types are configured for use by the Agent but could not be found. + The object types either do not exist or the client token does not have access. + Object types can be checked by listing available object types through the API, or searching in [Ontology Manager](https://palantir.com/docs/foundry/ontology-manager/overview/). + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + agentRid: aip_agents_models.AgentRid + sessionRid: typing_extensions.NotRequired[aip_agents_models.SessionRid] + """The session RID where the error occurred. This is omitted if the error occurred during session creation.""" + + objectTypeIds: typing.List[ontologies_models.ObjectTypeId] + + +@dataclass +class ObjectTypeIdsNotFound(errors.NotFoundError): + name: typing.Literal["ObjectTypeIdsNotFound"] + parameters: ObjectTypeIdsNotFoundParameters + error_instance_id: str + + +class ObjectTypeRidsNotFoundParameters(typing_extensions.TypedDict): + """ + Some object types are configured for use by the Agent but could not be found. + The object types either do not exist or the client token does not have access. + Object types can be checked by listing available object types through the API, or searching in [Ontology Manager](https://palantir.com/docs/foundry/ontology-manager/overview/). + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + agentRid: aip_agents_models.AgentRid + sessionRid: typing_extensions.NotRequired[aip_agents_models.SessionRid] + """The session RID where the error occurred. This is omitted if the error occurred during session creation.""" + + objectTypeRids: typing.List[ontologies_models.ObjectTypeRid] + + +@dataclass +class ObjectTypeRidsNotFound(errors.NotFoundError): + name: typing.Literal["ObjectTypeRidsNotFound"] + parameters: ObjectTypeRidsNotFoundParameters + error_instance_id: str + + +class OntologyEntitiesNotFoundParameters(typing_extensions.TypedDict): + """ + Some ontology types are configured for use by the Agent but could not be found. + The types either do not exist or the client token does not have access. + Object types and their link types can be checked by listing available object/link types through the API, or searching in [Ontology Manager](https://palantir.com/docs/foundry/ontology-manager/overview/). + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + agentRid: aip_agents_models.AgentRid + sessionRid: typing_extensions.NotRequired[aip_agents_models.SessionRid] + """The session RID where the error occurred. This is omitted if the error occurred during session creation.""" + + objectTypeRids: typing.List[ontologies_models.ObjectTypeRid] + linkTypeRids: typing.List[ontologies_models.LinkTypeRid] + + +@dataclass +class OntologyEntitiesNotFound(errors.NotFoundError): + name: typing.Literal["OntologyEntitiesNotFound"] + parameters: OntologyEntitiesNotFoundParameters + error_instance_id: str + + +class RateLimitExceededParameters(typing_extensions.TypedDict): + """Failed to generate a response as the model rate limits were exceeded. Clients should wait and retry.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + agentRid: aip_agents_models.AgentRid + sessionRid: aip_agents_models.SessionRid + details: str + """Any additional details provided for the error.""" + + +@dataclass +class RateLimitExceeded(errors.BadRequestError): + name: typing.Literal["RateLimitExceeded"] + parameters: RateLimitExceededParameters + error_instance_id: str + + +class RetryAttemptsExceededParameters(typing_extensions.TypedDict): + """Failed to generate a response after retrying up to the configured number of retry attempts. Clients should wait and retry.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + agentRid: aip_agents_models.AgentRid + sessionRid: aip_agents_models.SessionRid + details: str + """Any additional details provided for the error.""" + + +@dataclass +class RetryAttemptsExceeded(errors.BadRequestError): + name: typing.Literal["RetryAttemptsExceeded"] + parameters: RetryAttemptsExceededParameters + error_instance_id: str + + +class RetryDeadlineExceededParameters(typing_extensions.TypedDict): + """Failed to generate a response after retrying up to the configured retry deadline. Clients should wait and retry.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + agentRid: aip_agents_models.AgentRid + sessionRid: aip_agents_models.SessionRid + details: str + """Any additional details provided for the error.""" + + +@dataclass +class RetryDeadlineExceeded(errors.BadRequestError): + name: typing.Literal["RetryDeadlineExceeded"] + parameters: RetryDeadlineExceededParameters + error_instance_id: str + + +class SessionExecutionFailedParameters(typing_extensions.TypedDict): + """Failed to generate a response for a session due to an unexpected error.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + agentRid: aip_agents_models.AgentRid + sessionRid: aip_agents_models.SessionRid + message: str + """The error message.""" + + details: str + """Any additional details provided for the error.""" + + +@dataclass +class SessionExecutionFailed(errors.InternalServerError): + name: typing.Literal["SessionExecutionFailed"] + parameters: SessionExecutionFailedParameters + error_instance_id: str + + +class SessionNotFoundParameters(typing_extensions.TypedDict): + """The given Session could not be found.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + agentRid: aip_agents_models.AgentRid + """An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/).""" + + sessionRid: aip_agents_models.SessionRid + """The Resource Identifier (RID) of the conversation session.""" + + +@dataclass +class SessionNotFound(errors.NotFoundError): + name: typing.Literal["SessionNotFound"] + parameters: SessionNotFoundParameters + error_instance_id: str + + +class SessionTraceIdAlreadyExistsParameters(typing_extensions.TypedDict): + """The provided trace ID already exists for the session and cannot be reused.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + agentRid: aip_agents_models.AgentRid + sessionRid: aip_agents_models.SessionRid + sessionTraceId: aip_agents_models.SessionTraceId + + +@dataclass +class SessionTraceIdAlreadyExists(errors.BadRequestError): + name: typing.Literal["SessionTraceIdAlreadyExists"] + parameters: SessionTraceIdAlreadyExistsParameters + error_instance_id: str + + +class SessionTraceNotFoundParameters(typing_extensions.TypedDict): + """The given SessionTrace could not be found.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + sessionTraceId: aip_agents_models.SessionTraceId + """The unique identifier for the trace.""" + + agentRid: aip_agents_models.AgentRid + """An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/).""" + + sessionRid: aip_agents_models.SessionRid + """The Resource Identifier (RID) of the conversation session.""" + + +@dataclass +class SessionTraceNotFound(errors.NotFoundError): + name: typing.Literal["SessionTraceNotFound"] + parameters: SessionTraceNotFoundParameters + error_instance_id: str + + +class StreamingContinueSessionPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not streamingContinue the Session.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + agentRid: aip_agents_models.AgentRid + """An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/).""" + + sessionRid: aip_agents_models.SessionRid + """The Resource Identifier (RID) of the conversation session.""" + + +@dataclass +class StreamingContinueSessionPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["StreamingContinueSessionPermissionDenied"] + parameters: StreamingContinueSessionPermissionDeniedParameters + error_instance_id: str + + +class UpdateSessionTitlePermissionDeniedParameters(typing_extensions.TypedDict): + """Could not updateTitle the Session.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + agentRid: aip_agents_models.AgentRid + """An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/).""" + + sessionRid: aip_agents_models.SessionRid + """The Resource Identifier (RID) of the conversation session.""" + + +@dataclass +class UpdateSessionTitlePermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["UpdateSessionTitlePermissionDenied"] + parameters: UpdateSessionTitlePermissionDeniedParameters + error_instance_id: str + + +__all__ = [ + "AgentIterationsExceededLimit", + "AgentNotFound", + "AgentVersionNotFound", + "BlockingContinueSessionPermissionDenied", + "CancelSessionFailedMessageNotInProgress", + "CancelSessionPermissionDenied", + "ContentNotFound", + "ContextSizeExceededLimit", + "CreateSessionPermissionDenied", + "DeleteSessionPermissionDenied", + "FunctionLocatorNotFound", + "GetAllSessionsAgentsPermissionDenied", + "GetRagContextForSessionPermissionDenied", + "InvalidAgentVersion", + "InvalidParameter", + "InvalidParameterType", + "ListSessionsForAgentsPermissionDenied", + "NoPublishedAgentVersion", + "ObjectTypeIdsNotFound", + "ObjectTypeRidsNotFound", + "OntologyEntitiesNotFound", + "RateLimitExceeded", + "RetryAttemptsExceeded", + "RetryDeadlineExceeded", + "SessionExecutionFailed", + "SessionNotFound", + "SessionTraceIdAlreadyExists", + "SessionTraceNotFound", + "StreamingContinueSessionPermissionDenied", + "UpdateSessionTitlePermissionDenied", +] diff --git a/foundry_sdk/v2/aip_agents/models.py b/foundry_sdk/v2/aip_agents/models.py new file mode 100644 index 000000000..60ad77bfd --- /dev/null +++ b/foundry_sdk/v2/aip_agents/models.py @@ -0,0 +1,722 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk.v2.core import models as core_models +from foundry_sdk.v2.functions import models as functions_models +from foundry_sdk.v2.ontologies import models as ontologies_models + + +class Agent(core.ModelBase): + """Agent""" + + rid: AgentRid + """An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/).""" + + version: AgentVersionString + """The version of this instance of the Agent.""" + + metadata: AgentMetadata + parameters: typing.Dict[ParameterId, Parameter] + """ + The types and names of variables configured for the Agent in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/) in the [application state](https://palantir.com/docs/foundry/agent-studio/application-state/). + These variables can be used to send custom values in prompts sent to an Agent to customize and control the Agent's behavior. + """ + + +AgentMarkdownResponse = str +"""The final answer for an exchange. Responses are formatted using markdown.""" + + +class AgentMetadata(core.ModelBase): + """Metadata for an Agent.""" + + display_name: str = pydantic.Field(alias=str("displayName")) # type: ignore[literal-required] + """The name of the Agent.""" + + description: typing.Optional[str] = None + """The description for the Agent.""" + + input_placeholder: typing.Optional[str] = pydantic.Field(alias=str("inputPlaceholder"), default=None) # type: ignore[literal-required] + """The default text to show as the placeholder input for chats with the Agent.""" + + suggested_prompts: typing.List[str] = pydantic.Field(alias=str("suggestedPrompts")) # type: ignore[literal-required] + """Prompts to show to the user as example messages to start a conversation with the Agent.""" + + +AgentRid = core.RID +"""An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/).""" + + +class AgentSessionRagContextResponse(core.ModelBase): + """Context retrieved from an Agent's configured context data sources which was relevant to the supplied user message.""" + + object_contexts: typing.List[ObjectContext] = pydantic.Field(alias=str("objectContexts")) # type: ignore[literal-required] + function_retrieved_contexts: typing.List[FunctionRetrievedContext] = pydantic.Field(alias=str("functionRetrievedContexts")) # type: ignore[literal-required] + + +class AgentVersion(core.ModelBase): + """AgentVersion""" + + string: AgentVersionString + """The semantic version of the Agent, formatted as "majorVersion.minorVersion".""" + + version: AgentVersionDetails + """Semantic version details of the Agent.""" + + +class AgentVersionDetails(core.ModelBase): + """Semantic version details for an Agent.""" + + major: int + """The major version of the Agent. Incremented every time the Agent is published.""" + + minor: int + """The minor version of the Agent. Incremented every time the Agent is saved.""" + + +AgentVersionString = str +"""The semantic version of the Agent, formatted as "majorVersion.minorVersion".""" + + +class AgentsSessionsPage(core.ModelBase): + """ + A page of results for sessions across all accessible Agents for the calling user. + Sessions are returned in order of most recently updated first. + """ + + next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] + """ + The page token that should be used when requesting the next page of results. + Empty if there are no more results to retrieve. + """ + + data: typing.List[Session] + + +class BlockingContinueSessionRequest(core.ModelBase): + """BlockingContinueSessionRequest""" + + user_input: UserTextInput = pydantic.Field(alias=str("userInput")) # type: ignore[literal-required] + """The user message for the Agent to respond to.""" + + parameter_inputs: typing.Dict[ParameterId, ParameterValue] = pydantic.Field(alias=str("parameterInputs")) # type: ignore[literal-required] + """Any supplied values for [application variables](https://palantir.com/docs/foundry/agent-studio/application-state/) to pass to the Agent for the exchange.""" + + contexts_override: typing.Optional[typing.List[InputContext]] = pydantic.Field(alias=str("contextsOverride"), default=None) # type: ignore[literal-required] + """ + If set, automatic [context retrieval](https://palantir.com/docs/foundry/agent-studio/retrieval-context/) is skipped and the list of specified context is provided to the Agent instead. + If omitted, relevant context for the user message is automatically retrieved and included in the prompt, based on data sources configured on the Agent for the session. + """ + + session_trace_id: typing.Optional[SessionTraceId] = pydantic.Field(alias=str("sessionTraceId"), default=None) # type: ignore[literal-required] + """ + The unique identifier to use for this continue session trace. By generating and passing this ID to the + `blockingContinue` endpoint, clients can use this trace ID to separately load details of the trace used + to generate a result, while the result is in progress. If omitted, it will be generated automatically. + Clients can check the generated ID by inspecting the `sessionTraceId` in the `SessionExchangeResult`. + """ + + +class CancelSessionRequest(core.ModelBase): + """CancelSessionRequest""" + + message_id: MessageId = pydantic.Field(alias=str("messageId")) # type: ignore[literal-required] + """ + The identifier for the in-progress exchange to cancel. + This should match the `messageId` which was provided when initiating the exchange with `streamingContinue`. + """ + + response: typing.Optional[AgentMarkdownResponse] = None + """ + When specified, the exchange is added to the session with the client-provided response as the result. + When omitted, the exchange is not added to the session. + """ + + +class CancelSessionResponse(core.ModelBase): + """CancelSessionResponse""" + + result: typing.Optional[SessionExchangeResult] = None + """ + If the `response` field was specified, this returns the result that was added to the session for the canceled exchange, with the client-provided response. + If no `response` was specified in the request, this returns an empty response, as no exchange was added to the session. + """ + + +class Content(core.ModelBase): + """Content""" + + exchanges: typing.List[SessionExchange] + """ + The conversation history for the session, represented as a list of exchanges. + Each exchange represents an initiating message from the user and the Agent's response. + Exchanges are returned in chronological order, starting with the first exchange. + """ + + +class CreateSessionRequest(core.ModelBase): + """CreateSessionRequest""" + + agent_version: typing.Optional[AgentVersionString] = pydantic.Field(alias=str("agentVersion"), default=None) # type: ignore[literal-required] + """ + The version of the Agent associated with the session. + This can be set by clients on session creation. + If not specified, defaults to use the latest published version of the Agent at session creation time. + """ + + +class FailureToolCallOutput(core.ModelBase): + """The failed output of a tool call.""" + + correction_message: str = pydantic.Field(alias=str("correctionMessage")) # type: ignore[literal-required] + """ + The correction message returned by the tool if the tool call was not successful. + This is a message that the tool returned to the Agent, which may be used to correct the + Agent's input to the tool. + """ + + type: typing.Literal["failure"] = "failure" + + +class FunctionRetrievedContext(core.ModelBase): + """Context retrieved from running a function to include as additional context in the prompt to the Agent.""" + + function_rid: functions_models.FunctionRid = pydantic.Field(alias=str("functionRid")) # type: ignore[literal-required] + function_version: functions_models.FunctionVersion = pydantic.Field(alias=str("functionVersion")) # type: ignore[literal-required] + retrieved_prompt: str = pydantic.Field(alias=str("retrievedPrompt")) # type: ignore[literal-required] + """String content returned from a context retrieval function.""" + + type: typing.Literal["functionRetrievedContext"] = "functionRetrievedContext" + + +class GetRagContextForSessionRequest(core.ModelBase): + """GetRagContextForSessionRequest""" + + user_input: UserTextInput = pydantic.Field(alias=str("userInput")) # type: ignore[literal-required] + """The user message to retrieve relevant context for from the configured Agent data sources.""" + + parameter_inputs: typing.Dict[ParameterId, ParameterValue] = pydantic.Field(alias=str("parameterInputs")) # type: ignore[literal-required] + """Any values for [application variables](https://palantir.com/docs/foundry/agent-studio/application-state/) to use for the context retrieval.""" + + +InputContext = typing_extensions.Annotated[ + typing.Union["FunctionRetrievedContext", "ObjectContext"], pydantic.Field(discriminator="type") +] +"""Custom retrieved [context](https://palantir.com/docs/foundry/agent-studio/retrieval-context/) to provide to an Agent for continuing a session.""" + + +class ListAgentVersionsResponse(core.ModelBase): + """ListAgentVersionsResponse""" + + data: typing.List[AgentVersion] + next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] + + +class ListSessionsResponse(core.ModelBase): + """ListSessionsResponse""" + + data: typing.List[Session] + next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] + + +MessageId = core.UUID +""" +An ephemeral client-generated Universally Unique Identifier (UUID) to identify a message for streamed session responses. +This can be used by clients to cancel a streamed exchange. +""" + + +class ObjectContext(core.ModelBase): + """Details of relevant retrieved object instances for a user's message to include as additional context in the prompt to the Agent.""" + + object_rids: typing.List[ontologies_models.ObjectRid] = pydantic.Field(alias=str("objectRids")) # type: ignore[literal-required] + """The RIDs of the relevant object instances to include in the prompt.""" + + property_type_rids: typing.List[ontologies_models.PropertyTypeRid] = pydantic.Field(alias=str("propertyTypeRids")) # type: ignore[literal-required] + """The RIDs of the property types for the given objects to include in the prompt.""" + + type: typing.Literal["objectContext"] = "objectContext" + + +class ObjectSetParameter(core.ModelBase): + """ObjectSetParameter""" + + expected_object_types: typing.List[ontologies_models.ObjectTypeId] = pydantic.Field(alias=str("expectedObjectTypes")) # type: ignore[literal-required] + """The types of objects that are expected in ObjectSet values passed for this variable.""" + + type: typing.Literal["objectSet"] = "objectSet" + + +class ObjectSetParameterValue(core.ModelBase): + """A value passed for `ObjectSetParameter` application variable types.""" + + object_set: ontologies_models.ObjectSet = pydantic.Field(alias=str("objectSet")) # type: ignore[literal-required] + ontology: ontologies_models.OntologyIdentifier + """ + The API name of the Ontology for the provided `ObjectSet`. + To find the API name, use the `List ontologies` endpoint or check the [Ontology Manager](https://palantir.com/docs/foundry/ontology-manager/overview/). + """ + + type: typing.Literal["objectSet"] = "objectSet" + + +class ObjectSetParameterValueUpdate(core.ModelBase): + """ObjectSetParameterValueUpdate""" + + value: ontologies_models.ObjectSetRid + type: typing.Literal["objectSet"] = "objectSet" + + +class Parameter(core.ModelBase): + """A variable configured in the application state of an Agent in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/).""" + + parameter_type: ParameterType = pydantic.Field(alias=str("parameterType")) # type: ignore[literal-required] + """Details of the types of values accepted and defaults for this variable.""" + + access: ParameterAccessMode + """The access mode controls how the Agent is able to interact with the variable.""" + + description: typing.Optional[str] = None + """ + A description to explain the use of this variable. + This description is injected into the Agent's prompt to provide context for when to use the variable. + """ + + +ParameterAccessMode = typing.Literal["READ_ONLY", "READ_WRITE"] +""" +READ_ONLY: Allows the variable to be read by the Agent, but the Agent cannot generate updates for it. +READ_WRITE: Allows the variable to be read and updated by the Agent. +""" + + +ParameterId = str +"""The unique identifier for a variable configured in the application state of an Agent in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/).""" + + +ParameterType = typing_extensions.Annotated[ + typing.Union["StringParameter", "ObjectSetParameter"], pydantic.Field(discriminator="type") +] +"""ParameterType""" + + +ParameterValue = typing_extensions.Annotated[ + typing.Union["StringParameterValue", "ObjectSetParameterValue"], + pydantic.Field(discriminator="type"), +] +"""The value provided for a variable configured in the [application state](https://palantir.com/docs/foundry/agent-studio/application-state/) of an Agent.""" + + +ParameterValueUpdate = typing_extensions.Annotated[ + typing.Union["StringParameterValue", "ObjectSetParameterValueUpdate"], + pydantic.Field(discriminator="type"), +] +""" +A value update for an [application variable](https://palantir.com/docs/foundry/agent-studio/application-state/) generated by the Agent. +For `StringParameter` types, this will be the updated string value. +For `ObjectSetParameter` types, this will be a Resource Identifier (RID) for the updated object set. +""" + + +class RidToolInputValue(core.ModelBase): + """A Resource Identifier (RID) that was passed as input to a tool.""" + + rid: core.RID + type: typing.Literal["rid"] = "rid" + + +class RidToolOutputValue(core.ModelBase): + """A Resource Identifier (RID) value that was returned from a tool.""" + + rid: core.RID + type: typing.Literal["rid"] = "rid" + + +class Session(core.ModelBase): + """Session""" + + rid: SessionRid + """The Resource Identifier (RID) of the conversation session.""" + + metadata: SessionMetadata + """Metadata about the session.""" + + agent_rid: AgentRid = pydantic.Field(alias=str("agentRid")) # type: ignore[literal-required] + """The Resource Identifier (RID) of the Agent associated with the session.""" + + agent_version: AgentVersionString = pydantic.Field(alias=str("agentVersion")) # type: ignore[literal-required] + """ + The version of the Agent associated with the session. + This can be set by clients on session creation. + If not specified, defaults to use the latest published version of the Agent at session creation time. + """ + + +class SessionExchange(core.ModelBase): + """Represents an individual exchange between a user and an Agent in a conversation session.""" + + user_input: UserTextInput = pydantic.Field(alias=str("userInput")) # type: ignore[literal-required] + """The user message that initiated the exchange.""" + + contexts: typing.Optional[SessionExchangeContexts] = None + """ + Additional retrieved context that was included in the prompt to the Agent. + This may include context that was passed by the client with the user input, or relevant context that was automatically retrieved and added based on available data sources configured on the Agent. + Empty if no additional context was included in the prompt. + """ + + result: SessionExchangeResult + """The final result for the exchange.""" + + +class SessionExchangeContexts(core.ModelBase): + """Retrieved context which was passed to the Agent as input for the exchange.""" + + object_contexts: typing.List[ObjectContext] = pydantic.Field(alias=str("objectContexts")) # type: ignore[literal-required] + """Relevant object context for the user's message that was included in the prompt to the Agent.""" + + function_retrieved_contexts: typing.List[FunctionRetrievedContext] = pydantic.Field(alias=str("functionRetrievedContexts")) # type: ignore[literal-required] + """Context retrieved from running a function that was included as additional context in the prompt to the Agent.""" + + +class SessionExchangeResult(core.ModelBase): + """The returned result from the Agent for a session exchange.""" + + agent_markdown_response: AgentMarkdownResponse = pydantic.Field(alias=str("agentMarkdownResponse")) # type: ignore[literal-required] + """The final text response generated by the Agent. Responses are formatted using markdown.""" + + parameter_updates: typing.Dict[ParameterId, ParameterValueUpdate] = pydantic.Field(alias=str("parameterUpdates")) # type: ignore[literal-required] + """ + Any updates to application variable values which were generated by the Agent for this exchange. + Updates can only be generated for application variables configured with `READ_WRITE` access on the Agent in AIP Agent Studio. + """ + + total_tokens_used: typing.Optional[int] = pydantic.Field(alias=str("totalTokensUsed"), default=None) # type: ignore[literal-required] + """Total tokens used to compute the result. Omitted if token usage information is not supported by the model used for the session.""" + + interrupted_output: bool = pydantic.Field(alias=str("interruptedOutput")) # type: ignore[literal-required] + """ + True if the exchange was canceled. + In that case, the response (if any) was provided by the client as part of the cancellation request rather than by the Agent. + """ + + session_trace_id: SessionTraceId = pydantic.Field(alias=str("sessionTraceId")) # type: ignore[literal-required] + """ + The unique identifier for the session trace. The session trace lists the sequence of steps that an Agent + takes to arrive at an answer. For example, a trace may include steps such as context retrieval and tool calls. + """ + + +class SessionMetadata(core.ModelBase): + """Metadata for a conversation session with an Agent.""" + + title: str + """The title of the session.""" + + created_time: core.AwareDatetime = pydantic.Field(alias=str("createdTime")) # type: ignore[literal-required] + """The time the session was created.""" + + updated_time: core.AwareDatetime = pydantic.Field(alias=str("updatedTime")) # type: ignore[literal-required] + """The time the session was last updated.""" + + message_count: int = pydantic.Field(alias=str("messageCount")) # type: ignore[literal-required] + """ + The count of messages in the session. + Includes both user messages and Agent replies, so each complete exchange counts as two messages. + """ + + estimated_expires_time: core.AwareDatetime = pydantic.Field(alias=str("estimatedExpiresTime")) # type: ignore[literal-required] + """ + The estimated time at which the session is due to expire. + Once a session has expired, it can no longer be accessed and a new session must be created. + The expiry time is automatically extended when new exchanges are added to the session. + """ + + +SessionRid = core.RID +"""The Resource Identifier (RID) of the conversation session.""" + + +class SessionTrace(core.ModelBase): + """SessionTrace""" + + id: SessionTraceId + """The unique identifier for the trace.""" + + status: SessionTraceStatus + """ + This indicates whether the Agent has finished generating the final response. Clients should keep polling + the `getSessionTrace` endpoint until the status is `COMPLETE`. + """ + + contexts: typing.Optional[SessionExchangeContexts] = None + """ + Any additional context which was provided by the client or retrieved automatically by the agent, grouped + by context type. Empty if no additional context was provided or configured to be automatically + retrieved. A present SessionExchangeContexts object with empty lists indicates that context retrieval + was attempted but no context was found. + Note that this field will only be populated once the response generation has completed. + """ + + tool_call_groups: typing.List[ToolCallGroup] = pydantic.Field(alias=str("toolCallGroups")) # type: ignore[literal-required] + """ + List of tool call groups that were triggered at the same point in the trace for the agent response + generation. The groups are returned in the same order as they were triggered by the agent. + """ + + +SessionTraceId = core.UUID +""" +The unique identifier for a trace. The trace lists the sequence of steps that an Agent took to arrive at an +answer. For example, a trace may include steps such as context retrieval and tool calls. +""" + + +SessionTraceStatus = typing.Literal["IN_PROGRESS", "COMPLETE"] +"""SessionTraceStatus""" + + +class StreamingContinueSessionRequest(core.ModelBase): + """StreamingContinueSessionRequest""" + + user_input: UserTextInput = pydantic.Field(alias=str("userInput")) # type: ignore[literal-required] + """The user message for the Agent to respond to.""" + + parameter_inputs: typing.Dict[ParameterId, ParameterValue] = pydantic.Field(alias=str("parameterInputs")) # type: ignore[literal-required] + """Any supplied values for [application variables](https://palantir.com/docs/foundry/agent-studio/application-state/) to pass to the Agent for the exchange.""" + + contexts_override: typing.Optional[typing.List[InputContext]] = pydantic.Field(alias=str("contextsOverride"), default=None) # type: ignore[literal-required] + """ + If set, automatic [context](https://palantir.com/docs/foundry/agent-studio/retrieval-context/) retrieval is skipped and the list of specified context is provided to the Agent instead. + If omitted, relevant context for the user message is automatically retrieved and included in the prompt, based on data sources configured on the Agent for the session. + """ + + message_id: typing.Optional[MessageId] = pydantic.Field(alias=str("messageId"), default=None) # type: ignore[literal-required] + """A client-generated Universally Unique Identifier (UUID) to identify the message, which the client can use to cancel the exchange before the streaming response is complete.""" + + session_trace_id: typing.Optional[SessionTraceId] = pydantic.Field(alias=str("sessionTraceId"), default=None) # type: ignore[literal-required] + """ + The unique identifier to use for this continue session trace. By generating and passing this ID to the + `streamingContinue` endpoint, clients can use this trace ID to separately load details of the trace used + to generate a result, while the result is in progress. If omitted, it will be generated automatically. + Clients can check the generated ID by inspecting the `sessionTraceId` in the `SessionExchangeResult`, + which can be loaded via the `getContent` endpoint. + """ + + +class StringParameter(core.ModelBase): + """StringParameter""" + + default_value: typing.Optional[str] = pydantic.Field(alias=str("defaultValue"), default=None) # type: ignore[literal-required] + """The default value to use for this variable.""" + + type: typing.Literal["string"] = "string" + + +class StringParameterValue(core.ModelBase): + """A value passed for `StringParameter` application variable types.""" + + value: str + type: typing.Literal["string"] = "string" + + +class StringToolInputValue(core.ModelBase): + """A string value that was passed as input to a tool.""" + + value: str + type: typing.Literal["string"] = "string" + + +class StringToolOutputValue(core.ModelBase): + """A string value that was returned from a tool.""" + + value: str + type: typing.Literal["string"] = "string" + + +class SuccessToolCallOutput(core.ModelBase): + """The successful output of a tool call.""" + + output: ToolOutputValue + type: typing.Literal["success"] = "success" + + +class ToolCall(core.ModelBase): + """A tool call with its input and output.""" + + tool_metadata: ToolMetadata = pydantic.Field(alias=str("toolMetadata")) # type: ignore[literal-required] + """Details about the tool that was called, including the name and type of the tool.""" + + input: ToolCallInput + output: typing.Optional[ToolCallOutput] = None + """Empty if the tool call is in progress.""" + + +class ToolCallGroup(core.ModelBase): + """List of tool calls that were triggered at the same point in the trace for the agent response generation.""" + + tool_calls: typing.List[ToolCall] = pydantic.Field(alias=str("toolCalls")) # type: ignore[literal-required] + + +class ToolCallInput(core.ModelBase): + """Input parameters for a tool call.""" + + thought: typing.Optional[str] = None + """Any additional message content that the Agent provided for why it chose to call the tool.""" + + inputs: typing.Dict[ToolInputName, ToolInputValue] + + +ToolCallOutput = typing_extensions.Annotated[ + typing.Union["SuccessToolCallOutput", "FailureToolCallOutput"], + pydantic.Field(discriminator="type"), +] +"""The output of a tool call.""" + + +ToolInputName = str +"""The name of a tool input parameter.""" + + +ToolInputValue = typing_extensions.Annotated[ + typing.Union["StringToolInputValue", "RidToolInputValue"], pydantic.Field(discriminator="type") +] +"""A tool input value, which can be either a string or a Resource Identifier (RID).""" + + +class ToolMetadata(core.ModelBase): + """Details about the used tool.""" + + name: str + """The name of the tool that was called, as configured on the Agent.""" + + type: ToolType + """The type of the tool that was called.""" + + +ToolOutputValue = typing_extensions.Annotated[ + typing.Union["StringToolOutputValue", "RidToolOutputValue"], + pydantic.Field(discriminator="type"), +] +"""A tool output value, which can be either a string or a Resource Identifier (RID).""" + + +ToolType = typing.Literal[ + "FUNCTION", + "ACTION", + "ONTOLOGY_SEMANTIC_SEARCH", + "OBJECT_QUERY", + "UPDATE_APPLICATION_VARIABLE", + "REQUEST_CLARIFICATION", + "OBJECT_QUERY_WITH_SQL", + "CODE_EXECUTION", +] +"""ToolType""" + + +class UpdateSessionTitleRequest(core.ModelBase): + """UpdateSessionTitleRequest""" + + title: str + """ + The new title for the session. + The maximum title length is 200 characters. Titles are truncated if they exceed this length. + """ + + +class UserTextInput(core.ModelBase): + """UserTextInput""" + + text: str + """The user message text.""" + + +core.resolve_forward_references(InputContext, globalns=globals(), localns=locals()) +core.resolve_forward_references(ParameterType, globalns=globals(), localns=locals()) +core.resolve_forward_references(ParameterValue, globalns=globals(), localns=locals()) +core.resolve_forward_references(ParameterValueUpdate, globalns=globals(), localns=locals()) +core.resolve_forward_references(ToolCallOutput, globalns=globals(), localns=locals()) +core.resolve_forward_references(ToolInputValue, globalns=globals(), localns=locals()) +core.resolve_forward_references(ToolOutputValue, globalns=globals(), localns=locals()) + +__all__ = [ + "Agent", + "AgentMarkdownResponse", + "AgentMetadata", + "AgentRid", + "AgentSessionRagContextResponse", + "AgentVersion", + "AgentVersionDetails", + "AgentVersionString", + "AgentsSessionsPage", + "BlockingContinueSessionRequest", + "CancelSessionRequest", + "CancelSessionResponse", + "Content", + "CreateSessionRequest", + "FailureToolCallOutput", + "FunctionRetrievedContext", + "GetRagContextForSessionRequest", + "InputContext", + "ListAgentVersionsResponse", + "ListSessionsResponse", + "MessageId", + "ObjectContext", + "ObjectSetParameter", + "ObjectSetParameterValue", + "ObjectSetParameterValueUpdate", + "Parameter", + "ParameterAccessMode", + "ParameterId", + "ParameterType", + "ParameterValue", + "ParameterValueUpdate", + "RidToolInputValue", + "RidToolOutputValue", + "Session", + "SessionExchange", + "SessionExchangeContexts", + "SessionExchangeResult", + "SessionMetadata", + "SessionRid", + "SessionTrace", + "SessionTraceId", + "SessionTraceStatus", + "StreamingContinueSessionRequest", + "StringParameter", + "StringParameterValue", + "StringToolInputValue", + "StringToolOutputValue", + "SuccessToolCallOutput", + "ToolCall", + "ToolCallGroup", + "ToolCallInput", + "ToolCallOutput", + "ToolInputName", + "ToolInputValue", + "ToolMetadata", + "ToolOutputValue", + "ToolType", + "UpdateSessionTitleRequest", + "UserTextInput", +] diff --git a/foundry_sdk/v2/aip_agents/session.py b/foundry_sdk/v2/aip_agents/session.py new file mode 100644 index 000000000..b47d548fa --- /dev/null +++ b/foundry_sdk/v2/aip_agents/session.py @@ -0,0 +1,1542 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing +from functools import cached_property + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v2.aip_agents import errors as aip_agents_errors +from foundry_sdk.v2.aip_agents import models as aip_agents_models +from foundry_sdk.v2.core import models as core_models + + +class SessionClient: + """ + The API client for the Session Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _SessionClientStreaming(self) + self.with_raw_response = _SessionClientRaw(self) + + @cached_property + def Content(self): + from foundry_sdk.v2.aip_agents.content import ContentClient + + return ContentClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @cached_property + def SessionTrace(self): + from foundry_sdk.v2.aip_agents.session_trace import SessionTraceClient + + return SessionTraceClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def blocking_continue( + self, + agent_rid: aip_agents_models.AgentRid, + session_rid: aip_agents_models.SessionRid, + *, + parameter_inputs: typing.Dict[ + aip_agents_models.ParameterId, aip_agents_models.ParameterValue + ], + user_input: aip_agents_models.UserTextInput, + contexts_override: typing.Optional[typing.List[aip_agents_models.InputContext]] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + session_trace_id: typing.Optional[aip_agents_models.SessionTraceId] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> aip_agents_models.SessionExchangeResult: + """ + Continue a conversation session with an Agent, or add the first exchange to a session after creation. + Adds a new exchange to the session with the provided inputs, and generates a response from the Agent. + Blocks on returning the result of the added exchange until the response is fully generated. + Streamed responses are also supported; see `streamingContinue` for details. + Concurrent requests to continue the same session are not supported. + Clients should wait to receive a response before sending the next message. + + :param agent_rid: An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). + :type agent_rid: AgentRid + :param session_rid: The Resource Identifier (RID) of the conversation session. + :type session_rid: SessionRid + :param parameter_inputs: Any supplied values for [application variables](https://palantir.com/docs/foundry/agent-studio/application-state/) to pass to the Agent for the exchange. + :type parameter_inputs: Dict[ParameterId, ParameterValue] + :param user_input: The user message for the Agent to respond to. + :type user_input: UserTextInput + :param contexts_override: If set, automatic [context retrieval](https://palantir.com/docs/foundry/agent-studio/retrieval-context/) is skipped and the list of specified context is provided to the Agent instead. If omitted, relevant context for the user message is automatically retrieved and included in the prompt, based on data sources configured on the Agent for the session. + :type contexts_override: Optional[List[InputContext]] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param session_trace_id: The unique identifier to use for this continue session trace. By generating and passing this ID to the `blockingContinue` endpoint, clients can use this trace ID to separately load details of the trace used to generate a result, while the result is in progress. If omitted, it will be generated automatically. Clients can check the generated ID by inspecting the `sessionTraceId` in the `SessionExchangeResult`. + :type session_trace_id: Optional[SessionTraceId] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: aip_agents_models.SessionExchangeResult + + :raises AgentIterationsExceededLimit: The Agent was unable to produce an answer in the set number of maximum iterations. This can happen if the Agent gets confused or stuck in a loop, or if the query is too complex. Try a different query or review the Agent configuration in AIP Agent Studio. + :raises AgentNotFound: The given Agent could not be found. + :raises BlockingContinueSessionPermissionDenied: Could not blockingContinue the Session. + :raises ContextSizeExceededLimit: Failed to generate a response for a session because the context size of the LLM has been exceeded. Clients should either retry with a shorter message or create a new session and try re-sending the message. + :raises FunctionLocatorNotFound: The specified function locator is configured for use by the Agent but could not be found. The function type or version may not exist or the client token does not have access. + :raises InvalidParameter: The provided application variable is not valid for the Agent for this session. Check the available application variables for the Agent under the `parameters` property, and version through the API with `getAgent`, or in AIP Agent Studio. The Agent version used for the session can be checked through the API with `getSession`. + :raises InvalidParameterType: The provided value does not match the expected type for the application variable configured on the Agent for this session. Check the available application variables for the Agent under the `parameters` property, and version through the API with `getAgent`, or in AIP Agent Studio. The Agent version used for the session can be checked through the API with `getSession`. + :raises ObjectTypeIdsNotFound: Some object types are configured for use by the Agent but could not be found. The object types either do not exist or the client token does not have access. Object types can be checked by listing available object types through the API, or searching in [Ontology Manager](https://palantir.com/docs/foundry/ontology-manager/overview/). + :raises ObjectTypeRidsNotFound: Some object types are configured for use by the Agent but could not be found. The object types either do not exist or the client token does not have access. Object types can be checked by listing available object types through the API, or searching in [Ontology Manager](https://palantir.com/docs/foundry/ontology-manager/overview/). + :raises OntologyEntitiesNotFound: Some ontology types are configured for use by the Agent but could not be found. The types either do not exist or the client token does not have access. Object types and their link types can be checked by listing available object/link types through the API, or searching in [Ontology Manager](https://palantir.com/docs/foundry/ontology-manager/overview/). + :raises RateLimitExceeded: Failed to generate a response as the model rate limits were exceeded. Clients should wait and retry. + :raises RetryAttemptsExceeded: Failed to generate a response after retrying up to the configured number of retry attempts. Clients should wait and retry. + :raises RetryDeadlineExceeded: Failed to generate a response after retrying up to the configured retry deadline. Clients should wait and retry. + :raises SessionExecutionFailed: Failed to generate a response for a session due to an unexpected error. + :raises SessionNotFound: The given Session could not be found. + :raises SessionTraceIdAlreadyExists: The provided trace ID already exists for the session and cannot be reused. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}/blockingContinue", + query_params={ + "preview": preview, + }, + path_params={ + "agentRid": agent_rid, + "sessionRid": session_rid, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=aip_agents_models.BlockingContinueSessionRequest( + user_input=user_input, + parameter_inputs=parameter_inputs, + contexts_override=contexts_override, + session_trace_id=session_trace_id, + ), + response_type=aip_agents_models.SessionExchangeResult, + request_timeout=request_timeout, + throwable_errors={ + "AgentIterationsExceededLimit": aip_agents_errors.AgentIterationsExceededLimit, + "AgentNotFound": aip_agents_errors.AgentNotFound, + "BlockingContinueSessionPermissionDenied": aip_agents_errors.BlockingContinueSessionPermissionDenied, + "ContextSizeExceededLimit": aip_agents_errors.ContextSizeExceededLimit, + "FunctionLocatorNotFound": aip_agents_errors.FunctionLocatorNotFound, + "InvalidParameter": aip_agents_errors.InvalidParameter, + "InvalidParameterType": aip_agents_errors.InvalidParameterType, + "ObjectTypeIdsNotFound": aip_agents_errors.ObjectTypeIdsNotFound, + "ObjectTypeRidsNotFound": aip_agents_errors.ObjectTypeRidsNotFound, + "OntologyEntitiesNotFound": aip_agents_errors.OntologyEntitiesNotFound, + "RateLimitExceeded": aip_agents_errors.RateLimitExceeded, + "RetryAttemptsExceeded": aip_agents_errors.RetryAttemptsExceeded, + "RetryDeadlineExceeded": aip_agents_errors.RetryDeadlineExceeded, + "SessionExecutionFailed": aip_agents_errors.SessionExecutionFailed, + "SessionNotFound": aip_agents_errors.SessionNotFound, + "SessionTraceIdAlreadyExists": aip_agents_errors.SessionTraceIdAlreadyExists, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def cancel( + self, + agent_rid: aip_agents_models.AgentRid, + session_rid: aip_agents_models.SessionRid, + *, + message_id: aip_agents_models.MessageId, + preview: typing.Optional[core_models.PreviewMode] = None, + response: typing.Optional[aip_agents_models.AgentMarkdownResponse] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> aip_agents_models.CancelSessionResponse: + """ + Cancel an in-progress streamed exchange with an Agent which was initiated with `streamingContinue`. + Canceling an exchange allows clients to prevent the exchange from being added to the session, or to provide a response to replace the Agent-generated response. + Note that canceling an exchange does not terminate the stream returned by `streamingContinue`; clients should close the stream on triggering the cancellation request to stop reading from the stream. + + :param agent_rid: An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). + :type agent_rid: AgentRid + :param session_rid: The Resource Identifier (RID) of the conversation session. + :type session_rid: SessionRid + :param message_id: The identifier for the in-progress exchange to cancel. This should match the `messageId` which was provided when initiating the exchange with `streamingContinue`. + :type message_id: MessageId + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param response: When specified, the exchange is added to the session with the client-provided response as the result. When omitted, the exchange is not added to the session. + :type response: Optional[AgentMarkdownResponse] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: aip_agents_models.CancelSessionResponse + + :raises AgentNotFound: The given Agent could not be found. + :raises CancelSessionFailedMessageNotInProgress: Unable to cancel the requested session exchange as no in-progress exchange was found for the provided message identifier. This is expected if no exchange was initiated with the provided message identifier through a `streamingContinue` request, or if the exchange for this identifier has already completed and cannot be canceled, or if the exchange has already been canceled. This error can also occur if the cancellation was requested immediately after requesting the exchange through a `streamingContinue` request, and the exchange has not started yet. Clients should handle these errors gracefully, and can reload the session content to get the latest conversation state. + :raises CancelSessionPermissionDenied: Could not cancel the Session. + :raises SessionNotFound: The given Session could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}/cancel", + query_params={ + "preview": preview, + }, + path_params={ + "agentRid": agent_rid, + "sessionRid": session_rid, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=aip_agents_models.CancelSessionRequest( + message_id=message_id, + response=response, + ), + response_type=aip_agents_models.CancelSessionResponse, + request_timeout=request_timeout, + throwable_errors={ + "AgentNotFound": aip_agents_errors.AgentNotFound, + "CancelSessionFailedMessageNotInProgress": aip_agents_errors.CancelSessionFailedMessageNotInProgress, + "CancelSessionPermissionDenied": aip_agents_errors.CancelSessionPermissionDenied, + "SessionNotFound": aip_agents_errors.SessionNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def create( + self, + agent_rid: aip_agents_models.AgentRid, + *, + agent_version: typing.Optional[aip_agents_models.AgentVersionString] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> aip_agents_models.Session: + """ + Create a new conversation session between the calling user and an Agent. + Use `blockingContinue` or `streamingContinue` to start adding exchanges to the session. + + :param agent_rid: An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). + :type agent_rid: AgentRid + :param agent_version: The version of the Agent associated with the session. This can be set by clients on session creation. If not specified, defaults to use the latest published version of the Agent at session creation time. + :type agent_version: Optional[AgentVersionString] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: aip_agents_models.Session + + :raises AgentNotFound: The given Agent could not be found. + :raises AgentVersionNotFound: The given AgentVersion could not be found. + :raises CreateSessionPermissionDenied: Could not create the Session. + :raises FunctionLocatorNotFound: The specified function locator is configured for use by the Agent but could not be found. The function type or version may not exist or the client token does not have access. + :raises InvalidAgentVersion: The provided version string is not a valid format for an Agent version. + :raises NoPublishedAgentVersion: Failed to retrieve the latest published version of the Agent because the Agent has no published versions. Try publishing the Agent in AIP Agent Studio to use the latest published version, or specify the version of the Agent to use. + :raises ObjectTypeIdsNotFound: Some object types are configured for use by the Agent but could not be found. The object types either do not exist or the client token does not have access. Object types can be checked by listing available object types through the API, or searching in [Ontology Manager](https://palantir.com/docs/foundry/ontology-manager/overview/). + :raises ObjectTypeRidsNotFound: Some object types are configured for use by the Agent but could not be found. The object types either do not exist or the client token does not have access. Object types can be checked by listing available object types through the API, or searching in [Ontology Manager](https://palantir.com/docs/foundry/ontology-manager/overview/). + :raises OntologyEntitiesNotFound: Some ontology types are configured for use by the Agent but could not be found. The types either do not exist or the client token does not have access. Object types and their link types can be checked by listing available object/link types through the API, or searching in [Ontology Manager](https://palantir.com/docs/foundry/ontology-manager/overview/). + :raises SessionNotFound: The given Session could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/aipAgents/agents/{agentRid}/sessions", + query_params={ + "preview": preview, + }, + path_params={ + "agentRid": agent_rid, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=aip_agents_models.CreateSessionRequest( + agent_version=agent_version, + ), + response_type=aip_agents_models.Session, + request_timeout=request_timeout, + throwable_errors={ + "AgentNotFound": aip_agents_errors.AgentNotFound, + "AgentVersionNotFound": aip_agents_errors.AgentVersionNotFound, + "CreateSessionPermissionDenied": aip_agents_errors.CreateSessionPermissionDenied, + "FunctionLocatorNotFound": aip_agents_errors.FunctionLocatorNotFound, + "InvalidAgentVersion": aip_agents_errors.InvalidAgentVersion, + "NoPublishedAgentVersion": aip_agents_errors.NoPublishedAgentVersion, + "ObjectTypeIdsNotFound": aip_agents_errors.ObjectTypeIdsNotFound, + "ObjectTypeRidsNotFound": aip_agents_errors.ObjectTypeRidsNotFound, + "OntologyEntitiesNotFound": aip_agents_errors.OntologyEntitiesNotFound, + "SessionNotFound": aip_agents_errors.SessionNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def delete( + self, + agent_rid: aip_agents_models.AgentRid, + session_rid: aip_agents_models.SessionRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> None: + """ + Delete a conversation session between the calling user and an Agent. + Once deleted, the session can no longer be accessed and will not appear in session lists. + + :param agent_rid: An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). + :type agent_rid: AgentRid + :param session_rid: The Resource Identifier (RID) of the conversation session. + :type session_rid: SessionRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: None + + :raises AgentNotFound: The given Agent could not be found. + :raises DeleteSessionPermissionDenied: Could not delete the Session. + :raises SessionNotFound: The given Session could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="DELETE", + resource_path="/v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}", + query_params={ + "preview": preview, + }, + path_params={ + "agentRid": agent_rid, + "sessionRid": session_rid, + }, + header_params={}, + body=None, + response_type=None, + request_timeout=request_timeout, + throwable_errors={ + "AgentNotFound": aip_agents_errors.AgentNotFound, + "DeleteSessionPermissionDenied": aip_agents_errors.DeleteSessionPermissionDenied, + "SessionNotFound": aip_agents_errors.SessionNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + agent_rid: aip_agents_models.AgentRid, + session_rid: aip_agents_models.SessionRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> aip_agents_models.Session: + """ + Get the details of a conversation session between the calling user and an Agent. + :param agent_rid: An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). + :type agent_rid: AgentRid + :param session_rid: The Resource Identifier (RID) of the conversation session. + :type session_rid: SessionRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: aip_agents_models.Session + + :raises AgentNotFound: The given Agent could not be found. + :raises SessionNotFound: The given Session could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}", + query_params={ + "preview": preview, + }, + path_params={ + "agentRid": agent_rid, + "sessionRid": session_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=aip_agents_models.Session, + request_timeout=request_timeout, + throwable_errors={ + "AgentNotFound": aip_agents_errors.AgentNotFound, + "SessionNotFound": aip_agents_errors.SessionNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def list( + self, + agent_rid: aip_agents_models.AgentRid, + *, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.ResourceIterator[aip_agents_models.Session]: + """ + List all conversation sessions between the calling user and an Agent that was created by this client. + This does not list sessions for the user created by other clients. + For example, any sessions created by the user in AIP Agent Studio will not be listed here. + Sessions are returned in order of most recently updated first. + + :param agent_rid: An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). + :type agent_rid: AgentRid + :param page_size: The page size to use for the endpoint. + :type page_size: Optional[PageSize] + :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. + :type page_token: Optional[PageToken] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.ResourceIterator[aip_agents_models.Session] + + :raises AgentNotFound: The given Agent could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/aipAgents/agents/{agentRid}/sessions", + query_params={ + "pageSize": page_size, + "pageToken": page_token, + "preview": preview, + }, + path_params={ + "agentRid": agent_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=aip_agents_models.ListSessionsResponse, + request_timeout=request_timeout, + throwable_errors={ + "AgentNotFound": aip_agents_errors.AgentNotFound, + }, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def rag_context( + self, + agent_rid: aip_agents_models.AgentRid, + session_rid: aip_agents_models.SessionRid, + *, + parameter_inputs: typing.Dict[ + aip_agents_models.ParameterId, aip_agents_models.ParameterValue + ], + user_input: aip_agents_models.UserTextInput, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> aip_agents_models.AgentSessionRagContextResponse: + """ + Retrieve relevant [context](https://palantir.com/docs/foundry/agent-studio/core-concepts/#retrieval-context) for a user message from the data sources configured for the session. + This allows clients to pre-retrieve context for a user message before sending it to the Agent with the `contextsOverride` option when continuing a session, to allow any pre-processing of the context before sending it to the Agent. + + :param agent_rid: An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). + :type agent_rid: AgentRid + :param session_rid: The Resource Identifier (RID) of the conversation session. + :type session_rid: SessionRid + :param parameter_inputs: Any values for [application variables](https://palantir.com/docs/foundry/agent-studio/application-state/) to use for the context retrieval. + :type parameter_inputs: Dict[ParameterId, ParameterValue] + :param user_input: The user message to retrieve relevant context for from the configured Agent data sources. + :type user_input: UserTextInput + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: aip_agents_models.AgentSessionRagContextResponse + + :raises AgentNotFound: The given Agent could not be found. + :raises FunctionLocatorNotFound: The specified function locator is configured for use by the Agent but could not be found. The function type or version may not exist or the client token does not have access. + :raises GetRagContextForSessionPermissionDenied: Could not ragContext the Session. + :raises ObjectTypeIdsNotFound: Some object types are configured for use by the Agent but could not be found. The object types either do not exist or the client token does not have access. Object types can be checked by listing available object types through the API, or searching in [Ontology Manager](https://palantir.com/docs/foundry/ontology-manager/overview/). + :raises ObjectTypeRidsNotFound: Some object types are configured for use by the Agent but could not be found. The object types either do not exist or the client token does not have access. Object types can be checked by listing available object types through the API, or searching in [Ontology Manager](https://palantir.com/docs/foundry/ontology-manager/overview/). + :raises OntologyEntitiesNotFound: Some ontology types are configured for use by the Agent but could not be found. The types either do not exist or the client token does not have access. Object types and their link types can be checked by listing available object/link types through the API, or searching in [Ontology Manager](https://palantir.com/docs/foundry/ontology-manager/overview/). + :raises SessionNotFound: The given Session could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="PUT", + resource_path="/v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}/ragContext", + query_params={ + "preview": preview, + }, + path_params={ + "agentRid": agent_rid, + "sessionRid": session_rid, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=aip_agents_models.GetRagContextForSessionRequest( + user_input=user_input, + parameter_inputs=parameter_inputs, + ), + response_type=aip_agents_models.AgentSessionRagContextResponse, + request_timeout=request_timeout, + throwable_errors={ + "AgentNotFound": aip_agents_errors.AgentNotFound, + "FunctionLocatorNotFound": aip_agents_errors.FunctionLocatorNotFound, + "GetRagContextForSessionPermissionDenied": aip_agents_errors.GetRagContextForSessionPermissionDenied, + "ObjectTypeIdsNotFound": aip_agents_errors.ObjectTypeIdsNotFound, + "ObjectTypeRidsNotFound": aip_agents_errors.ObjectTypeRidsNotFound, + "OntologyEntitiesNotFound": aip_agents_errors.OntologyEntitiesNotFound, + "SessionNotFound": aip_agents_errors.SessionNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def streaming_continue( + self, + agent_rid: aip_agents_models.AgentRid, + session_rid: aip_agents_models.SessionRid, + *, + parameter_inputs: typing.Dict[ + aip_agents_models.ParameterId, aip_agents_models.ParameterValue + ], + user_input: aip_agents_models.UserTextInput, + contexts_override: typing.Optional[typing.List[aip_agents_models.InputContext]] = None, + message_id: typing.Optional[aip_agents_models.MessageId] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + session_trace_id: typing.Optional[aip_agents_models.SessionTraceId] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> bytes: + """ + Continue a conversation session with an Agent, or add the first exchange to a session after creation. + Adds a new exchange to the session with the provided inputs, and generates a response from the Agent. + Returns a stream of the Agent response text (formatted using markdown) for clients to consume as the response is generated. + On completion of the streamed response, clients can load the full details of the exchange that was added to the session by reloading the session content. + Streamed exchanges also support cancellation; see `cancel` for details. + Concurrent requests to continue the same session are not supported. + Clients should wait to receive a response, or cancel the in-progress exchange, before sending the next message. + + :param agent_rid: An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). + :type agent_rid: AgentRid + :param session_rid: The Resource Identifier (RID) of the conversation session. + :type session_rid: SessionRid + :param parameter_inputs: Any supplied values for [application variables](https://palantir.com/docs/foundry/agent-studio/application-state/) to pass to the Agent for the exchange. + :type parameter_inputs: Dict[ParameterId, ParameterValue] + :param user_input: The user message for the Agent to respond to. + :type user_input: UserTextInput + :param contexts_override: If set, automatic [context](https://palantir.com/docs/foundry/agent-studio/retrieval-context/) retrieval is skipped and the list of specified context is provided to the Agent instead. If omitted, relevant context for the user message is automatically retrieved and included in the prompt, based on data sources configured on the Agent for the session. + :type contexts_override: Optional[List[InputContext]] + :param message_id: A client-generated Universally Unique Identifier (UUID) to identify the message, which the client can use to cancel the exchange before the streaming response is complete. + :type message_id: Optional[MessageId] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param session_trace_id: The unique identifier to use for this continue session trace. By generating and passing this ID to the `streamingContinue` endpoint, clients can use this trace ID to separately load details of the trace used to generate a result, while the result is in progress. If omitted, it will be generated automatically. Clients can check the generated ID by inspecting the `sessionTraceId` in the `SessionExchangeResult`, which can be loaded via the `getContent` endpoint. + :type session_trace_id: Optional[SessionTraceId] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: bytes + + :raises AgentNotFound: The given Agent could not be found. + :raises FunctionLocatorNotFound: The specified function locator is configured for use by the Agent but could not be found. The function type or version may not exist or the client token does not have access. + :raises InvalidParameter: The provided application variable is not valid for the Agent for this session. Check the available application variables for the Agent under the `parameters` property, and version through the API with `getAgent`, or in AIP Agent Studio. The Agent version used for the session can be checked through the API with `getSession`. + :raises InvalidParameterType: The provided value does not match the expected type for the application variable configured on the Agent for this session. Check the available application variables for the Agent under the `parameters` property, and version through the API with `getAgent`, or in AIP Agent Studio. The Agent version used for the session can be checked through the API with `getSession`. + :raises ObjectTypeIdsNotFound: Some object types are configured for use by the Agent but could not be found. The object types either do not exist or the client token does not have access. Object types can be checked by listing available object types through the API, or searching in [Ontology Manager](https://palantir.com/docs/foundry/ontology-manager/overview/). + :raises ObjectTypeRidsNotFound: Some object types are configured for use by the Agent but could not be found. The object types either do not exist or the client token does not have access. Object types can be checked by listing available object types through the API, or searching in [Ontology Manager](https://palantir.com/docs/foundry/ontology-manager/overview/). + :raises OntologyEntitiesNotFound: Some ontology types are configured for use by the Agent but could not be found. The types either do not exist or the client token does not have access. Object types and their link types can be checked by listing available object/link types through the API, or searching in [Ontology Manager](https://palantir.com/docs/foundry/ontology-manager/overview/). + :raises SessionNotFound: The given Session could not be found. + :raises SessionTraceIdAlreadyExists: The provided trace ID already exists for the session and cannot be reused. + :raises StreamingContinueSessionPermissionDenied: Could not streamingContinue the Session. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}/streamingContinue", + query_params={ + "preview": preview, + }, + path_params={ + "agentRid": agent_rid, + "sessionRid": session_rid, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/octet-stream", + }, + body=aip_agents_models.StreamingContinueSessionRequest( + user_input=user_input, + parameter_inputs=parameter_inputs, + contexts_override=contexts_override, + message_id=message_id, + session_trace_id=session_trace_id, + ), + response_type=bytes, + request_timeout=request_timeout, + throwable_errors={ + "AgentNotFound": aip_agents_errors.AgentNotFound, + "FunctionLocatorNotFound": aip_agents_errors.FunctionLocatorNotFound, + "InvalidParameter": aip_agents_errors.InvalidParameter, + "InvalidParameterType": aip_agents_errors.InvalidParameterType, + "ObjectTypeIdsNotFound": aip_agents_errors.ObjectTypeIdsNotFound, + "ObjectTypeRidsNotFound": aip_agents_errors.ObjectTypeRidsNotFound, + "OntologyEntitiesNotFound": aip_agents_errors.OntologyEntitiesNotFound, + "SessionNotFound": aip_agents_errors.SessionNotFound, + "SessionTraceIdAlreadyExists": aip_agents_errors.SessionTraceIdAlreadyExists, + "StreamingContinueSessionPermissionDenied": aip_agents_errors.StreamingContinueSessionPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def update_title( + self, + agent_rid: aip_agents_models.AgentRid, + session_rid: aip_agents_models.SessionRid, + *, + title: str, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> None: + """ + Update the title for a session. + Use this to set a custom title for a session to help identify it in the list of sessions with an Agent. + + :param agent_rid: An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). + :type agent_rid: AgentRid + :param session_rid: The Resource Identifier (RID) of the conversation session. + :type session_rid: SessionRid + :param title: The new title for the session. The maximum title length is 200 characters. Titles are truncated if they exceed this length. + :type title: str + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: None + + :raises AgentNotFound: The given Agent could not be found. + :raises SessionNotFound: The given Session could not be found. + :raises UpdateSessionTitlePermissionDenied: Could not updateTitle the Session. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="PUT", + resource_path="/v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}/updateTitle", + query_params={ + "preview": preview, + }, + path_params={ + "agentRid": agent_rid, + "sessionRid": session_rid, + }, + header_params={ + "Content-Type": "application/json", + }, + body=aip_agents_models.UpdateSessionTitleRequest( + title=title, + ), + response_type=None, + request_timeout=request_timeout, + throwable_errors={ + "AgentNotFound": aip_agents_errors.AgentNotFound, + "SessionNotFound": aip_agents_errors.SessionNotFound, + "UpdateSessionTitlePermissionDenied": aip_agents_errors.UpdateSessionTitlePermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _SessionClientRaw: + def __init__(self, client: SessionClient) -> None: + def blocking_continue(_: aip_agents_models.SessionExchangeResult): ... + def cancel(_: aip_agents_models.CancelSessionResponse): ... + def create(_: aip_agents_models.Session): ... + def delete(_: None): ... + def get(_: aip_agents_models.Session): ... + def list(_: aip_agents_models.ListSessionsResponse): ... + def rag_context(_: aip_agents_models.AgentSessionRagContextResponse): ... + def streaming_continue(_: bytes): ... + def update_title(_: None): ... + + self.blocking_continue = core.with_raw_response(blocking_continue, client.blocking_continue) + self.cancel = core.with_raw_response(cancel, client.cancel) + self.create = core.with_raw_response(create, client.create) + self.delete = core.with_raw_response(delete, client.delete) + self.get = core.with_raw_response(get, client.get) + self.list = core.with_raw_response(list, client.list) + self.rag_context = core.with_raw_response(rag_context, client.rag_context) + self.streaming_continue = core.with_raw_response( + streaming_continue, client.streaming_continue + ) + self.update_title = core.with_raw_response(update_title, client.update_title) + + +class _SessionClientStreaming: + def __init__(self, client: SessionClient) -> None: + def blocking_continue(_: aip_agents_models.SessionExchangeResult): ... + def cancel(_: aip_agents_models.CancelSessionResponse): ... + def create(_: aip_agents_models.Session): ... + def get(_: aip_agents_models.Session): ... + def list(_: aip_agents_models.ListSessionsResponse): ... + def rag_context(_: aip_agents_models.AgentSessionRagContextResponse): ... + def streaming_continue(_: bytes): ... + + self.blocking_continue = core.with_streaming_response( + blocking_continue, client.blocking_continue + ) + self.cancel = core.with_streaming_response(cancel, client.cancel) + self.create = core.with_streaming_response(create, client.create) + self.get = core.with_streaming_response(get, client.get) + self.list = core.with_streaming_response(list, client.list) + self.rag_context = core.with_streaming_response(rag_context, client.rag_context) + self.streaming_continue = core.with_streaming_response( + streaming_continue, client.streaming_continue + ) + + +class AsyncSessionClient: + """ + The API client for the Session Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncSessionClientStreaming(self) + self.with_raw_response = _AsyncSessionClientRaw(self) + + @cached_property + def Content(self): + from foundry_sdk.v2.aip_agents.content import AsyncContentClient + + return AsyncContentClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @cached_property + def SessionTrace(self): + from foundry_sdk.v2.aip_agents.session_trace import AsyncSessionTraceClient + + return AsyncSessionTraceClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def blocking_continue( + self, + agent_rid: aip_agents_models.AgentRid, + session_rid: aip_agents_models.SessionRid, + *, + parameter_inputs: typing.Dict[ + aip_agents_models.ParameterId, aip_agents_models.ParameterValue + ], + user_input: aip_agents_models.UserTextInput, + contexts_override: typing.Optional[typing.List[aip_agents_models.InputContext]] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + session_trace_id: typing.Optional[aip_agents_models.SessionTraceId] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[aip_agents_models.SessionExchangeResult]: + """ + Continue a conversation session with an Agent, or add the first exchange to a session after creation. + Adds a new exchange to the session with the provided inputs, and generates a response from the Agent. + Blocks on returning the result of the added exchange until the response is fully generated. + Streamed responses are also supported; see `streamingContinue` for details. + Concurrent requests to continue the same session are not supported. + Clients should wait to receive a response before sending the next message. + + :param agent_rid: An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). + :type agent_rid: AgentRid + :param session_rid: The Resource Identifier (RID) of the conversation session. + :type session_rid: SessionRid + :param parameter_inputs: Any supplied values for [application variables](https://palantir.com/docs/foundry/agent-studio/application-state/) to pass to the Agent for the exchange. + :type parameter_inputs: Dict[ParameterId, ParameterValue] + :param user_input: The user message for the Agent to respond to. + :type user_input: UserTextInput + :param contexts_override: If set, automatic [context retrieval](https://palantir.com/docs/foundry/agent-studio/retrieval-context/) is skipped and the list of specified context is provided to the Agent instead. If omitted, relevant context for the user message is automatically retrieved and included in the prompt, based on data sources configured on the Agent for the session. + :type contexts_override: Optional[List[InputContext]] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param session_trace_id: The unique identifier to use for this continue session trace. By generating and passing this ID to the `blockingContinue` endpoint, clients can use this trace ID to separately load details of the trace used to generate a result, while the result is in progress. If omitted, it will be generated automatically. Clients can check the generated ID by inspecting the `sessionTraceId` in the `SessionExchangeResult`. + :type session_trace_id: Optional[SessionTraceId] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[aip_agents_models.SessionExchangeResult] + + :raises AgentIterationsExceededLimit: The Agent was unable to produce an answer in the set number of maximum iterations. This can happen if the Agent gets confused or stuck in a loop, or if the query is too complex. Try a different query or review the Agent configuration in AIP Agent Studio. + :raises AgentNotFound: The given Agent could not be found. + :raises BlockingContinueSessionPermissionDenied: Could not blockingContinue the Session. + :raises ContextSizeExceededLimit: Failed to generate a response for a session because the context size of the LLM has been exceeded. Clients should either retry with a shorter message or create a new session and try re-sending the message. + :raises FunctionLocatorNotFound: The specified function locator is configured for use by the Agent but could not be found. The function type or version may not exist or the client token does not have access. + :raises InvalidParameter: The provided application variable is not valid for the Agent for this session. Check the available application variables for the Agent under the `parameters` property, and version through the API with `getAgent`, or in AIP Agent Studio. The Agent version used for the session can be checked through the API with `getSession`. + :raises InvalidParameterType: The provided value does not match the expected type for the application variable configured on the Agent for this session. Check the available application variables for the Agent under the `parameters` property, and version through the API with `getAgent`, or in AIP Agent Studio. The Agent version used for the session can be checked through the API with `getSession`. + :raises ObjectTypeIdsNotFound: Some object types are configured for use by the Agent but could not be found. The object types either do not exist or the client token does not have access. Object types can be checked by listing available object types through the API, or searching in [Ontology Manager](https://palantir.com/docs/foundry/ontology-manager/overview/). + :raises ObjectTypeRidsNotFound: Some object types are configured for use by the Agent but could not be found. The object types either do not exist or the client token does not have access. Object types can be checked by listing available object types through the API, or searching in [Ontology Manager](https://palantir.com/docs/foundry/ontology-manager/overview/). + :raises OntologyEntitiesNotFound: Some ontology types are configured for use by the Agent but could not be found. The types either do not exist or the client token does not have access. Object types and their link types can be checked by listing available object/link types through the API, or searching in [Ontology Manager](https://palantir.com/docs/foundry/ontology-manager/overview/). + :raises RateLimitExceeded: Failed to generate a response as the model rate limits were exceeded. Clients should wait and retry. + :raises RetryAttemptsExceeded: Failed to generate a response after retrying up to the configured number of retry attempts. Clients should wait and retry. + :raises RetryDeadlineExceeded: Failed to generate a response after retrying up to the configured retry deadline. Clients should wait and retry. + :raises SessionExecutionFailed: Failed to generate a response for a session due to an unexpected error. + :raises SessionNotFound: The given Session could not be found. + :raises SessionTraceIdAlreadyExists: The provided trace ID already exists for the session and cannot be reused. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}/blockingContinue", + query_params={ + "preview": preview, + }, + path_params={ + "agentRid": agent_rid, + "sessionRid": session_rid, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=aip_agents_models.BlockingContinueSessionRequest( + user_input=user_input, + parameter_inputs=parameter_inputs, + contexts_override=contexts_override, + session_trace_id=session_trace_id, + ), + response_type=aip_agents_models.SessionExchangeResult, + request_timeout=request_timeout, + throwable_errors={ + "AgentIterationsExceededLimit": aip_agents_errors.AgentIterationsExceededLimit, + "AgentNotFound": aip_agents_errors.AgentNotFound, + "BlockingContinueSessionPermissionDenied": aip_agents_errors.BlockingContinueSessionPermissionDenied, + "ContextSizeExceededLimit": aip_agents_errors.ContextSizeExceededLimit, + "FunctionLocatorNotFound": aip_agents_errors.FunctionLocatorNotFound, + "InvalidParameter": aip_agents_errors.InvalidParameter, + "InvalidParameterType": aip_agents_errors.InvalidParameterType, + "ObjectTypeIdsNotFound": aip_agents_errors.ObjectTypeIdsNotFound, + "ObjectTypeRidsNotFound": aip_agents_errors.ObjectTypeRidsNotFound, + "OntologyEntitiesNotFound": aip_agents_errors.OntologyEntitiesNotFound, + "RateLimitExceeded": aip_agents_errors.RateLimitExceeded, + "RetryAttemptsExceeded": aip_agents_errors.RetryAttemptsExceeded, + "RetryDeadlineExceeded": aip_agents_errors.RetryDeadlineExceeded, + "SessionExecutionFailed": aip_agents_errors.SessionExecutionFailed, + "SessionNotFound": aip_agents_errors.SessionNotFound, + "SessionTraceIdAlreadyExists": aip_agents_errors.SessionTraceIdAlreadyExists, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def cancel( + self, + agent_rid: aip_agents_models.AgentRid, + session_rid: aip_agents_models.SessionRid, + *, + message_id: aip_agents_models.MessageId, + preview: typing.Optional[core_models.PreviewMode] = None, + response: typing.Optional[aip_agents_models.AgentMarkdownResponse] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[aip_agents_models.CancelSessionResponse]: + """ + Cancel an in-progress streamed exchange with an Agent which was initiated with `streamingContinue`. + Canceling an exchange allows clients to prevent the exchange from being added to the session, or to provide a response to replace the Agent-generated response. + Note that canceling an exchange does not terminate the stream returned by `streamingContinue`; clients should close the stream on triggering the cancellation request to stop reading from the stream. + + :param agent_rid: An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). + :type agent_rid: AgentRid + :param session_rid: The Resource Identifier (RID) of the conversation session. + :type session_rid: SessionRid + :param message_id: The identifier for the in-progress exchange to cancel. This should match the `messageId` which was provided when initiating the exchange with `streamingContinue`. + :type message_id: MessageId + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param response: When specified, the exchange is added to the session with the client-provided response as the result. When omitted, the exchange is not added to the session. + :type response: Optional[AgentMarkdownResponse] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[aip_agents_models.CancelSessionResponse] + + :raises AgentNotFound: The given Agent could not be found. + :raises CancelSessionFailedMessageNotInProgress: Unable to cancel the requested session exchange as no in-progress exchange was found for the provided message identifier. This is expected if no exchange was initiated with the provided message identifier through a `streamingContinue` request, or if the exchange for this identifier has already completed and cannot be canceled, or if the exchange has already been canceled. This error can also occur if the cancellation was requested immediately after requesting the exchange through a `streamingContinue` request, and the exchange has not started yet. Clients should handle these errors gracefully, and can reload the session content to get the latest conversation state. + :raises CancelSessionPermissionDenied: Could not cancel the Session. + :raises SessionNotFound: The given Session could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}/cancel", + query_params={ + "preview": preview, + }, + path_params={ + "agentRid": agent_rid, + "sessionRid": session_rid, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=aip_agents_models.CancelSessionRequest( + message_id=message_id, + response=response, + ), + response_type=aip_agents_models.CancelSessionResponse, + request_timeout=request_timeout, + throwable_errors={ + "AgentNotFound": aip_agents_errors.AgentNotFound, + "CancelSessionFailedMessageNotInProgress": aip_agents_errors.CancelSessionFailedMessageNotInProgress, + "CancelSessionPermissionDenied": aip_agents_errors.CancelSessionPermissionDenied, + "SessionNotFound": aip_agents_errors.SessionNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def create( + self, + agent_rid: aip_agents_models.AgentRid, + *, + agent_version: typing.Optional[aip_agents_models.AgentVersionString] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[aip_agents_models.Session]: + """ + Create a new conversation session between the calling user and an Agent. + Use `blockingContinue` or `streamingContinue` to start adding exchanges to the session. + + :param agent_rid: An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). + :type agent_rid: AgentRid + :param agent_version: The version of the Agent associated with the session. This can be set by clients on session creation. If not specified, defaults to use the latest published version of the Agent at session creation time. + :type agent_version: Optional[AgentVersionString] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[aip_agents_models.Session] + + :raises AgentNotFound: The given Agent could not be found. + :raises AgentVersionNotFound: The given AgentVersion could not be found. + :raises CreateSessionPermissionDenied: Could not create the Session. + :raises FunctionLocatorNotFound: The specified function locator is configured for use by the Agent but could not be found. The function type or version may not exist or the client token does not have access. + :raises InvalidAgentVersion: The provided version string is not a valid format for an Agent version. + :raises NoPublishedAgentVersion: Failed to retrieve the latest published version of the Agent because the Agent has no published versions. Try publishing the Agent in AIP Agent Studio to use the latest published version, or specify the version of the Agent to use. + :raises ObjectTypeIdsNotFound: Some object types are configured for use by the Agent but could not be found. The object types either do not exist or the client token does not have access. Object types can be checked by listing available object types through the API, or searching in [Ontology Manager](https://palantir.com/docs/foundry/ontology-manager/overview/). + :raises ObjectTypeRidsNotFound: Some object types are configured for use by the Agent but could not be found. The object types either do not exist or the client token does not have access. Object types can be checked by listing available object types through the API, or searching in [Ontology Manager](https://palantir.com/docs/foundry/ontology-manager/overview/). + :raises OntologyEntitiesNotFound: Some ontology types are configured for use by the Agent but could not be found. The types either do not exist or the client token does not have access. Object types and their link types can be checked by listing available object/link types through the API, or searching in [Ontology Manager](https://palantir.com/docs/foundry/ontology-manager/overview/). + :raises SessionNotFound: The given Session could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/aipAgents/agents/{agentRid}/sessions", + query_params={ + "preview": preview, + }, + path_params={ + "agentRid": agent_rid, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=aip_agents_models.CreateSessionRequest( + agent_version=agent_version, + ), + response_type=aip_agents_models.Session, + request_timeout=request_timeout, + throwable_errors={ + "AgentNotFound": aip_agents_errors.AgentNotFound, + "AgentVersionNotFound": aip_agents_errors.AgentVersionNotFound, + "CreateSessionPermissionDenied": aip_agents_errors.CreateSessionPermissionDenied, + "FunctionLocatorNotFound": aip_agents_errors.FunctionLocatorNotFound, + "InvalidAgentVersion": aip_agents_errors.InvalidAgentVersion, + "NoPublishedAgentVersion": aip_agents_errors.NoPublishedAgentVersion, + "ObjectTypeIdsNotFound": aip_agents_errors.ObjectTypeIdsNotFound, + "ObjectTypeRidsNotFound": aip_agents_errors.ObjectTypeRidsNotFound, + "OntologyEntitiesNotFound": aip_agents_errors.OntologyEntitiesNotFound, + "SessionNotFound": aip_agents_errors.SessionNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def delete( + self, + agent_rid: aip_agents_models.AgentRid, + session_rid: aip_agents_models.SessionRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[None]: + """ + Delete a conversation session between the calling user and an Agent. + Once deleted, the session can no longer be accessed and will not appear in session lists. + + :param agent_rid: An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). + :type agent_rid: AgentRid + :param session_rid: The Resource Identifier (RID) of the conversation session. + :type session_rid: SessionRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[None] + + :raises AgentNotFound: The given Agent could not be found. + :raises DeleteSessionPermissionDenied: Could not delete the Session. + :raises SessionNotFound: The given Session could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="DELETE", + resource_path="/v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}", + query_params={ + "preview": preview, + }, + path_params={ + "agentRid": agent_rid, + "sessionRid": session_rid, + }, + header_params={}, + body=None, + response_type=None, + request_timeout=request_timeout, + throwable_errors={ + "AgentNotFound": aip_agents_errors.AgentNotFound, + "DeleteSessionPermissionDenied": aip_agents_errors.DeleteSessionPermissionDenied, + "SessionNotFound": aip_agents_errors.SessionNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + agent_rid: aip_agents_models.AgentRid, + session_rid: aip_agents_models.SessionRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[aip_agents_models.Session]: + """ + Get the details of a conversation session between the calling user and an Agent. + :param agent_rid: An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). + :type agent_rid: AgentRid + :param session_rid: The Resource Identifier (RID) of the conversation session. + :type session_rid: SessionRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[aip_agents_models.Session] + + :raises AgentNotFound: The given Agent could not be found. + :raises SessionNotFound: The given Session could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}", + query_params={ + "preview": preview, + }, + path_params={ + "agentRid": agent_rid, + "sessionRid": session_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=aip_agents_models.Session, + request_timeout=request_timeout, + throwable_errors={ + "AgentNotFound": aip_agents_errors.AgentNotFound, + "SessionNotFound": aip_agents_errors.SessionNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def list( + self, + agent_rid: aip_agents_models.AgentRid, + *, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.AsyncResourceIterator[aip_agents_models.Session]: + """ + List all conversation sessions between the calling user and an Agent that was created by this client. + This does not list sessions for the user created by other clients. + For example, any sessions created by the user in AIP Agent Studio will not be listed here. + Sessions are returned in order of most recently updated first. + + :param agent_rid: An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). + :type agent_rid: AgentRid + :param page_size: The page size to use for the endpoint. + :type page_size: Optional[PageSize] + :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. + :type page_token: Optional[PageToken] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.AsyncResourceIterator[aip_agents_models.Session] + + :raises AgentNotFound: The given Agent could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/aipAgents/agents/{agentRid}/sessions", + query_params={ + "pageSize": page_size, + "pageToken": page_token, + "preview": preview, + }, + path_params={ + "agentRid": agent_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=aip_agents_models.ListSessionsResponse, + request_timeout=request_timeout, + throwable_errors={ + "AgentNotFound": aip_agents_errors.AgentNotFound, + }, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def rag_context( + self, + agent_rid: aip_agents_models.AgentRid, + session_rid: aip_agents_models.SessionRid, + *, + parameter_inputs: typing.Dict[ + aip_agents_models.ParameterId, aip_agents_models.ParameterValue + ], + user_input: aip_agents_models.UserTextInput, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[aip_agents_models.AgentSessionRagContextResponse]: + """ + Retrieve relevant [context](https://palantir.com/docs/foundry/agent-studio/core-concepts/#retrieval-context) for a user message from the data sources configured for the session. + This allows clients to pre-retrieve context for a user message before sending it to the Agent with the `contextsOverride` option when continuing a session, to allow any pre-processing of the context before sending it to the Agent. + + :param agent_rid: An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). + :type agent_rid: AgentRid + :param session_rid: The Resource Identifier (RID) of the conversation session. + :type session_rid: SessionRid + :param parameter_inputs: Any values for [application variables](https://palantir.com/docs/foundry/agent-studio/application-state/) to use for the context retrieval. + :type parameter_inputs: Dict[ParameterId, ParameterValue] + :param user_input: The user message to retrieve relevant context for from the configured Agent data sources. + :type user_input: UserTextInput + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[aip_agents_models.AgentSessionRagContextResponse] + + :raises AgentNotFound: The given Agent could not be found. + :raises FunctionLocatorNotFound: The specified function locator is configured for use by the Agent but could not be found. The function type or version may not exist or the client token does not have access. + :raises GetRagContextForSessionPermissionDenied: Could not ragContext the Session. + :raises ObjectTypeIdsNotFound: Some object types are configured for use by the Agent but could not be found. The object types either do not exist or the client token does not have access. Object types can be checked by listing available object types through the API, or searching in [Ontology Manager](https://palantir.com/docs/foundry/ontology-manager/overview/). + :raises ObjectTypeRidsNotFound: Some object types are configured for use by the Agent but could not be found. The object types either do not exist or the client token does not have access. Object types can be checked by listing available object types through the API, or searching in [Ontology Manager](https://palantir.com/docs/foundry/ontology-manager/overview/). + :raises OntologyEntitiesNotFound: Some ontology types are configured for use by the Agent but could not be found. The types either do not exist or the client token does not have access. Object types and their link types can be checked by listing available object/link types through the API, or searching in [Ontology Manager](https://palantir.com/docs/foundry/ontology-manager/overview/). + :raises SessionNotFound: The given Session could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="PUT", + resource_path="/v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}/ragContext", + query_params={ + "preview": preview, + }, + path_params={ + "agentRid": agent_rid, + "sessionRid": session_rid, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=aip_agents_models.GetRagContextForSessionRequest( + user_input=user_input, + parameter_inputs=parameter_inputs, + ), + response_type=aip_agents_models.AgentSessionRagContextResponse, + request_timeout=request_timeout, + throwable_errors={ + "AgentNotFound": aip_agents_errors.AgentNotFound, + "FunctionLocatorNotFound": aip_agents_errors.FunctionLocatorNotFound, + "GetRagContextForSessionPermissionDenied": aip_agents_errors.GetRagContextForSessionPermissionDenied, + "ObjectTypeIdsNotFound": aip_agents_errors.ObjectTypeIdsNotFound, + "ObjectTypeRidsNotFound": aip_agents_errors.ObjectTypeRidsNotFound, + "OntologyEntitiesNotFound": aip_agents_errors.OntologyEntitiesNotFound, + "SessionNotFound": aip_agents_errors.SessionNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def streaming_continue( + self, + agent_rid: aip_agents_models.AgentRid, + session_rid: aip_agents_models.SessionRid, + *, + parameter_inputs: typing.Dict[ + aip_agents_models.ParameterId, aip_agents_models.ParameterValue + ], + user_input: aip_agents_models.UserTextInput, + contexts_override: typing.Optional[typing.List[aip_agents_models.InputContext]] = None, + message_id: typing.Optional[aip_agents_models.MessageId] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + session_trace_id: typing.Optional[aip_agents_models.SessionTraceId] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[bytes]: + """ + Continue a conversation session with an Agent, or add the first exchange to a session after creation. + Adds a new exchange to the session with the provided inputs, and generates a response from the Agent. + Returns a stream of the Agent response text (formatted using markdown) for clients to consume as the response is generated. + On completion of the streamed response, clients can load the full details of the exchange that was added to the session by reloading the session content. + Streamed exchanges also support cancellation; see `cancel` for details. + Concurrent requests to continue the same session are not supported. + Clients should wait to receive a response, or cancel the in-progress exchange, before sending the next message. + + :param agent_rid: An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). + :type agent_rid: AgentRid + :param session_rid: The Resource Identifier (RID) of the conversation session. + :type session_rid: SessionRid + :param parameter_inputs: Any supplied values for [application variables](https://palantir.com/docs/foundry/agent-studio/application-state/) to pass to the Agent for the exchange. + :type parameter_inputs: Dict[ParameterId, ParameterValue] + :param user_input: The user message for the Agent to respond to. + :type user_input: UserTextInput + :param contexts_override: If set, automatic [context](https://palantir.com/docs/foundry/agent-studio/retrieval-context/) retrieval is skipped and the list of specified context is provided to the Agent instead. If omitted, relevant context for the user message is automatically retrieved and included in the prompt, based on data sources configured on the Agent for the session. + :type contexts_override: Optional[List[InputContext]] + :param message_id: A client-generated Universally Unique Identifier (UUID) to identify the message, which the client can use to cancel the exchange before the streaming response is complete. + :type message_id: Optional[MessageId] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param session_trace_id: The unique identifier to use for this continue session trace. By generating and passing this ID to the `streamingContinue` endpoint, clients can use this trace ID to separately load details of the trace used to generate a result, while the result is in progress. If omitted, it will be generated automatically. Clients can check the generated ID by inspecting the `sessionTraceId` in the `SessionExchangeResult`, which can be loaded via the `getContent` endpoint. + :type session_trace_id: Optional[SessionTraceId] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[bytes] + + :raises AgentNotFound: The given Agent could not be found. + :raises FunctionLocatorNotFound: The specified function locator is configured for use by the Agent but could not be found. The function type or version may not exist or the client token does not have access. + :raises InvalidParameter: The provided application variable is not valid for the Agent for this session. Check the available application variables for the Agent under the `parameters` property, and version through the API with `getAgent`, or in AIP Agent Studio. The Agent version used for the session can be checked through the API with `getSession`. + :raises InvalidParameterType: The provided value does not match the expected type for the application variable configured on the Agent for this session. Check the available application variables for the Agent under the `parameters` property, and version through the API with `getAgent`, or in AIP Agent Studio. The Agent version used for the session can be checked through the API with `getSession`. + :raises ObjectTypeIdsNotFound: Some object types are configured for use by the Agent but could not be found. The object types either do not exist or the client token does not have access. Object types can be checked by listing available object types through the API, or searching in [Ontology Manager](https://palantir.com/docs/foundry/ontology-manager/overview/). + :raises ObjectTypeRidsNotFound: Some object types are configured for use by the Agent but could not be found. The object types either do not exist or the client token does not have access. Object types can be checked by listing available object types through the API, or searching in [Ontology Manager](https://palantir.com/docs/foundry/ontology-manager/overview/). + :raises OntologyEntitiesNotFound: Some ontology types are configured for use by the Agent but could not be found. The types either do not exist or the client token does not have access. Object types and their link types can be checked by listing available object/link types through the API, or searching in [Ontology Manager](https://palantir.com/docs/foundry/ontology-manager/overview/). + :raises SessionNotFound: The given Session could not be found. + :raises SessionTraceIdAlreadyExists: The provided trace ID already exists for the session and cannot be reused. + :raises StreamingContinueSessionPermissionDenied: Could not streamingContinue the Session. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}/streamingContinue", + query_params={ + "preview": preview, + }, + path_params={ + "agentRid": agent_rid, + "sessionRid": session_rid, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/octet-stream", + }, + body=aip_agents_models.StreamingContinueSessionRequest( + user_input=user_input, + parameter_inputs=parameter_inputs, + contexts_override=contexts_override, + message_id=message_id, + session_trace_id=session_trace_id, + ), + response_type=bytes, + request_timeout=request_timeout, + throwable_errors={ + "AgentNotFound": aip_agents_errors.AgentNotFound, + "FunctionLocatorNotFound": aip_agents_errors.FunctionLocatorNotFound, + "InvalidParameter": aip_agents_errors.InvalidParameter, + "InvalidParameterType": aip_agents_errors.InvalidParameterType, + "ObjectTypeIdsNotFound": aip_agents_errors.ObjectTypeIdsNotFound, + "ObjectTypeRidsNotFound": aip_agents_errors.ObjectTypeRidsNotFound, + "OntologyEntitiesNotFound": aip_agents_errors.OntologyEntitiesNotFound, + "SessionNotFound": aip_agents_errors.SessionNotFound, + "SessionTraceIdAlreadyExists": aip_agents_errors.SessionTraceIdAlreadyExists, + "StreamingContinueSessionPermissionDenied": aip_agents_errors.StreamingContinueSessionPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def update_title( + self, + agent_rid: aip_agents_models.AgentRid, + session_rid: aip_agents_models.SessionRid, + *, + title: str, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[None]: + """ + Update the title for a session. + Use this to set a custom title for a session to help identify it in the list of sessions with an Agent. + + :param agent_rid: An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). + :type agent_rid: AgentRid + :param session_rid: The Resource Identifier (RID) of the conversation session. + :type session_rid: SessionRid + :param title: The new title for the session. The maximum title length is 200 characters. Titles are truncated if they exceed this length. + :type title: str + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[None] + + :raises AgentNotFound: The given Agent could not be found. + :raises SessionNotFound: The given Session could not be found. + :raises UpdateSessionTitlePermissionDenied: Could not updateTitle the Session. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="PUT", + resource_path="/v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}/updateTitle", + query_params={ + "preview": preview, + }, + path_params={ + "agentRid": agent_rid, + "sessionRid": session_rid, + }, + header_params={ + "Content-Type": "application/json", + }, + body=aip_agents_models.UpdateSessionTitleRequest( + title=title, + ), + response_type=None, + request_timeout=request_timeout, + throwable_errors={ + "AgentNotFound": aip_agents_errors.AgentNotFound, + "SessionNotFound": aip_agents_errors.SessionNotFound, + "UpdateSessionTitlePermissionDenied": aip_agents_errors.UpdateSessionTitlePermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _AsyncSessionClientRaw: + def __init__(self, client: AsyncSessionClient) -> None: + def blocking_continue(_: aip_agents_models.SessionExchangeResult): ... + def cancel(_: aip_agents_models.CancelSessionResponse): ... + def create(_: aip_agents_models.Session): ... + def delete(_: None): ... + def get(_: aip_agents_models.Session): ... + def list(_: aip_agents_models.ListSessionsResponse): ... + def rag_context(_: aip_agents_models.AgentSessionRagContextResponse): ... + def streaming_continue(_: bytes): ... + def update_title(_: None): ... + + self.blocking_continue = core.async_with_raw_response( + blocking_continue, client.blocking_continue + ) + self.cancel = core.async_with_raw_response(cancel, client.cancel) + self.create = core.async_with_raw_response(create, client.create) + self.delete = core.async_with_raw_response(delete, client.delete) + self.get = core.async_with_raw_response(get, client.get) + self.list = core.async_with_raw_response(list, client.list) + self.rag_context = core.async_with_raw_response(rag_context, client.rag_context) + self.streaming_continue = core.async_with_raw_response( + streaming_continue, client.streaming_continue + ) + self.update_title = core.async_with_raw_response(update_title, client.update_title) + + +class _AsyncSessionClientStreaming: + def __init__(self, client: AsyncSessionClient) -> None: + def blocking_continue(_: aip_agents_models.SessionExchangeResult): ... + def cancel(_: aip_agents_models.CancelSessionResponse): ... + def create(_: aip_agents_models.Session): ... + def get(_: aip_agents_models.Session): ... + def list(_: aip_agents_models.ListSessionsResponse): ... + def rag_context(_: aip_agents_models.AgentSessionRagContextResponse): ... + def streaming_continue(_: bytes): ... + + self.blocking_continue = core.async_with_streaming_response( + blocking_continue, client.blocking_continue + ) + self.cancel = core.async_with_streaming_response(cancel, client.cancel) + self.create = core.async_with_streaming_response(create, client.create) + self.get = core.async_with_streaming_response(get, client.get) + self.list = core.async_with_streaming_response(list, client.list) + self.rag_context = core.async_with_streaming_response(rag_context, client.rag_context) + self.streaming_continue = core.async_with_streaming_response( + streaming_continue, client.streaming_continue + ) diff --git a/foundry_sdk/v2/aip_agents/session_trace.py b/foundry_sdk/v2/aip_agents/session_trace.py new file mode 100644 index 000000000..8072d5f89 --- /dev/null +++ b/foundry_sdk/v2/aip_agents/session_trace.py @@ -0,0 +1,227 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v2.aip_agents import errors as aip_agents_errors +from foundry_sdk.v2.aip_agents import models as aip_agents_models +from foundry_sdk.v2.core import models as core_models + + +class SessionTraceClient: + """ + The API client for the SessionTrace Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _SessionTraceClientStreaming(self) + self.with_raw_response = _SessionTraceClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + agent_rid: aip_agents_models.AgentRid, + session_rid: aip_agents_models.SessionRid, + session_trace_id: aip_agents_models.SessionTraceId, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> aip_agents_models.SessionTrace: + """ + Get the trace of an Agent response. The trace lists the sequence of steps that an Agent took to arrive at + an answer. For example, a trace may include steps such as context retrieval and tool calls. Clients should + poll this endpoint to check the realtime progress of a response until the trace is completed. + + :param agent_rid: An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). + :type agent_rid: AgentRid + :param session_rid: The Resource Identifier (RID) of the conversation session. + :type session_rid: SessionRid + :param session_trace_id: The unique identifier for the trace. + :type session_trace_id: SessionTraceId + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: aip_agents_models.SessionTrace + + :raises AgentNotFound: The given Agent could not be found. + :raises SessionNotFound: The given Session could not be found. + :raises SessionTraceNotFound: The given SessionTrace could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}/sessionTraces/{sessionTraceId}", + query_params={ + "preview": preview, + }, + path_params={ + "agentRid": agent_rid, + "sessionRid": session_rid, + "sessionTraceId": session_trace_id, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=aip_agents_models.SessionTrace, + request_timeout=request_timeout, + throwable_errors={ + "AgentNotFound": aip_agents_errors.AgentNotFound, + "SessionNotFound": aip_agents_errors.SessionNotFound, + "SessionTraceNotFound": aip_agents_errors.SessionTraceNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _SessionTraceClientRaw: + def __init__(self, client: SessionTraceClient) -> None: + def get(_: aip_agents_models.SessionTrace): ... + + self.get = core.with_raw_response(get, client.get) + + +class _SessionTraceClientStreaming: + def __init__(self, client: SessionTraceClient) -> None: + def get(_: aip_agents_models.SessionTrace): ... + + self.get = core.with_streaming_response(get, client.get) + + +class AsyncSessionTraceClient: + """ + The API client for the SessionTrace Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncSessionTraceClientStreaming(self) + self.with_raw_response = _AsyncSessionTraceClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + agent_rid: aip_agents_models.AgentRid, + session_rid: aip_agents_models.SessionRid, + session_trace_id: aip_agents_models.SessionTraceId, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[aip_agents_models.SessionTrace]: + """ + Get the trace of an Agent response. The trace lists the sequence of steps that an Agent took to arrive at + an answer. For example, a trace may include steps such as context retrieval and tool calls. Clients should + poll this endpoint to check the realtime progress of a response until the trace is completed. + + :param agent_rid: An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/). + :type agent_rid: AgentRid + :param session_rid: The Resource Identifier (RID) of the conversation session. + :type session_rid: SessionRid + :param session_trace_id: The unique identifier for the trace. + :type session_trace_id: SessionTraceId + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[aip_agents_models.SessionTrace] + + :raises AgentNotFound: The given Agent could not be found. + :raises SessionNotFound: The given Session could not be found. + :raises SessionTraceNotFound: The given SessionTrace could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}/sessionTraces/{sessionTraceId}", + query_params={ + "preview": preview, + }, + path_params={ + "agentRid": agent_rid, + "sessionRid": session_rid, + "sessionTraceId": session_trace_id, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=aip_agents_models.SessionTrace, + request_timeout=request_timeout, + throwable_errors={ + "AgentNotFound": aip_agents_errors.AgentNotFound, + "SessionNotFound": aip_agents_errors.SessionNotFound, + "SessionTraceNotFound": aip_agents_errors.SessionTraceNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _AsyncSessionTraceClientRaw: + def __init__(self, client: AsyncSessionTraceClient) -> None: + def get(_: aip_agents_models.SessionTrace): ... + + self.get = core.async_with_raw_response(get, client.get) + + +class _AsyncSessionTraceClientStreaming: + def __init__(self, client: AsyncSessionTraceClient) -> None: + def get(_: aip_agents_models.SessionTrace): ... + + self.get = core.async_with_streaming_response(get, client.get) diff --git a/foundry_sdk/v2/audit/__init__.py b/foundry_sdk/v2/audit/__init__.py new file mode 100644 index 000000000..6fe00c3b3 --- /dev/null +++ b/foundry_sdk/v2/audit/__init__.py @@ -0,0 +1,22 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +from foundry_sdk.v2.audit._client import AsyncAuditClient +from foundry_sdk.v2.audit._client import AuditClient + +__all__ = [ + "AuditClient", + "AsyncAuditClient", +] diff --git a/foundry_sdk/v2/audit/_client.py b/foundry_sdk/v2/audit/_client.py new file mode 100644 index 000000000..793fd5604 --- /dev/null +++ b/foundry_sdk/v2/audit/_client.py @@ -0,0 +1,69 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing +from functools import cached_property + +from foundry_sdk import _core as core + + +class AuditClient: + """ + The API client for the Audit Namespace. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + + @cached_property + def Organization(self): + from foundry_sdk.v2.audit.organization import OrganizationClient + + return OrganizationClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + +class AsyncAuditClient: + """ + The Async API client for the Audit Namespace. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + from foundry_sdk.v2.audit.organization import AsyncOrganizationClient + + self.Organization = AsyncOrganizationClient(auth=auth, hostname=hostname, config=config) diff --git a/foundry_sdk/v2/audit/errors.py b/foundry_sdk/v2/audit/errors.py new file mode 100644 index 000000000..4c95c3ce4 --- /dev/null +++ b/foundry_sdk/v2/audit/errors.py @@ -0,0 +1,72 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing +from dataclasses import dataclass + +import typing_extensions + +from foundry_sdk import _errors as errors +from foundry_sdk.v2.audit import models as audit_models +from foundry_sdk.v2.core import models as core_models + + +class GetLogFileContentPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not content the LogFile.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + organizationRid: core_models.OrganizationRid + logFileId: audit_models.FileId + + +@dataclass +class GetLogFileContentPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["GetLogFileContentPermissionDenied"] + parameters: GetLogFileContentPermissionDeniedParameters + error_instance_id: str + + +class ListLogFilesPermissionDeniedParameters(typing_extensions.TypedDict): + """The provided token does not have permission to list audit log files.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class ListLogFilesPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["ListLogFilesPermissionDenied"] + parameters: ListLogFilesPermissionDeniedParameters + error_instance_id: str + + +class MissingStartDateParameters(typing_extensions.TypedDict): + """Start date is required to list audit log files.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class MissingStartDate(errors.BadRequestError): + name: typing.Literal["MissingStartDate"] + parameters: MissingStartDateParameters + error_instance_id: str + + +__all__ = [ + "GetLogFileContentPermissionDenied", + "ListLogFilesPermissionDenied", + "MissingStartDate", +] diff --git a/foundry_sdk/v2/audit/log_file.py b/foundry_sdk/v2/audit/log_file.py new file mode 100644 index 000000000..ecbd137ba --- /dev/null +++ b/foundry_sdk/v2/audit/log_file.py @@ -0,0 +1,332 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing +from datetime import date + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v2.audit import errors as audit_errors +from foundry_sdk.v2.audit import models as audit_models +from foundry_sdk.v2.core import models as core_models + + +class LogFileClient: + """ + The API client for the LogFile Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _LogFileClientStreaming(self) + self.with_raw_response = _LogFileClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def content( + self, + organization_rid: core_models.OrganizationRid, + log_file_id: audit_models.FileId, + *, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> bytes: + """ + + :param organization_rid: + :type organization_rid: OrganizationRid + :param log_file_id: + :type log_file_id: FileId + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: bytes + + :raises GetLogFileContentPermissionDenied: Could not content the LogFile. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/audit/organizations/{organizationRid}/logFiles/{logFileId}/content", + query_params={}, + path_params={ + "organizationRid": organization_rid, + "logFileId": log_file_id, + }, + header_params={ + "Accept": "application/octet-stream", + }, + body=None, + response_type=bytes, + request_timeout=request_timeout, + throwable_errors={ + "GetLogFileContentPermissionDenied": audit_errors.GetLogFileContentPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def list( + self, + organization_rid: core_models.OrganizationRid, + *, + end_date: typing.Optional[date] = None, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + start_date: typing.Optional[date] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.ResourceIterator[audit_models.LogFile]: + """ + Lists all LogFiles. + + This is a paged endpoint. Each page may be smaller or larger than the requested page size. However, it is guaranteed that if there are more results available, the `nextPageToken` field will be populated. To get the next page, make the same request again, but set the value of the `pageToken` query parameter to be value of the `nextPageToken` value of the previous response. If there is no `nextPageToken` field in the response, you are on the last page. + :param organization_rid: + :type organization_rid: OrganizationRid + :param end_date: List log files for audit events up until this date (inclusive). If absent, defaults to no end date. Use the returned `nextPageToken` to continually poll the `listLogFiles` endpoint to list the latest available logs. + :type end_date: Optional[date] + :param page_size: The page size to use for the endpoint. + :type page_size: Optional[PageSize] + :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. + :type page_token: Optional[PageToken] + :param start_date: List log files for audit events starting from this date. This parameter is required for the initial request (when `pageToken` is not provided). + :type start_date: Optional[date] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.ResourceIterator[audit_models.LogFile] + + :raises ListLogFilesPermissionDenied: The provided token does not have permission to list audit log files. + :raises MissingStartDate: Start date is required to list audit log files. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/audit/organizations/{organizationRid}/logFiles", + query_params={ + "endDate": end_date, + "pageSize": page_size, + "pageToken": page_token, + "startDate": start_date, + }, + path_params={ + "organizationRid": organization_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=audit_models.ListLogFilesResponse, + request_timeout=request_timeout, + throwable_errors={ + "ListLogFilesPermissionDenied": audit_errors.ListLogFilesPermissionDenied, + "MissingStartDate": audit_errors.MissingStartDate, + }, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + +class _LogFileClientRaw: + def __init__(self, client: LogFileClient) -> None: + def content(_: bytes): ... + def list(_: audit_models.ListLogFilesResponse): ... + + self.content = core.with_raw_response(content, client.content) + self.list = core.with_raw_response(list, client.list) + + +class _LogFileClientStreaming: + def __init__(self, client: LogFileClient) -> None: + def content(_: bytes): ... + def list(_: audit_models.ListLogFilesResponse): ... + + self.content = core.with_streaming_response(content, client.content) + self.list = core.with_streaming_response(list, client.list) + + +class AsyncLogFileClient: + """ + The API client for the LogFile Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncLogFileClientStreaming(self) + self.with_raw_response = _AsyncLogFileClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def content( + self, + organization_rid: core_models.OrganizationRid, + log_file_id: audit_models.FileId, + *, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[bytes]: + """ + + :param organization_rid: + :type organization_rid: OrganizationRid + :param log_file_id: + :type log_file_id: FileId + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[bytes] + + :raises GetLogFileContentPermissionDenied: Could not content the LogFile. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/audit/organizations/{organizationRid}/logFiles/{logFileId}/content", + query_params={}, + path_params={ + "organizationRid": organization_rid, + "logFileId": log_file_id, + }, + header_params={ + "Accept": "application/octet-stream", + }, + body=None, + response_type=bytes, + request_timeout=request_timeout, + throwable_errors={ + "GetLogFileContentPermissionDenied": audit_errors.GetLogFileContentPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def list( + self, + organization_rid: core_models.OrganizationRid, + *, + end_date: typing.Optional[date] = None, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + start_date: typing.Optional[date] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.AsyncResourceIterator[audit_models.LogFile]: + """ + Lists all LogFiles. + + This is a paged endpoint. Each page may be smaller or larger than the requested page size. However, it is guaranteed that if there are more results available, the `nextPageToken` field will be populated. To get the next page, make the same request again, but set the value of the `pageToken` query parameter to be value of the `nextPageToken` value of the previous response. If there is no `nextPageToken` field in the response, you are on the last page. + :param organization_rid: + :type organization_rid: OrganizationRid + :param end_date: List log files for audit events up until this date (inclusive). If absent, defaults to no end date. Use the returned `nextPageToken` to continually poll the `listLogFiles` endpoint to list the latest available logs. + :type end_date: Optional[date] + :param page_size: The page size to use for the endpoint. + :type page_size: Optional[PageSize] + :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. + :type page_token: Optional[PageToken] + :param start_date: List log files for audit events starting from this date. This parameter is required for the initial request (when `pageToken` is not provided). + :type start_date: Optional[date] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.AsyncResourceIterator[audit_models.LogFile] + + :raises ListLogFilesPermissionDenied: The provided token does not have permission to list audit log files. + :raises MissingStartDate: Start date is required to list audit log files. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/audit/organizations/{organizationRid}/logFiles", + query_params={ + "endDate": end_date, + "pageSize": page_size, + "pageToken": page_token, + "startDate": start_date, + }, + path_params={ + "organizationRid": organization_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=audit_models.ListLogFilesResponse, + request_timeout=request_timeout, + throwable_errors={ + "ListLogFilesPermissionDenied": audit_errors.ListLogFilesPermissionDenied, + "MissingStartDate": audit_errors.MissingStartDate, + }, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + +class _AsyncLogFileClientRaw: + def __init__(self, client: AsyncLogFileClient) -> None: + def content(_: bytes): ... + def list(_: audit_models.ListLogFilesResponse): ... + + self.content = core.async_with_raw_response(content, client.content) + self.list = core.async_with_raw_response(list, client.list) + + +class _AsyncLogFileClientStreaming: + def __init__(self, client: AsyncLogFileClient) -> None: + def content(_: bytes): ... + def list(_: audit_models.ListLogFilesResponse): ... + + self.content = core.async_with_streaming_response(content, client.content) + self.list = core.async_with_streaming_response(list, client.list) diff --git a/foundry_sdk/v2/audit/models.py b/foundry_sdk/v2/audit/models.py new file mode 100644 index 000000000..2a84da4ce --- /dev/null +++ b/foundry_sdk/v2/audit/models.py @@ -0,0 +1,46 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +from __future__ import annotations + +import typing + +import pydantic + +from foundry_sdk import _core as core +from foundry_sdk.v2.core import models as core_models + +FileId = str +"""The ID of an audit log file""" + + +class ListLogFilesResponse(core.ModelBase): + """ListLogFilesResponse""" + + data: typing.List[LogFile] + next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] + + +class LogFile(core.ModelBase): + """LogFile""" + + id: FileId + + +__all__ = [ + "FileId", + "ListLogFilesResponse", + "LogFile", +] diff --git a/foundry_sdk/v2/audit/organization.py b/foundry_sdk/v2/audit/organization.py new file mode 100644 index 000000000..692be0989 --- /dev/null +++ b/foundry_sdk/v2/audit/organization.py @@ -0,0 +1,111 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing +from functools import cached_property + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors + + +class OrganizationClient: + """ + The API client for the Organization Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _OrganizationClientStreaming(self) + self.with_raw_response = _OrganizationClientRaw(self) + + @cached_property + def LogFile(self): + from foundry_sdk.v2.audit.log_file import LogFileClient + + return LogFileClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + +class _OrganizationClientRaw: + def __init__(self, client: OrganizationClient) -> None: + pass + + +class _OrganizationClientStreaming: + def __init__(self, client: OrganizationClient) -> None: + pass + + +class AsyncOrganizationClient: + """ + The API client for the Organization Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncOrganizationClientStreaming(self) + self.with_raw_response = _AsyncOrganizationClientRaw(self) + + @cached_property + def LogFile(self): + from foundry_sdk.v2.audit.log_file import AsyncLogFileClient + + return AsyncLogFileClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + +class _AsyncOrganizationClientRaw: + def __init__(self, client: AsyncOrganizationClient) -> None: + pass + + +class _AsyncOrganizationClientStreaming: + def __init__(self, client: AsyncOrganizationClient) -> None: + pass diff --git a/foundry_sdk/v2/cli.py b/foundry_sdk/v2/cli.py new file mode 100644 index 000000000..b9ddbc202 --- /dev/null +++ b/foundry_sdk/v2/cli.py @@ -0,0 +1,11411 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +from __future__ import annotations + +import dataclasses +import io +import json +import os +import typing +from datetime import date as Date +from datetime import datetime + +import click + +from foundry_sdk import EnvironmentNotConfigured +from foundry_sdk import UserTokenAuth +from foundry_sdk.v2 import FoundryClient + + +@dataclasses.dataclass +class _Context: + obj: FoundryClient + + +def get_from_environ(key: str) -> str: + value = os.environ.get(key) + if value is None: + raise EnvironmentNotConfigured(f"Please set {key} using `export {key}=<{key}>`") + + return value + + +@click.group() # type: ignore +@click.pass_context # type: ignore +def cli(ctx: _Context): + """An experimental CLI for the Foundry API""" + ctx.obj = FoundryClient( + auth=UserTokenAuth(token=get_from_environ("FOUNDRY_TOKEN")), + hostname=get_from_environ("FOUNDRY_HOSTNAME"), + ) + + +@cli.group("admin") +def admin(): + pass + + +@admin.group("user") +def admin_user(): + pass + + +@admin_user.command("delete") +@click.argument("user_id", type=str, required=True) +@click.pass_obj +def admin_user_op_delete( + client: FoundryClient, + user_id: str, +): + """ + Delete the User with the specified id. + """ + result = client.admin.User.delete( + user_id=user_id, + ) + click.echo(repr(result)) + + +@admin_user.command("get") +@click.argument("user_id", type=str, required=True) +@click.option("--status", type=click.Choice(["ACTIVE", "DELETED"]), required=False, help="""""") +@click.pass_obj +def admin_user_op_get( + client: FoundryClient, + user_id: str, + status: typing.Optional[typing.Literal["ACTIVE", "DELETED"]], +): + """ + Get the User with the specified id. + """ + result = client.admin.User.get( + user_id=user_id, + status=status, + ) + click.echo(repr(result)) + + +@admin_user.command("get_batch") +@click.argument("body", type=str, required=True) +@click.pass_obj +def admin_user_op_get_batch( + client: FoundryClient, + body: str, +): + """ + Execute multiple get requests on User. + + The maximum batch size for this endpoint is 500. + """ + result = client.admin.User.get_batch( + body=json.loads(body), + ) + click.echo(repr(result)) + + +@admin_user.command("get_current") +@click.pass_obj +def admin_user_op_get_current( + client: FoundryClient, +): + """ """ + result = client.admin.User.get_current() + click.echo(repr(result)) + + +@admin_user.command("get_markings") +@click.argument("user_id", type=str, required=True) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def admin_user_op_get_markings( + client: FoundryClient, + user_id: str, + preview: typing.Optional[bool], +): + """ + Retrieve Markings that the user is currently a member of. + """ + result = client.admin.User.get_markings( + user_id=user_id, + preview=preview, + ) + click.echo(repr(result)) + + +@admin_user.command("list") +@click.option("--include", type=click.Choice(["ACTIVE", "DELETED"]), required=False, help="""""") +@click.option( + "--page_size", type=int, required=False, help="""The page size to use for the endpoint.""" +) +@click.option( + "--page_token", + type=str, + required=False, + help="""The page token indicates where to start paging. This should be omitted from the first page's request. +To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response +and use it to populate the `pageToken` field of the next request.""", +) +@click.pass_obj +def admin_user_op_list( + client: FoundryClient, + include: typing.Optional[typing.Literal["ACTIVE", "DELETED"]], + page_size: typing.Optional[int], + page_token: typing.Optional[str], +): + """ + Lists all Users. + + This is a paged endpoint. Each page may be smaller or larger than the requested page size. However, it is guaranteed that if there are more results available, the `nextPageToken` field will be populated. To get the next page, make the same request again, but set the value of the `pageToken` query parameter to be value of the `nextPageToken` value of the previous response. If there is no `nextPageToken` field in the response, you are on the last page. + """ + result = client.admin.User.list( + include=include, + page_size=page_size, + page_token=page_token, + ) + click.echo(repr(result)) + + +@admin_user.command("profile_picture") +@click.argument("user_id", type=str, required=True) +@click.pass_obj +def admin_user_op_profile_picture( + client: FoundryClient, + user_id: str, +): + """ """ + result = client.admin.User.profile_picture( + user_id=user_id, + ) + click.echo(repr(result)) + + +@admin_user.command("revoke_all_tokens") +@click.argument("user_id", type=str, required=True) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def admin_user_op_revoke_all_tokens( + client: FoundryClient, + user_id: str, + preview: typing.Optional[bool], +): + """ + Revoke all active authentication tokens for the user including active browser sessions and long-lived + development tokens. If the user has active sessions in a browser, this will force re-authentication. + + The caller must have permission to manage users for the target user's organization. + + """ + result = client.admin.User.revoke_all_tokens( + user_id=user_id, + preview=preview, + ) + click.echo(repr(result)) + + +@admin_user.command("search") +@click.option("--where", type=str, required=True, help="""""") +@click.option("--page_size", type=int, required=False, help="""""") +@click.option("--page_token", type=str, required=False, help="""""") +@click.pass_obj +def admin_user_op_search( + client: FoundryClient, + where: str, + page_size: typing.Optional[int], + page_token: typing.Optional[str], +): + """ + Perform a case-insensitive prefix search for users based on username, given name and family name. + + """ + result = client.admin.User.search( + where=json.loads(where), + page_size=page_size, + page_token=page_token, + ) + click.echo(repr(result)) + + +@admin_user.group("group_membership") +def admin_user_group_membership(): + pass + + +@admin_user_group_membership.command("list") +@click.argument("user_id", type=str, required=True) +@click.option( + "--page_size", type=int, required=False, help="""The page size to use for the endpoint.""" +) +@click.option( + "--page_token", + type=str, + required=False, + help="""The page token indicates where to start paging. This should be omitted from the first page's request. +To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response +and use it to populate the `pageToken` field of the next request.""", +) +@click.option( + "--transitive", + type=bool, + required=False, + help="""When true, includes the transitive memberships of the Groups the User is a member of. For example, say the +User is a member of Group A, and Group A is a member of Group B. If `transitive=false` only Group A will +be returned, but if `transitive=true` then Groups A and B will be returned. This +will recursively resolve Groups through all layers of nesting. + +Defaults to false. +""", +) +@click.pass_obj +def admin_user_group_membership_op_list( + client: FoundryClient, + user_id: str, + page_size: typing.Optional[int], + page_token: typing.Optional[str], + transitive: typing.Optional[bool], +): + """ + Lists all Groups a given User is a member of. + + This is a paged endpoint. Each page may be smaller or larger than the requested page size. However, + it is guaranteed that if there are more results available, the `nextPageToken` field will be populated. + To get the next page, make the same request again, but set the value of the `pageToken` query parameter + to be value of the `nextPageToken` value of the previous response. If there is no `nextPageToken` field + in the response, you are on the last page. + + """ + result = client.admin.User.GroupMembership.list( + user_id=user_id, + page_size=page_size, + page_token=page_token, + transitive=transitive, + ) + click.echo(repr(result)) + + +@admin_user.group("user_provider_info") +def admin_user_user_provider_info(): + pass + + +@admin_user_user_provider_info.command("get") +@click.argument("user_id", type=str, required=True) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def admin_user_user_provider_info_op_get( + client: FoundryClient, + user_id: str, + preview: typing.Optional[bool], +): + """ + Get the UserProviderInfo. + """ + result = client.admin.User.ProviderInfo.get( + user_id=user_id, + preview=preview, + ) + click.echo(repr(result)) + + +@admin_user_user_provider_info.command("replace") +@click.argument("user_id", type=str, required=True) +@click.option( + "--provider_id", + type=str, + required=True, + help="""The ID of the User in the external authentication provider. This value is determined by the authentication provider. +At most one User can have a given provider ID in a given Realm. +""", +) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def admin_user_user_provider_info_op_replace( + client: FoundryClient, + user_id: str, + provider_id: str, + preview: typing.Optional[bool], +): + """ + Replace the UserProviderInfo. + """ + result = client.admin.User.ProviderInfo.replace( + user_id=user_id, + provider_id=provider_id, + preview=preview, + ) + click.echo(repr(result)) + + +@admin.group("role") +def admin_role(): + pass + + +@admin_role.command("get") +@click.argument("role_id", type=str, required=True) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def admin_role_op_get( + client: FoundryClient, + role_id: str, + preview: typing.Optional[bool], +): + """ + Get the Role with the specified id. + """ + result = client.admin.Role.get( + role_id=role_id, + preview=preview, + ) + click.echo(repr(result)) + + +@admin_role.command("get_batch") +@click.argument("body", type=str, required=True) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def admin_role_op_get_batch( + client: FoundryClient, + body: str, + preview: typing.Optional[bool], +): + """ + Execute multiple get requests on Role. + + The maximum batch size for this endpoint is 500. + """ + result = client.admin.Role.get_batch( + body=json.loads(body), + preview=preview, + ) + click.echo(repr(result)) + + +@admin.group("organization") +def admin_organization(): + pass + + +@admin_organization.command("create") +@click.option( + "--administrators", + type=str, + required=True, + help="""The initial administrators of the Organization. At least one principal must be provided. +""", +) +@click.option( + "--enrollment_rid", + type=str, + required=True, + help="""The RID of the Enrollment that this Organization belongs to. This must be provided. +""", +) +@click.option("--name", type=str, required=True, help="""""") +@click.option("--description", type=str, required=False, help="""""") +@click.option( + "--host", + type=str, + required=False, + help="""The primary host name of the Organization. This should be used when constructing URLs for users of this +Organization. +""", +) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def admin_organization_op_create( + client: FoundryClient, + administrators: str, + enrollment_rid: str, + name: str, + description: typing.Optional[str], + host: typing.Optional[str], + preview: typing.Optional[bool], +): + """ + Creates a new Organization. + """ + result = client.admin.Organization.create( + administrators=json.loads(administrators), + enrollment_rid=enrollment_rid, + name=name, + description=description, + host=host, + preview=preview, + ) + click.echo(repr(result)) + + +@admin_organization.command("get") +@click.argument("organization_rid", type=str, required=True) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def admin_organization_op_get( + client: FoundryClient, + organization_rid: str, + preview: typing.Optional[bool], +): + """ + Get the Organization with the specified rid. + """ + result = client.admin.Organization.get( + organization_rid=organization_rid, + preview=preview, + ) + click.echo(repr(result)) + + +@admin_organization.command("list_available_roles") +@click.argument("organization_rid", type=str, required=True) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def admin_organization_op_list_available_roles( + client: FoundryClient, + organization_rid: str, + preview: typing.Optional[bool], +): + """ + List all roles that can be assigned to a principal for the given Organization. + + """ + result = client.admin.Organization.list_available_roles( + organization_rid=organization_rid, + preview=preview, + ) + click.echo(repr(result)) + + +@admin_organization.command("replace") +@click.argument("organization_rid", type=str, required=True) +@click.option("--name", type=str, required=True, help="""""") +@click.option("--description", type=str, required=False, help="""""") +@click.option( + "--host", + type=str, + required=False, + help="""The primary host name of the Organization. This should be used when constructing URLs for users of this +Organization. +""", +) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def admin_organization_op_replace( + client: FoundryClient, + organization_rid: str, + name: str, + description: typing.Optional[str], + host: typing.Optional[str], + preview: typing.Optional[bool], +): + """ + Replace the Organization with the specified rid. + """ + result = client.admin.Organization.replace( + organization_rid=organization_rid, + name=name, + description=description, + host=host, + preview=preview, + ) + click.echo(repr(result)) + + +@admin_organization.group("organization_role_assignment") +def admin_organization_organization_role_assignment(): + pass + + +@admin_organization_organization_role_assignment.command("add") +@click.argument("organization_rid", type=str, required=True) +@click.option("--role_assignments", type=str, required=True, help="""""") +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def admin_organization_organization_role_assignment_op_add( + client: FoundryClient, + organization_rid: str, + role_assignments: str, + preview: typing.Optional[bool], +): + """ + Assign roles to principals for the given Organization. At most 100 role assignments can be added in a single request. + + """ + result = client.admin.Organization.OrganizationRoleAssignment.add( + organization_rid=organization_rid, + role_assignments=json.loads(role_assignments), + preview=preview, + ) + click.echo(repr(result)) + + +@admin_organization_organization_role_assignment.command("list") +@click.argument("organization_rid", type=str, required=True) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def admin_organization_organization_role_assignment_op_list( + client: FoundryClient, + organization_rid: str, + preview: typing.Optional[bool], +): + """ + List all principals who are assigned a role for the given Organization. + + """ + result = client.admin.Organization.OrganizationRoleAssignment.list( + organization_rid=organization_rid, + preview=preview, + ) + click.echo(repr(result)) + + +@admin_organization_organization_role_assignment.command("remove") +@click.argument("organization_rid", type=str, required=True) +@click.option("--role_assignments", type=str, required=True, help="""""") +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def admin_organization_organization_role_assignment_op_remove( + client: FoundryClient, + organization_rid: str, + role_assignments: str, + preview: typing.Optional[bool], +): + """ + Remove roles from principals for the given Organization. At most 100 role assignments can be removed in a single request. + + """ + result = client.admin.Organization.OrganizationRoleAssignment.remove( + organization_rid=organization_rid, + role_assignments=json.loads(role_assignments), + preview=preview, + ) + click.echo(repr(result)) + + +@admin.group("marking_category") +def admin_marking_category(): + pass + + +@admin_marking_category.command("get") +@click.argument("marking_category_id", type=str, required=True) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def admin_marking_category_op_get( + client: FoundryClient, + marking_category_id: str, + preview: typing.Optional[bool], +): + """ + Get the MarkingCategory with the specified id. + """ + result = client.admin.MarkingCategory.get( + marking_category_id=marking_category_id, + preview=preview, + ) + click.echo(repr(result)) + + +@admin_marking_category.command("list") +@click.option( + "--page_size", type=int, required=False, help="""The page size to use for the endpoint.""" +) +@click.option( + "--page_token", + type=str, + required=False, + help="""The page token indicates where to start paging. This should be omitted from the first page's request. +To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response +and use it to populate the `pageToken` field of the next request.""", +) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def admin_marking_category_op_list( + client: FoundryClient, + page_size: typing.Optional[int], + page_token: typing.Optional[str], + preview: typing.Optional[bool], +): + """ + Maximum page size 100. + """ + result = client.admin.MarkingCategory.list( + page_size=page_size, + page_token=page_token, + preview=preview, + ) + click.echo(repr(result)) + + +@admin.group("marking") +def admin_marking(): + pass + + +@admin_marking.command("create") +@click.option("--category_id", type=str, required=True, help="""""") +@click.option( + "--initial_members", + type=str, + required=True, + help="""Users and Groups that will be able to view resources protected by this Marking. This can be changed later through the MarkingMember operations. +""", +) +@click.option( + "--initial_role_assignments", + type=str, + required=True, + help="""The initial roles that will be assigned when the Marking is created. At least one ADMIN role must be +provided. This can be changed later through the MarkingRoleAssignment operations. + +WARNING: If you do not include your own principal ID or the ID of a Group that you are a member of, +you will create a Marking that you cannot administer. +""", +) +@click.option("--name", type=str, required=True, help="""""") +@click.option("--description", type=str, required=False, help="""""") +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def admin_marking_op_create( + client: FoundryClient, + category_id: str, + initial_members: str, + initial_role_assignments: str, + name: str, + description: typing.Optional[str], + preview: typing.Optional[bool], +): + """ + Creates a new Marking. + """ + result = client.admin.Marking.create( + category_id=category_id, + initial_members=json.loads(initial_members), + initial_role_assignments=json.loads(initial_role_assignments), + name=name, + description=description, + preview=preview, + ) + click.echo(repr(result)) + + +@admin_marking.command("get") +@click.argument("marking_id", type=str, required=True) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def admin_marking_op_get( + client: FoundryClient, + marking_id: str, + preview: typing.Optional[bool], +): + """ + Get the Marking with the specified id. + """ + result = client.admin.Marking.get( + marking_id=marking_id, + preview=preview, + ) + click.echo(repr(result)) + + +@admin_marking.command("get_batch") +@click.argument("body", type=str, required=True) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def admin_marking_op_get_batch( + client: FoundryClient, + body: str, + preview: typing.Optional[bool], +): + """ + Execute multiple get requests on Marking. + + The maximum batch size for this endpoint is 500. + """ + result = client.admin.Marking.get_batch( + body=json.loads(body), + preview=preview, + ) + click.echo(repr(result)) + + +@admin_marking.command("list") +@click.option( + "--page_size", type=int, required=False, help="""The page size to use for the endpoint.""" +) +@click.option( + "--page_token", + type=str, + required=False, + help="""The page token indicates where to start paging. This should be omitted from the first page's request. +To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response +and use it to populate the `pageToken` field of the next request.""", +) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def admin_marking_op_list( + client: FoundryClient, + page_size: typing.Optional[int], + page_token: typing.Optional[str], + preview: typing.Optional[bool], +): + """ + Maximum page size 100. + """ + result = client.admin.Marking.list( + page_size=page_size, + page_token=page_token, + preview=preview, + ) + click.echo(repr(result)) + + +@admin_marking.command("replace") +@click.argument("marking_id", type=str, required=True) +@click.option("--name", type=str, required=True, help="""""") +@click.option("--description", type=str, required=False, help="""""") +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def admin_marking_op_replace( + client: FoundryClient, + marking_id: str, + name: str, + description: typing.Optional[str], + preview: typing.Optional[bool], +): + """ + Replace the Marking with the specified id. + """ + result = client.admin.Marking.replace( + marking_id=marking_id, + name=name, + description=description, + preview=preview, + ) + click.echo(repr(result)) + + +@admin_marking.group("marking_role_assignment") +def admin_marking_marking_role_assignment(): + pass + + +@admin_marking_marking_role_assignment.command("add") +@click.argument("marking_id", type=str, required=True) +@click.option("--role_assignments", type=str, required=True, help="""""") +@click.pass_obj +def admin_marking_marking_role_assignment_op_add( + client: FoundryClient, + marking_id: str, + role_assignments: str, +): + """ """ + result = client.admin.Marking.MarkingRoleAssignment.add( + marking_id=marking_id, + role_assignments=json.loads(role_assignments), + ) + click.echo(repr(result)) + + +@admin_marking_marking_role_assignment.command("list") +@click.argument("marking_id", type=str, required=True) +@click.option( + "--page_size", type=int, required=False, help="""The page size to use for the endpoint.""" +) +@click.option( + "--page_token", + type=str, + required=False, + help="""The page token indicates where to start paging. This should be omitted from the first page's request. +To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response +and use it to populate the `pageToken` field of the next request.""", +) +@click.pass_obj +def admin_marking_marking_role_assignment_op_list( + client: FoundryClient, + marking_id: str, + page_size: typing.Optional[int], + page_token: typing.Optional[str], +): + """ + List all principals who are assigned a role for the given Marking. Ignores the `pageSize` parameter. + + """ + result = client.admin.Marking.MarkingRoleAssignment.list( + marking_id=marking_id, + page_size=page_size, + page_token=page_token, + ) + click.echo(repr(result)) + + +@admin_marking_marking_role_assignment.command("remove") +@click.argument("marking_id", type=str, required=True) +@click.option("--role_assignments", type=str, required=True, help="""""") +@click.pass_obj +def admin_marking_marking_role_assignment_op_remove( + client: FoundryClient, + marking_id: str, + role_assignments: str, +): + """ """ + result = client.admin.Marking.MarkingRoleAssignment.remove( + marking_id=marking_id, + role_assignments=json.loads(role_assignments), + ) + click.echo(repr(result)) + + +@admin_marking.group("marking_member") +def admin_marking_marking_member(): + pass + + +@admin_marking_marking_member.command("add") +@click.argument("marking_id", type=str, required=True) +@click.option("--principal_ids", type=str, required=True, help="""""") +@click.pass_obj +def admin_marking_marking_member_op_add( + client: FoundryClient, + marking_id: str, + principal_ids: str, +): + """ """ + result = client.admin.Marking.MarkingMember.add( + marking_id=marking_id, + principal_ids=json.loads(principal_ids), + ) + click.echo(repr(result)) + + +@admin_marking_marking_member.command("list") +@click.argument("marking_id", type=str, required=True) +@click.option( + "--page_size", type=int, required=False, help="""The page size to use for the endpoint.""" +) +@click.option( + "--page_token", + type=str, + required=False, + help="""The page token indicates where to start paging. This should be omitted from the first page's request. +To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response +and use it to populate the `pageToken` field of the next request.""", +) +@click.option( + "--transitive", + type=bool, + required=False, + help="""When true, includes the transitive members of groups contained within groups that are members of this +Marking. For example, say the Marking has member Group A, and Group A has member User B. If +`transitive=false` only Group A will be returned, but if `transitive=true` then Group A and User B +will be returned. This will recursively resolve Groups through all layers of nesting. + +Defaults to false. +""", +) +@click.pass_obj +def admin_marking_marking_member_op_list( + client: FoundryClient, + marking_id: str, + page_size: typing.Optional[int], + page_token: typing.Optional[str], + transitive: typing.Optional[bool], +): + """ + Lists all principals who can view resources protected by the given Marking. Ignores the `pageSize` parameter. + Requires `api:admin-write` because only marking administrators can view marking members. + + """ + result = client.admin.Marking.MarkingMember.list( + marking_id=marking_id, + page_size=page_size, + page_token=page_token, + transitive=transitive, + ) + click.echo(repr(result)) + + +@admin_marking_marking_member.command("remove") +@click.argument("marking_id", type=str, required=True) +@click.option("--principal_ids", type=str, required=True, help="""""") +@click.pass_obj +def admin_marking_marking_member_op_remove( + client: FoundryClient, + marking_id: str, + principal_ids: str, +): + """ """ + result = client.admin.Marking.MarkingMember.remove( + marking_id=marking_id, + principal_ids=json.loads(principal_ids), + ) + click.echo(repr(result)) + + +@admin.group("group") +def admin_group(): + pass + + +@admin_group.command("create") +@click.option( + "--attributes", + type=str, + required=True, + help="""A map of the Group's attributes. Attributes prefixed with "multipass:" are reserved for internal use by Foundry and are subject to change.""", +) +@click.option("--name", type=str, required=True, help="""The name of the Group.""") +@click.option( + "--organizations", + type=str, + required=True, + help="""The RIDs of the Organizations whose members can see this group. At least one Organization RID must be listed. +""", +) +@click.option("--description", type=str, required=False, help="""A description of the Group.""") +@click.pass_obj +def admin_group_op_create( + client: FoundryClient, + attributes: str, + name: str, + organizations: str, + description: typing.Optional[str], +): + """ + Creates a new Group. + """ + result = client.admin.Group.create( + attributes=json.loads(attributes), + name=name, + organizations=json.loads(organizations), + description=description, + ) + click.echo(repr(result)) + + +@admin_group.command("delete") +@click.argument("group_id", type=str, required=True) +@click.pass_obj +def admin_group_op_delete( + client: FoundryClient, + group_id: str, +): + """ + Delete the Group with the specified id. + """ + result = client.admin.Group.delete( + group_id=group_id, + ) + click.echo(repr(result)) + + +@admin_group.command("get") +@click.argument("group_id", type=str, required=True) +@click.pass_obj +def admin_group_op_get( + client: FoundryClient, + group_id: str, +): + """ + Get the Group with the specified id. + """ + result = client.admin.Group.get( + group_id=group_id, + ) + click.echo(repr(result)) + + +@admin_group.command("get_batch") +@click.argument("body", type=str, required=True) +@click.pass_obj +def admin_group_op_get_batch( + client: FoundryClient, + body: str, +): + """ + Execute multiple get requests on Group. + + The maximum batch size for this endpoint is 500. + """ + result = client.admin.Group.get_batch( + body=json.loads(body), + ) + click.echo(repr(result)) + + +@admin_group.command("list") +@click.option( + "--page_size", type=int, required=False, help="""The page size to use for the endpoint.""" +) +@click.option( + "--page_token", + type=str, + required=False, + help="""The page token indicates where to start paging. This should be omitted from the first page's request. +To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response +and use it to populate the `pageToken` field of the next request.""", +) +@click.pass_obj +def admin_group_op_list( + client: FoundryClient, + page_size: typing.Optional[int], + page_token: typing.Optional[str], +): + """ + Lists all Groups. + + This is a paged endpoint. Each page may be smaller or larger than the requested page size. However, it is guaranteed that if there are more results available, the `nextPageToken` field will be populated. To get the next page, make the same request again, but set the value of the `pageToken` query parameter to be value of the `nextPageToken` value of the previous response. If there is no `nextPageToken` field in the response, you are on the last page. + """ + result = client.admin.Group.list( + page_size=page_size, + page_token=page_token, + ) + click.echo(repr(result)) + + +@admin_group.command("search") +@click.option("--where", type=str, required=True, help="""""") +@click.option("--page_size", type=int, required=False, help="""""") +@click.option("--page_token", type=str, required=False, help="""""") +@click.pass_obj +def admin_group_op_search( + client: FoundryClient, + where: str, + page_size: typing.Optional[int], + page_token: typing.Optional[str], +): + """ + Perform a case-insensitive prefix search for groups based on group name. + + """ + result = client.admin.Group.search( + where=json.loads(where), + page_size=page_size, + page_token=page_token, + ) + click.echo(repr(result)) + + +@admin_group.group("group_membership_expiration_policy") +def admin_group_group_membership_expiration_policy(): + pass + + +@admin_group_group_membership_expiration_policy.command("get") +@click.argument("group_id", type=str, required=True) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def admin_group_group_membership_expiration_policy_op_get( + client: FoundryClient, + group_id: str, + preview: typing.Optional[bool], +): + """ + Get the GroupMembershipExpirationPolicy. + """ + result = client.admin.Group.MembershipExpirationPolicy.get( + group_id=group_id, + preview=preview, + ) + click.echo(repr(result)) + + +@admin_group_group_membership_expiration_policy.command("replace") +@click.argument("group_id", type=str, required=True) +@click.option( + "--maximum_duration", + type=int, + required=False, + help="""Members in this group must be added with expirations that are less than this duration in seconds into the future from the time they are added. +""", +) +@click.option( + "--maximum_value", + type=click.DateTime(), + required=False, + help="""Members in this group must be added with expiration times that occur before this value.""", +) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def admin_group_group_membership_expiration_policy_op_replace( + client: FoundryClient, + group_id: str, + maximum_duration: typing.Optional[int], + maximum_value: typing.Optional[datetime], + preview: typing.Optional[bool], +): + """ + Replace the GroupMembershipExpirationPolicy. + """ + result = client.admin.Group.MembershipExpirationPolicy.replace( + group_id=group_id, + maximum_duration=maximum_duration, + maximum_value=maximum_value, + preview=preview, + ) + click.echo(repr(result)) + + +@admin_group.group("group_member") +def admin_group_group_member(): + pass + + +@admin_group_group_member.command("add") +@click.argument("group_id", type=str, required=True) +@click.option("--principal_ids", type=str, required=True, help="""""") +@click.option("--expiration", type=click.DateTime(), required=False, help="""""") +@click.pass_obj +def admin_group_group_member_op_add( + client: FoundryClient, + group_id: str, + principal_ids: str, + expiration: typing.Optional[datetime], +): + """ """ + result = client.admin.Group.GroupMember.add( + group_id=group_id, + principal_ids=json.loads(principal_ids), + expiration=expiration, + ) + click.echo(repr(result)) + + +@admin_group_group_member.command("list") +@click.argument("group_id", type=str, required=True) +@click.option( + "--page_size", type=int, required=False, help="""The page size to use for the endpoint.""" +) +@click.option( + "--page_token", + type=str, + required=False, + help="""The page token indicates where to start paging. This should be omitted from the first page's request. +To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response +and use it to populate the `pageToken` field of the next request.""", +) +@click.option( + "--transitive", + type=bool, + required=False, + help="""When true, includes the transitive members of groups contained within this group. For example, say the +Group has member Group A, and Group A has member User B. If `transitive=false` only Group A will +be returned, but if `transitive=true` then Group A and User B will be returned. This +will recursively resolve Groups through all layers of nesting. + +Defaults to false. +""", +) +@click.pass_obj +def admin_group_group_member_op_list( + client: FoundryClient, + group_id: str, + page_size: typing.Optional[int], + page_token: typing.Optional[str], + transitive: typing.Optional[bool], +): + """ + Lists all members (which can be a User or a Group) of a given Group. + + This is a paged endpoint. Each page may be smaller or larger than the requested page size. However, + it is guaranteed that if there are more results available, the `nextPageToken` field will be populated. + To get the next page, make the same request again, but set the value of the `pageToken` query parameter + to be value of the `nextPageToken` value of the previous response. If there is no `nextPageToken` field + in the response, you are on the last page. + + """ + result = client.admin.Group.GroupMember.list( + group_id=group_id, + page_size=page_size, + page_token=page_token, + transitive=transitive, + ) + click.echo(repr(result)) + + +@admin_group_group_member.command("remove") +@click.argument("group_id", type=str, required=True) +@click.option("--principal_ids", type=str, required=True, help="""""") +@click.pass_obj +def admin_group_group_member_op_remove( + client: FoundryClient, + group_id: str, + principal_ids: str, +): + """ """ + result = client.admin.Group.GroupMember.remove( + group_id=group_id, + principal_ids=json.loads(principal_ids), + ) + click.echo(repr(result)) + + +@admin_group.group("group_provider_info") +def admin_group_group_provider_info(): + pass + + +@admin_group_group_provider_info.command("get") +@click.argument("group_id", type=str, required=True) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def admin_group_group_provider_info_op_get( + client: FoundryClient, + group_id: str, + preview: typing.Optional[bool], +): + """ + Get the GroupProviderInfo. + """ + result = client.admin.Group.ProviderInfo.get( + group_id=group_id, + preview=preview, + ) + click.echo(repr(result)) + + +@admin_group_group_provider_info.command("replace") +@click.argument("group_id", type=str, required=True) +@click.option( + "--provider_id", + type=str, + required=True, + help="""The ID of the Group in the external authentication provider. This value is determined by the authentication provider. +At most one Group can have a given provider ID in a given Realm. +""", +) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def admin_group_group_provider_info_op_replace( + client: FoundryClient, + group_id: str, + provider_id: str, + preview: typing.Optional[bool], +): + """ + Replace the GroupProviderInfo. + """ + result = client.admin.Group.ProviderInfo.replace( + group_id=group_id, + provider_id=provider_id, + preview=preview, + ) + click.echo(repr(result)) + + +@admin.group("enrollment") +def admin_enrollment(): + pass + + +@admin_enrollment.command("get") +@click.argument("enrollment_rid", type=str, required=True) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def admin_enrollment_op_get( + client: FoundryClient, + enrollment_rid: str, + preview: typing.Optional[bool], +): + """ + Get the Enrollment with the specified rid. + """ + result = client.admin.Enrollment.get( + enrollment_rid=enrollment_rid, + preview=preview, + ) + click.echo(repr(result)) + + +@admin_enrollment.command("get_current") +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def admin_enrollment_op_get_current( + client: FoundryClient, + preview: typing.Optional[bool], +): + """ + Returns the Enrollment associated with the current User's primary organization. + + """ + result = client.admin.Enrollment.get_current( + preview=preview, + ) + click.echo(repr(result)) + + +@admin_enrollment.group("authentication_provider") +def admin_enrollment_authentication_provider(): + pass + + +@admin_enrollment_authentication_provider.command("get") +@click.argument("enrollment_rid", type=str, required=True) +@click.argument("authentication_provider_rid", type=str, required=True) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def admin_enrollment_authentication_provider_op_get( + client: FoundryClient, + enrollment_rid: str, + authentication_provider_rid: str, + preview: typing.Optional[bool], +): + """ + Get the AuthenticationProvider with the specified rid. + """ + result = client.admin.Enrollment.AuthenticationProvider.get( + enrollment_rid=enrollment_rid, + authentication_provider_rid=authentication_provider_rid, + preview=preview, + ) + click.echo(repr(result)) + + +@admin_enrollment_authentication_provider.command("list") +@click.argument("enrollment_rid", type=str, required=True) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def admin_enrollment_authentication_provider_op_list( + client: FoundryClient, + enrollment_rid: str, + preview: typing.Optional[bool], +): + """ + Lists all AuthenticationProviders. + + + """ + result = client.admin.Enrollment.AuthenticationProvider.list( + enrollment_rid=enrollment_rid, + preview=preview, + ) + click.echo(repr(result)) + + +@admin_enrollment_authentication_provider.command("preregister_group") +@click.argument("enrollment_rid", type=str, required=True) +@click.argument("authentication_provider_rid", type=str, required=True) +@click.option("--name", type=str, required=True, help="""""") +@click.option( + "--organizations", + type=str, + required=True, + help="""The RIDs of the Organizations that can view this group. +""", +) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def admin_enrollment_authentication_provider_op_preregister_group( + client: FoundryClient, + enrollment_rid: str, + authentication_provider_rid: str, + name: str, + organizations: str, + preview: typing.Optional[bool], +): + """ + Register a Group with a given name before any users with this group log in through this Authentication Provider. + Preregistered groups can be used anywhere other groups are used in the platform. + + """ + result = client.admin.Enrollment.AuthenticationProvider.preregister_group( + enrollment_rid=enrollment_rid, + authentication_provider_rid=authentication_provider_rid, + name=name, + organizations=json.loads(organizations), + preview=preview, + ) + click.echo(repr(result)) + + +@admin_enrollment_authentication_provider.command("preregister_user") +@click.argument("enrollment_rid", type=str, required=True) +@click.argument("authentication_provider_rid", type=str, required=True) +@click.option( + "--organization", + type=str, + required=True, + help="""The RID of the user's primary Organization. This may be changed when the user logs in for the first +time depending on any configured Organization assignment rules. +""", +) +@click.option( + "--username", + type=str, + required=True, + help="""The new user's username. This must match one of the provider's supported username patterns.""", +) +@click.option("--attributes", type=str, required=False, help="""""") +@click.option("--email", type=str, required=False, help="""""") +@click.option("--family_name", type=str, required=False, help="""""") +@click.option("--given_name", type=str, required=False, help="""""") +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def admin_enrollment_authentication_provider_op_preregister_user( + client: FoundryClient, + enrollment_rid: str, + authentication_provider_rid: str, + organization: str, + username: str, + attributes: typing.Optional[str], + email: typing.Optional[str], + family_name: typing.Optional[str], + given_name: typing.Optional[str], + preview: typing.Optional[bool], +): + """ + Register a User with a given username before they log in to the platform for the first time through this + Authentication Provider. Preregistered users can be assigned to groups and roles prior to first login. + + """ + result = client.admin.Enrollment.AuthenticationProvider.preregister_user( + enrollment_rid=enrollment_rid, + authentication_provider_rid=authentication_provider_rid, + organization=organization, + username=username, + attributes=None if attributes is None else json.loads(attributes), + email=email, + family_name=family_name, + given_name=given_name, + preview=preview, + ) + click.echo(repr(result)) + + +@admin_enrollment.group("host") +def admin_enrollment_host(): + pass + + +@admin_enrollment_host.command("list") +@click.argument("enrollment_rid", type=str, required=True) +@click.option( + "--page_size", type=int, required=False, help="""The page size to use for the endpoint.""" +) +@click.option( + "--page_token", + type=str, + required=False, + help="""The page token indicates where to start paging. This should be omitted from the first page's request. +To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response +and use it to populate the `pageToken` field of the next request.""", +) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def admin_enrollment_host_op_list( + client: FoundryClient, + enrollment_rid: str, + page_size: typing.Optional[int], + page_token: typing.Optional[str], + preview: typing.Optional[bool], +): + """ + Lists all Hosts. + + This is a paged endpoint. Each page may be smaller or larger than the requested page size. However, it is guaranteed that if there are more results available, the `nextPageToken` field will be populated. To get the next page, make the same request again, but set the value of the `pageToken` query parameter to be value of the `nextPageToken` value of the previous response. If there is no `nextPageToken` field in the response, you are on the last page. + """ + result = client.admin.Enrollment.Host.list( + enrollment_rid=enrollment_rid, + page_size=page_size, + page_token=page_token, + preview=preview, + ) + click.echo(repr(result)) + + +@admin_enrollment.group("enrollment_role_assignment") +def admin_enrollment_enrollment_role_assignment(): + pass + + +@admin_enrollment_enrollment_role_assignment.command("add") +@click.argument("enrollment_rid", type=str, required=True) +@click.option("--role_assignments", type=str, required=True, help="""""") +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def admin_enrollment_enrollment_role_assignment_op_add( + client: FoundryClient, + enrollment_rid: str, + role_assignments: str, + preview: typing.Optional[bool], +): + """ + Assign roles to principals for the given Enrollment. At most 100 role assignments can be added in a single request. + + """ + result = client.admin.Enrollment.EnrollmentRoleAssignment.add( + enrollment_rid=enrollment_rid, + role_assignments=json.loads(role_assignments), + preview=preview, + ) + click.echo(repr(result)) + + +@admin_enrollment_enrollment_role_assignment.command("list") +@click.argument("enrollment_rid", type=str, required=True) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def admin_enrollment_enrollment_role_assignment_op_list( + client: FoundryClient, + enrollment_rid: str, + preview: typing.Optional[bool], +): + """ + List all principals who are assigned a role for the given Enrollment. + + """ + result = client.admin.Enrollment.EnrollmentRoleAssignment.list( + enrollment_rid=enrollment_rid, + preview=preview, + ) + click.echo(repr(result)) + + +@admin_enrollment_enrollment_role_assignment.command("remove") +@click.argument("enrollment_rid", type=str, required=True) +@click.option("--role_assignments", type=str, required=True, help="""""") +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def admin_enrollment_enrollment_role_assignment_op_remove( + client: FoundryClient, + enrollment_rid: str, + role_assignments: str, + preview: typing.Optional[bool], +): + """ + Remove roles from principals for the given Enrollment. At most 100 role assignments can be removed in a single request. + + """ + result = client.admin.Enrollment.EnrollmentRoleAssignment.remove( + enrollment_rid=enrollment_rid, + role_assignments=json.loads(role_assignments), + preview=preview, + ) + click.echo(repr(result)) + + +@cli.group("aip_agents") +def aip_agents(): + pass + + +@aip_agents.group("agent") +def aip_agents_agent(): + pass + + +@aip_agents_agent.command("all_sessions") +@click.option( + "--page_size", + type=int, + required=False, + help="""The maximum number of sessions to return in a single page. The maximum allowed value is 100. +Defaults to 100 if not specified. +""", +) +@click.option("--page_token", type=str, required=False, help="""""") +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def aip_agents_agent_op_all_sessions( + client: FoundryClient, + page_size: typing.Optional[int], + page_token: typing.Optional[str], + preview: typing.Optional[bool], +): + """ + List all conversation sessions between the calling user and all accessible Agents that were created by this client. + Sessions are returned in order of most recently updated first. + + """ + result = client.aip_agents.Agent.all_sessions( + page_size=page_size, + page_token=page_token, + preview=preview, + ) + click.echo(repr(result)) + + +@aip_agents_agent.command("get") +@click.argument("agent_rid", type=str, required=True) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.option( + "--version", + type=str, + required=False, + help="""The version of the Agent to retrieve. If not specified, the latest published version will be returned. +""", +) +@click.pass_obj +def aip_agents_agent_op_get( + client: FoundryClient, + agent_rid: str, + preview: typing.Optional[bool], + version: typing.Optional[str], +): + """ + Get details for an AIP Agent. + """ + result = client.aip_agents.Agent.get( + agent_rid=agent_rid, + preview=preview, + version=version, + ) + click.echo(repr(result)) + + +@aip_agents_agent.group("session") +def aip_agents_agent_session(): + pass + + +@aip_agents_agent_session.command("blocking_continue") +@click.argument("agent_rid", type=str, required=True) +@click.argument("session_rid", type=str, required=True) +@click.option( + "--parameter_inputs", + type=str, + required=True, + help="""Any supplied values for [application variables](https://palantir.com/docs/foundry/agent-studio/application-state/) to pass to the Agent for the exchange. +""", +) +@click.option( + "--user_input", + type=str, + required=True, + help="""The user message for the Agent to respond to.""", +) +@click.option( + "--contexts_override", + type=str, + required=False, + help="""If set, automatic [context retrieval](https://palantir.com/docs/foundry/agent-studio/retrieval-context/) is skipped and the list of specified context is provided to the Agent instead. +If omitted, relevant context for the user message is automatically retrieved and included in the prompt, based on data sources configured on the Agent for the session. +""", +) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.option( + "--session_trace_id", + type=str, + required=False, + help="""The unique identifier to use for this continue session trace. By generating and passing this ID to the +`blockingContinue` endpoint, clients can use this trace ID to separately load details of the trace used +to generate a result, while the result is in progress. If omitted, it will be generated automatically. +Clients can check the generated ID by inspecting the `sessionTraceId` in the `SessionExchangeResult`. +""", +) +@click.pass_obj +def aip_agents_agent_session_op_blocking_continue( + client: FoundryClient, + agent_rid: str, + session_rid: str, + parameter_inputs: str, + user_input: str, + contexts_override: typing.Optional[str], + preview: typing.Optional[bool], + session_trace_id: typing.Optional[str], +): + """ + Continue a conversation session with an Agent, or add the first exchange to a session after creation. + Adds a new exchange to the session with the provided inputs, and generates a response from the Agent. + Blocks on returning the result of the added exchange until the response is fully generated. + Streamed responses are also supported; see `streamingContinue` for details. + Concurrent requests to continue the same session are not supported. + Clients should wait to receive a response before sending the next message. + + """ + result = client.aip_agents.Agent.Session.blocking_continue( + agent_rid=agent_rid, + session_rid=session_rid, + parameter_inputs=json.loads(parameter_inputs), + user_input=json.loads(user_input), + contexts_override=None if contexts_override is None else json.loads(contexts_override), + preview=preview, + session_trace_id=session_trace_id, + ) + click.echo(repr(result)) + + +@aip_agents_agent_session.command("cancel") +@click.argument("agent_rid", type=str, required=True) +@click.argument("session_rid", type=str, required=True) +@click.option( + "--message_id", + type=str, + required=True, + help="""The identifier for the in-progress exchange to cancel. +This should match the `messageId` which was provided when initiating the exchange with `streamingContinue`. +""", +) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.option( + "--response", + type=str, + required=False, + help="""When specified, the exchange is added to the session with the client-provided response as the result. +When omitted, the exchange is not added to the session. +""", +) +@click.pass_obj +def aip_agents_agent_session_op_cancel( + client: FoundryClient, + agent_rid: str, + session_rid: str, + message_id: str, + preview: typing.Optional[bool], + response: typing.Optional[str], +): + """ + Cancel an in-progress streamed exchange with an Agent which was initiated with `streamingContinue`. + Canceling an exchange allows clients to prevent the exchange from being added to the session, or to provide a response to replace the Agent-generated response. + Note that canceling an exchange does not terminate the stream returned by `streamingContinue`; clients should close the stream on triggering the cancellation request to stop reading from the stream. + + """ + result = client.aip_agents.Agent.Session.cancel( + agent_rid=agent_rid, + session_rid=session_rid, + message_id=message_id, + preview=preview, + response=response, + ) + click.echo(repr(result)) + + +@aip_agents_agent_session.command("create") +@click.argument("agent_rid", type=str, required=True) +@click.option( + "--agent_version", + type=str, + required=False, + help="""The version of the Agent associated with the session. +This can be set by clients on session creation. +If not specified, defaults to use the latest published version of the Agent at session creation time. +""", +) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def aip_agents_agent_session_op_create( + client: FoundryClient, + agent_rid: str, + agent_version: typing.Optional[str], + preview: typing.Optional[bool], +): + """ + Create a new conversation session between the calling user and an Agent. + Use `blockingContinue` or `streamingContinue` to start adding exchanges to the session. + + """ + result = client.aip_agents.Agent.Session.create( + agent_rid=agent_rid, + agent_version=agent_version, + preview=preview, + ) + click.echo(repr(result)) + + +@aip_agents_agent_session.command("delete") +@click.argument("agent_rid", type=str, required=True) +@click.argument("session_rid", type=str, required=True) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def aip_agents_agent_session_op_delete( + client: FoundryClient, + agent_rid: str, + session_rid: str, + preview: typing.Optional[bool], +): + """ + Delete a conversation session between the calling user and an Agent. + Once deleted, the session can no longer be accessed and will not appear in session lists. + + """ + result = client.aip_agents.Agent.Session.delete( + agent_rid=agent_rid, + session_rid=session_rid, + preview=preview, + ) + click.echo(repr(result)) + + +@aip_agents_agent_session.command("get") +@click.argument("agent_rid", type=str, required=True) +@click.argument("session_rid", type=str, required=True) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def aip_agents_agent_session_op_get( + client: FoundryClient, + agent_rid: str, + session_rid: str, + preview: typing.Optional[bool], +): + """ + Get the details of a conversation session between the calling user and an Agent. + """ + result = client.aip_agents.Agent.Session.get( + agent_rid=agent_rid, + session_rid=session_rid, + preview=preview, + ) + click.echo(repr(result)) + + +@aip_agents_agent_session.command("list") +@click.argument("agent_rid", type=str, required=True) +@click.option( + "--page_size", type=int, required=False, help="""The page size to use for the endpoint.""" +) +@click.option( + "--page_token", + type=str, + required=False, + help="""The page token indicates where to start paging. This should be omitted from the first page's request. +To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response +and use it to populate the `pageToken` field of the next request.""", +) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def aip_agents_agent_session_op_list( + client: FoundryClient, + agent_rid: str, + page_size: typing.Optional[int], + page_token: typing.Optional[str], + preview: typing.Optional[bool], +): + """ + List all conversation sessions between the calling user and an Agent that was created by this client. + This does not list sessions for the user created by other clients. + For example, any sessions created by the user in AIP Agent Studio will not be listed here. + Sessions are returned in order of most recently updated first. + + """ + result = client.aip_agents.Agent.Session.list( + agent_rid=agent_rid, + page_size=page_size, + page_token=page_token, + preview=preview, + ) + click.echo(repr(result)) + + +@aip_agents_agent_session.command("rag_context") +@click.argument("agent_rid", type=str, required=True) +@click.argument("session_rid", type=str, required=True) +@click.option( + "--parameter_inputs", + type=str, + required=True, + help="""Any values for [application variables](https://palantir.com/docs/foundry/agent-studio/application-state/) to use for the context retrieval. +""", +) +@click.option( + "--user_input", + type=str, + required=True, + help="""The user message to retrieve relevant context for from the configured Agent data sources.""", +) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def aip_agents_agent_session_op_rag_context( + client: FoundryClient, + agent_rid: str, + session_rid: str, + parameter_inputs: str, + user_input: str, + preview: typing.Optional[bool], +): + """ + Retrieve relevant [context](https://palantir.com/docs/foundry/agent-studio/core-concepts/#retrieval-context) for a user message from the data sources configured for the session. + This allows clients to pre-retrieve context for a user message before sending it to the Agent with the `contextsOverride` option when continuing a session, to allow any pre-processing of the context before sending it to the Agent. + + """ + result = client.aip_agents.Agent.Session.rag_context( + agent_rid=agent_rid, + session_rid=session_rid, + parameter_inputs=json.loads(parameter_inputs), + user_input=json.loads(user_input), + preview=preview, + ) + click.echo(repr(result)) + + +@aip_agents_agent_session.command("streaming_continue") +@click.argument("agent_rid", type=str, required=True) +@click.argument("session_rid", type=str, required=True) +@click.option( + "--parameter_inputs", + type=str, + required=True, + help="""Any supplied values for [application variables](https://palantir.com/docs/foundry/agent-studio/application-state/) to pass to the Agent for the exchange. +""", +) +@click.option( + "--user_input", + type=str, + required=True, + help="""The user message for the Agent to respond to.""", +) +@click.option( + "--contexts_override", + type=str, + required=False, + help="""If set, automatic [context](https://palantir.com/docs/foundry/agent-studio/retrieval-context/) retrieval is skipped and the list of specified context is provided to the Agent instead. +If omitted, relevant context for the user message is automatically retrieved and included in the prompt, based on data sources configured on the Agent for the session. +""", +) +@click.option( + "--message_id", + type=str, + required=False, + help="""A client-generated Universally Unique Identifier (UUID) to identify the message, which the client can use to cancel the exchange before the streaming response is complete. +""", +) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.option( + "--session_trace_id", + type=str, + required=False, + help="""The unique identifier to use for this continue session trace. By generating and passing this ID to the +`streamingContinue` endpoint, clients can use this trace ID to separately load details of the trace used +to generate a result, while the result is in progress. If omitted, it will be generated automatically. +Clients can check the generated ID by inspecting the `sessionTraceId` in the `SessionExchangeResult`, +which can be loaded via the `getContent` endpoint. +""", +) +@click.pass_obj +def aip_agents_agent_session_op_streaming_continue( + client: FoundryClient, + agent_rid: str, + session_rid: str, + parameter_inputs: str, + user_input: str, + contexts_override: typing.Optional[str], + message_id: typing.Optional[str], + preview: typing.Optional[bool], + session_trace_id: typing.Optional[str], +): + """ + Continue a conversation session with an Agent, or add the first exchange to a session after creation. + Adds a new exchange to the session with the provided inputs, and generates a response from the Agent. + Returns a stream of the Agent response text (formatted using markdown) for clients to consume as the response is generated. + On completion of the streamed response, clients can load the full details of the exchange that was added to the session by reloading the session content. + Streamed exchanges also support cancellation; see `cancel` for details. + Concurrent requests to continue the same session are not supported. + Clients should wait to receive a response, or cancel the in-progress exchange, before sending the next message. + + """ + result = client.aip_agents.Agent.Session.streaming_continue( + agent_rid=agent_rid, + session_rid=session_rid, + parameter_inputs=json.loads(parameter_inputs), + user_input=json.loads(user_input), + contexts_override=None if contexts_override is None else json.loads(contexts_override), + message_id=message_id, + preview=preview, + session_trace_id=session_trace_id, + ) + click.echo(result) + + +@aip_agents_agent_session.command("update_title") +@click.argument("agent_rid", type=str, required=True) +@click.argument("session_rid", type=str, required=True) +@click.option( + "--title", + type=str, + required=True, + help="""The new title for the session. +The maximum title length is 200 characters. Titles are truncated if they exceed this length. +""", +) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def aip_agents_agent_session_op_update_title( + client: FoundryClient, + agent_rid: str, + session_rid: str, + title: str, + preview: typing.Optional[bool], +): + """ + Update the title for a session. + Use this to set a custom title for a session to help identify it in the list of sessions with an Agent. + + """ + result = client.aip_agents.Agent.Session.update_title( + agent_rid=agent_rid, + session_rid=session_rid, + title=title, + preview=preview, + ) + click.echo(repr(result)) + + +@aip_agents_agent_session.group("session_trace") +def aip_agents_agent_session_session_trace(): + pass + + +@aip_agents_agent_session_session_trace.command("get") +@click.argument("agent_rid", type=str, required=True) +@click.argument("session_rid", type=str, required=True) +@click.argument("session_trace_id", type=str, required=True) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def aip_agents_agent_session_session_trace_op_get( + client: FoundryClient, + agent_rid: str, + session_rid: str, + session_trace_id: str, + preview: typing.Optional[bool], +): + """ + Get the trace of an Agent response. The trace lists the sequence of steps that an Agent took to arrive at + an answer. For example, a trace may include steps such as context retrieval and tool calls. Clients should + poll this endpoint to check the realtime progress of a response until the trace is completed. + + """ + result = client.aip_agents.Agent.Session.SessionTrace.get( + agent_rid=agent_rid, + session_rid=session_rid, + session_trace_id=session_trace_id, + preview=preview, + ) + click.echo(repr(result)) + + +@aip_agents_agent_session.group("content") +def aip_agents_agent_session_content(): + pass + + +@aip_agents_agent_session_content.command("get") +@click.argument("agent_rid", type=str, required=True) +@click.argument("session_rid", type=str, required=True) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def aip_agents_agent_session_content_op_get( + client: FoundryClient, + agent_rid: str, + session_rid: str, + preview: typing.Optional[bool], +): + """ + Get the conversation content for a session between the calling user and an Agent. + """ + result = client.aip_agents.Agent.Session.Content.get( + agent_rid=agent_rid, + session_rid=session_rid, + preview=preview, + ) + click.echo(repr(result)) + + +@aip_agents_agent.group("agent_version") +def aip_agents_agent_agent_version(): + pass + + +@aip_agents_agent_agent_version.command("get") +@click.argument("agent_rid", type=str, required=True) +@click.argument("agent_version_string", type=str, required=True) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def aip_agents_agent_agent_version_op_get( + client: FoundryClient, + agent_rid: str, + agent_version_string: str, + preview: typing.Optional[bool], +): + """ + Get version details for an AIP Agent. + """ + result = client.aip_agents.Agent.AgentVersion.get( + agent_rid=agent_rid, + agent_version_string=agent_version_string, + preview=preview, + ) + click.echo(repr(result)) + + +@aip_agents_agent_agent_version.command("list") +@click.argument("agent_rid", type=str, required=True) +@click.option( + "--page_size", type=int, required=False, help="""The page size to use for the endpoint.""" +) +@click.option( + "--page_token", + type=str, + required=False, + help="""The page token indicates where to start paging. This should be omitted from the first page's request. +To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response +and use it to populate the `pageToken` field of the next request.""", +) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def aip_agents_agent_agent_version_op_list( + client: FoundryClient, + agent_rid: str, + page_size: typing.Optional[int], + page_token: typing.Optional[str], + preview: typing.Optional[bool], +): + """ + List all versions for an AIP Agent. + Versions are returned in descending order, by most recent versions first. + + """ + result = client.aip_agents.Agent.AgentVersion.list( + agent_rid=agent_rid, + page_size=page_size, + page_token=page_token, + preview=preview, + ) + click.echo(repr(result)) + + +@cli.group("audit") +def audit(): + pass + + +@audit.group("organization") +def audit_organization(): + pass + + +@audit_organization.group("log_file") +def audit_organization_log_file(): + pass + + +@audit_organization_log_file.command("content") +@click.argument("organization_rid", type=str, required=True) +@click.argument("log_file_id", type=str, required=True) +@click.pass_obj +def audit_organization_log_file_op_content( + client: FoundryClient, + organization_rid: str, + log_file_id: str, +): + """ """ + result = client.audit.Organization.LogFile.content( + organization_rid=organization_rid, + log_file_id=log_file_id, + ) + click.echo(result) + + +@audit_organization_log_file.command("list") +@click.argument("organization_rid", type=str, required=True) +@click.option( + "--end_date", + type=str, + required=False, + help="""List log files for audit events up until this date (inclusive). If absent, defaults to no end date. Use the returned `nextPageToken` to continually poll the `listLogFiles` endpoint to list the latest available logs. +""", +) +@click.option( + "--page_size", type=int, required=False, help="""The page size to use for the endpoint.""" +) +@click.option( + "--page_token", + type=str, + required=False, + help="""The page token indicates where to start paging. This should be omitted from the first page's request. +To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response +and use it to populate the `pageToken` field of the next request.""", +) +@click.option( + "--start_date", + type=str, + required=False, + help="""List log files for audit events starting from this date. This parameter is required for the initial request (when `pageToken` is not provided). +""", +) +@click.pass_obj +def audit_organization_log_file_op_list( + client: FoundryClient, + organization_rid: str, + end_date: typing.Optional[str], + page_size: typing.Optional[int], + page_token: typing.Optional[str], + start_date: typing.Optional[str], +): + """ + Lists all LogFiles. + + This is a paged endpoint. Each page may be smaller or larger than the requested page size. However, it is guaranteed that if there are more results available, the `nextPageToken` field will be populated. To get the next page, make the same request again, but set the value of the `pageToken` query parameter to be value of the `nextPageToken` value of the previous response. If there is no `nextPageToken` field in the response, you are on the last page. + """ + result = client.audit.Organization.LogFile.list( + organization_rid=organization_rid, + end_date=None if end_date is None else Date.fromisoformat(end_date), + page_size=page_size, + page_token=page_token, + start_date=None if start_date is None else Date.fromisoformat(start_date), + ) + click.echo(repr(result)) + + +@cli.group("connectivity") +def connectivity(): + pass + + +@connectivity.group("connection") +def connectivity_connection(): + pass + + +@connectivity_connection.command("create") +@click.option("--configuration", type=str, required=True, help="""""") +@click.option( + "--display_name", + type=str, + required=True, + help="""The display name of the Connection. The display name must not be blank.""", +) +@click.option("--parent_folder_rid", type=str, required=True, help="""""") +@click.option("--worker", type=str, required=True, help="""""") +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def connectivity_connection_op_create( + client: FoundryClient, + configuration: str, + display_name: str, + parent_folder_rid: str, + worker: str, + preview: typing.Optional[bool], +): + """ + Creates a new Connection with a [direct connection](https://palantir.com/docs/foundry/data-connection/core-concepts/#direct-connection) runtime. + + Any secrets specified in the request body are transmitted over the network encrypted using TLS. Once the + secrets reach Foundry's servers, they will be temporarily decrypted and remain in plaintext in memory to + be processed as needed. They will stay in plaintext in memory until the garbage collection process cleans + up the memory. The secrets are always stored encrypted on our servers. + By using this endpoint, you acknowledge and accept any potential risks associated with the temporary + in-memory handling of secrets. If you do not want your secrets to be temporarily decrypted, you should + use the Foundry UI instead. + + """ + result = client.connectivity.Connection.create( + configuration=json.loads(configuration), + display_name=display_name, + parent_folder_rid=parent_folder_rid, + worker=json.loads(worker), + preview=preview, + ) + click.echo(repr(result)) + + +@connectivity_connection.command("get") +@click.argument("connection_rid", type=str, required=True) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def connectivity_connection_op_get( + client: FoundryClient, + connection_rid: str, + preview: typing.Optional[bool], +): + """ + Get the Connection with the specified rid. + """ + result = client.connectivity.Connection.get( + connection_rid=connection_rid, + preview=preview, + ) + click.echo(repr(result)) + + +@connectivity_connection.command("get_configuration") +@click.argument("connection_rid", type=str, required=True) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def connectivity_connection_op_get_configuration( + client: FoundryClient, + connection_rid: str, + preview: typing.Optional[bool], +): + """ + Retrieves the ConnectionConfiguration of the [Connection](https://palantir.com/docs/foundry/data-connection/set-up-source/) itself. + This operation is intended for use when other Connection data is not required, providing a lighter-weight alternative to `getConnection` operation. + + """ + result = client.connectivity.Connection.get_configuration( + connection_rid=connection_rid, + preview=preview, + ) + click.echo(repr(result)) + + +@connectivity_connection.command("get_configuration_batch") +@click.argument("body", type=str, required=True) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def connectivity_connection_op_get_configuration_batch( + client: FoundryClient, + body: str, + preview: typing.Optional[bool], +): + """ + Returns a map of Connection RIDs to their corresponding configurations. + Connections are filtered from the response if they don't exist or the requesting token lacks the required permissions. + + + The maximum batch size for this endpoint is 200. + """ + result = client.connectivity.Connection.get_configuration_batch( + body=json.loads(body), + preview=preview, + ) + click.echo(repr(result)) + + +@connectivity_connection.command("update_export_settings") +@click.argument("connection_rid", type=str, required=True) +@click.option("--export_settings", type=str, required=True, help="""""") +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def connectivity_connection_op_update_export_settings( + client: FoundryClient, + connection_rid: str, + export_settings: str, + preview: typing.Optional[bool], +): + """ + Updates the [export settings on the Connection.](https://palantir.com/docs/foundry/data-connection/export-overview/#enable-exports-for-source) + Only users with Information Security Officer role can modify the export settings. + + """ + result = client.connectivity.Connection.update_export_settings( + connection_rid=connection_rid, + export_settings=json.loads(export_settings), + preview=preview, + ) + click.echo(repr(result)) + + +@connectivity_connection.command("update_secrets") +@click.argument("connection_rid", type=str, required=True) +@click.option( + "--secrets", + type=str, + required=True, + help="""The secrets to be updated. The specified secret names must already be configured on the connection. +""", +) +@click.pass_obj +def connectivity_connection_op_update_secrets( + client: FoundryClient, + connection_rid: str, + secrets: str, +): + """ + Updates the secrets on the connection to the specified secret values. + Secrets that are currently configured on the connection but are omitted in the request will remain unchanged. + + Secrets are transmitted over the network encrypted using TLS. Once the secrets reach Foundry's servers, + they will be temporarily decrypted and remain in plaintext in memory to be processed as needed. + They will stay in plaintext in memory until the garbage collection process cleans up the memory. + The secrets are always stored encrypted on our servers. + + By using this endpoint, you acknowledge and accept any potential risks associated with the temporary + in-memory handling of secrets. If you do not want your secrets to be temporarily decrypted, you should + use the Foundry UI instead. + + """ + result = client.connectivity.Connection.update_secrets( + connection_rid=connection_rid, + secrets=json.loads(secrets), + ) + click.echo(repr(result)) + + +@connectivity_connection.command("upload_custom_jdbc_drivers") +@click.argument("connection_rid", type=str, required=True) +@click.argument("body", type=click.File("rb"), required=True) +@click.option( + "--file_name", + type=str, + required=True, + help="""The file name of the uploaded JDBC driver. Must end with .jar +""", +) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def connectivity_connection_op_upload_custom_jdbc_drivers( + client: FoundryClient, + connection_rid: str, + body: io.BufferedReader, + file_name: str, + preview: typing.Optional[bool], +): + """ + Upload custom jdbc drivers to an existing JDBC connection. + The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`. + + """ + result = client.connectivity.Connection.upload_custom_jdbc_drivers( + connection_rid=connection_rid, + body=body.read(), + file_name=file_name, + preview=preview, + ) + click.echo(repr(result)) + + +@connectivity_connection.group("virtual_table") +def connectivity_connection_virtual_table(): + pass + + +@connectivity_connection_virtual_table.command("create") +@click.argument("connection_rid", type=str, required=True) +@click.option("--config", type=str, required=True, help="""""") +@click.option("--name", type=str, required=True, help="""""") +@click.option("--parent_rid", type=str, required=True, help="""""") +@click.option("--markings", type=str, required=False, help="""""") +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def connectivity_connection_virtual_table_op_create( + client: FoundryClient, + connection_rid: str, + config: str, + name: str, + parent_rid: str, + markings: typing.Optional[str], + preview: typing.Optional[bool], +): + """ + Creates a new [Virtual Table](https://palantir.com/docs/foundry/data-integration/virtual-tables/) from an upstream table. The VirtualTable will be created + in the specified parent folder and can be queried through Foundry's data access APIs. + + """ + result = client.connectivity.Connection.VirtualTable.create( + connection_rid=connection_rid, + config=json.loads(config), + name=name, + parent_rid=parent_rid, + markings=None if markings is None else json.loads(markings), + preview=preview, + ) + click.echo(repr(result)) + + +@connectivity_connection.group("table_import") +def connectivity_connection_table_import(): + pass + + +@connectivity_connection_table_import.command("create") +@click.argument("connection_rid", type=str, required=True) +@click.option("--config", type=str, required=True, help="""""") +@click.option( + "--dataset_rid", + type=str, + required=True, + help="""The RID of the output dataset. Can not be modified after the table import is created.""", +) +@click.option("--display_name", type=str, required=True, help="""""") +@click.option( + "--import_mode", type=click.Choice(["SNAPSHOT", "APPEND"]), required=True, help="""""" +) +@click.option( + "--allow_schema_changes", + type=bool, + required=False, + help="""Allow the TableImport to succeed if the schema of imported rows does not match the existing dataset's schema. Defaults to false for new table imports.""", +) +@click.option( + "--branch_name", + type=str, + required=False, + help="""The branch name in the output dataset that will contain the imported data. Defaults to `master` for most enrollments. Can not be modified after the table import is created.""", +) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def connectivity_connection_table_import_op_create( + client: FoundryClient, + connection_rid: str, + config: str, + dataset_rid: str, + display_name: str, + import_mode: typing.Literal["SNAPSHOT", "APPEND"], + allow_schema_changes: typing.Optional[bool], + branch_name: typing.Optional[str], + preview: typing.Optional[bool], +): + """ + Creates a new TableImport. + """ + result = client.connectivity.Connection.TableImport.create( + connection_rid=connection_rid, + config=json.loads(config), + dataset_rid=dataset_rid, + display_name=display_name, + import_mode=import_mode, + allow_schema_changes=allow_schema_changes, + branch_name=branch_name, + preview=preview, + ) + click.echo(repr(result)) + + +@connectivity_connection_table_import.command("delete") +@click.argument("connection_rid", type=str, required=True) +@click.argument("table_import_rid", type=str, required=True) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def connectivity_connection_table_import_op_delete( + client: FoundryClient, + connection_rid: str, + table_import_rid: str, + preview: typing.Optional[bool], +): + """ + Delete the TableImport with the specified RID. + Deleting the table import does not delete the destination dataset but the dataset will no longer + be updated by this import. + + """ + result = client.connectivity.Connection.TableImport.delete( + connection_rid=connection_rid, + table_import_rid=table_import_rid, + preview=preview, + ) + click.echo(repr(result)) + + +@connectivity_connection_table_import.command("execute") +@click.argument("connection_rid", type=str, required=True) +@click.argument("table_import_rid", type=str, required=True) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def connectivity_connection_table_import_op_execute( + client: FoundryClient, + connection_rid: str, + table_import_rid: str, + preview: typing.Optional[bool], +): + """ + Executes the TableImport, which runs asynchronously as a [Foundry Build](https://palantir.com/docs/foundry/data-integration/builds/). + The returned BuildRid can be used to check the status via the Orchestration API. + + """ + result = client.connectivity.Connection.TableImport.execute( + connection_rid=connection_rid, + table_import_rid=table_import_rid, + preview=preview, + ) + click.echo(repr(result)) + + +@connectivity_connection_table_import.command("get") +@click.argument("connection_rid", type=str, required=True) +@click.argument("table_import_rid", type=str, required=True) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def connectivity_connection_table_import_op_get( + client: FoundryClient, + connection_rid: str, + table_import_rid: str, + preview: typing.Optional[bool], +): + """ + Get the TableImport with the specified rid. + """ + result = client.connectivity.Connection.TableImport.get( + connection_rid=connection_rid, + table_import_rid=table_import_rid, + preview=preview, + ) + click.echo(repr(result)) + + +@connectivity_connection_table_import.command("list") +@click.argument("connection_rid", type=str, required=True) +@click.option( + "--page_size", type=int, required=False, help="""The page size to use for the endpoint.""" +) +@click.option( + "--page_token", + type=str, + required=False, + help="""The page token indicates where to start paging. This should be omitted from the first page's request. +To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response +and use it to populate the `pageToken` field of the next request.""", +) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def connectivity_connection_table_import_op_list( + client: FoundryClient, + connection_rid: str, + page_size: typing.Optional[int], + page_token: typing.Optional[str], + preview: typing.Optional[bool], +): + """ + Lists all table imports defined for this connection. + Only table imports that the user has permissions to view will be returned. + + """ + result = client.connectivity.Connection.TableImport.list( + connection_rid=connection_rid, + page_size=page_size, + page_token=page_token, + preview=preview, + ) + click.echo(repr(result)) + + +@connectivity_connection_table_import.command("replace") +@click.argument("connection_rid", type=str, required=True) +@click.argument("table_import_rid", type=str, required=True) +@click.option("--config", type=str, required=True, help="""""") +@click.option("--display_name", type=str, required=True, help="""""") +@click.option( + "--import_mode", type=click.Choice(["SNAPSHOT", "APPEND"]), required=True, help="""""" +) +@click.option( + "--allow_schema_changes", + type=bool, + required=False, + help="""Allow the TableImport to succeed if the schema of imported rows does not match the existing dataset's schema. Defaults to false for new table imports.""", +) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def connectivity_connection_table_import_op_replace( + client: FoundryClient, + connection_rid: str, + table_import_rid: str, + config: str, + display_name: str, + import_mode: typing.Literal["SNAPSHOT", "APPEND"], + allow_schema_changes: typing.Optional[bool], + preview: typing.Optional[bool], +): + """ + Replace the TableImport with the specified rid. + """ + result = client.connectivity.Connection.TableImport.replace( + connection_rid=connection_rid, + table_import_rid=table_import_rid, + config=json.loads(config), + display_name=display_name, + import_mode=import_mode, + allow_schema_changes=allow_schema_changes, + preview=preview, + ) + click.echo(repr(result)) + + +@connectivity_connection.group("file_import") +def connectivity_connection_file_import(): + pass + + +@connectivity_connection_file_import.command("create") +@click.argument("connection_rid", type=str, required=True) +@click.option( + "--dataset_rid", + type=str, + required=True, + help="""The RID of the output dataset. Can not be modified after the file import is created.""", +) +@click.option("--display_name", type=str, required=True, help="""""") +@click.option( + "--file_import_filters", + type=str, + required=True, + help="""Use filters to limit which files should be imported. Filters are applied in the order they are defined. A different ordering of filters may lead to a more optimized import. [Learn more about optimizing file imports.](https://palantir.com/docs/foundry/data-connection/file-based-syncs/#optimize-file-based-syncs)""", +) +@click.option( + "--import_mode", type=click.Choice(["SNAPSHOT", "APPEND", "UPDATE"]), required=True, help="""""" +) +@click.option( + "--branch_name", + type=str, + required=False, + help="""The branch name in the output dataset that will contain the imported data. Defaults to `master` for most enrollments. Can not be modified after the file import is created.""", +) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.option( + "--subfolder", + type=str, + required=False, + help="""A subfolder in the external system that will be imported. If not specified, defaults to the root folder of the external system.""", +) +@click.pass_obj +def connectivity_connection_file_import_op_create( + client: FoundryClient, + connection_rid: str, + dataset_rid: str, + display_name: str, + file_import_filters: str, + import_mode: typing.Literal["SNAPSHOT", "APPEND", "UPDATE"], + branch_name: typing.Optional[str], + preview: typing.Optional[bool], + subfolder: typing.Optional[str], +): + """ + Creates a new FileImport. + """ + result = client.connectivity.Connection.FileImport.create( + connection_rid=connection_rid, + dataset_rid=dataset_rid, + display_name=display_name, + file_import_filters=json.loads(file_import_filters), + import_mode=import_mode, + branch_name=branch_name, + preview=preview, + subfolder=subfolder, + ) + click.echo(repr(result)) + + +@connectivity_connection_file_import.command("delete") +@click.argument("connection_rid", type=str, required=True) +@click.argument("file_import_rid", type=str, required=True) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def connectivity_connection_file_import_op_delete( + client: FoundryClient, + connection_rid: str, + file_import_rid: str, + preview: typing.Optional[bool], +): + """ + Delete the FileImport with the specified RID. + Deleting the file import does not delete the destination dataset but the dataset will no longer + be updated by this import. + + """ + result = client.connectivity.Connection.FileImport.delete( + connection_rid=connection_rid, + file_import_rid=file_import_rid, + preview=preview, + ) + click.echo(repr(result)) + + +@connectivity_connection_file_import.command("execute") +@click.argument("connection_rid", type=str, required=True) +@click.argument("file_import_rid", type=str, required=True) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def connectivity_connection_file_import_op_execute( + client: FoundryClient, + connection_rid: str, + file_import_rid: str, + preview: typing.Optional[bool], +): + """ + Executes the FileImport, which runs asynchronously as a [Foundry Build](https://palantir.com/docs/foundry/data-integration/builds/). + The returned BuildRid can be used to check the status via the Orchestration API. + + """ + result = client.connectivity.Connection.FileImport.execute( + connection_rid=connection_rid, + file_import_rid=file_import_rid, + preview=preview, + ) + click.echo(repr(result)) + + +@connectivity_connection_file_import.command("get") +@click.argument("connection_rid", type=str, required=True) +@click.argument("file_import_rid", type=str, required=True) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def connectivity_connection_file_import_op_get( + client: FoundryClient, + connection_rid: str, + file_import_rid: str, + preview: typing.Optional[bool], +): + """ + Get the FileImport with the specified rid. + """ + result = client.connectivity.Connection.FileImport.get( + connection_rid=connection_rid, + file_import_rid=file_import_rid, + preview=preview, + ) + click.echo(repr(result)) + + +@connectivity_connection_file_import.command("list") +@click.argument("connection_rid", type=str, required=True) +@click.option( + "--page_size", type=int, required=False, help="""The page size to use for the endpoint.""" +) +@click.option( + "--page_token", + type=str, + required=False, + help="""The page token indicates where to start paging. This should be omitted from the first page's request. +To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response +and use it to populate the `pageToken` field of the next request.""", +) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def connectivity_connection_file_import_op_list( + client: FoundryClient, + connection_rid: str, + page_size: typing.Optional[int], + page_token: typing.Optional[str], + preview: typing.Optional[bool], +): + """ + Lists all file imports defined for this connection. + Only file imports that the user has permissions to view will be returned. + + """ + result = client.connectivity.Connection.FileImport.list( + connection_rid=connection_rid, + page_size=page_size, + page_token=page_token, + preview=preview, + ) + click.echo(repr(result)) + + +@connectivity_connection_file_import.command("replace") +@click.argument("connection_rid", type=str, required=True) +@click.argument("file_import_rid", type=str, required=True) +@click.option("--display_name", type=str, required=True, help="""""") +@click.option( + "--file_import_filters", + type=str, + required=True, + help="""Use filters to limit which files should be imported. Filters are applied in the order they are defined. A different ordering of filters may lead to a more optimized import. [Learn more about optimizing file imports.](https://palantir.com/docs/foundry/data-connection/file-based-syncs/#optimize-file-based-syncs)""", +) +@click.option( + "--import_mode", type=click.Choice(["SNAPSHOT", "APPEND", "UPDATE"]), required=True, help="""""" +) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.option( + "--subfolder", + type=str, + required=False, + help="""A subfolder in the external system that will be imported. If not specified, defaults to the root folder of the external system.""", +) +@click.pass_obj +def connectivity_connection_file_import_op_replace( + client: FoundryClient, + connection_rid: str, + file_import_rid: str, + display_name: str, + file_import_filters: str, + import_mode: typing.Literal["SNAPSHOT", "APPEND", "UPDATE"], + preview: typing.Optional[bool], + subfolder: typing.Optional[str], +): + """ + Replace the FileImport with the specified rid. + """ + result = client.connectivity.Connection.FileImport.replace( + connection_rid=connection_rid, + file_import_rid=file_import_rid, + display_name=display_name, + file_import_filters=json.loads(file_import_filters), + import_mode=import_mode, + preview=preview, + subfolder=subfolder, + ) + click.echo(repr(result)) + + +@cli.group("core") +def core(): + pass + + +@cli.group("data_health") +def data_health(): + pass + + +@data_health.group("check_report") +def data_health_check_report(): + pass + + +@data_health_check_report.command("get") +@click.argument("check_report_rid", type=str, required=True) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def data_health_check_report_op_get( + client: FoundryClient, + check_report_rid: str, + preview: typing.Optional[bool], +): + """ + Get the CheckReport with the specified rid. + """ + result = client.data_health.CheckReport.get( + check_report_rid=check_report_rid, + preview=preview, + ) + click.echo(repr(result)) + + +@data_health.group("check") +def data_health_check(): + pass + + +@data_health_check.command("create") +@click.option("--config", type=str, required=True, help="""""") +@click.option("--intent", type=str, required=False, help="""""") +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def data_health_check_op_create( + client: FoundryClient, + config: str, + intent: typing.Optional[str], + preview: typing.Optional[bool], +): + """ + Creates a new Check. + """ + result = client.data_health.Check.create( + config=json.loads(config), + intent=intent, + preview=preview, + ) + click.echo(repr(result)) + + +@data_health_check.command("delete") +@click.argument("check_rid", type=str, required=True) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def data_health_check_op_delete( + client: FoundryClient, + check_rid: str, + preview: typing.Optional[bool], +): + """ + Delete the Check with the specified rid. + """ + result = client.data_health.Check.delete( + check_rid=check_rid, + preview=preview, + ) + click.echo(repr(result)) + + +@data_health_check.command("get") +@click.argument("check_rid", type=str, required=True) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def data_health_check_op_get( + client: FoundryClient, + check_rid: str, + preview: typing.Optional[bool], +): + """ + Get the Check with the specified rid. + """ + result = client.data_health.Check.get( + check_rid=check_rid, + preview=preview, + ) + click.echo(repr(result)) + + +@data_health_check.command("replace") +@click.argument("check_rid", type=str, required=True) +@click.option("--config", type=str, required=True, help="""""") +@click.option("--intent", type=str, required=False, help="""""") +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def data_health_check_op_replace( + client: FoundryClient, + check_rid: str, + config: str, + intent: typing.Optional[str], + preview: typing.Optional[bool], +): + """ + Replace the Check with the specified rid. Changing the type of a check after it has been created is not supported. + """ + result = client.data_health.Check.replace( + check_rid=check_rid, + config=json.loads(config), + intent=intent, + preview=preview, + ) + click.echo(repr(result)) + + +@cli.group("datasets") +def datasets(): + pass + + +@datasets.group("view") +def datasets_view(): + pass + + +@datasets_view.command("add_backing_datasets") +@click.argument("view_dataset_rid", type=str, required=True) +@click.option("--backing_datasets", type=str, required=True, help="""""") +@click.option("--branch", type=str, required=False, help="""""") +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def datasets_view_op_add_backing_datasets( + client: FoundryClient, + view_dataset_rid: str, + backing_datasets: str, + branch: typing.Optional[str], + preview: typing.Optional[bool], +): + """ + Adds one or more backing datasets to a View. Any duplicates with the same dataset RID and branch name are + ignored. + + """ + result = client.datasets.View.add_backing_datasets( + view_dataset_rid=view_dataset_rid, + backing_datasets=json.loads(backing_datasets), + branch=branch, + preview=preview, + ) + click.echo(repr(result)) + + +@datasets_view.command("add_primary_key") +@click.argument("view_dataset_rid", type=str, required=True) +@click.option("--primary_key", type=str, required=True, help="""""") +@click.option("--branch", type=str, required=False, help="""""") +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def datasets_view_op_add_primary_key( + client: FoundryClient, + view_dataset_rid: str, + primary_key: str, + branch: typing.Optional[str], + preview: typing.Optional[bool], +): + """ + Adds a primary key to a View that does not already have one. Primary keys are treated as + guarantees provided by the creator of the dataset. + + """ + result = client.datasets.View.add_primary_key( + view_dataset_rid=view_dataset_rid, + primary_key=json.loads(primary_key), + branch=branch, + preview=preview, + ) + click.echo(repr(result)) + + +@datasets_view.command("create") +@click.option("--backing_datasets", type=str, required=True, help="""""") +@click.option("--parent_folder_rid", type=str, required=True, help="""""") +@click.option("--view_name", type=str, required=True, help="""""") +@click.option( + "--branch", + type=str, + required=False, + help="""The branch name of the View. If not specified, defaults to `master` for most enrollments.""", +) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.option("--primary_key", type=str, required=False, help="""""") +@click.pass_obj +def datasets_view_op_create( + client: FoundryClient, + backing_datasets: str, + parent_folder_rid: str, + view_name: str, + branch: typing.Optional[str], + preview: typing.Optional[bool], + primary_key: typing.Optional[str], +): + """ + Create a new View. + """ + result = client.datasets.View.create( + backing_datasets=json.loads(backing_datasets), + parent_folder_rid=parent_folder_rid, + view_name=view_name, + branch=branch, + preview=preview, + primary_key=None if primary_key is None else json.loads(primary_key), + ) + click.echo(repr(result)) + + +@datasets_view.command("get") +@click.argument("view_dataset_rid", type=str, required=True) +@click.option("--branch", type=str, required=False, help="""""") +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def datasets_view_op_get( + client: FoundryClient, + view_dataset_rid: str, + branch: typing.Optional[str], + preview: typing.Optional[bool], +): + """ + Get metadata for a View. + """ + result = client.datasets.View.get( + view_dataset_rid=view_dataset_rid, + branch=branch, + preview=preview, + ) + click.echo(repr(result)) + + +@datasets_view.command("remove_backing_datasets") +@click.argument("view_dataset_rid", type=str, required=True) +@click.option("--backing_datasets", type=str, required=True, help="""""") +@click.option("--branch", type=str, required=False, help="""""") +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def datasets_view_op_remove_backing_datasets( + client: FoundryClient, + view_dataset_rid: str, + backing_datasets: str, + branch: typing.Optional[str], + preview: typing.Optional[bool], +): + """ + Removes specified backing datasets from a View. Removing a dataset triggers a + [SNAPSHOT](https://palantir.com/docs/foundry/data-integration/datasets#snapshot) transaction on the next update. If a + specified dataset does not exist, no error is thrown. + + """ + result = client.datasets.View.remove_backing_datasets( + view_dataset_rid=view_dataset_rid, + backing_datasets=json.loads(backing_datasets), + branch=branch, + preview=preview, + ) + click.echo(repr(result)) + + +@datasets_view.command("replace_backing_datasets") +@click.argument("view_dataset_rid", type=str, required=True) +@click.option("--backing_datasets", type=str, required=True, help="""""") +@click.option("--branch", type=str, required=False, help="""""") +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def datasets_view_op_replace_backing_datasets( + client: FoundryClient, + view_dataset_rid: str, + backing_datasets: str, + branch: typing.Optional[str], + preview: typing.Optional[bool], +): + """ + Replaces the backing datasets for a View. Removing any backing dataset triggers a + [SNAPSHOT](https://palantir.com/docs/foundry/data-integration/datasets#snapshot) transaction the next time the View is updated. + + """ + result = client.datasets.View.replace_backing_datasets( + view_dataset_rid=view_dataset_rid, + backing_datasets=json.loads(backing_datasets), + branch=branch, + preview=preview, + ) + click.echo(repr(result)) + + +@datasets.group("dataset") +def datasets_dataset(): + pass + + +@datasets_dataset.command("create") +@click.option("--name", type=str, required=True, help="""""") +@click.option("--parent_folder_rid", type=str, required=True, help="""""") +@click.pass_obj +def datasets_dataset_op_create( + client: FoundryClient, + name: str, + parent_folder_rid: str, +): + """ + Creates a new Dataset. A default branch - `master` for most enrollments - will be created on the Dataset. + + """ + result = client.datasets.Dataset.create( + name=name, + parent_folder_rid=parent_folder_rid, + ) + click.echo(repr(result)) + + +@datasets_dataset.command("get") +@click.argument("dataset_rid", type=str, required=True) +@click.pass_obj +def datasets_dataset_op_get( + client: FoundryClient, + dataset_rid: str, +): + """ + Get the Dataset with the specified rid. + """ + result = client.datasets.Dataset.get( + dataset_rid=dataset_rid, + ) + click.echo(repr(result)) + + +@datasets_dataset.command("get_health_checks") +@click.argument("dataset_rid", type=str, required=True) +@click.option( + "--branch_name", + type=str, + required=False, + help="""The name of the Branch. If none is provided, the default Branch name - `master` for most enrollments - will be used. +""", +) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def datasets_dataset_op_get_health_checks( + client: FoundryClient, + dataset_rid: str, + branch_name: typing.Optional[str], + preview: typing.Optional[bool], +): + """ + Get the RIDs of the Data Health Checks that are configured for the given Dataset. + + """ + result = client.datasets.Dataset.get_health_checks( + dataset_rid=dataset_rid, + branch_name=branch_name, + preview=preview, + ) + click.echo(repr(result)) + + +@datasets_dataset.command("get_schedules") +@click.argument("dataset_rid", type=str, required=True) +@click.option( + "--branch_name", + type=str, + required=False, + help="""The name of the Branch. If none is provided, the default Branch name - `master` for most enrollments - will be used. +""", +) +@click.option("--page_size", type=int, required=False, help="""""") +@click.option("--page_token", type=str, required=False, help="""""") +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def datasets_dataset_op_get_schedules( + client: FoundryClient, + dataset_rid: str, + branch_name: typing.Optional[str], + page_size: typing.Optional[int], + page_token: typing.Optional[str], + preview: typing.Optional[bool], +): + """ + Get the RIDs of the Schedules that target the given Dataset + + """ + result = client.datasets.Dataset.get_schedules( + dataset_rid=dataset_rid, + branch_name=branch_name, + page_size=page_size, + page_token=page_token, + preview=preview, + ) + click.echo(repr(result)) + + +@datasets_dataset.command("get_schema") +@click.argument("dataset_rid", type=str, required=True) +@click.option("--branch_name", type=str, required=False, help="""""") +@click.option( + "--end_transaction_rid", + type=str, + required=False, + help="""The Resource Identifier (RID) of the end Transaction. If a user does not provide a value, the RID of the latest committed transaction will be used. +""", +) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.option( + "--version_id", + type=str, + required=False, + help="""The schema version that should be used. If none is provided, the latest version will be used. +""", +) +@click.pass_obj +def datasets_dataset_op_get_schema( + client: FoundryClient, + dataset_rid: str, + branch_name: typing.Optional[str], + end_transaction_rid: typing.Optional[str], + preview: typing.Optional[bool], + version_id: typing.Optional[str], +): + """ + Gets a dataset's schema. If no `endTransactionRid` is provided, the latest committed version will be used. + + """ + result = client.datasets.Dataset.get_schema( + dataset_rid=dataset_rid, + branch_name=branch_name, + end_transaction_rid=end_transaction_rid, + preview=preview, + version_id=version_id, + ) + click.echo(repr(result)) + + +@datasets_dataset.command("get_schema_batch") +@click.argument("body", type=str, required=True) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def datasets_dataset_op_get_schema_batch( + client: FoundryClient, + body: str, + preview: typing.Optional[bool], +): + """ + Fetch schemas for multiple datasets in a single request. Datasets not found + or inaccessible to the user will be omitted from the response. + + + The maximum batch size for this endpoint is 1000. + """ + result = client.datasets.Dataset.get_schema_batch( + body=json.loads(body), + preview=preview, + ) + click.echo(repr(result)) + + +@datasets_dataset.command("jobs") +@click.argument("dataset_rid", type=str, required=True) +@click.option("--order_by", type=str, required=True, help="""""") +@click.option( + "--branch_name", + type=str, + required=False, + help="""The name of the Branch. If none is provided, the default Branch name - `master` for most enrollments - will be used. +""", +) +@click.option( + "--page_size", + type=int, + required=False, + help="""Max number of results to return. A limit of 1000 on if no limit is supplied in the search request +""", +) +@click.option("--page_token", type=str, required=False, help="""""") +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.option("--where", type=str, required=False, help="""""") +@click.pass_obj +def datasets_dataset_op_jobs( + client: FoundryClient, + dataset_rid: str, + order_by: str, + branch_name: typing.Optional[str], + page_size: typing.Optional[int], + page_token: typing.Optional[str], + preview: typing.Optional[bool], + where: typing.Optional[str], +): + """ + Get the RIDs of the Jobs for the given dataset. By default, returned Jobs are sorted in descending order by the Job start time. + + """ + result = client.datasets.Dataset.jobs( + dataset_rid=dataset_rid, + order_by=json.loads(order_by), + branch_name=branch_name, + page_size=page_size, + page_token=page_token, + preview=preview, + where=None if where is None else json.loads(where), + ) + click.echo(repr(result)) + + +@datasets_dataset.command("put_schema") +@click.argument("dataset_rid", type=str, required=True) +@click.option( + "--schema", + type=str, + required=True, + help="""The schema that will be added. +""", +) +@click.option("--branch_name", type=str, required=False, help="""""") +@click.option( + "--dataframe_reader", + type=click.Choice(["AVRO", "CSV", "PARQUET", "DATASOURCE"]), + required=False, + help="""The dataframe reader used for reading the dataset schema. Defaults to PARQUET.""", +) +@click.option( + "--end_transaction_rid", + type=str, + required=False, + help="""The Resource Identifier (RID) of the end Transaction. +""", +) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def datasets_dataset_op_put_schema( + client: FoundryClient, + dataset_rid: str, + schema: str, + branch_name: typing.Optional[str], + dataframe_reader: typing.Optional[typing.Literal["AVRO", "CSV", "PARQUET", "DATASOURCE"]], + end_transaction_rid: typing.Optional[str], + preview: typing.Optional[bool], +): + """ + Adds a schema on an existing dataset using a PUT request. + + """ + result = client.datasets.Dataset.put_schema( + dataset_rid=dataset_rid, + schema=json.loads(schema), + branch_name=branch_name, + dataframe_reader=dataframe_reader, + end_transaction_rid=end_transaction_rid, + preview=preview, + ) + click.echo(repr(result)) + + +@datasets_dataset.command("read_table") +@click.argument("dataset_rid", type=str, required=True) +@click.option( + "--format", + type=click.Choice(["ARROW", "CSV"]), + required=True, + help="""The export format. Must be `ARROW` or `CSV`. +""", +) +@click.option( + "--branch_name", + type=str, + required=False, + help="""The name of the Branch. +""", +) +@click.option( + "--columns", + type=str, + required=False, + help="""A subset of the dataset columns to include in the result. Defaults to all columns. +""", +) +@click.option( + "--end_transaction_rid", + type=str, + required=False, + help="""The Resource Identifier (RID) of the end Transaction. +""", +) +@click.option( + "--row_limit", + type=int, + required=False, + help="""A limit on the number of rows to return. Note that row ordering is non-deterministic. +""", +) +@click.option( + "--start_transaction_rid", + type=str, + required=False, + help="""The Resource Identifier (RID) of the start Transaction. +""", +) +@click.pass_obj +def datasets_dataset_op_read_table( + client: FoundryClient, + dataset_rid: str, + format: typing.Literal["ARROW", "CSV"], + branch_name: typing.Optional[str], + columns: typing.Optional[str], + end_transaction_rid: typing.Optional[str], + row_limit: typing.Optional[int], + start_transaction_rid: typing.Optional[str], +): + """ + Gets the content of a dataset as a table in the specified format. + + This endpoint currently does not support views (virtual datasets composed of other datasets). + + """ + result = client.datasets.Dataset.read_table( + dataset_rid=dataset_rid, + format=format, + branch_name=branch_name, + columns=None if columns is None else json.loads(columns), + end_transaction_rid=end_transaction_rid, + row_limit=row_limit, + start_transaction_rid=start_transaction_rid, + ) + click.echo(result) + + +@datasets_dataset.command("transactions") +@click.argument("dataset_rid", type=str, required=True) +@click.option( + "--page_size", type=int, required=False, help="""The page size to use for the endpoint.""" +) +@click.option( + "--page_token", + type=str, + required=False, + help="""The page token indicates where to start paging. This should be omitted from the first page's request. +To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response +and use it to populate the `pageToken` field of the next request.""", +) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def datasets_dataset_op_transactions( + client: FoundryClient, + dataset_rid: str, + page_size: typing.Optional[int], + page_token: typing.Optional[str], + preview: typing.Optional[bool], +): + """ + Get the Transaction history for the given Dataset. When requesting all transactions, the endpoint returns them in reverse chronological order. + + """ + result = client.datasets.Dataset.transactions( + dataset_rid=dataset_rid, + page_size=page_size, + page_token=page_token, + preview=preview, + ) + click.echo(repr(result)) + + +@datasets_dataset.group("file") +def datasets_dataset_file(): + pass + + +@datasets_dataset_file.command("content") +@click.argument("dataset_rid", type=str, required=True) +@click.argument("file_path", type=str, required=True) +@click.option( + "--branch_name", + type=str, + required=False, + help="""The name of the Branch that contains the File. Defaults to `master` for most enrollments. +""", +) +@click.option( + "--end_transaction_rid", + type=str, + required=False, + help="""The Resource Identifier (RID) of the end Transaction. +""", +) +@click.option( + "--start_transaction_rid", + type=str, + required=False, + help="""The Resource Identifier (RID) of the start Transaction. +""", +) +@click.pass_obj +def datasets_dataset_file_op_content( + client: FoundryClient, + dataset_rid: str, + file_path: str, + branch_name: typing.Optional[str], + end_transaction_rid: typing.Optional[str], + start_transaction_rid: typing.Optional[str], +): + """ + Gets the content of a File contained in a Dataset. By default this retrieves the file's content from the latest + view of the default branch - `master` for most enrollments. + #### Advanced Usage + See [Datasets Core Concepts](https://palantir.com/docs/foundry/data-integration/datasets/) for details on using branches and transactions. + To **get a file's content from a specific Branch** specify the Branch's name as `branchName`. This will + retrieve the content for the most recent version of the file since the latest snapshot transaction, or the + earliest ancestor transaction of the branch if there are no snapshot transactions. + To **get a file's content from the resolved view of a transaction** specify the Transaction's resource identifier + as `endTransactionRid`. This will retrieve the content for the most recent version of the file since the latest + snapshot transaction, or the earliest ancestor transaction if there are no snapshot transactions. + To **get a file's content from the resolved view of a range of transactions** specify the the start transaction's + resource identifier as `startTransactionRid` and the end transaction's resource identifier as `endTransactionRid`. + This will retrieve the content for the most recent version of the file since the `startTransactionRid` up to the + `endTransactionRid`. Note that an intermediate snapshot transaction will remove all files from the view. Behavior + is undefined when the start and end transactions do not belong to the same root-to-leaf path. + To **get a file's content from a specific transaction** specify the Transaction's resource identifier as both the + `startTransactionRid` and `endTransactionRid`. + + """ + result = client.datasets.Dataset.File.content( + dataset_rid=dataset_rid, + file_path=file_path, + branch_name=branch_name, + end_transaction_rid=end_transaction_rid, + start_transaction_rid=start_transaction_rid, + ) + click.echo(result) + + +@datasets_dataset_file.command("delete") +@click.argument("dataset_rid", type=str, required=True) +@click.argument("file_path", type=str, required=True) +@click.option( + "--branch_name", + type=str, + required=False, + help="""The name of the Branch on which to delete the File. Defaults to `master` for most enrollments. +""", +) +@click.option( + "--transaction_rid", + type=str, + required=False, + help="""The Resource Identifier (RID) of the open delete Transaction on which to delete the File. +""", +) +@click.pass_obj +def datasets_dataset_file_op_delete( + client: FoundryClient, + dataset_rid: str, + file_path: str, + branch_name: typing.Optional[str], + transaction_rid: typing.Optional[str], +): + """ + Deletes a File from a Dataset. By default the file is deleted in a new transaction on the default + branch - `master` for most enrollments. The file will still be visible on historical views. + #### Advanced Usage + See [Datasets Core Concepts](https://palantir.com/docs/foundry/data-integration/datasets/) for details on using branches and transactions. + To **delete a File from a specific Branch** specify the Branch's name as `branchName`. A new delete Transaction + will be created and committed on this branch. + To **delete a File using a manually opened Transaction**, specify the Transaction's resource identifier + as `transactionRid`. The transaction must be of type `DELETE`. This is useful for deleting multiple files in a + single transaction. See [createTransaction](https://palantir.com/docs/foundry/api/datasets-resources/transactions/create-transaction/) to + open a transaction. + + """ + result = client.datasets.Dataset.File.delete( + dataset_rid=dataset_rid, + file_path=file_path, + branch_name=branch_name, + transaction_rid=transaction_rid, + ) + click.echo(repr(result)) + + +@datasets_dataset_file.command("get") +@click.argument("dataset_rid", type=str, required=True) +@click.argument("file_path", type=str, required=True) +@click.option( + "--branch_name", + type=str, + required=False, + help="""The name of the Branch that contains the File. Defaults to `master` for most enrollments. +""", +) +@click.option( + "--end_transaction_rid", + type=str, + required=False, + help="""The Resource Identifier (RID) of the end Transaction. +""", +) +@click.option( + "--start_transaction_rid", + type=str, + required=False, + help="""The Resource Identifier (RID) of the start Transaction. +""", +) +@click.pass_obj +def datasets_dataset_file_op_get( + client: FoundryClient, + dataset_rid: str, + file_path: str, + branch_name: typing.Optional[str], + end_transaction_rid: typing.Optional[str], + start_transaction_rid: typing.Optional[str], +): + """ + Gets metadata about a File contained in a Dataset. By default this retrieves the file's metadata from the latest + view of the default branch - `master` for most enrollments. + #### Advanced Usage + See [Datasets Core Concepts](https://palantir.com/docs/foundry/data-integration/datasets/) for details on using branches and transactions. + To **get a file's metadata from a specific Branch** specify the Branch's name as `branchName`. This will + retrieve metadata for the most recent version of the file since the latest snapshot transaction, or the earliest + ancestor transaction of the branch if there are no snapshot transactions. + To **get a file's metadata from the resolved view of a transaction** specify the Transaction's resource identifier + as `endTransactionRid`. This will retrieve metadata for the most recent version of the file since the latest snapshot + transaction, or the earliest ancestor transaction if there are no snapshot transactions. + To **get a file's metadata from the resolved view of a range of transactions** specify the the start transaction's + resource identifier as `startTransactionRid` and the end transaction's resource identifier as `endTransactionRid`. + This will retrieve metadata for the most recent version of the file since the `startTransactionRid` up to the + `endTransactionRid`. Behavior is undefined when the start and end transactions do not belong to the same root-to-leaf path. + To **get a file's metadata from a specific transaction** specify the Transaction's resource identifier as both the + `startTransactionRid` and `endTransactionRid`. + + """ + result = client.datasets.Dataset.File.get( + dataset_rid=dataset_rid, + file_path=file_path, + branch_name=branch_name, + end_transaction_rid=end_transaction_rid, + start_transaction_rid=start_transaction_rid, + ) + click.echo(repr(result)) + + +@datasets_dataset_file.command("list") +@click.argument("dataset_rid", type=str, required=True) +@click.option( + "--branch_name", + type=str, + required=False, + help="""The name of the Branch on which to list Files. Defaults to `master` for most enrollments. +""", +) +@click.option( + "--end_transaction_rid", + type=str, + required=False, + help="""The Resource Identifier (RID) of the end Transaction. +""", +) +@click.option( + "--page_size", type=int, required=False, help="""The page size to use for the endpoint.""" +) +@click.option( + "--page_token", + type=str, + required=False, + help="""The page token indicates where to start paging. This should be omitted from the first page's request. +To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response +and use it to populate the `pageToken` field of the next request.""", +) +@click.option( + "--start_transaction_rid", + type=str, + required=False, + help="""The Resource Identifier (RID) of the start Transaction. +""", +) +@click.pass_obj +def datasets_dataset_file_op_list( + client: FoundryClient, + dataset_rid: str, + branch_name: typing.Optional[str], + end_transaction_rid: typing.Optional[str], + page_size: typing.Optional[int], + page_token: typing.Optional[str], + start_transaction_rid: typing.Optional[str], +): + """ + Lists Files contained in a Dataset. By default files are listed on the latest view of the default + branch - `master` for most enrollments. + #### Advanced Usage + See [Datasets Core Concepts](https://palantir.com/docs/foundry/data-integration/datasets/) for details on using branches and transactions. + To **list files on a specific Branch** specify the Branch's name as `branchName`. This will include the most + recent version of all files since the latest snapshot transaction, or the earliest ancestor transaction of the + branch if there are no snapshot transactions. + To **list files on the resolved view of a transaction** specify the Transaction's resource identifier + as `endTransactionRid`. This will include the most recent version of all files since the latest snapshot + transaction, or the earliest ancestor transaction if there are no snapshot transactions. + To **list files on the resolved view of a range of transactions** specify the the start transaction's resource + identifier as `startTransactionRid` and the end transaction's resource identifier as `endTransactionRid`. This + will include the most recent version of all files since the `startTransactionRid` up to the `endTransactionRid`. + Note that an intermediate snapshot transaction will remove all files from the view. Behavior is undefined when + the start and end transactions do not belong to the same root-to-leaf path. + To **list files on a specific transaction** specify the Transaction's resource identifier as both the + `startTransactionRid` and `endTransactionRid`. This will include only files that were modified as part of that + Transaction. + + """ + result = client.datasets.Dataset.File.list( + dataset_rid=dataset_rid, + branch_name=branch_name, + end_transaction_rid=end_transaction_rid, + page_size=page_size, + page_token=page_token, + start_transaction_rid=start_transaction_rid, + ) + click.echo(repr(result)) + + +@datasets_dataset_file.command("upload") +@click.argument("dataset_rid", type=str, required=True) +@click.argument("file_path", type=str, required=True) +@click.argument("body", type=click.File("rb"), required=True) +@click.option( + "--branch_name", + type=str, + required=False, + help="""The name of the Branch on which to upload the File. Defaults to `master` for most enrollments. +""", +) +@click.option( + "--transaction_rid", + type=str, + required=False, + help="""The Resource Identifier (RID) of the open Transaction on which to upload the File. +""", +) +@click.option( + "--transaction_type", + type=click.Choice(["APPEND", "UPDATE", "SNAPSHOT", "DELETE"]), + required=False, + help="""The type of the Transaction to create when using branchName. Defaults to `UPDATE`. +""", +) +@click.pass_obj +def datasets_dataset_file_op_upload( + client: FoundryClient, + dataset_rid: str, + file_path: str, + body: io.BufferedReader, + branch_name: typing.Optional[str], + transaction_rid: typing.Optional[str], + transaction_type: typing.Optional[typing.Literal["APPEND", "UPDATE", "SNAPSHOT", "DELETE"]], +): + """ + Uploads a File to an existing Dataset. + The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`. + By default the file is uploaded to a new transaction on the default branch - `master` for most enrollments. + If the file already exists only the most recent version will be visible in the updated view. + #### Advanced Usage + See [Datasets Core Concepts](https://palantir.com/docs/foundry/data-integration/datasets/) for details on using branches and transactions. + To **upload a file to a specific Branch** specify the Branch's name as `branchName`. A new transaction will + be created and committed on this branch. By default the TransactionType will be `UPDATE`, to override this + default specify `transactionType` in addition to `branchName`. + See [createBranch](https://palantir.com/docs/foundry/api/datasets-resources/branches/create-branch/) to create a custom branch. + To **upload a file on a manually opened transaction** specify the Transaction's resource identifier as + `transactionRid`. This is useful for uploading multiple files in a single transaction. + See [createTransaction](https://palantir.com/docs/foundry/api/datasets-resources/transactions/create-transaction/) to open a transaction. + + """ + result = client.datasets.Dataset.File.upload( + dataset_rid=dataset_rid, + file_path=file_path, + body=body.read(), + branch_name=branch_name, + transaction_rid=transaction_rid, + transaction_type=transaction_type, + ) + click.echo(repr(result)) + + +@datasets_dataset.group("transaction") +def datasets_dataset_transaction(): + pass + + +@datasets_dataset_transaction.command("abort") +@click.argument("dataset_rid", type=str, required=True) +@click.argument("transaction_rid", type=str, required=True) +@click.pass_obj +def datasets_dataset_transaction_op_abort( + client: FoundryClient, + dataset_rid: str, + transaction_rid: str, +): + """ + Aborts an open Transaction. File modifications made on this Transaction are not preserved and the Branch is + not updated. + + """ + result = client.datasets.Dataset.Transaction.abort( + dataset_rid=dataset_rid, + transaction_rid=transaction_rid, + ) + click.echo(repr(result)) + + +@datasets_dataset_transaction.command("build") +@click.argument("dataset_rid", type=str, required=True) +@click.argument("transaction_rid", type=str, required=True) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def datasets_dataset_transaction_op_build( + client: FoundryClient, + dataset_rid: str, + transaction_rid: str, + preview: typing.Optional[bool], +): + """ + Get the [Build](https://palantir.com/docs/foundry/data-integration/builds#builds) that computed the + given Transaction. Not all Transactions have an associated Build. For example, if a Dataset + is updated by a User uploading a CSV file into the browser, no Build will be tied to the Transaction. + + """ + result = client.datasets.Dataset.Transaction.build( + dataset_rid=dataset_rid, + transaction_rid=transaction_rid, + preview=preview, + ) + click.echo(repr(result)) + + +@datasets_dataset_transaction.command("commit") +@click.argument("dataset_rid", type=str, required=True) +@click.argument("transaction_rid", type=str, required=True) +@click.pass_obj +def datasets_dataset_transaction_op_commit( + client: FoundryClient, + dataset_rid: str, + transaction_rid: str, +): + """ + Commits an open Transaction. File modifications made on this Transaction are preserved and the Branch is + updated to point to the Transaction. + + """ + result = client.datasets.Dataset.Transaction.commit( + dataset_rid=dataset_rid, + transaction_rid=transaction_rid, + ) + click.echo(repr(result)) + + +@datasets_dataset_transaction.command("create") +@click.argument("dataset_rid", type=str, required=True) +@click.option( + "--transaction_type", + type=click.Choice(["APPEND", "UPDATE", "SNAPSHOT", "DELETE"]), + required=True, + help="""""", +) +@click.option( + "--branch_name", + type=str, + required=False, + help="""The name of the Branch on which to create the Transaction. Defaults to `master` for most enrollments. +""", +) +@click.pass_obj +def datasets_dataset_transaction_op_create( + client: FoundryClient, + dataset_rid: str, + transaction_type: typing.Literal["APPEND", "UPDATE", "SNAPSHOT", "DELETE"], + branch_name: typing.Optional[str], +): + """ + Creates a Transaction on a Branch of a Dataset. + + """ + result = client.datasets.Dataset.Transaction.create( + dataset_rid=dataset_rid, + transaction_type=transaction_type, + branch_name=branch_name, + ) + click.echo(repr(result)) + + +@datasets_dataset_transaction.command("get") +@click.argument("dataset_rid", type=str, required=True) +@click.argument("transaction_rid", type=str, required=True) +@click.pass_obj +def datasets_dataset_transaction_op_get( + client: FoundryClient, + dataset_rid: str, + transaction_rid: str, +): + """ + Gets a Transaction of a Dataset. + + """ + result = client.datasets.Dataset.Transaction.get( + dataset_rid=dataset_rid, + transaction_rid=transaction_rid, + ) + click.echo(repr(result)) + + +@datasets_dataset_transaction.command("job") +@click.argument("dataset_rid", type=str, required=True) +@click.argument("transaction_rid", type=str, required=True) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def datasets_dataset_transaction_op_job( + client: FoundryClient, + dataset_rid: str, + transaction_rid: str, + preview: typing.Optional[bool], +): + """ + Get the [Job](https://palantir.com/docs/foundry/data-integration/builds#jobs-and-jobspecs) that computed the + given Transaction. Not all Transactions have an associated Job. For example, if a Dataset + is updated by a User uploading a CSV file into the browser, no Job will be tied to the Transaction. + + """ + result = client.datasets.Dataset.Transaction.job( + dataset_rid=dataset_rid, + transaction_rid=transaction_rid, + preview=preview, + ) + click.echo(repr(result)) + + +@datasets_dataset.group("branch") +def datasets_dataset_branch(): + pass + + +@datasets_dataset_branch.command("create") +@click.argument("dataset_rid", type=str, required=True) +@click.option("--name", type=str, required=True, help="""""") +@click.option( + "--transaction_rid", + type=str, + required=False, + help="""The most recent OPEN or COMMITTED transaction on the branch. This will never be an ABORTED transaction.""", +) +@click.pass_obj +def datasets_dataset_branch_op_create( + client: FoundryClient, + dataset_rid: str, + name: str, + transaction_rid: typing.Optional[str], +): + """ + Creates a branch on an existing dataset. A branch may optionally point to a (committed) transaction. + + """ + result = client.datasets.Dataset.Branch.create( + dataset_rid=dataset_rid, + name=name, + transaction_rid=transaction_rid, + ) + click.echo(repr(result)) + + +@datasets_dataset_branch.command("delete") +@click.argument("dataset_rid", type=str, required=True) +@click.argument("branch_name", type=str, required=True) +@click.pass_obj +def datasets_dataset_branch_op_delete( + client: FoundryClient, + dataset_rid: str, + branch_name: str, +): + """ + Deletes the Branch with the given BranchName. + + """ + result = client.datasets.Dataset.Branch.delete( + dataset_rid=dataset_rid, + branch_name=branch_name, + ) + click.echo(repr(result)) + + +@datasets_dataset_branch.command("get") +@click.argument("dataset_rid", type=str, required=True) +@click.argument("branch_name", type=str, required=True) +@click.pass_obj +def datasets_dataset_branch_op_get( + client: FoundryClient, + dataset_rid: str, + branch_name: str, +): + """ + Get a Branch of a Dataset. + + """ + result = client.datasets.Dataset.Branch.get( + dataset_rid=dataset_rid, + branch_name=branch_name, + ) + click.echo(repr(result)) + + +@datasets_dataset_branch.command("list") +@click.argument("dataset_rid", type=str, required=True) +@click.option( + "--page_size", type=int, required=False, help="""The page size to use for the endpoint.""" +) +@click.option( + "--page_token", + type=str, + required=False, + help="""The page token indicates where to start paging. This should be omitted from the first page's request. +To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response +and use it to populate the `pageToken` field of the next request.""", +) +@click.pass_obj +def datasets_dataset_branch_op_list( + client: FoundryClient, + dataset_rid: str, + page_size: typing.Optional[int], + page_token: typing.Optional[str], +): + """ + Lists the Branches of a Dataset. + + """ + result = client.datasets.Dataset.Branch.list( + dataset_rid=dataset_rid, + page_size=page_size, + page_token=page_token, + ) + click.echo(repr(result)) + + +@datasets_dataset_branch.command("transactions") +@click.argument("dataset_rid", type=str, required=True) +@click.argument("branch_name", type=str, required=True) +@click.option( + "--page_size", + type=int, + required=False, + help="""The default pageSize is 20 transactions and the maximum allowed pageSize is 50 transactions +""", +) +@click.option("--page_token", type=str, required=False, help="""""") +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def datasets_dataset_branch_op_transactions( + client: FoundryClient, + dataset_rid: str, + branch_name: str, + page_size: typing.Optional[int], + page_token: typing.Optional[str], + preview: typing.Optional[bool], +): + """ + Get the Transaction history for the given Dataset. When requesting all transactions, the endpoint returns them in reverse chronological order. + + """ + result = client.datasets.Dataset.Branch.transactions( + dataset_rid=dataset_rid, + branch_name=branch_name, + page_size=page_size, + page_token=page_token, + preview=preview, + ) + click.echo(repr(result)) + + +@cli.group("filesystem") +def filesystem(): + pass + + +@filesystem.group("space") +def filesystem_space(): + pass + + +@filesystem_space.command("create") +@click.option( + "--deletion_policy_organizations", + type=str, + required=True, + help="""By default, this Space will use a Last Out deletion policy, meaning that this Space and its projects will be deleted when the last Organization listed here is deleted. Only Organizations in the Space's Enrollment can be included here. +""", +) +@click.option("--display_name", type=str, required=True, help="""""") +@click.option( + "--enrollment_rid", + type=str, + required=True, + help="""The RID of the Enrollment that this Space belongs to. +""", +) +@click.option( + "--organizations", + type=str, + required=True, + help="""The list of Organizations that are provisioned access to this Space. In order to access this Space, a user must be a member of at least one of these Organizations. +""", +) +@click.option( + "--default_role_set_id", + type=str, + required=False, + help="""The ID of the default Role Set for this Space, which defines the set of roles that Projects in this Space must use. If not provided, the default Role Set for Projects will be used. +""", +) +@click.option("--description", type=str, required=False, help="""The description of the Space.""") +@click.option( + "--file_system_id", + type=str, + required=False, + help="""The ID of the Filesystem for this Space, which is where the contents of the Space are stored. If not provided, the default Filesystem for this Enrollment will be used.""", +) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.option( + "--usage_account_rid", + type=str, + required=False, + help="""The RID of the Usage Account for this Space. Resource usage for projects in this space will accrue to this Usage Account by default. If not provided, the default Usage Account for this Enrollment will be used.""", +) +@click.pass_obj +def filesystem_space_op_create( + client: FoundryClient, + deletion_policy_organizations: str, + display_name: str, + enrollment_rid: str, + organizations: str, + default_role_set_id: typing.Optional[str], + description: typing.Optional[str], + file_system_id: typing.Optional[str], + preview: typing.Optional[bool], + usage_account_rid: typing.Optional[str], +): + """ + Creates a new Space. + """ + result = client.filesystem.Space.create( + deletion_policy_organizations=json.loads(deletion_policy_organizations), + display_name=display_name, + enrollment_rid=enrollment_rid, + organizations=json.loads(organizations), + default_role_set_id=default_role_set_id, + description=description, + file_system_id=file_system_id, + preview=preview, + usage_account_rid=usage_account_rid, + ) + click.echo(repr(result)) + + +@filesystem_space.command("delete") +@click.argument("space_rid", type=str, required=True) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def filesystem_space_op_delete( + client: FoundryClient, + space_rid: str, + preview: typing.Optional[bool], +): + """ + Delete the space. This will only work if the Space is empty, meaning any Projects or Resources have been deleted first. + + """ + result = client.filesystem.Space.delete( + space_rid=space_rid, + preview=preview, + ) + click.echo(repr(result)) + + +@filesystem_space.command("get") +@click.argument("space_rid", type=str, required=True) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def filesystem_space_op_get( + client: FoundryClient, + space_rid: str, + preview: typing.Optional[bool], +): + """ + Get the Space with the specified rid. + """ + result = client.filesystem.Space.get( + space_rid=space_rid, + preview=preview, + ) + click.echo(repr(result)) + + +@filesystem_space.command("list") +@click.option( + "--page_size", type=int, required=False, help="""The page size to use for the endpoint.""" +) +@click.option( + "--page_token", + type=str, + required=False, + help="""The page token indicates where to start paging. This should be omitted from the first page's request. +To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response +and use it to populate the `pageToken` field of the next request.""", +) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def filesystem_space_op_list( + client: FoundryClient, + page_size: typing.Optional[int], + page_token: typing.Optional[str], + preview: typing.Optional[bool], +): + """ + Lists all Spaces. + + This is a paged endpoint. Each page may be smaller or larger than the requested page size. However, it is guaranteed that if there are more results available, the `nextPageToken` field will be populated. To get the next page, make the same request again, but set the value of the `pageToken` query parameter to be value of the `nextPageToken` value of the previous response. If there is no `nextPageToken` field in the response, you are on the last page. + """ + result = client.filesystem.Space.list( + page_size=page_size, + page_token=page_token, + preview=preview, + ) + click.echo(repr(result)) + + +@filesystem_space.command("replace") +@click.argument("space_rid", type=str, required=True) +@click.option("--display_name", type=str, required=True, help="""""") +@click.option( + "--default_role_set_id", + type=str, + required=False, + help="""The ID of the default Role Set for this Space, which defines the set of roles that Projects in this Space must use. If not provided, the default Role Set for Projects will be used. +""", +) +@click.option("--description", type=str, required=False, help="""The description of the Space.""") +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.option( + "--usage_account_rid", + type=str, + required=False, + help="""The RID of the Usage Account for this Space. Resource usage for projects in this space will accrue to this Usage Account by default. If not provided, the default Usage Account for this Enrollment will be used.""", +) +@click.pass_obj +def filesystem_space_op_replace( + client: FoundryClient, + space_rid: str, + display_name: str, + default_role_set_id: typing.Optional[str], + description: typing.Optional[str], + preview: typing.Optional[bool], + usage_account_rid: typing.Optional[str], +): + """ + Replace the Space with the specified rid. + """ + result = client.filesystem.Space.replace( + space_rid=space_rid, + display_name=display_name, + default_role_set_id=default_role_set_id, + description=description, + preview=preview, + usage_account_rid=usage_account_rid, + ) + click.echo(repr(result)) + + +@filesystem.group("resource") +def filesystem_resource(): + pass + + +@filesystem_resource.command("add_markings") +@click.argument("resource_rid", type=str, required=True) +@click.option("--marking_ids", type=str, required=True, help="""""") +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def filesystem_resource_op_add_markings( + client: FoundryClient, + resource_rid: str, + marking_ids: str, + preview: typing.Optional[bool], +): + """ + Adds a list of Markings to a resource. + """ + result = client.filesystem.Resource.add_markings( + resource_rid=resource_rid, + marking_ids=json.loads(marking_ids), + preview=preview, + ) + click.echo(repr(result)) + + +@filesystem_resource.command("delete") +@click.argument("resource_rid", type=str, required=True) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def filesystem_resource_op_delete( + client: FoundryClient, + resource_rid: str, + preview: typing.Optional[bool], +): + """ + Move the given resource to the trash. Following this operation, the resource can be restored, using the + `restore` operation, or permanently deleted using the `permanentlyDelete` operation. + + """ + result = client.filesystem.Resource.delete( + resource_rid=resource_rid, + preview=preview, + ) + click.echo(repr(result)) + + +@filesystem_resource.command("get") +@click.argument("resource_rid", type=str, required=True) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def filesystem_resource_op_get( + client: FoundryClient, + resource_rid: str, + preview: typing.Optional[bool], +): + """ + Get the Resource with the specified rid. + """ + result = client.filesystem.Resource.get( + resource_rid=resource_rid, + preview=preview, + ) + click.echo(repr(result)) + + +@filesystem_resource.command("get_access_requirements") +@click.argument("resource_rid", type=str, required=True) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def filesystem_resource_op_get_access_requirements( + client: FoundryClient, + resource_rid: str, + preview: typing.Optional[bool], +): + """ + Returns a list of access requirements a user needs in order to view a resource. Access requirements are + composed of Organizations and Markings, and can either be applied directly to the resource or inherited. + + """ + result = client.filesystem.Resource.get_access_requirements( + resource_rid=resource_rid, + preview=preview, + ) + click.echo(repr(result)) + + +@filesystem_resource.command("get_batch") +@click.argument("body", type=str, required=True) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def filesystem_resource_op_get_batch( + client: FoundryClient, + body: str, + preview: typing.Optional[bool], +): + """ + Fetches multiple resources in a single request. + Returns a map from RID to the corresponding resource. If a resource does not exist, or if it is a root folder or space, its RID will not be included in the map. + At most 1,000 resources should be requested at once. + + + The maximum batch size for this endpoint is 1000. + """ + result = client.filesystem.Resource.get_batch( + body=json.loads(body), + preview=preview, + ) + click.echo(repr(result)) + + +@filesystem_resource.command("get_by_path") +@click.option( + "--path", + type=str, + required=True, + help="""The path to the Resource. The leading slash is optional.""", +) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def filesystem_resource_op_get_by_path( + client: FoundryClient, + path: str, + preview: typing.Optional[bool], +): + """ + Get a Resource by its absolute path. + """ + result = client.filesystem.Resource.get_by_path( + path=path, + preview=preview, + ) + click.echo(repr(result)) + + +@filesystem_resource.command("get_by_path_batch") +@click.argument("body", type=str, required=True) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def filesystem_resource_op_get_by_path_batch( + client: FoundryClient, + body: str, + preview: typing.Optional[bool], +): + """ + Gets multiple Resources by their absolute paths. + Returns a list of resources. If a path does not exist, is inaccessible, or refers to + a root folder or space, it will not be included in the response. + At most 1,000 paths should be requested at once. + + + The maximum batch size for this endpoint is 1000. + """ + result = client.filesystem.Resource.get_by_path_batch( + body=json.loads(body), + preview=preview, + ) + click.echo(repr(result)) + + +@filesystem_resource.command("markings") +@click.argument("resource_rid", type=str, required=True) +@click.option( + "--page_size", type=int, required=False, help="""The page size to use for the endpoint.""" +) +@click.option( + "--page_token", + type=str, + required=False, + help="""The page token indicates where to start paging. This should be omitted from the first page's request. +To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response +and use it to populate the `pageToken` field of the next request.""", +) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def filesystem_resource_op_markings( + client: FoundryClient, + resource_rid: str, + page_size: typing.Optional[int], + page_token: typing.Optional[str], + preview: typing.Optional[bool], +): + """ + List of Markings directly applied to a resource. The number of Markings on a resource is typically small + so the `pageSize` and `pageToken` parameters are not required. + + """ + result = client.filesystem.Resource.markings( + resource_rid=resource_rid, + page_size=page_size, + page_token=page_token, + preview=preview, + ) + click.echo(repr(result)) + + +@filesystem_resource.command("permanently_delete") +@click.argument("resource_rid", type=str, required=True) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def filesystem_resource_op_permanently_delete( + client: FoundryClient, + resource_rid: str, + preview: typing.Optional[bool], +): + """ + Permanently delete the given resource from the trash. If the Resource is not directly trashed, a + `ResourceNotTrashed` error will be thrown. + + """ + result = client.filesystem.Resource.permanently_delete( + resource_rid=resource_rid, + preview=preview, + ) + click.echo(repr(result)) + + +@filesystem_resource.command("remove_markings") +@click.argument("resource_rid", type=str, required=True) +@click.option("--marking_ids", type=str, required=True, help="""""") +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def filesystem_resource_op_remove_markings( + client: FoundryClient, + resource_rid: str, + marking_ids: str, + preview: typing.Optional[bool], +): + """ + Removes Markings from a resource. + """ + result = client.filesystem.Resource.remove_markings( + resource_rid=resource_rid, + marking_ids=json.loads(marking_ids), + preview=preview, + ) + click.echo(repr(result)) + + +@filesystem_resource.command("restore") +@click.argument("resource_rid", type=str, required=True) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def filesystem_resource_op_restore( + client: FoundryClient, + resource_rid: str, + preview: typing.Optional[bool], +): + """ + Restore the given resource and any directly trashed ancestors from the trash. If the resource is not + trashed, this operation will be ignored. + + """ + result = client.filesystem.Resource.restore( + resource_rid=resource_rid, + preview=preview, + ) + click.echo(repr(result)) + + +@filesystem_resource.group("resource_role") +def filesystem_resource_resource_role(): + pass + + +@filesystem_resource_resource_role.command("add") +@click.argument("resource_rid", type=str, required=True) +@click.option("--roles", type=str, required=True, help="""""") +@click.pass_obj +def filesystem_resource_resource_role_op_add( + client: FoundryClient, + resource_rid: str, + roles: str, +): + """ """ + result = client.filesystem.Resource.Role.add( + resource_rid=resource_rid, + roles=json.loads(roles), + ) + click.echo(repr(result)) + + +@filesystem_resource_resource_role.command("list") +@click.argument("resource_rid", type=str, required=True) +@click.option( + "--include_inherited", + type=bool, + required=False, + help="""Whether to include inherited roles on the resource.""", +) +@click.option( + "--page_size", type=int, required=False, help="""The page size to use for the endpoint.""" +) +@click.option( + "--page_token", + type=str, + required=False, + help="""The page token indicates where to start paging. This should be omitted from the first page's request. +To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response +and use it to populate the `pageToken` field of the next request.""", +) +@click.pass_obj +def filesystem_resource_resource_role_op_list( + client: FoundryClient, + resource_rid: str, + include_inherited: typing.Optional[bool], + page_size: typing.Optional[int], + page_token: typing.Optional[str], +): + """ + List the roles on a resource. + + """ + result = client.filesystem.Resource.Role.list( + resource_rid=resource_rid, + include_inherited=include_inherited, + page_size=page_size, + page_token=page_token, + ) + click.echo(repr(result)) + + +@filesystem_resource_resource_role.command("remove") +@click.argument("resource_rid", type=str, required=True) +@click.option("--roles", type=str, required=True, help="""""") +@click.pass_obj +def filesystem_resource_resource_role_op_remove( + client: FoundryClient, + resource_rid: str, + roles: str, +): + """ """ + result = client.filesystem.Resource.Role.remove( + resource_rid=resource_rid, + roles=json.loads(roles), + ) + click.echo(repr(result)) + + +@filesystem.group("project") +def filesystem_project(): + pass + + +@filesystem_project.command("add_organizations") +@click.argument("project_rid", type=str, required=True) +@click.option("--organization_rids", type=str, required=True, help="""""") +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def filesystem_project_op_add_organizations( + client: FoundryClient, + project_rid: str, + organization_rids: str, + preview: typing.Optional[bool], +): + """ + Adds a list of Organizations to a Project. + """ + result = client.filesystem.Project.add_organizations( + project_rid=project_rid, + organization_rids=json.loads(organization_rids), + preview=preview, + ) + click.echo(repr(result)) + + +@filesystem_project.command("create") +@click.option("--default_roles", type=str, required=True, help="""""") +@click.option("--display_name", type=str, required=True, help="""""") +@click.option("--organization_rids", type=str, required=True, help="""""") +@click.option("--role_grants", type=str, required=True, help="""""") +@click.option("--space_rid", type=str, required=True, help="""""") +@click.option("--description", type=str, required=False, help="""""") +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def filesystem_project_op_create( + client: FoundryClient, + default_roles: str, + display_name: str, + organization_rids: str, + role_grants: str, + space_rid: str, + description: typing.Optional[str], + preview: typing.Optional[bool], +): + """ + Creates a new Project. + + Note that third-party applications using this endpoint via OAuth2 cannot be associated with an + Ontology SDK as this will reduce the scope of operations to only those within specified projects. + When creating the application, select "No, I won't use an Ontology SDK" on the Resources page. + + """ + result = client.filesystem.Project.create( + default_roles=json.loads(default_roles), + display_name=display_name, + organization_rids=json.loads(organization_rids), + role_grants=json.loads(role_grants), + space_rid=space_rid, + description=description, + preview=preview, + ) + click.echo(repr(result)) + + +@filesystem_project.command("create_from_template") +@click.option("--template_rid", type=str, required=True, help="""""") +@click.option("--variable_values", type=str, required=True, help="""""") +@click.option("--default_roles", type=str, required=False, help="""""") +@click.option("--organization_rids", type=str, required=False, help="""""") +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.option("--project_description", type=str, required=False, help="""""") +@click.pass_obj +def filesystem_project_op_create_from_template( + client: FoundryClient, + template_rid: str, + variable_values: str, + default_roles: typing.Optional[str], + organization_rids: typing.Optional[str], + preview: typing.Optional[bool], + project_description: typing.Optional[str], +): + """ + Creates a project from a project template. + """ + result = client.filesystem.Project.create_from_template( + template_rid=template_rid, + variable_values=json.loads(variable_values), + default_roles=None if default_roles is None else json.loads(default_roles), + organization_rids=None if organization_rids is None else json.loads(organization_rids), + preview=preview, + project_description=project_description, + ) + click.echo(repr(result)) + + +@filesystem_project.command("get") +@click.argument("project_rid", type=str, required=True) +@click.pass_obj +def filesystem_project_op_get( + client: FoundryClient, + project_rid: str, +): + """ + Get the Project with the specified rid. + """ + result = client.filesystem.Project.get( + project_rid=project_rid, + ) + click.echo(repr(result)) + + +@filesystem_project.command("organizations") +@click.argument("project_rid", type=str, required=True) +@click.option( + "--page_size", type=int, required=False, help="""The page size to use for the endpoint.""" +) +@click.option( + "--page_token", + type=str, + required=False, + help="""The page token indicates where to start paging. This should be omitted from the first page's request. +To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response +and use it to populate the `pageToken` field of the next request.""", +) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def filesystem_project_op_organizations( + client: FoundryClient, + project_rid: str, + page_size: typing.Optional[int], + page_token: typing.Optional[str], + preview: typing.Optional[bool], +): + """ + List of Organizations directly applied to a Project. The number of Organizations on a Project is + typically small so the `pageSize` and `pageToken` parameters are not required. + + """ + result = client.filesystem.Project.organizations( + project_rid=project_rid, + page_size=page_size, + page_token=page_token, + preview=preview, + ) + click.echo(repr(result)) + + +@filesystem_project.command("remove_organizations") +@click.argument("project_rid", type=str, required=True) +@click.option("--organization_rids", type=str, required=True, help="""""") +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def filesystem_project_op_remove_organizations( + client: FoundryClient, + project_rid: str, + organization_rids: str, + preview: typing.Optional[bool], +): + """ + Removes Organizations from a Project. + """ + result = client.filesystem.Project.remove_organizations( + project_rid=project_rid, + organization_rids=json.loads(organization_rids), + preview=preview, + ) + click.echo(repr(result)) + + +@filesystem_project.command("replace") +@click.argument("project_rid", type=str, required=True) +@click.option( + "--display_name", + type=str, + required=True, + help="""The display name of the Project. Must be unique and cannot contain a /""", +) +@click.option( + "--description", + type=str, + required=False, + help="""The description associated with the Project.""", +) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def filesystem_project_op_replace( + client: FoundryClient, + project_rid: str, + display_name: str, + description: typing.Optional[str], + preview: typing.Optional[bool], +): + """ + Replace the Project with the specified rid. + """ + result = client.filesystem.Project.replace( + project_rid=project_rid, + display_name=display_name, + description=description, + preview=preview, + ) + click.echo(repr(result)) + + +@filesystem.group("folder") +def filesystem_folder(): + pass + + +@filesystem_folder.command("children") +@click.argument("folder_rid", type=str, required=True) +@click.option( + "--page_size", type=int, required=False, help="""The page size to use for the endpoint.""" +) +@click.option( + "--page_token", + type=str, + required=False, + help="""The page token indicates where to start paging. This should be omitted from the first page's request. +To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response +and use it to populate the `pageToken` field of the next request.""", +) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def filesystem_folder_op_children( + client: FoundryClient, + folder_rid: str, + page_size: typing.Optional[int], + page_token: typing.Optional[str], + preview: typing.Optional[bool], +): + """ + List all child Resources of the Folder. + + This is a paged endpoint. The page size will be limited to 2,000 results per page. If no page size is + provided, this page size will also be used as the default. + + """ + result = client.filesystem.Folder.children( + folder_rid=folder_rid, + page_size=page_size, + page_token=page_token, + preview=preview, + ) + click.echo(repr(result)) + + +@filesystem_folder.command("create") +@click.option("--display_name", type=str, required=True, help="""""") +@click.option( + "--parent_folder_rid", + type=str, + required=True, + help="""The parent folder Resource Identifier (RID). For Projects, this will be the Space RID and for Spaces, +this value will be the root folder (`ri.compass.main.folder.0`). +""", +) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def filesystem_folder_op_create( + client: FoundryClient, + display_name: str, + parent_folder_rid: str, + preview: typing.Optional[bool], +): + """ + Creates a new Folder. + """ + result = client.filesystem.Folder.create( + display_name=display_name, + parent_folder_rid=parent_folder_rid, + preview=preview, + ) + click.echo(repr(result)) + + +@filesystem_folder.command("get") +@click.argument("folder_rid", type=str, required=True) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def filesystem_folder_op_get( + client: FoundryClient, + folder_rid: str, + preview: typing.Optional[bool], +): + """ + Get the Folder with the specified rid. + """ + result = client.filesystem.Folder.get( + folder_rid=folder_rid, + preview=preview, + ) + click.echo(repr(result)) + + +@filesystem_folder.command("get_batch") +@click.argument("body", type=str, required=True) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def filesystem_folder_op_get_batch( + client: FoundryClient, + body: str, + preview: typing.Optional[bool], +): + """ + Fetches multiple folders in a single request. + + + The maximum batch size for this endpoint is 1000. + """ + result = client.filesystem.Folder.get_batch( + body=json.loads(body), + preview=preview, + ) + click.echo(repr(result)) + + +@cli.group("functions") +def functions(): + pass + + +@functions.group("value_type") +def functions_value_type(): + pass + + +@functions_value_type.command("get") +@click.argument("value_type_rid", type=str, required=True) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def functions_value_type_op_get( + client: FoundryClient, + value_type_rid: str, + preview: typing.Optional[bool], +): + """ + Gets a specific value type with the given RID. The latest version is returned. + + """ + result = client.functions.ValueType.get( + value_type_rid=value_type_rid, + preview=preview, + ) + click.echo(repr(result)) + + +@functions_value_type.group("version_id") +def functions_value_type_version_id(): + pass + + +@functions_value_type_version_id.command("get") +@click.argument("value_type_rid", type=str, required=True) +@click.argument("version_id_version_id", type=str, required=True) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def functions_value_type_version_id_op_get( + client: FoundryClient, + value_type_rid: str, + version_id_version_id: str, + preview: typing.Optional[bool], +): + """ + Gets a specific value type with the given RID. The specified version is returned. + + """ + result = client.functions.ValueType.VersionId.get( + value_type_rid=value_type_rid, + version_id_version_id=version_id_version_id, + preview=preview, + ) + click.echo(repr(result)) + + +@functions.group("query") +def functions_query(): + pass + + +@functions_query.command("execute") +@click.argument("query_api_name", type=str, required=True) +@click.option("--parameters", type=str, required=True, help="""""") +@click.option("--attribution", type=str, required=False, help="""""") +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.option("--trace_parent", type=str, required=False, help="""""") +@click.option("--trace_state", type=str, required=False, help="""""") +@click.option( + "--transaction_id", + type=str, + required=False, + help="""The ID of a transaction to read from. Transactions are an experimental feature and all workflows may not be supported.""", +) +@click.option("--version", type=str, required=False, help="""""") +@click.pass_obj +def functions_query_op_execute( + client: FoundryClient, + query_api_name: str, + parameters: str, + attribution: typing.Optional[str], + preview: typing.Optional[bool], + trace_parent: typing.Optional[str], + trace_state: typing.Optional[str], + transaction_id: typing.Optional[str], + version: typing.Optional[str], +): + """ + Executes a Query using the given parameters. By default, this executes the latest version of the query. + + This endpoint is maintained for backward compatibility only. + + For all new implementations, use the `streamingExecute` endpoint, which supports all function types + and provides enhanced functionality. + + """ + result = client.functions.Query.execute( + query_api_name=query_api_name, + parameters=json.loads(parameters), + attribution=attribution, + preview=preview, + trace_parent=trace_parent, + trace_state=trace_state, + transaction_id=transaction_id, + version=version, + ) + click.echo(repr(result)) + + +@functions_query.command("get") +@click.argument("query_api_name", type=str, required=True) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.option("--version", type=str, required=False, help="""""") +@click.pass_obj +def functions_query_op_get( + client: FoundryClient, + query_api_name: str, + preview: typing.Optional[bool], + version: typing.Optional[str], +): + """ + Gets a specific query type with the given API name. By default, this gets the latest version of the query. + + """ + result = client.functions.Query.get( + query_api_name=query_api_name, + preview=preview, + version=version, + ) + click.echo(repr(result)) + + +@functions_query.command("get_by_rid") +@click.option("--rid", type=str, required=True, help="""""") +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.option("--version", type=str, required=False, help="""""") +@click.pass_obj +def functions_query_op_get_by_rid( + client: FoundryClient, + rid: str, + preview: typing.Optional[bool], + version: typing.Optional[str], +): + """ + Gets a specific query type with the given RID.By default, this gets the latest version of the query. + + """ + result = client.functions.Query.get_by_rid( + rid=rid, + preview=preview, + version=version, + ) + click.echo(repr(result)) + + +@functions_query.command("streaming_execute") +@click.argument("query_api_name", type=str, required=True) +@click.option("--parameters", type=str, required=True, help="""""") +@click.option("--attribution", type=str, required=False, help="""""") +@click.option( + "--ontology", + type=str, + required=False, + help="""Optional ontology identifier (RID or API name). When provided, executes an ontology-scoped +function. When omitted, executes a global function. +""", +) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.option("--trace_parent", type=str, required=False, help="""""") +@click.option("--trace_state", type=str, required=False, help="""""") +@click.option( + "--transaction_id", + type=str, + required=False, + help="""The ID of a transaction to read from. Transactions are an experimental feature and all workflows may not be supported.""", +) +@click.option("--version", type=str, required=False, help="""""") +@click.pass_obj +def functions_query_op_streaming_execute( + client: FoundryClient, + query_api_name: str, + parameters: str, + attribution: typing.Optional[str], + ontology: typing.Optional[str], + preview: typing.Optional[bool], + trace_parent: typing.Optional[str], + trace_state: typing.Optional[str], + transaction_id: typing.Optional[str], + version: typing.Optional[str], +): + """ + Executes a Query using the given parameters, returning results as an NDJSON stream. By default, this executes the latest version of the query. + + This endpoint supports all Query functions. The endpoint name 'streamingExecute' refers to the NDJSON + streaming response format. Both streaming and non-streaming functions can use this endpoint. + Non-streaming functions return a single-line NDJSON response, while streaming functions return multi-line NDJSON responses. + This is the recommended endpoint for all query execution. + + The response is returned as a binary stream in NDJSON (Newline Delimited JSON) format, where each line + is a StreamingExecuteQueryResponse containing either a data batch or an error. + + For a function returning a list of 5 records with a batch size of 3, the response stream would contain + two lines. The first line contains the first 3 items, and the second line contains the remaining 2 items: + + ``` + {"type":"data","value":[{"productId":"SKU-001","price":29.99},{"productId":"SKU-002","price":49.99},{"productId":"SKU-003","price":19.99}]} + {"type":"data","value":[{"productId":"SKU-004","price":39.99},{"productId":"SKU-005","price":59.99}]} + ``` + + Each line is a separate JSON object followed by a newline character. Clients should parse the stream + line-by-line to process results as they arrive. If an error occurs during execution, the stream will + contain an error line: + + ``` + {"type":"error","errorCode":"INVALID_ARGUMENT","errorName":"QueryRuntimeError","errorInstanceId":"3f8a9c7b-2e4d-4a1f-9b8c-7d6e5f4a3b2c","errorDescription":"Division by zero","parameters":{}} + ``` + + """ + result = client.functions.Query.streaming_execute( + query_api_name=query_api_name, + parameters=json.loads(parameters), + attribution=attribution, + ontology=ontology, + preview=preview, + trace_parent=trace_parent, + trace_state=trace_state, + transaction_id=transaction_id, + version=version, + ) + click.echo(result) + + +@cli.group("geo") +def geo(): + pass + + +@cli.group("language_models") +def language_models(): + pass + + +@language_models.group("open_ai_model") +def language_models_open_ai_model(): + pass + + +@language_models_open_ai_model.command("embeddings") +@click.argument("open_ai_model_model_id", type=str, required=True) +@click.option( + "--input", + type=str, + required=True, + help="""Input text to embed, encoded as an array of strings. Each input must not exceed the max input +tokens for the model (8192 tokens for all embedding models). +""", +) +@click.option("--attribution", type=str, required=False, help="""""") +@click.option( + "--dimensions", + type=int, + required=False, + help="""The number of dimensions the resulting output embeddings should have. +Only supported in text-embedding-3 and later models. +""", +) +@click.option( + "--encoding_format", + type=click.Choice(["FLOAT", "BASE64"]), + required=False, + help="""The format to return the embeddings in. Can be either float or base64.""", +) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def language_models_open_ai_model_op_embeddings( + client: FoundryClient, + open_ai_model_model_id: str, + input: str, + attribution: typing.Optional[str], + dimensions: typing.Optional[int], + encoding_format: typing.Optional[typing.Literal["FLOAT", "BASE64"]], + preview: typing.Optional[bool], +): + """ """ + result = client.language_models.OpenAiModel.embeddings( + open_ai_model_model_id=open_ai_model_model_id, + input=json.loads(input), + attribution=attribution, + dimensions=dimensions, + encoding_format=encoding_format, + preview=preview, + ) + click.echo(repr(result)) + + +@language_models.group("anthropic_model") +def language_models_anthropic_model(): + pass + + +@language_models_anthropic_model.command("messages") +@click.argument("anthropic_model_model_id", type=str, required=True) +@click.option( + "--max_tokens", + type=int, + required=True, + help="""The maximum number of tokens to generate before stopping.""", +) +@click.option( + "--messages", + type=str, + required=True, + help="""Input messages to the model. This can include a single user-role message or multiple messages with +alternating user and assistant roles. +""", +) +@click.option("--attribution", type=str, required=False, help="""""") +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.option( + "--stop_sequences", + type=str, + required=False, + help="""Custom text sequences that will cause the model to stop generating.""", +) +@click.option( + "--system", + type=str, + required=False, + help="""A system prompt is a way of providing context and instructions to Claude, such as specifying a +particular goal or role. As of now, sending multiple system prompts is not supported. +""", +) +@click.option( + "--temperature", + type=float, + required=False, + help="""Amount of randomness injected into the response. Ranges from 0.0 to 1.0. Note that even with +temperature of 0.0, the results will not be fully deterministic. Defaults to 1.0 +""", +) +@click.option( + "--thinking", + type=str, + required=False, + help="""Configuration for enabling Claude's extended thinking.""", +) +@click.option( + "--tool_choice", + type=str, + required=False, + help="""How the model should use the provided tools.""", +) +@click.option( + "--tools", type=str, required=False, help="""Definitions of tools that the model may use.""" +) +@click.option( + "--top_k", + type=int, + required=False, + help="""Only sample from the top K options for each subsequent token.""", +) +@click.option( + "--top_p", + type=float, + required=False, + help="""Use nucleus sampling. You should either alter temperature or top_p, but not both""", +) +@click.pass_obj +def language_models_anthropic_model_op_messages( + client: FoundryClient, + anthropic_model_model_id: str, + max_tokens: int, + messages: str, + attribution: typing.Optional[str], + preview: typing.Optional[bool], + stop_sequences: typing.Optional[str], + system: typing.Optional[str], + temperature: typing.Optional[float], + thinking: typing.Optional[str], + tool_choice: typing.Optional[str], + tools: typing.Optional[str], + top_k: typing.Optional[int], + top_p: typing.Optional[float], +): + """ """ + result = client.language_models.AnthropicModel.messages( + anthropic_model_model_id=anthropic_model_model_id, + max_tokens=max_tokens, + messages=json.loads(messages), + attribution=attribution, + preview=preview, + stop_sequences=None if stop_sequences is None else json.loads(stop_sequences), + system=None if system is None else json.loads(system), + temperature=temperature, + thinking=None if thinking is None else json.loads(thinking), + tool_choice=None if tool_choice is None else json.loads(tool_choice), + tools=None if tools is None else json.loads(tools), + top_k=top_k, + top_p=top_p, + ) + click.echo(repr(result)) + + +@cli.group("media_sets") +def media_sets(): + pass + + +@media_sets.group("media_set") +def media_sets_media_set(): + pass + + +@media_sets_media_set.command("abort") +@click.argument("media_set_rid", type=str, required=True) +@click.argument("transaction_id", type=str, required=True) +@click.option( + "--preview", + type=bool, + required=False, + help="""A boolean flag that, when set to true, enables the use of beta features in preview mode. +""", +) +@click.pass_obj +def media_sets_media_set_op_abort( + client: FoundryClient, + media_set_rid: str, + transaction_id: str, + preview: typing.Optional[bool], +): + """ + Aborts an open transaction. Items uploaded to the media set during this transaction will be deleted. + + """ + result = client.media_sets.MediaSet.abort( + media_set_rid=media_set_rid, + transaction_id=transaction_id, + preview=preview, + ) + click.echo(repr(result)) + + +@media_sets_media_set.command("calculate") +@click.argument("media_set_rid", type=str, required=True) +@click.argument("media_item_rid", type=str, required=True) +@click.option( + "--preview", + type=bool, + required=False, + help="""A boolean flag that, when set to true, enables the use of beta features in preview mode. +""", +) +@click.option("--read_token", type=str, required=False, help="""""") +@click.pass_obj +def media_sets_media_set_op_calculate( + client: FoundryClient, + media_set_rid: str, + media_item_rid: str, + preview: typing.Optional[bool], + read_token: typing.Optional[str], +): + """ + Starts calculation of a thumbnail for a given image. + + """ + result = client.media_sets.MediaSet.calculate( + media_set_rid=media_set_rid, + media_item_rid=media_item_rid, + preview=preview, + read_token=read_token, + ) + click.echo(repr(result)) + + +@media_sets_media_set.command("commit") +@click.argument("media_set_rid", type=str, required=True) +@click.argument("transaction_id", type=str, required=True) +@click.option( + "--preview", + type=bool, + required=False, + help="""A boolean flag that, when set to true, enables the use of beta features in preview mode. +""", +) +@click.pass_obj +def media_sets_media_set_op_commit( + client: FoundryClient, + media_set_rid: str, + transaction_id: str, + preview: typing.Optional[bool], +): + """ + Commits an open transaction. On success, items uploaded to the media set during this transaction will become available. + + """ + result = client.media_sets.MediaSet.commit( + media_set_rid=media_set_rid, + transaction_id=transaction_id, + preview=preview, + ) + click.echo(repr(result)) + + +@media_sets_media_set.command("create") +@click.argument("media_set_rid", type=str, required=True) +@click.option( + "--branch_name", + type=str, + required=False, + help="""The branch on which to open the transaction. Defaults to `master` for most enrollments. +""", +) +@click.option( + "--preview", + type=bool, + required=False, + help="""A boolean flag that, when set to true, enables the use of beta features in preview mode. +""", +) +@click.pass_obj +def media_sets_media_set_op_create( + client: FoundryClient, + media_set_rid: str, + branch_name: typing.Optional[str], + preview: typing.Optional[bool], +): + """ + Creates a new transaction. Items uploaded to the media set while this transaction is open will not be reflected until the transaction is committed. + + """ + result = client.media_sets.MediaSet.create( + media_set_rid=media_set_rid, + branch_name=branch_name, + preview=preview, + ) + click.echo(repr(result)) + + +@media_sets_media_set.command("get_rid_by_path") +@click.argument("media_set_rid", type=str, required=True) +@click.option( + "--media_item_path", + type=str, + required=True, + help="""The path of the media item. +""", +) +@click.option( + "--branch_name", + type=str, + required=False, + help="""Specifies the specific branch by name in which to search for this media item. May not be provided if branch rid or view rid are provided.""", +) +@click.option( + "--branch_rid", + type=str, + required=False, + help="""Specifies the specific branch by rid in which to search for this media item. May not be provided if branch name or view rid are provided.""", +) +@click.option( + "--preview", + type=bool, + required=False, + help="""A boolean flag that, when set to true, enables the use of beta features in preview mode. +""", +) +@click.option( + "--view_rid", + type=str, + required=False, + help="""Specifies the specific view by rid in which to search for this media item. May not be provided if branch name or branch rid are provided.""", +) +@click.pass_obj +def media_sets_media_set_op_get_rid_by_path( + client: FoundryClient, + media_set_rid: str, + media_item_path: str, + branch_name: typing.Optional[str], + branch_rid: typing.Optional[str], + preview: typing.Optional[bool], + view_rid: typing.Optional[str], +): + """ + Returns the media item RID for the media item with the specified path. + + """ + result = client.media_sets.MediaSet.get_rid_by_path( + media_set_rid=media_set_rid, + media_item_path=media_item_path, + branch_name=branch_name, + branch_rid=branch_rid, + preview=preview, + view_rid=view_rid, + ) + click.echo(repr(result)) + + +@media_sets_media_set.command("info") +@click.argument("media_set_rid", type=str, required=True) +@click.argument("media_item_rid", type=str, required=True) +@click.option( + "--preview", + type=bool, + required=False, + help="""A boolean flag that, when set to true, enables the use of beta features in preview mode. +""", +) +@click.option("--read_token", type=str, required=False, help="""""") +@click.pass_obj +def media_sets_media_set_op_info( + client: FoundryClient, + media_set_rid: str, + media_item_rid: str, + preview: typing.Optional[bool], + read_token: typing.Optional[str], +): + """ + Gets information about the media item. + + """ + result = client.media_sets.MediaSet.info( + media_set_rid=media_set_rid, + media_item_rid=media_item_rid, + preview=preview, + read_token=read_token, + ) + click.echo(repr(result)) + + +@media_sets_media_set.command("read") +@click.argument("media_set_rid", type=str, required=True) +@click.argument("media_item_rid", type=str, required=True) +@click.option( + "--preview", + type=bool, + required=False, + help="""A boolean flag that, when set to true, enables the use of beta features in preview mode. +""", +) +@click.option("--read_token", type=str, required=False, help="""""") +@click.pass_obj +def media_sets_media_set_op_read( + client: FoundryClient, + media_set_rid: str, + media_item_rid: str, + preview: typing.Optional[bool], + read_token: typing.Optional[str], +): + """ + Gets the content of a media item. + + """ + result = client.media_sets.MediaSet.read( + media_set_rid=media_set_rid, + media_item_rid=media_item_rid, + preview=preview, + read_token=read_token, + ) + click.echo(result) + + +@media_sets_media_set.command("read_original") +@click.argument("media_set_rid", type=str, required=True) +@click.argument("media_item_rid", type=str, required=True) +@click.option( + "--preview", + type=bool, + required=False, + help="""A boolean flag that, when set to true, enables the use of beta features in preview mode. +""", +) +@click.option("--read_token", type=str, required=False, help="""""") +@click.pass_obj +def media_sets_media_set_op_read_original( + client: FoundryClient, + media_set_rid: str, + media_item_rid: str, + preview: typing.Optional[bool], + read_token: typing.Optional[str], +): + """ + Gets the content of an original file uploaded to the media item, even if it was transformed on upload due to being an additional input format. + + """ + result = client.media_sets.MediaSet.read_original( + media_set_rid=media_set_rid, + media_item_rid=media_item_rid, + preview=preview, + read_token=read_token, + ) + click.echo(result) + + +@media_sets_media_set.command("reference") +@click.argument("media_set_rid", type=str, required=True) +@click.argument("media_item_rid", type=str, required=True) +@click.option( + "--preview", + type=bool, + required=False, + help="""A boolean flag that, when set to true, enables the use of beta features in preview mode. +""", +) +@click.option("--read_token", type=str, required=False, help="""""") +@click.pass_obj +def media_sets_media_set_op_reference( + client: FoundryClient, + media_set_rid: str, + media_item_rid: str, + preview: typing.Optional[bool], + read_token: typing.Optional[str], +): + """ + Gets the [media reference](https://palantir.com/docs/foundry/data-integration/media-sets/#media-references) for this media item. + + """ + result = client.media_sets.MediaSet.reference( + media_set_rid=media_set_rid, + media_item_rid=media_item_rid, + preview=preview, + read_token=read_token, + ) + click.echo(repr(result)) + + +@media_sets_media_set.command("retrieve") +@click.argument("media_set_rid", type=str, required=True) +@click.argument("media_item_rid", type=str, required=True) +@click.option( + "--preview", + type=bool, + required=False, + help="""A boolean flag that, when set to true, enables the use of beta features in preview mode. +""", +) +@click.option("--read_token", type=str, required=False, help="""""") +@click.pass_obj +def media_sets_media_set_op_retrieve( + client: FoundryClient, + media_set_rid: str, + media_item_rid: str, + preview: typing.Optional[bool], + read_token: typing.Optional[str], +): + """ + Retrieves a successfully calculated thumbnail for a given image. + + Thumbnails are 200px wide in the format of `image/webp` + + """ + result = client.media_sets.MediaSet.retrieve( + media_set_rid=media_set_rid, + media_item_rid=media_item_rid, + preview=preview, + read_token=read_token, + ) + click.echo(result) + + +@media_sets_media_set.command("upload") +@click.argument("media_set_rid", type=str, required=True) +@click.argument("body", type=click.File("rb"), required=True) +@click.option( + "--branch_name", + type=str, + required=False, + help="""Specifies the specific branch by name to which this media item will be uploaded. May not be provided if branch rid or view rid are provided.""", +) +@click.option( + "--branch_rid", + type=str, + required=False, + help="""Specifies the specific branch by rid to which this media item will be uploaded. May not be provided if branch name or view rid are provided.""", +) +@click.option( + "--media_item_path", + type=str, + required=False, + help="""An identifier for a media item within a media set. Necessary if the backing media set requires paths.""", +) +@click.option( + "--preview", + type=bool, + required=False, + help="""A boolean flag that, when set to true, enables the use of beta features in preview mode. +""", +) +@click.option( + "--transaction_id", + type=str, + required=False, + help="""The id of the transaction associated with this request. Required if this is a transactional media set. +""", +) +@click.option( + "--view_rid", + type=str, + required=False, + help="""Specifies the specific view by rid to which this media item will be uploaded. May not be provided if branch name or branch rid are provided.""", +) +@click.pass_obj +def media_sets_media_set_op_upload( + client: FoundryClient, + media_set_rid: str, + body: io.BufferedReader, + branch_name: typing.Optional[str], + branch_rid: typing.Optional[str], + media_item_path: typing.Optional[str], + preview: typing.Optional[bool], + transaction_id: typing.Optional[str], + view_rid: typing.Optional[str], +): + """ + Uploads a media item to an existing media set. + The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`. + A branch name, or branch rid, or view rid may optionally be specified. If none is specified, the item will be uploaded to the default branch. If more than one is specified, an error is thrown. + + """ + result = client.media_sets.MediaSet.upload( + media_set_rid=media_set_rid, + body=body.read(), + branch_name=branch_name, + branch_rid=branch_rid, + media_item_path=media_item_path, + preview=preview, + transaction_id=transaction_id, + view_rid=view_rid, + ) + click.echo(repr(result)) + + +@media_sets_media_set.command("upload_media") +@click.argument("body", type=click.File("rb"), required=True) +@click.option( + "--filename", + type=str, + required=True, + help="""The path to write the media item to. Required if the backing media set requires paths. +""", +) +@click.option( + "--attribution", type=str, required=False, help="""used for passing through usage attribution""" +) +@click.option( + "--preview", + type=bool, + required=False, + help="""A boolean flag that, when set to true, enables the use of beta features in preview mode. +""", +) +@click.pass_obj +def media_sets_media_set_op_upload_media( + client: FoundryClient, + body: io.BufferedReader, + filename: str, + attribution: typing.Optional[str], + preview: typing.Optional[bool], +): + """ + Uploads a temporary media item. If the media item isn't persisted within 1 hour, the item will be deleted. + + If multiple resources are attributed to, usage will be attributed to the first one in the list. + + The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`. + Third-party applications using this endpoint via OAuth2 must request the following operation scopes: `api:ontologies-read api:ontologies-write`. + + """ + result = client.media_sets.MediaSet.upload_media( + body=body.read(), + filename=filename, + attribution=attribution, + preview=preview, + ) + click.echo(repr(result)) + + +@cli.group("models") +def models(): + pass + + +@models.group("model") +def models_model(): + pass + + +@models_model.command("create") +@click.option("--name", type=str, required=True, help="""""") +@click.option("--parent_folder_rid", type=str, required=True, help="""""") +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def models_model_op_create( + client: FoundryClient, + name: str, + parent_folder_rid: str, + preview: typing.Optional[bool], +): + """ + Creates a new Model with no versions. + """ + result = client.models.Model.create( + name=name, + parent_folder_rid=parent_folder_rid, + preview=preview, + ) + click.echo(repr(result)) + + +@models_model.command("get") +@click.argument("model_rid", type=str, required=True) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def models_model_op_get( + client: FoundryClient, + model_rid: str, + preview: typing.Optional[bool], +): + """ + Retrieves a Model by its Resource Identifier (RID). + """ + result = client.models.Model.get( + model_rid=model_rid, + preview=preview, + ) + click.echo(repr(result)) + + +@models_model.group("model_version") +def models_model_model_version(): + pass + + +@models_model_model_version.command("create") +@click.argument("model_rid", type=str, required=True) +@click.option("--backing_repositories", type=str, required=True, help="""""") +@click.option("--conda_requirements", type=str, required=True, help="""""") +@click.option("--model_api", type=str, required=True, help="""""") +@click.option("--model_files", type=str, required=True, help="""""") +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def models_model_model_version_op_create( + client: FoundryClient, + model_rid: str, + backing_repositories: str, + conda_requirements: str, + model_api: str, + model_files: str, + preview: typing.Optional[bool], +): + """ + Creates a new Model Version on an existing model. + """ + result = client.models.Model.Version.create( + model_rid=model_rid, + backing_repositories=json.loads(backing_repositories), + conda_requirements=json.loads(conda_requirements), + model_api=json.loads(model_api), + model_files=json.loads(model_files), + preview=preview, + ) + click.echo(repr(result)) + + +@models_model_model_version.command("get") +@click.argument("model_rid", type=str, required=True) +@click.argument("model_version_rid", type=str, required=True) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def models_model_model_version_op_get( + client: FoundryClient, + model_rid: str, + model_version_rid: str, + preview: typing.Optional[bool], +): + """ + Retrieves a Model Version by its Resource Identifier (RID). + """ + result = client.models.Model.Version.get( + model_rid=model_rid, + model_version_rid=model_version_rid, + preview=preview, + ) + click.echo(repr(result)) + + +@models_model_model_version.command("list") +@click.argument("model_rid", type=str, required=True) +@click.option( + "--page_size", type=int, required=False, help="""The page size to use for the endpoint.""" +) +@click.option( + "--page_token", + type=str, + required=False, + help="""The page token indicates where to start paging. This should be omitted from the first page's request. +To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response +and use it to populate the `pageToken` field of the next request.""", +) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def models_model_model_version_op_list( + client: FoundryClient, + model_rid: str, + page_size: typing.Optional[int], + page_token: typing.Optional[str], + preview: typing.Optional[bool], +): + """ + Lists all Model Versions for a given Model. + """ + result = client.models.Model.Version.list( + model_rid=model_rid, + page_size=page_size, + page_token=page_token, + preview=preview, + ) + click.echo(repr(result)) + + +@cli.group("ontologies") +def ontologies(): + pass + + +@ontologies.group("time_series_value_bank_property") +def ontologies_time_series_value_bank_property(): + pass + + +@ontologies_time_series_value_bank_property.command("get_latest_value") +@click.argument("ontology", type=str, required=True) +@click.argument("object_type", type=str, required=True) +@click.argument("primary_key", type=str, required=True) +@click.argument("property_name", type=str, required=True) +@click.option( + "--sdk_package_rid", + type=str, + required=False, + help="""The package rid of the generated SDK. +""", +) +@click.option( + "--sdk_version", + type=str, + required=False, + help="""The version of the generated SDK. +""", +) +@click.pass_obj +def ontologies_time_series_value_bank_property_op_get_latest_value( + client: FoundryClient, + ontology: str, + object_type: str, + primary_key: str, + property_name: str, + sdk_package_rid: typing.Optional[str], + sdk_version: typing.Optional[str], +): + """ + Get the latest value of a property backed by a timeseries. If a specific geotime series integration has both a history and a live integration, we will give precedence to the live integration. + + """ + result = client.ontologies.TimeSeriesValueBankProperty.get_latest_value( + ontology=ontology, + object_type=object_type, + primary_key=primary_key, + property_name=property_name, + sdk_package_rid=sdk_package_rid, + sdk_version=sdk_version, + ) + click.echo(repr(result)) + + +@ontologies_time_series_value_bank_property.command("stream_values") +@click.argument("ontology", type=str, required=True) +@click.argument("object_type", type=str, required=True) +@click.argument("primary_key", type=str, required=True) +@click.argument("property", type=str, required=True) +@click.option("--range", type=str, required=False, help="""""") +@click.option( + "--sdk_package_rid", + type=str, + required=False, + help="""The package rid of the generated SDK. +""", +) +@click.option( + "--sdk_version", + type=str, + required=False, + help="""The version of the generated SDK. +""", +) +@click.pass_obj +def ontologies_time_series_value_bank_property_op_stream_values( + client: FoundryClient, + ontology: str, + object_type: str, + primary_key: str, + property: str, + range: typing.Optional[str], + sdk_package_rid: typing.Optional[str], + sdk_version: typing.Optional[str], +): + """ + Stream all of the points of a time series property (this includes geotime series references). + + """ + result = client.ontologies.TimeSeriesValueBankProperty.stream_values( + ontology=ontology, + object_type=object_type, + primary_key=primary_key, + property=property, + range=None if range is None else json.loads(range), + sdk_package_rid=sdk_package_rid, + sdk_version=sdk_version, + ) + click.echo(result) + + +@ontologies.group("time_series_property_v2") +def ontologies_time_series_property_v2(): + pass + + +@ontologies_time_series_property_v2.command("get_first_point") +@click.argument("ontology", type=str, required=True) +@click.argument("object_type", type=str, required=True) +@click.argument("primary_key", type=str, required=True) +@click.argument("property", type=str, required=True) +@click.option( + "--sdk_package_rid", + type=str, + required=False, + help="""The package rid of the generated SDK. +""", +) +@click.option( + "--sdk_version", + type=str, + required=False, + help="""The version of the generated SDK. +""", +) +@click.pass_obj +def ontologies_time_series_property_v2_op_get_first_point( + client: FoundryClient, + ontology: str, + object_type: str, + primary_key: str, + property: str, + sdk_package_rid: typing.Optional[str], + sdk_version: typing.Optional[str], +): + """ + Get the first point of a time series property. + + """ + result = client.ontologies.TimeSeriesPropertyV2.get_first_point( + ontology=ontology, + object_type=object_type, + primary_key=primary_key, + property=property, + sdk_package_rid=sdk_package_rid, + sdk_version=sdk_version, + ) + click.echo(repr(result)) + + +@ontologies_time_series_property_v2.command("get_last_point") +@click.argument("ontology", type=str, required=True) +@click.argument("object_type", type=str, required=True) +@click.argument("primary_key", type=str, required=True) +@click.argument("property", type=str, required=True) +@click.option( + "--sdk_package_rid", + type=str, + required=False, + help="""The package rid of the generated SDK. +""", +) +@click.option( + "--sdk_version", + type=str, + required=False, + help="""The version of the generated SDK. +""", +) +@click.pass_obj +def ontologies_time_series_property_v2_op_get_last_point( + client: FoundryClient, + ontology: str, + object_type: str, + primary_key: str, + property: str, + sdk_package_rid: typing.Optional[str], + sdk_version: typing.Optional[str], +): + """ + Get the last point of a time series property. + + """ + result = client.ontologies.TimeSeriesPropertyV2.get_last_point( + ontology=ontology, + object_type=object_type, + primary_key=primary_key, + property=property, + sdk_package_rid=sdk_package_rid, + sdk_version=sdk_version, + ) + click.echo(repr(result)) + + +@ontologies_time_series_property_v2.command("stream_points") +@click.argument("ontology", type=str, required=True) +@click.argument("object_type", type=str, required=True) +@click.argument("primary_key", type=str, required=True) +@click.argument("property", type=str, required=True) +@click.option("--aggregate", type=str, required=False, help="""""") +@click.option( + "--format", + type=click.Choice(["JSON", "ARROW"]), + required=False, + help="""The output format to serialize the output binary stream in. Default is +JSON. ARROW is more efficient than JSON at streaming a large sized response. +""", +) +@click.option("--range", type=str, required=False, help="""""") +@click.option( + "--sdk_package_rid", + type=str, + required=False, + help="""The package rid of the generated SDK. +""", +) +@click.option( + "--sdk_version", + type=str, + required=False, + help="""The version of the generated SDK. +""", +) +@click.pass_obj +def ontologies_time_series_property_v2_op_stream_points( + client: FoundryClient, + ontology: str, + object_type: str, + primary_key: str, + property: str, + aggregate: typing.Optional[str], + format: typing.Optional[typing.Literal["JSON", "ARROW"]], + range: typing.Optional[str], + sdk_package_rid: typing.Optional[str], + sdk_version: typing.Optional[str], +): + """ + Stream all of the points of a time series property. + + """ + result = client.ontologies.TimeSeriesPropertyV2.stream_points( + ontology=ontology, + object_type=object_type, + primary_key=primary_key, + property=property, + aggregate=None if aggregate is None else json.loads(aggregate), + format=format, + range=None if range is None else json.loads(range), + sdk_package_rid=sdk_package_rid, + sdk_version=sdk_version, + ) + click.echo(result) + + +@ontologies.group("query") +def ontologies_query(): + pass + + +@ontologies_query.command("execute") +@click.argument("ontology", type=str, required=True) +@click.argument("query_api_name", type=str, required=True) +@click.option("--parameters", type=str, required=True, help="""""") +@click.option( + "--attribution", + type=str, + required=False, + help="""The Attribution to be used when executing this request. +""", +) +@click.option( + "--sdk_package_rid", + type=str, + required=False, + help="""The package rid of the generated SDK. +""", +) +@click.option( + "--sdk_version", + type=str, + required=False, + help="""The version of the generated SDK. +""", +) +@click.option( + "--trace_parent", + type=str, + required=False, + help="""The W3C trace parent header included in the request. +""", +) +@click.option( + "--trace_state", + type=str, + required=False, + help="""The W3C trace state header included in the request. +""", +) +@click.option( + "--transaction_id", + type=str, + required=False, + help="""The ID of an Ontology transaction to read from. +Transactions are an experimental feature and all workflows may not be supported. +""", +) +@click.option( + "--version", + type=str, + required=False, + help="""The version of the Query to execute. +""", +) +@click.pass_obj +def ontologies_query_op_execute( + client: FoundryClient, + ontology: str, + query_api_name: str, + parameters: str, + attribution: typing.Optional[str], + sdk_package_rid: typing.Optional[str], + sdk_version: typing.Optional[str], + trace_parent: typing.Optional[str], + trace_state: typing.Optional[str], + transaction_id: typing.Optional[str], + version: typing.Optional[str], +): + """ + Executes a Query using the given parameters. By default, the latest version of the Query is executed. + + Optional parameters do not need to be supplied. + + """ + result = client.ontologies.Query.execute( + ontology=ontology, + query_api_name=query_api_name, + parameters=json.loads(parameters), + attribution=attribution, + sdk_package_rid=sdk_package_rid, + sdk_version=sdk_version, + trace_parent=trace_parent, + trace_state=trace_state, + transaction_id=transaction_id, + version=version, + ) + click.echo(repr(result)) + + +@ontologies.group("ontology_value_type") +def ontologies_ontology_value_type(): + pass + + +@ontologies_ontology_value_type.command("get") +@click.argument("ontology", type=str, required=True) +@click.argument("value_type", type=str, required=True) +@click.option( + "--preview", + type=bool, + required=False, + help="""A boolean flag that, when set to true, enables the use of beta features in preview mode. +""", +) +@click.pass_obj +def ontologies_ontology_value_type_op_get( + client: FoundryClient, + ontology: str, + value_type: str, + preview: typing.Optional[bool], +): + """ + Gets a specific value type with the given API name. + + """ + result = client.ontologies.OntologyValueType.get( + ontology=ontology, + value_type=value_type, + preview=preview, + ) + click.echo(repr(result)) + + +@ontologies_ontology_value_type.command("list") +@click.argument("ontology", type=str, required=True) +@click.option( + "--preview", + type=bool, + required=False, + help="""A boolean flag that, when set to true, enables the use of beta features in preview mode. +""", +) +@click.pass_obj +def ontologies_ontology_value_type_op_list( + client: FoundryClient, + ontology: str, + preview: typing.Optional[bool], +): + """ + Lists the latest versions of the value types for the given Ontology. + + """ + result = client.ontologies.OntologyValueType.list( + ontology=ontology, + preview=preview, + ) + click.echo(repr(result)) + + +@ontologies.group("ontology_transaction") +def ontologies_ontology_transaction(): + pass + + +@ontologies_ontology_transaction.command("post_edits") +@click.argument("ontology", type=str, required=True) +@click.argument("transaction_id", type=str, required=True) +@click.option("--edits", type=str, required=True, help="""""") +@click.option( + "--preview", + type=bool, + required=False, + help="""A boolean flag that, when set to true, enables the use of beta features in preview mode. +""", +) +@click.pass_obj +def ontologies_ontology_transaction_op_post_edits( + client: FoundryClient, + ontology: str, + transaction_id: str, + edits: str, + preview: typing.Optional[bool], +): + """ + Applies a set of edits to a transaction in order. + + """ + result = client.ontologies.OntologyTransaction.post_edits( + ontology=ontology, + transaction_id=transaction_id, + edits=json.loads(edits), + preview=preview, + ) + click.echo(repr(result)) + + +@ontologies.group("ontology_object_set") +def ontologies_ontology_object_set(): + pass + + +@ontologies_ontology_object_set.command("aggregate") +@click.argument("ontology", type=str, required=True) +@click.option("--aggregation", type=str, required=True, help="""""") +@click.option("--group_by", type=str, required=True, help="""""") +@click.option("--object_set", type=str, required=True, help="""""") +@click.option( + "--accuracy", + type=click.Choice(["REQUIRE_ACCURATE", "ALLOW_APPROXIMATE"]), + required=False, + help="""""", +) +@click.option( + "--branch", + type=str, + required=False, + help="""The Foundry branch to aggregate the objects from. If not specified, the default branch is used. +Branches are an experimental feature and not all workflows are supported. +""", +) +@click.option("--include_compute_usage", type=bool, required=False, help="""""") +@click.option( + "--sdk_package_rid", + type=str, + required=False, + help="""The package rid of the generated SDK. +""", +) +@click.option( + "--sdk_version", + type=str, + required=False, + help="""The package version of the generated SDK. +""", +) +@click.option( + "--transaction_id", + type=str, + required=False, + help="""The ID of an Ontology transaction to read from. +Transactions are an experimental feature and all workflows may not be supported. +""", +) +@click.pass_obj +def ontologies_ontology_object_set_op_aggregate( + client: FoundryClient, + ontology: str, + aggregation: str, + group_by: str, + object_set: str, + accuracy: typing.Optional[typing.Literal["REQUIRE_ACCURATE", "ALLOW_APPROXIMATE"]], + branch: typing.Optional[str], + include_compute_usage: typing.Optional[bool], + sdk_package_rid: typing.Optional[str], + sdk_version: typing.Optional[str], + transaction_id: typing.Optional[str], +): + """ + Aggregates the ontology objects present in the `ObjectSet` from the provided object set definition. + + """ + result = client.ontologies.OntologyObjectSet.aggregate( + ontology=ontology, + aggregation=json.loads(aggregation), + group_by=json.loads(group_by), + object_set=json.loads(object_set), + accuracy=accuracy, + branch=branch, + include_compute_usage=include_compute_usage, + sdk_package_rid=sdk_package_rid, + sdk_version=sdk_version, + transaction_id=transaction_id, + ) + click.echo(repr(result)) + + +@ontologies_ontology_object_set.command("create_temporary") +@click.argument("ontology", type=str, required=True) +@click.option("--object_set", type=str, required=True, help="""""") +@click.option( + "--sdk_package_rid", + type=str, + required=False, + help="""The package rid of the generated SDK. +""", +) +@click.option( + "--sdk_version", + type=str, + required=False, + help="""The package version of the generated SDK. +""", +) +@click.pass_obj +def ontologies_ontology_object_set_op_create_temporary( + client: FoundryClient, + ontology: str, + object_set: str, + sdk_package_rid: typing.Optional[str], + sdk_version: typing.Optional[str], +): + """ + Creates a temporary `ObjectSet` from the given definition. This `ObjectSet` expires after one hour. + + """ + result = client.ontologies.OntologyObjectSet.create_temporary( + ontology=ontology, + object_set=json.loads(object_set), + sdk_package_rid=sdk_package_rid, + sdk_version=sdk_version, + ) + click.echo(repr(result)) + + +@ontologies_ontology_object_set.command("get") +@click.argument("ontology", type=str, required=True) +@click.argument("object_set_rid", type=str, required=True) +@click.pass_obj +def ontologies_ontology_object_set_op_get( + client: FoundryClient, + ontology: str, + object_set_rid: str, +): + """ + Gets the definition of the `ObjectSet` with the given RID. + + """ + result = client.ontologies.OntologyObjectSet.get( + ontology=ontology, + object_set_rid=object_set_rid, + ) + click.echo(repr(result)) + + +@ontologies_ontology_object_set.command("load") +@click.argument("ontology", type=str, required=True) +@click.option("--object_set", type=str, required=True, help="""""") +@click.option("--select", type=str, required=True, help="""""") +@click.option( + "--select_v2", + type=str, + required=True, + help="""The identifiers of the properties to include in the response. Only selectV2 or select should be populated, +but not both. +""", +) +@click.option( + "--branch", + type=str, + required=False, + help="""The Foundry branch to load the object set from. If not specified, the default branch is used. +Branches are an experimental feature and not all workflows are supported. +""", +) +@click.option( + "--exclude_rid", + type=bool, + required=False, + help="""A flag to exclude the retrieval of the `__rid` property. +Setting this to true may improve performance of this endpoint for object types in OSV2. +""", +) +@click.option("--include_compute_usage", type=bool, required=False, help="""""") +@click.option("--order_by", type=str, required=False, help="""""") +@click.option("--page_size", type=int, required=False, help="""""") +@click.option("--page_token", type=str, required=False, help="""""") +@click.option( + "--sdk_package_rid", + type=str, + required=False, + help="""The package rid of the generated SDK. +""", +) +@click.option( + "--sdk_version", + type=str, + required=False, + help="""The package version of the generated SDK. +""", +) +@click.option( + "--snapshot", + type=bool, + required=False, + help="""A flag to use snapshot consistency when paging. +Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. +Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. +This defaults to false if not specified, which means you will always get the latest results. +""", +) +@click.option( + "--transaction_id", + type=str, + required=False, + help="""The ID of an Ontology transaction to read from. +Transactions are an experimental feature and all workflows may not be supported. +""", +) +@click.pass_obj +def ontologies_ontology_object_set_op_load( + client: FoundryClient, + ontology: str, + object_set: str, + select: str, + select_v2: str, + branch: typing.Optional[str], + exclude_rid: typing.Optional[bool], + include_compute_usage: typing.Optional[bool], + order_by: typing.Optional[str], + page_size: typing.Optional[int], + page_token: typing.Optional[str], + sdk_package_rid: typing.Optional[str], + sdk_version: typing.Optional[str], + snapshot: typing.Optional[bool], + transaction_id: typing.Optional[str], +): + """ + Load the ontology objects present in the `ObjectSet` from the provided object set definition. + + For Object Storage V1 backed objects, this endpoint returns a maximum of 10,000 objects. After 10,000 objects have been returned and if more objects + are available, attempting to load another page will result in an `ObjectsExceededLimit` error being returned. There is no limit on Object Storage V2 backed objects. + + Note that null value properties will not be returned. + + Vector properties will not be returned unless included in the `select` parameter. + + """ + result = client.ontologies.OntologyObjectSet.load( + ontology=ontology, + object_set=json.loads(object_set), + select=json.loads(select), + select_v2=json.loads(select_v2), + branch=branch, + exclude_rid=exclude_rid, + include_compute_usage=include_compute_usage, + order_by=None if order_by is None else json.loads(order_by), + page_size=page_size, + page_token=page_token, + sdk_package_rid=sdk_package_rid, + sdk_version=sdk_version, + snapshot=snapshot, + transaction_id=transaction_id, + ) + click.echo(repr(result)) + + +@ontologies_ontology_object_set.command("load_links") +@click.argument("ontology", type=str, required=True) +@click.option("--links", type=str, required=True, help="""""") +@click.option("--object_set", type=str, required=True, help="""""") +@click.option( + "--branch", + type=str, + required=False, + help="""The Foundry branch to aggregate the objects from. If not specified, the default branch is used. +Branches are an experimental feature and not all workflows are supported. +""", +) +@click.option("--include_compute_usage", type=bool, required=False, help="""""") +@click.option("--page_token", type=str, required=False, help="""""") +@click.option( + "--preview", + type=bool, + required=False, + help="""A boolean flag that, when set to true, enables the use of beta features in preview mode. +""", +) +@click.option( + "--sdk_package_rid", + type=str, + required=False, + help="""The package rid of the generated SDK. +""", +) +@click.option( + "--sdk_version", + type=str, + required=False, + help="""The package version of the generated SDK. +""", +) +@click.pass_obj +def ontologies_ontology_object_set_op_load_links( + client: FoundryClient, + ontology: str, + links: str, + object_set: str, + branch: typing.Optional[str], + include_compute_usage: typing.Optional[bool], + page_token: typing.Optional[str], + preview: typing.Optional[bool], + sdk_package_rid: typing.Optional[str], + sdk_version: typing.Optional[str], +): + """ + Loads the specified links from the defined object set. + + Links are defined as a link type API name and object locators for the source and target objects + where only the `__primaryKey` and `__apiName` properties are loaded. + + Links are grouped by source object locator; however, the links for a given source object may be + split over multiple entries with the same source object locator. + + Please keep these limitations in mind: + - Links returned may be stale. For example, primary keys returned by this endpoint may not exist anymore. + - This endpoint requests links for 1,000 objects at a time. If, for any page of 1,000 objects, there are more + than 100,000 links present, results are limited to 100,000 links and should be considered partial. + - This endpoint does not support OSv1 links and will return an error if links provided are backed by OSv1. + - This endpoint currently does not support interface object sets or interface links, but support will be added in the near future. + + """ + result = client.ontologies.OntologyObjectSet.load_links( + ontology=ontology, + links=json.loads(links), + object_set=json.loads(object_set), + branch=branch, + include_compute_usage=include_compute_usage, + page_token=page_token, + preview=preview, + sdk_package_rid=sdk_package_rid, + sdk_version=sdk_version, + ) + click.echo(repr(result)) + + +@ontologies_ontology_object_set.command("load_multiple_object_types") +@click.argument("ontology", type=str, required=True) +@click.option("--object_set", type=str, required=True, help="""""") +@click.option("--select", type=str, required=True, help="""""") +@click.option( + "--select_v2", + type=str, + required=True, + help="""The identifiers of the properties to include in the response. Only selectV2 or select should be populated, +but not both. +""", +) +@click.option( + "--branch", + type=str, + required=False, + help="""The Foundry branch to load the object set for multiple object types. If not specified, the default branch is used. +Branches are an experimental feature and not all workflows are supported. +""", +) +@click.option( + "--exclude_rid", + type=bool, + required=False, + help="""A flag to exclude the retrieval of the `$rid` property. +Setting this to true may improve performance of this endpoint for object types in OSV2. +""", +) +@click.option("--include_compute_usage", type=bool, required=False, help="""""") +@click.option("--order_by", type=str, required=False, help="""""") +@click.option("--page_size", type=int, required=False, help="""""") +@click.option("--page_token", type=str, required=False, help="""""") +@click.option( + "--preview", + type=bool, + required=False, + help="""A boolean flag that, when set to true, enables the use of beta features in preview mode. +""", +) +@click.option( + "--sdk_package_rid", + type=str, + required=False, + help="""The package rid of the generated SDK. +""", +) +@click.option( + "--sdk_version", + type=str, + required=False, + help="""The package version of the generated SDK. +""", +) +@click.option( + "--snapshot", + type=bool, + required=False, + help="""A flag to use snapshot consistency when paging. +Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. +Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. +This defaults to false if not specified, which means you will always get the latest results. +""", +) +@click.option( + "--transaction_id", + type=str, + required=False, + help="""The ID of an Ontology transaction to read from. +Transactions are an experimental feature and all workflows may not be supported. +""", +) +@click.pass_obj +def ontologies_ontology_object_set_op_load_multiple_object_types( + client: FoundryClient, + ontology: str, + object_set: str, + select: str, + select_v2: str, + branch: typing.Optional[str], + exclude_rid: typing.Optional[bool], + include_compute_usage: typing.Optional[bool], + order_by: typing.Optional[str], + page_size: typing.Optional[int], + page_token: typing.Optional[str], + preview: typing.Optional[bool], + sdk_package_rid: typing.Optional[str], + sdk_version: typing.Optional[str], + snapshot: typing.Optional[bool], + transaction_id: typing.Optional[str], +): + """ + Load the ontology objects present in the `ObjectSet` from the provided object set definition. The resulting + objects may be scoped to an object type, in which all the selected properties on the object type are returned, or scoped + to an interface, in which only the object type properties that implement the properties of any interfaces in its + scope are returned. For objects that are scoped to an interface in the result, a mapping from interface to + object implementation is returned in order to interpret the objects as the interfaces that they implement. + + For Object Storage V1 backed objects, this endpoint returns a maximum of 10,000 objects. After 10,000 objects have been returned and if more objects + are available, attempting to load another page will result in an `ObjectsExceededLimit` error being returned. There is no limit on Object Storage V2 backed objects. + + Note that null value properties will not be returned. In addition, property metadata (rid, apiName, and primaryKey) + will be prefixed with '$' instead of '__' as is the case in `loadObjects`. + + Vector properties will not be returned unless included in the `select` parameter. + + """ + result = client.ontologies.OntologyObjectSet.load_multiple_object_types( + ontology=ontology, + object_set=json.loads(object_set), + select=json.loads(select), + select_v2=json.loads(select_v2), + branch=branch, + exclude_rid=exclude_rid, + include_compute_usage=include_compute_usage, + order_by=None if order_by is None else json.loads(order_by), + page_size=page_size, + page_token=page_token, + preview=preview, + sdk_package_rid=sdk_package_rid, + sdk_version=sdk_version, + snapshot=snapshot, + transaction_id=transaction_id, + ) + click.echo(repr(result)) + + +@ontologies_ontology_object_set.command("load_objects_or_interfaces") +@click.argument("ontology", type=str, required=True) +@click.option("--object_set", type=str, required=True, help="""""") +@click.option("--select", type=str, required=True, help="""""") +@click.option( + "--select_v2", + type=str, + required=True, + help="""The identifiers of the properties to include in the response. Only selectV2 or select should be populated, +but not both. +""", +) +@click.option( + "--branch", + type=str, + required=False, + help="""The Foundry branch to load the objects or interfaces from. If not specified, the default branch is used. +Branches are an experimental feature and not all workflows are supported. +""", +) +@click.option( + "--exclude_rid", + type=bool, + required=False, + help="""A flag to exclude the retrieval of the `$rid` property. +Setting this to true may improve performance of this endpoint for object types in OSV2. +""", +) +@click.option("--order_by", type=str, required=False, help="""""") +@click.option("--page_size", type=int, required=False, help="""""") +@click.option("--page_token", type=str, required=False, help="""""") +@click.option( + "--preview", + type=bool, + required=False, + help="""A boolean flag that, when set to true, enables the use of beta features in preview mode. +""", +) +@click.option( + "--sdk_package_rid", + type=str, + required=False, + help="""The package rid of the generated SDK. +""", +) +@click.option( + "--sdk_version", + type=str, + required=False, + help="""The package version of the generated SDK. +""", +) +@click.option( + "--snapshot", + type=bool, + required=False, + help="""A flag to use snapshot consistency when paging. +Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. +Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. +This defaults to false if not specified, which means you will always get the latest results. +""", +) +@click.pass_obj +def ontologies_ontology_object_set_op_load_objects_or_interfaces( + client: FoundryClient, + ontology: str, + object_set: str, + select: str, + select_v2: str, + branch: typing.Optional[str], + exclude_rid: typing.Optional[bool], + order_by: typing.Optional[str], + page_size: typing.Optional[int], + page_token: typing.Optional[str], + preview: typing.Optional[bool], + sdk_package_rid: typing.Optional[str], + sdk_version: typing.Optional[str], + snapshot: typing.Optional[bool], +): + """ + Load the ontology objects present in the `ObjectSet` from the provided object set definition. If the requested + object set contains interfaces and the object can be viewed as an interface, it will contain the properties + defined by the interface. If not, it will contain the properties defined by its object type. This allows directly + loading all objects of an interface where all objects are viewed as the interface, for example. + + Note that the result object set cannot contain a mix of objects with "interface" properties and "object type" + properties. Attempting to load an object set like this will result in an error. + + For Object Storage V1 backed objects, this endpoint returns a maximum of 10,000 objects. After 10,000 objects have been returned and if more objects + are available, attempting to load another page will result in an `ObjectsExceededLimit` error being returned. There is no limit on Object Storage V2 backed objects. + + Note that null value properties will not be returned. In addition, property metadata (rid, apiName, and primaryKey) + will be prefixed with '$' instead of '__' as is the case in `/loadObjects`. + + Vector properties will not be returned unless included in the `select` parameter. + + """ + result = client.ontologies.OntologyObjectSet.load_objects_or_interfaces( + ontology=ontology, + object_set=json.loads(object_set), + select=json.loads(select), + select_v2=json.loads(select_v2), + branch=branch, + exclude_rid=exclude_rid, + order_by=None if order_by is None else json.loads(order_by), + page_size=page_size, + page_token=page_token, + preview=preview, + sdk_package_rid=sdk_package_rid, + sdk_version=sdk_version, + snapshot=snapshot, + ) + click.echo(repr(result)) + + +@ontologies.group("ontology_object") +def ontologies_ontology_object(): + pass + + +@ontologies_ontology_object.command("aggregate") +@click.argument("ontology", type=str, required=True) +@click.argument("object_type", type=str, required=True) +@click.option("--aggregation", type=str, required=True, help="""""") +@click.option("--group_by", type=str, required=True, help="""""") +@click.option( + "--accuracy", + type=click.Choice(["REQUIRE_ACCURATE", "ALLOW_APPROXIMATE"]), + required=False, + help="""""", +) +@click.option( + "--branch", + type=str, + required=False, + help="""The Foundry branch to aggregate objects from. If not specified, the default branch will be used. +Branches are an experimental feature and not all workflows are supported. +""", +) +@click.option( + "--sdk_package_rid", + type=str, + required=False, + help="""The package rid of the generated SDK. +""", +) +@click.option( + "--sdk_version", + type=str, + required=False, + help="""The version of the generated SDK. +""", +) +@click.option("--where", type=str, required=False, help="""""") +@click.pass_obj +def ontologies_ontology_object_op_aggregate( + client: FoundryClient, + ontology: str, + object_type: str, + aggregation: str, + group_by: str, + accuracy: typing.Optional[typing.Literal["REQUIRE_ACCURATE", "ALLOW_APPROXIMATE"]], + branch: typing.Optional[str], + sdk_package_rid: typing.Optional[str], + sdk_version: typing.Optional[str], + where: typing.Optional[str], +): + """ + Perform functions on object fields in the specified ontology and object type. + + """ + result = client.ontologies.OntologyObject.aggregate( + ontology=ontology, + object_type=object_type, + aggregation=json.loads(aggregation), + group_by=json.loads(group_by), + accuracy=accuracy, + branch=branch, + sdk_package_rid=sdk_package_rid, + sdk_version=sdk_version, + where=None if where is None else json.loads(where), + ) + click.echo(repr(result)) + + +@ontologies_ontology_object.command("count") +@click.argument("ontology", type=str, required=True) +@click.argument("object_type", type=str, required=True) +@click.option( + "--branch", + type=str, + required=False, + help="""The Foundry branch to count the objects from. If not specified, the default branch is used. +Branches are an experimental feature and not all workflows are supported. +""", +) +@click.option( + "--sdk_package_rid", + type=str, + required=False, + help="""The package rid of the generated SDK. +""", +) +@click.option( + "--sdk_version", + type=str, + required=False, + help="""The package version of the generated SDK. +""", +) +@click.pass_obj +def ontologies_ontology_object_op_count( + client: FoundryClient, + ontology: str, + object_type: str, + branch: typing.Optional[str], + sdk_package_rid: typing.Optional[str], + sdk_version: typing.Optional[str], +): + """ + Returns a count of the objects of the given object type. + + """ + result = client.ontologies.OntologyObject.count( + ontology=ontology, + object_type=object_type, + branch=branch, + sdk_package_rid=sdk_package_rid, + sdk_version=sdk_version, + ) + click.echo(repr(result)) + + +@ontologies_ontology_object.command("get") +@click.argument("ontology", type=str, required=True) +@click.argument("object_type", type=str, required=True) +@click.argument("primary_key", type=str, required=True) +@click.option( + "--branch", + type=str, + required=False, + help="""The Foundry branch to get the object from. If not specified, the default branch is used. +Branches are an experimental feature and not all workflows are supported. +""", +) +@click.option( + "--exclude_rid", + type=bool, + required=False, + help="""A flag to exclude the retrieval of the `__rid` property. +Setting this to true may improve performance of this endpoint for object types in OSV2. +""", +) +@click.option( + "--sdk_package_rid", + type=str, + required=False, + help="""The package rid of the generated SDK. +""", +) +@click.option( + "--sdk_version", + type=str, + required=False, + help="""The version of the generated SDK. +""", +) +@click.option( + "--select", + type=str, + required=False, + help="""The properties of the object type that should be included in the response. Omit this parameter to get all +the properties. +""", +) +@click.pass_obj +def ontologies_ontology_object_op_get( + client: FoundryClient, + ontology: str, + object_type: str, + primary_key: str, + branch: typing.Optional[str], + exclude_rid: typing.Optional[bool], + sdk_package_rid: typing.Optional[str], + sdk_version: typing.Optional[str], + select: typing.Optional[str], +): + """ + Gets a specific object with the given primary key. + + """ + result = client.ontologies.OntologyObject.get( + ontology=ontology, + object_type=object_type, + primary_key=primary_key, + branch=branch, + exclude_rid=exclude_rid, + sdk_package_rid=sdk_package_rid, + sdk_version=sdk_version, + select=None if select is None else json.loads(select), + ) + click.echo(repr(result)) + + +@ontologies_ontology_object.command("list") +@click.argument("ontology", type=str, required=True) +@click.argument("object_type", type=str, required=True) +@click.option( + "--branch", + type=str, + required=False, + help="""The Foundry branch to list objects from. If not specified, the default branch will be used. +Branches are an experimental feature and not all workflows are supported. +""", +) +@click.option( + "--exclude_rid", + type=bool, + required=False, + help="""A flag to exclude the retrieval of the `__rid` property. +Setting this to true may improve performance of this endpoint for object types in OSV2. +""", +) +@click.option("--order_by", type=str, required=False, help="""""") +@click.option( + "--page_size", + type=int, + required=False, + help="""The desired size of the page to be returned. Defaults to 1,000. +See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. +""", +) +@click.option("--page_token", type=str, required=False, help="""""") +@click.option( + "--sdk_package_rid", + type=str, + required=False, + help="""The package rid of the generated SDK. +""", +) +@click.option( + "--sdk_version", + type=str, + required=False, + help="""The version of the generated SDK. +""", +) +@click.option( + "--select", + type=str, + required=False, + help="""The properties of the object type that should be included in the response. Omit this parameter to get all +the properties. +""", +) +@click.option( + "--snapshot", + type=bool, + required=False, + help="""A flag to use snapshot consistency when paging. +Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. +Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. +This defaults to false if not specified, which means you will always get the latest results. +""", +) +@click.pass_obj +def ontologies_ontology_object_op_list( + client: FoundryClient, + ontology: str, + object_type: str, + branch: typing.Optional[str], + exclude_rid: typing.Optional[bool], + order_by: typing.Optional[str], + page_size: typing.Optional[int], + page_token: typing.Optional[str], + sdk_package_rid: typing.Optional[str], + sdk_version: typing.Optional[str], + select: typing.Optional[str], + snapshot: typing.Optional[bool], +): + """ + Lists the objects for the given Ontology and object type. + + Note that this endpoint does not guarantee consistency. Changes to the data could result in missing or + repeated objects in the response pages. + + For Object Storage V1 backed objects, this endpoint returns a maximum of 10,000 objects. After 10,000 objects have been returned and if more objects + are available, attempting to load another page will result in an `ObjectsExceededLimit` error being returned. There is no limit on Object Storage V2 backed objects. + + Each page may be smaller or larger than the requested page size. However, it + is guaranteed that if there are more results available, at least one result will be present + in the response. + + Note that null value properties will not be returned. + + """ + result = client.ontologies.OntologyObject.list( + ontology=ontology, + object_type=object_type, + branch=branch, + exclude_rid=exclude_rid, + order_by=order_by, + page_size=page_size, + page_token=page_token, + sdk_package_rid=sdk_package_rid, + sdk_version=sdk_version, + select=None if select is None else json.loads(select), + snapshot=snapshot, + ) + click.echo(repr(result)) + + +@ontologies_ontology_object.command("search") +@click.argument("ontology", type=str, required=True) +@click.argument("object_type", type=str, required=True) +@click.option( + "--select", + type=str, + required=True, + help="""The API names of the object type properties to include in the response. +""", +) +@click.option( + "--select_v2", + type=str, + required=True, + help="""The identifiers of the properties to include in the response. Only selectV2 or select should be populated, +but not both. +""", +) +@click.option( + "--branch", + type=str, + required=False, + help="""The Foundry branch to search objects from. If not specified, the default branch will be used. +Branches are an experimental feature and not all workflows are supported. +""", +) +@click.option( + "--exclude_rid", + type=bool, + required=False, + help="""A flag to exclude the retrieval of the `__rid` property. +Setting this to true may improve performance of this endpoint for object types in OSV2. +""", +) +@click.option("--order_by", type=str, required=False, help="""""") +@click.option("--page_size", type=int, required=False, help="""""") +@click.option("--page_token", type=str, required=False, help="""""") +@click.option( + "--sdk_package_rid", + type=str, + required=False, + help="""The package rid of the generated SDK. +""", +) +@click.option( + "--sdk_version", + type=str, + required=False, + help="""The version of the generated SDK. +""", +) +@click.option( + "--snapshot", + type=bool, + required=False, + help="""A flag to use snapshot consistency when paging. +Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. +Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. +This defaults to false if not specified, which means you will always get the latest results. +""", +) +@click.option("--where", type=str, required=False, help="""""") +@click.pass_obj +def ontologies_ontology_object_op_search( + client: FoundryClient, + ontology: str, + object_type: str, + select: str, + select_v2: str, + branch: typing.Optional[str], + exclude_rid: typing.Optional[bool], + order_by: typing.Optional[str], + page_size: typing.Optional[int], + page_token: typing.Optional[str], + sdk_package_rid: typing.Optional[str], + sdk_version: typing.Optional[str], + snapshot: typing.Optional[bool], + where: typing.Optional[str], +): + """ + Search for objects in the specified ontology and object type. The request body is used + to filter objects based on the specified query. The supported queries are: + + | Query type | Description | Supported Types | + |-----------------------------------------|-------------------------------------------------------------------------------------------------------------------|---------------------------------| + | lt | The provided property is less than the provided value. | number, string, date, timestamp | + | gt | The provided property is greater than the provided value. | number, string, date, timestamp | + | lte | The provided property is less than or equal to the provided value. | number, string, date, timestamp | + | gte | The provided property is greater than or equal to the provided value. | number, string, date, timestamp | + | eq | The provided property is exactly equal to the provided value. | number, string, date, timestamp | + | isNull | The provided property is (or is not) null. | all | + | contains | The provided property contains the provided value. | array | + | not | The sub-query does not match. | N/A (applied on a query) | + | and | All the sub-queries match. | N/A (applied on queries) | + | or | At least one of the sub-queries match. | N/A (applied on queries) | + | containsAllTermsInOrderPrefixLastTerm | The provided property contains all the terms provided in order. The last term can be a partial prefix match. | string | + | containsAllTermsInOrder | The provided property contains the provided term as a substring. | string | + | containsAnyTerm | The provided property contains at least one of the terms separated by whitespace. | string | + | containsAllTerms | The provided property contains all the terms separated by whitespace. | string | + | startsWith | Deprecated alias for containsAllTermsInOrderPrefixLastTerm. | string | + + Queries can be at most three levels deep. By default, terms are separated by whitespace or punctuation (`?!,:;-[](){}'"~`). Periods (`.`) on their own are ignored. + Partial terms are not matched by terms filters except where explicitly noted. + + """ + result = client.ontologies.OntologyObject.search( + ontology=ontology, + object_type=object_type, + select=json.loads(select), + select_v2=json.loads(select_v2), + branch=branch, + exclude_rid=exclude_rid, + order_by=None if order_by is None else json.loads(order_by), + page_size=page_size, + page_token=page_token, + sdk_package_rid=sdk_package_rid, + sdk_version=sdk_version, + snapshot=snapshot, + where=None if where is None else json.loads(where), + ) + click.echo(repr(result)) + + +@ontologies.group("ontology_interface") +def ontologies_ontology_interface(): + pass + + +@ontologies_ontology_interface.command("aggregate") +@click.argument("ontology", type=str, required=True) +@click.argument("interface_type", type=str, required=True) +@click.option("--aggregation", type=str, required=True, help="""""") +@click.option("--group_by", type=str, required=True, help="""""") +@click.option( + "--accuracy", + type=click.Choice(["REQUIRE_ACCURATE", "ALLOW_APPROXIMATE"]), + required=False, + help="""""", +) +@click.option( + "--branch", + type=str, + required=False, + help="""The Foundry branch to aggregate objects from. If not specified, the default branch will be used. +Branches are an experimental feature and not all workflows are supported. +""", +) +@click.option( + "--preview", + type=bool, + required=False, + help="""A boolean flag that, when set to true, enables the use of beta features in preview mode. +""", +) +@click.option("--where", type=str, required=False, help="""""") +@click.pass_obj +def ontologies_ontology_interface_op_aggregate( + client: FoundryClient, + ontology: str, + interface_type: str, + aggregation: str, + group_by: str, + accuracy: typing.Optional[typing.Literal["REQUIRE_ACCURATE", "ALLOW_APPROXIMATE"]], + branch: typing.Optional[str], + preview: typing.Optional[bool], + where: typing.Optional[str], +): + """ + :::callout{theme=warning title=Warning} + This endpoint will be removed once TS OSDK is updated to use `objectSets/aggregate` with interface object + sets. + ::: + Perform functions on object fields in the specified ontology and of the specified interface type. Any + properties specified in the query must be shared property type API names defined on the interface. + + """ + result = client.ontologies.OntologyInterface.aggregate( + ontology=ontology, + interface_type=interface_type, + aggregation=json.loads(aggregation), + group_by=json.loads(group_by), + accuracy=accuracy, + branch=branch, + preview=preview, + where=None if where is None else json.loads(where), + ) + click.echo(repr(result)) + + +@ontologies_ontology_interface.command("get") +@click.argument("ontology", type=str, required=True) +@click.argument("interface_type", type=str, required=True) +@click.option( + "--branch", + type=str, + required=False, + help="""The Foundry branch to load the interface type definition from. If not specified, the default branch will be used. +Branches are an experimental feature and not all workflows are supported. +""", +) +@click.option( + "--preview", + type=bool, + required=False, + help="""A boolean flag that, when set to true, enables the use of beta features in preview mode. +""", +) +@click.option( + "--sdk_package_rid", + type=str, + required=False, + help="""The package rid of the generated SDK. +""", +) +@click.option( + "--sdk_version", + type=str, + required=False, + help="""The version of the generated SDK. +""", +) +@click.pass_obj +def ontologies_ontology_interface_op_get( + client: FoundryClient, + ontology: str, + interface_type: str, + branch: typing.Optional[str], + preview: typing.Optional[bool], + sdk_package_rid: typing.Optional[str], + sdk_version: typing.Optional[str], +): + """ + Gets a specific interface type with the given API name. + + """ + result = client.ontologies.OntologyInterface.get( + ontology=ontology, + interface_type=interface_type, + branch=branch, + preview=preview, + sdk_package_rid=sdk_package_rid, + sdk_version=sdk_version, + ) + click.echo(repr(result)) + + +@ontologies_ontology_interface.command("get_outgoing_interface_link_type") +@click.argument("ontology", type=str, required=True) +@click.argument("interface_type", type=str, required=True) +@click.argument("interface_link_type", type=str, required=True) +@click.option( + "--branch", + type=str, + required=False, + help="""The Foundry branch to get the outgoing link types for an object type from. If not specified, the default branch will be used. +Branches are an experimental feature and not all workflows are supported. +""", +) +@click.pass_obj +def ontologies_ontology_interface_op_get_outgoing_interface_link_type( + client: FoundryClient, + ontology: str, + interface_type: str, + interface_link_type: str, + branch: typing.Optional[str], +): + """ + Get an outgoing interface link type for an interface type. + + """ + result = client.ontologies.OntologyInterface.get_outgoing_interface_link_type( + ontology=ontology, + interface_type=interface_type, + interface_link_type=interface_link_type, + branch=branch, + ) + click.echo(repr(result)) + + +@ontologies_ontology_interface.command("list") +@click.argument("ontology", type=str, required=True) +@click.option( + "--branch", + type=str, + required=False, + help="""The Foundry branch to list the interface types from. If not specified, the default branch will be used. +Branches are an experimental feature and not all workflows are supported. +""", +) +@click.option( + "--page_size", + type=int, + required=False, + help="""The desired size of the page to be returned. Defaults to 500. +See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. +""", +) +@click.option("--page_token", type=str, required=False, help="""""") +@click.option( + "--preview", + type=bool, + required=False, + help="""A boolean flag that, when set to true, enables the use of beta features in preview mode. +""", +) +@click.pass_obj +def ontologies_ontology_interface_op_list( + client: FoundryClient, + ontology: str, + branch: typing.Optional[str], + page_size: typing.Optional[int], + page_token: typing.Optional[str], + preview: typing.Optional[bool], +): + """ + Lists the interface types for the given Ontology. + + Each page may be smaller than the requested page size. However, it is guaranteed that if there are more + results available, at least one result will be present in the response. + + """ + result = client.ontologies.OntologyInterface.list( + ontology=ontology, + branch=branch, + page_size=page_size, + page_token=page_token, + preview=preview, + ) + click.echo(repr(result)) + + +@ontologies_ontology_interface.command("list_interface_linked_objects") +@click.argument("ontology", type=str, required=True) +@click.argument("interface_type", type=str, required=True) +@click.argument("object_type", type=str, required=True) +@click.argument("primary_key", type=str, required=True) +@click.argument("interface_link_type", type=str, required=True) +@click.option( + "--branch", + type=str, + required=False, + help="""The Foundry branch to get the outgoing link types for an object type from. If not specified, the default branch will be used. +Branches are an experimental feature and not all workflows are supported. +""", +) +@click.option( + "--exclude_rid", + type=bool, + required=False, + help="""A flag to exclude the retrieval of the `__rid` property. +Setting this to true may improve performance of this endpoint for object types in OSV2. +""", +) +@click.option("--order_by", type=str, required=False, help="""""") +@click.option( + "--page_size", + type=int, + required=False, + help="""The desired size of the page to be returned. Defaults to 1,000. +See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. +""", +) +@click.option("--page_token", type=str, required=False, help="""""") +@click.option( + "--preview", + type=bool, + required=False, + help="""A boolean flag that, when set to true, enables the use of beta features in preview mode. +""", +) +@click.option( + "--select", + type=str, + required=False, + help="""The properties of the object type that should be included in the response. Omit this parameter to get all +the properties. +""", +) +@click.option( + "--snapshot", + type=bool, + required=False, + help="""A flag to use snapshot consistency when paging. +Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. +Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. +This defaults to false if not specified, which means you will always get the latest results. +""", +) +@click.pass_obj +def ontologies_ontology_interface_op_list_interface_linked_objects( + client: FoundryClient, + ontology: str, + interface_type: str, + object_type: str, + primary_key: str, + interface_link_type: str, + branch: typing.Optional[str], + exclude_rid: typing.Optional[bool], + order_by: typing.Optional[str], + page_size: typing.Optional[int], + page_token: typing.Optional[str], + preview: typing.Optional[bool], + select: typing.Optional[str], + snapshot: typing.Optional[bool], +): + """ + Lists the linked objects for a specific object and the given interface link type. + + Note that this endpoint does not guarantee consistency. Changes to the data could result in missing or + repeated objects in the response pages. + + For Object Storage V1 backed objects, this endpoint returns a maximum of 10,000 objects. After 10,000 objects have been returned and if more objects + are available, attempting to load another page will result in an `ObjectsExceededLimit` error being returned. There is no limit on Object Storage V2 backed objects. + + Each page may be smaller or larger than the requested page size. However, it + is guaranteed that if there are more results available, at least one result will be present + in the response. + + Note that null value properties will not be returned. + + """ + result = client.ontologies.OntologyInterface.list_interface_linked_objects( + ontology=ontology, + interface_type=interface_type, + object_type=object_type, + primary_key=primary_key, + interface_link_type=interface_link_type, + branch=branch, + exclude_rid=exclude_rid, + order_by=order_by, + page_size=page_size, + page_token=page_token, + preview=preview, + select=None if select is None else json.loads(select), + snapshot=snapshot, + ) + click.echo(repr(result)) + + +@ontologies_ontology_interface.command("list_objects_for_interface") +@click.argument("ontology", type=str, required=True) +@click.argument("interface_type", type=str, required=True) +@click.option( + "--branch", + type=str, + required=False, + help="""The Foundry branch to list objects from. If not specified, the default branch will be used. +Branches are an experimental feature and not all workflows are supported. +""", +) +@click.option( + "--exclude_rid", + type=bool, + required=False, + help="""A flag to exclude the retrieval of the `__rid` property. +Setting this to true may improve performance of this endpoint for object types in OSV2. +""", +) +@click.option("--order_by", type=str, required=False, help="""""") +@click.option( + "--page_size", + type=int, + required=False, + help="""The desired size of the page to be returned. Defaults to 1,000. +See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. +""", +) +@click.option("--page_token", type=str, required=False, help="""""") +@click.option( + "--select", + type=str, + required=False, + help="""The properties of the interface type that should be included in the response. Omit this parameter to get all +the properties. +""", +) +@click.option( + "--snapshot", + type=bool, + required=False, + help="""A flag to use snapshot consistency when paging. +Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. +Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. +This defaults to false if not specified, which means you will always get the latest results. +""", +) +@click.pass_obj +def ontologies_ontology_interface_op_list_objects_for_interface( + client: FoundryClient, + ontology: str, + interface_type: str, + branch: typing.Optional[str], + exclude_rid: typing.Optional[bool], + order_by: typing.Optional[str], + page_size: typing.Optional[int], + page_token: typing.Optional[str], + select: typing.Optional[str], + snapshot: typing.Optional[bool], +): + """ + Lists the objects for the given Ontology and interface type. + + Note that this endpoint does not guarantee consistency, unless you use the snapshot flag specified below. Changes to the data could result in missing or + repeated objects in the response pages. + + For Object Storage V1 backed objects, this endpoint returns a maximum of 10,000 objects. After 10,000 objects have been returned and if more objects + are available, attempting to load another page will result in an `ObjectsExceededLimit` error being returned. There is no limit on Object Storage V2 backed objects. + + Each page may be smaller or larger than the requested page size. However, it + is guaranteed that if there are more results available, at least one result will be present + in the response. + + Note that null value properties will not be returned. + + """ + result = client.ontologies.OntologyInterface.list_objects_for_interface( + ontology=ontology, + interface_type=interface_type, + branch=branch, + exclude_rid=exclude_rid, + order_by=order_by, + page_size=page_size, + page_token=page_token, + select=None if select is None else json.loads(select), + snapshot=snapshot, + ) + click.echo(repr(result)) + + +@ontologies_ontology_interface.command("list_outgoing_interface_link_types") +@click.argument("ontology", type=str, required=True) +@click.argument("interface_type", type=str, required=True) +@click.option( + "--branch", + type=str, + required=False, + help="""The Foundry branch to get the outgoing link type from. If not specified, the default branch will be used. +Branches are an experimental feature and not all workflows are supported. +""", +) +@click.pass_obj +def ontologies_ontology_interface_op_list_outgoing_interface_link_types( + client: FoundryClient, + ontology: str, + interface_type: str, + branch: typing.Optional[str], +): + """ + List the outgoing interface link types for an interface type. + + """ + result = client.ontologies.OntologyInterface.list_outgoing_interface_link_types( + ontology=ontology, + interface_type=interface_type, + branch=branch, + ) + click.echo(repr(result)) + + +@ontologies_ontology_interface.command("search") +@click.argument("ontology", type=str, required=True) +@click.argument("interface_type", type=str, required=True) +@click.option( + "--augmented_interface_property_types", + type=str, + required=True, + help="""A map from interface type API name to a list of interface property type API names. For each returned object, +if the object implements an interface that is a key in the map, then we augment the response for that object +type with the list of properties specified in the value. +""", +) +@click.option( + "--augmented_properties", + type=str, + required=True, + help="""A map from object type API name to a list of property type API names. For each returned object, if the +object’s object type is a key in the map, then we augment the response for that object type with the list +of properties specified in the value. +""", +) +@click.option( + "--augmented_shared_property_types", + type=str, + required=True, + help="""A map from interface type API name to a list of shared property type API names. For each returned object, if +the object implements an interface that is a key in the map, then we augment the response for that object +type with the list of properties specified in the value. +""", +) +@click.option( + "--other_interface_types", + type=str, + required=True, + help="""A list of interface type API names. Object types must implement all the mentioned interfaces in order to be +included in the response. +""", +) +@click.option( + "--selected_interface_property_types", + type=str, + required=True, + help="""A list of interface property type API names of the interface type that should be included in the response. +Omit this parameter to include all properties of the interface type in the response. +""", +) +@click.option( + "--selected_object_types", + type=str, + required=True, + help="""A list of object type API names that should be included in the response. If non-empty, object types that are +not mentioned will not be included in the response even if they implement the specified interface. Omit the +parameter to include all object types. +""", +) +@click.option( + "--selected_shared_property_types", + type=str, + required=True, + help="""A list of shared property type API names of the interface type that should be included in the response. +Omit this parameter to include all properties of the interface type in the response. +""", +) +@click.option( + "--branch", + type=str, + required=False, + help="""The Foundry branch to search objects from. If not specified, the default branch will be used. +Branches are an experimental feature and not all workflows are supported. +""", +) +@click.option("--order_by", type=str, required=False, help="""""") +@click.option("--page_size", type=int, required=False, help="""""") +@click.option("--page_token", type=str, required=False, help="""""") +@click.option( + "--preview", + type=bool, + required=False, + help="""A boolean flag that, when set to true, enables the use of beta features in preview mode. +""", +) +@click.option("--where", type=str, required=False, help="""""") +@click.pass_obj +def ontologies_ontology_interface_op_search( + client: FoundryClient, + ontology: str, + interface_type: str, + augmented_interface_property_types: str, + augmented_properties: str, + augmented_shared_property_types: str, + other_interface_types: str, + selected_interface_property_types: str, + selected_object_types: str, + selected_shared_property_types: str, + branch: typing.Optional[str], + order_by: typing.Optional[str], + page_size: typing.Optional[int], + page_token: typing.Optional[str], + preview: typing.Optional[bool], + where: typing.Optional[str], +): + """ + :::callout{theme=warning title=Warning} + This endpoint will be removed once TS OSDK is updated to use `objectSets/loadObjects` with interface object + sets. + ::: + Search for objects in the specified ontology and interface type. Any properties specified in the "where" or + "orderBy" parameters must be shared property type API names defined on the interface. The following search + queries are supported: + + | Query type | Description | Supported Types | + |-----------------------------------------|-------------------------------------------------------------------------------------------------------------------|---------------------------------| + | lt | The provided property is less than the provided value. | number, string, date, timestamp | + | gt | The provided property is greater than the provided value. | number, string, date, timestamp | + | lte | The provided property is less than or equal to the provided value. | number, string, date, timestamp | + | gte | The provided property is greater than or equal to the provided value. | number, string, date, timestamp | + | eq | The provided property is exactly equal to the provided value. | number, string, date, timestamp | + | isNull | The provided property is (or is not) null. | all | + | contains | The provided property contains the provided value. | array | + | not | The sub-query does not match. | N/A (applied on a query) | + | and | All the sub-queries match. | N/A (applied on queries) | + | or | At least one of the sub-queries match. | N/A (applied on queries) | + | startsWith | The provided property starts with the provided term. | string | + | containsAllTermsInOrderPrefixLastTerm | The provided property contains all the terms provided in order. The last term can be a partial prefix match. | string | + | containsAllTermsInOrder | The provided property contains the provided terms as a substring. | string | + | containsAnyTerm | The provided property contains at least one of the terms separated by whitespace. | string | + | containsAllTerms | The provided property contains all the terms separated by whitespace. | string | + + Queries can be at most three levels deep. By default, terms are separated by whitespace or punctuation (`?!,:;-[](){}'"~`). Periods (`.`) on their own are ignored. + Partial terms are not matched by terms filters except where explicitly noted. + + Attempting to use an unsupported query will result in a validation error. Third-party applications using this + endpoint via OAuth2 must request the following operation scope: `api:ontologies-read`. + + """ + result = client.ontologies.OntologyInterface.search( + ontology=ontology, + interface_type=interface_type, + augmented_interface_property_types=json.loads(augmented_interface_property_types), + augmented_properties=json.loads(augmented_properties), + augmented_shared_property_types=json.loads(augmented_shared_property_types), + other_interface_types=json.loads(other_interface_types), + selected_interface_property_types=json.loads(selected_interface_property_types), + selected_object_types=json.loads(selected_object_types), + selected_shared_property_types=json.loads(selected_shared_property_types), + branch=branch, + order_by=None if order_by is None else json.loads(order_by), + page_size=page_size, + page_token=page_token, + preview=preview, + where=None if where is None else json.loads(where), + ) + click.echo(repr(result)) + + +@ontologies.group("ontology") +def ontologies_ontology(): + pass + + +@ontologies_ontology.command("get") +@click.argument("ontology", type=str, required=True) +@click.pass_obj +def ontologies_ontology_op_get( + client: FoundryClient, + ontology: str, +): + """ + Gets a specific ontology for a given Ontology API name or RID. + + """ + result = client.ontologies.Ontology.get( + ontology=ontology, + ) + click.echo(repr(result)) + + +@ontologies_ontology.command("get_full_metadata") +@click.argument("ontology", type=str, required=True) +@click.option( + "--branch", + type=str, + required=False, + help="""The Foundry branch to load metadata from. If not specified, the default branch will be used. +Branches are an experimental feature and not all workflows are supported. +""", +) +@click.pass_obj +def ontologies_ontology_op_get_full_metadata( + client: FoundryClient, + ontology: str, + branch: typing.Optional[str], +): + """ + Get the full Ontology metadata. This includes the objects, links, actions, queries, and interfaces. + This endpoint is designed to return as much metadata as possible in a single request to support OSDK workflows. + It may omit certain entities rather than fail the request. + + """ + result = client.ontologies.Ontology.get_full_metadata( + ontology=ontology, + branch=branch, + ) + click.echo(repr(result)) + + +@ontologies_ontology.command("list") +@click.pass_obj +def ontologies_ontology_op_list( + client: FoundryClient, +): + """ + Lists the Ontologies visible to the current user. + + """ + result = client.ontologies.Ontology.list() + click.echo(repr(result)) + + +@ontologies_ontology.command("load_metadata") +@click.argument("ontology", type=str, required=True) +@click.option("--action_types", type=str, required=True, help="""""") +@click.option("--interface_types", type=str, required=True, help="""""") +@click.option("--link_types", type=str, required=True, help="""""") +@click.option("--object_types", type=str, required=True, help="""""") +@click.option("--query_types", type=str, required=True, help="""""") +@click.option( + "--branch", + type=str, + required=False, + help="""The Foundry branch to load metadata from. If not specified, the default branch will be used. +Branches are an experimental feature and not all workflows are supported. +""", +) +@click.option( + "--preview", + type=bool, + required=False, + help="""A boolean flag that, when set to true, enables the use of beta features in preview mode. +""", +) +@click.pass_obj +def ontologies_ontology_op_load_metadata( + client: FoundryClient, + ontology: str, + action_types: str, + interface_types: str, + link_types: str, + object_types: str, + query_types: str, + branch: typing.Optional[str], + preview: typing.Optional[bool], +): + """ + Load Ontology metadata for the requested object, link, action, query, and interface types. + + """ + result = client.ontologies.Ontology.load_metadata( + ontology=ontology, + action_types=json.loads(action_types), + interface_types=json.loads(interface_types), + link_types=json.loads(link_types), + object_types=json.loads(object_types), + query_types=json.loads(query_types), + branch=branch, + preview=preview, + ) + click.echo(repr(result)) + + +@ontologies_ontology.group("query_type") +def ontologies_ontology_query_type(): + pass + + +@ontologies_ontology_query_type.command("get") +@click.argument("ontology", type=str, required=True) +@click.argument("query_api_name", type=str, required=True) +@click.option( + "--sdk_package_rid", + type=str, + required=False, + help="""The package rid of the generated SDK. +""", +) +@click.option( + "--sdk_version", + type=str, + required=False, + help="""The version of the generated SDK. +""", +) +@click.option( + "--version", + type=str, + required=False, + help="""The version of the Query to get. +""", +) +@click.pass_obj +def ontologies_ontology_query_type_op_get( + client: FoundryClient, + ontology: str, + query_api_name: str, + sdk_package_rid: typing.Optional[str], + sdk_version: typing.Optional[str], + version: typing.Optional[str], +): + """ + Gets a specific query type with the given API name. + + """ + result = client.ontologies.Ontology.QueryType.get( + ontology=ontology, + query_api_name=query_api_name, + sdk_package_rid=sdk_package_rid, + sdk_version=sdk_version, + version=version, + ) + click.echo(repr(result)) + + +@ontologies_ontology_query_type.command("list") +@click.argument("ontology", type=str, required=True) +@click.option( + "--page_size", + type=int, + required=False, + help="""The desired size of the page to be returned. Defaults to 100. +See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. +""", +) +@click.option("--page_token", type=str, required=False, help="""""") +@click.pass_obj +def ontologies_ontology_query_type_op_list( + client: FoundryClient, + ontology: str, + page_size: typing.Optional[int], + page_token: typing.Optional[str], +): + """ + Lists the query types for the given Ontology. + + Each page may be smaller than the requested page size. However, it is guaranteed that if there are more + results available, at least one result will be present in the response. + + """ + result = client.ontologies.Ontology.QueryType.list( + ontology=ontology, + page_size=page_size, + page_token=page_token, + ) + click.echo(repr(result)) + + +@ontologies_ontology.group("object_type") +def ontologies_ontology_object_type(): + pass + + +@ontologies_ontology_object_type.command("get") +@click.argument("ontology", type=str, required=True) +@click.argument("object_type", type=str, required=True) +@click.option( + "--branch", + type=str, + required=False, + help="""The Foundry branch to load the object type definition from. If not specified, the default branch will be used. +Branches are an experimental feature and not all workflows are supported. +""", +) +@click.pass_obj +def ontologies_ontology_object_type_op_get( + client: FoundryClient, + ontology: str, + object_type: str, + branch: typing.Optional[str], +): + """ + Gets a specific object type with the given API name. + + """ + result = client.ontologies.Ontology.ObjectType.get( + ontology=ontology, + object_type=object_type, + branch=branch, + ) + click.echo(repr(result)) + + +@ontologies_ontology_object_type.command("get_full_metadata") +@click.argument("ontology", type=str, required=True) +@click.argument("object_type", type=str, required=True) +@click.option( + "--branch", + type=str, + required=False, + help="""The Foundry branch to load the action type definition from. If not specified, the default branch will be used. +Branches are an experimental feature and not all workflows are supported. +""", +) +@click.option( + "--preview", + type=bool, + required=False, + help="""A boolean flag that, when set to true, enables the use of beta features in preview mode. +""", +) +@click.option( + "--sdk_package_rid", + type=str, + required=False, + help="""The package rid of the generated SDK. +""", +) +@click.option( + "--sdk_version", + type=str, + required=False, + help="""The version of the generated SDK. +""", +) +@click.pass_obj +def ontologies_ontology_object_type_op_get_full_metadata( + client: FoundryClient, + ontology: str, + object_type: str, + branch: typing.Optional[str], + preview: typing.Optional[bool], + sdk_package_rid: typing.Optional[str], + sdk_version: typing.Optional[str], +): + """ + Gets the full metadata for a specific object type with the given API name. + + """ + result = client.ontologies.Ontology.ObjectType.get_full_metadata( + ontology=ontology, + object_type=object_type, + branch=branch, + preview=preview, + sdk_package_rid=sdk_package_rid, + sdk_version=sdk_version, + ) + click.echo(repr(result)) + + +@ontologies_ontology_object_type.command("get_outgoing_link_type") +@click.argument("ontology", type=str, required=True) +@click.argument("object_type", type=str, required=True) +@click.argument("link_type", type=str, required=True) +@click.option( + "--branch", + type=str, + required=False, + help="""The Foundry branch to get the outgoing link types for an object type from. If not specified, the default branch will be used. +Branches are an experimental feature and not all workflows are supported. +""", +) +@click.pass_obj +def ontologies_ontology_object_type_op_get_outgoing_link_type( + client: FoundryClient, + ontology: str, + object_type: str, + link_type: str, + branch: typing.Optional[str], +): + """ + Get an outgoing link for an object type. + + """ + result = client.ontologies.Ontology.ObjectType.get_outgoing_link_type( + ontology=ontology, + object_type=object_type, + link_type=link_type, + branch=branch, + ) + click.echo(repr(result)) + + +@ontologies_ontology_object_type.command("list") +@click.argument("ontology", type=str, required=True) +@click.option( + "--branch", + type=str, + required=False, + help="""The Foundry branch to list the object types from. If not specified, the default branch will be used. +Branches are an experimental feature and not all workflows are supported. +""", +) +@click.option( + "--page_size", + type=int, + required=False, + help="""The desired size of the page to be returned. Defaults to 500. +See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. +""", +) +@click.option("--page_token", type=str, required=False, help="""""") +@click.pass_obj +def ontologies_ontology_object_type_op_list( + client: FoundryClient, + ontology: str, + branch: typing.Optional[str], + page_size: typing.Optional[int], + page_token: typing.Optional[str], +): + """ + Lists the object types for the given Ontology. + + Each page may be smaller or larger than the requested page size. However, it is guaranteed that if there are + more results available, at least one result will be present in the + response. + + """ + result = client.ontologies.Ontology.ObjectType.list( + ontology=ontology, + branch=branch, + page_size=page_size, + page_token=page_token, + ) + click.echo(repr(result)) + + +@ontologies_ontology_object_type.command("list_outgoing_link_types") +@click.argument("ontology", type=str, required=True) +@click.argument("object_type", type=str, required=True) +@click.option( + "--branch", + type=str, + required=False, + help="""The Foundry branch to load the outgoing link types from. If not specified, the default branch will be used. +Branches are an experimental feature and not all workflows are supported. +""", +) +@click.option( + "--page_size", type=int, required=False, help="""The desired size of the page to be returned.""" +) +@click.option("--page_token", type=str, required=False, help="""""") +@click.pass_obj +def ontologies_ontology_object_type_op_list_outgoing_link_types( + client: FoundryClient, + ontology: str, + object_type: str, + branch: typing.Optional[str], + page_size: typing.Optional[int], + page_token: typing.Optional[str], +): + """ + List the outgoing links for an object type. + + """ + result = client.ontologies.Ontology.ObjectType.list_outgoing_link_types( + ontology=ontology, + object_type=object_type, + branch=branch, + page_size=page_size, + page_token=page_token, + ) + click.echo(repr(result)) + + +@ontologies_ontology.group("action_type") +def ontologies_ontology_action_type(): + pass + + +@ontologies_ontology_action_type.command("get") +@click.argument("ontology", type=str, required=True) +@click.argument("action_type", type=str, required=True) +@click.option( + "--branch", + type=str, + required=False, + help="""The Foundry branch to load the action type definition from. If not specified, the default branch will be used. +Branches are an experimental feature and not all workflows are supported. +""", +) +@click.pass_obj +def ontologies_ontology_action_type_op_get( + client: FoundryClient, + ontology: str, + action_type: str, + branch: typing.Optional[str], +): + """ + Gets a specific action type with the given API name. + + """ + result = client.ontologies.Ontology.ActionType.get( + ontology=ontology, + action_type=action_type, + branch=branch, + ) + click.echo(repr(result)) + + +@ontologies_ontology_action_type.command("get_by_rid") +@click.argument("ontology", type=str, required=True) +@click.argument("action_type_rid", type=str, required=True) +@click.option( + "--branch", + type=str, + required=False, + help="""The Foundry branch to load the action type definition from. If not specified, the default branch will be used. +Branches are an experimental feature and not all workflows are supported. +""", +) +@click.pass_obj +def ontologies_ontology_action_type_op_get_by_rid( + client: FoundryClient, + ontology: str, + action_type_rid: str, + branch: typing.Optional[str], +): + """ + Gets a specific action type with the given RID. + + """ + result = client.ontologies.Ontology.ActionType.get_by_rid( + ontology=ontology, + action_type_rid=action_type_rid, + branch=branch, + ) + click.echo(repr(result)) + + +@ontologies_ontology_action_type.command("list") +@click.argument("ontology", type=str, required=True) +@click.option( + "--branch", + type=str, + required=False, + help="""The Foundry branch to list the action types from. If not specified, the default branch will be used. +Branches are an experimental feature and not all workflows are supported. +""", +) +@click.option( + "--page_size", + type=int, + required=False, + help="""The desired size of the page to be returned. Defaults to 500. +See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. +""", +) +@click.option("--page_token", type=str, required=False, help="""""") +@click.pass_obj +def ontologies_ontology_action_type_op_list( + client: FoundryClient, + ontology: str, + branch: typing.Optional[str], + page_size: typing.Optional[int], + page_token: typing.Optional[str], +): + """ + Lists the action types for the given Ontology. + + Each page may be smaller than the requested page size. However, it is guaranteed that if there are more + results available, at least one result will be present in the response. + + """ + result = client.ontologies.Ontology.ActionType.list( + ontology=ontology, + branch=branch, + page_size=page_size, + page_token=page_token, + ) + click.echo(repr(result)) + + +@ontologies.group("media_reference_property") +def ontologies_media_reference_property(): + pass + + +@ontologies_media_reference_property.command("get_media_content") +@click.argument("ontology", type=str, required=True) +@click.argument("object_type", type=str, required=True) +@click.argument("primary_key", type=str, required=True) +@click.argument("property", type=str, required=True) +@click.option( + "--preview", + type=bool, + required=False, + help="""A boolean flag that, when set to true, enables the use of beta features in preview mode. +""", +) +@click.option( + "--sdk_package_rid", + type=str, + required=False, + help="""The package rid of the generated SDK. +""", +) +@click.option( + "--sdk_version", + type=str, + required=False, + help="""The version of the generated SDK. +""", +) +@click.pass_obj +def ontologies_media_reference_property_op_get_media_content( + client: FoundryClient, + ontology: str, + object_type: str, + primary_key: str, + property: str, + preview: typing.Optional[bool], + sdk_package_rid: typing.Optional[str], + sdk_version: typing.Optional[str], +): + """ + Gets the content of a media item referenced by this property. + + """ + result = client.ontologies.MediaReferenceProperty.get_media_content( + ontology=ontology, + object_type=object_type, + primary_key=primary_key, + property=property, + preview=preview, + sdk_package_rid=sdk_package_rid, + sdk_version=sdk_version, + ) + click.echo(result) + + +@ontologies_media_reference_property.command("get_media_metadata") +@click.argument("ontology", type=str, required=True) +@click.argument("object_type", type=str, required=True) +@click.argument("primary_key", type=str, required=True) +@click.argument("property", type=str, required=True) +@click.option( + "--preview", + type=bool, + required=False, + help="""A boolean flag that, when set to true, enables the use of beta features in preview mode. +""", +) +@click.option( + "--sdk_package_rid", + type=str, + required=False, + help="""The package rid of the generated SDK. +""", +) +@click.option( + "--sdk_version", + type=str, + required=False, + help="""The version of the generated SDK. +""", +) +@click.pass_obj +def ontologies_media_reference_property_op_get_media_metadata( + client: FoundryClient, + ontology: str, + object_type: str, + primary_key: str, + property: str, + preview: typing.Optional[bool], + sdk_package_rid: typing.Optional[str], + sdk_version: typing.Optional[str], +): + """ + Gets metadata about the media item referenced by this property. + + """ + result = client.ontologies.MediaReferenceProperty.get_media_metadata( + ontology=ontology, + object_type=object_type, + primary_key=primary_key, + property=property, + preview=preview, + sdk_package_rid=sdk_package_rid, + sdk_version=sdk_version, + ) + click.echo(repr(result)) + + +@ontologies_media_reference_property.command("upload") +@click.argument("ontology", type=str, required=True) +@click.argument("object_type", type=str, required=True) +@click.argument("property", type=str, required=True) +@click.argument("body", type=click.File("rb"), required=True) +@click.option( + "--media_item_path", + type=str, + required=False, + help="""A path for the media item within its backing media set. Required if the backing media set requires paths. +""", +) +@click.option( + "--preview", + type=bool, + required=False, + help="""A boolean flag that, when set to true, enables the use of beta features in preview mode. +""", +) +@click.pass_obj +def ontologies_media_reference_property_op_upload( + client: FoundryClient, + ontology: str, + object_type: str, + property: str, + body: io.BufferedReader, + media_item_path: typing.Optional[str], + preview: typing.Optional[bool], +): + """ + Uploads a media item to the media set which backs the specified property. The property must be backed by a single media set and branch, otherwise an error will be thrown. + The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`. + + """ + result = client.ontologies.MediaReferenceProperty.upload( + ontology=ontology, + object_type=object_type, + property=property, + body=body.read(), + media_item_path=media_item_path, + preview=preview, + ) + click.echo(repr(result)) + + +@ontologies.group("linked_object") +def ontologies_linked_object(): + pass + + +@ontologies_linked_object.command("get_linked_object") +@click.argument("ontology", type=str, required=True) +@click.argument("object_type", type=str, required=True) +@click.argument("primary_key", type=str, required=True) +@click.argument("link_type", type=str, required=True) +@click.argument("linked_object_primary_key", type=str, required=True) +@click.option( + "--branch", + type=str, + required=False, + help="""The Foundry branch to load the object set for multiple object types. If not specified, the default branch is used. +Branches are an experimental feature and not all workflows are supported. +""", +) +@click.option( + "--exclude_rid", + type=bool, + required=False, + help="""A flag to exclude the retrieval of the `__rid` property. +Setting this to true may improve performance of this endpoint for object types in OSV2. +""", +) +@click.option( + "--sdk_package_rid", + type=str, + required=False, + help="""The package rid of the generated SDK. +""", +) +@click.option( + "--sdk_version", + type=str, + required=False, + help="""The version of the generated SDK. +""", +) +@click.option( + "--select", + type=str, + required=False, + help="""The properties of the object type that should be included in the response. Omit this parameter to get all +the properties. +""", +) +@click.pass_obj +def ontologies_linked_object_op_get_linked_object( + client: FoundryClient, + ontology: str, + object_type: str, + primary_key: str, + link_type: str, + linked_object_primary_key: str, + branch: typing.Optional[str], + exclude_rid: typing.Optional[bool], + sdk_package_rid: typing.Optional[str], + sdk_version: typing.Optional[str], + select: typing.Optional[str], +): + """ + Get a specific linked object that originates from another object. + + If there is no link between the two objects, `LinkedObjectNotFound` is thrown. + + """ + result = client.ontologies.LinkedObject.get_linked_object( + ontology=ontology, + object_type=object_type, + primary_key=primary_key, + link_type=link_type, + linked_object_primary_key=linked_object_primary_key, + branch=branch, + exclude_rid=exclude_rid, + sdk_package_rid=sdk_package_rid, + sdk_version=sdk_version, + select=None if select is None else json.loads(select), + ) + click.echo(repr(result)) + + +@ontologies_linked_object.command("list_linked_objects") +@click.argument("ontology", type=str, required=True) +@click.argument("object_type", type=str, required=True) +@click.argument("primary_key", type=str, required=True) +@click.argument("link_type", type=str, required=True) +@click.option( + "--branch", + type=str, + required=False, + help="""The Foundry branch to list linked objects from. If not specified, the default branch will be used. +Branches are an experimental feature and not all workflows are supported. +""", +) +@click.option( + "--exclude_rid", + type=bool, + required=False, + help="""A flag to exclude the retrieval of the `__rid` property. +Setting this to true may improve performance of this endpoint for object types in OSV2. +""", +) +@click.option("--order_by", type=str, required=False, help="""""") +@click.option( + "--page_size", + type=int, + required=False, + help="""The desired size of the page to be returned. Defaults to 1,000. +See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. +""", +) +@click.option("--page_token", type=str, required=False, help="""""") +@click.option( + "--sdk_package_rid", + type=str, + required=False, + help="""The package rid of the generated SDK. +""", +) +@click.option( + "--sdk_version", + type=str, + required=False, + help="""The version of the generated SDK. +""", +) +@click.option( + "--select", + type=str, + required=False, + help="""The properties of the object type that should be included in the response. Omit this parameter to get all +the properties. +""", +) +@click.option( + "--snapshot", + type=bool, + required=False, + help="""A flag to use snapshot consistency when paging. +Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. +Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. +This defaults to false if not specified, which means you will always get the latest results. +""", +) +@click.pass_obj +def ontologies_linked_object_op_list_linked_objects( + client: FoundryClient, + ontology: str, + object_type: str, + primary_key: str, + link_type: str, + branch: typing.Optional[str], + exclude_rid: typing.Optional[bool], + order_by: typing.Optional[str], + page_size: typing.Optional[int], + page_token: typing.Optional[str], + sdk_package_rid: typing.Optional[str], + sdk_version: typing.Optional[str], + select: typing.Optional[str], + snapshot: typing.Optional[bool], +): + """ + Lists the linked objects for a specific object and the given link type. + + Note that this endpoint does not guarantee consistency. Changes to the data could result in missing or + repeated objects in the response pages. + + For Object Storage V1 backed objects, this endpoint returns a maximum of 10,000 objects. After 10,000 objects have been returned and if more objects + are available, attempting to load another page will result in an `ObjectsExceededLimit` error being returned. There is no limit on Object Storage V2 backed objects. + + Each page may be smaller or larger than the requested page size. However, it + is guaranteed that if there are more results available, at least one result will be present + in the response. + + Note that null value properties will not be returned. + + """ + result = client.ontologies.LinkedObject.list_linked_objects( + ontology=ontology, + object_type=object_type, + primary_key=primary_key, + link_type=link_type, + branch=branch, + exclude_rid=exclude_rid, + order_by=order_by, + page_size=page_size, + page_token=page_token, + sdk_package_rid=sdk_package_rid, + sdk_version=sdk_version, + select=None if select is None else json.loads(select), + snapshot=snapshot, + ) + click.echo(repr(result)) + + +@ontologies.group("cipher_text_property") +def ontologies_cipher_text_property(): + pass + + +@ontologies_cipher_text_property.command("decrypt") +@click.argument("ontology", type=str, required=True) +@click.argument("object_type", type=str, required=True) +@click.argument("primary_key", type=str, required=True) +@click.argument("property", type=str, required=True) +@click.pass_obj +def ontologies_cipher_text_property_op_decrypt( + client: FoundryClient, + ontology: str, + object_type: str, + primary_key: str, + property: str, +): + """ + Decrypt the value of a ciphertext property. + + """ + result = client.ontologies.CipherTextProperty.decrypt( + ontology=ontology, + object_type=object_type, + primary_key=primary_key, + property=property, + ) + click.echo(repr(result)) + + +@ontologies.group("attachment_property") +def ontologies_attachment_property(): + pass + + +@ontologies_attachment_property.command("get_attachment") +@click.argument("ontology", type=str, required=True) +@click.argument("object_type", type=str, required=True) +@click.argument("primary_key", type=str, required=True) +@click.argument("property", type=str, required=True) +@click.option( + "--sdk_package_rid", + type=str, + required=False, + help="""The package rid of the generated SDK. +""", +) +@click.option( + "--sdk_version", + type=str, + required=False, + help="""The version of the generated SDK. +""", +) +@click.pass_obj +def ontologies_attachment_property_op_get_attachment( + client: FoundryClient, + ontology: str, + object_type: str, + primary_key: str, + property: str, + sdk_package_rid: typing.Optional[str], + sdk_version: typing.Optional[str], +): + """ + Get the metadata of attachments parented to the given object. + + """ + result = client.ontologies.AttachmentProperty.get_attachment( + ontology=ontology, + object_type=object_type, + primary_key=primary_key, + property=property, + sdk_package_rid=sdk_package_rid, + sdk_version=sdk_version, + ) + click.echo(repr(result)) + + +@ontologies_attachment_property.command("get_attachment_by_rid") +@click.argument("ontology", type=str, required=True) +@click.argument("object_type", type=str, required=True) +@click.argument("primary_key", type=str, required=True) +@click.argument("property", type=str, required=True) +@click.argument("attachment_rid", type=str, required=True) +@click.option( + "--sdk_package_rid", + type=str, + required=False, + help="""The package rid of the generated SDK. +""", +) +@click.option( + "--sdk_version", + type=str, + required=False, + help="""The version of the generated SDK. +""", +) +@click.pass_obj +def ontologies_attachment_property_op_get_attachment_by_rid( + client: FoundryClient, + ontology: str, + object_type: str, + primary_key: str, + property: str, + attachment_rid: str, + sdk_package_rid: typing.Optional[str], + sdk_version: typing.Optional[str], +): + """ + Get the metadata of a particular attachment in an attachment list. + + """ + result = client.ontologies.AttachmentProperty.get_attachment_by_rid( + ontology=ontology, + object_type=object_type, + primary_key=primary_key, + property=property, + attachment_rid=attachment_rid, + sdk_package_rid=sdk_package_rid, + sdk_version=sdk_version, + ) + click.echo(repr(result)) + + +@ontologies_attachment_property.command("read_attachment") +@click.argument("ontology", type=str, required=True) +@click.argument("object_type", type=str, required=True) +@click.argument("primary_key", type=str, required=True) +@click.argument("property", type=str, required=True) +@click.option( + "--sdk_package_rid", + type=str, + required=False, + help="""The package rid of the generated SDK. +""", +) +@click.option( + "--sdk_version", + type=str, + required=False, + help="""The version of the generated SDK. +""", +) +@click.pass_obj +def ontologies_attachment_property_op_read_attachment( + client: FoundryClient, + ontology: str, + object_type: str, + primary_key: str, + property: str, + sdk_package_rid: typing.Optional[str], + sdk_version: typing.Optional[str], +): + """ + Get the content of an attachment. + + """ + result = client.ontologies.AttachmentProperty.read_attachment( + ontology=ontology, + object_type=object_type, + primary_key=primary_key, + property=property, + sdk_package_rid=sdk_package_rid, + sdk_version=sdk_version, + ) + click.echo(result) + + +@ontologies_attachment_property.command("read_attachment_by_rid") +@click.argument("ontology", type=str, required=True) +@click.argument("object_type", type=str, required=True) +@click.argument("primary_key", type=str, required=True) +@click.argument("property", type=str, required=True) +@click.argument("attachment_rid", type=str, required=True) +@click.option( + "--sdk_package_rid", + type=str, + required=False, + help="""The package rid of the generated SDK. +""", +) +@click.option( + "--sdk_version", + type=str, + required=False, + help="""The version of the generated SDK. +""", +) +@click.pass_obj +def ontologies_attachment_property_op_read_attachment_by_rid( + client: FoundryClient, + ontology: str, + object_type: str, + primary_key: str, + property: str, + attachment_rid: str, + sdk_package_rid: typing.Optional[str], + sdk_version: typing.Optional[str], +): + """ + Get the content of an attachment by its RID. + + The RID must exist in the attachment array of the property. + + """ + result = client.ontologies.AttachmentProperty.read_attachment_by_rid( + ontology=ontology, + object_type=object_type, + primary_key=primary_key, + property=property, + attachment_rid=attachment_rid, + sdk_package_rid=sdk_package_rid, + sdk_version=sdk_version, + ) + click.echo(result) + + +@ontologies.group("attachment") +def ontologies_attachment(): + pass + + +@ontologies_attachment.command("get") +@click.argument("attachment_rid", type=str, required=True) +@click.pass_obj +def ontologies_attachment_op_get( + client: FoundryClient, + attachment_rid: str, +): + """ + Get the metadata of an attachment. + + """ + result = client.ontologies.Attachment.get( + attachment_rid=attachment_rid, + ) + click.echo(repr(result)) + + +@ontologies_attachment.command("read") +@click.argument("attachment_rid", type=str, required=True) +@click.pass_obj +def ontologies_attachment_op_read( + client: FoundryClient, + attachment_rid: str, +): + """ + Get the content of an attachment. + + """ + result = client.ontologies.Attachment.read( + attachment_rid=attachment_rid, + ) + click.echo(result) + + +@ontologies_attachment.command("upload") +@click.argument("body", type=click.File("rb"), required=True) +@click.option( + "--content_length", + type=int, + required=True, + help="""The size in bytes of the file content being uploaded.""", +) +@click.option( + "--content_type", type=str, required=True, help="""The media type of the file being uploaded.""" +) +@click.option( + "--filename", type=str, required=True, help="""The name of the file being uploaded.""" +) +@click.pass_obj +def ontologies_attachment_op_upload( + client: FoundryClient, + body: io.BufferedReader, + content_length: int, + content_type: str, + filename: str, +): + """ + Upload an attachment to use in an action. Any attachment which has not been linked to an object via + an action within one hour after upload will be removed. + Previously mapped attachments which are not connected to any object anymore are also removed on + a biweekly basis. + The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`. + + """ + result = client.ontologies.Attachment.upload( + body=body.read(), + content_length=content_length, + content_type=content_type, + filename=filename, + ) + click.echo(repr(result)) + + +@ontologies_attachment.command("upload_with_rid") +@click.argument("attachment_rid", type=str, required=True) +@click.argument("body", type=click.File("rb"), required=True) +@click.option( + "--content_length", + type=int, + required=True, + help="""The size in bytes of the file content being uploaded.""", +) +@click.option( + "--content_type", type=str, required=True, help="""The media type of the file being uploaded.""" +) +@click.option( + "--filename", type=str, required=True, help="""The name of the file being uploaded.""" +) +@click.option( + "--preview", + type=bool, + required=False, + help="""A boolean flag that, when set to true, enables the use of beta features in preview mode. +""", +) +@click.pass_obj +def ontologies_attachment_op_upload_with_rid( + client: FoundryClient, + attachment_rid: str, + body: io.BufferedReader, + content_length: int, + content_type: str, + filename: str, + preview: typing.Optional[bool], +): + """ + This endpoint is identical to `/v2/ontologies/attachments/upload` but additionally accepts a previously + generated `AttachmentRid`. + + """ + result = client.ontologies.Attachment.upload_with_rid( + attachment_rid=attachment_rid, + body=body.read(), + content_length=content_length, + content_type=content_type, + filename=filename, + preview=preview, + ) + click.echo(repr(result)) + + +@ontologies.group("action_type_full_metadata") +def ontologies_action_type_full_metadata(): + pass + + +@ontologies_action_type_full_metadata.command("get") +@click.argument("ontology", type=str, required=True) +@click.argument("action_type", type=str, required=True) +@click.option( + "--branch", + type=str, + required=False, + help="""The Foundry branch to load the action type definition from. If not specified, the default branch will be used. +""", +) +@click.pass_obj +def ontologies_action_type_full_metadata_op_get( + client: FoundryClient, + ontology: str, + action_type: str, + branch: typing.Optional[str], +): + """ + Gets the full metadata associated with an action type. + + """ + result = client.ontologies.ActionTypeFullMetadata.get( + ontology=ontology, + action_type=action_type, + branch=branch, + ) + click.echo(repr(result)) + + +@ontologies_action_type_full_metadata.command("list") +@click.argument("ontology", type=str, required=True) +@click.option( + "--branch", + type=str, + required=False, + help="""The Foundry branch to list the action types from. If not specified, the default branch will be used. +Branches are an experimental feature and not all workflows are supported. +""", +) +@click.option( + "--page_size", + type=int, + required=False, + help="""The desired size of the page to be returned. Defaults to 500. +See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. +""", +) +@click.option("--page_token", type=str, required=False, help="""""") +@click.pass_obj +def ontologies_action_type_full_metadata_op_list( + client: FoundryClient, + ontology: str, + branch: typing.Optional[str], + page_size: typing.Optional[int], + page_token: typing.Optional[str], +): + """ + Lists the action types (with full metadata) for the given Ontology. + + Each page may be smaller than the requested page size. However, it is guaranteed that if there are more + results available, at least one result will be present in the response. + + """ + result = client.ontologies.ActionTypeFullMetadata.list( + ontology=ontology, + branch=branch, + page_size=page_size, + page_token=page_token, + ) + click.echo(repr(result)) + + +@ontologies.group("action") +def ontologies_action(): + pass + + +@ontologies_action.command("apply") +@click.argument("ontology", type=str, required=True) +@click.argument("action", type=str, required=True) +@click.option("--parameters", type=str, required=True, help="""""") +@click.option( + "--branch", + type=str, + required=False, + help="""The Foundry branch to apply the action against. If not specified, the default branch is used. +Branches are an experimental feature and not all workflows are supported. +""", +) +@click.option("--options", type=str, required=False, help="""""") +@click.option( + "--sdk_package_rid", + type=str, + required=False, + help="""The package rid of the generated SDK. +""", +) +@click.option( + "--sdk_version", + type=str, + required=False, + help="""The version of the generated SDK. +""", +) +@click.pass_obj +def ontologies_action_op_apply( + client: FoundryClient, + ontology: str, + action: str, + parameters: str, + branch: typing.Optional[str], + options: typing.Optional[str], + sdk_package_rid: typing.Optional[str], + sdk_version: typing.Optional[str], +): + """ + Applies an action using the given parameters. + + Changes to objects or links stored in Object Storage V1 are eventually consistent and may take some time to be visible. + Edits to objects or links in Object Storage V2 will be visible immediately after the action completes. + + Note that a 200 HTTP status code only indicates that the request was received and processed by the server. + See the validation result in the response body to determine if the action was applied successfully. + + Note that [parameter default values](https://palantir.com/docs/foundry/action-types/parameters-default-value/) are not currently supported by + this endpoint. + + """ + result = client.ontologies.Action.apply( + ontology=ontology, + action=action, + parameters=json.loads(parameters), + branch=branch, + options=None if options is None else json.loads(options), + sdk_package_rid=sdk_package_rid, + sdk_version=sdk_version, + ) + click.echo(repr(result)) + + +@ontologies_action.command("apply_batch") +@click.argument("ontology", type=str, required=True) +@click.argument("action", type=str, required=True) +@click.option("--requests", type=str, required=True, help="""""") +@click.option( + "--branch", + type=str, + required=False, + help="""The Foundry branch to apply the action against. If not specified, the default branch is used. +Branches are an experimental feature and not all workflows are supported. +""", +) +@click.option("--options", type=str, required=False, help="""""") +@click.option( + "--sdk_package_rid", + type=str, + required=False, + help="""The package rid of the generated SDK. +""", +) +@click.option( + "--sdk_version", + type=str, + required=False, + help="""The version of the generated SDK. +""", +) +@click.pass_obj +def ontologies_action_op_apply_batch( + client: FoundryClient, + ontology: str, + action: str, + requests: str, + branch: typing.Optional[str], + options: typing.Optional[str], + sdk_package_rid: typing.Optional[str], + sdk_version: typing.Optional[str], +): + """ + Applies multiple actions (of the same Action Type) using the given parameters. + + Changes to objects or links stored in Object Storage V1 are eventually consistent and may take some time to be visible. + Edits to objects or links in Object Storage V2 will be visible immediately after the action completes. + + Up to 20 actions may be applied in one call. Actions that only modify objects in Object Storage v2 and do not + call Functions may receive a higher limit. + + Note that [notifications](https://palantir.com/docs/foundry/action-types/notifications/) are not currently supported by this endpoint. + + """ + result = client.ontologies.Action.apply_batch( + ontology=ontology, + action=action, + requests=json.loads(requests), + branch=branch, + options=None if options is None else json.loads(options), + sdk_package_rid=sdk_package_rid, + sdk_version=sdk_version, + ) + click.echo(repr(result)) + + +@ontologies_action.command("apply_with_overrides") +@click.argument("ontology", type=str, required=True) +@click.argument("action", type=str, required=True) +@click.option("--overrides", type=str, required=True, help="""""") +@click.option("--request", type=str, required=True, help="""""") +@click.option( + "--branch", + type=str, + required=False, + help="""The Foundry branch to apply the action against. If not specified, the default branch is used. +Branches are an experimental feature and not all workflows are supported. +""", +) +@click.option( + "--sdk_package_rid", + type=str, + required=False, + help="""The package rid of the generated SDK. +""", +) +@click.option( + "--sdk_version", + type=str, + required=False, + help="""The version of the generated SDK. +""", +) +@click.pass_obj +def ontologies_action_op_apply_with_overrides( + client: FoundryClient, + ontology: str, + action: str, + overrides: str, + request: str, + branch: typing.Optional[str], + sdk_package_rid: typing.Optional[str], + sdk_version: typing.Optional[str], +): + """ + Same as regular apply action operation, but allows specifying overrides for UniqueIdentifier and + CurrentTime generated action parameters. + + """ + result = client.ontologies.Action.apply_with_overrides( + ontology=ontology, + action=action, + overrides=json.loads(overrides), + request=json.loads(request), + branch=branch, + sdk_package_rid=sdk_package_rid, + sdk_version=sdk_version, + ) + click.echo(repr(result)) + + +@cli.group("orchestration") +def orchestration(): + pass + + +@orchestration.group("schedule_version") +def orchestration_schedule_version(): + pass + + +@orchestration_schedule_version.command("get") +@click.argument("schedule_version_rid", type=str, required=True) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def orchestration_schedule_version_op_get( + client: FoundryClient, + schedule_version_rid: str, + preview: typing.Optional[bool], +): + """ + Get the ScheduleVersion with the specified rid. + """ + result = client.orchestration.ScheduleVersion.get( + schedule_version_rid=schedule_version_rid, + preview=preview, + ) + click.echo(repr(result)) + + +@orchestration_schedule_version.command("schedule") +@click.argument("schedule_version_rid", type=str, required=True) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def orchestration_schedule_version_op_schedule( + client: FoundryClient, + schedule_version_rid: str, + preview: typing.Optional[bool], +): + """ """ + result = client.orchestration.ScheduleVersion.schedule( + schedule_version_rid=schedule_version_rid, + preview=preview, + ) + click.echo(repr(result)) + + +@orchestration.group("schedule_run") +def orchestration_schedule_run(): + pass + + +@orchestration.group("schedule") +def orchestration_schedule(): + pass + + +@orchestration_schedule.command("create") +@click.option("--action", type=str, required=True, help="""""") +@click.option("--description", type=str, required=False, help="""""") +@click.option("--display_name", type=str, required=False, help="""""") +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.option("--scope_mode", type=str, required=False, help="""""") +@click.option( + "--trigger", + type=str, + required=False, + help="""The schedule trigger. If the requesting user does not have +permission to see the trigger, this will be empty. +""", +) +@click.pass_obj +def orchestration_schedule_op_create( + client: FoundryClient, + action: str, + description: typing.Optional[str], + display_name: typing.Optional[str], + preview: typing.Optional[bool], + scope_mode: typing.Optional[str], + trigger: typing.Optional[str], +): + """ + Creates a new Schedule. + """ + result = client.orchestration.Schedule.create( + action=json.loads(action), + description=description, + display_name=display_name, + preview=preview, + scope_mode=None if scope_mode is None else json.loads(scope_mode), + trigger=None if trigger is None else json.loads(trigger), + ) + click.echo(repr(result)) + + +@orchestration_schedule.command("delete") +@click.argument("schedule_rid", type=str, required=True) +@click.pass_obj +def orchestration_schedule_op_delete( + client: FoundryClient, + schedule_rid: str, +): + """ + Delete the Schedule with the specified rid. + """ + result = client.orchestration.Schedule.delete( + schedule_rid=schedule_rid, + ) + click.echo(repr(result)) + + +@orchestration_schedule.command("get") +@click.argument("schedule_rid", type=str, required=True) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def orchestration_schedule_op_get( + client: FoundryClient, + schedule_rid: str, + preview: typing.Optional[bool], +): + """ + Get the Schedule with the specified rid. + """ + result = client.orchestration.Schedule.get( + schedule_rid=schedule_rid, + preview=preview, + ) + click.echo(repr(result)) + + +@orchestration_schedule.command("get_affected_resources") +@click.argument("schedule_rid", type=str, required=True) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def orchestration_schedule_op_get_affected_resources( + client: FoundryClient, + schedule_rid: str, + preview: typing.Optional[bool], +): + """ """ + result = client.orchestration.Schedule.get_affected_resources( + schedule_rid=schedule_rid, + preview=preview, + ) + click.echo(repr(result)) + + +@orchestration_schedule.command("get_batch") +@click.argument("body", type=str, required=True) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def orchestration_schedule_op_get_batch( + client: FoundryClient, + body: str, + preview: typing.Optional[bool], +): + """ + Fetch multiple schedules in a single request. Schedules not found or inaccessible to the user will be + omitted from the response. + + + The maximum batch size for this endpoint is 1000. + """ + result = client.orchestration.Schedule.get_batch( + body=json.loads(body), + preview=preview, + ) + click.echo(repr(result)) + + +@orchestration_schedule.command("pause") +@click.argument("schedule_rid", type=str, required=True) +@click.pass_obj +def orchestration_schedule_op_pause( + client: FoundryClient, + schedule_rid: str, +): + """ """ + result = client.orchestration.Schedule.pause( + schedule_rid=schedule_rid, + ) + click.echo(repr(result)) + + +@orchestration_schedule.command("replace") +@click.argument("schedule_rid", type=str, required=True) +@click.option("--action", type=str, required=True, help="""""") +@click.option("--description", type=str, required=False, help="""""") +@click.option("--display_name", type=str, required=False, help="""""") +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.option("--scope_mode", type=str, required=False, help="""""") +@click.option( + "--trigger", + type=str, + required=False, + help="""The schedule trigger. If the requesting user does not have +permission to see the trigger, this will be empty. +""", +) +@click.pass_obj +def orchestration_schedule_op_replace( + client: FoundryClient, + schedule_rid: str, + action: str, + description: typing.Optional[str], + display_name: typing.Optional[str], + preview: typing.Optional[bool], + scope_mode: typing.Optional[str], + trigger: typing.Optional[str], +): + """ + Replace the Schedule with the specified rid. + """ + result = client.orchestration.Schedule.replace( + schedule_rid=schedule_rid, + action=json.loads(action), + description=description, + display_name=display_name, + preview=preview, + scope_mode=None if scope_mode is None else json.loads(scope_mode), + trigger=None if trigger is None else json.loads(trigger), + ) + click.echo(repr(result)) + + +@orchestration_schedule.command("run") +@click.argument("schedule_rid", type=str, required=True) +@click.pass_obj +def orchestration_schedule_op_run( + client: FoundryClient, + schedule_rid: str, +): + """ """ + result = client.orchestration.Schedule.run( + schedule_rid=schedule_rid, + ) + click.echo(repr(result)) + + +@orchestration_schedule.command("runs") +@click.argument("schedule_rid", type=str, required=True) +@click.option( + "--page_size", type=int, required=False, help="""The page size to use for the endpoint.""" +) +@click.option( + "--page_token", + type=str, + required=False, + help="""The page token indicates where to start paging. This should be omitted from the first page's request. +To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response +and use it to populate the `pageToken` field of the next request.""", +) +@click.pass_obj +def orchestration_schedule_op_runs( + client: FoundryClient, + schedule_rid: str, + page_size: typing.Optional[int], + page_token: typing.Optional[str], +): + """ + Get the most recent runs of a Schedule. If no page size is provided, a page size of 100 will be used. + + """ + result = client.orchestration.Schedule.runs( + schedule_rid=schedule_rid, + page_size=page_size, + page_token=page_token, + ) + click.echo(repr(result)) + + +@orchestration_schedule.command("unpause") +@click.argument("schedule_rid", type=str, required=True) +@click.pass_obj +def orchestration_schedule_op_unpause( + client: FoundryClient, + schedule_rid: str, +): + """ """ + result = client.orchestration.Schedule.unpause( + schedule_rid=schedule_rid, + ) + click.echo(repr(result)) + + +@orchestration.group("job") +def orchestration_job(): + pass + + +@orchestration_job.command("get") +@click.argument("job_rid", type=str, required=True) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def orchestration_job_op_get( + client: FoundryClient, + job_rid: str, + preview: typing.Optional[bool], +): + """ + Get the Job with the specified rid. + """ + result = client.orchestration.Job.get( + job_rid=job_rid, + preview=preview, + ) + click.echo(repr(result)) + + +@orchestration_job.command("get_batch") +@click.argument("body", type=str, required=True) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def orchestration_job_op_get_batch( + client: FoundryClient, + body: str, + preview: typing.Optional[bool], +): + """ + Execute multiple get requests on Job. + + The maximum batch size for this endpoint is 500. + """ + result = client.orchestration.Job.get_batch( + body=json.loads(body), + preview=preview, + ) + click.echo(repr(result)) + + +@orchestration.group("build") +def orchestration_build(): + pass + + +@orchestration_build.command("cancel") +@click.argument("build_rid", type=str, required=True) +@click.pass_obj +def orchestration_build_op_cancel( + client: FoundryClient, + build_rid: str, +): + """ + Request a cancellation for all unfinished jobs in a build. The build's status will not update immediately. This endpoint is asynchronous and a success response indicates that the cancellation request has been acknowledged and the build is expected to be canceled soon. If the build has already finished or finishes shortly after the request and before the cancellation, the build will not change. + + """ + result = client.orchestration.Build.cancel( + build_rid=build_rid, + ) + click.echo(repr(result)) + + +@orchestration_build.command("create") +@click.option("--fallback_branches", type=str, required=True, help="""""") +@click.option("--target", type=str, required=True, help="""The targets of the schedule.""") +@click.option("--abort_on_failure", type=bool, required=False, help="""""") +@click.option( + "--branch_name", type=str, required=False, help="""The target branch the build should run on.""" +) +@click.option("--force_build", type=bool, required=False, help="""""") +@click.option("--notifications_enabled", type=bool, required=False, help="""""") +@click.option("--retry_backoff_duration", type=str, required=False, help="""""") +@click.option( + "--retry_count", + type=int, + required=False, + help="""The number of retry attempts for failed jobs.""", +) +@click.pass_obj +def orchestration_build_op_create( + client: FoundryClient, + fallback_branches: str, + target: str, + abort_on_failure: typing.Optional[bool], + branch_name: typing.Optional[str], + force_build: typing.Optional[bool], + notifications_enabled: typing.Optional[bool], + retry_backoff_duration: typing.Optional[str], + retry_count: typing.Optional[int], +): + """ """ + result = client.orchestration.Build.create( + fallback_branches=json.loads(fallback_branches), + target=json.loads(target), + abort_on_failure=abort_on_failure, + branch_name=branch_name, + force_build=force_build, + notifications_enabled=notifications_enabled, + retry_backoff_duration=( + None if retry_backoff_duration is None else json.loads(retry_backoff_duration) + ), + retry_count=retry_count, + ) + click.echo(repr(result)) + + +@orchestration_build.command("get") +@click.argument("build_rid", type=str, required=True) +@click.pass_obj +def orchestration_build_op_get( + client: FoundryClient, + build_rid: str, +): + """ + Get the Build with the specified rid. + """ + result = client.orchestration.Build.get( + build_rid=build_rid, + ) + click.echo(repr(result)) + + +@orchestration_build.command("get_batch") +@click.argument("body", type=str, required=True) +@click.pass_obj +def orchestration_build_op_get_batch( + client: FoundryClient, + body: str, +): + """ + Execute multiple get requests on Build. + + The maximum batch size for this endpoint is 100. + """ + result = client.orchestration.Build.get_batch( + body=json.loads(body), + ) + click.echo(repr(result)) + + +@orchestration_build.command("jobs") +@click.argument("build_rid", type=str, required=True) +@click.option( + "--page_size", type=int, required=False, help="""The page size to use for the endpoint.""" +) +@click.option( + "--page_token", + type=str, + required=False, + help="""The page token indicates where to start paging. This should be omitted from the first page's request. +To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response +and use it to populate the `pageToken` field of the next request.""", +) +@click.pass_obj +def orchestration_build_op_jobs( + client: FoundryClient, + build_rid: str, + page_size: typing.Optional[int], + page_token: typing.Optional[str], +): + """ + Get the Jobs in the Build. + """ + result = client.orchestration.Build.jobs( + build_rid=build_rid, + page_size=page_size, + page_token=page_token, + ) + click.echo(repr(result)) + + +@orchestration_build.command("search") +@click.option("--where", type=str, required=True, help="""""") +@click.option("--order_by", type=str, required=False, help="""""") +@click.option( + "--page_size", + type=int, + required=False, + help="""The page size for the search request. If no value is provided, a default of `100` will be used. +""", +) +@click.option("--page_token", type=str, required=False, help="""""") +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def orchestration_build_op_search( + client: FoundryClient, + where: str, + order_by: typing.Optional[str], + page_size: typing.Optional[int], + page_token: typing.Optional[str], + preview: typing.Optional[bool], +): + """ + Search for Builds. + """ + result = client.orchestration.Build.search( + where=json.loads(where), + order_by=None if order_by is None else json.loads(order_by), + page_size=page_size, + page_token=page_token, + preview=preview, + ) + click.echo(repr(result)) + + +@cli.group("sql_queries") +def sql_queries(): + pass + + +@sql_queries.group("sql_query") +def sql_queries_sql_query(): + pass + + +@sql_queries_sql_query.command("cancel") +@click.argument("sql_query_id", type=str, required=True) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def sql_queries_sql_query_op_cancel( + client: FoundryClient, + sql_query_id: str, + preview: typing.Optional[bool], +): + """ + Cancels a query. If the query is no longer running this is effectively a no-op. + + """ + result = client.sql_queries.SqlQuery.cancel( + sql_query_id=sql_query_id, + preview=preview, + ) + click.echo(repr(result)) + + +@sql_queries_sql_query.command("execute") +@click.option( + "--query", + type=str, + required=True, + help="""The SQL query to execute. Queries should conform to the +[Spark SQL dialect](https://spark.apache.org/docs/latest/sql-ref.html). This supports SELECT +queries only. Datasets can be referenced in SQL queries by path or by RID. See the +[documentation](https://www.palantir.com/docs/foundry/analytics-connectivity/odbc-jdbc-drivers/#use-sql-to-query-foundry-datasets) +for more details. +""", +) +@click.option( + "--fallback_branch_ids", + type=str, + required=False, + help="""The list of branch ids to use as fallbacks if the query fails to execute on the primary branch. If a +is not explicitly provided in the SQL query, the resource will be queried on the first fallback branch +provided that exists. If no fallback branches are provided the default branch is used. This is +`master` for most enrollments. +""", +) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def sql_queries_sql_query_op_execute( + client: FoundryClient, + query: str, + fallback_branch_ids: typing.Optional[str], + preview: typing.Optional[bool], +): + """ + Executes a new query. Only the user that invoked the query can operate on the query. The size of query + results are limited by default to 1 million rows. Contact your Palantir representative to discuss limit + increases. + + """ + result = client.sql_queries.SqlQuery.execute( + query=query, + fallback_branch_ids=( + None if fallback_branch_ids is None else json.loads(fallback_branch_ids) + ), + preview=preview, + ) + click.echo(repr(result)) + + +@sql_queries_sql_query.command("get_results") +@click.argument("sql_query_id", type=str, required=True) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def sql_queries_sql_query_op_get_results( + client: FoundryClient, + sql_query_id: str, + preview: typing.Optional[bool], +): + """ + Gets the results of a query. The results of the query are returned in the + [Apache Arrow](https://arrow.apache.org/) format. + + This endpoint implements long polling and requests will time out after one minute. They can be safely + retried while the query is still running. + + """ + result = client.sql_queries.SqlQuery.get_results( + sql_query_id=sql_query_id, + preview=preview, + ) + click.echo(result) + + +@sql_queries_sql_query.command("get_status") +@click.argument("sql_query_id", type=str, required=True) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def sql_queries_sql_query_op_get_status( + client: FoundryClient, + sql_query_id: str, + preview: typing.Optional[bool], +): + """ + Gets the status of a query. + + """ + result = client.sql_queries.SqlQuery.get_status( + sql_query_id=sql_query_id, + preview=preview, + ) + click.echo(repr(result)) + + +@cli.group("streams") +def streams(): + pass + + +@streams.group("dataset") +def streams_dataset(): + pass + + +@streams_dataset.command("create") +@click.option("--name", type=str, required=True, help="""""") +@click.option("--parent_folder_rid", type=str, required=True, help="""""") +@click.option( + "--schema", + type=str, + required=True, + help="""The Foundry schema to apply to the new stream. +""", +) +@click.option( + "--branch_name", + type=str, + required=False, + help="""The branch to create the initial stream on. If not specified, the default branch will be used +('master' for most enrollments). +""", +) +@click.option( + "--compressed", + type=bool, + required=False, + help="""Whether or not compression is enabled for the stream. Defaults to false. +""", +) +@click.option( + "--partitions_count", + type=int, + required=False, + help="""The number of partitions for the Foundry stream. + +Generally, each partition can handle about 5 mb/s of data, so for higher volume streams, more partitions +are recommended. + +If not specified, 1 partition is used. + +This value cannot be changed later. +""", +) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.option( + "--stream_type", + type=click.Choice(["LOW_LATENCY", "HIGH_THROUGHPUT"]), + required=False, + help="""A conceptual representation of the expected shape of the data for a stream. HIGH_THROUGHPUT and +LOW_LATENCY are not compatible with each other. Defaults to LOW_LATENCY. +""", +) +@click.pass_obj +def streams_dataset_op_create( + client: FoundryClient, + name: str, + parent_folder_rid: str, + schema: str, + branch_name: typing.Optional[str], + compressed: typing.Optional[bool], + partitions_count: typing.Optional[int], + preview: typing.Optional[bool], + stream_type: typing.Optional[typing.Literal["LOW_LATENCY", "HIGH_THROUGHPUT"]], +): + """ + Creates a streaming dataset with a stream on the specified branch, or if no branch is specified, on the + default branch ('master' for most enrollments). For more information on streaming datasets, refer to the + [streams](https://palantir.com/docs/foundry/data-integration/streams/) user documentation. + + """ + result = client.streams.Dataset.create( + name=name, + parent_folder_rid=parent_folder_rid, + schema=json.loads(schema), + branch_name=branch_name, + compressed=compressed, + partitions_count=partitions_count, + preview=preview, + stream_type=stream_type, + ) + click.echo(repr(result)) + + +@streams_dataset.group("stream") +def streams_dataset_stream(): + pass + + +@streams_dataset_stream.command("create") +@click.argument("dataset_rid", type=str, required=True) +@click.option("--branch_name", type=str, required=True, help="""""") +@click.option("--schema", type=str, required=True, help="""The Foundry schema for this stream.""") +@click.option( + "--compressed", + type=bool, + required=False, + help="""Whether or not compression is enabled for the stream. Defaults to false. +""", +) +@click.option( + "--partitions_count", + type=int, + required=False, + help="""The number of partitions for the Foundry stream. Defaults to 1. + +Generally, each partition can handle about 5 mb/s of data, so for higher volume streams, more partitions +are recommended. +""", +) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.option( + "--stream_type", + type=click.Choice(["LOW_LATENCY", "HIGH_THROUGHPUT"]), + required=False, + help="""A conceptual representation of the expected shape of the data for a stream. HIGH_THROUGHPUT and +LOW_LATENCY are not compatible with each other. Defaults to LOW_LATENCY. +""", +) +@click.pass_obj +def streams_dataset_stream_op_create( + client: FoundryClient, + dataset_rid: str, + branch_name: str, + schema: str, + compressed: typing.Optional[bool], + partitions_count: typing.Optional[int], + preview: typing.Optional[bool], + stream_type: typing.Optional[typing.Literal["LOW_LATENCY", "HIGH_THROUGHPUT"]], +): + """ + Creates a new branch on the backing streaming dataset, and creates a new stream on that branch. + + """ + result = client.streams.Dataset.Stream.create( + dataset_rid=dataset_rid, + branch_name=branch_name, + schema=json.loads(schema), + compressed=compressed, + partitions_count=partitions_count, + preview=preview, + stream_type=stream_type, + ) + click.echo(repr(result)) + + +@streams_dataset_stream.command("get") +@click.argument("dataset_rid", type=str, required=True) +@click.argument("stream_branch_name", type=str, required=True) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def streams_dataset_stream_op_get( + client: FoundryClient, + dataset_rid: str, + stream_branch_name: str, + preview: typing.Optional[bool], +): + """ + Get a stream by its branch name. If the branch does not exist, there is no stream on that branch, or the + user does not have permission to access the stream, a 404 error will be returned. + + """ + result = client.streams.Dataset.Stream.get( + dataset_rid=dataset_rid, + stream_branch_name=stream_branch_name, + preview=preview, + ) + click.echo(repr(result)) + + +@streams_dataset_stream.command("publish_binary_record") +@click.argument("dataset_rid", type=str, required=True) +@click.argument("stream_branch_name", type=str, required=True) +@click.argument("body", type=click.File("rb"), required=True) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.option( + "--view_rid", + type=str, + required=False, + help="""If provided, this operation will only write to the stream corresponding to the specified view rid. If +not provided, this operation will write to the latest stream on the branch. + +Providing this value is an advanced configuration, to be used when additional control over the +underlying streaming data structures is needed. +""", +) +@click.pass_obj +def streams_dataset_stream_op_publish_binary_record( + client: FoundryClient, + dataset_rid: str, + stream_branch_name: str, + body: io.BufferedReader, + preview: typing.Optional[bool], + view_rid: typing.Optional[str], +): + """ + Publish a single binary record to the stream. The stream's schema must be a single binary field. + + """ + result = client.streams.Dataset.Stream.publish_binary_record( + dataset_rid=dataset_rid, + stream_branch_name=stream_branch_name, + body=body.read(), + preview=preview, + view_rid=view_rid, + ) + click.echo(repr(result)) + + +@streams_dataset_stream.command("publish_record") +@click.argument("dataset_rid", type=str, required=True) +@click.argument("stream_branch_name", type=str, required=True) +@click.option( + "--record", + type=str, + required=True, + help="""The record to publish to the stream +""", +) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.option( + "--view_rid", + type=str, + required=False, + help="""If provided, this endpoint will only write to the stream corresponding to the specified view rid. If +not provided, this endpoint will write the latest stream on the branch. + +Providing this value is an advanced configuration, to be used when additional control over the +underlying streaming data structures is needed. +""", +) +@click.pass_obj +def streams_dataset_stream_op_publish_record( + client: FoundryClient, + dataset_rid: str, + stream_branch_name: str, + record: str, + preview: typing.Optional[bool], + view_rid: typing.Optional[str], +): + """ + Publish a single record to the stream. The record will be validated against the stream's schema, and + rejected if it is invalid. + + """ + result = client.streams.Dataset.Stream.publish_record( + dataset_rid=dataset_rid, + stream_branch_name=stream_branch_name, + record=json.loads(record), + preview=preview, + view_rid=view_rid, + ) + click.echo(repr(result)) + + +@streams_dataset_stream.command("publish_records") +@click.argument("dataset_rid", type=str, required=True) +@click.argument("stream_branch_name", type=str, required=True) +@click.option( + "--records", + type=str, + required=True, + help="""The records to publish to the stream +""", +) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.option( + "--view_rid", + type=str, + required=False, + help="""If provided, this endpoint will only write to the stream corresponding to the specified view rid. If +not provided, this endpoint will write to the latest stream on the branch. + +Providing this value is an advanced configuration, to be used when additional control over the +underlying streaming data structures is needed. +""", +) +@click.pass_obj +def streams_dataset_stream_op_publish_records( + client: FoundryClient, + dataset_rid: str, + stream_branch_name: str, + records: str, + preview: typing.Optional[bool], + view_rid: typing.Optional[str], +): + """ + Publish a batch of records to the stream. The records will be validated against the stream's schema, and + the batch will be rejected if one or more of the records are invalid. + + """ + result = client.streams.Dataset.Stream.publish_records( + dataset_rid=dataset_rid, + stream_branch_name=stream_branch_name, + records=json.loads(records), + preview=preview, + view_rid=view_rid, + ) + click.echo(repr(result)) + + +@streams_dataset_stream.command("reset") +@click.argument("dataset_rid", type=str, required=True) +@click.argument("stream_branch_name", type=str, required=True) +@click.option( + "--compressed", + type=bool, + required=False, + help="""Whether or not compression is enabled for the stream. + +If omitted, the compression setting of the existing stream on the branch will be used. +""", +) +@click.option( + "--partitions_count", + type=int, + required=False, + help="""The number of partitions for the Foundry stream. +Generally, each partition can handle about 5 mb/s of data, so for higher volume streams, more partitions +are recommended. + +If omitted, the partitions count of the existing stream on the branch will be used. +""", +) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.option( + "--schema", + type=str, + required=False, + help="""The Foundry schema to apply to the new stream. + +If omitted, the schema of the existing stream on the branch will be used. +""", +) +@click.option( + "--stream_type", + type=click.Choice(["LOW_LATENCY", "HIGH_THROUGHPUT"]), + required=False, + help="""A conceptual representation of the expected shape of the data for a stream. HIGH_THROUGHPUT and +LOW_LATENCY are not compatible with each other. Defaults to LOW_LATENCY. + +If omitted, the stream type of the existing stream on the branch will be used. +""", +) +@click.pass_obj +def streams_dataset_stream_op_reset( + client: FoundryClient, + dataset_rid: str, + stream_branch_name: str, + compressed: typing.Optional[bool], + partitions_count: typing.Optional[int], + preview: typing.Optional[bool], + schema: typing.Optional[str], + stream_type: typing.Optional[typing.Literal["LOW_LATENCY", "HIGH_THROUGHPUT"]], +): + """ + Reset the stream on the given dataset branch, clearing the existing records and allowing new configurations + to be applied. + + To change the stream settings without clearing the records, update the stream settings in-platform. + + This will create a new stream view (as seen by the change of the `viewRid` on the branch), + which will be the new stream view that will be written to for the branch. + + """ + result = client.streams.Dataset.Stream.reset( + dataset_rid=dataset_rid, + stream_branch_name=stream_branch_name, + compressed=compressed, + partitions_count=partitions_count, + preview=preview, + schema=None if schema is None else json.loads(schema), + stream_type=stream_type, + ) + click.echo(repr(result)) + + +@cli.group("third_party_applications") +def third_party_applications(): + pass + + +@third_party_applications.group("third_party_application") +def third_party_applications_third_party_application(): + pass + + +@third_party_applications_third_party_application.command("get") +@click.argument("third_party_application_rid", type=str, required=True) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def third_party_applications_third_party_application_op_get( + client: FoundryClient, + third_party_application_rid: str, + preview: typing.Optional[bool], +): + """ + Get the ThirdPartyApplication with the specified rid. + """ + result = client.third_party_applications.ThirdPartyApplication.get( + third_party_application_rid=third_party_application_rid, + preview=preview, + ) + click.echo(repr(result)) + + +@third_party_applications_third_party_application.group("website") +def third_party_applications_third_party_application_website(): + pass + + +@third_party_applications_third_party_application_website.command("deploy") +@click.argument("third_party_application_rid", type=str, required=True) +@click.option("--version", type=str, required=True, help="""""") +@click.pass_obj +def third_party_applications_third_party_application_website_op_deploy( + client: FoundryClient, + third_party_application_rid: str, + version: str, +): + """ + Deploy a version of the Website. + """ + result = client.third_party_applications.ThirdPartyApplication.Website.deploy( + third_party_application_rid=third_party_application_rid, + version=version, + ) + click.echo(repr(result)) + + +@third_party_applications_third_party_application_website.command("get") +@click.argument("third_party_application_rid", type=str, required=True) +@click.pass_obj +def third_party_applications_third_party_application_website_op_get( + client: FoundryClient, + third_party_application_rid: str, +): + """ + Get the Website. + """ + result = client.third_party_applications.ThirdPartyApplication.Website.get( + third_party_application_rid=third_party_application_rid, + ) + click.echo(repr(result)) + + +@third_party_applications_third_party_application_website.command("undeploy") +@click.argument("third_party_application_rid", type=str, required=True) +@click.pass_obj +def third_party_applications_third_party_application_website_op_undeploy( + client: FoundryClient, + third_party_application_rid: str, +): + """ + Remove the currently deployed version of the Website. + """ + result = client.third_party_applications.ThirdPartyApplication.Website.undeploy( + third_party_application_rid=third_party_application_rid, + ) + click.echo(repr(result)) + + +@third_party_applications_third_party_application_website.group("version") +def third_party_applications_third_party_application_website_version(): + pass + + +@third_party_applications_third_party_application_website_version.command("delete") +@click.argument("third_party_application_rid", type=str, required=True) +@click.argument("version_version", type=str, required=True) +@click.pass_obj +def third_party_applications_third_party_application_website_version_op_delete( + client: FoundryClient, + third_party_application_rid: str, + version_version: str, +): + """ + Delete the Version with the specified version. + """ + result = client.third_party_applications.ThirdPartyApplication.Website.Version.delete( + third_party_application_rid=third_party_application_rid, + version_version=version_version, + ) + click.echo(repr(result)) + + +@third_party_applications_third_party_application_website_version.command("get") +@click.argument("third_party_application_rid", type=str, required=True) +@click.argument("version_version", type=str, required=True) +@click.pass_obj +def third_party_applications_third_party_application_website_version_op_get( + client: FoundryClient, + third_party_application_rid: str, + version_version: str, +): + """ + Get the Version with the specified version. + """ + result = client.third_party_applications.ThirdPartyApplication.Website.Version.get( + third_party_application_rid=third_party_application_rid, + version_version=version_version, + ) + click.echo(repr(result)) + + +@third_party_applications_third_party_application_website_version.command("list") +@click.argument("third_party_application_rid", type=str, required=True) +@click.option( + "--page_size", type=int, required=False, help="""The page size to use for the endpoint.""" +) +@click.option( + "--page_token", + type=str, + required=False, + help="""The page token indicates where to start paging. This should be omitted from the first page's request. +To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response +and use it to populate the `pageToken` field of the next request.""", +) +@click.pass_obj +def third_party_applications_third_party_application_website_version_op_list( + client: FoundryClient, + third_party_application_rid: str, + page_size: typing.Optional[int], + page_token: typing.Optional[str], +): + """ + Lists all Versions. + + This is a paged endpoint. Each page may be smaller or larger than the requested page size. However, it is guaranteed that if there are more results available, the `nextPageToken` field will be populated. To get the next page, make the same request again, but set the value of the `pageToken` query parameter to be value of the `nextPageToken` value of the previous response. If there is no `nextPageToken` field in the response, you are on the last page. + """ + result = client.third_party_applications.ThirdPartyApplication.Website.Version.list( + third_party_application_rid=third_party_application_rid, + page_size=page_size, + page_token=page_token, + ) + click.echo(repr(result)) + + +@third_party_applications_third_party_application_website_version.command("upload") +@click.argument("third_party_application_rid", type=str, required=True) +@click.argument("body", type=click.File("rb"), required=True) +@click.option("--version", type=str, required=True, help="""""") +@click.pass_obj +def third_party_applications_third_party_application_website_version_op_upload( + client: FoundryClient, + third_party_application_rid: str, + body: io.BufferedReader, + version: str, +): + """ + Upload a new version of the Website. + """ + result = client.third_party_applications.ThirdPartyApplication.Website.Version.upload( + third_party_application_rid=third_party_application_rid, + body=body.read(), + version=version, + ) + click.echo(repr(result)) + + +@third_party_applications_third_party_application_website_version.command("upload_snapshot") +@click.argument("third_party_application_rid", type=str, required=True) +@click.argument("body", type=click.File("rb"), required=True) +@click.option("--version", type=str, required=True, help="""""") +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.option( + "--snapshot_identifier", + type=str, + required=False, + help="""The identifier of the snapshot. If the identifier follows the format +`foundry.v1@@@`, PR preview for such identifier will be +accessible from foundry code repositories. +""", +) +@click.pass_obj +def third_party_applications_third_party_application_website_version_op_upload_snapshot( + client: FoundryClient, + third_party_application_rid: str, + body: io.BufferedReader, + version: str, + preview: typing.Optional[bool], + snapshot_identifier: typing.Optional[str], +): + """ + Upload a snapshot version of the Website. Snapshot versions are automatically deleted after two days. + + """ + result = client.third_party_applications.ThirdPartyApplication.Website.Version.upload_snapshot( + third_party_application_rid=third_party_application_rid, + body=body.read(), + version=version, + preview=preview, + snapshot_identifier=snapshot_identifier, + ) + click.echo(repr(result)) + + +@cli.group("widgets") +def widgets(): + pass + + +@widgets.group("widget_set") +def widgets_widget_set(): + pass + + +@widgets_widget_set.command("get") +@click.argument("widget_set_rid", type=str, required=True) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def widgets_widget_set_op_get( + client: FoundryClient, + widget_set_rid: str, + preview: typing.Optional[bool], +): + """ + Get the WidgetSet with the specified rid. + """ + result = client.widgets.WidgetSet.get( + widget_set_rid=widget_set_rid, + preview=preview, + ) + click.echo(repr(result)) + + +@widgets_widget_set.group("release") +def widgets_widget_set_release(): + pass + + +@widgets_widget_set_release.command("delete") +@click.argument("widget_set_rid", type=str, required=True) +@click.argument("release_version", type=str, required=True) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def widgets_widget_set_release_op_delete( + client: FoundryClient, + widget_set_rid: str, + release_version: str, + preview: typing.Optional[bool], +): + """ + Delete the Release with the specified version. + """ + result = client.widgets.WidgetSet.Release.delete( + widget_set_rid=widget_set_rid, + release_version=release_version, + preview=preview, + ) + click.echo(repr(result)) + + +@widgets_widget_set_release.command("get") +@click.argument("widget_set_rid", type=str, required=True) +@click.argument("release_version", type=str, required=True) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def widgets_widget_set_release_op_get( + client: FoundryClient, + widget_set_rid: str, + release_version: str, + preview: typing.Optional[bool], +): + """ + Get the Release with the specified version. + """ + result = client.widgets.WidgetSet.Release.get( + widget_set_rid=widget_set_rid, + release_version=release_version, + preview=preview, + ) + click.echo(repr(result)) + + +@widgets_widget_set_release.command("list") +@click.argument("widget_set_rid", type=str, required=True) +@click.option( + "--page_size", type=int, required=False, help="""The page size to use for the endpoint.""" +) +@click.option( + "--page_token", + type=str, + required=False, + help="""The page token indicates where to start paging. This should be omitted from the first page's request. +To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response +and use it to populate the `pageToken` field of the next request.""", +) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def widgets_widget_set_release_op_list( + client: FoundryClient, + widget_set_rid: str, + page_size: typing.Optional[int], + page_token: typing.Optional[str], + preview: typing.Optional[bool], +): + """ + Lists all Releases. + + This is a paged endpoint. Each page may be smaller or larger than the requested page size. However, it is guaranteed that if there are more results available, the `nextPageToken` field will be populated. To get the next page, make the same request again, but set the value of the `pageToken` query parameter to be value of the `nextPageToken` value of the previous response. If there is no `nextPageToken` field in the response, you are on the last page. + """ + result = client.widgets.WidgetSet.Release.list( + widget_set_rid=widget_set_rid, + page_size=page_size, + page_token=page_token, + preview=preview, + ) + click.echo(repr(result)) + + +@widgets.group("repository") +def widgets_repository(): + pass + + +@widgets_repository.command("get") +@click.argument("repository_rid", type=str, required=True) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def widgets_repository_op_get( + client: FoundryClient, + repository_rid: str, + preview: typing.Optional[bool], +): + """ + Get the Repository with the specified rid. + """ + result = client.widgets.Repository.get( + repository_rid=repository_rid, + preview=preview, + ) + click.echo(repr(result)) + + +@widgets_repository.command("publish") +@click.argument("repository_rid", type=str, required=True) +@click.argument("body", type=click.File("rb"), required=True) +@click.option("--repository_version", type=str, required=True, help="""""") +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def widgets_repository_op_publish( + client: FoundryClient, + repository_rid: str, + body: io.BufferedReader, + repository_version: str, + preview: typing.Optional[bool], +): + """ + Publish a new release of a widget set. + """ + result = client.widgets.Repository.publish( + repository_rid=repository_rid, + body=body.read(), + repository_version=repository_version, + preview=preview, + ) + click.echo(repr(result)) + + +@widgets.group("dev_mode_settings") +def widgets_dev_mode_settings(): + pass + + +@widgets_dev_mode_settings.command("disable") +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def widgets_dev_mode_settings_op_disable( + client: FoundryClient, + preview: typing.Optional[bool], +): + """ + Disable dev mode for the user associated with the provided token. + """ + result = client.widgets.DevModeSettings.disable( + preview=preview, + ) + click.echo(repr(result)) + + +@widgets_dev_mode_settings.command("enable") +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def widgets_dev_mode_settings_op_enable( + client: FoundryClient, + preview: typing.Optional[bool], +): + """ + Enable dev mode for the user associated with the provided token. + """ + result = client.widgets.DevModeSettings.enable( + preview=preview, + ) + click.echo(repr(result)) + + +@widgets_dev_mode_settings.command("get") +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def widgets_dev_mode_settings_op_get( + client: FoundryClient, + preview: typing.Optional[bool], +): + """ + Get the dev mode settings for the user associated with the provided token. + """ + result = client.widgets.DevModeSettings.get( + preview=preview, + ) + click.echo(repr(result)) + + +@widgets_dev_mode_settings.command("pause") +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def widgets_dev_mode_settings_op_pause( + client: FoundryClient, + preview: typing.Optional[bool], +): + """ + Pause dev mode for the user associated with the provided token. + """ + result = client.widgets.DevModeSettings.pause( + preview=preview, + ) + click.echo(repr(result)) + + +@widgets_dev_mode_settings.command("set_widget_set") +@click.option("--settings", type=str, required=True, help="""""") +@click.option("--widget_set_rid", type=str, required=True, help="""""") +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def widgets_dev_mode_settings_op_set_widget_set( + client: FoundryClient, + settings: str, + widget_set_rid: str, + preview: typing.Optional[bool], +): + """ + Set the dev mode settings for the given widget set for the user associated with the provided token. + """ + result = client.widgets.DevModeSettings.set_widget_set( + settings=json.loads(settings), + widget_set_rid=widget_set_rid, + preview=preview, + ) + click.echo(repr(result)) + + +@widgets_dev_mode_settings.command("set_widget_set_by_id") +@click.option("--settings", type=str, required=True, help="""""") +@click.option("--widget_set_rid", type=str, required=True, help="""""") +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def widgets_dev_mode_settings_op_set_widget_set_by_id( + client: FoundryClient, + settings: str, + widget_set_rid: str, + preview: typing.Optional[bool], +): + """ + Set the dev mode settings for the given widget set for the user associated with the + provided token. Uses widget IDs to identify widgets within the set. + + """ + result = client.widgets.DevModeSettings.set_widget_set_by_id( + settings=json.loads(settings), + widget_set_rid=widget_set_rid, + preview=preview, + ) + click.echo(repr(result)) + + +if __name__ == "__main__": + cli() diff --git a/foundry_sdk/v2/client.py b/foundry_sdk/v2/client.py new file mode 100644 index 000000000..6ee5bfefd --- /dev/null +++ b/foundry_sdk/v2/client.py @@ -0,0 +1,154 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing + +from foundry_sdk import _core as core +from foundry_sdk._core.client_init_helpers import ( + get_hostname_from_context_or_environment_vars, +) # NOQA +from foundry_sdk._core.client_init_helpers import ( + get_user_token_auth_from_context_or_environment_vars, +) # NOQA + + +class FoundryClient: + """ + The Foundry V2 API client. + + :param auth: Required. Your auth configuration. + :param hostname: Required. Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: typing.Optional[core.Auth] = None, + hostname: typing.Optional[str] = None, + config: typing.Optional[core.Config] = None, + ): + if auth is None: + auth = get_user_token_auth_from_context_or_environment_vars() + if hostname is None: + hostname = get_hostname_from_context_or_environment_vars() + + from foundry_sdk.v2.admin._client import AdminClient + from foundry_sdk.v2.aip_agents._client import AipAgentsClient + from foundry_sdk.v2.audit._client import AuditClient + from foundry_sdk.v2.connectivity._client import ConnectivityClient + from foundry_sdk.v2.data_health._client import DataHealthClient + from foundry_sdk.v2.datasets._client import DatasetsClient + from foundry_sdk.v2.filesystem._client import FilesystemClient + from foundry_sdk.v2.functions._client import FunctionsClient + from foundry_sdk.v2.language_models._client import LanguageModelsClient + from foundry_sdk.v2.media_sets._client import MediaSetsClient + from foundry_sdk.v2.models._client import ModelsClient + from foundry_sdk.v2.ontologies._client import OntologiesClient + from foundry_sdk.v2.orchestration._client import OrchestrationClient + from foundry_sdk.v2.sql_queries._client import SqlQueriesClient + from foundry_sdk.v2.streams._client import StreamsClient + from foundry_sdk.v2.third_party_applications._client import ( + ThirdPartyApplicationsClient, + ) # NOQA + from foundry_sdk.v2.widgets._client import WidgetsClient + + self.admin = AdminClient(auth=auth, hostname=hostname, config=config) + self.aip_agents = AipAgentsClient(auth=auth, hostname=hostname, config=config) + self.audit = AuditClient(auth=auth, hostname=hostname, config=config) + self.connectivity = ConnectivityClient(auth=auth, hostname=hostname, config=config) + self.data_health = DataHealthClient(auth=auth, hostname=hostname, config=config) + self.datasets = DatasetsClient(auth=auth, hostname=hostname, config=config) + self.filesystem = FilesystemClient(auth=auth, hostname=hostname, config=config) + self.functions = FunctionsClient(auth=auth, hostname=hostname, config=config) + self.language_models = LanguageModelsClient(auth=auth, hostname=hostname, config=config) + self.media_sets = MediaSetsClient(auth=auth, hostname=hostname, config=config) + self.models = ModelsClient(auth=auth, hostname=hostname, config=config) + self.ontologies = OntologiesClient(auth=auth, hostname=hostname, config=config) + self.orchestration = OrchestrationClient(auth=auth, hostname=hostname, config=config) + self.sql_queries = SqlQueriesClient(auth=auth, hostname=hostname, config=config) + self.streams = StreamsClient(auth=auth, hostname=hostname, config=config) + self.third_party_applications = ThirdPartyApplicationsClient( + auth=auth, hostname=hostname, config=config + ) + self.widgets = WidgetsClient(auth=auth, hostname=hostname, config=config) + + +class AsyncFoundryClient: + """ + The Async Foundry V2 API client. + + :param auth: Required. Your auth configuration. + :param hostname: Required. Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: typing.Optional[core.Auth] = None, + hostname: typing.Optional[str] = None, + config: typing.Optional[core.Config] = None, + preview: bool = False, + ): + if not preview: + raise ValueError( + "The AsyncFoundryClient client is in beta. " + "Please set the preview parameter to True to use it." + ) + if auth is None: + auth = get_user_token_auth_from_context_or_environment_vars() + if hostname is None: + hostname = get_hostname_from_context_or_environment_vars() + + from foundry_sdk.v2.admin._client import AsyncAdminClient + from foundry_sdk.v2.aip_agents._client import AsyncAipAgentsClient + from foundry_sdk.v2.audit._client import AsyncAuditClient + from foundry_sdk.v2.connectivity._client import AsyncConnectivityClient + from foundry_sdk.v2.data_health._client import AsyncDataHealthClient + from foundry_sdk.v2.datasets._client import AsyncDatasetsClient + from foundry_sdk.v2.filesystem._client import AsyncFilesystemClient + from foundry_sdk.v2.functions._client import AsyncFunctionsClient + from foundry_sdk.v2.language_models._client import AsyncLanguageModelsClient + from foundry_sdk.v2.media_sets._client import AsyncMediaSetsClient + from foundry_sdk.v2.models._client import AsyncModelsClient + from foundry_sdk.v2.ontologies._client import AsyncOntologiesClient + from foundry_sdk.v2.orchestration._client import AsyncOrchestrationClient + from foundry_sdk.v2.sql_queries._client import AsyncSqlQueriesClient + from foundry_sdk.v2.streams._client import AsyncStreamsClient + from foundry_sdk.v2.third_party_applications._client import ( + AsyncThirdPartyApplicationsClient, + ) # NOQA + from foundry_sdk.v2.widgets._client import AsyncWidgetsClient + + self.admin = AsyncAdminClient(auth=auth, hostname=hostname, config=config) + self.aip_agents = AsyncAipAgentsClient(auth=auth, hostname=hostname, config=config) + self.audit = AsyncAuditClient(auth=auth, hostname=hostname, config=config) + self.connectivity = AsyncConnectivityClient(auth=auth, hostname=hostname, config=config) + self.data_health = AsyncDataHealthClient(auth=auth, hostname=hostname, config=config) + self.datasets = AsyncDatasetsClient(auth=auth, hostname=hostname, config=config) + self.filesystem = AsyncFilesystemClient(auth=auth, hostname=hostname, config=config) + self.functions = AsyncFunctionsClient(auth=auth, hostname=hostname, config=config) + self.language_models = AsyncLanguageModelsClient( + auth=auth, hostname=hostname, config=config + ) + self.media_sets = AsyncMediaSetsClient(auth=auth, hostname=hostname, config=config) + self.models = AsyncModelsClient(auth=auth, hostname=hostname, config=config) + self.ontologies = AsyncOntologiesClient(auth=auth, hostname=hostname, config=config) + self.orchestration = AsyncOrchestrationClient(auth=auth, hostname=hostname, config=config) + self.sql_queries = AsyncSqlQueriesClient(auth=auth, hostname=hostname, config=config) + self.streams = AsyncStreamsClient(auth=auth, hostname=hostname, config=config) + self.third_party_applications = AsyncThirdPartyApplicationsClient( + auth=auth, hostname=hostname, config=config + ) + self.widgets = AsyncWidgetsClient(auth=auth, hostname=hostname, config=config) diff --git a/foundry_sdk/v2/connectivity/__init__.py b/foundry_sdk/v2/connectivity/__init__.py new file mode 100644 index 000000000..8ad403fad --- /dev/null +++ b/foundry_sdk/v2/connectivity/__init__.py @@ -0,0 +1,22 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +from foundry_sdk.v2.connectivity._client import AsyncConnectivityClient +from foundry_sdk.v2.connectivity._client import ConnectivityClient + +__all__ = [ + "ConnectivityClient", + "AsyncConnectivityClient", +] diff --git a/foundry_sdk/v2/connectivity/_client.py b/foundry_sdk/v2/connectivity/_client.py new file mode 100644 index 000000000..028ab1759 --- /dev/null +++ b/foundry_sdk/v2/connectivity/_client.py @@ -0,0 +1,69 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing +from functools import cached_property + +from foundry_sdk import _core as core + + +class ConnectivityClient: + """ + The API client for the Connectivity Namespace. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + + @cached_property + def Connection(self): + from foundry_sdk.v2.connectivity.connection import ConnectionClient + + return ConnectionClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + +class AsyncConnectivityClient: + """ + The Async API client for the Connectivity Namespace. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + from foundry_sdk.v2.connectivity.connection import AsyncConnectionClient + + self.Connection = AsyncConnectionClient(auth=auth, hostname=hostname, config=config) diff --git a/foundry_sdk/v2/connectivity/connection.py b/foundry_sdk/v2/connectivity/connection.py new file mode 100644 index 000000000..695b1fa38 --- /dev/null +++ b/foundry_sdk/v2/connectivity/connection.py @@ -0,0 +1,1075 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing +from functools import cached_property + +import annotated_types +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v2.connectivity import errors as connectivity_errors +from foundry_sdk.v2.connectivity import models as connectivity_models +from foundry_sdk.v2.core import models as core_models +from foundry_sdk.v2.filesystem import errors as filesystem_errors +from foundry_sdk.v2.filesystem import models as filesystem_models + + +class ConnectionClient: + """ + The API client for the Connection Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _ConnectionClientStreaming(self) + self.with_raw_response = _ConnectionClientRaw(self) + + @cached_property + def FileImport(self): + from foundry_sdk.v2.connectivity.file_import import FileImportClient + + return FileImportClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @cached_property + def TableImport(self): + from foundry_sdk.v2.connectivity.table_import import TableImportClient + + return TableImportClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @cached_property + def VirtualTable(self): + from foundry_sdk.v2.connectivity.virtual_table import VirtualTableClient + + return VirtualTableClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def create( + self, + *, + configuration: connectivity_models.CreateConnectionRequestConnectionConfiguration, + display_name: connectivity_models.ConnectionDisplayName, + parent_folder_rid: filesystem_models.FolderRid, + worker: connectivity_models.CreateConnectionRequestConnectionWorker, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> connectivity_models.Connection: + """ + Creates a new Connection with a [direct connection](https://palantir.com/docs/foundry/data-connection/core-concepts/#direct-connection) runtime. + + Any secrets specified in the request body are transmitted over the network encrypted using TLS. Once the + secrets reach Foundry's servers, they will be temporarily decrypted and remain in plaintext in memory to + be processed as needed. They will stay in plaintext in memory until the garbage collection process cleans + up the memory. The secrets are always stored encrypted on our servers. + By using this endpoint, you acknowledge and accept any potential risks associated with the temporary + in-memory handling of secrets. If you do not want your secrets to be temporarily decrypted, you should + use the Foundry UI instead. + + :param configuration: + :type configuration: CreateConnectionRequestConnectionConfiguration + :param display_name: The display name of the Connection. The display name must not be blank. + :type display_name: ConnectionDisplayName + :param parent_folder_rid: + :type parent_folder_rid: FolderRid + :param worker: + :type worker: CreateConnectionRequestConnectionWorker + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: connectivity_models.Connection + + :raises ConnectionNotFound: The given Connection could not be found. + :raises ConnectionTypeNotSupported: The specified connection is not yet supported in the Platform API. + :raises CreateConnectionPermissionDenied: Could not create the Connection. + :raises FolderNotFound: The given Folder could not be found. + :raises ParentFolderNotFoundForConnection: The parent folder for the specified connection could not be found. + :raises PropertyCannotBeBlank: The specified property cannot be blank. + :raises UnknownWorkerCannotBeUsedForCreatingOrUpdatingConnections: The UnknownWorker cannot be used for creating or updating connections. Please use the Foundry worker instead. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/connectivity/connections", + query_params={ + "preview": preview, + }, + path_params={}, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=connectivity_models.CreateConnectionRequest( + parent_folder_rid=parent_folder_rid, + configuration=configuration, + display_name=display_name, + worker=worker, + ), + response_type=connectivity_models.Connection, + request_timeout=request_timeout, + throwable_errors={ + "ConnectionNotFound": connectivity_errors.ConnectionNotFound, + "ConnectionTypeNotSupported": connectivity_errors.ConnectionTypeNotSupported, + "CreateConnectionPermissionDenied": connectivity_errors.CreateConnectionPermissionDenied, + "FolderNotFound": filesystem_errors.FolderNotFound, + "ParentFolderNotFoundForConnection": connectivity_errors.ParentFolderNotFoundForConnection, + "PropertyCannotBeBlank": connectivity_errors.PropertyCannotBeBlank, + "UnknownWorkerCannotBeUsedForCreatingOrUpdatingConnections": connectivity_errors.UnknownWorkerCannotBeUsedForCreatingOrUpdatingConnections, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + connection_rid: connectivity_models.ConnectionRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> connectivity_models.Connection: + """ + Get the Connection with the specified rid. + :param connection_rid: + :type connection_rid: ConnectionRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: connectivity_models.Connection + + :raises ConnectionNotFound: The given Connection could not be found. + :raises ConnectionTypeNotSupported: The specified connection is not yet supported in the Platform API. + :raises ParentFolderNotFoundForConnection: The parent folder for the specified connection could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/connectivity/connections/{connectionRid}", + query_params={ + "preview": preview, + }, + path_params={ + "connectionRid": connection_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=connectivity_models.Connection, + request_timeout=request_timeout, + throwable_errors={ + "ConnectionNotFound": connectivity_errors.ConnectionNotFound, + "ConnectionTypeNotSupported": connectivity_errors.ConnectionTypeNotSupported, + "ParentFolderNotFoundForConnection": connectivity_errors.ParentFolderNotFoundForConnection, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get_configuration( + self, + connection_rid: connectivity_models.ConnectionRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> connectivity_models.ConnectionConfiguration: + """ + Retrieves the ConnectionConfiguration of the [Connection](https://palantir.com/docs/foundry/data-connection/set-up-source/) itself. + This operation is intended for use when other Connection data is not required, providing a lighter-weight alternative to `getConnection` operation. + + :param connection_rid: + :type connection_rid: ConnectionRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: connectivity_models.ConnectionConfiguration + + :raises ConnectionNotFound: The given Connection could not be found. + :raises ConnectionTypeNotSupported: The specified connection is not yet supported in the Platform API. + :raises GetConfigurationPermissionDenied: Could not getConfiguration the Connection. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/connectivity/connections/{connectionRid}/getConfiguration", + query_params={ + "preview": preview, + }, + path_params={ + "connectionRid": connection_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=connectivity_models.ConnectionConfiguration, + request_timeout=request_timeout, + throwable_errors={ + "ConnectionNotFound": connectivity_errors.ConnectionNotFound, + "ConnectionTypeNotSupported": connectivity_errors.ConnectionTypeNotSupported, + "GetConfigurationPermissionDenied": connectivity_errors.GetConfigurationPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get_configuration_batch( + self, + body: typing_extensions.Annotated[ + typing.List[connectivity_models.GetConfigurationConnectionsBatchRequestElement], + annotated_types.Len(min_length=1, max_length=200), + ], + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> connectivity_models.GetConfigurationConnectionsBatchResponse: + """ + Returns a map of Connection RIDs to their corresponding configurations. + Connections are filtered from the response if they don't exist or the requesting token lacks the required permissions. + + + The maximum batch size for this endpoint is 200. + :param body: Body of the request + :type body: List[GetConfigurationConnectionsBatchRequestElement] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: connectivity_models.GetConfigurationConnectionsBatchResponse + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/connectivity/connections/getConfigurationBatch", + query_params={ + "preview": preview, + }, + path_params={}, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=body, + response_type=connectivity_models.GetConfigurationConnectionsBatchResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def update_export_settings( + self, + connection_rid: connectivity_models.ConnectionRid, + *, + export_settings: connectivity_models.ConnectionExportSettings, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> None: + """ + Updates the [export settings on the Connection.](https://palantir.com/docs/foundry/data-connection/export-overview/#enable-exports-for-source) + Only users with Information Security Officer role can modify the export settings. + + :param connection_rid: + :type connection_rid: ConnectionRid + :param export_settings: + :type export_settings: ConnectionExportSettings + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: None + + :raises ConnectionNotFound: The given Connection could not be found. + :raises UpdateExportSettingsForConnectionPermissionDenied: Could not updateExportSettings the Connection. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/connectivity/connections/{connectionRid}/updateExportSettings", + query_params={ + "preview": preview, + }, + path_params={ + "connectionRid": connection_rid, + }, + header_params={ + "Content-Type": "application/json", + }, + body=connectivity_models.UpdateExportSettingsForConnectionRequest( + export_settings=export_settings, + ), + response_type=None, + request_timeout=request_timeout, + throwable_errors={ + "ConnectionNotFound": connectivity_errors.ConnectionNotFound, + "UpdateExportSettingsForConnectionPermissionDenied": connectivity_errors.UpdateExportSettingsForConnectionPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def update_secrets( + self, + connection_rid: connectivity_models.ConnectionRid, + *, + secrets: typing.Dict[connectivity_models.SecretName, connectivity_models.PlaintextValue], + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> None: + """ + Updates the secrets on the connection to the specified secret values. + Secrets that are currently configured on the connection but are omitted in the request will remain unchanged. + + Secrets are transmitted over the network encrypted using TLS. Once the secrets reach Foundry's servers, + they will be temporarily decrypted and remain in plaintext in memory to be processed as needed. + They will stay in plaintext in memory until the garbage collection process cleans up the memory. + The secrets are always stored encrypted on our servers. + + By using this endpoint, you acknowledge and accept any potential risks associated with the temporary + in-memory handling of secrets. If you do not want your secrets to be temporarily decrypted, you should + use the Foundry UI instead. + + :param connection_rid: + :type connection_rid: ConnectionRid + :param secrets: The secrets to be updated. The specified secret names must already be configured on the connection. + :type secrets: Dict[SecretName, PlaintextValue] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: None + + :raises ConnectionNotFound: The given Connection could not be found. + :raises SecretNamesDoNotExist: The secret names provided do not exist on the connection. + :raises UpdateSecretsForConnectionPermissionDenied: Could not update secrets for the Connection. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/connectivity/connections/{connectionRid}/updateSecrets", + query_params={}, + path_params={ + "connectionRid": connection_rid, + }, + header_params={ + "Content-Type": "application/json", + }, + body=connectivity_models.UpdateSecretsForConnectionRequest( + secrets=secrets, + ), + response_type=None, + request_timeout=request_timeout, + throwable_errors={ + "ConnectionNotFound": connectivity_errors.ConnectionNotFound, + "SecretNamesDoNotExist": connectivity_errors.SecretNamesDoNotExist, + "UpdateSecretsForConnectionPermissionDenied": connectivity_errors.UpdateSecretsForConnectionPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def upload_custom_jdbc_drivers( + self, + connection_rid: connectivity_models.ConnectionRid, + body: bytes, + *, + file_name: str, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> connectivity_models.Connection: + """ + Upload custom jdbc drivers to an existing JDBC connection. + The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`. + + :param connection_rid: + :type connection_rid: ConnectionRid + :param body: Body of the request + :type body: bytes + :param file_name: The file name of the uploaded JDBC driver. Must end with .jar + :type file_name: str + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: connectivity_models.Connection + + :raises ConnectionNotFound: The given Connection could not be found. + :raises UploadCustomJdbcDriversConnectionPermissionDenied: Could not uploadCustomJdbcDrivers the Connection. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/connectivity/connections/{connectionRid}/uploadCustomJdbcDrivers", + query_params={ + "fileName": file_name, + "preview": preview, + }, + path_params={ + "connectionRid": connection_rid, + }, + header_params={ + "Content-Type": "application/octet-stream", + "Accept": "application/json", + }, + body=body, + response_type=connectivity_models.Connection, + request_timeout=request_timeout, + throwable_errors={ + "ConnectionNotFound": connectivity_errors.ConnectionNotFound, + "UploadCustomJdbcDriversConnectionPermissionDenied": connectivity_errors.UploadCustomJdbcDriversConnectionPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _ConnectionClientRaw: + def __init__(self, client: ConnectionClient) -> None: + def create(_: connectivity_models.Connection): ... + def get(_: connectivity_models.Connection): ... + def get_configuration(_: connectivity_models.ConnectionConfiguration): ... + def get_configuration_batch( + _: connectivity_models.GetConfigurationConnectionsBatchResponse, + ): ... + def update_export_settings(_: None): ... + def update_secrets(_: None): ... + def upload_custom_jdbc_drivers(_: connectivity_models.Connection): ... + + self.create = core.with_raw_response(create, client.create) + self.get = core.with_raw_response(get, client.get) + self.get_configuration = core.with_raw_response(get_configuration, client.get_configuration) + self.get_configuration_batch = core.with_raw_response( + get_configuration_batch, client.get_configuration_batch + ) + self.update_export_settings = core.with_raw_response( + update_export_settings, client.update_export_settings + ) + self.update_secrets = core.with_raw_response(update_secrets, client.update_secrets) + self.upload_custom_jdbc_drivers = core.with_raw_response( + upload_custom_jdbc_drivers, client.upload_custom_jdbc_drivers + ) + + +class _ConnectionClientStreaming: + def __init__(self, client: ConnectionClient) -> None: + def create(_: connectivity_models.Connection): ... + def get(_: connectivity_models.Connection): ... + def get_configuration(_: connectivity_models.ConnectionConfiguration): ... + def get_configuration_batch( + _: connectivity_models.GetConfigurationConnectionsBatchResponse, + ): ... + def upload_custom_jdbc_drivers(_: connectivity_models.Connection): ... + + self.create = core.with_streaming_response(create, client.create) + self.get = core.with_streaming_response(get, client.get) + self.get_configuration = core.with_streaming_response( + get_configuration, client.get_configuration + ) + self.get_configuration_batch = core.with_streaming_response( + get_configuration_batch, client.get_configuration_batch + ) + self.upload_custom_jdbc_drivers = core.with_streaming_response( + upload_custom_jdbc_drivers, client.upload_custom_jdbc_drivers + ) + + +class AsyncConnectionClient: + """ + The API client for the Connection Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncConnectionClientStreaming(self) + self.with_raw_response = _AsyncConnectionClientRaw(self) + + @cached_property + def FileImport(self): + from foundry_sdk.v2.connectivity.file_import import AsyncFileImportClient + + return AsyncFileImportClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @cached_property + def TableImport(self): + from foundry_sdk.v2.connectivity.table_import import AsyncTableImportClient + + return AsyncTableImportClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @cached_property + def VirtualTable(self): + from foundry_sdk.v2.connectivity.virtual_table import AsyncVirtualTableClient + + return AsyncVirtualTableClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def create( + self, + *, + configuration: connectivity_models.CreateConnectionRequestConnectionConfiguration, + display_name: connectivity_models.ConnectionDisplayName, + parent_folder_rid: filesystem_models.FolderRid, + worker: connectivity_models.CreateConnectionRequestConnectionWorker, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[connectivity_models.Connection]: + """ + Creates a new Connection with a [direct connection](https://palantir.com/docs/foundry/data-connection/core-concepts/#direct-connection) runtime. + + Any secrets specified in the request body are transmitted over the network encrypted using TLS. Once the + secrets reach Foundry's servers, they will be temporarily decrypted and remain in plaintext in memory to + be processed as needed. They will stay in plaintext in memory until the garbage collection process cleans + up the memory. The secrets are always stored encrypted on our servers. + By using this endpoint, you acknowledge and accept any potential risks associated with the temporary + in-memory handling of secrets. If you do not want your secrets to be temporarily decrypted, you should + use the Foundry UI instead. + + :param configuration: + :type configuration: CreateConnectionRequestConnectionConfiguration + :param display_name: The display name of the Connection. The display name must not be blank. + :type display_name: ConnectionDisplayName + :param parent_folder_rid: + :type parent_folder_rid: FolderRid + :param worker: + :type worker: CreateConnectionRequestConnectionWorker + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[connectivity_models.Connection] + + :raises ConnectionNotFound: The given Connection could not be found. + :raises ConnectionTypeNotSupported: The specified connection is not yet supported in the Platform API. + :raises CreateConnectionPermissionDenied: Could not create the Connection. + :raises FolderNotFound: The given Folder could not be found. + :raises ParentFolderNotFoundForConnection: The parent folder for the specified connection could not be found. + :raises PropertyCannotBeBlank: The specified property cannot be blank. + :raises UnknownWorkerCannotBeUsedForCreatingOrUpdatingConnections: The UnknownWorker cannot be used for creating or updating connections. Please use the Foundry worker instead. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/connectivity/connections", + query_params={ + "preview": preview, + }, + path_params={}, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=connectivity_models.CreateConnectionRequest( + parent_folder_rid=parent_folder_rid, + configuration=configuration, + display_name=display_name, + worker=worker, + ), + response_type=connectivity_models.Connection, + request_timeout=request_timeout, + throwable_errors={ + "ConnectionNotFound": connectivity_errors.ConnectionNotFound, + "ConnectionTypeNotSupported": connectivity_errors.ConnectionTypeNotSupported, + "CreateConnectionPermissionDenied": connectivity_errors.CreateConnectionPermissionDenied, + "FolderNotFound": filesystem_errors.FolderNotFound, + "ParentFolderNotFoundForConnection": connectivity_errors.ParentFolderNotFoundForConnection, + "PropertyCannotBeBlank": connectivity_errors.PropertyCannotBeBlank, + "UnknownWorkerCannotBeUsedForCreatingOrUpdatingConnections": connectivity_errors.UnknownWorkerCannotBeUsedForCreatingOrUpdatingConnections, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + connection_rid: connectivity_models.ConnectionRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[connectivity_models.Connection]: + """ + Get the Connection with the specified rid. + :param connection_rid: + :type connection_rid: ConnectionRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[connectivity_models.Connection] + + :raises ConnectionNotFound: The given Connection could not be found. + :raises ConnectionTypeNotSupported: The specified connection is not yet supported in the Platform API. + :raises ParentFolderNotFoundForConnection: The parent folder for the specified connection could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/connectivity/connections/{connectionRid}", + query_params={ + "preview": preview, + }, + path_params={ + "connectionRid": connection_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=connectivity_models.Connection, + request_timeout=request_timeout, + throwable_errors={ + "ConnectionNotFound": connectivity_errors.ConnectionNotFound, + "ConnectionTypeNotSupported": connectivity_errors.ConnectionTypeNotSupported, + "ParentFolderNotFoundForConnection": connectivity_errors.ParentFolderNotFoundForConnection, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get_configuration( + self, + connection_rid: connectivity_models.ConnectionRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[connectivity_models.ConnectionConfiguration]: + """ + Retrieves the ConnectionConfiguration of the [Connection](https://palantir.com/docs/foundry/data-connection/set-up-source/) itself. + This operation is intended for use when other Connection data is not required, providing a lighter-weight alternative to `getConnection` operation. + + :param connection_rid: + :type connection_rid: ConnectionRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[connectivity_models.ConnectionConfiguration] + + :raises ConnectionNotFound: The given Connection could not be found. + :raises ConnectionTypeNotSupported: The specified connection is not yet supported in the Platform API. + :raises GetConfigurationPermissionDenied: Could not getConfiguration the Connection. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/connectivity/connections/{connectionRid}/getConfiguration", + query_params={ + "preview": preview, + }, + path_params={ + "connectionRid": connection_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=connectivity_models.ConnectionConfiguration, + request_timeout=request_timeout, + throwable_errors={ + "ConnectionNotFound": connectivity_errors.ConnectionNotFound, + "ConnectionTypeNotSupported": connectivity_errors.ConnectionTypeNotSupported, + "GetConfigurationPermissionDenied": connectivity_errors.GetConfigurationPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get_configuration_batch( + self, + body: typing_extensions.Annotated[ + typing.List[connectivity_models.GetConfigurationConnectionsBatchRequestElement], + annotated_types.Len(min_length=1, max_length=200), + ], + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[connectivity_models.GetConfigurationConnectionsBatchResponse]: + """ + Returns a map of Connection RIDs to their corresponding configurations. + Connections are filtered from the response if they don't exist or the requesting token lacks the required permissions. + + + The maximum batch size for this endpoint is 200. + :param body: Body of the request + :type body: List[GetConfigurationConnectionsBatchRequestElement] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[connectivity_models.GetConfigurationConnectionsBatchResponse] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/connectivity/connections/getConfigurationBatch", + query_params={ + "preview": preview, + }, + path_params={}, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=body, + response_type=connectivity_models.GetConfigurationConnectionsBatchResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def update_export_settings( + self, + connection_rid: connectivity_models.ConnectionRid, + *, + export_settings: connectivity_models.ConnectionExportSettings, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[None]: + """ + Updates the [export settings on the Connection.](https://palantir.com/docs/foundry/data-connection/export-overview/#enable-exports-for-source) + Only users with Information Security Officer role can modify the export settings. + + :param connection_rid: + :type connection_rid: ConnectionRid + :param export_settings: + :type export_settings: ConnectionExportSettings + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[None] + + :raises ConnectionNotFound: The given Connection could not be found. + :raises UpdateExportSettingsForConnectionPermissionDenied: Could not updateExportSettings the Connection. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/connectivity/connections/{connectionRid}/updateExportSettings", + query_params={ + "preview": preview, + }, + path_params={ + "connectionRid": connection_rid, + }, + header_params={ + "Content-Type": "application/json", + }, + body=connectivity_models.UpdateExportSettingsForConnectionRequest( + export_settings=export_settings, + ), + response_type=None, + request_timeout=request_timeout, + throwable_errors={ + "ConnectionNotFound": connectivity_errors.ConnectionNotFound, + "UpdateExportSettingsForConnectionPermissionDenied": connectivity_errors.UpdateExportSettingsForConnectionPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def update_secrets( + self, + connection_rid: connectivity_models.ConnectionRid, + *, + secrets: typing.Dict[connectivity_models.SecretName, connectivity_models.PlaintextValue], + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[None]: + """ + Updates the secrets on the connection to the specified secret values. + Secrets that are currently configured on the connection but are omitted in the request will remain unchanged. + + Secrets are transmitted over the network encrypted using TLS. Once the secrets reach Foundry's servers, + they will be temporarily decrypted and remain in plaintext in memory to be processed as needed. + They will stay in plaintext in memory until the garbage collection process cleans up the memory. + The secrets are always stored encrypted on our servers. + + By using this endpoint, you acknowledge and accept any potential risks associated with the temporary + in-memory handling of secrets. If you do not want your secrets to be temporarily decrypted, you should + use the Foundry UI instead. + + :param connection_rid: + :type connection_rid: ConnectionRid + :param secrets: The secrets to be updated. The specified secret names must already be configured on the connection. + :type secrets: Dict[SecretName, PlaintextValue] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[None] + + :raises ConnectionNotFound: The given Connection could not be found. + :raises SecretNamesDoNotExist: The secret names provided do not exist on the connection. + :raises UpdateSecretsForConnectionPermissionDenied: Could not update secrets for the Connection. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/connectivity/connections/{connectionRid}/updateSecrets", + query_params={}, + path_params={ + "connectionRid": connection_rid, + }, + header_params={ + "Content-Type": "application/json", + }, + body=connectivity_models.UpdateSecretsForConnectionRequest( + secrets=secrets, + ), + response_type=None, + request_timeout=request_timeout, + throwable_errors={ + "ConnectionNotFound": connectivity_errors.ConnectionNotFound, + "SecretNamesDoNotExist": connectivity_errors.SecretNamesDoNotExist, + "UpdateSecretsForConnectionPermissionDenied": connectivity_errors.UpdateSecretsForConnectionPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def upload_custom_jdbc_drivers( + self, + connection_rid: connectivity_models.ConnectionRid, + body: bytes, + *, + file_name: str, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[connectivity_models.Connection]: + """ + Upload custom jdbc drivers to an existing JDBC connection. + The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`. + + :param connection_rid: + :type connection_rid: ConnectionRid + :param body: Body of the request + :type body: bytes + :param file_name: The file name of the uploaded JDBC driver. Must end with .jar + :type file_name: str + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[connectivity_models.Connection] + + :raises ConnectionNotFound: The given Connection could not be found. + :raises UploadCustomJdbcDriversConnectionPermissionDenied: Could not uploadCustomJdbcDrivers the Connection. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/connectivity/connections/{connectionRid}/uploadCustomJdbcDrivers", + query_params={ + "fileName": file_name, + "preview": preview, + }, + path_params={ + "connectionRid": connection_rid, + }, + header_params={ + "Content-Type": "application/octet-stream", + "Accept": "application/json", + }, + body=body, + response_type=connectivity_models.Connection, + request_timeout=request_timeout, + throwable_errors={ + "ConnectionNotFound": connectivity_errors.ConnectionNotFound, + "UploadCustomJdbcDriversConnectionPermissionDenied": connectivity_errors.UploadCustomJdbcDriversConnectionPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _AsyncConnectionClientRaw: + def __init__(self, client: AsyncConnectionClient) -> None: + def create(_: connectivity_models.Connection): ... + def get(_: connectivity_models.Connection): ... + def get_configuration(_: connectivity_models.ConnectionConfiguration): ... + def get_configuration_batch( + _: connectivity_models.GetConfigurationConnectionsBatchResponse, + ): ... + def update_export_settings(_: None): ... + def update_secrets(_: None): ... + def upload_custom_jdbc_drivers(_: connectivity_models.Connection): ... + + self.create = core.async_with_raw_response(create, client.create) + self.get = core.async_with_raw_response(get, client.get) + self.get_configuration = core.async_with_raw_response( + get_configuration, client.get_configuration + ) + self.get_configuration_batch = core.async_with_raw_response( + get_configuration_batch, client.get_configuration_batch + ) + self.update_export_settings = core.async_with_raw_response( + update_export_settings, client.update_export_settings + ) + self.update_secrets = core.async_with_raw_response(update_secrets, client.update_secrets) + self.upload_custom_jdbc_drivers = core.async_with_raw_response( + upload_custom_jdbc_drivers, client.upload_custom_jdbc_drivers + ) + + +class _AsyncConnectionClientStreaming: + def __init__(self, client: AsyncConnectionClient) -> None: + def create(_: connectivity_models.Connection): ... + def get(_: connectivity_models.Connection): ... + def get_configuration(_: connectivity_models.ConnectionConfiguration): ... + def get_configuration_batch( + _: connectivity_models.GetConfigurationConnectionsBatchResponse, + ): ... + def upload_custom_jdbc_drivers(_: connectivity_models.Connection): ... + + self.create = core.async_with_streaming_response(create, client.create) + self.get = core.async_with_streaming_response(get, client.get) + self.get_configuration = core.async_with_streaming_response( + get_configuration, client.get_configuration + ) + self.get_configuration_batch = core.async_with_streaming_response( + get_configuration_batch, client.get_configuration_batch + ) + self.upload_custom_jdbc_drivers = core.async_with_streaming_response( + upload_custom_jdbc_drivers, client.upload_custom_jdbc_drivers + ) diff --git a/foundry_sdk/v2/connectivity/errors.py b/foundry_sdk/v2/connectivity/errors.py new file mode 100644 index 000000000..049d472c7 --- /dev/null +++ b/foundry_sdk/v2/connectivity/errors.py @@ -0,0 +1,780 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing +from dataclasses import dataclass + +import typing_extensions + +from foundry_sdk import _errors as errors +from foundry_sdk.v2.connectivity import models as connectivity_models +from foundry_sdk.v2.core import models as core_models +from foundry_sdk.v2.filesystem import models as filesystem_models + + +class AdditionalSecretsMustBeSpecifiedAsPlaintextValueMapParameters(typing_extensions.TypedDict): + """The additional secrets must be specified as a plaintext value map.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class AdditionalSecretsMustBeSpecifiedAsPlaintextValueMap(errors.BadRequestError): + name: typing.Literal["AdditionalSecretsMustBeSpecifiedAsPlaintextValueMap"] + parameters: AdditionalSecretsMustBeSpecifiedAsPlaintextValueMapParameters + error_instance_id: str + + +class ConnectionDetailsNotDeterminedParameters(typing_extensions.TypedDict): + """Details of the connection (such as which types of import it supports) could not be determined.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + connectionRid: connectivity_models.ConnectionRid + connectionType: str + + +@dataclass +class ConnectionDetailsNotDetermined(errors.InternalServerError): + name: typing.Literal["ConnectionDetailsNotDetermined"] + parameters: ConnectionDetailsNotDeterminedParameters + error_instance_id: str + + +class ConnectionNotFoundParameters(typing_extensions.TypedDict): + """The given Connection could not be found.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + connectionRid: connectivity_models.ConnectionRid + + +@dataclass +class ConnectionNotFound(errors.NotFoundError): + name: typing.Literal["ConnectionNotFound"] + parameters: ConnectionNotFoundParameters + error_instance_id: str + + +class ConnectionTypeNotSupportedParameters(typing_extensions.TypedDict): + """The specified connection is not yet supported in the Platform API.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + connectionType: str + + +@dataclass +class ConnectionTypeNotSupported(errors.BadRequestError): + name: typing.Literal["ConnectionTypeNotSupported"] + parameters: ConnectionTypeNotSupportedParameters + error_instance_id: str + + +class CreateConnectionPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not create the Connection.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class CreateConnectionPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["CreateConnectionPermissionDenied"] + parameters: CreateConnectionPermissionDeniedParameters + error_instance_id: str + + +class CreateFileImportPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not create the FileImport.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + connectionRid: connectivity_models.ConnectionRid + + +@dataclass +class CreateFileImportPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["CreateFileImportPermissionDenied"] + parameters: CreateFileImportPermissionDeniedParameters + error_instance_id: str + + +class CreateTableImportPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not create the TableImport.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + connectionRid: connectivity_models.ConnectionRid + + +@dataclass +class CreateTableImportPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["CreateTableImportPermissionDenied"] + parameters: CreateTableImportPermissionDeniedParameters + error_instance_id: str + + +class CreateVirtualTablePermissionDeniedParameters(typing_extensions.TypedDict): + """Could not create the VirtualTable.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + connectionRid: connectivity_models.ConnectionRid + + +@dataclass +class CreateVirtualTablePermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["CreateVirtualTablePermissionDenied"] + parameters: CreateVirtualTablePermissionDeniedParameters + error_instance_id: str + + +class DeleteFileImportPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not delete the FileImport.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + fileImportRid: connectivity_models.FileImportRid + connectionRid: connectivity_models.ConnectionRid + + +@dataclass +class DeleteFileImportPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["DeleteFileImportPermissionDenied"] + parameters: DeleteFileImportPermissionDeniedParameters + error_instance_id: str + + +class DeleteTableImportPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not delete the TableImport.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + tableImportRid: connectivity_models.TableImportRid + connectionRid: connectivity_models.ConnectionRid + + +@dataclass +class DeleteTableImportPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["DeleteTableImportPermissionDenied"] + parameters: DeleteTableImportPermissionDeniedParameters + error_instance_id: str + + +class DomainMustUseHttpsWithAuthenticationParameters(typing_extensions.TypedDict): + """The domain must use HTTPS if authentication is required.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class DomainMustUseHttpsWithAuthentication(errors.BadRequestError): + name: typing.Literal["DomainMustUseHttpsWithAuthentication"] + parameters: DomainMustUseHttpsWithAuthenticationParameters + error_instance_id: str + + +class DriverContentMustBeUploadedAsJarParameters(typing_extensions.TypedDict): + """The driver content must be provided as a jar.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + driverName: str + + +@dataclass +class DriverContentMustBeUploadedAsJar(errors.BadRequestError): + name: typing.Literal["DriverContentMustBeUploadedAsJar"] + parameters: DriverContentMustBeUploadedAsJarParameters + error_instance_id: str + + +class DriverJarAlreadyExistsParameters(typing_extensions.TypedDict): + """Duplicate jar with different versions already exists on connection.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + driverName: str + connectionRid: connectivity_models.ConnectionRid + + +@dataclass +class DriverJarAlreadyExists(errors.ConflictError): + name: typing.Literal["DriverJarAlreadyExists"] + parameters: DriverJarAlreadyExistsParameters + error_instance_id: str + + +class EncryptedPropertyMustBeSpecifiedAsPlaintextValueParameters(typing_extensions.TypedDict): + """The encrypted property must be specified as a plaintext value.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + propertyName: str + + +@dataclass +class EncryptedPropertyMustBeSpecifiedAsPlaintextValue(errors.BadRequestError): + name: typing.Literal["EncryptedPropertyMustBeSpecifiedAsPlaintextValue"] + parameters: EncryptedPropertyMustBeSpecifiedAsPlaintextValueParameters + error_instance_id: str + + +class ExecuteFileImportPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not execute the FileImport.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + fileImportRid: connectivity_models.FileImportRid + connectionRid: connectivity_models.ConnectionRid + + +@dataclass +class ExecuteFileImportPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["ExecuteFileImportPermissionDenied"] + parameters: ExecuteFileImportPermissionDeniedParameters + error_instance_id: str + + +class ExecuteTableImportPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not execute the TableImport.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + tableImportRid: connectivity_models.TableImportRid + connectionRid: connectivity_models.ConnectionRid + + +@dataclass +class ExecuteTableImportPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["ExecuteTableImportPermissionDenied"] + parameters: ExecuteTableImportPermissionDeniedParameters + error_instance_id: str + + +class FileAtLeastCountFilterInvalidMinCountParameters(typing_extensions.TypedDict): + """The provided `minFilesCount` property in the FileAtLeastCountFilter must be strictly greater than 0.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + minFilesCount: int + + +@dataclass +class FileAtLeastCountFilterInvalidMinCount(errors.BadRequestError): + name: typing.Literal["FileAtLeastCountFilterInvalidMinCount"] + parameters: FileAtLeastCountFilterInvalidMinCountParameters + error_instance_id: str + + +class FileImportCustomFilterCannotBeUsedToCreateOrUpdateFileImportsParameters( + typing_extensions.TypedDict +): + """ + Custom file import filters can be fetched but cannot currently be used + when creating or updating file imports. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + config: typing.Any + + +@dataclass +class FileImportCustomFilterCannotBeUsedToCreateOrUpdateFileImports(errors.BadRequestError): + name: typing.Literal["FileImportCustomFilterCannotBeUsedToCreateOrUpdateFileImports"] + parameters: FileImportCustomFilterCannotBeUsedToCreateOrUpdateFileImportsParameters + error_instance_id: str + + +class FileImportNotFoundParameters(typing_extensions.TypedDict): + """The given FileImport could not be found.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + fileImportRid: connectivity_models.FileImportRid + connectionRid: connectivity_models.ConnectionRid + + +@dataclass +class FileImportNotFound(errors.NotFoundError): + name: typing.Literal["FileImportNotFound"] + parameters: FileImportNotFoundParameters + error_instance_id: str + + +class FileImportNotSupportedForConnectionParameters(typing_extensions.TypedDict): + """The specified connection does not support file imports.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + connectionRid: connectivity_models.ConnectionRid + + +@dataclass +class FileImportNotSupportedForConnection(errors.BadRequestError): + name: typing.Literal["FileImportNotSupportedForConnection"] + parameters: FileImportNotSupportedForConnectionParameters + error_instance_id: str + + +class FileSizeFilterGreaterThanCannotBeNegativeParameters(typing_extensions.TypedDict): + """The `gt` property in the FileSizeFilter cannot be a negative number.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + gt: core_models.SizeBytes + + +@dataclass +class FileSizeFilterGreaterThanCannotBeNegative(errors.BadRequestError): + name: typing.Literal["FileSizeFilterGreaterThanCannotBeNegative"] + parameters: FileSizeFilterGreaterThanCannotBeNegativeParameters + error_instance_id: str + + +class FileSizeFilterInvalidGreaterThanAndLessThanRangeParameters(typing_extensions.TypedDict): + """ + The provided `gt` and `lt` properties in the FileSizeFilter are invalid. No files will ever + satisfy the provided range. The value specified for `gt` must be strictly less than `lt - 1`. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + gt: core_models.SizeBytes + lt: core_models.SizeBytes + + +@dataclass +class FileSizeFilterInvalidGreaterThanAndLessThanRange(errors.BadRequestError): + name: typing.Literal["FileSizeFilterInvalidGreaterThanAndLessThanRange"] + parameters: FileSizeFilterInvalidGreaterThanAndLessThanRangeParameters + error_instance_id: str + + +class FileSizeFilterLessThanMustBeOneByteOrLargerParameters(typing_extensions.TypedDict): + """The `lt` property in the FileSizeFilter must be at least 1 byte.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + lt: core_models.SizeBytes + + +@dataclass +class FileSizeFilterLessThanMustBeOneByteOrLarger(errors.BadRequestError): + name: typing.Literal["FileSizeFilterLessThanMustBeOneByteOrLarger"] + parameters: FileSizeFilterLessThanMustBeOneByteOrLargerParameters + error_instance_id: str + + +class FileSizeFilterMissingGreaterThanAndLessThanParameters(typing_extensions.TypedDict): + """ + Both the `gt` and `lt` properties are missing from the FileSizeFilter. At least one of these + properties must be present + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class FileSizeFilterMissingGreaterThanAndLessThan(errors.BadRequestError): + name: typing.Literal["FileSizeFilterMissingGreaterThanAndLessThan"] + parameters: FileSizeFilterMissingGreaterThanAndLessThanParameters + error_instance_id: str + + +class FilesCountLimitFilterInvalidLimitParameters(typing_extensions.TypedDict): + """The `filesCount` property in the FilesCountLimitFilter must be strictly greater than 0.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + filesCount: int + + +@dataclass +class FilesCountLimitFilterInvalidLimit(errors.BadRequestError): + name: typing.Literal["FilesCountLimitFilterInvalidLimit"] + parameters: FilesCountLimitFilterInvalidLimitParameters + error_instance_id: str + + +class GetConfigurationPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not getConfiguration the Connection.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + connectionRid: connectivity_models.ConnectionRid + + +@dataclass +class GetConfigurationPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["GetConfigurationPermissionDenied"] + parameters: GetConfigurationPermissionDeniedParameters + error_instance_id: str + + +class HostNameCannotHaveProtocolOrPortParameters(typing_extensions.TypedDict): + """The hostname should not include a protocol (e.g., https://) or port number (e.g., :443).""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + hostName: str + + +@dataclass +class HostNameCannotHaveProtocolOrPort(errors.BadRequestError): + name: typing.Literal["HostNameCannotHaveProtocolOrPort"] + parameters: HostNameCannotHaveProtocolOrPortParameters + error_instance_id: str + + +class InvalidShareNameParameters(typing_extensions.TypedDict): + """The share name is invalid. Share names cannot contain the following characters: \ / : * ? " < > |""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + shareName: str + + +@dataclass +class InvalidShareName(errors.BadRequestError): + name: typing.Literal["InvalidShareName"] + parameters: InvalidShareNameParameters + error_instance_id: str + + +class InvalidVirtualTableConnectionParameters(typing_extensions.TypedDict): + """The specified connection is invalid or inaccessible.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + connection: connectivity_models.ConnectionRid + reason: connectivity_models.InvalidConnectionReason + + +@dataclass +class InvalidVirtualTableConnection(errors.BadRequestError): + name: typing.Literal["InvalidVirtualTableConnection"] + parameters: InvalidVirtualTableConnectionParameters + error_instance_id: str + + +class ParentFolderNotFoundForConnectionParameters(typing_extensions.TypedDict): + """The parent folder for the specified connection could not be found.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + connectionRid: connectivity_models.ConnectionRid + + +@dataclass +class ParentFolderNotFoundForConnection(errors.NotFoundError): + name: typing.Literal["ParentFolderNotFoundForConnection"] + parameters: ParentFolderNotFoundForConnectionParameters + error_instance_id: str + + +class PortNotInRangeParameters(typing_extensions.TypedDict): + """The specified port is not in the valid range (1-65535).""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + port: int + + +@dataclass +class PortNotInRange(errors.BadRequestError): + name: typing.Literal["PortNotInRange"] + parameters: PortNotInRangeParameters + error_instance_id: str + + +class PropertyCannotBeBlankParameters(typing_extensions.TypedDict): + """The specified property cannot be blank.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + propertyName: str + + +@dataclass +class PropertyCannotBeBlank(errors.BadRequestError): + name: typing.Literal["PropertyCannotBeBlank"] + parameters: PropertyCannotBeBlankParameters + error_instance_id: str + + +class PropertyCannotBeEmptyParameters(typing_extensions.TypedDict): + """The specified property cannot be empty.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + propertyName: str + + +@dataclass +class PropertyCannotBeEmpty(errors.BadRequestError): + name: typing.Literal["PropertyCannotBeEmpty"] + parameters: PropertyCannotBeEmptyParameters + error_instance_id: str + + +class ReplaceFileImportPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not replace the FileImport.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + fileImportRid: connectivity_models.FileImportRid + connectionRid: connectivity_models.ConnectionRid + + +@dataclass +class ReplaceFileImportPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["ReplaceFileImportPermissionDenied"] + parameters: ReplaceFileImportPermissionDeniedParameters + error_instance_id: str + + +class ReplaceTableImportPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not replace the TableImport.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + tableImportRid: connectivity_models.TableImportRid + connectionRid: connectivity_models.ConnectionRid + + +@dataclass +class ReplaceTableImportPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["ReplaceTableImportPermissionDenied"] + parameters: ReplaceTableImportPermissionDeniedParameters + error_instance_id: str + + +class SecretNamesDoNotExistParameters(typing_extensions.TypedDict): + """The secret names provided do not exist on the connection.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + connectionRid: connectivity_models.ConnectionRid + secretNames: typing.List[connectivity_models.SecretName] + + +@dataclass +class SecretNamesDoNotExist(errors.BadRequestError): + name: typing.Literal["SecretNamesDoNotExist"] + parameters: SecretNamesDoNotExistParameters + error_instance_id: str + + +class TableImportNotFoundParameters(typing_extensions.TypedDict): + """The given TableImport could not be found.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + tableImportRid: connectivity_models.TableImportRid + connectionRid: connectivity_models.ConnectionRid + + +@dataclass +class TableImportNotFound(errors.NotFoundError): + name: typing.Literal["TableImportNotFound"] + parameters: TableImportNotFoundParameters + error_instance_id: str + + +class TableImportNotSupportedForConnectionParameters(typing_extensions.TypedDict): + """The specified connection does not support creating or replacing a table import with the specified config.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + connectionRid: connectivity_models.ConnectionRid + tableImportType: str + + +@dataclass +class TableImportNotSupportedForConnection(errors.BadRequestError): + name: typing.Literal["TableImportNotSupportedForConnection"] + parameters: TableImportNotSupportedForConnectionParameters + error_instance_id: str + + +class TableImportTypeNotSupportedParameters(typing_extensions.TypedDict): + """The specified table import type is not yet supported in the Platform API.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + tableImportType: str + + +@dataclass +class TableImportTypeNotSupported(errors.InternalServerError): + name: typing.Literal["TableImportTypeNotSupported"] + parameters: TableImportTypeNotSupportedParameters + error_instance_id: str + + +class UnknownWorkerCannotBeUsedForCreatingOrUpdatingConnectionsParameters( + typing_extensions.TypedDict +): + """The UnknownWorker cannot be used for creating or updating connections. Please use the Foundry worker instead.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class UnknownWorkerCannotBeUsedForCreatingOrUpdatingConnections(errors.BadRequestError): + name: typing.Literal["UnknownWorkerCannotBeUsedForCreatingOrUpdatingConnections"] + parameters: UnknownWorkerCannotBeUsedForCreatingOrUpdatingConnectionsParameters + error_instance_id: str + + +class UpdateExportSettingsForConnectionPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not updateExportSettings the Connection.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + connectionRid: connectivity_models.ConnectionRid + + +@dataclass +class UpdateExportSettingsForConnectionPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["UpdateExportSettingsForConnectionPermissionDenied"] + parameters: UpdateExportSettingsForConnectionPermissionDeniedParameters + error_instance_id: str + + +class UpdateSecretsForConnectionPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not update secrets for the Connection.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + connectionRid: connectivity_models.ConnectionRid + + +@dataclass +class UpdateSecretsForConnectionPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["UpdateSecretsForConnectionPermissionDenied"] + parameters: UpdateSecretsForConnectionPermissionDeniedParameters + error_instance_id: str + + +class UploadCustomJdbcDriverNotSupportForConnectionParameters(typing_extensions.TypedDict): + """Only JDBC connections support uploading custom JDBC drivers.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + connectionType: str + + +@dataclass +class UploadCustomJdbcDriverNotSupportForConnection(errors.BadRequestError): + name: typing.Literal["UploadCustomJdbcDriverNotSupportForConnection"] + parameters: UploadCustomJdbcDriverNotSupportForConnectionParameters + error_instance_id: str + + +class UploadCustomJdbcDriversConnectionPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not uploadCustomJdbcDrivers the Connection.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + connectionRid: connectivity_models.ConnectionRid + + +@dataclass +class UploadCustomJdbcDriversConnectionPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["UploadCustomJdbcDriversConnectionPermissionDenied"] + parameters: UploadCustomJdbcDriversConnectionPermissionDeniedParameters + error_instance_id: str + + +class VirtualTableAlreadyExistsParameters(typing_extensions.TypedDict): + """A VirtualTable with the same name already exists in the parent folder.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + parentRid: filesystem_models.FolderRid + name: connectivity_models.TableName + + +@dataclass +class VirtualTableAlreadyExists(errors.ConflictError): + name: typing.Literal["VirtualTableAlreadyExists"] + parameters: VirtualTableAlreadyExistsParameters + error_instance_id: str + + +class VirtualTableRegisterFromSourcePermissionDeniedParameters(typing_extensions.TypedDict): + """User lacks permission to use the specified connection for virtual table registration.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class VirtualTableRegisterFromSourcePermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["VirtualTableRegisterFromSourcePermissionDenied"] + parameters: VirtualTableRegisterFromSourcePermissionDeniedParameters + error_instance_id: str + + +__all__ = [ + "AdditionalSecretsMustBeSpecifiedAsPlaintextValueMap", + "ConnectionDetailsNotDetermined", + "ConnectionNotFound", + "ConnectionTypeNotSupported", + "CreateConnectionPermissionDenied", + "CreateFileImportPermissionDenied", + "CreateTableImportPermissionDenied", + "CreateVirtualTablePermissionDenied", + "DeleteFileImportPermissionDenied", + "DeleteTableImportPermissionDenied", + "DomainMustUseHttpsWithAuthentication", + "DriverContentMustBeUploadedAsJar", + "DriverJarAlreadyExists", + "EncryptedPropertyMustBeSpecifiedAsPlaintextValue", + "ExecuteFileImportPermissionDenied", + "ExecuteTableImportPermissionDenied", + "FileAtLeastCountFilterInvalidMinCount", + "FileImportCustomFilterCannotBeUsedToCreateOrUpdateFileImports", + "FileImportNotFound", + "FileImportNotSupportedForConnection", + "FileSizeFilterGreaterThanCannotBeNegative", + "FileSizeFilterInvalidGreaterThanAndLessThanRange", + "FileSizeFilterLessThanMustBeOneByteOrLarger", + "FileSizeFilterMissingGreaterThanAndLessThan", + "FilesCountLimitFilterInvalidLimit", + "GetConfigurationPermissionDenied", + "HostNameCannotHaveProtocolOrPort", + "InvalidShareName", + "InvalidVirtualTableConnection", + "ParentFolderNotFoundForConnection", + "PortNotInRange", + "PropertyCannotBeBlank", + "PropertyCannotBeEmpty", + "ReplaceFileImportPermissionDenied", + "ReplaceTableImportPermissionDenied", + "SecretNamesDoNotExist", + "TableImportNotFound", + "TableImportNotSupportedForConnection", + "TableImportTypeNotSupported", + "UnknownWorkerCannotBeUsedForCreatingOrUpdatingConnections", + "UpdateExportSettingsForConnectionPermissionDenied", + "UpdateSecretsForConnectionPermissionDenied", + "UploadCustomJdbcDriverNotSupportForConnection", + "UploadCustomJdbcDriversConnectionPermissionDenied", + "VirtualTableAlreadyExists", + "VirtualTableRegisterFromSourcePermissionDenied", +] diff --git a/foundry_sdk/v2/connectivity/file_import.py b/foundry_sdk/v2/connectivity/file_import.py new file mode 100644 index 000000000..33a168bf2 --- /dev/null +++ b/foundry_sdk/v2/connectivity/file_import.py @@ -0,0 +1,937 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v2.connectivity import errors as connectivity_errors +from foundry_sdk.v2.connectivity import models as connectivity_models +from foundry_sdk.v2.core import models as core_models +from foundry_sdk.v2.datasets import errors as datasets_errors +from foundry_sdk.v2.datasets import models as datasets_models + + +class FileImportClient: + """ + The API client for the FileImport Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _FileImportClientStreaming(self) + self.with_raw_response = _FileImportClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def create( + self, + connection_rid: connectivity_models.ConnectionRid, + *, + dataset_rid: datasets_models.DatasetRid, + display_name: connectivity_models.FileImportDisplayName, + file_import_filters: typing.List[connectivity_models.FileImportFilter], + import_mode: connectivity_models.FileImportMode, + branch_name: typing.Optional[datasets_models.BranchName] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + subfolder: typing.Optional[str] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> connectivity_models.FileImport: + """ + Creates a new FileImport. + :param connection_rid: + :type connection_rid: ConnectionRid + :param dataset_rid: The RID of the output dataset. Can not be modified after the file import is created. + :type dataset_rid: DatasetRid + :param display_name: + :type display_name: FileImportDisplayName + :param file_import_filters: Use filters to limit which files should be imported. Filters are applied in the order they are defined. A different ordering of filters may lead to a more optimized import. [Learn more about optimizing file imports.](https://palantir.com/docs/foundry/data-connection/file-based-syncs/#optimize-file-based-syncs) + :type file_import_filters: List[FileImportFilter] + :param import_mode: + :type import_mode: FileImportMode + :param branch_name: The branch name in the output dataset that will contain the imported data. Defaults to `master` for most enrollments. Can not be modified after the file import is created. + :type branch_name: Optional[BranchName] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param subfolder: A subfolder in the external system that will be imported. If not specified, defaults to the root folder of the external system. + :type subfolder: Optional[str] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: connectivity_models.FileImport + + :raises ConnectionDetailsNotDetermined: Details of the connection (such as which types of import it supports) could not be determined. + :raises ConnectionNotFound: The given Connection could not be found. + :raises CreateFileImportPermissionDenied: Could not create the FileImport. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises FileAtLeastCountFilterInvalidMinCount: The provided `minFilesCount` property in the FileAtLeastCountFilter must be strictly greater than 0. + :raises FileImportCustomFilterCannotBeUsedToCreateOrUpdateFileImports: Custom file import filters can be fetched but cannot currently be used when creating or updating file imports. + :raises FileImportNotSupportedForConnection: The specified connection does not support file imports. + :raises FileSizeFilterGreaterThanCannotBeNegative: The `gt` property in the FileSizeFilter cannot be a negative number. + :raises FileSizeFilterInvalidGreaterThanAndLessThanRange: The provided `gt` and `lt` properties in the FileSizeFilter are invalid. No files will ever satisfy the provided range. The value specified for `gt` must be strictly less than `lt - 1`. + :raises FileSizeFilterLessThanMustBeOneByteOrLarger: The `lt` property in the FileSizeFilter must be at least 1 byte. + :raises FileSizeFilterMissingGreaterThanAndLessThan: Both the `gt` and `lt` properties are missing from the FileSizeFilter. At least one of these properties must be present + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/connectivity/connections/{connectionRid}/fileImports", + query_params={ + "preview": preview, + }, + path_params={ + "connectionRid": connection_rid, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=connectivity_models.CreateFileImportRequest( + dataset_rid=dataset_rid, + import_mode=import_mode, + display_name=display_name, + branch_name=branch_name, + subfolder=subfolder, + file_import_filters=file_import_filters, + ), + response_type=connectivity_models.FileImport, + request_timeout=request_timeout, + throwable_errors={ + "ConnectionDetailsNotDetermined": connectivity_errors.ConnectionDetailsNotDetermined, + "ConnectionNotFound": connectivity_errors.ConnectionNotFound, + "CreateFileImportPermissionDenied": connectivity_errors.CreateFileImportPermissionDenied, + "DatasetNotFound": datasets_errors.DatasetNotFound, + "FileAtLeastCountFilterInvalidMinCount": connectivity_errors.FileAtLeastCountFilterInvalidMinCount, + "FileImportCustomFilterCannotBeUsedToCreateOrUpdateFileImports": connectivity_errors.FileImportCustomFilterCannotBeUsedToCreateOrUpdateFileImports, + "FileImportNotSupportedForConnection": connectivity_errors.FileImportNotSupportedForConnection, + "FileSizeFilterGreaterThanCannotBeNegative": connectivity_errors.FileSizeFilterGreaterThanCannotBeNegative, + "FileSizeFilterInvalidGreaterThanAndLessThanRange": connectivity_errors.FileSizeFilterInvalidGreaterThanAndLessThanRange, + "FileSizeFilterLessThanMustBeOneByteOrLarger": connectivity_errors.FileSizeFilterLessThanMustBeOneByteOrLarger, + "FileSizeFilterMissingGreaterThanAndLessThan": connectivity_errors.FileSizeFilterMissingGreaterThanAndLessThan, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def delete( + self, + connection_rid: connectivity_models.ConnectionRid, + file_import_rid: connectivity_models.FileImportRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> None: + """ + Delete the FileImport with the specified RID. + Deleting the file import does not delete the destination dataset but the dataset will no longer + be updated by this import. + + :param connection_rid: + :type connection_rid: ConnectionRid + :param file_import_rid: + :type file_import_rid: FileImportRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: None + + :raises DeleteFileImportPermissionDenied: Could not delete the FileImport. + :raises FileImportNotFound: The given FileImport could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="DELETE", + resource_path="/v2/connectivity/connections/{connectionRid}/fileImports/{fileImportRid}", + query_params={ + "preview": preview, + }, + path_params={ + "connectionRid": connection_rid, + "fileImportRid": file_import_rid, + }, + header_params={}, + body=None, + response_type=None, + request_timeout=request_timeout, + throwable_errors={ + "DeleteFileImportPermissionDenied": connectivity_errors.DeleteFileImportPermissionDenied, + "FileImportNotFound": connectivity_errors.FileImportNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def execute( + self, + connection_rid: connectivity_models.ConnectionRid, + file_import_rid: connectivity_models.FileImportRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core_models.BuildRid: + """ + Executes the FileImport, which runs asynchronously as a [Foundry Build](https://palantir.com/docs/foundry/data-integration/builds/). + The returned BuildRid can be used to check the status via the Orchestration API. + + :param connection_rid: + :type connection_rid: ConnectionRid + :param file_import_rid: + :type file_import_rid: FileImportRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core_models.BuildRid + + :raises ExecuteFileImportPermissionDenied: Could not execute the FileImport. + :raises FileImportNotFound: The given FileImport could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/connectivity/connections/{connectionRid}/fileImports/{fileImportRid}/execute", + query_params={ + "preview": preview, + }, + path_params={ + "connectionRid": connection_rid, + "fileImportRid": file_import_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=core_models.BuildRid, + request_timeout=request_timeout, + throwable_errors={ + "ExecuteFileImportPermissionDenied": connectivity_errors.ExecuteFileImportPermissionDenied, + "FileImportNotFound": connectivity_errors.FileImportNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + connection_rid: connectivity_models.ConnectionRid, + file_import_rid: connectivity_models.FileImportRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> connectivity_models.FileImport: + """ + Get the FileImport with the specified rid. + :param connection_rid: + :type connection_rid: ConnectionRid + :param file_import_rid: + :type file_import_rid: FileImportRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: connectivity_models.FileImport + + :raises FileImportNotFound: The given FileImport could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/connectivity/connections/{connectionRid}/fileImports/{fileImportRid}", + query_params={ + "preview": preview, + }, + path_params={ + "connectionRid": connection_rid, + "fileImportRid": file_import_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=connectivity_models.FileImport, + request_timeout=request_timeout, + throwable_errors={ + "FileImportNotFound": connectivity_errors.FileImportNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def list( + self, + connection_rid: connectivity_models.ConnectionRid, + *, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.ResourceIterator[connectivity_models.FileImport]: + """ + Lists all file imports defined for this connection. + Only file imports that the user has permissions to view will be returned. + + :param connection_rid: + :type connection_rid: ConnectionRid + :param page_size: The page size to use for the endpoint. + :type page_size: Optional[PageSize] + :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. + :type page_token: Optional[PageToken] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.ResourceIterator[connectivity_models.FileImport] + + :raises ConnectionNotFound: The given Connection could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/connectivity/connections/{connectionRid}/fileImports", + query_params={ + "pageSize": page_size, + "pageToken": page_token, + "preview": preview, + }, + path_params={ + "connectionRid": connection_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=connectivity_models.ListFileImportsResponse, + request_timeout=request_timeout, + throwable_errors={ + "ConnectionNotFound": connectivity_errors.ConnectionNotFound, + }, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def replace( + self, + connection_rid: connectivity_models.ConnectionRid, + file_import_rid: connectivity_models.FileImportRid, + *, + display_name: connectivity_models.FileImportDisplayName, + file_import_filters: typing.List[connectivity_models.FileImportFilter], + import_mode: connectivity_models.FileImportMode, + preview: typing.Optional[core_models.PreviewMode] = None, + subfolder: typing.Optional[str] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> connectivity_models.FileImport: + """ + Replace the FileImport with the specified rid. + :param connection_rid: + :type connection_rid: ConnectionRid + :param file_import_rid: + :type file_import_rid: FileImportRid + :param display_name: + :type display_name: FileImportDisplayName + :param file_import_filters: Use filters to limit which files should be imported. Filters are applied in the order they are defined. A different ordering of filters may lead to a more optimized import. [Learn more about optimizing file imports.](https://palantir.com/docs/foundry/data-connection/file-based-syncs/#optimize-file-based-syncs) + :type file_import_filters: List[FileImportFilter] + :param import_mode: + :type import_mode: FileImportMode + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param subfolder: A subfolder in the external system that will be imported. If not specified, defaults to the root folder of the external system. + :type subfolder: Optional[str] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: connectivity_models.FileImport + + :raises FileAtLeastCountFilterInvalidMinCount: The provided `minFilesCount` property in the FileAtLeastCountFilter must be strictly greater than 0. + :raises FileImportCustomFilterCannotBeUsedToCreateOrUpdateFileImports: Custom file import filters can be fetched but cannot currently be used when creating or updating file imports. + :raises FileImportNotFound: The given FileImport could not be found. + :raises FileSizeFilterGreaterThanCannotBeNegative: The `gt` property in the FileSizeFilter cannot be a negative number. + :raises FileSizeFilterInvalidGreaterThanAndLessThanRange: The provided `gt` and `lt` properties in the FileSizeFilter are invalid. No files will ever satisfy the provided range. The value specified for `gt` must be strictly less than `lt - 1`. + :raises FileSizeFilterLessThanMustBeOneByteOrLarger: The `lt` property in the FileSizeFilter must be at least 1 byte. + :raises FileSizeFilterMissingGreaterThanAndLessThan: Both the `gt` and `lt` properties are missing from the FileSizeFilter. At least one of these properties must be present + :raises ReplaceFileImportPermissionDenied: Could not replace the FileImport. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="PUT", + resource_path="/v2/connectivity/connections/{connectionRid}/fileImports/{fileImportRid}", + query_params={ + "preview": preview, + }, + path_params={ + "connectionRid": connection_rid, + "fileImportRid": file_import_rid, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=connectivity_models.ReplaceFileImportRequest( + import_mode=import_mode, + display_name=display_name, + subfolder=subfolder, + file_import_filters=file_import_filters, + ), + response_type=connectivity_models.FileImport, + request_timeout=request_timeout, + throwable_errors={ + "FileAtLeastCountFilterInvalidMinCount": connectivity_errors.FileAtLeastCountFilterInvalidMinCount, + "FileImportCustomFilterCannotBeUsedToCreateOrUpdateFileImports": connectivity_errors.FileImportCustomFilterCannotBeUsedToCreateOrUpdateFileImports, + "FileImportNotFound": connectivity_errors.FileImportNotFound, + "FileSizeFilterGreaterThanCannotBeNegative": connectivity_errors.FileSizeFilterGreaterThanCannotBeNegative, + "FileSizeFilterInvalidGreaterThanAndLessThanRange": connectivity_errors.FileSizeFilterInvalidGreaterThanAndLessThanRange, + "FileSizeFilterLessThanMustBeOneByteOrLarger": connectivity_errors.FileSizeFilterLessThanMustBeOneByteOrLarger, + "FileSizeFilterMissingGreaterThanAndLessThan": connectivity_errors.FileSizeFilterMissingGreaterThanAndLessThan, + "ReplaceFileImportPermissionDenied": connectivity_errors.ReplaceFileImportPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _FileImportClientRaw: + def __init__(self, client: FileImportClient) -> None: + def create(_: connectivity_models.FileImport): ... + def delete(_: None): ... + def execute(_: core_models.BuildRid): ... + def get(_: connectivity_models.FileImport): ... + def list(_: connectivity_models.ListFileImportsResponse): ... + def replace(_: connectivity_models.FileImport): ... + + self.create = core.with_raw_response(create, client.create) + self.delete = core.with_raw_response(delete, client.delete) + self.execute = core.with_raw_response(execute, client.execute) + self.get = core.with_raw_response(get, client.get) + self.list = core.with_raw_response(list, client.list) + self.replace = core.with_raw_response(replace, client.replace) + + +class _FileImportClientStreaming: + def __init__(self, client: FileImportClient) -> None: + def create(_: connectivity_models.FileImport): ... + def execute(_: core_models.BuildRid): ... + def get(_: connectivity_models.FileImport): ... + def list(_: connectivity_models.ListFileImportsResponse): ... + def replace(_: connectivity_models.FileImport): ... + + self.create = core.with_streaming_response(create, client.create) + self.execute = core.with_streaming_response(execute, client.execute) + self.get = core.with_streaming_response(get, client.get) + self.list = core.with_streaming_response(list, client.list) + self.replace = core.with_streaming_response(replace, client.replace) + + +class AsyncFileImportClient: + """ + The API client for the FileImport Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncFileImportClientStreaming(self) + self.with_raw_response = _AsyncFileImportClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def create( + self, + connection_rid: connectivity_models.ConnectionRid, + *, + dataset_rid: datasets_models.DatasetRid, + display_name: connectivity_models.FileImportDisplayName, + file_import_filters: typing.List[connectivity_models.FileImportFilter], + import_mode: connectivity_models.FileImportMode, + branch_name: typing.Optional[datasets_models.BranchName] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + subfolder: typing.Optional[str] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[connectivity_models.FileImport]: + """ + Creates a new FileImport. + :param connection_rid: + :type connection_rid: ConnectionRid + :param dataset_rid: The RID of the output dataset. Can not be modified after the file import is created. + :type dataset_rid: DatasetRid + :param display_name: + :type display_name: FileImportDisplayName + :param file_import_filters: Use filters to limit which files should be imported. Filters are applied in the order they are defined. A different ordering of filters may lead to a more optimized import. [Learn more about optimizing file imports.](https://palantir.com/docs/foundry/data-connection/file-based-syncs/#optimize-file-based-syncs) + :type file_import_filters: List[FileImportFilter] + :param import_mode: + :type import_mode: FileImportMode + :param branch_name: The branch name in the output dataset that will contain the imported data. Defaults to `master` for most enrollments. Can not be modified after the file import is created. + :type branch_name: Optional[BranchName] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param subfolder: A subfolder in the external system that will be imported. If not specified, defaults to the root folder of the external system. + :type subfolder: Optional[str] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[connectivity_models.FileImport] + + :raises ConnectionDetailsNotDetermined: Details of the connection (such as which types of import it supports) could not be determined. + :raises ConnectionNotFound: The given Connection could not be found. + :raises CreateFileImportPermissionDenied: Could not create the FileImport. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises FileAtLeastCountFilterInvalidMinCount: The provided `minFilesCount` property in the FileAtLeastCountFilter must be strictly greater than 0. + :raises FileImportCustomFilterCannotBeUsedToCreateOrUpdateFileImports: Custom file import filters can be fetched but cannot currently be used when creating or updating file imports. + :raises FileImportNotSupportedForConnection: The specified connection does not support file imports. + :raises FileSizeFilterGreaterThanCannotBeNegative: The `gt` property in the FileSizeFilter cannot be a negative number. + :raises FileSizeFilterInvalidGreaterThanAndLessThanRange: The provided `gt` and `lt` properties in the FileSizeFilter are invalid. No files will ever satisfy the provided range. The value specified for `gt` must be strictly less than `lt - 1`. + :raises FileSizeFilterLessThanMustBeOneByteOrLarger: The `lt` property in the FileSizeFilter must be at least 1 byte. + :raises FileSizeFilterMissingGreaterThanAndLessThan: Both the `gt` and `lt` properties are missing from the FileSizeFilter. At least one of these properties must be present + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/connectivity/connections/{connectionRid}/fileImports", + query_params={ + "preview": preview, + }, + path_params={ + "connectionRid": connection_rid, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=connectivity_models.CreateFileImportRequest( + dataset_rid=dataset_rid, + import_mode=import_mode, + display_name=display_name, + branch_name=branch_name, + subfolder=subfolder, + file_import_filters=file_import_filters, + ), + response_type=connectivity_models.FileImport, + request_timeout=request_timeout, + throwable_errors={ + "ConnectionDetailsNotDetermined": connectivity_errors.ConnectionDetailsNotDetermined, + "ConnectionNotFound": connectivity_errors.ConnectionNotFound, + "CreateFileImportPermissionDenied": connectivity_errors.CreateFileImportPermissionDenied, + "DatasetNotFound": datasets_errors.DatasetNotFound, + "FileAtLeastCountFilterInvalidMinCount": connectivity_errors.FileAtLeastCountFilterInvalidMinCount, + "FileImportCustomFilterCannotBeUsedToCreateOrUpdateFileImports": connectivity_errors.FileImportCustomFilterCannotBeUsedToCreateOrUpdateFileImports, + "FileImportNotSupportedForConnection": connectivity_errors.FileImportNotSupportedForConnection, + "FileSizeFilterGreaterThanCannotBeNegative": connectivity_errors.FileSizeFilterGreaterThanCannotBeNegative, + "FileSizeFilterInvalidGreaterThanAndLessThanRange": connectivity_errors.FileSizeFilterInvalidGreaterThanAndLessThanRange, + "FileSizeFilterLessThanMustBeOneByteOrLarger": connectivity_errors.FileSizeFilterLessThanMustBeOneByteOrLarger, + "FileSizeFilterMissingGreaterThanAndLessThan": connectivity_errors.FileSizeFilterMissingGreaterThanAndLessThan, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def delete( + self, + connection_rid: connectivity_models.ConnectionRid, + file_import_rid: connectivity_models.FileImportRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[None]: + """ + Delete the FileImport with the specified RID. + Deleting the file import does not delete the destination dataset but the dataset will no longer + be updated by this import. + + :param connection_rid: + :type connection_rid: ConnectionRid + :param file_import_rid: + :type file_import_rid: FileImportRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[None] + + :raises DeleteFileImportPermissionDenied: Could not delete the FileImport. + :raises FileImportNotFound: The given FileImport could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="DELETE", + resource_path="/v2/connectivity/connections/{connectionRid}/fileImports/{fileImportRid}", + query_params={ + "preview": preview, + }, + path_params={ + "connectionRid": connection_rid, + "fileImportRid": file_import_rid, + }, + header_params={}, + body=None, + response_type=None, + request_timeout=request_timeout, + throwable_errors={ + "DeleteFileImportPermissionDenied": connectivity_errors.DeleteFileImportPermissionDenied, + "FileImportNotFound": connectivity_errors.FileImportNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def execute( + self, + connection_rid: connectivity_models.ConnectionRid, + file_import_rid: connectivity_models.FileImportRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[core_models.BuildRid]: + """ + Executes the FileImport, which runs asynchronously as a [Foundry Build](https://palantir.com/docs/foundry/data-integration/builds/). + The returned BuildRid can be used to check the status via the Orchestration API. + + :param connection_rid: + :type connection_rid: ConnectionRid + :param file_import_rid: + :type file_import_rid: FileImportRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[core_models.BuildRid] + + :raises ExecuteFileImportPermissionDenied: Could not execute the FileImport. + :raises FileImportNotFound: The given FileImport could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/connectivity/connections/{connectionRid}/fileImports/{fileImportRid}/execute", + query_params={ + "preview": preview, + }, + path_params={ + "connectionRid": connection_rid, + "fileImportRid": file_import_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=core_models.BuildRid, + request_timeout=request_timeout, + throwable_errors={ + "ExecuteFileImportPermissionDenied": connectivity_errors.ExecuteFileImportPermissionDenied, + "FileImportNotFound": connectivity_errors.FileImportNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + connection_rid: connectivity_models.ConnectionRid, + file_import_rid: connectivity_models.FileImportRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[connectivity_models.FileImport]: + """ + Get the FileImport with the specified rid. + :param connection_rid: + :type connection_rid: ConnectionRid + :param file_import_rid: + :type file_import_rid: FileImportRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[connectivity_models.FileImport] + + :raises FileImportNotFound: The given FileImport could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/connectivity/connections/{connectionRid}/fileImports/{fileImportRid}", + query_params={ + "preview": preview, + }, + path_params={ + "connectionRid": connection_rid, + "fileImportRid": file_import_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=connectivity_models.FileImport, + request_timeout=request_timeout, + throwable_errors={ + "FileImportNotFound": connectivity_errors.FileImportNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def list( + self, + connection_rid: connectivity_models.ConnectionRid, + *, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.AsyncResourceIterator[connectivity_models.FileImport]: + """ + Lists all file imports defined for this connection. + Only file imports that the user has permissions to view will be returned. + + :param connection_rid: + :type connection_rid: ConnectionRid + :param page_size: The page size to use for the endpoint. + :type page_size: Optional[PageSize] + :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. + :type page_token: Optional[PageToken] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.AsyncResourceIterator[connectivity_models.FileImport] + + :raises ConnectionNotFound: The given Connection could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/connectivity/connections/{connectionRid}/fileImports", + query_params={ + "pageSize": page_size, + "pageToken": page_token, + "preview": preview, + }, + path_params={ + "connectionRid": connection_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=connectivity_models.ListFileImportsResponse, + request_timeout=request_timeout, + throwable_errors={ + "ConnectionNotFound": connectivity_errors.ConnectionNotFound, + }, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def replace( + self, + connection_rid: connectivity_models.ConnectionRid, + file_import_rid: connectivity_models.FileImportRid, + *, + display_name: connectivity_models.FileImportDisplayName, + file_import_filters: typing.List[connectivity_models.FileImportFilter], + import_mode: connectivity_models.FileImportMode, + preview: typing.Optional[core_models.PreviewMode] = None, + subfolder: typing.Optional[str] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[connectivity_models.FileImport]: + """ + Replace the FileImport with the specified rid. + :param connection_rid: + :type connection_rid: ConnectionRid + :param file_import_rid: + :type file_import_rid: FileImportRid + :param display_name: + :type display_name: FileImportDisplayName + :param file_import_filters: Use filters to limit which files should be imported. Filters are applied in the order they are defined. A different ordering of filters may lead to a more optimized import. [Learn more about optimizing file imports.](https://palantir.com/docs/foundry/data-connection/file-based-syncs/#optimize-file-based-syncs) + :type file_import_filters: List[FileImportFilter] + :param import_mode: + :type import_mode: FileImportMode + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param subfolder: A subfolder in the external system that will be imported. If not specified, defaults to the root folder of the external system. + :type subfolder: Optional[str] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[connectivity_models.FileImport] + + :raises FileAtLeastCountFilterInvalidMinCount: The provided `minFilesCount` property in the FileAtLeastCountFilter must be strictly greater than 0. + :raises FileImportCustomFilterCannotBeUsedToCreateOrUpdateFileImports: Custom file import filters can be fetched but cannot currently be used when creating or updating file imports. + :raises FileImportNotFound: The given FileImport could not be found. + :raises FileSizeFilterGreaterThanCannotBeNegative: The `gt` property in the FileSizeFilter cannot be a negative number. + :raises FileSizeFilterInvalidGreaterThanAndLessThanRange: The provided `gt` and `lt` properties in the FileSizeFilter are invalid. No files will ever satisfy the provided range. The value specified for `gt` must be strictly less than `lt - 1`. + :raises FileSizeFilterLessThanMustBeOneByteOrLarger: The `lt` property in the FileSizeFilter must be at least 1 byte. + :raises FileSizeFilterMissingGreaterThanAndLessThan: Both the `gt` and `lt` properties are missing from the FileSizeFilter. At least one of these properties must be present + :raises ReplaceFileImportPermissionDenied: Could not replace the FileImport. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="PUT", + resource_path="/v2/connectivity/connections/{connectionRid}/fileImports/{fileImportRid}", + query_params={ + "preview": preview, + }, + path_params={ + "connectionRid": connection_rid, + "fileImportRid": file_import_rid, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=connectivity_models.ReplaceFileImportRequest( + import_mode=import_mode, + display_name=display_name, + subfolder=subfolder, + file_import_filters=file_import_filters, + ), + response_type=connectivity_models.FileImport, + request_timeout=request_timeout, + throwable_errors={ + "FileAtLeastCountFilterInvalidMinCount": connectivity_errors.FileAtLeastCountFilterInvalidMinCount, + "FileImportCustomFilterCannotBeUsedToCreateOrUpdateFileImports": connectivity_errors.FileImportCustomFilterCannotBeUsedToCreateOrUpdateFileImports, + "FileImportNotFound": connectivity_errors.FileImportNotFound, + "FileSizeFilterGreaterThanCannotBeNegative": connectivity_errors.FileSizeFilterGreaterThanCannotBeNegative, + "FileSizeFilterInvalidGreaterThanAndLessThanRange": connectivity_errors.FileSizeFilterInvalidGreaterThanAndLessThanRange, + "FileSizeFilterLessThanMustBeOneByteOrLarger": connectivity_errors.FileSizeFilterLessThanMustBeOneByteOrLarger, + "FileSizeFilterMissingGreaterThanAndLessThan": connectivity_errors.FileSizeFilterMissingGreaterThanAndLessThan, + "ReplaceFileImportPermissionDenied": connectivity_errors.ReplaceFileImportPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _AsyncFileImportClientRaw: + def __init__(self, client: AsyncFileImportClient) -> None: + def create(_: connectivity_models.FileImport): ... + def delete(_: None): ... + def execute(_: core_models.BuildRid): ... + def get(_: connectivity_models.FileImport): ... + def list(_: connectivity_models.ListFileImportsResponse): ... + def replace(_: connectivity_models.FileImport): ... + + self.create = core.async_with_raw_response(create, client.create) + self.delete = core.async_with_raw_response(delete, client.delete) + self.execute = core.async_with_raw_response(execute, client.execute) + self.get = core.async_with_raw_response(get, client.get) + self.list = core.async_with_raw_response(list, client.list) + self.replace = core.async_with_raw_response(replace, client.replace) + + +class _AsyncFileImportClientStreaming: + def __init__(self, client: AsyncFileImportClient) -> None: + def create(_: connectivity_models.FileImport): ... + def execute(_: core_models.BuildRid): ... + def get(_: connectivity_models.FileImport): ... + def list(_: connectivity_models.ListFileImportsResponse): ... + def replace(_: connectivity_models.FileImport): ... + + self.create = core.async_with_streaming_response(create, client.create) + self.execute = core.async_with_streaming_response(execute, client.execute) + self.get = core.async_with_streaming_response(get, client.get) + self.list = core.async_with_streaming_response(list, client.list) + self.replace = core.async_with_streaming_response(replace, client.replace) diff --git a/foundry_sdk/v2/connectivity/models.py b/foundry_sdk/v2/connectivity/models.py new file mode 100644 index 000000000..83cc2779f --- /dev/null +++ b/foundry_sdk/v2/connectivity/models.py @@ -0,0 +1,2268 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +from __future__ import annotations + +import decimal +import typing +from datetime import date + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk.v2.core import models as core_models +from foundry_sdk.v2.datasets import models as datasets_models +from foundry_sdk.v2.filesystem import models as filesystem_models + + +class ApiKeyAuthentication(core.ModelBase): + """ + The API key used to authenticate to the external system. + This can be configured as a header or query parameter. + """ + + location: RestRequestApiKeyLocation + """The location of the API key in the request.""" + + api_key: EncryptedProperty = pydantic.Field(alias=str("apiKey")) # type: ignore[literal-required] + """The value of the API key.""" + + type: typing.Literal["apiKey"] = "apiKey" + + +class AsPlaintextValue(core.ModelBase): + """AsPlaintextValue""" + + value: PlaintextValue + type: typing.Literal["asPlaintextValue"] = "asPlaintextValue" + + +class AsSecretName(core.ModelBase): + """AsSecretName""" + + value: SecretName + type: typing.Literal["asSecretName"] = "asSecretName" + + +class AwsAccessKey(core.ModelBase): + """ + [Access keys](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html) are long-term + credentials for an IAM user or the AWS account root user. + Access keys consist of two parts: an access key ID (for example, AKIAIOSFODNN7EXAMPLE) and a secret access + key (for example, wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY). You must use both the access key ID and + secret access key together to authenticate your requests. + """ + + access_key_id: str = pydantic.Field(alias=str("accessKeyId")) # type: ignore[literal-required] + secret_access_key: EncryptedProperty = pydantic.Field(alias=str("secretAccessKey")) # type: ignore[literal-required] + type: typing.Literal["awsAccessKey"] = "awsAccessKey" + + +class AwsOidcAuthentication(core.ModelBase): + """ + [OpenID Connect (OIDC)](https://palantir.com/docs/foundry/data-connection/oidc/) is an open authentication protocol that allows + you to authenticate to external system resources without the use of static credentials. + """ + + audience: str + """The configured audience that identifies the external system.""" + + issuer_url: str = pydantic.Field(alias=str("issuerUrl")) # type: ignore[literal-required] + """The URL that identifies Foundry as an OIDC identity provider.""" + + subject: ConnectionRid + """The RID of the Connection that is connecting to the external system.""" + + type: typing.Literal["oidc"] = "oidc" + + +class BasicCredentials(core.ModelBase): + """BasicCredentials""" + + username: str + password: EncryptedProperty + type: typing.Literal["basic"] = "basic" + + +class BearerToken(core.ModelBase): + """The bearer token used to authenticate to the external system.""" + + bearer_token: EncryptedProperty = pydantic.Field(alias=str("bearerToken")) # type: ignore[literal-required] + type: typing.Literal["bearerToken"] = "bearerToken" + + +class BigQueryVirtualTableConfig(core.ModelBase): + """Pointer to the table in BigQuery. Uses the BigQuery table identifier of project, dataset and table.""" + + project: str + """The BigQuery project name.""" + + dataset: str + """The BigQuery dataset name.""" + + table: str + """The BigQuery table name.""" + + type: typing.Literal["bigquery"] = "bigquery" + + +class CloudIdentity(core.ModelBase): + """ + [Cloud identities](https://palantir.com/docs/foundry/administration/configure-cloud-identities/) allow you to authenticate to + cloud provider resources without the use of static credentials. + """ + + cloud_identity_rid: CloudIdentityRid = pydantic.Field(alias=str("cloudIdentityRid")) # type: ignore[literal-required] + type: typing.Literal["cloudIdentity"] = "cloudIdentity" + + +CloudIdentityRid = core.RID +"""The Resource Identifier (RID) of a Cloud Identity.""" + + +class Connection(core.ModelBase): + """Connection""" + + rid: ConnectionRid + parent_folder_rid: filesystem_models.FolderRid = pydantic.Field(alias=str("parentFolderRid")) # type: ignore[literal-required] + display_name: ConnectionDisplayName = pydantic.Field(alias=str("displayName")) # type: ignore[literal-required] + """The display name of the Connection. The display name must not be blank.""" + + export_settings: ConnectionExportSettings = pydantic.Field(alias=str("exportSettings")) # type: ignore[literal-required] + worker: ConnectionWorker + configuration: ConnectionConfiguration + + +ConnectionConfiguration = typing_extensions.Annotated[ + typing.Union[ + "S3ConnectionConfiguration", + "RestConnectionConfiguration", + "SnowflakeConnectionConfiguration", + "DatabricksConnectionConfiguration", + "SmbConnectionConfiguration", + "JdbcConnectionConfiguration", + ], + pydantic.Field(discriminator="type"), +] +"""ConnectionConfiguration""" + + +ConnectionDisplayName = str +"""The display name of the Connection. The display name must not be blank.""" + + +class ConnectionExportSettings(core.ModelBase): + """The [export settings of a Connection](https://palantir.com/docs/foundry/data-connection/export-overview/#enable-exports-for-source).""" + + exports_enabled: bool = pydantic.Field(alias=str("exportsEnabled")) # type: ignore[literal-required] + """Allow exporting datasets from Foundry to this Connection.""" + + export_enabled_without_markings_validation: bool = pydantic.Field(alias=str("exportEnabledWithoutMarkingsValidation")) # type: ignore[literal-required] + """ + In certain interactive workflows the Connection can be used in, it is not currently possible to validate the + security markings of the data being exported. + By enabling exports without markings validation, you acknowledge that you are responsible for ensuring + that the data being exported is compliant with your organization's policies. + """ + + +ConnectionRid = core.RID +"""The Resource Identifier (RID) of a Connection (also known as a source).""" + + +ConnectionWorker = typing_extensions.Annotated[ + typing.Union["UnknownWorker", "FoundryWorker"], pydantic.Field(discriminator="type") +] +""" +[The worker of a Connection](https://palantir.com/docs/foundry/data-connection/core-concepts/#workers), which defines where +compute for capabilities are run. +""" + + +class CreateConnectionRequest(core.ModelBase): + """CreateConnectionRequest""" + + parent_folder_rid: filesystem_models.FolderRid = pydantic.Field(alias=str("parentFolderRid")) # type: ignore[literal-required] + configuration: CreateConnectionRequestConnectionConfiguration + display_name: ConnectionDisplayName = pydantic.Field(alias=str("displayName")) # type: ignore[literal-required] + """The display name of the Connection. The display name must not be blank.""" + + worker: CreateConnectionRequestConnectionWorker + + +class CreateConnectionRequestAsPlaintextValue(core.ModelBase): + """CreateConnectionRequestAsPlaintextValue""" + + value: PlaintextValue + type: typing.Literal["asPlaintextValue"] = "asPlaintextValue" + + +class CreateConnectionRequestAsSecretName(core.ModelBase): + """CreateConnectionRequestAsSecretName""" + + value: SecretName + type: typing.Literal["asSecretName"] = "asSecretName" + + +class CreateConnectionRequestBasicCredentials(core.ModelBase): + """CreateConnectionRequestBasicCredentials""" + + password: CreateConnectionRequestEncryptedProperty + username: str + type: typing.Literal["basic"] = "basic" + + +CreateConnectionRequestConnectionConfiguration = typing_extensions.Annotated[ + typing.Union[ + "CreateConnectionRequestS3ConnectionConfiguration", + "CreateConnectionRequestRestConnectionConfiguration", + "CreateConnectionRequestSnowflakeConnectionConfiguration", + "CreateConnectionRequestDatabricksConnectionConfiguration", + "CreateConnectionRequestSmbConnectionConfiguration", + "CreateConnectionRequestJdbcConnectionConfiguration", + ], + pydantic.Field(discriminator="type"), +] +"""CreateConnectionRequestConnectionConfiguration""" + + +CreateConnectionRequestConnectionWorker = typing_extensions.Annotated[ + typing.Union["CreateConnectionRequestUnknownWorker", "CreateConnectionRequestFoundryWorker"], + pydantic.Field(discriminator="type"), +] +""" +[The worker of a Connection](https://palantir.com/docs/foundry/data-connection/core-concepts/#workers), which defines where +compute for capabilities are run. +""" + + +CreateConnectionRequestDatabricksAuthenticationMode = typing_extensions.Annotated[ + typing.Union[ + "CreateConnectionRequestWorkflowIdentityFederation", + "CreateConnectionRequestOauthMachineToMachineAuth", + "CreateConnectionRequestPersonalAccessToken", + "CreateConnectionRequestBasicCredentials", + ], + pydantic.Field(discriminator="type"), +] +"""The method of authentication for connecting to an external Databricks system.""" + + +class CreateConnectionRequestDatabricksConnectionConfiguration(core.ModelBase): + """CreateConnectionRequestDatabricksConnectionConfiguration""" + + host_name: str = pydantic.Field(alias=str("hostName")) # type: ignore[literal-required] + """The hostname of the Databricks workspace.""" + + http_path: str = pydantic.Field(alias=str("httpPath")) # type: ignore[literal-required] + """The Databricks compute resource’s HTTP Path value.""" + + jdbc_properties: JdbcProperties = pydantic.Field(alias=str("jdbcProperties")) # type: ignore[literal-required] + authentication: CreateConnectionRequestDatabricksAuthenticationMode + """The method of authentication to use.""" + + type: typing.Literal["databricks"] = "databricks" + + +CreateConnectionRequestEncryptedProperty = typing_extensions.Annotated[ + typing.Union["CreateConnectionRequestAsSecretName", "CreateConnectionRequestAsPlaintextValue"], + pydantic.Field(discriminator="type"), +] +""" +When reading an encrypted property, the secret name representing the encrypted value will be returned. +When writing to an encrypted property: +- If a plaintext value is passed as an input, the plaintext value will be encrypted and saved to the property. +- If a secret name is passed as an input, the secret name must match the existing secret name of the property + and the property will retain its previously encrypted value. +""" + + +class CreateConnectionRequestFoundryWorker(core.ModelBase): + """CreateConnectionRequestFoundryWorker""" + + network_egress_policy_rids: typing.List[NetworkEgressPolicyRid] = pydantic.Field(alias=str("networkEgressPolicyRids")) # type: ignore[literal-required] + type: typing.Literal["foundryWorker"] = "foundryWorker" + + +class CreateConnectionRequestJdbcConnectionConfiguration(core.ModelBase): + """CreateConnectionRequestJdbcConnectionConfiguration""" + + credentials: typing.Optional[BasicCredentials] = None + driver_class: str = pydantic.Field(alias=str("driverClass")) # type: ignore[literal-required] + """The fully-qualified driver class name that is used to connect to the database.""" + + jdbc_properties: JdbcProperties = pydantic.Field(alias=str("jdbcProperties")) # type: ignore[literal-required] + url: str + """The URL that the JDBC driver uses to connect to a database.""" + + type: typing.Literal["jdbc"] = "jdbc" + + +class CreateConnectionRequestOauthMachineToMachineAuth(core.ModelBase): + """CreateConnectionRequestOauthMachineToMachineAuth""" + + client_id: str = pydantic.Field(alias=str("clientID")) # type: ignore[literal-required] + """The client ID for the service principal.""" + + client_secret: CreateConnectionRequestEncryptedProperty = pydantic.Field(alias=str("clientSecret")) # type: ignore[literal-required] + """The value of the client secret.""" + + type: typing.Literal["oauthM2M"] = "oauthM2M" + + +class CreateConnectionRequestPersonalAccessToken(core.ModelBase): + """CreateConnectionRequestPersonalAccessToken""" + + personal_access_token: CreateConnectionRequestEncryptedProperty = pydantic.Field(alias=str("personalAccessToken")) # type: ignore[literal-required] + type: typing.Literal["personalAccessToken"] = "personalAccessToken" + + +class CreateConnectionRequestRestConnectionConfiguration(core.ModelBase): + """CreateConnectionRequestRestConnectionConfiguration""" + + additional_secrets: typing.Optional[RestConnectionAdditionalSecrets] = pydantic.Field(alias=str("additionalSecrets"), default=None) # type: ignore[literal-required] + """ + Additional secrets that can be referenced in code and webhook configurations. + If not provided, no additional secrets will be created. + """ + + oauth2_client_rid: typing.Optional[core.RID] = pydantic.Field(alias=str("oauth2ClientRid"), default=None) # type: ignore[literal-required] + """ + The RID of the [Outbound application](https://palantir.com/docs/foundry/administration/configure-outbound-applications) that is used to authenticate to the external system via OAuth2. + Currently, a connection may use only one outbound application for OAuth 2.0 authentication. + Selecting a different outbound application will update the configuration for all domains with OAuth 2.0 as the selected authorization. + """ + + domains: typing.List[Domain] + """ + The domains that the connection is allowed to access. + At least one domain must be specified. + """ + + type: typing.Literal["rest"] = "rest" + + +class CreateConnectionRequestS3ConnectionConfiguration(core.ModelBase): + """CreateConnectionRequestS3ConnectionConfiguration""" + + connection_timeout_millis: typing.Optional[core.Long] = pydantic.Field(alias=str("connectionTimeoutMillis"), default=None) # type: ignore[literal-required] + """ + The amount of time (in milliseconds) to wait when initially establishing a connection before giving up and timing out. + If not specified, defaults to 10000 as defined by the [AWS SDK default](https://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/ClientConfiguration.html#DEFAULT_CONNECTION_TIMEOUT). + """ + + max_error_retry: typing.Optional[int] = pydantic.Field(alias=str("maxErrorRetry"), default=None) # type: ignore[literal-required] + """ + The maximum number of retry attempts for failed requests to the S3 service. + If not specified, defaults to 3 as defined by the [AWS SDK default](https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/retry-strategy.html#retry-strategies). + """ + + bucket_url: str = pydantic.Field(alias=str("bucketUrl")) # type: ignore[literal-required] + """The URL of the S3 bucket. The URL should contain a trailing slash.""" + + client_kms_configuration: typing.Optional[S3KmsConfiguration] = pydantic.Field(alias=str("clientKmsConfiguration"), default=None) # type: ignore[literal-required] + """ + The client-side KMS key to use for encryption and decryption of data in the S3 bucket. + If not specified, the default KMS key for the bucket is used. + """ + + match_subfolder_exactly: typing.Optional[bool] = pydantic.Field(alias=str("matchSubfolderExactly"), default=None) # type: ignore[literal-required] + """ + If true, only files in the subfolder specified in the bucket URL will be synced. + If false, all files in the bucket will be synced. + If not specified, defaults to false. + """ + + sts_role_configuration: typing.Optional[StsRoleConfiguration] = pydantic.Field(alias=str("stsRoleConfiguration"), default=None) # type: ignore[literal-required] + """The configuration needed to assume a role to connect to the S3 external system.""" + + s3_endpoint: typing.Optional[str] = pydantic.Field(alias=str("s3Endpoint"), default=None) # type: ignore[literal-required] + """ + The endpoint of the S3 service. This is used to connect to a custom S3 service that is not AWS S3. + If not specified, defaults to the [AWS S3 endpoint](https://docs.aws.amazon.com/general/latest/gr/s3.html). + Warning: Specifying a region and a custom endpoint containing a region can lead to unexpected behavior. + """ + + socket_timeout_millis: typing.Optional[core.Long] = pydantic.Field(alias=str("socketTimeoutMillis"), default=None) # type: ignore[literal-required] + """ + The amount of time (in milliseconds) to wait for data to be transferred over an established, open connection. + If not specified, defaults to 50000 as defined by the [AWS SDK default](https://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/ClientConfiguration.html#DEFAULT_SOCKET_TIMEOUT). + """ + + enable_requester_pays: typing.Optional[bool] = pydantic.Field(alias=str("enableRequesterPays"), default=None) # type: ignore[literal-required] + """ + Defaults to false, unless set and overwritten. + If true, includes the [requester pays header](https://docs.aws.amazon.com/AmazonS3/latest/userguide/RequesterPaysBuckets.html) + in requests, allowing reads from requester pays buckets. + """ + + s3_endpoint_signing_region: typing.Optional[Region] = pydantic.Field(alias=str("s3EndpointSigningRegion"), default=None) # type: ignore[literal-required] + """ + The region used when constructing the S3 client using a custom endpoint. + This is often not required and would only be needed if you are using the S3 connector with an S3-compliant third-party API, + and are also setting a custom endpoint that requires a non-default region. + """ + + region: typing.Optional[Region] = None + """ + The region representing the location of the S3 bucket. + Warning: Specifying a region and a custom endpoint containing a region can lead to unexpected behavior. + """ + + authentication_mode: typing.Optional[S3AuthenticationMode] = pydantic.Field(alias=str("authenticationMode"), default=None) # type: ignore[literal-required] + """ + The authentication mode to use to connect to the S3 external system. No authentication mode is required + to connect to publicly accessible AWS S3 buckets. + """ + + proxy_configuration: typing.Optional[S3ProxyConfiguration] = pydantic.Field(alias=str("proxyConfiguration"), default=None) # type: ignore[literal-required] + """The configuration needed to connect to the S3 external system through a proxy.""" + + max_connections: typing.Optional[int] = pydantic.Field(alias=str("maxConnections"), default=None) # type: ignore[literal-required] + """ + The maximum number of HTTP connections to the S3 service per sync. + If not specified, defaults to 50 as defined by the [AWS SDK default](https://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/ClientConfiguration.html#DEFAULT_MAX_CONNECTIONS). + """ + + type: typing.Literal["s3"] = "s3" + + +class CreateConnectionRequestSmbConnectionConfiguration(core.ModelBase): + """CreateConnectionRequestSmbConnectionConfiguration""" + + proxy: typing.Optional[SmbProxyConfiguration] = None + hostname: str + """ + Any identifier that can resolve to a server hosting an SMB share. This includes IP addresses, local + network names (e.g. FS-SERVER-01) or FQDNs. Should not include any protocol information like https://, smb://, etc + """ + + port: typing.Optional[int] = None + """445 by default""" + + auth: CreateConnectionRequestSmbAuth + share: str + """ + Must be a valid SMB share name. + https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-fscc/dc9978d7-6299-4c5a-a22d-a039cdc716ea + """ + + base_directory: typing.Optional[str] = pydantic.Field(alias=str("baseDirectory"), default=None) # type: ignore[literal-required] + """All reads and writes in this source will happen in this subdirectory""" + + require_message_signing: typing.Optional[bool] = pydantic.Field(alias=str("requireMessageSigning"), default=None) # type: ignore[literal-required] + """ + If true, the client will request that the server sign all messages. If the server does not support + message signing, the connection will fail. Defaults to true. + """ + + type: typing.Literal["smb"] = "smb" + + +class CreateConnectionRequestSmbUsernamePasswordAuth(core.ModelBase): + """CreateConnectionRequestSmbUsernamePasswordAuth""" + + password: CreateConnectionRequestEncryptedProperty + domain: typing.Optional[str] = None + """ + Optionally specify a Windows domain to use when authenticating. Normal DNS domain restrictions apply + but the top-level domain might be something non-standard like .local. Defaults to WORKGROUP + """ + + username: str + type: typing.Literal["usernamePassword"] = "usernamePassword" + + +CreateConnectionRequestSnowflakeAuthenticationMode = typing_extensions.Annotated[ + typing.Union[ + "CreateConnectionRequestSnowflakeExternalOauth", + "CreateConnectionRequestSnowflakeKeyPairAuthentication", + "CreateConnectionRequestBasicCredentials", + ], + pydantic.Field(discriminator="type"), +] +"""CreateConnectionRequestSnowflakeAuthenticationMode""" + + +class CreateConnectionRequestSnowflakeConnectionConfiguration(core.ModelBase): + """CreateConnectionRequestSnowflakeConnectionConfiguration""" + + schema_: typing.Optional[str] = pydantic.Field(alias=str("schema"), default=None) # type: ignore[literal-required] + """ + Specifies the default schema to use for the specified database once connected. If unspecified, + defaults to the empty string. + The specified schema should be an existing schema for which the specified default role has privileges. + + See https://docs.snowflake.com/developer-guide/jdbc/jdbc-parameters#schema + """ + + database: typing.Optional[str] = None + """ + Specifies the default database to use once connected. If unspecified, defaults to the empty string. + The specified database should be an existing database for which the specified default role has privileges. + + See https://docs.snowflake.com/developer-guide/jdbc/jdbc-parameters#db + """ + + role: typing.Optional[str] = None + """ + Specifies the default access control role to use in the Snowflake session initiated by the driver. + If unspecified, no role will be used when the session is initiated by the driver. + + The specified role should be an existing role that has already been assigned to the specified user for + the driver. If the specified role has not already been assigned to the user, the role is not used when + the session is initiated by the driver. + + See https://docs.snowflake.com/developer-guide/jdbc/jdbc-parameters#role + """ + + account_identifier: str = pydantic.Field(alias=str("accountIdentifier")) # type: ignore[literal-required] + """ + An [account identifier](https://docs.snowflake.com/en/user-guide/admin-account-identifier) uniquely + identifies a Snowflake account within your organization, as well as throughout the global network of + Snowflake-supported cloud platforms and cloud regions. + + The URL for an account uses the following format: .snowflakecomputing.com. + An example URL is https://acme-test_aws_us_east_2.snowflakecomputing.com. + """ + + jdbc_properties: JdbcProperties = pydantic.Field(alias=str("jdbcProperties")) # type: ignore[literal-required] + warehouse: typing.Optional[str] = None + """ + Specifies the virtual warehouse to use once connected. If unspecified, defaults to the empty string. + The specified warehouse should be an existing warehouse for which the specified default role has privileges. + + See https://docs.snowflake.com/developer-guide/jdbc/jdbc-parameters#warehouse + """ + + authentication_mode: CreateConnectionRequestSnowflakeAuthenticationMode = pydantic.Field(alias=str("authenticationMode")) # type: ignore[literal-required] + """The authentication mode to use to connect to the Snowflake database.""" + + type: typing.Literal["snowflake"] = "snowflake" + + +class CreateConnectionRequestSnowflakeExternalOauth(core.ModelBase): + """CreateConnectionRequestSnowflakeExternalOauth""" + + type: typing.Literal["externalOauth"] = "externalOauth" + + +class CreateConnectionRequestSnowflakeKeyPairAuthentication(core.ModelBase): + """CreateConnectionRequestSnowflakeKeyPairAuthentication""" + + private_key: CreateConnectionRequestEncryptedProperty = pydantic.Field(alias=str("privateKey")) # type: ignore[literal-required] + user: str + type: typing.Literal["keyPair"] = "keyPair" + + +class CreateConnectionRequestUnknownWorker(core.ModelBase): + """CreateConnectionRequestUnknownWorker""" + + type: typing.Literal["unknownWorker"] = "unknownWorker" + + +class CreateConnectionRequestWorkflowIdentityFederation(core.ModelBase): + """CreateConnectionRequestWorkflowIdentityFederation""" + + audience: str + """ + Identifies the recipients that the access token is intended for as a string URI. + This should be the primary host name where the Connection lives. + """ + + service_principal_application_id: typing.Optional[str] = pydantic.Field(alias=str("servicePrincipalApplicationId"), default=None) # type: ignore[literal-required] + """ + The ID of the Databricks [service principal](https://docs.databricks.com/aws/en/admin/users-groups/service-principals). + If provided, a federated JWT token is exchanged using a + service principal federation policy. If not provided, a federated JWT token is exchanged using an account + federation policy. + """ + + type: typing.Literal["workflowIdentityFederation"] = "workflowIdentityFederation" + + +class CreateFileImportRequest(core.ModelBase): + """CreateFileImportRequest""" + + dataset_rid: datasets_models.DatasetRid = pydantic.Field(alias=str("datasetRid")) # type: ignore[literal-required] + """The RID of the output dataset. Can not be modified after the file import is created.""" + + import_mode: FileImportMode = pydantic.Field(alias=str("importMode")) # type: ignore[literal-required] + display_name: FileImportDisplayName = pydantic.Field(alias=str("displayName")) # type: ignore[literal-required] + branch_name: typing.Optional[datasets_models.BranchName] = pydantic.Field(alias=str("branchName"), default=None) # type: ignore[literal-required] + """The branch name in the output dataset that will contain the imported data. Defaults to `master` for most enrollments. Can not be modified after the file import is created.""" + + subfolder: typing.Optional[str] = None + """A subfolder in the external system that will be imported. If not specified, defaults to the root folder of the external system.""" + + file_import_filters: typing.List[FileImportFilter] = pydantic.Field(alias=str("fileImportFilters")) # type: ignore[literal-required] + """Use filters to limit which files should be imported. Filters are applied in the order they are defined. A different ordering of filters may lead to a more optimized import. [Learn more about optimizing file imports.](https://palantir.com/docs/foundry/data-connection/file-based-syncs/#optimize-file-based-syncs)""" + + +class CreateTableImportRequest(core.ModelBase): + """CreateTableImportRequest""" + + dataset_rid: datasets_models.DatasetRid = pydantic.Field(alias=str("datasetRid")) # type: ignore[literal-required] + """The RID of the output dataset. Can not be modified after the table import is created.""" + + import_mode: TableImportMode = pydantic.Field(alias=str("importMode")) # type: ignore[literal-required] + display_name: TableImportDisplayName = pydantic.Field(alias=str("displayName")) # type: ignore[literal-required] + allow_schema_changes: typing.Optional[TableImportAllowSchemaChanges] = pydantic.Field(alias=str("allowSchemaChanges"), default=None) # type: ignore[literal-required] + """Allow the TableImport to succeed if the schema of imported rows does not match the existing dataset's schema. Defaults to false for new table imports.""" + + branch_name: typing.Optional[datasets_models.BranchName] = pydantic.Field(alias=str("branchName"), default=None) # type: ignore[literal-required] + """The branch name in the output dataset that will contain the imported data. Defaults to `master` for most enrollments. Can not be modified after the table import is created.""" + + config: CreateTableImportRequestTableImportConfig + + +class CreateTableImportRequestDatabricksTableImportConfig(core.ModelBase): + """CreateTableImportRequestDatabricksTableImportConfig""" + + initial_incremental_state: typing.Optional[TableImportInitialIncrementalState] = pydantic.Field(alias=str("initialIncrementalState"), default=None) # type: ignore[literal-required] + query: TableImportQuery + type: typing.Literal["databricksImportConfig"] = "databricksImportConfig" + + +class CreateTableImportRequestJdbcTableImportConfig(core.ModelBase): + """CreateTableImportRequestJdbcTableImportConfig""" + + initial_incremental_state: typing.Optional[TableImportInitialIncrementalState] = pydantic.Field(alias=str("initialIncrementalState"), default=None) # type: ignore[literal-required] + query: TableImportQuery + type: typing.Literal["jdbcImportConfig"] = "jdbcImportConfig" + + +class CreateTableImportRequestMicrosoftAccessTableImportConfig(core.ModelBase): + """CreateTableImportRequestMicrosoftAccessTableImportConfig""" + + initial_incremental_state: typing.Optional[TableImportInitialIncrementalState] = pydantic.Field(alias=str("initialIncrementalState"), default=None) # type: ignore[literal-required] + query: TableImportQuery + type: typing.Literal["microsoftAccessImportConfig"] = "microsoftAccessImportConfig" + + +class CreateTableImportRequestMicrosoftSqlServerTableImportConfig(core.ModelBase): + """CreateTableImportRequestMicrosoftSqlServerTableImportConfig""" + + initial_incremental_state: typing.Optional[TableImportInitialIncrementalState] = pydantic.Field(alias=str("initialIncrementalState"), default=None) # type: ignore[literal-required] + query: TableImportQuery + type: typing.Literal["microsoftSqlServerImportConfig"] = "microsoftSqlServerImportConfig" + + +class CreateTableImportRequestOracleTableImportConfig(core.ModelBase): + """CreateTableImportRequestOracleTableImportConfig""" + + initial_incremental_state: typing.Optional[TableImportInitialIncrementalState] = pydantic.Field(alias=str("initialIncrementalState"), default=None) # type: ignore[literal-required] + query: TableImportQuery + type: typing.Literal["oracleImportConfig"] = "oracleImportConfig" + + +class CreateTableImportRequestPostgreSqlTableImportConfig(core.ModelBase): + """CreateTableImportRequestPostgreSqlTableImportConfig""" + + initial_incremental_state: typing.Optional[TableImportInitialIncrementalState] = pydantic.Field(alias=str("initialIncrementalState"), default=None) # type: ignore[literal-required] + query: TableImportQuery + type: typing.Literal["postgreSqlImportConfig"] = "postgreSqlImportConfig" + + +class CreateTableImportRequestSnowflakeTableImportConfig(core.ModelBase): + """CreateTableImportRequestSnowflakeTableImportConfig""" + + initial_incremental_state: typing.Optional[TableImportInitialIncrementalState] = pydantic.Field(alias=str("initialIncrementalState"), default=None) # type: ignore[literal-required] + query: TableImportQuery + type: typing.Literal["snowflakeImportConfig"] = "snowflakeImportConfig" + + +CreateTableImportRequestTableImportConfig = typing_extensions.Annotated[ + typing.Union[ + "CreateTableImportRequestDatabricksTableImportConfig", + "CreateTableImportRequestJdbcTableImportConfig", + "CreateTableImportRequestMicrosoftSqlServerTableImportConfig", + "CreateTableImportRequestPostgreSqlTableImportConfig", + "CreateTableImportRequestMicrosoftAccessTableImportConfig", + "CreateTableImportRequestSnowflakeTableImportConfig", + "CreateTableImportRequestOracleTableImportConfig", + ], + pydantic.Field(discriminator="type"), +] +"""The import configuration for a specific [connector type](https://palantir.com/docs/foundry/data-integration/source-type-overview).""" + + +class CreateVirtualTableRequest(core.ModelBase): + """CreateVirtualTableRequest""" + + markings: typing.Optional[typing.List[core_models.MarkingId]] = None + parent_rid: filesystem_models.FolderRid = pydantic.Field(alias=str("parentRid")) # type: ignore[literal-required] + name: TableName + config: VirtualTableConfig + + +DatabricksAuthenticationMode = typing_extensions.Annotated[ + typing.Union[ + "WorkflowIdentityFederation", + "OauthMachineToMachineAuth", + "PersonalAccessToken", + "BasicCredentials", + ], + pydantic.Field(discriminator="type"), +] +"""The method of authentication for connecting to an external Databricks system.""" + + +class DatabricksConnectionConfiguration(core.ModelBase): + """ + The configuration needed to connect to a [Databricks external system](https://palantir.com/docs/foundry/available-connectors/databricks). + Refer to the [official Databricks documentation](https://docs.databricks.com/aws/en/integrations/compute-details) + for more information on how to obtain connection details for your system. + """ + + host_name: str = pydantic.Field(alias=str("hostName")) # type: ignore[literal-required] + """The hostname of the Databricks workspace.""" + + http_path: str = pydantic.Field(alias=str("httpPath")) # type: ignore[literal-required] + """The Databricks compute resource’s HTTP Path value.""" + + authentication: DatabricksAuthenticationMode + """The method of authentication to use.""" + + jdbc_properties: JdbcProperties = pydantic.Field(alias=str("jdbcProperties")) # type: ignore[literal-required] + type: typing.Literal["databricks"] = "databricks" + + +class DatabricksTableImportConfig(core.ModelBase): + """The table import configuration for a [Databricks connection](https://palantir.com/docs/foundry/available-connectors/databricks).""" + + query: TableImportQuery + initial_incremental_state: typing.Optional[TableImportInitialIncrementalState] = pydantic.Field(alias=str("initialIncrementalState"), default=None) # type: ignore[literal-required] + type: typing.Literal["databricksImportConfig"] = "databricksImportConfig" + + +class DateColumnInitialIncrementalState(core.ModelBase): + """The state for an incremental table import using a column with a date type.""" + + column_name: str = pydantic.Field(alias=str("columnName")) # type: ignore[literal-required] + current_value: date = pydantic.Field(alias=str("currentValue")) # type: ignore[literal-required] + """The initial incremental state value for the date column to reference in the query.""" + + type: typing.Literal["dateColumnInitialIncrementalState"] = "dateColumnInitialIncrementalState" + + +class DecimalColumnInitialIncrementalState(core.ModelBase): + """The state for an incremental table import using a column with a decimal data type.""" + + column_name: str = pydantic.Field(alias=str("columnName")) # type: ignore[literal-required] + current_value: decimal.Decimal = pydantic.Field(alias=str("currentValue")) # type: ignore[literal-required] + """The initial incremental state value for the decimal column to reference in the query.""" + + type: typing.Literal["decimalColumnInitialIncrementalState"] = ( + "decimalColumnInitialIncrementalState" + ) + + +class DeltaVirtualTableConfig(core.ModelBase): + """Pointer to the Delta table in cloud object storage (e.g., Azure Data Lake Storage, Google Cloud Storage, S3).""" + + path: str + """The path of the Delta table in object storage.""" + + type: typing.Literal["delta"] = "delta" + + +class Domain(core.ModelBase): + """The domain that the connection is allowed to access.""" + + scheme: typing.Optional[UriScheme] = None + """ + The scheme of the domain that the connection is allowed to access. + If not specified, defaults to HTTPS. + """ + + host: str + """The domain name, IPv4, or IPv6 address.""" + + port: typing.Optional[int] = None + """The port number of the domain that the connection is allowed to access.""" + + auth: typing.Optional[RestAuthenticationMode] = None + """ + The URI scheme must be HTTPS if using any authentication. + If not specified, no authentication is required. + """ + + +EncryptedProperty = typing_extensions.Annotated[ + typing.Union["AsSecretName", "AsPlaintextValue"], pydantic.Field(discriminator="type") +] +""" +When reading an encrypted property, the secret name representing the encrypted value will be returned. +When writing to an encrypted property: +- If a plaintext value is passed as an input, the plaintext value will be encrypted and saved to the property. +- If a secret name is passed as an input, the secret name must match the existing secret name of the property + and the property will retain its previously encrypted value. +""" + + +class FileAnyPathMatchesFilter(core.ModelBase): + """If any file has a relative path matching the regular expression, sync all files in the subfolder that are not otherwise filtered.""" + + regex: str + """The regular expression for the relative path to match against.""" + + type: typing.Literal["anyPathMatchesFilter"] = "anyPathMatchesFilter" + + +class FileAtLeastCountFilter(core.ModelBase): + """Import all filtered files only if there are at least the specified number of files remaining.""" + + min_files_count: int = pydantic.Field(alias=str("minFilesCount")) # type: ignore[literal-required] + """ + The minimum number of files remaining expected. + The value specified must be greater than 0. + """ + + type: typing.Literal["atLeastCountFilter"] = "atLeastCountFilter" + + +class FileChangedSinceLastUploadFilter(core.ModelBase): + """ + Only import files that have changed or been added since the last import run. Whether or not a file is considered to be changed is determined by the specified file properties. + This will exclude files uploaded in any previous imports, regardless of the file import mode used. A SNAPSHOT file import mode does not reset the filter. + """ + + file_properties: typing.List[FileProperty] = pydantic.Field(alias=str("fileProperties")) # type: ignore[literal-required] + """ + The criteria on which to determine whether a file has been changed or not since the last import. + If any of the specified criteria have changed, the file is consider changed. The criteria include: + + LAST_MODIFIED: The file's last modified timestamp has changed since the last import. + SIZE: The file's size has changed since the last import. + + If no criteria are specified, only newly added files will be imported. + """ + + type: typing.Literal["changedSinceLastUploadFilter"] = "changedSinceLastUploadFilter" + + +FileFormat = typing.Literal["AVRO", "CSV", "PARQUET"] +"""The format of files in the upstream source.""" + + +class FileImport(core.ModelBase): + """FileImport""" + + rid: FileImportRid + connection_rid: ConnectionRid = pydantic.Field(alias=str("connectionRid")) # type: ignore[literal-required] + """The RID of the Connection (also known as a source) that the File Import uses to import data.""" + + dataset_rid: datasets_models.DatasetRid = pydantic.Field(alias=str("datasetRid")) # type: ignore[literal-required] + """The RID of the output dataset. Can not be modified after the file import is created.""" + + branch_name: typing.Optional[datasets_models.BranchName] = pydantic.Field(alias=str("branchName"), default=None) # type: ignore[literal-required] + """The branch name in the output dataset that will contain the imported data. Defaults to `master` for most enrollments. Can not be modified after the file import is created.""" + + display_name: FileImportDisplayName = pydantic.Field(alias=str("displayName")) # type: ignore[literal-required] + file_import_filters: typing.List[FileImportFilter] = pydantic.Field(alias=str("fileImportFilters")) # type: ignore[literal-required] + """Use filters to limit which files should be imported. Filters are applied in the order they are defined. A different ordering of filters may lead to a more optimized import. [Learn more about optimizing file imports.](https://palantir.com/docs/foundry/data-connection/file-based-syncs/#optimize-file-based-syncs)""" + + import_mode: FileImportMode = pydantic.Field(alias=str("importMode")) # type: ignore[literal-required] + subfolder: typing.Optional[str] = None + """A subfolder in the external system that will be imported. If not specified, defaults to the root folder of the external system.""" + + +class FileImportCustomFilter(core.ModelBase): + """ + A custom file import filter. Custom file import filters can be fetched but cannot currently be used + when creating or updating file imports. + """ + + config: typing.Any + type: typing.Literal["customFilter"] = "customFilter" + + +FileImportDisplayName = str +"""FileImportDisplayName""" + + +FileImportFilter = typing_extensions.Annotated[ + typing.Union[ + "FilePathNotMatchesFilter", + "FileAnyPathMatchesFilter", + "FilesCountLimitFilter", + "FileChangedSinceLastUploadFilter", + "FileImportCustomFilter", + "FileLastModifiedAfterFilter", + "FilePathMatchesFilter", + "FileAtLeastCountFilter", + "FileSizeFilter", + ], + pydantic.Field(discriminator="type"), +] +""" +[Filters](https://palantir.com/docs/foundry/data-connection/file-based-syncs/#filters) allow you to filter source files +before they are imported into Foundry. +""" + + +FileImportMode = typing.Literal["SNAPSHOT", "APPEND", "UPDATE"] +""" +Import mode governs how raw files are read from an external system, and written into a Foundry dataset. + +SNAPSHOT: Defines a new dataset state consisting only of files from a particular import execution. +APPEND: Purely additive and yields data from previous import executions in addition to newly added files. +UPDATE: Replaces existing files from previous import executions based on file names. +""" + + +FileImportRid = core.RID +"""The Resource Identifier (RID) of a FileImport (also known as a batch sync).""" + + +class FileLastModifiedAfterFilter(core.ModelBase): + """Only import files that have been modified after a specified timestamp""" + + after_timestamp: typing.Optional[core.AwareDatetime] = pydantic.Field(alias=str("afterTimestamp"), default=None) # type: ignore[literal-required] + """ + Timestamp threshold, specified in ISO-8601 format. + If not specified, defaults to the timestamp the filter is added to the file import. + """ + + type: typing.Literal["lastModifiedAfterFilter"] = "lastModifiedAfterFilter" + + +class FilePathMatchesFilter(core.ModelBase): + """ + Only import files whose path (relative to the root of the source) matches the regular expression. + + **Example** + Suppose we are importing files from `relative/subfolder`. + `relative/subfolder` contains: + - `relative/subfolder/include-file.txt` + - `relative/subfolder/exclude-file.txt` + - `relative/subfolder/other-file.txt` + + With the `relative/subfolder/include-.*.txt` regex, only `relative/subfolder/include-file.txt` will be imported. + """ + + regex: str + """Must be written to match the paths relative to the root of the source, even if a subfolder is specified.""" + + type: typing.Literal["pathMatchesFilter"] = "pathMatchesFilter" + + +class FilePathNotMatchesFilter(core.ModelBase): + """ + Only import files whose path (relative to the root of the source) does not match the regular expression. + + **Example** + Suppose we are importing files from `relative/subfolder`. + `relative/subfolder` contains: + - `relative/subfolder/include-file.txt` + - `relative/subfolder/exclude-file.txt` + - `relative/subfolder/other-file.txt` + + With the `relative/subfolder/exclude-.*.txt` regex, both `relative/subfolder/include-file.txt` and `relative/subfolder/other-file.txt` will be imported, + and `relative/subfolder/exclude-file.txt` will be excluded from the import. + """ + + regex: str + """Must be written to match the paths relative to the root of the source, even if a subfolder is specified.""" + + type: typing.Literal["pathNotMatchesFilter"] = "pathNotMatchesFilter" + + +FileProperty = typing.Literal["LAST_MODIFIED", "SIZE"] +"""FileProperty""" + + +class FileSizeFilter(core.ModelBase): + """ + Only import files whose size is between the specified minimum and maximum values. + At least one of `gt` or `lt` should be present. + If both are present, the value specified for `gt` must be strictly less than `lt - 1`. + """ + + gt: typing.Optional[core_models.SizeBytes] = None + """ + File size must be greater than this number for it to be imported. + The value specified cannot be a negative number. + """ + + lt: typing.Optional[core_models.SizeBytes] = None + """ + File size must be less than this number for it to be imported. + The value specified must be at least 1 byte. + """ + + type: typing.Literal["fileSizeFilter"] = "fileSizeFilter" + + +class FilesCountLimitFilter(core.ModelBase): + """ + Only retain `filesCount` number of files in each transaction. + The choice of files to retain is made without any guarantee of order. + This option can increase the reliability of incremental syncs. + """ + + files_count: int = pydantic.Field(alias=str("filesCount")) # type: ignore[literal-required] + """The number of files to import in the transaction. The value specified must be positive.""" + + type: typing.Literal["filesCountLimitFilter"] = "filesCountLimitFilter" + + +class FilesVirtualTableConfig(core.ModelBase): + """Pointer to the table in cloud object storage (e.g., Azure Data Lake Storage, Google Cloud Storage, S3).""" + + format: FileFormat + path: str + """ + Storage path for the data in the underlying file system, i.e. paths like `/foo/bar`. The scheme is not + included. May be either a folder or file. A non-partitioned table will have a single location. A + partitioned table can have multiple locations, one for each partition. + """ + + type: typing.Literal["files"] = "files" + + +class FoundryWorker(core.ModelBase): + """ + The [Foundry worker](https://palantir.com/docs/foundry/data-connection/core-concepts/#foundry-worker) is used to run capabilities + in Foundry. + This is the preferred method for connections, as these connections benefit from Foundry's containerized + and scalable job execution, improved stability and do not incur the maintenance overhead associated with agents. + """ + + network_egress_policy_rids: typing.List[NetworkEgressPolicyRid] = pydantic.Field(alias=str("networkEgressPolicyRids")) # type: ignore[literal-required] + type: typing.Literal["foundryWorker"] = "foundryWorker" + + +class GetConfigurationConnectionsBatchRequestElement(core.ModelBase): + """GetConfigurationConnectionsBatchRequestElement""" + + connection_rid: ConnectionRid = pydantic.Field(alias=str("connectionRid")) # type: ignore[literal-required] + + +class GetConfigurationConnectionsBatchResponse(core.ModelBase): + """GetConfigurationConnectionsBatchResponse""" + + data: typing.Dict[ConnectionRid, ConnectionConfiguration] + + +class GlueVirtualTableConfig(core.ModelBase): + """Pointer to the table in AWS Glue.""" + + database: str + """The database name.""" + + table: str + """The table name.""" + + type: typing.Literal["glue"] = "glue" + + +class HeaderApiKey(core.ModelBase): + """HeaderApiKey""" + + header_name: str = pydantic.Field(alias=str("headerName")) # type: ignore[literal-required] + """The name of the header that the API key is passed in.""" + + type: typing.Literal["header"] = "header" + + +class IcebergVirtualTableConfig(core.ModelBase): + """Pointer to the Iceberg table.""" + + table_identifier: str = pydantic.Field(alias=str("tableIdentifier")) # type: ignore[literal-required] + """The identifier of the Iceberg table.""" + + warehouse_path: typing.Optional[str] = pydantic.Field(alias=str("warehousePath"), default=None) # type: ignore[literal-required] + """ + The path to the folder in the file system containing the Iceberg table. Can be omitted when the + connection is configured with a catalog that does not rely on warehouse path. + """ + + type: typing.Literal["iceberg"] = "iceberg" + + +class IntegerColumnInitialIncrementalState(core.ModelBase): + """The state for an incremental table import using a numeric integer datatype.""" + + column_name: str = pydantic.Field(alias=str("columnName")) # type: ignore[literal-required] + current_value: int = pydantic.Field(alias=str("currentValue")) # type: ignore[literal-required] + """The initial incremental state value for the integer column to reference in the query.""" + + type: typing.Literal["integerColumnInitialIncrementalState"] = ( + "integerColumnInitialIncrementalState" + ) + + +InvalidConnectionReason = typing.Literal[ + "CONNECTION_NOT_FOUND", + "INVALID_CREDENTIALS", + "NETWORK_POLICY_VIOLATION", + "CONNECTION_UNAVAILABLE", + "CANNOT_DESERIALIZE", + "CANNOT_SUBSTITUTE_SECRETS", + "CANNOT_USE_USER_HOME_FOLDER", + "INVALID_SOURCE_RUNTIME", + "INVALID_SOURCE_TYPE", + "MISSING_CREDENTIALS", + "MISSING_PROXY_SETTINGS", + "NOT_CLOUD_RUNTIME", + "NO_AGENTS_ASSIGNED", + "SERVICE_UNAVAILABLE", + "TOO_MANY_REQUESTS", + "AZURE_CONTAINER_DOES_NOT_EXIST", + "AZURE_MANAGED_IDENTITY_AUTH_NOT_SUPPORTED", + "AZURE_REFRESH_TOKEN_AUTH_NOT_SUPPORTED", + "AZURE_SHARED_ACCESS_SIGNATURE_AUTH_NOT_SUPPORTED", + "AZURE_SHARED_KEY_AUTH_NOT_SUPPORTED", + "AZURE_TENANT_NOT_FOUND", + "INVALID_ABFS_ROOT_DIRECTORY", + "INVALID_CLIENT_ENDPOINT", + "DATABRICKS_AUTH_UNSUPPORTED", + "DATABRICKS_BASIC_AUTH_NOT_SUPPORTED", + "DATABRICKS_INVALID_CLIENT_CREDENTIALS", + "DATABRICKS_INVALID_HOST", + "DATABRICKS_INVALID_HTTP_PATH", + "DATABRICKS_INVALID_OIDC_CREDENTIALS", + "DATABRICKS_INVALID_TOKEN_URL", + "GCP_INSTANCE_AUTH_NOT_SUPPORTED", + "GCP_INVALID_OIDC_CREDENTIALS", + "INVALID_GCS_CONFIG", + "INVALID_GCS_URL", + "GCS_INVALID_PREFIX_PATH", + "MISSING_GLUE_CATALOG", + "INVALID_HIVE_URL", + "INVALID_KERBEROS_URL", + "MISSING_HIVE_CONFIGURATION", + "ICEBERG_CATALOG_UNSUPPORTED", + "INVALID_ICEBERG_CATALOG_URL", + "INVALID_ICEBERG_TOKEN_URL", + "CONNECTION_FAILED", + "INVALID_JDBC_DRIVER", + "INVALID_JDBC_URL", + "AWS_BUCKET_DOES_NOT_EXIST", + "AWS_SESSION_TOKEN_NOT_SUPPORTED", + "INVALID_S3_ENDPOINT", + "INVALID_S3_URL", + "INVALID_STS_ENDPOINT", + "MISSING_STS_ROLE", + "STS_ASSUME_ROLE_DENIED", + "INVALID_SNOWFLAKE_URL", + "SNOWFLAKE_IAM_AUTH_NOT_SUPPORTED", + "SNOWFLAKE_RSA_AUTH_NOT_SUPPORTED", + "INVALID_UNITY_CATALOG_TOKEN_URL", + "INVALID_UNITY_CATALOG_URL", + "MISSING_UNITY_CATALOG", + "UNITY_CATALOG_EXTERNAL_ACCESS_NOT_ENABLED", + "UNITY_CATALOG_INSUFFICIENT_PERMISSIONS", + "UNITY_CATALOG_TEMPORARY_CREDENTIALS_FAILED", +] +"""Reasons why a connection configuration is invalid.""" + + +class JdbcConnectionConfiguration(core.ModelBase): + """The configuration needed to connect to an external system using the JDBC protocol.""" + + url: str + """The URL that the JDBC driver uses to connect to a database.""" + + driver_class: str = pydantic.Field(alias=str("driverClass")) # type: ignore[literal-required] + """The fully-qualified driver class name that is used to connect to the database.""" + + uploaded_jdbc_drivers: typing.List[JdbcDriverArtifactName] = pydantic.Field(alias=str("uploadedJdbcDrivers")) # type: ignore[literal-required] + """ + The list of uploaded JDBC driver names. + To upload drivers to a JDBC connection, use the uploadCustomJdbcDrivers endpoint + """ + + jdbc_properties: JdbcProperties = pydantic.Field(alias=str("jdbcProperties")) # type: ignore[literal-required] + credentials: typing.Optional[BasicCredentials] = None + type: typing.Literal["jdbc"] = "jdbc" + + +JdbcDriverArtifactName = str +"""The name of the uploaded JDBC artifact.""" + + +JdbcProperties = typing.Dict[str, str] +""" +A map of [properties](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Properties.html) passed +to the JDBC driver to configure behavior. Refer to the documentation of your specific connection type for additional +available JDBC properties to add to your connection configuration. +This should only contain unencrypted properties, all values specified here are sent unencrypted to Foundry. +""" + + +class JdbcTableImportConfig(core.ModelBase): + """The import configuration for a [custom JDBC connection](https://palantir.com/docs/foundry/available-connectors/custom-jdbc-sources).""" + + query: TableImportQuery + initial_incremental_state: typing.Optional[TableImportInitialIncrementalState] = pydantic.Field(alias=str("initialIncrementalState"), default=None) # type: ignore[literal-required] + type: typing.Literal["jdbcImportConfig"] = "jdbcImportConfig" + + +class ListFileImportsResponse(core.ModelBase): + """ListFileImportsResponse""" + + data: typing.List[FileImport] + next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] + + +class ListTableImportsResponse(core.ModelBase): + """ListTableImportsResponse""" + + data: typing.List[TableImport] + next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] + + +class LongColumnInitialIncrementalState(core.ModelBase): + """The state for an incremental table import using a column with a numeric long datatype.""" + + column_name: str = pydantic.Field(alias=str("columnName")) # type: ignore[literal-required] + current_value: core.Long = pydantic.Field(alias=str("currentValue")) # type: ignore[literal-required] + """The initial incremental state value for the long column to reference in the query.""" + + type: typing.Literal["longColumnInitialIncrementalState"] = "longColumnInitialIncrementalState" + + +class MicrosoftAccessTableImportConfig(core.ModelBase): + """The import configuration for a [Microsoft Access connection](https://palantir.com/docs/foundry/available-connectors/microsoft-access).""" + + query: TableImportQuery + initial_incremental_state: typing.Optional[TableImportInitialIncrementalState] = pydantic.Field(alias=str("initialIncrementalState"), default=None) # type: ignore[literal-required] + type: typing.Literal["microsoftAccessImportConfig"] = "microsoftAccessImportConfig" + + +class MicrosoftSqlServerTableImportConfig(core.ModelBase): + """The import configuration for a [Microsoft SQL Server connection](https://palantir.com/docs/foundry/available-connectors/microsoft-sql-server).""" + + query: TableImportQuery + initial_incremental_state: typing.Optional[TableImportInitialIncrementalState] = pydantic.Field(alias=str("initialIncrementalState"), default=None) # type: ignore[literal-required] + type: typing.Literal["microsoftSqlServerImportConfig"] = "microsoftSqlServerImportConfig" + + +NetworkEgressPolicyRid = core.RID +"""The Resource Identifier (RID) of a Network Egress Policy.""" + + +class OauthMachineToMachineAuth(core.ModelBase): + """ + Authenticate as a service principal using OAuth. Create a service principal in Databricks and generate an OAuth secret to obtain a client ID and secret. + Read the [official Databricks documentation](https://docs.databricks.com/aws/en/dev-tools/auth/oauth-m2m) for more information about OAuth machine-to-machine + authentication. + """ + + client_id: str = pydantic.Field(alias=str("clientID")) # type: ignore[literal-required] + """The client ID for the service principal.""" + + client_secret: EncryptedProperty = pydantic.Field(alias=str("clientSecret")) # type: ignore[literal-required] + """The value of the client secret.""" + + type: typing.Literal["oauthM2M"] = "oauthM2M" + + +class OracleTableImportConfig(core.ModelBase): + """The import configuration for an Oracle Database 21 connection.""" + + query: TableImportQuery + initial_incremental_state: typing.Optional[TableImportInitialIncrementalState] = pydantic.Field(alias=str("initialIncrementalState"), default=None) # type: ignore[literal-required] + type: typing.Literal["oracleImportConfig"] = "oracleImportConfig" + + +class PersonalAccessToken(core.ModelBase): + """ + Authenticate as a user or service principal using a personal access token. + Read the [official Databricks documentation](https://docs.databricks.com/aws/en/dev-tools/auth/pat) for information on generating a personal access token. + """ + + personal_access_token: EncryptedProperty = pydantic.Field(alias=str("personalAccessToken")) # type: ignore[literal-required] + type: typing.Literal["personalAccessToken"] = "personalAccessToken" + + +PlaintextValue = str +"""PlaintextValue""" + + +class PostgreSqlTableImportConfig(core.ModelBase): + """The import configuration for a [PostgreSQL connection](https://palantir.com/docs/foundry/available-connectors/postgresql).""" + + query: TableImportQuery + initial_incremental_state: typing.Optional[TableImportInitialIncrementalState] = pydantic.Field(alias=str("initialIncrementalState"), default=None) # type: ignore[literal-required] + type: typing.Literal["postgreSqlImportConfig"] = "postgreSqlImportConfig" + + +Protocol = typing.Literal["HTTP", "HTTPS"] +"""Protocol to establish a connection with another system.""" + + +class QueryParameterApiKey(core.ModelBase): + """QueryParameterApiKey""" + + query_parameter_name: str = pydantic.Field(alias=str("queryParameterName")) # type: ignore[literal-required] + """The name of the query parameter that the API key is passed in.""" + + type: typing.Literal["queryParameter"] = "queryParameter" + + +Region = str +"""The region of the external system.""" + + +class ReplaceFileImportRequest(core.ModelBase): + """ReplaceFileImportRequest""" + + import_mode: FileImportMode = pydantic.Field(alias=str("importMode")) # type: ignore[literal-required] + display_name: FileImportDisplayName = pydantic.Field(alias=str("displayName")) # type: ignore[literal-required] + subfolder: typing.Optional[str] = None + """A subfolder in the external system that will be imported. If not specified, defaults to the root folder of the external system.""" + + file_import_filters: typing.List[FileImportFilter] = pydantic.Field(alias=str("fileImportFilters")) # type: ignore[literal-required] + """Use filters to limit which files should be imported. Filters are applied in the order they are defined. A different ordering of filters may lead to a more optimized import. [Learn more about optimizing file imports.](https://palantir.com/docs/foundry/data-connection/file-based-syncs/#optimize-file-based-syncs)""" + + +class ReplaceTableImportRequest(core.ModelBase): + """ReplaceTableImportRequest""" + + import_mode: TableImportMode = pydantic.Field(alias=str("importMode")) # type: ignore[literal-required] + display_name: TableImportDisplayName = pydantic.Field(alias=str("displayName")) # type: ignore[literal-required] + allow_schema_changes: typing.Optional[TableImportAllowSchemaChanges] = pydantic.Field(alias=str("allowSchemaChanges"), default=None) # type: ignore[literal-required] + """Allow the TableImport to succeed if the schema of imported rows does not match the existing dataset's schema. Defaults to false for new table imports.""" + + config: ReplaceTableImportRequestTableImportConfig + + +class ReplaceTableImportRequestDatabricksTableImportConfig(core.ModelBase): + """ReplaceTableImportRequestDatabricksTableImportConfig""" + + initial_incremental_state: typing.Optional[TableImportInitialIncrementalState] = pydantic.Field(alias=str("initialIncrementalState"), default=None) # type: ignore[literal-required] + query: TableImportQuery + type: typing.Literal["databricksImportConfig"] = "databricksImportConfig" + + +class ReplaceTableImportRequestJdbcTableImportConfig(core.ModelBase): + """ReplaceTableImportRequestJdbcTableImportConfig""" + + initial_incremental_state: typing.Optional[TableImportInitialIncrementalState] = pydantic.Field(alias=str("initialIncrementalState"), default=None) # type: ignore[literal-required] + query: TableImportQuery + type: typing.Literal["jdbcImportConfig"] = "jdbcImportConfig" + + +class ReplaceTableImportRequestMicrosoftAccessTableImportConfig(core.ModelBase): + """ReplaceTableImportRequestMicrosoftAccessTableImportConfig""" + + initial_incremental_state: typing.Optional[TableImportInitialIncrementalState] = pydantic.Field(alias=str("initialIncrementalState"), default=None) # type: ignore[literal-required] + query: TableImportQuery + type: typing.Literal["microsoftAccessImportConfig"] = "microsoftAccessImportConfig" + + +class ReplaceTableImportRequestMicrosoftSqlServerTableImportConfig(core.ModelBase): + """ReplaceTableImportRequestMicrosoftSqlServerTableImportConfig""" + + initial_incremental_state: typing.Optional[TableImportInitialIncrementalState] = pydantic.Field(alias=str("initialIncrementalState"), default=None) # type: ignore[literal-required] + query: TableImportQuery + type: typing.Literal["microsoftSqlServerImportConfig"] = "microsoftSqlServerImportConfig" + + +class ReplaceTableImportRequestOracleTableImportConfig(core.ModelBase): + """ReplaceTableImportRequestOracleTableImportConfig""" + + initial_incremental_state: typing.Optional[TableImportInitialIncrementalState] = pydantic.Field(alias=str("initialIncrementalState"), default=None) # type: ignore[literal-required] + query: TableImportQuery + type: typing.Literal["oracleImportConfig"] = "oracleImportConfig" + + +class ReplaceTableImportRequestPostgreSqlTableImportConfig(core.ModelBase): + """ReplaceTableImportRequestPostgreSqlTableImportConfig""" + + initial_incremental_state: typing.Optional[TableImportInitialIncrementalState] = pydantic.Field(alias=str("initialIncrementalState"), default=None) # type: ignore[literal-required] + query: TableImportQuery + type: typing.Literal["postgreSqlImportConfig"] = "postgreSqlImportConfig" + + +class ReplaceTableImportRequestSnowflakeTableImportConfig(core.ModelBase): + """ReplaceTableImportRequestSnowflakeTableImportConfig""" + + initial_incremental_state: typing.Optional[TableImportInitialIncrementalState] = pydantic.Field(alias=str("initialIncrementalState"), default=None) # type: ignore[literal-required] + query: TableImportQuery + type: typing.Literal["snowflakeImportConfig"] = "snowflakeImportConfig" + + +ReplaceTableImportRequestTableImportConfig = typing_extensions.Annotated[ + typing.Union[ + "ReplaceTableImportRequestDatabricksTableImportConfig", + "ReplaceTableImportRequestJdbcTableImportConfig", + "ReplaceTableImportRequestMicrosoftSqlServerTableImportConfig", + "ReplaceTableImportRequestPostgreSqlTableImportConfig", + "ReplaceTableImportRequestMicrosoftAccessTableImportConfig", + "ReplaceTableImportRequestSnowflakeTableImportConfig", + "ReplaceTableImportRequestOracleTableImportConfig", + ], + pydantic.Field(discriminator="type"), +] +"""The import configuration for a specific [connector type](https://palantir.com/docs/foundry/data-integration/source-type-overview).""" + + +RestAuthenticationMode = typing_extensions.Annotated[ + typing.Union["BearerToken", "ApiKeyAuthentication", "BasicCredentials", "RestConnectionOAuth2"], + pydantic.Field(discriminator="type"), +] +"""The method of authentication for connecting to an external REST system.""" + + +RestConnectionAdditionalSecrets = typing_extensions.Annotated[ + typing.Union["SecretsWithPlaintextValues", "SecretsNames"], pydantic.Field(discriminator="type") +] +""" +When creating or updating additional secrets, use SecretsWithPlaintextValues. +When fetching the RestConnectionConfiguration, SecretsNames will be provided. +""" + + +class RestConnectionConfiguration(core.ModelBase): + """The configuration needed to connect to a [REST external system](https://palantir.com/docs/foundry/available-connectors/rest-apis).""" + + domains: typing.List[Domain] + """ + The domains that the connection is allowed to access. + At least one domain must be specified. + """ + + additional_secrets: typing.Optional[RestConnectionAdditionalSecrets] = pydantic.Field(alias=str("additionalSecrets"), default=None) # type: ignore[literal-required] + """ + Additional secrets that can be referenced in code and webhook configurations. + If not provided, no additional secrets will be created. + """ + + oauth2_client_rid: typing.Optional[core.RID] = pydantic.Field(alias=str("oauth2ClientRid"), default=None) # type: ignore[literal-required] + """ + The RID of the [Outbound application](https://palantir.com/docs/foundry/administration/configure-outbound-applications) that is used to authenticate to the external system via OAuth2. + Currently, a connection may use only one outbound application for OAuth 2.0 authentication. + Selecting a different outbound application will update the configuration for all domains with OAuth 2.0 as the selected authorization. + """ + + type: typing.Literal["rest"] = "rest" + + +class RestConnectionOAuth2(core.ModelBase): + """ + In order to use OAuth2 you must have an Outbound application configured in the [Foundry Control Panel Organization settings](https://palantir.com/docs/foundry/administration/configure-outbound-applications#create-an-outbound-application). + The RID of the Outbound application must be configured in the RestConnectionConfiguration in the `oauth2ClientRid` field. + """ + + type: typing.Literal["oauth2"] = "oauth2" + + +RestRequestApiKeyLocation = typing_extensions.Annotated[ + typing.Union["HeaderApiKey", "QueryParameterApiKey"], pydantic.Field(discriminator="type") +] +"""The location of the API key in the request.""" + + +S3AuthenticationMode = typing_extensions.Annotated[ + typing.Union["AwsAccessKey", "CloudIdentity", "AwsOidcAuthentication"], + pydantic.Field(discriminator="type"), +] +"""S3AuthenticationMode""" + + +class S3ConnectionConfiguration(core.ModelBase): + """ + The configuration needed to connect to an [AWS S3 external system (or any other S3-like external systems that + implement the s3a protocol)](https://palantir.com/docs/foundry/available-connectors/amazon-s3/#amazon-s3). + """ + + bucket_url: str = pydantic.Field(alias=str("bucketUrl")) # type: ignore[literal-required] + """The URL of the S3 bucket. The URL should contain a trailing slash.""" + + s3_endpoint: typing.Optional[str] = pydantic.Field(alias=str("s3Endpoint"), default=None) # type: ignore[literal-required] + """ + The endpoint of the S3 service. This is used to connect to a custom S3 service that is not AWS S3. + If not specified, defaults to the [AWS S3 endpoint](https://docs.aws.amazon.com/general/latest/gr/s3.html). + Warning: Specifying a region and a custom endpoint containing a region can lead to unexpected behavior. + """ + + region: typing.Optional[Region] = None + """ + The region representing the location of the S3 bucket. + Warning: Specifying a region and a custom endpoint containing a region can lead to unexpected behavior. + """ + + authentication_mode: typing.Optional[S3AuthenticationMode] = pydantic.Field(alias=str("authenticationMode"), default=None) # type: ignore[literal-required] + """ + The authentication mode to use to connect to the S3 external system. No authentication mode is required + to connect to publicly accessible AWS S3 buckets. + """ + + s3_endpoint_signing_region: typing.Optional[Region] = pydantic.Field(alias=str("s3EndpointSigningRegion"), default=None) # type: ignore[literal-required] + """ + The region used when constructing the S3 client using a custom endpoint. + This is often not required and would only be needed if you are using the S3 connector with an S3-compliant third-party API, + and are also setting a custom endpoint that requires a non-default region. + """ + + client_kms_configuration: typing.Optional[S3KmsConfiguration] = pydantic.Field(alias=str("clientKmsConfiguration"), default=None) # type: ignore[literal-required] + """ + The client-side KMS key to use for encryption and decryption of data in the S3 bucket. + If not specified, the default KMS key for the bucket is used. + """ + + sts_role_configuration: typing.Optional[StsRoleConfiguration] = pydantic.Field(alias=str("stsRoleConfiguration"), default=None) # type: ignore[literal-required] + """The configuration needed to assume a role to connect to the S3 external system.""" + + proxy_configuration: typing.Optional[S3ProxyConfiguration] = pydantic.Field(alias=str("proxyConfiguration"), default=None) # type: ignore[literal-required] + """The configuration needed to connect to the S3 external system through a proxy.""" + + max_connections: typing.Optional[int] = pydantic.Field(alias=str("maxConnections"), default=None) # type: ignore[literal-required] + """ + The maximum number of HTTP connections to the S3 service per sync. + If not specified, defaults to 50 as defined by the [AWS SDK default](https://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/ClientConfiguration.html#DEFAULT_MAX_CONNECTIONS). + """ + + connection_timeout_millis: typing.Optional[core.Long] = pydantic.Field(alias=str("connectionTimeoutMillis"), default=None) # type: ignore[literal-required] + """ + The amount of time (in milliseconds) to wait when initially establishing a connection before giving up and timing out. + If not specified, defaults to 10000 as defined by the [AWS SDK default](https://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/ClientConfiguration.html#DEFAULT_CONNECTION_TIMEOUT). + """ + + socket_timeout_millis: typing.Optional[core.Long] = pydantic.Field(alias=str("socketTimeoutMillis"), default=None) # type: ignore[literal-required] + """ + The amount of time (in milliseconds) to wait for data to be transferred over an established, open connection. + If not specified, defaults to 50000 as defined by the [AWS SDK default](https://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/ClientConfiguration.html#DEFAULT_SOCKET_TIMEOUT). + """ + + max_error_retry: typing.Optional[int] = pydantic.Field(alias=str("maxErrorRetry"), default=None) # type: ignore[literal-required] + """ + The maximum number of retry attempts for failed requests to the S3 service. + If not specified, defaults to 3 as defined by the [AWS SDK default](https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/retry-strategy.html#retry-strategies). + """ + + match_subfolder_exactly: typing.Optional[bool] = pydantic.Field(alias=str("matchSubfolderExactly"), default=None) # type: ignore[literal-required] + """ + If true, only files in the subfolder specified in the bucket URL will be synced. + If false, all files in the bucket will be synced. + If not specified, defaults to false. + """ + + enable_requester_pays: typing.Optional[bool] = pydantic.Field(alias=str("enableRequesterPays"), default=None) # type: ignore[literal-required] + """ + Defaults to false, unless set and overwritten. + If true, includes the [requester pays header](https://docs.aws.amazon.com/AmazonS3/latest/userguide/RequesterPaysBuckets.html) + in requests, allowing reads from requester pays buckets. + """ + + type: typing.Literal["s3"] = "s3" + + +class S3KmsConfiguration(core.ModelBase): + """S3KmsConfiguration""" + + kms_key: str = pydantic.Field(alias=str("kmsKey")) # type: ignore[literal-required] + """ + The client-side KMS key to use for encryption and decryption of data in the S3 bucket. + If not specified, the default KMS key for the bucket is used. + """ + + kms_region: typing.Optional[Region] = pydantic.Field(alias=str("kmsRegion"), default=None) # type: ignore[literal-required] + """ + The region of the client-side KMS key to use for encryption and decryption of data in the S3 bucket. + If not specified, the default KMS key region for the bucket is used. + """ + + +class S3ProxyConfiguration(core.ModelBase): + """S3ProxyConfiguration""" + + host: str + """ + Domain name, IPv4, or IPv6 address. + `protocol` and `port` must be specified separately. + """ + + port: int + non_proxy_hosts: typing.Optional[typing.List[str]] = pydantic.Field(alias=str("nonProxyHosts"), default=None) # type: ignore[literal-required] + """A list of hosts that can bypass the proxy, such as those used for STS Role. You can also use "*" wildcards.""" + + protocol: typing.Optional[Protocol] = None + """If defined, must be "HTTP" or "HTTPS". Defaults to "HTTPS".""" + + credentials: typing.Optional[BasicCredentials] = None + + +SecretName = str +"""SecretName""" + + +class SecretsNames(core.ModelBase): + """ + A list of secret names that can be referenced in code and webhook configurations. + This will be provided to the client when fetching the RestConnectionConfiguration. + """ + + secret_names: typing.List[SecretName] = pydantic.Field(alias=str("secretNames")) # type: ignore[literal-required] + """The names of the additional secrets that can be referenced in code and webhook configurations.""" + + type: typing.Literal["asSecretsNames"] = "asSecretsNames" + + +class SecretsWithPlaintextValues(core.ModelBase): + """ + A map representing secret name to plaintext secret value pairs. + This should be used when creating or updating additional secrets for a REST connection. + """ + + secrets: typing.Dict[SecretName, PlaintextValue] + """The additional secrets that can be referenced in code and webhook configurations.""" + + type: typing.Literal["asSecretsWithPlaintextValues"] = "asSecretsWithPlaintextValues" + + +class SmbConnectionConfiguration(core.ModelBase): + """SmbConnectionConfiguration""" + + hostname: str + """ + Any identifier that can resolve to a server hosting an SMB share. This includes IP addresses, local + network names (e.g. FS-SERVER-01) or FQDNs. Should not include any protocol information like https://, smb://, etc + """ + + port: typing.Optional[int] = None + """445 by default""" + + proxy: typing.Optional[SmbProxyConfiguration] = None + share: str + """ + Must be a valid SMB share name. + https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-fscc/dc9978d7-6299-4c5a-a22d-a039cdc716ea + """ + + base_directory: typing.Optional[str] = pydantic.Field(alias=str("baseDirectory"), default=None) # type: ignore[literal-required] + """All reads and writes in this source will happen in this subdirectory""" + + auth: SmbAuth + require_message_signing: typing.Optional[bool] = pydantic.Field(alias=str("requireMessageSigning"), default=None) # type: ignore[literal-required] + """ + If true, the client will request that the server sign all messages. If the server does not support + message signing, the connection will fail. Defaults to true. + """ + + type: typing.Literal["smb"] = "smb" + + +class SmbProxyConfiguration(core.ModelBase): + """Egress proxy to pass all traffic through.""" + + hostname: str + port: int + protocol: SmbProxyType + + +SmbProxyType = typing.Literal["HTTP", "SOCKS"] +"""SmbProxyType""" + + +class SmbUsernamePasswordAuth(core.ModelBase): + """SmbUsernamePasswordAuth""" + + username: str + password: EncryptedProperty + domain: typing.Optional[str] = None + """ + Optionally specify a Windows domain to use when authenticating. Normal DNS domain restrictions apply + but the top-level domain might be something non-standard like .local. Defaults to WORKGROUP + """ + + type: typing.Literal["usernamePassword"] = "usernamePassword" + + +SnowflakeAuthenticationMode = typing_extensions.Annotated[ + typing.Union["SnowflakeExternalOauth", "SnowflakeKeyPairAuthentication", "BasicCredentials"], + pydantic.Field(discriminator="type"), +] +"""SnowflakeAuthenticationMode""" + + +class SnowflakeConnectionConfiguration(core.ModelBase): + """The configuration needed to connect to a Snowflake database.""" + + account_identifier: str = pydantic.Field(alias=str("accountIdentifier")) # type: ignore[literal-required] + """ + An [account identifier](https://docs.snowflake.com/en/user-guide/admin-account-identifier) uniquely + identifies a Snowflake account within your organization, as well as throughout the global network of + Snowflake-supported cloud platforms and cloud regions. + + The URL for an account uses the following format: .snowflakecomputing.com. + An example URL is https://acme-test_aws_us_east_2.snowflakecomputing.com. + """ + + database: typing.Optional[str] = None + """ + Specifies the default database to use once connected. If unspecified, defaults to the empty string. + The specified database should be an existing database for which the specified default role has privileges. + + See https://docs.snowflake.com/developer-guide/jdbc/jdbc-parameters#db + """ + + role: typing.Optional[str] = None + """ + Specifies the default access control role to use in the Snowflake session initiated by the driver. + If unspecified, no role will be used when the session is initiated by the driver. + + The specified role should be an existing role that has already been assigned to the specified user for + the driver. If the specified role has not already been assigned to the user, the role is not used when + the session is initiated by the driver. + + See https://docs.snowflake.com/developer-guide/jdbc/jdbc-parameters#role + """ + + schema_: typing.Optional[str] = pydantic.Field(alias=str("schema"), default=None) # type: ignore[literal-required] + """ + Specifies the default schema to use for the specified database once connected. If unspecified, + defaults to the empty string. + The specified schema should be an existing schema for which the specified default role has privileges. + + See https://docs.snowflake.com/developer-guide/jdbc/jdbc-parameters#schema + """ + + warehouse: typing.Optional[str] = None + """ + Specifies the virtual warehouse to use once connected. If unspecified, defaults to the empty string. + The specified warehouse should be an existing warehouse for which the specified default role has privileges. + + See https://docs.snowflake.com/developer-guide/jdbc/jdbc-parameters#warehouse + """ + + authentication_mode: SnowflakeAuthenticationMode = pydantic.Field(alias=str("authenticationMode")) # type: ignore[literal-required] + """The authentication mode to use to connect to the Snowflake database.""" + + jdbc_properties: JdbcProperties = pydantic.Field(alias=str("jdbcProperties")) # type: ignore[literal-required] + type: typing.Literal["snowflake"] = "snowflake" + + +class SnowflakeExternalOauth(core.ModelBase): + """ + Use an External OAuth security integration to connect and authenticate to Snowflake. + + See https://docs.snowflake.com/en/user-guide/oauth-ext-custom + """ + + audience: str + """Identifies the recipients that the access token is intended for as a string URI.""" + + issuer_url: str = pydantic.Field(alias=str("issuerUrl")) # type: ignore[literal-required] + """Identifies the principal that issued the access token as a string URI.""" + + subject: ConnectionRid + """The RID of the Connection that is connecting to the external system.""" + + type: typing.Literal["externalOauth"] = "externalOauth" + + +class SnowflakeKeyPairAuthentication(core.ModelBase): + """ + Use a key-pair to connect and authenticate to Snowflake. + + See https://docs.snowflake.com/en/user-guide/key-pair-auth + """ + + user: str + private_key: EncryptedProperty = pydantic.Field(alias=str("privateKey")) # type: ignore[literal-required] + type: typing.Literal["keyPair"] = "keyPair" + + +class SnowflakeTableImportConfig(core.ModelBase): + """The table import configuration for a [Snowflake connection](https://palantir.com/docs/foundry/available-connectors/snowflake).""" + + query: TableImportQuery + initial_incremental_state: typing.Optional[TableImportInitialIncrementalState] = pydantic.Field(alias=str("initialIncrementalState"), default=None) # type: ignore[literal-required] + type: typing.Literal["snowflakeImportConfig"] = "snowflakeImportConfig" + + +class SnowflakeVirtualTableConfig(core.ModelBase): + """Pointer to the table in Snowflake. Uses the Snowflake table identifier of database, schema and table.""" + + database: str + """The database name.""" + + schema_: str = pydantic.Field(alias=str("schema")) # type: ignore[literal-required] + """The schema name.""" + + table: str + """The table name.""" + + type: typing.Literal["snowflake"] = "snowflake" + + +class StringColumnInitialIncrementalState(core.ModelBase): + """The state for an incremental table import using a column with a string data type.""" + + column_name: str = pydantic.Field(alias=str("columnName")) # type: ignore[literal-required] + current_value: str = pydantic.Field(alias=str("currentValue")) # type: ignore[literal-required] + """The initial incremental state value for the string column to reference in the query.""" + + type: typing.Literal["stringColumnInitialIncrementalState"] = ( + "stringColumnInitialIncrementalState" + ) + + +class StsRoleConfiguration(core.ModelBase): + """StsRoleConfiguration""" + + role_arn: str = pydantic.Field(alias=str("roleArn")) # type: ignore[literal-required] + """ + The Amazon Resource Name (ARN) of the role to assume. + For more information, see the official [AWS documentation](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html#principal-arn-format). + """ + + role_session_name: str = pydantic.Field(alias=str("roleSessionName")) # type: ignore[literal-required] + """ + An identifier for the assumed role session. + The value can be any string that you assume will be unique within the AWS account. + For more information, see the official [AWS documentation](https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRole.html#API_AssumeRole_RequestParameters). + """ + + role_session_duration: typing.Optional[core_models.Duration] = pydantic.Field(alias=str("roleSessionDuration"), default=None) # type: ignore[literal-required] + """ + The duration of the role session. + The value specified can range from 900 seconds (15 minutes) up to the maximum session duration set for the role. + The maximum session duration setting can have a value from 1 hour to 12 hours. For more details see the official [AWS documentation](https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRole.html#API_AssumeRole_RequestParameters). + """ + + external_id: typing.Optional[str] = pydantic.Field(alias=str("externalId"), default=None) # type: ignore[literal-required] + """ + A unique identifier that is used by third parties when assuming roles in their customers' accounts. + For more information, see the official [AWS documentation](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_externalid.html). + """ + + sts_endpoint: typing.Optional[str] = pydantic.Field(alias=str("stsEndpoint"), default=None) # type: ignore[literal-required] + """ + By default, the AWS Security Token Service (AWS STS) is available as a global service, and all AWS STS requests go to a single endpoint at https://sts.amazonaws.com. + AWS recommends using Regional AWS STS endpoints instead of the global endpoint to reduce latency, build in redundancy, and increase session token validity. + """ + + +class TableImport(core.ModelBase): + """TableImport""" + + rid: TableImportRid + connection_rid: ConnectionRid = pydantic.Field(alias=str("connectionRid")) # type: ignore[literal-required] + """The RID of the Connection (also known as a source) that the Table Import uses to import data.""" + + dataset_rid: datasets_models.DatasetRid = pydantic.Field(alias=str("datasetRid")) # type: ignore[literal-required] + """The RID of the output dataset. Can not be modified after the table import is created.""" + + branch_name: typing.Optional[datasets_models.BranchName] = pydantic.Field(alias=str("branchName"), default=None) # type: ignore[literal-required] + """The branch name in the output dataset that will contain the imported data. Defaults to `master` for most enrollments. Can not be modified after the table import is created.""" + + display_name: TableImportDisplayName = pydantic.Field(alias=str("displayName")) # type: ignore[literal-required] + import_mode: TableImportMode = pydantic.Field(alias=str("importMode")) # type: ignore[literal-required] + allow_schema_changes: TableImportAllowSchemaChanges = pydantic.Field(alias=str("allowSchemaChanges")) # type: ignore[literal-required] + """Allow the TableImport to succeed if the schema of imported rows does not match the existing dataset's schema. Defaults to false for new table imports.""" + + config: TableImportConfig + + +TableImportAllowSchemaChanges = bool +"""Allow the TableImport to succeed if the schema of imported rows does not match the existing dataset's schema. Defaults to false for new table imports.""" + + +TableImportConfig = typing_extensions.Annotated[ + typing.Union[ + "DatabricksTableImportConfig", + "JdbcTableImportConfig", + "MicrosoftSqlServerTableImportConfig", + "PostgreSqlTableImportConfig", + "MicrosoftAccessTableImportConfig", + "SnowflakeTableImportConfig", + "OracleTableImportConfig", + ], + pydantic.Field(discriminator="type"), +] +"""The import configuration for a specific [connector type](https://palantir.com/docs/foundry/data-integration/source-type-overview).""" + + +TableImportDisplayName = str +"""TableImportDisplayName""" + + +TableImportInitialIncrementalState = typing_extensions.Annotated[ + typing.Union[ + "StringColumnInitialIncrementalState", + "DateColumnInitialIncrementalState", + "IntegerColumnInitialIncrementalState", + "TimestampColumnInitialIncrementalState", + "LongColumnInitialIncrementalState", + "DecimalColumnInitialIncrementalState", + ], + pydantic.Field(discriminator="type"), +] +""" +The incremental configuration for a table import enables append-style transactions from the same table without duplication of data. +You must provide a monotonically increasing column such as a timestamp or id and an initial value for this column. +An incremental table import will import rows where the value is greater than the largest already imported. + +You can use the '?' character to reference the incremental state value when constructing your query. +Normally this would be used in a WHERE clause or similar filter applied in order to only sync data with an incremental column value +larger than the previously observed maximum value stored in the incremental state. +""" + + +TableImportMode = typing.Literal["SNAPSHOT", "APPEND"] +""" +Import mode governs how data is read from an external system, and written into a Foundry dataset. + +SNAPSHOT: Defines a new dataset state consisting only of data from a particular import execution. +APPEND: Purely additive and yields data from previous import executions in addition to newly added data. +""" + + +TableImportQuery = str +""" +A single SQL query can be executed per sync, which should output a data table +and avoid operations like invoking stored procedures. +The query results are saved to the output dataset in Foundry. +""" + + +TableImportRid = core.RID +"""The Resource Identifier (RID) of a TableImport (also known as a batch sync).""" + + +TableName = str +"""The name of a VirtualTable.""" + + +TableRid = core.RID +"""The Resource Identifier (RID) of a registered VirtualTable.""" + + +class TimestampColumnInitialIncrementalState(core.ModelBase): + """TimestampColumnInitialIncrementalState""" + + column_name: str = pydantic.Field(alias=str("columnName")) # type: ignore[literal-required] + current_value: core.AwareDatetime = pydantic.Field(alias=str("currentValue")) # type: ignore[literal-required] + """The initial incremental state value for the timestamp column in UTC to reference in the query.""" + + type: typing.Literal["timestampColumnInitialIncrementalState"] = ( + "timestampColumnInitialIncrementalState" + ) + + +class UnityVirtualTableConfig(core.ModelBase): + """Pointer to the table in Unity Catalog. Uses the Databricks table identifier of catalog, schema and table.""" + + catalog: str + """The catalog name.""" + + schema_: str = pydantic.Field(alias=str("schema")) # type: ignore[literal-required] + """The schema name.""" + + table: str + """The table name.""" + + type: typing.Literal["unity"] = "unity" + + +class UnknownWorker(core.ModelBase): + """ + A ConnectionWorker that is not supported in the Platform APIs. This can happen because either the + ConnectionWorker configuration is malformed, or because the ConnectionWorker is a legacy one. + The ConnectionWorker should be updated to use the [Foundry worker](https://palantir.com/docs/foundry/data-connection/core-concepts/#foundry-worker) + with either direct egress policies or agent proxy egress policies. + """ + + type: typing.Literal["unknownWorker"] = "unknownWorker" + + +class UpdateExportSettingsForConnectionRequest(core.ModelBase): + """UpdateExportSettingsForConnectionRequest""" + + export_settings: ConnectionExportSettings = pydantic.Field(alias=str("exportSettings")) # type: ignore[literal-required] + + +class UpdateSecretsForConnectionRequest(core.ModelBase): + """UpdateSecretsForConnectionRequest""" + + secrets: typing.Dict[SecretName, PlaintextValue] + """The secrets to be updated. The specified secret names must already be configured on the connection.""" + + +UriScheme = typing.Literal["HTTP", "HTTPS"] +"""Defines supported URI schemes to be used for external connections.""" + + +class VirtualTable(core.ModelBase): + """VirtualTable""" + + rid: TableRid + name: TableName + parent_rid: filesystem_models.FolderRid = pydantic.Field(alias=str("parentRid")) # type: ignore[literal-required] + config: VirtualTableConfig + markings: typing.Optional[typing.List[core_models.MarkingId]] = None + + +VirtualTableConfig = typing_extensions.Annotated[ + typing.Union[ + "SnowflakeVirtualTableConfig", + "UnityVirtualTableConfig", + "GlueVirtualTableConfig", + "DeltaVirtualTableConfig", + "IcebergVirtualTableConfig", + "FilesVirtualTableConfig", + "BigQueryVirtualTableConfig", + ], + pydantic.Field(discriminator="type"), +] +"""VirtualTableConfig""" + + +class WorkflowIdentityFederation(core.ModelBase): + """ + Authenticate as a service principal using workload identity federation. This is the recommended way to connect to Databricks. + Workload identity federation allows workloads running in Foundry to access Databricks APIs without the need for Databricks secrets. + Refer to our [OIDC documentation](https://palantir.com/docs/foundry/data-connection/oidc) for an overview of how OpenID Connect is supported in Foundry. + A service principal federation policy must exist in Databricks to allow Foundry to act as an identity provider. + Refer to the [official documentation](https://docs.databricks.com/aws/en/dev-tools/auth/oauth-federation) for guidance. + """ + + service_principal_application_id: typing.Optional[str] = pydantic.Field(alias=str("servicePrincipalApplicationId"), default=None) # type: ignore[literal-required] + """ + The ID of the Databricks [service principal](https://docs.databricks.com/aws/en/admin/users-groups/service-principals). + If provided, a federated JWT token is exchanged using a + service principal federation policy. If not provided, a federated JWT token is exchanged using an account + federation policy. + """ + + issuer_url: str = pydantic.Field(alias=str("issuerUrl")) # type: ignore[literal-required] + """Identifies the principal that issued the access token as a string URI.""" + + audience: str + """ + Identifies the recipients that the access token is intended for as a string URI. + This should be the primary host name where the Connection lives. + """ + + subject: ConnectionRid + """The RID of the Connection that is connecting to the external system.""" + + type: typing.Literal["workflowIdentityFederation"] = "workflowIdentityFederation" + + +CreateConnectionRequestSmbAuth = CreateConnectionRequestSmbUsernamePasswordAuth +"""CreateConnectionRequestSmbAuth""" + + +SmbAuth = SmbUsernamePasswordAuth +"""SmbAuth""" + + +core.resolve_forward_references(ConnectionConfiguration, globalns=globals(), localns=locals()) +core.resolve_forward_references(ConnectionWorker, globalns=globals(), localns=locals()) +core.resolve_forward_references( + CreateConnectionRequestConnectionConfiguration, globalns=globals(), localns=locals() +) +core.resolve_forward_references( + CreateConnectionRequestConnectionWorker, globalns=globals(), localns=locals() +) +core.resolve_forward_references( + CreateConnectionRequestDatabricksAuthenticationMode, globalns=globals(), localns=locals() +) +core.resolve_forward_references( + CreateConnectionRequestEncryptedProperty, globalns=globals(), localns=locals() +) +core.resolve_forward_references( + CreateConnectionRequestSnowflakeAuthenticationMode, globalns=globals(), localns=locals() +) +core.resolve_forward_references( + CreateTableImportRequestTableImportConfig, globalns=globals(), localns=locals() +) +core.resolve_forward_references(DatabricksAuthenticationMode, globalns=globals(), localns=locals()) +core.resolve_forward_references(EncryptedProperty, globalns=globals(), localns=locals()) +core.resolve_forward_references(FileImportFilter, globalns=globals(), localns=locals()) +core.resolve_forward_references(JdbcProperties, globalns=globals(), localns=locals()) +core.resolve_forward_references( + ReplaceTableImportRequestTableImportConfig, globalns=globals(), localns=locals() +) +core.resolve_forward_references(RestAuthenticationMode, globalns=globals(), localns=locals()) +core.resolve_forward_references( + RestConnectionAdditionalSecrets, globalns=globals(), localns=locals() +) +core.resolve_forward_references(RestRequestApiKeyLocation, globalns=globals(), localns=locals()) +core.resolve_forward_references(S3AuthenticationMode, globalns=globals(), localns=locals()) +core.resolve_forward_references(SnowflakeAuthenticationMode, globalns=globals(), localns=locals()) +core.resolve_forward_references(TableImportConfig, globalns=globals(), localns=locals()) +core.resolve_forward_references( + TableImportInitialIncrementalState, globalns=globals(), localns=locals() +) +core.resolve_forward_references(VirtualTableConfig, globalns=globals(), localns=locals()) + +__all__ = [ + "ApiKeyAuthentication", + "AsPlaintextValue", + "AsSecretName", + "AwsAccessKey", + "AwsOidcAuthentication", + "BasicCredentials", + "BearerToken", + "BigQueryVirtualTableConfig", + "CloudIdentity", + "CloudIdentityRid", + "Connection", + "ConnectionConfiguration", + "ConnectionDisplayName", + "ConnectionExportSettings", + "ConnectionRid", + "ConnectionWorker", + "CreateConnectionRequest", + "CreateConnectionRequestAsPlaintextValue", + "CreateConnectionRequestAsSecretName", + "CreateConnectionRequestBasicCredentials", + "CreateConnectionRequestConnectionConfiguration", + "CreateConnectionRequestConnectionWorker", + "CreateConnectionRequestDatabricksAuthenticationMode", + "CreateConnectionRequestDatabricksConnectionConfiguration", + "CreateConnectionRequestEncryptedProperty", + "CreateConnectionRequestFoundryWorker", + "CreateConnectionRequestJdbcConnectionConfiguration", + "CreateConnectionRequestOauthMachineToMachineAuth", + "CreateConnectionRequestPersonalAccessToken", + "CreateConnectionRequestRestConnectionConfiguration", + "CreateConnectionRequestS3ConnectionConfiguration", + "CreateConnectionRequestSmbAuth", + "CreateConnectionRequestSmbConnectionConfiguration", + "CreateConnectionRequestSmbUsernamePasswordAuth", + "CreateConnectionRequestSnowflakeAuthenticationMode", + "CreateConnectionRequestSnowflakeConnectionConfiguration", + "CreateConnectionRequestSnowflakeExternalOauth", + "CreateConnectionRequestSnowflakeKeyPairAuthentication", + "CreateConnectionRequestUnknownWorker", + "CreateConnectionRequestWorkflowIdentityFederation", + "CreateFileImportRequest", + "CreateTableImportRequest", + "CreateTableImportRequestDatabricksTableImportConfig", + "CreateTableImportRequestJdbcTableImportConfig", + "CreateTableImportRequestMicrosoftAccessTableImportConfig", + "CreateTableImportRequestMicrosoftSqlServerTableImportConfig", + "CreateTableImportRequestOracleTableImportConfig", + "CreateTableImportRequestPostgreSqlTableImportConfig", + "CreateTableImportRequestSnowflakeTableImportConfig", + "CreateTableImportRequestTableImportConfig", + "CreateVirtualTableRequest", + "DatabricksAuthenticationMode", + "DatabricksConnectionConfiguration", + "DatabricksTableImportConfig", + "DateColumnInitialIncrementalState", + "DecimalColumnInitialIncrementalState", + "DeltaVirtualTableConfig", + "Domain", + "EncryptedProperty", + "FileAnyPathMatchesFilter", + "FileAtLeastCountFilter", + "FileChangedSinceLastUploadFilter", + "FileFormat", + "FileImport", + "FileImportCustomFilter", + "FileImportDisplayName", + "FileImportFilter", + "FileImportMode", + "FileImportRid", + "FileLastModifiedAfterFilter", + "FilePathMatchesFilter", + "FilePathNotMatchesFilter", + "FileProperty", + "FileSizeFilter", + "FilesCountLimitFilter", + "FilesVirtualTableConfig", + "FoundryWorker", + "GetConfigurationConnectionsBatchRequestElement", + "GetConfigurationConnectionsBatchResponse", + "GlueVirtualTableConfig", + "HeaderApiKey", + "IcebergVirtualTableConfig", + "IntegerColumnInitialIncrementalState", + "InvalidConnectionReason", + "JdbcConnectionConfiguration", + "JdbcDriverArtifactName", + "JdbcProperties", + "JdbcTableImportConfig", + "ListFileImportsResponse", + "ListTableImportsResponse", + "LongColumnInitialIncrementalState", + "MicrosoftAccessTableImportConfig", + "MicrosoftSqlServerTableImportConfig", + "NetworkEgressPolicyRid", + "OauthMachineToMachineAuth", + "OracleTableImportConfig", + "PersonalAccessToken", + "PlaintextValue", + "PostgreSqlTableImportConfig", + "Protocol", + "QueryParameterApiKey", + "Region", + "ReplaceFileImportRequest", + "ReplaceTableImportRequest", + "ReplaceTableImportRequestDatabricksTableImportConfig", + "ReplaceTableImportRequestJdbcTableImportConfig", + "ReplaceTableImportRequestMicrosoftAccessTableImportConfig", + "ReplaceTableImportRequestMicrosoftSqlServerTableImportConfig", + "ReplaceTableImportRequestOracleTableImportConfig", + "ReplaceTableImportRequestPostgreSqlTableImportConfig", + "ReplaceTableImportRequestSnowflakeTableImportConfig", + "ReplaceTableImportRequestTableImportConfig", + "RestAuthenticationMode", + "RestConnectionAdditionalSecrets", + "RestConnectionConfiguration", + "RestConnectionOAuth2", + "RestRequestApiKeyLocation", + "S3AuthenticationMode", + "S3ConnectionConfiguration", + "S3KmsConfiguration", + "S3ProxyConfiguration", + "SecretName", + "SecretsNames", + "SecretsWithPlaintextValues", + "SmbAuth", + "SmbConnectionConfiguration", + "SmbProxyConfiguration", + "SmbProxyType", + "SmbUsernamePasswordAuth", + "SnowflakeAuthenticationMode", + "SnowflakeConnectionConfiguration", + "SnowflakeExternalOauth", + "SnowflakeKeyPairAuthentication", + "SnowflakeTableImportConfig", + "SnowflakeVirtualTableConfig", + "StringColumnInitialIncrementalState", + "StsRoleConfiguration", + "TableImport", + "TableImportAllowSchemaChanges", + "TableImportConfig", + "TableImportDisplayName", + "TableImportInitialIncrementalState", + "TableImportMode", + "TableImportQuery", + "TableImportRid", + "TableName", + "TableRid", + "TimestampColumnInitialIncrementalState", + "UnityVirtualTableConfig", + "UnknownWorker", + "UpdateExportSettingsForConnectionRequest", + "UpdateSecretsForConnectionRequest", + "UriScheme", + "VirtualTable", + "VirtualTableConfig", + "WorkflowIdentityFederation", +] diff --git a/foundry_sdk/v2/connectivity/table_import.py b/foundry_sdk/v2/connectivity/table_import.py new file mode 100644 index 000000000..dabde28c1 --- /dev/null +++ b/foundry_sdk/v2/connectivity/table_import.py @@ -0,0 +1,921 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v2.connectivity import errors as connectivity_errors +from foundry_sdk.v2.connectivity import models as connectivity_models +from foundry_sdk.v2.core import models as core_models +from foundry_sdk.v2.datasets import errors as datasets_errors +from foundry_sdk.v2.datasets import models as datasets_models + + +class TableImportClient: + """ + The API client for the TableImport Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _TableImportClientStreaming(self) + self.with_raw_response = _TableImportClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def create( + self, + connection_rid: connectivity_models.ConnectionRid, + *, + config: connectivity_models.CreateTableImportRequestTableImportConfig, + dataset_rid: datasets_models.DatasetRid, + display_name: connectivity_models.TableImportDisplayName, + import_mode: connectivity_models.TableImportMode, + allow_schema_changes: typing.Optional[ + connectivity_models.TableImportAllowSchemaChanges + ] = None, + branch_name: typing.Optional[datasets_models.BranchName] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> connectivity_models.TableImport: + """ + Creates a new TableImport. + :param connection_rid: + :type connection_rid: ConnectionRid + :param config: + :type config: CreateTableImportRequestTableImportConfig + :param dataset_rid: The RID of the output dataset. Can not be modified after the table import is created. + :type dataset_rid: DatasetRid + :param display_name: + :type display_name: TableImportDisplayName + :param import_mode: + :type import_mode: TableImportMode + :param allow_schema_changes: Allow the TableImport to succeed if the schema of imported rows does not match the existing dataset's schema. Defaults to false for new table imports. + :type allow_schema_changes: Optional[TableImportAllowSchemaChanges] + :param branch_name: The branch name in the output dataset that will contain the imported data. Defaults to `master` for most enrollments. Can not be modified after the table import is created. + :type branch_name: Optional[BranchName] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: connectivity_models.TableImport + + :raises ConnectionDetailsNotDetermined: Details of the connection (such as which types of import it supports) could not be determined. + :raises ConnectionNotFound: The given Connection could not be found. + :raises CreateTableImportPermissionDenied: Could not create the TableImport. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises TableImportNotSupportedForConnection: The specified connection does not support creating or replacing a table import with the specified config. + :raises TableImportTypeNotSupported: The specified table import type is not yet supported in the Platform API. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/connectivity/connections/{connectionRid}/tableImports", + query_params={ + "preview": preview, + }, + path_params={ + "connectionRid": connection_rid, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=connectivity_models.CreateTableImportRequest( + dataset_rid=dataset_rid, + import_mode=import_mode, + display_name=display_name, + allow_schema_changes=allow_schema_changes, + branch_name=branch_name, + config=config, + ), + response_type=connectivity_models.TableImport, + request_timeout=request_timeout, + throwable_errors={ + "ConnectionDetailsNotDetermined": connectivity_errors.ConnectionDetailsNotDetermined, + "ConnectionNotFound": connectivity_errors.ConnectionNotFound, + "CreateTableImportPermissionDenied": connectivity_errors.CreateTableImportPermissionDenied, + "DatasetNotFound": datasets_errors.DatasetNotFound, + "TableImportNotSupportedForConnection": connectivity_errors.TableImportNotSupportedForConnection, + "TableImportTypeNotSupported": connectivity_errors.TableImportTypeNotSupported, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def delete( + self, + connection_rid: connectivity_models.ConnectionRid, + table_import_rid: connectivity_models.TableImportRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> None: + """ + Delete the TableImport with the specified RID. + Deleting the table import does not delete the destination dataset but the dataset will no longer + be updated by this import. + + :param connection_rid: + :type connection_rid: ConnectionRid + :param table_import_rid: + :type table_import_rid: TableImportRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: None + + :raises DeleteTableImportPermissionDenied: Could not delete the TableImport. + :raises TableImportNotFound: The given TableImport could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="DELETE", + resource_path="/v2/connectivity/connections/{connectionRid}/tableImports/{tableImportRid}", + query_params={ + "preview": preview, + }, + path_params={ + "connectionRid": connection_rid, + "tableImportRid": table_import_rid, + }, + header_params={}, + body=None, + response_type=None, + request_timeout=request_timeout, + throwable_errors={ + "DeleteTableImportPermissionDenied": connectivity_errors.DeleteTableImportPermissionDenied, + "TableImportNotFound": connectivity_errors.TableImportNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def execute( + self, + connection_rid: connectivity_models.ConnectionRid, + table_import_rid: connectivity_models.TableImportRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core_models.BuildRid: + """ + Executes the TableImport, which runs asynchronously as a [Foundry Build](https://palantir.com/docs/foundry/data-integration/builds/). + The returned BuildRid can be used to check the status via the Orchestration API. + + :param connection_rid: + :type connection_rid: ConnectionRid + :param table_import_rid: + :type table_import_rid: TableImportRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core_models.BuildRid + + :raises ExecuteTableImportPermissionDenied: Could not execute the TableImport. + :raises TableImportNotFound: The given TableImport could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/connectivity/connections/{connectionRid}/tableImports/{tableImportRid}/execute", + query_params={ + "preview": preview, + }, + path_params={ + "connectionRid": connection_rid, + "tableImportRid": table_import_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=core_models.BuildRid, + request_timeout=request_timeout, + throwable_errors={ + "ExecuteTableImportPermissionDenied": connectivity_errors.ExecuteTableImportPermissionDenied, + "TableImportNotFound": connectivity_errors.TableImportNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + connection_rid: connectivity_models.ConnectionRid, + table_import_rid: connectivity_models.TableImportRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> connectivity_models.TableImport: + """ + Get the TableImport with the specified rid. + :param connection_rid: + :type connection_rid: ConnectionRid + :param table_import_rid: + :type table_import_rid: TableImportRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: connectivity_models.TableImport + + :raises TableImportNotFound: The given TableImport could not be found. + :raises TableImportTypeNotSupported: The specified table import type is not yet supported in the Platform API. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/connectivity/connections/{connectionRid}/tableImports/{tableImportRid}", + query_params={ + "preview": preview, + }, + path_params={ + "connectionRid": connection_rid, + "tableImportRid": table_import_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=connectivity_models.TableImport, + request_timeout=request_timeout, + throwable_errors={ + "TableImportNotFound": connectivity_errors.TableImportNotFound, + "TableImportTypeNotSupported": connectivity_errors.TableImportTypeNotSupported, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def list( + self, + connection_rid: connectivity_models.ConnectionRid, + *, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.ResourceIterator[connectivity_models.TableImport]: + """ + Lists all table imports defined for this connection. + Only table imports that the user has permissions to view will be returned. + + :param connection_rid: + :type connection_rid: ConnectionRid + :param page_size: The page size to use for the endpoint. + :type page_size: Optional[PageSize] + :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. + :type page_token: Optional[PageToken] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.ResourceIterator[connectivity_models.TableImport] + + :raises ConnectionNotFound: The given Connection could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/connectivity/connections/{connectionRid}/tableImports", + query_params={ + "pageSize": page_size, + "pageToken": page_token, + "preview": preview, + }, + path_params={ + "connectionRid": connection_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=connectivity_models.ListTableImportsResponse, + request_timeout=request_timeout, + throwable_errors={ + "ConnectionNotFound": connectivity_errors.ConnectionNotFound, + }, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def replace( + self, + connection_rid: connectivity_models.ConnectionRid, + table_import_rid: connectivity_models.TableImportRid, + *, + config: connectivity_models.ReplaceTableImportRequestTableImportConfig, + display_name: connectivity_models.TableImportDisplayName, + import_mode: connectivity_models.TableImportMode, + allow_schema_changes: typing.Optional[ + connectivity_models.TableImportAllowSchemaChanges + ] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> connectivity_models.TableImport: + """ + Replace the TableImport with the specified rid. + :param connection_rid: + :type connection_rid: ConnectionRid + :param table_import_rid: + :type table_import_rid: TableImportRid + :param config: + :type config: ReplaceTableImportRequestTableImportConfig + :param display_name: + :type display_name: TableImportDisplayName + :param import_mode: + :type import_mode: TableImportMode + :param allow_schema_changes: Allow the TableImport to succeed if the schema of imported rows does not match the existing dataset's schema. Defaults to false for new table imports. + :type allow_schema_changes: Optional[TableImportAllowSchemaChanges] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: connectivity_models.TableImport + + :raises ConnectionDetailsNotDetermined: Details of the connection (such as which types of import it supports) could not be determined. + :raises ConnectionNotFound: The given Connection could not be found. + :raises ReplaceTableImportPermissionDenied: Could not replace the TableImport. + :raises TableImportNotFound: The given TableImport could not be found. + :raises TableImportNotSupportedForConnection: The specified connection does not support creating or replacing a table import with the specified config. + :raises TableImportTypeNotSupported: The specified table import type is not yet supported in the Platform API. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="PUT", + resource_path="/v2/connectivity/connections/{connectionRid}/tableImports/{tableImportRid}", + query_params={ + "preview": preview, + }, + path_params={ + "connectionRid": connection_rid, + "tableImportRid": table_import_rid, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=connectivity_models.ReplaceTableImportRequest( + import_mode=import_mode, + display_name=display_name, + allow_schema_changes=allow_schema_changes, + config=config, + ), + response_type=connectivity_models.TableImport, + request_timeout=request_timeout, + throwable_errors={ + "ConnectionDetailsNotDetermined": connectivity_errors.ConnectionDetailsNotDetermined, + "ConnectionNotFound": connectivity_errors.ConnectionNotFound, + "ReplaceTableImportPermissionDenied": connectivity_errors.ReplaceTableImportPermissionDenied, + "TableImportNotFound": connectivity_errors.TableImportNotFound, + "TableImportNotSupportedForConnection": connectivity_errors.TableImportNotSupportedForConnection, + "TableImportTypeNotSupported": connectivity_errors.TableImportTypeNotSupported, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _TableImportClientRaw: + def __init__(self, client: TableImportClient) -> None: + def create(_: connectivity_models.TableImport): ... + def delete(_: None): ... + def execute(_: core_models.BuildRid): ... + def get(_: connectivity_models.TableImport): ... + def list(_: connectivity_models.ListTableImportsResponse): ... + def replace(_: connectivity_models.TableImport): ... + + self.create = core.with_raw_response(create, client.create) + self.delete = core.with_raw_response(delete, client.delete) + self.execute = core.with_raw_response(execute, client.execute) + self.get = core.with_raw_response(get, client.get) + self.list = core.with_raw_response(list, client.list) + self.replace = core.with_raw_response(replace, client.replace) + + +class _TableImportClientStreaming: + def __init__(self, client: TableImportClient) -> None: + def create(_: connectivity_models.TableImport): ... + def execute(_: core_models.BuildRid): ... + def get(_: connectivity_models.TableImport): ... + def list(_: connectivity_models.ListTableImportsResponse): ... + def replace(_: connectivity_models.TableImport): ... + + self.create = core.with_streaming_response(create, client.create) + self.execute = core.with_streaming_response(execute, client.execute) + self.get = core.with_streaming_response(get, client.get) + self.list = core.with_streaming_response(list, client.list) + self.replace = core.with_streaming_response(replace, client.replace) + + +class AsyncTableImportClient: + """ + The API client for the TableImport Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncTableImportClientStreaming(self) + self.with_raw_response = _AsyncTableImportClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def create( + self, + connection_rid: connectivity_models.ConnectionRid, + *, + config: connectivity_models.CreateTableImportRequestTableImportConfig, + dataset_rid: datasets_models.DatasetRid, + display_name: connectivity_models.TableImportDisplayName, + import_mode: connectivity_models.TableImportMode, + allow_schema_changes: typing.Optional[ + connectivity_models.TableImportAllowSchemaChanges + ] = None, + branch_name: typing.Optional[datasets_models.BranchName] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[connectivity_models.TableImport]: + """ + Creates a new TableImport. + :param connection_rid: + :type connection_rid: ConnectionRid + :param config: + :type config: CreateTableImportRequestTableImportConfig + :param dataset_rid: The RID of the output dataset. Can not be modified after the table import is created. + :type dataset_rid: DatasetRid + :param display_name: + :type display_name: TableImportDisplayName + :param import_mode: + :type import_mode: TableImportMode + :param allow_schema_changes: Allow the TableImport to succeed if the schema of imported rows does not match the existing dataset's schema. Defaults to false for new table imports. + :type allow_schema_changes: Optional[TableImportAllowSchemaChanges] + :param branch_name: The branch name in the output dataset that will contain the imported data. Defaults to `master` for most enrollments. Can not be modified after the table import is created. + :type branch_name: Optional[BranchName] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[connectivity_models.TableImport] + + :raises ConnectionDetailsNotDetermined: Details of the connection (such as which types of import it supports) could not be determined. + :raises ConnectionNotFound: The given Connection could not be found. + :raises CreateTableImportPermissionDenied: Could not create the TableImport. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises TableImportNotSupportedForConnection: The specified connection does not support creating or replacing a table import with the specified config. + :raises TableImportTypeNotSupported: The specified table import type is not yet supported in the Platform API. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/connectivity/connections/{connectionRid}/tableImports", + query_params={ + "preview": preview, + }, + path_params={ + "connectionRid": connection_rid, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=connectivity_models.CreateTableImportRequest( + dataset_rid=dataset_rid, + import_mode=import_mode, + display_name=display_name, + allow_schema_changes=allow_schema_changes, + branch_name=branch_name, + config=config, + ), + response_type=connectivity_models.TableImport, + request_timeout=request_timeout, + throwable_errors={ + "ConnectionDetailsNotDetermined": connectivity_errors.ConnectionDetailsNotDetermined, + "ConnectionNotFound": connectivity_errors.ConnectionNotFound, + "CreateTableImportPermissionDenied": connectivity_errors.CreateTableImportPermissionDenied, + "DatasetNotFound": datasets_errors.DatasetNotFound, + "TableImportNotSupportedForConnection": connectivity_errors.TableImportNotSupportedForConnection, + "TableImportTypeNotSupported": connectivity_errors.TableImportTypeNotSupported, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def delete( + self, + connection_rid: connectivity_models.ConnectionRid, + table_import_rid: connectivity_models.TableImportRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[None]: + """ + Delete the TableImport with the specified RID. + Deleting the table import does not delete the destination dataset but the dataset will no longer + be updated by this import. + + :param connection_rid: + :type connection_rid: ConnectionRid + :param table_import_rid: + :type table_import_rid: TableImportRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[None] + + :raises DeleteTableImportPermissionDenied: Could not delete the TableImport. + :raises TableImportNotFound: The given TableImport could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="DELETE", + resource_path="/v2/connectivity/connections/{connectionRid}/tableImports/{tableImportRid}", + query_params={ + "preview": preview, + }, + path_params={ + "connectionRid": connection_rid, + "tableImportRid": table_import_rid, + }, + header_params={}, + body=None, + response_type=None, + request_timeout=request_timeout, + throwable_errors={ + "DeleteTableImportPermissionDenied": connectivity_errors.DeleteTableImportPermissionDenied, + "TableImportNotFound": connectivity_errors.TableImportNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def execute( + self, + connection_rid: connectivity_models.ConnectionRid, + table_import_rid: connectivity_models.TableImportRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[core_models.BuildRid]: + """ + Executes the TableImport, which runs asynchronously as a [Foundry Build](https://palantir.com/docs/foundry/data-integration/builds/). + The returned BuildRid can be used to check the status via the Orchestration API. + + :param connection_rid: + :type connection_rid: ConnectionRid + :param table_import_rid: + :type table_import_rid: TableImportRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[core_models.BuildRid] + + :raises ExecuteTableImportPermissionDenied: Could not execute the TableImport. + :raises TableImportNotFound: The given TableImport could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/connectivity/connections/{connectionRid}/tableImports/{tableImportRid}/execute", + query_params={ + "preview": preview, + }, + path_params={ + "connectionRid": connection_rid, + "tableImportRid": table_import_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=core_models.BuildRid, + request_timeout=request_timeout, + throwable_errors={ + "ExecuteTableImportPermissionDenied": connectivity_errors.ExecuteTableImportPermissionDenied, + "TableImportNotFound": connectivity_errors.TableImportNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + connection_rid: connectivity_models.ConnectionRid, + table_import_rid: connectivity_models.TableImportRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[connectivity_models.TableImport]: + """ + Get the TableImport with the specified rid. + :param connection_rid: + :type connection_rid: ConnectionRid + :param table_import_rid: + :type table_import_rid: TableImportRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[connectivity_models.TableImport] + + :raises TableImportNotFound: The given TableImport could not be found. + :raises TableImportTypeNotSupported: The specified table import type is not yet supported in the Platform API. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/connectivity/connections/{connectionRid}/tableImports/{tableImportRid}", + query_params={ + "preview": preview, + }, + path_params={ + "connectionRid": connection_rid, + "tableImportRid": table_import_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=connectivity_models.TableImport, + request_timeout=request_timeout, + throwable_errors={ + "TableImportNotFound": connectivity_errors.TableImportNotFound, + "TableImportTypeNotSupported": connectivity_errors.TableImportTypeNotSupported, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def list( + self, + connection_rid: connectivity_models.ConnectionRid, + *, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.AsyncResourceIterator[connectivity_models.TableImport]: + """ + Lists all table imports defined for this connection. + Only table imports that the user has permissions to view will be returned. + + :param connection_rid: + :type connection_rid: ConnectionRid + :param page_size: The page size to use for the endpoint. + :type page_size: Optional[PageSize] + :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. + :type page_token: Optional[PageToken] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.AsyncResourceIterator[connectivity_models.TableImport] + + :raises ConnectionNotFound: The given Connection could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/connectivity/connections/{connectionRid}/tableImports", + query_params={ + "pageSize": page_size, + "pageToken": page_token, + "preview": preview, + }, + path_params={ + "connectionRid": connection_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=connectivity_models.ListTableImportsResponse, + request_timeout=request_timeout, + throwable_errors={ + "ConnectionNotFound": connectivity_errors.ConnectionNotFound, + }, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def replace( + self, + connection_rid: connectivity_models.ConnectionRid, + table_import_rid: connectivity_models.TableImportRid, + *, + config: connectivity_models.ReplaceTableImportRequestTableImportConfig, + display_name: connectivity_models.TableImportDisplayName, + import_mode: connectivity_models.TableImportMode, + allow_schema_changes: typing.Optional[ + connectivity_models.TableImportAllowSchemaChanges + ] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[connectivity_models.TableImport]: + """ + Replace the TableImport with the specified rid. + :param connection_rid: + :type connection_rid: ConnectionRid + :param table_import_rid: + :type table_import_rid: TableImportRid + :param config: + :type config: ReplaceTableImportRequestTableImportConfig + :param display_name: + :type display_name: TableImportDisplayName + :param import_mode: + :type import_mode: TableImportMode + :param allow_schema_changes: Allow the TableImport to succeed if the schema of imported rows does not match the existing dataset's schema. Defaults to false for new table imports. + :type allow_schema_changes: Optional[TableImportAllowSchemaChanges] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[connectivity_models.TableImport] + + :raises ConnectionDetailsNotDetermined: Details of the connection (such as which types of import it supports) could not be determined. + :raises ConnectionNotFound: The given Connection could not be found. + :raises ReplaceTableImportPermissionDenied: Could not replace the TableImport. + :raises TableImportNotFound: The given TableImport could not be found. + :raises TableImportNotSupportedForConnection: The specified connection does not support creating or replacing a table import with the specified config. + :raises TableImportTypeNotSupported: The specified table import type is not yet supported in the Platform API. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="PUT", + resource_path="/v2/connectivity/connections/{connectionRid}/tableImports/{tableImportRid}", + query_params={ + "preview": preview, + }, + path_params={ + "connectionRid": connection_rid, + "tableImportRid": table_import_rid, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=connectivity_models.ReplaceTableImportRequest( + import_mode=import_mode, + display_name=display_name, + allow_schema_changes=allow_schema_changes, + config=config, + ), + response_type=connectivity_models.TableImport, + request_timeout=request_timeout, + throwable_errors={ + "ConnectionDetailsNotDetermined": connectivity_errors.ConnectionDetailsNotDetermined, + "ConnectionNotFound": connectivity_errors.ConnectionNotFound, + "ReplaceTableImportPermissionDenied": connectivity_errors.ReplaceTableImportPermissionDenied, + "TableImportNotFound": connectivity_errors.TableImportNotFound, + "TableImportNotSupportedForConnection": connectivity_errors.TableImportNotSupportedForConnection, + "TableImportTypeNotSupported": connectivity_errors.TableImportTypeNotSupported, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _AsyncTableImportClientRaw: + def __init__(self, client: AsyncTableImportClient) -> None: + def create(_: connectivity_models.TableImport): ... + def delete(_: None): ... + def execute(_: core_models.BuildRid): ... + def get(_: connectivity_models.TableImport): ... + def list(_: connectivity_models.ListTableImportsResponse): ... + def replace(_: connectivity_models.TableImport): ... + + self.create = core.async_with_raw_response(create, client.create) + self.delete = core.async_with_raw_response(delete, client.delete) + self.execute = core.async_with_raw_response(execute, client.execute) + self.get = core.async_with_raw_response(get, client.get) + self.list = core.async_with_raw_response(list, client.list) + self.replace = core.async_with_raw_response(replace, client.replace) + + +class _AsyncTableImportClientStreaming: + def __init__(self, client: AsyncTableImportClient) -> None: + def create(_: connectivity_models.TableImport): ... + def execute(_: core_models.BuildRid): ... + def get(_: connectivity_models.TableImport): ... + def list(_: connectivity_models.ListTableImportsResponse): ... + def replace(_: connectivity_models.TableImport): ... + + self.create = core.async_with_streaming_response(create, client.create) + self.execute = core.async_with_streaming_response(execute, client.execute) + self.get = core.async_with_streaming_response(get, client.get) + self.list = core.async_with_streaming_response(list, client.list) + self.replace = core.async_with_streaming_response(replace, client.replace) diff --git a/foundry_sdk/v2/connectivity/virtual_table.py b/foundry_sdk/v2/connectivity/virtual_table.py new file mode 100644 index 000000000..fe5e7051d --- /dev/null +++ b/foundry_sdk/v2/connectivity/virtual_table.py @@ -0,0 +1,254 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v2.connectivity import errors as connectivity_errors +from foundry_sdk.v2.connectivity import models as connectivity_models +from foundry_sdk.v2.core import models as core_models +from foundry_sdk.v2.filesystem import models as filesystem_models + + +class VirtualTableClient: + """ + The API client for the VirtualTable Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _VirtualTableClientStreaming(self) + self.with_raw_response = _VirtualTableClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def create( + self, + connection_rid: connectivity_models.ConnectionRid, + *, + config: connectivity_models.VirtualTableConfig, + name: connectivity_models.TableName, + parent_rid: filesystem_models.FolderRid, + markings: typing.Optional[typing.List[core_models.MarkingId]] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> connectivity_models.VirtualTable: + """ + Creates a new [Virtual Table](https://palantir.com/docs/foundry/data-integration/virtual-tables/) from an upstream table. The VirtualTable will be created + in the specified parent folder and can be queried through Foundry's data access APIs. + + :param connection_rid: + :type connection_rid: ConnectionRid + :param config: + :type config: VirtualTableConfig + :param name: + :type name: TableName + :param parent_rid: + :type parent_rid: FolderRid + :param markings: + :type markings: Optional[List[MarkingId]] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: connectivity_models.VirtualTable + + :raises ConnectionNotFound: The given Connection could not be found. + :raises CreateVirtualTablePermissionDenied: Could not create the VirtualTable. + :raises InvalidVirtualTableConnection: The specified connection is invalid or inaccessible. + :raises VirtualTableAlreadyExists: A VirtualTable with the same name already exists in the parent folder. + :raises VirtualTableRegisterFromSourcePermissionDenied: User lacks permission to use the specified connection for virtual table registration. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/connectivity/connections/{connectionRid}/virtualTables", + query_params={ + "preview": preview, + }, + path_params={ + "connectionRid": connection_rid, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=connectivity_models.CreateVirtualTableRequest( + markings=markings, + parent_rid=parent_rid, + name=name, + config=config, + ), + response_type=connectivity_models.VirtualTable, + request_timeout=request_timeout, + throwable_errors={ + "ConnectionNotFound": connectivity_errors.ConnectionNotFound, + "CreateVirtualTablePermissionDenied": connectivity_errors.CreateVirtualTablePermissionDenied, + "InvalidVirtualTableConnection": connectivity_errors.InvalidVirtualTableConnection, + "VirtualTableAlreadyExists": connectivity_errors.VirtualTableAlreadyExists, + "VirtualTableRegisterFromSourcePermissionDenied": connectivity_errors.VirtualTableRegisterFromSourcePermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _VirtualTableClientRaw: + def __init__(self, client: VirtualTableClient) -> None: + def create(_: connectivity_models.VirtualTable): ... + + self.create = core.with_raw_response(create, client.create) + + +class _VirtualTableClientStreaming: + def __init__(self, client: VirtualTableClient) -> None: + def create(_: connectivity_models.VirtualTable): ... + + self.create = core.with_streaming_response(create, client.create) + + +class AsyncVirtualTableClient: + """ + The API client for the VirtualTable Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncVirtualTableClientStreaming(self) + self.with_raw_response = _AsyncVirtualTableClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def create( + self, + connection_rid: connectivity_models.ConnectionRid, + *, + config: connectivity_models.VirtualTableConfig, + name: connectivity_models.TableName, + parent_rid: filesystem_models.FolderRid, + markings: typing.Optional[typing.List[core_models.MarkingId]] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[connectivity_models.VirtualTable]: + """ + Creates a new [Virtual Table](https://palantir.com/docs/foundry/data-integration/virtual-tables/) from an upstream table. The VirtualTable will be created + in the specified parent folder and can be queried through Foundry's data access APIs. + + :param connection_rid: + :type connection_rid: ConnectionRid + :param config: + :type config: VirtualTableConfig + :param name: + :type name: TableName + :param parent_rid: + :type parent_rid: FolderRid + :param markings: + :type markings: Optional[List[MarkingId]] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[connectivity_models.VirtualTable] + + :raises ConnectionNotFound: The given Connection could not be found. + :raises CreateVirtualTablePermissionDenied: Could not create the VirtualTable. + :raises InvalidVirtualTableConnection: The specified connection is invalid or inaccessible. + :raises VirtualTableAlreadyExists: A VirtualTable with the same name already exists in the parent folder. + :raises VirtualTableRegisterFromSourcePermissionDenied: User lacks permission to use the specified connection for virtual table registration. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/connectivity/connections/{connectionRid}/virtualTables", + query_params={ + "preview": preview, + }, + path_params={ + "connectionRid": connection_rid, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=connectivity_models.CreateVirtualTableRequest( + markings=markings, + parent_rid=parent_rid, + name=name, + config=config, + ), + response_type=connectivity_models.VirtualTable, + request_timeout=request_timeout, + throwable_errors={ + "ConnectionNotFound": connectivity_errors.ConnectionNotFound, + "CreateVirtualTablePermissionDenied": connectivity_errors.CreateVirtualTablePermissionDenied, + "InvalidVirtualTableConnection": connectivity_errors.InvalidVirtualTableConnection, + "VirtualTableAlreadyExists": connectivity_errors.VirtualTableAlreadyExists, + "VirtualTableRegisterFromSourcePermissionDenied": connectivity_errors.VirtualTableRegisterFromSourcePermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _AsyncVirtualTableClientRaw: + def __init__(self, client: AsyncVirtualTableClient) -> None: + def create(_: connectivity_models.VirtualTable): ... + + self.create = core.async_with_raw_response(create, client.create) + + +class _AsyncVirtualTableClientStreaming: + def __init__(self, client: AsyncVirtualTableClient) -> None: + def create(_: connectivity_models.VirtualTable): ... + + self.create = core.async_with_streaming_response(create, client.create) diff --git a/foundry_sdk/v2/core/errors.py b/foundry_sdk/v2/core/errors.py new file mode 100644 index 000000000..faec61968 --- /dev/null +++ b/foundry_sdk/v2/core/errors.py @@ -0,0 +1,387 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing +from dataclasses import dataclass + +import typing_extensions + +from foundry_sdk import _errors as errors +from foundry_sdk.v2.core import models as core_models + + +class ApiFeaturePreviewUsageOnlyParameters(typing_extensions.TypedDict): + """ + This feature is only supported in preview mode. Please use `preview=true` in the query + parameters to call this endpoint. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class ApiFeaturePreviewUsageOnly(errors.BadRequestError): + name: typing.Literal["ApiFeaturePreviewUsageOnly"] + parameters: ApiFeaturePreviewUsageOnlyParameters + error_instance_id: str + + +class ApiUsageDeniedParameters(typing_extensions.TypedDict): + """You are not allowed to use Palantir APIs.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + missingScope: typing_extensions.NotRequired[core_models.OperationScope] + + +@dataclass +class ApiUsageDenied(errors.PermissionDeniedError): + name: typing.Literal["ApiUsageDenied"] + parameters: ApiUsageDeniedParameters + error_instance_id: str + + +class BatchRequestSizeExceededLimitParameters(typing_extensions.TypedDict): + """The submitted batch request was too large.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + maximumBatchSize: int + """The maximum size of batch requests that can be sent to this endpoint.""" + + providedBatchSize: int + """The size of the batch request that was sent to this endpoint.""" + + +@dataclass +class BatchRequestSizeExceededLimit(errors.BadRequestError): + name: typing.Literal["BatchRequestSizeExceededLimit"] + parameters: BatchRequestSizeExceededLimitParameters + error_instance_id: str + + +class FolderNotFoundParameters(typing_extensions.TypedDict): + """The requested folder could not be found, or the client token does not have access to it.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + folderRid: core_models.FolderRid + + +@dataclass +class FolderNotFound(errors.NotFoundError): + name: typing.Literal["FolderNotFound"] + parameters: FolderNotFoundParameters + error_instance_id: str + + +class FoundryBranchNotFoundParameters(typing_extensions.TypedDict): + """The requested foundry branch could not be found, or the client token does not have access to it.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + branch: core_models.FoundryBranch + + +@dataclass +class FoundryBranchNotFound(errors.NotFoundError): + name: typing.Literal["FoundryBranchNotFound"] + parameters: FoundryBranchNotFoundParameters + error_instance_id: str + + +class InvalidAndFilterParameters(typing_extensions.TypedDict): + """The provided AND filter should have at least one sub-filter.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class InvalidAndFilter(errors.BadRequestError): + name: typing.Literal["InvalidAndFilter"] + parameters: InvalidAndFilterParameters + error_instance_id: str + + +class InvalidAttributionHeaderParameters(typing_extensions.TypedDict): + """ + The attribution provided in the header could not be parsed to a valid RID, or to a comma separated list of + valid RIDs. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + header: str + + +@dataclass +class InvalidAttributionHeader(errors.BadRequestError): + name: typing.Literal["InvalidAttributionHeader"] + parameters: InvalidAttributionHeaderParameters + error_instance_id: str + + +class InvalidChangeDataCaptureConfigurationParameters(typing_extensions.TypedDict): + """The change data capture configuration is invalid.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class InvalidChangeDataCaptureConfiguration(errors.BadRequestError): + name: typing.Literal["InvalidChangeDataCaptureConfiguration"] + parameters: InvalidChangeDataCaptureConfigurationParameters + error_instance_id: str + + +class InvalidFieldSchemaParameters(typing_extensions.TypedDict): + """The field schema failed validations""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + fieldName: typing_extensions.NotRequired[core_models.FieldName] + message: str + + +@dataclass +class InvalidFieldSchema(errors.BadRequestError): + name: typing.Literal["InvalidFieldSchema"] + parameters: InvalidFieldSchemaParameters + error_instance_id: str + + +class InvalidFilePathParameters(typing_extensions.TypedDict): + """The provided file path is invalid.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + filePath: core_models.FilePath + + +@dataclass +class InvalidFilePath(errors.BadRequestError): + name: typing.Literal["InvalidFilePath"] + parameters: InvalidFilePathParameters + error_instance_id: str + + +class InvalidFilterValueParameters(typing_extensions.TypedDict): + """The provided filter value is invalid.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + field: str + value: typing.Any + expectedType: core_models.FilterType + + +@dataclass +class InvalidFilterValue(errors.BadRequestError): + name: typing.Literal["InvalidFilterValue"] + parameters: InvalidFilterValueParameters + error_instance_id: str + + +class InvalidOrFilterParameters(typing_extensions.TypedDict): + """The provided OR filter should have at least one sub-filter.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class InvalidOrFilter(errors.BadRequestError): + name: typing.Literal["InvalidOrFilter"] + parameters: InvalidOrFilterParameters + error_instance_id: str + + +class InvalidPageSizeParameters(typing_extensions.TypedDict): + """The provided page size was zero or negative. Page sizes must be greater than zero.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + pageSize: core_models.PageSize + """The page size to use for the endpoint.""" + + +@dataclass +class InvalidPageSize(errors.BadRequestError): + name: typing.Literal["InvalidPageSize"] + parameters: InvalidPageSizeParameters + error_instance_id: str + + +class InvalidPageTokenParameters(typing_extensions.TypedDict): + """The provided page token is invalid.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + pageToken: core_models.PageToken + """ + The page token indicates where to start paging. This should be omitted from the first page's request. + To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response + and use it to populate the `pageToken` field of the next request. + """ + + +@dataclass +class InvalidPageToken(errors.BadRequestError): + name: typing.Literal["InvalidPageToken"] + parameters: InvalidPageTokenParameters + error_instance_id: str + + +class InvalidParameterCombinationParameters(typing_extensions.TypedDict): + """The given parameters are individually valid but cannot be used in the given combination.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + validCombinations: typing.List[typing.List[str]] + providedParameters: typing.List[str] + + +@dataclass +class InvalidParameterCombination(errors.BadRequestError): + name: typing.Literal["InvalidParameterCombination"] + parameters: InvalidParameterCombinationParameters + error_instance_id: str + + +class InvalidSchemaParameters(typing_extensions.TypedDict): + """The schema failed validations""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + errorType: str + message: str + + +@dataclass +class InvalidSchema(errors.BadRequestError): + name: typing.Literal["InvalidSchema"] + parameters: InvalidSchemaParameters + error_instance_id: str + + +class InvalidTimeZoneParameters(typing_extensions.TypedDict): + """The time zone is invalid.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + timeZone: core_models.ZoneId + + +@dataclass +class InvalidTimeZone(errors.BadRequestError): + name: typing.Literal["InvalidTimeZone"] + parameters: InvalidTimeZoneParameters + error_instance_id: str + + +class MissingBatchRequestParameters(typing_extensions.TypedDict): + """Batch requests must contain at least one element.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class MissingBatchRequest(errors.BadRequestError): + name: typing.Literal["MissingBatchRequest"] + parameters: MissingBatchRequestParameters + error_instance_id: str + + +class MissingPostBodyParameters(typing_extensions.TypedDict): + """A post body is required for this endpoint, but was not found in the request.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class MissingPostBody(errors.BadRequestError): + name: typing.Literal["MissingPostBody"] + parameters: MissingPostBodyParameters + error_instance_id: str + + +class ResourceNameAlreadyExistsParameters(typing_extensions.TypedDict): + """The provided resource name is already in use by another resource in the same folder.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + parentFolderRid: core_models.FolderRid + resourceName: str + + +@dataclass +class ResourceNameAlreadyExists(errors.ConflictError): + name: typing.Literal["ResourceNameAlreadyExists"] + parameters: ResourceNameAlreadyExistsParameters + error_instance_id: str + + +class SchemaIsNotStreamSchemaParameters(typing_extensions.TypedDict): + """The requested schema could not be converted into a stream schema.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class SchemaIsNotStreamSchema(errors.BadRequestError): + name: typing.Literal["SchemaIsNotStreamSchema"] + parameters: SchemaIsNotStreamSchemaParameters + error_instance_id: str + + +class UnknownDistanceUnitParameters(typing_extensions.TypedDict): + """An unknown distance unit was provided.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + unknownUnit: str + knownUnits: typing.List[core_models.DistanceUnit] + + +@dataclass +class UnknownDistanceUnit(errors.BadRequestError): + name: typing.Literal["UnknownDistanceUnit"] + parameters: UnknownDistanceUnitParameters + error_instance_id: str + + +__all__ = [ + "ApiFeaturePreviewUsageOnly", + "ApiUsageDenied", + "BatchRequestSizeExceededLimit", + "FolderNotFound", + "FoundryBranchNotFound", + "InvalidAndFilter", + "InvalidAttributionHeader", + "InvalidChangeDataCaptureConfiguration", + "InvalidFieldSchema", + "InvalidFilePath", + "InvalidFilterValue", + "InvalidOrFilter", + "InvalidPageSize", + "InvalidPageToken", + "InvalidParameterCombination", + "InvalidSchema", + "InvalidTimeZone", + "MissingBatchRequest", + "MissingPostBody", + "ResourceNameAlreadyExists", + "SchemaIsNotStreamSchema", + "UnknownDistanceUnit", +] diff --git a/foundry_sdk/v2/core/models.py b/foundry_sdk/v2/core/models.py new file mode 100644 index 000000000..a5d3935e1 --- /dev/null +++ b/foundry_sdk/v2/core/models.py @@ -0,0 +1,1037 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core + + +class AnyType(core.ModelBase): + """AnyType""" + + type: typing.Literal["any"] = "any" + + +class ArrayFieldType(core.ModelBase): + """ArrayFieldType""" + + items_schema: FieldSchema = pydantic.Field(alias=str("itemsSchema")) # type: ignore[literal-required] + type: typing.Literal["array"] = "array" + + +class AttachmentType(core.ModelBase): + """AttachmentType""" + + type: typing.Literal["attachment"] = "attachment" + + +Attribution = str +"""Attribution for a request""" + + +class BinaryType(core.ModelBase): + """BinaryType""" + + type: typing.Literal["binary"] = "binary" + + +class BooleanType(core.ModelBase): + """BooleanType""" + + type: typing.Literal["boolean"] = "boolean" + + +class BranchMetadata(core.ModelBase): + """Metadata about a Foundry branch.""" + + rid: FoundryBranch + + +BuildRid = core.RID +"""The RID of a Build.""" + + +class ByteType(core.ModelBase): + """ByteType""" + + type: typing.Literal["byte"] = "byte" + + +CheckReportRid = core.RID +"""The unique resource identifier (RID) of a Data Health Check Report.""" + + +CheckRid = core.RID +"""The unique resource identifier (RID) of a Data Health Check.""" + + +class CipherTextType(core.ModelBase): + """CipherTextType""" + + default_cipher_channel: typing.Optional[core.RID] = pydantic.Field(alias=str("defaultCipherChannel"), default=None) # type: ignore[literal-required] + """An optional Cipher Channel RID which can be used for encryption updates to empty values.""" + + type: typing.Literal["cipherText"] = "cipherText" + + +ComputeSeconds = float +"""A measurement of compute usage expressed in [compute-seconds](https://palantir.com/docs/foundry/resource-management/usage-types#compute-second). For more information, please refer to the [Usage types](https://palantir.com/docs/foundry/resource-management/usage-types) documentation.""" + + +ContentLength = core.Long +"""ContentLength""" + + +ContentType = str +"""ContentType""" + + +CreatedTime = core.AwareDatetime +"""The time at which the resource was created.""" + + +CustomMetadata = typing.Dict[str, typing.Any] +"""CustomMetadata""" + + +class DatasetFieldSchema(core.ModelBase): + """A field in a Foundry dataset.""" + + type: SchemaFieldType + name: typing.Optional[FieldName] = None + """The name of a column. May be absent in nested schema objects.""" + + nullable: bool + """Indicates whether values of this field may be null.""" + + user_defined_type_class: typing.Optional[str] = pydantic.Field(alias=str("userDefinedTypeClass"), default=None) # type: ignore[literal-required] + """Canonical classname of the user-defined type for this field. This should be a subclass of Spark's `UserDefinedType`.""" + + custom_metadata: typing.Optional[CustomMetadata] = pydantic.Field(alias=str("customMetadata"), default=None) # type: ignore[literal-required] + """User-supplied custom metadata about the column, such as Foundry web archetypes, descriptions, etc.""" + + array_subtype: typing.Optional[DatasetFieldSchema] = pydantic.Field(alias=str("arraySubtype"), default=None) # type: ignore[literal-required] + """Only used when field type is array.""" + + precision: typing.Optional[int] = None + """Only used when field type is decimal.""" + + scale: typing.Optional[int] = None + """Only used when field type is decimal.""" + + map_key_type: typing.Optional[DatasetFieldSchema] = pydantic.Field(alias=str("mapKeyType"), default=None) # type: ignore[literal-required] + """Only used when field type is map.""" + + map_value_type: typing.Optional[DatasetFieldSchema] = pydantic.Field(alias=str("mapValueType"), default=None) # type: ignore[literal-required] + """Only used when field type is map.""" + + sub_schemas: typing.Optional[typing.List[DatasetFieldSchema]] = pydantic.Field(alias=str("subSchemas"), default=None) # type: ignore[literal-required] + """Only used when field type is struct.""" + + +class DatasetSchema(core.ModelBase): + """The schema for a Foundry dataset. Files uploaded to this dataset must match this schema.""" + + field_schema_list: typing.List[DatasetFieldSchema] = pydantic.Field(alias=str("fieldSchemaList")) # type: ignore[literal-required] + + +class DateType(core.ModelBase): + """DateType""" + + type: typing.Literal["date"] = "date" + + +class DecimalType(core.ModelBase): + """DecimalType""" + + precision: typing.Optional[int] = None + """The total number of digits of the Decimal type. The maximum value is 38.""" + + scale: typing.Optional[int] = None + """The number of digits to the right of the decimal point. The maximum value is 38.""" + + type: typing.Literal["decimal"] = "decimal" + + +DisplayName = str +"""The display name of the entity.""" + + +class Distance(core.ModelBase): + """A measurement of distance.""" + + value: float + unit: DistanceUnit + + +DistanceUnit = typing.Literal[ + "MILLIMETERS", + "CENTIMETERS", + "METERS", + "KILOMETERS", + "INCHES", + "FEET", + "YARDS", + "MILES", + "NAUTICAL_MILES", +] +"""DistanceUnit""" + + +class DoubleType(core.ModelBase): + """DoubleType""" + + type: typing.Literal["double"] = "double" + + +class Duration(core.ModelBase): + """A measurement of duration.""" + + value: int + """The duration value.""" + + unit: TimeUnit + """The unit of duration.""" + + +DurationSeconds = core.Long +"""A duration of time measured in seconds.""" + + +EmbeddingModel = typing_extensions.Annotated[ + typing.Union["LmsEmbeddingModel", "FoundryLiveDeployment"], pydantic.Field(discriminator="type") +] +"""EmbeddingModel""" + + +EnrollmentRid = core.RID +"""EnrollmentRid""" + + +class Field(core.ModelBase): + """ + A field in a Foundry schema. For more information on supported data types, see the + [supported field types](https://palantir.com/docs/foundry/data-integration/datasets/#supported-field-types) user documentation. + """ + + name: FieldName + schema_: FieldSchema = pydantic.Field(alias=str("schema")) # type: ignore[literal-required] + + +FieldDataType = typing_extensions.Annotated[ + typing.Union[ + "StructFieldType", + "DateType", + "StringType", + "ByteType", + "DoubleType", + "IntegerType", + "FloatType", + "LongType", + "BooleanType", + "ArrayFieldType", + "BinaryType", + "ShortType", + "DecimalType", + "MapFieldType", + "TimestampType", + ], + pydantic.Field(discriminator="type"), +] +"""FieldDataType""" + + +FieldName = str +"""FieldName""" + + +class FieldSchema(core.ModelBase): + """The specification of the type of a Foundry schema field.""" + + nullable: bool + custom_metadata: typing.Optional[CustomMetadata] = pydantic.Field(alias=str("customMetadata"), default=None) # type: ignore[literal-required] + data_type: FieldDataType = pydantic.Field(alias=str("dataType")) # type: ignore[literal-required] + + +FilePath = str +"""The path to a File within Foundry. Examples: `my-file.txt`, `path/to/my-file.jpg`, `dataframe.snappy.parquet`.""" + + +Filename = str +"""The name of a File within Foundry. Examples: `my-file.txt`, `my-file.jpg`, `dataframe.snappy.parquet`.""" + + +class FilterBinaryType(core.ModelBase): + """FilterBinaryType""" + + type: typing.Literal["binary"] = "binary" + + +class FilterBooleanType(core.ModelBase): + """FilterBooleanType""" + + type: typing.Literal["boolean"] = "boolean" + + +class FilterDateTimeType(core.ModelBase): + """FilterDateTimeType""" + + type: typing.Literal["dateTime"] = "dateTime" + + +class FilterDateType(core.ModelBase): + """FilterDateType""" + + type: typing.Literal["date"] = "date" + + +class FilterDoubleType(core.ModelBase): + """FilterDoubleType""" + + type: typing.Literal["double"] = "double" + + +class FilterEnumType(core.ModelBase): + """FilterEnumType""" + + values: typing.List[str] + """The values allowed by the enum type.""" + + type: typing.Literal["enum"] = "enum" + + +class FilterFloatType(core.ModelBase): + """FilterFloatType""" + + type: typing.Literal["float"] = "float" + + +class FilterIntegerType(core.ModelBase): + """FilterIntegerType""" + + type: typing.Literal["integer"] = "integer" + + +class FilterLongType(core.ModelBase): + """FilterLongType""" + + type: typing.Literal["long"] = "long" + + +class FilterRidType(core.ModelBase): + """FilterRidType""" + + type: typing.Literal["rid"] = "rid" + + +class FilterStringType(core.ModelBase): + """FilterStringType""" + + type: typing.Literal["string"] = "string" + + +FilterType = typing_extensions.Annotated[ + typing.Union[ + "FilterDateTimeType", + "FilterDateType", + "FilterBooleanType", + "FilterStringType", + "FilterDoubleType", + "FilterBinaryType", + "FilterIntegerType", + "FilterFloatType", + "FilterRidType", + "FilterUuidType", + "FilterEnumType", + "FilterLongType", + ], + pydantic.Field(discriminator="type"), +] +"""FilterType""" + + +class FilterUuidType(core.ModelBase): + """FilterUuidType""" + + type: typing.Literal["uuid"] = "uuid" + + +class FloatType(core.ModelBase): + """FloatType""" + + type: typing.Literal["float"] = "float" + + +FolderRid = core.RID +"""FolderRid""" + + +FoundryBranch = str +"""The Foundry branch identifier, specifically its rid. Different identifier types may be used in the future as values.""" + + +class FoundryLiveDeployment(core.ModelBase): + """FoundryLiveDeployment""" + + rid: typing.Optional[core.RID] = None + """The live deployment identifier. This rid is of the format 'ri.foundry-ml-live.main.live-deployment.'.""" + + input_param_name: typing.Optional[str] = pydantic.Field(alias=str("inputParamName"), default=None) # type: ignore[literal-required] + """The name of the input parameter to the model which should contain the query string.""" + + output_param_name: typing.Optional[str] = pydantic.Field(alias=str("outputParamName"), default=None) # type: ignore[literal-required] + """The name of the output parameter to the model which should contain the computed embedding.""" + + type: typing.Literal["foundryLiveDeployment"] = "foundryLiveDeployment" + + +class FullRowChangeDataCaptureConfiguration(core.ModelBase): + """ + Configuration for change data capture which resolves the latest state of the dataset based on new full rows + being pushed to the stream. For example, if a value for a row is updated, it is only sufficient to publish + the entire new state of that row to the stream. + """ + + deletion_field_name: FieldName = pydantic.Field(alias=str("deletionFieldName")) # type: ignore[literal-required] + """The name of a boolean field in the schema that indicates whether or not a row has been deleted.""" + + ordering_field_name: FieldName = pydantic.Field(alias=str("orderingFieldName")) # type: ignore[literal-required] + """ + The name of an ordering field that determines the newest state for a row in the dataset. + + The ordering field can only be of the following types: + - Byte + - Date + - Decimal + - Integer + - Long + - Short + - String + - Timestamp + """ + + type: typing.Literal["fullRow"] = "fullRow" + + +class GeoPointType(core.ModelBase): + """GeoPointType""" + + type: typing.Literal["geopoint"] = "geopoint" + + +class GeoShapeType(core.ModelBase): + """GeoShapeType""" + + type: typing.Literal["geoshape"] = "geoshape" + + +class GeohashType(core.ModelBase): + """GeohashType""" + + type: typing.Literal["geohash"] = "geohash" + + +class GeotimeSeriesReferenceType(core.ModelBase): + """GeotimeSeriesReferenceType""" + + type: typing.Literal["geotimeSeriesReference"] = "geotimeSeriesReference" + + +GroupId = core.UUID +"""A Foundry Group ID.""" + + +GroupName = str +"""The display name of a multipass group.""" + + +GroupRid = core.RID +"""The unique resource identifier (RID) of a multipass group.""" + + +IncludeComputeUsage = bool +""" +Indicates whether the response should include compute usage details for the request. This feature is currently +only available for OSDK applications. +Note: Enabling this flag may slow down query performance and is not recommended for use in production. +""" + + +class IntegerType(core.ModelBase): + """IntegerType""" + + type: typing.Literal["integer"] = "integer" + + +JobRid = core.RID +"""The RID of a Job.""" + + +class LmsEmbeddingModel(core.ModelBase): + """A model provided by Language Model Service.""" + + value: LmsEmbeddingModelValue + type: typing.Literal["lms"] = "lms" + + +LmsEmbeddingModelValue = typing.Literal[ + "OPENAI_TEXT_EMBEDDING_ADA_002", + "TEXT_EMBEDDING_3_LARGE", + "TEXT_EMBEDDING_3_SMALL", + "SNOWFLAKE_ARCTIC_EMBED_M", + "INSTRUCTOR_LARGE", + "BGE_BASE_EN_V1_5", +] +"""LmsEmbeddingModelValue""" + + +class LongType(core.ModelBase): + """LongType""" + + type: typing.Literal["long"] = "long" + + +class MapFieldType(core.ModelBase): + """MapFieldType""" + + key_schema: FieldSchema = pydantic.Field(alias=str("keySchema")) # type: ignore[literal-required] + value_schema: FieldSchema = pydantic.Field(alias=str("valueSchema")) # type: ignore[literal-required] + type: typing.Literal["map"] = "map" + + +MarkingId = str +"""The ID of a security marking.""" + + +class MarkingType(core.ModelBase): + """MarkingType""" + + type: typing.Literal["marking"] = "marking" + + +MediaItemPath = str +""" +A user-specified identifier for a media item within a media set. +Paths must be less than 256 characters long. +If multiple items are written to the same media set at the same path, then when retrieving by path the media +item which was written last is returned. +""" + + +MediaItemReadToken = str +"""A token that grants access to read specific media items.""" + + +MediaItemRid = core.RID +"""The Resource Identifier (RID) of an individual Media Item within a Media Set in Foundry.""" + + +class MediaReference(core.ModelBase): + """The representation of a media reference.""" + + mime_type: MediaType = pydantic.Field(alias=str("mimeType")) # type: ignore[literal-required] + reference: Reference + + +class MediaReferenceType(core.ModelBase): + """MediaReferenceType""" + + type: typing.Literal["mediaReference"] = "mediaReference" + + +MediaSetRid = core.RID +"""The Resource Identifier (RID) of a Media Set in Foundry.""" + + +class MediaSetViewItem(core.ModelBase): + """MediaSetViewItem""" + + media_set_rid: MediaSetRid = pydantic.Field(alias=str("mediaSetRid")) # type: ignore[literal-required] + media_set_view_rid: MediaSetViewRid = pydantic.Field(alias=str("mediaSetViewRid")) # type: ignore[literal-required] + media_item_rid: MediaItemRid = pydantic.Field(alias=str("mediaItemRid")) # type: ignore[literal-required] + token: typing.Optional[MediaItemReadToken] = None + + +class MediaSetViewItemWrapper(core.ModelBase): + """MediaSetViewItemWrapper""" + + media_set_view_item: MediaSetViewItem = pydantic.Field(alias=str("mediaSetViewItem")) # type: ignore[literal-required] + type: typing.Literal["mediaSetViewItem"] = "mediaSetViewItem" + + +MediaSetViewRid = core.RID +"""The Resource Identifier (RID) of a single View of a Media Set. A Media Set View is an independent collection of Media Items.""" + + +MediaType = str +""" +The [media type](https://www.iana.org/assignments/media-types/media-types.xhtml) of the file or attachment. +Examples: `application/json`, `application/pdf`, `application/octet-stream`, `image/jpeg` +""" + + +class NullType(core.ModelBase): + """NullType""" + + type: typing.Literal["null"] = "null" + + +class NumericOrNonNumericType(core.ModelBase): + """ + The time series property can either contain either numeric or non-numeric data. This enables mixed sensor types + where some sensor time series are numeric and others are categorical. A boolean property reference can be used + to determine if the series is numeric or non-numeric. Without this property, the series type can be either + numeric or non-numeric and must be inferred from the result of a time series query. + """ + + is_non_numeric_property_type_id: typing.Optional[str] = pydantic.Field(alias=str("isNonNumericPropertyTypeId"), default=None) # type: ignore[literal-required] + """ + The boolean property type ID specifying whether the series is numeric or non-numeric. If the value is true, + the series is non-numeric. + """ + + type: typing.Literal["numericOrNonNumeric"] = "numericOrNonNumeric" + + +Operation = str +""" +An operation that can be performed on a resource. Operations are used to define the permissions that a Role has. +Operations are typically in the format `service:action`, where `service` is related to the type of resource and `action` is the action being performed. +""" + + +OperationScope = str +"""OperationScope""" + + +OrderByDirection = typing.Literal["ASC", "DESC"] +"""Specifies the ordering direction (can be either `ASC` or `DESC`)""" + + +OrganizationRid = core.RID +"""OrganizationRid""" + + +PageSize = int +"""The page size to use for the endpoint.""" + + +PageToken = str +""" +The page token indicates where to start paging. This should be omitted from the first page's request. +To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response +and use it to populate the `pageToken` field of the next request. +""" + + +PreviewMode = bool +"""Enables the use of preview functionality.""" + + +PrincipalId = core.UUID +"""The ID of a Foundry Group or User.""" + + +PrincipalType = typing.Literal["USER", "GROUP"] +"""PrincipalType""" + + +Realm = str +""" +Identifies which Realm a User or Group is a member of. +The `palantir-internal-realm` is used for Users or Groups that are created in Foundry by administrators and not associated with any SSO provider. +""" + + +ReleaseStatus = typing.Literal["ACTIVE", "ENDORSED", "EXPERIMENTAL", "DEPRECATED"] +"""The release status of the entity.""" + + +class Role(core.ModelBase): + """A set of permissions that can be assigned to a principal for a specific resource type.""" + + id: RoleId + role_set_id: RoleSetId = pydantic.Field(alias=str("roleSetId")) # type: ignore[literal-required] + name: str + description: str + is_default: bool = pydantic.Field(alias=str("isDefault")) # type: ignore[literal-required] + """Default roles are provided by Palantir and cannot be edited or modified by administrators.""" + + type: RoleContext + """The type of resource that is valid for this role.""" + + operations: typing.List[Operation] + """The operations that a principal can perform with this role on the assigned resource.""" + + +class RoleAssignmentUpdate(core.ModelBase): + """RoleAssignmentUpdate""" + + role_id: RoleId = pydantic.Field(alias=str("roleId")) # type: ignore[literal-required] + principal_id: PrincipalId = pydantic.Field(alias=str("principalId")) # type: ignore[literal-required] + + +RoleContext = typing.Literal["ORGANIZATION"] +"""RoleContext""" + + +RoleId = str +""" +The unique ID for a Role. Roles are sets of permissions that grant different levels of access to resources. +The default roles in Foundry are: Owner, Editor, Viewer, and Discoverer. See more about +[roles](https://palantir.com/docs/foundry/security/projects-and-roles#roles) in the user documentation. +""" + + +RoleSetId = str +"""RoleSetId""" + + +ScheduleRid = core.RID +"""The RID of a Schedule.""" + + +SchemaFieldType = typing.Literal[ + "ARRAY", + "BINARY", + "BOOLEAN", + "BYTE", + "DATE", + "DECIMAL", + "DOUBLE", + "FLOAT", + "INTEGER", + "LONG", + "MAP", + "SHORT", + "STRING", + "STRUCT", + "TIMESTAMP", +] +"""The data type of a column in a dataset schema.""" + + +class ShortType(core.ModelBase): + """ShortType""" + + type: typing.Literal["short"] = "short" + + +SizeBytes = core.Long +"""The size of the file or attachment in bytes.""" + + +class StreamSchema(core.ModelBase): + """The schema for a Foundry stream. Records pushed to this stream must match this schema.""" + + fields: typing.List[Field] + key_field_names: typing.Optional[typing.List[FieldName]] = pydantic.Field(alias=str("keyFieldNames"), default=None) # type: ignore[literal-required] + """ + The names of the fields to be used as keys for partitioning records. These key fields are used to group + all records with the same key into the same partition, to guarantee processing order of grouped records. These + keys are not meant to uniquely identify records, and do not by themselves deduplicate records. To deduplicate + records, provide a change data capture configuration for the schema. + + Key fields can only be of the following types: + - Boolean + - Byte + - Date + - Decimal + - Integer + - Long + - Short + - String + - Timestamp + + For additional information on keys for Foundry streams, see the + [streaming keys](https://palantir.com/docs/foundry/building-pipelines/streaming-keys/) user documentation. + """ + + change_data_capture: typing.Optional[ChangeDataCaptureConfiguration] = pydantic.Field(alias=str("changeDataCapture"), default=None) # type: ignore[literal-required] + + +class StringType(core.ModelBase): + """StringType""" + + type: typing.Literal["string"] = "string" + + +StructFieldName = str +"""The name of a field in a `Struct`.""" + + +class StructFieldType(core.ModelBase): + """StructFieldType""" + + sub_fields: typing.List[Field] = pydantic.Field(alias=str("subFields")) # type: ignore[literal-required] + type: typing.Literal["struct"] = "struct" + + +TableRid = core.RID +"""The Resource Identifier (RID) of a Table.""" + + +TimeSeriesItemType = typing_extensions.Annotated[ + typing.Union["StringType", "DoubleType", "NumericOrNonNumericType"], + pydantic.Field(discriminator="type"), +] +"""A union of the types supported by time series properties.""" + + +TimeUnit = typing.Literal[ + "MILLISECONDS", "SECONDS", "MINUTES", "HOURS", "DAYS", "WEEKS", "MONTHS", "YEARS" +] +"""TimeUnit""" + + +class TimeseriesType(core.ModelBase): + """TimeseriesType""" + + item_type: TimeSeriesItemType = pydantic.Field(alias=str("itemType")) # type: ignore[literal-required] + type: typing.Literal["timeseries"] = "timeseries" + + +class TimestampType(core.ModelBase): + """TimestampType""" + + type: typing.Literal["timestamp"] = "timestamp" + + +TotalCount = core.Long +"""The total number of items across all pages.""" + + +TraceParent = str +"""The W3C Trace Context `traceparent` header value used to propagate distributed tracing information for Foundry telemetry. See https://www.w3.org/TR/trace-context/#traceparent-header for more details. Note the 16 byte trace ID encoded in the header must be derived from a time based uuid to be used within Foundry.""" + + +TraceState = str +"""The W3C Trace Context `tracestate` header value, which is used to propagate vendor specific distributed tracing information for Foundry telemetry. See https://www.w3.org/TR/trace-context/#tracestate-header for more details.""" + + +class UnsupportedType(core.ModelBase): + """UnsupportedType""" + + unsupported_type: str = pydantic.Field(alias=str("unsupportedType")) # type: ignore[literal-required] + type: typing.Literal["unsupported"] = "unsupported" + + +UpdatedTime = core.AwareDatetime +"""The time at which the resource was most recently updated.""" + + +UserId = core.UUID +"""A Foundry User ID.""" + + +UserStatus = typing.Literal["ACTIVE", "DELETED"] +"""Present status of user.""" + + +class VectorSimilarityFunction(core.ModelBase): + """ + The vector similarity function to support approximate nearest neighbors search. Will result in an index + specific for the function. + """ + + value: typing.Optional[VectorSimilarityFunctionValue] = None + + +VectorSimilarityFunctionValue = typing.Literal[ + "COSINE_SIMILARITY", "DOT_PRODUCT", "EUCLIDEAN_DISTANCE" +] +"""VectorSimilarityFunctionValue""" + + +class VectorType(core.ModelBase): + """Represents a fixed size vector of floats. These can be used for vector similarity searches.""" + + dimension: int + """The dimension of the vector.""" + + supports_search_with: typing.List[VectorSimilarityFunction] = pydantic.Field(alias=str("supportsSearchWith")) # type: ignore[literal-required] + embedding_model: typing.Optional[EmbeddingModel] = pydantic.Field(alias=str("embeddingModel"), default=None) # type: ignore[literal-required] + type: typing.Literal["vector"] = "vector" + + +VersionId = core.UUID +"""The version identifier of a dataset schema.""" + + +ZoneId = str +"""A string representation of a java.time.ZoneId""" + + +ChangeDataCaptureConfiguration = FullRowChangeDataCaptureConfiguration +""" +Configuration for utilizing the stream as a change data capture (CDC) dataset. To configure CDC on a stream, at +least one key needs to be provided. + +For more information on CDC in +Foundry, see the [Change Data Capture](https://palantir.com/docs/foundry/data-integration/change-data-capture/) user documentation. +""" + + +CreatedBy = PrincipalId +"""The Foundry user who created this resource""" + + +Reference = MediaSetViewItemWrapper +"""A union of the types supported by media reference properties.""" + + +UpdatedBy = UserId +"""The Foundry user who last updated this resource""" + + +core.resolve_forward_references(CustomMetadata, globalns=globals(), localns=locals()) +core.resolve_forward_references(EmbeddingModel, globalns=globals(), localns=locals()) +core.resolve_forward_references(FieldDataType, globalns=globals(), localns=locals()) +core.resolve_forward_references(FilterType, globalns=globals(), localns=locals()) +core.resolve_forward_references(TimeSeriesItemType, globalns=globals(), localns=locals()) + +__all__ = [ + "AnyType", + "ArrayFieldType", + "AttachmentType", + "Attribution", + "BinaryType", + "BooleanType", + "BranchMetadata", + "BuildRid", + "ByteType", + "ChangeDataCaptureConfiguration", + "CheckReportRid", + "CheckRid", + "CipherTextType", + "ComputeSeconds", + "ContentLength", + "ContentType", + "CreatedBy", + "CreatedTime", + "CustomMetadata", + "DatasetFieldSchema", + "DatasetSchema", + "DateType", + "DecimalType", + "DisplayName", + "Distance", + "DistanceUnit", + "DoubleType", + "Duration", + "DurationSeconds", + "EmbeddingModel", + "EnrollmentRid", + "Field", + "FieldDataType", + "FieldName", + "FieldSchema", + "FilePath", + "Filename", + "FilterBinaryType", + "FilterBooleanType", + "FilterDateTimeType", + "FilterDateType", + "FilterDoubleType", + "FilterEnumType", + "FilterFloatType", + "FilterIntegerType", + "FilterLongType", + "FilterRidType", + "FilterStringType", + "FilterType", + "FilterUuidType", + "FloatType", + "FolderRid", + "FoundryBranch", + "FoundryLiveDeployment", + "FullRowChangeDataCaptureConfiguration", + "GeoPointType", + "GeoShapeType", + "GeohashType", + "GeotimeSeriesReferenceType", + "GroupId", + "GroupName", + "GroupRid", + "IncludeComputeUsage", + "IntegerType", + "JobRid", + "LmsEmbeddingModel", + "LmsEmbeddingModelValue", + "LongType", + "MapFieldType", + "MarkingId", + "MarkingType", + "MediaItemPath", + "MediaItemReadToken", + "MediaItemRid", + "MediaReference", + "MediaReferenceType", + "MediaSetRid", + "MediaSetViewItem", + "MediaSetViewItemWrapper", + "MediaSetViewRid", + "MediaType", + "NullType", + "NumericOrNonNumericType", + "Operation", + "OperationScope", + "OrderByDirection", + "OrganizationRid", + "PageSize", + "PageToken", + "PreviewMode", + "PrincipalId", + "PrincipalType", + "Realm", + "Reference", + "ReleaseStatus", + "Role", + "RoleAssignmentUpdate", + "RoleContext", + "RoleId", + "RoleSetId", + "ScheduleRid", + "SchemaFieldType", + "ShortType", + "SizeBytes", + "StreamSchema", + "StringType", + "StructFieldName", + "StructFieldType", + "TableRid", + "TimeSeriesItemType", + "TimeUnit", + "TimeseriesType", + "TimestampType", + "TotalCount", + "TraceParent", + "TraceState", + "UnsupportedType", + "UpdatedBy", + "UpdatedTime", + "UserId", + "UserStatus", + "VectorSimilarityFunction", + "VectorSimilarityFunctionValue", + "VectorType", + "VersionId", + "ZoneId", +] diff --git a/foundry_sdk/v2/data_health/__init__.py b/foundry_sdk/v2/data_health/__init__.py new file mode 100644 index 000000000..801ceab0d --- /dev/null +++ b/foundry_sdk/v2/data_health/__init__.py @@ -0,0 +1,22 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +from foundry_sdk.v2.data_health._client import AsyncDataHealthClient +from foundry_sdk.v2.data_health._client import DataHealthClient + +__all__ = [ + "DataHealthClient", + "AsyncDataHealthClient", +] diff --git a/foundry_sdk/v2/data_health/_client.py b/foundry_sdk/v2/data_health/_client.py new file mode 100644 index 000000000..c82d01e6f --- /dev/null +++ b/foundry_sdk/v2/data_health/_client.py @@ -0,0 +1,82 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing +from functools import cached_property + +from foundry_sdk import _core as core + + +class DataHealthClient: + """ + The API client for the DataHealth Namespace. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + + @cached_property + def Check(self): + from foundry_sdk.v2.data_health.check import CheckClient + + return CheckClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @cached_property + def CheckReport(self): + from foundry_sdk.v2.data_health.check_report import CheckReportClient + + return CheckReportClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + +class AsyncDataHealthClient: + """ + The Async API client for the DataHealth Namespace. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + from foundry_sdk.v2.data_health.check import AsyncCheckClient + from foundry_sdk.v2.data_health.check_report import AsyncCheckReportClient + + self.Check = AsyncCheckClient(auth=auth, hostname=hostname, config=config) + + self.CheckReport = AsyncCheckReportClient(auth=auth, hostname=hostname, config=config) diff --git a/foundry_sdk/v2/data_health/check.py b/foundry_sdk/v2/data_health/check.py new file mode 100644 index 000000000..2b711cf58 --- /dev/null +++ b/foundry_sdk/v2/data_health/check.py @@ -0,0 +1,591 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v2.core import models as core_models +from foundry_sdk.v2.data_health import errors as data_health_errors +from foundry_sdk.v2.data_health import models as data_health_models + + +class CheckClient: + """ + The API client for the Check Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _CheckClientStreaming(self) + self.with_raw_response = _CheckClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def create( + self, + *, + config: data_health_models.CheckConfig, + intent: typing.Optional[data_health_models.CheckIntent] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> data_health_models.Check: + """ + Creates a new Check. + :param config: + :type config: CheckConfig + :param intent: + :type intent: Optional[CheckIntent] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: data_health_models.Check + + :raises CheckAlreadyExists: A check of the given type for the given subject(s) already exists. The conflicting check will be returned if the provided token has permission to view it. + :raises CheckTypeNotSupported: The type of the requested check is not yet supported in the Platform API. + :raises CreateCheckPermissionDenied: Could not create the Check. + :raises InvalidNumericColumnCheckConfig: The NumericColumnCheckConfig is invalid. It must contain at least one of numericBounds or trend. + :raises InvalidPercentageCheckConfig: The PercentageCheckConfig is invalid. It must contain at least one of percentageBounds or medianDeviation. + :raises InvalidTimeCheckConfig: The TimeCheckConfig is invalid. It must contain at least one of timeBounds or medianDeviation. + :raises InvalidTrendConfig: The TrendConfig is invalid. It must contain at least one of trendType or differenceBounds. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/dataHealth/checks", + query_params={ + "preview": preview, + }, + path_params={}, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=data_health_models.CreateCheckRequest( + config=config, + intent=intent, + ), + response_type=data_health_models.Check, + request_timeout=request_timeout, + throwable_errors={ + "CheckAlreadyExists": data_health_errors.CheckAlreadyExists, + "CheckTypeNotSupported": data_health_errors.CheckTypeNotSupported, + "CreateCheckPermissionDenied": data_health_errors.CreateCheckPermissionDenied, + "InvalidNumericColumnCheckConfig": data_health_errors.InvalidNumericColumnCheckConfig, + "InvalidPercentageCheckConfig": data_health_errors.InvalidPercentageCheckConfig, + "InvalidTimeCheckConfig": data_health_errors.InvalidTimeCheckConfig, + "InvalidTrendConfig": data_health_errors.InvalidTrendConfig, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def delete( + self, + check_rid: core_models.CheckRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> None: + """ + Delete the Check with the specified rid. + :param check_rid: + :type check_rid: CheckRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: None + + :raises CheckNotFound: The given Check could not be found. + :raises DeleteCheckPermissionDenied: Could not delete the Check. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="DELETE", + resource_path="/v2/dataHealth/checks/{checkRid}", + query_params={ + "preview": preview, + }, + path_params={ + "checkRid": check_rid, + }, + header_params={}, + body=None, + response_type=None, + request_timeout=request_timeout, + throwable_errors={ + "CheckNotFound": data_health_errors.CheckNotFound, + "DeleteCheckPermissionDenied": data_health_errors.DeleteCheckPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + check_rid: core_models.CheckRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> data_health_models.Check: + """ + Get the Check with the specified rid. + :param check_rid: + :type check_rid: CheckRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: data_health_models.Check + + :raises CheckNotFound: The given Check could not be found. + :raises CheckTypeNotSupported: The type of the requested check is not yet supported in the Platform API. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/dataHealth/checks/{checkRid}", + query_params={ + "preview": preview, + }, + path_params={ + "checkRid": check_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=data_health_models.Check, + request_timeout=request_timeout, + throwable_errors={ + "CheckNotFound": data_health_errors.CheckNotFound, + "CheckTypeNotSupported": data_health_errors.CheckTypeNotSupported, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def replace( + self, + check_rid: core_models.CheckRid, + *, + config: data_health_models.ReplaceCheckConfig, + intent: typing.Optional[data_health_models.CheckIntent] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> data_health_models.Check: + """ + Replace the Check with the specified rid. Changing the type of a check after it has been created is not supported. + :param check_rid: + :type check_rid: CheckRid + :param config: + :type config: ReplaceCheckConfig + :param intent: + :type intent: Optional[CheckIntent] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: data_health_models.Check + + :raises CheckNotFound: The given Check could not be found. + :raises CheckTypeNotSupported: The type of the requested check is not yet supported in the Platform API. + :raises InvalidNumericColumnCheckConfig: The NumericColumnCheckConfig is invalid. It must contain at least one of numericBounds or trend. + :raises InvalidPercentageCheckConfig: The PercentageCheckConfig is invalid. It must contain at least one of percentageBounds or medianDeviation. + :raises InvalidTimeCheckConfig: The TimeCheckConfig is invalid. It must contain at least one of timeBounds or medianDeviation. + :raises InvalidTrendConfig: The TrendConfig is invalid. It must contain at least one of trendType or differenceBounds. + :raises ModifyingCheckTypeNotSupported: Changing the type of a check after it has been created is not supported. + :raises ReplaceCheckPermissionDenied: Could not replace the Check. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="PUT", + resource_path="/v2/dataHealth/checks/{checkRid}", + query_params={ + "preview": preview, + }, + path_params={ + "checkRid": check_rid, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=data_health_models.ReplaceCheckRequest( + config=config, + intent=intent, + ), + response_type=data_health_models.Check, + request_timeout=request_timeout, + throwable_errors={ + "CheckNotFound": data_health_errors.CheckNotFound, + "CheckTypeNotSupported": data_health_errors.CheckTypeNotSupported, + "InvalidNumericColumnCheckConfig": data_health_errors.InvalidNumericColumnCheckConfig, + "InvalidPercentageCheckConfig": data_health_errors.InvalidPercentageCheckConfig, + "InvalidTimeCheckConfig": data_health_errors.InvalidTimeCheckConfig, + "InvalidTrendConfig": data_health_errors.InvalidTrendConfig, + "ModifyingCheckTypeNotSupported": data_health_errors.ModifyingCheckTypeNotSupported, + "ReplaceCheckPermissionDenied": data_health_errors.ReplaceCheckPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _CheckClientRaw: + def __init__(self, client: CheckClient) -> None: + def create(_: data_health_models.Check): ... + def delete(_: None): ... + def get(_: data_health_models.Check): ... + def replace(_: data_health_models.Check): ... + + self.create = core.with_raw_response(create, client.create) + self.delete = core.with_raw_response(delete, client.delete) + self.get = core.with_raw_response(get, client.get) + self.replace = core.with_raw_response(replace, client.replace) + + +class _CheckClientStreaming: + def __init__(self, client: CheckClient) -> None: + def create(_: data_health_models.Check): ... + def get(_: data_health_models.Check): ... + def replace(_: data_health_models.Check): ... + + self.create = core.with_streaming_response(create, client.create) + self.get = core.with_streaming_response(get, client.get) + self.replace = core.with_streaming_response(replace, client.replace) + + +class AsyncCheckClient: + """ + The API client for the Check Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncCheckClientStreaming(self) + self.with_raw_response = _AsyncCheckClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def create( + self, + *, + config: data_health_models.CheckConfig, + intent: typing.Optional[data_health_models.CheckIntent] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[data_health_models.Check]: + """ + Creates a new Check. + :param config: + :type config: CheckConfig + :param intent: + :type intent: Optional[CheckIntent] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[data_health_models.Check] + + :raises CheckAlreadyExists: A check of the given type for the given subject(s) already exists. The conflicting check will be returned if the provided token has permission to view it. + :raises CheckTypeNotSupported: The type of the requested check is not yet supported in the Platform API. + :raises CreateCheckPermissionDenied: Could not create the Check. + :raises InvalidNumericColumnCheckConfig: The NumericColumnCheckConfig is invalid. It must contain at least one of numericBounds or trend. + :raises InvalidPercentageCheckConfig: The PercentageCheckConfig is invalid. It must contain at least one of percentageBounds or medianDeviation. + :raises InvalidTimeCheckConfig: The TimeCheckConfig is invalid. It must contain at least one of timeBounds or medianDeviation. + :raises InvalidTrendConfig: The TrendConfig is invalid. It must contain at least one of trendType or differenceBounds. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/dataHealth/checks", + query_params={ + "preview": preview, + }, + path_params={}, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=data_health_models.CreateCheckRequest( + config=config, + intent=intent, + ), + response_type=data_health_models.Check, + request_timeout=request_timeout, + throwable_errors={ + "CheckAlreadyExists": data_health_errors.CheckAlreadyExists, + "CheckTypeNotSupported": data_health_errors.CheckTypeNotSupported, + "CreateCheckPermissionDenied": data_health_errors.CreateCheckPermissionDenied, + "InvalidNumericColumnCheckConfig": data_health_errors.InvalidNumericColumnCheckConfig, + "InvalidPercentageCheckConfig": data_health_errors.InvalidPercentageCheckConfig, + "InvalidTimeCheckConfig": data_health_errors.InvalidTimeCheckConfig, + "InvalidTrendConfig": data_health_errors.InvalidTrendConfig, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def delete( + self, + check_rid: core_models.CheckRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[None]: + """ + Delete the Check with the specified rid. + :param check_rid: + :type check_rid: CheckRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[None] + + :raises CheckNotFound: The given Check could not be found. + :raises DeleteCheckPermissionDenied: Could not delete the Check. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="DELETE", + resource_path="/v2/dataHealth/checks/{checkRid}", + query_params={ + "preview": preview, + }, + path_params={ + "checkRid": check_rid, + }, + header_params={}, + body=None, + response_type=None, + request_timeout=request_timeout, + throwable_errors={ + "CheckNotFound": data_health_errors.CheckNotFound, + "DeleteCheckPermissionDenied": data_health_errors.DeleteCheckPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + check_rid: core_models.CheckRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[data_health_models.Check]: + """ + Get the Check with the specified rid. + :param check_rid: + :type check_rid: CheckRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[data_health_models.Check] + + :raises CheckNotFound: The given Check could not be found. + :raises CheckTypeNotSupported: The type of the requested check is not yet supported in the Platform API. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/dataHealth/checks/{checkRid}", + query_params={ + "preview": preview, + }, + path_params={ + "checkRid": check_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=data_health_models.Check, + request_timeout=request_timeout, + throwable_errors={ + "CheckNotFound": data_health_errors.CheckNotFound, + "CheckTypeNotSupported": data_health_errors.CheckTypeNotSupported, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def replace( + self, + check_rid: core_models.CheckRid, + *, + config: data_health_models.ReplaceCheckConfig, + intent: typing.Optional[data_health_models.CheckIntent] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[data_health_models.Check]: + """ + Replace the Check with the specified rid. Changing the type of a check after it has been created is not supported. + :param check_rid: + :type check_rid: CheckRid + :param config: + :type config: ReplaceCheckConfig + :param intent: + :type intent: Optional[CheckIntent] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[data_health_models.Check] + + :raises CheckNotFound: The given Check could not be found. + :raises CheckTypeNotSupported: The type of the requested check is not yet supported in the Platform API. + :raises InvalidNumericColumnCheckConfig: The NumericColumnCheckConfig is invalid. It must contain at least one of numericBounds or trend. + :raises InvalidPercentageCheckConfig: The PercentageCheckConfig is invalid. It must contain at least one of percentageBounds or medianDeviation. + :raises InvalidTimeCheckConfig: The TimeCheckConfig is invalid. It must contain at least one of timeBounds or medianDeviation. + :raises InvalidTrendConfig: The TrendConfig is invalid. It must contain at least one of trendType or differenceBounds. + :raises ModifyingCheckTypeNotSupported: Changing the type of a check after it has been created is not supported. + :raises ReplaceCheckPermissionDenied: Could not replace the Check. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="PUT", + resource_path="/v2/dataHealth/checks/{checkRid}", + query_params={ + "preview": preview, + }, + path_params={ + "checkRid": check_rid, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=data_health_models.ReplaceCheckRequest( + config=config, + intent=intent, + ), + response_type=data_health_models.Check, + request_timeout=request_timeout, + throwable_errors={ + "CheckNotFound": data_health_errors.CheckNotFound, + "CheckTypeNotSupported": data_health_errors.CheckTypeNotSupported, + "InvalidNumericColumnCheckConfig": data_health_errors.InvalidNumericColumnCheckConfig, + "InvalidPercentageCheckConfig": data_health_errors.InvalidPercentageCheckConfig, + "InvalidTimeCheckConfig": data_health_errors.InvalidTimeCheckConfig, + "InvalidTrendConfig": data_health_errors.InvalidTrendConfig, + "ModifyingCheckTypeNotSupported": data_health_errors.ModifyingCheckTypeNotSupported, + "ReplaceCheckPermissionDenied": data_health_errors.ReplaceCheckPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _AsyncCheckClientRaw: + def __init__(self, client: AsyncCheckClient) -> None: + def create(_: data_health_models.Check): ... + def delete(_: None): ... + def get(_: data_health_models.Check): ... + def replace(_: data_health_models.Check): ... + + self.create = core.async_with_raw_response(create, client.create) + self.delete = core.async_with_raw_response(delete, client.delete) + self.get = core.async_with_raw_response(get, client.get) + self.replace = core.async_with_raw_response(replace, client.replace) + + +class _AsyncCheckClientStreaming: + def __init__(self, client: AsyncCheckClient) -> None: + def create(_: data_health_models.Check): ... + def get(_: data_health_models.Check): ... + def replace(_: data_health_models.Check): ... + + self.create = core.async_with_streaming_response(create, client.create) + self.get = core.async_with_streaming_response(get, client.get) + self.replace = core.async_with_streaming_response(replace, client.replace) diff --git a/foundry_sdk/v2/data_health/check_report.py b/foundry_sdk/v2/data_health/check_report.py new file mode 100644 index 000000000..f3afd7f16 --- /dev/null +++ b/foundry_sdk/v2/data_health/check_report.py @@ -0,0 +1,201 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v2.core import models as core_models +from foundry_sdk.v2.data_health import errors as data_health_errors +from foundry_sdk.v2.data_health import models as data_health_models + + +class CheckReportClient: + """ + The API client for the CheckReport Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _CheckReportClientStreaming(self) + self.with_raw_response = _CheckReportClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + check_report_rid: core_models.CheckReportRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> data_health_models.CheckReport: + """ + Get the CheckReport with the specified rid. + :param check_report_rid: + :type check_report_rid: CheckReportRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: data_health_models.CheckReport + + :raises CheckReportNotFound: The given CheckReport could not be found. + :raises CheckTypeNotSupported: The type of the requested check is not yet supported in the Platform API. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/dataHealth/checkReports/{checkReportRid}", + query_params={ + "preview": preview, + }, + path_params={ + "checkReportRid": check_report_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=data_health_models.CheckReport, + request_timeout=request_timeout, + throwable_errors={ + "CheckReportNotFound": data_health_errors.CheckReportNotFound, + "CheckTypeNotSupported": data_health_errors.CheckTypeNotSupported, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _CheckReportClientRaw: + def __init__(self, client: CheckReportClient) -> None: + def get(_: data_health_models.CheckReport): ... + + self.get = core.with_raw_response(get, client.get) + + +class _CheckReportClientStreaming: + def __init__(self, client: CheckReportClient) -> None: + def get(_: data_health_models.CheckReport): ... + + self.get = core.with_streaming_response(get, client.get) + + +class AsyncCheckReportClient: + """ + The API client for the CheckReport Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncCheckReportClientStreaming(self) + self.with_raw_response = _AsyncCheckReportClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + check_report_rid: core_models.CheckReportRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[data_health_models.CheckReport]: + """ + Get the CheckReport with the specified rid. + :param check_report_rid: + :type check_report_rid: CheckReportRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[data_health_models.CheckReport] + + :raises CheckReportNotFound: The given CheckReport could not be found. + :raises CheckTypeNotSupported: The type of the requested check is not yet supported in the Platform API. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/dataHealth/checkReports/{checkReportRid}", + query_params={ + "preview": preview, + }, + path_params={ + "checkReportRid": check_report_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=data_health_models.CheckReport, + request_timeout=request_timeout, + throwable_errors={ + "CheckReportNotFound": data_health_errors.CheckReportNotFound, + "CheckTypeNotSupported": data_health_errors.CheckTypeNotSupported, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _AsyncCheckReportClientRaw: + def __init__(self, client: AsyncCheckReportClient) -> None: + def get(_: data_health_models.CheckReport): ... + + self.get = core.async_with_raw_response(get, client.get) + + +class _AsyncCheckReportClientStreaming: + def __init__(self, client: AsyncCheckReportClient) -> None: + def get(_: data_health_models.CheckReport): ... + + self.get = core.async_with_streaming_response(get, client.get) diff --git a/foundry_sdk/v2/data_health/errors.py b/foundry_sdk/v2/data_health/errors.py new file mode 100644 index 000000000..5b89e36fb --- /dev/null +++ b/foundry_sdk/v2/data_health/errors.py @@ -0,0 +1,253 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing +from dataclasses import dataclass + +import typing_extensions + +from foundry_sdk import _errors as errors +from foundry_sdk.v2.core import models as core_models +from foundry_sdk.v2.data_health import models as data_health_models + + +class CheckAlreadyExistsParameters(typing_extensions.TypedDict): + """ + A check of the given type for the given subject(s) already exists. The conflicting check will be returned + if the provided token has permission to view it. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + conflictingCheck: typing_extensions.NotRequired[data_health_models.Check] + + +@dataclass +class CheckAlreadyExists(errors.ConflictError): + name: typing.Literal["CheckAlreadyExists"] + parameters: CheckAlreadyExistsParameters + error_instance_id: str + + +class CheckNotFoundParameters(typing_extensions.TypedDict): + """The given Check could not be found.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + checkRid: core_models.CheckRid + + +@dataclass +class CheckNotFound(errors.NotFoundError): + name: typing.Literal["CheckNotFound"] + parameters: CheckNotFoundParameters + error_instance_id: str + + +class CheckReportNotFoundParameters(typing_extensions.TypedDict): + """The given CheckReport could not be found.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + checkReportRid: core_models.CheckReportRid + + +@dataclass +class CheckReportNotFound(errors.NotFoundError): + name: typing.Literal["CheckReportNotFound"] + parameters: CheckReportNotFoundParameters + error_instance_id: str + + +class CheckTypeNotSupportedParameters(typing_extensions.TypedDict): + """The type of the requested check is not yet supported in the Platform API.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + checkType: str + + +@dataclass +class CheckTypeNotSupported(errors.BadRequestError): + name: typing.Literal["CheckTypeNotSupported"] + parameters: CheckTypeNotSupportedParameters + error_instance_id: str + + +class CreateCheckPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not create the Check.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class CreateCheckPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["CreateCheckPermissionDenied"] + parameters: CreateCheckPermissionDeniedParameters + error_instance_id: str + + +class DeleteCheckPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not delete the Check.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + checkRid: core_models.CheckRid + + +@dataclass +class DeleteCheckPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["DeleteCheckPermissionDenied"] + parameters: DeleteCheckPermissionDeniedParameters + error_instance_id: str + + +class InvalidNumericColumnCheckConfigParameters(typing_extensions.TypedDict): + """The NumericColumnCheckConfig is invalid. It must contain at least one of numericBounds or trend.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class InvalidNumericColumnCheckConfig(errors.BadRequestError): + name: typing.Literal["InvalidNumericColumnCheckConfig"] + parameters: InvalidNumericColumnCheckConfigParameters + error_instance_id: str + + +class InvalidPercentageCheckConfigParameters(typing_extensions.TypedDict): + """The PercentageCheckConfig is invalid. It must contain at least one of percentageBounds or medianDeviation.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class InvalidPercentageCheckConfig(errors.BadRequestError): + name: typing.Literal["InvalidPercentageCheckConfig"] + parameters: InvalidPercentageCheckConfigParameters + error_instance_id: str + + +class InvalidTimeCheckConfigParameters(typing_extensions.TypedDict): + """The TimeCheckConfig is invalid. It must contain at least one of timeBounds or medianDeviation.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class InvalidTimeCheckConfig(errors.BadRequestError): + name: typing.Literal["InvalidTimeCheckConfig"] + parameters: InvalidTimeCheckConfigParameters + error_instance_id: str + + +class InvalidTrendConfigParameters(typing_extensions.TypedDict): + """The TrendConfig is invalid. It must contain at least one of trendType or differenceBounds.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class InvalidTrendConfig(errors.BadRequestError): + name: typing.Literal["InvalidTrendConfig"] + parameters: InvalidTrendConfigParameters + error_instance_id: str + + +class ModifyingCheckTypeNotSupportedParameters(typing_extensions.TypedDict): + """Changing the type of a check after it has been created is not supported.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + originalCheckType: str + newCheckType: str + + +@dataclass +class ModifyingCheckTypeNotSupported(errors.BadRequestError): + name: typing.Literal["ModifyingCheckTypeNotSupported"] + parameters: ModifyingCheckTypeNotSupportedParameters + error_instance_id: str + + +class PercentageValueAboveMaximumParameters(typing_extensions.TypedDict): + """PercentageValue must be less than or equal to 100.0""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + value: float + """The value that was provided.""" + + maxInclusive: float + """The maximum value allowed.""" + + +@dataclass +class PercentageValueAboveMaximum(errors.BadRequestError): + name: typing.Literal["PercentageValueAboveMaximum"] + parameters: PercentageValueAboveMaximumParameters + error_instance_id: str + + +class PercentageValueBelowMinimumParameters(typing_extensions.TypedDict): + """PercentageValue must be greater than or equal to 0.0""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + value: float + """The value that was provided.""" + + minInclusive: float + """The minimum value allowed.""" + + +@dataclass +class PercentageValueBelowMinimum(errors.BadRequestError): + name: typing.Literal["PercentageValueBelowMinimum"] + parameters: PercentageValueBelowMinimumParameters + error_instance_id: str + + +class ReplaceCheckPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not replace the Check.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + checkRid: core_models.CheckRid + + +@dataclass +class ReplaceCheckPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["ReplaceCheckPermissionDenied"] + parameters: ReplaceCheckPermissionDeniedParameters + error_instance_id: str + + +__all__ = [ + "CheckAlreadyExists", + "CheckNotFound", + "CheckReportNotFound", + "CheckTypeNotSupported", + "CreateCheckPermissionDenied", + "DeleteCheckPermissionDenied", + "InvalidNumericColumnCheckConfig", + "InvalidPercentageCheckConfig", + "InvalidTimeCheckConfig", + "InvalidTrendConfig", + "ModifyingCheckTypeNotSupported", + "PercentageValueAboveMaximum", + "PercentageValueBelowMinimum", + "ReplaceCheckPermissionDenied", +] diff --git a/foundry_sdk/v2/data_health/models.py b/foundry_sdk/v2/data_health/models.py new file mode 100644 index 000000000..de99b334a --- /dev/null +++ b/foundry_sdk/v2/data_health/models.py @@ -0,0 +1,732 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk.v2.core import models as core_models +from foundry_sdk.v2.datasets import models as datasets_models + + +class AllowedColumnValuesCheckConfig(core.ModelBase): + """Checks that values in a column are within an allowed set of values.""" + + subject: DatasetSubject + column_name: ColumnName = pydantic.Field(alias=str("columnName")) # type: ignore[literal-required] + allowed_values: typing.List[ColumnValue] = pydantic.Field(alias=str("allowedValues")) # type: ignore[literal-required] + allow_null: typing.Optional[bool] = pydantic.Field(alias=str("allowNull"), default=None) # type: ignore[literal-required] + severity: SeverityLevel + type: typing.Literal["allowedColumnValues"] = "allowedColumnValues" + + +class ApproximateUniquePercentageCheckConfig(core.ModelBase): + """Checks the approximate percentage of unique values in a specific column.""" + + subject: DatasetSubject + percentage_check_config: PercentageCheckConfig = pydantic.Field(alias=str("percentageCheckConfig")) # type: ignore[literal-required] + type: typing.Literal["approximateUniquePercentage"] = "approximateUniquePercentage" + + +class BooleanColumnValue(core.ModelBase): + """A boolean column value.""" + + value: bool + type: typing.Literal["boolean"] = "boolean" + + +class BuildDurationCheckConfig(core.ModelBase): + """Checks the total time a build takes to complete.""" + + subject: DatasetSubject + time_check_config: TimeCheckConfig = pydantic.Field(alias=str("timeCheckConfig")) # type: ignore[literal-required] + type: typing.Literal["buildDuration"] = "buildDuration" + + +class BuildStatusCheckConfig(core.ModelBase): + """Checks the status of the most recent build of the dataset.""" + + subject: DatasetSubject + status_check_config: StatusCheckConfig = pydantic.Field(alias=str("statusCheckConfig")) # type: ignore[literal-required] + type: typing.Literal["buildStatus"] = "buildStatus" + + +class Check(core.ModelBase): + """Check""" + + rid: core_models.CheckRid + groups: typing.List[CheckGroupRid] + config: CheckConfig + intent: typing.Optional[CheckIntent] = None + created_by: typing.Optional[core_models.CreatedBy] = pydantic.Field(alias=str("createdBy"), default=None) # type: ignore[literal-required] + """The user that created the Check.""" + + updated_time: typing.Optional[core_models.UpdatedTime] = pydantic.Field(alias=str("updatedTime"), default=None) # type: ignore[literal-required] + """The timestamp when the Check was last updated.""" + + +CheckConfig = typing_extensions.Annotated[ + typing.Union[ + "NumericColumnRangeCheckConfig", + "JobStatusCheckConfig", + "NumericColumnMeanCheckConfig", + "DateColumnRangeCheckConfig", + "JobDurationCheckConfig", + "ApproximateUniquePercentageCheckConfig", + "BuildStatusCheckConfig", + "ColumnTypeCheckConfig", + "AllowedColumnValuesCheckConfig", + "NullPercentageCheckConfig", + "TotalColumnCountCheckConfig", + "NumericColumnMedianCheckConfig", + "BuildDurationCheckConfig", + "SchemaComparisonCheckConfig", + "PrimaryKeyCheckConfig", + ], + pydantic.Field(discriminator="type"), +] +"""Configuration of a check.""" + + +CheckGroupRid = core.RID +"""The unique resource identifier (RID) of a CheckGroup.""" + + +CheckIntent = str +"""A note about why the Check was set up.""" + + +class CheckReport(core.ModelBase): + """CheckReport""" + + rid: core_models.CheckReportRid + check: Check + """Snapshot of the check configuration when this report was created. This will not change if the check is later modified.""" + + result: CheckResult + created_time: core_models.CreatedTime = pydantic.Field(alias=str("createdTime")) # type: ignore[literal-required] + + +class CheckResult(core.ModelBase): + """The result of running a check.""" + + status: CheckResultStatus + message: typing.Optional[str] = None + """Further details about the result of the check.""" + + +CheckResultStatus = typing.Literal[ + "PASSED", "FAILED", "WARNING", "ERROR", "NOT_APPLICABLE", "NOT_COMPUTABLE" +] +"""The status of a check report execution.""" + + +class ColumnCountConfig(core.ModelBase): + """Configuration for column count validation with severity settings.""" + + expected_value: core.Long = pydantic.Field(alias=str("expectedValue")) # type: ignore[literal-required] + severity: SeverityLevel + + +class ColumnInfo(core.ModelBase): + """Information about a column including its name and type.""" + + name: ColumnName + column_type: typing.Optional[core_models.SchemaFieldType] = pydantic.Field(alias=str("columnType"), default=None) # type: ignore[literal-required] + + +ColumnName = str +"""ColumnName""" + + +class ColumnTypeCheckConfig(core.ModelBase): + """Checks the existence and optionally the type of a specific column.""" + + subject: DatasetSubject + column_type_config: ColumnTypeConfig = pydantic.Field(alias=str("columnTypeConfig")) # type: ignore[literal-required] + type: typing.Literal["columnType"] = "columnType" + + +class ColumnTypeConfig(core.ModelBase): + """Configuration for column type validation with severity settings.""" + + column_name: ColumnName = pydantic.Field(alias=str("columnName")) # type: ignore[literal-required] + expected_type: typing.Optional[core_models.SchemaFieldType] = pydantic.Field(alias=str("expectedType"), default=None) # type: ignore[literal-required] + severity: SeverityLevel + + +ColumnValue = typing_extensions.Annotated[ + typing.Union[ + "DateColumnValue", "BooleanColumnValue", "StringColumnValue", "NumericColumnValue" + ], + pydantic.Field(discriminator="type"), +] +"""A column value that can be of different types.""" + + +class CreateCheckRequest(core.ModelBase): + """CreateCheckRequest""" + + config: CheckConfig + intent: typing.Optional[CheckIntent] = None + + +class DatasetSubject(core.ModelBase): + """A dataset resource type.""" + + dataset_rid: datasets_models.DatasetRid = pydantic.Field(alias=str("datasetRid")) # type: ignore[literal-required] + branch_id: datasets_models.BranchName = pydantic.Field(alias=str("branchId")) # type: ignore[literal-required] + + +class DateBounds(core.ModelBase): + """The range of date values a check is expected to be within.""" + + lower_bound: typing.Optional[core.AwareDatetime] = pydantic.Field(alias=str("lowerBound"), default=None) # type: ignore[literal-required] + upper_bound: typing.Optional[core.AwareDatetime] = pydantic.Field(alias=str("upperBound"), default=None) # type: ignore[literal-required] + + +class DateBoundsConfig(core.ModelBase): + """Configuration for date bounds check with severity settings.""" + + date_bounds: DateBounds = pydantic.Field(alias=str("dateBounds")) # type: ignore[literal-required] + severity: SeverityLevel + + +class DateColumnRangeCheckConfig(core.ModelBase): + """Checks that values in a date column fall within a specified range.""" + + subject: DatasetSubject + column_name: ColumnName = pydantic.Field(alias=str("columnName")) # type: ignore[literal-required] + date_bounds_config: DateBoundsConfig = pydantic.Field(alias=str("dateBoundsConfig")) # type: ignore[literal-required] + type: typing.Literal["dateColumnRange"] = "dateColumnRange" + + +class DateColumnValue(core.ModelBase): + """A date column value.""" + + value: core.AwareDatetime + type: typing.Literal["date"] = "date" + + +class EscalationConfig(core.ModelBase): + """The configuration for when the severity of the failing health check should be escalated to CRITICAL – after a given number of failures, possibly within a time interval.""" + + failures_to_critical: int = pydantic.Field(alias=str("failuresToCritical")) # type: ignore[literal-required] + time_interval_in_seconds: typing.Optional[core.Long] = pydantic.Field(alias=str("timeIntervalInSeconds"), default=None) # type: ignore[literal-required] + + +class JobDurationCheckConfig(core.ModelBase): + """Checks the total time a job takes to complete.""" + + subject: DatasetSubject + time_check_config: TimeCheckConfig = pydantic.Field(alias=str("timeCheckConfig")) # type: ignore[literal-required] + type: typing.Literal["jobDuration"] = "jobDuration" + + +class JobStatusCheckConfig(core.ModelBase): + """Checks the status of the most recent job run on the dataset.""" + + subject: DatasetSubject + status_check_config: StatusCheckConfig = pydantic.Field(alias=str("statusCheckConfig")) # type: ignore[literal-required] + type: typing.Literal["jobStatus"] = "jobStatus" + + +class MedianDeviation(core.ModelBase): + """The number of thresholds the build's duration differs from the median.""" + + bounds_type: typing.Optional[MedianDeviationBoundsType] = pydantic.Field(alias=str("boundsType"), default=None) # type: ignore[literal-required] + data_points: int = pydantic.Field(alias=str("dataPoints")) # type: ignore[literal-required] + deviation_threshold: float = pydantic.Field(alias=str("deviationThreshold")) # type: ignore[literal-required] + + +MedianDeviationBoundsType = typing.Literal["LOWER_BOUND", "UPPER_BOUND", "TWO_TAILED"] +"""The three types of median deviations a bounds type can have: - LOWER_BOUND – Tests for significant deviations below the median value, - UPPER_BOUND – Tests for significant deviations above the median value, - TWO_TAILED – Tests for significant deviations in either direction from the median value.""" + + +class MedianDeviationConfig(core.ModelBase): + """Configuration for median deviation check with severity settings.""" + + median_deviation: MedianDeviation = pydantic.Field(alias=str("medianDeviation")) # type: ignore[literal-required] + severity: SeverityLevel + + +class NullPercentageCheckConfig(core.ModelBase): + """Checks the percentage of null values in a specific column.""" + + subject: DatasetSubject + percentage_check_config: PercentageCheckConfig = pydantic.Field(alias=str("percentageCheckConfig")) # type: ignore[literal-required] + type: typing.Literal["nullPercentage"] = "nullPercentage" + + +class NumericBounds(core.ModelBase): + """The range of numeric values a check is expected to be within.""" + + lower_bound: typing.Optional[float] = pydantic.Field(alias=str("lowerBound"), default=None) # type: ignore[literal-required] + upper_bound: typing.Optional[float] = pydantic.Field(alias=str("upperBound"), default=None) # type: ignore[literal-required] + + +class NumericBoundsConfig(core.ModelBase): + """Configuration for numeric bounds check with severity settings.""" + + numeric_bounds: NumericBounds = pydantic.Field(alias=str("numericBounds")) # type: ignore[literal-required] + severity: SeverityLevel + + +class NumericColumnCheckConfig(core.ModelBase): + """Configuration for numeric column-based checks (such as mean or median). At least one of numericBounds or trend must be specified. Both may be provided to validate both the absolute value range and the trend behavior over time.""" + + column_name: ColumnName = pydantic.Field(alias=str("columnName")) # type: ignore[literal-required] + numeric_bounds: typing.Optional[NumericBoundsConfig] = pydantic.Field(alias=str("numericBounds"), default=None) # type: ignore[literal-required] + trend: typing.Optional[TrendConfig] = None + + +class NumericColumnMeanCheckConfig(core.ModelBase): + """Checks the mean value of a numeric column.""" + + subject: DatasetSubject + numeric_column_check_config: NumericColumnCheckConfig = pydantic.Field(alias=str("numericColumnCheckConfig")) # type: ignore[literal-required] + type: typing.Literal["numericColumnMean"] = "numericColumnMean" + + +class NumericColumnMedianCheckConfig(core.ModelBase): + """Checks the median value of a numeric column.""" + + subject: DatasetSubject + numeric_column_check_config: NumericColumnCheckConfig = pydantic.Field(alias=str("numericColumnCheckConfig")) # type: ignore[literal-required] + type: typing.Literal["numericColumnMedian"] = "numericColumnMedian" + + +class NumericColumnRangeCheckConfig(core.ModelBase): + """Checks that values in a numeric column fall within a specified range.""" + + subject: DatasetSubject + column_name: ColumnName = pydantic.Field(alias=str("columnName")) # type: ignore[literal-required] + numeric_bounds_config: NumericBoundsConfig = pydantic.Field(alias=str("numericBoundsConfig")) # type: ignore[literal-required] + type: typing.Literal["numericColumnRange"] = "numericColumnRange" + + +class NumericColumnValue(core.ModelBase): + """A numeric column value.""" + + value: float + type: typing.Literal["numeric"] = "numeric" + + +class PercentageBounds(core.ModelBase): + """The configuration for the range of percentage values between which the health check is expected to succeed.""" + + lower_bound_percentage: typing.Optional[PercentageValue] = pydantic.Field(alias=str("lowerBoundPercentage"), default=None) # type: ignore[literal-required] + upper_bound_percentage: typing.Optional[PercentageValue] = pydantic.Field(alias=str("upperBoundPercentage"), default=None) # type: ignore[literal-required] + + +class PercentageBoundsConfig(core.ModelBase): + """Configuration for percentage bounds check with severity settings.""" + + percentage_bounds: PercentageBounds = pydantic.Field(alias=str("percentageBounds")) # type: ignore[literal-required] + severity: SeverityLevel + + +class PercentageCheckConfig(core.ModelBase): + """Configuration for percentage-based checks (such as null percentage).""" + + column_name: ColumnName = pydantic.Field(alias=str("columnName")) # type: ignore[literal-required] + percentage_bounds: typing.Optional[PercentageBoundsConfig] = pydantic.Field(alias=str("percentageBounds"), default=None) # type: ignore[literal-required] + median_deviation: typing.Optional[MedianDeviationConfig] = pydantic.Field(alias=str("medianDeviation"), default=None) # type: ignore[literal-required] + + +PercentageValue = float +""" +A percentage value in the range 0.0 to 100.0. + +Validation rules: + * must be greater than or equal to 0.0 + * must be less than or equal to 100.0 +""" + + +class PrimaryKeyCheckConfig(core.ModelBase): + """Checks the uniqueness and non-null values of one or more columns (primary key constraint).""" + + subject: DatasetSubject + primary_key_config: PrimaryKeyConfig = pydantic.Field(alias=str("primaryKeyConfig")) # type: ignore[literal-required] + type: typing.Literal["primaryKey"] = "primaryKey" + + +class PrimaryKeyConfig(core.ModelBase): + """Configuration for primary key validation with severity settings.""" + + column_names: typing.List[ColumnName] = pydantic.Field(alias=str("columnNames")) # type: ignore[literal-required] + severity: SeverityLevel + + +class ReplaceAllowedColumnValuesCheckConfig(core.ModelBase): + """ReplaceAllowedColumnValuesCheckConfig""" + + allowed_values: typing.List[ColumnValue] = pydantic.Field(alias=str("allowedValues")) # type: ignore[literal-required] + severity: SeverityLevel + allow_null: typing.Optional[bool] = pydantic.Field(alias=str("allowNull"), default=None) # type: ignore[literal-required] + type: typing.Literal["allowedColumnValues"] = "allowedColumnValues" + + +class ReplaceApproximateUniquePercentageCheckConfig(core.ModelBase): + """ReplaceApproximateUniquePercentageCheckConfig""" + + percentage_check_config: ReplacePercentageCheckConfig = pydantic.Field(alias=str("percentageCheckConfig")) # type: ignore[literal-required] + type: typing.Literal["approximateUniquePercentage"] = "approximateUniquePercentage" + + +class ReplaceBuildDurationCheckConfig(core.ModelBase): + """ReplaceBuildDurationCheckConfig""" + + time_check_config: TimeCheckConfig = pydantic.Field(alias=str("timeCheckConfig")) # type: ignore[literal-required] + type: typing.Literal["buildDuration"] = "buildDuration" + + +class ReplaceBuildStatusCheckConfig(core.ModelBase): + """ReplaceBuildStatusCheckConfig""" + + status_check_config: StatusCheckConfig = pydantic.Field(alias=str("statusCheckConfig")) # type: ignore[literal-required] + type: typing.Literal["buildStatus"] = "buildStatus" + + +ReplaceCheckConfig = typing_extensions.Annotated[ + typing.Union[ + "ReplaceNumericColumnRangeCheckConfig", + "ReplaceJobStatusCheckConfig", + "ReplaceNumericColumnMeanCheckConfig", + "ReplaceDateColumnRangeCheckConfig", + "ReplaceJobDurationCheckConfig", + "ReplaceApproximateUniquePercentageCheckConfig", + "ReplaceBuildStatusCheckConfig", + "ReplaceColumnTypeCheckConfig", + "ReplaceAllowedColumnValuesCheckConfig", + "ReplaceNullPercentageCheckConfig", + "ReplaceTotalColumnCountCheckConfig", + "ReplaceNumericColumnMedianCheckConfig", + "ReplaceBuildDurationCheckConfig", + "ReplaceSchemaComparisonCheckConfig", + "ReplacePrimaryKeyCheckConfig", + ], + pydantic.Field(discriminator="type"), +] +"""Configuration of a check.""" + + +class ReplaceCheckRequest(core.ModelBase): + """ReplaceCheckRequest""" + + config: ReplaceCheckConfig + intent: typing.Optional[CheckIntent] = None + + +class ReplaceColumnTypeCheckConfig(core.ModelBase): + """ReplaceColumnTypeCheckConfig""" + + column_type_config: ReplaceColumnTypeConfig = pydantic.Field(alias=str("columnTypeConfig")) # type: ignore[literal-required] + type: typing.Literal["columnType"] = "columnType" + + +class ReplaceColumnTypeConfig(core.ModelBase): + """ReplaceColumnTypeConfig""" + + severity: SeverityLevel + expected_type: typing.Optional[core_models.SchemaFieldType] = pydantic.Field(alias=str("expectedType"), default=None) # type: ignore[literal-required] + + +class ReplaceDateColumnRangeCheckConfig(core.ModelBase): + """ReplaceDateColumnRangeCheckConfig""" + + date_bounds_config: DateBoundsConfig = pydantic.Field(alias=str("dateBoundsConfig")) # type: ignore[literal-required] + type: typing.Literal["dateColumnRange"] = "dateColumnRange" + + +class ReplaceJobDurationCheckConfig(core.ModelBase): + """ReplaceJobDurationCheckConfig""" + + time_check_config: TimeCheckConfig = pydantic.Field(alias=str("timeCheckConfig")) # type: ignore[literal-required] + type: typing.Literal["jobDuration"] = "jobDuration" + + +class ReplaceJobStatusCheckConfig(core.ModelBase): + """ReplaceJobStatusCheckConfig""" + + status_check_config: StatusCheckConfig = pydantic.Field(alias=str("statusCheckConfig")) # type: ignore[literal-required] + type: typing.Literal["jobStatus"] = "jobStatus" + + +class ReplaceNullPercentageCheckConfig(core.ModelBase): + """ReplaceNullPercentageCheckConfig""" + + percentage_check_config: ReplacePercentageCheckConfig = pydantic.Field(alias=str("percentageCheckConfig")) # type: ignore[literal-required] + type: typing.Literal["nullPercentage"] = "nullPercentage" + + +class ReplaceNumericColumnCheckConfig(core.ModelBase): + """ReplaceNumericColumnCheckConfig""" + + numeric_bounds: typing.Optional[NumericBoundsConfig] = pydantic.Field(alias=str("numericBounds"), default=None) # type: ignore[literal-required] + trend: typing.Optional[TrendConfig] = None + + +class ReplaceNumericColumnMeanCheckConfig(core.ModelBase): + """ReplaceNumericColumnMeanCheckConfig""" + + numeric_column_check_config: ReplaceNumericColumnCheckConfig = pydantic.Field(alias=str("numericColumnCheckConfig")) # type: ignore[literal-required] + type: typing.Literal["numericColumnMean"] = "numericColumnMean" + + +class ReplaceNumericColumnMedianCheckConfig(core.ModelBase): + """ReplaceNumericColumnMedianCheckConfig""" + + numeric_column_check_config: ReplaceNumericColumnCheckConfig = pydantic.Field(alias=str("numericColumnCheckConfig")) # type: ignore[literal-required] + type: typing.Literal["numericColumnMedian"] = "numericColumnMedian" + + +class ReplaceNumericColumnRangeCheckConfig(core.ModelBase): + """ReplaceNumericColumnRangeCheckConfig""" + + numeric_bounds_config: NumericBoundsConfig = pydantic.Field(alias=str("numericBoundsConfig")) # type: ignore[literal-required] + type: typing.Literal["numericColumnRange"] = "numericColumnRange" + + +class ReplacePercentageCheckConfig(core.ModelBase): + """ReplacePercentageCheckConfig""" + + median_deviation: typing.Optional[MedianDeviationConfig] = pydantic.Field(alias=str("medianDeviation"), default=None) # type: ignore[literal-required] + percentage_bounds: typing.Optional[PercentageBoundsConfig] = pydantic.Field(alias=str("percentageBounds"), default=None) # type: ignore[literal-required] + + +class ReplacePrimaryKeyCheckConfig(core.ModelBase): + """ReplacePrimaryKeyCheckConfig""" + + primary_key_config: ReplacePrimaryKeyConfig = pydantic.Field(alias=str("primaryKeyConfig")) # type: ignore[literal-required] + type: typing.Literal["primaryKey"] = "primaryKey" + + +class ReplacePrimaryKeyConfig(core.ModelBase): + """ReplacePrimaryKeyConfig""" + + severity: SeverityLevel + + +class ReplaceSchemaComparisonCheckConfig(core.ModelBase): + """ReplaceSchemaComparisonCheckConfig""" + + schema_comparison_config: SchemaComparisonConfig = pydantic.Field(alias=str("schemaComparisonConfig")) # type: ignore[literal-required] + type: typing.Literal["schemaComparison"] = "schemaComparison" + + +class ReplaceTotalColumnCountCheckConfig(core.ModelBase): + """ReplaceTotalColumnCountCheckConfig""" + + column_count_config: ColumnCountConfig = pydantic.Field(alias=str("columnCountConfig")) # type: ignore[literal-required] + type: typing.Literal["totalColumnCount"] = "totalColumnCount" + + +class SchemaComparisonCheckConfig(core.ModelBase): + """Checks the dataset schema against an expected schema.""" + + subject: DatasetSubject + schema_comparison_config: SchemaComparisonConfig = pydantic.Field(alias=str("schemaComparisonConfig")) # type: ignore[literal-required] + type: typing.Literal["schemaComparison"] = "schemaComparison" + + +class SchemaComparisonConfig(core.ModelBase): + """Configuration for schema comparison validation with severity settings.""" + + expected_schema: SchemaInfo = pydantic.Field(alias=str("expectedSchema")) # type: ignore[literal-required] + schema_comparison_type: SchemaComparisonType = pydantic.Field(alias=str("schemaComparisonType")) # type: ignore[literal-required] + severity: SeverityLevel + + +SchemaComparisonType = typing.Literal[ + "EXACT_MATCH_ORDERED_COLUMNS", + "EXACT_MATCH_UNORDERED_COLUMNS", + "COLUMN_ADDITIONS_ALLOWED", + "COLUMN_ADDITIONS_ALLOWED_STRICT", +] +""" +The type of schema comparison to perform: +- EXACT_MATCH_ORDERED_COLUMNS: Schemas must have identical columns in the same order. +- EXACT_MATCH_UNORDERED_COLUMNS: Schemas must have identical columns but order doesn't matter. +- COLUMN_ADDITIONS_ALLOWED: Expected schema columns must be present, additional columns are allowed and + missing column types are ignored. +- COLUMN_ADDITIONS_ALLOWED_STRICT: Expected schema columns must be present, additional columns are allowed. + Both expected and actual columns must specify types and they must match exactly. +""" + + +class SchemaInfo(core.ModelBase): + """Information about a dataset schema including all columns.""" + + columns: typing.List[ColumnInfo] + + +SeverityLevel = typing.Literal["MODERATE", "CRITICAL"] +"""The severity level of the check. Possible values are MODERATE or CRITICAL.""" + + +class StatusCheckConfig(core.ModelBase): + """StatusCheckConfig""" + + severity: SeverityLevel + escalation_config: typing.Optional[EscalationConfig] = pydantic.Field(alias=str("escalationConfig"), default=None) # type: ignore[literal-required] + + +class StringColumnValue(core.ModelBase): + """A string column value.""" + + value: str + type: typing.Literal["string"] = "string" + + +class TimeBounds(core.ModelBase): + """The configuration for the range of time between which the health check is expected to succeed.""" + + lower_bound_in_seconds: typing.Optional[core.Long] = pydantic.Field(alias=str("lowerBoundInSeconds"), default=None) # type: ignore[literal-required] + upper_bound_in_seconds: typing.Optional[core.Long] = pydantic.Field(alias=str("upperBoundInSeconds"), default=None) # type: ignore[literal-required] + + +class TimeBoundsConfig(core.ModelBase): + """Configuration for time bounds check with severity settings.""" + + time_bounds: TimeBounds = pydantic.Field(alias=str("timeBounds")) # type: ignore[literal-required] + severity: SeverityLevel + + +class TimeCheckConfig(core.ModelBase): + """TimeCheckConfig""" + + time_bounds: typing.Optional[TimeBoundsConfig] = pydantic.Field(alias=str("timeBounds"), default=None) # type: ignore[literal-required] + median_deviation: typing.Optional[MedianDeviationConfig] = pydantic.Field(alias=str("medianDeviation"), default=None) # type: ignore[literal-required] + + +class TotalColumnCountCheckConfig(core.ModelBase): + """Checks the total number of columns in the dataset.""" + + subject: DatasetSubject + column_count_config: ColumnCountConfig = pydantic.Field(alias=str("columnCountConfig")) # type: ignore[literal-required] + type: typing.Literal["totalColumnCount"] = "totalColumnCount" + + +class TrendConfig(core.ModelBase): + """Configuration for trend-based validation with severity settings. At least one of trendType or differenceBounds must be specified. Both may be provided to validate both the trend pattern and the magnitude of change.""" + + trend_type: typing.Optional[TrendType] = pydantic.Field(alias=str("trendType"), default=None) # type: ignore[literal-required] + difference_bounds: typing.Optional[NumericBounds] = pydantic.Field(alias=str("differenceBounds"), default=None) # type: ignore[literal-required] + severity: SeverityLevel + + +TrendType = typing.Literal[ + "NON_INCREASING", "NON_DECREASING", "STRICTLY_INCREASING", "STRICTLY_DECREASING", "CONSTANT" +] +""" +The type of trend to validate: +- NON_INCREASING: Values should not increase over time +- NON_DECREASING: Values should not decrease over time +- STRICTLY_INCREASING: Values should strictly increase over time +- STRICTLY_DECREASING: Values should strictly decrease over time +- CONSTANT: Values should remain constant over time +""" + + +core.resolve_forward_references(CheckConfig, globalns=globals(), localns=locals()) +core.resolve_forward_references(ColumnValue, globalns=globals(), localns=locals()) +core.resolve_forward_references(ReplaceCheckConfig, globalns=globals(), localns=locals()) + +__all__ = [ + "AllowedColumnValuesCheckConfig", + "ApproximateUniquePercentageCheckConfig", + "BooleanColumnValue", + "BuildDurationCheckConfig", + "BuildStatusCheckConfig", + "Check", + "CheckConfig", + "CheckGroupRid", + "CheckIntent", + "CheckReport", + "CheckResult", + "CheckResultStatus", + "ColumnCountConfig", + "ColumnInfo", + "ColumnName", + "ColumnTypeCheckConfig", + "ColumnTypeConfig", + "ColumnValue", + "CreateCheckRequest", + "DatasetSubject", + "DateBounds", + "DateBoundsConfig", + "DateColumnRangeCheckConfig", + "DateColumnValue", + "EscalationConfig", + "JobDurationCheckConfig", + "JobStatusCheckConfig", + "MedianDeviation", + "MedianDeviationBoundsType", + "MedianDeviationConfig", + "NullPercentageCheckConfig", + "NumericBounds", + "NumericBoundsConfig", + "NumericColumnCheckConfig", + "NumericColumnMeanCheckConfig", + "NumericColumnMedianCheckConfig", + "NumericColumnRangeCheckConfig", + "NumericColumnValue", + "PercentageBounds", + "PercentageBoundsConfig", + "PercentageCheckConfig", + "PercentageValue", + "PrimaryKeyCheckConfig", + "PrimaryKeyConfig", + "ReplaceAllowedColumnValuesCheckConfig", + "ReplaceApproximateUniquePercentageCheckConfig", + "ReplaceBuildDurationCheckConfig", + "ReplaceBuildStatusCheckConfig", + "ReplaceCheckConfig", + "ReplaceCheckRequest", + "ReplaceColumnTypeCheckConfig", + "ReplaceColumnTypeConfig", + "ReplaceDateColumnRangeCheckConfig", + "ReplaceJobDurationCheckConfig", + "ReplaceJobStatusCheckConfig", + "ReplaceNullPercentageCheckConfig", + "ReplaceNumericColumnCheckConfig", + "ReplaceNumericColumnMeanCheckConfig", + "ReplaceNumericColumnMedianCheckConfig", + "ReplaceNumericColumnRangeCheckConfig", + "ReplacePercentageCheckConfig", + "ReplacePrimaryKeyCheckConfig", + "ReplacePrimaryKeyConfig", + "ReplaceSchemaComparisonCheckConfig", + "ReplaceTotalColumnCountCheckConfig", + "SchemaComparisonCheckConfig", + "SchemaComparisonConfig", + "SchemaComparisonType", + "SchemaInfo", + "SeverityLevel", + "StatusCheckConfig", + "StringColumnValue", + "TimeBounds", + "TimeBoundsConfig", + "TimeCheckConfig", + "TotalColumnCountCheckConfig", + "TrendConfig", + "TrendType", +] diff --git a/foundry_sdk/v2/datasets/__init__.py b/foundry_sdk/v2/datasets/__init__.py new file mode 100644 index 000000000..06a678bea --- /dev/null +++ b/foundry_sdk/v2/datasets/__init__.py @@ -0,0 +1,22 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +from foundry_sdk.v2.datasets._client import AsyncDatasetsClient +from foundry_sdk.v2.datasets._client import DatasetsClient + +__all__ = [ + "DatasetsClient", + "AsyncDatasetsClient", +] diff --git a/foundry_sdk/v2/datasets/_client.py b/foundry_sdk/v2/datasets/_client.py new file mode 100644 index 000000000..400f5799a --- /dev/null +++ b/foundry_sdk/v2/datasets/_client.py @@ -0,0 +1,82 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing +from functools import cached_property + +from foundry_sdk import _core as core + + +class DatasetsClient: + """ + The API client for the Datasets Namespace. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + + @cached_property + def Dataset(self): + from foundry_sdk.v2.datasets.dataset import DatasetClient + + return DatasetClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @cached_property + def View(self): + from foundry_sdk.v2.datasets.view import ViewClient + + return ViewClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + +class AsyncDatasetsClient: + """ + The Async API client for the Datasets Namespace. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + from foundry_sdk.v2.datasets.dataset import AsyncDatasetClient + from foundry_sdk.v2.datasets.view import AsyncViewClient + + self.Dataset = AsyncDatasetClient(auth=auth, hostname=hostname, config=config) + + self.View = AsyncViewClient(auth=auth, hostname=hostname, config=config) diff --git a/foundry_sdk/v2/datasets/branch.py b/foundry_sdk/v2/datasets/branch.py new file mode 100644 index 000000000..1236616a8 --- /dev/null +++ b/foundry_sdk/v2/datasets/branch.py @@ -0,0 +1,710 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v2.core import errors as core_errors +from foundry_sdk.v2.core import models as core_models +from foundry_sdk.v2.datasets import errors as datasets_errors +from foundry_sdk.v2.datasets import models as datasets_models + + +class BranchClient: + """ + The API client for the Branch Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _BranchClientStreaming(self) + self.with_raw_response = _BranchClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def create( + self, + dataset_rid: datasets_models.DatasetRid, + *, + name: datasets_models.BranchName, + transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> datasets_models.Branch: + """ + Creates a branch on an existing dataset. A branch may optionally point to a (committed) transaction. + + :param dataset_rid: + :type dataset_rid: DatasetRid + :param name: + :type name: BranchName + :param transaction_rid: The most recent OPEN or COMMITTED transaction on the branch. This will never be an ABORTED transaction. + :type transaction_rid: Optional[TransactionRid] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: datasets_models.Branch + + :raises BranchAlreadyExists: The branch cannot be created because a branch with that name already exists. + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises CreateBranchPermissionDenied: The provided token does not have permission to create a branch of this dataset. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises InvalidBranchName: The requested branch name cannot be used. Branch names cannot be empty and must not look like RIDs or UUIDs. + :raises TransactionNotCommitted: The given transaction has not been committed. + :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/datasets/{datasetRid}/branches", + query_params={}, + path_params={ + "datasetRid": dataset_rid, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=datasets_models.CreateBranchRequest( + transaction_rid=transaction_rid, + name=name, + ), + response_type=datasets_models.Branch, + request_timeout=request_timeout, + throwable_errors={ + "BranchAlreadyExists": datasets_errors.BranchAlreadyExists, + "BranchNotFound": datasets_errors.BranchNotFound, + "CreateBranchPermissionDenied": datasets_errors.CreateBranchPermissionDenied, + "DatasetNotFound": datasets_errors.DatasetNotFound, + "InvalidBranchName": datasets_errors.InvalidBranchName, + "TransactionNotCommitted": datasets_errors.TransactionNotCommitted, + "TransactionNotFound": datasets_errors.TransactionNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def delete( + self, + dataset_rid: datasets_models.DatasetRid, + branch_name: datasets_models.BranchName, + *, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> None: + """ + Deletes the Branch with the given BranchName. + + :param dataset_rid: + :type dataset_rid: DatasetRid + :param branch_name: + :type branch_name: BranchName + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: None + + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises DeleteBranchPermissionDenied: The provided token does not have permission to delete the given branch from this dataset. + :raises InvalidBranchName: The requested branch name cannot be used. Branch names cannot be empty and must not look like RIDs or UUIDs. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="DELETE", + resource_path="/v2/datasets/{datasetRid}/branches/{branchName}", + query_params={}, + path_params={ + "datasetRid": dataset_rid, + "branchName": branch_name, + }, + header_params={}, + body=None, + response_type=None, + request_timeout=request_timeout, + throwable_errors={ + "BranchNotFound": datasets_errors.BranchNotFound, + "DatasetNotFound": datasets_errors.DatasetNotFound, + "DeleteBranchPermissionDenied": datasets_errors.DeleteBranchPermissionDenied, + "InvalidBranchName": datasets_errors.InvalidBranchName, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + dataset_rid: datasets_models.DatasetRid, + branch_name: datasets_models.BranchName, + *, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> datasets_models.Branch: + """ + Get a Branch of a Dataset. + + :param dataset_rid: + :type dataset_rid: DatasetRid + :param branch_name: + :type branch_name: BranchName + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: datasets_models.Branch + + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/datasets/{datasetRid}/branches/{branchName}", + query_params={}, + path_params={ + "datasetRid": dataset_rid, + "branchName": branch_name, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=datasets_models.Branch, + request_timeout=request_timeout, + throwable_errors={ + "BranchNotFound": datasets_errors.BranchNotFound, + "DatasetNotFound": datasets_errors.DatasetNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def list( + self, + dataset_rid: datasets_models.DatasetRid, + *, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.ResourceIterator[datasets_models.Branch]: + """ + Lists the Branches of a Dataset. + + :param dataset_rid: + :type dataset_rid: DatasetRid + :param page_size: The page size to use for the endpoint. + :type page_size: Optional[PageSize] + :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. + :type page_token: Optional[PageToken] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.ResourceIterator[datasets_models.Branch] + + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises InvalidPageSize: The provided page size was zero or negative. Page sizes must be greater than zero. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/datasets/{datasetRid}/branches", + query_params={ + "pageSize": page_size, + "pageToken": page_token, + }, + path_params={ + "datasetRid": dataset_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=datasets_models.ListBranchesResponse, + request_timeout=request_timeout, + throwable_errors={ + "BranchNotFound": datasets_errors.BranchNotFound, + "DatasetNotFound": datasets_errors.DatasetNotFound, + "InvalidPageSize": core_errors.InvalidPageSize, + }, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def transactions( + self, + dataset_rid: datasets_models.DatasetRid, + branch_name: datasets_models.BranchName, + *, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.ResourceIterator[datasets_models.Transaction]: + """ + Get the Transaction history for the given Dataset. When requesting all transactions, the endpoint returns them in reverse chronological order. + + :param dataset_rid: + :type dataset_rid: DatasetRid + :param branch_name: + :type branch_name: BranchName + :param page_size: The default pageSize is 20 transactions and the maximum allowed pageSize is 50 transactions + :type page_size: Optional[PageSize] + :param page_token: + :type page_token: Optional[PageToken] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.ResourceIterator[datasets_models.Transaction] + + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises GetBranchTransactionHistoryPermissionDenied: Could not transactions the Branch. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/datasets/{datasetRid}/branches/{branchName}/transactions", + query_params={ + "pageSize": page_size, + "pageToken": page_token, + "preview": preview, + }, + path_params={ + "datasetRid": dataset_rid, + "branchName": branch_name, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=datasets_models.ListTransactionsResponse, + request_timeout=request_timeout, + throwable_errors={ + "BranchNotFound": datasets_errors.BranchNotFound, + "DatasetNotFound": datasets_errors.DatasetNotFound, + "GetBranchTransactionHistoryPermissionDenied": datasets_errors.GetBranchTransactionHistoryPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + +class _BranchClientRaw: + def __init__(self, client: BranchClient) -> None: + def create(_: datasets_models.Branch): ... + def delete(_: None): ... + def get(_: datasets_models.Branch): ... + def list(_: datasets_models.ListBranchesResponse): ... + def transactions(_: datasets_models.ListTransactionsResponse): ... + + self.create = core.with_raw_response(create, client.create) + self.delete = core.with_raw_response(delete, client.delete) + self.get = core.with_raw_response(get, client.get) + self.list = core.with_raw_response(list, client.list) + self.transactions = core.with_raw_response(transactions, client.transactions) + + +class _BranchClientStreaming: + def __init__(self, client: BranchClient) -> None: + def create(_: datasets_models.Branch): ... + def get(_: datasets_models.Branch): ... + def list(_: datasets_models.ListBranchesResponse): ... + def transactions(_: datasets_models.ListTransactionsResponse): ... + + self.create = core.with_streaming_response(create, client.create) + self.get = core.with_streaming_response(get, client.get) + self.list = core.with_streaming_response(list, client.list) + self.transactions = core.with_streaming_response(transactions, client.transactions) + + +class AsyncBranchClient: + """ + The API client for the Branch Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncBranchClientStreaming(self) + self.with_raw_response = _AsyncBranchClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def create( + self, + dataset_rid: datasets_models.DatasetRid, + *, + name: datasets_models.BranchName, + transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[datasets_models.Branch]: + """ + Creates a branch on an existing dataset. A branch may optionally point to a (committed) transaction. + + :param dataset_rid: + :type dataset_rid: DatasetRid + :param name: + :type name: BranchName + :param transaction_rid: The most recent OPEN or COMMITTED transaction on the branch. This will never be an ABORTED transaction. + :type transaction_rid: Optional[TransactionRid] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[datasets_models.Branch] + + :raises BranchAlreadyExists: The branch cannot be created because a branch with that name already exists. + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises CreateBranchPermissionDenied: The provided token does not have permission to create a branch of this dataset. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises InvalidBranchName: The requested branch name cannot be used. Branch names cannot be empty and must not look like RIDs or UUIDs. + :raises TransactionNotCommitted: The given transaction has not been committed. + :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/datasets/{datasetRid}/branches", + query_params={}, + path_params={ + "datasetRid": dataset_rid, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=datasets_models.CreateBranchRequest( + transaction_rid=transaction_rid, + name=name, + ), + response_type=datasets_models.Branch, + request_timeout=request_timeout, + throwable_errors={ + "BranchAlreadyExists": datasets_errors.BranchAlreadyExists, + "BranchNotFound": datasets_errors.BranchNotFound, + "CreateBranchPermissionDenied": datasets_errors.CreateBranchPermissionDenied, + "DatasetNotFound": datasets_errors.DatasetNotFound, + "InvalidBranchName": datasets_errors.InvalidBranchName, + "TransactionNotCommitted": datasets_errors.TransactionNotCommitted, + "TransactionNotFound": datasets_errors.TransactionNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def delete( + self, + dataset_rid: datasets_models.DatasetRid, + branch_name: datasets_models.BranchName, + *, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[None]: + """ + Deletes the Branch with the given BranchName. + + :param dataset_rid: + :type dataset_rid: DatasetRid + :param branch_name: + :type branch_name: BranchName + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[None] + + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises DeleteBranchPermissionDenied: The provided token does not have permission to delete the given branch from this dataset. + :raises InvalidBranchName: The requested branch name cannot be used. Branch names cannot be empty and must not look like RIDs or UUIDs. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="DELETE", + resource_path="/v2/datasets/{datasetRid}/branches/{branchName}", + query_params={}, + path_params={ + "datasetRid": dataset_rid, + "branchName": branch_name, + }, + header_params={}, + body=None, + response_type=None, + request_timeout=request_timeout, + throwable_errors={ + "BranchNotFound": datasets_errors.BranchNotFound, + "DatasetNotFound": datasets_errors.DatasetNotFound, + "DeleteBranchPermissionDenied": datasets_errors.DeleteBranchPermissionDenied, + "InvalidBranchName": datasets_errors.InvalidBranchName, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + dataset_rid: datasets_models.DatasetRid, + branch_name: datasets_models.BranchName, + *, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[datasets_models.Branch]: + """ + Get a Branch of a Dataset. + + :param dataset_rid: + :type dataset_rid: DatasetRid + :param branch_name: + :type branch_name: BranchName + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[datasets_models.Branch] + + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/datasets/{datasetRid}/branches/{branchName}", + query_params={}, + path_params={ + "datasetRid": dataset_rid, + "branchName": branch_name, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=datasets_models.Branch, + request_timeout=request_timeout, + throwable_errors={ + "BranchNotFound": datasets_errors.BranchNotFound, + "DatasetNotFound": datasets_errors.DatasetNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def list( + self, + dataset_rid: datasets_models.DatasetRid, + *, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.AsyncResourceIterator[datasets_models.Branch]: + """ + Lists the Branches of a Dataset. + + :param dataset_rid: + :type dataset_rid: DatasetRid + :param page_size: The page size to use for the endpoint. + :type page_size: Optional[PageSize] + :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. + :type page_token: Optional[PageToken] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.AsyncResourceIterator[datasets_models.Branch] + + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises InvalidPageSize: The provided page size was zero or negative. Page sizes must be greater than zero. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/datasets/{datasetRid}/branches", + query_params={ + "pageSize": page_size, + "pageToken": page_token, + }, + path_params={ + "datasetRid": dataset_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=datasets_models.ListBranchesResponse, + request_timeout=request_timeout, + throwable_errors={ + "BranchNotFound": datasets_errors.BranchNotFound, + "DatasetNotFound": datasets_errors.DatasetNotFound, + "InvalidPageSize": core_errors.InvalidPageSize, + }, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def transactions( + self, + dataset_rid: datasets_models.DatasetRid, + branch_name: datasets_models.BranchName, + *, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.AsyncResourceIterator[datasets_models.Transaction]: + """ + Get the Transaction history for the given Dataset. When requesting all transactions, the endpoint returns them in reverse chronological order. + + :param dataset_rid: + :type dataset_rid: DatasetRid + :param branch_name: + :type branch_name: BranchName + :param page_size: The default pageSize is 20 transactions and the maximum allowed pageSize is 50 transactions + :type page_size: Optional[PageSize] + :param page_token: + :type page_token: Optional[PageToken] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.AsyncResourceIterator[datasets_models.Transaction] + + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises GetBranchTransactionHistoryPermissionDenied: Could not transactions the Branch. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/datasets/{datasetRid}/branches/{branchName}/transactions", + query_params={ + "pageSize": page_size, + "pageToken": page_token, + "preview": preview, + }, + path_params={ + "datasetRid": dataset_rid, + "branchName": branch_name, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=datasets_models.ListTransactionsResponse, + request_timeout=request_timeout, + throwable_errors={ + "BranchNotFound": datasets_errors.BranchNotFound, + "DatasetNotFound": datasets_errors.DatasetNotFound, + "GetBranchTransactionHistoryPermissionDenied": datasets_errors.GetBranchTransactionHistoryPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + +class _AsyncBranchClientRaw: + def __init__(self, client: AsyncBranchClient) -> None: + def create(_: datasets_models.Branch): ... + def delete(_: None): ... + def get(_: datasets_models.Branch): ... + def list(_: datasets_models.ListBranchesResponse): ... + def transactions(_: datasets_models.ListTransactionsResponse): ... + + self.create = core.async_with_raw_response(create, client.create) + self.delete = core.async_with_raw_response(delete, client.delete) + self.get = core.async_with_raw_response(get, client.get) + self.list = core.async_with_raw_response(list, client.list) + self.transactions = core.async_with_raw_response(transactions, client.transactions) + + +class _AsyncBranchClientStreaming: + def __init__(self, client: AsyncBranchClient) -> None: + def create(_: datasets_models.Branch): ... + def get(_: datasets_models.Branch): ... + def list(_: datasets_models.ListBranchesResponse): ... + def transactions(_: datasets_models.ListTransactionsResponse): ... + + self.create = core.async_with_streaming_response(create, client.create) + self.get = core.async_with_streaming_response(get, client.get) + self.list = core.async_with_streaming_response(list, client.list) + self.transactions = core.async_with_streaming_response(transactions, client.transactions) diff --git a/foundry_sdk/v2/datasets/dataset.py b/foundry_sdk/v2/datasets/dataset.py new file mode 100644 index 000000000..99eff13b7 --- /dev/null +++ b/foundry_sdk/v2/datasets/dataset.py @@ -0,0 +1,1550 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing +from functools import cached_property + +import annotated_types +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v2.core import errors as core_errors +from foundry_sdk.v2.core import models as core_models +from foundry_sdk.v2.datasets import errors as datasets_errors +from foundry_sdk.v2.datasets import models as datasets_models +from foundry_sdk.v2.filesystem import errors as filesystem_errors +from foundry_sdk.v2.filesystem import models as filesystem_models + + +class DatasetClient: + """ + The API client for the Dataset Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _DatasetClientStreaming(self) + self.with_raw_response = _DatasetClientRaw(self) + + @cached_property + def Branch(self): + from foundry_sdk.v2.datasets.branch import BranchClient + + return BranchClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @cached_property + def Transaction(self): + from foundry_sdk.v2.datasets.transaction import TransactionClient + + return TransactionClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @cached_property + def File(self): + from foundry_sdk.v2.datasets.file import FileClient + + return FileClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def create( + self, + *, + name: datasets_models.DatasetName, + parent_folder_rid: filesystem_models.FolderRid, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> datasets_models.Dataset: + """ + Creates a new Dataset. A default branch - `master` for most enrollments - will be created on the Dataset. + + :param name: + :type name: DatasetName + :param parent_folder_rid: + :type parent_folder_rid: FolderRid + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: datasets_models.Dataset + + :raises BranchAlreadyExists: The branch cannot be created because a branch with that name already exists. + :raises CreateBranchPermissionDenied: The provided token does not have permission to create a branch of this dataset. + :raises CreateDatasetPermissionDenied: The provided token does not have permission to create a dataset in this folder. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises FolderNotFound: The given Folder could not be found. + :raises InvalidBranchName: The requested branch name cannot be used. Branch names cannot be empty and must not look like RIDs or UUIDs. + :raises InvalidDisplayName: The display name of a Resource should not be exactly `.` or `..`, contain a forward slash `/` and must be less than or equal to 700 characters. + :raises ResourceNameAlreadyExists: The provided resource name is already in use by another resource in the same folder. + :raises TransactionNotCommitted: The given transaction has not been committed. + :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/datasets", + query_params={}, + path_params={}, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=datasets_models.CreateDatasetRequest( + parent_folder_rid=parent_folder_rid, + name=name, + ), + response_type=datasets_models.Dataset, + request_timeout=request_timeout, + throwable_errors={ + "BranchAlreadyExists": datasets_errors.BranchAlreadyExists, + "CreateBranchPermissionDenied": datasets_errors.CreateBranchPermissionDenied, + "CreateDatasetPermissionDenied": datasets_errors.CreateDatasetPermissionDenied, + "DatasetNotFound": datasets_errors.DatasetNotFound, + "FolderNotFound": filesystem_errors.FolderNotFound, + "InvalidBranchName": datasets_errors.InvalidBranchName, + "InvalidDisplayName": filesystem_errors.InvalidDisplayName, + "ResourceNameAlreadyExists": filesystem_errors.ResourceNameAlreadyExists, + "TransactionNotCommitted": datasets_errors.TransactionNotCommitted, + "TransactionNotFound": datasets_errors.TransactionNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + dataset_rid: datasets_models.DatasetRid, + *, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> datasets_models.Dataset: + """ + Get the Dataset with the specified rid. + :param dataset_rid: + :type dataset_rid: DatasetRid + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: datasets_models.Dataset + + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises ResourceNameAlreadyExists: The provided resource name is already in use by another resource in the same folder. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/datasets/{datasetRid}", + query_params={}, + path_params={ + "datasetRid": dataset_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=datasets_models.Dataset, + request_timeout=request_timeout, + throwable_errors={ + "DatasetNotFound": datasets_errors.DatasetNotFound, + "ResourceNameAlreadyExists": filesystem_errors.ResourceNameAlreadyExists, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get_health_checks( + self, + dataset_rid: datasets_models.DatasetRid, + *, + branch_name: typing.Optional[datasets_models.BranchName] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> datasets_models.ListHealthChecksResponse: + """ + Get the RIDs of the Data Health Checks that are configured for the given Dataset. + + :param dataset_rid: + :type dataset_rid: DatasetRid + :param branch_name: The name of the Branch. If none is provided, the default Branch name - `master` for most enrollments - will be used. + :type branch_name: Optional[BranchName] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: datasets_models.ListHealthChecksResponse + + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises GetDatasetHealthChecksPermissionDenied: Could not getHealthChecks the Dataset. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/datasets/{datasetRid}/getHealthChecks", + query_params={ + "branchName": branch_name, + "preview": preview, + }, + path_params={ + "datasetRid": dataset_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=datasets_models.ListHealthChecksResponse, + request_timeout=request_timeout, + throwable_errors={ + "BranchNotFound": datasets_errors.BranchNotFound, + "DatasetNotFound": datasets_errors.DatasetNotFound, + "GetDatasetHealthChecksPermissionDenied": datasets_errors.GetDatasetHealthChecksPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get_schedules( + self, + dataset_rid: datasets_models.DatasetRid, + *, + branch_name: typing.Optional[datasets_models.BranchName] = None, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.ResourceIterator[core_models.ScheduleRid]: + """ + Get the RIDs of the Schedules that target the given Dataset + + :param dataset_rid: + :type dataset_rid: DatasetRid + :param branch_name: The name of the Branch. If none is provided, the default Branch name - `master` for most enrollments - will be used. + :type branch_name: Optional[BranchName] + :param page_size: + :type page_size: Optional[PageSize] + :param page_token: + :type page_token: Optional[PageToken] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.ResourceIterator[core_models.ScheduleRid] + + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises GetDatasetSchedulesPermissionDenied: Could not getSchedules the Dataset. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/datasets/{datasetRid}/getSchedules", + query_params={ + "branchName": branch_name, + "pageSize": page_size, + "pageToken": page_token, + "preview": preview, + }, + path_params={ + "datasetRid": dataset_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=datasets_models.ListSchedulesResponse, + request_timeout=request_timeout, + throwable_errors={ + "BranchNotFound": datasets_errors.BranchNotFound, + "DatasetNotFound": datasets_errors.DatasetNotFound, + "GetDatasetSchedulesPermissionDenied": datasets_errors.GetDatasetSchedulesPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get_schema( + self, + dataset_rid: datasets_models.DatasetRid, + *, + branch_name: typing.Optional[datasets_models.BranchName] = None, + end_transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + version_id: typing.Optional[core_models.VersionId] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> datasets_models.GetDatasetSchemaResponse: + """ + Gets a dataset's schema. If no `endTransactionRid` is provided, the latest committed version will be used. + + :param dataset_rid: + :type dataset_rid: DatasetRid + :param branch_name: + :type branch_name: Optional[BranchName] + :param end_transaction_rid: The Resource Identifier (RID) of the end Transaction. If a user does not provide a value, the RID of the latest committed transaction will be used. + :type end_transaction_rid: Optional[TransactionRid] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param version_id: The schema version that should be used. If none is provided, the latest version will be used. + :type version_id: Optional[VersionId] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: datasets_models.GetDatasetSchemaResponse + + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises DatasetViewNotFound: The requested dataset view could not be found. A dataset view represents the effective file contents of a dataset for a branch at a point in time, calculated from transactions (SNAPSHOT, APPEND, UPDATE, DELETE). The view may not exist if the dataset has no transactions, contains no files, the branch is not valid, or the client token does not have access to it. + :raises GetDatasetSchemaPermissionDenied: Could not getSchema the Dataset. + :raises InvalidParameterCombination: The given parameters are individually valid but cannot be used in the given combination. + :raises SchemaNotFound: A schema could not be found for the given dataset and branch, or the client token does not have access to it. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/datasets/{datasetRid}/getSchema", + query_params={ + "branchName": branch_name, + "endTransactionRid": end_transaction_rid, + "preview": preview, + "versionId": version_id, + }, + path_params={ + "datasetRid": dataset_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=datasets_models.GetDatasetSchemaResponse, + request_timeout=request_timeout, + throwable_errors={ + "BranchNotFound": datasets_errors.BranchNotFound, + "DatasetNotFound": datasets_errors.DatasetNotFound, + "DatasetViewNotFound": datasets_errors.DatasetViewNotFound, + "GetDatasetSchemaPermissionDenied": datasets_errors.GetDatasetSchemaPermissionDenied, + "InvalidParameterCombination": core_errors.InvalidParameterCombination, + "SchemaNotFound": datasets_errors.SchemaNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get_schema_batch( + self, + body: typing_extensions.Annotated[ + typing.List[datasets_models.GetSchemaDatasetsBatchRequestElement], + annotated_types.Len(min_length=1, max_length=1000), + ], + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> datasets_models.GetSchemaDatasetsBatchResponse: + """ + Fetch schemas for multiple datasets in a single request. Datasets not found + or inaccessible to the user will be omitted from the response. + + + The maximum batch size for this endpoint is 1000. + :param body: Body of the request + :type body: List[GetSchemaDatasetsBatchRequestElement] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: datasets_models.GetSchemaDatasetsBatchResponse + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/datasets/getSchemaBatch", + query_params={ + "preview": preview, + }, + path_params={}, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=body, + response_type=datasets_models.GetSchemaDatasetsBatchResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def jobs( + self, + dataset_rid: datasets_models.DatasetRid, + *, + order_by: typing.List[datasets_models.GetDatasetJobsSort], + branch_name: typing.Optional[datasets_models.BranchName] = None, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + where: typing.Optional[datasets_models.GetDatasetJobsQuery] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.ResourceIterator[datasets_models.JobDetails]: + """ + Get the RIDs of the Jobs for the given dataset. By default, returned Jobs are sorted in descending order by the Job start time. + + :param dataset_rid: + :type dataset_rid: DatasetRid + :param order_by: + :type order_by: List[GetDatasetJobsSort] + :param branch_name: The name of the Branch. If none is provided, the default Branch name - `master` for most enrollments - will be used. + :type branch_name: Optional[BranchName] + :param page_size: Max number of results to return. A limit of 1000 on if no limit is supplied in the search request + :type page_size: Optional[PageSize] + :param page_token: + :type page_token: Optional[PageToken] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param where: + :type where: Optional[GetDatasetJobsQuery] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.ResourceIterator[datasets_models.JobDetails] + + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises GetDatasetJobsPermissionDenied: Could not jobs the Dataset. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/datasets/{datasetRid}/jobs", + query_params={ + "branchName": branch_name, + "pageSize": page_size, + "pageToken": page_token, + "preview": preview, + }, + path_params={ + "datasetRid": dataset_rid, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=datasets_models.GetDatasetJobsRequest( + where=where, + order_by=order_by, + ), + response_type=datasets_models.GetJobResponse, + request_timeout=request_timeout, + throwable_errors={ + "BranchNotFound": datasets_errors.BranchNotFound, + "DatasetNotFound": datasets_errors.DatasetNotFound, + "GetDatasetJobsPermissionDenied": datasets_errors.GetDatasetJobsPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def put_schema( + self, + dataset_rid: datasets_models.DatasetRid, + *, + schema: core_models.DatasetSchema, + branch_name: typing.Optional[datasets_models.BranchName] = None, + dataframe_reader: typing.Optional[datasets_models.DataframeReader] = None, + end_transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> datasets_models.GetDatasetSchemaResponse: + """ + Adds a schema on an existing dataset using a PUT request. + + :param dataset_rid: + :type dataset_rid: DatasetRid + :param schema: The schema that will be added. + :type schema: DatasetSchema + :param branch_name: + :type branch_name: Optional[BranchName] + :param dataframe_reader: The dataframe reader used for reading the dataset schema. Defaults to PARQUET. + :type dataframe_reader: Optional[DataframeReader] + :param end_transaction_rid: The Resource Identifier (RID) of the end Transaction. + :type end_transaction_rid: Optional[TransactionRid] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: datasets_models.GetDatasetSchemaResponse + + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises DatasetViewNotFound: The requested dataset view could not be found. A dataset view represents the effective file contents of a dataset for a branch at a point in time, calculated from transactions (SNAPSHOT, APPEND, UPDATE, DELETE). The view may not exist if the dataset has no transactions, contains no files, the branch is not valid, or the client token does not have access to it. + :raises InvalidSchema: The schema failed validations + :raises PutDatasetSchemaPermissionDenied: Could not putSchema the Dataset. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="PUT", + resource_path="/v2/datasets/{datasetRid}/putSchema", + query_params={ + "preview": preview, + }, + path_params={ + "datasetRid": dataset_rid, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=datasets_models.PutDatasetSchemaRequest( + branch_name=branch_name, + dataframe_reader=dataframe_reader, + end_transaction_rid=end_transaction_rid, + schema_=schema, + ), + response_type=datasets_models.GetDatasetSchemaResponse, + request_timeout=request_timeout, + throwable_errors={ + "BranchNotFound": datasets_errors.BranchNotFound, + "DatasetNotFound": datasets_errors.DatasetNotFound, + "DatasetViewNotFound": datasets_errors.DatasetViewNotFound, + "InvalidSchema": core_errors.InvalidSchema, + "PutDatasetSchemaPermissionDenied": datasets_errors.PutDatasetSchemaPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def read_table( + self, + dataset_rid: datasets_models.DatasetRid, + *, + format: datasets_models.TableExportFormat, + branch_name: typing.Optional[datasets_models.BranchName] = None, + columns: typing.Optional[typing.List[str]] = None, + end_transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, + row_limit: typing.Optional[int] = None, + start_transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.TableResponse: + """ + Gets the content of a dataset as a table in the specified format. + + This endpoint currently does not support views (virtual datasets composed of other datasets). + + :param dataset_rid: + :type dataset_rid: DatasetRid + :param format: The export format. Must be `ARROW` or `CSV`. + :type format: TableExportFormat + :param branch_name: The name of the Branch. + :type branch_name: Optional[BranchName] + :param columns: A subset of the dataset columns to include in the result. Defaults to all columns. + :type columns: Optional[List[str]] + :param end_transaction_rid: The Resource Identifier (RID) of the end Transaction. + :type end_transaction_rid: Optional[TransactionRid] + :param row_limit: A limit on the number of rows to return. Note that row ordering is non-deterministic. + :type row_limit: Optional[int] + :param start_transaction_rid: The Resource Identifier (RID) of the start Transaction. + :type start_transaction_rid: Optional[TransactionRid] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.TableResponse + + + :raises ColumnTypesNotSupported: The dataset contains column types that are not supported. + :raises DatasetReadNotSupported: The dataset does not support being read. + :raises InvalidParameterCombination: The given parameters are individually valid but cannot be used in the given combination. + :raises ReadTableDatasetPermissionDenied: The provided token does not have permission to read the given dataset as a table. + :raises ReadTableError: An error occurred while reading the table. Refer to the message for more details. + :raises ReadTableRowLimitExceeded: The request to read the table generates a result that exceeds the allowed number of rows. For datasets not stored as Parquet there is a limit of 1 million rows. For datasets stored as Parquet there is no limit. + :raises ReadTableTimeout: The request to read the table timed out. + :raises SchemaNotFound: A schema could not be found for the given dataset and branch, or the client token does not have access to it. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/datasets/{datasetRid}/readTable", + query_params={ + "format": format, + "branchName": branch_name, + "columns": columns, + "endTransactionRid": end_transaction_rid, + "rowLimit": row_limit, + "startTransactionRid": start_transaction_rid, + }, + path_params={ + "datasetRid": dataset_rid, + }, + header_params={ + "Accept": "application/octet-stream", + }, + body=None, + response_type=bytes, + request_timeout=request_timeout, + throwable_errors={ + "ColumnTypesNotSupported": datasets_errors.ColumnTypesNotSupported, + "DatasetReadNotSupported": datasets_errors.DatasetReadNotSupported, + "InvalidParameterCombination": core_errors.InvalidParameterCombination, + "ReadTableDatasetPermissionDenied": datasets_errors.ReadTableDatasetPermissionDenied, + "ReadTableError": datasets_errors.ReadTableError, + "ReadTableRowLimitExceeded": datasets_errors.ReadTableRowLimitExceeded, + "ReadTableTimeout": datasets_errors.ReadTableTimeout, + "SchemaNotFound": datasets_errors.SchemaNotFound, + }, + response_mode=_sdk_internal.get("response_mode", "TABLE"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def transactions( + self, + dataset_rid: datasets_models.DatasetRid, + *, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.ResourceIterator[datasets_models.Transaction]: + """ + Get the Transaction history for the given Dataset. When requesting all transactions, the endpoint returns them in reverse chronological order. + + :param dataset_rid: + :type dataset_rid: DatasetRid + :param page_size: The page size to use for the endpoint. + :type page_size: Optional[PageSize] + :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. + :type page_token: Optional[PageToken] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.ResourceIterator[datasets_models.Transaction] + + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/datasets/{datasetRid}/transactions", + query_params={ + "pageSize": page_size, + "pageToken": page_token, + "preview": preview, + }, + path_params={ + "datasetRid": dataset_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=datasets_models.ListTransactionsOfDatasetResponse, + request_timeout=request_timeout, + throwable_errors={ + "BranchNotFound": datasets_errors.BranchNotFound, + "DatasetNotFound": datasets_errors.DatasetNotFound, + }, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + +class _DatasetClientRaw: + def __init__(self, client: DatasetClient) -> None: + def create(_: datasets_models.Dataset): ... + def get(_: datasets_models.Dataset): ... + def get_health_checks(_: datasets_models.ListHealthChecksResponse): ... + def get_schedules(_: datasets_models.ListSchedulesResponse): ... + def get_schema(_: datasets_models.GetDatasetSchemaResponse): ... + def get_schema_batch(_: datasets_models.GetSchemaDatasetsBatchResponse): ... + def jobs(_: datasets_models.GetJobResponse): ... + def put_schema(_: datasets_models.GetDatasetSchemaResponse): ... + def read_table(_: bytes): ... + def transactions(_: datasets_models.ListTransactionsOfDatasetResponse): ... + + self.create = core.with_raw_response(create, client.create) + self.get = core.with_raw_response(get, client.get) + self.get_health_checks = core.with_raw_response(get_health_checks, client.get_health_checks) + self.get_schedules = core.with_raw_response(get_schedules, client.get_schedules) + self.get_schema = core.with_raw_response(get_schema, client.get_schema) + self.get_schema_batch = core.with_raw_response(get_schema_batch, client.get_schema_batch) + self.jobs = core.with_raw_response(jobs, client.jobs) + self.put_schema = core.with_raw_response(put_schema, client.put_schema) + self.read_table = core.with_raw_response(read_table, client.read_table) + self.transactions = core.with_raw_response(transactions, client.transactions) + + +class _DatasetClientStreaming: + def __init__(self, client: DatasetClient) -> None: + def create(_: datasets_models.Dataset): ... + def get(_: datasets_models.Dataset): ... + def get_health_checks(_: datasets_models.ListHealthChecksResponse): ... + def get_schedules(_: datasets_models.ListSchedulesResponse): ... + def get_schema(_: datasets_models.GetDatasetSchemaResponse): ... + def get_schema_batch(_: datasets_models.GetSchemaDatasetsBatchResponse): ... + def jobs(_: datasets_models.GetJobResponse): ... + def put_schema(_: datasets_models.GetDatasetSchemaResponse): ... + def read_table(_: bytes): ... + def transactions(_: datasets_models.ListTransactionsOfDatasetResponse): ... + + self.create = core.with_streaming_response(create, client.create) + self.get = core.with_streaming_response(get, client.get) + self.get_health_checks = core.with_streaming_response( + get_health_checks, client.get_health_checks + ) + self.get_schedules = core.with_streaming_response(get_schedules, client.get_schedules) + self.get_schema = core.with_streaming_response(get_schema, client.get_schema) + self.get_schema_batch = core.with_streaming_response( + get_schema_batch, client.get_schema_batch + ) + self.jobs = core.with_streaming_response(jobs, client.jobs) + self.put_schema = core.with_streaming_response(put_schema, client.put_schema) + self.read_table = core.with_streaming_response(read_table, client.read_table) + self.transactions = core.with_streaming_response(transactions, client.transactions) + + +class AsyncDatasetClient: + """ + The API client for the Dataset Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncDatasetClientStreaming(self) + self.with_raw_response = _AsyncDatasetClientRaw(self) + + @cached_property + def Branch(self): + from foundry_sdk.v2.datasets.branch import AsyncBranchClient + + return AsyncBranchClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @cached_property + def Transaction(self): + from foundry_sdk.v2.datasets.transaction import AsyncTransactionClient + + return AsyncTransactionClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @cached_property + def File(self): + from foundry_sdk.v2.datasets.file import AsyncFileClient + + return AsyncFileClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def create( + self, + *, + name: datasets_models.DatasetName, + parent_folder_rid: filesystem_models.FolderRid, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[datasets_models.Dataset]: + """ + Creates a new Dataset. A default branch - `master` for most enrollments - will be created on the Dataset. + + :param name: + :type name: DatasetName + :param parent_folder_rid: + :type parent_folder_rid: FolderRid + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[datasets_models.Dataset] + + :raises BranchAlreadyExists: The branch cannot be created because a branch with that name already exists. + :raises CreateBranchPermissionDenied: The provided token does not have permission to create a branch of this dataset. + :raises CreateDatasetPermissionDenied: The provided token does not have permission to create a dataset in this folder. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises FolderNotFound: The given Folder could not be found. + :raises InvalidBranchName: The requested branch name cannot be used. Branch names cannot be empty and must not look like RIDs or UUIDs. + :raises InvalidDisplayName: The display name of a Resource should not be exactly `.` or `..`, contain a forward slash `/` and must be less than or equal to 700 characters. + :raises ResourceNameAlreadyExists: The provided resource name is already in use by another resource in the same folder. + :raises TransactionNotCommitted: The given transaction has not been committed. + :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/datasets", + query_params={}, + path_params={}, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=datasets_models.CreateDatasetRequest( + parent_folder_rid=parent_folder_rid, + name=name, + ), + response_type=datasets_models.Dataset, + request_timeout=request_timeout, + throwable_errors={ + "BranchAlreadyExists": datasets_errors.BranchAlreadyExists, + "CreateBranchPermissionDenied": datasets_errors.CreateBranchPermissionDenied, + "CreateDatasetPermissionDenied": datasets_errors.CreateDatasetPermissionDenied, + "DatasetNotFound": datasets_errors.DatasetNotFound, + "FolderNotFound": filesystem_errors.FolderNotFound, + "InvalidBranchName": datasets_errors.InvalidBranchName, + "InvalidDisplayName": filesystem_errors.InvalidDisplayName, + "ResourceNameAlreadyExists": filesystem_errors.ResourceNameAlreadyExists, + "TransactionNotCommitted": datasets_errors.TransactionNotCommitted, + "TransactionNotFound": datasets_errors.TransactionNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + dataset_rid: datasets_models.DatasetRid, + *, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[datasets_models.Dataset]: + """ + Get the Dataset with the specified rid. + :param dataset_rid: + :type dataset_rid: DatasetRid + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[datasets_models.Dataset] + + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises ResourceNameAlreadyExists: The provided resource name is already in use by another resource in the same folder. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/datasets/{datasetRid}", + query_params={}, + path_params={ + "datasetRid": dataset_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=datasets_models.Dataset, + request_timeout=request_timeout, + throwable_errors={ + "DatasetNotFound": datasets_errors.DatasetNotFound, + "ResourceNameAlreadyExists": filesystem_errors.ResourceNameAlreadyExists, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get_health_checks( + self, + dataset_rid: datasets_models.DatasetRid, + *, + branch_name: typing.Optional[datasets_models.BranchName] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[datasets_models.ListHealthChecksResponse]: + """ + Get the RIDs of the Data Health Checks that are configured for the given Dataset. + + :param dataset_rid: + :type dataset_rid: DatasetRid + :param branch_name: The name of the Branch. If none is provided, the default Branch name - `master` for most enrollments - will be used. + :type branch_name: Optional[BranchName] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[datasets_models.ListHealthChecksResponse] + + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises GetDatasetHealthChecksPermissionDenied: Could not getHealthChecks the Dataset. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/datasets/{datasetRid}/getHealthChecks", + query_params={ + "branchName": branch_name, + "preview": preview, + }, + path_params={ + "datasetRid": dataset_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=datasets_models.ListHealthChecksResponse, + request_timeout=request_timeout, + throwable_errors={ + "BranchNotFound": datasets_errors.BranchNotFound, + "DatasetNotFound": datasets_errors.DatasetNotFound, + "GetDatasetHealthChecksPermissionDenied": datasets_errors.GetDatasetHealthChecksPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get_schedules( + self, + dataset_rid: datasets_models.DatasetRid, + *, + branch_name: typing.Optional[datasets_models.BranchName] = None, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.AsyncResourceIterator[core_models.ScheduleRid]: + """ + Get the RIDs of the Schedules that target the given Dataset + + :param dataset_rid: + :type dataset_rid: DatasetRid + :param branch_name: The name of the Branch. If none is provided, the default Branch name - `master` for most enrollments - will be used. + :type branch_name: Optional[BranchName] + :param page_size: + :type page_size: Optional[PageSize] + :param page_token: + :type page_token: Optional[PageToken] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.AsyncResourceIterator[core_models.ScheduleRid] + + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises GetDatasetSchedulesPermissionDenied: Could not getSchedules the Dataset. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/datasets/{datasetRid}/getSchedules", + query_params={ + "branchName": branch_name, + "pageSize": page_size, + "pageToken": page_token, + "preview": preview, + }, + path_params={ + "datasetRid": dataset_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=datasets_models.ListSchedulesResponse, + request_timeout=request_timeout, + throwable_errors={ + "BranchNotFound": datasets_errors.BranchNotFound, + "DatasetNotFound": datasets_errors.DatasetNotFound, + "GetDatasetSchedulesPermissionDenied": datasets_errors.GetDatasetSchedulesPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get_schema( + self, + dataset_rid: datasets_models.DatasetRid, + *, + branch_name: typing.Optional[datasets_models.BranchName] = None, + end_transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + version_id: typing.Optional[core_models.VersionId] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[datasets_models.GetDatasetSchemaResponse]: + """ + Gets a dataset's schema. If no `endTransactionRid` is provided, the latest committed version will be used. + + :param dataset_rid: + :type dataset_rid: DatasetRid + :param branch_name: + :type branch_name: Optional[BranchName] + :param end_transaction_rid: The Resource Identifier (RID) of the end Transaction. If a user does not provide a value, the RID of the latest committed transaction will be used. + :type end_transaction_rid: Optional[TransactionRid] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param version_id: The schema version that should be used. If none is provided, the latest version will be used. + :type version_id: Optional[VersionId] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[datasets_models.GetDatasetSchemaResponse] + + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises DatasetViewNotFound: The requested dataset view could not be found. A dataset view represents the effective file contents of a dataset for a branch at a point in time, calculated from transactions (SNAPSHOT, APPEND, UPDATE, DELETE). The view may not exist if the dataset has no transactions, contains no files, the branch is not valid, or the client token does not have access to it. + :raises GetDatasetSchemaPermissionDenied: Could not getSchema the Dataset. + :raises InvalidParameterCombination: The given parameters are individually valid but cannot be used in the given combination. + :raises SchemaNotFound: A schema could not be found for the given dataset and branch, or the client token does not have access to it. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/datasets/{datasetRid}/getSchema", + query_params={ + "branchName": branch_name, + "endTransactionRid": end_transaction_rid, + "preview": preview, + "versionId": version_id, + }, + path_params={ + "datasetRid": dataset_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=datasets_models.GetDatasetSchemaResponse, + request_timeout=request_timeout, + throwable_errors={ + "BranchNotFound": datasets_errors.BranchNotFound, + "DatasetNotFound": datasets_errors.DatasetNotFound, + "DatasetViewNotFound": datasets_errors.DatasetViewNotFound, + "GetDatasetSchemaPermissionDenied": datasets_errors.GetDatasetSchemaPermissionDenied, + "InvalidParameterCombination": core_errors.InvalidParameterCombination, + "SchemaNotFound": datasets_errors.SchemaNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get_schema_batch( + self, + body: typing_extensions.Annotated[ + typing.List[datasets_models.GetSchemaDatasetsBatchRequestElement], + annotated_types.Len(min_length=1, max_length=1000), + ], + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[datasets_models.GetSchemaDatasetsBatchResponse]: + """ + Fetch schemas for multiple datasets in a single request. Datasets not found + or inaccessible to the user will be omitted from the response. + + + The maximum batch size for this endpoint is 1000. + :param body: Body of the request + :type body: List[GetSchemaDatasetsBatchRequestElement] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[datasets_models.GetSchemaDatasetsBatchResponse] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/datasets/getSchemaBatch", + query_params={ + "preview": preview, + }, + path_params={}, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=body, + response_type=datasets_models.GetSchemaDatasetsBatchResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def jobs( + self, + dataset_rid: datasets_models.DatasetRid, + *, + order_by: typing.List[datasets_models.GetDatasetJobsSort], + branch_name: typing.Optional[datasets_models.BranchName] = None, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + where: typing.Optional[datasets_models.GetDatasetJobsQuery] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.AsyncResourceIterator[datasets_models.JobDetails]: + """ + Get the RIDs of the Jobs for the given dataset. By default, returned Jobs are sorted in descending order by the Job start time. + + :param dataset_rid: + :type dataset_rid: DatasetRid + :param order_by: + :type order_by: List[GetDatasetJobsSort] + :param branch_name: The name of the Branch. If none is provided, the default Branch name - `master` for most enrollments - will be used. + :type branch_name: Optional[BranchName] + :param page_size: Max number of results to return. A limit of 1000 on if no limit is supplied in the search request + :type page_size: Optional[PageSize] + :param page_token: + :type page_token: Optional[PageToken] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param where: + :type where: Optional[GetDatasetJobsQuery] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.AsyncResourceIterator[datasets_models.JobDetails] + + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises GetDatasetJobsPermissionDenied: Could not jobs the Dataset. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/datasets/{datasetRid}/jobs", + query_params={ + "branchName": branch_name, + "pageSize": page_size, + "pageToken": page_token, + "preview": preview, + }, + path_params={ + "datasetRid": dataset_rid, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=datasets_models.GetDatasetJobsRequest( + where=where, + order_by=order_by, + ), + response_type=datasets_models.GetJobResponse, + request_timeout=request_timeout, + throwable_errors={ + "BranchNotFound": datasets_errors.BranchNotFound, + "DatasetNotFound": datasets_errors.DatasetNotFound, + "GetDatasetJobsPermissionDenied": datasets_errors.GetDatasetJobsPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def put_schema( + self, + dataset_rid: datasets_models.DatasetRid, + *, + schema: core_models.DatasetSchema, + branch_name: typing.Optional[datasets_models.BranchName] = None, + dataframe_reader: typing.Optional[datasets_models.DataframeReader] = None, + end_transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[datasets_models.GetDatasetSchemaResponse]: + """ + Adds a schema on an existing dataset using a PUT request. + + :param dataset_rid: + :type dataset_rid: DatasetRid + :param schema: The schema that will be added. + :type schema: DatasetSchema + :param branch_name: + :type branch_name: Optional[BranchName] + :param dataframe_reader: The dataframe reader used for reading the dataset schema. Defaults to PARQUET. + :type dataframe_reader: Optional[DataframeReader] + :param end_transaction_rid: The Resource Identifier (RID) of the end Transaction. + :type end_transaction_rid: Optional[TransactionRid] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[datasets_models.GetDatasetSchemaResponse] + + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises DatasetViewNotFound: The requested dataset view could not be found. A dataset view represents the effective file contents of a dataset for a branch at a point in time, calculated from transactions (SNAPSHOT, APPEND, UPDATE, DELETE). The view may not exist if the dataset has no transactions, contains no files, the branch is not valid, or the client token does not have access to it. + :raises InvalidSchema: The schema failed validations + :raises PutDatasetSchemaPermissionDenied: Could not putSchema the Dataset. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="PUT", + resource_path="/v2/datasets/{datasetRid}/putSchema", + query_params={ + "preview": preview, + }, + path_params={ + "datasetRid": dataset_rid, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=datasets_models.PutDatasetSchemaRequest( + branch_name=branch_name, + dataframe_reader=dataframe_reader, + end_transaction_rid=end_transaction_rid, + schema_=schema, + ), + response_type=datasets_models.GetDatasetSchemaResponse, + request_timeout=request_timeout, + throwable_errors={ + "BranchNotFound": datasets_errors.BranchNotFound, + "DatasetNotFound": datasets_errors.DatasetNotFound, + "DatasetViewNotFound": datasets_errors.DatasetViewNotFound, + "InvalidSchema": core_errors.InvalidSchema, + "PutDatasetSchemaPermissionDenied": datasets_errors.PutDatasetSchemaPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def read_table( + self, + dataset_rid: datasets_models.DatasetRid, + *, + format: datasets_models.TableExportFormat, + branch_name: typing.Optional[datasets_models.BranchName] = None, + columns: typing.Optional[typing.List[str]] = None, + end_transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, + row_limit: typing.Optional[int] = None, + start_transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[core.TableResponse]: + """ + Gets the content of a dataset as a table in the specified format. + + This endpoint currently does not support views (virtual datasets composed of other datasets). + + :param dataset_rid: + :type dataset_rid: DatasetRid + :param format: The export format. Must be `ARROW` or `CSV`. + :type format: TableExportFormat + :param branch_name: The name of the Branch. + :type branch_name: Optional[BranchName] + :param columns: A subset of the dataset columns to include in the result. Defaults to all columns. + :type columns: Optional[List[str]] + :param end_transaction_rid: The Resource Identifier (RID) of the end Transaction. + :type end_transaction_rid: Optional[TransactionRid] + :param row_limit: A limit on the number of rows to return. Note that row ordering is non-deterministic. + :type row_limit: Optional[int] + :param start_transaction_rid: The Resource Identifier (RID) of the start Transaction. + :type start_transaction_rid: Optional[TransactionRid] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[core.TableResponse + ] + + :raises ColumnTypesNotSupported: The dataset contains column types that are not supported. + :raises DatasetReadNotSupported: The dataset does not support being read. + :raises InvalidParameterCombination: The given parameters are individually valid but cannot be used in the given combination. + :raises ReadTableDatasetPermissionDenied: The provided token does not have permission to read the given dataset as a table. + :raises ReadTableError: An error occurred while reading the table. Refer to the message for more details. + :raises ReadTableRowLimitExceeded: The request to read the table generates a result that exceeds the allowed number of rows. For datasets not stored as Parquet there is a limit of 1 million rows. For datasets stored as Parquet there is no limit. + :raises ReadTableTimeout: The request to read the table timed out. + :raises SchemaNotFound: A schema could not be found for the given dataset and branch, or the client token does not have access to it. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/datasets/{datasetRid}/readTable", + query_params={ + "format": format, + "branchName": branch_name, + "columns": columns, + "endTransactionRid": end_transaction_rid, + "rowLimit": row_limit, + "startTransactionRid": start_transaction_rid, + }, + path_params={ + "datasetRid": dataset_rid, + }, + header_params={ + "Accept": "application/octet-stream", + }, + body=None, + response_type=bytes, + request_timeout=request_timeout, + throwable_errors={ + "ColumnTypesNotSupported": datasets_errors.ColumnTypesNotSupported, + "DatasetReadNotSupported": datasets_errors.DatasetReadNotSupported, + "InvalidParameterCombination": core_errors.InvalidParameterCombination, + "ReadTableDatasetPermissionDenied": datasets_errors.ReadTableDatasetPermissionDenied, + "ReadTableError": datasets_errors.ReadTableError, + "ReadTableRowLimitExceeded": datasets_errors.ReadTableRowLimitExceeded, + "ReadTableTimeout": datasets_errors.ReadTableTimeout, + "SchemaNotFound": datasets_errors.SchemaNotFound, + }, + response_mode=_sdk_internal.get("response_mode", "TABLE"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def transactions( + self, + dataset_rid: datasets_models.DatasetRid, + *, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.AsyncResourceIterator[datasets_models.Transaction]: + """ + Get the Transaction history for the given Dataset. When requesting all transactions, the endpoint returns them in reverse chronological order. + + :param dataset_rid: + :type dataset_rid: DatasetRid + :param page_size: The page size to use for the endpoint. + :type page_size: Optional[PageSize] + :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. + :type page_token: Optional[PageToken] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.AsyncResourceIterator[datasets_models.Transaction] + + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/datasets/{datasetRid}/transactions", + query_params={ + "pageSize": page_size, + "pageToken": page_token, + "preview": preview, + }, + path_params={ + "datasetRid": dataset_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=datasets_models.ListTransactionsOfDatasetResponse, + request_timeout=request_timeout, + throwable_errors={ + "BranchNotFound": datasets_errors.BranchNotFound, + "DatasetNotFound": datasets_errors.DatasetNotFound, + }, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + +class _AsyncDatasetClientRaw: + def __init__(self, client: AsyncDatasetClient) -> None: + def create(_: datasets_models.Dataset): ... + def get(_: datasets_models.Dataset): ... + def get_health_checks(_: datasets_models.ListHealthChecksResponse): ... + def get_schedules(_: datasets_models.ListSchedulesResponse): ... + def get_schema(_: datasets_models.GetDatasetSchemaResponse): ... + def get_schema_batch(_: datasets_models.GetSchemaDatasetsBatchResponse): ... + def jobs(_: datasets_models.GetJobResponse): ... + def put_schema(_: datasets_models.GetDatasetSchemaResponse): ... + def read_table(_: bytes): ... + def transactions(_: datasets_models.ListTransactionsOfDatasetResponse): ... + + self.create = core.async_with_raw_response(create, client.create) + self.get = core.async_with_raw_response(get, client.get) + self.get_health_checks = core.async_with_raw_response( + get_health_checks, client.get_health_checks + ) + self.get_schedules = core.async_with_raw_response(get_schedules, client.get_schedules) + self.get_schema = core.async_with_raw_response(get_schema, client.get_schema) + self.get_schema_batch = core.async_with_raw_response( + get_schema_batch, client.get_schema_batch + ) + self.jobs = core.async_with_raw_response(jobs, client.jobs) + self.put_schema = core.async_with_raw_response(put_schema, client.put_schema) + self.read_table = core.async_with_raw_response(read_table, client.read_table) + self.transactions = core.async_with_raw_response(transactions, client.transactions) + + +class _AsyncDatasetClientStreaming: + def __init__(self, client: AsyncDatasetClient) -> None: + def create(_: datasets_models.Dataset): ... + def get(_: datasets_models.Dataset): ... + def get_health_checks(_: datasets_models.ListHealthChecksResponse): ... + def get_schedules(_: datasets_models.ListSchedulesResponse): ... + def get_schema(_: datasets_models.GetDatasetSchemaResponse): ... + def get_schema_batch(_: datasets_models.GetSchemaDatasetsBatchResponse): ... + def jobs(_: datasets_models.GetJobResponse): ... + def put_schema(_: datasets_models.GetDatasetSchemaResponse): ... + def read_table(_: bytes): ... + def transactions(_: datasets_models.ListTransactionsOfDatasetResponse): ... + + self.create = core.async_with_streaming_response(create, client.create) + self.get = core.async_with_streaming_response(get, client.get) + self.get_health_checks = core.async_with_streaming_response( + get_health_checks, client.get_health_checks + ) + self.get_schedules = core.async_with_streaming_response(get_schedules, client.get_schedules) + self.get_schema = core.async_with_streaming_response(get_schema, client.get_schema) + self.get_schema_batch = core.async_with_streaming_response( + get_schema_batch, client.get_schema_batch + ) + self.jobs = core.async_with_streaming_response(jobs, client.jobs) + self.put_schema = core.async_with_streaming_response(put_schema, client.put_schema) + self.read_table = core.async_with_streaming_response(read_table, client.read_table) + self.transactions = core.async_with_streaming_response(transactions, client.transactions) diff --git a/foundry_sdk/v2/datasets/errors.py b/foundry_sdk/v2/datasets/errors.py new file mode 100644 index 000000000..e8b4aaf56 --- /dev/null +++ b/foundry_sdk/v2/datasets/errors.py @@ -0,0 +1,974 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing +from dataclasses import dataclass + +import typing_extensions + +from foundry_sdk import _errors as errors +from foundry_sdk.v2.core import models as core_models +from foundry_sdk.v2.datasets import models as datasets_models +from foundry_sdk.v2.filesystem import models as filesystem_models + + +class AbortTransactionPermissionDeniedParameters(typing_extensions.TypedDict): + """The provided token does not have permission to abort the given transaction on the given dataset.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + datasetRid: datasets_models.DatasetRid + transactionRid: datasets_models.TransactionRid + + +@dataclass +class AbortTransactionPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["AbortTransactionPermissionDenied"] + parameters: AbortTransactionPermissionDeniedParameters + error_instance_id: str + + +class AddBackingDatasetsPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not addBackingDatasets the View.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + viewDatasetRid: datasets_models.DatasetRid + """The rid of the View.""" + + +@dataclass +class AddBackingDatasetsPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["AddBackingDatasetsPermissionDenied"] + parameters: AddBackingDatasetsPermissionDeniedParameters + error_instance_id: str + + +class AddPrimaryKeyPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not addPrimaryKey the View.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + viewDatasetRid: datasets_models.DatasetRid + """The rid of the View.""" + + +@dataclass +class AddPrimaryKeyPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["AddPrimaryKeyPermissionDenied"] + parameters: AddPrimaryKeyPermissionDeniedParameters + error_instance_id: str + + +class BranchAlreadyExistsParameters(typing_extensions.TypedDict): + """The branch cannot be created because a branch with that name already exists.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + datasetRid: datasets_models.DatasetRid + branchName: datasets_models.BranchName + + +@dataclass +class BranchAlreadyExists(errors.ConflictError): + name: typing.Literal["BranchAlreadyExists"] + parameters: BranchAlreadyExistsParameters + error_instance_id: str + + +class BranchNotFoundParameters(typing_extensions.TypedDict): + """The requested branch could not be found, or the client token does not have access to it.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + datasetRid: datasets_models.DatasetRid + branchName: datasets_models.BranchName + + +@dataclass +class BranchNotFound(errors.NotFoundError): + name: typing.Literal["BranchNotFound"] + parameters: BranchNotFoundParameters + error_instance_id: str + + +class BuildTransactionPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not build the Transaction.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + datasetRid: datasets_models.DatasetRid + transactionRid: datasets_models.TransactionRid + + +@dataclass +class BuildTransactionPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["BuildTransactionPermissionDenied"] + parameters: BuildTransactionPermissionDeniedParameters + error_instance_id: str + + +class ColumnTypesNotSupportedParameters(typing_extensions.TypedDict): + """The dataset contains column types that are not supported.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + datasetRid: datasets_models.DatasetRid + + +@dataclass +class ColumnTypesNotSupported(errors.BadRequestError): + name: typing.Literal["ColumnTypesNotSupported"] + parameters: ColumnTypesNotSupportedParameters + error_instance_id: str + + +class CommitTransactionPermissionDeniedParameters(typing_extensions.TypedDict): + """The provided token does not have permission to commit the given transaction on the given dataset.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + datasetRid: datasets_models.DatasetRid + transactionRid: datasets_models.TransactionRid + + +@dataclass +class CommitTransactionPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["CommitTransactionPermissionDenied"] + parameters: CommitTransactionPermissionDeniedParameters + error_instance_id: str + + +class CreateBranchPermissionDeniedParameters(typing_extensions.TypedDict): + """The provided token does not have permission to create a branch of this dataset.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + datasetRid: datasets_models.DatasetRid + branchName: datasets_models.BranchName + + +@dataclass +class CreateBranchPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["CreateBranchPermissionDenied"] + parameters: CreateBranchPermissionDeniedParameters + error_instance_id: str + + +class CreateDatasetPermissionDeniedParameters(typing_extensions.TypedDict): + """The provided token does not have permission to create a dataset in this folder.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + parentFolderRid: filesystem_models.FolderRid + name: datasets_models.DatasetName + + +@dataclass +class CreateDatasetPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["CreateDatasetPermissionDenied"] + parameters: CreateDatasetPermissionDeniedParameters + error_instance_id: str + + +class CreateTransactionPermissionDeniedParameters(typing_extensions.TypedDict): + """The provided token does not have permission to create a transaction on this dataset.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + datasetRid: datasets_models.DatasetRid + branchName: typing_extensions.NotRequired[datasets_models.BranchName] + + +@dataclass +class CreateTransactionPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["CreateTransactionPermissionDenied"] + parameters: CreateTransactionPermissionDeniedParameters + error_instance_id: str + + +class CreateViewPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not create the View.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class CreateViewPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["CreateViewPermissionDenied"] + parameters: CreateViewPermissionDeniedParameters + error_instance_id: str + + +class DatasetNotFoundParameters(typing_extensions.TypedDict): + """The requested dataset could not be found, or the client token does not have access to it.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + datasetRid: datasets_models.DatasetRid + + +@dataclass +class DatasetNotFound(errors.NotFoundError): + name: typing.Literal["DatasetNotFound"] + parameters: DatasetNotFoundParameters + error_instance_id: str + + +class DatasetReadNotSupportedParameters(typing_extensions.TypedDict): + """The dataset does not support being read.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + datasetRid: datasets_models.DatasetRid + + +@dataclass +class DatasetReadNotSupported(errors.BadRequestError): + name: typing.Literal["DatasetReadNotSupported"] + parameters: DatasetReadNotSupportedParameters + error_instance_id: str + + +class DatasetViewNotFoundParameters(typing_extensions.TypedDict): + """ + The requested dataset view could not be found. A dataset view represents the effective file contents of a dataset + for a branch at a point in time, calculated from transactions (SNAPSHOT, APPEND, UPDATE, DELETE). The view may not + exist if the dataset has no transactions, contains no files, the branch is not valid, or the client token does not have access to it. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + datasetRid: datasets_models.DatasetRid + branch: datasets_models.BranchName + + +@dataclass +class DatasetViewNotFound(errors.NotFoundError): + name: typing.Literal["DatasetViewNotFound"] + parameters: DatasetViewNotFoundParameters + error_instance_id: str + + +class DeleteBranchPermissionDeniedParameters(typing_extensions.TypedDict): + """The provided token does not have permission to delete the given branch from this dataset.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + datasetRid: datasets_models.DatasetRid + branchName: datasets_models.BranchName + + +@dataclass +class DeleteBranchPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["DeleteBranchPermissionDenied"] + parameters: DeleteBranchPermissionDeniedParameters + error_instance_id: str + + +class DeleteFilePermissionDeniedParameters(typing_extensions.TypedDict): + """Could not delete the File.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + datasetRid: datasets_models.DatasetRid + filePath: core_models.FilePath + + +@dataclass +class DeleteFilePermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["DeleteFilePermissionDenied"] + parameters: DeleteFilePermissionDeniedParameters + error_instance_id: str + + +class DeleteSchemaPermissionDeniedParameters(typing_extensions.TypedDict): + """todo""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + datasetRid: datasets_models.DatasetRid + branchName: datasets_models.BranchName + transactionId: typing_extensions.NotRequired[datasets_models.TransactionRid] + + +@dataclass +class DeleteSchemaPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["DeleteSchemaPermissionDenied"] + parameters: DeleteSchemaPermissionDeniedParameters + error_instance_id: str + + +class FileAlreadyExistsParameters(typing_extensions.TypedDict): + """The given file path already exists in the dataset and transaction.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + datasetRid: datasets_models.DatasetRid + transactionRid: datasets_models.TransactionRid + path: core_models.FilePath + + +@dataclass +class FileAlreadyExists(errors.NotFoundError): + name: typing.Literal["FileAlreadyExists"] + parameters: FileAlreadyExistsParameters + error_instance_id: str + + +class FileNotFoundParameters(typing_extensions.TypedDict): + """The given File could not be found.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + datasetRid: datasets_models.DatasetRid + filePath: core_models.FilePath + + +@dataclass +class FileNotFound(errors.NotFoundError): + name: typing.Literal["FileNotFound"] + parameters: FileNotFoundParameters + error_instance_id: str + + +class FileNotFoundOnBranchParameters(typing_extensions.TypedDict): + """The requested file could not be found on the given branch, or the client token does not have access to it.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + datasetRid: datasets_models.DatasetRid + branchName: datasets_models.BranchName + path: core_models.FilePath + + +@dataclass +class FileNotFoundOnBranch(errors.NotFoundError): + name: typing.Literal["FileNotFoundOnBranch"] + parameters: FileNotFoundOnBranchParameters + error_instance_id: str + + +class FileNotFoundOnTransactionRangeParameters(typing_extensions.TypedDict): + """The requested file could not be found on the given transaction range, or the client token does not have access to it.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + datasetRid: datasets_models.DatasetRid + startTransactionRid: typing_extensions.NotRequired[datasets_models.TransactionRid] + endTransactionRid: datasets_models.TransactionRid + path: core_models.FilePath + + +@dataclass +class FileNotFoundOnTransactionRange(errors.NotFoundError): + name: typing.Literal["FileNotFoundOnTransactionRange"] + parameters: FileNotFoundOnTransactionRangeParameters + error_instance_id: str + + +class GetBranchTransactionHistoryPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not transactions the Branch.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + datasetRid: datasets_models.DatasetRid + branchName: datasets_models.BranchName + + +@dataclass +class GetBranchTransactionHistoryPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["GetBranchTransactionHistoryPermissionDenied"] + parameters: GetBranchTransactionHistoryPermissionDeniedParameters + error_instance_id: str + + +class GetDatasetHealthChecksPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not getHealthChecks the Dataset.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + datasetRid: datasets_models.DatasetRid + + +@dataclass +class GetDatasetHealthChecksPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["GetDatasetHealthChecksPermissionDenied"] + parameters: GetDatasetHealthChecksPermissionDeniedParameters + error_instance_id: str + + +class GetDatasetJobsPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not jobs the Dataset.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + datasetRid: datasets_models.DatasetRid + + +@dataclass +class GetDatasetJobsPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["GetDatasetJobsPermissionDenied"] + parameters: GetDatasetJobsPermissionDeniedParameters + error_instance_id: str + + +class GetDatasetSchedulesPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not getSchedules the Dataset.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + datasetRid: datasets_models.DatasetRid + + +@dataclass +class GetDatasetSchedulesPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["GetDatasetSchedulesPermissionDenied"] + parameters: GetDatasetSchedulesPermissionDeniedParameters + error_instance_id: str + + +class GetDatasetSchemaPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not getSchema the Dataset.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + datasetRid: datasets_models.DatasetRid + + +@dataclass +class GetDatasetSchemaPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["GetDatasetSchemaPermissionDenied"] + parameters: GetDatasetSchemaPermissionDeniedParameters + error_instance_id: str + + +class GetFileContentPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not content the File.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + datasetRid: datasets_models.DatasetRid + filePath: core_models.FilePath + + +@dataclass +class GetFileContentPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["GetFileContentPermissionDenied"] + parameters: GetFileContentPermissionDeniedParameters + error_instance_id: str + + +class InputBackingDatasetNotInOutputViewProjectParameters(typing_extensions.TypedDict): + """ + One or more backing datasets do not live in the same project as the view. Either move the input datasets to + the same project as the view or add them as project references. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class InputBackingDatasetNotInOutputViewProject(errors.BadRequestError): + name: typing.Literal["InputBackingDatasetNotInOutputViewProject"] + parameters: InputBackingDatasetNotInOutputViewProjectParameters + error_instance_id: str + + +class InvalidBranchNameParameters(typing_extensions.TypedDict): + """The requested branch name cannot be used. Branch names cannot be empty and must not look like RIDs or UUIDs.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + branchName: datasets_models.BranchName + + +@dataclass +class InvalidBranchName(errors.BadRequestError): + name: typing.Literal["InvalidBranchName"] + parameters: InvalidBranchNameParameters + error_instance_id: str + + +class InvalidTransactionTypeParameters(typing_extensions.TypedDict): + """The given transaction type is not valid. Valid transaction types are `SNAPSHOT`, `UPDATE`, `APPEND`, and `DELETE`.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + datasetRid: datasets_models.DatasetRid + transactionRid: datasets_models.TransactionRid + transactionType: datasets_models.TransactionType + + +@dataclass +class InvalidTransactionType(errors.BadRequestError): + name: typing.Literal["InvalidTransactionType"] + parameters: InvalidTransactionTypeParameters + error_instance_id: str + + +class InvalidViewBackingDatasetParameters(typing_extensions.TypedDict): + """Either you do not have access to one or more of the backing datasets or it does not exist.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class InvalidViewBackingDataset(errors.BadRequestError): + name: typing.Literal["InvalidViewBackingDataset"] + parameters: InvalidViewBackingDatasetParameters + error_instance_id: str + + +class InvalidViewPrimaryKeyColumnTypeParameters(typing_extensions.TypedDict): + """ + The type of each referenced column in the primary key must be one of the following: BYTE, SHORT, DECIMAL, + INTEGER, LONG, STRING, BOOLEAN, TIMESTAMP or DATE. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + primaryKeyColumns: typing.List[str] + invalidColumns: typing.List[str] + + +@dataclass +class InvalidViewPrimaryKeyColumnType(errors.BadRequestError): + name: typing.Literal["InvalidViewPrimaryKeyColumnType"] + parameters: InvalidViewPrimaryKeyColumnTypeParameters + error_instance_id: str + + +class InvalidViewPrimaryKeyDeletionColumnParameters(typing_extensions.TypedDict): + """The deletion column must be a boolean.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + deletionColumn: str + deletionColumnType: core_models.SchemaFieldType + + +@dataclass +class InvalidViewPrimaryKeyDeletionColumn(errors.BadRequestError): + name: typing.Literal["InvalidViewPrimaryKeyDeletionColumn"] + parameters: InvalidViewPrimaryKeyDeletionColumnParameters + error_instance_id: str + + +class JobTransactionPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not job the Transaction.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + datasetRid: datasets_models.DatasetRid + transactionRid: datasets_models.TransactionRid + + +@dataclass +class JobTransactionPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["JobTransactionPermissionDenied"] + parameters: JobTransactionPermissionDeniedParameters + error_instance_id: str + + +class NotAllColumnsInPrimaryKeyArePresentParameters(typing_extensions.TypedDict): + """Not all columns in the View's primary key are present in the dataset(s).""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + primaryKeyColumns: typing.List[str] + missingColumns: typing.List[str] + + +@dataclass +class NotAllColumnsInPrimaryKeyArePresent(errors.BadRequestError): + name: typing.Literal["NotAllColumnsInPrimaryKeyArePresent"] + parameters: NotAllColumnsInPrimaryKeyArePresentParameters + error_instance_id: str + + +class OpenTransactionAlreadyExistsParameters(typing_extensions.TypedDict): + """A transaction is already open on this dataset and branch. A branch of a dataset can only have one open transaction at a time.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + datasetRid: datasets_models.DatasetRid + branchName: datasets_models.BranchName + + +@dataclass +class OpenTransactionAlreadyExists(errors.ConflictError): + name: typing.Literal["OpenTransactionAlreadyExists"] + parameters: OpenTransactionAlreadyExistsParameters + error_instance_id: str + + +class PutDatasetSchemaPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not putSchema the Dataset.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + datasetRid: datasets_models.DatasetRid + + +@dataclass +class PutDatasetSchemaPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["PutDatasetSchemaPermissionDenied"] + parameters: PutDatasetSchemaPermissionDeniedParameters + error_instance_id: str + + +class PutSchemaPermissionDeniedParameters(typing_extensions.TypedDict): + """todo""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + datasetRid: datasets_models.DatasetRid + branchName: datasets_models.BranchName + + +@dataclass +class PutSchemaPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["PutSchemaPermissionDenied"] + parameters: PutSchemaPermissionDeniedParameters + error_instance_id: str + + +class ReadTableDatasetPermissionDeniedParameters(typing_extensions.TypedDict): + """The provided token does not have permission to read the given dataset as a table.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + datasetRid: datasets_models.DatasetRid + + +@dataclass +class ReadTableDatasetPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["ReadTableDatasetPermissionDenied"] + parameters: ReadTableDatasetPermissionDeniedParameters + error_instance_id: str + + +class ReadTableErrorParameters(typing_extensions.TypedDict): + """An error occurred while reading the table. Refer to the message for more details.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + datasetRid: datasets_models.DatasetRid + message: str + + +@dataclass +class ReadTableError(errors.InternalServerError): + name: typing.Literal["ReadTableError"] + parameters: ReadTableErrorParameters + error_instance_id: str + + +class ReadTableRowLimitExceededParameters(typing_extensions.TypedDict): + """ + The request to read the table generates a result that exceeds the allowed number of rows. For datasets not + stored as Parquet there is a limit of 1 million rows. For datasets stored as Parquet there is no limit. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + datasetRid: datasets_models.DatasetRid + + +@dataclass +class ReadTableRowLimitExceeded(errors.BadRequestError): + name: typing.Literal["ReadTableRowLimitExceeded"] + parameters: ReadTableRowLimitExceededParameters + error_instance_id: str + + +class ReadTableTimeoutParameters(typing_extensions.TypedDict): + """The request to read the table timed out.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + datasetRid: datasets_models.DatasetRid + + +@dataclass +class ReadTableTimeout(errors.InternalServerError): + name: typing.Literal["ReadTableTimeout"] + parameters: ReadTableTimeoutParameters + error_instance_id: str + + +class RemoveBackingDatasetsPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not removeBackingDatasets the View.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + viewDatasetRid: datasets_models.DatasetRid + """The rid of the View.""" + + +@dataclass +class RemoveBackingDatasetsPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["RemoveBackingDatasetsPermissionDenied"] + parameters: RemoveBackingDatasetsPermissionDeniedParameters + error_instance_id: str + + +class ReplaceBackingDatasetsPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not replaceBackingDatasets the View.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + viewDatasetRid: datasets_models.DatasetRid + """The rid of the View.""" + + +@dataclass +class ReplaceBackingDatasetsPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["ReplaceBackingDatasetsPermissionDenied"] + parameters: ReplaceBackingDatasetsPermissionDeniedParameters + error_instance_id: str + + +class SchemaNotFoundParameters(typing_extensions.TypedDict): + """A schema could not be found for the given dataset and branch, or the client token does not have access to it.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + datasetRid: datasets_models.DatasetRid + branchName: datasets_models.BranchName + transactionRid: typing_extensions.NotRequired[datasets_models.TransactionRid] + + +@dataclass +class SchemaNotFound(errors.NotFoundError): + name: typing.Literal["SchemaNotFound"] + parameters: SchemaNotFoundParameters + error_instance_id: str + + +class TransactionNotCommittedParameters(typing_extensions.TypedDict): + """The given transaction has not been committed.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + datasetRid: datasets_models.DatasetRid + transactionRid: datasets_models.TransactionRid + transactionStatus: datasets_models.TransactionStatus + + +@dataclass +class TransactionNotCommitted(errors.BadRequestError): + name: typing.Literal["TransactionNotCommitted"] + parameters: TransactionNotCommittedParameters + error_instance_id: str + + +class TransactionNotFoundParameters(typing_extensions.TypedDict): + """The requested transaction could not be found on the dataset, or the client token does not have access to it.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + datasetRid: datasets_models.DatasetRid + transactionRid: datasets_models.TransactionRid + + +@dataclass +class TransactionNotFound(errors.NotFoundError): + name: typing.Literal["TransactionNotFound"] + parameters: TransactionNotFoundParameters + error_instance_id: str + + +class TransactionNotOpenParameters(typing_extensions.TypedDict): + """The given transaction is not open.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + datasetRid: datasets_models.DatasetRid + transactionRid: datasets_models.TransactionRid + transactionStatus: datasets_models.TransactionStatus + + +@dataclass +class TransactionNotOpen(errors.BadRequestError): + name: typing.Literal["TransactionNotOpen"] + parameters: TransactionNotOpenParameters + error_instance_id: str + + +class UploadFilePermissionDeniedParameters(typing_extensions.TypedDict): + """The provided token does not have permission to upload the given file to the given dataset and transaction.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + datasetRid: datasets_models.DatasetRid + transactionRid: datasets_models.TransactionRid + path: core_models.FilePath + + +@dataclass +class UploadFilePermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["UploadFilePermissionDenied"] + parameters: UploadFilePermissionDeniedParameters + error_instance_id: str + + +class ViewDatasetCleanupFailedParameters(typing_extensions.TypedDict): + """Failed to delete dataset following View creation failure.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + viewDatasetRid: datasets_models.DatasetRid + + +@dataclass +class ViewDatasetCleanupFailed(errors.InternalServerError): + name: typing.Literal["ViewDatasetCleanupFailed"] + parameters: ViewDatasetCleanupFailedParameters + error_instance_id: str + + +class ViewNotFoundParameters(typing_extensions.TypedDict): + """ + The requested View could not be found. Either the view does not exist, the branch is not valid or the + client token does not have access to it. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + viewDatasetRid: datasets_models.DatasetRid + branch: datasets_models.BranchName + + +@dataclass +class ViewNotFound(errors.NotFoundError): + name: typing.Literal["ViewNotFound"] + parameters: ViewNotFoundParameters + error_instance_id: str + + +class ViewPrimaryKeyCannotBeModifiedParameters(typing_extensions.TypedDict): + """A primary key already exits.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class ViewPrimaryKeyCannotBeModified(errors.ConflictError): + name: typing.Literal["ViewPrimaryKeyCannotBeModified"] + parameters: ViewPrimaryKeyCannotBeModifiedParameters + error_instance_id: str + + +class ViewPrimaryKeyDeletionColumnNotInDatasetSchemaParameters(typing_extensions.TypedDict): + """The deletion column is not present in the dataset.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + deletionColumn: str + + +@dataclass +class ViewPrimaryKeyDeletionColumnNotInDatasetSchema(errors.BadRequestError): + name: typing.Literal["ViewPrimaryKeyDeletionColumnNotInDatasetSchema"] + parameters: ViewPrimaryKeyDeletionColumnNotInDatasetSchemaParameters + error_instance_id: str + + +class ViewPrimaryKeyMustContainAtLeastOneColumnParameters(typing_extensions.TypedDict): + """No columns were provided as part of the primary key""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class ViewPrimaryKeyMustContainAtLeastOneColumn(errors.BadRequestError): + name: typing.Literal["ViewPrimaryKeyMustContainAtLeastOneColumn"] + parameters: ViewPrimaryKeyMustContainAtLeastOneColumnParameters + error_instance_id: str + + +class ViewPrimaryKeyRequiresBackingDatasetsParameters(typing_extensions.TypedDict): + """Cannot add a primary key to a View that does not have any backing datasets.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class ViewPrimaryKeyRequiresBackingDatasets(errors.BadRequestError): + name: typing.Literal["ViewPrimaryKeyRequiresBackingDatasets"] + parameters: ViewPrimaryKeyRequiresBackingDatasetsParameters + error_instance_id: str + + +__all__ = [ + "AbortTransactionPermissionDenied", + "AddBackingDatasetsPermissionDenied", + "AddPrimaryKeyPermissionDenied", + "BranchAlreadyExists", + "BranchNotFound", + "BuildTransactionPermissionDenied", + "ColumnTypesNotSupported", + "CommitTransactionPermissionDenied", + "CreateBranchPermissionDenied", + "CreateDatasetPermissionDenied", + "CreateTransactionPermissionDenied", + "CreateViewPermissionDenied", + "DatasetNotFound", + "DatasetReadNotSupported", + "DatasetViewNotFound", + "DeleteBranchPermissionDenied", + "DeleteFilePermissionDenied", + "DeleteSchemaPermissionDenied", + "FileAlreadyExists", + "FileNotFound", + "FileNotFoundOnBranch", + "FileNotFoundOnTransactionRange", + "GetBranchTransactionHistoryPermissionDenied", + "GetDatasetHealthChecksPermissionDenied", + "GetDatasetJobsPermissionDenied", + "GetDatasetSchedulesPermissionDenied", + "GetDatasetSchemaPermissionDenied", + "GetFileContentPermissionDenied", + "InputBackingDatasetNotInOutputViewProject", + "InvalidBranchName", + "InvalidTransactionType", + "InvalidViewBackingDataset", + "InvalidViewPrimaryKeyColumnType", + "InvalidViewPrimaryKeyDeletionColumn", + "JobTransactionPermissionDenied", + "NotAllColumnsInPrimaryKeyArePresent", + "OpenTransactionAlreadyExists", + "PutDatasetSchemaPermissionDenied", + "PutSchemaPermissionDenied", + "ReadTableDatasetPermissionDenied", + "ReadTableError", + "ReadTableRowLimitExceeded", + "ReadTableTimeout", + "RemoveBackingDatasetsPermissionDenied", + "ReplaceBackingDatasetsPermissionDenied", + "SchemaNotFound", + "TransactionNotCommitted", + "TransactionNotFound", + "TransactionNotOpen", + "UploadFilePermissionDenied", + "ViewDatasetCleanupFailed", + "ViewNotFound", + "ViewPrimaryKeyCannotBeModified", + "ViewPrimaryKeyDeletionColumnNotInDatasetSchema", + "ViewPrimaryKeyMustContainAtLeastOneColumn", + "ViewPrimaryKeyRequiresBackingDatasets", +] diff --git a/foundry_sdk/v2/datasets/file.py b/foundry_sdk/v2/datasets/file.py new file mode 100644 index 000000000..c6e539d5d --- /dev/null +++ b/foundry_sdk/v2/datasets/file.py @@ -0,0 +1,1058 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v2.core import errors as core_errors +from foundry_sdk.v2.core import models as core_models +from foundry_sdk.v2.datasets import errors as datasets_errors +from foundry_sdk.v2.datasets import models as datasets_models + + +class FileClient: + """ + The API client for the File Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _FileClientStreaming(self) + self.with_raw_response = _FileClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def content( + self, + dataset_rid: datasets_models.DatasetRid, + file_path: core_models.FilePath, + *, + branch_name: typing.Optional[datasets_models.BranchName] = None, + end_transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, + start_transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> bytes: + """ + Gets the content of a File contained in a Dataset. By default this retrieves the file's content from the latest + view of the default branch - `master` for most enrollments. + #### Advanced Usage + See [Datasets Core Concepts](https://palantir.com/docs/foundry/data-integration/datasets/) for details on using branches and transactions. + To **get a file's content from a specific Branch** specify the Branch's name as `branchName`. This will + retrieve the content for the most recent version of the file since the latest snapshot transaction, or the + earliest ancestor transaction of the branch if there are no snapshot transactions. + To **get a file's content from the resolved view of a transaction** specify the Transaction's resource identifier + as `endTransactionRid`. This will retrieve the content for the most recent version of the file since the latest + snapshot transaction, or the earliest ancestor transaction if there are no snapshot transactions. + To **get a file's content from the resolved view of a range of transactions** specify the the start transaction's + resource identifier as `startTransactionRid` and the end transaction's resource identifier as `endTransactionRid`. + This will retrieve the content for the most recent version of the file since the `startTransactionRid` up to the + `endTransactionRid`. Note that an intermediate snapshot transaction will remove all files from the view. Behavior + is undefined when the start and end transactions do not belong to the same root-to-leaf path. + To **get a file's content from a specific transaction** specify the Transaction's resource identifier as both the + `startTransactionRid` and `endTransactionRid`. + + :param dataset_rid: + :type dataset_rid: DatasetRid + :param file_path: + :type file_path: FilePath + :param branch_name: The name of the Branch that contains the File. Defaults to `master` for most enrollments. + :type branch_name: Optional[BranchName] + :param end_transaction_rid: The Resource Identifier (RID) of the end Transaction. + :type end_transaction_rid: Optional[TransactionRid] + :param start_transaction_rid: The Resource Identifier (RID) of the start Transaction. + :type start_transaction_rid: Optional[TransactionRid] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: bytes + + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises FileNotFoundOnBranch: The requested file could not be found on the given branch, or the client token does not have access to it. + :raises FileNotFoundOnTransactionRange: The requested file could not be found on the given transaction range, or the client token does not have access to it. + :raises GetFileContentPermissionDenied: Could not content the File. + :raises InvalidBranchName: The requested branch name cannot be used. Branch names cannot be empty and must not look like RIDs or UUIDs. + :raises InvalidParameterCombination: The given parameters are individually valid but cannot be used in the given combination. + :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/datasets/{datasetRid}/files/{filePath}/content", + query_params={ + "branchName": branch_name, + "endTransactionRid": end_transaction_rid, + "startTransactionRid": start_transaction_rid, + }, + path_params={ + "datasetRid": dataset_rid, + "filePath": file_path, + }, + header_params={ + "Accept": "application/octet-stream", + }, + body=None, + response_type=bytes, + request_timeout=request_timeout, + throwable_errors={ + "BranchNotFound": datasets_errors.BranchNotFound, + "DatasetNotFound": datasets_errors.DatasetNotFound, + "FileNotFoundOnBranch": datasets_errors.FileNotFoundOnBranch, + "FileNotFoundOnTransactionRange": datasets_errors.FileNotFoundOnTransactionRange, + "GetFileContentPermissionDenied": datasets_errors.GetFileContentPermissionDenied, + "InvalidBranchName": datasets_errors.InvalidBranchName, + "InvalidParameterCombination": core_errors.InvalidParameterCombination, + "TransactionNotFound": datasets_errors.TransactionNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def delete( + self, + dataset_rid: datasets_models.DatasetRid, + file_path: core_models.FilePath, + *, + branch_name: typing.Optional[datasets_models.BranchName] = None, + transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> None: + """ + Deletes a File from a Dataset. By default the file is deleted in a new transaction on the default + branch - `master` for most enrollments. The file will still be visible on historical views. + #### Advanced Usage + See [Datasets Core Concepts](https://palantir.com/docs/foundry/data-integration/datasets/) for details on using branches and transactions. + To **delete a File from a specific Branch** specify the Branch's name as `branchName`. A new delete Transaction + will be created and committed on this branch. + To **delete a File using a manually opened Transaction**, specify the Transaction's resource identifier + as `transactionRid`. The transaction must be of type `DELETE`. This is useful for deleting multiple files in a + single transaction. See [createTransaction](https://palantir.com/docs/foundry/api/datasets-resources/transactions/create-transaction/) to + open a transaction. + + :param dataset_rid: + :type dataset_rid: DatasetRid + :param file_path: + :type file_path: FilePath + :param branch_name: The name of the Branch on which to delete the File. Defaults to `master` for most enrollments. + :type branch_name: Optional[BranchName] + :param transaction_rid: The Resource Identifier (RID) of the open delete Transaction on which to delete the File. + :type transaction_rid: Optional[TransactionRid] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: None + + :raises AbortTransactionPermissionDenied: The provided token does not have permission to abort the given transaction on the given dataset. + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises CommitTransactionPermissionDenied: The provided token does not have permission to commit the given transaction on the given dataset. + :raises CreateTransactionPermissionDenied: The provided token does not have permission to create a transaction on this dataset. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises DeleteFilePermissionDenied: Could not delete the File. + :raises FileNotFoundOnBranch: The requested file could not be found on the given branch, or the client token does not have access to it. + :raises FileNotFoundOnTransactionRange: The requested file could not be found on the given transaction range, or the client token does not have access to it. + :raises InvalidBranchName: The requested branch name cannot be used. Branch names cannot be empty and must not look like RIDs or UUIDs. + :raises InvalidParameterCombination: The given parameters are individually valid but cannot be used in the given combination. + :raises InvalidTransactionType: The given transaction type is not valid. Valid transaction types are `SNAPSHOT`, `UPDATE`, `APPEND`, and `DELETE`. + :raises OpenTransactionAlreadyExists: A transaction is already open on this dataset and branch. A branch of a dataset can only have one open transaction at a time. + :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. + :raises TransactionNotOpen: The given transaction is not open. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="DELETE", + resource_path="/v2/datasets/{datasetRid}/files/{filePath}", + query_params={ + "branchName": branch_name, + "transactionRid": transaction_rid, + }, + path_params={ + "datasetRid": dataset_rid, + "filePath": file_path, + }, + header_params={}, + body=None, + response_type=None, + request_timeout=request_timeout, + throwable_errors={ + "AbortTransactionPermissionDenied": datasets_errors.AbortTransactionPermissionDenied, + "BranchNotFound": datasets_errors.BranchNotFound, + "CommitTransactionPermissionDenied": datasets_errors.CommitTransactionPermissionDenied, + "CreateTransactionPermissionDenied": datasets_errors.CreateTransactionPermissionDenied, + "DatasetNotFound": datasets_errors.DatasetNotFound, + "DeleteFilePermissionDenied": datasets_errors.DeleteFilePermissionDenied, + "FileNotFoundOnBranch": datasets_errors.FileNotFoundOnBranch, + "FileNotFoundOnTransactionRange": datasets_errors.FileNotFoundOnTransactionRange, + "InvalidBranchName": datasets_errors.InvalidBranchName, + "InvalidParameterCombination": core_errors.InvalidParameterCombination, + "InvalidTransactionType": datasets_errors.InvalidTransactionType, + "OpenTransactionAlreadyExists": datasets_errors.OpenTransactionAlreadyExists, + "TransactionNotFound": datasets_errors.TransactionNotFound, + "TransactionNotOpen": datasets_errors.TransactionNotOpen, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + dataset_rid: datasets_models.DatasetRid, + file_path: core_models.FilePath, + *, + branch_name: typing.Optional[datasets_models.BranchName] = None, + end_transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, + start_transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> datasets_models.File: + """ + Gets metadata about a File contained in a Dataset. By default this retrieves the file's metadata from the latest + view of the default branch - `master` for most enrollments. + #### Advanced Usage + See [Datasets Core Concepts](https://palantir.com/docs/foundry/data-integration/datasets/) for details on using branches and transactions. + To **get a file's metadata from a specific Branch** specify the Branch's name as `branchName`. This will + retrieve metadata for the most recent version of the file since the latest snapshot transaction, or the earliest + ancestor transaction of the branch if there are no snapshot transactions. + To **get a file's metadata from the resolved view of a transaction** specify the Transaction's resource identifier + as `endTransactionRid`. This will retrieve metadata for the most recent version of the file since the latest snapshot + transaction, or the earliest ancestor transaction if there are no snapshot transactions. + To **get a file's metadata from the resolved view of a range of transactions** specify the the start transaction's + resource identifier as `startTransactionRid` and the end transaction's resource identifier as `endTransactionRid`. + This will retrieve metadata for the most recent version of the file since the `startTransactionRid` up to the + `endTransactionRid`. Behavior is undefined when the start and end transactions do not belong to the same root-to-leaf path. + To **get a file's metadata from a specific transaction** specify the Transaction's resource identifier as both the + `startTransactionRid` and `endTransactionRid`. + + :param dataset_rid: + :type dataset_rid: DatasetRid + :param file_path: + :type file_path: FilePath + :param branch_name: The name of the Branch that contains the File. Defaults to `master` for most enrollments. + :type branch_name: Optional[BranchName] + :param end_transaction_rid: The Resource Identifier (RID) of the end Transaction. + :type end_transaction_rid: Optional[TransactionRid] + :param start_transaction_rid: The Resource Identifier (RID) of the start Transaction. + :type start_transaction_rid: Optional[TransactionRid] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: datasets_models.File + + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises FileNotFound: The given File could not be found. + :raises FileNotFoundOnBranch: The requested file could not be found on the given branch, or the client token does not have access to it. + :raises FileNotFoundOnTransactionRange: The requested file could not be found on the given transaction range, or the client token does not have access to it. + :raises InvalidBranchName: The requested branch name cannot be used. Branch names cannot be empty and must not look like RIDs or UUIDs. + :raises InvalidParameterCombination: The given parameters are individually valid but cannot be used in the given combination. + :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/datasets/{datasetRid}/files/{filePath}", + query_params={ + "branchName": branch_name, + "endTransactionRid": end_transaction_rid, + "startTransactionRid": start_transaction_rid, + }, + path_params={ + "datasetRid": dataset_rid, + "filePath": file_path, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=datasets_models.File, + request_timeout=request_timeout, + throwable_errors={ + "BranchNotFound": datasets_errors.BranchNotFound, + "DatasetNotFound": datasets_errors.DatasetNotFound, + "FileNotFound": datasets_errors.FileNotFound, + "FileNotFoundOnBranch": datasets_errors.FileNotFoundOnBranch, + "FileNotFoundOnTransactionRange": datasets_errors.FileNotFoundOnTransactionRange, + "InvalidBranchName": datasets_errors.InvalidBranchName, + "InvalidParameterCombination": core_errors.InvalidParameterCombination, + "TransactionNotFound": datasets_errors.TransactionNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def list( + self, + dataset_rid: datasets_models.DatasetRid, + *, + branch_name: typing.Optional[datasets_models.BranchName] = None, + end_transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + start_transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.ResourceIterator[datasets_models.File]: + """ + Lists Files contained in a Dataset. By default files are listed on the latest view of the default + branch - `master` for most enrollments. + #### Advanced Usage + See [Datasets Core Concepts](https://palantir.com/docs/foundry/data-integration/datasets/) for details on using branches and transactions. + To **list files on a specific Branch** specify the Branch's name as `branchName`. This will include the most + recent version of all files since the latest snapshot transaction, or the earliest ancestor transaction of the + branch if there are no snapshot transactions. + To **list files on the resolved view of a transaction** specify the Transaction's resource identifier + as `endTransactionRid`. This will include the most recent version of all files since the latest snapshot + transaction, or the earliest ancestor transaction if there are no snapshot transactions. + To **list files on the resolved view of a range of transactions** specify the the start transaction's resource + identifier as `startTransactionRid` and the end transaction's resource identifier as `endTransactionRid`. This + will include the most recent version of all files since the `startTransactionRid` up to the `endTransactionRid`. + Note that an intermediate snapshot transaction will remove all files from the view. Behavior is undefined when + the start and end transactions do not belong to the same root-to-leaf path. + To **list files on a specific transaction** specify the Transaction's resource identifier as both the + `startTransactionRid` and `endTransactionRid`. This will include only files that were modified as part of that + Transaction. + + :param dataset_rid: + :type dataset_rid: DatasetRid + :param branch_name: The name of the Branch on which to list Files. Defaults to `master` for most enrollments. + :type branch_name: Optional[BranchName] + :param end_transaction_rid: The Resource Identifier (RID) of the end Transaction. + :type end_transaction_rid: Optional[TransactionRid] + :param page_size: The page size to use for the endpoint. + :type page_size: Optional[PageSize] + :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. + :type page_token: Optional[PageToken] + :param start_transaction_rid: The Resource Identifier (RID) of the start Transaction. + :type start_transaction_rid: Optional[TransactionRid] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.ResourceIterator[datasets_models.File] + + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises InvalidBranchName: The requested branch name cannot be used. Branch names cannot be empty and must not look like RIDs or UUIDs. + :raises InvalidPageSize: The provided page size was zero or negative. Page sizes must be greater than zero. + :raises InvalidParameterCombination: The given parameters are individually valid but cannot be used in the given combination. + :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/datasets/{datasetRid}/files", + query_params={ + "branchName": branch_name, + "endTransactionRid": end_transaction_rid, + "pageSize": page_size, + "pageToken": page_token, + "startTransactionRid": start_transaction_rid, + }, + path_params={ + "datasetRid": dataset_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=datasets_models.ListFilesResponse, + request_timeout=request_timeout, + throwable_errors={ + "BranchNotFound": datasets_errors.BranchNotFound, + "DatasetNotFound": datasets_errors.DatasetNotFound, + "InvalidBranchName": datasets_errors.InvalidBranchName, + "InvalidPageSize": core_errors.InvalidPageSize, + "InvalidParameterCombination": core_errors.InvalidParameterCombination, + "TransactionNotFound": datasets_errors.TransactionNotFound, + }, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def upload( + self, + dataset_rid: datasets_models.DatasetRid, + file_path: core_models.FilePath, + body: bytes, + *, + branch_name: typing.Optional[datasets_models.BranchName] = None, + transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, + transaction_type: typing.Optional[datasets_models.TransactionType] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> datasets_models.File: + """ + Uploads a File to an existing Dataset. + The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`. + By default the file is uploaded to a new transaction on the default branch - `master` for most enrollments. + If the file already exists only the most recent version will be visible in the updated view. + #### Advanced Usage + See [Datasets Core Concepts](https://palantir.com/docs/foundry/data-integration/datasets/) for details on using branches and transactions. + To **upload a file to a specific Branch** specify the Branch's name as `branchName`. A new transaction will + be created and committed on this branch. By default the TransactionType will be `UPDATE`, to override this + default specify `transactionType` in addition to `branchName`. + See [createBranch](https://palantir.com/docs/foundry/api/datasets-resources/branches/create-branch/) to create a custom branch. + To **upload a file on a manually opened transaction** specify the Transaction's resource identifier as + `transactionRid`. This is useful for uploading multiple files in a single transaction. + See [createTransaction](https://palantir.com/docs/foundry/api/datasets-resources/transactions/create-transaction/) to open a transaction. + + :param dataset_rid: + :type dataset_rid: DatasetRid + :param file_path: + :type file_path: FilePath + :param body: Body of the request + :type body: bytes + :param branch_name: The name of the Branch on which to upload the File. Defaults to `master` for most enrollments. + :type branch_name: Optional[BranchName] + :param transaction_rid: The Resource Identifier (RID) of the open Transaction on which to upload the File. + :type transaction_rid: Optional[TransactionRid] + :param transaction_type: The type of the Transaction to create when using branchName. Defaults to `UPDATE`. + :type transaction_type: Optional[TransactionType] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: datasets_models.File + + :raises AbortTransactionPermissionDenied: The provided token does not have permission to abort the given transaction on the given dataset. + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises CommitTransactionPermissionDenied: The provided token does not have permission to commit the given transaction on the given dataset. + :raises CreateTransactionPermissionDenied: The provided token does not have permission to create a transaction on this dataset. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises FileAlreadyExists: The given file path already exists in the dataset and transaction. + :raises InvalidBranchName: The requested branch name cannot be used. Branch names cannot be empty and must not look like RIDs or UUIDs. + :raises InvalidFilePath: The provided file path is invalid. + :raises InvalidParameterCombination: The given parameters are individually valid but cannot be used in the given combination. + :raises OpenTransactionAlreadyExists: A transaction is already open on this dataset and branch. A branch of a dataset can only have one open transaction at a time. + :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. + :raises TransactionNotOpen: The given transaction is not open. + :raises UploadFilePermissionDenied: The provided token does not have permission to upload the given file to the given dataset and transaction. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/datasets/{datasetRid}/files/{filePath}/upload", + query_params={ + "branchName": branch_name, + "transactionRid": transaction_rid, + "transactionType": transaction_type, + }, + path_params={ + "datasetRid": dataset_rid, + "filePath": file_path, + }, + header_params={ + "Content-Type": "application/octet-stream", + "Accept": "application/json", + }, + body=body, + response_type=datasets_models.File, + request_timeout=request_timeout, + throwable_errors={ + "AbortTransactionPermissionDenied": datasets_errors.AbortTransactionPermissionDenied, + "BranchNotFound": datasets_errors.BranchNotFound, + "CommitTransactionPermissionDenied": datasets_errors.CommitTransactionPermissionDenied, + "CreateTransactionPermissionDenied": datasets_errors.CreateTransactionPermissionDenied, + "DatasetNotFound": datasets_errors.DatasetNotFound, + "FileAlreadyExists": datasets_errors.FileAlreadyExists, + "InvalidBranchName": datasets_errors.InvalidBranchName, + "InvalidFilePath": core_errors.InvalidFilePath, + "InvalidParameterCombination": core_errors.InvalidParameterCombination, + "OpenTransactionAlreadyExists": datasets_errors.OpenTransactionAlreadyExists, + "TransactionNotFound": datasets_errors.TransactionNotFound, + "TransactionNotOpen": datasets_errors.TransactionNotOpen, + "UploadFilePermissionDenied": datasets_errors.UploadFilePermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _FileClientRaw: + def __init__(self, client: FileClient) -> None: + def content(_: bytes): ... + def delete(_: None): ... + def get(_: datasets_models.File): ... + def list(_: datasets_models.ListFilesResponse): ... + def upload(_: datasets_models.File): ... + + self.content = core.with_raw_response(content, client.content) + self.delete = core.with_raw_response(delete, client.delete) + self.get = core.with_raw_response(get, client.get) + self.list = core.with_raw_response(list, client.list) + self.upload = core.with_raw_response(upload, client.upload) + + +class _FileClientStreaming: + def __init__(self, client: FileClient) -> None: + def content(_: bytes): ... + def get(_: datasets_models.File): ... + def list(_: datasets_models.ListFilesResponse): ... + def upload(_: datasets_models.File): ... + + self.content = core.with_streaming_response(content, client.content) + self.get = core.with_streaming_response(get, client.get) + self.list = core.with_streaming_response(list, client.list) + self.upload = core.with_streaming_response(upload, client.upload) + + +class AsyncFileClient: + """ + The API client for the File Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncFileClientStreaming(self) + self.with_raw_response = _AsyncFileClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def content( + self, + dataset_rid: datasets_models.DatasetRid, + file_path: core_models.FilePath, + *, + branch_name: typing.Optional[datasets_models.BranchName] = None, + end_transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, + start_transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[bytes]: + """ + Gets the content of a File contained in a Dataset. By default this retrieves the file's content from the latest + view of the default branch - `master` for most enrollments. + #### Advanced Usage + See [Datasets Core Concepts](https://palantir.com/docs/foundry/data-integration/datasets/) for details on using branches and transactions. + To **get a file's content from a specific Branch** specify the Branch's name as `branchName`. This will + retrieve the content for the most recent version of the file since the latest snapshot transaction, or the + earliest ancestor transaction of the branch if there are no snapshot transactions. + To **get a file's content from the resolved view of a transaction** specify the Transaction's resource identifier + as `endTransactionRid`. This will retrieve the content for the most recent version of the file since the latest + snapshot transaction, or the earliest ancestor transaction if there are no snapshot transactions. + To **get a file's content from the resolved view of a range of transactions** specify the the start transaction's + resource identifier as `startTransactionRid` and the end transaction's resource identifier as `endTransactionRid`. + This will retrieve the content for the most recent version of the file since the `startTransactionRid` up to the + `endTransactionRid`. Note that an intermediate snapshot transaction will remove all files from the view. Behavior + is undefined when the start and end transactions do not belong to the same root-to-leaf path. + To **get a file's content from a specific transaction** specify the Transaction's resource identifier as both the + `startTransactionRid` and `endTransactionRid`. + + :param dataset_rid: + :type dataset_rid: DatasetRid + :param file_path: + :type file_path: FilePath + :param branch_name: The name of the Branch that contains the File. Defaults to `master` for most enrollments. + :type branch_name: Optional[BranchName] + :param end_transaction_rid: The Resource Identifier (RID) of the end Transaction. + :type end_transaction_rid: Optional[TransactionRid] + :param start_transaction_rid: The Resource Identifier (RID) of the start Transaction. + :type start_transaction_rid: Optional[TransactionRid] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[bytes] + + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises FileNotFoundOnBranch: The requested file could not be found on the given branch, or the client token does not have access to it. + :raises FileNotFoundOnTransactionRange: The requested file could not be found on the given transaction range, or the client token does not have access to it. + :raises GetFileContentPermissionDenied: Could not content the File. + :raises InvalidBranchName: The requested branch name cannot be used. Branch names cannot be empty and must not look like RIDs or UUIDs. + :raises InvalidParameterCombination: The given parameters are individually valid but cannot be used in the given combination. + :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/datasets/{datasetRid}/files/{filePath}/content", + query_params={ + "branchName": branch_name, + "endTransactionRid": end_transaction_rid, + "startTransactionRid": start_transaction_rid, + }, + path_params={ + "datasetRid": dataset_rid, + "filePath": file_path, + }, + header_params={ + "Accept": "application/octet-stream", + }, + body=None, + response_type=bytes, + request_timeout=request_timeout, + throwable_errors={ + "BranchNotFound": datasets_errors.BranchNotFound, + "DatasetNotFound": datasets_errors.DatasetNotFound, + "FileNotFoundOnBranch": datasets_errors.FileNotFoundOnBranch, + "FileNotFoundOnTransactionRange": datasets_errors.FileNotFoundOnTransactionRange, + "GetFileContentPermissionDenied": datasets_errors.GetFileContentPermissionDenied, + "InvalidBranchName": datasets_errors.InvalidBranchName, + "InvalidParameterCombination": core_errors.InvalidParameterCombination, + "TransactionNotFound": datasets_errors.TransactionNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def delete( + self, + dataset_rid: datasets_models.DatasetRid, + file_path: core_models.FilePath, + *, + branch_name: typing.Optional[datasets_models.BranchName] = None, + transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[None]: + """ + Deletes a File from a Dataset. By default the file is deleted in a new transaction on the default + branch - `master` for most enrollments. The file will still be visible on historical views. + #### Advanced Usage + See [Datasets Core Concepts](https://palantir.com/docs/foundry/data-integration/datasets/) for details on using branches and transactions. + To **delete a File from a specific Branch** specify the Branch's name as `branchName`. A new delete Transaction + will be created and committed on this branch. + To **delete a File using a manually opened Transaction**, specify the Transaction's resource identifier + as `transactionRid`. The transaction must be of type `DELETE`. This is useful for deleting multiple files in a + single transaction. See [createTransaction](https://palantir.com/docs/foundry/api/datasets-resources/transactions/create-transaction/) to + open a transaction. + + :param dataset_rid: + :type dataset_rid: DatasetRid + :param file_path: + :type file_path: FilePath + :param branch_name: The name of the Branch on which to delete the File. Defaults to `master` for most enrollments. + :type branch_name: Optional[BranchName] + :param transaction_rid: The Resource Identifier (RID) of the open delete Transaction on which to delete the File. + :type transaction_rid: Optional[TransactionRid] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[None] + + :raises AbortTransactionPermissionDenied: The provided token does not have permission to abort the given transaction on the given dataset. + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises CommitTransactionPermissionDenied: The provided token does not have permission to commit the given transaction on the given dataset. + :raises CreateTransactionPermissionDenied: The provided token does not have permission to create a transaction on this dataset. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises DeleteFilePermissionDenied: Could not delete the File. + :raises FileNotFoundOnBranch: The requested file could not be found on the given branch, or the client token does not have access to it. + :raises FileNotFoundOnTransactionRange: The requested file could not be found on the given transaction range, or the client token does not have access to it. + :raises InvalidBranchName: The requested branch name cannot be used. Branch names cannot be empty and must not look like RIDs or UUIDs. + :raises InvalidParameterCombination: The given parameters are individually valid but cannot be used in the given combination. + :raises InvalidTransactionType: The given transaction type is not valid. Valid transaction types are `SNAPSHOT`, `UPDATE`, `APPEND`, and `DELETE`. + :raises OpenTransactionAlreadyExists: A transaction is already open on this dataset and branch. A branch of a dataset can only have one open transaction at a time. + :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. + :raises TransactionNotOpen: The given transaction is not open. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="DELETE", + resource_path="/v2/datasets/{datasetRid}/files/{filePath}", + query_params={ + "branchName": branch_name, + "transactionRid": transaction_rid, + }, + path_params={ + "datasetRid": dataset_rid, + "filePath": file_path, + }, + header_params={}, + body=None, + response_type=None, + request_timeout=request_timeout, + throwable_errors={ + "AbortTransactionPermissionDenied": datasets_errors.AbortTransactionPermissionDenied, + "BranchNotFound": datasets_errors.BranchNotFound, + "CommitTransactionPermissionDenied": datasets_errors.CommitTransactionPermissionDenied, + "CreateTransactionPermissionDenied": datasets_errors.CreateTransactionPermissionDenied, + "DatasetNotFound": datasets_errors.DatasetNotFound, + "DeleteFilePermissionDenied": datasets_errors.DeleteFilePermissionDenied, + "FileNotFoundOnBranch": datasets_errors.FileNotFoundOnBranch, + "FileNotFoundOnTransactionRange": datasets_errors.FileNotFoundOnTransactionRange, + "InvalidBranchName": datasets_errors.InvalidBranchName, + "InvalidParameterCombination": core_errors.InvalidParameterCombination, + "InvalidTransactionType": datasets_errors.InvalidTransactionType, + "OpenTransactionAlreadyExists": datasets_errors.OpenTransactionAlreadyExists, + "TransactionNotFound": datasets_errors.TransactionNotFound, + "TransactionNotOpen": datasets_errors.TransactionNotOpen, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + dataset_rid: datasets_models.DatasetRid, + file_path: core_models.FilePath, + *, + branch_name: typing.Optional[datasets_models.BranchName] = None, + end_transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, + start_transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[datasets_models.File]: + """ + Gets metadata about a File contained in a Dataset. By default this retrieves the file's metadata from the latest + view of the default branch - `master` for most enrollments. + #### Advanced Usage + See [Datasets Core Concepts](https://palantir.com/docs/foundry/data-integration/datasets/) for details on using branches and transactions. + To **get a file's metadata from a specific Branch** specify the Branch's name as `branchName`. This will + retrieve metadata for the most recent version of the file since the latest snapshot transaction, or the earliest + ancestor transaction of the branch if there are no snapshot transactions. + To **get a file's metadata from the resolved view of a transaction** specify the Transaction's resource identifier + as `endTransactionRid`. This will retrieve metadata for the most recent version of the file since the latest snapshot + transaction, or the earliest ancestor transaction if there are no snapshot transactions. + To **get a file's metadata from the resolved view of a range of transactions** specify the the start transaction's + resource identifier as `startTransactionRid` and the end transaction's resource identifier as `endTransactionRid`. + This will retrieve metadata for the most recent version of the file since the `startTransactionRid` up to the + `endTransactionRid`. Behavior is undefined when the start and end transactions do not belong to the same root-to-leaf path. + To **get a file's metadata from a specific transaction** specify the Transaction's resource identifier as both the + `startTransactionRid` and `endTransactionRid`. + + :param dataset_rid: + :type dataset_rid: DatasetRid + :param file_path: + :type file_path: FilePath + :param branch_name: The name of the Branch that contains the File. Defaults to `master` for most enrollments. + :type branch_name: Optional[BranchName] + :param end_transaction_rid: The Resource Identifier (RID) of the end Transaction. + :type end_transaction_rid: Optional[TransactionRid] + :param start_transaction_rid: The Resource Identifier (RID) of the start Transaction. + :type start_transaction_rid: Optional[TransactionRid] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[datasets_models.File] + + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises FileNotFound: The given File could not be found. + :raises FileNotFoundOnBranch: The requested file could not be found on the given branch, or the client token does not have access to it. + :raises FileNotFoundOnTransactionRange: The requested file could not be found on the given transaction range, or the client token does not have access to it. + :raises InvalidBranchName: The requested branch name cannot be used. Branch names cannot be empty and must not look like RIDs or UUIDs. + :raises InvalidParameterCombination: The given parameters are individually valid but cannot be used in the given combination. + :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/datasets/{datasetRid}/files/{filePath}", + query_params={ + "branchName": branch_name, + "endTransactionRid": end_transaction_rid, + "startTransactionRid": start_transaction_rid, + }, + path_params={ + "datasetRid": dataset_rid, + "filePath": file_path, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=datasets_models.File, + request_timeout=request_timeout, + throwable_errors={ + "BranchNotFound": datasets_errors.BranchNotFound, + "DatasetNotFound": datasets_errors.DatasetNotFound, + "FileNotFound": datasets_errors.FileNotFound, + "FileNotFoundOnBranch": datasets_errors.FileNotFoundOnBranch, + "FileNotFoundOnTransactionRange": datasets_errors.FileNotFoundOnTransactionRange, + "InvalidBranchName": datasets_errors.InvalidBranchName, + "InvalidParameterCombination": core_errors.InvalidParameterCombination, + "TransactionNotFound": datasets_errors.TransactionNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def list( + self, + dataset_rid: datasets_models.DatasetRid, + *, + branch_name: typing.Optional[datasets_models.BranchName] = None, + end_transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + start_transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.AsyncResourceIterator[datasets_models.File]: + """ + Lists Files contained in a Dataset. By default files are listed on the latest view of the default + branch - `master` for most enrollments. + #### Advanced Usage + See [Datasets Core Concepts](https://palantir.com/docs/foundry/data-integration/datasets/) for details on using branches and transactions. + To **list files on a specific Branch** specify the Branch's name as `branchName`. This will include the most + recent version of all files since the latest snapshot transaction, or the earliest ancestor transaction of the + branch if there are no snapshot transactions. + To **list files on the resolved view of a transaction** specify the Transaction's resource identifier + as `endTransactionRid`. This will include the most recent version of all files since the latest snapshot + transaction, or the earliest ancestor transaction if there are no snapshot transactions. + To **list files on the resolved view of a range of transactions** specify the the start transaction's resource + identifier as `startTransactionRid` and the end transaction's resource identifier as `endTransactionRid`. This + will include the most recent version of all files since the `startTransactionRid` up to the `endTransactionRid`. + Note that an intermediate snapshot transaction will remove all files from the view. Behavior is undefined when + the start and end transactions do not belong to the same root-to-leaf path. + To **list files on a specific transaction** specify the Transaction's resource identifier as both the + `startTransactionRid` and `endTransactionRid`. This will include only files that were modified as part of that + Transaction. + + :param dataset_rid: + :type dataset_rid: DatasetRid + :param branch_name: The name of the Branch on which to list Files. Defaults to `master` for most enrollments. + :type branch_name: Optional[BranchName] + :param end_transaction_rid: The Resource Identifier (RID) of the end Transaction. + :type end_transaction_rid: Optional[TransactionRid] + :param page_size: The page size to use for the endpoint. + :type page_size: Optional[PageSize] + :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. + :type page_token: Optional[PageToken] + :param start_transaction_rid: The Resource Identifier (RID) of the start Transaction. + :type start_transaction_rid: Optional[TransactionRid] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.AsyncResourceIterator[datasets_models.File] + + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises InvalidBranchName: The requested branch name cannot be used. Branch names cannot be empty and must not look like RIDs or UUIDs. + :raises InvalidPageSize: The provided page size was zero or negative. Page sizes must be greater than zero. + :raises InvalidParameterCombination: The given parameters are individually valid but cannot be used in the given combination. + :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/datasets/{datasetRid}/files", + query_params={ + "branchName": branch_name, + "endTransactionRid": end_transaction_rid, + "pageSize": page_size, + "pageToken": page_token, + "startTransactionRid": start_transaction_rid, + }, + path_params={ + "datasetRid": dataset_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=datasets_models.ListFilesResponse, + request_timeout=request_timeout, + throwable_errors={ + "BranchNotFound": datasets_errors.BranchNotFound, + "DatasetNotFound": datasets_errors.DatasetNotFound, + "InvalidBranchName": datasets_errors.InvalidBranchName, + "InvalidPageSize": core_errors.InvalidPageSize, + "InvalidParameterCombination": core_errors.InvalidParameterCombination, + "TransactionNotFound": datasets_errors.TransactionNotFound, + }, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def upload( + self, + dataset_rid: datasets_models.DatasetRid, + file_path: core_models.FilePath, + body: bytes, + *, + branch_name: typing.Optional[datasets_models.BranchName] = None, + transaction_rid: typing.Optional[datasets_models.TransactionRid] = None, + transaction_type: typing.Optional[datasets_models.TransactionType] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[datasets_models.File]: + """ + Uploads a File to an existing Dataset. + The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`. + By default the file is uploaded to a new transaction on the default branch - `master` for most enrollments. + If the file already exists only the most recent version will be visible in the updated view. + #### Advanced Usage + See [Datasets Core Concepts](https://palantir.com/docs/foundry/data-integration/datasets/) for details on using branches and transactions. + To **upload a file to a specific Branch** specify the Branch's name as `branchName`. A new transaction will + be created and committed on this branch. By default the TransactionType will be `UPDATE`, to override this + default specify `transactionType` in addition to `branchName`. + See [createBranch](https://palantir.com/docs/foundry/api/datasets-resources/branches/create-branch/) to create a custom branch. + To **upload a file on a manually opened transaction** specify the Transaction's resource identifier as + `transactionRid`. This is useful for uploading multiple files in a single transaction. + See [createTransaction](https://palantir.com/docs/foundry/api/datasets-resources/transactions/create-transaction/) to open a transaction. + + :param dataset_rid: + :type dataset_rid: DatasetRid + :param file_path: + :type file_path: FilePath + :param body: Body of the request + :type body: bytes + :param branch_name: The name of the Branch on which to upload the File. Defaults to `master` for most enrollments. + :type branch_name: Optional[BranchName] + :param transaction_rid: The Resource Identifier (RID) of the open Transaction on which to upload the File. + :type transaction_rid: Optional[TransactionRid] + :param transaction_type: The type of the Transaction to create when using branchName. Defaults to `UPDATE`. + :type transaction_type: Optional[TransactionType] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[datasets_models.File] + + :raises AbortTransactionPermissionDenied: The provided token does not have permission to abort the given transaction on the given dataset. + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises CommitTransactionPermissionDenied: The provided token does not have permission to commit the given transaction on the given dataset. + :raises CreateTransactionPermissionDenied: The provided token does not have permission to create a transaction on this dataset. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises FileAlreadyExists: The given file path already exists in the dataset and transaction. + :raises InvalidBranchName: The requested branch name cannot be used. Branch names cannot be empty and must not look like RIDs or UUIDs. + :raises InvalidFilePath: The provided file path is invalid. + :raises InvalidParameterCombination: The given parameters are individually valid but cannot be used in the given combination. + :raises OpenTransactionAlreadyExists: A transaction is already open on this dataset and branch. A branch of a dataset can only have one open transaction at a time. + :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. + :raises TransactionNotOpen: The given transaction is not open. + :raises UploadFilePermissionDenied: The provided token does not have permission to upload the given file to the given dataset and transaction. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/datasets/{datasetRid}/files/{filePath}/upload", + query_params={ + "branchName": branch_name, + "transactionRid": transaction_rid, + "transactionType": transaction_type, + }, + path_params={ + "datasetRid": dataset_rid, + "filePath": file_path, + }, + header_params={ + "Content-Type": "application/octet-stream", + "Accept": "application/json", + }, + body=body, + response_type=datasets_models.File, + request_timeout=request_timeout, + throwable_errors={ + "AbortTransactionPermissionDenied": datasets_errors.AbortTransactionPermissionDenied, + "BranchNotFound": datasets_errors.BranchNotFound, + "CommitTransactionPermissionDenied": datasets_errors.CommitTransactionPermissionDenied, + "CreateTransactionPermissionDenied": datasets_errors.CreateTransactionPermissionDenied, + "DatasetNotFound": datasets_errors.DatasetNotFound, + "FileAlreadyExists": datasets_errors.FileAlreadyExists, + "InvalidBranchName": datasets_errors.InvalidBranchName, + "InvalidFilePath": core_errors.InvalidFilePath, + "InvalidParameterCombination": core_errors.InvalidParameterCombination, + "OpenTransactionAlreadyExists": datasets_errors.OpenTransactionAlreadyExists, + "TransactionNotFound": datasets_errors.TransactionNotFound, + "TransactionNotOpen": datasets_errors.TransactionNotOpen, + "UploadFilePermissionDenied": datasets_errors.UploadFilePermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _AsyncFileClientRaw: + def __init__(self, client: AsyncFileClient) -> None: + def content(_: bytes): ... + def delete(_: None): ... + def get(_: datasets_models.File): ... + def list(_: datasets_models.ListFilesResponse): ... + def upload(_: datasets_models.File): ... + + self.content = core.async_with_raw_response(content, client.content) + self.delete = core.async_with_raw_response(delete, client.delete) + self.get = core.async_with_raw_response(get, client.get) + self.list = core.async_with_raw_response(list, client.list) + self.upload = core.async_with_raw_response(upload, client.upload) + + +class _AsyncFileClientStreaming: + def __init__(self, client: AsyncFileClient) -> None: + def content(_: bytes): ... + def get(_: datasets_models.File): ... + def list(_: datasets_models.ListFilesResponse): ... + def upload(_: datasets_models.File): ... + + self.content = core.async_with_streaming_response(content, client.content) + self.get = core.async_with_streaming_response(get, client.get) + self.list = core.async_with_streaming_response(list, client.list) + self.upload = core.async_with_streaming_response(upload, client.upload) diff --git a/foundry_sdk/v2/datasets/models.py b/foundry_sdk/v2/datasets/models.py new file mode 100644 index 000000000..b16747c73 --- /dev/null +++ b/foundry_sdk/v2/datasets/models.py @@ -0,0 +1,466 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk.v2.core import models as core_models +from foundry_sdk.v2.filesystem import models as filesystem_models + + +class AddBackingDatasetsRequest(core.ModelBase): + """AddBackingDatasetsRequest""" + + branch: typing.Optional[BranchName] = None + backing_datasets: typing.List[ViewBackingDataset] = pydantic.Field(alias=str("backingDatasets")) # type: ignore[literal-required] + + +class AddPrimaryKeyRequest(core.ModelBase): + """AddPrimaryKeyRequest""" + + branch: typing.Optional[BranchName] = None + primary_key: ViewPrimaryKey = pydantic.Field(alias=str("primaryKey")) # type: ignore[literal-required] + + +class Branch(core.ModelBase): + """Branch""" + + name: BranchName + transaction_rid: typing.Optional[TransactionRid] = pydantic.Field(alias=str("transactionRid"), default=None) # type: ignore[literal-required] + """The most recent OPEN or COMMITTED transaction on the branch. This will never be an ABORTED transaction.""" + + +BranchName = str +"""The name of a Branch.""" + + +class CreateBranchRequest(core.ModelBase): + """CreateBranchRequest""" + + transaction_rid: typing.Optional[TransactionRid] = pydantic.Field(alias=str("transactionRid"), default=None) # type: ignore[literal-required] + """The most recent OPEN or COMMITTED transaction on the branch. This will never be an ABORTED transaction.""" + + name: BranchName + + +class CreateDatasetRequest(core.ModelBase): + """CreateDatasetRequest""" + + parent_folder_rid: filesystem_models.FolderRid = pydantic.Field(alias=str("parentFolderRid")) # type: ignore[literal-required] + name: DatasetName + + +class CreateTransactionRequest(core.ModelBase): + """CreateTransactionRequest""" + + transaction_type: TransactionType = pydantic.Field(alias=str("transactionType")) # type: ignore[literal-required] + + +class CreateViewRequest(core.ModelBase): + """CreateViewRequest""" + + parent_folder_rid: filesystem_models.FolderRid = pydantic.Field(alias=str("parentFolderRid")) # type: ignore[literal-required] + view_name: DatasetName = pydantic.Field(alias=str("viewName")) # type: ignore[literal-required] + backing_datasets: typing.List[ViewBackingDataset] = pydantic.Field(alias=str("backingDatasets")) # type: ignore[literal-required] + branch: typing.Optional[BranchName] = None + """The branch name of the View. If not specified, defaults to `master` for most enrollments.""" + + primary_key: typing.Optional[ViewPrimaryKey] = pydantic.Field(alias=str("primaryKey"), default=None) # type: ignore[literal-required] + + +DataframeReader = typing.Literal["AVRO", "CSV", "PARQUET", "DATASOURCE"] +"""The dataframe reader used for reading the dataset schema.""" + + +class Dataset(core.ModelBase): + """Dataset""" + + rid: DatasetRid + name: DatasetName + parent_folder_rid: filesystem_models.FolderRid = pydantic.Field(alias=str("parentFolderRid")) # type: ignore[literal-required] + + +DatasetName = str +"""DatasetName""" + + +DatasetRid = core.RID +"""The Resource Identifier (RID) of a Dataset.""" + + +class File(core.ModelBase): + """File""" + + path: core_models.FilePath + transaction_rid: TransactionRid = pydantic.Field(alias=str("transactionRid")) # type: ignore[literal-required] + size_bytes: typing.Optional[core.Long] = pydantic.Field(alias=str("sizeBytes"), default=None) # type: ignore[literal-required] + updated_time: FileUpdatedTime = pydantic.Field(alias=str("updatedTime")) # type: ignore[literal-required] + + +FileUpdatedTime = core.AwareDatetime +"""FileUpdatedTime""" + + +class GetDatasetJobsAndFilter(core.ModelBase): + """GetDatasetJobsAndFilter""" + + items: typing.List[GetDatasetJobsQuery] + type: typing.Literal["and"] = "and" + + +GetDatasetJobsComparisonType = typing.Literal["GTE", "LT"] +"""GetDatasetJobsComparisonType""" + + +class GetDatasetJobsOrFilter(core.ModelBase): + """GetDatasetJobsOrFilter""" + + items: typing.List[GetDatasetJobsQuery] + type: typing.Literal["or"] = "or" + + +GetDatasetJobsQuery = typing_extensions.Annotated[ + typing.Union["GetDatasetJobsOrFilter", "GetDatasetJobsAndFilter", "GetDatasetJobsTimeFilter"], + pydantic.Field(discriminator="type"), +] +"""Query for getting jobs on given dataset.""" + + +class GetDatasetJobsRequest(core.ModelBase): + """GetDatasetJobsRequest""" + + where: typing.Optional[GetDatasetJobsQuery] = None + order_by: typing.List[GetDatasetJobsSort] = pydantic.Field(alias=str("orderBy")) # type: ignore[literal-required] + + +class GetDatasetJobsSort(core.ModelBase): + """GetDatasetJobsSort""" + + sort_type: GetDatasetJobsSortType = pydantic.Field(alias=str("sortType")) # type: ignore[literal-required] + sort_direction: GetDatasetJobsSortDirection = pydantic.Field(alias=str("sortDirection")) # type: ignore[literal-required] + + +GetDatasetJobsSortDirection = typing.Literal["ASCENDING", "DESCENDING"] +"""GetDatasetJobsSortDirection""" + + +GetDatasetJobsSortType = typing.Literal["BY_STARTED_TIME", "BY_FINISHED_TIME"] +"""GetDatasetJobsSortType""" + + +class GetDatasetJobsTimeFilter(core.ModelBase): + """GetDatasetJobsTimeFilter""" + + field: GetDatasetJobsTimeFilterField + comparison_type: GetDatasetJobsComparisonType = pydantic.Field(alias=str("comparisonType")) # type: ignore[literal-required] + value: core.AwareDatetime + type: typing.Literal["timeFilter"] = "timeFilter" + + +GetDatasetJobsTimeFilterField = typing.Literal["SUBMITTED_TIME", "FINISHED_TIME"] +"""GetDatasetJobsTimeFilterField""" + + +class GetDatasetSchemaResponse(core.ModelBase): + """GetDatasetSchemaResponse""" + + branch_name: BranchName = pydantic.Field(alias=str("branchName")) # type: ignore[literal-required] + end_transaction_rid: TransactionRid = pydantic.Field(alias=str("endTransactionRid")) # type: ignore[literal-required] + schema_: core_models.DatasetSchema = pydantic.Field(alias=str("schema")) # type: ignore[literal-required] + version_id: core_models.VersionId = pydantic.Field(alias=str("versionId")) # type: ignore[literal-required] + + +class GetJobResponse(core.ModelBase): + """GetJobResponse""" + + data: typing.List[JobDetails] + next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] + + +class GetSchemaDatasetsBatchRequestElement(core.ModelBase): + """GetSchemaDatasetsBatchRequestElement""" + + end_transaction_rid: typing.Optional[TransactionRid] = pydantic.Field(alias=str("endTransactionRid"), default=None) # type: ignore[literal-required] + """The Resource Identifier (RID) of the end Transaction. If a user does not provide a value, the RID of the latest committed transaction will be used.""" + + dataset_rid: DatasetRid = pydantic.Field(alias=str("datasetRid")) # type: ignore[literal-required] + version_id: typing.Optional[core_models.VersionId] = pydantic.Field(alias=str("versionId"), default=None) # type: ignore[literal-required] + """The schema version that should be used. If none is provided, the latest version will be used.""" + + branch_name: typing.Optional[BranchName] = pydantic.Field(alias=str("branchName"), default=None) # type: ignore[literal-required] + + +class GetSchemaDatasetsBatchResponse(core.ModelBase): + """GetSchemaDatasetsBatchResponse""" + + data: typing.Dict[DatasetRid, GetDatasetSchemaResponse] + + +class JobDetails(core.ModelBase): + """JobDetails""" + + job_rid: core_models.JobRid = pydantic.Field(alias=str("jobRid")) # type: ignore[literal-required] + + +class ListBranchesResponse(core.ModelBase): + """ListBranchesResponse""" + + data: typing.List[Branch] + next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] + + +class ListFilesResponse(core.ModelBase): + """ListFilesResponse""" + + data: typing.List[File] + next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] + + +class ListHealthChecksResponse(core.ModelBase): + """ListHealthChecksResponse""" + + data: typing.List[core_models.CheckRid] + + +class ListSchedulesResponse(core.ModelBase): + """ListSchedulesResponse""" + + data: typing.List[core_models.ScheduleRid] + next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] + + +class ListTransactionsOfDatasetResponse(core.ModelBase): + """ListTransactionsOfDatasetResponse""" + + data: typing.List[Transaction] + next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] + + +class ListTransactionsResponse(core.ModelBase): + """ListTransactionsResponse""" + + data: typing.List[Transaction] + next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] + + +class PrimaryKeyLatestWinsResolutionStrategy(core.ModelBase): + """Picks the row with the highest value of a list of columns, compared in order.""" + + columns: typing.List[str] + type: typing.Literal["latestWins"] = "latestWins" + + +class PrimaryKeyResolutionDuplicate(core.ModelBase): + """Duplicate primary key values may exist within the dataset – resolution required.""" + + deletion_column: typing.Optional[str] = pydantic.Field(alias=str("deletionColumn"), default=None) # type: ignore[literal-required] + """ + The name of the boolean column that indicates whether a row should be considered deleted. Based on the + `resolutionStrategy`, if the final row selected for a given primary key has `true` in this column, that + row will be excluded from the results. Otherwise, it will be included. + """ + + resolution_strategy: PrimaryKeyResolutionStrategy = pydantic.Field(alias=str("resolutionStrategy")) # type: ignore[literal-required] + type: typing.Literal["duplicate"] = "duplicate" + + +class PrimaryKeyResolutionUnique(core.ModelBase): + """Primary key values are unique within the dataset – no conflicts.""" + + type: typing.Literal["unique"] = "unique" + + +class PutDatasetSchemaRequest(core.ModelBase): + """PutDatasetSchemaRequest""" + + branch_name: typing.Optional[BranchName] = pydantic.Field(alias=str("branchName"), default=None) # type: ignore[literal-required] + dataframe_reader: typing.Optional[DataframeReader] = pydantic.Field(alias=str("dataframeReader"), default=None) # type: ignore[literal-required] + """The dataframe reader used for reading the dataset schema. Defaults to PARQUET.""" + + end_transaction_rid: typing.Optional[TransactionRid] = pydantic.Field(alias=str("endTransactionRid"), default=None) # type: ignore[literal-required] + """The Resource Identifier (RID) of the end Transaction.""" + + schema_: core_models.DatasetSchema = pydantic.Field(alias=str("schema")) # type: ignore[literal-required] + """The schema that will be added.""" + + +class RemoveBackingDatasetsRequest(core.ModelBase): + """RemoveBackingDatasetsRequest""" + + branch: typing.Optional[BranchName] = None + backing_datasets: typing.List[ViewBackingDataset] = pydantic.Field(alias=str("backingDatasets")) # type: ignore[literal-required] + + +class ReplaceBackingDatasetsRequest(core.ModelBase): + """ReplaceBackingDatasetsRequest""" + + branch: typing.Optional[BranchName] = None + backing_datasets: typing.List[ViewBackingDataset] = pydantic.Field(alias=str("backingDatasets")) # type: ignore[literal-required] + + +TableExportFormat = typing.Literal["ARROW", "CSV"] +"""Format for tabular dataset export.""" + + +class Transaction(core.ModelBase): + """Transaction""" + + rid: TransactionRid + transaction_type: TransactionType = pydantic.Field(alias=str("transactionType")) # type: ignore[literal-required] + status: TransactionStatus + created_time: TransactionCreatedTime = pydantic.Field(alias=str("createdTime")) # type: ignore[literal-required] + """The timestamp when the transaction was created, in ISO 8601 timestamp format.""" + + closed_time: typing.Optional[core.AwareDatetime] = pydantic.Field(alias=str("closedTime"), default=None) # type: ignore[literal-required] + """The timestamp when the transaction was closed, in ISO 8601 timestamp format.""" + + +TransactionCreatedTime = core.AwareDatetime +"""The timestamp when the transaction was created, in ISO 8601 timestamp format.""" + + +TransactionRid = core.RID +"""The Resource Identifier (RID) of a Transaction.""" + + +TransactionStatus = typing.Literal["ABORTED", "COMMITTED", "OPEN"] +"""The status of a Transaction.""" + + +TransactionType = typing.Literal["APPEND", "UPDATE", "SNAPSHOT", "DELETE"] +"""The type of a Transaction.""" + + +class View(core.ModelBase): + """View""" + + view_name: DatasetName = pydantic.Field(alias=str("viewName")) # type: ignore[literal-required] + dataset_rid: DatasetRid = pydantic.Field(alias=str("datasetRid")) # type: ignore[literal-required] + """The rid of the View.""" + + parent_folder_rid: filesystem_models.FolderRid = pydantic.Field(alias=str("parentFolderRid")) # type: ignore[literal-required] + branch: typing.Optional[BranchName] = None + """The branch name of the View. If not specified, defaults to `master` for most enrollments.""" + + backing_datasets: typing.List[ViewBackingDataset] = pydantic.Field(alias=str("backingDatasets")) # type: ignore[literal-required] + primary_key: typing.Optional[ViewPrimaryKey] = pydantic.Field(alias=str("primaryKey"), default=None) # type: ignore[literal-required] + + +class ViewBackingDataset(core.ModelBase): + """One of the Datasets backing a View.""" + + branch: BranchName + dataset_rid: DatasetRid = pydantic.Field(alias=str("datasetRid")) # type: ignore[literal-required] + + +class ViewPrimaryKey(core.ModelBase): + """ + The primary key of the dataset. Primary keys are treated as guarantees provided by the creator of the + dataset. + """ + + columns: typing.List[str] + """ + The columns that constitute the primary key. These columns must satisfy the following constraints: + - The list of columns must be non-empty. + - The list must not contain duplicate columns after applying column normalization. + - Each referenced column must exist in the schema. + - The type of each referenced column must be one of the following: `BYTE`, `SHORT`, `DECIMAL`, `INTEGER`, + `LONG`, `STRING`, `BOOLEAN`, `TIMESTAMP` or `DATE`. + """ + + resolution: ViewPrimaryKeyResolution + """ + The semantics of the primary key within the dataset. For example, the unique resolution means that every + row in the dataset has a distinct primary key. The value of this field represents a contract for writers + of the dataset. Writers are responsible for maintaining any related invariants, and readers may make + optimizations based on this. Violating the assumptions of the resolution can cause undefined behavior, + for example, having duplicate primary keys with the unique resolution. + """ + + +ViewPrimaryKeyResolution = typing_extensions.Annotated[ + typing.Union["PrimaryKeyResolutionUnique", "PrimaryKeyResolutionDuplicate"], + pydantic.Field(discriminator="type"), +] +"""Specifies how primary key conflicts are resolved within the view.""" + + +PrimaryKeyResolutionStrategy = PrimaryKeyLatestWinsResolutionStrategy +"""PrimaryKeyResolutionStrategy""" + + +core.resolve_forward_references(GetDatasetJobsQuery, globalns=globals(), localns=locals()) +core.resolve_forward_references(ViewPrimaryKeyResolution, globalns=globals(), localns=locals()) + +__all__ = [ + "AddBackingDatasetsRequest", + "AddPrimaryKeyRequest", + "Branch", + "BranchName", + "CreateBranchRequest", + "CreateDatasetRequest", + "CreateTransactionRequest", + "CreateViewRequest", + "DataframeReader", + "Dataset", + "DatasetName", + "DatasetRid", + "File", + "FileUpdatedTime", + "GetDatasetJobsAndFilter", + "GetDatasetJobsComparisonType", + "GetDatasetJobsOrFilter", + "GetDatasetJobsQuery", + "GetDatasetJobsRequest", + "GetDatasetJobsSort", + "GetDatasetJobsSortDirection", + "GetDatasetJobsSortType", + "GetDatasetJobsTimeFilter", + "GetDatasetJobsTimeFilterField", + "GetDatasetSchemaResponse", + "GetJobResponse", + "GetSchemaDatasetsBatchRequestElement", + "GetSchemaDatasetsBatchResponse", + "JobDetails", + "ListBranchesResponse", + "ListFilesResponse", + "ListHealthChecksResponse", + "ListSchedulesResponse", + "ListTransactionsOfDatasetResponse", + "ListTransactionsResponse", + "PrimaryKeyLatestWinsResolutionStrategy", + "PrimaryKeyResolutionDuplicate", + "PrimaryKeyResolutionStrategy", + "PrimaryKeyResolutionUnique", + "PutDatasetSchemaRequest", + "RemoveBackingDatasetsRequest", + "ReplaceBackingDatasetsRequest", + "TableExportFormat", + "Transaction", + "TransactionCreatedTime", + "TransactionRid", + "TransactionStatus", + "TransactionType", + "View", + "ViewBackingDataset", + "ViewPrimaryKey", + "ViewPrimaryKeyResolution", +] diff --git a/foundry_sdk/v2/datasets/transaction.py b/foundry_sdk/v2/datasets/transaction.py new file mode 100644 index 000000000..d10d6a640 --- /dev/null +++ b/foundry_sdk/v2/datasets/transaction.py @@ -0,0 +1,823 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v2.core import models as core_models +from foundry_sdk.v2.datasets import errors as datasets_errors +from foundry_sdk.v2.datasets import models as datasets_models + + +class TransactionClient: + """ + The API client for the Transaction Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _TransactionClientStreaming(self) + self.with_raw_response = _TransactionClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def abort( + self, + dataset_rid: datasets_models.DatasetRid, + transaction_rid: datasets_models.TransactionRid, + *, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> datasets_models.Transaction: + """ + Aborts an open Transaction. File modifications made on this Transaction are not preserved and the Branch is + not updated. + + :param dataset_rid: + :type dataset_rid: DatasetRid + :param transaction_rid: + :type transaction_rid: TransactionRid + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: datasets_models.Transaction + + :raises AbortTransactionPermissionDenied: The provided token does not have permission to abort the given transaction on the given dataset. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. + :raises TransactionNotOpen: The given transaction is not open. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/datasets/{datasetRid}/transactions/{transactionRid}/abort", + query_params={}, + path_params={ + "datasetRid": dataset_rid, + "transactionRid": transaction_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=datasets_models.Transaction, + request_timeout=request_timeout, + throwable_errors={ + "AbortTransactionPermissionDenied": datasets_errors.AbortTransactionPermissionDenied, + "DatasetNotFound": datasets_errors.DatasetNotFound, + "TransactionNotFound": datasets_errors.TransactionNotFound, + "TransactionNotOpen": datasets_errors.TransactionNotOpen, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def build( + self, + dataset_rid: datasets_models.DatasetRid, + transaction_rid: datasets_models.TransactionRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Optional[core_models.BuildRid]: + """ + Get the [Build](https://palantir.com/docs/foundry/data-integration/builds#builds) that computed the + given Transaction. Not all Transactions have an associated Build. For example, if a Dataset + is updated by a User uploading a CSV file into the browser, no Build will be tied to the Transaction. + + :param dataset_rid: + :type dataset_rid: DatasetRid + :param transaction_rid: + :type transaction_rid: TransactionRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Optional[core_models.BuildRid] + + :raises BuildTransactionPermissionDenied: Could not build the Transaction. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/datasets/{datasetRid}/transactions/{transactionRid}/build", + query_params={ + "preview": preview, + }, + path_params={ + "datasetRid": dataset_rid, + "transactionRid": transaction_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=typing.Optional[core_models.BuildRid], + request_timeout=request_timeout, + throwable_errors={ + "BuildTransactionPermissionDenied": datasets_errors.BuildTransactionPermissionDenied, + "DatasetNotFound": datasets_errors.DatasetNotFound, + "TransactionNotFound": datasets_errors.TransactionNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def commit( + self, + dataset_rid: datasets_models.DatasetRid, + transaction_rid: datasets_models.TransactionRid, + *, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> datasets_models.Transaction: + """ + Commits an open Transaction. File modifications made on this Transaction are preserved and the Branch is + updated to point to the Transaction. + + :param dataset_rid: + :type dataset_rid: DatasetRid + :param transaction_rid: + :type transaction_rid: TransactionRid + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: datasets_models.Transaction + + :raises CommitTransactionPermissionDenied: The provided token does not have permission to commit the given transaction on the given dataset. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. + :raises TransactionNotOpen: The given transaction is not open. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/datasets/{datasetRid}/transactions/{transactionRid}/commit", + query_params={}, + path_params={ + "datasetRid": dataset_rid, + "transactionRid": transaction_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=datasets_models.Transaction, + request_timeout=request_timeout, + throwable_errors={ + "CommitTransactionPermissionDenied": datasets_errors.CommitTransactionPermissionDenied, + "DatasetNotFound": datasets_errors.DatasetNotFound, + "TransactionNotFound": datasets_errors.TransactionNotFound, + "TransactionNotOpen": datasets_errors.TransactionNotOpen, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def create( + self, + dataset_rid: datasets_models.DatasetRid, + *, + transaction_type: datasets_models.TransactionType, + branch_name: typing.Optional[datasets_models.BranchName] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> datasets_models.Transaction: + """ + Creates a Transaction on a Branch of a Dataset. + + :param dataset_rid: + :type dataset_rid: DatasetRid + :param transaction_type: + :type transaction_type: TransactionType + :param branch_name: The name of the Branch on which to create the Transaction. Defaults to `master` for most enrollments. + :type branch_name: Optional[BranchName] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: datasets_models.Transaction + + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises CreateTransactionPermissionDenied: The provided token does not have permission to create a transaction on this dataset. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises InvalidBranchName: The requested branch name cannot be used. Branch names cannot be empty and must not look like RIDs or UUIDs. + :raises OpenTransactionAlreadyExists: A transaction is already open on this dataset and branch. A branch of a dataset can only have one open transaction at a time. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/datasets/{datasetRid}/transactions", + query_params={ + "branchName": branch_name, + }, + path_params={ + "datasetRid": dataset_rid, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=datasets_models.CreateTransactionRequest( + transaction_type=transaction_type, + ), + response_type=datasets_models.Transaction, + request_timeout=request_timeout, + throwable_errors={ + "BranchNotFound": datasets_errors.BranchNotFound, + "CreateTransactionPermissionDenied": datasets_errors.CreateTransactionPermissionDenied, + "DatasetNotFound": datasets_errors.DatasetNotFound, + "InvalidBranchName": datasets_errors.InvalidBranchName, + "OpenTransactionAlreadyExists": datasets_errors.OpenTransactionAlreadyExists, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + dataset_rid: datasets_models.DatasetRid, + transaction_rid: datasets_models.TransactionRid, + *, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> datasets_models.Transaction: + """ + Gets a Transaction of a Dataset. + + :param dataset_rid: + :type dataset_rid: DatasetRid + :param transaction_rid: + :type transaction_rid: TransactionRid + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: datasets_models.Transaction + + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/datasets/{datasetRid}/transactions/{transactionRid}", + query_params={}, + path_params={ + "datasetRid": dataset_rid, + "transactionRid": transaction_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=datasets_models.Transaction, + request_timeout=request_timeout, + throwable_errors={ + "DatasetNotFound": datasets_errors.DatasetNotFound, + "TransactionNotFound": datasets_errors.TransactionNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def job( + self, + dataset_rid: datasets_models.DatasetRid, + transaction_rid: datasets_models.TransactionRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Optional[core_models.JobRid]: + """ + Get the [Job](https://palantir.com/docs/foundry/data-integration/builds#jobs-and-jobspecs) that computed the + given Transaction. Not all Transactions have an associated Job. For example, if a Dataset + is updated by a User uploading a CSV file into the browser, no Job will be tied to the Transaction. + + :param dataset_rid: + :type dataset_rid: DatasetRid + :param transaction_rid: + :type transaction_rid: TransactionRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Optional[core_models.JobRid] + + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises JobTransactionPermissionDenied: Could not job the Transaction. + :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/datasets/{datasetRid}/transactions/{transactionRid}/job", + query_params={ + "preview": preview, + }, + path_params={ + "datasetRid": dataset_rid, + "transactionRid": transaction_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=typing.Optional[core_models.JobRid], + request_timeout=request_timeout, + throwable_errors={ + "DatasetNotFound": datasets_errors.DatasetNotFound, + "JobTransactionPermissionDenied": datasets_errors.JobTransactionPermissionDenied, + "TransactionNotFound": datasets_errors.TransactionNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _TransactionClientRaw: + def __init__(self, client: TransactionClient) -> None: + def abort(_: datasets_models.Transaction): ... + def build(_: typing.Optional[core_models.BuildRid]): ... + def commit(_: datasets_models.Transaction): ... + def create(_: datasets_models.Transaction): ... + def get(_: datasets_models.Transaction): ... + def job(_: typing.Optional[core_models.JobRid]): ... + + self.abort = core.with_raw_response(abort, client.abort) + self.build = core.with_raw_response(build, client.build) + self.commit = core.with_raw_response(commit, client.commit) + self.create = core.with_raw_response(create, client.create) + self.get = core.with_raw_response(get, client.get) + self.job = core.with_raw_response(job, client.job) + + +class _TransactionClientStreaming: + def __init__(self, client: TransactionClient) -> None: + def abort(_: datasets_models.Transaction): ... + def build(_: typing.Optional[core_models.BuildRid]): ... + def commit(_: datasets_models.Transaction): ... + def create(_: datasets_models.Transaction): ... + def get(_: datasets_models.Transaction): ... + def job(_: typing.Optional[core_models.JobRid]): ... + + self.abort = core.with_streaming_response(abort, client.abort) + self.build = core.with_streaming_response(build, client.build) + self.commit = core.with_streaming_response(commit, client.commit) + self.create = core.with_streaming_response(create, client.create) + self.get = core.with_streaming_response(get, client.get) + self.job = core.with_streaming_response(job, client.job) + + +class AsyncTransactionClient: + """ + The API client for the Transaction Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncTransactionClientStreaming(self) + self.with_raw_response = _AsyncTransactionClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def abort( + self, + dataset_rid: datasets_models.DatasetRid, + transaction_rid: datasets_models.TransactionRid, + *, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[datasets_models.Transaction]: + """ + Aborts an open Transaction. File modifications made on this Transaction are not preserved and the Branch is + not updated. + + :param dataset_rid: + :type dataset_rid: DatasetRid + :param transaction_rid: + :type transaction_rid: TransactionRid + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[datasets_models.Transaction] + + :raises AbortTransactionPermissionDenied: The provided token does not have permission to abort the given transaction on the given dataset. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. + :raises TransactionNotOpen: The given transaction is not open. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/datasets/{datasetRid}/transactions/{transactionRid}/abort", + query_params={}, + path_params={ + "datasetRid": dataset_rid, + "transactionRid": transaction_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=datasets_models.Transaction, + request_timeout=request_timeout, + throwable_errors={ + "AbortTransactionPermissionDenied": datasets_errors.AbortTransactionPermissionDenied, + "DatasetNotFound": datasets_errors.DatasetNotFound, + "TransactionNotFound": datasets_errors.TransactionNotFound, + "TransactionNotOpen": datasets_errors.TransactionNotOpen, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def build( + self, + dataset_rid: datasets_models.DatasetRid, + transaction_rid: datasets_models.TransactionRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[typing.Optional[core_models.BuildRid]]: + """ + Get the [Build](https://palantir.com/docs/foundry/data-integration/builds#builds) that computed the + given Transaction. Not all Transactions have an associated Build. For example, if a Dataset + is updated by a User uploading a CSV file into the browser, no Build will be tied to the Transaction. + + :param dataset_rid: + :type dataset_rid: DatasetRid + :param transaction_rid: + :type transaction_rid: TransactionRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[typing.Optional[core_models.BuildRid]] + + :raises BuildTransactionPermissionDenied: Could not build the Transaction. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/datasets/{datasetRid}/transactions/{transactionRid}/build", + query_params={ + "preview": preview, + }, + path_params={ + "datasetRid": dataset_rid, + "transactionRid": transaction_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=typing.Optional[core_models.BuildRid], + request_timeout=request_timeout, + throwable_errors={ + "BuildTransactionPermissionDenied": datasets_errors.BuildTransactionPermissionDenied, + "DatasetNotFound": datasets_errors.DatasetNotFound, + "TransactionNotFound": datasets_errors.TransactionNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def commit( + self, + dataset_rid: datasets_models.DatasetRid, + transaction_rid: datasets_models.TransactionRid, + *, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[datasets_models.Transaction]: + """ + Commits an open Transaction. File modifications made on this Transaction are preserved and the Branch is + updated to point to the Transaction. + + :param dataset_rid: + :type dataset_rid: DatasetRid + :param transaction_rid: + :type transaction_rid: TransactionRid + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[datasets_models.Transaction] + + :raises CommitTransactionPermissionDenied: The provided token does not have permission to commit the given transaction on the given dataset. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. + :raises TransactionNotOpen: The given transaction is not open. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/datasets/{datasetRid}/transactions/{transactionRid}/commit", + query_params={}, + path_params={ + "datasetRid": dataset_rid, + "transactionRid": transaction_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=datasets_models.Transaction, + request_timeout=request_timeout, + throwable_errors={ + "CommitTransactionPermissionDenied": datasets_errors.CommitTransactionPermissionDenied, + "DatasetNotFound": datasets_errors.DatasetNotFound, + "TransactionNotFound": datasets_errors.TransactionNotFound, + "TransactionNotOpen": datasets_errors.TransactionNotOpen, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def create( + self, + dataset_rid: datasets_models.DatasetRid, + *, + transaction_type: datasets_models.TransactionType, + branch_name: typing.Optional[datasets_models.BranchName] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[datasets_models.Transaction]: + """ + Creates a Transaction on a Branch of a Dataset. + + :param dataset_rid: + :type dataset_rid: DatasetRid + :param transaction_type: + :type transaction_type: TransactionType + :param branch_name: The name of the Branch on which to create the Transaction. Defaults to `master` for most enrollments. + :type branch_name: Optional[BranchName] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[datasets_models.Transaction] + + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises CreateTransactionPermissionDenied: The provided token does not have permission to create a transaction on this dataset. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises InvalidBranchName: The requested branch name cannot be used. Branch names cannot be empty and must not look like RIDs or UUIDs. + :raises OpenTransactionAlreadyExists: A transaction is already open on this dataset and branch. A branch of a dataset can only have one open transaction at a time. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/datasets/{datasetRid}/transactions", + query_params={ + "branchName": branch_name, + }, + path_params={ + "datasetRid": dataset_rid, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=datasets_models.CreateTransactionRequest( + transaction_type=transaction_type, + ), + response_type=datasets_models.Transaction, + request_timeout=request_timeout, + throwable_errors={ + "BranchNotFound": datasets_errors.BranchNotFound, + "CreateTransactionPermissionDenied": datasets_errors.CreateTransactionPermissionDenied, + "DatasetNotFound": datasets_errors.DatasetNotFound, + "InvalidBranchName": datasets_errors.InvalidBranchName, + "OpenTransactionAlreadyExists": datasets_errors.OpenTransactionAlreadyExists, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + dataset_rid: datasets_models.DatasetRid, + transaction_rid: datasets_models.TransactionRid, + *, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[datasets_models.Transaction]: + """ + Gets a Transaction of a Dataset. + + :param dataset_rid: + :type dataset_rid: DatasetRid + :param transaction_rid: + :type transaction_rid: TransactionRid + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[datasets_models.Transaction] + + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/datasets/{datasetRid}/transactions/{transactionRid}", + query_params={}, + path_params={ + "datasetRid": dataset_rid, + "transactionRid": transaction_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=datasets_models.Transaction, + request_timeout=request_timeout, + throwable_errors={ + "DatasetNotFound": datasets_errors.DatasetNotFound, + "TransactionNotFound": datasets_errors.TransactionNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def job( + self, + dataset_rid: datasets_models.DatasetRid, + transaction_rid: datasets_models.TransactionRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[typing.Optional[core_models.JobRid]]: + """ + Get the [Job](https://palantir.com/docs/foundry/data-integration/builds#jobs-and-jobspecs) that computed the + given Transaction. Not all Transactions have an associated Job. For example, if a Dataset + is updated by a User uploading a CSV file into the browser, no Job will be tied to the Transaction. + + :param dataset_rid: + :type dataset_rid: DatasetRid + :param transaction_rid: + :type transaction_rid: TransactionRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[typing.Optional[core_models.JobRid]] + + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises JobTransactionPermissionDenied: Could not job the Transaction. + :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/datasets/{datasetRid}/transactions/{transactionRid}/job", + query_params={ + "preview": preview, + }, + path_params={ + "datasetRid": dataset_rid, + "transactionRid": transaction_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=typing.Optional[core_models.JobRid], + request_timeout=request_timeout, + throwable_errors={ + "DatasetNotFound": datasets_errors.DatasetNotFound, + "JobTransactionPermissionDenied": datasets_errors.JobTransactionPermissionDenied, + "TransactionNotFound": datasets_errors.TransactionNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _AsyncTransactionClientRaw: + def __init__(self, client: AsyncTransactionClient) -> None: + def abort(_: datasets_models.Transaction): ... + def build(_: typing.Optional[core_models.BuildRid]): ... + def commit(_: datasets_models.Transaction): ... + def create(_: datasets_models.Transaction): ... + def get(_: datasets_models.Transaction): ... + def job(_: typing.Optional[core_models.JobRid]): ... + + self.abort = core.async_with_raw_response(abort, client.abort) + self.build = core.async_with_raw_response(build, client.build) + self.commit = core.async_with_raw_response(commit, client.commit) + self.create = core.async_with_raw_response(create, client.create) + self.get = core.async_with_raw_response(get, client.get) + self.job = core.async_with_raw_response(job, client.job) + + +class _AsyncTransactionClientStreaming: + def __init__(self, client: AsyncTransactionClient) -> None: + def abort(_: datasets_models.Transaction): ... + def build(_: typing.Optional[core_models.BuildRid]): ... + def commit(_: datasets_models.Transaction): ... + def create(_: datasets_models.Transaction): ... + def get(_: datasets_models.Transaction): ... + def job(_: typing.Optional[core_models.JobRid]): ... + + self.abort = core.async_with_streaming_response(abort, client.abort) + self.build = core.async_with_streaming_response(build, client.build) + self.commit = core.async_with_streaming_response(commit, client.commit) + self.create = core.async_with_streaming_response(create, client.create) + self.get = core.async_with_streaming_response(get, client.get) + self.job = core.async_with_streaming_response(job, client.job) diff --git a/foundry_sdk/v2/datasets/view.py b/foundry_sdk/v2/datasets/view.py new file mode 100644 index 000000000..0eb279a8f --- /dev/null +++ b/foundry_sdk/v2/datasets/view.py @@ -0,0 +1,1009 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v2.core import models as core_models +from foundry_sdk.v2.datasets import errors as datasets_errors +from foundry_sdk.v2.datasets import models as datasets_models +from foundry_sdk.v2.filesystem import errors as filesystem_errors +from foundry_sdk.v2.filesystem import models as filesystem_models + + +class ViewClient: + """ + The API client for the View Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _ViewClientStreaming(self) + self.with_raw_response = _ViewClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def add_backing_datasets( + self, + view_dataset_rid: datasets_models.DatasetRid, + *, + backing_datasets: typing.List[datasets_models.ViewBackingDataset], + branch: typing.Optional[datasets_models.BranchName] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> datasets_models.View: + """ + Adds one or more backing datasets to a View. Any duplicates with the same dataset RID and branch name are + ignored. + + :param view_dataset_rid: The rid of the View. + :type view_dataset_rid: DatasetRid + :param backing_datasets: + :type backing_datasets: List[ViewBackingDataset] + :param branch: + :type branch: Optional[BranchName] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: datasets_models.View + + :raises AddBackingDatasetsPermissionDenied: Could not addBackingDatasets the View. + :raises InputBackingDatasetNotInOutputViewProject: One or more backing datasets do not live in the same project as the view. Either move the input datasets to the same project as the view or add them as project references. + :raises InvalidViewBackingDataset: Either you do not have access to one or more of the backing datasets or it does not exist. + :raises ViewNotFound: The requested View could not be found. Either the view does not exist, the branch is not valid or the client token does not have access to it. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/datasets/views/{viewDatasetRid}/addBackingDatasets", + query_params={ + "preview": preview, + }, + path_params={ + "viewDatasetRid": view_dataset_rid, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=datasets_models.AddBackingDatasetsRequest( + branch=branch, + backing_datasets=backing_datasets, + ), + response_type=datasets_models.View, + request_timeout=request_timeout, + throwable_errors={ + "AddBackingDatasetsPermissionDenied": datasets_errors.AddBackingDatasetsPermissionDenied, + "InputBackingDatasetNotInOutputViewProject": datasets_errors.InputBackingDatasetNotInOutputViewProject, + "InvalidViewBackingDataset": datasets_errors.InvalidViewBackingDataset, + "ViewNotFound": datasets_errors.ViewNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def add_primary_key( + self, + view_dataset_rid: datasets_models.DatasetRid, + *, + primary_key: datasets_models.ViewPrimaryKey, + branch: typing.Optional[datasets_models.BranchName] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> datasets_models.View: + """ + Adds a primary key to a View that does not already have one. Primary keys are treated as + guarantees provided by the creator of the dataset. + + :param view_dataset_rid: The rid of the View. + :type view_dataset_rid: DatasetRid + :param primary_key: + :type primary_key: ViewPrimaryKey + :param branch: + :type branch: Optional[BranchName] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: datasets_models.View + + :raises AddPrimaryKeyPermissionDenied: Could not addPrimaryKey the View. + :raises InvalidViewPrimaryKeyColumnType: The type of each referenced column in the primary key must be one of the following: BYTE, SHORT, DECIMAL, INTEGER, LONG, STRING, BOOLEAN, TIMESTAMP or DATE. + :raises InvalidViewPrimaryKeyDeletionColumn: The deletion column must be a boolean. + :raises NotAllColumnsInPrimaryKeyArePresent: Not all columns in the View's primary key are present in the dataset(s). + :raises ViewNotFound: The requested View could not be found. Either the view does not exist, the branch is not valid or the client token does not have access to it. + :raises ViewPrimaryKeyCannotBeModified: A primary key already exits. + :raises ViewPrimaryKeyDeletionColumnNotInDatasetSchema: The deletion column is not present in the dataset. + :raises ViewPrimaryKeyMustContainAtLeastOneColumn: No columns were provided as part of the primary key + :raises ViewPrimaryKeyRequiresBackingDatasets: Cannot add a primary key to a View that does not have any backing datasets. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/datasets/views/{viewDatasetRid}/addPrimaryKey", + query_params={ + "preview": preview, + }, + path_params={ + "viewDatasetRid": view_dataset_rid, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=datasets_models.AddPrimaryKeyRequest( + branch=branch, + primary_key=primary_key, + ), + response_type=datasets_models.View, + request_timeout=request_timeout, + throwable_errors={ + "AddPrimaryKeyPermissionDenied": datasets_errors.AddPrimaryKeyPermissionDenied, + "InvalidViewPrimaryKeyColumnType": datasets_errors.InvalidViewPrimaryKeyColumnType, + "InvalidViewPrimaryKeyDeletionColumn": datasets_errors.InvalidViewPrimaryKeyDeletionColumn, + "NotAllColumnsInPrimaryKeyArePresent": datasets_errors.NotAllColumnsInPrimaryKeyArePresent, + "ViewNotFound": datasets_errors.ViewNotFound, + "ViewPrimaryKeyCannotBeModified": datasets_errors.ViewPrimaryKeyCannotBeModified, + "ViewPrimaryKeyDeletionColumnNotInDatasetSchema": datasets_errors.ViewPrimaryKeyDeletionColumnNotInDatasetSchema, + "ViewPrimaryKeyMustContainAtLeastOneColumn": datasets_errors.ViewPrimaryKeyMustContainAtLeastOneColumn, + "ViewPrimaryKeyRequiresBackingDatasets": datasets_errors.ViewPrimaryKeyRequiresBackingDatasets, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def create( + self, + *, + backing_datasets: typing.List[datasets_models.ViewBackingDataset], + parent_folder_rid: filesystem_models.FolderRid, + view_name: datasets_models.DatasetName, + branch: typing.Optional[datasets_models.BranchName] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + primary_key: typing.Optional[datasets_models.ViewPrimaryKey] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> datasets_models.View: + """ + Create a new View. + :param backing_datasets: + :type backing_datasets: List[ViewBackingDataset] + :param parent_folder_rid: + :type parent_folder_rid: FolderRid + :param view_name: + :type view_name: DatasetName + :param branch: The branch name of the View. If not specified, defaults to `master` for most enrollments. + :type branch: Optional[BranchName] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param primary_key: + :type primary_key: Optional[ViewPrimaryKey] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: datasets_models.View + + :raises CreateDatasetPermissionDenied: The provided token does not have permission to create a dataset in this folder. + :raises CreateViewPermissionDenied: Could not create the View. + :raises FolderNotFound: The given Folder could not be found. + :raises InputBackingDatasetNotInOutputViewProject: One or more backing datasets do not live in the same project as the view. Either move the input datasets to the same project as the view or add them as project references. + :raises InvalidDisplayName: The display name of a Resource should not be exactly `.` or `..`, contain a forward slash `/` and must be less than or equal to 700 characters. + :raises InvalidViewBackingDataset: Either you do not have access to one or more of the backing datasets or it does not exist. + :raises InvalidViewPrimaryKeyColumnType: The type of each referenced column in the primary key must be one of the following: BYTE, SHORT, DECIMAL, INTEGER, LONG, STRING, BOOLEAN, TIMESTAMP or DATE. + :raises InvalidViewPrimaryKeyDeletionColumn: The deletion column must be a boolean. + :raises NotAllColumnsInPrimaryKeyArePresent: Not all columns in the View's primary key are present in the dataset(s). + :raises ResourceNameAlreadyExists: The provided resource name is already in use by another resource in the same folder. + :raises ViewDatasetCleanupFailed: Failed to delete dataset following View creation failure. + :raises ViewNotFound: The requested View could not be found. Either the view does not exist, the branch is not valid or the client token does not have access to it. + :raises ViewPrimaryKeyDeletionColumnNotInDatasetSchema: The deletion column is not present in the dataset. + :raises ViewPrimaryKeyMustContainAtLeastOneColumn: No columns were provided as part of the primary key + :raises ViewPrimaryKeyRequiresBackingDatasets: Cannot add a primary key to a View that does not have any backing datasets. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/datasets/views", + query_params={ + "preview": preview, + }, + path_params={}, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=datasets_models.CreateViewRequest( + parent_folder_rid=parent_folder_rid, + view_name=view_name, + backing_datasets=backing_datasets, + branch=branch, + primary_key=primary_key, + ), + response_type=datasets_models.View, + request_timeout=request_timeout, + throwable_errors={ + "CreateDatasetPermissionDenied": datasets_errors.CreateDatasetPermissionDenied, + "CreateViewPermissionDenied": datasets_errors.CreateViewPermissionDenied, + "FolderNotFound": filesystem_errors.FolderNotFound, + "InputBackingDatasetNotInOutputViewProject": datasets_errors.InputBackingDatasetNotInOutputViewProject, + "InvalidDisplayName": filesystem_errors.InvalidDisplayName, + "InvalidViewBackingDataset": datasets_errors.InvalidViewBackingDataset, + "InvalidViewPrimaryKeyColumnType": datasets_errors.InvalidViewPrimaryKeyColumnType, + "InvalidViewPrimaryKeyDeletionColumn": datasets_errors.InvalidViewPrimaryKeyDeletionColumn, + "NotAllColumnsInPrimaryKeyArePresent": datasets_errors.NotAllColumnsInPrimaryKeyArePresent, + "ResourceNameAlreadyExists": filesystem_errors.ResourceNameAlreadyExists, + "ViewDatasetCleanupFailed": datasets_errors.ViewDatasetCleanupFailed, + "ViewNotFound": datasets_errors.ViewNotFound, + "ViewPrimaryKeyDeletionColumnNotInDatasetSchema": datasets_errors.ViewPrimaryKeyDeletionColumnNotInDatasetSchema, + "ViewPrimaryKeyMustContainAtLeastOneColumn": datasets_errors.ViewPrimaryKeyMustContainAtLeastOneColumn, + "ViewPrimaryKeyRequiresBackingDatasets": datasets_errors.ViewPrimaryKeyRequiresBackingDatasets, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + view_dataset_rid: datasets_models.DatasetRid, + *, + branch: typing.Optional[datasets_models.BranchName] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> datasets_models.View: + """ + Get metadata for a View. + :param view_dataset_rid: The rid of the View. + :type view_dataset_rid: DatasetRid + :param branch: + :type branch: Optional[BranchName] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: datasets_models.View + + :raises ViewNotFound: The requested View could not be found. Either the view does not exist, the branch is not valid or the client token does not have access to it. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/datasets/views/{viewDatasetRid}", + query_params={ + "branch": branch, + "preview": preview, + }, + path_params={ + "viewDatasetRid": view_dataset_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=datasets_models.View, + request_timeout=request_timeout, + throwable_errors={ + "ViewNotFound": datasets_errors.ViewNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def remove_backing_datasets( + self, + view_dataset_rid: datasets_models.DatasetRid, + *, + backing_datasets: typing.List[datasets_models.ViewBackingDataset], + branch: typing.Optional[datasets_models.BranchName] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> datasets_models.View: + """ + Removes specified backing datasets from a View. Removing a dataset triggers a + [SNAPSHOT](https://palantir.com/docs/foundry/data-integration/datasets#snapshot) transaction on the next update. If a + specified dataset does not exist, no error is thrown. + + :param view_dataset_rid: The rid of the View. + :type view_dataset_rid: DatasetRid + :param backing_datasets: + :type backing_datasets: List[ViewBackingDataset] + :param branch: + :type branch: Optional[BranchName] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: datasets_models.View + + :raises InputBackingDatasetNotInOutputViewProject: One or more backing datasets do not live in the same project as the view. Either move the input datasets to the same project as the view or add them as project references. + :raises InvalidViewBackingDataset: Either you do not have access to one or more of the backing datasets or it does not exist. + :raises RemoveBackingDatasetsPermissionDenied: Could not removeBackingDatasets the View. + :raises ViewNotFound: The requested View could not be found. Either the view does not exist, the branch is not valid or the client token does not have access to it. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/datasets/views/{viewDatasetRid}/removeBackingDatasets", + query_params={ + "preview": preview, + }, + path_params={ + "viewDatasetRid": view_dataset_rid, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=datasets_models.RemoveBackingDatasetsRequest( + branch=branch, + backing_datasets=backing_datasets, + ), + response_type=datasets_models.View, + request_timeout=request_timeout, + throwable_errors={ + "InputBackingDatasetNotInOutputViewProject": datasets_errors.InputBackingDatasetNotInOutputViewProject, + "InvalidViewBackingDataset": datasets_errors.InvalidViewBackingDataset, + "RemoveBackingDatasetsPermissionDenied": datasets_errors.RemoveBackingDatasetsPermissionDenied, + "ViewNotFound": datasets_errors.ViewNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def replace_backing_datasets( + self, + view_dataset_rid: datasets_models.DatasetRid, + *, + backing_datasets: typing.List[datasets_models.ViewBackingDataset], + branch: typing.Optional[datasets_models.BranchName] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> datasets_models.View: + """ + Replaces the backing datasets for a View. Removing any backing dataset triggers a + [SNAPSHOT](https://palantir.com/docs/foundry/data-integration/datasets#snapshot) transaction the next time the View is updated. + + :param view_dataset_rid: The rid of the View. + :type view_dataset_rid: DatasetRid + :param backing_datasets: + :type backing_datasets: List[ViewBackingDataset] + :param branch: + :type branch: Optional[BranchName] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: datasets_models.View + + :raises InputBackingDatasetNotInOutputViewProject: One or more backing datasets do not live in the same project as the view. Either move the input datasets to the same project as the view or add them as project references. + :raises InvalidViewBackingDataset: Either you do not have access to one or more of the backing datasets or it does not exist. + :raises ReplaceBackingDatasetsPermissionDenied: Could not replaceBackingDatasets the View. + :raises ViewNotFound: The requested View could not be found. Either the view does not exist, the branch is not valid or the client token does not have access to it. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="PUT", + resource_path="/v2/datasets/views/{viewDatasetRid}/replaceBackingDatasets", + query_params={ + "preview": preview, + }, + path_params={ + "viewDatasetRid": view_dataset_rid, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=datasets_models.ReplaceBackingDatasetsRequest( + branch=branch, + backing_datasets=backing_datasets, + ), + response_type=datasets_models.View, + request_timeout=request_timeout, + throwable_errors={ + "InputBackingDatasetNotInOutputViewProject": datasets_errors.InputBackingDatasetNotInOutputViewProject, + "InvalidViewBackingDataset": datasets_errors.InvalidViewBackingDataset, + "ReplaceBackingDatasetsPermissionDenied": datasets_errors.ReplaceBackingDatasetsPermissionDenied, + "ViewNotFound": datasets_errors.ViewNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _ViewClientRaw: + def __init__(self, client: ViewClient) -> None: + def add_backing_datasets(_: datasets_models.View): ... + def add_primary_key(_: datasets_models.View): ... + def create(_: datasets_models.View): ... + def get(_: datasets_models.View): ... + def remove_backing_datasets(_: datasets_models.View): ... + def replace_backing_datasets(_: datasets_models.View): ... + + self.add_backing_datasets = core.with_raw_response( + add_backing_datasets, client.add_backing_datasets + ) + self.add_primary_key = core.with_raw_response(add_primary_key, client.add_primary_key) + self.create = core.with_raw_response(create, client.create) + self.get = core.with_raw_response(get, client.get) + self.remove_backing_datasets = core.with_raw_response( + remove_backing_datasets, client.remove_backing_datasets + ) + self.replace_backing_datasets = core.with_raw_response( + replace_backing_datasets, client.replace_backing_datasets + ) + + +class _ViewClientStreaming: + def __init__(self, client: ViewClient) -> None: + def add_backing_datasets(_: datasets_models.View): ... + def add_primary_key(_: datasets_models.View): ... + def create(_: datasets_models.View): ... + def get(_: datasets_models.View): ... + def remove_backing_datasets(_: datasets_models.View): ... + def replace_backing_datasets(_: datasets_models.View): ... + + self.add_backing_datasets = core.with_streaming_response( + add_backing_datasets, client.add_backing_datasets + ) + self.add_primary_key = core.with_streaming_response(add_primary_key, client.add_primary_key) + self.create = core.with_streaming_response(create, client.create) + self.get = core.with_streaming_response(get, client.get) + self.remove_backing_datasets = core.with_streaming_response( + remove_backing_datasets, client.remove_backing_datasets + ) + self.replace_backing_datasets = core.with_streaming_response( + replace_backing_datasets, client.replace_backing_datasets + ) + + +class AsyncViewClient: + """ + The API client for the View Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncViewClientStreaming(self) + self.with_raw_response = _AsyncViewClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def add_backing_datasets( + self, + view_dataset_rid: datasets_models.DatasetRid, + *, + backing_datasets: typing.List[datasets_models.ViewBackingDataset], + branch: typing.Optional[datasets_models.BranchName] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[datasets_models.View]: + """ + Adds one or more backing datasets to a View. Any duplicates with the same dataset RID and branch name are + ignored. + + :param view_dataset_rid: The rid of the View. + :type view_dataset_rid: DatasetRid + :param backing_datasets: + :type backing_datasets: List[ViewBackingDataset] + :param branch: + :type branch: Optional[BranchName] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[datasets_models.View] + + :raises AddBackingDatasetsPermissionDenied: Could not addBackingDatasets the View. + :raises InputBackingDatasetNotInOutputViewProject: One or more backing datasets do not live in the same project as the view. Either move the input datasets to the same project as the view or add them as project references. + :raises InvalidViewBackingDataset: Either you do not have access to one or more of the backing datasets or it does not exist. + :raises ViewNotFound: The requested View could not be found. Either the view does not exist, the branch is not valid or the client token does not have access to it. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/datasets/views/{viewDatasetRid}/addBackingDatasets", + query_params={ + "preview": preview, + }, + path_params={ + "viewDatasetRid": view_dataset_rid, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=datasets_models.AddBackingDatasetsRequest( + branch=branch, + backing_datasets=backing_datasets, + ), + response_type=datasets_models.View, + request_timeout=request_timeout, + throwable_errors={ + "AddBackingDatasetsPermissionDenied": datasets_errors.AddBackingDatasetsPermissionDenied, + "InputBackingDatasetNotInOutputViewProject": datasets_errors.InputBackingDatasetNotInOutputViewProject, + "InvalidViewBackingDataset": datasets_errors.InvalidViewBackingDataset, + "ViewNotFound": datasets_errors.ViewNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def add_primary_key( + self, + view_dataset_rid: datasets_models.DatasetRid, + *, + primary_key: datasets_models.ViewPrimaryKey, + branch: typing.Optional[datasets_models.BranchName] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[datasets_models.View]: + """ + Adds a primary key to a View that does not already have one. Primary keys are treated as + guarantees provided by the creator of the dataset. + + :param view_dataset_rid: The rid of the View. + :type view_dataset_rid: DatasetRid + :param primary_key: + :type primary_key: ViewPrimaryKey + :param branch: + :type branch: Optional[BranchName] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[datasets_models.View] + + :raises AddPrimaryKeyPermissionDenied: Could not addPrimaryKey the View. + :raises InvalidViewPrimaryKeyColumnType: The type of each referenced column in the primary key must be one of the following: BYTE, SHORT, DECIMAL, INTEGER, LONG, STRING, BOOLEAN, TIMESTAMP or DATE. + :raises InvalidViewPrimaryKeyDeletionColumn: The deletion column must be a boolean. + :raises NotAllColumnsInPrimaryKeyArePresent: Not all columns in the View's primary key are present in the dataset(s). + :raises ViewNotFound: The requested View could not be found. Either the view does not exist, the branch is not valid or the client token does not have access to it. + :raises ViewPrimaryKeyCannotBeModified: A primary key already exits. + :raises ViewPrimaryKeyDeletionColumnNotInDatasetSchema: The deletion column is not present in the dataset. + :raises ViewPrimaryKeyMustContainAtLeastOneColumn: No columns were provided as part of the primary key + :raises ViewPrimaryKeyRequiresBackingDatasets: Cannot add a primary key to a View that does not have any backing datasets. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/datasets/views/{viewDatasetRid}/addPrimaryKey", + query_params={ + "preview": preview, + }, + path_params={ + "viewDatasetRid": view_dataset_rid, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=datasets_models.AddPrimaryKeyRequest( + branch=branch, + primary_key=primary_key, + ), + response_type=datasets_models.View, + request_timeout=request_timeout, + throwable_errors={ + "AddPrimaryKeyPermissionDenied": datasets_errors.AddPrimaryKeyPermissionDenied, + "InvalidViewPrimaryKeyColumnType": datasets_errors.InvalidViewPrimaryKeyColumnType, + "InvalidViewPrimaryKeyDeletionColumn": datasets_errors.InvalidViewPrimaryKeyDeletionColumn, + "NotAllColumnsInPrimaryKeyArePresent": datasets_errors.NotAllColumnsInPrimaryKeyArePresent, + "ViewNotFound": datasets_errors.ViewNotFound, + "ViewPrimaryKeyCannotBeModified": datasets_errors.ViewPrimaryKeyCannotBeModified, + "ViewPrimaryKeyDeletionColumnNotInDatasetSchema": datasets_errors.ViewPrimaryKeyDeletionColumnNotInDatasetSchema, + "ViewPrimaryKeyMustContainAtLeastOneColumn": datasets_errors.ViewPrimaryKeyMustContainAtLeastOneColumn, + "ViewPrimaryKeyRequiresBackingDatasets": datasets_errors.ViewPrimaryKeyRequiresBackingDatasets, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def create( + self, + *, + backing_datasets: typing.List[datasets_models.ViewBackingDataset], + parent_folder_rid: filesystem_models.FolderRid, + view_name: datasets_models.DatasetName, + branch: typing.Optional[datasets_models.BranchName] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + primary_key: typing.Optional[datasets_models.ViewPrimaryKey] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[datasets_models.View]: + """ + Create a new View. + :param backing_datasets: + :type backing_datasets: List[ViewBackingDataset] + :param parent_folder_rid: + :type parent_folder_rid: FolderRid + :param view_name: + :type view_name: DatasetName + :param branch: The branch name of the View. If not specified, defaults to `master` for most enrollments. + :type branch: Optional[BranchName] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param primary_key: + :type primary_key: Optional[ViewPrimaryKey] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[datasets_models.View] + + :raises CreateDatasetPermissionDenied: The provided token does not have permission to create a dataset in this folder. + :raises CreateViewPermissionDenied: Could not create the View. + :raises FolderNotFound: The given Folder could not be found. + :raises InputBackingDatasetNotInOutputViewProject: One or more backing datasets do not live in the same project as the view. Either move the input datasets to the same project as the view or add them as project references. + :raises InvalidDisplayName: The display name of a Resource should not be exactly `.` or `..`, contain a forward slash `/` and must be less than or equal to 700 characters. + :raises InvalidViewBackingDataset: Either you do not have access to one or more of the backing datasets or it does not exist. + :raises InvalidViewPrimaryKeyColumnType: The type of each referenced column in the primary key must be one of the following: BYTE, SHORT, DECIMAL, INTEGER, LONG, STRING, BOOLEAN, TIMESTAMP or DATE. + :raises InvalidViewPrimaryKeyDeletionColumn: The deletion column must be a boolean. + :raises NotAllColumnsInPrimaryKeyArePresent: Not all columns in the View's primary key are present in the dataset(s). + :raises ResourceNameAlreadyExists: The provided resource name is already in use by another resource in the same folder. + :raises ViewDatasetCleanupFailed: Failed to delete dataset following View creation failure. + :raises ViewNotFound: The requested View could not be found. Either the view does not exist, the branch is not valid or the client token does not have access to it. + :raises ViewPrimaryKeyDeletionColumnNotInDatasetSchema: The deletion column is not present in the dataset. + :raises ViewPrimaryKeyMustContainAtLeastOneColumn: No columns were provided as part of the primary key + :raises ViewPrimaryKeyRequiresBackingDatasets: Cannot add a primary key to a View that does not have any backing datasets. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/datasets/views", + query_params={ + "preview": preview, + }, + path_params={}, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=datasets_models.CreateViewRequest( + parent_folder_rid=parent_folder_rid, + view_name=view_name, + backing_datasets=backing_datasets, + branch=branch, + primary_key=primary_key, + ), + response_type=datasets_models.View, + request_timeout=request_timeout, + throwable_errors={ + "CreateDatasetPermissionDenied": datasets_errors.CreateDatasetPermissionDenied, + "CreateViewPermissionDenied": datasets_errors.CreateViewPermissionDenied, + "FolderNotFound": filesystem_errors.FolderNotFound, + "InputBackingDatasetNotInOutputViewProject": datasets_errors.InputBackingDatasetNotInOutputViewProject, + "InvalidDisplayName": filesystem_errors.InvalidDisplayName, + "InvalidViewBackingDataset": datasets_errors.InvalidViewBackingDataset, + "InvalidViewPrimaryKeyColumnType": datasets_errors.InvalidViewPrimaryKeyColumnType, + "InvalidViewPrimaryKeyDeletionColumn": datasets_errors.InvalidViewPrimaryKeyDeletionColumn, + "NotAllColumnsInPrimaryKeyArePresent": datasets_errors.NotAllColumnsInPrimaryKeyArePresent, + "ResourceNameAlreadyExists": filesystem_errors.ResourceNameAlreadyExists, + "ViewDatasetCleanupFailed": datasets_errors.ViewDatasetCleanupFailed, + "ViewNotFound": datasets_errors.ViewNotFound, + "ViewPrimaryKeyDeletionColumnNotInDatasetSchema": datasets_errors.ViewPrimaryKeyDeletionColumnNotInDatasetSchema, + "ViewPrimaryKeyMustContainAtLeastOneColumn": datasets_errors.ViewPrimaryKeyMustContainAtLeastOneColumn, + "ViewPrimaryKeyRequiresBackingDatasets": datasets_errors.ViewPrimaryKeyRequiresBackingDatasets, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + view_dataset_rid: datasets_models.DatasetRid, + *, + branch: typing.Optional[datasets_models.BranchName] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[datasets_models.View]: + """ + Get metadata for a View. + :param view_dataset_rid: The rid of the View. + :type view_dataset_rid: DatasetRid + :param branch: + :type branch: Optional[BranchName] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[datasets_models.View] + + :raises ViewNotFound: The requested View could not be found. Either the view does not exist, the branch is not valid or the client token does not have access to it. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/datasets/views/{viewDatasetRid}", + query_params={ + "branch": branch, + "preview": preview, + }, + path_params={ + "viewDatasetRid": view_dataset_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=datasets_models.View, + request_timeout=request_timeout, + throwable_errors={ + "ViewNotFound": datasets_errors.ViewNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def remove_backing_datasets( + self, + view_dataset_rid: datasets_models.DatasetRid, + *, + backing_datasets: typing.List[datasets_models.ViewBackingDataset], + branch: typing.Optional[datasets_models.BranchName] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[datasets_models.View]: + """ + Removes specified backing datasets from a View. Removing a dataset triggers a + [SNAPSHOT](https://palantir.com/docs/foundry/data-integration/datasets#snapshot) transaction on the next update. If a + specified dataset does not exist, no error is thrown. + + :param view_dataset_rid: The rid of the View. + :type view_dataset_rid: DatasetRid + :param backing_datasets: + :type backing_datasets: List[ViewBackingDataset] + :param branch: + :type branch: Optional[BranchName] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[datasets_models.View] + + :raises InputBackingDatasetNotInOutputViewProject: One or more backing datasets do not live in the same project as the view. Either move the input datasets to the same project as the view or add them as project references. + :raises InvalidViewBackingDataset: Either you do not have access to one or more of the backing datasets or it does not exist. + :raises RemoveBackingDatasetsPermissionDenied: Could not removeBackingDatasets the View. + :raises ViewNotFound: The requested View could not be found. Either the view does not exist, the branch is not valid or the client token does not have access to it. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/datasets/views/{viewDatasetRid}/removeBackingDatasets", + query_params={ + "preview": preview, + }, + path_params={ + "viewDatasetRid": view_dataset_rid, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=datasets_models.RemoveBackingDatasetsRequest( + branch=branch, + backing_datasets=backing_datasets, + ), + response_type=datasets_models.View, + request_timeout=request_timeout, + throwable_errors={ + "InputBackingDatasetNotInOutputViewProject": datasets_errors.InputBackingDatasetNotInOutputViewProject, + "InvalidViewBackingDataset": datasets_errors.InvalidViewBackingDataset, + "RemoveBackingDatasetsPermissionDenied": datasets_errors.RemoveBackingDatasetsPermissionDenied, + "ViewNotFound": datasets_errors.ViewNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def replace_backing_datasets( + self, + view_dataset_rid: datasets_models.DatasetRid, + *, + backing_datasets: typing.List[datasets_models.ViewBackingDataset], + branch: typing.Optional[datasets_models.BranchName] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[datasets_models.View]: + """ + Replaces the backing datasets for a View. Removing any backing dataset triggers a + [SNAPSHOT](https://palantir.com/docs/foundry/data-integration/datasets#snapshot) transaction the next time the View is updated. + + :param view_dataset_rid: The rid of the View. + :type view_dataset_rid: DatasetRid + :param backing_datasets: + :type backing_datasets: List[ViewBackingDataset] + :param branch: + :type branch: Optional[BranchName] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[datasets_models.View] + + :raises InputBackingDatasetNotInOutputViewProject: One or more backing datasets do not live in the same project as the view. Either move the input datasets to the same project as the view or add them as project references. + :raises InvalidViewBackingDataset: Either you do not have access to one or more of the backing datasets or it does not exist. + :raises ReplaceBackingDatasetsPermissionDenied: Could not replaceBackingDatasets the View. + :raises ViewNotFound: The requested View could not be found. Either the view does not exist, the branch is not valid or the client token does not have access to it. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="PUT", + resource_path="/v2/datasets/views/{viewDatasetRid}/replaceBackingDatasets", + query_params={ + "preview": preview, + }, + path_params={ + "viewDatasetRid": view_dataset_rid, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=datasets_models.ReplaceBackingDatasetsRequest( + branch=branch, + backing_datasets=backing_datasets, + ), + response_type=datasets_models.View, + request_timeout=request_timeout, + throwable_errors={ + "InputBackingDatasetNotInOutputViewProject": datasets_errors.InputBackingDatasetNotInOutputViewProject, + "InvalidViewBackingDataset": datasets_errors.InvalidViewBackingDataset, + "ReplaceBackingDatasetsPermissionDenied": datasets_errors.ReplaceBackingDatasetsPermissionDenied, + "ViewNotFound": datasets_errors.ViewNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _AsyncViewClientRaw: + def __init__(self, client: AsyncViewClient) -> None: + def add_backing_datasets(_: datasets_models.View): ... + def add_primary_key(_: datasets_models.View): ... + def create(_: datasets_models.View): ... + def get(_: datasets_models.View): ... + def remove_backing_datasets(_: datasets_models.View): ... + def replace_backing_datasets(_: datasets_models.View): ... + + self.add_backing_datasets = core.async_with_raw_response( + add_backing_datasets, client.add_backing_datasets + ) + self.add_primary_key = core.async_with_raw_response(add_primary_key, client.add_primary_key) + self.create = core.async_with_raw_response(create, client.create) + self.get = core.async_with_raw_response(get, client.get) + self.remove_backing_datasets = core.async_with_raw_response( + remove_backing_datasets, client.remove_backing_datasets + ) + self.replace_backing_datasets = core.async_with_raw_response( + replace_backing_datasets, client.replace_backing_datasets + ) + + +class _AsyncViewClientStreaming: + def __init__(self, client: AsyncViewClient) -> None: + def add_backing_datasets(_: datasets_models.View): ... + def add_primary_key(_: datasets_models.View): ... + def create(_: datasets_models.View): ... + def get(_: datasets_models.View): ... + def remove_backing_datasets(_: datasets_models.View): ... + def replace_backing_datasets(_: datasets_models.View): ... + + self.add_backing_datasets = core.async_with_streaming_response( + add_backing_datasets, client.add_backing_datasets + ) + self.add_primary_key = core.async_with_streaming_response( + add_primary_key, client.add_primary_key + ) + self.create = core.async_with_streaming_response(create, client.create) + self.get = core.async_with_streaming_response(get, client.get) + self.remove_backing_datasets = core.async_with_streaming_response( + remove_backing_datasets, client.remove_backing_datasets + ) + self.replace_backing_datasets = core.async_with_streaming_response( + replace_backing_datasets, client.replace_backing_datasets + ) diff --git a/foundry_sdk/v2/filesystem/__init__.py b/foundry_sdk/v2/filesystem/__init__.py new file mode 100644 index 000000000..26f3fb8b7 --- /dev/null +++ b/foundry_sdk/v2/filesystem/__init__.py @@ -0,0 +1,22 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +from foundry_sdk.v2.filesystem._client import AsyncFilesystemClient +from foundry_sdk.v2.filesystem._client import FilesystemClient + +__all__ = [ + "FilesystemClient", + "AsyncFilesystemClient", +] diff --git a/foundry_sdk/v2/filesystem/_client.py b/foundry_sdk/v2/filesystem/_client.py new file mode 100644 index 000000000..e74095e27 --- /dev/null +++ b/foundry_sdk/v2/filesystem/_client.py @@ -0,0 +1,108 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing +from functools import cached_property + +from foundry_sdk import _core as core + + +class FilesystemClient: + """ + The API client for the Filesystem Namespace. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + + @cached_property + def Folder(self): + from foundry_sdk.v2.filesystem.folder import FolderClient + + return FolderClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @cached_property + def Project(self): + from foundry_sdk.v2.filesystem.project import ProjectClient + + return ProjectClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @cached_property + def Resource(self): + from foundry_sdk.v2.filesystem.resource import ResourceClient + + return ResourceClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @cached_property + def Space(self): + from foundry_sdk.v2.filesystem.space import SpaceClient + + return SpaceClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + +class AsyncFilesystemClient: + """ + The Async API client for the Filesystem Namespace. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + from foundry_sdk.v2.filesystem.folder import AsyncFolderClient + from foundry_sdk.v2.filesystem.project import AsyncProjectClient + from foundry_sdk.v2.filesystem.resource import AsyncResourceClient + from foundry_sdk.v2.filesystem.space import AsyncSpaceClient + + self.Folder = AsyncFolderClient(auth=auth, hostname=hostname, config=config) + + self.Project = AsyncProjectClient(auth=auth, hostname=hostname, config=config) + + self.Resource = AsyncResourceClient(auth=auth, hostname=hostname, config=config) + + self.Space = AsyncSpaceClient(auth=auth, hostname=hostname, config=config) diff --git a/foundry_sdk/v2/filesystem/errors.py b/foundry_sdk/v2/filesystem/errors.py new file mode 100644 index 000000000..7b75f718f --- /dev/null +++ b/foundry_sdk/v2/filesystem/errors.py @@ -0,0 +1,1139 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing +from dataclasses import dataclass + +import typing_extensions + +from foundry_sdk import _errors as errors +from foundry_sdk.v2.core import models as core_models +from foundry_sdk.v2.filesystem import models as filesystem_models + + +class AddGroupToParentGroupPermissionDeniedParameters(typing_extensions.TypedDict): + """The user is not authorized to add a a group to the parent group required to create the project from template.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + parentGroupsWithoutPermission: typing.List[core_models.GroupRid] + + +@dataclass +class AddGroupToParentGroupPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["AddGroupToParentGroupPermissionDenied"] + parameters: AddGroupToParentGroupPermissionDeniedParameters + error_instance_id: str + + +class AddMarkingsPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not addMarkings the Resource.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + resourceRid: filesystem_models.ResourceRid + + +@dataclass +class AddMarkingsPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["AddMarkingsPermissionDenied"] + parameters: AddMarkingsPermissionDeniedParameters + error_instance_id: str + + +class AddOrganizationsPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not addOrganizations the Project.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + projectRid: filesystem_models.ProjectRid + + +@dataclass +class AddOrganizationsPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["AddOrganizationsPermissionDenied"] + parameters: AddOrganizationsPermissionDeniedParameters + error_instance_id: str + + +class AddResourceRolesPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not add the ResourceRole.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + resourceRid: filesystem_models.ResourceRid + + +@dataclass +class AddResourceRolesPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["AddResourceRolesPermissionDenied"] + parameters: AddResourceRolesPermissionDeniedParameters + error_instance_id: str + + +class CreateFolderOutsideProjectNotSupportedParameters(typing_extensions.TypedDict): + """The given Resource is not a folder.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + parentFolderRid: filesystem_models.FolderRid + + +@dataclass +class CreateFolderOutsideProjectNotSupported(errors.BadRequestError): + name: typing.Literal["CreateFolderOutsideProjectNotSupported"] + parameters: CreateFolderOutsideProjectNotSupportedParameters + error_instance_id: str + + +class CreateFolderPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not create the Folder.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class CreateFolderPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["CreateFolderPermissionDenied"] + parameters: CreateFolderPermissionDeniedParameters + error_instance_id: str + + +class CreateGroupPermissionDeniedParameters(typing_extensions.TypedDict): + """The user is not authorized to create the group in the organization required to create the project from template.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + organizationsWithoutPermission: typing.List[core_models.OrganizationRid] + + +@dataclass +class CreateGroupPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["CreateGroupPermissionDenied"] + parameters: CreateGroupPermissionDeniedParameters + error_instance_id: str + + +class CreateProjectFromTemplatePermissionDeniedParameters(typing_extensions.TypedDict): + """Could not createFromTemplate the Project.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class CreateProjectFromTemplatePermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["CreateProjectFromTemplatePermissionDenied"] + parameters: CreateProjectFromTemplatePermissionDeniedParameters + error_instance_id: str + + +class CreateProjectNoOwnerLikeRoleGrantParameters(typing_extensions.TypedDict): + """The create project request would create a project with no principal being granted an owner-like role. As a result, there would be no user with administrative privileges over the project. A role is defined to be owner-like if it has the `compass:edit-project` operation. In the common case of the default role-set, this is just the `compass:manage` role.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + grantedRoleIds: typing.List[core_models.RoleId] + roleSetOwnerLikeRoleIds: typing.List[core_models.RoleId] + + +@dataclass +class CreateProjectNoOwnerLikeRoleGrant(errors.BadRequestError): + name: typing.Literal["CreateProjectNoOwnerLikeRoleGrant"] + parameters: CreateProjectNoOwnerLikeRoleGrantParameters + error_instance_id: str + + +class CreateProjectPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not create the Project.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class CreateProjectPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["CreateProjectPermissionDenied"] + parameters: CreateProjectPermissionDeniedParameters + error_instance_id: str + + +class CreateSpacePermissionDeniedParameters(typing_extensions.TypedDict): + """Could not create the Space.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class CreateSpacePermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["CreateSpacePermissionDenied"] + parameters: CreateSpacePermissionDeniedParameters + error_instance_id: str + + +class DefaultRolesNotInSpaceRoleSetParameters(typing_extensions.TypedDict): + """The requested default roles are not in the role set of the space for the project template.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class DefaultRolesNotInSpaceRoleSet(errors.BadRequestError): + name: typing.Literal["DefaultRolesNotInSpaceRoleSet"] + parameters: DefaultRolesNotInSpaceRoleSetParameters + error_instance_id: str + + +class DeleteResourcePermissionDeniedParameters(typing_extensions.TypedDict): + """Could not delete the Resource.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + resourceRid: filesystem_models.ResourceRid + + +@dataclass +class DeleteResourcePermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["DeleteResourcePermissionDenied"] + parameters: DeleteResourcePermissionDeniedParameters + error_instance_id: str + + +class DeleteSpacePermissionDeniedParameters(typing_extensions.TypedDict): + """Could not delete the Space.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + spaceRid: filesystem_models.SpaceRid + + +@dataclass +class DeleteSpacePermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["DeleteSpacePermissionDenied"] + parameters: DeleteSpacePermissionDeniedParameters + error_instance_id: str + + +class EnrollmentNotFoundParameters(typing_extensions.TypedDict): + """An enrollment was not found for the user.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + enrollmentRid: core_models.EnrollmentRid + + +@dataclass +class EnrollmentNotFound(errors.NotFoundError): + name: typing.Literal["EnrollmentNotFound"] + parameters: EnrollmentNotFoundParameters + error_instance_id: str + + +class FolderNotFoundParameters(typing_extensions.TypedDict): + """The given Folder could not be found.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + folderRid: filesystem_models.FolderRid + + +@dataclass +class FolderNotFound(errors.NotFoundError): + name: typing.Literal["FolderNotFound"] + parameters: FolderNotFoundParameters + error_instance_id: str + + +class ForbiddenOperationOnAutosavedResourceParameters(typing_extensions.TypedDict): + """Performing this operation on an autosaved resource is not supported.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + resourceRid: filesystem_models.ResourceRid + + +@dataclass +class ForbiddenOperationOnAutosavedResource(errors.BadRequestError): + name: typing.Literal["ForbiddenOperationOnAutosavedResource"] + parameters: ForbiddenOperationOnAutosavedResourceParameters + error_instance_id: str + + +class ForbiddenOperationOnHiddenResourceParameters(typing_extensions.TypedDict): + """Performing this operation on a hidden resource is not supported.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + resourceRid: filesystem_models.ResourceRid + + +@dataclass +class ForbiddenOperationOnHiddenResource(errors.BadRequestError): + name: typing.Literal["ForbiddenOperationOnHiddenResource"] + parameters: ForbiddenOperationOnHiddenResourceParameters + error_instance_id: str + + +class GetAccessRequirementsPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not getAccessRequirements the Resource.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + resourceRid: filesystem_models.ResourceRid + + +@dataclass +class GetAccessRequirementsPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["GetAccessRequirementsPermissionDenied"] + parameters: GetAccessRequirementsPermissionDeniedParameters + error_instance_id: str + + +class GetByPathPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not getByPath the Resource.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class GetByPathPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["GetByPathPermissionDenied"] + parameters: GetByPathPermissionDeniedParameters + error_instance_id: str + + +class GetRootFolderNotSupportedParameters(typing_extensions.TypedDict): + """Getting the root folder as a resource is not supported.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class GetRootFolderNotSupported(errors.BadRequestError): + name: typing.Literal["GetRootFolderNotSupported"] + parameters: GetRootFolderNotSupportedParameters + error_instance_id: str + + +class GetSpaceResourceNotSupportedParameters(typing_extensions.TypedDict): + """Getting a space as a resource is not supported.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + spaceRid: filesystem_models.SpaceRid + + +@dataclass +class GetSpaceResourceNotSupported(errors.BadRequestError): + name: typing.Literal["GetSpaceResourceNotSupported"] + parameters: GetSpaceResourceNotSupportedParameters + error_instance_id: str + + +class InvalidDefaultRolesParameters(typing_extensions.TypedDict): + """Either the user has not passed default roles for a template with suggested default roles, or has passed default roles for a template with fixed default roles.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class InvalidDefaultRoles(errors.BadRequestError): + name: typing.Literal["InvalidDefaultRoles"] + parameters: InvalidDefaultRolesParameters + error_instance_id: str + + +class InvalidDescriptionParameters(typing_extensions.TypedDict): + """Either the user has not passed a value for a template with unset project description, or has passed a value for a template with fixed project description.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class InvalidDescription(errors.BadRequestError): + name: typing.Literal["InvalidDescription"] + parameters: InvalidDescriptionParameters + error_instance_id: str + + +class InvalidDisplayNameParameters(typing_extensions.TypedDict): + """ + The display name of a Resource should not be exactly `.` or `..`, contain a forward slash `/` and must be + less than or equal to 700 characters. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + displayName: filesystem_models.ResourceDisplayName + + +@dataclass +class InvalidDisplayName(errors.BadRequestError): + name: typing.Literal["InvalidDisplayName"] + parameters: InvalidDisplayNameParameters + error_instance_id: str + + +class InvalidFolderParameters(typing_extensions.TypedDict): + """The given Resource is not a Folder.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + resourceRid: filesystem_models.ResourceRid + + +@dataclass +class InvalidFolder(errors.BadRequestError): + name: typing.Literal["InvalidFolder"] + parameters: InvalidFolderParameters + error_instance_id: str + + +class InvalidOrganizationHierarchyParameters(typing_extensions.TypedDict): + """ + Organizations on a project must also exist on the parent space. This error is thrown if the configuration + of a project's organizations (on creation or subsequently) results in the project being marked with either + no organizations in a marked space, or with an organization that is not present on the parent space. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + organizationRids: typing.List[core_models.OrganizationRid] + + +@dataclass +class InvalidOrganizationHierarchy(errors.BadRequestError): + name: typing.Literal["InvalidOrganizationHierarchy"] + parameters: InvalidOrganizationHierarchyParameters + error_instance_id: str + + +class InvalidOrganizationsParameters(typing_extensions.TypedDict): + """Either the user has not passed organizations for a template with suggested organizations, or has passed organization for a template with fixed organizations.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class InvalidOrganizations(errors.BadRequestError): + name: typing.Literal["InvalidOrganizations"] + parameters: InvalidOrganizationsParameters + error_instance_id: str + + +class InvalidPathParameters(typing_extensions.TypedDict): + """ + The given path is invalid. + + A valid path has all components separated by a single `/`. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + path: filesystem_models.ResourcePath + + +@dataclass +class InvalidPath(errors.BadRequestError): + name: typing.Literal["InvalidPath"] + parameters: InvalidPathParameters + error_instance_id: str + + +class InvalidPrincipalIdsForGroupTemplateParameters(typing_extensions.TypedDict): + """The template requested for project creation contains principal IDs that do not exist.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + invalidPrincipalIds: typing.List[core_models.PrincipalId] + + +@dataclass +class InvalidPrincipalIdsForGroupTemplate(errors.BadRequestError): + name: typing.Literal["InvalidPrincipalIdsForGroupTemplate"] + parameters: InvalidPrincipalIdsForGroupTemplateParameters + error_instance_id: str + + +class InvalidRoleIdsParameters(typing_extensions.TypedDict): + """A roleId referenced in either default roles or role grants does not exist in the project role set for the space.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + requestedRoleIds: typing.List[core_models.RoleId] + """All referenced role ids in the create project request.""" + + +@dataclass +class InvalidRoleIds(errors.BadRequestError): + name: typing.Literal["InvalidRoleIds"] + parameters: InvalidRoleIdsParameters + error_instance_id: str + + +class InvalidVariableParameters(typing_extensions.TypedDict): + """A variable referenced in the request to create project from template is not defined on the template.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + templateVariableId: str + + +@dataclass +class InvalidVariable(errors.BadRequestError): + name: typing.Literal["InvalidVariable"] + parameters: InvalidVariableParameters + error_instance_id: str + + +class InvalidVariableEnumOptionParameters(typing_extensions.TypedDict): + """The value passed in the request to create project from template for an enum type variable is not a valid option.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + variableId: str + invalidOption: str + validOptions: typing.List[str] + + +@dataclass +class InvalidVariableEnumOption(errors.BadRequestError): + name: typing.Literal["InvalidVariableEnumOption"] + parameters: InvalidVariableEnumOptionParameters + error_instance_id: str + + +class MarkingNotFoundParameters(typing_extensions.TypedDict): + """A provided marking ID cannot be found.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + markingIds: typing.List[core_models.MarkingId] + + +@dataclass +class MarkingNotFound(errors.NotFoundError): + name: typing.Literal["MarkingNotFound"] + parameters: MarkingNotFoundParameters + error_instance_id: str + + +class MissingDisplayNameParameters(typing_extensions.TypedDict): + """A Display Name must be provided.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class MissingDisplayName(errors.BadRequestError): + name: typing.Literal["MissingDisplayName"] + parameters: MissingDisplayNameParameters + error_instance_id: str + + +class MissingVariableValueParameters(typing_extensions.TypedDict): + """A variable defined on the template requested for project creation does not have a value set in the request.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + templateVariableId: str + + +@dataclass +class MissingVariableValue(errors.BadRequestError): + name: typing.Literal["MissingVariableValue"] + parameters: MissingVariableValueParameters + error_instance_id: str + + +class NotAuthorizedToApplyOrganizationParameters(typing_extensions.TypedDict): + """The user is not authorized to apply at least one of the organization markings required to create the project from template.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + organizationRids: typing.List[core_models.OrganizationRid] + + +@dataclass +class NotAuthorizedToApplyOrganization(errors.BadRequestError): + name: typing.Literal["NotAuthorizedToApplyOrganization"] + parameters: NotAuthorizedToApplyOrganizationParameters + error_instance_id: str + + +class OrganizationCannotBeRemovedParameters(typing_extensions.TypedDict): + """ + An organization cannot be removed from a project if it would result in a project with no organizations + under a space marked with an organization. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + organizationRids: typing.List[core_models.OrganizationRid] + + +@dataclass +class OrganizationCannotBeRemoved(errors.BadRequestError): + name: typing.Literal["OrganizationCannotBeRemoved"] + parameters: OrganizationCannotBeRemovedParameters + error_instance_id: str + + +class OrganizationMarkingNotOnSpaceParameters(typing_extensions.TypedDict): + """At least one of the organization markings associated with a passed organization is not applied on the requested space.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + spaceRid: filesystem_models.SpaceRid + organizationRids: typing.List[core_models.OrganizationRid] + + +@dataclass +class OrganizationMarkingNotOnSpace(errors.BadRequestError): + name: typing.Literal["OrganizationMarkingNotOnSpace"] + parameters: OrganizationMarkingNotOnSpaceParameters + error_instance_id: str + + +class OrganizationMarkingNotSupportedParameters(typing_extensions.TypedDict): + """ + Adding an organization marking as a regular marking is not supported. Use the organization endpoints on a + project resource instead. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + markingIds: typing.List[core_models.MarkingId] + + +@dataclass +class OrganizationMarkingNotSupported(errors.BadRequestError): + name: typing.Literal["OrganizationMarkingNotSupported"] + parameters: OrganizationMarkingNotSupportedParameters + error_instance_id: str + + +class OrganizationsNotFoundParameters(typing_extensions.TypedDict): + """At least one organization RID could not be found.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + organizationRids: typing.List[core_models.OrganizationRid] + + +@dataclass +class OrganizationsNotFound(errors.NotFoundError): + name: typing.Literal["OrganizationsNotFound"] + parameters: OrganizationsNotFoundParameters + error_instance_id: str + + +class PathNotFoundParameters(typing_extensions.TypedDict): + """The given path could not be found.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + path: filesystem_models.ResourcePath + + +@dataclass +class PathNotFound(errors.NotFoundError): + name: typing.Literal["PathNotFound"] + parameters: PathNotFoundParameters + error_instance_id: str + + +class PermanentlyDeleteResourcePermissionDeniedParameters(typing_extensions.TypedDict): + """Could not permanentlyDelete the Resource.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + resourceRid: filesystem_models.ResourceRid + + +@dataclass +class PermanentlyDeleteResourcePermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["PermanentlyDeleteResourcePermissionDenied"] + parameters: PermanentlyDeleteResourcePermissionDeniedParameters + error_instance_id: str + + +class ProjectCreationNotSupportedParameters(typing_extensions.TypedDict): + """Project creation is not supported in the current user's space.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + spaceRid: filesystem_models.SpaceRid + + +@dataclass +class ProjectCreationNotSupported(errors.BadRequestError): + name: typing.Literal["ProjectCreationNotSupported"] + parameters: ProjectCreationNotSupportedParameters + error_instance_id: str + + +class ProjectNameAlreadyExistsParameters(typing_extensions.TypedDict): + """The requested display name for the created project is already being used in the space.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + displayName: filesystem_models.ResourceDisplayName + spaceRid: filesystem_models.SpaceRid + + +@dataclass +class ProjectNameAlreadyExists(errors.ConflictError): + name: typing.Literal["ProjectNameAlreadyExists"] + parameters: ProjectNameAlreadyExistsParameters + error_instance_id: str + + +class ProjectNotFoundParameters(typing_extensions.TypedDict): + """The given Project could not be found.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + projectRid: filesystem_models.ProjectRid + + +@dataclass +class ProjectNotFound(errors.NotFoundError): + name: typing.Literal["ProjectNotFound"] + parameters: ProjectNotFoundParameters + error_instance_id: str + + +class ProjectTemplateNotFoundParameters(typing_extensions.TypedDict): + """The project template RID referenced cannot be found.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + projectTemplateRid: filesystem_models.ProjectTemplateRid + + +@dataclass +class ProjectTemplateNotFound(errors.NotFoundError): + name: typing.Literal["ProjectTemplateNotFound"] + parameters: ProjectTemplateNotFoundParameters + error_instance_id: str + + +class RemoveMarkingsPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not removeMarkings the Resource.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + resourceRid: filesystem_models.ResourceRid + + +@dataclass +class RemoveMarkingsPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["RemoveMarkingsPermissionDenied"] + parameters: RemoveMarkingsPermissionDeniedParameters + error_instance_id: str + + +class RemoveOrganizationsPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not removeOrganizations the Project.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + projectRid: filesystem_models.ProjectRid + + +@dataclass +class RemoveOrganizationsPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["RemoveOrganizationsPermissionDenied"] + parameters: RemoveOrganizationsPermissionDeniedParameters + error_instance_id: str + + +class RemoveResourceRolesPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not remove the ResourceRole.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + resourceRid: filesystem_models.ResourceRid + + +@dataclass +class RemoveResourceRolesPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["RemoveResourceRolesPermissionDenied"] + parameters: RemoveResourceRolesPermissionDeniedParameters + error_instance_id: str + + +class ReplaceProjectPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not replace the Project.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + projectRid: filesystem_models.ProjectRid + + +@dataclass +class ReplaceProjectPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["ReplaceProjectPermissionDenied"] + parameters: ReplaceProjectPermissionDeniedParameters + error_instance_id: str + + +class ReplaceSpacePermissionDeniedParameters(typing_extensions.TypedDict): + """Could not replace the Space.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + spaceRid: filesystem_models.SpaceRid + + +@dataclass +class ReplaceSpacePermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["ReplaceSpacePermissionDenied"] + parameters: ReplaceSpacePermissionDeniedParameters + error_instance_id: str + + +class ReservedSpaceCannotBeReplacedParameters(typing_extensions.TypedDict): + """The spaceRid provided is for a reserved space in Foundry which cannot be replaced.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class ReservedSpaceCannotBeReplaced(errors.BadRequestError): + name: typing.Literal["ReservedSpaceCannotBeReplaced"] + parameters: ReservedSpaceCannotBeReplacedParameters + error_instance_id: str + + +class ResourceNameAlreadyExistsParameters(typing_extensions.TypedDict): + """The provided resource name is already in use by another resource in the same folder.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + parentFolderRid: filesystem_models.FolderRid + displayName: str + + +@dataclass +class ResourceNameAlreadyExists(errors.ConflictError): + name: typing.Literal["ResourceNameAlreadyExists"] + parameters: ResourceNameAlreadyExistsParameters + error_instance_id: str + + +class ResourceNotDirectlyTrashedParameters(typing_extensions.TypedDict): + """The Resource is not directly trashed.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + resourceRid: filesystem_models.ResourceRid + + +@dataclass +class ResourceNotDirectlyTrashed(errors.BadRequestError): + name: typing.Literal["ResourceNotDirectlyTrashed"] + parameters: ResourceNotDirectlyTrashedParameters + error_instance_id: str + + +class ResourceNotFoundParameters(typing_extensions.TypedDict): + """The given Resource could not be found.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + resourceRid: filesystem_models.ResourceRid + + +@dataclass +class ResourceNotFound(errors.NotFoundError): + name: typing.Literal["ResourceNotFound"] + parameters: ResourceNotFoundParameters + error_instance_id: str + + +class ResourceNotTrashedParameters(typing_extensions.TypedDict): + """The Resource should be directly trashed before being permanently deleted.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + resourceRid: filesystem_models.ResourceRid + + +@dataclass +class ResourceNotTrashed(errors.BadRequestError): + name: typing.Literal["ResourceNotTrashed"] + parameters: ResourceNotTrashedParameters + error_instance_id: str + + +class RestoreResourcePermissionDeniedParameters(typing_extensions.TypedDict): + """Could not restore the Resource.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + resourceRid: filesystem_models.ResourceRid + + +@dataclass +class RestoreResourcePermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["RestoreResourcePermissionDenied"] + parameters: RestoreResourcePermissionDeniedParameters + error_instance_id: str + + +class RoleSetNotFoundParameters(typing_extensions.TypedDict): + """The role set provided in the request to create or replace a space could not be found.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + roleSetRid: core_models.RoleSetId + + +@dataclass +class RoleSetNotFound(errors.NotFoundError): + name: typing.Literal["RoleSetNotFound"] + parameters: RoleSetNotFoundParameters + error_instance_id: str + + +class SpaceInternalErrorParameters(typing_extensions.TypedDict): + """An internal error occurred when trying to create or replace the space.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class SpaceInternalError(errors.InternalServerError): + name: typing.Literal["SpaceInternalError"] + parameters: SpaceInternalErrorParameters + error_instance_id: str + + +class SpaceInvalidArgumentParameters(typing_extensions.TypedDict): + """An invalid argument was provided in the request to create or replace a space.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class SpaceInvalidArgument(errors.BadRequestError): + name: typing.Literal["SpaceInvalidArgument"] + parameters: SpaceInvalidArgumentParameters + error_instance_id: str + + +class SpaceNameInvalidParameters(typing_extensions.TypedDict): + """The provided space name is invalid. It may be a reserved name or contain invalid characters.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class SpaceNameInvalid(errors.BadRequestError): + name: typing.Literal["SpaceNameInvalid"] + parameters: SpaceNameInvalidParameters + error_instance_id: str + + +class SpaceNotEmptyParameters(typing_extensions.TypedDict): + """The space cannot be deleted because it contains resources.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + spaceRid: filesystem_models.SpaceRid + + +@dataclass +class SpaceNotEmpty(errors.InternalServerError): + name: typing.Literal["SpaceNotEmpty"] + parameters: SpaceNotEmptyParameters + error_instance_id: str + + +class SpaceNotFoundParameters(typing_extensions.TypedDict): + """The given Space could not be found.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + spaceRid: filesystem_models.SpaceRid + + +@dataclass +class SpaceNotFound(errors.NotFoundError): + name: typing.Literal["SpaceNotFound"] + parameters: SpaceNotFoundParameters + error_instance_id: str + + +class TemplateGroupNameConflictParameters(typing_extensions.TypedDict): + """Creating the project from template would attempt to create new groups with names conflicting either with other new groups, or existing groups.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + conflictingGroupNames: typing.List[core_models.GroupName] + + +@dataclass +class TemplateGroupNameConflict(errors.ConflictError): + name: typing.Literal["TemplateGroupNameConflict"] + parameters: TemplateGroupNameConflictParameters + error_instance_id: str + + +class TemplateMarkingNameConflictParameters(typing_extensions.TypedDict): + """Creating the project from template would attempt to create new markings with names conflicting either with other new markings, or existing markings.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + conflictingMarkingNames: typing.List[str] + + +@dataclass +class TemplateMarkingNameConflict(errors.ConflictError): + name: typing.Literal["TemplateMarkingNameConflict"] + parameters: TemplateMarkingNameConflictParameters + error_instance_id: str + + +class TrashingAutosavedResourcesNotSupportedParameters(typing_extensions.TypedDict): + """Auto-saved Resources cannot be trashed.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + resourceRid: filesystem_models.ResourceRid + + +@dataclass +class TrashingAutosavedResourcesNotSupported(errors.BadRequestError): + name: typing.Literal["TrashingAutosavedResourcesNotSupported"] + parameters: TrashingAutosavedResourcesNotSupportedParameters + error_instance_id: str + + +class TrashingHiddenResourcesNotSupportedParameters(typing_extensions.TypedDict): + """Hidden Resources cannot be trashed.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + resourceRid: filesystem_models.ResourceRid + + +@dataclass +class TrashingHiddenResourcesNotSupported(errors.BadRequestError): + name: typing.Literal["TrashingHiddenResourcesNotSupported"] + parameters: TrashingHiddenResourcesNotSupportedParameters + error_instance_id: str + + +class TrashingSpaceNotSupportedParameters(typing_extensions.TypedDict): + """Spaces cannot be trashed.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + resourceRid: filesystem_models.ResourceRid + + +@dataclass +class TrashingSpaceNotSupported(errors.BadRequestError): + name: typing.Literal["TrashingSpaceNotSupported"] + parameters: TrashingSpaceNotSupportedParameters + error_instance_id: str + + +class UsageAccountServiceIsNotPresentParameters(typing_extensions.TypedDict): + """The Usage Accounts service is unexpectedly not present.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class UsageAccountServiceIsNotPresent(errors.InternalServerError): + name: typing.Literal["UsageAccountServiceIsNotPresent"] + parameters: UsageAccountServiceIsNotPresentParameters + error_instance_id: str + + +__all__ = [ + "AddGroupToParentGroupPermissionDenied", + "AddMarkingsPermissionDenied", + "AddOrganizationsPermissionDenied", + "AddResourceRolesPermissionDenied", + "CreateFolderOutsideProjectNotSupported", + "CreateFolderPermissionDenied", + "CreateGroupPermissionDenied", + "CreateProjectFromTemplatePermissionDenied", + "CreateProjectNoOwnerLikeRoleGrant", + "CreateProjectPermissionDenied", + "CreateSpacePermissionDenied", + "DefaultRolesNotInSpaceRoleSet", + "DeleteResourcePermissionDenied", + "DeleteSpacePermissionDenied", + "EnrollmentNotFound", + "FolderNotFound", + "ForbiddenOperationOnAutosavedResource", + "ForbiddenOperationOnHiddenResource", + "GetAccessRequirementsPermissionDenied", + "GetByPathPermissionDenied", + "GetRootFolderNotSupported", + "GetSpaceResourceNotSupported", + "InvalidDefaultRoles", + "InvalidDescription", + "InvalidDisplayName", + "InvalidFolder", + "InvalidOrganizationHierarchy", + "InvalidOrganizations", + "InvalidPath", + "InvalidPrincipalIdsForGroupTemplate", + "InvalidRoleIds", + "InvalidVariable", + "InvalidVariableEnumOption", + "MarkingNotFound", + "MissingDisplayName", + "MissingVariableValue", + "NotAuthorizedToApplyOrganization", + "OrganizationCannotBeRemoved", + "OrganizationMarkingNotOnSpace", + "OrganizationMarkingNotSupported", + "OrganizationsNotFound", + "PathNotFound", + "PermanentlyDeleteResourcePermissionDenied", + "ProjectCreationNotSupported", + "ProjectNameAlreadyExists", + "ProjectNotFound", + "ProjectTemplateNotFound", + "RemoveMarkingsPermissionDenied", + "RemoveOrganizationsPermissionDenied", + "RemoveResourceRolesPermissionDenied", + "ReplaceProjectPermissionDenied", + "ReplaceSpacePermissionDenied", + "ReservedSpaceCannotBeReplaced", + "ResourceNameAlreadyExists", + "ResourceNotDirectlyTrashed", + "ResourceNotFound", + "ResourceNotTrashed", + "RestoreResourcePermissionDenied", + "RoleSetNotFound", + "SpaceInternalError", + "SpaceInvalidArgument", + "SpaceNameInvalid", + "SpaceNotEmpty", + "SpaceNotFound", + "TemplateGroupNameConflict", + "TemplateMarkingNameConflict", + "TrashingAutosavedResourcesNotSupported", + "TrashingHiddenResourcesNotSupported", + "TrashingSpaceNotSupported", + "UsageAccountServiceIsNotPresent", +] diff --git a/foundry_sdk/v2/filesystem/folder.py b/foundry_sdk/v2/filesystem/folder.py new file mode 100644 index 000000000..ee728bc80 --- /dev/null +++ b/foundry_sdk/v2/filesystem/folder.py @@ -0,0 +1,598 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing + +import annotated_types +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v2.core import models as core_models +from foundry_sdk.v2.filesystem import errors as filesystem_errors +from foundry_sdk.v2.filesystem import models as filesystem_models + + +class FolderClient: + """ + The API client for the Folder Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _FolderClientStreaming(self) + self.with_raw_response = _FolderClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def children( + self, + folder_rid: filesystem_models.FolderRid, + *, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.ResourceIterator[filesystem_models.Resource]: + """ + List all child Resources of the Folder. + + This is a paged endpoint. The page size will be limited to 2,000 results per page. If no page size is + provided, this page size will also be used as the default. + + :param folder_rid: + :type folder_rid: FolderRid + :param page_size: The page size to use for the endpoint. + :type page_size: Optional[PageSize] + :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. + :type page_token: Optional[PageToken] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.ResourceIterator[filesystem_models.Resource] + + :raises FolderNotFound: The given Folder could not be found. + :raises GetRootFolderNotSupported: Getting the root folder as a resource is not supported. + :raises GetSpaceResourceNotSupported: Getting a space as a resource is not supported. + :raises InvalidFolder: The given Resource is not a Folder. + :raises ResourceNotFound: The given Resource could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/filesystem/folders/{folderRid}/children", + query_params={ + "pageSize": page_size, + "pageToken": page_token, + "preview": preview, + }, + path_params={ + "folderRid": folder_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=filesystem_models.ListChildrenOfFolderResponse, + request_timeout=request_timeout, + throwable_errors={ + "FolderNotFound": filesystem_errors.FolderNotFound, + "GetRootFolderNotSupported": filesystem_errors.GetRootFolderNotSupported, + "GetSpaceResourceNotSupported": filesystem_errors.GetSpaceResourceNotSupported, + "InvalidFolder": filesystem_errors.InvalidFolder, + "ResourceNotFound": filesystem_errors.ResourceNotFound, + }, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def create( + self, + *, + display_name: filesystem_models.ResourceDisplayName, + parent_folder_rid: filesystem_models.FolderRid, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> filesystem_models.Folder: + """ + Creates a new Folder. + :param display_name: + :type display_name: ResourceDisplayName + :param parent_folder_rid: The parent folder Resource Identifier (RID). For Projects, this will be the Space RID and for Spaces, this value will be the root folder (`ri.compass.main.folder.0`). + :type parent_folder_rid: FolderRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: filesystem_models.Folder + + :raises CreateFolderOutsideProjectNotSupported: The given Resource is not a folder. + :raises CreateFolderPermissionDenied: Could not create the Folder. + :raises FolderNotFound: The given Folder could not be found. + :raises GetRootFolderNotSupported: Getting the root folder as a resource is not supported. + :raises InvalidDisplayName: The display name of a Resource should not be exactly `.` or `..`, contain a forward slash `/` and must be less than or equal to 700 characters. + :raises InvalidFolder: The given Resource is not a Folder. + :raises MissingDisplayName: A Display Name must be provided. + :raises ResourceNameAlreadyExists: The provided resource name is already in use by another resource in the same folder. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/filesystem/folders", + query_params={ + "preview": preview, + }, + path_params={}, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=filesystem_models.CreateFolderRequest( + parent_folder_rid=parent_folder_rid, + display_name=display_name, + ), + response_type=filesystem_models.Folder, + request_timeout=request_timeout, + throwable_errors={ + "CreateFolderOutsideProjectNotSupported": filesystem_errors.CreateFolderOutsideProjectNotSupported, + "CreateFolderPermissionDenied": filesystem_errors.CreateFolderPermissionDenied, + "FolderNotFound": filesystem_errors.FolderNotFound, + "GetRootFolderNotSupported": filesystem_errors.GetRootFolderNotSupported, + "InvalidDisplayName": filesystem_errors.InvalidDisplayName, + "InvalidFolder": filesystem_errors.InvalidFolder, + "MissingDisplayName": filesystem_errors.MissingDisplayName, + "ResourceNameAlreadyExists": filesystem_errors.ResourceNameAlreadyExists, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + folder_rid: filesystem_models.FolderRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> filesystem_models.Folder: + """ + Get the Folder with the specified rid. + :param folder_rid: + :type folder_rid: FolderRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: filesystem_models.Folder + + :raises FolderNotFound: The given Folder could not be found. + :raises GetRootFolderNotSupported: Getting the root folder as a resource is not supported. + :raises InvalidFolder: The given Resource is not a Folder. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/filesystem/folders/{folderRid}", + query_params={ + "preview": preview, + }, + path_params={ + "folderRid": folder_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=filesystem_models.Folder, + request_timeout=request_timeout, + throwable_errors={ + "FolderNotFound": filesystem_errors.FolderNotFound, + "GetRootFolderNotSupported": filesystem_errors.GetRootFolderNotSupported, + "InvalidFolder": filesystem_errors.InvalidFolder, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get_batch( + self, + body: typing_extensions.Annotated[ + typing.List[filesystem_models.GetFoldersBatchRequestElement], + annotated_types.Len(min_length=1, max_length=1000), + ], + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> filesystem_models.GetFoldersBatchResponse: + """ + Fetches multiple folders in a single request. + + + The maximum batch size for this endpoint is 1000. + :param body: Body of the request + :type body: List[GetFoldersBatchRequestElement] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: filesystem_models.GetFoldersBatchResponse + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/filesystem/folders/getBatch", + query_params={ + "preview": preview, + }, + path_params={}, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=body, + response_type=filesystem_models.GetFoldersBatchResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _FolderClientRaw: + def __init__(self, client: FolderClient) -> None: + def children(_: filesystem_models.ListChildrenOfFolderResponse): ... + def create(_: filesystem_models.Folder): ... + def get(_: filesystem_models.Folder): ... + def get_batch(_: filesystem_models.GetFoldersBatchResponse): ... + + self.children = core.with_raw_response(children, client.children) + self.create = core.with_raw_response(create, client.create) + self.get = core.with_raw_response(get, client.get) + self.get_batch = core.with_raw_response(get_batch, client.get_batch) + + +class _FolderClientStreaming: + def __init__(self, client: FolderClient) -> None: + def children(_: filesystem_models.ListChildrenOfFolderResponse): ... + def create(_: filesystem_models.Folder): ... + def get(_: filesystem_models.Folder): ... + def get_batch(_: filesystem_models.GetFoldersBatchResponse): ... + + self.children = core.with_streaming_response(children, client.children) + self.create = core.with_streaming_response(create, client.create) + self.get = core.with_streaming_response(get, client.get) + self.get_batch = core.with_streaming_response(get_batch, client.get_batch) + + +class AsyncFolderClient: + """ + The API client for the Folder Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncFolderClientStreaming(self) + self.with_raw_response = _AsyncFolderClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def children( + self, + folder_rid: filesystem_models.FolderRid, + *, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.AsyncResourceIterator[filesystem_models.Resource]: + """ + List all child Resources of the Folder. + + This is a paged endpoint. The page size will be limited to 2,000 results per page. If no page size is + provided, this page size will also be used as the default. + + :param folder_rid: + :type folder_rid: FolderRid + :param page_size: The page size to use for the endpoint. + :type page_size: Optional[PageSize] + :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. + :type page_token: Optional[PageToken] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.AsyncResourceIterator[filesystem_models.Resource] + + :raises FolderNotFound: The given Folder could not be found. + :raises GetRootFolderNotSupported: Getting the root folder as a resource is not supported. + :raises GetSpaceResourceNotSupported: Getting a space as a resource is not supported. + :raises InvalidFolder: The given Resource is not a Folder. + :raises ResourceNotFound: The given Resource could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/filesystem/folders/{folderRid}/children", + query_params={ + "pageSize": page_size, + "pageToken": page_token, + "preview": preview, + }, + path_params={ + "folderRid": folder_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=filesystem_models.ListChildrenOfFolderResponse, + request_timeout=request_timeout, + throwable_errors={ + "FolderNotFound": filesystem_errors.FolderNotFound, + "GetRootFolderNotSupported": filesystem_errors.GetRootFolderNotSupported, + "GetSpaceResourceNotSupported": filesystem_errors.GetSpaceResourceNotSupported, + "InvalidFolder": filesystem_errors.InvalidFolder, + "ResourceNotFound": filesystem_errors.ResourceNotFound, + }, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def create( + self, + *, + display_name: filesystem_models.ResourceDisplayName, + parent_folder_rid: filesystem_models.FolderRid, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[filesystem_models.Folder]: + """ + Creates a new Folder. + :param display_name: + :type display_name: ResourceDisplayName + :param parent_folder_rid: The parent folder Resource Identifier (RID). For Projects, this will be the Space RID and for Spaces, this value will be the root folder (`ri.compass.main.folder.0`). + :type parent_folder_rid: FolderRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[filesystem_models.Folder] + + :raises CreateFolderOutsideProjectNotSupported: The given Resource is not a folder. + :raises CreateFolderPermissionDenied: Could not create the Folder. + :raises FolderNotFound: The given Folder could not be found. + :raises GetRootFolderNotSupported: Getting the root folder as a resource is not supported. + :raises InvalidDisplayName: The display name of a Resource should not be exactly `.` or `..`, contain a forward slash `/` and must be less than or equal to 700 characters. + :raises InvalidFolder: The given Resource is not a Folder. + :raises MissingDisplayName: A Display Name must be provided. + :raises ResourceNameAlreadyExists: The provided resource name is already in use by another resource in the same folder. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/filesystem/folders", + query_params={ + "preview": preview, + }, + path_params={}, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=filesystem_models.CreateFolderRequest( + parent_folder_rid=parent_folder_rid, + display_name=display_name, + ), + response_type=filesystem_models.Folder, + request_timeout=request_timeout, + throwable_errors={ + "CreateFolderOutsideProjectNotSupported": filesystem_errors.CreateFolderOutsideProjectNotSupported, + "CreateFolderPermissionDenied": filesystem_errors.CreateFolderPermissionDenied, + "FolderNotFound": filesystem_errors.FolderNotFound, + "GetRootFolderNotSupported": filesystem_errors.GetRootFolderNotSupported, + "InvalidDisplayName": filesystem_errors.InvalidDisplayName, + "InvalidFolder": filesystem_errors.InvalidFolder, + "MissingDisplayName": filesystem_errors.MissingDisplayName, + "ResourceNameAlreadyExists": filesystem_errors.ResourceNameAlreadyExists, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + folder_rid: filesystem_models.FolderRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[filesystem_models.Folder]: + """ + Get the Folder with the specified rid. + :param folder_rid: + :type folder_rid: FolderRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[filesystem_models.Folder] + + :raises FolderNotFound: The given Folder could not be found. + :raises GetRootFolderNotSupported: Getting the root folder as a resource is not supported. + :raises InvalidFolder: The given Resource is not a Folder. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/filesystem/folders/{folderRid}", + query_params={ + "preview": preview, + }, + path_params={ + "folderRid": folder_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=filesystem_models.Folder, + request_timeout=request_timeout, + throwable_errors={ + "FolderNotFound": filesystem_errors.FolderNotFound, + "GetRootFolderNotSupported": filesystem_errors.GetRootFolderNotSupported, + "InvalidFolder": filesystem_errors.InvalidFolder, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get_batch( + self, + body: typing_extensions.Annotated[ + typing.List[filesystem_models.GetFoldersBatchRequestElement], + annotated_types.Len(min_length=1, max_length=1000), + ], + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[filesystem_models.GetFoldersBatchResponse]: + """ + Fetches multiple folders in a single request. + + + The maximum batch size for this endpoint is 1000. + :param body: Body of the request + :type body: List[GetFoldersBatchRequestElement] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[filesystem_models.GetFoldersBatchResponse] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/filesystem/folders/getBatch", + query_params={ + "preview": preview, + }, + path_params={}, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=body, + response_type=filesystem_models.GetFoldersBatchResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _AsyncFolderClientRaw: + def __init__(self, client: AsyncFolderClient) -> None: + def children(_: filesystem_models.ListChildrenOfFolderResponse): ... + def create(_: filesystem_models.Folder): ... + def get(_: filesystem_models.Folder): ... + def get_batch(_: filesystem_models.GetFoldersBatchResponse): ... + + self.children = core.async_with_raw_response(children, client.children) + self.create = core.async_with_raw_response(create, client.create) + self.get = core.async_with_raw_response(get, client.get) + self.get_batch = core.async_with_raw_response(get_batch, client.get_batch) + + +class _AsyncFolderClientStreaming: + def __init__(self, client: AsyncFolderClient) -> None: + def children(_: filesystem_models.ListChildrenOfFolderResponse): ... + def create(_: filesystem_models.Folder): ... + def get(_: filesystem_models.Folder): ... + def get_batch(_: filesystem_models.GetFoldersBatchResponse): ... + + self.children = core.async_with_streaming_response(children, client.children) + self.create = core.async_with_streaming_response(create, client.create) + self.get = core.async_with_streaming_response(get, client.get) + self.get_batch = core.async_with_streaming_response(get_batch, client.get_batch) diff --git a/foundry_sdk/v2/filesystem/models.py b/foundry_sdk/v2/filesystem/models.py new file mode 100644 index 000000000..881589b68 --- /dev/null +++ b/foundry_sdk/v2/filesystem/models.py @@ -0,0 +1,668 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk.v2.core import models as core_models + + +class AccessRequirements(core.ModelBase): + """ + Access requirements for a resource are composed of Markings and Organizations. Organizations are disjunctive, + while Markings are conjunctive. + """ + + organizations: typing.List[Organization] + markings: typing.List[Marking] + + +class AddMarkingsRequest(core.ModelBase): + """AddMarkingsRequest""" + + marking_ids: typing.List[core_models.MarkingId] = pydantic.Field(alias=str("markingIds")) # type: ignore[literal-required] + + +class AddOrganizationsRequest(core.ModelBase): + """AddOrganizationsRequest""" + + organization_rids: typing.List[core_models.OrganizationRid] = pydantic.Field(alias=str("organizationRids")) # type: ignore[literal-required] + + +class AddResourceRolesRequest(core.ModelBase): + """AddResourceRolesRequest""" + + roles: typing.List[ResourceRoleIdentifier] + + +class CreateFolderRequest(core.ModelBase): + """CreateFolderRequest""" + + parent_folder_rid: FolderRid = pydantic.Field(alias=str("parentFolderRid")) # type: ignore[literal-required] + """ + The parent folder Resource Identifier (RID). For Projects, this will be the Space RID and for Spaces, + this value will be the root folder (`ri.compass.main.folder.0`). + """ + + display_name: ResourceDisplayName = pydantic.Field(alias=str("displayName")) # type: ignore[literal-required] + + +class CreateProjectFromTemplateRequest(core.ModelBase): + """CreateProjectFromTemplateRequest""" + + template_rid: ProjectTemplateRid = pydantic.Field(alias=str("templateRid")) # type: ignore[literal-required] + variable_values: typing.Dict[ProjectTemplateVariableId, ProjectTemplateVariableValue] = pydantic.Field(alias=str("variableValues")) # type: ignore[literal-required] + default_roles: typing.Optional[typing.List[core_models.RoleId]] = pydantic.Field(alias=str("defaultRoles"), default=None) # type: ignore[literal-required] + organization_rids: typing.Optional[typing.List[core_models.OrganizationRid]] = pydantic.Field(alias=str("organizationRids"), default=None) # type: ignore[literal-required] + project_description: typing.Optional[str] = pydantic.Field(alias=str("projectDescription"), default=None) # type: ignore[literal-required] + + +class CreateProjectRequest(core.ModelBase): + """CreateProjectRequest""" + + display_name: ResourceDisplayName = pydantic.Field(alias=str("displayName")) # type: ignore[literal-required] + description: typing.Optional[str] = None + space_rid: SpaceRid = pydantic.Field(alias=str("spaceRid")) # type: ignore[literal-required] + role_grants: typing.Dict[core_models.RoleId, typing.List[PrincipalWithId]] = pydantic.Field(alias=str("roleGrants")) # type: ignore[literal-required] + default_roles: typing.List[core_models.RoleId] = pydantic.Field(alias=str("defaultRoles")) # type: ignore[literal-required] + organization_rids: typing.List[core_models.OrganizationRid] = pydantic.Field(alias=str("organizationRids")) # type: ignore[literal-required] + + +class CreateSpaceRequest(core.ModelBase): + """CreateSpaceRequest""" + + enrollment_rid: core_models.EnrollmentRid = pydantic.Field(alias=str("enrollmentRid")) # type: ignore[literal-required] + """The RID of the Enrollment that this Space belongs to.""" + + usage_account_rid: typing.Optional[UsageAccountRid] = pydantic.Field(alias=str("usageAccountRid"), default=None) # type: ignore[literal-required] + """The RID of the Usage Account for this Space. Resource usage for projects in this space will accrue to this Usage Account by default. If not provided, the default Usage Account for this Enrollment will be used.""" + + file_system_id: typing.Optional[FileSystemId] = pydantic.Field(alias=str("fileSystemId"), default=None) # type: ignore[literal-required] + """The ID of the Filesystem for this Space, which is where the contents of the Space are stored. If not provided, the default Filesystem for this Enrollment will be used.""" + + display_name: ResourceDisplayName = pydantic.Field(alias=str("displayName")) # type: ignore[literal-required] + organizations: typing.List[core_models.OrganizationRid] + """The list of Organizations that are provisioned access to this Space. In order to access this Space, a user must be a member of at least one of these Organizations.""" + + description: typing.Optional[str] = None + """The description of the Space.""" + + deletion_policy_organizations: typing.List[core_models.OrganizationRid] = pydantic.Field(alias=str("deletionPolicyOrganizations")) # type: ignore[literal-required] + """By default, this Space will use a Last Out deletion policy, meaning that this Space and its projects will be deleted when the last Organization listed here is deleted. Only Organizations in the Space's Enrollment can be included here.""" + + default_role_set_id: typing.Optional[core_models.RoleSetId] = pydantic.Field(alias=str("defaultRoleSetId"), default=None) # type: ignore[literal-required] + """The ID of the default Role Set for this Space, which defines the set of roles that Projects in this Space must use. If not provided, the default Role Set for Projects will be used.""" + + +class Everyone(core.ModelBase): + """A principal representing all users of the platform.""" + + type: typing.Literal["everyone"] = "everyone" + + +FileSystemId = str +"""The ID of the filesystem that will be used for all projects in the Space.""" + + +class Folder(core.ModelBase): + """Folder""" + + rid: FolderRid + display_name: ResourceDisplayName = pydantic.Field(alias=str("displayName")) # type: ignore[literal-required] + description: typing.Optional[str] = None + """The description associated with the Folder.""" + + documentation: typing.Optional[str] = None + """The documentation associated with the Folder.""" + + path: ResourcePath + type: FolderType + created_by: core_models.CreatedBy = pydantic.Field(alias=str("createdBy")) # type: ignore[literal-required] + updated_by: core_models.UpdatedBy = pydantic.Field(alias=str("updatedBy")) # type: ignore[literal-required] + created_time: core_models.CreatedTime = pydantic.Field(alias=str("createdTime")) # type: ignore[literal-required] + updated_time: core_models.UpdatedTime = pydantic.Field(alias=str("updatedTime")) # type: ignore[literal-required] + trash_status: TrashStatus = pydantic.Field(alias=str("trashStatus")) # type: ignore[literal-required] + """ + The trash status of the Folder. If trashed, this could either be because the Folder itself has been + trashed or because one of its ancestors has been trashed. + """ + + parent_folder_rid: FolderRid = pydantic.Field(alias=str("parentFolderRid")) # type: ignore[literal-required] + """ + The parent folder Resource Identifier (RID). For Projects, this will be the Space RID and for Spaces, + this value will be the root folder (`ri.compass.main.folder.0`). + """ + + project_rid: typing.Optional[ProjectRid] = pydantic.Field(alias=str("projectRid"), default=None) # type: ignore[literal-required] + """ + The Project Resource Identifier (RID) that the Folder lives in. If the Folder is a Space, this value will + not be defined. + """ + + space_rid: SpaceRid = pydantic.Field(alias=str("spaceRid")) # type: ignore[literal-required] + """ + The Space Resource Identifier (RID) that the Folder lives in. If the Folder is a Space, this value will + be the same as the Folder RID. + """ + + +FolderRid = core.RID +"""The unique resource identifier (RID) of a Folder.""" + + +FolderType = typing.Literal["FOLDER", "SPACE", "PROJECT"] +""" +A folder can be a regular Folder, a +[Project](https://palantir.com/docs/foundry/getting-started/projects-and-resources/#projects) or a +[Space](https://palantir.com/docs/foundry/security/orgs-and-spaces/#spaces). +""" + + +class GetByPathResourcesBatchRequestElement(core.ModelBase): + """GetByPathResourcesBatchRequestElement""" + + path: ResourcePath + """The path to the Resource. The leading slash is optional.""" + + +class GetByPathResourcesBatchResponse(core.ModelBase): + """GetByPathResourcesBatchResponse""" + + data: typing.List[Resource] + + +class GetFoldersBatchRequestElement(core.ModelBase): + """GetFoldersBatchRequestElement""" + + folder_rid: FolderRid = pydantic.Field(alias=str("folderRid")) # type: ignore[literal-required] + + +class GetFoldersBatchResponse(core.ModelBase): + """GetFoldersBatchResponse""" + + data: typing.Dict[FolderRid, Folder] + + +class GetResourcesBatchRequestElement(core.ModelBase): + """GetResourcesBatchRequestElement""" + + resource_rid: ResourceRid = pydantic.Field(alias=str("resourceRid")) # type: ignore[literal-required] + + +class GetResourcesBatchResponse(core.ModelBase): + """GetResourcesBatchResponse""" + + data: typing.Dict[ResourceRid, Resource] + + +IsDirectlyApplied = bool +""" +Boolean flag to indicate if the marking is directly applied to the resource, or if it's applied +to a parent resource and inherited by the current resource. +""" + + +class ListChildrenOfFolderResponse(core.ModelBase): + """ListChildrenOfFolderResponse""" + + data: typing.List[Resource] + next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] + + +class ListMarkingsOfResourceResponse(core.ModelBase): + """ListMarkingsOfResourceResponse""" + + data: typing.List[core_models.MarkingId] + next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] + + +class ListOrganizationsOfProjectResponse(core.ModelBase): + """ListOrganizationsOfProjectResponse""" + + data: typing.List[core_models.OrganizationRid] + next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] + + +class ListResourceRolesResponse(core.ModelBase): + """ListResourceRolesResponse""" + + data: typing.List[ResourceRole] + next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] + + +class ListSpacesResponse(core.ModelBase): + """ListSpacesResponse""" + + data: typing.List[Space] + next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] + + +class Marking(core.ModelBase): + """ + [Markings](https://palantir.com/docs/foundry/security/markings/) provide an additional level of access control for files, + folders, and Projects within Foundry. Markings define eligibility criteria that restrict visibility + and actions to users who meet those criteria. To access a resource, a user must be a member of all + Markings applied to a resource to access it. + """ + + marking_id: core_models.MarkingId = pydantic.Field(alias=str("markingId")) # type: ignore[literal-required] + is_directly_applied: IsDirectlyApplied = pydantic.Field(alias=str("isDirectlyApplied")) # type: ignore[literal-required] + + +class Organization(core.ModelBase): + """ + [Organizations](https://palantir.com/docs/foundry/security/orgs-and-spaces/#organizations) are access requirements applied to + Projects that enforce strict silos between groups of users and resources. Every user is a member of only + one Organization, but can be a guest member of multiple Organizations. In order to meet access requirements, + users must be a member or guest member of at least one Organization applied to a Project. + Organizations are inherited via the file hierarchy and direct dependencies. + """ + + marking_id: core_models.MarkingId = pydantic.Field(alias=str("markingId")) # type: ignore[literal-required] + organization_rid: core_models.OrganizationRid = pydantic.Field(alias=str("organizationRid")) # type: ignore[literal-required] + is_directly_applied: IsDirectlyApplied = pydantic.Field(alias=str("isDirectlyApplied")) # type: ignore[literal-required] + + +class PrincipalIdOnly(core.ModelBase): + """Represents a principal with just an ID, without the type.""" + + principal_id: core_models.PrincipalId = pydantic.Field(alias=str("principalId")) # type: ignore[literal-required] + type: typing.Literal["principalIdOnly"] = "principalIdOnly" + + +class PrincipalWithId(core.ModelBase): + """Represents a user principal or group principal with an ID.""" + + principal_id: core_models.PrincipalId = pydantic.Field(alias=str("principalId")) # type: ignore[literal-required] + principal_type: core_models.PrincipalType = pydantic.Field(alias=str("principalType")) # type: ignore[literal-required] + type: typing.Literal["principalWithId"] = "principalWithId" + + +class Project(core.ModelBase): + """Project""" + + rid: ProjectRid + display_name: ResourceDisplayName = pydantic.Field(alias=str("displayName")) # type: ignore[literal-required] + """The display name of the Project. Must be unique and cannot contain a /""" + + description: typing.Optional[str] = None + """The description associated with the Project.""" + + documentation: typing.Optional[str] = None + """The documentation associated with the Project.""" + + path: ResourcePath + created_by: core_models.CreatedBy = pydantic.Field(alias=str("createdBy")) # type: ignore[literal-required] + updated_by: core_models.UpdatedBy = pydantic.Field(alias=str("updatedBy")) # type: ignore[literal-required] + created_time: core_models.CreatedTime = pydantic.Field(alias=str("createdTime")) # type: ignore[literal-required] + updated_time: core_models.UpdatedTime = pydantic.Field(alias=str("updatedTime")) # type: ignore[literal-required] + trash_status: TrashStatus = pydantic.Field(alias=str("trashStatus")) # type: ignore[literal-required] + """The trash status of the Project.""" + + space_rid: SpaceRid = pydantic.Field(alias=str("spaceRid")) # type: ignore[literal-required] + """The Space Resource Identifier (RID) that the Project lives in.""" + + +ProjectRid = core.RID +"""The unique resource identifier (RID) of a Project.""" + + +ProjectTemplateRid = core.RID +"""The unique resource identifier (RID) of a project template.""" + + +ProjectTemplateVariableId = str +"""An identifier for a variable used in a project template.""" + + +ProjectTemplateVariableValue = str +"""The value assigned to a variable used in a project template.""" + + +class RemoveMarkingsRequest(core.ModelBase): + """RemoveMarkingsRequest""" + + marking_ids: typing.List[core_models.MarkingId] = pydantic.Field(alias=str("markingIds")) # type: ignore[literal-required] + + +class RemoveOrganizationsRequest(core.ModelBase): + """RemoveOrganizationsRequest""" + + organization_rids: typing.List[core_models.OrganizationRid] = pydantic.Field(alias=str("organizationRids")) # type: ignore[literal-required] + + +class RemoveResourceRolesRequest(core.ModelBase): + """RemoveResourceRolesRequest""" + + roles: typing.List[ResourceRoleIdentifier] + + +class ReplaceProjectRequest(core.ModelBase): + """ReplaceProjectRequest""" + + display_name: ResourceDisplayName = pydantic.Field(alias=str("displayName")) # type: ignore[literal-required] + """The display name of the Project. Must be unique and cannot contain a /""" + + description: typing.Optional[str] = None + """The description associated with the Project.""" + + +class ReplaceSpaceRequest(core.ModelBase): + """ReplaceSpaceRequest""" + + usage_account_rid: typing.Optional[UsageAccountRid] = pydantic.Field(alias=str("usageAccountRid"), default=None) # type: ignore[literal-required] + """The RID of the Usage Account for this Space. Resource usage for projects in this space will accrue to this Usage Account by default. If not provided, the default Usage Account for this Enrollment will be used.""" + + display_name: ResourceDisplayName = pydantic.Field(alias=str("displayName")) # type: ignore[literal-required] + description: typing.Optional[str] = None + """The description of the Space.""" + + default_role_set_id: typing.Optional[core_models.RoleSetId] = pydantic.Field(alias=str("defaultRoleSetId"), default=None) # type: ignore[literal-required] + """The ID of the default Role Set for this Space, which defines the set of roles that Projects in this Space must use. If not provided, the default Role Set for Projects will be used.""" + + +class Resource(core.ModelBase): + """Resource""" + + rid: ResourceRid + display_name: ResourceDisplayName = pydantic.Field(alias=str("displayName")) # type: ignore[literal-required] + """The display name of the Resource""" + + description: typing.Optional[str] = None + """The description of the Resource""" + + documentation: typing.Optional[str] = None + """The documentation associated with the Resource""" + + path: ResourcePath + """The full path to the resource, including the resource name itself""" + + type: ResourceType + """The type of the Resource derived from the Resource Identifier (RID).""" + + created_by: core_models.CreatedBy = pydantic.Field(alias=str("createdBy")) # type: ignore[literal-required] + """The user that created the Resource.""" + + updated_by: core_models.UpdatedBy = pydantic.Field(alias=str("updatedBy")) # type: ignore[literal-required] + """The user that last updated the Resource.""" + + created_time: core_models.CreatedTime = pydantic.Field(alias=str("createdTime")) # type: ignore[literal-required] + """The timestamp that the Resource was last created.""" + + updated_time: core_models.UpdatedTime = pydantic.Field(alias=str("updatedTime")) # type: ignore[literal-required] + """ + The timestamp that the Resource was last modified. For folders, this includes any of its descendants. For + top level folders (spaces and projects), this is not updated by child updates for performance reasons. + """ + + trash_status: TrashStatus = pydantic.Field(alias=str("trashStatus")) # type: ignore[literal-required] + """ + The trash status of the Resource. If trashed, this could either be because the Resource itself has been + trashed or because one of its ancestors has been trashed. + """ + + parent_folder_rid: FolderRid = pydantic.Field(alias=str("parentFolderRid")) # type: ignore[literal-required] + """The parent folder Resource Identifier (RID). For projects, this will be the Space RID.""" + + project_rid: ProjectRid = pydantic.Field(alias=str("projectRid")) # type: ignore[literal-required] + """ + The Project Resource Identifier (RID) that the Resource lives in. If the Resource itself is a + Project, this value will still be populated with the Project RID. + """ + + space_rid: SpaceRid = pydantic.Field(alias=str("spaceRid")) # type: ignore[literal-required] + """The Space Resource Identifier (RID) that the Resource lives in.""" + + +ResourceDisplayName = str +"""The display name of the Resource""" + + +ResourcePath = str +"""The full path to the resource, including the resource name itself""" + + +ResourceRid = core.RID +"""The unique resource identifier (RID) of a Resource.""" + + +class ResourceRole(core.ModelBase): + """ResourceRole""" + + resource_role_principal: ResourceRolePrincipal = pydantic.Field(alias=str("resourceRolePrincipal")) # type: ignore[literal-required] + role_id: core_models.RoleId = pydantic.Field(alias=str("roleId")) # type: ignore[literal-required] + + +class ResourceRoleIdentifier(core.ModelBase): + """A role grant on a resource for add/remove operations that doesn't require specifying the principal type.""" + + resource_role_principal: ResourceRolePrincipalIdentifier = pydantic.Field(alias=str("resourceRolePrincipal")) # type: ignore[literal-required] + role_id: core_models.RoleId = pydantic.Field(alias=str("roleId")) # type: ignore[literal-required] + + +ResourceRolePrincipal = typing_extensions.Annotated[ + typing.Union["PrincipalWithId", "Everyone"], pydantic.Field(discriminator="type") +] +"""ResourceRolePrincipal""" + + +ResourceRolePrincipalIdentifier = typing_extensions.Annotated[ + typing.Union["PrincipalIdOnly", "Everyone"], pydantic.Field(discriminator="type") +] +"""A principal for resource role operations that doesn't require specifying the principal type.""" + + +ResourceType = pydantic.SkipValidation[ + typing.Literal[ + "AIP_PROFILE", + "AIP_AGENTS_AGENT", + "AIP_AGENTS_SESSION", + "AIP_ASSIST_FLOW_CAPTURE", + "AIP_ASSIST_WALKTHROUGH", + "ARTIFACTS_REPOSITORY", + "BELLASO_CIPHER_CHANNEL", + "BELLASO_CIPHER_LICENSE", + "BLACKSMITH_DOCUMENT", + "BLOBSTER_ARCHIVE", + "BLOBSTER_AUDIO", + "BLOBSTER_BLOB", + "BLOBSTER_CODE", + "BLOBSTER_CONFIGURATION", + "BLOBSTER_DOCUMENT", + "BLOBSTER_IMAGE", + "BLOBSTER_JUPYTERNOTEBOOK", + "BLOBSTER_PDF", + "BLOBSTER_PRESENTATION", + "BLOBSTER_SPREADSHEET", + "BLOBSTER_VIDEO", + "BLOBSTER_XML", + "CARBON_WORKSPACE", + "COMPASS_FOLDER", + "COMPASS_WEB_LINK", + "CONTOUR_ANALYSIS", + "DATA_HEALTH_MONITORING_VIEW", + "DECISIONS_EXPLORATION", + "DREDDIE_PIPELINE", + "EDDIE_LOGIC", + "EDDIE_PIPELINE", + "FFORMS_FORM", + "FLOW_WORKFLOW", + "FOUNDRY_DATASET", + "FOUNDRY_DEPLOYED_APP", + "FOUNDRY_ACADEMY_TUTORIAL", + "FOUNDRY_CONTAINER_SERVICE_CONTAINER", + "FOUNDRY_ML_OBJECTIVE", + "FOUNDRY_TEMPLATES_TEMPLATE", + "FUSION_DOCUMENT", + "GEOTIME_CATALOG_INTEGRATION", + "GPS_VIEW", + "HUBBLE_EXPLORATION_LAYOUT", + "HYPERAUTO_INTEGRATION", + "LOGIC_FLOWS_CONNECTED_FLOW", + "MACHINERY_DOCUMENT", + "MAGRITTE_AGENT", + "MAGRITTE_DRIVER", + "MAGRITTE_EXPORT", + "MAGRITTE_SOURCE", + "MARKETPLACE_BLOCK_SET_INSTALLATION", + "MARKETPLACE_BLOCK_SET_REPO", + "MARKETPLACE_LOCAL", + "MARKETPLACE_REMOTE_STORE", + "MIO_MEDIA_SET", + "MODELS_MODEL", + "MODELS_MODEL_VERSION", + "MONOCLE_GRAPH", + "NOTEPAD_NOTEPAD", + "NOTEPAD_NOTEPAD_TEMPLATE", + "OBJECT_SENTINEL_MONITOR", + "OBJECT_SET_VERSIONED_OBJECT_SET", + "OPUS_GRAPH", + "OPUS_GRAPH_TEMPLATE", + "OPUS_MAP", + "OPUS_MAP_LAYER", + "OPUS_MAP_TEMPLATE", + "OPUS_SEARCH_AROUND", + "QUIVER_ANALYSIS", + "QUIVER_ARTIFACT", + "QUIVER_DASHBOARD", + "QUIVER_FUNCTION", + "QUIVER_OBJECT_SET_PATH", + "REPORT_REPORT", + "SLATE_DOCUMENT", + "SOLUTION_DESIGN_DIAGRAM", + "STEMMA_REPOSITORY", + "TABLES_TABLE", + "TAURUS_WORKFLOW", + "THIRD_PARTY_APPLICATIONS_APPLICATION", + "TIME_SERIES_CATALOG_SYNC", + "VECTOR_TEMPLATE", + "VECTOR_WORKBOOK", + "WORKSHOP_MODULE", + "WORKSHOP_STATE", + ] +] + +"""The type of the Resource derived from the Resource Identifier (RID).""" + + +class Space(core.ModelBase): + """Space""" + + rid: SpaceRid + display_name: ResourceDisplayName = pydantic.Field(alias=str("displayName")) # type: ignore[literal-required] + description: typing.Optional[str] = None + """The description of the Space.""" + + path: ResourcePath + file_system_id: FileSystemId = pydantic.Field(alias=str("fileSystemId")) # type: ignore[literal-required] + """The ID of the Filesystem for this Space, which is where the contents of the Space are stored. If not provided, the default Filesystem for this Enrollment will be used.""" + + usage_account_rid: UsageAccountRid = pydantic.Field(alias=str("usageAccountRid")) # type: ignore[literal-required] + """The RID of the Usage Account for this Space. Resource usage for projects in this space will accrue to this Usage Account by default. If not provided, the default Usage Account for this Enrollment will be used.""" + + organizations: typing.List[core_models.OrganizationRid] + """The list of Organizations that are provisioned access to this Space. In order to access this Space, a user must be a member of at least one of these Organizations.""" + + deletion_policy_organizations: typing.List[core_models.OrganizationRid] = pydantic.Field(alias=str("deletionPolicyOrganizations")) # type: ignore[literal-required] + """By default, this Space will use a Last Out deletion policy, meaning that this Space and its projects will be deleted when the last Organization listed here is deleted. Only Organizations in the Space's Enrollment can be included here.""" + + default_role_set_id: core_models.RoleSetId = pydantic.Field(alias=str("defaultRoleSetId")) # type: ignore[literal-required] + """The ID of the default Role Set for this Space, which defines the set of roles that Projects in this Space must use. If not provided, the default Role Set for Projects will be used.""" + + space_maven_identifier: typing.Optional[SpaceMavenIdentifier] = pydantic.Field(alias=str("spaceMavenIdentifier"), default=None) # type: ignore[literal-required] + """The maven identifier used as the prefix to the maven coordinate that uniquely identifies resources published from this space. This is only present if configured in control panel in the space settings.""" + + +SpaceMavenIdentifier = str +"""The maven identifier used as the prefix to the maven coordinate that uniquely identifies resources published from this space.""" + + +SpaceRid = core.RID +"""The unique resource identifier (RID) of a Space.""" + + +TrashStatus = typing.Literal["DIRECTLY_TRASHED", "ANCESTOR_TRASHED", "NOT_TRASHED"] +"""TrashStatus""" + + +UsageAccountRid = core.RID +"""The unique resource identifier (RID) of the usage account that will be used as a default on project creation.""" + + +core.resolve_forward_references(ResourceRolePrincipal, globalns=globals(), localns=locals()) +core.resolve_forward_references( + ResourceRolePrincipalIdentifier, globalns=globals(), localns=locals() +) + +__all__ = [ + "AccessRequirements", + "AddMarkingsRequest", + "AddOrganizationsRequest", + "AddResourceRolesRequest", + "CreateFolderRequest", + "CreateProjectFromTemplateRequest", + "CreateProjectRequest", + "CreateSpaceRequest", + "Everyone", + "FileSystemId", + "Folder", + "FolderRid", + "FolderType", + "GetByPathResourcesBatchRequestElement", + "GetByPathResourcesBatchResponse", + "GetFoldersBatchRequestElement", + "GetFoldersBatchResponse", + "GetResourcesBatchRequestElement", + "GetResourcesBatchResponse", + "IsDirectlyApplied", + "ListChildrenOfFolderResponse", + "ListMarkingsOfResourceResponse", + "ListOrganizationsOfProjectResponse", + "ListResourceRolesResponse", + "ListSpacesResponse", + "Marking", + "Organization", + "PrincipalIdOnly", + "PrincipalWithId", + "Project", + "ProjectRid", + "ProjectTemplateRid", + "ProjectTemplateVariableId", + "ProjectTemplateVariableValue", + "RemoveMarkingsRequest", + "RemoveOrganizationsRequest", + "RemoveResourceRolesRequest", + "ReplaceProjectRequest", + "ReplaceSpaceRequest", + "Resource", + "ResourceDisplayName", + "ResourcePath", + "ResourceRid", + "ResourceRole", + "ResourceRoleIdentifier", + "ResourceRolePrincipal", + "ResourceRolePrincipalIdentifier", + "ResourceType", + "Space", + "SpaceMavenIdentifier", + "SpaceRid", + "TrashStatus", + "UsageAccountRid", +] diff --git a/foundry_sdk/v2/filesystem/project.py b/foundry_sdk/v2/filesystem/project.py new file mode 100644 index 000000000..33385946c --- /dev/null +++ b/foundry_sdk/v2/filesystem/project.py @@ -0,0 +1,1121 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v2.core import models as core_models +from foundry_sdk.v2.filesystem import errors as filesystem_errors +from foundry_sdk.v2.filesystem import models as filesystem_models + + +class ProjectClient: + """ + The API client for the Project Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _ProjectClientStreaming(self) + self.with_raw_response = _ProjectClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def add_organizations( + self, + project_rid: filesystem_models.ProjectRid, + *, + organization_rids: typing.List[core_models.OrganizationRid], + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> None: + """ + Adds a list of Organizations to a Project. + :param project_rid: + :type project_rid: ProjectRid + :param organization_rids: + :type organization_rids: List[OrganizationRid] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: None + + :raises AddOrganizationsPermissionDenied: Could not addOrganizations the Project. + :raises InvalidOrganizationHierarchy: Organizations on a project must also exist on the parent space. This error is thrown if the configuration of a project's organizations (on creation or subsequently) results in the project being marked with either no organizations in a marked space, or with an organization that is not present on the parent space. + :raises OrganizationsNotFound: At least one organization RID could not be found. + :raises ProjectNotFound: The given Project could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/filesystem/projects/{projectRid}/addOrganizations", + query_params={ + "preview": preview, + }, + path_params={ + "projectRid": project_rid, + }, + header_params={ + "Content-Type": "application/json", + }, + body=filesystem_models.AddOrganizationsRequest( + organization_rids=organization_rids, + ), + response_type=None, + request_timeout=request_timeout, + throwable_errors={ + "AddOrganizationsPermissionDenied": filesystem_errors.AddOrganizationsPermissionDenied, + "InvalidOrganizationHierarchy": filesystem_errors.InvalidOrganizationHierarchy, + "OrganizationsNotFound": filesystem_errors.OrganizationsNotFound, + "ProjectNotFound": filesystem_errors.ProjectNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def create( + self, + *, + default_roles: typing.List[core_models.RoleId], + display_name: filesystem_models.ResourceDisplayName, + organization_rids: typing.List[core_models.OrganizationRid], + role_grants: typing.Dict[ + core_models.RoleId, typing.List[filesystem_models.PrincipalWithId] + ], + space_rid: filesystem_models.SpaceRid, + description: typing.Optional[str] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> filesystem_models.Project: + """ + Creates a new Project. + + Note that third-party applications using this endpoint via OAuth2 cannot be associated with an + Ontology SDK as this will reduce the scope of operations to only those within specified projects. + When creating the application, select "No, I won't use an Ontology SDK" on the Resources page. + + :param default_roles: + :type default_roles: List[RoleId] + :param display_name: + :type display_name: ResourceDisplayName + :param organization_rids: + :type organization_rids: List[OrganizationRid] + :param role_grants: + :type role_grants: Dict[RoleId, List[PrincipalWithId]] + :param space_rid: + :type space_rid: SpaceRid + :param description: + :type description: Optional[str] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: filesystem_models.Project + + :raises CreateProjectNoOwnerLikeRoleGrant: The create project request would create a project with no principal being granted an owner-like role. As a result, there would be no user with administrative privileges over the project. A role is defined to be owner-like if it has the `compass:edit-project` operation. In the common case of the default role-set, this is just the `compass:manage` role. + :raises CreateProjectPermissionDenied: Could not create the Project. + :raises InvalidDisplayName: The display name of a Resource should not be exactly `.` or `..`, contain a forward slash `/` and must be less than or equal to 700 characters. + :raises InvalidRoleIds: A roleId referenced in either default roles or role grants does not exist in the project role set for the space. + :raises OrganizationMarkingNotOnSpace: At least one of the organization markings associated with a passed organization is not applied on the requested space. + :raises OrganizationsNotFound: At least one organization RID could not be found. + :raises ProjectCreationNotSupported: Project creation is not supported in the current user's space. + :raises ProjectNameAlreadyExists: The requested display name for the created project is already being used in the space. + :raises ProjectNotFound: The given Project could not be found. + :raises SpaceNotFound: The given Space could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/filesystem/projects/create", + query_params={ + "preview": preview, + }, + path_params={}, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=filesystem_models.CreateProjectRequest( + display_name=display_name, + description=description, + space_rid=space_rid, + role_grants=role_grants, + default_roles=default_roles, + organization_rids=organization_rids, + ), + response_type=filesystem_models.Project, + request_timeout=request_timeout, + throwable_errors={ + "CreateProjectNoOwnerLikeRoleGrant": filesystem_errors.CreateProjectNoOwnerLikeRoleGrant, + "CreateProjectPermissionDenied": filesystem_errors.CreateProjectPermissionDenied, + "InvalidDisplayName": filesystem_errors.InvalidDisplayName, + "InvalidRoleIds": filesystem_errors.InvalidRoleIds, + "OrganizationMarkingNotOnSpace": filesystem_errors.OrganizationMarkingNotOnSpace, + "OrganizationsNotFound": filesystem_errors.OrganizationsNotFound, + "ProjectCreationNotSupported": filesystem_errors.ProjectCreationNotSupported, + "ProjectNameAlreadyExists": filesystem_errors.ProjectNameAlreadyExists, + "ProjectNotFound": filesystem_errors.ProjectNotFound, + "SpaceNotFound": filesystem_errors.SpaceNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def create_from_template( + self, + *, + template_rid: filesystem_models.ProjectTemplateRid, + variable_values: typing.Dict[ + filesystem_models.ProjectTemplateVariableId, + filesystem_models.ProjectTemplateVariableValue, + ], + default_roles: typing.Optional[typing.List[core_models.RoleId]] = None, + organization_rids: typing.Optional[typing.List[core_models.OrganizationRid]] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + project_description: typing.Optional[str] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> filesystem_models.Project: + """ + Creates a project from a project template. + :param template_rid: + :type template_rid: ProjectTemplateRid + :param variable_values: + :type variable_values: Dict[ProjectTemplateVariableId, ProjectTemplateVariableValue] + :param default_roles: + :type default_roles: Optional[List[RoleId]] + :param organization_rids: + :type organization_rids: Optional[List[OrganizationRid]] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param project_description: + :type project_description: Optional[str] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: filesystem_models.Project + + :raises AddGroupToParentGroupPermissionDenied: The user is not authorized to add a a group to the parent group required to create the project from template. + :raises CreateGroupPermissionDenied: The user is not authorized to create the group in the organization required to create the project from template. + :raises CreateProjectFromTemplatePermissionDenied: Could not createFromTemplate the Project. + :raises CreateProjectNoOwnerLikeRoleGrant: The create project request would create a project with no principal being granted an owner-like role. As a result, there would be no user with administrative privileges over the project. A role is defined to be owner-like if it has the `compass:edit-project` operation. In the common case of the default role-set, this is just the `compass:manage` role. + :raises DefaultRolesNotInSpaceRoleSet: The requested default roles are not in the role set of the space for the project template. + :raises InvalidDefaultRoles: Either the user has not passed default roles for a template with suggested default roles, or has passed default roles for a template with fixed default roles. + :raises InvalidDescription: Either the user has not passed a value for a template with unset project description, or has passed a value for a template with fixed project description. + :raises InvalidOrganizationHierarchy: Organizations on a project must also exist on the parent space. This error is thrown if the configuration of a project's organizations (on creation or subsequently) results in the project being marked with either no organizations in a marked space, or with an organization that is not present on the parent space. + :raises InvalidOrganizations: Either the user has not passed organizations for a template with suggested organizations, or has passed organization for a template with fixed organizations. + :raises InvalidPrincipalIdsForGroupTemplate: The template requested for project creation contains principal IDs that do not exist. + :raises InvalidVariable: A variable referenced in the request to create project from template is not defined on the template. + :raises InvalidVariableEnumOption: The value passed in the request to create project from template for an enum type variable is not a valid option. + :raises MissingVariableValue: A variable defined on the template requested for project creation does not have a value set in the request. + :raises NotAuthorizedToApplyOrganization: The user is not authorized to apply at least one of the organization markings required to create the project from template. + :raises OrganizationsNotFound: At least one organization RID could not be found. + :raises ProjectNotFound: The given Project could not be found. + :raises ProjectTemplateNotFound: The project template RID referenced cannot be found. + :raises TemplateGroupNameConflict: Creating the project from template would attempt to create new groups with names conflicting either with other new groups, or existing groups. + :raises TemplateMarkingNameConflict: Creating the project from template would attempt to create new markings with names conflicting either with other new markings, or existing markings. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/filesystem/projects/createFromTemplate", + query_params={ + "preview": preview, + }, + path_params={}, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=filesystem_models.CreateProjectFromTemplateRequest( + template_rid=template_rid, + variable_values=variable_values, + default_roles=default_roles, + organization_rids=organization_rids, + project_description=project_description, + ), + response_type=filesystem_models.Project, + request_timeout=request_timeout, + throwable_errors={ + "AddGroupToParentGroupPermissionDenied": filesystem_errors.AddGroupToParentGroupPermissionDenied, + "CreateGroupPermissionDenied": filesystem_errors.CreateGroupPermissionDenied, + "CreateProjectFromTemplatePermissionDenied": filesystem_errors.CreateProjectFromTemplatePermissionDenied, + "CreateProjectNoOwnerLikeRoleGrant": filesystem_errors.CreateProjectNoOwnerLikeRoleGrant, + "DefaultRolesNotInSpaceRoleSet": filesystem_errors.DefaultRolesNotInSpaceRoleSet, + "InvalidDefaultRoles": filesystem_errors.InvalidDefaultRoles, + "InvalidDescription": filesystem_errors.InvalidDescription, + "InvalidOrganizationHierarchy": filesystem_errors.InvalidOrganizationHierarchy, + "InvalidOrganizations": filesystem_errors.InvalidOrganizations, + "InvalidPrincipalIdsForGroupTemplate": filesystem_errors.InvalidPrincipalIdsForGroupTemplate, + "InvalidVariable": filesystem_errors.InvalidVariable, + "InvalidVariableEnumOption": filesystem_errors.InvalidVariableEnumOption, + "MissingVariableValue": filesystem_errors.MissingVariableValue, + "NotAuthorizedToApplyOrganization": filesystem_errors.NotAuthorizedToApplyOrganization, + "OrganizationsNotFound": filesystem_errors.OrganizationsNotFound, + "ProjectNotFound": filesystem_errors.ProjectNotFound, + "ProjectTemplateNotFound": filesystem_errors.ProjectTemplateNotFound, + "TemplateGroupNameConflict": filesystem_errors.TemplateGroupNameConflict, + "TemplateMarkingNameConflict": filesystem_errors.TemplateMarkingNameConflict, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + project_rid: filesystem_models.ProjectRid, + *, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> filesystem_models.Project: + """ + Get the Project with the specified rid. + :param project_rid: + :type project_rid: ProjectRid + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: filesystem_models.Project + + :raises ProjectNotFound: The given Project could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/filesystem/projects/{projectRid}", + query_params={}, + path_params={ + "projectRid": project_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=filesystem_models.Project, + request_timeout=request_timeout, + throwable_errors={ + "ProjectNotFound": filesystem_errors.ProjectNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def organizations( + self, + project_rid: filesystem_models.ProjectRid, + *, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.ResourceIterator[core_models.OrganizationRid]: + """ + List of Organizations directly applied to a Project. The number of Organizations on a Project is + typically small so the `pageSize` and `pageToken` parameters are not required. + + :param project_rid: + :type project_rid: ProjectRid + :param page_size: The page size to use for the endpoint. + :type page_size: Optional[PageSize] + :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. + :type page_token: Optional[PageToken] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.ResourceIterator[core_models.OrganizationRid] + + :raises ProjectNotFound: The given Project could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/filesystem/projects/{projectRid}/organizations", + query_params={ + "pageSize": page_size, + "pageToken": page_token, + "preview": preview, + }, + path_params={ + "projectRid": project_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=filesystem_models.ListOrganizationsOfProjectResponse, + request_timeout=request_timeout, + throwable_errors={ + "ProjectNotFound": filesystem_errors.ProjectNotFound, + }, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def remove_organizations( + self, + project_rid: filesystem_models.ProjectRid, + *, + organization_rids: typing.List[core_models.OrganizationRid], + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> None: + """ + Removes Organizations from a Project. + :param project_rid: + :type project_rid: ProjectRid + :param organization_rids: + :type organization_rids: List[OrganizationRid] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: None + + :raises InvalidOrganizationHierarchy: Organizations on a project must also exist on the parent space. This error is thrown if the configuration of a project's organizations (on creation or subsequently) results in the project being marked with either no organizations in a marked space, or with an organization that is not present on the parent space. + :raises OrganizationCannotBeRemoved: An organization cannot be removed from a project if it would result in a project with no organizations under a space marked with an organization. + :raises OrganizationsNotFound: At least one organization RID could not be found. + :raises ProjectNotFound: The given Project could not be found. + :raises RemoveOrganizationsPermissionDenied: Could not removeOrganizations the Project. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/filesystem/projects/{projectRid}/removeOrganizations", + query_params={ + "preview": preview, + }, + path_params={ + "projectRid": project_rid, + }, + header_params={ + "Content-Type": "application/json", + }, + body=filesystem_models.RemoveOrganizationsRequest( + organization_rids=organization_rids, + ), + response_type=None, + request_timeout=request_timeout, + throwable_errors={ + "InvalidOrganizationHierarchy": filesystem_errors.InvalidOrganizationHierarchy, + "OrganizationCannotBeRemoved": filesystem_errors.OrganizationCannotBeRemoved, + "OrganizationsNotFound": filesystem_errors.OrganizationsNotFound, + "ProjectNotFound": filesystem_errors.ProjectNotFound, + "RemoveOrganizationsPermissionDenied": filesystem_errors.RemoveOrganizationsPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def replace( + self, + project_rid: filesystem_models.ProjectRid, + *, + display_name: filesystem_models.ResourceDisplayName, + description: typing.Optional[str] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> filesystem_models.Project: + """ + Replace the Project with the specified rid. + :param project_rid: + :type project_rid: ProjectRid + :param display_name: The display name of the Project. Must be unique and cannot contain a / + :type display_name: ResourceDisplayName + :param description: The description associated with the Project. + :type description: Optional[str] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: filesystem_models.Project + + :raises InvalidDisplayName: The display name of a Resource should not be exactly `.` or `..`, contain a forward slash `/` and must be less than or equal to 700 characters. + :raises ProjectNameAlreadyExists: The requested display name for the created project is already being used in the space. + :raises ProjectNotFound: The given Project could not be found. + :raises ReplaceProjectPermissionDenied: Could not replace the Project. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="PUT", + resource_path="/v2/filesystem/projects/{projectRid}", + query_params={ + "preview": preview, + }, + path_params={ + "projectRid": project_rid, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=filesystem_models.ReplaceProjectRequest( + display_name=display_name, + description=description, + ), + response_type=filesystem_models.Project, + request_timeout=request_timeout, + throwable_errors={ + "InvalidDisplayName": filesystem_errors.InvalidDisplayName, + "ProjectNameAlreadyExists": filesystem_errors.ProjectNameAlreadyExists, + "ProjectNotFound": filesystem_errors.ProjectNotFound, + "ReplaceProjectPermissionDenied": filesystem_errors.ReplaceProjectPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _ProjectClientRaw: + def __init__(self, client: ProjectClient) -> None: + def add_organizations(_: None): ... + def create(_: filesystem_models.Project): ... + def create_from_template(_: filesystem_models.Project): ... + def get(_: filesystem_models.Project): ... + def organizations(_: filesystem_models.ListOrganizationsOfProjectResponse): ... + def remove_organizations(_: None): ... + def replace(_: filesystem_models.Project): ... + + self.add_organizations = core.with_raw_response(add_organizations, client.add_organizations) + self.create = core.with_raw_response(create, client.create) + self.create_from_template = core.with_raw_response( + create_from_template, client.create_from_template + ) + self.get = core.with_raw_response(get, client.get) + self.organizations = core.with_raw_response(organizations, client.organizations) + self.remove_organizations = core.with_raw_response( + remove_organizations, client.remove_organizations + ) + self.replace = core.with_raw_response(replace, client.replace) + + +class _ProjectClientStreaming: + def __init__(self, client: ProjectClient) -> None: + def create(_: filesystem_models.Project): ... + def create_from_template(_: filesystem_models.Project): ... + def get(_: filesystem_models.Project): ... + def organizations(_: filesystem_models.ListOrganizationsOfProjectResponse): ... + def replace(_: filesystem_models.Project): ... + + self.create = core.with_streaming_response(create, client.create) + self.create_from_template = core.with_streaming_response( + create_from_template, client.create_from_template + ) + self.get = core.with_streaming_response(get, client.get) + self.organizations = core.with_streaming_response(organizations, client.organizations) + self.replace = core.with_streaming_response(replace, client.replace) + + +class AsyncProjectClient: + """ + The API client for the Project Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncProjectClientStreaming(self) + self.with_raw_response = _AsyncProjectClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def add_organizations( + self, + project_rid: filesystem_models.ProjectRid, + *, + organization_rids: typing.List[core_models.OrganizationRid], + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[None]: + """ + Adds a list of Organizations to a Project. + :param project_rid: + :type project_rid: ProjectRid + :param organization_rids: + :type organization_rids: List[OrganizationRid] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[None] + + :raises AddOrganizationsPermissionDenied: Could not addOrganizations the Project. + :raises InvalidOrganizationHierarchy: Organizations on a project must also exist on the parent space. This error is thrown if the configuration of a project's organizations (on creation or subsequently) results in the project being marked with either no organizations in a marked space, or with an organization that is not present on the parent space. + :raises OrganizationsNotFound: At least one organization RID could not be found. + :raises ProjectNotFound: The given Project could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/filesystem/projects/{projectRid}/addOrganizations", + query_params={ + "preview": preview, + }, + path_params={ + "projectRid": project_rid, + }, + header_params={ + "Content-Type": "application/json", + }, + body=filesystem_models.AddOrganizationsRequest( + organization_rids=organization_rids, + ), + response_type=None, + request_timeout=request_timeout, + throwable_errors={ + "AddOrganizationsPermissionDenied": filesystem_errors.AddOrganizationsPermissionDenied, + "InvalidOrganizationHierarchy": filesystem_errors.InvalidOrganizationHierarchy, + "OrganizationsNotFound": filesystem_errors.OrganizationsNotFound, + "ProjectNotFound": filesystem_errors.ProjectNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def create( + self, + *, + default_roles: typing.List[core_models.RoleId], + display_name: filesystem_models.ResourceDisplayName, + organization_rids: typing.List[core_models.OrganizationRid], + role_grants: typing.Dict[ + core_models.RoleId, typing.List[filesystem_models.PrincipalWithId] + ], + space_rid: filesystem_models.SpaceRid, + description: typing.Optional[str] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[filesystem_models.Project]: + """ + Creates a new Project. + + Note that third-party applications using this endpoint via OAuth2 cannot be associated with an + Ontology SDK as this will reduce the scope of operations to only those within specified projects. + When creating the application, select "No, I won't use an Ontology SDK" on the Resources page. + + :param default_roles: + :type default_roles: List[RoleId] + :param display_name: + :type display_name: ResourceDisplayName + :param organization_rids: + :type organization_rids: List[OrganizationRid] + :param role_grants: + :type role_grants: Dict[RoleId, List[PrincipalWithId]] + :param space_rid: + :type space_rid: SpaceRid + :param description: + :type description: Optional[str] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[filesystem_models.Project] + + :raises CreateProjectNoOwnerLikeRoleGrant: The create project request would create a project with no principal being granted an owner-like role. As a result, there would be no user with administrative privileges over the project. A role is defined to be owner-like if it has the `compass:edit-project` operation. In the common case of the default role-set, this is just the `compass:manage` role. + :raises CreateProjectPermissionDenied: Could not create the Project. + :raises InvalidDisplayName: The display name of a Resource should not be exactly `.` or `..`, contain a forward slash `/` and must be less than or equal to 700 characters. + :raises InvalidRoleIds: A roleId referenced in either default roles or role grants does not exist in the project role set for the space. + :raises OrganizationMarkingNotOnSpace: At least one of the organization markings associated with a passed organization is not applied on the requested space. + :raises OrganizationsNotFound: At least one organization RID could not be found. + :raises ProjectCreationNotSupported: Project creation is not supported in the current user's space. + :raises ProjectNameAlreadyExists: The requested display name for the created project is already being used in the space. + :raises ProjectNotFound: The given Project could not be found. + :raises SpaceNotFound: The given Space could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/filesystem/projects/create", + query_params={ + "preview": preview, + }, + path_params={}, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=filesystem_models.CreateProjectRequest( + display_name=display_name, + description=description, + space_rid=space_rid, + role_grants=role_grants, + default_roles=default_roles, + organization_rids=organization_rids, + ), + response_type=filesystem_models.Project, + request_timeout=request_timeout, + throwable_errors={ + "CreateProjectNoOwnerLikeRoleGrant": filesystem_errors.CreateProjectNoOwnerLikeRoleGrant, + "CreateProjectPermissionDenied": filesystem_errors.CreateProjectPermissionDenied, + "InvalidDisplayName": filesystem_errors.InvalidDisplayName, + "InvalidRoleIds": filesystem_errors.InvalidRoleIds, + "OrganizationMarkingNotOnSpace": filesystem_errors.OrganizationMarkingNotOnSpace, + "OrganizationsNotFound": filesystem_errors.OrganizationsNotFound, + "ProjectCreationNotSupported": filesystem_errors.ProjectCreationNotSupported, + "ProjectNameAlreadyExists": filesystem_errors.ProjectNameAlreadyExists, + "ProjectNotFound": filesystem_errors.ProjectNotFound, + "SpaceNotFound": filesystem_errors.SpaceNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def create_from_template( + self, + *, + template_rid: filesystem_models.ProjectTemplateRid, + variable_values: typing.Dict[ + filesystem_models.ProjectTemplateVariableId, + filesystem_models.ProjectTemplateVariableValue, + ], + default_roles: typing.Optional[typing.List[core_models.RoleId]] = None, + organization_rids: typing.Optional[typing.List[core_models.OrganizationRid]] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + project_description: typing.Optional[str] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[filesystem_models.Project]: + """ + Creates a project from a project template. + :param template_rid: + :type template_rid: ProjectTemplateRid + :param variable_values: + :type variable_values: Dict[ProjectTemplateVariableId, ProjectTemplateVariableValue] + :param default_roles: + :type default_roles: Optional[List[RoleId]] + :param organization_rids: + :type organization_rids: Optional[List[OrganizationRid]] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param project_description: + :type project_description: Optional[str] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[filesystem_models.Project] + + :raises AddGroupToParentGroupPermissionDenied: The user is not authorized to add a a group to the parent group required to create the project from template. + :raises CreateGroupPermissionDenied: The user is not authorized to create the group in the organization required to create the project from template. + :raises CreateProjectFromTemplatePermissionDenied: Could not createFromTemplate the Project. + :raises CreateProjectNoOwnerLikeRoleGrant: The create project request would create a project with no principal being granted an owner-like role. As a result, there would be no user with administrative privileges over the project. A role is defined to be owner-like if it has the `compass:edit-project` operation. In the common case of the default role-set, this is just the `compass:manage` role. + :raises DefaultRolesNotInSpaceRoleSet: The requested default roles are not in the role set of the space for the project template. + :raises InvalidDefaultRoles: Either the user has not passed default roles for a template with suggested default roles, or has passed default roles for a template with fixed default roles. + :raises InvalidDescription: Either the user has not passed a value for a template with unset project description, or has passed a value for a template with fixed project description. + :raises InvalidOrganizationHierarchy: Organizations on a project must also exist on the parent space. This error is thrown if the configuration of a project's organizations (on creation or subsequently) results in the project being marked with either no organizations in a marked space, or with an organization that is not present on the parent space. + :raises InvalidOrganizations: Either the user has not passed organizations for a template with suggested organizations, or has passed organization for a template with fixed organizations. + :raises InvalidPrincipalIdsForGroupTemplate: The template requested for project creation contains principal IDs that do not exist. + :raises InvalidVariable: A variable referenced in the request to create project from template is not defined on the template. + :raises InvalidVariableEnumOption: The value passed in the request to create project from template for an enum type variable is not a valid option. + :raises MissingVariableValue: A variable defined on the template requested for project creation does not have a value set in the request. + :raises NotAuthorizedToApplyOrganization: The user is not authorized to apply at least one of the organization markings required to create the project from template. + :raises OrganizationsNotFound: At least one organization RID could not be found. + :raises ProjectNotFound: The given Project could not be found. + :raises ProjectTemplateNotFound: The project template RID referenced cannot be found. + :raises TemplateGroupNameConflict: Creating the project from template would attempt to create new groups with names conflicting either with other new groups, or existing groups. + :raises TemplateMarkingNameConflict: Creating the project from template would attempt to create new markings with names conflicting either with other new markings, or existing markings. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/filesystem/projects/createFromTemplate", + query_params={ + "preview": preview, + }, + path_params={}, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=filesystem_models.CreateProjectFromTemplateRequest( + template_rid=template_rid, + variable_values=variable_values, + default_roles=default_roles, + organization_rids=organization_rids, + project_description=project_description, + ), + response_type=filesystem_models.Project, + request_timeout=request_timeout, + throwable_errors={ + "AddGroupToParentGroupPermissionDenied": filesystem_errors.AddGroupToParentGroupPermissionDenied, + "CreateGroupPermissionDenied": filesystem_errors.CreateGroupPermissionDenied, + "CreateProjectFromTemplatePermissionDenied": filesystem_errors.CreateProjectFromTemplatePermissionDenied, + "CreateProjectNoOwnerLikeRoleGrant": filesystem_errors.CreateProjectNoOwnerLikeRoleGrant, + "DefaultRolesNotInSpaceRoleSet": filesystem_errors.DefaultRolesNotInSpaceRoleSet, + "InvalidDefaultRoles": filesystem_errors.InvalidDefaultRoles, + "InvalidDescription": filesystem_errors.InvalidDescription, + "InvalidOrganizationHierarchy": filesystem_errors.InvalidOrganizationHierarchy, + "InvalidOrganizations": filesystem_errors.InvalidOrganizations, + "InvalidPrincipalIdsForGroupTemplate": filesystem_errors.InvalidPrincipalIdsForGroupTemplate, + "InvalidVariable": filesystem_errors.InvalidVariable, + "InvalidVariableEnumOption": filesystem_errors.InvalidVariableEnumOption, + "MissingVariableValue": filesystem_errors.MissingVariableValue, + "NotAuthorizedToApplyOrganization": filesystem_errors.NotAuthorizedToApplyOrganization, + "OrganizationsNotFound": filesystem_errors.OrganizationsNotFound, + "ProjectNotFound": filesystem_errors.ProjectNotFound, + "ProjectTemplateNotFound": filesystem_errors.ProjectTemplateNotFound, + "TemplateGroupNameConflict": filesystem_errors.TemplateGroupNameConflict, + "TemplateMarkingNameConflict": filesystem_errors.TemplateMarkingNameConflict, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + project_rid: filesystem_models.ProjectRid, + *, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[filesystem_models.Project]: + """ + Get the Project with the specified rid. + :param project_rid: + :type project_rid: ProjectRid + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[filesystem_models.Project] + + :raises ProjectNotFound: The given Project could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/filesystem/projects/{projectRid}", + query_params={}, + path_params={ + "projectRid": project_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=filesystem_models.Project, + request_timeout=request_timeout, + throwable_errors={ + "ProjectNotFound": filesystem_errors.ProjectNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def organizations( + self, + project_rid: filesystem_models.ProjectRid, + *, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.AsyncResourceIterator[core_models.OrganizationRid]: + """ + List of Organizations directly applied to a Project. The number of Organizations on a Project is + typically small so the `pageSize` and `pageToken` parameters are not required. + + :param project_rid: + :type project_rid: ProjectRid + :param page_size: The page size to use for the endpoint. + :type page_size: Optional[PageSize] + :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. + :type page_token: Optional[PageToken] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.AsyncResourceIterator[core_models.OrganizationRid] + + :raises ProjectNotFound: The given Project could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/filesystem/projects/{projectRid}/organizations", + query_params={ + "pageSize": page_size, + "pageToken": page_token, + "preview": preview, + }, + path_params={ + "projectRid": project_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=filesystem_models.ListOrganizationsOfProjectResponse, + request_timeout=request_timeout, + throwable_errors={ + "ProjectNotFound": filesystem_errors.ProjectNotFound, + }, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def remove_organizations( + self, + project_rid: filesystem_models.ProjectRid, + *, + organization_rids: typing.List[core_models.OrganizationRid], + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[None]: + """ + Removes Organizations from a Project. + :param project_rid: + :type project_rid: ProjectRid + :param organization_rids: + :type organization_rids: List[OrganizationRid] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[None] + + :raises InvalidOrganizationHierarchy: Organizations on a project must also exist on the parent space. This error is thrown if the configuration of a project's organizations (on creation or subsequently) results in the project being marked with either no organizations in a marked space, or with an organization that is not present on the parent space. + :raises OrganizationCannotBeRemoved: An organization cannot be removed from a project if it would result in a project with no organizations under a space marked with an organization. + :raises OrganizationsNotFound: At least one organization RID could not be found. + :raises ProjectNotFound: The given Project could not be found. + :raises RemoveOrganizationsPermissionDenied: Could not removeOrganizations the Project. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/filesystem/projects/{projectRid}/removeOrganizations", + query_params={ + "preview": preview, + }, + path_params={ + "projectRid": project_rid, + }, + header_params={ + "Content-Type": "application/json", + }, + body=filesystem_models.RemoveOrganizationsRequest( + organization_rids=organization_rids, + ), + response_type=None, + request_timeout=request_timeout, + throwable_errors={ + "InvalidOrganizationHierarchy": filesystem_errors.InvalidOrganizationHierarchy, + "OrganizationCannotBeRemoved": filesystem_errors.OrganizationCannotBeRemoved, + "OrganizationsNotFound": filesystem_errors.OrganizationsNotFound, + "ProjectNotFound": filesystem_errors.ProjectNotFound, + "RemoveOrganizationsPermissionDenied": filesystem_errors.RemoveOrganizationsPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def replace( + self, + project_rid: filesystem_models.ProjectRid, + *, + display_name: filesystem_models.ResourceDisplayName, + description: typing.Optional[str] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[filesystem_models.Project]: + """ + Replace the Project with the specified rid. + :param project_rid: + :type project_rid: ProjectRid + :param display_name: The display name of the Project. Must be unique and cannot contain a / + :type display_name: ResourceDisplayName + :param description: The description associated with the Project. + :type description: Optional[str] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[filesystem_models.Project] + + :raises InvalidDisplayName: The display name of a Resource should not be exactly `.` or `..`, contain a forward slash `/` and must be less than or equal to 700 characters. + :raises ProjectNameAlreadyExists: The requested display name for the created project is already being used in the space. + :raises ProjectNotFound: The given Project could not be found. + :raises ReplaceProjectPermissionDenied: Could not replace the Project. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="PUT", + resource_path="/v2/filesystem/projects/{projectRid}", + query_params={ + "preview": preview, + }, + path_params={ + "projectRid": project_rid, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=filesystem_models.ReplaceProjectRequest( + display_name=display_name, + description=description, + ), + response_type=filesystem_models.Project, + request_timeout=request_timeout, + throwable_errors={ + "InvalidDisplayName": filesystem_errors.InvalidDisplayName, + "ProjectNameAlreadyExists": filesystem_errors.ProjectNameAlreadyExists, + "ProjectNotFound": filesystem_errors.ProjectNotFound, + "ReplaceProjectPermissionDenied": filesystem_errors.ReplaceProjectPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _AsyncProjectClientRaw: + def __init__(self, client: AsyncProjectClient) -> None: + def add_organizations(_: None): ... + def create(_: filesystem_models.Project): ... + def create_from_template(_: filesystem_models.Project): ... + def get(_: filesystem_models.Project): ... + def organizations(_: filesystem_models.ListOrganizationsOfProjectResponse): ... + def remove_organizations(_: None): ... + def replace(_: filesystem_models.Project): ... + + self.add_organizations = core.async_with_raw_response( + add_organizations, client.add_organizations + ) + self.create = core.async_with_raw_response(create, client.create) + self.create_from_template = core.async_with_raw_response( + create_from_template, client.create_from_template + ) + self.get = core.async_with_raw_response(get, client.get) + self.organizations = core.async_with_raw_response(organizations, client.organizations) + self.remove_organizations = core.async_with_raw_response( + remove_organizations, client.remove_organizations + ) + self.replace = core.async_with_raw_response(replace, client.replace) + + +class _AsyncProjectClientStreaming: + def __init__(self, client: AsyncProjectClient) -> None: + def create(_: filesystem_models.Project): ... + def create_from_template(_: filesystem_models.Project): ... + def get(_: filesystem_models.Project): ... + def organizations(_: filesystem_models.ListOrganizationsOfProjectResponse): ... + def replace(_: filesystem_models.Project): ... + + self.create = core.async_with_streaming_response(create, client.create) + self.create_from_template = core.async_with_streaming_response( + create_from_template, client.create_from_template + ) + self.get = core.async_with_streaming_response(get, client.get) + self.organizations = core.async_with_streaming_response(organizations, client.organizations) + self.replace = core.async_with_streaming_response(replace, client.replace) diff --git a/foundry_sdk/v2/filesystem/resource.py b/foundry_sdk/v2/filesystem/resource.py new file mode 100644 index 000000000..bbd7ac2d4 --- /dev/null +++ b/foundry_sdk/v2/filesystem/resource.py @@ -0,0 +1,1417 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing +from functools import cached_property + +import annotated_types +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v2.core import models as core_models +from foundry_sdk.v2.filesystem import errors as filesystem_errors +from foundry_sdk.v2.filesystem import models as filesystem_models + + +class ResourceClient: + """ + The API client for the Resource Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _ResourceClientStreaming(self) + self.with_raw_response = _ResourceClientRaw(self) + + @cached_property + def Role(self): + from foundry_sdk.v2.filesystem.resource_role import ResourceRoleClient + + return ResourceRoleClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def add_markings( + self, + resource_rid: filesystem_models.ResourceRid, + *, + marking_ids: typing.List[core_models.MarkingId], + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> None: + """ + Adds a list of Markings to a resource. + :param resource_rid: + :type resource_rid: ResourceRid + :param marking_ids: + :type marking_ids: List[MarkingId] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: None + + :raises AddMarkingsPermissionDenied: Could not addMarkings the Resource. + :raises ForbiddenOperationOnAutosavedResource: Performing this operation on an autosaved resource is not supported. + :raises ForbiddenOperationOnHiddenResource: Performing this operation on a hidden resource is not supported. + :raises MarkingNotFound: A provided marking ID cannot be found. + :raises OrganizationMarkingNotSupported: Adding an organization marking as a regular marking is not supported. Use the organization endpoints on a project resource instead. + :raises ResourceNotFound: The given Resource could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/filesystem/resources/{resourceRid}/addMarkings", + query_params={ + "preview": preview, + }, + path_params={ + "resourceRid": resource_rid, + }, + header_params={ + "Content-Type": "application/json", + }, + body=filesystem_models.AddMarkingsRequest( + marking_ids=marking_ids, + ), + response_type=None, + request_timeout=request_timeout, + throwable_errors={ + "AddMarkingsPermissionDenied": filesystem_errors.AddMarkingsPermissionDenied, + "ForbiddenOperationOnAutosavedResource": filesystem_errors.ForbiddenOperationOnAutosavedResource, + "ForbiddenOperationOnHiddenResource": filesystem_errors.ForbiddenOperationOnHiddenResource, + "MarkingNotFound": filesystem_errors.MarkingNotFound, + "OrganizationMarkingNotSupported": filesystem_errors.OrganizationMarkingNotSupported, + "ResourceNotFound": filesystem_errors.ResourceNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def delete( + self, + resource_rid: filesystem_models.ResourceRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> None: + """ + Move the given resource to the trash. Following this operation, the resource can be restored, using the + `restore` operation, or permanently deleted using the `permanentlyDelete` operation. + + :param resource_rid: + :type resource_rid: ResourceRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: None + + :raises DeleteResourcePermissionDenied: Could not delete the Resource. + :raises ResourceNotFound: The given Resource could not be found. + :raises TrashingAutosavedResourcesNotSupported: Auto-saved Resources cannot be trashed. + :raises TrashingHiddenResourcesNotSupported: Hidden Resources cannot be trashed. + :raises TrashingSpaceNotSupported: Spaces cannot be trashed. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="DELETE", + resource_path="/v2/filesystem/resources/{resourceRid}", + query_params={ + "preview": preview, + }, + path_params={ + "resourceRid": resource_rid, + }, + header_params={}, + body=None, + response_type=None, + request_timeout=request_timeout, + throwable_errors={ + "DeleteResourcePermissionDenied": filesystem_errors.DeleteResourcePermissionDenied, + "ResourceNotFound": filesystem_errors.ResourceNotFound, + "TrashingAutosavedResourcesNotSupported": filesystem_errors.TrashingAutosavedResourcesNotSupported, + "TrashingHiddenResourcesNotSupported": filesystem_errors.TrashingHiddenResourcesNotSupported, + "TrashingSpaceNotSupported": filesystem_errors.TrashingSpaceNotSupported, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + resource_rid: filesystem_models.ResourceRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> filesystem_models.Resource: + """ + Get the Resource with the specified rid. + :param resource_rid: + :type resource_rid: ResourceRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: filesystem_models.Resource + + :raises GetRootFolderNotSupported: Getting the root folder as a resource is not supported. + :raises GetSpaceResourceNotSupported: Getting a space as a resource is not supported. + :raises ResourceNotFound: The given Resource could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/filesystem/resources/{resourceRid}", + query_params={ + "preview": preview, + }, + path_params={ + "resourceRid": resource_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=filesystem_models.Resource, + request_timeout=request_timeout, + throwable_errors={ + "GetRootFolderNotSupported": filesystem_errors.GetRootFolderNotSupported, + "GetSpaceResourceNotSupported": filesystem_errors.GetSpaceResourceNotSupported, + "ResourceNotFound": filesystem_errors.ResourceNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get_access_requirements( + self, + resource_rid: filesystem_models.ResourceRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> filesystem_models.AccessRequirements: + """ + Returns a list of access requirements a user needs in order to view a resource. Access requirements are + composed of Organizations and Markings, and can either be applied directly to the resource or inherited. + + :param resource_rid: + :type resource_rid: ResourceRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: filesystem_models.AccessRequirements + + :raises GetAccessRequirementsPermissionDenied: Could not getAccessRequirements the Resource. + :raises ResourceNotFound: The given Resource could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/filesystem/resources/{resourceRid}/getAccessRequirements", + query_params={ + "preview": preview, + }, + path_params={ + "resourceRid": resource_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=filesystem_models.AccessRequirements, + request_timeout=request_timeout, + throwable_errors={ + "GetAccessRequirementsPermissionDenied": filesystem_errors.GetAccessRequirementsPermissionDenied, + "ResourceNotFound": filesystem_errors.ResourceNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get_batch( + self, + body: typing_extensions.Annotated[ + typing.List[filesystem_models.GetResourcesBatchRequestElement], + annotated_types.Len(min_length=1, max_length=1000), + ], + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> filesystem_models.GetResourcesBatchResponse: + """ + Fetches multiple resources in a single request. + Returns a map from RID to the corresponding resource. If a resource does not exist, or if it is a root folder or space, its RID will not be included in the map. + At most 1,000 resources should be requested at once. + + + The maximum batch size for this endpoint is 1000. + :param body: Body of the request + :type body: List[GetResourcesBatchRequestElement] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: filesystem_models.GetResourcesBatchResponse + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/filesystem/resources/getBatch", + query_params={ + "preview": preview, + }, + path_params={}, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=body, + response_type=filesystem_models.GetResourcesBatchResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get_by_path( + self, + *, + path: filesystem_models.ResourcePath, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> filesystem_models.Resource: + """ + Get a Resource by its absolute path. + :param path: The path to the Resource. The leading slash is optional. + :type path: ResourcePath + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: filesystem_models.Resource + + :raises GetByPathPermissionDenied: Could not getByPath the Resource. + :raises GetRootFolderNotSupported: Getting the root folder as a resource is not supported. + :raises GetSpaceResourceNotSupported: Getting a space as a resource is not supported. + :raises InvalidPath: The given path is invalid. A valid path has all components separated by a single `/`. + :raises PathNotFound: The given path could not be found. + :raises ResourceNotFound: The given Resource could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/filesystem/resources/getByPath", + query_params={ + "path": path, + "preview": preview, + }, + path_params={}, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=filesystem_models.Resource, + request_timeout=request_timeout, + throwable_errors={ + "GetByPathPermissionDenied": filesystem_errors.GetByPathPermissionDenied, + "GetRootFolderNotSupported": filesystem_errors.GetRootFolderNotSupported, + "GetSpaceResourceNotSupported": filesystem_errors.GetSpaceResourceNotSupported, + "InvalidPath": filesystem_errors.InvalidPath, + "PathNotFound": filesystem_errors.PathNotFound, + "ResourceNotFound": filesystem_errors.ResourceNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get_by_path_batch( + self, + body: typing_extensions.Annotated[ + typing.List[filesystem_models.GetByPathResourcesBatchRequestElement], + annotated_types.Len(min_length=1, max_length=1000), + ], + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> filesystem_models.GetByPathResourcesBatchResponse: + """ + Gets multiple Resources by their absolute paths. + Returns a list of resources. If a path does not exist, is inaccessible, or refers to + a root folder or space, it will not be included in the response. + At most 1,000 paths should be requested at once. + + + The maximum batch size for this endpoint is 1000. + :param body: Body of the request + :type body: List[GetByPathResourcesBatchRequestElement] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: filesystem_models.GetByPathResourcesBatchResponse + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/filesystem/resources/getByPathBatch", + query_params={ + "preview": preview, + }, + path_params={}, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=body, + response_type=filesystem_models.GetByPathResourcesBatchResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def markings( + self, + resource_rid: filesystem_models.ResourceRid, + *, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.ResourceIterator[core_models.MarkingId]: + """ + List of Markings directly applied to a resource. The number of Markings on a resource is typically small + so the `pageSize` and `pageToken` parameters are not required. + + :param resource_rid: + :type resource_rid: ResourceRid + :param page_size: The page size to use for the endpoint. + :type page_size: Optional[PageSize] + :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. + :type page_token: Optional[PageToken] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.ResourceIterator[core_models.MarkingId] + + :raises ResourceNotFound: The given Resource could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/filesystem/resources/{resourceRid}/markings", + query_params={ + "pageSize": page_size, + "pageToken": page_token, + "preview": preview, + }, + path_params={ + "resourceRid": resource_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=filesystem_models.ListMarkingsOfResourceResponse, + request_timeout=request_timeout, + throwable_errors={ + "ResourceNotFound": filesystem_errors.ResourceNotFound, + }, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def permanently_delete( + self, + resource_rid: filesystem_models.ResourceRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> None: + """ + Permanently delete the given resource from the trash. If the Resource is not directly trashed, a + `ResourceNotTrashed` error will be thrown. + + :param resource_rid: + :type resource_rid: ResourceRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: None + + :raises PermanentlyDeleteResourcePermissionDenied: Could not permanentlyDelete the Resource. + :raises ResourceNotFound: The given Resource could not be found. + :raises ResourceNotTrashed: The Resource should be directly trashed before being permanently deleted. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/filesystem/resources/{resourceRid}/permanentlyDelete", + query_params={ + "preview": preview, + }, + path_params={ + "resourceRid": resource_rid, + }, + header_params={}, + body=None, + response_type=None, + request_timeout=request_timeout, + throwable_errors={ + "PermanentlyDeleteResourcePermissionDenied": filesystem_errors.PermanentlyDeleteResourcePermissionDenied, + "ResourceNotFound": filesystem_errors.ResourceNotFound, + "ResourceNotTrashed": filesystem_errors.ResourceNotTrashed, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def remove_markings( + self, + resource_rid: filesystem_models.ResourceRid, + *, + marking_ids: typing.List[core_models.MarkingId], + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> None: + """ + Removes Markings from a resource. + :param resource_rid: + :type resource_rid: ResourceRid + :param marking_ids: + :type marking_ids: List[MarkingId] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: None + + :raises ForbiddenOperationOnAutosavedResource: Performing this operation on an autosaved resource is not supported. + :raises ForbiddenOperationOnHiddenResource: Performing this operation on a hidden resource is not supported. + :raises MarkingNotFound: A provided marking ID cannot be found. + :raises OrganizationMarkingNotSupported: Adding an organization marking as a regular marking is not supported. Use the organization endpoints on a project resource instead. + :raises RemoveMarkingsPermissionDenied: Could not removeMarkings the Resource. + :raises ResourceNotFound: The given Resource could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/filesystem/resources/{resourceRid}/removeMarkings", + query_params={ + "preview": preview, + }, + path_params={ + "resourceRid": resource_rid, + }, + header_params={ + "Content-Type": "application/json", + }, + body=filesystem_models.RemoveMarkingsRequest( + marking_ids=marking_ids, + ), + response_type=None, + request_timeout=request_timeout, + throwable_errors={ + "ForbiddenOperationOnAutosavedResource": filesystem_errors.ForbiddenOperationOnAutosavedResource, + "ForbiddenOperationOnHiddenResource": filesystem_errors.ForbiddenOperationOnHiddenResource, + "MarkingNotFound": filesystem_errors.MarkingNotFound, + "OrganizationMarkingNotSupported": filesystem_errors.OrganizationMarkingNotSupported, + "RemoveMarkingsPermissionDenied": filesystem_errors.RemoveMarkingsPermissionDenied, + "ResourceNotFound": filesystem_errors.ResourceNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def restore( + self, + resource_rid: filesystem_models.ResourceRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> None: + """ + Restore the given resource and any directly trashed ancestors from the trash. If the resource is not + trashed, this operation will be ignored. + + :param resource_rid: + :type resource_rid: ResourceRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: None + + :raises ResourceNotDirectlyTrashed: The Resource is not directly trashed. + :raises ResourceNotFound: The given Resource could not be found. + :raises RestoreResourcePermissionDenied: Could not restore the Resource. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/filesystem/resources/{resourceRid}/restore", + query_params={ + "preview": preview, + }, + path_params={ + "resourceRid": resource_rid, + }, + header_params={}, + body=None, + response_type=None, + request_timeout=request_timeout, + throwable_errors={ + "ResourceNotDirectlyTrashed": filesystem_errors.ResourceNotDirectlyTrashed, + "ResourceNotFound": filesystem_errors.ResourceNotFound, + "RestoreResourcePermissionDenied": filesystem_errors.RestoreResourcePermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _ResourceClientRaw: + def __init__(self, client: ResourceClient) -> None: + def add_markings(_: None): ... + def delete(_: None): ... + def get(_: filesystem_models.Resource): ... + def get_access_requirements(_: filesystem_models.AccessRequirements): ... + def get_batch(_: filesystem_models.GetResourcesBatchResponse): ... + def get_by_path(_: filesystem_models.Resource): ... + def get_by_path_batch(_: filesystem_models.GetByPathResourcesBatchResponse): ... + def markings(_: filesystem_models.ListMarkingsOfResourceResponse): ... + def permanently_delete(_: None): ... + def remove_markings(_: None): ... + def restore(_: None): ... + + self.add_markings = core.with_raw_response(add_markings, client.add_markings) + self.delete = core.with_raw_response(delete, client.delete) + self.get = core.with_raw_response(get, client.get) + self.get_access_requirements = core.with_raw_response( + get_access_requirements, client.get_access_requirements + ) + self.get_batch = core.with_raw_response(get_batch, client.get_batch) + self.get_by_path = core.with_raw_response(get_by_path, client.get_by_path) + self.get_by_path_batch = core.with_raw_response(get_by_path_batch, client.get_by_path_batch) + self.markings = core.with_raw_response(markings, client.markings) + self.permanently_delete = core.with_raw_response( + permanently_delete, client.permanently_delete + ) + self.remove_markings = core.with_raw_response(remove_markings, client.remove_markings) + self.restore = core.with_raw_response(restore, client.restore) + + +class _ResourceClientStreaming: + def __init__(self, client: ResourceClient) -> None: + def get(_: filesystem_models.Resource): ... + def get_access_requirements(_: filesystem_models.AccessRequirements): ... + def get_batch(_: filesystem_models.GetResourcesBatchResponse): ... + def get_by_path(_: filesystem_models.Resource): ... + def get_by_path_batch(_: filesystem_models.GetByPathResourcesBatchResponse): ... + def markings(_: filesystem_models.ListMarkingsOfResourceResponse): ... + + self.get = core.with_streaming_response(get, client.get) + self.get_access_requirements = core.with_streaming_response( + get_access_requirements, client.get_access_requirements + ) + self.get_batch = core.with_streaming_response(get_batch, client.get_batch) + self.get_by_path = core.with_streaming_response(get_by_path, client.get_by_path) + self.get_by_path_batch = core.with_streaming_response( + get_by_path_batch, client.get_by_path_batch + ) + self.markings = core.with_streaming_response(markings, client.markings) + + +class AsyncResourceClient: + """ + The API client for the Resource Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncResourceClientStreaming(self) + self.with_raw_response = _AsyncResourceClientRaw(self) + + @cached_property + def Role(self): + from foundry_sdk.v2.filesystem.resource_role import AsyncResourceRoleClient + + return AsyncResourceRoleClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def add_markings( + self, + resource_rid: filesystem_models.ResourceRid, + *, + marking_ids: typing.List[core_models.MarkingId], + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[None]: + """ + Adds a list of Markings to a resource. + :param resource_rid: + :type resource_rid: ResourceRid + :param marking_ids: + :type marking_ids: List[MarkingId] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[None] + + :raises AddMarkingsPermissionDenied: Could not addMarkings the Resource. + :raises ForbiddenOperationOnAutosavedResource: Performing this operation on an autosaved resource is not supported. + :raises ForbiddenOperationOnHiddenResource: Performing this operation on a hidden resource is not supported. + :raises MarkingNotFound: A provided marking ID cannot be found. + :raises OrganizationMarkingNotSupported: Adding an organization marking as a regular marking is not supported. Use the organization endpoints on a project resource instead. + :raises ResourceNotFound: The given Resource could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/filesystem/resources/{resourceRid}/addMarkings", + query_params={ + "preview": preview, + }, + path_params={ + "resourceRid": resource_rid, + }, + header_params={ + "Content-Type": "application/json", + }, + body=filesystem_models.AddMarkingsRequest( + marking_ids=marking_ids, + ), + response_type=None, + request_timeout=request_timeout, + throwable_errors={ + "AddMarkingsPermissionDenied": filesystem_errors.AddMarkingsPermissionDenied, + "ForbiddenOperationOnAutosavedResource": filesystem_errors.ForbiddenOperationOnAutosavedResource, + "ForbiddenOperationOnHiddenResource": filesystem_errors.ForbiddenOperationOnHiddenResource, + "MarkingNotFound": filesystem_errors.MarkingNotFound, + "OrganizationMarkingNotSupported": filesystem_errors.OrganizationMarkingNotSupported, + "ResourceNotFound": filesystem_errors.ResourceNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def delete( + self, + resource_rid: filesystem_models.ResourceRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[None]: + """ + Move the given resource to the trash. Following this operation, the resource can be restored, using the + `restore` operation, or permanently deleted using the `permanentlyDelete` operation. + + :param resource_rid: + :type resource_rid: ResourceRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[None] + + :raises DeleteResourcePermissionDenied: Could not delete the Resource. + :raises ResourceNotFound: The given Resource could not be found. + :raises TrashingAutosavedResourcesNotSupported: Auto-saved Resources cannot be trashed. + :raises TrashingHiddenResourcesNotSupported: Hidden Resources cannot be trashed. + :raises TrashingSpaceNotSupported: Spaces cannot be trashed. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="DELETE", + resource_path="/v2/filesystem/resources/{resourceRid}", + query_params={ + "preview": preview, + }, + path_params={ + "resourceRid": resource_rid, + }, + header_params={}, + body=None, + response_type=None, + request_timeout=request_timeout, + throwable_errors={ + "DeleteResourcePermissionDenied": filesystem_errors.DeleteResourcePermissionDenied, + "ResourceNotFound": filesystem_errors.ResourceNotFound, + "TrashingAutosavedResourcesNotSupported": filesystem_errors.TrashingAutosavedResourcesNotSupported, + "TrashingHiddenResourcesNotSupported": filesystem_errors.TrashingHiddenResourcesNotSupported, + "TrashingSpaceNotSupported": filesystem_errors.TrashingSpaceNotSupported, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + resource_rid: filesystem_models.ResourceRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[filesystem_models.Resource]: + """ + Get the Resource with the specified rid. + :param resource_rid: + :type resource_rid: ResourceRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[filesystem_models.Resource] + + :raises GetRootFolderNotSupported: Getting the root folder as a resource is not supported. + :raises GetSpaceResourceNotSupported: Getting a space as a resource is not supported. + :raises ResourceNotFound: The given Resource could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/filesystem/resources/{resourceRid}", + query_params={ + "preview": preview, + }, + path_params={ + "resourceRid": resource_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=filesystem_models.Resource, + request_timeout=request_timeout, + throwable_errors={ + "GetRootFolderNotSupported": filesystem_errors.GetRootFolderNotSupported, + "GetSpaceResourceNotSupported": filesystem_errors.GetSpaceResourceNotSupported, + "ResourceNotFound": filesystem_errors.ResourceNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get_access_requirements( + self, + resource_rid: filesystem_models.ResourceRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[filesystem_models.AccessRequirements]: + """ + Returns a list of access requirements a user needs in order to view a resource. Access requirements are + composed of Organizations and Markings, and can either be applied directly to the resource or inherited. + + :param resource_rid: + :type resource_rid: ResourceRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[filesystem_models.AccessRequirements] + + :raises GetAccessRequirementsPermissionDenied: Could not getAccessRequirements the Resource. + :raises ResourceNotFound: The given Resource could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/filesystem/resources/{resourceRid}/getAccessRequirements", + query_params={ + "preview": preview, + }, + path_params={ + "resourceRid": resource_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=filesystem_models.AccessRequirements, + request_timeout=request_timeout, + throwable_errors={ + "GetAccessRequirementsPermissionDenied": filesystem_errors.GetAccessRequirementsPermissionDenied, + "ResourceNotFound": filesystem_errors.ResourceNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get_batch( + self, + body: typing_extensions.Annotated[ + typing.List[filesystem_models.GetResourcesBatchRequestElement], + annotated_types.Len(min_length=1, max_length=1000), + ], + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[filesystem_models.GetResourcesBatchResponse]: + """ + Fetches multiple resources in a single request. + Returns a map from RID to the corresponding resource. If a resource does not exist, or if it is a root folder or space, its RID will not be included in the map. + At most 1,000 resources should be requested at once. + + + The maximum batch size for this endpoint is 1000. + :param body: Body of the request + :type body: List[GetResourcesBatchRequestElement] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[filesystem_models.GetResourcesBatchResponse] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/filesystem/resources/getBatch", + query_params={ + "preview": preview, + }, + path_params={}, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=body, + response_type=filesystem_models.GetResourcesBatchResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get_by_path( + self, + *, + path: filesystem_models.ResourcePath, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[filesystem_models.Resource]: + """ + Get a Resource by its absolute path. + :param path: The path to the Resource. The leading slash is optional. + :type path: ResourcePath + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[filesystem_models.Resource] + + :raises GetByPathPermissionDenied: Could not getByPath the Resource. + :raises GetRootFolderNotSupported: Getting the root folder as a resource is not supported. + :raises GetSpaceResourceNotSupported: Getting a space as a resource is not supported. + :raises InvalidPath: The given path is invalid. A valid path has all components separated by a single `/`. + :raises PathNotFound: The given path could not be found. + :raises ResourceNotFound: The given Resource could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/filesystem/resources/getByPath", + query_params={ + "path": path, + "preview": preview, + }, + path_params={}, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=filesystem_models.Resource, + request_timeout=request_timeout, + throwable_errors={ + "GetByPathPermissionDenied": filesystem_errors.GetByPathPermissionDenied, + "GetRootFolderNotSupported": filesystem_errors.GetRootFolderNotSupported, + "GetSpaceResourceNotSupported": filesystem_errors.GetSpaceResourceNotSupported, + "InvalidPath": filesystem_errors.InvalidPath, + "PathNotFound": filesystem_errors.PathNotFound, + "ResourceNotFound": filesystem_errors.ResourceNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get_by_path_batch( + self, + body: typing_extensions.Annotated[ + typing.List[filesystem_models.GetByPathResourcesBatchRequestElement], + annotated_types.Len(min_length=1, max_length=1000), + ], + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[filesystem_models.GetByPathResourcesBatchResponse]: + """ + Gets multiple Resources by their absolute paths. + Returns a list of resources. If a path does not exist, is inaccessible, or refers to + a root folder or space, it will not be included in the response. + At most 1,000 paths should be requested at once. + + + The maximum batch size for this endpoint is 1000. + :param body: Body of the request + :type body: List[GetByPathResourcesBatchRequestElement] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[filesystem_models.GetByPathResourcesBatchResponse] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/filesystem/resources/getByPathBatch", + query_params={ + "preview": preview, + }, + path_params={}, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=body, + response_type=filesystem_models.GetByPathResourcesBatchResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def markings( + self, + resource_rid: filesystem_models.ResourceRid, + *, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.AsyncResourceIterator[core_models.MarkingId]: + """ + List of Markings directly applied to a resource. The number of Markings on a resource is typically small + so the `pageSize` and `pageToken` parameters are not required. + + :param resource_rid: + :type resource_rid: ResourceRid + :param page_size: The page size to use for the endpoint. + :type page_size: Optional[PageSize] + :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. + :type page_token: Optional[PageToken] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.AsyncResourceIterator[core_models.MarkingId] + + :raises ResourceNotFound: The given Resource could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/filesystem/resources/{resourceRid}/markings", + query_params={ + "pageSize": page_size, + "pageToken": page_token, + "preview": preview, + }, + path_params={ + "resourceRid": resource_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=filesystem_models.ListMarkingsOfResourceResponse, + request_timeout=request_timeout, + throwable_errors={ + "ResourceNotFound": filesystem_errors.ResourceNotFound, + }, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def permanently_delete( + self, + resource_rid: filesystem_models.ResourceRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[None]: + """ + Permanently delete the given resource from the trash. If the Resource is not directly trashed, a + `ResourceNotTrashed` error will be thrown. + + :param resource_rid: + :type resource_rid: ResourceRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[None] + + :raises PermanentlyDeleteResourcePermissionDenied: Could not permanentlyDelete the Resource. + :raises ResourceNotFound: The given Resource could not be found. + :raises ResourceNotTrashed: The Resource should be directly trashed before being permanently deleted. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/filesystem/resources/{resourceRid}/permanentlyDelete", + query_params={ + "preview": preview, + }, + path_params={ + "resourceRid": resource_rid, + }, + header_params={}, + body=None, + response_type=None, + request_timeout=request_timeout, + throwable_errors={ + "PermanentlyDeleteResourcePermissionDenied": filesystem_errors.PermanentlyDeleteResourcePermissionDenied, + "ResourceNotFound": filesystem_errors.ResourceNotFound, + "ResourceNotTrashed": filesystem_errors.ResourceNotTrashed, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def remove_markings( + self, + resource_rid: filesystem_models.ResourceRid, + *, + marking_ids: typing.List[core_models.MarkingId], + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[None]: + """ + Removes Markings from a resource. + :param resource_rid: + :type resource_rid: ResourceRid + :param marking_ids: + :type marking_ids: List[MarkingId] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[None] + + :raises ForbiddenOperationOnAutosavedResource: Performing this operation on an autosaved resource is not supported. + :raises ForbiddenOperationOnHiddenResource: Performing this operation on a hidden resource is not supported. + :raises MarkingNotFound: A provided marking ID cannot be found. + :raises OrganizationMarkingNotSupported: Adding an organization marking as a regular marking is not supported. Use the organization endpoints on a project resource instead. + :raises RemoveMarkingsPermissionDenied: Could not removeMarkings the Resource. + :raises ResourceNotFound: The given Resource could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/filesystem/resources/{resourceRid}/removeMarkings", + query_params={ + "preview": preview, + }, + path_params={ + "resourceRid": resource_rid, + }, + header_params={ + "Content-Type": "application/json", + }, + body=filesystem_models.RemoveMarkingsRequest( + marking_ids=marking_ids, + ), + response_type=None, + request_timeout=request_timeout, + throwable_errors={ + "ForbiddenOperationOnAutosavedResource": filesystem_errors.ForbiddenOperationOnAutosavedResource, + "ForbiddenOperationOnHiddenResource": filesystem_errors.ForbiddenOperationOnHiddenResource, + "MarkingNotFound": filesystem_errors.MarkingNotFound, + "OrganizationMarkingNotSupported": filesystem_errors.OrganizationMarkingNotSupported, + "RemoveMarkingsPermissionDenied": filesystem_errors.RemoveMarkingsPermissionDenied, + "ResourceNotFound": filesystem_errors.ResourceNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def restore( + self, + resource_rid: filesystem_models.ResourceRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[None]: + """ + Restore the given resource and any directly trashed ancestors from the trash. If the resource is not + trashed, this operation will be ignored. + + :param resource_rid: + :type resource_rid: ResourceRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[None] + + :raises ResourceNotDirectlyTrashed: The Resource is not directly trashed. + :raises ResourceNotFound: The given Resource could not be found. + :raises RestoreResourcePermissionDenied: Could not restore the Resource. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/filesystem/resources/{resourceRid}/restore", + query_params={ + "preview": preview, + }, + path_params={ + "resourceRid": resource_rid, + }, + header_params={}, + body=None, + response_type=None, + request_timeout=request_timeout, + throwable_errors={ + "ResourceNotDirectlyTrashed": filesystem_errors.ResourceNotDirectlyTrashed, + "ResourceNotFound": filesystem_errors.ResourceNotFound, + "RestoreResourcePermissionDenied": filesystem_errors.RestoreResourcePermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _AsyncResourceClientRaw: + def __init__(self, client: AsyncResourceClient) -> None: + def add_markings(_: None): ... + def delete(_: None): ... + def get(_: filesystem_models.Resource): ... + def get_access_requirements(_: filesystem_models.AccessRequirements): ... + def get_batch(_: filesystem_models.GetResourcesBatchResponse): ... + def get_by_path(_: filesystem_models.Resource): ... + def get_by_path_batch(_: filesystem_models.GetByPathResourcesBatchResponse): ... + def markings(_: filesystem_models.ListMarkingsOfResourceResponse): ... + def permanently_delete(_: None): ... + def remove_markings(_: None): ... + def restore(_: None): ... + + self.add_markings = core.async_with_raw_response(add_markings, client.add_markings) + self.delete = core.async_with_raw_response(delete, client.delete) + self.get = core.async_with_raw_response(get, client.get) + self.get_access_requirements = core.async_with_raw_response( + get_access_requirements, client.get_access_requirements + ) + self.get_batch = core.async_with_raw_response(get_batch, client.get_batch) + self.get_by_path = core.async_with_raw_response(get_by_path, client.get_by_path) + self.get_by_path_batch = core.async_with_raw_response( + get_by_path_batch, client.get_by_path_batch + ) + self.markings = core.async_with_raw_response(markings, client.markings) + self.permanently_delete = core.async_with_raw_response( + permanently_delete, client.permanently_delete + ) + self.remove_markings = core.async_with_raw_response(remove_markings, client.remove_markings) + self.restore = core.async_with_raw_response(restore, client.restore) + + +class _AsyncResourceClientStreaming: + def __init__(self, client: AsyncResourceClient) -> None: + def get(_: filesystem_models.Resource): ... + def get_access_requirements(_: filesystem_models.AccessRequirements): ... + def get_batch(_: filesystem_models.GetResourcesBatchResponse): ... + def get_by_path(_: filesystem_models.Resource): ... + def get_by_path_batch(_: filesystem_models.GetByPathResourcesBatchResponse): ... + def markings(_: filesystem_models.ListMarkingsOfResourceResponse): ... + + self.get = core.async_with_streaming_response(get, client.get) + self.get_access_requirements = core.async_with_streaming_response( + get_access_requirements, client.get_access_requirements + ) + self.get_batch = core.async_with_streaming_response(get_batch, client.get_batch) + self.get_by_path = core.async_with_streaming_response(get_by_path, client.get_by_path) + self.get_by_path_batch = core.async_with_streaming_response( + get_by_path_batch, client.get_by_path_batch + ) + self.markings = core.async_with_streaming_response(markings, client.markings) diff --git a/foundry_sdk/v2/filesystem/resource_role.py b/foundry_sdk/v2/filesystem/resource_role.py new file mode 100644 index 000000000..9942b4dc3 --- /dev/null +++ b/foundry_sdk/v2/filesystem/resource_role.py @@ -0,0 +1,440 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v2.admin import errors as admin_errors +from foundry_sdk.v2.core import models as core_models +from foundry_sdk.v2.filesystem import errors as filesystem_errors +from foundry_sdk.v2.filesystem import models as filesystem_models + + +class ResourceRoleClient: + """ + The API client for the ResourceRole Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _ResourceRoleClientStreaming(self) + self.with_raw_response = _ResourceRoleClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def add( + self, + resource_rid: filesystem_models.ResourceRid, + *, + roles: typing.List[filesystem_models.ResourceRoleIdentifier], + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> None: + """ + + :param resource_rid: + :type resource_rid: ResourceRid + :param roles: + :type roles: List[ResourceRoleIdentifier] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: None + + :raises AddResourceRolesPermissionDenied: Could not add the ResourceRole. + :raises InvalidRoleIds: A roleId referenced in either default roles or role grants does not exist in the project role set for the space. + :raises PrincipalNotFound: A principal (User or Group) with the given PrincipalId could not be found + :raises ResourceNotFound: The given Resource could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/filesystem/resources/{resourceRid}/roles/add", + query_params={}, + path_params={ + "resourceRid": resource_rid, + }, + header_params={ + "Content-Type": "application/json", + }, + body=filesystem_models.AddResourceRolesRequest( + roles=roles, + ), + response_type=None, + request_timeout=request_timeout, + throwable_errors={ + "AddResourceRolesPermissionDenied": filesystem_errors.AddResourceRolesPermissionDenied, + "InvalidRoleIds": filesystem_errors.InvalidRoleIds, + "PrincipalNotFound": admin_errors.PrincipalNotFound, + "ResourceNotFound": filesystem_errors.ResourceNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def list( + self, + resource_rid: filesystem_models.ResourceRid, + *, + include_inherited: typing.Optional[bool] = None, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.ResourceIterator[filesystem_models.ResourceRole]: + """ + List the roles on a resource. + + :param resource_rid: + :type resource_rid: ResourceRid + :param include_inherited: Whether to include inherited roles on the resource. + :type include_inherited: Optional[bool] + :param page_size: The page size to use for the endpoint. + :type page_size: Optional[PageSize] + :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. + :type page_token: Optional[PageToken] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.ResourceIterator[filesystem_models.ResourceRole] + + :raises ResourceNotFound: The given Resource could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/filesystem/resources/{resourceRid}/roles", + query_params={ + "includeInherited": include_inherited, + "pageSize": page_size, + "pageToken": page_token, + }, + path_params={ + "resourceRid": resource_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=filesystem_models.ListResourceRolesResponse, + request_timeout=request_timeout, + throwable_errors={ + "ResourceNotFound": filesystem_errors.ResourceNotFound, + }, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def remove( + self, + resource_rid: filesystem_models.ResourceRid, + *, + roles: typing.List[filesystem_models.ResourceRoleIdentifier], + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> None: + """ + + :param resource_rid: + :type resource_rid: ResourceRid + :param roles: + :type roles: List[ResourceRoleIdentifier] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: None + + :raises InvalidRoleIds: A roleId referenced in either default roles or role grants does not exist in the project role set for the space. + :raises PrincipalNotFound: A principal (User or Group) with the given PrincipalId could not be found + :raises RemoveResourceRolesPermissionDenied: Could not remove the ResourceRole. + :raises ResourceNotFound: The given Resource could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/filesystem/resources/{resourceRid}/roles/remove", + query_params={}, + path_params={ + "resourceRid": resource_rid, + }, + header_params={ + "Content-Type": "application/json", + }, + body=filesystem_models.RemoveResourceRolesRequest( + roles=roles, + ), + response_type=None, + request_timeout=request_timeout, + throwable_errors={ + "InvalidRoleIds": filesystem_errors.InvalidRoleIds, + "PrincipalNotFound": admin_errors.PrincipalNotFound, + "RemoveResourceRolesPermissionDenied": filesystem_errors.RemoveResourceRolesPermissionDenied, + "ResourceNotFound": filesystem_errors.ResourceNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _ResourceRoleClientRaw: + def __init__(self, client: ResourceRoleClient) -> None: + def add(_: None): ... + def list(_: filesystem_models.ListResourceRolesResponse): ... + def remove(_: None): ... + + self.add = core.with_raw_response(add, client.add) + self.list = core.with_raw_response(list, client.list) + self.remove = core.with_raw_response(remove, client.remove) + + +class _ResourceRoleClientStreaming: + def __init__(self, client: ResourceRoleClient) -> None: + def list(_: filesystem_models.ListResourceRolesResponse): ... + + self.list = core.with_streaming_response(list, client.list) + + +class AsyncResourceRoleClient: + """ + The API client for the ResourceRole Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncResourceRoleClientStreaming(self) + self.with_raw_response = _AsyncResourceRoleClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def add( + self, + resource_rid: filesystem_models.ResourceRid, + *, + roles: typing.List[filesystem_models.ResourceRoleIdentifier], + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[None]: + """ + + :param resource_rid: + :type resource_rid: ResourceRid + :param roles: + :type roles: List[ResourceRoleIdentifier] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[None] + + :raises AddResourceRolesPermissionDenied: Could not add the ResourceRole. + :raises InvalidRoleIds: A roleId referenced in either default roles or role grants does not exist in the project role set for the space. + :raises PrincipalNotFound: A principal (User or Group) with the given PrincipalId could not be found + :raises ResourceNotFound: The given Resource could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/filesystem/resources/{resourceRid}/roles/add", + query_params={}, + path_params={ + "resourceRid": resource_rid, + }, + header_params={ + "Content-Type": "application/json", + }, + body=filesystem_models.AddResourceRolesRequest( + roles=roles, + ), + response_type=None, + request_timeout=request_timeout, + throwable_errors={ + "AddResourceRolesPermissionDenied": filesystem_errors.AddResourceRolesPermissionDenied, + "InvalidRoleIds": filesystem_errors.InvalidRoleIds, + "PrincipalNotFound": admin_errors.PrincipalNotFound, + "ResourceNotFound": filesystem_errors.ResourceNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def list( + self, + resource_rid: filesystem_models.ResourceRid, + *, + include_inherited: typing.Optional[bool] = None, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.AsyncResourceIterator[filesystem_models.ResourceRole]: + """ + List the roles on a resource. + + :param resource_rid: + :type resource_rid: ResourceRid + :param include_inherited: Whether to include inherited roles on the resource. + :type include_inherited: Optional[bool] + :param page_size: The page size to use for the endpoint. + :type page_size: Optional[PageSize] + :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. + :type page_token: Optional[PageToken] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.AsyncResourceIterator[filesystem_models.ResourceRole] + + :raises ResourceNotFound: The given Resource could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/filesystem/resources/{resourceRid}/roles", + query_params={ + "includeInherited": include_inherited, + "pageSize": page_size, + "pageToken": page_token, + }, + path_params={ + "resourceRid": resource_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=filesystem_models.ListResourceRolesResponse, + request_timeout=request_timeout, + throwable_errors={ + "ResourceNotFound": filesystem_errors.ResourceNotFound, + }, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def remove( + self, + resource_rid: filesystem_models.ResourceRid, + *, + roles: typing.List[filesystem_models.ResourceRoleIdentifier], + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[None]: + """ + + :param resource_rid: + :type resource_rid: ResourceRid + :param roles: + :type roles: List[ResourceRoleIdentifier] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[None] + + :raises InvalidRoleIds: A roleId referenced in either default roles or role grants does not exist in the project role set for the space. + :raises PrincipalNotFound: A principal (User or Group) with the given PrincipalId could not be found + :raises RemoveResourceRolesPermissionDenied: Could not remove the ResourceRole. + :raises ResourceNotFound: The given Resource could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/filesystem/resources/{resourceRid}/roles/remove", + query_params={}, + path_params={ + "resourceRid": resource_rid, + }, + header_params={ + "Content-Type": "application/json", + }, + body=filesystem_models.RemoveResourceRolesRequest( + roles=roles, + ), + response_type=None, + request_timeout=request_timeout, + throwable_errors={ + "InvalidRoleIds": filesystem_errors.InvalidRoleIds, + "PrincipalNotFound": admin_errors.PrincipalNotFound, + "RemoveResourceRolesPermissionDenied": filesystem_errors.RemoveResourceRolesPermissionDenied, + "ResourceNotFound": filesystem_errors.ResourceNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _AsyncResourceRoleClientRaw: + def __init__(self, client: AsyncResourceRoleClient) -> None: + def add(_: None): ... + def list(_: filesystem_models.ListResourceRolesResponse): ... + def remove(_: None): ... + + self.add = core.async_with_raw_response(add, client.add) + self.list = core.async_with_raw_response(list, client.list) + self.remove = core.async_with_raw_response(remove, client.remove) + + +class _AsyncResourceRoleClientStreaming: + def __init__(self, client: AsyncResourceRoleClient) -> None: + def list(_: filesystem_models.ListResourceRolesResponse): ... + + self.list = core.async_with_streaming_response(list, client.list) diff --git a/foundry_sdk/v2/filesystem/space.py b/foundry_sdk/v2/filesystem/space.py new file mode 100644 index 000000000..031916037 --- /dev/null +++ b/foundry_sdk/v2/filesystem/space.py @@ -0,0 +1,763 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v2.core import models as core_models +from foundry_sdk.v2.filesystem import errors as filesystem_errors +from foundry_sdk.v2.filesystem import models as filesystem_models + + +class SpaceClient: + """ + The API client for the Space Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _SpaceClientStreaming(self) + self.with_raw_response = _SpaceClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def create( + self, + *, + deletion_policy_organizations: typing.List[core_models.OrganizationRid], + display_name: filesystem_models.ResourceDisplayName, + enrollment_rid: core_models.EnrollmentRid, + organizations: typing.List[core_models.OrganizationRid], + default_role_set_id: typing.Optional[core_models.RoleSetId] = None, + description: typing.Optional[str] = None, + file_system_id: typing.Optional[filesystem_models.FileSystemId] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + usage_account_rid: typing.Optional[filesystem_models.UsageAccountRid] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> filesystem_models.Space: + """ + Creates a new Space. + :param deletion_policy_organizations: By default, this Space will use a Last Out deletion policy, meaning that this Space and its projects will be deleted when the last Organization listed here is deleted. Only Organizations in the Space's Enrollment can be included here. + :type deletion_policy_organizations: List[OrganizationRid] + :param display_name: + :type display_name: ResourceDisplayName + :param enrollment_rid: The RID of the Enrollment that this Space belongs to. + :type enrollment_rid: EnrollmentRid + :param organizations: The list of Organizations that are provisioned access to this Space. In order to access this Space, a user must be a member of at least one of these Organizations. + :type organizations: List[OrganizationRid] + :param default_role_set_id: The ID of the default Role Set for this Space, which defines the set of roles that Projects in this Space must use. If not provided, the default Role Set for Projects will be used. + :type default_role_set_id: Optional[RoleSetId] + :param description: The description of the Space. + :type description: Optional[str] + :param file_system_id: The ID of the Filesystem for this Space, which is where the contents of the Space are stored. If not provided, the default Filesystem for this Enrollment will be used. + :type file_system_id: Optional[FileSystemId] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param usage_account_rid: The RID of the Usage Account for this Space. Resource usage for projects in this space will accrue to this Usage Account by default. If not provided, the default Usage Account for this Enrollment will be used. + :type usage_account_rid: Optional[UsageAccountRid] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: filesystem_models.Space + + :raises CreateSpacePermissionDenied: Could not create the Space. + :raises EnrollmentNotFound: An enrollment was not found for the user. + :raises OrganizationsNotFound: At least one organization RID could not be found. + :raises RoleSetNotFound: The role set provided in the request to create or replace a space could not be found. + :raises SpaceInternalError: An internal error occurred when trying to create or replace the space. + :raises SpaceInvalidArgument: An invalid argument was provided in the request to create or replace a space. + :raises SpaceNameInvalid: The provided space name is invalid. It may be a reserved name or contain invalid characters. + :raises SpaceNotFound: The given Space could not be found. + :raises UsageAccountServiceIsNotPresent: The Usage Accounts service is unexpectedly not present. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/filesystem/spaces", + query_params={ + "preview": preview, + }, + path_params={}, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=filesystem_models.CreateSpaceRequest( + enrollment_rid=enrollment_rid, + usage_account_rid=usage_account_rid, + file_system_id=file_system_id, + display_name=display_name, + organizations=organizations, + description=description, + deletion_policy_organizations=deletion_policy_organizations, + default_role_set_id=default_role_set_id, + ), + response_type=filesystem_models.Space, + request_timeout=request_timeout, + throwable_errors={ + "CreateSpacePermissionDenied": filesystem_errors.CreateSpacePermissionDenied, + "EnrollmentNotFound": filesystem_errors.EnrollmentNotFound, + "OrganizationsNotFound": filesystem_errors.OrganizationsNotFound, + "RoleSetNotFound": filesystem_errors.RoleSetNotFound, + "SpaceInternalError": filesystem_errors.SpaceInternalError, + "SpaceInvalidArgument": filesystem_errors.SpaceInvalidArgument, + "SpaceNameInvalid": filesystem_errors.SpaceNameInvalid, + "SpaceNotFound": filesystem_errors.SpaceNotFound, + "UsageAccountServiceIsNotPresent": filesystem_errors.UsageAccountServiceIsNotPresent, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def delete( + self, + space_rid: filesystem_models.SpaceRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> None: + """ + Delete the space. This will only work if the Space is empty, meaning any Projects or Resources have been deleted first. + + :param space_rid: + :type space_rid: SpaceRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: None + + :raises DeleteSpacePermissionDenied: Could not delete the Space. + :raises SpaceNotEmpty: The space cannot be deleted because it contains resources. + :raises SpaceNotFound: The given Space could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="DELETE", + resource_path="/v2/filesystem/spaces/{spaceRid}", + query_params={ + "preview": preview, + }, + path_params={ + "spaceRid": space_rid, + }, + header_params={}, + body=None, + response_type=None, + request_timeout=request_timeout, + throwable_errors={ + "DeleteSpacePermissionDenied": filesystem_errors.DeleteSpacePermissionDenied, + "SpaceNotEmpty": filesystem_errors.SpaceNotEmpty, + "SpaceNotFound": filesystem_errors.SpaceNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + space_rid: filesystem_models.SpaceRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> filesystem_models.Space: + """ + Get the Space with the specified rid. + :param space_rid: + :type space_rid: SpaceRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: filesystem_models.Space + + :raises SpaceNotFound: The given Space could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/filesystem/spaces/{spaceRid}", + query_params={ + "preview": preview, + }, + path_params={ + "spaceRid": space_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=filesystem_models.Space, + request_timeout=request_timeout, + throwable_errors={ + "SpaceNotFound": filesystem_errors.SpaceNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def list( + self, + *, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.ResourceIterator[filesystem_models.Space]: + """ + Lists all Spaces. + + This is a paged endpoint. Each page may be smaller or larger than the requested page size. However, it is guaranteed that if there are more results available, the `nextPageToken` field will be populated. To get the next page, make the same request again, but set the value of the `pageToken` query parameter to be value of the `nextPageToken` value of the previous response. If there is no `nextPageToken` field in the response, you are on the last page. + :param page_size: The page size to use for the endpoint. + :type page_size: Optional[PageSize] + :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. + :type page_token: Optional[PageToken] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.ResourceIterator[filesystem_models.Space] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/filesystem/spaces", + query_params={ + "pageSize": page_size, + "pageToken": page_token, + "preview": preview, + }, + path_params={}, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=filesystem_models.ListSpacesResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def replace( + self, + space_rid: filesystem_models.SpaceRid, + *, + display_name: filesystem_models.ResourceDisplayName, + default_role_set_id: typing.Optional[core_models.RoleSetId] = None, + description: typing.Optional[str] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + usage_account_rid: typing.Optional[filesystem_models.UsageAccountRid] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> filesystem_models.Space: + """ + Replace the Space with the specified rid. + :param space_rid: + :type space_rid: SpaceRid + :param display_name: + :type display_name: ResourceDisplayName + :param default_role_set_id: The ID of the default Role Set for this Space, which defines the set of roles that Projects in this Space must use. If not provided, the default Role Set for Projects will be used. + :type default_role_set_id: Optional[RoleSetId] + :param description: The description of the Space. + :type description: Optional[str] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param usage_account_rid: The RID of the Usage Account for this Space. Resource usage for projects in this space will accrue to this Usage Account by default. If not provided, the default Usage Account for this Enrollment will be used. + :type usage_account_rid: Optional[UsageAccountRid] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: filesystem_models.Space + + :raises ReplaceSpacePermissionDenied: Could not replace the Space. + :raises ReservedSpaceCannotBeReplaced: The spaceRid provided is for a reserved space in Foundry which cannot be replaced. + :raises RoleSetNotFound: The role set provided in the request to create or replace a space could not be found. + :raises SpaceInvalidArgument: An invalid argument was provided in the request to create or replace a space. + :raises SpaceNameInvalid: The provided space name is invalid. It may be a reserved name or contain invalid characters. + :raises SpaceNotFound: The given Space could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="PUT", + resource_path="/v2/filesystem/spaces/{spaceRid}", + query_params={ + "preview": preview, + }, + path_params={ + "spaceRid": space_rid, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=filesystem_models.ReplaceSpaceRequest( + usage_account_rid=usage_account_rid, + display_name=display_name, + description=description, + default_role_set_id=default_role_set_id, + ), + response_type=filesystem_models.Space, + request_timeout=request_timeout, + throwable_errors={ + "ReplaceSpacePermissionDenied": filesystem_errors.ReplaceSpacePermissionDenied, + "ReservedSpaceCannotBeReplaced": filesystem_errors.ReservedSpaceCannotBeReplaced, + "RoleSetNotFound": filesystem_errors.RoleSetNotFound, + "SpaceInvalidArgument": filesystem_errors.SpaceInvalidArgument, + "SpaceNameInvalid": filesystem_errors.SpaceNameInvalid, + "SpaceNotFound": filesystem_errors.SpaceNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _SpaceClientRaw: + def __init__(self, client: SpaceClient) -> None: + def create(_: filesystem_models.Space): ... + def delete(_: None): ... + def get(_: filesystem_models.Space): ... + def list(_: filesystem_models.ListSpacesResponse): ... + def replace(_: filesystem_models.Space): ... + + self.create = core.with_raw_response(create, client.create) + self.delete = core.with_raw_response(delete, client.delete) + self.get = core.with_raw_response(get, client.get) + self.list = core.with_raw_response(list, client.list) + self.replace = core.with_raw_response(replace, client.replace) + + +class _SpaceClientStreaming: + def __init__(self, client: SpaceClient) -> None: + def create(_: filesystem_models.Space): ... + def get(_: filesystem_models.Space): ... + def list(_: filesystem_models.ListSpacesResponse): ... + def replace(_: filesystem_models.Space): ... + + self.create = core.with_streaming_response(create, client.create) + self.get = core.with_streaming_response(get, client.get) + self.list = core.with_streaming_response(list, client.list) + self.replace = core.with_streaming_response(replace, client.replace) + + +class AsyncSpaceClient: + """ + The API client for the Space Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncSpaceClientStreaming(self) + self.with_raw_response = _AsyncSpaceClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def create( + self, + *, + deletion_policy_organizations: typing.List[core_models.OrganizationRid], + display_name: filesystem_models.ResourceDisplayName, + enrollment_rid: core_models.EnrollmentRid, + organizations: typing.List[core_models.OrganizationRid], + default_role_set_id: typing.Optional[core_models.RoleSetId] = None, + description: typing.Optional[str] = None, + file_system_id: typing.Optional[filesystem_models.FileSystemId] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + usage_account_rid: typing.Optional[filesystem_models.UsageAccountRid] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[filesystem_models.Space]: + """ + Creates a new Space. + :param deletion_policy_organizations: By default, this Space will use a Last Out deletion policy, meaning that this Space and its projects will be deleted when the last Organization listed here is deleted. Only Organizations in the Space's Enrollment can be included here. + :type deletion_policy_organizations: List[OrganizationRid] + :param display_name: + :type display_name: ResourceDisplayName + :param enrollment_rid: The RID of the Enrollment that this Space belongs to. + :type enrollment_rid: EnrollmentRid + :param organizations: The list of Organizations that are provisioned access to this Space. In order to access this Space, a user must be a member of at least one of these Organizations. + :type organizations: List[OrganizationRid] + :param default_role_set_id: The ID of the default Role Set for this Space, which defines the set of roles that Projects in this Space must use. If not provided, the default Role Set for Projects will be used. + :type default_role_set_id: Optional[RoleSetId] + :param description: The description of the Space. + :type description: Optional[str] + :param file_system_id: The ID of the Filesystem for this Space, which is where the contents of the Space are stored. If not provided, the default Filesystem for this Enrollment will be used. + :type file_system_id: Optional[FileSystemId] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param usage_account_rid: The RID of the Usage Account for this Space. Resource usage for projects in this space will accrue to this Usage Account by default. If not provided, the default Usage Account for this Enrollment will be used. + :type usage_account_rid: Optional[UsageAccountRid] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[filesystem_models.Space] + + :raises CreateSpacePermissionDenied: Could not create the Space. + :raises EnrollmentNotFound: An enrollment was not found for the user. + :raises OrganizationsNotFound: At least one organization RID could not be found. + :raises RoleSetNotFound: The role set provided in the request to create or replace a space could not be found. + :raises SpaceInternalError: An internal error occurred when trying to create or replace the space. + :raises SpaceInvalidArgument: An invalid argument was provided in the request to create or replace a space. + :raises SpaceNameInvalid: The provided space name is invalid. It may be a reserved name or contain invalid characters. + :raises SpaceNotFound: The given Space could not be found. + :raises UsageAccountServiceIsNotPresent: The Usage Accounts service is unexpectedly not present. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/filesystem/spaces", + query_params={ + "preview": preview, + }, + path_params={}, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=filesystem_models.CreateSpaceRequest( + enrollment_rid=enrollment_rid, + usage_account_rid=usage_account_rid, + file_system_id=file_system_id, + display_name=display_name, + organizations=organizations, + description=description, + deletion_policy_organizations=deletion_policy_organizations, + default_role_set_id=default_role_set_id, + ), + response_type=filesystem_models.Space, + request_timeout=request_timeout, + throwable_errors={ + "CreateSpacePermissionDenied": filesystem_errors.CreateSpacePermissionDenied, + "EnrollmentNotFound": filesystem_errors.EnrollmentNotFound, + "OrganizationsNotFound": filesystem_errors.OrganizationsNotFound, + "RoleSetNotFound": filesystem_errors.RoleSetNotFound, + "SpaceInternalError": filesystem_errors.SpaceInternalError, + "SpaceInvalidArgument": filesystem_errors.SpaceInvalidArgument, + "SpaceNameInvalid": filesystem_errors.SpaceNameInvalid, + "SpaceNotFound": filesystem_errors.SpaceNotFound, + "UsageAccountServiceIsNotPresent": filesystem_errors.UsageAccountServiceIsNotPresent, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def delete( + self, + space_rid: filesystem_models.SpaceRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[None]: + """ + Delete the space. This will only work if the Space is empty, meaning any Projects or Resources have been deleted first. + + :param space_rid: + :type space_rid: SpaceRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[None] + + :raises DeleteSpacePermissionDenied: Could not delete the Space. + :raises SpaceNotEmpty: The space cannot be deleted because it contains resources. + :raises SpaceNotFound: The given Space could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="DELETE", + resource_path="/v2/filesystem/spaces/{spaceRid}", + query_params={ + "preview": preview, + }, + path_params={ + "spaceRid": space_rid, + }, + header_params={}, + body=None, + response_type=None, + request_timeout=request_timeout, + throwable_errors={ + "DeleteSpacePermissionDenied": filesystem_errors.DeleteSpacePermissionDenied, + "SpaceNotEmpty": filesystem_errors.SpaceNotEmpty, + "SpaceNotFound": filesystem_errors.SpaceNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + space_rid: filesystem_models.SpaceRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[filesystem_models.Space]: + """ + Get the Space with the specified rid. + :param space_rid: + :type space_rid: SpaceRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[filesystem_models.Space] + + :raises SpaceNotFound: The given Space could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/filesystem/spaces/{spaceRid}", + query_params={ + "preview": preview, + }, + path_params={ + "spaceRid": space_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=filesystem_models.Space, + request_timeout=request_timeout, + throwable_errors={ + "SpaceNotFound": filesystem_errors.SpaceNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def list( + self, + *, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.AsyncResourceIterator[filesystem_models.Space]: + """ + Lists all Spaces. + + This is a paged endpoint. Each page may be smaller or larger than the requested page size. However, it is guaranteed that if there are more results available, the `nextPageToken` field will be populated. To get the next page, make the same request again, but set the value of the `pageToken` query parameter to be value of the `nextPageToken` value of the previous response. If there is no `nextPageToken` field in the response, you are on the last page. + :param page_size: The page size to use for the endpoint. + :type page_size: Optional[PageSize] + :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. + :type page_token: Optional[PageToken] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.AsyncResourceIterator[filesystem_models.Space] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/filesystem/spaces", + query_params={ + "pageSize": page_size, + "pageToken": page_token, + "preview": preview, + }, + path_params={}, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=filesystem_models.ListSpacesResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def replace( + self, + space_rid: filesystem_models.SpaceRid, + *, + display_name: filesystem_models.ResourceDisplayName, + default_role_set_id: typing.Optional[core_models.RoleSetId] = None, + description: typing.Optional[str] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + usage_account_rid: typing.Optional[filesystem_models.UsageAccountRid] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[filesystem_models.Space]: + """ + Replace the Space with the specified rid. + :param space_rid: + :type space_rid: SpaceRid + :param display_name: + :type display_name: ResourceDisplayName + :param default_role_set_id: The ID of the default Role Set for this Space, which defines the set of roles that Projects in this Space must use. If not provided, the default Role Set for Projects will be used. + :type default_role_set_id: Optional[RoleSetId] + :param description: The description of the Space. + :type description: Optional[str] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param usage_account_rid: The RID of the Usage Account for this Space. Resource usage for projects in this space will accrue to this Usage Account by default. If not provided, the default Usage Account for this Enrollment will be used. + :type usage_account_rid: Optional[UsageAccountRid] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[filesystem_models.Space] + + :raises ReplaceSpacePermissionDenied: Could not replace the Space. + :raises ReservedSpaceCannotBeReplaced: The spaceRid provided is for a reserved space in Foundry which cannot be replaced. + :raises RoleSetNotFound: The role set provided in the request to create or replace a space could not be found. + :raises SpaceInvalidArgument: An invalid argument was provided in the request to create or replace a space. + :raises SpaceNameInvalid: The provided space name is invalid. It may be a reserved name or contain invalid characters. + :raises SpaceNotFound: The given Space could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="PUT", + resource_path="/v2/filesystem/spaces/{spaceRid}", + query_params={ + "preview": preview, + }, + path_params={ + "spaceRid": space_rid, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=filesystem_models.ReplaceSpaceRequest( + usage_account_rid=usage_account_rid, + display_name=display_name, + description=description, + default_role_set_id=default_role_set_id, + ), + response_type=filesystem_models.Space, + request_timeout=request_timeout, + throwable_errors={ + "ReplaceSpacePermissionDenied": filesystem_errors.ReplaceSpacePermissionDenied, + "ReservedSpaceCannotBeReplaced": filesystem_errors.ReservedSpaceCannotBeReplaced, + "RoleSetNotFound": filesystem_errors.RoleSetNotFound, + "SpaceInvalidArgument": filesystem_errors.SpaceInvalidArgument, + "SpaceNameInvalid": filesystem_errors.SpaceNameInvalid, + "SpaceNotFound": filesystem_errors.SpaceNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _AsyncSpaceClientRaw: + def __init__(self, client: AsyncSpaceClient) -> None: + def create(_: filesystem_models.Space): ... + def delete(_: None): ... + def get(_: filesystem_models.Space): ... + def list(_: filesystem_models.ListSpacesResponse): ... + def replace(_: filesystem_models.Space): ... + + self.create = core.async_with_raw_response(create, client.create) + self.delete = core.async_with_raw_response(delete, client.delete) + self.get = core.async_with_raw_response(get, client.get) + self.list = core.async_with_raw_response(list, client.list) + self.replace = core.async_with_raw_response(replace, client.replace) + + +class _AsyncSpaceClientStreaming: + def __init__(self, client: AsyncSpaceClient) -> None: + def create(_: filesystem_models.Space): ... + def get(_: filesystem_models.Space): ... + def list(_: filesystem_models.ListSpacesResponse): ... + def replace(_: filesystem_models.Space): ... + + self.create = core.async_with_streaming_response(create, client.create) + self.get = core.async_with_streaming_response(get, client.get) + self.list = core.async_with_streaming_response(list, client.list) + self.replace = core.async_with_streaming_response(replace, client.replace) diff --git a/foundry_sdk/v2/functions/__init__.py b/foundry_sdk/v2/functions/__init__.py new file mode 100644 index 000000000..50e3b4928 --- /dev/null +++ b/foundry_sdk/v2/functions/__init__.py @@ -0,0 +1,22 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +from foundry_sdk.v2.functions._client import AsyncFunctionsClient +from foundry_sdk.v2.functions._client import FunctionsClient + +__all__ = [ + "FunctionsClient", + "AsyncFunctionsClient", +] diff --git a/foundry_sdk/v2/functions/_client.py b/foundry_sdk/v2/functions/_client.py new file mode 100644 index 000000000..e24fb6edd --- /dev/null +++ b/foundry_sdk/v2/functions/_client.py @@ -0,0 +1,82 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing +from functools import cached_property + +from foundry_sdk import _core as core + + +class FunctionsClient: + """ + The API client for the Functions Namespace. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + + @cached_property + def Query(self): + from foundry_sdk.v2.functions.query import QueryClient + + return QueryClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @cached_property + def ValueType(self): + from foundry_sdk.v2.functions.value_type import ValueTypeClient + + return ValueTypeClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + +class AsyncFunctionsClient: + """ + The Async API client for the Functions Namespace. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + from foundry_sdk.v2.functions.query import AsyncQueryClient + from foundry_sdk.v2.functions.value_type import AsyncValueTypeClient + + self.Query = AsyncQueryClient(auth=auth, hostname=hostname, config=config) + + self.ValueType = AsyncValueTypeClient(auth=auth, hostname=hostname, config=config) diff --git a/foundry_sdk/v2/functions/errors.py b/foundry_sdk/v2/functions/errors.py new file mode 100644 index 000000000..d17d371d4 --- /dev/null +++ b/foundry_sdk/v2/functions/errors.py @@ -0,0 +1,315 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing +from dataclasses import dataclass + +import typing_extensions + +from foundry_sdk import _errors as errors +from foundry_sdk.v2.functions import models as functions_models + + +class ConsistentSnapshotErrorParameters(typing_extensions.TypedDict): + """ + The query failed because the Ontology snapshot used for consistent reads became stale. Retrying the request + typically resolves this. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + functionRid: functions_models.FunctionRid + functionVersion: functions_models.FunctionVersion + + +@dataclass +class ConsistentSnapshotError(errors.ConflictError): + name: typing.Literal["ConsistentSnapshotError"] + parameters: ConsistentSnapshotErrorParameters + error_instance_id: str + + +class ExecuteQueryPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not execute the Query.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + queryApiName: functions_models.QueryApiName + + +@dataclass +class ExecuteQueryPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["ExecuteQueryPermissionDenied"] + parameters: ExecuteQueryPermissionDeniedParameters + error_instance_id: str + + +class GetByRidQueriesPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not getByRid the Query.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class GetByRidQueriesPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["GetByRidQueriesPermissionDenied"] + parameters: GetByRidQueriesPermissionDeniedParameters + error_instance_id: str + + +class InvalidQueryOutputValueParameters(typing_extensions.TypedDict): + """ + The value of the query's output is invalid. This may be because the return value did not match the specified + output type or constraints. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + outputDataType: functions_models.QueryDataType + outputValue: typing_extensions.NotRequired[functions_models.DataValue] + functionRid: functions_models.FunctionRid + functionVersion: functions_models.FunctionVersion + + +@dataclass +class InvalidQueryOutputValue(errors.BadRequestError): + name: typing.Literal["InvalidQueryOutputValue"] + parameters: InvalidQueryOutputValueParameters + error_instance_id: str + + +class InvalidQueryParameterValueParameters(typing_extensions.TypedDict): + """ + The value of the given parameter is invalid. See the documentation of `DataValue` for details on + how parameters are represented. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + parameterDataType: functions_models.QueryDataType + parameterId: functions_models.ParameterId + parameterValue: typing_extensions.NotRequired[functions_models.DataValue] + + +@dataclass +class InvalidQueryParameterValue(errors.BadRequestError): + name: typing.Literal["InvalidQueryParameterValue"] + parameters: InvalidQueryParameterValueParameters + error_instance_id: str + + +class MissingParameterParameters(typing_extensions.TypedDict): + """ + Required parameters are missing. Please look at the `parameters` field to see which required parameters are + missing from the request. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + parameters: typing.List[functions_models.ParameterId] + + +@dataclass +class MissingParameter(errors.BadRequestError): + name: typing.Literal["MissingParameter"] + parameters: MissingParameterParameters + error_instance_id: str + + +class QueryEncounteredUserFacingErrorParameters(typing_extensions.TypedDict): + """ + The authored `Query` failed to execute because of a user induced error. The message argument + is meant to be displayed to the user. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + functionRid: functions_models.FunctionRid + functionVersion: functions_models.FunctionVersion + message: str + + +@dataclass +class QueryEncounteredUserFacingError(errors.ConflictError): + name: typing.Literal["QueryEncounteredUserFacingError"] + parameters: QueryEncounteredUserFacingErrorParameters + error_instance_id: str + + +class QueryMemoryExceededLimitParameters(typing_extensions.TypedDict): + """Memory limits were exceeded for the `Query` execution.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + functionRid: functions_models.FunctionRid + functionVersion: functions_models.FunctionVersion + + +@dataclass +class QueryMemoryExceededLimit(errors.InternalServerError): + name: typing.Literal["QueryMemoryExceededLimit"] + parameters: QueryMemoryExceededLimitParameters + error_instance_id: str + + +class QueryNotFoundParameters(typing_extensions.TypedDict): + """The given Query could not be found.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + queryApiName: functions_models.QueryApiName + + +@dataclass +class QueryNotFound(errors.NotFoundError): + name: typing.Literal["QueryNotFound"] + parameters: QueryNotFoundParameters + error_instance_id: str + + +class QueryRuntimeErrorParameters(typing_extensions.TypedDict): + """The authored `Query` failed to execute because of a runtime error.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + functionRid: functions_models.FunctionRid + functionVersion: functions_models.FunctionVersion + message: typing_extensions.NotRequired[str] + stacktrace: typing_extensions.NotRequired[str] + parameters: typing.Dict[functions_models.QueryRuntimeErrorParameter, str] + + +@dataclass +class QueryRuntimeError(errors.BadRequestError): + name: typing.Literal["QueryRuntimeError"] + parameters: QueryRuntimeErrorParameters + error_instance_id: str + + +class QueryTimeExceededLimitParameters(typing_extensions.TypedDict): + """Time limits were exceeded for the `Query` execution.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + functionRid: functions_models.FunctionRid + functionVersion: functions_models.FunctionVersion + + +@dataclass +class QueryTimeExceededLimit(errors.InternalServerError): + name: typing.Literal["QueryTimeExceededLimit"] + parameters: QueryTimeExceededLimitParameters + error_instance_id: str + + +class QueryVersionNotFoundParameters(typing_extensions.TypedDict): + """The query could not be found at the provided version.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + apiName: functions_models.QueryApiName + version: functions_models.FunctionVersion + + +@dataclass +class QueryVersionNotFound(errors.NotFoundError): + name: typing.Literal["QueryVersionNotFound"] + parameters: QueryVersionNotFoundParameters + error_instance_id: str + + +class StreamingExecuteQueryPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not streamingExecute the Query.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + queryApiName: functions_models.QueryApiName + + +@dataclass +class StreamingExecuteQueryPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["StreamingExecuteQueryPermissionDenied"] + parameters: StreamingExecuteQueryPermissionDeniedParameters + error_instance_id: str + + +class UnknownParameterParameters(typing_extensions.TypedDict): + """ + The provided parameters were not found. Please look at the `knownParameters` field + to see which ones are available. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + unknownParameters: typing.List[functions_models.ParameterId] + expectedParameters: typing.List[functions_models.ParameterId] + + +@dataclass +class UnknownParameter(errors.BadRequestError): + name: typing.Literal["UnknownParameter"] + parameters: UnknownParameterParameters + error_instance_id: str + + +class ValueTypeNotFoundParameters(typing_extensions.TypedDict): + """The given ValueType could not be found.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + valueTypeRid: functions_models.ValueTypeRid + + +@dataclass +class ValueTypeNotFound(errors.NotFoundError): + name: typing.Literal["ValueTypeNotFound"] + parameters: ValueTypeNotFoundParameters + error_instance_id: str + + +class VersionIdNotFoundParameters(typing_extensions.TypedDict): + """The given VersionId could not be found.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + valueTypeRid: functions_models.ValueTypeRid + versionIdVersionId: functions_models.ValueTypeVersionId + + +@dataclass +class VersionIdNotFound(errors.NotFoundError): + name: typing.Literal["VersionIdNotFound"] + parameters: VersionIdNotFoundParameters + error_instance_id: str + + +__all__ = [ + "ConsistentSnapshotError", + "ExecuteQueryPermissionDenied", + "GetByRidQueriesPermissionDenied", + "InvalidQueryOutputValue", + "InvalidQueryParameterValue", + "MissingParameter", + "QueryEncounteredUserFacingError", + "QueryMemoryExceededLimit", + "QueryNotFound", + "QueryRuntimeError", + "QueryTimeExceededLimit", + "QueryVersionNotFound", + "StreamingExecuteQueryPermissionDenied", + "UnknownParameter", + "ValueTypeNotFound", + "VersionIdNotFound", +] diff --git a/foundry_sdk/v2/functions/models.py b/foundry_sdk/v2/functions/models.py new file mode 100644 index 000000000..692c46903 --- /dev/null +++ b/foundry_sdk/v2/functions/models.py @@ -0,0 +1,653 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk.v2.core import models as core_models +from foundry_sdk.v2.ontologies import models as ontologies_models + + +class ArrayConstraint(core.ModelBase): + """ArrayConstraint""" + + minimum_size: typing.Optional[int] = pydantic.Field(alias=str("minimumSize"), default=None) # type: ignore[literal-required] + maximum_size: typing.Optional[int] = pydantic.Field(alias=str("maximumSize"), default=None) # type: ignore[literal-required] + unique_values: bool = pydantic.Field(alias=str("uniqueValues")) # type: ignore[literal-required] + value_constraint: typing.Optional[ValueTypeConstraint] = pydantic.Field(alias=str("valueConstraint"), default=None) # type: ignore[literal-required] + type: typing.Literal["array"] = "array" + + +DataValue = typing.Any +""" +Represents the value of data in the following format. Note that these values can be nested, for example an array of structs. +| Type | JSON encoding | Example | +|-----------------------------|-------------------------------------------------------|-------------------------------------------------------------------------------| +| Array | array | `["alpha", "bravo", "charlie"]` | +| Attachment | string | `"ri.attachments.main.attachment.2f944bae-5851-4204-8615-920c969a9f2e"` | +| Boolean | boolean | `true` | +| Byte | number | `31` | +| Date | ISO 8601 extended local date string | `"2021-05-01"` | +| Decimal | string | `"2.718281828"` | +| Float | number | `3.14159265` | +| Double | number | `3.14159265` | +| Integer | number | `238940` | +| Long | string | `"58319870951433"` | +| Marking | string | `"MU"` | +| Null | null | `null` | +| Set | array | `["alpha", "bravo", "charlie"]` | +| Short | number | `8739` | +| String | string | `"Call me Ishmael"` | +| Struct | JSON object | `{"name": "John Doe", "age": 42}` | +| TwoDimensionalAggregation | JSON object | `{"groups": [{"key": "alpha", "value": 100}, {"key": "beta", "value": 101}]}` | +| ThreeDimensionalAggregation | JSON object | `{"groups": [{"key": "NYC", "groups": [{"key": "Engineer", "value" : 100}]}]}`| +| Timestamp | ISO 8601 extended offset date-time string in UTC zone | `"2021-01-04T05:00:00Z"` | +""" + + +class EnumConstraint(core.ModelBase): + """EnumConstraint""" + + options: typing.List[typing.Any] + type: typing.Literal["enum"] = "enum" + + +class ExecuteQueryRequest(core.ModelBase): + """ExecuteQueryRequest""" + + parameters: typing.Dict[ParameterId, typing.Optional[DataValue]] + version: typing.Optional[FunctionVersion] = None + + +class ExecuteQueryResponse(core.ModelBase): + """ExecuteQueryResponse""" + + value: DataValue + + +FunctionRid = core.RID +"""The unique resource identifier of a Function, useful for interacting with other Foundry APIs.""" + + +FunctionVersion = str +""" +The version of the given Function, written `..-`, where `-` is optional. +Examples: `1.2.3`, `1.2.3-rc1`. +""" + + +class GetByRidQueriesRequest(core.ModelBase): + """GetByRidQueriesRequest""" + + rid: FunctionRid + version: typing.Optional[FunctionVersion] = None + + +class LengthConstraint(core.ModelBase): + """LengthConstraint""" + + minimum_length: typing.Optional[int] = pydantic.Field(alias=str("minimumLength"), default=None) # type: ignore[literal-required] + maximum_length: typing.Optional[int] = pydantic.Field(alias=str("maximumLength"), default=None) # type: ignore[literal-required] + type: typing.Literal["length"] = "length" + + +class MapConstraint(core.ModelBase): + """MapConstraint""" + + key_constraints: typing.List[ValueTypeConstraint] = pydantic.Field(alias=str("keyConstraints")) # type: ignore[literal-required] + value_constraints: typing.List[ValueTypeConstraint] = pydantic.Field(alias=str("valueConstraints")) # type: ignore[literal-required] + unique_values: bool = pydantic.Field(alias=str("uniqueValues")) # type: ignore[literal-required] + type: typing.Literal["map"] = "map" + + +class NullableConstraint(core.ModelBase): + """NullableConstraint""" + + value: NullableConstraintValue + type: typing.Literal["nullable"] = "nullable" + + +NullableConstraintValue = typing.Literal["NULLABLE", "NOT_NULLABLE"] +"""NullableConstraintValue""" + + +class Parameter(core.ModelBase): + """Details about a parameter of a query.""" + + description: typing.Optional[str] = None + data_type: QueryDataType = pydantic.Field(alias=str("dataType")) # type: ignore[literal-required] + + +ParameterId = str +""" +The unique identifier of the parameter. Parameters are used as inputs when an action or query is applied. +Parameters can be viewed and managed in the **Ontology Manager**. +""" + + +class Query(core.ModelBase): + """Query""" + + api_name: QueryApiName = pydantic.Field(alias=str("apiName")) # type: ignore[literal-required] + description: typing.Optional[str] = None + display_name: typing.Optional[core_models.DisplayName] = pydantic.Field(alias=str("displayName"), default=None) # type: ignore[literal-required] + parameters: typing.Dict[ParameterId, Parameter] + output: QueryDataType + rid: FunctionRid + version: FunctionVersion + + +QueryAggregationKeyType = typing_extensions.Annotated[ + typing.Union[ + core_models.DateType, + core_models.BooleanType, + core_models.StringType, + core_models.DoubleType, + "QueryAggregationRangeType", + core_models.IntegerType, + core_models.TimestampType, + ], + pydantic.Field(discriminator="type"), +] +"""A union of all the types supported by query aggregation keys.""" + + +QueryAggregationRangeSubType = typing_extensions.Annotated[ + typing.Union[ + core_models.DateType, + core_models.DoubleType, + core_models.IntegerType, + core_models.TimestampType, + ], + pydantic.Field(discriminator="type"), +] +"""A union of all the types supported by query aggregation ranges.""" + + +class QueryAggregationRangeType(core.ModelBase): + """QueryAggregationRangeType""" + + sub_type: QueryAggregationRangeSubType = pydantic.Field(alias=str("subType")) # type: ignore[literal-required] + type: typing.Literal["range"] = "range" + + +QueryAggregationValueType = typing_extensions.Annotated[ + typing.Union[core_models.DateType, core_models.DoubleType, core_models.TimestampType], + pydantic.Field(discriminator="type"), +] +"""A union of all the types supported by query aggregation keys.""" + + +QueryApiName = str +"""The name of the Query in the API.""" + + +class QueryArrayType(core.ModelBase): + """QueryArrayType""" + + sub_type: QueryDataType = pydantic.Field(alias=str("subType")) # type: ignore[literal-required] + type: typing.Literal["array"] = "array" + + +QueryDataType = typing_extensions.Annotated[ + typing.Union[ + core_models.DateType, + "QueryStructType", + "QuerySetType", + core_models.StringType, + core_models.DoubleType, + core_models.IntegerType, + "ThreeDimensionalAggregation", + "QueryUnionType", + core_models.FloatType, + core_models.LongType, + core_models.BooleanType, + core_models.UnsupportedType, + core_models.AttachmentType, + core_models.NullType, + "QueryArrayType", + "TwoDimensionalAggregation", + "ValueTypeReference", + core_models.TimestampType, + ], + pydantic.Field(discriminator="type"), +] +"""A union of all the types supported by Query parameters or outputs.""" + + +QueryRuntimeErrorParameter = str +"""QueryRuntimeErrorParameter""" + + +class QuerySetType(core.ModelBase): + """QuerySetType""" + + sub_type: QueryDataType = pydantic.Field(alias=str("subType")) # type: ignore[literal-required] + type: typing.Literal["set"] = "set" + + +class QueryStructField(core.ModelBase): + """QueryStructField""" + + name: StructFieldName + field_type: QueryDataType = pydantic.Field(alias=str("fieldType")) # type: ignore[literal-required] + + +class QueryStructType(core.ModelBase): + """QueryStructType""" + + fields: typing.List[QueryStructField] + type: typing.Literal["struct"] = "struct" + + +class QueryUnionType(core.ModelBase): + """QueryUnionType""" + + union_types: typing.List[QueryDataType] = pydantic.Field(alias=str("unionTypes")) # type: ignore[literal-required] + type: typing.Literal["union"] = "union" + + +class RangesConstraint(core.ModelBase): + """RangesConstraint""" + + minimum_value: typing.Optional[typing.Any] = pydantic.Field(alias=str("minimumValue"), default=None) # type: ignore[literal-required] + maximum_value: typing.Optional[typing.Any] = pydantic.Field(alias=str("maximumValue"), default=None) # type: ignore[literal-required] + type: typing.Literal["range"] = "range" + + +class RegexConstraint(core.ModelBase): + """RegexConstraint""" + + pattern: str + partial_match: bool = pydantic.Field(alias=str("partialMatch")) # type: ignore[literal-required] + type: typing.Literal["regex"] = "regex" + + +class RidConstraint(core.ModelBase): + """RidConstraint""" + + type: typing.Literal["rid"] = "rid" + + +class StreamingExecuteQueryRequest(core.ModelBase): + """StreamingExecuteQueryRequest""" + + ontology: typing.Optional[ontologies_models.OntologyIdentifier] = None + """ + Optional ontology identifier (RID or API name). When provided, executes an ontology-scoped + function. When omitted, executes a global function. + """ + + parameters: typing.Dict[ParameterId, typing.Optional[DataValue]] + version: typing.Optional[FunctionVersion] = None + + +class StructConstraint(core.ModelBase): + """StructConstraint""" + + fields: typing.Dict[StructFieldApiName, ValueTypeApiName] + type: typing.Literal["struct"] = "struct" + + +StructFieldApiName = str +"""StructFieldApiName""" + + +StructFieldName = str +"""The name of a field in a `Struct`.""" + + +class StructV1Constraint(core.ModelBase): + """StructV1Constraint""" + + fields: typing.Dict[StructFieldApiName, ValueTypeConstraint] + type: typing.Literal["structV1"] = "structV1" + + +class ThreeDimensionalAggregation(core.ModelBase): + """ThreeDimensionalAggregation""" + + key_type: QueryAggregationKeyType = pydantic.Field(alias=str("keyType")) # type: ignore[literal-required] + value_type: TwoDimensionalAggregation = pydantic.Field(alias=str("valueType")) # type: ignore[literal-required] + type: typing.Literal["threeDimensionalAggregation"] = "threeDimensionalAggregation" + + +TransactionId = str +"""The ID identifying a transaction.""" + + +class TwoDimensionalAggregation(core.ModelBase): + """TwoDimensionalAggregation""" + + key_type: QueryAggregationKeyType = pydantic.Field(alias=str("keyType")) # type: ignore[literal-required] + value_type: QueryAggregationValueType = pydantic.Field(alias=str("valueType")) # type: ignore[literal-required] + type: typing.Literal["twoDimensionalAggregation"] = "twoDimensionalAggregation" + + +class UuidConstraint(core.ModelBase): + """UuidConstraint""" + + type: typing.Literal["uuid"] = "uuid" + + +class ValueType(core.ModelBase): + """ValueType""" + + rid: ValueTypeRid + version: ValueTypeVersion + version_id: ValueTypeVersionId = pydantic.Field(alias=str("versionId")) # type: ignore[literal-required] + api_name: ValueTypeApiName = pydantic.Field(alias=str("apiName")) # type: ignore[literal-required] + display_name: core_models.DisplayName = pydantic.Field(alias=str("displayName")) # type: ignore[literal-required] + description: typing.Optional[ValueTypeDescription] = None + base_type: typing.Optional[ValueTypeDataType] = pydantic.Field(alias=str("baseType"), default=None) # type: ignore[literal-required] + constraints: typing.List[ValueTypeConstraint] + + +ValueTypeApiName = str +"""The registered API name for the value type.""" + + +ValueTypeConstraint = typing_extensions.Annotated[ + typing.Union[ + "StructConstraint", + "StructV1Constraint", + "RegexConstraint", + "NullableConstraint", + "ArrayConstraint", + "LengthConstraint", + "RangesConstraint", + "RidConstraint", + "MapConstraint", + "UuidConstraint", + "EnumConstraint", + ], + pydantic.Field(discriminator="type"), +] +"""ValueTypeConstraint""" + + +ValueTypeDataType = typing_extensions.Annotated[ + typing.Union[ + "ValueTypeDataTypeDateType", + "ValueTypeDataTypeStructType", + "ValueTypeDataTypeStringType", + "ValueTypeDataTypeByteType", + "ValueTypeDataTypeDoubleType", + "ValueTypeDataTypeOptionalType", + "ValueTypeDataTypeIntegerType", + "ValueTypeDataTypeUnionType", + "ValueTypeDataTypeFloatType", + "ValueTypeDataTypeLongType", + "ValueTypeDataTypeBooleanType", + "ValueTypeDataTypeArrayType", + "ValueTypeDataTypeBinaryType", + "ValueTypeDataTypeValueTypeReference", + "ValueTypeDataTypeShortType", + "ValueTypeDataTypeDecimalType", + "ValueTypeDataTypeMapType", + "ValueTypeDataTypeTimestampType", + ], + pydantic.Field(discriminator="type"), +] +"""The underlying base type of a value type.""" + + +class ValueTypeDataTypeArrayType(core.ModelBase): + """ValueTypeDataTypeArrayType""" + + sub_type: ValueTypeDataType = pydantic.Field(alias=str("subType")) # type: ignore[literal-required] + type: typing.Literal["array"] = "array" + + +class ValueTypeDataTypeBinaryType(core.ModelBase): + """ValueTypeDataTypeBinaryType""" + + type: typing.Literal["binary"] = "binary" + + +class ValueTypeDataTypeBooleanType(core.ModelBase): + """ValueTypeDataTypeBooleanType""" + + type: typing.Literal["boolean"] = "boolean" + + +class ValueTypeDataTypeByteType(core.ModelBase): + """ValueTypeDataTypeByteType""" + + type: typing.Literal["byte"] = "byte" + + +class ValueTypeDataTypeDateType(core.ModelBase): + """ValueTypeDataTypeDateType""" + + type: typing.Literal["date"] = "date" + + +class ValueTypeDataTypeDecimalType(core.ModelBase): + """ValueTypeDataTypeDecimalType""" + + type: typing.Literal["decimal"] = "decimal" + + +class ValueTypeDataTypeDoubleType(core.ModelBase): + """ValueTypeDataTypeDoubleType""" + + type: typing.Literal["double"] = "double" + + +class ValueTypeDataTypeFloatType(core.ModelBase): + """ValueTypeDataTypeFloatType""" + + type: typing.Literal["float"] = "float" + + +class ValueTypeDataTypeIntegerType(core.ModelBase): + """ValueTypeDataTypeIntegerType""" + + type: typing.Literal["integer"] = "integer" + + +class ValueTypeDataTypeLongType(core.ModelBase): + """ValueTypeDataTypeLongType""" + + type: typing.Literal["long"] = "long" + + +class ValueTypeDataTypeMapType(core.ModelBase): + """ValueTypeDataTypeMapType""" + + key_type: ValueTypeDataType = pydantic.Field(alias=str("keyType")) # type: ignore[literal-required] + value_type: ValueTypeDataType = pydantic.Field(alias=str("valueType")) # type: ignore[literal-required] + type: typing.Literal["map"] = "map" + + +class ValueTypeDataTypeOptionalType(core.ModelBase): + """ValueTypeDataTypeOptionalType""" + + wrapped_type: ValueTypeDataType = pydantic.Field(alias=str("wrappedType")) # type: ignore[literal-required] + type: typing.Literal["optional"] = "optional" + + +class ValueTypeDataTypeShortType(core.ModelBase): + """ValueTypeDataTypeShortType""" + + type: typing.Literal["short"] = "short" + + +class ValueTypeDataTypeStringType(core.ModelBase): + """ValueTypeDataTypeStringType""" + + type: typing.Literal["string"] = "string" + + +class ValueTypeDataTypeStructElement(core.ModelBase): + """ValueTypeDataTypeStructElement""" + + name: ValueTypeDataTypeStructFieldIdentifier + field_type: ValueTypeDataType = pydantic.Field(alias=str("fieldType")) # type: ignore[literal-required] + + +ValueTypeDataTypeStructFieldIdentifier = str +"""ValueTypeDataTypeStructFieldIdentifier""" + + +class ValueTypeDataTypeStructType(core.ModelBase): + """ValueTypeDataTypeStructType""" + + fields: typing.List[ValueTypeDataTypeStructElement] + type: typing.Literal["struct"] = "struct" + + +class ValueTypeDataTypeTimestampType(core.ModelBase): + """ValueTypeDataTypeTimestampType""" + + type: typing.Literal["timestamp"] = "timestamp" + + +class ValueTypeDataTypeUnionType(core.ModelBase): + """ValueTypeDataTypeUnionType""" + + member_types: typing.List[ValueTypeDataType] = pydantic.Field(alias=str("memberTypes")) # type: ignore[literal-required] + type: typing.Literal["union"] = "union" + + +class ValueTypeDataTypeValueTypeReference(core.ModelBase): + """ValueTypeDataTypeValueTypeReference""" + + rid: ValueTypeRid + version_id: ValueTypeVersionId = pydantic.Field(alias=str("versionId")) # type: ignore[literal-required] + type: typing.Literal["valueTypeReference"] = "valueTypeReference" + + +ValueTypeDescription = str +"""A description of the value type.""" + + +class ValueTypeReference(core.ModelBase): + """A reference to a value type that has been registered in the Ontology.""" + + rid: ValueTypeRid + version_id: ValueTypeVersionId = pydantic.Field(alias=str("versionId")) # type: ignore[literal-required] + type: typing.Literal["valueTypeReference"] = "valueTypeReference" + + +ValueTypeRid = core.RID +"""The RID of a value type that has been registered in the Ontology.""" + + +ValueTypeVersion = str +"""The version of a value type that has been registered in the Ontology.""" + + +ValueTypeVersionId = core.UUID +"""The version ID of a value type that has been registered in the Ontology.""" + + +class VersionId(core.ModelBase): + """VersionId""" + + rid: ValueTypeRid + version: ValueTypeVersion + version_id: ValueTypeVersionId = pydantic.Field(alias=str("versionId")) # type: ignore[literal-required] + api_name: ValueTypeApiName = pydantic.Field(alias=str("apiName")) # type: ignore[literal-required] + display_name: core_models.DisplayName = pydantic.Field(alias=str("displayName")) # type: ignore[literal-required] + description: typing.Optional[ValueTypeDescription] = None + base_type: typing.Optional[ValueTypeDataType] = pydantic.Field(alias=str("baseType"), default=None) # type: ignore[literal-required] + constraints: typing.List[ValueTypeConstraint] + + +core.resolve_forward_references(QueryAggregationKeyType, globalns=globals(), localns=locals()) +core.resolve_forward_references(QueryAggregationRangeSubType, globalns=globals(), localns=locals()) +core.resolve_forward_references(QueryAggregationValueType, globalns=globals(), localns=locals()) +core.resolve_forward_references(QueryDataType, globalns=globals(), localns=locals()) +core.resolve_forward_references(ValueTypeConstraint, globalns=globals(), localns=locals()) +core.resolve_forward_references(ValueTypeDataType, globalns=globals(), localns=locals()) + +__all__ = [ + "ArrayConstraint", + "DataValue", + "EnumConstraint", + "ExecuteQueryRequest", + "ExecuteQueryResponse", + "FunctionRid", + "FunctionVersion", + "GetByRidQueriesRequest", + "LengthConstraint", + "MapConstraint", + "NullableConstraint", + "NullableConstraintValue", + "Parameter", + "ParameterId", + "Query", + "QueryAggregationKeyType", + "QueryAggregationRangeSubType", + "QueryAggregationRangeType", + "QueryAggregationValueType", + "QueryApiName", + "QueryArrayType", + "QueryDataType", + "QueryRuntimeErrorParameter", + "QuerySetType", + "QueryStructField", + "QueryStructType", + "QueryUnionType", + "RangesConstraint", + "RegexConstraint", + "RidConstraint", + "StreamingExecuteQueryRequest", + "StructConstraint", + "StructFieldApiName", + "StructFieldName", + "StructV1Constraint", + "ThreeDimensionalAggregation", + "TransactionId", + "TwoDimensionalAggregation", + "UuidConstraint", + "ValueType", + "ValueTypeApiName", + "ValueTypeConstraint", + "ValueTypeDataType", + "ValueTypeDataTypeArrayType", + "ValueTypeDataTypeBinaryType", + "ValueTypeDataTypeBooleanType", + "ValueTypeDataTypeByteType", + "ValueTypeDataTypeDateType", + "ValueTypeDataTypeDecimalType", + "ValueTypeDataTypeDoubleType", + "ValueTypeDataTypeFloatType", + "ValueTypeDataTypeIntegerType", + "ValueTypeDataTypeLongType", + "ValueTypeDataTypeMapType", + "ValueTypeDataTypeOptionalType", + "ValueTypeDataTypeShortType", + "ValueTypeDataTypeStringType", + "ValueTypeDataTypeStructElement", + "ValueTypeDataTypeStructFieldIdentifier", + "ValueTypeDataTypeStructType", + "ValueTypeDataTypeTimestampType", + "ValueTypeDataTypeUnionType", + "ValueTypeDataTypeValueTypeReference", + "ValueTypeDescription", + "ValueTypeReference", + "ValueTypeRid", + "ValueTypeVersion", + "ValueTypeVersionId", + "VersionId", +] diff --git a/foundry_sdk/v2/functions/query.py b/foundry_sdk/v2/functions/query.py new file mode 100644 index 000000000..b5cdcd470 --- /dev/null +++ b/foundry_sdk/v2/functions/query.py @@ -0,0 +1,720 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v2.core import models as core_models +from foundry_sdk.v2.functions import errors as functions_errors +from foundry_sdk.v2.functions import models as functions_models +from foundry_sdk.v2.ontologies import models as ontologies_models + + +class QueryClient: + """ + The API client for the Query Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _QueryClientStreaming(self) + self.with_raw_response = _QueryClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def execute( + self, + query_api_name: functions_models.QueryApiName, + *, + parameters: typing.Dict[ + functions_models.ParameterId, typing.Optional[functions_models.DataValue] + ], + attribution: typing.Optional[core_models.Attribution] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + trace_parent: typing.Optional[core_models.TraceParent] = None, + trace_state: typing.Optional[core_models.TraceState] = None, + transaction_id: typing.Optional[functions_models.TransactionId] = None, + version: typing.Optional[functions_models.FunctionVersion] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> functions_models.ExecuteQueryResponse: + """ + Executes a Query using the given parameters. By default, this executes the latest version of the query. + + This endpoint is maintained for backward compatibility only. + + For all new implementations, use the `streamingExecute` endpoint, which supports all function types + and provides enhanced functionality. + + :param query_api_name: + :type query_api_name: QueryApiName + :param parameters: + :type parameters: Dict[ParameterId, Optional[DataValue]] + :param attribution: + :type attribution: Optional[Attribution] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param trace_parent: + :type trace_parent: Optional[TraceParent] + :param trace_state: + :type trace_state: Optional[TraceState] + :param transaction_id: The ID of a transaction to read from. Transactions are an experimental feature and all workflows may not be supported. + :type transaction_id: Optional[TransactionId] + :param version: + :type version: Optional[FunctionVersion] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: functions_models.ExecuteQueryResponse + + :raises ExecuteQueryPermissionDenied: Could not execute the Query. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/functions/queries/{queryApiName}/execute", + query_params={ + "preview": preview, + "transactionId": transaction_id, + }, + path_params={ + "queryApiName": query_api_name, + }, + header_params={ + "attribution": attribution, + "traceParent": trace_parent, + "traceState": trace_state, + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=functions_models.ExecuteQueryRequest( + parameters=parameters, + version=version, + ), + response_type=functions_models.ExecuteQueryResponse, + request_timeout=request_timeout, + throwable_errors={ + "ExecuteQueryPermissionDenied": functions_errors.ExecuteQueryPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + query_api_name: functions_models.QueryApiName, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + version: typing.Optional[functions_models.FunctionVersion] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> functions_models.Query: + """ + Gets a specific query type with the given API name. By default, this gets the latest version of the query. + + :param query_api_name: + :type query_api_name: QueryApiName + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param version: + :type version: Optional[FunctionVersion] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: functions_models.Query + + :raises QueryNotFound: The given Query could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/functions/queries/{queryApiName}", + query_params={ + "preview": preview, + "version": version, + }, + path_params={ + "queryApiName": query_api_name, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=functions_models.Query, + request_timeout=request_timeout, + throwable_errors={ + "QueryNotFound": functions_errors.QueryNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get_by_rid( + self, + *, + rid: functions_models.FunctionRid, + preview: typing.Optional[core_models.PreviewMode] = None, + version: typing.Optional[functions_models.FunctionVersion] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> functions_models.Query: + """ + Gets a specific query type with the given RID.By default, this gets the latest version of the query. + + :param rid: + :type rid: FunctionRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param version: + :type version: Optional[FunctionVersion] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: functions_models.Query + + :raises GetByRidQueriesPermissionDenied: Could not getByRid the Query. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/functions/queries/getByRid", + query_params={ + "preview": preview, + }, + path_params={}, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=functions_models.GetByRidQueriesRequest( + rid=rid, + version=version, + ), + response_type=functions_models.Query, + request_timeout=request_timeout, + throwable_errors={ + "GetByRidQueriesPermissionDenied": functions_errors.GetByRidQueriesPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def streaming_execute( + self, + query_api_name: functions_models.QueryApiName, + *, + parameters: typing.Dict[ + functions_models.ParameterId, typing.Optional[functions_models.DataValue] + ], + attribution: typing.Optional[core_models.Attribution] = None, + ontology: typing.Optional[ontologies_models.OntologyIdentifier] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + trace_parent: typing.Optional[core_models.TraceParent] = None, + trace_state: typing.Optional[core_models.TraceState] = None, + transaction_id: typing.Optional[functions_models.TransactionId] = None, + version: typing.Optional[functions_models.FunctionVersion] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> bytes: + """ + Executes a Query using the given parameters, returning results as an NDJSON stream. By default, this executes the latest version of the query. + + This endpoint supports all Query functions. The endpoint name 'streamingExecute' refers to the NDJSON + streaming response format. Both streaming and non-streaming functions can use this endpoint. + Non-streaming functions return a single-line NDJSON response, while streaming functions return multi-line NDJSON responses. + This is the recommended endpoint for all query execution. + + The response is returned as a binary stream in NDJSON (Newline Delimited JSON) format, where each line + is a StreamingExecuteQueryResponse containing either a data batch or an error. + + For a function returning a list of 5 records with a batch size of 3, the response stream would contain + two lines. The first line contains the first 3 items, and the second line contains the remaining 2 items: + + ``` + {"type":"data","value":[{"productId":"SKU-001","price":29.99},{"productId":"SKU-002","price":49.99},{"productId":"SKU-003","price":19.99}]} + {"type":"data","value":[{"productId":"SKU-004","price":39.99},{"productId":"SKU-005","price":59.99}]} + ``` + + Each line is a separate JSON object followed by a newline character. Clients should parse the stream + line-by-line to process results as they arrive. If an error occurs during execution, the stream will + contain an error line: + + ``` + {"type":"error","errorCode":"INVALID_ARGUMENT","errorName":"QueryRuntimeError","errorInstanceId":"3f8a9c7b-2e4d-4a1f-9b8c-7d6e5f4a3b2c","errorDescription":"Division by zero","parameters":{}} + ``` + + :param query_api_name: + :type query_api_name: QueryApiName + :param parameters: + :type parameters: Dict[ParameterId, Optional[DataValue]] + :param attribution: + :type attribution: Optional[Attribution] + :param ontology: Optional ontology identifier (RID or API name). When provided, executes an ontology-scoped function. When omitted, executes a global function. + :type ontology: Optional[OntologyIdentifier] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param trace_parent: + :type trace_parent: Optional[TraceParent] + :param trace_state: + :type trace_state: Optional[TraceState] + :param transaction_id: The ID of a transaction to read from. Transactions are an experimental feature and all workflows may not be supported. + :type transaction_id: Optional[TransactionId] + :param version: + :type version: Optional[FunctionVersion] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: bytes + + :raises StreamingExecuteQueryPermissionDenied: Could not streamingExecute the Query. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/functions/queries/{queryApiName}/streamingExecute", + query_params={ + "preview": preview, + "transactionId": transaction_id, + }, + path_params={ + "queryApiName": query_api_name, + }, + header_params={ + "attribution": attribution, + "traceParent": trace_parent, + "traceState": trace_state, + "Content-Type": "application/json", + "Accept": "application/octet-stream", + }, + body=functions_models.StreamingExecuteQueryRequest( + ontology=ontology, + parameters=parameters, + version=version, + ), + response_type=bytes, + request_timeout=request_timeout, + throwable_errors={ + "StreamingExecuteQueryPermissionDenied": functions_errors.StreamingExecuteQueryPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _QueryClientRaw: + def __init__(self, client: QueryClient) -> None: + def execute(_: functions_models.ExecuteQueryResponse): ... + def get(_: functions_models.Query): ... + def get_by_rid(_: functions_models.Query): ... + def streaming_execute(_: bytes): ... + + self.execute = core.with_raw_response(execute, client.execute) + self.get = core.with_raw_response(get, client.get) + self.get_by_rid = core.with_raw_response(get_by_rid, client.get_by_rid) + self.streaming_execute = core.with_raw_response(streaming_execute, client.streaming_execute) + + +class _QueryClientStreaming: + def __init__(self, client: QueryClient) -> None: + def execute(_: functions_models.ExecuteQueryResponse): ... + def get(_: functions_models.Query): ... + def get_by_rid(_: functions_models.Query): ... + def streaming_execute(_: bytes): ... + + self.execute = core.with_streaming_response(execute, client.execute) + self.get = core.with_streaming_response(get, client.get) + self.get_by_rid = core.with_streaming_response(get_by_rid, client.get_by_rid) + self.streaming_execute = core.with_streaming_response( + streaming_execute, client.streaming_execute + ) + + +class AsyncQueryClient: + """ + The API client for the Query Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncQueryClientStreaming(self) + self.with_raw_response = _AsyncQueryClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def execute( + self, + query_api_name: functions_models.QueryApiName, + *, + parameters: typing.Dict[ + functions_models.ParameterId, typing.Optional[functions_models.DataValue] + ], + attribution: typing.Optional[core_models.Attribution] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + trace_parent: typing.Optional[core_models.TraceParent] = None, + trace_state: typing.Optional[core_models.TraceState] = None, + transaction_id: typing.Optional[functions_models.TransactionId] = None, + version: typing.Optional[functions_models.FunctionVersion] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[functions_models.ExecuteQueryResponse]: + """ + Executes a Query using the given parameters. By default, this executes the latest version of the query. + + This endpoint is maintained for backward compatibility only. + + For all new implementations, use the `streamingExecute` endpoint, which supports all function types + and provides enhanced functionality. + + :param query_api_name: + :type query_api_name: QueryApiName + :param parameters: + :type parameters: Dict[ParameterId, Optional[DataValue]] + :param attribution: + :type attribution: Optional[Attribution] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param trace_parent: + :type trace_parent: Optional[TraceParent] + :param trace_state: + :type trace_state: Optional[TraceState] + :param transaction_id: The ID of a transaction to read from. Transactions are an experimental feature and all workflows may not be supported. + :type transaction_id: Optional[TransactionId] + :param version: + :type version: Optional[FunctionVersion] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[functions_models.ExecuteQueryResponse] + + :raises ExecuteQueryPermissionDenied: Could not execute the Query. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/functions/queries/{queryApiName}/execute", + query_params={ + "preview": preview, + "transactionId": transaction_id, + }, + path_params={ + "queryApiName": query_api_name, + }, + header_params={ + "attribution": attribution, + "traceParent": trace_parent, + "traceState": trace_state, + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=functions_models.ExecuteQueryRequest( + parameters=parameters, + version=version, + ), + response_type=functions_models.ExecuteQueryResponse, + request_timeout=request_timeout, + throwable_errors={ + "ExecuteQueryPermissionDenied": functions_errors.ExecuteQueryPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + query_api_name: functions_models.QueryApiName, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + version: typing.Optional[functions_models.FunctionVersion] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[functions_models.Query]: + """ + Gets a specific query type with the given API name. By default, this gets the latest version of the query. + + :param query_api_name: + :type query_api_name: QueryApiName + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param version: + :type version: Optional[FunctionVersion] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[functions_models.Query] + + :raises QueryNotFound: The given Query could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/functions/queries/{queryApiName}", + query_params={ + "preview": preview, + "version": version, + }, + path_params={ + "queryApiName": query_api_name, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=functions_models.Query, + request_timeout=request_timeout, + throwable_errors={ + "QueryNotFound": functions_errors.QueryNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get_by_rid( + self, + *, + rid: functions_models.FunctionRid, + preview: typing.Optional[core_models.PreviewMode] = None, + version: typing.Optional[functions_models.FunctionVersion] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[functions_models.Query]: + """ + Gets a specific query type with the given RID.By default, this gets the latest version of the query. + + :param rid: + :type rid: FunctionRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param version: + :type version: Optional[FunctionVersion] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[functions_models.Query] + + :raises GetByRidQueriesPermissionDenied: Could not getByRid the Query. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/functions/queries/getByRid", + query_params={ + "preview": preview, + }, + path_params={}, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=functions_models.GetByRidQueriesRequest( + rid=rid, + version=version, + ), + response_type=functions_models.Query, + request_timeout=request_timeout, + throwable_errors={ + "GetByRidQueriesPermissionDenied": functions_errors.GetByRidQueriesPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def streaming_execute( + self, + query_api_name: functions_models.QueryApiName, + *, + parameters: typing.Dict[ + functions_models.ParameterId, typing.Optional[functions_models.DataValue] + ], + attribution: typing.Optional[core_models.Attribution] = None, + ontology: typing.Optional[ontologies_models.OntologyIdentifier] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + trace_parent: typing.Optional[core_models.TraceParent] = None, + trace_state: typing.Optional[core_models.TraceState] = None, + transaction_id: typing.Optional[functions_models.TransactionId] = None, + version: typing.Optional[functions_models.FunctionVersion] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[bytes]: + """ + Executes a Query using the given parameters, returning results as an NDJSON stream. By default, this executes the latest version of the query. + + This endpoint supports all Query functions. The endpoint name 'streamingExecute' refers to the NDJSON + streaming response format. Both streaming and non-streaming functions can use this endpoint. + Non-streaming functions return a single-line NDJSON response, while streaming functions return multi-line NDJSON responses. + This is the recommended endpoint for all query execution. + + The response is returned as a binary stream in NDJSON (Newline Delimited JSON) format, where each line + is a StreamingExecuteQueryResponse containing either a data batch or an error. + + For a function returning a list of 5 records with a batch size of 3, the response stream would contain + two lines. The first line contains the first 3 items, and the second line contains the remaining 2 items: + + ``` + {"type":"data","value":[{"productId":"SKU-001","price":29.99},{"productId":"SKU-002","price":49.99},{"productId":"SKU-003","price":19.99}]} + {"type":"data","value":[{"productId":"SKU-004","price":39.99},{"productId":"SKU-005","price":59.99}]} + ``` + + Each line is a separate JSON object followed by a newline character. Clients should parse the stream + line-by-line to process results as they arrive. If an error occurs during execution, the stream will + contain an error line: + + ``` + {"type":"error","errorCode":"INVALID_ARGUMENT","errorName":"QueryRuntimeError","errorInstanceId":"3f8a9c7b-2e4d-4a1f-9b8c-7d6e5f4a3b2c","errorDescription":"Division by zero","parameters":{}} + ``` + + :param query_api_name: + :type query_api_name: QueryApiName + :param parameters: + :type parameters: Dict[ParameterId, Optional[DataValue]] + :param attribution: + :type attribution: Optional[Attribution] + :param ontology: Optional ontology identifier (RID or API name). When provided, executes an ontology-scoped function. When omitted, executes a global function. + :type ontology: Optional[OntologyIdentifier] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param trace_parent: + :type trace_parent: Optional[TraceParent] + :param trace_state: + :type trace_state: Optional[TraceState] + :param transaction_id: The ID of a transaction to read from. Transactions are an experimental feature and all workflows may not be supported. + :type transaction_id: Optional[TransactionId] + :param version: + :type version: Optional[FunctionVersion] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[bytes] + + :raises StreamingExecuteQueryPermissionDenied: Could not streamingExecute the Query. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/functions/queries/{queryApiName}/streamingExecute", + query_params={ + "preview": preview, + "transactionId": transaction_id, + }, + path_params={ + "queryApiName": query_api_name, + }, + header_params={ + "attribution": attribution, + "traceParent": trace_parent, + "traceState": trace_state, + "Content-Type": "application/json", + "Accept": "application/octet-stream", + }, + body=functions_models.StreamingExecuteQueryRequest( + ontology=ontology, + parameters=parameters, + version=version, + ), + response_type=bytes, + request_timeout=request_timeout, + throwable_errors={ + "StreamingExecuteQueryPermissionDenied": functions_errors.StreamingExecuteQueryPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _AsyncQueryClientRaw: + def __init__(self, client: AsyncQueryClient) -> None: + def execute(_: functions_models.ExecuteQueryResponse): ... + def get(_: functions_models.Query): ... + def get_by_rid(_: functions_models.Query): ... + def streaming_execute(_: bytes): ... + + self.execute = core.async_with_raw_response(execute, client.execute) + self.get = core.async_with_raw_response(get, client.get) + self.get_by_rid = core.async_with_raw_response(get_by_rid, client.get_by_rid) + self.streaming_execute = core.async_with_raw_response( + streaming_execute, client.streaming_execute + ) + + +class _AsyncQueryClientStreaming: + def __init__(self, client: AsyncQueryClient) -> None: + def execute(_: functions_models.ExecuteQueryResponse): ... + def get(_: functions_models.Query): ... + def get_by_rid(_: functions_models.Query): ... + def streaming_execute(_: bytes): ... + + self.execute = core.async_with_streaming_response(execute, client.execute) + self.get = core.async_with_streaming_response(get, client.get) + self.get_by_rid = core.async_with_streaming_response(get_by_rid, client.get_by_rid) + self.streaming_execute = core.async_with_streaming_response( + streaming_execute, client.streaming_execute + ) diff --git a/foundry_sdk/v2/functions/value_type.py b/foundry_sdk/v2/functions/value_type.py new file mode 100644 index 000000000..231e7f2a2 --- /dev/null +++ b/foundry_sdk/v2/functions/value_type.py @@ -0,0 +1,220 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing +from functools import cached_property + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v2.core import models as core_models +from foundry_sdk.v2.functions import errors as functions_errors +from foundry_sdk.v2.functions import models as functions_models + + +class ValueTypeClient: + """ + The API client for the ValueType Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _ValueTypeClientStreaming(self) + self.with_raw_response = _ValueTypeClientRaw(self) + + @cached_property + def VersionId(self): + from foundry_sdk.v2.functions.version_id import VersionIdClient + + return VersionIdClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + value_type_rid: functions_models.ValueTypeRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> functions_models.ValueType: + """ + Gets a specific value type with the given RID. The latest version is returned. + + :param value_type_rid: + :type value_type_rid: ValueTypeRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: functions_models.ValueType + + :raises ValueTypeNotFound: The given ValueType could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/functions/valueTypes/{valueTypeRid}", + query_params={ + "preview": preview, + }, + path_params={ + "valueTypeRid": value_type_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=functions_models.ValueType, + request_timeout=request_timeout, + throwable_errors={ + "ValueTypeNotFound": functions_errors.ValueTypeNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _ValueTypeClientRaw: + def __init__(self, client: ValueTypeClient) -> None: + def get(_: functions_models.ValueType): ... + + self.get = core.with_raw_response(get, client.get) + + +class _ValueTypeClientStreaming: + def __init__(self, client: ValueTypeClient) -> None: + def get(_: functions_models.ValueType): ... + + self.get = core.with_streaming_response(get, client.get) + + +class AsyncValueTypeClient: + """ + The API client for the ValueType Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncValueTypeClientStreaming(self) + self.with_raw_response = _AsyncValueTypeClientRaw(self) + + @cached_property + def VersionId(self): + from foundry_sdk.v2.functions.version_id import AsyncVersionIdClient + + return AsyncVersionIdClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + value_type_rid: functions_models.ValueTypeRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[functions_models.ValueType]: + """ + Gets a specific value type with the given RID. The latest version is returned. + + :param value_type_rid: + :type value_type_rid: ValueTypeRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[functions_models.ValueType] + + :raises ValueTypeNotFound: The given ValueType could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/functions/valueTypes/{valueTypeRid}", + query_params={ + "preview": preview, + }, + path_params={ + "valueTypeRid": value_type_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=functions_models.ValueType, + request_timeout=request_timeout, + throwable_errors={ + "ValueTypeNotFound": functions_errors.ValueTypeNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _AsyncValueTypeClientRaw: + def __init__(self, client: AsyncValueTypeClient) -> None: + def get(_: functions_models.ValueType): ... + + self.get = core.async_with_raw_response(get, client.get) + + +class _AsyncValueTypeClientStreaming: + def __init__(self, client: AsyncValueTypeClient) -> None: + def get(_: functions_models.ValueType): ... + + self.get = core.async_with_streaming_response(get, client.get) diff --git a/foundry_sdk/v2/functions/version_id.py b/foundry_sdk/v2/functions/version_id.py new file mode 100644 index 000000000..ad197cd51 --- /dev/null +++ b/foundry_sdk/v2/functions/version_id.py @@ -0,0 +1,207 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v2.core import models as core_models +from foundry_sdk.v2.functions import errors as functions_errors +from foundry_sdk.v2.functions import models as functions_models + + +class VersionIdClient: + """ + The API client for the VersionId Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _VersionIdClientStreaming(self) + self.with_raw_response = _VersionIdClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + value_type_rid: functions_models.ValueTypeRid, + version_id_version_id: functions_models.ValueTypeVersionId, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> functions_models.VersionId: + """ + Gets a specific value type with the given RID. The specified version is returned. + + :param value_type_rid: + :type value_type_rid: ValueTypeRid + :param version_id_version_id: + :type version_id_version_id: ValueTypeVersionId + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: functions_models.VersionId + + :raises VersionIdNotFound: The given VersionId could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/functions/valueTypes/{valueTypeRid}/versionIds/{versionIdVersionId}", + query_params={ + "preview": preview, + }, + path_params={ + "valueTypeRid": value_type_rid, + "versionIdVersionId": version_id_version_id, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=functions_models.VersionId, + request_timeout=request_timeout, + throwable_errors={ + "VersionIdNotFound": functions_errors.VersionIdNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _VersionIdClientRaw: + def __init__(self, client: VersionIdClient) -> None: + def get(_: functions_models.VersionId): ... + + self.get = core.with_raw_response(get, client.get) + + +class _VersionIdClientStreaming: + def __init__(self, client: VersionIdClient) -> None: + def get(_: functions_models.VersionId): ... + + self.get = core.with_streaming_response(get, client.get) + + +class AsyncVersionIdClient: + """ + The API client for the VersionId Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncVersionIdClientStreaming(self) + self.with_raw_response = _AsyncVersionIdClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + value_type_rid: functions_models.ValueTypeRid, + version_id_version_id: functions_models.ValueTypeVersionId, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[functions_models.VersionId]: + """ + Gets a specific value type with the given RID. The specified version is returned. + + :param value_type_rid: + :type value_type_rid: ValueTypeRid + :param version_id_version_id: + :type version_id_version_id: ValueTypeVersionId + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[functions_models.VersionId] + + :raises VersionIdNotFound: The given VersionId could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/functions/valueTypes/{valueTypeRid}/versionIds/{versionIdVersionId}", + query_params={ + "preview": preview, + }, + path_params={ + "valueTypeRid": value_type_rid, + "versionIdVersionId": version_id_version_id, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=functions_models.VersionId, + request_timeout=request_timeout, + throwable_errors={ + "VersionIdNotFound": functions_errors.VersionIdNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _AsyncVersionIdClientRaw: + def __init__(self, client: AsyncVersionIdClient) -> None: + def get(_: functions_models.VersionId): ... + + self.get = core.async_with_raw_response(get, client.get) + + +class _AsyncVersionIdClientStreaming: + def __init__(self, client: AsyncVersionIdClient) -> None: + def get(_: functions_models.VersionId): ... + + self.get = core.async_with_streaming_response(get, client.get) diff --git a/foundry_sdk/v2/geo/errors.py b/foundry_sdk/v2/geo/errors.py new file mode 100644 index 000000000..6dd5770ff --- /dev/null +++ b/foundry_sdk/v2/geo/errors.py @@ -0,0 +1,16 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +__all__ = [] diff --git a/foundry_sdk/v2/geo/models.py b/foundry_sdk/v2/geo/models.py new file mode 100644 index 000000000..0dc7bfb5c --- /dev/null +++ b/foundry_sdk/v2/geo/models.py @@ -0,0 +1,226 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +from __future__ import annotations + +import typing + +import annotated_types +import pydantic +import typing_extensions + +from foundry_sdk import _core as core + +BBox = typing.List["Coordinate"] +""" +A GeoJSON object MAY have a member named "bbox" to include +information on the coordinate range for its Geometries, Features, or +FeatureCollections. The value of the bbox member MUST be an array of +length 2*n where n is the number of dimensions represented in the +contained geometries, with all axes of the most southwesterly point +followed by all axes of the more northeasterly point. The axes order +of a bbox follows the axes order of geometries. +""" + + +Coordinate = float +"""Coordinate""" + + +class Feature(core.ModelBase): + """GeoJSon 'Feature' object""" + + geometry: typing.Optional[Geometry] = None + properties: typing.Dict[FeaturePropertyKey, typing.Any] + """ + A `Feature` object has a member with the name "properties". The + value of the properties member is an object (any JSON object or a + JSON null value). + """ + + id: typing.Optional[typing.Any] = None + """ + If a `Feature` has a commonly used identifier, that identifier + SHOULD be included as a member of the Feature object with the name + "id", and the value of this member is either a JSON string or + number. + """ + + bbox: typing.Optional[BBox] = None + type: typing.Literal["Feature"] = "Feature" + + +class FeatureCollection(core.ModelBase): + """GeoJSon 'FeatureCollection' object""" + + features: typing.List[FeatureCollectionTypes] + bbox: typing.Optional[BBox] = None + type: typing.Literal["FeatureCollection"] = "FeatureCollection" + + +FeaturePropertyKey = str +"""FeaturePropertyKey""" + + +class GeoPoint(core.ModelBase): + """GeoPoint""" + + coordinates: Position + bbox: typing.Optional[BBox] = None + type: typing.Literal["Point"] = "Point" + + +Geometry = typing_extensions.Annotated[ + typing.Union[ + "MultiPoint", + "GeometryCollection", + "MultiLineString", + "LineString", + "MultiPolygon", + "GeoPoint", + "Polygon", + ], + pydantic.Field(discriminator="type"), +] +"""Abstract type for all GeoJSon object except Feature and FeatureCollection""" + + +class GeometryCollection(core.ModelBase): + """ + GeoJSon geometry collection + + GeometryCollections composed of a single part or a number of parts of a + single type SHOULD be avoided when that single part or a single object + of multipart type (MultiPoint, MultiLineString, or MultiPolygon) could + be used instead. + """ + + geometries: typing.List[Geometry] + bbox: typing.Optional[BBox] = None + type: typing.Literal["GeometryCollection"] = "GeometryCollection" + + +class LineString(core.ModelBase): + """LineString""" + + coordinates: typing.Optional[LineStringCoordinates] = None + bbox: typing.Optional[BBox] = None + type: typing.Literal["LineString"] = "LineString" + + +LineStringCoordinates = typing_extensions.Annotated[ + typing.List["Position"], annotated_types.Len(min_length=2) +] +"""GeoJSon fundamental geometry construct, array of two or more positions.""" + + +LinearRing = typing_extensions.Annotated[typing.List["Position"], annotated_types.Len(min_length=4)] +""" +A linear ring is a closed LineString with four or more positions. + +The first and last positions are equivalent, and they MUST contain +identical values; their representation SHOULD also be identical. + +A linear ring is the boundary of a surface or the boundary of a hole in +a surface. + +A linear ring MUST follow the right-hand rule with respect to the area +it bounds, i.e., exterior rings are counterclockwise, and holes are +clockwise. +""" + + +class MultiLineString(core.ModelBase): + """MultiLineString""" + + coordinates: typing.List[LineStringCoordinates] + bbox: typing.Optional[BBox] = None + type: typing.Literal["MultiLineString"] = "MultiLineString" + + +class MultiPoint(core.ModelBase): + """MultiPoint""" + + coordinates: typing.List[Position] + bbox: typing.Optional[BBox] = None + type: typing.Literal["MultiPoint"] = "MultiPoint" + + +class MultiPolygon(core.ModelBase): + """MultiPolygon""" + + coordinates: typing.List[typing.List[LinearRing]] + bbox: typing.Optional[BBox] = None + type: typing.Literal["MultiPolygon"] = "MultiPolygon" + + +class Polygon(core.ModelBase): + """Polygon""" + + coordinates: typing.List[LinearRing] + bbox: typing.Optional[BBox] = None + type: typing.Literal["Polygon"] = "Polygon" + + +Position = typing_extensions.Annotated[ + typing.List["Coordinate"], annotated_types.Len(min_length=2, max_length=3) +] +""" +GeoJSon fundamental geometry construct. + +A position is an array of numbers. There MUST be two or more elements. +The first two elements are longitude and latitude, precisely in that order and using decimal numbers. +Altitude or elevation MAY be included as an optional third element. + +Implementations SHOULD NOT extend positions beyond three elements +because the semantics of extra elements are unspecified and ambiguous. +Historically, some implementations have used a fourth element to carry +a linear referencing measure (sometimes denoted as "M") or a numerical +timestamp, but in most situations a parser will not be able to properly +interpret these values. The interpretation and meaning of additional +elements is beyond the scope of this specification, and additional +elements MAY be ignored by parsers. +""" + + +FeatureCollectionTypes = Feature +"""FeatureCollectionTypes""" + + +core.resolve_forward_references(BBox, globalns=globals(), localns=locals()) +core.resolve_forward_references(Geometry, globalns=globals(), localns=locals()) +core.resolve_forward_references(LineStringCoordinates, globalns=globals(), localns=locals()) +core.resolve_forward_references(LinearRing, globalns=globals(), localns=locals()) +core.resolve_forward_references(Position, globalns=globals(), localns=locals()) + +__all__ = [ + "BBox", + "Coordinate", + "Feature", + "FeatureCollection", + "FeatureCollectionTypes", + "FeaturePropertyKey", + "GeoPoint", + "Geometry", + "GeometryCollection", + "LineString", + "LineStringCoordinates", + "LinearRing", + "MultiLineString", + "MultiPoint", + "MultiPolygon", + "Polygon", + "Position", +] diff --git a/foundry_sdk/v2/language_models/__init__.py b/foundry_sdk/v2/language_models/__init__.py new file mode 100644 index 000000000..4baa38650 --- /dev/null +++ b/foundry_sdk/v2/language_models/__init__.py @@ -0,0 +1,30 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +from foundry_sdk.v2.language_models._client import AsyncLanguageModelsClient +from foundry_sdk.v2.language_models._client import LanguageModelsClient +from foundry_sdk.v2.language_models.utils import get_foundry_token +from foundry_sdk.v2.language_models.utils import get_openai_base_url +from foundry_sdk.v2.language_models.utils import get_anthropic_base_url +from foundry_sdk.v2.language_models.utils import get_http_client + +__all__ = [ + "LanguageModelsClient", + "AsyncLanguageModelsClient", + "get_foundry_token", + "get_openai_base_url", + "get_anthropic_base_url", + "get_http_client", +] diff --git a/foundry_sdk/v2/language_models/_client.py b/foundry_sdk/v2/language_models/_client.py new file mode 100644 index 000000000..9a3d2dd3f --- /dev/null +++ b/foundry_sdk/v2/language_models/_client.py @@ -0,0 +1,82 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing +from functools import cached_property + +from foundry_sdk import _core as core + + +class LanguageModelsClient: + """ + The API client for the LanguageModels Namespace. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + + @cached_property + def AnthropicModel(self): + from foundry_sdk.v2.language_models.anthropic_model import AnthropicModelClient + + return AnthropicModelClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @cached_property + def OpenAiModel(self): + from foundry_sdk.v2.language_models.open_ai_model import OpenAiModelClient + + return OpenAiModelClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + +class AsyncLanguageModelsClient: + """ + The Async API client for the LanguageModels Namespace. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + from foundry_sdk.v2.language_models.anthropic_model import AsyncAnthropicModelClient # NOQA + from foundry_sdk.v2.language_models.open_ai_model import AsyncOpenAiModelClient + + self.AnthropicModel = AsyncAnthropicModelClient(auth=auth, hostname=hostname, config=config) + + self.OpenAiModel = AsyncOpenAiModelClient(auth=auth, hostname=hostname, config=config) diff --git a/foundry_sdk/v2/language_models/anthropic_model.py b/foundry_sdk/v2/language_models/anthropic_model.py new file mode 100644 index 000000000..2d69600e6 --- /dev/null +++ b/foundry_sdk/v2/language_models/anthropic_model.py @@ -0,0 +1,297 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v2.core import models as core_models +from foundry_sdk.v2.language_models import errors as language_models_errors +from foundry_sdk.v2.language_models import models as language_models_models + + +class AnthropicModelClient: + """ + The API client for the AnthropicModel Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AnthropicModelClientStreaming(self) + self.with_raw_response = _AnthropicModelClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def messages( + self, + anthropic_model_model_id: language_models_models.LanguageModelApiName, + *, + max_tokens: int, + messages: typing.List[language_models_models.AnthropicMessage], + attribution: typing.Optional[core_models.Attribution] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + stop_sequences: typing.Optional[typing.List[str]] = None, + system: typing.Optional[typing.List[language_models_models.AnthropicSystemMessage]] = None, + temperature: typing.Optional[float] = None, + thinking: typing.Optional[language_models_models.AnthropicThinkingConfig] = None, + tool_choice: typing.Optional[language_models_models.AnthropicToolChoice] = None, + tools: typing.Optional[typing.List[language_models_models.AnthropicTool]] = None, + top_k: typing.Optional[int] = None, + top_p: typing.Optional[float] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> language_models_models.AnthropicMessagesResponse: + """ + + :param anthropic_model_model_id: + :type anthropic_model_model_id: LanguageModelApiName + :param max_tokens: The maximum number of tokens to generate before stopping. + :type max_tokens: int + :param messages: Input messages to the model. This can include a single user-role message or multiple messages with alternating user and assistant roles. + :type messages: List[AnthropicMessage] + :param attribution: + :type attribution: Optional[Attribution] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param stop_sequences: Custom text sequences that will cause the model to stop generating. + :type stop_sequences: Optional[List[str]] + :param system: A system prompt is a way of providing context and instructions to Claude, such as specifying a particular goal or role. As of now, sending multiple system prompts is not supported. + :type system: Optional[List[AnthropicSystemMessage]] + :param temperature: Amount of randomness injected into the response. Ranges from 0.0 to 1.0. Note that even with temperature of 0.0, the results will not be fully deterministic. Defaults to 1.0 + :type temperature: Optional[float] + :param thinking: Configuration for enabling Claude's extended thinking. + :type thinking: Optional[AnthropicThinkingConfig] + :param tool_choice: How the model should use the provided tools. + :type tool_choice: Optional[AnthropicToolChoice] + :param tools: Definitions of tools that the model may use. + :type tools: Optional[List[AnthropicTool]] + :param top_k: Only sample from the top K options for each subsequent token. + :type top_k: Optional[int] + :param top_p: Use nucleus sampling. You should either alter temperature or top_p, but not both + :type top_p: Optional[float] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: language_models_models.AnthropicMessagesResponse + + :raises AnthropicMessagesPermissionDenied: Could not messages the AnthropicModel. + :raises MultipleSystemPromptsNotSupported: Multiple system prompts are not currently supported, but will be in the future. + :raises MultipleToolResultContentsNotSupported: Multiple tool result contents are not currently supported, but will be in the future. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/languageModels/anthropic/{anthropicModelModelId}/messages", + query_params={ + "preview": preview, + }, + path_params={ + "anthropicModelModelId": anthropic_model_model_id, + }, + header_params={ + "attribution": attribution, + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=language_models_models.AnthropicMessagesRequest( + messages=messages, + max_tokens=max_tokens, + stop_sequences=stop_sequences, + system=system, + temperature=temperature, + thinking=thinking, + tool_choice=tool_choice, + tools=tools, + top_k=top_k, + top_p=top_p, + ), + response_type=language_models_models.AnthropicMessagesResponse, + request_timeout=request_timeout, + throwable_errors={ + "AnthropicMessagesPermissionDenied": language_models_errors.AnthropicMessagesPermissionDenied, + "MultipleSystemPromptsNotSupported": language_models_errors.MultipleSystemPromptsNotSupported, + "MultipleToolResultContentsNotSupported": language_models_errors.MultipleToolResultContentsNotSupported, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _AnthropicModelClientRaw: + def __init__(self, client: AnthropicModelClient) -> None: + def messages(_: language_models_models.AnthropicMessagesResponse): ... + + self.messages = core.with_raw_response(messages, client.messages) + + +class _AnthropicModelClientStreaming: + def __init__(self, client: AnthropicModelClient) -> None: + def messages(_: language_models_models.AnthropicMessagesResponse): ... + + self.messages = core.with_streaming_response(messages, client.messages) + + +class AsyncAnthropicModelClient: + """ + The API client for the AnthropicModel Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncAnthropicModelClientStreaming(self) + self.with_raw_response = _AsyncAnthropicModelClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def messages( + self, + anthropic_model_model_id: language_models_models.LanguageModelApiName, + *, + max_tokens: int, + messages: typing.List[language_models_models.AnthropicMessage], + attribution: typing.Optional[core_models.Attribution] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + stop_sequences: typing.Optional[typing.List[str]] = None, + system: typing.Optional[typing.List[language_models_models.AnthropicSystemMessage]] = None, + temperature: typing.Optional[float] = None, + thinking: typing.Optional[language_models_models.AnthropicThinkingConfig] = None, + tool_choice: typing.Optional[language_models_models.AnthropicToolChoice] = None, + tools: typing.Optional[typing.List[language_models_models.AnthropicTool]] = None, + top_k: typing.Optional[int] = None, + top_p: typing.Optional[float] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[language_models_models.AnthropicMessagesResponse]: + """ + + :param anthropic_model_model_id: + :type anthropic_model_model_id: LanguageModelApiName + :param max_tokens: The maximum number of tokens to generate before stopping. + :type max_tokens: int + :param messages: Input messages to the model. This can include a single user-role message or multiple messages with alternating user and assistant roles. + :type messages: List[AnthropicMessage] + :param attribution: + :type attribution: Optional[Attribution] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param stop_sequences: Custom text sequences that will cause the model to stop generating. + :type stop_sequences: Optional[List[str]] + :param system: A system prompt is a way of providing context and instructions to Claude, such as specifying a particular goal or role. As of now, sending multiple system prompts is not supported. + :type system: Optional[List[AnthropicSystemMessage]] + :param temperature: Amount of randomness injected into the response. Ranges from 0.0 to 1.0. Note that even with temperature of 0.0, the results will not be fully deterministic. Defaults to 1.0 + :type temperature: Optional[float] + :param thinking: Configuration for enabling Claude's extended thinking. + :type thinking: Optional[AnthropicThinkingConfig] + :param tool_choice: How the model should use the provided tools. + :type tool_choice: Optional[AnthropicToolChoice] + :param tools: Definitions of tools that the model may use. + :type tools: Optional[List[AnthropicTool]] + :param top_k: Only sample from the top K options for each subsequent token. + :type top_k: Optional[int] + :param top_p: Use nucleus sampling. You should either alter temperature or top_p, but not both + :type top_p: Optional[float] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[language_models_models.AnthropicMessagesResponse] + + :raises AnthropicMessagesPermissionDenied: Could not messages the AnthropicModel. + :raises MultipleSystemPromptsNotSupported: Multiple system prompts are not currently supported, but will be in the future. + :raises MultipleToolResultContentsNotSupported: Multiple tool result contents are not currently supported, but will be in the future. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/languageModels/anthropic/{anthropicModelModelId}/messages", + query_params={ + "preview": preview, + }, + path_params={ + "anthropicModelModelId": anthropic_model_model_id, + }, + header_params={ + "attribution": attribution, + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=language_models_models.AnthropicMessagesRequest( + messages=messages, + max_tokens=max_tokens, + stop_sequences=stop_sequences, + system=system, + temperature=temperature, + thinking=thinking, + tool_choice=tool_choice, + tools=tools, + top_k=top_k, + top_p=top_p, + ), + response_type=language_models_models.AnthropicMessagesResponse, + request_timeout=request_timeout, + throwable_errors={ + "AnthropicMessagesPermissionDenied": language_models_errors.AnthropicMessagesPermissionDenied, + "MultipleSystemPromptsNotSupported": language_models_errors.MultipleSystemPromptsNotSupported, + "MultipleToolResultContentsNotSupported": language_models_errors.MultipleToolResultContentsNotSupported, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _AsyncAnthropicModelClientRaw: + def __init__(self, client: AsyncAnthropicModelClient) -> None: + def messages(_: language_models_models.AnthropicMessagesResponse): ... + + self.messages = core.async_with_raw_response(messages, client.messages) + + +class _AsyncAnthropicModelClientStreaming: + def __init__(self, client: AsyncAnthropicModelClient) -> None: + def messages(_: language_models_models.AnthropicMessagesResponse): ... + + self.messages = core.async_with_streaming_response(messages, client.messages) diff --git a/foundry_sdk/v2/language_models/errors.py b/foundry_sdk/v2/language_models/errors.py new file mode 100644 index 000000000..c5eeaac2e --- /dev/null +++ b/foundry_sdk/v2/language_models/errors.py @@ -0,0 +1,90 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing +from dataclasses import dataclass + +import typing_extensions + +from foundry_sdk import _errors as errors +from foundry_sdk.v2.language_models import models as language_models_models + + +class AnthropicMessagesPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not messages the AnthropicModel.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + anthropicModelModelId: language_models_models.LanguageModelApiName + + +@dataclass +class AnthropicMessagesPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["AnthropicMessagesPermissionDenied"] + parameters: AnthropicMessagesPermissionDeniedParameters + error_instance_id: str + + +class MultipleSystemPromptsNotSupportedParameters(typing_extensions.TypedDict): + """Multiple system prompts are not currently supported, but will be in the future.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + systemPromptSize: int + + +@dataclass +class MultipleSystemPromptsNotSupported(errors.BadRequestError): + name: typing.Literal["MultipleSystemPromptsNotSupported"] + parameters: MultipleSystemPromptsNotSupportedParameters + error_instance_id: str + + +class MultipleToolResultContentsNotSupportedParameters(typing_extensions.TypedDict): + """Multiple tool result contents are not currently supported, but will be in the future.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + toolResultContentsSize: int + + +@dataclass +class MultipleToolResultContentsNotSupported(errors.BadRequestError): + name: typing.Literal["MultipleToolResultContentsNotSupported"] + parameters: MultipleToolResultContentsNotSupportedParameters + error_instance_id: str + + +class OpenAiEmbeddingsPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not embeddings the OpenAiModel.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + openAiModelModelId: language_models_models.LanguageModelApiName + + +@dataclass +class OpenAiEmbeddingsPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["OpenAiEmbeddingsPermissionDenied"] + parameters: OpenAiEmbeddingsPermissionDeniedParameters + error_instance_id: str + + +__all__ = [ + "AnthropicMessagesPermissionDenied", + "MultipleSystemPromptsNotSupported", + "MultipleToolResultContentsNotSupported", + "OpenAiEmbeddingsPermissionDenied", +] diff --git a/foundry_sdk/v2/language_models/models.py b/foundry_sdk/v2/language_models/models.py new file mode 100644 index 000000000..1db1dd200 --- /dev/null +++ b/foundry_sdk/v2/language_models/models.py @@ -0,0 +1,496 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core + + +class AnthropicAnyToolChoice(core.ModelBase): + """AnthropicAnyToolChoice""" + + disable_parallel_tool_use: typing.Optional[AnthropicDisableParallelToolUse] = pydantic.Field(alias=str("disableParallelToolUse"), default=None) # type: ignore[literal-required] + type: typing.Literal["any"] = "any" + + +class AnthropicAutoToolChoice(core.ModelBase): + """AnthropicAutoToolChoice""" + + disable_parallel_tool_use: typing.Optional[AnthropicDisableParallelToolUse] = pydantic.Field(alias=str("disableParallelToolUse"), default=None) # type: ignore[literal-required] + type: typing.Literal["auto"] = "auto" + + +class AnthropicBase64PdfDocumentSource(core.ModelBase): + """AnthropicBase64PdfDocumentSource""" + + data: str + type: typing.Literal["pdf"] = "pdf" + + +class AnthropicCharacterLocationCitation(core.ModelBase): + """AnthropicCharacterLocationCitation""" + + cited_text: str = pydantic.Field(alias=str("citedText")) # type: ignore[literal-required] + document_index: int = pydantic.Field(alias=str("documentIndex")) # type: ignore[literal-required] + document_title: typing.Optional[str] = pydantic.Field(alias=str("documentTitle"), default=None) # type: ignore[literal-required] + start_char_index: int = pydantic.Field(alias=str("startCharIndex")) # type: ignore[literal-required] + end_char_index: int = pydantic.Field(alias=str("endCharIndex")) # type: ignore[literal-required] + type: typing.Literal["charLocation"] = "charLocation" + + +AnthropicCompletionContent = typing_extensions.Annotated[ + typing.Union[ + "AnthropicCompletionToolUse", + "AnthropicCompletionText", + "AnthropicCompletionThinking", + "AnthropicCompletionRedactedThinking", + ], + pydantic.Field(discriminator="type"), +] +"""AnthropicCompletionContent""" + + +class AnthropicCompletionRedactedThinking(core.ModelBase): + """AnthropicCompletionRedactedThinking""" + + data: str + type: typing.Literal["redactedThinking"] = "redactedThinking" + + +class AnthropicCompletionText(core.ModelBase): + """AnthropicCompletionText""" + + text: str + citations: typing.Optional[typing.List[AnthropicCompletionCitation]] = None + type: typing.Literal["text"] = "text" + + +class AnthropicCompletionThinking(core.ModelBase): + """AnthropicCompletionThinking""" + + signature: str + thinking: str + type: typing.Literal["thinking"] = "thinking" + + +class AnthropicCompletionToolUse(core.ModelBase): + """AnthropicCompletionToolUse""" + + id: str + input: typing.Any + name: str + type: typing.Literal["toolUse"] = "toolUse" + + +class AnthropicCustomTool(core.ModelBase): + """AnthropicCustomTool""" + + name: str + description: typing.Optional[str] = None + input_schema: JsonSchema = pydantic.Field(alias=str("inputSchema")) # type: ignore[literal-required] + type: typing.Literal["custom"] = "custom" + + +AnthropicDisableParallelToolUse = bool +""" +Whether to disable parallel tool use. Defaults to false. If set to true, the model will output +exactly one tool use. +""" + + +class AnthropicDisabledThinking(core.ModelBase): + """AnthropicDisabledThinking""" + + type: typing.Literal["disabled"] = "disabled" + + +class AnthropicDocument(core.ModelBase): + """AnthropicDocument""" + + source: AnthropicDocumentSource + cache_control: typing.Optional[AnthropicCacheControl] = pydantic.Field(alias=str("cacheControl"), default=None) # type: ignore[literal-required] + citations: typing.Optional[AnthropicDocumentCitations] = None + context: typing.Optional[str] = None + title: typing.Optional[str] = None + type: typing.Literal["document"] = "document" + + +class AnthropicDocumentCitations(core.ModelBase): + """AnthropicDocumentCitations""" + + enabled: bool + + +AnthropicDocumentSource = typing_extensions.Annotated[ + typing.Union["AnthropicBase64PdfDocumentSource", "AnthropicTextDocumentSource"], + pydantic.Field(discriminator="type"), +] +"""AnthropicDocumentSource""" + + +class AnthropicEnabledThinking(core.ModelBase): + """AnthropicEnabledThinking""" + + budget_tokens: int = pydantic.Field(alias=str("budgetTokens")) # type: ignore[literal-required] + """Must be greater than 1024.""" + + type: typing.Literal["enabled"] = "enabled" + + +class AnthropicEphemeralCacheControl(core.ModelBase): + """This currently does not support the ttl field, but will in the future.""" + + type: typing.Literal["ephemeral"] = "ephemeral" + + +class AnthropicImage(core.ModelBase): + """AnthropicImage""" + + source: AnthropicImageSource + cache_control: typing.Optional[AnthropicCacheControl] = pydantic.Field(alias=str("cacheControl"), default=None) # type: ignore[literal-required] + type: typing.Literal["image"] = "image" + + +class AnthropicImageBase64Source(core.ModelBase): + """AnthropicImageBase64Source""" + + data: str + media_type: AnthropicMediaType = pydantic.Field(alias=str("mediaType")) # type: ignore[literal-required] + """This can include image/jpeg, image/png, image/gif or image/webp.""" + + type: typing.Literal["base64"] = "base64" + + +AnthropicMediaType = typing.Literal["IMAGE_JPEG", "IMAGE_PNG", "IMAGE_GIF", "IMAGE_WEBP"] +"""AnthropicMediaType""" + + +class AnthropicMessage(core.ModelBase): + """AnthropicMessage""" + + content: typing.List[AnthropicMessageContent] + role: AnthropicMessageRole + + +AnthropicMessageContent = typing_extensions.Annotated[ + typing.Union[ + "AnthropicImage", + "AnthropicToolUse", + "AnthropicDocument", + "AnthropicText", + "AnthropicToolResult", + "AnthropicThinking", + "AnthropicRedactedThinking", + ], + pydantic.Field(discriminator="type"), +] +"""AnthropicMessageContent""" + + +AnthropicMessageRole = typing.Literal["USER", "ASSISTANT"] +"""AnthropicMessageRole""" + + +class AnthropicMessagesRequest(core.ModelBase): + """AnthropicMessagesRequest""" + + messages: typing.List[AnthropicMessage] + """ + Input messages to the model. This can include a single user-role message or multiple messages with + alternating user and assistant roles. + """ + + max_tokens: int = pydantic.Field(alias=str("maxTokens")) # type: ignore[literal-required] + """The maximum number of tokens to generate before stopping.""" + + stop_sequences: typing.Optional[typing.List[str]] = pydantic.Field(alias=str("stopSequences"), default=None) # type: ignore[literal-required] + """Custom text sequences that will cause the model to stop generating.""" + + system: typing.Optional[typing.List[AnthropicSystemMessage]] = None + """ + A system prompt is a way of providing context and instructions to Claude, such as specifying a + particular goal or role. As of now, sending multiple system prompts is not supported. + """ + + temperature: typing.Optional[float] = None + """ + Amount of randomness injected into the response. Ranges from 0.0 to 1.0. Note that even with + temperature of 0.0, the results will not be fully deterministic. Defaults to 1.0 + """ + + thinking: typing.Optional[AnthropicThinkingConfig] = None + """Configuration for enabling Claude's extended thinking.""" + + tool_choice: typing.Optional[AnthropicToolChoice] = pydantic.Field(alias=str("toolChoice"), default=None) # type: ignore[literal-required] + """How the model should use the provided tools.""" + + tools: typing.Optional[typing.List[AnthropicTool]] = None + """Definitions of tools that the model may use.""" + + top_k: typing.Optional[int] = pydantic.Field(alias=str("topK"), default=None) # type: ignore[literal-required] + """Only sample from the top K options for each subsequent token.""" + + top_p: typing.Optional[float] = pydantic.Field(alias=str("topP"), default=None) # type: ignore[literal-required] + """Use nucleus sampling. You should either alter temperature or top_p, but not both""" + + +class AnthropicMessagesResponse(core.ModelBase): + """AnthropicMessagesResponse""" + + content: typing.List[AnthropicCompletionContent] + id: str + model: str + role: AnthropicMessageRole + stop_reason: typing.Optional[str] = pydantic.Field(alias=str("stopReason"), default=None) # type: ignore[literal-required] + stop_sequence: typing.Optional[str] = pydantic.Field(alias=str("stopSequence"), default=None) # type: ignore[literal-required] + usage: AnthropicTokenUsage + + +class AnthropicNoneToolChoice(core.ModelBase): + """AnthropicNoneToolChoice""" + + type: typing.Literal["none"] = "none" + + +class AnthropicRedactedThinking(core.ModelBase): + """AnthropicRedactedThinking""" + + data: str + type: typing.Literal["redactedThinking"] = "redactedThinking" + + +class AnthropicText(core.ModelBase): + """AnthropicText""" + + text: str + citations: typing.Optional[typing.List[AnthropicCompletionCitation]] = None + cache_control: typing.Optional[AnthropicCacheControl] = pydantic.Field(alias=str("cacheControl"), default=None) # type: ignore[literal-required] + type: typing.Literal["text"] = "text" + + +class AnthropicTextDocumentSource(core.ModelBase): + """AnthropicTextDocumentSource""" + + data: str + type: typing.Literal["text"] = "text" + + +class AnthropicThinking(core.ModelBase): + """AnthropicThinking""" + + signature: str + thinking: str + type: typing.Literal["thinking"] = "thinking" + + +AnthropicThinkingConfig = typing_extensions.Annotated[ + typing.Union["AnthropicDisabledThinking", "AnthropicEnabledThinking"], + pydantic.Field(discriminator="type"), +] +"""AnthropicThinkingConfig""" + + +class AnthropicTokenUsage(core.ModelBase): + """AnthropicTokenUsage""" + + cache_creation_input_tokens: typing.Optional[int] = pydantic.Field(alias=str("cacheCreationInputTokens"), default=None) # type: ignore[literal-required] + cache_read_input_tokens: typing.Optional[int] = pydantic.Field(alias=str("cacheReadInputTokens"), default=None) # type: ignore[literal-required] + input_tokens: int = pydantic.Field(alias=str("inputTokens")) # type: ignore[literal-required] + output_tokens: int = pydantic.Field(alias=str("outputTokens")) # type: ignore[literal-required] + + +AnthropicToolChoice = typing_extensions.Annotated[ + typing.Union[ + "AnthropicAutoToolChoice", + "AnthropicNoneToolChoice", + "AnthropicAnyToolChoice", + "AnthropicToolToolChoice", + ], + pydantic.Field(discriminator="type"), +] +"""AnthropicToolChoice""" + + +class AnthropicToolResult(core.ModelBase): + """AnthropicToolResult""" + + tool_use_id: str = pydantic.Field(alias=str("toolUseId")) # type: ignore[literal-required] + content: typing.Optional[typing.List[AnthropicToolResultContent]] = None + is_error: typing.Optional[bool] = pydantic.Field(alias=str("isError"), default=None) # type: ignore[literal-required] + cache_control: typing.Optional[AnthropicCacheControl] = pydantic.Field(alias=str("cacheControl"), default=None) # type: ignore[literal-required] + type: typing.Literal["toolResult"] = "toolResult" + + +class AnthropicToolToolChoice(core.ModelBase): + """AnthropicToolToolChoice""" + + name: str + disable_parallel_tool_use: typing.Optional[AnthropicDisableParallelToolUse] = pydantic.Field(alias=str("disableParallelToolUse"), default=None) # type: ignore[literal-required] + type: typing.Literal["tool"] = "tool" + + +class AnthropicToolUse(core.ModelBase): + """AnthropicToolUse""" + + id: str + input: typing.Any + name: str + cache_control: typing.Optional[AnthropicCacheControl] = pydantic.Field(alias=str("cacheControl"), default=None) # type: ignore[literal-required] + type: typing.Literal["toolUse"] = "toolUse" + + +JsonSchema = typing.Dict[str, typing.Any] +"""JsonSchema""" + + +LanguageModelApiName = str +"""The name of the LanguageModel in the API.""" + + +OpenAiEmbeddingInput = typing.List[str] +"""OpenAiEmbeddingInput""" + + +class OpenAiEmbeddingTokenUsage(core.ModelBase): + """OpenAiEmbeddingTokenUsage""" + + prompt_tokens: int = pydantic.Field(alias=str("promptTokens")) # type: ignore[literal-required] + """Number of tokens in the prompt""" + + +class OpenAiEmbeddingsRequest(core.ModelBase): + """OpenAiEmbeddingsRequest""" + + input: OpenAiEmbeddingInput + """ + Input text to embed, encoded as an array of strings. Each input must not exceed the max input + tokens for the model (8192 tokens for all embedding models). + """ + + dimensions: typing.Optional[int] = None + """ + The number of dimensions the resulting output embeddings should have. + Only supported in text-embedding-3 and later models. + """ + + encoding_format: typing.Optional[OpenAiEncodingFormat] = pydantic.Field(alias=str("encodingFormat"), default=None) # type: ignore[literal-required] + """The format to return the embeddings in. Can be either float or base64.""" + + +class OpenAiEmbeddingsResponse(core.ModelBase): + """OpenAiEmbeddingsResponse""" + + data: typing.List[typing.List[float]] + """List of embedding vectors""" + + model: str + """The ID of the model used""" + + usage: OpenAiEmbeddingTokenUsage + """Usage statistics for the request""" + + +OpenAiEncodingFormat = typing.Literal["FLOAT", "BASE64"] +"""OpenAiEncodingFormat""" + + +AnthropicCacheControl = AnthropicEphemeralCacheControl +"""AnthropicCacheControl""" + + +AnthropicCompletionCitation = AnthropicCharacterLocationCitation +"""AnthropicCompletionCitation""" + + +AnthropicImageSource = AnthropicImageBase64Source +"""AnthropicImageSource""" + + +AnthropicSystemMessage = AnthropicText +"""AnthropicSystemMessage""" + + +AnthropicTool = AnthropicCustomTool +"""AnthropicTool""" + + +AnthropicToolResultContent = AnthropicText +"""AnthropicToolResultContent""" + + +core.resolve_forward_references(AnthropicCompletionContent, globalns=globals(), localns=locals()) +core.resolve_forward_references(AnthropicDocumentSource, globalns=globals(), localns=locals()) +core.resolve_forward_references(AnthropicMessageContent, globalns=globals(), localns=locals()) +core.resolve_forward_references(AnthropicThinkingConfig, globalns=globals(), localns=locals()) +core.resolve_forward_references(AnthropicToolChoice, globalns=globals(), localns=locals()) +core.resolve_forward_references(JsonSchema, globalns=globals(), localns=locals()) +core.resolve_forward_references(OpenAiEmbeddingInput, globalns=globals(), localns=locals()) + +__all__ = [ + "AnthropicAnyToolChoice", + "AnthropicAutoToolChoice", + "AnthropicBase64PdfDocumentSource", + "AnthropicCacheControl", + "AnthropicCharacterLocationCitation", + "AnthropicCompletionCitation", + "AnthropicCompletionContent", + "AnthropicCompletionRedactedThinking", + "AnthropicCompletionText", + "AnthropicCompletionThinking", + "AnthropicCompletionToolUse", + "AnthropicCustomTool", + "AnthropicDisableParallelToolUse", + "AnthropicDisabledThinking", + "AnthropicDocument", + "AnthropicDocumentCitations", + "AnthropicDocumentSource", + "AnthropicEnabledThinking", + "AnthropicEphemeralCacheControl", + "AnthropicImage", + "AnthropicImageBase64Source", + "AnthropicImageSource", + "AnthropicMediaType", + "AnthropicMessage", + "AnthropicMessageContent", + "AnthropicMessageRole", + "AnthropicMessagesRequest", + "AnthropicMessagesResponse", + "AnthropicNoneToolChoice", + "AnthropicRedactedThinking", + "AnthropicSystemMessage", + "AnthropicText", + "AnthropicTextDocumentSource", + "AnthropicThinking", + "AnthropicThinkingConfig", + "AnthropicTokenUsage", + "AnthropicTool", + "AnthropicToolChoice", + "AnthropicToolResult", + "AnthropicToolResultContent", + "AnthropicToolToolChoice", + "AnthropicToolUse", + "JsonSchema", + "LanguageModelApiName", + "OpenAiEmbeddingInput", + "OpenAiEmbeddingTokenUsage", + "OpenAiEmbeddingsRequest", + "OpenAiEmbeddingsResponse", + "OpenAiEncodingFormat", +] diff --git a/foundry_sdk/v2/language_models/open_ai_model.py b/foundry_sdk/v2/language_models/open_ai_model.py new file mode 100644 index 000000000..4bd6159ca --- /dev/null +++ b/foundry_sdk/v2/language_models/open_ai_model.py @@ -0,0 +1,233 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v2.core import models as core_models +from foundry_sdk.v2.language_models import errors as language_models_errors +from foundry_sdk.v2.language_models import models as language_models_models + + +class OpenAiModelClient: + """ + The API client for the OpenAiModel Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _OpenAiModelClientStreaming(self) + self.with_raw_response = _OpenAiModelClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def embeddings( + self, + open_ai_model_model_id: language_models_models.LanguageModelApiName, + *, + input: language_models_models.OpenAiEmbeddingInput, + attribution: typing.Optional[core_models.Attribution] = None, + dimensions: typing.Optional[int] = None, + encoding_format: typing.Optional[language_models_models.OpenAiEncodingFormat] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> language_models_models.OpenAiEmbeddingsResponse: + """ + + :param open_ai_model_model_id: + :type open_ai_model_model_id: LanguageModelApiName + :param input: Input text to embed, encoded as an array of strings. Each input must not exceed the max input tokens for the model (8192 tokens for all embedding models). + :type input: OpenAiEmbeddingInput + :param attribution: + :type attribution: Optional[Attribution] + :param dimensions: The number of dimensions the resulting output embeddings should have. Only supported in text-embedding-3 and later models. + :type dimensions: Optional[int] + :param encoding_format: The format to return the embeddings in. Can be either float or base64. + :type encoding_format: Optional[OpenAiEncodingFormat] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: language_models_models.OpenAiEmbeddingsResponse + + :raises OpenAiEmbeddingsPermissionDenied: Could not embeddings the OpenAiModel. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/languageModels/openAi/{openAiModelModelId}/embeddings", + query_params={ + "preview": preview, + }, + path_params={ + "openAiModelModelId": open_ai_model_model_id, + }, + header_params={ + "attribution": attribution, + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=language_models_models.OpenAiEmbeddingsRequest( + input=input, + dimensions=dimensions, + encoding_format=encoding_format, + ), + response_type=language_models_models.OpenAiEmbeddingsResponse, + request_timeout=request_timeout, + throwable_errors={ + "OpenAiEmbeddingsPermissionDenied": language_models_errors.OpenAiEmbeddingsPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _OpenAiModelClientRaw: + def __init__(self, client: OpenAiModelClient) -> None: + def embeddings(_: language_models_models.OpenAiEmbeddingsResponse): ... + + self.embeddings = core.with_raw_response(embeddings, client.embeddings) + + +class _OpenAiModelClientStreaming: + def __init__(self, client: OpenAiModelClient) -> None: + def embeddings(_: language_models_models.OpenAiEmbeddingsResponse): ... + + self.embeddings = core.with_streaming_response(embeddings, client.embeddings) + + +class AsyncOpenAiModelClient: + """ + The API client for the OpenAiModel Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncOpenAiModelClientStreaming(self) + self.with_raw_response = _AsyncOpenAiModelClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def embeddings( + self, + open_ai_model_model_id: language_models_models.LanguageModelApiName, + *, + input: language_models_models.OpenAiEmbeddingInput, + attribution: typing.Optional[core_models.Attribution] = None, + dimensions: typing.Optional[int] = None, + encoding_format: typing.Optional[language_models_models.OpenAiEncodingFormat] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[language_models_models.OpenAiEmbeddingsResponse]: + """ + + :param open_ai_model_model_id: + :type open_ai_model_model_id: LanguageModelApiName + :param input: Input text to embed, encoded as an array of strings. Each input must not exceed the max input tokens for the model (8192 tokens for all embedding models). + :type input: OpenAiEmbeddingInput + :param attribution: + :type attribution: Optional[Attribution] + :param dimensions: The number of dimensions the resulting output embeddings should have. Only supported in text-embedding-3 and later models. + :type dimensions: Optional[int] + :param encoding_format: The format to return the embeddings in. Can be either float or base64. + :type encoding_format: Optional[OpenAiEncodingFormat] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[language_models_models.OpenAiEmbeddingsResponse] + + :raises OpenAiEmbeddingsPermissionDenied: Could not embeddings the OpenAiModel. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/languageModels/openAi/{openAiModelModelId}/embeddings", + query_params={ + "preview": preview, + }, + path_params={ + "openAiModelModelId": open_ai_model_model_id, + }, + header_params={ + "attribution": attribution, + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=language_models_models.OpenAiEmbeddingsRequest( + input=input, + dimensions=dimensions, + encoding_format=encoding_format, + ), + response_type=language_models_models.OpenAiEmbeddingsResponse, + request_timeout=request_timeout, + throwable_errors={ + "OpenAiEmbeddingsPermissionDenied": language_models_errors.OpenAiEmbeddingsPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _AsyncOpenAiModelClientRaw: + def __init__(self, client: AsyncOpenAiModelClient) -> None: + def embeddings(_: language_models_models.OpenAiEmbeddingsResponse): ... + + self.embeddings = core.async_with_raw_response(embeddings, client.embeddings) + + +class _AsyncOpenAiModelClientStreaming: + def __init__(self, client: AsyncOpenAiModelClient) -> None: + def embeddings(_: language_models_models.OpenAiEmbeddingsResponse): ... + + self.embeddings = core.async_with_streaming_response(embeddings, client.embeddings) diff --git a/foundry_sdk/v2/media_sets/__init__.py b/foundry_sdk/v2/media_sets/__init__.py new file mode 100644 index 000000000..7bad3f77d --- /dev/null +++ b/foundry_sdk/v2/media_sets/__init__.py @@ -0,0 +1,22 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +from foundry_sdk.v2.media_sets._client import AsyncMediaSetsClient +from foundry_sdk.v2.media_sets._client import MediaSetsClient + +__all__ = [ + "MediaSetsClient", + "AsyncMediaSetsClient", +] diff --git a/foundry_sdk/v2/media_sets/_client.py b/foundry_sdk/v2/media_sets/_client.py new file mode 100644 index 000000000..e35c1ba49 --- /dev/null +++ b/foundry_sdk/v2/media_sets/_client.py @@ -0,0 +1,69 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing +from functools import cached_property + +from foundry_sdk import _core as core + + +class MediaSetsClient: + """ + The API client for the MediaSets Namespace. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + + @cached_property + def MediaSet(self): + from foundry_sdk.v2.media_sets.media_set import MediaSetClient + + return MediaSetClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + +class AsyncMediaSetsClient: + """ + The Async API client for the MediaSets Namespace. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + from foundry_sdk.v2.media_sets.media_set import AsyncMediaSetClient + + self.MediaSet = AsyncMediaSetClient(auth=auth, hostname=hostname, config=config) diff --git a/foundry_sdk/v2/media_sets/errors.py b/foundry_sdk/v2/media_sets/errors.py new file mode 100644 index 000000000..9cb6a0b83 --- /dev/null +++ b/foundry_sdk/v2/media_sets/errors.py @@ -0,0 +1,274 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing +from dataclasses import dataclass + +import typing_extensions + +from foundry_sdk import _errors as errors +from foundry_sdk.v2.core import models as core_models +from foundry_sdk.v2.media_sets import models as media_sets_models + + +class ConflictingMediaSetIdentifiersParameters(typing_extensions.TypedDict): + """Client provided more than one of branch name, branch rid, or view rid as arguments. Only one may be specified.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class ConflictingMediaSetIdentifiers(errors.BadRequestError): + name: typing.Literal["ConflictingMediaSetIdentifiers"] + parameters: ConflictingMediaSetIdentifiersParameters + error_instance_id: str + + +class GetMediaItemRidByPathPermissionDeniedParameters(typing_extensions.TypedDict): + """The token does not have permission to view paths in this media set.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + mediaSetRid: core_models.MediaSetRid + + +@dataclass +class GetMediaItemRidByPathPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["GetMediaItemRidByPathPermissionDenied"] + parameters: GetMediaItemRidByPathPermissionDeniedParameters + error_instance_id: str + + +class InvalidMediaItemSchemaParameters(typing_extensions.TypedDict): + """The media item does not match the schema of the media set.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + mediaSetRid: core_models.MediaSetRid + path: typing_extensions.NotRequired[core_models.MediaItemPath] + + +@dataclass +class InvalidMediaItemSchema(errors.BadRequestError): + name: typing.Literal["InvalidMediaItemSchema"] + parameters: InvalidMediaItemSchemaParameters + error_instance_id: str + + +class MediaItemHasUnsupportedSecuritySettingsParameters(typing_extensions.TypedDict): + """The file cannot be read because it contains unsupported security settings (for example, public-key security handlers in a PDF).""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + mediaSetRid: core_models.MediaSetRid + path: typing_extensions.NotRequired[core_models.MediaItemPath] + + +@dataclass +class MediaItemHasUnsupportedSecuritySettings(errors.BadRequestError): + name: typing.Literal["MediaItemHasUnsupportedSecuritySettings"] + parameters: MediaItemHasUnsupportedSecuritySettingsParameters + error_instance_id: str + + +class MediaItemImageUnparsableParameters(typing_extensions.TypedDict): + """The file cannot be parsed as an image.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + mediaSetRid: core_models.MediaSetRid + path: typing_extensions.NotRequired[core_models.MediaItemPath] + + +@dataclass +class MediaItemImageUnparsable(errors.BadRequestError): + name: typing.Literal["MediaItemImageUnparsable"] + parameters: MediaItemImageUnparsableParameters + error_instance_id: str + + +class MediaItemIsPasswordProtectedParameters(typing_extensions.TypedDict): + """The file cannot be read because it is password protected.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + mediaSetRid: core_models.MediaSetRid + path: typing_extensions.NotRequired[core_models.MediaItemPath] + + +@dataclass +class MediaItemIsPasswordProtected(errors.BadRequestError): + name: typing.Literal["MediaItemIsPasswordProtected"] + parameters: MediaItemIsPasswordProtectedParameters + error_instance_id: str + + +class MediaItemNotFoundParameters(typing_extensions.TypedDict): + """The requested media item could not be found, or the client token does not have access to it.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + mediaSetRid: core_models.MediaSetRid + mediaItemRid: core_models.MediaItemRid + + +@dataclass +class MediaItemNotFound(errors.NotFoundError): + name: typing.Literal["MediaItemNotFound"] + parameters: MediaItemNotFoundParameters + error_instance_id: str + + +class MediaItemXmlUnparsableParameters(typing_extensions.TypedDict): + """The document cannot be parsed due to an unrecognized XML structure.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + mediaItemXmlFormat: media_sets_models.MediaItemXmlFormat + mediaSetRid: core_models.MediaSetRid + path: typing_extensions.NotRequired[core_models.MediaItemPath] + + +@dataclass +class MediaItemXmlUnparsable(errors.BadRequestError): + name: typing.Literal["MediaItemXmlUnparsable"] + parameters: MediaItemXmlUnparsableParameters + error_instance_id: str + + +class MediaSetNotFoundParameters(typing_extensions.TypedDict): + """The requested media set could not be found, or the client token does not have access to it.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + mediaSetRid: core_models.MediaSetRid + + +@dataclass +class MediaSetNotFound(errors.NotFoundError): + name: typing.Literal["MediaSetNotFound"] + parameters: MediaSetNotFoundParameters + error_instance_id: str + + +class MediaSetOpenTransactionAlreadyExistsParameters(typing_extensions.TypedDict): + """A transaction is already open on this media set and branch. A branch of a media set can only have one open transaction at a time.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + mediaSetRid: core_models.MediaSetRid + + +@dataclass +class MediaSetOpenTransactionAlreadyExists(errors.ConflictError): + name: typing.Literal["MediaSetOpenTransactionAlreadyExists"] + parameters: MediaSetOpenTransactionAlreadyExistsParameters + error_instance_id: str + + +class MissingMediaItemContentParameters(typing_extensions.TypedDict): + """The file has no bytes.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + mediaSetRid: core_models.MediaSetRid + path: typing_extensions.NotRequired[core_models.MediaItemPath] + + +@dataclass +class MissingMediaItemContent(errors.BadRequestError): + name: typing.Literal["MissingMediaItemContent"] + parameters: MissingMediaItemContentParameters + error_instance_id: str + + +class MissingMediaItemPathParameters(typing_extensions.TypedDict): + """The given media set requires paths but no path was provided.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + mediaSetRid: core_models.MediaSetRid + + +@dataclass +class MissingMediaItemPath(errors.BadRequestError): + name: typing.Literal["MissingMediaItemPath"] + parameters: MissingMediaItemPathParameters + error_instance_id: str + + +class TemporaryMediaUploadInsufficientPermissionsParameters(typing_extensions.TypedDict): + """ + Insufficient permissions to use this endpoint. This may be because that you are using a custom client instead of + an official Palantir client library. If so, please try again using OSDK, Python Functions, or TypeScript + Functions V2. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class TemporaryMediaUploadInsufficientPermissions(errors.PermissionDeniedError): + name: typing.Literal["TemporaryMediaUploadInsufficientPermissions"] + parameters: TemporaryMediaUploadInsufficientPermissionsParameters + error_instance_id: str + + +class TemporaryMediaUploadUnknownFailureParameters(typing_extensions.TypedDict): + """An unknown error occurred, please try again, and if this continues please contact your Palantir representative.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class TemporaryMediaUploadUnknownFailure(errors.InternalServerError): + name: typing.Literal["TemporaryMediaUploadUnknownFailure"] + parameters: TemporaryMediaUploadUnknownFailureParameters + error_instance_id: str + + +class TransformedMediaItemNotFoundParameters(typing_extensions.TypedDict): + """The requested media item could not be found, or the client token does not have access to it.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + mediaSetRid: core_models.MediaSetRid + mediaItemRid: core_models.MediaItemRid + + +@dataclass +class TransformedMediaItemNotFound(errors.NotFoundError): + name: typing.Literal["TransformedMediaItemNotFound"] + parameters: TransformedMediaItemNotFoundParameters + error_instance_id: str + + +__all__ = [ + "ConflictingMediaSetIdentifiers", + "GetMediaItemRidByPathPermissionDenied", + "InvalidMediaItemSchema", + "MediaItemHasUnsupportedSecuritySettings", + "MediaItemImageUnparsable", + "MediaItemIsPasswordProtected", + "MediaItemNotFound", + "MediaItemXmlUnparsable", + "MediaSetNotFound", + "MediaSetOpenTransactionAlreadyExists", + "MissingMediaItemContent", + "MissingMediaItemPath", + "TemporaryMediaUploadInsufficientPermissions", + "TemporaryMediaUploadUnknownFailure", + "TransformedMediaItemNotFound", +] diff --git a/foundry_sdk/v2/media_sets/media_set.py b/foundry_sdk/v2/media_sets/media_set.py new file mode 100644 index 000000000..c568f66d6 --- /dev/null +++ b/foundry_sdk/v2/media_sets/media_set.py @@ -0,0 +1,1486 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v2.core import models as core_models +from foundry_sdk.v2.media_sets import models as media_sets_models + + +class MediaSetClient: + """ + The API client for the MediaSet Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _MediaSetClientStreaming(self) + self.with_raw_response = _MediaSetClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def abort( + self, + media_set_rid: core_models.MediaSetRid, + transaction_id: media_sets_models.TransactionId, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> None: + """ + Aborts an open transaction. Items uploaded to the media set during this transaction will be deleted. + + :param media_set_rid: + :type media_set_rid: MediaSetRid + :param transaction_id: + :type transaction_id: TransactionId + :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: None + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/mediasets/{mediaSetRid}/transactions/{transactionId}/abort", + query_params={ + "preview": preview, + }, + path_params={ + "mediaSetRid": media_set_rid, + "transactionId": transaction_id, + }, + header_params={}, + body=None, + response_type=None, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def calculate( + self, + media_set_rid: core_models.MediaSetRid, + media_item_rid: core_models.MediaItemRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + read_token: typing.Optional[core_models.MediaItemReadToken] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> media_sets_models.TrackedTransformationResponse: + """ + Starts calculation of a thumbnail for a given image. + + :param media_set_rid: The RID of the media set. + :type media_set_rid: MediaSetRid + :param media_item_rid: The RID of the media item. + :type media_item_rid: MediaItemRid + :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. + :type preview: Optional[PreviewMode] + :param read_token: + :type read_token: Optional[MediaItemReadToken] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: media_sets_models.TrackedTransformationResponse + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/mediasets/{mediaSetRid}/items/{mediaItemRid}/transform/imagery/thumbnail/calculate", + query_params={ + "preview": preview, + }, + path_params={ + "mediaSetRid": media_set_rid, + "mediaItemRid": media_item_rid, + }, + header_params={ + "ReadToken": read_token, + "Accept": "application/json", + }, + body=None, + response_type=media_sets_models.TrackedTransformationResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def commit( + self, + media_set_rid: core_models.MediaSetRid, + transaction_id: media_sets_models.TransactionId, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> None: + """ + Commits an open transaction. On success, items uploaded to the media set during this transaction will become available. + + :param media_set_rid: + :type media_set_rid: MediaSetRid + :param transaction_id: + :type transaction_id: TransactionId + :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: None + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/mediasets/{mediaSetRid}/transactions/{transactionId}/commit", + query_params={ + "preview": preview, + }, + path_params={ + "mediaSetRid": media_set_rid, + "transactionId": transaction_id, + }, + header_params={}, + body=None, + response_type=None, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def create( + self, + media_set_rid: core_models.MediaSetRid, + *, + branch_name: typing.Optional[media_sets_models.BranchName] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> media_sets_models.TransactionId: + """ + Creates a new transaction. Items uploaded to the media set while this transaction is open will not be reflected until the transaction is committed. + + :param media_set_rid: + :type media_set_rid: MediaSetRid + :param branch_name: The branch on which to open the transaction. Defaults to `master` for most enrollments. + :type branch_name: Optional[BranchName] + :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: media_sets_models.TransactionId + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/mediasets/{mediaSetRid}/transactions", + query_params={ + "branchName": branch_name, + "preview": preview, + }, + path_params={ + "mediaSetRid": media_set_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=media_sets_models.TransactionId, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get_rid_by_path( + self, + media_set_rid: core_models.MediaSetRid, + *, + media_item_path: core_models.MediaItemPath, + branch_name: typing.Optional[media_sets_models.BranchName] = None, + branch_rid: typing.Optional[media_sets_models.BranchRid] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + view_rid: typing.Optional[core_models.MediaSetViewRid] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> media_sets_models.GetMediaItemRidByPathResponse: + """ + Returns the media item RID for the media item with the specified path. + + :param media_set_rid: The RID of the media set. + :type media_set_rid: MediaSetRid + :param media_item_path: The path of the media item. + :type media_item_path: MediaItemPath + :param branch_name: Specifies the specific branch by name in which to search for this media item. May not be provided if branch rid or view rid are provided. + :type branch_name: Optional[BranchName] + :param branch_rid: Specifies the specific branch by rid in which to search for this media item. May not be provided if branch name or view rid are provided. + :type branch_rid: Optional[BranchRid] + :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. + :type preview: Optional[PreviewMode] + :param view_rid: Specifies the specific view by rid in which to search for this media item. May not be provided if branch name or branch rid are provided. + :type view_rid: Optional[MediaSetViewRid] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: media_sets_models.GetMediaItemRidByPathResponse + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/mediasets/{mediaSetRid}/items/getRidByPath", + query_params={ + "mediaItemPath": media_item_path, + "branchName": branch_name, + "branchRid": branch_rid, + "preview": preview, + "viewRid": view_rid, + }, + path_params={ + "mediaSetRid": media_set_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=media_sets_models.GetMediaItemRidByPathResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def info( + self, + media_set_rid: core_models.MediaSetRid, + media_item_rid: core_models.MediaItemRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + read_token: typing.Optional[core_models.MediaItemReadToken] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> media_sets_models.GetMediaItemInfoResponse: + """ + Gets information about the media item. + + :param media_set_rid: The RID of the media set. + :type media_set_rid: MediaSetRid + :param media_item_rid: The RID of the media item. + :type media_item_rid: MediaItemRid + :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. + :type preview: Optional[PreviewMode] + :param read_token: + :type read_token: Optional[MediaItemReadToken] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: media_sets_models.GetMediaItemInfoResponse + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/mediasets/{mediaSetRid}/items/{mediaItemRid}", + query_params={ + "preview": preview, + }, + path_params={ + "mediaSetRid": media_set_rid, + "mediaItemRid": media_item_rid, + }, + header_params={ + "ReadToken": read_token, + "Accept": "application/json", + }, + body=None, + response_type=media_sets_models.GetMediaItemInfoResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def read( + self, + media_set_rid: core_models.MediaSetRid, + media_item_rid: core_models.MediaItemRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + read_token: typing.Optional[core_models.MediaItemReadToken] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> bytes: + """ + Gets the content of a media item. + + :param media_set_rid: + :type media_set_rid: MediaSetRid + :param media_item_rid: + :type media_item_rid: MediaItemRid + :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. + :type preview: Optional[PreviewMode] + :param read_token: + :type read_token: Optional[MediaItemReadToken] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: bytes + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/mediasets/{mediaSetRid}/items/{mediaItemRid}/content", + query_params={ + "preview": preview, + }, + path_params={ + "mediaSetRid": media_set_rid, + "mediaItemRid": media_item_rid, + }, + header_params={ + "ReadToken": read_token, + "Accept": "*/*", + }, + body=None, + response_type=bytes, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def read_original( + self, + media_set_rid: core_models.MediaSetRid, + media_item_rid: core_models.MediaItemRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + read_token: typing.Optional[core_models.MediaItemReadToken] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> bytes: + """ + Gets the content of an original file uploaded to the media item, even if it was transformed on upload due to being an additional input format. + + :param media_set_rid: + :type media_set_rid: MediaSetRid + :param media_item_rid: + :type media_item_rid: MediaItemRid + :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. + :type preview: Optional[PreviewMode] + :param read_token: + :type read_token: Optional[MediaItemReadToken] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: bytes + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/mediasets/{mediaSetRid}/items/{mediaItemRid}/original", + query_params={ + "preview": preview, + }, + path_params={ + "mediaSetRid": media_set_rid, + "mediaItemRid": media_item_rid, + }, + header_params={ + "ReadToken": read_token, + "Accept": "*/*", + }, + body=None, + response_type=bytes, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def reference( + self, + media_set_rid: core_models.MediaSetRid, + media_item_rid: core_models.MediaItemRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + read_token: typing.Optional[core_models.MediaItemReadToken] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core_models.MediaReference: + """ + Gets the [media reference](https://palantir.com/docs/foundry/data-integration/media-sets/#media-references) for this media item. + + :param media_set_rid: The RID of the media set. + :type media_set_rid: MediaSetRid + :param media_item_rid: The RID of the media item. + :type media_item_rid: MediaItemRid + :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. + :type preview: Optional[PreviewMode] + :param read_token: + :type read_token: Optional[MediaItemReadToken] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core_models.MediaReference + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/mediasets/{mediaSetRid}/items/{mediaItemRid}/reference", + query_params={ + "preview": preview, + }, + path_params={ + "mediaSetRid": media_set_rid, + "mediaItemRid": media_item_rid, + }, + header_params={ + "ReadToken": read_token, + "Accept": "application/json", + }, + body=None, + response_type=core_models.MediaReference, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def retrieve( + self, + media_set_rid: core_models.MediaSetRid, + media_item_rid: core_models.MediaItemRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + read_token: typing.Optional[core_models.MediaItemReadToken] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> bytes: + """ + Retrieves a successfully calculated thumbnail for a given image. + + Thumbnails are 200px wide in the format of `image/webp` + + :param media_set_rid: The RID of the media set. + :type media_set_rid: MediaSetRid + :param media_item_rid: The RID of the media item. + :type media_item_rid: MediaItemRid + :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. + :type preview: Optional[PreviewMode] + :param read_token: + :type read_token: Optional[MediaItemReadToken] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: bytes + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/mediasets/{mediaSetRid}/items/{mediaItemRid}/transform/imagery/thumbnail/retrieve", + query_params={ + "preview": preview, + }, + path_params={ + "mediaSetRid": media_set_rid, + "mediaItemRid": media_item_rid, + }, + header_params={ + "ReadToken": read_token, + "Accept": "*/*", + }, + body=None, + response_type=bytes, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def upload( + self, + media_set_rid: core_models.MediaSetRid, + body: bytes, + *, + branch_name: typing.Optional[media_sets_models.BranchName] = None, + branch_rid: typing.Optional[media_sets_models.BranchRid] = None, + media_item_path: typing.Optional[core_models.MediaItemPath] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + transaction_id: typing.Optional[media_sets_models.TransactionId] = None, + view_rid: typing.Optional[core_models.MediaSetViewRid] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> media_sets_models.PutMediaItemResponse: + """ + Uploads a media item to an existing media set. + The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`. + A branch name, or branch rid, or view rid may optionally be specified. If none is specified, the item will be uploaded to the default branch. If more than one is specified, an error is thrown. + + :param media_set_rid: + :type media_set_rid: MediaSetRid + :param body: Body of the request + :type body: bytes + :param branch_name: Specifies the specific branch by name to which this media item will be uploaded. May not be provided if branch rid or view rid are provided. + :type branch_name: Optional[BranchName] + :param branch_rid: Specifies the specific branch by rid to which this media item will be uploaded. May not be provided if branch name or view rid are provided. + :type branch_rid: Optional[BranchRid] + :param media_item_path: An identifier for a media item within a media set. Necessary if the backing media set requires paths. + :type media_item_path: Optional[MediaItemPath] + :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. + :type preview: Optional[PreviewMode] + :param transaction_id: The id of the transaction associated with this request. Required if this is a transactional media set. + :type transaction_id: Optional[TransactionId] + :param view_rid: Specifies the specific view by rid to which this media item will be uploaded. May not be provided if branch name or branch rid are provided. + :type view_rid: Optional[MediaSetViewRid] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: media_sets_models.PutMediaItemResponse + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/mediasets/{mediaSetRid}/items", + query_params={ + "branchName": branch_name, + "branchRid": branch_rid, + "mediaItemPath": media_item_path, + "preview": preview, + "transactionId": transaction_id, + "viewRid": view_rid, + }, + path_params={ + "mediaSetRid": media_set_rid, + }, + header_params={ + "Content-Type": "*/*", + "Accept": "application/json", + }, + body=body, + response_type=media_sets_models.PutMediaItemResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def upload_media( + self, + body: bytes, + *, + filename: core_models.MediaItemPath, + attribution: typing.Optional[core_models.Attribution] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core_models.MediaReference: + """ + Uploads a temporary media item. If the media item isn't persisted within 1 hour, the item will be deleted. + + If multiple resources are attributed to, usage will be attributed to the first one in the list. + + The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`. + Third-party applications using this endpoint via OAuth2 must request the following operation scopes: `api:ontologies-read api:ontologies-write`. + + :param body: Body of the request + :type body: bytes + :param filename: The path to write the media item to. Required if the backing media set requires paths. + :type filename: MediaItemPath + :param attribution: used for passing through usage attribution + :type attribution: Optional[Attribution] + :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core_models.MediaReference + """ + + return self._api_client.call_api( + core.RequestInfo( + method="PUT", + resource_path="/v2/mediasets/media/upload", + query_params={ + "filename": filename, + "preview": preview, + }, + path_params={}, + header_params={ + "attribution": attribution, + "Content-Type": "*/*", + "Accept": "application/json", + }, + body=body, + response_type=core_models.MediaReference, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _MediaSetClientRaw: + def __init__(self, client: MediaSetClient) -> None: + def abort(_: None): ... + def calculate(_: media_sets_models.TrackedTransformationResponse): ... + def commit(_: None): ... + def create(_: media_sets_models.TransactionId): ... + def get_rid_by_path(_: media_sets_models.GetMediaItemRidByPathResponse): ... + def info(_: media_sets_models.GetMediaItemInfoResponse): ... + def read(_: bytes): ... + def read_original(_: bytes): ... + def reference(_: core_models.MediaReference): ... + def retrieve(_: bytes): ... + def upload(_: media_sets_models.PutMediaItemResponse): ... + def upload_media(_: core_models.MediaReference): ... + + self.abort = core.with_raw_response(abort, client.abort) + self.calculate = core.with_raw_response(calculate, client.calculate) + self.commit = core.with_raw_response(commit, client.commit) + self.create = core.with_raw_response(create, client.create) + self.get_rid_by_path = core.with_raw_response(get_rid_by_path, client.get_rid_by_path) + self.info = core.with_raw_response(info, client.info) + self.read = core.with_raw_response(read, client.read) + self.read_original = core.with_raw_response(read_original, client.read_original) + self.reference = core.with_raw_response(reference, client.reference) + self.retrieve = core.with_raw_response(retrieve, client.retrieve) + self.upload = core.with_raw_response(upload, client.upload) + self.upload_media = core.with_raw_response(upload_media, client.upload_media) + + +class _MediaSetClientStreaming: + def __init__(self, client: MediaSetClient) -> None: + def calculate(_: media_sets_models.TrackedTransformationResponse): ... + def create(_: media_sets_models.TransactionId): ... + def get_rid_by_path(_: media_sets_models.GetMediaItemRidByPathResponse): ... + def info(_: media_sets_models.GetMediaItemInfoResponse): ... + def read(_: bytes): ... + def read_original(_: bytes): ... + def reference(_: core_models.MediaReference): ... + def retrieve(_: bytes): ... + def upload(_: media_sets_models.PutMediaItemResponse): ... + def upload_media(_: core_models.MediaReference): ... + + self.calculate = core.with_streaming_response(calculate, client.calculate) + self.create = core.with_streaming_response(create, client.create) + self.get_rid_by_path = core.with_streaming_response(get_rid_by_path, client.get_rid_by_path) + self.info = core.with_streaming_response(info, client.info) + self.read = core.with_streaming_response(read, client.read) + self.read_original = core.with_streaming_response(read_original, client.read_original) + self.reference = core.with_streaming_response(reference, client.reference) + self.retrieve = core.with_streaming_response(retrieve, client.retrieve) + self.upload = core.with_streaming_response(upload, client.upload) + self.upload_media = core.with_streaming_response(upload_media, client.upload_media) + + +class AsyncMediaSetClient: + """ + The API client for the MediaSet Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncMediaSetClientStreaming(self) + self.with_raw_response = _AsyncMediaSetClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def abort( + self, + media_set_rid: core_models.MediaSetRid, + transaction_id: media_sets_models.TransactionId, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[None]: + """ + Aborts an open transaction. Items uploaded to the media set during this transaction will be deleted. + + :param media_set_rid: + :type media_set_rid: MediaSetRid + :param transaction_id: + :type transaction_id: TransactionId + :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[None] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/mediasets/{mediaSetRid}/transactions/{transactionId}/abort", + query_params={ + "preview": preview, + }, + path_params={ + "mediaSetRid": media_set_rid, + "transactionId": transaction_id, + }, + header_params={}, + body=None, + response_type=None, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def calculate( + self, + media_set_rid: core_models.MediaSetRid, + media_item_rid: core_models.MediaItemRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + read_token: typing.Optional[core_models.MediaItemReadToken] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[media_sets_models.TrackedTransformationResponse]: + """ + Starts calculation of a thumbnail for a given image. + + :param media_set_rid: The RID of the media set. + :type media_set_rid: MediaSetRid + :param media_item_rid: The RID of the media item. + :type media_item_rid: MediaItemRid + :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. + :type preview: Optional[PreviewMode] + :param read_token: + :type read_token: Optional[MediaItemReadToken] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[media_sets_models.TrackedTransformationResponse] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/mediasets/{mediaSetRid}/items/{mediaItemRid}/transform/imagery/thumbnail/calculate", + query_params={ + "preview": preview, + }, + path_params={ + "mediaSetRid": media_set_rid, + "mediaItemRid": media_item_rid, + }, + header_params={ + "ReadToken": read_token, + "Accept": "application/json", + }, + body=None, + response_type=media_sets_models.TrackedTransformationResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def commit( + self, + media_set_rid: core_models.MediaSetRid, + transaction_id: media_sets_models.TransactionId, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[None]: + """ + Commits an open transaction. On success, items uploaded to the media set during this transaction will become available. + + :param media_set_rid: + :type media_set_rid: MediaSetRid + :param transaction_id: + :type transaction_id: TransactionId + :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[None] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/mediasets/{mediaSetRid}/transactions/{transactionId}/commit", + query_params={ + "preview": preview, + }, + path_params={ + "mediaSetRid": media_set_rid, + "transactionId": transaction_id, + }, + header_params={}, + body=None, + response_type=None, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def create( + self, + media_set_rid: core_models.MediaSetRid, + *, + branch_name: typing.Optional[media_sets_models.BranchName] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[media_sets_models.TransactionId]: + """ + Creates a new transaction. Items uploaded to the media set while this transaction is open will not be reflected until the transaction is committed. + + :param media_set_rid: + :type media_set_rid: MediaSetRid + :param branch_name: The branch on which to open the transaction. Defaults to `master` for most enrollments. + :type branch_name: Optional[BranchName] + :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[media_sets_models.TransactionId] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/mediasets/{mediaSetRid}/transactions", + query_params={ + "branchName": branch_name, + "preview": preview, + }, + path_params={ + "mediaSetRid": media_set_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=media_sets_models.TransactionId, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get_rid_by_path( + self, + media_set_rid: core_models.MediaSetRid, + *, + media_item_path: core_models.MediaItemPath, + branch_name: typing.Optional[media_sets_models.BranchName] = None, + branch_rid: typing.Optional[media_sets_models.BranchRid] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + view_rid: typing.Optional[core_models.MediaSetViewRid] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[media_sets_models.GetMediaItemRidByPathResponse]: + """ + Returns the media item RID for the media item with the specified path. + + :param media_set_rid: The RID of the media set. + :type media_set_rid: MediaSetRid + :param media_item_path: The path of the media item. + :type media_item_path: MediaItemPath + :param branch_name: Specifies the specific branch by name in which to search for this media item. May not be provided if branch rid or view rid are provided. + :type branch_name: Optional[BranchName] + :param branch_rid: Specifies the specific branch by rid in which to search for this media item. May not be provided if branch name or view rid are provided. + :type branch_rid: Optional[BranchRid] + :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. + :type preview: Optional[PreviewMode] + :param view_rid: Specifies the specific view by rid in which to search for this media item. May not be provided if branch name or branch rid are provided. + :type view_rid: Optional[MediaSetViewRid] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[media_sets_models.GetMediaItemRidByPathResponse] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/mediasets/{mediaSetRid}/items/getRidByPath", + query_params={ + "mediaItemPath": media_item_path, + "branchName": branch_name, + "branchRid": branch_rid, + "preview": preview, + "viewRid": view_rid, + }, + path_params={ + "mediaSetRid": media_set_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=media_sets_models.GetMediaItemRidByPathResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def info( + self, + media_set_rid: core_models.MediaSetRid, + media_item_rid: core_models.MediaItemRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + read_token: typing.Optional[core_models.MediaItemReadToken] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[media_sets_models.GetMediaItemInfoResponse]: + """ + Gets information about the media item. + + :param media_set_rid: The RID of the media set. + :type media_set_rid: MediaSetRid + :param media_item_rid: The RID of the media item. + :type media_item_rid: MediaItemRid + :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. + :type preview: Optional[PreviewMode] + :param read_token: + :type read_token: Optional[MediaItemReadToken] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[media_sets_models.GetMediaItemInfoResponse] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/mediasets/{mediaSetRid}/items/{mediaItemRid}", + query_params={ + "preview": preview, + }, + path_params={ + "mediaSetRid": media_set_rid, + "mediaItemRid": media_item_rid, + }, + header_params={ + "ReadToken": read_token, + "Accept": "application/json", + }, + body=None, + response_type=media_sets_models.GetMediaItemInfoResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def read( + self, + media_set_rid: core_models.MediaSetRid, + media_item_rid: core_models.MediaItemRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + read_token: typing.Optional[core_models.MediaItemReadToken] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[bytes]: + """ + Gets the content of a media item. + + :param media_set_rid: + :type media_set_rid: MediaSetRid + :param media_item_rid: + :type media_item_rid: MediaItemRid + :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. + :type preview: Optional[PreviewMode] + :param read_token: + :type read_token: Optional[MediaItemReadToken] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[bytes] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/mediasets/{mediaSetRid}/items/{mediaItemRid}/content", + query_params={ + "preview": preview, + }, + path_params={ + "mediaSetRid": media_set_rid, + "mediaItemRid": media_item_rid, + }, + header_params={ + "ReadToken": read_token, + "Accept": "*/*", + }, + body=None, + response_type=bytes, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def read_original( + self, + media_set_rid: core_models.MediaSetRid, + media_item_rid: core_models.MediaItemRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + read_token: typing.Optional[core_models.MediaItemReadToken] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[bytes]: + """ + Gets the content of an original file uploaded to the media item, even if it was transformed on upload due to being an additional input format. + + :param media_set_rid: + :type media_set_rid: MediaSetRid + :param media_item_rid: + :type media_item_rid: MediaItemRid + :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. + :type preview: Optional[PreviewMode] + :param read_token: + :type read_token: Optional[MediaItemReadToken] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[bytes] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/mediasets/{mediaSetRid}/items/{mediaItemRid}/original", + query_params={ + "preview": preview, + }, + path_params={ + "mediaSetRid": media_set_rid, + "mediaItemRid": media_item_rid, + }, + header_params={ + "ReadToken": read_token, + "Accept": "*/*", + }, + body=None, + response_type=bytes, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def reference( + self, + media_set_rid: core_models.MediaSetRid, + media_item_rid: core_models.MediaItemRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + read_token: typing.Optional[core_models.MediaItemReadToken] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[core_models.MediaReference]: + """ + Gets the [media reference](https://palantir.com/docs/foundry/data-integration/media-sets/#media-references) for this media item. + + :param media_set_rid: The RID of the media set. + :type media_set_rid: MediaSetRid + :param media_item_rid: The RID of the media item. + :type media_item_rid: MediaItemRid + :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. + :type preview: Optional[PreviewMode] + :param read_token: + :type read_token: Optional[MediaItemReadToken] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[core_models.MediaReference] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/mediasets/{mediaSetRid}/items/{mediaItemRid}/reference", + query_params={ + "preview": preview, + }, + path_params={ + "mediaSetRid": media_set_rid, + "mediaItemRid": media_item_rid, + }, + header_params={ + "ReadToken": read_token, + "Accept": "application/json", + }, + body=None, + response_type=core_models.MediaReference, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def retrieve( + self, + media_set_rid: core_models.MediaSetRid, + media_item_rid: core_models.MediaItemRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + read_token: typing.Optional[core_models.MediaItemReadToken] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[bytes]: + """ + Retrieves a successfully calculated thumbnail for a given image. + + Thumbnails are 200px wide in the format of `image/webp` + + :param media_set_rid: The RID of the media set. + :type media_set_rid: MediaSetRid + :param media_item_rid: The RID of the media item. + :type media_item_rid: MediaItemRid + :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. + :type preview: Optional[PreviewMode] + :param read_token: + :type read_token: Optional[MediaItemReadToken] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[bytes] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/mediasets/{mediaSetRid}/items/{mediaItemRid}/transform/imagery/thumbnail/retrieve", + query_params={ + "preview": preview, + }, + path_params={ + "mediaSetRid": media_set_rid, + "mediaItemRid": media_item_rid, + }, + header_params={ + "ReadToken": read_token, + "Accept": "*/*", + }, + body=None, + response_type=bytes, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def upload( + self, + media_set_rid: core_models.MediaSetRid, + body: bytes, + *, + branch_name: typing.Optional[media_sets_models.BranchName] = None, + branch_rid: typing.Optional[media_sets_models.BranchRid] = None, + media_item_path: typing.Optional[core_models.MediaItemPath] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + transaction_id: typing.Optional[media_sets_models.TransactionId] = None, + view_rid: typing.Optional[core_models.MediaSetViewRid] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[media_sets_models.PutMediaItemResponse]: + """ + Uploads a media item to an existing media set. + The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`. + A branch name, or branch rid, or view rid may optionally be specified. If none is specified, the item will be uploaded to the default branch. If more than one is specified, an error is thrown. + + :param media_set_rid: + :type media_set_rid: MediaSetRid + :param body: Body of the request + :type body: bytes + :param branch_name: Specifies the specific branch by name to which this media item will be uploaded. May not be provided if branch rid or view rid are provided. + :type branch_name: Optional[BranchName] + :param branch_rid: Specifies the specific branch by rid to which this media item will be uploaded. May not be provided if branch name or view rid are provided. + :type branch_rid: Optional[BranchRid] + :param media_item_path: An identifier for a media item within a media set. Necessary if the backing media set requires paths. + :type media_item_path: Optional[MediaItemPath] + :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. + :type preview: Optional[PreviewMode] + :param transaction_id: The id of the transaction associated with this request. Required if this is a transactional media set. + :type transaction_id: Optional[TransactionId] + :param view_rid: Specifies the specific view by rid to which this media item will be uploaded. May not be provided if branch name or branch rid are provided. + :type view_rid: Optional[MediaSetViewRid] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[media_sets_models.PutMediaItemResponse] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/mediasets/{mediaSetRid}/items", + query_params={ + "branchName": branch_name, + "branchRid": branch_rid, + "mediaItemPath": media_item_path, + "preview": preview, + "transactionId": transaction_id, + "viewRid": view_rid, + }, + path_params={ + "mediaSetRid": media_set_rid, + }, + header_params={ + "Content-Type": "*/*", + "Accept": "application/json", + }, + body=body, + response_type=media_sets_models.PutMediaItemResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def upload_media( + self, + body: bytes, + *, + filename: core_models.MediaItemPath, + attribution: typing.Optional[core_models.Attribution] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[core_models.MediaReference]: + """ + Uploads a temporary media item. If the media item isn't persisted within 1 hour, the item will be deleted. + + If multiple resources are attributed to, usage will be attributed to the first one in the list. + + The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`. + Third-party applications using this endpoint via OAuth2 must request the following operation scopes: `api:ontologies-read api:ontologies-write`. + + :param body: Body of the request + :type body: bytes + :param filename: The path to write the media item to. Required if the backing media set requires paths. + :type filename: MediaItemPath + :param attribution: used for passing through usage attribution + :type attribution: Optional[Attribution] + :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[core_models.MediaReference] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="PUT", + resource_path="/v2/mediasets/media/upload", + query_params={ + "filename": filename, + "preview": preview, + }, + path_params={}, + header_params={ + "attribution": attribution, + "Content-Type": "*/*", + "Accept": "application/json", + }, + body=body, + response_type=core_models.MediaReference, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _AsyncMediaSetClientRaw: + def __init__(self, client: AsyncMediaSetClient) -> None: + def abort(_: None): ... + def calculate(_: media_sets_models.TrackedTransformationResponse): ... + def commit(_: None): ... + def create(_: media_sets_models.TransactionId): ... + def get_rid_by_path(_: media_sets_models.GetMediaItemRidByPathResponse): ... + def info(_: media_sets_models.GetMediaItemInfoResponse): ... + def read(_: bytes): ... + def read_original(_: bytes): ... + def reference(_: core_models.MediaReference): ... + def retrieve(_: bytes): ... + def upload(_: media_sets_models.PutMediaItemResponse): ... + def upload_media(_: core_models.MediaReference): ... + + self.abort = core.async_with_raw_response(abort, client.abort) + self.calculate = core.async_with_raw_response(calculate, client.calculate) + self.commit = core.async_with_raw_response(commit, client.commit) + self.create = core.async_with_raw_response(create, client.create) + self.get_rid_by_path = core.async_with_raw_response(get_rid_by_path, client.get_rid_by_path) + self.info = core.async_with_raw_response(info, client.info) + self.read = core.async_with_raw_response(read, client.read) + self.read_original = core.async_with_raw_response(read_original, client.read_original) + self.reference = core.async_with_raw_response(reference, client.reference) + self.retrieve = core.async_with_raw_response(retrieve, client.retrieve) + self.upload = core.async_with_raw_response(upload, client.upload) + self.upload_media = core.async_with_raw_response(upload_media, client.upload_media) + + +class _AsyncMediaSetClientStreaming: + def __init__(self, client: AsyncMediaSetClient) -> None: + def calculate(_: media_sets_models.TrackedTransformationResponse): ... + def create(_: media_sets_models.TransactionId): ... + def get_rid_by_path(_: media_sets_models.GetMediaItemRidByPathResponse): ... + def info(_: media_sets_models.GetMediaItemInfoResponse): ... + def read(_: bytes): ... + def read_original(_: bytes): ... + def reference(_: core_models.MediaReference): ... + def retrieve(_: bytes): ... + def upload(_: media_sets_models.PutMediaItemResponse): ... + def upload_media(_: core_models.MediaReference): ... + + self.calculate = core.async_with_streaming_response(calculate, client.calculate) + self.create = core.async_with_streaming_response(create, client.create) + self.get_rid_by_path = core.async_with_streaming_response( + get_rid_by_path, client.get_rid_by_path + ) + self.info = core.async_with_streaming_response(info, client.info) + self.read = core.async_with_streaming_response(read, client.read) + self.read_original = core.async_with_streaming_response(read_original, client.read_original) + self.reference = core.async_with_streaming_response(reference, client.reference) + self.retrieve = core.async_with_streaming_response(retrieve, client.retrieve) + self.upload = core.async_with_streaming_response(upload, client.upload) + self.upload_media = core.async_with_streaming_response(upload_media, client.upload_media) diff --git a/foundry_sdk/v2/media_sets/models.py b/foundry_sdk/v2/media_sets/models.py new file mode 100644 index 000000000..8b2bf3add --- /dev/null +++ b/foundry_sdk/v2/media_sets/models.py @@ -0,0 +1,129 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk.v2.core import models as core_models + +BranchName = str +""" +A name for a media set branch. Valid branch names must be (a) non-empty, (b) less than 256 characters, and +(c) not a valid ResourceIdentifier. +""" + + +BranchRid = core.RID +"""A resource identifier that identifies a branch of a media set.""" + + +class GetMediaItemInfoResponse(core.ModelBase): + """GetMediaItemInfoResponse""" + + view_rid: core_models.MediaSetViewRid = pydantic.Field(alias=str("viewRid")) # type: ignore[literal-required] + path: typing.Optional[core_models.MediaItemPath] = None + logical_timestamp: LogicalTimestamp = pydantic.Field(alias=str("logicalTimestamp")) # type: ignore[literal-required] + attribution: typing.Optional[MediaAttribution] = None + + +class GetMediaItemRidByPathResponse(core.ModelBase): + """GetMediaItemRidByPathResponse""" + + media_item_rid: typing.Optional[core_models.MediaItemRid] = pydantic.Field(alias=str("mediaItemRid"), default=None) # type: ignore[literal-required] + + +LogicalTimestamp = core.Long +""" +A number representing a logical ordering to be used for transactions, etc. +This can be interpreted as a timestamp in microseconds, but may differ slightly from system clock time due +to clock drift and slight adjustments for the sake of ordering. + +Only positive timestamps (representing times after epoch) are supported. +""" + + +class MediaAttribution(core.ModelBase): + """MediaAttribution""" + + creator_id: core_models.UserId = pydantic.Field(alias=str("creatorId")) # type: ignore[literal-required] + creation_timestamp: core.AwareDatetime = pydantic.Field(alias=str("creationTimestamp")) # type: ignore[literal-required] + """The timestamp when the media item was created, in ISO 8601 timestamp format.""" + + +MediaItemXmlFormat = typing.Literal["DOCX", "XLSX", "PPTX"] +"""Format of the media item attempted to be decoded based on the XML structure.""" + + +class PutMediaItemResponse(core.ModelBase): + """PutMediaItemResponse""" + + media_item_rid: core_models.MediaItemRid = pydantic.Field(alias=str("mediaItemRid")) # type: ignore[literal-required] + + +class TrackedTransformationFailedResponse(core.ModelBase): + """TrackedTransformationFailedResponse""" + + type: typing.Literal["failed"] = "failed" + + +class TrackedTransformationPendingResponse(core.ModelBase): + """TrackedTransformationPendingResponse""" + + type: typing.Literal["pending"] = "pending" + + +TrackedTransformationResponse = typing_extensions.Annotated[ + typing.Union[ + "TrackedTransformationPendingResponse", + "TrackedTransformationFailedResponse", + "TrackedTransformationSuccessfulResponse", + ], + pydantic.Field(discriminator="type"), +] +"""TrackedTransformationResponse""" + + +class TrackedTransformationSuccessfulResponse(core.ModelBase): + """TrackedTransformationSuccessfulResponse""" + + type: typing.Literal["successful"] = "successful" + + +TransactionId = core.UUID +"""An identifier which represents a transaction on a media set.""" + + +core.resolve_forward_references(TrackedTransformationResponse, globalns=globals(), localns=locals()) + +__all__ = [ + "BranchName", + "BranchRid", + "GetMediaItemInfoResponse", + "GetMediaItemRidByPathResponse", + "LogicalTimestamp", + "MediaAttribution", + "MediaItemXmlFormat", + "PutMediaItemResponse", + "TrackedTransformationFailedResponse", + "TrackedTransformationPendingResponse", + "TrackedTransformationResponse", + "TrackedTransformationSuccessfulResponse", + "TransactionId", +] diff --git a/foundry_sdk/v2/models/__init__.py b/foundry_sdk/v2/models/__init__.py new file mode 100644 index 000000000..dce842078 --- /dev/null +++ b/foundry_sdk/v2/models/__init__.py @@ -0,0 +1,22 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +from foundry_sdk.v2.models._client import AsyncModelsClient +from foundry_sdk.v2.models._client import ModelsClient + +__all__ = [ + "ModelsClient", + "AsyncModelsClient", +] diff --git a/foundry_sdk/v2/models/_client.py b/foundry_sdk/v2/models/_client.py new file mode 100644 index 000000000..e4d3fd923 --- /dev/null +++ b/foundry_sdk/v2/models/_client.py @@ -0,0 +1,69 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing +from functools import cached_property + +from foundry_sdk import _core as core + + +class ModelsClient: + """ + The API client for the Models Namespace. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + + @cached_property + def Model(self): + from foundry_sdk.v2.models.model import ModelClient + + return ModelClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + +class AsyncModelsClient: + """ + The Async API client for the Models Namespace. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + from foundry_sdk.v2.models.model import AsyncModelClient + + self.Model = AsyncModelClient(auth=auth, hostname=hostname, config=config) diff --git a/foundry_sdk/v2/models/errors.py b/foundry_sdk/v2/models/errors.py new file mode 100644 index 000000000..788dc1e22 --- /dev/null +++ b/foundry_sdk/v2/models/errors.py @@ -0,0 +1,123 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing +from dataclasses import dataclass + +import typing_extensions + +from foundry_sdk import _errors as errors +from foundry_sdk.v2.models import models as models_models + + +class CondaSolveFailureForProvidedPackagesParameters(typing_extensions.TypedDict): + """Thrown when conda solve fails for the provided input packages.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + errorType: str + errorMessage: str + + +@dataclass +class CondaSolveFailureForProvidedPackages(errors.BadRequestError): + name: typing.Literal["CondaSolveFailureForProvidedPackages"] + parameters: CondaSolveFailureForProvidedPackagesParameters + error_instance_id: str + + +class CreateModelPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not create the Model.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class CreateModelPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["CreateModelPermissionDenied"] + parameters: CreateModelPermissionDeniedParameters + error_instance_id: str + + +class CreateModelVersionPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not create the ModelVersion.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + modelRid: models_models.ModelRid + + +@dataclass +class CreateModelVersionPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["CreateModelVersionPermissionDenied"] + parameters: CreateModelVersionPermissionDeniedParameters + error_instance_id: str + + +class InvalidModelApiParameters(typing_extensions.TypedDict): + """The model api failed validations""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + errorType: str + message: str + + +@dataclass +class InvalidModelApi(errors.BadRequestError): + name: typing.Literal["InvalidModelApi"] + parameters: InvalidModelApiParameters + error_instance_id: str + + +class ModelNotFoundParameters(typing_extensions.TypedDict): + """The given Model could not be found.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + modelRid: models_models.ModelRid + + +@dataclass +class ModelNotFound(errors.NotFoundError): + name: typing.Literal["ModelNotFound"] + parameters: ModelNotFoundParameters + error_instance_id: str + + +class ModelVersionNotFoundParameters(typing_extensions.TypedDict): + """The given ModelVersion could not be found.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + modelRid: models_models.ModelRid + modelVersionRid: models_models.ModelVersionRid + + +@dataclass +class ModelVersionNotFound(errors.NotFoundError): + name: typing.Literal["ModelVersionNotFound"] + parameters: ModelVersionNotFoundParameters + error_instance_id: str + + +__all__ = [ + "CondaSolveFailureForProvidedPackages", + "CreateModelPermissionDenied", + "CreateModelVersionPermissionDenied", + "InvalidModelApi", + "ModelNotFound", + "ModelVersionNotFound", +] diff --git a/foundry_sdk/v2/models/model.py b/foundry_sdk/v2/models/model.py new file mode 100644 index 000000000..6bcdb3623 --- /dev/null +++ b/foundry_sdk/v2/models/model.py @@ -0,0 +1,333 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing +from functools import cached_property + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v2.core import models as core_models +from foundry_sdk.v2.filesystem import models as filesystem_models +from foundry_sdk.v2.models import errors as models_errors +from foundry_sdk.v2.models import models as models_models + + +class ModelClient: + """ + The API client for the Model Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _ModelClientStreaming(self) + self.with_raw_response = _ModelClientRaw(self) + + @cached_property + def Version(self): + from foundry_sdk.v2.models.model_version import ModelVersionClient + + return ModelVersionClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def create( + self, + *, + name: models_models.ModelName, + parent_folder_rid: filesystem_models.FolderRid, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> models_models.Model: + """ + Creates a new Model with no versions. + :param name: + :type name: ModelName + :param parent_folder_rid: + :type parent_folder_rid: FolderRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: models_models.Model + + :raises CreateModelPermissionDenied: Could not create the Model. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/models", + query_params={ + "preview": preview, + }, + path_params={}, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=models_models.CreateModelRequest( + name=name, + parent_folder_rid=parent_folder_rid, + ), + response_type=models_models.Model, + request_timeout=request_timeout, + throwable_errors={ + "CreateModelPermissionDenied": models_errors.CreateModelPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + model_rid: models_models.ModelRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> models_models.Model: + """ + Retrieves a Model by its Resource Identifier (RID). + :param model_rid: + :type model_rid: ModelRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: models_models.Model + + :raises ModelNotFound: The given Model could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/models/{modelRid}", + query_params={ + "preview": preview, + }, + path_params={ + "modelRid": model_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=models_models.Model, + request_timeout=request_timeout, + throwable_errors={ + "ModelNotFound": models_errors.ModelNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _ModelClientRaw: + def __init__(self, client: ModelClient) -> None: + def create(_: models_models.Model): ... + def get(_: models_models.Model): ... + + self.create = core.with_raw_response(create, client.create) + self.get = core.with_raw_response(get, client.get) + + +class _ModelClientStreaming: + def __init__(self, client: ModelClient) -> None: + def create(_: models_models.Model): ... + def get(_: models_models.Model): ... + + self.create = core.with_streaming_response(create, client.create) + self.get = core.with_streaming_response(get, client.get) + + +class AsyncModelClient: + """ + The API client for the Model Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncModelClientStreaming(self) + self.with_raw_response = _AsyncModelClientRaw(self) + + @cached_property + def Version(self): + from foundry_sdk.v2.models.model_version import AsyncModelVersionClient + + return AsyncModelVersionClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def create( + self, + *, + name: models_models.ModelName, + parent_folder_rid: filesystem_models.FolderRid, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[models_models.Model]: + """ + Creates a new Model with no versions. + :param name: + :type name: ModelName + :param parent_folder_rid: + :type parent_folder_rid: FolderRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[models_models.Model] + + :raises CreateModelPermissionDenied: Could not create the Model. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/models", + query_params={ + "preview": preview, + }, + path_params={}, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=models_models.CreateModelRequest( + name=name, + parent_folder_rid=parent_folder_rid, + ), + response_type=models_models.Model, + request_timeout=request_timeout, + throwable_errors={ + "CreateModelPermissionDenied": models_errors.CreateModelPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + model_rid: models_models.ModelRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[models_models.Model]: + """ + Retrieves a Model by its Resource Identifier (RID). + :param model_rid: + :type model_rid: ModelRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[models_models.Model] + + :raises ModelNotFound: The given Model could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/models/{modelRid}", + query_params={ + "preview": preview, + }, + path_params={ + "modelRid": model_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=models_models.Model, + request_timeout=request_timeout, + throwable_errors={ + "ModelNotFound": models_errors.ModelNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _AsyncModelClientRaw: + def __init__(self, client: AsyncModelClient) -> None: + def create(_: models_models.Model): ... + def get(_: models_models.Model): ... + + self.create = core.async_with_raw_response(create, client.create) + self.get = core.async_with_raw_response(get, client.get) + + +class _AsyncModelClientStreaming: + def __init__(self, client: AsyncModelClient) -> None: + def create(_: models_models.Model): ... + def get(_: models_models.Model): ... + + self.create = core.async_with_streaming_response(create, client.create) + self.get = core.async_with_streaming_response(get, client.get) diff --git a/foundry_sdk/v2/models/model_version.py b/foundry_sdk/v2/models/model_version.py new file mode 100644 index 000000000..23a34bda7 --- /dev/null +++ b/foundry_sdk/v2/models/model_version.py @@ -0,0 +1,457 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v2.core import models as core_models +from foundry_sdk.v2.models import errors as models_errors +from foundry_sdk.v2.models import models as models_models + + +class ModelVersionClient: + """ + The API client for the ModelVersion Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _ModelVersionClientStreaming(self) + self.with_raw_response = _ModelVersionClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def create( + self, + model_rid: models_models.ModelRid, + *, + backing_repositories: typing.List[core.RID], + conda_requirements: typing.List[str], + model_api: models_models.ModelApi, + model_files: models_models.ModelFiles, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> models_models.ModelVersion: + """ + Creates a new Model Version on an existing model. + :param model_rid: + :type model_rid: ModelRid + :param backing_repositories: + :type backing_repositories: List[RID] + :param conda_requirements: + :type conda_requirements: List[str] + :param model_api: + :type model_api: ModelApi + :param model_files: + :type model_files: ModelFiles + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: models_models.ModelVersion + + :raises CreateModelVersionPermissionDenied: Could not create the ModelVersion. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/models/{modelRid}/versions", + query_params={ + "preview": preview, + }, + path_params={ + "modelRid": model_rid, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=models_models.CreateModelVersionRequest( + model_files=model_files, + backing_repositories=backing_repositories, + conda_requirements=conda_requirements, + model_api=model_api, + ), + response_type=models_models.ModelVersion, + request_timeout=request_timeout, + throwable_errors={ + "CreateModelVersionPermissionDenied": models_errors.CreateModelVersionPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + model_rid: models_models.ModelRid, + model_version_rid: models_models.ModelVersionRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> models_models.ModelVersion: + """ + Retrieves a Model Version by its Resource Identifier (RID). + :param model_rid: + :type model_rid: ModelRid + :param model_version_rid: + :type model_version_rid: ModelVersionRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: models_models.ModelVersion + + :raises ModelVersionNotFound: The given ModelVersion could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/models/{modelRid}/versions/{modelVersionRid}", + query_params={ + "preview": preview, + }, + path_params={ + "modelRid": model_rid, + "modelVersionRid": model_version_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=models_models.ModelVersion, + request_timeout=request_timeout, + throwable_errors={ + "ModelVersionNotFound": models_errors.ModelVersionNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def list( + self, + model_rid: models_models.ModelRid, + *, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.ResourceIterator[models_models.ModelVersion]: + """ + Lists all Model Versions for a given Model. + :param model_rid: + :type model_rid: ModelRid + :param page_size: The page size to use for the endpoint. + :type page_size: Optional[PageSize] + :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. + :type page_token: Optional[PageToken] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.ResourceIterator[models_models.ModelVersion] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/models/{modelRid}/versions", + query_params={ + "pageSize": page_size, + "pageToken": page_token, + "preview": preview, + }, + path_params={ + "modelRid": model_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=models_models.ListModelVersionsResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + +class _ModelVersionClientRaw: + def __init__(self, client: ModelVersionClient) -> None: + def create(_: models_models.ModelVersion): ... + def get(_: models_models.ModelVersion): ... + def list(_: models_models.ListModelVersionsResponse): ... + + self.create = core.with_raw_response(create, client.create) + self.get = core.with_raw_response(get, client.get) + self.list = core.with_raw_response(list, client.list) + + +class _ModelVersionClientStreaming: + def __init__(self, client: ModelVersionClient) -> None: + def create(_: models_models.ModelVersion): ... + def get(_: models_models.ModelVersion): ... + def list(_: models_models.ListModelVersionsResponse): ... + + self.create = core.with_streaming_response(create, client.create) + self.get = core.with_streaming_response(get, client.get) + self.list = core.with_streaming_response(list, client.list) + + +class AsyncModelVersionClient: + """ + The API client for the ModelVersion Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncModelVersionClientStreaming(self) + self.with_raw_response = _AsyncModelVersionClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def create( + self, + model_rid: models_models.ModelRid, + *, + backing_repositories: typing.List[core.RID], + conda_requirements: typing.List[str], + model_api: models_models.ModelApi, + model_files: models_models.ModelFiles, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[models_models.ModelVersion]: + """ + Creates a new Model Version on an existing model. + :param model_rid: + :type model_rid: ModelRid + :param backing_repositories: + :type backing_repositories: List[RID] + :param conda_requirements: + :type conda_requirements: List[str] + :param model_api: + :type model_api: ModelApi + :param model_files: + :type model_files: ModelFiles + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[models_models.ModelVersion] + + :raises CreateModelVersionPermissionDenied: Could not create the ModelVersion. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/models/{modelRid}/versions", + query_params={ + "preview": preview, + }, + path_params={ + "modelRid": model_rid, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=models_models.CreateModelVersionRequest( + model_files=model_files, + backing_repositories=backing_repositories, + conda_requirements=conda_requirements, + model_api=model_api, + ), + response_type=models_models.ModelVersion, + request_timeout=request_timeout, + throwable_errors={ + "CreateModelVersionPermissionDenied": models_errors.CreateModelVersionPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + model_rid: models_models.ModelRid, + model_version_rid: models_models.ModelVersionRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[models_models.ModelVersion]: + """ + Retrieves a Model Version by its Resource Identifier (RID). + :param model_rid: + :type model_rid: ModelRid + :param model_version_rid: + :type model_version_rid: ModelVersionRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[models_models.ModelVersion] + + :raises ModelVersionNotFound: The given ModelVersion could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/models/{modelRid}/versions/{modelVersionRid}", + query_params={ + "preview": preview, + }, + path_params={ + "modelRid": model_rid, + "modelVersionRid": model_version_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=models_models.ModelVersion, + request_timeout=request_timeout, + throwable_errors={ + "ModelVersionNotFound": models_errors.ModelVersionNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def list( + self, + model_rid: models_models.ModelRid, + *, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.AsyncResourceIterator[models_models.ModelVersion]: + """ + Lists all Model Versions for a given Model. + :param model_rid: + :type model_rid: ModelRid + :param page_size: The page size to use for the endpoint. + :type page_size: Optional[PageSize] + :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. + :type page_token: Optional[PageToken] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.AsyncResourceIterator[models_models.ModelVersion] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/models/{modelRid}/versions", + query_params={ + "pageSize": page_size, + "pageToken": page_token, + "preview": preview, + }, + path_params={ + "modelRid": model_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=models_models.ListModelVersionsResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + +class _AsyncModelVersionClientRaw: + def __init__(self, client: AsyncModelVersionClient) -> None: + def create(_: models_models.ModelVersion): ... + def get(_: models_models.ModelVersion): ... + def list(_: models_models.ListModelVersionsResponse): ... + + self.create = core.async_with_raw_response(create, client.create) + self.get = core.async_with_raw_response(get, client.get) + self.list = core.async_with_raw_response(list, client.list) + + +class _AsyncModelVersionClientStreaming: + def __init__(self, client: AsyncModelVersionClient) -> None: + def create(_: models_models.ModelVersion): ... + def get(_: models_models.ModelVersion): ... + def list(_: models_models.ListModelVersionsResponse): ... + + self.create = core.async_with_streaming_response(create, client.create) + self.get = core.async_with_streaming_response(get, client.get) + self.list = core.async_with_streaming_response(list, client.list) diff --git a/foundry_sdk/v2/models/models.py b/foundry_sdk/v2/models/models.py new file mode 100644 index 000000000..6cb328c96 --- /dev/null +++ b/foundry_sdk/v2/models/models.py @@ -0,0 +1,219 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk.v2.core import models as core_models +from foundry_sdk.v2.filesystem import models as filesystem_models + + +class CreateModelRequest(core.ModelBase): + """CreateModelRequest""" + + name: ModelName + parent_folder_rid: filesystem_models.FolderRid = pydantic.Field(alias=str("parentFolderRid")) # type: ignore[literal-required] + + +class CreateModelVersionRequest(core.ModelBase): + """CreateModelVersionRequest""" + + model_files: ModelFiles = pydantic.Field(alias=str("modelFiles")) # type: ignore[literal-required] + backing_repositories: typing.List[core.RID] = pydantic.Field(alias=str("backingRepositories")) # type: ignore[literal-required] + conda_requirements: typing.List[str] = pydantic.Field(alias=str("condaRequirements")) # type: ignore[literal-required] + model_api: ModelApi = pydantic.Field(alias=str("modelApi")) # type: ignore[literal-required] + + +class DillModelFiles(core.ModelBase): + """DillModelFiles""" + + serialized_model_function: str = pydantic.Field(alias=str("serializedModelFunction")) # type: ignore[literal-required] + type: typing.Literal["dill"] = "dill" + + +class ListModelVersionsResponse(core.ModelBase): + """ListModelVersionsResponse""" + + data: typing.List[ModelVersion] + next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] + + +class Model(core.ModelBase): + """Model""" + + rid: ModelRid + + +class ModelApi(core.ModelBase): + """The Model API is a specification that describes the inputs and outputs of a machine learning model. It is used to define the interface for the model, including the types of data that can be passed to it and the types of data that it will return.""" + + inputs: typing.List[ModelApiInput] + outputs: typing.List[ModelApiOutput] + + +class ModelApiAnyType(core.ModelBase): + """ModelApiAnyType""" + + type: typing.Literal["any"] = "any" + + +class ModelApiArrayType(core.ModelBase): + """ModelApiArrayType""" + + item_type: ModelApiDataType = pydantic.Field(alias=str("itemType")) # type: ignore[literal-required] + type: typing.Literal["array"] = "array" + + +class ModelApiColumn(core.ModelBase): + """ModelApiColumn""" + + name: str + required: typing.Optional[bool] = None + """true by default; false if the column can be null or omitted""" + + data_type: ModelApiDataType = pydantic.Field(alias=str("dataType")) # type: ignore[literal-required] + + +ModelApiDataType = typing_extensions.Annotated[ + typing.Union[ + core_models.DateType, + core_models.BooleanType, + core_models.UnsupportedType, + core_models.StringType, + "ModelApiArrayType", + core_models.DoubleType, + core_models.IntegerType, + core_models.FloatType, + "ModelApiAnyType", + "ModelApiMapType", + core_models.LongType, + core_models.TimestampType, + ], + pydantic.Field(discriminator="type"), +] +"""ModelApiDataType""" + + +ModelApiInput = typing_extensions.Annotated[ + typing.Union[core_models.UnsupportedType, "ModelApiParameterType", "ModelApiTabularType"], + pydantic.Field(discriminator="type"), +] +"""ModelApiInput""" + + +class ModelApiMapType(core.ModelBase): + """ModelApiMapType""" + + key_type: ModelApiDataType = pydantic.Field(alias=str("keyType")) # type: ignore[literal-required] + value_type: ModelApiDataType = pydantic.Field(alias=str("valueType")) # type: ignore[literal-required] + type: typing.Literal["map"] = "map" + + +ModelApiOutput = typing_extensions.Annotated[ + typing.Union[core_models.UnsupportedType, "ModelApiParameterType", "ModelApiTabularType"], + pydantic.Field(discriminator="type"), +] +"""ModelApiOutput""" + + +class ModelApiParameterType(core.ModelBase): + """ModelApiParameterType""" + + name: str + required: typing.Optional[bool] = None + """true by default; false if the input or output can be null or omitted""" + + data_type: ModelApiDataType = pydantic.Field(alias=str("dataType")) # type: ignore[literal-required] + type: typing.Literal["parameter"] = "parameter" + + +ModelApiTabularFormat = typing.Literal["PANDAS", "SPARK"] +"""ModelApiTabularFormat""" + + +class ModelApiTabularType(core.ModelBase): + """ModelApiTabularType""" + + name: str + required: typing.Optional[bool] = None + """true by default; false if the input or output can be null or omitted""" + + columns: typing.List[ModelApiColumn] + format: typing.Optional[ModelApiTabularFormat] = None + """Dataframe format the model will receive or is expected to return for this input or output. PANDAS is the default.""" + + type: typing.Literal["tabular"] = "tabular" + + +ModelName = str +"""ModelName""" + + +ModelRid = core.RID +"""The Resource Identifier (RID) of a Model.""" + + +class ModelVersion(core.ModelBase): + """ModelVersion""" + + rid: ModelVersionRid + model_api: ModelApi = pydantic.Field(alias=str("modelApi")) # type: ignore[literal-required] + conda_requirements: typing.List[str] = pydantic.Field(alias=str("condaRequirements")) # type: ignore[literal-required] + backing_repositories: typing.List[core.RID] = pydantic.Field(alias=str("backingRepositories")) # type: ignore[literal-required] + + +ModelVersionRid = core.RID +"""The Resource Identifier (RID) of a Model Version.""" + + +ModelFiles = DillModelFiles +""" +The serialized data of a machine learning model. This can include the model's parameters, architecture, and any other relevant information needed to reconstruct the model. +Must be a base64-encoded string of a dill-serialized model function. +""" + + +core.resolve_forward_references(ModelApiDataType, globalns=globals(), localns=locals()) +core.resolve_forward_references(ModelApiInput, globalns=globals(), localns=locals()) +core.resolve_forward_references(ModelApiOutput, globalns=globals(), localns=locals()) + +__all__ = [ + "CreateModelRequest", + "CreateModelVersionRequest", + "DillModelFiles", + "ListModelVersionsResponse", + "Model", + "ModelApi", + "ModelApiAnyType", + "ModelApiArrayType", + "ModelApiColumn", + "ModelApiDataType", + "ModelApiInput", + "ModelApiMapType", + "ModelApiOutput", + "ModelApiParameterType", + "ModelApiTabularFormat", + "ModelApiTabularType", + "ModelFiles", + "ModelName", + "ModelRid", + "ModelVersion", + "ModelVersionRid", +] diff --git a/foundry_sdk/v2/ontologies/__init__.py b/foundry_sdk/v2/ontologies/__init__.py new file mode 100644 index 000000000..b5ca6a499 --- /dev/null +++ b/foundry_sdk/v2/ontologies/__init__.py @@ -0,0 +1,22 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +from foundry_sdk.v2.ontologies._client import AsyncOntologiesClient +from foundry_sdk.v2.ontologies._client import OntologiesClient + +__all__ = [ + "OntologiesClient", + "AsyncOntologiesClient", +] diff --git a/foundry_sdk/v2/ontologies/_client.py b/foundry_sdk/v2/ontologies/_client.py new file mode 100644 index 000000000..6548e64f0 --- /dev/null +++ b/foundry_sdk/v2/ontologies/_client.py @@ -0,0 +1,312 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing +from functools import cached_property + +from foundry_sdk import _core as core + + +class OntologiesClient: + """ + The API client for the Ontologies Namespace. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + + @cached_property + def Action(self): + from foundry_sdk.v2.ontologies.action import ActionClient + + return ActionClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @cached_property + def ActionTypeFullMetadata(self): + from foundry_sdk.v2.ontologies.action_type_full_metadata import ( + ActionTypeFullMetadataClient, + ) # NOQA + + return ActionTypeFullMetadataClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @cached_property + def Attachment(self): + from foundry_sdk.v2.ontologies.attachment import AttachmentClient + + return AttachmentClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @cached_property + def AttachmentProperty(self): + from foundry_sdk.v2.ontologies.attachment_property import AttachmentPropertyClient # NOQA + + return AttachmentPropertyClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @cached_property + def CipherTextProperty(self): + from foundry_sdk.v2.ontologies.cipher_text_property import CipherTextPropertyClient # NOQA + + return CipherTextPropertyClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @cached_property + def LinkedObject(self): + from foundry_sdk.v2.ontologies.linked_object import LinkedObjectClient + + return LinkedObjectClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @cached_property + def MediaReferenceProperty(self): + from foundry_sdk.v2.ontologies.media_reference_property import ( + MediaReferencePropertyClient, + ) # NOQA + + return MediaReferencePropertyClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @cached_property + def Ontology(self): + from foundry_sdk.v2.ontologies.ontology import OntologyClient + + return OntologyClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @cached_property + def OntologyInterface(self): + from foundry_sdk.v2.ontologies.ontology_interface import OntologyInterfaceClient + + return OntologyInterfaceClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @cached_property + def OntologyObject(self): + from foundry_sdk.v2.ontologies.ontology_object import OntologyObjectClient + + return OntologyObjectClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @cached_property + def OntologyObjectSet(self): + from foundry_sdk.v2.ontologies.ontology_object_set import OntologyObjectSetClient # NOQA + + return OntologyObjectSetClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @cached_property + def OntologyTransaction(self): + from foundry_sdk.v2.ontologies.ontology_transaction import OntologyTransactionClient # NOQA + + return OntologyTransactionClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @cached_property + def OntologyValueType(self): + from foundry_sdk.v2.ontologies.ontology_value_type import OntologyValueTypeClient # NOQA + + return OntologyValueTypeClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @cached_property + def Query(self): + from foundry_sdk.v2.ontologies.query import QueryClient + + return QueryClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @cached_property + def TimeSeriesPropertyV2(self): + from foundry_sdk.v2.ontologies.time_series_property_v2 import ( + TimeSeriesPropertyV2Client, + ) # NOQA + + return TimeSeriesPropertyV2Client( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @cached_property + def TimeSeriesValueBankProperty(self): + from foundry_sdk.v2.ontologies.time_series_value_bank_property import ( + TimeSeriesValueBankPropertyClient, + ) # NOQA + + return TimeSeriesValueBankPropertyClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + +class AsyncOntologiesClient: + """ + The Async API client for the Ontologies Namespace. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + from foundry_sdk.v2.ontologies.action import AsyncActionClient + from foundry_sdk.v2.ontologies.action_type_full_metadata import ( + AsyncActionTypeFullMetadataClient, + ) # NOQA + from foundry_sdk.v2.ontologies.attachment import AsyncAttachmentClient + from foundry_sdk.v2.ontologies.attachment_property import ( + AsyncAttachmentPropertyClient, + ) # NOQA + from foundry_sdk.v2.ontologies.cipher_text_property import ( + AsyncCipherTextPropertyClient, + ) # NOQA + from foundry_sdk.v2.ontologies.linked_object import AsyncLinkedObjectClient + from foundry_sdk.v2.ontologies.media_reference_property import ( + AsyncMediaReferencePropertyClient, + ) # NOQA + from foundry_sdk.v2.ontologies.ontology import AsyncOntologyClient + from foundry_sdk.v2.ontologies.ontology_interface import ( + AsyncOntologyInterfaceClient, + ) # NOQA + from foundry_sdk.v2.ontologies.ontology_object import AsyncOntologyObjectClient + from foundry_sdk.v2.ontologies.ontology_object_set import ( + AsyncOntologyObjectSetClient, + ) # NOQA + from foundry_sdk.v2.ontologies.ontology_transaction import ( + AsyncOntologyTransactionClient, + ) # NOQA + from foundry_sdk.v2.ontologies.ontology_value_type import ( + AsyncOntologyValueTypeClient, + ) # NOQA + from foundry_sdk.v2.ontologies.query import AsyncQueryClient + from foundry_sdk.v2.ontologies.time_series_property_v2 import ( + AsyncTimeSeriesPropertyV2Client, + ) # NOQA + from foundry_sdk.v2.ontologies.time_series_value_bank_property import ( + AsyncTimeSeriesValueBankPropertyClient, + ) # NOQA + + self.Action = AsyncActionClient(auth=auth, hostname=hostname, config=config) + + self.ActionTypeFullMetadata = AsyncActionTypeFullMetadataClient( + auth=auth, hostname=hostname, config=config + ) + + self.Attachment = AsyncAttachmentClient(auth=auth, hostname=hostname, config=config) + + self.AttachmentProperty = AsyncAttachmentPropertyClient( + auth=auth, hostname=hostname, config=config + ) + + self.CipherTextProperty = AsyncCipherTextPropertyClient( + auth=auth, hostname=hostname, config=config + ) + + self.LinkedObject = AsyncLinkedObjectClient(auth=auth, hostname=hostname, config=config) + + self.MediaReferenceProperty = AsyncMediaReferencePropertyClient( + auth=auth, hostname=hostname, config=config + ) + + self.Ontology = AsyncOntologyClient(auth=auth, hostname=hostname, config=config) + + self.OntologyInterface = AsyncOntologyInterfaceClient( + auth=auth, hostname=hostname, config=config + ) + + self.OntologyObject = AsyncOntologyObjectClient(auth=auth, hostname=hostname, config=config) + + self.OntologyObjectSet = AsyncOntologyObjectSetClient( + auth=auth, hostname=hostname, config=config + ) + + self.OntologyTransaction = AsyncOntologyTransactionClient( + auth=auth, hostname=hostname, config=config + ) + + self.OntologyValueType = AsyncOntologyValueTypeClient( + auth=auth, hostname=hostname, config=config + ) + + self.Query = AsyncQueryClient(auth=auth, hostname=hostname, config=config) + + self.TimeSeriesPropertyV2 = AsyncTimeSeriesPropertyV2Client( + auth=auth, hostname=hostname, config=config + ) + + self.TimeSeriesValueBankProperty = AsyncTimeSeriesValueBankPropertyClient( + auth=auth, hostname=hostname, config=config + ) diff --git a/foundry_sdk/v2/ontologies/action.py b/foundry_sdk/v2/ontologies/action.py new file mode 100644 index 000000000..061e4b3c1 --- /dev/null +++ b/foundry_sdk/v2/ontologies/action.py @@ -0,0 +1,566 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v2.core import models as core_models +from foundry_sdk.v2.ontologies import models as ontologies_models + + +class ActionClient: + """ + The API client for the Action Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _ActionClientStreaming(self) + self.with_raw_response = _ActionClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def apply( + self, + ontology: ontologies_models.OntologyIdentifier, + action: ontologies_models.ActionTypeApiName, + *, + parameters: typing.Dict[ + ontologies_models.ParameterId, typing.Optional[ontologies_models.DataValue] + ], + branch: typing.Optional[core_models.FoundryBranch] = None, + options: typing.Optional[ontologies_models.ApplyActionRequestOptions] = None, + sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, + sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> ontologies_models.SyncApplyActionResponseV2: + """ + Applies an action using the given parameters. + + Changes to objects or links stored in Object Storage V1 are eventually consistent and may take some time to be visible. + Edits to objects or links in Object Storage V2 will be visible immediately after the action completes. + + Note that a 200 HTTP status code only indicates that the request was received and processed by the server. + See the validation result in the response body to determine if the action was applied successfully. + + Note that [parameter default values](https://palantir.com/docs/foundry/action-types/parameters-default-value/) are not currently supported by + this endpoint. + + :param ontology: + :type ontology: OntologyIdentifier + :param action: The API name of the action to apply. To find the API name for your action, use the **List action types** endpoint or check the **Ontology Manager**. + :type action: ActionTypeApiName + :param parameters: + :type parameters: Dict[ParameterId, Optional[DataValue]] + :param branch: The Foundry branch to apply the action against. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported. + :type branch: Optional[FoundryBranch] + :param options: + :type options: Optional[ApplyActionRequestOptions] + :param sdk_package_rid: The package rid of the generated SDK. + :type sdk_package_rid: Optional[SdkPackageRid] + :param sdk_version: The version of the generated SDK. + :type sdk_version: Optional[SdkVersion] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: ontologies_models.SyncApplyActionResponseV2 + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/ontologies/{ontology}/actions/{action}/apply", + query_params={ + "branch": branch, + "sdkPackageRid": sdk_package_rid, + "sdkVersion": sdk_version, + }, + path_params={ + "ontology": ontology, + "action": action, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=ontologies_models.ApplyActionRequestV2( + options=options, + parameters=parameters, + ), + response_type=ontologies_models.SyncApplyActionResponseV2, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def apply_batch( + self, + ontology: ontologies_models.OntologyIdentifier, + action: ontologies_models.ActionTypeApiName, + *, + requests: typing.List[ontologies_models.BatchApplyActionRequestItem], + branch: typing.Optional[core_models.FoundryBranch] = None, + options: typing.Optional[ontologies_models.BatchApplyActionRequestOptions] = None, + sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, + sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> ontologies_models.BatchApplyActionResponseV2: + """ + Applies multiple actions (of the same Action Type) using the given parameters. + + Changes to objects or links stored in Object Storage V1 are eventually consistent and may take some time to be visible. + Edits to objects or links in Object Storage V2 will be visible immediately after the action completes. + + Up to 20 actions may be applied in one call. Actions that only modify objects in Object Storage v2 and do not + call Functions may receive a higher limit. + + Note that [notifications](https://palantir.com/docs/foundry/action-types/notifications/) are not currently supported by this endpoint. + + :param ontology: + :type ontology: OntologyIdentifier + :param action: The API name of the action to apply. To find the API name for your action, use the **List action types** endpoint or check the **Ontology Manager**. + :type action: ActionTypeApiName + :param requests: + :type requests: List[BatchApplyActionRequestItem] + :param branch: The Foundry branch to apply the action against. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported. + :type branch: Optional[FoundryBranch] + :param options: + :type options: Optional[BatchApplyActionRequestOptions] + :param sdk_package_rid: The package rid of the generated SDK. + :type sdk_package_rid: Optional[SdkPackageRid] + :param sdk_version: The version of the generated SDK. + :type sdk_version: Optional[SdkVersion] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: ontologies_models.BatchApplyActionResponseV2 + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/ontologies/{ontology}/actions/{action}/applyBatch", + query_params={ + "branch": branch, + "sdkPackageRid": sdk_package_rid, + "sdkVersion": sdk_version, + }, + path_params={ + "ontology": ontology, + "action": action, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=ontologies_models.BatchApplyActionRequestV2( + options=options, + requests=requests, + ), + response_type=ontologies_models.BatchApplyActionResponseV2, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def apply_with_overrides( + self, + ontology: ontologies_models.OntologyIdentifier, + action: ontologies_models.ActionTypeApiName, + *, + overrides: ontologies_models.ApplyActionOverrides, + request: ontologies_models.ApplyActionRequestV2, + branch: typing.Optional[core_models.FoundryBranch] = None, + sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, + sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> ontologies_models.SyncApplyActionResponseV2: + """ + Same as regular apply action operation, but allows specifying overrides for UniqueIdentifier and + CurrentTime generated action parameters. + + :param ontology: + :type ontology: OntologyIdentifier + :param action: The API name of the action to apply. To find the API name for your action, use the **List action types** endpoint or check the **Ontology Manager**. + :type action: ActionTypeApiName + :param overrides: + :type overrides: ApplyActionOverrides + :param request: + :type request: ApplyActionRequestV2 + :param branch: The Foundry branch to apply the action against. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported. + :type branch: Optional[FoundryBranch] + :param sdk_package_rid: The package rid of the generated SDK. + :type sdk_package_rid: Optional[SdkPackageRid] + :param sdk_version: The version of the generated SDK. + :type sdk_version: Optional[SdkVersion] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: ontologies_models.SyncApplyActionResponseV2 + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/ontologies/{ontology}/actions/{action}/applyWithOverrides", + query_params={ + "branch": branch, + "sdkPackageRid": sdk_package_rid, + "sdkVersion": sdk_version, + }, + path_params={ + "ontology": ontology, + "action": action, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=ontologies_models.ApplyActionWithOverridesRequest( + request=request, + overrides=overrides, + ), + response_type=ontologies_models.SyncApplyActionResponseV2, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _ActionClientRaw: + def __init__(self, client: ActionClient) -> None: + def apply(_: ontologies_models.SyncApplyActionResponseV2): ... + def apply_batch(_: ontologies_models.BatchApplyActionResponseV2): ... + def apply_with_overrides(_: ontologies_models.SyncApplyActionResponseV2): ... + + self.apply = core.with_raw_response(apply, client.apply) + self.apply_batch = core.with_raw_response(apply_batch, client.apply_batch) + self.apply_with_overrides = core.with_raw_response( + apply_with_overrides, client.apply_with_overrides + ) + + +class _ActionClientStreaming: + def __init__(self, client: ActionClient) -> None: + def apply(_: ontologies_models.SyncApplyActionResponseV2): ... + def apply_batch(_: ontologies_models.BatchApplyActionResponseV2): ... + def apply_with_overrides(_: ontologies_models.SyncApplyActionResponseV2): ... + + self.apply = core.with_streaming_response(apply, client.apply) + self.apply_batch = core.with_streaming_response(apply_batch, client.apply_batch) + self.apply_with_overrides = core.with_streaming_response( + apply_with_overrides, client.apply_with_overrides + ) + + +class AsyncActionClient: + """ + The API client for the Action Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncActionClientStreaming(self) + self.with_raw_response = _AsyncActionClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def apply( + self, + ontology: ontologies_models.OntologyIdentifier, + action: ontologies_models.ActionTypeApiName, + *, + parameters: typing.Dict[ + ontologies_models.ParameterId, typing.Optional[ontologies_models.DataValue] + ], + branch: typing.Optional[core_models.FoundryBranch] = None, + options: typing.Optional[ontologies_models.ApplyActionRequestOptions] = None, + sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, + sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[ontologies_models.SyncApplyActionResponseV2]: + """ + Applies an action using the given parameters. + + Changes to objects or links stored in Object Storage V1 are eventually consistent and may take some time to be visible. + Edits to objects or links in Object Storage V2 will be visible immediately after the action completes. + + Note that a 200 HTTP status code only indicates that the request was received and processed by the server. + See the validation result in the response body to determine if the action was applied successfully. + + Note that [parameter default values](https://palantir.com/docs/foundry/action-types/parameters-default-value/) are not currently supported by + this endpoint. + + :param ontology: + :type ontology: OntologyIdentifier + :param action: The API name of the action to apply. To find the API name for your action, use the **List action types** endpoint or check the **Ontology Manager**. + :type action: ActionTypeApiName + :param parameters: + :type parameters: Dict[ParameterId, Optional[DataValue]] + :param branch: The Foundry branch to apply the action against. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported. + :type branch: Optional[FoundryBranch] + :param options: + :type options: Optional[ApplyActionRequestOptions] + :param sdk_package_rid: The package rid of the generated SDK. + :type sdk_package_rid: Optional[SdkPackageRid] + :param sdk_version: The version of the generated SDK. + :type sdk_version: Optional[SdkVersion] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[ontologies_models.SyncApplyActionResponseV2] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/ontologies/{ontology}/actions/{action}/apply", + query_params={ + "branch": branch, + "sdkPackageRid": sdk_package_rid, + "sdkVersion": sdk_version, + }, + path_params={ + "ontology": ontology, + "action": action, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=ontologies_models.ApplyActionRequestV2( + options=options, + parameters=parameters, + ), + response_type=ontologies_models.SyncApplyActionResponseV2, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def apply_batch( + self, + ontology: ontologies_models.OntologyIdentifier, + action: ontologies_models.ActionTypeApiName, + *, + requests: typing.List[ontologies_models.BatchApplyActionRequestItem], + branch: typing.Optional[core_models.FoundryBranch] = None, + options: typing.Optional[ontologies_models.BatchApplyActionRequestOptions] = None, + sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, + sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[ontologies_models.BatchApplyActionResponseV2]: + """ + Applies multiple actions (of the same Action Type) using the given parameters. + + Changes to objects or links stored in Object Storage V1 are eventually consistent and may take some time to be visible. + Edits to objects or links in Object Storage V2 will be visible immediately after the action completes. + + Up to 20 actions may be applied in one call. Actions that only modify objects in Object Storage v2 and do not + call Functions may receive a higher limit. + + Note that [notifications](https://palantir.com/docs/foundry/action-types/notifications/) are not currently supported by this endpoint. + + :param ontology: + :type ontology: OntologyIdentifier + :param action: The API name of the action to apply. To find the API name for your action, use the **List action types** endpoint or check the **Ontology Manager**. + :type action: ActionTypeApiName + :param requests: + :type requests: List[BatchApplyActionRequestItem] + :param branch: The Foundry branch to apply the action against. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported. + :type branch: Optional[FoundryBranch] + :param options: + :type options: Optional[BatchApplyActionRequestOptions] + :param sdk_package_rid: The package rid of the generated SDK. + :type sdk_package_rid: Optional[SdkPackageRid] + :param sdk_version: The version of the generated SDK. + :type sdk_version: Optional[SdkVersion] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[ontologies_models.BatchApplyActionResponseV2] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/ontologies/{ontology}/actions/{action}/applyBatch", + query_params={ + "branch": branch, + "sdkPackageRid": sdk_package_rid, + "sdkVersion": sdk_version, + }, + path_params={ + "ontology": ontology, + "action": action, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=ontologies_models.BatchApplyActionRequestV2( + options=options, + requests=requests, + ), + response_type=ontologies_models.BatchApplyActionResponseV2, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def apply_with_overrides( + self, + ontology: ontologies_models.OntologyIdentifier, + action: ontologies_models.ActionTypeApiName, + *, + overrides: ontologies_models.ApplyActionOverrides, + request: ontologies_models.ApplyActionRequestV2, + branch: typing.Optional[core_models.FoundryBranch] = None, + sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, + sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[ontologies_models.SyncApplyActionResponseV2]: + """ + Same as regular apply action operation, but allows specifying overrides for UniqueIdentifier and + CurrentTime generated action parameters. + + :param ontology: + :type ontology: OntologyIdentifier + :param action: The API name of the action to apply. To find the API name for your action, use the **List action types** endpoint or check the **Ontology Manager**. + :type action: ActionTypeApiName + :param overrides: + :type overrides: ApplyActionOverrides + :param request: + :type request: ApplyActionRequestV2 + :param branch: The Foundry branch to apply the action against. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported. + :type branch: Optional[FoundryBranch] + :param sdk_package_rid: The package rid of the generated SDK. + :type sdk_package_rid: Optional[SdkPackageRid] + :param sdk_version: The version of the generated SDK. + :type sdk_version: Optional[SdkVersion] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[ontologies_models.SyncApplyActionResponseV2] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/ontologies/{ontology}/actions/{action}/applyWithOverrides", + query_params={ + "branch": branch, + "sdkPackageRid": sdk_package_rid, + "sdkVersion": sdk_version, + }, + path_params={ + "ontology": ontology, + "action": action, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=ontologies_models.ApplyActionWithOverridesRequest( + request=request, + overrides=overrides, + ), + response_type=ontologies_models.SyncApplyActionResponseV2, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _AsyncActionClientRaw: + def __init__(self, client: AsyncActionClient) -> None: + def apply(_: ontologies_models.SyncApplyActionResponseV2): ... + def apply_batch(_: ontologies_models.BatchApplyActionResponseV2): ... + def apply_with_overrides(_: ontologies_models.SyncApplyActionResponseV2): ... + + self.apply = core.async_with_raw_response(apply, client.apply) + self.apply_batch = core.async_with_raw_response(apply_batch, client.apply_batch) + self.apply_with_overrides = core.async_with_raw_response( + apply_with_overrides, client.apply_with_overrides + ) + + +class _AsyncActionClientStreaming: + def __init__(self, client: AsyncActionClient) -> None: + def apply(_: ontologies_models.SyncApplyActionResponseV2): ... + def apply_batch(_: ontologies_models.BatchApplyActionResponseV2): ... + def apply_with_overrides(_: ontologies_models.SyncApplyActionResponseV2): ... + + self.apply = core.async_with_streaming_response(apply, client.apply) + self.apply_batch = core.async_with_streaming_response(apply_batch, client.apply_batch) + self.apply_with_overrides = core.async_with_streaming_response( + apply_with_overrides, client.apply_with_overrides + ) diff --git a/foundry_sdk/v2/ontologies/action_type.py b/foundry_sdk/v2/ontologies/action_type.py new file mode 100644 index 000000000..059fbc553 --- /dev/null +++ b/foundry_sdk/v2/ontologies/action_type.py @@ -0,0 +1,424 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v2.core import models as core_models +from foundry_sdk.v2.ontologies import models as ontologies_models + + +class ActionTypeClient: + """ + The API client for the ActionType Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _ActionTypeClientStreaming(self) + self.with_raw_response = _ActionTypeClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + ontology: ontologies_models.OntologyIdentifier, + action_type: ontologies_models.ActionTypeApiName, + *, + branch: typing.Optional[core_models.FoundryBranch] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> ontologies_models.ActionTypeV2: + """ + Gets a specific action type with the given API name. + + :param ontology: + :type ontology: OntologyIdentifier + :param action_type: The name of the action type in the API. + :type action_type: ActionTypeApiName + :param branch: The Foundry branch to load the action type definition from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. + :type branch: Optional[FoundryBranch] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: ontologies_models.ActionTypeV2 + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/ontologies/{ontology}/actionTypes/{actionType}", + query_params={ + "branch": branch, + }, + path_params={ + "ontology": ontology, + "actionType": action_type, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.ActionTypeV2, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get_by_rid( + self, + ontology: ontologies_models.OntologyIdentifier, + action_type_rid: ontologies_models.ActionTypeRid, + *, + branch: typing.Optional[core_models.FoundryBranch] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> ontologies_models.ActionTypeV2: + """ + Gets a specific action type with the given RID. + + :param ontology: + :type ontology: OntologyIdentifier + :param action_type_rid: The RID of the action type. + :type action_type_rid: ActionTypeRid + :param branch: The Foundry branch to load the action type definition from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. + :type branch: Optional[FoundryBranch] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: ontologies_models.ActionTypeV2 + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/ontologies/{ontology}/actionTypes/byRid/{actionTypeRid}", + query_params={ + "branch": branch, + }, + path_params={ + "ontology": ontology, + "actionTypeRid": action_type_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.ActionTypeV2, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def list( + self, + ontology: ontologies_models.OntologyIdentifier, + *, + branch: typing.Optional[core_models.FoundryBranch] = None, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.ResourceIterator[ontologies_models.ActionTypeV2]: + """ + Lists the action types for the given Ontology. + + Each page may be smaller than the requested page size. However, it is guaranteed that if there are more + results available, at least one result will be present in the response. + + :param ontology: + :type ontology: OntologyIdentifier + :param branch: The Foundry branch to list the action types from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. + :type branch: Optional[FoundryBranch] + :param page_size: The desired size of the page to be returned. Defaults to 500. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. + :type page_size: Optional[PageSize] + :param page_token: + :type page_token: Optional[PageToken] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.ResourceIterator[ontologies_models.ActionTypeV2] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/ontologies/{ontology}/actionTypes", + query_params={ + "branch": branch, + "pageSize": page_size, + "pageToken": page_token, + }, + path_params={ + "ontology": ontology, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.ListActionTypesResponseV2, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + +class _ActionTypeClientRaw: + def __init__(self, client: ActionTypeClient) -> None: + def get(_: ontologies_models.ActionTypeV2): ... + def get_by_rid(_: ontologies_models.ActionTypeV2): ... + def list(_: ontologies_models.ListActionTypesResponseV2): ... + + self.get = core.with_raw_response(get, client.get) + self.get_by_rid = core.with_raw_response(get_by_rid, client.get_by_rid) + self.list = core.with_raw_response(list, client.list) + + +class _ActionTypeClientStreaming: + def __init__(self, client: ActionTypeClient) -> None: + def get(_: ontologies_models.ActionTypeV2): ... + def get_by_rid(_: ontologies_models.ActionTypeV2): ... + def list(_: ontologies_models.ListActionTypesResponseV2): ... + + self.get = core.with_streaming_response(get, client.get) + self.get_by_rid = core.with_streaming_response(get_by_rid, client.get_by_rid) + self.list = core.with_streaming_response(list, client.list) + + +class AsyncActionTypeClient: + """ + The API client for the ActionType Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncActionTypeClientStreaming(self) + self.with_raw_response = _AsyncActionTypeClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + ontology: ontologies_models.OntologyIdentifier, + action_type: ontologies_models.ActionTypeApiName, + *, + branch: typing.Optional[core_models.FoundryBranch] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[ontologies_models.ActionTypeV2]: + """ + Gets a specific action type with the given API name. + + :param ontology: + :type ontology: OntologyIdentifier + :param action_type: The name of the action type in the API. + :type action_type: ActionTypeApiName + :param branch: The Foundry branch to load the action type definition from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. + :type branch: Optional[FoundryBranch] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[ontologies_models.ActionTypeV2] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/ontologies/{ontology}/actionTypes/{actionType}", + query_params={ + "branch": branch, + }, + path_params={ + "ontology": ontology, + "actionType": action_type, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.ActionTypeV2, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get_by_rid( + self, + ontology: ontologies_models.OntologyIdentifier, + action_type_rid: ontologies_models.ActionTypeRid, + *, + branch: typing.Optional[core_models.FoundryBranch] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[ontologies_models.ActionTypeV2]: + """ + Gets a specific action type with the given RID. + + :param ontology: + :type ontology: OntologyIdentifier + :param action_type_rid: The RID of the action type. + :type action_type_rid: ActionTypeRid + :param branch: The Foundry branch to load the action type definition from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. + :type branch: Optional[FoundryBranch] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[ontologies_models.ActionTypeV2] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/ontologies/{ontology}/actionTypes/byRid/{actionTypeRid}", + query_params={ + "branch": branch, + }, + path_params={ + "ontology": ontology, + "actionTypeRid": action_type_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.ActionTypeV2, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def list( + self, + ontology: ontologies_models.OntologyIdentifier, + *, + branch: typing.Optional[core_models.FoundryBranch] = None, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.AsyncResourceIterator[ontologies_models.ActionTypeV2]: + """ + Lists the action types for the given Ontology. + + Each page may be smaller than the requested page size. However, it is guaranteed that if there are more + results available, at least one result will be present in the response. + + :param ontology: + :type ontology: OntologyIdentifier + :param branch: The Foundry branch to list the action types from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. + :type branch: Optional[FoundryBranch] + :param page_size: The desired size of the page to be returned. Defaults to 500. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. + :type page_size: Optional[PageSize] + :param page_token: + :type page_token: Optional[PageToken] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.AsyncResourceIterator[ontologies_models.ActionTypeV2] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/ontologies/{ontology}/actionTypes", + query_params={ + "branch": branch, + "pageSize": page_size, + "pageToken": page_token, + }, + path_params={ + "ontology": ontology, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.ListActionTypesResponseV2, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + +class _AsyncActionTypeClientRaw: + def __init__(self, client: AsyncActionTypeClient) -> None: + def get(_: ontologies_models.ActionTypeV2): ... + def get_by_rid(_: ontologies_models.ActionTypeV2): ... + def list(_: ontologies_models.ListActionTypesResponseV2): ... + + self.get = core.async_with_raw_response(get, client.get) + self.get_by_rid = core.async_with_raw_response(get_by_rid, client.get_by_rid) + self.list = core.async_with_raw_response(list, client.list) + + +class _AsyncActionTypeClientStreaming: + def __init__(self, client: AsyncActionTypeClient) -> None: + def get(_: ontologies_models.ActionTypeV2): ... + def get_by_rid(_: ontologies_models.ActionTypeV2): ... + def list(_: ontologies_models.ListActionTypesResponseV2): ... + + self.get = core.async_with_streaming_response(get, client.get) + self.get_by_rid = core.async_with_streaming_response(get_by_rid, client.get_by_rid) + self.list = core.async_with_streaming_response(list, client.list) diff --git a/foundry_sdk/v2/ontologies/action_type_full_metadata.py b/foundry_sdk/v2/ontologies/action_type_full_metadata.py new file mode 100644 index 000000000..c24fa1f52 --- /dev/null +++ b/foundry_sdk/v2/ontologies/action_type_full_metadata.py @@ -0,0 +1,318 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v2.core import models as core_models +from foundry_sdk.v2.ontologies import models as ontologies_models + + +class ActionTypeFullMetadataClient: + """ + The API client for the ActionTypeFullMetadata Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _ActionTypeFullMetadataClientStreaming(self) + self.with_raw_response = _ActionTypeFullMetadataClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + ontology: ontologies_models.OntologyIdentifier, + action_type: ontologies_models.ActionTypeApiName, + *, + branch: typing.Optional[core_models.FoundryBranch] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> ontologies_models.ActionTypeFullMetadata: + """ + Gets the full metadata associated with an action type. + + :param ontology: The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. + :type ontology: OntologyIdentifier + :param action_type: The name of the action type in the API. + :type action_type: ActionTypeApiName + :param branch: The Foundry branch to load the action type definition from. If not specified, the default branch will be used. + :type branch: Optional[FoundryBranch] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: ontologies_models.ActionTypeFullMetadata + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/ontologies/{ontology}/actionTypes/{actionType}/fullMetadata", + query_params={ + "branch": branch, + }, + path_params={ + "ontology": ontology, + "actionType": action_type, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.ActionTypeFullMetadata, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def list( + self, + ontology: ontologies_models.OntologyIdentifier, + *, + branch: typing.Optional[core_models.FoundryBranch] = None, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.ResourceIterator[ontologies_models.ActionTypeFullMetadata]: + """ + Lists the action types (with full metadata) for the given Ontology. + + Each page may be smaller than the requested page size. However, it is guaranteed that if there are more + results available, at least one result will be present in the response. + + :param ontology: + :type ontology: OntologyIdentifier + :param branch: The Foundry branch to list the action types from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. + :type branch: Optional[FoundryBranch] + :param page_size: The desired size of the page to be returned. Defaults to 500. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. + :type page_size: Optional[PageSize] + :param page_token: + :type page_token: Optional[PageToken] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.ResourceIterator[ontologies_models.ActionTypeFullMetadata] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/ontologies/{ontology}/actionTypesFullMetadata", + query_params={ + "branch": branch, + "pageSize": page_size, + "pageToken": page_token, + }, + path_params={ + "ontology": ontology, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.ListActionTypesFullMetadataResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + +class _ActionTypeFullMetadataClientRaw: + def __init__(self, client: ActionTypeFullMetadataClient) -> None: + def get(_: ontologies_models.ActionTypeFullMetadata): ... + def list(_: ontologies_models.ListActionTypesFullMetadataResponse): ... + + self.get = core.with_raw_response(get, client.get) + self.list = core.with_raw_response(list, client.list) + + +class _ActionTypeFullMetadataClientStreaming: + def __init__(self, client: ActionTypeFullMetadataClient) -> None: + def get(_: ontologies_models.ActionTypeFullMetadata): ... + def list(_: ontologies_models.ListActionTypesFullMetadataResponse): ... + + self.get = core.with_streaming_response(get, client.get) + self.list = core.with_streaming_response(list, client.list) + + +class AsyncActionTypeFullMetadataClient: + """ + The API client for the ActionTypeFullMetadata Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncActionTypeFullMetadataClientStreaming(self) + self.with_raw_response = _AsyncActionTypeFullMetadataClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + ontology: ontologies_models.OntologyIdentifier, + action_type: ontologies_models.ActionTypeApiName, + *, + branch: typing.Optional[core_models.FoundryBranch] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[ontologies_models.ActionTypeFullMetadata]: + """ + Gets the full metadata associated with an action type. + + :param ontology: The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. + :type ontology: OntologyIdentifier + :param action_type: The name of the action type in the API. + :type action_type: ActionTypeApiName + :param branch: The Foundry branch to load the action type definition from. If not specified, the default branch will be used. + :type branch: Optional[FoundryBranch] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[ontologies_models.ActionTypeFullMetadata] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/ontologies/{ontology}/actionTypes/{actionType}/fullMetadata", + query_params={ + "branch": branch, + }, + path_params={ + "ontology": ontology, + "actionType": action_type, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.ActionTypeFullMetadata, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def list( + self, + ontology: ontologies_models.OntologyIdentifier, + *, + branch: typing.Optional[core_models.FoundryBranch] = None, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.AsyncResourceIterator[ontologies_models.ActionTypeFullMetadata]: + """ + Lists the action types (with full metadata) for the given Ontology. + + Each page may be smaller than the requested page size. However, it is guaranteed that if there are more + results available, at least one result will be present in the response. + + :param ontology: + :type ontology: OntologyIdentifier + :param branch: The Foundry branch to list the action types from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. + :type branch: Optional[FoundryBranch] + :param page_size: The desired size of the page to be returned. Defaults to 500. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. + :type page_size: Optional[PageSize] + :param page_token: + :type page_token: Optional[PageToken] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.AsyncResourceIterator[ontologies_models.ActionTypeFullMetadata] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/ontologies/{ontology}/actionTypesFullMetadata", + query_params={ + "branch": branch, + "pageSize": page_size, + "pageToken": page_token, + }, + path_params={ + "ontology": ontology, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.ListActionTypesFullMetadataResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + +class _AsyncActionTypeFullMetadataClientRaw: + def __init__(self, client: AsyncActionTypeFullMetadataClient) -> None: + def get(_: ontologies_models.ActionTypeFullMetadata): ... + def list(_: ontologies_models.ListActionTypesFullMetadataResponse): ... + + self.get = core.async_with_raw_response(get, client.get) + self.list = core.async_with_raw_response(list, client.list) + + +class _AsyncActionTypeFullMetadataClientStreaming: + def __init__(self, client: AsyncActionTypeFullMetadataClient) -> None: + def get(_: ontologies_models.ActionTypeFullMetadata): ... + def list(_: ontologies_models.ListActionTypesFullMetadataResponse): ... + + self.get = core.async_with_streaming_response(get, client.get) + self.list = core.async_with_streaming_response(list, client.list) diff --git a/foundry_sdk/v2/ontologies/attachment.py b/foundry_sdk/v2/ontologies/attachment.py new file mode 100644 index 000000000..34ec96deb --- /dev/null +++ b/foundry_sdk/v2/ontologies/attachment.py @@ -0,0 +1,522 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v2.core import models as core_models +from foundry_sdk.v2.ontologies import models as ontologies_models + + +class AttachmentClient: + """ + The API client for the Attachment Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AttachmentClientStreaming(self) + self.with_raw_response = _AttachmentClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + attachment_rid: ontologies_models.AttachmentRid, + *, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> ontologies_models.AttachmentV2: + """ + Get the metadata of an attachment. + + :param attachment_rid: The RID of the attachment. + :type attachment_rid: AttachmentRid + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: ontologies_models.AttachmentV2 + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/ontologies/attachments/{attachmentRid}", + query_params={}, + path_params={ + "attachmentRid": attachment_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.AttachmentV2, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def read( + self, + attachment_rid: ontologies_models.AttachmentRid, + *, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> bytes: + """ + Get the content of an attachment. + + :param attachment_rid: The RID of the attachment. + :type attachment_rid: AttachmentRid + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: bytes + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/ontologies/attachments/{attachmentRid}/content", + query_params={}, + path_params={ + "attachmentRid": attachment_rid, + }, + header_params={ + "Accept": "*/*", + }, + body=None, + response_type=bytes, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def upload( + self, + body: bytes, + *, + content_length: core_models.ContentLength, + content_type: core_models.ContentType, + filename: core_models.Filename, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> ontologies_models.AttachmentV2: + """ + Upload an attachment to use in an action. Any attachment which has not been linked to an object via + an action within one hour after upload will be removed. + Previously mapped attachments which are not connected to any object anymore are also removed on + a biweekly basis. + The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`. + + :param body: Body of the request + :type body: bytes + :param content_length: The size in bytes of the file content being uploaded. + :type content_length: ContentLength + :param content_type: The media type of the file being uploaded. + :type content_type: ContentType + :param filename: The name of the file being uploaded. + :type filename: Filename + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: ontologies_models.AttachmentV2 + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/ontologies/attachments/upload", + query_params={ + "filename": filename, + }, + path_params={}, + header_params={ + "Content-Length": content_length, + "Content-Type": content_type, + "Content-Type": "*/*", + "Accept": "application/json", + }, + body=body, + response_type=ontologies_models.AttachmentV2, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def upload_with_rid( + self, + attachment_rid: ontologies_models.AttachmentRid, + body: bytes, + *, + content_length: core_models.ContentLength, + content_type: core_models.ContentType, + filename: core_models.Filename, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> ontologies_models.AttachmentV2: + """ + This endpoint is identical to `/v2/ontologies/attachments/upload` but additionally accepts a previously + generated `AttachmentRid`. + + :param attachment_rid: The `AttachmentRid` of the attachment being uploaded. + :type attachment_rid: AttachmentRid + :param body: Body of the request + :type body: bytes + :param content_length: The size in bytes of the file content being uploaded. + :type content_length: ContentLength + :param content_type: The media type of the file being uploaded. + :type content_type: ContentType + :param filename: The name of the file being uploaded. + :type filename: Filename + :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: ontologies_models.AttachmentV2 + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/ontologies/attachments/upload/{attachmentRid}", + query_params={ + "filename": filename, + "preview": preview, + }, + path_params={ + "attachmentRid": attachment_rid, + }, + header_params={ + "Content-Length": content_length, + "Content-Type": content_type, + "Content-Type": "*/*", + "Accept": "application/json", + }, + body=body, + response_type=ontologies_models.AttachmentV2, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _AttachmentClientRaw: + def __init__(self, client: AttachmentClient) -> None: + def get(_: ontologies_models.AttachmentV2): ... + def read(_: bytes): ... + def upload(_: ontologies_models.AttachmentV2): ... + def upload_with_rid(_: ontologies_models.AttachmentV2): ... + + self.get = core.with_raw_response(get, client.get) + self.read = core.with_raw_response(read, client.read) + self.upload = core.with_raw_response(upload, client.upload) + self.upload_with_rid = core.with_raw_response(upload_with_rid, client.upload_with_rid) + + +class _AttachmentClientStreaming: + def __init__(self, client: AttachmentClient) -> None: + def get(_: ontologies_models.AttachmentV2): ... + def read(_: bytes): ... + def upload(_: ontologies_models.AttachmentV2): ... + def upload_with_rid(_: ontologies_models.AttachmentV2): ... + + self.get = core.with_streaming_response(get, client.get) + self.read = core.with_streaming_response(read, client.read) + self.upload = core.with_streaming_response(upload, client.upload) + self.upload_with_rid = core.with_streaming_response(upload_with_rid, client.upload_with_rid) + + +class AsyncAttachmentClient: + """ + The API client for the Attachment Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncAttachmentClientStreaming(self) + self.with_raw_response = _AsyncAttachmentClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + attachment_rid: ontologies_models.AttachmentRid, + *, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[ontologies_models.AttachmentV2]: + """ + Get the metadata of an attachment. + + :param attachment_rid: The RID of the attachment. + :type attachment_rid: AttachmentRid + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[ontologies_models.AttachmentV2] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/ontologies/attachments/{attachmentRid}", + query_params={}, + path_params={ + "attachmentRid": attachment_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.AttachmentV2, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def read( + self, + attachment_rid: ontologies_models.AttachmentRid, + *, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[bytes]: + """ + Get the content of an attachment. + + :param attachment_rid: The RID of the attachment. + :type attachment_rid: AttachmentRid + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[bytes] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/ontologies/attachments/{attachmentRid}/content", + query_params={}, + path_params={ + "attachmentRid": attachment_rid, + }, + header_params={ + "Accept": "*/*", + }, + body=None, + response_type=bytes, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def upload( + self, + body: bytes, + *, + content_length: core_models.ContentLength, + content_type: core_models.ContentType, + filename: core_models.Filename, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[ontologies_models.AttachmentV2]: + """ + Upload an attachment to use in an action. Any attachment which has not been linked to an object via + an action within one hour after upload will be removed. + Previously mapped attachments which are not connected to any object anymore are also removed on + a biweekly basis. + The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`. + + :param body: Body of the request + :type body: bytes + :param content_length: The size in bytes of the file content being uploaded. + :type content_length: ContentLength + :param content_type: The media type of the file being uploaded. + :type content_type: ContentType + :param filename: The name of the file being uploaded. + :type filename: Filename + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[ontologies_models.AttachmentV2] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/ontologies/attachments/upload", + query_params={ + "filename": filename, + }, + path_params={}, + header_params={ + "Content-Length": content_length, + "Content-Type": content_type, + "Content-Type": "*/*", + "Accept": "application/json", + }, + body=body, + response_type=ontologies_models.AttachmentV2, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def upload_with_rid( + self, + attachment_rid: ontologies_models.AttachmentRid, + body: bytes, + *, + content_length: core_models.ContentLength, + content_type: core_models.ContentType, + filename: core_models.Filename, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[ontologies_models.AttachmentV2]: + """ + This endpoint is identical to `/v2/ontologies/attachments/upload` but additionally accepts a previously + generated `AttachmentRid`. + + :param attachment_rid: The `AttachmentRid` of the attachment being uploaded. + :type attachment_rid: AttachmentRid + :param body: Body of the request + :type body: bytes + :param content_length: The size in bytes of the file content being uploaded. + :type content_length: ContentLength + :param content_type: The media type of the file being uploaded. + :type content_type: ContentType + :param filename: The name of the file being uploaded. + :type filename: Filename + :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[ontologies_models.AttachmentV2] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/ontologies/attachments/upload/{attachmentRid}", + query_params={ + "filename": filename, + "preview": preview, + }, + path_params={ + "attachmentRid": attachment_rid, + }, + header_params={ + "Content-Length": content_length, + "Content-Type": content_type, + "Content-Type": "*/*", + "Accept": "application/json", + }, + body=body, + response_type=ontologies_models.AttachmentV2, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _AsyncAttachmentClientRaw: + def __init__(self, client: AsyncAttachmentClient) -> None: + def get(_: ontologies_models.AttachmentV2): ... + def read(_: bytes): ... + def upload(_: ontologies_models.AttachmentV2): ... + def upload_with_rid(_: ontologies_models.AttachmentV2): ... + + self.get = core.async_with_raw_response(get, client.get) + self.read = core.async_with_raw_response(read, client.read) + self.upload = core.async_with_raw_response(upload, client.upload) + self.upload_with_rid = core.async_with_raw_response(upload_with_rid, client.upload_with_rid) + + +class _AsyncAttachmentClientStreaming: + def __init__(self, client: AsyncAttachmentClient) -> None: + def get(_: ontologies_models.AttachmentV2): ... + def read(_: bytes): ... + def upload(_: ontologies_models.AttachmentV2): ... + def upload_with_rid(_: ontologies_models.AttachmentV2): ... + + self.get = core.async_with_streaming_response(get, client.get) + self.read = core.async_with_streaming_response(read, client.read) + self.upload = core.async_with_streaming_response(upload, client.upload) + self.upload_with_rid = core.async_with_streaming_response( + upload_with_rid, client.upload_with_rid + ) diff --git a/foundry_sdk/v2/ontologies/attachment_property.py b/foundry_sdk/v2/ontologies/attachment_property.py new file mode 100644 index 000000000..950ca7aa4 --- /dev/null +++ b/foundry_sdk/v2/ontologies/attachment_property.py @@ -0,0 +1,651 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v2.ontologies import models as ontologies_models + + +class AttachmentPropertyClient: + """ + The API client for the AttachmentProperty Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AttachmentPropertyClientStreaming(self) + self.with_raw_response = _AttachmentPropertyClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get_attachment( + self, + ontology: ontologies_models.OntologyIdentifier, + object_type: ontologies_models.ObjectTypeApiName, + primary_key: ontologies_models.PropertyValueEscapedString, + property: ontologies_models.PropertyApiName, + *, + sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, + sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> ontologies_models.AttachmentMetadataResponse: + """ + Get the metadata of attachments parented to the given object. + + :param ontology: + :type ontology: OntologyIdentifier + :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. + :type object_type: ObjectTypeApiName + :param primary_key: The primary key of the object containing the attachment. + :type primary_key: PropertyValueEscapedString + :param property: The API name of the attachment property. To find the API name for your attachment, check the **Ontology Manager** or use the **Get object type** endpoint. + :type property: PropertyApiName + :param sdk_package_rid: The package rid of the generated SDK. + :type sdk_package_rid: Optional[SdkPackageRid] + :param sdk_version: The version of the generated SDK. + :type sdk_version: Optional[SdkVersion] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: ontologies_models.AttachmentMetadataResponse + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/attachments/{property}", + query_params={ + "sdkPackageRid": sdk_package_rid, + "sdkVersion": sdk_version, + }, + path_params={ + "ontology": ontology, + "objectType": object_type, + "primaryKey": primary_key, + "property": property, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.AttachmentMetadataResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get_attachment_by_rid( + self, + ontology: ontologies_models.OntologyIdentifier, + object_type: ontologies_models.ObjectTypeApiName, + primary_key: ontologies_models.PropertyValueEscapedString, + property: ontologies_models.PropertyApiName, + attachment_rid: ontologies_models.AttachmentRid, + *, + sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, + sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> ontologies_models.AttachmentV2: + """ + Get the metadata of a particular attachment in an attachment list. + + :param ontology: + :type ontology: OntologyIdentifier + :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. + :type object_type: ObjectTypeApiName + :param primary_key: The primary key of the object containing the attachment. + :type primary_key: PropertyValueEscapedString + :param property: The API name of the attachment property. To find the API name for your attachment, check the **Ontology Manager** or use the **Get object type** endpoint. + :type property: PropertyApiName + :param attachment_rid: The RID of the attachment. + :type attachment_rid: AttachmentRid + :param sdk_package_rid: The package rid of the generated SDK. + :type sdk_package_rid: Optional[SdkPackageRid] + :param sdk_version: The version of the generated SDK. + :type sdk_version: Optional[SdkVersion] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: ontologies_models.AttachmentV2 + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/attachments/{property}/{attachmentRid}", + query_params={ + "sdkPackageRid": sdk_package_rid, + "sdkVersion": sdk_version, + }, + path_params={ + "ontology": ontology, + "objectType": object_type, + "primaryKey": primary_key, + "property": property, + "attachmentRid": attachment_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.AttachmentV2, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def read_attachment( + self, + ontology: ontologies_models.OntologyIdentifier, + object_type: ontologies_models.ObjectTypeApiName, + primary_key: ontologies_models.PropertyValueEscapedString, + property: ontologies_models.PropertyApiName, + *, + sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, + sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> bytes: + """ + Get the content of an attachment. + + :param ontology: + :type ontology: OntologyIdentifier + :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. + :type object_type: ObjectTypeApiName + :param primary_key: The primary key of the object containing the attachment. + :type primary_key: PropertyValueEscapedString + :param property: The API name of the attachment property. To find the API name for your attachment, check the **Ontology Manager** or use the **Get object type** endpoint. + :type property: PropertyApiName + :param sdk_package_rid: The package rid of the generated SDK. + :type sdk_package_rid: Optional[SdkPackageRid] + :param sdk_version: The version of the generated SDK. + :type sdk_version: Optional[SdkVersion] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: bytes + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/attachments/{property}/content", + query_params={ + "sdkPackageRid": sdk_package_rid, + "sdkVersion": sdk_version, + }, + path_params={ + "ontology": ontology, + "objectType": object_type, + "primaryKey": primary_key, + "property": property, + }, + header_params={ + "Accept": "*/*", + }, + body=None, + response_type=bytes, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def read_attachment_by_rid( + self, + ontology: ontologies_models.OntologyIdentifier, + object_type: ontologies_models.ObjectTypeApiName, + primary_key: ontologies_models.PropertyValueEscapedString, + property: ontologies_models.PropertyApiName, + attachment_rid: ontologies_models.AttachmentRid, + *, + sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, + sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> bytes: + """ + Get the content of an attachment by its RID. + + The RID must exist in the attachment array of the property. + + :param ontology: + :type ontology: OntologyIdentifier + :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. + :type object_type: ObjectTypeApiName + :param primary_key: The primary key of the object containing the attachment. + :type primary_key: PropertyValueEscapedString + :param property: The API name of the attachment property. To find the API name for your attachment, check the **Ontology Manager** or use the **Get object type** endpoint. + :type property: PropertyApiName + :param attachment_rid: The RID of the attachment. + :type attachment_rid: AttachmentRid + :param sdk_package_rid: The package rid of the generated SDK. + :type sdk_package_rid: Optional[SdkPackageRid] + :param sdk_version: The version of the generated SDK. + :type sdk_version: Optional[SdkVersion] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: bytes + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/attachments/{property}/{attachmentRid}/content", + query_params={ + "sdkPackageRid": sdk_package_rid, + "sdkVersion": sdk_version, + }, + path_params={ + "ontology": ontology, + "objectType": object_type, + "primaryKey": primary_key, + "property": property, + "attachmentRid": attachment_rid, + }, + header_params={ + "Accept": "*/*", + }, + body=None, + response_type=bytes, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _AttachmentPropertyClientRaw: + def __init__(self, client: AttachmentPropertyClient) -> None: + def get_attachment(_: ontologies_models.AttachmentMetadataResponse): ... + def get_attachment_by_rid(_: ontologies_models.AttachmentV2): ... + def read_attachment(_: bytes): ... + def read_attachment_by_rid(_: bytes): ... + + self.get_attachment = core.with_raw_response(get_attachment, client.get_attachment) + self.get_attachment_by_rid = core.with_raw_response( + get_attachment_by_rid, client.get_attachment_by_rid + ) + self.read_attachment = core.with_raw_response(read_attachment, client.read_attachment) + self.read_attachment_by_rid = core.with_raw_response( + read_attachment_by_rid, client.read_attachment_by_rid + ) + + +class _AttachmentPropertyClientStreaming: + def __init__(self, client: AttachmentPropertyClient) -> None: + def get_attachment(_: ontologies_models.AttachmentMetadataResponse): ... + def get_attachment_by_rid(_: ontologies_models.AttachmentV2): ... + def read_attachment(_: bytes): ... + def read_attachment_by_rid(_: bytes): ... + + self.get_attachment = core.with_streaming_response(get_attachment, client.get_attachment) + self.get_attachment_by_rid = core.with_streaming_response( + get_attachment_by_rid, client.get_attachment_by_rid + ) + self.read_attachment = core.with_streaming_response(read_attachment, client.read_attachment) + self.read_attachment_by_rid = core.with_streaming_response( + read_attachment_by_rid, client.read_attachment_by_rid + ) + + +class AsyncAttachmentPropertyClient: + """ + The API client for the AttachmentProperty Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncAttachmentPropertyClientStreaming(self) + self.with_raw_response = _AsyncAttachmentPropertyClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get_attachment( + self, + ontology: ontologies_models.OntologyIdentifier, + object_type: ontologies_models.ObjectTypeApiName, + primary_key: ontologies_models.PropertyValueEscapedString, + property: ontologies_models.PropertyApiName, + *, + sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, + sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[ontologies_models.AttachmentMetadataResponse]: + """ + Get the metadata of attachments parented to the given object. + + :param ontology: + :type ontology: OntologyIdentifier + :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. + :type object_type: ObjectTypeApiName + :param primary_key: The primary key of the object containing the attachment. + :type primary_key: PropertyValueEscapedString + :param property: The API name of the attachment property. To find the API name for your attachment, check the **Ontology Manager** or use the **Get object type** endpoint. + :type property: PropertyApiName + :param sdk_package_rid: The package rid of the generated SDK. + :type sdk_package_rid: Optional[SdkPackageRid] + :param sdk_version: The version of the generated SDK. + :type sdk_version: Optional[SdkVersion] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[ontologies_models.AttachmentMetadataResponse] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/attachments/{property}", + query_params={ + "sdkPackageRid": sdk_package_rid, + "sdkVersion": sdk_version, + }, + path_params={ + "ontology": ontology, + "objectType": object_type, + "primaryKey": primary_key, + "property": property, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.AttachmentMetadataResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get_attachment_by_rid( + self, + ontology: ontologies_models.OntologyIdentifier, + object_type: ontologies_models.ObjectTypeApiName, + primary_key: ontologies_models.PropertyValueEscapedString, + property: ontologies_models.PropertyApiName, + attachment_rid: ontologies_models.AttachmentRid, + *, + sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, + sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[ontologies_models.AttachmentV2]: + """ + Get the metadata of a particular attachment in an attachment list. + + :param ontology: + :type ontology: OntologyIdentifier + :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. + :type object_type: ObjectTypeApiName + :param primary_key: The primary key of the object containing the attachment. + :type primary_key: PropertyValueEscapedString + :param property: The API name of the attachment property. To find the API name for your attachment, check the **Ontology Manager** or use the **Get object type** endpoint. + :type property: PropertyApiName + :param attachment_rid: The RID of the attachment. + :type attachment_rid: AttachmentRid + :param sdk_package_rid: The package rid of the generated SDK. + :type sdk_package_rid: Optional[SdkPackageRid] + :param sdk_version: The version of the generated SDK. + :type sdk_version: Optional[SdkVersion] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[ontologies_models.AttachmentV2] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/attachments/{property}/{attachmentRid}", + query_params={ + "sdkPackageRid": sdk_package_rid, + "sdkVersion": sdk_version, + }, + path_params={ + "ontology": ontology, + "objectType": object_type, + "primaryKey": primary_key, + "property": property, + "attachmentRid": attachment_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.AttachmentV2, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def read_attachment( + self, + ontology: ontologies_models.OntologyIdentifier, + object_type: ontologies_models.ObjectTypeApiName, + primary_key: ontologies_models.PropertyValueEscapedString, + property: ontologies_models.PropertyApiName, + *, + sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, + sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[bytes]: + """ + Get the content of an attachment. + + :param ontology: + :type ontology: OntologyIdentifier + :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. + :type object_type: ObjectTypeApiName + :param primary_key: The primary key of the object containing the attachment. + :type primary_key: PropertyValueEscapedString + :param property: The API name of the attachment property. To find the API name for your attachment, check the **Ontology Manager** or use the **Get object type** endpoint. + :type property: PropertyApiName + :param sdk_package_rid: The package rid of the generated SDK. + :type sdk_package_rid: Optional[SdkPackageRid] + :param sdk_version: The version of the generated SDK. + :type sdk_version: Optional[SdkVersion] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[bytes] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/attachments/{property}/content", + query_params={ + "sdkPackageRid": sdk_package_rid, + "sdkVersion": sdk_version, + }, + path_params={ + "ontology": ontology, + "objectType": object_type, + "primaryKey": primary_key, + "property": property, + }, + header_params={ + "Accept": "*/*", + }, + body=None, + response_type=bytes, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def read_attachment_by_rid( + self, + ontology: ontologies_models.OntologyIdentifier, + object_type: ontologies_models.ObjectTypeApiName, + primary_key: ontologies_models.PropertyValueEscapedString, + property: ontologies_models.PropertyApiName, + attachment_rid: ontologies_models.AttachmentRid, + *, + sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, + sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[bytes]: + """ + Get the content of an attachment by its RID. + + The RID must exist in the attachment array of the property. + + :param ontology: + :type ontology: OntologyIdentifier + :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. + :type object_type: ObjectTypeApiName + :param primary_key: The primary key of the object containing the attachment. + :type primary_key: PropertyValueEscapedString + :param property: The API name of the attachment property. To find the API name for your attachment, check the **Ontology Manager** or use the **Get object type** endpoint. + :type property: PropertyApiName + :param attachment_rid: The RID of the attachment. + :type attachment_rid: AttachmentRid + :param sdk_package_rid: The package rid of the generated SDK. + :type sdk_package_rid: Optional[SdkPackageRid] + :param sdk_version: The version of the generated SDK. + :type sdk_version: Optional[SdkVersion] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[bytes] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/attachments/{property}/{attachmentRid}/content", + query_params={ + "sdkPackageRid": sdk_package_rid, + "sdkVersion": sdk_version, + }, + path_params={ + "ontology": ontology, + "objectType": object_type, + "primaryKey": primary_key, + "property": property, + "attachmentRid": attachment_rid, + }, + header_params={ + "Accept": "*/*", + }, + body=None, + response_type=bytes, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _AsyncAttachmentPropertyClientRaw: + def __init__(self, client: AsyncAttachmentPropertyClient) -> None: + def get_attachment(_: ontologies_models.AttachmentMetadataResponse): ... + def get_attachment_by_rid(_: ontologies_models.AttachmentV2): ... + def read_attachment(_: bytes): ... + def read_attachment_by_rid(_: bytes): ... + + self.get_attachment = core.async_with_raw_response(get_attachment, client.get_attachment) + self.get_attachment_by_rid = core.async_with_raw_response( + get_attachment_by_rid, client.get_attachment_by_rid + ) + self.read_attachment = core.async_with_raw_response(read_attachment, client.read_attachment) + self.read_attachment_by_rid = core.async_with_raw_response( + read_attachment_by_rid, client.read_attachment_by_rid + ) + + +class _AsyncAttachmentPropertyClientStreaming: + def __init__(self, client: AsyncAttachmentPropertyClient) -> None: + def get_attachment(_: ontologies_models.AttachmentMetadataResponse): ... + def get_attachment_by_rid(_: ontologies_models.AttachmentV2): ... + def read_attachment(_: bytes): ... + def read_attachment_by_rid(_: bytes): ... + + self.get_attachment = core.async_with_streaming_response( + get_attachment, client.get_attachment + ) + self.get_attachment_by_rid = core.async_with_streaming_response( + get_attachment_by_rid, client.get_attachment_by_rid + ) + self.read_attachment = core.async_with_streaming_response( + read_attachment, client.read_attachment + ) + self.read_attachment_by_rid = core.async_with_streaming_response( + read_attachment_by_rid, client.read_attachment_by_rid + ) diff --git a/foundry_sdk/v2/ontologies/cipher_text_property.py b/foundry_sdk/v2/ontologies/cipher_text_property.py new file mode 100644 index 000000000..1d9ae4201 --- /dev/null +++ b/foundry_sdk/v2/ontologies/cipher_text_property.py @@ -0,0 +1,203 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v2.ontologies import models as ontologies_models + + +class CipherTextPropertyClient: + """ + The API client for the CipherTextProperty Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _CipherTextPropertyClientStreaming(self) + self.with_raw_response = _CipherTextPropertyClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def decrypt( + self, + ontology: ontologies_models.OntologyIdentifier, + object_type: ontologies_models.ObjectTypeApiName, + primary_key: ontologies_models.PropertyValueEscapedString, + property: ontologies_models.PropertyApiName, + *, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> ontologies_models.DecryptionResult: + """ + Decrypt the value of a ciphertext property. + + :param ontology: + :type ontology: OntologyIdentifier + :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. + :type object_type: ObjectTypeApiName + :param primary_key: The primary key of the object with the CipherText property. + :type primary_key: PropertyValueEscapedString + :param property: The API name of the CipherText property. To find the API name for your CipherText property, check the **Ontology Manager** or use the **Get object type** endpoint. + :type property: PropertyApiName + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: ontologies_models.DecryptionResult + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/ciphertexts/{property}/decrypt", + query_params={}, + path_params={ + "ontology": ontology, + "objectType": object_type, + "primaryKey": primary_key, + "property": property, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.DecryptionResult, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _CipherTextPropertyClientRaw: + def __init__(self, client: CipherTextPropertyClient) -> None: + def decrypt(_: ontologies_models.DecryptionResult): ... + + self.decrypt = core.with_raw_response(decrypt, client.decrypt) + + +class _CipherTextPropertyClientStreaming: + def __init__(self, client: CipherTextPropertyClient) -> None: + def decrypt(_: ontologies_models.DecryptionResult): ... + + self.decrypt = core.with_streaming_response(decrypt, client.decrypt) + + +class AsyncCipherTextPropertyClient: + """ + The API client for the CipherTextProperty Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncCipherTextPropertyClientStreaming(self) + self.with_raw_response = _AsyncCipherTextPropertyClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def decrypt( + self, + ontology: ontologies_models.OntologyIdentifier, + object_type: ontologies_models.ObjectTypeApiName, + primary_key: ontologies_models.PropertyValueEscapedString, + property: ontologies_models.PropertyApiName, + *, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[ontologies_models.DecryptionResult]: + """ + Decrypt the value of a ciphertext property. + + :param ontology: + :type ontology: OntologyIdentifier + :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. + :type object_type: ObjectTypeApiName + :param primary_key: The primary key of the object with the CipherText property. + :type primary_key: PropertyValueEscapedString + :param property: The API name of the CipherText property. To find the API name for your CipherText property, check the **Ontology Manager** or use the **Get object type** endpoint. + :type property: PropertyApiName + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[ontologies_models.DecryptionResult] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/ciphertexts/{property}/decrypt", + query_params={}, + path_params={ + "ontology": ontology, + "objectType": object_type, + "primaryKey": primary_key, + "property": property, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.DecryptionResult, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _AsyncCipherTextPropertyClientRaw: + def __init__(self, client: AsyncCipherTextPropertyClient) -> None: + def decrypt(_: ontologies_models.DecryptionResult): ... + + self.decrypt = core.async_with_raw_response(decrypt, client.decrypt) + + +class _AsyncCipherTextPropertyClientStreaming: + def __init__(self, client: AsyncCipherTextPropertyClient) -> None: + def decrypt(_: ontologies_models.DecryptionResult): ... + + self.decrypt = core.async_with_streaming_response(decrypt, client.decrypt) diff --git a/foundry_sdk/v2/ontologies/errors.py b/foundry_sdk/v2/ontologies/errors.py new file mode 100644 index 000000000..41dbd739f --- /dev/null +++ b/foundry_sdk/v2/ontologies/errors.py @@ -0,0 +1,2482 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing +from dataclasses import dataclass + +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v2.ontologies import models as ontologies_models + + +class ActionContainsDuplicateEditsParameters(typing_extensions.TypedDict): + """The given action request has multiple edits on the same object.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class ActionContainsDuplicateEdits(errors.ConflictError): + name: typing.Literal["ActionContainsDuplicateEdits"] + parameters: ActionContainsDuplicateEditsParameters + error_instance_id: str + + +class ActionEditedPropertiesNotFoundParameters(typing_extensions.TypedDict): + """ + Actions attempted to edit properties that could not be found on the object type. + Please contact the Ontology administrator to resolve this issue. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class ActionEditedPropertiesNotFound(errors.BadRequestError): + name: typing.Literal["ActionEditedPropertiesNotFound"] + parameters: ActionEditedPropertiesNotFoundParameters + error_instance_id: str + + +class ActionEditsReadOnlyEntityParameters(typing_extensions.TypedDict): + """The given action request performs edits on a type that is read-only or does not allow edits.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + entityTypeRid: typing_extensions.NotRequired[ontologies_models.ObjectTypeRid] + + +@dataclass +class ActionEditsReadOnlyEntity(errors.BadRequestError): + name: typing.Literal["ActionEditsReadOnlyEntity"] + parameters: ActionEditsReadOnlyEntityParameters + error_instance_id: str + + +class ActionNotFoundParameters(typing_extensions.TypedDict): + """The action is not found, or the user does not have access to it.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + actionRid: ontologies_models.ActionRid + + +@dataclass +class ActionNotFound(errors.NotFoundError): + name: typing.Literal["ActionNotFound"] + parameters: ActionNotFoundParameters + error_instance_id: str + + +class ActionParameterInterfaceTypeNotFoundParameters(typing_extensions.TypedDict): + """The parameter references an interface type that could not be found, or the client token does not have access to it.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + parameterId: ontologies_models.ParameterId + + +@dataclass +class ActionParameterInterfaceTypeNotFound(errors.NotFoundError): + name: typing.Literal["ActionParameterInterfaceTypeNotFound"] + parameters: ActionParameterInterfaceTypeNotFoundParameters + error_instance_id: str + + +class ActionParameterObjectNotFoundParameters(typing_extensions.TypedDict): + """The parameter object reference or parameter default value is not found, or the client token does not have access to it.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + parameterId: ontologies_models.ParameterId + + +@dataclass +class ActionParameterObjectNotFound(errors.NotFoundError): + name: typing.Literal["ActionParameterObjectNotFound"] + parameters: ActionParameterObjectNotFoundParameters + error_instance_id: str + + +class ActionParameterObjectTypeNotFoundParameters(typing_extensions.TypedDict): + """The parameter references an object type that could not be found, or the client token does not have access to it.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + parameterId: ontologies_models.ParameterId + + +@dataclass +class ActionParameterObjectTypeNotFound(errors.NotFoundError): + name: typing.Literal["ActionParameterObjectTypeNotFound"] + parameters: ActionParameterObjectTypeNotFoundParameters + error_instance_id: str + + +class ActionTypeNotFoundParameters(typing_extensions.TypedDict): + """The action type is not found, or the user does not have access to it.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + actionType: typing_extensions.NotRequired[ontologies_models.ActionTypeApiName] + rid: typing_extensions.NotRequired[ontologies_models.ActionTypeRid] + + +@dataclass +class ActionTypeNotFound(errors.NotFoundError): + name: typing.Literal["ActionTypeNotFound"] + parameters: ActionTypeNotFoundParameters + error_instance_id: str + + +class ActionValidationFailedParameters(typing_extensions.TypedDict): + """ + The validation failed for the given action parameters. Please use the `validateAction` endpoint for more + details. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + actionType: ontologies_models.ActionTypeApiName + + +@dataclass +class ActionValidationFailed(errors.BadRequestError): + name: typing.Literal["ActionValidationFailed"] + parameters: ActionValidationFailedParameters + error_instance_id: str + + +class AggregationAccuracyNotSupportedParameters(typing_extensions.TypedDict): + """ + The given aggregation cannot be performed with the requested accuracy. + Try allowing approximate results or adjust your aggregation request. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class AggregationAccuracyNotSupported(errors.BadRequestError): + name: typing.Literal["AggregationAccuracyNotSupported"] + parameters: AggregationAccuracyNotSupportedParameters + error_instance_id: str + + +class AggregationGroupCountExceededLimitParameters(typing_extensions.TypedDict): + """ + The number of groups in the aggregations grouping exceeded the allowed limit. This can typically be fixed by + adjusting your query to reduce the number of groups created by your aggregation. For instance: + - If you are using multiple `groupBy` clauses, try reducing the number of clauses. + - If you are using a `groupBy` clause with a high cardinality property, try filtering the data first + to reduce the number of groups. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + groupsCount: typing_extensions.NotRequired[int] + groupsLimit: typing_extensions.NotRequired[int] + + +@dataclass +class AggregationGroupCountExceededLimit(errors.BadRequestError): + name: typing.Literal["AggregationGroupCountExceededLimit"] + parameters: AggregationGroupCountExceededLimitParameters + error_instance_id: str + + +class AggregationMemoryExceededLimitParameters(typing_extensions.TypedDict): + """ + The amount of memory used in the request exceeded the limit. This can typically be fixed by + adjusting your query to reduce the number of groups created by your aggregation. For instance: + - If you are using multiple `groupBy` clauses, try reducing the number of clauses. + - If you are using a `groupBy` clause with a high cardinality property, try filtering the data first + to reduce the number of groups. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + memoryUsedBytes: typing_extensions.NotRequired[str] + memoryLimitBytes: str + + +@dataclass +class AggregationMemoryExceededLimit(errors.BadRequestError): + name: typing.Literal["AggregationMemoryExceededLimit"] + parameters: AggregationMemoryExceededLimitParameters + error_instance_id: str + + +class AggregationNestedObjectSetSizeExceededLimitParameters(typing_extensions.TypedDict): + """ + A nested object set within the aggregation exceeded the allowed limit. + This can be fixed by aggregating over fewer objects, such as by applying a filter. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + objectsCount: int + objectsLimit: int + + +@dataclass +class AggregationNestedObjectSetSizeExceededLimit(errors.BadRequestError): + name: typing.Literal["AggregationNestedObjectSetSizeExceededLimit"] + parameters: AggregationNestedObjectSetSizeExceededLimitParameters + error_instance_id: str + + +class ApplyActionFailedParameters(typing_extensions.TypedDict): + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class ApplyActionFailed(errors.BadRequestError): + name: typing.Literal["ApplyActionFailed"] + parameters: ApplyActionFailedParameters + error_instance_id: str + + +class AttachmentNotFoundParameters(typing_extensions.TypedDict): + """ + The requested attachment is not found, or the client token does not have access to it. + Attachments that are not attached to any objects are deleted after two weeks. + Attachments that have not been attached to an object can only be viewed by the user who uploaded them. + Attachments that have been attached to an object can be viewed by users who can view the object. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + attachmentRid: typing_extensions.NotRequired[ontologies_models.AttachmentRid] + + +@dataclass +class AttachmentNotFound(errors.NotFoundError): + name: typing.Literal["AttachmentNotFound"] + parameters: AttachmentNotFoundParameters + error_instance_id: str + + +class AttachmentRidAlreadyExistsParameters(typing_extensions.TypedDict): + """The provided attachment RID already exists and cannot be overwritten.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + attachmentRid: ontologies_models.AttachmentRid + + +@dataclass +class AttachmentRidAlreadyExists(errors.NotFoundError): + name: typing.Literal["AttachmentRidAlreadyExists"] + parameters: AttachmentRidAlreadyExistsParameters + error_instance_id: str + + +class AttachmentSizeExceededLimitParameters(typing_extensions.TypedDict): + """ + The file is too large to be uploaded as an attachment. + The maximum attachment size is 200MB. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + fileSizeBytes: str + fileLimitBytes: str + + +@dataclass +class AttachmentSizeExceededLimit(errors.BadRequestError): + name: typing.Literal["AttachmentSizeExceededLimit"] + parameters: AttachmentSizeExceededLimitParameters + error_instance_id: str + + +class CipherChannelNotFoundParameters(typing_extensions.TypedDict): + """ + The Cipher Channel was not found. + It either does not exist, or you do not have permission to see it. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + cipherChannel: core.RID + + +@dataclass +class CipherChannelNotFound(errors.NotFoundError): + name: typing.Literal["CipherChannelNotFound"] + parameters: CipherChannelNotFoundParameters + error_instance_id: str + + +class CompositePrimaryKeyNotSupportedParameters(typing_extensions.TypedDict): + """ + Primary keys consisting of multiple properties are not supported by this API. If you need support for this, + please reach out to Palantir Support. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + objectType: ontologies_models.ObjectTypeApiName + primaryKey: typing.List[ontologies_models.PropertyApiName] + + +@dataclass +class CompositePrimaryKeyNotSupported(errors.BadRequestError): + name: typing.Literal["CompositePrimaryKeyNotSupported"] + parameters: CompositePrimaryKeyNotSupportedParameters + error_instance_id: str + + +class ConsistentSnapshotErrorParameters(typing_extensions.TypedDict): + """ + An Ontology objects read failed because the Ontology snapshot snapshot used for consistent reads became + stale. Retrying the request typically resolves this. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class ConsistentSnapshotError(errors.ConflictError): + name: typing.Literal["ConsistentSnapshotError"] + parameters: ConsistentSnapshotErrorParameters + error_instance_id: str + + +class DefaultAndNullGroupsNotSupportedParameters(typing_extensions.TypedDict): + """Exact match groupBy clause cannot specify a default value and allow null values.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class DefaultAndNullGroupsNotSupported(errors.BadRequestError): + name: typing.Literal["DefaultAndNullGroupsNotSupported"] + parameters: DefaultAndNullGroupsNotSupportedParameters + error_instance_id: str + + +class DerivedPropertyApiNamesNotUniqueParameters(typing_extensions.TypedDict): + """At least one of the requested derived property API names already exist on the object set.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + derivedPropertyApiNames: typing.List[ontologies_models.DerivedPropertyApiName] + + +@dataclass +class DerivedPropertyApiNamesNotUnique(errors.BadRequestError): + name: typing.Literal["DerivedPropertyApiNamesNotUnique"] + parameters: DerivedPropertyApiNamesNotUniqueParameters + error_instance_id: str + + +class DuplicateOrderByParameters(typing_extensions.TypedDict): + """The requested sort order includes duplicate properties.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + properties: typing.List[ontologies_models.PropertyApiName] + + +@dataclass +class DuplicateOrderBy(errors.BadRequestError): + name: typing.Literal["DuplicateOrderBy"] + parameters: DuplicateOrderByParameters + error_instance_id: str + + +class EditObjectPermissionDeniedParameters(typing_extensions.TypedDict): + """The user does not have permission to edit this `ObjectType`.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class EditObjectPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["EditObjectPermissionDenied"] + parameters: EditObjectPermissionDeniedParameters + error_instance_id: str + + +class FunctionEncounteredUserFacingErrorParameters(typing_extensions.TypedDict): + """ + The authored function failed to execute because of a user induced error. The message argument + is meant to be displayed to the user. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + functionRid: ontologies_models.FunctionRid + functionVersion: ontologies_models.FunctionVersion + message: str + + +@dataclass +class FunctionEncounteredUserFacingError(errors.BadRequestError): + name: typing.Literal["FunctionEncounteredUserFacingError"] + parameters: FunctionEncounteredUserFacingErrorParameters + error_instance_id: str + + +class FunctionExecutionFailedParameters(typing_extensions.TypedDict): + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + functionRid: ontologies_models.FunctionRid + functionVersion: ontologies_models.FunctionVersion + message: typing_extensions.NotRequired[str] + stacktrace: typing_extensions.NotRequired[str] + + +@dataclass +class FunctionExecutionFailed(errors.BadRequestError): + name: typing.Literal["FunctionExecutionFailed"] + parameters: FunctionExecutionFailedParameters + error_instance_id: str + + +class FunctionExecutionTimedOutParameters(typing_extensions.TypedDict): + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + functionRid: ontologies_models.FunctionRid + functionVersion: ontologies_models.FunctionVersion + + +@dataclass +class FunctionExecutionTimedOut(errors.InternalServerError): + name: typing.Literal["FunctionExecutionTimedOut"] + parameters: FunctionExecutionTimedOutParameters + error_instance_id: str + + +class FunctionInvalidInputParameters(typing_extensions.TypedDict): + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + functionRid: ontologies_models.FunctionRid + functionVersion: ontologies_models.FunctionVersion + + +@dataclass +class FunctionInvalidInput(errors.BadRequestError): + name: typing.Literal["FunctionInvalidInput"] + parameters: FunctionInvalidInputParameters + error_instance_id: str + + +class HighScaleComputationNotEnabledParameters(typing_extensions.TypedDict): + """High-scale compute was required for this Ontology query but is not enabled on this enrollment.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class HighScaleComputationNotEnabled(errors.InternalServerError): + name: typing.Literal["HighScaleComputationNotEnabled"] + parameters: HighScaleComputationNotEnabledParameters + error_instance_id: str + + +class InterfaceBasedObjectSetNotSupportedParameters(typing_extensions.TypedDict): + """The requested object set type is not supported for interface-based object sets.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class InterfaceBasedObjectSetNotSupported(errors.BadRequestError): + name: typing.Literal["InterfaceBasedObjectSetNotSupported"] + parameters: InterfaceBasedObjectSetNotSupportedParameters + error_instance_id: str + + +class InterfaceLinkTypeNotFoundParameters(typing_extensions.TypedDict): + """The requested interface link type is not found, or the client token does not have access to it.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + interfaceTypeApiName: typing_extensions.NotRequired[ontologies_models.InterfaceTypeApiName] + interfaceTypeRid: typing_extensions.NotRequired[ontologies_models.InterfaceTypeRid] + interfaceLinkTypeApiName: typing_extensions.NotRequired[ + ontologies_models.InterfaceLinkTypeApiName + ] + interfaceLinkTypeRid: typing_extensions.NotRequired[ontologies_models.InterfaceLinkTypeRid] + + +@dataclass +class InterfaceLinkTypeNotFound(errors.NotFoundError): + name: typing.Literal["InterfaceLinkTypeNotFound"] + parameters: InterfaceLinkTypeNotFoundParameters + error_instance_id: str + + +class InterfacePropertiesHaveDifferentIdsParameters(typing_extensions.TypedDict): + """Properties used in ordering must have the same ids.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + properties: typing.List[ontologies_models.InterfacePropertyApiName] + + +@dataclass +class InterfacePropertiesHaveDifferentIds(errors.BadRequestError): + name: typing.Literal["InterfacePropertiesHaveDifferentIds"] + parameters: InterfacePropertiesHaveDifferentIdsParameters + error_instance_id: str + + +class InterfacePropertiesNotFoundParameters(typing_extensions.TypedDict): + """The requested interface property types are not present on every object type.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + objectType: typing.List[ontologies_models.ObjectTypeApiName] + missingInterfaceProperties: typing.List[ontologies_models.InterfacePropertyApiName] + + +@dataclass +class InterfacePropertiesNotFound(errors.NotFoundError): + name: typing.Literal["InterfacePropertiesNotFound"] + parameters: InterfacePropertiesNotFoundParameters + error_instance_id: str + + +class InterfacePropertyNotFoundParameters(typing_extensions.TypedDict): + """The requested interface property was not found on the interface type.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + interfaceType: ontologies_models.InterfaceTypeApiName + interfaceProperty: ontologies_models.InterfacePropertyApiName + + +@dataclass +class InterfacePropertyNotFound(errors.NotFoundError): + name: typing.Literal["InterfacePropertyNotFound"] + parameters: InterfacePropertyNotFoundParameters + error_instance_id: str + + +class InterfaceTypeNotFoundParameters(typing_extensions.TypedDict): + """The requested interface type is not found, or the client token does not have access to it.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + apiName: typing_extensions.NotRequired[ontologies_models.InterfaceTypeApiName] + rid: typing_extensions.NotRequired[ontologies_models.InterfaceTypeRid] + + +@dataclass +class InterfaceTypeNotFound(errors.NotFoundError): + name: typing.Literal["InterfaceTypeNotFound"] + parameters: InterfaceTypeNotFoundParameters + error_instance_id: str + + +class InterfaceTypesNotFoundParameters(typing_extensions.TypedDict): + """The requested interface types were not found, or the client token does not have access to it.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + apiName: typing.List[ontologies_models.InterfaceTypeApiName] + rid: typing.List[ontologies_models.InterfaceTypeRid] + + +@dataclass +class InterfaceTypesNotFound(errors.NotFoundError): + name: typing.Literal["InterfaceTypesNotFound"] + parameters: InterfaceTypesNotFoundParameters + error_instance_id: str + + +class InvalidAggregationOrderingParameters(typing_extensions.TypedDict): + """Aggregation ordering can only be applied to metrics with exactly one groupBy clause.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class InvalidAggregationOrdering(errors.BadRequestError): + name: typing.Literal["InvalidAggregationOrdering"] + parameters: InvalidAggregationOrderingParameters + error_instance_id: str + + +class InvalidAggregationOrderingWithNullValuesParameters(typing_extensions.TypedDict): + """Aggregation ordering cannot be applied for groupBy clauses that allow null values.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class InvalidAggregationOrderingWithNullValues(errors.BadRequestError): + name: typing.Literal["InvalidAggregationOrderingWithNullValues"] + parameters: InvalidAggregationOrderingWithNullValuesParameters + error_instance_id: str + + +class InvalidAggregationRangeParameters(typing_extensions.TypedDict): + """Aggregation range should include one lt or lte and one gt or gte.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class InvalidAggregationRange(errors.BadRequestError): + name: typing.Literal["InvalidAggregationRange"] + parameters: InvalidAggregationRangeParameters + error_instance_id: str + + +class InvalidAggregationRangePropertyTypeParameters(typing_extensions.TypedDict): + """Range group by is not supported by property type.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + property: ontologies_models.PropertyApiName + objectType: ontologies_models.ObjectTypeApiName + propertyBaseType: ontologies_models.ValueType + + +@dataclass +class InvalidAggregationRangePropertyType(errors.BadRequestError): + name: typing.Literal["InvalidAggregationRangePropertyType"] + parameters: InvalidAggregationRangePropertyTypeParameters + error_instance_id: str + + +class InvalidAggregationRangePropertyTypeForInterfaceParameters(typing_extensions.TypedDict): + """Range group by is not supported by interface property type.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + interfaceProperty: ontologies_models.InterfacePropertyApiName + interfaceType: ontologies_models.InterfaceTypeApiName + propertyBaseType: ontologies_models.ValueType + + +@dataclass +class InvalidAggregationRangePropertyTypeForInterface(errors.BadRequestError): + name: typing.Literal["InvalidAggregationRangePropertyTypeForInterface"] + parameters: InvalidAggregationRangePropertyTypeForInterfaceParameters + error_instance_id: str + + +class InvalidAggregationRangeValueParameters(typing_extensions.TypedDict): + """Aggregation value does not conform to the expected underlying type.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + property: ontologies_models.PropertyApiName + objectType: ontologies_models.ObjectTypeApiName + propertyBaseType: ontologies_models.ValueType + + +@dataclass +class InvalidAggregationRangeValue(errors.BadRequestError): + name: typing.Literal["InvalidAggregationRangeValue"] + parameters: InvalidAggregationRangeValueParameters + error_instance_id: str + + +class InvalidAggregationRangeValueForInterfaceParameters(typing_extensions.TypedDict): + """Aggregation value does not conform to the expected underlying type.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + interfaceProperty: ontologies_models.InterfacePropertyApiName + interfaceType: ontologies_models.InterfaceTypeApiName + propertyBaseType: ontologies_models.ValueType + + +@dataclass +class InvalidAggregationRangeValueForInterface(errors.BadRequestError): + name: typing.Literal["InvalidAggregationRangeValueForInterface"] + parameters: InvalidAggregationRangeValueForInterfaceParameters + error_instance_id: str + + +class InvalidApplyActionOptionCombinationParameters(typing_extensions.TypedDict): + """The given options are individually valid but cannot be used in the given combination.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + invalidCombination: typing_extensions.NotRequired[ontologies_models.ApplyActionRequestOptions] + + +@dataclass +class InvalidApplyActionOptionCombination(errors.BadRequestError): + name: typing.Literal["InvalidApplyActionOptionCombination"] + parameters: InvalidApplyActionOptionCombinationParameters + error_instance_id: str + + +class InvalidContentLengthParameters(typing_extensions.TypedDict): + """A `Content-Length` header is required for all uploads, but was missing or invalid.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class InvalidContentLength(errors.BadRequestError): + name: typing.Literal["InvalidContentLength"] + parameters: InvalidContentLengthParameters + error_instance_id: str + + +class InvalidContentTypeParameters(typing_extensions.TypedDict): + """ + The `Content-Type` cannot be inferred from the request content and filename. + Please check your request content and filename to ensure they are compatible. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class InvalidContentType(errors.BadRequestError): + name: typing.Literal["InvalidContentType"] + parameters: InvalidContentTypeParameters + error_instance_id: str + + +class InvalidDerivedPropertyDefinitionParameters(typing_extensions.TypedDict): + """Derived property definition was invalid due to shape of query or type checking.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + objectType: ontologies_models.ObjectTypeApiName + derivedProperty: ontologies_models.DerivedPropertyApiName + + +@dataclass +class InvalidDerivedPropertyDefinition(errors.BadRequestError): + name: typing.Literal["InvalidDerivedPropertyDefinition"] + parameters: InvalidDerivedPropertyDefinitionParameters + error_instance_id: str + + +class InvalidDurationGroupByPropertyTypeParameters(typing_extensions.TypedDict): + """Invalid property type for duration groupBy.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + property: ontologies_models.PropertyApiName + objectType: ontologies_models.ObjectTypeApiName + propertyBaseType: ontologies_models.ValueType + + +@dataclass +class InvalidDurationGroupByPropertyType(errors.BadRequestError): + name: typing.Literal["InvalidDurationGroupByPropertyType"] + parameters: InvalidDurationGroupByPropertyTypeParameters + error_instance_id: str + + +class InvalidDurationGroupByPropertyTypeForInterfaceParameters(typing_extensions.TypedDict): + """Invalid interface property type for duration groupBy.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + interfaceProperty: ontologies_models.InterfacePropertyApiName + interfaceType: ontologies_models.InterfaceTypeApiName + propertyBaseType: ontologies_models.ValueType + + +@dataclass +class InvalidDurationGroupByPropertyTypeForInterface(errors.BadRequestError): + name: typing.Literal["InvalidDurationGroupByPropertyTypeForInterface"] + parameters: InvalidDurationGroupByPropertyTypeForInterfaceParameters + error_instance_id: str + + +class InvalidDurationGroupByValueParameters(typing_extensions.TypedDict): + """ + Duration groupBy value is invalid. Units larger than day must have value `1` and date properties do not support + filtering on units smaller than day. As examples, neither bucketing by every two weeks nor bucketing a date by + every two hours are allowed. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class InvalidDurationGroupByValue(errors.BadRequestError): + name: typing.Literal["InvalidDurationGroupByValue"] + parameters: InvalidDurationGroupByValueParameters + error_instance_id: str + + +class InvalidFieldsParameters(typing_extensions.TypedDict): + """ + The value of the given field does not match the expected pattern. For example, an Ontology object property `id` + should be written `properties.id`. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + properties: typing.List[str] + + +@dataclass +class InvalidFields(errors.BadRequestError): + name: typing.Literal["InvalidFields"] + parameters: InvalidFieldsParameters + error_instance_id: str + + +class InvalidGroupIdParameters(typing_extensions.TypedDict): + """The provided value for a group id must be a UUID.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + groupId: str + + +@dataclass +class InvalidGroupId(errors.BadRequestError): + name: typing.Literal["InvalidGroupId"] + parameters: InvalidGroupIdParameters + error_instance_id: str + + +class InvalidOrderTypeParameters(typing_extensions.TypedDict): + """This query type does not support the provided order type""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + orderType: typing_extensions.NotRequired[ontologies_models.SearchOrderByType] + + +@dataclass +class InvalidOrderType(errors.BadRequestError): + name: typing.Literal["InvalidOrderType"] + parameters: InvalidOrderTypeParameters + error_instance_id: str + + +class InvalidParameterValueParameters(typing_extensions.TypedDict): + """ + The value of the given parameter is invalid. See the documentation of `DataValue` for details on + how parameters are represented. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + parameterBaseType: typing_extensions.NotRequired[ontologies_models.ValueType] + parameterDataType: typing_extensions.NotRequired[ontologies_models.OntologyDataType] + parameterId: ontologies_models.ParameterId + parameterValue: typing_extensions.NotRequired[ontologies_models.DataValue] + + +@dataclass +class InvalidParameterValue(errors.BadRequestError): + name: typing.Literal["InvalidParameterValue"] + parameters: InvalidParameterValueParameters + error_instance_id: str + + +class InvalidPropertyFilterValueParameters(typing_extensions.TypedDict): + """ + The value of the given property filter is invalid. For instance, 2 is an invalid value for + `isNull` in `properties.address.isNull=2` because the `isNull` filter expects a value of boolean type. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + expectedType: ontologies_models.ValueType + propertyFilter: ontologies_models.PropertyFilter + propertyFilterValue: ontologies_models.FilterValue + property: ontologies_models.PropertyApiName + + +@dataclass +class InvalidPropertyFilterValue(errors.BadRequestError): + name: typing.Literal["InvalidPropertyFilterValue"] + parameters: InvalidPropertyFilterValueParameters + error_instance_id: str + + +class InvalidPropertyFiltersCombinationParameters(typing_extensions.TypedDict): + """The provided filters cannot be used together.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + propertyFilters: typing.List[ontologies_models.PropertyFilter] + property: ontologies_models.PropertyApiName + + +@dataclass +class InvalidPropertyFiltersCombination(errors.BadRequestError): + name: typing.Literal["InvalidPropertyFiltersCombination"] + parameters: InvalidPropertyFiltersCombinationParameters + error_instance_id: str + + +class InvalidPropertyTypeParameters(typing_extensions.TypedDict): + """The given property type is not of the expected type.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + propertyBaseType: ontologies_models.ValueType + property: ontologies_models.PropertyApiName + + +@dataclass +class InvalidPropertyType(errors.BadRequestError): + name: typing.Literal["InvalidPropertyType"] + parameters: InvalidPropertyTypeParameters + error_instance_id: str + + +class InvalidPropertyValueParameters(typing_extensions.TypedDict): + """ + The value of the given property is invalid. See the documentation of `PropertyValue` for details on + how properties are represented. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + propertyBaseType: ontologies_models.ValueType + property: ontologies_models.PropertyApiName + propertyValue: ontologies_models.PropertyValue + + +@dataclass +class InvalidPropertyValue(errors.BadRequestError): + name: typing.Literal["InvalidPropertyValue"] + parameters: InvalidPropertyValueParameters + error_instance_id: str + + +class InvalidQueryOutputValueParameters(typing_extensions.TypedDict): + """ + The value of the query's output is invalid. This may be because the return value did not match the specified + output type or constraints. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + outputDataType: ontologies_models.QueryDataType + outputValue: typing_extensions.NotRequired[ontologies_models.DataValue] + functionRid: ontologies_models.FunctionRid + functionVersion: ontologies_models.FunctionVersion + + +@dataclass +class InvalidQueryOutputValue(errors.BadRequestError): + name: typing.Literal["InvalidQueryOutputValue"] + parameters: InvalidQueryOutputValueParameters + error_instance_id: str + + +class InvalidQueryParameterValueParameters(typing_extensions.TypedDict): + """ + The value of the given parameter is invalid. See the documentation of `DataValue` for details on + how parameters are represented. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + parameterDataType: ontologies_models.QueryDataType + parameterId: ontologies_models.ParameterId + parameterValue: typing_extensions.NotRequired[ontologies_models.DataValue] + + +@dataclass +class InvalidQueryParameterValue(errors.BadRequestError): + name: typing.Literal["InvalidQueryParameterValue"] + parameters: InvalidQueryParameterValueParameters + error_instance_id: str + + +class InvalidRangeQueryParameters(typing_extensions.TypedDict): + """The specified query range filter is invalid.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + lt: typing_extensions.NotRequired[typing.Any] + """Less than""" + + gt: typing_extensions.NotRequired[typing.Any] + """Greater than""" + + lte: typing_extensions.NotRequired[typing.Any] + """Less than or equal""" + + gte: typing_extensions.NotRequired[typing.Any] + """Greater than or equal""" + + field: str + + +@dataclass +class InvalidRangeQuery(errors.BadRequestError): + name: typing.Literal["InvalidRangeQuery"] + parameters: InvalidRangeQueryParameters + error_instance_id: str + + +class InvalidSortOrderParameters(typing_extensions.TypedDict): + """ + The requested sort order of one or more properties is invalid. Valid sort orders are 'asc' or 'desc'. Sort + order can also be omitted, and defaults to 'asc'. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + invalidSortOrder: str + + +@dataclass +class InvalidSortOrder(errors.BadRequestError): + name: typing.Literal["InvalidSortOrder"] + parameters: InvalidSortOrderParameters + error_instance_id: str + + +class InvalidSortTypeParameters(typing_extensions.TypedDict): + """The requested sort type of one or more clauses is invalid. Valid sort types are 'p' or 'properties'.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + invalidSortType: str + + +@dataclass +class InvalidSortType(errors.BadRequestError): + name: typing.Literal["InvalidSortType"] + parameters: InvalidSortTypeParameters + error_instance_id: str + + +class InvalidTransactionEditPropertyValueParameters(typing_extensions.TypedDict): + """ + The value of the given property is invalid. See the documentation of `DataValue` for details on + how properties are represented for transaction edits. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + propertyApiName: ontologies_models.PropertyApiName + propertyBaseType: ontologies_models.ValueType + propertyValue: ontologies_models.DataValue + + +@dataclass +class InvalidTransactionEditPropertyValue(errors.BadRequestError): + name: typing.Literal["InvalidTransactionEditPropertyValue"] + parameters: InvalidTransactionEditPropertyValueParameters + error_instance_id: str + + +class InvalidUserIdParameters(typing_extensions.TypedDict): + """The provided value for a user id must be a UUID.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + userId: str + + +@dataclass +class InvalidUserId(errors.BadRequestError): + name: typing.Literal["InvalidUserId"] + parameters: InvalidUserIdParameters + error_instance_id: str + + +class InvalidVectorDimensionParameters(typing_extensions.TypedDict): + """The dimensions of the provided vector don't match the dimensions of the embedding model being queried.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + expectedSize: int + providedSize: int + + +@dataclass +class InvalidVectorDimension(errors.BadRequestError): + name: typing.Literal["InvalidVectorDimension"] + parameters: InvalidVectorDimensionParameters + error_instance_id: str + + +class LinkAlreadyExistsParameters(typing_extensions.TypedDict): + """The link the user is attempting to create already exists.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class LinkAlreadyExists(errors.ConflictError): + name: typing.Literal["LinkAlreadyExists"] + parameters: LinkAlreadyExistsParameters + error_instance_id: str + + +class LinkTypeNotFoundParameters(typing_extensions.TypedDict): + """The link type is not found, or the user does not have access to it.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + objectType: typing_extensions.NotRequired[ontologies_models.ObjectTypeApiName] + linkType: typing_extensions.NotRequired[ontologies_models.LinkTypeApiName] + linkTypeId: typing_extensions.NotRequired[ontologies_models.LinkTypeId] + + +@dataclass +class LinkTypeNotFound(errors.NotFoundError): + name: typing.Literal["LinkTypeNotFound"] + parameters: LinkTypeNotFoundParameters + error_instance_id: str + + +class LinkedObjectNotFoundParameters(typing_extensions.TypedDict): + """The linked object with the given primary key is not found, or the user does not have access to it.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + linkType: ontologies_models.LinkTypeApiName + linkedObjectType: ontologies_models.ObjectTypeApiName + linkedObjectPrimaryKey: typing.Dict[ + ontologies_models.PropertyApiName, ontologies_models.PrimaryKeyValue + ] + + +@dataclass +class LinkedObjectNotFound(errors.NotFoundError): + name: typing.Literal["LinkedObjectNotFound"] + parameters: LinkedObjectNotFoundParameters + error_instance_id: str + + +class LoadObjectSetLinksNotSupportedParameters(typing_extensions.TypedDict): + """Bulk loading object set links is not supported by Object Storage v1.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class LoadObjectSetLinksNotSupported(errors.InternalServerError): + name: typing.Literal["LoadObjectSetLinksNotSupported"] + parameters: LoadObjectSetLinksNotSupportedParameters + error_instance_id: str + + +class MalformedPropertyFiltersParameters(typing_extensions.TypedDict): + """At least one of requested filters are malformed. Please look at the documentation of `PropertyFilter`.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + malformedPropertyFilter: str + + +@dataclass +class MalformedPropertyFilters(errors.BadRequestError): + name: typing.Literal["MalformedPropertyFilters"] + parameters: MalformedPropertyFiltersParameters + error_instance_id: str + + +class MarketplaceActionMappingNotFoundParameters(typing_extensions.TypedDict): + """The given action could not be mapped to a Marketplace installation.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + actionType: ontologies_models.ActionTypeApiName + artifactRepository: ontologies_models.ArtifactRepositoryRid + packageName: ontologies_models.SdkPackageName + + +@dataclass +class MarketplaceActionMappingNotFound(errors.NotFoundError): + name: typing.Literal["MarketplaceActionMappingNotFound"] + parameters: MarketplaceActionMappingNotFoundParameters + error_instance_id: str + + +class MarketplaceInstallationNotFoundParameters(typing_extensions.TypedDict): + """The given marketplace installation could not be found or the user does not have access to it.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + artifactRepository: ontologies_models.ArtifactRepositoryRid + packageName: ontologies_models.SdkPackageName + + +@dataclass +class MarketplaceInstallationNotFound(errors.NotFoundError): + name: typing.Literal["MarketplaceInstallationNotFound"] + parameters: MarketplaceInstallationNotFoundParameters + error_instance_id: str + + +class MarketplaceLinkMappingNotFoundParameters(typing_extensions.TypedDict): + """The given link could not be mapped to a Marketplace installation.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + linkType: ontologies_models.LinkTypeApiName + artifactRepository: ontologies_models.ArtifactRepositoryRid + packageName: ontologies_models.SdkPackageName + + +@dataclass +class MarketplaceLinkMappingNotFound(errors.NotFoundError): + name: typing.Literal["MarketplaceLinkMappingNotFound"] + parameters: MarketplaceLinkMappingNotFoundParameters + error_instance_id: str + + +class MarketplaceObjectMappingNotFoundParameters(typing_extensions.TypedDict): + """The given object could not be mapped to a Marketplace installation.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + objectType: ontologies_models.ObjectTypeApiName + artifactRepository: ontologies_models.ArtifactRepositoryRid + packageName: ontologies_models.SdkPackageName + + +@dataclass +class MarketplaceObjectMappingNotFound(errors.NotFoundError): + name: typing.Literal["MarketplaceObjectMappingNotFound"] + parameters: MarketplaceObjectMappingNotFoundParameters + error_instance_id: str + + +class MarketplaceQueryMappingNotFoundParameters(typing_extensions.TypedDict): + """The given query could not be mapped to a Marketplace installation.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + queryType: ontologies_models.QueryApiName + artifactRepository: ontologies_models.ArtifactRepositoryRid + packageName: ontologies_models.SdkPackageName + + +@dataclass +class MarketplaceQueryMappingNotFound(errors.NotFoundError): + name: typing.Literal["MarketplaceQueryMappingNotFound"] + parameters: MarketplaceQueryMappingNotFoundParameters + error_instance_id: str + + +class MarketplaceSdkActionMappingNotFoundParameters(typing_extensions.TypedDict): + """The given action could not be mapped to a Marketplace installation.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + actionType: ontologies_models.ActionTypeApiName + sdkPackageRid: ontologies_models.SdkPackageRid + sdkVersion: ontologies_models.SdkVersion + + +@dataclass +class MarketplaceSdkActionMappingNotFound(errors.NotFoundError): + name: typing.Literal["MarketplaceSdkActionMappingNotFound"] + parameters: MarketplaceSdkActionMappingNotFoundParameters + error_instance_id: str + + +class MarketplaceSdkInstallationNotFoundParameters(typing_extensions.TypedDict): + """The given marketplace installation could not be found or the user does not have access to it.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + sdkPackageRid: ontologies_models.SdkPackageRid + sdkVersion: ontologies_models.SdkVersion + + +@dataclass +class MarketplaceSdkInstallationNotFound(errors.NotFoundError): + name: typing.Literal["MarketplaceSdkInstallationNotFound"] + parameters: MarketplaceSdkInstallationNotFoundParameters + error_instance_id: str + + +class MarketplaceSdkLinkMappingNotFoundParameters(typing_extensions.TypedDict): + """The given link could not be mapped to a Marketplace installation.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + linkType: ontologies_models.LinkTypeApiName + sdkPackageRid: ontologies_models.SdkPackageRid + sdkVersion: ontologies_models.SdkVersion + + +@dataclass +class MarketplaceSdkLinkMappingNotFound(errors.NotFoundError): + name: typing.Literal["MarketplaceSdkLinkMappingNotFound"] + parameters: MarketplaceSdkLinkMappingNotFoundParameters + error_instance_id: str + + +class MarketplaceSdkObjectMappingNotFoundParameters(typing_extensions.TypedDict): + """The given object could not be mapped to a Marketplace installation.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + localObjectType: typing_extensions.NotRequired[ontologies_models.ObjectTypeApiName] + objectType: typing_extensions.NotRequired[ontologies_models.ObjectTypeRid] + sdkPackageRid: ontologies_models.SdkPackageRid + sdkVersion: ontologies_models.SdkVersion + + +@dataclass +class MarketplaceSdkObjectMappingNotFound(errors.NotFoundError): + name: typing.Literal["MarketplaceSdkObjectMappingNotFound"] + parameters: MarketplaceSdkObjectMappingNotFoundParameters + error_instance_id: str + + +class MarketplaceSdkPropertyMappingNotFoundParameters(typing_extensions.TypedDict): + """The given property could not be mapped to a Marketplace installation.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + propertyType: ontologies_models.PropertyApiName + objectType: ontologies_models.ObjectTypeApiName + sdkPackageRid: ontologies_models.SdkPackageRid + sdkVersion: ontologies_models.SdkVersion + + +@dataclass +class MarketplaceSdkPropertyMappingNotFound(errors.NotFoundError): + name: typing.Literal["MarketplaceSdkPropertyMappingNotFound"] + parameters: MarketplaceSdkPropertyMappingNotFoundParameters + error_instance_id: str + + +class MarketplaceSdkQueryMappingNotFoundParameters(typing_extensions.TypedDict): + """The given query could not be mapped to a Marketplace installation.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + queryType: ontologies_models.QueryApiName + sdkPackageRid: ontologies_models.SdkPackageRid + sdkVersion: ontologies_models.SdkVersion + + +@dataclass +class MarketplaceSdkQueryMappingNotFound(errors.NotFoundError): + name: typing.Literal["MarketplaceSdkQueryMappingNotFound"] + parameters: MarketplaceSdkQueryMappingNotFoundParameters + error_instance_id: str + + +class MissingParameterParameters(typing_extensions.TypedDict): + """ + Required parameters are missing. Please look at the `parameters` field to see which required parameters are + missing from the request. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + parameters: typing.List[ontologies_models.ParameterId] + + +@dataclass +class MissingParameter(errors.BadRequestError): + name: typing.Literal["MissingParameter"] + parameters: MissingParameterParameters + error_instance_id: str + + +class MultipleGroupByOnFieldNotSupportedParameters(typing_extensions.TypedDict): + """Aggregation cannot group by on the same field multiple times.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + duplicateFields: typing.List[str] + + +@dataclass +class MultipleGroupByOnFieldNotSupported(errors.BadRequestError): + name: typing.Literal["MultipleGroupByOnFieldNotSupported"] + parameters: MultipleGroupByOnFieldNotSupportedParameters + error_instance_id: str + + +class MultiplePropertyValuesNotSupportedParameters(typing_extensions.TypedDict): + """ + One of the requested property filters does not support multiple values. Please include only a single value for + it. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + propertyFilter: ontologies_models.PropertyFilter + property: ontologies_models.PropertyApiName + + +@dataclass +class MultiplePropertyValuesNotSupported(errors.BadRequestError): + name: typing.Literal["MultiplePropertyValuesNotSupported"] + parameters: MultiplePropertyValuesNotSupportedParameters + error_instance_id: str + + +class NotCipherFormattedParameters(typing_extensions.TypedDict): + """ + The value intended for decryption with Cipher is not formatted correctly. + It may already be a plaintext value and not require decryption. + Ensure it is correctly formatted (CIPHER::::::CIPHER). + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + value: str + + +@dataclass +class NotCipherFormatted(errors.BadRequestError): + name: typing.Literal["NotCipherFormatted"] + parameters: NotCipherFormattedParameters + error_instance_id: str + + +class ObjectAlreadyExistsParameters(typing_extensions.TypedDict): + """The object the user is attempting to create already exists.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class ObjectAlreadyExists(errors.ConflictError): + name: typing.Literal["ObjectAlreadyExists"] + parameters: ObjectAlreadyExistsParameters + error_instance_id: str + + +class ObjectChangedParameters(typing_extensions.TypedDict): + """An object used by this `Action` was changed by someone else while the `Action` was running.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + primaryKey: typing_extensions.NotRequired[ontologies_models.PropertyValue] + objectType: typing_extensions.NotRequired[ontologies_models.ObjectTypeApiName] + + +@dataclass +class ObjectChanged(errors.ConflictError): + name: typing.Literal["ObjectChanged"] + parameters: ObjectChangedParameters + error_instance_id: str + + +class ObjectNotFoundParameters(typing_extensions.TypedDict): + """The requested object is not found, or the client token does not have access to it.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + objectType: typing_extensions.NotRequired[ontologies_models.ObjectTypeApiName] + primaryKey: typing.Dict[ontologies_models.PropertyApiName, ontologies_models.PrimaryKeyValue] + + +@dataclass +class ObjectNotFound(errors.NotFoundError): + name: typing.Literal["ObjectNotFound"] + parameters: ObjectNotFoundParameters + error_instance_id: str + + +class ObjectSetNotFoundParameters(typing_extensions.TypedDict): + """The requested object set is not found, or the client token does not have access to it.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + objectSetRid: ontologies_models.ObjectSetRid + + +@dataclass +class ObjectSetNotFound(errors.NotFoundError): + name: typing.Literal["ObjectSetNotFound"] + parameters: ObjectSetNotFoundParameters + error_instance_id: str + + +class ObjectTypeNotFoundParameters(typing_extensions.TypedDict): + """The requested object type is not found, or the client token does not have access to it.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + objectType: typing_extensions.NotRequired[ontologies_models.ObjectTypeApiName] + objectTypeRid: typing_extensions.NotRequired[ontologies_models.ObjectTypeRid] + + +@dataclass +class ObjectTypeNotFound(errors.NotFoundError): + name: typing.Literal["ObjectTypeNotFound"] + parameters: ObjectTypeNotFoundParameters + error_instance_id: str + + +class ObjectTypeNotSyncedParameters(typing_extensions.TypedDict): + """ + The requested object type is not synced into the ontology. Please reach out to your Ontology + Administrator to re-index the object type in Ontology Management Application. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + objectType: ontologies_models.ObjectTypeApiName + + +@dataclass +class ObjectTypeNotSynced(errors.ConflictError): + name: typing.Literal["ObjectTypeNotSynced"] + parameters: ObjectTypeNotSyncedParameters + error_instance_id: str + + +class ObjectTypesNotSyncedParameters(typing_extensions.TypedDict): + """ + One or more of the requested object types are not synced into the ontology. Please reach out to your Ontology + Administrator to re-index the object type(s) in Ontology Management Application. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + objectTypes: typing.List[ontologies_models.ObjectTypeApiName] + + +@dataclass +class ObjectTypesNotSynced(errors.ConflictError): + name: typing.Literal["ObjectTypesNotSynced"] + parameters: ObjectTypesNotSyncedParameters + error_instance_id: str + + +class ObjectsExceededLimitParameters(typing_extensions.TypedDict): + """ + There are more objects, but they cannot be returned by this API. Only 10,000 objects are available through this + API for a given request. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class ObjectsExceededLimit(errors.BadRequestError): + name: typing.Literal["ObjectsExceededLimit"] + parameters: ObjectsExceededLimitParameters + error_instance_id: str + + +class ObjectsModifiedConcurrentlyParameters(typing_extensions.TypedDict): + """ + The provided objects are being modified concurrently and the operation would result in a conflict. + The client should retry the request later. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + functionRid: typing_extensions.NotRequired[ontologies_models.FunctionRid] + functionVersion: typing_extensions.NotRequired[ontologies_models.FunctionVersion] + + +@dataclass +class ObjectsModifiedConcurrently(errors.ConflictError): + name: typing.Literal["ObjectsModifiedConcurrently"] + parameters: ObjectsModifiedConcurrentlyParameters + error_instance_id: str + + +class OntologyApiNameNotUniqueParameters(typing_extensions.TypedDict): + """The given Ontology API name is not unique. Use the Ontology RID in place of the Ontology API name.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + ontologyApiName: ontologies_models.OntologyApiName + + +@dataclass +class OntologyApiNameNotUnique(errors.BadRequestError): + name: typing.Literal["OntologyApiNameNotUnique"] + parameters: OntologyApiNameNotUniqueParameters + error_instance_id: str + + +class OntologyEditsExceededLimitParameters(typing_extensions.TypedDict): + """ + The number of edits to the Ontology exceeded the allowed limit. + This may happen because of the request or because the Action is modifying too many objects. + Please change the size of your request or contact the Ontology administrator. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + editsCount: int + editsLimit: int + + +@dataclass +class OntologyEditsExceededLimit(errors.BadRequestError): + name: typing.Literal["OntologyEditsExceededLimit"] + parameters: OntologyEditsExceededLimitParameters + error_instance_id: str + + +class OntologyNotFoundParameters(typing_extensions.TypedDict): + """The requested Ontology is not found, or the client token does not have access to it.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + ontologyRid: typing_extensions.NotRequired[ontologies_models.OntologyRid] + apiName: typing_extensions.NotRequired[ontologies_models.OntologyApiName] + + +@dataclass +class OntologyNotFound(errors.NotFoundError): + name: typing.Literal["OntologyNotFound"] + parameters: OntologyNotFoundParameters + error_instance_id: str + + +class OntologySyncingParameters(typing_extensions.TypedDict): + """ + The requested object type has been changed in the **Ontology Manager** and changes are currently being applied. Wait a + few seconds and try again. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + objectType: ontologies_models.ObjectTypeApiName + + +@dataclass +class OntologySyncing(errors.ConflictError): + name: typing.Literal["OntologySyncing"] + parameters: OntologySyncingParameters + error_instance_id: str + + +class OntologySyncingObjectTypesParameters(typing_extensions.TypedDict): + """ + One or more requested object types have been changed in the **Ontology Manager** and changes are currently being + applied. Wait a few seconds and try again. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + objectTypes: typing.List[ontologies_models.ObjectTypeApiName] + + +@dataclass +class OntologySyncingObjectTypes(errors.ConflictError): + name: typing.Literal["OntologySyncingObjectTypes"] + parameters: OntologySyncingObjectTypesParameters + error_instance_id: str + + +class ParameterObjectNotFoundParameters(typing_extensions.TypedDict): + """The parameter object reference or parameter default value is not found, or the client token does not have access to it.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + objectType: ontologies_models.ObjectTypeApiName + primaryKey: typing.Dict[ontologies_models.PropertyApiName, ontologies_models.PrimaryKeyValue] + + +@dataclass +class ParameterObjectNotFound(errors.NotFoundError): + name: typing.Literal["ParameterObjectNotFound"] + parameters: ParameterObjectNotFoundParameters + error_instance_id: str + + +class ParameterObjectSetRidNotFoundParameters(typing_extensions.TypedDict): + """The parameter object set RID is not found, or the client token does not have access to it.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + objectSetRid: core.RID + + +@dataclass +class ParameterObjectSetRidNotFound(errors.NotFoundError): + name: typing.Literal["ParameterObjectSetRidNotFound"] + parameters: ParameterObjectSetRidNotFoundParameters + error_instance_id: str + + +class ParameterTypeNotSupportedParameters(typing_extensions.TypedDict): + """ + The type of the requested parameter is not currently supported by this API. If you need support for this, + please reach out to Palantir Support. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + parameterId: ontologies_models.ParameterId + parameterBaseType: ontologies_models.ValueType + + +@dataclass +class ParameterTypeNotSupported(errors.BadRequestError): + name: typing.Literal["ParameterTypeNotSupported"] + parameters: ParameterTypeNotSupportedParameters + error_instance_id: str + + +class ParametersNotFoundParameters(typing_extensions.TypedDict): + """ + The provided parameter ID was not found for the action. Please look at the `configuredParameterIds` field + to see which ones are available. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + actionType: ontologies_models.ActionTypeApiName + unknownParameterIds: typing.List[ontologies_models.ParameterId] + configuredParameterIds: typing.List[ontologies_models.ParameterId] + + +@dataclass +class ParametersNotFound(errors.BadRequestError): + name: typing.Literal["ParametersNotFound"] + parameters: ParametersNotFoundParameters + error_instance_id: str + + +class ParentAttachmentPermissionDeniedParameters(typing_extensions.TypedDict): + """The user does not have permission to parent attachments.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class ParentAttachmentPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["ParentAttachmentPermissionDenied"] + parameters: ParentAttachmentPermissionDeniedParameters + error_instance_id: str + + +class PropertiesHaveDifferentIdsParameters(typing_extensions.TypedDict): + """Properties used in ordering must have the same ids.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + properties: typing.List[ontologies_models.SharedPropertyTypeApiName] + + +@dataclass +class PropertiesHaveDifferentIds(errors.BadRequestError): + name: typing.Literal["PropertiesHaveDifferentIds"] + parameters: PropertiesHaveDifferentIdsParameters + error_instance_id: str + + +class PropertiesNotFilterableParameters(typing_extensions.TypedDict): + """ + Results could not be filtered by the requested properties. Please mark the properties as *Searchable* and + *Selectable* in the **Ontology Manager** to be able to filter on those properties. There may be a short delay + between the time a property is marked *Searchable* and *Selectable* and when it can be used. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + properties: typing.List[ontologies_models.PropertyApiName] + + +@dataclass +class PropertiesNotFilterable(errors.BadRequestError): + name: typing.Literal["PropertiesNotFilterable"] + parameters: PropertiesNotFilterableParameters + error_instance_id: str + + +class PropertiesNotFoundParameters(typing_extensions.TypedDict): + """The requested properties are not found on the object type.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + objectType: ontologies_models.ObjectTypeApiName + properties: typing.List[ontologies_models.PropertyApiName] + + +@dataclass +class PropertiesNotFound(errors.NotFoundError): + name: typing.Literal["PropertiesNotFound"] + parameters: PropertiesNotFoundParameters + error_instance_id: str + + +class PropertiesNotSearchableParameters(typing_extensions.TypedDict): + """ + Search is not enabled on the specified properties. Please mark the properties as *Searchable* + in the **Ontology Manager** to enable search on them. There may be a short delay + between the time a property is marked *Searchable* and when it can be used. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + propertyApiNames: typing.List[ontologies_models.PropertyApiName] + + +@dataclass +class PropertiesNotSearchable(errors.BadRequestError): + name: typing.Literal["PropertiesNotSearchable"] + parameters: PropertiesNotSearchableParameters + error_instance_id: str + + +class PropertiesNotSortableParameters(typing_extensions.TypedDict): + """ + Results could not be ordered by the requested properties. Please mark the properties as *Searchable* and + *Sortable* in the **Ontology Manager** to enable their use in `orderBy` parameters. There may be a short delay + between the time a property is set to *Searchable* and *Sortable* and when it can be used. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + properties: typing.List[ontologies_models.PropertyApiName] + + +@dataclass +class PropertiesNotSortable(errors.BadRequestError): + name: typing.Literal["PropertiesNotSortable"] + parameters: PropertiesNotSortableParameters + error_instance_id: str + + +class PropertyApiNameNotFoundParameters(typing_extensions.TypedDict): + """ + A property that was required to have an API name, such as a primary key, is missing one. You can set an API + name for it using the **Ontology Manager**. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + propertyId: ontologies_models.PropertyId + propertyBaseType: ontologies_models.ValueType + + +@dataclass +class PropertyApiNameNotFound(errors.BadRequestError): + name: typing.Literal["PropertyApiNameNotFound"] + parameters: PropertyApiNameNotFoundParameters + error_instance_id: str + + +class PropertyBaseTypeNotSupportedParameters(typing_extensions.TypedDict): + """ + The type of the requested property is not currently supported by this API. If you need support for this, + please reach out to Palantir Support. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + objectType: ontologies_models.ObjectTypeApiName + property: ontologies_models.PropertyApiName + propertyBaseType: ontologies_models.ValueType + + +@dataclass +class PropertyBaseTypeNotSupported(errors.BadRequestError): + name: typing.Literal["PropertyBaseTypeNotSupported"] + parameters: PropertyBaseTypeNotSupportedParameters + error_instance_id: str + + +class PropertyExactMatchingNotSupportedParameters(typing_extensions.TypedDict): + """A property that does not support exact matching is used in a setting that requires exact matching.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + propertyBaseType: ontologies_models.ValueType + propertyTypeRid: typing_extensions.NotRequired[ontologies_models.PropertyTypeRid] + + +@dataclass +class PropertyExactMatchingNotSupported(errors.BadRequestError): + name: typing.Literal["PropertyExactMatchingNotSupported"] + parameters: PropertyExactMatchingNotSupportedParameters + error_instance_id: str + + +class PropertyFiltersNotSupportedParameters(typing_extensions.TypedDict): + """ + At least one of the requested property filters are not supported. See the documentation of `PropertyFilter` for + a list of supported property filters. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + propertyFilters: typing.List[ontologies_models.PropertyFilter] + property: ontologies_models.PropertyApiName + + +@dataclass +class PropertyFiltersNotSupported(errors.BadRequestError): + name: typing.Literal["PropertyFiltersNotSupported"] + parameters: PropertyFiltersNotSupportedParameters + error_instance_id: str + + +class PropertyNotFoundParameters(typing_extensions.TypedDict): + """Failed to find a provided property for a given object.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class PropertyNotFound(errors.BadRequestError): + name: typing.Literal["PropertyNotFound"] + parameters: PropertyNotFoundParameters + error_instance_id: str + + +class PropertyNotFoundOnObjectParameters(typing_extensions.TypedDict): + """Could not find the given property on the object. The user may not have permissions to see this property or it may be configured incorrectly.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + objectTypeRid: ontologies_models.ObjectTypeRid + objectRid: ontologies_models.ObjectRid + objectPropertyRid: ontologies_models.PropertyTypeRid + + +@dataclass +class PropertyNotFoundOnObject(errors.BadRequestError): + name: typing.Literal["PropertyNotFoundOnObject"] + parameters: PropertyNotFoundOnObjectParameters + error_instance_id: str + + +class PropertyTypeDoesNotSupportNearestNeighborsParameters(typing_extensions.TypedDict): + """The provided propertyIdentifier is not configured with an embedding model in the ontology.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class PropertyTypeDoesNotSupportNearestNeighbors(errors.BadRequestError): + name: typing.Literal["PropertyTypeDoesNotSupportNearestNeighbors"] + parameters: PropertyTypeDoesNotSupportNearestNeighborsParameters + error_instance_id: str + + +class PropertyTypeNotFoundParameters(typing_extensions.TypedDict): + """The requested property type is not found, or the client token does not have access to it.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + objectTypeApiName: typing_extensions.NotRequired[ontologies_models.ObjectTypeApiName] + propertyApiName: typing_extensions.NotRequired[ontologies_models.PropertyApiName] + + +@dataclass +class PropertyTypeNotFound(errors.NotFoundError): + name: typing.Literal["PropertyTypeNotFound"] + parameters: PropertyTypeNotFoundParameters + error_instance_id: str + + +class PropertyTypeRidNotFoundParameters(typing_extensions.TypedDict): + """The requested property type RID is not found, or the client token does not have access to it.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + propertyTypeRid: typing_extensions.NotRequired[ontologies_models.PropertyTypeRid] + + +@dataclass +class PropertyTypeRidNotFound(errors.NotFoundError): + name: typing.Literal["PropertyTypeRidNotFound"] + parameters: PropertyTypeRidNotFoundParameters + error_instance_id: str + + +class PropertyTypesSearchNotSupportedParameters(typing_extensions.TypedDict): + """ + The search on the property types are not supported. See the `Search Objects` documentation for + a list of supported search queries on different property types. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + parameters: typing.Dict[ + ontologies_models.PropertyFilter, typing.List[ontologies_models.PropertyApiName] + ] + + +@dataclass +class PropertyTypesSearchNotSupported(errors.BadRequestError): + name: typing.Literal["PropertyTypesSearchNotSupported"] + parameters: PropertyTypesSearchNotSupportedParameters + error_instance_id: str + + +class QueryEncounteredUserFacingErrorParameters(typing_extensions.TypedDict): + """ + The authored `Query` failed to execute because of a user induced error. The message argument + is meant to be displayed to the user. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + functionRid: ontologies_models.FunctionRid + functionVersion: ontologies_models.FunctionVersion + message: str + + +@dataclass +class QueryEncounteredUserFacingError(errors.ConflictError): + name: typing.Literal["QueryEncounteredUserFacingError"] + parameters: QueryEncounteredUserFacingErrorParameters + error_instance_id: str + + +class QueryMemoryExceededLimitParameters(typing_extensions.TypedDict): + """Memory limits were exceeded for the `Query` execution.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + functionRid: ontologies_models.FunctionRid + functionVersion: ontologies_models.FunctionVersion + + +@dataclass +class QueryMemoryExceededLimit(errors.InternalServerError): + name: typing.Literal["QueryMemoryExceededLimit"] + parameters: QueryMemoryExceededLimitParameters + error_instance_id: str + + +class QueryNotFoundParameters(typing_extensions.TypedDict): + """The query is not found, or the user does not have access to it.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + query: ontologies_models.QueryApiName + + +@dataclass +class QueryNotFound(errors.NotFoundError): + name: typing.Literal["QueryNotFound"] + parameters: QueryNotFoundParameters + error_instance_id: str + + +class QueryRuntimeErrorParameters(typing_extensions.TypedDict): + """The authored `Query` failed to execute because of a runtime error.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + functionRid: ontologies_models.FunctionRid + functionVersion: ontologies_models.FunctionVersion + message: typing_extensions.NotRequired[str] + stacktrace: typing_extensions.NotRequired[str] + parameters: typing.Dict[ontologies_models.QueryRuntimeErrorParameter, str] + + +@dataclass +class QueryRuntimeError(errors.BadRequestError): + name: typing.Literal["QueryRuntimeError"] + parameters: QueryRuntimeErrorParameters + error_instance_id: str + + +class QueryTimeExceededLimitParameters(typing_extensions.TypedDict): + """Time limits were exceeded for the `Query` execution.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + functionRid: ontologies_models.FunctionRid + functionVersion: ontologies_models.FunctionVersion + + +@dataclass +class QueryTimeExceededLimit(errors.InternalServerError): + name: typing.Literal["QueryTimeExceededLimit"] + parameters: QueryTimeExceededLimitParameters + error_instance_id: str + + +class QueryVersionNotFoundParameters(typing_extensions.TypedDict): + """The query could not be found at the provided version.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + apiName: ontologies_models.QueryApiName + version: ontologies_models.FunctionVersion + + +@dataclass +class QueryVersionNotFound(errors.NotFoundError): + name: typing.Literal["QueryVersionNotFound"] + parameters: QueryVersionNotFoundParameters + error_instance_id: str + + +class RateLimitReachedParameters(typing_extensions.TypedDict): + """Unable to decrypt this CipherText because the available rate limits in Cipher licenses were reached.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + cipherChannel: core.RID + + +@dataclass +class RateLimitReached(errors.PermissionDeniedError): + name: typing.Literal["RateLimitReached"] + parameters: RateLimitReachedParameters + error_instance_id: str + + +class SharedPropertiesNotFoundParameters(typing_extensions.TypedDict): + """The requested shared property types are not present on every object type.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + objectType: typing.List[ontologies_models.ObjectTypeApiName] + missingSharedProperties: typing.List[ontologies_models.SharedPropertyTypeApiName] + + +@dataclass +class SharedPropertiesNotFound(errors.NotFoundError): + name: typing.Literal["SharedPropertiesNotFound"] + parameters: SharedPropertiesNotFoundParameters + error_instance_id: str + + +class SharedPropertyTypeNotFoundParameters(typing_extensions.TypedDict): + """The requested shared property type is not found, or the client token does not have access to it.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + apiName: typing_extensions.NotRequired[ontologies_models.SharedPropertyTypeApiName] + rid: typing_extensions.NotRequired[ontologies_models.SharedPropertyTypeRid] + + +@dataclass +class SharedPropertyTypeNotFound(errors.NotFoundError): + name: typing.Literal["SharedPropertyTypeNotFound"] + parameters: SharedPropertyTypeNotFoundParameters + error_instance_id: str + + +class SimilarityThresholdOutOfRangeParameters(typing_extensions.TypedDict): + """The value of the similarity threshold must be in the range 0 <= threshold <= 1.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + providedThreshold: float + + +@dataclass +class SimilarityThresholdOutOfRange(errors.BadRequestError): + name: typing.Literal["SimilarityThresholdOutOfRange"] + parameters: SimilarityThresholdOutOfRangeParameters + error_instance_id: str + + +class TooManyNearestNeighborsRequestedParameters(typing_extensions.TypedDict): + """The value of numNeighbors must be in the range 1 <= numNeighbors <= 500.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + requestedNumNeighbors: int + maxNumNeighbors: int + + +@dataclass +class TooManyNearestNeighborsRequested(errors.BadRequestError): + name: typing.Literal["TooManyNearestNeighborsRequested"] + parameters: TooManyNearestNeighborsRequestedParameters + error_instance_id: str + + +class UnauthorizedCipherOperationParameters(typing_extensions.TypedDict): + """The provided token does not have permission to take a specific Cipher operation.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + cipherChannel: core.RID + + +@dataclass +class UnauthorizedCipherOperation(errors.PermissionDeniedError): + name: typing.Literal["UnauthorizedCipherOperation"] + parameters: UnauthorizedCipherOperationParameters + error_instance_id: str + + +class UndecryptableValueParameters(typing_extensions.TypedDict): + """ + The value intended for decryption with Cipher cannot be decrypted. + Ensure it is correctly formatted (CIPHER:::::CIPHER). + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + value: str + + +@dataclass +class UndecryptableValue(errors.BadRequestError): + name: typing.Literal["UndecryptableValue"] + parameters: UndecryptableValueParameters + error_instance_id: str + + +class UniqueIdentifierLinkIdsDoNotExistInActionTypeParameters(typing_extensions.TypedDict): + """ + One or more unique identifier link IDs specified in apply action overrides could not be found + in the ActionType definition. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + unknownUniqueIdentifierLinkIds: typing.List[ontologies_models.UniqueIdentifierLinkId] + + +@dataclass +class UniqueIdentifierLinkIdsDoNotExistInActionType(errors.BadRequestError): + name: typing.Literal["UniqueIdentifierLinkIdsDoNotExistInActionType"] + parameters: UniqueIdentifierLinkIdsDoNotExistInActionTypeParameters + error_instance_id: str + + +class UnknownParameterParameters(typing_extensions.TypedDict): + """ + The provided parameters were not found. Please look at the `knownParameters` field + to see which ones are available. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + unknownParameters: typing.List[ontologies_models.ParameterId] + expectedParameters: typing.List[ontologies_models.ParameterId] + + +@dataclass +class UnknownParameter(errors.BadRequestError): + name: typing.Literal["UnknownParameter"] + parameters: UnknownParameterParameters + error_instance_id: str + + +class UnsupportedInterfaceBasedObjectSetParameters(typing_extensions.TypedDict): + """Aggregations on interface-based object sets are not supported for object sets with OSv1 objects.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + interfaceType: ontologies_models.InterfaceTypeApiName + + +@dataclass +class UnsupportedInterfaceBasedObjectSet(errors.BadRequestError): + name: typing.Literal["UnsupportedInterfaceBasedObjectSet"] + parameters: UnsupportedInterfaceBasedObjectSetParameters + error_instance_id: str + + +class UnsupportedObjectSetParameters(typing_extensions.TypedDict): + """The requested object set is not supported.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class UnsupportedObjectSet(errors.BadRequestError): + name: typing.Literal["UnsupportedObjectSet"] + parameters: UnsupportedObjectSetParameters + error_instance_id: str + + +class ValueTypeNotFoundParameters(typing_extensions.TypedDict): + """The value type is not found, or the user does not have access to it.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + valueType: typing_extensions.NotRequired[ontologies_models.ValueTypeApiName] + rid: typing_extensions.NotRequired[ontologies_models.ValueTypeRid] + + +@dataclass +class ValueTypeNotFound(errors.NotFoundError): + name: typing.Literal["ValueTypeNotFound"] + parameters: ValueTypeNotFoundParameters + error_instance_id: str + + +class ViewObjectPermissionDeniedParameters(typing_extensions.TypedDict): + """ + The provided token does not have permission to view any data sources backing this object type. Ensure the object + type has backing data sources configured and visible. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + objectType: ontologies_models.ObjectTypeApiName + + +@dataclass +class ViewObjectPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["ViewObjectPermissionDenied"] + parameters: ViewObjectPermissionDeniedParameters + error_instance_id: str + + +__all__ = [ + "ActionContainsDuplicateEdits", + "ActionEditedPropertiesNotFound", + "ActionEditsReadOnlyEntity", + "ActionNotFound", + "ActionParameterInterfaceTypeNotFound", + "ActionParameterObjectNotFound", + "ActionParameterObjectTypeNotFound", + "ActionTypeNotFound", + "ActionValidationFailed", + "AggregationAccuracyNotSupported", + "AggregationGroupCountExceededLimit", + "AggregationMemoryExceededLimit", + "AggregationNestedObjectSetSizeExceededLimit", + "ApplyActionFailed", + "AttachmentNotFound", + "AttachmentRidAlreadyExists", + "AttachmentSizeExceededLimit", + "CipherChannelNotFound", + "CompositePrimaryKeyNotSupported", + "ConsistentSnapshotError", + "DefaultAndNullGroupsNotSupported", + "DerivedPropertyApiNamesNotUnique", + "DuplicateOrderBy", + "EditObjectPermissionDenied", + "FunctionEncounteredUserFacingError", + "FunctionExecutionFailed", + "FunctionExecutionTimedOut", + "FunctionInvalidInput", + "HighScaleComputationNotEnabled", + "InterfaceBasedObjectSetNotSupported", + "InterfaceLinkTypeNotFound", + "InterfacePropertiesHaveDifferentIds", + "InterfacePropertiesNotFound", + "InterfacePropertyNotFound", + "InterfaceTypeNotFound", + "InterfaceTypesNotFound", + "InvalidAggregationOrdering", + "InvalidAggregationOrderingWithNullValues", + "InvalidAggregationRange", + "InvalidAggregationRangePropertyType", + "InvalidAggregationRangePropertyTypeForInterface", + "InvalidAggregationRangeValue", + "InvalidAggregationRangeValueForInterface", + "InvalidApplyActionOptionCombination", + "InvalidContentLength", + "InvalidContentType", + "InvalidDerivedPropertyDefinition", + "InvalidDurationGroupByPropertyType", + "InvalidDurationGroupByPropertyTypeForInterface", + "InvalidDurationGroupByValue", + "InvalidFields", + "InvalidGroupId", + "InvalidOrderType", + "InvalidParameterValue", + "InvalidPropertyFilterValue", + "InvalidPropertyFiltersCombination", + "InvalidPropertyType", + "InvalidPropertyValue", + "InvalidQueryOutputValue", + "InvalidQueryParameterValue", + "InvalidRangeQuery", + "InvalidSortOrder", + "InvalidSortType", + "InvalidTransactionEditPropertyValue", + "InvalidUserId", + "InvalidVectorDimension", + "LinkAlreadyExists", + "LinkTypeNotFound", + "LinkedObjectNotFound", + "LoadObjectSetLinksNotSupported", + "MalformedPropertyFilters", + "MarketplaceActionMappingNotFound", + "MarketplaceInstallationNotFound", + "MarketplaceLinkMappingNotFound", + "MarketplaceObjectMappingNotFound", + "MarketplaceQueryMappingNotFound", + "MarketplaceSdkActionMappingNotFound", + "MarketplaceSdkInstallationNotFound", + "MarketplaceSdkLinkMappingNotFound", + "MarketplaceSdkObjectMappingNotFound", + "MarketplaceSdkPropertyMappingNotFound", + "MarketplaceSdkQueryMappingNotFound", + "MissingParameter", + "MultipleGroupByOnFieldNotSupported", + "MultiplePropertyValuesNotSupported", + "NotCipherFormatted", + "ObjectAlreadyExists", + "ObjectChanged", + "ObjectNotFound", + "ObjectSetNotFound", + "ObjectTypeNotFound", + "ObjectTypeNotSynced", + "ObjectTypesNotSynced", + "ObjectsExceededLimit", + "ObjectsModifiedConcurrently", + "OntologyApiNameNotUnique", + "OntologyEditsExceededLimit", + "OntologyNotFound", + "OntologySyncing", + "OntologySyncingObjectTypes", + "ParameterObjectNotFound", + "ParameterObjectSetRidNotFound", + "ParameterTypeNotSupported", + "ParametersNotFound", + "ParentAttachmentPermissionDenied", + "PropertiesHaveDifferentIds", + "PropertiesNotFilterable", + "PropertiesNotFound", + "PropertiesNotSearchable", + "PropertiesNotSortable", + "PropertyApiNameNotFound", + "PropertyBaseTypeNotSupported", + "PropertyExactMatchingNotSupported", + "PropertyFiltersNotSupported", + "PropertyNotFound", + "PropertyNotFoundOnObject", + "PropertyTypeDoesNotSupportNearestNeighbors", + "PropertyTypeNotFound", + "PropertyTypeRidNotFound", + "PropertyTypesSearchNotSupported", + "QueryEncounteredUserFacingError", + "QueryMemoryExceededLimit", + "QueryNotFound", + "QueryRuntimeError", + "QueryTimeExceededLimit", + "QueryVersionNotFound", + "RateLimitReached", + "SharedPropertiesNotFound", + "SharedPropertyTypeNotFound", + "SimilarityThresholdOutOfRange", + "TooManyNearestNeighborsRequested", + "UnauthorizedCipherOperation", + "UndecryptableValue", + "UniqueIdentifierLinkIdsDoNotExistInActionType", + "UnknownParameter", + "UnsupportedInterfaceBasedObjectSet", + "UnsupportedObjectSet", + "ValueTypeNotFound", + "ViewObjectPermissionDenied", +] diff --git a/foundry_sdk/v2/ontologies/linked_object.py b/foundry_sdk/v2/ontologies/linked_object.py new file mode 100644 index 000000000..3692c0655 --- /dev/null +++ b/foundry_sdk/v2/ontologies/linked_object.py @@ -0,0 +1,482 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v2.core import models as core_models +from foundry_sdk.v2.ontologies import models as ontologies_models + + +class LinkedObjectClient: + """ + The API client for the LinkedObject Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _LinkedObjectClientStreaming(self) + self.with_raw_response = _LinkedObjectClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get_linked_object( + self, + ontology: ontologies_models.OntologyIdentifier, + object_type: ontologies_models.ObjectTypeApiName, + primary_key: ontologies_models.PropertyValueEscapedString, + link_type: ontologies_models.LinkTypeApiName, + linked_object_primary_key: ontologies_models.PropertyValueEscapedString, + *, + branch: typing.Optional[core_models.FoundryBranch] = None, + exclude_rid: typing.Optional[bool] = None, + sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, + sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, + select: typing.Optional[typing.List[ontologies_models.SelectedPropertyApiName]] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> ontologies_models.OntologyObjectV2: + """ + Get a specific linked object that originates from another object. + + If there is no link between the two objects, `LinkedObjectNotFound` is thrown. + + :param ontology: + :type ontology: OntologyIdentifier + :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. + :type object_type: ObjectTypeApiName + :param primary_key: The primary key of the object from which the links originate. To look up the expected primary key for your object type, use the `Get object type` endpoint or the **Ontology Manager**. + :type primary_key: PropertyValueEscapedString + :param link_type: The API name of the link that exists between the object and the requested objects. To find the API name for your link type, check the **Ontology Manager**. + :type link_type: LinkTypeApiName + :param linked_object_primary_key: The primary key of the requested linked object. To look up the expected primary key for your object type, use the `Get object type` endpoint (passing the linked object type) or the **Ontology Manager**. + :type linked_object_primary_key: PropertyValueEscapedString + :param branch: The Foundry branch to load the object set for multiple object types. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported. + :type branch: Optional[FoundryBranch] + :param exclude_rid: A flag to exclude the retrieval of the `__rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2. + :type exclude_rid: Optional[bool] + :param sdk_package_rid: The package rid of the generated SDK. + :type sdk_package_rid: Optional[SdkPackageRid] + :param sdk_version: The version of the generated SDK. + :type sdk_version: Optional[SdkVersion] + :param select: The properties of the object type that should be included in the response. Omit this parameter to get all the properties. + :type select: Optional[List[SelectedPropertyApiName]] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: ontologies_models.OntologyObjectV2 + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/links/{linkType}/{linkedObjectPrimaryKey}", + query_params={ + "branch": branch, + "excludeRid": exclude_rid, + "sdkPackageRid": sdk_package_rid, + "sdkVersion": sdk_version, + "select": select, + }, + path_params={ + "ontology": ontology, + "objectType": object_type, + "primaryKey": primary_key, + "linkType": link_type, + "linkedObjectPrimaryKey": linked_object_primary_key, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.OntologyObjectV2, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def list_linked_objects( + self, + ontology: ontologies_models.OntologyIdentifier, + object_type: ontologies_models.ObjectTypeApiName, + primary_key: ontologies_models.PropertyValueEscapedString, + link_type: ontologies_models.LinkTypeApiName, + *, + branch: typing.Optional[core_models.FoundryBranch] = None, + exclude_rid: typing.Optional[bool] = None, + order_by: typing.Optional[ontologies_models.OrderBy] = None, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, + sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, + select: typing.Optional[typing.List[ontologies_models.SelectedPropertyApiName]] = None, + snapshot: typing.Optional[bool] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.ResourceIterator[ontologies_models.OntologyObjectV2]: + """ + Lists the linked objects for a specific object and the given link type. + + Note that this endpoint does not guarantee consistency. Changes to the data could result in missing or + repeated objects in the response pages. + + For Object Storage V1 backed objects, this endpoint returns a maximum of 10,000 objects. After 10,000 objects have been returned and if more objects + are available, attempting to load another page will result in an `ObjectsExceededLimit` error being returned. There is no limit on Object Storage V2 backed objects. + + Each page may be smaller or larger than the requested page size. However, it + is guaranteed that if there are more results available, at least one result will be present + in the response. + + Note that null value properties will not be returned. + + :param ontology: + :type ontology: OntologyIdentifier + :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. + :type object_type: ObjectTypeApiName + :param primary_key: The primary key of the object from which the links originate. To look up the expected primary key for your object type, use the `Get object type` endpoint or the **Ontology Manager**. + :type primary_key: PropertyValueEscapedString + :param link_type: The API name of the link that exists between the object and the requested objects. To find the API name for your link type, check the **Ontology Manager**. + :type link_type: LinkTypeApiName + :param branch: The Foundry branch to list linked objects from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. + :type branch: Optional[FoundryBranch] + :param exclude_rid: A flag to exclude the retrieval of the `__rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2. + :type exclude_rid: Optional[bool] + :param order_by: + :type order_by: Optional[OrderBy] + :param page_size: The desired size of the page to be returned. Defaults to 1,000. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. + :type page_size: Optional[PageSize] + :param page_token: + :type page_token: Optional[PageToken] + :param sdk_package_rid: The package rid of the generated SDK. + :type sdk_package_rid: Optional[SdkPackageRid] + :param sdk_version: The version of the generated SDK. + :type sdk_version: Optional[SdkVersion] + :param select: The properties of the object type that should be included in the response. Omit this parameter to get all the properties. + :type select: Optional[List[SelectedPropertyApiName]] + :param snapshot: A flag to use snapshot consistency when paging. Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. This defaults to false if not specified, which means you will always get the latest results. + :type snapshot: Optional[bool] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.ResourceIterator[ontologies_models.OntologyObjectV2] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/links/{linkType}", + query_params={ + "branch": branch, + "excludeRid": exclude_rid, + "orderBy": order_by, + "pageSize": page_size, + "pageToken": page_token, + "sdkPackageRid": sdk_package_rid, + "sdkVersion": sdk_version, + "select": select, + "snapshot": snapshot, + }, + path_params={ + "ontology": ontology, + "objectType": object_type, + "primaryKey": primary_key, + "linkType": link_type, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.ListLinkedObjectsResponseV2, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + +class _LinkedObjectClientRaw: + def __init__(self, client: LinkedObjectClient) -> None: + def get_linked_object(_: ontologies_models.OntologyObjectV2): ... + def list_linked_objects(_: ontologies_models.ListLinkedObjectsResponseV2): ... + + self.get_linked_object = core.with_raw_response(get_linked_object, client.get_linked_object) + self.list_linked_objects = core.with_raw_response( + list_linked_objects, client.list_linked_objects + ) + + +class _LinkedObjectClientStreaming: + def __init__(self, client: LinkedObjectClient) -> None: + def get_linked_object(_: ontologies_models.OntologyObjectV2): ... + def list_linked_objects(_: ontologies_models.ListLinkedObjectsResponseV2): ... + + self.get_linked_object = core.with_streaming_response( + get_linked_object, client.get_linked_object + ) + self.list_linked_objects = core.with_streaming_response( + list_linked_objects, client.list_linked_objects + ) + + +class AsyncLinkedObjectClient: + """ + The API client for the LinkedObject Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncLinkedObjectClientStreaming(self) + self.with_raw_response = _AsyncLinkedObjectClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get_linked_object( + self, + ontology: ontologies_models.OntologyIdentifier, + object_type: ontologies_models.ObjectTypeApiName, + primary_key: ontologies_models.PropertyValueEscapedString, + link_type: ontologies_models.LinkTypeApiName, + linked_object_primary_key: ontologies_models.PropertyValueEscapedString, + *, + branch: typing.Optional[core_models.FoundryBranch] = None, + exclude_rid: typing.Optional[bool] = None, + sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, + sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, + select: typing.Optional[typing.List[ontologies_models.SelectedPropertyApiName]] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[ontologies_models.OntologyObjectV2]: + """ + Get a specific linked object that originates from another object. + + If there is no link between the two objects, `LinkedObjectNotFound` is thrown. + + :param ontology: + :type ontology: OntologyIdentifier + :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. + :type object_type: ObjectTypeApiName + :param primary_key: The primary key of the object from which the links originate. To look up the expected primary key for your object type, use the `Get object type` endpoint or the **Ontology Manager**. + :type primary_key: PropertyValueEscapedString + :param link_type: The API name of the link that exists between the object and the requested objects. To find the API name for your link type, check the **Ontology Manager**. + :type link_type: LinkTypeApiName + :param linked_object_primary_key: The primary key of the requested linked object. To look up the expected primary key for your object type, use the `Get object type` endpoint (passing the linked object type) or the **Ontology Manager**. + :type linked_object_primary_key: PropertyValueEscapedString + :param branch: The Foundry branch to load the object set for multiple object types. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported. + :type branch: Optional[FoundryBranch] + :param exclude_rid: A flag to exclude the retrieval of the `__rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2. + :type exclude_rid: Optional[bool] + :param sdk_package_rid: The package rid of the generated SDK. + :type sdk_package_rid: Optional[SdkPackageRid] + :param sdk_version: The version of the generated SDK. + :type sdk_version: Optional[SdkVersion] + :param select: The properties of the object type that should be included in the response. Omit this parameter to get all the properties. + :type select: Optional[List[SelectedPropertyApiName]] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[ontologies_models.OntologyObjectV2] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/links/{linkType}/{linkedObjectPrimaryKey}", + query_params={ + "branch": branch, + "excludeRid": exclude_rid, + "sdkPackageRid": sdk_package_rid, + "sdkVersion": sdk_version, + "select": select, + }, + path_params={ + "ontology": ontology, + "objectType": object_type, + "primaryKey": primary_key, + "linkType": link_type, + "linkedObjectPrimaryKey": linked_object_primary_key, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.OntologyObjectV2, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def list_linked_objects( + self, + ontology: ontologies_models.OntologyIdentifier, + object_type: ontologies_models.ObjectTypeApiName, + primary_key: ontologies_models.PropertyValueEscapedString, + link_type: ontologies_models.LinkTypeApiName, + *, + branch: typing.Optional[core_models.FoundryBranch] = None, + exclude_rid: typing.Optional[bool] = None, + order_by: typing.Optional[ontologies_models.OrderBy] = None, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, + sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, + select: typing.Optional[typing.List[ontologies_models.SelectedPropertyApiName]] = None, + snapshot: typing.Optional[bool] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.AsyncResourceIterator[ontologies_models.OntologyObjectV2]: + """ + Lists the linked objects for a specific object and the given link type. + + Note that this endpoint does not guarantee consistency. Changes to the data could result in missing or + repeated objects in the response pages. + + For Object Storage V1 backed objects, this endpoint returns a maximum of 10,000 objects. After 10,000 objects have been returned and if more objects + are available, attempting to load another page will result in an `ObjectsExceededLimit` error being returned. There is no limit on Object Storage V2 backed objects. + + Each page may be smaller or larger than the requested page size. However, it + is guaranteed that if there are more results available, at least one result will be present + in the response. + + Note that null value properties will not be returned. + + :param ontology: + :type ontology: OntologyIdentifier + :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. + :type object_type: ObjectTypeApiName + :param primary_key: The primary key of the object from which the links originate. To look up the expected primary key for your object type, use the `Get object type` endpoint or the **Ontology Manager**. + :type primary_key: PropertyValueEscapedString + :param link_type: The API name of the link that exists between the object and the requested objects. To find the API name for your link type, check the **Ontology Manager**. + :type link_type: LinkTypeApiName + :param branch: The Foundry branch to list linked objects from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. + :type branch: Optional[FoundryBranch] + :param exclude_rid: A flag to exclude the retrieval of the `__rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2. + :type exclude_rid: Optional[bool] + :param order_by: + :type order_by: Optional[OrderBy] + :param page_size: The desired size of the page to be returned. Defaults to 1,000. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. + :type page_size: Optional[PageSize] + :param page_token: + :type page_token: Optional[PageToken] + :param sdk_package_rid: The package rid of the generated SDK. + :type sdk_package_rid: Optional[SdkPackageRid] + :param sdk_version: The version of the generated SDK. + :type sdk_version: Optional[SdkVersion] + :param select: The properties of the object type that should be included in the response. Omit this parameter to get all the properties. + :type select: Optional[List[SelectedPropertyApiName]] + :param snapshot: A flag to use snapshot consistency when paging. Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. This defaults to false if not specified, which means you will always get the latest results. + :type snapshot: Optional[bool] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.AsyncResourceIterator[ontologies_models.OntologyObjectV2] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/links/{linkType}", + query_params={ + "branch": branch, + "excludeRid": exclude_rid, + "orderBy": order_by, + "pageSize": page_size, + "pageToken": page_token, + "sdkPackageRid": sdk_package_rid, + "sdkVersion": sdk_version, + "select": select, + "snapshot": snapshot, + }, + path_params={ + "ontology": ontology, + "objectType": object_type, + "primaryKey": primary_key, + "linkType": link_type, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.ListLinkedObjectsResponseV2, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + +class _AsyncLinkedObjectClientRaw: + def __init__(self, client: AsyncLinkedObjectClient) -> None: + def get_linked_object(_: ontologies_models.OntologyObjectV2): ... + def list_linked_objects(_: ontologies_models.ListLinkedObjectsResponseV2): ... + + self.get_linked_object = core.async_with_raw_response( + get_linked_object, client.get_linked_object + ) + self.list_linked_objects = core.async_with_raw_response( + list_linked_objects, client.list_linked_objects + ) + + +class _AsyncLinkedObjectClientStreaming: + def __init__(self, client: AsyncLinkedObjectClient) -> None: + def get_linked_object(_: ontologies_models.OntologyObjectV2): ... + def list_linked_objects(_: ontologies_models.ListLinkedObjectsResponseV2): ... + + self.get_linked_object = core.async_with_streaming_response( + get_linked_object, client.get_linked_object + ) + self.list_linked_objects = core.async_with_streaming_response( + list_linked_objects, client.list_linked_objects + ) diff --git a/foundry_sdk/v2/ontologies/media_reference_property.py b/foundry_sdk/v2/ontologies/media_reference_property.py new file mode 100644 index 000000000..e963d0692 --- /dev/null +++ b/foundry_sdk/v2/ontologies/media_reference_property.py @@ -0,0 +1,514 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v2.core import models as core_models +from foundry_sdk.v2.ontologies import models as ontologies_models + + +class MediaReferencePropertyClient: + """ + The API client for the MediaReferenceProperty Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _MediaReferencePropertyClientStreaming(self) + self.with_raw_response = _MediaReferencePropertyClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get_media_content( + self, + ontology: ontologies_models.OntologyIdentifier, + object_type: ontologies_models.ObjectTypeApiName, + primary_key: ontologies_models.PropertyValueEscapedString, + property: ontologies_models.PropertyApiName, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, + sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> bytes: + """ + Gets the content of a media item referenced by this property. + + :param ontology: + :type ontology: OntologyIdentifier + :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. + :type object_type: ObjectTypeApiName + :param primary_key: The primary key of the object with the media reference property. + :type primary_key: PropertyValueEscapedString + :param property: The API name of the media reference property. To find the API name, check the **Ontology Manager** or use the **Get object type** endpoint. + :type property: PropertyApiName + :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. + :type preview: Optional[PreviewMode] + :param sdk_package_rid: The package rid of the generated SDK. + :type sdk_package_rid: Optional[SdkPackageRid] + :param sdk_version: The version of the generated SDK. + :type sdk_version: Optional[SdkVersion] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: bytes + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/media/{property}/content", + query_params={ + "preview": preview, + "sdkPackageRid": sdk_package_rid, + "sdkVersion": sdk_version, + }, + path_params={ + "ontology": ontology, + "objectType": object_type, + "primaryKey": primary_key, + "property": property, + }, + header_params={ + "Accept": "*/*", + }, + body=None, + response_type=bytes, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get_media_metadata( + self, + ontology: ontologies_models.OntologyIdentifier, + object_type: ontologies_models.ObjectTypeApiName, + primary_key: ontologies_models.PropertyValueEscapedString, + property: ontologies_models.PropertyApiName, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, + sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> ontologies_models.MediaMetadata: + """ + Gets metadata about the media item referenced by this property. + + :param ontology: + :type ontology: OntologyIdentifier + :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. + :type object_type: ObjectTypeApiName + :param primary_key: The primary key of the object with the media reference property. + :type primary_key: PropertyValueEscapedString + :param property: The API name of the media reference backed property. To find the API name, check the **Ontology Manager** or use the **Get object type** endpoint. + :type property: PropertyApiName + :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. + :type preview: Optional[PreviewMode] + :param sdk_package_rid: The package rid of the generated SDK. + :type sdk_package_rid: Optional[SdkPackageRid] + :param sdk_version: The version of the generated SDK. + :type sdk_version: Optional[SdkVersion] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: ontologies_models.MediaMetadata + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/media/{property}/metadata", + query_params={ + "preview": preview, + "sdkPackageRid": sdk_package_rid, + "sdkVersion": sdk_version, + }, + path_params={ + "ontology": ontology, + "objectType": object_type, + "primaryKey": primary_key, + "property": property, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.MediaMetadata, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def upload( + self, + ontology: ontologies_models.OntologyIdentifier, + object_type: ontologies_models.ObjectTypeApiName, + property: ontologies_models.PropertyApiName, + body: bytes, + *, + media_item_path: typing.Optional[core_models.MediaItemPath] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core_models.MediaReference: + """ + Uploads a media item to the media set which backs the specified property. The property must be backed by a single media set and branch, otherwise an error will be thrown. + The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`. + + :param ontology: + :type ontology: OntologyIdentifier + :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. + :type object_type: ObjectTypeApiName + :param property: The API name of the media reference property. To find the API name, check the **Ontology Manager** or use the **Get object type** endpoint. + :type property: PropertyApiName + :param body: Body of the request + :type body: bytes + :param media_item_path: A path for the media item within its backing media set. Required if the backing media set requires paths. + :type media_item_path: Optional[MediaItemPath] + :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core_models.MediaReference + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/ontologies/{ontology}/objectTypes/{objectType}/media/{property}/upload", + query_params={ + "mediaItemPath": media_item_path, + "preview": preview, + }, + path_params={ + "ontology": ontology, + "objectType": object_type, + "property": property, + }, + header_params={ + "Content-Type": "*/*", + "Accept": "application/json", + }, + body=body, + response_type=core_models.MediaReference, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _MediaReferencePropertyClientRaw: + def __init__(self, client: MediaReferencePropertyClient) -> None: + def get_media_content(_: bytes): ... + def get_media_metadata(_: ontologies_models.MediaMetadata): ... + def upload(_: core_models.MediaReference): ... + + self.get_media_content = core.with_raw_response(get_media_content, client.get_media_content) + self.get_media_metadata = core.with_raw_response( + get_media_metadata, client.get_media_metadata + ) + self.upload = core.with_raw_response(upload, client.upload) + + +class _MediaReferencePropertyClientStreaming: + def __init__(self, client: MediaReferencePropertyClient) -> None: + def get_media_content(_: bytes): ... + def get_media_metadata(_: ontologies_models.MediaMetadata): ... + def upload(_: core_models.MediaReference): ... + + self.get_media_content = core.with_streaming_response( + get_media_content, client.get_media_content + ) + self.get_media_metadata = core.with_streaming_response( + get_media_metadata, client.get_media_metadata + ) + self.upload = core.with_streaming_response(upload, client.upload) + + +class AsyncMediaReferencePropertyClient: + """ + The API client for the MediaReferenceProperty Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncMediaReferencePropertyClientStreaming(self) + self.with_raw_response = _AsyncMediaReferencePropertyClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get_media_content( + self, + ontology: ontologies_models.OntologyIdentifier, + object_type: ontologies_models.ObjectTypeApiName, + primary_key: ontologies_models.PropertyValueEscapedString, + property: ontologies_models.PropertyApiName, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, + sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[bytes]: + """ + Gets the content of a media item referenced by this property. + + :param ontology: + :type ontology: OntologyIdentifier + :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. + :type object_type: ObjectTypeApiName + :param primary_key: The primary key of the object with the media reference property. + :type primary_key: PropertyValueEscapedString + :param property: The API name of the media reference property. To find the API name, check the **Ontology Manager** or use the **Get object type** endpoint. + :type property: PropertyApiName + :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. + :type preview: Optional[PreviewMode] + :param sdk_package_rid: The package rid of the generated SDK. + :type sdk_package_rid: Optional[SdkPackageRid] + :param sdk_version: The version of the generated SDK. + :type sdk_version: Optional[SdkVersion] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[bytes] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/media/{property}/content", + query_params={ + "preview": preview, + "sdkPackageRid": sdk_package_rid, + "sdkVersion": sdk_version, + }, + path_params={ + "ontology": ontology, + "objectType": object_type, + "primaryKey": primary_key, + "property": property, + }, + header_params={ + "Accept": "*/*", + }, + body=None, + response_type=bytes, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get_media_metadata( + self, + ontology: ontologies_models.OntologyIdentifier, + object_type: ontologies_models.ObjectTypeApiName, + primary_key: ontologies_models.PropertyValueEscapedString, + property: ontologies_models.PropertyApiName, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, + sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[ontologies_models.MediaMetadata]: + """ + Gets metadata about the media item referenced by this property. + + :param ontology: + :type ontology: OntologyIdentifier + :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. + :type object_type: ObjectTypeApiName + :param primary_key: The primary key of the object with the media reference property. + :type primary_key: PropertyValueEscapedString + :param property: The API name of the media reference backed property. To find the API name, check the **Ontology Manager** or use the **Get object type** endpoint. + :type property: PropertyApiName + :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. + :type preview: Optional[PreviewMode] + :param sdk_package_rid: The package rid of the generated SDK. + :type sdk_package_rid: Optional[SdkPackageRid] + :param sdk_version: The version of the generated SDK. + :type sdk_version: Optional[SdkVersion] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[ontologies_models.MediaMetadata] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/media/{property}/metadata", + query_params={ + "preview": preview, + "sdkPackageRid": sdk_package_rid, + "sdkVersion": sdk_version, + }, + path_params={ + "ontology": ontology, + "objectType": object_type, + "primaryKey": primary_key, + "property": property, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.MediaMetadata, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def upload( + self, + ontology: ontologies_models.OntologyIdentifier, + object_type: ontologies_models.ObjectTypeApiName, + property: ontologies_models.PropertyApiName, + body: bytes, + *, + media_item_path: typing.Optional[core_models.MediaItemPath] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[core_models.MediaReference]: + """ + Uploads a media item to the media set which backs the specified property. The property must be backed by a single media set and branch, otherwise an error will be thrown. + The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`. + + :param ontology: + :type ontology: OntologyIdentifier + :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. + :type object_type: ObjectTypeApiName + :param property: The API name of the media reference property. To find the API name, check the **Ontology Manager** or use the **Get object type** endpoint. + :type property: PropertyApiName + :param body: Body of the request + :type body: bytes + :param media_item_path: A path for the media item within its backing media set. Required if the backing media set requires paths. + :type media_item_path: Optional[MediaItemPath] + :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[core_models.MediaReference] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/ontologies/{ontology}/objectTypes/{objectType}/media/{property}/upload", + query_params={ + "mediaItemPath": media_item_path, + "preview": preview, + }, + path_params={ + "ontology": ontology, + "objectType": object_type, + "property": property, + }, + header_params={ + "Content-Type": "*/*", + "Accept": "application/json", + }, + body=body, + response_type=core_models.MediaReference, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _AsyncMediaReferencePropertyClientRaw: + def __init__(self, client: AsyncMediaReferencePropertyClient) -> None: + def get_media_content(_: bytes): ... + def get_media_metadata(_: ontologies_models.MediaMetadata): ... + def upload(_: core_models.MediaReference): ... + + self.get_media_content = core.async_with_raw_response( + get_media_content, client.get_media_content + ) + self.get_media_metadata = core.async_with_raw_response( + get_media_metadata, client.get_media_metadata + ) + self.upload = core.async_with_raw_response(upload, client.upload) + + +class _AsyncMediaReferencePropertyClientStreaming: + def __init__(self, client: AsyncMediaReferencePropertyClient) -> None: + def get_media_content(_: bytes): ... + def get_media_metadata(_: ontologies_models.MediaMetadata): ... + def upload(_: core_models.MediaReference): ... + + self.get_media_content = core.async_with_streaming_response( + get_media_content, client.get_media_content + ) + self.get_media_metadata = core.async_with_streaming_response( + get_media_metadata, client.get_media_metadata + ) + self.upload = core.async_with_streaming_response(upload, client.upload) diff --git a/foundry_sdk/v2/ontologies/models.py b/foundry_sdk/v2/ontologies/models.py new file mode 100644 index 000000000..e1813d5f0 --- /dev/null +++ b/foundry_sdk/v2/ontologies/models.py @@ -0,0 +1,5170 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk.v2.core import models as core_models +from foundry_sdk.v2.geo import models as geo_models + + +class AbsoluteTimeRange(core.ModelBase): + """ISO 8601 timestamps forming a range for a time series query. Start is inclusive and end is exclusive.""" + + start_time: typing.Optional[core.AwareDatetime] = pydantic.Field(alias=str("startTime"), default=None) # type: ignore[literal-required] + end_time: typing.Optional[core.AwareDatetime] = pydantic.Field(alias=str("endTime"), default=None) # type: ignore[literal-required] + type: typing.Literal["absolute"] = "absolute" + + +class AbsoluteValuePropertyExpression(core.ModelBase): + """Calculates absolute value of a numeric value.""" + + property: DerivedPropertyDefinition + type: typing.Literal["absoluteValue"] = "absoluteValue" + + +ActionExecutionTime = core.AwareDatetime +"""An ISO 8601 timestamp.""" + + +ActionLogicRule = typing_extensions.Annotated[ + typing.Union[ + "ModifyInterfaceLogicRule", + "CreateOrModifyObjectLogicRule", + "ModifyObjectLogicRule", + "DeleteLinkLogicRule", + "CreateObjectLogicRule", + "CreateLinkLogicRule", + "BatchedFunctionLogicRule", + "CreateOrModifyObjectLogicRuleV2", + "DeleteInterfaceLinkLogicRule", + "DeleteObjectLogicRule", + "FunctionLogicRule", + "CreateInterfaceLinkLogicRule", + "CreateInterfaceLogicRule", + ], + pydantic.Field(discriminator="type"), +] +"""A detailed operation for an Action""" + + +class ActionParameterArrayType(core.ModelBase): + """ActionParameterArrayType""" + + sub_type: ActionParameterType = pydantic.Field(alias=str("subType")) # type: ignore[literal-required] + type: typing.Literal["array"] = "array" + + +ActionParameterType = typing_extensions.Annotated[ + typing.Union[ + core_models.DateType, + "OntologyInterfaceObjectType", + "OntologyStructType", + core_models.StringType, + core_models.DoubleType, + core_models.IntegerType, + core_models.GeoShapeType, + core_models.LongType, + "OntologyObjectTypeReferenceType", + core_models.BooleanType, + core_models.MarkingType, + core_models.AttachmentType, + core_models.MediaReferenceType, + "ActionParameterArrayType", + "OntologyObjectSetType", + core_models.GeohashType, + core_models.VectorType, + "OntologyObjectType", + core_models.TimestampType, + ], + pydantic.Field(discriminator="type"), +] +"""A union of all the types supported by Ontology Action parameters.""" + + +class ActionParameterV2(core.ModelBase): + """Details about a parameter of an action.""" + + display_name: core_models.DisplayName = pydantic.Field(alias=str("displayName")) # type: ignore[literal-required] + description: typing.Optional[str] = None + data_type: ActionParameterType = pydantic.Field(alias=str("dataType")) # type: ignore[literal-required] + required: bool + + +ActionResults = typing_extensions.Annotated[ + typing.Union["ObjectEdits", "ObjectTypeEdits"], pydantic.Field(discriminator="type") +] +"""ActionResults""" + + +ActionRid = core.RID +"""The unique resource identifier for an action.""" + + +ActionTypeApiName = str +""" +The name of the action type in the API. To find the API name for your Action Type, use the `List action types` +endpoint or check the **Ontology Manager**. +""" + + +class ActionTypeFullMetadata(core.ModelBase): + """Returns the full metadata for an Action type in the Ontology.""" + + action_type: ActionTypeV2 = pydantic.Field(alias=str("actionType")) # type: ignore[literal-required] + full_logic_rules: typing.List[ActionLogicRule] = pydantic.Field(alias=str("fullLogicRules")) # type: ignore[literal-required] + + +ActionTypeRid = core.RID +"""The unique resource identifier of an action type, useful for interacting with other Foundry APIs.""" + + +class ActionTypeV2(core.ModelBase): + """Represents an action type in the Ontology.""" + + api_name: ActionTypeApiName = pydantic.Field(alias=str("apiName")) # type: ignore[literal-required] + description: typing.Optional[str] = None + display_name: typing.Optional[core_models.DisplayName] = pydantic.Field(alias=str("displayName"), default=None) # type: ignore[literal-required] + status: core_models.ReleaseStatus + parameters: typing.Dict[ParameterId, ActionParameterV2] + rid: ActionTypeRid + operations: typing.List[LogicRule] + tool_description: typing.Optional[str] = pydantic.Field(alias=str("toolDescription"), default=None) # type: ignore[literal-required] + """Optional description intended for tool use contexts, such as AI agents.""" + + +class ActivePropertyTypeStatus(core.ModelBase): + """ + This status indicates that the PropertyType will not change on short notice and should thus be safe to use in + user facing workflows. + """ + + type: typing.Literal["active"] = "active" + + +class AddLink(core.ModelBase): + """AddLink""" + + link_type_api_name_ato_b: LinkTypeApiName = pydantic.Field(alias=str("linkTypeApiNameAtoB")) # type: ignore[literal-required] + link_type_api_name_bto_a: LinkTypeApiName = pydantic.Field(alias=str("linkTypeApiNameBtoA")) # type: ignore[literal-required] + a_side_object: LinkSideObject = pydantic.Field(alias=str("aSideObject")) # type: ignore[literal-required] + b_side_object: LinkSideObject = pydantic.Field(alias=str("bSideObject")) # type: ignore[literal-required] + type: typing.Literal["addLink"] = "addLink" + + +class AddLinkEdit(core.ModelBase): + """AddLinkEdit""" + + object_type: ObjectTypeApiName = pydantic.Field(alias=str("objectType")) # type: ignore[literal-required] + primary_key: PrimaryKeyValue = pydantic.Field(alias=str("primaryKey")) # type: ignore[literal-required] + link_type: LinkTypeApiName = pydantic.Field(alias=str("linkType")) # type: ignore[literal-required] + linked_object_primary_key: PrimaryKeyValue = pydantic.Field(alias=str("linkedObjectPrimaryKey")) # type: ignore[literal-required] + type: typing.Literal["addLink"] = "addLink" + + +class AddObject(core.ModelBase): + """AddObject""" + + primary_key: PropertyValue = pydantic.Field(alias=str("primaryKey")) # type: ignore[literal-required] + object_type: ObjectTypeApiName = pydantic.Field(alias=str("objectType")) # type: ignore[literal-required] + type: typing.Literal["addObject"] = "addObject" + + +class AddObjectEdit(core.ModelBase): + """AddObjectEdit""" + + object_type: ObjectTypeApiName = pydantic.Field(alias=str("objectType")) # type: ignore[literal-required] + properties: typing.Dict[PropertyApiName, DataValue] + type: typing.Literal["addObject"] = "addObject" + + +class AddPropertyExpression(core.ModelBase): + """Adds two or more numeric values.""" + + properties: typing.List[DerivedPropertyDefinition] + type: typing.Literal["add"] = "add" + + +class Affix(core.ModelBase): + """Affix""" + + prefix: typing.Optional[PropertyTypeReferenceOrStringConstant] = None + postfix: typing.Optional[PropertyTypeReferenceOrStringConstant] = None + + +class AggregateObjectSetRequestV2(core.ModelBase): + """AggregateObjectSetRequestV2""" + + aggregation: typing.List[AggregationV2] + object_set: ObjectSet = pydantic.Field(alias=str("objectSet")) # type: ignore[literal-required] + group_by: typing.List[AggregationGroupByV2] = pydantic.Field(alias=str("groupBy")) # type: ignore[literal-required] + accuracy: typing.Optional[AggregationAccuracyRequest] = None + include_compute_usage: typing.Optional[core_models.IncludeComputeUsage] = pydantic.Field(alias=str("includeComputeUsage"), default=None) # type: ignore[literal-required] + + +class AggregateObjectsRequestV2(core.ModelBase): + """AggregateObjectsRequestV2""" + + aggregation: typing.List[AggregationV2] + where: typing.Optional[SearchJsonQueryV2] = None + group_by: typing.List[AggregationGroupByV2] = pydantic.Field(alias=str("groupBy")) # type: ignore[literal-required] + accuracy: typing.Optional[AggregationAccuracyRequest] = None + + +class AggregateObjectsResponseItemV2(core.ModelBase): + """AggregateObjectsResponseItemV2""" + + group: typing.Dict[AggregationGroupKeyV2, typing.Optional[AggregationGroupValueV2]] + metrics: typing.List[AggregationMetricResultV2] + + +class AggregateObjectsResponseV2(core.ModelBase): + """AggregateObjectsResponseV2""" + + excluded_items: typing.Optional[int] = pydantic.Field(alias=str("excludedItems"), default=None) # type: ignore[literal-required] + accuracy: AggregationAccuracy + data: typing.List[AggregateObjectsResponseItemV2] + compute_usage: typing.Optional[core_models.ComputeSeconds] = pydantic.Field(alias=str("computeUsage"), default=None) # type: ignore[literal-required] + + +class AggregateTimeSeries(core.ModelBase): + """AggregateTimeSeries""" + + method: TimeSeriesAggregationMethod + strategy: TimeSeriesAggregationStrategy + + +AggregationAccuracy = typing.Literal["ACCURATE", "APPROXIMATE"] +"""AggregationAccuracy""" + + +AggregationAccuracyRequest = typing.Literal["REQUIRE_ACCURATE", "ALLOW_APPROXIMATE"] +"""AggregationAccuracyRequest""" + + +class AggregationDurationGroupingV2(core.ModelBase): + """ + Divides objects into groups according to an interval. Note that this grouping applies only on date and timestamp types. + When grouping by `YEARS`, `QUARTERS`, `MONTHS`, or `WEEKS`, the `value` must be set to `1`. + """ + + field: PropertyApiName + value: int + unit: TimeUnit + type: typing.Literal["duration"] = "duration" + + +class AggregationExactGroupingV2(core.ModelBase): + """Divides objects into groups according to an exact value.""" + + field: PropertyApiName + max_group_count: typing.Optional[int] = pydantic.Field(alias=str("maxGroupCount"), default=None) # type: ignore[literal-required] + default_value: typing.Optional[str] = pydantic.Field(alias=str("defaultValue"), default=None) # type: ignore[literal-required] + """ + Includes a group with the specified default value that includes all objects where the specified field's value is null. + Cannot be used with includeNullValues. + """ + + include_null_values: typing.Optional[bool] = pydantic.Field(alias=str("includeNullValues"), default=None) # type: ignore[literal-required] + """ + Includes a group with a null value that includes all objects where the specified field's value is null. + Cannot be used with defaultValue or orderBy clauses on the aggregation. + """ + + type: typing.Literal["exact"] = "exact" + + +class AggregationFixedWidthGroupingV2(core.ModelBase): + """Divides objects into groups with the specified width.""" + + field: PropertyApiName + fixed_width: int = pydantic.Field(alias=str("fixedWidth")) # type: ignore[literal-required] + type: typing.Literal["fixedWidth"] = "fixedWidth" + + +AggregationGroupByV2 = typing_extensions.Annotated[ + typing.Union[ + "AggregationDurationGroupingV2", + "AggregationFixedWidthGroupingV2", + "AggregationRangesGroupingV2", + "AggregationExactGroupingV2", + ], + pydantic.Field(discriminator="type"), +] +"""Specifies a grouping for aggregation results.""" + + +AggregationGroupKeyV2 = str +"""AggregationGroupKeyV2""" + + +AggregationGroupValueV2 = typing.Any +"""AggregationGroupValueV2""" + + +AggregationMetricName = str +"""A user-specified alias for an aggregation metric name.""" + + +class AggregationMetricResultV2(core.ModelBase): + """AggregationMetricResultV2""" + + name: str + value: typing.Optional[typing.Any] = None + """ + The value of the metric. This will be a double in the case of + a numeric metric, or a date string in the case of a date metric. + """ + + +class AggregationRangeV2(core.ModelBase): + """Specifies a range from an inclusive start value to an exclusive end value.""" + + start_value: typing.Any = pydantic.Field(alias=str("startValue")) # type: ignore[literal-required] + """Inclusive start.""" + + end_value: typing.Any = pydantic.Field(alias=str("endValue")) # type: ignore[literal-required] + """Exclusive end.""" + + +class AggregationRangesGroupingV2(core.ModelBase): + """Divides objects into groups according to specified ranges.""" + + field: PropertyApiName + ranges: typing.List[AggregationRangeV2] + type: typing.Literal["ranges"] = "ranges" + + +AggregationV2 = typing_extensions.Annotated[ + typing.Union[ + "ApproximateDistinctAggregationV2", + "MinAggregationV2", + "AvgAggregationV2", + "MaxAggregationV2", + "ApproximatePercentileAggregationV2", + "CountAggregationV2", + "SumAggregationV2", + "ExactDistinctAggregationV2", + ], + pydantic.Field(discriminator="type"), +] +"""Specifies an aggregation function.""" + + +class AllOfRule(core.ModelBase): + """Matches intervals satisfying all the rules in the query""" + + rules: typing.List[IntervalQueryRule] + max_gaps: typing.Optional[int] = pydantic.Field(alias=str("maxGaps"), default=None) # type: ignore[literal-required] + """The maximum gaps between the intervals produced by the sub-rules. If not set, then gaps are not considered.""" + + ordered: bool + """If true, the matched intervals must occur in order.""" + + type: typing.Literal["allOf"] = "allOf" + + +class AndQueryV2(core.ModelBase): + """Returns objects where every query is satisfied.""" + + value: typing.List[SearchJsonQueryV2] + type: typing.Literal["and"] = "and" + + +class AnyOfRule(core.ModelBase): + """Matches intervals satisfying any of the rules in the query""" + + rules: typing.List[IntervalQueryRule] + type: typing.Literal["anyOf"] = "anyOf" + + +ApplyActionMode = typing.Literal["VALIDATE_ONLY", "VALIDATE_AND_EXECUTE"] +"""ApplyActionMode""" + + +class ApplyActionOverrides(core.ModelBase): + """ApplyActionOverrides""" + + unique_identifier_link_id_values: typing.Dict[UniqueIdentifierLinkId, UniqueIdentifierValue] = pydantic.Field(alias=str("uniqueIdentifierLinkIdValues")) # type: ignore[literal-required] + action_execution_time: typing.Optional[ActionExecutionTime] = pydantic.Field(alias=str("actionExecutionTime"), default=None) # type: ignore[literal-required] + + +class ApplyActionRequestOptions(core.ModelBase): + """ApplyActionRequestOptions""" + + mode: typing.Optional[ApplyActionMode] = None + return_edits: typing.Optional[ReturnEditsMode] = pydantic.Field(alias=str("returnEdits"), default=None) # type: ignore[literal-required] + + +class ApplyActionRequestV2(core.ModelBase): + """ApplyActionRequestV2""" + + options: typing.Optional[ApplyActionRequestOptions] = None + parameters: typing.Dict[ParameterId, typing.Optional[DataValue]] + + +class ApplyActionWithOverridesRequest(core.ModelBase): + """ApplyActionWithOverridesRequest""" + + request: ApplyActionRequestV2 + overrides: ApplyActionOverrides + + +class ApplyReducersAndExtractMainValueLoadLevel(core.ModelBase): + """Performs both apply reducers and extract main value to return the reduced main value.""" + + type: typing.Literal["applyReducersAndExtractMainValue"] = "applyReducersAndExtractMainValue" + + +class ApplyReducersLoadLevel(core.ModelBase): + """Returns a single value of an array as configured in the ontology.""" + + type: typing.Literal["applyReducers"] = "applyReducers" + + +class ApproximateDistinctAggregationV2(core.ModelBase): + """Computes an approximate number of distinct values for the provided field.""" + + field: PropertyApiName + name: typing.Optional[AggregationMetricName] = None + direction: typing.Optional[OrderByDirection] = None + type: typing.Literal["approximateDistinct"] = "approximateDistinct" + + +class ApproximatePercentileAggregationV2(core.ModelBase): + """Computes the approximate percentile value for the provided field. Requires Object Storage V2.""" + + field: PropertyApiName + name: typing.Optional[AggregationMetricName] = None + approximate_percentile: float = pydantic.Field(alias=str("approximatePercentile")) # type: ignore[literal-required] + direction: typing.Optional[OrderByDirection] = None + type: typing.Literal["approximatePercentile"] = "approximatePercentile" + + +class ArrayConstraint(core.ModelBase): + """ArrayConstraint""" + + minimum_size: typing.Optional[int] = pydantic.Field(alias=str("minimumSize"), default=None) # type: ignore[literal-required] + maximum_size: typing.Optional[int] = pydantic.Field(alias=str("maximumSize"), default=None) # type: ignore[literal-required] + unique_values: bool = pydantic.Field(alias=str("uniqueValues")) # type: ignore[literal-required] + value_constraint: typing.Optional[ValueTypeConstraint] = pydantic.Field(alias=str("valueConstraint"), default=None) # type: ignore[literal-required] + type: typing.Literal["array"] = "array" + + +class ArrayEvaluatedConstraint(core.ModelBase): + """Evaluated constraints of array parameters that support per-entry constraint evaluations.""" + + entries: typing.List[ArrayEntryEvaluatedConstraint] + type: typing.Literal["array"] = "array" + + +class ArraySizeConstraint(core.ModelBase): + """The parameter expects an array of values and the size of the array must fall within the defined range.""" + + lt: typing.Optional[typing.Any] = None + """Less than""" + + lte: typing.Optional[typing.Any] = None + """Less than or equal""" + + gt: typing.Optional[typing.Any] = None + """Greater than""" + + gte: typing.Optional[typing.Any] = None + """Greater than or equal""" + + type: typing.Literal["arraySize"] = "arraySize" + + +ArtifactRepositoryRid = core.RID +"""ArtifactRepositoryRid""" + + +AttachmentMetadataResponse = typing_extensions.Annotated[ + typing.Union["AttachmentV2", "ListAttachmentsResponseV2"], pydantic.Field(discriminator="type") +] +"""The attachment metadata response""" + + +AttachmentRid = core.RID +"""The unique resource identifier of an attachment.""" + + +class AttachmentV2(core.ModelBase): + """The representation of an attachment.""" + + rid: AttachmentRid + filename: core_models.Filename + size_bytes: core_models.SizeBytes = pydantic.Field(alias=str("sizeBytes")) # type: ignore[literal-required] + media_type: core_models.MediaType = pydantic.Field(alias=str("mediaType")) # type: ignore[literal-required] + type: typing.Literal["single"] = "single" + + +class AvgAggregationV2(core.ModelBase): + """Computes the average value for the provided field.""" + + field: PropertyApiName + name: typing.Optional[AggregationMetricName] = None + direction: typing.Optional[OrderByDirection] = None + type: typing.Literal["avg"] = "avg" + + +BatchActionObjectEdit = typing_extensions.Annotated[ + typing.Union["ModifyObject", "AddObject", "AddLink"], pydantic.Field(discriminator="type") +] +"""BatchActionObjectEdit""" + + +class BatchActionObjectEdits(core.ModelBase): + """BatchActionObjectEdits""" + + edits: typing.List[BatchActionObjectEdit] + added_object_count: int = pydantic.Field(alias=str("addedObjectCount")) # type: ignore[literal-required] + modified_objects_count: int = pydantic.Field(alias=str("modifiedObjectsCount")) # type: ignore[literal-required] + deleted_objects_count: int = pydantic.Field(alias=str("deletedObjectsCount")) # type: ignore[literal-required] + added_links_count: int = pydantic.Field(alias=str("addedLinksCount")) # type: ignore[literal-required] + deleted_links_count: int = pydantic.Field(alias=str("deletedLinksCount")) # type: ignore[literal-required] + type: typing.Literal["edits"] = "edits" + + +BatchActionResults = typing_extensions.Annotated[ + typing.Union["BatchActionObjectEdits", "ObjectTypeEdits"], pydantic.Field(discriminator="type") +] +"""BatchActionResults""" + + +class BatchApplyActionRequestItem(core.ModelBase): + """BatchApplyActionRequestItem""" + + parameters: typing.Dict[ParameterId, typing.Optional[DataValue]] + + +class BatchApplyActionRequestOptions(core.ModelBase): + """BatchApplyActionRequestOptions""" + + return_edits: typing.Optional[BatchReturnEditsMode] = pydantic.Field(alias=str("returnEdits"), default=None) # type: ignore[literal-required] + + +class BatchApplyActionRequestV2(core.ModelBase): + """BatchApplyActionRequestV2""" + + options: typing.Optional[BatchApplyActionRequestOptions] = None + requests: typing.List[BatchApplyActionRequestItem] + + +class BatchApplyActionResponseV2(core.ModelBase): + """BatchApplyActionResponseV2""" + + edits: typing.Optional[BatchActionResults] = None + + +BatchReturnEditsMode = typing.Literal["ALL", "NONE"] +"""BatchReturnEditsMode""" + + +class BatchedFunctionLogicRule(core.ModelBase): + """BatchedFunctionLogicRule""" + + object_set_rid_input_name: FunctionParameterName = pydantic.Field(alias=str("objectSetRidInputName")) # type: ignore[literal-required] + function_rule: FunctionLogicRule = pydantic.Field(alias=str("functionRule")) # type: ignore[literal-required] + type: typing.Literal["batchedFunction"] = "batchedFunction" + + +class BlueprintIcon(core.ModelBase): + """BlueprintIcon""" + + color: str + """A hexadecimal color code.""" + + name: str + """ + The [name](https://blueprintjs.com/docs/#icons/icons-list) of the Blueprint icon. + Used to specify the Blueprint icon to represent the object type in a React app. + """ + + type: typing.Literal["blueprint"] = "blueprint" + + +class BoundingBoxValue(core.ModelBase): + """The top left and bottom right coordinate points that make up the bounding box.""" + + top_left: WithinBoundingBoxPoint = pydantic.Field(alias=str("topLeft")) # type: ignore[literal-required] + bottom_right: WithinBoundingBoxPoint = pydantic.Field(alias=str("bottomRight")) # type: ignore[literal-required] + + +class CenterPoint(core.ModelBase): + """The coordinate point to use as the center of the distance query.""" + + center: CenterPointTypes + distance: core_models.Distance + + +class ContainsAllTermsInOrderPrefixLastTerm(core.ModelBase): + """ + Returns objects where the specified field contains all of the terms in the order provided, + but they do have to be adjacent to each other. + The last term can be a partial prefix match. Allows you to specify a property to query on + by a variety of means. Either `field` or `propertyIdentifier` can be supplied, but not both. + """ + + field: typing.Optional[PropertyApiName] = None + property_identifier: typing.Optional[PropertyIdentifier] = pydantic.Field(alias=str("propertyIdentifier"), default=None) # type: ignore[literal-required] + value: str + type: typing.Literal["containsAllTermsInOrderPrefixLastTerm"] = ( + "containsAllTermsInOrderPrefixLastTerm" + ) + + +class ContainsAllTermsInOrderQuery(core.ModelBase): + """ + Returns objects where the specified field contains all of the terms in the order provided, + but they do have to be adjacent to each other. Allows you to specify a property to query on + by a variety of means. Either `field` or `propertyIdentifier` must be supplied, but not both. + """ + + field: typing.Optional[PropertyApiName] = None + property_identifier: typing.Optional[PropertyIdentifier] = pydantic.Field(alias=str("propertyIdentifier"), default=None) # type: ignore[literal-required] + value: str + type: typing.Literal["containsAllTermsInOrder"] = "containsAllTermsInOrder" + + +class ContainsAllTermsQuery(core.ModelBase): + """ + Returns objects where the specified field contains all of the whitespace separated words in any + order in the provided value. This query supports fuzzy matching. Allows you to specify a property to query on + by a variety of means. Either `field` or `propertyIdentifier` must be supplied, but not both. + """ + + field: typing.Optional[PropertyApiName] = None + property_identifier: typing.Optional[PropertyIdentifier] = pydantic.Field(alias=str("propertyIdentifier"), default=None) # type: ignore[literal-required] + value: str + fuzzy: typing.Optional[FuzzyV2] = None + type: typing.Literal["containsAllTerms"] = "containsAllTerms" + + +class ContainsAnyTermQuery(core.ModelBase): + """ + Returns objects where the specified field contains any of the whitespace separated words in any + order in the provided value. This query supports fuzzy matching. Allows you to specify a property to query on + by a variety of means. Either `field` or `propertyIdentifier` must be supplied, but not both. + """ + + field: typing.Optional[PropertyApiName] = None + property_identifier: typing.Optional[PropertyIdentifier] = pydantic.Field(alias=str("propertyIdentifier"), default=None) # type: ignore[literal-required] + value: str + fuzzy: typing.Optional[FuzzyV2] = None + type: typing.Literal["containsAnyTerm"] = "containsAnyTerm" + + +class ContainsQueryV2(core.ModelBase): + """ + Returns objects where the specified array contains a value. Allows you to specify a property to query on by a + variety of means. Either `field` or `propertyIdentifier` must be supplied, but not both. + """ + + field: typing.Optional[PropertyApiName] = None + property_identifier: typing.Optional[PropertyIdentifier] = pydantic.Field(alias=str("propertyIdentifier"), default=None) # type: ignore[literal-required] + value: PropertyValue + type: typing.Literal["contains"] = "contains" + + +class CountAggregationV2(core.ModelBase): + """Computes the total count of objects.""" + + name: typing.Optional[AggregationMetricName] = None + direction: typing.Optional[OrderByDirection] = None + type: typing.Literal["count"] = "count" + + +class CountObjectsResponseV2(core.ModelBase): + """CountObjectsResponseV2""" + + count: typing.Optional[int] = None + + +class CreateInterfaceLinkLogicRule(core.ModelBase): + """CreateInterfaceLinkLogicRule""" + + interface_type_api_name: InterfaceTypeApiName = pydantic.Field(alias=str("interfaceTypeApiName")) # type: ignore[literal-required] + interface_link_type_api_name: InterfaceLinkTypeApiName = pydantic.Field(alias=str("interfaceLinkTypeApiName")) # type: ignore[literal-required] + source_object: ParameterId = pydantic.Field(alias=str("sourceObject")) # type: ignore[literal-required] + target_object: ParameterId = pydantic.Field(alias=str("targetObject")) # type: ignore[literal-required] + type: typing.Literal["createInterfaceLink"] = "createInterfaceLink" + + +class CreateInterfaceLogicRule(core.ModelBase): + """CreateInterfaceLogicRule""" + + interface_type_api_name: InterfaceTypeApiName = pydantic.Field(alias=str("interfaceTypeApiName")) # type: ignore[literal-required] + object_type: ParameterId = pydantic.Field(alias=str("objectType")) # type: ignore[literal-required] + shared_property_arguments: typing.Dict[SharedPropertyTypeApiName, LogicRuleArgument] = pydantic.Field(alias=str("sharedPropertyArguments")) # type: ignore[literal-required] + struct_property_arguments: typing.Dict[SharedPropertyTypeApiName, typing.Dict[StructFieldApiName, StructFieldArgument]] = pydantic.Field(alias=str("structPropertyArguments")) # type: ignore[literal-required] + type: typing.Literal["createInterface"] = "createInterface" + + +class CreateInterfaceObjectRule(core.ModelBase): + """CreateInterfaceObjectRule""" + + interface_type_api_name: InterfaceTypeApiName = pydantic.Field(alias=str("interfaceTypeApiName")) # type: ignore[literal-required] + type: typing.Literal["createInterfaceObject"] = "createInterfaceObject" + + +class CreateLinkLogicRule(core.ModelBase): + """CreateLinkLogicRule""" + + link_type_api_name: LinkTypeApiName = pydantic.Field(alias=str("linkTypeApiName")) # type: ignore[literal-required] + source_object: ParameterId = pydantic.Field(alias=str("sourceObject")) # type: ignore[literal-required] + target_object: ParameterId = pydantic.Field(alias=str("targetObject")) # type: ignore[literal-required] + type: typing.Literal["createLink"] = "createLink" + + +class CreateLinkRule(core.ModelBase): + """CreateLinkRule""" + + link_type_api_name_ato_b: LinkTypeApiName = pydantic.Field(alias=str("linkTypeApiNameAtoB")) # type: ignore[literal-required] + link_type_api_name_bto_a: LinkTypeApiName = pydantic.Field(alias=str("linkTypeApiNameBtoA")) # type: ignore[literal-required] + a_side_object_type_api_name: ObjectTypeApiName = pydantic.Field(alias=str("aSideObjectTypeApiName")) # type: ignore[literal-required] + b_side_object_type_api_name: ObjectTypeApiName = pydantic.Field(alias=str("bSideObjectTypeApiName")) # type: ignore[literal-required] + type: typing.Literal["createLink"] = "createLink" + + +class CreateObjectLogicRule(core.ModelBase): + """CreateObjectLogicRule""" + + object_type_api_name: ObjectTypeApiName = pydantic.Field(alias=str("objectTypeApiName")) # type: ignore[literal-required] + property_arguments: typing.Dict[PropertyApiName, LogicRuleArgument] = pydantic.Field(alias=str("propertyArguments")) # type: ignore[literal-required] + struct_property_arguments: typing.Dict[PropertyApiName, typing.Dict[StructFieldApiName, StructFieldArgument]] = pydantic.Field(alias=str("structPropertyArguments")) # type: ignore[literal-required] + type: typing.Literal["createObject"] = "createObject" + + +class CreateObjectRule(core.ModelBase): + """CreateObjectRule""" + + object_type_api_name: ObjectTypeApiName = pydantic.Field(alias=str("objectTypeApiName")) # type: ignore[literal-required] + type: typing.Literal["createObject"] = "createObject" + + +class CreateOrModifyObjectLogicRule(core.ModelBase): + """CreateOrModifyObjectLogicRule""" + + object_type_api_name: ObjectTypeApiName = pydantic.Field(alias=str("objectTypeApiName")) # type: ignore[literal-required] + property_arguments: typing.Dict[PropertyApiName, LogicRuleArgument] = pydantic.Field(alias=str("propertyArguments")) # type: ignore[literal-required] + struct_property_arguments: typing.Dict[PropertyApiName, typing.Dict[StructFieldApiName, StructFieldArgument]] = pydantic.Field(alias=str("structPropertyArguments")) # type: ignore[literal-required] + type: typing.Literal["createOrModifyObject"] = "createOrModifyObject" + + +class CreateOrModifyObjectLogicRuleV2(core.ModelBase): + """CreateOrModifyObjectLogicRuleV2""" + + object_to_modify: ParameterId = pydantic.Field(alias=str("objectToModify")) # type: ignore[literal-required] + property_arguments: typing.Dict[PropertyApiName, LogicRuleArgument] = pydantic.Field(alias=str("propertyArguments")) # type: ignore[literal-required] + struct_property_arguments: typing.Dict[PropertyApiName, typing.Dict[StructFieldApiName, StructFieldArgument]] = pydantic.Field(alias=str("structPropertyArguments")) # type: ignore[literal-required] + type: typing.Literal["createOrModifyObjectV2"] = "createOrModifyObjectV2" + + +class CreateTemporaryObjectSetRequestV2(core.ModelBase): + """CreateTemporaryObjectSetRequestV2""" + + object_set: ObjectSet = pydantic.Field(alias=str("objectSet")) # type: ignore[literal-required] + + +class CreateTemporaryObjectSetResponseV2(core.ModelBase): + """CreateTemporaryObjectSetResponseV2""" + + object_set_rid: ObjectSetRid = pydantic.Field(alias=str("objectSetRid")) # type: ignore[literal-required] + + +class CurrentTimeArgument(core.ModelBase): + """Represents the current time argument in a logic rule.""" + + type: typing.Literal["currentTime"] = "currentTime" + + +class CurrentUserArgument(core.ModelBase): + """Represents the current user argument in a logic rule.""" + + type: typing.Literal["currentUser"] = "currentUser" + + +DataValue = typing.Any +""" +Represents the value of data in the following format. Note that these values can be nested, for example an array of structs. +| Type | JSON encoding | Example | +|-------------------------------------|-------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Array | array | `["alpha", "bravo", "charlie"]` | +| Attachment | string | `"ri.attachments.main.attachment.2f944bae-5851-4204-8615-920c969a9f2e"` | +| Boolean | boolean | `true` | +| Byte | number | `31` | +| CipherText | string | `"CIPHER::ri.bellaso.main.cipher-channel.e414ab9e-b606-499a-a0e1-844fa296ba7e::unzjs3VifsTxuIpf1fH1CJ7OaPBr2bzMMdozPaZJtCii8vVG60yXIEmzoOJaEl9mfFFe::CIPHER"` | +| Date | ISO 8601 extended local date string | `"2021-05-01"` | +| Decimal | string | `"2.718281828"` | +| Double | number | `3.14159265` | +| EntrySet | array of JSON objects | `[{"key": "EMP1234", "value": "true"}, {"key": "EMP4444", "value": "false"}]` | +| Float | number | `3.14159265` | +| Integer | number | `238940` | +| Long | string | `"58319870951433"` | +| Marking | string | `"MU"` | +| Null | null | `null` | +| Object Set | string OR the object set definition | `ri.object-set.main.versioned-object-set.h13274m8-23f5-431c-8aee-a4554157c57z` | +| Ontology Object Reference | JSON encoding of the object's primary key | `10033123` or `"EMP1234"` | +| Ontology Interface Object Reference | JSON encoding of the object's API name and primary key| `{"objectTypeApiName":"Employee", "primaryKeyValue":"EMP1234"}` | +| Ontology Object Type Reference | string of the object type's api name | `"Employee"` | +| Set | array | `["alpha", "bravo", "charlie"]` | +| Short | number | `8739` | +| String | string | `"Call me Ishmael"` | +| Struct | JSON object | `{"name": "John Doe", "age": 42}` | +| TwoDimensionalAggregation | JSON object | `{"groups": [{"key": "alpha", "value": 100}, {"key": "beta", "value": 101}]}` | +| ThreeDimensionalAggregation | JSON object | `{"groups": [{"key": "NYC", "groups": [{"key": "Engineer", "value" : 100}]}]}` | +| Timestamp | ISO 8601 extended offset date-time string in UTC zone | `"2021-01-04T05:00:00Z"` | +""" + + +DatetimeFormat = typing_extensions.Annotated[ + typing.Union["DatetimeStringFormat", "DatetimeLocalizedFormat"], + pydantic.Field(discriminator="type"), +] +"""DatetimeFormat""" + + +class DatetimeLocalizedFormat(core.ModelBase): + """Predefined localized formatting options.""" + + format: DatetimeLocalizedFormatType + type: typing.Literal["localizedFormat"] = "localizedFormat" + + +DatetimeLocalizedFormatType = typing.Literal[ + "DATE_FORMAT_RELATIVE_TO_NOW", + "DATE_FORMAT_DATE", + "DATE_FORMAT_YEAR_AND_MONTH", + "DATE_FORMAT_DATE_TIME", + "DATE_FORMAT_DATE_TIME_SHORT", + "DATE_FORMAT_TIME", + "DATE_FORMAT_ISO_INSTANT", +] +"""Localized date/time format types.""" + + +class DatetimeStringFormat(core.ModelBase): + """A strictly specified date format pattern.""" + + pattern: str + """A valid format string composed of date/time patterns.""" + + type: typing.Literal["stringFormat"] = "stringFormat" + + +DatetimeTimezone = typing_extensions.Annotated[ + typing.Union["DatetimeTimezoneStatic", "DatetimeTimezoneUser"], + pydantic.Field(discriminator="type"), +] +"""DatetimeTimezone""" + + +class DatetimeTimezoneStatic(core.ModelBase): + """DatetimeTimezoneStatic""" + + zone_id: PropertyTypeReferenceOrStringConstant = pydantic.Field(alias=str("zoneId")) # type: ignore[literal-required] + type: typing.Literal["static"] = "static" + + +class DatetimeTimezoneUser(core.ModelBase): + """The user's local timezone.""" + + type: typing.Literal["user"] = "user" + + +class DecryptionResult(core.ModelBase): + """The result of a CipherText decryption. If successful, the plaintext decrypted value will be returned. Otherwise, an error will be thrown.""" + + plaintext: typing.Optional[Plaintext] = None + + +class DeleteInterfaceLinkLogicRule(core.ModelBase): + """DeleteInterfaceLinkLogicRule""" + + interface_type_api_name: InterfaceTypeApiName = pydantic.Field(alias=str("interfaceTypeApiName")) # type: ignore[literal-required] + interface_link_type_api_name: InterfaceLinkTypeApiName = pydantic.Field(alias=str("interfaceLinkTypeApiName")) # type: ignore[literal-required] + source_object: ParameterId = pydantic.Field(alias=str("sourceObject")) # type: ignore[literal-required] + target_object: ParameterId = pydantic.Field(alias=str("targetObject")) # type: ignore[literal-required] + type: typing.Literal["deleteInterfaceLink"] = "deleteInterfaceLink" + + +class DeleteInterfaceObjectRule(core.ModelBase): + """DeleteInterfaceObjectRule""" + + interface_type_api_name: InterfaceTypeApiName = pydantic.Field(alias=str("interfaceTypeApiName")) # type: ignore[literal-required] + type: typing.Literal["deleteInterfaceObject"] = "deleteInterfaceObject" + + +class DeleteLink(core.ModelBase): + """DeleteLink""" + + link_type_api_name_ato_b: LinkTypeApiName = pydantic.Field(alias=str("linkTypeApiNameAtoB")) # type: ignore[literal-required] + link_type_api_name_bto_a: LinkTypeApiName = pydantic.Field(alias=str("linkTypeApiNameBtoA")) # type: ignore[literal-required] + a_side_object: LinkSideObject = pydantic.Field(alias=str("aSideObject")) # type: ignore[literal-required] + b_side_object: LinkSideObject = pydantic.Field(alias=str("bSideObject")) # type: ignore[literal-required] + type: typing.Literal["deleteLink"] = "deleteLink" + + +class DeleteLinkEdit(core.ModelBase): + """DeleteLinkEdit""" + + object_type: ObjectTypeApiName = pydantic.Field(alias=str("objectType")) # type: ignore[literal-required] + primary_key: PrimaryKeyValue = pydantic.Field(alias=str("primaryKey")) # type: ignore[literal-required] + link_type: LinkTypeApiName = pydantic.Field(alias=str("linkType")) # type: ignore[literal-required] + linked_object_primary_key: PrimaryKeyValue = pydantic.Field(alias=str("linkedObjectPrimaryKey")) # type: ignore[literal-required] + type: typing.Literal["removeLink"] = "removeLink" + + +class DeleteLinkLogicRule(core.ModelBase): + """DeleteLinkLogicRule""" + + link_type_api_name: LinkTypeApiName = pydantic.Field(alias=str("linkTypeApiName")) # type: ignore[literal-required] + source_object: ParameterId = pydantic.Field(alias=str("sourceObject")) # type: ignore[literal-required] + target_object: ParameterId = pydantic.Field(alias=str("targetObject")) # type: ignore[literal-required] + type: typing.Literal["deleteLink"] = "deleteLink" + + +class DeleteLinkRule(core.ModelBase): + """DeleteLinkRule""" + + link_type_api_name_ato_b: LinkTypeApiName = pydantic.Field(alias=str("linkTypeApiNameAtoB")) # type: ignore[literal-required] + link_type_api_name_bto_a: LinkTypeApiName = pydantic.Field(alias=str("linkTypeApiNameBtoA")) # type: ignore[literal-required] + a_side_object_type_api_name: ObjectTypeApiName = pydantic.Field(alias=str("aSideObjectTypeApiName")) # type: ignore[literal-required] + b_side_object_type_api_name: ObjectTypeApiName = pydantic.Field(alias=str("bSideObjectTypeApiName")) # type: ignore[literal-required] + type: typing.Literal["deleteLink"] = "deleteLink" + + +class DeleteObject(core.ModelBase): + """DeleteObject""" + + primary_key: PropertyValue = pydantic.Field(alias=str("primaryKey")) # type: ignore[literal-required] + object_type: ObjectTypeApiName = pydantic.Field(alias=str("objectType")) # type: ignore[literal-required] + type: typing.Literal["deleteObject"] = "deleteObject" + + +class DeleteObjectEdit(core.ModelBase): + """DeleteObjectEdit""" + + object_type: ObjectTypeApiName = pydantic.Field(alias=str("objectType")) # type: ignore[literal-required] + primary_key: PropertyValue = pydantic.Field(alias=str("primaryKey")) # type: ignore[literal-required] + type: typing.Literal["deleteObject"] = "deleteObject" + + +class DeleteObjectLogicRule(core.ModelBase): + """DeleteObjectLogicRule""" + + object_to_delete: ParameterId = pydantic.Field(alias=str("objectToDelete")) # type: ignore[literal-required] + type: typing.Literal["deleteObject"] = "deleteObject" + + +class DeleteObjectRule(core.ModelBase): + """DeleteObjectRule""" + + object_type_api_name: ObjectTypeApiName = pydantic.Field(alias=str("objectTypeApiName")) # type: ignore[literal-required] + type: typing.Literal["deleteObject"] = "deleteObject" + + +class DeprecatedPropertyTypeStatus(core.ModelBase): + """ + This status indicates that the PropertyType is reaching the end of its life and will be removed as per the + deadline specified. + """ + + message: str + deadline: core.AwareDatetime + replaced_by: typing.Optional[PropertyTypeRid] = pydantic.Field(alias=str("replacedBy"), default=None) # type: ignore[literal-required] + type: typing.Literal["deprecated"] = "deprecated" + + +DerivedPropertyApiName = str +"""The name of the derived property that will be returned.""" + + +DerivedPropertyDefinition = typing_extensions.Annotated[ + typing.Union[ + "AddPropertyExpression", + "AbsoluteValuePropertyExpression", + "ExtractPropertyExpression", + "SelectedPropertyExpression", + "NegatePropertyExpression", + "SubtractPropertyExpression", + "PropertyApiNameSelector", + "LeastPropertyExpression", + "DividePropertyExpression", + "MultiplyPropertyExpression", + "GreatestPropertyExpression", + ], + pydantic.Field(discriminator="type"), +] +"""Definition of a derived property.""" + + +class DividePropertyExpression(core.ModelBase): + """Divides the left numeric value by the right numeric value.""" + + left: DerivedPropertyDefinition + right: DerivedPropertyDefinition + type: typing.Literal["divide"] = "divide" + + +class DoesNotIntersectBoundingBoxQuery(core.ModelBase): + """ + Returns objects where the specified field does not intersect the bounding box provided. Allows you to specify a + property to query on by a variety of means. Either `field` or `propertyIdentifier` must be supplied, but not + both. + """ + + field: typing.Optional[PropertyApiName] = None + property_identifier: typing.Optional[PropertyIdentifier] = pydantic.Field(alias=str("propertyIdentifier"), default=None) # type: ignore[literal-required] + value: BoundingBoxValue + type: typing.Literal["doesNotIntersectBoundingBox"] = "doesNotIntersectBoundingBox" + + +class DoesNotIntersectPolygonQuery(core.ModelBase): + """ + Returns objects where the specified field does not intersect the polygon provided. Allows you to specify a + property to query on by a variety of means. Either `field` or `propertyIdentifier` must be supplied, but not + both. + """ + + field: typing.Optional[PropertyApiName] = None + property_identifier: typing.Optional[PropertyIdentifier] = pydantic.Field(alias=str("propertyIdentifier"), default=None) # type: ignore[literal-required] + value: PolygonValue + type: typing.Literal["doesNotIntersectPolygon"] = "doesNotIntersectPolygon" + + +class DoubleVector(core.ModelBase): + """ + The vector to search with. The vector must be of the same dimension as the vectors stored in the provided + propertyIdentifier. + """ + + value: typing.List[float] + type: typing.Literal["vector"] = "vector" + + +DurationBaseValue = typing.Literal["SECONDS", "MILLISECONDS"] +"""Specifies the unit of the input duration value.""" + + +DurationFormatStyle = typing_extensions.Annotated[ + typing.Union["HumanReadableFormat", "TimeCodeFormat"], pydantic.Field(discriminator="type") +] +"""DurationFormatStyle""" + + +DurationPrecision = typing.Literal["DAYS", "HOURS", "MINUTES", "SECONDS", "AUTO"] +"""Specifies the maximum precision to apply when formatting a duration.""" + + +class EntrySetType(core.ModelBase): + """EntrySetType""" + + key_type: QueryDataType = pydantic.Field(alias=str("keyType")) # type: ignore[literal-required] + value_type: QueryDataType = pydantic.Field(alias=str("valueType")) # type: ignore[literal-required] + type: typing.Literal["entrySet"] = "entrySet" + + +class EnumConstraint(core.ModelBase): + """EnumConstraint""" + + options: typing.List[typing.Optional[PropertyValue]] + type: typing.Literal["enum"] = "enum" + + +class EqualsQueryV2(core.ModelBase): + """ + Returns objects where the specified field is equal to a value. Allows you to specify a property to query on + by a variety of means. Either `field` or `propertyIdentifier` must be supplied, but not both. + """ + + field: typing.Optional[PropertyApiName] = None + property_identifier: typing.Optional[PropertyIdentifier] = pydantic.Field(alias=str("propertyIdentifier"), default=None) # type: ignore[literal-required] + value: PropertyValue + type: typing.Literal["eq"] = "eq" + + +class ExactDistinctAggregationV2(core.ModelBase): + """Computes an exact number of distinct values for the provided field. May be slower than an approximate distinct aggregation. Requires Object Storage V2.""" + + field: PropertyApiName + name: typing.Optional[AggregationMetricName] = None + direction: typing.Optional[OrderByDirection] = None + type: typing.Literal["exactDistinct"] = "exactDistinct" + + +class ExamplePropertyTypeStatus(core.ModelBase): + """ + This status indicates that the PropertyType is an example. It is backed by notional data that should not be + used for actual workflows, but can be used to test those workflows. + """ + + type: typing.Literal["example"] = "example" + + +class ExecuteQueryRequest(core.ModelBase): + """ExecuteQueryRequest""" + + parameters: typing.Dict[ParameterId, typing.Optional[DataValue]] + + +class ExecuteQueryResponse(core.ModelBase): + """ExecuteQueryResponse""" + + value: DataValue + + +class ExperimentalPropertyTypeStatus(core.ModelBase): + """This status indicates that the PropertyType is in development.""" + + type: typing.Literal["experimental"] = "experimental" + + +ExtractDatePart = typing.Literal["DAYS", "MONTHS", "QUARTERS", "YEARS"] +"""ExtractDatePart""" + + +class ExtractMainValueLoadLevel(core.ModelBase): + """Returns the main value of a struct as configured in the ontology.""" + + type: typing.Literal["extractMainValue"] = "extractMainValue" + + +class ExtractPropertyExpression(core.ModelBase): + """Extracts the specified date part from a date or timestamp.""" + + property: DerivedPropertyDefinition + part: ExtractDatePart + type: typing.Literal["extract"] = "extract" + + +FilterValue = str +""" +Represents the value of a property filter. For instance, false is the FilterValue in +`properties.{propertyApiName}.isNull=false`. +""" + + +FixedValuesMapKey = int +"""Integer key for fixed value mapping.""" + + +class FunctionLogicRule(core.ModelBase): + """FunctionLogicRule""" + + function_rid: FunctionRid = pydantic.Field(alias=str("functionRid")) # type: ignore[literal-required] + function_version: FunctionVersion = pydantic.Field(alias=str("functionVersion")) # type: ignore[literal-required] + function_input_values: typing.Dict[FunctionParameterName, LogicRuleArgument] = pydantic.Field(alias=str("functionInputValues")) # type: ignore[literal-required] + type: typing.Literal["function"] = "function" + + +FunctionParameterName = str +"""The name of an input to a function.""" + + +FunctionRid = core.RID +"""The unique resource identifier of a Function, useful for interacting with other Foundry APIs.""" + + +FunctionVersion = str +""" +The version of the given Function, written `..-`, where `-` is optional. +Examples: `1.2.3`, `1.2.3-rc1`. +""" + + +FuzzyV2 = bool +"""Setting fuzzy to `true` allows approximate matching in search queries that support it.""" + + +class GetSelectedPropertyOperation(core.ModelBase): + """ + Gets a single value of a property. Throws if the target object set is on the MANY side of the link and could + explode the cardinality. + + Use collectList or collectSet which will return a list of values in that case. + """ + + selected_property_api_name: PropertyApiName = pydantic.Field(alias=str("selectedPropertyApiName")) # type: ignore[literal-required] + type: typing.Literal["get"] = "get" + + +class GreatestPropertyExpression(core.ModelBase): + """Finds greatest of two or more numeric, date or timestamp values.""" + + properties: typing.List[DerivedPropertyDefinition] + type: typing.Literal["greatest"] = "greatest" + + +class GroupMemberConstraint(core.ModelBase): + """The parameter value must be the user id of a member belonging to at least one of the groups defined by the constraint.""" + + type: typing.Literal["groupMember"] = "groupMember" + + +class GtQueryV2(core.ModelBase): + """ + Returns objects where the specified field is greater than a value. Allows you to specify a property to query on + by a variety of means. Either `field` or `propertyIdentifier` must be supplied, but not both. + """ + + field: typing.Optional[PropertyApiName] = None + property_identifier: typing.Optional[PropertyIdentifier] = pydantic.Field(alias=str("propertyIdentifier"), default=None) # type: ignore[literal-required] + value: PropertyValue + type: typing.Literal["gt"] = "gt" + + +class GteQueryV2(core.ModelBase): + """ + Returns objects where the specified field is greater than or equal to a value. Allows you to specify a property + to query on by a variety of means. Either `field` or `propertyIdentifier` must be supplied, but not both. + """ + + field: typing.Optional[PropertyApiName] = None + property_identifier: typing.Optional[PropertyIdentifier] = pydantic.Field(alias=str("propertyIdentifier"), default=None) # type: ignore[literal-required] + value: PropertyValue + type: typing.Literal["gte"] = "gte" + + +class HumanReadableFormat(core.ModelBase): + """Formats the duration as a human-readable written string.""" + + show_full_units: typing.Optional[bool] = pydantic.Field(alias=str("showFullUnits"), default=None) # type: ignore[literal-required] + """Whether to show full or abbreviated time units.""" + + type: typing.Literal["humanReadable"] = "humanReadable" + + +class InQuery(core.ModelBase): + """ + Returns objects where the specified field equals any of the provided values. Allows you to + specify a property to query on by a variety of means. Either `field` or `propertyIdentifier` must be supplied, + but not both. + """ + + field: typing.Optional[PropertyApiName] = None + property_identifier: typing.Optional[PropertyIdentifier] = pydantic.Field(alias=str("propertyIdentifier"), default=None) # type: ignore[literal-required] + value: typing.List[PropertyValue] + type: typing.Literal["in"] = "in" + + +class InterfaceDefinedPropertyType(core.ModelBase): + """ + An interface property type with an additional field to indicate constraints that need to be satisfied by + implementing object property types. + """ + + rid: InterfacePropertyTypeRid + api_name: InterfacePropertyApiName = pydantic.Field(alias=str("apiName")) # type: ignore[literal-required] + display_name: core_models.DisplayName = pydantic.Field(alias=str("displayName")) # type: ignore[literal-required] + description: typing.Optional[str] = None + """The description of the interface property type.""" + + data_type: ObjectPropertyType = pydantic.Field(alias=str("dataType")) # type: ignore[literal-required] + value_type_api_name: typing.Optional[ValueTypeApiName] = pydantic.Field(alias=str("valueTypeApiName"), default=None) # type: ignore[literal-required] + require_implementation: bool = pydantic.Field(alias=str("requireImplementation")) # type: ignore[literal-required] + """Whether each implementing object type must declare an implementation for this property.""" + + type: typing.Literal["interfaceDefinedPropertyType"] = "interfaceDefinedPropertyType" + + +class InterfaceLinkType(core.ModelBase): + """ + A link type constraint defined at the interface level where the implementation of the links is provided + by the implementing object types. + """ + + rid: InterfaceLinkTypeRid + api_name: InterfaceLinkTypeApiName = pydantic.Field(alias=str("apiName")) # type: ignore[literal-required] + display_name: core_models.DisplayName = pydantic.Field(alias=str("displayName")) # type: ignore[literal-required] + description: typing.Optional[str] = None + """The description of the interface link type.""" + + linked_entity_api_name: InterfaceLinkTypeLinkedEntityApiName = pydantic.Field(alias=str("linkedEntityApiName")) # type: ignore[literal-required] + cardinality: InterfaceLinkTypeCardinality + required: bool + """Whether each implementing object type must declare at least one implementation of this link.""" + + +InterfaceLinkTypeApiName = str +""" +The name of the interface link type in the API. To find the API name for your Interface Link Type, check the +[Ontology Manager](https://palantir.com/docs/foundry/ontology-manager/overview/). +""" + + +InterfaceLinkTypeCardinality = typing.Literal["ONE", "MANY"] +""" +The cardinality of the link in the given direction. Cardinality can be "ONE", meaning an object can +link to zero or one other objects, or "MANY", meaning an object can link to any number of other objects. +""" + + +InterfaceLinkTypeLinkedEntityApiName = typing_extensions.Annotated[ + typing.Union["LinkedObjectTypeApiName", "LinkedInterfaceTypeApiName"], + pydantic.Field(discriminator="type"), +] +"""A reference to the linked entity. This can either be an object or an interface type.""" + + +InterfaceLinkTypeRid = core.RID +"""The unique resource identifier of an interface link type, useful for interacting with other Foundry APIs.""" + + +class InterfaceParameterPropertyArgument(core.ModelBase): + """Represents an interface parameter property argument in a logic rule.""" + + parameter_id: ParameterId = pydantic.Field(alias=str("parameterId")) # type: ignore[literal-required] + shared_property_type_rid: core.RID = pydantic.Field(alias=str("sharedPropertyTypeRid")) # type: ignore[literal-required] + type: typing.Literal["interfaceParameterPropertyValue"] = "interfaceParameterPropertyValue" + + +InterfacePropertyApiName = str +""" +The name of the interface property type in the API in lowerCamelCase format. To find the API name for your +interface property type, use the `List interface types` endpoint and check the `allPropertiesV2` field or check +the **Ontology Manager**. +""" + + +class InterfacePropertyLocalPropertyImplementation(core.ModelBase): + """An implementation of an interface property via a local property.""" + + property_api_name: PropertyApiName = pydantic.Field(alias=str("propertyApiName")) # type: ignore[literal-required] + type: typing.Literal["localPropertyImplementation"] = "localPropertyImplementation" + + +class InterfacePropertyReducedPropertyImplementation(core.ModelBase): + """An implementation of an interface property via applying reducers on the nested implementation.""" + + implementation: NestedInterfacePropertyTypeImplementation + type: typing.Literal["reducedPropertyImplementation"] = "reducedPropertyImplementation" + + +class InterfacePropertyStructFieldImplementation(core.ModelBase): + """An implementation of an interface property via the field of a local struct property.""" + + struct_field_of_property: StructFieldOfPropertyImplementation = pydantic.Field(alias=str("structFieldOfProperty")) # type: ignore[literal-required] + type: typing.Literal["structFieldImplementation"] = "structFieldImplementation" + + +class InterfacePropertyStructImplementation(core.ModelBase): + """ + An implementation of a struct interface property via a local struct property. Specifies a mapping of interface + struct fields to local struct fields or properties. + """ + + mapping: InterfacePropertyStructImplementationMapping + type: typing.Literal["structImplementation"] = "structImplementation" + + +InterfacePropertyStructImplementationMapping = typing.Dict[ + "StructFieldApiName", "PropertyOrStructFieldOfPropertyImplementation" +] +""" +An implementation of a struct interface property via a local struct property. Specifies a mapping of interface +struct fields to local struct fields or properties. +""" + + +InterfacePropertyType = typing_extensions.Annotated[ + typing.Union["InterfaceDefinedPropertyType", "InterfaceSharedPropertyType"], + pydantic.Field(discriminator="type"), +] +""" +The definition of an interface property type on an interface. An interface property can either be backed by a +shared property type or defined on the interface directly. +""" + + +InterfacePropertyTypeImplementation = typing_extensions.Annotated[ + typing.Union[ + "InterfacePropertyStructFieldImplementation", + "InterfacePropertyStructImplementation", + "InterfacePropertyLocalPropertyImplementation", + "InterfacePropertyReducedPropertyImplementation", + ], + pydantic.Field(discriminator="type"), +] +"""Describes how an object type implements an interface property.""" + + +InterfacePropertyTypeRid = core.RID +"""The unique resource identifier of an interface property type, useful for interacting with other Foundry APIs.""" + + +class InterfaceSharedPropertyType(core.ModelBase): + """ + A shared property type with an additional field to indicate whether the property must be included on every + object type that implements the interface, or whether it is optional. + """ + + rid: SharedPropertyTypeRid + api_name: SharedPropertyTypeApiName = pydantic.Field(alias=str("apiName")) # type: ignore[literal-required] + display_name: core_models.DisplayName = pydantic.Field(alias=str("displayName")) # type: ignore[literal-required] + description: typing.Optional[str] = None + """A short text that describes the SharedPropertyType.""" + + data_type: ObjectPropertyType = pydantic.Field(alias=str("dataType")) # type: ignore[literal-required] + value_type_api_name: typing.Optional[ValueTypeApiName] = pydantic.Field(alias=str("valueTypeApiName"), default=None) # type: ignore[literal-required] + value_formatting: typing.Optional[PropertyValueFormattingRule] = pydantic.Field(alias=str("valueFormatting"), default=None) # type: ignore[literal-required] + required: bool + """Whether each implementing object type must declare an implementation for this property.""" + + type: typing.Literal["interfaceSharedPropertyType"] = "interfaceSharedPropertyType" + + +InterfaceToObjectTypeMapping = typing.Dict["SharedPropertyTypeApiName", "PropertyApiName"] +"""Represents an implementation of an interface (the mapping of interface property to local property).""" + + +InterfaceToObjectTypeMappingV2 = typing.Dict[ + "InterfacePropertyApiName", "InterfacePropertyTypeImplementation" +] +"""Represents an implementation of an interface (the mapping of interface property to how it is implemented.""" + + +InterfaceToObjectTypeMappings = typing.Dict["ObjectTypeApiName", "InterfaceToObjectTypeMapping"] +"""Map from object type to the interface-to-object-type mapping for that object type.""" + + +InterfaceToObjectTypeMappingsV2 = typing.Dict["ObjectTypeApiName", "InterfaceToObjectTypeMappingV2"] +"""Map from object type to the interface property implementations of that object type.""" + + +class InterfaceType(core.ModelBase): + """Represents an interface type in the Ontology.""" + + rid: InterfaceTypeRid + api_name: InterfaceTypeApiName = pydantic.Field(alias=str("apiName")) # type: ignore[literal-required] + display_name: core_models.DisplayName = pydantic.Field(alias=str("displayName")) # type: ignore[literal-required] + description: typing.Optional[str] = None + """The description of the interface.""" + + properties: typing.Dict[SharedPropertyTypeApiName, InterfaceSharedPropertyType] + """ + A map from a shared property type API name to the corresponding shared property type. The map describes the + set of properties the interface has. A shared property type must be unique across all of the properties. + This field only includes properties on the interface that are backed by shared property types. + """ + + all_properties: typing.Dict[SharedPropertyTypeApiName, InterfaceSharedPropertyType] = pydantic.Field(alias=str("allProperties")) # type: ignore[literal-required] + """ + A map from a shared property type API name to the corresponding shared property type. The map describes the + set of properties the interface has, including properties from all directly and indirectly extended + interfaces. + This field only includes properties on the interface that are backed by shared property types. + """ + + properties_v2: typing.Dict[InterfacePropertyApiName, InterfacePropertyType] = pydantic.Field(alias=str("propertiesV2")) # type: ignore[literal-required] + """ + A map from a interface property type API name to the corresponding interface property type. The map + describes the set of properties the interface has. An interface property can either be backed by a shared + property or it can be defined directly on the interface. + """ + + all_properties_v2: typing.Dict[InterfacePropertyApiName, ResolvedInterfacePropertyType] = pydantic.Field(alias=str("allPropertiesV2")) # type: ignore[literal-required] + """ + A map from a interface property type API name to the corresponding interface property type. The map + describes the set of properties the interface has, including properties from all directly and indirectly + extended interfaces. + """ + + extends_interfaces: typing.List[InterfaceTypeApiName] = pydantic.Field(alias=str("extendsInterfaces")) # type: ignore[literal-required] + """ + A list of interface API names that this interface extends. An interface can extend other interfaces to + inherit their properties. + """ + + all_extends_interfaces: typing.List[InterfaceTypeApiName] = pydantic.Field(alias=str("allExtendsInterfaces")) # type: ignore[literal-required] + """A list of interface API names that this interface extends, both directly and indirectly.""" + + implemented_by_object_types: typing.List[ObjectTypeApiName] = pydantic.Field(alias=str("implementedByObjectTypes")) # type: ignore[literal-required] + """A list of object API names that implement this interface.""" + + links: typing.Dict[InterfaceLinkTypeApiName, InterfaceLinkType] + """ + A map from an interface link type API name to the corresponding interface link type. The map describes the + set of link types the interface has. + """ + + all_links: typing.Dict[InterfaceLinkTypeApiName, InterfaceLinkType] = pydantic.Field(alias=str("allLinks")) # type: ignore[literal-required] + """ + A map from an interface link type API name to the corresponding interface link type. The map describes the + set of link types the interface has, including links from all directly and indirectly extended interfaces. + """ + + +InterfaceTypeApiName = str +""" +The name of the interface type in the API in UpperCamelCase format. To find the API name for your interface +type, use the `List interface types` endpoint or check the **Ontology Manager**. +""" + + +InterfaceTypeRid = core.RID +"""The unique resource identifier of an interface, useful for interacting with other Foundry APIs.""" + + +class IntersectsBoundingBoxQuery(core.ModelBase): + """ + Returns objects where the specified field intersects the bounding box provided. Allows you to specify a property + to query on by a variety of means. Either `field` or `propertyIdentifier` must be supplied, but not both. + """ + + field: typing.Optional[PropertyApiName] = None + property_identifier: typing.Optional[PropertyIdentifier] = pydantic.Field(alias=str("propertyIdentifier"), default=None) # type: ignore[literal-required] + value: BoundingBoxValue + type: typing.Literal["intersectsBoundingBox"] = "intersectsBoundingBox" + + +class IntersectsPolygonQuery(core.ModelBase): + """ + Returns objects where the specified field intersects the polygon provided. Allows you to specify a property to + query on by a variety of means. Either `field` or `propertyIdentifier` must be supplied, but not both. + """ + + field: typing.Optional[PropertyApiName] = None + property_identifier: typing.Optional[PropertyIdentifier] = pydantic.Field(alias=str("propertyIdentifier"), default=None) # type: ignore[literal-required] + value: PolygonValue + type: typing.Literal["intersectsPolygon"] = "intersectsPolygon" + + +class IntervalQuery(core.ModelBase): + """ + Returns objects where the specified field matches the sub-rule provided. This applies to the analyzed form of + text fields. Either `field` or `propertyIdentifier` can be supplied, but not both. + """ + + field: typing.Optional[PropertyApiName] = None + property_identifier: typing.Optional[PropertyIdentifier] = pydantic.Field(alias=str("propertyIdentifier"), default=None) # type: ignore[literal-required] + rule: IntervalQueryRule + type: typing.Literal["interval"] = "interval" + + +IntervalQueryRule = typing_extensions.Annotated[ + typing.Union["AllOfRule", "MatchRule", "AnyOfRule", "PrefixOnLastTokenRule"], + pydantic.Field(discriminator="type"), +] +"""Sub-rule used for evaluating an IntervalQuery""" + + +class IsNullQueryV2(core.ModelBase): + """ + Returns objects based on the existence of the specified field. Allows you to specify a property to query on + by a variety of means. Either `field` or `propertyIdentifier` must be supplied, but not both. + """ + + field: typing.Optional[PropertyApiName] = None + property_identifier: typing.Optional[PropertyIdentifier] = pydantic.Field(alias=str("propertyIdentifier"), default=None) # type: ignore[literal-required] + value: bool + type: typing.Literal["isNull"] = "isNull" + + +KnownType = typing.Literal["USER_OR_GROUP_ID", "RESOURCE_RID", "ARTIFACT_GID"] +""" +Known Foundry types for specialized formatting: +- userOrGroupRid: Format as user or group +- resourceRid: Format as resource +- artifactGid: Format as artifact +""" + + +class LeastPropertyExpression(core.ModelBase): + """Finds least of two or more numeric, date or timestamp values.""" + + properties: typing.List[DerivedPropertyDefinition] + type: typing.Literal["least"] = "least" + + +class LengthConstraint(core.ModelBase): + """LengthConstraint""" + + minimum_length: typing.Optional[float] = pydantic.Field(alias=str("minimumLength"), default=None) # type: ignore[literal-required] + maximum_length: typing.Optional[float] = pydantic.Field(alias=str("maximumLength"), default=None) # type: ignore[literal-required] + type: typing.Literal["length"] = "length" + + +class LinkSideObject(core.ModelBase): + """LinkSideObject""" + + primary_key: PropertyValue = pydantic.Field(alias=str("primaryKey")) # type: ignore[literal-required] + object_type: ObjectTypeApiName = pydantic.Field(alias=str("objectType")) # type: ignore[literal-required] + + +LinkTypeApiName = str +""" +The name of the link type in the API. To find the API name for your Link Type, check the **Ontology Manager** +application. +""" + + +LinkTypeId = str +"""The unique ID of a link type. To find the ID for your link type, check the **Ontology Manager** application.""" + + +LinkTypeRid = core.RID +"""LinkTypeRid""" + + +LinkTypeSideCardinality = typing.Literal["ONE", "MANY"] +"""LinkTypeSideCardinality""" + + +class LinkTypeSideV2(core.ModelBase): + """ + `foreignKeyPropertyApiName` is the API name of the foreign key on this object type. If absent, the link is + either a m2m link or the linked object has the foreign key and this object type has the primary key. + """ + + api_name: LinkTypeApiName = pydantic.Field(alias=str("apiName")) # type: ignore[literal-required] + display_name: core_models.DisplayName = pydantic.Field(alias=str("displayName")) # type: ignore[literal-required] + status: core_models.ReleaseStatus + object_type_api_name: ObjectTypeApiName = pydantic.Field(alias=str("objectTypeApiName")) # type: ignore[literal-required] + cardinality: LinkTypeSideCardinality + foreign_key_property_api_name: typing.Optional[PropertyApiName] = pydantic.Field(alias=str("foreignKeyPropertyApiName"), default=None) # type: ignore[literal-required] + link_type_rid: LinkTypeRid = pydantic.Field(alias=str("linkTypeRid")) # type: ignore[literal-required] + + +class LinkedInterfaceTypeApiName(core.ModelBase): + """A reference to the linked interface type.""" + + api_name: InterfaceTypeApiName = pydantic.Field(alias=str("apiName")) # type: ignore[literal-required] + type: typing.Literal["interfaceTypeApiName"] = "interfaceTypeApiName" + + +class LinkedObjectLocator(core.ModelBase): + """ + Does not contain information about the source object. Should be used in a nested type that provides information about source objects. + The `targetObject` Ontology Object in this response will only ever have the `__primaryKey` and `__apiName` + fields present, thus functioning as object locators rather than full objects. + """ + + target_object: typing.Optional[OntologyObjectV2] = pydantic.Field(alias=str("targetObject"), default=None) # type: ignore[literal-required] + link_type: typing.Optional[LinkTypeApiName] = pydantic.Field(alias=str("linkType"), default=None) # type: ignore[literal-required] + + +class LinkedObjectTypeApiName(core.ModelBase): + """A reference to the linked object type.""" + + api_name: ObjectTypeApiName = pydantic.Field(alias=str("apiName")) # type: ignore[literal-required] + type: typing.Literal["objectTypeApiName"] = "objectTypeApiName" + + +class LinksFromObject(core.ModelBase): + """ + The Ontology Objects in this response will only ever have the `__primaryKey` and `__apiName` + fields present, thus functioning as object locators rather than full objects. + """ + + source_object: typing.Optional[OntologyObjectV2] = pydantic.Field(alias=str("sourceObject"), default=None) # type: ignore[literal-required] + linked_objects: typing.List[LinkedObjectLocator] = pydantic.Field(alias=str("linkedObjects")) # type: ignore[literal-required] + + +class ListActionTypesFullMetadataResponse(core.ModelBase): + """ListActionTypesFullMetadataResponse""" + + next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] + data: typing.List[ActionTypeFullMetadata] + + +class ListActionTypesResponseV2(core.ModelBase): + """ListActionTypesResponseV2""" + + next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] + data: typing.List[ActionTypeV2] + + +class ListAttachmentsResponseV2(core.ModelBase): + """ListAttachmentsResponseV2""" + + data: typing.List[AttachmentV2] + next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] + type: typing.Literal["multiple"] = "multiple" + + +class ListInterfaceLinkedObjectsResponse(core.ModelBase): + """ListInterfaceLinkedObjectsResponse""" + + data: typing.List[OntologyObjectV2] + next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] + + +class ListInterfaceTypesResponse(core.ModelBase): + """ListInterfaceTypesResponse""" + + next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] + data: typing.List[InterfaceType] + + +class ListLinkedObjectsResponseV2(core.ModelBase): + """ListLinkedObjectsResponseV2""" + + data: typing.List[OntologyObjectV2] + next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] + + +class ListObjectTypesV2Response(core.ModelBase): + """ListObjectTypesV2Response""" + + next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] + data: typing.List[ObjectTypeV2] + """The list of object types in the current page.""" + + +class ListObjectsForInterfaceResponse(core.ModelBase): + """ListObjectsForInterfaceResponse""" + + next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] + data: typing.List[OntologyObjectV2] + """The list of interface instances in the current page.""" + + total_count: core_models.TotalCount = pydantic.Field(alias=str("totalCount")) # type: ignore[literal-required] + + +class ListObjectsResponseV2(core.ModelBase): + """ListObjectsResponseV2""" + + next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] + data: typing.List[OntologyObjectV2] + """The list of objects in the current page.""" + + total_count: core_models.TotalCount = pydantic.Field(alias=str("totalCount")) # type: ignore[literal-required] + + +class ListOntologiesV2Response(core.ModelBase): + """ListOntologiesV2Response""" + + data: typing.List[OntologyV2] + """The list of Ontologies the user has access to.""" + + +class ListOntologyValueTypesResponse(core.ModelBase): + """ListOntologyValueTypesResponse""" + + data: typing.List[OntologyValueType] + + +class ListOutgoingInterfaceLinkTypesResponse(core.ModelBase): + """ListOutgoingInterfaceLinkTypesResponse""" + + next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] + data: typing.List[InterfaceLinkType] + """The list of interface link types in the current page.""" + + +class ListOutgoingLinkTypesResponseV2(core.ModelBase): + """ListOutgoingLinkTypesResponseV2""" + + next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] + data: typing.List[LinkTypeSideV2] + """The list of link type sides in the current page.""" + + +class ListQueryTypesResponseV2(core.ModelBase): + """ListQueryTypesResponseV2""" + + next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] + data: typing.List[QueryTypeV2] + + +class LoadObjectSetLinksRequestV2(core.ModelBase): + """LoadObjectSetLinksRequestV2""" + + object_set: ObjectSet = pydantic.Field(alias=str("objectSet")) # type: ignore[literal-required] + links: typing.List[LinkTypeApiName] + page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("pageToken"), default=None) # type: ignore[literal-required] + include_compute_usage: typing.Optional[core_models.IncludeComputeUsage] = pydantic.Field(alias=str("includeComputeUsage"), default=None) # type: ignore[literal-required] + + +class LoadObjectSetLinksResponseV2(core.ModelBase): + """LoadObjectSetLinksResponseV2""" + + data: typing.List[LinksFromObject] + next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] + compute_usage: typing.Optional[core_models.ComputeSeconds] = pydantic.Field(alias=str("computeUsage"), default=None) # type: ignore[literal-required] + + +class LoadObjectSetRequestV2(core.ModelBase): + """Represents the API POST body when loading an `ObjectSet`.""" + + object_set: ObjectSet = pydantic.Field(alias=str("objectSet")) # type: ignore[literal-required] + order_by: typing.Optional[SearchOrderByV2] = pydantic.Field(alias=str("orderBy"), default=None) # type: ignore[literal-required] + select: typing.List[SelectedPropertyApiName] + select_v2: typing.Optional[typing.List[PropertyIdentifier]] = pydantic.Field(alias=str("selectV2"), default=None) # type: ignore[literal-required] + """ + The identifiers of the properties to include in the response. Only selectV2 or select should be populated, + but not both. + """ + + page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("pageToken"), default=None) # type: ignore[literal-required] + page_size: typing.Optional[core_models.PageSize] = pydantic.Field(alias=str("pageSize"), default=None) # type: ignore[literal-required] + exclude_rid: typing.Optional[bool] = pydantic.Field(alias=str("excludeRid"), default=None) # type: ignore[literal-required] + """ + A flag to exclude the retrieval of the `__rid` property. + Setting this to true may improve performance of this endpoint for object types in OSV2. + """ + + snapshot: typing.Optional[bool] = None + """ + A flag to use snapshot consistency when paging. + Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. + Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. + This defaults to false if not specified, which means you will always get the latest results. + """ + + include_compute_usage: typing.Optional[core_models.IncludeComputeUsage] = pydantic.Field(alias=str("includeComputeUsage"), default=None) # type: ignore[literal-required] + + +class LoadObjectSetResponseV2(core.ModelBase): + """Represents the API response when loading an `ObjectSet`.""" + + data: typing.List[OntologyObjectV2] + """The list of objects in the current Page.""" + + next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] + total_count: core_models.TotalCount = pydantic.Field(alias=str("totalCount")) # type: ignore[literal-required] + compute_usage: typing.Optional[core_models.ComputeSeconds] = pydantic.Field(alias=str("computeUsage"), default=None) # type: ignore[literal-required] + + +class LoadObjectSetV2MultipleObjectTypesRequest(core.ModelBase): + """Represents the API POST body when loading an `ObjectSet`. Used on the `/loadObjectsMultipleObjectTypes` endpoint only.""" + + object_set: ObjectSet = pydantic.Field(alias=str("objectSet")) # type: ignore[literal-required] + order_by: typing.Optional[SearchOrderByV2] = pydantic.Field(alias=str("orderBy"), default=None) # type: ignore[literal-required] + select: typing.List[SelectedPropertyApiName] + select_v2: typing.Optional[typing.List[PropertyIdentifier]] = pydantic.Field(alias=str("selectV2"), default=None) # type: ignore[literal-required] + """ + The identifiers of the properties to include in the response. Only selectV2 or select should be populated, + but not both. + """ + + page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("pageToken"), default=None) # type: ignore[literal-required] + page_size: typing.Optional[core_models.PageSize] = pydantic.Field(alias=str("pageSize"), default=None) # type: ignore[literal-required] + exclude_rid: typing.Optional[bool] = pydantic.Field(alias=str("excludeRid"), default=None) # type: ignore[literal-required] + """ + A flag to exclude the retrieval of the `$rid` property. + Setting this to true may improve performance of this endpoint for object types in OSV2. + """ + + snapshot: typing.Optional[bool] = None + """ + A flag to use snapshot consistency when paging. + Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. + Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. + This defaults to false if not specified, which means you will always get the latest results. + """ + + include_compute_usage: typing.Optional[core_models.IncludeComputeUsage] = pydantic.Field(alias=str("includeComputeUsage"), default=None) # type: ignore[literal-required] + + +class LoadObjectSetV2MultipleObjectTypesResponse(core.ModelBase): + """ + Represents the API response when loading an `ObjectSet`. An `interfaceToObjectTypeMappings` field is + optionally returned if the type scope of the returned object set includes any interfaces. The "type scope" + of an object set refers to whether objects contain all their properties (object-type type scope) or just the + properties that implement interface properties (interface type scope). There can be multiple type scopes in a + single object set- some objects may have all their properties and some may only have interface properties. + + The `interfaceToObjectTypeMappings` field contains mappings from `SharedPropertyTypeApiName`s on the interface(s) to + `PropertyApiName` for properties on the object(s). + + The `interfaceToObjectTypeMappingsV2` field contains mappings from `InterfacePropertyApiName`s on the + interface(s) to `InterfacePropertyTypeImplementation` for properties on the object(s). This therefore includes + implementations of both properties backed by SharedPropertyTypes as well as properties defined on the interface. + """ + + data: typing.List[OntologyObjectV2] + """The list of objects in the current page.""" + + next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] + total_count: core_models.TotalCount = pydantic.Field(alias=str("totalCount")) # type: ignore[literal-required] + interface_to_object_type_mappings: typing.Dict[InterfaceTypeApiName, InterfaceToObjectTypeMappings] = pydantic.Field(alias=str("interfaceToObjectTypeMappings")) # type: ignore[literal-required] + interface_to_object_type_mappings_v2: typing.Dict[InterfaceTypeApiName, InterfaceToObjectTypeMappingsV2] = pydantic.Field(alias=str("interfaceToObjectTypeMappingsV2")) # type: ignore[literal-required] + compute_usage: typing.Optional[core_models.ComputeSeconds] = pydantic.Field(alias=str("computeUsage"), default=None) # type: ignore[literal-required] + + +class LoadObjectSetV2ObjectsOrInterfacesRequest(core.ModelBase): + """Represents the API POST body when loading an `ObjectSet`. Used on the `/loadObjectsOrInterfaces` endpoint only.""" + + object_set: ObjectSet = pydantic.Field(alias=str("objectSet")) # type: ignore[literal-required] + order_by: typing.Optional[SearchOrderByV2] = pydantic.Field(alias=str("orderBy"), default=None) # type: ignore[literal-required] + select: typing.List[SelectedPropertyApiName] + select_v2: typing.Optional[typing.List[PropertyIdentifier]] = pydantic.Field(alias=str("selectV2"), default=None) # type: ignore[literal-required] + """ + The identifiers of the properties to include in the response. Only selectV2 or select should be populated, + but not both. + """ + + page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("pageToken"), default=None) # type: ignore[literal-required] + page_size: typing.Optional[core_models.PageSize] = pydantic.Field(alias=str("pageSize"), default=None) # type: ignore[literal-required] + exclude_rid: typing.Optional[bool] = pydantic.Field(alias=str("excludeRid"), default=None) # type: ignore[literal-required] + """ + A flag to exclude the retrieval of the `$rid` property. + Setting this to true may improve performance of this endpoint for object types in OSV2. + """ + + snapshot: typing.Optional[bool] = None + """ + A flag to use snapshot consistency when paging. + Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. + Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. + This defaults to false if not specified, which means you will always get the latest results. + """ + + +class LoadObjectSetV2ObjectsOrInterfacesResponse(core.ModelBase): + """ + Represents the API response when loading an `ObjectSet`. Objects in the returned set can either have properties + defined by an interface that the objects belong to or properties defined by the object type of the object. + """ + + data: typing.List[OntologyObjectV2] + """The list of objects in the current page.""" + + next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] + total_count: core_models.TotalCount = pydantic.Field(alias=str("totalCount")) # type: ignore[literal-required] + + +class LoadOntologyMetadataRequest(core.ModelBase): + """The Ontology metadata (i.e., object, link, action, query, and interface types) to load.""" + + object_types: typing.List[ObjectTypeApiName] = pydantic.Field(alias=str("objectTypes")) # type: ignore[literal-required] + link_types: typing.List[LinkTypeApiName] = pydantic.Field(alias=str("linkTypes")) # type: ignore[literal-required] + action_types: typing.List[ActionTypeApiName] = pydantic.Field(alias=str("actionTypes")) # type: ignore[literal-required] + query_types: typing.List[VersionedQueryTypeApiName] = pydantic.Field(alias=str("queryTypes")) # type: ignore[literal-required] + interface_types: typing.List[InterfaceTypeApiName] = pydantic.Field(alias=str("interfaceTypes")) # type: ignore[literal-required] + + +LogicRule = typing_extensions.Annotated[ + typing.Union[ + "DeleteInterfaceObjectRule", + "ModifyInterfaceObjectRule", + "ModifyObjectRule", + "DeleteObjectRule", + "CreateInterfaceObjectRule", + "DeleteLinkRule", + "CreateObjectRule", + "CreateLinkRule", + ], + pydantic.Field(discriminator="type"), +] +"""LogicRule""" + + +LogicRuleArgument = typing_extensions.Annotated[ + typing.Union[ + "CurrentTimeArgument", + "StaticArgument", + "CurrentUserArgument", + "ParameterIdArgument", + "InterfaceParameterPropertyArgument", + "SynchronousWebhookOutputArgument", + "ObjectParameterPropertyArgument", + "UniqueIdentifierArgument", + ], + pydantic.Field(discriminator="type"), +] +"""Represents an argument for a logic rule operation. An argument can be passed in via the action parameters, as a static value, or as some other value.""" + + +class LtQueryV2(core.ModelBase): + """ + Returns objects where the specified field is less than a value. Allows you to specify a property to query on + by a variety of means. Either `field` or `propertyIdentifier` must be supplied, but not both. + """ + + field: typing.Optional[PropertyApiName] = None + property_identifier: typing.Optional[PropertyIdentifier] = pydantic.Field(alias=str("propertyIdentifier"), default=None) # type: ignore[literal-required] + value: PropertyValue + type: typing.Literal["lt"] = "lt" + + +class LteQueryV2(core.ModelBase): + """ + Returns objects where the specified field is less than or equal to a value. Allows you to specify a property to + query on by a variety of means. Either `field` or `propertyIdentifier` must be supplied, but not both. + """ + + field: typing.Optional[PropertyApiName] = None + property_identifier: typing.Optional[PropertyIdentifier] = pydantic.Field(alias=str("propertyIdentifier"), default=None) # type: ignore[literal-required] + value: PropertyValue + type: typing.Literal["lte"] = "lte" + + +class MatchRule(core.ModelBase): + """Matches intervals containing the terms in the query""" + + query: str + max_gaps: typing.Optional[int] = pydantic.Field(alias=str("maxGaps"), default=None) # type: ignore[literal-required] + """ + The maximum gaps between matched terms in the interval. For example, in the text "quick brown fox", + the terms "quick" and "fox" have a gap of one. If not set, then gaps are not considered. + """ + + ordered: bool + """If true, the matched terms must occur in order.""" + + type: typing.Literal["match"] = "match" + + +class MaxAggregationV2(core.ModelBase): + """Computes the maximum value for the provided field.""" + + field: PropertyApiName + name: typing.Optional[AggregationMetricName] = None + direction: typing.Optional[OrderByDirection] = None + type: typing.Literal["max"] = "max" + + +class MediaMetadata(core.ModelBase): + """MediaMetadata""" + + path: typing.Optional[core_models.MediaItemPath] = None + size_bytes: core_models.SizeBytes = pydantic.Field(alias=str("sizeBytes")) # type: ignore[literal-required] + media_type: core_models.MediaType = pydantic.Field(alias=str("mediaType")) # type: ignore[literal-required] + + +class MinAggregationV2(core.ModelBase): + """Computes the minimum value for the provided field.""" + + field: PropertyApiName + name: typing.Optional[AggregationMetricName] = None + direction: typing.Optional[OrderByDirection] = None + type: typing.Literal["min"] = "min" + + +class ModifyInterfaceLogicRule(core.ModelBase): + """ModifyInterfaceLogicRule""" + + interface_object_to_modify: ParameterId = pydantic.Field(alias=str("interfaceObjectToModify")) # type: ignore[literal-required] + shared_property_arguments: typing.Dict[SharedPropertyTypeApiName, LogicRuleArgument] = pydantic.Field(alias=str("sharedPropertyArguments")) # type: ignore[literal-required] + struct_property_arguments: typing.Dict[SharedPropertyTypeApiName, typing.Dict[StructFieldApiName, StructFieldArgument]] = pydantic.Field(alias=str("structPropertyArguments")) # type: ignore[literal-required] + type: typing.Literal["modifyInterface"] = "modifyInterface" + + +class ModifyInterfaceObjectRule(core.ModelBase): + """ModifyInterfaceObjectRule""" + + interface_type_api_name: InterfaceTypeApiName = pydantic.Field(alias=str("interfaceTypeApiName")) # type: ignore[literal-required] + type: typing.Literal["modifyInterfaceObject"] = "modifyInterfaceObject" + + +class ModifyObject(core.ModelBase): + """ModifyObject""" + + primary_key: PropertyValue = pydantic.Field(alias=str("primaryKey")) # type: ignore[literal-required] + object_type: ObjectTypeApiName = pydantic.Field(alias=str("objectType")) # type: ignore[literal-required] + type: typing.Literal["modifyObject"] = "modifyObject" + + +class ModifyObjectEdit(core.ModelBase): + """ModifyObjectEdit""" + + object_type: ObjectTypeApiName = pydantic.Field(alias=str("objectType")) # type: ignore[literal-required] + primary_key: PropertyValue = pydantic.Field(alias=str("primaryKey")) # type: ignore[literal-required] + properties: typing.Dict[PropertyApiName, DataValue] + type: typing.Literal["modifyObject"] = "modifyObject" + + +class ModifyObjectLogicRule(core.ModelBase): + """ModifyObjectLogicRule""" + + object_to_modify: ParameterId = pydantic.Field(alias=str("objectToModify")) # type: ignore[literal-required] + property_arguments: typing.Dict[PropertyApiName, LogicRuleArgument] = pydantic.Field(alias=str("propertyArguments")) # type: ignore[literal-required] + struct_property_arguments: typing.Dict[PropertyApiName, typing.Dict[StructFieldApiName, StructFieldArgument]] = pydantic.Field(alias=str("structPropertyArguments")) # type: ignore[literal-required] + type: typing.Literal["modifyObject"] = "modifyObject" + + +class ModifyObjectRule(core.ModelBase): + """ModifyObjectRule""" + + object_type_api_name: ObjectTypeApiName = pydantic.Field(alias=str("objectTypeApiName")) # type: ignore[literal-required] + type: typing.Literal["modifyObject"] = "modifyObject" + + +class MultiplyPropertyExpression(core.ModelBase): + """Multiplies two or more numeric values.""" + + properties: typing.List[DerivedPropertyDefinition] + type: typing.Literal["multiply"] = "multiply" + + +NearestNeighborsQuery = typing_extensions.Annotated[ + typing.Union["DoubleVector", "NearestNeighborsQueryText"], pydantic.Field(discriminator="type") +] +""" +Queries support either a vector matching the embedding model defined on the property, or text that is +automatically embedded. +""" + + +class NearestNeighborsQueryText(core.ModelBase): + """Automatically embed the text in a vector using the embedding model configured for the given propertyIdentifier.""" + + value: str + type: typing.Literal["text"] = "text" + + +class NegatePropertyExpression(core.ModelBase): + """Negates a numeric value.""" + + property: DerivedPropertyDefinition + type: typing.Literal["negate"] = "negate" + + +NestedInterfacePropertyTypeImplementation = typing_extensions.Annotated[ + typing.Union[ + "InterfacePropertyStructFieldImplementation", + "InterfacePropertyStructImplementation", + "InterfacePropertyLocalPropertyImplementation", + ], + pydantic.Field(discriminator="type"), +] +""" +Describes how an object type implements an interface property when a reducer is applied to it. Is missing a +reduced property implementation to prevent arbitrarily nested implementations. +""" + + +class NestedQueryAggregation(core.ModelBase): + """NestedQueryAggregation""" + + key: typing.Any + groups: typing.List[QueryAggregation] + + +class NotQueryV2(core.ModelBase): + """Returns objects where the query is not satisfied.""" + + value: SearchJsonQueryV2 + type: typing.Literal["not"] = "not" + + +class NumberFormatAffix(core.ModelBase): + """ + Attach arbitrary text before and/or after the formatted number. + Example: prefix "USD " and postfix " total" displays as "USD 1,234.56 total" + """ + + base_format_options: NumberFormatOptions = pydantic.Field(alias=str("baseFormatOptions")) # type: ignore[literal-required] + affix: Affix + type: typing.Literal["affix"] = "affix" + + +class NumberFormatCurrency(core.ModelBase): + """ + Format numbers as currency values with proper symbols and styling. + Example: 1234.56 with currency "USD" displays as "USD 1,234.56" (standard) or "USD 1.2K" (compact) + """ + + base_format_options: NumberFormatOptions = pydantic.Field(alias=str("baseFormatOptions")) # type: ignore[literal-required] + style: NumberFormatCurrencyStyle + currency_code: PropertyTypeReferenceOrStringConstant = pydantic.Field(alias=str("currencyCode")) # type: ignore[literal-required] + type: typing.Literal["currency"] = "currency" + + +NumberFormatCurrencyStyle = typing.Literal["STANDARD", "COMPACT"] +""" +Currency rendering style options: +- STANDARD: Full currency formatting (e.g., "USD 1,234.56") +- COMPACT: Abbreviated currency formatting (e.g., "USD 1.2K") +""" + + +class NumberFormatCustomUnit(core.ModelBase): + """ + Format numbers with custom units not supported by standard formatting. + Use this for domain-specific units like "requests/sec", "widgets", etc. + Example: 1500 with unit "widgets" displays as "1,500 widgets" + """ + + base_format_options: NumberFormatOptions = pydantic.Field(alias=str("baseFormatOptions")) # type: ignore[literal-required] + unit: PropertyTypeReferenceOrStringConstant + type: typing.Literal["customUnit"] = "customUnit" + + +class NumberFormatDuration(core.ModelBase): + """ + Format numeric values representing time durations. + - Human readable: 3661 seconds displays as "1h 1m 1s" + - Timecode: 3661 seconds displays as "01:01:01" + """ + + format_style: DurationFormatStyle = pydantic.Field(alias=str("formatStyle")) # type: ignore[literal-required] + precision: typing.Optional[DurationPrecision] = None + base_value: DurationBaseValue = pydantic.Field(alias=str("baseValue")) # type: ignore[literal-required] + type: typing.Literal["duration"] = "duration" + + +class NumberFormatFixedValues(core.ModelBase): + """ + Map integer values to custom human-readable strings. + Example: {1: "First", 2: "Second", 3: "Third"} would display 2 as "Second". + """ + + values: typing.Dict[FixedValuesMapKey, str] + type: typing.Literal["fixedValues"] = "fixedValues" + + +NumberFormatNotation = typing.Literal["STANDARD", "SCIENTIFIC", "ENGINEERING", "COMPACT"] +""" +Number notation style options: +- STANDARD: Regular number display ("1,234") +- SCIENTIFIC: Scientific notation ("1.234E3") +- ENGINEERING: Engineering notation ("1.234E3") +- COMPACT: Compact notation ("1.2K") +""" + + +class NumberFormatOptions(core.ModelBase): + """ + Base number formatting options that can be applied to all number formatters. + Controls precision, grouping, rounding, and notation. Consistent with JavaScript's Intl.NumberFormat. + + Examples: + - useGrouping: true makes 1234567 display as "1,234,567" + - maximumFractionDigits: 2 makes 3.14159 display as "3.14" + - notation: SCIENTIFIC makes 1234 display as "1.234E3" + """ + + use_grouping: typing.Optional[bool] = pydantic.Field(alias=str("useGrouping"), default=None) # type: ignore[literal-required] + """If true, show a locale-appropriate number grouping (e.g. thousands for en).""" + + convert_negative_to_parenthesis: typing.Optional[bool] = pydantic.Field(alias=str("convertNegativeToParenthesis"), default=None) # type: ignore[literal-required] + """If true, wrap negative numbers in parentheses instead of a minus sign.""" + + minimum_integer_digits: typing.Optional[int] = pydantic.Field(alias=str("minimumIntegerDigits"), default=None) # type: ignore[literal-required] + minimum_fraction_digits: typing.Optional[int] = pydantic.Field(alias=str("minimumFractionDigits"), default=None) # type: ignore[literal-required] + maximum_fraction_digits: typing.Optional[int] = pydantic.Field(alias=str("maximumFractionDigits"), default=None) # type: ignore[literal-required] + minimum_significant_digits: typing.Optional[int] = pydantic.Field(alias=str("minimumSignificantDigits"), default=None) # type: ignore[literal-required] + maximum_significant_digits: typing.Optional[int] = pydantic.Field(alias=str("maximumSignificantDigits"), default=None) # type: ignore[literal-required] + notation: typing.Optional[NumberFormatNotation] = None + rounding_mode: typing.Optional[NumberRoundingMode] = pydantic.Field(alias=str("roundingMode"), default=None) # type: ignore[literal-required] + + +class NumberFormatRatio(core.ModelBase): + """ + Display the value as a ratio with different scaling factors and suffixes: + - PERCENTAGE: Multiply by 100 and add "%" suffix (0.15 → "15%") + - PER_MILLE: Multiply by 1000 and add "‰" suffix (0.015 → "15‰") + - BASIS_POINTS: Multiply by 10000 and add "bps" suffix (0.0015 → "15bps") + """ + + ratio_type: NumberRatioType = pydantic.Field(alias=str("ratioType")) # type: ignore[literal-required] + base_format_options: NumberFormatOptions = pydantic.Field(alias=str("baseFormatOptions")) # type: ignore[literal-required] + type: typing.Literal["ratio"] = "ratio" + + +class NumberFormatScale(core.ModelBase): + """ + Scale the numeric value by dividing by the specified factor and append an appropriate suffix. + - THOUSANDS: 1500 displays as "1.5K" + - MILLIONS: 2500000 displays as "2.5M" + - BILLIONS: 3200000000 displays as "3.2B" + """ + + scale_type: NumberScaleType = pydantic.Field(alias=str("scaleType")) # type: ignore[literal-required] + base_format_options: NumberFormatOptions = pydantic.Field(alias=str("baseFormatOptions")) # type: ignore[literal-required] + type: typing.Literal["scale"] = "scale" + + +class NumberFormatStandard(core.ModelBase): + """ + Standard number formatting with configurable options. + This provides basic number formatting without any special units, scaling, or transformations. + """ + + base_format_options: NumberFormatOptions = pydantic.Field(alias=str("baseFormatOptions")) # type: ignore[literal-required] + type: typing.Literal["standard"] = "standard" + + +class NumberFormatStandardUnit(core.ModelBase): + """ + Format numbers with standard units supported by Intl.NumberFormat. + Examples: "meter", "kilogram", "celsius", "percent" + Input: 25 with unit "celsius" displays as "25 degrees C" + """ + + base_format_options: NumberFormatOptions = pydantic.Field(alias=str("baseFormatOptions")) # type: ignore[literal-required] + unit: PropertyTypeReferenceOrStringConstant + type: typing.Literal["standardUnit"] = "standardUnit" + + +NumberRatioType = typing.Literal["PERCENTAGE", "PER_MILLE", "BASIS_POINTS"] +""" +Ratio format options for displaying proportional values: +- PERCENTAGE: Multiply by 100 and add "%" suffix +- PER_MILLE: Multiply by 1000 and add "‰" suffix +- BASIS_POINTS: Multiply by 10000 and add "bps" suffix +""" + + +NumberRoundingMode = typing.Literal["CEIL", "FLOOR", "ROUND_CLOSEST"] +""" +Number rounding behavior: +- CEIL: Always round up (3.1 becomes 4) +- FLOOR: Always round down (3.9 becomes 3) +- ROUND_CLOSEST: Round to nearest (3.4 becomes 3, 3.6 becomes 4) +""" + + +NumberScaleType = typing.Literal["THOUSANDS", "MILLIONS", "BILLIONS"] +""" +Scale factor options for large numbers: +- THOUSANDS: Divide by 1,000 and add "K" suffix +- MILLIONS: Divide by 1,000,000 and add "M" suffix +- BILLIONS: Divide by 1,000,000,000 and add "B" suffix +""" + + +ObjectEdit = typing_extensions.Annotated[ + typing.Union["ModifyObject", "DeleteObject", "AddObject", "DeleteLink", "AddLink"], + pydantic.Field(discriminator="type"), +] +"""ObjectEdit""" + + +class ObjectEdits(core.ModelBase): + """ObjectEdits""" + + edits: typing.List[ObjectEdit] + added_object_count: int = pydantic.Field(alias=str("addedObjectCount")) # type: ignore[literal-required] + modified_objects_count: int = pydantic.Field(alias=str("modifiedObjectsCount")) # type: ignore[literal-required] + deleted_objects_count: int = pydantic.Field(alias=str("deletedObjectsCount")) # type: ignore[literal-required] + added_links_count: int = pydantic.Field(alias=str("addedLinksCount")) # type: ignore[literal-required] + deleted_links_count: int = pydantic.Field(alias=str("deletedLinksCount")) # type: ignore[literal-required] + type: typing.Literal["edits"] = "edits" + + +class ObjectParameterPropertyArgument(core.ModelBase): + """Represents an object parameter property argument in a logic rule.""" + + parameter_id: ParameterId = pydantic.Field(alias=str("parameterId")) # type: ignore[literal-required] + property_type_api_name: PropertyTypeApiName = pydantic.Field(alias=str("propertyTypeApiName")) # type: ignore[literal-required] + type: typing.Literal["objectParameterPropertyValue"] = "objectParameterPropertyValue" + + +ObjectPropertyType = typing_extensions.Annotated[ + typing.Union[ + core_models.DateType, + "StructType", + core_models.StringType, + core_models.ByteType, + core_models.DoubleType, + core_models.GeoPointType, + core_models.GeotimeSeriesReferenceType, + core_models.IntegerType, + core_models.FloatType, + core_models.GeoShapeType, + core_models.LongType, + core_models.BooleanType, + core_models.CipherTextType, + core_models.MarkingType, + core_models.AttachmentType, + core_models.MediaReferenceType, + core_models.TimeseriesType, + "OntologyObjectArrayType", + core_models.ShortType, + core_models.VectorType, + core_models.DecimalType, + core_models.TimestampType, + ], + pydantic.Field(discriminator="type"), +] +"""A union of all the types supported by Ontology Object properties.""" + + +class ObjectPropertyValueConstraint(core.ModelBase): + """The parameter value must be a property value of an object found within an object set.""" + + type: typing.Literal["objectPropertyValue"] = "objectPropertyValue" + + +class ObjectQueryResultConstraint(core.ModelBase): + """The parameter value must be the primary key of an object found within an object set.""" + + type: typing.Literal["objectQueryResult"] = "objectQueryResult" + + +ObjectRid = core.RID +"""The unique resource identifier of an object, useful for interacting with other Foundry APIs.""" + + +ObjectSet = typing_extensions.Annotated[ + typing.Union[ + "ObjectSetSearchAroundType", + "ObjectSetStaticType", + "ObjectSetIntersectionType", + "ObjectSetWithPropertiesType", + "ObjectSetInterfaceLinkSearchAroundType", + "ObjectSetSubtractType", + "ObjectSetNearestNeighborsType", + "ObjectSetUnionType", + "ObjectSetAsTypeType", + "ObjectSetMethodInputType", + "ObjectSetReferenceType", + "ObjectSetFilterType", + "ObjectSetInterfaceBaseType", + "ObjectSetAsBaseObjectTypesType", + "ObjectSetBaseType", + ], + pydantic.Field(discriminator="type"), +] +"""Represents the definition of an `ObjectSet` in the `Ontology`.""" + + +class ObjectSetAsBaseObjectTypesType(core.ModelBase): + """ + Casts the objects in the object set to their base type and thus ensures objects are returned with all of their + properties in the resulting object set, not just the properties that implement interface properties. + """ + + object_set: ObjectSet = pydantic.Field(alias=str("objectSet")) # type: ignore[literal-required] + type: typing.Literal["asBaseObjectTypes"] = "asBaseObjectTypes" + + +class ObjectSetAsTypeType(core.ModelBase): + """ + Casts an object set to a specified object type or interface type API name. Any object whose object type does + not match the object type provided or implement the interface type provided will be dropped from the resulting + object set. + """ + + entity_type: str = pydantic.Field(alias=str("entityType")) # type: ignore[literal-required] + """An object type or interface type API name.""" + + object_set: ObjectSet = pydantic.Field(alias=str("objectSet")) # type: ignore[literal-required] + type: typing.Literal["asType"] = "asType" + + +class ObjectSetBaseType(core.ModelBase): + """ObjectSetBaseType""" + + object_type: str = pydantic.Field(alias=str("objectType")) # type: ignore[literal-required] + """The API name of the object type.""" + + type: typing.Literal["base"] = "base" + + +class ObjectSetFilterType(core.ModelBase): + """ObjectSetFilterType""" + + object_set: ObjectSet = pydantic.Field(alias=str("objectSet")) # type: ignore[literal-required] + where: SearchJsonQueryV2 + type: typing.Literal["filter"] = "filter" + + +class ObjectSetInterfaceBaseType(core.ModelBase): + """ObjectSetInterfaceBaseType""" + + interface_type: str = pydantic.Field(alias=str("interfaceType")) # type: ignore[literal-required] + """ + An object set with objects that implement the interface with the given interface API name. The objects in + the object set will only have properties that implement properties of the given interface, unless you set the includeAllBaseObjectProperties flag. + """ + + include_all_base_object_properties: typing.Optional[bool] = pydantic.Field(alias=str("includeAllBaseObjectProperties"), default=None) # type: ignore[literal-required] + """ + A flag that will return all of the underlying object properties for the objects that implement the interface. + This includes properties that don't explicitly implement an SPT on the interface. + """ + + type: typing.Literal["interfaceBase"] = "interfaceBase" + + +class ObjectSetInterfaceLinkSearchAroundType(core.ModelBase): + """ObjectSetInterfaceLinkSearchAroundType""" + + object_set: ObjectSet = pydantic.Field(alias=str("objectSet")) # type: ignore[literal-required] + interface_link: InterfaceLinkTypeApiName = pydantic.Field(alias=str("interfaceLink")) # type: ignore[literal-required] + type: typing.Literal["interfaceLinkSearchAround"] = "interfaceLinkSearchAround" + + +class ObjectSetIntersectionType(core.ModelBase): + """ObjectSetIntersectionType""" + + object_sets: typing.List[ObjectSet] = pydantic.Field(alias=str("objectSets")) # type: ignore[literal-required] + type: typing.Literal["intersect"] = "intersect" + + +class ObjectSetMethodInputType(core.ModelBase): + """ + ObjectSet which is the root of a MethodObjectSet definition. + + This feature is experimental and not yet generally available. + """ + + type: typing.Literal["methodInput"] = "methodInput" + + +class ObjectSetNearestNeighborsType(core.ModelBase): + """ + ObjectSet containing the top `numNeighbors` objects with `propertyIdentifier` nearest to the input vector or + text. This can only be performed on a property with type vector that has been configured to be searched with + approximate nearest neighbors using a similarity function configured in the Ontology. + + A non-zero score for each resulting object is returned when the `orderType` in the `orderBy` field is set to + `relevance`. Note that: + - Scores will not be returned if a nearestNeighbors object set is composed through union, subtraction + or intersection with non-nearestNeighbors object sets. + - If results have scores, the order of the scores will be decreasing (duplicate scores are possible). + """ + + object_set: ObjectSet = pydantic.Field(alias=str("objectSet")) # type: ignore[literal-required] + property_identifier: PropertyIdentifier = pydantic.Field(alias=str("propertyIdentifier")) # type: ignore[literal-required] + num_neighbors: int = pydantic.Field(alias=str("numNeighbors")) # type: ignore[literal-required] + """ + The number of objects to return. If the number of documents in the objectType is less than the provided + value, all objects will be returned. This value is limited to 1 <= numNeighbors <= 500. + """ + + similarity_threshold: typing.Optional[float] = pydantic.Field(alias=str("similarityThreshold"), default=None) # type: ignore[literal-required] + """ + The similarity threshold results must be above to be included in the returned in the object set. + 0 <= Threshold <= 1. Where 1 is identical and 0 is least similar. + """ + + query: NearestNeighborsQuery + type: typing.Literal["nearestNeighbors"] = "nearestNeighbors" + + +class ObjectSetReferenceType(core.ModelBase): + """ObjectSetReferenceType""" + + reference: ObjectSetRid + type: typing.Literal["reference"] = "reference" + + +ObjectSetRid = core.RID +"""ObjectSetRid""" + + +class ObjectSetSearchAroundType(core.ModelBase): + """ObjectSetSearchAroundType""" + + object_set: ObjectSet = pydantic.Field(alias=str("objectSet")) # type: ignore[literal-required] + link: LinkTypeApiName + type: typing.Literal["searchAround"] = "searchAround" + + +class ObjectSetStaticType(core.ModelBase): + """ObjectSetStaticType""" + + objects: typing.List[ObjectRid] + type: typing.Literal["static"] = "static" + + +class ObjectSetSubtractType(core.ModelBase): + """ObjectSetSubtractType""" + + object_sets: typing.List[ObjectSet] = pydantic.Field(alias=str("objectSets")) # type: ignore[literal-required] + type: typing.Literal["subtract"] = "subtract" + + +class ObjectSetUnionType(core.ModelBase): + """ObjectSetUnionType""" + + object_sets: typing.List[ObjectSet] = pydantic.Field(alias=str("objectSets")) # type: ignore[literal-required] + type: typing.Literal["union"] = "union" + + +class ObjectSetWithPropertiesType(core.ModelBase): + """ + ObjectSet which returns objects with additional derived properties. + + This feature is experimental and not yet generally available. + """ + + object_set: ObjectSet = pydantic.Field(alias=str("objectSet")) # type: ignore[literal-required] + derived_properties: typing.Dict[DerivedPropertyApiName, DerivedPropertyDefinition] = pydantic.Field(alias=str("derivedProperties")) # type: ignore[literal-required] + """Map of the name of the derived property to return and its definition""" + + type: typing.Literal["withProperties"] = "withProperties" + + +ObjectTypeApiName = str +""" +The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the +`List object types` endpoint or check the **Ontology Manager**. +""" + + +class ObjectTypeEdits(core.ModelBase): + """ObjectTypeEdits""" + + edited_object_types: typing.List[ObjectTypeApiName] = pydantic.Field(alias=str("editedObjectTypes")) # type: ignore[literal-required] + type: typing.Literal["largeScaleEdits"] = "largeScaleEdits" + + +class ObjectTypeFullMetadata(core.ModelBase): + """ObjectTypeFullMetadata""" + + object_type: ObjectTypeV2 = pydantic.Field(alias=str("objectType")) # type: ignore[literal-required] + link_types: typing.List[LinkTypeSideV2] = pydantic.Field(alias=str("linkTypes")) # type: ignore[literal-required] + implements_interfaces: typing.List[InterfaceTypeApiName] = pydantic.Field(alias=str("implementsInterfaces")) # type: ignore[literal-required] + """A list of interfaces that this object type implements.""" + + implements_interfaces2: typing.Dict[InterfaceTypeApiName, ObjectTypeInterfaceImplementation] = pydantic.Field(alias=str("implementsInterfaces2")) # type: ignore[literal-required] + """A list of interfaces that this object type implements and how it implements them.""" + + shared_property_type_mapping: typing.Dict[SharedPropertyTypeApiName, PropertyApiName] = pydantic.Field(alias=str("sharedPropertyTypeMapping")) # type: ignore[literal-required] + """ + A map from shared property type API name to backing local property API name for the shared property types + present on this object type. + """ + + +ObjectTypeId = str +"""The unique identifier (ID) for an object type. This can be viewed in [Ontology Manager](https://palantir.com/docs/foundry/ontology-manager/overview/).""" + + +class ObjectTypeInterfaceImplementation(core.ModelBase): + """ObjectTypeInterfaceImplementation""" + + properties: typing.Dict[SharedPropertyTypeApiName, PropertyApiName] + properties_v2: typing.Dict[InterfacePropertyApiName, InterfacePropertyTypeImplementation] = pydantic.Field(alias=str("propertiesV2")) # type: ignore[literal-required] + links: typing.Dict[InterfaceLinkTypeApiName, typing.List[LinkTypeApiName]] + + +ObjectTypeRid = core.RID +"""The unique resource identifier of an object type, useful for interacting with other Foundry APIs.""" + + +class ObjectTypeV2(core.ModelBase): + """Represents an object type in the Ontology.""" + + api_name: ObjectTypeApiName = pydantic.Field(alias=str("apiName")) # type: ignore[literal-required] + display_name: core_models.DisplayName = pydantic.Field(alias=str("displayName")) # type: ignore[literal-required] + status: core_models.ReleaseStatus + description: typing.Optional[str] = None + """The description of the object type.""" + + plural_display_name: str = pydantic.Field(alias=str("pluralDisplayName")) # type: ignore[literal-required] + """The plural display name of the object type.""" + + icon: Icon + primary_key: PropertyApiName = pydantic.Field(alias=str("primaryKey")) # type: ignore[literal-required] + properties: typing.Dict[PropertyApiName, PropertyV2] + """A map of the properties of the object type.""" + + rid: ObjectTypeRid + title_property: PropertyApiName = pydantic.Field(alias=str("titleProperty")) # type: ignore[literal-required] + visibility: typing.Optional[ObjectTypeVisibility] = None + + +ObjectTypeVisibility = typing.Literal["NORMAL", "PROMINENT", "HIDDEN"] +"""The suggested visibility of the object type.""" + + +class OneOfConstraint(core.ModelBase): + """The parameter has a manually predefined set of options.""" + + options: typing.List[ParameterOption] + other_values_allowed: bool = pydantic.Field(alias=str("otherValuesAllowed")) # type: ignore[literal-required] + """A flag denoting whether custom, user provided values will be considered valid. This is configured via the **Allowed "Other" value** toggle in the **Ontology Manager**.""" + + type: typing.Literal["oneOf"] = "oneOf" + + +OntologyApiName = str +"""OntologyApiName""" + + +class OntologyArrayType(core.ModelBase): + """OntologyArrayType""" + + item_type: OntologyDataType = pydantic.Field(alias=str("itemType")) # type: ignore[literal-required] + type: typing.Literal["array"] = "array" + + +OntologyDataType = typing_extensions.Annotated[ + typing.Union[ + core_models.DateType, + "OntologyStructType", + "OntologySetType", + core_models.StringType, + core_models.ByteType, + core_models.DoubleType, + core_models.IntegerType, + core_models.FloatType, + core_models.AnyType, + core_models.LongType, + core_models.BooleanType, + core_models.CipherTextType, + core_models.MarkingType, + core_models.UnsupportedType, + "OntologyArrayType", + "OntologyObjectSetType", + core_models.BinaryType, + core_models.ShortType, + core_models.DecimalType, + "OntologyMapType", + core_models.TimestampType, + "OntologyObjectType", + ], + pydantic.Field(discriminator="type"), +] +"""A union of all the primitive types used by Palantir's Ontology-based products.""" + + +class OntologyFullMetadata(core.ModelBase): + """OntologyFullMetadata""" + + ontology: OntologyV2 + object_types: typing.Dict[ObjectTypeApiName, ObjectTypeFullMetadata] = pydantic.Field(alias=str("objectTypes")) # type: ignore[literal-required] + action_types: typing.Dict[ActionTypeApiName, ActionTypeV2] = pydantic.Field(alias=str("actionTypes")) # type: ignore[literal-required] + query_types: typing.Dict[VersionedQueryTypeApiName, QueryTypeV2] = pydantic.Field(alias=str("queryTypes")) # type: ignore[literal-required] + interface_types: typing.Dict[InterfaceTypeApiName, InterfaceType] = pydantic.Field(alias=str("interfaceTypes")) # type: ignore[literal-required] + shared_property_types: typing.Dict[SharedPropertyTypeApiName, SharedPropertyType] = pydantic.Field(alias=str("sharedPropertyTypes")) # type: ignore[literal-required] + branch: typing.Optional[core_models.BranchMetadata] = None + value_types: typing.Dict[ValueTypeApiName, OntologyValueType] = pydantic.Field(alias=str("valueTypes")) # type: ignore[literal-required] + + +OntologyIdentifier = str +""" +The API name or RID of the Ontology. To find the API name or RID, use the **List Ontologies** endpoint or +check the **Ontology Manager**. +""" + + +class OntologyInterfaceObjectSetType(core.ModelBase): + """OntologyInterfaceObjectSetType""" + + interface_type_api_name: InterfaceTypeApiName = pydantic.Field(alias=str("interfaceTypeApiName")) # type: ignore[literal-required] + type: typing.Literal["interfaceObjectSet"] = "interfaceObjectSet" + + +class OntologyInterfaceObjectType(core.ModelBase): + """OntologyInterfaceObjectType""" + + interface_type_api_name: typing.Optional[InterfaceTypeApiName] = pydantic.Field(alias=str("interfaceTypeApiName"), default=None) # type: ignore[literal-required] + type: typing.Literal["interfaceObject"] = "interfaceObject" + + +class OntologyMapType(core.ModelBase): + """OntologyMapType""" + + key_type: OntologyDataType = pydantic.Field(alias=str("keyType")) # type: ignore[literal-required] + value_type: OntologyDataType = pydantic.Field(alias=str("valueType")) # type: ignore[literal-required] + type: typing.Literal["map"] = "map" + + +class OntologyObjectArrayType(core.ModelBase): + """OntologyObjectArrayType""" + + sub_type: ObjectPropertyType = pydantic.Field(alias=str("subType")) # type: ignore[literal-required] + reducers: typing.List[OntologyObjectArrayTypeReducer] + """ + If non-empty, this property can be reduced to a single value of the subtype. The reducers are applied in + order to determine a winning value. The array can be loaded as a reduced value or as the full array in an + object set. + """ + + type: typing.Literal["array"] = "array" + + +class OntologyObjectArrayTypeReducer(core.ModelBase): + """OntologyObjectArrayTypeReducer""" + + direction: OntologyObjectArrayTypeReducerSortDirection + field: typing.Optional[StructFieldApiName] = None + + +OntologyObjectArrayTypeReducerSortDirection = typing.Literal[ + "ASCENDING_NULLS_LAST", "DESCENDING_NULLS_LAST" +] +"""OntologyObjectArrayTypeReducerSortDirection""" + + +class OntologyObjectSetType(core.ModelBase): + """OntologyObjectSetType""" + + object_api_name: typing.Optional[ObjectTypeApiName] = pydantic.Field(alias=str("objectApiName"), default=None) # type: ignore[literal-required] + object_type_api_name: typing.Optional[ObjectTypeApiName] = pydantic.Field(alias=str("objectTypeApiName"), default=None) # type: ignore[literal-required] + type: typing.Literal["objectSet"] = "objectSet" + + +class OntologyObjectType(core.ModelBase): + """OntologyObjectType""" + + object_api_name: ObjectTypeApiName = pydantic.Field(alias=str("objectApiName")) # type: ignore[literal-required] + object_type_api_name: ObjectTypeApiName = pydantic.Field(alias=str("objectTypeApiName")) # type: ignore[literal-required] + type: typing.Literal["object"] = "object" + + +class OntologyObjectTypeReferenceType(core.ModelBase): + """OntologyObjectTypeReferenceType""" + + type: typing.Literal["objectType"] = "objectType" + + +OntologyObjectV2 = typing.Dict["PropertyApiName", "PropertyValue"] +"""Represents an object in the Ontology.""" + + +OntologyRid = core.RID +""" +The unique Resource Identifier (RID) of the Ontology. To look up your Ontology RID, please use the +`List ontologies` endpoint or check the **Ontology Manager**. +""" + + +class OntologySetType(core.ModelBase): + """OntologySetType""" + + item_type: OntologyDataType = pydantic.Field(alias=str("itemType")) # type: ignore[literal-required] + type: typing.Literal["set"] = "set" + + +class OntologyStructField(core.ModelBase): + """OntologyStructField""" + + name: core_models.StructFieldName + field_type: OntologyDataType = pydantic.Field(alias=str("fieldType")) # type: ignore[literal-required] + required: bool + + +class OntologyStructType(core.ModelBase): + """OntologyStructType""" + + fields: typing.List[OntologyStructField] + type: typing.Literal["struct"] = "struct" + + +OntologyTransactionId = str +"""The ID identifying a transaction.""" + + +class OntologyV2(core.ModelBase): + """Metadata about an Ontology.""" + + api_name: OntologyApiName = pydantic.Field(alias=str("apiName")) # type: ignore[literal-required] + display_name: core_models.DisplayName = pydantic.Field(alias=str("displayName")) # type: ignore[literal-required] + description: str + rid: OntologyRid + + +class OntologyValueType(core.ModelBase): + """OntologyValueType""" + + api_name: ValueTypeApiName = pydantic.Field(alias=str("apiName")) # type: ignore[literal-required] + display_name: core_models.DisplayName = pydantic.Field(alias=str("displayName")) # type: ignore[literal-required] + description: typing.Optional[str] = None + rid: ValueTypeRid + status: typing.Optional[ValueTypeStatus] = None + field_type: ValueTypeFieldType = pydantic.Field(alias=str("fieldType")) # type: ignore[literal-required] + version: str + constraints: typing.List[ValueTypeConstraint] + + +class OrQueryV2(core.ModelBase): + """Returns objects where at least 1 query is satisfied.""" + + value: typing.List[SearchJsonQueryV2] + type: typing.Literal["or"] = "or" + + +OrderBy = str +""" +A command representing the list of properties to order by. Properties should be delimited by commas and +prefixed by `p` or `properties`. The format expected format is +`orderBy=properties.{property}:{sortDirection},properties.{property}:{sortDirection}...` + +By default, the ordering for a property is ascending, and this can be explicitly specified by appending +`:asc` (for ascending) or `:desc` (for descending). + +Example: use `orderBy=properties.lastName:asc` to order by a single property, +`orderBy=properties.lastName,properties.firstName,properties.age:desc` to order by multiple properties. +You may also use the shorthand `p` instead of `properties` such as `orderBy=p.lastName:asc`. +""" + + +OrderByDirection = typing.Literal["ASC", "DESC"] +"""OrderByDirection""" + + +ParameterEvaluatedConstraint = typing_extensions.Annotated[ + typing.Union[ + "StructEvaluatedConstraint", + "OneOfConstraint", + "ArrayEvaluatedConstraint", + "GroupMemberConstraint", + "ObjectPropertyValueConstraint", + "RangeConstraint", + "ArraySizeConstraint", + "ObjectQueryResultConstraint", + "StringLengthConstraint", + "StringRegexMatchConstraint", + "UnevaluableConstraint", + ], + pydantic.Field(discriminator="type"), +] +""" +A constraint that an action parameter value must satisfy in order to be considered valid. +Constraints can be configured on action parameters in the **Ontology Manager**. +Applicable constraints are determined dynamically based on parameter inputs. +Parameter values are evaluated against the final set of constraints. + +The type of the constraint. +| Type | Description | +|-----------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| `arraySize` | The parameter expects an array of values and the size of the array must fall within the defined range. | +| `groupMember` | The parameter value must be the user id of a member belonging to at least one of the groups defined by the constraint. | +| `objectPropertyValue` | The parameter value must be a property value of an object found within an object set. | +| `objectQueryResult` | The parameter value must be the primary key of an object found within an object set. | +| `oneOf` | The parameter has a manually predefined set of options. | +| `range` | The parameter value must be within the defined range. | +| `stringLength` | The parameter value must have a length within the defined range. | +| `stringRegexMatch` | The parameter value must match a predefined regular expression. | +| `unevaluable` | The parameter cannot be evaluated because it depends on another parameter or object set that can't be evaluated. This can happen when a parameter's allowed values are defined by another parameter that is missing or invalid. | +""" + + +class ParameterEvaluationResult(core.ModelBase): + """Represents the validity of a parameter against the configured constraints.""" + + result: ValidationResult + evaluated_constraints: typing.List[ParameterEvaluatedConstraint] = pydantic.Field(alias=str("evaluatedConstraints")) # type: ignore[literal-required] + required: bool + """Represents whether the parameter is a required input to the action.""" + + +ParameterId = str +""" +The unique identifier of the parameter. Parameters are used as inputs when an action or query is applied. +Parameters can be viewed and managed in the **Ontology Manager**. +""" + + +class ParameterIdArgument(core.ModelBase): + """Represents a parameter ID argument in a logic rule.""" + + parameter_id: ParameterId = pydantic.Field(alias=str("parameterId")) # type: ignore[literal-required] + type: typing.Literal["parameterId"] = "parameterId" + + +class ParameterOption(core.ModelBase): + """A possible value for the parameter. This is defined in the **Ontology Manager** by Actions admins.""" + + display_name: typing.Optional[core_models.DisplayName] = pydantic.Field(alias=str("displayName"), default=None) # type: ignore[literal-required] + value: typing.Optional[typing.Any] = None + """An allowed configured value for a parameter within an action.""" + + +Plaintext = str +"""Plaintext""" + + +class PostTransactionEditsRequest(core.ModelBase): + """The request payload for staging edits to a transaction.""" + + edits: typing.List[TransactionEdit] + + +class PostTransactionEditsResponse(core.ModelBase): + """PostTransactionEditsResponse""" + + +class PreciseDuration(core.ModelBase): + """A measurement of duration.""" + + value: int + """The duration value.""" + + unit: PreciseTimeUnit + type: typing.Literal["duration"] = "duration" + + +PreciseTimeUnit = typing.Literal["NANOSECONDS", "SECONDS", "MINUTES", "HOURS", "DAYS", "WEEKS"] +"""The unit of a fixed-width duration. Each day is 24 hours and each week is 7 days.""" + + +class PrefixOnLastTokenRule(core.ModelBase): + """ + Matches intervals containing all the terms, using exact match for all but the last term, and prefix match for + the last term. Ordering of the terms in the query is preserved. + """ + + query: str + type: typing.Literal["prefixOnLastToken"] = "prefixOnLastToken" + + +PrimaryKeyValue = typing.Any +"""Represents the primary key value that is used as a unique identifier for an object.""" + + +PropertyApiName = str +""" +The name of the property in the API. To find the API name for your property, use the `Get object type` +endpoint or check the **Ontology Manager**. +""" + + +class PropertyApiNameSelector(core.ModelBase): + """A property api name that references properties to query on.""" + + api_name: PropertyApiName = pydantic.Field(alias=str("apiName")) # type: ignore[literal-required] + type: typing.Literal["property"] = "property" + + +class PropertyBooleanFormattingRule(core.ModelBase): + """Formatting configuration for boolean property values.""" + + value_if_true: str = pydantic.Field(alias=str("valueIfTrue")) # type: ignore[literal-required] + """Value to display if this boolean is true""" + + value_if_false: str = pydantic.Field(alias=str("valueIfFalse")) # type: ignore[literal-required] + """Value to display if this boolean is false""" + + type: typing.Literal["boolean"] = "boolean" + + +class PropertyDateFormattingRule(core.ModelBase): + """Formatting configuration for date property values.""" + + format: DatetimeFormat + type: typing.Literal["date"] = "date" + + +PropertyFilter = str +""" +Represents a filter used on properties. + +Endpoints that accept this supports optional parameters that have the form: +`properties.{propertyApiName}.{propertyFilter}={propertyValueEscapedString}` to filter the returned objects. +For instance, you may use `properties.firstName.eq=John` to find objects that contain a property called +"firstName" that has the exact value of "John". + +The following are a list of supported property filters: + +- `properties.{propertyApiName}.contains` - supported on arrays and can be used to filter array properties + that have at least one of the provided values. If multiple query parameters are provided, then objects + that have any of the given values for the specified property will be matched. +- `properties.{propertyApiName}.eq` - used to filter objects that have the exact value for the provided + property. If multiple query parameters are provided, then objects that have any of the given values + will be matched. For instance, if the user provides a request by doing + `?properties.firstName.eq=John&properties.firstName.eq=Anna`, then objects that have a firstName property + of either John or Anna will be matched. This filter is supported on all property types except Arrays. +- `properties.{propertyApiName}.neq` - used to filter objects that do not have the provided property values. + Similar to the `eq` filter, if multiple values are provided, then objects that have any of the given values + will be excluded from the result. +- `properties.{propertyApiName}.lt`, `properties.{propertyApiName}.lte`, `properties.{propertyApiName}.gt` + `properties.{propertyApiName}.gte` - represent less than, less than or equal to, greater than, and greater + than or equal to respectively. These are supported on date, timestamp, byte, integer, long, double, decimal. +- `properties.{propertyApiName}.isNull` - used to filter objects where the provided property is (or is not) null. + This filter is supported on all property types. +""" + + +PropertyId = str +""" +The immutable ID of a property. Property IDs are only used to identify properties in the **Ontology Manager** +application and assign them API names. In every other case, API names should be used instead of property IDs. +""" + + +PropertyIdentifier = typing_extensions.Annotated[ + typing.Union["PropertyApiNameSelector", "StructFieldSelector", "PropertyWithLoadLevelSelector"], + pydantic.Field(discriminator="type"), +] +"""An identifier used to select properties or struct fields.""" + + +class PropertyImplementation(core.ModelBase): + """PropertyImplementation""" + + property_api_name: PropertyApiName = pydantic.Field(alias=str("propertyApiName")) # type: ignore[literal-required] + type: typing.Literal["property"] = "property" + + +class PropertyKnownTypeFormattingRule(core.ModelBase): + """Formatting configuration for known Foundry types.""" + + known_type: KnownType = pydantic.Field(alias=str("knownType")) # type: ignore[literal-required] + type: typing.Literal["knownType"] = "knownType" + + +PropertyLoadLevel = typing_extensions.Annotated[ + typing.Union[ + "ApplyReducersAndExtractMainValueLoadLevel", + "ApplyReducersLoadLevel", + "ExtractMainValueLoadLevel", + ], + pydantic.Field(discriminator="type"), +] +""" +The load level of the property: +- APPLY_REDUCERS: Returns a single value of an array as configured in the ontology. +- EXTRACT_MAIN_VALUE: Returns the main value of a struct as configured in the ontology. +- APPLY_REDUCERS_AND_EXTRACT_MAIN_VALUE: Performs both to return the reduced main value. +""" + + +class PropertyNumberFormattingRule(core.ModelBase): + """Wrapper for numeric formatting options.""" + + number_type: PropertyNumberFormattingRuleType = pydantic.Field(alias=str("numberType")) # type: ignore[literal-required] + type: typing.Literal["number"] = "number" + + +PropertyNumberFormattingRuleType = typing_extensions.Annotated[ + typing.Union[ + "NumberFormatStandard", + "NumberFormatDuration", + "NumberFormatFixedValues", + "NumberFormatAffix", + "NumberFormatScale", + "NumberFormatCurrency", + "NumberFormatStandardUnit", + "NumberFormatCustomUnit", + "NumberFormatRatio", + ], + pydantic.Field(discriminator="type"), +] +"""PropertyNumberFormattingRuleType""" + + +PropertyOrStructFieldOfPropertyImplementation = typing_extensions.Annotated[ + typing.Union["StructFieldOfPropertyImplementation", "PropertyImplementation"], + pydantic.Field(discriminator="type"), +] +"""PropertyOrStructFieldOfPropertyImplementation""" + + +class PropertyTimestampFormattingRule(core.ModelBase): + """Formatting configuration for timestamp property values.""" + + format: DatetimeFormat + display_timezone: DatetimeTimezone = pydantic.Field(alias=str("displayTimezone")) # type: ignore[literal-required] + type: typing.Literal["timestamp"] = "timestamp" + + +PropertyTypeApiName = str +"""PropertyTypeApiName""" + + +class PropertyTypeReference(core.ModelBase): + """PropertyTypeReference""" + + property_api_name: str = pydantic.Field(alias=str("propertyApiName")) # type: ignore[literal-required] + """The API name of the PropertyType""" + + type: typing.Literal["propertyType"] = "propertyType" + + +PropertyTypeReferenceOrStringConstant = typing_extensions.Annotated[ + typing.Union["StringConstant", "PropertyTypeReference"], pydantic.Field(discriminator="type") +] +"""PropertyTypeReferenceOrStringConstant""" + + +PropertyTypeRid = core.RID +"""PropertyTypeRid""" + + +PropertyTypeStatus = typing_extensions.Annotated[ + typing.Union[ + "DeprecatedPropertyTypeStatus", + "ActivePropertyTypeStatus", + "ExperimentalPropertyTypeStatus", + "ExamplePropertyTypeStatus", + ], + pydantic.Field(discriminator="type"), +] +"""The status to indicate whether the PropertyType is either Experimental, Active, Deprecated, or Example.""" + + +PropertyTypeVisibility = typing.Literal["NORMAL", "PROMINENT", "HIDDEN"] +"""PropertyTypeVisibility""" + + +class PropertyV2(core.ModelBase): + """Details about some property of an object.""" + + description: typing.Optional[str] = None + display_name: typing.Optional[core_models.DisplayName] = pydantic.Field(alias=str("displayName"), default=None) # type: ignore[literal-required] + data_type: ObjectPropertyType = pydantic.Field(alias=str("dataType")) # type: ignore[literal-required] + rid: PropertyTypeRid + status: typing.Optional[PropertyTypeStatus] = None + visibility: typing.Optional[PropertyTypeVisibility] = None + value_type_api_name: typing.Optional[ValueTypeApiName] = pydantic.Field(alias=str("valueTypeApiName"), default=None) # type: ignore[literal-required] + value_formatting: typing.Optional[PropertyValueFormattingRule] = pydantic.Field(alias=str("valueFormatting"), default=None) # type: ignore[literal-required] + + +PropertyValue = typing.Any +""" +Represents the value of a property in the following format. + +| Type | JSON encoding | Example | +|---------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------|----------------------------------------------------------------------------------------------------| +| Array | array | `["alpha", "bravo", "charlie"]` | +| [Attachment](https://palantir.com/docs/foundry/api/v2/ontologies-v2-resources/attachment-properties/attachment-property-basics/) | JSON encoded `AttachmentProperty` object | `{"rid":"ri.blobster.main.attachment.2f944bae-5851-4204-8615-920c969a9f2e"}` | +| Boolean | boolean | `true` | +| Byte | number | `31` | +| CipherText | string | `"CIPHER::ri.bellaso.main.cipher-channel.e414ab9e-b606-499a-a0e1-844fa296ba7e::unzjs3VifsTxuIpf1fH1CJ7OaPBr2bzMMdozPaZJtCii8vVG60yXIEmzoOJaEl9mfFFe::CIPHER"` | +| Date | ISO 8601 extended local date string | `"2021-05-01"` | +| Decimal | string | `"2.718281828"` | +| Double | number | `3.14159265` | +| Float | number | `3.14159265` | +| GeoPoint | geojson | `{"type":"Point","coordinates":[102.0,0.5]}` | +| GeoShape | geojson | `{"type":"LineString","coordinates":[[102.0,0.0],[103.0,1.0],[104.0,0.0],[105.0,1.0]]}` | +| Integer | number | `238940` | +| Long | string | `"58319870951433"` | +| [MediaReference](https://palantir.com/docs/foundry/api/v2/ontologies-v2-resources/media-reference-properties/media-reference-property-basics/)| JSON encoded `MediaReference` object | `{"mimeType":"application/pdf","reference":{"type":"mediaSetViewItem","mediaSetViewItem":{"mediaSetRid":"ri.mio.main.media-set.4153d42f-ca4b-4e42-8ca5-8e6aa7edb642","mediaSetViewRid":"ri.mio.main.view.82a798ad-d637-4595-acc6-987bcf16629b","mediaItemRid":"ri.mio.main.media-item.001ec98b-1620-4814-9e17-8e9c4e536225"}}}` | +| Short | number | `8739` | +| String | string | `"Call me Ishmael"` | +| Struct | JSON object of struct field API name -> value | {"firstName": "Alex", "lastName": "Karp"} | +| Timestamp | ISO 8601 extended offset date-time string in UTC zone | `"2021-01-04T05:00:00Z"` | +| [Timeseries](https://palantir.com/docs/foundry/api/v2/ontologies-v2-resources/time-series-properties/time-series-property-basics/) | JSON encoded `TimeseriesProperty` object or seriesId string | `{"seriesId": "wellPressureSeriesId", "syncRid": ri.time-series-catalog.main.sync.04f5ac1f-91bf-44f9-a51f-4f34e06e42df"}` or `{"templateRid": "ri.codex-emu.main.template.367cac64-e53b-4653-b111-f61856a63df9", "templateVersion": "0.0.0"}` or `"wellPressureSeriesId"`| | +| Vector | array | `[0.1, 0.3, 0.02, 0.05 , 0.8, 0.4]` | + +Note that for backwards compatibility, the Boolean, Byte, Double, Float, Integer, and Short types can also be encoded as JSON strings. +""" + + +PropertyValueEscapedString = str +"""Represents the value of a property in string format. This is used in URL parameters.""" + + +PropertyValueFormattingRule = typing_extensions.Annotated[ + typing.Union[ + "PropertyDateFormattingRule", + "PropertyNumberFormattingRule", + "PropertyBooleanFormattingRule", + "PropertyKnownTypeFormattingRule", + "PropertyTimestampFormattingRule", + ], + pydantic.Field(discriminator="type"), +] +""" +This feature is experimental and may change in a future release. +Comprehensive formatting configuration for displaying property values in user interfaces. +Supports different value types including numbers, dates, timestamps, booleans, and known Foundry types. + +Each formatter type provides specific options tailored to that data type: +- Numbers: Support for percentages, currencies, units, scaling, and custom formatting +- Dates/Timestamps: Localized and custom formatting patterns +- Booleans: Custom true/false display text +- Known types: Special formatting for Foundry-specific identifiers +""" + + +class PropertyWithLoadLevelSelector(core.ModelBase): + """ + A combination of a property identifier and the load level to apply to the property. You can select a reduced + value for arrays and the main value for structs. If the provided load level cannot be applied to the property + type, then it will be ignored. This selector is experimental and may not work in filters or sorts. + """ + + property_identifier: PropertyIdentifier = pydantic.Field(alias=str("propertyIdentifier")) # type: ignore[literal-required] + load_level: PropertyLoadLevel = pydantic.Field(alias=str("loadLevel")) # type: ignore[literal-required] + type: typing.Literal["propertyWithLoadLevel"] = "propertyWithLoadLevel" + + +class QueryAggregation(core.ModelBase): + """QueryAggregation""" + + key: typing.Any + value: typing.Any + + +QueryAggregationKeyType = typing_extensions.Annotated[ + typing.Union[ + core_models.DateType, + core_models.BooleanType, + core_models.StringType, + core_models.DoubleType, + "QueryAggregationRangeType", + core_models.IntegerType, + core_models.TimestampType, + ], + pydantic.Field(discriminator="type"), +] +"""A union of all the types supported by query aggregation keys.""" + + +QueryAggregationRangeSubType = typing_extensions.Annotated[ + typing.Union[ + core_models.DateType, + core_models.DoubleType, + core_models.IntegerType, + core_models.TimestampType, + ], + pydantic.Field(discriminator="type"), +] +"""A union of all the types supported by query aggregation ranges.""" + + +class QueryAggregationRangeType(core.ModelBase): + """QueryAggregationRangeType""" + + sub_type: QueryAggregationRangeSubType = pydantic.Field(alias=str("subType")) # type: ignore[literal-required] + type: typing.Literal["range"] = "range" + + +QueryAggregationValueType = typing_extensions.Annotated[ + typing.Union[core_models.DateType, core_models.DoubleType, core_models.TimestampType], + pydantic.Field(discriminator="type"), +] +"""A union of all the types supported by query aggregation keys.""" + + +QueryApiName = str +"""The name of the Query in the API.""" + + +class QueryArrayType(core.ModelBase): + """QueryArrayType""" + + sub_type: QueryDataType = pydantic.Field(alias=str("subType")) # type: ignore[literal-required] + type: typing.Literal["array"] = "array" + + +QueryDataType = typing_extensions.Annotated[ + typing.Union[ + core_models.DateType, + "OntologyInterfaceObjectType", + "QueryStructType", + "QuerySetType", + core_models.StringType, + "EntrySetType", + core_models.DoubleType, + core_models.IntegerType, + "ThreeDimensionalAggregation", + "QueryUnionType", + core_models.FloatType, + core_models.LongType, + core_models.BooleanType, + core_models.UnsupportedType, + core_models.AttachmentType, + core_models.NullType, + "QueryArrayType", + "OntologyObjectSetType", + "TwoDimensionalAggregation", + "OntologyInterfaceObjectSetType", + "OntologyObjectType", + core_models.TimestampType, + ], + pydantic.Field(discriminator="type"), +] +"""A union of all the types supported by Ontology Query parameters or outputs.""" + + +class QueryParameterV2(core.ModelBase): + """Details about a parameter of a query.""" + + description: typing.Optional[str] = None + data_type: QueryDataType = pydantic.Field(alias=str("dataType")) # type: ignore[literal-required] + + +QueryRuntimeErrorParameter = str +"""QueryRuntimeErrorParameter""" + + +class QuerySetType(core.ModelBase): + """QuerySetType""" + + sub_type: QueryDataType = pydantic.Field(alias=str("subType")) # type: ignore[literal-required] + type: typing.Literal["set"] = "set" + + +class QueryStructField(core.ModelBase): + """QueryStructField""" + + name: core_models.StructFieldName + field_type: QueryDataType = pydantic.Field(alias=str("fieldType")) # type: ignore[literal-required] + + +class QueryStructType(core.ModelBase): + """QueryStructType""" + + fields: typing.List[QueryStructField] + type: typing.Literal["struct"] = "struct" + + +class QueryThreeDimensionalAggregation(core.ModelBase): + """QueryThreeDimensionalAggregation""" + + groups: typing.List[NestedQueryAggregation] + + +class QueryTwoDimensionalAggregation(core.ModelBase): + """QueryTwoDimensionalAggregation""" + + groups: typing.List[QueryAggregation] + + +class QueryTypeV2(core.ModelBase): + """Represents a query type in the Ontology.""" + + api_name: QueryApiName = pydantic.Field(alias=str("apiName")) # type: ignore[literal-required] + description: typing.Optional[str] = None + display_name: typing.Optional[core_models.DisplayName] = pydantic.Field(alias=str("displayName"), default=None) # type: ignore[literal-required] + parameters: typing.Dict[ParameterId, QueryParameterV2] + output: QueryDataType + rid: FunctionRid + version: FunctionVersion + + +class QueryUnionType(core.ModelBase): + """QueryUnionType""" + + union_types: typing.List[QueryDataType] = pydantic.Field(alias=str("unionTypes")) # type: ignore[literal-required] + type: typing.Literal["union"] = "union" + + +class RangeConstraint(core.ModelBase): + """The parameter value must be within the defined range.""" + + lt: typing.Optional[typing.Any] = None + """Less than""" + + lte: typing.Optional[typing.Any] = None + """Less than or equal""" + + gt: typing.Optional[typing.Any] = None + """Greater than""" + + gte: typing.Optional[typing.Any] = None + """Greater than or equal""" + + type: typing.Literal["range"] = "range" + + +class RangesConstraint(core.ModelBase): + """RangesConstraint""" + + minimum_value: typing.Optional[PropertyValue] = pydantic.Field(alias=str("minimumValue"), default=None) # type: ignore[literal-required] + maximum_value: typing.Optional[PropertyValue] = pydantic.Field(alias=str("maximumValue"), default=None) # type: ignore[literal-required] + type: typing.Literal["range"] = "range" + + +class RegexConstraint(core.ModelBase): + """RegexConstraint""" + + pattern: str + partial_match: bool = pydantic.Field(alias=str("partialMatch")) # type: ignore[literal-required] + type: typing.Literal["regex"] = "regex" + + +class RegexQuery(core.ModelBase): + """ + Returns objects where the specified field matches the regex pattern provided. This applies to the non-analyzed + form of text fields and supports standard regex syntax of dot (.), star(*) and question mark(?). + Either `field` or `propertyIdentifier` can be supplied, but not both. + """ + + field: typing.Optional[PropertyApiName] = None + property_identifier: typing.Optional[PropertyIdentifier] = pydantic.Field(alias=str("propertyIdentifier"), default=None) # type: ignore[literal-required] + value: str + type: typing.Literal["regex"] = "regex" + + +class RelativeDateRangeQuery(core.ModelBase): + """ + Returns objects where the specified date or timestamp property falls within a relative date range. + The bounds are calculated relative to query execution time and rounded to midnight in the specified timezone. + """ + + field: typing.Optional[PropertyApiName] = None + """The property API name to filter on (either field or propertyIdentifier must be provided).""" + + property_identifier: typing.Optional[PropertyIdentifier] = pydantic.Field(alias=str("propertyIdentifier"), default=None) # type: ignore[literal-required] + """The property identifier to filter on (either field or propertyIdentifier must be provided).""" + + relative_start_time: typing.Optional[RelativeDateRangeBound] = pydantic.Field(alias=str("relativeStartTime"), default=None) # type: ignore[literal-required] + """ + The lower bound relative to query time (inclusive). Negative values go into the past. + For example, { value: -7, timeUnit: DAY } means 7 days ago. + """ + + relative_end_time: typing.Optional[RelativeDateRangeBound] = pydantic.Field(alias=str("relativeEndTime"), default=None) # type: ignore[literal-required] + """ + The upper bound relative to query time (exclusive). Negative values go into the past. + For example, { value: 1, timeUnit: MONTH } means the start of next month. + """ + + time_zone_id: str = pydantic.Field(alias=str("timeZoneId")) # type: ignore[literal-required] + """ + Time zone ID for midnight calculation (e.g., "America/New_York", "Europe/London", "Etc/UTC"). + See https://en.wikipedia.org/wiki/List_of_tz_database_time_zones for valid values. + """ + + type: typing.Literal["relativeDateRange"] = "relativeDateRange" + + +class RelativePointInTime(core.ModelBase): + """A point in time specified relative to query execution time.""" + + value: int + """The numeric value of the time offset. Negative values indicate the past, positive values the future.""" + + time_unit: RelativeTimeUnit = pydantic.Field(alias=str("timeUnit")) # type: ignore[literal-required] + """The unit of time for the value.""" + + type: typing.Literal["relativePoint"] = "relativePoint" + + +class RelativeTime(core.ModelBase): + """A relative time, such as "3 days before" or "2 hours after" the current moment.""" + + when: RelativeTimeRelation + value: int + unit: RelativeTimeSeriesTimeUnit + + +class RelativeTimeRange(core.ModelBase): + """A relative time range for a time series query.""" + + start_time: typing.Optional[RelativeTime] = pydantic.Field(alias=str("startTime"), default=None) # type: ignore[literal-required] + end_time: typing.Optional[RelativeTime] = pydantic.Field(alias=str("endTime"), default=None) # type: ignore[literal-required] + type: typing.Literal["relative"] = "relative" + + +RelativeTimeRelation = typing.Literal["BEFORE", "AFTER"] +"""RelativeTimeRelation""" + + +RelativeTimeSeriesTimeUnit = typing.Literal[ + "MILLISECONDS", "SECONDS", "MINUTES", "HOURS", "DAYS", "WEEKS", "MONTHS", "YEARS" +] +"""RelativeTimeSeriesTimeUnit""" + + +RelativeTimeUnit = typing.Literal["DAY", "WEEK", "MONTH", "YEAR"] +"""Units for relative time calculations.""" + + +class ResolvedInterfacePropertyType(core.ModelBase): + """ + An interface property type with additional fields to indicate constraints that need to be satisfied by + implementing object property types. + """ + + rid: InterfacePropertyTypeRid + api_name: InterfacePropertyApiName = pydantic.Field(alias=str("apiName")) # type: ignore[literal-required] + display_name: core_models.DisplayName = pydantic.Field(alias=str("displayName")) # type: ignore[literal-required] + description: typing.Optional[str] = None + """A short text that describes the InterfacePropertyType.""" + + data_type: ObjectPropertyType = pydantic.Field(alias=str("dataType")) # type: ignore[literal-required] + value_type_api_name: typing.Optional[ValueTypeApiName] = pydantic.Field(alias=str("valueTypeApiName"), default=None) # type: ignore[literal-required] + value_formatting: typing.Optional[PropertyValueFormattingRule] = pydantic.Field(alias=str("valueFormatting"), default=None) # type: ignore[literal-required] + require_implementation: bool = pydantic.Field(alias=str("requireImplementation")) # type: ignore[literal-required] + """Whether each implementing object type must declare an implementation for this property.""" + + +ReturnEditsMode = typing.Literal["ALL", "ALL_V2_WITH_DELETIONS", "NONE"] +"""ReturnEditsMode""" + + +class RidConstraint(core.ModelBase): + """The string must be a valid RID (Resource Identifier).""" + + type: typing.Literal["rid"] = "rid" + + +class RollingAggregateWindowPoints(core.ModelBase): + """Number of points in each window.""" + + count: int + type: typing.Literal["pointsCount"] = "pointsCount" + + +SdkPackageName = str +"""SdkPackageName""" + + +SdkPackageRid = core.RID +"""SdkPackageRid""" + + +SdkVersion = str +"""SdkVersion""" + + +SearchJsonQueryV2 = typing_extensions.Annotated[ + typing.Union[ + "LtQueryV2", + "DoesNotIntersectBoundingBoxQuery", + "RelativeDateRangeQuery", + "WildcardQuery", + "WithinDistanceOfQuery", + "WithinBoundingBoxQuery", + "NotQueryV2", + "IntersectsBoundingBoxQuery", + "AndQueryV2", + "ContainsAllTermsInOrderPrefixLastTerm", + "GteQueryV2", + "ContainsAllTermsInOrderQuery", + "WithinPolygonQuery", + "IntersectsPolygonQuery", + "LteQueryV2", + "OrQueryV2", + "InQuery", + "DoesNotIntersectPolygonQuery", + "EqualsQueryV2", + "ContainsAllTermsQuery", + "GtQueryV2", + "ContainsQueryV2", + "RegexQuery", + "IsNullQueryV2", + "ContainsAnyTermQuery", + "IntervalQuery", + "StartsWithQuery", + ], + pydantic.Field(discriminator="type"), +] +"""SearchJsonQueryV2""" + + +class SearchObjectsForInterfaceRequest(core.ModelBase): + """SearchObjectsForInterfaceRequest""" + + where: typing.Optional[SearchJsonQueryV2] = None + order_by: typing.Optional[SearchOrderByV2] = pydantic.Field(alias=str("orderBy"), default=None) # type: ignore[literal-required] + augmented_properties: typing.Dict[ObjectTypeApiName, typing.List[PropertyApiName]] = pydantic.Field(alias=str("augmentedProperties")) # type: ignore[literal-required] + """ + A map from object type API name to a list of property type API names. For each returned object, if the + object’s object type is a key in the map, then we augment the response for that object type with the list + of properties specified in the value. + """ + + augmented_shared_property_types: typing.Dict[InterfaceTypeApiName, typing.List[SharedPropertyTypeApiName]] = pydantic.Field(alias=str("augmentedSharedPropertyTypes")) # type: ignore[literal-required] + """ + A map from interface type API name to a list of shared property type API names. For each returned object, if + the object implements an interface that is a key in the map, then we augment the response for that object + type with the list of properties specified in the value. + """ + + augmented_interface_property_types: typing.Dict[InterfaceTypeApiName, typing.List[InterfacePropertyApiName]] = pydantic.Field(alias=str("augmentedInterfacePropertyTypes")) # type: ignore[literal-required] + """ + A map from interface type API name to a list of interface property type API names. For each returned object, + if the object implements an interface that is a key in the map, then we augment the response for that object + type with the list of properties specified in the value. + """ + + selected_shared_property_types: typing.List[SharedPropertyTypeApiName] = pydantic.Field(alias=str("selectedSharedPropertyTypes")) # type: ignore[literal-required] + """ + A list of shared property type API names of the interface type that should be included in the response. + Omit this parameter to include all properties of the interface type in the response. + """ + + selected_interface_property_types: typing.List[InterfacePropertyApiName] = pydantic.Field(alias=str("selectedInterfacePropertyTypes")) # type: ignore[literal-required] + """ + A list of interface property type API names of the interface type that should be included in the response. + Omit this parameter to include all properties of the interface type in the response. + """ + + selected_object_types: typing.List[ObjectTypeApiName] = pydantic.Field(alias=str("selectedObjectTypes")) # type: ignore[literal-required] + """ + A list of object type API names that should be included in the response. If non-empty, object types that are + not mentioned will not be included in the response even if they implement the specified interface. Omit the + parameter to include all object types. + """ + + other_interface_types: typing.List[InterfaceTypeApiName] = pydantic.Field(alias=str("otherInterfaceTypes")) # type: ignore[literal-required] + """ + A list of interface type API names. Object types must implement all the mentioned interfaces in order to be + included in the response. + """ + + page_size: typing.Optional[core_models.PageSize] = pydantic.Field(alias=str("pageSize"), default=None) # type: ignore[literal-required] + page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("pageToken"), default=None) # type: ignore[literal-required] + + +class SearchObjectsRequestV2(core.ModelBase): + """SearchObjectsRequestV2""" + + where: typing.Optional[SearchJsonQueryV2] = None + order_by: typing.Optional[SearchOrderByV2] = pydantic.Field(alias=str("orderBy"), default=None) # type: ignore[literal-required] + page_size: typing.Optional[core_models.PageSize] = pydantic.Field(alias=str("pageSize"), default=None) # type: ignore[literal-required] + page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("pageToken"), default=None) # type: ignore[literal-required] + select: typing.List[PropertyApiName] + """The API names of the object type properties to include in the response.""" + + select_v2: typing.Optional[typing.List[PropertyIdentifier]] = pydantic.Field(alias=str("selectV2"), default=None) # type: ignore[literal-required] + """ + The identifiers of the properties to include in the response. Only selectV2 or select should be populated, + but not both. + """ + + exclude_rid: typing.Optional[bool] = pydantic.Field(alias=str("excludeRid"), default=None) # type: ignore[literal-required] + """ + A flag to exclude the retrieval of the `__rid` property. + Setting this to true may improve performance of this endpoint for object types in OSV2. + """ + + snapshot: typing.Optional[bool] = None + """ + A flag to use snapshot consistency when paging. + Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. + Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. + This defaults to false if not specified, which means you will always get the latest results. + """ + + +class SearchObjectsResponseV2(core.ModelBase): + """SearchObjectsResponseV2""" + + data: typing.List[OntologyObjectV2] + next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] + total_count: core_models.TotalCount = pydantic.Field(alias=str("totalCount")) # type: ignore[literal-required] + + +SearchOrderByType = typing.Literal["fields", "relevance"] +"""SearchOrderByType""" + + +class SearchOrderByV2(core.ModelBase): + """Specifies the ordering of search results by a field and an ordering direction or by relevance if scores are required in a nearestNeighbors query. By default `orderType` is set to `fields`.""" + + order_type: typing.Optional[SearchOrderByType] = pydantic.Field(alias=str("orderType"), default=None) # type: ignore[literal-required] + fields: typing.List[SearchOrderingV2] + + +class SearchOrderingV2(core.ModelBase): + """SearchOrderingV2""" + + field: PropertyApiName + direction: typing.Optional[str] = None + """Specifies the ordering direction (can be either `asc` or `desc`)""" + + +SelectedPropertyApiName = str +""" +By default, whenever an object is requested, all of its properties are returned, except for properties of the +following types: +- Vector + +The response can be filtered to only include certain properties using the `properties` query parameter. Note +that ontology object set endpoints refer to this parameter as `select`. + +Properties to include can be specified in one of two ways. + +- A comma delimited list as the value for the `properties` query parameter + `properties={property1ApiName},{property2ApiName}` +- Multiple `properties` query parameters. + `properties={property1ApiName}&properties={property2ApiName}` + +The primary key of the object will always be returned even if it wasn't specified in the `properties` values. + +Unknown properties specified in the `properties` list will result in a `PropertiesNotFound` error. + +To find the API name for your property, use the `Get object type` endpoint or check the **Ontology Manager**. +""" + + +class SelectedPropertyApproximateDistinctAggregation(core.ModelBase): + """Computes an approximate number of distinct values for the provided field.""" + + selected_property_api_name: PropertyApiName = pydantic.Field(alias=str("selectedPropertyApiName")) # type: ignore[literal-required] + type: typing.Literal["approximateDistinct"] = "approximateDistinct" + + +class SelectedPropertyApproximatePercentileAggregation(core.ModelBase): + """Computes the approximate percentile value for the provided field.""" + + selected_property_api_name: PropertyApiName = pydantic.Field(alias=str("selectedPropertyApiName")) # type: ignore[literal-required] + approximate_percentile: float = pydantic.Field(alias=str("approximatePercentile")) # type: ignore[literal-required] + type: typing.Literal["approximatePercentile"] = "approximatePercentile" + + +class SelectedPropertyAvgAggregation(core.ModelBase): + """Computes the average value for the provided field.""" + + selected_property_api_name: PropertyApiName = pydantic.Field(alias=str("selectedPropertyApiName")) # type: ignore[literal-required] + type: typing.Literal["avg"] = "avg" + + +class SelectedPropertyCollectListAggregation(core.ModelBase): + """ + Lists all values of a property up to the specified limit. The maximum supported limit is 100, by default. + + NOTE: A separate count aggregation should be used to determine the total count of values, to account for + a possible truncation of the returned list. + + Ignores objects for which a property is absent, so the returned list will contain non-null values only. + Returns an empty list when none of the objects have values for a provided property. + """ + + selected_property_api_name: PropertyApiName = pydantic.Field(alias=str("selectedPropertyApiName")) # type: ignore[literal-required] + limit: int + """Maximum number of values to collect. The maximum supported limit is 100.""" + + type: typing.Literal["collectList"] = "collectList" + + +class SelectedPropertyCollectSetAggregation(core.ModelBase): + """ + Lists all distinct values of a property up to the specified limit. The maximum supported limit is 100. + + NOTE: A separate cardinality / exactCardinality aggregation should be used to determine the total count of + values, to account for a possible truncation of the returned set. + + Ignores objects for which a property is absent, so the returned list will contain non-null values only. + Returns an empty list when none of the objects have values for a provided property. + """ + + selected_property_api_name: PropertyApiName = pydantic.Field(alias=str("selectedPropertyApiName")) # type: ignore[literal-required] + limit: int + """Maximum number of values to collect. The maximum supported limit is 100.""" + + type: typing.Literal["collectSet"] = "collectSet" + + +class SelectedPropertyCountAggregation(core.ModelBase): + """Computes the total count of objects.""" + + type: typing.Literal["count"] = "count" + + +class SelectedPropertyExactDistinctAggregation(core.ModelBase): + """Computes an exact number of distinct values for the provided field. May be slower than an approximate distinct aggregation.""" + + selected_property_api_name: PropertyApiName = pydantic.Field(alias=str("selectedPropertyApiName")) # type: ignore[literal-required] + type: typing.Literal["exactDistinct"] = "exactDistinct" + + +class SelectedPropertyExpression(core.ModelBase): + """Definition for a selected property over a MethodObjectSet.""" + + object_set: MethodObjectSet = pydantic.Field(alias=str("objectSet")) # type: ignore[literal-required] + operation: SelectedPropertyOperation + type: typing.Literal["selection"] = "selection" + + +class SelectedPropertyMaxAggregation(core.ModelBase): + """Computes the maximum value for the provided field.""" + + selected_property_api_name: PropertyApiName = pydantic.Field(alias=str("selectedPropertyApiName")) # type: ignore[literal-required] + type: typing.Literal["max"] = "max" + + +class SelectedPropertyMinAggregation(core.ModelBase): + """Computes the minimum value for the provided field.""" + + selected_property_api_name: PropertyApiName = pydantic.Field(alias=str("selectedPropertyApiName")) # type: ignore[literal-required] + type: typing.Literal["min"] = "min" + + +SelectedPropertyOperation = typing_extensions.Annotated[ + typing.Union[ + "SelectedPropertyApproximateDistinctAggregation", + "SelectedPropertyMinAggregation", + "SelectedPropertyAvgAggregation", + "SelectedPropertyMaxAggregation", + "SelectedPropertyApproximatePercentileAggregation", + "GetSelectedPropertyOperation", + "SelectedPropertyCountAggregation", + "SelectedPropertySumAggregation", + "SelectedPropertyCollectListAggregation", + "SelectedPropertyExactDistinctAggregation", + "SelectedPropertyCollectSetAggregation", + ], + pydantic.Field(discriminator="type"), +] +"""Operation on a selected property, can be an aggregation function or retrieval of a single selected property""" + + +class SelectedPropertySumAggregation(core.ModelBase): + """Computes the sum of values for the provided field.""" + + selected_property_api_name: PropertyApiName = pydantic.Field(alias=str("selectedPropertyApiName")) # type: ignore[literal-required] + type: typing.Literal["sum"] = "sum" + + +class SharedPropertyType(core.ModelBase): + """A property type that can be shared across object types.""" + + rid: SharedPropertyTypeRid + api_name: SharedPropertyTypeApiName = pydantic.Field(alias=str("apiName")) # type: ignore[literal-required] + display_name: core_models.DisplayName = pydantic.Field(alias=str("displayName")) # type: ignore[literal-required] + description: typing.Optional[str] = None + """A short text that describes the SharedPropertyType.""" + + data_type: ObjectPropertyType = pydantic.Field(alias=str("dataType")) # type: ignore[literal-required] + value_type_api_name: typing.Optional[ValueTypeApiName] = pydantic.Field(alias=str("valueTypeApiName"), default=None) # type: ignore[literal-required] + value_formatting: typing.Optional[PropertyValueFormattingRule] = pydantic.Field(alias=str("valueFormatting"), default=None) # type: ignore[literal-required] + + +SharedPropertyTypeApiName = str +""" +The name of the shared property type in the API in lowerCamelCase format. To find the API name for your +shared property type, use the `List shared property types` endpoint or check the **Ontology Manager**. +""" + + +SharedPropertyTypeRid = core.RID +"""The unique resource identifier of an shared property type, useful for interacting with other Foundry APIs.""" + + +class StartsWithQuery(core.ModelBase): + """ + Deprecated alias for `containsAllTermsInOrderPrefixLastTerm`, which is preferred because the name `startsWith` is misleading. + Returns objects where the specified field starts with the provided value. Allows you to specify a property to + query on by a variety of means. Either `field` or `propertyIdentifier` must be supplied, but not both. + """ + + field: typing.Optional[PropertyApiName] = None + property_identifier: typing.Optional[PropertyIdentifier] = pydantic.Field(alias=str("propertyIdentifier"), default=None) # type: ignore[literal-required] + value: str + type: typing.Literal["startsWith"] = "startsWith" + + +class StaticArgument(core.ModelBase): + """Represents a static argument in a logic rule.""" + + value: DataValue + type: typing.Literal["staticValue"] = "staticValue" + + +class StreamTimeSeriesPointsRequest(core.ModelBase): + """StreamTimeSeriesPointsRequest""" + + range: typing.Optional[TimeRange] = None + aggregate: typing.Optional[AggregateTimeSeries] = None + + +class StreamTimeSeriesValuesRequest(core.ModelBase): + """StreamTimeSeriesValuesRequest""" + + range: typing.Optional[TimeRange] = None + + +StreamingOutputFormat = typing.Literal["JSON", "ARROW"] +""" +Which format to serialize the binary stream in. +ARROW is more efficient for streaming a large sized response. +""" + + +class StringConstant(core.ModelBase): + """StringConstant""" + + value: str + type: typing.Literal["constant"] = "constant" + + +class StringLengthConstraint(core.ModelBase): + """ + The parameter value must have a length within the defined range. + *This range is always inclusive.* + """ + + lt: typing.Optional[typing.Any] = None + """Less than""" + + lte: typing.Optional[typing.Any] = None + """Less than or equal""" + + gt: typing.Optional[typing.Any] = None + """Greater than""" + + gte: typing.Optional[typing.Any] = None + """Greater than or equal""" + + type: typing.Literal["stringLength"] = "stringLength" + + +class StringRegexMatchConstraint(core.ModelBase): + """The parameter value must match a predefined regular expression.""" + + regex: str + """The regular expression configured in the **Ontology Manager**.""" + + configured_failure_message: typing.Optional[str] = pydantic.Field(alias=str("configuredFailureMessage"), default=None) # type: ignore[literal-required] + """ + The message indicating that the regular expression was not matched. + This is configured per parameter in the **Ontology Manager**. + """ + + type: typing.Literal["stringRegexMatch"] = "stringRegexMatch" + + +class StructConstraint(core.ModelBase): + """StructConstraint""" + + properties: typing.Dict[PropertyApiName, ValueTypeApiName] + """A map of the properties of the struct type to the value type applied to that property.""" + + type: typing.Literal["struct"] = "struct" + + +class StructEvaluatedConstraint(core.ModelBase): + """Represents the validity of a singleton struct parameter.""" + + struct_fields: typing.Dict[StructParameterFieldApiName, StructFieldEvaluationResult] = pydantic.Field(alias=str("structFields")) # type: ignore[literal-required] + type: typing.Literal["struct"] = "struct" + + +StructFieldApiName = str +"""The name of a struct field in the Ontology.""" + + +StructFieldArgument = typing_extensions.Annotated[ + typing.Union["StructListParameterFieldArgument", "StructParameterFieldArgument"], + pydantic.Field(discriminator="type"), +] +"""Represents an argument used for an individual struct field.""" + + +StructFieldEvaluatedConstraint = typing_extensions.Annotated[ + typing.Union[ + "OneOfConstraint", + "RangeConstraint", + "ObjectQueryResultConstraint", + "StringLengthConstraint", + "StringRegexMatchConstraint", + ], + pydantic.Field(discriminator="type"), +] +""" +A constraint that an action struct parameter field value must satisfy in order to be considered valid. +Constraints can be configured on fields of struct parameters in the **Ontology Manager**. +Applicable constraints are determined dynamically based on parameter inputs. +Parameter values are evaluated against the final set of constraints. + +The type of the constraint. +| Type | Description | +|-----------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| `oneOf` | The struct parameter field has a manually predefined set of options. | +| `range` | The struct parameter field value must be within the defined range. | +| `stringLength` | The struct parameter field value must have a length within the defined range. | +| `stringRegexMatch` | The struct parameter field value must match a predefined regular expression. | +| `objectQueryResult` | The struct parameter field value must be the primary key of an object found within an object set. | +""" + + +class StructFieldEvaluationResult(core.ModelBase): + """Represents the validity of a struct parameter's fields against the configured constraints.""" + + result: ValidationResult + evaluated_constraints: typing.List[StructFieldEvaluatedConstraint] = pydantic.Field(alias=str("evaluatedConstraints")) # type: ignore[literal-required] + required: bool + """Represents whether the parameter is a required input to the action.""" + + +class StructFieldOfPropertyImplementation(core.ModelBase): + """StructFieldOfPropertyImplementation""" + + property_api_name: PropertyApiName = pydantic.Field(alias=str("propertyApiName")) # type: ignore[literal-required] + struct_field_api_name: StructFieldApiName = pydantic.Field(alias=str("structFieldApiName")) # type: ignore[literal-required] + type: typing.Literal["structFieldOfProperty"] = "structFieldOfProperty" + + +class StructFieldSelector(core.ModelBase): + """ + A combination of a property identifier and the load level to apply to the property. You can select a reduced + value for arrays and the main value for structs. If the provided load level cannot be applied to the property + type, then it will be ignored. This selector is experimental and may not work in filters or sorts. + """ + + property_api_name: PropertyApiName = pydantic.Field(alias=str("propertyApiName")) # type: ignore[literal-required] + struct_field_api_name: StructFieldApiName = pydantic.Field(alias=str("structFieldApiName")) # type: ignore[literal-required] + type: typing.Literal["structField"] = "structField" + + +class StructFieldType(core.ModelBase): + """StructFieldType""" + + api_name: StructFieldApiName = pydantic.Field(alias=str("apiName")) # type: ignore[literal-required] + rid: StructFieldTypeRid + data_type: ObjectPropertyType = pydantic.Field(alias=str("dataType")) # type: ignore[literal-required] + + +StructFieldTypeRid = core.RID +"""The unique resource identifier of a struct field, useful for interacting with other Foundry APIs.""" + + +class StructListParameterFieldArgument(core.ModelBase): + """Represents a struct list parameter field argument in a logic rule.""" + + parameter_id: ParameterId = pydantic.Field(alias=str("parameterId")) # type: ignore[literal-required] + struct_parameter_field_api_name: StructParameterFieldApiName = pydantic.Field(alias=str("structParameterFieldApiName")) # type: ignore[literal-required] + type: typing.Literal["structListParameterFieldValue"] = "structListParameterFieldValue" + + +StructParameterFieldApiName = str +"""The unique identifier of the struct parameter field.""" + + +class StructParameterFieldArgument(core.ModelBase): + """Represents a struct parameter field argument in a logic rule.""" + + parameter_id: ParameterId = pydantic.Field(alias=str("parameterId")) # type: ignore[literal-required] + struct_parameter_field_api_name: StructParameterFieldApiName = pydantic.Field(alias=str("structParameterFieldApiName")) # type: ignore[literal-required] + type: typing.Literal["structParameterFieldValue"] = "structParameterFieldValue" + + +class StructType(core.ModelBase): + """StructType""" + + struct_field_types: typing.List[StructFieldType] = pydantic.Field(alias=str("structFieldTypes")) # type: ignore[literal-required] + main_value: typing.Optional[StructTypeMainValue] = pydantic.Field(alias=str("mainValue"), default=None) # type: ignore[literal-required] + type: typing.Literal["struct"] = "struct" + + +class StructTypeMainValue(core.ModelBase): + """StructTypeMainValue""" + + main_value_type: ObjectPropertyType = pydantic.Field(alias=str("mainValueType")) # type: ignore[literal-required] + fields: typing.List[StructFieldApiName] + """The fields which comprise the main value of the struct.""" + + +class SubmissionCriteriaEvaluation(core.ModelBase): + """ + Contains the status of the **submission criteria**. + **Submission criteria** are the prerequisites that need to be satisfied before an Action can be applied. + These are configured in the **Ontology Manager**. + """ + + configured_failure_message: typing.Optional[str] = pydantic.Field(alias=str("configuredFailureMessage"), default=None) # type: ignore[literal-required] + """ + The message indicating one of the **submission criteria** was not satisfied. + This is configured per **submission criteria** in the **Ontology Manager**. + """ + + result: ValidationResult + + +class SubtractPropertyExpression(core.ModelBase): + """Subtracts the right numeric value from the left numeric value.""" + + left: DerivedPropertyDefinition + right: DerivedPropertyDefinition + type: typing.Literal["subtract"] = "subtract" + + +class SumAggregationV2(core.ModelBase): + """Computes the sum of values for the provided field.""" + + field: PropertyApiName + name: typing.Optional[AggregationMetricName] = None + direction: typing.Optional[OrderByDirection] = None + type: typing.Literal["sum"] = "sum" + + +class SyncApplyActionResponseV2(core.ModelBase): + """SyncApplyActionResponseV2""" + + validation: typing.Optional[ValidateActionResponseV2] = None + edits: typing.Optional[ActionResults] = None + + +class SynchronousWebhookOutputArgument(core.ModelBase): + """Represents a synchronous webhook output argument in a logic rule.""" + + webhook_output_param_name: str = pydantic.Field(alias=str("webhookOutputParamName")) # type: ignore[literal-required] + """The name of the webhook output parameter.""" + + type: typing.Literal["synchronousWebhookOutput"] = "synchronousWebhookOutput" + + +class ThreeDimensionalAggregation(core.ModelBase): + """ThreeDimensionalAggregation""" + + key_type: QueryAggregationKeyType = pydantic.Field(alias=str("keyType")) # type: ignore[literal-required] + value_type: TwoDimensionalAggregation = pydantic.Field(alias=str("valueType")) # type: ignore[literal-required] + type: typing.Literal["threeDimensionalAggregation"] = "threeDimensionalAggregation" + + +class TimeCodeFormat(core.ModelBase): + """Formats the duration in a timecode format.""" + + type: typing.Literal["timecode"] = "timecode" + + +TimeRange = typing_extensions.Annotated[ + typing.Union["AbsoluteTimeRange", "RelativeTimeRange"], pydantic.Field(discriminator="type") +] +"""An absolute or relative range for a time series query.""" + + +TimeSeriesAggregationMethod = typing.Literal[ + "SUM", + "MEAN", + "STANDARD_DEVIATION", + "MAX", + "MIN", + "PERCENT_CHANGE", + "DIFFERENCE", + "PRODUCT", + "COUNT", + "FIRST", + "LAST", +] +"""The aggregation function to use for aggregating time series data.""" + + +TimeSeriesAggregationStrategy = typing_extensions.Annotated[ + typing.Union[ + "TimeSeriesRollingAggregate", "TimeSeriesPeriodicAggregate", "TimeSeriesCumulativeAggregate" + ], + pydantic.Field(discriminator="type"), +] +""" +CUMULATIVE aggregates all points up to the current point. +ROLLING aggregates all points in a rolling window whose size is either the specified number of points or +time duration. +PERIODIC aggregates all points in specified time windows. +""" + + +class TimeSeriesCumulativeAggregate(core.ModelBase): + """ + The cumulative aggregate is calculated progressively for each point in the input time series, + considering all preceding points up to and including the current point. + """ + + type: typing.Literal["cumulative"] = "cumulative" + + +class TimeSeriesPeriodicAggregate(core.ModelBase): + """ + Aggregates values over discrete, periodic windows for a given time series. + + A periodic window divides the time series into windows of fixed durations. + For each window, an aggregate function is applied to the points within that window. The result is a time series + with values representing the aggregate for each window. Windows with no data points are not included + in the output. + + Periodic aggregation is useful for downsampling a continuous stream of data to larger granularities such as + hourly, daily, monthly. + """ + + window_size: PreciseDuration = pydantic.Field(alias=str("windowSize")) # type: ignore[literal-required] + alignment_timestamp: typing.Optional[core.AwareDatetime] = pydantic.Field(alias=str("alignmentTimestamp"), default=None) # type: ignore[literal-required] + """ + The timestamp used to align the result, such that ticks in the result time series will lie at integer + multiples of the window duration from the alignment timestamp. + + Default is the first epoch timestamp (January 1, 1970, 00:00:00 UTC) so that all aggregated points have + timestamps at midnight UTC at the start of each window duration. + + For example, for a weekly aggregate with alignment timestamp 5 January, 8:33PM, + each aggregated timestamp will lie on the 7 day intervals at 8:33PM starting at 5 January. + """ + + window_type: TimeSeriesWindowType = pydantic.Field(alias=str("windowType")) # type: ignore[literal-required] + type: typing.Literal["periodic"] = "periodic" + + +class TimeSeriesPoint(core.ModelBase): + """A time and value pair.""" + + time: core.AwareDatetime + """An ISO 8601 timestamp""" + + value: typing.Any + """An object which is either an enum String or a double number.""" + + +class TimeSeriesRollingAggregate(core.ModelBase): + """TimeSeriesRollingAggregate""" + + window_size: TimeSeriesRollingAggregateWindow = pydantic.Field(alias=str("windowSize")) # type: ignore[literal-required] + type: typing.Literal["rolling"] = "rolling" + + +TimeSeriesRollingAggregateWindow = typing_extensions.Annotated[ + typing.Union["PreciseDuration", "RollingAggregateWindowPoints"], + pydantic.Field(discriminator="type"), +] +""" +A rolling window is a moving subset of data points that ends at the current timestamp (inclusive) +and spans a specified duration (window size). As new data points are added, old points fall out of the +window if they are outside the specified duration. + +Rolling windows are commonly used for smoothing data, detecting trends, and reducing noise +in time series analysis. +""" + + +TimeSeriesWindowType = typing.Literal["START", "END"] +"""TimeSeriesWindowType""" + + +TimeUnit = typing.Literal[ + "MILLISECONDS", "SECONDS", "MINUTES", "HOURS", "DAYS", "WEEKS", "MONTHS", "YEARS", "QUARTERS" +] +"""TimeUnit""" + + +class TimeseriesEntry(core.ModelBase): + """A time and value pair.""" + + time: core.AwareDatetime + """An ISO 8601 timestamp""" + + value: typing.Any + """An object which is either an enum String, double number, or a geopoint.""" + + +TransactionEdit = typing_extensions.Annotated[ + typing.Union[ + "ModifyObjectEdit", "DeleteObjectEdit", "AddObjectEdit", "DeleteLinkEdit", "AddLinkEdit" + ], + pydantic.Field(discriminator="type"), +] +"""TransactionEdit""" + + +class TwoDimensionalAggregation(core.ModelBase): + """TwoDimensionalAggregation""" + + key_type: QueryAggregationKeyType = pydantic.Field(alias=str("keyType")) # type: ignore[literal-required] + value_type: QueryAggregationValueType = pydantic.Field(alias=str("valueType")) # type: ignore[literal-required] + type: typing.Literal["twoDimensionalAggregation"] = "twoDimensionalAggregation" + + +class UnevaluableConstraint(core.ModelBase): + """ + The parameter cannot be evaluated because it depends on another parameter or object set that can't be evaluated. + This can happen when a parameter's allowed values are defined by another parameter that is missing or invalid. + """ + + type: typing.Literal["unevaluable"] = "unevaluable" + + +class UniqueIdentifierArgument(core.ModelBase): + """Represents a unique identifier argument in a logic rule.""" + + link_id: typing.Optional[core.UUID] = pydantic.Field(alias=str("linkId"), default=None) # type: ignore[literal-required] + """ + By default all UniqueIdentifier Logic Rule arguments will generate different UUID. + If the linkId is present all Logic Rules with the same linkId will all have the same uuid generated as the value. + """ + + type: typing.Literal["uniqueIdentifier"] = "uniqueIdentifier" + + +UniqueIdentifierLinkId = core.UUID +"""A reference to a UniqueIdentifierArgument linkId defined for this action type.""" + + +UniqueIdentifierValue = core.UUID +""" +An override value to be used for a UniqueIdentifier action parameter, instead of +the value being automatically generated. +""" + + +class UuidConstraint(core.ModelBase): + """The string must be a valid UUID (Universally Unique Identifier).""" + + type: typing.Literal["uuid"] = "uuid" + + +class ValidateActionResponseV2(core.ModelBase): + """ValidateActionResponseV2""" + + result: ValidationResult + submission_criteria: typing.List[SubmissionCriteriaEvaluation] = pydantic.Field(alias=str("submissionCriteria")) # type: ignore[literal-required] + parameters: typing.Dict[ParameterId, ParameterEvaluationResult] + + +ValidationResult = typing.Literal["VALID", "INVALID"] +"""Represents the state of a validation.""" + + +ValueType = str +""" +A string indicating the type of each data value. Note that these types can be nested, for example an array of +structs. + +| Type | JSON value | +|---------------------|-------------------------------------------------------------------------------------------------------------------| +| Array | `Array`, where `T` is the type of the array elements, e.g. `Array`. | +| Attachment | `Attachment` | +| Boolean | `Boolean` | +| Byte | `Byte` | +| CipherText | `CipherText` | +| Date | `LocalDate` | +| Decimal | `Decimal` | +| Double | `Double` | +| Float | `Float` | +| Integer | `Integer` | +| Long | `Long` | +| Marking | `Marking` | +| OntologyObject | `OntologyObject` where `T` is the API name of the referenced object type. | +| Short | `Short` | +| String | `String` | +| Struct | `Struct` where `T` contains field name and type pairs, e.g. `Struct<{ firstName: String, lastName: string }>` | +| Timeseries | `TimeSeries` where `T` is either `String` for an enum series or `Double` for a numeric series. | +| Timestamp | `Timestamp` | +""" + + +ValueTypeApiName = str +"""The name of the value type in the API in camelCase format.""" + + +class ValueTypeArrayType(core.ModelBase): + """ValueTypeArrayType""" + + sub_type: typing.Optional[ValueTypeFieldType] = pydantic.Field(alias=str("subType"), default=None) # type: ignore[literal-required] + type: typing.Literal["array"] = "array" + + +ValueTypeConstraint = typing_extensions.Annotated[ + typing.Union[ + "StructConstraint", + "RegexConstraint", + core_models.UnsupportedType, + "ArrayConstraint", + "LengthConstraint", + "RangesConstraint", + "RidConstraint", + "UuidConstraint", + "EnumConstraint", + ], + pydantic.Field(discriminator="type"), +] +"""ValueTypeConstraint""" + + +class ValueTypeDecimalType(core.ModelBase): + """ValueTypeDecimalType""" + + type: typing.Literal["decimal"] = "decimal" + + +ValueTypeFieldType = typing_extensions.Annotated[ + typing.Union[ + core_models.DateType, + "ValueTypeStructType", + core_models.StringType, + core_models.ByteType, + core_models.DoubleType, + "ValueTypeOptionalType", + core_models.IntegerType, + "ValueTypeUnionType", + core_models.FloatType, + core_models.LongType, + "ValueTypeReferenceType", + core_models.BooleanType, + "ValueTypeArrayType", + core_models.BinaryType, + core_models.ShortType, + "ValueTypeDecimalType", + "ValueTypeMapType", + core_models.TimestampType, + ], + pydantic.Field(discriminator="type"), +] +"""ValueTypeFieldType""" + + +class ValueTypeMapType(core.ModelBase): + """ValueTypeMapType""" + + key_type: typing.Optional[ValueTypeFieldType] = pydantic.Field(alias=str("keyType"), default=None) # type: ignore[literal-required] + value_type: typing.Optional[ValueTypeFieldType] = pydantic.Field(alias=str("valueType"), default=None) # type: ignore[literal-required] + type: typing.Literal["map"] = "map" + + +class ValueTypeOptionalType(core.ModelBase): + """ValueTypeOptionalType""" + + wrapped_type: typing.Optional[ValueTypeFieldType] = pydantic.Field(alias=str("wrappedType"), default=None) # type: ignore[literal-required] + type: typing.Literal["optional"] = "optional" + + +class ValueTypeReferenceType(core.ModelBase): + """ValueTypeReferenceType""" + + type: typing.Literal["reference"] = "reference" + + +ValueTypeRid = core.RID +"""ValueTypeRid""" + + +ValueTypeStatus = typing.Literal["ACTIVE", "DEPRECATED"] +"""ValueTypeStatus""" + + +class ValueTypeStructField(core.ModelBase): + """ValueTypeStructField""" + + name: typing.Optional[core_models.StructFieldName] = None + field_type: typing.Optional[ValueTypeFieldType] = pydantic.Field(alias=str("fieldType"), default=None) # type: ignore[literal-required] + + +class ValueTypeStructType(core.ModelBase): + """ValueTypeStructType""" + + fields: typing.List[ValueTypeStructField] + type: typing.Literal["struct"] = "struct" + + +class ValueTypeUnionType(core.ModelBase): + """ValueTypeUnionType""" + + member_types: typing.List[ValueTypeFieldType] = pydantic.Field(alias=str("memberTypes")) # type: ignore[literal-required] + type: typing.Literal["union"] = "union" + + +VersionedQueryTypeApiName = str +""" +The name of the Query in the API and an optional version identifier separated by a colon. +If the API name contains a colon, then a version identifier of either "latest" or a semantic version must +be included. +If the API does not contain a colon, then either the version identifier must be excluded or a version +identifier of a semantic version must be included. +Examples: 'myGroup:myFunction:latest', 'myGroup:myFunction:1.0.0', 'myFunction', 'myFunction:2.0.0' +""" + + +class WildcardQuery(core.ModelBase): + """ + Returns objects where the specified field matches the wildcard pattern provided. + Either `field` or `propertyIdentifier` can be supplied, but not both. + """ + + field: typing.Optional[PropertyApiName] = None + property_identifier: typing.Optional[PropertyIdentifier] = pydantic.Field(alias=str("propertyIdentifier"), default=None) # type: ignore[literal-required] + value: str + type: typing.Literal["wildcard"] = "wildcard" + + +class WithinBoundingBoxQuery(core.ModelBase): + """ + Returns objects where the specified field contains a point within the bounding box provided. Allows you to + specify a property to query on by a variety of means. Either `field` or `propertyIdentifier` must be supplied, + but not both. + """ + + field: typing.Optional[PropertyApiName] = None + property_identifier: typing.Optional[PropertyIdentifier] = pydantic.Field(alias=str("propertyIdentifier"), default=None) # type: ignore[literal-required] + value: BoundingBoxValue + type: typing.Literal["withinBoundingBox"] = "withinBoundingBox" + + +class WithinDistanceOfQuery(core.ModelBase): + """ + Returns objects where the specified field contains a point within the distance provided of the center point. + Allows you to specify a property to query on by a variety of means. Either `field` or `propertyIdentifier` + must be supplied, but not both. + """ + + field: typing.Optional[PropertyApiName] = None + property_identifier: typing.Optional[PropertyIdentifier] = pydantic.Field(alias=str("propertyIdentifier"), default=None) # type: ignore[literal-required] + value: CenterPoint + type: typing.Literal["withinDistanceOf"] = "withinDistanceOf" + + +class WithinPolygonQuery(core.ModelBase): + """ + Returns objects where the specified field contains a point within the polygon provided. Allows you to specify a + property to query on by a variety of means. Either `field` or `propertyIdentifier` must be supplied, but not + both. + """ + + field: typing.Optional[PropertyApiName] = None + property_identifier: typing.Optional[PropertyIdentifier] = pydantic.Field(alias=str("propertyIdentifier"), default=None) # type: ignore[literal-required] + value: PolygonValue + type: typing.Literal["withinPolygon"] = "withinPolygon" + + +ArrayEntryEvaluatedConstraint = StructEvaluatedConstraint +"""Evaluated constraints for entries of array parameters for which per-entry evaluation is supported.""" + + +CenterPointTypes = geo_models.GeoPoint +"""CenterPointTypes""" + + +Icon = BlueprintIcon +"""A union currently only consisting of the BlueprintIcon (more icon types may be added in the future).""" + + +MethodObjectSet = ObjectSet +"""MethodObjectSet""" + + +PolygonValue = geo_models.Polygon +"""PolygonValue""" + + +RelativeDateRangeBound = RelativePointInTime +"""Specifies a bound for a relative date range query.""" + + +WithinBoundingBoxPoint = geo_models.GeoPoint +"""WithinBoundingBoxPoint""" + + +core.resolve_forward_references(ActionLogicRule, globalns=globals(), localns=locals()) +core.resolve_forward_references(ActionParameterType, globalns=globals(), localns=locals()) +core.resolve_forward_references(ActionResults, globalns=globals(), localns=locals()) +core.resolve_forward_references(AggregationGroupByV2, globalns=globals(), localns=locals()) +core.resolve_forward_references(AggregationV2, globalns=globals(), localns=locals()) +core.resolve_forward_references(AttachmentMetadataResponse, globalns=globals(), localns=locals()) +core.resolve_forward_references(BatchActionObjectEdit, globalns=globals(), localns=locals()) +core.resolve_forward_references(BatchActionResults, globalns=globals(), localns=locals()) +core.resolve_forward_references(DatetimeFormat, globalns=globals(), localns=locals()) +core.resolve_forward_references(DatetimeTimezone, globalns=globals(), localns=locals()) +core.resolve_forward_references(DerivedPropertyDefinition, globalns=globals(), localns=locals()) +core.resolve_forward_references(DurationFormatStyle, globalns=globals(), localns=locals()) +core.resolve_forward_references( + InterfaceLinkTypeLinkedEntityApiName, globalns=globals(), localns=locals() +) +core.resolve_forward_references( + InterfacePropertyStructImplementationMapping, globalns=globals(), localns=locals() +) +core.resolve_forward_references(InterfacePropertyType, globalns=globals(), localns=locals()) +core.resolve_forward_references( + InterfacePropertyTypeImplementation, globalns=globals(), localns=locals() +) +core.resolve_forward_references(InterfaceToObjectTypeMapping, globalns=globals(), localns=locals()) +core.resolve_forward_references( + InterfaceToObjectTypeMappingV2, globalns=globals(), localns=locals() +) +core.resolve_forward_references(InterfaceToObjectTypeMappings, globalns=globals(), localns=locals()) +core.resolve_forward_references( + InterfaceToObjectTypeMappingsV2, globalns=globals(), localns=locals() +) +core.resolve_forward_references(IntervalQueryRule, globalns=globals(), localns=locals()) +core.resolve_forward_references(LogicRule, globalns=globals(), localns=locals()) +core.resolve_forward_references(LogicRuleArgument, globalns=globals(), localns=locals()) +core.resolve_forward_references(NearestNeighborsQuery, globalns=globals(), localns=locals()) +core.resolve_forward_references( + NestedInterfacePropertyTypeImplementation, globalns=globals(), localns=locals() +) +core.resolve_forward_references(ObjectEdit, globalns=globals(), localns=locals()) +core.resolve_forward_references(ObjectPropertyType, globalns=globals(), localns=locals()) +core.resolve_forward_references(ObjectSet, globalns=globals(), localns=locals()) +core.resolve_forward_references(OntologyDataType, globalns=globals(), localns=locals()) +core.resolve_forward_references(OntologyObjectV2, globalns=globals(), localns=locals()) +core.resolve_forward_references(ParameterEvaluatedConstraint, globalns=globals(), localns=locals()) +core.resolve_forward_references(PropertyIdentifier, globalns=globals(), localns=locals()) +core.resolve_forward_references(PropertyLoadLevel, globalns=globals(), localns=locals()) +core.resolve_forward_references( + PropertyNumberFormattingRuleType, globalns=globals(), localns=locals() +) +core.resolve_forward_references( + PropertyOrStructFieldOfPropertyImplementation, globalns=globals(), localns=locals() +) +core.resolve_forward_references( + PropertyTypeReferenceOrStringConstant, globalns=globals(), localns=locals() +) +core.resolve_forward_references(PropertyTypeStatus, globalns=globals(), localns=locals()) +core.resolve_forward_references(PropertyValueFormattingRule, globalns=globals(), localns=locals()) +core.resolve_forward_references(QueryAggregationKeyType, globalns=globals(), localns=locals()) +core.resolve_forward_references(QueryAggregationRangeSubType, globalns=globals(), localns=locals()) +core.resolve_forward_references(QueryAggregationValueType, globalns=globals(), localns=locals()) +core.resolve_forward_references(QueryDataType, globalns=globals(), localns=locals()) +core.resolve_forward_references(SearchJsonQueryV2, globalns=globals(), localns=locals()) +core.resolve_forward_references(SelectedPropertyOperation, globalns=globals(), localns=locals()) +core.resolve_forward_references(StructFieldArgument, globalns=globals(), localns=locals()) +core.resolve_forward_references( + StructFieldEvaluatedConstraint, globalns=globals(), localns=locals() +) +core.resolve_forward_references(TimeRange, globalns=globals(), localns=locals()) +core.resolve_forward_references(TimeSeriesAggregationStrategy, globalns=globals(), localns=locals()) +core.resolve_forward_references( + TimeSeriesRollingAggregateWindow, globalns=globals(), localns=locals() +) +core.resolve_forward_references(TransactionEdit, globalns=globals(), localns=locals()) +core.resolve_forward_references(ValueTypeConstraint, globalns=globals(), localns=locals()) +core.resolve_forward_references(ValueTypeFieldType, globalns=globals(), localns=locals()) + +__all__ = [ + "AbsoluteTimeRange", + "AbsoluteValuePropertyExpression", + "ActionExecutionTime", + "ActionLogicRule", + "ActionParameterArrayType", + "ActionParameterType", + "ActionParameterV2", + "ActionResults", + "ActionRid", + "ActionTypeApiName", + "ActionTypeFullMetadata", + "ActionTypeRid", + "ActionTypeV2", + "ActivePropertyTypeStatus", + "AddLink", + "AddLinkEdit", + "AddObject", + "AddObjectEdit", + "AddPropertyExpression", + "Affix", + "AggregateObjectSetRequestV2", + "AggregateObjectsRequestV2", + "AggregateObjectsResponseItemV2", + "AggregateObjectsResponseV2", + "AggregateTimeSeries", + "AggregationAccuracy", + "AggregationAccuracyRequest", + "AggregationDurationGroupingV2", + "AggregationExactGroupingV2", + "AggregationFixedWidthGroupingV2", + "AggregationGroupByV2", + "AggregationGroupKeyV2", + "AggregationGroupValueV2", + "AggregationMetricName", + "AggregationMetricResultV2", + "AggregationRangeV2", + "AggregationRangesGroupingV2", + "AggregationV2", + "AllOfRule", + "AndQueryV2", + "AnyOfRule", + "ApplyActionMode", + "ApplyActionOverrides", + "ApplyActionRequestOptions", + "ApplyActionRequestV2", + "ApplyActionWithOverridesRequest", + "ApplyReducersAndExtractMainValueLoadLevel", + "ApplyReducersLoadLevel", + "ApproximateDistinctAggregationV2", + "ApproximatePercentileAggregationV2", + "ArrayConstraint", + "ArrayEntryEvaluatedConstraint", + "ArrayEvaluatedConstraint", + "ArraySizeConstraint", + "ArtifactRepositoryRid", + "AttachmentMetadataResponse", + "AttachmentRid", + "AttachmentV2", + "AvgAggregationV2", + "BatchActionObjectEdit", + "BatchActionObjectEdits", + "BatchActionResults", + "BatchApplyActionRequestItem", + "BatchApplyActionRequestOptions", + "BatchApplyActionRequestV2", + "BatchApplyActionResponseV2", + "BatchReturnEditsMode", + "BatchedFunctionLogicRule", + "BlueprintIcon", + "BoundingBoxValue", + "CenterPoint", + "CenterPointTypes", + "ContainsAllTermsInOrderPrefixLastTerm", + "ContainsAllTermsInOrderQuery", + "ContainsAllTermsQuery", + "ContainsAnyTermQuery", + "ContainsQueryV2", + "CountAggregationV2", + "CountObjectsResponseV2", + "CreateInterfaceLinkLogicRule", + "CreateInterfaceLogicRule", + "CreateInterfaceObjectRule", + "CreateLinkLogicRule", + "CreateLinkRule", + "CreateObjectLogicRule", + "CreateObjectRule", + "CreateOrModifyObjectLogicRule", + "CreateOrModifyObjectLogicRuleV2", + "CreateTemporaryObjectSetRequestV2", + "CreateTemporaryObjectSetResponseV2", + "CurrentTimeArgument", + "CurrentUserArgument", + "DataValue", + "DatetimeFormat", + "DatetimeLocalizedFormat", + "DatetimeLocalizedFormatType", + "DatetimeStringFormat", + "DatetimeTimezone", + "DatetimeTimezoneStatic", + "DatetimeTimezoneUser", + "DecryptionResult", + "DeleteInterfaceLinkLogicRule", + "DeleteInterfaceObjectRule", + "DeleteLink", + "DeleteLinkEdit", + "DeleteLinkLogicRule", + "DeleteLinkRule", + "DeleteObject", + "DeleteObjectEdit", + "DeleteObjectLogicRule", + "DeleteObjectRule", + "DeprecatedPropertyTypeStatus", + "DerivedPropertyApiName", + "DerivedPropertyDefinition", + "DividePropertyExpression", + "DoesNotIntersectBoundingBoxQuery", + "DoesNotIntersectPolygonQuery", + "DoubleVector", + "DurationBaseValue", + "DurationFormatStyle", + "DurationPrecision", + "EntrySetType", + "EnumConstraint", + "EqualsQueryV2", + "ExactDistinctAggregationV2", + "ExamplePropertyTypeStatus", + "ExecuteQueryRequest", + "ExecuteQueryResponse", + "ExperimentalPropertyTypeStatus", + "ExtractDatePart", + "ExtractMainValueLoadLevel", + "ExtractPropertyExpression", + "FilterValue", + "FixedValuesMapKey", + "FunctionLogicRule", + "FunctionParameterName", + "FunctionRid", + "FunctionVersion", + "FuzzyV2", + "GetSelectedPropertyOperation", + "GreatestPropertyExpression", + "GroupMemberConstraint", + "GtQueryV2", + "GteQueryV2", + "HumanReadableFormat", + "Icon", + "InQuery", + "InterfaceDefinedPropertyType", + "InterfaceLinkType", + "InterfaceLinkTypeApiName", + "InterfaceLinkTypeCardinality", + "InterfaceLinkTypeLinkedEntityApiName", + "InterfaceLinkTypeRid", + "InterfaceParameterPropertyArgument", + "InterfacePropertyApiName", + "InterfacePropertyLocalPropertyImplementation", + "InterfacePropertyReducedPropertyImplementation", + "InterfacePropertyStructFieldImplementation", + "InterfacePropertyStructImplementation", + "InterfacePropertyStructImplementationMapping", + "InterfacePropertyType", + "InterfacePropertyTypeImplementation", + "InterfacePropertyTypeRid", + "InterfaceSharedPropertyType", + "InterfaceToObjectTypeMapping", + "InterfaceToObjectTypeMappingV2", + "InterfaceToObjectTypeMappings", + "InterfaceToObjectTypeMappingsV2", + "InterfaceType", + "InterfaceTypeApiName", + "InterfaceTypeRid", + "IntersectsBoundingBoxQuery", + "IntersectsPolygonQuery", + "IntervalQuery", + "IntervalQueryRule", + "IsNullQueryV2", + "KnownType", + "LeastPropertyExpression", + "LengthConstraint", + "LinkSideObject", + "LinkTypeApiName", + "LinkTypeId", + "LinkTypeRid", + "LinkTypeSideCardinality", + "LinkTypeSideV2", + "LinkedInterfaceTypeApiName", + "LinkedObjectLocator", + "LinkedObjectTypeApiName", + "LinksFromObject", + "ListActionTypesFullMetadataResponse", + "ListActionTypesResponseV2", + "ListAttachmentsResponseV2", + "ListInterfaceLinkedObjectsResponse", + "ListInterfaceTypesResponse", + "ListLinkedObjectsResponseV2", + "ListObjectTypesV2Response", + "ListObjectsForInterfaceResponse", + "ListObjectsResponseV2", + "ListOntologiesV2Response", + "ListOntologyValueTypesResponse", + "ListOutgoingInterfaceLinkTypesResponse", + "ListOutgoingLinkTypesResponseV2", + "ListQueryTypesResponseV2", + "LoadObjectSetLinksRequestV2", + "LoadObjectSetLinksResponseV2", + "LoadObjectSetRequestV2", + "LoadObjectSetResponseV2", + "LoadObjectSetV2MultipleObjectTypesRequest", + "LoadObjectSetV2MultipleObjectTypesResponse", + "LoadObjectSetV2ObjectsOrInterfacesRequest", + "LoadObjectSetV2ObjectsOrInterfacesResponse", + "LoadOntologyMetadataRequest", + "LogicRule", + "LogicRuleArgument", + "LtQueryV2", + "LteQueryV2", + "MatchRule", + "MaxAggregationV2", + "MediaMetadata", + "MethodObjectSet", + "MinAggregationV2", + "ModifyInterfaceLogicRule", + "ModifyInterfaceObjectRule", + "ModifyObject", + "ModifyObjectEdit", + "ModifyObjectLogicRule", + "ModifyObjectRule", + "MultiplyPropertyExpression", + "NearestNeighborsQuery", + "NearestNeighborsQueryText", + "NegatePropertyExpression", + "NestedInterfacePropertyTypeImplementation", + "NestedQueryAggregation", + "NotQueryV2", + "NumberFormatAffix", + "NumberFormatCurrency", + "NumberFormatCurrencyStyle", + "NumberFormatCustomUnit", + "NumberFormatDuration", + "NumberFormatFixedValues", + "NumberFormatNotation", + "NumberFormatOptions", + "NumberFormatRatio", + "NumberFormatScale", + "NumberFormatStandard", + "NumberFormatStandardUnit", + "NumberRatioType", + "NumberRoundingMode", + "NumberScaleType", + "ObjectEdit", + "ObjectEdits", + "ObjectParameterPropertyArgument", + "ObjectPropertyType", + "ObjectPropertyValueConstraint", + "ObjectQueryResultConstraint", + "ObjectRid", + "ObjectSet", + "ObjectSetAsBaseObjectTypesType", + "ObjectSetAsTypeType", + "ObjectSetBaseType", + "ObjectSetFilterType", + "ObjectSetInterfaceBaseType", + "ObjectSetInterfaceLinkSearchAroundType", + "ObjectSetIntersectionType", + "ObjectSetMethodInputType", + "ObjectSetNearestNeighborsType", + "ObjectSetReferenceType", + "ObjectSetRid", + "ObjectSetSearchAroundType", + "ObjectSetStaticType", + "ObjectSetSubtractType", + "ObjectSetUnionType", + "ObjectSetWithPropertiesType", + "ObjectTypeApiName", + "ObjectTypeEdits", + "ObjectTypeFullMetadata", + "ObjectTypeId", + "ObjectTypeInterfaceImplementation", + "ObjectTypeRid", + "ObjectTypeV2", + "ObjectTypeVisibility", + "OneOfConstraint", + "OntologyApiName", + "OntologyArrayType", + "OntologyDataType", + "OntologyFullMetadata", + "OntologyIdentifier", + "OntologyInterfaceObjectSetType", + "OntologyInterfaceObjectType", + "OntologyMapType", + "OntologyObjectArrayType", + "OntologyObjectArrayTypeReducer", + "OntologyObjectArrayTypeReducerSortDirection", + "OntologyObjectSetType", + "OntologyObjectType", + "OntologyObjectTypeReferenceType", + "OntologyObjectV2", + "OntologyRid", + "OntologySetType", + "OntologyStructField", + "OntologyStructType", + "OntologyTransactionId", + "OntologyV2", + "OntologyValueType", + "OrQueryV2", + "OrderBy", + "OrderByDirection", + "ParameterEvaluatedConstraint", + "ParameterEvaluationResult", + "ParameterId", + "ParameterIdArgument", + "ParameterOption", + "Plaintext", + "PolygonValue", + "PostTransactionEditsRequest", + "PostTransactionEditsResponse", + "PreciseDuration", + "PreciseTimeUnit", + "PrefixOnLastTokenRule", + "PrimaryKeyValue", + "PropertyApiName", + "PropertyApiNameSelector", + "PropertyBooleanFormattingRule", + "PropertyDateFormattingRule", + "PropertyFilter", + "PropertyId", + "PropertyIdentifier", + "PropertyImplementation", + "PropertyKnownTypeFormattingRule", + "PropertyLoadLevel", + "PropertyNumberFormattingRule", + "PropertyNumberFormattingRuleType", + "PropertyOrStructFieldOfPropertyImplementation", + "PropertyTimestampFormattingRule", + "PropertyTypeApiName", + "PropertyTypeReference", + "PropertyTypeReferenceOrStringConstant", + "PropertyTypeRid", + "PropertyTypeStatus", + "PropertyTypeVisibility", + "PropertyV2", + "PropertyValue", + "PropertyValueEscapedString", + "PropertyValueFormattingRule", + "PropertyWithLoadLevelSelector", + "QueryAggregation", + "QueryAggregationKeyType", + "QueryAggregationRangeSubType", + "QueryAggregationRangeType", + "QueryAggregationValueType", + "QueryApiName", + "QueryArrayType", + "QueryDataType", + "QueryParameterV2", + "QueryRuntimeErrorParameter", + "QuerySetType", + "QueryStructField", + "QueryStructType", + "QueryThreeDimensionalAggregation", + "QueryTwoDimensionalAggregation", + "QueryTypeV2", + "QueryUnionType", + "RangeConstraint", + "RangesConstraint", + "RegexConstraint", + "RegexQuery", + "RelativeDateRangeBound", + "RelativeDateRangeQuery", + "RelativePointInTime", + "RelativeTime", + "RelativeTimeRange", + "RelativeTimeRelation", + "RelativeTimeSeriesTimeUnit", + "RelativeTimeUnit", + "ResolvedInterfacePropertyType", + "ReturnEditsMode", + "RidConstraint", + "RollingAggregateWindowPoints", + "SdkPackageName", + "SdkPackageRid", + "SdkVersion", + "SearchJsonQueryV2", + "SearchObjectsForInterfaceRequest", + "SearchObjectsRequestV2", + "SearchObjectsResponseV2", + "SearchOrderByType", + "SearchOrderByV2", + "SearchOrderingV2", + "SelectedPropertyApiName", + "SelectedPropertyApproximateDistinctAggregation", + "SelectedPropertyApproximatePercentileAggregation", + "SelectedPropertyAvgAggregation", + "SelectedPropertyCollectListAggregation", + "SelectedPropertyCollectSetAggregation", + "SelectedPropertyCountAggregation", + "SelectedPropertyExactDistinctAggregation", + "SelectedPropertyExpression", + "SelectedPropertyMaxAggregation", + "SelectedPropertyMinAggregation", + "SelectedPropertyOperation", + "SelectedPropertySumAggregation", + "SharedPropertyType", + "SharedPropertyTypeApiName", + "SharedPropertyTypeRid", + "StartsWithQuery", + "StaticArgument", + "StreamTimeSeriesPointsRequest", + "StreamTimeSeriesValuesRequest", + "StreamingOutputFormat", + "StringConstant", + "StringLengthConstraint", + "StringRegexMatchConstraint", + "StructConstraint", + "StructEvaluatedConstraint", + "StructFieldApiName", + "StructFieldArgument", + "StructFieldEvaluatedConstraint", + "StructFieldEvaluationResult", + "StructFieldOfPropertyImplementation", + "StructFieldSelector", + "StructFieldType", + "StructFieldTypeRid", + "StructListParameterFieldArgument", + "StructParameterFieldApiName", + "StructParameterFieldArgument", + "StructType", + "StructTypeMainValue", + "SubmissionCriteriaEvaluation", + "SubtractPropertyExpression", + "SumAggregationV2", + "SyncApplyActionResponseV2", + "SynchronousWebhookOutputArgument", + "ThreeDimensionalAggregation", + "TimeCodeFormat", + "TimeRange", + "TimeSeriesAggregationMethod", + "TimeSeriesAggregationStrategy", + "TimeSeriesCumulativeAggregate", + "TimeSeriesPeriodicAggregate", + "TimeSeriesPoint", + "TimeSeriesRollingAggregate", + "TimeSeriesRollingAggregateWindow", + "TimeSeriesWindowType", + "TimeUnit", + "TimeseriesEntry", + "TransactionEdit", + "TwoDimensionalAggregation", + "UnevaluableConstraint", + "UniqueIdentifierArgument", + "UniqueIdentifierLinkId", + "UniqueIdentifierValue", + "UuidConstraint", + "ValidateActionResponseV2", + "ValidationResult", + "ValueType", + "ValueTypeApiName", + "ValueTypeArrayType", + "ValueTypeConstraint", + "ValueTypeDecimalType", + "ValueTypeFieldType", + "ValueTypeMapType", + "ValueTypeOptionalType", + "ValueTypeReferenceType", + "ValueTypeRid", + "ValueTypeStatus", + "ValueTypeStructField", + "ValueTypeStructType", + "ValueTypeUnionType", + "VersionedQueryTypeApiName", + "WildcardQuery", + "WithinBoundingBoxPoint", + "WithinBoundingBoxQuery", + "WithinDistanceOfQuery", + "WithinPolygonQuery", +] diff --git a/foundry_sdk/v2/ontologies/object_type.py b/foundry_sdk/v2/ontologies/object_type.py new file mode 100644 index 000000000..48b04de05 --- /dev/null +++ b/foundry_sdk/v2/ontologies/object_type.py @@ -0,0 +1,708 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v2.core import models as core_models +from foundry_sdk.v2.ontologies import models as ontologies_models + + +class ObjectTypeClient: + """ + The API client for the ObjectType Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _ObjectTypeClientStreaming(self) + self.with_raw_response = _ObjectTypeClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + ontology: ontologies_models.OntologyIdentifier, + object_type: ontologies_models.ObjectTypeApiName, + *, + branch: typing.Optional[core_models.FoundryBranch] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> ontologies_models.ObjectTypeV2: + """ + Gets a specific object type with the given API name. + + :param ontology: + :type ontology: OntologyIdentifier + :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. + :type object_type: ObjectTypeApiName + :param branch: The Foundry branch to load the object type definition from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. + :type branch: Optional[FoundryBranch] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: ontologies_models.ObjectTypeV2 + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/ontologies/{ontology}/objectTypes/{objectType}", + query_params={ + "branch": branch, + }, + path_params={ + "ontology": ontology, + "objectType": object_type, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.ObjectTypeV2, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get_full_metadata( + self, + ontology: ontologies_models.OntologyIdentifier, + object_type: ontologies_models.ObjectTypeApiName, + *, + branch: typing.Optional[core_models.FoundryBranch] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, + sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> ontologies_models.ObjectTypeFullMetadata: + """ + Gets the full metadata for a specific object type with the given API name. + + :param ontology: + :type ontology: OntologyIdentifier + :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. + :type object_type: ObjectTypeApiName + :param branch: The Foundry branch to load the action type definition from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. + :type branch: Optional[FoundryBranch] + :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. + :type preview: Optional[PreviewMode] + :param sdk_package_rid: The package rid of the generated SDK. + :type sdk_package_rid: Optional[SdkPackageRid] + :param sdk_version: The version of the generated SDK. + :type sdk_version: Optional[SdkVersion] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: ontologies_models.ObjectTypeFullMetadata + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/ontologies/{ontology}/objectTypes/{objectType}/fullMetadata", + query_params={ + "branch": branch, + "preview": preview, + "sdkPackageRid": sdk_package_rid, + "sdkVersion": sdk_version, + }, + path_params={ + "ontology": ontology, + "objectType": object_type, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.ObjectTypeFullMetadata, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get_outgoing_link_type( + self, + ontology: ontologies_models.OntologyIdentifier, + object_type: ontologies_models.ObjectTypeApiName, + link_type: ontologies_models.LinkTypeApiName, + *, + branch: typing.Optional[core_models.FoundryBranch] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> ontologies_models.LinkTypeSideV2: + """ + Get an outgoing link for an object type. + + :param ontology: + :type ontology: OntologyIdentifier + :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager** application. + :type object_type: ObjectTypeApiName + :param link_type: The API name of the outgoing link. To find the API name for your link type, check the **Ontology Manager**. + :type link_type: LinkTypeApiName + :param branch: The Foundry branch to get the outgoing link types for an object type from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. + :type branch: Optional[FoundryBranch] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: ontologies_models.LinkTypeSideV2 + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/ontologies/{ontology}/objectTypes/{objectType}/outgoingLinkTypes/{linkType}", + query_params={ + "branch": branch, + }, + path_params={ + "ontology": ontology, + "objectType": object_type, + "linkType": link_type, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.LinkTypeSideV2, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def list( + self, + ontology: ontologies_models.OntologyIdentifier, + *, + branch: typing.Optional[core_models.FoundryBranch] = None, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.ResourceIterator[ontologies_models.ObjectTypeV2]: + """ + Lists the object types for the given Ontology. + + Each page may be smaller or larger than the requested page size. However, it is guaranteed that if there are + more results available, at least one result will be present in the + response. + + :param ontology: + :type ontology: OntologyIdentifier + :param branch: The Foundry branch to list the object types from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. + :type branch: Optional[FoundryBranch] + :param page_size: The desired size of the page to be returned. Defaults to 500. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. + :type page_size: Optional[PageSize] + :param page_token: + :type page_token: Optional[PageToken] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.ResourceIterator[ontologies_models.ObjectTypeV2] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/ontologies/{ontology}/objectTypes", + query_params={ + "branch": branch, + "pageSize": page_size, + "pageToken": page_token, + }, + path_params={ + "ontology": ontology, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.ListObjectTypesV2Response, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def list_outgoing_link_types( + self, + ontology: ontologies_models.OntologyIdentifier, + object_type: ontologies_models.ObjectTypeApiName, + *, + branch: typing.Optional[core_models.FoundryBranch] = None, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.ResourceIterator[ontologies_models.LinkTypeSideV2]: + """ + List the outgoing links for an object type. + + :param ontology: + :type ontology: OntologyIdentifier + :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager** application. + :type object_type: ObjectTypeApiName + :param branch: The Foundry branch to load the outgoing link types from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. + :type branch: Optional[FoundryBranch] + :param page_size: The desired size of the page to be returned. + :type page_size: Optional[PageSize] + :param page_token: + :type page_token: Optional[PageToken] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.ResourceIterator[ontologies_models.LinkTypeSideV2] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/ontologies/{ontology}/objectTypes/{objectType}/outgoingLinkTypes", + query_params={ + "branch": branch, + "pageSize": page_size, + "pageToken": page_token, + }, + path_params={ + "ontology": ontology, + "objectType": object_type, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.ListOutgoingLinkTypesResponseV2, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + +class _ObjectTypeClientRaw: + def __init__(self, client: ObjectTypeClient) -> None: + def get(_: ontologies_models.ObjectTypeV2): ... + def get_full_metadata(_: ontologies_models.ObjectTypeFullMetadata): ... + def get_outgoing_link_type(_: ontologies_models.LinkTypeSideV2): ... + def list(_: ontologies_models.ListObjectTypesV2Response): ... + def list_outgoing_link_types(_: ontologies_models.ListOutgoingLinkTypesResponseV2): ... + + self.get = core.with_raw_response(get, client.get) + self.get_full_metadata = core.with_raw_response(get_full_metadata, client.get_full_metadata) + self.get_outgoing_link_type = core.with_raw_response( + get_outgoing_link_type, client.get_outgoing_link_type + ) + self.list = core.with_raw_response(list, client.list) + self.list_outgoing_link_types = core.with_raw_response( + list_outgoing_link_types, client.list_outgoing_link_types + ) + + +class _ObjectTypeClientStreaming: + def __init__(self, client: ObjectTypeClient) -> None: + def get(_: ontologies_models.ObjectTypeV2): ... + def get_full_metadata(_: ontologies_models.ObjectTypeFullMetadata): ... + def get_outgoing_link_type(_: ontologies_models.LinkTypeSideV2): ... + def list(_: ontologies_models.ListObjectTypesV2Response): ... + def list_outgoing_link_types(_: ontologies_models.ListOutgoingLinkTypesResponseV2): ... + + self.get = core.with_streaming_response(get, client.get) + self.get_full_metadata = core.with_streaming_response( + get_full_metadata, client.get_full_metadata + ) + self.get_outgoing_link_type = core.with_streaming_response( + get_outgoing_link_type, client.get_outgoing_link_type + ) + self.list = core.with_streaming_response(list, client.list) + self.list_outgoing_link_types = core.with_streaming_response( + list_outgoing_link_types, client.list_outgoing_link_types + ) + + +class AsyncObjectTypeClient: + """ + The API client for the ObjectType Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncObjectTypeClientStreaming(self) + self.with_raw_response = _AsyncObjectTypeClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + ontology: ontologies_models.OntologyIdentifier, + object_type: ontologies_models.ObjectTypeApiName, + *, + branch: typing.Optional[core_models.FoundryBranch] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[ontologies_models.ObjectTypeV2]: + """ + Gets a specific object type with the given API name. + + :param ontology: + :type ontology: OntologyIdentifier + :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. + :type object_type: ObjectTypeApiName + :param branch: The Foundry branch to load the object type definition from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. + :type branch: Optional[FoundryBranch] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[ontologies_models.ObjectTypeV2] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/ontologies/{ontology}/objectTypes/{objectType}", + query_params={ + "branch": branch, + }, + path_params={ + "ontology": ontology, + "objectType": object_type, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.ObjectTypeV2, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get_full_metadata( + self, + ontology: ontologies_models.OntologyIdentifier, + object_type: ontologies_models.ObjectTypeApiName, + *, + branch: typing.Optional[core_models.FoundryBranch] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, + sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[ontologies_models.ObjectTypeFullMetadata]: + """ + Gets the full metadata for a specific object type with the given API name. + + :param ontology: + :type ontology: OntologyIdentifier + :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. + :type object_type: ObjectTypeApiName + :param branch: The Foundry branch to load the action type definition from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. + :type branch: Optional[FoundryBranch] + :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. + :type preview: Optional[PreviewMode] + :param sdk_package_rid: The package rid of the generated SDK. + :type sdk_package_rid: Optional[SdkPackageRid] + :param sdk_version: The version of the generated SDK. + :type sdk_version: Optional[SdkVersion] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[ontologies_models.ObjectTypeFullMetadata] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/ontologies/{ontology}/objectTypes/{objectType}/fullMetadata", + query_params={ + "branch": branch, + "preview": preview, + "sdkPackageRid": sdk_package_rid, + "sdkVersion": sdk_version, + }, + path_params={ + "ontology": ontology, + "objectType": object_type, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.ObjectTypeFullMetadata, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get_outgoing_link_type( + self, + ontology: ontologies_models.OntologyIdentifier, + object_type: ontologies_models.ObjectTypeApiName, + link_type: ontologies_models.LinkTypeApiName, + *, + branch: typing.Optional[core_models.FoundryBranch] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[ontologies_models.LinkTypeSideV2]: + """ + Get an outgoing link for an object type. + + :param ontology: + :type ontology: OntologyIdentifier + :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager** application. + :type object_type: ObjectTypeApiName + :param link_type: The API name of the outgoing link. To find the API name for your link type, check the **Ontology Manager**. + :type link_type: LinkTypeApiName + :param branch: The Foundry branch to get the outgoing link types for an object type from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. + :type branch: Optional[FoundryBranch] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[ontologies_models.LinkTypeSideV2] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/ontologies/{ontology}/objectTypes/{objectType}/outgoingLinkTypes/{linkType}", + query_params={ + "branch": branch, + }, + path_params={ + "ontology": ontology, + "objectType": object_type, + "linkType": link_type, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.LinkTypeSideV2, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def list( + self, + ontology: ontologies_models.OntologyIdentifier, + *, + branch: typing.Optional[core_models.FoundryBranch] = None, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.AsyncResourceIterator[ontologies_models.ObjectTypeV2]: + """ + Lists the object types for the given Ontology. + + Each page may be smaller or larger than the requested page size. However, it is guaranteed that if there are + more results available, at least one result will be present in the + response. + + :param ontology: + :type ontology: OntologyIdentifier + :param branch: The Foundry branch to list the object types from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. + :type branch: Optional[FoundryBranch] + :param page_size: The desired size of the page to be returned. Defaults to 500. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. + :type page_size: Optional[PageSize] + :param page_token: + :type page_token: Optional[PageToken] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.AsyncResourceIterator[ontologies_models.ObjectTypeV2] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/ontologies/{ontology}/objectTypes", + query_params={ + "branch": branch, + "pageSize": page_size, + "pageToken": page_token, + }, + path_params={ + "ontology": ontology, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.ListObjectTypesV2Response, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def list_outgoing_link_types( + self, + ontology: ontologies_models.OntologyIdentifier, + object_type: ontologies_models.ObjectTypeApiName, + *, + branch: typing.Optional[core_models.FoundryBranch] = None, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.AsyncResourceIterator[ontologies_models.LinkTypeSideV2]: + """ + List the outgoing links for an object type. + + :param ontology: + :type ontology: OntologyIdentifier + :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager** application. + :type object_type: ObjectTypeApiName + :param branch: The Foundry branch to load the outgoing link types from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. + :type branch: Optional[FoundryBranch] + :param page_size: The desired size of the page to be returned. + :type page_size: Optional[PageSize] + :param page_token: + :type page_token: Optional[PageToken] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.AsyncResourceIterator[ontologies_models.LinkTypeSideV2] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/ontologies/{ontology}/objectTypes/{objectType}/outgoingLinkTypes", + query_params={ + "branch": branch, + "pageSize": page_size, + "pageToken": page_token, + }, + path_params={ + "ontology": ontology, + "objectType": object_type, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.ListOutgoingLinkTypesResponseV2, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + +class _AsyncObjectTypeClientRaw: + def __init__(self, client: AsyncObjectTypeClient) -> None: + def get(_: ontologies_models.ObjectTypeV2): ... + def get_full_metadata(_: ontologies_models.ObjectTypeFullMetadata): ... + def get_outgoing_link_type(_: ontologies_models.LinkTypeSideV2): ... + def list(_: ontologies_models.ListObjectTypesV2Response): ... + def list_outgoing_link_types(_: ontologies_models.ListOutgoingLinkTypesResponseV2): ... + + self.get = core.async_with_raw_response(get, client.get) + self.get_full_metadata = core.async_with_raw_response( + get_full_metadata, client.get_full_metadata + ) + self.get_outgoing_link_type = core.async_with_raw_response( + get_outgoing_link_type, client.get_outgoing_link_type + ) + self.list = core.async_with_raw_response(list, client.list) + self.list_outgoing_link_types = core.async_with_raw_response( + list_outgoing_link_types, client.list_outgoing_link_types + ) + + +class _AsyncObjectTypeClientStreaming: + def __init__(self, client: AsyncObjectTypeClient) -> None: + def get(_: ontologies_models.ObjectTypeV2): ... + def get_full_metadata(_: ontologies_models.ObjectTypeFullMetadata): ... + def get_outgoing_link_type(_: ontologies_models.LinkTypeSideV2): ... + def list(_: ontologies_models.ListObjectTypesV2Response): ... + def list_outgoing_link_types(_: ontologies_models.ListOutgoingLinkTypesResponseV2): ... + + self.get = core.async_with_streaming_response(get, client.get) + self.get_full_metadata = core.async_with_streaming_response( + get_full_metadata, client.get_full_metadata + ) + self.get_outgoing_link_type = core.async_with_streaming_response( + get_outgoing_link_type, client.get_outgoing_link_type + ) + self.list = core.async_with_streaming_response(list, client.list) + self.list_outgoing_link_types = core.async_with_streaming_response( + list_outgoing_link_types, client.list_outgoing_link_types + ) diff --git a/foundry_sdk/v2/ontologies/ontology.py b/foundry_sdk/v2/ontologies/ontology.py new file mode 100644 index 000000000..c412bea13 --- /dev/null +++ b/foundry_sdk/v2/ontologies/ontology.py @@ -0,0 +1,577 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing +from functools import cached_property + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v2.core import models as core_models +from foundry_sdk.v2.ontologies import models as ontologies_models + + +class OntologyClient: + """ + The API client for the Ontology Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _OntologyClientStreaming(self) + self.with_raw_response = _OntologyClientRaw(self) + + @cached_property + def ActionType(self): + from foundry_sdk.v2.ontologies.action_type import ActionTypeClient + + return ActionTypeClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @cached_property + def ObjectType(self): + from foundry_sdk.v2.ontologies.object_type import ObjectTypeClient + + return ObjectTypeClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @cached_property + def QueryType(self): + from foundry_sdk.v2.ontologies.query_type import QueryTypeClient + + return QueryTypeClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + ontology: ontologies_models.OntologyIdentifier, + *, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> ontologies_models.OntologyV2: + """ + Gets a specific ontology for a given Ontology API name or RID. + + :param ontology: + :type ontology: OntologyIdentifier + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: ontologies_models.OntologyV2 + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/ontologies/{ontology}", + query_params={}, + path_params={ + "ontology": ontology, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.OntologyV2, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get_full_metadata( + self, + ontology: ontologies_models.OntologyIdentifier, + *, + branch: typing.Optional[core_models.FoundryBranch] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> ontologies_models.OntologyFullMetadata: + """ + Get the full Ontology metadata. This includes the objects, links, actions, queries, and interfaces. + This endpoint is designed to return as much metadata as possible in a single request to support OSDK workflows. + It may omit certain entities rather than fail the request. + + :param ontology: + :type ontology: OntologyIdentifier + :param branch: The Foundry branch to load metadata from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. + :type branch: Optional[FoundryBranch] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: ontologies_models.OntologyFullMetadata + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/ontologies/{ontology}/fullMetadata", + query_params={ + "branch": branch, + }, + path_params={ + "ontology": ontology, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.OntologyFullMetadata, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def list( + self, + *, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> ontologies_models.ListOntologiesV2Response: + """ + Lists the Ontologies visible to the current user. + + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: ontologies_models.ListOntologiesV2Response + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/ontologies", + query_params={}, + path_params={}, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.ListOntologiesV2Response, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def load_metadata( + self, + ontology: ontologies_models.OntologyIdentifier, + *, + action_types: typing.List[ontologies_models.ActionTypeApiName], + interface_types: typing.List[ontologies_models.InterfaceTypeApiName], + link_types: typing.List[ontologies_models.LinkTypeApiName], + object_types: typing.List[ontologies_models.ObjectTypeApiName], + query_types: typing.List[ontologies_models.VersionedQueryTypeApiName], + branch: typing.Optional[core_models.FoundryBranch] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> ontologies_models.OntologyFullMetadata: + """ + Load Ontology metadata for the requested object, link, action, query, and interface types. + + :param ontology: + :type ontology: OntologyIdentifier + :param action_types: + :type action_types: List[ActionTypeApiName] + :param interface_types: + :type interface_types: List[InterfaceTypeApiName] + :param link_types: + :type link_types: List[LinkTypeApiName] + :param object_types: + :type object_types: List[ObjectTypeApiName] + :param query_types: + :type query_types: List[VersionedQueryTypeApiName] + :param branch: The Foundry branch to load metadata from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. + :type branch: Optional[FoundryBranch] + :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: ontologies_models.OntologyFullMetadata + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/ontologies/{ontology}/metadata", + query_params={ + "branch": branch, + "preview": preview, + }, + path_params={ + "ontology": ontology, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=ontologies_models.LoadOntologyMetadataRequest( + object_types=object_types, + link_types=link_types, + action_types=action_types, + query_types=query_types, + interface_types=interface_types, + ), + response_type=ontologies_models.OntologyFullMetadata, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _OntologyClientRaw: + def __init__(self, client: OntologyClient) -> None: + def get(_: ontologies_models.OntologyV2): ... + def get_full_metadata(_: ontologies_models.OntologyFullMetadata): ... + def list(_: ontologies_models.ListOntologiesV2Response): ... + def load_metadata(_: ontologies_models.OntologyFullMetadata): ... + + self.get = core.with_raw_response(get, client.get) + self.get_full_metadata = core.with_raw_response(get_full_metadata, client.get_full_metadata) + self.list = core.with_raw_response(list, client.list) + self.load_metadata = core.with_raw_response(load_metadata, client.load_metadata) + + +class _OntologyClientStreaming: + def __init__(self, client: OntologyClient) -> None: + def get(_: ontologies_models.OntologyV2): ... + def get_full_metadata(_: ontologies_models.OntologyFullMetadata): ... + def list(_: ontologies_models.ListOntologiesV2Response): ... + def load_metadata(_: ontologies_models.OntologyFullMetadata): ... + + self.get = core.with_streaming_response(get, client.get) + self.get_full_metadata = core.with_streaming_response( + get_full_metadata, client.get_full_metadata + ) + self.list = core.with_streaming_response(list, client.list) + self.load_metadata = core.with_streaming_response(load_metadata, client.load_metadata) + + +class AsyncOntologyClient: + """ + The API client for the Ontology Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncOntologyClientStreaming(self) + self.with_raw_response = _AsyncOntologyClientRaw(self) + + @cached_property + def ActionType(self): + from foundry_sdk.v2.ontologies.action_type import AsyncActionTypeClient + + return AsyncActionTypeClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @cached_property + def ObjectType(self): + from foundry_sdk.v2.ontologies.object_type import AsyncObjectTypeClient + + return AsyncObjectTypeClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @cached_property + def QueryType(self): + from foundry_sdk.v2.ontologies.query_type import AsyncQueryTypeClient + + return AsyncQueryTypeClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + ontology: ontologies_models.OntologyIdentifier, + *, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[ontologies_models.OntologyV2]: + """ + Gets a specific ontology for a given Ontology API name or RID. + + :param ontology: + :type ontology: OntologyIdentifier + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[ontologies_models.OntologyV2] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/ontologies/{ontology}", + query_params={}, + path_params={ + "ontology": ontology, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.OntologyV2, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get_full_metadata( + self, + ontology: ontologies_models.OntologyIdentifier, + *, + branch: typing.Optional[core_models.FoundryBranch] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[ontologies_models.OntologyFullMetadata]: + """ + Get the full Ontology metadata. This includes the objects, links, actions, queries, and interfaces. + This endpoint is designed to return as much metadata as possible in a single request to support OSDK workflows. + It may omit certain entities rather than fail the request. + + :param ontology: + :type ontology: OntologyIdentifier + :param branch: The Foundry branch to load metadata from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. + :type branch: Optional[FoundryBranch] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[ontologies_models.OntologyFullMetadata] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/ontologies/{ontology}/fullMetadata", + query_params={ + "branch": branch, + }, + path_params={ + "ontology": ontology, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.OntologyFullMetadata, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def list( + self, + *, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[ontologies_models.ListOntologiesV2Response]: + """ + Lists the Ontologies visible to the current user. + + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[ontologies_models.ListOntologiesV2Response] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/ontologies", + query_params={}, + path_params={}, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.ListOntologiesV2Response, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def load_metadata( + self, + ontology: ontologies_models.OntologyIdentifier, + *, + action_types: typing.List[ontologies_models.ActionTypeApiName], + interface_types: typing.List[ontologies_models.InterfaceTypeApiName], + link_types: typing.List[ontologies_models.LinkTypeApiName], + object_types: typing.List[ontologies_models.ObjectTypeApiName], + query_types: typing.List[ontologies_models.VersionedQueryTypeApiName], + branch: typing.Optional[core_models.FoundryBranch] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[ontologies_models.OntologyFullMetadata]: + """ + Load Ontology metadata for the requested object, link, action, query, and interface types. + + :param ontology: + :type ontology: OntologyIdentifier + :param action_types: + :type action_types: List[ActionTypeApiName] + :param interface_types: + :type interface_types: List[InterfaceTypeApiName] + :param link_types: + :type link_types: List[LinkTypeApiName] + :param object_types: + :type object_types: List[ObjectTypeApiName] + :param query_types: + :type query_types: List[VersionedQueryTypeApiName] + :param branch: The Foundry branch to load metadata from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. + :type branch: Optional[FoundryBranch] + :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[ontologies_models.OntologyFullMetadata] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/ontologies/{ontology}/metadata", + query_params={ + "branch": branch, + "preview": preview, + }, + path_params={ + "ontology": ontology, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=ontologies_models.LoadOntologyMetadataRequest( + object_types=object_types, + link_types=link_types, + action_types=action_types, + query_types=query_types, + interface_types=interface_types, + ), + response_type=ontologies_models.OntologyFullMetadata, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _AsyncOntologyClientRaw: + def __init__(self, client: AsyncOntologyClient) -> None: + def get(_: ontologies_models.OntologyV2): ... + def get_full_metadata(_: ontologies_models.OntologyFullMetadata): ... + def list(_: ontologies_models.ListOntologiesV2Response): ... + def load_metadata(_: ontologies_models.OntologyFullMetadata): ... + + self.get = core.async_with_raw_response(get, client.get) + self.get_full_metadata = core.async_with_raw_response( + get_full_metadata, client.get_full_metadata + ) + self.list = core.async_with_raw_response(list, client.list) + self.load_metadata = core.async_with_raw_response(load_metadata, client.load_metadata) + + +class _AsyncOntologyClientStreaming: + def __init__(self, client: AsyncOntologyClient) -> None: + def get(_: ontologies_models.OntologyV2): ... + def get_full_metadata(_: ontologies_models.OntologyFullMetadata): ... + def list(_: ontologies_models.ListOntologiesV2Response): ... + def load_metadata(_: ontologies_models.OntologyFullMetadata): ... + + self.get = core.async_with_streaming_response(get, client.get) + self.get_full_metadata = core.async_with_streaming_response( + get_full_metadata, client.get_full_metadata + ) + self.list = core.async_with_streaming_response(list, client.list) + self.load_metadata = core.async_with_streaming_response(load_metadata, client.load_metadata) diff --git a/foundry_sdk/v2/ontologies/ontology_interface.py b/foundry_sdk/v2/ontologies/ontology_interface.py new file mode 100644 index 000000000..c96aa6a57 --- /dev/null +++ b/foundry_sdk/v2/ontologies/ontology_interface.py @@ -0,0 +1,1448 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v2.core import models as core_models +from foundry_sdk.v2.ontologies import models as ontologies_models + + +class OntologyInterfaceClient: + """ + The API client for the OntologyInterface Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _OntologyInterfaceClientStreaming(self) + self.with_raw_response = _OntologyInterfaceClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def aggregate( + self, + ontology: ontologies_models.OntologyIdentifier, + interface_type: ontologies_models.InterfaceTypeApiName, + *, + aggregation: typing.List[ontologies_models.AggregationV2], + group_by: typing.List[ontologies_models.AggregationGroupByV2], + accuracy: typing.Optional[ontologies_models.AggregationAccuracyRequest] = None, + branch: typing.Optional[core_models.FoundryBranch] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + where: typing.Optional[ontologies_models.SearchJsonQueryV2] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> ontologies_models.AggregateObjectsResponseV2: + """ + :::callout{theme=warning title=Warning} + This endpoint will be removed once TS OSDK is updated to use `objectSets/aggregate` with interface object + sets. + ::: + Perform functions on object fields in the specified ontology and of the specified interface type. Any + properties specified in the query must be shared property type API names defined on the interface. + + :param ontology: + :type ontology: OntologyIdentifier + :param interface_type: The API name of the interface type. To find the API name, use the **List interface types** endpoint or check the **Ontology Manager**. + :type interface_type: InterfaceTypeApiName + :param aggregation: + :type aggregation: List[AggregationV2] + :param group_by: + :type group_by: List[AggregationGroupByV2] + :param accuracy: + :type accuracy: Optional[AggregationAccuracyRequest] + :param branch: The Foundry branch to aggregate objects from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. + :type branch: Optional[FoundryBranch] + :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. + :type preview: Optional[PreviewMode] + :param where: + :type where: Optional[SearchJsonQueryV2] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: ontologies_models.AggregateObjectsResponseV2 + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/ontologies/{ontology}/interfaces/{interfaceType}/aggregate", + query_params={ + "branch": branch, + "preview": preview, + }, + path_params={ + "ontology": ontology, + "interfaceType": interface_type, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=ontologies_models.AggregateObjectsRequestV2( + aggregation=aggregation, + where=where, + group_by=group_by, + accuracy=accuracy, + ), + response_type=ontologies_models.AggregateObjectsResponseV2, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + ontology: ontologies_models.OntologyIdentifier, + interface_type: ontologies_models.InterfaceTypeApiName, + *, + branch: typing.Optional[core_models.FoundryBranch] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, + sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> ontologies_models.InterfaceType: + """ + Gets a specific interface type with the given API name. + + :param ontology: + :type ontology: OntologyIdentifier + :param interface_type: The API name of the interface type. To find the API name, use the **List interface types** endpoint or check the **Ontology Manager**. + :type interface_type: InterfaceTypeApiName + :param branch: The Foundry branch to load the interface type definition from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. + :type branch: Optional[FoundryBranch] + :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. + :type preview: Optional[PreviewMode] + :param sdk_package_rid: The package rid of the generated SDK. + :type sdk_package_rid: Optional[SdkPackageRid] + :param sdk_version: The version of the generated SDK. + :type sdk_version: Optional[SdkVersion] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: ontologies_models.InterfaceType + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/ontologies/{ontology}/interfaceTypes/{interfaceType}", + query_params={ + "branch": branch, + "preview": preview, + "sdkPackageRid": sdk_package_rid, + "sdkVersion": sdk_version, + }, + path_params={ + "ontology": ontology, + "interfaceType": interface_type, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.InterfaceType, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get_outgoing_interface_link_type( + self, + ontology: ontologies_models.OntologyIdentifier, + interface_type: ontologies_models.InterfaceTypeApiName, + interface_link_type: ontologies_models.InterfaceLinkTypeApiName, + *, + branch: typing.Optional[core_models.FoundryBranch] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> ontologies_models.InterfaceLinkType: + """ + Get an outgoing interface link type for an interface type. + + :param ontology: + :type ontology: OntologyIdentifier + :param interface_type: The API name of the interface type. To find the API name, use the **List interface types** endpoint or check the **Ontology Manager** application. + :type interface_type: InterfaceTypeApiName + :param interface_link_type: The API name of the outgoing interface link. To find the API name for your interface link type, check the **Ontology Manager** page for the parent interface. + :type interface_link_type: InterfaceLinkTypeApiName + :param branch: The Foundry branch to get the outgoing link types for an object type from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. + :type branch: Optional[FoundryBranch] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: ontologies_models.InterfaceLinkType + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/ontologies/{ontology}/interfaceTypes/{interfaceType}/outgoingLinkTypes/{interfaceLinkType}", + query_params={ + "branch": branch, + }, + path_params={ + "ontology": ontology, + "interfaceType": interface_type, + "interfaceLinkType": interface_link_type, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.InterfaceLinkType, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def list( + self, + ontology: ontologies_models.OntologyIdentifier, + *, + branch: typing.Optional[core_models.FoundryBranch] = None, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.ResourceIterator[ontologies_models.InterfaceType]: + """ + Lists the interface types for the given Ontology. + + Each page may be smaller than the requested page size. However, it is guaranteed that if there are more + results available, at least one result will be present in the response. + + :param ontology: + :type ontology: OntologyIdentifier + :param branch: The Foundry branch to list the interface types from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. + :type branch: Optional[FoundryBranch] + :param page_size: The desired size of the page to be returned. Defaults to 500. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. + :type page_size: Optional[PageSize] + :param page_token: + :type page_token: Optional[PageToken] + :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.ResourceIterator[ontologies_models.InterfaceType] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/ontologies/{ontology}/interfaceTypes", + query_params={ + "branch": branch, + "pageSize": page_size, + "pageToken": page_token, + "preview": preview, + }, + path_params={ + "ontology": ontology, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.ListInterfaceTypesResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def list_interface_linked_objects( + self, + ontology: ontologies_models.OntologyIdentifier, + interface_type: ontologies_models.InterfaceTypeApiName, + object_type: ontologies_models.ObjectTypeApiName, + primary_key: ontologies_models.PropertyValueEscapedString, + interface_link_type: ontologies_models.InterfaceLinkTypeApiName, + *, + branch: typing.Optional[core_models.FoundryBranch] = None, + exclude_rid: typing.Optional[bool] = None, + order_by: typing.Optional[ontologies_models.OrderBy] = None, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + select: typing.Optional[typing.List[ontologies_models.SelectedPropertyApiName]] = None, + snapshot: typing.Optional[bool] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.ResourceIterator[ontologies_models.OntologyObjectV2]: + """ + Lists the linked objects for a specific object and the given interface link type. + + Note that this endpoint does not guarantee consistency. Changes to the data could result in missing or + repeated objects in the response pages. + + For Object Storage V1 backed objects, this endpoint returns a maximum of 10,000 objects. After 10,000 objects have been returned and if more objects + are available, attempting to load another page will result in an `ObjectsExceededLimit` error being returned. There is no limit on Object Storage V2 backed objects. + + Each page may be smaller or larger than the requested page size. However, it + is guaranteed that if there are more results available, at least one result will be present + in the response. + + Note that null value properties will not be returned. + + :param ontology: The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. + :type ontology: OntologyIdentifier + :param interface_type: The API name of the interface type. To find the API name, use the **List interface types** endpoint or check the **Ontology Manager** application. + :type interface_type: InterfaceTypeApiName + :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. + :type object_type: ObjectTypeApiName + :param primary_key: The primary key of the object from which to **start** the interface link traversal. To look up the expected primary key for your object type, use the `Get object type` endpoint or the **Ontology Manager**. + :type primary_key: PropertyValueEscapedString + :param interface_link_type: The API name of the outgoing interface link. To find the API name for your interface link type, check the **Ontology Manager** page for the parent interface. + :type interface_link_type: InterfaceLinkTypeApiName + :param branch: The Foundry branch to get the outgoing link types for an object type from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. + :type branch: Optional[FoundryBranch] + :param exclude_rid: A flag to exclude the retrieval of the `__rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2. + :type exclude_rid: Optional[bool] + :param order_by: + :type order_by: Optional[OrderBy] + :param page_size: The desired size of the page to be returned. Defaults to 1,000. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. + :type page_size: Optional[PageSize] + :param page_token: + :type page_token: Optional[PageToken] + :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. + :type preview: Optional[PreviewMode] + :param select: The properties of the object type that should be included in the response. Omit this parameter to get all the properties. + :type select: Optional[List[SelectedPropertyApiName]] + :param snapshot: A flag to use snapshot consistency when paging. Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. This defaults to false if not specified, which means you will always get the latest results. + :type snapshot: Optional[bool] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.ResourceIterator[ontologies_models.OntologyObjectV2] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/ontologies/{ontology}/interfaces/{interfaceType}/{objectType}/{primaryKey}/links/{interfaceLinkType}", + query_params={ + "branch": branch, + "excludeRid": exclude_rid, + "orderBy": order_by, + "pageSize": page_size, + "pageToken": page_token, + "preview": preview, + "select": select, + "snapshot": snapshot, + }, + path_params={ + "ontology": ontology, + "interfaceType": interface_type, + "objectType": object_type, + "primaryKey": primary_key, + "interfaceLinkType": interface_link_type, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.ListInterfaceLinkedObjectsResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def list_objects_for_interface( + self, + ontology: ontologies_models.OntologyIdentifier, + interface_type: ontologies_models.InterfaceTypeApiName, + *, + branch: typing.Optional[core_models.FoundryBranch] = None, + exclude_rid: typing.Optional[bool] = None, + order_by: typing.Optional[ontologies_models.OrderBy] = None, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + select: typing.Optional[typing.List[ontologies_models.SelectedPropertyApiName]] = None, + snapshot: typing.Optional[bool] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.ResourceIterator[ontologies_models.OntologyObjectV2]: + """ + Lists the objects for the given Ontology and interface type. + + Note that this endpoint does not guarantee consistency, unless you use the snapshot flag specified below. Changes to the data could result in missing or + repeated objects in the response pages. + + For Object Storage V1 backed objects, this endpoint returns a maximum of 10,000 objects. After 10,000 objects have been returned and if more objects + are available, attempting to load another page will result in an `ObjectsExceededLimit` error being returned. There is no limit on Object Storage V2 backed objects. + + Each page may be smaller or larger than the requested page size. However, it + is guaranteed that if there are more results available, at least one result will be present + in the response. + + Note that null value properties will not be returned. + + :param ontology: The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. + :type ontology: OntologyIdentifier + :param interface_type: The API name of the interface type. To find the API name, use the **List interface types** endpoint or check the **Ontology Manager**. + :type interface_type: InterfaceTypeApiName + :param branch: The Foundry branch to list objects from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. + :type branch: Optional[FoundryBranch] + :param exclude_rid: A flag to exclude the retrieval of the `__rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2. + :type exclude_rid: Optional[bool] + :param order_by: + :type order_by: Optional[OrderBy] + :param page_size: The desired size of the page to be returned. Defaults to 1,000. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. + :type page_size: Optional[PageSize] + :param page_token: + :type page_token: Optional[PageToken] + :param select: The properties of the interface type that should be included in the response. Omit this parameter to get all the properties. + :type select: Optional[List[SelectedPropertyApiName]] + :param snapshot: A flag to use snapshot consistency when paging. Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. This defaults to false if not specified, which means you will always get the latest results. + :type snapshot: Optional[bool] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.ResourceIterator[ontologies_models.OntologyObjectV2] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/ontologies/{ontology}/interfaces/{interfaceType}", + query_params={ + "branch": branch, + "excludeRid": exclude_rid, + "orderBy": order_by, + "pageSize": page_size, + "pageToken": page_token, + "select": select, + "snapshot": snapshot, + }, + path_params={ + "ontology": ontology, + "interfaceType": interface_type, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.ListObjectsForInterfaceResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def list_outgoing_interface_link_types( + self, + ontology: ontologies_models.OntologyIdentifier, + interface_type: ontologies_models.InterfaceTypeApiName, + *, + branch: typing.Optional[core_models.FoundryBranch] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> ontologies_models.ListOutgoingInterfaceLinkTypesResponse: + """ + List the outgoing interface link types for an interface type. + + :param ontology: + :type ontology: OntologyIdentifier + :param interface_type: The API name of the interface type. To find the API name, use the **List interface types** endpoint or check the **Ontology Manager** application. + :type interface_type: InterfaceTypeApiName + :param branch: The Foundry branch to get the outgoing link type from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. + :type branch: Optional[FoundryBranch] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: ontologies_models.ListOutgoingInterfaceLinkTypesResponse + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/ontologies/{ontology}/interfaceTypes/{interfaceType}/outgoingLinkTypes", + query_params={ + "branch": branch, + }, + path_params={ + "ontology": ontology, + "interfaceType": interface_type, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.ListOutgoingInterfaceLinkTypesResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def search( + self, + ontology: ontologies_models.OntologyIdentifier, + interface_type: ontologies_models.InterfaceTypeApiName, + *, + augmented_interface_property_types: typing.Dict[ + ontologies_models.InterfaceTypeApiName, + typing.List[ontologies_models.InterfacePropertyApiName], + ], + augmented_properties: typing.Dict[ + ontologies_models.ObjectTypeApiName, typing.List[ontologies_models.PropertyApiName] + ], + augmented_shared_property_types: typing.Dict[ + ontologies_models.InterfaceTypeApiName, + typing.List[ontologies_models.SharedPropertyTypeApiName], + ], + other_interface_types: typing.List[ontologies_models.InterfaceTypeApiName], + selected_interface_property_types: typing.List[ontologies_models.InterfacePropertyApiName], + selected_object_types: typing.List[ontologies_models.ObjectTypeApiName], + selected_shared_property_types: typing.List[ontologies_models.SharedPropertyTypeApiName], + branch: typing.Optional[core_models.FoundryBranch] = None, + order_by: typing.Optional[ontologies_models.SearchOrderByV2] = None, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + where: typing.Optional[ontologies_models.SearchJsonQueryV2] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> ontologies_models.SearchObjectsResponseV2: + """ + :::callout{theme=warning title=Warning} + This endpoint will be removed once TS OSDK is updated to use `objectSets/loadObjects` with interface object + sets. + ::: + Search for objects in the specified ontology and interface type. Any properties specified in the "where" or + "orderBy" parameters must be shared property type API names defined on the interface. The following search + queries are supported: + + | Query type | Description | Supported Types | + |-----------------------------------------|-------------------------------------------------------------------------------------------------------------------|---------------------------------| + | lt | The provided property is less than the provided value. | number, string, date, timestamp | + | gt | The provided property is greater than the provided value. | number, string, date, timestamp | + | lte | The provided property is less than or equal to the provided value. | number, string, date, timestamp | + | gte | The provided property is greater than or equal to the provided value. | number, string, date, timestamp | + | eq | The provided property is exactly equal to the provided value. | number, string, date, timestamp | + | isNull | The provided property is (or is not) null. | all | + | contains | The provided property contains the provided value. | array | + | not | The sub-query does not match. | N/A (applied on a query) | + | and | All the sub-queries match. | N/A (applied on queries) | + | or | At least one of the sub-queries match. | N/A (applied on queries) | + | startsWith | The provided property starts with the provided term. | string | + | containsAllTermsInOrderPrefixLastTerm | The provided property contains all the terms provided in order. The last term can be a partial prefix match. | string | + | containsAllTermsInOrder | The provided property contains the provided terms as a substring. | string | + | containsAnyTerm | The provided property contains at least one of the terms separated by whitespace. | string | + | containsAllTerms | The provided property contains all the terms separated by whitespace. | string | + + Queries can be at most three levels deep. By default, terms are separated by whitespace or punctuation (`?!,:;-[](){}'"~`). Periods (`.`) on their own are ignored. + Partial terms are not matched by terms filters except where explicitly noted. + + Attempting to use an unsupported query will result in a validation error. Third-party applications using this + endpoint via OAuth2 must request the following operation scope: `api:ontologies-read`. + + :param ontology: + :type ontology: OntologyIdentifier + :param interface_type: The API name of the interface type. To find the API name, use the **List interface types** endpoint or check the **Ontology Manager**. + :type interface_type: InterfaceTypeApiName + :param augmented_interface_property_types: A map from interface type API name to a list of interface property type API names. For each returned object, if the object implements an interface that is a key in the map, then we augment the response for that object type with the list of properties specified in the value. + :type augmented_interface_property_types: Dict[InterfaceTypeApiName, List[InterfacePropertyApiName]] + :param augmented_properties: A map from object type API name to a list of property type API names. For each returned object, if the object’s object type is a key in the map, then we augment the response for that object type with the list of properties specified in the value. + :type augmented_properties: Dict[ObjectTypeApiName, List[PropertyApiName]] + :param augmented_shared_property_types: A map from interface type API name to a list of shared property type API names. For each returned object, if the object implements an interface that is a key in the map, then we augment the response for that object type with the list of properties specified in the value. + :type augmented_shared_property_types: Dict[InterfaceTypeApiName, List[SharedPropertyTypeApiName]] + :param other_interface_types: A list of interface type API names. Object types must implement all the mentioned interfaces in order to be included in the response. + :type other_interface_types: List[InterfaceTypeApiName] + :param selected_interface_property_types: A list of interface property type API names of the interface type that should be included in the response. Omit this parameter to include all properties of the interface type in the response. + :type selected_interface_property_types: List[InterfacePropertyApiName] + :param selected_object_types: A list of object type API names that should be included in the response. If non-empty, object types that are not mentioned will not be included in the response even if they implement the specified interface. Omit the parameter to include all object types. + :type selected_object_types: List[ObjectTypeApiName] + :param selected_shared_property_types: A list of shared property type API names of the interface type that should be included in the response. Omit this parameter to include all properties of the interface type in the response. + :type selected_shared_property_types: List[SharedPropertyTypeApiName] + :param branch: The Foundry branch to search objects from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. + :type branch: Optional[FoundryBranch] + :param order_by: + :type order_by: Optional[SearchOrderByV2] + :param page_size: + :type page_size: Optional[PageSize] + :param page_token: + :type page_token: Optional[PageToken] + :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. + :type preview: Optional[PreviewMode] + :param where: + :type where: Optional[SearchJsonQueryV2] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: ontologies_models.SearchObjectsResponseV2 + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/ontologies/{ontology}/interfaces/{interfaceType}/search", + query_params={ + "branch": branch, + "preview": preview, + }, + path_params={ + "ontology": ontology, + "interfaceType": interface_type, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=ontologies_models.SearchObjectsForInterfaceRequest( + where=where, + order_by=order_by, + augmented_properties=augmented_properties, + augmented_shared_property_types=augmented_shared_property_types, + augmented_interface_property_types=augmented_interface_property_types, + selected_shared_property_types=selected_shared_property_types, + selected_interface_property_types=selected_interface_property_types, + selected_object_types=selected_object_types, + other_interface_types=other_interface_types, + page_size=page_size, + page_token=page_token, + ), + response_type=ontologies_models.SearchObjectsResponseV2, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _OntologyInterfaceClientRaw: + def __init__(self, client: OntologyInterfaceClient) -> None: + def aggregate(_: ontologies_models.AggregateObjectsResponseV2): ... + def get(_: ontologies_models.InterfaceType): ... + def get_outgoing_interface_link_type(_: ontologies_models.InterfaceLinkType): ... + def list(_: ontologies_models.ListInterfaceTypesResponse): ... + def list_interface_linked_objects( + _: ontologies_models.ListInterfaceLinkedObjectsResponse, + ): ... + def list_objects_for_interface(_: ontologies_models.ListObjectsForInterfaceResponse): ... + def list_outgoing_interface_link_types( + _: ontologies_models.ListOutgoingInterfaceLinkTypesResponse, + ): ... + def search(_: ontologies_models.SearchObjectsResponseV2): ... + + self.aggregate = core.with_raw_response(aggregate, client.aggregate) + self.get = core.with_raw_response(get, client.get) + self.get_outgoing_interface_link_type = core.with_raw_response( + get_outgoing_interface_link_type, client.get_outgoing_interface_link_type + ) + self.list = core.with_raw_response(list, client.list) + self.list_interface_linked_objects = core.with_raw_response( + list_interface_linked_objects, client.list_interface_linked_objects + ) + self.list_objects_for_interface = core.with_raw_response( + list_objects_for_interface, client.list_objects_for_interface + ) + self.list_outgoing_interface_link_types = core.with_raw_response( + list_outgoing_interface_link_types, client.list_outgoing_interface_link_types + ) + self.search = core.with_raw_response(search, client.search) + + +class _OntologyInterfaceClientStreaming: + def __init__(self, client: OntologyInterfaceClient) -> None: + def aggregate(_: ontologies_models.AggregateObjectsResponseV2): ... + def get(_: ontologies_models.InterfaceType): ... + def get_outgoing_interface_link_type(_: ontologies_models.InterfaceLinkType): ... + def list(_: ontologies_models.ListInterfaceTypesResponse): ... + def list_interface_linked_objects( + _: ontologies_models.ListInterfaceLinkedObjectsResponse, + ): ... + def list_objects_for_interface(_: ontologies_models.ListObjectsForInterfaceResponse): ... + def list_outgoing_interface_link_types( + _: ontologies_models.ListOutgoingInterfaceLinkTypesResponse, + ): ... + def search(_: ontologies_models.SearchObjectsResponseV2): ... + + self.aggregate = core.with_streaming_response(aggregate, client.aggregate) + self.get = core.with_streaming_response(get, client.get) + self.get_outgoing_interface_link_type = core.with_streaming_response( + get_outgoing_interface_link_type, client.get_outgoing_interface_link_type + ) + self.list = core.with_streaming_response(list, client.list) + self.list_interface_linked_objects = core.with_streaming_response( + list_interface_linked_objects, client.list_interface_linked_objects + ) + self.list_objects_for_interface = core.with_streaming_response( + list_objects_for_interface, client.list_objects_for_interface + ) + self.list_outgoing_interface_link_types = core.with_streaming_response( + list_outgoing_interface_link_types, client.list_outgoing_interface_link_types + ) + self.search = core.with_streaming_response(search, client.search) + + +class AsyncOntologyInterfaceClient: + """ + The API client for the OntologyInterface Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncOntologyInterfaceClientStreaming(self) + self.with_raw_response = _AsyncOntologyInterfaceClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def aggregate( + self, + ontology: ontologies_models.OntologyIdentifier, + interface_type: ontologies_models.InterfaceTypeApiName, + *, + aggregation: typing.List[ontologies_models.AggregationV2], + group_by: typing.List[ontologies_models.AggregationGroupByV2], + accuracy: typing.Optional[ontologies_models.AggregationAccuracyRequest] = None, + branch: typing.Optional[core_models.FoundryBranch] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + where: typing.Optional[ontologies_models.SearchJsonQueryV2] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[ontologies_models.AggregateObjectsResponseV2]: + """ + :::callout{theme=warning title=Warning} + This endpoint will be removed once TS OSDK is updated to use `objectSets/aggregate` with interface object + sets. + ::: + Perform functions on object fields in the specified ontology and of the specified interface type. Any + properties specified in the query must be shared property type API names defined on the interface. + + :param ontology: + :type ontology: OntologyIdentifier + :param interface_type: The API name of the interface type. To find the API name, use the **List interface types** endpoint or check the **Ontology Manager**. + :type interface_type: InterfaceTypeApiName + :param aggregation: + :type aggregation: List[AggregationV2] + :param group_by: + :type group_by: List[AggregationGroupByV2] + :param accuracy: + :type accuracy: Optional[AggregationAccuracyRequest] + :param branch: The Foundry branch to aggregate objects from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. + :type branch: Optional[FoundryBranch] + :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. + :type preview: Optional[PreviewMode] + :param where: + :type where: Optional[SearchJsonQueryV2] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[ontologies_models.AggregateObjectsResponseV2] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/ontologies/{ontology}/interfaces/{interfaceType}/aggregate", + query_params={ + "branch": branch, + "preview": preview, + }, + path_params={ + "ontology": ontology, + "interfaceType": interface_type, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=ontologies_models.AggregateObjectsRequestV2( + aggregation=aggregation, + where=where, + group_by=group_by, + accuracy=accuracy, + ), + response_type=ontologies_models.AggregateObjectsResponseV2, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + ontology: ontologies_models.OntologyIdentifier, + interface_type: ontologies_models.InterfaceTypeApiName, + *, + branch: typing.Optional[core_models.FoundryBranch] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, + sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[ontologies_models.InterfaceType]: + """ + Gets a specific interface type with the given API name. + + :param ontology: + :type ontology: OntologyIdentifier + :param interface_type: The API name of the interface type. To find the API name, use the **List interface types** endpoint or check the **Ontology Manager**. + :type interface_type: InterfaceTypeApiName + :param branch: The Foundry branch to load the interface type definition from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. + :type branch: Optional[FoundryBranch] + :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. + :type preview: Optional[PreviewMode] + :param sdk_package_rid: The package rid of the generated SDK. + :type sdk_package_rid: Optional[SdkPackageRid] + :param sdk_version: The version of the generated SDK. + :type sdk_version: Optional[SdkVersion] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[ontologies_models.InterfaceType] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/ontologies/{ontology}/interfaceTypes/{interfaceType}", + query_params={ + "branch": branch, + "preview": preview, + "sdkPackageRid": sdk_package_rid, + "sdkVersion": sdk_version, + }, + path_params={ + "ontology": ontology, + "interfaceType": interface_type, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.InterfaceType, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get_outgoing_interface_link_type( + self, + ontology: ontologies_models.OntologyIdentifier, + interface_type: ontologies_models.InterfaceTypeApiName, + interface_link_type: ontologies_models.InterfaceLinkTypeApiName, + *, + branch: typing.Optional[core_models.FoundryBranch] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[ontologies_models.InterfaceLinkType]: + """ + Get an outgoing interface link type for an interface type. + + :param ontology: + :type ontology: OntologyIdentifier + :param interface_type: The API name of the interface type. To find the API name, use the **List interface types** endpoint or check the **Ontology Manager** application. + :type interface_type: InterfaceTypeApiName + :param interface_link_type: The API name of the outgoing interface link. To find the API name for your interface link type, check the **Ontology Manager** page for the parent interface. + :type interface_link_type: InterfaceLinkTypeApiName + :param branch: The Foundry branch to get the outgoing link types for an object type from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. + :type branch: Optional[FoundryBranch] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[ontologies_models.InterfaceLinkType] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/ontologies/{ontology}/interfaceTypes/{interfaceType}/outgoingLinkTypes/{interfaceLinkType}", + query_params={ + "branch": branch, + }, + path_params={ + "ontology": ontology, + "interfaceType": interface_type, + "interfaceLinkType": interface_link_type, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.InterfaceLinkType, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def list( + self, + ontology: ontologies_models.OntologyIdentifier, + *, + branch: typing.Optional[core_models.FoundryBranch] = None, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.AsyncResourceIterator[ontologies_models.InterfaceType]: + """ + Lists the interface types for the given Ontology. + + Each page may be smaller than the requested page size. However, it is guaranteed that if there are more + results available, at least one result will be present in the response. + + :param ontology: + :type ontology: OntologyIdentifier + :param branch: The Foundry branch to list the interface types from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. + :type branch: Optional[FoundryBranch] + :param page_size: The desired size of the page to be returned. Defaults to 500. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. + :type page_size: Optional[PageSize] + :param page_token: + :type page_token: Optional[PageToken] + :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.AsyncResourceIterator[ontologies_models.InterfaceType] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/ontologies/{ontology}/interfaceTypes", + query_params={ + "branch": branch, + "pageSize": page_size, + "pageToken": page_token, + "preview": preview, + }, + path_params={ + "ontology": ontology, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.ListInterfaceTypesResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def list_interface_linked_objects( + self, + ontology: ontologies_models.OntologyIdentifier, + interface_type: ontologies_models.InterfaceTypeApiName, + object_type: ontologies_models.ObjectTypeApiName, + primary_key: ontologies_models.PropertyValueEscapedString, + interface_link_type: ontologies_models.InterfaceLinkTypeApiName, + *, + branch: typing.Optional[core_models.FoundryBranch] = None, + exclude_rid: typing.Optional[bool] = None, + order_by: typing.Optional[ontologies_models.OrderBy] = None, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + select: typing.Optional[typing.List[ontologies_models.SelectedPropertyApiName]] = None, + snapshot: typing.Optional[bool] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.AsyncResourceIterator[ontologies_models.OntologyObjectV2]: + """ + Lists the linked objects for a specific object and the given interface link type. + + Note that this endpoint does not guarantee consistency. Changes to the data could result in missing or + repeated objects in the response pages. + + For Object Storage V1 backed objects, this endpoint returns a maximum of 10,000 objects. After 10,000 objects have been returned and if more objects + are available, attempting to load another page will result in an `ObjectsExceededLimit` error being returned. There is no limit on Object Storage V2 backed objects. + + Each page may be smaller or larger than the requested page size. However, it + is guaranteed that if there are more results available, at least one result will be present + in the response. + + Note that null value properties will not be returned. + + :param ontology: The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. + :type ontology: OntologyIdentifier + :param interface_type: The API name of the interface type. To find the API name, use the **List interface types** endpoint or check the **Ontology Manager** application. + :type interface_type: InterfaceTypeApiName + :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. + :type object_type: ObjectTypeApiName + :param primary_key: The primary key of the object from which to **start** the interface link traversal. To look up the expected primary key for your object type, use the `Get object type` endpoint or the **Ontology Manager**. + :type primary_key: PropertyValueEscapedString + :param interface_link_type: The API name of the outgoing interface link. To find the API name for your interface link type, check the **Ontology Manager** page for the parent interface. + :type interface_link_type: InterfaceLinkTypeApiName + :param branch: The Foundry branch to get the outgoing link types for an object type from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. + :type branch: Optional[FoundryBranch] + :param exclude_rid: A flag to exclude the retrieval of the `__rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2. + :type exclude_rid: Optional[bool] + :param order_by: + :type order_by: Optional[OrderBy] + :param page_size: The desired size of the page to be returned. Defaults to 1,000. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. + :type page_size: Optional[PageSize] + :param page_token: + :type page_token: Optional[PageToken] + :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. + :type preview: Optional[PreviewMode] + :param select: The properties of the object type that should be included in the response. Omit this parameter to get all the properties. + :type select: Optional[List[SelectedPropertyApiName]] + :param snapshot: A flag to use snapshot consistency when paging. Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. This defaults to false if not specified, which means you will always get the latest results. + :type snapshot: Optional[bool] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.AsyncResourceIterator[ontologies_models.OntologyObjectV2] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/ontologies/{ontology}/interfaces/{interfaceType}/{objectType}/{primaryKey}/links/{interfaceLinkType}", + query_params={ + "branch": branch, + "excludeRid": exclude_rid, + "orderBy": order_by, + "pageSize": page_size, + "pageToken": page_token, + "preview": preview, + "select": select, + "snapshot": snapshot, + }, + path_params={ + "ontology": ontology, + "interfaceType": interface_type, + "objectType": object_type, + "primaryKey": primary_key, + "interfaceLinkType": interface_link_type, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.ListInterfaceLinkedObjectsResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def list_objects_for_interface( + self, + ontology: ontologies_models.OntologyIdentifier, + interface_type: ontologies_models.InterfaceTypeApiName, + *, + branch: typing.Optional[core_models.FoundryBranch] = None, + exclude_rid: typing.Optional[bool] = None, + order_by: typing.Optional[ontologies_models.OrderBy] = None, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + select: typing.Optional[typing.List[ontologies_models.SelectedPropertyApiName]] = None, + snapshot: typing.Optional[bool] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.AsyncResourceIterator[ontologies_models.OntologyObjectV2]: + """ + Lists the objects for the given Ontology and interface type. + + Note that this endpoint does not guarantee consistency, unless you use the snapshot flag specified below. Changes to the data could result in missing or + repeated objects in the response pages. + + For Object Storage V1 backed objects, this endpoint returns a maximum of 10,000 objects. After 10,000 objects have been returned and if more objects + are available, attempting to load another page will result in an `ObjectsExceededLimit` error being returned. There is no limit on Object Storage V2 backed objects. + + Each page may be smaller or larger than the requested page size. However, it + is guaranteed that if there are more results available, at least one result will be present + in the response. + + Note that null value properties will not be returned. + + :param ontology: The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. + :type ontology: OntologyIdentifier + :param interface_type: The API name of the interface type. To find the API name, use the **List interface types** endpoint or check the **Ontology Manager**. + :type interface_type: InterfaceTypeApiName + :param branch: The Foundry branch to list objects from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. + :type branch: Optional[FoundryBranch] + :param exclude_rid: A flag to exclude the retrieval of the `__rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2. + :type exclude_rid: Optional[bool] + :param order_by: + :type order_by: Optional[OrderBy] + :param page_size: The desired size of the page to be returned. Defaults to 1,000. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. + :type page_size: Optional[PageSize] + :param page_token: + :type page_token: Optional[PageToken] + :param select: The properties of the interface type that should be included in the response. Omit this parameter to get all the properties. + :type select: Optional[List[SelectedPropertyApiName]] + :param snapshot: A flag to use snapshot consistency when paging. Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. This defaults to false if not specified, which means you will always get the latest results. + :type snapshot: Optional[bool] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.AsyncResourceIterator[ontologies_models.OntologyObjectV2] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/ontologies/{ontology}/interfaces/{interfaceType}", + query_params={ + "branch": branch, + "excludeRid": exclude_rid, + "orderBy": order_by, + "pageSize": page_size, + "pageToken": page_token, + "select": select, + "snapshot": snapshot, + }, + path_params={ + "ontology": ontology, + "interfaceType": interface_type, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.ListObjectsForInterfaceResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def list_outgoing_interface_link_types( + self, + ontology: ontologies_models.OntologyIdentifier, + interface_type: ontologies_models.InterfaceTypeApiName, + *, + branch: typing.Optional[core_models.FoundryBranch] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[ontologies_models.ListOutgoingInterfaceLinkTypesResponse]: + """ + List the outgoing interface link types for an interface type. + + :param ontology: + :type ontology: OntologyIdentifier + :param interface_type: The API name of the interface type. To find the API name, use the **List interface types** endpoint or check the **Ontology Manager** application. + :type interface_type: InterfaceTypeApiName + :param branch: The Foundry branch to get the outgoing link type from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. + :type branch: Optional[FoundryBranch] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[ontologies_models.ListOutgoingInterfaceLinkTypesResponse] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/ontologies/{ontology}/interfaceTypes/{interfaceType}/outgoingLinkTypes", + query_params={ + "branch": branch, + }, + path_params={ + "ontology": ontology, + "interfaceType": interface_type, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.ListOutgoingInterfaceLinkTypesResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def search( + self, + ontology: ontologies_models.OntologyIdentifier, + interface_type: ontologies_models.InterfaceTypeApiName, + *, + augmented_interface_property_types: typing.Dict[ + ontologies_models.InterfaceTypeApiName, + typing.List[ontologies_models.InterfacePropertyApiName], + ], + augmented_properties: typing.Dict[ + ontologies_models.ObjectTypeApiName, typing.List[ontologies_models.PropertyApiName] + ], + augmented_shared_property_types: typing.Dict[ + ontologies_models.InterfaceTypeApiName, + typing.List[ontologies_models.SharedPropertyTypeApiName], + ], + other_interface_types: typing.List[ontologies_models.InterfaceTypeApiName], + selected_interface_property_types: typing.List[ontologies_models.InterfacePropertyApiName], + selected_object_types: typing.List[ontologies_models.ObjectTypeApiName], + selected_shared_property_types: typing.List[ontologies_models.SharedPropertyTypeApiName], + branch: typing.Optional[core_models.FoundryBranch] = None, + order_by: typing.Optional[ontologies_models.SearchOrderByV2] = None, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + where: typing.Optional[ontologies_models.SearchJsonQueryV2] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[ontologies_models.SearchObjectsResponseV2]: + """ + :::callout{theme=warning title=Warning} + This endpoint will be removed once TS OSDK is updated to use `objectSets/loadObjects` with interface object + sets. + ::: + Search for objects in the specified ontology and interface type. Any properties specified in the "where" or + "orderBy" parameters must be shared property type API names defined on the interface. The following search + queries are supported: + + | Query type | Description | Supported Types | + |-----------------------------------------|-------------------------------------------------------------------------------------------------------------------|---------------------------------| + | lt | The provided property is less than the provided value. | number, string, date, timestamp | + | gt | The provided property is greater than the provided value. | number, string, date, timestamp | + | lte | The provided property is less than or equal to the provided value. | number, string, date, timestamp | + | gte | The provided property is greater than or equal to the provided value. | number, string, date, timestamp | + | eq | The provided property is exactly equal to the provided value. | number, string, date, timestamp | + | isNull | The provided property is (or is not) null. | all | + | contains | The provided property contains the provided value. | array | + | not | The sub-query does not match. | N/A (applied on a query) | + | and | All the sub-queries match. | N/A (applied on queries) | + | or | At least one of the sub-queries match. | N/A (applied on queries) | + | startsWith | The provided property starts with the provided term. | string | + | containsAllTermsInOrderPrefixLastTerm | The provided property contains all the terms provided in order. The last term can be a partial prefix match. | string | + | containsAllTermsInOrder | The provided property contains the provided terms as a substring. | string | + | containsAnyTerm | The provided property contains at least one of the terms separated by whitespace. | string | + | containsAllTerms | The provided property contains all the terms separated by whitespace. | string | + + Queries can be at most three levels deep. By default, terms are separated by whitespace or punctuation (`?!,:;-[](){}'"~`). Periods (`.`) on their own are ignored. + Partial terms are not matched by terms filters except where explicitly noted. + + Attempting to use an unsupported query will result in a validation error. Third-party applications using this + endpoint via OAuth2 must request the following operation scope: `api:ontologies-read`. + + :param ontology: + :type ontology: OntologyIdentifier + :param interface_type: The API name of the interface type. To find the API name, use the **List interface types** endpoint or check the **Ontology Manager**. + :type interface_type: InterfaceTypeApiName + :param augmented_interface_property_types: A map from interface type API name to a list of interface property type API names. For each returned object, if the object implements an interface that is a key in the map, then we augment the response for that object type with the list of properties specified in the value. + :type augmented_interface_property_types: Dict[InterfaceTypeApiName, List[InterfacePropertyApiName]] + :param augmented_properties: A map from object type API name to a list of property type API names. For each returned object, if the object’s object type is a key in the map, then we augment the response for that object type with the list of properties specified in the value. + :type augmented_properties: Dict[ObjectTypeApiName, List[PropertyApiName]] + :param augmented_shared_property_types: A map from interface type API name to a list of shared property type API names. For each returned object, if the object implements an interface that is a key in the map, then we augment the response for that object type with the list of properties specified in the value. + :type augmented_shared_property_types: Dict[InterfaceTypeApiName, List[SharedPropertyTypeApiName]] + :param other_interface_types: A list of interface type API names. Object types must implement all the mentioned interfaces in order to be included in the response. + :type other_interface_types: List[InterfaceTypeApiName] + :param selected_interface_property_types: A list of interface property type API names of the interface type that should be included in the response. Omit this parameter to include all properties of the interface type in the response. + :type selected_interface_property_types: List[InterfacePropertyApiName] + :param selected_object_types: A list of object type API names that should be included in the response. If non-empty, object types that are not mentioned will not be included in the response even if they implement the specified interface. Omit the parameter to include all object types. + :type selected_object_types: List[ObjectTypeApiName] + :param selected_shared_property_types: A list of shared property type API names of the interface type that should be included in the response. Omit this parameter to include all properties of the interface type in the response. + :type selected_shared_property_types: List[SharedPropertyTypeApiName] + :param branch: The Foundry branch to search objects from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. + :type branch: Optional[FoundryBranch] + :param order_by: + :type order_by: Optional[SearchOrderByV2] + :param page_size: + :type page_size: Optional[PageSize] + :param page_token: + :type page_token: Optional[PageToken] + :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. + :type preview: Optional[PreviewMode] + :param where: + :type where: Optional[SearchJsonQueryV2] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[ontologies_models.SearchObjectsResponseV2] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/ontologies/{ontology}/interfaces/{interfaceType}/search", + query_params={ + "branch": branch, + "preview": preview, + }, + path_params={ + "ontology": ontology, + "interfaceType": interface_type, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=ontologies_models.SearchObjectsForInterfaceRequest( + where=where, + order_by=order_by, + augmented_properties=augmented_properties, + augmented_shared_property_types=augmented_shared_property_types, + augmented_interface_property_types=augmented_interface_property_types, + selected_shared_property_types=selected_shared_property_types, + selected_interface_property_types=selected_interface_property_types, + selected_object_types=selected_object_types, + other_interface_types=other_interface_types, + page_size=page_size, + page_token=page_token, + ), + response_type=ontologies_models.SearchObjectsResponseV2, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _AsyncOntologyInterfaceClientRaw: + def __init__(self, client: AsyncOntologyInterfaceClient) -> None: + def aggregate(_: ontologies_models.AggregateObjectsResponseV2): ... + def get(_: ontologies_models.InterfaceType): ... + def get_outgoing_interface_link_type(_: ontologies_models.InterfaceLinkType): ... + def list(_: ontologies_models.ListInterfaceTypesResponse): ... + def list_interface_linked_objects( + _: ontologies_models.ListInterfaceLinkedObjectsResponse, + ): ... + def list_objects_for_interface(_: ontologies_models.ListObjectsForInterfaceResponse): ... + def list_outgoing_interface_link_types( + _: ontologies_models.ListOutgoingInterfaceLinkTypesResponse, + ): ... + def search(_: ontologies_models.SearchObjectsResponseV2): ... + + self.aggregate = core.async_with_raw_response(aggregate, client.aggregate) + self.get = core.async_with_raw_response(get, client.get) + self.get_outgoing_interface_link_type = core.async_with_raw_response( + get_outgoing_interface_link_type, client.get_outgoing_interface_link_type + ) + self.list = core.async_with_raw_response(list, client.list) + self.list_interface_linked_objects = core.async_with_raw_response( + list_interface_linked_objects, client.list_interface_linked_objects + ) + self.list_objects_for_interface = core.async_with_raw_response( + list_objects_for_interface, client.list_objects_for_interface + ) + self.list_outgoing_interface_link_types = core.async_with_raw_response( + list_outgoing_interface_link_types, client.list_outgoing_interface_link_types + ) + self.search = core.async_with_raw_response(search, client.search) + + +class _AsyncOntologyInterfaceClientStreaming: + def __init__(self, client: AsyncOntologyInterfaceClient) -> None: + def aggregate(_: ontologies_models.AggregateObjectsResponseV2): ... + def get(_: ontologies_models.InterfaceType): ... + def get_outgoing_interface_link_type(_: ontologies_models.InterfaceLinkType): ... + def list(_: ontologies_models.ListInterfaceTypesResponse): ... + def list_interface_linked_objects( + _: ontologies_models.ListInterfaceLinkedObjectsResponse, + ): ... + def list_objects_for_interface(_: ontologies_models.ListObjectsForInterfaceResponse): ... + def list_outgoing_interface_link_types( + _: ontologies_models.ListOutgoingInterfaceLinkTypesResponse, + ): ... + def search(_: ontologies_models.SearchObjectsResponseV2): ... + + self.aggregate = core.async_with_streaming_response(aggregate, client.aggregate) + self.get = core.async_with_streaming_response(get, client.get) + self.get_outgoing_interface_link_type = core.async_with_streaming_response( + get_outgoing_interface_link_type, client.get_outgoing_interface_link_type + ) + self.list = core.async_with_streaming_response(list, client.list) + self.list_interface_linked_objects = core.async_with_streaming_response( + list_interface_linked_objects, client.list_interface_linked_objects + ) + self.list_objects_for_interface = core.async_with_streaming_response( + list_objects_for_interface, client.list_objects_for_interface + ) + self.list_outgoing_interface_link_types = core.async_with_streaming_response( + list_outgoing_interface_link_types, client.list_outgoing_interface_link_types + ) + self.search = core.async_with_streaming_response(search, client.search) diff --git a/foundry_sdk/v2/ontologies/ontology_object.py b/foundry_sdk/v2/ontologies/ontology_object.py new file mode 100644 index 000000000..d162fbfc6 --- /dev/null +++ b/foundry_sdk/v2/ontologies/ontology_object.py @@ -0,0 +1,945 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing + +import pydantic + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v2.core import models as core_models +from foundry_sdk.v2.ontologies import models as ontologies_models + + +class OntologyObjectClient: + """ + The API client for the OntologyObject Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _OntologyObjectClientStreaming(self) + self.with_raw_response = _OntologyObjectClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def aggregate( + self, + ontology: ontologies_models.OntologyIdentifier, + object_type: ontologies_models.ObjectTypeApiName, + *, + aggregation: typing.List[ontologies_models.AggregationV2], + group_by: typing.List[ontologies_models.AggregationGroupByV2], + accuracy: typing.Optional[ontologies_models.AggregationAccuracyRequest] = None, + branch: typing.Optional[core_models.FoundryBranch] = None, + sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, + sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, + where: typing.Optional[ontologies_models.SearchJsonQueryV2] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> ontologies_models.AggregateObjectsResponseV2: + """ + Perform functions on object fields in the specified ontology and object type. + + :param ontology: + :type ontology: OntologyIdentifier + :param object_type: The type of the object to aggregate on. + :type object_type: ObjectTypeApiName + :param aggregation: + :type aggregation: List[AggregationV2] + :param group_by: + :type group_by: List[AggregationGroupByV2] + :param accuracy: + :type accuracy: Optional[AggregationAccuracyRequest] + :param branch: The Foundry branch to aggregate objects from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. + :type branch: Optional[FoundryBranch] + :param sdk_package_rid: The package rid of the generated SDK. + :type sdk_package_rid: Optional[SdkPackageRid] + :param sdk_version: The version of the generated SDK. + :type sdk_version: Optional[SdkVersion] + :param where: + :type where: Optional[SearchJsonQueryV2] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: ontologies_models.AggregateObjectsResponseV2 + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/ontologies/{ontology}/objects/{objectType}/aggregate", + query_params={ + "branch": branch, + "sdkPackageRid": sdk_package_rid, + "sdkVersion": sdk_version, + }, + path_params={ + "ontology": ontology, + "objectType": object_type, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=ontologies_models.AggregateObjectsRequestV2( + aggregation=aggregation, + where=where, + group_by=group_by, + accuracy=accuracy, + ), + response_type=ontologies_models.AggregateObjectsResponseV2, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def count( + self, + ontology: ontologies_models.OntologyIdentifier, + object_type: ontologies_models.ObjectTypeApiName, + *, + branch: typing.Optional[core_models.FoundryBranch] = None, + sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, + sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> ontologies_models.CountObjectsResponseV2: + """ + Returns a count of the objects of the given object type. + + :param ontology: + :type ontology: OntologyIdentifier + :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. + :type object_type: ObjectTypeApiName + :param branch: The Foundry branch to count the objects from. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported. + :type branch: Optional[FoundryBranch] + :param sdk_package_rid: The package rid of the generated SDK. + :type sdk_package_rid: Optional[SdkPackageRid] + :param sdk_version: The package version of the generated SDK. + :type sdk_version: Optional[SdkVersion] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: ontologies_models.CountObjectsResponseV2 + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/ontologies/{ontology}/objects/{objectType}/count", + query_params={ + "branch": branch, + "sdkPackageRid": sdk_package_rid, + "sdkVersion": sdk_version, + }, + path_params={ + "ontology": ontology, + "objectType": object_type, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.CountObjectsResponseV2, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + ontology: ontologies_models.OntologyIdentifier, + object_type: ontologies_models.ObjectTypeApiName, + primary_key: ontologies_models.PropertyValueEscapedString, + *, + branch: typing.Optional[core_models.FoundryBranch] = None, + exclude_rid: typing.Optional[bool] = None, + sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, + sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, + select: typing.Optional[typing.List[ontologies_models.SelectedPropertyApiName]] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> ontologies_models.OntologyObjectV2: + """ + Gets a specific object with the given primary key. + + :param ontology: + :type ontology: OntologyIdentifier + :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. + :type object_type: ObjectTypeApiName + :param primary_key: The primary key of the requested object. To look up the expected primary key for your object type, use the `Get object type` endpoint or the **Ontology Manager**. + :type primary_key: PropertyValueEscapedString + :param branch: The Foundry branch to get the object from. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported. + :type branch: Optional[FoundryBranch] + :param exclude_rid: A flag to exclude the retrieval of the `__rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2. + :type exclude_rid: Optional[bool] + :param sdk_package_rid: The package rid of the generated SDK. + :type sdk_package_rid: Optional[SdkPackageRid] + :param sdk_version: The version of the generated SDK. + :type sdk_version: Optional[SdkVersion] + :param select: The properties of the object type that should be included in the response. Omit this parameter to get all the properties. + :type select: Optional[List[SelectedPropertyApiName]] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: ontologies_models.OntologyObjectV2 + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}", + query_params={ + "branch": branch, + "excludeRid": exclude_rid, + "sdkPackageRid": sdk_package_rid, + "sdkVersion": sdk_version, + "select": select, + }, + path_params={ + "ontology": ontology, + "objectType": object_type, + "primaryKey": primary_key, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.OntologyObjectV2, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def list( + self, + ontology: ontologies_models.OntologyIdentifier, + object_type: ontologies_models.ObjectTypeApiName, + *, + branch: typing.Optional[core_models.FoundryBranch] = None, + exclude_rid: typing.Optional[bool] = None, + order_by: typing.Optional[ontologies_models.OrderBy] = None, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, + sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, + select: typing.Optional[typing.List[ontologies_models.SelectedPropertyApiName]] = None, + snapshot: typing.Optional[bool] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.ResourceIterator[ontologies_models.OntologyObjectV2]: + """ + Lists the objects for the given Ontology and object type. + + Note that this endpoint does not guarantee consistency. Changes to the data could result in missing or + repeated objects in the response pages. + + For Object Storage V1 backed objects, this endpoint returns a maximum of 10,000 objects. After 10,000 objects have been returned and if more objects + are available, attempting to load another page will result in an `ObjectsExceededLimit` error being returned. There is no limit on Object Storage V2 backed objects. + + Each page may be smaller or larger than the requested page size. However, it + is guaranteed that if there are more results available, at least one result will be present + in the response. + + Note that null value properties will not be returned. + + :param ontology: + :type ontology: OntologyIdentifier + :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. + :type object_type: ObjectTypeApiName + :param branch: The Foundry branch to list objects from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. + :type branch: Optional[FoundryBranch] + :param exclude_rid: A flag to exclude the retrieval of the `__rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2. + :type exclude_rid: Optional[bool] + :param order_by: + :type order_by: Optional[OrderBy] + :param page_size: The desired size of the page to be returned. Defaults to 1,000. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. + :type page_size: Optional[PageSize] + :param page_token: + :type page_token: Optional[PageToken] + :param sdk_package_rid: The package rid of the generated SDK. + :type sdk_package_rid: Optional[SdkPackageRid] + :param sdk_version: The version of the generated SDK. + :type sdk_version: Optional[SdkVersion] + :param select: The properties of the object type that should be included in the response. Omit this parameter to get all the properties. + :type select: Optional[List[SelectedPropertyApiName]] + :param snapshot: A flag to use snapshot consistency when paging. Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. This defaults to false if not specified, which means you will always get the latest results. + :type snapshot: Optional[bool] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.ResourceIterator[ontologies_models.OntologyObjectV2] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/ontologies/{ontology}/objects/{objectType}", + query_params={ + "branch": branch, + "excludeRid": exclude_rid, + "orderBy": order_by, + "pageSize": page_size, + "pageToken": page_token, + "sdkPackageRid": sdk_package_rid, + "sdkVersion": sdk_version, + "select": select, + "snapshot": snapshot, + }, + path_params={ + "ontology": ontology, + "objectType": object_type, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.ListObjectsResponseV2, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def search( + self, + ontology: ontologies_models.OntologyIdentifier, + object_type: ontologies_models.ObjectTypeApiName, + *, + select: typing.List[ontologies_models.PropertyApiName], + select_v2: typing.Optional[typing.List[ontologies_models.PropertyIdentifier]] = None, + branch: typing.Optional[core_models.FoundryBranch] = None, + exclude_rid: typing.Optional[bool] = None, + order_by: typing.Optional[ontologies_models.SearchOrderByV2] = None, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, + sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, + snapshot: typing.Optional[bool] = None, + where: typing.Optional[ontologies_models.SearchJsonQueryV2] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> ontologies_models.SearchObjectsResponseV2: + """ + Search for objects in the specified ontology and object type. The request body is used + to filter objects based on the specified query. The supported queries are: + + | Query type | Description | Supported Types | + |-----------------------------------------|-------------------------------------------------------------------------------------------------------------------|---------------------------------| + | lt | The provided property is less than the provided value. | number, string, date, timestamp | + | gt | The provided property is greater than the provided value. | number, string, date, timestamp | + | lte | The provided property is less than or equal to the provided value. | number, string, date, timestamp | + | gte | The provided property is greater than or equal to the provided value. | number, string, date, timestamp | + | eq | The provided property is exactly equal to the provided value. | number, string, date, timestamp | + | isNull | The provided property is (or is not) null. | all | + | contains | The provided property contains the provided value. | array | + | not | The sub-query does not match. | N/A (applied on a query) | + | and | All the sub-queries match. | N/A (applied on queries) | + | or | At least one of the sub-queries match. | N/A (applied on queries) | + | containsAllTermsInOrderPrefixLastTerm | The provided property contains all the terms provided in order. The last term can be a partial prefix match. | string | + | containsAllTermsInOrder | The provided property contains the provided term as a substring. | string | + | containsAnyTerm | The provided property contains at least one of the terms separated by whitespace. | string | + | containsAllTerms | The provided property contains all the terms separated by whitespace. | string | + | startsWith | Deprecated alias for containsAllTermsInOrderPrefixLastTerm. | string | + + Queries can be at most three levels deep. By default, terms are separated by whitespace or punctuation (`?!,:;-[](){}'"~`). Periods (`.`) on their own are ignored. + Partial terms are not matched by terms filters except where explicitly noted. + + :param ontology: + :type ontology: OntologyIdentifier + :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. + :type object_type: ObjectTypeApiName + :param select: The API names of the object type properties to include in the response. + :type select: List[PropertyApiName] + :param select_v2: The identifiers of the properties to include in the response. Only selectV2 or select should be populated, but not both. + :type select_v2: Optional[List[PropertyIdentifier]] + :param branch: The Foundry branch to search objects from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. + :type branch: Optional[FoundryBranch] + :param exclude_rid: A flag to exclude the retrieval of the `__rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2. + :type exclude_rid: Optional[bool] + :param order_by: + :type order_by: Optional[SearchOrderByV2] + :param page_size: + :type page_size: Optional[PageSize] + :param page_token: + :type page_token: Optional[PageToken] + :param sdk_package_rid: The package rid of the generated SDK. + :type sdk_package_rid: Optional[SdkPackageRid] + :param sdk_version: The version of the generated SDK. + :type sdk_version: Optional[SdkVersion] + :param snapshot: A flag to use snapshot consistency when paging. Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. This defaults to false if not specified, which means you will always get the latest results. + :type snapshot: Optional[bool] + :param where: + :type where: Optional[SearchJsonQueryV2] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: ontologies_models.SearchObjectsResponseV2 + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/ontologies/{ontology}/objects/{objectType}/search", + query_params={ + "branch": branch, + "sdkPackageRid": sdk_package_rid, + "sdkVersion": sdk_version, + }, + path_params={ + "ontology": ontology, + "objectType": object_type, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=ontologies_models.SearchObjectsRequestV2( + where=where, + order_by=order_by, + page_size=page_size, + page_token=page_token, + select=select, + select_v2=select_v2, + exclude_rid=exclude_rid, + snapshot=snapshot, + ), + response_type=ontologies_models.SearchObjectsResponseV2, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _OntologyObjectClientRaw: + def __init__(self, client: OntologyObjectClient) -> None: + def aggregate(_: ontologies_models.AggregateObjectsResponseV2): ... + def count(_: ontologies_models.CountObjectsResponseV2): ... + def get(_: ontologies_models.OntologyObjectV2): ... + def list(_: ontologies_models.ListObjectsResponseV2): ... + def search(_: ontologies_models.SearchObjectsResponseV2): ... + + self.aggregate = core.with_raw_response(aggregate, client.aggregate) + self.count = core.with_raw_response(count, client.count) + self.get = core.with_raw_response(get, client.get) + self.list = core.with_raw_response(list, client.list) + self.search = core.with_raw_response(search, client.search) + + +class _OntologyObjectClientStreaming: + def __init__(self, client: OntologyObjectClient) -> None: + def aggregate(_: ontologies_models.AggregateObjectsResponseV2): ... + def count(_: ontologies_models.CountObjectsResponseV2): ... + def get(_: ontologies_models.OntologyObjectV2): ... + def list(_: ontologies_models.ListObjectsResponseV2): ... + def search(_: ontologies_models.SearchObjectsResponseV2): ... + + self.aggregate = core.with_streaming_response(aggregate, client.aggregate) + self.count = core.with_streaming_response(count, client.count) + self.get = core.with_streaming_response(get, client.get) + self.list = core.with_streaming_response(list, client.list) + self.search = core.with_streaming_response(search, client.search) + + +class AsyncOntologyObjectClient: + """ + The API client for the OntologyObject Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncOntologyObjectClientStreaming(self) + self.with_raw_response = _AsyncOntologyObjectClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def aggregate( + self, + ontology: ontologies_models.OntologyIdentifier, + object_type: ontologies_models.ObjectTypeApiName, + *, + aggregation: typing.List[ontologies_models.AggregationV2], + group_by: typing.List[ontologies_models.AggregationGroupByV2], + accuracy: typing.Optional[ontologies_models.AggregationAccuracyRequest] = None, + branch: typing.Optional[core_models.FoundryBranch] = None, + sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, + sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, + where: typing.Optional[ontologies_models.SearchJsonQueryV2] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[ontologies_models.AggregateObjectsResponseV2]: + """ + Perform functions on object fields in the specified ontology and object type. + + :param ontology: + :type ontology: OntologyIdentifier + :param object_type: The type of the object to aggregate on. + :type object_type: ObjectTypeApiName + :param aggregation: + :type aggregation: List[AggregationV2] + :param group_by: + :type group_by: List[AggregationGroupByV2] + :param accuracy: + :type accuracy: Optional[AggregationAccuracyRequest] + :param branch: The Foundry branch to aggregate objects from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. + :type branch: Optional[FoundryBranch] + :param sdk_package_rid: The package rid of the generated SDK. + :type sdk_package_rid: Optional[SdkPackageRid] + :param sdk_version: The version of the generated SDK. + :type sdk_version: Optional[SdkVersion] + :param where: + :type where: Optional[SearchJsonQueryV2] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[ontologies_models.AggregateObjectsResponseV2] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/ontologies/{ontology}/objects/{objectType}/aggregate", + query_params={ + "branch": branch, + "sdkPackageRid": sdk_package_rid, + "sdkVersion": sdk_version, + }, + path_params={ + "ontology": ontology, + "objectType": object_type, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=ontologies_models.AggregateObjectsRequestV2( + aggregation=aggregation, + where=where, + group_by=group_by, + accuracy=accuracy, + ), + response_type=ontologies_models.AggregateObjectsResponseV2, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def count( + self, + ontology: ontologies_models.OntologyIdentifier, + object_type: ontologies_models.ObjectTypeApiName, + *, + branch: typing.Optional[core_models.FoundryBranch] = None, + sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, + sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[ontologies_models.CountObjectsResponseV2]: + """ + Returns a count of the objects of the given object type. + + :param ontology: + :type ontology: OntologyIdentifier + :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. + :type object_type: ObjectTypeApiName + :param branch: The Foundry branch to count the objects from. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported. + :type branch: Optional[FoundryBranch] + :param sdk_package_rid: The package rid of the generated SDK. + :type sdk_package_rid: Optional[SdkPackageRid] + :param sdk_version: The package version of the generated SDK. + :type sdk_version: Optional[SdkVersion] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[ontologies_models.CountObjectsResponseV2] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/ontologies/{ontology}/objects/{objectType}/count", + query_params={ + "branch": branch, + "sdkPackageRid": sdk_package_rid, + "sdkVersion": sdk_version, + }, + path_params={ + "ontology": ontology, + "objectType": object_type, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.CountObjectsResponseV2, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + ontology: ontologies_models.OntologyIdentifier, + object_type: ontologies_models.ObjectTypeApiName, + primary_key: ontologies_models.PropertyValueEscapedString, + *, + branch: typing.Optional[core_models.FoundryBranch] = None, + exclude_rid: typing.Optional[bool] = None, + sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, + sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, + select: typing.Optional[typing.List[ontologies_models.SelectedPropertyApiName]] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[ontologies_models.OntologyObjectV2]: + """ + Gets a specific object with the given primary key. + + :param ontology: + :type ontology: OntologyIdentifier + :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. + :type object_type: ObjectTypeApiName + :param primary_key: The primary key of the requested object. To look up the expected primary key for your object type, use the `Get object type` endpoint or the **Ontology Manager**. + :type primary_key: PropertyValueEscapedString + :param branch: The Foundry branch to get the object from. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported. + :type branch: Optional[FoundryBranch] + :param exclude_rid: A flag to exclude the retrieval of the `__rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2. + :type exclude_rid: Optional[bool] + :param sdk_package_rid: The package rid of the generated SDK. + :type sdk_package_rid: Optional[SdkPackageRid] + :param sdk_version: The version of the generated SDK. + :type sdk_version: Optional[SdkVersion] + :param select: The properties of the object type that should be included in the response. Omit this parameter to get all the properties. + :type select: Optional[List[SelectedPropertyApiName]] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[ontologies_models.OntologyObjectV2] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}", + query_params={ + "branch": branch, + "excludeRid": exclude_rid, + "sdkPackageRid": sdk_package_rid, + "sdkVersion": sdk_version, + "select": select, + }, + path_params={ + "ontology": ontology, + "objectType": object_type, + "primaryKey": primary_key, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.OntologyObjectV2, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def list( + self, + ontology: ontologies_models.OntologyIdentifier, + object_type: ontologies_models.ObjectTypeApiName, + *, + branch: typing.Optional[core_models.FoundryBranch] = None, + exclude_rid: typing.Optional[bool] = None, + order_by: typing.Optional[ontologies_models.OrderBy] = None, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, + sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, + select: typing.Optional[typing.List[ontologies_models.SelectedPropertyApiName]] = None, + snapshot: typing.Optional[bool] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.AsyncResourceIterator[ontologies_models.OntologyObjectV2]: + """ + Lists the objects for the given Ontology and object type. + + Note that this endpoint does not guarantee consistency. Changes to the data could result in missing or + repeated objects in the response pages. + + For Object Storage V1 backed objects, this endpoint returns a maximum of 10,000 objects. After 10,000 objects have been returned and if more objects + are available, attempting to load another page will result in an `ObjectsExceededLimit` error being returned. There is no limit on Object Storage V2 backed objects. + + Each page may be smaller or larger than the requested page size. However, it + is guaranteed that if there are more results available, at least one result will be present + in the response. + + Note that null value properties will not be returned. + + :param ontology: + :type ontology: OntologyIdentifier + :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. + :type object_type: ObjectTypeApiName + :param branch: The Foundry branch to list objects from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. + :type branch: Optional[FoundryBranch] + :param exclude_rid: A flag to exclude the retrieval of the `__rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2. + :type exclude_rid: Optional[bool] + :param order_by: + :type order_by: Optional[OrderBy] + :param page_size: The desired size of the page to be returned. Defaults to 1,000. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. + :type page_size: Optional[PageSize] + :param page_token: + :type page_token: Optional[PageToken] + :param sdk_package_rid: The package rid of the generated SDK. + :type sdk_package_rid: Optional[SdkPackageRid] + :param sdk_version: The version of the generated SDK. + :type sdk_version: Optional[SdkVersion] + :param select: The properties of the object type that should be included in the response. Omit this parameter to get all the properties. + :type select: Optional[List[SelectedPropertyApiName]] + :param snapshot: A flag to use snapshot consistency when paging. Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. This defaults to false if not specified, which means you will always get the latest results. + :type snapshot: Optional[bool] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.AsyncResourceIterator[ontologies_models.OntologyObjectV2] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/ontologies/{ontology}/objects/{objectType}", + query_params={ + "branch": branch, + "excludeRid": exclude_rid, + "orderBy": order_by, + "pageSize": page_size, + "pageToken": page_token, + "sdkPackageRid": sdk_package_rid, + "sdkVersion": sdk_version, + "select": select, + "snapshot": snapshot, + }, + path_params={ + "ontology": ontology, + "objectType": object_type, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.ListObjectsResponseV2, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def search( + self, + ontology: ontologies_models.OntologyIdentifier, + object_type: ontologies_models.ObjectTypeApiName, + *, + select: typing.List[ontologies_models.PropertyApiName], + select_v2: typing.Optional[typing.List[ontologies_models.PropertyIdentifier]] = None, + branch: typing.Optional[core_models.FoundryBranch] = None, + exclude_rid: typing.Optional[bool] = None, + order_by: typing.Optional[ontologies_models.SearchOrderByV2] = None, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, + sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, + snapshot: typing.Optional[bool] = None, + where: typing.Optional[ontologies_models.SearchJsonQueryV2] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[ontologies_models.SearchObjectsResponseV2]: + """ + Search for objects in the specified ontology and object type. The request body is used + to filter objects based on the specified query. The supported queries are: + + | Query type | Description | Supported Types | + |-----------------------------------------|-------------------------------------------------------------------------------------------------------------------|---------------------------------| + | lt | The provided property is less than the provided value. | number, string, date, timestamp | + | gt | The provided property is greater than the provided value. | number, string, date, timestamp | + | lte | The provided property is less than or equal to the provided value. | number, string, date, timestamp | + | gte | The provided property is greater than or equal to the provided value. | number, string, date, timestamp | + | eq | The provided property is exactly equal to the provided value. | number, string, date, timestamp | + | isNull | The provided property is (or is not) null. | all | + | contains | The provided property contains the provided value. | array | + | not | The sub-query does not match. | N/A (applied on a query) | + | and | All the sub-queries match. | N/A (applied on queries) | + | or | At least one of the sub-queries match. | N/A (applied on queries) | + | containsAllTermsInOrderPrefixLastTerm | The provided property contains all the terms provided in order. The last term can be a partial prefix match. | string | + | containsAllTermsInOrder | The provided property contains the provided term as a substring. | string | + | containsAnyTerm | The provided property contains at least one of the terms separated by whitespace. | string | + | containsAllTerms | The provided property contains all the terms separated by whitespace. | string | + | startsWith | Deprecated alias for containsAllTermsInOrderPrefixLastTerm. | string | + + Queries can be at most three levels deep. By default, terms are separated by whitespace or punctuation (`?!,:;-[](){}'"~`). Periods (`.`) on their own are ignored. + Partial terms are not matched by terms filters except where explicitly noted. + + :param ontology: + :type ontology: OntologyIdentifier + :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. + :type object_type: ObjectTypeApiName + :param select: The API names of the object type properties to include in the response. + :type select: List[PropertyApiName] + :param select_v2: The identifiers of the properties to include in the response. Only selectV2 or select should be populated, but not both. + :type select_v2: Optional[List[PropertyIdentifier]] + :param branch: The Foundry branch to search objects from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. + :type branch: Optional[FoundryBranch] + :param exclude_rid: A flag to exclude the retrieval of the `__rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2. + :type exclude_rid: Optional[bool] + :param order_by: + :type order_by: Optional[SearchOrderByV2] + :param page_size: + :type page_size: Optional[PageSize] + :param page_token: + :type page_token: Optional[PageToken] + :param sdk_package_rid: The package rid of the generated SDK. + :type sdk_package_rid: Optional[SdkPackageRid] + :param sdk_version: The version of the generated SDK. + :type sdk_version: Optional[SdkVersion] + :param snapshot: A flag to use snapshot consistency when paging. Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. This defaults to false if not specified, which means you will always get the latest results. + :type snapshot: Optional[bool] + :param where: + :type where: Optional[SearchJsonQueryV2] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[ontologies_models.SearchObjectsResponseV2] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/ontologies/{ontology}/objects/{objectType}/search", + query_params={ + "branch": branch, + "sdkPackageRid": sdk_package_rid, + "sdkVersion": sdk_version, + }, + path_params={ + "ontology": ontology, + "objectType": object_type, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=ontologies_models.SearchObjectsRequestV2( + where=where, + order_by=order_by, + page_size=page_size, + page_token=page_token, + select=select, + select_v2=select_v2, + exclude_rid=exclude_rid, + snapshot=snapshot, + ), + response_type=ontologies_models.SearchObjectsResponseV2, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _AsyncOntologyObjectClientRaw: + def __init__(self, client: AsyncOntologyObjectClient) -> None: + def aggregate(_: ontologies_models.AggregateObjectsResponseV2): ... + def count(_: ontologies_models.CountObjectsResponseV2): ... + def get(_: ontologies_models.OntologyObjectV2): ... + def list(_: ontologies_models.ListObjectsResponseV2): ... + def search(_: ontologies_models.SearchObjectsResponseV2): ... + + self.aggregate = core.async_with_raw_response(aggregate, client.aggregate) + self.count = core.async_with_raw_response(count, client.count) + self.get = core.async_with_raw_response(get, client.get) + self.list = core.async_with_raw_response(list, client.list) + self.search = core.async_with_raw_response(search, client.search) + + +class _AsyncOntologyObjectClientStreaming: + def __init__(self, client: AsyncOntologyObjectClient) -> None: + def aggregate(_: ontologies_models.AggregateObjectsResponseV2): ... + def count(_: ontologies_models.CountObjectsResponseV2): ... + def get(_: ontologies_models.OntologyObjectV2): ... + def list(_: ontologies_models.ListObjectsResponseV2): ... + def search(_: ontologies_models.SearchObjectsResponseV2): ... + + self.aggregate = core.async_with_streaming_response(aggregate, client.aggregate) + self.count = core.async_with_streaming_response(count, client.count) + self.get = core.async_with_streaming_response(get, client.get) + self.list = core.async_with_streaming_response(list, client.list) + self.search = core.async_with_streaming_response(search, client.search) diff --git a/foundry_sdk/v2/ontologies/ontology_object_set.py b/foundry_sdk/v2/ontologies/ontology_object_set.py new file mode 100644 index 000000000..4ac4224f9 --- /dev/null +++ b/foundry_sdk/v2/ontologies/ontology_object_set.py @@ -0,0 +1,1353 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing + +import pydantic + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v2.core import models as core_models +from foundry_sdk.v2.ontologies import models as ontologies_models + + +class OntologyObjectSetClient: + """ + The API client for the OntologyObjectSet Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _OntologyObjectSetClientStreaming(self) + self.with_raw_response = _OntologyObjectSetClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def aggregate( + self, + ontology: ontologies_models.OntologyIdentifier, + *, + aggregation: typing.List[ontologies_models.AggregationV2], + group_by: typing.List[ontologies_models.AggregationGroupByV2], + object_set: ontologies_models.ObjectSet, + accuracy: typing.Optional[ontologies_models.AggregationAccuracyRequest] = None, + branch: typing.Optional[core_models.FoundryBranch] = None, + include_compute_usage: typing.Optional[core_models.IncludeComputeUsage] = None, + sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, + sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, + transaction_id: typing.Optional[ontologies_models.OntologyTransactionId] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> ontologies_models.AggregateObjectsResponseV2: + """ + Aggregates the ontology objects present in the `ObjectSet` from the provided object set definition. + + :param ontology: + :type ontology: OntologyIdentifier + :param aggregation: + :type aggregation: List[AggregationV2] + :param group_by: + :type group_by: List[AggregationGroupByV2] + :param object_set: + :type object_set: ObjectSet + :param accuracy: + :type accuracy: Optional[AggregationAccuracyRequest] + :param branch: The Foundry branch to aggregate the objects from. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported. + :type branch: Optional[FoundryBranch] + :param include_compute_usage: + :type include_compute_usage: Optional[IncludeComputeUsage] + :param sdk_package_rid: The package rid of the generated SDK. + :type sdk_package_rid: Optional[SdkPackageRid] + :param sdk_version: The package version of the generated SDK. + :type sdk_version: Optional[SdkVersion] + :param transaction_id: The ID of an Ontology transaction to read from. Transactions are an experimental feature and all workflows may not be supported. + :type transaction_id: Optional[OntologyTransactionId] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: ontologies_models.AggregateObjectsResponseV2 + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/ontologies/{ontology}/objectSets/aggregate", + query_params={ + "branch": branch, + "sdkPackageRid": sdk_package_rid, + "sdkVersion": sdk_version, + "transactionId": transaction_id, + }, + path_params={ + "ontology": ontology, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=ontologies_models.AggregateObjectSetRequestV2( + aggregation=aggregation, + object_set=object_set, + group_by=group_by, + accuracy=accuracy, + include_compute_usage=include_compute_usage, + ), + response_type=ontologies_models.AggregateObjectsResponseV2, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def create_temporary( + self, + ontology: ontologies_models.OntologyIdentifier, + *, + object_set: ontologies_models.ObjectSet, + sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, + sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> ontologies_models.CreateTemporaryObjectSetResponseV2: + """ + Creates a temporary `ObjectSet` from the given definition. This `ObjectSet` expires after one hour. + + :param ontology: + :type ontology: OntologyIdentifier + :param object_set: + :type object_set: ObjectSet + :param sdk_package_rid: The package rid of the generated SDK. + :type sdk_package_rid: Optional[SdkPackageRid] + :param sdk_version: The package version of the generated SDK. + :type sdk_version: Optional[SdkVersion] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: ontologies_models.CreateTemporaryObjectSetResponseV2 + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/ontologies/{ontology}/objectSets/createTemporary", + query_params={ + "sdkPackageRid": sdk_package_rid, + "sdkVersion": sdk_version, + }, + path_params={ + "ontology": ontology, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=ontologies_models.CreateTemporaryObjectSetRequestV2( + object_set=object_set, + ), + response_type=ontologies_models.CreateTemporaryObjectSetResponseV2, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + ontology: ontologies_models.OntologyIdentifier, + object_set_rid: ontologies_models.ObjectSetRid, + *, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> ontologies_models.ObjectSet: + """ + Gets the definition of the `ObjectSet` with the given RID. + + :param ontology: + :type ontology: OntologyIdentifier + :param object_set_rid: The RID of the object set. + :type object_set_rid: ObjectSetRid + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: ontologies_models.ObjectSet + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/ontologies/{ontology}/objectSets/{objectSetRid}", + query_params={}, + path_params={ + "ontology": ontology, + "objectSetRid": object_set_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.ObjectSet, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def load( + self, + ontology: ontologies_models.OntologyIdentifier, + *, + object_set: ontologies_models.ObjectSet, + select: typing.List[ontologies_models.SelectedPropertyApiName], + select_v2: typing.Optional[typing.List[ontologies_models.PropertyIdentifier]] = None, + branch: typing.Optional[core_models.FoundryBranch] = None, + exclude_rid: typing.Optional[bool] = None, + include_compute_usage: typing.Optional[core_models.IncludeComputeUsage] = None, + order_by: typing.Optional[ontologies_models.SearchOrderByV2] = None, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, + sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, + snapshot: typing.Optional[bool] = None, + transaction_id: typing.Optional[ontologies_models.OntologyTransactionId] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> ontologies_models.LoadObjectSetResponseV2: + """ + Load the ontology objects present in the `ObjectSet` from the provided object set definition. + + For Object Storage V1 backed objects, this endpoint returns a maximum of 10,000 objects. After 10,000 objects have been returned and if more objects + are available, attempting to load another page will result in an `ObjectsExceededLimit` error being returned. There is no limit on Object Storage V2 backed objects. + + Note that null value properties will not be returned. + + Vector properties will not be returned unless included in the `select` parameter. + + :param ontology: + :type ontology: OntologyIdentifier + :param object_set: + :type object_set: ObjectSet + :param select: + :type select: List[SelectedPropertyApiName] + :param select_v2: The identifiers of the properties to include in the response. Only selectV2 or select should be populated, but not both. + :type select_v2: Optional[List[PropertyIdentifier]] + :param branch: The Foundry branch to load the object set from. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported. + :type branch: Optional[FoundryBranch] + :param exclude_rid: A flag to exclude the retrieval of the `__rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2. + :type exclude_rid: Optional[bool] + :param include_compute_usage: + :type include_compute_usage: Optional[IncludeComputeUsage] + :param order_by: + :type order_by: Optional[SearchOrderByV2] + :param page_size: + :type page_size: Optional[PageSize] + :param page_token: + :type page_token: Optional[PageToken] + :param sdk_package_rid: The package rid of the generated SDK. + :type sdk_package_rid: Optional[SdkPackageRid] + :param sdk_version: The package version of the generated SDK. + :type sdk_version: Optional[SdkVersion] + :param snapshot: A flag to use snapshot consistency when paging. Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. This defaults to false if not specified, which means you will always get the latest results. + :type snapshot: Optional[bool] + :param transaction_id: The ID of an Ontology transaction to read from. Transactions are an experimental feature and all workflows may not be supported. + :type transaction_id: Optional[OntologyTransactionId] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: ontologies_models.LoadObjectSetResponseV2 + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/ontologies/{ontology}/objectSets/loadObjects", + query_params={ + "branch": branch, + "sdkPackageRid": sdk_package_rid, + "sdkVersion": sdk_version, + "transactionId": transaction_id, + }, + path_params={ + "ontology": ontology, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=ontologies_models.LoadObjectSetRequestV2( + object_set=object_set, + order_by=order_by, + select=select, + select_v2=select_v2, + page_token=page_token, + page_size=page_size, + exclude_rid=exclude_rid, + snapshot=snapshot, + include_compute_usage=include_compute_usage, + ), + response_type=ontologies_models.LoadObjectSetResponseV2, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def load_links( + self, + ontology: ontologies_models.OntologyIdentifier, + *, + links: typing.List[ontologies_models.LinkTypeApiName], + object_set: ontologies_models.ObjectSet, + branch: typing.Optional[core_models.FoundryBranch] = None, + include_compute_usage: typing.Optional[core_models.IncludeComputeUsage] = None, + page_token: typing.Optional[core_models.PageToken] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, + sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> ontologies_models.LoadObjectSetLinksResponseV2: + """ + Loads the specified links from the defined object set. + + Links are defined as a link type API name and object locators for the source and target objects + where only the `__primaryKey` and `__apiName` properties are loaded. + + Links are grouped by source object locator; however, the links for a given source object may be + split over multiple entries with the same source object locator. + + Please keep these limitations in mind: + - Links returned may be stale. For example, primary keys returned by this endpoint may not exist anymore. + - This endpoint requests links for 1,000 objects at a time. If, for any page of 1,000 objects, there are more + than 100,000 links present, results are limited to 100,000 links and should be considered partial. + - This endpoint does not support OSv1 links and will return an error if links provided are backed by OSv1. + - This endpoint currently does not support interface object sets or interface links, but support will be added in the near future. + + :param ontology: + :type ontology: OntologyIdentifier + :param links: + :type links: List[LinkTypeApiName] + :param object_set: + :type object_set: ObjectSet + :param branch: The Foundry branch to aggregate the objects from. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported. + :type branch: Optional[FoundryBranch] + :param include_compute_usage: + :type include_compute_usage: Optional[IncludeComputeUsage] + :param page_token: + :type page_token: Optional[PageToken] + :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. + :type preview: Optional[PreviewMode] + :param sdk_package_rid: The package rid of the generated SDK. + :type sdk_package_rid: Optional[SdkPackageRid] + :param sdk_version: The package version of the generated SDK. + :type sdk_version: Optional[SdkVersion] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: ontologies_models.LoadObjectSetLinksResponseV2 + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/ontologies/{ontology}/objectSets/loadLinks", + query_params={ + "branch": branch, + "preview": preview, + "sdkPackageRid": sdk_package_rid, + "sdkVersion": sdk_version, + }, + path_params={ + "ontology": ontology, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=ontologies_models.LoadObjectSetLinksRequestV2( + object_set=object_set, + links=links, + page_token=page_token, + include_compute_usage=include_compute_usage, + ), + response_type=ontologies_models.LoadObjectSetLinksResponseV2, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def load_multiple_object_types( + self, + ontology: ontologies_models.OntologyIdentifier, + *, + object_set: ontologies_models.ObjectSet, + select: typing.List[ontologies_models.SelectedPropertyApiName], + select_v2: typing.Optional[typing.List[ontologies_models.PropertyIdentifier]] = None, + branch: typing.Optional[core_models.FoundryBranch] = None, + exclude_rid: typing.Optional[bool] = None, + include_compute_usage: typing.Optional[core_models.IncludeComputeUsage] = None, + order_by: typing.Optional[ontologies_models.SearchOrderByV2] = None, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, + sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, + snapshot: typing.Optional[bool] = None, + transaction_id: typing.Optional[ontologies_models.OntologyTransactionId] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> ontologies_models.LoadObjectSetV2MultipleObjectTypesResponse: + """ + Load the ontology objects present in the `ObjectSet` from the provided object set definition. The resulting + objects may be scoped to an object type, in which all the selected properties on the object type are returned, or scoped + to an interface, in which only the object type properties that implement the properties of any interfaces in its + scope are returned. For objects that are scoped to an interface in the result, a mapping from interface to + object implementation is returned in order to interpret the objects as the interfaces that they implement. + + For Object Storage V1 backed objects, this endpoint returns a maximum of 10,000 objects. After 10,000 objects have been returned and if more objects + are available, attempting to load another page will result in an `ObjectsExceededLimit` error being returned. There is no limit on Object Storage V2 backed objects. + + Note that null value properties will not be returned. In addition, property metadata (rid, apiName, and primaryKey) + will be prefixed with '$' instead of '__' as is the case in `loadObjects`. + + Vector properties will not be returned unless included in the `select` parameter. + + :param ontology: + :type ontology: OntologyIdentifier + :param object_set: + :type object_set: ObjectSet + :param select: + :type select: List[SelectedPropertyApiName] + :param select_v2: The identifiers of the properties to include in the response. Only selectV2 or select should be populated, but not both. + :type select_v2: Optional[List[PropertyIdentifier]] + :param branch: The Foundry branch to load the object set for multiple object types. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported. + :type branch: Optional[FoundryBranch] + :param exclude_rid: A flag to exclude the retrieval of the `$rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2. + :type exclude_rid: Optional[bool] + :param include_compute_usage: + :type include_compute_usage: Optional[IncludeComputeUsage] + :param order_by: + :type order_by: Optional[SearchOrderByV2] + :param page_size: + :type page_size: Optional[PageSize] + :param page_token: + :type page_token: Optional[PageToken] + :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. + :type preview: Optional[PreviewMode] + :param sdk_package_rid: The package rid of the generated SDK. + :type sdk_package_rid: Optional[SdkPackageRid] + :param sdk_version: The package version of the generated SDK. + :type sdk_version: Optional[SdkVersion] + :param snapshot: A flag to use snapshot consistency when paging. Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. This defaults to false if not specified, which means you will always get the latest results. + :type snapshot: Optional[bool] + :param transaction_id: The ID of an Ontology transaction to read from. Transactions are an experimental feature and all workflows may not be supported. + :type transaction_id: Optional[OntologyTransactionId] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: ontologies_models.LoadObjectSetV2MultipleObjectTypesResponse + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/ontologies/{ontology}/objectSets/loadObjectsMultipleObjectTypes", + query_params={ + "branch": branch, + "preview": preview, + "sdkPackageRid": sdk_package_rid, + "sdkVersion": sdk_version, + "transactionId": transaction_id, + }, + path_params={ + "ontology": ontology, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=ontologies_models.LoadObjectSetV2MultipleObjectTypesRequest( + object_set=object_set, + order_by=order_by, + select=select, + select_v2=select_v2, + page_token=page_token, + page_size=page_size, + exclude_rid=exclude_rid, + snapshot=snapshot, + include_compute_usage=include_compute_usage, + ), + response_type=ontologies_models.LoadObjectSetV2MultipleObjectTypesResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def load_objects_or_interfaces( + self, + ontology: ontologies_models.OntologyIdentifier, + *, + object_set: ontologies_models.ObjectSet, + select: typing.List[ontologies_models.SelectedPropertyApiName], + select_v2: typing.Optional[typing.List[ontologies_models.PropertyIdentifier]] = None, + branch: typing.Optional[core_models.FoundryBranch] = None, + exclude_rid: typing.Optional[bool] = None, + order_by: typing.Optional[ontologies_models.SearchOrderByV2] = None, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, + sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, + snapshot: typing.Optional[bool] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> ontologies_models.LoadObjectSetV2ObjectsOrInterfacesResponse: + """ + Load the ontology objects present in the `ObjectSet` from the provided object set definition. If the requested + object set contains interfaces and the object can be viewed as an interface, it will contain the properties + defined by the interface. If not, it will contain the properties defined by its object type. This allows directly + loading all objects of an interface where all objects are viewed as the interface, for example. + + Note that the result object set cannot contain a mix of objects with "interface" properties and "object type" + properties. Attempting to load an object set like this will result in an error. + + For Object Storage V1 backed objects, this endpoint returns a maximum of 10,000 objects. After 10,000 objects have been returned and if more objects + are available, attempting to load another page will result in an `ObjectsExceededLimit` error being returned. There is no limit on Object Storage V2 backed objects. + + Note that null value properties will not be returned. In addition, property metadata (rid, apiName, and primaryKey) + will be prefixed with '$' instead of '__' as is the case in `/loadObjects`. + + Vector properties will not be returned unless included in the `select` parameter. + + :param ontology: + :type ontology: OntologyIdentifier + :param object_set: + :type object_set: ObjectSet + :param select: + :type select: List[SelectedPropertyApiName] + :param select_v2: The identifiers of the properties to include in the response. Only selectV2 or select should be populated, but not both. + :type select_v2: Optional[List[PropertyIdentifier]] + :param branch: The Foundry branch to load the objects or interfaces from. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported. + :type branch: Optional[FoundryBranch] + :param exclude_rid: A flag to exclude the retrieval of the `$rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2. + :type exclude_rid: Optional[bool] + :param order_by: + :type order_by: Optional[SearchOrderByV2] + :param page_size: + :type page_size: Optional[PageSize] + :param page_token: + :type page_token: Optional[PageToken] + :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. + :type preview: Optional[PreviewMode] + :param sdk_package_rid: The package rid of the generated SDK. + :type sdk_package_rid: Optional[SdkPackageRid] + :param sdk_version: The package version of the generated SDK. + :type sdk_version: Optional[SdkVersion] + :param snapshot: A flag to use snapshot consistency when paging. Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. This defaults to false if not specified, which means you will always get the latest results. + :type snapshot: Optional[bool] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: ontologies_models.LoadObjectSetV2ObjectsOrInterfacesResponse + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/ontologies/{ontology}/objectSets/loadObjectsOrInterfaces", + query_params={ + "branch": branch, + "preview": preview, + "sdkPackageRid": sdk_package_rid, + "sdkVersion": sdk_version, + }, + path_params={ + "ontology": ontology, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=ontologies_models.LoadObjectSetV2ObjectsOrInterfacesRequest( + object_set=object_set, + order_by=order_by, + select=select, + select_v2=select_v2, + page_token=page_token, + page_size=page_size, + exclude_rid=exclude_rid, + snapshot=snapshot, + ), + response_type=ontologies_models.LoadObjectSetV2ObjectsOrInterfacesResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _OntologyObjectSetClientRaw: + def __init__(self, client: OntologyObjectSetClient) -> None: + def aggregate(_: ontologies_models.AggregateObjectsResponseV2): ... + def create_temporary(_: ontologies_models.CreateTemporaryObjectSetResponseV2): ... + def get(_: ontologies_models.ObjectSet): ... + def load(_: ontologies_models.LoadObjectSetResponseV2): ... + def load_links(_: ontologies_models.LoadObjectSetLinksResponseV2): ... + def load_multiple_object_types( + _: ontologies_models.LoadObjectSetV2MultipleObjectTypesResponse, + ): ... + def load_objects_or_interfaces( + _: ontologies_models.LoadObjectSetV2ObjectsOrInterfacesResponse, + ): ... + + self.aggregate = core.with_raw_response(aggregate, client.aggregate) + self.create_temporary = core.with_raw_response(create_temporary, client.create_temporary) + self.get = core.with_raw_response(get, client.get) + self.load = core.with_raw_response(load, client.load) + self.load_links = core.with_raw_response(load_links, client.load_links) + self.load_multiple_object_types = core.with_raw_response( + load_multiple_object_types, client.load_multiple_object_types + ) + self.load_objects_or_interfaces = core.with_raw_response( + load_objects_or_interfaces, client.load_objects_or_interfaces + ) + + +class _OntologyObjectSetClientStreaming: + def __init__(self, client: OntologyObjectSetClient) -> None: + def aggregate(_: ontologies_models.AggregateObjectsResponseV2): ... + def create_temporary(_: ontologies_models.CreateTemporaryObjectSetResponseV2): ... + def get(_: ontologies_models.ObjectSet): ... + def load(_: ontologies_models.LoadObjectSetResponseV2): ... + def load_links(_: ontologies_models.LoadObjectSetLinksResponseV2): ... + def load_multiple_object_types( + _: ontologies_models.LoadObjectSetV2MultipleObjectTypesResponse, + ): ... + def load_objects_or_interfaces( + _: ontologies_models.LoadObjectSetV2ObjectsOrInterfacesResponse, + ): ... + + self.aggregate = core.with_streaming_response(aggregate, client.aggregate) + self.create_temporary = core.with_streaming_response( + create_temporary, client.create_temporary + ) + self.get = core.with_streaming_response(get, client.get) + self.load = core.with_streaming_response(load, client.load) + self.load_links = core.with_streaming_response(load_links, client.load_links) + self.load_multiple_object_types = core.with_streaming_response( + load_multiple_object_types, client.load_multiple_object_types + ) + self.load_objects_or_interfaces = core.with_streaming_response( + load_objects_or_interfaces, client.load_objects_or_interfaces + ) + + +class AsyncOntologyObjectSetClient: + """ + The API client for the OntologyObjectSet Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncOntologyObjectSetClientStreaming(self) + self.with_raw_response = _AsyncOntologyObjectSetClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def aggregate( + self, + ontology: ontologies_models.OntologyIdentifier, + *, + aggregation: typing.List[ontologies_models.AggregationV2], + group_by: typing.List[ontologies_models.AggregationGroupByV2], + object_set: ontologies_models.ObjectSet, + accuracy: typing.Optional[ontologies_models.AggregationAccuracyRequest] = None, + branch: typing.Optional[core_models.FoundryBranch] = None, + include_compute_usage: typing.Optional[core_models.IncludeComputeUsage] = None, + sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, + sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, + transaction_id: typing.Optional[ontologies_models.OntologyTransactionId] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[ontologies_models.AggregateObjectsResponseV2]: + """ + Aggregates the ontology objects present in the `ObjectSet` from the provided object set definition. + + :param ontology: + :type ontology: OntologyIdentifier + :param aggregation: + :type aggregation: List[AggregationV2] + :param group_by: + :type group_by: List[AggregationGroupByV2] + :param object_set: + :type object_set: ObjectSet + :param accuracy: + :type accuracy: Optional[AggregationAccuracyRequest] + :param branch: The Foundry branch to aggregate the objects from. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported. + :type branch: Optional[FoundryBranch] + :param include_compute_usage: + :type include_compute_usage: Optional[IncludeComputeUsage] + :param sdk_package_rid: The package rid of the generated SDK. + :type sdk_package_rid: Optional[SdkPackageRid] + :param sdk_version: The package version of the generated SDK. + :type sdk_version: Optional[SdkVersion] + :param transaction_id: The ID of an Ontology transaction to read from. Transactions are an experimental feature and all workflows may not be supported. + :type transaction_id: Optional[OntologyTransactionId] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[ontologies_models.AggregateObjectsResponseV2] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/ontologies/{ontology}/objectSets/aggregate", + query_params={ + "branch": branch, + "sdkPackageRid": sdk_package_rid, + "sdkVersion": sdk_version, + "transactionId": transaction_id, + }, + path_params={ + "ontology": ontology, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=ontologies_models.AggregateObjectSetRequestV2( + aggregation=aggregation, + object_set=object_set, + group_by=group_by, + accuracy=accuracy, + include_compute_usage=include_compute_usage, + ), + response_type=ontologies_models.AggregateObjectsResponseV2, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def create_temporary( + self, + ontology: ontologies_models.OntologyIdentifier, + *, + object_set: ontologies_models.ObjectSet, + sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, + sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[ontologies_models.CreateTemporaryObjectSetResponseV2]: + """ + Creates a temporary `ObjectSet` from the given definition. This `ObjectSet` expires after one hour. + + :param ontology: + :type ontology: OntologyIdentifier + :param object_set: + :type object_set: ObjectSet + :param sdk_package_rid: The package rid of the generated SDK. + :type sdk_package_rid: Optional[SdkPackageRid] + :param sdk_version: The package version of the generated SDK. + :type sdk_version: Optional[SdkVersion] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[ontologies_models.CreateTemporaryObjectSetResponseV2] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/ontologies/{ontology}/objectSets/createTemporary", + query_params={ + "sdkPackageRid": sdk_package_rid, + "sdkVersion": sdk_version, + }, + path_params={ + "ontology": ontology, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=ontologies_models.CreateTemporaryObjectSetRequestV2( + object_set=object_set, + ), + response_type=ontologies_models.CreateTemporaryObjectSetResponseV2, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + ontology: ontologies_models.OntologyIdentifier, + object_set_rid: ontologies_models.ObjectSetRid, + *, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[ontologies_models.ObjectSet]: + """ + Gets the definition of the `ObjectSet` with the given RID. + + :param ontology: + :type ontology: OntologyIdentifier + :param object_set_rid: The RID of the object set. + :type object_set_rid: ObjectSetRid + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[ontologies_models.ObjectSet] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/ontologies/{ontology}/objectSets/{objectSetRid}", + query_params={}, + path_params={ + "ontology": ontology, + "objectSetRid": object_set_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.ObjectSet, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def load( + self, + ontology: ontologies_models.OntologyIdentifier, + *, + object_set: ontologies_models.ObjectSet, + select: typing.List[ontologies_models.SelectedPropertyApiName], + select_v2: typing.Optional[typing.List[ontologies_models.PropertyIdentifier]] = None, + branch: typing.Optional[core_models.FoundryBranch] = None, + exclude_rid: typing.Optional[bool] = None, + include_compute_usage: typing.Optional[core_models.IncludeComputeUsage] = None, + order_by: typing.Optional[ontologies_models.SearchOrderByV2] = None, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, + sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, + snapshot: typing.Optional[bool] = None, + transaction_id: typing.Optional[ontologies_models.OntologyTransactionId] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[ontologies_models.LoadObjectSetResponseV2]: + """ + Load the ontology objects present in the `ObjectSet` from the provided object set definition. + + For Object Storage V1 backed objects, this endpoint returns a maximum of 10,000 objects. After 10,000 objects have been returned and if more objects + are available, attempting to load another page will result in an `ObjectsExceededLimit` error being returned. There is no limit on Object Storage V2 backed objects. + + Note that null value properties will not be returned. + + Vector properties will not be returned unless included in the `select` parameter. + + :param ontology: + :type ontology: OntologyIdentifier + :param object_set: + :type object_set: ObjectSet + :param select: + :type select: List[SelectedPropertyApiName] + :param select_v2: The identifiers of the properties to include in the response. Only selectV2 or select should be populated, but not both. + :type select_v2: Optional[List[PropertyIdentifier]] + :param branch: The Foundry branch to load the object set from. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported. + :type branch: Optional[FoundryBranch] + :param exclude_rid: A flag to exclude the retrieval of the `__rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2. + :type exclude_rid: Optional[bool] + :param include_compute_usage: + :type include_compute_usage: Optional[IncludeComputeUsage] + :param order_by: + :type order_by: Optional[SearchOrderByV2] + :param page_size: + :type page_size: Optional[PageSize] + :param page_token: + :type page_token: Optional[PageToken] + :param sdk_package_rid: The package rid of the generated SDK. + :type sdk_package_rid: Optional[SdkPackageRid] + :param sdk_version: The package version of the generated SDK. + :type sdk_version: Optional[SdkVersion] + :param snapshot: A flag to use snapshot consistency when paging. Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. This defaults to false if not specified, which means you will always get the latest results. + :type snapshot: Optional[bool] + :param transaction_id: The ID of an Ontology transaction to read from. Transactions are an experimental feature and all workflows may not be supported. + :type transaction_id: Optional[OntologyTransactionId] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[ontologies_models.LoadObjectSetResponseV2] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/ontologies/{ontology}/objectSets/loadObjects", + query_params={ + "branch": branch, + "sdkPackageRid": sdk_package_rid, + "sdkVersion": sdk_version, + "transactionId": transaction_id, + }, + path_params={ + "ontology": ontology, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=ontologies_models.LoadObjectSetRequestV2( + object_set=object_set, + order_by=order_by, + select=select, + select_v2=select_v2, + page_token=page_token, + page_size=page_size, + exclude_rid=exclude_rid, + snapshot=snapshot, + include_compute_usage=include_compute_usage, + ), + response_type=ontologies_models.LoadObjectSetResponseV2, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def load_links( + self, + ontology: ontologies_models.OntologyIdentifier, + *, + links: typing.List[ontologies_models.LinkTypeApiName], + object_set: ontologies_models.ObjectSet, + branch: typing.Optional[core_models.FoundryBranch] = None, + include_compute_usage: typing.Optional[core_models.IncludeComputeUsage] = None, + page_token: typing.Optional[core_models.PageToken] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, + sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[ontologies_models.LoadObjectSetLinksResponseV2]: + """ + Loads the specified links from the defined object set. + + Links are defined as a link type API name and object locators for the source and target objects + where only the `__primaryKey` and `__apiName` properties are loaded. + + Links are grouped by source object locator; however, the links for a given source object may be + split over multiple entries with the same source object locator. + + Please keep these limitations in mind: + - Links returned may be stale. For example, primary keys returned by this endpoint may not exist anymore. + - This endpoint requests links for 1,000 objects at a time. If, for any page of 1,000 objects, there are more + than 100,000 links present, results are limited to 100,000 links and should be considered partial. + - This endpoint does not support OSv1 links and will return an error if links provided are backed by OSv1. + - This endpoint currently does not support interface object sets or interface links, but support will be added in the near future. + + :param ontology: + :type ontology: OntologyIdentifier + :param links: + :type links: List[LinkTypeApiName] + :param object_set: + :type object_set: ObjectSet + :param branch: The Foundry branch to aggregate the objects from. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported. + :type branch: Optional[FoundryBranch] + :param include_compute_usage: + :type include_compute_usage: Optional[IncludeComputeUsage] + :param page_token: + :type page_token: Optional[PageToken] + :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. + :type preview: Optional[PreviewMode] + :param sdk_package_rid: The package rid of the generated SDK. + :type sdk_package_rid: Optional[SdkPackageRid] + :param sdk_version: The package version of the generated SDK. + :type sdk_version: Optional[SdkVersion] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[ontologies_models.LoadObjectSetLinksResponseV2] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/ontologies/{ontology}/objectSets/loadLinks", + query_params={ + "branch": branch, + "preview": preview, + "sdkPackageRid": sdk_package_rid, + "sdkVersion": sdk_version, + }, + path_params={ + "ontology": ontology, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=ontologies_models.LoadObjectSetLinksRequestV2( + object_set=object_set, + links=links, + page_token=page_token, + include_compute_usage=include_compute_usage, + ), + response_type=ontologies_models.LoadObjectSetLinksResponseV2, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def load_multiple_object_types( + self, + ontology: ontologies_models.OntologyIdentifier, + *, + object_set: ontologies_models.ObjectSet, + select: typing.List[ontologies_models.SelectedPropertyApiName], + select_v2: typing.Optional[typing.List[ontologies_models.PropertyIdentifier]] = None, + branch: typing.Optional[core_models.FoundryBranch] = None, + exclude_rid: typing.Optional[bool] = None, + include_compute_usage: typing.Optional[core_models.IncludeComputeUsage] = None, + order_by: typing.Optional[ontologies_models.SearchOrderByV2] = None, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, + sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, + snapshot: typing.Optional[bool] = None, + transaction_id: typing.Optional[ontologies_models.OntologyTransactionId] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[ontologies_models.LoadObjectSetV2MultipleObjectTypesResponse]: + """ + Load the ontology objects present in the `ObjectSet` from the provided object set definition. The resulting + objects may be scoped to an object type, in which all the selected properties on the object type are returned, or scoped + to an interface, in which only the object type properties that implement the properties of any interfaces in its + scope are returned. For objects that are scoped to an interface in the result, a mapping from interface to + object implementation is returned in order to interpret the objects as the interfaces that they implement. + + For Object Storage V1 backed objects, this endpoint returns a maximum of 10,000 objects. After 10,000 objects have been returned and if more objects + are available, attempting to load another page will result in an `ObjectsExceededLimit` error being returned. There is no limit on Object Storage V2 backed objects. + + Note that null value properties will not be returned. In addition, property metadata (rid, apiName, and primaryKey) + will be prefixed with '$' instead of '__' as is the case in `loadObjects`. + + Vector properties will not be returned unless included in the `select` parameter. + + :param ontology: + :type ontology: OntologyIdentifier + :param object_set: + :type object_set: ObjectSet + :param select: + :type select: List[SelectedPropertyApiName] + :param select_v2: The identifiers of the properties to include in the response. Only selectV2 or select should be populated, but not both. + :type select_v2: Optional[List[PropertyIdentifier]] + :param branch: The Foundry branch to load the object set for multiple object types. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported. + :type branch: Optional[FoundryBranch] + :param exclude_rid: A flag to exclude the retrieval of the `$rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2. + :type exclude_rid: Optional[bool] + :param include_compute_usage: + :type include_compute_usage: Optional[IncludeComputeUsage] + :param order_by: + :type order_by: Optional[SearchOrderByV2] + :param page_size: + :type page_size: Optional[PageSize] + :param page_token: + :type page_token: Optional[PageToken] + :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. + :type preview: Optional[PreviewMode] + :param sdk_package_rid: The package rid of the generated SDK. + :type sdk_package_rid: Optional[SdkPackageRid] + :param sdk_version: The package version of the generated SDK. + :type sdk_version: Optional[SdkVersion] + :param snapshot: A flag to use snapshot consistency when paging. Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. This defaults to false if not specified, which means you will always get the latest results. + :type snapshot: Optional[bool] + :param transaction_id: The ID of an Ontology transaction to read from. Transactions are an experimental feature and all workflows may not be supported. + :type transaction_id: Optional[OntologyTransactionId] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[ontologies_models.LoadObjectSetV2MultipleObjectTypesResponse] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/ontologies/{ontology}/objectSets/loadObjectsMultipleObjectTypes", + query_params={ + "branch": branch, + "preview": preview, + "sdkPackageRid": sdk_package_rid, + "sdkVersion": sdk_version, + "transactionId": transaction_id, + }, + path_params={ + "ontology": ontology, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=ontologies_models.LoadObjectSetV2MultipleObjectTypesRequest( + object_set=object_set, + order_by=order_by, + select=select, + select_v2=select_v2, + page_token=page_token, + page_size=page_size, + exclude_rid=exclude_rid, + snapshot=snapshot, + include_compute_usage=include_compute_usage, + ), + response_type=ontologies_models.LoadObjectSetV2MultipleObjectTypesResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def load_objects_or_interfaces( + self, + ontology: ontologies_models.OntologyIdentifier, + *, + object_set: ontologies_models.ObjectSet, + select: typing.List[ontologies_models.SelectedPropertyApiName], + select_v2: typing.Optional[typing.List[ontologies_models.PropertyIdentifier]] = None, + branch: typing.Optional[core_models.FoundryBranch] = None, + exclude_rid: typing.Optional[bool] = None, + order_by: typing.Optional[ontologies_models.SearchOrderByV2] = None, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, + sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, + snapshot: typing.Optional[bool] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[ontologies_models.LoadObjectSetV2ObjectsOrInterfacesResponse]: + """ + Load the ontology objects present in the `ObjectSet` from the provided object set definition. If the requested + object set contains interfaces and the object can be viewed as an interface, it will contain the properties + defined by the interface. If not, it will contain the properties defined by its object type. This allows directly + loading all objects of an interface where all objects are viewed as the interface, for example. + + Note that the result object set cannot contain a mix of objects with "interface" properties and "object type" + properties. Attempting to load an object set like this will result in an error. + + For Object Storage V1 backed objects, this endpoint returns a maximum of 10,000 objects. After 10,000 objects have been returned and if more objects + are available, attempting to load another page will result in an `ObjectsExceededLimit` error being returned. There is no limit on Object Storage V2 backed objects. + + Note that null value properties will not be returned. In addition, property metadata (rid, apiName, and primaryKey) + will be prefixed with '$' instead of '__' as is the case in `/loadObjects`. + + Vector properties will not be returned unless included in the `select` parameter. + + :param ontology: + :type ontology: OntologyIdentifier + :param object_set: + :type object_set: ObjectSet + :param select: + :type select: List[SelectedPropertyApiName] + :param select_v2: The identifiers of the properties to include in the response. Only selectV2 or select should be populated, but not both. + :type select_v2: Optional[List[PropertyIdentifier]] + :param branch: The Foundry branch to load the objects or interfaces from. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported. + :type branch: Optional[FoundryBranch] + :param exclude_rid: A flag to exclude the retrieval of the `$rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2. + :type exclude_rid: Optional[bool] + :param order_by: + :type order_by: Optional[SearchOrderByV2] + :param page_size: + :type page_size: Optional[PageSize] + :param page_token: + :type page_token: Optional[PageToken] + :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. + :type preview: Optional[PreviewMode] + :param sdk_package_rid: The package rid of the generated SDK. + :type sdk_package_rid: Optional[SdkPackageRid] + :param sdk_version: The package version of the generated SDK. + :type sdk_version: Optional[SdkVersion] + :param snapshot: A flag to use snapshot consistency when paging. Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. This defaults to false if not specified, which means you will always get the latest results. + :type snapshot: Optional[bool] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[ontologies_models.LoadObjectSetV2ObjectsOrInterfacesResponse] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/ontologies/{ontology}/objectSets/loadObjectsOrInterfaces", + query_params={ + "branch": branch, + "preview": preview, + "sdkPackageRid": sdk_package_rid, + "sdkVersion": sdk_version, + }, + path_params={ + "ontology": ontology, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=ontologies_models.LoadObjectSetV2ObjectsOrInterfacesRequest( + object_set=object_set, + order_by=order_by, + select=select, + select_v2=select_v2, + page_token=page_token, + page_size=page_size, + exclude_rid=exclude_rid, + snapshot=snapshot, + ), + response_type=ontologies_models.LoadObjectSetV2ObjectsOrInterfacesResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _AsyncOntologyObjectSetClientRaw: + def __init__(self, client: AsyncOntologyObjectSetClient) -> None: + def aggregate(_: ontologies_models.AggregateObjectsResponseV2): ... + def create_temporary(_: ontologies_models.CreateTemporaryObjectSetResponseV2): ... + def get(_: ontologies_models.ObjectSet): ... + def load(_: ontologies_models.LoadObjectSetResponseV2): ... + def load_links(_: ontologies_models.LoadObjectSetLinksResponseV2): ... + def load_multiple_object_types( + _: ontologies_models.LoadObjectSetV2MultipleObjectTypesResponse, + ): ... + def load_objects_or_interfaces( + _: ontologies_models.LoadObjectSetV2ObjectsOrInterfacesResponse, + ): ... + + self.aggregate = core.async_with_raw_response(aggregate, client.aggregate) + self.create_temporary = core.async_with_raw_response( + create_temporary, client.create_temporary + ) + self.get = core.async_with_raw_response(get, client.get) + self.load = core.async_with_raw_response(load, client.load) + self.load_links = core.async_with_raw_response(load_links, client.load_links) + self.load_multiple_object_types = core.async_with_raw_response( + load_multiple_object_types, client.load_multiple_object_types + ) + self.load_objects_or_interfaces = core.async_with_raw_response( + load_objects_or_interfaces, client.load_objects_or_interfaces + ) + + +class _AsyncOntologyObjectSetClientStreaming: + def __init__(self, client: AsyncOntologyObjectSetClient) -> None: + def aggregate(_: ontologies_models.AggregateObjectsResponseV2): ... + def create_temporary(_: ontologies_models.CreateTemporaryObjectSetResponseV2): ... + def get(_: ontologies_models.ObjectSet): ... + def load(_: ontologies_models.LoadObjectSetResponseV2): ... + def load_links(_: ontologies_models.LoadObjectSetLinksResponseV2): ... + def load_multiple_object_types( + _: ontologies_models.LoadObjectSetV2MultipleObjectTypesResponse, + ): ... + def load_objects_or_interfaces( + _: ontologies_models.LoadObjectSetV2ObjectsOrInterfacesResponse, + ): ... + + self.aggregate = core.async_with_streaming_response(aggregate, client.aggregate) + self.create_temporary = core.async_with_streaming_response( + create_temporary, client.create_temporary + ) + self.get = core.async_with_streaming_response(get, client.get) + self.load = core.async_with_streaming_response(load, client.load) + self.load_links = core.async_with_streaming_response(load_links, client.load_links) + self.load_multiple_object_types = core.async_with_streaming_response( + load_multiple_object_types, client.load_multiple_object_types + ) + self.load_objects_or_interfaces = core.async_with_streaming_response( + load_objects_or_interfaces, client.load_objects_or_interfaces + ) diff --git a/foundry_sdk/v2/ontologies/ontology_transaction.py b/foundry_sdk/v2/ontologies/ontology_transaction.py new file mode 100644 index 000000000..5b351e2bf --- /dev/null +++ b/foundry_sdk/v2/ontologies/ontology_transaction.py @@ -0,0 +1,210 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v2.core import models as core_models +from foundry_sdk.v2.ontologies import models as ontologies_models + + +class OntologyTransactionClient: + """ + The API client for the OntologyTransaction Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _OntologyTransactionClientStreaming(self) + self.with_raw_response = _OntologyTransactionClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def post_edits( + self, + ontology: ontologies_models.OntologyIdentifier, + transaction_id: ontologies_models.OntologyTransactionId, + *, + edits: typing.List[ontologies_models.TransactionEdit], + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> ontologies_models.PostTransactionEditsResponse: + """ + Applies a set of edits to a transaction in order. + + :param ontology: + :type ontology: OntologyIdentifier + :param transaction_id: The ID of the transaction to apply edits to. Transactions are an experimental feature and all workflows may not be supported. + :type transaction_id: OntologyTransactionId + :param edits: + :type edits: List[TransactionEdit] + :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: ontologies_models.PostTransactionEditsResponse + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/ontologies/{ontology}/transactions/{transactionId}/edits", + query_params={ + "preview": preview, + }, + path_params={ + "ontology": ontology, + "transactionId": transaction_id, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=ontologies_models.PostTransactionEditsRequest( + edits=edits, + ), + response_type=ontologies_models.PostTransactionEditsResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _OntologyTransactionClientRaw: + def __init__(self, client: OntologyTransactionClient) -> None: + def post_edits(_: ontologies_models.PostTransactionEditsResponse): ... + + self.post_edits = core.with_raw_response(post_edits, client.post_edits) + + +class _OntologyTransactionClientStreaming: + def __init__(self, client: OntologyTransactionClient) -> None: + def post_edits(_: ontologies_models.PostTransactionEditsResponse): ... + + self.post_edits = core.with_streaming_response(post_edits, client.post_edits) + + +class AsyncOntologyTransactionClient: + """ + The API client for the OntologyTransaction Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncOntologyTransactionClientStreaming(self) + self.with_raw_response = _AsyncOntologyTransactionClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def post_edits( + self, + ontology: ontologies_models.OntologyIdentifier, + transaction_id: ontologies_models.OntologyTransactionId, + *, + edits: typing.List[ontologies_models.TransactionEdit], + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[ontologies_models.PostTransactionEditsResponse]: + """ + Applies a set of edits to a transaction in order. + + :param ontology: + :type ontology: OntologyIdentifier + :param transaction_id: The ID of the transaction to apply edits to. Transactions are an experimental feature and all workflows may not be supported. + :type transaction_id: OntologyTransactionId + :param edits: + :type edits: List[TransactionEdit] + :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[ontologies_models.PostTransactionEditsResponse] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/ontologies/{ontology}/transactions/{transactionId}/edits", + query_params={ + "preview": preview, + }, + path_params={ + "ontology": ontology, + "transactionId": transaction_id, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=ontologies_models.PostTransactionEditsRequest( + edits=edits, + ), + response_type=ontologies_models.PostTransactionEditsResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _AsyncOntologyTransactionClientRaw: + def __init__(self, client: AsyncOntologyTransactionClient) -> None: + def post_edits(_: ontologies_models.PostTransactionEditsResponse): ... + + self.post_edits = core.async_with_raw_response(post_edits, client.post_edits) + + +class _AsyncOntologyTransactionClientStreaming: + def __init__(self, client: AsyncOntologyTransactionClient) -> None: + def post_edits(_: ontologies_models.PostTransactionEditsResponse): ... + + self.post_edits = core.async_with_streaming_response(post_edits, client.post_edits) diff --git a/foundry_sdk/v2/ontologies/ontology_value_type.py b/foundry_sdk/v2/ontologies/ontology_value_type.py new file mode 100644 index 000000000..f96010edf --- /dev/null +++ b/foundry_sdk/v2/ontologies/ontology_value_type.py @@ -0,0 +1,296 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v2.core import models as core_models +from foundry_sdk.v2.ontologies import models as ontologies_models + + +class OntologyValueTypeClient: + """ + The API client for the OntologyValueType Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _OntologyValueTypeClientStreaming(self) + self.with_raw_response = _OntologyValueTypeClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + ontology: ontologies_models.OntologyIdentifier, + value_type: ontologies_models.ValueTypeApiName, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> ontologies_models.OntologyValueType: + """ + Gets a specific value type with the given API name. + + :param ontology: + :type ontology: OntologyIdentifier + :param value_type: The API name of the value type. To find the API name, use the **List value types** endpoint or check the **Ontology Manager**. + :type value_type: ValueTypeApiName + :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: ontologies_models.OntologyValueType + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/ontologies/{ontology}/valueTypes/{valueType}", + query_params={ + "preview": preview, + }, + path_params={ + "ontology": ontology, + "valueType": value_type, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.OntologyValueType, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def list( + self, + ontology: ontologies_models.OntologyIdentifier, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> ontologies_models.ListOntologyValueTypesResponse: + """ + Lists the latest versions of the value types for the given Ontology. + + :param ontology: + :type ontology: OntologyIdentifier + :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: ontologies_models.ListOntologyValueTypesResponse + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/ontologies/{ontology}/valueTypes", + query_params={ + "preview": preview, + }, + path_params={ + "ontology": ontology, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.ListOntologyValueTypesResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _OntologyValueTypeClientRaw: + def __init__(self, client: OntologyValueTypeClient) -> None: + def get(_: ontologies_models.OntologyValueType): ... + def list(_: ontologies_models.ListOntologyValueTypesResponse): ... + + self.get = core.with_raw_response(get, client.get) + self.list = core.with_raw_response(list, client.list) + + +class _OntologyValueTypeClientStreaming: + def __init__(self, client: OntologyValueTypeClient) -> None: + def get(_: ontologies_models.OntologyValueType): ... + def list(_: ontologies_models.ListOntologyValueTypesResponse): ... + + self.get = core.with_streaming_response(get, client.get) + self.list = core.with_streaming_response(list, client.list) + + +class AsyncOntologyValueTypeClient: + """ + The API client for the OntologyValueType Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncOntologyValueTypeClientStreaming(self) + self.with_raw_response = _AsyncOntologyValueTypeClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + ontology: ontologies_models.OntologyIdentifier, + value_type: ontologies_models.ValueTypeApiName, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[ontologies_models.OntologyValueType]: + """ + Gets a specific value type with the given API name. + + :param ontology: + :type ontology: OntologyIdentifier + :param value_type: The API name of the value type. To find the API name, use the **List value types** endpoint or check the **Ontology Manager**. + :type value_type: ValueTypeApiName + :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[ontologies_models.OntologyValueType] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/ontologies/{ontology}/valueTypes/{valueType}", + query_params={ + "preview": preview, + }, + path_params={ + "ontology": ontology, + "valueType": value_type, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.OntologyValueType, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def list( + self, + ontology: ontologies_models.OntologyIdentifier, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[ontologies_models.ListOntologyValueTypesResponse]: + """ + Lists the latest versions of the value types for the given Ontology. + + :param ontology: + :type ontology: OntologyIdentifier + :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[ontologies_models.ListOntologyValueTypesResponse] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/ontologies/{ontology}/valueTypes", + query_params={ + "preview": preview, + }, + path_params={ + "ontology": ontology, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.ListOntologyValueTypesResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _AsyncOntologyValueTypeClientRaw: + def __init__(self, client: AsyncOntologyValueTypeClient) -> None: + def get(_: ontologies_models.OntologyValueType): ... + def list(_: ontologies_models.ListOntologyValueTypesResponse): ... + + self.get = core.async_with_raw_response(get, client.get) + self.list = core.async_with_raw_response(list, client.list) + + +class _AsyncOntologyValueTypeClientStreaming: + def __init__(self, client: AsyncOntologyValueTypeClient) -> None: + def get(_: ontologies_models.OntologyValueType): ... + def list(_: ontologies_models.ListOntologyValueTypesResponse): ... + + self.get = core.async_with_streaming_response(get, client.get) + self.list = core.async_with_streaming_response(list, client.list) diff --git a/foundry_sdk/v2/ontologies/query.py b/foundry_sdk/v2/ontologies/query.py new file mode 100644 index 000000000..706b21fce --- /dev/null +++ b/foundry_sdk/v2/ontologies/query.py @@ -0,0 +1,266 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v2.core import models as core_models +from foundry_sdk.v2.ontologies import models as ontologies_models + + +class QueryClient: + """ + The API client for the Query Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _QueryClientStreaming(self) + self.with_raw_response = _QueryClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def execute( + self, + ontology: ontologies_models.OntologyIdentifier, + query_api_name: ontologies_models.QueryApiName, + *, + parameters: typing.Dict[ + ontologies_models.ParameterId, typing.Optional[ontologies_models.DataValue] + ], + attribution: typing.Optional[core_models.Attribution] = None, + sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, + sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, + trace_parent: typing.Optional[core_models.TraceParent] = None, + trace_state: typing.Optional[core_models.TraceState] = None, + transaction_id: typing.Optional[ontologies_models.OntologyTransactionId] = None, + version: typing.Optional[ontologies_models.FunctionVersion] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> ontologies_models.ExecuteQueryResponse: + """ + Executes a Query using the given parameters. By default, the latest version of the Query is executed. + + Optional parameters do not need to be supplied. + + :param ontology: + :type ontology: OntologyIdentifier + :param query_api_name: The API name of the Query to execute. + :type query_api_name: QueryApiName + :param parameters: + :type parameters: Dict[ParameterId, Optional[DataValue]] + :param attribution: The Attribution to be used when executing this request. + :type attribution: Optional[Attribution] + :param sdk_package_rid: The package rid of the generated SDK. + :type sdk_package_rid: Optional[SdkPackageRid] + :param sdk_version: The version of the generated SDK. + :type sdk_version: Optional[SdkVersion] + :param trace_parent: The W3C trace parent header included in the request. + :type trace_parent: Optional[TraceParent] + :param trace_state: The W3C trace state header included in the request. + :type trace_state: Optional[TraceState] + :param transaction_id: The ID of an Ontology transaction to read from. Transactions are an experimental feature and all workflows may not be supported. + :type transaction_id: Optional[OntologyTransactionId] + :param version: The version of the Query to execute. + :type version: Optional[FunctionVersion] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: ontologies_models.ExecuteQueryResponse + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/ontologies/{ontology}/queries/{queryApiName}/execute", + query_params={ + "sdkPackageRid": sdk_package_rid, + "sdkVersion": sdk_version, + "transactionId": transaction_id, + "version": version, + }, + path_params={ + "ontology": ontology, + "queryApiName": query_api_name, + }, + header_params={ + "attribution": attribution, + "traceParent": trace_parent, + "traceState": trace_state, + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=ontologies_models.ExecuteQueryRequest( + parameters=parameters, + ), + response_type=ontologies_models.ExecuteQueryResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _QueryClientRaw: + def __init__(self, client: QueryClient) -> None: + def execute(_: ontologies_models.ExecuteQueryResponse): ... + + self.execute = core.with_raw_response(execute, client.execute) + + +class _QueryClientStreaming: + def __init__(self, client: QueryClient) -> None: + def execute(_: ontologies_models.ExecuteQueryResponse): ... + + self.execute = core.with_streaming_response(execute, client.execute) + + +class AsyncQueryClient: + """ + The API client for the Query Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncQueryClientStreaming(self) + self.with_raw_response = _AsyncQueryClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def execute( + self, + ontology: ontologies_models.OntologyIdentifier, + query_api_name: ontologies_models.QueryApiName, + *, + parameters: typing.Dict[ + ontologies_models.ParameterId, typing.Optional[ontologies_models.DataValue] + ], + attribution: typing.Optional[core_models.Attribution] = None, + sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, + sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, + trace_parent: typing.Optional[core_models.TraceParent] = None, + trace_state: typing.Optional[core_models.TraceState] = None, + transaction_id: typing.Optional[ontologies_models.OntologyTransactionId] = None, + version: typing.Optional[ontologies_models.FunctionVersion] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[ontologies_models.ExecuteQueryResponse]: + """ + Executes a Query using the given parameters. By default, the latest version of the Query is executed. + + Optional parameters do not need to be supplied. + + :param ontology: + :type ontology: OntologyIdentifier + :param query_api_name: The API name of the Query to execute. + :type query_api_name: QueryApiName + :param parameters: + :type parameters: Dict[ParameterId, Optional[DataValue]] + :param attribution: The Attribution to be used when executing this request. + :type attribution: Optional[Attribution] + :param sdk_package_rid: The package rid of the generated SDK. + :type sdk_package_rid: Optional[SdkPackageRid] + :param sdk_version: The version of the generated SDK. + :type sdk_version: Optional[SdkVersion] + :param trace_parent: The W3C trace parent header included in the request. + :type trace_parent: Optional[TraceParent] + :param trace_state: The W3C trace state header included in the request. + :type trace_state: Optional[TraceState] + :param transaction_id: The ID of an Ontology transaction to read from. Transactions are an experimental feature and all workflows may not be supported. + :type transaction_id: Optional[OntologyTransactionId] + :param version: The version of the Query to execute. + :type version: Optional[FunctionVersion] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[ontologies_models.ExecuteQueryResponse] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/ontologies/{ontology}/queries/{queryApiName}/execute", + query_params={ + "sdkPackageRid": sdk_package_rid, + "sdkVersion": sdk_version, + "transactionId": transaction_id, + "version": version, + }, + path_params={ + "ontology": ontology, + "queryApiName": query_api_name, + }, + header_params={ + "attribution": attribution, + "traceParent": trace_parent, + "traceState": trace_state, + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=ontologies_models.ExecuteQueryRequest( + parameters=parameters, + ), + response_type=ontologies_models.ExecuteQueryResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _AsyncQueryClientRaw: + def __init__(self, client: AsyncQueryClient) -> None: + def execute(_: ontologies_models.ExecuteQueryResponse): ... + + self.execute = core.async_with_raw_response(execute, client.execute) + + +class _AsyncQueryClientStreaming: + def __init__(self, client: AsyncQueryClient) -> None: + def execute(_: ontologies_models.ExecuteQueryResponse): ... + + self.execute = core.async_with_streaming_response(execute, client.execute) diff --git a/foundry_sdk/v2/ontologies/query_type.py b/foundry_sdk/v2/ontologies/query_type.py new file mode 100644 index 000000000..79f15d171 --- /dev/null +++ b/foundry_sdk/v2/ontologies/query_type.py @@ -0,0 +1,326 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v2.core import models as core_models +from foundry_sdk.v2.ontologies import models as ontologies_models + + +class QueryTypeClient: + """ + The API client for the QueryType Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _QueryTypeClientStreaming(self) + self.with_raw_response = _QueryTypeClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + ontology: ontologies_models.OntologyIdentifier, + query_api_name: ontologies_models.QueryApiName, + *, + sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, + sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, + version: typing.Optional[ontologies_models.FunctionVersion] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> ontologies_models.QueryTypeV2: + """ + Gets a specific query type with the given API name. + + :param ontology: + :type ontology: OntologyIdentifier + :param query_api_name: The API name of the query type. To find the API name, use the **List query types** endpoint or check the **Ontology Manager**. + :type query_api_name: QueryApiName + :param sdk_package_rid: The package rid of the generated SDK. + :type sdk_package_rid: Optional[SdkPackageRid] + :param sdk_version: The version of the generated SDK. + :type sdk_version: Optional[SdkVersion] + :param version: The version of the Query to get. + :type version: Optional[FunctionVersion] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: ontologies_models.QueryTypeV2 + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/ontologies/{ontology}/queryTypes/{queryApiName}", + query_params={ + "sdkPackageRid": sdk_package_rid, + "sdkVersion": sdk_version, + "version": version, + }, + path_params={ + "ontology": ontology, + "queryApiName": query_api_name, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.QueryTypeV2, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def list( + self, + ontology: ontologies_models.OntologyIdentifier, + *, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.ResourceIterator[ontologies_models.QueryTypeV2]: + """ + Lists the query types for the given Ontology. + + Each page may be smaller than the requested page size. However, it is guaranteed that if there are more + results available, at least one result will be present in the response. + + :param ontology: + :type ontology: OntologyIdentifier + :param page_size: The desired size of the page to be returned. Defaults to 100. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. + :type page_size: Optional[PageSize] + :param page_token: + :type page_token: Optional[PageToken] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.ResourceIterator[ontologies_models.QueryTypeV2] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/ontologies/{ontology}/queryTypes", + query_params={ + "pageSize": page_size, + "pageToken": page_token, + }, + path_params={ + "ontology": ontology, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.ListQueryTypesResponseV2, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + +class _QueryTypeClientRaw: + def __init__(self, client: QueryTypeClient) -> None: + def get(_: ontologies_models.QueryTypeV2): ... + def list(_: ontologies_models.ListQueryTypesResponseV2): ... + + self.get = core.with_raw_response(get, client.get) + self.list = core.with_raw_response(list, client.list) + + +class _QueryTypeClientStreaming: + def __init__(self, client: QueryTypeClient) -> None: + def get(_: ontologies_models.QueryTypeV2): ... + def list(_: ontologies_models.ListQueryTypesResponseV2): ... + + self.get = core.with_streaming_response(get, client.get) + self.list = core.with_streaming_response(list, client.list) + + +class AsyncQueryTypeClient: + """ + The API client for the QueryType Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncQueryTypeClientStreaming(self) + self.with_raw_response = _AsyncQueryTypeClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + ontology: ontologies_models.OntologyIdentifier, + query_api_name: ontologies_models.QueryApiName, + *, + sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, + sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, + version: typing.Optional[ontologies_models.FunctionVersion] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[ontologies_models.QueryTypeV2]: + """ + Gets a specific query type with the given API name. + + :param ontology: + :type ontology: OntologyIdentifier + :param query_api_name: The API name of the query type. To find the API name, use the **List query types** endpoint or check the **Ontology Manager**. + :type query_api_name: QueryApiName + :param sdk_package_rid: The package rid of the generated SDK. + :type sdk_package_rid: Optional[SdkPackageRid] + :param sdk_version: The version of the generated SDK. + :type sdk_version: Optional[SdkVersion] + :param version: The version of the Query to get. + :type version: Optional[FunctionVersion] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[ontologies_models.QueryTypeV2] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/ontologies/{ontology}/queryTypes/{queryApiName}", + query_params={ + "sdkPackageRid": sdk_package_rid, + "sdkVersion": sdk_version, + "version": version, + }, + path_params={ + "ontology": ontology, + "queryApiName": query_api_name, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.QueryTypeV2, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def list( + self, + ontology: ontologies_models.OntologyIdentifier, + *, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.AsyncResourceIterator[ontologies_models.QueryTypeV2]: + """ + Lists the query types for the given Ontology. + + Each page may be smaller than the requested page size. However, it is guaranteed that if there are more + results available, at least one result will be present in the response. + + :param ontology: + :type ontology: OntologyIdentifier + :param page_size: The desired size of the page to be returned. Defaults to 100. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. + :type page_size: Optional[PageSize] + :param page_token: + :type page_token: Optional[PageToken] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.AsyncResourceIterator[ontologies_models.QueryTypeV2] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/ontologies/{ontology}/queryTypes", + query_params={ + "pageSize": page_size, + "pageToken": page_token, + }, + path_params={ + "ontology": ontology, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=ontologies_models.ListQueryTypesResponseV2, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + +class _AsyncQueryTypeClientRaw: + def __init__(self, client: AsyncQueryTypeClient) -> None: + def get(_: ontologies_models.QueryTypeV2): ... + def list(_: ontologies_models.ListQueryTypesResponseV2): ... + + self.get = core.async_with_raw_response(get, client.get) + self.list = core.async_with_raw_response(list, client.list) + + +class _AsyncQueryTypeClientStreaming: + def __init__(self, client: AsyncQueryTypeClient) -> None: + def get(_: ontologies_models.QueryTypeV2): ... + def list(_: ontologies_models.ListQueryTypesResponseV2): ... + + self.get = core.async_with_streaming_response(get, client.get) + self.list = core.async_with_streaming_response(list, client.list) diff --git a/foundry_sdk/v2/ontologies/time_series_property_v2.py b/foundry_sdk/v2/ontologies/time_series_property_v2.py new file mode 100644 index 000000000..ab1944e1b --- /dev/null +++ b/foundry_sdk/v2/ontologies/time_series_property_v2.py @@ -0,0 +1,513 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v2.ontologies import models as ontologies_models + + +class TimeSeriesPropertyV2Client: + """ + The API client for the TimeSeriesPropertyV2 Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _TimeSeriesPropertyV2ClientStreaming(self) + self.with_raw_response = _TimeSeriesPropertyV2ClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get_first_point( + self, + ontology: ontologies_models.OntologyIdentifier, + object_type: ontologies_models.ObjectTypeApiName, + primary_key: ontologies_models.PropertyValueEscapedString, + property: ontologies_models.PropertyApiName, + *, + sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, + sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Optional[ontologies_models.TimeSeriesPoint]: + """ + Get the first point of a time series property. + + :param ontology: + :type ontology: OntologyIdentifier + :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. + :type object_type: ObjectTypeApiName + :param primary_key: The primary key of the object with the time series property. + :type primary_key: PropertyValueEscapedString + :param property: The API name of the time series property. To find the API name for your time series property, check the **Ontology Manager** or use the **Get object type** endpoint. + :type property: PropertyApiName + :param sdk_package_rid: The package rid of the generated SDK. + :type sdk_package_rid: Optional[SdkPackageRid] + :param sdk_version: The version of the generated SDK. + :type sdk_version: Optional[SdkVersion] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Optional[ontologies_models.TimeSeriesPoint] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/timeseries/{property}/firstPoint", + query_params={ + "sdkPackageRid": sdk_package_rid, + "sdkVersion": sdk_version, + }, + path_params={ + "ontology": ontology, + "objectType": object_type, + "primaryKey": primary_key, + "property": property, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=typing.Optional[ontologies_models.TimeSeriesPoint], + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get_last_point( + self, + ontology: ontologies_models.OntologyIdentifier, + object_type: ontologies_models.ObjectTypeApiName, + primary_key: ontologies_models.PropertyValueEscapedString, + property: ontologies_models.PropertyApiName, + *, + sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, + sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Optional[ontologies_models.TimeSeriesPoint]: + """ + Get the last point of a time series property. + + :param ontology: + :type ontology: OntologyIdentifier + :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. + :type object_type: ObjectTypeApiName + :param primary_key: The primary key of the object with the time series property. + :type primary_key: PropertyValueEscapedString + :param property: The API name of the time series property. To find the API name for your time series property, check the **Ontology Manager** or use the **Get object type** endpoint. + :type property: PropertyApiName + :param sdk_package_rid: The package rid of the generated SDK. + :type sdk_package_rid: Optional[SdkPackageRid] + :param sdk_version: The version of the generated SDK. + :type sdk_version: Optional[SdkVersion] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Optional[ontologies_models.TimeSeriesPoint] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/timeseries/{property}/lastPoint", + query_params={ + "sdkPackageRid": sdk_package_rid, + "sdkVersion": sdk_version, + }, + path_params={ + "ontology": ontology, + "objectType": object_type, + "primaryKey": primary_key, + "property": property, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=typing.Optional[ontologies_models.TimeSeriesPoint], + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def stream_points( + self, + ontology: ontologies_models.OntologyIdentifier, + object_type: ontologies_models.ObjectTypeApiName, + primary_key: ontologies_models.PropertyValueEscapedString, + property: ontologies_models.PropertyApiName, + *, + aggregate: typing.Optional[ontologies_models.AggregateTimeSeries] = None, + format: typing.Optional[ontologies_models.StreamingOutputFormat] = None, + range: typing.Optional[ontologies_models.TimeRange] = None, + sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, + sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> bytes: + """ + Stream all of the points of a time series property. + + :param ontology: + :type ontology: OntologyIdentifier + :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. + :type object_type: ObjectTypeApiName + :param primary_key: The primary key of the object with the time series property. + :type primary_key: PropertyValueEscapedString + :param property: The API name of the time series property. To find the API name for your time series property, check the **Ontology Manager** or use the **Get object type** endpoint. + :type property: PropertyApiName + :param aggregate: + :type aggregate: Optional[AggregateTimeSeries] + :param format: The output format to serialize the output binary stream in. Default is JSON. ARROW is more efficient than JSON at streaming a large sized response. + :type format: Optional[StreamingOutputFormat] + :param range: + :type range: Optional[TimeRange] + :param sdk_package_rid: The package rid of the generated SDK. + :type sdk_package_rid: Optional[SdkPackageRid] + :param sdk_version: The version of the generated SDK. + :type sdk_version: Optional[SdkVersion] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: bytes + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/timeseries/{property}/streamPoints", + query_params={ + "format": format, + "sdkPackageRid": sdk_package_rid, + "sdkVersion": sdk_version, + }, + path_params={ + "ontology": ontology, + "objectType": object_type, + "primaryKey": primary_key, + "property": property, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "*/*", + }, + body=ontologies_models.StreamTimeSeriesPointsRequest( + range=range, + aggregate=aggregate, + ), + response_type=bytes, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _TimeSeriesPropertyV2ClientRaw: + def __init__(self, client: TimeSeriesPropertyV2Client) -> None: + def get_first_point(_: typing.Optional[ontologies_models.TimeSeriesPoint]): ... + def get_last_point(_: typing.Optional[ontologies_models.TimeSeriesPoint]): ... + def stream_points(_: bytes): ... + + self.get_first_point = core.with_raw_response(get_first_point, client.get_first_point) + self.get_last_point = core.with_raw_response(get_last_point, client.get_last_point) + self.stream_points = core.with_raw_response(stream_points, client.stream_points) + + +class _TimeSeriesPropertyV2ClientStreaming: + def __init__(self, client: TimeSeriesPropertyV2Client) -> None: + def get_first_point(_: typing.Optional[ontologies_models.TimeSeriesPoint]): ... + def get_last_point(_: typing.Optional[ontologies_models.TimeSeriesPoint]): ... + def stream_points(_: bytes): ... + + self.get_first_point = core.with_streaming_response(get_first_point, client.get_first_point) + self.get_last_point = core.with_streaming_response(get_last_point, client.get_last_point) + self.stream_points = core.with_streaming_response(stream_points, client.stream_points) + + +class AsyncTimeSeriesPropertyV2Client: + """ + The API client for the TimeSeriesPropertyV2 Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncTimeSeriesPropertyV2ClientStreaming(self) + self.with_raw_response = _AsyncTimeSeriesPropertyV2ClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get_first_point( + self, + ontology: ontologies_models.OntologyIdentifier, + object_type: ontologies_models.ObjectTypeApiName, + primary_key: ontologies_models.PropertyValueEscapedString, + property: ontologies_models.PropertyApiName, + *, + sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, + sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[typing.Optional[ontologies_models.TimeSeriesPoint]]: + """ + Get the first point of a time series property. + + :param ontology: + :type ontology: OntologyIdentifier + :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. + :type object_type: ObjectTypeApiName + :param primary_key: The primary key of the object with the time series property. + :type primary_key: PropertyValueEscapedString + :param property: The API name of the time series property. To find the API name for your time series property, check the **Ontology Manager** or use the **Get object type** endpoint. + :type property: PropertyApiName + :param sdk_package_rid: The package rid of the generated SDK. + :type sdk_package_rid: Optional[SdkPackageRid] + :param sdk_version: The version of the generated SDK. + :type sdk_version: Optional[SdkVersion] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[typing.Optional[ontologies_models.TimeSeriesPoint]] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/timeseries/{property}/firstPoint", + query_params={ + "sdkPackageRid": sdk_package_rid, + "sdkVersion": sdk_version, + }, + path_params={ + "ontology": ontology, + "objectType": object_type, + "primaryKey": primary_key, + "property": property, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=typing.Optional[ontologies_models.TimeSeriesPoint], + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get_last_point( + self, + ontology: ontologies_models.OntologyIdentifier, + object_type: ontologies_models.ObjectTypeApiName, + primary_key: ontologies_models.PropertyValueEscapedString, + property: ontologies_models.PropertyApiName, + *, + sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, + sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[typing.Optional[ontologies_models.TimeSeriesPoint]]: + """ + Get the last point of a time series property. + + :param ontology: + :type ontology: OntologyIdentifier + :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. + :type object_type: ObjectTypeApiName + :param primary_key: The primary key of the object with the time series property. + :type primary_key: PropertyValueEscapedString + :param property: The API name of the time series property. To find the API name for your time series property, check the **Ontology Manager** or use the **Get object type** endpoint. + :type property: PropertyApiName + :param sdk_package_rid: The package rid of the generated SDK. + :type sdk_package_rid: Optional[SdkPackageRid] + :param sdk_version: The version of the generated SDK. + :type sdk_version: Optional[SdkVersion] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[typing.Optional[ontologies_models.TimeSeriesPoint]] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/timeseries/{property}/lastPoint", + query_params={ + "sdkPackageRid": sdk_package_rid, + "sdkVersion": sdk_version, + }, + path_params={ + "ontology": ontology, + "objectType": object_type, + "primaryKey": primary_key, + "property": property, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=typing.Optional[ontologies_models.TimeSeriesPoint], + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def stream_points( + self, + ontology: ontologies_models.OntologyIdentifier, + object_type: ontologies_models.ObjectTypeApiName, + primary_key: ontologies_models.PropertyValueEscapedString, + property: ontologies_models.PropertyApiName, + *, + aggregate: typing.Optional[ontologies_models.AggregateTimeSeries] = None, + format: typing.Optional[ontologies_models.StreamingOutputFormat] = None, + range: typing.Optional[ontologies_models.TimeRange] = None, + sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, + sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[bytes]: + """ + Stream all of the points of a time series property. + + :param ontology: + :type ontology: OntologyIdentifier + :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. + :type object_type: ObjectTypeApiName + :param primary_key: The primary key of the object with the time series property. + :type primary_key: PropertyValueEscapedString + :param property: The API name of the time series property. To find the API name for your time series property, check the **Ontology Manager** or use the **Get object type** endpoint. + :type property: PropertyApiName + :param aggregate: + :type aggregate: Optional[AggregateTimeSeries] + :param format: The output format to serialize the output binary stream in. Default is JSON. ARROW is more efficient than JSON at streaming a large sized response. + :type format: Optional[StreamingOutputFormat] + :param range: + :type range: Optional[TimeRange] + :param sdk_package_rid: The package rid of the generated SDK. + :type sdk_package_rid: Optional[SdkPackageRid] + :param sdk_version: The version of the generated SDK. + :type sdk_version: Optional[SdkVersion] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[bytes] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/timeseries/{property}/streamPoints", + query_params={ + "format": format, + "sdkPackageRid": sdk_package_rid, + "sdkVersion": sdk_version, + }, + path_params={ + "ontology": ontology, + "objectType": object_type, + "primaryKey": primary_key, + "property": property, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "*/*", + }, + body=ontologies_models.StreamTimeSeriesPointsRequest( + range=range, + aggregate=aggregate, + ), + response_type=bytes, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _AsyncTimeSeriesPropertyV2ClientRaw: + def __init__(self, client: AsyncTimeSeriesPropertyV2Client) -> None: + def get_first_point(_: typing.Optional[ontologies_models.TimeSeriesPoint]): ... + def get_last_point(_: typing.Optional[ontologies_models.TimeSeriesPoint]): ... + def stream_points(_: bytes): ... + + self.get_first_point = core.async_with_raw_response(get_first_point, client.get_first_point) + self.get_last_point = core.async_with_raw_response(get_last_point, client.get_last_point) + self.stream_points = core.async_with_raw_response(stream_points, client.stream_points) + + +class _AsyncTimeSeriesPropertyV2ClientStreaming: + def __init__(self, client: AsyncTimeSeriesPropertyV2Client) -> None: + def get_first_point(_: typing.Optional[ontologies_models.TimeSeriesPoint]): ... + def get_last_point(_: typing.Optional[ontologies_models.TimeSeriesPoint]): ... + def stream_points(_: bytes): ... + + self.get_first_point = core.async_with_streaming_response( + get_first_point, client.get_first_point + ) + self.get_last_point = core.async_with_streaming_response( + get_last_point, client.get_last_point + ) + self.stream_points = core.async_with_streaming_response(stream_points, client.stream_points) diff --git a/foundry_sdk/v2/ontologies/time_series_value_bank_property.py b/foundry_sdk/v2/ontologies/time_series_value_bank_property.py new file mode 100644 index 000000000..cbdf7dddf --- /dev/null +++ b/foundry_sdk/v2/ontologies/time_series_value_bank_property.py @@ -0,0 +1,369 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v2.ontologies import models as ontologies_models + + +class TimeSeriesValueBankPropertyClient: + """ + The API client for the TimeSeriesValueBankProperty Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _TimeSeriesValueBankPropertyClientStreaming(self) + self.with_raw_response = _TimeSeriesValueBankPropertyClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get_latest_value( + self, + ontology: ontologies_models.OntologyIdentifier, + object_type: ontologies_models.ObjectTypeApiName, + primary_key: ontologies_models.PropertyValueEscapedString, + property_name: ontologies_models.PropertyApiName, + *, + sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, + sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Optional[ontologies_models.TimeseriesEntry]: + """ + Get the latest value of a property backed by a timeseries. If a specific geotime series integration has both a history and a live integration, we will give precedence to the live integration. + + :param ontology: + :type ontology: OntologyIdentifier + :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. + :type object_type: ObjectTypeApiName + :param primary_key: The primary key of the object with the timeseries property. + :type primary_key: PropertyValueEscapedString + :param property_name: The API name of the timeseries property. To find the API name for your property value bank property, check the **Ontology Manager** or use the **Get object type** endpoint. + :type property_name: PropertyApiName + :param sdk_package_rid: The package rid of the generated SDK. + :type sdk_package_rid: Optional[SdkPackageRid] + :param sdk_version: The version of the generated SDK. + :type sdk_version: Optional[SdkVersion] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Optional[ontologies_models.TimeseriesEntry] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/timeseries/{propertyName}/latestValue", + query_params={ + "sdkPackageRid": sdk_package_rid, + "sdkVersion": sdk_version, + }, + path_params={ + "ontology": ontology, + "objectType": object_type, + "primaryKey": primary_key, + "propertyName": property_name, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=typing.Optional[ontologies_models.TimeseriesEntry], + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def stream_values( + self, + ontology: ontologies_models.OntologyIdentifier, + object_type: ontologies_models.ObjectTypeApiName, + primary_key: ontologies_models.PropertyValueEscapedString, + property: ontologies_models.PropertyApiName, + *, + range: typing.Optional[ontologies_models.TimeRange] = None, + sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, + sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> bytes: + """ + Stream all of the points of a time series property (this includes geotime series references). + + :param ontology: + :type ontology: OntologyIdentifier + :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. + :type object_type: ObjectTypeApiName + :param primary_key: The primary key of the object with the time series property. + :type primary_key: PropertyValueEscapedString + :param property: The API name of the time series backed property. To find the API name, check the **Ontology Manager** or use the **Get object type** endpoint. + :type property: PropertyApiName + :param range: + :type range: Optional[TimeRange] + :param sdk_package_rid: The package rid of the generated SDK. + :type sdk_package_rid: Optional[SdkPackageRid] + :param sdk_version: The version of the generated SDK. + :type sdk_version: Optional[SdkVersion] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: bytes + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/timeseries/{property}/streamValues", + query_params={ + "sdkPackageRid": sdk_package_rid, + "sdkVersion": sdk_version, + }, + path_params={ + "ontology": ontology, + "objectType": object_type, + "primaryKey": primary_key, + "property": property, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "*/*", + }, + body=ontologies_models.StreamTimeSeriesValuesRequest( + range=range, + ), + response_type=bytes, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _TimeSeriesValueBankPropertyClientRaw: + def __init__(self, client: TimeSeriesValueBankPropertyClient) -> None: + def get_latest_value(_: typing.Optional[ontologies_models.TimeseriesEntry]): ... + def stream_values(_: bytes): ... + + self.get_latest_value = core.with_raw_response(get_latest_value, client.get_latest_value) + self.stream_values = core.with_raw_response(stream_values, client.stream_values) + + +class _TimeSeriesValueBankPropertyClientStreaming: + def __init__(self, client: TimeSeriesValueBankPropertyClient) -> None: + def get_latest_value(_: typing.Optional[ontologies_models.TimeseriesEntry]): ... + def stream_values(_: bytes): ... + + self.get_latest_value = core.with_streaming_response( + get_latest_value, client.get_latest_value + ) + self.stream_values = core.with_streaming_response(stream_values, client.stream_values) + + +class AsyncTimeSeriesValueBankPropertyClient: + """ + The API client for the TimeSeriesValueBankProperty Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncTimeSeriesValueBankPropertyClientStreaming(self) + self.with_raw_response = _AsyncTimeSeriesValueBankPropertyClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get_latest_value( + self, + ontology: ontologies_models.OntologyIdentifier, + object_type: ontologies_models.ObjectTypeApiName, + primary_key: ontologies_models.PropertyValueEscapedString, + property_name: ontologies_models.PropertyApiName, + *, + sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, + sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[typing.Optional[ontologies_models.TimeseriesEntry]]: + """ + Get the latest value of a property backed by a timeseries. If a specific geotime series integration has both a history and a live integration, we will give precedence to the live integration. + + :param ontology: + :type ontology: OntologyIdentifier + :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. + :type object_type: ObjectTypeApiName + :param primary_key: The primary key of the object with the timeseries property. + :type primary_key: PropertyValueEscapedString + :param property_name: The API name of the timeseries property. To find the API name for your property value bank property, check the **Ontology Manager** or use the **Get object type** endpoint. + :type property_name: PropertyApiName + :param sdk_package_rid: The package rid of the generated SDK. + :type sdk_package_rid: Optional[SdkPackageRid] + :param sdk_version: The version of the generated SDK. + :type sdk_version: Optional[SdkVersion] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[typing.Optional[ontologies_models.TimeseriesEntry]] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/timeseries/{propertyName}/latestValue", + query_params={ + "sdkPackageRid": sdk_package_rid, + "sdkVersion": sdk_version, + }, + path_params={ + "ontology": ontology, + "objectType": object_type, + "primaryKey": primary_key, + "propertyName": property_name, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=typing.Optional[ontologies_models.TimeseriesEntry], + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def stream_values( + self, + ontology: ontologies_models.OntologyIdentifier, + object_type: ontologies_models.ObjectTypeApiName, + primary_key: ontologies_models.PropertyValueEscapedString, + property: ontologies_models.PropertyApiName, + *, + range: typing.Optional[ontologies_models.TimeRange] = None, + sdk_package_rid: typing.Optional[ontologies_models.SdkPackageRid] = None, + sdk_version: typing.Optional[ontologies_models.SdkVersion] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[bytes]: + """ + Stream all of the points of a time series property (this includes geotime series references). + + :param ontology: + :type ontology: OntologyIdentifier + :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. + :type object_type: ObjectTypeApiName + :param primary_key: The primary key of the object with the time series property. + :type primary_key: PropertyValueEscapedString + :param property: The API name of the time series backed property. To find the API name, check the **Ontology Manager** or use the **Get object type** endpoint. + :type property: PropertyApiName + :param range: + :type range: Optional[TimeRange] + :param sdk_package_rid: The package rid of the generated SDK. + :type sdk_package_rid: Optional[SdkPackageRid] + :param sdk_version: The version of the generated SDK. + :type sdk_version: Optional[SdkVersion] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[bytes] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/timeseries/{property}/streamValues", + query_params={ + "sdkPackageRid": sdk_package_rid, + "sdkVersion": sdk_version, + }, + path_params={ + "ontology": ontology, + "objectType": object_type, + "primaryKey": primary_key, + "property": property, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "*/*", + }, + body=ontologies_models.StreamTimeSeriesValuesRequest( + range=range, + ), + response_type=bytes, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _AsyncTimeSeriesValueBankPropertyClientRaw: + def __init__(self, client: AsyncTimeSeriesValueBankPropertyClient) -> None: + def get_latest_value(_: typing.Optional[ontologies_models.TimeseriesEntry]): ... + def stream_values(_: bytes): ... + + self.get_latest_value = core.async_with_raw_response( + get_latest_value, client.get_latest_value + ) + self.stream_values = core.async_with_raw_response(stream_values, client.stream_values) + + +class _AsyncTimeSeriesValueBankPropertyClientStreaming: + def __init__(self, client: AsyncTimeSeriesValueBankPropertyClient) -> None: + def get_latest_value(_: typing.Optional[ontologies_models.TimeseriesEntry]): ... + def stream_values(_: bytes): ... + + self.get_latest_value = core.async_with_streaming_response( + get_latest_value, client.get_latest_value + ) + self.stream_values = core.async_with_streaming_response(stream_values, client.stream_values) diff --git a/foundry_sdk/v2/orchestration/__init__.py b/foundry_sdk/v2/orchestration/__init__.py new file mode 100644 index 000000000..2eaef33bb --- /dev/null +++ b/foundry_sdk/v2/orchestration/__init__.py @@ -0,0 +1,22 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +from foundry_sdk.v2.orchestration._client import AsyncOrchestrationClient +from foundry_sdk.v2.orchestration._client import OrchestrationClient + +__all__ = [ + "OrchestrationClient", + "AsyncOrchestrationClient", +] diff --git a/foundry_sdk/v2/orchestration/_client.py b/foundry_sdk/v2/orchestration/_client.py new file mode 100644 index 000000000..e1f3f5578 --- /dev/null +++ b/foundry_sdk/v2/orchestration/_client.py @@ -0,0 +1,123 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing +from functools import cached_property + +from foundry_sdk import _core as core + + +class OrchestrationClient: + """ + The API client for the Orchestration Namespace. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + + @cached_property + def Build(self): + from foundry_sdk.v2.orchestration.build import BuildClient + + return BuildClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @cached_property + def Job(self): + from foundry_sdk.v2.orchestration.job import JobClient + + return JobClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @cached_property + def Schedule(self): + from foundry_sdk.v2.orchestration.schedule import ScheduleClient + + return ScheduleClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @cached_property + def ScheduleRun(self): + from foundry_sdk.v2.orchestration.schedule_run import ScheduleRunClient + + return ScheduleRunClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @cached_property + def ScheduleVersion(self): + from foundry_sdk.v2.orchestration.schedule_version import ScheduleVersionClient + + return ScheduleVersionClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + +class AsyncOrchestrationClient: + """ + The Async API client for the Orchestration Namespace. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + from foundry_sdk.v2.orchestration.build import AsyncBuildClient + from foundry_sdk.v2.orchestration.job import AsyncJobClient + from foundry_sdk.v2.orchestration.schedule import AsyncScheduleClient + from foundry_sdk.v2.orchestration.schedule_run import AsyncScheduleRunClient + from foundry_sdk.v2.orchestration.schedule_version import AsyncScheduleVersionClient # NOQA + + self.Build = AsyncBuildClient(auth=auth, hostname=hostname, config=config) + + self.Job = AsyncJobClient(auth=auth, hostname=hostname, config=config) + + self.Schedule = AsyncScheduleClient(auth=auth, hostname=hostname, config=config) + + self.ScheduleRun = AsyncScheduleRunClient(auth=auth, hostname=hostname, config=config) + + self.ScheduleVersion = AsyncScheduleVersionClient( + auth=auth, hostname=hostname, config=config + ) diff --git a/foundry_sdk/v2/orchestration/build.py b/foundry_sdk/v2/orchestration/build.py new file mode 100644 index 000000000..3e87a7f82 --- /dev/null +++ b/foundry_sdk/v2/orchestration/build.py @@ -0,0 +1,757 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing + +import annotated_types +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v2.core import models as core_models +from foundry_sdk.v2.datasets import models as datasets_models +from foundry_sdk.v2.orchestration import errors as orchestration_errors +from foundry_sdk.v2.orchestration import models as orchestration_models + + +class BuildClient: + """ + The API client for the Build Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _BuildClientStreaming(self) + self.with_raw_response = _BuildClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def cancel( + self, + build_rid: core_models.BuildRid, + *, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> None: + """ + Request a cancellation for all unfinished jobs in a build. The build's status will not update immediately. This endpoint is asynchronous and a success response indicates that the cancellation request has been acknowledged and the build is expected to be canceled soon. If the build has already finished or finishes shortly after the request and before the cancellation, the build will not change. + + :param build_rid: The RID of a Build. + :type build_rid: BuildRid + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: None + + :raises CancelBuildPermissionDenied: Could not cancel the Build. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/orchestration/builds/{buildRid}/cancel", + query_params={}, + path_params={ + "buildRid": build_rid, + }, + header_params={}, + body=None, + response_type=None, + request_timeout=request_timeout, + throwable_errors={ + "CancelBuildPermissionDenied": orchestration_errors.CancelBuildPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def create( + self, + *, + fallback_branches: orchestration_models.FallbackBranches, + target: orchestration_models.BuildTarget, + abort_on_failure: typing.Optional[orchestration_models.AbortOnFailure] = None, + branch_name: typing.Optional[datasets_models.BranchName] = None, + force_build: typing.Optional[orchestration_models.ForceBuild] = None, + notifications_enabled: typing.Optional[orchestration_models.NotificationsEnabled] = None, + retry_backoff_duration: typing.Optional[orchestration_models.RetryBackoffDuration] = None, + retry_count: typing.Optional[orchestration_models.RetryCount] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> orchestration_models.Build: + """ + + :param fallback_branches: + :type fallback_branches: FallbackBranches + :param target: The targets of the schedule. + :type target: BuildTarget + :param abort_on_failure: + :type abort_on_failure: Optional[AbortOnFailure] + :param branch_name: The target branch the build should run on. + :type branch_name: Optional[BranchName] + :param force_build: + :type force_build: Optional[ForceBuild] + :param notifications_enabled: + :type notifications_enabled: Optional[NotificationsEnabled] + :param retry_backoff_duration: + :type retry_backoff_duration: Optional[RetryBackoffDuration] + :param retry_count: The number of retry attempts for failed jobs. + :type retry_count: Optional[RetryCount] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: orchestration_models.Build + + :raises CreateBuildPermissionDenied: Could not create the Build. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/orchestration/builds/create", + query_params={}, + path_params={}, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=orchestration_models.CreateBuildRequest( + target=target, + branch_name=branch_name, + fallback_branches=fallback_branches, + force_build=force_build, + retry_count=retry_count, + retry_backoff_duration=retry_backoff_duration, + abort_on_failure=abort_on_failure, + notifications_enabled=notifications_enabled, + ), + response_type=orchestration_models.Build, + request_timeout=request_timeout, + throwable_errors={ + "CreateBuildPermissionDenied": orchestration_errors.CreateBuildPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + build_rid: core_models.BuildRid, + *, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> orchestration_models.Build: + """ + Get the Build with the specified rid. + :param build_rid: The RID of a Build. + :type build_rid: BuildRid + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: orchestration_models.Build + + :raises BuildNotFound: The given Build could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/orchestration/builds/{buildRid}", + query_params={}, + path_params={ + "buildRid": build_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=orchestration_models.Build, + request_timeout=request_timeout, + throwable_errors={ + "BuildNotFound": orchestration_errors.BuildNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get_batch( + self, + body: typing_extensions.Annotated[ + typing.List[orchestration_models.GetBuildsBatchRequestElement], + annotated_types.Len(min_length=1, max_length=100), + ], + *, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> orchestration_models.GetBuildsBatchResponse: + """ + Execute multiple get requests on Build. + + The maximum batch size for this endpoint is 100. + :param body: Body of the request + :type body: List[GetBuildsBatchRequestElement] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: orchestration_models.GetBuildsBatchResponse + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/orchestration/builds/getBatch", + query_params={}, + path_params={}, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=body, + response_type=orchestration_models.GetBuildsBatchResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def jobs( + self, + build_rid: core_models.BuildRid, + *, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.ResourceIterator[orchestration_models.Job]: + """ + Get the Jobs in the Build. + :param build_rid: The RID of a Build. + :type build_rid: BuildRid + :param page_size: The page size to use for the endpoint. + :type page_size: Optional[PageSize] + :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. + :type page_token: Optional[PageToken] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.ResourceIterator[orchestration_models.Job] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/orchestration/builds/{buildRid}/jobs", + query_params={ + "pageSize": page_size, + "pageToken": page_token, + }, + path_params={ + "buildRid": build_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=orchestration_models.ListJobsOfBuildResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def search( + self, + *, + where: orchestration_models.SearchBuildsFilter, + order_by: typing.Optional[orchestration_models.SearchBuildsOrderBy] = None, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> orchestration_models.SearchBuildsResponse: + """ + Search for Builds. + :param where: + :type where: SearchBuildsFilter + :param order_by: + :type order_by: Optional[SearchBuildsOrderBy] + :param page_size: The page size for the search request. If no value is provided, a default of `100` will be used. + :type page_size: Optional[PageSize] + :param page_token: + :type page_token: Optional[PageToken] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: orchestration_models.SearchBuildsResponse + + :raises SearchBuildsPermissionDenied: Could not search the Build. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/orchestration/builds/search", + query_params={ + "preview": preview, + }, + path_params={}, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=orchestration_models.SearchBuildsRequest( + where=where, + order_by=order_by, + page_token=page_token, + page_size=page_size, + ), + response_type=orchestration_models.SearchBuildsResponse, + request_timeout=request_timeout, + throwable_errors={ + "SearchBuildsPermissionDenied": orchestration_errors.SearchBuildsPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _BuildClientRaw: + def __init__(self, client: BuildClient) -> None: + def cancel(_: None): ... + def create(_: orchestration_models.Build): ... + def get(_: orchestration_models.Build): ... + def get_batch(_: orchestration_models.GetBuildsBatchResponse): ... + def jobs(_: orchestration_models.ListJobsOfBuildResponse): ... + def search(_: orchestration_models.SearchBuildsResponse): ... + + self.cancel = core.with_raw_response(cancel, client.cancel) + self.create = core.with_raw_response(create, client.create) + self.get = core.with_raw_response(get, client.get) + self.get_batch = core.with_raw_response(get_batch, client.get_batch) + self.jobs = core.with_raw_response(jobs, client.jobs) + self.search = core.with_raw_response(search, client.search) + + +class _BuildClientStreaming: + def __init__(self, client: BuildClient) -> None: + def create(_: orchestration_models.Build): ... + def get(_: orchestration_models.Build): ... + def get_batch(_: orchestration_models.GetBuildsBatchResponse): ... + def jobs(_: orchestration_models.ListJobsOfBuildResponse): ... + def search(_: orchestration_models.SearchBuildsResponse): ... + + self.create = core.with_streaming_response(create, client.create) + self.get = core.with_streaming_response(get, client.get) + self.get_batch = core.with_streaming_response(get_batch, client.get_batch) + self.jobs = core.with_streaming_response(jobs, client.jobs) + self.search = core.with_streaming_response(search, client.search) + + +class AsyncBuildClient: + """ + The API client for the Build Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncBuildClientStreaming(self) + self.with_raw_response = _AsyncBuildClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def cancel( + self, + build_rid: core_models.BuildRid, + *, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[None]: + """ + Request a cancellation for all unfinished jobs in a build. The build's status will not update immediately. This endpoint is asynchronous and a success response indicates that the cancellation request has been acknowledged and the build is expected to be canceled soon. If the build has already finished or finishes shortly after the request and before the cancellation, the build will not change. + + :param build_rid: The RID of a Build. + :type build_rid: BuildRid + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[None] + + :raises CancelBuildPermissionDenied: Could not cancel the Build. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/orchestration/builds/{buildRid}/cancel", + query_params={}, + path_params={ + "buildRid": build_rid, + }, + header_params={}, + body=None, + response_type=None, + request_timeout=request_timeout, + throwable_errors={ + "CancelBuildPermissionDenied": orchestration_errors.CancelBuildPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def create( + self, + *, + fallback_branches: orchestration_models.FallbackBranches, + target: orchestration_models.BuildTarget, + abort_on_failure: typing.Optional[orchestration_models.AbortOnFailure] = None, + branch_name: typing.Optional[datasets_models.BranchName] = None, + force_build: typing.Optional[orchestration_models.ForceBuild] = None, + notifications_enabled: typing.Optional[orchestration_models.NotificationsEnabled] = None, + retry_backoff_duration: typing.Optional[orchestration_models.RetryBackoffDuration] = None, + retry_count: typing.Optional[orchestration_models.RetryCount] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[orchestration_models.Build]: + """ + + :param fallback_branches: + :type fallback_branches: FallbackBranches + :param target: The targets of the schedule. + :type target: BuildTarget + :param abort_on_failure: + :type abort_on_failure: Optional[AbortOnFailure] + :param branch_name: The target branch the build should run on. + :type branch_name: Optional[BranchName] + :param force_build: + :type force_build: Optional[ForceBuild] + :param notifications_enabled: + :type notifications_enabled: Optional[NotificationsEnabled] + :param retry_backoff_duration: + :type retry_backoff_duration: Optional[RetryBackoffDuration] + :param retry_count: The number of retry attempts for failed jobs. + :type retry_count: Optional[RetryCount] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[orchestration_models.Build] + + :raises CreateBuildPermissionDenied: Could not create the Build. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/orchestration/builds/create", + query_params={}, + path_params={}, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=orchestration_models.CreateBuildRequest( + target=target, + branch_name=branch_name, + fallback_branches=fallback_branches, + force_build=force_build, + retry_count=retry_count, + retry_backoff_duration=retry_backoff_duration, + abort_on_failure=abort_on_failure, + notifications_enabled=notifications_enabled, + ), + response_type=orchestration_models.Build, + request_timeout=request_timeout, + throwable_errors={ + "CreateBuildPermissionDenied": orchestration_errors.CreateBuildPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + build_rid: core_models.BuildRid, + *, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[orchestration_models.Build]: + """ + Get the Build with the specified rid. + :param build_rid: The RID of a Build. + :type build_rid: BuildRid + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[orchestration_models.Build] + + :raises BuildNotFound: The given Build could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/orchestration/builds/{buildRid}", + query_params={}, + path_params={ + "buildRid": build_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=orchestration_models.Build, + request_timeout=request_timeout, + throwable_errors={ + "BuildNotFound": orchestration_errors.BuildNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get_batch( + self, + body: typing_extensions.Annotated[ + typing.List[orchestration_models.GetBuildsBatchRequestElement], + annotated_types.Len(min_length=1, max_length=100), + ], + *, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[orchestration_models.GetBuildsBatchResponse]: + """ + Execute multiple get requests on Build. + + The maximum batch size for this endpoint is 100. + :param body: Body of the request + :type body: List[GetBuildsBatchRequestElement] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[orchestration_models.GetBuildsBatchResponse] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/orchestration/builds/getBatch", + query_params={}, + path_params={}, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=body, + response_type=orchestration_models.GetBuildsBatchResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def jobs( + self, + build_rid: core_models.BuildRid, + *, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.AsyncResourceIterator[orchestration_models.Job]: + """ + Get the Jobs in the Build. + :param build_rid: The RID of a Build. + :type build_rid: BuildRid + :param page_size: The page size to use for the endpoint. + :type page_size: Optional[PageSize] + :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. + :type page_token: Optional[PageToken] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.AsyncResourceIterator[orchestration_models.Job] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/orchestration/builds/{buildRid}/jobs", + query_params={ + "pageSize": page_size, + "pageToken": page_token, + }, + path_params={ + "buildRid": build_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=orchestration_models.ListJobsOfBuildResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def search( + self, + *, + where: orchestration_models.SearchBuildsFilter, + order_by: typing.Optional[orchestration_models.SearchBuildsOrderBy] = None, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[orchestration_models.SearchBuildsResponse]: + """ + Search for Builds. + :param where: + :type where: SearchBuildsFilter + :param order_by: + :type order_by: Optional[SearchBuildsOrderBy] + :param page_size: The page size for the search request. If no value is provided, a default of `100` will be used. + :type page_size: Optional[PageSize] + :param page_token: + :type page_token: Optional[PageToken] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[orchestration_models.SearchBuildsResponse] + + :raises SearchBuildsPermissionDenied: Could not search the Build. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/orchestration/builds/search", + query_params={ + "preview": preview, + }, + path_params={}, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=orchestration_models.SearchBuildsRequest( + where=where, + order_by=order_by, + page_token=page_token, + page_size=page_size, + ), + response_type=orchestration_models.SearchBuildsResponse, + request_timeout=request_timeout, + throwable_errors={ + "SearchBuildsPermissionDenied": orchestration_errors.SearchBuildsPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _AsyncBuildClientRaw: + def __init__(self, client: AsyncBuildClient) -> None: + def cancel(_: None): ... + def create(_: orchestration_models.Build): ... + def get(_: orchestration_models.Build): ... + def get_batch(_: orchestration_models.GetBuildsBatchResponse): ... + def jobs(_: orchestration_models.ListJobsOfBuildResponse): ... + def search(_: orchestration_models.SearchBuildsResponse): ... + + self.cancel = core.async_with_raw_response(cancel, client.cancel) + self.create = core.async_with_raw_response(create, client.create) + self.get = core.async_with_raw_response(get, client.get) + self.get_batch = core.async_with_raw_response(get_batch, client.get_batch) + self.jobs = core.async_with_raw_response(jobs, client.jobs) + self.search = core.async_with_raw_response(search, client.search) + + +class _AsyncBuildClientStreaming: + def __init__(self, client: AsyncBuildClient) -> None: + def create(_: orchestration_models.Build): ... + def get(_: orchestration_models.Build): ... + def get_batch(_: orchestration_models.GetBuildsBatchResponse): ... + def jobs(_: orchestration_models.ListJobsOfBuildResponse): ... + def search(_: orchestration_models.SearchBuildsResponse): ... + + self.create = core.async_with_streaming_response(create, client.create) + self.get = core.async_with_streaming_response(get, client.get) + self.get_batch = core.async_with_streaming_response(get_batch, client.get_batch) + self.jobs = core.async_with_streaming_response(jobs, client.jobs) + self.search = core.async_with_streaming_response(search, client.search) diff --git a/foundry_sdk/v2/orchestration/errors.py b/foundry_sdk/v2/orchestration/errors.py new file mode 100644 index 000000000..f5bdf14f6 --- /dev/null +++ b/foundry_sdk/v2/orchestration/errors.py @@ -0,0 +1,574 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing +from dataclasses import dataclass + +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v2.core import models as core_models +from foundry_sdk.v2.orchestration import models as orchestration_models + + +class BuildInputsNotFoundParameters(typing_extensions.TypedDict): + """The given build inputs could be found.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + resourceRids: typing.List[core.RID] + + +@dataclass +class BuildInputsNotFound(errors.NotFoundError): + name: typing.Literal["BuildInputsNotFound"] + parameters: BuildInputsNotFoundParameters + error_instance_id: str + + +class BuildInputsPermissionDeniedParameters(typing_extensions.TypedDict): + """The provided token does not have permission to use the given resources as inputs to the build.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + resourceRids: typing.List[core.RID] + + +@dataclass +class BuildInputsPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["BuildInputsPermissionDenied"] + parameters: BuildInputsPermissionDeniedParameters + error_instance_id: str + + +class BuildNotFoundParameters(typing_extensions.TypedDict): + """The given Build could not be found.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + buildRid: core_models.BuildRid + """The RID of a Build.""" + + +@dataclass +class BuildNotFound(errors.NotFoundError): + name: typing.Literal["BuildNotFound"] + parameters: BuildNotFoundParameters + error_instance_id: str + + +class BuildNotRunningParameters(typing_extensions.TypedDict): + """The build is not currently running.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + buildRid: core_models.BuildRid + + +@dataclass +class BuildNotRunning(errors.BadRequestError): + name: typing.Literal["BuildNotRunning"] + parameters: BuildNotRunningParameters + error_instance_id: str + + +class BuildTargetsMissingJobSpecsParameters(typing_extensions.TypedDict): + """The action targets are missing job specs.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + resourceRids: typing.List[core.RID] + + +@dataclass +class BuildTargetsMissingJobSpecs(errors.BadRequestError): + name: typing.Literal["BuildTargetsMissingJobSpecs"] + parameters: BuildTargetsMissingJobSpecsParameters + error_instance_id: str + + +class BuildTargetsNotFoundParameters(typing_extensions.TypedDict): + """The given build targets could not be found.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + resourceRids: typing.List[core.RID] + + +@dataclass +class BuildTargetsNotFound(errors.NotFoundError): + name: typing.Literal["BuildTargetsNotFound"] + parameters: BuildTargetsNotFoundParameters + error_instance_id: str + + +class BuildTargetsPermissionDeniedParameters(typing_extensions.TypedDict): + """The provided token does not have permission to build the given resources.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + resourceRids: typing.List[core.RID] + + +@dataclass +class BuildTargetsPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["BuildTargetsPermissionDenied"] + parameters: BuildTargetsPermissionDeniedParameters + error_instance_id: str + + +class BuildTargetsResolutionErrorParameters(typing_extensions.TypedDict): + """Unable to resolve the given target to a set of targets to build.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class BuildTargetsResolutionError(errors.BadRequestError): + name: typing.Literal["BuildTargetsResolutionError"] + parameters: BuildTargetsResolutionErrorParameters + error_instance_id: str + + +class BuildTargetsUpToDateParameters(typing_extensions.TypedDict): + """ + The build targets are up to date and no Build was created. To rebuild the targets regardless, + use the force build option when creating the Build. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class BuildTargetsUpToDate(errors.BadRequestError): + name: typing.Literal["BuildTargetsUpToDate"] + parameters: BuildTargetsUpToDateParameters + error_instance_id: str + + +class CancelBuildPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not cancel the Build.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + buildRid: core_models.BuildRid + """The RID of a Build.""" + + +@dataclass +class CancelBuildPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["CancelBuildPermissionDenied"] + parameters: CancelBuildPermissionDeniedParameters + error_instance_id: str + + +class CreateBuildPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not create the Build.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class CreateBuildPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["CreateBuildPermissionDenied"] + parameters: CreateBuildPermissionDeniedParameters + error_instance_id: str + + +class CreateSchedulePermissionDeniedParameters(typing_extensions.TypedDict): + """Could not create the Schedule.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class CreateSchedulePermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["CreateSchedulePermissionDenied"] + parameters: CreateSchedulePermissionDeniedParameters + error_instance_id: str + + +class DeleteSchedulePermissionDeniedParameters(typing_extensions.TypedDict): + """Could not delete the Schedule.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + scheduleRid: core_models.ScheduleRid + + +@dataclass +class DeleteSchedulePermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["DeleteSchedulePermissionDenied"] + parameters: DeleteSchedulePermissionDeniedParameters + error_instance_id: str + + +class GetAffectedResourcesSchedulePermissionDeniedParameters(typing_extensions.TypedDict): + """Could not getAffectedResources the Schedule.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + scheduleRid: core_models.ScheduleRid + + +@dataclass +class GetAffectedResourcesSchedulePermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["GetAffectedResourcesSchedulePermissionDenied"] + parameters: GetAffectedResourcesSchedulePermissionDeniedParameters + error_instance_id: str + + +class InvalidAndTriggerParameters(typing_extensions.TypedDict): + """The AND trigger should have at least one value.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class InvalidAndTrigger(errors.BadRequestError): + name: typing.Literal["InvalidAndTrigger"] + parameters: InvalidAndTriggerParameters + error_instance_id: str + + +class InvalidMediaSetTriggerParameters(typing_extensions.TypedDict): + """The given MediaSet rid is invalid.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + mediaSetRid: core_models.MediaSetRid + + +@dataclass +class InvalidMediaSetTrigger(errors.BadRequestError): + name: typing.Literal["InvalidMediaSetTrigger"] + parameters: InvalidMediaSetTriggerParameters + error_instance_id: str + + +class InvalidOrTriggerParameters(typing_extensions.TypedDict): + """The OR trigger should have at least one value.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class InvalidOrTrigger(errors.BadRequestError): + name: typing.Literal["InvalidOrTrigger"] + parameters: InvalidOrTriggerParameters + error_instance_id: str + + +class InvalidScheduleDescriptionParameters(typing_extensions.TypedDict): + """The schedule description is too long.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class InvalidScheduleDescription(errors.BadRequestError): + name: typing.Literal["InvalidScheduleDescription"] + parameters: InvalidScheduleDescriptionParameters + error_instance_id: str + + +class InvalidScheduleNameParameters(typing_extensions.TypedDict): + """The schedule name is too long.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class InvalidScheduleName(errors.BadRequestError): + name: typing.Literal["InvalidScheduleName"] + parameters: InvalidScheduleNameParameters + error_instance_id: str + + +class InvalidTimeTriggerParameters(typing_extensions.TypedDict): + """The schedule trigger cron expression is invalid.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + cronExpression: orchestration_models.CronExpression + + +@dataclass +class InvalidTimeTrigger(errors.BadRequestError): + name: typing.Literal["InvalidTimeTrigger"] + parameters: InvalidTimeTriggerParameters + error_instance_id: str + + +class JobNotFoundParameters(typing_extensions.TypedDict): + """The given Job could not be found.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + jobRid: core_models.JobRid + """The RID of a Job.""" + + +@dataclass +class JobNotFound(errors.NotFoundError): + name: typing.Literal["JobNotFound"] + parameters: JobNotFoundParameters + error_instance_id: str + + +class MissingBuildTargetsParameters(typing_extensions.TypedDict): + """The build target must contains at least one dataset target.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class MissingBuildTargets(errors.BadRequestError): + name: typing.Literal["MissingBuildTargets"] + parameters: MissingBuildTargetsParameters + error_instance_id: str + + +class MissingConnectingBuildInputsParameters(typing_extensions.TypedDict): + """The connecting build target must contains at least one input dataset target.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class MissingConnectingBuildInputs(errors.BadRequestError): + name: typing.Literal["MissingConnectingBuildInputs"] + parameters: MissingConnectingBuildInputsParameters + error_instance_id: str + + +class MissingTriggerParameters(typing_extensions.TypedDict): + """You must pass in a trigger when creating or updating a schedule.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class MissingTrigger(errors.BadRequestError): + name: typing.Literal["MissingTrigger"] + parameters: MissingTriggerParameters + error_instance_id: str + + +class PauseSchedulePermissionDeniedParameters(typing_extensions.TypedDict): + """Could not pause the Schedule.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + scheduleRid: core_models.ScheduleRid + + +@dataclass +class PauseSchedulePermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["PauseSchedulePermissionDenied"] + parameters: PauseSchedulePermissionDeniedParameters + error_instance_id: str + + +class ReplaceSchedulePermissionDeniedParameters(typing_extensions.TypedDict): + """Could not replace the Schedule.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + scheduleRid: core_models.ScheduleRid + + +@dataclass +class ReplaceSchedulePermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["ReplaceSchedulePermissionDenied"] + parameters: ReplaceSchedulePermissionDeniedParameters + error_instance_id: str + + +class RunSchedulePermissionDeniedParameters(typing_extensions.TypedDict): + """Could not run the Schedule.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + scheduleRid: core_models.ScheduleRid + + +@dataclass +class RunSchedulePermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["RunSchedulePermissionDenied"] + parameters: RunSchedulePermissionDeniedParameters + error_instance_id: str + + +class ScheduleAlreadyRunningParameters(typing_extensions.TypedDict): + """The target schedule is currently running.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + scheduleRid: core_models.ScheduleRid + + +@dataclass +class ScheduleAlreadyRunning(errors.ConflictError): + name: typing.Literal["ScheduleAlreadyRunning"] + parameters: ScheduleAlreadyRunningParameters + error_instance_id: str + + +class ScheduleNotFoundParameters(typing_extensions.TypedDict): + """The given Schedule could not be found.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + scheduleRid: core_models.ScheduleRid + + +@dataclass +class ScheduleNotFound(errors.NotFoundError): + name: typing.Literal["ScheduleNotFound"] + parameters: ScheduleNotFoundParameters + error_instance_id: str + + +class ScheduleTriggerResourcesNotFoundParameters(typing_extensions.TypedDict): + """The given resources in the schedule trigger could not be found.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + resourceRids: typing.List[core.RID] + + +@dataclass +class ScheduleTriggerResourcesNotFound(errors.NotFoundError): + name: typing.Literal["ScheduleTriggerResourcesNotFound"] + parameters: ScheduleTriggerResourcesNotFoundParameters + error_instance_id: str + + +class ScheduleTriggerResourcesPermissionDeniedParameters(typing_extensions.TypedDict): + """The provided token does not have permission to use the given resources as a schedule trigger.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + resourceRids: typing.List[core.RID] + + +@dataclass +class ScheduleTriggerResourcesPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["ScheduleTriggerResourcesPermissionDenied"] + parameters: ScheduleTriggerResourcesPermissionDeniedParameters + error_instance_id: str + + +class ScheduleVersionNotFoundParameters(typing_extensions.TypedDict): + """The given ScheduleVersion could not be found.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + scheduleVersionRid: orchestration_models.ScheduleVersionRid + """The RID of a schedule version""" + + +@dataclass +class ScheduleVersionNotFound(errors.NotFoundError): + name: typing.Literal["ScheduleVersionNotFound"] + parameters: ScheduleVersionNotFoundParameters + error_instance_id: str + + +class SearchBuildsPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not search the Build.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class SearchBuildsPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["SearchBuildsPermissionDenied"] + parameters: SearchBuildsPermissionDeniedParameters + error_instance_id: str + + +class TargetNotSupportedParameters(typing_extensions.TypedDict): + """ + The schedule target is not supported. The schedule target must be either a connecting target, upstream + target or list of single dataset targets. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + scheduleRid: core_models.ScheduleRid + + +@dataclass +class TargetNotSupported(errors.BadRequestError): + name: typing.Literal["TargetNotSupported"] + parameters: TargetNotSupportedParameters + error_instance_id: str + + +class UnpauseSchedulePermissionDeniedParameters(typing_extensions.TypedDict): + """Could not unpause the Schedule.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + scheduleRid: core_models.ScheduleRid + + +@dataclass +class UnpauseSchedulePermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["UnpauseSchedulePermissionDenied"] + parameters: UnpauseSchedulePermissionDeniedParameters + error_instance_id: str + + +__all__ = [ + "BuildInputsNotFound", + "BuildInputsPermissionDenied", + "BuildNotFound", + "BuildNotRunning", + "BuildTargetsMissingJobSpecs", + "BuildTargetsNotFound", + "BuildTargetsPermissionDenied", + "BuildTargetsResolutionError", + "BuildTargetsUpToDate", + "CancelBuildPermissionDenied", + "CreateBuildPermissionDenied", + "CreateSchedulePermissionDenied", + "DeleteSchedulePermissionDenied", + "GetAffectedResourcesSchedulePermissionDenied", + "InvalidAndTrigger", + "InvalidMediaSetTrigger", + "InvalidOrTrigger", + "InvalidScheduleDescription", + "InvalidScheduleName", + "InvalidTimeTrigger", + "JobNotFound", + "MissingBuildTargets", + "MissingConnectingBuildInputs", + "MissingTrigger", + "PauseSchedulePermissionDenied", + "ReplaceSchedulePermissionDenied", + "RunSchedulePermissionDenied", + "ScheduleAlreadyRunning", + "ScheduleNotFound", + "ScheduleTriggerResourcesNotFound", + "ScheduleTriggerResourcesPermissionDenied", + "ScheduleVersionNotFound", + "SearchBuildsPermissionDenied", + "TargetNotSupported", + "UnpauseSchedulePermissionDenied", +] diff --git a/foundry_sdk/v2/orchestration/job.py b/foundry_sdk/v2/orchestration/job.py new file mode 100644 index 000000000..609fb2820 --- /dev/null +++ b/foundry_sdk/v2/orchestration/job.py @@ -0,0 +1,302 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing + +import annotated_types +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v2.core import models as core_models +from foundry_sdk.v2.orchestration import errors as orchestration_errors +from foundry_sdk.v2.orchestration import models as orchestration_models + + +class JobClient: + """ + The API client for the Job Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _JobClientStreaming(self) + self.with_raw_response = _JobClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + job_rid: core_models.JobRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> orchestration_models.Job: + """ + Get the Job with the specified rid. + :param job_rid: The RID of a Job. + :type job_rid: JobRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: orchestration_models.Job + + :raises JobNotFound: The given Job could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/orchestration/jobs/{jobRid}", + query_params={ + "preview": preview, + }, + path_params={ + "jobRid": job_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=orchestration_models.Job, + request_timeout=request_timeout, + throwable_errors={ + "JobNotFound": orchestration_errors.JobNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get_batch( + self, + body: typing_extensions.Annotated[ + typing.List[orchestration_models.GetJobsBatchRequestElement], + annotated_types.Len(min_length=1, max_length=500), + ], + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> orchestration_models.GetJobsBatchResponse: + """ + Execute multiple get requests on Job. + + The maximum batch size for this endpoint is 500. + :param body: Body of the request + :type body: List[GetJobsBatchRequestElement] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: orchestration_models.GetJobsBatchResponse + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/orchestration/jobs/getBatch", + query_params={ + "preview": preview, + }, + path_params={}, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=body, + response_type=orchestration_models.GetJobsBatchResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _JobClientRaw: + def __init__(self, client: JobClient) -> None: + def get(_: orchestration_models.Job): ... + def get_batch(_: orchestration_models.GetJobsBatchResponse): ... + + self.get = core.with_raw_response(get, client.get) + self.get_batch = core.with_raw_response(get_batch, client.get_batch) + + +class _JobClientStreaming: + def __init__(self, client: JobClient) -> None: + def get(_: orchestration_models.Job): ... + def get_batch(_: orchestration_models.GetJobsBatchResponse): ... + + self.get = core.with_streaming_response(get, client.get) + self.get_batch = core.with_streaming_response(get_batch, client.get_batch) + + +class AsyncJobClient: + """ + The API client for the Job Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncJobClientStreaming(self) + self.with_raw_response = _AsyncJobClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + job_rid: core_models.JobRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[orchestration_models.Job]: + """ + Get the Job with the specified rid. + :param job_rid: The RID of a Job. + :type job_rid: JobRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[orchestration_models.Job] + + :raises JobNotFound: The given Job could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/orchestration/jobs/{jobRid}", + query_params={ + "preview": preview, + }, + path_params={ + "jobRid": job_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=orchestration_models.Job, + request_timeout=request_timeout, + throwable_errors={ + "JobNotFound": orchestration_errors.JobNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get_batch( + self, + body: typing_extensions.Annotated[ + typing.List[orchestration_models.GetJobsBatchRequestElement], + annotated_types.Len(min_length=1, max_length=500), + ], + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[orchestration_models.GetJobsBatchResponse]: + """ + Execute multiple get requests on Job. + + The maximum batch size for this endpoint is 500. + :param body: Body of the request + :type body: List[GetJobsBatchRequestElement] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[orchestration_models.GetJobsBatchResponse] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/orchestration/jobs/getBatch", + query_params={ + "preview": preview, + }, + path_params={}, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=body, + response_type=orchestration_models.GetJobsBatchResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _AsyncJobClientRaw: + def __init__(self, client: AsyncJobClient) -> None: + def get(_: orchestration_models.Job): ... + def get_batch(_: orchestration_models.GetJobsBatchResponse): ... + + self.get = core.async_with_raw_response(get, client.get) + self.get_batch = core.async_with_raw_response(get_batch, client.get_batch) + + +class _AsyncJobClientStreaming: + def __init__(self, client: AsyncJobClient) -> None: + def get(_: orchestration_models.Job): ... + def get_batch(_: orchestration_models.GetJobsBatchResponse): ... + + self.get = core.async_with_streaming_response(get, client.get) + self.get_batch = core.async_with_streaming_response(get_batch, client.get_batch) diff --git a/foundry_sdk/v2/orchestration/models.py b/foundry_sdk/v2/orchestration/models.py new file mode 100644 index 000000000..653c0cb70 --- /dev/null +++ b/foundry_sdk/v2/orchestration/models.py @@ -0,0 +1,963 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk.v2.core import models as core_models +from foundry_sdk.v2.datasets import models as datasets_models +from foundry_sdk.v2.filesystem import models as filesystem_models + +AbortOnFailure = bool +""" +If any job in the build is unsuccessful, immediately finish the +build by cancelling all other jobs. +""" + + +class Action(core.ModelBase): + """Action""" + + target: BuildTarget + branch_name: datasets_models.BranchName = pydantic.Field(alias=str("branchName")) # type: ignore[literal-required] + """The target branch the schedule should run on.""" + + fallback_branches: FallbackBranches = pydantic.Field(alias=str("fallbackBranches")) # type: ignore[literal-required] + force_build: ForceBuild = pydantic.Field(alias=str("forceBuild")) # type: ignore[literal-required] + retry_count: typing.Optional[RetryCount] = pydantic.Field(alias=str("retryCount"), default=None) # type: ignore[literal-required] + retry_backoff_duration: typing.Optional[RetryBackoffDuration] = pydantic.Field(alias=str("retryBackoffDuration"), default=None) # type: ignore[literal-required] + abort_on_failure: AbortOnFailure = pydantic.Field(alias=str("abortOnFailure")) # type: ignore[literal-required] + notifications_enabled: NotificationsEnabled = pydantic.Field(alias=str("notificationsEnabled")) # type: ignore[literal-required] + + +class AffectedResourcesResponse(core.ModelBase): + """AffectedResourcesResponse""" + + datasets: typing.List[BuildableRid] + + +class AndTrigger(core.ModelBase): + """Trigger after all of the given triggers emit an event.""" + + triggers: typing.List[Trigger] + type: typing.Literal["and"] = "and" + + +class Build(core.ModelBase): + """Build""" + + rid: core_models.BuildRid + """The RID of a Build.""" + + branch_name: datasets_models.BranchName = pydantic.Field(alias=str("branchName")) # type: ignore[literal-required] + """The branch that the build is running on.""" + + created_time: core_models.CreatedTime = pydantic.Field(alias=str("createdTime")) # type: ignore[literal-required] + """The timestamp that the build was created.""" + + created_by: core_models.CreatedBy = pydantic.Field(alias=str("createdBy")) # type: ignore[literal-required] + """The user who created the build.""" + + fallback_branches: FallbackBranches = pydantic.Field(alias=str("fallbackBranches")) # type: ignore[literal-required] + job_rids: typing.List[core_models.JobRid] = pydantic.Field(alias=str("jobRids")) # type: ignore[literal-required] + retry_count: RetryCount = pydantic.Field(alias=str("retryCount")) # type: ignore[literal-required] + retry_backoff_duration: RetryBackoffDuration = pydantic.Field(alias=str("retryBackoffDuration")) # type: ignore[literal-required] + abort_on_failure: AbortOnFailure = pydantic.Field(alias=str("abortOnFailure")) # type: ignore[literal-required] + status: BuildStatus + schedule_rid: typing.Optional[core_models.ScheduleRid] = pydantic.Field(alias=str("scheduleRid"), default=None) # type: ignore[literal-required] + """Schedule RID of the Schedule that triggered this build. If a user triggered the build, Schedule RID will be empty.""" + + +BuildStatus = typing.Literal["RUNNING", "SUCCEEDED", "FAILED", "CANCELED"] +"""The status of the build.""" + + +BuildTarget = typing_extensions.Annotated[ + typing.Union["UpstreamTarget", "ManualTarget", "ConnectingTarget"], + pydantic.Field(discriminator="type"), +] +"""The targets of the build.""" + + +BuildableRid = core.RID +""" +The Resource Identifier (RID) of a Resource that can be built. For example, this is a Dataset RID, Media Set +RID or Restricted View RID. +""" + + +class ConnectingTarget(core.ModelBase): + """ + All datasets between the input datasets (exclusive) and the + target datasets (inclusive) except for the datasets to ignore. + """ + + input_rids: typing.List[BuildableRid] = pydantic.Field(alias=str("inputRids")) # type: ignore[literal-required] + """The upstream input datasets (exclusive).""" + + target_rids: typing.List[BuildableRid] = pydantic.Field(alias=str("targetRids")) # type: ignore[literal-required] + """The downstream target datasets (inclusive).""" + + ignored_rids: typing.List[BuildableRid] = pydantic.Field(alias=str("ignoredRids")) # type: ignore[literal-required] + """The datasets between the input datasets and target datasets to exclude.""" + + type: typing.Literal["connecting"] = "connecting" + + +class CreateBuildRequest(core.ModelBase): + """CreateBuildRequest""" + + target: BuildTarget + """The targets of the schedule.""" + + branch_name: typing.Optional[datasets_models.BranchName] = pydantic.Field(alias=str("branchName"), default=None) # type: ignore[literal-required] + """The target branch the build should run on.""" + + fallback_branches: FallbackBranches = pydantic.Field(alias=str("fallbackBranches")) # type: ignore[literal-required] + force_build: typing.Optional[ForceBuild] = pydantic.Field(alias=str("forceBuild"), default=None) # type: ignore[literal-required] + retry_count: typing.Optional[RetryCount] = pydantic.Field(alias=str("retryCount"), default=None) # type: ignore[literal-required] + """The number of retry attempts for failed jobs.""" + + retry_backoff_duration: typing.Optional[RetryBackoffDuration] = pydantic.Field(alias=str("retryBackoffDuration"), default=None) # type: ignore[literal-required] + abort_on_failure: typing.Optional[AbortOnFailure] = pydantic.Field(alias=str("abortOnFailure"), default=None) # type: ignore[literal-required] + notifications_enabled: typing.Optional[NotificationsEnabled] = pydantic.Field(alias=str("notificationsEnabled"), default=None) # type: ignore[literal-required] + + +class CreateScheduleRequest(core.ModelBase): + """CreateScheduleRequest""" + + display_name: typing.Optional[str] = pydantic.Field(alias=str("displayName"), default=None) # type: ignore[literal-required] + description: typing.Optional[str] = None + action: CreateScheduleRequestAction + trigger: typing.Optional[Trigger] = None + """ + The schedule trigger. If the requesting user does not have + permission to see the trigger, this will be empty. + """ + + scope_mode: typing.Optional[CreateScheduleRequestScopeMode] = pydantic.Field(alias=str("scopeMode"), default=None) # type: ignore[literal-required] + + +class CreateScheduleRequestAction(core.ModelBase): + """CreateScheduleRequestAction""" + + abort_on_failure: typing.Optional[AbortOnFailure] = pydantic.Field(alias=str("abortOnFailure"), default=None) # type: ignore[literal-required] + force_build: typing.Optional[ForceBuild] = pydantic.Field(alias=str("forceBuild"), default=None) # type: ignore[literal-required] + retry_backoff_duration: typing.Optional[RetryBackoffDuration] = pydantic.Field(alias=str("retryBackoffDuration"), default=None) # type: ignore[literal-required] + retry_count: typing.Optional[RetryCount] = pydantic.Field(alias=str("retryCount"), default=None) # type: ignore[literal-required] + fallback_branches: typing.Optional[FallbackBranches] = pydantic.Field(alias=str("fallbackBranches"), default=None) # type: ignore[literal-required] + branch_name: typing.Optional[datasets_models.BranchName] = pydantic.Field(alias=str("branchName"), default=None) # type: ignore[literal-required] + """The target branch the schedule should run on.""" + + notifications_enabled: typing.Optional[NotificationsEnabled] = pydantic.Field(alias=str("notificationsEnabled"), default=None) # type: ignore[literal-required] + target: CreateScheduleRequestBuildTarget + + +CreateScheduleRequestBuildTarget = typing_extensions.Annotated[ + typing.Union[ + "CreateScheduleRequestUpstreamTarget", + "CreateScheduleRequestManualTarget", + "CreateScheduleRequestConnectingTarget", + ], + pydantic.Field(discriminator="type"), +] +"""The targets of the build.""" + + +class CreateScheduleRequestConnectingTarget(core.ModelBase): + """CreateScheduleRequestConnectingTarget""" + + ignored_rids: typing.Optional[typing.List[BuildableRid]] = pydantic.Field(alias=str("ignoredRids"), default=None) # type: ignore[literal-required] + """The datasets between the input datasets and target datasets to exclude.""" + + target_rids: typing.List[BuildableRid] = pydantic.Field(alias=str("targetRids")) # type: ignore[literal-required] + """The downstream target datasets (inclusive).""" + + input_rids: typing.List[BuildableRid] = pydantic.Field(alias=str("inputRids")) # type: ignore[literal-required] + """The upstream input datasets (exclusive).""" + + type: typing.Literal["connecting"] = "connecting" + + +class CreateScheduleRequestManualTarget(core.ModelBase): + """CreateScheduleRequestManualTarget""" + + target_rids: typing.List[BuildableRid] = pydantic.Field(alias=str("targetRids")) # type: ignore[literal-required] + type: typing.Literal["manual"] = "manual" + + +class CreateScheduleRequestProjectScope(core.ModelBase): + """CreateScheduleRequestProjectScope""" + + project_rids: typing.List[filesystem_models.ProjectRid] = pydantic.Field(alias=str("projectRids")) # type: ignore[literal-required] + type: typing.Literal["project"] = "project" + + +CreateScheduleRequestScopeMode = typing_extensions.Annotated[ + typing.Union["CreateScheduleRequestProjectScope", "CreateScheduleRequestUserScope"], + pydantic.Field(discriminator="type"), +] +"""The boundaries for the schedule build.""" + + +class CreateScheduleRequestUpstreamTarget(core.ModelBase): + """CreateScheduleRequestUpstreamTarget""" + + ignored_rids: typing.Optional[typing.List[BuildableRid]] = pydantic.Field(alias=str("ignoredRids"), default=None) # type: ignore[literal-required] + """The datasets to ignore when calculating the final set of dataset to build.""" + + target_rids: typing.List[BuildableRid] = pydantic.Field(alias=str("targetRids")) # type: ignore[literal-required] + """The target datasets.""" + + type: typing.Literal["upstream"] = "upstream" + + +class CreateScheduleRequestUserScope(core.ModelBase): + """CreateScheduleRequestUserScope""" + + type: typing.Literal["user"] = "user" + + +CronExpression = str +""" +A standard CRON expression with minute, hour, day, month +and day of week. +""" + + +class DatasetJobOutput(core.ModelBase): + """DatasetJobOutput""" + + dataset_rid: datasets_models.DatasetRid = pydantic.Field(alias=str("datasetRid")) # type: ignore[literal-required] + output_transaction_rid: typing.Optional[datasets_models.TransactionRid] = pydantic.Field(alias=str("outputTransactionRid"), default=None) # type: ignore[literal-required] + type: typing.Literal["datasetJobOutput"] = "datasetJobOutput" + + +class DatasetUpdatedTrigger(core.ModelBase): + """ + Trigger whenever a new transaction is committed to the + dataset on the target branch. + """ + + dataset_rid: datasets_models.DatasetRid = pydantic.Field(alias=str("datasetRid")) # type: ignore[literal-required] + branch_name: datasets_models.BranchName = pydantic.Field(alias=str("branchName")) # type: ignore[literal-required] + type: typing.Literal["datasetUpdated"] = "datasetUpdated" + + +FallbackBranches = typing.List[datasets_models.BranchName] +""" +The branches to retrieve JobSpecs from if no JobSpec is found on the +target branch. +""" + + +ForceBuild = bool +"""Whether to ignore staleness information when running the build.""" + + +class GetBuildsBatchRequestElement(core.ModelBase): + """GetBuildsBatchRequestElement""" + + build_rid: core_models.BuildRid = pydantic.Field(alias=str("buildRid")) # type: ignore[literal-required] + """The RID of a Build.""" + + +class GetBuildsBatchResponse(core.ModelBase): + """GetBuildsBatchResponse""" + + data: typing.Dict[core_models.BuildRid, Build] + + +class GetJobsBatchRequestElement(core.ModelBase): + """GetJobsBatchRequestElement""" + + job_rid: core_models.JobRid = pydantic.Field(alias=str("jobRid")) # type: ignore[literal-required] + """The RID of a Job.""" + + +class GetJobsBatchResponse(core.ModelBase): + """GetJobsBatchResponse""" + + data: typing.Dict[core_models.JobRid, Job] + + +class GetSchedulesBatchRequestElement(core.ModelBase): + """GetSchedulesBatchRequestElement""" + + schedule_rid: core_models.ScheduleRid = pydantic.Field(alias=str("scheduleRid")) # type: ignore[literal-required] + + +class GetSchedulesBatchResponse(core.ModelBase): + """GetSchedulesBatchResponse""" + + data: typing.Dict[core_models.ScheduleRid, Schedule] + + +class Job(core.ModelBase): + """Job""" + + rid: core_models.JobRid + """The RID of a Job.""" + + build_rid: core_models.BuildRid = pydantic.Field(alias=str("buildRid")) # type: ignore[literal-required] + """The RID of the Build that the Job belongs to.""" + + started_time: JobStartedTime = pydantic.Field(alias=str("startedTime")) # type: ignore[literal-required] + """The time this job started waiting for the dependencies to be resolved.""" + + latest_attempt_start_time: typing.Optional[core.AwareDatetime] = pydantic.Field(alias=str("latestAttemptStartTime"), default=None) # type: ignore[literal-required] + """The time this job's latest attempt started running. This field may be empty or outdated if the job failed to start.""" + + finished_time: typing.Optional[core.AwareDatetime] = pydantic.Field(alias=str("finishedTime"), default=None) # type: ignore[literal-required] + """The time this job was finished.""" + + job_status: JobStatus = pydantic.Field(alias=str("jobStatus")) # type: ignore[literal-required] + outputs: typing.List[JobOutput] + """ + Outputs of the Job. Only outputs with supported types are listed here; unsupported types are omitted. + Currently supported types are Dataset and Media Set outputs. + """ + + +JobOutput = typing_extensions.Annotated[ + typing.Union["DatasetJobOutput", "TransactionalMediaSetJobOutput"], + pydantic.Field(discriminator="type"), +] +"""Other types of Job Outputs exist in Foundry. Currently, only Dataset and Media Set are supported by the API.""" + + +JobStartedTime = core.AwareDatetime +"""The time this job started waiting for the dependencies to be resolved.""" + + +JobStatus = typing.Literal["WAITING", "RUNNING", "SUCCEEDED", "FAILED", "CANCELED", "DID_NOT_RUN"] +"""The status of the job.""" + + +class JobSucceededTrigger(core.ModelBase): + """ + Trigger whenever a job succeeds on the dataset and on the target + branch. + """ + + dataset_rid: datasets_models.DatasetRid = pydantic.Field(alias=str("datasetRid")) # type: ignore[literal-required] + branch_name: datasets_models.BranchName = pydantic.Field(alias=str("branchName")) # type: ignore[literal-required] + type: typing.Literal["jobSucceeded"] = "jobSucceeded" + + +class ListJobsOfBuildResponse(core.ModelBase): + """ListJobsOfBuildResponse""" + + data: typing.List[Job] + next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] + + +class ListRunsOfScheduleResponse(core.ModelBase): + """ListRunsOfScheduleResponse""" + + data: typing.List[ScheduleRun] + next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] + + +class ManualTarget(core.ModelBase): + """Manually specify all datasets to build.""" + + target_rids: typing.List[BuildableRid] = pydantic.Field(alias=str("targetRids")) # type: ignore[literal-required] + type: typing.Literal["manual"] = "manual" + + +class ManualTrigger(core.ModelBase): + """Only trigger the Schedule manually. If placed in an AND or OR condition, this Trigger will be ignored.""" + + type: typing.Literal["manual"] = "manual" + + +class MediaSetUpdatedTrigger(core.ModelBase): + """ + Trigger whenever an update is made to a media set on the target + branch. For transactional media sets, this happens when a transaction + is committed. For non-transactional media sets, this event happens + eventually (but not necessary immediately) after an update. + """ + + media_set_rid: core_models.MediaSetRid = pydantic.Field(alias=str("mediaSetRid")) # type: ignore[literal-required] + branch_name: datasets_models.BranchName = pydantic.Field(alias=str("branchName")) # type: ignore[literal-required] + type: typing.Literal["mediaSetUpdated"] = "mediaSetUpdated" + + +class NewLogicTrigger(core.ModelBase): + """ + Trigger whenever a new JobSpec is put on the dataset and on + that branch. + """ + + branch_name: datasets_models.BranchName = pydantic.Field(alias=str("branchName")) # type: ignore[literal-required] + dataset_rid: datasets_models.DatasetRid = pydantic.Field(alias=str("datasetRid")) # type: ignore[literal-required] + type: typing.Literal["newLogic"] = "newLogic" + + +NotificationsEnabled = bool +""" +Whether to receive a notification at the end of the build. +The notification will be sent to the user that has most recently edited the schedule. +No notification will be sent if the schedule has `scopeMode` set to `ProjectScope`. +""" + + +class OrTrigger(core.ModelBase): + """Trigger whenever any of the given triggers emit an event.""" + + triggers: typing.List[Trigger] + type: typing.Literal["or"] = "or" + + +class ProjectScope(core.ModelBase): + """The schedule will only build resources in the following projects.""" + + project_rids: typing.List[filesystem_models.ProjectRid] = pydantic.Field(alias=str("projectRids")) # type: ignore[literal-required] + type: typing.Literal["project"] = "project" + + +class ReplaceScheduleRequest(core.ModelBase): + """ReplaceScheduleRequest""" + + display_name: typing.Optional[str] = pydantic.Field(alias=str("displayName"), default=None) # type: ignore[literal-required] + description: typing.Optional[str] = None + action: ReplaceScheduleRequestAction + trigger: typing.Optional[Trigger] = None + """ + The schedule trigger. If the requesting user does not have + permission to see the trigger, this will be empty. + """ + + scope_mode: typing.Optional[ReplaceScheduleRequestScopeMode] = pydantic.Field(alias=str("scopeMode"), default=None) # type: ignore[literal-required] + + +class ReplaceScheduleRequestAction(core.ModelBase): + """ReplaceScheduleRequestAction""" + + abort_on_failure: typing.Optional[AbortOnFailure] = pydantic.Field(alias=str("abortOnFailure"), default=None) # type: ignore[literal-required] + force_build: typing.Optional[ForceBuild] = pydantic.Field(alias=str("forceBuild"), default=None) # type: ignore[literal-required] + retry_backoff_duration: typing.Optional[RetryBackoffDuration] = pydantic.Field(alias=str("retryBackoffDuration"), default=None) # type: ignore[literal-required] + retry_count: typing.Optional[RetryCount] = pydantic.Field(alias=str("retryCount"), default=None) # type: ignore[literal-required] + fallback_branches: typing.Optional[FallbackBranches] = pydantic.Field(alias=str("fallbackBranches"), default=None) # type: ignore[literal-required] + branch_name: typing.Optional[datasets_models.BranchName] = pydantic.Field(alias=str("branchName"), default=None) # type: ignore[literal-required] + """The target branch the schedule should run on.""" + + notifications_enabled: typing.Optional[NotificationsEnabled] = pydantic.Field(alias=str("notificationsEnabled"), default=None) # type: ignore[literal-required] + target: ReplaceScheduleRequestBuildTarget + + +ReplaceScheduleRequestBuildTarget = typing_extensions.Annotated[ + typing.Union[ + "ReplaceScheduleRequestUpstreamTarget", + "ReplaceScheduleRequestManualTarget", + "ReplaceScheduleRequestConnectingTarget", + ], + pydantic.Field(discriminator="type"), +] +"""The targets of the build.""" + + +class ReplaceScheduleRequestConnectingTarget(core.ModelBase): + """ReplaceScheduleRequestConnectingTarget""" + + ignored_rids: typing.Optional[typing.List[BuildableRid]] = pydantic.Field(alias=str("ignoredRids"), default=None) # type: ignore[literal-required] + """The datasets between the input datasets and target datasets to exclude.""" + + target_rids: typing.List[BuildableRid] = pydantic.Field(alias=str("targetRids")) # type: ignore[literal-required] + """The downstream target datasets (inclusive).""" + + input_rids: typing.List[BuildableRid] = pydantic.Field(alias=str("inputRids")) # type: ignore[literal-required] + """The upstream input datasets (exclusive).""" + + type: typing.Literal["connecting"] = "connecting" + + +class ReplaceScheduleRequestManualTarget(core.ModelBase): + """ReplaceScheduleRequestManualTarget""" + + target_rids: typing.List[BuildableRid] = pydantic.Field(alias=str("targetRids")) # type: ignore[literal-required] + type: typing.Literal["manual"] = "manual" + + +class ReplaceScheduleRequestProjectScope(core.ModelBase): + """ReplaceScheduleRequestProjectScope""" + + project_rids: typing.List[filesystem_models.ProjectRid] = pydantic.Field(alias=str("projectRids")) # type: ignore[literal-required] + type: typing.Literal["project"] = "project" + + +ReplaceScheduleRequestScopeMode = typing_extensions.Annotated[ + typing.Union["ReplaceScheduleRequestProjectScope", "ReplaceScheduleRequestUserScope"], + pydantic.Field(discriminator="type"), +] +"""The boundaries for the schedule build.""" + + +class ReplaceScheduleRequestUpstreamTarget(core.ModelBase): + """ReplaceScheduleRequestUpstreamTarget""" + + ignored_rids: typing.Optional[typing.List[BuildableRid]] = pydantic.Field(alias=str("ignoredRids"), default=None) # type: ignore[literal-required] + """The datasets to ignore when calculating the final set of dataset to build.""" + + target_rids: typing.List[BuildableRid] = pydantic.Field(alias=str("targetRids")) # type: ignore[literal-required] + """The target datasets.""" + + type: typing.Literal["upstream"] = "upstream" + + +class ReplaceScheduleRequestUserScope(core.ModelBase): + """ReplaceScheduleRequestUserScope""" + + type: typing.Literal["user"] = "user" + + +RetryCount = int +""" +The number of retry attempts for failed Jobs within the Build. A Job's failure is not considered final until +all retries have been attempted or an error occurs indicating that retries cannot be performed. Be aware, +not all types of failures can be retried. +""" + + +class Schedule(core.ModelBase): + """Schedule""" + + rid: core_models.ScheduleRid + display_name: typing.Optional[str] = pydantic.Field(alias=str("displayName"), default=None) # type: ignore[literal-required] + description: typing.Optional[str] = None + current_version_rid: ScheduleVersionRid = pydantic.Field(alias=str("currentVersionRid")) # type: ignore[literal-required] + """The RID of the current schedule version""" + + created_time: core_models.CreatedTime = pydantic.Field(alias=str("createdTime")) # type: ignore[literal-required] + created_by: core_models.CreatedBy = pydantic.Field(alias=str("createdBy")) # type: ignore[literal-required] + updated_time: core_models.UpdatedTime = pydantic.Field(alias=str("updatedTime")) # type: ignore[literal-required] + updated_by: core_models.UpdatedBy = pydantic.Field(alias=str("updatedBy")) # type: ignore[literal-required] + paused: SchedulePaused + trigger: typing.Optional[Trigger] = None + """ + The schedule trigger. If the requesting user does not have + permission to see the trigger, this will be empty. + """ + + action: Action + scope_mode: ScopeMode = pydantic.Field(alias=str("scopeMode")) # type: ignore[literal-required] + + +SchedulePaused = bool +"""SchedulePaused""" + + +class ScheduleRun(core.ModelBase): + """ScheduleRun""" + + rid: ScheduleRunRid + """The RID of a schedule run""" + + schedule_rid: core_models.ScheduleRid = pydantic.Field(alias=str("scheduleRid")) # type: ignore[literal-required] + schedule_version_rid: ScheduleVersionRid = pydantic.Field(alias=str("scheduleVersionRid")) # type: ignore[literal-required] + created_time: core_models.CreatedTime = pydantic.Field(alias=str("createdTime")) # type: ignore[literal-required] + """The time at which the schedule run was created.""" + + created_by: typing.Optional[core_models.CreatedBy] = pydantic.Field(alias=str("createdBy"), default=None) # type: ignore[literal-required] + """ + The Foundry user who manually invoked this schedule run. Automatic trigger runs have this field set to + empty. + """ + + result: typing.Optional[ScheduleRunResult] = None + """ + The result of triggering the schedule. If empty, it means the service + is still working on triggering the schedule. + """ + + +class ScheduleRunError(core.ModelBase): + """An error occurred attempting to run the schedule.""" + + error_name: ScheduleRunErrorName = pydantic.Field(alias=str("errorName")) # type: ignore[literal-required] + description: str + type: typing.Literal["error"] = "error" + + +ScheduleRunErrorName = typing.Literal[ + "TargetResolutionFailure", + "CyclicDependency", + "IncompatibleTargets", + "PermissionDenied", + "JobSpecNotFound", + "ScheduleOwnerNotFound", + "Internal", +] +"""ScheduleRunErrorName""" + + +class ScheduleRunIgnored(core.ModelBase): + """The schedule is not running as all targets are up-to-date.""" + + type: typing.Literal["ignored"] = "ignored" + + +ScheduleRunResult = typing_extensions.Annotated[ + typing.Union["ScheduleRunIgnored", "ScheduleRunSubmitted", "ScheduleRunError"], + pydantic.Field(discriminator="type"), +] +""" +The result of attempting to trigger the schedule. The schedule run will either be submitted as a build, +ignored if all targets are up-to-date or error. +""" + + +ScheduleRunRid = core.RID +"""The RID of a schedule run""" + + +class ScheduleRunSubmitted(core.ModelBase): + """The schedule has been successfully triggered.""" + + build_rid: core_models.BuildRid = pydantic.Field(alias=str("buildRid")) # type: ignore[literal-required] + type: typing.Literal["submitted"] = "submitted" + + +class ScheduleSucceededTrigger(core.ModelBase): + """ + Trigger whenever the specified schedule completes its action + successfully. + """ + + schedule_rid: core_models.ScheduleRid = pydantic.Field(alias=str("scheduleRid")) # type: ignore[literal-required] + type: typing.Literal["scheduleSucceeded"] = "scheduleSucceeded" + + +class ScheduleVersion(core.ModelBase): + """ScheduleVersion""" + + rid: ScheduleVersionRid + """The RID of a schedule version""" + + schedule_rid: core_models.ScheduleRid = pydantic.Field(alias=str("scheduleRid")) # type: ignore[literal-required] + created_time: core_models.CreatedTime = pydantic.Field(alias=str("createdTime")) # type: ignore[literal-required] + """The time the schedule version was created""" + + created_by: core_models.CreatedBy = pydantic.Field(alias=str("createdBy")) # type: ignore[literal-required] + """The Foundry user who created the schedule version""" + + trigger: typing.Optional[Trigger] = None + action: Action + scope_mode: ScopeMode = pydantic.Field(alias=str("scopeMode")) # type: ignore[literal-required] + + +ScheduleVersionRid = core.RID +"""The RID of a schedule version""" + + +ScopeMode = typing_extensions.Annotated[ + typing.Union["ProjectScope", "UserScope"], pydantic.Field(discriminator="type") +] +"""The boundaries for the schedule build.""" + + +class SearchBuildsAndFilter(core.ModelBase): + """Returns the Builds where every filter is satisfied.""" + + items: typing.List[SearchBuildsFilter] + type: typing.Literal["and"] = "and" + + +class SearchBuildsEqualsFilter(core.ModelBase): + """SearchBuildsEqualsFilter""" + + field: SearchBuildsEqualsFilterField + value: typing.Any + type: typing.Literal["eq"] = "eq" + + +SearchBuildsEqualsFilterField = typing.Literal["CREATED_BY", "BRANCH_NAME", "STATUS", "RID"] +"""SearchBuildsEqualsFilterField""" + + +SearchBuildsFilter = typing_extensions.Annotated[ + typing.Union[ + "SearchBuildsNotFilter", + "SearchBuildsOrFilter", + "SearchBuildsAndFilter", + "SearchBuildsLtFilter", + "SearchBuildsGteFilter", + "SearchBuildsEqualsFilter", + ], + pydantic.Field(discriminator="type"), +] +"""SearchBuildsFilter""" + + +class SearchBuildsGteFilter(core.ModelBase): + """SearchBuildsGteFilter""" + + field: SearchBuildsGteFilterField + value: typing.Any + type: typing.Literal["gte"] = "gte" + + +SearchBuildsGteFilterField = typing.Literal["STARTED_TIME", "FINISHED_TIME"] +"""SearchBuildsGteFilterField""" + + +class SearchBuildsLtFilter(core.ModelBase): + """SearchBuildsLtFilter""" + + field: SearchBuildsLtFilterField + value: typing.Any + type: typing.Literal["lt"] = "lt" + + +SearchBuildsLtFilterField = typing.Literal["STARTED_TIME", "FINISHED_TIME"] +"""SearchBuildsLtFilterField""" + + +class SearchBuildsNotFilter(core.ModelBase): + """Returns the Builds where the filter is not satisfied.""" + + value: SearchBuildsFilter + type: typing.Literal["not"] = "not" + + +class SearchBuildsOrFilter(core.ModelBase): + """Returns the Builds where at least one filter is satisfied.""" + + items: typing.List[SearchBuildsFilter] + type: typing.Literal["or"] = "or" + + +class SearchBuildsOrderBy(core.ModelBase): + """SearchBuildsOrderBy""" + + fields: typing.List[SearchBuildsOrderByItem] + + +SearchBuildsOrderByField = typing.Literal["STARTED_TIME", "FINISHED_TIME"] +"""SearchBuildsOrderByField""" + + +class SearchBuildsOrderByItem(core.ModelBase): + """SearchBuildsOrderByItem""" + + field: SearchBuildsOrderByField + direction: core_models.OrderByDirection + + +class SearchBuildsRequest(core.ModelBase): + """SearchBuildsRequest""" + + where: SearchBuildsFilter + order_by: typing.Optional[SearchBuildsOrderBy] = pydantic.Field(alias=str("orderBy"), default=None) # type: ignore[literal-required] + page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("pageToken"), default=None) # type: ignore[literal-required] + page_size: typing.Optional[core_models.PageSize] = pydantic.Field(alias=str("pageSize"), default=None) # type: ignore[literal-required] + """The page size for the search request. If no value is provided, a default of `100` will be used.""" + + +class SearchBuildsResponse(core.ModelBase): + """SearchBuildsResponse""" + + data: typing.List[Build] + next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] + + +class TableUpdatedTrigger(core.ModelBase): + """ + Trigger whenever a new transaction is committed to the + table on the target branch. + """ + + table_rid: core_models.TableRid = pydantic.Field(alias=str("tableRid")) # type: ignore[literal-required] + branch_name: datasets_models.BranchName = pydantic.Field(alias=str("branchName")) # type: ignore[literal-required] + type: typing.Literal["tableUpdated"] = "tableUpdated" + + +class TimeTrigger(core.ModelBase): + """Trigger on a time based schedule.""" + + cron_expression: CronExpression = pydantic.Field(alias=str("cronExpression")) # type: ignore[literal-required] + time_zone: core_models.ZoneId = pydantic.Field(alias=str("timeZone")) # type: ignore[literal-required] + type: typing.Literal["time"] = "time" + + +class TransactionalMediaSetJobOutput(core.ModelBase): + """TransactionalMediaSetJobOutput""" + + media_set_rid: core_models.MediaSetRid = pydantic.Field(alias=str("mediaSetRid")) # type: ignore[literal-required] + transaction_id: typing.Optional[str] = pydantic.Field(alias=str("transactionId"), default=None) # type: ignore[literal-required] + type: typing.Literal["transactionalMediaSetJobOutput"] = "transactionalMediaSetJobOutput" + + +Trigger = typing_extensions.Annotated[ + typing.Union[ + "JobSucceededTrigger", + "OrTrigger", + "NewLogicTrigger", + "TableUpdatedTrigger", + "AndTrigger", + "DatasetUpdatedTrigger", + "ScheduleSucceededTrigger", + "MediaSetUpdatedTrigger", + "TimeTrigger", + "ManualTrigger", + ], + pydantic.Field(discriminator="type"), +] +"""Trigger""" + + +class UpstreamTarget(core.ModelBase): + """Target the specified datasets along with all upstream datasets except the ignored datasets.""" + + target_rids: typing.List[BuildableRid] = pydantic.Field(alias=str("targetRids")) # type: ignore[literal-required] + """The target datasets.""" + + ignored_rids: typing.List[BuildableRid] = pydantic.Field(alias=str("ignoredRids")) # type: ignore[literal-required] + """The datasets to ignore when calculating the final set of dataset to build.""" + + type: typing.Literal["upstream"] = "upstream" + + +class UserScope(core.ModelBase): + """ + When triggered, the schedule will build all resources that the + associated user is permitted to build. + """ + + type: typing.Literal["user"] = "user" + + +RetryBackoffDuration = core_models.Duration +"""The duration to wait before retrying after a Job fails.""" + + +core.resolve_forward_references(BuildTarget, globalns=globals(), localns=locals()) +core.resolve_forward_references( + CreateScheduleRequestBuildTarget, globalns=globals(), localns=locals() +) +core.resolve_forward_references( + CreateScheduleRequestScopeMode, globalns=globals(), localns=locals() +) +core.resolve_forward_references(FallbackBranches, globalns=globals(), localns=locals()) +core.resolve_forward_references(JobOutput, globalns=globals(), localns=locals()) +core.resolve_forward_references( + ReplaceScheduleRequestBuildTarget, globalns=globals(), localns=locals() +) +core.resolve_forward_references( + ReplaceScheduleRequestScopeMode, globalns=globals(), localns=locals() +) +core.resolve_forward_references(ScheduleRunResult, globalns=globals(), localns=locals()) +core.resolve_forward_references(ScopeMode, globalns=globals(), localns=locals()) +core.resolve_forward_references(SearchBuildsFilter, globalns=globals(), localns=locals()) +core.resolve_forward_references(Trigger, globalns=globals(), localns=locals()) + +__all__ = [ + "AbortOnFailure", + "Action", + "AffectedResourcesResponse", + "AndTrigger", + "Build", + "BuildStatus", + "BuildTarget", + "BuildableRid", + "ConnectingTarget", + "CreateBuildRequest", + "CreateScheduleRequest", + "CreateScheduleRequestAction", + "CreateScheduleRequestBuildTarget", + "CreateScheduleRequestConnectingTarget", + "CreateScheduleRequestManualTarget", + "CreateScheduleRequestProjectScope", + "CreateScheduleRequestScopeMode", + "CreateScheduleRequestUpstreamTarget", + "CreateScheduleRequestUserScope", + "CronExpression", + "DatasetJobOutput", + "DatasetUpdatedTrigger", + "FallbackBranches", + "ForceBuild", + "GetBuildsBatchRequestElement", + "GetBuildsBatchResponse", + "GetJobsBatchRequestElement", + "GetJobsBatchResponse", + "GetSchedulesBatchRequestElement", + "GetSchedulesBatchResponse", + "Job", + "JobOutput", + "JobStartedTime", + "JobStatus", + "JobSucceededTrigger", + "ListJobsOfBuildResponse", + "ListRunsOfScheduleResponse", + "ManualTarget", + "ManualTrigger", + "MediaSetUpdatedTrigger", + "NewLogicTrigger", + "NotificationsEnabled", + "OrTrigger", + "ProjectScope", + "ReplaceScheduleRequest", + "ReplaceScheduleRequestAction", + "ReplaceScheduleRequestBuildTarget", + "ReplaceScheduleRequestConnectingTarget", + "ReplaceScheduleRequestManualTarget", + "ReplaceScheduleRequestProjectScope", + "ReplaceScheduleRequestScopeMode", + "ReplaceScheduleRequestUpstreamTarget", + "ReplaceScheduleRequestUserScope", + "RetryBackoffDuration", + "RetryCount", + "Schedule", + "SchedulePaused", + "ScheduleRun", + "ScheduleRunError", + "ScheduleRunErrorName", + "ScheduleRunIgnored", + "ScheduleRunResult", + "ScheduleRunRid", + "ScheduleRunSubmitted", + "ScheduleSucceededTrigger", + "ScheduleVersion", + "ScheduleVersionRid", + "ScopeMode", + "SearchBuildsAndFilter", + "SearchBuildsEqualsFilter", + "SearchBuildsEqualsFilterField", + "SearchBuildsFilter", + "SearchBuildsGteFilter", + "SearchBuildsGteFilterField", + "SearchBuildsLtFilter", + "SearchBuildsLtFilterField", + "SearchBuildsNotFilter", + "SearchBuildsOrFilter", + "SearchBuildsOrderBy", + "SearchBuildsOrderByField", + "SearchBuildsOrderByItem", + "SearchBuildsRequest", + "SearchBuildsResponse", + "TableUpdatedTrigger", + "TimeTrigger", + "TransactionalMediaSetJobOutput", + "Trigger", + "UpstreamTarget", + "UserScope", +] diff --git a/foundry_sdk/v2/orchestration/schedule.py b/foundry_sdk/v2/orchestration/schedule.py new file mode 100644 index 000000000..be6754233 --- /dev/null +++ b/foundry_sdk/v2/orchestration/schedule.py @@ -0,0 +1,1162 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing + +import annotated_types +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v2.core import models as core_models +from foundry_sdk.v2.orchestration import errors as orchestration_errors +from foundry_sdk.v2.orchestration import models as orchestration_models + + +class ScheduleClient: + """ + The API client for the Schedule Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _ScheduleClientStreaming(self) + self.with_raw_response = _ScheduleClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def create( + self, + *, + action: orchestration_models.CreateScheduleRequestAction, + description: typing.Optional[str] = None, + display_name: typing.Optional[str] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + scope_mode: typing.Optional[orchestration_models.CreateScheduleRequestScopeMode] = None, + trigger: typing.Optional[orchestration_models.Trigger] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> orchestration_models.Schedule: + """ + Creates a new Schedule. + :param action: + :type action: CreateScheduleRequestAction + :param description: + :type description: Optional[str] + :param display_name: + :type display_name: Optional[str] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param scope_mode: + :type scope_mode: Optional[CreateScheduleRequestScopeMode] + :param trigger: The schedule trigger. If the requesting user does not have permission to see the trigger, this will be empty. + :type trigger: Optional[Trigger] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: orchestration_models.Schedule + + :raises CreateSchedulePermissionDenied: Could not create the Schedule. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/orchestration/schedules", + query_params={ + "preview": preview, + }, + path_params={}, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=orchestration_models.CreateScheduleRequest( + display_name=display_name, + description=description, + action=action, + trigger=trigger, + scope_mode=scope_mode, + ), + response_type=orchestration_models.Schedule, + request_timeout=request_timeout, + throwable_errors={ + "CreateSchedulePermissionDenied": orchestration_errors.CreateSchedulePermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def delete( + self, + schedule_rid: core_models.ScheduleRid, + *, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> None: + """ + Delete the Schedule with the specified rid. + :param schedule_rid: + :type schedule_rid: ScheduleRid + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: None + + :raises DeleteSchedulePermissionDenied: Could not delete the Schedule. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="DELETE", + resource_path="/v2/orchestration/schedules/{scheduleRid}", + query_params={}, + path_params={ + "scheduleRid": schedule_rid, + }, + header_params={}, + body=None, + response_type=None, + request_timeout=request_timeout, + throwable_errors={ + "DeleteSchedulePermissionDenied": orchestration_errors.DeleteSchedulePermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + schedule_rid: core_models.ScheduleRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> orchestration_models.Schedule: + """ + Get the Schedule with the specified rid. + :param schedule_rid: + :type schedule_rid: ScheduleRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: orchestration_models.Schedule + + :raises ScheduleNotFound: The given Schedule could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/orchestration/schedules/{scheduleRid}", + query_params={ + "preview": preview, + }, + path_params={ + "scheduleRid": schedule_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=orchestration_models.Schedule, + request_timeout=request_timeout, + throwable_errors={ + "ScheduleNotFound": orchestration_errors.ScheduleNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get_affected_resources( + self, + schedule_rid: core_models.ScheduleRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> orchestration_models.AffectedResourcesResponse: + """ + + :param schedule_rid: + :type schedule_rid: ScheduleRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: orchestration_models.AffectedResourcesResponse + + :raises GetAffectedResourcesSchedulePermissionDenied: Could not getAffectedResources the Schedule. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/orchestration/schedules/{scheduleRid}/getAffectedResources", + query_params={ + "preview": preview, + }, + path_params={ + "scheduleRid": schedule_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=orchestration_models.AffectedResourcesResponse, + request_timeout=request_timeout, + throwable_errors={ + "GetAffectedResourcesSchedulePermissionDenied": orchestration_errors.GetAffectedResourcesSchedulePermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get_batch( + self, + body: typing_extensions.Annotated[ + typing.List[orchestration_models.GetSchedulesBatchRequestElement], + annotated_types.Len(min_length=1, max_length=1000), + ], + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> orchestration_models.GetSchedulesBatchResponse: + """ + Fetch multiple schedules in a single request. Schedules not found or inaccessible to the user will be + omitted from the response. + + + The maximum batch size for this endpoint is 1000. + :param body: Body of the request + :type body: List[GetSchedulesBatchRequestElement] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: orchestration_models.GetSchedulesBatchResponse + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/orchestration/schedules/getBatch", + query_params={ + "preview": preview, + }, + path_params={}, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=body, + response_type=orchestration_models.GetSchedulesBatchResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def pause( + self, + schedule_rid: core_models.ScheduleRid, + *, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> None: + """ + + :param schedule_rid: + :type schedule_rid: ScheduleRid + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: None + + :raises PauseSchedulePermissionDenied: Could not pause the Schedule. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/orchestration/schedules/{scheduleRid}/pause", + query_params={}, + path_params={ + "scheduleRid": schedule_rid, + }, + header_params={}, + body=None, + response_type=None, + request_timeout=request_timeout, + throwable_errors={ + "PauseSchedulePermissionDenied": orchestration_errors.PauseSchedulePermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def replace( + self, + schedule_rid: core_models.ScheduleRid, + *, + action: orchestration_models.ReplaceScheduleRequestAction, + description: typing.Optional[str] = None, + display_name: typing.Optional[str] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + scope_mode: typing.Optional[orchestration_models.ReplaceScheduleRequestScopeMode] = None, + trigger: typing.Optional[orchestration_models.Trigger] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> orchestration_models.Schedule: + """ + Replace the Schedule with the specified rid. + :param schedule_rid: + :type schedule_rid: ScheduleRid + :param action: + :type action: ReplaceScheduleRequestAction + :param description: + :type description: Optional[str] + :param display_name: + :type display_name: Optional[str] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param scope_mode: + :type scope_mode: Optional[ReplaceScheduleRequestScopeMode] + :param trigger: The schedule trigger. If the requesting user does not have permission to see the trigger, this will be empty. + :type trigger: Optional[Trigger] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: orchestration_models.Schedule + + :raises ReplaceSchedulePermissionDenied: Could not replace the Schedule. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="PUT", + resource_path="/v2/orchestration/schedules/{scheduleRid}", + query_params={ + "preview": preview, + }, + path_params={ + "scheduleRid": schedule_rid, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=orchestration_models.ReplaceScheduleRequest( + display_name=display_name, + description=description, + action=action, + trigger=trigger, + scope_mode=scope_mode, + ), + response_type=orchestration_models.Schedule, + request_timeout=request_timeout, + throwable_errors={ + "ReplaceSchedulePermissionDenied": orchestration_errors.ReplaceSchedulePermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def run( + self, + schedule_rid: core_models.ScheduleRid, + *, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> orchestration_models.ScheduleRun: + """ + + :param schedule_rid: + :type schedule_rid: ScheduleRid + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: orchestration_models.ScheduleRun + + :raises RunSchedulePermissionDenied: Could not run the Schedule. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/orchestration/schedules/{scheduleRid}/run", + query_params={}, + path_params={ + "scheduleRid": schedule_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=orchestration_models.ScheduleRun, + request_timeout=request_timeout, + throwable_errors={ + "RunSchedulePermissionDenied": orchestration_errors.RunSchedulePermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def runs( + self, + schedule_rid: core_models.ScheduleRid, + *, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.ResourceIterator[orchestration_models.ScheduleRun]: + """ + Get the most recent runs of a Schedule. If no page size is provided, a page size of 100 will be used. + + :param schedule_rid: + :type schedule_rid: ScheduleRid + :param page_size: The page size to use for the endpoint. + :type page_size: Optional[PageSize] + :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. + :type page_token: Optional[PageToken] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.ResourceIterator[orchestration_models.ScheduleRun] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/orchestration/schedules/{scheduleRid}/runs", + query_params={ + "pageSize": page_size, + "pageToken": page_token, + }, + path_params={ + "scheduleRid": schedule_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=orchestration_models.ListRunsOfScheduleResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def unpause( + self, + schedule_rid: core_models.ScheduleRid, + *, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> None: + """ + + :param schedule_rid: + :type schedule_rid: ScheduleRid + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: None + + :raises UnpauseSchedulePermissionDenied: Could not unpause the Schedule. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/orchestration/schedules/{scheduleRid}/unpause", + query_params={}, + path_params={ + "scheduleRid": schedule_rid, + }, + header_params={}, + body=None, + response_type=None, + request_timeout=request_timeout, + throwable_errors={ + "UnpauseSchedulePermissionDenied": orchestration_errors.UnpauseSchedulePermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _ScheduleClientRaw: + def __init__(self, client: ScheduleClient) -> None: + def create(_: orchestration_models.Schedule): ... + def delete(_: None): ... + def get(_: orchestration_models.Schedule): ... + def get_affected_resources(_: orchestration_models.AffectedResourcesResponse): ... + def get_batch(_: orchestration_models.GetSchedulesBatchResponse): ... + def pause(_: None): ... + def replace(_: orchestration_models.Schedule): ... + def run(_: orchestration_models.ScheduleRun): ... + def runs(_: orchestration_models.ListRunsOfScheduleResponse): ... + def unpause(_: None): ... + + self.create = core.with_raw_response(create, client.create) + self.delete = core.with_raw_response(delete, client.delete) + self.get = core.with_raw_response(get, client.get) + self.get_affected_resources = core.with_raw_response( + get_affected_resources, client.get_affected_resources + ) + self.get_batch = core.with_raw_response(get_batch, client.get_batch) + self.pause = core.with_raw_response(pause, client.pause) + self.replace = core.with_raw_response(replace, client.replace) + self.run = core.with_raw_response(run, client.run) + self.runs = core.with_raw_response(runs, client.runs) + self.unpause = core.with_raw_response(unpause, client.unpause) + + +class _ScheduleClientStreaming: + def __init__(self, client: ScheduleClient) -> None: + def create(_: orchestration_models.Schedule): ... + def get(_: orchestration_models.Schedule): ... + def get_affected_resources(_: orchestration_models.AffectedResourcesResponse): ... + def get_batch(_: orchestration_models.GetSchedulesBatchResponse): ... + def replace(_: orchestration_models.Schedule): ... + def run(_: orchestration_models.ScheduleRun): ... + def runs(_: orchestration_models.ListRunsOfScheduleResponse): ... + + self.create = core.with_streaming_response(create, client.create) + self.get = core.with_streaming_response(get, client.get) + self.get_affected_resources = core.with_streaming_response( + get_affected_resources, client.get_affected_resources + ) + self.get_batch = core.with_streaming_response(get_batch, client.get_batch) + self.replace = core.with_streaming_response(replace, client.replace) + self.run = core.with_streaming_response(run, client.run) + self.runs = core.with_streaming_response(runs, client.runs) + + +class AsyncScheduleClient: + """ + The API client for the Schedule Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncScheduleClientStreaming(self) + self.with_raw_response = _AsyncScheduleClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def create( + self, + *, + action: orchestration_models.CreateScheduleRequestAction, + description: typing.Optional[str] = None, + display_name: typing.Optional[str] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + scope_mode: typing.Optional[orchestration_models.CreateScheduleRequestScopeMode] = None, + trigger: typing.Optional[orchestration_models.Trigger] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[orchestration_models.Schedule]: + """ + Creates a new Schedule. + :param action: + :type action: CreateScheduleRequestAction + :param description: + :type description: Optional[str] + :param display_name: + :type display_name: Optional[str] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param scope_mode: + :type scope_mode: Optional[CreateScheduleRequestScopeMode] + :param trigger: The schedule trigger. If the requesting user does not have permission to see the trigger, this will be empty. + :type trigger: Optional[Trigger] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[orchestration_models.Schedule] + + :raises CreateSchedulePermissionDenied: Could not create the Schedule. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/orchestration/schedules", + query_params={ + "preview": preview, + }, + path_params={}, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=orchestration_models.CreateScheduleRequest( + display_name=display_name, + description=description, + action=action, + trigger=trigger, + scope_mode=scope_mode, + ), + response_type=orchestration_models.Schedule, + request_timeout=request_timeout, + throwable_errors={ + "CreateSchedulePermissionDenied": orchestration_errors.CreateSchedulePermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def delete( + self, + schedule_rid: core_models.ScheduleRid, + *, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[None]: + """ + Delete the Schedule with the specified rid. + :param schedule_rid: + :type schedule_rid: ScheduleRid + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[None] + + :raises DeleteSchedulePermissionDenied: Could not delete the Schedule. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="DELETE", + resource_path="/v2/orchestration/schedules/{scheduleRid}", + query_params={}, + path_params={ + "scheduleRid": schedule_rid, + }, + header_params={}, + body=None, + response_type=None, + request_timeout=request_timeout, + throwable_errors={ + "DeleteSchedulePermissionDenied": orchestration_errors.DeleteSchedulePermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + schedule_rid: core_models.ScheduleRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[orchestration_models.Schedule]: + """ + Get the Schedule with the specified rid. + :param schedule_rid: + :type schedule_rid: ScheduleRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[orchestration_models.Schedule] + + :raises ScheduleNotFound: The given Schedule could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/orchestration/schedules/{scheduleRid}", + query_params={ + "preview": preview, + }, + path_params={ + "scheduleRid": schedule_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=orchestration_models.Schedule, + request_timeout=request_timeout, + throwable_errors={ + "ScheduleNotFound": orchestration_errors.ScheduleNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get_affected_resources( + self, + schedule_rid: core_models.ScheduleRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[orchestration_models.AffectedResourcesResponse]: + """ + + :param schedule_rid: + :type schedule_rid: ScheduleRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[orchestration_models.AffectedResourcesResponse] + + :raises GetAffectedResourcesSchedulePermissionDenied: Could not getAffectedResources the Schedule. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/orchestration/schedules/{scheduleRid}/getAffectedResources", + query_params={ + "preview": preview, + }, + path_params={ + "scheduleRid": schedule_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=orchestration_models.AffectedResourcesResponse, + request_timeout=request_timeout, + throwable_errors={ + "GetAffectedResourcesSchedulePermissionDenied": orchestration_errors.GetAffectedResourcesSchedulePermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get_batch( + self, + body: typing_extensions.Annotated[ + typing.List[orchestration_models.GetSchedulesBatchRequestElement], + annotated_types.Len(min_length=1, max_length=1000), + ], + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[orchestration_models.GetSchedulesBatchResponse]: + """ + Fetch multiple schedules in a single request. Schedules not found or inaccessible to the user will be + omitted from the response. + + + The maximum batch size for this endpoint is 1000. + :param body: Body of the request + :type body: List[GetSchedulesBatchRequestElement] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[orchestration_models.GetSchedulesBatchResponse] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/orchestration/schedules/getBatch", + query_params={ + "preview": preview, + }, + path_params={}, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=body, + response_type=orchestration_models.GetSchedulesBatchResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def pause( + self, + schedule_rid: core_models.ScheduleRid, + *, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[None]: + """ + + :param schedule_rid: + :type schedule_rid: ScheduleRid + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[None] + + :raises PauseSchedulePermissionDenied: Could not pause the Schedule. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/orchestration/schedules/{scheduleRid}/pause", + query_params={}, + path_params={ + "scheduleRid": schedule_rid, + }, + header_params={}, + body=None, + response_type=None, + request_timeout=request_timeout, + throwable_errors={ + "PauseSchedulePermissionDenied": orchestration_errors.PauseSchedulePermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def replace( + self, + schedule_rid: core_models.ScheduleRid, + *, + action: orchestration_models.ReplaceScheduleRequestAction, + description: typing.Optional[str] = None, + display_name: typing.Optional[str] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + scope_mode: typing.Optional[orchestration_models.ReplaceScheduleRequestScopeMode] = None, + trigger: typing.Optional[orchestration_models.Trigger] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[orchestration_models.Schedule]: + """ + Replace the Schedule with the specified rid. + :param schedule_rid: + :type schedule_rid: ScheduleRid + :param action: + :type action: ReplaceScheduleRequestAction + :param description: + :type description: Optional[str] + :param display_name: + :type display_name: Optional[str] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param scope_mode: + :type scope_mode: Optional[ReplaceScheduleRequestScopeMode] + :param trigger: The schedule trigger. If the requesting user does not have permission to see the trigger, this will be empty. + :type trigger: Optional[Trigger] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[orchestration_models.Schedule] + + :raises ReplaceSchedulePermissionDenied: Could not replace the Schedule. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="PUT", + resource_path="/v2/orchestration/schedules/{scheduleRid}", + query_params={ + "preview": preview, + }, + path_params={ + "scheduleRid": schedule_rid, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=orchestration_models.ReplaceScheduleRequest( + display_name=display_name, + description=description, + action=action, + trigger=trigger, + scope_mode=scope_mode, + ), + response_type=orchestration_models.Schedule, + request_timeout=request_timeout, + throwable_errors={ + "ReplaceSchedulePermissionDenied": orchestration_errors.ReplaceSchedulePermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def run( + self, + schedule_rid: core_models.ScheduleRid, + *, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[orchestration_models.ScheduleRun]: + """ + + :param schedule_rid: + :type schedule_rid: ScheduleRid + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[orchestration_models.ScheduleRun] + + :raises RunSchedulePermissionDenied: Could not run the Schedule. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/orchestration/schedules/{scheduleRid}/run", + query_params={}, + path_params={ + "scheduleRid": schedule_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=orchestration_models.ScheduleRun, + request_timeout=request_timeout, + throwable_errors={ + "RunSchedulePermissionDenied": orchestration_errors.RunSchedulePermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def runs( + self, + schedule_rid: core_models.ScheduleRid, + *, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.AsyncResourceIterator[orchestration_models.ScheduleRun]: + """ + Get the most recent runs of a Schedule. If no page size is provided, a page size of 100 will be used. + + :param schedule_rid: + :type schedule_rid: ScheduleRid + :param page_size: The page size to use for the endpoint. + :type page_size: Optional[PageSize] + :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. + :type page_token: Optional[PageToken] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.AsyncResourceIterator[orchestration_models.ScheduleRun] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/orchestration/schedules/{scheduleRid}/runs", + query_params={ + "pageSize": page_size, + "pageToken": page_token, + }, + path_params={ + "scheduleRid": schedule_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=orchestration_models.ListRunsOfScheduleResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def unpause( + self, + schedule_rid: core_models.ScheduleRid, + *, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[None]: + """ + + :param schedule_rid: + :type schedule_rid: ScheduleRid + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[None] + + :raises UnpauseSchedulePermissionDenied: Could not unpause the Schedule. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/orchestration/schedules/{scheduleRid}/unpause", + query_params={}, + path_params={ + "scheduleRid": schedule_rid, + }, + header_params={}, + body=None, + response_type=None, + request_timeout=request_timeout, + throwable_errors={ + "UnpauseSchedulePermissionDenied": orchestration_errors.UnpauseSchedulePermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _AsyncScheduleClientRaw: + def __init__(self, client: AsyncScheduleClient) -> None: + def create(_: orchestration_models.Schedule): ... + def delete(_: None): ... + def get(_: orchestration_models.Schedule): ... + def get_affected_resources(_: orchestration_models.AffectedResourcesResponse): ... + def get_batch(_: orchestration_models.GetSchedulesBatchResponse): ... + def pause(_: None): ... + def replace(_: orchestration_models.Schedule): ... + def run(_: orchestration_models.ScheduleRun): ... + def runs(_: orchestration_models.ListRunsOfScheduleResponse): ... + def unpause(_: None): ... + + self.create = core.async_with_raw_response(create, client.create) + self.delete = core.async_with_raw_response(delete, client.delete) + self.get = core.async_with_raw_response(get, client.get) + self.get_affected_resources = core.async_with_raw_response( + get_affected_resources, client.get_affected_resources + ) + self.get_batch = core.async_with_raw_response(get_batch, client.get_batch) + self.pause = core.async_with_raw_response(pause, client.pause) + self.replace = core.async_with_raw_response(replace, client.replace) + self.run = core.async_with_raw_response(run, client.run) + self.runs = core.async_with_raw_response(runs, client.runs) + self.unpause = core.async_with_raw_response(unpause, client.unpause) + + +class _AsyncScheduleClientStreaming: + def __init__(self, client: AsyncScheduleClient) -> None: + def create(_: orchestration_models.Schedule): ... + def get(_: orchestration_models.Schedule): ... + def get_affected_resources(_: orchestration_models.AffectedResourcesResponse): ... + def get_batch(_: orchestration_models.GetSchedulesBatchResponse): ... + def replace(_: orchestration_models.Schedule): ... + def run(_: orchestration_models.ScheduleRun): ... + def runs(_: orchestration_models.ListRunsOfScheduleResponse): ... + + self.create = core.async_with_streaming_response(create, client.create) + self.get = core.async_with_streaming_response(get, client.get) + self.get_affected_resources = core.async_with_streaming_response( + get_affected_resources, client.get_affected_resources + ) + self.get_batch = core.async_with_streaming_response(get_batch, client.get_batch) + self.replace = core.async_with_streaming_response(replace, client.replace) + self.run = core.async_with_streaming_response(run, client.run) + self.runs = core.async_with_streaming_response(runs, client.runs) diff --git a/foundry_sdk/v2/orchestration/schedule_run.py b/foundry_sdk/v2/orchestration/schedule_run.py new file mode 100644 index 000000000..fe4bed026 --- /dev/null +++ b/foundry_sdk/v2/orchestration/schedule_run.py @@ -0,0 +1,90 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors + + +class ScheduleRunClient: + """ + The API client for the ScheduleRun Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _ScheduleRunClientStreaming(self) + self.with_raw_response = _ScheduleRunClientRaw(self) + + +class _ScheduleRunClientRaw: + def __init__(self, client: ScheduleRunClient) -> None: + pass + + +class _ScheduleRunClientStreaming: + def __init__(self, client: ScheduleRunClient) -> None: + pass + + +class AsyncScheduleRunClient: + """ + The API client for the ScheduleRun Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncScheduleRunClientStreaming(self) + self.with_raw_response = _AsyncScheduleRunClientRaw(self) + + +class _AsyncScheduleRunClientRaw: + def __init__(self, client: AsyncScheduleRunClient) -> None: + pass + + +class _AsyncScheduleRunClientStreaming: + def __init__(self, client: AsyncScheduleRunClient) -> None: + pass diff --git a/foundry_sdk/v2/orchestration/schedule_version.py b/foundry_sdk/v2/orchestration/schedule_version.py new file mode 100644 index 000000000..2f39e20bd --- /dev/null +++ b/foundry_sdk/v2/orchestration/schedule_version.py @@ -0,0 +1,293 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v2.core import models as core_models +from foundry_sdk.v2.orchestration import errors as orchestration_errors +from foundry_sdk.v2.orchestration import models as orchestration_models + + +class ScheduleVersionClient: + """ + The API client for the ScheduleVersion Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _ScheduleVersionClientStreaming(self) + self.with_raw_response = _ScheduleVersionClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + schedule_version_rid: orchestration_models.ScheduleVersionRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> orchestration_models.ScheduleVersion: + """ + Get the ScheduleVersion with the specified rid. + :param schedule_version_rid: The RID of a schedule version + :type schedule_version_rid: ScheduleVersionRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: orchestration_models.ScheduleVersion + + :raises ScheduleVersionNotFound: The given ScheduleVersion could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/orchestration/scheduleVersions/{scheduleVersionRid}", + query_params={ + "preview": preview, + }, + path_params={ + "scheduleVersionRid": schedule_version_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=orchestration_models.ScheduleVersion, + request_timeout=request_timeout, + throwable_errors={ + "ScheduleVersionNotFound": orchestration_errors.ScheduleVersionNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def schedule( + self, + schedule_version_rid: orchestration_models.ScheduleVersionRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Optional[orchestration_models.Schedule]: + """ + + :param schedule_version_rid: The RID of a schedule version + :type schedule_version_rid: ScheduleVersionRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Optional[orchestration_models.Schedule] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/orchestration/scheduleVersions/{scheduleVersionRid}/schedule", + query_params={ + "preview": preview, + }, + path_params={ + "scheduleVersionRid": schedule_version_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=typing.Optional[orchestration_models.Schedule], + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _ScheduleVersionClientRaw: + def __init__(self, client: ScheduleVersionClient) -> None: + def get(_: orchestration_models.ScheduleVersion): ... + def schedule(_: typing.Optional[orchestration_models.Schedule]): ... + + self.get = core.with_raw_response(get, client.get) + self.schedule = core.with_raw_response(schedule, client.schedule) + + +class _ScheduleVersionClientStreaming: + def __init__(self, client: ScheduleVersionClient) -> None: + def get(_: orchestration_models.ScheduleVersion): ... + def schedule(_: typing.Optional[orchestration_models.Schedule]): ... + + self.get = core.with_streaming_response(get, client.get) + self.schedule = core.with_streaming_response(schedule, client.schedule) + + +class AsyncScheduleVersionClient: + """ + The API client for the ScheduleVersion Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncScheduleVersionClientStreaming(self) + self.with_raw_response = _AsyncScheduleVersionClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + schedule_version_rid: orchestration_models.ScheduleVersionRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[orchestration_models.ScheduleVersion]: + """ + Get the ScheduleVersion with the specified rid. + :param schedule_version_rid: The RID of a schedule version + :type schedule_version_rid: ScheduleVersionRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[orchestration_models.ScheduleVersion] + + :raises ScheduleVersionNotFound: The given ScheduleVersion could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/orchestration/scheduleVersions/{scheduleVersionRid}", + query_params={ + "preview": preview, + }, + path_params={ + "scheduleVersionRid": schedule_version_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=orchestration_models.ScheduleVersion, + request_timeout=request_timeout, + throwable_errors={ + "ScheduleVersionNotFound": orchestration_errors.ScheduleVersionNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def schedule( + self, + schedule_version_rid: orchestration_models.ScheduleVersionRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[typing.Optional[orchestration_models.Schedule]]: + """ + + :param schedule_version_rid: The RID of a schedule version + :type schedule_version_rid: ScheduleVersionRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[typing.Optional[orchestration_models.Schedule]] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/orchestration/scheduleVersions/{scheduleVersionRid}/schedule", + query_params={ + "preview": preview, + }, + path_params={ + "scheduleVersionRid": schedule_version_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=typing.Optional[orchestration_models.Schedule], + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _AsyncScheduleVersionClientRaw: + def __init__(self, client: AsyncScheduleVersionClient) -> None: + def get(_: orchestration_models.ScheduleVersion): ... + def schedule(_: typing.Optional[orchestration_models.Schedule]): ... + + self.get = core.async_with_raw_response(get, client.get) + self.schedule = core.async_with_raw_response(schedule, client.schedule) + + +class _AsyncScheduleVersionClientStreaming: + def __init__(self, client: AsyncScheduleVersionClient) -> None: + def get(_: orchestration_models.ScheduleVersion): ... + def schedule(_: typing.Optional[orchestration_models.Schedule]): ... + + self.get = core.async_with_streaming_response(get, client.get) + self.schedule = core.async_with_streaming_response(schedule, client.schedule) diff --git a/foundry_sdk/v2/sql_queries/__init__.py b/foundry_sdk/v2/sql_queries/__init__.py new file mode 100644 index 000000000..80a07c1a4 --- /dev/null +++ b/foundry_sdk/v2/sql_queries/__init__.py @@ -0,0 +1,22 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +from foundry_sdk.v2.sql_queries._client import AsyncSqlQueriesClient +from foundry_sdk.v2.sql_queries._client import SqlQueriesClient + +__all__ = [ + "SqlQueriesClient", + "AsyncSqlQueriesClient", +] diff --git a/foundry_sdk/v2/sql_queries/_client.py b/foundry_sdk/v2/sql_queries/_client.py new file mode 100644 index 000000000..2f1eb6816 --- /dev/null +++ b/foundry_sdk/v2/sql_queries/_client.py @@ -0,0 +1,69 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing +from functools import cached_property + +from foundry_sdk import _core as core + + +class SqlQueriesClient: + """ + The API client for the SqlQueries Namespace. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + + @cached_property + def SqlQuery(self): + from foundry_sdk.v2.sql_queries.sql_query import SqlQueryClient + + return SqlQueryClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + +class AsyncSqlQueriesClient: + """ + The Async API client for the SqlQueries Namespace. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + from foundry_sdk.v2.sql_queries.sql_query import AsyncSqlQueryClient + + self.SqlQuery = AsyncSqlQueryClient(auth=auth, hostname=hostname, config=config) diff --git a/foundry_sdk/v2/sql_queries/errors.py b/foundry_sdk/v2/sql_queries/errors.py new file mode 100644 index 000000000..fcb5a3ae9 --- /dev/null +++ b/foundry_sdk/v2/sql_queries/errors.py @@ -0,0 +1,190 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing +from dataclasses import dataclass + +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v2.sql_queries import models as sql_queries_models + + +class CancelSqlQueryPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not cancel the SqlQuery.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + sqlQueryId: sql_queries_models.SqlQueryId + """The id of a query.""" + + +@dataclass +class CancelSqlQueryPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["CancelSqlQueryPermissionDenied"] + parameters: CancelSqlQueryPermissionDeniedParameters + error_instance_id: str + + +class ExecuteSqlQueryPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not execute the SqlQuery.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class ExecuteSqlQueryPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["ExecuteSqlQueryPermissionDenied"] + parameters: ExecuteSqlQueryPermissionDeniedParameters + error_instance_id: str + + +class GetResultsSqlQueryPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not getResults the SqlQuery.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + sqlQueryId: sql_queries_models.SqlQueryId + """The id of a query.""" + + +@dataclass +class GetResultsSqlQueryPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["GetResultsSqlQueryPermissionDenied"] + parameters: GetResultsSqlQueryPermissionDeniedParameters + error_instance_id: str + + +class GetStatusSqlQueryPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not getStatus the SqlQuery.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + sqlQueryId: sql_queries_models.SqlQueryId + """The id of a query.""" + + +@dataclass +class GetStatusSqlQueryPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["GetStatusSqlQueryPermissionDenied"] + parameters: GetStatusSqlQueryPermissionDeniedParameters + error_instance_id: str + + +class QueryCanceledParameters(typing_extensions.TypedDict): + """The query was canceled.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + queryId: sql_queries_models.SqlQueryId + + +@dataclass +class QueryCanceled(errors.BadRequestError): + name: typing.Literal["QueryCanceled"] + parameters: QueryCanceledParameters + error_instance_id: str + + +class QueryFailedParameters(typing_extensions.TypedDict): + """The query failed.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + queryId: sql_queries_models.SqlQueryId + errorMessage: str + + +@dataclass +class QueryFailed(errors.InternalServerError): + name: typing.Literal["QueryFailed"] + parameters: QueryFailedParameters + error_instance_id: str + + +class QueryParseErrorParameters(typing_extensions.TypedDict): + """The query cannot be parsed.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + errorMessage: str + + +@dataclass +class QueryParseError(errors.BadRequestError): + name: typing.Literal["QueryParseError"] + parameters: QueryParseErrorParameters + error_instance_id: str + + +class QueryPermissionDeniedParameters(typing_extensions.TypedDict): + """The provided token does not have permission to access the given query.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + queryId: sql_queries_models.SqlQueryId + + +@dataclass +class QueryPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["QueryPermissionDenied"] + parameters: QueryPermissionDeniedParameters + error_instance_id: str + + +class QueryRunningParameters(typing_extensions.TypedDict): + """The query is running.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + queryId: sql_queries_models.SqlQueryId + + +@dataclass +class QueryRunning(errors.BadRequestError): + name: typing.Literal["QueryRunning"] + parameters: QueryRunningParameters + error_instance_id: str + + +class ReadQueryInputsPermissionDeniedParameters(typing_extensions.TypedDict): + """The provided token does not have permission to access the inputs to the query.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + rids: typing.List[core.RID] + """The RIDs of the inputs to the query that the user does not have permission to query.""" + + +@dataclass +class ReadQueryInputsPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["ReadQueryInputsPermissionDenied"] + parameters: ReadQueryInputsPermissionDeniedParameters + error_instance_id: str + + +__all__ = [ + "CancelSqlQueryPermissionDenied", + "ExecuteSqlQueryPermissionDenied", + "GetResultsSqlQueryPermissionDenied", + "GetStatusSqlQueryPermissionDenied", + "QueryCanceled", + "QueryFailed", + "QueryParseError", + "QueryPermissionDenied", + "QueryRunning", + "ReadQueryInputsPermissionDenied", +] diff --git a/foundry_sdk/v2/sql_queries/models.py b/foundry_sdk/v2/sql_queries/models.py new file mode 100644 index 000000000..5d8f9151d --- /dev/null +++ b/foundry_sdk/v2/sql_queries/models.py @@ -0,0 +1,100 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +from __future__ import annotations + +import typing + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk.v2.datasets import models as datasets_models + + +class CanceledQueryStatus(core.ModelBase): + """CanceledQueryStatus""" + + type: typing.Literal["canceled"] = "canceled" + + +class ExecuteSqlQueryRequest(core.ModelBase): + """ExecuteSqlQueryRequest""" + + query: str + """ + The SQL query to execute. Queries should conform to the + [Spark SQL dialect](https://spark.apache.org/docs/latest/sql-ref.html). This supports SELECT + queries only. Datasets can be referenced in SQL queries by path or by RID. See the + [documentation](https://www.palantir.com/docs/foundry/analytics-connectivity/odbc-jdbc-drivers/#use-sql-to-query-foundry-datasets) + for more details. + """ + + fallback_branch_ids: typing.Optional[typing.List[datasets_models.BranchName]] = pydantic.Field(alias=str("fallbackBranchIds"), default=None) # type: ignore[literal-required] + """ + The list of branch ids to use as fallbacks if the query fails to execute on the primary branch. If a + is not explicitly provided in the SQL query, the resource will be queried on the first fallback branch + provided that exists. If no fallback branches are provided the default branch is used. This is + `master` for most enrollments. + """ + + +class FailedQueryStatus(core.ModelBase): + """FailedQueryStatus""" + + error_message: str = pydantic.Field(alias=str("errorMessage")) # type: ignore[literal-required] + """An error message describing why the query failed.""" + + type: typing.Literal["failed"] = "failed" + + +QueryStatus = typing_extensions.Annotated[ + typing.Union[ + "RunningQueryStatus", "CanceledQueryStatus", "FailedQueryStatus", "SucceededQueryStatus" + ], + pydantic.Field(discriminator="type"), +] +"""QueryStatus""" + + +class RunningQueryStatus(core.ModelBase): + """RunningQueryStatus""" + + query_id: SqlQueryId = pydantic.Field(alias=str("queryId")) # type: ignore[literal-required] + type: typing.Literal["running"] = "running" + + +SqlQueryId = str +"""The identifier of a SQL Query.""" + + +class SucceededQueryStatus(core.ModelBase): + """SucceededQueryStatus""" + + query_id: SqlQueryId = pydantic.Field(alias=str("queryId")) # type: ignore[literal-required] + type: typing.Literal["succeeded"] = "succeeded" + + +core.resolve_forward_references(QueryStatus, globalns=globals(), localns=locals()) + +__all__ = [ + "CanceledQueryStatus", + "ExecuteSqlQueryRequest", + "FailedQueryStatus", + "QueryStatus", + "RunningQueryStatus", + "SqlQueryId", + "SucceededQueryStatus", +] diff --git a/foundry_sdk/v2/sql_queries/sql_query.py b/foundry_sdk/v2/sql_queries/sql_query.py new file mode 100644 index 000000000..541b12d4d --- /dev/null +++ b/foundry_sdk/v2/sql_queries/sql_query.py @@ -0,0 +1,630 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v2.core import models as core_models +from foundry_sdk.v2.datasets import models as datasets_models +from foundry_sdk.v2.sql_queries import errors as sql_queries_errors +from foundry_sdk.v2.sql_queries import models as sql_queries_models + + +class SqlQueryClient: + """ + The API client for the SqlQuery Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _SqlQueryClientStreaming(self) + self.with_raw_response = _SqlQueryClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def cancel( + self, + sql_query_id: sql_queries_models.SqlQueryId, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> None: + """ + Cancels a query. If the query is no longer running this is effectively a no-op. + + :param sql_query_id: The id of a query. + :type sql_query_id: SqlQueryId + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: None + + :raises CancelSqlQueryPermissionDenied: Could not cancel the SqlQuery. + :raises QueryCanceled: The query was canceled. + :raises QueryFailed: The query failed. + :raises QueryParseError: The query cannot be parsed. + :raises QueryPermissionDenied: The provided token does not have permission to access the given query. + :raises QueryRunning: The query is running. + :raises ReadQueryInputsPermissionDenied: The provided token does not have permission to access the inputs to the query. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/sqlQueries/{sqlQueryId}/cancel", + query_params={ + "preview": preview, + }, + path_params={ + "sqlQueryId": sql_query_id, + }, + header_params={}, + body=None, + response_type=None, + request_timeout=request_timeout, + throwable_errors={ + "CancelSqlQueryPermissionDenied": sql_queries_errors.CancelSqlQueryPermissionDenied, + "QueryCanceled": sql_queries_errors.QueryCanceled, + "QueryFailed": sql_queries_errors.QueryFailed, + "QueryParseError": sql_queries_errors.QueryParseError, + "QueryPermissionDenied": sql_queries_errors.QueryPermissionDenied, + "QueryRunning": sql_queries_errors.QueryRunning, + "ReadQueryInputsPermissionDenied": sql_queries_errors.ReadQueryInputsPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def execute( + self, + *, + query: str, + fallback_branch_ids: typing.Optional[typing.List[datasets_models.BranchName]] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> sql_queries_models.QueryStatus: + """ + Executes a new query. Only the user that invoked the query can operate on the query. The size of query + results are limited by default to 1 million rows. Contact your Palantir representative to discuss limit + increases. + + :param query: The SQL query to execute. Queries should conform to the [Spark SQL dialect](https://spark.apache.org/docs/latest/sql-ref.html). This supports SELECT queries only. Datasets can be referenced in SQL queries by path or by RID. See the [documentation](https://www.palantir.com/docs/foundry/analytics-connectivity/odbc-jdbc-drivers/#use-sql-to-query-foundry-datasets) for more details. + :type query: str + :param fallback_branch_ids: The list of branch ids to use as fallbacks if the query fails to execute on the primary branch. If a is not explicitly provided in the SQL query, the resource will be queried on the first fallback branch provided that exists. If no fallback branches are provided the default branch is used. This is `master` for most enrollments. + :type fallback_branch_ids: Optional[List[BranchName]] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: sql_queries_models.QueryStatus + + :raises ExecuteSqlQueryPermissionDenied: Could not execute the SqlQuery. + :raises QueryCanceled: The query was canceled. + :raises QueryFailed: The query failed. + :raises QueryParseError: The query cannot be parsed. + :raises QueryPermissionDenied: The provided token does not have permission to access the given query. + :raises QueryRunning: The query is running. + :raises ReadQueryInputsPermissionDenied: The provided token does not have permission to access the inputs to the query. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/sqlQueries/execute", + query_params={ + "preview": preview, + }, + path_params={}, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=sql_queries_models.ExecuteSqlQueryRequest( + query=query, + fallback_branch_ids=fallback_branch_ids, + ), + response_type=sql_queries_models.QueryStatus, + request_timeout=request_timeout, + throwable_errors={ + "ExecuteSqlQueryPermissionDenied": sql_queries_errors.ExecuteSqlQueryPermissionDenied, + "QueryCanceled": sql_queries_errors.QueryCanceled, + "QueryFailed": sql_queries_errors.QueryFailed, + "QueryParseError": sql_queries_errors.QueryParseError, + "QueryPermissionDenied": sql_queries_errors.QueryPermissionDenied, + "QueryRunning": sql_queries_errors.QueryRunning, + "ReadQueryInputsPermissionDenied": sql_queries_errors.ReadQueryInputsPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get_results( + self, + sql_query_id: sql_queries_models.SqlQueryId, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.TableResponse: + """ + Gets the results of a query. The results of the query are returned in the + [Apache Arrow](https://arrow.apache.org/) format. + + This endpoint implements long polling and requests will time out after one minute. They can be safely + retried while the query is still running. + + :param sql_query_id: The id of a query. + :type sql_query_id: SqlQueryId + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.TableResponse + + + :raises GetResultsSqlQueryPermissionDenied: Could not getResults the SqlQuery. + :raises QueryCanceled: The query was canceled. + :raises QueryFailed: The query failed. + :raises QueryParseError: The query cannot be parsed. + :raises QueryPermissionDenied: The provided token does not have permission to access the given query. + :raises QueryRunning: The query is running. + :raises ReadQueryInputsPermissionDenied: The provided token does not have permission to access the inputs to the query. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/sqlQueries/{sqlQueryId}/getResults", + query_params={ + "preview": preview, + }, + path_params={ + "sqlQueryId": sql_query_id, + }, + header_params={ + "Accept": "application/octet-stream", + }, + body=None, + response_type=bytes, + request_timeout=request_timeout, + throwable_errors={ + "GetResultsSqlQueryPermissionDenied": sql_queries_errors.GetResultsSqlQueryPermissionDenied, + "QueryCanceled": sql_queries_errors.QueryCanceled, + "QueryFailed": sql_queries_errors.QueryFailed, + "QueryParseError": sql_queries_errors.QueryParseError, + "QueryPermissionDenied": sql_queries_errors.QueryPermissionDenied, + "QueryRunning": sql_queries_errors.QueryRunning, + "ReadQueryInputsPermissionDenied": sql_queries_errors.ReadQueryInputsPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode", "TABLE"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get_status( + self, + sql_query_id: sql_queries_models.SqlQueryId, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> sql_queries_models.QueryStatus: + """ + Gets the status of a query. + + :param sql_query_id: The id of a query. + :type sql_query_id: SqlQueryId + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: sql_queries_models.QueryStatus + + :raises GetStatusSqlQueryPermissionDenied: Could not getStatus the SqlQuery. + :raises QueryCanceled: The query was canceled. + :raises QueryFailed: The query failed. + :raises QueryParseError: The query cannot be parsed. + :raises QueryPermissionDenied: The provided token does not have permission to access the given query. + :raises QueryRunning: The query is running. + :raises ReadQueryInputsPermissionDenied: The provided token does not have permission to access the inputs to the query. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/sqlQueries/{sqlQueryId}/getStatus", + query_params={ + "preview": preview, + }, + path_params={ + "sqlQueryId": sql_query_id, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=sql_queries_models.QueryStatus, + request_timeout=request_timeout, + throwable_errors={ + "GetStatusSqlQueryPermissionDenied": sql_queries_errors.GetStatusSqlQueryPermissionDenied, + "QueryCanceled": sql_queries_errors.QueryCanceled, + "QueryFailed": sql_queries_errors.QueryFailed, + "QueryParseError": sql_queries_errors.QueryParseError, + "QueryPermissionDenied": sql_queries_errors.QueryPermissionDenied, + "QueryRunning": sql_queries_errors.QueryRunning, + "ReadQueryInputsPermissionDenied": sql_queries_errors.ReadQueryInputsPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _SqlQueryClientRaw: + def __init__(self, client: SqlQueryClient) -> None: + def cancel(_: None): ... + def execute(_: sql_queries_models.QueryStatus): ... + def get_results(_: bytes): ... + def get_status(_: sql_queries_models.QueryStatus): ... + + self.cancel = core.with_raw_response(cancel, client.cancel) + self.execute = core.with_raw_response(execute, client.execute) + self.get_results = core.with_raw_response(get_results, client.get_results) + self.get_status = core.with_raw_response(get_status, client.get_status) + + +class _SqlQueryClientStreaming: + def __init__(self, client: SqlQueryClient) -> None: + def execute(_: sql_queries_models.QueryStatus): ... + def get_results(_: bytes): ... + def get_status(_: sql_queries_models.QueryStatus): ... + + self.execute = core.with_streaming_response(execute, client.execute) + self.get_results = core.with_streaming_response(get_results, client.get_results) + self.get_status = core.with_streaming_response(get_status, client.get_status) + + +class AsyncSqlQueryClient: + """ + The API client for the SqlQuery Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncSqlQueryClientStreaming(self) + self.with_raw_response = _AsyncSqlQueryClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def cancel( + self, + sql_query_id: sql_queries_models.SqlQueryId, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[None]: + """ + Cancels a query. If the query is no longer running this is effectively a no-op. + + :param sql_query_id: The id of a query. + :type sql_query_id: SqlQueryId + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[None] + + :raises CancelSqlQueryPermissionDenied: Could not cancel the SqlQuery. + :raises QueryCanceled: The query was canceled. + :raises QueryFailed: The query failed. + :raises QueryParseError: The query cannot be parsed. + :raises QueryPermissionDenied: The provided token does not have permission to access the given query. + :raises QueryRunning: The query is running. + :raises ReadQueryInputsPermissionDenied: The provided token does not have permission to access the inputs to the query. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/sqlQueries/{sqlQueryId}/cancel", + query_params={ + "preview": preview, + }, + path_params={ + "sqlQueryId": sql_query_id, + }, + header_params={}, + body=None, + response_type=None, + request_timeout=request_timeout, + throwable_errors={ + "CancelSqlQueryPermissionDenied": sql_queries_errors.CancelSqlQueryPermissionDenied, + "QueryCanceled": sql_queries_errors.QueryCanceled, + "QueryFailed": sql_queries_errors.QueryFailed, + "QueryParseError": sql_queries_errors.QueryParseError, + "QueryPermissionDenied": sql_queries_errors.QueryPermissionDenied, + "QueryRunning": sql_queries_errors.QueryRunning, + "ReadQueryInputsPermissionDenied": sql_queries_errors.ReadQueryInputsPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def execute( + self, + *, + query: str, + fallback_branch_ids: typing.Optional[typing.List[datasets_models.BranchName]] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[sql_queries_models.QueryStatus]: + """ + Executes a new query. Only the user that invoked the query can operate on the query. The size of query + results are limited by default to 1 million rows. Contact your Palantir representative to discuss limit + increases. + + :param query: The SQL query to execute. Queries should conform to the [Spark SQL dialect](https://spark.apache.org/docs/latest/sql-ref.html). This supports SELECT queries only. Datasets can be referenced in SQL queries by path or by RID. See the [documentation](https://www.palantir.com/docs/foundry/analytics-connectivity/odbc-jdbc-drivers/#use-sql-to-query-foundry-datasets) for more details. + :type query: str + :param fallback_branch_ids: The list of branch ids to use as fallbacks if the query fails to execute on the primary branch. If a is not explicitly provided in the SQL query, the resource will be queried on the first fallback branch provided that exists. If no fallback branches are provided the default branch is used. This is `master` for most enrollments. + :type fallback_branch_ids: Optional[List[BranchName]] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[sql_queries_models.QueryStatus] + + :raises ExecuteSqlQueryPermissionDenied: Could not execute the SqlQuery. + :raises QueryCanceled: The query was canceled. + :raises QueryFailed: The query failed. + :raises QueryParseError: The query cannot be parsed. + :raises QueryPermissionDenied: The provided token does not have permission to access the given query. + :raises QueryRunning: The query is running. + :raises ReadQueryInputsPermissionDenied: The provided token does not have permission to access the inputs to the query. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/sqlQueries/execute", + query_params={ + "preview": preview, + }, + path_params={}, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=sql_queries_models.ExecuteSqlQueryRequest( + query=query, + fallback_branch_ids=fallback_branch_ids, + ), + response_type=sql_queries_models.QueryStatus, + request_timeout=request_timeout, + throwable_errors={ + "ExecuteSqlQueryPermissionDenied": sql_queries_errors.ExecuteSqlQueryPermissionDenied, + "QueryCanceled": sql_queries_errors.QueryCanceled, + "QueryFailed": sql_queries_errors.QueryFailed, + "QueryParseError": sql_queries_errors.QueryParseError, + "QueryPermissionDenied": sql_queries_errors.QueryPermissionDenied, + "QueryRunning": sql_queries_errors.QueryRunning, + "ReadQueryInputsPermissionDenied": sql_queries_errors.ReadQueryInputsPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get_results( + self, + sql_query_id: sql_queries_models.SqlQueryId, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[core.TableResponse]: + """ + Gets the results of a query. The results of the query are returned in the + [Apache Arrow](https://arrow.apache.org/) format. + + This endpoint implements long polling and requests will time out after one minute. They can be safely + retried while the query is still running. + + :param sql_query_id: The id of a query. + :type sql_query_id: SqlQueryId + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[core.TableResponse + ] + + :raises GetResultsSqlQueryPermissionDenied: Could not getResults the SqlQuery. + :raises QueryCanceled: The query was canceled. + :raises QueryFailed: The query failed. + :raises QueryParseError: The query cannot be parsed. + :raises QueryPermissionDenied: The provided token does not have permission to access the given query. + :raises QueryRunning: The query is running. + :raises ReadQueryInputsPermissionDenied: The provided token does not have permission to access the inputs to the query. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/sqlQueries/{sqlQueryId}/getResults", + query_params={ + "preview": preview, + }, + path_params={ + "sqlQueryId": sql_query_id, + }, + header_params={ + "Accept": "application/octet-stream", + }, + body=None, + response_type=bytes, + request_timeout=request_timeout, + throwable_errors={ + "GetResultsSqlQueryPermissionDenied": sql_queries_errors.GetResultsSqlQueryPermissionDenied, + "QueryCanceled": sql_queries_errors.QueryCanceled, + "QueryFailed": sql_queries_errors.QueryFailed, + "QueryParseError": sql_queries_errors.QueryParseError, + "QueryPermissionDenied": sql_queries_errors.QueryPermissionDenied, + "QueryRunning": sql_queries_errors.QueryRunning, + "ReadQueryInputsPermissionDenied": sql_queries_errors.ReadQueryInputsPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode", "TABLE"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get_status( + self, + sql_query_id: sql_queries_models.SqlQueryId, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[sql_queries_models.QueryStatus]: + """ + Gets the status of a query. + + :param sql_query_id: The id of a query. + :type sql_query_id: SqlQueryId + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[sql_queries_models.QueryStatus] + + :raises GetStatusSqlQueryPermissionDenied: Could not getStatus the SqlQuery. + :raises QueryCanceled: The query was canceled. + :raises QueryFailed: The query failed. + :raises QueryParseError: The query cannot be parsed. + :raises QueryPermissionDenied: The provided token does not have permission to access the given query. + :raises QueryRunning: The query is running. + :raises ReadQueryInputsPermissionDenied: The provided token does not have permission to access the inputs to the query. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/sqlQueries/{sqlQueryId}/getStatus", + query_params={ + "preview": preview, + }, + path_params={ + "sqlQueryId": sql_query_id, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=sql_queries_models.QueryStatus, + request_timeout=request_timeout, + throwable_errors={ + "GetStatusSqlQueryPermissionDenied": sql_queries_errors.GetStatusSqlQueryPermissionDenied, + "QueryCanceled": sql_queries_errors.QueryCanceled, + "QueryFailed": sql_queries_errors.QueryFailed, + "QueryParseError": sql_queries_errors.QueryParseError, + "QueryPermissionDenied": sql_queries_errors.QueryPermissionDenied, + "QueryRunning": sql_queries_errors.QueryRunning, + "ReadQueryInputsPermissionDenied": sql_queries_errors.ReadQueryInputsPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _AsyncSqlQueryClientRaw: + def __init__(self, client: AsyncSqlQueryClient) -> None: + def cancel(_: None): ... + def execute(_: sql_queries_models.QueryStatus): ... + def get_results(_: bytes): ... + def get_status(_: sql_queries_models.QueryStatus): ... + + self.cancel = core.async_with_raw_response(cancel, client.cancel) + self.execute = core.async_with_raw_response(execute, client.execute) + self.get_results = core.async_with_raw_response(get_results, client.get_results) + self.get_status = core.async_with_raw_response(get_status, client.get_status) + + +class _AsyncSqlQueryClientStreaming: + def __init__(self, client: AsyncSqlQueryClient) -> None: + def execute(_: sql_queries_models.QueryStatus): ... + def get_results(_: bytes): ... + def get_status(_: sql_queries_models.QueryStatus): ... + + self.execute = core.async_with_streaming_response(execute, client.execute) + self.get_results = core.async_with_streaming_response(get_results, client.get_results) + self.get_status = core.async_with_streaming_response(get_status, client.get_status) diff --git a/foundry_sdk/v2/streams/__init__.py b/foundry_sdk/v2/streams/__init__.py new file mode 100644 index 000000000..2aef148a3 --- /dev/null +++ b/foundry_sdk/v2/streams/__init__.py @@ -0,0 +1,22 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +from foundry_sdk.v2.streams._client import AsyncStreamsClient +from foundry_sdk.v2.streams._client import StreamsClient + +__all__ = [ + "StreamsClient", + "AsyncStreamsClient", +] diff --git a/foundry_sdk/v2/streams/_client.py b/foundry_sdk/v2/streams/_client.py new file mode 100644 index 000000000..401be6e97 --- /dev/null +++ b/foundry_sdk/v2/streams/_client.py @@ -0,0 +1,69 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing +from functools import cached_property + +from foundry_sdk import _core as core + + +class StreamsClient: + """ + The API client for the Streams Namespace. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + + @cached_property + def Dataset(self): + from foundry_sdk.v2.streams.dataset import DatasetClient + + return DatasetClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + +class AsyncStreamsClient: + """ + The Async API client for the Streams Namespace. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + from foundry_sdk.v2.streams.dataset import AsyncDatasetClient + + self.Dataset = AsyncDatasetClient(auth=auth, hostname=hostname, config=config) diff --git a/foundry_sdk/v2/streams/dataset.py b/foundry_sdk/v2/streams/dataset.py new file mode 100644 index 000000000..373bfa2b4 --- /dev/null +++ b/foundry_sdk/v2/streams/dataset.py @@ -0,0 +1,298 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing +from functools import cached_property + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v2.core import errors as core_errors +from foundry_sdk.v2.core import models as core_models +from foundry_sdk.v2.datasets import models as datasets_models +from foundry_sdk.v2.filesystem import errors as filesystem_errors +from foundry_sdk.v2.filesystem import models as filesystem_models +from foundry_sdk.v2.streams import errors as streams_errors +from foundry_sdk.v2.streams import models as streams_models + + +class DatasetClient: + """ + The API client for the Dataset Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _DatasetClientStreaming(self) + self.with_raw_response = _DatasetClientRaw(self) + + @cached_property + def Stream(self): + from foundry_sdk.v2.streams.stream import StreamClient + + return StreamClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def create( + self, + *, + name: datasets_models.DatasetName, + parent_folder_rid: filesystem_models.FolderRid, + schema: core_models.StreamSchema, + branch_name: typing.Optional[datasets_models.BranchName] = None, + compressed: typing.Optional[streams_models.Compressed] = None, + partitions_count: typing.Optional[streams_models.PartitionsCount] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + stream_type: typing.Optional[streams_models.StreamType] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> streams_models.Dataset: + """ + Creates a streaming dataset with a stream on the specified branch, or if no branch is specified, on the + default branch ('master' for most enrollments). For more information on streaming datasets, refer to the + [streams](https://palantir.com/docs/foundry/data-integration/streams/) user documentation. + + :param name: + :type name: DatasetName + :param parent_folder_rid: + :type parent_folder_rid: FolderRid + :param schema: The Foundry schema to apply to the new stream. + :type schema: StreamSchema + :param branch_name: The branch to create the initial stream on. If not specified, the default branch will be used ('master' for most enrollments). + :type branch_name: Optional[BranchName] + :param compressed: Whether or not compression is enabled for the stream. Defaults to false. + :type compressed: Optional[Compressed] + :param partitions_count: The number of partitions for the Foundry stream. Generally, each partition can handle about 5 mb/s of data, so for higher volume streams, more partitions are recommended. If not specified, 1 partition is used. This value cannot be changed later. + :type partitions_count: Optional[PartitionsCount] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param stream_type: A conceptual representation of the expected shape of the data for a stream. HIGH_THROUGHPUT and LOW_LATENCY are not compatible with each other. Defaults to LOW_LATENCY. + :type stream_type: Optional[StreamType] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: streams_models.Dataset + + :raises CannotCreateStreamingDatasetInUserFolder: Cannot create a streaming dataset in a user folder. + :raises CreateStreamingDatasetPermissionDenied: Could not create the Dataset. + :raises InvalidFieldSchema: The field schema failed validations + :raises InvalidSchema: The schema failed validations + :raises InvalidStreamType: The stream type is invalid. + :raises ResourceNameAlreadyExists: The provided resource name is already in use by another resource in the same folder. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/streams/datasets/create", + query_params={ + "preview": preview, + }, + path_params={}, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=streams_models.CreateStreamingDatasetRequest( + name=name, + parent_folder_rid=parent_folder_rid, + schema_=schema, + branch_name=branch_name, + partitions_count=partitions_count, + stream_type=stream_type, + compressed=compressed, + ), + response_type=streams_models.Dataset, + request_timeout=request_timeout, + throwable_errors={ + "CannotCreateStreamingDatasetInUserFolder": streams_errors.CannotCreateStreamingDatasetInUserFolder, + "CreateStreamingDatasetPermissionDenied": streams_errors.CreateStreamingDatasetPermissionDenied, + "InvalidFieldSchema": core_errors.InvalidFieldSchema, + "InvalidSchema": core_errors.InvalidSchema, + "InvalidStreamType": streams_errors.InvalidStreamType, + "ResourceNameAlreadyExists": filesystem_errors.ResourceNameAlreadyExists, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _DatasetClientRaw: + def __init__(self, client: DatasetClient) -> None: + def create(_: streams_models.Dataset): ... + + self.create = core.with_raw_response(create, client.create) + + +class _DatasetClientStreaming: + def __init__(self, client: DatasetClient) -> None: + def create(_: streams_models.Dataset): ... + + self.create = core.with_streaming_response(create, client.create) + + +class AsyncDatasetClient: + """ + The API client for the Dataset Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncDatasetClientStreaming(self) + self.with_raw_response = _AsyncDatasetClientRaw(self) + + @cached_property + def Stream(self): + from foundry_sdk.v2.streams.stream import AsyncStreamClient + + return AsyncStreamClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def create( + self, + *, + name: datasets_models.DatasetName, + parent_folder_rid: filesystem_models.FolderRid, + schema: core_models.StreamSchema, + branch_name: typing.Optional[datasets_models.BranchName] = None, + compressed: typing.Optional[streams_models.Compressed] = None, + partitions_count: typing.Optional[streams_models.PartitionsCount] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + stream_type: typing.Optional[streams_models.StreamType] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[streams_models.Dataset]: + """ + Creates a streaming dataset with a stream on the specified branch, or if no branch is specified, on the + default branch ('master' for most enrollments). For more information on streaming datasets, refer to the + [streams](https://palantir.com/docs/foundry/data-integration/streams/) user documentation. + + :param name: + :type name: DatasetName + :param parent_folder_rid: + :type parent_folder_rid: FolderRid + :param schema: The Foundry schema to apply to the new stream. + :type schema: StreamSchema + :param branch_name: The branch to create the initial stream on. If not specified, the default branch will be used ('master' for most enrollments). + :type branch_name: Optional[BranchName] + :param compressed: Whether or not compression is enabled for the stream. Defaults to false. + :type compressed: Optional[Compressed] + :param partitions_count: The number of partitions for the Foundry stream. Generally, each partition can handle about 5 mb/s of data, so for higher volume streams, more partitions are recommended. If not specified, 1 partition is used. This value cannot be changed later. + :type partitions_count: Optional[PartitionsCount] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param stream_type: A conceptual representation of the expected shape of the data for a stream. HIGH_THROUGHPUT and LOW_LATENCY are not compatible with each other. Defaults to LOW_LATENCY. + :type stream_type: Optional[StreamType] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[streams_models.Dataset] + + :raises CannotCreateStreamingDatasetInUserFolder: Cannot create a streaming dataset in a user folder. + :raises CreateStreamingDatasetPermissionDenied: Could not create the Dataset. + :raises InvalidFieldSchema: The field schema failed validations + :raises InvalidSchema: The schema failed validations + :raises InvalidStreamType: The stream type is invalid. + :raises ResourceNameAlreadyExists: The provided resource name is already in use by another resource in the same folder. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/streams/datasets/create", + query_params={ + "preview": preview, + }, + path_params={}, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=streams_models.CreateStreamingDatasetRequest( + name=name, + parent_folder_rid=parent_folder_rid, + schema_=schema, + branch_name=branch_name, + partitions_count=partitions_count, + stream_type=stream_type, + compressed=compressed, + ), + response_type=streams_models.Dataset, + request_timeout=request_timeout, + throwable_errors={ + "CannotCreateStreamingDatasetInUserFolder": streams_errors.CannotCreateStreamingDatasetInUserFolder, + "CreateStreamingDatasetPermissionDenied": streams_errors.CreateStreamingDatasetPermissionDenied, + "InvalidFieldSchema": core_errors.InvalidFieldSchema, + "InvalidSchema": core_errors.InvalidSchema, + "InvalidStreamType": streams_errors.InvalidStreamType, + "ResourceNameAlreadyExists": filesystem_errors.ResourceNameAlreadyExists, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _AsyncDatasetClientRaw: + def __init__(self, client: AsyncDatasetClient) -> None: + def create(_: streams_models.Dataset): ... + + self.create = core.async_with_raw_response(create, client.create) + + +class _AsyncDatasetClientStreaming: + def __init__(self, client: AsyncDatasetClient) -> None: + def create(_: streams_models.Dataset): ... + + self.create = core.async_with_streaming_response(create, client.create) diff --git a/foundry_sdk/v2/streams/errors.py b/foundry_sdk/v2/streams/errors.py new file mode 100644 index 000000000..e3b13fc25 --- /dev/null +++ b/foundry_sdk/v2/streams/errors.py @@ -0,0 +1,272 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing +from dataclasses import dataclass + +import typing_extensions + +from foundry_sdk import _errors as errors +from foundry_sdk.v2.datasets import models as datasets_models +from foundry_sdk.v2.filesystem import models as filesystem_models +from foundry_sdk.v2.streams import models as streams_models + + +class CannotCreateStreamingDatasetInUserFolderParameters(typing_extensions.TypedDict): + """Cannot create a streaming dataset in a user folder.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + parentFolderRid: filesystem_models.FolderRid + + +@dataclass +class CannotCreateStreamingDatasetInUserFolder(errors.BadRequestError): + name: typing.Literal["CannotCreateStreamingDatasetInUserFolder"] + parameters: CannotCreateStreamingDatasetInUserFolderParameters + error_instance_id: str + + +class CannotWriteToTrashedStreamParameters(typing_extensions.TypedDict): + """Cannot write to a stream that is in the trash.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + datasetRid: datasets_models.DatasetRid + + +@dataclass +class CannotWriteToTrashedStream(errors.BadRequestError): + name: typing.Literal["CannotWriteToTrashedStream"] + parameters: CannotWriteToTrashedStreamParameters + error_instance_id: str + + +class CreateStreamPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not create the Stream.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + datasetRid: datasets_models.DatasetRid + streamBranchName: datasets_models.BranchName + + +@dataclass +class CreateStreamPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["CreateStreamPermissionDenied"] + parameters: CreateStreamPermissionDeniedParameters + error_instance_id: str + + +class CreateStreamingDatasetPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not create the Dataset.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class CreateStreamingDatasetPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["CreateStreamingDatasetPermissionDenied"] + parameters: CreateStreamingDatasetPermissionDeniedParameters + error_instance_id: str + + +class FailedToProcessBinaryRecordParameters(typing_extensions.TypedDict): + """The byte stream could not be processed.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class FailedToProcessBinaryRecord(errors.InternalServerError): + name: typing.Literal["FailedToProcessBinaryRecord"] + parameters: FailedToProcessBinaryRecordParameters + error_instance_id: str + + +class InvalidStreamNoSchemaParameters(typing_extensions.TypedDict): + """The requested stream exists but is invalid, as it does not have a schema.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + datasetRid: datasets_models.DatasetRid + branchName: datasets_models.BranchName + viewRid: typing_extensions.NotRequired[streams_models.ViewRid] + + +@dataclass +class InvalidStreamNoSchema(errors.BadRequestError): + name: typing.Literal["InvalidStreamNoSchema"] + parameters: InvalidStreamNoSchemaParameters + error_instance_id: str + + +class InvalidStreamTypeParameters(typing_extensions.TypedDict): + """The stream type is invalid.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + streamType: str + + +@dataclass +class InvalidStreamType(errors.BadRequestError): + name: typing.Literal["InvalidStreamType"] + parameters: InvalidStreamTypeParameters + error_instance_id: str + + +class PublishBinaryRecordToStreamPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not publishBinaryRecord the Stream.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + datasetRid: datasets_models.DatasetRid + streamBranchName: datasets_models.BranchName + + +@dataclass +class PublishBinaryRecordToStreamPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["PublishBinaryRecordToStreamPermissionDenied"] + parameters: PublishBinaryRecordToStreamPermissionDeniedParameters + error_instance_id: str + + +class PublishRecordToStreamPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not publishRecord the Stream.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + datasetRid: datasets_models.DatasetRid + streamBranchName: datasets_models.BranchName + + +@dataclass +class PublishRecordToStreamPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["PublishRecordToStreamPermissionDenied"] + parameters: PublishRecordToStreamPermissionDeniedParameters + error_instance_id: str + + +class PublishRecordsToStreamPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not publishRecords the Stream.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + datasetRid: datasets_models.DatasetRid + streamBranchName: datasets_models.BranchName + + +@dataclass +class PublishRecordsToStreamPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["PublishRecordsToStreamPermissionDenied"] + parameters: PublishRecordsToStreamPermissionDeniedParameters + error_instance_id: str + + +class RecordDoesNotMatchStreamSchemaParameters(typing_extensions.TypedDict): + """A provided record does not match the stream schema""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + datasetRid: datasets_models.DatasetRid + branchName: datasets_models.BranchName + viewRid: typing_extensions.NotRequired[streams_models.ViewRid] + + +@dataclass +class RecordDoesNotMatchStreamSchema(errors.BadRequestError): + name: typing.Literal["RecordDoesNotMatchStreamSchema"] + parameters: RecordDoesNotMatchStreamSchemaParameters + error_instance_id: str + + +class RecordTooLargeParameters(typing_extensions.TypedDict): + """A record is too large to be published to the stream. On most enrollments, the maximum record size is 1MB.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class RecordTooLarge(errors.RequestEntityTooLargeError): + name: typing.Literal["RecordTooLarge"] + parameters: RecordTooLargeParameters + error_instance_id: str + + +class ResetStreamPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not reset the Stream.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + datasetRid: datasets_models.DatasetRid + streamBranchName: datasets_models.BranchName + + +@dataclass +class ResetStreamPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["ResetStreamPermissionDenied"] + parameters: ResetStreamPermissionDeniedParameters + error_instance_id: str + + +class StreamNotFoundParameters(typing_extensions.TypedDict): + """The given Stream could not be found.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + datasetRid: datasets_models.DatasetRid + streamBranchName: datasets_models.BranchName + + +@dataclass +class StreamNotFound(errors.NotFoundError): + name: typing.Literal["StreamNotFound"] + parameters: StreamNotFoundParameters + error_instance_id: str + + +class ViewNotFoundParameters(typing_extensions.TypedDict): + """No view for the provided view rid provided could be found.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + viewRid: streams_models.ViewRid + + +@dataclass +class ViewNotFound(errors.NotFoundError): + name: typing.Literal["ViewNotFound"] + parameters: ViewNotFoundParameters + error_instance_id: str + + +__all__ = [ + "CannotCreateStreamingDatasetInUserFolder", + "CannotWriteToTrashedStream", + "CreateStreamPermissionDenied", + "CreateStreamingDatasetPermissionDenied", + "FailedToProcessBinaryRecord", + "InvalidStreamNoSchema", + "InvalidStreamType", + "PublishBinaryRecordToStreamPermissionDenied", + "PublishRecordToStreamPermissionDenied", + "PublishRecordsToStreamPermissionDenied", + "RecordDoesNotMatchStreamSchema", + "RecordTooLarge", + "ResetStreamPermissionDenied", + "StreamNotFound", + "ViewNotFound", +] diff --git a/foundry_sdk/v2/streams/models.py b/foundry_sdk/v2/streams/models.py new file mode 100644 index 000000000..b73d7d260 --- /dev/null +++ b/foundry_sdk/v2/streams/models.py @@ -0,0 +1,273 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +from __future__ import annotations + +import typing + +import pydantic + +from foundry_sdk import _core as core +from foundry_sdk.v2.core import models as core_models +from foundry_sdk.v2.datasets import models as datasets_models +from foundry_sdk.v2.filesystem import models as filesystem_models + +Compressed = bool +""" +Compression helps reduce the size of the data being sent, resulting in lower network usage and +storage, at the cost of some additional CPU usage for compression and decompression. This stream type +is only recommended if your stream contains a high volume of repetitive strings and is experiencing poor +network bandwidth symptoms like non-zero lag, lower than expected throughput, or dropped records. +""" + + +class CreateStreamRequest(core.ModelBase): + """CreateStreamRequest""" + + schema_: CreateStreamRequestStreamSchema = pydantic.Field(alias=str("schema")) # type: ignore[literal-required] + """The Foundry schema for this stream.""" + + partitions_count: typing.Optional[PartitionsCount] = pydantic.Field(alias=str("partitionsCount"), default=None) # type: ignore[literal-required] + """ + The number of partitions for the Foundry stream. Defaults to 1. + + Generally, each partition can handle about 5 mb/s of data, so for higher volume streams, more partitions + are recommended. + """ + + stream_type: typing.Optional[StreamType] = pydantic.Field(alias=str("streamType"), default=None) # type: ignore[literal-required] + """ + A conceptual representation of the expected shape of the data for a stream. HIGH_THROUGHPUT and + LOW_LATENCY are not compatible with each other. Defaults to LOW_LATENCY. + """ + + branch_name: datasets_models.BranchName = pydantic.Field(alias=str("branchName")) # type: ignore[literal-required] + compressed: typing.Optional[Compressed] = None + """Whether or not compression is enabled for the stream. Defaults to false.""" + + +class CreateStreamRequestStreamSchema(core.ModelBase): + """CreateStreamRequestStreamSchema""" + + key_field_names: typing.Optional[typing.List[core_models.FieldName]] = pydantic.Field(alias=str("keyFieldNames"), default=None) # type: ignore[literal-required] + """ + The names of the fields to be used as keys for partitioning records. These key fields are used to group + all records with the same key into the same partition, to guarantee processing order of grouped records. These + keys are not meant to uniquely identify records, and do not by themselves deduplicate records. To deduplicate + records, provide a change data capture configuration for the schema. + + Key fields can only be of the following types: + - Boolean + - Byte + - Date + - Decimal + - Integer + - Long + - Short + - String + - Timestamp + + For additional information on keys for Foundry streams, see the + [streaming keys](https://palantir.com/docs/foundry/building-pipelines/streaming-keys/) user documentation. + """ + + fields: typing.List[core_models.Field] + change_data_capture: typing.Optional[core_models.ChangeDataCaptureConfiguration] = pydantic.Field(alias=str("changeDataCapture"), default=None) # type: ignore[literal-required] + + +class CreateStreamingDatasetRequest(core.ModelBase): + """CreateStreamingDatasetRequest""" + + name: datasets_models.DatasetName + parent_folder_rid: filesystem_models.FolderRid = pydantic.Field(alias=str("parentFolderRid")) # type: ignore[literal-required] + schema_: core_models.StreamSchema = pydantic.Field(alias=str("schema")) # type: ignore[literal-required] + """The Foundry schema to apply to the new stream.""" + + branch_name: typing.Optional[datasets_models.BranchName] = pydantic.Field(alias=str("branchName"), default=None) # type: ignore[literal-required] + """ + The branch to create the initial stream on. If not specified, the default branch will be used + ('master' for most enrollments). + """ + + partitions_count: typing.Optional[PartitionsCount] = pydantic.Field(alias=str("partitionsCount"), default=None) # type: ignore[literal-required] + """ + The number of partitions for the Foundry stream. + + Generally, each partition can handle about 5 mb/s of data, so for higher volume streams, more partitions + are recommended. + + If not specified, 1 partition is used. + + This value cannot be changed later. + """ + + stream_type: typing.Optional[StreamType] = pydantic.Field(alias=str("streamType"), default=None) # type: ignore[literal-required] + """ + A conceptual representation of the expected shape of the data for a stream. HIGH_THROUGHPUT and + LOW_LATENCY are not compatible with each other. Defaults to LOW_LATENCY. + """ + + compressed: typing.Optional[Compressed] = None + """Whether or not compression is enabled for the stream. Defaults to false.""" + + +class Dataset(core.ModelBase): + """Dataset""" + + rid: datasets_models.DatasetRid + name: datasets_models.DatasetName + parent_folder_rid: filesystem_models.FolderRid = pydantic.Field(alias=str("parentFolderRid")) # type: ignore[literal-required] + + +PartitionsCount = int +"""The number of partitions for a Foundry stream.""" + + +class PublishRecordToStreamRequest(core.ModelBase): + """PublishRecordToStreamRequest""" + + record: Record + """The record to publish to the stream""" + + view_rid: typing.Optional[ViewRid] = pydantic.Field(alias=str("viewRid"), default=None) # type: ignore[literal-required] + """ + If provided, this endpoint will only write to the stream corresponding to the specified view rid. If + not provided, this endpoint will write the latest stream on the branch. + + Providing this value is an advanced configuration, to be used when additional control over the + underlying streaming data structures is needed. + """ + + +class PublishRecordsToStreamRequest(core.ModelBase): + """PublishRecordsToStreamRequest""" + + records: typing.List[Record] + """The records to publish to the stream""" + + view_rid: typing.Optional[ViewRid] = pydantic.Field(alias=str("viewRid"), default=None) # type: ignore[literal-required] + """ + If provided, this endpoint will only write to the stream corresponding to the specified view rid. If + not provided, this endpoint will write to the latest stream on the branch. + + Providing this value is an advanced configuration, to be used when additional control over the + underlying streaming data structures is needed. + """ + + +Record = typing.Dict[str, typing.Optional[typing.Any]] +"""A record to be published to a stream.""" + + +class ResetStreamRequest(core.ModelBase): + """ResetStreamRequest""" + + schema_: typing.Optional[core_models.StreamSchema] = pydantic.Field(alias=str("schema"), default=None) # type: ignore[literal-required] + """ + The Foundry schema to apply to the new stream. + + If omitted, the schema of the existing stream on the branch will be used. + """ + + partitions_count: typing.Optional[PartitionsCount] = pydantic.Field(alias=str("partitionsCount"), default=None) # type: ignore[literal-required] + """ + The number of partitions for the Foundry stream. + Generally, each partition can handle about 5 mb/s of data, so for higher volume streams, more partitions + are recommended. + + If omitted, the partitions count of the existing stream on the branch will be used. + """ + + stream_type: typing.Optional[StreamType] = pydantic.Field(alias=str("streamType"), default=None) # type: ignore[literal-required] + """ + A conceptual representation of the expected shape of the data for a stream. HIGH_THROUGHPUT and + LOW_LATENCY are not compatible with each other. Defaults to LOW_LATENCY. + + If omitted, the stream type of the existing stream on the branch will be used. + """ + + compressed: typing.Optional[Compressed] = None + """ + Whether or not compression is enabled for the stream. + + If omitted, the compression setting of the existing stream on the branch will be used. + """ + + +class Stream(core.ModelBase): + """Stream""" + + branch_name: datasets_models.BranchName = pydantic.Field(alias=str("branchName")) # type: ignore[literal-required] + schema_: core_models.StreamSchema = pydantic.Field(alias=str("schema")) # type: ignore[literal-required] + """The Foundry schema for this stream.""" + + view_rid: ViewRid = pydantic.Field(alias=str("viewRid")) # type: ignore[literal-required] + """The view that this stream corresponds to.""" + + partitions_count: PartitionsCount = pydantic.Field(alias=str("partitionsCount")) # type: ignore[literal-required] + """ + The number of partitions for the Foundry stream. Defaults to 1. + + Generally, each partition can handle about 5 mb/s of data, so for higher volume streams, more partitions + are recommended. + """ + + stream_type: StreamType = pydantic.Field(alias=str("streamType")) # type: ignore[literal-required] + """ + A conceptual representation of the expected shape of the data for a stream. HIGH_THROUGHPUT and + LOW_LATENCY are not compatible with each other. Defaults to LOW_LATENCY. + """ + + compressed: Compressed + """Whether or not compression is enabled for the stream. Defaults to false.""" + + +StreamType = typing.Literal["LOW_LATENCY", "HIGH_THROUGHPUT"] +""" +LOW_LATENCY: The default stream type. Recommended for most use cases. + +HIGH_THROUGHPUT: Best for streams that send large amounts of data every second. Using this stream type might +introduce some non-zero latency at the expense of a higher throughput. This stream type is only +recommended if you inspect your stream metrics in-platform and observe that the average batch size is equal +to the max match size, or if jobs using the stream are failing due to Kafka producer batches expiring. For +additional information on inspecting stream metrics, refer to the +(stream monitoring)[/docs/foundry/data-integration/stream-monitoring/#viewing-metrics] documentation. + +For more information, refer to the [stream types](https://palantir.com/docs/foundry/data-integration/streams/#stream-types) +documentation. +""" + + +ViewRid = core.RID +"""The resource identifier (RID) of the view that represents a stream.""" + + +core.resolve_forward_references(Record, globalns=globals(), localns=locals()) + +__all__ = [ + "Compressed", + "CreateStreamRequest", + "CreateStreamRequestStreamSchema", + "CreateStreamingDatasetRequest", + "Dataset", + "PartitionsCount", + "PublishRecordToStreamRequest", + "PublishRecordsToStreamRequest", + "Record", + "ResetStreamRequest", + "Stream", + "StreamType", + "ViewRid", +] diff --git a/foundry_sdk/v2/streams/stream.py b/foundry_sdk/v2/streams/stream.py new file mode 100644 index 000000000..1a72d09eb --- /dev/null +++ b/foundry_sdk/v2/streams/stream.py @@ -0,0 +1,960 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v2.core import errors as core_errors +from foundry_sdk.v2.core import models as core_models +from foundry_sdk.v2.datasets import errors as datasets_errors +from foundry_sdk.v2.datasets import models as datasets_models +from foundry_sdk.v2.streams import errors as streams_errors +from foundry_sdk.v2.streams import models as streams_models + + +class StreamClient: + """ + The API client for the Stream Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _StreamClientStreaming(self) + self.with_raw_response = _StreamClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def create( + self, + dataset_rid: datasets_models.DatasetRid, + *, + branch_name: datasets_models.BranchName, + schema: streams_models.CreateStreamRequestStreamSchema, + compressed: typing.Optional[streams_models.Compressed] = None, + partitions_count: typing.Optional[streams_models.PartitionsCount] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + stream_type: typing.Optional[streams_models.StreamType] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> streams_models.Stream: + """ + Creates a new branch on the backing streaming dataset, and creates a new stream on that branch. + + :param dataset_rid: + :type dataset_rid: DatasetRid + :param branch_name: + :type branch_name: BranchName + :param schema: The Foundry schema for this stream. + :type schema: CreateStreamRequestStreamSchema + :param compressed: Whether or not compression is enabled for the stream. Defaults to false. + :type compressed: Optional[Compressed] + :param partitions_count: The number of partitions for the Foundry stream. Defaults to 1. Generally, each partition can handle about 5 mb/s of data, so for higher volume streams, more partitions are recommended. + :type partitions_count: Optional[PartitionsCount] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param stream_type: A conceptual representation of the expected shape of the data for a stream. HIGH_THROUGHPUT and LOW_LATENCY are not compatible with each other. Defaults to LOW_LATENCY. + :type stream_type: Optional[StreamType] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: streams_models.Stream + + :raises BranchAlreadyExists: The branch cannot be created because a branch with that name already exists. + :raises CreateStreamPermissionDenied: Could not create the Stream. + :raises InvalidFieldSchema: The field schema failed validations + :raises InvalidSchema: The schema failed validations + :raises InvalidStreamType: The stream type is invalid. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/streams/datasets/{datasetRid}/streams", + query_params={ + "preview": preview, + }, + path_params={ + "datasetRid": dataset_rid, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=streams_models.CreateStreamRequest( + schema_=schema, + partitions_count=partitions_count, + stream_type=stream_type, + branch_name=branch_name, + compressed=compressed, + ), + response_type=streams_models.Stream, + request_timeout=request_timeout, + throwable_errors={ + "BranchAlreadyExists": datasets_errors.BranchAlreadyExists, + "CreateStreamPermissionDenied": streams_errors.CreateStreamPermissionDenied, + "InvalidFieldSchema": core_errors.InvalidFieldSchema, + "InvalidSchema": core_errors.InvalidSchema, + "InvalidStreamType": streams_errors.InvalidStreamType, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + dataset_rid: datasets_models.DatasetRid, + stream_branch_name: datasets_models.BranchName, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> streams_models.Stream: + """ + Get a stream by its branch name. If the branch does not exist, there is no stream on that branch, or the + user does not have permission to access the stream, a 404 error will be returned. + + :param dataset_rid: + :type dataset_rid: DatasetRid + :param stream_branch_name: + :type stream_branch_name: BranchName + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: streams_models.Stream + + :raises InvalidFieldSchema: The field schema failed validations + :raises InvalidStreamNoSchema: The requested stream exists but is invalid, as it does not have a schema. + :raises InvalidStreamType: The stream type is invalid. + :raises StreamNotFound: The given Stream could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/streams/datasets/{datasetRid}/streams/{streamBranchName}", + query_params={ + "preview": preview, + }, + path_params={ + "datasetRid": dataset_rid, + "streamBranchName": stream_branch_name, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=streams_models.Stream, + request_timeout=request_timeout, + throwable_errors={ + "InvalidFieldSchema": core_errors.InvalidFieldSchema, + "InvalidStreamNoSchema": streams_errors.InvalidStreamNoSchema, + "InvalidStreamType": streams_errors.InvalidStreamType, + "StreamNotFound": streams_errors.StreamNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def publish_binary_record( + self, + dataset_rid: datasets_models.DatasetRid, + stream_branch_name: datasets_models.BranchName, + body: bytes, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + view_rid: typing.Optional[streams_models.ViewRid] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> None: + """ + Publish a single binary record to the stream. The stream's schema must be a single binary field. + + :param dataset_rid: + :type dataset_rid: DatasetRid + :param stream_branch_name: + :type stream_branch_name: BranchName + :param body: The binary record to publish to the stream + :type body: bytes + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param view_rid: If provided, this operation will only write to the stream corresponding to the specified view rid. If not provided, this operation will write to the latest stream on the branch. Providing this value is an advanced configuration, to be used when additional control over the underlying streaming data structures is needed. + :type view_rid: Optional[ViewRid] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: None + + :raises PublishBinaryRecordToStreamPermissionDenied: Could not publishBinaryRecord the Stream. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/highScale/streams/datasets/{datasetRid}/streams/{streamBranchName}/publishBinaryRecord", + query_params={ + "preview": preview, + "viewRid": view_rid, + }, + path_params={ + "datasetRid": dataset_rid, + "streamBranchName": stream_branch_name, + }, + header_params={ + "Content-Type": "application/octet-stream", + }, + body=body, + response_type=None, + request_timeout=request_timeout, + throwable_errors={ + "PublishBinaryRecordToStreamPermissionDenied": streams_errors.PublishBinaryRecordToStreamPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def publish_record( + self, + dataset_rid: datasets_models.DatasetRid, + stream_branch_name: datasets_models.BranchName, + *, + record: streams_models.Record, + preview: typing.Optional[core_models.PreviewMode] = None, + view_rid: typing.Optional[streams_models.ViewRid] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> None: + """ + Publish a single record to the stream. The record will be validated against the stream's schema, and + rejected if it is invalid. + + :param dataset_rid: + :type dataset_rid: DatasetRid + :param stream_branch_name: + :type stream_branch_name: BranchName + :param record: The record to publish to the stream + :type record: Record + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param view_rid: If provided, this endpoint will only write to the stream corresponding to the specified view rid. If not provided, this endpoint will write the latest stream on the branch. Providing this value is an advanced configuration, to be used when additional control over the underlying streaming data structures is needed. + :type view_rid: Optional[ViewRid] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: None + + :raises PublishRecordToStreamPermissionDenied: Could not publishRecord the Stream. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/highScale/streams/datasets/{datasetRid}/streams/{streamBranchName}/publishRecord", + query_params={ + "preview": preview, + }, + path_params={ + "datasetRid": dataset_rid, + "streamBranchName": stream_branch_name, + }, + header_params={ + "Content-Type": "application/json", + }, + body=streams_models.PublishRecordToStreamRequest( + record=record, + view_rid=view_rid, + ), + response_type=None, + request_timeout=request_timeout, + throwable_errors={ + "PublishRecordToStreamPermissionDenied": streams_errors.PublishRecordToStreamPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def publish_records( + self, + dataset_rid: datasets_models.DatasetRid, + stream_branch_name: datasets_models.BranchName, + *, + records: typing.List[streams_models.Record], + preview: typing.Optional[core_models.PreviewMode] = None, + view_rid: typing.Optional[streams_models.ViewRid] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> None: + """ + Publish a batch of records to the stream. The records will be validated against the stream's schema, and + the batch will be rejected if one or more of the records are invalid. + + :param dataset_rid: + :type dataset_rid: DatasetRid + :param stream_branch_name: + :type stream_branch_name: BranchName + :param records: The records to publish to the stream + :type records: List[Record] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param view_rid: If provided, this endpoint will only write to the stream corresponding to the specified view rid. If not provided, this endpoint will write to the latest stream on the branch. Providing this value is an advanced configuration, to be used when additional control over the underlying streaming data structures is needed. + :type view_rid: Optional[ViewRid] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: None + + :raises PublishRecordsToStreamPermissionDenied: Could not publishRecords the Stream. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/highScale/streams/datasets/{datasetRid}/streams/{streamBranchName}/publishRecords", + query_params={ + "preview": preview, + }, + path_params={ + "datasetRid": dataset_rid, + "streamBranchName": stream_branch_name, + }, + header_params={ + "Content-Type": "application/json", + }, + body=streams_models.PublishRecordsToStreamRequest( + records=records, + view_rid=view_rid, + ), + response_type=None, + request_timeout=request_timeout, + throwable_errors={ + "PublishRecordsToStreamPermissionDenied": streams_errors.PublishRecordsToStreamPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def reset( + self, + dataset_rid: datasets_models.DatasetRid, + stream_branch_name: datasets_models.BranchName, + *, + compressed: typing.Optional[streams_models.Compressed] = None, + partitions_count: typing.Optional[streams_models.PartitionsCount] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + schema: typing.Optional[core_models.StreamSchema] = None, + stream_type: typing.Optional[streams_models.StreamType] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> streams_models.Stream: + """ + Reset the stream on the given dataset branch, clearing the existing records and allowing new configurations + to be applied. + + To change the stream settings without clearing the records, update the stream settings in-platform. + + This will create a new stream view (as seen by the change of the `viewRid` on the branch), + which will be the new stream view that will be written to for the branch. + + :param dataset_rid: + :type dataset_rid: DatasetRid + :param stream_branch_name: + :type stream_branch_name: BranchName + :param compressed: Whether or not compression is enabled for the stream. If omitted, the compression setting of the existing stream on the branch will be used. + :type compressed: Optional[Compressed] + :param partitions_count: The number of partitions for the Foundry stream. Generally, each partition can handle about 5 mb/s of data, so for higher volume streams, more partitions are recommended. If omitted, the partitions count of the existing stream on the branch will be used. + :type partitions_count: Optional[PartitionsCount] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param schema: The Foundry schema to apply to the new stream. If omitted, the schema of the existing stream on the branch will be used. + :type schema: Optional[StreamSchema] + :param stream_type: A conceptual representation of the expected shape of the data for a stream. HIGH_THROUGHPUT and LOW_LATENCY are not compatible with each other. Defaults to LOW_LATENCY. If omitted, the stream type of the existing stream on the branch will be used. + :type stream_type: Optional[StreamType] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: streams_models.Stream + + :raises InvalidFieldSchema: The field schema failed validations + :raises InvalidSchema: The schema failed validations + :raises InvalidStreamNoSchema: The requested stream exists but is invalid, as it does not have a schema. + :raises InvalidStreamType: The stream type is invalid. + :raises ResetStreamPermissionDenied: Could not reset the Stream. + :raises StreamNotFound: The given Stream could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/streams/datasets/{datasetRid}/streams/{streamBranchName}/reset", + query_params={ + "preview": preview, + }, + path_params={ + "datasetRid": dataset_rid, + "streamBranchName": stream_branch_name, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=streams_models.ResetStreamRequest( + schema_=schema, + partitions_count=partitions_count, + stream_type=stream_type, + compressed=compressed, + ), + response_type=streams_models.Stream, + request_timeout=request_timeout, + throwable_errors={ + "InvalidFieldSchema": core_errors.InvalidFieldSchema, + "InvalidSchema": core_errors.InvalidSchema, + "InvalidStreamNoSchema": streams_errors.InvalidStreamNoSchema, + "InvalidStreamType": streams_errors.InvalidStreamType, + "ResetStreamPermissionDenied": streams_errors.ResetStreamPermissionDenied, + "StreamNotFound": streams_errors.StreamNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _StreamClientRaw: + def __init__(self, client: StreamClient) -> None: + def create(_: streams_models.Stream): ... + def get(_: streams_models.Stream): ... + def publish_binary_record(_: None): ... + def publish_record(_: None): ... + def publish_records(_: None): ... + def reset(_: streams_models.Stream): ... + + self.create = core.with_raw_response(create, client.create) + self.get = core.with_raw_response(get, client.get) + self.publish_binary_record = core.with_raw_response( + publish_binary_record, client.publish_binary_record + ) + self.publish_record = core.with_raw_response(publish_record, client.publish_record) + self.publish_records = core.with_raw_response(publish_records, client.publish_records) + self.reset = core.with_raw_response(reset, client.reset) + + +class _StreamClientStreaming: + def __init__(self, client: StreamClient) -> None: + def create(_: streams_models.Stream): ... + def get(_: streams_models.Stream): ... + def reset(_: streams_models.Stream): ... + + self.create = core.with_streaming_response(create, client.create) + self.get = core.with_streaming_response(get, client.get) + self.reset = core.with_streaming_response(reset, client.reset) + + +class AsyncStreamClient: + """ + The API client for the Stream Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncStreamClientStreaming(self) + self.with_raw_response = _AsyncStreamClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def create( + self, + dataset_rid: datasets_models.DatasetRid, + *, + branch_name: datasets_models.BranchName, + schema: streams_models.CreateStreamRequestStreamSchema, + compressed: typing.Optional[streams_models.Compressed] = None, + partitions_count: typing.Optional[streams_models.PartitionsCount] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + stream_type: typing.Optional[streams_models.StreamType] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[streams_models.Stream]: + """ + Creates a new branch on the backing streaming dataset, and creates a new stream on that branch. + + :param dataset_rid: + :type dataset_rid: DatasetRid + :param branch_name: + :type branch_name: BranchName + :param schema: The Foundry schema for this stream. + :type schema: CreateStreamRequestStreamSchema + :param compressed: Whether or not compression is enabled for the stream. Defaults to false. + :type compressed: Optional[Compressed] + :param partitions_count: The number of partitions for the Foundry stream. Defaults to 1. Generally, each partition can handle about 5 mb/s of data, so for higher volume streams, more partitions are recommended. + :type partitions_count: Optional[PartitionsCount] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param stream_type: A conceptual representation of the expected shape of the data for a stream. HIGH_THROUGHPUT and LOW_LATENCY are not compatible with each other. Defaults to LOW_LATENCY. + :type stream_type: Optional[StreamType] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[streams_models.Stream] + + :raises BranchAlreadyExists: The branch cannot be created because a branch with that name already exists. + :raises CreateStreamPermissionDenied: Could not create the Stream. + :raises InvalidFieldSchema: The field schema failed validations + :raises InvalidSchema: The schema failed validations + :raises InvalidStreamType: The stream type is invalid. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/streams/datasets/{datasetRid}/streams", + query_params={ + "preview": preview, + }, + path_params={ + "datasetRid": dataset_rid, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=streams_models.CreateStreamRequest( + schema_=schema, + partitions_count=partitions_count, + stream_type=stream_type, + branch_name=branch_name, + compressed=compressed, + ), + response_type=streams_models.Stream, + request_timeout=request_timeout, + throwable_errors={ + "BranchAlreadyExists": datasets_errors.BranchAlreadyExists, + "CreateStreamPermissionDenied": streams_errors.CreateStreamPermissionDenied, + "InvalidFieldSchema": core_errors.InvalidFieldSchema, + "InvalidSchema": core_errors.InvalidSchema, + "InvalidStreamType": streams_errors.InvalidStreamType, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + dataset_rid: datasets_models.DatasetRid, + stream_branch_name: datasets_models.BranchName, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[streams_models.Stream]: + """ + Get a stream by its branch name. If the branch does not exist, there is no stream on that branch, or the + user does not have permission to access the stream, a 404 error will be returned. + + :param dataset_rid: + :type dataset_rid: DatasetRid + :param stream_branch_name: + :type stream_branch_name: BranchName + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[streams_models.Stream] + + :raises InvalidFieldSchema: The field schema failed validations + :raises InvalidStreamNoSchema: The requested stream exists but is invalid, as it does not have a schema. + :raises InvalidStreamType: The stream type is invalid. + :raises StreamNotFound: The given Stream could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/streams/datasets/{datasetRid}/streams/{streamBranchName}", + query_params={ + "preview": preview, + }, + path_params={ + "datasetRid": dataset_rid, + "streamBranchName": stream_branch_name, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=streams_models.Stream, + request_timeout=request_timeout, + throwable_errors={ + "InvalidFieldSchema": core_errors.InvalidFieldSchema, + "InvalidStreamNoSchema": streams_errors.InvalidStreamNoSchema, + "InvalidStreamType": streams_errors.InvalidStreamType, + "StreamNotFound": streams_errors.StreamNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def publish_binary_record( + self, + dataset_rid: datasets_models.DatasetRid, + stream_branch_name: datasets_models.BranchName, + body: bytes, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + view_rid: typing.Optional[streams_models.ViewRid] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[None]: + """ + Publish a single binary record to the stream. The stream's schema must be a single binary field. + + :param dataset_rid: + :type dataset_rid: DatasetRid + :param stream_branch_name: + :type stream_branch_name: BranchName + :param body: The binary record to publish to the stream + :type body: bytes + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param view_rid: If provided, this operation will only write to the stream corresponding to the specified view rid. If not provided, this operation will write to the latest stream on the branch. Providing this value is an advanced configuration, to be used when additional control over the underlying streaming data structures is needed. + :type view_rid: Optional[ViewRid] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[None] + + :raises PublishBinaryRecordToStreamPermissionDenied: Could not publishBinaryRecord the Stream. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/highScale/streams/datasets/{datasetRid}/streams/{streamBranchName}/publishBinaryRecord", + query_params={ + "preview": preview, + "viewRid": view_rid, + }, + path_params={ + "datasetRid": dataset_rid, + "streamBranchName": stream_branch_name, + }, + header_params={ + "Content-Type": "application/octet-stream", + }, + body=body, + response_type=None, + request_timeout=request_timeout, + throwable_errors={ + "PublishBinaryRecordToStreamPermissionDenied": streams_errors.PublishBinaryRecordToStreamPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def publish_record( + self, + dataset_rid: datasets_models.DatasetRid, + stream_branch_name: datasets_models.BranchName, + *, + record: streams_models.Record, + preview: typing.Optional[core_models.PreviewMode] = None, + view_rid: typing.Optional[streams_models.ViewRid] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[None]: + """ + Publish a single record to the stream. The record will be validated against the stream's schema, and + rejected if it is invalid. + + :param dataset_rid: + :type dataset_rid: DatasetRid + :param stream_branch_name: + :type stream_branch_name: BranchName + :param record: The record to publish to the stream + :type record: Record + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param view_rid: If provided, this endpoint will only write to the stream corresponding to the specified view rid. If not provided, this endpoint will write the latest stream on the branch. Providing this value is an advanced configuration, to be used when additional control over the underlying streaming data structures is needed. + :type view_rid: Optional[ViewRid] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[None] + + :raises PublishRecordToStreamPermissionDenied: Could not publishRecord the Stream. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/highScale/streams/datasets/{datasetRid}/streams/{streamBranchName}/publishRecord", + query_params={ + "preview": preview, + }, + path_params={ + "datasetRid": dataset_rid, + "streamBranchName": stream_branch_name, + }, + header_params={ + "Content-Type": "application/json", + }, + body=streams_models.PublishRecordToStreamRequest( + record=record, + view_rid=view_rid, + ), + response_type=None, + request_timeout=request_timeout, + throwable_errors={ + "PublishRecordToStreamPermissionDenied": streams_errors.PublishRecordToStreamPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def publish_records( + self, + dataset_rid: datasets_models.DatasetRid, + stream_branch_name: datasets_models.BranchName, + *, + records: typing.List[streams_models.Record], + preview: typing.Optional[core_models.PreviewMode] = None, + view_rid: typing.Optional[streams_models.ViewRid] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[None]: + """ + Publish a batch of records to the stream. The records will be validated against the stream's schema, and + the batch will be rejected if one or more of the records are invalid. + + :param dataset_rid: + :type dataset_rid: DatasetRid + :param stream_branch_name: + :type stream_branch_name: BranchName + :param records: The records to publish to the stream + :type records: List[Record] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param view_rid: If provided, this endpoint will only write to the stream corresponding to the specified view rid. If not provided, this endpoint will write to the latest stream on the branch. Providing this value is an advanced configuration, to be used when additional control over the underlying streaming data structures is needed. + :type view_rid: Optional[ViewRid] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[None] + + :raises PublishRecordsToStreamPermissionDenied: Could not publishRecords the Stream. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/highScale/streams/datasets/{datasetRid}/streams/{streamBranchName}/publishRecords", + query_params={ + "preview": preview, + }, + path_params={ + "datasetRid": dataset_rid, + "streamBranchName": stream_branch_name, + }, + header_params={ + "Content-Type": "application/json", + }, + body=streams_models.PublishRecordsToStreamRequest( + records=records, + view_rid=view_rid, + ), + response_type=None, + request_timeout=request_timeout, + throwable_errors={ + "PublishRecordsToStreamPermissionDenied": streams_errors.PublishRecordsToStreamPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def reset( + self, + dataset_rid: datasets_models.DatasetRid, + stream_branch_name: datasets_models.BranchName, + *, + compressed: typing.Optional[streams_models.Compressed] = None, + partitions_count: typing.Optional[streams_models.PartitionsCount] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + schema: typing.Optional[core_models.StreamSchema] = None, + stream_type: typing.Optional[streams_models.StreamType] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[streams_models.Stream]: + """ + Reset the stream on the given dataset branch, clearing the existing records and allowing new configurations + to be applied. + + To change the stream settings without clearing the records, update the stream settings in-platform. + + This will create a new stream view (as seen by the change of the `viewRid` on the branch), + which will be the new stream view that will be written to for the branch. + + :param dataset_rid: + :type dataset_rid: DatasetRid + :param stream_branch_name: + :type stream_branch_name: BranchName + :param compressed: Whether or not compression is enabled for the stream. If omitted, the compression setting of the existing stream on the branch will be used. + :type compressed: Optional[Compressed] + :param partitions_count: The number of partitions for the Foundry stream. Generally, each partition can handle about 5 mb/s of data, so for higher volume streams, more partitions are recommended. If omitted, the partitions count of the existing stream on the branch will be used. + :type partitions_count: Optional[PartitionsCount] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param schema: The Foundry schema to apply to the new stream. If omitted, the schema of the existing stream on the branch will be used. + :type schema: Optional[StreamSchema] + :param stream_type: A conceptual representation of the expected shape of the data for a stream. HIGH_THROUGHPUT and LOW_LATENCY are not compatible with each other. Defaults to LOW_LATENCY. If omitted, the stream type of the existing stream on the branch will be used. + :type stream_type: Optional[StreamType] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[streams_models.Stream] + + :raises InvalidFieldSchema: The field schema failed validations + :raises InvalidSchema: The schema failed validations + :raises InvalidStreamNoSchema: The requested stream exists but is invalid, as it does not have a schema. + :raises InvalidStreamType: The stream type is invalid. + :raises ResetStreamPermissionDenied: Could not reset the Stream. + :raises StreamNotFound: The given Stream could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/streams/datasets/{datasetRid}/streams/{streamBranchName}/reset", + query_params={ + "preview": preview, + }, + path_params={ + "datasetRid": dataset_rid, + "streamBranchName": stream_branch_name, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=streams_models.ResetStreamRequest( + schema_=schema, + partitions_count=partitions_count, + stream_type=stream_type, + compressed=compressed, + ), + response_type=streams_models.Stream, + request_timeout=request_timeout, + throwable_errors={ + "InvalidFieldSchema": core_errors.InvalidFieldSchema, + "InvalidSchema": core_errors.InvalidSchema, + "InvalidStreamNoSchema": streams_errors.InvalidStreamNoSchema, + "InvalidStreamType": streams_errors.InvalidStreamType, + "ResetStreamPermissionDenied": streams_errors.ResetStreamPermissionDenied, + "StreamNotFound": streams_errors.StreamNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _AsyncStreamClientRaw: + def __init__(self, client: AsyncStreamClient) -> None: + def create(_: streams_models.Stream): ... + def get(_: streams_models.Stream): ... + def publish_binary_record(_: None): ... + def publish_record(_: None): ... + def publish_records(_: None): ... + def reset(_: streams_models.Stream): ... + + self.create = core.async_with_raw_response(create, client.create) + self.get = core.async_with_raw_response(get, client.get) + self.publish_binary_record = core.async_with_raw_response( + publish_binary_record, client.publish_binary_record + ) + self.publish_record = core.async_with_raw_response(publish_record, client.publish_record) + self.publish_records = core.async_with_raw_response(publish_records, client.publish_records) + self.reset = core.async_with_raw_response(reset, client.reset) + + +class _AsyncStreamClientStreaming: + def __init__(self, client: AsyncStreamClient) -> None: + def create(_: streams_models.Stream): ... + def get(_: streams_models.Stream): ... + def reset(_: streams_models.Stream): ... + + self.create = core.async_with_streaming_response(create, client.create) + self.get = core.async_with_streaming_response(get, client.get) + self.reset = core.async_with_streaming_response(reset, client.reset) diff --git a/foundry_sdk/v2/third_party_applications/__init__.py b/foundry_sdk/v2/third_party_applications/__init__.py new file mode 100644 index 000000000..f23d3d134 --- /dev/null +++ b/foundry_sdk/v2/third_party_applications/__init__.py @@ -0,0 +1,24 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +from foundry_sdk.v2.third_party_applications._client import ( + AsyncThirdPartyApplicationsClient, +) # NOQA +from foundry_sdk.v2.third_party_applications._client import ThirdPartyApplicationsClient + +__all__ = [ + "ThirdPartyApplicationsClient", + "AsyncThirdPartyApplicationsClient", +] diff --git a/foundry_sdk/v2/third_party_applications/_client.py b/foundry_sdk/v2/third_party_applications/_client.py new file mode 100644 index 000000000..858314ceb --- /dev/null +++ b/foundry_sdk/v2/third_party_applications/_client.py @@ -0,0 +1,75 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing +from functools import cached_property + +from foundry_sdk import _core as core + + +class ThirdPartyApplicationsClient: + """ + The API client for the ThirdPartyApplications Namespace. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + + @cached_property + def ThirdPartyApplication(self): + from foundry_sdk.v2.third_party_applications.third_party_application import ( + ThirdPartyApplicationClient, + ) # NOQA + + return ThirdPartyApplicationClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + +class AsyncThirdPartyApplicationsClient: + """ + The Async API client for the ThirdPartyApplications Namespace. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + from foundry_sdk.v2.third_party_applications.third_party_application import ( + AsyncThirdPartyApplicationClient, + ) # NOQA + + self.ThirdPartyApplication = AsyncThirdPartyApplicationClient( + auth=auth, hostname=hostname, config=config + ) diff --git a/foundry_sdk/v2/third_party_applications/errors.py b/foundry_sdk/v2/third_party_applications/errors.py new file mode 100644 index 000000000..d025e2705 --- /dev/null +++ b/foundry_sdk/v2/third_party_applications/errors.py @@ -0,0 +1,275 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing +from dataclasses import dataclass + +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v2.third_party_applications import ( + models as third_party_applications_models, +) # NOQA + + +class CannotDeleteDeployedVersionParameters(typing_extensions.TypedDict): + """The given website version is deployed. You must un-deploy it before deleting it.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + version: third_party_applications_models.VersionVersion + + +@dataclass +class CannotDeleteDeployedVersion(errors.BadRequestError): + name: typing.Literal["CannotDeleteDeployedVersion"] + parameters: CannotDeleteDeployedVersionParameters + error_instance_id: str + + +class DeleteVersionPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not delete the Version.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + thirdPartyApplicationRid: third_party_applications_models.ThirdPartyApplicationRid + """An RID identifying a third-party application created in Developer Console.""" + + versionVersion: third_party_applications_models.VersionVersion + """The semantic version of the Website.""" + + +@dataclass +class DeleteVersionPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["DeleteVersionPermissionDenied"] + parameters: DeleteVersionPermissionDeniedParameters + error_instance_id: str + + +class DeployWebsitePermissionDeniedParameters(typing_extensions.TypedDict): + """Could not deploy the Website.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + thirdPartyApplicationRid: third_party_applications_models.ThirdPartyApplicationRid + """An RID identifying a third-party application created in Developer Console.""" + + +@dataclass +class DeployWebsitePermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["DeployWebsitePermissionDenied"] + parameters: DeployWebsitePermissionDeniedParameters + error_instance_id: str + + +class FileCountLimitExceededParameters(typing_extensions.TypedDict): + """The .zip archive contains too many files.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + fileCountLimit: int + + +@dataclass +class FileCountLimitExceeded(errors.BadRequestError): + name: typing.Literal["FileCountLimitExceeded"] + parameters: FileCountLimitExceededParameters + error_instance_id: str + + +class FileSizeLimitExceededParameters(typing_extensions.TypedDict): + """ + A file inside the .zip archive is too big. You must ensure that all files inside + the .zip archive are within the limit. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + fileSizeBytesLimit: core.Long + currentFileSizeBytes: core.Long + currentFilePath: str + + +@dataclass +class FileSizeLimitExceeded(errors.BadRequestError): + name: typing.Literal["FileSizeLimitExceeded"] + parameters: FileSizeLimitExceededParameters + error_instance_id: str + + +class InvalidVersionParameters(typing_extensions.TypedDict): + """The given website version is invalid. Versions must follow semantic versioning with major, minor, and patch versions separate by periods, e.g. `0.1.0` or `1.2.3`.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + version: str + + +@dataclass +class InvalidVersion(errors.BadRequestError): + name: typing.Literal["InvalidVersion"] + parameters: InvalidVersionParameters + error_instance_id: str + + +class ThirdPartyApplicationNotFoundParameters(typing_extensions.TypedDict): + """The given ThirdPartyApplication could not be found.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + thirdPartyApplicationRid: third_party_applications_models.ThirdPartyApplicationRid + """An RID identifying a third-party application created in Developer Console.""" + + +@dataclass +class ThirdPartyApplicationNotFound(errors.NotFoundError): + name: typing.Literal["ThirdPartyApplicationNotFound"] + parameters: ThirdPartyApplicationNotFoundParameters + error_instance_id: str + + +class UndeployWebsitePermissionDeniedParameters(typing_extensions.TypedDict): + """Could not undeploy the Website.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + thirdPartyApplicationRid: third_party_applications_models.ThirdPartyApplicationRid + """An RID identifying a third-party application created in Developer Console.""" + + +@dataclass +class UndeployWebsitePermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["UndeployWebsitePermissionDenied"] + parameters: UndeployWebsitePermissionDeniedParameters + error_instance_id: str + + +class UploadSnapshotVersionPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not uploadSnapshot the Version.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + thirdPartyApplicationRid: third_party_applications_models.ThirdPartyApplicationRid + """An RID identifying a third-party application created in Developer Console.""" + + +@dataclass +class UploadSnapshotVersionPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["UploadSnapshotVersionPermissionDenied"] + parameters: UploadSnapshotVersionPermissionDeniedParameters + error_instance_id: str + + +class UploadVersionPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not upload the Version.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + thirdPartyApplicationRid: third_party_applications_models.ThirdPartyApplicationRid + """An RID identifying a third-party application created in Developer Console.""" + + +@dataclass +class UploadVersionPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["UploadVersionPermissionDenied"] + parameters: UploadVersionPermissionDeniedParameters + error_instance_id: str + + +class VersionAlreadyExistsParameters(typing_extensions.TypedDict): + """The given website version already exists.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + version: third_party_applications_models.VersionVersion + + +@dataclass +class VersionAlreadyExists(errors.ConflictError): + name: typing.Literal["VersionAlreadyExists"] + parameters: VersionAlreadyExistsParameters + error_instance_id: str + + +class VersionLimitExceededParameters(typing_extensions.TypedDict): + """ + The website contains too many versions. You must delete an old version before + uploading a new one. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + versionLimit: int + + +@dataclass +class VersionLimitExceeded(errors.BadRequestError): + name: typing.Literal["VersionLimitExceeded"] + parameters: VersionLimitExceededParameters + error_instance_id: str + + +class VersionNotFoundParameters(typing_extensions.TypedDict): + """The given Version could not be found.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + thirdPartyApplicationRid: third_party_applications_models.ThirdPartyApplicationRid + """An RID identifying a third-party application created in Developer Console.""" + + versionVersion: third_party_applications_models.VersionVersion + """The semantic version of the Website.""" + + +@dataclass +class VersionNotFound(errors.NotFoundError): + name: typing.Literal["VersionNotFound"] + parameters: VersionNotFoundParameters + error_instance_id: str + + +class WebsiteNotFoundParameters(typing_extensions.TypedDict): + """The given Website could not be found.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + thirdPartyApplicationRid: third_party_applications_models.ThirdPartyApplicationRid + """An RID identifying a third-party application created in Developer Console.""" + + +@dataclass +class WebsiteNotFound(errors.NotFoundError): + name: typing.Literal["WebsiteNotFound"] + parameters: WebsiteNotFoundParameters + error_instance_id: str + + +__all__ = [ + "CannotDeleteDeployedVersion", + "DeleteVersionPermissionDenied", + "DeployWebsitePermissionDenied", + "FileCountLimitExceeded", + "FileSizeLimitExceeded", + "InvalidVersion", + "ThirdPartyApplicationNotFound", + "UndeployWebsitePermissionDenied", + "UploadSnapshotVersionPermissionDenied", + "UploadVersionPermissionDenied", + "VersionAlreadyExists", + "VersionLimitExceeded", + "VersionNotFound", + "WebsiteNotFound", +] diff --git a/foundry_sdk/v2/third_party_applications/models.py b/foundry_sdk/v2/third_party_applications/models.py new file mode 100644 index 000000000..a37e952d5 --- /dev/null +++ b/foundry_sdk/v2/third_party_applications/models.py @@ -0,0 +1,84 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +from __future__ import annotations + +import typing + +import pydantic + +from foundry_sdk import _core as core +from foundry_sdk.v2.core import models as core_models + + +class DeployWebsiteRequest(core.ModelBase): + """DeployWebsiteRequest""" + + version: VersionVersion + + +class ListVersionsResponse(core.ModelBase): + """ListVersionsResponse""" + + data: typing.List[Version] + next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] + + +Subdomain = str +"""A subdomain from which a website is served.""" + + +class ThirdPartyApplication(core.ModelBase): + """ThirdPartyApplication""" + + rid: ThirdPartyApplicationRid + """An RID identifying a third-party application created in Developer Console.""" + + +ThirdPartyApplicationRid = core.RID +"""An RID identifying a third-party application created in Developer Console.""" + + +class Version(core.ModelBase): + """Version""" + + version: VersionVersion + """The semantic version of the Website.""" + + +VersionVersion = str +"""The semantic version of the Website.""" + + +class Website(core.ModelBase): + """Website""" + + deployed_version: typing.Optional[VersionVersion] = pydantic.Field(alias=str("deployedVersion"), default=None) # type: ignore[literal-required] + """The version of the Website that is currently deployed.""" + + subdomains: typing.List[Subdomain] + """The subdomains from which the Website is currently served.""" + + +__all__ = [ + "DeployWebsiteRequest", + "ListVersionsResponse", + "Subdomain", + "ThirdPartyApplication", + "ThirdPartyApplicationRid", + "Version", + "VersionVersion", + "Website", +] diff --git a/foundry_sdk/v2/third_party_applications/third_party_application.py b/foundry_sdk/v2/third_party_applications/third_party_application.py new file mode 100644 index 000000000..b6746fc68 --- /dev/null +++ b/foundry_sdk/v2/third_party_applications/third_party_application.py @@ -0,0 +1,222 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing +from functools import cached_property + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v2.core import models as core_models +from foundry_sdk.v2.third_party_applications import ( + errors as third_party_applications_errors, +) # NOQA +from foundry_sdk.v2.third_party_applications import ( + models as third_party_applications_models, +) # NOQA + + +class ThirdPartyApplicationClient: + """ + The API client for the ThirdPartyApplication Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _ThirdPartyApplicationClientStreaming(self) + self.with_raw_response = _ThirdPartyApplicationClientRaw(self) + + @cached_property + def Website(self): + from foundry_sdk.v2.third_party_applications.website import WebsiteClient + + return WebsiteClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + third_party_application_rid: third_party_applications_models.ThirdPartyApplicationRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> third_party_applications_models.ThirdPartyApplication: + """ + Get the ThirdPartyApplication with the specified rid. + :param third_party_application_rid: An RID identifying a third-party application created in Developer Console. + :type third_party_application_rid: ThirdPartyApplicationRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: third_party_applications_models.ThirdPartyApplication + + :raises ThirdPartyApplicationNotFound: The given ThirdPartyApplication could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/thirdPartyApplications/{thirdPartyApplicationRid}", + query_params={ + "preview": preview, + }, + path_params={ + "thirdPartyApplicationRid": third_party_application_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=third_party_applications_models.ThirdPartyApplication, + request_timeout=request_timeout, + throwable_errors={ + "ThirdPartyApplicationNotFound": third_party_applications_errors.ThirdPartyApplicationNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _ThirdPartyApplicationClientRaw: + def __init__(self, client: ThirdPartyApplicationClient) -> None: + def get(_: third_party_applications_models.ThirdPartyApplication): ... + + self.get = core.with_raw_response(get, client.get) + + +class _ThirdPartyApplicationClientStreaming: + def __init__(self, client: ThirdPartyApplicationClient) -> None: + def get(_: third_party_applications_models.ThirdPartyApplication): ... + + self.get = core.with_streaming_response(get, client.get) + + +class AsyncThirdPartyApplicationClient: + """ + The API client for the ThirdPartyApplication Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncThirdPartyApplicationClientStreaming(self) + self.with_raw_response = _AsyncThirdPartyApplicationClientRaw(self) + + @cached_property + def Website(self): + from foundry_sdk.v2.third_party_applications.website import AsyncWebsiteClient + + return AsyncWebsiteClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + third_party_application_rid: third_party_applications_models.ThirdPartyApplicationRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[third_party_applications_models.ThirdPartyApplication]: + """ + Get the ThirdPartyApplication with the specified rid. + :param third_party_application_rid: An RID identifying a third-party application created in Developer Console. + :type third_party_application_rid: ThirdPartyApplicationRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[third_party_applications_models.ThirdPartyApplication] + + :raises ThirdPartyApplicationNotFound: The given ThirdPartyApplication could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/thirdPartyApplications/{thirdPartyApplicationRid}", + query_params={ + "preview": preview, + }, + path_params={ + "thirdPartyApplicationRid": third_party_application_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=third_party_applications_models.ThirdPartyApplication, + request_timeout=request_timeout, + throwable_errors={ + "ThirdPartyApplicationNotFound": third_party_applications_errors.ThirdPartyApplicationNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _AsyncThirdPartyApplicationClientRaw: + def __init__(self, client: AsyncThirdPartyApplicationClient) -> None: + def get(_: third_party_applications_models.ThirdPartyApplication): ... + + self.get = core.async_with_raw_response(get, client.get) + + +class _AsyncThirdPartyApplicationClientStreaming: + def __init__(self, client: AsyncThirdPartyApplicationClient) -> None: + def get(_: third_party_applications_models.ThirdPartyApplication): ... + + self.get = core.async_with_streaming_response(get, client.get) diff --git a/foundry_sdk/v2/third_party_applications/version.py b/foundry_sdk/v2/third_party_applications/version.py new file mode 100644 index 000000000..03469cae2 --- /dev/null +++ b/foundry_sdk/v2/third_party_applications/version.py @@ -0,0 +1,645 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v2.core import models as core_models +from foundry_sdk.v2.third_party_applications import ( + errors as third_party_applications_errors, +) # NOQA +from foundry_sdk.v2.third_party_applications import ( + models as third_party_applications_models, +) # NOQA + + +class VersionClient: + """ + The API client for the Version Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _VersionClientStreaming(self) + self.with_raw_response = _VersionClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def delete( + self, + third_party_application_rid: third_party_applications_models.ThirdPartyApplicationRid, + version_version: third_party_applications_models.VersionVersion, + *, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> None: + """ + Delete the Version with the specified version. + :param third_party_application_rid: An RID identifying a third-party application created in Developer Console. + :type third_party_application_rid: ThirdPartyApplicationRid + :param version_version: The semantic version of the Website. + :type version_version: VersionVersion + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: None + + :raises DeleteVersionPermissionDenied: Could not delete the Version. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="DELETE", + resource_path="/v2/thirdPartyApplications/{thirdPartyApplicationRid}/website/versions/{versionVersion}", + query_params={}, + path_params={ + "thirdPartyApplicationRid": third_party_application_rid, + "versionVersion": version_version, + }, + header_params={}, + body=None, + response_type=None, + request_timeout=request_timeout, + throwable_errors={ + "DeleteVersionPermissionDenied": third_party_applications_errors.DeleteVersionPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + third_party_application_rid: third_party_applications_models.ThirdPartyApplicationRid, + version_version: third_party_applications_models.VersionVersion, + *, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> third_party_applications_models.Version: + """ + Get the Version with the specified version. + :param third_party_application_rid: An RID identifying a third-party application created in Developer Console. + :type third_party_application_rid: ThirdPartyApplicationRid + :param version_version: The semantic version of the Website. + :type version_version: VersionVersion + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: third_party_applications_models.Version + + :raises VersionNotFound: The given Version could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/thirdPartyApplications/{thirdPartyApplicationRid}/website/versions/{versionVersion}", + query_params={}, + path_params={ + "thirdPartyApplicationRid": third_party_application_rid, + "versionVersion": version_version, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=third_party_applications_models.Version, + request_timeout=request_timeout, + throwable_errors={ + "VersionNotFound": third_party_applications_errors.VersionNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def list( + self, + third_party_application_rid: third_party_applications_models.ThirdPartyApplicationRid, + *, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.ResourceIterator[third_party_applications_models.Version]: + """ + Lists all Versions. + + This is a paged endpoint. Each page may be smaller or larger than the requested page size. However, it is guaranteed that if there are more results available, the `nextPageToken` field will be populated. To get the next page, make the same request again, but set the value of the `pageToken` query parameter to be value of the `nextPageToken` value of the previous response. If there is no `nextPageToken` field in the response, you are on the last page. + :param third_party_application_rid: An RID identifying a third-party application created in Developer Console. + :type third_party_application_rid: ThirdPartyApplicationRid + :param page_size: The page size to use for the endpoint. + :type page_size: Optional[PageSize] + :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. + :type page_token: Optional[PageToken] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.ResourceIterator[third_party_applications_models.Version] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/thirdPartyApplications/{thirdPartyApplicationRid}/website/versions", + query_params={ + "pageSize": page_size, + "pageToken": page_token, + }, + path_params={ + "thirdPartyApplicationRid": third_party_application_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=third_party_applications_models.ListVersionsResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def upload( + self, + third_party_application_rid: third_party_applications_models.ThirdPartyApplicationRid, + body: bytes, + *, + version: third_party_applications_models.VersionVersion, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> third_party_applications_models.Version: + """ + Upload a new version of the Website. + :param third_party_application_rid: An RID identifying a third-party application created in Developer Console. + :type third_party_application_rid: ThirdPartyApplicationRid + :param body: The zip file that contains the contents of your application. For more information, refer to the [documentation](https://palantir.com/docs/foundry/ontology-sdk/deploy-osdk-application-on-foundry/) user documentation. + :type body: bytes + :param version: + :type version: VersionVersion + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: third_party_applications_models.Version + + :raises UploadVersionPermissionDenied: Could not upload the Version. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/thirdPartyApplications/{thirdPartyApplicationRid}/website/versions/upload", + query_params={ + "version": version, + }, + path_params={ + "thirdPartyApplicationRid": third_party_application_rid, + }, + header_params={ + "Content-Type": "application/octet-stream", + "Accept": "application/json", + }, + body=body, + response_type=third_party_applications_models.Version, + request_timeout=request_timeout, + throwable_errors={ + "UploadVersionPermissionDenied": third_party_applications_errors.UploadVersionPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def upload_snapshot( + self, + third_party_application_rid: third_party_applications_models.ThirdPartyApplicationRid, + body: bytes, + *, + version: third_party_applications_models.VersionVersion, + preview: typing.Optional[core_models.PreviewMode] = None, + snapshot_identifier: typing.Optional[str] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> third_party_applications_models.Version: + """ + Upload a snapshot version of the Website. Snapshot versions are automatically deleted after two days. + + :param third_party_application_rid: An RID identifying a third-party application created in Developer Console. + :type third_party_application_rid: ThirdPartyApplicationRid + :param body: The zip file that contains the contents of your application. For more information, refer to the [documentation](https://palantir.com/docs/foundry/ontology-sdk/deploy-osdk-application-on-foundry/) user documentation. + :type body: bytes + :param version: + :type version: VersionVersion + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param snapshot_identifier: The identifier of the snapshot. If the identifier follows the format `foundry.v1@@@`, PR preview for such identifier will be accessible from foundry code repositories. + :type snapshot_identifier: Optional[str] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: third_party_applications_models.Version + + :raises UploadSnapshotVersionPermissionDenied: Could not uploadSnapshot the Version. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/thirdPartyApplications/{thirdPartyApplicationRid}/website/versions/uploadSnapshot", + query_params={ + "version": version, + "preview": preview, + "snapshotIdentifier": snapshot_identifier, + }, + path_params={ + "thirdPartyApplicationRid": third_party_application_rid, + }, + header_params={ + "Content-Type": "application/octet-stream", + "Accept": "application/json", + }, + body=body, + response_type=third_party_applications_models.Version, + request_timeout=request_timeout, + throwable_errors={ + "UploadSnapshotVersionPermissionDenied": third_party_applications_errors.UploadSnapshotVersionPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _VersionClientRaw: + def __init__(self, client: VersionClient) -> None: + def delete(_: None): ... + def get(_: third_party_applications_models.Version): ... + def list(_: third_party_applications_models.ListVersionsResponse): ... + def upload(_: third_party_applications_models.Version): ... + def upload_snapshot(_: third_party_applications_models.Version): ... + + self.delete = core.with_raw_response(delete, client.delete) + self.get = core.with_raw_response(get, client.get) + self.list = core.with_raw_response(list, client.list) + self.upload = core.with_raw_response(upload, client.upload) + self.upload_snapshot = core.with_raw_response(upload_snapshot, client.upload_snapshot) + + +class _VersionClientStreaming: + def __init__(self, client: VersionClient) -> None: + def get(_: third_party_applications_models.Version): ... + def list(_: third_party_applications_models.ListVersionsResponse): ... + def upload(_: third_party_applications_models.Version): ... + def upload_snapshot(_: third_party_applications_models.Version): ... + + self.get = core.with_streaming_response(get, client.get) + self.list = core.with_streaming_response(list, client.list) + self.upload = core.with_streaming_response(upload, client.upload) + self.upload_snapshot = core.with_streaming_response(upload_snapshot, client.upload_snapshot) + + +class AsyncVersionClient: + """ + The API client for the Version Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncVersionClientStreaming(self) + self.with_raw_response = _AsyncVersionClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def delete( + self, + third_party_application_rid: third_party_applications_models.ThirdPartyApplicationRid, + version_version: third_party_applications_models.VersionVersion, + *, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[None]: + """ + Delete the Version with the specified version. + :param third_party_application_rid: An RID identifying a third-party application created in Developer Console. + :type third_party_application_rid: ThirdPartyApplicationRid + :param version_version: The semantic version of the Website. + :type version_version: VersionVersion + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[None] + + :raises DeleteVersionPermissionDenied: Could not delete the Version. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="DELETE", + resource_path="/v2/thirdPartyApplications/{thirdPartyApplicationRid}/website/versions/{versionVersion}", + query_params={}, + path_params={ + "thirdPartyApplicationRid": third_party_application_rid, + "versionVersion": version_version, + }, + header_params={}, + body=None, + response_type=None, + request_timeout=request_timeout, + throwable_errors={ + "DeleteVersionPermissionDenied": third_party_applications_errors.DeleteVersionPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + third_party_application_rid: third_party_applications_models.ThirdPartyApplicationRid, + version_version: third_party_applications_models.VersionVersion, + *, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[third_party_applications_models.Version]: + """ + Get the Version with the specified version. + :param third_party_application_rid: An RID identifying a third-party application created in Developer Console. + :type third_party_application_rid: ThirdPartyApplicationRid + :param version_version: The semantic version of the Website. + :type version_version: VersionVersion + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[third_party_applications_models.Version] + + :raises VersionNotFound: The given Version could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/thirdPartyApplications/{thirdPartyApplicationRid}/website/versions/{versionVersion}", + query_params={}, + path_params={ + "thirdPartyApplicationRid": third_party_application_rid, + "versionVersion": version_version, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=third_party_applications_models.Version, + request_timeout=request_timeout, + throwable_errors={ + "VersionNotFound": third_party_applications_errors.VersionNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def list( + self, + third_party_application_rid: third_party_applications_models.ThirdPartyApplicationRid, + *, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.AsyncResourceIterator[third_party_applications_models.Version]: + """ + Lists all Versions. + + This is a paged endpoint. Each page may be smaller or larger than the requested page size. However, it is guaranteed that if there are more results available, the `nextPageToken` field will be populated. To get the next page, make the same request again, but set the value of the `pageToken` query parameter to be value of the `nextPageToken` value of the previous response. If there is no `nextPageToken` field in the response, you are on the last page. + :param third_party_application_rid: An RID identifying a third-party application created in Developer Console. + :type third_party_application_rid: ThirdPartyApplicationRid + :param page_size: The page size to use for the endpoint. + :type page_size: Optional[PageSize] + :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. + :type page_token: Optional[PageToken] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.AsyncResourceIterator[third_party_applications_models.Version] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/thirdPartyApplications/{thirdPartyApplicationRid}/website/versions", + query_params={ + "pageSize": page_size, + "pageToken": page_token, + }, + path_params={ + "thirdPartyApplicationRid": third_party_application_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=third_party_applications_models.ListVersionsResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def upload( + self, + third_party_application_rid: third_party_applications_models.ThirdPartyApplicationRid, + body: bytes, + *, + version: third_party_applications_models.VersionVersion, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[third_party_applications_models.Version]: + """ + Upload a new version of the Website. + :param third_party_application_rid: An RID identifying a third-party application created in Developer Console. + :type third_party_application_rid: ThirdPartyApplicationRid + :param body: The zip file that contains the contents of your application. For more information, refer to the [documentation](https://palantir.com/docs/foundry/ontology-sdk/deploy-osdk-application-on-foundry/) user documentation. + :type body: bytes + :param version: + :type version: VersionVersion + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[third_party_applications_models.Version] + + :raises UploadVersionPermissionDenied: Could not upload the Version. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/thirdPartyApplications/{thirdPartyApplicationRid}/website/versions/upload", + query_params={ + "version": version, + }, + path_params={ + "thirdPartyApplicationRid": third_party_application_rid, + }, + header_params={ + "Content-Type": "application/octet-stream", + "Accept": "application/json", + }, + body=body, + response_type=third_party_applications_models.Version, + request_timeout=request_timeout, + throwable_errors={ + "UploadVersionPermissionDenied": third_party_applications_errors.UploadVersionPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def upload_snapshot( + self, + third_party_application_rid: third_party_applications_models.ThirdPartyApplicationRid, + body: bytes, + *, + version: third_party_applications_models.VersionVersion, + preview: typing.Optional[core_models.PreviewMode] = None, + snapshot_identifier: typing.Optional[str] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[third_party_applications_models.Version]: + """ + Upload a snapshot version of the Website. Snapshot versions are automatically deleted after two days. + + :param third_party_application_rid: An RID identifying a third-party application created in Developer Console. + :type third_party_application_rid: ThirdPartyApplicationRid + :param body: The zip file that contains the contents of your application. For more information, refer to the [documentation](https://palantir.com/docs/foundry/ontology-sdk/deploy-osdk-application-on-foundry/) user documentation. + :type body: bytes + :param version: + :type version: VersionVersion + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param snapshot_identifier: The identifier of the snapshot. If the identifier follows the format `foundry.v1@@@`, PR preview for such identifier will be accessible from foundry code repositories. + :type snapshot_identifier: Optional[str] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[third_party_applications_models.Version] + + :raises UploadSnapshotVersionPermissionDenied: Could not uploadSnapshot the Version. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/thirdPartyApplications/{thirdPartyApplicationRid}/website/versions/uploadSnapshot", + query_params={ + "version": version, + "preview": preview, + "snapshotIdentifier": snapshot_identifier, + }, + path_params={ + "thirdPartyApplicationRid": third_party_application_rid, + }, + header_params={ + "Content-Type": "application/octet-stream", + "Accept": "application/json", + }, + body=body, + response_type=third_party_applications_models.Version, + request_timeout=request_timeout, + throwable_errors={ + "UploadSnapshotVersionPermissionDenied": third_party_applications_errors.UploadSnapshotVersionPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _AsyncVersionClientRaw: + def __init__(self, client: AsyncVersionClient) -> None: + def delete(_: None): ... + def get(_: third_party_applications_models.Version): ... + def list(_: third_party_applications_models.ListVersionsResponse): ... + def upload(_: third_party_applications_models.Version): ... + def upload_snapshot(_: third_party_applications_models.Version): ... + + self.delete = core.async_with_raw_response(delete, client.delete) + self.get = core.async_with_raw_response(get, client.get) + self.list = core.async_with_raw_response(list, client.list) + self.upload = core.async_with_raw_response(upload, client.upload) + self.upload_snapshot = core.async_with_raw_response(upload_snapshot, client.upload_snapshot) + + +class _AsyncVersionClientStreaming: + def __init__(self, client: AsyncVersionClient) -> None: + def get(_: third_party_applications_models.Version): ... + def list(_: third_party_applications_models.ListVersionsResponse): ... + def upload(_: third_party_applications_models.Version): ... + def upload_snapshot(_: third_party_applications_models.Version): ... + + self.get = core.async_with_streaming_response(get, client.get) + self.list = core.async_with_streaming_response(list, client.list) + self.upload = core.async_with_streaming_response(upload, client.upload) + self.upload_snapshot = core.async_with_streaming_response( + upload_snapshot, client.upload_snapshot + ) diff --git a/foundry_sdk/v2/third_party_applications/website.py b/foundry_sdk/v2/third_party_applications/website.py new file mode 100644 index 000000000..0cc5e8172 --- /dev/null +++ b/foundry_sdk/v2/third_party_applications/website.py @@ -0,0 +1,411 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing +from functools import cached_property + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v2.third_party_applications import ( + errors as third_party_applications_errors, +) # NOQA +from foundry_sdk.v2.third_party_applications import ( + models as third_party_applications_models, +) # NOQA + + +class WebsiteClient: + """ + The API client for the Website Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _WebsiteClientStreaming(self) + self.with_raw_response = _WebsiteClientRaw(self) + + @cached_property + def Version(self): + from foundry_sdk.v2.third_party_applications.version import VersionClient + + return VersionClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def deploy( + self, + third_party_application_rid: third_party_applications_models.ThirdPartyApplicationRid, + *, + version: third_party_applications_models.VersionVersion, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> third_party_applications_models.Website: + """ + Deploy a version of the Website. + :param third_party_application_rid: An RID identifying a third-party application created in Developer Console. + :type third_party_application_rid: ThirdPartyApplicationRid + :param version: + :type version: VersionVersion + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: third_party_applications_models.Website + + :raises DeployWebsitePermissionDenied: Could not deploy the Website. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/thirdPartyApplications/{thirdPartyApplicationRid}/website/deploy", + query_params={}, + path_params={ + "thirdPartyApplicationRid": third_party_application_rid, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=third_party_applications_models.DeployWebsiteRequest( + version=version, + ), + response_type=third_party_applications_models.Website, + request_timeout=request_timeout, + throwable_errors={ + "DeployWebsitePermissionDenied": third_party_applications_errors.DeployWebsitePermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + third_party_application_rid: third_party_applications_models.ThirdPartyApplicationRid, + *, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> third_party_applications_models.Website: + """ + Get the Website. + :param third_party_application_rid: An RID identifying a third-party application created in Developer Console. + :type third_party_application_rid: ThirdPartyApplicationRid + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: third_party_applications_models.Website + + :raises WebsiteNotFound: The given Website could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/thirdPartyApplications/{thirdPartyApplicationRid}/website", + query_params={}, + path_params={ + "thirdPartyApplicationRid": third_party_application_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=third_party_applications_models.Website, + request_timeout=request_timeout, + throwable_errors={ + "WebsiteNotFound": third_party_applications_errors.WebsiteNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def undeploy( + self, + third_party_application_rid: third_party_applications_models.ThirdPartyApplicationRid, + *, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> third_party_applications_models.Website: + """ + Remove the currently deployed version of the Website. + :param third_party_application_rid: An RID identifying a third-party application created in Developer Console. + :type third_party_application_rid: ThirdPartyApplicationRid + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: third_party_applications_models.Website + + :raises UndeployWebsitePermissionDenied: Could not undeploy the Website. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/thirdPartyApplications/{thirdPartyApplicationRid}/website/undeploy", + query_params={}, + path_params={ + "thirdPartyApplicationRid": third_party_application_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=third_party_applications_models.Website, + request_timeout=request_timeout, + throwable_errors={ + "UndeployWebsitePermissionDenied": third_party_applications_errors.UndeployWebsitePermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _WebsiteClientRaw: + def __init__(self, client: WebsiteClient) -> None: + def deploy(_: third_party_applications_models.Website): ... + def get(_: third_party_applications_models.Website): ... + def undeploy(_: third_party_applications_models.Website): ... + + self.deploy = core.with_raw_response(deploy, client.deploy) + self.get = core.with_raw_response(get, client.get) + self.undeploy = core.with_raw_response(undeploy, client.undeploy) + + +class _WebsiteClientStreaming: + def __init__(self, client: WebsiteClient) -> None: + def deploy(_: third_party_applications_models.Website): ... + def get(_: third_party_applications_models.Website): ... + def undeploy(_: third_party_applications_models.Website): ... + + self.deploy = core.with_streaming_response(deploy, client.deploy) + self.get = core.with_streaming_response(get, client.get) + self.undeploy = core.with_streaming_response(undeploy, client.undeploy) + + +class AsyncWebsiteClient: + """ + The API client for the Website Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncWebsiteClientStreaming(self) + self.with_raw_response = _AsyncWebsiteClientRaw(self) + + @cached_property + def Version(self): + from foundry_sdk.v2.third_party_applications.version import AsyncVersionClient + + return AsyncVersionClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def deploy( + self, + third_party_application_rid: third_party_applications_models.ThirdPartyApplicationRid, + *, + version: third_party_applications_models.VersionVersion, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[third_party_applications_models.Website]: + """ + Deploy a version of the Website. + :param third_party_application_rid: An RID identifying a third-party application created in Developer Console. + :type third_party_application_rid: ThirdPartyApplicationRid + :param version: + :type version: VersionVersion + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[third_party_applications_models.Website] + + :raises DeployWebsitePermissionDenied: Could not deploy the Website. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/thirdPartyApplications/{thirdPartyApplicationRid}/website/deploy", + query_params={}, + path_params={ + "thirdPartyApplicationRid": third_party_application_rid, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=third_party_applications_models.DeployWebsiteRequest( + version=version, + ), + response_type=third_party_applications_models.Website, + request_timeout=request_timeout, + throwable_errors={ + "DeployWebsitePermissionDenied": third_party_applications_errors.DeployWebsitePermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + third_party_application_rid: third_party_applications_models.ThirdPartyApplicationRid, + *, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[third_party_applications_models.Website]: + """ + Get the Website. + :param third_party_application_rid: An RID identifying a third-party application created in Developer Console. + :type third_party_application_rid: ThirdPartyApplicationRid + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[third_party_applications_models.Website] + + :raises WebsiteNotFound: The given Website could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/thirdPartyApplications/{thirdPartyApplicationRid}/website", + query_params={}, + path_params={ + "thirdPartyApplicationRid": third_party_application_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=third_party_applications_models.Website, + request_timeout=request_timeout, + throwable_errors={ + "WebsiteNotFound": third_party_applications_errors.WebsiteNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def undeploy( + self, + third_party_application_rid: third_party_applications_models.ThirdPartyApplicationRid, + *, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[third_party_applications_models.Website]: + """ + Remove the currently deployed version of the Website. + :param third_party_application_rid: An RID identifying a third-party application created in Developer Console. + :type third_party_application_rid: ThirdPartyApplicationRid + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[third_party_applications_models.Website] + + :raises UndeployWebsitePermissionDenied: Could not undeploy the Website. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/thirdPartyApplications/{thirdPartyApplicationRid}/website/undeploy", + query_params={}, + path_params={ + "thirdPartyApplicationRid": third_party_application_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=third_party_applications_models.Website, + request_timeout=request_timeout, + throwable_errors={ + "UndeployWebsitePermissionDenied": third_party_applications_errors.UndeployWebsitePermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _AsyncWebsiteClientRaw: + def __init__(self, client: AsyncWebsiteClient) -> None: + def deploy(_: third_party_applications_models.Website): ... + def get(_: third_party_applications_models.Website): ... + def undeploy(_: third_party_applications_models.Website): ... + + self.deploy = core.async_with_raw_response(deploy, client.deploy) + self.get = core.async_with_raw_response(get, client.get) + self.undeploy = core.async_with_raw_response(undeploy, client.undeploy) + + +class _AsyncWebsiteClientStreaming: + def __init__(self, client: AsyncWebsiteClient) -> None: + def deploy(_: third_party_applications_models.Website): ... + def get(_: third_party_applications_models.Website): ... + def undeploy(_: third_party_applications_models.Website): ... + + self.deploy = core.async_with_streaming_response(deploy, client.deploy) + self.get = core.async_with_streaming_response(get, client.get) + self.undeploy = core.async_with_streaming_response(undeploy, client.undeploy) diff --git a/foundry_sdk/v2/widgets/__init__.py b/foundry_sdk/v2/widgets/__init__.py new file mode 100644 index 000000000..6405a46a6 --- /dev/null +++ b/foundry_sdk/v2/widgets/__init__.py @@ -0,0 +1,22 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +from foundry_sdk.v2.widgets._client import AsyncWidgetsClient +from foundry_sdk.v2.widgets._client import WidgetsClient + +__all__ = [ + "WidgetsClient", + "AsyncWidgetsClient", +] diff --git a/foundry_sdk/v2/widgets/_client.py b/foundry_sdk/v2/widgets/_client.py new file mode 100644 index 000000000..43a2866e6 --- /dev/null +++ b/foundry_sdk/v2/widgets/_client.py @@ -0,0 +1,97 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing +from functools import cached_property + +from foundry_sdk import _core as core + + +class WidgetsClient: + """ + The API client for the Widgets Namespace. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + + @cached_property + def DevModeSettings(self): + from foundry_sdk.v2.widgets.dev_mode_settings import DevModeSettingsClient + + return DevModeSettingsClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @cached_property + def Repository(self): + from foundry_sdk.v2.widgets.repository import RepositoryClient + + return RepositoryClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @cached_property + def WidgetSet(self): + from foundry_sdk.v2.widgets.widget_set import WidgetSetClient + + return WidgetSetClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + +class AsyncWidgetsClient: + """ + The Async API client for the Widgets Namespace. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + from foundry_sdk.v2.widgets.dev_mode_settings import AsyncDevModeSettingsClient + from foundry_sdk.v2.widgets.repository import AsyncRepositoryClient + from foundry_sdk.v2.widgets.widget_set import AsyncWidgetSetClient + + self.DevModeSettings = AsyncDevModeSettingsClient( + auth=auth, hostname=hostname, config=config + ) + + self.Repository = AsyncRepositoryClient(auth=auth, hostname=hostname, config=config) + + self.WidgetSet = AsyncWidgetSetClient(auth=auth, hostname=hostname, config=config) diff --git a/foundry_sdk/v2/widgets/dev_mode_settings.py b/foundry_sdk/v2/widgets/dev_mode_settings.py new file mode 100644 index 000000000..d822e33f6 --- /dev/null +++ b/foundry_sdk/v2/widgets/dev_mode_settings.py @@ -0,0 +1,711 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v2.core import models as core_models +from foundry_sdk.v2.widgets import errors as widgets_errors +from foundry_sdk.v2.widgets import models as widgets_models + + +class DevModeSettingsClient: + """ + The API client for the DevModeSettings Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _DevModeSettingsClientStreaming(self) + self.with_raw_response = _DevModeSettingsClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def disable( + self, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> widgets_models.DevModeSettings: + """ + Disable dev mode for the user associated with the provided token. + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: widgets_models.DevModeSettings + + :raises DisableDevModeSettingsPermissionDenied: Could not disable the DevModeSettings. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/widgets/devModeSettings/disable", + query_params={ + "preview": preview, + }, + path_params={}, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=widgets_models.DevModeSettings, + request_timeout=request_timeout, + throwable_errors={ + "DisableDevModeSettingsPermissionDenied": widgets_errors.DisableDevModeSettingsPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def enable( + self, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> widgets_models.DevModeSettings: + """ + Enable dev mode for the user associated with the provided token. + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: widgets_models.DevModeSettings + + :raises EnableDevModeSettingsPermissionDenied: Could not enable the DevModeSettings. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/widgets/devModeSettings/enable", + query_params={ + "preview": preview, + }, + path_params={}, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=widgets_models.DevModeSettings, + request_timeout=request_timeout, + throwable_errors={ + "EnableDevModeSettingsPermissionDenied": widgets_errors.EnableDevModeSettingsPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> widgets_models.DevModeSettings: + """ + Get the dev mode settings for the user associated with the provided token. + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: widgets_models.DevModeSettings + + :raises DevModeSettingsNotFound: The given DevModeSettings could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/widgets/devModeSettings", + query_params={ + "preview": preview, + }, + path_params={}, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=widgets_models.DevModeSettings, + request_timeout=request_timeout, + throwable_errors={ + "DevModeSettingsNotFound": widgets_errors.DevModeSettingsNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def pause( + self, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> widgets_models.DevModeSettings: + """ + Pause dev mode for the user associated with the provided token. + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: widgets_models.DevModeSettings + + :raises PauseDevModeSettingsPermissionDenied: Could not pause the DevModeSettings. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/widgets/devModeSettings/pause", + query_params={ + "preview": preview, + }, + path_params={}, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=widgets_models.DevModeSettings, + request_timeout=request_timeout, + throwable_errors={ + "PauseDevModeSettingsPermissionDenied": widgets_errors.PauseDevModeSettingsPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def set_widget_set( + self, + *, + settings: widgets_models.WidgetSetDevModeSettings, + widget_set_rid: widgets_models.WidgetSetRid, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> widgets_models.DevModeSettings: + """ + Set the dev mode settings for the given widget set for the user associated with the provided token. + :param settings: + :type settings: WidgetSetDevModeSettings + :param widget_set_rid: + :type widget_set_rid: WidgetSetRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: widgets_models.DevModeSettings + + :raises SetWidgetSetDevModeSettingsPermissionDenied: Could not setWidgetSet the DevModeSettings. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/widgets/devModeSettings/setWidgetSet", + query_params={ + "preview": preview, + }, + path_params={}, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=widgets_models.SetWidgetSetDevModeSettingsRequest( + widget_set_rid=widget_set_rid, + settings=settings, + ), + response_type=widgets_models.DevModeSettings, + request_timeout=request_timeout, + throwable_errors={ + "SetWidgetSetDevModeSettingsPermissionDenied": widgets_errors.SetWidgetSetDevModeSettingsPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def set_widget_set_by_id( + self, + *, + settings: widgets_models.WidgetSetDevModeSettingsById, + widget_set_rid: widgets_models.WidgetSetRid, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> widgets_models.DevModeSettings: + """ + Set the dev mode settings for the given widget set for the user associated with the + provided token. Uses widget IDs to identify widgets within the set. + + :param settings: + :type settings: WidgetSetDevModeSettingsById + :param widget_set_rid: + :type widget_set_rid: WidgetSetRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: widgets_models.DevModeSettings + + :raises SetWidgetSetDevModeSettingsByIdPermissionDenied: Could not setWidgetSetById the DevModeSettings. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/widgets/devModeSettings/setWidgetSetById", + query_params={ + "preview": preview, + }, + path_params={}, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=widgets_models.SetWidgetSetDevModeSettingsByIdRequest( + widget_set_rid=widget_set_rid, + settings=settings, + ), + response_type=widgets_models.DevModeSettings, + request_timeout=request_timeout, + throwable_errors={ + "SetWidgetSetDevModeSettingsByIdPermissionDenied": widgets_errors.SetWidgetSetDevModeSettingsByIdPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _DevModeSettingsClientRaw: + def __init__(self, client: DevModeSettingsClient) -> None: + def disable(_: widgets_models.DevModeSettings): ... + def enable(_: widgets_models.DevModeSettings): ... + def get(_: widgets_models.DevModeSettings): ... + def pause(_: widgets_models.DevModeSettings): ... + def set_widget_set(_: widgets_models.DevModeSettings): ... + def set_widget_set_by_id(_: widgets_models.DevModeSettings): ... + + self.disable = core.with_raw_response(disable, client.disable) + self.enable = core.with_raw_response(enable, client.enable) + self.get = core.with_raw_response(get, client.get) + self.pause = core.with_raw_response(pause, client.pause) + self.set_widget_set = core.with_raw_response(set_widget_set, client.set_widget_set) + self.set_widget_set_by_id = core.with_raw_response( + set_widget_set_by_id, client.set_widget_set_by_id + ) + + +class _DevModeSettingsClientStreaming: + def __init__(self, client: DevModeSettingsClient) -> None: + def disable(_: widgets_models.DevModeSettings): ... + def enable(_: widgets_models.DevModeSettings): ... + def get(_: widgets_models.DevModeSettings): ... + def pause(_: widgets_models.DevModeSettings): ... + def set_widget_set(_: widgets_models.DevModeSettings): ... + def set_widget_set_by_id(_: widgets_models.DevModeSettings): ... + + self.disable = core.with_streaming_response(disable, client.disable) + self.enable = core.with_streaming_response(enable, client.enable) + self.get = core.with_streaming_response(get, client.get) + self.pause = core.with_streaming_response(pause, client.pause) + self.set_widget_set = core.with_streaming_response(set_widget_set, client.set_widget_set) + self.set_widget_set_by_id = core.with_streaming_response( + set_widget_set_by_id, client.set_widget_set_by_id + ) + + +class AsyncDevModeSettingsClient: + """ + The API client for the DevModeSettings Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncDevModeSettingsClientStreaming(self) + self.with_raw_response = _AsyncDevModeSettingsClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def disable( + self, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[widgets_models.DevModeSettings]: + """ + Disable dev mode for the user associated with the provided token. + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[widgets_models.DevModeSettings] + + :raises DisableDevModeSettingsPermissionDenied: Could not disable the DevModeSettings. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/widgets/devModeSettings/disable", + query_params={ + "preview": preview, + }, + path_params={}, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=widgets_models.DevModeSettings, + request_timeout=request_timeout, + throwable_errors={ + "DisableDevModeSettingsPermissionDenied": widgets_errors.DisableDevModeSettingsPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def enable( + self, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[widgets_models.DevModeSettings]: + """ + Enable dev mode for the user associated with the provided token. + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[widgets_models.DevModeSettings] + + :raises EnableDevModeSettingsPermissionDenied: Could not enable the DevModeSettings. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/widgets/devModeSettings/enable", + query_params={ + "preview": preview, + }, + path_params={}, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=widgets_models.DevModeSettings, + request_timeout=request_timeout, + throwable_errors={ + "EnableDevModeSettingsPermissionDenied": widgets_errors.EnableDevModeSettingsPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[widgets_models.DevModeSettings]: + """ + Get the dev mode settings for the user associated with the provided token. + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[widgets_models.DevModeSettings] + + :raises DevModeSettingsNotFound: The given DevModeSettings could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/widgets/devModeSettings", + query_params={ + "preview": preview, + }, + path_params={}, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=widgets_models.DevModeSettings, + request_timeout=request_timeout, + throwable_errors={ + "DevModeSettingsNotFound": widgets_errors.DevModeSettingsNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def pause( + self, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[widgets_models.DevModeSettings]: + """ + Pause dev mode for the user associated with the provided token. + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[widgets_models.DevModeSettings] + + :raises PauseDevModeSettingsPermissionDenied: Could not pause the DevModeSettings. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/widgets/devModeSettings/pause", + query_params={ + "preview": preview, + }, + path_params={}, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=widgets_models.DevModeSettings, + request_timeout=request_timeout, + throwable_errors={ + "PauseDevModeSettingsPermissionDenied": widgets_errors.PauseDevModeSettingsPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def set_widget_set( + self, + *, + settings: widgets_models.WidgetSetDevModeSettings, + widget_set_rid: widgets_models.WidgetSetRid, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[widgets_models.DevModeSettings]: + """ + Set the dev mode settings for the given widget set for the user associated with the provided token. + :param settings: + :type settings: WidgetSetDevModeSettings + :param widget_set_rid: + :type widget_set_rid: WidgetSetRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[widgets_models.DevModeSettings] + + :raises SetWidgetSetDevModeSettingsPermissionDenied: Could not setWidgetSet the DevModeSettings. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/widgets/devModeSettings/setWidgetSet", + query_params={ + "preview": preview, + }, + path_params={}, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=widgets_models.SetWidgetSetDevModeSettingsRequest( + widget_set_rid=widget_set_rid, + settings=settings, + ), + response_type=widgets_models.DevModeSettings, + request_timeout=request_timeout, + throwable_errors={ + "SetWidgetSetDevModeSettingsPermissionDenied": widgets_errors.SetWidgetSetDevModeSettingsPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def set_widget_set_by_id( + self, + *, + settings: widgets_models.WidgetSetDevModeSettingsById, + widget_set_rid: widgets_models.WidgetSetRid, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[widgets_models.DevModeSettings]: + """ + Set the dev mode settings for the given widget set for the user associated with the + provided token. Uses widget IDs to identify widgets within the set. + + :param settings: + :type settings: WidgetSetDevModeSettingsById + :param widget_set_rid: + :type widget_set_rid: WidgetSetRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[widgets_models.DevModeSettings] + + :raises SetWidgetSetDevModeSettingsByIdPermissionDenied: Could not setWidgetSetById the DevModeSettings. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/widgets/devModeSettings/setWidgetSetById", + query_params={ + "preview": preview, + }, + path_params={}, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=widgets_models.SetWidgetSetDevModeSettingsByIdRequest( + widget_set_rid=widget_set_rid, + settings=settings, + ), + response_type=widgets_models.DevModeSettings, + request_timeout=request_timeout, + throwable_errors={ + "SetWidgetSetDevModeSettingsByIdPermissionDenied": widgets_errors.SetWidgetSetDevModeSettingsByIdPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _AsyncDevModeSettingsClientRaw: + def __init__(self, client: AsyncDevModeSettingsClient) -> None: + def disable(_: widgets_models.DevModeSettings): ... + def enable(_: widgets_models.DevModeSettings): ... + def get(_: widgets_models.DevModeSettings): ... + def pause(_: widgets_models.DevModeSettings): ... + def set_widget_set(_: widgets_models.DevModeSettings): ... + def set_widget_set_by_id(_: widgets_models.DevModeSettings): ... + + self.disable = core.async_with_raw_response(disable, client.disable) + self.enable = core.async_with_raw_response(enable, client.enable) + self.get = core.async_with_raw_response(get, client.get) + self.pause = core.async_with_raw_response(pause, client.pause) + self.set_widget_set = core.async_with_raw_response(set_widget_set, client.set_widget_set) + self.set_widget_set_by_id = core.async_with_raw_response( + set_widget_set_by_id, client.set_widget_set_by_id + ) + + +class _AsyncDevModeSettingsClientStreaming: + def __init__(self, client: AsyncDevModeSettingsClient) -> None: + def disable(_: widgets_models.DevModeSettings): ... + def enable(_: widgets_models.DevModeSettings): ... + def get(_: widgets_models.DevModeSettings): ... + def pause(_: widgets_models.DevModeSettings): ... + def set_widget_set(_: widgets_models.DevModeSettings): ... + def set_widget_set_by_id(_: widgets_models.DevModeSettings): ... + + self.disable = core.async_with_streaming_response(disable, client.disable) + self.enable = core.async_with_streaming_response(enable, client.enable) + self.get = core.async_with_streaming_response(get, client.get) + self.pause = core.async_with_streaming_response(pause, client.pause) + self.set_widget_set = core.async_with_streaming_response( + set_widget_set, client.set_widget_set + ) + self.set_widget_set_by_id = core.async_with_streaming_response( + set_widget_set_by_id, client.set_widget_set_by_id + ) diff --git a/foundry_sdk/v2/widgets/errors.py b/foundry_sdk/v2/widgets/errors.py new file mode 100644 index 000000000..10baf0b2f --- /dev/null +++ b/foundry_sdk/v2/widgets/errors.py @@ -0,0 +1,844 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing +from dataclasses import dataclass + +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v2.widgets import models as widgets_models + + +class DeleteReleasePermissionDeniedParameters(typing_extensions.TypedDict): + """Could not delete the Release.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + widgetSetRid: widgets_models.WidgetSetRid + """A Resource Identifier (RID) identifying a widget set.""" + + releaseVersion: widgets_models.ReleaseVersion + """The semantic version of the widget set.""" + + +@dataclass +class DeleteReleasePermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["DeleteReleasePermissionDenied"] + parameters: DeleteReleasePermissionDeniedParameters + error_instance_id: str + + +class DevModeSettingsNotFoundParameters(typing_extensions.TypedDict): + """The given DevModeSettings could not be found.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class DevModeSettingsNotFound(errors.NotFoundError): + name: typing.Literal["DevModeSettingsNotFound"] + parameters: DevModeSettingsNotFoundParameters + error_instance_id: str + + +class DisableDevModeSettingsPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not disable the DevModeSettings.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class DisableDevModeSettingsPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["DisableDevModeSettingsPermissionDenied"] + parameters: DisableDevModeSettingsPermissionDeniedParameters + error_instance_id: str + + +class EnableDevModeSettingsPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not enable the DevModeSettings.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class EnableDevModeSettingsPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["EnableDevModeSettingsPermissionDenied"] + parameters: EnableDevModeSettingsPermissionDeniedParameters + error_instance_id: str + + +class FileCountLimitExceededParameters(typing_extensions.TypedDict): + """The .zip archive contains too many files.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + fileCountLimit: int + + +@dataclass +class FileCountLimitExceeded(errors.BadRequestError): + name: typing.Literal["FileCountLimitExceeded"] + parameters: FileCountLimitExceededParameters + error_instance_id: str + + +class FileSizeLimitExceededParameters(typing_extensions.TypedDict): + """ + A file inside the .zip archive is too big. You must ensure that all files inside + the .zip archive are within the limit. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + fileSizeBytesLimit: core.Long + currentFileSizeBytes: core.Long + currentFilePath: str + + +@dataclass +class FileSizeLimitExceeded(errors.BadRequestError): + name: typing.Literal["FileSizeLimitExceeded"] + parameters: FileSizeLimitExceededParameters + error_instance_id: str + + +class GetDevModeSettingsPermissionDeniedParameters(typing_extensions.TypedDict): + """The provided token does not have permission to access dev mode settings.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class GetDevModeSettingsPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["GetDevModeSettingsPermissionDenied"] + parameters: GetDevModeSettingsPermissionDeniedParameters + error_instance_id: str + + +class InvalidDevModeBaseHrefParameters(typing_extensions.TypedDict): + """ + The base href in the dev mode settings is invalid. It must be a valid localhost URL + with an optional port. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + baseHref: str + + +@dataclass +class InvalidDevModeBaseHref(errors.BadRequestError): + name: typing.Literal["InvalidDevModeBaseHref"] + parameters: InvalidDevModeBaseHrefParameters + error_instance_id: str + + +class InvalidDevModeEntrypointCssCountParameters(typing_extensions.TypedDict): + """ + The dev mode settings contains too many CSS entrypoints. You must limit the number + of CSS entrypoints to the maximum allowed. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + reason: str + entrypointCssCount: int + + +@dataclass +class InvalidDevModeEntrypointCssCount(errors.BadRequestError): + name: typing.Literal["InvalidDevModeEntrypointCssCount"] + parameters: InvalidDevModeEntrypointCssCountParameters + error_instance_id: str + + +class InvalidDevModeEntrypointJsCountParameters(typing_extensions.TypedDict): + """ + The dev mode settings contains too many JavaScript entrypoints. You must limit the number + of JavaScript entrypoints to the maximum allowed. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + reason: str + entrypointJsCount: int + + +@dataclass +class InvalidDevModeEntrypointJsCount(errors.BadRequestError): + name: typing.Literal["InvalidDevModeEntrypointJsCount"] + parameters: InvalidDevModeEntrypointJsCountParameters + error_instance_id: str + + +class InvalidDevModeFilePathParameters(typing_extensions.TypedDict): + """ + The dev mode settings contains an invalid entrypoint file path. The file path must be a + valid localhost URL with an optional port and a file path. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + reason: str + filePath: str + + +@dataclass +class InvalidDevModeFilePath(errors.BadRequestError): + name: typing.Literal["InvalidDevModeFilePath"] + parameters: InvalidDevModeFilePathParameters + error_instance_id: str + + +class InvalidDevModeWidgetSettingsCountParameters(typing_extensions.TypedDict): + """ + The dev mode settings contains too many widget settings. You must limit the number of + widget settings to the maximum allowed. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + reason: str + widgetSettingsCount: int + + +@dataclass +class InvalidDevModeWidgetSettingsCount(errors.BadRequestError): + name: typing.Literal["InvalidDevModeWidgetSettingsCount"] + parameters: InvalidDevModeWidgetSettingsCountParameters + error_instance_id: str + + +class InvalidEntrypointCssCountParameters(typing_extensions.TypedDict): + """ + The widget declares too many CSS entrypoints. You must limit the number + of CSS entrypoints to the maximum allowed. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + reason: str + entrypointCssCount: int + + +@dataclass +class InvalidEntrypointCssCount(errors.BadRequestError): + name: typing.Literal["InvalidEntrypointCssCount"] + parameters: InvalidEntrypointCssCountParameters + error_instance_id: str + + +class InvalidEntrypointJsCountParameters(typing_extensions.TypedDict): + """ + The widget declares too many JavaScript entrypoints. You must limit the number + of JavaScript entrypoints to the maximum allowed. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + reason: str + entrypointJsCount: int + + +@dataclass +class InvalidEntrypointJsCount(errors.BadRequestError): + name: typing.Literal["InvalidEntrypointJsCount"] + parameters: InvalidEntrypointJsCountParameters + error_instance_id: str + + +class InvalidEventCountParameters(typing_extensions.TypedDict): + """The widget config contains too many events.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + reason: str + eventCount: int + + +@dataclass +class InvalidEventCount(errors.BadRequestError): + name: typing.Literal["InvalidEventCount"] + parameters: InvalidEventCountParameters + error_instance_id: str + + +class InvalidEventDisplayNameParameters(typing_extensions.TypedDict): + """The event display name is invalid.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + reason: str + eventDisplayName: str + + +@dataclass +class InvalidEventDisplayName(errors.BadRequestError): + name: typing.Literal["InvalidEventDisplayName"] + parameters: InvalidEventDisplayNameParameters + error_instance_id: str + + +class InvalidEventIdParameters(typing_extensions.TypedDict): + """The event id is invalid.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + reason: str + eventId: str + + +@dataclass +class InvalidEventId(errors.BadRequestError): + name: typing.Literal["InvalidEventId"] + parameters: InvalidEventIdParameters + error_instance_id: str + + +class InvalidEventParameterParameters(typing_extensions.TypedDict): + """The event parameter is invalid.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + reason: str + eventParameterId: str + + +@dataclass +class InvalidEventParameter(errors.BadRequestError): + name: typing.Literal["InvalidEventParameter"] + parameters: InvalidEventParameterParameters + error_instance_id: str + + +class InvalidEventParameterCountParameters(typing_extensions.TypedDict): + """The widget config contains an event with too many event parameters.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + reason: str + eventParameterCount: int + + +@dataclass +class InvalidEventParameterCount(errors.BadRequestError): + name: typing.Literal["InvalidEventParameterCount"] + parameters: InvalidEventParameterCountParameters + error_instance_id: str + + +class InvalidEventParameterIdParameters(typing_extensions.TypedDict): + """The event parameter id is invalid.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + reason: str + eventParameterId: str + + +@dataclass +class InvalidEventParameterId(errors.BadRequestError): + name: typing.Literal["InvalidEventParameterId"] + parameters: InvalidEventParameterIdParameters + error_instance_id: str + + +class InvalidEventParameterUpdateIdParameters(typing_extensions.TypedDict): + """The event references an invalid parameter id.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + reason: str + parameterUpdateId: str + + +@dataclass +class InvalidEventParameterUpdateId(errors.BadRequestError): + name: typing.Literal["InvalidEventParameterUpdateId"] + parameters: InvalidEventParameterUpdateIdParameters + error_instance_id: str + + +class InvalidFilePathParameters(typing_extensions.TypedDict): + """The widget declares an invalid production entrypoint file path.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + reason: str + filePath: str + + +@dataclass +class InvalidFilePath(errors.BadRequestError): + name: typing.Literal["InvalidFilePath"] + parameters: InvalidFilePathParameters + error_instance_id: str + + +class InvalidManifestParameters(typing_extensions.TypedDict): + """ + The manifest file in the .zip archive at the path `.palantir/widgets.config.json` + could not be found or is not well formed. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + reason: str + value: typing_extensions.NotRequired[typing.Any] + + +@dataclass +class InvalidManifest(errors.BadRequestError): + name: typing.Literal["InvalidManifest"] + parameters: InvalidManifestParameters + error_instance_id: str + + +class InvalidObjectSetEventParameterTypeParameters(typing_extensions.TypedDict): + """The object set event parameter type is invalid.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + reason: str + eventParameterId: str + value: typing_extensions.NotRequired[typing.Any] + + +@dataclass +class InvalidObjectSetEventParameterType(errors.BadRequestError): + name: typing.Literal["InvalidObjectSetEventParameterType"] + parameters: InvalidObjectSetEventParameterTypeParameters + error_instance_id: str + + +class InvalidObjectSetParameterTypeParameters(typing_extensions.TypedDict): + """The object set parameter type is invalid.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + reason: str + parameterId: str + value: typing_extensions.NotRequired[typing.Any] + + +@dataclass +class InvalidObjectSetParameterType(errors.BadRequestError): + name: typing.Literal["InvalidObjectSetParameterType"] + parameters: InvalidObjectSetParameterTypeParameters + error_instance_id: str + + +class InvalidParameterCountParameters(typing_extensions.TypedDict): + """The widget config contains too many parameters.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + reason: str + parameterCount: int + + +@dataclass +class InvalidParameterCount(errors.BadRequestError): + name: typing.Literal["InvalidParameterCount"] + parameters: InvalidParameterCountParameters + error_instance_id: str + + +class InvalidParameterDisplayNameParameters(typing_extensions.TypedDict): + """The parameter display name is invalid.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + reason: str + parameterDisplayName: str + + +@dataclass +class InvalidParameterDisplayName(errors.BadRequestError): + name: typing.Literal["InvalidParameterDisplayName"] + parameters: InvalidParameterDisplayNameParameters + error_instance_id: str + + +class InvalidParameterIdParameters(typing_extensions.TypedDict): + """The parameter id is invalid.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + reason: str + parameterId: str + + +@dataclass +class InvalidParameterId(errors.BadRequestError): + name: typing.Literal["InvalidParameterId"] + parameters: InvalidParameterIdParameters + error_instance_id: str + + +class InvalidPublishRepositoryParameters(typing_extensions.TypedDict): + """The manifest file targets a widget set that has not linked the repository to publish.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class InvalidPublishRepository(errors.BadRequestError): + name: typing.Literal["InvalidPublishRepository"] + parameters: InvalidPublishRepositoryParameters + error_instance_id: str + + +class InvalidReleaseDescriptionParameters(typing_extensions.TypedDict): + """The release description is invalid.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + reason: str + releaseDescription: str + + +@dataclass +class InvalidReleaseDescription(errors.BadRequestError): + name: typing.Literal["InvalidReleaseDescription"] + parameters: InvalidReleaseDescriptionParameters + error_instance_id: str + + +class InvalidReleaseWidgetsCountParameters(typing_extensions.TypedDict): + """The release contains zero widgets or too many widgets.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + reason: str + widgetsCount: int + + +@dataclass +class InvalidReleaseWidgetsCount(errors.BadRequestError): + name: typing.Literal["InvalidReleaseWidgetsCount"] + parameters: InvalidReleaseWidgetsCountParameters + error_instance_id: str + + +class InvalidVersionParameters(typing_extensions.TypedDict): + """ + The given version is invalid. Versions must follow semantic versioning with major, minor, + and patch versions separate by periods, e.g. `0.1.0` or `1.2.3`. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + version: str + + +@dataclass +class InvalidVersion(errors.BadRequestError): + name: typing.Literal["InvalidVersion"] + parameters: InvalidVersionParameters + error_instance_id: str + + +class InvalidWidgetDescriptionParameters(typing_extensions.TypedDict): + """The widget description is invalid.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + reason: str + widgetDescription: str + + +@dataclass +class InvalidWidgetDescription(errors.BadRequestError): + name: typing.Literal["InvalidWidgetDescription"] + parameters: InvalidWidgetDescriptionParameters + error_instance_id: str + + +class InvalidWidgetIdParameters(typing_extensions.TypedDict): + """The widget id is invalid.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + reason: str + widgetId: str + + +@dataclass +class InvalidWidgetId(errors.BadRequestError): + name: typing.Literal["InvalidWidgetId"] + parameters: InvalidWidgetIdParameters + error_instance_id: str + + +class InvalidWidgetNameParameters(typing_extensions.TypedDict): + """The widget name is invalid.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + reason: str + widgetName: str + + +@dataclass +class InvalidWidgetName(errors.BadRequestError): + name: typing.Literal["InvalidWidgetName"] + parameters: InvalidWidgetNameParameters + error_instance_id: str + + +class OntologySdkNotFoundParameters(typing_extensions.TypedDict): + """A referenced Ontology SDK package could not be found.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + sdkPackageRid: core.RID + sdkVersion: str + + +@dataclass +class OntologySdkNotFound(errors.NotFoundError): + name: typing.Literal["OntologySdkNotFound"] + parameters: OntologySdkNotFoundParameters + error_instance_id: str + + +class PauseDevModeSettingsPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not pause the DevModeSettings.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class PauseDevModeSettingsPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["PauseDevModeSettingsPermissionDenied"] + parameters: PauseDevModeSettingsPermissionDeniedParameters + error_instance_id: str + + +class PublishReleasePermissionDeniedParameters(typing_extensions.TypedDict): + """Could not publish the Repository.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + repositoryRid: widgets_models.RepositoryRid + """A Resource Identifier (RID) identifying a repository.""" + + +@dataclass +class PublishReleasePermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["PublishReleasePermissionDenied"] + parameters: PublishReleasePermissionDeniedParameters + error_instance_id: str + + +class ReleaseNotFoundParameters(typing_extensions.TypedDict): + """The given Release could not be found.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + widgetSetRid: widgets_models.WidgetSetRid + """A Resource Identifier (RID) identifying a widget set.""" + + releaseVersion: widgets_models.ReleaseVersion + """The semantic version of the widget set.""" + + +@dataclass +class ReleaseNotFound(errors.NotFoundError): + name: typing.Literal["ReleaseNotFound"] + parameters: ReleaseNotFoundParameters + error_instance_id: str + + +class RepositoryNotFoundParameters(typing_extensions.TypedDict): + """The given Repository could not be found.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + repositoryRid: widgets_models.RepositoryRid + """A Resource Identifier (RID) identifying a repository.""" + + +@dataclass +class RepositoryNotFound(errors.NotFoundError): + name: typing.Literal["RepositoryNotFound"] + parameters: RepositoryNotFoundParameters + error_instance_id: str + + +class SetWidgetSetDevModeSettingsByIdPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not setWidgetSetById the DevModeSettings.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class SetWidgetSetDevModeSettingsByIdPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["SetWidgetSetDevModeSettingsByIdPermissionDenied"] + parameters: SetWidgetSetDevModeSettingsByIdPermissionDeniedParameters + error_instance_id: str + + +class SetWidgetSetDevModeSettingsPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not setWidgetSet the DevModeSettings.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class SetWidgetSetDevModeSettingsPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["SetWidgetSetDevModeSettingsPermissionDenied"] + parameters: SetWidgetSetDevModeSettingsPermissionDeniedParameters + error_instance_id: str + + +class VersionAlreadyExistsParameters(typing_extensions.TypedDict): + """The given version already exists.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + version: str + + +@dataclass +class VersionAlreadyExists(errors.ConflictError): + name: typing.Literal["VersionAlreadyExists"] + parameters: VersionAlreadyExistsParameters + error_instance_id: str + + +class VersionLimitExceededParameters(typing_extensions.TypedDict): + """ + The widget set contains too many versions. You must delete an old version before + uploading a new one. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + versionLimit: int + + +@dataclass +class VersionLimitExceeded(errors.BadRequestError): + name: typing.Literal["VersionLimitExceeded"] + parameters: VersionLimitExceededParameters + error_instance_id: str + + +class WidgetIdNotFoundParameters(typing_extensions.TypedDict): + """ + A non-existent widget id was provided. If creating a new widget, you must first publish your changes before + previewing with developer mode. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + widgetSetRid: widgets_models.WidgetSetRid + widgetId: str + + +@dataclass +class WidgetIdNotFound(errors.NotFoundError): + name: typing.Literal["WidgetIdNotFound"] + parameters: WidgetIdNotFoundParameters + error_instance_id: str + + +class WidgetLimitExceededParameters(typing_extensions.TypedDict): + """ + The widget set contains too many widgets. You must delete another widget before + creating a new one. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + widgetLimit: int + + +@dataclass +class WidgetLimitExceeded(errors.BadRequestError): + name: typing.Literal["WidgetLimitExceeded"] + parameters: WidgetLimitExceededParameters + error_instance_id: str + + +class WidgetSetNotFoundParameters(typing_extensions.TypedDict): + """The given WidgetSet could not be found.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + widgetSetRid: widgets_models.WidgetSetRid + """A Resource Identifier (RID) identifying a widget set.""" + + +@dataclass +class WidgetSetNotFound(errors.NotFoundError): + name: typing.Literal["WidgetSetNotFound"] + parameters: WidgetSetNotFoundParameters + error_instance_id: str + + +__all__ = [ + "DeleteReleasePermissionDenied", + "DevModeSettingsNotFound", + "DisableDevModeSettingsPermissionDenied", + "EnableDevModeSettingsPermissionDenied", + "FileCountLimitExceeded", + "FileSizeLimitExceeded", + "GetDevModeSettingsPermissionDenied", + "InvalidDevModeBaseHref", + "InvalidDevModeEntrypointCssCount", + "InvalidDevModeEntrypointJsCount", + "InvalidDevModeFilePath", + "InvalidDevModeWidgetSettingsCount", + "InvalidEntrypointCssCount", + "InvalidEntrypointJsCount", + "InvalidEventCount", + "InvalidEventDisplayName", + "InvalidEventId", + "InvalidEventParameter", + "InvalidEventParameterCount", + "InvalidEventParameterId", + "InvalidEventParameterUpdateId", + "InvalidFilePath", + "InvalidManifest", + "InvalidObjectSetEventParameterType", + "InvalidObjectSetParameterType", + "InvalidParameterCount", + "InvalidParameterDisplayName", + "InvalidParameterId", + "InvalidPublishRepository", + "InvalidReleaseDescription", + "InvalidReleaseWidgetsCount", + "InvalidVersion", + "InvalidWidgetDescription", + "InvalidWidgetId", + "InvalidWidgetName", + "OntologySdkNotFound", + "PauseDevModeSettingsPermissionDenied", + "PublishReleasePermissionDenied", + "ReleaseNotFound", + "RepositoryNotFound", + "SetWidgetSetDevModeSettingsByIdPermissionDenied", + "SetWidgetSetDevModeSettingsPermissionDenied", + "VersionAlreadyExists", + "VersionLimitExceeded", + "WidgetIdNotFound", + "WidgetLimitExceeded", + "WidgetSetNotFound", +] diff --git a/foundry_sdk/v2/widgets/models.py b/foundry_sdk/v2/widgets/models.py new file mode 100644 index 000000000..3880ba401 --- /dev/null +++ b/foundry_sdk/v2/widgets/models.py @@ -0,0 +1,235 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +from __future__ import annotations + +import typing + +import pydantic + +from foundry_sdk import _core as core +from foundry_sdk.v2.core import models as core_models + + +class DevModeSettings(core.ModelBase): + """DevModeSettings""" + + status: DevModeStatus + widget_set_settings: typing.Dict[WidgetSetRid, WidgetSetDevModeSettings] = pydantic.Field(alias=str("widgetSetSettings")) # type: ignore[literal-required] + """The dev mode settings for each widget set, keyed by widget set RID.""" + + +DevModeStatus = typing.Literal["ENABLED", "PAUSED", "DISABLED"] +"""The user's global development mode status for widget sets.""" + + +FilePath = str +"""A locator for a specific file in a widget set's release directory.""" + + +class ListReleasesResponse(core.ModelBase): + """ListReleasesResponse""" + + data: typing.List[Release] + next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] + + +class Release(core.ModelBase): + """Release""" + + widget_set_rid: WidgetSetRid = pydantic.Field(alias=str("widgetSetRid")) # type: ignore[literal-required] + """The Resource Identifier (RID) of the widget set this release is for.""" + + version: ReleaseVersion + """The semantic version of the widget set.""" + + locator: ReleaseLocator + description: typing.Optional[str] = None + """The description of this release.""" + + +class ReleaseLocator(core.ModelBase): + """A locator for where the backing files of a release are stored.""" + + repository_rid: RepositoryRid = pydantic.Field(alias=str("repositoryRid")) # type: ignore[literal-required] + """The Resource Identifier (RID) of the repository that contains the release.""" + + repository_version: RepositoryVersion = pydantic.Field(alias=str("repositoryVersion")) # type: ignore[literal-required] + """The version of the repository storing the backing files.""" + + +ReleaseVersion = str +"""The semantic version of the widget set.""" + + +class Repository(core.ModelBase): + """Repository""" + + rid: RepositoryRid + """A Resource Identifier (RID) identifying a repository.""" + + widget_set_rid: typing.Optional[WidgetSetRid] = pydantic.Field(alias=str("widgetSetRid"), default=None) # type: ignore[literal-required] + """ + The Resource Identifier (RID) of the widget set that has authorized this repository + to publish new widget releases. + """ + + +RepositoryRid = core.RID +"""A Resource Identifier (RID) identifying a repository.""" + + +RepositoryVersion = str +"""A semantic version of a repository storing backing files.""" + + +class ScriptEntrypoint(core.ModelBase): + """A script entrypoint to be loaded into the runtime environment.""" + + file_path: FilePath = pydantic.Field(alias=str("filePath")) # type: ignore[literal-required] + """ + A relative path from the root to a JavaScript entrypoint. It must satisfy: + + - Must contain one or more non-empty segments separated by `/`. + - Each segment must only contain the following ASCII characters: a-z, A-Z, 0-9 and -_.. + - Must have a maximum length of 100. + """ + + script_type: ScriptType = pydantic.Field(alias=str("scriptType")) # type: ignore[literal-required] + """ + Defines HTML "type" attribute to be used for the script entrypoint. The supported + values are `DEFAULT` and `MODULE`, where `DEFAULT` maps to "text/javascript" and + `MODULE` maps to "module". + """ + + +ScriptType = typing.Literal["DEFAULT", "MODULE"] +"""ScriptType""" + + +class SetWidgetSetDevModeSettingsByIdRequest(core.ModelBase): + """SetWidgetSetDevModeSettingsByIdRequest""" + + widget_set_rid: WidgetSetRid = pydantic.Field(alias=str("widgetSetRid")) # type: ignore[literal-required] + settings: WidgetSetDevModeSettingsById + + +class SetWidgetSetDevModeSettingsRequest(core.ModelBase): + """SetWidgetSetDevModeSettingsRequest""" + + widget_set_rid: WidgetSetRid = pydantic.Field(alias=str("widgetSetRid")) # type: ignore[literal-required] + settings: WidgetSetDevModeSettings + + +class StylesheetEntrypoint(core.ModelBase): + """A stylesheet entrypoint to be loaded into the runtime environment.""" + + file_path: FilePath = pydantic.Field(alias=str("filePath")) # type: ignore[literal-required] + """ + A relative path from the root to a CSS entrypoint. It must satisfy: + + - Must contain one or more non-empty segments separated by `/`. + - Each segment must only contain the following ASCII characters: a-z, A-Z, 0-9 and -_.. + - Must have a maximum length of 100. + """ + + +class WidgetDevModeSettings(core.ModelBase): + """The settings for a given widget in development mode.""" + + script_entrypoints: typing.List[ScriptEntrypoint] = pydantic.Field(alias=str("scriptEntrypoints")) # type: ignore[literal-required] + """The entrypoint JavaScript files for the widget.""" + + stylesheet_entrypoints: typing.List[StylesheetEntrypoint] = pydantic.Field(alias=str("stylesheetEntrypoints")) # type: ignore[literal-required] + """The entrypoint CSS files for the widget.""" + + +WidgetId = str +""" +Human readable ID for a widget. Must be unique within a widget set. +Considered unsafe as it may contain user defined data. + +- Must only contain the following ASCII characters: a-z, A-Z and 0-9. +- Must not start with a number. +- Must have a maximum length of 100. +- Must be camelCase. +""" + + +WidgetRid = core.RID +"""A Resource Identifier (RID) identifying a widget.""" + + +class WidgetSet(core.ModelBase): + """WidgetSet""" + + rid: WidgetSetRid + """A Resource Identifier (RID) identifying a widget set.""" + + publish_repository_rid: typing.Optional[RepositoryRid] = pydantic.Field(alias=str("publishRepositoryRid"), default=None) # type: ignore[literal-required] + """ + The Resource Identifier (RID) of the repository that is authorized to publish new + widget releases to this widget set through a manifest. + """ + + +class WidgetSetDevModeSettings(core.ModelBase): + """The settings for a widget set in development mode, keyed by widget RID.""" + + base_href: str = pydantic.Field(alias=str("baseHref")) # type: ignore[literal-required] + """The base path for the HTML file used to render the widget in dev mode.""" + + widget_settings: typing.Dict[WidgetRid, WidgetDevModeSettings] = pydantic.Field(alias=str("widgetSettings")) # type: ignore[literal-required] + """The dev mode settings for each widget in the widget set, keyed by widget RIDs.""" + + +class WidgetSetDevModeSettingsById(core.ModelBase): + """The settings for a widget set in development mode, keyed by widget ID.""" + + base_href: str = pydantic.Field(alias=str("baseHref")) # type: ignore[literal-required] + """The base path for the HTML file used to render the widget in dev mode.""" + + widget_settings: typing.Dict[WidgetId, WidgetDevModeSettings] = pydantic.Field(alias=str("widgetSettings")) # type: ignore[literal-required] + """The dev mode settings for each widget in the widget set, keyed by widget IDs.""" + + +WidgetSetRid = core.RID +"""A Resource Identifier (RID) identifying a widget set.""" + + +__all__ = [ + "DevModeSettings", + "DevModeStatus", + "FilePath", + "ListReleasesResponse", + "Release", + "ReleaseLocator", + "ReleaseVersion", + "Repository", + "RepositoryRid", + "RepositoryVersion", + "ScriptEntrypoint", + "ScriptType", + "SetWidgetSetDevModeSettingsByIdRequest", + "SetWidgetSetDevModeSettingsRequest", + "StylesheetEntrypoint", + "WidgetDevModeSettings", + "WidgetId", + "WidgetRid", + "WidgetSet", + "WidgetSetDevModeSettings", + "WidgetSetDevModeSettingsById", + "WidgetSetRid", +] diff --git a/foundry_sdk/v2/widgets/release.py b/foundry_sdk/v2/widgets/release.py new file mode 100644 index 000000000..a0bd91213 --- /dev/null +++ b/foundry_sdk/v2/widgets/release.py @@ -0,0 +1,425 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v2.core import models as core_models +from foundry_sdk.v2.widgets import errors as widgets_errors +from foundry_sdk.v2.widgets import models as widgets_models + + +class ReleaseClient: + """ + The API client for the Release Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _ReleaseClientStreaming(self) + self.with_raw_response = _ReleaseClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def delete( + self, + widget_set_rid: widgets_models.WidgetSetRid, + release_version: widgets_models.ReleaseVersion, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> None: + """ + Delete the Release with the specified version. + :param widget_set_rid: A Resource Identifier (RID) identifying a widget set. + :type widget_set_rid: WidgetSetRid + :param release_version: The semantic version of the widget set. + :type release_version: ReleaseVersion + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: None + + :raises DeleteReleasePermissionDenied: Could not delete the Release. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="DELETE", + resource_path="/v2/widgets/widgetSets/{widgetSetRid}/releases/{releaseVersion}", + query_params={ + "preview": preview, + }, + path_params={ + "widgetSetRid": widget_set_rid, + "releaseVersion": release_version, + }, + header_params={}, + body=None, + response_type=None, + request_timeout=request_timeout, + throwable_errors={ + "DeleteReleasePermissionDenied": widgets_errors.DeleteReleasePermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + widget_set_rid: widgets_models.WidgetSetRid, + release_version: widgets_models.ReleaseVersion, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> widgets_models.Release: + """ + Get the Release with the specified version. + :param widget_set_rid: A Resource Identifier (RID) identifying a widget set. + :type widget_set_rid: WidgetSetRid + :param release_version: The semantic version of the widget set. + :type release_version: ReleaseVersion + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: widgets_models.Release + + :raises ReleaseNotFound: The given Release could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/widgets/widgetSets/{widgetSetRid}/releases/{releaseVersion}", + query_params={ + "preview": preview, + }, + path_params={ + "widgetSetRid": widget_set_rid, + "releaseVersion": release_version, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=widgets_models.Release, + request_timeout=request_timeout, + throwable_errors={ + "ReleaseNotFound": widgets_errors.ReleaseNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def list( + self, + widget_set_rid: widgets_models.WidgetSetRid, + *, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.ResourceIterator[widgets_models.Release]: + """ + Lists all Releases. + + This is a paged endpoint. Each page may be smaller or larger than the requested page size. However, it is guaranteed that if there are more results available, the `nextPageToken` field will be populated. To get the next page, make the same request again, but set the value of the `pageToken` query parameter to be value of the `nextPageToken` value of the previous response. If there is no `nextPageToken` field in the response, you are on the last page. + :param widget_set_rid: A Resource Identifier (RID) identifying a widget set. + :type widget_set_rid: WidgetSetRid + :param page_size: The page size to use for the endpoint. + :type page_size: Optional[PageSize] + :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. + :type page_token: Optional[PageToken] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.ResourceIterator[widgets_models.Release] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/widgets/widgetSets/{widgetSetRid}/releases", + query_params={ + "pageSize": page_size, + "pageToken": page_token, + "preview": preview, + }, + path_params={ + "widgetSetRid": widget_set_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=widgets_models.ListReleasesResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + +class _ReleaseClientRaw: + def __init__(self, client: ReleaseClient) -> None: + def delete(_: None): ... + def get(_: widgets_models.Release): ... + def list(_: widgets_models.ListReleasesResponse): ... + + self.delete = core.with_raw_response(delete, client.delete) + self.get = core.with_raw_response(get, client.get) + self.list = core.with_raw_response(list, client.list) + + +class _ReleaseClientStreaming: + def __init__(self, client: ReleaseClient) -> None: + def get(_: widgets_models.Release): ... + def list(_: widgets_models.ListReleasesResponse): ... + + self.get = core.with_streaming_response(get, client.get) + self.list = core.with_streaming_response(list, client.list) + + +class AsyncReleaseClient: + """ + The API client for the Release Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncReleaseClientStreaming(self) + self.with_raw_response = _AsyncReleaseClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def delete( + self, + widget_set_rid: widgets_models.WidgetSetRid, + release_version: widgets_models.ReleaseVersion, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[None]: + """ + Delete the Release with the specified version. + :param widget_set_rid: A Resource Identifier (RID) identifying a widget set. + :type widget_set_rid: WidgetSetRid + :param release_version: The semantic version of the widget set. + :type release_version: ReleaseVersion + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[None] + + :raises DeleteReleasePermissionDenied: Could not delete the Release. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="DELETE", + resource_path="/v2/widgets/widgetSets/{widgetSetRid}/releases/{releaseVersion}", + query_params={ + "preview": preview, + }, + path_params={ + "widgetSetRid": widget_set_rid, + "releaseVersion": release_version, + }, + header_params={}, + body=None, + response_type=None, + request_timeout=request_timeout, + throwable_errors={ + "DeleteReleasePermissionDenied": widgets_errors.DeleteReleasePermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + widget_set_rid: widgets_models.WidgetSetRid, + release_version: widgets_models.ReleaseVersion, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[widgets_models.Release]: + """ + Get the Release with the specified version. + :param widget_set_rid: A Resource Identifier (RID) identifying a widget set. + :type widget_set_rid: WidgetSetRid + :param release_version: The semantic version of the widget set. + :type release_version: ReleaseVersion + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[widgets_models.Release] + + :raises ReleaseNotFound: The given Release could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/widgets/widgetSets/{widgetSetRid}/releases/{releaseVersion}", + query_params={ + "preview": preview, + }, + path_params={ + "widgetSetRid": widget_set_rid, + "releaseVersion": release_version, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=widgets_models.Release, + request_timeout=request_timeout, + throwable_errors={ + "ReleaseNotFound": widgets_errors.ReleaseNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def list( + self, + widget_set_rid: widgets_models.WidgetSetRid, + *, + page_size: typing.Optional[core_models.PageSize] = None, + page_token: typing.Optional[core_models.PageToken] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> core.AsyncResourceIterator[widgets_models.Release]: + """ + Lists all Releases. + + This is a paged endpoint. Each page may be smaller or larger than the requested page size. However, it is guaranteed that if there are more results available, the `nextPageToken` field will be populated. To get the next page, make the same request again, but set the value of the `pageToken` query parameter to be value of the `nextPageToken` value of the previous response. If there is no `nextPageToken` field in the response, you are on the last page. + :param widget_set_rid: A Resource Identifier (RID) identifying a widget set. + :type widget_set_rid: WidgetSetRid + :param page_size: The page size to use for the endpoint. + :type page_size: Optional[PageSize] + :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. + :type page_token: Optional[PageToken] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: core.AsyncResourceIterator[widgets_models.Release] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/widgets/widgetSets/{widgetSetRid}/releases", + query_params={ + "pageSize": page_size, + "pageToken": page_token, + "preview": preview, + }, + path_params={ + "widgetSetRid": widget_set_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=widgets_models.ListReleasesResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode", "ITERATOR"), + ), + ) + + +class _AsyncReleaseClientRaw: + def __init__(self, client: AsyncReleaseClient) -> None: + def delete(_: None): ... + def get(_: widgets_models.Release): ... + def list(_: widgets_models.ListReleasesResponse): ... + + self.delete = core.async_with_raw_response(delete, client.delete) + self.get = core.async_with_raw_response(get, client.get) + self.list = core.async_with_raw_response(list, client.list) + + +class _AsyncReleaseClientStreaming: + def __init__(self, client: AsyncReleaseClient) -> None: + def get(_: widgets_models.Release): ... + def list(_: widgets_models.ListReleasesResponse): ... + + self.get = core.async_with_streaming_response(get, client.get) + self.list = core.async_with_streaming_response(list, client.list) diff --git a/foundry_sdk/v2/widgets/repository.py b/foundry_sdk/v2/widgets/repository.py new file mode 100644 index 000000000..00b490184 --- /dev/null +++ b/foundry_sdk/v2/widgets/repository.py @@ -0,0 +1,317 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v2.core import models as core_models +from foundry_sdk.v2.widgets import errors as widgets_errors +from foundry_sdk.v2.widgets import models as widgets_models + + +class RepositoryClient: + """ + The API client for the Repository Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _RepositoryClientStreaming(self) + self.with_raw_response = _RepositoryClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + repository_rid: widgets_models.RepositoryRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> widgets_models.Repository: + """ + Get the Repository with the specified rid. + :param repository_rid: A Resource Identifier (RID) identifying a repository. + :type repository_rid: RepositoryRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: widgets_models.Repository + + :raises RepositoryNotFound: The given Repository could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/widgets/repositories/{repositoryRid}", + query_params={ + "preview": preview, + }, + path_params={ + "repositoryRid": repository_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=widgets_models.Repository, + request_timeout=request_timeout, + throwable_errors={ + "RepositoryNotFound": widgets_errors.RepositoryNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def publish( + self, + repository_rid: widgets_models.RepositoryRid, + body: bytes, + *, + repository_version: widgets_models.RepositoryVersion, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> widgets_models.Release: + """ + Publish a new release of a widget set. + :param repository_rid: A Resource Identifier (RID) identifying a repository. + :type repository_rid: RepositoryRid + :param body: The zip file that contains the contents of your widget set. It must include a valid manifest file at the path `.palantir/widgets.config.json`. + :type body: bytes + :param repository_version: + :type repository_version: RepositoryVersion + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: widgets_models.Release + + :raises PublishReleasePermissionDenied: Could not publish the Repository. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/widgets/repositories/{repositoryRid}/publish", + query_params={ + "repositoryVersion": repository_version, + "preview": preview, + }, + path_params={ + "repositoryRid": repository_rid, + }, + header_params={ + "Content-Type": "application/octet-stream", + "Accept": "application/json", + }, + body=body, + response_type=widgets_models.Release, + request_timeout=request_timeout, + throwable_errors={ + "PublishReleasePermissionDenied": widgets_errors.PublishReleasePermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _RepositoryClientRaw: + def __init__(self, client: RepositoryClient) -> None: + def get(_: widgets_models.Repository): ... + def publish(_: widgets_models.Release): ... + + self.get = core.with_raw_response(get, client.get) + self.publish = core.with_raw_response(publish, client.publish) + + +class _RepositoryClientStreaming: + def __init__(self, client: RepositoryClient) -> None: + def get(_: widgets_models.Repository): ... + def publish(_: widgets_models.Release): ... + + self.get = core.with_streaming_response(get, client.get) + self.publish = core.with_streaming_response(publish, client.publish) + + +class AsyncRepositoryClient: + """ + The API client for the Repository Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncRepositoryClientStreaming(self) + self.with_raw_response = _AsyncRepositoryClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + repository_rid: widgets_models.RepositoryRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[widgets_models.Repository]: + """ + Get the Repository with the specified rid. + :param repository_rid: A Resource Identifier (RID) identifying a repository. + :type repository_rid: RepositoryRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[widgets_models.Repository] + + :raises RepositoryNotFound: The given Repository could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/widgets/repositories/{repositoryRid}", + query_params={ + "preview": preview, + }, + path_params={ + "repositoryRid": repository_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=widgets_models.Repository, + request_timeout=request_timeout, + throwable_errors={ + "RepositoryNotFound": widgets_errors.RepositoryNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def publish( + self, + repository_rid: widgets_models.RepositoryRid, + body: bytes, + *, + repository_version: widgets_models.RepositoryVersion, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[widgets_models.Release]: + """ + Publish a new release of a widget set. + :param repository_rid: A Resource Identifier (RID) identifying a repository. + :type repository_rid: RepositoryRid + :param body: The zip file that contains the contents of your widget set. It must include a valid manifest file at the path `.palantir/widgets.config.json`. + :type body: bytes + :param repository_version: + :type repository_version: RepositoryVersion + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[widgets_models.Release] + + :raises PublishReleasePermissionDenied: Could not publish the Repository. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/widgets/repositories/{repositoryRid}/publish", + query_params={ + "repositoryVersion": repository_version, + "preview": preview, + }, + path_params={ + "repositoryRid": repository_rid, + }, + header_params={ + "Content-Type": "application/octet-stream", + "Accept": "application/json", + }, + body=body, + response_type=widgets_models.Release, + request_timeout=request_timeout, + throwable_errors={ + "PublishReleasePermissionDenied": widgets_errors.PublishReleasePermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _AsyncRepositoryClientRaw: + def __init__(self, client: AsyncRepositoryClient) -> None: + def get(_: widgets_models.Repository): ... + def publish(_: widgets_models.Release): ... + + self.get = core.async_with_raw_response(get, client.get) + self.publish = core.async_with_raw_response(publish, client.publish) + + +class _AsyncRepositoryClientStreaming: + def __init__(self, client: AsyncRepositoryClient) -> None: + def get(_: widgets_models.Repository): ... + def publish(_: widgets_models.Release): ... + + self.get = core.async_with_streaming_response(get, client.get) + self.publish = core.async_with_streaming_response(publish, client.publish) diff --git a/foundry_sdk/v2/widgets/widget_set.py b/foundry_sdk/v2/widgets/widget_set.py new file mode 100644 index 000000000..8566c6455 --- /dev/null +++ b/foundry_sdk/v2/widgets/widget_set.py @@ -0,0 +1,218 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing +from functools import cached_property + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v2.core import models as core_models +from foundry_sdk.v2.widgets import errors as widgets_errors +from foundry_sdk.v2.widgets import models as widgets_models + + +class WidgetSetClient: + """ + The API client for the WidgetSet Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _WidgetSetClientStreaming(self) + self.with_raw_response = _WidgetSetClientRaw(self) + + @cached_property + def Release(self): + from foundry_sdk.v2.widgets.release import ReleaseClient + + return ReleaseClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + widget_set_rid: widgets_models.WidgetSetRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> widgets_models.WidgetSet: + """ + Get the WidgetSet with the specified rid. + :param widget_set_rid: A Resource Identifier (RID) identifying a widget set. + :type widget_set_rid: WidgetSetRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: widgets_models.WidgetSet + + :raises WidgetSetNotFound: The given WidgetSet could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/widgets/widgetSets/{widgetSetRid}", + query_params={ + "preview": preview, + }, + path_params={ + "widgetSetRid": widget_set_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=widgets_models.WidgetSet, + request_timeout=request_timeout, + throwable_errors={ + "WidgetSetNotFound": widgets_errors.WidgetSetNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _WidgetSetClientRaw: + def __init__(self, client: WidgetSetClient) -> None: + def get(_: widgets_models.WidgetSet): ... + + self.get = core.with_raw_response(get, client.get) + + +class _WidgetSetClientStreaming: + def __init__(self, client: WidgetSetClient) -> None: + def get(_: widgets_models.WidgetSet): ... + + self.get = core.with_streaming_response(get, client.get) + + +class AsyncWidgetSetClient: + """ + The API client for the WidgetSet Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncWidgetSetClientStreaming(self) + self.with_raw_response = _AsyncWidgetSetClientRaw(self) + + @cached_property + def Release(self): + from foundry_sdk.v2.widgets.release import AsyncReleaseClient + + return AsyncReleaseClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + widget_set_rid: widgets_models.WidgetSetRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[widgets_models.WidgetSet]: + """ + Get the WidgetSet with the specified rid. + :param widget_set_rid: A Resource Identifier (RID) identifying a widget set. + :type widget_set_rid: WidgetSetRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[widgets_models.WidgetSet] + + :raises WidgetSetNotFound: The given WidgetSet could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/widgets/widgetSets/{widgetSetRid}", + query_params={ + "preview": preview, + }, + path_params={ + "widgetSetRid": widget_set_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=widgets_models.WidgetSet, + request_timeout=request_timeout, + throwable_errors={ + "WidgetSetNotFound": widgets_errors.WidgetSetNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _AsyncWidgetSetClientRaw: + def __init__(self, client: AsyncWidgetSetClient) -> None: + def get(_: widgets_models.WidgetSet): ... + + self.get = core.async_with_raw_response(get, client.get) + + +class _AsyncWidgetSetClientStreaming: + def __init__(self, client: AsyncWidgetSetClient) -> None: + def get(_: widgets_models.WidgetSet): ... + + self.get = core.async_with_streaming_response(get, client.get) diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 000000000..ead96e02b --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,46 @@ +[tool.poetry] +name = "foundry-platform-sdk" +version = "0.0.0" +description = "The official Python library for the Foundry API" +license = "Apache-2.0" +readme = "README.md" +authors = ["Palantir Technologies, Inc."] +repository = "https://github.com/palantir/foundry-platform-python" +keywords = ["Palantir", "Foundry", "SDK", "Client", "API"] +packages = [{ include = "foundry_sdk" }] + +[tool.poetry.dependencies] +annotated-types = ">=0.7.0, <1.0.0" +pydantic = ">=2.6.0, <3.0.0" +python = "^3.9" +httpx = ">=0.25.0, <1.0.0" +typing-extensions = ">=4.7.1, <5.0.0" +h11 = ">=0.16.0, <1.0.0" # CVE-2025-43859 +retrying = "^1.3.7" + +[tool.poetry.group.test.dependencies] +expects = ">=0.9.0" +mockito = ">=1.5.1" +pytest = ">=7.4.0" +pytest-asyncio = ">=0.23.0" +uvicorn = ">=0.34.0" +fastapi = ">=0.115.6" + +[tool.poetry.extras] +cli = ["click"] +pandas = ["pandas", "pyarrow"] +polars = ["polars", "pyarrow"] +pyarrow = ["pyarrow"] +duckdb = ["duckdb", "pyarrow"] + +[tool.black] +line_length = 100 + +[build-system] +requires = ["setuptools >= 35.0.2", "poetry-core>=1.0.0"] +build-backend = "poetry.core.masonry.api" + + +[tool.poetry.scripts] +foundry_sdk_v1 = "foundry_sdk.v1.cli:cli" +foundry_sdk_v2 = "foundry_sdk.v2.cli:cli" diff --git a/tests/auth/__init__.py b/tests/auth/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/tests/auth/test_confidential_client.py b/tests/auth/test_confidential_client.py new file mode 100644 index 000000000..a6d662ac1 --- /dev/null +++ b/tests/auth/test_confidential_client.py @@ -0,0 +1,163 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import contextlib + +import httpx +import pytest +from mockito import any +from mockito import spy +from mockito import unstub +from mockito import verify +from mockito import when + +from foundry_sdk._core.confidential_client_auth import ConfidentialClientAuth +from foundry_sdk._core.oauth_utils import SignInResponse + +RESPONSE = { + "access_token": "access_token", + "token_type": "foo", + "expires_in": 3600, +} + + +@contextlib.contextmanager +def stubbed_auth(should_refresh=True, token_response=RESPONSE): + auth = ConfidentialClientAuth( + client_id="client_id", + client_secret="client_secret", + hostname="https://a.b.c.com", + should_refresh=should_refresh, + ) + + response = httpx.Response( + request=httpx.Request("GET", "foo"), status_code=200, json=token_response + ) + when(auth._get_client()).post("/multipass/api/oauth2/token", data=any()).thenReturn(response) + + response = httpx.Response(request=httpx.Request("GET", "foo"), status_code=200) + when(auth._get_client()).post("/multipass/api/oauth2/revoke_token", data=any()).thenReturn( + response + ) + + when(auth)._try_refresh_token().thenCallOriginalImplementation() + when(auth).sign_out().thenCallOriginalImplementation() + + yield auth + unstub() + + +def test_confidential_client_instantiate(): + auth = ConfidentialClientAuth( + client_id="client_id", + client_secret="client_secret", + hostname="https://a.b.c.com", + should_refresh=True, + ) + assert auth._client_id == "client_id" + assert auth._client_secret == "client_secret" + assert auth._hostname == "https://a.b.c.com" + assert auth._token == None + assert auth.url == "a.b.c.com" + assert auth._should_refresh == True + + +def test_confidential_client_url(): + assert ( + ConfidentialClientAuth(client_id="1", client_secret="1", hostname="https://a.b.c.com").url + == "a.b.c.com" + ) + assert ( + ConfidentialClientAuth(client_id="1", client_secret="1", hostname="http://a.b.c.com").url + == "a.b.c.com" + ) + assert ( + ConfidentialClientAuth(client_id="1", client_secret="1", hostname="a.b.c.com/").url + == "a.b.c.com" + ) + + +def test_confidential_client_get_token(): + with stubbed_auth() as auth: + assert auth.get_token().access_token == "access_token" + + +def test_confidential_client_sign_out(): + with stubbed_auth() as auth: + auth.get_token() + assert auth._token is not None + auth.sign_out() + assert auth._token is None + assert auth._stop_refresh_event._flag == True # type: ignore + + +def test_confidential_client_execute_with_token_successful_method(): + with stubbed_auth() as auth: + assert auth.execute_with_token(lambda _: httpx.Response(200)).status_code == 200 + verify(auth, times=0)._refresh_token() + + +def test_confidential_client_execute_with_token_failing_method(): + with stubbed_auth() as auth: + + def raise_(ex): + raise ex + + with pytest.raises(ValueError): + auth.execute_with_token(lambda _: raise_(ValueError("Oops!"))) + + verify(auth, times=0)._refresh_token() + verify(auth, times=0).sign_out() + + +def test_confidential_client_execute_with_token_method_raises_401(): + with stubbed_auth() as auth: + + def raise_401(): + e = httpx.HTTPStatusError( + "foo", + request=httpx.Request("foo", url="foo"), + response=httpx.Response(status_code=401), + ) + raise e + + with pytest.raises(httpx.HTTPStatusError): + auth.execute_with_token(lambda _: raise_401()) + + verify(auth, times=1)._try_refresh_token() + verify(auth, times=1).sign_out() + + +def test_invalid_client_id_raises_appropriate_error(): + assert pytest.raises(TypeError, lambda: ConfidentialClientAuth()) # type: ignore + assert pytest.raises(TypeError, lambda: ConfidentialClientAuth(1, "1")) # type: ignore + assert pytest.raises(TypeError, lambda: ConfidentialClientAuth(None, "1")) # type: ignore + assert pytest.raises(ValueError, lambda: ConfidentialClientAuth("", "1")) + + +def test_invalid_client_secret_raises_appropriate_error(): + assert pytest.raises(TypeError, lambda: ConfidentialClientAuth("1")) # type: ignore + assert pytest.raises(TypeError, lambda: ConfidentialClientAuth("1", 1)) # type: ignore + assert pytest.raises(TypeError, lambda: ConfidentialClientAuth("1", None)) # type: ignore + assert pytest.raises(ValueError, lambda: ConfidentialClientAuth("1", "")) + + +def test_invalid_hostname_raises_appropriate_error(): + assert pytest.raises(TypeError, lambda: ConfidentialClientAuth("1", "1", 1)) # type: ignore + assert pytest.raises(ValueError, lambda: ConfidentialClientAuth("1", "1", "")) # type: ignore + + +def test_invalid_scopes_raises_appropriate_error(): + assert pytest.raises(TypeError, lambda: ConfidentialClientAuth("1", "1", scopes=1)) # type: ignore diff --git a/tests/auth/test_confidential_client_oauth_flow_provider.py b/tests/auth/test_confidential_client_oauth_flow_provider.py new file mode 100644 index 000000000..467a83da0 --- /dev/null +++ b/tests/auth/test_confidential_client_oauth_flow_provider.py @@ -0,0 +1,106 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import httpx +import pytest +from expects import equal +from expects import expect +from mockito import mock +from mockito import unstub +from mockito import when + +from foundry_sdk._core.http_client import HttpClient +from foundry_sdk._core.oauth_utils import ConfidentialClientOAuthFlowProvider +from foundry_sdk._core.oauth_utils import OAuthUtils + + +@pytest.fixture(name="client", scope="module") +def instantiate_server_oauth_flow_provider(): + return ConfidentialClientOAuthFlowProvider( + client_id="client_id", + client_secret="client_secret", + multipass_context_path="/multipass", + scopes=["scope1", "scope2"], + ) + + +@pytest.fixture(scope="module") +def http_client(): + return HttpClient("https://a.b.c.com") + + +def test_get_token(client, http_client): + response = mock(httpx.Response) + when(response).raise_for_status().thenReturn(None) + when(response).json().thenReturn( + {"access_token": "example_token", "expires_in": 42, "token_type": "Bearer"} + ) + when(http_client).post( + "/multipass/api/oauth2/token", + data={ + "client_id": "client_id", + "client_secret": "client_secret", + "grant_type": "client_credentials", + "scope": "scope1 scope2 offline_access", + }, + ).thenReturn(response) + token = client.get_token(http_client) + expect(token.access_token).to(equal("example_token")) + expect(token.token_type).to(equal("Bearer")) + unstub() + + +def test_get_token_throws_when_unsuccessful(client, http_client): + response = mock(httpx.Response) + when(response).raise_for_status().thenRaise( + httpx.HTTPStatusError( + "Foo", + request=httpx.Request("GET", "/foo/bar"), + response=httpx.Response(200), + ), + ) + when(http_client).post( + "/multipass/api/oauth2/token", + data={ + "client_id": "client_id", + "client_secret": "client_secret", + "grant_type": "client_credentials", + "scope": "scope1 scope2 offline_access", + }, + ).thenReturn(response) + + with pytest.raises(httpx.HTTPStatusError): + client.get_token(http_client) + + unstub() + + +def test_revoke_token(client, http_client): + response = mock(httpx.Response) + when(response).raise_for_status().thenReturn(None) + when(http_client).post( + "/multipass/api/oauth2/revoke_token", + data={ + "client_id": "client_id", + "client_secret": "client_secret", + "token": "token_to_be_revoked", + }, + ).thenReturn(response) + client.revoke_token(http_client, "token_to_be_revoked") + unstub() + + +def test_get_scopes(client): + expect(client.get_scopes()).to(equal(["scope1", "scope2", "offline_access"])) diff --git a/tests/auth/test_oauth_utils.py b/tests/auth/test_oauth_utils.py new file mode 100644 index 000000000..707ab5998 --- /dev/null +++ b/tests/auth/test_oauth_utils.py @@ -0,0 +1,87 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +from expects import equal +from expects import expect +from mockito import unstub +from mockito import when + +from foundry_sdk._core.oauth_utils import ConfidentialClientOAuthFlowProvider +from foundry_sdk._core.oauth_utils import OAuthToken +from foundry_sdk._core.oauth_utils import OAuthTokenResponse +from foundry_sdk._core.oauth_utils import OAuthUtils +from foundry_sdk._core.oauth_utils import PublicClientOAuthFlowProvider + + +def test_get_token_uri(): + expect(OAuthUtils.get_token_uri()).to(equal("/multipass/api/oauth2/token")) + + +def test_get_authorize_uri(): + expect(OAuthUtils.get_authorize_uri()).to(equal("/multipass/api/oauth2/authorize")) + + +def test_get_revoke_uri(): + expect(OAuthUtils.get_revoke_uri()).to(equal("/multipass/api/oauth2/revoke_token")) + + +def test_create_uri(): + expect(OAuthUtils.create_uri("/api/v2/datasets", "/abc")).to(equal("/api/v2/datasets/abc")) + expect(OAuthUtils.create_uri("/api/v2/datasets", "/abc")).to(equal("/api/v2/datasets/abc")) + + +def test_confidential_client_no_scopes(): + provider = ConfidentialClientOAuthFlowProvider("CLIENT_ID", "CLIENT_SECRET", "URL", scopes=None) + assert provider.get_scopes() == [] + + provider.scopes = [] + assert provider.get_scopes() == [] + + +def test_confidential_client_with_scopes(): + provider = ConfidentialClientOAuthFlowProvider( + "CLIENT_ID", "CLIENT_SECRET", "URL", scopes=["test"] + ) + assert provider.get_scopes() == ["test", "offline_access"] + + +def test_public_client_no_scopes(): + provider = PublicClientOAuthFlowProvider("CLIENT_ID", "REDIRECT_URL", "URL", scopes=None) + assert provider.get_scopes() == [] + + provider.scopes = [] + assert provider.get_scopes() == [] + + +def test_public_client_with_scopes(): + provider = PublicClientOAuthFlowProvider("CLIENT_ID", "REDIRECT_URL", "URL", scopes=["test"]) + assert provider.get_scopes() == ["test", "offline_access"] + + +def test_token_from_dict(): + import foundry_sdk._core.oauth_utils as module_under_test + + when(module_under_test.time).time().thenReturn(123) + token = OAuthToken( + OAuthTokenResponse( + {"access_token": "example_token", "expires_in": 42, "token_type": "Bearer"} + ) + ) + expect(token.access_token).to(equal("example_token")) + expect(token.token_type).to(equal("Bearer")) + expect(token.expires_in).to(equal(42)) + expect(token.expires_at).to(equal(123 * 1000 + 42 * 1000)) + expect(token._calculate_expiration()).to(equal(123 * 1000 + 42 * 1000)) + unstub() diff --git a/tests/auth/test_public_client.py b/tests/auth/test_public_client.py new file mode 100644 index 000000000..839c76b3a --- /dev/null +++ b/tests/auth/test_public_client.py @@ -0,0 +1,178 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import contextlib + +import httpx +import pytest +from mockito import any +from mockito import spy +from mockito import unstub +from mockito import verify +from mockito import when + +from foundry_sdk._core.auth_utils import Token +from foundry_sdk._core.oauth_utils import AuthorizeRequest +from foundry_sdk._core.oauth_utils import OAuthToken +from foundry_sdk._core.oauth_utils import OAuthTokenResponse +from foundry_sdk._core.public_client_auth import PublicClientAuth +from foundry_sdk._errors.not_authenticated import NotAuthenticated + +RESPONSE = { + "access_token": "access_token", + "token_type": "foo", + "expires_in": 3600, + "refresh_token": "bar", +} + + +@contextlib.contextmanager +def stubbed_auth(should_refresh=True, token_response=RESPONSE): + auth = PublicClientAuth( + client_id="client_id", + redirect_url="redirect_url", + hostname="https://a.b.c.com", + should_refresh=should_refresh, + ) + + response = httpx.Response( + request=httpx.Request("GET", "foo"), status_code=200, json=token_response + ) + when(auth._get_client()).post( + "/multipass/api/oauth2/token", + headers={"Content-Type": "application/x-www-form-urlencoded"}, + data=any(), + ).thenReturn(response) + + response = httpx.Response(request=httpx.Request("GET", "foo"), status_code=200) + when(auth._get_client()).post("/multipass/api/oauth2/revoke_token", data=any()).thenReturn( + response + ) + + when(auth)._try_refresh_token().thenCallOriginalImplementation() + when(auth).sign_out().thenCallOriginalImplementation() + + yield auth + unstub() + + +def _sign_in(auth: PublicClientAuth): + auth.sign_in() + assert auth._auth_request is not None + auth.set_token(code="", state=auth._auth_request.state) + + +def test_public_client_instantiate(): + auth = PublicClientAuth( + client_id="client_id", + redirect_url="redirect_url", + hostname="https://a.b.c.com", + should_refresh=True, + ) + assert auth._client_id == "client_id" + assert auth._redirect_url == "redirect_url" + assert auth._token == None + assert auth.url == "a.b.c.com" + assert auth._should_refresh == True + + +def test_public_client_sign_in(): + with stubbed_auth() as auth: + assert auth.sign_in().startswith("https://a.b.c.com/multipass/api/oauth2/authorize?") + assert auth._auth_request is not None + + +def test_public_client_set_token(): + with stubbed_auth() as auth: + auth.sign_in() + assert auth._auth_request is not None + + auth.set_token(code="", state=auth._auth_request.state) + assert auth._token is not None + assert auth._token.access_token == "access_token" + + +def test_public_client_url(): + assert ( + PublicClientAuth(client_id="", redirect_url="", hostname="https://a.b.c.com").url + == "a.b.c.com" + ) + assert ( + PublicClientAuth(client_id="", redirect_url="", hostname="http://a.b.c.com").url + == "a.b.c.com" + ) + assert PublicClientAuth(client_id="", redirect_url="", hostname="a.b.c.com/").url == "a.b.c.com" + + +def test_public_client_get_token(): + with stubbed_auth() as auth: + _sign_in(auth) + assert isinstance(auth.get_token(), Token) + + +def test_public_client_sign_out(): + with stubbed_auth() as auth: + _sign_in(auth) + assert auth._token is not None + + auth.sign_out() + assert auth._token is None + assert auth._stop_refresh_event._flag == True # type: ignore + + +def test_public_client_get_token_throws_if_not_signed_in(): + with stubbed_auth() as auth: + with pytest.raises(NotAuthenticated) as e: + auth.get_token() + + assert str(e.value) == "Client has not been authenticated." + + +def test_public_client_execute_with_token_successful_method(): + with stubbed_auth() as auth: + _sign_in(auth) + assert auth.execute_with_token(lambda _: httpx.Response(200)).status_code == 200 + verify(auth, times=0)._refresh_token() + + +def test_public_client_execute_with_token_failing_method(): + with stubbed_auth() as auth: + _sign_in(auth) + + def raise_(ex): + raise ex + + with pytest.raises(ValueError): + auth.execute_with_token(lambda _: raise_(ValueError("Oops!"))) + + verify(auth, times=0)._refresh_token() + + +def test_public_client_execute_with_token_method_raises_401(): + with stubbed_auth() as auth: + _sign_in(auth) + + def raise_401(): + e = httpx.HTTPStatusError( + "foo", + request=httpx.Request("foo", url="foo"), + response=httpx.Response(status_code=401), + ) + raise e + + with pytest.raises(httpx.HTTPStatusError): + auth.execute_with_token(lambda _: raise_401()) + + verify(auth, times=1)._try_refresh_token() diff --git a/tests/auth/test_public_client_oauth_flow_provider.py b/tests/auth/test_public_client_oauth_flow_provider.py new file mode 100644 index 000000000..991df1ee9 --- /dev/null +++ b/tests/auth/test_public_client_oauth_flow_provider.py @@ -0,0 +1,136 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import httpx +import pytest +from expects import equal +from expects import expect +from expects import raise_error +from mockito import mock +from mockito import unstub +from mockito import when + +from foundry_sdk._core.http_client import HttpClient +from foundry_sdk._core.oauth_utils import OAuthUtils +from foundry_sdk._core.oauth_utils import PublicClientOAuthFlowProvider + + +@pytest.fixture(name="client", scope="module") +def instantiate_server_oauth_flow_provider(): + return PublicClientOAuthFlowProvider( + client_id="client_id", + redirect_url="redirect_url", + multipass_context_path="/multipass", + scopes=["scope1", "scope2"], + ) + + +@pytest.fixture(scope="module") +def http_client(): + return HttpClient("https://a.b.c.com") + + +def test_get_token(http_client, client): + response = mock(httpx.Response) + when(response).raise_for_status().thenReturn(None) + when(response).json().thenReturn( + {"access_token": "example_token", "expires_in": 42, "token_type": "Bearer"} + ) + + headers = {"Content-Type": "application/x-www-form-urlencoded"} + params = { + "grant_type": "authorization_code", + "code": "code", + "redirect_uri": "redirect_url", + "client_id": "client_id", + "code_verifier": "code_verifier", + "scope": "scope1 scope2 offline_access", + } + + when(http_client).post("/multipass/api/oauth2/token", data=params, headers=headers).thenReturn( + response + ) + token = client.get_token(http_client, code="code", code_verifier="code_verifier") + expect(token.access_token).to(equal("example_token")) + expect(token.token_type).to(equal("Bearer")) + unstub() + + +def test_get_token_throws_when_unsuccessful(http_client, client): + response = mock(httpx.Response) + when(response).raise_for_status().thenRaise( + httpx.HTTPStatusError( + "Foo", + request=httpx.Request("GET", "/foo/bar"), + response=httpx.Response(200), + ), + ) + + headers = {"Content-Type": "application/x-www-form-urlencoded"} + params = { + "grant_type": "authorization_code", + "code": "code", + "redirect_uri": "redirect_url", + "client_id": "client_id", + "code_verifier": "code_verifier", + "scope": "scope1 scope2 offline_access", + } + + when(http_client).post("/multipass/api/oauth2/token", data=params, headers=headers).thenReturn( + response + ) + + with pytest.raises(httpx.HTTPStatusError): + client.get_token(http_client, code="code", code_verifier="code_verifier") + + unstub() + + +def test_refresh_token(http_client, client): + response = mock(httpx.Response) + when(response).raise_for_status().thenReturn(None) + when(response).json().thenReturn( + {"access_token": "example_token", "expires_in": 42, "token_type": "Bearer"} + ) + + headers = {"Content-Type": "application/x-www-form-urlencoded"} + params = { + "grant_type": "refresh_token", + "client_id": "client_id", + "refresh_token": "refresh_token", + } + + when(http_client).post("/multipass/api/oauth2/token", data=params, headers=headers).thenReturn( + response + ) + token = client.refresh_token(http_client, refresh_token="refresh_token") + expect(token.access_token).to(equal("example_token")) + expect(token.token_type).to(equal("Bearer")) + unstub() + + +def test_revoke_token(http_client, client): + response = mock(httpx.Response) + when(response).raise_for_status().thenReturn(None) + when(http_client).post( + "/multipass/api/oauth2/revoke_token", + data={"client_id": "client_id", "token": "token_to_be_revoked"}, + ).thenReturn(response) + client.revoke_token(http_client, "token_to_be_revoked") + unstub() + + +def test_get_scopes(http_client, client): + expect(client.get_scopes()).to(equal(["scope1", "scope2", "offline_access"])) diff --git a/tests/auth/test_user_auth_token_client.py b/tests/auth/test_user_auth_token_client.py new file mode 100644 index 000000000..f48cc3269 --- /dev/null +++ b/tests/auth/test_user_auth_token_client.py @@ -0,0 +1,25 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import pytest + +from foundry_sdk import UserTokenAuth + + +def test_invalid_token_raises_appropriate_error(): + assert pytest.raises(TypeError, lambda: UserTokenAuth()) # type: ignore + assert pytest.raises(TypeError, lambda: UserTokenAuth(1)) # type: ignore + assert pytest.raises(TypeError, lambda: UserTokenAuth(None)) # type: ignore + assert pytest.raises(ValueError, lambda: UserTokenAuth("")) diff --git a/tests/conftest.py b/tests/conftest.py new file mode 100644 index 000000000..0fa59f668 --- /dev/null +++ b/tests/conftest.py @@ -0,0 +1,35 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import subprocess +import time + +import pytest + +PORT = 8123 + + +@pytest.fixture(scope="session", autouse=True) +def fastapi_server(): + # Start the server + process = subprocess.Popen( + ["uvicorn", "tests.server:app", "--host", "127.0.0.1", "--port", str(PORT)] + ) + time.sleep(2) # Wait a moment for the server to start + + yield + + # Teardown: Stop the server + process.terminate() diff --git a/tests/server.py b/tests/server.py new file mode 100644 index 000000000..b5e7600a6 --- /dev/null +++ b/tests/server.py @@ -0,0 +1,82 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import time +from typing import List +from typing import Optional + +from fastapi import APIRouter +from fastapi import FastAPI +from fastapi import HTTPException +from fastapi import Request +from fastapi.responses import StreamingResponse +from pydantic import BaseModel +from pydantic import Field + +app = FastAPI() +router = APIRouter() + + +class FooBar(BaseModel): + foo: str + bar: int + + +@router.get("/foo/bar", response_model=FooBar) +def foo_bar() -> FooBar: + return FooBar(foo="foo", bar=2) + + +class FooData(BaseModel): + data: List[FooBar] + next_page_token: Optional[str] = Field(alias="nextPageToken", default=None) + + +@router.get("/foo/iterator", response_model=FooData) +def foo_iterator() -> FooData: + return FooData( + data=[ + FooBar(foo="foo", bar=1), + FooBar(foo="foo", bar=2), + ], + nextPageToken=None, + ) + + +@router.get("/foo/timeout", response_model=FooBar) +def timeout() -> FooBar: + time.sleep(10) + return FooBar(foo="foo", bar=2) + + +@router.get("/foo/stream") +def stream() -> StreamingResponse: + content = "foo\nbar\nbaz" + + def generate_data(): + lines = content.split("\n") + for i, line in enumerate(lines): + is_final_line = i == len(lines) - 1 + yield line if is_final_line else line + "\n" + + return StreamingResponse(generate_data(), media_type="text/plain") + + +@app.api_route("/proxy/error", methods=["CONNECT"]) +def proxy_error(full_path: str): + raise HTTPException(status_code=400, detail="Bad Request") + + +app.include_router(router, prefix="/api") diff --git a/tests/test_api_client.py b/tests/test_api_client.py new file mode 100644 index 000000000..8ea89d13c --- /dev/null +++ b/tests/test_api_client.py @@ -0,0 +1,664 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import json +import warnings +from datetime import datetime +from datetime import timezone +from typing import Any +from typing import AsyncIterator +from typing import Dict +from typing import List +from typing import Literal +from typing import Optional +from typing import Union +from typing import cast +from unittest.mock import ANY +from unittest.mock import Mock +from unittest.mock import patch + +import httpx +import pytest + +from foundry_sdk import ApiNotFoundError +from foundry_sdk import BadRequestError +from foundry_sdk import ConfidentialClientAuth +from foundry_sdk import Config +from foundry_sdk import ConflictError +from foundry_sdk import ConnectionError +from foundry_sdk import InternalServerError +from foundry_sdk import NotFoundError +from foundry_sdk import PalantirRPCException +from foundry_sdk import PermissionDeniedError +from foundry_sdk import ProxyError +from foundry_sdk import RateLimitError +from foundry_sdk import ReadTimeout +from foundry_sdk import RequestEntityTooLargeError +from foundry_sdk import ServiceUnavailable +from foundry_sdk import StreamConsumedError +from foundry_sdk import UnauthorizedError +from foundry_sdk import UnprocessableEntityError +from foundry_sdk import UserTokenAuth +from foundry_sdk import WriteTimeout +from foundry_sdk import __version__ +from foundry_sdk._core import ApiClient +from foundry_sdk._core import ApiResponse +from foundry_sdk._core import AsyncApiClient +from foundry_sdk._core import RequestInfo +from tests.server import FooBar +from tests.server import FooData + +HOSTNAME = "localhost:8123" + + +class AttrDict(Dict[str, Any]): + def __init__(self, *args: Any, **kwargs: Any): + super(AttrDict, self).__init__(*args, **kwargs) + self.__dict__ = self + + +EXAMPLE_ERROR = json.dumps( + { + "errorCode": "ERROR_CODE", + "errorName": "ERROR_NAME", + "errorInstanceId": "123", + "parameters": {}, + } +) + +EMPTY_BODY = "" + + +def assert_called_with(client: Union[ApiClient, AsyncApiClient], **kwargs): + if isinstance(client, AsyncApiClient): + build_request = cast(Mock, client._client.build_request) + else: + build_request = cast(Mock, client._session.build_request) + + build_request.assert_called_with( + **{ + "method": ANY, + "url": ANY, + "headers": ANY, + "params": ANY, + "content": ANY, + "timeout": ANY, + **kwargs, + } + ) + + +def _throw(exception: Exception): + def wrapper(*_args, **_kwargs): + raise exception + + return wrapper + + +def get_mock_awaitable(return_value): + async def mock_awaitable(*args, **kwargs): + return return_value + + return Mock(wraps=mock_awaitable) + + +def create_mock_client(config: Optional[Config] = None, hostname=HOSTNAME): + client = ApiClient(auth=UserTokenAuth(token="bar"), hostname=hostname, config=config) + client._session.build_request = Mock(wraps=client._session.build_request) + client._session.send = Mock(return_value=AttrDict(status_code=200, content=b"", headers={})) + return client + + +def create_async_mock_client(config: Optional[Config] = None, hostname=HOSTNAME): + client = AsyncApiClient(auth=UserTokenAuth(token="bar"), hostname=hostname, config=config) + client._client.build_request = Mock(wraps=client._client.build_request) + client._client.send = get_mock_awaitable(AttrDict(status_code=200, content=b"", headers={})) + return client + + +def create_client( + config: Optional[Config] = None, + hostname=HOSTNAME, + scheme: Literal["https", "http"] = "http", +): + config = config or Config() + config.scheme = scheme + return ApiClient(auth=UserTokenAuth(token="bar"), hostname=hostname, config=config) + + +def create_async_client( + config: Optional[Config] = None, + hostname=HOSTNAME, + scheme: Literal["https", "http"] = "http", +): + config = config or Config() + config.scheme = scheme + return AsyncApiClient(auth=UserTokenAuth(token="bar"), hostname=hostname, config=config) + + +def test_authorization_header(): + client = create_mock_client() + client.call_api(RequestInfo.with_defaults("GET", "/foo/bar")) + # Ensure the bearer token gets added to the headers + assert_called_with(client, headers={"Authorization": "Bearer bar"}) + + +def test_timeout(): + client = create_mock_client(config=Config(timeout=60)) + client.call_api(RequestInfo.with_defaults("GET", "/foo/bar", request_timeout=30)) + assert_called_with(client, timeout=30) + + +def test_config_passed_to_http_client(): + # Just check that at least one config var was set correctly to ensure + # the config is being passed to the http client + client = create_client(config=Config(timeout=60)) + assert client._session.timeout == httpx.Timeout(60) + + +def test_path_encoding(): + client = create_mock_client() + + client.call_api( + RequestInfo.with_defaults( + "GET", + "/files/{path}", + path_params={"path": "/my/file.txt"}, + ) + ) + + assert_called_with(client, url="/api/files/%2Fmy%2Ffile.txt") + + +def test_null_query_params(): + client = create_mock_client() + client.call_api( + RequestInfo.with_defaults("GET", "/foo/bar", query_params={"foo": "foo", "bar": None}) + ) + assert_called_with(client, url="/api/foo/bar", params=[("foo", "foo")]) + + +def test_shared_transport(): + client1 = create_mock_client() + client2 = create_mock_client() + session1 = client1._session + session2 = client2._session + assert session1._transport == session2._transport + + +def call_api_helper( + status_code: int, + data: str, + headers: Dict[str, str] = {}, +): + client = ApiClient(auth=UserTokenAuth(token="bar"), hostname="foo") + + client._session.send = Mock( + return_value=AttrDict( + status_code=status_code, + headers=headers, + content=data.encode(), + text=data, + json=lambda: json.loads(data), + ) + ) + + return client.call_api(RequestInfo.with_defaults("POST", "/abc")) + + +def test_call_api_400(): + with pytest.raises(BadRequestError) as info: + call_api_helper(status_code=400, data=EXAMPLE_ERROR, headers={"Header": "A"}) + + assert info.value.name == "ERROR_NAME" + assert info.value.error_instance_id == "123" + assert info.value.parameters == {} + + +def test_401_error(): + with pytest.raises(UnauthorizedError): + call_api_helper(status_code=401, data=EXAMPLE_ERROR) + + +def test_403_error(): + with pytest.raises(PermissionDeniedError): + call_api_helper(status_code=403, data=EXAMPLE_ERROR) + + +def test_404_error(): + with pytest.raises(NotFoundError): + call_api_helper(status_code=404, data=EXAMPLE_ERROR) + + +def test_404_with_no_body(): + with pytest.raises(ApiNotFoundError): + call_api_helper(status_code=404, data=EMPTY_BODY) + + +def test_422_error(): + with pytest.raises(UnprocessableEntityError): + call_api_helper(status_code=422, data=EXAMPLE_ERROR) + + +def test_429_error(): + with pytest.raises(RateLimitError): + call_api_helper(status_code=429, data=EMPTY_BODY) + + +def test_503_with_propagate_to_caller(): + client = ApiClient( + auth=UserTokenAuth(token="bar"), + hostname="foo", + config=Config(propagate_qos="PROPAGATE_429_AND_503_TO_CALLER"), + ) + + client._session.send = Mock( + side_effect=( + AttrDict(status_code=503, headers={}, content=b"", text=""), + AttrDict(status_code=200, headers={}, content=b"", text=""), + ) + ) + + with pytest.raises(ServiceUnavailable): + client.call_api(RequestInfo.with_defaults("POST", "/abc")) + + assert client._session.send.call_count == 1 + + +def test_503_with_retry(): + client = ApiClient( + auth=UserTokenAuth(token="bar"), + hostname="foo", + config=Config(propagate_qos="AUTOMATIC_RETRY"), + ) + + client._session.send = Mock( + side_effect=( + AttrDict(status_code=503, headers={}, content=b"", text=""), + AttrDict(status_code=200, headers={}, content=b"", text=""), + ) + ) + + response = client.call_api(RequestInfo.with_defaults("POST", "/abc", response_mode="RAW")) + assert response.status_code == 200 + + assert client._session.send.call_count == 2 + + +def test_413_error(): + with pytest.raises(RequestEntityTooLargeError): + call_api_helper(status_code=413, data=EXAMPLE_ERROR) + + +def test_409_error(): + with pytest.raises(ConflictError): + call_api_helper(status_code=409, data=EXAMPLE_ERROR) + + +def test_call_api_500(): + with pytest.raises(InternalServerError): + call_api_helper(status_code=500, data=EXAMPLE_ERROR) + + +def test_call_api_599(): + with pytest.raises(InternalServerError): + call_api_helper(status_code=599, data=EXAMPLE_ERROR) + + +def test_call_api_600(): + with pytest.raises(PalantirRPCException): + call_api_helper(status_code=600, data=EXAMPLE_ERROR) + + +def test_cannot_cause_invalid_url_error(): + client = create_client() + request_info = RequestInfo.with_defaults("GET", "/foo/{bar}", path_params={"bar": "|https://"}) + + # This confirms that the path parameters are encoded since "|https://" in a URL is invalid + # The encoded path doesn't exist so we get back a 404 error + with pytest.raises(NotFoundError): + client.call_api(request_info) + + +def test_connect_timeout(): + client = create_client(hostname="localhost:9876", config=Config(timeout=1e-6)) + request_info = RequestInfo.with_defaults("GET", "/foo/bar") + + with pytest.raises(ConnectionError): + client.call_api(request_info) + + +def test_read_timeout(): + client = create_client(config=Config(timeout=1e-6)) + request_info = RequestInfo.with_defaults("GET", "/foo/timeout") + + with pytest.raises(ReadTimeout): + client.call_api(request_info) + + +def test_write_timeout(): + client = create_client(config=Config(timeout=1e-6)) + data = b"*" * 1024 * 1024 * 100 + request_info = RequestInfo.with_defaults("GET", "/foo/timeout", body=data) + + with pytest.raises(WriteTimeout): + client.call_api(request_info) + + +def test_stream_consumed_error(): + client = create_client() + request_info = RequestInfo.with_defaults("GET", "/foo/stream", response_mode="STREAMING") + + with client.call_api(request_info) as response: + for _ in response.iter_bytes(): + pass + + with pytest.raises(StreamConsumedError): + for _ in response.iter_bytes(): + pass + + +def test_streaming_response_type(): + client = create_client() + request_info = RequestInfo.with_defaults("GET", "/foo/stream", response_mode="STREAMING") + + with client.call_api(request_info) as response: + iterator = response.iter_bytes() + assert next(iterator) == b"foo\n" + assert next(iterator) == b"bar\n" + assert next(iterator) == b"baz" + + +def test_raw_response_type(): + client = create_client() + request_info = RequestInfo.with_defaults("GET", "/foo/bar", response_mode="RAW") + + response = client.call_api(request_info) + assert response.text == '{"foo":"foo","bar":2}' + assert response.json() == {"foo": "foo", "bar": 2} + + +def test_iterator_response_type(): + client = create_client() + request_info = RequestInfo.with_defaults( + "GET", + "/foo/iterator", + response_mode="ITERATOR", + response_type=FooData, + ) + + response = client.call_api(request_info) + assert len(response.data) == 2 + assert len(list(response)) == 2 + + +def test_proxy_error(): + client = create_client() + request_info = RequestInfo.with_defaults("GET", "/proxy/error") + + # I can't figure out a way to mock "ProxyError" since it involves connecting to a server + # using https + # https://github.com/encode/httpcore/blob/a1735520e3826ccc861cdadf3e692abfbb19ac6a/httpcore/_sync/http_proxy.py#L156 + # This is an error we could hit so I'll just use the mock library to simulate the error + with patch("httpx.Client.send", side_effect=_throw(httpx.ProxyError("foo"))): + with pytest.raises(ProxyError): + client.call_api(request_info) + + +def test_ssl_error(): + client = create_client(scheme="https", config=Config(timeout=1)) + request_info = RequestInfo.with_defaults("GET", "localhost:8123") + + with pytest.raises(ConnectionError) as error: + client.call_api(request_info) + + assert "SSL" in str(error.value) + + +def test_passing_in_str_auth(): + with pytest.raises(TypeError) as e: + ApiClient(auth="foo", hostname="localhost:8123") # type: ignore + assert str(e.value).startswith( + "auth must be an instance of UserTokenAuth, ConfidentialClientAuth or PublicClientAuth, not a string." + ) + + with pytest.raises(TypeError) as e: + AsyncApiClient(auth="foo", hostname="localhost:8123") # type: ignore + assert str(e.value).startswith( + "auth must be an instance of UserTokenAuth, ConfidentialClientAuth or PublicClientAuth, not a string." + ) + + +def test_passing_in_int_to_auth(): + with pytest.raises(TypeError) as e: + ApiClient(auth=2, hostname="localhost:8123") # type: ignore + assert ( + str(e.value) + == "auth must be an instance of UserTokenAuth, ConfidentialClientAuth or PublicClientAuth, not an instance of int." + ) + + with pytest.raises(TypeError) as e: + AsyncApiClient(auth=2, hostname="localhost:8123") # type: ignore + assert ( + str(e.value) + == "auth must be an instance of UserTokenAuth, ConfidentialClientAuth or PublicClientAuth, not an instance of int." + ) + + +def test_passing_in_int_to_hostname(): + with pytest.raises(TypeError) as e: + ApiClient(auth=UserTokenAuth(token="foo"), hostname=2) # type: ignore + assert str(e.value) == "hostname must be a string, not int." + + with pytest.raises(TypeError) as e: + AsyncApiClient(auth=UserTokenAuth(token="foo"), hostname=2) # type: ignore + assert str(e.value) == "hostname must be a string, not int." + + +def test_passing_in_int_to_config(): + with pytest.raises(TypeError) as e: + ApiClient(auth=UserTokenAuth(token="foo"), hostname="localhost:1234", config=2) # type: ignore + assert str(e.value) == "config must be an instance of Config, not int." + + with pytest.raises(TypeError) as e: + AsyncApiClient(auth=UserTokenAuth(token="foo"), hostname="localhost:1234", config=2) # type: ignore + assert str(e.value) == "config must be an instance of Config, not int." + + +def test_config_shared_with_auth(): + config = Config(timeout=1) + auth = ConfidentialClientAuth(client_id="foo", client_secret="bar") + assert auth._hostname is None + assert auth._config is None + + with warnings.catch_warnings(record=True) as w: + ApiClient(auth=auth, hostname="localhost:1234", config=config) + assert len(w) == 0 + + assert auth._hostname == "localhost:1234" + assert auth._config == config + + +def test_auth_config_prioritized(): + auth_config = Config(timeout=1) + auth = ConfidentialClientAuth( + client_id="foo", client_secret="bar", hostname="localhost:9876", config=auth_config + ) + + with warnings.catch_warnings(record=True) as w: + ApiClient(auth=auth, hostname="localhost:1234", config=Config(timeout=2)) + # No warning because the hostnames are different + assert len(w) == 0 + + # Make sure the ApiClient hostname is prioritized + assert auth._hostname == "localhost:9876" + assert auth._config == auth_config + + +def test_duplicate_auth_config_warns(): + hostname = "localhost:1234" + config = Config(timeout=1) + auth = ConfidentialClientAuth( + client_id="foo", client_secret="bar", hostname=hostname, config=config + ) + + with warnings.catch_warnings(record=True) as w: + ApiClient(auth=auth, hostname=hostname, config=config) + # Two warnings because both the hostname and config are the same + assert len(w) == 2 + + # Make sure the ApiClient hostname is prioritized + assert auth._hostname == hostname + assert auth._config == config + + +def test_create_headers(): + client = create_client() + expected_headers = { + "Authorization": "Bearer bar", + "bool_header": "true", + "bytes_header": "bytes".encode("utf-8"), + "datetime_header": "2025-01-01T10:00:00+00:00", + "float_header": "123.123", + "int_header": "123", + "str_header": "string", + } + assert expected_headers == client._create_headers( + request_info=RequestInfo.with_defaults( + "GET", + "/files/{path}", + header_params={ + "bool_header": True, + "bytes_header": "bytes".encode("utf-8"), + "datetime_header": datetime(2025, 1, 1, 10, 0, 0, tzinfo=timezone.utc), + "float_header": 123.123, + "int_header": 123, + "str_header": "string", + "optional_header": None, + }, + ), + token=UserTokenAuth(token="bar").get_token(), + ) + + +def test_response_decode_bytes(): + response = ApiResponse( + RequestInfo.with_defaults("GET", "/foo/bar", response_type=bytes), + httpx.Response(200, content=b"foo"), + ) + + assert response.decode() == b"foo" + + +def test_response_decode_present_optional_bytes(): + response = ApiResponse( + RequestInfo.with_defaults("GET", "/foo/bar", response_type=Optional[bytes]), + httpx.Response(200, content=b"foo"), + ) + + assert response.decode() == b"foo" + + +def test_response_decode_empty_optional_bytes(): + response = ApiResponse( + RequestInfo.with_defaults("GET", "/foo/bar", response_type=Optional[bytes]), + httpx.Response(200, content=b""), + ) + + assert response.decode() is None + + +@pytest.mark.asyncio(scope="session") +async def test_async_headers(): + client = create_async_mock_client() + await client.call_api(RequestInfo.with_defaults("GET", "/foo", header_params={"Foo": "Bar"})) + assert_called_with(client, headers={"Authorization": "Bearer bar", "Foo": "Bar"}) + + +@pytest.mark.asyncio(scope="session") +async def test_async_timeout(): + client = create_async_mock_client(config=Config(timeout=60)) + await client.call_api(RequestInfo.with_defaults("GET", "/foo/bar", request_timeout=30)) + assert_called_with(client, timeout=30) + + +@pytest.mark.asyncio(scope="session") +async def test_async_path(): + client = create_async_mock_client() + await client.call_api(RequestInfo.with_defaults("GET", "/files")) + assert_called_with(client, url="/api/files") + + +@pytest.mark.asyncio(scope="session") +async def test_async_query_params(): + client = create_async_mock_client() + await client.call_api(RequestInfo.with_defaults("GET", "/foo", query_params={"foo": "bar"})) + assert_called_with(client, url="/api/foo", params=[("foo", "bar")]) + + +@pytest.mark.asyncio(scope="session") +async def test_async_default_raw_response_type(): + client = create_async_client() + request_info = RequestInfo.with_defaults( + "GET", "/foo/bar", response_mode="DECODED", response_type=FooBar + ) + + response = await client.call_api(request_info) + assert response == FooBar(foo="foo", bar=2) + + +@pytest.mark.asyncio(scope="session") +async def test_async_streaming_response_type(): + client = create_async_client() + request_info = RequestInfo.with_defaults("GET", "/foo/stream", response_mode="STREAMING") + + async with client.call_api(request_info) as response: + iterator = response.aiter_bytes() + assert await iterator.__anext__() == b"foo\n" + assert await iterator.__anext__() == b"bar\n" + assert await iterator.__anext__() == b"baz" + + +@pytest.mark.asyncio(scope="session") +async def test_async_raw_response_type(): + client = create_async_client() + request_info = RequestInfo.with_defaults("GET", "/foo/bar", response_mode="RAW") + + response = await client.call_api(request_info) + assert response.text == '{"foo":"foo","bar":2}' + assert response.json() == {"foo": "foo", "bar": 2} + + +async def collect_async_iterator(aiterator: AsyncIterator[Any]) -> List[Any]: + """Collects the items from an async iterator into a list.""" + result = [] + async for item in aiterator: + result.append(item) + return result + + +@pytest.mark.asyncio(scope="session") +async def test_async_iterator_response_type(): + client = create_async_client() + request_info = RequestInfo.with_defaults( + "GET", + "/foo/iterator", + response_mode="ITERATOR", + response_type=FooData, + ) + + response = client.call_api(request_info) + assert len(await response._page_iterator.get_data()) == 2 + assert len(await collect_async_iterator(response)) == 2 diff --git a/tests/test_body_serialization.py b/tests/test_body_serialization.py new file mode 100644 index 000000000..4eadcd7a3 --- /dev/null +++ b/tests/test_body_serialization.py @@ -0,0 +1,513 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import json +from datetime import datetime +from datetime import timedelta +from datetime import timezone +from typing import Any +from typing import Dict +from typing import Generic +from typing import List +from typing import Literal +from typing import Optional +from typing import TypeVar +from typing import Union + +import httpx +import pydantic +import pytest +from typing_extensions import Annotated + +from foundry_sdk._core.api_client import BaseApiClient + + +# Test models for serialization +class SimpleModel(pydantic.BaseModel): + name: str + count: int + + +class ComplexModel(pydantic.BaseModel): + id: str + date: datetime + nested: SimpleModel + tags: List[str] = [] + optional_field: Optional[int] = None + + +class ModelWithArray(pydantic.BaseModel): + id: str + items: List[SimpleModel] + + +class ModelWithOptionalArray(pydantic.BaseModel): + id: str + items: Optional[List[SimpleModel]] = None + + +class ModelWithNestedArrays(pydantic.BaseModel): + id: str + matrix: List[List[SimpleModel]] + + +# Create a test client for serialization tests +class TestApiClient(BaseApiClient): + """A minimal implementation for testing the serialization logic""" + + def __init__(self): + pass # Skip the standard initialization + + +# Helper function to serialize and then deserialize back to verify correctness +def serialize_and_deserialize(client: TestApiClient, data: Any) -> Any: + """ + Serialize data using the client's _serialize method and then deserialize it back to a generic Python object (e.g., dict or list). + Note: This does NOT reconstruct the original input type if it was a custom class. + """ + serialized = client._serialize(data) + # If None is returned, it means the data was None + if serialized is None: + return None + # Decode the bytes and parse as JSON + return json.loads(serialized.decode("utf-8")) + + +# ----- Basic Serialization Tests ----- + + +def test_serialize_none(): + """Test serializing None value.""" + client = TestApiClient() + result = client._serialize(None) + assert result is None + + +def test_serialize_bytes(): + """Test that bytes are passed through as-is.""" + client = TestApiClient() + raw_bytes = b"raw byte content" + result = client._serialize(raw_bytes) + assert result is raw_bytes # Should return the same bytes object + + +def test_serialize_primitive_types(): + """Test serializing primitive JSON types.""" + client = TestApiClient() + + # String + assert json.loads((client._serialize("test string") or b"").decode()) == "test string" + + # Number + assert json.loads((client._serialize(42) or b"").decode()) == 42 + assert json.loads((client._serialize(3.14) or b"").decode()) == 3.14 + + # Boolean + assert json.loads((client._serialize(True) or b"").decode()) == True + assert json.loads((client._serialize(False) or b"").decode()) == False + + # Array of primitives + assert json.loads((client._serialize([1, 2, 3]) or b"").decode()) == [1, 2, 3] + + # Object of primitives + assert json.loads((client._serialize({"key": "value"}) or b"").decode()) == {"key": "value"} + + +# ----- Pydantic BaseModel Serialization Tests ----- + + +def test_serialize_simple_model(): + """Test serializing a single simple Pydantic model.""" + client = TestApiClient() + model = SimpleModel(name="test", count=42) + + result = serialize_and_deserialize(client, model) + assert result == {"name": "test", "count": 42} + + +def test_serialize_complex_model(): + """Test serializing a complex Pydantic model with nested objects.""" + client = TestApiClient() + + now = datetime(2023, 1, 1, 12, 0, 0, tzinfo=timezone.utc) + model = ComplexModel( + id="test-id", date=now, nested=SimpleModel(name="nested", count=10), tags=["tag1", "tag2"] + ) + + result = serialize_and_deserialize(client, model) + assert result == { + "id": "test-id", + "date": "2023-01-01T12:00:00+00:00", + "nested": {"name": "nested", "count": 10}, + "tags": ["tag1", "tag2"], + } + + # Optional fields that are None should be excluded + assert "optional_field" not in result + + +def test_serialize_model_with_none_fields(): + """Test that None fields are properly excluded from serialization.""" + client = TestApiClient() + + model = ComplexModel( + id="test-id", + date=datetime(2023, 1, 1, tzinfo=timezone.utc), + nested=SimpleModel(name="nested", count=10), + optional_field=None, + ) + + result = serialize_and_deserialize(client, model) + assert "optional_field" not in result + + +# ----- Array Serialization Tests ----- + + +def test_serialize_array_of_models(): + """Test serializing an array of Pydantic models.""" + client = TestApiClient() + + models = [ + SimpleModel(name="item1", count=1), + SimpleModel(name="item2", count=2), + SimpleModel(name="item3", count=3), + ] + + result = serialize_and_deserialize(client, models) + assert result == [ + {"name": "item1", "count": 1}, + {"name": "item2", "count": 2}, + {"name": "item3", "count": 3}, + ] + + +def test_serialize_empty_array(): + """Test serializing an empty array.""" + client = TestApiClient() + result = serialize_and_deserialize(client, []) + assert result == [] + + +def test_serialize_array_with_none(): + """Test serializing an array containing None values.""" + client = TestApiClient() + + # Array with None values + data = [SimpleModel(name="item1", count=1), None, SimpleModel(name="item3", count=3)] + + result = serialize_and_deserialize(client, data) + assert result == [{"name": "item1", "count": 1}, None, {"name": "item3", "count": 3}] + + +def test_serialize_mixed_array(): + """Test serializing a mixed array with different types including models.""" + client = TestApiClient() + + data = ["string", 42, {"key": "value"}, SimpleModel(name="model", count=1), [1, 2, 3]] + + result = serialize_and_deserialize(client, data) + assert result == ["string", 42, {"key": "value"}, {"name": "model", "count": 1}, [1, 2, 3]] + + +# ----- Nested Structure Serialization Tests ----- + + +def test_serialize_model_with_array(): + """Test serializing a model that contains an array of models.""" + client = TestApiClient() + + model = ModelWithArray( + id="test-id", items=[SimpleModel(name="item1", count=1), SimpleModel(name="item2", count=2)] + ) + + result = serialize_and_deserialize(client, model) + assert result == { + "id": "test-id", + "items": [{"name": "item1", "count": 1}, {"name": "item2", "count": 2}], + } + + +def test_serialize_model_with_optional_array_present(): + """Test serializing a model with an optional array that is present.""" + client = TestApiClient() + + model = ModelWithOptionalArray(id="test-id", items=[SimpleModel(name="item", count=1)]) + + result = serialize_and_deserialize(client, model) + assert result == {"id": "test-id", "items": [{"name": "item", "count": 1}]} + + +def test_serialize_model_with_optional_array_none(): + """Test serializing a model with an optional array that is None.""" + client = TestApiClient() + + model = ModelWithOptionalArray(id="test-id") # items defaults to None + + result = serialize_and_deserialize(client, model) + assert result == {"id": "test-id"} + assert "items" not in result + + +def test_serialize_model_with_nested_arrays(): + """Test serializing a model with nested arrays of models.""" + client = TestApiClient() + + model = ModelWithNestedArrays( + id="test-id", + matrix=[ + [SimpleModel(name="1,1", count=11), SimpleModel(name="1,2", count=12)], + [SimpleModel(name="2,1", count=21), SimpleModel(name="2,2", count=22)], + ], + ) + + result = serialize_and_deserialize(client, model) + assert result == { + "id": "test-id", + "matrix": [ + [{"name": "1,1", "count": 11}, {"name": "1,2", "count": 12}], + [{"name": "2,1", "count": 21}, {"name": "2,2", "count": 22}], + ], + } + + +def test_serialize_deeply_nested_structure(): + """Test serializing a deeply nested structure with models at various levels.""" + client = TestApiClient() + + data = { + "top_level": SimpleModel(name="top", count=1), + "nested": { + "model": SimpleModel(name="nested", count=2), + "list": [SimpleModel(name="list1", count=3), SimpleModel(name="list2", count=4)], + }, + "matrix": [ + [SimpleModel(name="m11", count=11), SimpleModel(name="m12", count=12)], + [SimpleModel(name="m21", count=21), SimpleModel(name="m22", count=22)], + ], + "mixed": [ + {"model": SimpleModel(name="mixed", count=5)}, + [SimpleModel(name="array", count=6)], + ], + } + + result = serialize_and_deserialize(client, data) + assert result == { + "top_level": {"name": "top", "count": 1}, + "nested": { + "model": {"name": "nested", "count": 2}, + "list": [{"name": "list1", "count": 3}, {"name": "list2", "count": 4}], + }, + "matrix": [ + [{"name": "m11", "count": 11}, {"name": "m12", "count": 12}], + [{"name": "m21", "count": 21}, {"name": "m22", "count": 22}], + ], + "mixed": [{"model": {"name": "mixed", "count": 5}}, [{"name": "array", "count": 6}]], + } + + +# ----- Dictionary Serialization Tests ----- + + +def test_serialize_dict_with_model_values(): + """Test serializing a dictionary with model values.""" + client = TestApiClient() + + data = { + "model1": SimpleModel(name="first", count=1), + "model2": SimpleModel(name="second", count=2), + } + + result = serialize_and_deserialize(client, data) + assert result == { + "model1": {"name": "first", "count": 1}, + "model2": {"name": "second", "count": 2}, + } + + +def test_serialize_dict_with_mixed_values(): + """Test serializing a dictionary with a mix of model and non-model values.""" + client = TestApiClient() + + data = { + "model": SimpleModel(name="model", count=1), + "string": "text value", + "number": 42, + "boolean": True, + "array": [1, 2, 3], + "nested_array": [SimpleModel(name="nested", count=2)], + } + + result = serialize_and_deserialize(client, data) + assert result == { + "model": {"name": "model", "count": 1}, + "string": "text value", + "number": 42, + "boolean": True, + "array": [1, 2, 3], + "nested_array": [{"name": "nested", "count": 2}], + } + + +def test_serialize_dict_with_nested_dicts(): + """Test serializing a dictionary with nested dictionaries containing models.""" + client = TestApiClient() + + data = {"level1": {"level2": {"model": SimpleModel(name="deeply_nested", count=42)}}} + + result = serialize_and_deserialize(client, data) + assert result == {"level1": {"level2": {"model": {"name": "deeply_nested", "count": 42}}}} + + +# ----- Special Cases and Edge Cases ----- + + +def test_serialize_model_with_alias(): + """Test serializing a model with field aliases.""" + client = TestApiClient() + + class ModelWithAlias(pydantic.BaseModel): + user_id: str = pydantic.Field(alias="userId") + created_at: datetime = pydantic.Field(alias="createdAt") + + model = ModelWithAlias(userId="test-user", createdAt=datetime(2023, 1, 1, tzinfo=timezone.utc)) + + result = serialize_and_deserialize(client, model) + # Should use the aliases in the output JSON + assert "userId" in result + assert "createdAt" in result + assert "user_id" not in result + assert "created_at" not in result + + +def test_serialize_cyclic_references(): + """Test that serializing cyclic references raises an exception.""" + client = TestApiClient() + + # Create a cyclic reference + a = {} + b = {"a": a} + a["b"] = b + + with pytest.raises((TypeError, ValueError)): + client._serialize(a) + + +def test_serialize_datetime_values(): + """Test serializing datetime values in models.""" + client = TestApiClient() + + # UTC datetime + utc_dt = datetime(2023, 1, 1, 12, 0, 0, tzinfo=timezone.utc) + model = ComplexModel(id="test", date=utc_dt, nested=SimpleModel(name="test", count=1)) + + result = serialize_and_deserialize(client, model) + assert result["date"] == "2023-01-01T12:00:00+00:00" + + # Non-UTC datetime + est_tz = timezone(timedelta(hours=-5)) + est_dt = datetime(2023, 1, 1, 7, 0, 0, tzinfo=est_tz) + model = ComplexModel(id="test", date=est_dt, nested=SimpleModel(name="test", count=1)) + + result = serialize_and_deserialize(client, model) + # Should be normalized to UTC in ISO format + assert result["date"] == "2023-01-01T12:00:00+00:00" + + +def test_serialize_real_world_complex_payload(): + """Test serializing a complex real-world-like request payload.""" + client = TestApiClient() + + # Create a complex nested payload similar to what might be used in a real API + class Address(pydantic.BaseModel): + street: str + city: str + postal_code: str + country: str + + class Contact(pydantic.BaseModel): + email: str + phone: Optional[str] = None + + class User(pydantic.BaseModel): + id: str + name: str + address: Address + contacts: List[Contact] + is_active: bool = True + created_at: datetime + last_login: Optional[datetime] = None + preferences: Dict[str, Any] = {} + + class OrderItem(pydantic.BaseModel): + product_id: str = pydantic.Field(alias="productId") + quantity: int + unit_price: float = pydantic.Field(alias="unitPrice") + + class Order(pydantic.BaseModel): + id: str + user: User + items: List[OrderItem] + total_amount: float = pydantic.Field(alias="totalAmount") + status: Literal["pending", "processing", "shipped", "delivered"] + shipping_address: Optional[Address] = pydantic.Field(alias="shippingAddress", default=None) + + # Create an instance with deeply nested structure + order = Order( + id="order-123", + user=User( + id="user-456", + name="John Doe", + address=Address( + street="123 Main St", city="Anytown", postal_code="12345", country="USA" + ), + contacts=[ + Contact(email="john@example.com", phone="+1234567890"), + Contact(email="johndoe@work.com"), + ], + created_at=datetime(2022, 1, 1, tzinfo=timezone.utc), + preferences={"theme": "dark", "notifications": True}, + ), + items=[ + OrderItem(productId="prod-1", quantity=2, unitPrice=29.99), + OrderItem(productId="prod-2", quantity=1, unitPrice=49.99), + ], + totalAmount=109.97, + status="processing", + shippingAddress=Address( + street="456 Shipping Ave", city="Shipville", postal_code="54321", country="USA" + ), + ) + + result = serialize_and_deserialize(client, order) + + # Validate the structure and content of the serialized data + assert result["id"] == "order-123" + assert result["user"]["name"] == "John Doe" + assert result["user"]["address"]["city"] == "Anytown" + assert result["user"]["contacts"][0]["email"] == "john@example.com" + assert result["user"]["contacts"][1].get("phone") is None + assert result["items"][0]["productId"] == "prod-1" + assert result["totalAmount"] == 109.97 + assert result["status"] == "processing" + assert result["shippingAddress"]["street"] == "456 Shipping Ave" + + # Check that aliases are properly used + assert "productId" in result["items"][0] + assert "product_id" not in result["items"][0] + assert "totalAmount" in result + assert "total_amount" not in result + assert "shippingAddress" in result + assert "shipping_address" not in result diff --git a/tests/test_client_init_helpers.py b/tests/test_client_init_helpers.py new file mode 100644 index 000000000..57c472736 --- /dev/null +++ b/tests/test_client_init_helpers.py @@ -0,0 +1,154 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import os +from contextvars import ContextVar +from typing import Optional +from unittest.mock import patch + +from expects import equal +from expects import expect +from expects import raise_error + +from foundry_sdk._core.client_init_helpers import ( + get_hostname_from_context_or_environment_vars, +) # NOQA +from foundry_sdk._core.client_init_helpers import ( + get_user_token_auth_from_context_or_environment_vars, +) # NOQA +from foundry_sdk._core.context_and_environment_vars import HOSTNAME_ENV_VAR +from foundry_sdk._core.context_and_environment_vars import HOSTNAME_VAR +from foundry_sdk._core.context_and_environment_vars import TOKEN_ENV_VAR +from foundry_sdk._core.context_and_environment_vars import TOKEN_VAR +from foundry_sdk._core.context_and_environment_vars import _maybe_get_environment_var +from foundry_sdk._core.context_and_environment_vars import maybe_get_context_var +from foundry_sdk._core.context_and_environment_vars import ( + maybe_get_value_from_context_or_environment_vars, +) # NOQA +from foundry_sdk._errors.environment_not_configured import EnvironmentNotConfigured + +CONTEXT_VAR1: ContextVar[Optional[str]] = ContextVar("CONTEXT VAR1", default=None) +CONTEXT_VAR2: ContextVar[Optional[str]] = ContextVar("CONTEXT VAR2", default=None) + + +def test_maybe_get_context_var(): + example_context_vars = [CONTEXT_VAR1, CONTEXT_VAR2] + + CONTEXT_VAR2.set("context_var 2") + expect(maybe_get_context_var(context_vars=example_context_vars)).to(equal("context_var 2")) + CONTEXT_VAR2.set(None) + + CONTEXT_VAR1.set("context_var 1") + CONTEXT_VAR2.set("context_var 2") + expect(maybe_get_context_var(context_vars=example_context_vars)).to(equal("context_var 1")) + CONTEXT_VAR1.set(None) + CONTEXT_VAR2.set(None) + + +def test_maybe_get_environment_var(): + example_env_vars = ["ENV VAR1", "ENV VAR2", "ENV VAR3"] + + with patch.dict(os.environ, {"ENV VAR3": "environment_var 3"}): + expect(_maybe_get_environment_var(env_vars=example_env_vars)).to(equal("environment_var 3")) + with patch.dict(os.environ, {"ENV VAR1": "environment_var 1", "ENV VAR3": "environment_var 3"}): + expect(_maybe_get_environment_var(env_vars=example_env_vars)).to(equal("environment_var 1")) + + +def test_get_value_from_context_or_env(): + # Test case 1: Context variable is set + CONTEXT_VAR1.set("context_var") + expect( + maybe_get_value_from_context_or_environment_vars( + context_vars=[CONTEXT_VAR1], env_vars=["ENV_VAR_NAME"] + ) + ).to(equal("context_var")) + CONTEXT_VAR1.set(None) + + # Test case 2: Context variable is not set and FOUNDRY_HOSTNAME environment variable is set + with patch.dict(os.environ, {"ENV_VAR_NAME": "environment_var"}): + expect( + maybe_get_value_from_context_or_environment_vars( + context_vars=[CONTEXT_VAR1], env_vars=["ENV_VAR_NAME"] + ) + ).to(equal("environment_var")) + + # Test case 3: Both Context variable and environment variable are not set + expect( + maybe_get_value_from_context_or_environment_vars( + context_vars=[CONTEXT_VAR1], env_vars=["ENV_VAR_NAME"] + ) + ).to(equal(None)) + + # Test case 4: Test context vars are used before env vars + CONTEXT_VAR1.set("context_var") + with patch.dict(os.environ, {"ENV_VAR_NAME": "environment_var"}): + expect( + maybe_get_value_from_context_or_environment_vars( + context_vars=[CONTEXT_VAR1], env_vars=["ENV_VAR_NAME"] + ) + ).to(equal("context_var")) + CONTEXT_VAR1.set(None) + + +def test_get_hostname_from_context_or_environment_vars(): + # Test case 1: Context variable is set + HOSTNAME_VAR.set("hostname_context_var") + expect(get_hostname_from_context_or_environment_vars()).to(equal("hostname_context_var")) + HOSTNAME_VAR.set(None) + + # Test case 2: Context variable is not set and environment variable is set + with patch.dict(os.environ, {HOSTNAME_ENV_VAR: "hostname_environment_var"}): + expect(get_hostname_from_context_or_environment_vars()).to( + equal("hostname_environment_var") + ) + + # Test case 3: Both Context variable and environment variable are not set + expect(lambda: get_hostname_from_context_or_environment_vars()).to( + raise_error(EnvironmentNotConfigured) + ) + + # Test case 4: Test Context variables are used before environment variables + HOSTNAME_VAR.set("hostname_context_var") + with patch.dict(os.environ, {HOSTNAME_ENV_VAR: "hostname_environment_var"}): + expect(get_hostname_from_context_or_environment_vars()).to(equal("hostname_context_var")) + HOSTNAME_VAR.set(None) + + +def test_get_user_token_auth_from_context_or_environment_vars(): + # Test case 1: Context variable is set + TOKEN_VAR.set("user_token_context_var") + expect(get_user_token_auth_from_context_or_environment_vars().get_token().access_token).to( + equal("user_token_context_var") + ) + TOKEN_VAR.set(None) + + # Test case 2: Context variable is not set and environment variable is set + with patch.dict(os.environ, {TOKEN_ENV_VAR: "user_token_environment_var"}): + expect(get_user_token_auth_from_context_or_environment_vars().get_token().access_token).to( + equal("user_token_environment_var") + ) + + # Test case 3: Both Context variable and environment variable are not set + expect(lambda: get_user_token_auth_from_context_or_environment_vars()).to( + raise_error(EnvironmentNotConfigured) + ) + + # Test case 4: Test Context variables are used before environment variables + TOKEN_VAR.set("user_token_context_var") + with patch.dict(os.environ, {TOKEN_ENV_VAR: "user_token_environment_var"}): + expect(get_user_token_auth_from_context_or_environment_vars().get_token().access_token).to( + equal("user_token_context_var") + ) + TOKEN_VAR.set(None) diff --git a/tests/test_datetime.py b/tests/test_datetime.py new file mode 100644 index 000000000..02c94e5b4 --- /dev/null +++ b/tests/test_datetime.py @@ -0,0 +1,27 @@ +from datetime import datetime +from datetime import timezone + +import pydantic +import pytest + + +class Model(pydantic.BaseModel): + datetype: pydantic.AwareDatetime + + +def test_init_fails_without_timezone(): + with pytest.raises(pydantic.ValidationError): + Model(datetype=datetime.now()) + + +def test_validate_python_fails_without_timezone(): + with pytest.raises(pydantic.ValidationError): + Model.model_validate({"datetype": "2022-01-01T00:00:00"}) + + +def test_init_passes_with_timezone(): + Model(datetype=datetime.now(tz=timezone.utc)) + + +def test_validate_python_passes_with_timezone(): + Model.model_validate({"datetype": "2022-01-01T00:00:00Z"}) diff --git a/tests/test_discriminators.py b/tests/test_discriminators.py new file mode 100644 index 000000000..42e712895 --- /dev/null +++ b/tests/test_discriminators.py @@ -0,0 +1,102 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import pydantic +import pytest + +from foundry_sdk.v1.core import models as models_core_v1 +from foundry_sdk.v1.datasets import models as models_datasets_v1 +from foundry_sdk.v1.geo import models as models_geo_v1 +from foundry_sdk.v1.ontologies import models as models_ontologies_v1 +from foundry_sdk.v2.admin import models as models_admin_v2 +from foundry_sdk.v2.aip_agents import models as models_aip_agents_v2 +from foundry_sdk.v2.audit import models as models_audit_v2 +from foundry_sdk.v2.connectivity import models as models_connectivity_v2 +from foundry_sdk.v2.core import models as models_core_v2 +from foundry_sdk.v2.data_health import models as models_data_health_v2 +from foundry_sdk.v2.datasets import models as models_datasets_v2 +from foundry_sdk.v2.filesystem import models as models_filesystem_v2 +from foundry_sdk.v2.functions import models as models_functions_v2 +from foundry_sdk.v2.geo import models as models_geo_v2 +from foundry_sdk.v2.language_models import models as models_language_models_v2 +from foundry_sdk.v2.media_sets import models as models_media_sets_v2 +from foundry_sdk.v2.models import models as models_models_v2 +from foundry_sdk.v2.ontologies import models as models_ontologies_v2 +from foundry_sdk.v2.orchestration import models as models_orchestration_v2 +from foundry_sdk.v2.sql_queries import models as models_sql_queries_v2 +from foundry_sdk.v2.streams import models as models_streams_v2 +from foundry_sdk.v2.third_party_applications import ( + models as models_third_party_applications_v2, +) # NOQA +from foundry_sdk.v2.widgets import models as models_widgets_v2 + + +def test_can_validate_types(): + """ + The discriminators types are difficult to construct. This test ensures + that all discriminators are importable without raising any issues. + """ + + for models, model_name in [ + *[(models_core_v1, model_name) for model_name in dir(models_core_v1)], + *[(models_datasets_v1, model_name) for model_name in dir(models_datasets_v1)], + *[(models_geo_v1, model_name) for model_name in dir(models_geo_v1)], + *[(models_ontologies_v1, model_name) for model_name in dir(models_ontologies_v1)], + *[(models_admin_v2, model_name) for model_name in dir(models_admin_v2)], + *[(models_aip_agents_v2, model_name) for model_name in dir(models_aip_agents_v2)], + *[(models_audit_v2, model_name) for model_name in dir(models_audit_v2)], + *[(models_connectivity_v2, model_name) for model_name in dir(models_connectivity_v2)], + *[(models_core_v2, model_name) for model_name in dir(models_core_v2)], + *[(models_data_health_v2, model_name) for model_name in dir(models_data_health_v2)], + *[(models_datasets_v2, model_name) for model_name in dir(models_datasets_v2)], + *[(models_filesystem_v2, model_name) for model_name in dir(models_filesystem_v2)], + *[(models_functions_v2, model_name) for model_name in dir(models_functions_v2)], + *[(models_geo_v2, model_name) for model_name in dir(models_geo_v2)], + *[(models_language_models_v2, model_name) for model_name in dir(models_language_models_v2)], + *[(models_media_sets_v2, model_name) for model_name in dir(models_media_sets_v2)], + *[(models_models_v2, model_name) for model_name in dir(models_models_v2)], + *[(models_ontologies_v2, model_name) for model_name in dir(models_ontologies_v2)], + *[(models_orchestration_v2, model_name) for model_name in dir(models_orchestration_v2)], + *[(models_sql_queries_v2, model_name) for model_name in dir(models_sql_queries_v2)], + *[(models_streams_v2, model_name) for model_name in dir(models_streams_v2)], + *[ + (models_third_party_applications_v2, model_name) + for model_name in dir(models_third_party_applications_v2) + ], + *[(models_widgets_v2, model_name) for model_name in dir(models_widgets_v2)], + ]: + klass = getattr(models, model_name) + + if "Annotated[Union[" not in str(klass): + continue + + try: + ta = pydantic.TypeAdapter(klass) + except pydantic.PydanticUndefinedAnnotation as e: + print(model_name, str(klass)) + raise e + + with pytest.raises(pydantic.ValidationError) as error: + ta.validate_python({}) + + assert error.value.errors(include_url=False) == [ + { + "type": "union_tag_not_found", + "loc": (), + "msg": "Unable to extract tag using discriminator 'type'", + "input": {}, + "ctx": {"discriminator": "'type'"}, + } + ] diff --git a/tests/test_errors.py b/tests/test_errors.py new file mode 100644 index 000000000..8862c5152 --- /dev/null +++ b/tests/test_errors.py @@ -0,0 +1,50 @@ +import warnings + +import pytest + +from foundry_sdk import PalantirRPCException +from foundry_sdk._errors.utils import deserialize_error +from foundry_sdk.v1.datasets.errors import BranchNotFound + + +class MockError(PalantirRPCException): + def __init__(self, name): + super().__init__(name) + + +ERRORS_MAP = { + "MockError": MockError, + "BranchNotFound": BranchNotFound, +} + + +def test_correctly_deserializes_error(): + error = deserialize_error( + { + "errorName": "BranchNotFound", + "errorInstanceId": "123", + "parameters": {"datasetRid": "ri.a.b.c.d", "branchId": "main"}, + }, + ERRORS_MAP, + ) + + assert isinstance(error, PalantirRPCException) + assert isinstance(error, BranchNotFound) + assert error.name == "BranchNotFound" + assert error.error_instance_id == "123" + assert error.parameters == {"datasetRid": "ri.a.b.c.d", "branchId": "main"} + + +def test_falls_back_to_standard_if_parsing_fails(): + with warnings.catch_warnings(record=True) as w: + error = deserialize_error( + { + "errorName": "BranchNotFound", + "errorInstanceId": "123", + "parameters": {"datasetRid": "ri.a.b.c.d", "branchId": 123}, + }, + ERRORS_MAP, + ) + + assert len(w) == 1 + assert error is None diff --git a/tests/test_exception.py b/tests/test_exception.py new file mode 100644 index 000000000..41065a3ec --- /dev/null +++ b/tests/test_exception.py @@ -0,0 +1,108 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import inspect +import json +import re +import sys +from types import ModuleType +from typing import List +from typing import Type + +import pydantic +import pytest + +from foundry_sdk import _errors +from foundry_sdk._errors.palantir_rpc_exception import PalantirRPCException +from foundry_sdk._errors.sdk_internal_error import PalantirException +from foundry_sdk._errors.sdk_internal_error import SDKInternalError +from foundry_sdk._errors.sdk_internal_error import handle_unexpected + + +def find_exception_subclasses(module: ModuleType) -> List[Type[Exception]]: + exception_subclasses = [] + + # Get all members of the module + members = inspect.getmembers(module) + + for name, obj in members: + # Check if the member is a class + if inspect.isclass(obj): + # Check if the class is a subclass of Exception + if issubclass(obj, Exception): + exception_subclasses.append(obj) + + return exception_subclasses + + +def test_sdk_internal_error(): + with pytest.raises(SDKInternalError) as error: + raise SDKInternalError("test") + + assert ( + re.match( + r"""^test\n +This is an unexpected issue and should be reported. When filing an issue, make sure to copy the package information listed below.\n +OS: \w+ +Python Version: \d+\.\d+\.\d+[^\n]+ +SDK Version: \d+\.\d+\.\d+ +OpenAPI Document Version: \d+\.\d+\.\d+ +Pydantic Version: \d+\.\d+\.\d+ +Pydantic Core Version: \d+\.\d+\.\d+ +Httpx Version: \d+\.\d+\.\d+ +$""", + str(error.value), + ) + is not None + ), "Mismatch with text: " + str(error.value) + + +def test_handle_unexpected_fails_for_unkonwn_exception(): + @handle_unexpected + def raises_unknown_exception(): + raise ValueError("test") + + with pytest.raises(SDKInternalError) as error: + raises_unknown_exception() + + assert error.value.msg == "test" + + +def test_all_errors_subclass_palantir_exception(): + classes = find_exception_subclasses(_errors) + assert len(classes) >= 5 # sanity check we are finding the classes + for klass in find_exception_subclasses(_errors): + assert issubclass(klass, PalantirException) + + +def test_handle_unexpected_ignores_palantir_exception(): + @handle_unexpected + def raises_known_exception(): + raise PalantirException("Foo") + + with pytest.raises(PalantirException): + raises_known_exception() + + +def test_handle_unexpected_ignores_validation_error(): + class Model(pydantic.BaseModel): + foo: str + + @handle_unexpected + def raises_known_exception(): + Model.model_validate({"foo": 123}) + + with pytest.raises(pydantic.ValidationError): + raises_known_exception() diff --git a/tests/test_http_client.py b/tests/test_http_client.py new file mode 100644 index 000000000..31397fcbc --- /dev/null +++ b/tests/test_http_client.py @@ -0,0 +1,333 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import os +import ssl +import sys +from typing import Any +from typing import Optional +from typing import Type +from typing import TypeVar +from unittest.mock import patch + +import httpcore +import httpx +import pytest +from httpx._utils import URLPattern + +from foundry_sdk._core.config import Config +from foundry_sdk._core.http_client import AsyncHttpClient +from foundry_sdk._core.http_client import HttpClient +from foundry_sdk._versions import __version__ + + +def assert_http_transport(transport: Optional[httpx.BaseTransport]) -> httpx.HTTPTransport: + return assert_isinstance(transport, httpx.HTTPTransport) + + +def assert_async_http_transport( + transport: Optional[httpx.AsyncBaseTransport], +) -> httpx.AsyncHTTPTransport: + return assert_isinstance(transport, httpx.AsyncHTTPTransport) + + +def assert_http_proxy(pool: Optional[httpcore.ConnectionPool]) -> httpcore.HTTPProxy: + return assert_isinstance(pool, httpcore.HTTPProxy) + + +def assert_async_http_proxy( + pool: Optional[httpcore.AsyncConnectionPool], +) -> httpcore.AsyncHTTPProxy: + return assert_isinstance(pool, httpcore.AsyncHTTPProxy) + + +T = TypeVar("T") + + +def assert_isinstance(instance: Any, type: Type[T]) -> T: + if not isinstance(instance, type): + raise Exception(f"Not an instance of {type}", instance) + + return instance + + +def create_client(config: Optional[Config] = None): + config = config or Config() + return HttpClient("localhost:8123", config=config) + + +def create_async_client(config: Optional[Config] = None): + config = config or Config() + return AsyncHttpClient("localhost:8123", config=config) + + +def test_clean_hostname(): + assert HttpClient("http://example.com").base_url.host == "example.com" + assert HttpClient("https://example.com").base_url.host == "example.com" + assert HttpClient("example.com/").base_url.host == "example.com" + assert HttpClient("example.com").base_url.host == "example.com" + + +@pytest.fixture +def tmp_cert(tmp_path): + cert_file = tmp_path / "cert.pem" + cert_file.write_text("cert") + yield cert_file.as_posix() + + +@pytest.fixture +def tmp_cert_dupe(tmp_path): + cert_file = tmp_path / "cert.pem" + cert_file.write_text("cert") + yield cert_file.as_posix() + + +@pytest.fixture +def patch_ssl_verify(): + with patch.object(ssl.SSLContext, "load_verify_locations") as mock_method: + # You can specify a return value or a side effect if needed + mock_method.return_value = None # Example: make it do nothing + yield mock_method + + +@pytest.fixture +def temp_os_env(): + old_environ = os.environ.copy() + + # Make sure to start with a clean slate + for key in ["REQUESTS_CA_BUNDLE", "SSL_CERT_FILE"]: + if key in os.environ: + os.environ.pop(key) + + yield os.environ + os.environ = old_environ + + +def test_requests_env_var(temp_os_env, patch_ssl_verify, tmp_cert: str): + temp_os_env["REQUESTS_CA_BUNDLE"] = tmp_cert + assert create_client(Config(verify=True))._verify == tmp_cert + + +def test_ssl_cert_file_env_var(temp_os_env, patch_ssl_verify, tmp_cert: str): + temp_os_env["SSL_CERT_FILE"] = tmp_cert + assert create_client(Config(verify=True))._verify == tmp_cert + + +def test_verify_false_env_var(temp_os_env, patch_ssl_verify, tmp_cert: str): + temp_os_env["REQUESTS_CA_BUNDLE"] = tmp_cert + assert create_client(Config(verify=False))._verify == False + + +def test_cert_path_takes_precedence(temp_os_env, patch_ssl_verify, tmp_cert: str, tmp_cert_dupe): + temp_os_env["REQUESTS_CA_BUNDLE"] = tmp_cert + assert create_client(Config(verify=tmp_cert_dupe))._verify == tmp_cert_dupe + + +def test_default_headers(): + """Test that the user agent is set correctly.""" + client = create_client() + assert client.headers == { + "Accept-Encoding": "gzip, deflate", + "Accept": "*/*", + "Connection": "keep-alive", + "User-Agent": f"python-foundry-platform-sdk/{__version__} python/3.{sys.version_info.minor}", + } + + """Test that additional headers can be added.""" + client = create_client(Config(default_headers={"Foo": "Bar"})) + assert client.headers == { + "Accept-Encoding": "gzip, deflate", + "Accept": "*/*", + "Connection": "keep-alive", + "Foo": "Bar", + "User-Agent": f"python-foundry-platform-sdk/{__version__} python/3.{sys.version_info.minor}", + } + + +def test_proxies(): + client = create_client(Config(proxies={"https": "https://foo.bar", "http": "http://foo.bar"})) + + transport = assert_http_transport(client._mounts[URLPattern("https://")]) + proxy = assert_http_proxy(transport._pool) + assert proxy._ssl_context is not None + assert proxy._ssl_context.verify_mode == ssl.VerifyMode.CERT_REQUIRED + assert proxy._proxy_ssl_context is not None + assert proxy._proxy_ssl_context.verify_mode == ssl.VerifyMode.CERT_REQUIRED + assert proxy._proxy_url.scheme == b"https" + assert proxy._proxy_url.host == b"foo.bar" + + transport = assert_http_transport(client._mounts[URLPattern("http://")]) + proxy = assert_http_proxy(transport._pool) + assert proxy._ssl_context is not None + assert proxy._ssl_context.verify_mode == ssl.VerifyMode.CERT_REQUIRED + assert proxy._proxy_ssl_context is None + assert proxy._proxy_url.scheme == b"http" + assert proxy._proxy_url.host == b"foo.bar" + + +def test_bad_proxy_url(): + with pytest.raises(ValueError): + create_client(Config(proxies={"https": "htts://foo.bar"})) + + +def test_timeout(): + client = create_client(config=Config(timeout=60)) + assert client.timeout == httpx.Timeout(60) + + +def test_verify_configures_transport(): + client = create_client() + transport = assert_http_transport(client._transport) + pool = assert_isinstance(transport._pool, httpcore.ConnectionPool) + + assert pool._ssl_context is not None + assert pool._ssl_context.verify_mode == ssl.VerifyMode.CERT_REQUIRED + + client = create_client(Config(verify=False)) + transport = assert_http_transport(client._transport) + pool = assert_isinstance(transport._pool, httpcore.ConnectionPool) + + assert pool._ssl_context is not None + assert pool._ssl_context.verify_mode == ssl.VerifyMode.CERT_NONE + + +def test_default_params(): + client = create_client(Config(default_params={"foo": "bar"})) + assert client.params._dict == {"foo": ["bar"]} + + +def test_scheme(): + client = create_client() + assert str(client.base_url) == "https://localhost:8123" + + client = create_client(Config(scheme="http")) + assert str(client.base_url) == "http://localhost:8123" + + +def test_async_headers(): + client = create_async_client(Config(default_headers={"Foo": "Bar", "User-Agent": "Baz"})) + assert client.headers == { + "Accept-Encoding": "gzip, deflate", + "Accept": "*/*", + "Connection": "keep-alive", + "Foo": "Bar", + "User-Agent": "Baz", + } + + +def test_async_bad_proxy_url(): + with pytest.raises(ValueError): + create_async_client(Config(proxies={"https": "htts://foo.bar"})) + + +def test_async_timeout(): + client = create_async_client(config=Config(timeout=60)) + assert client.timeout == httpx.Timeout(60) + + +def test_async_verify_configures_transport(): + client = create_async_client() + transport = assert_async_http_transport(client._transport) + pool = assert_isinstance(transport._pool, httpcore.AsyncConnectionPool) + + assert pool._ssl_context is not None + assert pool._ssl_context.verify_mode == ssl.VerifyMode.CERT_REQUIRED + + client = create_async_client(Config(verify=False)) + transport = assert_async_http_transport(client._transport) + pool = assert_isinstance(transport._pool, httpcore.AsyncConnectionPool) + + assert pool._ssl_context is not None + assert pool._ssl_context.verify_mode == ssl.VerifyMode.CERT_NONE + + +def test_async_default_params(): + client = create_async_client(Config(default_params={"foo": "bar"})) + assert client.params._dict == {"foo": ["bar"]} + + +def test_async_scheme(): + client = create_async_client() + assert str(client.base_url) == "https://localhost:8123" + + client = create_client(Config(scheme="http")) + assert str(client.base_url) == "http://localhost:8123" + + +def test_attribution_header_present(): + """Test that attribution header is added when context var is set.""" + from foundry_sdk._core.context_and_environment_vars import ATTRIBUTION_VAR + + # Save the original value to restore after test + original_value = ATTRIBUTION_VAR.get() + + try: + # Set attribution value + ATTRIBUTION_VAR.set(["test-attribution-source"]) + + # Create client and check headers + client = create_client() + assert "attribution" in client.headers + assert client.headers["attribution"] == "test-attribution-source" + + # Test with multiple attribution values + ATTRIBUTION_VAR.set(["source1", "source2"]) + client = create_client() + assert client.headers["attribution"] == "source1, source2" + finally: + # Restore original value + ATTRIBUTION_VAR.set(original_value) + + +def test_attribution_header_not_present(): + """Test that attribution header is not added when context var is None.""" + from foundry_sdk._core.context_and_environment_vars import ATTRIBUTION_VAR + + # Save the original value to restore after test + original_value = ATTRIBUTION_VAR.get() + + try: + # Set attribution value to None + ATTRIBUTION_VAR.set(None) + + # Create client and check headers + client = create_client() + assert "attribution" not in client.headers + finally: + # Restore original value + ATTRIBUTION_VAR.set(original_value) + + +def test_async_proxies(): + client = create_async_client( + Config(proxies={"https": "https://foo.bar", "http": "http://foo.bar"}) + ) + + transport = assert_async_http_transport(client._mounts[URLPattern("https://")]) + proxy = assert_async_http_proxy(transport._pool) + assert proxy._ssl_context is not None + assert proxy._ssl_context.verify_mode == ssl.VerifyMode.CERT_REQUIRED + assert proxy._proxy_ssl_context is not None + assert proxy._proxy_ssl_context.verify_mode == ssl.VerifyMode.CERT_REQUIRED + assert proxy._proxy_url.scheme == b"https" + assert proxy._proxy_url.host == b"foo.bar" + + transport = assert_async_http_transport(client._mounts[URLPattern("http://")]) + proxy = assert_async_http_proxy(transport._pool) + assert proxy._ssl_context is not None + assert proxy._ssl_context.verify_mode == ssl.VerifyMode.CERT_REQUIRED + assert proxy._proxy_ssl_context is None + assert proxy._proxy_url.scheme == b"http" + assert proxy._proxy_url.host == b"foo.bar" diff --git a/tests/test_model_base.py b/tests/test_model_base.py new file mode 100644 index 000000000..87cc8d296 --- /dev/null +++ b/tests/test_model_base.py @@ -0,0 +1,288 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import warnings +from typing import Any +from typing import Dict +from typing import List +from typing import Optional +from typing import Set +from typing import Tuple + +import pytest + +from foundry_sdk._core import ModelBase + + +def test_can_be_used_as_dict_key() -> None: + """Test that ModelBase objects can be used as dictionary keys.""" + + class TestModel(ModelBase): + name: str + age: int + + model1 = TestModel(name="Alice", age=30) + model2 = TestModel(name="Alice", age=30) # Same data as model1 + model3 = TestModel(name="Bob", age=25) # Different data + + # Models with same content should be equal + assert model1 == model2 + assert model1 != model3 + + # Models with same content should have same hash + assert hash(model1) == hash(model2) + assert hash(model1) != hash(model3) + + # Use models as dict keys + data = {} + data[model1] = "First model" + data[model3] = "Third model" + + # Should retrieve by equivalent object + assert data[model2] == "First model" + assert len(data) == 2 + + +def test_hash_value_cached() -> None: + """Test that hash value is calculated only once and cached.""" + + class SimpleModel(ModelBase): + value: str + + model = SimpleModel(value="test") + + # Access hash first time - should calculate + hash1 = hash(model) + + # Access hash second time - should use cached value + hash2 = hash(model) + + assert hash1 == hash2 + assert model._hash_called is True + assert model._hash_value == hash1 + + +def test_warns_on_mutation_after_hash() -> None: + """Test that a warning is issued when a model is modified after being hashed.""" + + class MutableModel(ModelBase): + value: str + count: int = 0 + + model = MutableModel(value="original") + + # Use as dict key to trigger hash calculation + data = {model: "some value"} + + # Should warn when modified after hash + with pytest.warns( + UserWarning, match="Modifying MutableModel after it has been used as a dictionary key" + ): + model.value = "changed" + + # Hash value should be reset + assert model._hash_value is None + + # Re-hashing should work + new_hash = hash(model) + + # But we can add it back + data[model] = "updated value" + assert data[model] == "updated value" + + +def test_hash_includes_class_identity() -> None: + """Test that models with identical attributes but different classes have different hashes.""" + + class UserModel(ModelBase): + name: str + age: int + + class PersonModel(ModelBase): + name: str + age: int + + user = UserModel(name="Alice", age=30) + person = PersonModel(name="Alice", age=30) + + # Despite having identical attributes, hashes should differ due to class identity + assert hash(user) != hash(person) + + # Dictionaries should treat them as separate keys + data = {} + data[user] = "User data" + data[person] = "Person data" + + assert len(data) == 2 + assert data[user] == "User data" + assert data[person] == "Person data" + + +def test_hash_with_different_data_structures() -> None: + """Test that models with different data structures hash correctly.""" + + class StructuredModel(ModelBase): + tuple_field: Tuple[str, int] + list_field: List[str] + dict_field: Dict[str, Any] + set_field: Set[int] + + model1 = StructuredModel( + tuple_field=("hello", 42), + list_field=["a", "b", "c"], + dict_field={"key1": "value1", "key2": 123}, + set_field={1, 2, 3}, + ) + + model2 = StructuredModel( + tuple_field=("hello", 42), + list_field=["a", "b", "c"], + dict_field={"key1": "value1", "key2": 123}, + set_field={1, 2, 3}, + ) + + # Models with identical content should have same hash + assert hash(model1) == hash(model2) + + # Changing a tuple element should result in a different hash + model3 = StructuredModel( + tuple_field=("world", 42), # Different first element + list_field=["a", "b", "c"], + dict_field={"key1": "value1", "key2": 123}, + set_field={1, 2, 3}, + ) + assert hash(model1) != hash(model3) + + # Changing list order should result in a different hash + model4 = StructuredModel( + tuple_field=("hello", 42), + list_field=["a", "c", "b"], # Different order + dict_field={"key1": "value1", "key2": 123}, + set_field={1, 2, 3}, + ) + assert hash(model1) != hash(model4) + + # Adding a dict key should result in a different hash + model5 = StructuredModel( + tuple_field=("hello", 42), + list_field=["a", "b", "c"], + dict_field={"key1": "value1", "key2": 123, "key3": True}, # Additional key + set_field={1, 2, 3}, + ) + assert hash(model1) != hash(model5) + + # Changing set elements should result in a different hash + model6 = StructuredModel( + tuple_field=("hello", 42), + list_field=["a", "b", "c"], + dict_field={"key1": "value1", "key2": 123}, + set_field={1, 2, 4}, # 3 replaced with 4 + ) + assert hash(model1) != hash(model6) + + +def test_hash_with_nested_models() -> None: + """Test that models with nested model structures hash correctly.""" + + class Address(ModelBase): + street: str + city: str + postal_code: Optional[str] = None + + class Person(ModelBase): + name: str + address: Address + tags: List[str] + metadata: Dict[str, Any] + + # Create two models with identical nested structures + address1 = Address(street="123 Main St", city="Springfield") + person1 = Person( + name="Alice", + address=address1, + tags=["employee", "manager"], + metadata={"id": 123, "active": True}, + ) + + address2 = Address(street="123 Main St", city="Springfield") + person2 = Person( + name="Alice", + address=address2, + tags=["employee", "manager"], + metadata={"id": 123, "active": True}, + ) + + # Different address object but same content + assert address1 is not address2 + + # Models with identical content (including nested structures) should have same hash + assert hash(person1) == hash(person2) + + # Test a model with a different nested model + person3 = Person( + name="Alice", + address=Address(street="456 Elm St", city="Springfield"), # Different street + tags=["employee", "manager"], + metadata={"id": 123, "active": True}, + ) + + assert hash(person1) != hash(person3) + + # Test a model with nullable nested fields + address_with_postal = Address(street="123 Main St", city="Springfield", postal_code="12345") + person_with_postal = Person( + name="Alice", + address=address_with_postal, + tags=["employee", "manager"], + metadata={"id": 123, "active": True}, + ) + + assert hash(person1) != hash(person_with_postal) + + # Test with deeply nested structures + deeply_nested_person = Person( + name="Bob", + address=address1, + tags=["employee", "manager"], + metadata={ + "id": 456, + "active": True, + "history": { + "previous_roles": ["intern", "associate"], + "performance": {"2022": "Excellent", "2023": "Outstanding"}, + }, + }, + ) + + # Should be hashable despite complex nested structure + hash_value = hash(deeply_nested_person) + assert isinstance(hash_value, int) + + # Two identical deep structures should hash the same + deeply_nested_person2 = Person( + name="Bob", + address=address1, + tags=["employee", "manager"], + metadata={ + "id": 456, + "active": True, + "history": { + "previous_roles": ["intern", "associate"], + "performance": {"2022": "Excellent", "2023": "Outstanding"}, + }, + }, + ) + + assert hash(deeply_nested_person) == hash(deeply_nested_person2) diff --git a/tests/test_page_iterator.py b/tests/test_page_iterator.py new file mode 100644 index 000000000..0190f99bd --- /dev/null +++ b/tests/test_page_iterator.py @@ -0,0 +1,138 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +from typing import Any +from typing import AsyncIterator +from typing import Optional + +import pytest + +from foundry_sdk._core.page_iterator import AsyncPageIterator +from foundry_sdk._core.page_iterator import PageIterator + + +def create_page_func(total_items: int, default_page_size: int): + def page_function(page_size: Optional[int], next_page_token: Optional[str]): + page_size = page_size or default_page_size + next_page_token_int = int(next_page_token or "0") + + items = list(range(next_page_token_int, min(next_page_token_int + page_size, total_items))) + next_page_token = ( + str(next_page_token_int + page_size) + if next_page_token_int + page_size < total_items + else None + ) + + return (next_page_token, items) + + return page_function + + +def create_async_page_func(total_items: int, default_page_size: int): + async def page_function(page_size: Optional[int], next_page_token: Optional[str]): + page_size = page_size or default_page_size + next_page_token_int = int(next_page_token or "0") + + items = list(range(next_page_token_int, min(next_page_token_int + page_size, total_items))) + next_page_token = ( + str(next_page_token_int + page_size) + if next_page_token_int + page_size < total_items + else None + ) + + return (next_page_token, items) + + return page_function + + +def create_iterator(total_items: int, default_page_size: int): + return PageIterator[int](create_page_func(total_items, default_page_size)) + + +def create_async_iterator(total_items: int, default_page_size: int): + return AsyncPageIterator[int](create_async_page_func(total_items, default_page_size)) + + +def test_empty_iterator(): + iterator = create_iterator(0, 5) + assert iterator.data == [] + assert iterator.next_page_token is None + assert list(iterator) == [] + + +def test_iterator_with_one_item(): + iterator = create_iterator(1, 5) + assert iterator.data == [0] + assert iterator.next_page_token is None + assert list(iterator) == [] + + +def test_iterator_with_5_pages_of_5(): + iterator = create_iterator(25, 5) + + assert iterator.data == [0, 1, 2, 3, 4] + assert iterator.next_page_token == "5" + assert next(iterator) == [0, 1, 2, 3, 4] + assert iterator.next_page_token == "10" + + assert next(iterator) == [5, 6, 7, 8, 9] + assert iterator.next_page_token == "15" + + # Make sure it finishes the last 2 pages + assert len(list(iterator)) == 2 + + # And then confirm there is nothing left + with pytest.raises(StopIteration): + next(iterator) + + +async def alist(iterator: AsyncIterator[Any]) -> Any: + return [gen async for gen in iterator] + + +@pytest.mark.asyncio(scope="session") +async def test_empty_async_iterator(): + iterator = create_async_iterator(0, 5) + assert await iterator.get_data() == [] + assert await iterator.get_next_page_token() is None + assert await alist(iterator) == [[]] + + +@pytest.mark.asyncio(scope="session") +async def test_async_iterator_with_one_item(): + iterator = create_async_iterator(1, 5) + assert await iterator.get_data() == [0] + assert await iterator.get_next_page_token() is None + assert await alist(iterator) == [[0]] + + +@pytest.mark.asyncio(scope="session") +async def test_async_iterator_with_5_pages_of_5(): + iterator = create_async_iterator(25, 5) + + assert await iterator.get_data() == [0, 1, 2, 3, 4] + assert await iterator.get_next_page_token() == "5" + assert await iterator.__anext__() == [0, 1, 2, 3, 4] + assert await iterator.get_next_page_token() == "5" + + assert await iterator.__anext__() == [5, 6, 7, 8, 9] + assert await iterator.get_next_page_token() == "10" + + # Make sure it finishes the last 3 pages + assert len(await alist(iterator)) == 3 + + # And then confirm there is nothing left + with pytest.raises(StopAsyncIteration): + await iterator.__anext__() diff --git a/tests/test_performance.py b/tests/test_performance.py new file mode 100644 index 000000000..ce82416b9 --- /dev/null +++ b/tests/test_performance.py @@ -0,0 +1,423 @@ +import timeit + +import pytest + + +def test_import_v1_client_performance(): + import_time = timeit.timeit( + stmt="import foundry_sdk.v1", + setup="import sys; sys.modules.pop('foundry_sdk.v1', None);", + number=1, + ) + + assert import_time < 0.25 + + +def test_client_v1_initialization_performance(): + init_time = timeit.timeit( + stmt="foundry_sdk.v1.FoundryClient(foundry_sdk.UserTokenAuth(token='token'), hostname='localhost')", + setup="import sys; sys.modules.pop('foundry_sdk.v1', None);import foundry_sdk; import foundry_sdk.v1", + number=1, + ) + + assert init_time < 0.25 + + +def test_datasets_v1_client_access_performance(): + init_and_access_time = timeit.timeit( + stmt="foundry_sdk.v1.FoundryClient(foundry_sdk.UserTokenAuth(token='token'), hostname='localhost').datasets", + setup="import sys; sys.modules.pop('foundry_sdk.v1', None);import foundry_sdk; import foundry_sdk.v1", + number=1, + ) + + assert init_and_access_time < 0.5 + + +def test_datasets_v1_models_import_performance(): + init_and_access_time = timeit.timeit( + stmt="import foundry_sdk.v1.datasets.models", + setup="import sys; sys.modules.pop('foundry_sdk.v1.datasets.models', None)", + number=1, + ) + + assert init_and_access_time < 0.5 + + +def test_ontologies_v1_client_access_performance(): + init_and_access_time = timeit.timeit( + stmt="foundry_sdk.v1.FoundryClient(foundry_sdk.UserTokenAuth(token='token'), hostname='localhost').ontologies", + setup="import sys; sys.modules.pop('foundry_sdk.v1', None);import foundry_sdk; import foundry_sdk.v1", + number=1, + ) + + assert init_and_access_time < 0.5 + + +def test_ontologies_v1_models_import_performance(): + init_and_access_time = timeit.timeit( + stmt="import foundry_sdk.v1.ontologies.models", + setup="import sys; sys.modules.pop('foundry_sdk.v1.ontologies.models', None)", + number=1, + ) + + assert init_and_access_time < 0.5 + + +def test_import_v2_client_performance(): + import_time = timeit.timeit( + stmt="import foundry_sdk.v2", + setup="import sys; sys.modules.pop('foundry_sdk.v2', None);", + number=1, + ) + + assert import_time < 0.25 + + +def test_client_v2_initialization_performance(): + init_time = timeit.timeit( + stmt="foundry_sdk.v2.FoundryClient(foundry_sdk.UserTokenAuth(token='token'), hostname='localhost')", + setup="import sys; sys.modules.pop('foundry_sdk.v2', None);import foundry_sdk; import foundry_sdk.v2", + number=1, + ) + + assert init_time < 0.25 + + +def test_admin_v2_client_access_performance(): + init_and_access_time = timeit.timeit( + stmt="foundry_sdk.v2.FoundryClient(foundry_sdk.UserTokenAuth(token='token'), hostname='localhost').admin", + setup="import sys; sys.modules.pop('foundry_sdk.v2', None);import foundry_sdk; import foundry_sdk.v2", + number=1, + ) + + assert init_and_access_time < 0.5 + + +def test_admin_v2_models_import_performance(): + init_and_access_time = timeit.timeit( + stmt="import foundry_sdk.v2.admin.models", + setup="import sys; sys.modules.pop('foundry_sdk.v2.admin.models', None)", + number=1, + ) + + assert init_and_access_time < 0.5 + + +def test_aip_agents_v2_client_access_performance(): + init_and_access_time = timeit.timeit( + stmt="foundry_sdk.v2.FoundryClient(foundry_sdk.UserTokenAuth(token='token'), hostname='localhost').aip_agents", + setup="import sys; sys.modules.pop('foundry_sdk.v2', None);import foundry_sdk; import foundry_sdk.v2", + number=1, + ) + + assert init_and_access_time < 0.5 + + +def test_aip_agents_v2_models_import_performance(): + init_and_access_time = timeit.timeit( + stmt="import foundry_sdk.v2.aip_agents.models", + setup="import sys; sys.modules.pop('foundry_sdk.v2.aip_agents.models', None)", + number=1, + ) + + assert init_and_access_time < 0.5 + + +def test_audit_v2_client_access_performance(): + init_and_access_time = timeit.timeit( + stmt="foundry_sdk.v2.FoundryClient(foundry_sdk.UserTokenAuth(token='token'), hostname='localhost').audit", + setup="import sys; sys.modules.pop('foundry_sdk.v2', None);import foundry_sdk; import foundry_sdk.v2", + number=1, + ) + + assert init_and_access_time < 0.5 + + +def test_audit_v2_models_import_performance(): + init_and_access_time = timeit.timeit( + stmt="import foundry_sdk.v2.audit.models", + setup="import sys; sys.modules.pop('foundry_sdk.v2.audit.models', None)", + number=1, + ) + + assert init_and_access_time < 0.5 + + +def test_connectivity_v2_client_access_performance(): + init_and_access_time = timeit.timeit( + stmt="foundry_sdk.v2.FoundryClient(foundry_sdk.UserTokenAuth(token='token'), hostname='localhost').connectivity", + setup="import sys; sys.modules.pop('foundry_sdk.v2', None);import foundry_sdk; import foundry_sdk.v2", + number=1, + ) + + assert init_and_access_time < 0.5 + + +def test_connectivity_v2_models_import_performance(): + init_and_access_time = timeit.timeit( + stmt="import foundry_sdk.v2.connectivity.models", + setup="import sys; sys.modules.pop('foundry_sdk.v2.connectivity.models', None)", + number=1, + ) + + assert init_and_access_time < 0.5 + + +def test_data_health_v2_client_access_performance(): + init_and_access_time = timeit.timeit( + stmt="foundry_sdk.v2.FoundryClient(foundry_sdk.UserTokenAuth(token='token'), hostname='localhost').data_health", + setup="import sys; sys.modules.pop('foundry_sdk.v2', None);import foundry_sdk; import foundry_sdk.v2", + number=1, + ) + + assert init_and_access_time < 0.5 + + +def test_data_health_v2_models_import_performance(): + init_and_access_time = timeit.timeit( + stmt="import foundry_sdk.v2.data_health.models", + setup="import sys; sys.modules.pop('foundry_sdk.v2.data_health.models', None)", + number=1, + ) + + assert init_and_access_time < 0.5 + + +def test_datasets_v2_client_access_performance(): + init_and_access_time = timeit.timeit( + stmt="foundry_sdk.v2.FoundryClient(foundry_sdk.UserTokenAuth(token='token'), hostname='localhost').datasets", + setup="import sys; sys.modules.pop('foundry_sdk.v2', None);import foundry_sdk; import foundry_sdk.v2", + number=1, + ) + + assert init_and_access_time < 0.5 + + +def test_datasets_v2_models_import_performance(): + init_and_access_time = timeit.timeit( + stmt="import foundry_sdk.v2.datasets.models", + setup="import sys; sys.modules.pop('foundry_sdk.v2.datasets.models', None)", + number=1, + ) + + assert init_and_access_time < 0.5 + + +def test_filesystem_v2_client_access_performance(): + init_and_access_time = timeit.timeit( + stmt="foundry_sdk.v2.FoundryClient(foundry_sdk.UserTokenAuth(token='token'), hostname='localhost').filesystem", + setup="import sys; sys.modules.pop('foundry_sdk.v2', None);import foundry_sdk; import foundry_sdk.v2", + number=1, + ) + + assert init_and_access_time < 0.5 + + +def test_filesystem_v2_models_import_performance(): + init_and_access_time = timeit.timeit( + stmt="import foundry_sdk.v2.filesystem.models", + setup="import sys; sys.modules.pop('foundry_sdk.v2.filesystem.models', None)", + number=1, + ) + + assert init_and_access_time < 0.5 + + +def test_functions_v2_client_access_performance(): + init_and_access_time = timeit.timeit( + stmt="foundry_sdk.v2.FoundryClient(foundry_sdk.UserTokenAuth(token='token'), hostname='localhost').functions", + setup="import sys; sys.modules.pop('foundry_sdk.v2', None);import foundry_sdk; import foundry_sdk.v2", + number=1, + ) + + assert init_and_access_time < 0.5 + + +def test_functions_v2_models_import_performance(): + init_and_access_time = timeit.timeit( + stmt="import foundry_sdk.v2.functions.models", + setup="import sys; sys.modules.pop('foundry_sdk.v2.functions.models', None)", + number=1, + ) + + assert init_and_access_time < 0.5 + + +def test_language_models_v2_client_access_performance(): + init_and_access_time = timeit.timeit( + stmt="foundry_sdk.v2.FoundryClient(foundry_sdk.UserTokenAuth(token='token'), hostname='localhost').language_models", + setup="import sys; sys.modules.pop('foundry_sdk.v2', None);import foundry_sdk; import foundry_sdk.v2", + number=1, + ) + + assert init_and_access_time < 0.5 + + +def test_language_models_v2_models_import_performance(): + init_and_access_time = timeit.timeit( + stmt="import foundry_sdk.v2.language_models.models", + setup="import sys; sys.modules.pop('foundry_sdk.v2.language_models.models', None)", + number=1, + ) + + assert init_and_access_time < 0.5 + + +def test_media_sets_v2_client_access_performance(): + init_and_access_time = timeit.timeit( + stmt="foundry_sdk.v2.FoundryClient(foundry_sdk.UserTokenAuth(token='token'), hostname='localhost').media_sets", + setup="import sys; sys.modules.pop('foundry_sdk.v2', None);import foundry_sdk; import foundry_sdk.v2", + number=1, + ) + + assert init_and_access_time < 0.5 + + +def test_media_sets_v2_models_import_performance(): + init_and_access_time = timeit.timeit( + stmt="import foundry_sdk.v2.media_sets.models", + setup="import sys; sys.modules.pop('foundry_sdk.v2.media_sets.models', None)", + number=1, + ) + + assert init_and_access_time < 0.5 + + +def test_models_v2_client_access_performance(): + init_and_access_time = timeit.timeit( + stmt="foundry_sdk.v2.FoundryClient(foundry_sdk.UserTokenAuth(token='token'), hostname='localhost').models", + setup="import sys; sys.modules.pop('foundry_sdk.v2', None);import foundry_sdk; import foundry_sdk.v2", + number=1, + ) + + assert init_and_access_time < 0.5 + + +def test_models_v2_models_import_performance(): + init_and_access_time = timeit.timeit( + stmt="import foundry_sdk.v2.models.models", + setup="import sys; sys.modules.pop('foundry_sdk.v2.models.models', None)", + number=1, + ) + + assert init_and_access_time < 0.5 + + +def test_ontologies_v2_client_access_performance(): + init_and_access_time = timeit.timeit( + stmt="foundry_sdk.v2.FoundryClient(foundry_sdk.UserTokenAuth(token='token'), hostname='localhost').ontologies", + setup="import sys; sys.modules.pop('foundry_sdk.v2', None);import foundry_sdk; import foundry_sdk.v2", + number=1, + ) + + assert init_and_access_time < 0.5 + + +def test_ontologies_v2_models_import_performance(): + init_and_access_time = timeit.timeit( + stmt="import foundry_sdk.v2.ontologies.models", + setup="import sys; sys.modules.pop('foundry_sdk.v2.ontologies.models', None)", + number=1, + ) + + assert init_and_access_time < 0.5 + + +def test_orchestration_v2_client_access_performance(): + init_and_access_time = timeit.timeit( + stmt="foundry_sdk.v2.FoundryClient(foundry_sdk.UserTokenAuth(token='token'), hostname='localhost').orchestration", + setup="import sys; sys.modules.pop('foundry_sdk.v2', None);import foundry_sdk; import foundry_sdk.v2", + number=1, + ) + + assert init_and_access_time < 0.5 + + +def test_orchestration_v2_models_import_performance(): + init_and_access_time = timeit.timeit( + stmt="import foundry_sdk.v2.orchestration.models", + setup="import sys; sys.modules.pop('foundry_sdk.v2.orchestration.models', None)", + number=1, + ) + + assert init_and_access_time < 0.5 + + +def test_sql_queries_v2_client_access_performance(): + init_and_access_time = timeit.timeit( + stmt="foundry_sdk.v2.FoundryClient(foundry_sdk.UserTokenAuth(token='token'), hostname='localhost').sql_queries", + setup="import sys; sys.modules.pop('foundry_sdk.v2', None);import foundry_sdk; import foundry_sdk.v2", + number=1, + ) + + assert init_and_access_time < 0.5 + + +def test_sql_queries_v2_models_import_performance(): + init_and_access_time = timeit.timeit( + stmt="import foundry_sdk.v2.sql_queries.models", + setup="import sys; sys.modules.pop('foundry_sdk.v2.sql_queries.models', None)", + number=1, + ) + + assert init_and_access_time < 0.5 + + +def test_streams_v2_client_access_performance(): + init_and_access_time = timeit.timeit( + stmt="foundry_sdk.v2.FoundryClient(foundry_sdk.UserTokenAuth(token='token'), hostname='localhost').streams", + setup="import sys; sys.modules.pop('foundry_sdk.v2', None);import foundry_sdk; import foundry_sdk.v2", + number=1, + ) + + assert init_and_access_time < 0.5 + + +def test_streams_v2_models_import_performance(): + init_and_access_time = timeit.timeit( + stmt="import foundry_sdk.v2.streams.models", + setup="import sys; sys.modules.pop('foundry_sdk.v2.streams.models', None)", + number=1, + ) + + assert init_and_access_time < 0.5 + + +def test_third_party_applications_v2_client_access_performance(): + init_and_access_time = timeit.timeit( + stmt="foundry_sdk.v2.FoundryClient(foundry_sdk.UserTokenAuth(token='token'), hostname='localhost').third_party_applications", + setup="import sys; sys.modules.pop('foundry_sdk.v2', None);import foundry_sdk; import foundry_sdk.v2", + number=1, + ) + + assert init_and_access_time < 0.5 + + +def test_third_party_applications_v2_models_import_performance(): + init_and_access_time = timeit.timeit( + stmt="import foundry_sdk.v2.third_party_applications.models", + setup="import sys; sys.modules.pop('foundry_sdk.v2.third_party_applications.models', None)", + number=1, + ) + + assert init_and_access_time < 0.5 + + +def test_widgets_v2_client_access_performance(): + init_and_access_time = timeit.timeit( + stmt="foundry_sdk.v2.FoundryClient(foundry_sdk.UserTokenAuth(token='token'), hostname='localhost').widgets", + setup="import sys; sys.modules.pop('foundry_sdk.v2', None);import foundry_sdk; import foundry_sdk.v2", + number=1, + ) + + assert init_and_access_time < 0.5 + + +def test_widgets_v2_models_import_performance(): + init_and_access_time = timeit.timeit( + stmt="import foundry_sdk.v2.widgets.models", + setup="import sys; sys.modules.pop('foundry_sdk.v2.widgets.models', None)", + number=1, + ) + + assert init_and_access_time < 0.5 diff --git a/tests/test_resorce_import.py b/tests/test_resorce_import.py new file mode 100644 index 000000000..7459211e7 --- /dev/null +++ b/tests/test_resorce_import.py @@ -0,0 +1,582 @@ +def test_datasets_v1_branch_import(): + from foundry_sdk.v1.datasets.branch import BranchClient + + assert BranchClient is not None + + +def test_datasets_v1_dataset_import(): + from foundry_sdk.v1.datasets.dataset import DatasetClient + + assert DatasetClient is not None + + +def test_datasets_v1_file_import(): + from foundry_sdk.v1.datasets.file import FileClient + + assert FileClient is not None + + +def test_datasets_v1_transaction_import(): + from foundry_sdk.v1.datasets.transaction import TransactionClient + + assert TransactionClient is not None + + +def test_ontologies_v1_action_import(): + from foundry_sdk.v1.ontologies.action import ActionClient + + assert ActionClient is not None + + +def test_ontologies_v1_action_type_import(): + from foundry_sdk.v1.ontologies.action_type import ActionTypeClient + + assert ActionTypeClient is not None + + +def test_ontologies_v1_attachment_import(): + from foundry_sdk.v1.ontologies.attachment import AttachmentClient + + assert AttachmentClient is not None + + +def test_ontologies_v1_object_type_import(): + from foundry_sdk.v1.ontologies.object_type import ObjectTypeClient + + assert ObjectTypeClient is not None + + +def test_ontologies_v1_ontology_import(): + from foundry_sdk.v1.ontologies.ontology import OntologyClient + + assert OntologyClient is not None + + +def test_ontologies_v1_ontology_object_import(): + from foundry_sdk.v1.ontologies.ontology_object import OntologyObjectClient + + assert OntologyObjectClient is not None + + +def test_ontologies_v1_query_import(): + from foundry_sdk.v1.ontologies.query import QueryClient + + assert QueryClient is not None + + +def test_ontologies_v1_query_type_import(): + from foundry_sdk.v1.ontologies.query_type import QueryTypeClient + + assert QueryTypeClient is not None + + +def test_admin_v2_authentication_provider_import(): + from foundry_sdk.v2.admin.authentication_provider import AuthenticationProviderClient # NOQA + + assert AuthenticationProviderClient is not None + + +def test_admin_v2_enrollment_import(): + from foundry_sdk.v2.admin.enrollment import EnrollmentClient + + assert EnrollmentClient is not None + + +def test_admin_v2_enrollment_role_assignment_import(): + from foundry_sdk.v2.admin.enrollment_role_assignment import ( + EnrollmentRoleAssignmentClient, + ) # NOQA + + assert EnrollmentRoleAssignmentClient is not None + + +def test_admin_v2_group_import(): + from foundry_sdk.v2.admin.group import GroupClient + + assert GroupClient is not None + + +def test_admin_v2_group_member_import(): + from foundry_sdk.v2.admin.group_member import GroupMemberClient + + assert GroupMemberClient is not None + + +def test_admin_v2_group_membership_import(): + from foundry_sdk.v2.admin.group_membership import GroupMembershipClient + + assert GroupMembershipClient is not None + + +def test_admin_v2_group_membership_expiration_policy_import(): + from foundry_sdk.v2.admin.group_membership_expiration_policy import ( + GroupMembershipExpirationPolicyClient, + ) # NOQA + + assert GroupMembershipExpirationPolicyClient is not None + + +def test_admin_v2_group_provider_info_import(): + from foundry_sdk.v2.admin.group_provider_info import GroupProviderInfoClient + + assert GroupProviderInfoClient is not None + + +def test_admin_v2_host_import(): + from foundry_sdk.v2.admin.host import HostClient + + assert HostClient is not None + + +def test_admin_v2_marking_import(): + from foundry_sdk.v2.admin.marking import MarkingClient + + assert MarkingClient is not None + + +def test_admin_v2_marking_category_import(): + from foundry_sdk.v2.admin.marking_category import MarkingCategoryClient + + assert MarkingCategoryClient is not None + + +def test_admin_v2_marking_member_import(): + from foundry_sdk.v2.admin.marking_member import MarkingMemberClient + + assert MarkingMemberClient is not None + + +def test_admin_v2_marking_role_assignment_import(): + from foundry_sdk.v2.admin.marking_role_assignment import MarkingRoleAssignmentClient + + assert MarkingRoleAssignmentClient is not None + + +def test_admin_v2_organization_import(): + from foundry_sdk.v2.admin.organization import OrganizationClient + + assert OrganizationClient is not None + + +def test_admin_v2_organization_role_assignment_import(): + from foundry_sdk.v2.admin.organization_role_assignment import ( + OrganizationRoleAssignmentClient, + ) # NOQA + + assert OrganizationRoleAssignmentClient is not None + + +def test_admin_v2_role_import(): + from foundry_sdk.v2.admin.role import RoleClient + + assert RoleClient is not None + + +def test_admin_v2_user_import(): + from foundry_sdk.v2.admin.user import UserClient + + assert UserClient is not None + + +def test_admin_v2_user_provider_info_import(): + from foundry_sdk.v2.admin.user_provider_info import UserProviderInfoClient + + assert UserProviderInfoClient is not None + + +def test_aip_agents_v2_agent_import(): + from foundry_sdk.v2.aip_agents.agent import AgentClient + + assert AgentClient is not None + + +def test_aip_agents_v2_agent_version_import(): + from foundry_sdk.v2.aip_agents.agent_version import AgentVersionClient + + assert AgentVersionClient is not None + + +def test_aip_agents_v2_content_import(): + from foundry_sdk.v2.aip_agents.content import ContentClient + + assert ContentClient is not None + + +def test_aip_agents_v2_session_import(): + from foundry_sdk.v2.aip_agents.session import SessionClient + + assert SessionClient is not None + + +def test_aip_agents_v2_session_trace_import(): + from foundry_sdk.v2.aip_agents.session_trace import SessionTraceClient + + assert SessionTraceClient is not None + + +def test_audit_v2_log_file_import(): + from foundry_sdk.v2.audit.log_file import LogFileClient + + assert LogFileClient is not None + + +def test_audit_v2_organization_import(): + from foundry_sdk.v2.audit.organization import OrganizationClient + + assert OrganizationClient is not None + + +def test_connectivity_v2_connection_import(): + from foundry_sdk.v2.connectivity.connection import ConnectionClient + + assert ConnectionClient is not None + + +def test_connectivity_v2_file_import_import(): + from foundry_sdk.v2.connectivity.file_import import FileImportClient + + assert FileImportClient is not None + + +def test_connectivity_v2_table_import_import(): + from foundry_sdk.v2.connectivity.table_import import TableImportClient + + assert TableImportClient is not None + + +def test_connectivity_v2_virtual_table_import(): + from foundry_sdk.v2.connectivity.virtual_table import VirtualTableClient + + assert VirtualTableClient is not None + + +def test_data_health_v2_check_import(): + from foundry_sdk.v2.data_health.check import CheckClient + + assert CheckClient is not None + + +def test_data_health_v2_check_report_import(): + from foundry_sdk.v2.data_health.check_report import CheckReportClient + + assert CheckReportClient is not None + + +def test_datasets_v2_branch_import(): + from foundry_sdk.v2.datasets.branch import BranchClient + + assert BranchClient is not None + + +def test_datasets_v2_dataset_import(): + from foundry_sdk.v2.datasets.dataset import DatasetClient + + assert DatasetClient is not None + + +def test_datasets_v2_file_import(): + from foundry_sdk.v2.datasets.file import FileClient + + assert FileClient is not None + + +def test_datasets_v2_transaction_import(): + from foundry_sdk.v2.datasets.transaction import TransactionClient + + assert TransactionClient is not None + + +def test_datasets_v2_view_import(): + from foundry_sdk.v2.datasets.view import ViewClient + + assert ViewClient is not None + + +def test_filesystem_v2_folder_import(): + from foundry_sdk.v2.filesystem.folder import FolderClient + + assert FolderClient is not None + + +def test_filesystem_v2_project_import(): + from foundry_sdk.v2.filesystem.project import ProjectClient + + assert ProjectClient is not None + + +def test_filesystem_v2_resource_import(): + from foundry_sdk.v2.filesystem.resource import ResourceClient + + assert ResourceClient is not None + + +def test_filesystem_v2_resource_role_import(): + from foundry_sdk.v2.filesystem.resource_role import ResourceRoleClient + + assert ResourceRoleClient is not None + + +def test_filesystem_v2_space_import(): + from foundry_sdk.v2.filesystem.space import SpaceClient + + assert SpaceClient is not None + + +def test_functions_v2_query_import(): + from foundry_sdk.v2.functions.query import QueryClient + + assert QueryClient is not None + + +def test_functions_v2_value_type_import(): + from foundry_sdk.v2.functions.value_type import ValueTypeClient + + assert ValueTypeClient is not None + + +def test_functions_v2_version_id_import(): + from foundry_sdk.v2.functions.version_id import VersionIdClient + + assert VersionIdClient is not None + + +def test_language_models_v2_anthropic_model_import(): + from foundry_sdk.v2.language_models.anthropic_model import AnthropicModelClient + + assert AnthropicModelClient is not None + + +def test_language_models_v2_open_ai_model_import(): + from foundry_sdk.v2.language_models.open_ai_model import OpenAiModelClient + + assert OpenAiModelClient is not None + + +def test_media_sets_v2_media_set_import(): + from foundry_sdk.v2.media_sets.media_set import MediaSetClient + + assert MediaSetClient is not None + + +def test_models_v2_model_import(): + from foundry_sdk.v2.models.model import ModelClient + + assert ModelClient is not None + + +def test_models_v2_model_version_import(): + from foundry_sdk.v2.models.model_version import ModelVersionClient + + assert ModelVersionClient is not None + + +def test_ontologies_v2_action_import(): + from foundry_sdk.v2.ontologies.action import ActionClient + + assert ActionClient is not None + + +def test_ontologies_v2_action_type_import(): + from foundry_sdk.v2.ontologies.action_type import ActionTypeClient + + assert ActionTypeClient is not None + + +def test_ontologies_v2_action_type_full_metadata_import(): + from foundry_sdk.v2.ontologies.action_type_full_metadata import ( + ActionTypeFullMetadataClient, + ) # NOQA + + assert ActionTypeFullMetadataClient is not None + + +def test_ontologies_v2_attachment_import(): + from foundry_sdk.v2.ontologies.attachment import AttachmentClient + + assert AttachmentClient is not None + + +def test_ontologies_v2_attachment_property_import(): + from foundry_sdk.v2.ontologies.attachment_property import AttachmentPropertyClient + + assert AttachmentPropertyClient is not None + + +def test_ontologies_v2_cipher_text_property_import(): + from foundry_sdk.v2.ontologies.cipher_text_property import CipherTextPropertyClient + + assert CipherTextPropertyClient is not None + + +def test_ontologies_v2_linked_object_import(): + from foundry_sdk.v2.ontologies.linked_object import LinkedObjectClient + + assert LinkedObjectClient is not None + + +def test_ontologies_v2_media_reference_property_import(): + from foundry_sdk.v2.ontologies.media_reference_property import ( + MediaReferencePropertyClient, + ) # NOQA + + assert MediaReferencePropertyClient is not None + + +def test_ontologies_v2_object_type_import(): + from foundry_sdk.v2.ontologies.object_type import ObjectTypeClient + + assert ObjectTypeClient is not None + + +def test_ontologies_v2_ontology_import(): + from foundry_sdk.v2.ontologies.ontology import OntologyClient + + assert OntologyClient is not None + + +def test_ontologies_v2_ontology_interface_import(): + from foundry_sdk.v2.ontologies.ontology_interface import OntologyInterfaceClient + + assert OntologyInterfaceClient is not None + + +def test_ontologies_v2_ontology_object_import(): + from foundry_sdk.v2.ontologies.ontology_object import OntologyObjectClient + + assert OntologyObjectClient is not None + + +def test_ontologies_v2_ontology_object_set_import(): + from foundry_sdk.v2.ontologies.ontology_object_set import OntologyObjectSetClient + + assert OntologyObjectSetClient is not None + + +def test_ontologies_v2_ontology_transaction_import(): + from foundry_sdk.v2.ontologies.ontology_transaction import OntologyTransactionClient + + assert OntologyTransactionClient is not None + + +def test_ontologies_v2_ontology_value_type_import(): + from foundry_sdk.v2.ontologies.ontology_value_type import OntologyValueTypeClient + + assert OntologyValueTypeClient is not None + + +def test_ontologies_v2_query_import(): + from foundry_sdk.v2.ontologies.query import QueryClient + + assert QueryClient is not None + + +def test_ontologies_v2_query_type_import(): + from foundry_sdk.v2.ontologies.query_type import QueryTypeClient + + assert QueryTypeClient is not None + + +def test_ontologies_v2_time_series_property_v2_import(): + from foundry_sdk.v2.ontologies.time_series_property_v2 import TimeSeriesPropertyV2Client # NOQA + + assert TimeSeriesPropertyV2Client is not None + + +def test_ontologies_v2_time_series_value_bank_property_import(): + from foundry_sdk.v2.ontologies.time_series_value_bank_property import ( + TimeSeriesValueBankPropertyClient, + ) # NOQA + + assert TimeSeriesValueBankPropertyClient is not None + + +def test_orchestration_v2_build_import(): + from foundry_sdk.v2.orchestration.build import BuildClient + + assert BuildClient is not None + + +def test_orchestration_v2_job_import(): + from foundry_sdk.v2.orchestration.job import JobClient + + assert JobClient is not None + + +def test_orchestration_v2_schedule_import(): + from foundry_sdk.v2.orchestration.schedule import ScheduleClient + + assert ScheduleClient is not None + + +def test_orchestration_v2_schedule_run_import(): + from foundry_sdk.v2.orchestration.schedule_run import ScheduleRunClient + + assert ScheduleRunClient is not None + + +def test_orchestration_v2_schedule_version_import(): + from foundry_sdk.v2.orchestration.schedule_version import ScheduleVersionClient + + assert ScheduleVersionClient is not None + + +def test_sql_queries_v2_sql_query_import(): + from foundry_sdk.v2.sql_queries.sql_query import SqlQueryClient + + assert SqlQueryClient is not None + + +def test_streams_v2_dataset_import(): + from foundry_sdk.v2.streams.dataset import DatasetClient + + assert DatasetClient is not None + + +def test_streams_v2_stream_import(): + from foundry_sdk.v2.streams.stream import StreamClient + + assert StreamClient is not None + + +def test_third_party_applications_v2_third_party_application_import(): + from foundry_sdk.v2.third_party_applications.third_party_application import ( + ThirdPartyApplicationClient, + ) # NOQA + + assert ThirdPartyApplicationClient is not None + + +def test_third_party_applications_v2_version_import(): + from foundry_sdk.v2.third_party_applications.version import VersionClient + + assert VersionClient is not None + + +def test_third_party_applications_v2_website_import(): + from foundry_sdk.v2.third_party_applications.website import WebsiteClient + + assert WebsiteClient is not None + + +def test_widgets_v2_dev_mode_settings_import(): + from foundry_sdk.v2.widgets.dev_mode_settings import DevModeSettingsClient + + assert DevModeSettingsClient is not None + + +def test_widgets_v2_release_import(): + from foundry_sdk.v2.widgets.release import ReleaseClient + + assert ReleaseClient is not None + + +def test_widgets_v2_repository_import(): + from foundry_sdk.v2.widgets.repository import RepositoryClient + + assert RepositoryClient is not None + + +def test_widgets_v2_widget_set_import(): + from foundry_sdk.v2.widgets.widget_set import WidgetSetClient + + assert WidgetSetClient is not None diff --git a/tests/test_resource_iterator.py b/tests/test_resource_iterator.py new file mode 100644 index 000000000..805e6b2c8 --- /dev/null +++ b/tests/test_resource_iterator.py @@ -0,0 +1,215 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +from typing import Any +from typing import Optional + +import pytest + +from foundry_sdk._core.resource_iterator import AsyncResourceIterator +from foundry_sdk._core.resource_iterator import ResourceIterator +from tests.test_page_iterator import alist +from tests.test_page_iterator import create_async_page_func +from tests.test_page_iterator import create_page_func + + +def create_iterator(total_items: int, default_page_size: int): + return ResourceIterator[int](create_page_func(total_items, default_page_size)) + + +def create_async_iterator(total_items: int, default_page_size: int): + return AsyncResourceIterator[int](create_async_page_func(total_items, default_page_size)) + + +def test_empty_iterator(): + iterator = create_iterator(0, 5) + assert iterator.data == [] + assert iterator.next_page_token is None + assert list(iterator) == [] + + +def test_iterator_with_one_item(): + iterator = create_iterator(1, 5) + assert iterator.data == [0] + assert iterator.next_page_token is None + assert list(iterator) == [0] + + +def test_iterator_with_5_pages_of_5(): + iterator = create_iterator(25, 5) + + # Check it can traverse from page to page correctly + # Page 1 + assert iterator.data == [0, 1, 2, 3, 4] + assert iterator.next_page_token == "5" + assert next(iterator) == 0 + assert next(iterator) == 1 + assert next(iterator) == 2 + assert next(iterator) == 3 + assert next(iterator) == 4 + assert iterator.data == [0, 1, 2, 3, 4] + + # Page 1 + assert next(iterator) == 5 + assert iterator.data == [5, 6, 7, 8, 9] + assert iterator.next_page_token == "10" + assert next(iterator) == 6 + assert next(iterator) == 7 + assert next(iterator) == 8 + assert next(iterator) == 9 + + # Make sure it finishes the last 3 pages + assert len(list(iterator)) == 15 + + # And then confirm there is nothing left + with pytest.raises(StopIteration): + next(iterator) + + +@pytest.mark.asyncio(scope="session") +async def test_empty_async_iterator(): + iterator = create_async_iterator(0, 5) + assert await iterator._page_iterator.get_data() == [] + assert await iterator._page_iterator.get_next_page_token() is None + assert await alist(iterator) == [] + + +@pytest.mark.asyncio(scope="session") +async def test_async_iterator_with_one_item(): + iterator = create_async_iterator(1, 5) + assert await iterator._page_iterator.get_data() == [0] + assert await iterator._page_iterator.get_next_page_token() is None + assert await alist(iterator) == [0] + + +@pytest.mark.asyncio(scope="session") +async def test_async_iterator_with_5_pages_of_5(): + iterator = create_async_iterator(25, 5) + + # Check it can traverse from page to page correctly + # Page 1 + assert await iterator.__anext__() == 0 + assert await iterator.__anext__() == 1 + assert await iterator.__anext__() == 2 + assert await iterator.__anext__() == 3 + assert await iterator.__anext__() == 4 + assert await iterator._page_iterator.get_data() == [0, 1, 2, 3, 4] + + # Page 1 + assert await iterator.__anext__() == 5 + assert await iterator.__anext__() == 6 + assert await iterator.__anext__() == 7 + assert await iterator.__anext__() == 8 + assert await iterator.__anext__() == 9 + assert await iterator._page_iterator.get_data() == [5, 6, 7, 8, 9] + + # Make sure it finishes the last 3 pages + assert len(await alist(iterator)) == 15 + + # And then confirm there is nothing left + with pytest.raises(StopAsyncIteration): + await iterator.__anext__() + + +def test_iterator_with_empty_page_in_middle(): + def page_func_with_empty_page(page_size: Optional[int], next_page_token: Optional[str]): + """Page function that returns: [0,1,2], [], [3,4,5], None""" + page_token = next_page_token or "page1" + + if page_token == "page1": + return ("page2", [0, 1, 2]) + elif page_token == "page2": + # Empty page but pagination continues + return ("page3", []) + elif page_token == "page3": + return (None, [3, 4, 5]) + else: + return (None, []) + + iterator = ResourceIterator[int](page_func_with_empty_page) + + # Should successfully iterate through all items, skipping the empty page + result = list(iterator) + assert result == [0, 1, 2, 3, 4, 5] + + +@pytest.mark.asyncio(scope="session") +async def test_async_iterator_with_empty_page_in_middle(): + async def async_page_func_with_empty_page( + page_size: Optional[int], next_page_token: Optional[str] + ): + """Async page function that returns: [0,1,2], [], [3,4,5], None""" + page_token = next_page_token or "page1" + + if page_token == "page1": + return ("page2", [0, 1, 2]) + elif page_token == "page2": + # Empty page but pagination continues + return ("page3", []) + elif page_token == "page3": + return (None, [3, 4, 5]) + else: + return (None, []) + + iterator = AsyncResourceIterator[int](async_page_func_with_empty_page) + + # Should successfully iterate through all items, skipping the empty page + result = await alist(iterator) + assert result == [0, 1, 2, 3, 4, 5] + + +def test_iterator_with_initial_page_token(): + def page_func(page_size: Optional[int], next_page_token: Optional[str]): + """Page function that returns different data based on page_token""" + page_token = next_page_token or "page1" + + if page_token == "page1": + return ("page2", [0, 1, 2]) + elif page_token == "page2": + return ("page3", [3, 4, 5]) + elif page_token == "page3": + return (None, [6, 7, 8]) + else: + return (None, []) + + # Start from page2 instead of page1 + iterator = ResourceIterator[int](page_func, page_token="page2") + + # Should only get items from page2 onwards: [3, 4, 5, 6, 7, 8] + result = list(iterator) + assert result == [3, 4, 5, 6, 7, 8] + + +@pytest.mark.asyncio(scope="session") +async def test_async_iterator_with_initial_page_token(): + async def async_page_func(page_size: Optional[int], next_page_token: Optional[str]): + """Async page function that returns different data based on page_token""" + page_token = next_page_token or "page1" + + if page_token == "page1": + return ("page2", [0, 1, 2]) + elif page_token == "page2": + return ("page3", [3, 4, 5]) + elif page_token == "page3": + return (None, [6, 7, 8]) + else: + return (None, []) + + # Start from page2 instead of page1 + iterator = AsyncResourceIterator[int](async_page_func, page_token="page2") + + # Should only get items from page2 onwards: [3, 4, 5, 6, 7, 8] + result = await alist(iterator) + assert result == [3, 4, 5, 6, 7, 8] diff --git a/tests/test_response_types.py b/tests/test_response_types.py new file mode 100644 index 000000000..0927acbe9 --- /dev/null +++ b/tests/test_response_types.py @@ -0,0 +1,652 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import decimal +import json +from datetime import date +from datetime import datetime +from datetime import timezone +from typing import Any +from typing import Dict +from typing import Generic +from typing import List +from typing import Literal +from typing import Optional +from typing import TypeVar +from typing import Union + +import httpx +import pydantic +import pytest +from typing_extensions import Annotated + +from foundry_sdk._core import ApiResponse +from foundry_sdk._core import RequestInfo +from foundry_sdk._core.utils import RID +from foundry_sdk._core.utils import UUID +from foundry_sdk._core.utils import AwareDatetime +from foundry_sdk._core.utils import Long +from tests.server import FooBar + + +# Simple BaseModel types for testing +class SimpleModel(pydantic.BaseModel): + value: str + + +class ModelWithAnnotation(pydantic.BaseModel): + value: Annotated[str, pydantic.Field(min_length=3)] + + +# Union type with discriminator +class RunningStatus(pydantic.BaseModel): + type: Literal["RUNNING"] = "RUNNING" + percent_complete: int + + +class FailedStatus(pydantic.BaseModel): + type: Literal["FAILED"] = "FAILED" + error_message: str + + +class CompletedStatus(pydantic.BaseModel): + type: Literal["COMPLETED"] = "COMPLETED" + result: str + + +# Define Status using Annotated for discriminator +Status = Annotated[ + Union[RunningStatus, FailedStatus, CompletedStatus], + pydantic.Field(discriminator="type"), +] + +# Optional Annotated Union +OptionalStatus = Optional[Status] + + +def create_response(response_type: Any, json_content: Any) -> ApiResponse: + """Helper function to create ApiResponse objects for testing.""" + return ApiResponse( + RequestInfo.with_defaults("GET", "/test/endpoint", response_type=response_type), + httpx.Response(200, content=json.dumps(json_content).encode()), + ) + + +def create_bytes_response(response_type: Any, content: bytes) -> ApiResponse: + """Helper function to create ApiResponse objects with raw bytes for testing.""" + return ApiResponse( + RequestInfo.with_defaults("GET", "/test/endpoint", response_type=response_type), + httpx.Response(200, content=content), + ) + + +# ----- Tests for Simple Types ----- + + +def test_decode_bytes(): + """Test decoding raw bytes.""" + response = create_bytes_response(bytes, b"raw bytes content") + result = response.decode() + assert result == b"raw bytes content" + assert isinstance(result, bytes) + + +def test_decode_optional_bytes_present(): + """Test decoding Optional[bytes] when content is present.""" + response = create_bytes_response(Optional[bytes], b"optional bytes content") + result = response.decode() + assert result == b"optional bytes content" + assert isinstance(result, bytes) + + +def test_decode_optional_bytes_empty(): + """Test decoding Optional[bytes] when content is empty.""" + response = create_bytes_response(Optional[bytes], b"") + result = response.decode() + assert result is None + + +def test_decode_none(): + response = create_response(None, "foo") + result = response.decode() + assert result is None + + +def test_decode_any_type(): + """Test decoding Any.""" + json_data = {"key": "value", "number": 42} + response = create_response(Any, json_data) + result = response.decode() + assert result == json_data + + json_data = {"key": "value", "number": 42} + response = create_response(Annotated[Any, pydantic.Field(description="test")], json_data) + result = response.decode() + assert result == json_data + + +def test_decode_string(): + """Test decoding a string.""" + json_data = "string value" + response = create_response(str, json_data) + result = response.decode() + assert result == json_data + assert isinstance(result, str) + + +def test_decode_integer(): + """Test decoding an integer.""" + json_data = 42 + response = create_response(int, json_data) + result = response.decode() + assert result == json_data + assert isinstance(result, int) + + +def test_decode_float(): + """Test decoding a float.""" + json_data = 42.5 + response = create_response(float, json_data) + result = response.decode() + assert result == json_data + assert isinstance(result, float) + + +def test_decode_boolean(): + """Test decoding a boolean.""" + json_data = True + response = create_response(bool, json_data) + result = response.decode() + assert result == json_data + assert isinstance(result, bool) + + +def test_decode_literal(): + """Test decoding a literal type.""" + json_data = "option1" + response = create_response(Literal["option1", "option2", "option3"], json_data) + result = response.decode() + assert result == json_data + assert result == "option1" + + +# ----- Tests for Collection Types ----- + + +def test_decode_list(): + """Test decoding a list of values.""" + json_data = ["item1", "item2", "item3"] + response = create_response(List[str], json_data) + result = response.decode() + assert result == json_data + assert isinstance(result, list) + assert all(isinstance(item, str) for item in result) + + +def test_decode_list_of_models(): + """Test decoding a list of models.""" + json_data = [{"value": "test1"}, {"value": "test2"}] + response = create_response(List[SimpleModel], json_data) + result = response.decode() + assert isinstance(result, list) + assert all(isinstance(item, SimpleModel) for item in result) + assert result[0].value == "test1" + assert result[1].value == "test2" + + +def test_decode_annotated_list(): + """Test decoding a list with length annotations.""" + json_data = ["item1", "item2", "item3"] + response = create_response( + Annotated[List[str], pydantic.Field(min_length=1, max_length=10)], + json_data, + ) + result = response.decode() + assert result == json_data + assert isinstance(result, list) + assert all(isinstance(item, str) for item in result) + + +def test_decode_dict(): + """Test decoding a dictionary.""" + json_data = {"key1": "value1", "key2": "value2"} + response = create_response(Dict[str, str], json_data) + result = response.decode() + assert result == json_data + assert isinstance(result, dict) + assert all(isinstance(key, str) and isinstance(value, str) for key, value in result.items()) + + +def test_decode_dict_with_model_values(): + """Test decoding a dictionary with model values.""" + json_data = {"key1": {"value": "test1"}, "key2": {"value": "test2"}} + response = create_response(Dict[str, SimpleModel], json_data) + result = response.decode() + assert isinstance(result, dict) + assert all( + isinstance(key, str) and isinstance(value, SimpleModel) for key, value in result.items() + ) + assert result["key1"].value == "test1" + assert result["key2"].value == "test2" + + +# ----- Tests for Special Types ----- + + +def test_decode_decimal(): + """Test decoding a decimal.Decimal.""" + json_data = "123.456" # Decimals are serialized as strings + response = create_response(decimal.Decimal, json_data) + result = response.decode() + assert isinstance(result, decimal.Decimal) + assert result == decimal.Decimal("123.456") + + +def test_decode_datetime(): + """Test decoding an AwareDatetime.""" + json_data = "2023-01-01T12:00:00Z" + response = create_response(AwareDatetime, json_data) + result = response.decode() + assert isinstance(result, datetime) + assert result.tzinfo is not None # Ensure it's timezone aware + assert result.year == 2023 + assert result.month == 1 + assert result.day == 1 + assert result.hour == 12 + + +def test_decode_date(): + """Test decoding a date.""" + json_data = "2023-01-01" + response = create_response(date, json_data) + result = response.decode() + assert isinstance(result, date) + assert result.year == 2023 + assert result.month == 1 + assert result.day == 1 + + +def test_decode_rid(): + """Test decoding a RID.""" + json_data = "ri.foundry.main.dataset.1234abcd" + response = create_response(RID, json_data) + result = response.decode() + assert isinstance(result, str) + assert result == json_data + + +def test_decode_uuid(): + """Test decoding a UUID.""" + json_data = "123e4567-e89b-12d3-a456-426614174000" + response = create_response(UUID, json_data) + result = response.decode() + assert isinstance(result, str) + assert result == json_data + + +def test_decode_long(): + """Test decoding a Long.""" + # Long values are typically integers that get serialized as strings in JSON + json_data = "9223372036854775807" # Max int64 value + response = create_response(Long, json_data) + result = response.decode() + assert isinstance(result, int) + assert result == 9223372036854775807 + + +# ----- Tests for Pydantic Models ----- + + +def test_decode_base_model(): + """Test decoding a simple BaseModel.""" + json_data = {"value": "test string"} + response = create_response(SimpleModel, json_data) + result = response.decode() + assert isinstance(result, SimpleModel) + assert result.value == "test string" + + +def test_decode_optional_base_model_present(): + """Test decoding Optional[BaseModel] when content is present.""" + json_data = {"value": "test string"} + response = create_response(Optional[SimpleModel], json_data) + result = response.decode() + assert isinstance(result, SimpleModel) + assert result.value == "test string" + + +def test_decode_optional_base_model_empty(): + """Test decoding Optional[BaseModel] when content is empty.""" + response = create_bytes_response(Optional[SimpleModel], b"") + result = response.decode() + assert result is None + + +def test_decode_annotated_base_model(): + """Test decoding an Annotated BaseModel.""" + json_data = {"value": "test string"} + response = create_response( + Annotated[SimpleModel, pydantic.Field(description="A test model")], + json_data, + ) + result = response.decode() + assert isinstance(result, SimpleModel) + assert result.value == "test string" + + +def test_decode_model_with_annotation(): + """Test decoding a model with annotated fields.""" + json_data = {"value": "test string"} + response = create_response(ModelWithAnnotation, json_data) + result = response.decode() + assert isinstance(result, ModelWithAnnotation) + assert result.value == "test string" + + +# ----- Tests for Union and Discriminated Types ----- + + +def test_decode_union_with_discriminator_running(): + """Test decoding a union type with discriminator (running status).""" + json_data = {"type": "RUNNING", "percent_complete": 75} + response = create_response(Status, json_data) + result = response.decode() + assert isinstance(result, RunningStatus) + assert result.type == "RUNNING" + assert result.percent_complete == 75 + + +def test_decode_union_with_discriminator_failed(): + """Test decoding a union type with discriminator (failed status).""" + json_data = {"type": "FAILED", "error_message": "Something went wrong"} + response = create_response(Status, json_data) + result = response.decode() + assert isinstance(result, FailedStatus) + assert result.type == "FAILED" + assert result.error_message == "Something went wrong" + + +def test_decode_union_with_discriminator_completed(): + """Test decoding a union type with discriminator (completed status).""" + json_data = {"type": "COMPLETED", "result": "Success!"} + response = create_response(Status, json_data) + result = response.decode() + assert isinstance(result, CompletedStatus) + assert result.type == "COMPLETED" + assert result.result == "Success!" + + +def test_decode_optional_union_with_discriminator_present(): + """Test decoding an Optional union type with discriminator when content is present.""" + json_data = {"type": "RUNNING", "percent_complete": 50} + response = create_response(OptionalStatus, json_data) + result = response.decode() + assert isinstance(result, RunningStatus) + assert result.type == "RUNNING" + assert result.percent_complete == 50 + + +def test_decode_optional_union_with_discriminator_empty(): + """Test decoding an Optional union type with discriminator when content is empty.""" + response = create_bytes_response(OptionalStatus, b"") + result = response.decode() + assert result is None + + +# ----- Tests for Nested and Complex Types ----- + + +def test_decode_annotated_optional_base_model(): + """Test decoding an Annotated Optional BaseModel.""" + json_data = {"value": "test string"} + response = create_response( + Annotated[Optional[SimpleModel], pydantic.Field(description="Optional model")], + json_data, + ) + result = response.decode() + assert isinstance(result, SimpleModel) + assert result.value == "test string" + + +def test_decode_optional_annotated_base_model(): + """Test decoding an Optional Annotated BaseModel.""" + json_data = {"value": "test string"} + response = create_response( + Optional[Annotated[SimpleModel, pydantic.Field(description="Annotated model")]], + json_data, + ) + result = response.decode() + assert isinstance(result, SimpleModel) + assert result.value == "test string" + + +def test_decode_optional_annotated_base_model_empty(): + """Test decoding an Optional Annotated BaseModel when content is empty.""" + response = create_bytes_response( + Optional[Annotated[SimpleModel, pydantic.Field(description="Annotated model")]], + b"", + ) + result = response.decode() + assert result is None + + +def test_decode_annotated_optional_annotated_base_model(): + """Test decoding an Annotated Optional Annotated BaseModel (deeply nested).""" + json_data = {"value": "test string"} + response = create_response( + Annotated[ + Optional[ + Annotated[ + SimpleModel, + pydantic.Field(description="Inner annotation"), + ] + ], + pydantic.Field(description="Outer annotation"), + ], + json_data, + ) + result = response.decode() + assert isinstance(result, SimpleModel) + assert result.value == "test string" + + +def test_decode_nested_unions(): + """Test decoding nested Union types.""" + json_data = {"type": "RUNNING", "percent_complete": 25} + nested_union = Union[Status, SimpleModel] + response = create_response(nested_union, json_data) + result = response.decode() + assert isinstance(result, RunningStatus) + assert result.type == "RUNNING" + assert result.percent_complete == 25 + + +def test_decode_list_of_optional_models(): + """Test decoding a list of optional models.""" + json_data = [{"value": "test1"}, None, {"value": "test3"}] + response = create_response(List[Optional[SimpleModel]], json_data) + result = response.decode() + assert isinstance(result, list) + assert isinstance(result[0], SimpleModel) + assert result[1] is None + assert isinstance(result[2], SimpleModel) + assert result[0].value == "test1" + assert result[2].value == "test3" + + +def test_decode_dict_with_complex_values(): + """Test decoding a dictionary with complex value types.""" + json_data = { + "model": {"value": "test"}, + "list": [1, 2, 3], + "nested": {"key": {"value": "nested value"}}, + } + response = create_response( + Dict[str, Union[SimpleModel, List[int], Dict[str, SimpleModel]]], + json_data, + ) + result = response.decode() + assert isinstance(result, dict) + assert isinstance(result["model"], SimpleModel) + assert isinstance(result["list"], list) + assert isinstance(result["nested"], dict) + assert isinstance(result["nested"]["key"], SimpleModel) + assert result["model"].value == "test" + assert result["list"] == [1, 2, 3] + assert result["nested"]["key"].value == "nested value" + + +# ----- Tests for Generic Types ----- + +T = TypeVar("T") + + +class GenericModel(pydantic.BaseModel, Generic[T]): + """A generic model for testing.""" + + value: T + + +def test_decode_generic_model(): + """Test decoding a generic model.""" + json_data = {"value": "test string"} + response = create_response(GenericModel[str], json_data) + result = response.decode() + assert isinstance(result, GenericModel) + assert result.value == "test string" + + json_data = {"value": 42} + response = create_response(GenericModel[int], json_data) + result = response.decode() + assert isinstance(result, GenericModel) + assert result.value == 42 + + +# ----- Tests for Type Mismatches ----- + + +def test_decode_string_when_int_expected(): + """Test decoding a string when an int was expected.""" + json_data = "not an integer" + response = create_response(int, json_data) + with pytest.raises(pydantic.ValidationError): + response.decode() + + +def test_decode_int_when_string_expected(): + """Test decoding an int when a string was expected.""" + json_data = 42 + response = create_response(str, json_data) + with pytest.raises(pydantic.ValidationError): + response.decode() + + +def test_decode_wrong_union_discriminator_value(): + """Test decoding a union with a discriminator value that doesn't match any option.""" + json_data = {"type": "UNKNOWN", "some_field": "value"} + response = create_response(Status, json_data) + with pytest.raises(pydantic.ValidationError): + response.decode() + + +def test_decode_missing_union_discriminator(): + """Test decoding a union with a missing discriminator field.""" + json_data = {"some_field": "value"} + response = create_response(Status, json_data) + with pytest.raises(pydantic.ValidationError): + response.decode() + + +def test_decode_list_with_wrong_element_type(): + """Test decoding a list where elements don't match expected type.""" + json_data = ["string", 123, True] # Mixed types + response = create_response(List[int], json_data) + with pytest.raises(pydantic.ValidationError): + response.decode() + + +def test_decode_model_missing_required_fields(): + """Test decoding a model with missing required fields.""" + json_data = {} # Missing required 'value' field + response = create_response(SimpleModel, json_data) + with pytest.raises(pydantic.ValidationError): + response.decode() + + +def test_decode_non_json_as_model(): + """Test decoding non-JSON data as a model.""" + response = create_bytes_response(SimpleModel, b"Not a JSON object") + with pytest.raises(json.JSONDecodeError): + response.decode() + + +def test_decode_wrong_datetime_format(): + """Test decoding a datetime with wrong format.""" + json_data = "01/01/2023" # Wrong format + response = create_response(AwareDatetime, json_data) + with pytest.raises(pydantic.ValidationError): + response.decode() + + +def test_decode_invalid_rid(): + """Test decoding an invalid RID.""" + json_data = "not-a-valid-rid" + response = create_response(RID, json_data) + with pytest.raises(pydantic.ValidationError): + response.decode() + + +def test_decode_dict_with_wrong_value_type(): + """Test decoding a dict with values of wrong type.""" + json_data = {"key1": 123, "key2": 456} # Numbers instead of strings + response = create_response(Dict[str, SimpleModel], json_data) + with pytest.raises(pydantic.ValidationError): + response.decode() + + +def test_decode_malformed_json_model(): + """Test decoding malformed JSON for a model.""" + json_data = {"value": {"nested": "object"}} # Value should be string not object + response = create_response(SimpleModel, json_data) + with pytest.raises(pydantic.ValidationError): + response.decode() + + +def test_decode_validation_error(): + """Test validation error when decoding a model with invalid data.""" + # This should fail validation because the value is too short (min_length=3) + json_data = {"value": "ab"} + response = create_response(ModelWithAnnotation, json_data) + + with pytest.raises(pydantic.ValidationError): + response.decode() + + +def test_decode_multiple_type_adapter_calls(): + """Test that the type adapter cache is working.""" + # Create multiple responses with the same type to test caching + json_data1 = {"type": "RUNNING", "percent_complete": 25} + json_data2 = {"type": "FAILED", "error_message": "Error message"} + + response1 = create_response(Status, json_data1) + result1 = response1.decode() + + response2 = create_response(Status, json_data2) + result2 = response2.decode() + + assert isinstance(result1, RunningStatus) + assert isinstance(result2, FailedStatus) + assert result1.type == "RUNNING" + assert result2.type == "FAILED" diff --git a/tests/test_utils.py b/tests/test_utils.py new file mode 100644 index 000000000..897ff663b --- /dev/null +++ b/tests/test_utils.py @@ -0,0 +1,185 @@ +import typing +import warnings +from datetime import datetime +from datetime import timedelta +from datetime import timezone + +import pytest +import typing_extensions +from pydantic import BaseModel +from pydantic import ValidationError + +from foundry_sdk._core.utils import RID +from foundry_sdk._core.utils import UUID +from foundry_sdk._core.utils import AwareDatetime +from foundry_sdk._core.utils import Long +from foundry_sdk._core.utils import maybe_ignore_preview +from foundry_sdk._core.utils import remove_prefixes +from foundry_sdk._core.utils import resolve_forward_references + + +def test_remove_prefixes(): + assert remove_prefixes("http://example.com", ["https://", "http://"]) == "example.com" + assert remove_prefixes("https://example.com", ["https://", "http://"]) == "example.com" + assert remove_prefixes("example.com", ["https://", "http://"]) == "example.com" + + +def test_no_warning_when_preview_not_passed(): + @maybe_ignore_preview + def my_func_without_preview(preview: bool = False): + pass + + with warnings.catch_warnings(record=True) as w: + warnings.simplefilter("always") + my_func_without_preview() + assert len(w) == 0 # No warnings should be emitted + + +def test_no_warning_when_expected_preview(): + @maybe_ignore_preview + def my_func_without_preview(preview: bool = False): + pass + + with warnings.catch_warnings(record=True) as w: + warnings.simplefilter("always") + my_func_without_preview(preview=True) + assert len(w) == 0 # No warnings should be emitted + + +def test_warns_about_unexpected_preview(): + @maybe_ignore_preview + def my_func_without_preview(): + pass + + with pytest.warns( + UserWarning, + match=r'The "preview" argument is not required when calling my_func_without_preview\(\) since the endpoint is not in beta.', + ): + my_func_without_preview(preview=True) # type: ignore + + +def test_accepts_valid_rid(): + class WithRid(BaseModel): + rid: RID + + WithRid.model_validate({"rid": "ri.a.b.c.d"}) + WithRid.model_validate({"rid": "ri.foundry.main.dataset.b737e24d-6b19-43aa-93d5-da9fc4073f6"}) + + +def test_rejects_invalid_rid(): + class WithRid(BaseModel): + rid: RID + + with pytest.raises(ValidationError): + WithRid.model_validate({"rid": "ri.a.b.c"}) + + with pytest.raises(ValidationError): + WithRid.model_validate({"rid": "ri.foundry.main.0.b737e24d-6b19-43aa-93d5-da9fc4073f6"}) + + +def test_accepts_valid_uuid(): + class WithUuid(BaseModel): + uuid: UUID + + WithUuid.model_validate({"uuid": "b737e24d-6b19-43aa-93d5-da9fc4073f6e"}) + + +def test_rejects_invalid_uuid(): + class WithUuid(BaseModel): + uuid: UUID + + with pytest.raises(ValidationError): + WithUuid.model_validate({"uuid": "c"}) + + with pytest.raises(ValidationError): + WithUuid.model_validate({"uuid": "621f9a07-69e2-46c7-8015-c3bb8ee422e"}) + + +def test_accepts_valid_long(): + class WithLong(BaseModel): + long: Long + + WithLong.model_validate({"long": "1234"}) + WithLong.model_validate({"long": 1234}) + + +def test_rejects_invalid_long(): + class WithLong(BaseModel): + long: Long + + with pytest.raises(ValidationError): + WithLong.model_validate({"long": "a1234"}) + + +def test_long_serializes_to_string(): + class WithLong(BaseModel): + long: Long + + assert WithLong(long=123).model_dump_json() == '{"long":"123"}' + + +def test_accepts_valid_datetime(): + class WithDatetime(BaseModel): + datetime: AwareDatetime + + WithDatetime.model_validate({"datetime": datetime.now(timezone.utc)}) + + +def test_rejects_invalid_datetime(): + class WithDatetime(BaseModel): + datetime: AwareDatetime + + with pytest.raises(ValidationError): + WithDatetime.model_validate({"datetime": datetime.now()}) + + +def test_datetime_serializes_to_string(): + class WithDatetime(BaseModel): + datetime: AwareDatetime + + t = datetime(2023, 10, 1, 12, 0, 0, tzinfo=timezone.utc) + assert WithDatetime(datetime=t).model_dump_json() == '{"datetime":"2023-10-01T12:00:00+00:00"}' + + +def test_non_utc_datetime_serializes_to_utc_string(): + class WithDatetime(BaseModel): + datetime: AwareDatetime + + t = datetime(2023, 10, 1, 12, 0, 0, tzinfo=timezone(timedelta(hours=2))) + assert WithDatetime(datetime=t).model_dump_json() == '{"datetime":"2023-10-01T10:00:00+00:00"}' + + +def test_resolve_dict_forward_references(): + A = typing.Dict[str, "B"] + B = str + + assert A == typing.Dict[str, "B"] + resolve_forward_references(A, globals(), locals()) + assert A == typing.Dict[str, str] + + +def test_resolve_annotated_union_forward_references(): + A = typing_extensions.Annotated[typing.Union["B", "C"], "Foo Bar"] + B = str + C = int + + resolve_forward_references(A, globals(), locals()) + assert A == typing_extensions.Annotated[typing.Union[str, int], "Foo Bar"] + + +def test_resolve_duplicate_forward_references(): + A = typing.List["C"] + B = typing.List["C"] + C = typing.List[float] + + resolve_forward_references(B, globals(), locals()) + resolve_forward_references(A, globals(), locals()) + assert A == typing.List[typing.List[float]] + + +def test_resolve_double_forward_reference(): + A = typing.List[typing.List["B"]] + B = float + + resolve_forward_references(A, globals(), locals()) + assert A == typing.List[typing.List[float]] From 22bc4aa141028d3379cde24a56624b2206d19b9d Mon Sep 17 00:00:00 2001 From: overtonch Date: Tue, 10 Feb 2026 16:31:58 -0500 Subject: [PATCH 15/16] diffs --- scripts/set_npm_version.js | 13 +++++++++++++ scripts/set_python_version.py | 17 +++++++++++++++++ tox.ini | 34 ++++++++++++++++++++++++++++++++++ 3 files changed, 64 insertions(+) create mode 100644 scripts/set_npm_version.js create mode 100644 scripts/set_python_version.py create mode 100644 tox.ini diff --git a/scripts/set_npm_version.js b/scripts/set_npm_version.js new file mode 100644 index 000000000..455fa4081 --- /dev/null +++ b/scripts/set_npm_version.js @@ -0,0 +1,13 @@ +const fs = require('fs'); +const { execSync } = require('child_process'); + +const gitVersion = execSync('git describe --tags --abbrev=0').toString().trim(); + +console.log(`Setting version to ${gitVersion}...`); + +const path = 'docs-snippets-npm/package.json'; +const content = JSON.parse(fs.readFileSync(path, 'utf8')); +content.version = gitVersion; +fs.writeFileSync(path, JSON.stringify(content, null, 2)); + +console.log('Done!'); diff --git a/scripts/set_python_version.py b/scripts/set_python_version.py new file mode 100644 index 000000000..e7b8aca1c --- /dev/null +++ b/scripts/set_python_version.py @@ -0,0 +1,17 @@ +import subprocess + +gitversion = subprocess.check_output("git describe --tags --abbrev=0".split()).decode().strip() + +print(f"Setting version to {gitversion}...") + +path = "foundry_sdk/_versions.py" + +with open(path, "r") as f: + content = f.read() + +content = content.replace('__version__ = "0.0.0"', f'__version__ = "{gitversion}"') + +with open(path, "w") as f: + f.write(content) + +print("Done!") diff --git a/tox.ini b/tox.ini new file mode 100644 index 000000000..0ab32e3e8 --- /dev/null +++ b/tox.ini @@ -0,0 +1,34 @@ +[tox] +isolated_build = true +envlist = py{39,310,311,312}, pylint, mypy, black + +[testenv] +setenv = + PYTHONPATH = {toxinidir} +deps = + pydantic=={env:PYDANTIC_VERSION} + httpx=={env:HTTPX_VERSION} + pyright + click + polars + duckdb + pyarrow + annotated-types>=0.7.0,<1.0.0 + typing-extensions>=4.7.1,<5.0.0 + expects>=0.9.0 + mockito>=1.5.1 + pytest>=7.4.0 + pytest-asyncio>=0.23.0 + uvicorn>=0.34.0 + fastapi>=0.115.6 +allowlist_externals = poetry +commands = + poetry run pytest --tb=short tests/ + pyright foundry_sdk/ +passenv = PYDANTIC_VERSION,HTTPX_VERSION + +[testenv:black] +deps = + black == 24.1.1 +commands = + black --check foundry_sdk tests From a38bf2e356aef32bf30e43207c7f902e5a626d12 Mon Sep 17 00:00:00 2001 From: overtonch Date: Tue, 10 Feb 2026 16:34:00 -0500 Subject: [PATCH 16/16] remove manual change --- foundry_sdk/v2/language_models/__init__.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/foundry_sdk/v2/language_models/__init__.py b/foundry_sdk/v2/language_models/__init__.py index 4baa38650..06c162f14 100644 --- a/foundry_sdk/v2/language_models/__init__.py +++ b/foundry_sdk/v2/language_models/__init__.py @@ -15,16 +15,8 @@ from foundry_sdk.v2.language_models._client import AsyncLanguageModelsClient from foundry_sdk.v2.language_models._client import LanguageModelsClient -from foundry_sdk.v2.language_models.utils import get_foundry_token -from foundry_sdk.v2.language_models.utils import get_openai_base_url -from foundry_sdk.v2.language_models.utils import get_anthropic_base_url -from foundry_sdk.v2.language_models.utils import get_http_client __all__ = [ "LanguageModelsClient", "AsyncLanguageModelsClient", - "get_foundry_token", - "get_openai_base_url", - "get_anthropic_base_url", - "get_http_client", ]